????
Current Path : C:/Program Files/Azure Data Studio/resources/app/out/vs/workbench/ |
Current File : C:/Program Files/Azure Data Studio/resources/app/out/vs/workbench/workbench.desktop.main.js |
/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/(function(){var Q=["exports","require","vs/nls","vs/nls!vs/workbench/workbench.desktop.main","vs/base/common/lifecycle","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/log/common/log","vs/css!vs/workbench/workbench.desktop.main","vs/platform/actions/common/actions","vs/base/common/async","vs/base/common/errors","vs/platform/registry/common/platform","vs/base/common/types","vs/base/common/platform","vs/platform/theme/common/themeService","vs/base/common/arrays","vs/workbench/services/editor/common/editorService","vs/base/common/network","vs/platform/notification/common/notification","vs/platform/storage/common/storage","vs/platform/files/common/files","vs/base/common/resources","vs/editor/common/core/range","vs/platform/commands/common/commands","vs/platform/contextview/browser/contextView","vs/platform/telemetry/common/telemetry","vs/base/common/cancellation","vs/base/common/codicons","vs/base/common/strings","vs/base/common/actions","vs/platform/instantiation/common/extensions","vs/platform/theme/common/colorRegistry","vs/base/common/themables","vs/platform/keybinding/common/keybinding","vs/platform/workspace/common/workspace","@angular/core","vs/platform/opener/common/opener","vs/base/common/objects","vs/platform/quickinput/common/quickInput","vs/workbench/services/extensions/common/extensions","vs/workbench/common/contributions","vs/workbench/common/views","vs/workbench/common/editor","vs/editor/browser/editorExtensions","vs/platform/dialogs/common/dialogs","vs/editor/common/languages/language","vs/editor/common/core/position","vs/platform/product/common/productService","vs/workbench/api/common/extHost.protocol","vs/platform/theme/browser/defaultStyles","vs/base/common/path","vs/platform/configuration/common/configurationRegistry","vs/editor/common/services/model","sql/platform/connection/common/connectionManagement","vs/base/common/uuid","vs/workbench/services/extensions/common/extHostCustomers","vs/platform/label/common/label","vs/base/common/buffer","vs/base/common/severity","vs/platform/uriIdentity/common/uriIdentity","vs/workbench/services/environment/common/environmentService","vs/platform/accessibility/common/accessibility","vs/base/browser/keyboardEvent","vs/platform/clipboard/common/clipboardService","vs/base/common/map","vs/workbench/services/editor/common/editorGroupsService","vs/workbench/contrib/notebook/common/notebookCommon","vs/platform/progress/common/progress","vs/editor/common/editorContextKeys","vs/editor/common/services/languageFeatures","vs/editor/common/services/resolverService","sql/platform/telemetry/common/telemetry","vs/platform/theme/common/iconRegistry","vs/editor/common/services/textResourceConfiguration","vs/editor/browser/services/codeEditorService","vs/base/common/color","vs/platform/action/common/actionCommonCategories","vs/workbench/common/contextkeys","vs/base/common/iterator","vs/workbench/common/theme","vs/base/browser/ui/actionbar/actionbar","vs/workbench/services/host/browser/host","vs/base/browser/ui/aria/aria","vs/platform/actions/browser/menuEntryActionViewItem","vs/workbench/services/lifecycle/common/lifecycle","vs/platform/list/browser/listService","vs/platform/environment/common/environment","vs/workbench/services/layout/browser/layoutService","vs/workbench/services/textfile/common/textfiles","vs/platform/instantiation/common/descriptors","vs/platform/extensionManagement/common/extensionManagement","vs/editor/common/core/selection","vs/base/browser/browser","vs/editor/common/model/textModel","vs/editor/common/languages","vs/platform/native/common/native","sql/platform/theme/browser/defaultStyles","vs/base/common/decorators","vs/workbench/contrib/notebook/browser/notebookBrowser","vs/workbench/services/panecomposite/browser/panecomposite","vs/base/common/keyCodes","sql/platform/connection/common/connectionProfile","sql/platform/capabilities/common/capabilitiesService","vs/workbench/services/userDataProfile/common/userDataProfile","vs/base/common/observable","vs/base/common/htmlContent","vs/platform/layout/browser/layoutService","vs/platform/extensions/common/extensions","vs/platform/keybinding/common/keybindingsRegistry","vs/workbench/services/themes/common/workbenchThemeService","vs/platform/extensionManagement/common/extensionManagementUtil","vs/platform/userDataProfile/common/userDataProfile","sql/platform/connection/common/constants","vs/workbench/contrib/extensions/common/extensions","vs/workbench/contrib/terminal/browser/terminal","vs/platform/userDataSync/common/userDataSync","vs/workbench/services/extensions/common/extensionsRegistry","vs/base/common/hash","vs/editor/browser/editorBrowser","vs/workbench/services/preferences/common/preferences","vs/editor/common/languages/languageConfigurationRegistry","vs/platform/terminal/common/terminal","vs/workbench/services/remote/common/remoteAgentService","vs/base/common/filters","vs/base/browser/mouseEvent","sql/workbench/services/notebook/browser/notebookService","vs/workbench/services/path/common/pathService","vs/base/common/errorMessage","vs/editor/common/config/editorOptions","vs/platform/instantiation/common/serviceCollection","vs/workbench/browser/parts/views/viewPane","sql/base/browser/lifecycle","vs/editor/common/model","vs/platform/workspace/common/workspaceTrust","vs/workbench/services/environment/electron-sandbox/environmentService","vs/base/browser/fastDomNode","vs/base/common/collections","vs/base/browser/ui/widget","sql/workbench/common/constants","sql/workbench/services/bootstrap/browser/commonServiceInterface.service","vs/base/common/stopwatch","vs/editor/common/languages/modesRegistry","sql/workbench/common/styler","vs/workbench/contrib/notebook/common/notebookService","vs/workbench/services/extensionManagement/common/extensionManagement","vs/workbench/services/filesConfiguration/common/filesConfigurationService","vs/base/browser/touch","vs/editor/browser/services/bulkEditService","vs/platform/ipc/electron-sandbox/services","vs/platform/markers/common/markers","sql/workbench/browser/modelComponents/componentBase","sql/base/browser/dom","vs/base/browser/ui/actionbar/actionViewItems","vs/workbench/contrib/terminal/common/terminal","vs/workbench/services/editor/common/editorResolverService","vs/workbench/browser/editor","vs/base/common/json","vs/base/browser/ui/scrollbar/scrollableElement","vs/workbench/common/editor/editorInput","vs/workbench/browser/parts/editor/editorPane","vs/editor/common/core/editOperation","sql/base/browser/ui/inputBox/inputBox","vs/platform/theme/common/theme","sql/platform/dashboard/browser/interfaces","vs/base/browser/ui/iconLabel/iconLabels","sql/workbench/services/componentContext/browser/componentContextService","vs/platform/contextkey/common/contextkeys","sql/workbench/services/objectExplorer/browser/objectExplorerService","vs/base/common/performance","sql/workbench/browser/modal/modal","vs/workbench/browser/parts/views/viewPaneContainer","vs/workbench/contrib/notebook/common/notebookContextKeys","vs/workbench/services/statusbar/browser/statusbar","vs/workbench/services/workingCopy/common/workingCopyService","vs/base/browser/ui/list/listWidget","vs/base/common/labels","vs/platform/remote/common/remoteAuthorityResolver","vs/workbench/contrib/files/common/files","sql/base/common/promise","sql/platform/connection/common/utils","sql/base/browser/ui/panel/tab.component","vs/base/common/marshalling","sql/base/browser/ui/table/table","sql/platform/errorMessage/common/errorMessageService","vs/platform/undoRedo/common/undoRedo","vs/editor/browser/widget/codeEditorWidget","vs/workbench/common/memento","vs/workbench/contrib/terminal/common/terminalContextKey","vs/workbench/services/hover/browser/hover","sql/platform/connection/common/connectionProfileGroup","vs/base/common/glob","sql/workbench/api/common/sqlExtHostTypes","vs/base/common/mime","sql/base/browser/ui/button/button","sql/base/browser/ui/selectBox/selectBox","vs/workbench/browser/parts/editor/editorCommands","sql/base/common/strings","vs/base/common/functional","vs/base/common/lazy","vs/base/common/linkedList","sql/workbench/services/notebook/common/contracts","vs/base/common/extpath","vs/base/browser/ui/button/button","vs/platform/editor/common/editor","vs/editor/contrib/markdownRenderer/browser/markdownRenderer","vs/editor/contrib/snippet/browser/snippetController2","vs/workbench/contrib/notebook/common/notebookExecutionStateService","vs/workbench/common/configuration","vs/workbench/browser/labels","vs/base/common/assert","sql/workbench/contrib/charts/browser/interfaces","vs/base/browser/ui/splitview/splitview","vs/base/browser/markdownRenderer","sql/base/browser/ui/taskbar/taskbar","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/platform/audioCues/browser/audioCueService","vs/platform/actions/browser/toolbar","vs/workbench/contrib/webview/browser/webview","vs/workbench/services/activity/common/activity","vs/workbench/contrib/notebook/browser/controller/coreActions","vs/workbench/services/search/common/search","vs/base/common/numbers","vs/base/browser/event","sql/base/common/locConstants","vs/base/browser/ui/sash/sash","sql/platform/dashboard/browser/insightRegistry","vs/platform/telemetry/common/telemetryUtils","vs/editor/common/core/editorColorRegistry","vs/workbench/contrib/chat/browser/chat","vs/workbench/contrib/chat/common/chatService","vs/workbench/contrib/testing/common/testId","vs/workbench/common/editor/sideBySideEditorInput","vs/workbench/services/output/common/output","vs/editor/common/core/lineRange","vs/editor/browser/view/viewPart","vs/base/browser/dnd","sql/workbench/services/query/common/queryModel","vs/editor/common/services/editorWorker","vs/editor/browser/widget/embeddedCodeEditorWidget","vs/workbench/contrib/notebook/browser/view/cellPart","vs/workbench/services/configuration/common/configuration","vs/workbench/common/editor/diffEditorInput","vs/workbench/services/workingCopy/common/workingCopyBackup","sql/workbench/services/bootstrap/common/bootstrapParams","vs/base/browser/ui/inputbox/inputBox","vs/base/parts/ipc/common/ipc","sql/workbench/services/query/common/queryManagement","vs/editor/common/services/getIconClasses","vs/workbench/contrib/notebook/common/notebookKernelService","vs/workbench/services/history/common/history","vs/workbench/browser/dnd","sql/base/browser/ui/table/tableDataView","vs/base/common/iconLabels","vs/editor/browser/config/domFontInfo","vs/editor/contrib/codeAction/common/types","vs/base/common/date","vs/base/common/process","sql/platform/accounts/common/interfaces","sql/platform/clipboard/common/clipboardService","vs/editor/contrib/peekView/browser/peekView","vs/platform/workspaces/common/workspaces","vs/workbench/contrib/chat/common/chatContextKeys","vs/workbench/contrib/notebook/browser/notebookIcons","vs/workbench/services/configurationResolver/common/configurationResolver","vs/workbench/services/untitled/common/untitledTextEditorInput","vs/workbench/services/workingCopy/common/workingCopyFileService","sql/workbench/services/notebook/browser/models/modelInterfaces","sql/base/browser/ui/table/formatters","vs/base/browser/ui/toggle/toggle","vs/base/parts/sandbox/electron-sandbox/globals","sql/workbench/services/queryEditor/common/queryEditorService","vs/platform/opener/browser/link","vs/platform/dnd/browser/dnd","sql/platform/theme/common/vsstyler","vs/workbench/services/authentication/common/authentication","vs/workbench/contrib/search/browser/searchModel","vs/workbench/services/untitled/common/untitledTextEditorService","vs/workbench/services/extensions/common/extensionManifestPropertiesService","vs/base/common/ternarySearchTree","sql/platform/dashboard/browser/dashboardService","sql/workbench/services/bootstrap/browser/bootstrapService","vs/platform/product/common/product","vs/platform/quickinput/common/quickAccess","vs/platform/request/common/request","sql/workbench/services/objectExplorer/browser/treeUpdateUtils","vs/workbench/common/editor/editorModel","vs/workbench/contrib/mergeEditor/browser/utils","vs/workbench/contrib/notebook/browser/services/notebookEditorService","vs/workbench/contrib/scm/common/scm","vs/workbench/contrib/search/common/constants","vs/workbench/services/environment/browser/environmentService","vs/workbench/contrib/inlineChat/common/inlineChat","vs/workbench/common/editor/textResourceEditorInput","sql/workbench/services/objectExplorer/common/nodeType","vs/base/browser/ui/tree/tree","vs/base/common/stream","vs/editor/common/cursorCommon","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length","vs/editor/common/viewModel","vs/editor/contrib/snippet/browser/snippetParser","sql/base/parts/tree/browser/treeDefaults","vs/base/browser/ui/iconLabel/iconLabel","sql/workbench/services/jobManagement/common/interfaces","vs/platform/history/browser/contextScopedHistoryWidget","vs/platform/tunnel/common/tunnel","vs/platform/workspace/common/virtualWorkspace","vs/editor/contrib/suggest/browser/suggestController","vs/workbench/contrib/testing/common/testTypes","vs/workbench/services/extensionRecommendations/common/extensionRecommendations","vs/workbench/contrib/notebook/common/notebookEditorInput","vs/workbench/contrib/files/browser/files","vs/workbench/contrib/accessibility/browser/accessibleView","vs/workbench/contrib/chat/browser/actions/chatActions","vs/workbench/services/workingCopy/common/workingCopyEditorService","vs/workbench/contrib/terminal/browser/terminalActions","vs/base/common/idGenerator","vs/base/common/keybindings","sql/workbench/services/objectExplorer/common/treeNode","vs/editor/common/core/cursorColumns","vs/base/browser/canIUse","vs/base/browser/ui/dropdown/dropdownActionViewItem","sql/platform/angularEventing/browser/angularEventingService","vs/platform/ipc/common/mainProcessService","vs/editor/common/services/languageFeatureDebounce","vs/editor/contrib/suggest/browser/suggest","vs/platform/remote/common/remoteHosts","sql/platform/theme/common/colorRegistry","vs/platform/window/common/window","vs/workbench/contrib/preferences/common/preferences","vs/workbench/contrib/testing/common/testResultService","vs/workbench/services/configuration/common/jsonEditing","vs/workbench/contrib/comments/browser/commentService","vs/workbench/contrib/search/browser/searchActionsBase","vs/workbench/services/workspaces/common/workspaceEditing","vs/workbench/contrib/extensions/browser/extensionsActions","vs/base/common/marked/marked","@angular/common","vs/base/browser/ui/progressbar/progressbar","sql/base/browser/ui/checkbox/checkbox","vs/base/browser/ui/toolbar/toolbar","vs/editor/common/config/fontInfo","sql/workbench/services/profiler/browser/interfaces","vs/platform/quickinput/browser/pickerQuickAccess","vs/editor/contrib/editorState/browser/editorState","vs/editor/contrib/codeAction/browser/codeAction","sql/workbench/browser/modal/dialogHelper","sql/workbench/services/objectExplorer/browser/asyncServerTree","vs/editor/contrib/find/browser/findModel","vs/platform/update/common/update","vs/workbench/contrib/extensions/browser/extensionRecommendations","vs/workbench/contrib/notebook/browser/notebookEditorExtensions","vs/workbench/contrib/notebook/common/notebookRange","vs/workbench/contrib/tasks/common/taskService","vs/workbench/contrib/testing/common/testService","vs/workbench/contrib/testing/common/testProfileService","sql/workbench/contrib/query/browser/queryActions","vs/workbench/contrib/search/common/search","vs/workbench/services/editor/common/editorGroupColumn","sql/base/common/errors","vs/base/browser/trustedTypes","vs/base/common/dataTransfer","vs/editor/common/core/offsetRange","vs/editor/common/core/wordHelper","vs/editor/common/tokens/lineTokens","vs/base/browser/ui/countBadge/countBadge","vs/editor/common/core/stringBuilder","sql/platform/dashboard/common/dashboardContainerRegistry","sql/workbench/services/tasks/browser/tasksRegistry","sql/workbench/browser/taskUtilities","sql/workbench/common/editor/query/queryEditorInput","vs/workbench/contrib/mergeEditor/browser/model/lineRange","sql/workbench/services/objectExplorer/browser/mssqlNodeContext","vs/workbench/contrib/search/browser/searchIcons","vs/workbench/contrib/snippets/browser/snippets","vs/workbench/contrib/terminal/browser/terminalIcon","vs/workbench/contrib/testing/common/storedValue","vs/workbench/contrib/testing/common/testingContextKeys","vs/workbench/services/decorations/common/decorations","vs/workbench/contrib/tasks/common/tasks","vs/workbench/services/languageDetection/common/languageDetectionWorkerService","sql/workbench/services/tasks/common/tasksService","vs/workbench/services/search/common/queryBuilder","vs/workbench/services/userDataSync/common/userDataSync","sql/base/browser/componentHost.directive","sql/base/common/objects","vs/editor/browser/stableEditorScroll","vs/editor/browser/widget/diffEditorWidget2/utils","vs/editor/common/core/eolCounter","vs/editor/common/editorCommon","vs/editor/common/languages/languageConfiguration","vs/editor/contrib/hover/browser/hoverTypes","sql/workbench/contrib/executionPlan/browser/constants","vs/base/common/comparers","sql/base/browser/ui/table/plugins/cellSelectionModel.plugin","sql/base/browser/ui/table/plugins/rowSelectionModel.plugin","vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/base/browser/ui/list/listView","sql/base/browser/ui/taskbar/actionbar","sql/base/browser/ui/table/plugins/headerFilter.plugin","vs/base/browser/ui/tree/abstractTree","vs/editor/common/viewLayout/viewLineRenderer","vs/base/common/semver/semver","sql/workbench/contrib/jobManagement/browser/agentView.component","sql/workbench/services/jobManagement/common/jobManagementService","sql/workbench/contrib/jobManagement/browser/jobActions","sql/workbench/contrib/jobManagement/browser/jobManagementView","vs/editor/contrib/format/browser/format","vs/platform/extensionResourceLoader/common/extensionResourceLoader","sql/workbench/contrib/notebook/browser/notebookActions","vs/editor/contrib/folding/browser/folding","vs/editor/contrib/contextmenu/browser/contextmenu","vs/workbench/browser/parts/editor/editor","sql/workbench/common/theme","vs/workbench/contrib/chat/common/chatViewModel","vs/workbench/contrib/codeEditor/browser/menuPreventer","vs/workbench/contrib/extensions/browser/extensionsIcons","vs/workbench/contrib/terminal/browser/terminalExtensions","vs/workbench/contrib/terminal/common/terminalStrings","vs/workbench/contrib/terminalContrib/links/browser/terminalLinkHelpers","vs/workbench/contrib/webviewPanel/browser/webviewEditorInput","vs/workbench/contrib/tasks/common/problemMatcher","vs/workbench/services/issue/common/issue","vs/workbench/browser/actions/widgetNavigationCommands","vs/workbench/services/timer/browser/timerService","vs/workbench/contrib/accessibility/browser/accessibleViewActions","vs/workbench/contrib/inlineChat/browser/inlineChatController","vs/workbench/browser/parts/views/treeView","sql/platform/connection/common/interfaces","vs/base/common/jsonFormatter","sql/workbench/contrib/dashboard/browser/core/interfaces","sql/workbench/contrib/notebook/browser/cellViews/interfaces","vs/base/common/linkedText","sql/workbench/services/tasks/common/tasksNode","vs/editor/common/diff/linesDiffComputer","vs/editor/common/encodedTokenAttributes","vs/editor/common/model/textModelSearch","vs/editor/common/textModelEvents","vs/editor/browser/view/dynamicViewOverlay","vs/base/common/keybindingLabels","vs/base/browser/ui/highlightedlabel/highlightedLabel","sql/base/parts/tree/browser/treeImpl","vs/base/browser/ui/iconLabel/iconLabelHover","vs/base/browser/ui/selectBox/selectBox","sql/base/browser/ui/editableDropdown/browser/dropdown","vs/editor/common/languages/textToHtmlTokenizer","sql/workbench/services/executionPlan/common/interfaces","sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerContext","sql/workbench/services/objectExplorer/common/treeNodeContextKey","sql/workbench/services/connection/common/connectionContextKey","sql/workbench/contrib/dashboard/browser/containers/dashboardGridContainer.contribution","sql/workbench/contrib/dashboard/browser/containers/dashboardWidgetContainer.contribution","vs/editor/common/config/editorConfigurationSchema","vs/editor/contrib/codeAction/browser/codeActionController","vs/editor/browser/widget/diffEditorWidget","vs/platform/url/common/url","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController","vs/workbench/browser/quickaccess","vs/workbench/contrib/chat/browser/chatEditorInput","vs/workbench/contrib/codeEditor/browser/selectionClipboard","vs/workbench/contrib/files/browser/fileConstants","vs/workbench/contrib/preferences/browser/preferencesIcons","vs/workbench/contrib/preferences/common/settingsEditorColorRegistry","vs/workbench/contrib/searchEditor/browser/constants","vs/workbench/contrib/terminal/common/terminalColorRegistry","vs/workbench/contrib/testing/browser/icons","vs/workbench/contrib/testing/common/configuration","vs/workbench/contrib/testing/common/testingStates","sql/workbench/services/query/common/resultSerializer","vs/workbench/contrib/bulkEdit/browser/bulkCellEdits","vs/workbench/services/extensions/common/proxyIdentifier","vs/workbench/services/log/common/logConstants","vs/workbench/contrib/inlineChat/browser/inlineChatSession","vs/workbench/services/assignment/common/assignmentService","vs/workbench/contrib/files/browser/editors/fileEditorInput","vs/workbench/contrib/codeEditor/browser/simpleEditorOptions","vs/base/common/jsonEdit","vs/base/common/scrollable","vs/base/common/diff/diff","vs/css!sql/workbench/contrib/jobManagement/browser/media/jobs","vs/base/browser/ui/mouseCursor/mouseCursor","vs/editor/browser/config/tabFocus","vs/editor/common/core/characterClassifier","vs/editor/common/commands/replaceCommand","vs/editor/common/languages/supports","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet","vs/editor/common/model/prefixSumComputer","vs/editor/common/viewLayout/lineDecorations","sql/base/browser/ui/table/plugins/rowDetailView","vs/amdX","sql/workbench/browser/modelComponents/iconUtils","vs/base/browser/formattedTextRenderer","sql/base/browser/ui/panel/panel","sql/base/browser/ui/panel/panel.component","vs/base/browser/ui/findinput/findInput","vs/editor/browser/config/fontMeasurements","vs/platform/externalServices/common/serviceMachineId","vs/platform/history/browser/historyWidgetKeybindingHint","sql/workbench/services/connection/common/connectionDialogService","vs/platform/credentials/common/credentials","vs/platform/languagePacks/common/languagePacks","sql/workbench/contrib/notebook/browser/cellViews/codeActions","vs/editor/contrib/documentSymbols/browser/outlineModel","sql/platform/dashboard/browser/modelComponentRegistry","sql/workbench/browser/modelComponents/modelViewContent.component","sql/workbench/contrib/dashboard/browser/pages/dashboardPageContribution","sql/workbench/services/languageAssociation/common/languageAssociation","vs/editor/browser/coreCommands","vs/editor/contrib/clipboard/browser/clipboard","vs/editor/contrib/message/browser/messageController","vs/platform/terminal/common/capabilities/terminalCapabilityStore","sql/platform/theme/common/colors","sql/workbench/services/objectExplorer/browser/objectExplorerActions","vs/editor/contrib/find/browser/findState","vs/editor/contrib/find/browser/findController","vs/platform/extensionManagement/common/extensionStorage","vs/workbench/common/editor/editorOptions","vs/workbench/browser/part","vs/workbench/browser/parts/notifications/notificationsCommands","vs/workbench/browser/style","vs/workbench/contrib/editSessions/common/editSessions","vs/workbench/contrib/files/common/explorerModel","vs/workbench/contrib/markers/common/markers","vs/workbench/contrib/mergeEditor/browser/model/mapping","vs/workbench/contrib/mergeEditor/common/mergeEditor","vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser","vs/workbench/contrib/notebook/common/notebookEditorModelResolverService","vs/workbench/contrib/search/browser/replace","vs/workbench/contrib/terminal/browser/terminalIcons","vs/workbench/contrib/terminal/browser/terminalUri","vs/workbench/contrib/testing/common/observableValue","vs/workbench/contrib/testing/common/testResult","vs/workbench/services/extensions/common/extensionDevOptions","vs/workbench/services/files/common/elevatedFileService","vs/workbench/services/language/common/languageService","vs/workbench/common/editor/textEditorModel","vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel","vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService","vs/workbench/services/localization/common/locale","vs/workbench/services/outline/browser/outline","vs/workbench/contrib/customEditor/common/customEditor","vs/workbench/services/workingCopy/common/workingCopy","vs/workbench/services/workingCopy/common/workingCopyHistory","vs/workbench/browser/parts/editor/textCodeEditor","vs/workbench/services/untitled/common/untitledTextEditorModel","vs/workbench/services/textfile/common/textEditorService","vs/workbench/browser/actions/workspaceCommands","vs/workbench/browser/parts/compositeBarActions","@angular/router","sql/workbench/common/sqlWorkbenchUtils","sql/workbench/contrib/dashboard/browser/core/dashboardWidget","vs/base/common/history","vs/base/common/observableInternal/logging","vs/base/common/range","sql/base/browser/ui/table/asyncDataView","sql/base/browser/ui/label/label","vs/css!sql/workbench/services/dialog/browser/media/dialogModal","vs/css!vs/workbench/contrib/scm/browser/media/scm","vs/editor/browser/view/renderingContext","vs/editor/common/core/wordCharacterClassifier","vs/editor/common/editorFeatures","vs/editor/common/services/treeViewsDnd","vs/editor/common/viewEventHandler","vs/editor/contrib/folding/browser/foldingRanges","vs/editor/contrib/inlineCompletions/browser/utils","vs/base/common/jsonErrorMessages","vs/base/common/fuzzyScorer","sql/base/browser/ui/table/plugins/copyKeybind.plugin","sql/base/browser/ui/table/plugins/tableColumn","sql/base/browser/ui/table/plugins/buttonColumn.plugin","vs/base/browser/globalPointerMoveMonitor","sql/base/browser/ui/loadingSpinner/loadingSpinner","vs/base/browser/ui/iconLabel/simpleIconLabel","vs/base/common/worker/simpleWorker","vs/editor/common/model/editStack","vs/editor/contrib/gotoSymbol/browser/referencesModel","vs/platform/files/browser/webFileSystemAccess","sql/platform/backup/common/backupService","sql/workbench/services/contextualization/common/interfaces","sql/workbench/services/fileBrowser/common/interfaces","vs/editor/common/services/treeViewsDndService","sql/workbench/contrib/query/common/queryContext","sql/workbench/services/notebook/browser/models/notebookUtils","vs/platform/download/common/download","vs/platform/extensionRecommendations/common/extensionRecommendations","sql/platform/scripting/common/scriptingService","sql/workbench/browser/modelComponents/modelComponentWrapper.component","sql/workbench/contrib/dashboard/browser/containers/dashboardNavSection.contribution","vs/platform/remote/common/remoteSocketFactoryService","vs/platform/severityIcon/browser/severityIcon","vs/platform/terminal/common/environmentVariableShared","vs/editor/browser/editorDom","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/barChart.contribution","vs/platform/theme/common/tokenClassificationRegistry","vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2","vs/editor/contrib/wordHighlighter/browser/wordHighlighter","vs/platform/workspace/common/editSessions","vs/editor/contrib/hover/browser/hover","vs/platform/secrets/common/secrets","vs/platform/userDataProfile/common/userDataProfileStorageService","sql/workbench/browser/editor/profiler/profilerInput","sql/workbench/services/objectExplorer/browser/objectExplorerViewTreeShim","vs/workbench/contrib/chat/common/chatContributionService","vs/workbench/contrib/chat/common/chatModel","vs/workbench/contrib/chat/common/chatVariables","vs/workbench/contrib/markers/browser/messages","vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView","vs/workbench/contrib/notebook/browser/notebookOptions","vs/workbench/contrib/notebook/common/model/notebookCellTextModel","vs/workbench/contrib/notebook/common/notebookExecutionService","vs/workbench/contrib/notebook/common/notebookLoggingService","vs/workbench/contrib/scm/common/quickDiff","vs/workbench/contrib/terminal/common/environmentVariable","vs/workbench/contrib/testing/browser/explorerProjections/index","vs/workbench/contrib/testing/common/testingPeekOpener","vs/workbench/contrib/timeline/common/timeline","sql/workbench/services/query/common/queryRunner","vs/workbench/browser/codeeditor","vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig","sql/workbench/contrib/dashboard/browser/dashboardRegistry","vs/workbench/contrib/tasks/common/taskDefinitionRegistry","vs/workbench/services/authentication/browser/authenticationService","vs/workbench/api/browser/mainThreadWebviews","vs/workbench/contrib/notebook/browser/controller/cellOperations","vs/workbench/contrib/notebook/browser/diff/diffElementViewModel","vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel","vs/workbench/contrib/terminal/browser/terminalEditorInput","vs/workbench/contrib/accessibility/browser/accessibilityConfiguration","vs/workbench/services/remote/common/remoteExplorerService","vs/workbench/services/textfile/common/encoding","vs/workbench/contrib/mergeEditor/browser/mergeEditorInput","@angular/forms","@angular/platform-browser","vs/workbench/contrib/snippets/browser/tabCompletion","vs/workbench/contrib/notebook/browser/notebookEditorWidget","sql/workbench/contrib/notebook/browser/cellViews/textCell.component","vs/workbench/contrib/customEditor/browser/customEditorInput","vs/workbench/browser/actions/layoutActions","sql/workbench/contrib/dataExplorer/browser/dataExplorerViewlet","vs/workbench/browser/panecomposite","vs/workbench/contrib/chat/browser/chatWidget","sql/base/browser/ui/breadcrumb/interfaces","sql/base/common/collections","sql/workbench/browser/designer/interfaces","vs/base/browser/ui/list/list","vs/base/common/observableInternal/base","vs/base/common/cache","vs/base/common/symbols","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/interfaces","sql/base/browser/ui/table/plugins/rowNumberColumn.plugin","vs/base/common/uint","vs/css!sql/workbench/contrib/notebook/browser/cellViews/code","vs/css!vs/platform/quickinput/browser/media/quickInput","vs/css!vs/workbench/contrib/searchEditor/browser/media/searchEditor","vs/editor/browser/config/elementSizeObserver","vs/editor/common/config/editorZoom","vs/editor/common/core/textModelDefaults","vs/editor/common/diff/algorithms/diffAlgorithm","vs/editor/common/cursor/cursorWordOperations","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/ast","sql/platform/connection/common/connectionConfig","sql/workbench/services/notebook/browser/interfaces","sql/workbench/services/serverGroup/common/serverGroupViewModel","vs/base/browser/ui/resizable/resizable","vs/base/browser/ui/tree/objectTreeModel","sql/base/browser/ui/checkbox/checkbox.component","vs/base/browser/ui/tree/asyncDataTree","vs/base/browser/defaultWorkerFactory","vs/base/parts/ipc/common/ipc.net","vs/base/parts/ipc/electron-sandbox/ipc.mp","vs/editor/browser/controller/textAreaInput","vs/editor/common/languageFeatureRegistry","vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture","vs/editor/common/standaloneStrings","sql/platform/azureBlob/common/azureBlobService","sql/platform/dashboard/browser/dashboardViewService","sql/platform/metadata/common/metadataService","sql/platform/serverGroup/common/serverGroupController","sql/workbench/services/admin/common/adminService","sql/workbench/services/backupRestoreUrlBrowser/common/urlBrowserDialogService","sql/workbench/services/fileBrowser/common/fileBrowserDialogController","sql/workbench/services/resourceProvider/common/resourceProviderService","sql/workbench/services/restore/common/restoreService","vs/editor/common/services/markerDecorations","vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys","vs/platform/encryption/common/encryptionService","vs/platform/keybinding/common/resolvedKeybindingItem","sql/workbench/services/objectExplorer/browser/serverTreeRenderer","vs/platform/markers/common/markerService","vs/platform/policy/common/policy","vs/platform/profiling/common/profiling","sql/platform/dashboard/browser/widgetRegistry","vs/editor/browser/services/editorWorkerService","vs/editor/common/services/languagesAssociations","vs/platform/configuration/common/configurationModels","vs/editor/browser/widget/diffEditor.contribution","vs/platform/remote/common/remoteExtensionsScanner","vs/platform/sign/common/sign","vs/platform/terminal/common/terminalProfiles","vs/platform/terminal/common/terminalStrings","sql/platform/inputBox/browser/inputBox.component","sql/platform/editableDropdown/browser/editableDropdown.component","sql/platform/selectBox/browser/selectBox.component","sql/workbench/services/objectExplorer/browser/connectionTreeAction","sql/workbench/services/objectExplorer/browser/treeSelectionHandler","vs/editor/contrib/colorPicker/browser/colorDetector","vs/editor/contrib/find/browser/findWidget","vs/editor/contrib/zoneWidget/browser/zoneWidget","vs/platform/userDataSync/common/ignoredExtensions","vs/platform/extensionManagement/common/extensionsProfileScannerService","vs/platform/actions/browser/dropdownWithPrimaryActionViewItem","vs/platform/extensionManagement/common/extensionEnablementService","vs/platform/userDataSync/common/userDataSyncStoreService","vs/workbench/browser/parts/editor/breadcrumbs","sql/workbench/browser/editor/profiler/dashboardInput","sql/workbench/browser/editor/query/fileQueryEditorInput","vs/workbench/common/editor/binaryEditorModel","vs/workbench/common/resources","vs/workbench/contrib/comments/common/commentContextKeys","vs/workbench/contrib/comments/common/commentsConfiguration","vs/workbench/contrib/comments/browser/commentsTreeViewer","vs/workbench/contrib/debug/common/debug","vs/workbench/contrib/extensions/common/runtimeExtensionsInput","vs/workbench/contrib/markers/browser/markersModel","vs/workbench/contrib/mergeEditor/browser/view/colors","vs/workbench/contrib/notebook/browser/notebookViewEvents","vs/workbench/contrib/notebook/common/notebookCellStatusBarService","vs/workbench/api/common/extHostTypes","sql/workbench/contrib/executionPlan/browser/azdataGraphView","vs/workbench/api/browser/mainThreadNotebookDto","vs/workbench/contrib/search/common/searchHistoryService","vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions","vs/workbench/contrib/terminalContrib/quickFix/browser/quickFix","vs/workbench/contrib/testing/common/constants","vs/workbench/contrib/testing/common/testExplorerFilterState","vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput","vs/workbench/services/aiRelatedInformation/common/aiRelatedInformation","vs/workbench/services/banner/browser/bannerService","sql/workbench/contrib/executionPlan/browser/executionPlanViewHeader","vs/workbench/services/environment/electron-sandbox/shellEnvironmentService","vs/workbench/services/extensions/common/extensionHostKind","vs/workbench/api/browser/mainThreadBulkEdits","vs/workbench/browser/actions/windowActions","vs/workbench/services/languageStatus/common/languageStatusService","vs/workbench/contrib/webviewPanel/browser/webviewEditor","vs/workbench/contrib/codeEditor/browser/toggleWordWrap","vs/workbench/services/preferences/common/preferencesModels","vs/workbench/contrib/externalUriOpener/common/configuration","vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService","sql/workbench/browser/editor/query/untitledQueryEditorInput","vs/workbench/services/remote/common/tunnelModel","vs/workbench/services/textMate/browser/textMateTokenizationFeature","vs/workbench/services/userData/browser/userDataInit","vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput","vs/workbench/contrib/chat/browser/actions/chatQuickInputActions","vs/workbench/contrib/searchEditor/browser/searchEditorSerialization","vs/workbench/services/userDataProfile/common/remoteUserDataProfiles","vs/workbench/browser/parts/editor/textEditor","vs/workbench/browser/parts/editor/textResourceEditor","vs/workbench/contrib/mergeEditor/browser/view/mergeEditor","sql/workbench/contrib/notebook/browser/cellViews/codeCell.component","sql/workbench/contrib/notebook/browser/models/notebookInput","sql/workbench/contrib/query/browser/queryResultsEditor","vs/workbench/browser/actions/workspaceActions","vs/workbench/contrib/files/browser/fileActions","vs/workbench/contrib/files/browser/explorerViewlet","vs/workbench/services/workspaces/common/workspaceTrust","vs/workbench/contrib/search/browser/searchView","sql/base/common/map","sql/workbench/contrib/dashboard/browser/widgets/explorer/objectMetadataWrapper","sql/workbench/contrib/executionPlan/browser/executionPlanFileViewCache","sql/workbench/services/notebook/browser/utils","sql/workbench/services/notebook/common/notebookConstants","sql/workbench/services/progress/browser/simpleProgressIndicator","sql/workbench/services/serverGroup/common/interfaces","vs/base/browser/performance","vs/base/browser/ui/scrollbar/scrollbarState","vs/base/common/keybindingParser","sql/workbench/contrib/executionPlan/browser/executionPlanWidgetBase","vs/base/common/navigator","vs/base/common/paging","vs/base/browser/hash","sql/workbench/common/editor/query/gridTableState","sql/workbench/services/fileBrowser/common/fileNode","vs/css!sql/workbench/browser/modelComponents/media/flexContainer","vs/css!sql/workbench/contrib/executionPlan/browser/media/executionPlan","vs/base/browser/ui/codicons/codiconStyles","vs/css!vs/editor/contrib/colorPicker/browser/colorPicker","vs/css!vs/workbench/contrib/comments/browser/media/review","vs/editor/common/core/indentation","vs/editor/common/cursor/cursorMoveOperations","vs/editor/common/cursor/cursorDeleteOperations","vs/editor/common/cursor/cursorMoveCommands","vs/editor/common/languages/supports/tokenization","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/tokenizer","vs/editor/common/model/intervalTree","vs/editor/common/model/utils","vs/editor/common/textModelGuides","vs/editor/common/tokens/contiguousMultilineTokensBuilder","vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/editor/common/viewEvents","vs/editor/common/viewModel/overviewZoneManager","vs/editor/common/viewModelEventDispatcher","vs/editor/contrib/folding/browser/syntaxRangeProvider","vs/editor/contrib/inlineCompletions/browser/commandIds","vs/editor/contrib/inlineCompletions/browser/ghostText","vs/editor/contrib/inlineCompletions/browser/singleTextEdit","vs/editor/contrib/semanticTokens/common/semanticTokensConfig","sql/platform/connection/common/providerConnectionInfo","sql/workbench/contrib/assessment/common/strings","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/chartInsight.contribution","sql/workbench/services/jobManagement/browser/jobManagementUtilities","vs/base/browser/dompurify/dompurify","sql/base/browser/ui/table/plugins/additionalKeyBindings.plugin","sql/base/browser/ui/table/plugins/autoSizeColumns.plugin","sql/workbench/browser/designer/designerTableUtil","vs/base/browser/ui/contextview/contextview","vs/base/browser/ui/dropdown/dropdown","vs/base/browser/ui/tree/indexTreeModel","sql/base/browser/ui/radioButton/radioButton","vs/base/browser/ui/scrollbar/scrollbarArrow","sql/base/browser/ui/scrollable/scrollable.directive","vs/base/browser/ui/hover/hoverWidget","vs/base/browser/ui/grid/grid","sql/base/browser/ui/buttonMenu/buttonMenu","sql/base/browser/ui/panel/tabHeader.component","sql/base/browser/ui/propertiesContainer/propertiesContainer.component","vs/base/browser/ui/menu/menu","vs/base/browser/ui/tree/objectTree","vs/base/common/uriIpc","vs/base/parts/ipc/common/ipc.mp","vs/base/parts/storage/common/storage","vs/editor/browser/view/viewLayer","vs/editor/common/languageSelector","vs/editor/common/languages/supports/richEditBrackets","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder","vs/editor/contrib/inlayHints/browser/inlayHints","vs/editor/common/languages/nullTokenize","vs/platform/action/common/action","vs/platform/environment/common/environmentService","vs/platform/extensions/common/extensionValidator","sql/platform/azureAccount/common/azureAccountService","sql/platform/credentials/common/credentialsService","sql/platform/modelComponents/browser/modelViewService","sql/platform/serialization/common/serializationService","sql/workbench/contrib/backup/common/backupUiService","sql/workbench/services/assessment/common/interfaces","sql/workbench/services/connection/common/connectionTreeService","sql/workbench/services/dataGridProvider/common/dataGridProviderService","sql/workbench/services/diagnostics/common/errorDiagnosticsService","sql/workbench/services/insights/browser/insightsDialogService","vs/editor/common/services/semanticTokensStyling","sql/workbench/services/componentContext/browser/contextKeys","sql/workbench/services/notebook/common/localContentManager","vs/editor/contrib/parameterHints/browser/provideSignatureHelp","vs/platform/debug/common/extensionHostDebug","vs/platform/diagnostics/common/diagnostics","vs/platform/files/common/watcher","vs/platform/instantiation/common/instantiationService","vs/platform/issue/common/issue","vs/platform/keybinding/common/baseResolvedKeybinding","vs/platform/keyboardLayout/common/keyboardLayout","sql/workbench/contrib/dashboard/browser/services/breadcrumb.service","sql/workbench/contrib/charts/browser/utils","sql/platform/notebooks/common/outputRegistry","sql/workbench/browser/modelComponents/componentWithIconBase","sql/workbench/contrib/dashboard/browser/containers/dashboardWebviewContainer.contribution","sql/workbench/contrib/notebook/browser/outputs/mimeRegistry","vs/editor/browser/dnd","vs/editor/common/languages/autoIndent","vs/editor/common/languages/enterAction","vs/editor/common/commands/shiftCommand","vs/editor/common/cursor/cursorTypeOperations","sql/workbench/browser/actions","vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode","vs/platform/extensionManagement/common/implicitActivationEvents","vs/editor/contrib/gotoSymbol/browser/goToSymbol","vs/editor/contrib/hover/browser/markdownHoverParticipant","vs/platform/terminal/common/terminalEnvironment","vs/platform/terminal/common/terminalPlatformConfiguration","vs/editor/contrib/symbolIcons/browser/symbolIcons","vs/editor/browser/viewParts/lines/viewLine","sql/workbench/services/objectExplorer/browser/dragAndDropController","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/barChart.component","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/lineChart.component","vs/editor/common/services/semanticTokensProviderStyling","vs/editor/contrib/inlineProgress/browser/inlineProgress","vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController","vs/platform/userDataSync/common/userDataSyncAccount","vs/platform/window/electron-sandbox/window","sql/platform/actions/browser/menuEntryActionViewItem","vs/editor/contrib/gotoError/browser/gotoError","vs/editor/contrib/gotoSymbol/browser/peek/referencesController","vs/editor/contrib/gotoSymbol/browser/goToCommands","vs/editor/contrib/inlayHints/browser/inlayHintsController","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget","vs/platform/userDataSync/common/abstractSynchronizer","vs/platform/userDataSync/common/userDataSyncMachines","vs/workbench/browser/actions","vs/workbench/browser/parts/views/viewFilter","sql/workbench/browser/editData/editDataInput","sql/workbench/common/editor/query/queryResultsInput","vs/workbench/common/component","vs/workbench/common/notifications","vs/workbench/browser/parts/notifications/notificationsActions","sql/workbench/browser/modal/optionsDialog","vs/workbench/contrib/callHierarchy/common/callHierarchy","vs/workbench/contrib/chat/common/chatWidgetHistoryService","vs/workbench/contrib/comments/browser/commentColors","vs/workbench/contrib/comments/browser/commentFormActions","vs/workbench/contrib/extensions/common/extensionsInput","vs/workbench/contrib/interactive/browser/interactiveDocumentService","vs/workbench/contrib/localHistory/browser/localHistory","vs/workbench/contrib/markers/browser/markersFilterOptions","vs/workbench/contrib/markers/browser/markersViewActions","vs/workbench/contrib/mergeEditor/browser/model/editing","vs/workbench/contrib/mergeEditor/browser/view/editorGutter","vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView","vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions","sql/workbench/contrib/views/browser/nodeContext","vs/workbench/contrib/notebook/common/notebookRendererMessagingService","vs/workbench/contrib/notebook/common/services/notebookWorkerService","vs/workbench/contrib/outline/browser/outline","vs/workbench/contrib/preferences/browser/settingsLayout","vs/workbench/contrib/scm/browser/util","vs/workbench/contrib/snippets/browser/snippetsFile","vs/workbench/contrib/tags/common/workspaceTags","vs/workbench/contrib/terminal/browser/terminalStatusList","vs/workbench/contrib/terminal/browser/terminalTooltip","vs/workbench/contrib/terminal/common/terminalEnvironment","vs/workbench/contrib/terminalContrib/links/browser/terminalLinkParsing","vs/workbench/contrib/testing/browser/explorerProjections/testingViewState","vs/workbench/contrib/testing/browser/explorerProjections/testItemContextOverlay","vs/workbench/contrib/testing/common/testingContinuousRunService","vs/workbench/contrib/testing/common/testingUri","vs/workbench/contrib/typeHierarchy/common/typeHierarchy","sql/workbench/contrib/dashboard/browser/contents/webviewContent.component","vs/workbench/contrib/webview/browser/webviewWindowDragMonitor","vs/workbench/contrib/webviewView/browser/webviewViewService","sql/platform/accounts/common/accountActions","vs/workbench/services/editor/browser/editorDropService","sql/workbench/services/connection/browser/connectionActions","sql/workbench/services/notebook/browser/sql/sqlSessionManager","vs/workbench/browser/parts/editor/editorQuickAccess","vs/workbench/browser/parts/editor/sideBySideEditor","vs/workbench/common/editor/editorGroupModel","vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview","vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets","vs/workbench/contrib/terminal/browser/terminalMenus","vs/workbench/services/editor/common/editorGroupFinder","vs/workbench/contrib/preferences/browser/preferencesWidgets","vs/workbench/services/extensions/common/extensionHostProtocol","vs/workbench/services/extensions/common/extensionRunningLocation","vs/workbench/contrib/chat/common/chatSlashCommands","vs/workbench/services/files/common/files","vs/workbench/contrib/interactive/browser/interactiveEditorInput","vs/workbench/contrib/notebook/browser/contrib/find/findModel","vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions","vs/workbench/contrib/notebook/common/notebookEditorModel","vs/workbench/services/integrity/common/integrity","vs/workbench/contrib/extensions/electron-sandbox/runtimeExtensionsEditor","vs/workbench/common/editor/textResourceEditorModel","vs/workbench/contrib/extensions/common/extensionsUtils","vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess","vs/workbench/services/preferences/browser/keybindingsEditorInput","vs/workbench/browser/parts/titlebar/menubarControl","vs/workbench/services/preferences/common/preferencesEditorInput","vs/workbench/services/progress/browser/progressIndicator","vs/workbench/contrib/terminal/common/history","vs/workbench/contrib/terminal/browser/xterm/xtermTerminal","sql/workbench/contrib/dataExplorer/browser/connectionViewletPanel","vs/workbench/contrib/url/browser/trustedDomains","vs/workbench/services/themes/common/colorThemeSchema","vs/workbench/services/themes/common/productIconThemeSchema","sql/workbench/browser/modelComponents/card.component","sql/workbench/contrib/dashboard/browser/contents/dashboardWidgetWrapper.component","sql/workbench/services/dialog/browser/dialogPane","sql/workbench/browser/modelComponents/modelViewInput","vs/workbench/services/title/common/titleService","vs/workbench/services/userActivity/common/userActivityService","vs/workbench/contrib/preferences/browser/settingsTreeModels","vs/workbench/contrib/comments/browser/simpleCommentEditor","vs/workbench/contrib/comments/browser/commentReply","vs/workbench/contrib/chat/browser/actions/chatExecuteActions","vs/workbench/contrib/search/browser/searchWidget","vs/workbench/services/views/browser/treeViewsService","vs/workbench/browser/parts/editor/binaryEditor","vs/workbench/browser/parts/editor/textDiffEditor","vs/workbench/contrib/searchEditor/browser/searchEditorInput","vs/workbench/services/textfile/common/textFileEditorModel","sql/workbench/contrib/notebook/browser/cellViews/code.component","sql/workbench/contrib/notebook/browser/notebookEditor","sql/workbench/contrib/notebook/browser/models/fileNotebookInput","sql/workbench/contrib/executionPlan/browser/executionPlanFileView","sql/workbench/contrib/query/browser/queryEditor","vs/workbench/browser/parts/editor/editorActions","vs/workbench/contrib/localHistory/browser/localHistoryCommands","vs/workbench/api/browser/mainThreadDocuments","vs/workbench/browser/parts/panel/panelPart","vs/workbench/contrib/extensions/browser/extensionsList","vs/workbench/contrib/notebook/browser/notebookEditor","sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet","sql/base/common/navigator","sql/base/parts/tree/browser/tree","electron","sql/platform/query/common/constants","sql/workbench/contrib/assessment/common/consts","sql/workbench/contrib/executionPlan/browser/executionPlanWidgetController","sql/workbench/contrib/extensions/common/constants","sql/workbench/contrib/notebook/browser/utils","sql/workbench/contrib/notebook/common/notebookCommon","sql/workbench/contrib/resourceViewer/common/resourceViewer","sql/workbench/services/azureBlob/browser/azureBlobService","sql/workbench/services/connection/browser/utils","sql/workbench/services/fileBrowser/common/fileValidationServiceConstants","sql/workbench/services/notebook/browser/outputs/mimemodel","sql/workbench/services/notebook/browser/outputs/sanitizer","sql/workbench/services/notebook/common/nbformat","sql/workbench/services/query/common/gridContentEvents","vs/base/common/amd","vs/base/common/observableInternal/autorun","vs/base/common/observableInternal/derived","vs/base/common/parsers","vs/base/common/ports","vs/base/common/prefixTree","vs/base/browser/ui/list/rangeMap","vs/base/common/ime","sql/workbench/contrib/notebook/browser/calloutDialog/common/utils","vs/base/common/search","sql/base/browser/ui/table/hybridDataProvider","sql/base/common/gridRange","sql/workbench/services/objectExplorer/browser/asyncRecentConnectionTreeDataSource","sql/base/browser/ui/chart/chart.component","chart.js","sql/base/browser/ui/chart/chart.module","vs/base/parts/request/common/request","vs/css!sql/base/browser/ui/editableDropdown/browser/media/dropdownList","vs/css!sql/base/browser/ui/table/media/slick.grid","vs/css!sql/base/browser/ui/table/plugins/media/iconColumn","vs/css!sql/workbench/browser/modelComponents/media/editor","vs/css!sql/workbench/contrib/assessment/browser/media/asmt","vs/css!sql/workbench/contrib/jobManagement/browser/media/jobHistory","vs/css!sql/workbench/contrib/notebook/browser/notebookViews/notebookViewsGrid","vs/css!sql/workbench/contrib/query/browser/modelViewTab/media/dialogModal","vs/css!sql/workbench/contrib/resourceViewer/browser/media/resourceViewerView","vs/css!sql/workbench/services/connection/browser/media/sqlConnection","vs/css!sql/workbench/services/objectExplorer/browser/media/objectTypes/objecttypes","vs/css!vs/base/browser/ui/actionbar/actionbar","vs/css!vs/base/browser/ui/dropdown/dropdown","vs/css!vs/base/browser/ui/findinput/findInput","vs/css!vs/base/browser/ui/grid/gridview","vs/css!vs/base/browser/ui/list/list","vs/css!vs/platform/actionWidget/browser/actionWidget","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/browser/parts/sidebar/media/sidebarpart","vs/css!vs/workbench/browser/parts/views/media/paneviewlet","vs/editor/browser/config/migrateOptions","vs/editor/browser/viewParts/minimap/minimapCharSheet","vs/editor/common/config/diffEditor","vs/editor/browser/view/viewUserInputEvents","vs/editor/browser/controller/textAreaState","vs/editor/common/commands/trimTrailingWhitespaceCommand","vs/editor/common/core/rgba","vs/editor/common/cursor/cursorAtomicMoveOperations","vs/editor/common/diff/advancedLinesDiffComputer","vs/editor/common/diff/legacyLinesDiffComputer","vs/editor/common/languages/linkComputer","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/combineTextEditInfos","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/parser","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets","vs/editor/common/model/textModelPart","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase","vs/editor/common/modelLineProjectionData","vs/editor/common/services/unicodeTextModelHighlighter","vs/editor/common/model/guidesTextModelPart","vs/editor/common/tokens/contiguousTokensEditing","vs/editor/browser/viewParts/margin/margin","vs/editor/contrib/comment/browser/blockCommentCommand","vs/editor/contrib/find/browser/replacePattern","vs/editor/contrib/folding/browser/foldingModel","vs/editor/contrib/folding/browser/indentRangeProvider","vs/editor/contrib/format/browser/formattingEdit","vs/editor/contrib/indentation/browser/indentUtils","vs/editor/contrib/smartSelect/browser/bracketSelections","vs/editor/contrib/stickyScroll/browser/stickyScrollElement","vs/editor/contrib/suggest/browser/completionModel","vs/editor/contrib/suggest/browser/wordDistance","sql/workbench/common/backup/constants","sql/workbench/contrib/notebook/browser/calloutDialog/common/constants","sql/workbench/contrib/notebook/common/notebookLoc","sql/workbench/services/notebook/browser/notebookViews/notebookViewModel","sql/workbench/services/restore/common/constants","vs/base/browser/ui/tree/treeDefaults","sql/workbench/contrib/notebook/common/utils","vs/base/common/processes","vs/base/common/console","sql/workbench/contrib/profiler/browser/profilerCopyHandler","sql/base/browser/ui/table/plugins/checkboxSelectColumn.plugin","sql/base/browser/ui/table/plugins/mousewheelTableScroll.plugin","sql/workbench/contrib/dashboard/browser/dashboardIconUtil","sql/workbench/contrib/jobManagement/browser/jobStepsViewTree","sql/workbench/services/accountManagement/browser/tenantListRenderer","sql/workbench/services/objectExplorer/browser/iconRenderer","sql/base/browser/ui/loadingSpinner/loadingSpinner.component","sql/base/browser/ui/loadingSpinner/loadingSpinner.module","sql/base/browser/ui/fieldset/fieldset","sql/base/browser/ui/table/treeGrid","vs/base/browser/ui/scrollbar/abstractScrollbar","sql/base/browser/ui/scrollable/scrollable.module","vs/base/browser/ui/list/listPaging","vs/base/browser/ui/grid/gridview","vs/base/browser/ui/splitview/paneview","vs/base/browser/ui/table/tableWidget","vs/base/browser/ui/selectBox/selectBoxCustom","sql/base/browser/ui/listBox/listBox","sql/base/browser/ui/panel/panel.module","sql/base/browser/ui/propertiesContainer/propertiesContainer.module","vs/base/browser/ui/findinput/findInputToggles","vs/base/browser/ui/tree/dataTree","vs/base/browser/ui/dialog/dialog","vs/editor/browser/widget/diffEditorWidget2/diffEditorViewModel","vs/editor/common/core/textChange","vs/editor/common/services/semanticTokensDto","vs/editor/contrib/hover/browser/hoverOperation","vs/editor/browser/widget/diffEditorWidget2/movedBlocksLines","vs/editor/common/viewModel/viewModelDecorations","vs/editor/common/model/textModelTokens","vs/editor/common/viewModel/minimapTokensColorTracker","vs/platform/extensionManagement/common/configRemotes","vs/platform/extensionManagement/common/extensionNls","sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerView","sql/workbench/services/accountManagement/browser/accountPicker","sql/workbench/services/dashboard/browser/newDashboardTabDialog","sql/workbench/services/fileBrowser/common/fileBrowserViewModel","sql/workbench/services/tableDesigner/common/interface","vs/editor/contrib/dropOrPasteInto/browser/edit","vs/platform/checksum/common/checksumService","vs/editor/contrib/codelens/browser/codelens","vs/editor/contrib/semanticTokens/common/getSemanticTokens","sql/workbench/contrib/notebook/browser/notebookLinkHandler","sql/workbench/contrib/notebook/browser/outputs/notebookMarkdown","sql/workbench/contrib/dashboard/browser/core/actions","vs/platform/extensionManagement/common/extensionUrlTrust","vs/platform/extensions/common/extensionHostStarter","vs/platform/externalTerminal/common/externalTerminal","vs/platform/files/common/diskFileSystemProviderClient","vs/editor/contrib/dropOrPasteInto/browser/postEditWidget","vs/platform/keybinding/common/keybindingResolver","vs/platform/layout/browser/zIndexRegistry","vs/platform/lifecycle/common/lifecycle","sql/workbench/browser/scriptingActions","sql/workbench/contrib/assessment/browser/asmtView.component","sql/workbench/contrib/dashboard/browser/contents/controlHostContent.component","vs/editor/contrib/gotoError/browser/markerNavigationService","vs/platform/menubar/electron-sandbox/menubar","sql/workbench/services/query/common/gridDataProvider","sql/workbench/browser/ui/infoBox/infoBox","vs/platform/quickinput/browser/quickInputUtils","vs/platform/quickinput/browser/quickPickPin","sql/platform/resourceViewer/common/resourceViewerRegistry","sql/workbench/browser/modelComponents/image.component","sql/workbench/browser/modelComponents/titledComponent","sql/workbench/contrib/dashboard/browser/containers/dashboardControlHostContainer.contribution","sql/workbench/contrib/dashboard/browser/containers/dashboardModelViewContainer.contribution","sql/workbench/contrib/dashboard/browser/core/dashboardHelper","sql/workbench/services/notebook/browser/models/cell","sql/workbench/contrib/objectExplorer/common/serverGroup.contribution","vs/editor/browser/services/webWorker","vs/editor/contrib/colorPicker/browser/defaultDocumentColorProvider","vs/editor/contrib/colorPicker/browser/color","vs/editor/contrib/suggest/browser/suggestWidgetDetails","vs/platform/configuration/common/configurations","vs/platform/remote/common/remoteAgentConnection","vs/platform/remote/common/sharedProcessTunnelService","vs/platform/remoteTunnel/common/remoteTunnel","vs/platform/storage/common/storageIpc","vs/platform/telemetry/common/commonProperties","vs/editor/browser/widget/workerBasedDocumentDiffProvider","vs/editor/contrib/codeAction/browser/codeActionModel","vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/editor/contrib/hover/browser/getHover","vs/editor/contrib/indentation/browser/indentation","vs/editor/contrib/linesOperations/browser/linesOperations","vs/editor/contrib/smartSelect/browser/smartSelect","vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators","vs/editor/contrib/wordOperations/browser/wordOperations","vs/editor/browser/widget/diffNavigator","vs/platform/profiling/electron-sandbox/profileAnalysisWorkerService","vs/platform/terminal/common/capabilities/commandDetectionCapability","vs/platform/terminal/common/environmentVariable","vs/platform/terminal/common/environmentVariableCollection","sql/base/browser/ui/table/tableCellEditorFactory","sql/workbench/contrib/editData/browser/editDataActions","vs/platform/actionWidget/browser/actionWidget","vs/editor/browser/widget/diffReview","vs/editor/contrib/parameterHints/browser/parameterHints","vs/editor/browser/controller/mouseTarget","vs/platform/quickinput/browser/quickInputList","sql/workbench/browser/modelComponents/divContainer.component","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/chartInsight.component","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/pieChart.component","sql/workbench/contrib/executionPlan/browser/executionPlanPropertiesViewBase","sql/workbench/contrib/notebook/browser/cellToolbarActions","sql/workbench/contrib/notebook/browser/cellViews/cellToolbar.component","vs/editor/browser/widget/diffEditorWidget2/overviewRulerPart","sql/workbench/contrib/charts/browser/graphInsight","vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess","vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess","vs/editor/contrib/semanticTokens/browser/viewportSemanticTokens","vs/editor/browser/widget/diffEditorWidget2/decorations","vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/editor/contrib/colorPicker/browser/colorHoverParticipant","vs/editor/contrib/dnd/browser/dnd","vs/editor/contrib/find/browser/findDecorations","vs/editor/contrib/folding/browser/foldingDecorations","vs/editor/contrib/hover/browser/contentHover","vs/editor/contrib/dropOrPasteInto/browser/copyPasteController","vs/editor/contrib/links/browser/links","vs/editor/contrib/wordHighlighter/browser/highlightDecorations","vs/platform/userDataSync/common/content","vs/platform/userDataSync/common/settingsMerge","vs/platform/userDataSync/common/userDataSyncIpc","vs/platform/workspace/common/canonicalUri","vs/editor/contrib/dropOrPasteInto/browser/defaultProviders","vs/editor/contrib/snippet/browser/snippetVariables","vs/editor/contrib/snippet/browser/snippetSession","vs/platform/extensionManagement/common/extensionsScannerService","vs/editor/contrib/codelens/browser/codelensController","vs/editor/contrib/multicursor/browser/multicursor","vs/editor/contrib/suggest/browser/suggestMemory","sql/workbench/contrib/notebook/browser/notebookEditor.component","vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition","vs/editor/contrib/inlayHints/browser/inlayHintsLocations","vs/editor/contrib/stickyScroll/browser/stickyScrollController","vs/editor/contrib/suggest/browser/suggestWidgetStatus","vs/editor/contrib/suggest/browser/suggestWidget","vs/platform/actions/browser/floatingMenu","vs/platform/quickinput/browser/commandsQuickAccess","vs/platform/userDataProfile/common/userDataProfileIpc","vs/workbench/api/common/shared/dataTransferCache","vs/workbench/browser/iframe","vs/workbench/browser/parts/notifications/notificationsTelemetry","vs/workbench/browser/parts/views/checkbox","vs/workbench/common/activity","sql/workbench/services/queryEditor/browser/editorDescriptorService","sql/workbench/browser/editData/editDataResultsInput","vs/workbench/common/editor/diffEditorModel","vs/workbench/common/editor/textDiffEditorModel","vs/workbench/browser/composite","sql/workbench/contrib/notebook/browser/cellViews/output.component","vs/workbench/browser/parts/notifications/notificationsList","vs/workbench/contrib/chat/browser/chatFollowups","vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget","vs/workbench/contrib/chat/common/chatColors","vs/workbench/contrib/chat/common/chatProvider","vs/workbench/contrib/chat/common/chatWordCounter","vs/workbench/contrib/codeEditor/browser/editorLineNumberMenu","vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget","vs/workbench/contrib/comments/browser/commentGlyphWidget","vs/workbench/contrib/comments/browser/comments","vs/workbench/contrib/comments/browser/commentsFilterOptions","vs/workbench/contrib/comments/common/commentModel","vs/workbench/contrib/comments/browser/timestamp","vs/workbench/contrib/debug/browser/debugColors","vs/workbench/contrib/extensions/common/extensionQuery","vs/workbench/contrib/extensions/common/extensionsFileTemplate","vs/workbench/contrib/inlineChat/browser/utils","vs/workbench/contrib/interactive/browser/interactiveCommon","vs/workbench/contrib/interactive/browser/interactiveHistoryService","vs/workbench/contrib/localHistory/browser/localHistoryFileSystemProvider","vs/workbench/contrib/mergeEditor/browser/model/rangeUtils","vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange","vs/workbench/contrib/notebook/browser/contrib/find/findFilters","vs/workbench/contrib/notebook/browser/diff/eventDispatcher","vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll","sql/workbench/contrib/executionPlan/browser/widgets/nodeSearchWidget","sql/workbench/services/connection/browser/connectionWidget","sql/workbench/services/connection/browser/connectionController","sql/workbench/services/connection/common/serverInfoContextKey","sql/workbench/services/errorMessage/browser/errorMessageDialog","sql/workbench/services/objectExplorer/browser/serverTreeActionProvider","sql/workbench/browser/editor/tableDesigner/tableDesignerInput","vs/workbench/contrib/notebook/browser/contrib/clipboard/cellOutputClipboard","vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget","vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel","vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel","vs/workbench/contrib/notebook/common/notebookProvider","vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver","vs/workbench/contrib/notebook/browser/viewModel/foldingModel","vs/workbench/contrib/remote/browser/remoteIcons","vs/workbench/contrib/scm/browser/scmRepositoryRenderer","vs/workbench/contrib/scm/browser/scmViewService","vs/workbench/contrib/search/browser/patternInputWidget","vs/workbench/contrib/search/common/notebookSearch","vs/workbench/contrib/share/common/share","vs/workbench/contrib/snippets/browser/snippetPicker","vs/workbench/contrib/snippets/browser/commands/surroundWithSnippet","vs/workbench/contrib/snippets/browser/snippetCompletionProvider","vs/workbench/contrib/splash/browser/splash","vs/workbench/contrib/tasks/common/taskSystem","vs/workbench/contrib/terminal/browser/baseTerminalBackend","vs/workbench/contrib/terminal/browser/terminalContextMenu","vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy","vs/workbench/contrib/terminal/browser/widgets/widgetManager","vs/workbench/contrib/terminal/browser/detachedTerminal","vs/workbench/contrib/terminalContrib/links/browser/links","vs/workbench/contrib/testing/browser/explorerProjections/display","vs/workbench/contrib/testing/browser/theme","vs/workbench/contrib/testing/common/testingDecorations","vs/workbench/contrib/testing/common/getComputedState","vs/workbench/contrib/testing/common/testResultStorage","vs/workbench/contrib/testing/browser/testingProgressUiService","vs/workbench/contrib/update/common/update","vs/workbench/contrib/url/common/urlGlob","sql/workbench/contrib/dashboard/browser/widgets/webview/webviewWidget.component","vs/workbench/contrib/webview/common/webview","vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint","vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider","vs/workbench/contrib/workspace/common/workspace","vs/workbench/services/aiEmbeddingVector/common/aiEmbeddingVectorService","sql/workbench/services/accountManagement/browser/accountListRenderer","vs/workbench/services/configuration/common/configurationModels","sql/workbench/services/insights/common/insightsUtils","vs/workbench/services/configurationResolver/common/variableResolver","sql/workbench/contrib/editData/browser/editDataEditor","sql/workbench/contrib/executionPlan/browser/compareExecutionPlanInput","sql/workbench/contrib/profiler/browser/profilerActions","sql/workbench/contrib/dashboard/browser/pages/databaseDashboardPage.contribution","sql/workbench/contrib/dashboard/browser/pages/serverDashboardPage.contribution","sql/workbench/contrib/dashboard/browser/widgets/insights/insightsWidget.component","vs/workbench/api/common/extHostTypeConverters","vs/workbench/browser/parts/editor/editorWithViewState","vs/workbench/contrib/chat/browser/actions/chatClear","vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider","vs/workbench/contrib/search/browser/symbolsQuickAccess","vs/workbench/contrib/terminal/browser/terminalQuickAccess","vs/workbench/contrib/logs/common/defaultLogLevels","vs/workbench/contrib/preferences/browser/keybindingWidgets","vs/workbench/contrib/webview/browser/webviewElement","vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions","vs/workbench/services/extensionManagement/common/extensionManagementChannelClient","sql/workbench/contrib/query/browser/actions","vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor","vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart","vs/workbench/services/extensions/common/extensionsApiProposals","sql/workbench/contrib/dashboard/browser/widgets/properties/propertiesWidget.component","sql/workbench/services/notebook/common/notebookRegistry","vs/workbench/contrib/tasks/common/jsonSchemaCommon","vs/workbench/contrib/tasks/common/problemCollectors","vs/workbench/contrib/tasks/browser/taskQuickPick","vs/workbench/contrib/tasks/common/taskConfiguration","vs/workbench/contrib/tasks/browser/terminalTaskSystem","vs/workbench/contrib/terminal/common/terminalExtensionPoints","vs/workbench/services/actions/common/menusExtensionPoint","vs/workbench/api/browser/mainThreadEditor","vs/workbench/api/browser/mainThreadTreeViews","vs/workbench/services/extensions/electron-sandbox/extensionHostProfiler","vs/workbench/common/editor/resourceEditorInput","vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel","vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget","vs/workbench/contrib/notebook/browser/controller/cellOutputActions","vs/workbench/contrib/notebook/browser/controller/foldingController","vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd","vs/workbench/contrib/terminal/browser/xterm/decorationStyles","vs/workbench/services/keybinding/browser/unboundCommands","vs/workbench/services/keybinding/common/windowsKeyboardMapper","vs/workbench/services/keybinding/electron-sandbox/nativeKeyboardLayoutService","vs/workbench/contrib/notebook/common/notebookDiffEditorInput","vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel","vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys","vs/workbench/contrib/notebook/browser/view/notebookCellList","vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer","vs/workbench/services/extensionManagement/browser/extensionBisect","vs/workbench/services/extensions/browser/extensionUrlHandler","vs/workbench/contrib/output/common/outputChannelModelService","sql/workbench/contrib/extensions/browser/extensionsActions","vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions","vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy","vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView","vs/workbench/services/preferences/browser/keybindingsEditorModel","vs/workbench/services/preferences/common/preferencesValidation","vs/workbench/browser/parts/compositePart","vs/workbench/contrib/testing/browser/testExplorerActions","vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView","vs/workbench/services/dialogs/browser/simpleFileDialog","vs/workbench/services/search/common/searchExtTypes","vs/workbench/contrib/search/browser/searchMessage","vs/workbench/contrib/search/browser/searchNotebookHelpers","vs/workbench/services/extensions/common/workspaceContains","vs/workbench/services/search/common/searchHelpers","vs/workbench/api/browser/statusBarExtensionPoint","vs/workbench/services/terminal/common/embedderTerminalService","vs/workbench/services/textMate/common/TMHelper","sql/workbench/services/fileBrowser/browser/fileBrowserTreeView","sql/workbench/services/objectExplorer/browser/asyncServerTreeRenderer","sql/workbench/services/objectExplorer/browser/treeCreationUtils","sql/workbench/contrib/objectExplorer/browser/serverTreeView","vs/workbench/browser/parts/editor/breadcrumbsControl","vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler","vs/workbench/contrib/scm/browser/dirtydiffDecorator","vs/workbench/contrib/format/browser/formatModified","vs/workbench/contrib/tags/electron-sandbox/workspaceTags","vs/workbench/contrib/tasks/browser/abstractTaskService","vs/workbench/services/themes/common/hostColorSchemeService","sql/workbench/contrib/backup/browser/backup.component","sql/workbench/contrib/dashboard/browser/core/dashboardPage.component","sql/workbench/contrib/dashboard/browser/dashboard.component","sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerWidget.component","sql/workbench/contrib/dashboard/browser/contents/widgetContent.component","sql/workbench/contrib/dashboard/browser/containers/dashboardWidgetContainer.component","sql/workbench/contrib/jobManagement/browser/jobHistory.component","sql/workbench/contrib/notebook/browser/cellViews/outputArea.component","sql/workbench/services/dialog/browser/wizardNavigation.component","sql/workbench/services/dialog/browser/dialog.module","vs/workbench/services/themes/browser/fileIconThemeData","vs/workbench/services/themes/browser/productIconThemeData","vs/workbench/contrib/performance/browser/perfviewEditor","vs/workbench/services/userActivity/common/userActivityRegistry","vs/workbench/contrib/preferences/browser/settingsTree","vs/workbench/contrib/snippets/browser/snippetsService","vs/workbench/contrib/accessibility/browser/accessibilityContributions","vs/workbench/contrib/chat/browser/chatInputPart","vs/workbench/contrib/comments/browser/commentThreadWidget","vs/workbench/contrib/comments/browser/commentsController","vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp","vs/workbench/contrib/chat/browser/actions/chatClearActions","vs/workbench/contrib/chat/browser/actions/chatMoveActions","vs/workbench/contrib/notebook/browser/contrib/navigation/arrow","vs/workbench/contrib/notebook/browser/controller/editActions","vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController","vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor","vs/workbench/contrib/search/browser/replaceService","vs/workbench/contrib/search/browser/searchActionsFind","vs/workbench/services/keybinding/common/keybindingEditing","vs/workbench/services/utilityProcess/electron-sandbox/utilityProcessWorkerWorkbenchService","vs/workbench/services/voiceRecognition/electron-sandbox/workbenchVoiceRecognitionService","vs/workbench/services/workingCopy/common/resourceWorkingCopy","vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager","vs/workbench/services/workingCopy/common/workingCopyBackupService","vs/workbench/api/browser/mainThreadEditors","vs/workbench/browser/parts/editor/editorPlaceholder","vs/workbench/browser/parts/editor/binaryDiffEditor","vs/workbench/browser/parts/editor/editorStatus","sql/workbench/browser/modelComponents/queryTextEditor","vs/workbench/contrib/files/browser/editors/textFileEditor","vs/workbench/contrib/output/browser/outputView","vs/workbench/contrib/searchEditor/browser/searchEditorActions","sql/workbench/contrib/notebook/browser/notebookViews/notebookViewsActions","sql/workbench/contrib/notebook/browser/notebookViews/notebookViewsCard.component","sql/workbench/contrib/notebook/browser/notebookViews/notebookViewsGrid.component","sql/workbench/contrib/notebook/browser/models/untitledNotebookInput","sql/workbench/contrib/profiler/browser/profilerEditor","sql/workbench/contrib/charts/browser/chartView","sql/workbench/contrib/executionPlan/browser/executionPlanEditor","sql/workbench/contrib/executionPlan/browser/executionPlanInput","sql/workbench/contrib/query/browser/gridPanel","vs/workbench/services/workingCopy/common/untitledFileWorkingCopy","vs/workbench/services/workingCopy/common/storedFileWorkingCopy","vs/workbench/browser/parts/activitybar/activitybarActions","vs/workbench/browser/parts/compositeBar","vs/workbench/browser/parts/editor/titleControl","vs/workbench/browser/parts/panel/panelActions","vs/workbench/browser/parts/activitybar/activitybarPart","vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart","vs/workbench/browser/parts/sidebar/sidebarPart","vs/workbench/browser/parts/views/viewsService","vs/workbench/contrib/files/browser/fileImportExport","vs/workbench/contrib/files/browser/views/explorerViewer","vs/workbench/contrib/files/browser/views/explorerView","vs/workbench/contrib/files/browser/views/openEditorsView","vs/workbench/contrib/files/browser/fileActions.contribution","vs/workbench/contrib/terminal/browser/terminalInstance","vs/workbench/contrib/terminal/browser/terminalView","vs/workbench/electron-sandbox/window","vs/workbench/services/workspaces/common/workspaceIdentityService","vs/workbench/electron-sandbox/desktop.main","vs/workbench/contrib/extensions/browser/extensionsWidgets","vs/workbench/contrib/extensions/browser/extensionsViews","vs/workbench/contrib/extensions/browser/extensionEditor","vs/workbench/contrib/extensions/browser/extensionsViewlet","vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess","vs/workbench/contrib/terminal/browser/terminalConfigHelper","vs/workbench/services/extensions/common/extensionRunningLocationTracker","sql/base/browser/urlSerializer","sql/base/common/dataProvider","sql/base/common/gridPosition","sql/base/common/network","sql/base/common/schemas","sql/base/parts/tree/browser/treeDnd","sql/platform/accounts/common/firewallRuleViewModel","sql/platform/connection/common/connectionInfo","sql/platform/oAuth/electron-sandbox/sqlOAuthServiceImpl","sql/workbench/browser/designer/designerPropertyPathValidator","sql/workbench/browser/modelComponents/interfaces","sql/workbench/common/editor/query/chartState","sql/workbench/common/editor/query/executionPlanState","sql/workbench/common/editor/query/modelViewState","sql/workbench/common/editor/query/queryPlanState","sql/workbench/common/editor/query/topOperationsState","sql/workbench/contrib/dashboard/browser/widgets/insights/views/countInsight.component","sql/workbench/contrib/notebook/browser/models/cellMagicMapper","sql/workbench/contrib/notebook/browser/turndownPluginGfm","sql/workbench/contrib/profiler/common/interfaces","sql/workbench/contrib/tasks/common/tasks","sql/workbench/services/azureAccount/browser/azureAccountService","sql/workbench/services/connection/browser/connection","sql/workbench/services/dataGridProvider/browser/dataGridProviderService","sql/workbench/services/notebook/browser/outputs/registry","sql/workbench/services/notebook/common/jsonext","sql/workbench/services/notebook/common/notebookContext","sql/workbench/services/objectExplorer/browser/asyncServerTreeIdentityProvider","sql/workbench/services/restore/common/mssqlRestoreInfo","sql/workbench/services/tableDesigner/browser/tableDesignerMetadata","vs/base/browser/iframe","vs/base/browser/ui/list/splice","vs/base/common/diff/diffChange","sql/workbench/browser/modelComponents/modelStore","sql/base/browser/ui/separator/separator","mark.js","sql/base/parts/tree/browser/treeViewModel","vs/base/common/observableInternal/utils","vs/base/common/skipList","sql/base/parts/tree/browser/treeModel","sql/platform/dashboard/browser/dashboardServiceImpl","sql/platform/dashboard/browser/dashboardViewServiceImpl","sql/platform/modelComponents/browser/modelViewServiceImpl","sql/workbench/common/editor/profiler/profilerState","sql/workbench/services/dashboard/browser/newDashboardTabViewModel","sql/workbench/services/insights/browser/insightsDialogModel","vs/base/common/sequence","sql/base/browser/ui/table/plugins/cellRangeSelector","sql/workbench/contrib/dashboard/browser/widgets/insights/views/imageInsight.component","sql/workbench/services/notebook/browser/notebookViews/notebookViewsUpgrades","sql/workbench/contrib/tasks/browser/tasksDataSource","vs/base/parts/contextmenu/common/contextmenu","vs/base/parts/ipc/common/ipc.electron","vs/base/parts/request/browser/request","vs/css!sql/base/browser/ui/breadcrumb/media/breadcrumb","sql/base/browser/ui/breadcrumb/breadcrumb.component","vs/css!sql/base/browser/ui/buttonMenu/buttonMenu","vs/css!sql/base/browser/ui/checkbox/media/checkbox","vs/css!sql/base/browser/ui/colorbox/media/colorbox","vs/css!sql/base/browser/ui/dropdownList/media/dropdownList","vs/css!sql/base/browser/ui/fieldset/media/fieldset","vs/css!sql/base/browser/ui/infoButton/infoButton","vs/css!sql/base/browser/ui/label/media/label","vs/css!sql/base/browser/ui/loadingSpinner/media/loadingComponent","vs/css!sql/base/browser/ui/loadingSpinner/media/loadingSpinner","vs/css!sql/base/browser/ui/panel/media/panel","vs/css!sql/base/browser/ui/panel/media/tabHeader","vs/css!sql/base/browser/ui/propertiesContainer/media/propertiesContainer","vs/css!sql/base/browser/ui/scrollableView/scrollableView","vs/css!sql/base/browser/ui/selectBox/media/selectBox","vs/css!sql/base/browser/ui/table/media/slickColorTheme","vs/css!sql/base/browser/ui/table/media/table","vs/css!sql/base/browser/ui/table/plugins/media/buttonColumn.plugin","vs/css!sql/base/browser/ui/table/plugins/media/checkboxColumn.plugin","vs/css!sql/base/browser/ui/table/plugins/media/checkboxSelectColumn.plugin","vs/css!sql/base/browser/ui/table/plugins/media/hyperlinkColumn.plugin","vs/css!sql/base/browser/ui/table/plugins/media/loadingSpinner.plugin","vs/css!sql/base/browser/ui/taskbar/media/actionBar","vs/css!sql/base/browser/ui/taskbar/media/icons","vs/css!sql/base/browser/ui/taskbar/media/taskbar","vs/css!sql/base/parts/tree/browser/tree","vs/css!sql/media/icons/common-icons","vs/css!sql/workbench/browser/designer/media/designer","vs/css!sql/workbench/browser/modal/media/calloutDialog","vs/css!sql/workbench/browser/modal/media/modal","vs/css!sql/workbench/browser/modal/media/optionsDialog","vs/css!sql/workbench/browser/modelComponents/media/button","vs/css!sql/workbench/browser/modelComponents/media/card","vs/css!sql/workbench/browser/modelComponents/media/declarativeTable","vs/css!sql/workbench/browser/modelComponents/media/divContainer","vs/css!sql/workbench/browser/modelComponents/media/dropdown","vs/css!sql/workbench/browser/modelComponents/media/formLayout","vs/css!sql/workbench/browser/modelComponents/media/groupLayout","vs/css!sql/workbench/browser/modelComponents/media/hyperlink","vs/css!sql/workbench/browser/modelComponents/media/image","vs/css!sql/workbench/browser/modelComponents/media/legacycard","vs/css!sql/workbench/browser/modelComponents/media/listView","vs/css!sql/workbench/browser/modelComponents/media/loadingComponent","vs/css!sql/workbench/browser/modelComponents/media/modelViewEditor","vs/css!sql/workbench/browser/modelComponents/media/propertiesContainer","vs/css!sql/workbench/browser/modelComponents/media/radioButton","vs/css!sql/workbench/browser/modelComponents/media/tabbedPanel","vs/css!sql/workbench/browser/modelComponents/media/table","vs/css!sql/workbench/browser/modelComponents/media/text","vs/css!sql/workbench/browser/modelComponents/media/toolbarLayout","vs/css!sql/workbench/browser/modelComponents/media/treeComponent","vs/css!sql/workbench/browser/modelComponents/media/verticalCard","vs/css!sql/workbench/browser/ui/infoBox/media/infoBox","vs/css!sql/workbench/contrib/assessment/browser/media/detailview","vs/css!sql/workbench/contrib/backup/browser/media/backupDialog","vs/css!sql/workbench/contrib/charts/browser/media/chartView","vs/css!sql/workbench/contrib/charts/browser/media/countInsight","vs/css!sql/workbench/contrib/dashboard/browser/containers/dashboardControlHostContainer","vs/css!sql/workbench/contrib/dashboard/browser/containers/dashboardErrorContainer","vs/css!sql/workbench/contrib/dashboard/browser/containers/dashboardGridContainer","vs/css!sql/workbench/contrib/dashboard/browser/containers/dashboardHomeContainer","vs/css!sql/workbench/contrib/dashboard/browser/containers/dashboardNavSection","vs/css!sql/workbench/contrib/dashboard/browser/containers/dashboardWebviewContainer","vs/css!sql/workbench/contrib/dashboard/browser/containers/dashboardWidgetContainer","vs/css!sql/workbench/contrib/dashboard/browser/contents/controlHostContent","vs/css!sql/workbench/contrib/dashboard/browser/contents/dashboardWidgetWrapper","vs/css!sql/workbench/contrib/dashboard/browser/contents/webviewContent","vs/css!sql/workbench/contrib/dashboard/browser/contents/widgetContent","vs/css!sql/workbench/contrib/dashboard/browser/core/dashboardPage","vs/css!sql/workbench/contrib/dashboard/browser/core/dashboardPanel","vs/css!sql/workbench/contrib/dashboard/browser/widgets/explorer/media/explorerWidget","vs/css!sql/workbench/contrib/dashboard/browser/widgets/insights/insightsWidget","vs/css!sql/workbench/contrib/dataExplorer/browser/media/connectionViewletPanel","vs/css!sql/workbench/contrib/editData/browser/media/editData","vs/css!sql/workbench/contrib/editData/browser/media/flexbox","vs/css!sql/workbench/contrib/editData/browser/media/styles","vs/css!sql/workbench/contrib/jobManagement/browser/media/jobStepsView","vs/css!sql/workbench/contrib/modelView/browser/media/webview","vs/css!sql/workbench/contrib/notebook/browser/calloutDialog/media/imageCalloutDialog","vs/css!sql/workbench/contrib/notebook/browser/calloutDialog/media/linkCalloutDialog","vs/css!sql/workbench/contrib/notebook/browser/cellViews/cellToolbar","vs/css!sql/workbench/contrib/notebook/browser/cellViews/markdownToolbar","vs/css!sql/workbench/contrib/notebook/browser/cellViews/media/highlight","vs/css!sql/workbench/contrib/notebook/browser/cellViews/media/markdown","vs/css!sql/workbench/contrib/notebook/browser/cellViews/media/output","vs/css!sql/workbench/contrib/notebook/browser/cellViews/outputArea","vs/css!sql/workbench/contrib/notebook/browser/cellViews/placeholder","vs/css!sql/workbench/contrib/notebook/browser/cellViews/stdin","vs/css!sql/workbench/contrib/notebook/browser/cellViews/textCell","vs/css!sql/workbench/contrib/notebook/browser/media/notebook.contribution","vs/css!sql/workbench/contrib/notebook/browser/notebook","vs/css!sql/workbench/contrib/notebook/browser/notebookViews/cellToolbar","vs/css!sql/workbench/contrib/notebook/browser/notebookViews/insertCellsModal","vs/css!sql/workbench/contrib/notebook/browser/notebookViews/insertCellsScreenshots","vs/css!sql/workbench/contrib/notebook/browser/notebookViews/notebookViewsModal","vs/css!sql/workbench/contrib/objectExplorer/browser/media/serverTreeActions","vs/css!sql/workbench/contrib/query/browser/media/flavorStatus","vs/css!sql/workbench/contrib/query/browser/media/gridPanel","vs/css!sql/workbench/contrib/query/browser/media/messagePanel","vs/css!sql/workbench/contrib/query/browser/media/queryActions","vs/css!sql/workbench/contrib/query/browser/media/queryEditor","vs/css!sql/workbench/contrib/resourceViewer/browser/media/resourceViewerTable","vs/css!sql/workbench/contrib/tableDesigner/browser/media/tableDesignerEditor","vs/css!sql/workbench/contrib/tasks/browser/media/tasksPanel","vs/css!sql/workbench/contrib/welcome/browser/gettingStartedTour","vs/css!sql/workbench/contrib/welcome/browser/welcomePage","vs/css!sql/workbench/services/accountManagement/browser/media/accountDialog","vs/css!sql/workbench/services/accountManagement/browser/media/accountListRenderer","vs/css!sql/workbench/services/accountManagement/browser/media/accountPicker","vs/css!sql/workbench/services/accountManagement/browser/media/autoOAuthDialog","vs/css!sql/workbench/services/backupRestoreUrlBrowser/browser/media/urlBrowserDialog","vs/css!sql/workbench/services/connection/browser/media/connectionBrowseTab","vs/css!sql/workbench/services/connection/browser/media/connectionDialog","vs/css!sql/workbench/services/connection/browser/media/passwordDialog","vs/css!sql/workbench/services/dashboard/browser/media/newDashboardTabDialog","vs/css!sql/workbench/services/dialog/browser/media/wizardNavigation","vs/css!sql/workbench/services/errorMessage/browser/media/errorMessageDialog","vs/css!sql/workbench/services/fileBrowser/browser/media/fileBrowserDialog","vs/css!sql/workbench/services/insights/browser/media/insightsDialog","vs/css!sql/workbench/services/objectExplorer/browser/filterDialog/media/filterDialog","vs/css!sql/workbench/services/profiler/browser/media/profiler","vs/css!sql/workbench/services/profiler/browser/media/profilerFilterDialog","vs/css!sql/workbench/services/resourceProvider/browser/media/firewallRuleDialog","vs/css!sql/workbench/services/restore/browser/media/restoreDialog","vs/css!sql/workbench/services/serverGroup/browser/media/serverGroupDialog","vs/css!sql/workbench/services/tableDesigner/browser/media/tableDesignerPublishDialog","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/codicons/codicon/codicon","vs/css!vs/base/browser/ui/codicons/codicon/codicon-modifiers","vs/css!vs/base/browser/ui/contextview/contextview","vs/css!vs/base/browser/ui/countBadge/countBadge","vs/css!vs/base/browser/ui/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/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/css!vs/base/browser/ui/table/table","vs/css!vs/base/browser/ui/toggle/toggle","vs/css!vs/base/browser/ui/toolbar/toolbar","vs/css!vs/base/browser/ui/tree/media/tree","vs/css!vs/editor/browser/controller/textAreaHandler","vs/css!vs/editor/browser/viewParts/blockDecorations/blockDecorations","vs/css!vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/css!vs/editor/browser/viewParts/decorations/decorations","vs/css!vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/css!vs/editor/browser/viewParts/indentGuides/indentGuides","vs/css!vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/css!vs/editor/browser/viewParts/lines/viewLines","vs/css!vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/css!vs/editor/browser/viewParts/margin/margin","vs/css!vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/css!vs/editor/browser/viewParts/minimap/minimap","vs/css!vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/css!vs/editor/browser/viewParts/rulers/rulers","vs/css!vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/css!vs/editor/browser/viewParts/selections/selections","vs/css!vs/editor/browser/viewParts/viewCursors/viewCursors","vs/css!vs/editor/browser/viewParts/whitespace/whitespace","vs/css!vs/editor/browser/widget/diffEditorWidget2/style","vs/css!vs/editor/browser/widget/media/diffEditor","vs/css!vs/editor/browser/widget/media/diffReview","vs/css!vs/editor/browser/widget/media/editor","vs/css!vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/css!vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/css!vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/css!vs/editor/contrib/codelens/browser/codelensWidget","vs/css!vs/editor/contrib/dnd/browser/dnd","vs/css!vs/editor/contrib/dropOrPasteInto/browser/postEditWidget","vs/css!vs/editor/contrib/find/browser/findOptionsWidget","vs/css!vs/editor/contrib/find/browser/findWidget","vs/css!vs/editor/contrib/folding/browser/folding","vs/css!vs/editor/contrib/gotoError/browser/media/gotoErrorWidget","vs/css!vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition","vs/css!vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget","vs/css!vs/editor/contrib/hover/browser/hover","vs/css!vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/css!vs/editor/contrib/inlineCompletions/browser/ghostText","vs/css!vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget","vs/css!vs/editor/contrib/inlineProgress/browser/inlineProgressWidget","vs/css!vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/css!vs/editor/contrib/links/browser/links","vs/css!vs/editor/contrib/markdownRenderer/browser/renderedMarkdown","vs/css!vs/editor/contrib/message/browser/messageController","vs/css!vs/editor/contrib/parameterHints/browser/parameterHints","vs/css!vs/editor/contrib/peekView/browser/media/peekViewWidget","vs/css!vs/editor/contrib/rename/browser/renameInputField","vs/css!vs/editor/contrib/snippet/browser/snippetSession","vs/css!vs/editor/contrib/stickyScroll/browser/stickyScroll","vs/css!vs/editor/contrib/suggest/browser/media/suggest","vs/css!vs/editor/contrib/symbolIcons/browser/symbolIcons","vs/css!vs/editor/contrib/unicodeHighlighter/browser/bannerController","vs/css!vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/css!vs/editor/contrib/wordHighlighter/browser/highlightDecorations","vs/css!vs/editor/contrib/zoneWidget/browser/zoneWidget","vs/css!vs/platform/actions/browser/menuEntryActionViewItem","vs/css!vs/platform/opener/browser/link","vs/css!vs/platform/severityIcon/browser/media/severityIcon","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/auxiliarybar/media/auxiliaryBarPart","vs/css!vs/workbench/browser/parts/banner/media/bannerpart","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/editorplaceholder","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/sidebysideeditor","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/panel/media/basepanelpart","vs/css!vs/workbench/browser/parts/statusbar/media/statusbarpart","vs/css!vs/workbench/browser/parts/titlebar/media/menubarControl","vs/css!vs/workbench/browser/parts/titlebar/media/titlebarpart","vs/css!vs/workbench/browser/parts/views/media/views","vs/css!vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit","vs/css!vs/workbench/contrib/callHierarchy/browser/media/callHierarchy","vs/css!vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget","vs/css!vs/workbench/contrib/chat/browser/media/chat","vs/css!vs/workbench/contrib/chat/browser/media/chatEditor","vs/css!vs/workbench/contrib/chat/electron-sandbox/actions/media/voiceChatActions","vs/css!vs/workbench/contrib/codeEditor/browser/accessibility/accessibility","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/outline/documentSymbolsTree","vs/css!vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput","vs/css!vs/workbench/contrib/codeEditor/browser/untitledTextEditorHint/untitledTextEditorHint","vs/css!vs/workbench/contrib/comments/browser/media/panel","vs/css!vs/workbench/contrib/customEditor/browser/media/customEditor","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/extensions/browser/media/runtimeExtensionsEditor","vs/css!vs/workbench/contrib/files/browser/media/explorerviewlet","vs/css!vs/workbench/contrib/files/browser/views/media/openeditors","vs/css!vs/workbench/contrib/inlineChat/browser/inlineChat","vs/css!vs/workbench/contrib/interactive/browser/interactiveEditor","vs/css!vs/workbench/contrib/interactive/browser/media/interactive","vs/css!vs/workbench/contrib/languageStatus/browser/media/languageStatus","vs/css!vs/workbench/contrib/markers/browser/markersViewActions","vs/css!vs/workbench/contrib/markers/browser/media/markers","vs/css!vs/workbench/contrib/mergeEditor/browser/view/media/mergeEditor","vs/css!vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind","vs/css!vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget","vs/css!vs/workbench/contrib/notebook/browser/diff/notebookDiff","vs/css!vs/workbench/contrib/notebook/browser/media/notebook","vs/css!vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar","vs/css!vs/workbench/contrib/notebook/browser/media/notebookCellOutput","vs/css!vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar","vs/css!vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar","vs/css!vs/workbench/contrib/notebook/browser/media/notebookDnd","vs/css!vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll","vs/css!vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator","vs/css!vs/workbench/contrib/notebook/browser/media/notebookFolding","vs/css!vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem","vs/css!vs/workbench/contrib/notebook/browser/media/notebookOutline","vs/css!vs/workbench/contrib/notebook/browser/media/notebookToolbar","vs/css!vs/workbench/contrib/outline/browser/outlinePane","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/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/share/browser/share","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/testing/browser/media/testing","vs/css!vs/workbench/contrib/testing/browser/testingOutputPeek","vs/css!vs/workbench/contrib/timeline/browser/media/timelinePane","vs/css!vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy","vs/css!vs/workbench/contrib/welcomeWalkthrough/browser/media/walkThroughPart","vs/css!vs/workbench/contrib/workspace/browser/media/workspaceTrustEditor","vs/css!vs/workbench/electron-sandbox/actions/media/actions","vs/css!vs/workbench/services/hover/browser/media/hover","vs/css!vs/workbench/services/progress/browser/media/progressService","vs/css!vs/workbench/services/suggest/browser/media/suggest","vs/css!vs/workbench/services/userDataProfile/browser/media/userDataProfileView","vs/editor/browser/config/charWidthReader","vs/editor/browser/viewParts/lines/domReadingContext","vs/editor/browser/viewParts/lines/rangeUtil","vs/editor/browser/viewParts/minimap/minimapCharRenderer","vs/editor/browser/viewParts/minimap/minimapPreBaked","vs/editor/browser/viewParts/minimap/minimapCharRendererFactory","vs/editor/browser/widget/diffEditorWidget2/delegatingEditorImpl","sql/workbench/contrib/notebook/browser/models/notebookTextFileModel","vs/editor/browser/widget/diffEditorWidget2/outlineModel","vs/editor/common/commands/surroundSelectionCommand","vs/editor/common/cursor/cursorContext","vs/editor/common/diff/algorithms/joinSequenceDiffs","vs/editor/common/diff/algorithms/myersDiffAlgorithm","vs/editor/common/diff/algorithms/utils","vs/editor/common/diff/algorithms/dynamicProgrammingDiffing","vs/editor/common/diff/linesDiffComputers","vs/editor/common/editorAction","vs/editor/common/editorTheme","vs/editor/common/languages/defaultDocumentColorsComputer","vs/editor/common/cursor/cursorColumnSelection","vs/editor/common/cursor/oneCursor","vs/editor/common/cursor/cursorCollection","vs/editor/common/languages/supports/characterPair","vs/editor/common/languages/supports/indentRules","vs/editor/common/languages/supports/inplaceReplaceSupport","vs/editor/common/languages/supports/languageBracketsConfiguration","vs/editor/common/languages/supports/onEnter","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/nodeReader","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/concat23Trees","vs/editor/common/model/bracketPairsTextModelPart/fixBrackets","vs/editor/common/model/fixedArray","vs/editor/common/model/indentationGuesser","vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase","vs/editor/common/model/mirrorTextModel","vs/editor/common/standalone/standaloneEnums","vs/editor/common/textModelBracketPairs","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree","vs/editor/common/tokenizationRegistry","vs/editor/common/tokens/contiguousMultilineTokens","vs/editor/common/tokens/contiguousTokensStore","vs/editor/common/tokens/sparseMultilineTokens","vs/editor/common/tokens/sparseTokensStore","vs/editor/browser/viewParts/blockDecorations/blockDecorations","vs/editor/browser/viewParts/decorations/decorations","vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/editor/browser/viewParts/rulers/rulers","vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/editor/browser/viewParts/viewZones/viewZones","vs/editor/common/viewLayout/linePart","vs/editor/common/viewLayout/linesLayout","vs/editor/common/viewLayout/viewLinesViewportData","vs/editor/common/viewModel/modelLineProjection","vs/editor/common/viewModel/monospaceLineBreaksComputer","vs/editor/browser/viewParts/overviewRuler/overviewRuler","vs/editor/common/viewModel/viewContext","vs/editor/common/viewLayout/viewLayout","vs/editor/contrib/caretOperations/browser/moveCaretCommand","vs/editor/contrib/colorPicker/browser/colorPickerModel","vs/editor/contrib/comment/browser/lineCommentCommand","vs/editor/contrib/dnd/browser/dragAndDropCommand","vs/editor/contrib/find/browser/replaceAllCommand","vs/editor/contrib/folding/browser/hiddenRangeModel","vs/editor/contrib/inPlaceReplace/browser/inPlaceReplaceCommand","vs/editor/contrib/linesOperations/browser/copyLinesCommand","vs/editor/contrib/linesOperations/browser/sortLinesCommand","vs/editor/contrib/smartSelect/browser/wordSelections","vs/editor/contrib/suggest/browser/suggestCommitCharacters","vs/editor/contrib/suggest/browser/suggestOvertypingCapturer","vs/nls!sql/base/browser/ui/editableDropdown/browser/dropdown","vs/nls!sql/base/browser/ui/loadingSpinner/loadingSpinner","vs/nls!sql/base/browser/ui/loadingSpinner/loadingSpinner.component","vs/nls!sql/base/browser/ui/panel/panel.component","vs/nls!sql/base/browser/ui/panel/tabActions","vs/nls!sql/base/browser/ui/propertiesContainer/togglePropertiesAction","vs/nls!sql/base/browser/ui/selectBox/selectBox","vs/nls!sql/base/browser/ui/table/formatters","sql/workbench/services/dataGridProvider/browser/dataGridProviderUtils","vs/nls!sql/base/browser/ui/table/plugins/checkboxSelectColumn.plugin","vs/nls!sql/base/browser/ui/table/plugins/contextMenuColumn.plugin","vs/nls!sql/base/browser/ui/table/plugins/headerFilter.plugin","vs/nls!sql/base/browser/ui/table/plugins/loadingSpinner.plugin","vs/nls!sql/base/browser/ui/table/plugins/rowDetailView","vs/nls!sql/base/browser/ui/table/table","vs/nls!sql/base/browser/ui/taskbar/overflowActionbar","vs/nls!sql/base/common/locConstants","vs/nls!sql/base/parts/tree/browser/treeDefaults","vs/nls!sql/platform/accounts/common/accountActions","vs/nls!sql/platform/clipboard/browser/clipboardService","vs/nls!sql/platform/connection/common/connectionConfig","vs/nls!sql/platform/connection/common/connectionStatusManager","vs/nls!sql/platform/connection/common/providerConnectionInfo","sql/workbench/services/objectExplorer/browser/recentConnectionDataSource","vs/nls!sql/platform/dashboard/browser/insightRegistry","vs/nls!sql/platform/dashboard/browser/widgetRegistry","vs/nls!sql/platform/serialization/common/serializationService","vs/nls!sql/platform/theme/common/colorRegistry","vs/nls!sql/platform/theme/common/colors","vs/nls!sql/workbench/api/browser/mainThreadExtensionManagement","vs/nls!sql/workbench/api/browser/mainThreadNotebookDocumentsAndEditors","vs/nls!sql/workbench/browser/actions","vs/nls!sql/workbench/browser/actions.contribution","vs/nls!sql/workbench/browser/designer/designer","vs/nls!sql/workbench/browser/designer/designerIssuesTabPanelView","vs/nls!sql/workbench/browser/designer/designerPropertiesPane","vs/nls!sql/workbench/browser/designer/designerScriptEditor","vs/nls!sql/workbench/browser/designer/tableActions","vs/nls!sql/workbench/browser/editData/editDataInput","vs/nls!sql/workbench/browser/editor/profiler/profilerInput","vs/nls!sql/workbench/browser/editor/resourceViewer/resourceViewerInput","vs/nls!sql/workbench/browser/editor/tableDesigner/tableDesignerInput","vs/nls!sql/workbench/browser/modal/modal","vs/nls!sql/workbench/browser/modal/optionsDialog","vs/nls!sql/workbench/browser/modal/optionsDialogHelper","vs/nls!sql/workbench/browser/modelComponents/componentBase","vs/nls!sql/workbench/browser/modelComponents/declarativeTable.component","vs/nls!sql/workbench/browser/modelComponents/dropdown.component","vs/nls!sql/workbench/browser/modelComponents/inputbox.component","vs/nls!sql/workbench/browser/modelComponents/loadingComponent.component","vs/nls!sql/workbench/browser/modelComponents/queryTextEditor","vs/nls!sql/workbench/browser/modelComponents/viewBase","vs/nls!sql/workbench/browser/parts/editor/editorStatusModeSelect","vs/nls!sql/workbench/browser/scriptingActions","vs/nls!sql/workbench/browser/scriptingUtils","vs/nls!sql/workbench/common/backup/constants","vs/nls!sql/workbench/common/constants","vs/nls!sql/workbench/common/editor/query/queryEditorInput","vs/nls!sql/workbench/common/editor/query/queryResultsInput","vs/nls!sql/workbench/common/theme","vs/nls!sql/workbench/contrib/accounts/browser/accountManagement.contribution","vs/nls!sql/workbench/contrib/assessment/browser/asmtActions","vs/nls!sql/workbench/contrib/assessment/browser/asmtResultsView.component","vs/nls!sql/workbench/contrib/assessment/common/strings","vs/nls!sql/workbench/contrib/azure/browser/azure.contribution","vs/nls!sql/workbench/contrib/backup/browser/backup.component","vs/nls!sql/workbench/contrib/backup/browser/backup.contribution","vs/nls!sql/workbench/contrib/backup/browser/backupActions","vs/nls!sql/workbench/contrib/backup/browser/backupUiService","vs/nls!sql/workbench/contrib/charts/browser/actions","vs/nls!sql/workbench/contrib/charts/browser/chartOptions","vs/nls!sql/workbench/contrib/charts/browser/chartTab","vs/nls!sql/workbench/contrib/charts/browser/chartView","vs/nls!sql/workbench/contrib/charts/browser/charts.contribution","vs/nls!sql/workbench/contrib/charts/browser/configureChartDialog","vs/nls!sql/workbench/contrib/charts/browser/graphInsight","vs/nls!sql/workbench/contrib/charts/browser/imageInsight","vs/nls!sql/workbench/contrib/charts/browser/utils","vs/nls!sql/workbench/contrib/commandLine/electron-sandbox/commandLine","vs/nls!sql/workbench/contrib/configuration/common/configurationUpgrader","vs/nls!sql/workbench/contrib/connection/browser/connection.contribution","vs/nls!sql/workbench/contrib/connection/browser/connectionStatus","vs/nls!sql/workbench/contrib/connection/common/connectionProviderExtension","vs/nls!sql/workbench/contrib/connection/common/connectionTreeProviderExentionPoint","vs/nls!sql/workbench/contrib/dashboard/browser/containers/dashboardContainer.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/containers/dashboardControlHostContainer.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/containers/dashboardErrorContainer.component","sql/workbench/contrib/dashboard/browser/containers/dashboardErrorContainer.component","vs/nls!sql/workbench/contrib/dashboard/browser/containers/dashboardGridContainer.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/containers/dashboardModelViewContainer.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/containers/dashboardNavSection.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/containers/dashboardWebviewContainer.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/containers/dashboardWidgetContainer.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/core/actions","vs/nls!sql/workbench/contrib/dashboard/browser/core/dashboardHelper","vs/nls!sql/workbench/contrib/dashboard/browser/core/dashboardPage.component","vs/nls!sql/workbench/contrib/dashboard/browser/core/dashboardTab.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/dashboard.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/dashboardActions","vs/nls!sql/workbench/contrib/dashboard/browser/dashboardIconUtil","vs/nls!sql/workbench/contrib/dashboard/browser/dashboardRegistry","vs/nls!sql/workbench/contrib/dashboard/browser/pages/dashboardPageContribution","vs/nls!sql/workbench/contrib/dashboard/browser/pages/databaseDashboardPage.component","vs/nls!sql/workbench/contrib/dashboard/browser/pages/databaseDashboardPage.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/pages/serverDashboardPage.component","vs/nls!sql/workbench/contrib/dashboard/browser/pages/serverDashboardPage.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/services/breadcrumb.service","vs/nls!sql/workbench/contrib/dashboard/browser/services/dashboardServiceInterface.service","vs/nls!sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerTable","vs/nls!sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerView","vs/nls!sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerWidget.component","vs/nls!sql/workbench/contrib/dashboard/browser/widgets/insights/actions","vs/nls!sql/workbench/contrib/dashboard/browser/widgets/insights/insightsWidget.component","vs/nls!sql/workbench/contrib/dashboard/browser/widgets/insights/insightsWidgetSchemas","vs/nls!sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/chartInsight.component","vs/nls!sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/chartInsight.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/barChart.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/lineChart.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/widgets/insights/views/countInsight.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/widgets/insights/views/imageInsight.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/widgets/insights/views/tableInsight.contribution","vs/nls!sql/workbench/contrib/dashboard/browser/widgets/properties/propertiesWidget.component","vs/nls!sql/workbench/contrib/dataExplorer/browser/dataExplorer.contribution","vs/nls!sql/workbench/contrib/dataExplorer/browser/dataExplorerExtensionPoint","vs/nls!sql/workbench/contrib/dataExplorer/browser/dataExplorerViewlet","vs/nls!sql/workbench/contrib/dataExplorer/browser/nodeActions.common.contribution","vs/nls!sql/workbench/contrib/editData/browser/editData.contribution","vs/nls!sql/workbench/contrib/editData/browser/editDataActions","vs/nls!sql/workbench/contrib/editData/browser/editDataEditor","vs/nls!sql/workbench/contrib/editData/browser/editDataGridActions","vs/nls!sql/workbench/contrib/editData/browser/editDataGridPanel","vs/nls!sql/workbench/contrib/editData/browser/gridActions","vs/nls!sql/workbench/contrib/executionPlan/browser/azdataGraphView","vs/nls!sql/workbench/contrib/executionPlan/browser/compareExecutionPlanInput","vs/nls!sql/workbench/contrib/executionPlan/browser/constants","vs/nls!sql/workbench/contrib/executionPlan/browser/executionPlanComparisonEditor","vs/nls!sql/workbench/contrib/executionPlan/browser/executionPlanComparisonEditorView","vs/nls!sql/workbench/contrib/executionPlan/browser/executionPlanComparisonPropertiesView","vs/nls!sql/workbench/contrib/executionPlan/browser/executionPlanContribution","vs/nls!sql/workbench/contrib/executionPlan/browser/executionPlanEditor","vs/nls!sql/workbench/contrib/executionPlan/browser/executionPlanFileView","vs/nls!sql/workbench/contrib/executionPlan/browser/executionPlanInput","vs/nls!sql/workbench/contrib/executionPlan/browser/executionPlanPropertiesView","vs/nls!sql/workbench/contrib/executionPlan/browser/executionPlanPropertiesViewBase","vs/nls!sql/workbench/contrib/executionPlan/browser/executionPlanTab","vs/nls!sql/workbench/contrib/executionPlan/browser/executionPlanTreeTab","vs/nls!sql/workbench/contrib/executionPlan/browser/executionPlanView","vs/nls!sql/workbench/contrib/executionPlan/browser/executionPlanViewHeader","vs/nls!sql/workbench/contrib/executionPlan/browser/topOperationsTab","vs/nls!sql/workbench/contrib/executionPlan/browser/widgets/customZoomWidget","vs/nls!sql/workbench/contrib/executionPlan/browser/widgets/highlightExpensiveNodeWidget","vs/nls!sql/workbench/contrib/executionPlan/browser/widgets/nodeSearchWidget","vs/nls!sql/workbench/contrib/extensions/browser/contributionRenders","vs/nls!sql/workbench/contrib/extensions/browser/extensions.contribution","vs/nls!sql/workbench/contrib/extensions/browser/extensionsActions","vs/nls!sql/workbench/contrib/extensions/browser/scenarioRecommendations","vs/nls!sql/workbench/contrib/extensions/browser/staticRecommendations","vs/nls!sql/workbench/contrib/jobManagement/browser/agentView.component","vs/nls!sql/workbench/contrib/jobManagement/browser/alertsView.component","vs/nls!sql/workbench/contrib/jobManagement/browser/jobActions","vs/nls!sql/workbench/contrib/jobManagement/browser/jobHistory.component","vs/nls!sql/workbench/contrib/jobManagement/browser/jobStepsView.component","vs/nls!sql/workbench/contrib/jobManagement/browser/jobsView.component","vs/nls!sql/workbench/contrib/jobManagement/browser/notebookHistory.component","vs/nls!sql/workbench/contrib/jobManagement/browser/notebooksView.component","vs/nls!sql/workbench/contrib/jobManagement/browser/operatorsView.component","vs/nls!sql/workbench/contrib/jobManagement/browser/proxiesView.component","vs/nls!sql/workbench/contrib/notebook/browser/calloutDialog/common/constants","vs/nls!sql/workbench/contrib/notebook/browser/cellToolbarActions","vs/nls!sql/workbench/contrib/notebook/browser/cellViews/cellToolbar.component","vs/nls!sql/workbench/contrib/notebook/browser/cellViews/code.component","vs/nls!sql/workbench/contrib/notebook/browser/cellViews/codeActions","vs/nls!sql/workbench/contrib/notebook/browser/cellViews/collapse.component","sql/workbench/contrib/notebook/browser/cellViews/collapse.component","vs/nls!sql/workbench/contrib/notebook/browser/cellViews/markdownToolbar.component","vs/nls!sql/workbench/contrib/notebook/browser/cellViews/output.component","vs/nls!sql/workbench/contrib/notebook/browser/cellViews/placeholderCell.component","sql/workbench/contrib/notebook/browser/cellViews/placeholderCell.component","vs/nls!sql/workbench/contrib/notebook/browser/cellViews/stdin.component","vs/nls!sql/workbench/contrib/notebook/browser/cellViews/textCell.component","vs/nls!sql/workbench/contrib/notebook/browser/find/notebookFindWidget","vs/nls!sql/workbench/contrib/notebook/browser/models/outputProcessor","sql/workbench/contrib/notebook/browser/models/outputProcessor","vs/nls!sql/workbench/contrib/notebook/browser/notebook.component","vs/nls!sql/workbench/contrib/notebook/browser/notebook.contribution","vs/nls!sql/workbench/contrib/notebook/browser/notebookActions","vs/nls!sql/workbench/contrib/notebook/browser/notebookEditor","vs/nls!sql/workbench/contrib/notebook/browser/notebookEditor.component","vs/nls!sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet","vs/nls!sql/workbench/contrib/notebook/browser/notebookExplorer/notebookSearch","vs/nls!sql/workbench/contrib/notebook/browser/notebookExplorer/notebookSearchWidget","vs/nls!sql/workbench/contrib/notebook/browser/notebookViews/insertCellsModal","vs/nls!sql/workbench/contrib/notebook/browser/notebookViews/notebookViews.component","vs/nls!sql/workbench/contrib/notebook/browser/notebookViews/notebookViewsActions","vs/nls!sql/workbench/contrib/notebook/browser/notebookViews/notebookViewsCodeCell.component","vs/nls!sql/workbench/contrib/notebook/browser/notebookViews/notebookViewsGrid.component","vs/nls!sql/workbench/contrib/notebook/browser/notebookViews/viewOptionsModal","vs/nls!sql/workbench/contrib/notebook/browser/outputs/gridOutput.component","vs/nls!sql/workbench/contrib/notebook/browser/outputs/mimeRenderer.component","vs/nls!sql/workbench/contrib/notebook/browser/outputs/plotlyOutput.component","vs/nls!sql/workbench/contrib/notebook/common/notebookLoc","vs/nls!sql/workbench/contrib/objectExplorer/browser/serverTreeView","vs/nls!sql/workbench/contrib/objectExplorer/common/serverGroup.contribution","vs/nls!sql/workbench/contrib/preferences/browser/sqlSettingsLayout","vs/nls!sql/workbench/contrib/profiler/browser/profiler.contribution","vs/nls!sql/workbench/contrib/profiler/browser/profilerActions","vs/nls!sql/workbench/contrib/profiler/browser/profilerEditor","vs/nls!sql/workbench/contrib/profiler/browser/profilerFindWidget","vs/nls!sql/workbench/contrib/profiler/browser/profilerResourceEditor","vs/nls!sql/workbench/contrib/profiler/browser/profilerTableEditor","vs/nls!sql/workbench/contrib/query/browser/actions","vs/nls!sql/workbench/contrib/query/browser/flavorStatus","vs/nls!sql/workbench/contrib/query/browser/gridPanel","vs/nls!sql/workbench/contrib/query/browser/keyboardQueryActions","vs/nls!sql/workbench/contrib/query/browser/messagePanel","vs/nls!sql/workbench/contrib/query/browser/query.contribution","vs/nls!sql/workbench/contrib/query/browser/queryActions","vs/nls!sql/workbench/contrib/query/browser/queryEditor","vs/nls!sql/workbench/contrib/query/browser/queryResultsView","vs/nls!sql/workbench/contrib/query/browser/statusBarItems","vs/nls!sql/workbench/contrib/query/common/resultsGrid.contribution","vs/nls!sql/workbench/contrib/resourceDeployment/browser/resourceDeployment.contribution","vs/nls!sql/workbench/contrib/resourceViewer/browser/resourceViewer.contribution","vs/nls!sql/workbench/contrib/resourceViewer/browser/resourceViewerActions","vs/nls!sql/workbench/contrib/resourceViewer/browser/resourceViewerTable","vs/nls!sql/workbench/contrib/resourceViewer/browser/resourceViewerView","vs/nls!sql/workbench/contrib/resourceViewer/common/resourceViewerViewExtensionPoint","vs/nls!sql/workbench/contrib/restore/browser/restore.contribution","vs/nls!sql/workbench/contrib/restore/browser/restoreActions","vs/nls!sql/workbench/contrib/scripting/browser/scripting.contribution","vs/nls!sql/workbench/contrib/scripting/browser/scriptingActions","vs/nls!sql/workbench/contrib/tableDesigner/browser/actions","vs/nls!sql/workbench/contrib/tasks/browser/tasks.contribution","vs/nls!sql/workbench/contrib/tasks/browser/tasksActions","vs/nls!sql/workbench/contrib/tasks/browser/tasksRenderer","vs/nls!sql/workbench/contrib/tasks/browser/tasksView","vs/nls!sql/workbench/contrib/tasks/common/tasksAction","vs/nls!sql/workbench/contrib/telemetry/browser/telemetryOptOut","vs/nls!sql/workbench/contrib/tsgops/browser/tsgopsActions","vs/nls!sql/workbench/contrib/views/browser/treeView","vs/nls!sql/workbench/contrib/webview/browser/webViewDialog","vs/nls!sql/workbench/contrib/welcome/browser/abstractEnablePreviewFeatures","vs/nls!sql/workbench/contrib/welcome/browser/az_data_welcome_page","vs/nls!sql/workbench/contrib/welcome/browser/gettingStartedTour","vs/nls!sql/workbench/contrib/welcome/browser/retirementAnnouncement","vs/nls!sql/workbench/contrib/welcome/browser/welcomePage","vs/nls!sql/workbench/contrib/welcome/browser/welcomePage.contribution","vs/nls!sql/workbench/contrib/welcome/electron-sandbox/gettingStarted","vs/nls!sql/workbench/services/accountManagement/browser/accountDialog","vs/nls!sql/workbench/services/accountManagement/browser/accountDialogController","vs/nls!sql/workbench/services/accountManagement/browser/accountListRenderer","vs/nls!sql/workbench/services/accountManagement/browser/accountManagementService","vs/nls!sql/workbench/services/accountManagement/browser/accountPickerImpl","vs/nls!sql/workbench/services/accountManagement/browser/autoOAuthDialog","vs/nls!sql/workbench/services/accountManagement/browser/autoOAuthDialogController","vs/nls!sql/workbench/services/admin/common/adminService","vs/nls!sql/workbench/services/assessment/common/assessmentService","vs/nls!sql/workbench/services/backupRestoreUrlBrowser/browser/urlBrowserDialog","vs/nls!sql/workbench/services/backupRestoreUrlBrowser/browser/urlBrowserDialogService","vs/nls!sql/workbench/services/connection/browser/advancedPropertiesController","vs/nls!sql/workbench/services/connection/browser/cmsConnectionWidget","vs/nls!sql/workbench/services/connection/browser/connectionActions","vs/nls!sql/workbench/services/connection/browser/connectionBrowseTab","vs/nls!sql/workbench/services/connection/browser/connectionDialogService","vs/nls!sql/workbench/services/connection/browser/connectionDialogWidget","vs/nls!sql/workbench/services/connection/browser/connectionManagementService","vs/nls!sql/workbench/services/connection/browser/connectionWidget","vs/nls!sql/workbench/services/connection/browser/localizedConstants","sql/workbench/services/connection/browser/localizedConstants","vs/nls!sql/workbench/services/connection/browser/passwordChangeDialog","vs/nls!sql/workbench/services/dashboard/browser/newDashboardTabDialogImpl","vs/nls!sql/workbench/services/dialog/browser/dialogPane","vs/nls!sql/workbench/services/dialog/browser/wizardNavigation.component","vs/nls!sql/workbench/services/dialog/common/dialogTypes","sql/workbench/services/dialog/common/dialogTypes","vs/nls!sql/workbench/services/editData/common/editQueryRunner","vs/nls!sql/workbench/services/errorMessage/browser/errorMessageDialog","vs/nls!sql/workbench/services/errorMessage/browser/errorMessageService","vs/nls!sql/workbench/services/executionPlan/common/executionPlanService","vs/nls!sql/workbench/services/fileBrowser/browser/fileBrowserDialog","vs/nls!sql/workbench/services/fileBrowser/browser/fileBrowserDialogController","vs/nls!sql/workbench/services/fileBrowser/browser/fileBrowserTreeView","vs/nls!sql/workbench/services/fileBrowser/common/fileBrowserService","vs/nls!sql/workbench/services/fileBrowser/common/fileBrowserViewModel","vs/nls!sql/workbench/services/insights/browser/insightDialogActions","vs/nls!sql/workbench/services/insights/browser/insightsDialogController","vs/nls!sql/workbench/services/insights/browser/insightsDialogView","vs/nls!sql/workbench/services/insights/common/insightsUtils","vs/nls!sql/workbench/services/jobManagement/browser/jobManagementUtilities","vs/nls!sql/workbench/services/jobManagement/common/jobManagementService","vs/nls!sql/workbench/services/notebook/browser/interfaces","vs/nls!sql/workbench/services/notebook/browser/models/cell","vs/nls!sql/workbench/services/notebook/browser/models/cellEdit","sql/workbench/services/notebook/browser/models/cellEdit","vs/nls!sql/workbench/services/notebook/browser/models/clientSession","sql/workbench/services/notebook/browser/models/clientSession","vs/nls!sql/workbench/services/notebook/browser/models/notebookContexts","sql/workbench/services/notebook/browser/models/notebookContexts","vs/nls!sql/workbench/services/notebook/browser/models/notebookModel","vs/nls!sql/workbench/services/notebook/browser/notebookServiceImpl","vs/nls!sql/workbench/services/notebook/browser/notebookViews/notebookViewModel","vs/nls!sql/workbench/services/notebook/browser/notebookViews/notebookViewsExtension","vs/nls!sql/workbench/services/notebook/browser/sql/sqlSessionManager","vs/nls!sql/workbench/services/notebook/common/contracts","sql/workbench/services/notebook/browser/models/notebookExtension","sql/workbench/services/notebook/browser/notebookViews/notebookViewsExtension","vs/nls!sql/workbench/services/notebook/common/localContentManager","vs/nls!sql/workbench/services/notebook/common/notebookRegistry","vs/nls!sql/workbench/services/objectExplorer/browser/connectionTreeAction","vs/nls!sql/workbench/services/objectExplorer/browser/dragAndDropController","vs/nls!sql/workbench/services/objectExplorer/browser/filterDialog/filterDialog","vs/nls!sql/workbench/services/objectExplorer/browser/objectExplorerService","vs/nls!sql/workbench/services/objectExplorer/browser/objectExplorerViewTreeShim","vs/nls!sql/workbench/services/objectExplorer/browser/serverTreeRenderer","vs/nls!sql/workbench/services/objectExplorer/browser/treeCreationUtils","vs/nls!sql/workbench/services/objectExplorer/browser/treeUpdateUtils","vs/nls!sql/workbench/services/profiler/browser/profilerColumnEditorDialog","vs/nls!sql/workbench/services/profiler/browser/profilerFilterDialog","vs/nls!sql/workbench/services/profiler/browser/profilerService","vs/nls!sql/workbench/services/query/common/gridDataProvider","vs/nls!sql/workbench/services/query/common/queryManagement","vs/nls!sql/workbench/services/query/common/queryModelService","vs/nls!sql/workbench/services/query/common/queryRunner","vs/nls!sql/workbench/services/query/common/resultSerializer","vs/nls!sql/workbench/services/resourceProvider/browser/firewallRuleDialog","vs/nls!sql/workbench/services/resourceProvider/browser/firewallRuleDialogController","vs/nls!sql/workbench/services/restore/browser/restoreDialog","vs/nls!sql/workbench/services/restore/browser/restoreServiceImpl","vs/nls!sql/workbench/services/restore/common/constants","vs/nls!sql/workbench/services/serverGroup/browser/serverGroupDialog","vs/nls!sql/workbench/services/serverGroup/common/serverGroupViewModel","vs/nls!sql/workbench/services/tableDesigner/browser/tableDesignerComponentInput","vs/nls!sql/workbench/services/tableDesigner/browser/tableDesignerPublishDialog","vs/nls!sql/workbench/services/tableDesigner/browser/tableDesignerService","vs/nls!sql/workbench/services/tasks/common/tasksService","vs/nls!vs/base/browser/ui/actionbar/actionViewItems","vs/nls!vs/base/browser/ui/button/button","vs/nls!vs/base/browser/ui/dialog/dialog","vs/nls!vs/base/browser/ui/dropdown/dropdownActionViewItem","vs/nls!vs/base/browser/ui/findinput/findInput","vs/nls!vs/base/browser/ui/findinput/findInputToggles","vs/nls!vs/base/browser/ui/findinput/replaceInput","vs/nls!vs/base/browser/ui/hover/hoverWidget","vs/nls!vs/base/browser/ui/iconLabel/iconLabelHover","vs/nls!vs/base/browser/ui/inputbox/inputBox","vs/nls!vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/nls!vs/base/browser/ui/menu/menubar","vs/nls!vs/base/browser/ui/selectBox/selectBoxCustom","vs/nls!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/actions","sql/base/browser/ui/panel/tabActions","sql/base/browser/ui/propertiesContainer/togglePropertiesAction","sql/workbench/browser/designer/tableActions","sql/workbench/contrib/resourceViewer/browser/resourceViewerActions","sql/workbench/contrib/tableDesigner/browser/actions","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/common/platform","sql/workbench/services/notebook/browser/outputs/renderers","sql/platform/workspace/common/pathUtilities","sql/base/browser/ui/editableDropdown/browser/dropdownList","sql/base/browser/ui/table/plugins/checkboxColumn.plugin","sql/base/browser/ui/table/plugins/loadingSpinner.plugin","sql/base/browser/ui/table/plugins/contextMenuColumn.plugin","sql/base/browser/ui/table/plugins/hyperlinkColumn.plugin","sql/base/browser/ui/table/plugins/rowMoveManager.plugin","sql/base/browser/ui/table/plugins/textWithIconColumn","sql/workbench/contrib/charts/browser/countInsight","sql/workbench/contrib/extensions/browser/contributionRenders","sql/workbench/contrib/jobManagement/browser/jobHistoryTree","sql/workbench/contrib/notebook/browser/outputs/plotlyOutput.component","sql/workbench/contrib/tasks/browser/tasksRenderer","sql/workbench/services/fileBrowser/browser/fileBrowserController","vs/base/browser/ui/list/rowCache","sql/workbench/contrib/query/browser/flexibleSash","vs/base/browser/ui/scrollbar/scrollbarVisibilityController","vs/base/browser/ui/selectBox/selectBoxNative","vs/base/browser/ui/tree/compressedObjectTreeModel","sql/base/browser/ui/colorbox/colorbox","sql/base/browser/ui/slider/slider","sql/workbench/browser/designer/designerTabPanelView","vs/base/browser/ui/scrollbar/horizontalScrollbar","vs/base/browser/ui/scrollbar/verticalScrollbar","sql/base/browser/ui/scrollableView/scrollableView","vs/base/browser/ui/breadcrumbs/breadcrumbsWidget","sql/base/parts/tree/browser/treeView","vs/base/browser/ui/centered/centeredViewLayout","sql/base/browser/ui/dropdownList/dropdownList","sql/base/browser/ui/infoButton/infoButton","sql/base/browser/ui/taskbar/overflowActionbar","vs/base/browser/ui/menu/menubar","vs/base/browser/ui/findinput/replaceInput","vs/base/common/resourceTree","vs/base/parts/contextmenu/electron-sandbox/contextmenu","vs/base/parts/ipc/electron-sandbox/ipc.electron","vs/editor/browser/viewParts/contentWidgets/contentWidgets","vs/editor/browser/widget/diffEditorWidget2/diffEditorSash","vs/editor/browser/view/domLineBreaksComputer","vs/editor/browser/view/viewOverlays","vs/editor/common/languages/supports/electricCharacter","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl","vs/editor/contrib/hover/browser/resizableContentWidget","vs/editor/contrib/inlineCompletions/browser/provideInlineCompletions","vs/nls!vs/editor/browser/controller/textAreaHandler","vs/nls!vs/editor/browser/coreCommands","vs/nls!vs/editor/browser/editorExtensions","vs/nls!vs/editor/browser/widget/codeEditorWidget","vs/nls!vs/editor/browser/widget/diffEditor.contribution","vs/nls!vs/editor/browser/widget/diffEditorWidget","vs/nls!vs/editor/browser/widget/diffEditorWidget2/accessibleDiffViewer","vs/nls!vs/editor/browser/widget/diffEditorWidget2/colors","vs/nls!vs/editor/browser/widget/diffEditorWidget2/decorations","vs/nls!vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors","vs/nls!vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.contribution","vs/nls!vs/editor/browser/widget/diffEditorWidget2/inlineDiffDeletedCodeMargin","vs/editor/browser/widget/diffEditorWidget2/inlineDiffDeletedCodeMargin","vs/nls!vs/editor/browser/widget/diffEditorWidget2/movedBlocksLines","vs/nls!vs/editor/browser/widget/diffEditorWidget2/unchangedRanges","vs/nls!vs/editor/browser/widget/diffReview","vs/nls!vs/editor/browser/widget/inlineDiffMargin","vs/editor/browser/widget/inlineDiffMargin","vs/nls!vs/editor/common/config/editorConfigurationSchema","vs/nls!vs/editor/common/config/editorOptions","vs/editor/browser/viewParts/viewCursors/viewCursor","vs/editor/browser/widget/diffEditorWidget2/diffEditorOptions","vs/nls!vs/editor/common/core/editorColorRegistry","vs/nls!vs/editor/common/editorContextKeys","vs/nls!vs/editor/common/languages","vs/editor/common/model/tokenizationTextModelPart","vs/editor/common/services/editorBaseApi","vs/editor/common/services/editorSimpleWorker","vs/nls!vs/editor/common/languages/modesRegistry","vs/nls!vs/editor/common/model/editStack","vs/nls!vs/editor/common/standaloneStrings","vs/nls!vs/editor/common/viewLayout/viewLineRenderer","vs/nls!vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/nls!vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/nls!vs/editor/contrib/caretOperations/browser/caretOperations","vs/nls!vs/editor/contrib/caretOperations/browser/transpose","vs/nls!vs/editor/contrib/clipboard/browser/clipboard","vs/nls!vs/editor/contrib/codeAction/browser/codeAction","vs/nls!vs/editor/contrib/codeAction/browser/codeActionCommands","vs/nls!vs/editor/contrib/codeAction/browser/codeActionContributions","vs/nls!vs/editor/contrib/codeAction/browser/codeActionController","vs/nls!vs/editor/contrib/codeAction/browser/codeActionMenu","vs/nls!vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/nls!vs/editor/contrib/codelens/browser/codelensController","vs/nls!vs/editor/contrib/colorPicker/browser/colorPickerWidget","vs/nls!vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions","vs/nls!vs/editor/contrib/comment/browser/comment","vs/nls!vs/editor/contrib/contextmenu/browser/contextmenu","vs/nls!vs/editor/contrib/cursorUndo/browser/cursorUndo","vs/nls!vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution","vs/nls!vs/editor/contrib/dropOrPasteInto/browser/copyPasteController","vs/nls!vs/editor/contrib/dropOrPasteInto/browser/defaultProviders","vs/nls!vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution","vs/nls!vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController","vs/nls!vs/editor/contrib/editorState/browser/keybindingCancellation","vs/nls!vs/editor/contrib/find/browser/findController","vs/nls!vs/editor/contrib/find/browser/findWidget","vs/nls!vs/editor/contrib/folding/browser/folding","vs/nls!vs/editor/contrib/folding/browser/foldingDecorations","vs/nls!vs/editor/contrib/fontZoom/browser/fontZoom","vs/nls!vs/editor/contrib/format/browser/format","vs/nls!vs/editor/contrib/format/browser/formatActions","vs/nls!vs/editor/contrib/gotoError/browser/gotoError","vs/nls!vs/editor/contrib/gotoError/browser/gotoErrorWidget","vs/nls!vs/editor/contrib/gotoSymbol/browser/goToCommands","vs/nls!vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition","vs/nls!vs/editor/contrib/gotoSymbol/browser/peek/referencesController","vs/nls!vs/editor/contrib/gotoSymbol/browser/peek/referencesTree","vs/nls!vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget","vs/nls!vs/editor/contrib/gotoSymbol/browser/referencesModel","vs/nls!vs/editor/contrib/gotoSymbol/browser/symbolNavigation","vs/nls!vs/editor/contrib/hover/browser/hover","vs/nls!vs/editor/contrib/hover/browser/markdownHoverParticipant","vs/nls!vs/editor/contrib/hover/browser/markerHoverParticipant","vs/nls!vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/nls!vs/editor/contrib/indentation/browser/indentation","vs/nls!vs/editor/contrib/inlayHints/browser/inlayHintsHover","vs/nls!vs/editor/contrib/inlineCompletions/browser/commands","vs/nls!vs/editor/contrib/inlineCompletions/browser/hoverParticipant","vs/nls!vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys","vs/nls!vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController","vs/nls!vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget","vs/nls!vs/editor/contrib/lineSelection/browser/lineSelection","vs/nls!vs/editor/contrib/linesOperations/browser/linesOperations","vs/nls!vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/nls!vs/editor/contrib/links/browser/links","vs/nls!vs/editor/contrib/message/browser/messageController","vs/nls!vs/editor/contrib/multicursor/browser/multicursor","vs/nls!vs/editor/contrib/parameterHints/browser/parameterHints","vs/nls!vs/editor/contrib/parameterHints/browser/parameterHintsWidget","vs/nls!vs/editor/contrib/peekView/browser/peekView","vs/nls!vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess","vs/nls!vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess","vs/nls!vs/editor/contrib/readOnlyMessage/browser/contribution","vs/nls!vs/editor/contrib/rename/browser/rename","vs/nls!vs/editor/contrib/rename/browser/renameInputField","vs/nls!vs/editor/contrib/smartSelect/browser/smartSelect","vs/nls!vs/editor/contrib/snippet/browser/snippetController2","vs/nls!vs/editor/contrib/snippet/browser/snippetVariables","vs/nls!vs/editor/contrib/stickyScroll/browser/stickyScrollActions","vs/nls!vs/editor/contrib/suggest/browser/suggest","vs/nls!vs/editor/contrib/suggest/browser/suggestController","vs/nls!vs/editor/contrib/suggest/browser/suggestWidget","vs/nls!vs/editor/contrib/suggest/browser/suggestWidgetDetails","vs/nls!vs/editor/contrib/suggest/browser/suggestWidgetRenderer","vs/nls!vs/editor/contrib/suggest/browser/suggestWidgetStatus","vs/nls!vs/editor/contrib/symbolIcons/browser/symbolIcons","vs/nls!vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode","vs/nls!vs/editor/contrib/tokenization/browser/tokenization","vs/nls!vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/nls!vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators","vs/nls!vs/editor/contrib/wordHighlighter/browser/highlightDecorations","vs/nls!vs/editor/contrib/wordHighlighter/browser/wordHighlighter","vs/nls!vs/editor/contrib/wordOperations/browser/wordOperations","vs/nls!vs/platform/action/common/actionCommonCategories","vs/nls!vs/platform/actionWidget/browser/actionList","vs/nls!vs/platform/actionWidget/browser/actionWidget","vs/nls!vs/platform/actions/browser/buttonbar","vs/nls!vs/platform/actions/browser/menuEntryActionViewItem","vs/nls!vs/platform/actions/browser/toolbar","vs/nls!vs/platform/actions/common/menuResetAction","vs/nls!vs/platform/actions/common/menuService","vs/nls!vs/platform/audioCues/browser/audioCueService","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/contextkey/browser/contextKeyService","vs/nls!vs/platform/contextkey/common/contextkey","vs/nls!vs/platform/contextkey/common/contextkeys","vs/nls!vs/platform/contextkey/common/scanner","vs/nls!vs/platform/dialogs/common/dialogs","vs/nls!vs/platform/dnd/browser/dnd","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/extensionManagement/common/extensionManagementCLI","vs/nls!vs/platform/extensionManagement/common/extensionNls","vs/nls!vs/platform/extensionManagement/common/extensionsScannerService","vs/nls!vs/platform/extensions/common/extensionValidator","vs/nls!vs/platform/files/browser/htmlFileSystemProvider","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/history/browser/contextScopedHistoryWidget","vs/nls!vs/platform/keybinding/common/abstractKeybindingService","vs/nls!vs/platform/keyboardLayout/common/keyboardConfig","vs/nls!vs/platform/languagePacks/common/languagePacks","vs/nls!vs/platform/languagePacks/common/localizedStrings","vs/nls!vs/platform/list/browser/listService","vs/nls!vs/platform/markers/common/markers","vs/nls!vs/platform/quickinput/browser/commandsQuickAccess","vs/nls!vs/platform/quickinput/browser/helpQuickAccess","vs/nls!vs/platform/quickinput/browser/quickInput","vs/nls!vs/platform/quickinput/browser/quickInputController","vs/nls!vs/platform/quickinput/browser/quickInputList","vs/nls!vs/platform/quickinput/browser/quickInputUtils","vs/nls!vs/platform/quickinput/browser/quickPickPin","vs/nls!vs/platform/remoteTunnel/common/remoteTunnel","vs/nls!vs/platform/request/common/request","vs/nls!vs/platform/telemetry/common/telemetryService","vs/nls!vs/platform/terminal/common/terminalLogService","vs/nls!vs/platform/terminal/common/terminalPlatformConfiguration","vs/nls!vs/platform/terminal/common/terminalProfiles","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/userDataProfile/common/userDataProfile","vs/nls!vs/platform/userDataSync/common/abstractSynchronizer","vs/nls!vs/platform/userDataSync/common/userDataSync","vs/nls!vs/platform/userDataSync/common/userDataSyncLog","vs/nls!vs/platform/userDataSync/common/userDataSyncMachines","vs/nls!vs/platform/workspace/common/workspace","vs/nls!vs/platform/workspace/common/workspaceTrust","vs/nls!vs/workbench/api/browser/mainThreadAuthentication","vs/nls!vs/workbench/api/browser/mainThreadCLICommands","vs/nls!vs/workbench/api/browser/mainThreadComments","vs/nls!vs/workbench/api/browser/mainThreadCustomEditors","vs/nls!vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant","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/mainThreadNotebookSaveParticipant","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/mainThreadTunnelService","vs/nls!vs/workbench/api/browser/mainThreadUriOpeners","vs/nls!vs/workbench/api/browser/mainThreadWebviews","vs/nls!vs/workbench/api/browser/mainThreadWorkspace","vs/nls!vs/workbench/api/browser/statusBarExtensionPoint","vs/nls!vs/workbench/api/browser/viewsExtensionPoint","vs/nls!vs/workbench/api/common/configurationExtensionPoint","vs/nls!vs/workbench/api/common/extHostTunnelService","vs/nls!vs/workbench/api/common/jsonValidationExtensionPoint","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/editor","vs/nls!vs/workbench/browser/parts/activitybar/activitybarActions","vs/nls!vs/workbench/browser/parts/activitybar/activitybarPart","vs/nls!vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions","vs/nls!vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart","vs/nls!vs/workbench/browser/parts/banner/bannerPart","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/dialogs/dialogHandler","vs/nls!vs/workbench/browser/parts/editor/accessibilityStatus","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/editorConfiguration","vs/nls!vs/workbench/browser/parts/editor/editorDropTarget","vs/nls!vs/workbench/browser/parts/editor/editorGroupView","vs/nls!vs/workbench/browser/parts/editor/editorGroupWatermark","vs/nls!vs/workbench/browser/parts/editor/editorPanes","vs/nls!vs/workbench/browser/parts/editor/editorPlaceholder","vs/nls!vs/workbench/browser/parts/editor/editorQuickAccess","vs/nls!vs/workbench/browser/parts/editor/editorStatus","vs/nls!vs/workbench/browser/parts/editor/sideBySideEditor","vs/nls!vs/workbench/browser/parts/editor/tabsTitleControl","vs/nls!vs/workbench/browser/parts/editor/textCodeEditor","vs/nls!vs/workbench/browser/parts/editor/textDiffEditor","vs/nls!vs/workbench/browser/parts/editor/textEditor","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/notificationsToasts","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/sidebarActions","vs/nls!vs/workbench/browser/parts/statusbar/statusbarActions","vs/nls!vs/workbench/browser/parts/statusbar/statusbarPart","vs/nls!vs/workbench/browser/parts/titlebar/commandCenterControl","vs/nls!vs/workbench/browser/parts/titlebar/menubarControl","vs/nls!vs/workbench/browser/parts/titlebar/titlebarPart","vs/nls!vs/workbench/browser/parts/titlebar/windowTitle","vs/nls!vs/workbench/browser/parts/views/checkbox","vs/nls!vs/workbench/browser/parts/views/treeView","vs/nls!vs/workbench/browser/parts/views/viewFilter","vs/nls!vs/workbench/browser/parts/views/viewPane","vs/nls!vs/workbench/browser/parts/views/viewPaneContainer","vs/nls!vs/workbench/browser/parts/views/viewsService","vs/nls!vs/workbench/browser/quickaccess","vs/nls!vs/workbench/browser/workbench","vs/nls!vs/workbench/browser/workbench.contribution","vs/nls!vs/workbench/common/configuration","vs/nls!vs/workbench/common/contextkeys","vs/nls!vs/workbench/common/editor","vs/nls!vs/workbench/common/editor/diffEditorInput","vs/nls!vs/workbench/common/editor/sideBySideEditorInput","vs/nls!vs/workbench/common/editor/textEditorModel","vs/nls!vs/workbench/common/theme","vs/nls!vs/workbench/common/views","vs/nls!vs/workbench/contrib/accessibility/browser/accessibilityConfiguration","vs/nls!vs/workbench/contrib/accessibility/browser/accessibilityContributions","vs/nls!vs/workbench/contrib/accessibility/browser/accessibleView","vs/nls!vs/workbench/contrib/accessibility/browser/accessibleViewActions","vs/nls!vs/workbench/contrib/audioCues/browser/audioCues.contribution","vs/nls!vs/workbench/contrib/audioCues/browser/commands","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/chat/browser/actions/chatAccessibilityHelp","vs/nls!vs/workbench/contrib/chat/browser/actions/chatActions","vs/nls!vs/workbench/contrib/chat/browser/actions/chatClearActions","vs/nls!vs/workbench/contrib/chat/browser/actions/chatCodeblockActions","vs/nls!vs/workbench/contrib/chat/browser/actions/chatCopyActions","vs/nls!vs/workbench/contrib/chat/browser/actions/chatExecuteActions","vs/nls!vs/workbench/contrib/chat/browser/actions/chatFileTreeActions","vs/nls!vs/workbench/contrib/chat/browser/actions/chatImportExport","vs/nls!vs/workbench/contrib/chat/browser/actions/chatMoveActions","vs/nls!vs/workbench/contrib/chat/browser/actions/chatQuickInputActions","vs/nls!vs/workbench/contrib/chat/browser/actions/chatTitleActions","vs/nls!vs/workbench/contrib/chat/browser/chat.contribution","vs/nls!vs/workbench/contrib/chat/browser/chatContributionServiceImpl","vs/nls!vs/workbench/contrib/chat/browser/chatEditorInput","vs/nls!vs/workbench/contrib/chat/browser/chatInputPart","vs/nls!vs/workbench/contrib/chat/browser/chatListRenderer","vs/nls!vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget","vs/nls!vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib","vs/nls!vs/workbench/contrib/chat/common/chatColors","vs/nls!vs/workbench/contrib/chat/common/chatContextKeys","vs/nls!vs/workbench/contrib/chat/common/chatServiceImpl","vs/nls!vs/workbench/contrib/chat/common/chatSlashCommands","vs/nls!vs/workbench/contrib/chat/common/chatViewModel","vs/nls!vs/workbench/contrib/chat/electron-sandbox/actions/voiceChatActions","vs/nls!vs/workbench/contrib/codeActions/browser/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/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/outline/documentSymbolsOutline","vs/nls!vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree","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/codeEditor/browser/untitledTextEditorHint/untitledTextEditorHint","vs/nls!vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard","vs/nls!vs/workbench/contrib/codeEditor/electron-sandbox/startDebugTextMate","vs/nls!vs/workbench/contrib/commands/common/commands.contribution","vs/nls!vs/workbench/contrib/comments/browser/commentColors","vs/nls!vs/workbench/contrib/comments/browser/commentGlyphWidget","vs/nls!vs/workbench/contrib/comments/browser/commentNode","vs/nls!vs/workbench/contrib/comments/browser/commentReply","vs/nls!vs/workbench/contrib/comments/browser/commentService","vs/nls!vs/workbench/contrib/comments/browser/commentThreadBody","vs/nls!vs/workbench/contrib/comments/browser/commentThreadHeader","vs/nls!vs/workbench/contrib/comments/browser/comments.contribution","vs/nls!vs/workbench/contrib/comments/browser/commentsController","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/commentsViewActions","vs/nls!vs/workbench/contrib/comments/browser/reactionsAction","vs/nls!vs/workbench/contrib/comments/common/commentContextKeys","vs/nls!vs/workbench/contrib/comments/common/commentModel","vs/nls!vs/workbench/contrib/customEditor/common/contributedCustomEditors","vs/nls!vs/workbench/contrib/customEditor/common/customEditor","vs/nls!vs/workbench/contrib/customEditor/common/extensionPoint","vs/nls!vs/workbench/contrib/debug/browser/debugColors","vs/nls!vs/workbench/contrib/debug/browser/debugIcons","vs/nls!vs/workbench/contrib/debug/common/debug","vs/nls!vs/workbench/contrib/deprecatedExtensionMigrator/browser/deprecatedExtensionMigrator.contribution","vs/nls!vs/workbench/contrib/editSessions/browser/editSessions.contribution","vs/nls!vs/workbench/contrib/editSessions/browser/editSessionsStorageService","vs/nls!vs/workbench/contrib/editSessions/browser/editSessionsViews","vs/nls!vs/workbench/contrib/editSessions/common/editSessions","vs/nls!vs/workbench/contrib/editSessions/common/editSessionsLogService","vs/nls!vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor","vs/nls!vs/workbench/contrib/extensions/browser/configBasedRecommendations","vs/nls!vs/workbench/contrib/extensions/browser/deprecatedExtensionsChecker","vs/nls!vs/workbench/contrib/extensions/browser/exeBasedRecommendations","vs/nls!vs/workbench/contrib/extensions/browser/extensionEditor","vs/nls!vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant","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/extensionsCompletionItemsProvider","vs/nls!vs/workbench/contrib/extensions/browser/extensionsDependencyChecker","vs/nls!vs/workbench/contrib/extensions/browser/extensionsIcons","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/webRecommendations","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/extensions/common/reportExtensionIssueAction","vs/nls!vs/workbench/contrib/extensions/common/runtimeExtensionsInput","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/debugExtensionHostAction","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/extensionProfileService","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/extensions.contribution","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/extensionsActions","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/extensionsAutoProfiler","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions","vs/nls!vs/workbench/contrib/extensions/electron-sandbox/runtimeExtensionsEditor","vs/nls!vs/workbench/contrib/externalTerminal/browser/externalTerminal.contribution","vs/nls!vs/workbench/contrib/externalTerminal/electron-sandbox/externalTerminal.contribution","vs/nls!vs/workbench/contrib/externalUriOpener/common/configuration","vs/nls!vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService","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/fileConstants","vs/nls!vs/workbench/contrib/files/browser/fileImportExport","vs/nls!vs/workbench/contrib/files/browser/files.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/browser/workspaceWatcher","vs/nls!vs/workbench/contrib/files/common/dirtyFilesIndicator","vs/nls!vs/workbench/contrib/files/common/files","vs/nls!vs/workbench/contrib/files/electron-sandbox/fileActions.contribution","vs/nls!vs/workbench/contrib/folding/browser/folding.contribution","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/inlayHints/browser/inlayHintsAccessibilty","vs/nls!vs/workbench/contrib/inlineChat/browser/inlineChatActions","vs/nls!vs/workbench/contrib/inlineChat/browser/inlineChatController","vs/nls!vs/workbench/contrib/inlineChat/browser/inlineChatStrategies","vs/nls!vs/workbench/contrib/inlineChat/browser/inlineChatWidget","vs/nls!vs/workbench/contrib/inlineChat/common/inlineChat","vs/nls!vs/workbench/contrib/interactive/browser/interactive.contribution","vs/nls!vs/workbench/contrib/interactive/browser/interactiveEditor","vs/nls!vs/workbench/contrib/issue/common/issue.contribution","vs/nls!vs/workbench/contrib/issue/electron-sandbox/issue.contribution","vs/nls!vs/workbench/contrib/keybindings/browser/keybindings.contribution","vs/nls!vs/workbench/contrib/languageDetection/browser/languageDetection.contribution","vs/nls!vs/workbench/contrib/languageStatus/browser/languageStatus.contribution","vs/nls!vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution","vs/nls!vs/workbench/contrib/localHistory/browser/localHistory","vs/nls!vs/workbench/contrib/localHistory/browser/localHistoryCommands","vs/nls!vs/workbench/contrib/localHistory/browser/localHistoryTimeline","vs/nls!vs/workbench/contrib/localHistory/electron-sandbox/localHistoryCommands","vs/nls!vs/workbench/contrib/localization/common/localization.contribution","vs/nls!vs/workbench/contrib/localization/common/localizationsActions","vs/nls!vs/workbench/contrib/localization/electron-sandbox/localization.contribution","vs/nls!vs/workbench/contrib/localization/electron-sandbox/minimalTranslations","vs/nls!vs/workbench/contrib/logs/common/logs.contribution","vs/nls!vs/workbench/contrib/logs/common/logsActions","vs/nls!vs/workbench/contrib/logs/electron-sandbox/logsActions","vs/nls!vs/workbench/contrib/markers/browser/markers.contribution","vs/nls!vs/workbench/contrib/markers/browser/markersFileDecorations","vs/nls!vs/workbench/contrib/markers/browser/markersTable","vs/nls!vs/workbench/contrib/markers/browser/markersTreeViewer","vs/nls!vs/workbench/contrib/markers/browser/markersView","vs/nls!vs/workbench/contrib/markers/browser/messages","vs/nls!vs/workbench/contrib/mergeEditor/browser/commands/commands","vs/nls!vs/workbench/contrib/mergeEditor/browser/commands/devCommands","vs/nls!vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution","vs/nls!vs/workbench/contrib/mergeEditor/browser/mergeEditorInput","vs/nls!vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel","vs/nls!vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController","vs/nls!vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel","vs/nls!vs/workbench/contrib/mergeEditor/browser/view/colors","vs/nls!vs/workbench/contrib/mergeEditor/browser/view/conflictActions","vs/nls!vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView","vs/nls!vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView","vs/nls!vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView","vs/nls!vs/workbench/contrib/mergeEditor/browser/view/mergeEditor","vs/nls!vs/workbench/contrib/mergeEditor/browser/view/viewModel","vs/nls!vs/workbench/contrib/mergeEditor/common/mergeEditor","vs/nls!vs/workbench/contrib/mergeEditor/electron-sandbox/devCommands","vs/nls!vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands","vs/nls!vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController","vs/nls!vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders","vs/nls!vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard","vs/nls!vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar","vs/nls!vs/workbench/contrib/notebook/browser/contrib/find/notebookFind","vs/nls!vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget","vs/nls!vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget","vs/nls!vs/workbench/contrib/notebook/browser/contrib/format/formatting","vs/nls!vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted","vs/nls!vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions","vs/nls!vs/workbench/contrib/notebook/browser/contrib/navigation/arrow","vs/nls!vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline","vs/nls!vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile","vs/nls!vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants","vs/nls!vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout","vs/nls!vs/workbench/contrib/notebook/browser/controller/cellOperations","vs/nls!vs/workbench/contrib/notebook/browser/controller/cellOutputActions","vs/nls!vs/workbench/contrib/notebook/browser/controller/coreActions","vs/nls!vs/workbench/contrib/notebook/browser/controller/editActions","vs/nls!vs/workbench/contrib/notebook/browser/controller/executeActions","vs/nls!vs/workbench/contrib/notebook/browser/controller/foldingController","vs/nls!vs/workbench/contrib/notebook/browser/controller/insertCellActions","vs/nls!vs/workbench/contrib/notebook/browser/controller/layoutActions","vs/nls!vs/workbench/contrib/notebook/browser/diff/diffElementOutputs","vs/nls!vs/workbench/contrib/notebook/browser/diff/notebookDiffActions","vs/nls!vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor","vs/nls!vs/workbench/contrib/notebook/browser/notebook.contribution","vs/nls!vs/workbench/contrib/notebook/browser/notebookAccessibility","vs/nls!vs/workbench/contrib/notebook/browser/notebookEditor","vs/nls!vs/workbench/contrib/notebook/browser/notebookEditorWidget","vs/nls!vs/workbench/contrib/notebook/browser/notebookExtensionPoint","vs/nls!vs/workbench/contrib/notebook/browser/notebookIcons","vs/nls!vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl","vs/nls!vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl","vs/nls!vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl","vs/nls!vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl","vs/nls!vs/workbench/contrib/notebook/browser/services/notebookServiceImpl","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/codeCell","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint","vs/nls!vs/workbench/contrib/notebook/browser/view/cellParts/markupCell","vs/nls!vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView","vs/nls!vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer","vs/nls!vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider","vs/nls!vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll","vs/nls!vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy","vs/nls!vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView","vs/nls!vs/workbench/contrib/notebook/common/notebookEditorInput","vs/nls!vs/workbench/contrib/outline/browser/outline.contribution","vs/nls!vs/workbench/contrib/outline/browser/outlineActions","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/performance/electron-sandbox/performance.contribution","vs/nls!vs/workbench/contrib/performance/electron-sandbox/startupProfiler","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/preferences.contribution","vs/nls!vs/workbench/contrib/preferences/browser/preferencesActions","vs/nls!vs/workbench/contrib/preferences/browser/preferencesIcons","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/settingsEditorSettingIndicators","vs/nls!vs/workbench/contrib/preferences/browser/settingsLayout","vs/nls!vs/workbench/contrib/preferences/browser/settingsSearchMenu","vs/nls!vs/workbench/contrib/preferences/browser/settingsTree","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/preferences/common/settingsEditorColorRegistry","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/remoteExplorer","vs/nls!vs/workbench/contrib/remote/browser/remoteIcons","vs/nls!vs/workbench/contrib/remote/browser/tunnelView","vs/nls!vs/workbench/contrib/remote/electron-sandbox/remote.contribution","vs/nls!vs/workbench/contrib/remoteTunnel/electron-sandbox/remoteTunnel.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/dirtyDiffSwitcher","vs/nls!vs/workbench/contrib/scm/browser/dirtydiffDecorator","vs/nls!vs/workbench/contrib/scm/browser/menus","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/quickTextSearch/textSearchQuickAccess","vs/nls!vs/workbench/contrib/search/browser/replaceService","vs/nls!vs/workbench/contrib/search/browser/search.contribution","vs/nls!vs/workbench/contrib/search/browser/searchActionsBase","vs/nls!vs/workbench/contrib/search/browser/searchActionsCopy","vs/nls!vs/workbench/contrib/search/browser/searchActionsFind","vs/nls!vs/workbench/contrib/search/browser/searchActionsNav","vs/nls!vs/workbench/contrib/search/browser/searchActionsRemoveReplace","vs/nls!vs/workbench/contrib/search/browser/searchActionsSymbol","vs/nls!vs/workbench/contrib/search/browser/searchActionsTextQuickAccess","vs/nls!vs/workbench/contrib/search/browser/searchActionsTopBar","vs/nls!vs/workbench/contrib/search/browser/searchFindInput","vs/nls!vs/workbench/contrib/search/browser/searchIcons","vs/nls!vs/workbench/contrib/search/browser/searchMessage","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/searchEditor/browser/searchEditor","vs/nls!vs/workbench/contrib/searchEditor/browser/searchEditor.contribution","vs/nls!vs/workbench/contrib/searchEditor/browser/searchEditorInput","vs/nls!vs/workbench/contrib/searchEditor/browser/searchEditorSerialization","vs/nls!vs/workbench/contrib/share/browser/share.contribution","vs/nls!vs/workbench/contrib/share/browser/shareService","vs/nls!vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions","vs/nls!vs/workbench/contrib/snippets/browser/commands/configureSnippets","vs/nls!vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets","vs/nls!vs/workbench/contrib/snippets/browser/commands/insertSnippet","vs/nls!vs/workbench/contrib/snippets/browser/commands/surroundWithSnippet","vs/nls!vs/workbench/contrib/snippets/browser/snippetCodeActionProvider","vs/nls!vs/workbench/contrib/snippets/browser/snippetCompletionProvider","vs/nls!vs/workbench/contrib/snippets/browser/snippetPicker","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/ces.contribution","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/taskTerminalStatus","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/taskService","vs/nls!vs/workbench/contrib/tasks/common/taskTemplates","vs/nls!vs/workbench/contrib/tasks/common/tasks","vs/nls!vs/workbench/contrib/tasks/electron-sandbox/taskService","vs/nls!vs/workbench/contrib/terminal/browser/baseTerminalBackend","vs/nls!vs/workbench/contrib/terminal/browser/environmentVariableInfo","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/terminalEditorInput","vs/nls!vs/workbench/contrib/terminal/browser/terminalIcons","vs/nls!vs/workbench/contrib/terminal/browser/terminalInstance","vs/nls!vs/workbench/contrib/terminal/browser/terminalMenus","vs/nls!vs/workbench/contrib/terminal/browser/terminalProcessManager","vs/nls!vs/workbench/contrib/terminal/browser/terminalProfileQuickpick","vs/nls!vs/workbench/contrib/terminal/browser/terminalQuickAccess","vs/nls!vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick","vs/nls!vs/workbench/contrib/terminal/browser/terminalService","vs/nls!vs/workbench/contrib/terminal/browser/terminalTabbedView","vs/nls!vs/workbench/contrib/terminal/browser/terminalTabsList","vs/nls!vs/workbench/contrib/terminal/browser/terminalTooltip","vs/nls!vs/workbench/contrib/terminal/browser/terminalView","vs/nls!vs/workbench/contrib/terminal/browser/xterm/decorationAddon","vs/nls!vs/workbench/contrib/terminal/browser/xterm/decorationStyles","vs/nls!vs/workbench/contrib/terminal/browser/xterm/xtermTerminal","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/terminalContextKey","vs/nls!vs/workbench/contrib/terminal/common/terminalStrings","vs/nls!vs/workbench/contrib/terminal/electron-sandbox/terminalRemote","vs/nls!vs/workbench/contrib/terminalContrib/accessibility/browser/terminal.accessibility.contribution","vs/nls!vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibilityHelp","vs/nls!vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibleBuffer","vs/nls!vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibleWidget","vs/nls!vs/workbench/contrib/terminalContrib/developer/browser/terminal.developer.contribution","vs/nls!vs/workbench/contrib/terminalContrib/environmentChanges/browser/terminal.environmentChanges.contribution","vs/nls!vs/workbench/contrib/terminalContrib/find/browser/terminal.find.contribution","vs/nls!vs/workbench/contrib/terminalContrib/links/browser/terminal.links.contribution","vs/nls!vs/workbench/contrib/terminalContrib/links/browser/terminalLinkDetectorAdapter","vs/nls!vs/workbench/contrib/terminalContrib/links/browser/terminalLinkManager","vs/nls!vs/workbench/contrib/terminalContrib/links/browser/terminalLinkQuickpick","vs/nls!vs/workbench/contrib/terminalContrib/quickFix/browser/quickFixAddon","vs/nls!vs/workbench/contrib/terminalContrib/quickFix/browser/terminal.quickFix.contribution","vs/nls!vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixBuiltinActions","vs/nls!vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixService","vs/nls!vs/workbench/contrib/testing/browser/icons","vs/nls!vs/workbench/contrib/testing/browser/testExplorerActions","vs/nls!vs/workbench/contrib/testing/browser/testing.contribution","vs/nls!vs/workbench/contrib/testing/browser/testingConfigurationUi","vs/nls!vs/workbench/contrib/testing/browser/testingDecorations","vs/nls!vs/workbench/contrib/testing/browser/testingExplorerFilter","vs/nls!vs/workbench/contrib/testing/browser/testingExplorerView","vs/nls!vs/workbench/contrib/testing/browser/testingOutputPeek","vs/nls!vs/workbench/contrib/testing/browser/testingProgressUiService","vs/nls!vs/workbench/contrib/testing/browser/testingViewPaneContainer","vs/nls!vs/workbench/contrib/testing/browser/theme","vs/nls!vs/workbench/contrib/testing/common/configuration","vs/nls!vs/workbench/contrib/testing/common/constants","vs/nls!vs/workbench/contrib/testing/common/testResult","vs/nls!vs/workbench/contrib/testing/common/testServiceImpl","vs/nls!vs/workbench/contrib/testing/common/testingContentProvider","vs/nls!vs/workbench/contrib/testing/common/testingContextKeys","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/typeHierarchy/browser/typeHierarchy.contribution","vs/nls!vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek","vs/nls!vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree","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/userDataProfile/browser/userDataProfile","vs/nls!vs/workbench/contrib/userDataProfile/browser/userDataProfileActions","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSync","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSync.contribution","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSyncConflictsView","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSyncViews","vs/nls!vs/workbench/contrib/userDataSync/electron-sandbox/userDataSync.contribution","vs/nls!vs/workbench/contrib/webview/browser/webview.contribution","vs/nls!vs/workbench/contrib/webview/browser/webviewElement","vs/nls!vs/workbench/contrib/webview/electron-sandbox/webviewCommands","vs/nls!vs/workbench/contrib/webviewPanel/browser/webviewCommands","vs/nls!vs/workbench/contrib/webviewPanel/browser/webviewEditor","vs/nls!vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution","vs/nls!vs/workbench/contrib/welcomeViews/common/newFile.contribution","vs/nls!vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution","vs/nls!vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint","vs/nls!vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough","vs/nls!vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution","vs/nls!vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart","vs/nls!vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils","vs/nls!vs/workbench/contrib/workspace/browser/workspace.contribution","vs/nls!vs/workbench/contrib/workspace/browser/workspaceTrustEditor","vs/nls!vs/workbench/contrib/workspace/common/workspace","vs/nls!vs/workbench/contrib/workspaces/browser/workspaces.contribution","vs/nls!vs/workbench/electron-sandbox/actions/developerActions","vs/nls!vs/workbench/electron-sandbox/actions/installActions","vs/nls!vs/workbench/electron-sandbox/actions/windowActions","vs/nls!vs/workbench/electron-sandbox/desktop.contribution","vs/nls!vs/workbench/electron-sandbox/desktop.main","vs/nls!vs/workbench/electron-sandbox/parts/dialogs/dialogHandler","vs/nls!vs/workbench/electron-sandbox/window","vs/nls!vs/workbench/services/actions/common/menusExtensionPoint","vs/nls!vs/workbench/services/assignment/common/assignmentService","vs/nls!vs/workbench/services/authentication/browser/authenticationService","vs/nls!vs/workbench/services/configuration/browser/configurationService","vs/nls!vs/workbench/services/configuration/common/configurationEditing","vs/nls!vs/workbench/services/configuration/common/jsonEditingService","vs/nls!vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService","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/simpleFileDialog","vs/nls!vs/workbench/services/editor/browser/editorResolverService","vs/nls!vs/workbench/services/editor/common/editorResolverService","vs/nls!vs/workbench/services/extensionManagement/browser/extensionBisect","vs/nls!vs/workbench/services/extensionManagement/browser/extensionEnablementService","vs/nls!vs/workbench/services/extensionManagement/common/extensionManagementService","vs/nls!vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementServerService","vs/nls!vs/workbench/services/extensionManagement/electron-sandbox/remoteExtensionManagementService","vs/nls!vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig","vs/nls!vs/workbench/services/extensions/browser/extensionUrlHandler","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/extensionsUtil","vs/nls!vs/workbench/services/extensions/electron-sandbox/cachedExtensionScanner","vs/nls!vs/workbench/services/extensions/electron-sandbox/localProcessExtensionHost","vs/nls!vs/workbench/services/extensions/electron-sandbox/nativeExtensionService","vs/nls!vs/workbench/services/filesConfiguration/common/filesConfigurationService","vs/nls!vs/workbench/services/history/browser/historyService","vs/nls!vs/workbench/services/hover/browser/hoverWidget","vs/nls!vs/workbench/services/integrity/electron-sandbox/integrityService","vs/nls!vs/workbench/services/issue/browser/issueTroubleshoot","vs/nls!vs/workbench/services/keybinding/browser/keybindingService","vs/nls!vs/workbench/services/keybinding/common/keybindingEditing","vs/nls!vs/workbench/services/label/common/labelService","vs/nls!vs/workbench/services/language/common/languageService","vs/nls!vs/workbench/services/localization/electron-sandbox/localeService","vs/nls!vs/workbench/services/log/electron-sandbox/logService","vs/nls!vs/workbench/services/notification/common/notificationService","vs/nls!vs/workbench/services/preferences/browser/keybindingsEditorInput","vs/nls!vs/workbench/services/preferences/browser/keybindingsEditorModel","vs/nls!vs/workbench/services/preferences/browser/preferencesService","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/tunnelModel","vs/nls!vs/workbench/services/remote/electron-sandbox/remoteAgentService","vs/nls!vs/workbench/services/search/common/queryBuilder","vs/nls!vs/workbench/services/secrets/electron-sandbox/secretStorageService","vs/nls!vs/workbench/services/suggest/browser/simpleSuggestWidget","vs/nls!vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl","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/textfile/electron-sandbox/nativeTextFileService","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/iconExtensionPoint","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/userDataProfile/browser/extensionsResource","vs/nls!vs/workbench/services/userDataProfile/browser/globalStateResource","vs/nls!vs/workbench/services/userDataProfile/browser/keybindingsResource","vs/nls!vs/workbench/services/userDataProfile/browser/settingsResource","vs/nls!vs/workbench/services/userDataProfile/browser/snippetsResource","vs/nls!vs/workbench/services/userDataProfile/browser/tasksResource","vs/nls!vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService","vs/nls!vs/workbench/services/userDataProfile/browser/userDataProfileManagement","vs/nls!vs/workbench/services/userDataProfile/common/userDataProfile","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/views/common/viewContainerModel","vs/nls!vs/workbench/services/voiceRecognition/electron-sandbox/workbenchVoiceRecognitionService","vs/nls!vs/workbench/services/workingCopy/common/fileWorkingCopyManager","vs/nls!vs/workbench/services/workingCopy/common/storedFileWorkingCopy","vs/nls!vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager","vs/nls!vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant","vs/nls!vs/workbench/services/workingCopy/common/workingCopyHistoryService","vs/nls!vs/workbench/services/workingCopy/common/workingCopyHistoryTracker","vs/nls!vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupService","vs/nls!vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupTracker","vs/nls!vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService","vs/nls!vs/workbench/services/workspaces/browser/workspaceTrustEditorInput","vs/nls!vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService","vs/platform/assignment/common/assignment","vs/platform/backup/common/backup","vs/platform/contextkey/common/scanner","vs/platform/debug/common/extensionHostDebugIpc","vs/platform/extensionRecommendations/common/extensionRecommendationsIpc","vs/platform/instantiation/common/graph","sql/platform/accounts/common/accountPickerViewModel","sql/platform/capabilities/common/capabilitiesServiceImpl","sql/platform/oAuth/common/sqlOAuthService","sql/platform/backup/common/backupServiceImp","sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerFilter","sql/workbench/services/assessment/common/assessmentService","sql/workbench/services/fileBrowser/common/fileBrowserService","sql/workbench/services/fileBrowser/browser/fileBrowserDataSource","sql/workbench/services/profiler/browser/profilerFilter","vs/editor/browser/widget/diffEditorWidget2/unchangedRanges","vs/editor/common/services/languageFeaturesService","vs/editor/contrib/inlineCompletions/browser/ghostTextWidget","sql/workbench/services/insights/browser/insightDialogActions","sql/workbench/contrib/accounts/browser/accounts.contribution","vs/editor/contrib/links/browser/getLinks","sql/workbench/contrib/notebook/browser/htmlMarkdownConverter","sql/workbench/contrib/notebook/browser/outputs/markdownOutput.component","vs/editor/common/services/textResourceConfigurationService","sql/workbench/contrib/notebook/browser/markdownToolbarActions","sql/workbench/contrib/notebook/browser/outputs/mimeRenderer.component","sql/workbench/services/notebook/browser/sql/sqlSerializationManager","sql/workbench/services/notebook/browser/sql/sqlSerializationProvider","vs/editor/contrib/parameterHints/browser/parameterHintsModel","vs/editor/contrib/suggest/browser/suggestAlternatives","vs/editor/contrib/suggest/browser/wordContextKey","vs/editor/browser/config/editorConfiguration","vs/platform/contextkey/browser/contextKeyService","vs/platform/extensionManagement/common/extensionManagementIpc","vs/platform/files/browser/htmlFileSystemProvider","vs/platform/files/common/inMemoryFilesystemProvider","vs/platform/files/common/io","vs/platform/ipc/electron-sandbox/mainProcessService","vs/platform/diagnostics/electron-sandbox/diagnosticsService","vs/platform/externalTerminal/electron-sandbox/externalTerminalMainService","sql/workbench/contrib/tasks/browser/tasksController","vs/platform/keybinding/common/abstractKeybindingService","vs/platform/keybinding/common/usLayoutResolvedKeybinding","vs/platform/keyboardLayout/common/keyboardMapper","vs/platform/languagePacks/common/localizedStrings","vs/platform/accessibility/browser/accessibilityService","vs/platform/contextview/browser/contextViewService","sql/platform/accounts/common/accountStore","sql/platform/angularEventing/browser/angularEventingServiceImpl","sql/platform/connection/common/connectionStatusManager","sql/workbench/browser/scriptingUtils","sql/workbench/services/diagnostics/browser/errorDiagnosticsService","sql/workbench/services/objectExplorer/browser/asyncServerTreeDelegate","rxjs/Observable","rxjs/add/observable/fromPromise","sql/workbench/contrib/dashboard/browser/containers/dashboardControlHostContainer.component","vs/platform/files/common/diskFileSystemProvider","vs/platform/files/common/fileService","vs/platform/log/browser/log","vs/platform/driver/browser/driver","vs/platform/driver/electron-sandbox/driver","vs/platform/log/common/logIpc","vs/platform/log/common/logService","vs/platform/native/electron-sandbox/nativeHostService","sql/platform/clipboard/browser/clipboardService","sql/platform/clipboard/electron-sandbox/clipboardService","sql/workbench/contrib/charts/browser/imageInsight","sql/workbench/contrib/dashboard/browser/services/dashboardServiceInterface.service","sql/workbench/services/connection/browser/connectionGlobalStatus","sql/workbench/contrib/notebook/browser/cellViews/linkHandler.directive","vs/editor/browser/services/openerService","vs/editor/contrib/documentSymbols/browser/documentSymbols","vs/platform/policy/common/policyIpc","vs/platform/profiling/common/profilingTelemetrySpec","vs/platform/profiling/electron-sandbox/profilingService","vs/platform/quickinput/browser/quickInputBox","sql/workbench/contrib/jobManagement/browser/notebookHistory.component","sql/workbench/browser/modelComponents/chart.component","sql/workbench/browser/modelComponents/flexContainer.component","sql/workbench/browser/modelComponents/formContainer.component","sql/workbench/browser/modelComponents/groupContainer.component","sql/workbench/browser/modelComponents/loadingComponent.component","sql/workbench/browser/modelComponents/radioButton.component","sql/workbench/browser/modelComponents/separator.component","sql/workbench/browser/modelComponents/slider.component","sql/workbench/browser/modelComponents/splitviewContainer.component","sql/workbench/browser/modelComponents/toolbarContainer.component","sql/workbench/browser/modelComponents/viewBase","sql/workbench/contrib/charts/browser/chartOptions","sql/workbench/contrib/dashboard/browser/containers/dashboardModelViewContainer.component","sql/workbench/contrib/dashboard/browser/containers/dashboardNavSection.component","sql/workbench/contrib/dashboard/browser/widgets/insights/insightsWidgetSchemas","sql/workbench/contrib/dashboard/browser/widgets/insights/views/countInsight.contribution","sql/workbench/contrib/dashboard/browser/widgets/insights/views/imageInsight.contribution","sql/workbench/contrib/dashboard/browser/widgets/webview/webviewWidget.contribution","sql/workbench/contrib/query/browser/modelViewTab/queryModelViewTabContainer.component","sql/workbench/services/dialog/browser/dialogContainer.component","sql/workbench/services/notebook/browser/models/modelFactory","sql/workbench/contrib/charts/browser/charts.contribution","sql/workbench/contrib/query/common/resultsGrid.contribution","vs/editor/common/cursor/cursor","vs/editor/common/services/languagesRegistry","vs/editor/common/services/languageService","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource","vs/editor/contrib/linesOperations/browser/moveLinesCommand","sql/workbench/browser/designer/designerPropertiesPane","vs/editor/contrib/hover/browser/marginHover","sql/workbench/contrib/table/browser/table.contribution","sql/workbench/contrib/welcome/electron-sandbox/gettingStarted","sql/workbench/browser/actions.contribution","sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerActions","sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerWidget.contribution","vs/editor/browser/widget/codeEditorContributions","vs/platform/actions/common/menuResetAction","vs/platform/keyboardLayout/common/keyboardConfig","vs/platform/quickinput/browser/helpQuickAccess","vs/platform/quickinput/browser/quickAccess","vs/platform/remote/common/electronRemoteResources","vs/platform/remote/common/managedSocket","vs/platform/remote/browser/browserSocketFactory","vs/platform/remote/electron-sandbox/electronRemoteResourceLoader","vs/platform/remote/electron-sandbox/remoteAuthorityResolverService","vs/platform/remote/electron-sandbox/sharedProcessTunnelService","vs/platform/remoteTunnel/electron-sandbox/remoteTunnelService","vs/platform/download/common/downloadService","vs/platform/request/browser/requestService","vs/platform/sharedProcess/common/sharedProcess","vs/platform/telemetry/common/errorTelemetry","vs/platform/telemetry/browser/errorTelemetry","sql/platform/telemetry/common/adsTelemetryService","vs/editor/browser/services/markerDecorations","vs/editor/browser/view/viewController","vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/editor/contrib/caretOperations/browser/caretOperations","vs/editor/contrib/caretOperations/browser/transpose","vs/editor/contrib/comment/browser/comment","vs/editor/contrib/cursorUndo/browser/cursorUndo","vs/editor/contrib/editorState/browser/keybindingCancellation","vs/editor/contrib/codeAction/browser/codeActionKeybindingResolver","vs/editor/contrib/fontZoom/browser/fontZoom","vs/editor/contrib/format/browser/formatActions","vs/editor/contrib/gotoSymbol/browser/symbolNavigation","vs/editor/contrib/lineSelection/browser/lineSelection","vs/editor/contrib/longLinesHelper/browser/longLinesHelper","vs/editor/contrib/readOnlyMessage/browser/contribution","vs/editor/contrib/tokenization/browser/tokenization","vs/editor/contrib/wordPartOperations/browser/wordPartOperations","vs/platform/actions/browser/buttonbar","vs/platform/telemetry/common/telemetryIpc","vs/platform/assignment/common/assignmentService","vs/platform/extensionManagement/common/extensionManagementCLI","vs/platform/extensionManagement/common/extensionTipsService","vs/platform/extensionManagement/common/unsupportedExtensionsMigration","vs/platform/externalServices/common/marketplace","vs/platform/telemetry/common/telemetryService","vs/platform/telemetry/electron-sandbox/customEndpointTelemetryService","vs/platform/terminal/common/capabilities/bufferMarkCapability","vs/platform/terminal/common/capabilities/cwdDetectionCapability","vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability","vs/platform/terminal/common/capabilities/partialCommandDetectionCapability","vs/platform/terminal/common/terminalDataBuffering","vs/platform/terminal/common/terminalRecorder","vs/platform/terminal/common/xterm/shellIntegrationAddon","sql/platform/theme/common/styler","vs/editor/browser/viewParts/minimap/minimap","vs/editor/browser/widget/diffEditorWidget2/colors","vs/editor/contrib/codeAction/browser/codeActionMenu","sql/workbench/browser/modal/optionsDialogHelper","sql/workbench/browser/modelComponents/button.component","sql/workbench/browser/modelComponents/checkbox.component","sql/workbench/browser/modelComponents/infoBox.component","sql/workbench/browser/modelComponents/inputbox.component","sql/workbench/browser/modelComponents/listbox.component","sql/workbench/browser/modelComponents/table.component","sql/workbench/contrib/charts/browser/tableInsight","sql/workbench/contrib/dashboard/browser/widgets/insights/views/tableInsight.component","sql/workbench/contrib/dashboard/browser/widgets/insights/views/tableInsight.contribution","sql/workbench/contrib/jobManagement/browser/alertsView.component","sql/workbench/contrib/jobManagement/browser/operatorsView.component","sql/workbench/contrib/jobManagement/browser/proxiesView.component","sql/workbench/contrib/notebook/browser/cellViews/stdin.component","sql/workbench/contrib/resourceViewer/browser/resourceViewerTable","vs/editor/contrib/gotoSymbol/browser/peek/referencesTree","vs/platform/actionWidget/browser/actionList","vs/editor/contrib/codeAction/browser/codeActionCommands","vs/editor/contrib/codeAction/browser/codeActionContributions","vs/platform/contextview/browser/contextMenuHandler","vs/editor/browser/widget/diffEditorWidget2/accessibleDiffViewer","vs/editor/contrib/colorPicker/browser/colorPickerWidget","vs/editor/contrib/parameterHints/browser/parameterHintsWidget","vs/editor/contrib/unicodeHighlighter/browser/bannerController","vs/platform/theme/browser/iconsStyleSheet","sql/workbench/browser/modelComponents/treeComponentRenderer","vs/editor/browser/controller/mouseHandler","vs/editor/browser/controller/pointerHandler","vs/editor/browser/viewParts/lines/viewLines","vs/platform/quickinput/browser/quickInput","vs/platform/quickinput/browser/quickInputController","sql/workbench/browser/designer/designerIssuesTabPanelView","sql/workbench/browser/modelComponents/declarativeTable.component","sql/workbench/browser/modelComponents/dropdown.component","sql/workbench/browser/modelComponents/hyperlink.component","sql/workbench/browser/modelComponents/radioCardGroup.component","sql/workbench/browser/modelComponents/text.component","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/doughnutChart.component","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/doughnutChart.contribution","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/pieChart.contribution","sql/workbench/contrib/executionPlan/browser/executionPlanPropertiesView","sql/workbench/contrib/executionPlan/browser/widgets/customZoomWidget","sql/workbench/contrib/notebook/browser/notebookViews/notebookViewsModal.component","sql/workbench/contrib/welcome/browser/az_data_welcome_page","sql/workbench/services/objectExplorer/browser/asyncServerTreeDataSource","sql/workbench/services/objectExplorer/browser/asyncServerTreeDragAndDrop","sql/workbench/services/objectExplorer/browser/serverTreeDataSource","sql/workbench/services/objectExplorer/browser/serverTreeController","vs/editor/browser/services/abstractCodeEditorService","vs/editor/browser/viewParts/editorScrollbar/editorScrollbar","vs/editor/browser/viewParts/selections/selections","vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors","sql/workbench/contrib/charts/browser/insight","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/horizontalBarChart.component","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/horizontalBarChart.contribution","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/lineChart.contribution","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/scatterChart.component","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/scatterChart.contribution","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/timeSeriesChart.component","sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/timeSeriesChart.contribution","vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/editor/browser/viewParts/indentGuides/indentGuides","vs/editor/browser/controller/textAreaHandler","vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler","vs/editor/browser/viewParts/viewCursors/viewCursors","vs/editor/browser/viewParts/whitespace/whitespace","vs/editor/browser/view","vs/editor/common/model/bracketPairsTextModelPart/colorizedBracketPairsDecorationProvider","vs/editor/common/services/markerDecorationsService","vs/editor/common/services/semanticTokensStylingService","vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess","vs/editor/contrib/rename/browser/renameInputField","vs/editor/contrib/rename/browser/rename","vs/editor/contrib/semanticTokens/browser/documentSemanticTokens","vs/editor/contrib/suggest/browser/suggestWidgetRenderer","vs/platform/quickinput/browser/quickInputService","sql/workbench/services/notebook/browser/models/notebookModel","sql/workbench/contrib/notebook/browser/find/notebookFindDecorations","vs/editor/browser/widget/diffEditorWidget2/diffEditorDecorations","vs/editor/common/services/modelService","vs/editor/common/services/modelUndoRedoParticipant","vs/editor/common/viewModel/viewModelLines","vs/editor/common/viewModel/viewModelImpl","vs/editor/browser/widget/diffEditorWidget2/renderLines","vs/editor/browser/widget/diffEditorWidget2/lineAlignment","vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.contribution","vs/editor/contrib/codelens/browser/codelensWidget","sql/workbench/contrib/notebook/browser/find/notebookFindWidget","sql/workbench/contrib/profiler/browser/profilerFindWidget","vs/editor/contrib/find/browser/findOptionsWidget","vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget","vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions","vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider","vs/editor/contrib/stickyScroll/browser/stickyScrollProvider","vs/editor/contrib/stickyScroll/browser/stickyScrollWidget","vs/platform/undoRedo/common/undoRedoService","vs/platform/update/common/update.config.contribution","vs/platform/update/common/updateIpc","vs/platform/uriIdentity/common/uriIdentityService","vs/platform/url/common/urlIpc","vs/platform/url/common/urlService","vs/platform/userData/common/fileUserDataProvider","vs/platform/userDataSync/common/extensionsMerge","vs/platform/userDataSync/common/globalStateMerge","vs/platform/userDataSync/common/userDataSyncLog","vs/platform/utilityProcess/common/utilityProcessWorkerService","vs/platform/webview/common/mimeTypes","vs/platform/webview/common/webviewPortMapping","vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution","vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel","vs/editor/contrib/suggest/browser/suggestModel","vs/platform/terminal/common/terminalLogService","vs/platform/extensionManagement/electron-sandbox/extensionsProfileScannerService","sql/platform/connection/common/connectionStore","sql/workbench/contrib/configuration/common/configurationUpgrader","vs/editor/contrib/codelens/browser/codeLensCache","vs/editor/contrib/suggest/browser/suggestInlineCompletions","vs/editor/contrib/gotoError/browser/gotoErrorWidget","vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget","vs/editor/contrib/hover/browser/markerHoverParticipant","vs/editor/contrib/inlayHints/browser/inlayHintsHover","vs/editor/contrib/inlayHints/browser/inlayHintsContribution","vs/editor/contrib/stickyScroll/browser/stickyScrollActions","vs/editor/contrib/stickyScroll/browser/stickyScrollContribution","vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider","vs/editor/contrib/colorPicker/browser/colorContributions","vs/editor/contrib/inlineCompletions/browser/commands","vs/editor/contrib/inlineCompletions/browser/hoverParticipant","vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution","vs/platform/actions/common/menuService","vs/platform/actions/common/actions.contribution","vs/platform/contextview/browser/contextMenuService","vs/platform/extensionManagement/common/extensionGalleryService","vs/platform/extensionResourceLoader/common/extensionResourceLoaderService","vs/editor/contrib/quickAccess/browser/commandsQuickAccess","vs/platform/storage/common/storageService","vs/platform/userDataProfile/electron-sandbox/userDataProfileStorageService","vs/platform/userDataSync/common/extensionsSync","vs/platform/userDataSync/common/globalStateSync","vs/platform/userDataSync/common/userDataSyncEnablementService","vs/platform/userDataSync/common/userDataSyncServiceIpc","vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/editor/editor.all","vs/workbench/api/common/extHostInitDataService","vs/workbench/api/common/extHostRpcService","vs/workbench/api/common/extHostWebviewMessaging","vs/workbench/browser/actions/helpActions","vs/workbench/browser/actions/listCommands","vs/workbench/browser/parts/dialogs/dialogHandler","vs/workbench/browser/parts/editor/tabFocus","vs/workbench/browser/parts/notifications/notificationsAlerts","vs/workbench/browser/actions/quickAccessActions","vs/workbench/common/dialogs","sql/workbench/browser/editor/resourceViewer/resourceViewerInput","sql/workbench/services/notebook/browser/interface","vs/workbench/browser/parts/notifications/notificationsViewer","sql/workbench/browser/modelComponents/propertiesContainer.component","sql/workbench/contrib/dashboard/browser/core/dashboardPanelStyles","sql/workbench/contrib/notebook/browser/calloutDialog/linkCalloutDialog","sql/workbench/contrib/notebook/browser/notebookViews/viewOptionsModal","sql/workbench/services/accountManagement/browser/autoOAuthDialog","sql/workbench/services/accountManagement/browser/autoOAuthDialogController","sql/workbench/services/backupRestoreUrlBrowser/browser/urlBrowserDialog","sql/workbench/services/backupRestoreUrlBrowser/browser/urlBrowserDialogService","sql/workbench/services/connection/browser/advancedPropertiesController","sql/workbench/services/connection/browser/passwordChangeDialog","sql/workbench/services/dashboard/browser/newDashboardTabDialogImpl","sql/workbench/services/dashboard/browser/newDashboardTabDialogService","sql/workbench/services/profiler/browser/profilerColumnEditorDialog","sql/workbench/services/profiler/browser/profilerFilterDialog","sql/workbench/services/resourceProvider/browser/firewallRuleDialog","sql/workbench/services/serverGroup/browser/serverGroupDialog","sql/workbench/services/serverGroup/browser/serverGroupController","sql/workbench/services/tableDesigner/browser/tableDesignerPublishDialog","vs/workbench/browser/parts/titlebar/commandCenterControl","sql/workbench/browser/modelComponents/treeDataSource","sql/workbench/contrib/dataExplorer/browser/nodeCommands.common","vs/workbench/contrib/accessibility/browser/unfocusedViewDimmingContribution","vs/workbench/contrib/bulkEdit/browser/bulkTextEdits","vs/workbench/contrib/callHierarchy/browser/callHierarchyTree","vs/workbench/contrib/chat/browser/chatAccessibilityService","vs/workbench/contrib/chat/browser/chatOptions","vs/workbench/contrib/codeActions/browser/codeActionsContribution","vs/workbench/contrib/codeActions/browser/documentationContribution","vs/workbench/contrib/codeEditor/browser/largeFileOptimizations","vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree","vs/workbench/contrib/codeEditor/browser/toggleColumnSelection","vs/workbench/contrib/codeEditor/browser/toggleMinimap","vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter","vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace","vs/workbench/contrib/codeEditor/browser/workbenchReferenceSearch","vs/workbench/contrib/codeEditor/electron-sandbox/inputClipboardActions","vs/workbench/contrib/commands/common/commands.contribution","vs/workbench/contrib/comments/browser/commentMenus","vs/workbench/contrib/comments/browser/commentThreadAdditionalActions","vs/workbench/contrib/comments/browser/commentThreadHeader","vs/workbench/contrib/comments/browser/commentThreadRangeDecorator","vs/workbench/contrib/comments/browser/reactionsAction","vs/workbench/contrib/customEditor/common/customEditorModelManager","vs/workbench/contrib/debug/browser/debugIcons","vs/workbench/contrib/debug/electron-sandbox/extensionHostDebugService","vs/workbench/contrib/editSessions/browser/editSessionsFileSystemProvider","vs/workbench/contrib/editSessions/common/editSessionsLogService","vs/workbench/contrib/editSessions/common/editSessionsStorageClient","sql/workbench/contrib/extensions/browser/staticRecommendations","vs/workbench/contrib/extensions/browser/configBasedRecommendations","vs/workbench/contrib/extensions/browser/exeBasedRecommendations","vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider","vs/workbench/contrib/extensions/browser/keymapRecommendations","vs/workbench/contrib/extensions/browser/languageRecommendations","vs/workbench/contrib/extensions/browser/remoteRecommendations","vs/workbench/contrib/files/common/explorerFileNestingTrie","vs/workbench/contrib/files/electron-sandbox/fileCommands","vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty","vs/workbench/contrib/localization/electron-sandbox/minimalTranslations","vs/workbench/contrib/mappedEdits/common/mappedEdits.contribution","vs/workbench/contrib/markdown/browser/markdownDocumentRenderer","vs/workbench/contrib/markers/browser/markersTable","vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController","vs/workbench/contrib/mergeEditor/browser/telemetry","vs/workbench/contrib/mergeEditor/browser/model/diffComputer","vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs","vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel","vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView","vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView","vs/workbench/contrib/mergeEditor/browser/view/fixedZoneWidget","vs/workbench/contrib/mergeEditor/browser/view/conflictActions","vs/workbench/contrib/mergeEditor/browser/view/lineAlignment","vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer","vs/workbench/contrib/mergeEditor/browser/view/viewModel","vs/workbench/contrib/mergeEditor/browser/view/viewZones","vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView","vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler","vs/workbench/contrib/notebook/browser/notebookLogger","vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl","vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations","vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer","vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus","vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars","vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput","vs/workbench/contrib/notebook/browser/view/notebookCellListView","vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads","vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping","vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions","vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection","vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher","vs/workbench/contrib/notebook/browser/viewModel/viewContext","vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar","vs/workbench/contrib/notebook/common/model/cellEdit","sql/workbench/contrib/assessment/common/htmlReportGenerator","sql/workbench/contrib/assessment/browser/asmtActions","sql/workbench/contrib/executionPlan/browser/executionPlanComparisonPropertiesView","sql/workbench/contrib/executionPlan/browser/widgets/highlightExpensiveNodeWidget","sql/workbench/services/connection/browser/cmsConnectionWidget","sql/workbench/services/connection/browser/cmsConnectionController","sql/workbench/services/errorMessage/browser/errorMessageService","sql/workbench/services/objectExplorer/browser/filterDialog/filterDialog","sql/workbench/contrib/azure/browser/azure.contribution","sql/workbench/contrib/dataExplorer/browser/nodeActions.common.contribution","sql/workbench/services/resourceProvider/browser/firewallRuleDialogController","sql/workbench/services/resourceProvider/browser/resourceProviderService","sql/workbench/services/restore/browser/restoreViewModel","sql/workbench/services/restore/browser/restoreDialog","sql/workbench/services/tableDesigner/browser/tableDesignerComponentInput","vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator","vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll","vs/workbench/contrib/notebook/common/model/notebookTextModel","vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar","vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution","vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar","vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon","vs/workbench/contrib/notebook/common/notebookKeymapService","vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl","vs/workbench/contrib/notebook/common/notebookOutputRenderer","vs/workbench/contrib/notebook/common/notebookPerformance","vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController","vs/workbench/contrib/notebook/browser/controller/apiActions","vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel","vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl","vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl","vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl","vs/workbench/contrib/outline/browser/outlineViewState","sql/workbench/contrib/preferences/browser/sqlSettingsLayout","vs/workbench/contrib/preferences/browser/settingsSearchMenu","vs/workbench/contrib/preferences/browser/settingsWidgets","vs/workbench/contrib/preferences/common/smartSnippetInserter","vs/workbench/contrib/remote/browser/urlFinder","vs/workbench/contrib/sash/browser/sash","vs/workbench/contrib/scm/browser/dirtyDiffSwitcher","vs/workbench/contrib/scm/common/quickDiffService","vs/workbench/contrib/scm/browser/menus","vs/workbench/contrib/scm/common/scmService","vs/workbench/contrib/search/browser/searchFindInput","vs/workbench/contrib/search/common/cacheState","vs/workbench/contrib/search/browser/searchActionsSymbol","vs/workbench/contrib/share/browser/shareService","vs/workbench/contrib/snippets/browser/commands/insertSnippet","vs/workbench/contrib/tags/common/javaWorkspaceTags","vs/workbench/contrib/tasks/common/taskTemplates","vs/workbench/contrib/terminal/browser/terminalCommands","vs/workbench/contrib/terminal/browser/terminalEditorSerializer","vs/workbench/contrib/terminal/browser/terminalEscapeSequences","vs/workbench/contrib/terminal/browser/terminalEvents","vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon","vs/workbench/contrib/terminal/browser/terminalProfileQuickpick","vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon","vs/workbench/contrib/terminal/common/terminalConfiguration","vs/workbench/contrib/terminal/electron-sandbox/localPty","vs/workbench/contrib/terminalContrib/accessibility/browser/bufferContentTracker","vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibilityHelp","vs/workbench/contrib/terminalContrib/accessibility/browser/textAreaSyncAddon","vs/workbench/contrib/terminalContrib/find/browser/terminalFindWidget","vs/workbench/contrib/terminalContrib/links/browser/terminalExternalLinkDetector","vs/workbench/contrib/terminalContrib/links/browser/terminalLink","vs/workbench/contrib/terminalContrib/links/browser/terminalLinkDetectorAdapter","vs/workbench/contrib/terminalContrib/links/browser/terminalLinkProviderService","vs/workbench/contrib/terminalContrib/links/browser/terminalLinkQuickpick","vs/workbench/contrib/terminalContrib/links/browser/terminalLinkResolver","vs/workbench/contrib/terminalContrib/links/browser/terminalLocalLinkDetector","vs/workbench/contrib/terminalContrib/links/browser/terminalMultiLineLinkDetector","vs/workbench/contrib/terminalContrib/links/browser/terminalUriLinkDetector","vs/workbench/contrib/terminalContrib/links/browser/terminalWordLinkDetector","vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixBuiltinActions","vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon","vs/workbench/contrib/terminalContrib/typeAhead/browser/terminal.typeAhead.contribution","vs/workbench/contrib/testing/common/testCoverage","vs/workbench/contrib/testing/common/testExclusions","vs/workbench/contrib/testing/browser/explorerProjections/testingObjectTree","vs/workbench/contrib/testing/common/mainThreadTestCollection","vs/workbench/contrib/testing/common/testItemCollection","vs/workbench/api/common/extHostTestingPrivateApi","vs/workbench/contrib/testing/browser/testingConfigurationUi","vs/workbench/contrib/testing/browser/explorerProjections/listProjection","vs/workbench/contrib/testing/browser/explorerProjections/treeProjection","vs/workbench/contrib/testing/browser/testingDecorations","vs/workbench/contrib/testing/common/testingContentProvider","vs/workbench/contrib/timeline/common/timelineService","vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree","vs/workbench/contrib/webview/browser/resourceLoading","sql/workbench/contrib/dashboard/browser/containers/dashboardWebviewContainer.component","sql/workbench/contrib/modelView/browser/webview.component","sql/workbench/contrib/webview/browser/webViewDialog","vs/workbench/contrib/webview/browser/overlayWebview","vs/workbench/contrib/webview/browser/webviewFindWidget","vs/workbench/contrib/webview/electron-sandbox/webviewCommands","vs/workbench/contrib/webview/electron-sandbox/windowIgnoreMenuShortcutsManager","vs/workbench/contrib/webviewView/browser/webviewView.contribution","vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils","vs/workbench/electron-sandbox/actions/installActions","vs/workbench/electron-sandbox/actions/windowActions","vs/workbench/electron-sandbox/parts/dialogs/dialogHandler","vs/workbench/services/aiRelatedInformation/common/aiRelatedInformationService","sql/platform/accounts/common/accountViewModel","sql/workbench/services/accountManagement/browser/accountPickerImpl","sql/workbench/services/accountManagement/browser/accountPickerService","vs/workbench/services/checksum/electron-sandbox/checksumService","vs/workbench/services/clipboard/electron-sandbox/clipboardService","vs/workbench/services/configuration/common/configurationCache","vs/workbench/services/configuration/browser/configuration","vs/workbench/services/configurationResolver/common/configurationResolverSchema","vs/workbench/services/configurationResolver/common/configurationResolverUtils","vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService","vs/workbench/services/contextmenu/electron-sandbox/contextmenuService","vs/workbench/services/credentials/electron-sandbox/credentialsService","vs/workbench/services/decorations/browser/decorationsService","sql/workbench/browser/parts/editor/editorStatusModeSelect","sql/workbench/contrib/backup/browser/backupActions","sql/workbench/contrib/backup/browser/backup.contribution","sql/workbench/contrib/query/browser/messagePanel","sql/workbench/contrib/commandLine/electron-sandbox/commandLine","sql/workbench/contrib/dashboard/browser/widgets/insights/actions","sql/workbench/contrib/executionPlan/browser/executionPlanTreeTab","sql/workbench/contrib/executionPlan/browser/topOperationsTab","sql/workbench/contrib/restore/browser/restoreActions","sql/workbench/contrib/restore/browser/restore.contribution","sql/workbench/services/connection/browser/recentConnectionTreeController","sql/workbench/services/profiler/browser/profilerService","sql/workbench/contrib/editData/browser/gridActions","sql/workbench/contrib/editData/browser/editDataGridActions","sql/workbench/contrib/editData/browser/gridParentComponent","sql/workbench/contrib/editData/browser/editDataGridPanel","sql/workbench/services/query/common/dataService","sql/workbench/services/editData/common/editQueryRunner","sql/workbench/services/insights/browser/insightsDialogController","sql/workbench/services/notebook/browser/outputs/tableRenderers","sql/workbench/services/notebook/browser/outputs/widgets","sql/workbench/services/notebook/browser/outputs/factories","sql/workbench/services/notebook/browser/sql/sqlExecuteManager","sql/workbench/services/notebook/browser/sql/sqlExecuteProvider","sql/workbench/services/query/common/queryModelService","vs/workbench/api/common/shared/editor","vs/workbench/browser/parts/editor/editorsObserver","vs/workbench/contrib/audioCues/browser/audioCueLineFeatureContribution","vs/workbench/contrib/bulkEdit/browser/conflicts","vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree","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/markers/browser/markersTreeViewer","vs/workbench/contrib/performance/browser/inputLatencyContrib","vs/workbench/contrib/snippets/browser/snippetCodeActionProvider","vs/workbench/contrib/terminal/common/remote/remoteTerminalChannel","vs/workbench/contrib/testing/common/testServiceImpl","vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek","vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution","vs/workbench/contrib/webview/browser/webview.contribution","vs/workbench/services/editor/browser/codeEditorService","vs/workbench/services/encryption/electron-sandbox/encryptionService","vs/workbench/contrib/url/browser/externalUriResolver","vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl","vs/workbench/contrib/webview/electron-sandbox/webviewElement","vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough","vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough","vs/workbench/services/dialogs/common/dialogService","vs/workbench/contrib/extensions/electron-sandbox/extensionsActions","vs/workbench/contrib/logs/electron-sandbox/logsActions","vs/workbench/contrib/logs/electron-sandbox/logs.contribution","vs/workbench/electron-sandbox/actions/developerActions","vs/workbench/services/extensionManagement/browser/builtinExtensionsScannerService","vs/workbench/contrib/extensions/browser/unsupportedExtensionsMigrationContribution","vs/workbench/contrib/extensions/browser/webRecommendations","vs/workbench/services/extensionManagement/electron-sandbox/extensionTipsService","vs/workbench/services/extensionManagement/electron-sandbox/extensionUrlTrustService","vs/workbench/contrib/extensions/browser/fileBasedRecommendations","vs/workbench/contrib/extensions/browser/workspaceRecommendations","vs/workbench/services/extensionRecommendations/common/extensionIgnoredRecommendationsService","vs/workbench/services/extensions/common/extensionDescriptionRegistry","vs/workbench/services/extensions/common/extensionHostEnv","vs/workbench/services/extensions/common/extensionStorageMigration","sql/workbench/services/contextualization/common/serverContextualizationService","sql/workbench/services/executionPlan/common/executionPlanService","vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint","vs/workbench/contrib/configExporter/electron-sandbox/configurationExportHelper","vs/workbench/contrib/extensions/browser/extensionsActivationProgress","vs/workbench/contrib/extensions/electron-sandbox/debugExtensionHostAction","vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl","vs/workbench/contrib/terminal/browser/environmentVariableInfo","vs/workbench/contrib/terminal/common/environmentVariableService","vs/workbench/contrib/terminal/common/environmentVariable.contribution","vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution","vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughActions","vs/workbench/services/commands/common/commandService","vs/workbench/services/extensions/browser/webWorkerExtensionHost","vs/workbench/services/extensions/common/extensionsProposedApi","sql/workbench/contrib/accounts/browser/accountManagement.contribution","sql/workbench/contrib/dashboard/browser/containers/dashboardContainer.contribution","sql/workbench/contrib/dashboard/browser/core/dashboardTab.contribution","sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerTable","sql/workbench/contrib/dashboard/browser/widgets/insights/insightsWidget.contribution","sql/workbench/contrib/resourceViewer/common/resourceViewerViewExtensionPoint","vs/workbench/api/common/configurationExtensionPoint","vs/workbench/api/common/jsonValidationExtensionPoint","vs/workbench/contrib/chat/common/chatServiceImpl","vs/workbench/contrib/notebook/browser/notebookExtensionPoint","vs/workbench/contrib/tasks/common/jsonSchema_v1","vs/workbench/contrib/tasks/browser/taskTerminalStatus","vs/workbench/contrib/tasks/common/jsonSchema_v2","vs/workbench/contrib/tasks/browser/runAutomaticTasks","vs/workbench/contrib/tasks/browser/tasksQuickAccess","vs/workbench/contrib/terminal/common/terminalExtensionPoints.contribution","vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixService","vs/workbench/contrib/editSessions/browser/editSessionsStorageService","vs/workbench/services/extensions/common/extensionsUtil","vs/workbench/services/extensions/common/lazyPromise","sql/workbench/api/browser/mainThreadAccountManagement","sql/workbench/api/browser/mainThreadAzureAccount","sql/workbench/api/browser/mainThreadAzureBlob","sql/workbench/api/browser/mainThreadConnectionManagement","sql/workbench/api/browser/mainThreadCredentialManagement","sql/workbench/api/browser/mainThreadDashboard","sql/workbench/api/browser/mainThreadDashboardWebview","sql/workbench/api/browser/mainThreadErrorDiagnostics","sql/workbench/api/browser/mainThreadExtensionManagement","sql/workbench/api/browser/mainThreadModalDialog","sql/workbench/api/browser/mainThreadModelView","sql/workbench/api/browser/mainThreadNotebook","sql/workbench/api/browser/mainThreadObjectExplorer","sql/workbench/api/browser/mainThreadPerf","sql/workbench/api/browser/mainThreadResourceProvider","sql/workbench/api/browser/mainThreadTasks","sql/workbench/api/browser/mainThreadWindow","sql/workbench/api/common/extHostBackgroundTaskManagement","vs/workbench/api/browser/mainThreadAiEmbeddingVector","vs/workbench/api/browser/mainThreadAiRelatedInformation","vs/workbench/api/browser/mainThreadAuthentication","vs/workbench/api/browser/mainThreadChat","vs/workbench/api/browser/mainThreadChatProvider","vs/workbench/api/browser/mainThreadChatSlashCommands","vs/workbench/api/browser/mainThreadChatVariables","vs/workbench/api/browser/mainThreadClipboard","vs/workbench/api/browser/mainThreadCommands","vs/workbench/api/browser/mainThreadConfiguration","vs/workbench/api/browser/mainThreadDecorations","vs/workbench/api/browser/mainThreadDiagnostics","vs/workbench/api/browser/mainThreadDialogs","vs/workbench/api/browser/mainThreadDocumentContentProviders","vs/workbench/api/browser/mainThreadDownloadService","vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant","vs/workbench/api/browser/mainThreadErrors","vs/workbench/api/browser/mainThreadInteractive","vs/workbench/api/browser/mainThreadKeytar","vs/workbench/api/browser/mainThreadLabelService","vs/workbench/api/browser/mainThreadLanguageFeatures","vs/workbench/api/browser/mainThreadLocalization","vs/workbench/api/browser/mainThreadLogService","vs/workbench/api/browser/mainThreadManagedSockets","vs/workbench/api/browser/mainThreadMessageService","vs/workbench/api/browser/mainThreadNotebook","vs/workbench/api/browser/mainThreadNotebookKernels","vs/workbench/api/browser/mainThreadNotebookRenderers","vs/workbench/api/browser/mainThreadProgress","vs/workbench/api/browser/mainThreadQuickDiff","vs/workbench/api/browser/mainThreadQuickOpen","vs/workbench/api/browser/mainThreadRemoteConnectionData","vs/workbench/api/browser/mainThreadSCM","vs/workbench/api/browser/mainThreadSecretState","vs/workbench/api/browser/mainThreadShare","vs/workbench/api/browser/mainThreadStorage","vs/workbench/api/browser/mainThreadTask","vs/workbench/api/browser/mainThreadTelemetry","vs/workbench/api/browser/mainThreadTesting","vs/workbench/api/browser/mainThreadTheming","vs/workbench/api/browser/mainThreadTimeline","sql/workbench/browser/modelComponents/treeViewDataProvider","sql/workbench/browser/modelComponents/tree.component","vs/workbench/api/browser/mainThreadCodeInsets","vs/workbench/api/browser/mainThreadWebviewViews","vs/workbench/api/common/extHostTunnelService","vs/workbench/services/extensions/common/remoteConsoleUtil","vs/workbench/api/browser/mainThreadConsole","vs/workbench/services/extensions/common/remoteExtensionHost","vs/workbench/services/extensions/common/rpcProtocol","vs/workbench/services/extensions/common/extensionHostManager","vs/workbench/services/extensions/electron-sandbox/extensionHostStarter","vs/workbench/api/browser/mainThreadFileSystem","vs/workbench/services/files/electron-sandbox/elevatedFileService","vs/workbench/services/files/electron-sandbox/watcherClient","vs/workbench/services/files/electron-sandbox/diskFileSystemProvider","vs/workbench/api/browser/mainThreadNotebookEditors","vs/workbench/contrib/notebook/browser/contrib/find/notebookFind","vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout","vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands","vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions","vs/workbench/contrib/notebook/browser/controller/insertCellActions","vs/workbench/contrib/notebook/browser/diff/diffElementOutputs","vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput","vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint","vs/workbench/contrib/notebook/browser/view/cellParts/markupCell","vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys","vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler","sql/workbench/contrib/telemetry/browser/telemetryOptOut","sql/workbench/contrib/telemetry/electron-sandbox/telemetryOptOut","sql/workbench/contrib/welcome/browser/abstractEnablePreviewFeatures","sql/workbench/contrib/welcome/browser/retirementAnnouncement","sql/workbench/contrib/welcome/electron-sandbox/enablePreviewFeatures","vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant","vs/workbench/contrib/extensions/browser/extensionsDependencyChecker","vs/workbench/contrib/files/browser/explorerService","vs/workbench/contrib/files/browser/workspaceWatcher","vs/workbench/services/host/electron-sandbox/nativeHostService","vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators","vs/workbench/contrib/terminal/browser/widgets/terminalHoverWidget","vs/workbench/contrib/terminalContrib/quickFix/browser/quickFixAddon","vs/workbench/services/hover/browser/hoverWidget","vs/workbench/services/hover/browser/hoverService","vs/workbench/api/browser/mainThreadIssueReporter","vs/workbench/contrib/extensions/common/reportExtensionIssueAction","vs/workbench/contrib/issue/common/issue.contribution","vs/workbench/services/issue/electron-sandbox/issueMainService","vs/workbench/services/keybinding/common/fallbackKeyboardMapper","vs/workbench/services/keybinding/common/keybindingIO","vs/workbench/services/keybinding/common/macLinuxKeyboardMapper","vs/workbench/services/keybinding/electron-sandbox/nativeKeyboardLayout","vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint","vs/workbench/contrib/codeActions/common/documentationExtensionPoint","vs/workbench/contrib/customEditor/common/extensionPoint","vs/workbench/services/languageDetection/browser/languageDetectionWorkerServiceImpl","vs/workbench/api/browser/mainThreadLanguages","sql/workbench/browser/actions/layoutActions","sql/workbench/contrib/charts/browser/configureChartDialog","sql/workbench/contrib/tasks/browser/tasksActions","vs/workbench/browser/parts/banner/bannerPart","vs/workbench/browser/parts/notifications/notificationsCenter","vs/workbench/contrib/splash/browser/partsSplash","vs/workbench/contrib/terminal/browser/terminalEditor","vs/workbench/contrib/webviewPanel/browser/webviewCommands","sql/workbench/services/tableDesigner/browser/tableDesignerService","sql/workbench/api/browser/mainThreadBackgroundTaskManagement","sql/workbench/api/browser/mainThreadDataProtocol","sql/workbench/contrib/tasks/common/tasksAction","sql/workbench/contrib/tasks/browser/tasksActionProvider","sql/workbench/services/restore/browser/restoreServiceImpl","vs/workbench/browser/parts/editor/editorGroupWatermark","vs/workbench/browser/parts/notifications/notificationsToasts","sql/workbench/contrib/commandLine/electron-sandbox/commandLine.contribution","sql/workbench/contrib/configuration/common/configurationUpgrader.contribution","sql/workbench/contrib/connection/common/connectionProviderExtension","sql/workbench/contrib/connection/common/connectionTreeProviderExentionPoint","sql/workbench/contrib/telemetry/common/telemetry.contribution","sql/workbench/contrib/telemetry/electron-sandbox/telemetryOptOut.contribution","sql/workbench/contrib/welcome/browser/retirementAnnouncement.contribution","sql/workbench/contrib/welcome/electron-sandbox/gettingStarted.contribution","vs/workbench/browser/actions/textInputActions","vs/workbench/contrib/bracketPairColorizer2Telemetry/browser/bracketPairColorizer2Telemetry.contribution","vs/workbench/contrib/chat/browser/contrib/chatHistoryVariables","vs/workbench/contrib/codeActions/browser/codeActions.contribution","vs/workbench/contrib/codeEditor/browser/editorFeatures","vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier","vs/workbench/contrib/codeEditor/electron-sandbox/displayChangeRemeasureFonts","vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard","vs/workbench/contrib/codeEditor/electron-sandbox/sleepResumeRepaintMinimap","vs/workbench/contrib/configExporter/electron-sandbox/configurationExportHelper.contribution","vs/workbench/contrib/contextmenu/browser/contextmenu.contribution","vs/workbench/contrib/deprecatedExtensionMigrator/browser/deprecatedExtensionMigrator.contribution","vs/workbench/contrib/externalTerminal/electron-sandbox/externalTerminal.contribution","vs/workbench/contrib/folding/browser/folding.contribution","vs/workbench/contrib/format/browser/formatActionsMultiple","vs/workbench/contrib/issue/electron-sandbox/issue.contribution","vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution","vs/workbench/contrib/list/browser/list.contribution","vs/workbench/contrib/markers/browser/markersFileDecorations","vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders","vs/workbench/contrib/notebook/browser/contrib/format/formatting","vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted","vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection","vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider","vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo","vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl","vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup","vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart","vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl","vs/workbench/contrib/relauncher/browser/relauncher.contribution","vs/workbench/contrib/splash/electron-sandbox/splash.contribution","vs/workbench/contrib/surveys/browser/nps.contribution","vs/workbench/contrib/terminal/browser/terminalEditorService","vs/workbench/contrib/terminal/browser/xterm/decorationAddon","vs/workbench/contrib/webviewPanel/browser/webviewIconManager","vs/workbench/api/browser/mainThreadWebviewPanels","vs/workbench/contrib/welcomeViews/common/newFile.contribution","vs/workbench/contrib/welcomeViews/common/viewsWelcome.contribution","vs/workbench/electron-sandbox/parts/dialogs/dialog.contribution","vs/workbench/services/accessibility/electron-sandbox/accessibilityService","vs/workbench/api/browser/mainThreadUrls","vs/workbench/services/extensions/electron-sandbox/localProcessExtensionHost","vs/workbench/services/integrity/electron-sandbox/integrityService","vs/workbench/services/lifecycle/common/lifecycleService","vs/workbench/services/lifecycle/electron-sandbox/lifecycleService","vs/workbench/contrib/localization/common/localizationsActions","vs/workbench/contrib/localization/common/localization.contribution","vs/workbench/services/localization/electron-sandbox/languagePackService","vs/workbench/contrib/keybindings/browser/keybindings.contribution","vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard","vs/workbench/services/log/electron-sandbox/logService","vs/workbench/services/menubar/electron-sandbox/menubarService","vs/workbench/services/notification/common/notificationService","vs/workbench/browser/parts/editor/breadcrumbsModel","vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline","vs/workbench/services/outline/browser/outlineService","vs/workbench/api/browser/mainThreadOutputService","vs/workbench/contrib/logs/common/logsActions","vs/workbench/contrib/logs/common/logs.contribution","vs/workbench/contrib/output/browser/outputLinkProvider","vs/workbench/contrib/output/common/outputChannelModel","vs/workbench/contrib/output/browser/outputServices","sql/workbench/contrib/extensions/browser/extensions.contribution","sql/workbench/contrib/extensions/browser/scenarioRecommendations","sql/workbench/contrib/tsgops/browser/tsgopsActions","sql/workbench/contrib/tsgops/browser/tsgops.contribution","sql/workbench/services/connection/browser/connectionManagementService","vs/workbench/browser/actions/navigationActions","vs/workbench/browser/parts/sidebar/sidebarActions","vs/workbench/contrib/extensions/browser/extensionsQuickAccess","vs/workbench/contrib/format/browser/formatActionsNone","vs/workbench/contrib/localization/electron-sandbox/localization.contribution","vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl","vs/workbench/contrib/quickaccess/browser/viewQuickAccess","vs/workbench/services/activity/browser/activityService","vs/workbench/contrib/audioCues/browser/commands","vs/workbench/contrib/audioCues/browser/audioCues.contribution","vs/workbench/contrib/notebook/browser/controller/layoutActions","vs/workbench/contrib/preferences/browser/preferencesActions","vs/workbench/contrib/preferences/browser/preferencesSearch","vs/workbench/contrib/remoteTunnel/electron-sandbox/remoteTunnel.contribution","vs/workbench/electron-sandbox/parts/titlebar/menubarControl","vs/workbench/contrib/userDataSync/browser/userDataSyncTrigger","sql/workbench/contrib/resourceViewer/browser/resourceViewerView","sql/workbench/contrib/tasks/browser/tasksView","vs/workbench/contrib/comments/browser/commentsViewActions","vs/workbench/contrib/outline/browser/outlineActions","vs/workbench/contrib/outline/browser/outlinePane","vs/workbench/contrib/scm/browser/scmRepositoriesViewPane","vs/workbench/contrib/webviewView/browser/webviewViewPane","vs/workbench/services/quickinput/browser/quickInputService","vs/workbench/services/remote/common/remoteAgentEnvironmentChannel","vs/workbench/api/browser/mainThreadTerminalService","vs/workbench/browser/workbench.contribution","vs/workbench/contrib/codeEditor/browser/accessibility/accessibility","vs/workbench/contrib/codeEditor/browser/editorSettingsMigration","vs/workbench/contrib/externalUriOpener/common/contributedOpeners","vs/workbench/api/browser/mainThreadUriOpeners","vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution","vs/workbench/api/browser/mainThreadInlineChat","vs/workbench/contrib/inlineChat/common/inlineChatServiceImpl","vs/workbench/contrib/sash/browser/sash.contribution","vs/workbench/contrib/share/browser/share.contribution","vs/workbench/contrib/terminal/browser/remotePty","vs/workbench/contrib/terminal/browser/terminalProfileResolverService","vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick","vs/workbench/contrib/terminal/electron-sandbox/terminalProfileResolverService","vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile","vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar","vs/workbench/contrib/surveys/browser/ces.contribution","vs/workbench/browser/parts/editor/editorConfiguration","vs/workbench/contrib/customEditor/common/contributedCustomEditors","vs/workbench/services/editor/browser/editorResolverService","vs/workbench/services/issue/electron-sandbox/issueService","sql/workbench/contrib/notebook/browser/calloutDialog/imageCalloutDialog","sql/workbench/contrib/notebook/browser/cellViews/markdownToolbar.component","vs/workbench/contrib/terminal/browser/terminalProcessManager","vs/workbench/services/configurationResolver/electron-sandbox/configurationResolverService","vs/workbench/contrib/remote/electron-sandbox/remote.contribution","vs/workbench/services/dialogs/browser/abstractFileDialogService","vs/workbench/services/dialogs/electron-sandbox/fileDialogService","vs/workbench/services/label/common/labelService","vs/workbench/services/model/common/modelService","vs/workbench/services/path/electron-sandbox/pathService","vs/workbench/services/remote/common/remoteFileSystemProviderClient","vs/workbench/api/browser/mainThreadTunnelService","vs/workbench/contrib/remote/browser/tunnelView","vs/workbench/services/request/electron-sandbox/requestService","vs/workbench/services/search/common/ignoreFile","vs/workbench/services/search/common/replace","vs/workbench/api/browser/mainThreadSearch","vs/workbench/contrib/search/browser/notebookSearchService","vs/workbench/services/history/browser/historyService","vs/workbench/contrib/terminalContrib/links/browser/terminalLinkOpeners","vs/workbench/contrib/terminalContrib/links/browser/terminalLinkManager","vs/workbench/services/search/common/searchService","vs/workbench/services/search/electron-sandbox/searchService","vs/workbench/services/secrets/electron-sandbox/secretStorageService","vs/workbench/services/sharedProcess/electron-sandbox/sharedProcessService","sql/workbench/contrib/connection/browser/connectionStatus","sql/workbench/contrib/query/browser/flavorStatus","sql/workbench/contrib/query/browser/statusBarItems","vs/workbench/api/browser/mainThreadStatusBar","vs/workbench/browser/parts/editor/accessibilityStatus","vs/workbench/browser/parts/notifications/notificationsStatus","vs/workbench/browser/parts/statusbar/statusbarActions","vs/workbench/browser/parts/statusbar/statusbarItem","vs/workbench/browser/parts/statusbar/statusbarModel","vs/workbench/contrib/extensions/electron-sandbox/extensionProfileService","vs/workbench/contrib/languageDetection/browser/languageDetection.contribution","vs/workbench/contrib/languageStatus/browser/languageStatus.contribution","vs/workbench/contrib/scm/browser/activity","vs/workbench/contrib/terminal/browser/remoteTerminalBackend","vs/workbench/contrib/terminal/electron-sandbox/localTerminalBackend","vs/workbench/services/progress/browser/progressService","vs/workbench/services/storage/electron-sandbox/storageService","vs/workbench/services/suggest/browser/simpleCompletionItem","vs/workbench/services/suggest/browser/simpleCompletionModel","vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer","vs/workbench/services/suggest/browser/simpleSuggestWidget","vs/workbench/contrib/terminal/browser/xterm/suggestAddon","vs/workbench/contrib/testing/browser/testingOutputPeek","vs/workbench/services/telemetry/common/workbenchCommonProperties","vs/workbench/services/telemetry/electron-sandbox/telemetryService","vs/workbench/contrib/terminal/browser/terminalMainContribution","vs/workbench/services/textMate/browser/arrayOperation","vs/workbench/services/textMate/browser/backgroundTokenization/textMateWorkerTokenizerController","vs/workbench/services/textMate/browser/backgroundTokenization/threadedBackgroundTokenizerFactory","vs/workbench/contrib/codeEditor/electron-sandbox/startDebugTextMate","vs/workbench/contrib/codeEditor/electron-sandbox/codeEditor.contribution","vs/workbench/services/textMate/browser/tokenizationSupport/textMateTokenizationSupport","vs/workbench/services/textMate/browser/tokenizationSupport/tokenizationSupportWithLineLimit","vs/workbench/services/textMate/common/TMGrammars","vs/workbench/services/textMate/common/TMScopeRegistry","vs/workbench/services/textMate/common/TMGrammarFactory","vs/workbench/services/textfile/common/textFileSaveParticipant","sql/workbench/api/browser/mainThreadNotebookDocumentsAndEditors","sql/workbench/contrib/executionPlan/browser/executionPlanComparisonEditorView","sql/workbench/contrib/executionPlan/browser/executionPlanComparisonEditor","vs/workbench/api/browser/mainThreadSaveParticipant","sql/workbench/services/fileBrowser/browser/fileBrowserRenderer","sql/workbench/browser/modelComponents/fileBrowserTree.component","sql/workbench/services/fileBrowser/browser/fileBrowserDialog","sql/workbench/services/fileBrowser/browser/fileBrowserDialogController","sql/workbench/services/connection/browser/connectionBrowseTab","sql/workbench/contrib/connection/browser/connection.contribution","sql/workbench/contrib/dashboard/browser/dashboardActions","sql/workbench/services/connection/browser/connectionDialogWidget","sql/workbench/services/connection/browser/connectionDialogService","vs/workbench/browser/parts/editor/breadcrumbsPicker","vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane","vs/workbench/contrib/customEditor/common/customTextEditorModel","vs/workbench/contrib/externalTerminal/browser/externalTerminal.contribution","vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget","vs/workbench/contrib/inlineChat/browser/inlineChatStrategies","vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel","vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer","vs/workbench/contrib/codeEditor/browser/saveParticipants","vs/workbench/contrib/format/browser/format.contribution","vs/workbench/contrib/surveys/browser/languageSurveys.contribution","vs/workbench/contrib/tags/electron-sandbox/tags.contribution","vs/workbench/contrib/tags/electron-sandbox/workspaceTagsService","vs/workbench/contrib/tasks/browser/task.contribution","vs/workbench/contrib/tasks/electron-sandbox/taskService","vs/workbench/contrib/terminal/browser/terminalTabsList","vs/workbench/contrib/terminal/browser/terminalTabbedView","vs/workbench/contrib/url/browser/trustedDomainsFileSystemProvider","vs/workbench/contrib/url/browser/trustedDomainsValidator","vs/workbench/contrib/url/browser/url.contribution","vs/workbench/contrib/workspaces/browser/workspaces.contribution","vs/workbench/services/configuration/common/jsonEditingService","vs/workbench/services/localization/electron-sandbox/localeService","vs/workbench/services/textresourceProperties/common/textResourcePropertiesService","vs/workbench/services/themes/common/colorExtensionPoint","vs/workbench/services/themes/common/iconExtensionPoint","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","sql/workbench/browser/modelComponents/listView.component","sql/workbench/browser/modelComponents/tabbedPanel.component","sql/workbench/contrib/assessment/browser/asmtResultsView.component","sql/workbench/contrib/backup/browser/backup.module","sql/workbench/contrib/backup/browser/backupDialog","sql/workbench/contrib/backup/browser/backupUiService","sql/workbench/contrib/dashboard/browser/pages/databaseDashboardPage.component","sql/workbench/contrib/dashboard/browser/pages/serverDashboardPage.component","sql/workbench/contrib/dashboard/browser/containers/dashboardGridContainer.component","angular2-grid","sql/workbench/contrib/dashboard/browser/containers/dashboardHomeContainer.component","sql/workbench/contrib/jobManagement/browser/jobStepsView.component","sql/workbench/contrib/jobManagement/browser/jobsView.component","sql/workbench/contrib/jobManagement/browser/notebooksView.component","sql/workbench/contrib/dashboard/browser/dashboard.module","sql/workbench/contrib/dashboard/browser/dashboardEditor","sql/workbench/contrib/notebook/browser/notebookViews/insertCellsScreenshots.component","sql/workbench/contrib/notebook/browser/notebookViews/insertCellsModal.module","sql/workbench/contrib/profiler/browser/profilerTableEditor","sql/workbench/contrib/resourceViewer/browser/resourceViewerEditor","sql/workbench/contrib/query/browser/modelViewTab/queryModelViewTab.module","sql/workbench/contrib/query/browser/modelViewTab/queryModelViewTab","sql/workbench/browser/modelComponents/modelViewEditor","sql/workbench/services/dialog/browser/dialogModal","sql/workbench/services/dialog/browser/wizardModal","sql/workbench/services/dialog/browser/customDialogService","sql/workbench/api/browser/mainThreadModelViewDialog","vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens","vs/workbench/contrib/themes/browser/themes.test.contribution","vs/workbench/contrib/webview/browser/themeing","vs/workbench/contrib/webview/browser/webviewService","vs/workbench/contrib/webview/electron-sandbox/webviewService","vs/workbench/contrib/webview/electron-sandbox/webview.contribution","vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl","vs/workbench/services/textMate/browser/textMateTokenizationFeature.contribution","vs/workbench/contrib/themes/browser/themes.contribution","vs/workbench/services/themes/common/colorThemeData","vs/workbench/services/themes/common/themeConfiguration","vs/workbench/services/themes/common/themeExtensionPoints","vs/workbench/services/themes/electron-sandbox/nativeHostColorSchemeService","vs/workbench/api/browser/mainThreadExtensionService","vs/workbench/contrib/extensions/electron-sandbox/extensionsAutoProfiler","vs/workbench/contrib/performance/browser/performance.contribution","vs/workbench/contrib/performance/browser/startupTimings","vs/workbench/contrib/performance/electron-sandbox/rendererAutoProfiler","vs/workbench/contrib/performance/electron-sandbox/startupProfiler","vs/workbench/contrib/performance/electron-sandbox/startupTimings","vs/workbench/contrib/performance/electron-sandbox/performance.contribution","vs/workbench/services/timer/electron-sandbox/timerService","vs/workbench/services/tunnel/electron-sandbox/tunnelService","sql/workbench/contrib/query/browser/queryEditorFactory","vs/workbench/services/update/electron-sandbox/updateService","vs/workbench/services/url/electron-sandbox/urlService","vs/workbench/services/userActivity/browser/domActivityTracker","vs/workbench/services/userActivity/browser/userActivityBrowser","vs/workbench/api/browser/mainThreadWindow","vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress","vs/workbench/contrib/extensions/browser/extensionRecommendationsService","vs/workbench/services/themes/browser/workbenchThemeService","vs/workbench/api/browser/mainThreadProfilContentHandlers","vs/workbench/browser/parts/titlebar/windowTitle","vs/workbench/browser/parts/titlebar/titlebarPart","vs/workbench/contrib/preferences/browser/keybindingsEditorContribution","vs/workbench/contrib/preferences/browser/preferencesRenderers","vs/workbench/contrib/preferences/browser/preferencesEditor","vs/workbench/contrib/preferences/browser/tocTree","vs/workbench/contrib/snippets/browser/commands/configureSnippets","vs/workbench/contrib/accessibility/browser/accessibility.contribution","vs/workbench/contrib/codeEditor/browser/diffEditorHelper","vs/workbench/contrib/comments/browser/commentNode","vs/workbench/contrib/comments/browser/commentThreadBody","vs/workbench/contrib/comments/browser/commentThreadZoneWidget","vs/workbench/contrib/comments/browser/commentsEditorContribution","vs/workbench/contrib/comments/browser/comments.contribution","vs/workbench/contrib/comments/browser/commentsView","vs/workbench/contrib/inlineChat/browser/inlineChatWidget","vs/workbench/contrib/chat/browser/actions/chatCodeblockActions","vs/workbench/contrib/chat/browser/actions/chatCopyActions","vs/workbench/contrib/chat/browser/actions/chatFileTreeActions","vs/workbench/contrib/chat/browser/actions/chatImportExport","vs/workbench/contrib/chat/browser/actions/chatTitleActions","vs/workbench/contrib/inlineChat/browser/inlineChatActions","vs/workbench/contrib/inlineChat/browser/inlineChatNotebook","vs/workbench/contrib/inlineChat/browser/inlineChat.contribution","vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar","vs/workbench/contrib/notebook/browser/controller/executeActions","vs/workbench/contrib/notebook/browser/diff/diffComponents","vs/workbench/contrib/notebook/browser/diff/notebookDiffList","vs/workbench/contrib/notebook/browser/notebookAccessibility","vs/workbench/contrib/notebook/browser/view/cellParts/cellComments","vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput","vs/workbench/contrib/notebook/browser/view/cellParts/codeCell","vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer","vs/workbench/contrib/interactive/browser/interactiveEditor","vs/workbench/contrib/notebook/browser/diff/notebookDiffActions","vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl","vs/workbench/contrib/quickaccess/browser/commandsQuickAccess","vs/workbench/contrib/quickaccess/browser/quickAccess.contribution","vs/workbench/contrib/search/browser/notebookSearchContributions","vs/workbench/contrib/search/browser/replaceContributions","sql/workbench/contrib/notebook/browser/notebookExplorer/notebookSearchWidget","vs/workbench/contrib/search/browser/searchActionsCopy","vs/workbench/contrib/search/browser/searchActionsRemoveReplace","vs/workbench/contrib/search/browser/searchActionsTopBar","vs/workbench/contrib/search/browser/searchResultsView","vs/workbench/contrib/snippets/browser/snippets.contribution","vs/workbench/contrib/telemetry/browser/telemetry.contribution","vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibleWidget","vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibleBuffer","vs/workbench/contrib/testing/browser/testingExplorerFilter","vs/workbench/contrib/testing/browser/testingExplorerView","vs/workbench/contrib/userDataProfile/browser/userDataProfile","vs/workbench/contrib/userDataProfile/browser/userDataProfileActions","vs/workbench/contrib/userDataProfile/browser/userDataProfilePreview","vs/workbench/contrib/userDataProfile/browser/userDataProfile.contribution","vs/workbench/electron-sandbox/parts/titlebar/titlebarPart","vs/workbench/services/configuration/common/configurationEditing","vs/workbench/services/configuration/browser/configurationService","vs/workbench/services/extensionManagement/electron-sandbox/nativeExtensionManagementService","vs/workbench/services/extensions/electron-sandbox/cachedExtensionScanner","vs/workbench/services/extensions/electron-sandbox/extensionsScannerService","vs/workbench/services/issue/browser/issueTroubleshoot","vs/workbench/services/keybinding/browser/keybindingService","vs/workbench/contrib/preferences/browser/keybindingsEditor","vs/workbench/services/remote/common/abstractRemoteAgentService","vs/workbench/services/remote/electron-sandbox/remoteAgentService","vs/workbench/services/title/electron-sandbox/titleService","vs/workbench/services/userDataProfile/browser/extensionsResource","vs/workbench/services/userDataProfile/browser/userDataProfileManagement","vs/workbench/services/extensionManagement/common/remoteExtensionManagementService","vs/workbench/services/remote/common/remoteExtensionsScanner","vs/workbench/services/userDataProfile/common/userDataProfileService","vs/workbench/services/userDataSync/browser/userDataSyncEnablementService","vs/workbench/contrib/preferences/browser/settingsEditor2","vs/workbench/contrib/update/browser/update","vs/workbench/contrib/update/browser/update.contribution","vs/workbench/contrib/userDataSync/electron-sandbox/userDataSync.contribution","vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService","vs/workbench/services/userDataSync/common/userDataSyncUtil","vs/workbench/services/userDataSync/electron-sandbox/userDataAutoSyncService","vs/workbench/services/userDataSync/electron-sandbox/userDataSyncAccountService","vs/workbench/services/userDataSync/electron-sandbox/userDataSyncMachinesService","vs/workbench/services/userDataSync/electron-sandbox/userDataSyncService","vs/workbench/services/userDataSync/electron-sandbox/userDataSyncStoreManagementService","vs/workbench/services/views/common/treeViewsService","vs/workbench/services/views/common/viewContainerModel","vs/workbench/contrib/chat/electron-sandbox/actions/voiceChatActions","vs/workbench/contrib/chat/electron-sandbox/chat.contribution","vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant","vs/workbench/contrib/searchEditor/browser/searchEditorModel","vs/workbench/services/workingCopy/common/workingCopyBackupTracker","vs/workbench/contrib/files/browser/editors/textFileEditorTracker","vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant","vs/workbench/browser/actions/developerActions","vs/workbench/browser/contextkeys","sql/workbench/browser/modelComponents/modelViewEditor.contribution","sql/workbench/contrib/dashboard/browser/dashboard.contribution","vs/workbench/browser/parts/editor/editorAutoSave","vs/workbench/browser/parts/editor/editorPanes","sql/workbench/browser/modelComponents/editor.component","sql/workbench/contrib/profiler/browser/profilerResourceEditor","sql/workbench/browser/modelComponents/diffeditor.component","vs/workbench/contrib/codeEditor/browser/untitledTextEditorHint/untitledTextEditorHint","vs/workbench/contrib/codeEditor/browser/codeEditor.contribution","vs/workbench/contrib/files/browser/editors/binaryFileEditor","vs/workbench/contrib/files/common/dirtyFilesIndicator","vs/workbench/contrib/interactive/browser/interactive.contribution","vs/workbench/contrib/mergeEditor/browser/commands/commands","vs/workbench/contrib/mergeEditor/browser/commands/devCommands","vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution","vs/workbench/contrib/mergeEditor/electron-sandbox/devCommands","vs/workbench/contrib/mergeEditor/electron-sandbox/mergeEditor.contribution","vs/workbench/contrib/output/browser/logViewer","vs/workbench/contrib/search/browser/anythingQuickAccess","vs/workbench/contrib/searchEditor/browser/searchEditor","vs/workbench/contrib/search/browser/searchActionsNav","vs/workbench/contrib/searchEditor/browser/searchEditor.contribution","vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution","vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution","vs/workbench/services/textmodelResolver/common/textModelResolverService","sql/workbench/browser/designer/designerScriptEditor","sql/workbench/browser/designer/designerScriptEditorTabPanelView","sql/workbench/browser/designer/designer","sql/workbench/contrib/notebook/browser/notebook.component","sql/workbench/contrib/notebook/browser/notebookViews/insertCellsModal","sql/workbench/contrib/notebook/browser/notebookViews/notebookViewsCodeCell.component","sql/workbench/contrib/notebook/browser/notebookViews/notebookViews.component","sql/workbench/contrib/notebook/browser/notebook.module","sql/workbench/contrib/notebook/browser/find/notebookFindModel","sql/workbench/contrib/notebook/browser/models/diffNotebookInput","sql/workbench/contrib/notebook/browser/models/notebookEditorFactory","sql/workbench/contrib/profiler/browser/profiler.contribution","sql/workbench/contrib/profiler/browser/profilerActions.contribution","sql/workbench/contrib/tableDesigner/browser/tableDesignerEditor","sql/workbench/contrib/tableDesigner/browser/tableDesigner.contribution","sql/workbench/contrib/charts/browser/actions","sql/workbench/contrib/charts/browser/chartTab","sql/workbench/contrib/executionPlan/browser/executionPlanView","sql/workbench/browser/modelComponents/executionPlan.component","sql/workbench/contrib/executionPlan/browser/executionPlanContribution","sql/workbench/contrib/executionPlan/browser/executionPlanTab","sql/workbench/contrib/modelView/browser/components.contribution","sql/workbench/contrib/notebook/browser/outputs/gridOutput.component","sql/workbench/contrib/query/browser/queryResultsView","sql/workbench/contrib/editData/browser/editDataResultsEditor","sql/workbench/contrib/editData/browser/editData.contribution","sql/workbench/contrib/notebook/browser/notebookStyles","sql/workbench/contrib/notebook/browser/notebookThemingContribution","sql/workbench/api/browser/mainThreadQueryEditor","sql/workbench/contrib/query/browser/keyboardQueryActions","sql/workbench/contrib/query/browser/query.contribution","sql/workbench/services/notebook/browser/notebookServiceImpl","sql/workbench/services/queryEditor/browser/queryEditorService","vs/workbench/api/browser/mainThreadEditorTabs","vs/workbench/contrib/customEditor/browser/customEditorInputFactory","vs/workbench/contrib/customEditor/browser/customEditors","vs/workbench/contrib/customEditor/browser/customEditor.contribution","vs/workbench/contrib/localHistory/browser/localHistoryTimeline","vs/workbench/contrib/localHistory/browser/localHistory.contribution","vs/workbench/contrib/localHistory/electron-sandbox/localHistoryCommands","vs/workbench/contrib/localHistory/electron-sandbox/localHistory.contribution","vs/workbench/contrib/timeline/browser/timelinePane","vs/workbench/contrib/files/browser/editors/fileEditorHandler","vs/workbench/contrib/preferences/common/preferencesContribution","vs/workbench/services/editor/browser/editorService","vs/workbench/services/preferences/browser/preferencesService","vs/workbench/services/untitled/common/untitledTextEditorHandler","vs/workbench/services/userDataProfile/browser/globalStateResource","vs/workbench/services/userDataProfile/browser/keybindingsResource","vs/workbench/services/userDataProfile/browser/settingsResource","vs/workbench/services/userDataProfile/browser/snippetsResource","vs/workbench/services/userDataProfile/browser/tasksResource","vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager","vs/workbench/api/browser/mainThreadCustomEditors","vs/workbench/api/browser/mainThreadDocumentsAndEditors","vs/workbench/api/browser/mainThreadFileSystemEventService","vs/workbench/api/browser/mainThreadNotebookDocuments","vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors","vs/workbench/api/browser/mainThreadNotebookSaveParticipant","vs/workbench/api/browser/mainThreadWebviewManager","vs/workbench/contrib/bulkEdit/browser/bulkFileEdits","vs/workbench/contrib/bulkEdit/browser/bulkEditService","vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants","vs/workbench/services/textfile/common/textFileEditorModelManager","vs/workbench/services/textfile/browser/textFileService","vs/workbench/services/textfile/electron-sandbox/nativeTextFileService","vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager","vs/workbench/services/workingCopy/common/fileWorkingCopyManager","vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl","vs/workbench/services/workingCopy/common/workingCopyHistoryTracker","vs/workbench/services/workingCopy/common/workingCopyHistoryService","vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupTracker","vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupService","vs/workbench/services/workingCopy/electron-sandbox/workingCopyHistoryService","vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService","vs/workbench/services/workspaces/browser/workspaceTrustEditorInput","vs/workbench/services/workspaces/common/canonicalUriService","vs/workbench/services/workspaces/common/editSessionIdentityService","sql/workbench/api/browser/mainThreadWorkspace","sql/workbench/api/browser/extensionHost.contribution","vs/workbench/api/browser/mainThreadWorkspace","sql/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/editor/editor.contribution","vs/workbench/browser/parts/statusbar/statusbarPart","sql/workbench/contrib/views/browser/treeView","sql/workbench/contrib/dataExplorer/browser/dataExplorerExtensionPoint","sql/workbench/contrib/dataExplorer/browser/dataExplorer.contribution","sql/workbench/contrib/resourceDeployment/browser/resourceDeployment.contribution","sql/workbench/contrib/resourceViewer/browser/resourceViewerViewlet","sql/workbench/contrib/resourceViewer/browser/resourceViewer.contribution","sql/workbench/contrib/scripting/browser/scriptingActions","sql/workbench/contrib/scripting/browser/scripting.contribution","sql/workbench/contrib/tasks/browser/tasks.contribution","sql/workbench/services/accountManagement/browser/accountDialog","sql/workbench/services/accountManagement/browser/accountDialogController","sql/workbench/services/accountManagement/browser/accountManagementService","sql/workbench/services/insights/browser/insightsDialogView","sql/workbench/services/insights/browser/insightsDialogServiceImpl","vs/workbench/api/browser/mainThreadComments","vs/workbench/browser/layout","vs/workbench/browser/parts/paneCompositePart","vs/workbench/browser/parts/views/viewsViewlet","vs/workbench/browser/workbench","vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution","vs/workbench/contrib/editSessions/browser/editSessionsViews","vs/workbench/contrib/files/browser/views/emptyView","vs/workbench/contrib/files/browser/views/explorerDecorationsProvider","vs/workbench/contrib/chat/browser/chatListRenderer","vs/workbench/contrib/chat/browser/chatEditor","vs/workbench/contrib/chat/browser/chatQuick","vs/workbench/contrib/chat/browser/chatViewPane","vs/workbench/contrib/chat/browser/chatContributionServiceImpl","vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib","vs/workbench/contrib/chat/browser/chat.contribution","vs/workbench/contrib/files/browser/fileCommands","vs/workbench/contrib/files/browser/files.contribution","vs/workbench/contrib/files/electron-sandbox/fileActions.contribution","vs/workbench/contrib/markers/browser/markersView","vs/workbench/contrib/markers/browser/markers.contribution","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/remoteExplorer","vs/workbench/contrib/scm/browser/scmViewPane","vs/workbench/contrib/scm/browser/scmViewPaneContainer","vs/workbench/contrib/scm/browser/scm.contribution","vs/workbench/contrib/terminal/browser/terminalGroup","vs/workbench/contrib/terminal/browser/terminalGroupService","vs/workbench/contrib/terminal/browser/terminalProfileService","vs/workbench/contrib/terminal/electron-sandbox/terminalRemote","vs/workbench/contrib/terminal/electron-sandbox/terminalNativeContribution","vs/workbench/contrib/terminal/electron-sandbox/terminal.contribution","vs/workbench/contrib/terminalContrib/accessibility/browser/terminal.accessibility.contribution","vs/workbench/contrib/terminalContrib/developer/browser/terminal.developer.contribution","vs/workbench/contrib/terminalContrib/environmentChanges/browser/terminal.environmentChanges.contribution","vs/workbench/contrib/terminalContrib/find/browser/terminal.find.contribution","vs/workbench/contrib/terminalContrib/links/browser/terminal.links.contribution","vs/workbench/contrib/terminalContrib/quickFix/browser/terminal.quickFix.contribution","vs/workbench/contrib/testing/browser/testingViewPaneContainer","vs/workbench/contrib/testing/browser/testing.contribution","vs/workbench/contrib/timeline/browser/timeline.contribution","vs/workbench/contrib/userDataSync/browser/userDataSyncConflictsView","vs/workbench/contrib/userDataSync/browser/userDataSyncViews","vs/workbench/contrib/userDataSync/browser/userDataSync","vs/workbench/contrib/userDataSync/browser/userDataSync.contribution","vs/workbench/electron-sandbox/desktop.contribution","vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService","vs/workbench/services/views/browser/viewDescriptorService","vs/workbench/contrib/editSessions/common/workspaceStateSync","vs/workbench/contrib/editSessions/browser/editSessions.contribution","vs/workbench/api/browser/mainThreadCLICommands","vs/workbench/api/browser/extensionHost.contribution","vs/workbench/contrib/extensions/browser/deprecatedExtensionsChecker","vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService","vs/workbench/contrib/extensions/browser/extensionsViewer","vs/workbench/contrib/extensions/browser/extensionsWorkbenchService","vs/workbench/contrib/extensions/browser/extensions.contribution","vs/workbench/contrib/extensions/electron-sandbox/remoteExtensionsInit","vs/workbench/contrib/extensions/electron-sandbox/extensions.contribution","vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline","vs/workbench/contrib/notebook/browser/services/notebookServiceImpl","vs/workbench/contrib/notebook/browser/notebook.contribution","sql/workbench/contrib/notebook/browser/notebookExplorer/notebookSearch","sql/workbench/contrib/notebook/browser/notebook.contribution","sql/workbench/contrib/welcome/browser/gettingStartedTour","sql/workbench/contrib/welcome/browser/welcomePage","sql/workbench/contrib/welcome/browser/welcomePage.contribution","vs/workbench/api/browser/viewsExtensionPoint","vs/workbench/contrib/search/browser/searchActionsTextQuickAccess","vs/workbench/contrib/search/browser/search.contribution","vs/workbench/contrib/terminal/browser/terminalInstanceService","vs/workbench/contrib/terminal/browser/terminalService","vs/workbench/contrib/terminal/browser/terminal.contribution","vs/workbench/contrib/terminal/terminal.all","vs/workbench/contrib/workspace/browser/workspaceTrustEditor","vs/workbench/contrib/workspace/browser/workspace.contribution","vs/workbench/services/extensionManagement/browser/extensionEnablementService","vs/workbench/services/extensionManagement/common/extensionManagementService","vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementService","vs/workbench/services/extensionManagement/electron-sandbox/remoteExtensionManagementService","vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementServerService","vs/workbench/services/extensions/common/abstractExtensionService","vs/workbench/services/extensions/electron-sandbox/nativeExtensionService","vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService","vs/workbench/services/workspaces/electron-sandbox/workspacesService","vs/workbench/workbench.common.main","sanitize-html","ansi_up","turndown","sql/base/common/marked/marked","@angular/platform-browser-dynamic","rxjs/Subject","chartjs-adapter-moment","azdataGraph","querystring","vs/base/common/stripComments","html-to-image","gridstack","vs/workbench/workbench.desktop.main"],Y=function(q){for(var e=[],t=0,y=q.length;t<y;t++)e[t]=Q[q[t]];return e},fe=this&&this.__decorate||function(q,e,t,y){var b=arguments.length,D=b<3?e:y===null?y=Object.getOwnPropertyDescriptor(e,t):y,T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(q,e,t,y);else for(var f=q.length-1;f>=0;f--)(T=q[f])&&(D=(b<3?T(D):b>3?T(e,t,D):T(e,t))||D);return b>3&&D&&Object.defineProperty(e,t,D),D},O=this&&this.__param||function(q,e){return function(t,y){e(t,y,q)}};define(Q[388],Y([1,0,40]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComponentHostDirective=void 0;let y=class{constructor(D){this.viewContainerRef=D}};e.ComponentHostDirective=y,e.ComponentHostDirective=y=fe([(0,t.Directive)({selector:"[component-host]"}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ViewContainerRef)))],y)}),define(Q[645],Y([1,0,40]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBreadcrumbService=void 0,e.IBreadcrumbService=new t.InjectionToken("breadcrumbService")}),define(Q[1492],Y([1,0,552]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class y{constructor(){this._defaultUrlSerializer=new t.DefaultUrlSerializer}parse(D){return D=D.replace(/\(/g,"%28").replace(/\)/g,"%29"),this._defaultUrlSerializer.parse(D)}serialize(D){return this._defaultUrlSerializer.serialize(D).replace(/%28/g,"(").replace(/%29/g,")")}}e.default=y}),define(Q[646],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.entries=void 0;function t(y){return Object.keys(y).map(b=>[b,y[b]])}e.entries=t}),define(Q[1493],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.instanceOfIDisposableDataProvider=void 0;function t(y){const b=y;return y&&b.dispose&&b.sort&&b.isDataInMemory!==void 0}e.instanceOfIDisposableDataProvider=t}),define(Q[363],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserCancelledConnectionError=e.invalidProvider=void 0;function t(b){return b?new Error(`Invalid provider: ${b}`):new Error("Invalid provider")}e.invalidProvider=t;class y extends Error{constructor(D){super(D)}}e.UserCancelledConnectionError=y}),define(Q[1494],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GridPosition=void 0;class t{constructor(b,D){this.row=b,this.column=D}with(b=this.row,D=this.column){return b===this.row&&D===this.column?this:new t(b,D)}delta(b=0,D=0){return this.with(this.row+b,this.column+D)}equals(b){return t.equals(this,b)}static equals(b,D){return!b&&!D?!0:!!b&&!!D&&b.row===D.row&&b.column===D.column}isBefore(b){return t.isBefore(this,b)}static isBefore(b,D){return b.row<D.row?!0:D.row<b.row?!1:b.column<D.column}isBeforeOrEqual(b){return t.isBeforeOrEqual(this,b)}static isBeforeOrEqual(b,D){return b.row<D.row?!0:D.row<b.row?!1:b.column<=D.column}static compare(b,D){let T=b.row|0,f=D.row|0;if(T===f){let v=b.column|0,m=D.column|0;return v-m}return T-f}clone(){return new t(this.row,this.column)}toString(){return"("+this.row+","+this.column+")"}static lift(b){return new t(b.row,b.column)}static isIGridPosition(b){return b&&typeof b.row=="number"&&typeof b.column=="number"}}e.GridPosition=t}),define(Q[773],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializableToMap=e.mapToSerializable=e.ReverseLookUpMap=e.toObject=void 0;function t(T){if(T){let f=Object.create(null);return T.forEach((v,m)=>{f[m]=v}),f}return{}}e.toObject=t;class y{constructor(){this.forward=new Map,this.reverse=new Map}clear(){this.forward.clear(),this.reverse.clear()}delete(f){const v=this.forward.get(f);return f&&v?this.forward.delete(f)&&this.reverse.delete(v):!1}forEach(f,v){this.forward.forEach(f,v)}get(f){return this.forward.get(f)}reverseGet(f){return this.reverse.get(f)}has(f){return this.forward.has(f)}reverseHas(f){return this.reverse.has(f)}set(f,v){return this.forward.set(f,v),this.reverse.set(v,f),this}get size(){return this.forward.size}}e.ReverseLookUpMap=y;function b(T){const f=[];return T.forEach((v,m)=>{f.push([m,v])}),f}e.mapToSerializable=b;function D(T){const f=new Map;for(const[v,m]of T)f.set(v,m);return f}e.serializableToMap=D}),function(q,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define("sql/base/common/marked/marked",e):(q=typeof globalThis<"u"?globalThis:q||self,q.marked=e())}(this,function(){"use strict";function q(Me,Oe){for(var De=0;De<Oe.length;De++){var Ce=Oe[De];Ce.enumerable=Ce.enumerable||!1,Ce.configurable=!0,"value"in Ce&&(Ce.writable=!0),Object.defineProperty(Me,Ce.key,Ce)}}function e(Me,Oe,De){return Oe&&q(Me.prototype,Oe),De&&q(Me,De),Me}function t(Me,Oe){if(Me){if(typeof Me=="string")return y(Me,Oe);var De=Object.prototype.toString.call(Me).slice(8,-1);if(De==="Object"&&Me.constructor&&(De=Me.constructor.name),De==="Map"||De==="Set")return Array.from(Me);if(De==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(De))return y(Me,Oe)}}function y(Me,Oe){(Oe==null||Oe>Me.length)&&(Oe=Me.length);for(var De=0,Ce=new Array(Oe);De<Oe;De++)Ce[De]=Me[De];return Ce}function b(Me,Oe){var De;if(typeof Symbol>"u"||Me[Symbol.iterator]==null){if(Array.isArray(Me)||(De=t(Me))||Oe&&Me&&typeof Me.length=="number"){De&&(Me=De);var Ce=0;return function(){return Ce>=Me.length?{done:!0}:{done:!1,value:Me[Ce++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return De=Me[Symbol.iterator](),De.next.bind(De)}function D(Me,Oe){return Oe={exports:{}},Me(Oe,Oe.exports),Oe.exports}var T=D(function(Me){function Oe(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function De(Ce){Me.exports.defaults=Ce}Me.exports={defaults:Oe(),getDefaults:Oe,changeDefaults:De}}),f=T.defaults,v=T.getDefaults,m=T.changeDefaults,S=/[&<>"']/,h=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,r=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},s=function(Oe){return i[Oe]};function o(Me,Oe){if(Oe){if(S.test(Me))return Me.replace(h,s)}else if(a.test(Me))return Me.replace(r,s);return Me}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function d(Me){return Me.replace(u,function(Oe,De){return De=De.toLowerCase(),De==="colon"?":":De.charAt(0)==="#"?De.charAt(1)==="x"?String.fromCharCode(parseInt(De.substring(2),16)):String.fromCharCode(+De.substring(1)):""})}var p=/(^|[^\[])\^/g;function c(Me,Oe){Me=Me.source||Me,Oe=Oe||"";var De={replace:function(_e,me){return me=me.source||me,me=me.replace(p,"$1"),Me=Me.replace(_e,me),De},getRegex:function(){return new RegExp(Me,Oe)}};return De}var l=/[^\w:]/g,n=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(Me,Oe,De){if(Me){var Ce;try{Ce=decodeURIComponent(d(De)).replace(l,"").toLowerCase()}catch{return null}if(Ce.indexOf("javascript:")===0||Ce.indexOf("vbscript:")===0||Ce.indexOf("data:")===0)return null}Oe&&!n.test(De)&&(De=_(Oe,De));try{De=encodeURI(De).replace(/%25/g,"%")}catch{return null}return De}var w={},E=/^[^:]+:\/*[^/]*$/,C=/^([^:]+:)[\s\S]*$/,I=/^([^:]+:\/*[^/]*)[\s\S]*$/;function _(Me,Oe){w[" "+Me]||(E.test(Me)?w[" "+Me]=Me+"/":w[" "+Me]=R(Me,"/",!0)),Me=w[" "+Me];var De=Me.indexOf(":")===-1;return Oe.substring(0,2)==="//"?De?Oe:Me.replace(C,"$1")+Oe:Oe.charAt(0)==="/"?De?Oe:Me.replace(I,"$1")+Oe:Me+Oe}var A={exec:function(){}};function k(Me){for(var Oe=1,De,Ce;Oe<arguments.length;Oe++){De=arguments[Oe];for(Ce in De)Object.prototype.hasOwnProperty.call(De,Ce)&&(Me[Ce]=De[Ce])}return Me}function L(Me,Oe){var De=Me.replace(/\|/g,function(me,ke,Ee){for(var pe=!1,Te=ke;--Te>=0&&Ee[Te]==="\\";)pe=!pe;return pe?"|":" |"}),Ce=De.split(/ \|/),_e=0;if(Ce.length>Oe)Ce.splice(Oe);else for(;Ce.length<Oe;)Ce.push("");for(;_e<Ce.length;_e++)Ce[_e]=Ce[_e].trim().replace(/\\\|/g,"|");return Ce}function R(Me,Oe,De){var Ce=Me.length;if(Ce===0)return"";for(var _e=0;_e<Ce;){var me=Me.charAt(Ce-_e-1);if(me===Oe&&!De)_e++;else if(me!==Oe&&De)_e++;else break}return Me.substr(0,Ce-_e)}function M(Me,Oe){if(Me.indexOf(Oe[1])===-1)return-1;for(var De=Me.length,Ce=0,_e=0;_e<De;_e++)if(Me[_e]==="\\")_e++;else if(Me[_e]===Oe[0])Ce++;else if(Me[_e]===Oe[1]&&(Ce--,Ce<0))return _e;return-1}function N(Me){Me&&Me.sanitize&&!Me.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function P(Me,Oe){if(Oe<1)return"";for(var De="";Oe>1;)Oe&1&&(De+=Me),Oe>>=1,Me+=Me;return De+Me}var x={escape:o,unescape:d,edit:c,cleanUrl:g,resolveUrl:_,noopTest:A,merge:k,splitCells:L,rtrim:R,findClosingBracket:M,checkSanitizeDeprecation:N,repeatString:P},F=T.defaults,V=x.rtrim,W=x.splitCells,z=x.escape,B=x.findClosingBracket;function K(Me,Oe,De){var Ce=Oe.href,_e=Oe.title?z(Oe.title):null,me=Me[1].replace(/\\([\[\]])/g,"$1");return Me[0].charAt(0)!=="!"?{type:"link",raw:De,href:Ce,title:_e,text:me}:{type:"image",raw:De,href:Ce,title:_e,text:z(me)}}function H(Me,Oe){var De=Me.match(/^(\s+)(?:```)/);if(De===null)return Oe;var Ce=De[1];return Oe.split(` `).map(function(_e){var me=_e.match(/^\s+/);if(me===null)return _e;var ke=me[0];return ke.length>=Ce.length?_e.slice(Ce.length):_e}).join(` `)}var U=function(){function Me(De){this.options=De||F}var Oe=Me.prototype;return Oe.space=function(Ce){var _e=this.rules.block.newline.exec(Ce);if(_e)return _e[0].length>1?{type:"space",raw:_e[0]}:{raw:` `}},Oe.code=function(Ce,_e){var me=this.rules.block.code.exec(Ce);if(me){var ke=_e[_e.length-1];if(ke&&ke.type==="paragraph")return{raw:me[0],text:me[0].trimRight()};var Ee=me[0].replace(/^ {4}/gm,"");return{type:"code",raw:me[0],codeBlockStyle:"indented",text:this.options.pedantic?Ee:V(Ee,` `)}}},Oe.fences=function(Ce){var _e=this.rules.block.fences.exec(Ce);if(_e){var me=_e[0],ke=H(me,_e[3]||"");return{type:"code",raw:me,lang:_e[2]?_e[2].trim():_e[2],text:ke}}},Oe.heading=function(Ce){var _e=this.rules.block.heading.exec(Ce);if(_e)return{type:"heading",raw:_e[0],depth:_e[1].length,text:_e[2]}},Oe.nptable=function(Ce){var _e=this.rules.block.nptable.exec(Ce);if(_e){var me={type:"table",header:W(_e[1].replace(/^ *| *\| *$/g,"")),align:_e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:_e[3]?_e[3].replace(/\n$/,"").split(` `):[],raw:_e[0]};if(me.header.length===me.align.length){var ke=me.align.length,Ee;for(Ee=0;Ee<ke;Ee++)/^ *-+: *$/.test(me.align[Ee])?me.align[Ee]="right":/^ *:-+: *$/.test(me.align[Ee])?me.align[Ee]="center":/^ *:-+ *$/.test(me.align[Ee])?me.align[Ee]="left":me.align[Ee]=null;for(ke=me.cells.length,Ee=0;Ee<ke;Ee++)me.cells[Ee]=W(me.cells[Ee],me.header.length);return me}}},Oe.hr=function(Ce){var _e=this.rules.block.hr.exec(Ce);if(_e)return{type:"hr",raw:_e[0]}},Oe.blockquote=function(Ce){var _e=this.rules.block.blockquote.exec(Ce);if(_e){var me=_e[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:_e[0],text:me}}},Oe.list=function(Ce){var _e=this.rules.block.list.exec(Ce);if(_e){for(var me=_e[0],ke=_e[2],Ee=ke.length>1,pe=ke[ke.length-1]===")",Te={type:"list",raw:me,ordered:Ee,start:Ee?+ke.slice(0,-1):"",loose:!1,items:[]},Ne=_e[0].match(this.rules.block.item),xe=!1,Ve,Fe,Be,He,et,Je,st,ze=Ne.length,je=0;je<ze;je++)Ve=Ne[je],me=Ve,Fe=Ve.length,Ve=Ve.replace(/^ *([*+-]|\d+[.)]) ?/,""),~Ve.indexOf(` `)&&(Fe-=Ve.length,Ve=this.options.pedantic?Ve.replace(/^ {1,4}/gm,""):Ve.replace(new RegExp("^ {1,"+Fe+"}","gm"),"")),je!==ze-1&&(Be=this.rules.block.bullet.exec(Ne[je+1])[0],(Ee?Be.length===1||!pe&&Be[Be.length-1]===")":Be.length>1||this.options.smartLists&&Be!==ke)&&(He=Ne.slice(je+1).join(` `),Te.raw=Te.raw.substring(0,Te.raw.length-He.length),je=ze-1)),et=xe||/\n\n(?!\s*$)/.test(Ve),je!==ze-1&&(xe=Ve.charAt(Ve.length-1)===` `,et||(et=xe)),et&&(Te.loose=!0),Je=/^\[[ xX]\] /.test(Ve),st=void 0,Je&&(st=Ve[1]!==" ",Ve=Ve.replace(/^\[[ xX]\] +/,"")),Te.items.push({type:"list_item",raw:me,task:Je,checked:st,loose:et,text:Ve});return Te}},Oe.html=function(Ce){var _e=this.rules.block.html.exec(Ce);if(_e)return{type:this.options.sanitize?"paragraph":"html",raw:_e[0],pre:!this.options.sanitizer&&(_e[1]==="pre"||_e[1]==="script"||_e[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(_e[0]):z(_e[0]):_e[0]}},Oe.def=function(Ce){var _e=this.rules.block.def.exec(Ce);if(_e){_e[3]&&(_e[3]=_e[3].substring(1,_e[3].length-1));var me=_e[1].toLowerCase().replace(/\s+/g," ");return{tag:me,raw:_e[0],href:_e[2],title:_e[3]}}},Oe.table=function(Ce){var _e=this.rules.block.table.exec(Ce);if(_e){var me={type:"table",header:W(_e[1].replace(/^ *| *\| *$/g,"")),align:_e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:_e[3]?_e[3].replace(/\n$/,"").split(` `):[]};if(me.header.length===me.align.length){me.raw=_e[0];var ke=me.align.length,Ee;for(Ee=0;Ee<ke;Ee++)/^ *-+: *$/.test(me.align[Ee])?me.align[Ee]="right":/^ *:-+: *$/.test(me.align[Ee])?me.align[Ee]="center":/^ *:-+ *$/.test(me.align[Ee])?me.align[Ee]="left":me.align[Ee]=null;for(ke=me.cells.length,Ee=0;Ee<ke;Ee++)me.cells[Ee]=W(me.cells[Ee].replace(/^ *\| *| *\| *$/g,""),me.header.length);return me}}},Oe.lheading=function(Ce){var _e=this.rules.block.lheading.exec(Ce);if(_e)return{type:"heading",raw:_e[0],depth:_e[2].charAt(0)==="="?1:2,text:_e[1]}},Oe.paragraph=function(Ce){var _e=this.rules.block.paragraph.exec(Ce);if(_e)return{type:"paragraph",raw:_e[0],text:_e[1].charAt(_e[1].length-1)===` `?_e[1].slice(0,-1):_e[1]}},Oe.text=function(Ce,_e){var me=this.rules.block.text.exec(Ce);if(me){var ke=_e[_e.length-1];return ke&&ke.type==="text"?{raw:me[0],text:me[0]}:{type:"text",raw:me[0],text:me[0]}}},Oe.escape=function(Ce){var _e=this.rules.inline.escape.exec(Ce);if(_e)return{type:"escape",raw:_e[0],text:z(_e[1])}},Oe.tag=function(Ce,_e,me){var ke=this.rules.inline.tag.exec(Ce);if(ke)return!_e&&/^<a /i.test(ke[0])?_e=!0:_e&&/^<\/a>/i.test(ke[0])&&(_e=!1),!me&&/^<(pre|code|kbd|script)(\s|>)/i.test(ke[0])?me=!0:me&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ke[0])&&(me=!1),{type:this.options.sanitize?"text":"html",raw:ke[0],inLink:_e,inRawBlock:me,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ke[0]):z(ke[0]):ke[0]}},Oe.link=function(Ce){var _e=this.rules.inline.link.exec(Ce);if(_e){var me=B(_e[2],"()");if(me>-1){var ke=_e[0].indexOf("!")===0?5:4,Ee=ke+_e[1].length+me;_e[2]=_e[2].substring(0,me),_e[0]=_e[0].substring(0,Ee).trim(),_e[3]=""}var pe=_e[2],Te="";if(this.options.pedantic){var Ne=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(pe);Ne?(pe=Ne[1],Te=Ne[3]):Te=""}else Te=_e[3]?_e[3].slice(1,-1):"";pe=pe.trim().replace(/^<([\s\S]*)>$/,"$1");var xe=K(_e,{href:pe&&pe.replace(this.rules.inline._escapes,"$1"),title:Te&&Te.replace(this.rules.inline._escapes,"$1")},_e[0]);return xe}},Oe.reflink=function(Ce,_e){var me;if((me=this.rules.inline.reflink.exec(Ce))||(me=this.rules.inline.nolink.exec(Ce))){var ke=(me[2]||me[1]).replace(/\s+/g," ");if(ke=_e[ke.toLowerCase()],!ke||!ke.href){var Ee=me[0].charAt(0);return{type:"text",raw:Ee,text:Ee}}var pe=K(me,ke,me[0]);return pe}},Oe.strong=function(Ce,_e,me){me===void 0&&(me="");var ke=this.rules.inline.strong.start.exec(Ce);if(ke&&(!ke[1]||ke[1]&&(me===""||this.rules.inline.punctuation.exec(me)))){_e=_e.slice(-1*Ce.length);var Ee=ke[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ee.lastIndex=0;for(var pe;(ke=Ee.exec(_e))!=null;)if(pe=this.rules.inline.strong.middle.exec(_e.slice(0,ke.index+3)),pe)return{type:"strong",raw:Ce.slice(0,pe[0].length),text:Ce.slice(2,pe[0].length-2)}}},Oe.em=function(Ce,_e,me){me===void 0&&(me="");var ke=this.rules.inline.em.start.exec(Ce);if(ke&&(!ke[1]||ke[1]&&(me===""||this.rules.inline.punctuation.exec(me)))){_e=_e.slice(-1*Ce.length);var Ee=ke[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ee.lastIndex=0;for(var pe;(ke=Ee.exec(_e))!=null;)if(pe=this.rules.inline.em.middle.exec(_e.slice(0,ke.index+2)),pe)return{type:"em",raw:Ce.slice(0,pe[0].length),text:Ce.slice(1,pe[0].length-1)}}},Oe.codespan=function(Ce){var _e=this.rules.inline.code.exec(Ce);if(_e){var me=_e[2].replace(/\n/g," "),ke=/[^ ]/.test(me),Ee=me.startsWith(" ")&&me.endsWith(" ");return ke&&Ee&&(me=me.substring(1,me.length-1)),me=z(me,!0),{type:"codespan",raw:_e[0],text:me}}},Oe.br=function(Ce){var _e=this.rules.inline.br.exec(Ce);if(_e)return{type:"br",raw:_e[0]}},Oe.del=function(Ce){var _e=this.rules.inline.del.exec(Ce);if(_e)return{type:"del",raw:_e[0],text:_e[1]}},Oe.autolink=function(Ce,_e){var me=this.rules.inline.autolink.exec(Ce);if(me){var ke,Ee;return me[2]==="@"?(ke=z(this.options.mangle?_e(me[1]):me[1]),Ee="mailto:"+ke):(ke=z(me[1]),Ee=ke),{type:"link",raw:me[0],text:ke,href:Ee,tokens:[{type:"text",raw:ke,text:ke}]}}},Oe.url=function(Ce,_e){var me;if(me=this.rules.inline.url.exec(Ce)){var ke,Ee;if(me[2]==="@")ke=z(this.options.mangle?_e(me[0]):me[0]),Ee="mailto:"+ke;else{var pe;do pe=me[0],me[0]=this.rules.inline._backpedal.exec(me[0])[0];while(pe!==me[0]);ke=z(me[0]),me[1]==="www."?Ee="http://"+ke:Ee=ke}return{type:"link",raw:me[0],text:ke,href:Ee,tokens:[{type:"text",raw:ke,text:ke}]}}},Oe.inlineText=function(Ce,_e,me){var ke=this.rules.inline.text.exec(Ce);if(ke){var Ee;return _e?Ee=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ke[0]):z(ke[0]):ke[0]:Ee=z(this.options.smartypants?me(ke[0]):ke[0]),{type:"text",raw:ke[0],text:Ee}}},Me}(),G=x.noopTest,$=x.edit,ie=x.merge,J={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]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:G,table:G,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};J._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,J._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,J.def=$(J.def).replace("label",J._label).replace("title",J._title).getRegex(),J.bullet=/(?:[*+-]|\d{1,9}[.)])/,J.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,J.item=$(J.item,"gm").replace(/bull/g,J.bullet).getRegex(),J.list=$(J.list).replace(/bull/g,J.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+J.def.source+")").getRegex(),J._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",J._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,J.html=$(J.html,"i").replace("comment",J._comment).replace("tag",J._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),J.paragraph=$(J._paragraph).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",J._tag).getRegex(),J.blockquote=$(J.blockquote).replace("paragraph",J.paragraph).getRegex(),J.normal=ie({},J),J.gfm=ie({},J.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),J.gfm.nptable=$(J.gfm.nptable).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",J._tag).getRegex(),J.gfm.table=$(J.gfm.table).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",J._tag).getRegex(),J.pedantic=ie({},J.normal,{html:$(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",J._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:G,paragraph:$(J.normal._paragraph).replace("hr",J.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",J.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var j={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:G,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",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:G,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\s*punctuation])/};j._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",j.punctuation=$(j.punctuation).replace(/punctuation/g,j._punctuation).getRegex(),j._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",j._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",j._comment=$(J._comment).replace("(?:-->|$)","-->").getRegex(),j.em.start=$(j.em.start).replace(/punctuation/g,j._punctuation).getRegex(),j.em.middle=$(j.em.middle).replace(/punctuation/g,j._punctuation).replace(/overlapSkip/g,j._overlapSkip).getRegex(),j.em.endAst=$(j.em.endAst,"g").replace(/punctuation/g,j._punctuation).getRegex(),j.em.endUnd=$(j.em.endUnd,"g").replace(/punctuation/g,j._punctuation).getRegex(),j.strong.start=$(j.strong.start).replace(/punctuation/g,j._punctuation).getRegex(),j.strong.middle=$(j.strong.middle).replace(/punctuation/g,j._punctuation).replace(/overlapSkip/g,j._overlapSkip).getRegex(),j.strong.endAst=$(j.strong.endAst,"g").replace(/punctuation/g,j._punctuation).getRegex(),j.strong.endUnd=$(j.strong.endUnd,"g").replace(/punctuation/g,j._punctuation).getRegex(),j.blockSkip=$(j._blockSkip,"g").getRegex(),j.overlapSkip=$(j._overlapSkip,"g").getRegex(),j._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,j._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,j._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])?)+(?![-_])/,j.autolink=$(j.autolink).replace("scheme",j._scheme).replace("email",j._email).getRegex(),j._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,j.tag=$(j.tag).replace("comment",j._comment).replace("attribute",j._attribute).getRegex(),j._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,j._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,j._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,j.link=$(j.link).replace("label",j._label).replace("href",j._href).replace("title",j._title).getRegex(),j.reflink=$(j.reflink).replace("label",j._label).getRegex(),j.reflinkSearch=$(j.reflinkSearch,"g").replace("reflink",j.reflink).replace("nolink",j.nolink).getRegex(),j.normal=ie({},j),j.pedantic=ie({},j.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:$(/^!?\[(label)\]\((.*?)\)/).replace("label",j._label).getRegex(),reflink:$(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",j._label).getRegex()}),j.gfm=ie({},j.normal,{escape:$(j.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:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),j.gfm.url=$(j.gfm.url,"i").replace("email",j.gfm._extended_email).getRegex(),j.breaks=ie({},j.gfm,{br:$(j.br).replace("{2,}","*").getRegex(),text:$(j.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var ee={block:J,inline:j},X=T.defaults,te=ee.block,Z=ee.inline,se=x.repeatString;function re(Me){return Me.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function oe(Me){var Oe="",De,Ce,_e=Me.length;for(De=0;De<_e;De++)Ce=Me.charCodeAt(De),Math.random()>.5&&(Ce="x"+Ce.toString(16)),Oe+="&#"+Ce+";";return Oe}var le=function(){function Me(De){this.tokens=[],this.tokens.links=Object.create(null),this.options=De||X,this.options.tokenizer=this.options.tokenizer||new U,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Ce={block:te.normal,inline:Z.normal};this.options.pedantic?(Ce.block=te.pedantic,Ce.inline=Z.pedantic):this.options.gfm&&(Ce.block=te.gfm,this.options.breaks?Ce.inline=Z.breaks:Ce.inline=Z.gfm),this.tokenizer.rules=Ce}Me.lex=function(Ce,_e){var me=new Me(_e);return me.lex(Ce)},Me.lexInline=function(Ce,_e){var me=new Me(_e);return me.inlineTokens(Ce)};var Oe=Me.prototype;return Oe.lex=function(Ce){return Ce=Ce.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(Ce,this.tokens,!0),this.inline(this.tokens),this.tokens},Oe.blockTokens=function(Ce,_e,me){_e===void 0&&(_e=[]),me===void 0&&(me=!0),Ce=Ce.replace(/^ +$/gm,"");for(var ke,Ee,pe,Te;Ce;){if(ke=this.tokenizer.space(Ce)){Ce=Ce.substring(ke.raw.length),ke.type&&_e.push(ke);continue}if(ke=this.tokenizer.code(Ce,_e)){Ce=Ce.substring(ke.raw.length),ke.type?_e.push(ke):(Te=_e[_e.length-1],Te.raw+=` `+ke.raw,Te.text+=` `+ke.text);continue}if(ke=this.tokenizer.fences(Ce)){Ce=Ce.substring(ke.raw.length),_e.push(ke);continue}if(ke=this.tokenizer.heading(Ce)){Ce=Ce.substring(ke.raw.length),_e.push(ke);continue}if(ke=this.tokenizer.nptable(Ce)){Ce=Ce.substring(ke.raw.length),_e.push(ke);continue}if(ke=this.tokenizer.hr(Ce)){Ce=Ce.substring(ke.raw.length),_e.push(ke);continue}if(ke=this.tokenizer.blockquote(Ce)){Ce=Ce.substring(ke.raw.length),ke.tokens=this.blockTokens(ke.text,[],me),_e.push(ke);continue}if(ke=this.tokenizer.list(Ce)){for(Ce=Ce.substring(ke.raw.length),pe=ke.items.length,Ee=0;Ee<pe;Ee++)ke.items[Ee].tokens=this.blockTokens(ke.items[Ee].text,[],!1);_e.push(ke);continue}if(ke=this.tokenizer.html(Ce)){Ce=Ce.substring(ke.raw.length),_e.push(ke);continue}if(me&&(ke=this.tokenizer.def(Ce))){Ce=Ce.substring(ke.raw.length),this.tokens.links[ke.tag]||(this.tokens.links[ke.tag]={href:ke.href,title:ke.title});continue}if(ke=this.tokenizer.table(Ce)){Ce=Ce.substring(ke.raw.length),_e.push(ke);continue}if(ke=this.tokenizer.lheading(Ce)){Ce=Ce.substring(ke.raw.length),_e.push(ke);continue}if(me&&(ke=this.tokenizer.paragraph(Ce))){Ce=Ce.substring(ke.raw.length),_e.push(ke);continue}if(ke=this.tokenizer.text(Ce,_e)){Ce=Ce.substring(ke.raw.length),ke.type?_e.push(ke):(Te=_e[_e.length-1],Te.raw+=` `+ke.raw,Te.text+=` `+ke.text);continue}if(Ce){var Ne="Infinite loop on byte: "+Ce.charCodeAt(0);if(this.options.silent){console.error(Ne);break}else throw new Error(Ne)}}return _e},Oe.inline=function(Ce){var _e,me,ke,Ee,pe,Te,Ne=Ce.length;for(_e=0;_e<Ne;_e++)switch(Te=Ce[_e],Te.type){case"paragraph":case"text":case"heading":{Te.tokens=[],this.inlineTokens(Te.text,Te.tokens);break}case"table":{for(Te.tokens={header:[],cells:[]},Ee=Te.header.length,me=0;me<Ee;me++)Te.tokens.header[me]=[],this.inlineTokens(Te.header[me],Te.tokens.header[me]);for(Ee=Te.cells.length,me=0;me<Ee;me++)for(pe=Te.cells[me],Te.tokens.cells[me]=[],ke=0;ke<pe.length;ke++)Te.tokens.cells[me][ke]=[],this.inlineTokens(pe[ke],Te.tokens.cells[me][ke]);break}case"blockquote":{this.inline(Te.tokens);break}case"list":{for(Ee=Te.items.length,me=0;me<Ee;me++)this.inline(Te.items[me].tokens);break}}return Ce},Oe.inlineTokens=function(Ce,_e,me,ke,Ee){_e===void 0&&(_e=[]),me===void 0&&(me=!1),ke===void 0&&(ke=!1),Ee===void 0&&(Ee="");var pe,Te=Ce,Ne;if(this.tokens.links){var xe=Object.keys(this.tokens.links);if(xe.length>0)for(;(Ne=this.tokenizer.rules.inline.reflinkSearch.exec(Te))!=null;)xe.includes(Ne[0].slice(Ne[0].lastIndexOf("[")+1,-1))&&(Te=Te.slice(0,Ne.index)+"["+se("a",Ne[0].length-2)+"]"+Te.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ne=this.tokenizer.rules.inline.blockSkip.exec(Te))!=null;)Te=Te.slice(0,Ne.index)+"["+se("a",Ne[0].length-2)+"]"+Te.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Ce;){if(pe=this.tokenizer.escape(Ce)){Ce=Ce.substring(pe.raw.length),_e.push(pe);continue}if(pe=this.tokenizer.tag(Ce,me,ke)){Ce=Ce.substring(pe.raw.length),me=pe.inLink,ke=pe.inRawBlock,_e.push(pe);continue}if(pe=this.tokenizer.link(Ce)){Ce=Ce.substring(pe.raw.length),pe.type==="link"&&(pe.tokens=this.inlineTokens(pe.text,[],!0,ke)),_e.push(pe);continue}if(pe=this.tokenizer.reflink(Ce,this.tokens.links)){Ce=Ce.substring(pe.raw.length),pe.type==="link"&&(pe.tokens=this.inlineTokens(pe.text,[],!0,ke)),_e.push(pe);continue}if(pe=this.tokenizer.strong(Ce,Te,Ee)){Ce=Ce.substring(pe.raw.length),pe.tokens=this.inlineTokens(pe.text,[],me,ke),_e.push(pe);continue}if(pe=this.tokenizer.em(Ce,Te,Ee)){Ce=Ce.substring(pe.raw.length),pe.tokens=this.inlineTokens(pe.text,[],me,ke),_e.push(pe);continue}if(pe=this.tokenizer.codespan(Ce)){Ce=Ce.substring(pe.raw.length),_e.push(pe);continue}if(pe=this.tokenizer.br(Ce)){Ce=Ce.substring(pe.raw.length),_e.push(pe);continue}if(pe=this.tokenizer.del(Ce)){Ce=Ce.substring(pe.raw.length),pe.tokens=this.inlineTokens(pe.text,[],me,ke),_e.push(pe);continue}if(pe=this.tokenizer.autolink(Ce,oe)){Ce=Ce.substring(pe.raw.length),_e.push(pe);continue}if(!me&&(pe=this.tokenizer.url(Ce,oe))){Ce=Ce.substring(pe.raw.length),_e.push(pe);continue}if(pe=this.tokenizer.inlineText(Ce,ke,re)){Ce=Ce.substring(pe.raw.length),Ee=pe.raw.slice(-1),_e.push(pe);continue}if(Ce){var Ve="Infinite loop on byte: "+Ce.charCodeAt(0);if(this.options.silent){console.error(Ve);break}else throw new Error(Ve)}}return _e},e(Me,null,[{key:"rules",get:function(){return{block:te,inline:Z}}}]),Me}(),ne=T.defaults,ce=x.cleanUrl,ae=x.escape,ue=function(){function Me(De){this.options=De||ne}var Oe=Me.prototype;return Oe.code=function(Ce,_e,me){var ke=(_e||"").match(/\S*/)[0];if(this.options.highlight){var Ee=this.options.highlight(Ce,ke);Ee!=null&&Ee!==Ce&&(me=!0,Ce=Ee)}return ke?'<pre><code class="'+this.options.langPrefix+ae(ke,!0)+'">'+(me?Ce:ae(Ce,!0))+`</code></pre> `:"<pre><code>"+(me?Ce:ae(Ce,!0))+`</code></pre> `},Oe.blockquote=function(Ce){return`<blockquote> `+Ce+`</blockquote> `},Oe.html=function(Ce){return Ce},Oe.heading=function(Ce,_e,me,ke){return this.options.headerIds?"<h"+_e+' id="'+this.options.headerPrefix+ke.slug(me)+'">'+Ce+"</h"+_e+`> `:"<h"+_e+">"+Ce+"</h"+_e+`> `},Oe.hr=function(){return this.options.xhtml?`<hr/> `:`<hr> `},Oe.list=function(Ce,_e,me){var ke=_e?"ol":"ul",Ee=_e&&me!==1?' start="'+me+'"':"";return"<"+ke+Ee+`> `+Ce+"</"+ke+`> `},Oe.listitem=function(Ce){return"<li>"+Ce+`</li> `},Oe.checkbox=function(Ce){return"<input "+(Ce?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Oe.paragraph=function(Ce){return"<p>"+Ce+`</p> `},Oe.table=function(Ce,_e){return _e&&(_e="<tbody>"+_e+"</tbody>"),`<table> <thead> `+Ce+`</thead> `+_e+`</table> `},Oe.tablerow=function(Ce){return`<tr> `+Ce+`</tr> `},Oe.tablecell=function(Ce,_e){var me=_e.header?"th":"td",ke=_e.align?"<"+me+' align="'+_e.align+'">':"<"+me+">";return ke+Ce+"</"+me+`> `},Oe.strong=function(Ce){return"<strong>"+Ce+"</strong>"},Oe.em=function(Ce){return"<em>"+Ce+"</em>"},Oe.codespan=function(Ce){return"<code>"+Ce+"</code>"},Oe.br=function(){return this.options.xhtml?"<br/>":"<br>"},Oe.del=function(Ce){return"<del>"+Ce+"</del>"},Oe.link=function(Ce,_e,me){if(Ce=ce(this.options.sanitize,this.options.baseUrl,Ce),Ce===null)return me;var ke='<a href="'+ae(Ce)+'"';return _e&&(ke+=' title="'+_e+'"'),ke+=">"+me+"</a>",ke},Oe.image=function(Ce,_e,me){if(Ce=ce(this.options.sanitize,this.options.baseUrl,Ce),Ce===null)return me;var ke='<img src="'+Ce+'" alt="'+me+'"';return _e&&(ke+=' title="'+_e+'"'),ke+=this.options.xhtml?"/>":">",ke},Oe.text=function(Ce){return Ce},Me}(),de=function(){function Me(){}var Oe=Me.prototype;return Oe.strong=function(Ce){return Ce},Oe.em=function(Ce){return Ce},Oe.codespan=function(Ce){return Ce},Oe.del=function(Ce){return Ce},Oe.html=function(Ce){return Ce},Oe.text=function(Ce){return Ce},Oe.link=function(Ce,_e,me){return""+me},Oe.image=function(Ce,_e,me){return""+me},Oe.br=function(){return""},Me}(),ge=function(){function Me(){this.seen={}}var Oe=Me.prototype;return Oe.serialize=function(Ce){return Ce.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Oe.getNextSafeSlug=function(Ce,_e){var me=Ce,ke=0;if(this.seen.hasOwnProperty(me)){ke=this.seen[Ce];do ke++,me=Ce+"-"+ke;while(this.seen.hasOwnProperty(me))}return _e||(this.seen[Ce]=ke,this.seen[me]=0),me},Oe.slug=function(Ce,_e){_e===void 0&&(_e={});var me=this.serialize(Ce);return this.getNextSafeSlug(me,_e.dryrun)},Me}(),he=T.defaults,be=x.unescape,ve=function(){function Me(De){this.options=De||he,this.options.renderer=this.options.renderer||new ue,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new de,this.slugger=new ge}Me.parse=function(Ce,_e){var me=new Me(_e);return me.parse(Ce)},Me.parseInline=function(Ce,_e){var me=new Me(_e);return me.parseInline(Ce)};var Oe=Me.prototype;return Oe.parse=function(Ce,_e){_e===void 0&&(_e=!0);var me="",ke,Ee,pe,Te,Ne,xe,Ve,Fe,Be,He,et,Je,st,ze,je,Ge,Ze,tt,Xe=Ce.length;for(ke=0;ke<Xe;ke++)switch(He=Ce[ke],He.type){case"space":continue;case"hr":{me+=this.renderer.hr();continue}case"heading":{me+=this.renderer.heading(this.parseInline(He.tokens),He.depth,be(this.parseInline(He.tokens,this.textRenderer)),this.slugger);continue}case"code":{me+=this.renderer.code(He.text,He.lang,He.escaped);continue}case"table":{for(Fe="",Ve="",Te=He.header.length,Ee=0;Ee<Te;Ee++)Ve+=this.renderer.tablecell(this.parseInline(He.tokens.header[Ee]),{header:!0,align:He.align[Ee]});for(Fe+=this.renderer.tablerow(Ve),Be="",Te=He.cells.length,Ee=0;Ee<Te;Ee++){for(xe=He.tokens.cells[Ee],Ve="",Ne=xe.length,pe=0;pe<Ne;pe++)Ve+=this.renderer.tablecell(this.parseInline(xe[pe]),{header:!1,align:He.align[pe]});Be+=this.renderer.tablerow(Ve)}me+=this.renderer.table(Fe,Be);continue}case"blockquote":{Be=this.parse(He.tokens),me+=this.renderer.blockquote(Be);continue}case"list":{for(et=He.ordered,Je=He.start,st=He.loose,Te=He.items.length,Be="",Ee=0;Ee<Te;Ee++)je=He.items[Ee],Ge=je.checked,Ze=je.task,ze="",je.task&&(tt=this.renderer.checkbox(Ge),st?je.tokens.length>0&&je.tokens[0].type==="text"?(je.tokens[0].text=tt+" "+je.tokens[0].text,je.tokens[0].tokens&&je.tokens[0].tokens.length>0&&je.tokens[0].tokens[0].type==="text"&&(je.tokens[0].tokens[0].text=tt+" "+je.tokens[0].tokens[0].text)):je.tokens.unshift({type:"text",text:tt}):ze+=tt),ze+=this.parse(je.tokens,st),Be+=this.renderer.listitem(ze,Ze,Ge);me+=this.renderer.list(Be,et,Je);continue}case"html":{me+=this.renderer.html(He.text);continue}case"paragraph":{me+=this.renderer.paragraph(this.parseInline(He.tokens));continue}case"text":{for(Be=He.tokens?this.parseInline(He.tokens):He.text;ke+1<Xe&&Ce[ke+1].type==="text";)He=Ce[++ke],Be+=` `+(He.tokens?this.parseInline(He.tokens):He.text);me+=_e?this.renderer.paragraph(Be):Be;continue}default:{var nt='Token with "'+He.type+'" type was not found.';if(this.options.silent){console.error(nt);return}else throw new Error(nt)}}return me},Oe.parseInline=function(Ce,_e){_e=_e||this.renderer;var me="",ke,Ee,pe=Ce.length;for(ke=0;ke<pe;ke++)switch(Ee=Ce[ke],Ee.type){case"escape":{me+=_e.text(Ee.text);break}case"html":{me+=_e.html(Ee.text);break}case"link":{me+=_e.link(Ee.href,Ee.title,this.parseInline(Ee.tokens,_e));break}case"image":{me+=_e.image(Ee.href,Ee.title,Ee.text);break}case"strong":{me+=_e.strong(this.parseInline(Ee.tokens,_e));break}case"em":{me+=_e.em(this.parseInline(Ee.tokens,_e));break}case"codespan":{me+=_e.codespan(Ee.text);break}case"br":{me+=_e.br();break}case"del":{me+=_e.del(this.parseInline(Ee.tokens,_e));break}case"text":{me+=_e.text(Ee.text);break}default:{var Te='Token with "'+Ee.type+'" type was not found.';if(this.options.silent){console.error(Te);return}else throw new Error(Te)}}return me},Me}(),Ie=x.merge,Se=x.checkSanitizeDeprecation,we=x.escape,ye=T.getDefaults,Re=T.changeDefaults,Le=T.defaults;function Pe(Me,Oe,De){if(typeof Me>"u"||Me===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Me!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Me)+", string expected");if(typeof Oe=="function"&&(De=Oe,Oe=null),Oe=Ie({},Pe.defaults,Oe||{}),Se(Oe),De){var Ce=Oe.highlight,_e;try{_e=le.lex(Me,Oe)}catch(pe){return De(pe)}var me=function(Te){var Ne;if(!Te)try{Ne=ve.parse(_e,Oe)}catch(xe){Te=xe}return Oe.highlight=Ce,Te?De(Te):De(null,Ne)};if(!Ce||Ce.length<3||(delete Oe.highlight,!_e.length))return me();var ke=0;Pe.walkTokens(_e,function(pe){pe.type==="code"&&(ke++,setTimeout(function(){Ce(pe.text,pe.lang,function(Te,Ne){if(Te)return me(Te);Ne!=null&&Ne!==pe.text&&(pe.text=Ne,pe.escaped=!0),ke--,ke===0&&me()})},0))}),ke===0&&me();return}try{var Ee=le.lex(Me,Oe);return Oe.walkTokens&&Pe.walkTokens(Ee,Oe.walkTokens),ve.parse(Ee,Oe)}catch(pe){if(pe.message+=` Please report this to https://github.com/markedjs/marked.`,Oe.silent)return"<p>An error occurred:</p><pre>"+we(pe.message+"",!0)+"</pre>";throw pe}}Pe.options=Pe.setOptions=function(Me){return Ie(Pe.defaults,Me),Re(Pe.defaults),Pe},Pe.getDefaults=ye,Pe.defaults=Le,Pe.use=function(Me){var Oe=Ie({},Me);if(Me.renderer&&function(){var Ce=Pe.defaults.renderer||new ue,_e=function(Ee){var pe=Ce[Ee];Ce[Ee]=function(){for(var Te=arguments.length,Ne=new Array(Te),xe=0;xe<Te;xe++)Ne[xe]=arguments[xe];var Ve=Me.renderer[Ee].apply(Ce,Ne);return Ve===!1&&(Ve=pe.apply(Ce,Ne)),Ve}};for(var me in Me.renderer)_e(me);Oe.renderer=Ce}(),Me.tokenizer&&function(){var Ce=Pe.defaults.tokenizer||new U,_e=function(Ee){var pe=Ce[Ee];Ce[Ee]=function(){for(var Te=arguments.length,Ne=new Array(Te),xe=0;xe<Te;xe++)Ne[xe]=arguments[xe];var Ve=Me.tokenizer[Ee].apply(Ce,Ne);return Ve===!1&&(Ve=pe.apply(Ce,Ne)),Ve}};for(var me in Me.tokenizer)_e(me);Oe.tokenizer=Ce}(),Me.walkTokens){var De=Pe.defaults.walkTokens;Oe.walkTokens=function(Ce){Me.walkTokens(Ce),De&&De(Ce)}}Pe.setOptions(Oe)},Pe.walkTokens=function(Me,Oe){for(var De=b(Me),Ce;!(Ce=De()).done;){var _e=Ce.value;switch(Oe(_e),_e.type){case"table":{for(var me=b(_e.tokens.header),ke;!(ke=me()).done;){var Ee=ke.value;Pe.walkTokens(Ee,Oe)}for(var pe=b(_e.tokens.cells),Te;!(Te=pe()).done;)for(var Ne=Te.value,xe=b(Ne),Ve;!(Ve=xe()).done;){var Fe=Ve.value;Pe.walkTokens(Fe,Oe)}break}case"list":{Pe.walkTokens(_e.items,Oe);break}default:_e.tokens&&Pe.walkTokens(_e.tokens,Oe)}}},Pe.parseInline=function(Me,Oe){if(typeof Me>"u"||Me===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Me!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Me)+", string expected");Oe=Ie({},Pe.defaults,Oe||{}),Se(Oe);try{var De=le.lexInline(Me,Oe);return Oe.walkTokens&&Pe.walkTokens(De,Oe.walkTokens),ve.parseInline(De,Oe)}catch(Ce){if(Ce.message+=` Please report this to https://github.com/markedjs/marked.`,Oe.silent)return"<p>An error occurred:</p><pre>"+we(Ce.message+"",!0)+"</pre>";throw Ce}},Pe.Parser=ve,Pe.parser=ve.parse,Pe.Renderer=ue,Pe.TextRenderer=de,Pe.Lexer=le,Pe.lexer=le.lex,Pe.Tokenizer=U,Pe.Slugger=ge,Pe.parse=Pe;var Ae=Pe;return Ae}),define(Q[1008],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MappedNavigator=void 0;class t{constructor(b,D){this.navigator=b,this.fn=D}current(){return this.fn(this.navigator.current())}previous(){return this.fn(this.navigator.previous())}first(){return this.fn(this.navigator.first())}last(){return this.fn(this.navigator.last())}next(){return this.fn(this.navigator.next())}parent(){return this.fn(this.navigator.parent())}}e.MappedNavigator=t}),define(Q[1495],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.containsEncodedUriComponentReservedCharacters=void 0;function t(y){return decodeURI(y)!==decodeURIComponent(y)}e.containsEncodedUriComponentReservedCharacters=t}),define(Q[183],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Deferred=void 0;class t{constructor(){this.promise=new Promise((b,D)=>{this.resolve=b,this.reject=D})}then(b,D){return this.promise.then(b,D)}catch(b){return this.promise.catch(b)}finally(b){return this.promise.finally(b)}get[Symbol.toStringTag](){return this.promise[Symbol.toStringTag]}}e.Deferred=t}),define(Q[1496],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Schemas=void 0;var t;(function(y){y.tableDesigner="ads-table-designer"})(t||(e.Schemas=t={}))}),define(Q[201],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeLineBreaks=e.endsWith=e.startsWith=e.raw=e.escape=void 0;function t(f){return f.replace(/[<|>|&|"|\']/g,function(v){switch(v){case"<":return"<";case">":return">";case"&":return"&";case'"':return""";case"'":return"'";default:return v}})}e.escape=t;function y(f,...v){let m;try{m=Array.from(f.raw)}catch{throw new TypeError("Cannot convert undefined or null to object")}return m.map((S,h)=>f.raw.length<=h?S:v[h-1]?v[h-1]+S:S).join("")}e.raw=y;function b(f,v){if(f.length<v.length)return!1;if(f===v)return!0;for(let m=0;m<v.length;m++)if(f[m]!==v[m])return!1;return!0}e.startsWith=b;function D(f,v){const m=f.length-v.length;return m>0?f.indexOf(v,m)===m:m===0?f===v:!1}e.endsWith=D;function T(f,v){return f.replace(/(\r\n|\n|\r)/gm,v??"")}e.removeLineBreaks=T}),define(Q[1009],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DRAG_OVER_ACCEPT_BUBBLE_DOWN_COPY=e.DRAG_OVER_ACCEPT_BUBBLE_UP_COPY=e.DRAG_OVER_ACCEPT_BUBBLE_DOWN=e.DRAG_OVER_ACCEPT_BUBBLE_UP=e.DRAG_OVER_ACCEPT=e.DRAG_OVER_REJECT=e.DragOverBubble=e.DragOverEffect=e.KeyboardContextMenuEvent=e.MouseContextMenuEvent=e.ContextMenuEvent=void 0;class t{constructor(S,h,a){this._posx=S,this._posy=h,this._target=a}preventDefault(){}stopPropagation(){}get posx(){return this._posx}get posy(){return this._posy}get target(){return this._target}}e.ContextMenuEvent=t;class y extends t{constructor(S){super(S.posx,S.posy,S.target),this.originalEvent=S}preventDefault(){this.originalEvent.preventDefault()}stopPropagation(){this.originalEvent.stopPropagation()}}e.MouseContextMenuEvent=y;class b extends t{constructor(S,h,a){super(S,h,a.target),this.originalEvent=a}preventDefault(){this.originalEvent.preventDefault()}stopPropagation(){this.originalEvent.stopPropagation()}}e.KeyboardContextMenuEvent=b;var D;(function(m){m[m.COPY=0]="COPY",m[m.MOVE=1]="MOVE"})(D||(e.DragOverEffect=D={}));var T;(function(m){m[m.BUBBLE_DOWN=0]="BUBBLE_DOWN",m[m.BUBBLE_UP=1]="BUBBLE_UP"})(T||(e.DragOverBubble=T={})),e.DRAG_OVER_REJECT={accept:!1},e.DRAG_OVER_ACCEPT={accept:!0},e.DRAG_OVER_ACCEPT_BUBBLE_UP={accept:!0,bubble:1};const f=(m=!1)=>({accept:!0,bubble:0,autoExpand:m});e.DRAG_OVER_ACCEPT_BUBBLE_DOWN=f,e.DRAG_OVER_ACCEPT_BUBBLE_UP_COPY={accept:!0,bubble:1,effect:0};const v=(m=!1)=>({accept:!0,bubble:0,effect:0,autoExpand:m});e.DRAG_OVER_ACCEPT_BUBBLE_DOWN_COPY=v}),define(Q[1497],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesktopDragAndDropData=e.ExternalElementsDragAndDropData=e.ElementsDragAndDropData=void 0;class t{constructor(T){this.elements=T}update(T){}getData(){return this.elements}}e.ElementsDragAndDropData=t;class y{constructor(T){this.elements=T}update(T){}getData(){return this.elements}}e.ExternalElementsDragAndDropData=y;class b{constructor(){this.types=[],this.files=[]}update(T){T.types&&(this.types=[],Array.prototype.push.apply(this.types,T.types)),T.files&&(this.files=[],Array.prototype.push.apply(this.files,T.files),this.files=this.files.filter(f=>f.size||f.type))}getData(){return{types:this.types,files:this.files}}}e.DesktopDragAndDropData=b}),define(Q[1498],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FirewallRuleViewModel=void 0;class t{constructor(){this.isIPAddressSelected=!0}set defaultFirewallRuleName(b){this._defaultFirewallRuleName=b}get defaultFirewallRuleName(){return this._defaultFirewallRuleName}set firewallRuleName(b){this._firewallRuleName=b}get firewallRuleName(){return this._firewallRuleName}get defaultIPAddress(){return this._defaultIPAddress}get defaultFromSubnetIPRange(){return this._defaultFromSubnetIPRange}get defaultToSubnetIPRange(){return this._defaultToSubnetIPRange}set fromSubnetIPRange(b){this._fromSubnetIPRange=b}get fromSubnetIPRange(){return this._fromSubnetIPRange?this._fromSubnetIPRange:this._defaultFromSubnetIPRange}set toSubnetIPRange(b){this._toSubnetIPRange=b}get toSubnetIPRange(){return this._toSubnetIPRange?this._toSubnetIPRange:this._defaultToSubnetIPRange}updateDefaultValues(b){function D(f){return f.toString().padStart(2,"0")}function T(f){return[f.getFullYear(),D(f.getMonth()+1),D(f.getDate())].join("-")+"_"+[D(f.getHours()),D(f.getMinutes()),D(f.getSeconds())].join("-")}this._defaultFirewallRuleName=`ClientIPAddress_${T(new Date)}`,this._defaultIPAddress=b,this._defaultFromSubnetIPRange=b.replace(/\.[0-9]+$/g,".0"),this._defaultToSubnetIPRange=b.replace(/\.[0-9]+$/g,".255")}}e.FirewallRuleViewModel=t}),define(Q[1499],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fixupConnectionCredentials=void 0;function t(y){return y.serverName||(y.serverName=""),y.databaseName||(y.databaseName=""),y.userName||(y.userName=""),y.password||(y.password=""),y}e.fixupConnectionCredentials=t}),define(Q[117],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.gen3Version=e.sqlDataWarehouse=e.UNSAVED_GROUP_ID=e.cmsProviderName=e.Actions=e.AuthenticationType=e.trustServerCertificate=e.defaultAuthenticationType=e.enableSqlAuthenticationProviderConfig=e.passwordChars=e.defaultEngine=e.mssqlApplicationNameOption=e.applicationName=e.connectionProviderContextKey=e.anyProviderName=e.pgsqlProviderName=e.mysqlProviderName=e.mssqlCmsProviderName=e.mssqlProviderName=e.capabilitiesOptions=e.outputChannelName=e.sqlConfigSectionName=void 0,e.sqlConfigSectionName="sql",e.outputChannelName="MSSQL",e.capabilitiesOptions="OPTIONS_METADATA",e.mssqlProviderName="MSSQL",e.mssqlCmsProviderName="MSSQL-CMS",e.mysqlProviderName="MYSQL",e.pgsqlProviderName="PGSQL",e.anyProviderName="*",e.connectionProviderContextKey="connectionProvider",e.applicationName="azdata",e.mssqlApplicationNameOption="applicationName",e.defaultEngine="defaultEngine",e.passwordChars="***************",e.enableSqlAuthenticationProviderConfig="mssql.enableSqlAuthenticationProvider",e.defaultAuthenticationType="defaultAuthenticationType",e.trustServerCertificate="trustServerCertificate";var t;(function(b){b.SqlLogin="SqlLogin",b.Integrated="Integrated",b.AzureMFA="AzureMFA",b.AzureMFAAndUser="AzureMFAAndUser",b.DSTSAuth="dstsAuth",b.None="None"})(t||(e.AuthenticationType=t={}));var y;(function(b){b.Show="show",b.Hide="hide"})(y||(e.Actions=y={})),e.cmsProviderName="MSSQL-CMS",e.UNSAVED_GROUP_ID="unsaved",e.sqlDataWarehouse="Azure SQL Data Warehouse",e.gen3Version=12}),define(Q[432],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionOptionSpecialType=e.ServiceOptionType=void 0;var t;(function(b){b.string="string",b.multistring="multistring",b.password="password",b.number="number",b.category="category",b.boolean="boolean",b.object="object"})(t||(e.ServiceOptionType=t={}));var y;(function(b){b.connectionName="connectionName",b.serverName="serverName",b.databaseName="databaseName",b.authType="authType",b.userName="userName",b.password="password",b.appName="appName"})(y||(e.ConnectionOptionSpecialType=y={}))}),define(Q[184],Y([1,0,117]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.delay=e.adjustForMssqlAppName=e.convertToRpcConnectionProfile=e.isServerConnection=e.findProfileInGroup=e.generateUriWithPrefix=e.getUriPrefix=e.generateUri=e.parseNumAsTimeString=e.parseTimeString=e.ConnectionUriRestoreIdAttributeName=e.ConnectionUriBackupIdAttributeName=e.defaultGroupId=e.uriPrefixes=void 0;const y=36e5,b=6e4,D=1e3;e.uriPrefixes={default:"connection:",connection:"connection:",dashboard:"dashboard:",insights:"insights:",notebook:"notebook:"},e.defaultGroupId="C777F06B-202E-4480-B475-FA416154D458",e.ConnectionUriBackupIdAttributeName="backupId",e.ConnectionUriRestoreIdAttributeName="restoreId";function T(o){if(!o)return!1;let u=o.split(".");if(u.length===1)u=[u[0],"0"];else if(u.length!==2)return!1;let d=u[1],p=d.length<3?d.length:3,c=parseInt(u[1].substring(0,p),10);if(u=u[0].split(":"),u.length!==3)return!1;let l=parseInt(u[0],10),n=parseInt(u[1],10),g=parseInt(u[2],10);return c+l*y+n*b+g*D}e.parseTimeString=T;function f(o,u=!0){let d=o,p=Math.floor(d/y);d%=y;let c=Math.floor(d/b);d%=b;let l=Math.floor(d/D);d%=D;let n=p<10?"0"+p:""+p,g=c<10?"0"+c:""+c,w=l<10?"0"+l:""+l,E=d<10?"00"+d:d<100?"0"+d:""+d,C=n+":"+g+":"+w;return d>0&&u?C+"."+E:C}e.parseNumAsTimeString=f;function v(o,u){let d=u?e.uriPrefixes[u]:e.uriPrefixes.default;return S(o,d)}e.generateUri=v;function m(o){let u="";if(o){let d=o.indexOf("://");if(d>0)u=o.substring(0,d+3);else return e.uriPrefixes.default}return u}e.getUriPrefix=m;function S(o,u){let d=o.getOptionsKey();return u+(d||o.serverName+":"+o.databaseName)}e.generateUriWithPrefix=S;function h(o,u){for(let d of u){for(let p of d.connections)if(p.id===o.id)return p;if(d.hasChildren()){let p=h(o,d.children);if(p)return p}}}e.findProfileInGroup=h;function a(o){return!o.options.originalDatabase}e.isServerConnection=a;function r(o){return o?{providerId:o.providerName,connectionId:o.id,options:o.options,connectionName:o.connectionName,serverName:o.serverName,databaseName:o.databaseName,userName:o.userName,password:o.password,authenticationType:o.authenticationType,savePassword:o.savePassword,groupFullName:o.groupFullName,groupId:o.groupId,saveProfile:o.saveProfile,azureTenantId:o.azureTenantId,azureAccount:o.azureAccount}:void 0}e.convertToRpcConnectionProfile=r;function i(o,u){let d=u?t.applicationName+"-"+u:t.applicationName,p="-"+d;return o&&o!==d&&!o.endsWith(p)?o+p:o??d}e.adjustForMssqlAppName=i;function s(o){return new Promise(u=>setTimeout(u,o))}e.delay=s}),define(Q[168],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelComponentTypes=e.ModelViewAction=e.ComponentEventType=void 0;var t;(function(D){D[D.PropertiesChanged=0]="PropertiesChanged",D[D.onDidChange=1]="onDidChange",D[D.onDidClick=2]="onDidClick",D[D.validityChanged=3]="validityChanged",D[D.onMessage=4]="onMessage",D[D.onSelectedRowChanged=5]="onSelectedRowChanged",D[D.onComponentCreated=6]="onComponentCreated",D[D.onCellAction=7]="onCellAction",D[D.onEnterKeyPressed=8]="onEnterKeyPressed",D[D.onInput=9]="onInput",D[D.onComponentLoaded=10]="onComponentLoaded",D[D.onChildClick=11]="onChildClick"})(t||(e.ComponentEventType=t={}));var y;(function(D){D.SelectTab="selectTab",D.AppendData="appendData",D.Filter="filter",D.SetActiveCell="setActiveCell"})(y||(e.ModelViewAction=y={}));var b;(function(D){D[D.NavContainer=0]="NavContainer",D[D.DivContainer=1]="DivContainer",D[D.FlexContainer=2]="FlexContainer",D[D.SplitViewContainer=3]="SplitViewContainer",D[D.Card=4]="Card",D[D.InputBox=5]="InputBox",D[D.DropDown=6]="DropDown",D[D.DeclarativeTable=7]="DeclarativeTable",D[D.ListBox=8]="ListBox",D[D.Button=9]="Button",D[D.CheckBox=10]="CheckBox",D[D.RadioButton=11]="RadioButton",D[D.WebView=12]="WebView",D[D.Text=13]="Text",D[D.Table=14]="Table",D[D.DashboardWidget=15]="DashboardWidget",D[D.DashboardWebview=16]="DashboardWebview",D[D.Form=17]="Form",D[D.Group=18]="Group",D[D.Toolbar=19]="Toolbar",D[D.LoadingComponent=20]="LoadingComponent",D[D.TreeComponent=21]="TreeComponent",D[D.FileBrowserTree=22]="FileBrowserTree",D[D.Editor=23]="Editor",D[D.DiffEditor=24]="DiffEditor",D[D.Hyperlink=25]="Hyperlink",D[D.Image=26]="Image",D[D.RadioCardGroup=27]="RadioCardGroup",D[D.ListView=28]="ListView",D[D.TabbedPanel=29]="TabbedPanel",D[D.Separator=30]="Separator",D[D.PropertiesContainer=31]="PropertiesContainer",D[D.InfoBox=32]="InfoBox",D[D.Slider=33]="Slider",D[D.ExecutionPlan=34]="ExecutionPlan",D[D.Chart=35]="Chart"})(b||(e.ModelComponentTypes=b={}))}),define(Q[1500],Y([1,0,1010]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SqlOAuthService=void 0;class y{performOAuthAuthorization(D,T,f){t.ipcRenderer.send("oauth",{url:T,silent:f,eventId:D})}}e.SqlOAuthService=y}),define(Q[1011],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shortcutStart=e.querySection=e.configShowBatchTime=e.configCopyRemoveNewLine=e.configSaveAsXml=e.configSaveAsCsv=e.copyIncludeHeaders=void 0,e.copyIncludeHeaders="copyIncludeHeaders",e.configSaveAsCsv="saveAsCsv",e.configSaveAsXml="saveAsXml",e.configCopyRemoveNewLine="copyRemoveNewLine",e.configShowBatchTime="showBatchTime",e.querySection="query",e.shortcutStart="shortcut"}),define(Q[1501],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignerPropertyPathValidator=void 0;class t{static validate(b,D){if(!b||b.length===0||b.length>5)return!1;for(let f=0;f<b.length;f++){const v=f%2!==0;if(v&&typeof b[f]!="number"||!v&&typeof b[f]!="string")return!1}let T=D;for(let f=0;f<b.length;){const v=b[f];if(Object.keys(T).indexOf(v)===-1)return!1;if(f===b.length-1)break;f++;const m=T[v],S=b[f];if(!m.data||m.data.length-1<S)return!1;T=m.data[S],f++}return!0}}e.DesignerPropertyPathValidator=t}),define(Q[647],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignerRootObjectPath=e.DesignerEditType=e.CanBeDeletedProperty=e.ScriptProperty=e.NameProperty=void 0,e.NameProperty="name",e.ScriptProperty="script",e.CanBeDeletedProperty="canBeDeleted";var t;(function(y){y[y.Add=0]="Add",y[y.Remove=1]="Remove",y[y.Update=2]="Update",y[y.Move=3]="Move"})(t||(e.DesignerEditType=t={})),e.DesignerRootObjectPath=[]}),define(Q[1502],Y([1,0,40]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COMPONENT_CONFIG=void 0,e.COMPONENT_CONFIG=new t.InjectionToken("component_config")}),define(Q[1503],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChartState=e.DataDirection=e.DataType=e.LegendPosition=e.ChartType=e.InsightType=void 0;var t;(function(v){v.Image="image",v.Table="table",v.Count="count"})(t||(e.InsightType=t={}));var y;(function(v){v.Bar="bar",v.Doughnut="doughnut",v.HorizontalBar="horizontalBar",v.Line="line",v.Pie="pie",v.TimeSeries="timeSeries",v.Scatter="scatter"})(y||(e.ChartType=y={}));var b;(function(v){v.Top="top",v.Bottom="bottom",v.Left="left",v.Right="right",v.None="none"})(b||(e.LegendPosition=b={}));var D;(function(v){v.Number="number",v.Point="point"})(D||(e.DataType=D={}));var T;(function(v){v.Vertical="vertical",v.Horizontal="horizontal"})(T||(e.DataDirection=T={}));class f{constructor(){this.options={type:y.Bar}}dispose(){}}e.ChartState=f}),define(Q[1504],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionPlanState=void 0;class t{constructor(){this._graphs=[]}get graphs(){return this._graphs}set graphs(b){this._graphs=b}}e.ExecutionPlanState=t}),define(Q[1505],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QueryModelViewState=void 0;class t{dispose(){}}e.QueryModelViewState=t}),define(Q[1506],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QueryPlanState=void 0;class t{dispose(){}}e.QueryPlanState=t}),define(Q[1507],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TopOperationsState=void 0;class t{dispose(){}}e.TopOperationsState=t}),define(Q[553],Y([1,0,117]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wrapStringWithNewLine=e.getSqlConfigValue=e.getSqlConfigSection=void 0;function y(f,v){let m=f.getValue(t.sqlConfigSectionName);return m?m[v]:{}}e.getSqlConfigSection=y;function b(f,v){let m=f.getValue(t.sqlConfigSectionName);return m?m[v]:void 0}e.getSqlConfigValue=b;function D(f,v){if(!f)return f;let m=` `,S="";for(;f.length>v;){let h=!1;for(let a=v-1;a>=0;a--)if(T(f.charAt(a))){S=S+[f.slice(0,a),m].join(""),f=f.slice(a+1),h=!0;break}h||(S+=[f.slice(0,v),m].join(""),f=f.slice(v))}return S+f}e.wrapStringWithNewLine=D;function T(f){var v=new RegExp(/^\s$/);return v.test(f.charAt(0))}}),define(Q[1012],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TARGET_ICON_CLASS=e.AssessmentType=e.AssessmentTargetType=void 0;var t;(function(b){b[b.Server=1]="Server",b[b.Database=2]="Database"})(t||(e.AssessmentTargetType=t={}));var y;(function(b){b[b.AvailableRules=1]="AvailableRules",b[b.InvokeAssessment=2]="InvokeAssessment",b[b.ReportGeneration=3]="ReportGeneration"})(y||(e.AssessmentType=y={})),e.TARGET_ICON_CLASS={[t.Database]:"database",[t.Server]:"server-page"}}),define(Q[774],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectMetadataWrapper=void 0;class t{get fullName(){return`${this.schema}.${this.name}`}constructor(b){this.metadataType=b.metadataType,this.metadataTypeName=b.metadataTypeName,this.urn=b.urn,this.name=b.name,this.schema=b.schema,this.parentName=b.parentName,this.parentTypeName=b.parentTypeName}matches(b){return b?this.metadataType===b.metadataType&&this.schema===b.schema&&this.name===b.name&&this.parentName===b.parentName:!1}static sort(b,D){if(b.metadataType<D.metadataType)return-1;if(b.metadataType>D.metadataType)return 1;{const T=b.schema&&D.schema?b.schema.localeCompare(D.schema):0;return T!==0?T:b.name.localeCompare(D.name)}}}e.ObjectMetadataWrapper=t}),define(Q[1508],Y([1,0,40]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let y=class{constructor(D){this._changeRef=D}set data(D){this._labels=[],this._labels=D.columns,this._values=D.rows[0],this._changeRef.detectChanges()}};fe([(0,t.Input)()],y.prototype,"data",null),y=fe([(0,t.Component)({template:` <div style="margin-left: 5px" *ngFor="let label of _labels; let i = index"> <span style="font-size: 20px">{{_values[i]}} </span> <span>{{_labels[i]}}</span> </div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef)))],y),e.default=y}),define(Q[775],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionPlanFileViewCache=void 0;class t{constructor(){this.executionPlanFileViewMap=new Map}static getInstance(){return t.instance||(t.instance=new t),t.instance}}e.ExecutionPlanFileViewCache=t}),define(Q[1013],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionPlanWidgetController=void 0;class t{constructor(b){this._parentContainer=b,this._executionPlanWidgetMap=new Map}addWidget(b){b.identifier&&!this._executionPlanWidgetMap.has(b.identifier)&&(this._executionPlanWidgetMap.set(b.identifier,b),b.container&&(b.container.classList.add("child"),this._parentContainer.appendChild(b.container),b.focus()))}removeWidget(b){if(b.identifier)if(this._executionPlanWidgetMap.has(b.identifier))b.dispose(),this._parentContainer.removeChild(this._executionPlanWidgetMap.get(b.identifier).container),this._executionPlanWidgetMap.delete(b.identifier);else throw new Error("The view is not present in the container")}toggleWidget(b){this._executionPlanWidgetMap.has(b.identifier)?this.removeWidget(b):this.addWidget(b)}}e.ExecutionPlanWidgetController=t}),define(Q[1014],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.visualizerExtensions=void 0,e.visualizerExtensions="visualizerExtensions"}),define(Q[1509],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellMagicMapper=void 0;const t="*";class y{constructor(D){if(this.kernelToMagicMap=new Map,D){for(let T of D)if((!T.kernels||T.kernels.length===0)&&this.addKernelMapping(t,T),T.kernels)for(let f of T.kernels)this.addKernelMapping(f.toLowerCase(),T)}}addKernelMapping(D,T){let f=this.kernelToMagicMap.get(D)||[];f.push(T),this.kernelToMagicMap.set(D,f)}findMagicForKernel(D,T){if(T===void 0||!D)return;T=T.toLowerCase(),D=D.toLowerCase();let f=this.kernelToMagicMap.get(T)||[];if(f)return f.find(v=>v.magic.toLowerCase()===D)}toLanguageMagic(D,T){let f=this.findMagicForKernel(D,T);return f||(f=this.findMagicForKernel(D,t)),f}}e.CellMagicMapper=y}),define(Q[1510],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.gfmHtmlTables=e.gfm=e.taskListItems=e.tables=e.strikethrough=e.highlightedCodeBlock=void 0;const t=/highlight-(?:text|source)-([a-z0-9]+)/;function y(i){i.addRule("highlightedCodeBlock",{filter:function(s){let o=s.firstChild;return s.nodeName==="DIV"&&t.test(s.className)&&o&&o.nodeName==="PRE"},replacement:function(s,o,u){let p=((o.className||"").match(t)||[null,""])[1];return` `+u.fence+p+` `+o.firstChild.textContent+` `+u.fence+` `}})}e.highlightedCodeBlock=y;function b(i){i.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(s){return"~"+s+"~"}})}e.strikethrough=b;let D={};D.tableCell={filter:["th","td"],replacement:function(i,s){return v(i,s)}},D.tableRow={filter:"tr",replacement:function(i,s){const o=T(s)?m(s):"";return` `+i+(o?` `+o:"")}},D.table={filter:function(i){return i.nodeName==="TABLE"},replacement:function(i,s){return i=i.replace(` `,` `),T(s.rows[0])?` `+i+` `:` |`+" |".repeat(s.rows[0].childNodes.length)+` `+m(s.rows[0])+i+` `}},D.tableSection={filter:["thead","tbody","tfoot"],replacement:function(i){return i}};function T(i){let s=i.parentNode;return s.nodeName==="THEAD"||s.firstChild===i&&(s.nodeName==="TABLE"||f(s))&&Array.prototype.every.call(i.childNodes,function(o){return o.nodeName==="TH"})}function f(i){let s=i.previousSibling;return i.nodeName==="TBODY"&&(!s||s.nodeName==="THEAD"&&/^\s*$/i.test(s.textContent))}function v(i,s){let o=Array.prototype.indexOf.call(s.parentNode.childNodes,s),u=" ";return o===0&&(u="| "),u+i+" |"}function m(i){const s={left:":--",right:"--:",center:":-:"};let o="";for(let u=0;u<i.childNodes.length;u++){let d="---",p=(i.childNodes[u].getAttribute("align")||"").toLowerCase();p&&(d=s[p]||d),o+=v(d,i.childNodes[u])}return o}function S(i){for(let s in D)i.addRule(s,D[s])}e.tables=S;function h(i){i.addRule("taskListItems",{filter:function(s){return s.type==="checkbox"&&s.parentNode.nodeName==="LI"},replacement:function(s,o){return(o.checked?"[x]":"[ ]")+" "}})}e.taskListItems=h;function a(i){i.use([y,b,S,h])}e.gfm=a;function r(i){i.use([y,b,h])}e.gfmHtmlTables=r}),define(Q[1015],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.highlightSelectedText=void 0;function t(){let y=document.getSelection()?.focusNode;for(;y?.parentNode?.nodeName?.toLowerCase()&&y?.parentNode?.nodeName?.toLowerCase()!=="mark";)y=y.parentNode;if(y?.parentNode?.nodeName?.toLowerCase()!=="mark")for(y=document.getSelection()?.focusNode;y?.parentNode?.nodeName?.toLowerCase()&&y?.parentNode?.nodeName?.toLowerCase()!=="span"&&y?.parentElement?.style?.backgroundColor!=="yellow";)y=y.parentNode;let b=y?.parentNode?.nodeName?.toLowerCase(),D=y?.parentElement?.style?.backgroundColor;if(b==="mark"){let T=y.parentNode,f=y.parentNode.parentNode,v=T.nextSibling;for(;T.childNodes.length>0;)v?f.insertBefore(T.firstChild,v):f.appendChild(T.firstChild);document.execCommand("formatBlock",!1,"span")}else y?.parentNode?.nodeName?.toLowerCase()==="span"&&D==="yellow"?(y.parentElement.style.backgroundColor="",document.execCommand("formatBlock",!1,"span")):document.execCommand("hiliteColor",!1,"Yellow")}e.highlightSelectedText=t}),define(Q[1016],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useNewMarkdownRendererKey=void 0,e.useNewMarkdownRendererKey="notebook.useNewMarkdownRenderer"}),define(Q[1511],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PROFILER_TABLE_COMMAND_SEARCH=void 0,e.PROFILER_TABLE_COMMAND_SEARCH="profiler.table.action.search"}),define(Q[1017],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RESOURCE_VIEWER_VIEW_ID=e.RESOURCE_VIEWER_VIEW_CONTAINER_ID=void 0,e.RESOURCE_VIEWER_VIEW_CONTAINER_ID="workbench.viewContainer.resourceViewer",e.RESOURCE_VIEWER_VIEW_ID="workbench.view.resourceViewer"}),define(Q[1512],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TASKS_VIEW_ID=e.TASKS_CONTAINER_ID=void 0,e.TASKS_CONTAINER_ID="workbench.panel.tasks",e.TASKS_VIEW_ID="workbench.panel.tasks.view"}),define(Q[1513],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AzureAccountService=void 0;class t{registerProxy(b){this._proxy=b}async getSubscriptions(b,D,T){return this.checkProxy(),this._proxy.getSubscriptions(b,D,T)}async getStorageAccounts(b,D,T){return this.checkProxy(),this._proxy.getStorageAccounts(b,D,T)}async getBlobContainers(b,D,T,f){return this.checkProxy(),this._proxy.getBlobContainers(b,D,T,f)}async getBlobs(b,D,T,f,v){return this.checkProxy(),this._proxy.getBlobs(b,D,T,f,v)}async getStorageAccountAccessKey(b,D,T,f){return this.checkProxy(),this._proxy.getStorageAccountAccessKey(b,D,T,f)}checkProxy(){if(!this._proxy)throw new Error("Azure Account proxy not initialized")}}e.AzureAccountService=t}),define(Q[1018],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AzureBlobService=void 0;class t{registerProxy(b){this._proxy=b}createSas(b,D,T,f,v){return this.checkProxy(),Promise.resolve(this._proxy.createSas(b,D,T,f,v))}checkProxy(){if(!this._proxy)throw new Error("Azure Blob proxy not initialized")}}e.AzureBlobService=t}),define(Q[248],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBootstrapParams=e.ISelector=void 0,e.ISelector="selector",e.IBootstrapParams="bootstrap_params"}),define(Q[1514],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisconnectParams=e.CancelConnectParams=void 0;class t{}e.CancelConnectParams=t;class y{}e.DisconnectParams=y}),define(Q[1019],Y([1,0,117]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isMssqlAuthProviderEnabled=void 0;function y(b,D){return b===t.mssqlProviderName&&(D?.getValue(t.enableSqlAuthenticationProviderConfig)??!0)}e.isMssqlAuthProviderEnabled=y}),define(Q[1515],Y([1,0,363]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataGridProviderService=void 0;class y{constructor(){this._providers=new Map}registerProvider(D,T){if(this._providers.has(D))throw new Error(`A DataGridProvider with id "${D}" is already registered`);this._providers.set(D,T)}unregisterProvider(D){this._providers.delete(D)}getDataGridProvider(D){const T=this._providers.get(D);if(T)return T;throw(0,t.invalidProvider)(D)}}e.DataGridProviderService=y}),define(Q[1020],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.restore=e.backup=void 0,e.backup="Backup",e.restore="Restore"}),define(Q[271],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellEditModes=e.CellEditType=e.MoveDirection=e.CellExecutionState=e.ViewMode=void 0;var t;(function(f){f[f.Notebook=0]="Notebook",f[f.Views=1]="Views"})(t||(e.ViewMode=t={}));var y;(function(f){f[f.Hidden=0]="Hidden",f[f.Stopped=1]="Stopped",f[f.Running=2]="Running",f[f.Error=3]="Error"})(y||(e.CellExecutionState=y={}));var b;(function(f){f[f.Up=0]="Up",f[f.Down=1]="Down"})(b||(e.MoveDirection=b={}));var D;(function(f){f[f.Output=0]="Output",f[f.OutputData=1]="OutputData"})(D||(e.CellEditType=D={}));var T;(function(f){f[f.CODE=0]="CODE",f[f.MARKDOWN=1]="MARKDOWN",f[f.SPLIT=2]="SPLIT",f[f.WYSIWYG=3]="WYSIWYG"})(T||(e.CellEditModes=T={}))}),define(Q[1021],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MimeModel=void 0;class t{constructor(b={}){this.trusted=!!b.trusted,this._data=b.data||{},this._metadata=b.metadata||{},this._callback=b.callback,this._themeService=b.themeService,this._accessibilityService=b.accessibilityService,this._quickInputService=b.quickInputService}get data(){return this._data}get metadata(){return this._metadata}get themeService(){return this._themeService}get accessibilityService(){return this._accessibilityService}get quickInputService(){return this._quickInputService}setData(b){this._data=b.data||this._data,this._metadata=b.metadata||this._metadata,this._callback(b)}}e.MimeModel=t}),define(Q[1022],Y([1,0,4512,201]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultSanitizer=void 0;class b{static reg(f){return new RegExp("^"+f+"$","i")}static{this.N={integer:"[+-]?[0-9]+",integer_pos:"[+]?[0-9]+",integer_zero_ff:"([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",number:"[+-]?([0-9]*[.])?[0-9]+(e-?[0-9]*)?",number_pos:"[+]?([0-9]*[.])?[0-9]+(e-?[0-9]*)?",number_zero_hundred:"[+]?(([0-9]|[1-9][0-9])([.][0-9]+)?|100)",number_zero_one:"[+]?(1([.][0]+)?|0([.][0-9]+)?)"}}static{this.B={angle:`(${b.N.number}(deg|rad|grad|turn)|0)`,frequency:`${b.N.number}(Hz|kHz)`,ident:(0,y.raw)`-?([_a-z]|[\xA0-\xFF]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])([_a-z0-9-]|[\xA0-\xFF]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*`,len_or_perc:`(0|${b.N.number}(px|em|rem|ex|in|cm|mm|pt|pc|%))`,length:`(${b.N.number}(px|em|rem|ex|in|cm|mm|pt|pc)|0)`,length_pos:`(${b.N.number_pos}(px|em|rem|ex|in|cm|mm|pt|pc)|0)`,percentage:`${b.N.number}%`,percentage_pos:`${b.N.number_pos}%`,percentage_zero_hundred:`${b.N.number_zero_hundred}%`,string:(0,y.raw)`(\"([^\n\r\f\\"]|\\\n|\r\n|\r|\f|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*\")|(\'([^\n\r\f\\']|\\\n|\r\n|\r|\f|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*\')`,time:`${b.N.number}(s|ms)`,url:"url\\(.*?\\)",z_index:"[+-]?[0-9]{1,7}"}}static{this.A={absolute_size:"xx-small|x-small|small|medium|large|x-large|xx-large",attachment:"scroll|fixed|local",bg_origin:"border-box|padding-box|content-box",border_style:"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset",box:"border-box|padding-box|content-box",display_inside:"auto|block|table|flex|grid",display_outside:"block-level|inline-level|none|table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption",ending_shape:"circle|ellipse",generic_family:"serif|sans-serif|cursive|fantasy|monospace",generic_voice:"male|female|child",relative_size:"smaller|larger",repeat_style:"repeat-x|repeat-y|((?:repeat|space|round|no-repeat)(?:\\s*(?:repeat|space|round|no-repeat))?)",side_or_corner:"(left|right)?\\s*(top|bottom)?",single_animation_direction:"normal|reverse|alternate|alternate-reverse",single_animation_fill_mode:"none|forwards|backwards|both",single_animation_play_state:"running|paused"}}static{this._COLOR={hex:"\\#(0x)?[0-9a-f]+",name:"aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|transparent|violet|wheat|white|whitesmoke|yellow|yellowgreen",rgb:(0,y.raw)`rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)`,rgba:(0,y.raw)`rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(${b.N.integer_zero_ff}|${b.N.number_zero_one}|${b.B.percentage_zero_hundred})\s*\)`}}static{this._C={alpha:`${b.N.integer_zero_ff}|${b.N.number_zero_one}|${b.B.percentage_zero_hundred}`,alphavalue:b.N.number_zero_one,bg_position:`((${b.B.len_or_perc}|left|center|right|top|bottom)\\s*){1,4}`,bg_size:`(${b.B.length_pos}|${b.B.percentage}|auto){1,2}|cover|contain`,border_width:`thin|medium|thick|${b.B.length}`,bottom:`${b.B.length}|auto`,color:`${b._COLOR.hex}|${b._COLOR.rgb}|${b._COLOR.rgba}|${b._COLOR.name}`,family_name:`${b.B.string}|(${b.B.ident}\\s*)+`,image_decl:b.B.url,left:`${b.B.length}|auto`,loose_quotable_words:`(${b.B.ident})+`,margin_width:`${b.B.len_or_perc}|auto`,padding_width:`${b.B.length_pos}|${b.B.percentage_pos}`,page_url:b.B.url,position:`((${b.B.len_or_perc}|left|center|right|top|bottom)\\s*){1,4}`,right:`${b.B.length}|auto`,shadow:"",size:`closest-side|farthest-side|closest-corner|farthest-corner|${b.B.length}|(${b.B.len_or_perc})\\s+(${b.B.len_or_perc})`,top:`${b.B.length}|auto`}}static{this._C1={image_list:`image\\(\\s*(${b.B.url})*\\s*(${b.B.url}|${b._C.color})\\s*\\)`,shadow:`((${b._C.color})\\s+((${b.B.length})\\s*){2,4}(s+inset)?)|((inset\\s+)?((${b.B.length})\\s*){2,4}\\s*(${b._C.color})?)`}}static{this._C2={bg_image:`(${b.B.url}|${b._C1.image_list})|none`,image:`${b.B.url}|${b._C1.image_list}`,shape:`rect\\(\\s*(${b._C.top})\\s*,\\s*(${b._C.right})\\s*,\\s*(${b._C.bottom})\\s*,\\s*(${b._C.left})\\s*\\)`}}static{this.C={...b._C,...b._C1,...b._C2}}static{this.AP={border_collapse:"collapse|separate",box:"normal|none|contents",box_sizing:"content-box|padding-box|border-box",caption_side:"top|bottom",clear:"none|left|right|both",direction:"ltr|rtl",empty_cells:"show|hide",float:"left|right|none",font_stretch:"normal|wider|narrower|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded",font_style:"normal|italic|oblique",font_variant:"normal|small-caps",font_weight:"normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900",list_style_position:"inside|outside",list_style_type:"disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman|lower-greek|lower-latin|upper-latin|armenian|georgian|lower-alpha|upper-alpha|none",overflow:"visible|hidden|scroll|auto",overflow_wrap:"normal|break-word",overflow_x:"visible|hidden|scroll|auto|no-display|no-content",page_break_after:"auto|always|avoid|left|right",page_break_before:"auto|always|avoid|left|right",page_break_inside:"avoid|auto",position:"static|relative|absolute",resize:"none|both|horizontal|vertical",speak:"normal|none|spell-out",speak_header:"once|always",speak_numeral:"digits|continuous",speak_punctuation:"code|none",table_layout:"auto|fixed",text_align:"left|right|center|justify",text_decoration:"none|((underline|overline|line-through|blink)\\s*)+",text_transform:"capitalize|uppercase|lowercase|none",text_wrap:"normal|unrestricted|none|suppress",unicode_bidi:"normal|embed|bidi-override",visibility:"visible|hidden|collapse",white_space:"normal|pre|nowrap|pre-wrap|pre-line",word_break:"normal|keep-all|break-all"}}static{this._CP={background_attachment:`${b.A.attachment}(,\\s*${b.A.attachment})*`,background_color:b.C.color,background_origin:`${b.A.box}(,\\s*${b.A.box})*`,background_repeat:`${b.A.repeat_style}(,\\s*${b.A.repeat_style})*`,border:`((${b.C.border_width}|${b.A.border_style}|${b.C.color})\\s*){1,3}`,border_radius:`((${b.B.len_or_perc})\\s*){1,4}(\\/\\s*((${b.B.len_or_perc})\\s*){1,4})?`,border_spacing:`${b.B.length}\\s*(${b.B.length})?`,border_top_color:b.C.color,border_top_style:b.A.border_style,border_width:`((${b.C.border_width})\\s*){1,4}`,color:b.C.color,cursor:`(${b.B.url}(\\s*,\\s*)?)*(auto|crosshair|default|pointer|move|e-resize|ne-resize|nw-resize|n-resize|se-resize|sw-resize|s-resize|w-resize|text|wait|help|progress|all-scroll|col-resize|hand|no-drop|not-allowed|row-resize|vertical-text)`,display:`inline|block|list-item|run-in|inline-list-item|inline-block|table|inline-table|table-cell|table-caption|flex|inline-flex|grid|inline-grid|${b.A.display_inside}|${b.A.display_outside}|inherit|inline-box|inline-stack`,display_outside:b.A.display_outside,elevation:`${b.B.angle}|below|level|above|higher|lower`,font_family:`(${b.C.family_name}|${b.A.generic_family})(,\\s*(${b.C.family_name}|${b.A.generic_family}))*`,height:`${b.B.length}|${b.B.percentage}|auto`,letter_spacing:`normal|${b.B.length}`,list_style_image:`${b.C.image}|none`,margin_right:b.C.margin_width,max_height:`${b.B.length_pos}|${b.B.percentage_pos}|none|auto`,min_height:`${b.B.length_pos}|${b.B.percentage_pos}|auto`,opacity:b.C.alphavalue,outline_color:`${b.C.color}|invert`,outline_width:b.C.border_width,padding:`((${b.C.padding_width})\\s*){1,4}`,padding_top:b.C.padding_width,pitch_range:b.N.number,right:`${b.B.length}|${b.B.percentage}|auto`,stress:b.N.number,text_indent:`${b.B.length}|${b.B.percentage}`,text_shadow:`none|${b.C.shadow}(,\\s*(${b.C.shadow}))*`,volume:`${b.N.number_pos}|${b.B.percentage_pos}|silent|x-soft|soft|medium|loud|x-loud`,word_wrap:b.AP.overflow_wrap,zoom:`normal|${b.N.number_pos}|${b.B.percentage_pos}`,backface_visibility:b.AP.visibility,background_clip:`${b.A.box}(,\\s*(${b.A.box}))*`,background_position:`${b.C.bg_position}(,\\s*(${b.C.bg_position}))*`,border_bottom_color:b.C.color,border_bottom_style:b.A.border_style,border_color:`((${b.C.color})\\s*){1,4}`,border_left_color:b.C.color,border_right_color:b.C.color,border_style:`((${b.A.border_style})\\s*){1,4}`,border_top_left_radius:`(${b.B.length}|${b.B.percentage})(\\s*(${b.B.length}|${b.B.percentage}))?`,border_top_width:b.C.border_width,box_shadow:`none|${b.C.shadow}(,\\s*(${b.C.shadow}))*`,clip:`${b.C.shape}|auto`,display_inside:b.A.display_inside,font_size:`${b.A.absolute_size}|${b.A.relative_size}|${b.B.length_pos}|${b.B.percentage_pos}`,line_height:`normal|${b.N.number_pos}|${b.B.length_pos}|${b.B.percentage_pos}`,margin_left:b.C.margin_width,max_width:`${b.B.length_pos}|${b.B.percentage_pos}|none|auto`,outline_style:b.A.border_style,padding_bottom:b.C.padding_width,padding_right:b.C.padding_width,perspective:`none|${b.B.length}`,richness:b.N.number,text_overflow:`((clip|ellipsis|${b.B.string})\\s*){1,2}`,top:`${b.B.length}|${b.B.percentage}|auto`,width:`${b.B.length_pos}|${b.B.percentage_pos}|auto`,z_index:`auto|${b.B.z_index}`,background:`(((${b.C.bg_position}\\s*(\\/\\s*${b.C.bg_size})?)|(${b.A.repeat_style})|(${b.A.attachment})|(${b.A.bg_origin})|(${b.C.bg_image})|(${b.C.color}))\\s*)+`,background_size:`${b.C.bg_size}(,\\s*${b.C.bg_size})*`,border_bottom_left_radius:`(${b.B.length}|${b.B.percentage})(\\s*(${b.B.length}|${b.B.percentage}))?`,border_bottom_width:b.C.border_width,border_left_style:b.A.border_style,border_right_style:b.A.border_style,border_top:`((${b.C.border_width}|${b.A.border_style}|${b.C.color})\\s*){1,3}`,bottom:`${b.B.len_or_perc}|auto`,list_style:`((${b.AP.list_style_type}|${b.AP.list_style_position}|${b.C.image}|none})\\s*){1,3}`,margin_top:b.C.margin_width,outline:`((${b.C.color}|invert|${b.A.border_style}|${b.C.border_width})\\s*){1,3}`,overflow_y:b.AP.overflow_x,pitch:`${b.B.frequency}|x-low|low|medium|high|x-high`,vertical_align:`baseline|sub|super|top|text-top|middle|bottom|text-bottom|${b.B.len_or_perc}`,word_spacing:`normal|${b.B.length}`,background_image:`${b.C.bg_image}(,\\s*${b.C.bg_image})*`,border_bottom_right_radius:`(${b.B.length}|${b.B.percentage})(\\s*(${b.B.length}|${b.B.percentage}))?`,border_left_width:b.C.border_width,border_right_width:b.C.border_width,left:`${b.B.len_or_perc}|auto`,margin_bottom:b.C.margin_width,pause_after:`${b.B.time}|${b.B.percentage}`,speech_rate:`${b.N.number}|x-slow|slow|medium|fast|x-fast|faster|slower`,transition_duration:`${b.B.time}(,\\s*${b.B.time})*`,border_bottom:`((${b.C.border_width}|${b.A.border_style}|${b.C.color})\\s*){1,3}`,border_right:`((${b.C.border_width}|${b.A.border_style}|${b.C.color})\\s*){1,3}`,margin:`((${b.C.margin_width})\\s*){1,4}`,padding_left:b.C.padding_width,border_left:`((${b.C.border_width}|${b.A.border_style}|${b.C.color})\\s*){1,3}`,quotes:`(${b.B.string}\\s*${b.B.string})+|none`,border_top_right_radius:`(${b.B.length}|${b.B.percentage})(\\s*(${b.B.length}|${b.B.percentage}))?`,min_width:`${b.B.length_pos}|${b.B.percentage_pos}|auto`}}static{this._CP1={font:`(((((${b.AP.font_style}|${b.AP.font_variant}|${b.AP.font_weight})\\s*){1,3})?\\s*(${b._CP.font_size})\\s*(\\/\\s*(${b._CP.line_height}))?\\s+(${b._CP.font_family}))|caption|icon|menu|message-box|small-caption|status-bar)`}}static{this.CP={...b._CP,...b._CP1}}static{this.BORDER_COLLAPSE=b.reg(b.AP.border_collapse)}static{this.BOX=b.reg(b.AP.box)}static{this.BOX_SIZING=b.reg(b.AP.box_sizing)}static{this.CAPTION_SIDE=b.reg(b.AP.caption_side)}static{this.CLEAR=b.reg(b.AP.clear)}static{this.DIRECTION=b.reg(b.AP.direction)}static{this.EMPTY_CELLS=b.reg(b.AP.empty_cells)}static{this.FLOAT=b.reg(b.AP.float)}static{this.FONT_STRETCH=b.reg(b.AP.font_stretch)}static{this.FONT_STYLE=b.reg(b.AP.font_style)}static{this.FONT_VARIANT=b.reg(b.AP.font_variant)}static{this.FONT_WEIGHT=b.reg(b.AP.font_weight)}static{this.LIST_STYLE_POSITION=b.reg(b.AP.list_style_position)}static{this.LIST_STYLE_TYPE=b.reg(b.AP.list_style_type)}static{this.OVERFLOW=b.reg(b.AP.overflow)}static{this.OVERFLOW_WRAP=b.reg(b.AP.overflow_wrap)}static{this.OVERFLOW_X=b.reg(b.AP.overflow_x)}static{this.PAGE_BREAK_AFTER=b.reg(b.AP.page_break_after)}static{this.PAGE_BREAK_BEFORE=b.reg(b.AP.page_break_before)}static{this.PAGE_BREAK_INSIDE=b.reg(b.AP.page_break_inside)}static{this.POSITION=b.reg(b.AP.position)}static{this.RESIZE=b.reg(b.AP.resize)}static{this.SPEAK=b.reg(b.AP.speak)}static{this.SPEAK_HEADER=b.reg(b.AP.speak_header)}static{this.SPEAK_NUMERAL=b.reg(b.AP.speak_numeral)}static{this.SPEAK_PUNCTUATION=b.reg(b.AP.speak_punctuation)}static{this.TABLE_LAYOUT=b.reg(b.AP.table_layout)}static{this.TEXT_ALIGN=b.reg(b.AP.text_align)}static{this.TEXT_DECORATION=b.reg(b.AP.text_decoration)}static{this.TEXT_TRANSFORM=b.reg(b.AP.text_transform)}static{this.TEXT_WRAP=b.reg(b.AP.text_wrap)}static{this.UNICODE_BIDI=b.reg(b.AP.unicode_bidi)}static{this.VISIBILITY=b.reg(b.AP.visibility)}static{this.WHITE_SPACE=b.reg(b.AP.white_space)}static{this.WORD_BREAK=b.reg(b.AP.word_break)}static{this.BACKGROUND_ATTACHMENT=b.reg(b.CP.background_attachment)}static{this.BACKGROUND_COLOR=b.reg(b.CP.background_color)}static{this.BACKGROUND_ORIGIN=b.reg(b.CP.background_origin)}static{this.BACKGROUND_REPEAT=b.reg(b.CP.background_repeat)}static{this.BORDER=b.reg(b.CP.border)}static{this.BORDER_RADIUS=b.reg(b.CP.border_radius)}static{this.BORDER_SPACING=b.reg(b.CP.border_spacing)}static{this.BORDER_TOP_COLOR=b.reg(b.CP.border_top_color)}static{this.BORDER_TOP_STYLE=b.reg(b.CP.border_top_style)}static{this.BORDER_WIDTH=b.reg(b.CP.border_width)}static{this.COLOR=b.reg(b.CP.color)}static{this.CURSOR=b.reg(b.CP.cursor)}static{this.DISPLAY=b.reg(b.CP.display)}static{this.DISPLAY_OUTSIDE=b.reg(b.CP.display_outside)}static{this.ELEVATION=b.reg(b.CP.elevation)}static{this.FONT_FAMILY=b.reg(b.CP.font_family)}static{this.HEIGHT=b.reg(b.CP.height)}static{this.LETTER_SPACING=b.reg(b.CP.letter_spacing)}static{this.LIST_STYLE_IMAGE=b.reg(b.CP.list_style_image)}static{this.MARGIN_RIGHT=b.reg(b.CP.margin_right)}static{this.MAX_HEIGHT=b.reg(b.CP.max_height)}static{this.MIN_HEIGHT=b.reg(b.CP.min_height)}static{this.OPACITY=b.reg(b.CP.opacity)}static{this.OUTLINE_COLOR=b.reg(b.CP.outline_color)}static{this.OUTLINE_WIDTH=b.reg(b.CP.outline_width)}static{this.PADDING=b.reg(b.CP.padding)}static{this.PADDING_TOP=b.reg(b.CP.padding_top)}static{this.PITCH_RANGE=b.reg(b.CP.pitch_range)}static{this.RIGHT=b.reg(b.CP.right)}static{this.STRESS=b.reg(b.CP.stress)}static{this.TEXT_INDENT=b.reg(b.CP.text_indent)}static{this.TEXT_SHADOW=b.reg(b.CP.text_shadow)}static{this.VOLUME=b.reg(b.CP.volume)}static{this.WORD_WRAP=b.reg(b.CP.word_wrap)}static{this.ZOOM=b.reg(b.CP.zoom)}static{this.BACKFACE_VISIBILITY=b.reg(b.CP.backface_visibility)}static{this.BACKGROUND_CLIP=b.reg(b.CP.background_clip)}static{this.BACKGROUND_POSITION=b.reg(b.CP.background_position)}static{this.BORDER_BOTTOM_COLOR=b.reg(b.CP.border_bottom_color)}static{this.BORDER_BOTTOM_STYLE=b.reg(b.CP.border_bottom_style)}static{this.BORDER_COLOR=b.reg(b.CP.border_color)}static{this.BORDER_LEFT_COLOR=b.reg(b.CP.border_left_color)}static{this.BORDER_RIGHT_COLOR=b.reg(b.CP.border_right_color)}static{this.BORDER_STYLE=b.reg(b.CP.border_style)}static{this.BORDER_TOP_LEFT_RADIUS=b.reg(b.CP.border_top_left_radius)}static{this.BORDER_TOP_WIDTH=b.reg(b.CP.border_top_width)}static{this.BOX_SHADOW=b.reg(b.CP.box_shadow)}static{this.CLIP=b.reg(b.CP.clip)}static{this.DISPLAY_INSIDE=b.reg(b.CP.display_inside)}static{this.FONT_SIZE=b.reg(b.CP.font_size)}static{this.LINE_HEIGHT=b.reg(b.CP.line_height)}static{this.MARGIN_LEFT=b.reg(b.CP.margin_left)}static{this.MAX_WIDTH=b.reg(b.CP.max_width)}static{this.OUTLINE_STYLE=b.reg(b.CP.outline_style)}static{this.PADDING_BOTTOM=b.reg(b.CP.padding_bottom)}static{this.PADDING_RIGHT=b.reg(b.CP.padding_right)}static{this.PERSPECTIVE=b.reg(b.CP.perspective)}static{this.RICHNESS=b.reg(b.CP.richness)}static{this.TEXT_OVERFLOW=b.reg(b.CP.text_overflow)}static{this.TOP=b.reg(b.CP.top)}static{this.WIDTH=b.reg(b.CP.width)}static{this.Z_INDEX=b.reg(b.CP.z_index)}static{this.BACKGROUND=b.reg(b.CP.background)}static{this.BACKGROUND_SIZE=b.reg(b.CP.background_size)}static{this.BORDER_BOTTOM_LEFT_RADIUS=b.reg(b.CP.border_bottom_left_radius)}static{this.BORDER_BOTTOM_WIDTH=b.reg(b.CP.border_bottom_width)}static{this.BORDER_LEFT_STYLE=b.reg(b.CP.border_left_style)}static{this.BORDER_RIGHT_STYLE=b.reg(b.CP.border_right_style)}static{this.BORDER_TOP=b.reg(b.CP.border_top)}static{this.BOTTOM=b.reg(b.CP.bottom)}static{this.LIST_STYLE=b.reg(b.CP.list_style)}static{this.MARGIN_TOP=b.reg(b.CP.margin_top)}static{this.OUTLINE=b.reg(b.CP.outline)}static{this.OVERFLOW_Y=b.reg(b.CP.overflow_y)}static{this.PITCH=b.reg(b.CP.pitch)}static{this.VERTICAL_ALIGN=b.reg(b.CP.vertical_align)}static{this.WORD_SPACING=b.reg(b.CP.word_spacing)}static{this.BACKGROUND_IMAGE=b.reg(b.CP.background_image)}static{this.BORDER_BOTTOM_RIGHT_RADIUS=b.reg(b.CP.border_bottom_right_radius)}static{this.BORDER_LEFT_WIDTH=b.reg(b.CP.border_left_width)}static{this.BORDER_RIGHT_WIDTH=b.reg(b.CP.border_right_width)}static{this.LEFT=b.reg(b.CP.left)}static{this.MARGIN_BOTTOM=b.reg(b.CP.margin_bottom)}static{this.PAUSE_AFTER=b.reg(b.CP.pause_after)}static{this.SPEECH_RATE=b.reg(b.CP.speech_rate)}static{this.TRANSITION_DURATION=b.reg(b.CP.transition_duration)}static{this.BORDER_BOTTOM=b.reg(b.CP.border_bottom)}static{this.BORDER_RIGHT=b.reg(b.CP.border_right)}static{this.MARGIN=b.reg(b.CP.margin)}static{this.PADDING_LEFT=b.reg(b.CP.padding_left)}static{this.BORDER_LEFT=b.reg(b.CP.border_left)}static{this.FONT=b.reg(b.CP.font)}static{this.QUOTES=b.reg(b.CP.quotes)}static{this.BORDER_TOP_RIGHT_RADIUS=b.reg(b.CP.border_top_right_radius)}static{this.MIN_WIDTH=b.reg(b.CP.min_width)}}class D{constructor(){this._options={allowedTags:["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blockquote","br","button","canvas","caption","center","cite","code","col","colgroup","colspan","command","data","datalist","dd","del","details","dfn","dir","div","dl","dt","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","img","input","ins","kbd","label","legend","li","map","mark","menu","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rowspan","s","samp","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"],allowedAttributes:{"*":["class","dir","draggable","hidden","id","inert","itemprop","itemref","itemscope","lang","spellcheck","style","title","translate"],a:["accesskey","coords","href","hreflang","name","rel","shape","tabindex","target","type"],area:["accesskey","alt","coords","href","nohref","shape","tabindex"],audio:["autoplay","controls","loop","mediagroup","muted","preload","src"],bdo:["dir"],blockquote:["cite"],br:["clear"],button:["accesskey","disabled","name","tabindex","type","value"],canvas:["height","width"],caption:["align"],col:["align","char","charoff","span","valign","width"],colgroup:["align","char","charoff","span","valign","width"],command:["checked","command","disabled","icon","label","radiogroup","type"],data:["value"],del:["cite","datetime"],details:["open"],dir:["compact"],div:["align"],dl:["compact"],fieldset:["disabled"],font:["color","face","size"],form:["accept","action","autocomplete","enctype","method","name","novalidate"],h1:["align"],h2:["align"],h3:["align"],h4:["align"],h5:["align"],h6:["align"],hr:["align","noshade","size","width"],iframe:["align","frameborder","height","marginheight","marginwidth","width"],img:["align","alt","border","height","hspace","ismap","name","src","usemap","vspace","width"],input:["accept","accesskey","align","alt","autocomplete","checked","disabled","inputmode","ismap","list","max","maxlength","min","multiple","name","placeholder","readonly","required","size","src","step","tabindex","type","usemap","value"],ins:["cite","datetime"],label:["accesskey","for"],legend:["accesskey","align"],li:["type","value"],map:["name"],menu:["compact","label","type"],meter:["high","low","max","min","value"],ol:["compact","reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["for","name"],p:["align"],pre:["width"],progress:["max","min","value"],q:["cite"],select:["autocomplete","disabled","multiple","name","required","size","tabindex"],source:["type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],tbody:["align","char","charoff","valign"],td:["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],textarea:["accesskey","autocomplete","cols","disabled","inputmode","name","placeholder","readonly","required","rows","tabindex","wrap"],tfoot:["align","char","charoff","valign"],th:["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],thead:["align","char","charoff","valign"],tr:["align","bgcolor","char","charoff","valign"],track:["default","kind","label","srclang"],ul:["compact","type"],video:["autoplay","controls","height","loop","mediagroup","muted","poster","preload","src","width"]},allowedStyles:{"*":{"backface-visibility":[b.BACKFACE_VISIBILITY],background:[b.BACKGROUND],"background-attachment":[b.BACKGROUND_ATTACHMENT],"background-clip":[b.BACKGROUND_CLIP],"background-color":[b.BACKGROUND_COLOR],"background-image":[b.BACKGROUND_IMAGE],"background-origin":[b.BACKGROUND_ORIGIN],"background-position":[b.BACKGROUND_POSITION],"background-repeat":[b.BACKGROUND_REPEAT],"background-size":[b.BACKGROUND_SIZE],border:[b.BORDER],"border-bottom":[b.BORDER_BOTTOM],"border-bottom-color":[b.BORDER_BOTTOM_COLOR],"border-bottom-left-radius":[b.BORDER_BOTTOM_LEFT_RADIUS],"border-bottom-right-radius":[b.BORDER_BOTTOM_RIGHT_RADIUS],"border-bottom-style":[b.BORDER_BOTTOM_STYLE],"border-bottom-width":[b.BORDER_BOTTOM_WIDTH],"border-collapse":[b.BORDER_COLLAPSE],"border-color":[b.BORDER_COLOR],"border-left":[b.BORDER_LEFT],"border-left-color":[b.BORDER_LEFT_COLOR],"border-left-style":[b.BORDER_LEFT_STYLE],"border-left-width":[b.BORDER_LEFT_WIDTH],"border-radius":[b.BORDER_RADIUS],"border-right":[b.BORDER_RIGHT],"border-right-color":[b.BORDER_RIGHT_COLOR],"border-right-style":[b.BORDER_RIGHT_STYLE],"border-right-width":[b.BORDER_RIGHT_WIDTH],"border-spacing":[b.BORDER_SPACING],"border-style":[b.BORDER_STYLE],"border-top":[b.BORDER_TOP],"border-top-color":[b.BORDER_TOP_COLOR],"border-top-left-radius":[b.BORDER_TOP_LEFT_RADIUS],"border-top-right-radius":[b.BORDER_TOP_RIGHT_RADIUS],"border-top-style":[b.BORDER_TOP_STYLE],"border-top-width":[b.BORDER_TOP_WIDTH],"border-width":[b.BORDER_WIDTH],bottom:[b.BOTTOM],box:[b.BOX],"box-shadow":[b.BOX_SHADOW],"box-sizing":[b.BOX_SIZING],"caption-side":[b.CAPTION_SIDE],clear:[b.CLEAR],clip:[b.CLIP],color:[b.COLOR],cursor:[b.CURSOR],direction:[b.DIRECTION],display:[b.DISPLAY],"display-inside":[b.DISPLAY_INSIDE],"display-outside":[b.DISPLAY_OUTSIDE],elevation:[b.ELEVATION],"empty-cells":[b.EMPTY_CELLS],float:[b.FLOAT],font:[b.FONT],"font-family":[b.FONT_FAMILY],"font-size":[b.FONT_SIZE],"font-stretch":[b.FONT_STRETCH],"font-style":[b.FONT_STYLE],"font-variant":[b.FONT_VARIANT],"font-weight":[b.FONT_WEIGHT],height:[b.HEIGHT],left:[b.LEFT],"letter-spacing":[b.LETTER_SPACING],"line-height":[b.LINE_HEIGHT],"list-style":[b.LIST_STYLE],"list-style-image":[b.LIST_STYLE_IMAGE],"list-style-position":[b.LIST_STYLE_POSITION],"list-style-type":[b.LIST_STYLE_TYPE],margin:[b.MARGIN],"margin-bottom":[b.MARGIN_BOTTOM],"margin-left":[b.MARGIN_LEFT],"margin-right":[b.MARGIN_RIGHT],"margin-top":[b.MARGIN_TOP],"max-height":[b.MAX_HEIGHT],"max-width":[b.MAX_WIDTH],"min-height":[b.MIN_HEIGHT],"min-width":[b.MIN_WIDTH],opacity:[b.OPACITY],outline:[b.OUTLINE],"outline-color":[b.OUTLINE_COLOR],"outline-style":[b.OUTLINE_STYLE],"outline-width":[b.OUTLINE_WIDTH],overflow:[b.OVERFLOW],"overflow-wrap":[b.OVERFLOW_WRAP],"overflow-x":[b.OVERFLOW_X],"overflow-y":[b.OVERFLOW_Y],padding:[b.PADDING],"padding-bottom":[b.PADDING_BOTTOM],"padding-left":[b.PADDING_LEFT],"padding-right":[b.PADDING_RIGHT],"padding-top":[b.PADDING_TOP],"page-break-after":[b.PAGE_BREAK_AFTER],"page-break-before":[b.PAGE_BREAK_BEFORE],"page-break-inside":[b.PAGE_BREAK_INSIDE],"pause-after":[b.PAUSE_AFTER],perspective:[b.PERSPECTIVE],pitch:[b.PITCH],"pitch-range":[b.PITCH_RANGE],position:[b.POSITION],quotes:[b.QUOTES],resize:[b.RESIZE],richness:[b.RICHNESS],right:[b.RIGHT],speak:[b.SPEAK],"speak-header":[b.SPEAK_HEADER],"speak-numeral":[b.SPEAK_NUMERAL],"speak-punctuation":[b.SPEAK_PUNCTUATION],"speech-rate":[b.SPEECH_RATE],stress:[b.STRESS],"table-layout":[b.TABLE_LAYOUT],"text-align":[b.TEXT_ALIGN],"text-decoration":[b.TEXT_DECORATION],"text-indent":[b.TEXT_INDENT],"text-overflow":[b.TEXT_OVERFLOW],"text-shadow":[b.TEXT_SHADOW],"text-transform":[b.TEXT_TRANSFORM],"text-wrap":[b.TEXT_WRAP],top:[b.TOP],"unicode-bidi":[b.UNICODE_BIDI],"vertical-align":[b.VERTICAL_ALIGN],visibility:[b.VISIBILITY],volume:[b.VOLUME],"white-space":[b.WHITE_SPACE],width:[b.WIDTH],"word-break":[b.WORD_BREAK],"word-spacing":[b.WORD_SPACING],"word-wrap":[b.WORD_WRAP],"z-index":[b.Z_INDEX],zoom:[b.ZOOM]}},transformTags:{a:t.simpleTransform("a",{rel:"nofollow"}),input:t.simpleTransform("input",{disabled:"disabled"})},allowedSchemesByTag:{img:t.defaults.allowedSchemes.concat(["attachment"])},allowedSchemesAppliedToAttributes:["href","cite"],parser:void 0}}sanitize(f,v){return t(f,{...this._options,...v||{}})}}e.defaultSanitizer=new D}),define(Q[1516],Y([1,0,1022,1021]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenderMimeRegistry=void 0;class b{constructor(f={}){if(this._id=0,this._ranks={},this._types=null,this._factories={},this.resolver=f.resolver||null,this.linkHandler=f.linkHandler||null,this.latexTypesetter=f.latexTypesetter||null,this.sanitizer=f.sanitizer||t.defaultSanitizer,f.initialFactories)for(let v of f.initialFactories)this.addFactory(v)}get mimeTypes(){return this._types||(this._types=D.sortedTypes(this._ranks))}preferredMimeType(f,v="ensure"){if(v==="ensure"||v==="prefer"){for(let m of this.mimeTypes)if(m in f&&this._factories[m].safe)return m}if(v!=="ensure"){for(let m of this.mimeTypes)if(m in f)return m}}createRenderer(f){if(!(f in this._factories))throw new Error(`No factory for mime type: '${f}'`);return this._factories[f].createRenderer({mimeType:f,resolver:this.resolver,sanitizer:this.sanitizer,linkHandler:this.linkHandler,latexTypesetter:this.latexTypesetter})}createModel(f={}){return new y.MimeModel(f)}clone(f={}){let v=new b({resolver:f.resolver||this.resolver||void 0,sanitizer:f.sanitizer||this.sanitizer||void 0,linkHandler:f.linkHandler||this.linkHandler||void 0,latexTypesetter:f.latexTypesetter||this.latexTypesetter});return v._factories={...this._factories},v._ranks={...this._ranks},v._id=this._id,v}getFactory(f){return this._factories[f]}addFactory(f,v){v===void 0&&(v=f.defaultRank,v===void 0&&(v=100));for(let m of f.mimeTypes)this._factories[m]=f,this._ranks[m]={rank:v,id:this._id++};this._types=null}removeMimeType(f){delete this._factories[f],delete this._ranks[f],this._types=null}getRank(f){let v=this._ranks[f];return v&&v.rank}setRank(f,v){if(!this._ranks[f])return;let m=this._id++;this._ranks[f]={rank:v,id:m},this._types=null}}e.RenderMimeRegistry=b;var D;(function(T){function f(v){return Object.keys(v).sort((m,S)=>{let h=v[m],a=v[S];return h.rank!==a.rank?h.rank-a.rank:h.id-a.id})}T.sortedTypes=f})(D||(D={}))}),define(Q[776],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extractCellMagicCommandPlusArgs=e.tryMatchCellMagic=void 0;function t(b){if(!b)return b;let D=b.trimLeft(),f=/^%%(\w+)/g.exec(D);return f&&f[1]}e.tryMatchCellMagic=t;function y(b,D){if(b&&D&&b.startsWith(`%%${D}`)){let T=b.replace(`%%${D}`,"");if(T?.startsWith(" ")){T=T.slice(1);let f=T.split(" ")[0];if(f){let v=T.replace(f,"");return v?.startsWith(" ")&&(v=v.slice(1)),{commandId:f,args:v}}}}}e.extractCellMagicCommandPlusArgs=y}),define(Q[1517],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isPrimitive=void 0;function t(y){return y===null||typeof y=="boolean"||typeof y=="number"||typeof y=="string"}e.isPrimitive=t}),define(Q[1023],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nbformat=void 0;var t;(function(y){y.MAJOR_VERSION=4,y.MINOR_VERSION=2;function b(m){return m.output_type==="execute_result"}y.isExecuteResult=b;function D(m){return m.output_type==="display_data"}y.isDisplayData=D;function T(m){return m.output_type==="update_display_data"}y.isDisplayUpdate=T;function f(m){return m.output_type==="stream"}y.isStream=f;function v(m){return m.output_type==="error"}y.isError=v})(t||(e.nbformat=t={}))}),define(Q[777],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KernelsLanguage=e.nbversion=void 0;var t;(function(b){b.MAJOR_VERSION=4,b.MINOR_VERSION=2})(t||(e.nbversion=t={}));var y;(function(b){b.SQL="sql",b.Python="python",b.PowerShell="powershell",b.CSharp="csharp",b.FSharp="fsharp"})(y||(e.KernelsLanguage=y={}))}),define(Q[1518],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NOTEBOOK_COMMAND_CLOSE_SEARCH=e.NOTEBOOK_COMMAND_SEARCH=void 0,e.NOTEBOOK_COMMAND_SEARCH="notebook.command.search",e.NOTEBOOK_COMMAND_CLOSE_SEARCH="notebook.command.closeSearch"}),define(Q[1519],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncServerTreeIdentityProvider=void 0;class t{getId(b){return b.id}}e.AsyncServerTreeIdentityProvider=t}),define(Q[298],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.instanceOfSqlThemeIcon=e.NodeType=void 0;class t{static{this.Folder="Folder"}static{this.Root="root"}static{this.Database="Database"}static{this.Server="Server"}static{this.ScalarValuedFunction="ScalarValuedFunction"}static{this.TableValuedFunction="TableValuedFunction"}static{this.AggregateFunction="AggregateFunction"}static{this.FileGroup="FileGroup"}static{this.StoredProcedure="StoredProcedure"}static{this.UserDefinedTableType="UserDefinedTableType"}static{this.View="View"}static{this.Table="Table"}static{this.HistoryTable="HistoryTable"}static{this.ServerLevelLinkedServerLogin="ServerLevelLinkedServerLogin"}static{this.ServerLevelServerAudit="ServerLevelServerAudit"}static{this.ServerLevelCryptographicProvider="ServerLevelCryptographicProvider"}static{this.ServerLevelCredential="ServerLevelCredential"}static{this.ServerLevelServerRole="ServerLevelServerRole"}static{this.ServerLevelLogin="ServerLevelLogin"}static{this.ServerLevelServerAuditSpecification="ServerLevelServerAuditSpecification"}static{this.ServerLevelServerTrigger="ServerLevelServerTrigger"}static{this.ServerLevelLinkedServer="ServerLevelLinkedServer"}static{this.ServerLevelEndpoint="ServerLevelEndpoint"}static{this.Synonym="Synonym"}static{this.DatabaseTrigger="DatabaseTrigger"}static{this.Assembly="Assembly"}static{this.MessageType="MessageType"}static{this.Contract="Contract"}static{this.Queue="Queue"}static{this.Service="Service"}static{this.Route="Route"}static{this.DatabaseAndQueueEventNotification="DatabaseAndQueueEventNotification"}static{this.RemoteServiceBinding="RemoteServiceBinding"}static{this.BrokerPriority="BrokerPriority"}static{this.FullTextCatalog="FullTextCatalog"}static{this.FullTextStopList="FullTextStopList"}static{this.SqlLogFile="SqlLogFile"}static{this.PartitionFunction="PartitionFunction"}static{this.PartitionScheme="PartitionScheme"}static{this.SearchPropertyList="SearchPropertyList"}static{this.User="User"}static{this.Schema="Schema"}static{this.AsymmetricKey="AsymmetricKey"}static{this.Certificate="Certificate"}static{this.SymmetricKey="SymmetricKey"}static{this.DatabaseEncryptionKey="DatabaseEncryptionKey"}static{this.MasterKey="MasterKey"}static{this.DatabaseAuditSpecification="DatabaseAuditSpecification"}static{this.Column="Column"}static{this.Key="Key"}static{this.Constraint="Constraint"}static{this.Trigger="Trigger"}static{this.Index="Index"}static{this.Statistic="Statistic"}static{this.UserDefinedDataType="UserDefinedDataType"}static{this.UserDefinedType="UserDefinedType"}static{this.XmlSchemaCollection="XmlSchemaCollection"}static{this.SystemExactNumeric="SystemExactNumeric"}static{this.SystemApproximateNumeric="SystemApproximateNumeric"}static{this.SystemDateAndTime="SystemDateAndTime"}static{this.SystemCharacterString="SystemCharacterString"}static{this.SystemUnicodeCharacterString="SystemUnicodeCharacterString"}static{this.SystemBinaryString="SystemBinaryString"}static{this.SystemOtherDataType="SystemOtherDataType"}static{this.SystemClrDataType="SystemClrDataType"}static{this.SystemSpatialDataType="SystemSpatialDataType"}static{this.UserDefinedTableTypeColumn="UserDefinedTableTypeColumn"}static{this.UserDefinedTableTypeKey="UserDefinedTableTypeKey"}static{this.UserDefinedTableTypeConstraint="UserDefinedTableTypeConstraint"}static{this.StoredProcedureParameter="StoredProcedureParameter"}static{this.TableValuedFunctionParameter="TableValuedFunctionParameter"}static{this.ScalarValuedFunctionParameter="ScalarValuedFunctionParameter"}static{this.AggregateFunctionParameter="AggregateFunctionParameter"}static{this.DatabaseRole="DatabaseRole"}static{this.ApplicationRole="ApplicationRole"}static{this.FileGroupFile="FileGroupFile"}static{this.SystemMessageType="SystemMessageType"}static{this.SystemContract="SystemContract"}static{this.SystemService="SystemService"}static{this.SystemQueue="SystemQueue"}static{this.Sequence="Sequence"}static{this.SecurityPolicy="SecurityPolicy"}static{this.DatabaseScopedCredential="DatabaseScopedCredential"}static{this.ExternalResource="ExternalResource"}static{this.ExternalDataSource="ExternalDataSource"}static{this.ExternalFileFormat="ExternalFileFormat"}static{this.ExternalTable="ExternalTable"}static{this.ColumnMasterKey="ColumnMasterKey"}static{this.ColumnEncryptionKey="ColumnEncryptionKey"}static{this.Function="Function"}static{this.SCRIPTABLE_OBJECTS=[t.Table,t.View,t.Schema,t.User,t.UserDefinedTableType,t.StoredProcedure,t.AggregateFunction,t.PartitionFunction,t.ScalarValuedFunction,t.TableValuedFunction,t.Function]}}e.NodeType=t;function y(b){const D=b;return D&&D.id!==void 0}e.instanceOfSqlThemeIcon=y}),define(Q[778],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleProgressIndicator=void 0;class t{show(b,D){return{total:T=>{},worked:T=>{},done:()=>{}}}async showWhile(b,D){try{await b}catch{}}}e.SimpleProgressIndicator=t}),define(Q[1024],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GoToNextGrid=e.GoToNextQueryOutputTab=e.ViewAsVisualizer=e.ViewAsChart=e.SaveAsXML=e.SaveAsExcel=e.SaveAsMarkdown=e.SaveAsJSON=e.SaveAsCsv=e.SelectAllMessages=e.SelectAll=e.CopyMessagesSelection=e.CopyWithHeaders=e.CopySelection=e.ToggleMessagePane=e.ToggleResultPane=e.RefreshContents=e.ResizeContents=void 0,e.ResizeContents="ResizeContents",e.RefreshContents="RefreshContents",e.ToggleResultPane="ToggleResultPane",e.ToggleMessagePane="ToggleMessagePane",e.CopySelection="CopySelection",e.CopyWithHeaders="CopyWithHeaders",e.CopyMessagesSelection="CopyMessagesSelection",e.SelectAll="SelectAll",e.SelectAllMessages="SelectAllMessages",e.SaveAsCsv="SaveAsCSV",e.SaveAsJSON="SaveAsJSON",e.SaveAsMarkdown="SaveAsMarkdown",e.SaveAsExcel="SaveAsExcel",e.SaveAsXML="SaveAsXML",e.ViewAsChart="ViewAsChart",e.ViewAsVisualizer="ViewAsVisualizer",e.GoToNextQueryOutputTab="GoToNextQueryOutputTab",e.GoToNextGrid="GoToNextGrid"}),define(Q[1520],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MssqlRestoreInfo=void 0;class t{constructor(b){this.taskExecutionMode=b,this.options={}}get sessionId(){return this.options.sessionId}set sessionId(b){this.options.sessionId=b}get backupFilePaths(){return this.options.backupFilePaths}set backupFilePaths(b){this.options.backupFilePaths=b}get deviceType(){return this.options.deviceType}set deviceType(b){this.options.deviceType=b}get targetDatabaseName(){return this.options.targetDatabaseName}set targetDatabaseName(b){this.options.targetDatabaseName=b}get sourceDatabaseName(){return this.options.sourceDatabaseName}set sourceDatabaseName(b){this.options.sourceDatabaseName=b}get relocateDbFiles(){return this.options.relocateDbFiles}set relocateDbFiles(b){this.options.relocateDbFiles=b}get dataFileFolder(){return this.options.dataFileFolder}set dataFileFolder(b){this.options.dataFileFolder=b}get logFileFolder(){return this.options.logFileFolder}set logFileFolder(b){this.options.logFileFolder=b}get selectedBackupSets(){return this.options.selectedBackupSets}set selectedBackupSets(b){this.options.selectedBackupSets=b}get readHeaderFromMedia(){return this.options.readHeaderFromMedia}set readHeaderFromMedia(b){this.options.readHeaderFromMedia=b}get overwriteTargetDatabase(){return this.options.overwriteTargetDatabase}set overwriteTargetDatabase(b){this.options.overwriteTargetDatabase=b}}e.MssqlRestoreInfo=t}),define(Q[779],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SERVER_GROUP_COLORS_CONFIG=e.SERVER_GROUP_CONFIG=void 0,e.SERVER_GROUP_CONFIG="serverGroup",e.SERVER_GROUP_COLORS_CONFIG="colors"}),define(Q[1521],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TableDesignerMetadata=void 0;class t{static{this.mssqlAllowedMetdata=new Set(["isNode","isEdge","isSystemVersioned"])}static{this.providerMetadataMap=new Map([["MSSQL",t.mssqlAllowedMetdata]])}static getTelemetryInfo(b,D){if(!t.providerMetadataMap.has(b)||!D)return{};const T=t.providerMetadataMap.get(b);for(const f of Object.keys(D))T.has(f)||delete D[f];return D}}e.TableDesignerMetadata=t});/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:fn,setPrototypeOf:pn,isFrozen:nr,getPrototypeOf:rr,getOwnPropertyDescriptor:sr}=Object;let{freeze:gi,seal:bi,create:or}=Object,{apply:Ki,construct:qi}=typeof Reflect<"u"&&Reflect;Ki||(Ki=function(e,t,y){return e.apply(t,y)}),gi||(gi=function(e){return e}),bi||(bi=function(e){return e}),qi||(qi=function(e,t){return new e(...t)});const ar=vi(Array.prototype.forEach),mn=vi(Array.prototype.pop),Mi=vi(Array.prototype.push),Bi=vi(String.prototype.toLowerCase),Gi=vi(String.prototype.toString),lr=vi(String.prototype.match),Ci=vi(String.prototype.replace),cr=vi(String.prototype.indexOf),dr=vi(String.prototype.trim),mi=vi(RegExp.prototype.test),Pi=ur(TypeError);function vi(q){return function(e){for(var t=arguments.length,y=new Array(t>1?t-1:0),b=1;b<t;b++)y[b-1]=arguments[b];return Ki(q,e,y)}}function ur(q){return function(){for(var e=arguments.length,t=new Array(e),y=0;y<e;y++)t[y]=arguments[y];return qi(q,t)}}function li(q,e,t){var y;t=(y=t)!==null&&y!==void 0?y:Bi,pn&&pn(q,null);let b=e.length;for(;b--;){let D=e[b];if(typeof D=="string"){const T=t(D);T!==D&&(nr(e)||(e[b]=T),D=T)}q[D]=!0}return q}function Ri(q){const e=or(null);for(const[t,y]of fn(q))e[t]=y;return e}function Vi(q,e){for(;q!==null;){const y=sr(q,e);if(y){if(y.get)return vi(y.get);if(typeof y.value=="function")return vi(y.value)}q=rr(q)}function t(y){return console.warn("fallback value for",y),null}return t}const vn=gi(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),$i=gi(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ji=gi(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),hr=gi(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Qi=gi(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),gr=gi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Sn=gi(["#text"]),bn=gi(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Yi=gi(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Cn=gi(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Wi=gi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),fr=bi(/\{\{[\w\W]*|[\w\W]*\}\}/gm),pr=bi(/<%[\w\W]*|[\w\W]*%>/gm),mr=bi(/\${[\w\W]*}/gm),vr=bi(/^data-[\-\w.\u00B7-\uFFFF]/),Sr=bi(/^aria-[\-\w]+$/),wn=bi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),br=bi(/^(?:\w+script|data):/i),Cr=bi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),En=bi(/^html$/i);var yn=Object.freeze({__proto__:null,MUSTACHE_EXPR:fr,ERB_EXPR:pr,TMPLIT_EXPR:mr,DATA_ATTR:vr,ARIA_ATTR:Sr,IS_ALLOWED_URI:wn,IS_SCRIPT_OR_DATA:br,ATTR_WHITESPACE:Cr,DOCTYPE_NAME:En});const wr=()=>typeof window>"u"?null:window,Er=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let y=null;const b="data-tt-policy-suffix";t&&t.hasAttribute(b)&&(y=t.getAttribute(b));const D="dompurify"+(y?"#"+y:"");try{return e.createPolicy(D,{createHTML(T){return T},createScriptURL(T){return T}})}catch{return console.warn("TrustedTypes policy "+D+" could not be created."),null}};function In(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wr();const e=tt=>In(tt);if(e.version="3.0.5",e.removed=[],!q||!q.document||q.document.nodeType!==9)return e.isSupported=!1,e;const t=q.document,y=t.currentScript;let{document:b}=q;const{DocumentFragment:D,HTMLTemplateElement:T,Node:f,Element:v,NodeFilter:m,NamedNodeMap:S=q.NamedNodeMap||q.MozNamedAttrMap,HTMLFormElement:h,DOMParser:a,trustedTypes:r}=q,i=v.prototype,s=Vi(i,"cloneNode"),o=Vi(i,"nextSibling"),u=Vi(i,"childNodes"),d=Vi(i,"parentNode");if(typeof T=="function"){const tt=b.createElement("template");tt.content&&tt.content.ownerDocument&&(b=tt.content.ownerDocument)}let p,c="";const{implementation:l,createNodeIterator:n,createDocumentFragment:g,getElementsByTagName:w}=b,{importNode:E}=t;let C={};e.isSupported=typeof fn=="function"&&typeof d=="function"&&l&&l.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:I,ERB_EXPR:_,TMPLIT_EXPR:A,DATA_ATTR:k,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:M}=yn;let{IS_ALLOWED_URI:N}=yn,P=null;const x=li({},[...vn,...$i,...ji,...Qi,...Sn]);let F=null;const V=li({},[...bn,...Yi,...Cn,...Wi]);let W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),z=null,B=null,K=!0,H=!0,U=!1,G=!0,$=!1,ie=!1,J=!1,j=!1,ee=!1,X=!1,te=!1,Z=!0,se=!1;const re="user-content-";let oe=!0,le=!1,ne={},ce=null;const ae=li({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const de=li({},["audio","video","img","source","image","track"]);let ge=null;const he=li({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),be="http://www.w3.org/1998/Math/MathML",ve="http://www.w3.org/2000/svg",Ie="http://www.w3.org/1999/xhtml";let Se=Ie,we=!1,ye=null;const Re=li({},[be,ve,Ie],Gi);let Le;const Pe=["application/xhtml+xml","text/html"],Ae="text/html";let Me,Oe=null;const De=b.createElement("form"),Ce=function(Xe){return Xe instanceof RegExp||Xe instanceof Function},_e=function(Xe){if(!(Oe&&Oe===Xe)){if((!Xe||typeof Xe!="object")&&(Xe={}),Xe=Ri(Xe),Le=Pe.indexOf(Xe.PARSER_MEDIA_TYPE)===-1?Le=Ae:Le=Xe.PARSER_MEDIA_TYPE,Me=Le==="application/xhtml+xml"?Gi:Bi,P="ALLOWED_TAGS"in Xe?li({},Xe.ALLOWED_TAGS,Me):x,F="ALLOWED_ATTR"in Xe?li({},Xe.ALLOWED_ATTR,Me):V,ye="ALLOWED_NAMESPACES"in Xe?li({},Xe.ALLOWED_NAMESPACES,Gi):Re,ge="ADD_URI_SAFE_ATTR"in Xe?li(Ri(he),Xe.ADD_URI_SAFE_ATTR,Me):he,ue="ADD_DATA_URI_TAGS"in Xe?li(Ri(de),Xe.ADD_DATA_URI_TAGS,Me):de,ce="FORBID_CONTENTS"in Xe?li({},Xe.FORBID_CONTENTS,Me):ae,z="FORBID_TAGS"in Xe?li({},Xe.FORBID_TAGS,Me):{},B="FORBID_ATTR"in Xe?li({},Xe.FORBID_ATTR,Me):{},ne="USE_PROFILES"in Xe?Xe.USE_PROFILES:!1,K=Xe.ALLOW_ARIA_ATTR!==!1,H=Xe.ALLOW_DATA_ATTR!==!1,U=Xe.ALLOW_UNKNOWN_PROTOCOLS||!1,G=Xe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,$=Xe.SAFE_FOR_TEMPLATES||!1,ie=Xe.WHOLE_DOCUMENT||!1,ee=Xe.RETURN_DOM||!1,X=Xe.RETURN_DOM_FRAGMENT||!1,te=Xe.RETURN_TRUSTED_TYPE||!1,j=Xe.FORCE_BODY||!1,Z=Xe.SANITIZE_DOM!==!1,se=Xe.SANITIZE_NAMED_PROPS||!1,oe=Xe.KEEP_CONTENT!==!1,le=Xe.IN_PLACE||!1,N=Xe.ALLOWED_URI_REGEXP||wn,Se=Xe.NAMESPACE||Ie,W=Xe.CUSTOM_ELEMENT_HANDLING||{},Xe.CUSTOM_ELEMENT_HANDLING&&Ce(Xe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=Xe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Xe.CUSTOM_ELEMENT_HANDLING&&Ce(Xe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=Xe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Xe.CUSTOM_ELEMENT_HANDLING&&typeof Xe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=Xe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),$&&(H=!1),X&&(ee=!0),ne&&(P=li({},[...Sn]),F=[],ne.html===!0&&(li(P,vn),li(F,bn)),ne.svg===!0&&(li(P,$i),li(F,Yi),li(F,Wi)),ne.svgFilters===!0&&(li(P,ji),li(F,Yi),li(F,Wi)),ne.mathMl===!0&&(li(P,Qi),li(F,Cn),li(F,Wi))),Xe.ADD_TAGS&&(P===x&&(P=Ri(P)),li(P,Xe.ADD_TAGS,Me)),Xe.ADD_ATTR&&(F===V&&(F=Ri(F)),li(F,Xe.ADD_ATTR,Me)),Xe.ADD_URI_SAFE_ATTR&&li(ge,Xe.ADD_URI_SAFE_ATTR,Me),Xe.FORBID_CONTENTS&&(ce===ae&&(ce=Ri(ce)),li(ce,Xe.FORBID_CONTENTS,Me)),oe&&(P["#text"]=!0),ie&&li(P,["html","head","body"]),P.table&&(li(P,["tbody"]),delete z.tbody),Xe.TRUSTED_TYPES_POLICY){if(typeof Xe.TRUSTED_TYPES_POLICY.createHTML!="function")throw Pi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Xe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Pi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');p=Xe.TRUSTED_TYPES_POLICY,c=p.createHTML("")}else p===void 0&&(p=Er(r,y)),p!==null&&typeof c=="string"&&(c=p.createHTML(""));gi&&gi(Xe),Oe=Xe}},me=li({},["mi","mo","mn","ms","mtext"]),ke=li({},["foreignobject","desc","title","annotation-xml"]),Ee=li({},["title","style","font","a","script"]),pe=li({},$i);li(pe,ji),li(pe,hr);const Te=li({},Qi);li(Te,gr);const Ne=function(Xe){let nt=d(Xe);(!nt||!nt.tagName)&&(nt={namespaceURI:Se,tagName:"template"});const ft=Bi(Xe.tagName),Et=Bi(nt.tagName);return ye[Xe.namespaceURI]?Xe.namespaceURI===ve?nt.namespaceURI===Ie?ft==="svg":nt.namespaceURI===be?ft==="svg"&&(Et==="annotation-xml"||me[Et]):!!pe[ft]:Xe.namespaceURI===be?nt.namespaceURI===Ie?ft==="math":nt.namespaceURI===ve?ft==="math"&&ke[Et]:!!Te[ft]:Xe.namespaceURI===Ie?nt.namespaceURI===ve&&!ke[Et]||nt.namespaceURI===be&&!me[Et]?!1:!Te[ft]&&(Ee[ft]||!pe[ft]):!!(Le==="application/xhtml+xml"&&ye[Xe.namespaceURI]):!1},xe=function(Xe){Mi(e.removed,{element:Xe});try{Xe.parentNode.removeChild(Xe)}catch{Xe.remove()}},Ve=function(Xe,nt){try{Mi(e.removed,{attribute:nt.getAttributeNode(Xe),from:nt})}catch{Mi(e.removed,{attribute:null,from:nt})}if(nt.removeAttribute(Xe),Xe==="is"&&!F[Xe])if(ee||X)try{xe(nt)}catch{}else try{nt.setAttribute(Xe,"")}catch{}},Fe=function(Xe){let nt,ft;if(j)Xe="<remove></remove>"+Xe;else{const Nt=lr(Xe,/^[\r\n\t ]+/);ft=Nt&&Nt[0]}Le==="application/xhtml+xml"&&Se===Ie&&(Xe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Xe+"</body></html>");const Et=p?p.createHTML(Xe):Xe;if(Se===Ie)try{nt=new a().parseFromString(Et,Le)}catch{}if(!nt||!nt.documentElement){nt=l.createDocument(Se,"template",null);try{nt.documentElement.innerHTML=we?c:Et}catch{}}const It=nt.body||nt.documentElement;return Xe&&ft&&It.insertBefore(b.createTextNode(ft),It.childNodes[0]||null),Se===Ie?w.call(nt,ie?"html":"body")[0]:ie?nt.documentElement:It},Be=function(Xe){return n.call(Xe.ownerDocument||Xe,Xe,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT,null,!1)},He=function(Xe){return Xe instanceof h&&(typeof Xe.nodeName!="string"||typeof Xe.textContent!="string"||typeof Xe.removeChild!="function"||!(Xe.attributes instanceof S)||typeof Xe.removeAttribute!="function"||typeof Xe.setAttribute!="function"||typeof Xe.namespaceURI!="string"||typeof Xe.insertBefore!="function"||typeof Xe.hasChildNodes!="function")},et=function(Xe){return typeof f=="object"?Xe instanceof f:Xe&&typeof Xe=="object"&&typeof Xe.nodeType=="number"&&typeof Xe.nodeName=="string"},Je=function(Xe,nt,ft){C[Xe]&&ar(C[Xe],Et=>{Et.call(e,nt,ft,Oe)})},st=function(Xe){let nt;if(Je("beforeSanitizeElements",Xe,null),He(Xe))return xe(Xe),!0;const ft=Me(Xe.nodeName);if(Je("uponSanitizeElement",Xe,{tagName:ft,allowedTags:P}),Xe.hasChildNodes()&&!et(Xe.firstElementChild)&&(!et(Xe.content)||!et(Xe.content.firstElementChild))&&mi(/<[/\w]/g,Xe.innerHTML)&&mi(/<[/\w]/g,Xe.textContent))return xe(Xe),!0;if(!P[ft]||z[ft]){if(!z[ft]&&je(ft)&&(W.tagNameCheck instanceof RegExp&&mi(W.tagNameCheck,ft)||W.tagNameCheck instanceof Function&&W.tagNameCheck(ft)))return!1;if(oe&&!ce[ft]){const Et=d(Xe)||Xe.parentNode,It=u(Xe)||Xe.childNodes;if(It&&Et){const Nt=It.length;for(let Ot=Nt-1;Ot>=0;--Ot)Et.insertBefore(s(It[Ot],!0),o(Xe))}}return xe(Xe),!0}return Xe instanceof v&&!Ne(Xe)||(ft==="noscript"||ft==="noembed"||ft==="noframes")&&mi(/<\/no(script|embed|frames)/i,Xe.innerHTML)?(xe(Xe),!0):($&&Xe.nodeType===3&&(nt=Xe.textContent,nt=Ci(nt,I," "),nt=Ci(nt,_," "),nt=Ci(nt,A," "),Xe.textContent!==nt&&(Mi(e.removed,{element:Xe.cloneNode()}),Xe.textContent=nt)),Je("afterSanitizeElements",Xe,null),!1)},ze=function(Xe,nt,ft){if(Z&&(nt==="id"||nt==="name")&&(ft in b||ft in De))return!1;if(!(H&&!B[nt]&&mi(k,nt))){if(!(K&&mi(L,nt))){if(!F[nt]||B[nt]){if(!(je(Xe)&&(W.tagNameCheck instanceof RegExp&&mi(W.tagNameCheck,Xe)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Xe))&&(W.attributeNameCheck instanceof RegExp&&mi(W.attributeNameCheck,nt)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(nt))||nt==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&mi(W.tagNameCheck,ft)||W.tagNameCheck instanceof Function&&W.tagNameCheck(ft))))return!1}else if(!ge[nt]){if(!mi(N,Ci(ft,M,""))){if(!((nt==="src"||nt==="xlink:href"||nt==="href")&&Xe!=="script"&&cr(ft,"data:")===0&&ue[Xe])){if(!(U&&!mi(R,Ci(ft,M,"")))){if(ft)return!1}}}}}}return!0},je=function(Xe){return Xe.indexOf("-")>0},Ge=function(Xe){let nt,ft,Et,It;Je("beforeSanitizeAttributes",Xe,null);const{attributes:Nt}=Xe;if(!Nt)return;const Ot={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F};for(It=Nt.length;It--;){nt=Nt[It];const{name:kt,namespaceURI:xt}=nt;if(ft=kt==="value"?nt.value:dr(nt.value),Et=Me(kt),Ot.attrName=Et,Ot.attrValue=ft,Ot.keepAttr=!0,Ot.forceKeepAttr=void 0,Je("uponSanitizeAttribute",Xe,Ot),ft=Ot.attrValue,Ot.forceKeepAttr||(Ve(kt,Xe),!Ot.keepAttr))continue;if(!G&&mi(/\/>/i,ft)){Ve(kt,Xe);continue}$&&(ft=Ci(ft,I," "),ft=Ci(ft,_," "),ft=Ci(ft,A," "));const Mt=Me(Xe.nodeName);if(ze(Mt,Et,ft)){if(se&&(Et==="id"||Et==="name")&&(Ve(kt,Xe),ft=re+ft),p&&typeof r=="object"&&typeof r.getAttributeType=="function"&&!xt)switch(r.getAttributeType(Mt,Et)){case"TrustedHTML":{ft=p.createHTML(ft);break}case"TrustedScriptURL":{ft=p.createScriptURL(ft);break}}try{xt?Xe.setAttributeNS(xt,kt,ft):Xe.setAttribute(kt,ft),mn(e.removed)}catch{}}}Je("afterSanitizeAttributes",Xe,null)},Ze=function tt(Xe){let nt;const ft=Be(Xe);for(Je("beforeSanitizeShadowDOM",Xe,null);nt=ft.nextNode();)Je("uponSanitizeShadowNode",nt,null),!st(nt)&&(nt.content instanceof D&&tt(nt.content),Ge(nt));Je("afterSanitizeShadowDOM",Xe,null)};return e.sanitize=function(tt){let Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},nt,ft,Et,It;if(we=!tt,we&&(tt="<!-->"),typeof tt!="string"&&!et(tt))if(typeof tt.toString=="function"){if(tt=tt.toString(),typeof tt!="string")throw Pi("dirty is not a string, aborting")}else throw Pi("toString is not a function");if(!e.isSupported)return tt;if(J||_e(Xe),e.removed=[],typeof tt=="string"&&(le=!1),le){if(tt.nodeName){const kt=Me(tt.nodeName);if(!P[kt]||z[kt])throw Pi("root node is forbidden and cannot be sanitized in-place")}}else if(tt instanceof f)nt=Fe("<!---->"),ft=nt.ownerDocument.importNode(tt,!0),ft.nodeType===1&&ft.nodeName==="BODY"||ft.nodeName==="HTML"?nt=ft:nt.appendChild(ft);else{if(!ee&&!$&&!ie&&tt.indexOf("<")===-1)return p&&te?p.createHTML(tt):tt;if(nt=Fe(tt),!nt)return ee?null:te?c:""}nt&&j&&xe(nt.firstChild);const Nt=Be(le?tt:nt);for(;Et=Nt.nextNode();)st(Et)||(Et.content instanceof D&&Ze(Et.content),Ge(Et));if(le)return tt;if(ee){if(X)for(It=g.call(nt.ownerDocument);nt.firstChild;)It.appendChild(nt.firstChild);else It=nt;return(F.shadowroot||F.shadowrootmode)&&(It=E.call(t,It,!0)),It}let Ot=ie?nt.outerHTML:nt.innerHTML;return ie&&P["!doctype"]&&nt.ownerDocument&&nt.ownerDocument.doctype&&nt.ownerDocument.doctype.name&&mi(En,nt.ownerDocument.doctype.name)&&(Ot="<!DOCTYPE "+nt.ownerDocument.doctype.name+`> `+Ot),$&&(Ot=Ci(Ot,I," "),Ot=Ci(Ot,_," "),Ot=Ci(Ot,A," ")),p&&te?p.createHTML(Ot):Ot},e.setConfig=function(tt){_e(tt),J=!0},e.clearConfig=function(){Oe=null,J=!1},e.isValidAttribute=function(tt,Xe,nt){Oe||_e({});const ft=Me(tt),Et=Me(Xe);return ze(ft,Et,nt)},e.addHook=function(tt,Xe){typeof Xe=="function"&&(C[tt]=C[tt]||[],Mi(C[tt],Xe))},e.removeHook=function(tt){if(C[tt])return mn(C[tt])},e.removeHooks=function(tt){C[tt]&&(C[tt]=[])},e.removeAllHooks=function(){C={}},e}var yr=In();define("vs/base/browser/dompurify/dompurify",function(){return yr}),define(Q[140],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFastDomNode=e.FastDomNode=void 0;class t{constructor(T){this.domNode=T,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(T){const f=y(T);this._maxWidth!==f&&(this._maxWidth=f,this.domNode.style.maxWidth=this._maxWidth)}setWidth(T){const f=y(T);this._width!==f&&(this._width=f,this.domNode.style.width=this._width)}setHeight(T){const f=y(T);this._height!==f&&(this._height=f,this.domNode.style.height=this._height)}setTop(T){const f=y(T);this._top!==f&&(this._top=f,this.domNode.style.top=this._top)}setLeft(T){const f=y(T);this._left!==f&&(this._left=f,this.domNode.style.left=this._left)}setBottom(T){const f=y(T);this._bottom!==f&&(this._bottom=f,this.domNode.style.bottom=this._bottom)}setRight(T){const f=y(T);this._right!==f&&(this._right=f,this.domNode.style.right=this._right)}setPaddingTop(T){const f=y(T);this._paddingTop!==f&&(this._paddingTop=f,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(T){const f=y(T);this._paddingLeft!==f&&(this._paddingLeft=f,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(T){const f=y(T);this._paddingBottom!==f&&(this._paddingBottom=f,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(T){const f=y(T);this._paddingRight!==f&&(this._paddingRight=f,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(T){this._fontFamily!==T&&(this._fontFamily=T,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(T){this._fontWeight!==T&&(this._fontWeight=T,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(T){const f=y(T);this._fontSize!==f&&(this._fontSize=f,this.domNode.style.fontSize=this._fontSize)}setFontStyle(T){this._fontStyle!==T&&(this._fontStyle=T,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(T){this._fontFeatureSettings!==T&&(this._fontFeatureSettings=T,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(T){this._fontVariationSettings!==T&&(this._fontVariationSettings=T,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(T){this._textDecoration!==T&&(this._textDecoration=T,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(T){const f=y(T);this._lineHeight!==f&&(this._lineHeight=f,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(T){const f=y(T);this._letterSpacing!==f&&(this._letterSpacing=f,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(T){this._className!==T&&(this._className=T,this.domNode.className=this._className)}toggleClassName(T,f){this.domNode.classList.toggle(T,f),this._className=this.domNode.className}setDisplay(T){this._display!==T&&(this._display=T,this.domNode.style.display=this._display)}setPosition(T){this._position!==T&&(this._position=T,this.domNode.style.position=this._position)}setVisibility(T){this._visibility!==T&&(this._visibility=T,this.domNode.style.visibility=this._visibility)}setColor(T){this._color!==T&&(this._color=T,this.domNode.style.color=this._color)}setBackgroundColor(T){this._backgroundColor!==T&&(this._backgroundColor=T,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(T){this._layerHint!==T&&(this._layerHint=T,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(T){this._boxShadow!==T&&(this._boxShadow=T,this.domNode.style.boxShadow=T)}setContain(T){this._contain!==T&&(this._contain=T,this.domNode.style.contain=this._contain)}setAttribute(T,f){this.domNode.setAttribute(T,f)}removeAttribute(T){this.domNode.removeAttribute(T)}appendChild(T){this.domNode.appendChild(T.domNode)}removeChild(T){this.domNode.removeChild(T.domNode)}}e.FastDomNode=t;function y(D){return typeof D=="number"?`${D}px`:D}function b(D){return new t(D)}e.createFastDomNode=b}),define(Q[1522],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IframeUtils=void 0;let t=!1,y=null;function b(T){if(!T.parent||T.parent===T)return null;try{const f=T.location,v=T.parent.location;if(f.origin!=="null"&&v.origin!=="null"&&f.origin!==v.origin)return t=!0,null}catch{return t=!0,null}return T.parent}class D{static getSameOriginWindowChain(){if(!y){y=[];let f=window,v;do v=b(f),v?y.push({window:f,iframeElement:f.frameElement||null}):y.push({window:f,iframeElement:null}),f=v;while(f)}return y.slice(0)}static hasDifferentOriginAncestor(){return y||this.getSameOriginWindowChain(),t}static getPositionOfChildWindowRelativeToAncestorWindow(f,v){if(!v||f===v)return{top:0,left:0};let m=0,S=0;const h=this.getSameOriginWindowChain();for(const a of h){if(m+=a.window.scrollY,S+=a.window.scrollX,a.window===v||!a.iframeElement)break;const r=a.iframeElement.getBoundingClientRect();m+=r.top,S+=r.left}return{top:m,left:S}}}e.IframeUtils=D}),define(Q[780],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inputLatency=void 0;var t;(function(y){const b={total:0,min:Number.MAX_VALUE,max:0},D={...b},T={...b},f={...b};let v=0,m;(function(I){I[I.Before=0]="Before",I[I.InProgress=1]="InProgress",I[I.Finished=2]="Finished"})(m||(m={}));const S={keydown:0,input:0,render:0};function h(){l(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),S.keydown=1,queueMicrotask(a)}y.onKeyDown=h;function a(){S.keydown===1&&(performance.mark("keydown/end"),S.keydown=2)}function r(){performance.mark("input/start"),S.input=1,c()}y.onBeforeInput=r;function i(){S.input===0&&r(),queueMicrotask(s)}y.onInput=i;function s(){S.input===1&&(performance.mark("input/end"),S.input=2)}function o(){l()}y.onKeyUp=o;function u(){l()}y.onSelectionChange=u;function d(){S.keydown===2&&S.input===2&&S.render===0&&(performance.mark("render/start"),S.render=1,queueMicrotask(p),c())}y.onRenderStart=d;function p(){S.render===1&&(performance.mark("render/end"),S.render=2)}function c(){setTimeout(l)}function l(){S.keydown===2&&S.input===2&&S.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),n("keydown",b),n("input",D),n("render",T),n("inputlatency",f),v++,g())}function n(I,_){const A=performance.getEntriesByName(I)[0].duration;_.total+=A,_.min=Math.min(_.min,A),_.max=Math.max(_.max,A)}function g(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),S.keydown=0,S.input=0,S.render=0}function w(){if(v===0)return;const I={keydown:E(b),input:E(D),render:E(T),total:E(f),sampleCount:v};return C(b),C(D),C(T),C(f),v=0,I}y.getAndClearMeasurements=w;function E(I){return{average:I.total/v,max:I.max,min:I.min}}function C(I){I.total=0,I.min=Number.MAX_VALUE,I.max=0}})(t||(e.inputLatency=t={}))}),define(Q[648],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedListVirtualDelegate=e.ListError=e.ListDragOverReactions=e.ListDragOverEffect=void 0;var t;(function(D){D[D.Copy=0]="Copy",D[D.Move=1]="Move"})(t||(e.ListDragOverEffect=t={})),e.ListDragOverReactions={reject(){return{accept:!1}},accept(){return{accept:!0}}};class y extends Error{constructor(T,f){super(`ListError [${T}] ${f}`)}}e.ListError=y;class b{constructor(){this.cache=new WeakMap}getHeight(T){return this.cache.get(T)??this.estimateHeight(T)}setDynamicHeight(T,f){f>0&&this.cache.set(T,f)}}e.CachedListVirtualDelegate=b}),define(Q[1523],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CombinedSpliceable=void 0;class t{constructor(b){this.spliceables=b}splice(b,D,T){this.spliceables.forEach(f=>f.splice(b,D,T))}}e.CombinedSpliceable=t}),define(Q[781],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarState=void 0;const t=20;class y{constructor(D,T,f,v,m,S){this._scrollbarSize=Math.round(T),this._oppositeScrollbarSize=Math.round(f),this._arrowSize=Math.round(D),this._visibleSize=v,this._scrollSize=m,this._scrollPosition=S,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new y(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(D){const T=Math.round(D);return this._visibleSize!==T?(this._visibleSize=T,this._refreshComputedValues(),!0):!1}setScrollSize(D){const T=Math.round(D);return this._scrollSize!==T?(this._scrollSize=T,this._refreshComputedValues(),!0):!1}setScrollPosition(D){const T=Math.round(D);return this._scrollPosition!==T?(this._scrollPosition=T,this._refreshComputedValues(),!0):!1}setScrollbarSize(D){this._scrollbarSize=Math.round(D)}setOppositeScrollbarSize(D){this._oppositeScrollbarSize=Math.round(D)}static _computeValues(D,T,f,v,m){const S=Math.max(0,f-D),h=Math.max(0,S-2*T),a=v>0&&v>f;if(!a)return{computedAvailableSize:Math.round(S),computedIsNeeded:a,computedSliderSize:Math.round(h),computedSliderRatio:0,computedSliderPosition:0};const r=Math.round(Math.max(t,Math.floor(f*h/v))),i=(h-r)/(v-f),s=m*i;return{computedAvailableSize:Math.round(S),computedIsNeeded:a,computedSliderSize:Math.round(r),computedSliderRatio:i,computedSliderPosition:Math.round(s)}}_refreshComputedValues(){const D=y._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=D.computedAvailableSize,this._computedIsNeeded=D.computedIsNeeded,this._computedSliderSize=D.computedSliderSize,this._computedSliderRatio=D.computedSliderRatio,this._computedSliderPosition=D.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(D){if(!this._computedIsNeeded)return 0;const T=D-this._arrowSize-this._computedSliderSize/2;return Math.round(T/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(D){if(!this._computedIsNeeded)return 0;const T=D-this._arrowSize;let f=this._scrollPosition;return T<this._computedSliderPosition?f-=this._visibleSize:f+=this._visibleSize,f}getDesiredScrollPositionFromDelta(D){if(!this._computedIsNeeded)return 0;const T=this._computedSliderPosition+D;return Math.round(T/this._computedSliderRatio)}}e.ScrollbarState=y}),define(Q[299],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WeakMapper=e.TreeError=e.TreeDragOverReactions=e.TreeDragOverBubble=e.TreeMouseEventTarget=e.ObjectTreeElementCollapseState=e.TreeVisibility=void 0;var t;(function(v){v[v.Hidden=0]="Hidden",v[v.Visible=1]="Visible",v[v.Recurse=2]="Recurse"})(t||(e.TreeVisibility=t={}));var y;(function(v){v[v.Expanded=0]="Expanded",v[v.Collapsed=1]="Collapsed",v[v.PreserveOrExpanded=2]="PreserveOrExpanded",v[v.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(y||(e.ObjectTreeElementCollapseState=y={}));var b;(function(v){v[v.Unknown=0]="Unknown",v[v.Twistie=1]="Twistie",v[v.Element=2]="Element",v[v.Filter=3]="Filter"})(b||(e.TreeMouseEventTarget=b={}));var D;(function(v){v[v.Down=0]="Down",v[v.Up=1]="Up"})(D||(e.TreeDragOverBubble=D={})),e.TreeDragOverReactions={acceptBubbleUp(){return{accept:!0,bubble:1}},acceptBubbleDown(v=!1){return{accept:!0,bubble:0,autoExpand:v}},acceptCopyBubbleUp(){return{accept:!0,bubble:1,effect:0}},acceptCopyBubbleDown(v=!1){return{accept:!0,bubble:0,effect:0,autoExpand:v}}};class T extends Error{constructor(m,S){super(`TreeError [${m}] ${S}`)}}e.TreeError=T;class f{constructor(m){this.fn=m,this._map=new WeakMap}map(m){let S=this._map.get(m);return S||(S=this.fn(m),this._map.set(m,S)),S}}e.WeakMapper=f}),define(Q[1025],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoaderStats=e.isESM=void 0,e.isESM=!1;class t{static get(){const b=new Map,D=new Map,T=new Map,f=new Map;function v(r,i){r.has(i.detail)||r.set(i.detail,-i.timestamp)}function m(r,i){const s=r.get(i.detail);s&&(s>=0||r.set(i.detail,s+i.timestamp))}let S=[];typeof q=="function"&&typeof q.getStats=="function"&&(S=q.getStats().slice(0).sort((r,i)=>r.timestamp-i.timestamp));for(const r of S)switch(r.type){case 10:v(b,r);break;case 11:case 12:m(b,r);break;case 21:v(D,r);break;case 22:m(D,r);break;case 33:v(T,r);break;case 34:m(T,r);break;case 31:v(f,r);break;case 32:m(f,r);break}let h=0;T.forEach(r=>h+=r);function a(r){const i=[];return r.forEach((s,o)=>i.push([o,s])),i}return{amdLoad:a(b),amdInvoke:a(D),nodeRequire:a(T),nodeEval:a(f),nodeRequireTotal:h}}static toMarkdownTable(b,D){let T="";const f=[];return b.forEach((v,m)=>{f[m]=v.length}),D.forEach(v=>{v.forEach((m,S)=>{typeof m>"u"&&(m=v[S]="-");const h=m.toString().length;f[S]=Math.max(h,f[S])})}),b.forEach((v,m)=>{T+=`| ${v+" ".repeat(f[m]-v.toString().length)} `}),T+=`| `,b.forEach((v,m)=>{T+=`| ${"-".repeat(f[m])} `}),T+=`| `,D.forEach(v=>{v.forEach((m,S)=>{typeof m<"u"&&(T+=`| ${m+" ".repeat(f[S]-m.toString().length)} `)}),T+=`| `}),T}}e.LoaderStats=t}),define(Q[141],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SetMap=e.diffMaps=e.diffSets=e.groupBy=e.forEach=e.values=void 0;const t=Object.prototype.hasOwnProperty;function y(m){const S=[];for(let h in m)t.call(m,h)&&S.push(m[h]);return S}e.values=y;function b(m,S){for(let h in m)if(t.call(m,h)&&S({key:h,value:m[h]},function(){delete m[h]})===!1)return}e.forEach=b;function D(m,S){const h=Object.create(null);for(const a of m){const r=S(a);let i=h[r];i||(i=h[r]=[]),i.push(a)}return h}e.groupBy=D;function T(m,S){const h=[],a=[];for(const r of m)S.has(r)||h.push(r);for(const r of S)m.has(r)||a.push(r);return{removed:h,added:a}}e.diffSets=T;function f(m,S){const h=[],a=[];for(const[r,i]of m)S.has(r)||h.push(i);for(const[r,i]of S)m.has(r)||a.push(i);return{removed:h,added:a}}e.diffMaps=f;class v{constructor(){this.map=new Map}add(S,h){let a=this.map.get(S);a||(a=new Set,this.map.set(S,a)),a.add(h)}delete(S,h){const a=this.map.get(S);a&&(a.delete(h),a.size===0&&this.map.delete(S))}forEach(S,h){const a=this.map.get(S);a&&a.forEach(h)}get(S){const h=this.map.get(S);return h||new Set}}e.SetMap=v}),define(Q[80],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.HSVA=e.HSLA=e.RGBA=void 0;function t(f,v){const m=Math.pow(10,v);return Math.round(f*m)/m}class y{constructor(v,m,S,h=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,v))|0,this.g=Math.min(255,Math.max(0,m))|0,this.b=Math.min(255,Math.max(0,S))|0,this.a=t(Math.max(Math.min(1,h),0),3)}static equals(v,m){return v.r===m.r&&v.g===m.g&&v.b===m.b&&v.a===m.a}}e.RGBA=y;class b{constructor(v,m,S,h){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,v),0)|0,this.s=t(Math.max(Math.min(1,m),0),3),this.l=t(Math.max(Math.min(1,S),0),3),this.a=t(Math.max(Math.min(1,h),0),3)}static equals(v,m){return v.h===m.h&&v.s===m.s&&v.l===m.l&&v.a===m.a}static fromRGBA(v){const m=v.r/255,S=v.g/255,h=v.b/255,a=v.a,r=Math.max(m,S,h),i=Math.min(m,S,h);let s=0,o=0;const u=(i+r)/2,d=r-i;if(d>0){switch(o=Math.min(u<=.5?d/(2*u):d/(2-2*u),1),r){case m:s=(S-h)/d+(S<h?6:0);break;case S:s=(h-m)/d+2;break;case h:s=(m-S)/d+4;break}s*=60,s=Math.round(s)}return new b(s,o,u,a)}static _hue2rgb(v,m,S){return S<0&&(S+=1),S>1&&(S-=1),S<1/6?v+(m-v)*6*S:S<1/2?m:S<2/3?v+(m-v)*(2/3-S)*6:v}static toRGBA(v){const m=v.h/360,{s:S,l:h,a}=v;let r,i,s;if(S===0)r=i=s=h;else{const o=h<.5?h*(1+S):h+S-h*S,u=2*h-o;r=b._hue2rgb(u,o,m+1/3),i=b._hue2rgb(u,o,m),s=b._hue2rgb(u,o,m-1/3)}return new y(Math.round(r*255),Math.round(i*255),Math.round(s*255),a)}}e.HSLA=b;class D{constructor(v,m,S,h){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,v),0)|0,this.s=t(Math.max(Math.min(1,m),0),3),this.v=t(Math.max(Math.min(1,S),0),3),this.a=t(Math.max(Math.min(1,h),0),3)}static equals(v,m){return v.h===m.h&&v.s===m.s&&v.v===m.v&&v.a===m.a}static fromRGBA(v){const m=v.r/255,S=v.g/255,h=v.b/255,a=Math.max(m,S,h),r=Math.min(m,S,h),i=a-r,s=a===0?0:i/a;let o;return i===0?o=0:a===m?o=((S-h)/i%6+6)%6:a===S?o=(h-m)/i+2:o=(m-S)/i+4,new D(Math.round(o*60),s,a,v.a)}static toRGBA(v){const{h:m,s:S,v:h,a}=v,r=h*S,i=r*(1-Math.abs(m/60%2-1)),s=h-r;let[o,u,d]=[0,0,0];return m<60?(o=r,u=i):m<120?(o=i,u=r):m<180?(u=r,d=i):m<240?(u=i,d=r):m<300?(o=i,d=r):m<=360&&(o=r,d=i),o=Math.round((o+s)*255),u=Math.round((u+s)*255),d=Math.round((d+s)*255),new y(o,u,d,a)}}e.HSVA=D;class T{static fromHex(v){return T.Format.CSS.parseHex(v)||T.red}static equals(v,m){return!v&&!m?!0:!v||!m?!1:v.equals(m)}get hsla(){return this._hsla?this._hsla:b.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:D.fromRGBA(this.rgba)}constructor(v){if(v)if(v instanceof y)this.rgba=v;else if(v instanceof b)this._hsla=v,this.rgba=b.toRGBA(v);else if(v instanceof D)this._hsva=v,this.rgba=D.toRGBA(v);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(v){return!!v&&y.equals(this.rgba,v.rgba)&&b.equals(this.hsla,v.hsla)&&D.equals(this.hsva,v.hsva)}getRelativeLuminance(){const v=T._relativeLuminanceForComponent(this.rgba.r),m=T._relativeLuminanceForComponent(this.rgba.g),S=T._relativeLuminanceForComponent(this.rgba.b),h=.2126*v+.7152*m+.0722*S;return t(h,4)}static _relativeLuminanceForComponent(v){const m=v/255;return m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4)}getContrastRatio(v){const m=this.getRelativeLuminance(),S=v.getRelativeLuminance();return m>S?(m+.05)/(S+.05):(S+.05)/(m+.05)}isDarker(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3<128}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(v){const m=this.getRelativeLuminance(),S=v.getRelativeLuminance();return m>S}isDarkerThan(v){const m=this.getRelativeLuminance(),S=v.getRelativeLuminance();return m<S}lighten(v){return new T(new b(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*v,this.hsla.a))}darken(v){return new T(new b(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*v,this.hsla.a))}transparent(v){const{r:m,g:S,b:h,a}=this.rgba;return new T(new y(m,S,h,a*v))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new T(new y(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}blend(v){const m=v.rgba,S=this.rgba.a,h=m.a,a=S+h*(1-S);if(a<1e-6)return T.transparent;const r=this.rgba.r*S/a+m.r*h*(1-S)/a,i=this.rgba.g*S/a+m.g*h*(1-S)/a,s=this.rgba.b*S/a+m.b*h*(1-S)/a;return new T(new y(r,i,s,a))}makeOpaque(v){if(this.isOpaque()||v.rgba.a!==1)return this;const{r:m,g:S,b:h,a}=this.rgba;return new T(new y(v.rgba.r-a*(v.rgba.r-m),v.rgba.g-a*(v.rgba.g-S),v.rgba.b-a*(v.rgba.b-h),1))}flatten(...v){const m=v.reduceRight((S,h)=>T._flatten(h,S));return T._flatten(this,m)}static _flatten(v,m){const S=1-v.rgba.a;return new T(new y(S*m.rgba.r+v.rgba.a*v.rgba.r,S*m.rgba.g+v.rgba.a*v.rgba.g,S*m.rgba.b+v.rgba.a*v.rgba.b))}toString(){return this._toString||(this._toString=T.Format.CSS.format(this)),this._toString}static getLighterColor(v,m,S){if(v.isLighterThan(m))return v;S=S||.5;const h=v.getRelativeLuminance(),a=m.getRelativeLuminance();return S=S*(a-h)/a,v.lighten(S)}static getDarkerColor(v,m,S){if(v.isDarkerThan(m))return v;S=S||.5;const h=v.getRelativeLuminance(),a=m.getRelativeLuminance();return S=S*(h-a)/h,v.darken(S)}static{this.white=new T(new y(255,255,255,1))}static{this.black=new T(new y(0,0,0,1))}static{this.red=new T(new y(255,0,0,1))}static{this.blue=new T(new y(0,0,255,1))}static{this.green=new T(new y(0,255,0,1))}static{this.cyan=new T(new y(0,255,255,1))}static{this.lightgrey=new T(new y(211,211,211,1))}static{this.transparent=new T(new y(0,0,0,0))}}e.Color=T,function(f){let v;(function(m){let S;(function(h){function a(n){return n.rgba.a===1?`rgb(${n.rgba.r}, ${n.rgba.g}, ${n.rgba.b})`:f.Format.CSS.formatRGBA(n)}h.formatRGB=a;function r(n){return`rgba(${n.rgba.r}, ${n.rgba.g}, ${n.rgba.b}, ${+n.rgba.a.toFixed(2)})`}h.formatRGBA=r;function i(n){return n.hsla.a===1?`hsl(${n.hsla.h}, ${(n.hsla.s*100).toFixed(2)}%, ${(n.hsla.l*100).toFixed(2)}%)`:f.Format.CSS.formatHSLA(n)}h.formatHSL=i;function s(n){return`hsla(${n.hsla.h}, ${(n.hsla.s*100).toFixed(2)}%, ${(n.hsla.l*100).toFixed(2)}%, ${n.hsla.a.toFixed(2)})`}h.formatHSLA=s;function o(n){const g=n.toString(16);return g.length!==2?"0"+g:g}function u(n){return`#${o(n.rgba.r)}${o(n.rgba.g)}${o(n.rgba.b)}`}h.formatHex=u;function d(n,g=!1){return g&&n.rgba.a===1?f.Format.CSS.formatHex(n):`#${o(n.rgba.r)}${o(n.rgba.g)}${o(n.rgba.b)}${o(Math.round(n.rgba.a*255))}`}h.formatHexA=d;function p(n){return n.isOpaque()?f.Format.CSS.formatHex(n):f.Format.CSS.formatRGBA(n)}h.format=p;function c(n){const g=n.length;if(g===0||n.charCodeAt(0)!==35)return null;if(g===7){const w=16*l(n.charCodeAt(1))+l(n.charCodeAt(2)),E=16*l(n.charCodeAt(3))+l(n.charCodeAt(4)),C=16*l(n.charCodeAt(5))+l(n.charCodeAt(6));return new f(new y(w,E,C,1))}if(g===9){const w=16*l(n.charCodeAt(1))+l(n.charCodeAt(2)),E=16*l(n.charCodeAt(3))+l(n.charCodeAt(4)),C=16*l(n.charCodeAt(5))+l(n.charCodeAt(6)),I=16*l(n.charCodeAt(7))+l(n.charCodeAt(8));return new f(new y(w,E,C,I/255))}if(g===4){const w=l(n.charCodeAt(1)),E=l(n.charCodeAt(2)),C=l(n.charCodeAt(3));return new f(new y(16*w+w,16*E+E,16*C+C))}if(g===5){const w=l(n.charCodeAt(1)),E=l(n.charCodeAt(2)),C=l(n.charCodeAt(3)),I=l(n.charCodeAt(4));return new f(new y(16*w+w,16*E+E,16*C+C,(16*I+I)/255))}return null}h.parseHex=c;function l(n){switch(n){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(S=m.CSS||(m.CSS={}))})(v=f.Format||(f.Format={}))}(T||(e.Color=T={}))}),define(Q[102],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=e.debounce=e.memoize=void 0;function t(T){return(f,v,m)=>{let S=null,h=null;if(typeof m.value=="function"?(S="value",h=m.value):typeof m.get=="function"&&(S="get",h=m.get),!h)throw new Error("not supported");m[S]=T(h,v)}}function y(T,f,v){let m=null,S=null;if(typeof v.value=="function"?(m="value",S=v.value,S.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof v.get=="function"&&(m="get",S=v.get),!S)throw new Error("not supported");const h=`$memoize$${f}`;v[m]=function(...a){return this.hasOwnProperty(h)||Object.defineProperty(this,h,{configurable:!1,enumerable:!1,writable:!1,value:S.apply(this,a)}),this[h]}}e.memoize=y;function b(T,f,v){return t((m,S)=>{const h=`$debounce$${S}`,a=`$debounce$result$${S}`;return function(...r){this[a]||(this[a]=v?v():void 0),clearTimeout(this[h]),f&&(this[a]=f(this[a],...r),r=[this[a]]),this[h]=setTimeout(()=>{m.apply(this,r),this[a]=v?v():void 0},T)}})}e.debounce=b;function D(T,f,v){return t((m,S)=>{const h=`$throttle$timer$${S}`,a=`$throttle$result$${S}`,r=`$throttle$lastRun$${S}`,i=`$throttle$pending$${S}`;return function(...s){if(this[a]||(this[a]=v?v():void 0),(this[r]===null||this[r]===void 0)&&(this[r]=-Number.MAX_VALUE),f&&(this[a]=f(this[a],...s)),this[i])return;const o=this[r]+T;o<=Date.now()?(this[r]=Date.now(),m.apply(this,[this[a]]),this[a]=v?v():void 0):(this[i]=!0,this[h]=setTimeout(()=>{this[i]=!1,this[r]=Date.now(),m.apply(this,[this[a]]),this[a]=v?v():void 0},o-Date.now()))}})}e.throttle=D}),define(Q[1524],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffChange=void 0;class t{constructor(b,D,T,f){this.originalStart=b,this.originalLength=D,this.modifiedStart=T,this.modifiedLength=f}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}e.DiffChange=t}),define(Q[15],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BugIndicatingError=e.ErrorNoTelemetry=e.ExpectedError=e.NotSupportedError=e.NotImplementedError=e.getErrorMessage=e.disposed=e.readonly=e.illegalState=e.illegalArgument=e.canceled=e.CancellationError=e.isCancellationError=e.transformErrorForSerialization=e.onUnexpectedExternalError=e.onUnexpectedError=e.isSigPipeError=e.setUnexpectedErrorHandler=e.errorHandler=e.ErrorHandler=void 0;class t{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(g){setTimeout(()=>{throw g.stack?c.isErrorNoTelemetry(g)?new c(g.message+` `+g.stack):new Error(g.message+` `+g.stack):g},0)}}addListener(g){return this.listeners.push(g),()=>{this._removeListener(g)}}emit(g){this.listeners.forEach(w=>{w(g)})}_removeListener(g){this.listeners.splice(this.listeners.indexOf(g),1)}setUnexpectedErrorHandler(g){this.unexpectedErrorHandler=g}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(g){this.unexpectedErrorHandler(g),this.emit(g)}onUnexpectedExternalError(g){this.unexpectedErrorHandler(g)}}e.ErrorHandler=t,e.errorHandler=new t;function y(n){e.errorHandler.setUnexpectedErrorHandler(n)}e.setUnexpectedErrorHandler=y;function b(n){if(!n||typeof n!="object")return!1;const g=n;return g.code==="EPIPE"&&g.syscall?.toUpperCase()==="WRITE"}e.isSigPipeError=b;function D(n){m(n)||e.errorHandler.onUnexpectedError(n)}e.onUnexpectedError=D;function T(n){m(n)||e.errorHandler.onUnexpectedExternalError(n)}e.onUnexpectedExternalError=T;function f(n){if(n instanceof Error){const{name:g,message:w}=n;let E=n.errorCode;const C=n.stacktrace||n.stack;return{$isError:!0,name:g,message:w,stack:C,errorCode:E,data:n.data}}return n}e.transformErrorForSerialization=f;const v="Canceled";function m(n){return n instanceof S?!0:n instanceof Error&&n.name===v&&n.message===v}e.isCancellationError=m;class S extends Error{constructor(){super(v),this.name=this.message}}e.CancellationError=S;function h(){const n=new Error(v);return n.name=n.message,n}e.canceled=h;function a(n){return n?new Error(`Illegal argument: ${n}`):new Error("Illegal argument")}e.illegalArgument=a;function r(n){return n?new Error(`Illegal state: ${n}`):new Error("Illegal state")}e.illegalState=r;function i(n){return n?new Error(`readonly property '${n} cannot be changed'`):new Error("readonly property cannot be changed")}e.readonly=i;function s(n){const g=new Error(`${n} has been disposed`);return g.name="DISPOSED",g}e.disposed=s;function o(n){return n?n.message?n.message:n.stack?n.stack.split(` `)[0]:String(n):"Error"}e.getErrorMessage=o;class u extends Error{constructor(g){super("NotImplemented"),g&&(this.message=g)}}e.NotImplementedError=u;class d extends Error{constructor(g){super("NotSupported"),g&&(this.message=g)}}e.NotSupportedError=d;class p extends Error{constructor(){super(...arguments),this.isExpected=!0}}e.ExpectedError=p;class c extends Error{constructor(g){super(g),this.name="CodeExpectedError"}static fromError(g){if(g instanceof c)return g;const w=new c;return w.message=g.message,w.stack=g.stack,w}static isErrorNoTelemetry(g){return g.name==="CodeExpectedError"}}e.ErrorNoTelemetry=c;class l extends Error{constructor(g){super(g||"An unexpected bug occurred."),Object.setPrototypeOf(this,l.prototype)}}e.BugIndicatingError=l}),define(Q[1525],Y([1,0,183,15]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelStore=void 0;class b{constructor(f,v){this.id=f,this.type=v}}class D{constructor(f){this._logService=f,this._descriptorMappings={},this._componentMappings={},this._componentActions={},this._validationCallbacks=[]}createComponentDescriptor(f,v){let m=new b(v,f);return this._descriptorMappings[v]=m,m}getComponentDescriptor(f){return this._descriptorMappings[f]}registerComponent(f){this._logService.debug(`Registering component ${f.descriptor.id}`);let v=f.descriptor.id;this._componentMappings[v]=f,this.runPendingActions(v,f)}unregisterComponent(f){this._logService.debug(`Unregistering component ${f.descriptor.id}`);let v=f.descriptor.id;this._componentMappings[v]=void 0,this._componentActions[v]=void 0,this._descriptorMappings[v]=void 0}getComponent(f){return this._componentMappings[f]}eventuallyRunOnComponent(f,v,m=!1){let S=this.getComponent(f);S?v(S):this.addPendingAction(f,v,m)}registerValidationCallback(f){this._validationCallbacks.push(f)}async validate(f){return(await Promise.all(this._validationCallbacks.map(m=>m(f.descriptor.id)))).every(m=>m===!0)}addPendingAction(f,v,m){let S=this._componentActions[f];S||(S={initial:[],actions:new t.Deferred},this._componentActions[f]=S),m?S.initial.push(v):S.actions.promise.then(h=>v(h))}runPendingActions(f,v){let m=this._componentActions[f];m&&(new Promise(S=>{m.initial.forEach(h=>h(v)),S()}).then(()=>{m.actions.resolve(v)}).catch(y.onUnexpectedError),this._componentActions[f]=void 0)}}e.ModelStore=D}),define(Q[364],Y([1,0,15]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTrustedTypesPolicy=void 0;function y(b,D){const T=globalThis.MonacoEnvironment;if(T?.createTrustedTypesPolicy)try{return T.createTrustedTypesPolicy(b,D)}catch(f){(0,t.onUnexpectedError)(f);return}try{return window.trustedTypes?.createPolicy(b,D)}catch(f){(0,t.onUnexpectedError)(f);return}}e.createTrustedTypesPolicy=y}),define(Q[20],Y([1,0,15]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallbackIterable=e.ArrayQueue=e.findMaxIdxBy=e.findMinBy=e.findLastMaxBy=e.findMaxBy=e.reverseOrder=e.booleanComparator=e.numberComparator=e.tieBreakComparators=e.compareBy=e.CompareResult=e.splice=e.insertInto=e.mapFind=e.getRandomElement=e.asArray=e.mapArrayOrNot=e.pushMany=e.pushToEnd=e.pushToStart=e.shuffle=e.arrayInsert=e.remove=e.insert=e.index=e.range=e.flatten=e.commonPrefixLength=e.lastOrDefault=e.firstOrDefault=e.findLastIndex=e.findLast=e.uniqueFilter=e.distinct=e.isNonEmptyArray=e.isFalsyOrEmpty=e.move=e.coalesceInPlace=e.coalesce=e.topAsync=e.top=e.delta=e.sortedDiff=e.groupBy=e.quickSelect=e.findFirstInSorted=e.binarySearch2=e.binarySearch=e.removeFastWithoutKeepingOrder=e.equals=e.tail2=e.tail=void 0;function y(ne,ce=0){return ne[ne.length-(1+ce)]}e.tail=y;function b(ne){if(ne.length===0)throw new Error("Invalid tail call");return[ne.slice(0,ne.length-1),ne[ne.length-1]]}e.tail2=b;function D(ne,ce,ae=(ue,de)=>ue===de){if(ne===ce)return!0;if(!ne||!ce||ne.length!==ce.length)return!1;for(let ue=0,de=ne.length;ue<de;ue++)if(!ae(ne[ue],ce[ue]))return!1;return!0}e.equals=D;function T(ne,ce){const ae=ne.length-1;ce<ae&&(ne[ce]=ne[ae]),ne.pop()}e.removeFastWithoutKeepingOrder=T;function f(ne,ce,ae){return v(ne.length,ue=>ae(ne[ue],ce))}e.binarySearch=f;function v(ne,ce){let ae=0,ue=ne-1;for(;ae<=ue;){const de=(ae+ue)/2|0,ge=ce(de);if(ge<0)ae=de+1;else if(ge>0)ue=de-1;else return de}return-(ae+1)}e.binarySearch2=v;function m(ne,ce){let ae=0,ue=ne.length;if(ue===0)return 0;for(;ae<ue;){const de=Math.floor((ae+ue)/2);ce(ne[de])?ue=de:ae=de+1}return ae}e.findFirstInSorted=m;function S(ne,ce,ae){if(ne=ne|0,ne>=ce.length)throw new TypeError("invalid index");const ue=ce[Math.floor(ce.length*Math.random())],de=[],ge=[],he=[];for(const be of ce){const ve=ae(be,ue);ve<0?de.push(be):ve>0?ge.push(be):he.push(be)}return ne<de.length?S(ne,de,ae):ne<de.length+he.length?he[0]:S(ne-(de.length+he.length),ge,ae)}e.quickSelect=S;function h(ne,ce){const ae=[];let ue;for(const de of ne.slice(0).sort(ce))!ue||ce(ue[0],de)!==0?(ue=[de],ae.push(ue)):ue.push(de);return ae}e.groupBy=h;function a(ne,ce,ae){const ue=[];function de(be,ve,Ie){if(ve===0&&Ie.length===0)return;const Se=ue[ue.length-1];Se&&Se.start+Se.deleteCount===be?(Se.deleteCount+=ve,Se.toInsert.push(...Ie)):ue.push({start:be,deleteCount:ve,toInsert:Ie})}let ge=0,he=0;for(;;){if(ge===ne.length){de(ge,0,ce.slice(he));break}if(he===ce.length){de(ge,ne.length-ge,[]);break}const be=ne[ge],ve=ce[he],Ie=ae(be,ve);Ie===0?(ge+=1,he+=1):Ie<0?(de(ge,1,[]),ge+=1):Ie>0&&(de(ge,0,[ve]),he+=1)}return ue}e.sortedDiff=a;function r(ne,ce,ae){const ue=a(ne,ce,ae),de=[],ge=[];for(const he of ue)de.push(...ne.slice(he.start,he.start+he.deleteCount)),ge.push(...he.toInsert);return{removed:de,added:ge}}e.delta=r;function i(ne,ce,ae){if(ae===0)return[];const ue=ne.slice(0,ae).sort(ce);return o(ne,ce,ue,ae,ne.length),ue}e.top=i;function s(ne,ce,ae,ue,de){return ae===0?Promise.resolve([]):new Promise((ge,he)=>{(async()=>{const be=ne.length,ve=ne.slice(0,ae).sort(ce);for(let Ie=ae,Se=Math.min(ae+ue,be);Ie<be;Ie=Se,Se=Math.min(Se+ue,be)){if(Ie>ae&&await new Promise(we=>setTimeout(we)),de&&de.isCancellationRequested)throw new t.CancellationError;o(ne,ce,ve,Ie,Se)}return ve})().then(ge,he)})}e.topAsync=s;function o(ne,ce,ae,ue,de){for(const ge=ae.length;ue<de;ue++){const he=ne[ue];if(ce(he,ae[ge-1])<0){ae.pop();const be=m(ae,ve=>ce(he,ve)<0);ae.splice(be,0,he)}}}function u(ne){return ne.filter(ce=>!!ce)}e.coalesce=u;function d(ne){let ce=0;for(let ae=0;ae<ne.length;ae++)ne[ae]&&(ne[ce]=ne[ae],ce+=1);ne.length=ce}e.coalesceInPlace=d;function p(ne,ce,ae){ne.splice(ae,0,ne.splice(ce,1)[0])}e.move=p;function c(ne){return!Array.isArray(ne)||ne.length===0}e.isFalsyOrEmpty=c;function l(ne){return Array.isArray(ne)&&ne.length>0}e.isNonEmptyArray=l;function n(ne,ce=ae=>ae){const ae=new Set;return ne.filter(ue=>{const de=ce(ue);return ae.has(de)?!1:(ae.add(de),!0)})}e.distinct=n;function g(ne){const ce=new Set;return ae=>{const ue=ne(ae);return ce.has(ue)?!1:(ce.add(ue),!0)}}e.uniqueFilter=g;function w(ne,ce){const ae=E(ne,ce);if(ae!==-1)return ne[ae]}e.findLast=w;function E(ne,ce){for(let ae=ne.length-1;ae>=0;ae--){const ue=ne[ae];if(ce(ue))return ae}return-1}e.findLastIndex=E;function C(ne,ce){return ne.length>0?ne[0]:ce}e.firstOrDefault=C;function I(ne,ce){return ne.length>0?ne[ne.length-1]:ce}e.lastOrDefault=I;function _(ne,ce,ae=(ue,de)=>ue===de){let ue=0;for(let de=0,ge=Math.min(ne.length,ce.length);de<ge&&ae(ne[de],ce[de]);de++)ue++;return ue}e.commonPrefixLength=_;function A(ne){return[].concat(...ne)}e.flatten=A;function k(ne,ce){let ae=typeof ce=="number"?ne:0;typeof ce=="number"?ae=ne:(ae=0,ce=ne);const ue=[];if(ae<=ce)for(let de=ae;de<ce;de++)ue.push(de);else for(let de=ae;de>ce;de--)ue.push(de);return ue}e.range=k;function L(ne,ce,ae){return ne.reduce((ue,de)=>(ue[ce(de)]=ae?ae(de):de,ue),Object.create(null))}e.index=L;function R(ne,ce){return ne.push(ce),()=>M(ne,ce)}e.insert=R;function M(ne,ce){const ae=ne.indexOf(ce);if(ae>-1)return ne.splice(ae,1),ce}e.remove=M;function N(ne,ce,ae){const ue=ne.slice(0,ce),de=ne.slice(ce);return ue.concat(ae,de)}e.arrayInsert=N;function P(ne,ce){let ae;if(typeof ce=="number"){let ue=ce;ae=()=>{const de=Math.sin(ue++)*179426549;return de-Math.floor(de)}}else ae=Math.random;for(let ue=ne.length-1;ue>0;ue-=1){const de=Math.floor(ae()*(ue+1)),ge=ne[ue];ne[ue]=ne[de],ne[de]=ge}}e.shuffle=P;function x(ne,ce){const ae=ne.indexOf(ce);ae>-1&&(ne.splice(ae,1),ne.unshift(ce))}e.pushToStart=x;function F(ne,ce){const ae=ne.indexOf(ce);ae>-1&&(ne.splice(ae,1),ne.push(ce))}e.pushToEnd=F;function V(ne,ce){for(const ae of ce)ne.push(ae)}e.pushMany=V;function W(ne,ce){return Array.isArray(ne)?ne.map(ce):ce(ne)}e.mapArrayOrNot=W;function z(ne){return Array.isArray(ne)?ne:[ne]}e.asArray=z;function B(ne){return ne[Math.floor(Math.random()*ne.length)]}e.getRandomElement=B;function K(ne,ce){for(const ae of ne){const ue=ce(ae);if(ue!==void 0)return ue}}e.mapFind=K;function H(ne,ce,ae){const ue=G(ne,ce),de=ne.length,ge=ae.length;ne.length=de+ge;for(let he=de-1;he>=ue;he--)ne[he+ge]=ne[he];for(let he=0;he<ge;he++)ne[he+ue]=ae[he]}e.insertInto=H;function U(ne,ce,ae,ue){const de=G(ne,ce),ge=ne.splice(de,ae);return H(ne,de,ue),ge}e.splice=U;function G(ne,ce){return ce<0?Math.max(ce+ne.length,0):Math.min(ce,ne.length)}var $;(function(ne){function ce(ge){return ge<0}ne.isLessThan=ce;function ae(ge){return ge<=0}ne.isLessThanOrEqual=ae;function ue(ge){return ge>0}ne.isGreaterThan=ue;function de(ge){return ge===0}ne.isNeitherLessOrGreaterThan=de,ne.greaterThan=1,ne.lessThan=-1,ne.neitherLessOrGreaterThan=0})($||(e.CompareResult=$={}));function ie(ne,ce){return(ae,ue)=>ce(ne(ae),ne(ue))}e.compareBy=ie;function J(...ne){return(ce,ae)=>{for(const ue of ne){const de=ue(ce,ae);if(!$.isNeitherLessOrGreaterThan(de))return de}return $.neitherLessOrGreaterThan}}e.tieBreakComparators=J;const j=(ne,ce)=>ne-ce;e.numberComparator=j;const ee=(ne,ce)=>(0,e.numberComparator)(ne?1:0,ce?1:0);e.booleanComparator=ee;function X(ne){return(ce,ae)=>-ne(ce,ae)}e.reverseOrder=X;function te(ne,ce){if(ne.length===0)return;let ae=ne[0];for(let ue=1;ue<ne.length;ue++){const de=ne[ue];ce(de,ae)>0&&(ae=de)}return ae}e.findMaxBy=te;function Z(ne,ce){if(ne.length===0)return;let ae=ne[0];for(let ue=1;ue<ne.length;ue++){const de=ne[ue];ce(de,ae)>=0&&(ae=de)}return ae}e.findLastMaxBy=Z;function se(ne,ce){return te(ne,(ae,ue)=>-ce(ae,ue))}e.findMinBy=se;function re(ne,ce){if(ne.length===0)return-1;let ae=0;for(let ue=1;ue<ne.length;ue++){const de=ne[ue];ce(de,ne[ae])>0&&(ae=ue)}return ae}e.findMaxIdxBy=re;class oe{constructor(ce){this.items=ce,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(ce){let ae=this.firstIdx;for(;ae<this.items.length&&ce(this.items[ae]);)ae++;const ue=ae===this.firstIdx?null:this.items.slice(this.firstIdx,ae);return this.firstIdx=ae,ue}takeFromEndWhile(ce){let ae=this.lastIdx;for(;ae>=0&&ce(this.items[ae]);)ae--;const ue=ae===this.lastIdx?null:this.items.slice(ae+1,this.lastIdx+1);return this.lastIdx=ae,ue}peek(){if(this.length!==0)return this.items[this.firstIdx]}peekLast(){if(this.length!==0)return this.items[this.lastIdx]}dequeue(){const ce=this.items[this.firstIdx];return this.firstIdx++,ce}removeLast(){const ce=this.items[this.lastIdx];return this.lastIdx--,ce}takeCount(ce){const ae=this.items.slice(this.firstIdx,this.firstIdx+ce);return this.firstIdx+=ce,ae}}e.ArrayQueue=oe;class le{static{this.empty=new le(ce=>{})}constructor(ce){this.iterate=ce}forEach(ce){this.iterate(ae=>(ce(ae),!0))}toArray(){const ce=[];return this.iterate(ae=>(ce.push(ae),!0)),ce}filter(ce){return new le(ae=>this.iterate(ue=>ce(ue)?ae(ue):!0))}map(ce){return new le(ae=>this.iterate(ue=>ae(ce(ue))))}some(ce){let ae=!1;return this.iterate(ue=>(ae=ce(ue),!ae)),ae}findFirst(ce){let ae;return this.iterate(ue=>ce(ue)?(ae=ue,!1):!0),ae}findLast(ce){let ae;return this.iterate(ue=>(ce(ue)&&(ae=ue),!0)),ae}findLastMaxBy(ce){let ae,ue=!0;return this.iterate(de=>((ue||$.isGreaterThan(ce(de,ae)))&&(ue=!1,ae=de),!0)),ae}}e.CallbackIterable=le}),define(Q[214],Y([1,0,15]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkAdjacentItems=e.assertFn=e.assert=e.assertNever=e.ok=void 0;function y(v,m){if(!v)throw new Error(m?`Assertion failed (${m})`:"Assertion Failed")}e.ok=y;function b(v,m="Unreachable"){throw new Error(m)}e.assertNever=b;function D(v){if(!v)throw new t.BugIndicatingError("Assertion Failed")}e.assert=D;function T(v){if(!v()){debugger;v(),(0,t.onUnexpectedError)(new t.BugIndicatingError("Assertion Failed"))}}e.assertFn=T;function f(v,m){let S=0;for(;S<v.length-1;){const h=v[S],a=v[S+1];if(!m(h,a))return!1;S++}return!0}e.checkAdjacentItems=f}),define(Q[202],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.once=void 0;function t(y){const b=this;let D=!1,T;return function(){return D||(D=!0,T=y.apply(b,arguments)),T}}e.once=t}),define(Q[320],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGenerator=e.IdGenerator=void 0;class t{constructor(b){this._prefix=b,this._lastId=0}nextId(){return this._prefix+ ++this._lastId+"-id"}}e.IdGenerator=t,e.defaultGenerator=new t("id#")}),define(Q[83],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Iterable=void 0;var t;(function(y){function b(c){return c&&typeof c=="object"&&typeof c[Symbol.iterator]=="function"}y.is=b;const D=Object.freeze([]);function T(){return D}y.empty=T;function*f(c){yield c}y.single=f;function v(c){return b(c)?c:f(c)}y.wrap=v;function m(c){return c||D}y.from=m;function S(c){return!c||c[Symbol.iterator]().next().done===!0}y.isEmpty=S;function h(c){return c[Symbol.iterator]().next().value}y.first=h;function a(c,l){for(const n of c)if(l(n))return!0;return!1}y.some=a;function r(c,l){for(const n of c)if(l(n))return n}y.find=r;function*i(c,l){for(const n of c)l(n)&&(yield n)}y.filter=i;function*s(c,l){let n=0;for(const g of c)yield l(g,n++)}y.map=s;function*o(...c){for(const l of c)for(const n of l)yield n}y.concat=o;function u(c,l,n){let g=n;for(const w of c)g=l(g,w);return g}y.reduce=u;function*d(c,l,n=c.length){for(l<0&&(l+=c.length),n<0?n+=c.length:n>c.length&&(n=c.length);l<n;l++)yield c[l]}y.slice=d;function p(c,l=Number.POSITIVE_INFINITY){const n=[];if(l===0)return[n,c];const g=c[Symbol.iterator]();for(let w=0;w<l;w++){const E=g.next();if(E.done)return[n,y.empty()];n.push(E.value)}return[n,{[Symbol.iterator](){return g}}]}y.consume=p})(t||(e.Iterable=t={}))}),define(Q[161],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNodeType=e.stripComments=e.visit=e.findNodeAtOffset=e.contains=e.getNodeValue=e.getNodePath=e.findNodeAtLocation=e.parseTree=e.parse=e.getLocation=e.createScanner=e.ParseOptions=e.ParseErrorCode=e.SyntaxKind=e.ScanError=void 0;var t;(function(n){n[n.None=0]="None",n[n.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",n[n.UnexpectedEndOfString=2]="UnexpectedEndOfString",n[n.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",n[n.InvalidUnicode=4]="InvalidUnicode",n[n.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",n[n.InvalidCharacter=6]="InvalidCharacter"})(t||(e.ScanError=t={}));var y;(function(n){n[n.OpenBraceToken=1]="OpenBraceToken",n[n.CloseBraceToken=2]="CloseBraceToken",n[n.OpenBracketToken=3]="OpenBracketToken",n[n.CloseBracketToken=4]="CloseBracketToken",n[n.CommaToken=5]="CommaToken",n[n.ColonToken=6]="ColonToken",n[n.NullKeyword=7]="NullKeyword",n[n.TrueKeyword=8]="TrueKeyword",n[n.FalseKeyword=9]="FalseKeyword",n[n.StringLiteral=10]="StringLiteral",n[n.NumericLiteral=11]="NumericLiteral",n[n.LineCommentTrivia=12]="LineCommentTrivia",n[n.BlockCommentTrivia=13]="BlockCommentTrivia",n[n.LineBreakTrivia=14]="LineBreakTrivia",n[n.Trivia=15]="Trivia",n[n.Unknown=16]="Unknown",n[n.EOF=17]="EOF"})(y||(e.SyntaxKind=y={}));var b;(function(n){n[n.InvalidSymbol=1]="InvalidSymbol",n[n.InvalidNumberFormat=2]="InvalidNumberFormat",n[n.PropertyNameExpected=3]="PropertyNameExpected",n[n.ValueExpected=4]="ValueExpected",n[n.ColonExpected=5]="ColonExpected",n[n.CommaExpected=6]="CommaExpected",n[n.CloseBraceExpected=7]="CloseBraceExpected",n[n.CloseBracketExpected=8]="CloseBracketExpected",n[n.EndOfFileExpected=9]="EndOfFileExpected",n[n.InvalidCommentToken=10]="InvalidCommentToken",n[n.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",n[n.UnexpectedEndOfString=12]="UnexpectedEndOfString",n[n.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",n[n.InvalidUnicode=14]="InvalidUnicode",n[n.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",n[n.InvalidCharacter=16]="InvalidCharacter"})(b||(e.ParseErrorCode=b={}));var D;(function(n){n.DEFAULT={allowTrailingComma:!0}})(D||(e.ParseOptions=D={}));function T(n,g=!1){let w=0;const E=n.length;let C="",I=0,_=16,A=0;function k(F){let V=0,W=0;for(;V<F;){const z=n.charCodeAt(w);if(z>=48&&z<=57)W=W*16+z-48;else if(z>=65&&z<=70)W=W*16+z-65+10;else if(z>=97&&z<=102)W=W*16+z-97+10;else break;w++,V++}return V<F&&(W=-1),W}function L(F){w=F,C="",I=0,_=16,A=0}function R(){const F=w;if(n.charCodeAt(w)===48)w++;else for(w++;w<n.length&&m(n.charCodeAt(w));)w++;if(w<n.length&&n.charCodeAt(w)===46)if(w++,w<n.length&&m(n.charCodeAt(w)))for(w++;w<n.length&&m(n.charCodeAt(w));)w++;else return A=3,n.substring(F,w);let V=w;if(w<n.length&&(n.charCodeAt(w)===69||n.charCodeAt(w)===101))if(w++,(w<n.length&&n.charCodeAt(w)===43||n.charCodeAt(w)===45)&&w++,w<n.length&&m(n.charCodeAt(w))){for(w++;w<n.length&&m(n.charCodeAt(w));)w++;V=w}else A=3;return n.substring(F,V)}function M(){let F="",V=w;for(;;){if(w>=E){F+=n.substring(V,w),A=2;break}const W=n.charCodeAt(w);if(W===34){F+=n.substring(V,w),w++;break}if(W===92){if(F+=n.substring(V,w),w++,w>=E){A=2;break}switch(n.charCodeAt(w++)){case 34:F+='"';break;case 92:F+="\\";break;case 47:F+="/";break;case 98:F+="\b";break;case 102:F+="\f";break;case 110:F+=` `;break;case 114:F+="\r";break;case 116:F+=" ";break;case 117:{const B=k(4);B>=0?F+=String.fromCharCode(B):A=4;break}default:A=5}V=w;continue}if(W>=0&&W<=31)if(v(W)){F+=n.substring(V,w),A=2;break}else A=6;w++}return F}function N(){if(C="",A=0,I=w,w>=E)return I=E,_=17;let F=n.charCodeAt(w);if(f(F)){do w++,C+=String.fromCharCode(F),F=n.charCodeAt(w);while(f(F));return _=15}if(v(F))return w++,C+=String.fromCharCode(F),F===13&&n.charCodeAt(w)===10&&(w++,C+=` `),_=14;switch(F){case 123:return w++,_=1;case 125:return w++,_=2;case 91:return w++,_=3;case 93:return w++,_=4;case 58:return w++,_=6;case 44:return w++,_=5;case 34:return w++,C=M(),_=10;case 47:{const V=w-1;if(n.charCodeAt(w+1)===47){for(w+=2;w<E&&!v(n.charCodeAt(w));)w++;return C=n.substring(V,w),_=12}if(n.charCodeAt(w+1)===42){w+=2;const W=E-1;let z=!1;for(;w<W;){if(n.charCodeAt(w)===42&&n.charCodeAt(w+1)===47){w+=2,z=!0;break}w++}return z||(w++,A=1),C=n.substring(V,w),_=13}return C+=String.fromCharCode(F),w++,_=16}case 45:if(C+=String.fromCharCode(F),w++,w===E||!m(n.charCodeAt(w)))return _=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return C+=R(),_=11;default:for(;w<E&&P(F);)w++,F=n.charCodeAt(w);if(I!==w){switch(C=n.substring(I,w),C){case"true":return _=8;case"false":return _=9;case"null":return _=7}return _=16}return C+=String.fromCharCode(F),w++,_=16}}function P(F){if(f(F)||v(F))return!1;switch(F){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function x(){let F;do F=N();while(F>=12&&F<=15);return F}return{setPosition:L,getPosition:()=>w,scan:g?x:N,getToken:()=>_,getTokenValue:()=>C,getTokenOffset:()=>I,getTokenLength:()=>w-I,getTokenError:()=>A}}e.createScanner=T;function f(n){return n===32||n===9||n===11||n===12||n===160||n===5760||n>=8192&&n<=8203||n===8239||n===8287||n===12288||n===65279}function v(n){return n===10||n===13||n===8232||n===8233}function m(n){return n>=48&&n<=57}var S;(function(n){n[n.nullCharacter=0]="nullCharacter",n[n.maxAsciiCharacter=127]="maxAsciiCharacter",n[n.lineFeed=10]="lineFeed",n[n.carriageReturn=13]="carriageReturn",n[n.lineSeparator=8232]="lineSeparator",n[n.paragraphSeparator=8233]="paragraphSeparator",n[n.nextLine=133]="nextLine",n[n.space=32]="space",n[n.nonBreakingSpace=160]="nonBreakingSpace",n[n.enQuad=8192]="enQuad",n[n.emQuad=8193]="emQuad",n[n.enSpace=8194]="enSpace",n[n.emSpace=8195]="emSpace",n[n.threePerEmSpace=8196]="threePerEmSpace",n[n.fourPerEmSpace=8197]="fourPerEmSpace",n[n.sixPerEmSpace=8198]="sixPerEmSpace",n[n.figureSpace=8199]="figureSpace",n[n.punctuationSpace=8200]="punctuationSpace",n[n.thinSpace=8201]="thinSpace",n[n.hairSpace=8202]="hairSpace",n[n.zeroWidthSpace=8203]="zeroWidthSpace",n[n.narrowNoBreakSpace=8239]="narrowNoBreakSpace",n[n.ideographicSpace=12288]="ideographicSpace",n[n.mathematicalSpace=8287]="mathematicalSpace",n[n.ogham=5760]="ogham",n[n._=95]="_",n[n.$=36]="$",n[n._0=48]="_0",n[n._1=49]="_1",n[n._2=50]="_2",n[n._3=51]="_3",n[n._4=52]="_4",n[n._5=53]="_5",n[n._6=54]="_6",n[n._7=55]="_7",n[n._8=56]="_8",n[n._9=57]="_9",n[n.a=97]="a",n[n.b=98]="b",n[n.c=99]="c",n[n.d=100]="d",n[n.e=101]="e",n[n.f=102]="f",n[n.g=103]="g",n[n.h=104]="h",n[n.i=105]="i",n[n.j=106]="j",n[n.k=107]="k",n[n.l=108]="l",n[n.m=109]="m",n[n.n=110]="n",n[n.o=111]="o",n[n.p=112]="p",n[n.q=113]="q",n[n.r=114]="r",n[n.s=115]="s",n[n.t=116]="t",n[n.u=117]="u",n[n.v=118]="v",n[n.w=119]="w",n[n.x=120]="x",n[n.y=121]="y",n[n.z=122]="z",n[n.A=65]="A",n[n.B=66]="B",n[n.C=67]="C",n[n.D=68]="D",n[n.E=69]="E",n[n.F=70]="F",n[n.G=71]="G",n[n.H=72]="H",n[n.I=73]="I",n[n.J=74]="J",n[n.K=75]="K",n[n.L=76]="L",n[n.M=77]="M",n[n.N=78]="N",n[n.O=79]="O",n[n.P=80]="P",n[n.Q=81]="Q",n[n.R=82]="R",n[n.S=83]="S",n[n.T=84]="T",n[n.U=85]="U",n[n.V=86]="V",n[n.W=87]="W",n[n.X=88]="X",n[n.Y=89]="Y",n[n.Z=90]="Z",n[n.ampersand=38]="ampersand",n[n.asterisk=42]="asterisk",n[n.at=64]="at",n[n.backslash=92]="backslash",n[n.bar=124]="bar",n[n.caret=94]="caret",n[n.closeBrace=125]="closeBrace",n[n.closeBracket=93]="closeBracket",n[n.closeParen=41]="closeParen",n[n.colon=58]="colon",n[n.comma=44]="comma",n[n.dot=46]="dot",n[n.doubleQuote=34]="doubleQuote",n[n.equals=61]="equals",n[n.exclamation=33]="exclamation",n[n.greaterThan=62]="greaterThan",n[n.lessThan=60]="lessThan",n[n.minus=45]="minus",n[n.openBrace=123]="openBrace",n[n.openBracket=91]="openBracket",n[n.openParen=40]="openParen",n[n.percent=37]="percent",n[n.plus=43]="plus",n[n.question=63]="question",n[n.semicolon=59]="semicolon",n[n.singleQuote=39]="singleQuote",n[n.slash=47]="slash",n[n.tilde=126]="tilde",n[n.backspace=8]="backspace",n[n.formFeed=12]="formFeed",n[n.byteOrderMark=65279]="byteOrderMark",n[n.tab=9]="tab",n[n.verticalTab=11]="verticalTab"})(S||(S={}));function h(n,g){const w=[],E=new Object;let C;const I={value:{},offset:0,length:0,type:"object",parent:void 0};let _=!1;function A(k,L,R,M){I.value=k,I.offset=L,I.length=R,I.type=M,I.colonOffset=void 0,C=I}try{p(n,{onObjectBegin:(k,L)=>{if(g<=k)throw E;C=void 0,_=g>k,w.push("")},onObjectProperty:(k,L,R)=>{if(g<L||(A(k,L,R,"property"),w[w.length-1]=k,g<=L+R))throw E},onObjectEnd:(k,L)=>{if(g<=k)throw E;C=void 0,w.pop()},onArrayBegin:(k,L)=>{if(g<=k)throw E;C=void 0,w.push(0)},onArrayEnd:(k,L)=>{if(g<=k)throw E;C=void 0,w.pop()},onLiteralValue:(k,L,R)=>{if(g<L||(A(k,L,R,l(k)),g<=L+R))throw E},onSeparator:(k,L,R)=>{if(g<=L)throw E;if(k===":"&&C&&C.type==="property")C.colonOffset=L,_=!1,C=void 0;else if(k===","){const M=w[w.length-1];typeof M=="number"?w[w.length-1]=M+1:(_=!0,w[w.length-1]=""),C=void 0}}})}catch(k){if(k!==E)throw k}return{path:w,previousNode:C,isAtPropertyKey:_,matches:k=>{let L=0;for(let R=0;L<k.length&&R<w.length;R++)if(k[L]===w[R]||k[L]==="*")L++;else if(k[L]!=="**")return!1;return L===k.length}}}e.getLocation=h;function a(n,g=[],w=D.DEFAULT){let E=null,C=[];const I=[];function _(k){Array.isArray(C)?C.push(k):E!==null&&(C[E]=k)}return p(n,{onObjectBegin:()=>{const k={};_(k),I.push(C),C=k,E=null},onObjectProperty:k=>{E=k},onObjectEnd:()=>{C=I.pop()},onArrayBegin:()=>{const k=[];_(k),I.push(C),C=k,E=null},onArrayEnd:()=>{C=I.pop()},onLiteralValue:_,onError:(k,L,R)=>{g.push({error:k,offset:L,length:R})}},w),C[0]}e.parse=a;function r(n,g=[],w=D.DEFAULT){let E={type:"array",offset:-1,length:-1,children:[],parent:void 0};function C(k){E.type==="property"&&(E.length=k-E.offset,E=E.parent)}function I(k){return E.children.push(k),k}p(n,{onObjectBegin:k=>{E=I({type:"object",offset:k,length:-1,parent:E,children:[]})},onObjectProperty:(k,L,R)=>{E=I({type:"property",offset:L,length:-1,parent:E,children:[]}),E.children.push({type:"string",value:k,offset:L,length:R,parent:E})},onObjectEnd:(k,L)=>{E.length=k+L-E.offset,E=E.parent,C(k+L)},onArrayBegin:(k,L)=>{E=I({type:"array",offset:k,length:-1,parent:E,children:[]})},onArrayEnd:(k,L)=>{E.length=k+L-E.offset,E=E.parent,C(k+L)},onLiteralValue:(k,L,R)=>{I({type:l(k),offset:L,length:R,parent:E,value:k}),C(L+R)},onSeparator:(k,L,R)=>{E.type==="property"&&(k===":"?E.colonOffset=L:k===","&&C(L))},onError:(k,L,R)=>{g.push({error:k,offset:L,length:R})}},w);const A=E.children[0];return A&&delete A.parent,A}e.parseTree=r;function i(n,g){if(!n)return;let w=n;for(const E of g)if(typeof E=="string"){if(w.type!=="object"||!Array.isArray(w.children))return;let C=!1;for(const I of w.children)if(Array.isArray(I.children)&&I.children[0].value===E){w=I.children[1],C=!0;break}if(!C)return}else{const C=E;if(w.type!=="array"||C<0||!Array.isArray(w.children)||C>=w.children.length)return;w=w.children[C]}return w}e.findNodeAtLocation=i;function s(n){if(!n.parent||!n.parent.children)return[];const g=s(n.parent);if(n.parent.type==="property"){const w=n.parent.children[0].value;g.push(w)}else if(n.parent.type==="array"){const w=n.parent.children.indexOf(n);w!==-1&&g.push(w)}return g}e.getNodePath=s;function o(n){switch(n.type){case"array":return n.children.map(o);case"object":{const g=Object.create(null);for(const w of n.children){const E=w.children[1];E&&(g[w.children[0].value]=o(E))}return g}case"null":case"string":case"number":case"boolean":return n.value;default:return}}e.getNodeValue=o;function u(n,g,w=!1){return g>=n.offset&&g<n.offset+n.length||w&&g===n.offset+n.length}e.contains=u;function d(n,g,w=!1){if(u(n,g,w)){const E=n.children;if(Array.isArray(E))for(let C=0;C<E.length&&E[C].offset<=g;C++){const I=d(E[C],g,w);if(I)return I}return n}}e.findNodeAtOffset=d;function p(n,g,w=D.DEFAULT){const E=T(n,!1);function C(ie){return ie?()=>ie(E.getTokenOffset(),E.getTokenLength()):()=>!0}function I(ie){return ie?J=>ie(J,E.getTokenOffset(),E.getTokenLength()):()=>!0}const _=C(g.onObjectBegin),A=I(g.onObjectProperty),k=C(g.onObjectEnd),L=C(g.onArrayBegin),R=C(g.onArrayEnd),M=I(g.onLiteralValue),N=I(g.onSeparator),P=C(g.onComment),x=I(g.onError),F=w&&w.disallowComments,V=w&&w.allowTrailingComma;function W(){for(;;){const ie=E.scan();switch(E.getTokenError()){case 4:z(14);break;case 5:z(15);break;case 3:z(13);break;case 1:F||z(11);break;case 2:z(12);break;case 6:z(16);break}switch(ie){case 12:case 13:F?z(10):P();break;case 16:z(1);break;case 15:case 14:break;default:return ie}}}function z(ie,J=[],j=[]){if(x(ie),J.length+j.length>0){let ee=E.getToken();for(;ee!==17;){if(J.indexOf(ee)!==-1){W();break}else if(j.indexOf(ee)!==-1)break;ee=W()}}}function B(ie){const J=E.getTokenValue();return ie?M(J):A(J),W(),!0}function K(){switch(E.getToken()){case 11:{let ie=0;try{ie=JSON.parse(E.getTokenValue()),typeof ie!="number"&&(z(2),ie=0)}catch{z(2)}M(ie);break}case 7:M(null);break;case 8:M(!0);break;case 9:M(!1);break;default:return!1}return W(),!0}function H(){return E.getToken()!==10?(z(3,[],[2,5]),!1):(B(!1),E.getToken()===6?(N(":"),W(),$()||z(4,[],[2,5])):z(5,[],[2,5]),!0)}function U(){_(),W();let ie=!1;for(;E.getToken()!==2&&E.getToken()!==17;){if(E.getToken()===5){if(ie||z(4,[],[]),N(","),W(),E.getToken()===2&&V)break}else ie&&z(6,[],[]);H()||z(4,[],[2,5]),ie=!0}return k(),E.getToken()!==2?z(7,[2],[]):W(),!0}function G(){L(),W();let ie=!1;for(;E.getToken()!==4&&E.getToken()!==17;){if(E.getToken()===5){if(ie||z(4,[],[]),N(","),W(),E.getToken()===4&&V)break}else ie&&z(6,[],[]);$()||z(4,[],[4,5]),ie=!0}return R(),E.getToken()!==4?z(8,[4],[]):W(),!0}function $(){switch(E.getToken()){case 3:return G();case 1:return U();case 10:return B(!0);default:return K()}}return W(),E.getToken()===17?w.allowEmptyContent?!0:(z(4,[],[]),!1):$()?(E.getToken()!==17&&z(9,[],[]),!0):(z(4,[],[]),!1)}e.visit=p;function c(n,g){const w=T(n),E=[];let C,I=0,_;do switch(_=w.getPosition(),C=w.scan(),C){case 12:case 13:case 17:I!==_&&E.push(n.substring(I,_)),g!==void 0&&E.push(w.getTokenValue().replace(/[^\r\n]/g,g)),I=w.getPosition();break}while(C!==17);return E.join("")}e.stripComments=c;function l(n){switch(typeof n){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(n){if(Array.isArray(n))return"array"}else return"null";return"object"}default:return"null"}}e.getNodeType=l}),define(Q[433],Y([1,0,161]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEOL=e.getEOL=e.toFormattedString=e.format=void 0;function y(m,S,h){let a,r,i,s,o;if(S){for(s=S.offset,o=s+S.length,i=s;i>0&&!v(m,i-1);)i--;let _=o;for(;_<m.length&&!v(m,_);)_++;r=m.substring(i,_),a=T(r,h)}else r=m,a=0,i=0,s=0,o=m.length;const u=f(h,m);let d=!1,p=0,c;h.insertSpaces?c=D(" ",h.tabSize||4):c=" ";const l=(0,t.createScanner)(r,!1);let n=!1;function g(){return u+D(c,a+p)}function w(){let _=l.scan();for(d=!1;_===15||_===14;)d=d||_===14,_=l.scan();return n=_===16||l.getTokenError()!==0,_}const E=[];function C(_,A,k){!n&&A<o&&k>s&&m.substring(A,k)!==_&&E.push({offset:A,length:k-A,content:_})}let I=w();if(I!==17){const _=l.getTokenOffset()+i,A=D(c,a);C(A,i,_)}for(;I!==17;){let _=l.getTokenOffset()+l.getTokenLength()+i,A=w(),k="";for(;!d&&(A===12||A===13);){const R=l.getTokenOffset()+i;C(" ",_,R),_=l.getTokenOffset()+l.getTokenLength()+i,k=A===12?g():"",A=w()}if(A===2)I!==1&&(p--,k=g());else if(A===4)I!==3&&(p--,k=g());else{switch(I){case 3:case 1:p++,k=g();break;case 5:case 12:k=g();break;case 13:d?k=g():k=" ";break;case 6:k=" ";break;case 10:if(A===6){k="";break}case 7:case 8:case 9:case 11:case 2:case 4:A===12||A===13?k=" ":A!==5&&A!==17&&(n=!0);break;case 16:n=!0;break}d&&(A===12||A===13)&&(k=g())}const L=l.getTokenOffset()+i;C(k,_,L),I=A}return E}e.format=y;function b(m,S){const h=JSON.stringify(m,void 0,S.insertSpaces?S.tabSize||4:" ");return S.eol!==void 0?h.replace(/\r\n|\r|\n/g,S.eol):h}e.toFormattedString=b;function D(m,S){let h="";for(let a=0;a<S;a++)h+=m;return h}function T(m,S){let h=0,a=0;const r=S.tabSize||4;for(;h<m.length;){const i=m.charAt(h);if(i===" ")a++;else if(i===" ")a+=r;else break;h++}return Math.floor(a/r)}function f(m,S){for(let h=0;h<S.length;h++){const a=S.charAt(h);if(a==="\r")return h+1<S.length&&S.charAt(h+1)===` `?`\r `:"\r";if(a===` `)return` `}return m&&m.eol||` `}e.getEOL=f;function v(m,S){return`\r `.indexOf(m.charAt(S))!==-1}e.isEOL=v}),define(Q[480],Y([1,0,161,433]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyEdits=e.applyEdit=e.withFormatting=e.setProperty=e.removeProperty=void 0;function b(m,S,h){return D(m,S,void 0,h)}e.removeProperty=b;function D(m,S,h,a,r){const i=S.slice(),s=[],o=(0,t.parseTree)(m,s);let u,d;for(;i.length>0&&(d=i.pop(),u=(0,t.findNodeAtLocation)(o,i),u===void 0&&h!==void 0);)typeof d=="string"?h={[d]:h}:h=[h];if(u)if(u.type==="object"&&typeof d=="string"&&Array.isArray(u.children)){const p=(0,t.findNodeAtLocation)(u,[d]);if(p!==void 0)if(h===void 0){if(!p.parent)throw new Error("Malformed AST");const c=u.children.indexOf(p.parent);let l,n=p.parent.offset+p.parent.length;if(c>0){const g=u.children[c-1];l=g.offset+g.length}else l=u.offset+1,u.children.length>1&&(n=u.children[1].offset);return T(m,{offset:l,length:n-l,content:""},a)}else return T(m,{offset:p.offset,length:p.length,content:JSON.stringify(h)},a);else{if(h===void 0)return[];const c=`${JSON.stringify(d)}: ${JSON.stringify(h)}`,l=r?r(u.children.map(g=>g.children[0].value)):u.children.length;let n;if(l>0){const g=u.children[l-1];n={offset:g.offset+g.length,length:0,content:","+c}}else u.children.length===0?n={offset:u.offset+1,length:0,content:c}:n={offset:u.offset+1,length:0,content:c+","};return T(m,n,a)}}else if(u.type==="array"&&typeof d=="number"&&Array.isArray(u.children))if(h!==void 0){const p=`${JSON.stringify(h)}`;let c;if(u.children.length===0||d===0)c={offset:u.offset+1,length:0,content:u.children.length===0?p:p+","};else{const l=d===-1||d>u.children.length?u.children.length:d,n=u.children[l-1];c={offset:n.offset+n.length,length:0,content:","+p}}return T(m,c,a)}else{const p=d,c=u.children[p];let l;if(u.children.length===1)l={offset:u.offset+1,length:u.length-2,content:""};else if(u.children.length-1===p){const n=u.children[p-1],g=n.offset+n.length,w=u.offset+u.length;l={offset:g,length:w-2-g,content:""}}else l={offset:c.offset,length:u.children[p+1].offset-c.offset,content:""};return T(m,l,a)}else throw new Error(`Can not add ${typeof d!="number"?"index":"property"} to parent of type ${u.type}`);else{if(h===void 0)throw new Error("Can not delete in empty document");return T(m,{offset:o?o.offset:0,length:o?o.length:0,content:JSON.stringify(h)},a)}}e.setProperty=D;function T(m,S,h){let a=f(m,S),r=S.offset,i=S.offset+S.content.length;if(S.length===0||S.content.length===0){for(;r>0&&!(0,y.isEOL)(a,r-1);)r--;for(;i<a.length&&!(0,y.isEOL)(a,i);)i++}const s=(0,y.format)(a,{offset:r,length:i-r},h);for(let u=s.length-1;u>=0;u--){const d=s[u];a=f(a,d),r=Math.min(r,d.offset),i=Math.max(i,d.offset+d.length),i+=d.content.length-d.length}const o=m.length-(a.length-i)-r;return[{offset:r,length:o,content:a.substring(r,i)}]}e.withFormatting=T;function f(m,S){return m.substring(0,S.offset)+S.content+m.substring(S.offset+S.length)}e.applyEdit=f;function v(m,S){const h=S.slice(0).sort((r,i)=>{const s=r.offset-i.offset;return s===0?r.length-i.length:s});let a=m.length;for(let r=h.length-1;r>=0;r--){const i=h[r];if(i.offset+i.length<=a)m=f(m,i);else throw new Error("Overlapping edit");a=i.offset}return m}e.applyEdits=v}),define(Q[105],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyChord=e.KeyMod=e.KeyCodeUtils=e.IMMUTABLE_KEY_CODE_TO_CODE=e.IMMUTABLE_CODE_TO_KEY_CODE=e.ScanCodeUtils=e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE=e.EVENT_KEY_CODE_MAP=e.ScanCode=e.KeyCode=void 0;var t;(function(i){i[i.DependsOnKbLayout=-1]="DependsOnKbLayout",i[i.Unknown=0]="Unknown",i[i.Backspace=1]="Backspace",i[i.Tab=2]="Tab",i[i.Enter=3]="Enter",i[i.Shift=4]="Shift",i[i.Ctrl=5]="Ctrl",i[i.Alt=6]="Alt",i[i.PauseBreak=7]="PauseBreak",i[i.CapsLock=8]="CapsLock",i[i.Escape=9]="Escape",i[i.Space=10]="Space",i[i.PageUp=11]="PageUp",i[i.PageDown=12]="PageDown",i[i.End=13]="End",i[i.Home=14]="Home",i[i.LeftArrow=15]="LeftArrow",i[i.UpArrow=16]="UpArrow",i[i.RightArrow=17]="RightArrow",i[i.DownArrow=18]="DownArrow",i[i.Insert=19]="Insert",i[i.Delete=20]="Delete",i[i.Digit0=21]="Digit0",i[i.Digit1=22]="Digit1",i[i.Digit2=23]="Digit2",i[i.Digit3=24]="Digit3",i[i.Digit4=25]="Digit4",i[i.Digit5=26]="Digit5",i[i.Digit6=27]="Digit6",i[i.Digit7=28]="Digit7",i[i.Digit8=29]="Digit8",i[i.Digit9=30]="Digit9",i[i.KeyA=31]="KeyA",i[i.KeyB=32]="KeyB",i[i.KeyC=33]="KeyC",i[i.KeyD=34]="KeyD",i[i.KeyE=35]="KeyE",i[i.KeyF=36]="KeyF",i[i.KeyG=37]="KeyG",i[i.KeyH=38]="KeyH",i[i.KeyI=39]="KeyI",i[i.KeyJ=40]="KeyJ",i[i.KeyK=41]="KeyK",i[i.KeyL=42]="KeyL",i[i.KeyM=43]="KeyM",i[i.KeyN=44]="KeyN",i[i.KeyO=45]="KeyO",i[i.KeyP=46]="KeyP",i[i.KeyQ=47]="KeyQ",i[i.KeyR=48]="KeyR",i[i.KeyS=49]="KeyS",i[i.KeyT=50]="KeyT",i[i.KeyU=51]="KeyU",i[i.KeyV=52]="KeyV",i[i.KeyW=53]="KeyW",i[i.KeyX=54]="KeyX",i[i.KeyY=55]="KeyY",i[i.KeyZ=56]="KeyZ",i[i.Meta=57]="Meta",i[i.ContextMenu=58]="ContextMenu",i[i.F1=59]="F1",i[i.F2=60]="F2",i[i.F3=61]="F3",i[i.F4=62]="F4",i[i.F5=63]="F5",i[i.F6=64]="F6",i[i.F7=65]="F7",i[i.F8=66]="F8",i[i.F9=67]="F9",i[i.F10=68]="F10",i[i.F11=69]="F11",i[i.F12=70]="F12",i[i.F13=71]="F13",i[i.F14=72]="F14",i[i.F15=73]="F15",i[i.F16=74]="F16",i[i.F17=75]="F17",i[i.F18=76]="F18",i[i.F19=77]="F19",i[i.F20=78]="F20",i[i.F21=79]="F21",i[i.F22=80]="F22",i[i.F23=81]="F23",i[i.F24=82]="F24",i[i.NumLock=83]="NumLock",i[i.ScrollLock=84]="ScrollLock",i[i.Semicolon=85]="Semicolon",i[i.Equal=86]="Equal",i[i.Comma=87]="Comma",i[i.Minus=88]="Minus",i[i.Period=89]="Period",i[i.Slash=90]="Slash",i[i.Backquote=91]="Backquote",i[i.BracketLeft=92]="BracketLeft",i[i.Backslash=93]="Backslash",i[i.BracketRight=94]="BracketRight",i[i.Quote=95]="Quote",i[i.OEM_8=96]="OEM_8",i[i.IntlBackslash=97]="IntlBackslash",i[i.Numpad0=98]="Numpad0",i[i.Numpad1=99]="Numpad1",i[i.Numpad2=100]="Numpad2",i[i.Numpad3=101]="Numpad3",i[i.Numpad4=102]="Numpad4",i[i.Numpad5=103]="Numpad5",i[i.Numpad6=104]="Numpad6",i[i.Numpad7=105]="Numpad7",i[i.Numpad8=106]="Numpad8",i[i.Numpad9=107]="Numpad9",i[i.NumpadMultiply=108]="NumpadMultiply",i[i.NumpadAdd=109]="NumpadAdd",i[i.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",i[i.NumpadSubtract=111]="NumpadSubtract",i[i.NumpadDecimal=112]="NumpadDecimal",i[i.NumpadDivide=113]="NumpadDivide",i[i.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",i[i.ABNT_C1=115]="ABNT_C1",i[i.ABNT_C2=116]="ABNT_C2",i[i.AudioVolumeMute=117]="AudioVolumeMute",i[i.AudioVolumeUp=118]="AudioVolumeUp",i[i.AudioVolumeDown=119]="AudioVolumeDown",i[i.BrowserSearch=120]="BrowserSearch",i[i.BrowserHome=121]="BrowserHome",i[i.BrowserBack=122]="BrowserBack",i[i.BrowserForward=123]="BrowserForward",i[i.MediaTrackNext=124]="MediaTrackNext",i[i.MediaTrackPrevious=125]="MediaTrackPrevious",i[i.MediaStop=126]="MediaStop",i[i.MediaPlayPause=127]="MediaPlayPause",i[i.LaunchMediaPlayer=128]="LaunchMediaPlayer",i[i.LaunchMail=129]="LaunchMail",i[i.LaunchApp2=130]="LaunchApp2",i[i.Clear=131]="Clear",i[i.MAX_VALUE=132]="MAX_VALUE"})(t||(e.KeyCode=t={}));var y;(function(i){i[i.DependsOnKbLayout=-1]="DependsOnKbLayout",i[i.None=0]="None",i[i.Hyper=1]="Hyper",i[i.Super=2]="Super",i[i.Fn=3]="Fn",i[i.FnLock=4]="FnLock",i[i.Suspend=5]="Suspend",i[i.Resume=6]="Resume",i[i.Turbo=7]="Turbo",i[i.Sleep=8]="Sleep",i[i.WakeUp=9]="WakeUp",i[i.KeyA=10]="KeyA",i[i.KeyB=11]="KeyB",i[i.KeyC=12]="KeyC",i[i.KeyD=13]="KeyD",i[i.KeyE=14]="KeyE",i[i.KeyF=15]="KeyF",i[i.KeyG=16]="KeyG",i[i.KeyH=17]="KeyH",i[i.KeyI=18]="KeyI",i[i.KeyJ=19]="KeyJ",i[i.KeyK=20]="KeyK",i[i.KeyL=21]="KeyL",i[i.KeyM=22]="KeyM",i[i.KeyN=23]="KeyN",i[i.KeyO=24]="KeyO",i[i.KeyP=25]="KeyP",i[i.KeyQ=26]="KeyQ",i[i.KeyR=27]="KeyR",i[i.KeyS=28]="KeyS",i[i.KeyT=29]="KeyT",i[i.KeyU=30]="KeyU",i[i.KeyV=31]="KeyV",i[i.KeyW=32]="KeyW",i[i.KeyX=33]="KeyX",i[i.KeyY=34]="KeyY",i[i.KeyZ=35]="KeyZ",i[i.Digit1=36]="Digit1",i[i.Digit2=37]="Digit2",i[i.Digit3=38]="Digit3",i[i.Digit4=39]="Digit4",i[i.Digit5=40]="Digit5",i[i.Digit6=41]="Digit6",i[i.Digit7=42]="Digit7",i[i.Digit8=43]="Digit8",i[i.Digit9=44]="Digit9",i[i.Digit0=45]="Digit0",i[i.Enter=46]="Enter",i[i.Escape=47]="Escape",i[i.Backspace=48]="Backspace",i[i.Tab=49]="Tab",i[i.Space=50]="Space",i[i.Minus=51]="Minus",i[i.Equal=52]="Equal",i[i.BracketLeft=53]="BracketLeft",i[i.BracketRight=54]="BracketRight",i[i.Backslash=55]="Backslash",i[i.IntlHash=56]="IntlHash",i[i.Semicolon=57]="Semicolon",i[i.Quote=58]="Quote",i[i.Backquote=59]="Backquote",i[i.Comma=60]="Comma",i[i.Period=61]="Period",i[i.Slash=62]="Slash",i[i.CapsLock=63]="CapsLock",i[i.F1=64]="F1",i[i.F2=65]="F2",i[i.F3=66]="F3",i[i.F4=67]="F4",i[i.F5=68]="F5",i[i.F6=69]="F6",i[i.F7=70]="F7",i[i.F8=71]="F8",i[i.F9=72]="F9",i[i.F10=73]="F10",i[i.F11=74]="F11",i[i.F12=75]="F12",i[i.PrintScreen=76]="PrintScreen",i[i.ScrollLock=77]="ScrollLock",i[i.Pause=78]="Pause",i[i.Insert=79]="Insert",i[i.Home=80]="Home",i[i.PageUp=81]="PageUp",i[i.Delete=82]="Delete",i[i.End=83]="End",i[i.PageDown=84]="PageDown",i[i.ArrowRight=85]="ArrowRight",i[i.ArrowLeft=86]="ArrowLeft",i[i.ArrowDown=87]="ArrowDown",i[i.ArrowUp=88]="ArrowUp",i[i.NumLock=89]="NumLock",i[i.NumpadDivide=90]="NumpadDivide",i[i.NumpadMultiply=91]="NumpadMultiply",i[i.NumpadSubtract=92]="NumpadSubtract",i[i.NumpadAdd=93]="NumpadAdd",i[i.NumpadEnter=94]="NumpadEnter",i[i.Numpad1=95]="Numpad1",i[i.Numpad2=96]="Numpad2",i[i.Numpad3=97]="Numpad3",i[i.Numpad4=98]="Numpad4",i[i.Numpad5=99]="Numpad5",i[i.Numpad6=100]="Numpad6",i[i.Numpad7=101]="Numpad7",i[i.Numpad8=102]="Numpad8",i[i.Numpad9=103]="Numpad9",i[i.Numpad0=104]="Numpad0",i[i.NumpadDecimal=105]="NumpadDecimal",i[i.IntlBackslash=106]="IntlBackslash",i[i.ContextMenu=107]="ContextMenu",i[i.Power=108]="Power",i[i.NumpadEqual=109]="NumpadEqual",i[i.F13=110]="F13",i[i.F14=111]="F14",i[i.F15=112]="F15",i[i.F16=113]="F16",i[i.F17=114]="F17",i[i.F18=115]="F18",i[i.F19=116]="F19",i[i.F20=117]="F20",i[i.F21=118]="F21",i[i.F22=119]="F22",i[i.F23=120]="F23",i[i.F24=121]="F24",i[i.Open=122]="Open",i[i.Help=123]="Help",i[i.Select=124]="Select",i[i.Again=125]="Again",i[i.Undo=126]="Undo",i[i.Cut=127]="Cut",i[i.Copy=128]="Copy",i[i.Paste=129]="Paste",i[i.Find=130]="Find",i[i.AudioVolumeMute=131]="AudioVolumeMute",i[i.AudioVolumeUp=132]="AudioVolumeUp",i[i.AudioVolumeDown=133]="AudioVolumeDown",i[i.NumpadComma=134]="NumpadComma",i[i.IntlRo=135]="IntlRo",i[i.KanaMode=136]="KanaMode",i[i.IntlYen=137]="IntlYen",i[i.Convert=138]="Convert",i[i.NonConvert=139]="NonConvert",i[i.Lang1=140]="Lang1",i[i.Lang2=141]="Lang2",i[i.Lang3=142]="Lang3",i[i.Lang4=143]="Lang4",i[i.Lang5=144]="Lang5",i[i.Abort=145]="Abort",i[i.Props=146]="Props",i[i.NumpadParenLeft=147]="NumpadParenLeft",i[i.NumpadParenRight=148]="NumpadParenRight",i[i.NumpadBackspace=149]="NumpadBackspace",i[i.NumpadMemoryStore=150]="NumpadMemoryStore",i[i.NumpadMemoryRecall=151]="NumpadMemoryRecall",i[i.NumpadMemoryClear=152]="NumpadMemoryClear",i[i.NumpadMemoryAdd=153]="NumpadMemoryAdd",i[i.NumpadMemorySubtract=154]="NumpadMemorySubtract",i[i.NumpadClear=155]="NumpadClear",i[i.NumpadClearEntry=156]="NumpadClearEntry",i[i.ControlLeft=157]="ControlLeft",i[i.ShiftLeft=158]="ShiftLeft",i[i.AltLeft=159]="AltLeft",i[i.MetaLeft=160]="MetaLeft",i[i.ControlRight=161]="ControlRight",i[i.ShiftRight=162]="ShiftRight",i[i.AltRight=163]="AltRight",i[i.MetaRight=164]="MetaRight",i[i.BrightnessUp=165]="BrightnessUp",i[i.BrightnessDown=166]="BrightnessDown",i[i.MediaPlay=167]="MediaPlay",i[i.MediaRecord=168]="MediaRecord",i[i.MediaFastForward=169]="MediaFastForward",i[i.MediaRewind=170]="MediaRewind",i[i.MediaTrackNext=171]="MediaTrackNext",i[i.MediaTrackPrevious=172]="MediaTrackPrevious",i[i.MediaStop=173]="MediaStop",i[i.Eject=174]="Eject",i[i.MediaPlayPause=175]="MediaPlayPause",i[i.MediaSelect=176]="MediaSelect",i[i.LaunchMail=177]="LaunchMail",i[i.LaunchApp2=178]="LaunchApp2",i[i.LaunchApp1=179]="LaunchApp1",i[i.SelectTask=180]="SelectTask",i[i.LaunchScreenSaver=181]="LaunchScreenSaver",i[i.BrowserSearch=182]="BrowserSearch",i[i.BrowserHome=183]="BrowserHome",i[i.BrowserBack=184]="BrowserBack",i[i.BrowserForward=185]="BrowserForward",i[i.BrowserStop=186]="BrowserStop",i[i.BrowserRefresh=187]="BrowserRefresh",i[i.BrowserFavorites=188]="BrowserFavorites",i[i.ZoomToggle=189]="ZoomToggle",i[i.MailReply=190]="MailReply",i[i.MailForward=191]="MailForward",i[i.MailSend=192]="MailSend",i[i.MAX_VALUE=193]="MAX_VALUE"})(y||(e.ScanCode=y={}));class b{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(s,o){this._keyCodeToStr[s]=o,this._strToKeyCode[o.toLowerCase()]=s}keyCodeToStr(s){return this._keyCodeToStr[s]}strToKeyCode(s){return this._strToKeyCode[s.toLowerCase()]||0}}const D=new b,T=new b,f=new b;e.EVENT_KEY_CODE_MAP=new Array(230),e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE={};const v=[],m=Object.create(null),S=Object.create(null);e.ScanCodeUtils={lowerCaseToEnum:i=>S[i]||0,toEnum:i=>m[i]||0,toString:i=>v[i]||"None"},e.IMMUTABLE_CODE_TO_KEY_CODE=[],e.IMMUTABLE_KEY_CODE_TO_CODE=[];for(let i=0;i<=193;i++)e.IMMUTABLE_CODE_TO_KEY_CODE[i]=-1;for(let i=0;i<=132;i++)e.IMMUTABLE_KEY_CODE_TO_CODE[i]=-1;(function(){const i="",s=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",i,i],[1,1,"Hyper",0,i,0,i,i,i],[1,2,"Super",0,i,0,i,i,i],[1,3,"Fn",0,i,0,i,i,i],[1,4,"FnLock",0,i,0,i,i,i],[1,5,"Suspend",0,i,0,i,i,i],[1,6,"Resume",0,i,0,i,i,i],[1,7,"Turbo",0,i,0,i,i,i],[1,8,"Sleep",0,i,0,"VK_SLEEP",i,i],[1,9,"WakeUp",0,i,0,i,i,i],[0,10,"KeyA",31,"A",65,"VK_A",i,i],[0,11,"KeyB",32,"B",66,"VK_B",i,i],[0,12,"KeyC",33,"C",67,"VK_C",i,i],[0,13,"KeyD",34,"D",68,"VK_D",i,i],[0,14,"KeyE",35,"E",69,"VK_E",i,i],[0,15,"KeyF",36,"F",70,"VK_F",i,i],[0,16,"KeyG",37,"G",71,"VK_G",i,i],[0,17,"KeyH",38,"H",72,"VK_H",i,i],[0,18,"KeyI",39,"I",73,"VK_I",i,i],[0,19,"KeyJ",40,"J",74,"VK_J",i,i],[0,20,"KeyK",41,"K",75,"VK_K",i,i],[0,21,"KeyL",42,"L",76,"VK_L",i,i],[0,22,"KeyM",43,"M",77,"VK_M",i,i],[0,23,"KeyN",44,"N",78,"VK_N",i,i],[0,24,"KeyO",45,"O",79,"VK_O",i,i],[0,25,"KeyP",46,"P",80,"VK_P",i,i],[0,26,"KeyQ",47,"Q",81,"VK_Q",i,i],[0,27,"KeyR",48,"R",82,"VK_R",i,i],[0,28,"KeyS",49,"S",83,"VK_S",i,i],[0,29,"KeyT",50,"T",84,"VK_T",i,i],[0,30,"KeyU",51,"U",85,"VK_U",i,i],[0,31,"KeyV",52,"V",86,"VK_V",i,i],[0,32,"KeyW",53,"W",87,"VK_W",i,i],[0,33,"KeyX",54,"X",88,"VK_X",i,i],[0,34,"KeyY",55,"Y",89,"VK_Y",i,i],[0,35,"KeyZ",56,"Z",90,"VK_Z",i,i],[0,36,"Digit1",22,"1",49,"VK_1",i,i],[0,37,"Digit2",23,"2",50,"VK_2",i,i],[0,38,"Digit3",24,"3",51,"VK_3",i,i],[0,39,"Digit4",25,"4",52,"VK_4",i,i],[0,40,"Digit5",26,"5",53,"VK_5",i,i],[0,41,"Digit6",27,"6",54,"VK_6",i,i],[0,42,"Digit7",28,"7",55,"VK_7",i,i],[0,43,"Digit8",29,"8",56,"VK_8",i,i],[0,44,"Digit9",30,"9",57,"VK_9",i,i],[0,45,"Digit0",21,"0",48,"VK_0",i,i],[1,46,"Enter",3,"Enter",13,"VK_RETURN",i,i],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",i,i],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",i,i],[1,49,"Tab",2,"Tab",9,"VK_TAB",i,i],[1,50,"Space",10,"Space",32,"VK_SPACE",i,i],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,i,0,i,i,i],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",i,i],[1,64,"F1",59,"F1",112,"VK_F1",i,i],[1,65,"F2",60,"F2",113,"VK_F2",i,i],[1,66,"F3",61,"F3",114,"VK_F3",i,i],[1,67,"F4",62,"F4",115,"VK_F4",i,i],[1,68,"F5",63,"F5",116,"VK_F5",i,i],[1,69,"F6",64,"F6",117,"VK_F6",i,i],[1,70,"F7",65,"F7",118,"VK_F7",i,i],[1,71,"F8",66,"F8",119,"VK_F8",i,i],[1,72,"F9",67,"F9",120,"VK_F9",i,i],[1,73,"F10",68,"F10",121,"VK_F10",i,i],[1,74,"F11",69,"F11",122,"VK_F11",i,i],[1,75,"F12",70,"F12",123,"VK_F12",i,i],[1,76,"PrintScreen",0,i,0,i,i,i],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",i,i],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",i,i],[1,79,"Insert",19,"Insert",45,"VK_INSERT",i,i],[1,80,"Home",14,"Home",36,"VK_HOME",i,i],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",i,i],[1,82,"Delete",20,"Delete",46,"VK_DELETE",i,i],[1,83,"End",13,"End",35,"VK_END",i,i],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",i,i],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",i],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",i],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",i],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",i],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",i,i],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",i,i],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",i,i],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",i,i],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",i,i],[1,94,"NumpadEnter",3,i,0,i,i,i],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",i,i],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",i,i],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",i,i],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",i,i],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",i,i],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",i,i],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",i,i],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",i,i],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",i,i],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",i,i],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",i,i],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",i,i],[1,107,"ContextMenu",58,"ContextMenu",93,i,i,i],[1,108,"Power",0,i,0,i,i,i],[1,109,"NumpadEqual",0,i,0,i,i,i],[1,110,"F13",71,"F13",124,"VK_F13",i,i],[1,111,"F14",72,"F14",125,"VK_F14",i,i],[1,112,"F15",73,"F15",126,"VK_F15",i,i],[1,113,"F16",74,"F16",127,"VK_F16",i,i],[1,114,"F17",75,"F17",128,"VK_F17",i,i],[1,115,"F18",76,"F18",129,"VK_F18",i,i],[1,116,"F19",77,"F19",130,"VK_F19",i,i],[1,117,"F20",78,"F20",131,"VK_F20",i,i],[1,118,"F21",79,"F21",132,"VK_F21",i,i],[1,119,"F22",80,"F22",133,"VK_F22",i,i],[1,120,"F23",81,"F23",134,"VK_F23",i,i],[1,121,"F24",82,"F24",135,"VK_F24",i,i],[1,122,"Open",0,i,0,i,i,i],[1,123,"Help",0,i,0,i,i,i],[1,124,"Select",0,i,0,i,i,i],[1,125,"Again",0,i,0,i,i,i],[1,126,"Undo",0,i,0,i,i,i],[1,127,"Cut",0,i,0,i,i,i],[1,128,"Copy",0,i,0,i,i,i],[1,129,"Paste",0,i,0,i,i,i],[1,130,"Find",0,i,0,i,i,i],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",i,i],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",i,i],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",i,i],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",i,i],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",i,i],[1,136,"KanaMode",0,i,0,i,i,i],[0,137,"IntlYen",0,i,0,i,i,i],[1,138,"Convert",0,i,0,i,i,i],[1,139,"NonConvert",0,i,0,i,i,i],[1,140,"Lang1",0,i,0,i,i,i],[1,141,"Lang2",0,i,0,i,i,i],[1,142,"Lang3",0,i,0,i,i,i],[1,143,"Lang4",0,i,0,i,i,i],[1,144,"Lang5",0,i,0,i,i,i],[1,145,"Abort",0,i,0,i,i,i],[1,146,"Props",0,i,0,i,i,i],[1,147,"NumpadParenLeft",0,i,0,i,i,i],[1,148,"NumpadParenRight",0,i,0,i,i,i],[1,149,"NumpadBackspace",0,i,0,i,i,i],[1,150,"NumpadMemoryStore",0,i,0,i,i,i],[1,151,"NumpadMemoryRecall",0,i,0,i,i,i],[1,152,"NumpadMemoryClear",0,i,0,i,i,i],[1,153,"NumpadMemoryAdd",0,i,0,i,i,i],[1,154,"NumpadMemorySubtract",0,i,0,i,i,i],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",i,i],[1,156,"NumpadClearEntry",0,i,0,i,i,i],[1,0,i,5,"Ctrl",17,"VK_CONTROL",i,i],[1,0,i,4,"Shift",16,"VK_SHIFT",i,i],[1,0,i,6,"Alt",18,"VK_MENU",i,i],[1,0,i,57,"Meta",91,"VK_COMMAND",i,i],[1,157,"ControlLeft",5,i,0,"VK_LCONTROL",i,i],[1,158,"ShiftLeft",4,i,0,"VK_LSHIFT",i,i],[1,159,"AltLeft",6,i,0,"VK_LMENU",i,i],[1,160,"MetaLeft",57,i,0,"VK_LWIN",i,i],[1,161,"ControlRight",5,i,0,"VK_RCONTROL",i,i],[1,162,"ShiftRight",4,i,0,"VK_RSHIFT",i,i],[1,163,"AltRight",6,i,0,"VK_RMENU",i,i],[1,164,"MetaRight",57,i,0,"VK_RWIN",i,i],[1,165,"BrightnessUp",0,i,0,i,i,i],[1,166,"BrightnessDown",0,i,0,i,i,i],[1,167,"MediaPlay",0,i,0,i,i,i],[1,168,"MediaRecord",0,i,0,i,i,i],[1,169,"MediaFastForward",0,i,0,i,i,i],[1,170,"MediaRewind",0,i,0,i,i,i],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",i,i],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",i,i],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",i,i],[1,174,"Eject",0,i,0,i,i,i],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",i,i],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",i,i],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",i,i],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",i,i],[1,179,"LaunchApp1",0,i,0,"VK_MEDIA_LAUNCH_APP1",i,i],[1,180,"SelectTask",0,i,0,i,i,i],[1,181,"LaunchScreenSaver",0,i,0,i,i,i],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",i,i],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",i,i],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",i,i],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",i,i],[1,186,"BrowserStop",0,i,0,"VK_BROWSER_STOP",i,i],[1,187,"BrowserRefresh",0,i,0,"VK_BROWSER_REFRESH",i,i],[1,188,"BrowserFavorites",0,i,0,"VK_BROWSER_FAVORITES",i,i],[1,189,"ZoomToggle",0,i,0,i,i,i],[1,190,"MailReply",0,i,0,i,i,i],[1,191,"MailForward",0,i,0,i,i,i],[1,192,"MailSend",0,i,0,i,i,i],[1,0,i,114,"KeyInComposition",229,i,i,i],[1,0,i,116,"ABNT_C2",194,"VK_ABNT_C2",i,i],[1,0,i,96,"OEM_8",223,"VK_OEM_8",i,i],[1,0,i,0,i,0,"VK_KANA",i,i],[1,0,i,0,i,0,"VK_HANGUL",i,i],[1,0,i,0,i,0,"VK_JUNJA",i,i],[1,0,i,0,i,0,"VK_FINAL",i,i],[1,0,i,0,i,0,"VK_HANJA",i,i],[1,0,i,0,i,0,"VK_KANJI",i,i],[1,0,i,0,i,0,"VK_CONVERT",i,i],[1,0,i,0,i,0,"VK_NONCONVERT",i,i],[1,0,i,0,i,0,"VK_ACCEPT",i,i],[1,0,i,0,i,0,"VK_MODECHANGE",i,i],[1,0,i,0,i,0,"VK_SELECT",i,i],[1,0,i,0,i,0,"VK_PRINT",i,i],[1,0,i,0,i,0,"VK_EXECUTE",i,i],[1,0,i,0,i,0,"VK_SNAPSHOT",i,i],[1,0,i,0,i,0,"VK_HELP",i,i],[1,0,i,0,i,0,"VK_APPS",i,i],[1,0,i,0,i,0,"VK_PROCESSKEY",i,i],[1,0,i,0,i,0,"VK_PACKET",i,i],[1,0,i,0,i,0,"VK_DBE_SBCSCHAR",i,i],[1,0,i,0,i,0,"VK_DBE_DBCSCHAR",i,i],[1,0,i,0,i,0,"VK_ATTN",i,i],[1,0,i,0,i,0,"VK_CRSEL",i,i],[1,0,i,0,i,0,"VK_EXSEL",i,i],[1,0,i,0,i,0,"VK_EREOF",i,i],[1,0,i,0,i,0,"VK_PLAY",i,i],[1,0,i,0,i,0,"VK_ZOOM",i,i],[1,0,i,0,i,0,"VK_NONAME",i,i],[1,0,i,0,i,0,"VK_PA1",i,i],[1,0,i,0,i,0,"VK_OEM_CLEAR",i,i]],o=[],u=[];for(const d of s){const[p,c,l,n,g,w,E,C,I]=d;if(u[c]||(u[c]=!0,v[c]=l,m[l]=c,S[l.toLowerCase()]=c,p&&(e.IMMUTABLE_CODE_TO_KEY_CODE[c]=n,n!==0&&n!==3&&n!==5&&n!==4&&n!==6&&n!==57&&(e.IMMUTABLE_KEY_CODE_TO_CODE[n]=c))),!o[n]){if(o[n]=!0,!g)throw new Error(`String representation missing for key code ${n} around scan code ${l}`);D.define(n,g),T.define(n,C||g),f.define(n,I||C||g)}w&&(e.EVENT_KEY_CODE_MAP[w]=n),E&&(e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[E]=n)}e.IMMUTABLE_KEY_CODE_TO_CODE[3]=46})();var h;(function(i){function s(l){return D.keyCodeToStr(l)}i.toString=s;function o(l){return D.strToKeyCode(l)}i.fromString=o;function u(l){return T.keyCodeToStr(l)}i.toUserSettingsUS=u;function d(l){return f.keyCodeToStr(l)}i.toUserSettingsGeneral=d;function p(l){return T.strToKeyCode(l)||f.strToKeyCode(l)}i.fromUserSettings=p;function c(l){if(l>=98&&l<=113)return null;switch(l){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return D.keyCodeToStr(l)}i.toElectronAccelerator=c})(h||(e.KeyCodeUtils=h={}));var a;(function(i){i[i.CtrlCmd=2048]="CtrlCmd",i[i.Shift=1024]="Shift",i[i.Alt=512]="Alt",i[i.WinCtrl=256]="WinCtrl"})(a||(e.KeyMod=a={}));function r(i,s){const o=(s&65535)<<16>>>0;return(i|o)>>>0}e.KeyChord=r}),define(Q[321],Y([1,0,15]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedKeybinding=e.ResolvedChord=e.Keybinding=e.ScanCodeChord=e.KeyCodeChord=e.createSimpleKeybinding=e.decodeKeybinding=void 0;var y;(function(h){h[h.CtrlCmd=2048]="CtrlCmd",h[h.Shift=1024]="Shift",h[h.Alt=512]="Alt",h[h.WinCtrl=256]="WinCtrl",h[h.KeyCode=255]="KeyCode"})(y||(y={}));function b(h,a){if(typeof h=="number"){if(h===0)return null;const r=(h&65535)>>>0,i=(h&4294901760)>>>16;return i!==0?new v([D(r,a),D(i,a)]):new v([D(r,a)])}else{const r=[];for(let i=0;i<h.length;i++)r.push(D(h[i],a));return new v(r)}}e.decodeKeybinding=b;function D(h,a){const r=!!(h&2048),i=!!(h&256),s=a===2?i:r,o=!!(h&1024),u=!!(h&512),d=a===2?r:i,p=h&255;return new T(s,o,u,d,p)}e.createSimpleKeybinding=D;class T{constructor(a,r,i,s,o){this.ctrlKey=a,this.shiftKey=r,this.altKey=i,this.metaKey=s,this.keyCode=o}equals(a){return a instanceof T&&this.ctrlKey===a.ctrlKey&&this.shiftKey===a.shiftKey&&this.altKey===a.altKey&&this.metaKey===a.metaKey&&this.keyCode===a.keyCode}getHashCode(){const a=this.ctrlKey?"1":"0",r=this.shiftKey?"1":"0",i=this.altKey?"1":"0",s=this.metaKey?"1":"0";return`K${a}${r}${i}${s}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new v([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}e.KeyCodeChord=T;class f{constructor(a,r,i,s,o){this.ctrlKey=a,this.shiftKey=r,this.altKey=i,this.metaKey=s,this.scanCode=o}equals(a){return a instanceof f&&this.ctrlKey===a.ctrlKey&&this.shiftKey===a.shiftKey&&this.altKey===a.altKey&&this.metaKey===a.metaKey&&this.scanCode===a.scanCode}getHashCode(){const a=this.ctrlKey?"1":"0",r=this.shiftKey?"1":"0",i=this.altKey?"1":"0",s=this.metaKey?"1":"0";return`S${a}${r}${i}${s}${this.scanCode}`}isDuplicateModifierCase(){return this.ctrlKey&&(this.scanCode===157||this.scanCode===161)||this.shiftKey&&(this.scanCode===158||this.scanCode===162)||this.altKey&&(this.scanCode===159||this.scanCode===163)||this.metaKey&&(this.scanCode===160||this.scanCode===164)}}e.ScanCodeChord=f;class v{constructor(a){if(a.length===0)throw(0,t.illegalArgument)("chords");this.chords=a}getHashCode(){let a="";for(let r=0,i=this.chords.length;r<i;r++)r!==0&&(a+=";"),a+=this.chords[r].getHashCode();return a}equals(a){if(a===null||this.chords.length!==a.chords.length)return!1;for(let r=0;r<this.chords.length;r++)if(!this.chords[r].equals(a.chords[r]))return!1;return!0}}e.Keybinding=v;class m{constructor(a,r,i,s,o,u){this.ctrlKey=a,this.shiftKey=r,this.altKey=i,this.metaKey=s,this.keyLabel=o,this.keyAriaLabel=u}}e.ResolvedChord=m;class S{}e.ResolvedKeybinding=S}),define(Q[782],Y([1,0,105,321]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingParser=void 0;class b{static _readModifiers(T){T=T.toLowerCase().trim();let f=!1,v=!1,m=!1,S=!1,h;do h=!1,/^ctrl(\+|\-)/.test(T)&&(f=!0,T=T.substr(5),h=!0),/^shift(\+|\-)/.test(T)&&(v=!0,T=T.substr(6),h=!0),/^alt(\+|\-)/.test(T)&&(m=!0,T=T.substr(4),h=!0),/^meta(\+|\-)/.test(T)&&(S=!0,T=T.substr(5),h=!0),/^win(\+|\-)/.test(T)&&(S=!0,T=T.substr(4),h=!0),/^cmd(\+|\-)/.test(T)&&(S=!0,T=T.substr(4),h=!0);while(h);let a;const r=T.indexOf(" ");return r>0?(a=T.substring(0,r),T=T.substring(r)):(a=T,T=""),{remains:T,ctrl:f,shift:v,alt:m,meta:S,key:a}}static parseChord(T){const f=this._readModifiers(T),v=f.key.match(/^\[([^\]]+)\]$/);if(v){const S=v[1],h=t.ScanCodeUtils.lowerCaseToEnum(S);return[new y.ScanCodeChord(f.ctrl,f.shift,f.alt,f.meta,h),f.remains]}const m=t.KeyCodeUtils.fromUserSettings(f.key);return[new y.KeyCodeChord(f.ctrl,f.shift,f.alt,f.meta,m),f.remains]}static parseKeybinding(T){if(!T)return null;const f=[];let v;for(;T.length>0;)[v,T]=this.parseChord(T),f.push(v);return f.length>0?new y.Keybinding(f):null}}e.KeybindingParser=b}),define(Q[203],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class t{constructor(b){this.executor=b,this._didRun=!1}get hasValue(){return this._didRun}get value(){if(!this._didRun)try{this._value=this.executor()}catch(b){this._error=b}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}e.Lazy=t}),define(Q[4],Y([1,0,202,83]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisposableMap=e.disposeOnReturn=e.ImmortalReference=e.AsyncReferenceCollection=e.ReferenceCollection=e.SafeDisposable=e.RefCountedDisposable=e.MutableDisposable=e.Disposable=e.DisposableStore=e.toDisposable=e.combinedDisposable=e.disposeIfDisposable=e.dispose=e.isDisposable=e.markAsSingleton=e.setDisposableTracker=void 0;const b=!1;let D=null;function T(I){D=I}if(e.setDisposableTracker=T,b){const I="__is_disposable_tracked__";T(new class{trackDisposable(_){const A=new Error("Potentially leaked disposable").stack;setTimeout(()=>{_[I]||console.log(A)},3e3)}setParent(_,A){if(_&&_!==d.None)try{_[I]=!0}catch{}}markAsDisposed(_){if(_&&_!==d.None)try{_[I]=!0}catch{}}markAsSingleton(_){}})}function f(I){return D?.trackDisposable(I),I}function v(I){D?.markAsDisposed(I)}function m(I,_){D?.setParent(I,_)}function S(I,_){if(D)for(const A of I)D.setParent(A,_)}function h(I){return D?.markAsSingleton(I),I}e.markAsSingleton=h;function a(I){return typeof I.dispose=="function"&&I.dispose.length===0}e.isDisposable=a;function r(I){if(y.Iterable.is(I)){const _=[];for(const A of I)if(A)try{A.dispose()}catch(k){_.push(k)}if(_.length===1)throw _[0];if(_.length>1)throw new AggregateError(_,"Encountered errors while disposing of store");return Array.isArray(I)?[]:I}else if(I)return I.dispose(),I}e.dispose=r;function i(I){for(const _ of I)a(_)&&_.dispose();return[]}e.disposeIfDisposable=i;function s(...I){const _=o(()=>r(I));return S(I,_),_}e.combinedDisposable=s;function o(I){const _=f({dispose:(0,t.once)(()=>{v(_),I()})});return _}e.toDisposable=o;class u{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,f(this)}dispose(){this._isDisposed||(v(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{r(this._toDispose)}finally{this._toDispose.clear()}}add(_){if(!_)return _;if(_===this)throw new Error("Cannot register a disposable on itself!");return m(_,this),this._isDisposed?u.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.DisposableStore=u;class d{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new u,f(this),m(this._store,this)}dispose(){v(this),this._store.dispose()}_register(_){if(_===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(_)}}e.Disposable=d;class p{constructor(){this._isDisposed=!1,f(this)}get value(){return this._isDisposed?void 0:this._value}set value(_){this._isDisposed||_===this._value||(this._value?.dispose(),_&&m(_,this),this._value=_)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,v(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){const _=this._value;return this._value=void 0,_&&m(_,null),_}}e.MutableDisposable=p;class c{constructor(_){this._disposable=_,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}e.RefCountedDisposable=c;class l{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1,f(this)}set(_){let A=_;return this.unset=()=>A=void 0,this.isset=()=>A!==void 0,this.dispose=()=>{A&&(A(),A=void 0,v(this))},this}}e.SafeDisposable=l;class n{constructor(){this.references=new Map}acquire(_,...A){let k=this.references.get(_);k||(k={counter:0,object:this.createReferencedObject(_,...A)},this.references.set(_,k));const{object:L}=k,R=(0,t.once)(()=>{--k.counter===0&&(this.destroyReferencedObject(_,k.object),this.references.delete(_))});return k.counter++,{object:L,dispose:R}}}e.ReferenceCollection=n;class g{constructor(_){this.referenceCollection=_}async acquire(_,...A){const k=this.referenceCollection.acquire(_,...A);try{return{object:await k.object,dispose:()=>k.dispose()}}catch(L){throw k.dispose(),L}}}e.AsyncReferenceCollection=g;class w{constructor(_){this.object=_}dispose(){}}e.ImmortalReference=w;function E(I){const _=new u;try{I(_)}finally{_.dispose()}}e.disposeOnReturn=E;class C{constructor(){this._store=new Map,this._isDisposed=!1,f(this)}dispose(){v(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{r(this._store.values())}finally{this._store.clear()}}has(_){return this._store.has(_)}get(_){return this._store.get(_)}set(_,A,k=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),k||this._store.get(_)?.dispose(),this._store.set(_,A)}deleteAndDispose(_){this._store.get(_)?.dispose(),this._store.delete(_)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}e.DisposableMap=C}),define(Q[136],Y([1,0,4]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AngularDisposable=e.subscriptionToDisposable=void 0;function y(D){return{dispose:()=>{D.unsubscribe()}}}e.subscriptionToDisposable=y;class b extends t.Disposable{constructor(){super(...arguments),this.isDisposed=!1}ngOnDestroy(){this.dispose(),this.isDisposed=!0}}e.AngularDisposable=b}),define(Q[185],Y([1,0,40,136]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabComponent=e.TabChild=void 0;class b extends y.AngularDisposable{}e.TabChild=b;let D=class{set child(f){this._child=f,this.selected&&this._child&&this._child.layout()}constructor(f){this._cd=f,this._selected=!1,this.type="tab",this.loading=!1,this.visibilityType="if",this.rendered=!1,this.destroyed=!1}set selected(f){this.destroyed||(this._selected=f,this.selected&&(this.rendered=!0),this._cd.detectChanges(),this.selected&&this._child&&this._child.layout())}get selected(){return this._selected}ngOnDestroy(){this.destroyed=!0,this.actions&&this.actions.length>0&&this.actions.forEach(f=>f.dispose())}shouldBeIfed(){return this.selected?!0:!!(this.visibilityType==="visibility"&&this.rendered)}shouldBeHidden(){return this.visibilityType==="visibility"&&!this.selected}layout(){this._child&&this._child.layout()}};e.TabComponent=D,fe([(0,t.ContentChild)(t.TemplateRef)],D.prototype,"templateRef",void 0),fe([(0,t.Input)()],D.prototype,"title",void 0),fe([(0,t.Input)()],D.prototype,"canClose",void 0),fe([(0,t.Input)()],D.prototype,"actions",void 0),fe([(0,t.Input)()],D.prototype,"iconClass",void 0),fe([(0,t.Input)()],D.prototype,"identifier",void 0),fe([(0,t.Input)()],D.prototype,"type",void 0),fe([(0,t.Input)()],D.prototype,"loading",void 0),fe([(0,t.Input)()],D.prototype,"visibilityType",void 0),fe([(0,t.ContentChild)(b)],D.prototype,"child",null),e.TabComponent=D=fe([(0,t.Component)({selector:"tab",template:` <div role="tabpanel" [attr.aria-labelledby]="identifier" class="visibility" [class.hidden]="shouldBeHidden()" *ngIf="shouldBeIfed()" class="fullsize"> <ng-container *ngTemplateOutlet="templateRef"></ng-container> </div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef)))],D)}),define(Q[1526],Y([1,0,4]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Separator=void 0;class y extends t.Disposable{constructor(D){super(),this.element=document.createElement("hr"),D.append(this.element)}}e.Separator=y}),define(Q[554],Y([1,0,40,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DashboardWidget=e.WIDGET_CONFIG=void 0,e.WIDGET_CONFIG=new t.InjectionToken("widget_config");class b extends y.Disposable{constructor(T){super(),this._changeRef=T,this._inited=!1}get actions(){return[]}ngOnDestroy(){this.dispose()}setLoadingStatus(T){this._loading=T,this._inited&&this._changeRef.detectChanges()}}e.DashboardWidget=b}),define(Q[434],Y([1,0,185]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DashboardTab=void 0;class y extends t.TabChild{enableEdit(){}constructor(){super()}}e.DashboardTab=y}),define(Q[783],Y([1,0,4]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionPlanWidgetBase=void 0;class y extends t.Disposable{constructor(D,T){super(),this.container=D,this.identifier=T,this.container=D,this.identifier=T}}e.ExecutionPlanWidgetBase=y}),define(Q[435],Y([1,0,1527,136]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellView=e.findRangeSpecificClass=e.findHighlightClass=void 0,e.findHighlightClass="rangeHighlight",e.findRangeSpecificClass="rangeSpecificHighlight";class b extends y.AngularDisposable{constructor(){super(),this.isFindActive=!1,this.isCellOutput=!1}getEditor(){}deltaDecorations(T,f){T&&(this.isFindActive=!0,Array.isArray(T)?this.highlightAllMatches():(this.highlightRange=T,this.addDecoration(T))),f&&(Array.isArray(f)?(this.removeDecoration(),this.isFindActive=!1):(this.highlightRange=f===this.highlightRange?void 0:this.highlightRange,this.removeDecoration(f)))}addDecoration(T){if(T=T??this.highlightRange,this.output&&this.output.nativeElement&&(this.highlightAllMatches(),T)){let f=this.getHtmlElements();if(f?.length>=T.startLineNumber){let v=f[T.startLineNumber-1],m=T.cell.active;new t(v).markRanges([{start:T.startColumn-1,length:T.endColumn-T.startColumn}],{className:e.findRangeSpecificClass,each:function(h,a){m&&h.scrollIntoView({block:"center"})}})}}}highlightAllMatches(){if(this.output&&this.output.nativeElement){let T=new t(this.output.nativeElement),f=this.notebookService.findNotebookEditor(this._model.notebookUri);if(f){let v=f.notebookParams.input.notebookFindModel;if(v?.findMatches?.length>0){let m=v.findExpression;T.mark(m,{className:e.findHighlightClass})}}}}removeDecoration(T){if(this.output&&this.output.nativeElement)if(T){let v=this.getHtmlElements()[T.startLineNumber-1];new t(v).unmark({acrossElements:!0,className:e.findRangeSpecificClass})}else{let f=new t(this.output.nativeElement);f.unmark({acrossElements:!0,className:e.findHighlightClass}),f.unmark({acrossElements:!0,className:e.findRangeSpecificClass}),this.highlightRange=void 0}}getHtmlElements(){let T=this.output?.nativeElement,f=[];if(T)for(let v of T.children)if(v.nodeName.toLowerCase()==="table"){if(v.children.length>0&&(f.push(v.children[0]),v.children.length>1))for(let m of v.children[1].children)f.push(m)}else v.children.length>1?f=f.concat(this.getChildren(v)):f.push(v);return f}getChildren(T){let f=[];if(T.children.length>1&&T.nodeName.toLowerCase()!=="li"&&T.nodeName.toLowerCase()!=="p")for(let v of T.children)f=f.concat(this.getChildren(v));else return[T];return f}}e.CellView=b}),define(Q[204],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class t{static{this.Undefined=new t(void 0)}constructor(D){this.element=D,this.next=t.Undefined,this.prev=t.Undefined}}class y{constructor(){this._first=t.Undefined,this._last=t.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===t.Undefined}clear(){let D=this._first;for(;D!==t.Undefined;){const T=D.next;D.prev=t.Undefined,D.next=t.Undefined,D=T}this._first=t.Undefined,this._last=t.Undefined,this._size=0}unshift(D){return this._insert(D,!1)}push(D){return this._insert(D,!0)}_insert(D,T){const f=new t(D);if(this._first===t.Undefined)this._first=f,this._last=f;else if(T){const m=this._last;this._last=f,f.prev=m,m.next=f}else{const m=this._first;this._first=f,f.next=m,m.prev=f}this._size+=1;let v=!1;return()=>{v||(v=!0,this._remove(f))}}shift(){if(this._first!==t.Undefined){const D=this._first.element;return this._remove(this._first),D}}pop(){if(this._last!==t.Undefined){const D=this._last.element;return this._remove(this._last),D}}_remove(D){if(D.prev!==t.Undefined&&D.next!==t.Undefined){const T=D.prev;T.next=D.next,D.next.prev=T}else D.prev===t.Undefined&&D.next===t.Undefined?(this._first=t.Undefined,this._last=t.Undefined):D.next===t.Undefined?(this._last=this._last.prev,this._last.next=t.Undefined):D.prev===t.Undefined&&(this._first=this._first.next,this._first.prev=t.Undefined);this._size-=1}*[Symbol.iterator](){let D=this._first;for(;D!==t.Undefined;)yield D.element,D=D.next}}e.LinkedList=y}),define(Q[436],Y([1,0,102]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseLinkedText=e.LinkedText=void 0;class y{constructor(f){this.nodes=f}toString(){return this.nodes.map(f=>typeof f=="string"?f:f.label).join("")}}e.LinkedText=y,fe([t.memoize],y.prototype,"toString",null);const b=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function D(T){const f=[];let v=0,m;for(;m=b.exec(T);){m.index-v>0&&f.push(T.substring(v,m.index));const[,S,h,,a]=m;a?f.push({label:S,href:h,title:a}):f.push({label:S,href:h}),v=m.index+m[0].length}return v<T.length&&f.push(T.substring(v)),new y(f)}e.parseLinkedText=D}),define(Q[69],Y([1,0]),function(q,e){"use strict";var t,y,b;Object.defineProperty(e,"__esModule",{value:!0}),e.CounterSet=e.LRUCache=e.LinkedMap=e.Touch=e.ResourceSet=e.ResourceMap=e.setToString=e.mapToString=e.getOrSet=void 0;function D(s,o,u){let d=s.get(o);return d===void 0&&(d=u,s.set(o,d)),d}e.getOrSet=D;function T(s){const o=[];return s.forEach((u,d)=>{o.push(`${d} => ${u}`)}),`Map(${s.size}) {${o.join(", ")}}`}e.mapToString=T;function f(s){const o=[];return s.forEach(u=>{o.push(u)}),`Set(${s.size}) {${o.join(", ")}}`}e.setToString=f;class v{constructor(o,u){this.uri=o,this.value=u}}class m{static{this.defaultToKey=o=>o.toString()}constructor(o,u){this[t]="ResourceMap",o instanceof m?(this.map=new Map(o.map),this.toKey=u??m.defaultToKey):(this.map=new Map,this.toKey=o??m.defaultToKey)}set(o,u){return this.map.set(this.toKey(o),new v(o,u)),this}get(o){return this.map.get(this.toKey(o))?.value}has(o){return this.map.has(this.toKey(o))}get size(){return this.map.size}clear(){this.map.clear()}delete(o){return this.map.delete(this.toKey(o))}forEach(o,u){typeof u<"u"&&(o=o.bind(u));for(const[d,p]of this.map)o(p.value,p.uri,this)}*values(){for(const o of this.map.values())yield o.value}*keys(){for(const o of this.map.values())yield o.uri}*entries(){for(const o of this.map.values())yield[o.uri,o.value]}*[(t=Symbol.toStringTag,Symbol.iterator)](){for(const[,o]of this.map)yield[o.uri,o.value]}}e.ResourceMap=m;class S{constructor(o,u){this[y]="ResourceSet",!o||typeof o=="function"?this._map=new m(o):(this._map=new m(u),o.forEach(this.add,this))}get size(){return this._map.size}add(o){return this._map.set(o,o),this}clear(){this._map.clear()}delete(o){return this._map.delete(o)}forEach(o,u){this._map.forEach((d,p)=>o.call(u,p,p,this))}has(o){return this._map.has(o)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(y=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}}e.ResourceSet=S;var h;(function(s){s[s.None=0]="None",s[s.AsOld=1]="AsOld",s[s.AsNew=2]="AsNew"})(h||(e.Touch=h={}));class a{constructor(){this[b]="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(){return this._head?.value}get last(){return this._tail?.value}has(o){return this._map.has(o)}get(o,u=0){const d=this._map.get(o);if(d)return u!==0&&this.touch(d,u),d.value}set(o,u,d=0){let p=this._map.get(o);if(p)p.value=u,d!==0&&this.touch(p,d);else{switch(p={key:o,value:u,next:void 0,previous:void 0},d){case 0:this.addItemLast(p);break;case 1:this.addItemFirst(p);break;case 2:this.addItemLast(p);break;default:this.addItemLast(p);break}this._map.set(o,p),this._size++}return this}delete(o){return!!this.remove(o)}remove(o){const u=this._map.get(o);if(u)return this._map.delete(o),this.removeItem(u),this._size--,u.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const o=this._head;return this._map.delete(o.key),this.removeItem(o),this._size--,o.value}forEach(o,u){const d=this._state;let p=this._head;for(;p;){if(u?o.bind(u)(p.value,p.key,this):o(p.value,p.key,this),this._state!==d)throw new Error("LinkedMap got modified during iteration.");p=p.next}}keys(){const o=this,u=this._state;let d=this._head;const p={[Symbol.iterator](){return p},next(){if(o._state!==u)throw new Error("LinkedMap got modified during iteration.");if(d){const c={value:d.key,done:!1};return d=d.next,c}else return{value:void 0,done:!0}}};return p}values(){const o=this,u=this._state;let d=this._head;const p={[Symbol.iterator](){return p},next(){if(o._state!==u)throw new Error("LinkedMap got modified during iteration.");if(d){const c={value:d.value,done:!1};return d=d.next,c}else return{value:void 0,done:!0}}};return p}entries(){const o=this,u=this._state;let d=this._head;const p={[Symbol.iterator](){return p},next(){if(o._state!==u)throw new Error("LinkedMap got modified during iteration.");if(d){const c={value:[d.key,d.value],done:!1};return d=d.next,c}else return{value:void 0,done:!0}}};return p}[(b=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(o){if(o>=this.size)return;if(o===0){this.clear();return}let u=this._head,d=this.size;for(;u&&d>o;)this._map.delete(u.key),u=u.next,d--;this._head=u,this._size=d,u&&(u.previous=void 0),this._state++}addItemFirst(o){if(!this._head&&!this._tail)this._tail=o;else if(this._head)o.next=this._head,this._head.previous=o;else throw new Error("Invalid list");this._head=o,this._state++}addItemLast(o){if(!this._head&&!this._tail)this._head=o;else if(this._tail)o.previous=this._tail,this._tail.next=o;else throw new Error("Invalid list");this._tail=o,this._state++}removeItem(o){if(o===this._head&&o===this._tail)this._head=void 0,this._tail=void 0;else if(o===this._head){if(!o.next)throw new Error("Invalid list");o.next.previous=void 0,this._head=o.next}else if(o===this._tail){if(!o.previous)throw new Error("Invalid list");o.previous.next=void 0,this._tail=o.previous}else{const u=o.next,d=o.previous;if(!u||!d)throw new Error("Invalid list");u.previous=d,d.next=u}o.next=void 0,o.previous=void 0,this._state++}touch(o,u){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(u!==1&&u!==2)){if(u===1){if(o===this._head)return;const d=o.next,p=o.previous;o===this._tail?(p.next=void 0,this._tail=p):(d.previous=p,p.next=d),o.previous=void 0,o.next=this._head,this._head.previous=o,this._head=o,this._state++}else if(u===2){if(o===this._tail)return;const d=o.next,p=o.previous;o===this._head?(d.previous=void 0,this._head=d):(d.previous=p,p.next=d),o.next=void 0,o.previous=this._tail,this._tail.next=o,this._tail=o,this._state++}}}toJSON(){const o=[];return this.forEach((u,d)=>{o.push([d,u])}),o}fromJSON(o){this.clear();for(const[u,d]of o)this.set(u,d)}}e.LinkedMap=a;class r extends a{constructor(o,u=1){super(),this._limit=o,this._ratio=Math.min(Math.max(0,u),1)}get limit(){return this._limit}set limit(o){this._limit=o,this.checkTrim()}get ratio(){return this._ratio}set ratio(o){this._ratio=Math.min(Math.max(0,o),1),this.checkTrim()}get(o,u=2){return super.get(o,u)}peek(o){return super.get(o,0)}set(o,u){return super.set(o,u,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=r;class i{constructor(){this.map=new Map}add(o){return this.map.set(o,(this.map.get(o)||0)+1),this}delete(o){let u=this.map.get(o)||0;return u===0?!1:(u--,u===0?this.map.delete(o):this.map.set(o,u),!0)}has(o){return this.map.has(o)}}e.CounterSet=i}),function(q,e){typeof define=="function"&&define.amd?define(Q[340],Y([0]),e):typeof exports=="object"&&typeof module<"u"?e(exports):(q=typeof globalThis<"u"?globalThis:q||self,e(q.marked={}))}(this,function(q){"use strict";function e(re,oe){for(var le=0;le<oe.length;le++){var ne=oe[le];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(re,ne.key,ne)}}function t(re,oe,le){return oe&&e(re.prototype,oe),le&&e(re,le),Object.defineProperty(re,"prototype",{writable:!1}),re}function y(re,oe){if(re){if(typeof re=="string")return b(re,oe);var le=Object.prototype.toString.call(re).slice(8,-1);if(le==="Object"&&re.constructor&&(le=re.constructor.name),le==="Map"||le==="Set")return Array.from(re);if(le==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(le))return b(re,oe)}}function b(re,oe){(oe==null||oe>re.length)&&(oe=re.length);for(var le=0,ne=new Array(oe);le<oe;le++)ne[le]=re[le];return ne}function D(re,oe){var le=typeof Symbol<"u"&&re[Symbol.iterator]||re["@@iterator"];if(le)return(le=le.call(re)).next.bind(le);if(Array.isArray(re)||(le=y(re))||oe&&re&&typeof re.length=="number"){le&&(re=le);var ne=0;return function(){return ne>=re.length?{done:!0}:{done:!1,value:re[ne++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}q.defaults=T();function f(re){q.defaults=re}var v=/[&<>"']/,m=/[&<>"']/g,S=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,a={"&":"&","<":"<",">":">",'"':""","'":"'"},r=function(oe){return a[oe]};function i(re,oe){if(oe){if(v.test(re))return re.replace(m,r)}else if(S.test(re))return re.replace(h,r);return re}var s=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function o(re){return re.replace(s,function(oe,le){return le=le.toLowerCase(),le==="colon"?":":le.charAt(0)==="#"?le.charAt(1)==="x"?String.fromCharCode(parseInt(le.substring(2),16)):String.fromCharCode(+le.substring(1)):""})}var u=/(^|[^\[])\^/g;function d(re,oe){re=typeof re=="string"?re:re.source,oe=oe||"";var le={replace:function(ce,ae){return ae=ae.source||ae,ae=ae.replace(u,"$1"),re=re.replace(ce,ae),le},getRegex:function(){return new RegExp(re,oe)}};return le}var p=/[^\w:]/g,c=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function l(re,oe,le){if(re){var ne;try{ne=decodeURIComponent(o(le)).replace(p,"").toLowerCase()}catch{return null}if(ne.indexOf("javascript:")===0||ne.indexOf("vbscript:")===0||ne.indexOf("data:")===0)return null}oe&&!c.test(le)&&(le=C(oe,le));try{le=encodeURI(le).replace(/%25/g,"%")}catch{return null}return le}var n={},g=/^[^:]+:\/*[^/]*$/,w=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function C(re,oe){n[" "+re]||(g.test(re)?n[" "+re]=re+"/":n[" "+re]=k(re,"/",!0)),re=n[" "+re];var le=re.indexOf(":")===-1;return oe.substring(0,2)==="//"?le?oe:re.replace(w,"$1")+oe:oe.charAt(0)==="/"?le?oe:re.replace(E,"$1")+oe:re+oe}var I={exec:function(){}};function _(re){for(var oe=1,le,ne;oe<arguments.length;oe++){le=arguments[oe];for(ne in le)Object.prototype.hasOwnProperty.call(le,ne)&&(re[ne]=le[ne])}return re}function A(re,oe){var le=re.replace(/\|/g,function(ae,ue,de){for(var ge=!1,he=ue;--he>=0&&de[he]==="\\";)ge=!ge;return ge?"|":" |"}),ne=le.split(/ \|/),ce=0;if(ne[0].trim()||ne.shift(),ne.length>0&&!ne[ne.length-1].trim()&&ne.pop(),ne.length>oe)ne.splice(oe);else for(;ne.length<oe;)ne.push("");for(;ce<ne.length;ce++)ne[ce]=ne[ce].trim().replace(/\\\|/g,"|");return ne}function k(re,oe,le){var ne=re.length;if(ne===0)return"";for(var ce=0;ce<ne;){var ae=re.charAt(ne-ce-1);if(ae===oe&&!le)ce++;else if(ae!==oe&&le)ce++;else break}return re.slice(0,ne-ce)}function L(re,oe){if(re.indexOf(oe[1])===-1)return-1;for(var le=re.length,ne=0,ce=0;ce<le;ce++)if(re[ce]==="\\")ce++;else if(re[ce]===oe[0])ne++;else if(re[ce]===oe[1]&&(ne--,ne<0))return ce;return-1}function R(re){re&&re.sanitize&&!re.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function M(re,oe){if(oe<1)return"";for(var le="";oe>1;)oe&1&&(le+=re),oe>>=1,re+=re;return le+re}function N(re,oe,le,ne){var ce=oe.href,ae=oe.title?i(oe.title):null,ue=re[1].replace(/\\([\[\]])/g,"$1");if(re[0].charAt(0)!=="!"){ne.state.inLink=!0;var de={type:"link",raw:le,href:ce,title:ae,text:ue,tokens:ne.inlineTokens(ue)};return ne.state.inLink=!1,de}return{type:"image",raw:le,href:ce,title:ae,text:i(ue)}}function P(re,oe){var le=re.match(/^(\s+)(?:```)/);if(le===null)return oe;var ne=le[1];return oe.split(` `).map(function(ce){var ae=ce.match(/^\s+/);if(ae===null)return ce;var ue=ae[0];return ue.length>=ne.length?ce.slice(ne.length):ce}).join(` `)}var x=function(){function re(le){this.options=le||q.defaults}var oe=re.prototype;return oe.space=function(ne){var ce=this.rules.block.newline.exec(ne);if(ce&&ce[0].length>0)return{type:"space",raw:ce[0]}},oe.code=function(ne){var ce=this.rules.block.code.exec(ne);if(ce){var ae=ce[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ce[0],codeBlockStyle:"indented",text:this.options.pedantic?ae:k(ae,` `)}}},oe.fences=function(ne){var ce=this.rules.block.fences.exec(ne);if(ce){var ae=ce[0],ue=P(ae,ce[3]||"");return{type:"code",raw:ae,lang:ce[2]?ce[2].trim():ce[2],text:ue}}},oe.heading=function(ne){var ce=this.rules.block.heading.exec(ne);if(ce){var ae=ce[2].trim();if(/#$/.test(ae)){var ue=k(ae,"#");(this.options.pedantic||!ue||/ $/.test(ue))&&(ae=ue.trim())}return{type:"heading",raw:ce[0],depth:ce[1].length,text:ae,tokens:this.lexer.inline(ae)}}},oe.hr=function(ne){var ce=this.rules.block.hr.exec(ne);if(ce)return{type:"hr",raw:ce[0]}},oe.blockquote=function(ne){var ce=this.rules.block.blockquote.exec(ne);if(ce){var ae=ce[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:ce[0],tokens:this.lexer.blockTokens(ae,[]),text:ae}}},oe.list=function(ne){var ce=this.rules.block.list.exec(ne);if(ce){var ae,ue,de,ge,he,be,ve,Ie,Se,we,ye,Re,Le=ce[1].trim(),Pe=Le.length>1,Ae={type:"list",raw:"",ordered:Pe,start:Pe?+Le.slice(0,-1):"",loose:!1,items:[]};Le=Pe?"\\d{1,9}\\"+Le.slice(-1):"\\"+Le,this.options.pedantic&&(Le=Pe?Le:"[*+-]");for(var Me=new RegExp("^( {0,3}"+Le+")((?:[ ][^\\n]*)?(?:\\n|$))");ne&&(Re=!1,!(!(ce=Me.exec(ne))||this.rules.block.hr.test(ne)));){if(ae=ce[0],ne=ne.substring(ae.length),Ie=ce[2].split(` `,1)[0],Se=ne.split(` `,1)[0],this.options.pedantic?(ge=2,ye=Ie.trimLeft()):(ge=ce[2].search(/[^ ]/),ge=ge>4?1:ge,ye=Ie.slice(ge),ge+=ce[1].length),be=!1,!Ie&&/^ *$/.test(Se)&&(ae+=Se+` `,ne=ne.substring(Se.length+1),Re=!0),!Re)for(var Oe=new RegExp("^ {0,"+Math.min(3,ge-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),De=new RegExp("^ {0,"+Math.min(3,ge-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),Ce=new RegExp("^ {0,"+Math.min(3,ge-1)+"}(?:```|~~~)"),_e=new RegExp("^ {0,"+Math.min(3,ge-1)+"}#");ne&&(we=ne.split(` `,1)[0],Ie=we,this.options.pedantic&&(Ie=Ie.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(Ce.test(Ie)||_e.test(Ie)||Oe.test(Ie)||De.test(ne)));){if(Ie.search(/[^ ]/)>=ge||!Ie.trim())ye+=` `+Ie.slice(ge);else if(!be)ye+=` `+Ie;else break;!be&&!Ie.trim()&&(be=!0),ae+=we+` `,ne=ne.substring(we.length+1)}Ae.loose||(ve?Ae.loose=!0:/\n *\n *$/.test(ae)&&(ve=!0)),this.options.gfm&&(ue=/^\[[ xX]\] /.exec(ye),ue&&(de=ue[0]!=="[ ] ",ye=ye.replace(/^\[[ xX]\] +/,""))),Ae.items.push({type:"list_item",raw:ae,task:!!ue,checked:de,loose:!1,text:ye}),Ae.raw+=ae}Ae.items[Ae.items.length-1].raw=ae.trimRight(),Ae.items[Ae.items.length-1].text=ye.trimRight(),Ae.raw=Ae.raw.trimRight();var me=Ae.items.length;for(he=0;he<me;he++){this.lexer.state.top=!1,Ae.items[he].tokens=this.lexer.blockTokens(Ae.items[he].text,[]);var ke=Ae.items[he].tokens.filter(function(pe){return pe.type==="space"}),Ee=ke.every(function(pe){for(var Te=pe.raw.split(""),Ne=0,xe=D(Te),Ve;!(Ve=xe()).done;){var Fe=Ve.value;if(Fe===` `&&(Ne+=1),Ne>1)return!0}return!1});!Ae.loose&&ke.length&&Ee&&(Ae.loose=!0,Ae.items[he].loose=!0)}return Ae}},oe.html=function(ne){var ce=this.rules.block.html.exec(ne);if(ce){var ae={type:"html",raw:ce[0],pre:!this.options.sanitizer&&(ce[1]==="pre"||ce[1]==="script"||ce[1]==="style"),text:ce[0]};if(this.options.sanitize){var ue=this.options.sanitizer?this.options.sanitizer(ce[0]):i(ce[0]);ae.type="paragraph",ae.text=ue,ae.tokens=this.lexer.inline(ue)}return ae}},oe.def=function(ne){var ce=this.rules.block.def.exec(ne);if(ce){ce[3]&&(ce[3]=ce[3].substring(1,ce[3].length-1));var ae=ce[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:ae,raw:ce[0],href:ce[2],title:ce[3]}}},oe.table=function(ne){var ce=this.rules.block.table.exec(ne);if(ce){var ae={type:"table",header:A(ce[1]).map(function(ve){return{text:ve}}),align:ce[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:ce[3]&&ce[3].trim()?ce[3].replace(/\n[ \t]*$/,"").split(` `):[]};if(ae.header.length===ae.align.length){ae.raw=ce[0];var ue=ae.align.length,de,ge,he,be;for(de=0;de<ue;de++)/^ *-+: *$/.test(ae.align[de])?ae.align[de]="right":/^ *:-+: *$/.test(ae.align[de])?ae.align[de]="center":/^ *:-+ *$/.test(ae.align[de])?ae.align[de]="left":ae.align[de]=null;for(ue=ae.rows.length,de=0;de<ue;de++)ae.rows[de]=A(ae.rows[de],ae.header.length).map(function(ve){return{text:ve}});for(ue=ae.header.length,ge=0;ge<ue;ge++)ae.header[ge].tokens=this.lexer.inline(ae.header[ge].text);for(ue=ae.rows.length,ge=0;ge<ue;ge++)for(be=ae.rows[ge],he=0;he<be.length;he++)be[he].tokens=this.lexer.inline(be[he].text);return ae}}},oe.lheading=function(ne){var ce=this.rules.block.lheading.exec(ne);if(ce)return{type:"heading",raw:ce[0],depth:ce[2].charAt(0)==="="?1:2,text:ce[1],tokens:this.lexer.inline(ce[1])}},oe.paragraph=function(ne){var ce=this.rules.block.paragraph.exec(ne);if(ce){var ae=ce[1].charAt(ce[1].length-1)===` `?ce[1].slice(0,-1):ce[1];return{type:"paragraph",raw:ce[0],text:ae,tokens:this.lexer.inline(ae)}}},oe.text=function(ne){var ce=this.rules.block.text.exec(ne);if(ce)return{type:"text",raw:ce[0],text:ce[0],tokens:this.lexer.inline(ce[0])}},oe.escape=function(ne){var ce=this.rules.inline.escape.exec(ne);if(ce)return{type:"escape",raw:ce[0],text:i(ce[1])}},oe.tag=function(ne){var ce=this.rules.inline.tag.exec(ne);if(ce)return!this.lexer.state.inLink&&/^<a /i.test(ce[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(ce[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(ce[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ce[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:ce[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):i(ce[0]):ce[0]}},oe.link=function(ne){var ce=this.rules.inline.link.exec(ne);if(ce){var ae=ce[2].trim();if(!this.options.pedantic&&/^</.test(ae)){if(!/>$/.test(ae))return;var ue=k(ae.slice(0,-1),"\\");if((ae.length-ue.length)%2===0)return}else{var de=L(ce[2],"()");if(de>-1){var ge=ce[0].indexOf("!")===0?5:4,he=ge+ce[1].length+de;ce[2]=ce[2].substring(0,de),ce[0]=ce[0].substring(0,he).trim(),ce[3]=""}}var be=ce[2],ve="";if(this.options.pedantic){var Ie=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(be);Ie&&(be=Ie[1],ve=Ie[3])}else ve=ce[3]?ce[3].slice(1,-1):"";return be=be.trim(),/^</.test(be)&&(this.options.pedantic&&!/>$/.test(ae)?be=be.slice(1):be=be.slice(1,-1)),N(ce,{href:be&&be.replace(this.rules.inline._escapes,"$1"),title:ve&&ve.replace(this.rules.inline._escapes,"$1")},ce[0],this.lexer)}},oe.reflink=function(ne,ce){var ae;if((ae=this.rules.inline.reflink.exec(ne))||(ae=this.rules.inline.nolink.exec(ne))){var ue=(ae[2]||ae[1]).replace(/\s+/g," ");if(ue=ce[ue.toLowerCase()],!ue||!ue.href){var de=ae[0].charAt(0);return{type:"text",raw:de,text:de}}return N(ae,ue,ae[0],this.lexer)}},oe.emStrong=function(ne,ce,ae){ae===void 0&&(ae="");var ue=this.rules.inline.emStrong.lDelim.exec(ne);if(ue&&!(ue[3]&&ae.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var de=ue[1]||ue[2]||"";if(!de||de&&(ae===""||this.rules.inline.punctuation.exec(ae))){var ge=ue[0].length-1,he,be,ve=ge,Ie=0,Se=ue[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Se.lastIndex=0,ce=ce.slice(-1*ne.length+ge);(ue=Se.exec(ce))!=null;)if(he=ue[1]||ue[2]||ue[3]||ue[4]||ue[5]||ue[6],!!he){if(be=he.length,ue[3]||ue[4]){ve+=be;continue}else if((ue[5]||ue[6])&&ge%3&&!((ge+be)%3)){Ie+=be;continue}if(ve-=be,!(ve>0)){if(be=Math.min(be,be+ve+Ie),Math.min(ge,be)%2){var we=ne.slice(1,ge+ue.index+be);return{type:"em",raw:ne.slice(0,ge+ue.index+be+1),text:we,tokens:this.lexer.inlineTokens(we)}}var ye=ne.slice(2,ge+ue.index+be-1);return{type:"strong",raw:ne.slice(0,ge+ue.index+be+1),text:ye,tokens:this.lexer.inlineTokens(ye)}}}}}},oe.codespan=function(ne){var ce=this.rules.inline.code.exec(ne);if(ce){var ae=ce[2].replace(/\n/g," "),ue=/[^ ]/.test(ae),de=/^ /.test(ae)&&/ $/.test(ae);return ue&&de&&(ae=ae.substring(1,ae.length-1)),ae=i(ae,!0),{type:"codespan",raw:ce[0],text:ae}}},oe.br=function(ne){var ce=this.rules.inline.br.exec(ne);if(ce)return{type:"br",raw:ce[0]}},oe.del=function(ne){var ce=this.rules.inline.del.exec(ne);if(ce)return{type:"del",raw:ce[0],text:ce[2],tokens:this.lexer.inlineTokens(ce[2])}},oe.autolink=function(ne,ce){var ae=this.rules.inline.autolink.exec(ne);if(ae){var ue,de;return ae[2]==="@"?(ue=i(this.options.mangle?ce(ae[1]):ae[1]),de="mailto:"+ue):(ue=i(ae[1]),de=ue),{type:"link",raw:ae[0],text:ue,href:de,tokens:[{type:"text",raw:ue,text:ue}]}}},oe.url=function(ne,ce){var ae;if(ae=this.rules.inline.url.exec(ne)){var ue,de;if(ae[2]==="@")ue=i(this.options.mangle?ce(ae[0]):ae[0]),de="mailto:"+ue;else{var ge;do ge=ae[0],ae[0]=this.rules.inline._backpedal.exec(ae[0])[0];while(ge!==ae[0]);ue=i(ae[0]),ae[1]==="www."?de="http://"+ue:de=ue}return{type:"link",raw:ae[0],text:ue,href:de,tokens:[{type:"text",raw:ue,text:ue}]}}},oe.inlineText=function(ne,ce){var ae=this.rules.inline.text.exec(ne);if(ae){var ue;return this.lexer.state.inRawBlock?ue=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ae[0]):i(ae[0]):ae[0]:ue=i(this.options.smartypants?ce(ae[0]):ae[0]),{type:"text",raw:ae[0],text:ue}}},re}(),F={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:I,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};F._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,F._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,F.def=d(F.def).replace("label",F._label).replace("title",F._title).getRegex(),F.bullet=/(?:[*+-]|\d{1,9}[.)])/,F.listItemStart=d(/^( *)(bull) */).replace("bull",F.bullet).getRegex(),F.list=d(F.list).replace(/bull/g,F.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+F.def.source+")").getRegex(),F._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",F._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,F.html=d(F.html,"i").replace("comment",F._comment).replace("tag",F._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),F.paragraph=d(F._paragraph).replace("hr",F.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F._tag).getRegex(),F.blockquote=d(F.blockquote).replace("paragraph",F.paragraph).getRegex(),F.normal=_({},F),F.gfm=_({},F.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),F.gfm.table=d(F.gfm.table).replace("hr",F.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F._tag).getRegex(),F.gfm.paragraph=d(F._paragraph).replace("hr",F.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",F.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F._tag).getRegex(),F.pedantic=_({},F.normal,{html:d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",F._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:I,paragraph:d(F.normal._paragraph).replace("hr",F.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",F.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var V={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:I,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:I,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};V._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",V.punctuation=d(V.punctuation).replace(/punctuation/g,V._punctuation).getRegex(),V.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,V.escapedEmSt=/\\\*|\\_/g,V._comment=d(F._comment).replace("(?:-->|$)","-->").getRegex(),V.emStrong.lDelim=d(V.emStrong.lDelim).replace(/punct/g,V._punctuation).getRegex(),V.emStrong.rDelimAst=d(V.emStrong.rDelimAst,"g").replace(/punct/g,V._punctuation).getRegex(),V.emStrong.rDelimUnd=d(V.emStrong.rDelimUnd,"g").replace(/punct/g,V._punctuation).getRegex(),V._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,V._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,V._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])?)+(?![-_])/,V.autolink=d(V.autolink).replace("scheme",V._scheme).replace("email",V._email).getRegex(),V._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,V.tag=d(V.tag).replace("comment",V._comment).replace("attribute",V._attribute).getRegex(),V._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,V._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,V._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,V.link=d(V.link).replace("label",V._label).replace("href",V._href).replace("title",V._title).getRegex(),V.reflink=d(V.reflink).replace("label",V._label).replace("ref",F._label).getRegex(),V.nolink=d(V.nolink).replace("ref",F._label).getRegex(),V.reflinkSearch=d(V.reflinkSearch,"g").replace("reflink",V.reflink).replace("nolink",V.nolink).getRegex(),V.normal=_({},V),V.pedantic=_({},V.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:d(/^!?\[(label)\]\((.*?)\)/).replace("label",V._label).getRegex(),reflink:d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",V._label).getRegex()}),V.gfm=_({},V.normal,{escape:d(V.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),V.gfm.url=d(V.gfm.url,"i").replace("email",V.gfm._extended_email).getRegex(),V.breaks=_({},V.gfm,{br:d(V.br).replace("{2,}","*").getRegex(),text:d(V.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function W(re){return re.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function z(re){var oe="",le,ne,ce=re.length;for(le=0;le<ce;le++)ne=re.charCodeAt(le),Math.random()>.5&&(ne="x"+ne.toString(16)),oe+="&#"+ne+";";return oe}var B=function(){function re(le){this.tokens=[],this.tokens.links=Object.create(null),this.options=le||q.defaults,this.options.tokenizer=this.options.tokenizer||new x,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var ne={block:F.normal,inline:V.normal};this.options.pedantic?(ne.block=F.pedantic,ne.inline=V.pedantic):this.options.gfm&&(ne.block=F.gfm,this.options.breaks?ne.inline=V.breaks:ne.inline=V.gfm),this.tokenizer.rules=ne}re.lex=function(ne,ce){var ae=new re(ce);return ae.lex(ne)},re.lexInline=function(ne,ce){var ae=new re(ce);return ae.inlineTokens(ne)};var oe=re.prototype;return oe.lex=function(ne){ne=ne.replace(/\r\n|\r/g,` `),this.blockTokens(ne,this.tokens);for(var ce;ce=this.inlineQueue.shift();)this.inlineTokens(ce.src,ce.tokens);return this.tokens},oe.blockTokens=function(ne,ce){var ae=this;ce===void 0&&(ce=[]),this.options.pedantic?ne=ne.replace(/\t/g," ").replace(/^ +$/gm,""):ne=ne.replace(/^( *)(\t+)/gm,function(ve,Ie,Se){return Ie+" ".repeat(Se.length)});for(var ue,de,ge,he;ne;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(ve){return(ue=ve.call({lexer:ae},ne,ce))?(ne=ne.substring(ue.raw.length),ce.push(ue),!0):!1}))){if(ue=this.tokenizer.space(ne)){ne=ne.substring(ue.raw.length),ue.raw.length===1&&ce.length>0?ce[ce.length-1].raw+=` `:ce.push(ue);continue}if(ue=this.tokenizer.code(ne)){ne=ne.substring(ue.raw.length),de=ce[ce.length-1],de&&(de.type==="paragraph"||de.type==="text")?(de.raw+=` `+ue.raw,de.text+=` `+ue.text,this.inlineQueue[this.inlineQueue.length-1].src=de.text):ce.push(ue);continue}if(ue=this.tokenizer.fences(ne)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ue=this.tokenizer.heading(ne)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ue=this.tokenizer.hr(ne)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ue=this.tokenizer.blockquote(ne)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ue=this.tokenizer.list(ne)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ue=this.tokenizer.html(ne)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ue=this.tokenizer.def(ne)){ne=ne.substring(ue.raw.length),de=ce[ce.length-1],de&&(de.type==="paragraph"||de.type==="text")?(de.raw+=` `+ue.raw,de.text+=` `+ue.raw,this.inlineQueue[this.inlineQueue.length-1].src=de.text):this.tokens.links[ue.tag]||(this.tokens.links[ue.tag]={href:ue.href,title:ue.title});continue}if(ue=this.tokenizer.table(ne)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ue=this.tokenizer.lheading(ne)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ge=ne,this.options.extensions&&this.options.extensions.startBlock&&function(){var ve=1/0,Ie=ne.slice(1),Se=void 0;ae.options.extensions.startBlock.forEach(function(we){Se=we.call({lexer:this},Ie),typeof Se=="number"&&Se>=0&&(ve=Math.min(ve,Se))}),ve<1/0&&ve>=0&&(ge=ne.substring(0,ve+1))}(),this.state.top&&(ue=this.tokenizer.paragraph(ge))){de=ce[ce.length-1],he&&de.type==="paragraph"?(de.raw+=` `+ue.raw,de.text+=` `+ue.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=de.text):ce.push(ue),he=ge.length!==ne.length,ne=ne.substring(ue.raw.length);continue}if(ue=this.tokenizer.text(ne)){ne=ne.substring(ue.raw.length),de=ce[ce.length-1],de&&de.type==="text"?(de.raw+=` `+ue.raw,de.text+=` `+ue.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=de.text):ce.push(ue);continue}if(ne){var be="Infinite loop on byte: "+ne.charCodeAt(0);if(this.options.silent){console.error(be);break}else throw new Error(be)}}return this.state.top=!0,ce},oe.inline=function(ne,ce){return ce===void 0&&(ce=[]),this.inlineQueue.push({src:ne,tokens:ce}),ce},oe.inlineTokens=function(ne,ce){var ae=this;ce===void 0&&(ce=[]);var ue,de,ge,he=ne,be,ve,Ie;if(this.tokens.links){var Se=Object.keys(this.tokens.links);if(Se.length>0)for(;(be=this.tokenizer.rules.inline.reflinkSearch.exec(he))!=null;)Se.includes(be[0].slice(be[0].lastIndexOf("[")+1,-1))&&(he=he.slice(0,be.index)+"["+M("a",be[0].length-2)+"]"+he.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(be=this.tokenizer.rules.inline.blockSkip.exec(he))!=null;)he=he.slice(0,be.index)+"["+M("a",be[0].length-2)+"]"+he.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(be=this.tokenizer.rules.inline.escapedEmSt.exec(he))!=null;)he=he.slice(0,be.index)+"++"+he.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;ne;)if(ve||(Ie=""),ve=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(ye){return(ue=ye.call({lexer:ae},ne,ce))?(ne=ne.substring(ue.raw.length),ce.push(ue),!0):!1}))){if(ue=this.tokenizer.escape(ne)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ue=this.tokenizer.tag(ne)){ne=ne.substring(ue.raw.length),de=ce[ce.length-1],de&&ue.type==="text"&&de.type==="text"?(de.raw+=ue.raw,de.text+=ue.text):ce.push(ue);continue}if(ue=this.tokenizer.link(ne)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ue=this.tokenizer.reflink(ne,this.tokens.links)){ne=ne.substring(ue.raw.length),de=ce[ce.length-1],de&&ue.type==="text"&&de.type==="text"?(de.raw+=ue.raw,de.text+=ue.text):ce.push(ue);continue}if(ue=this.tokenizer.emStrong(ne,he,Ie)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ue=this.tokenizer.codespan(ne)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ue=this.tokenizer.br(ne)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ue=this.tokenizer.del(ne)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ue=this.tokenizer.autolink(ne,z)){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(!this.state.inLink&&(ue=this.tokenizer.url(ne,z))){ne=ne.substring(ue.raw.length),ce.push(ue);continue}if(ge=ne,this.options.extensions&&this.options.extensions.startInline&&function(){var ye=1/0,Re=ne.slice(1),Le=void 0;ae.options.extensions.startInline.forEach(function(Pe){Le=Pe.call({lexer:this},Re),typeof Le=="number"&&Le>=0&&(ye=Math.min(ye,Le))}),ye<1/0&&ye>=0&&(ge=ne.substring(0,ye+1))}(),ue=this.tokenizer.inlineText(ge,W)){ne=ne.substring(ue.raw.length),ue.raw.slice(-1)!=="_"&&(Ie=ue.raw.slice(-1)),ve=!0,de=ce[ce.length-1],de&&de.type==="text"?(de.raw+=ue.raw,de.text+=ue.text):ce.push(ue);continue}if(ne){var we="Infinite loop on byte: "+ne.charCodeAt(0);if(this.options.silent){console.error(we);break}else throw new Error(we)}}return ce},t(re,null,[{key:"rules",get:function(){return{block:F,inline:V}}}]),re}(),K=function(){function re(le){this.options=le||q.defaults}var oe=re.prototype;return oe.code=function(ne,ce,ae){var ue=(ce||"").match(/\S*/)[0];if(this.options.highlight){var de=this.options.highlight(ne,ue);de!=null&&de!==ne&&(ae=!0,ne=de)}return ne=ne.replace(/\n$/,"")+` `,ue?'<pre><code class="'+this.options.langPrefix+i(ue,!0)+'">'+(ae?ne:i(ne,!0))+`</code></pre> `:"<pre><code>"+(ae?ne:i(ne,!0))+`</code></pre> `},oe.blockquote=function(ne){return`<blockquote> `+ne+`</blockquote> `},oe.html=function(ne){return ne},oe.heading=function(ne,ce,ae,ue){if(this.options.headerIds){var de=this.options.headerPrefix+ue.slug(ae);return"<h"+ce+' id="'+de+'">'+ne+"</h"+ce+`> `}return"<h"+ce+">"+ne+"</h"+ce+`> `},oe.hr=function(){return this.options.xhtml?`<hr/> `:`<hr> `},oe.list=function(ne,ce,ae){var ue=ce?"ol":"ul",de=ce&&ae!==1?' start="'+ae+'"':"";return"<"+ue+de+`> `+ne+"</"+ue+`> `},oe.listitem=function(ne){return"<li>"+ne+`</li> `},oe.checkbox=function(ne){return"<input "+(ne?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},oe.paragraph=function(ne){return"<p>"+ne+`</p> `},oe.table=function(ne,ce){return ce&&(ce="<tbody>"+ce+"</tbody>"),`<table> <thead> `+ne+`</thead> `+ce+`</table> `},oe.tablerow=function(ne){return`<tr> `+ne+`</tr> `},oe.tablecell=function(ne,ce){var ae=ce.header?"th":"td",ue=ce.align?"<"+ae+' align="'+ce.align+'">':"<"+ae+">";return ue+ne+("</"+ae+`> `)},oe.strong=function(ne){return"<strong>"+ne+"</strong>"},oe.em=function(ne){return"<em>"+ne+"</em>"},oe.codespan=function(ne){return"<code>"+ne+"</code>"},oe.br=function(){return this.options.xhtml?"<br/>":"<br>"},oe.del=function(ne){return"<del>"+ne+"</del>"},oe.link=function(ne,ce,ae){if(ne=l(this.options.sanitize,this.options.baseUrl,ne),ne===null)return ae;var ue='<a href="'+i(ne)+'"';return ce&&(ue+=' title="'+ce+'"'),ue+=">"+ae+"</a>",ue},oe.image=function(ne,ce,ae){if(ne=l(this.options.sanitize,this.options.baseUrl,ne),ne===null)return ae;var ue='<img src="'+ne+'" alt="'+ae+'"';return ce&&(ue+=' title="'+ce+'"'),ue+=this.options.xhtml?"/>":">",ue},oe.text=function(ne){return ne},re}(),H=function(){function re(){}var oe=re.prototype;return oe.strong=function(ne){return ne},oe.em=function(ne){return ne},oe.codespan=function(ne){return ne},oe.del=function(ne){return ne},oe.html=function(ne){return ne},oe.text=function(ne){return ne},oe.link=function(ne,ce,ae){return""+ae},oe.image=function(ne,ce,ae){return""+ae},oe.br=function(){return""},re}(),U=function(){function re(){this.seen={}}var oe=re.prototype;return oe.serialize=function(ne){return ne.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},oe.getNextSafeSlug=function(ne,ce){var ae=ne,ue=0;if(this.seen.hasOwnProperty(ae)){ue=this.seen[ne];do ue++,ae=ne+"-"+ue;while(this.seen.hasOwnProperty(ae))}return ce||(this.seen[ne]=ue,this.seen[ae]=0),ae},oe.slug=function(ne,ce){ce===void 0&&(ce={});var ae=this.serialize(ne);return this.getNextSafeSlug(ae,ce.dryrun)},re}(),G=function(){function re(le){this.options=le||q.defaults,this.options.renderer=this.options.renderer||new K,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new H,this.slugger=new U}re.parse=function(ne,ce){var ae=new re(ce);return ae.parse(ne)},re.parseInline=function(ne,ce){var ae=new re(ce);return ae.parseInline(ne)};var oe=re.prototype;return oe.parse=function(ne,ce){ce===void 0&&(ce=!0);var ae="",ue,de,ge,he,be,ve,Ie,Se,we,ye,Re,Le,Pe,Ae,Me,Oe,De,Ce,_e,me=ne.length;for(ue=0;ue<me;ue++){if(ye=ne[ue],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[ye.type]&&(_e=this.options.extensions.renderers[ye.type].call({parser:this},ye),_e!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(ye.type))){ae+=_e||"";continue}switch(ye.type){case"space":continue;case"hr":{ae+=this.renderer.hr();continue}case"heading":{ae+=this.renderer.heading(this.parseInline(ye.tokens),ye.depth,o(this.parseInline(ye.tokens,this.textRenderer)),this.slugger);continue}case"code":{ae+=this.renderer.code(ye.text,ye.lang,ye.escaped);continue}case"table":{for(Se="",Ie="",he=ye.header.length,de=0;de<he;de++)Ie+=this.renderer.tablecell(this.parseInline(ye.header[de].tokens),{header:!0,align:ye.align[de]});for(Se+=this.renderer.tablerow(Ie),we="",he=ye.rows.length,de=0;de<he;de++){for(ve=ye.rows[de],Ie="",be=ve.length,ge=0;ge<be;ge++)Ie+=this.renderer.tablecell(this.parseInline(ve[ge].tokens),{header:!1,align:ye.align[ge]});we+=this.renderer.tablerow(Ie)}ae+=this.renderer.table(Se,we);continue}case"blockquote":{we=this.parse(ye.tokens),ae+=this.renderer.blockquote(we);continue}case"list":{for(Re=ye.ordered,Le=ye.start,Pe=ye.loose,he=ye.items.length,we="",de=0;de<he;de++)Me=ye.items[de],Oe=Me.checked,De=Me.task,Ae="",Me.task&&(Ce=this.renderer.checkbox(Oe),Pe?Me.tokens.length>0&&Me.tokens[0].type==="paragraph"?(Me.tokens[0].text=Ce+" "+Me.tokens[0].text,Me.tokens[0].tokens&&Me.tokens[0].tokens.length>0&&Me.tokens[0].tokens[0].type==="text"&&(Me.tokens[0].tokens[0].text=Ce+" "+Me.tokens[0].tokens[0].text)):Me.tokens.unshift({type:"text",text:Ce}):Ae+=Ce),Ae+=this.parse(Me.tokens,Pe),we+=this.renderer.listitem(Ae,De,Oe);ae+=this.renderer.list(we,Re,Le);continue}case"html":{ae+=this.renderer.html(ye.text);continue}case"paragraph":{ae+=this.renderer.paragraph(this.parseInline(ye.tokens));continue}case"text":{for(we=ye.tokens?this.parseInline(ye.tokens):ye.text;ue+1<me&&ne[ue+1].type==="text";)ye=ne[++ue],we+=` `+(ye.tokens?this.parseInline(ye.tokens):ye.text);ae+=ce?this.renderer.paragraph(we):we;continue}default:{var ke='Token with "'+ye.type+'" type was not found.';if(this.options.silent){console.error(ke);return}else throw new Error(ke)}}}return ae},oe.parseInline=function(ne,ce){ce=ce||this.renderer;var ae="",ue,de,ge,he=ne.length;for(ue=0;ue<he;ue++){if(de=ne[ue],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[de.type]&&(ge=this.options.extensions.renderers[de.type].call({parser:this},de),ge!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(de.type))){ae+=ge||"";continue}switch(de.type){case"escape":{ae+=ce.text(de.text);break}case"html":{ae+=ce.html(de.text);break}case"link":{ae+=ce.link(de.href,de.title,this.parseInline(de.tokens,ce));break}case"image":{ae+=ce.image(de.href,de.title,de.text);break}case"strong":{ae+=ce.strong(this.parseInline(de.tokens,ce));break}case"em":{ae+=ce.em(this.parseInline(de.tokens,ce));break}case"codespan":{ae+=ce.codespan(de.text);break}case"br":{ae+=ce.br();break}case"del":{ae+=ce.del(this.parseInline(de.tokens,ce));break}case"text":{ae+=ce.text(de.text);break}default:{var be='Token with "'+de.type+'" type was not found.';if(this.options.silent){console.error(be);return}else throw new Error(be)}}}return ae},re}();function $(re,oe,le){if(typeof re>"u"||re===null)throw new Error("marked(): input parameter is undefined or null");if(typeof re!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(re)+", string expected");if(typeof oe=="function"&&(le=oe,oe=null),oe=_({},$.defaults,oe||{}),R(oe),le){var ne=oe.highlight,ce;try{ce=B.lex(re,oe)}catch(he){return le(he)}var ae=function(be){var ve;if(!be)try{oe.walkTokens&&$.walkTokens(ce,oe.walkTokens),ve=G.parse(ce,oe)}catch(Ie){be=Ie}return oe.highlight=ne,be?le(be):le(null,ve)};if(!ne||ne.length<3||(delete oe.highlight,!ce.length))return ae();var ue=0;$.walkTokens(ce,function(he){he.type==="code"&&(ue++,setTimeout(function(){ne(he.text,he.lang,function(be,ve){if(be)return ae(be);ve!=null&&ve!==he.text&&(he.text=ve,he.escaped=!0),ue--,ue===0&&ae()})},0))}),ue===0&&ae();return}function de(he){if(he.message+=` Please report this to https://github.com/markedjs/marked.`,oe.silent)return"<p>An error occurred:</p><pre>"+i(he.message+"",!0)+"</pre>";throw he}try{var ge=B.lex(re,oe);if(oe.walkTokens){if(oe.async)return Promise.all($.walkTokens(ge,oe.walkTokens)).then(function(){return G.parse(ge,oe)}).catch(de);$.walkTokens(ge,oe.walkTokens)}return G.parse(ge,oe)}catch(he){de(he)}}$.options=$.setOptions=function(re){return _($.defaults,re),f($.defaults),$},$.getDefaults=T,$.defaults=q.defaults,$.use=function(){for(var re=arguments.length,oe=new Array(re),le=0;le<re;le++)oe[le]=arguments[le];var ne=_.apply(void 0,[{}].concat(oe)),ce=$.defaults.extensions||{renderers:{},childTokens:{}},ae;oe.forEach(function(ue){if(ue.extensions&&(ae=!0,ue.extensions.forEach(function(ge){if(!ge.name)throw new Error("extension name required");if(ge.renderer){var he=ce.renderers?ce.renderers[ge.name]:null;he?ce.renderers[ge.name]=function(){for(var be=arguments.length,ve=new Array(be),Ie=0;Ie<be;Ie++)ve[Ie]=arguments[Ie];var Se=ge.renderer.apply(this,ve);return Se===!1&&(Se=he.apply(this,ve)),Se}:ce.renderers[ge.name]=ge.renderer}if(ge.tokenizer){if(!ge.level||ge.level!=="block"&&ge.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");ce[ge.level]?ce[ge.level].unshift(ge.tokenizer):ce[ge.level]=[ge.tokenizer],ge.start&&(ge.level==="block"?ce.startBlock?ce.startBlock.push(ge.start):ce.startBlock=[ge.start]:ge.level==="inline"&&(ce.startInline?ce.startInline.push(ge.start):ce.startInline=[ge.start]))}ge.childTokens&&(ce.childTokens[ge.name]=ge.childTokens)})),ue.renderer&&function(){var ge=$.defaults.renderer||new K,he=function(Ie){var Se=ge[Ie];ge[Ie]=function(){for(var we=arguments.length,ye=new Array(we),Re=0;Re<we;Re++)ye[Re]=arguments[Re];var Le=ue.renderer[Ie].apply(ge,ye);return Le===!1&&(Le=Se.apply(ge,ye)),Le}};for(var be in ue.renderer)he(be);ne.renderer=ge}(),ue.tokenizer&&function(){var ge=$.defaults.tokenizer||new x,he=function(Ie){var Se=ge[Ie];ge[Ie]=function(){for(var we=arguments.length,ye=new Array(we),Re=0;Re<we;Re++)ye[Re]=arguments[Re];var Le=ue.tokenizer[Ie].apply(ge,ye);return Le===!1&&(Le=Se.apply(ge,ye)),Le}};for(var be in ue.tokenizer)he(be);ne.tokenizer=ge}(),ue.walkTokens){var de=$.defaults.walkTokens;ne.walkTokens=function(ge){var he=[];return he.push(ue.walkTokens.call(this,ge)),de&&(he=he.concat(de.call(this,ge))),he}}ae&&(ne.extensions=ce),$.setOptions(ne)})},$.walkTokens=function(re,oe){for(var le=[],ne=function(){var de=ae.value;switch(le=le.concat(oe.call($,de)),de.type){case"table":{for(var ge=D(de.header),he;!(he=ge()).done;){var be=he.value;le=le.concat($.walkTokens(be.tokens,oe))}for(var ve=D(de.rows),Ie;!(Ie=ve()).done;)for(var Se=Ie.value,we=D(Se),ye;!(ye=we()).done;){var Re=ye.value;le=le.concat($.walkTokens(Re.tokens,oe))}break}case"list":{le=le.concat($.walkTokens(de.items,oe));break}default:$.defaults.extensions&&$.defaults.extensions.childTokens&&$.defaults.extensions.childTokens[de.type]?$.defaults.extensions.childTokens[de.type].forEach(function(Le){le=le.concat($.walkTokens(de[Le],oe))}):de.tokens&&(le=le.concat($.walkTokens(de.tokens,oe)))}},ce=D(re),ae;!(ae=ce()).done;)ne();return le},$.parseInline=function(re,oe){if(typeof re>"u"||re===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof re!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(re)+", string expected");oe=_({},$.defaults,oe||{}),R(oe);try{var le=B.lexInline(re,oe);return oe.walkTokens&&$.walkTokens(le,oe.walkTokens),G.parseInline(le,oe)}catch(ne){if(ne.message+=` Please report this to https://github.com/markedjs/marked.`,oe.silent)return"<p>An error occurred:</p><pre>"+i(ne.message+"",!0)+"</pre>";throw ne}},$.Parser=G,$.parser=G.parse,$.Renderer=K,$.TextRenderer=H,$.Lexer=B,$.lexer=B.lex,$.Tokenizer=x,$.Slugger=U,$.parse=$;var ie=$.options,J=$.setOptions,j=$.use,ee=$.walkTokens,X=$.parseInline,te=$,Z=G.parse,se=B.lex;q.Lexer=B,q.Parser=G,q.Renderer=K,q.Slugger=U,q.TextRenderer=H,q.Tokenizer=x,q.getDefaults=T,q.lexer=se,q.marked=$,q.options=ie,q.parse=te,q.parseInline=X,q.parser=Z,q.setOptions=J,q.use=j,q.walkTokens=ee,Object.defineProperty(q,"__esModule",{value:!0})}),define(Q[784],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayNavigator=void 0;class t{constructor(b,D=0,T=b.length,f=D-1){this.items=b,this.start=D,this.end=T,this.index=f}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}e.ArrayNavigator=t}),define(Q[1528],Y([1,0,15,784,4]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HeightMap=void 0;class D extends b.Disposable{constructor(){super(...arguments),this.heightMap=[],this.indexes={}}getContentHeight(){let f=this.heightMap[this.heightMap.length-1];return f?f.top+f.height:0}onInsertItems(f,v=null){let m=null,S,h,a,r,i=0;if(v===null)h=0,r=0;else{if(h=this.indexes[v]+1,S=this.heightMap[h-1],!S){(0,t.onUnexpectedError)("view item doesn't exist");return}r=S.top+S.height}const s=h;let o=[];for(;m=f.next();)S=this.createViewItem(m),S.top=r+i,this.indexes[m.id]=h++,o.push(S),i+=S.height;for(this.heightMap.splice(s,0,...o),a=h;a<this.heightMap.length;a++)S=this.heightMap[a],S.top+=i,this.indexes[S.model.id]=a;for(a=o.length-1;a>=0;a--)this.onInsertItem(o[a]);for(a=this.heightMap.length-1;a>=h;a--)this.onRefreshItem(this.heightMap[a]);return i}onInsertItem(f){}onRemoveItems(f){let v=null,m,S=null,h=0,a=0;for(;v=f.next();){if(h=this.indexes[v],m=this.heightMap[h],!m){(0,t.onUnexpectedError)("view item doesn't exist");return}a-=m.height,delete this.indexes[v],this.onRemoveItem(m),S===null&&(S=h)}if(!(a===0||S===null))for(this.heightMap.splice(S,h-S+1),h=S;h<this.heightMap.length;h++)m=this.heightMap[h],m.top+=a,this.indexes[m.model.id]=h,this.onRefreshItem(m)}onRemoveItem(f){}onRefreshItemSet(f){let v=f.sort((m,S)=>this.indexes[m.id]-this.indexes[S.id]);this.onRefreshItems(new y.ArrayNavigator(v))}onRefreshItems(f){let v=null,m,S,h,a=null,r=0;for(;v=f.next();){for(h=this.indexes[v.id];r!==0&&a!==null&&a<h;a++)m=this.heightMap[a],m.top+=r,this.onRefreshItem(m);m=this.heightMap[h],S=v.getHeight(),m.top+=r,r+=S-m.height,m.height=S,this.onRefreshItem(m,!0),a=h+1}if(r!==0&&a!==null)for(;a<this.heightMap.length;a++)m=this.heightMap[a],m.top+=r,this.onRefreshItem(m)}onRefreshItem(f,v=!1){}itemsCount(){return this.heightMap.length}itemAt(f){return this.heightMap[this.indexAt(f)].model.id}withItemsInRange(f,v,m){f=this.indexAt(f),v=this.indexAt(v);for(let S=f;S<=v;S++)m(this.heightMap[S].model.id)}indexAt(f){let v=0,m=this.heightMap.length,S,h;for(;v<m;)if(S=Math.floor((v+m)/2),h=this.heightMap[S],f<h.top)m=S;else if(f>=h.top+h.height){if(v===S)break;v=S}else return S;return this.heightMap.length}indexAfter(f){return Math.min(this.indexAt(f)+1,this.heightMap.length)}itemAtIndex(f){return this.heightMap[f]}itemAfter(f){return this.heightMap[this.indexes[f.model.id]+1]||null}createViewItem(f){throw new Error("not implemented")}dispose(){super.dispose(),this.heightMap=[],this.indexes={}}}e.HeightMap=D}),define(Q[555],Y([1,0,784]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryNavigator2=e.HistoryNavigator=void 0;class y{constructor(T=[],f=10){this._initialize(T),this._limit=f,this._onChange()}getHistory(){return this._elements}add(T){this._history.delete(T),this._history.add(T),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isFirst(){return this._currentPosition()===0}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(T){return this._history.has(T)}clear(){this._initialize([]),this._onChange()}_onChange(){this._reduceToLimit();const T=this._elements;this._navigator=new t.ArrayNavigator(T,0,T.length,T.length)}_reduceToLimit(){const T=this._elements;T.length>this._limit&&this._initialize(T.slice(T.length-this._limit))}_currentPosition(){const T=this._navigator.current();return T?this._elements.indexOf(T):-1}_initialize(T){this._history=new Set;for(const f of T)this._history.add(f)}get _elements(){const T=[];return this._history.forEach(f=>T.push(f)),T}}e.HistoryNavigator=y;class b{constructor(T,f=10){if(this.capacity=f,T.length<1)throw new Error("not supported");this.size=1,this.head=this.tail=this.cursor={value:T[0],previous:void 0,next:void 0},this.valueSet=new Set([T[0]]);for(let v=1;v<T.length;v++)this.add(T[v])}add(T){const f={value:T,previous:this.tail,next:void 0};for(this.tail.next=f,this.tail=f,this.cursor=this.tail,this.size++,this.valueSet.has(T)?this._deleteFromList(T):this.valueSet.add(T);this.size>this.capacity;)this.valueSet.delete(this.head.value),this.head=this.head.next,this.head.previous=void 0,this.size--}replaceLast(T){if(this.tail.value===T)return T;const f=this.tail.value;return this.valueSet.delete(f),this.tail.value=T,this.valueSet.has(T)?this._deleteFromList(T):this.valueSet.add(T),f}isAtEnd(){return this.cursor===this.tail}current(){return this.cursor.value}previous(){return this.cursor.previous&&(this.cursor=this.cursor.previous),this.cursor.value}next(){return this.cursor.next&&(this.cursor=this.cursor.next),this.cursor.value}has(T){return this.valueSet.has(T)}resetCursor(){return this.cursor=this.tail,this.cursor.value}*[Symbol.iterator](){let T=this.head;for(;T;)yield T.value,T=T.next}_deleteFromList(T){let f=this.head;for(;f!==this.tail;)f.value===T&&(f===this.head?(this.head=this.head.next,this.head.previous=void 0):(f.previous.next=f.next,f.next.previous=f.previous),this.size--),f=f.next}}e.HistoryNavigator2=b}),define(Q[226],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlidingWindowAverage=e.MovingAverage=e.Counter=e.rot=e.clamp=void 0;function t(f,v,m){return Math.min(Math.max(f,v),m)}e.clamp=t;function y(f,v){return(v+f%v)%v}e.rot=y;class b{constructor(){this._next=0}getNext(){return this._next++}}e.Counter=b;class D{constructor(){this._n=1,this._val=0}update(v){return this._val=this._val+(v-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}e.MovingAverage=D;class T{constructor(v){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(v),this._values.fill(0,0,v)}update(v){const m=this._values[this._index];return this._values[this._index]=v,this._index=(this._index+1)%this._values.length,this._sum-=m,this._sum+=v,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}e.SlidingWindowAverage=T}),define(Q[556],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConsoleObservableLogger=e.getLogger=e.setLogger=void 0;let t;function y(s){t=s}e.setLogger=y;function b(){return t}e.getLogger=b;class D{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(o){return T([f(r("| ",this.indentation)),o])}formatInfo(o){return o.hadValue?o.didChange?[f(" "),m(S(o.oldValue,70),{color:"red",strikeThrough:!0}),f(" "),m(S(o.newValue,60),{color:"green"})]:[f(" (unchanged)")]:[f(" "),m(S(o.newValue,60),{color:"green"}),f(" (initial)")]}handleObservableChanged(o,u){console.log(...this.textToConsoleArgs([v("observable value changed"),m(o.debugName,{color:"BlueViolet"}),...this.formatInfo(u)]))}formatChanges(o){if(o.size!==0)return m(" (changed deps: "+[...o].map(u=>u.debugName).join(", ")+")",{color:"gray"})}handleDerivedCreated(o){const u=o.handleChange;this.changedObservablesSets.set(o,new Set),o.handleChange=(d,p)=>(this.changedObservablesSets.get(o).add(d),u.apply(o,[d,p]))}handleDerivedRecomputed(o,u){const d=this.changedObservablesSets.get(o);console.log(...this.textToConsoleArgs([v("derived recomputed"),m(o.debugName,{color:"BlueViolet"}),...this.formatInfo(u),this.formatChanges(d),{data:[{fn:o._computeFn}]}])),d.clear()}handleFromEventObservableTriggered(o,u){console.log(...this.textToConsoleArgs([v("observable from event triggered"),m(o.debugName,{color:"BlueViolet"}),...this.formatInfo(u),{data:[{fn:o._getValue}]}]))}handleAutorunCreated(o){const u=o.handleChange;this.changedObservablesSets.set(o,new Set),o.handleChange=(d,p)=>(this.changedObservablesSets.get(o).add(d),u.apply(o,[d,p]))}handleAutorunTriggered(o){const u=this.changedObservablesSets.get(o);console.log(...this.textToConsoleArgs([v("autorun"),m(o.debugName,{color:"BlueViolet"}),this.formatChanges(u),{data:[{fn:o._runFn}]}])),u.clear(),this.indentation++}handleAutorunFinished(o){this.indentation--}handleBeginTransaction(o){let u=o.getDebugName();u===void 0&&(u=""),console.log(...this.textToConsoleArgs([v("transaction"),m(u,{color:"BlueViolet"}),{data:[{fn:o._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}e.ConsoleObservableLogger=D;function T(s){const o=new Array,u=[];let d="";function p(l){if("length"in l)for(const n of l)n&&p(n);else"text"in l?(d+=`%c${l.text}`,o.push(l.style),l.data&&u.push(...l.data)):"data"in l&&u.push(...l.data)}p(s);const c=[d,...o];return c.push(...u),c}function f(s){return m(s,{color:"black"})}function v(s){return m(i(`${s}: `,10),{color:"black",bold:!0})}function m(s,o={color:"black"}){function u(p){return Object.entries(p).reduce((c,[l,n])=>`${c}${l}:${n};`,"")}const d={color:o.color};return o.strikeThrough&&(d["text-decoration"]="line-through"),o.bold&&(d["font-weight"]="bold"),{text:s,style:u(d)}}function S(s,o){switch(typeof s){case"number":return""+s;case"string":return s.length+2<=o?`"${s}"`:`"${s.substr(0,o-7)}"+...`;case"boolean":return s?"true":"false";case"undefined":return"undefined";case"object":return s===null?"null":Array.isArray(s)?h(s,o):a(s,o);case"symbol":return s.toString();case"function":return`[[Function${s.name?" "+s.name:""}]]`;default:return""+s}}function h(s,o){let u="[ ",d=!0;for(const p of s){if(d||(u+=", "),u.length-5>o){u+="...";break}d=!1,u+=`${S(p,o-u.length)}`}return u+=" ]",u}function a(s,o){let u="{ ",d=!0;for(const[p,c]of Object.entries(s)){if(d||(u+=", "),u.length-5>o){u+="...";break}d=!1,u+=`${p}: ${S(c,o-u.length)}`}return u+=" }",u}function r(s,o){let u="";for(let d=1;d<=o;d++)u+=s;return u}function i(s,o){for(;s.length<o;)s+=" ";return s}}),define(Q[649],Y([1,0,556]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisposableObservableValue=e.disposableObservableValue=e.ObservableValue=e.observableValue=e.getFunctionName=e.TransactionImpl=e.subtransaction=e.transaction=e.BaseObservable=e.ConvenientObservable=e._setDerived=void 0;let y;function b(s){y=s}e._setDerived=b;class D{get TChange(){return null}reportChanges(){this.get()}read(o){return o?o.readObservable(this):this.get()}map(o){return y(u=>o(this.read(u),u),()=>{const u=S(o);if(u!==void 0)return u;const p=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(o.toString());return p?`${this.debugName}.${p[2]}`:`${this.debugName} (mapped)`})}}e.ConvenientObservable=D;class T extends D{constructor(){super(...arguments),this.observers=new Set}addObserver(o){const u=this.observers.size;this.observers.add(o),u===0&&this.onFirstObserverAdded()}removeObserver(o){this.observers.delete(o)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}e.BaseObservable=T;function f(s,o){const u=new m(s,o);try{s(u)}finally{u.finish()}}e.transaction=f;function v(s,o,u){s?o(s):f(o,u)}e.subtransaction=v;class m{constructor(o,u){this._fn=o,this._getDebugName=u,this.updatingObservers=[],(0,t.getLogger)()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():S(this._fn)}updateObserver(o,u){this.updatingObservers.push({observer:o,observable:u}),o.beginUpdate(u)}finish(){const o=this.updatingObservers;this.updatingObservers=null;for(const{observer:u,observable:d}of o)u.endUpdate(d);(0,t.getLogger)()?.handleEndTransaction()}}e.TransactionImpl=m;function S(s){const o=s.toString(),d=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(o);return(d?d[1]:void 0)?.trim()}e.getFunctionName=S;function h(s,o){return new a(s,o)}e.observableValue=h;class a extends T{constructor(o,u){super(),this.debugName=o,this._value=u}get(){return this._value}set(o,u,d){if(this._value===o)return;let p;u||(u=p=new m(()=>{},()=>`Setting ${this.debugName}`));try{const c=this._value;this._setValue(o),(0,t.getLogger)()?.handleObservableChanged(this,{oldValue:c,newValue:o,change:d,didChange:!0,hadValue:!0});for(const l of this.observers)u.updateObserver(l,this),l.handleChange(this,d)}finally{p&&p.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(o){this._value=o}}e.ObservableValue=a;function r(s,o){return new i(s,o)}e.disposableObservableValue=r;class i extends a{_setValue(o){this._value!==o&&(this._value&&this._value.dispose(),this._value=o)}dispose(){this._value?.dispose()}}e.DisposableObservableValue=i}),define(Q[1026],Y([1,0,214,4,649,556]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.autorunDelta=e.AutorunObserver=e.autorunWithStore=e.autorunWithStoreHandleChanges=e.autorunHandleChanges=e.autorun=e.autorunOpts=void 0;function T(i,s){return new a(i.debugName,s,void 0,void 0)}e.autorunOpts=T;function f(i){return new a(void 0,i,void 0,void 0)}e.autorun=f;function v(i,s){return new a(i.debugName,s,i.createEmptyChangeSummary,i.handleChange)}e.autorunHandleChanges=v;function m(i,s){const o=new y.DisposableStore,u=v({debugName:i.debugName??(()=>(0,b.getFunctionName)(s)),createEmptyChangeSummary:i.createEmptyChangeSummary,handleChange:i.handleChange},(d,p)=>{o.clear(),s(d,p,o)});return(0,y.toDisposable)(()=>{u.dispose(),o.dispose()})}e.autorunWithStoreHandleChanges=m;function S(i){const s=new y.DisposableStore,o=T({debugName:()=>(0,b.getFunctionName)(i)||"(anonymous)"},u=>{s.clear(),i(u,s)});return(0,y.toDisposable)(()=>{o.dispose(),s.dispose()})}e.autorunWithStore=S;var h;(function(i){i[i.dependenciesMightHaveChanged=1]="dependenciesMightHaveChanged",i[i.stale=2]="stale",i[i.upToDate=3]="upToDate"})(h||(h={}));class a{get debugName(){if(typeof this._debugName=="string")return this._debugName;if(typeof this._debugName=="function"){const o=this._debugName();if(o!==void 0)return o}const s=(0,b.getFunctionName)(this._runFn);return s!==void 0?s:"(anonymous)"}constructor(s,o,u,d){this._debugName=s,this._runFn=o,this.createChangeSummary=u,this._handleChange=d,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=this.createChangeSummary?.(),(0,D.getLogger)()?.handleAutorunCreated(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(const s of this.dependencies)s.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){if(this.state===3)return;const s=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=s,this.state=3;try{if(!this.disposed){(0,D.getLogger)()?.handleAutorunTriggered(this);const o=this.changeSummary;this.changeSummary=this.createChangeSummary?.(),this._runFn(this,o)}}finally{(0,D.getLogger)()?.handleAutorunFinished(this);for(const o of this.dependenciesToBeRemoved)o.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(const s of this.dependencies)if(s.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,(0,t.assertFn)(()=>this.updateCount>=0)}handlePossibleChange(s){this.state===3&&this.dependencies.has(s)&&!this.dependenciesToBeRemoved.has(s)&&(this.state=1)}handleChange(s,o){this.dependencies.has(s)&&!this.dependenciesToBeRemoved.has(s)&&(!this._handleChange||this._handleChange({changedObservable:s,change:o,didChange:d=>d===s},this.changeSummary))&&(this.state=2)}readObservable(s){if(this.disposed)return s.get();s.addObserver(this);const o=s.get();return this.dependencies.add(s),this.dependenciesToBeRemoved.delete(s),o}}e.AutorunObserver=a,function(i){i.Observer=a}(f||(e.autorun=f={}));function r(i,s){let o;return T({debugName:()=>(0,b.getFunctionName)(s)},u=>{const d=i.read(u),p=o;o=d,s({lastValue:p,newValue:d})})}e.autorunDelta=r}),define(Q[1027],Y([1,0,15,4,649,556]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Derived=e.derivedWithStore=e.derivedHandleChanges=e.derivedOpts=e.derived=void 0;const T=(r,i)=>r===i;function f(r,i){return new a(i,r,void 0,void 0,void 0,T)}e.derived=f;function v(r,i){return new a(r.debugName,i,void 0,void 0,void 0,r.equalityComparer??T)}e.derivedOpts=v;function m(r,i,s){return new a(r,s,i.createEmptyChangeSummary,i.handleChange,void 0,T)}e.derivedHandleChanges=m;function S(r,i){const s=new y.DisposableStore;return new a(r,o=>(s.clear(),i(o,s)),void 0,void 0,()=>s.dispose(),T)}e.derivedWithStore=S,(0,b._setDerived)(f);var h;(function(r){r[r.initial=0]="initial",r[r.dependenciesMightHaveChanged=1]="dependenciesMightHaveChanged",r[r.stale=2]="stale",r[r.upToDate=3]="upToDate"})(h||(h={}));class a extends b.BaseObservable{get debugName(){return this._debugName?typeof this._debugName=="function"?this._debugName():this._debugName:(0,b.getFunctionName)(this._computeFn)||"(anonymous)"}constructor(i,s,o,u,d=void 0,p){super(),this._debugName=i,this._computeFn=s,this.createChangeSummary=o,this._handleChange=u,this._handleLastObserverRemoved=d,this._equalityComparator=p,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=this.createChangeSummary?.(),(0,D.getLogger)()?.handleDerivedCreated(this)}onLastObserverRemoved(){this.state=0,this.value=void 0;for(const i of this.dependencies)i.removeObserver(this);this.dependencies.clear(),this._handleLastObserverRemoved?.()}get(){if(this.observers.size===0){const i=this._computeFn(this,this.createChangeSummary?.());return this.onLastObserverRemoved(),i}else{do{if(this.state===1){for(const i of this.dependencies)if(i.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){if(this.state===3)return;const i=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=i;const s=this.state!==0,o=this.value;this.state=3;const u=this.changeSummary;this.changeSummary=this.createChangeSummary?.();try{this.value=this._computeFn(this,u)}finally{for(const p of this.dependenciesToBeRemoved)p.removeObserver(this);this.dependenciesToBeRemoved.clear()}const d=s&&!this._equalityComparator(o,this.value);if((0,D.getLogger)()?.handleDerivedRecomputed(this,{oldValue:o,newValue:this.value,change:void 0,didChange:d,hadValue:s}),d)for(const p of this.observers)p.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(i){this.updateCount++;const s=this.updateCount===1;if(this.state===3&&(this.state=1,!s))for(const o of this.observers)o.handlePossibleChange(this);if(s)for(const o of this.observers)o.beginUpdate(this)}endUpdate(i){if(this.updateCount--,this.updateCount===0){const s=[...this.observers];for(const o of s)o.endUpdate(this)}if(this.updateCount<0)throw new t.BugIndicatingError}handlePossibleChange(i){if(this.state===3&&this.dependencies.has(i)&&!this.dependenciesToBeRemoved.has(i)){this.state=1;for(const s of this.observers)s.handlePossibleChange(this)}}handleChange(i,s){if(this.dependencies.has(i)&&!this.dependenciesToBeRemoved.has(i)){const o=this._handleChange?this._handleChange({changedObservable:i,change:s,didChange:d=>d===i},this.changeSummary):!0,u=this.state===3;if(o&&(this.state===1||u)&&(this.state=2,u))for(const d of this.observers)d.handlePossibleChange(this)}}readObservable(i){i.addObserver(this);const s=i.get();return this.dependencies.add(i),this.dependenciesToBeRemoved.delete(i),s}addObserver(i){const s=!this.observers.has(i)&&this.updateCount>0;super.addObserver(i),s&&i.beginUpdate(this)}removeObserver(i){const s=this.observers.has(i)&&this.updateCount>0;super.removeObserver(i),s&&i.endUpdate(this)}}e.Derived=a}),define(Q[1529],Y([1,0,4,1026,649,1027,556]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.derivedObservableWithWritableCache=e.derivedObservableWithCache=e.keepAlive=e.wasEventTriggeredRecently=e.debouncedObservable=e.observableSignal=e.observableSignalFromEvent=e.FromEventObservable=e.observableFromEvent=e.waitForState=e.observableFromPromise=e.constObservable=void 0;function f(g){return new v(g)}e.constObservable=f;class v extends b.ConvenientObservable{constructor(w){super(),this.value=w}get debugName(){return this.toString()}get(){return this.value}addObserver(w){}removeObserver(w){}toString(){return`Const: ${this.value}`}}function m(g){const w=(0,b.observableValue)("promiseValue",{});return g.then(E=>{w.set({value:E},void 0)}),w}e.observableFromPromise=m;function S(g,w){return new Promise(E=>{let C=!1,I=!1;const _=(0,y.autorun)(A=>{const k=g.read(A);w(k)&&(C?_.dispose():I=!0,E(k))});C=!0,I&&_.dispose()})}e.waitForState=S;function h(g,w){return new a(g,w)}e.observableFromEvent=h;class a extends b.BaseObservable{constructor(w,E){super(),this.event=w,this._getValue=E,this.hasValue=!1,this.handleEvent=C=>{const I=this._getValue(C),_=!this.hasValue||this.value!==I;(0,T.getLogger)()?.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:I,change:void 0,didChange:_,hadValue:this.hasValue}),_&&(this.value=I,this.hasValue&&(0,b.transaction)(A=>{for(const k of this.observers)A.updateObserver(k,this),k.handleChange(this,void 0)},()=>{const A=this.getDebugName();return"Event fired"+(A?`: ${A}`:"")}),this.hasValue=!0)}}getDebugName(){return(0,b.getFunctionName)(this._getValue)}get debugName(){const w=this.getDebugName();return"From Event"+(w?`: ${w}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}e.FromEventObservable=a,function(g){g.Observer=a}(h||(e.observableFromEvent=h={}));function r(g,w){return new i(g,w)}e.observableSignalFromEvent=r;class i extends b.BaseObservable{constructor(w,E){super(),this.debugName=w,this.event=E,this.handleEvent=()=>{(0,b.transaction)(C=>{for(const I of this.observers)C.updateObserver(I,this),I.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function s(g){return new o(g)}e.observableSignal=s;class o extends b.BaseObservable{constructor(w){super(),this.debugName=w}trigger(w,E){if(!w){(0,b.transaction)(C=>{this.trigger(C,E)},()=>`Trigger signal ${this.debugName}`);return}for(const C of this.observers)w.updateObserver(C,this),C.handleChange(this,E)}get(){}}function u(g,w,E){const C=(0,b.observableValue)("debounced",void 0);let I;return E.add((0,y.autorun)(_=>{const A=g.read(_);I&&clearTimeout(I),I=setTimeout(()=>{(0,b.transaction)(k=>{C.set(A,k)})},w)})),C}e.debouncedObservable=u;function d(g,w,E){const C=(0,b.observableValue)("triggeredRecently",!1);let I;return E.add(g(()=>{C.set(!0,void 0),I&&clearTimeout(I),I=setTimeout(()=>{C.set(!1,void 0)},w)})),C}e.wasEventTriggeredRecently=d;function p(g,w){const E=new c(w??!1);return g.addObserver(E),w&&g.reportChanges(),(0,t.toDisposable)(()=>{g.removeObserver(E)})}e.keepAlive=p;class c{constructor(w){this.forceRecompute=w,this.counter=0}beginUpdate(w){this.counter++}endUpdate(w){this.counter--,this.counter===0&&this.forceRecompute&&w.reportChanges()}handlePossibleChange(w){}handleChange(w,E){}}function l(g,w){let E;return(0,D.derived)(I=>(E=w(I,E),E),g)}e.derivedObservableWithCache=l;function n(g,w){let E;const C=(0,b.observableValue)("derivedObservableWithWritableCache.counter",0),I=(0,D.derived)(_=>(C.read(_),E=w(_,E),E),g);return Object.assign(I,{clearCache:_=>{E=void 0,C.set(C.get()+1,_)}})}e.derivedObservableWithWritableCache=n}),define(Q[109],Y([1,0,649,1027,1026,1529,556]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wasEventTriggeredRecently=e.waitForState=e.observableSignalFromEvent=e.observableSignal=e.observableFromPromise=e.observableFromEvent=e.keepAlive=e.derivedObservableWithWritableCache=e.derivedObservableWithCache=e.debouncedObservable=e.constObservable=e.autorunWithStoreHandleChanges=e.autorunOpts=e.autorunWithStore=e.autorunHandleChanges=e.autorunDelta=e.autorun=e.derivedWithStore=e.derivedHandleChanges=e.derivedOpts=e.derived=e.subtransaction=e.transaction=e.disposableObservableValue=e.observableValue=void 0,Object.defineProperty(e,"observableValue",{enumerable:!0,get:function(){return t.observableValue}}),Object.defineProperty(e,"disposableObservableValue",{enumerable:!0,get:function(){return t.disposableObservableValue}}),Object.defineProperty(e,"transaction",{enumerable:!0,get:function(){return t.transaction}}),Object.defineProperty(e,"subtransaction",{enumerable:!0,get:function(){return t.subtransaction}}),Object.defineProperty(e,"derived",{enumerable:!0,get:function(){return y.derived}}),Object.defineProperty(e,"derivedOpts",{enumerable:!0,get:function(){return y.derivedOpts}}),Object.defineProperty(e,"derivedHandleChanges",{enumerable:!0,get:function(){return y.derivedHandleChanges}}),Object.defineProperty(e,"derivedWithStore",{enumerable:!0,get:function(){return y.derivedWithStore}}),Object.defineProperty(e,"autorun",{enumerable:!0,get:function(){return b.autorun}}),Object.defineProperty(e,"autorunDelta",{enumerable:!0,get:function(){return b.autorunDelta}}),Object.defineProperty(e,"autorunHandleChanges",{enumerable:!0,get:function(){return b.autorunHandleChanges}}),Object.defineProperty(e,"autorunWithStore",{enumerable:!0,get:function(){return b.autorunWithStore}}),Object.defineProperty(e,"autorunOpts",{enumerable:!0,get:function(){return b.autorunOpts}}),Object.defineProperty(e,"autorunWithStoreHandleChanges",{enumerable:!0,get:function(){return b.autorunWithStoreHandleChanges}}),Object.defineProperty(e,"constObservable",{enumerable:!0,get:function(){return D.constObservable}}),Object.defineProperty(e,"debouncedObservable",{enumerable:!0,get:function(){return D.debouncedObservable}}),Object.defineProperty(e,"derivedObservableWithCache",{enumerable:!0,get:function(){return D.derivedObservableWithCache}}),Object.defineProperty(e,"derivedObservableWithWritableCache",{enumerable:!0,get:function(){return D.derivedObservableWithWritableCache}}),Object.defineProperty(e,"keepAlive",{enumerable:!0,get:function(){return D.keepAlive}}),Object.defineProperty(e,"observableFromEvent",{enumerable:!0,get:function(){return D.observableFromEvent}}),Object.defineProperty(e,"observableFromPromise",{enumerable:!0,get:function(){return D.observableFromPromise}}),Object.defineProperty(e,"observableSignal",{enumerable:!0,get:function(){return D.observableSignal}}),Object.defineProperty(e,"observableSignalFromEvent",{enumerable:!0,get:function(){return D.observableSignalFromEvent}}),Object.defineProperty(e,"waitForState",{enumerable:!0,get:function(){return D.waitForState}}),Object.defineProperty(e,"wasEventTriggeredRecently",{enumerable:!0,get:function(){return D.wasEventTriggeredRecently}}),!1&&(0,T.setLogger)(new T.ConsoleObservableLogger)}),define(Q[1028],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=e.ValidationStatus=e.ValidationState=void 0;var t;(function(D){D[D.OK=0]="OK",D[D.Info=1]="Info",D[D.Warning=2]="Warning",D[D.Error=3]="Error",D[D.Fatal=4]="Fatal"})(t||(e.ValidationState=t={}));class y{constructor(){this._state=0}get state(){return this._state}set state(T){T>this._state&&(this._state=T)}isOK(){return this._state===0}isFatal(){return this._state===4}}e.ValidationStatus=y;class b{constructor(T){this._problemReporter=T}reset(){this._problemReporter.status.state=0}get problemReporter(){return this._problemReporter}info(T){this._problemReporter.info(T)}warn(T){this._problemReporter.warn(T)}error(T){this._problemReporter.error(T)}fatal(T){this._problemReporter.fatal(T)}}e.Parser=b}),function(){function q(b){const D=[];typeof b=="number"&&D.push("code/timeOrigin",b);function T(v){D.push(v,Date.now())}function f(){const v=[];for(let m=0;m<D.length;m+=2)v.push({name:D[m],startTime:D[m+1]});return v}return{mark:T,getMarks:f}}function e(){if(typeof performance=="object"&&typeof performance.mark=="function"&&!performance.nodeTiming)return typeof performance.timeOrigin!="number"&&!performance.timing?q():{mark(b){performance.mark(b)},getMarks(){let b=performance.timeOrigin;typeof b!="number"&&(b=performance.timing.navigationStart||performance.timing.redirectStart||performance.timing.fetchStart);const D=[{name:"code/timeOrigin",startTime:Math.round(b)}];for(const T of performance.getEntriesByType("mark"))D.push({name:T.name,startTime:Math.round(b+T.startTime)});return D}};if(typeof process=="object"){const b=performance?.timeOrigin??Math.round((require.__$__nodeRequire||require)("perf_hooks").performance.timeOrigin);return q(b)}else return console.trace("perf-util loaded in UNKNOWN environment"),q()}function t(b){return b.MonacoPerformanceMarks||(b.MonacoPerformanceMarks=e()),b.MonacoPerformanceMarks}var y;typeof global=="object"?y=global:typeof self=="object"?y=self:y={},typeof define=="function"?define("vs/base/common/performance",[],function(){return t(y)}):typeof module=="object"&&typeof module.exports=="object"?module.exports=t(y):(console.trace("perf-util defined in UNKNOWN context (neither requirejs or commonjs)"),y.perf=t(y))}(),define(Q[1029],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomPort=void 0;function t(){return 1025+Math.floor((65535-1025)*Math.random())}e.randomPort=t}),define(Q[1030],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WellDefinedPrefixTree=void 0;const t=Symbol("unset");class y{constructor(){this.root=new b,this._size=0}get size(){return this._size}insert(T,f){this.opNode(T,v=>v.value=f)}mutate(T,f){this.opNode(T,v=>v.value=f(v.value===t?void 0:v.value))}delete(T){const f=[{part:"",node:this.root}];let v=0;for(const S of T){const h=f[v].node.children?.get(S);if(!h)return;f.push({part:S,node:h}),v++}const m=f[v].node.value;if(m!==t){for(this._size--;v>0;v--){const S=f[v-1];if(S.node.children.delete(f[v].part),S.node.children.size>0||S.node.value!==t)break}return m}}find(T){let f=this.root;for(const v of T){const m=f.children?.get(v);if(!m)return;f=m}return f.value===t?void 0:f.value}hasKeyOrParent(T){let f=this.root;for(const v of T){const m=f.children?.get(v);if(!m)return!1;if(m.value!==t)return!0;f=m}return!1}hasKeyOrChildren(T){let f=this.root;for(const v of T){const m=f.children?.get(v);if(!m)return!1;f=m}return!0}hasKey(T){let f=this.root;for(const v of T){const m=f.children?.get(v);if(!m)return!1;f=m}return f.value!==t}opNode(T,f){let v=this.root;for(const m of T)if(v.children)if(v.children.has(m))v=v.children.get(m);else{const S=new b;v.children.set(m,S),v=S}else{const S=new b;v.children=new Map([[m,S]]),v=S}v.value===t&&this._size++,f(v)}*values(){const T=[this.root];for(;T.length>0;){const f=T.pop();if(f.value!==t&&(yield f.value),f.children)for(const v of f.children.values())T.push(v)}}}e.WellDefinedPrefixTree=y;class b{constructor(){this.value=t}}}),define(Q[557],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;var t;(function(y){function b(v,m){if(v.start>=m.end||m.start>=v.end)return{start:0,end:0};const S=Math.max(v.start,m.start),h=Math.min(v.end,m.end);return h-S<=0?{start:0,end:0}:{start:S,end:h}}y.intersect=b;function D(v){return v.end-v.start<=0}y.isEmpty=D;function T(v,m){return!D(b(v,m))}y.intersects=T;function f(v,m){const S=[],h={start:v.start,end:Math.min(m.start,v.end)},a={start:Math.max(m.end,v.start),end:v.end};return D(h)||S.push(h),D(a)||S.push(a),S}y.relativeComplement=f})(t||(e.Range=t={}))}),define(Q[1031],Y([1,0,557]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMap=e.consolidate=e.shift=e.groupIntersect=void 0;function y(v,m){const S=[];for(const h of m){if(v.start>=h.range.end)continue;if(v.end<h.range.start)break;const a=t.Range.intersect(v,h.range);t.Range.isEmpty(a)||S.push({range:a,size:h.size})}return S}e.groupIntersect=y;function b({start:v,end:m},S){return{start:v+S,end:m+S}}e.shift=b;function D(v){const m=[];let S=null;for(const h of v){const a=h.range.start,r=h.range.end,i=h.size;if(S&&i===S.size){S.range.end=r;continue}S={range:{start:a,end:r},size:i},m.push(S)}return m}e.consolidate=D;function T(...v){return D(v.reduce((m,S)=>m.concat(S),[]))}class f{get paddingTop(){return this._paddingTop}set paddingTop(m){this._size=this._size+m-this._paddingTop,this._paddingTop=m}constructor(m){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=m??0,this._size=this._paddingTop}splice(m,S,h=[]){const a=h.length-S,r=y({start:0,end:m},this.groups),i=y({start:m+S,end:Number.POSITIVE_INFINITY},this.groups).map(o=>({range:b(o.range,a),size:o.size})),s=h.map((o,u)=>({range:{start:m+u,end:m+u+1},size:o.size}));this.groups=T(r,s,i),this._size=this._paddingTop+this.groups.reduce((o,u)=>o+u.size*(u.range.end-u.range.start),0)}get count(){const m=this.groups.length;return m?this.groups[m-1].range.end:0}get size(){return this._size}indexAt(m){if(m<0)return-1;if(m<this._paddingTop)return 0;let S=0,h=this._paddingTop;for(const a of this.groups){const r=a.range.end-a.range.start,i=h+r*a.size;if(m<i)return S+Math.floor((m-h)/a.size);S+=r,h=i}return S}indexAfter(m){return Math.min(this.indexAt(m)+1,this.count)}positionAt(m){if(m<0)return-1;let S=0,h=0;for(const a of this.groups){const r=a.range.end-a.range.start,i=h+r;if(m<i)return this._paddingTop+S+(m-h)*a.size;S+=r*a.size,h=i}return-1}}e.RangeMap=f}),function(q,e){if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define("vs/base/common/semver/semver",[],e);else{var t=e();for(var y in t)(typeof exports=="object"?exports:q)[y]=t[y]}}(typeof self<"u"?self:this,function(){return function(q){var e={};function t(y){if(e[y])return e[y].exports;var b=e[y]={i:y,l:!1,exports:{}};return q[y].call(b.exports,b,b.exports,t),b.l=!0,b.exports}return t.m=q,t.c=e,t.d=function(y,b,D){t.o(y,b)||Object.defineProperty(y,b,{enumerable:!0,get:D})},t.r=function(y){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},t.t=function(y,b){if(1&b&&(y=t(y)),8&b||4&b&&typeof y=="object"&&y&&y.__esModule)return y;var D=Object.create(null);if(t.r(D),Object.defineProperty(D,"default",{enumerable:!0,value:y}),2&b&&typeof y!="string")for(var T in y)t.d(D,T,function(f){return y[f]}.bind(null,T));return D},t.n=function(y){var b=y&&y.__esModule?function(){return y.default}:function(){return y};return t.d(b,"a",b),b},t.o=function(y,b){return Object.prototype.hasOwnProperty.call(y,b)},t.p="",t(t.s=0)}([function(q,e,t){(function(y){var b;e=q.exports=j,b=typeof y=="object"&&y.env&&y.env.NODE_DEBUG&&/\bsemver\b/i.test(y.env.NODE_DEBUG)?function(){var Se=Array.prototype.slice.call(arguments,0);Se.unshift("SEMVER"),console.log.apply(console,Se)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var D=256,T=Number.MAX_SAFE_INTEGER||9007199254740991,f=e.re=[],v=e.src=[],m=0,S=m++;v[S]="0|[1-9]\\d*";var h=m++;v[h]="[0-9]+";var a=m++;v[a]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var r=m++;v[r]="("+v[S]+")\\.("+v[S]+")\\.("+v[S]+")";var i=m++;v[i]="("+v[h]+")\\.("+v[h]+")\\.("+v[h]+")";var s=m++;v[s]="(?:"+v[S]+"|"+v[a]+")";var o=m++;v[o]="(?:"+v[h]+"|"+v[a]+")";var u=m++;v[u]="(?:-("+v[s]+"(?:\\."+v[s]+")*))";var d=m++;v[d]="(?:-?("+v[o]+"(?:\\."+v[o]+")*))";var p=m++;v[p]="[0-9A-Za-z-]+";var c=m++;v[c]="(?:\\+("+v[p]+"(?:\\."+v[p]+")*))";var l=m++,n="v?"+v[r]+v[u]+"?"+v[c]+"?";v[l]="^"+n+"$";var g="[v=\\s]*"+v[i]+v[d]+"?"+v[c]+"?",w=m++;v[w]="^"+g+"$";var E=m++;v[E]="((?:<|>)?=?)";var C=m++;v[C]=v[h]+"|x|X|\\*";var I=m++;v[I]=v[S]+"|x|X|\\*";var _=m++;v[_]="[v=\\s]*("+v[I]+")(?:\\.("+v[I]+")(?:\\.("+v[I]+")(?:"+v[u]+")?"+v[c]+"?)?)?";var A=m++;v[A]="[v=\\s]*("+v[C]+")(?:\\.("+v[C]+")(?:\\.("+v[C]+")(?:"+v[d]+")?"+v[c]+"?)?)?";var k=m++;v[k]="^"+v[E]+"\\s*"+v[_]+"$";var L=m++;v[L]="^"+v[E]+"\\s*"+v[A]+"$";var R=m++;v[R]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var M=m++;v[M]="(?:~>?)";var N=m++;v[N]="(\\s*)"+v[M]+"\\s+",f[N]=new RegExp(v[N],"g");var P=m++;v[P]="^"+v[M]+v[_]+"$";var x=m++;v[x]="^"+v[M]+v[A]+"$";var F=m++;v[F]="(?:\\^)";var V=m++;v[V]="(\\s*)"+v[F]+"\\s+",f[V]=new RegExp(v[V],"g");var W=m++;v[W]="^"+v[F]+v[_]+"$";var z=m++;v[z]="^"+v[F]+v[A]+"$";var B=m++;v[B]="^"+v[E]+"\\s*("+g+")$|^$";var K=m++;v[K]="^"+v[E]+"\\s*("+n+")$|^$";var H=m++;v[H]="(\\s*)"+v[E]+"\\s*("+g+"|"+v[_]+")",f[H]=new RegExp(v[H],"g");var U=m++;v[U]="^\\s*("+v[_]+")\\s+-\\s+("+v[_]+")\\s*$";var G=m++;v[G]="^\\s*("+v[A]+")\\s+-\\s+("+v[A]+")\\s*$";var $=m++;v[$]="(<|>)?=?\\s*\\*";for(var ie=0;ie<35;ie++)b(ie,v[ie]),f[ie]||(f[ie]=new RegExp(v[ie]));function J(Se,we){if(Se instanceof j)return Se;if(typeof Se!="string"||Se.length>D||!(we?f[w]:f[l]).test(Se))return null;try{return new j(Se,we)}catch{return null}}function j(Se,we){if(Se instanceof j){if(Se.loose===we)return Se;Se=Se.version}else if(typeof Se!="string")throw new TypeError("Invalid Version: "+Se);if(Se.length>D)throw new TypeError("version is longer than "+D+" characters");if(!(this instanceof j))return new j(Se,we);b("SemVer",Se,we),this.loose=we;var ye=Se.trim().match(we?f[w]:f[l]);if(!ye)throw new TypeError("Invalid Version: "+Se);if(this.raw=Se,this.major=+ye[1],this.minor=+ye[2],this.patch=+ye[3],this.major>T||this.major<0)throw new TypeError("Invalid major version");if(this.minor>T||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>T||this.patch<0)throw new TypeError("Invalid patch version");ye[4]?this.prerelease=ye[4].split(".").map(function(Re){if(/^[0-9]+$/.test(Re)){var Le=+Re;if(Le>=0&&Le<T)return Le}return Re}):this.prerelease=[],this.build=ye[5]?ye[5].split("."):[],this.format()}e.parse=J,e.valid=function(Se,we){var ye=J(Se,we);return ye?ye.version:null},e.clean=function(Se,we){var ye=J(Se.trim().replace(/^[=v]+/,""),we);return ye?ye.version:null},e.SemVer=j,j.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},j.prototype.toString=function(){return this.version},j.prototype.compare=function(Se){return b("SemVer.compare",this.version,this.loose,Se),Se instanceof j||(Se=new j(Se,this.loose)),this.compareMain(Se)||this.comparePre(Se)},j.prototype.compareMain=function(Se){return Se instanceof j||(Se=new j(Se,this.loose)),X(this.major,Se.major)||X(this.minor,Se.minor)||X(this.patch,Se.patch)},j.prototype.comparePre=function(Se){if(Se instanceof j||(Se=new j(Se,this.loose)),this.prerelease.length&&!Se.prerelease.length)return-1;if(!this.prerelease.length&&Se.prerelease.length)return 1;if(!this.prerelease.length&&!Se.prerelease.length)return 0;var we=0;do{var ye=this.prerelease[we],Re=Se.prerelease[we];if(b("prerelease compare",we,ye,Re),ye===void 0&&Re===void 0)return 0;if(Re===void 0)return 1;if(ye===void 0)return-1;if(ye!==Re)return X(ye,Re)}while(++we)},j.prototype.inc=function(Se,we){switch(Se){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",we);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",we);break;case"prepatch":this.prerelease.length=0,this.inc("patch",we),this.inc("pre",we);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",we),this.inc("pre",we);break;case"major":this.minor===0&&this.patch===0&&this.prerelease.length!==0||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":this.patch===0&&this.prerelease.length!==0||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var ye=this.prerelease.length;--ye>=0;)typeof this.prerelease[ye]=="number"&&(this.prerelease[ye]++,ye=-2);ye===-1&&this.prerelease.push(0)}we&&(this.prerelease[0]===we?isNaN(this.prerelease[1])&&(this.prerelease=[we,0]):this.prerelease=[we,0]);break;default:throw new Error("invalid increment argument: "+Se)}return this.format(),this.raw=this.version,this},e.inc=function(Se,we,ye,Re){typeof ye=="string"&&(Re=ye,ye=void 0);try{return new j(Se,ye).inc(we,Re).version}catch{return null}},e.diff=function(Se,we){if(re(Se,we))return null;var ye=J(Se),Re=J(we);if(ye.prerelease.length||Re.prerelease.length){for(var Le in ye)if((Le==="major"||Le==="minor"||Le==="patch")&&ye[Le]!==Re[Le])return"pre"+Le;return"prerelease"}for(var Le in ye)if((Le==="major"||Le==="minor"||Le==="patch")&&ye[Le]!==Re[Le])return Le},e.compareIdentifiers=X;var ee=/^[0-9]+$/;function X(Se,we){var ye=ee.test(Se),Re=ee.test(we);return ye&&Re&&(Se=+Se,we=+we),ye&&!Re?-1:Re&&!ye?1:Se<we?-1:Se>we?1:0}function te(Se,we,ye){return new j(Se,ye).compare(new j(we,ye))}function Z(Se,we,ye){return te(Se,we,ye)>0}function se(Se,we,ye){return te(Se,we,ye)<0}function re(Se,we,ye){return te(Se,we,ye)===0}function oe(Se,we,ye){return te(Se,we,ye)!==0}function le(Se,we,ye){return te(Se,we,ye)>=0}function ne(Se,we,ye){return te(Se,we,ye)<=0}function ce(Se,we,ye,Re){var Le;switch(we){case"===":typeof Se=="object"&&(Se=Se.version),typeof ye=="object"&&(ye=ye.version),Le=Se===ye;break;case"!==":typeof Se=="object"&&(Se=Se.version),typeof ye=="object"&&(ye=ye.version),Le=Se!==ye;break;case"":case"=":case"==":Le=re(Se,ye,Re);break;case"!=":Le=oe(Se,ye,Re);break;case">":Le=Z(Se,ye,Re);break;case">=":Le=le(Se,ye,Re);break;case"<":Le=se(Se,ye,Re);break;case"<=":Le=ne(Se,ye,Re);break;default:throw new TypeError("Invalid operator: "+we)}return Le}function ae(Se,we){if(Se instanceof ae){if(Se.loose===we)return Se;Se=Se.value}if(!(this instanceof ae))return new ae(Se,we);b("comparator",Se,we),this.loose=we,this.parse(Se),this.semver===ue?this.value="":this.value=this.operator+this.semver.version,b("comp",this)}e.rcompareIdentifiers=function(Se,we){return X(we,Se)},e.major=function(Se,we){return new j(Se,we).major},e.minor=function(Se,we){return new j(Se,we).minor},e.patch=function(Se,we){return new j(Se,we).patch},e.compare=te,e.compareLoose=function(Se,we){return te(Se,we,!0)},e.rcompare=function(Se,we,ye){return te(we,Se,ye)},e.sort=function(Se,we){return Se.sort(function(ye,Re){return e.compare(ye,Re,we)})},e.rsort=function(Se,we){return Se.sort(function(ye,Re){return e.rcompare(ye,Re,we)})},e.gt=Z,e.lt=se,e.eq=re,e.neq=oe,e.gte=le,e.lte=ne,e.cmp=ce,e.Comparator=ae;var ue={};function de(Se,we){if(Se instanceof de)return Se.loose===we?Se:new de(Se.raw,we);if(Se instanceof ae)return new de(Se.value,we);if(!(this instanceof de))return new de(Se,we);if(this.loose=we,this.raw=Se,this.set=Se.split(/\s*\|\|\s*/).map(function(ye){return this.parseRange(ye.trim())},this).filter(function(ye){return ye.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+Se);this.format()}function ge(Se){return!Se||Se.toLowerCase()==="x"||Se==="*"}function he(Se,we,ye,Re,Le,Pe,Ae,Me,Oe,De,Ce,_e,me){return((we=ge(ye)?"":ge(Re)?">="+ye+".0.0":ge(Le)?">="+ye+"."+Re+".0":">="+we)+" "+(Me=ge(Oe)?"":ge(De)?"<"+(+Oe+1)+".0.0":ge(Ce)?"<"+Oe+"."+(+De+1)+".0":_e?"<="+Oe+"."+De+"."+Ce+"-"+_e:"<="+Me)).trim()}function be(Se,we){for(var ye=0;ye<Se.length;ye++)if(!Se[ye].test(we))return!1;if(we.prerelease.length){for(ye=0;ye<Se.length;ye++)if(b(Se[ye].semver),Se[ye].semver!==ue&&Se[ye].semver.prerelease.length>0){var Re=Se[ye].semver;if(Re.major===we.major&&Re.minor===we.minor&&Re.patch===we.patch)return!0}return!1}return!0}function ve(Se,we,ye){try{we=new de(we,ye)}catch{return!1}return we.test(Se)}function Ie(Se,we,ye,Re){var Le,Pe,Ae,Me,Oe;switch(Se=new j(Se,Re),we=new de(we,Re),ye){case">":Le=Z,Pe=ne,Ae=se,Me=">",Oe=">=";break;case"<":Le=se,Pe=le,Ae=Z,Me="<",Oe="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ve(Se,we,Re))return!1;for(var De=0;De<we.set.length;++De){var Ce=we.set[De],_e=null,me=null;if(Ce.forEach(function(ke){ke.semver===ue&&(ke=new ae(">=0.0.0")),_e=_e||ke,me=me||ke,Le(ke.semver,_e.semver,Re)?_e=ke:Ae(ke.semver,me.semver,Re)&&(me=ke)}),_e.operator===Me||_e.operator===Oe||(!me.operator||me.operator===Me)&&Pe(Se,me.semver)||me.operator===Oe&&Ae(Se,me.semver))return!1}return!0}ae.prototype.parse=function(Se){var we=this.loose?f[B]:f[K],ye=Se.match(we);if(!ye)throw new TypeError("Invalid comparator: "+Se);this.operator=ye[1],this.operator==="="&&(this.operator=""),ye[2]?this.semver=new j(ye[2],this.loose):this.semver=ue},ae.prototype.toString=function(){return this.value},ae.prototype.test=function(Se){return b("Comparator.test",Se,this.loose),this.semver===ue||(typeof Se=="string"&&(Se=new j(Se,this.loose)),ce(Se,this.operator,this.semver,this.loose))},ae.prototype.intersects=function(Se,we){if(!(Se instanceof ae))throw new TypeError("a Comparator is required");var ye;if(this.operator==="")return ye=new de(Se.value,we),ve(this.value,ye,we);if(Se.operator==="")return ye=new de(this.value,we),ve(Se.semver,ye,we);var Re=!(this.operator!==">="&&this.operator!==">"||Se.operator!==">="&&Se.operator!==">"),Le=!(this.operator!=="<="&&this.operator!=="<"||Se.operator!=="<="&&Se.operator!=="<"),Pe=this.semver.version===Se.semver.version,Ae=!(this.operator!==">="&&this.operator!=="<="||Se.operator!==">="&&Se.operator!=="<="),Me=ce(this.semver,"<",Se.semver,we)&&(this.operator===">="||this.operator===">")&&(Se.operator==="<="||Se.operator==="<"),Oe=ce(this.semver,">",Se.semver,we)&&(this.operator==="<="||this.operator==="<")&&(Se.operator===">="||Se.operator===">");return Re||Le||Pe&&Ae||Me||Oe},e.Range=de,de.prototype.format=function(){return this.range=this.set.map(function(Se){return Se.join(" ").trim()}).join("||").trim(),this.range},de.prototype.toString=function(){return this.range},de.prototype.parseRange=function(Se){var we=this.loose;Se=Se.trim(),b("range",Se,we);var ye=we?f[G]:f[U];Se=Se.replace(ye,he),b("hyphen replace",Se),Se=Se.replace(f[H],"$1$2$3"),b("comparator trim",Se,f[H]),Se=(Se=(Se=Se.replace(f[N],"$1~")).replace(f[V],"$1^")).split(/\s+/).join(" ");var Re=we?f[B]:f[K],Le=Se.split(" ").map(function(Pe){return function(Ae,Me){return b("comp",Ae),Ae=function(Oe,De){return Oe.trim().split(/\s+/).map(function(Ce){return function(_e,me){b("caret",_e,me);var ke=me?f[z]:f[W];return _e.replace(ke,function(Ee,pe,Te,Ne,xe){var Ve;return b("caret",_e,Ee,pe,Te,Ne,xe),ge(pe)?Ve="":ge(Te)?Ve=">="+pe+".0.0 <"+(+pe+1)+".0.0":ge(Ne)?Ve=pe==="0"?">="+pe+"."+Te+".0 <"+pe+"."+(+Te+1)+".0":">="+pe+"."+Te+".0 <"+(+pe+1)+".0.0":xe?(b("replaceCaret pr",xe),xe.charAt(0)!=="-"&&(xe="-"+xe),Ve=pe==="0"?Te==="0"?">="+pe+"."+Te+"."+Ne+xe+" <"+pe+"."+Te+"."+(+Ne+1):">="+pe+"."+Te+"."+Ne+xe+" <"+pe+"."+(+Te+1)+".0":">="+pe+"."+Te+"."+Ne+xe+" <"+(+pe+1)+".0.0"):(b("no pr"),Ve=pe==="0"?Te==="0"?">="+pe+"."+Te+"."+Ne+" <"+pe+"."+Te+"."+(+Ne+1):">="+pe+"."+Te+"."+Ne+" <"+pe+"."+(+Te+1)+".0":">="+pe+"."+Te+"."+Ne+" <"+(+pe+1)+".0.0"),b("caret return",Ve),Ve})}(Ce,De)}).join(" ")}(Ae,Me),b("caret",Ae),Ae=function(Oe,De){return Oe.trim().split(/\s+/).map(function(Ce){return function(_e,me){var ke=me?f[x]:f[P];return _e.replace(ke,function(Ee,pe,Te,Ne,xe){var Ve;return b("tilde",_e,Ee,pe,Te,Ne,xe),ge(pe)?Ve="":ge(Te)?Ve=">="+pe+".0.0 <"+(+pe+1)+".0.0":ge(Ne)?Ve=">="+pe+"."+Te+".0 <"+pe+"."+(+Te+1)+".0":xe?(b("replaceTilde pr",xe),xe.charAt(0)!=="-"&&(xe="-"+xe),Ve=">="+pe+"."+Te+"."+Ne+xe+" <"+pe+"."+(+Te+1)+".0"):Ve=">="+pe+"."+Te+"."+Ne+" <"+pe+"."+(+Te+1)+".0",b("tilde return",Ve),Ve})}(Ce,De)}).join(" ")}(Ae,Me),b("tildes",Ae),Ae=function(Oe,De){return b("replaceXRanges",Oe,De),Oe.split(/\s+/).map(function(Ce){return function(_e,me){_e=_e.trim();var ke=me?f[L]:f[k];return _e.replace(ke,function(Ee,pe,Te,Ne,xe,Ve){b("xRange",_e,Ee,pe,Te,Ne,xe,Ve);var Fe=ge(Te),Be=Fe||ge(Ne),He=Be||ge(xe);return pe==="="&&He&&(pe=""),Fe?Ee=pe===">"||pe==="<"?"<0.0.0":"*":pe&&He?(Be&&(Ne=0),He&&(xe=0),pe===">"?(pe=">=",Be?(Te=+Te+1,Ne=0,xe=0):He&&(Ne=+Ne+1,xe=0)):pe==="<="&&(pe="<",Be?Te=+Te+1:Ne=+Ne+1),Ee=pe+Te+"."+Ne+"."+xe):Be?Ee=">="+Te+".0.0 <"+(+Te+1)+".0.0":He&&(Ee=">="+Te+"."+Ne+".0 <"+Te+"."+(+Ne+1)+".0"),b("xRange return",Ee),Ee})}(Ce,De)}).join(" ")}(Ae,Me),b("xrange",Ae),Ae=function(Oe,De){return b("replaceStars",Oe,De),Oe.trim().replace(f[$],"")}(Ae,Me),b("stars",Ae),Ae}(Pe,we)}).join(" ").split(/\s+/);return this.loose&&(Le=Le.filter(function(Pe){return!!Pe.match(Re)})),Le=Le.map(function(Pe){return new ae(Pe,we)})},de.prototype.intersects=function(Se,we){if(!(Se instanceof de))throw new TypeError("a Range is required");return this.set.some(function(ye){return ye.every(function(Re){return Se.set.some(function(Le){return Le.every(function(Pe){return Re.intersects(Pe,we)})})})})},e.toComparators=function(Se,we){return new de(Se,we).set.map(function(ye){return ye.map(function(Re){return Re.value}).join(" ").trim().split(" ")})},de.prototype.test=function(Se){if(!Se)return!1;typeof Se=="string"&&(Se=new j(Se,this.loose));for(var we=0;we<this.set.length;we++)if(be(this.set[we],Se))return!0;return!1},e.satisfies=ve,e.maxSatisfying=function(Se,we,ye){var Re=null,Le=null;try{var Pe=new de(we,ye)}catch{return null}return Se.forEach(function(Ae){Pe.test(Ae)&&(Re&&Le.compare(Ae)!==-1||(Le=new j(Re=Ae,ye)))}),Re},e.minSatisfying=function(Se,we,ye){var Re=null,Le=null;try{var Pe=new de(we,ye)}catch{return null}return Se.forEach(function(Ae){Pe.test(Ae)&&(Re&&Le.compare(Ae)!==1||(Le=new j(Re=Ae,ye)))}),Re},e.validRange=function(Se,we){try{return new de(Se,we).range||"*"}catch{return null}},e.ltr=function(Se,we,ye){return Ie(Se,we,"<",ye)},e.gtr=function(Se,we,ye){return Ie(Se,we,">",ye)},e.outside=Ie,e.prerelease=function(Se,we){var ye=J(Se,we);return ye&&ye.prerelease.length?ye.prerelease:null},e.intersects=function(Se,we,ye){return Se=new de(Se,ye),we=new de(we,ye),Se.intersects(we)},e.coerce=function(Se){if(Se instanceof j)return Se;if(typeof Se!="string")return null;var we=Se.match(f[R]);return we==null?null:J((we[1]||"0")+"."+(we[2]||"0")+"."+(we[3]||"0"))}}).call(this,t(1))},function(q,e){var t,y,b=q.exports={};function D(){throw new Error("setTimeout has not been defined")}function T(){throw new Error("clearTimeout has not been defined")}function f(o){if(t===setTimeout)return setTimeout(o,0);if((t===D||!t)&&setTimeout)return t=setTimeout,setTimeout(o,0);try{return t(o,0)}catch{try{return t.call(null,o,0)}catch{return t.call(this,o,0)}}}(function(){try{t=typeof setTimeout=="function"?setTimeout:D}catch{t=D}try{y=typeof clearTimeout=="function"?clearTimeout:T}catch{y=T}})();var v,m=[],S=!1,h=-1;function a(){S&&v&&(S=!1,v.length?m=v.concat(m):h=-1,m.length&&r())}function r(){if(!S){var o=f(a);S=!0;for(var u=m.length;u;){for(v=m,m=[];++h<u;)v&&v[h].run();h=-1,u=m.length}v=null,S=!1,function(d){if(y===clearTimeout)return clearTimeout(d);if((y===T||!y)&&clearTimeout)return y=clearTimeout,clearTimeout(d);try{y(d)}catch{try{return y.call(null,d)}catch{return y.call(this,d)}}}(o)}}function i(o,u){this.fun=o,this.array=u}function s(){}b.nextTick=function(o){var u=new Array(arguments.length-1);if(arguments.length>1)for(var d=1;d<arguments.length;d++)u[d-1]=arguments[d];m.push(new i(o,u)),m.length!==1||S||f(r)},i.prototype.run=function(){this.fun.apply(null,this.array)},b.title="browser",b.browser=!0,b.env={},b.argv=[],b.version="",b.versions={},b.on=s,b.addListener=s,b.once=s,b.off=s,b.removeListener=s,b.removeAllListeners=s,b.emit=s,b.prependListener=s,b.prependOnceListener=s,b.listeners=function(o){return[]},b.binding=function(o){throw new Error("process.binding is not supported")},b.cwd=function(){return"/"},b.chdir=function(o){throw new Error("process.chdir is not supported")},b.umask=function(){return 0}}])}),define(Q[1530],Y([1,0]),function(q,e){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SkipList=void 0;class y{constructor(f,v,m){this.level=f,this.key=v,this.value=m,this.forward=[]}}const b=void 0;class D{constructor(f,v=2**16){this.comparator=f,this[t]="SkipList",this._level=0,this._size=0,this._maxLevel=Math.max(1,Math.log2(v)|0),this._header=new y(this._maxLevel,b,b)}get size(){return this._size}clear(){this._header=new y(this._maxLevel,b,b)}has(f){return!!D._search(this,f,this.comparator)}get(f){return D._search(this,f,this.comparator)?.value}set(f,v){return D._insert(this,f,v,this.comparator)&&(this._size+=1),this}delete(f){const v=D._delete(this,f,this.comparator);return v&&(this._size-=1),v}forEach(f,v){let m=this._header.forward[0];for(;m;)f.call(v,m.value,m.key,this),m=m.forward[0]}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*entries(){let f=this._header.forward[0];for(;f;)yield[f.key,f.value],f=f.forward[0]}*keys(){let f=this._header.forward[0];for(;f;)yield f.key,f=f.forward[0]}*values(){let f=this._header.forward[0];for(;f;)yield f.value,f=f.forward[0]}toString(){let f="[SkipList]:",v=this._header.forward[0];for(;v;)f+=`node(${v.key}, ${v.value}, lvl:${v.level})`,v=v.forward[0];return f}static _search(f,v,m){let S=f._header;for(let h=f._level-1;h>=0;h--)for(;S.forward[h]&&m(S.forward[h].key,v)<0;)S=S.forward[h];if(S=S.forward[0],S&&m(S.key,v)===0)return S}static _insert(f,v,m,S){const h=[];let a=f._header;for(let r=f._level-1;r>=0;r--){for(;a.forward[r]&&S(a.forward[r].key,v)<0;)a=a.forward[r];h[r]=a}if(a=a.forward[0],a&&S(a.key,v)===0)return a.value=m,!1;{const r=D._randomLevel(f);if(r>f._level){for(let i=f._level;i<r;i++)h[i]=f._header;f._level=r}a=new y(r,v,m);for(let i=0;i<r;i++)a.forward[i]=h[i].forward[i],h[i].forward[i]=a;return!0}}static _randomLevel(f,v=.5){let m=1;for(;Math.random()<v&&m<f._maxLevel;)m+=1;return m}static _delete(f,v,m){const S=[];let h=f._header;for(let a=f._level-1;a>=0;a--){for(;h.forward[a]&&m(h.forward[a].key,v)<0;)h=h.forward[a];S[a]=h}if(h=h.forward[0],!h||m(h.key,v)!==0)return!1;for(let a=0;a<f._level&&S[a].forward[a]===h;a++)S[a].forward[a]=h.forward[a];for(;f._level>0&&f._header.forward[f._level-1]===b;)f._level-=1;return!0}}e.SkipList=D}),define(Q[145],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWatch=void 0;const t=globalThis.performance&&typeof globalThis.performance.now=="function";class y{static create(D){return new y(D)}constructor(D){this._now=t&&D===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}e.StopWatch=y}),define(Q[6],Y([1,0,15,202,4,204,145]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Relay=e.EventBufferer=e.DynamicListEventMultiplexer=e.EventMultiplexer=e.MicrotaskEmitter=e.DebounceEmitter=e.PauseableEmitter=e.AsyncEmitter=e.createEventDeliveryQueue=e.Emitter=e.setGlobalLeakWarningThreshold=e.EventProfiling=e.Event=void 0;const f=!1,v=!1;var m;(function(k){k.None=()=>b.Disposable.None;function L(le){if(v){const{onDidAddListener:ne}=le,ce=i.create();let ae=0;le.onDidAddListener=()=>{++ae===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),ce.print()),ne?.()}}}function R(le,ne){return B(le,()=>{},0,void 0,!0,void 0,ne)}k.defer=R;function M(le){return(ne,ce=null,ae)=>{let ue=!1,de;return de=le(ge=>{if(!ue)return de?de.dispose():ue=!0,ne.call(ce,ge)},null,ae),ue&&de.dispose(),de}}k.once=M;function N(le,ne,ce){return z((ae,ue=null,de)=>le(ge=>ae.call(ue,ne(ge)),null,de),ce)}k.map=N;function P(le,ne,ce){return z((ae,ue=null,de)=>le(ge=>{ne(ge),ae.call(ue,ge)},null,de),ce)}k.forEach=P;function x(le,ne,ce){return z((ae,ue=null,de)=>le(ge=>ne(ge)&&ae.call(ue,ge),null,de),ce)}k.filter=x;function F(le){return le}k.signal=F;function V(...le){return(ne,ce=null,ae)=>(0,b.combinedDisposable)(...le.map(ue=>ue(de=>ne.call(ce,de),null,ae)))}k.any=V;function W(le,ne,ce,ae){let ue=ce;return N(le,de=>(ue=ne(ue,de),ue),ae)}k.reduce=W;function z(le,ne){let ce;const ae={onWillAddFirstListener(){ce=le(ue.fire,ue)},onDidRemoveLastListener(){ce?.dispose()}};ne||L(ae);const ue=new p(ae);return ne?.add(ue),ue.event}function B(le,ne,ce=100,ae=!1,ue=!1,de,ge){let he,be,ve,Ie=0,Se;const we={leakWarningThreshold:de,onWillAddFirstListener(){he=le(Re=>{Ie++,be=ne(be,Re),ae&&!ve&&(ye.fire(be),be=void 0),Se=()=>{const Le=be;be=void 0,ve=void 0,(!ae||Ie>1)&&ye.fire(Le),Ie=0},typeof ce=="number"?(clearTimeout(ve),ve=setTimeout(Se,ce)):ve===void 0&&(ve=0,queueMicrotask(Se))})},onWillRemoveListener(){ue&&Ie>0&&Se?.()},onDidRemoveLastListener(){Se=void 0,he.dispose()}};ge||L(we);const ye=new p(we);return ge?.add(ye),ye.event}k.debounce=B;function K(le,ne=0,ce){return k.debounce(le,(ae,ue)=>ae?(ae.push(ue),ae):[ue],ne,void 0,!0,void 0,ce)}k.accumulate=K;function H(le,ne=(ae,ue)=>ae===ue,ce){let ae=!0,ue;return x(le,de=>{const ge=ae||!ne(de,ue);return ae=!1,ue=de,ge},ce)}k.latch=H;function U(le,ne,ce){return[k.filter(le,ne,ce),k.filter(le,ae=>!ne(ae),ce)]}k.split=U;function G(le,ne=!1,ce=[]){let ae=ce.slice(),ue=le(he=>{ae?ae.push(he):ge.fire(he)});const de=()=>{ae?.forEach(he=>ge.fire(he)),ae=null},ge=new p({onWillAddFirstListener(){ue||(ue=le(he=>ge.fire(he)))},onDidAddFirstListener(){ae&&(ne?setTimeout(de):de())},onDidRemoveLastListener(){ue&&ue.dispose(),ue=null}});return ge.event}k.buffer=G;class ${constructor(ne){this.event=ne,this.disposables=new b.DisposableStore}map(ne){return new $(N(this.event,ne,this.disposables))}forEach(ne){return new $(P(this.event,ne,this.disposables))}filter(ne){return new $(x(this.event,ne,this.disposables))}reduce(ne,ce){return new $(W(this.event,ne,ce,this.disposables))}latch(){return new $(H(this.event,void 0,this.disposables))}debounce(ne,ce=100,ae=!1,ue=!1,de){return new $(B(this.event,ne,ce,ae,ue,de,this.disposables))}on(ne,ce,ae){return this.event(ne,ce,ae)}once(ne,ce,ae){return M(this.event)(ne,ce,ae)}dispose(){this.disposables.dispose()}}function ie(le){return new $(le)}k.chain=ie;function J(le,ne,ce=ae=>ae){const ae=(...he)=>ge.fire(ce(...he)),ue=()=>le.on(ne,ae),de=()=>le.removeListener(ne,ae),ge=new p({onWillAddFirstListener:ue,onDidRemoveLastListener:de});return ge.event}k.fromNodeEventEmitter=J;function j(le,ne,ce=ae=>ae){const ae=(...he)=>ge.fire(ce(...he)),ue=()=>le.addEventListener(ne,ae),de=()=>le.removeEventListener(ne,ae),ge=new p({onWillAddFirstListener:ue,onDidRemoveLastListener:de});return ge.event}k.fromDOMEventEmitter=j;function ee(le){return new Promise(ne=>M(le)(ne))}k.toPromise=ee;function X(le){const ne=new p;return le.then(ce=>{ne.fire(ce)},()=>{ne.fire(void 0)}).finally(()=>{ne.dispose()}),ne.event}k.fromPromise=X;function te(le,ne){return ne(void 0),le(ce=>ne(ce))}k.runAndSubscribe=te;function Z(le,ne){let ce=null;function ae(de){ce?.dispose(),ce=new b.DisposableStore,ne(de,ce)}ae(void 0);const ue=le(de=>ae(de));return(0,b.toDisposable)(()=>{ue.dispose(),ce?.dispose()})}k.runAndSubscribeWithStore=Z;class se{constructor(ne,ce){this._observable=ne,this._counter=0,this._hasChanged=!1;const ae={onWillAddFirstListener:()=>{ne.addObserver(this)},onDidRemoveLastListener:()=>{ne.removeObserver(this)}};ce||L(ae),this.emitter=new p(ae),ce&&ce.add(this.emitter)}beginUpdate(ne){this._counter++}handlePossibleChange(ne){}handleChange(ne,ce){this._hasChanged=!0}endUpdate(ne){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function re(le,ne){return new se(le,ne).emitter.event}k.fromObservable=re;function oe(le){return ne=>{let ce=0,ae=!1;const ue={beginUpdate(){ce++},endUpdate(){ce--,ce===0&&(le.reportChanges(),ae&&(ae=!1,ne()))},handlePossibleChange(){},handleChange(){ae=!0}};return le.addObserver(ue),le.reportChanges(),{dispose(){le.removeObserver(ue)}}}}k.fromObservableLight=oe})(m||(e.Event=m={}));class S{static{this.all=new Set}static{this._idPool=0}constructor(L){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${L}_${S._idPool++}`,S.all.add(this)}start(L){this._stopWatch=new T.StopWatch,this.listenerCount=L}stop(){if(this._stopWatch){const L=this._stopWatch.elapsed();this.durations.push(L),this.elapsedOverall+=L,this.invocationCount+=1,this._stopWatch=void 0}}}e.EventProfiling=S;let h=-1;function a(k){const L=h;return h=k,{dispose(){h=L}}}e.setGlobalLeakWarningThreshold=a;class r{constructor(L,R=Math.random().toString(18).slice(2,5)){this.threshold=L,this.name=R,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(L,R){const M=this.threshold;if(M<=0||R<M)return;this._stacks||(this._stacks=new Map);const N=this._stacks.get(L.value)||0;if(this._stacks.set(L.value,N+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=M*.5;let P,x=0;for(const[F,V]of this._stacks)(!P||x<V)&&(P=F,x=V);console.warn(`[${this.name}] potential listener LEAK detected, having ${R} listeners already. MOST frequent listener (${x}):`),console.warn(P)}return()=>{const P=this._stacks.get(L.value)||0;this._stacks.set(L.value,P-1)}}}class i{static create(){return new i(new Error().stack??"")}constructor(L){this.value=L}print(){console.warn(this.value.split(` `).slice(2).join(` `))}}let s=0;class o{constructor(L){this.value=L,this.id=s++}}const u=2,d=(k,L)=>{if(k instanceof o)L(k);else for(let R=0;R<k.length;R++){const M=k[R];M&&L(M)}};class p{constructor(L){this._size=0,this._options=L,this._leakageMon=h>0||this._options?.leakWarningThreshold?new r(this._options?.leakWarningThreshold??h):void 0,this._perfMon=this._options?._profName?new S(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(f){const L=this._listeners;queueMicrotask(()=>{d(L,R=>R.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(L,R,M)=>{if(this._disposed)return b.Disposable.None;R&&(L=L.bind(R));const N=new o(L);let P,x;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(N.stack=i.create(),P=this._leakageMon.check(N.stack,this._size+1)),f&&(N.stack=x??i.create()),this._listeners?this._listeners instanceof o?(this._deliveryQueue??=new l,this._listeners=[this._listeners,N]):this._listeners.push(N):(this._options?.onWillAddFirstListener?.(this),this._listeners=N,this._options?.onDidAddFirstListener?.(this)),this._size++;const F=(0,b.toDisposable)(()=>{P?.(),this._removeListener(N)});return M instanceof b.DisposableStore?M.add(F):Array.isArray(M)&&M.push(F),F},this._event}_removeListener(L){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const R=this._listeners,M=R.indexOf(L);if(M===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,R[M]=void 0;const N=this._deliveryQueue.current===this;if(this._size*u<=R.length){let P=0;for(let x=0;x<R.length;x++)R[x]?R[P++]=R[x]:N&&(this._deliveryQueue.end--,P<this._deliveryQueue.i&&this._deliveryQueue.i--);R.length=P}}_deliver(L,R){if(!L)return;const M=this._options?.onListenerError||t.onUnexpectedError;if(!M){L.value(R);return}try{L.value(R)}catch(N){M(N)}}_deliverQueue(L){const R=L.current._listeners;for(;L.i<L.end;)this._deliver(R[L.i++],L.value);L.reset()}fire(L){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof o)this._deliver(this._listeners,L);else{const R=this._deliveryQueue;R.enqueue(this,L,this._listeners.length),this._deliverQueue(R)}this._perfMon?.stop()}hasListeners(){return this._size>0}}e.Emitter=p;const c=()=>new l;e.createEventDeliveryQueue=c;class l{constructor(){this.i=-1,this.end=0}enqueue(L,R,M){this.i=0,this.end=M,this.current=L,this.value=R}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class n extends p{async fireAsync(L,R,M){if(this._listeners)for(this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new D.LinkedList),d(this._listeners,N=>this._asyncDeliveryQueue.push([N.value,L]));this._asyncDeliveryQueue.size>0&&!R.isCancellationRequested;){const[N,P]=this._asyncDeliveryQueue.shift(),x=[],F={...P,token:R,waitUntil:V=>{if(Object.isFrozen(x))throw new Error("waitUntil can NOT be called asynchronous");M&&(V=M(V,N)),x.push(V)}};try{N(F)}catch(V){(0,t.onUnexpectedError)(V);continue}Object.freeze(x),await Promise.allSettled(x).then(V=>{for(const W of V)W.status==="rejected"&&(0,t.onUnexpectedError)(W.reason)})}}}e.AsyncEmitter=n;class g extends p{get isPaused(){return this._isPaused!==0}constructor(L){super(L),this._isPaused=0,this._eventQueue=new D.LinkedList,this._mergeFn=L?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const L=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(L))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(L){this._size&&(this._isPaused!==0?this._eventQueue.push(L):super.fire(L))}}e.PauseableEmitter=g;class w extends g{constructor(L){super(L),this._delay=L.delay??100}fire(L){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(L)}}e.DebounceEmitter=w;class E extends p{constructor(L){super(L),this._queuedEvents=[],this._mergeFn=L?.merge}fire(L){this.hasListeners()&&(this._queuedEvents.push(L),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(R=>super.fire(R)),this._queuedEvents=[]}))}}e.MicrotaskEmitter=E;class C{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new p({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(L){const R={event:L,listener:null};this.events.push(R),this.hasListeners&&this.hook(R);const M=()=>{this.hasListeners&&this.unhook(R);const N=this.events.indexOf(R);this.events.splice(N,1)};return(0,b.toDisposable)((0,y.once)(M))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(L=>this.hook(L))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(L=>this.unhook(L))}hook(L){L.listener=L.event(R=>this.emitter.fire(R))}unhook(L){L.listener&&L.listener.dispose(),L.listener=null}dispose(){this.emitter.dispose()}}e.EventMultiplexer=C;class I{constructor(L,R,M,N){this._store=new b.DisposableStore;const P=this._store.add(new C),x=this._store.add(new b.DisposableMap);function F(V){x.set(V,P.add(N(V)))}for(const V of L)F(V);this._store.add(R(V=>{F(V)})),this._store.add(M(V=>{x.deleteAndDispose(V)})),this.event=P.event}dispose(){this._store.dispose()}}e.DynamicListEventMultiplexer=I;class _{constructor(){this.buffers=[]}wrapEvent(L){return(R,M,N)=>L(P=>{const x=this.buffers[this.buffers.length-1];x?x.push(()=>R.call(M,P)):R.call(M,P)},void 0,N)}bufferEvents(L){const R=[];this.buffers.push(R);const M=L();return this.buffers.pop(),R.forEach(N=>N()),M}}e.EventBufferer=_;class A{constructor(){this.listening=!1,this.inputEvent=m.None,this.inputEventListener=b.Disposable.None,this.emitter=new p({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(L){this.inputEvent=L,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=L(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}e.Relay=A}),define(Q[1531],Y([1,0,214,15,4,6]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeModel=e.TreeNavigator=e.Item=e.ItemRegistry=e.Lock=e.LockData=void 0;class T extends b.Disposable{constructor(i){super(),this._onDispose=this._register(new D.Emitter),this.onDispose=this._onDispose.event,this._item=i}get item(){return this._item}dispose(){this._onDispose&&this._onDispose.fire(),super.dispose()}}e.LockData=T;class f{constructor(){this.locks=Object.create({})}isLocked(i){return!!this.locks[i.id]}run(i,s){const o=this.getLock(i);if(o)return new Promise((d,p)=>{D.Event.once(o.onDispose)(()=>this.run(i,s).then(d,p))});let u;return new Promise((d,p)=>{if(i.isDisposed())return p(new Error("Item is disposed."));let c=this.locks[i.id]=new T(i);return u=s().then(l=>(delete this.locks[i.id],c.dispose(),l)).then(d,p),u})}getLock(i){let s;for(s in this.locks){let o=this.locks[s];if(i.intersects(o.item))return o}return null}}e.Lock=f;class v{constructor(){this._isDisposed=!1,this._onDidRevealItem=new D.EventMultiplexer,this.onDidRevealItem=this._onDidRevealItem.event,this._onExpandItem=new D.EventMultiplexer,this.onExpandItem=this._onExpandItem.event,this._onDidExpandItem=new D.EventMultiplexer,this.onDidExpandItem=this._onDidExpandItem.event,this._onCollapseItem=new D.EventMultiplexer,this.onCollapseItem=this._onCollapseItem.event,this._onDidCollapseItem=new D.EventMultiplexer,this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDidAddTraitItem=new D.EventMultiplexer,this.onDidAddTraitItem=this._onDidAddTraitItem.event,this._onDidRemoveTraitItem=new D.EventMultiplexer,this.onDidRemoveTraitItem=this._onDidRemoveTraitItem.event,this._onDidRefreshItem=new D.EventMultiplexer,this.onDidRefreshItem=this._onDidRefreshItem.event,this._onRefreshItemChildren=new D.EventMultiplexer,this.onRefreshItemChildren=this._onRefreshItemChildren.event,this._onDidRefreshItemChildren=new D.EventMultiplexer,this.onDidRefreshItemChildren=this._onDidRefreshItemChildren.event,this._onDidDisposeItem=new D.EventMultiplexer,this.onDidDisposeItem=this._onDidDisposeItem.event,this.items={}}register(i){t.ok(!this.isRegistered(i.id),"item already registered: "+i.id);const s=(0,b.combinedDisposable)(this._onDidRevealItem.add(i.onDidReveal),this._onExpandItem.add(i.onExpand),this._onDidExpandItem.add(i.onDidExpand),this._onCollapseItem.add(i.onCollapse),this._onDidCollapseItem.add(i.onDidCollapse),this._onDidAddTraitItem.add(i.onDidAddTrait),this._onDidRemoveTraitItem.add(i.onDidRemoveTrait),this._onDidRefreshItem.add(i.onDidRefresh),this._onRefreshItemChildren.add(i.onRefreshChildren),this._onDidRefreshItemChildren.add(i.onDidRefreshChildren),this._onDidDisposeItem.add(i.onDidDispose));this.items[i.id]={item:i,disposable:s}}deregister(i){t.ok(this.isRegistered(i.id),"item not registered: "+i.id),this.items[i.id].disposable.dispose(),delete this.items[i.id]}isRegistered(i){return this.items.hasOwnProperty(i)}getItem(i){const s=this.items[i];return s?s.item:null}dispose(){this.items={},this._onDidRevealItem.dispose(),this._onExpandItem.dispose(),this._onDidExpandItem.dispose(),this._onCollapseItem.dispose(),this._onDidCollapseItem.dispose(),this._onDidAddTraitItem.dispose(),this._onDidRemoveTraitItem.dispose(),this._onDidRefreshItem.dispose(),this._onRefreshItemChildren.dispose(),this._onDidRefreshItemChildren.dispose(),this._isDisposed=!0}isDisposed(){return this._isDisposed}}e.ItemRegistry=v;class m extends b.Disposable{constructor(i,s,o,u,d){super(),this._onDidCreate=this._register(new D.Emitter),this.onDidCreate=this._onDidCreate.event,this._onDidReveal=this._register(new D.Emitter),this.onDidReveal=this._onDidReveal.event,this._onExpand=this._register(new D.Emitter),this.onExpand=this._onExpand.event,this._onDidExpand=this._register(new D.Emitter),this.onDidExpand=this._onDidExpand.event,this._onCollapse=this._register(new D.Emitter),this.onCollapse=this._onCollapse.event,this._onDidCollapse=this._register(new D.Emitter),this.onDidCollapse=this._onDidCollapse.event,this._onDidAddTrait=this._register(new D.Emitter),this.onDidAddTrait=this._onDidAddTrait.event,this._onDidRemoveTrait=this._register(new D.Emitter),this.onDidRemoveTrait=this._onDidRemoveTrait.event,this._onDidRefresh=this._register(new D.Emitter),this.onDidRefresh=this._onDidRefresh.event,this._onRefreshChildren=this._register(new D.Emitter),this.onRefreshChildren=this._onRefreshChildren.event,this._onDidRefreshChildren=this._register(new D.Emitter),this.onDidRefreshChildren=this._onDidRefreshChildren.event,this._onDidDispose=this._register(new D.Emitter),this.onDidDispose=this._onDidDispose.event,this.registry=s,this.context=o,this.lock=u,this.element=d,this.id=i,this.registry.register(this),this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.needsChildrenRefresh=!0,this.parent=null,this.previous=null,this.next=null,this.firstChild=null,this.lastChild=null,this.traits={},this.depth=0,this.expanded=!!(this.context.dataSource.shouldAutoexpand&&this.context.dataSource.shouldAutoexpand(this.context.tree,d)),this._onDidCreate.fire(this),this.visible=this._isVisible(),this.height=this._getHeight(),this._isDisposed=!1}getElement(){return this.element}hasChildren(){return this.doesHaveChildren}getDepth(){return this.depth}isVisible(){return this.visible}setVisible(i){this.visible=i}isExpanded(){return this.expanded}_setExpanded(i){this.expanded=i}reveal(i=null){let s={item:this,relativeTop:i};this._onDidReveal.fire(s)}expand(){return this.isExpanded()||!this.doesHaveChildren||this.lock.isLocked(this)?Promise.resolve(!1):this.lock.run(this,()=>{if(this.isExpanded()||!this.doesHaveChildren)return Promise.resolve(!1);let s={item:this},o;return this._onExpand.fire(s),this.needsChildrenRefresh?o=this.refreshChildren(!1,!0,!0):o=Promise.resolve(null),o.then(()=>(this._setExpanded(!0),this._onDidExpand.fire(s),!0))}).then(s=>this.isDisposed()?!1:this.context.options.autoExpandSingleChildren&&s&&this.firstChild!==null&&this.firstChild===this.lastChild&&this.firstChild.isVisible()?this.firstChild.expand().then(()=>!0):s)}collapse(i=!1){if(i){let s=Promise.resolve(null);return this.forEachChild(o=>{s=s.then(()=>o.collapse(!0))}),s.then(()=>this.collapse(!1))}else return!this.isExpanded()||this.lock.isLocked(this)?Promise.resolve(!1):this.lock.run(this,()=>{let s={item:this};return this._onCollapse.fire(s),this._setExpanded(!1),this._onDidCollapse.fire(s),Promise.resolve(!0)})}addTrait(i){let s={item:this,trait:i};this.traits[i]=!0,this._onDidAddTrait.fire(s)}removeTrait(i){let s={item:this,trait:i};delete this.traits[i],this._onDidRemoveTrait.fire(s)}hasTrait(i){return this.traits[i]||!1}getAllTraits(){let i=[],s;for(s in this.traits)this.traits.hasOwnProperty(s)&&this.traits[s]&&i.push(s);return i}getHeight(){return this.height}refreshChildren(i,s=!1,o=!1){if(!o&&!this.isExpanded()){const d=p=>{p.needsChildrenRefresh=!0,p.forEachChild(d)};return d(this),Promise.resolve(this)}this.needsChildrenRefresh=!1;let u=()=>{let d={item:this,isNested:s};this._onRefreshChildren.fire(d);let p;return this.doesHaveChildren?p=this.context.dataSource.getChildren(this.context.tree,this.element):p=Promise.resolve([]),p.then(l=>{if(this.isDisposed()||this.registry.isDisposed())return Promise.resolve(null);if(!Array.isArray(l))return Promise.reject(new Error("Please return an array of children."));l=l?l.slice(0):[],l=this.sort(l);let n={};for(;this.firstChild!==null;)n[this.firstChild.id]=this.firstChild,this.removeChild(this.firstChild);for(let g=0,w=l.length;g<w;g++){let E=l[g],C=this.context.dataSource.getId(this.context.tree,E),I=n[C]||new m(C,this.registry,this.context,this.lock,E);I.element=E,i&&(I.needsChildrenRefresh=i),delete n[C],this.addChild(I)}for(let g in n)n.hasOwnProperty(g)&&n[g].dispose();return i?Promise.all(this.mapEachChild(g=>g.doRefresh(i,!0))):Promise.all(this.mapEachChild(g=>g.isExpanded()&&g.needsChildrenRefresh?g.doRefresh(i,!0):(g.updateVisibility(),Promise.resolve(null))))}).then(void 0,y.onUnexpectedError).then(()=>this._onDidRefreshChildren.fire(d))};return s?u():this.lock.run(this,u)}doRefresh(i,s=!1){return this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.height=this._getHeight(),this.updateVisibility(),this._onDidRefresh.fire(this),this.refreshChildren(i,s)}updateVisibility(){this.setVisible(this._isVisible())}refresh(i){return this.doRefresh(i)}getNavigator(){return new h(this)}intersects(i){return this.isAncestorOf(i)||i.isAncestorOf(this)}isAncestorOf(i){let s=i;for(;s;){if(s.id===this.id)return!0;s=s.parent}return!1}addChild(i,s=this.lastChild){let o=this.firstChild===null,u=s===null,d=s===this.lastChild;if(o)this.firstChild=this.lastChild=i,i.next=i.previous=null;else if(u){if(!this.firstChild)throw new Error("Invalid tree state");this.firstChild.previous=i,i.next=this.firstChild,i.previous=null,this.firstChild=i}else if(d){if(!this.lastChild)throw new Error("Invalid tree state");this.lastChild.next=i,i.next=null,i.previous=this.lastChild,this.lastChild=i}else{if(i.previous=s,!s)throw new Error("Invalid tree state");if(i.next=s.next,!s.next)throw new Error("Invalid tree state");s.next.previous=i,s.next=i}i.parent=this,i.depth=this.depth+1}removeChild(i){let s=this.firstChild===i,o=this.lastChild===i;if(s&&o)this.firstChild=this.lastChild=null;else if(s){if(!i.next)throw new Error("Invalid tree state");i.next.previous=null,this.firstChild=i.next}else if(o){if(!i.previous)throw new Error("Invalid tree state");i.previous.next=null,this.lastChild=i.previous}else{if(!i.next)throw new Error("Invalid tree state");if(i.next.previous=i.previous,!i.previous)throw new Error("Invalid tree state");i.previous.next=i.next}i.parent=null,i.depth=NaN}forEachChild(i){let s=this.firstChild,o;for(;s;)o=s.next,i(s),s=o}mapEachChild(i){let s=[];return this.forEachChild(o=>{s.push(i(o))}),s}sort(i){const s=this.context.sorter;return s?i.sort((o,u)=>s.compare(this.context.tree,o,u)):i}_getHeight(){return this.context.renderer?this.context.renderer.getHeight(this.context.tree,this.element):0}_isVisible(){return this.context.filter?this.context.filter.isVisible(this.context.tree,this.element):!1}isDisposed(){return this._isDisposed}dispose(){this.forEachChild(i=>i.dispose()),this.parent=null,this.previous=null,this.next=null,this.firstChild=null,this.lastChild=null,this._onDidDispose.fire(this),this.registry.deregister(this),super.dispose(),this._isDisposed=!0}}e.Item=m;class S extends m{constructor(i,s,o,u,d){super(i,s,o,u,d)}isVisible(){return!1}setVisible(i){}isExpanded(){return!0}_setExpanded(i){}render(){}_getHeight(){return 0}_isVisible(){return!1}}class h{static lastDescendantOf(i){return i?i instanceof S?h.lastDescendantOf(i.lastChild):i.isVisible()?!i.isExpanded()||i.lastChild===null?i:h.lastDescendantOf(i.lastChild):h.lastDescendantOf(i.previous):null}constructor(i,s=!0){this.item=i,this.start=s?i:null}current(){return this.item||null}next(){if(this.item)do if((this.item instanceof S||this.item.isVisible()&&this.item.isExpanded())&&this.item.firstChild)this.item=this.item.firstChild;else if(this.item===this.start)this.item=null;else{for(;this.item&&this.item!==this.start&&!this.item.next;)this.item=this.item.parent;this.item===this.start&&(this.item=null),this.item=this.item?this.item.next:null}while(this.item&&!this.item.isVisible());return this.item||null}previous(){if(this.item)do{let i=h.lastDescendantOf(this.item.previous);i?this.item=i:this.item.parent&&this.item.parent!==this.start&&this.item.parent.isVisible()?this.item=this.item.parent:this.item=null}while(this.item&&!this.item.isVisible());return this.item||null}parent(){if(this.item){let i=this.item.parent;i&&i!==this.start&&i.isVisible()?this.item=i:this.item=null}return this.item||null}first(){return this.item=this.start,this.next(),this.item||null}last(){return h.lastDescendantOf(this.start)}}e.TreeNavigator=h;class a extends b.Disposable{constructor(i){super(),this.registry=this._register(new v),this.registryDisposable=b.Disposable.None,this._onSetInput=this._register(new D.Emitter),this.onSetInput=this._onSetInput.event,this._onDidSetInput=this._register(new D.Emitter),this.onDidSetInput=this._onDidSetInput.event,this._onRefresh=this._register(new D.Emitter),this.onRefresh=this._onRefresh.event,this._onDidRefresh=this._register(new D.Emitter),this.onDidRefresh=this._onDidRefresh.event,this._onDidHighlight=this._register(new D.Emitter),this.onDidHighlight=this._onDidHighlight.event,this._onDidSelect=this._register(new D.Emitter),this.onDidSelect=this._onDidSelect.event,this._onDidFocus=this._register(new D.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidRevealItem=this._register(new D.Relay),this.onDidRevealItem=this._onDidRevealItem.event,this._onExpandItem=this._register(new D.Relay),this.onExpandItem=this._onExpandItem.event,this._onDidExpandItem=this._register(new D.Relay),this.onDidExpandItem=this._onDidExpandItem.event,this._onCollapseItem=this._register(new D.Relay),this.onCollapseItem=this._onCollapseItem.event,this._onDidCollapseItem=this._register(new D.Relay),this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDidAddTraitItem=this._register(new D.Relay),this.onDidAddTraitItem=this._onDidAddTraitItem.event,this._onDidRemoveTraitItem=this._register(new D.Relay),this.onDidRemoveTraitItem=this._onDidRemoveTraitItem.event,this._onDidRefreshItem=this._register(new D.Relay),this.onDidRefreshItem=this._onDidRefreshItem.event,this._onRefreshItemChildren=this._register(new D.Relay),this.onRefreshItemChildren=this._onRefreshItemChildren.event,this._onDidRefreshItemChildren=this._register(new D.Relay),this.onDidRefreshItemChildren=this._onDidRefreshItemChildren.event,this._onDidDisposeItem=this._register(new D.Relay),this.onDidDisposeItem=this._onDidDisposeItem.event,this.context=i,this.input=null,this.traitsToItems={}}setInput(i){let s={item:this.input};this._onSetInput.fire(s),this.setSelection([]),this.setFocus(),this.setHighlight(),this.lock=new f,this.input&&this.input.dispose(),this.registry&&(this.registry.dispose(),this.registryDisposable.dispose()),this.registry=new v,this._onDidRevealItem.input=this.registry.onDidRevealItem,this._onExpandItem.input=this.registry.onExpandItem,this._onDidExpandItem.input=this.registry.onDidExpandItem,this._onCollapseItem.input=this.registry.onCollapseItem,this._onDidCollapseItem.input=this.registry.onDidCollapseItem,this._onDidAddTraitItem.input=this.registry.onDidAddTraitItem,this._onDidRemoveTraitItem.input=this.registry.onDidRemoveTraitItem,this._onDidRefreshItem.input=this.registry.onDidRefreshItem,this._onRefreshItemChildren.input=this.registry.onRefreshItemChildren,this._onDidRefreshItemChildren.input=this.registry.onDidRefreshItemChildren,this._onDidDisposeItem.input=this.registry.onDidDisposeItem,this.registryDisposable=this.registry.onDidDisposeItem(u=>u.getAllTraits().forEach(d=>delete this.traitsToItems[d][u.id]));let o=this.context.dataSource.getId(this.context.tree,i);return this.input=new S(o,this.registry,this.context,this.lock,i),s={item:this.input},this._onDidSetInput.fire(s),this.refresh(this.input)}getInput(){return this.input?this.input.getElement():null}async refresh(i=null,s=!0){let o=this.getItem(i);if(!o)return Promise.resolve(null);let u={item:o,recursive:s};this._onRefresh.fire(u),await o.refresh(s),this._onDidRefresh.fire(u)}expand(i){let s=this.getItem(i);return s?s.expand():Promise.resolve(!1)}expandAll(i){if(!i){i=[];let s,o=this.getNavigator();for(;s=o.next();)i.push(s)}return this._expandAll(i)}_expandAll(i){if(i.length===0)return Promise.resolve(null);const s=[],o=[];for(const u of i)this.getItem(u)?s.push(u):o.push(u);return s.length===0?Promise.resolve(null):this.__expandAll(s).then(()=>this._expandAll(o))}__expandAll(i){const s=[];for(let o=0,u=i.length;o<u;o++)s.push(this.expand(i[o]));return Promise.all(s)}collapse(i,s=!1){const o=this.getItem(i);return o?o.collapse(s):Promise.resolve(!1)}collapseAll(i=null,s=!1){i||(i=[this.input],s=!0);let o=[];for(let u=0,d=i.length;u<d;u++)o.push(this.collapse(i[u],s));return Promise.all(o)}toggleExpansion(i,s=!1){return this.isExpanded(i)?this.collapse(i,s):this.expand(i)}toggleExpansionAll(i){let s=[];for(let o=0,u=i.length;o<u;o++)s.push(this.toggleExpansion(i[o]));return Promise.all(s)}isExpanded(i){let s=this.getItem(i);return s?s.isExpanded():!1}getExpandedElements(){let i=[],s,o=this.getNavigator();for(;s=o.next();)s.isExpanded()&&i.push(s.getElement());return i}reveal(i,s=null){return this.resolveUnknownParentChain(i).then(o=>{let u=Promise.resolve(null);return o.forEach(d=>{u=u.then(()=>this.expand(d))}),u}).then(()=>{let o=this.getItem(i);if(o)return o.reveal(s)})}resolveUnknownParentChain(i){return this.context.dataSource.getParent(this.context.tree,i).then(s=>s?this.resolveUnknownParentChain(s).then(o=>(o.push(s),o)):Promise.resolve([]))}setHighlight(i,s){this.setTraits("highlighted",i?[i]:[]);let o={highlight:this.getHighlight(),payload:s};this._onDidHighlight.fire(o)}getHighlight(i=!1){let s=this.getElementsWithTrait("highlighted",i);return s.length===0?null:s[0]}isHighlighted(i){let s=this.getItem(i);return s?s.hasTrait("highlighted"):!1}select(i,s){this.selectAll([i],s)}selectAll(i,s){this.addTraits("selected",i);let o={selection:this.getSelection(),payload:s};this._onDidSelect.fire(o)}deselect(i,s){this.deselectAll([i],s)}deselectAll(i,s){this.removeTraits("selected",i);let o={selection:this.getSelection(),payload:s};this._onDidSelect.fire(o)}setSelection(i,s){this.setTraits("selected",i);let o={selection:this.getSelection(),payload:s};this._onDidSelect.fire(o)}isSelected(i){let s=this.getItem(i);return s?s.hasTrait("selected"):!1}getSelection(i=!1){return this.getElementsWithTrait("selected",i)}selectNext(i=1,s=!0,o){let u=this.getSelection(),d=u.length>0?u[0]:this.input,p,c=this.getNavigator(d,!1);for(let l=0;l<i&&(p=c.next(),!!p);l++)d=p;s?this.setSelection([d],o):this.select(d,o)}selectPrevious(i=1,s=!0,o){let u=this.getSelection(),d=null,p=null;if(u.length===0){let c=this.getNavigator(this.input);for(;d=c.next();)p=d;d=p}else{d=u[0];let c=this.getNavigator(d,!1);for(let l=0;l<i&&(p=c.previous(),!!p);l++)d=p}s?this.setSelection([d],o):this.select(d,o)}setFocus(i,s){this.setTraits("focused",i?[i]:[]);let o={focus:this.getFocus(),payload:s};this._onDidFocus.fire(o)}isFocused(i){let s=this.getItem(i);return s?s.hasTrait("focused"):!1}getFocus(i=!1){let s=this.getElementsWithTrait("focused",i);return s.length===0?null:s[0]}focusNext(i=1,s){let o=this.getFocus()||this.input,u,d=this.getNavigator(o,!1);for(let p=0;p<i&&(u=d.next(),!!u);p++)o=u;this.setFocus(o,s)}focusPrevious(i=1,s){let o=this.getFocus()||this.input,u,d=this.getNavigator(o,!1);for(let p=0;p<i&&(u=d.previous(),!!u);p++)o=u;this.setFocus(o,s)}focusParent(i){let s=this.getFocus()||this.input,u=this.getNavigator(s,!1).parent();u&&this.setFocus(u,i)}focusFirstChild(i){const s=this.getItem(this.getFocus()||this.input),o=this.getNavigator(s,!1),u=o.next();o.parent()===s&&this.setFocus(u,i)}focusFirst(i,s){this.focusNth(0,i,s)}focusNth(i,s,o){let u=this.getParent(o),d=this.getNavigator(u),p=d.first();for(let c=0;c<i;c++)p=d.next();p&&this.setFocus(p,s)}focusLast(i,s){const o=this.getParent(s);let u;s&&o?u=o.lastChild:u=this.getNavigator(o).last(),u&&this.setFocus(u,i)}getParent(i){if(i){const s=this.getItem(i);if(s&&s.parent)return s.parent}return this.getItem(this.input)}getNavigator(i=null,s=!0){return new h(this.getItem(i),s)}getItem(i=null){return i===null?this.input:i instanceof m?i:typeof i=="string"?this.registry.getItem(i):this.registry.getItem(this.context.dataSource.getId(this.context.tree,i))}addTraits(i,s){let o=this.traitsToItems[i]||{},u;for(let d=0,p=s.length;d<p;d++)u=this.getItem(s[d]),u&&(u.addTrait(i),o[u.id]=u);this.traitsToItems[i]=o}removeTraits(i,s){let o=this.traitsToItems[i]||{},u,d;if(s.length===0){for(d in o)o.hasOwnProperty(d)&&(u=o[d],u.removeTrait(i));delete this.traitsToItems[i]}else for(let p=0,c=s.length;p<c;p++)u=this.getItem(s[p]),u&&(u.removeTrait(i),delete o[u.id])}setTraits(i,s){if(s.length===0)this.removeTraits(i,s);else{let o={},u;for(let l=0,n=s.length;l<n;l++)u=this.getItem(s[l]),u&&(o[u.id]=u);let d=this.traitsToItems[i]||{},p=[],c;for(c in d)d.hasOwnProperty(c)&&(o.hasOwnProperty(c)?delete o[c]:p.push(d[c]));for(let l=0,n=p.length;l<n;l++)u=p[l],u.removeTrait(i),delete d[u.id];for(c in o)o.hasOwnProperty(c)&&(u=o[c],u.addTrait(i),d[c]=u);this.traitsToItems[i]=d}}getElementsWithTrait(i,s){let o=[],u=this.traitsToItems[i]||{},d;for(d in u)u.hasOwnProperty(d)&&(u[d].isVisible()||s)&&o.push(u[d].getElement());return o}}e.TreeModel=a}),define(Q[1532],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DashboardService=void 0;class y{constructor(){this._onDidOpenDashboard=new t.Emitter,this.onDidOpenDashboard=this._onDidOpenDashboard.event,this._onDidChangeToDashboard=new t.Emitter,this.onDidChangeToDashboard=this._onDidChangeToDashboard.event,this._onLayout=new t.Emitter,this.onLayout=this._onLayout.event}openDashboard(D){this._onDidOpenDashboard.fire(D)}changeToDashboard(D){this._onDidChangeToDashboard.fire(D)}layout(D){this._onLayout.fire(D)}}e.DashboardService=y}),define(Q[1533],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DashboardViewService=void 0;class y{constructor(){this._onRegisteredWebview=new t.Emitter,this.onRegisteredWebview=this._onRegisteredWebview.event,this._onRegisteredModelView=new t.Emitter,this.onRegisteredModelView=this._onRegisteredModelView.event}registerWebview(D){this._onRegisteredWebview.fire(D)}registerModelView(D){this._onRegisteredModelView.fire(D)}}e.DashboardViewService=y}),define(Q[1534],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelViewService=void 0;class y{constructor(){this._onRegisteredModelView=new t.Emitter,this.onRegisteredModelView=this._onRegisteredModelView.event}registerModelView(D){this._onRegisteredModelView.fire(D)}}e.ModelViewService=y}),define(Q[1535],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProfilerState=void 0;class y{constructor(){this._isPanelCollapsed=!1,this._onProfilerStateChange=new t.Emitter,this.onProfilerStateChange=this._onProfilerStateChange.event}get isConnected(){return this._isConnected}get isRunning(){return this._isRunning}get isPaused(){return this._isPaused}get isStopped(){return this._isStopped}get autoscroll(){return this._autoscroll}get isPanelCollapsed(){return this._isPanelCollapsed}dispose(){}change(D){let T={isConnected:!1,isRunning:!1,isPaused:!1,isStopped:!1,autoscroll:!1,isPanelCollapsed:!1},f=!1;typeof D.isConnected<"u"&&this._isConnected!==D.isConnected&&(this._isConnected=D.isConnected,T.isConnected=!0,f=!0),typeof D.isRunning<"u"&&this._isRunning!==D.isRunning&&(this._isRunning=D.isRunning,T.isRunning=!0,f=!0),typeof D.isPaused<"u"&&this._isPaused!==D.isPaused&&(this._isPaused=D.isPaused,T.isPaused=!0,f=!0),typeof D.isStopped<"u"&&this._isStopped!==D.isStopped&&(this._isStopped=D.isStopped,T.isStopped=!0,f=!0),typeof D.autoscroll<"u"&&this._autoscroll!==D.autoscroll&&(this._autoscroll=D.autoscroll,T.autoscroll=!0,f=!0),typeof D.isPanelCollapsed<"u"&&this._isPanelCollapsed!==D.isPanelCollapsed&&(this._isPanelCollapsed=D.isPanelCollapsed,T.isPanelCollapsed=!0,f=!0),f&&this._onProfilerStateChange.fire(T)}}e.ProfilerState=y}),define(Q[1536],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NewDashboardTabViewModel=void 0;class y{get updateTabListEvent(){return this._updateTabListEmitter.event}constructor(){this._updateTabListEmitter=new t.Emitter}updateDashboardTabs(D,T){let f=[];D.forEach(v=>{f.push({tabConfig:v})}),T.forEach(v=>{let m=f.find(S=>S.tabConfig===v);m&&(m.isOpened=!0)}),this._updateTabListEmitter.fire(f)}}e.NewDashboardTabViewModel=y}),define(Q[1537],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InsightsDialogModel=e.Conditional=void 0;var y;(function(D){D[D.equals=0]="equals",D[D.notEquals=1]="notEquals",D[D.greaterThanOrEquals=2]="greaterThanOrEquals",D[D.greaterThan=3]="greaterThan",D[D.lessThanOrEquals=4]="lessThanOrEquals",D[D.lessThan=5]="lessThan",D[D.always=6]="always"})(y||(e.Conditional=y={}));class b{constructor(){this._onDataChangeEmitter=new t.Emitter,this._onDataChangeEvent=this._onDataChangeEmitter.event,this.onDataChange=t.Event.debounce(this._onDataChangeEvent,(T,f)=>f,75,!1)}set insight(T){this._insight=T}set rows(T){this._rows=T,this._onDataChangeEmitter.fire()}get rows(){return this._rows}set columns(T){this._columns=T,this._onDataChangeEmitter.fire()}get columns(){return this._columns}reset(){this._columns=[],this._rows=[],this._onDataChangeEmitter.fire()}getListResources(T,f){return this.rows.map(v=>{let m=v[T],S=v[f],h=this.calcInsightState(S),a=v,r=typeof this._insight.label=="object"?this._insight.label.icon:void 0,i={title:!1,label:m,value:S,icon:r,data:a};return h&&(i[h.type]=h.val),i})}calcInsightState(T){if(typeof this._insight.label!="string"){let f=this._insight.label;for(let v of f.state)switch(y[v.condition.if]){case y.always:return v.color?{type:"stateColor",val:v.color}:{type:"stateIcon",val:v.icon};case y.equals:if(T===v.condition.equals)return v.color?{type:"stateColor",val:v.color}:{type:"stateIcon",val:v.icon};break;case y.notEquals:if(T!==v.condition.equals)return v.color?{type:"stateColor",val:v.color}:{type:"stateIcon",val:v.icon};break;case y.greaterThanOrEquals:if(parseInt(T)>=parseInt(v.condition.equals))return v.color?{type:"stateColor",val:v.color}:{type:"stateIcon",val:v.icon};break;case y.greaterThan:if(parseInt(T)>parseInt(v.condition.equals))return v.color?{type:"stateColor",val:v.color}:{type:"stateIcon",val:v.icon};break;case y.lessThanOrEquals:if(parseInt(T)<=parseInt(v.condition.equals))return v.color?{type:"stateColor",val:v.color}:{type:"stateIcon",val:v.icon};break;case y.lessThan:if(parseInt(T)<parseInt(v.condition.equals))return v.color?{type:"stateColor",val:v.color}:{type:"stateIcon",val:v.icon};break}}}}e.InsightsDialogModel=b}),define(Q[97],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWCOEnabled=e.isStandalone=e.isAndroid=e.isElectron=e.isWebkitWebView=e.isSafari=e.isChrome=e.isWebKit=e.isFirefox=e.onDidChangeFullscreen=e.isFullscreen=e.setFullscreen=e.setZoomFactor=e.getZoomFactor=e.getZoomLevel=e.setZoomLevel=e.PixelRatio=e.addMatchMediaChangeListener=void 0;class b{constructor(){this._zoomLevel=0,this._zoomFactor=1,this._fullscreen=!1,this._onDidChangeFullscreen=new t.Emitter,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event}static{this.INSTANCE=new b}getZoomLevel(){return this._zoomLevel}setZoomLevel(c){this._zoomLevel!==c&&(this._zoomLevel=c)}getZoomFactor(){return this._zoomFactor}setZoomFactor(c){this._zoomFactor=c}setFullscreen(c){this._fullscreen!==c&&(this._fullscreen=c,this._onDidChangeFullscreen.fire())}isFullscreen(){return this._fullscreen}}class D extends y.Disposable{constructor(){super(),this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(c){this._mediaQueryList?.removeEventListener("change",this._listener),this._mediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),c&&this._onDidChange.fire()}}class T extends y.Disposable{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const c=this._register(new D);this._register(c.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){const c=document.createElement("canvas").getContext("2d"),l=window.devicePixelRatio||1,n=c.webkitBackingStorePixelRatio||c.mozBackingStorePixelRatio||c.msBackingStorePixelRatio||c.oBackingStorePixelRatio||c.backingStorePixelRatio||1;return l/n}}class f{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=(0,y.markAsSingleton)(new T)),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}}function v(p,c){typeof p=="string"&&(p=window.matchMedia(p)),p.addEventListener("change",c)}e.addMatchMediaChangeListener=v,e.PixelRatio=new f;function m(p){b.INSTANCE.setZoomLevel(p)}e.setZoomLevel=m;function S(){return b.INSTANCE.getZoomLevel()}e.getZoomLevel=S;function h(){return b.INSTANCE.getZoomFactor()}e.getZoomFactor=h;function a(p){b.INSTANCE.setZoomFactor(p)}e.setZoomFactor=a;function r(p){b.INSTANCE.setFullscreen(p)}e.setFullscreen=r;function i(){return b.INSTANCE.isFullscreen()}e.isFullscreen=i,e.onDidChangeFullscreen=b.INSTANCE.onDidChangeFullscreen;const s=navigator.userAgent;e.isFirefox=s.indexOf("Firefox")>=0,e.isWebKit=s.indexOf("AppleWebKit")>=0,e.isChrome=s.indexOf("Chrome")>=0,e.isSafari=!e.isChrome&&s.indexOf("Safari")>=0,e.isWebkitWebView=!e.isChrome&&!e.isSafari&&e.isWebKit,e.isElectron=s.indexOf("Electron/")>=0,e.isAndroid=s.indexOf("Android")>=0;let o=!1;if(window.matchMedia){const p=window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),c=window.matchMedia("(display-mode: fullscreen)");o=p.matches,v(p,({matches:l})=>{o&&c.matches||(o=l)})}function u(){return o}e.isStandalone=u;function d(){return navigator?.windowControlsOverlay?.visible}e.isWCOEnabled=d}),define(Q[227],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomEmitter=void 0;class y{get event(){return this.emitter.event}constructor(D,T,f){const v=m=>this.emitter.fire(m);this.emitter=new t.Emitter({onWillAddFirstListener:()=>D.addEventListener(T,v,f),onDidRemoveLastListener:()=>D.removeEventListener(T,v,f)})}dispose(){this.emitter.dispose()}}e.DomEmitter=y}),define(Q[31],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const y=Object.freeze(function(f,v){const m=setTimeout(f.bind(v),0);return{dispose(){clearTimeout(m)}}});var b;(function(f){function v(m){return m===f.None||m===f.Cancelled||m instanceof D?!0:!m||typeof m!="object"?!1:typeof m.isCancellationRequested=="boolean"&&typeof m.onCancellationRequested=="function"}f.isCancellationToken=v,f.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:t.Event.None}),f.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:y})})(b||(e.CancellationToken=b={}));class D{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?y:(this._emitter||(this._emitter=new t.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class T{constructor(v){this._token=void 0,this._parentListener=void 0,this._parentListener=v&&v.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new D),this._token}cancel(){this._token?this._token instanceof D&&this._token.cancel():this._token=b.Cancelled}dispose(v=!1){v&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof D&&this._token.dispose():this._token=b.None}}e.CancellationTokenSource=T}),define(Q[558],Y([1,0,31,6,4]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncDataProvider=e.VirtualizedCollection=void 0;class D{constructor(m,S,h){this.loadFunction=m,this.placeholderItemGenerator=S,this.loadCompleteCallback=h,this._length=0,this._offsetFromDataSource=-1,this.cancellationToken=new t.CancellationTokenSource}dispose(){this._data=void 0,this.cancellationToken.cancel()}getStartIndex(){return this._offsetFromDataSource}getEndIndex(){return this._offsetFromDataSource+this._length}contains(m){return m>=this.getStartIndex()&&m<this.getEndIndex()}getItem(m){return this._data?this._data[m-this._offsetFromDataSource]:this.placeholderItemGenerator(m)}positionWindow(m,S){this._offsetFromDataSource=m,this._length=S,this._data=void 0,this.cancellationToken.cancel(),this.cancellationToken=new t.CancellationTokenSource;const h=this.cancellationToken;S!==0&&this.loadFunction(m,S).then(a=>{h.token.isCancellationRequested||(this._data=a,this.loadCompleteCallback(this._offsetFromDataSource,this._offsetFromDataSource+this._length))})}}class T extends b.Disposable{constructor(m,S,h,a){super(),this.windowSize=m,this.placeHolderGenerator=S,this.length=h,this._lengthChanged=!1;let r=(i,s)=>{this.collectionChangedCallback&&this.collectionChangedCallback(i,s-i)};this._bufferWindowBefore=this._register(new D(a,S,r)),this._window=this._register(new D(a,S,r)),this._bufferWindowAfter=this._register(new D(a,S,r))}setCollectionChangedCallback(m){this.collectionChangedCallback=m}getLength(){return this.length}setLength(m){this.length!==m&&(this._lengthChanged=!0,this.length=m)}at(m){return this.getRange(m,m+1)[0]}getRange(m,S){let h=this.getRangeFromCurrent(m,S);if(this._lengthChanged||m<this._bufferWindowBefore.getStartIndex()||S>this._bufferWindowAfter.getEndIndex())this._lengthChanged=!1,this.resetWindowsAroundIndex(m);else if(S<=this._bufferWindowBefore.getEndIndex()){let a=this._bufferWindowAfter;this._bufferWindowAfter=this._window,this._window=this._bufferWindowBefore,this._bufferWindowBefore=a;let r=Math.max(0,this._window.getStartIndex()-this.windowSize);this._bufferWindowBefore.positionWindow(r,this._window.getStartIndex()-r)}else if(m>=this._bufferWindowAfter.getStartIndex()){let a=this._bufferWindowBefore;this._bufferWindowBefore=this._window,this._window=this._bufferWindowAfter,this._bufferWindowAfter=a;let r=Math.min(this._window.getStartIndex()+this.windowSize,this.length),i=Math.min(this.length-r,this.windowSize);this._bufferWindowAfter.positionWindow(r,i)}return h}getRangeFromCurrent(m,S){const h=[];for(let a=0;a<S-m;a++)h.push(this.getDataFromCurrent(m+a));return h}getDataFromCurrent(m){return this._bufferWindowBefore.contains(m)?this._bufferWindowBefore.getItem(m):this._bufferWindowAfter.contains(m)?this._bufferWindowAfter.getItem(m):this._window.contains(m)?this._window.getItem(m):this.placeHolderGenerator(m)}resetWindowsAroundIndex(m){let S=Math.max(0,m-this.windowSize*1.5),h=Math.max(0,m-this.windowSize/2);this._bufferWindowBefore.positionWindow(S,h-S);let a=h,r=Math.min(a+this.windowSize,this.length);this._window.positionWindow(a,r-a);let i=r,s=Math.min(i+this.windowSize,this.length);this._bufferWindowAfter.positionWindow(i,s-i)}}e.VirtualizedCollection=T;class f extends b.Disposable{get onFilterStateChange(){return this._onFilterStateChange.event}get onSortComplete(){return this._onSortComplete.event}constructor(m){super(),this.dataRows=m,this._onFilterStateChange=this._register(new y.Emitter),this._onSortComplete=this._register(new y.Emitter),this._register(m)}get isDataInMemory(){return!1}getRangeAsync(m,S){throw new Error("Method not implemented.")}getColumnValues(m){throw new Error("Method not implemented.")}sort(m){throw new Error("Method not implemented.")}filter(m){throw new Error("Method not implemented.")}getLength(){return this.dataRows.getLength()}getItem(m){return this.dataRows.at(m)}getRange(m,S){return this.dataRows.getRange(m,S)}set length(m){this.dataRows.setLength(m)}get length(){return this.dataRows.getLength()}getItems(){throw new Error("Method not supported.")}}e.AsyncDataProvider=f}),define(Q[650],Y([1,0,31]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedFunction=e.LRUCachedFunction=e.Cache=void 0;class y{constructor(f){this.task=f,this.result=null}get(){if(this.result)return this.result;const f=new t.CancellationTokenSource,v=this.task(f.token);return this.result={promise:v,dispose:()=>{this.result=null,f.cancel(),f.dispose()}},this.result}}e.Cache=y;class b{constructor(f){this.fn=f,this.lastCache=void 0,this.lastArgKey=void 0}get(f){const v=JSON.stringify(f);return this.lastArgKey!==v&&(this.lastArgKey=v,this.lastCache=this.fn(f)),this.lastCache}}e.LRUCachedFunction=b;class D{get cachedValues(){return this._map}constructor(f){this.fn=f,this._map=new Map}get(f){if(this._map.has(f))return this._map.get(f);const v=this.fn(f);return this._map.set(f,v),v}}e.CachedFunction=D}),define(Q[1032],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IME=e.IMEImpl=void 0;class y{constructor(){this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}e.IMEImpl=y,e.IME=new y}),define(Q[785],Y([1,0,20,31,15]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mapPager=e.DelayedPagedModel=e.PagedModel=e.singlePagePager=void 0;function D(S){return{isResolved:!!S,promise:null,cts:null,promiseIndexes:new Set,elements:S||[]}}function T(S){return{firstPage:S,total:S.length,pageSize:S.length,getPage:(h,a)=>Promise.resolve(S)}}e.singlePagePager=T;class f{get length(){return this.pager.total}constructor(h){this.pages=[],this.pager=Array.isArray(h)?T(h):h;const a=Math.ceil(this.pager.total/this.pager.pageSize);this.pages=[D(this.pager.firstPage.slice()),...(0,t.range)(a-1).map(()=>D())]}isResolved(h){const a=Math.floor(h/this.pager.pageSize);return!!this.pages[a].isResolved}get(h){const a=Math.floor(h/this.pager.pageSize),r=h%this.pager.pageSize;return this.pages[a].elements[r]}resolve(h,a){if(a.isCancellationRequested)return Promise.reject((0,b.canceled)());const r=Math.floor(h/this.pager.pageSize),i=h%this.pager.pageSize,s=this.pages[r];return s.isResolved?Promise.resolve(s.elements[i]):(s.promise||(s.cts=new y.CancellationTokenSource,s.promise=this.pager.getPage(r,s.cts.token).then(o=>{s.elements=o,s.isResolved=!0,s.promise=null,s.cts=null},o=>(s.isResolved=!1,s.promise=null,s.cts=null,Promise.reject(o)))),a.onCancellationRequested(()=>{s.cts&&(s.promiseIndexes.delete(h),s.promiseIndexes.size===0&&s.cts.cancel())}),s.promiseIndexes.add(h),s.promise.then(()=>s.elements[i]))}}e.PagedModel=f;class v{get length(){return this.model.length}constructor(h,a=500){this.model=h,this.timeout=a}isResolved(h){return this.model.isResolved(h)}get(h){return this.model.get(h)}resolve(h,a){return new Promise((r,i)=>{if(a.isCancellationRequested)return i((0,b.canceled)());const s=setTimeout(()=>{if(a.isCancellationRequested)return i((0,b.canceled)());o.dispose(),this.model.resolve(h,a).then(r,i)},this.timeout),o=a.onCancellationRequested(()=>{clearTimeout(s),o.dispose(),i((0,b.canceled)())})})}}e.DelayedPagedModel=v;function m(S,h){return{firstPage:S.firstPage.map(h),total:S.total,pageSize:S.pageSize,getPage:(a,r)=>S.getPage(a,r).then(i=>i.map(h))}}e.mapPager=m}),define(Q[481],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmoothScrollingOperation=e.SmoothScrollingUpdate=e.Scrollable=e.ScrollState=e.ScrollbarVisibility=void 0;var b;(function(r){r[r.Auto=1]="Auto",r[r.Hidden=2]="Hidden",r[r.Visible=3]="Visible"})(b||(e.ScrollbarVisibility=b={}));class D{constructor(i,s,o,u,d,p,c){this._forceIntegerValues=i,this._scrollStateBrand=void 0,this._forceIntegerValues&&(s=s|0,o=o|0,u=u|0,d=d|0,p=p|0,c=c|0),this.rawScrollLeft=u,this.rawScrollTop=c,s<0&&(s=0),u+s>o&&(u=o-s),u<0&&(u=0),d<0&&(d=0),c+d>p&&(c=p-d),c<0&&(c=0),this.width=s,this.scrollWidth=o,this.scrollLeft=u,this.height=d,this.scrollHeight=p,this.scrollTop=c}equals(i){return this.rawScrollLeft===i.rawScrollLeft&&this.rawScrollTop===i.rawScrollTop&&this.width===i.width&&this.scrollWidth===i.scrollWidth&&this.scrollLeft===i.scrollLeft&&this.height===i.height&&this.scrollHeight===i.scrollHeight&&this.scrollTop===i.scrollTop}withScrollDimensions(i,s){return new D(this._forceIntegerValues,typeof i.width<"u"?i.width:this.width,typeof i.scrollWidth<"u"?i.scrollWidth:this.scrollWidth,s?this.rawScrollLeft:this.scrollLeft,typeof i.height<"u"?i.height:this.height,typeof i.scrollHeight<"u"?i.scrollHeight:this.scrollHeight,s?this.rawScrollTop:this.scrollTop)}withScrollPosition(i){return new D(this._forceIntegerValues,this.width,this.scrollWidth,typeof i.scrollLeft<"u"?i.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof i.scrollTop<"u"?i.scrollTop:this.rawScrollTop)}createScrollEvent(i,s){const o=this.width!==i.width,u=this.scrollWidth!==i.scrollWidth,d=this.scrollLeft!==i.scrollLeft,p=this.height!==i.height,c=this.scrollHeight!==i.scrollHeight,l=this.scrollTop!==i.scrollTop;return{inSmoothScrolling:s,oldWidth:i.width,oldScrollWidth:i.scrollWidth,oldScrollLeft:i.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:i.height,oldScrollHeight:i.scrollHeight,oldScrollTop:i.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:o,scrollWidthChanged:u,scrollLeftChanged:d,heightChanged:p,scrollHeightChanged:c,scrollTopChanged:l}}}e.ScrollState=D;class T extends y.Disposable{constructor(i){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new t.Emitter),this.onScroll=this._onScroll.event,this._smoothScrollDuration=i.smoothScrollDuration,this._scheduleAtNextAnimationFrame=i.scheduleAtNextAnimationFrame,this._state=new D(i.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(i){this._smoothScrollDuration=i}validateScrollPosition(i){return this._state.withScrollPosition(i)}getScrollDimensions(){return this._state}setScrollDimensions(i,s){const o=this._state.withScrollDimensions(i,s);this._setState(o,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(i){const s=this._state.withScrollPosition(i);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(s,!1)}setScrollPositionSmooth(i,s){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(i);if(this._smoothScrolling){i={scrollLeft:typeof i.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:i.scrollLeft,scrollTop:typeof i.scrollTop>"u"?this._smoothScrolling.to.scrollTop:i.scrollTop};const o=this._state.withScrollPosition(i);if(this._smoothScrolling.to.scrollLeft===o.scrollLeft&&this._smoothScrolling.to.scrollTop===o.scrollTop)return;let u;s?u=new S(this._smoothScrolling.from,o,this._smoothScrolling.startTime,this._smoothScrolling.duration):u=this._smoothScrolling.combine(this._state,o,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=u}else{const o=this._state.withScrollPosition(i);this._smoothScrolling=S.start(this._state,o,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;const i=this._smoothScrolling.tick(),s=this._state.withScrollPosition(i);if(this._setState(s,!0),!!this._smoothScrolling){if(i.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(i,s){const o=this._state;o.equals(i)||(this._state=i,this._onScroll.fire(this._state.createScrollEvent(o,s)))}}e.Scrollable=T;class f{constructor(i,s,o){this.scrollLeft=i,this.scrollTop=s,this.isDone=o}}e.SmoothScrollingUpdate=f;function v(r,i){const s=i-r;return function(o){return r+s*a(o)}}function m(r,i,s){return function(o){return o<s?r(o/s):i((o-s)/(1-s))}}class S{constructor(i,s,o,u){this.from=i,this.to=s,this.duration=u,this.startTime=o,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(i,s,o){if(Math.abs(i-s)>2.5*o){let d,p;return i<s?(d=i+.75*o,p=s-.75*o):(d=i-.75*o,p=s+.75*o),m(v(i,d),v(p,s),.33)}return v(i,s)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(i){this.to=i.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(i){const s=(i-this.startTime)/this.duration;if(s<1){const o=this.scrollLeft(s),u=this.scrollTop(s);return new f(o,u,!1)}return new f(this.to.scrollLeft,this.to.scrollTop,!0)}combine(i,s,o){return S.start(i,s,o)}static start(i,s,o){o=o+10;const u=Date.now()-10;return new S(i,s,u,o)}}e.SmoothScrollingOperation=S;function h(r){return Math.pow(r,3)}function a(r){return 1-h(1-r)}}),define(Q[1538],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sequence=void 0;class y{constructor(){this.elements=[],this._onDidSplice=new t.Emitter,this.onDidSplice=this._onDidSplice.event}splice(D,T,f=[]){this.elements.splice(D,T,...f),this._onDidSplice.fire({start:D,deleteCount:T,toInsert:f})}}e.Sequence=y}),define(Q[300],Y([1,0,15,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prefixedStream=e.prefixedReadable=e.transform=e.toReadable=e.emptyStream=e.toStream=e.peekStream=e.listenStream=e.consumeStream=e.peekReadable=e.consumeReadable=e.newWriteableStream=e.isReadableBufferedStream=e.isReadableStream=e.isReadable=void 0;function b(c){const l=c;return l?typeof l.read=="function":!1}e.isReadable=b;function D(c){const l=c;return l?[l.on,l.pause,l.resume,l.destroy].every(n=>typeof n=="function"):!1}e.isReadableStream=D;function T(c){const l=c;return l?D(l.stream)&&Array.isArray(l.buffer)&&typeof l.ended=="boolean":!1}e.isReadableBufferedStream=T;function f(c,l){return new v(c,l)}e.newWriteableStream=f;class v{constructor(l,n){this.reducer=l,this.options=n,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(l){if(!this.state.destroyed){if(this.state.flowing)this.emitData(l);else if(this.buffer.data.push(l),typeof this.options?.highWaterMark=="number"&&this.buffer.data.length>this.options.highWaterMark)return new Promise(n=>this.pendingWritePromises.push(n))}}error(l){this.state.destroyed||(this.state.flowing?this.emitError(l):this.buffer.error.push(l))}end(l){this.state.destroyed||(typeof l<"u"&&this.write(l),this.state.flowing?(this.emitEnd(),this.destroy()):this.state.ended=!0)}emitData(l){this.listeners.data.slice(0).forEach(n=>n(l))}emitError(l){this.listeners.error.length===0?(0,t.onUnexpectedError)(l):this.listeners.error.slice(0).forEach(n=>n(l))}emitEnd(){this.listeners.end.slice(0).forEach(l=>l())}on(l,n){if(!this.state.destroyed)switch(l){case"data":this.listeners.data.push(n),this.resume();break;case"end":this.listeners.end.push(n),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(n),this.state.flowing&&this.flowErrors();break}}removeListener(l,n){if(this.state.destroyed)return;let g;switch(l){case"data":g=this.listeners.data;break;case"end":g=this.listeners.end;break;case"error":g=this.listeners.error;break}if(g){const w=g.indexOf(n);w>=0&&g.splice(w,1)}}flowData(){if(this.buffer.data.length>0){const l=this.reducer(this.buffer.data);this.emitData(l),this.buffer.data.length=0;const n=[...this.pendingWritePromises];this.pendingWritePromises.length=0,n.forEach(g=>g())}}flowErrors(){if(this.listeners.error.length>0){for(const l of this.buffer.error)this.emitError(l);this.buffer.error.length=0}}flowEnd(){return this.state.ended?(this.emitEnd(),this.listeners.end.length>0):!1}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)}}function m(c,l){const n=[];let g;for(;(g=c.read())!==null;)n.push(g);return l(n)}e.consumeReadable=m;function S(c,l,n){const g=[];let w;for(;(w=c.read())!==null&&g.length<n;)g.push(w);return w===null&&g.length>0?l(g):{read:()=>{if(g.length>0)return g.shift();if(typeof w<"u"){const E=w;return w=void 0,E}return c.read()}}}e.peekReadable=S;function h(c,l){return new Promise((n,g)=>{const w=[];a(c,{onData:E=>{l&&w.push(E)},onError:E=>{l?g(E):n(void 0)},onEnd:()=>{n(l?l(w):void 0)}})})}e.consumeStream=h;function a(c,l,n){c.on("error",g=>{n?.isCancellationRequested||l.onError(g)}),c.on("end",()=>{n?.isCancellationRequested||l.onEnd()}),c.on("data",g=>{n?.isCancellationRequested||l.onData(g)})}e.listenStream=a;function r(c,l){return new Promise((n,g)=>{const w=new y.DisposableStore,E=[],C=A=>{if(E.push(A),E.length>l)return w.dispose(),c.pause(),n({stream:c,buffer:E,ended:!1})},I=A=>g(A),_=()=>n({stream:c,buffer:E,ended:!0});w.add((0,y.toDisposable)(()=>c.removeListener("error",I))),c.on("error",I),w.add((0,y.toDisposable)(()=>c.removeListener("end",_))),c.on("end",_),w.add((0,y.toDisposable)(()=>c.removeListener("data",C))),c.on("data",C)})}e.peekStream=r;function i(c,l){const n=f(l);return n.end(c),n}e.toStream=i;function s(){const c=f(()=>{throw new Error("not supported")});return c.end(),c}e.emptyStream=s;function o(c){let l=!1;return{read:()=>l?null:(l=!0,c)}}e.toReadable=o;function u(c,l,n){const g=f(n);return a(c,{onData:w=>g.write(l.data(w)),onError:w=>g.error(l.error?l.error(w):w),onEnd:()=>g.end()}),g}e.transform=u;function d(c,l,n){let g=!1;return{read:()=>{const w=l.read();return g?w:(g=!0,w!==null?n([c,w]):c)}}}e.prefixedReadable=d;function p(c,l,n){let g=!1;const w=f(n);return a(l,{onData:E=>g?w.write(E):(g=!0,w.write(n([c,E]))),onError:E=>w.error(E),onEnd:()=>{g||(g=!0,w.write(c)),w.end()}}),w}e.prefixedStream=p}),define(Q[62],Y([1,0,203,300]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeBase64=e.decodeBase64=e.prefixedBufferStream=e.prefixedBufferReadable=e.newWriteableBufferStream=e.streamToBufferReadableStream=e.bufferToStream=e.bufferedStreamToBuffer=e.streamToBuffer=e.bufferToReadable=e.readableToBuffer=e.writeUInt8=e.readUInt8=e.writeUInt32LE=e.readUInt32LE=e.writeUInt32BE=e.readUInt32BE=e.writeUInt16LE=e.readUInt16LE=e.binaryIndexOf=e.VSBuffer=void 0;const b=typeof Buffer<"u",D=new t.Lazy(()=>new Uint8Array(256));let T,f;class v{static alloc(R){return b?new v(Buffer.allocUnsafe(R)):new v(new Uint8Array(R))}static wrap(R){return b&&!Buffer.isBuffer(R)&&(R=Buffer.from(R.buffer,R.byteOffset,R.byteLength)),new v(R)}static fromString(R,M){return!(M?.dontUseNodeBuffer||!1)&&b?new v(Buffer.from(R)):(T||(T=new TextEncoder),new v(T.encode(R)))}static fromByteArray(R){const M=v.alloc(R.length);for(let N=0,P=R.length;N<P;N++)M.buffer[N]=R[N];return M}static concat(R,M){if(typeof M>"u"){M=0;for(let x=0,F=R.length;x<F;x++)M+=R[x].byteLength}const N=v.alloc(M);let P=0;for(let x=0,F=R.length;x<F;x++){const V=R[x];N.set(V,P),P+=V.byteLength}return N}constructor(R){this.buffer=R,this.byteLength=this.buffer.byteLength}clone(){const R=v.alloc(this.byteLength);return R.set(this),R}toString(){return b?this.buffer.toString():(f||(f=new TextDecoder),f.decode(this.buffer))}slice(R,M){return new v(this.buffer.subarray(R,M))}set(R,M){if(R instanceof v)this.buffer.set(R.buffer,M);else if(R instanceof Uint8Array)this.buffer.set(R,M);else if(R instanceof ArrayBuffer)this.buffer.set(new Uint8Array(R),M);else if(ArrayBuffer.isView(R))this.buffer.set(new Uint8Array(R.buffer,R.byteOffset,R.byteLength),M);else throw new Error("Unknown argument 'array'")}readUInt32BE(R){return a(this.buffer,R)}writeUInt32BE(R,M){r(this.buffer,R,M)}readUInt32LE(R){return i(this.buffer,R)}writeUInt32LE(R,M){s(this.buffer,R,M)}readUInt8(R){return o(this.buffer,R)}writeUInt8(R,M){u(this.buffer,R,M)}indexOf(R,M=0){return m(this.buffer,R instanceof v?R.buffer:R,M)}}e.VSBuffer=v;function m(L,R,M=0){const N=R.byteLength,P=L.byteLength;if(N===0)return 0;if(N===1)return L.indexOf(R[0]);if(N>P-M)return-1;const x=D.value;x.fill(R.length);for(let z=0;z<R.length;z++)x[R[z]]=R.length-z-1;let F=M+R.length-1,V=F,W=-1;for(;F<P;)if(L[F]===R[V]){if(V===0){W=F;break}F--,V--}else F+=Math.max(R.length-V,x[L[F]]),V=R.length-1;return W}e.binaryIndexOf=m;function S(L,R){return L[R+0]<<0>>>0|L[R+1]<<8>>>0}e.readUInt16LE=S;function h(L,R,M){L[M+0]=R&255,R=R>>>8,L[M+1]=R&255}e.writeUInt16LE=h;function a(L,R){return L[R]*2**24+L[R+1]*2**16+L[R+2]*2**8+L[R+3]}e.readUInt32BE=a;function r(L,R,M){L[M+3]=R,R=R>>>8,L[M+2]=R,R=R>>>8,L[M+1]=R,R=R>>>8,L[M]=R}e.writeUInt32BE=r;function i(L,R){return L[R+0]<<0>>>0|L[R+1]<<8>>>0|L[R+2]<<16>>>0|L[R+3]<<24>>>0}e.readUInt32LE=i;function s(L,R,M){L[M+0]=R&255,R=R>>>8,L[M+1]=R&255,R=R>>>8,L[M+2]=R&255,R=R>>>8,L[M+3]=R&255}e.writeUInt32LE=s;function o(L,R){return L[R]}e.readUInt8=o;function u(L,R,M){L[M]=R}e.writeUInt8=u;function d(L){return y.consumeReadable(L,R=>v.concat(R))}e.readableToBuffer=d;function p(L){return y.toReadable(L)}e.bufferToReadable=p;function c(L){return y.consumeStream(L,R=>v.concat(R))}e.streamToBuffer=c;async function l(L){return L.ended?v.concat(L.buffer):v.concat([...L.buffer,await c(L.stream)])}e.bufferedStreamToBuffer=l;function n(L){return y.toStream(L,R=>v.concat(R))}e.bufferToStream=n;function g(L){return y.transform(L,{data:R=>typeof R=="string"?v.fromString(R):v.wrap(R)},R=>v.concat(R))}e.streamToBufferReadableStream=g;function w(L){return y.newWriteableStream(R=>v.concat(R),L)}e.newWriteableBufferStream=w;function E(L,R){return y.prefixedReadable(L,R,M=>v.concat(M))}e.prefixedBufferReadable=E;function C(L,R){return y.prefixedStream(L,R,M=>v.concat(M))}e.prefixedBufferStream=C;function I(L){let R=0,M=0,N=0;const P=new Uint8Array(Math.floor(L.length/4*3)),x=V=>{switch(M){case 3:P[N++]=R|V,M=0;break;case 2:P[N++]=R|V>>>2,R=V<<6,M=3;break;case 1:P[N++]=R|V>>>4,R=V<<4,M=2;break;default:R=V<<2,M=1}};for(let V=0;V<L.length;V++){const W=L.charCodeAt(V);if(W>=65&&W<=90)x(W-65);else if(W>=97&&W<=122)x(W-97+26);else if(W>=48&&W<=57)x(W-48+52);else if(W===43||W===45)x(62);else if(W===47||W===95)x(63);else{if(W===61)break;throw new SyntaxError(`Unexpected base64 character ${L[V]}`)}}const F=N;for(;M>0;)x(0);return v.wrap(P).slice(0,F)}e.decodeBase64=I;const _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function k({buffer:L},R=!0,M=!1){const N=M?A:_;let P="";const x=L.byteLength%3;let F=0;for(;F<L.byteLength-x;F+=3){const V=L[F+0],W=L[F+1],z=L[F+2];P+=N[V>>>2],P+=N[(V<<4|W>>>4)&63],P+=N[(W<<2|z>>>6)&63],P+=N[z&63]}if(x===1){const V=L[F+0];P+=N[V>>>2],P+=N[V<<4&63],R&&(P+="==")}else if(x===2){const V=L[F+0],W=L[F+1];P+=N[V>>>2],P+=N[(V<<4|W>>>4)&63],P+=N[W<<2&63],R&&(P+="=")}return P}e.encodeBase64=k}),define(Q[33],Y([1,0,650,203]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvisibleCharacters=e.AmbiguousCharacters=e.noBreakWhitespace=e.getLeftDeleteOffset=e.GraphemeBreakType=e.getGraphemeBreakType=e.singleLetterHash=e.getNLines=e.uppercaseFirstLetter=e.containsUppercaseCharacter=e.fuzzyContains=e.repeat=e.stripUTF8BOM=e.startsWithUTF8BOM=e.UTF8_BOM_CHARACTER=e.removeAnsiEscapeCodes=e.lcut=e.isEmojiImprecise=e.isFullWidthCharacter=e.containsUnusualLineTerminators=e.UNUSUAL_LINE_TERMINATORS=e.isBasicASCII=e.containsRTL=e.charCount=e.getCharContainingOffset=e.prevCharLength=e.nextCharLength=e.GraphemeIterator=e.CodePointIterator=e.getNextCodePoint=e.computeCodePoint=e.isLowSurrogate=e.isHighSurrogate=e.commonSuffixLength=e.commonPrefixLength=e.startsWithIgnoreCase=e.equalsIgnoreCase=e.isUpperAsciiLetter=e.isLowerAsciiLetter=e.isAsciiDigit=e.compareSubstringIgnoreCase=e.compareIgnoreCase=e.compareSubstring=e.compare=e.replaceAsync=e.lastNonWhitespaceIndex=e.getLeadingWhitespace=e.firstNonWhitespaceIndex=e.splitLines=e.regExpLeadsToEndlessLoop=e.createRegExp=e.stripWildcards=e.convertSimple2RegExpPattern=e.rtrim=e.ltrim=e.trim=e.truncate=e.count=e.escapeRegExpCharacters=e.escape=e.format2=e.format=e.isFalsyOrWhitespace=void 0;function b(Ce){return!Ce||typeof Ce!="string"?!0:Ce.trim().length===0}e.isFalsyOrWhitespace=b;const D=/{(\d+)}/g;function T(Ce,..._e){return _e.length===0?Ce:Ce.replace(D,function(me,ke){const Ee=parseInt(ke,10);return isNaN(Ee)||Ee<0||Ee>=_e.length?me:_e[Ee]})}e.format=T;const f=/{([^}]+)}/g;function v(Ce,_e){return Ce.replace(f,(me,ke)=>_e[ke]??me)}e.format2=v;function m(Ce){return Ce.replace(/[<>&]/g,function(_e){switch(_e){case"<":return"<";case">":return">";case"&":return"&";default:return _e}})}e.escape=m;function S(Ce){return Ce.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}e.escapeRegExpCharacters=S;function h(Ce,_e){let me=0;const ke=_e.charCodeAt(0);for(let Ee=Ce.length-1;Ee>=0;Ee--)Ce.charCodeAt(Ee)===ke&&me++;return me}e.count=h;function a(Ce,_e,me="\u2026"){return Ce.length<=_e?Ce:`${Ce.substr(0,_e)}${me}`}e.truncate=a;function r(Ce,_e=" "){const me=i(Ce,_e);return s(me,_e)}e.trim=r;function i(Ce,_e){if(!Ce||!_e)return Ce;const me=_e.length;if(me===0||Ce.length===0)return Ce;let ke=0;for(;Ce.indexOf(_e,ke)===ke;)ke=ke+me;return Ce.substring(ke)}e.ltrim=i;function s(Ce,_e){if(!Ce||!_e)return Ce;const me=_e.length,ke=Ce.length;if(me===0||ke===0)return Ce;let Ee=ke,pe=-1;for(;pe=Ce.lastIndexOf(_e,Ee-1),!(pe===-1||pe+me!==Ee);){if(pe===0)return"";Ee=pe}return Ce.substring(0,Ee)}e.rtrim=s;function o(Ce){return Ce.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}e.convertSimple2RegExpPattern=o;function u(Ce){return Ce.replace(/\*/g,"")}e.stripWildcards=u;function d(Ce,_e,me={}){if(!Ce)throw new Error("Cannot create regex from empty string");_e||(Ce=S(Ce)),me.wholeWord&&(/\B/.test(Ce.charAt(0))||(Ce="\\b"+Ce),/\B/.test(Ce.charAt(Ce.length-1))||(Ce=Ce+"\\b"));let ke="";return me.global&&(ke+="g"),me.matchCase||(ke+="i"),me.multiline&&(ke+="m"),me.unicode&&(ke+="u"),new RegExp(Ce,ke)}e.createRegExp=d;function p(Ce){return Ce.source==="^"||Ce.source==="^$"||Ce.source==="$"||Ce.source==="^\\s*$"?!1:!!(Ce.exec("")&&Ce.lastIndex===0)}e.regExpLeadsToEndlessLoop=p;function c(Ce){return Ce.split(/\r\n|\r|\n/)}e.splitLines=c;function l(Ce){for(let _e=0,me=Ce.length;_e<me;_e++){const ke=Ce.charCodeAt(_e);if(ke!==32&&ke!==9)return _e}return-1}e.firstNonWhitespaceIndex=l;function n(Ce,_e=0,me=Ce.length){for(let ke=_e;ke<me;ke++){const Ee=Ce.charCodeAt(ke);if(Ee!==32&&Ee!==9)return Ce.substring(_e,ke)}return Ce.substring(_e,me)}e.getLeadingWhitespace=n;function g(Ce,_e=Ce.length-1){for(let me=_e;me>=0;me--){const ke=Ce.charCodeAt(me);if(ke!==32&&ke!==9)return me}return-1}e.lastNonWhitespaceIndex=g;function w(Ce,_e,me){const ke=[];let Ee=0;for(const pe of Ce.matchAll(_e)){if(ke.push(Ce.slice(Ee,pe.index)),pe.index===void 0)throw new Error("match.index should be defined");Ee=pe.index+pe[0].length,ke.push(me(pe[0],...pe.slice(1),pe.index,Ce,pe.groups))}return ke.push(Ce.slice(Ee)),Promise.all(ke).then(pe=>pe.join(""))}e.replaceAsync=w;function E(Ce,_e){return Ce<_e?-1:Ce>_e?1:0}e.compare=E;function C(Ce,_e,me=0,ke=Ce.length,Ee=0,pe=_e.length){for(;me<ke&&Ee<pe;me++,Ee++){const xe=Ce.charCodeAt(me),Ve=_e.charCodeAt(Ee);if(xe<Ve)return-1;if(xe>Ve)return 1}const Te=ke-me,Ne=pe-Ee;return Te<Ne?-1:Te>Ne?1:0}e.compareSubstring=C;function I(Ce,_e){return _(Ce,_e,0,Ce.length,0,_e.length)}e.compareIgnoreCase=I;function _(Ce,_e,me=0,ke=Ce.length,Ee=0,pe=_e.length){for(;me<ke&&Ee<pe;me++,Ee++){let xe=Ce.charCodeAt(me),Ve=_e.charCodeAt(Ee);if(xe===Ve)continue;if(xe>=128||Ve>=128)return C(Ce.toLowerCase(),_e.toLowerCase(),me,ke,Ee,pe);k(xe)&&(xe-=32),k(Ve)&&(Ve-=32);const Fe=xe-Ve;if(Fe!==0)return Fe}const Te=ke-me,Ne=pe-Ee;return Te<Ne?-1:Te>Ne?1:0}e.compareSubstringIgnoreCase=_;function A(Ce){return Ce>=48&&Ce<=57}e.isAsciiDigit=A;function k(Ce){return Ce>=97&&Ce<=122}e.isLowerAsciiLetter=k;function L(Ce){return Ce>=65&&Ce<=90}e.isUpperAsciiLetter=L;function R(Ce,_e){return Ce.length===_e.length&&_(Ce,_e)===0}e.equalsIgnoreCase=R;function M(Ce,_e){const me=_e.length;return _e.length>Ce.length?!1:_(Ce,_e,0,me)===0}e.startsWithIgnoreCase=M;function N(Ce,_e){const me=Math.min(Ce.length,_e.length);let ke;for(ke=0;ke<me;ke++)if(Ce.charCodeAt(ke)!==_e.charCodeAt(ke))return ke;return me}e.commonPrefixLength=N;function P(Ce,_e){const me=Math.min(Ce.length,_e.length);let ke;const Ee=Ce.length-1,pe=_e.length-1;for(ke=0;ke<me;ke++)if(Ce.charCodeAt(Ee-ke)!==_e.charCodeAt(pe-ke))return ke;return me}e.commonSuffixLength=P;function x(Ce){return 55296<=Ce&&Ce<=56319}e.isHighSurrogate=x;function F(Ce){return 56320<=Ce&&Ce<=57343}e.isLowSurrogate=F;function V(Ce,_e){return(Ce-55296<<10)+(_e-56320)+65536}e.computeCodePoint=V;function W(Ce,_e,me){const ke=Ce.charCodeAt(me);if(x(ke)&&me+1<_e){const Ee=Ce.charCodeAt(me+1);if(F(Ee))return V(ke,Ee)}return ke}e.getNextCodePoint=W;function z(Ce,_e){const me=Ce.charCodeAt(_e-1);if(F(me)&&_e>1){const ke=Ce.charCodeAt(_e-2);if(x(ke))return V(ke,me)}return me}class B{get offset(){return this._offset}constructor(_e,me=0){this._str=_e,this._len=_e.length,this._offset=me}setOffset(_e){this._offset=_e}prevCodePoint(){const _e=z(this._str,this._offset);return this._offset-=_e>=65536?2:1,_e}nextCodePoint(){const _e=W(this._str,this._len,this._offset);return this._offset+=_e>=65536?2:1,_e}eol(){return this._offset>=this._len}}e.CodePointIterator=B;class K{get offset(){return this._iterator.offset}constructor(_e,me=0){this._iterator=new B(_e,me)}nextGraphemeLength(){const _e=ye.getInstance(),me=this._iterator,ke=me.offset;let Ee=_e.getGraphemeBreakType(me.nextCodePoint());for(;!me.eol();){const pe=me.offset,Te=_e.getGraphemeBreakType(me.nextCodePoint());if(Se(Ee,Te)){me.setOffset(pe);break}Ee=Te}return me.offset-ke}prevGraphemeLength(){const _e=ye.getInstance(),me=this._iterator,ke=me.offset;let Ee=_e.getGraphemeBreakType(me.prevCodePoint());for(;me.offset>0;){const pe=me.offset,Te=_e.getGraphemeBreakType(me.prevCodePoint());if(Se(Te,Ee)){me.setOffset(pe);break}Ee=Te}return ke-me.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=K;function H(Ce,_e){return new K(Ce,_e).nextGraphemeLength()}e.nextCharLength=H;function U(Ce,_e){return new K(Ce,_e).prevGraphemeLength()}e.prevCharLength=U;function G(Ce,_e){_e>0&&F(Ce.charCodeAt(_e))&&_e--;const me=_e+H(Ce,_e);return[me-U(Ce,me),me]}e.getCharContainingOffset=G;function $(Ce){const _e=new K(Ce);let me=0;for(;!_e.eol();)me++,_e.nextGraphemeLength();return me}e.charCount=$;let ie;function J(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function j(Ce){return ie||(ie=J()),ie.test(Ce)}e.containsRTL=j;const ee=/^[\t\n\r\x20-\x7E]*$/;function X(Ce){return ee.test(Ce)}e.isBasicASCII=X,e.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function te(Ce){return e.UNUSUAL_LINE_TERMINATORS.test(Ce)}e.containsUnusualLineTerminators=te;function Z(Ce){return Ce>=11904&&Ce<=55215||Ce>=63744&&Ce<=64255||Ce>=65281&&Ce<=65374}e.isFullWidthCharacter=Z;function se(Ce){return Ce>=127462&&Ce<=127487||Ce===8986||Ce===8987||Ce===9200||Ce===9203||Ce>=9728&&Ce<=10175||Ce===11088||Ce===11093||Ce>=127744&&Ce<=128591||Ce>=128640&&Ce<=128764||Ce>=128992&&Ce<=129008||Ce>=129280&&Ce<=129535||Ce>=129648&&Ce<=129782}e.isEmojiImprecise=se;function re(Ce,_e){if(Ce.length<_e)return Ce;const me=/\b/g;let ke=0;for(;me.test(Ce)&&!(Ce.length-me.lastIndex<_e);)ke=me.lastIndex,me.lastIndex+=1;return Ce.substring(ke).replace(/^\s/,"")}e.lcut=re;const oe=/(:?\x1b\[|\x9B)[=?>!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~]/g,le=/\x1b\].*?\x07/g;function ne(Ce){return Ce&&(Ce=Ce.replace(oe,"").replace(le,"")),Ce}e.removeAnsiEscapeCodes=ne,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function ce(Ce){return!!(Ce&&Ce.length>0&&Ce.charCodeAt(0)===65279)}e.startsWithUTF8BOM=ce;function ae(Ce){return ce(Ce)?Ce.substr(1):Ce}e.stripUTF8BOM=ae;function ue(Ce,_e){let me="";for(let ke=0;ke<_e;ke++)me+=Ce;return me}e.repeat=ue;function de(Ce,_e){if(!Ce||!_e||Ce.length<_e.length)return!1;const me=_e.length,ke=Ce.toLowerCase();let Ee=0,pe=-1;for(;Ee<me;){const Te=ke.indexOf(_e[Ee],pe+1);if(Te<0)return!1;pe=Te,Ee++}return!0}e.fuzzyContains=de;function ge(Ce,_e=!1){return Ce?(_e&&(Ce=Ce.replace(/\\./g,"")),Ce.toLowerCase()!==Ce):!1}e.containsUppercaseCharacter=ge;function he(Ce){return Ce.charAt(0).toUpperCase()+Ce.slice(1)}e.uppercaseFirstLetter=he;function be(Ce,_e=1){if(_e===0)return"";let me=-1;do me=Ce.indexOf(` `,me+1),_e--;while(_e>0&&me>=0);return me===-1?Ce:(Ce[me-1]==="\r"&&me--,Ce.substr(0,me))}e.getNLines=be;function ve(Ce){return Ce=Ce%(2*26),Ce<26?String.fromCharCode(97+Ce):String.fromCharCode(65+Ce-26)}e.singleLetterHash=ve;function Ie(Ce){return ye.getInstance().getGraphemeBreakType(Ce)}e.getGraphemeBreakType=Ie;function Se(Ce,_e){return Ce===0?_e!==5&&_e!==7:Ce===2&&_e===3?!1:Ce===4||Ce===2||Ce===3||_e===4||_e===2||_e===3?!0:!(Ce===8&&(_e===8||_e===9||_e===11||_e===12)||(Ce===11||Ce===9)&&(_e===9||_e===10)||(Ce===12||Ce===10)&&_e===10||_e===5||_e===13||_e===7||Ce===1||Ce===13&&_e===14||Ce===6&&_e===6)}var we;(function(Ce){Ce[Ce.Other=0]="Other",Ce[Ce.Prepend=1]="Prepend",Ce[Ce.CR=2]="CR",Ce[Ce.LF=3]="LF",Ce[Ce.Control=4]="Control",Ce[Ce.Extend=5]="Extend",Ce[Ce.Regional_Indicator=6]="Regional_Indicator",Ce[Ce.SpacingMark=7]="SpacingMark",Ce[Ce.L=8]="L",Ce[Ce.V=9]="V",Ce[Ce.T=10]="T",Ce[Ce.LV=11]="LV",Ce[Ce.LVT=12]="LVT",Ce[Ce.ZWJ=13]="ZWJ",Ce[Ce.Extended_Pictographic=14]="Extended_Pictographic"})(we||(e.GraphemeBreakType=we={}));class ye{static{this._INSTANCE=null}static getInstance(){return ye._INSTANCE||(ye._INSTANCE=new ye),ye._INSTANCE}constructor(){this._data=Re()}getGraphemeBreakType(_e){if(_e<32)return _e===10?3:_e===13?2:4;if(_e<127)return 0;const me=this._data,ke=me.length/3;let Ee=1;for(;Ee<=ke;)if(_e<me[3*Ee])Ee=2*Ee;else if(_e>me[3*Ee+1])Ee=2*Ee+1;else return me[3*Ee+2];return 0}}function Re(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function Le(Ce,_e){if(Ce===0)return 0;const me=Pe(Ce,_e);if(me!==void 0)return me;const ke=new B(_e,Ce);return ke.prevCodePoint(),ke.offset}e.getLeftDeleteOffset=Le;function Pe(Ce,_e){const me=new B(_e,Ce);let ke=me.prevCodePoint();for(;Ae(ke)||ke===65039||ke===8419;){if(me.offset===0)return;ke=me.prevCodePoint()}if(!se(ke))return;let Ee=me.offset;return Ee>0&&me.prevCodePoint()===8205&&(Ee=me.offset),Ee}function Ae(Ce){return 127995<=Ce&&Ce<=127999}var Me;(function(Ce){Ce[Ce.zwj=8205]="zwj",Ce[Ce.emojiVariantSelector=65039]="emojiVariantSelector",Ce[Ce.enclosingKeyCap=8419]="enclosingKeyCap"})(Me||(Me={})),e.noBreakWhitespace="\xA0";class Oe{static{this.ambiguousCharacterData=new y.Lazy(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))}static{this.cache=new t.LRUCachedFunction(_e=>{function me(Fe){const Be=new Map;for(let He=0;He<Fe.length;He+=2)Be.set(Fe[He],Fe[He+1]);return Be}function ke(Fe,Be){const He=new Map(Fe);for(const[et,Je]of Be)He.set(et,Je);return He}function Ee(Fe,Be){if(!Fe)return Be;const He=new Map;for(const[et,Je]of Fe)Be.has(et)&&He.set(et,Je);return He}const pe=this.ambiguousCharacterData.value;let Te=_e.filter(Fe=>!Fe.startsWith("_")&&Fe in pe);Te.length===0&&(Te=["_default"]);let Ne;for(const Fe of Te){const Be=me(pe[Fe]);Ne=Ee(Ne,Be)}const xe=me(pe._common),Ve=ke(xe,Ne);return new Oe(Ve)})}static getInstance(_e){return Oe.cache.get(Array.from(_e))}static{this._locales=new y.Lazy(()=>Object.keys(Oe.ambiguousCharacterData.value).filter(_e=>!_e.startsWith("_")))}static getLocales(){return Oe._locales.value}constructor(_e){this.confusableDictionary=_e}isAmbiguous(_e){return this.confusableDictionary.has(_e)}getPrimaryConfusable(_e){return this.confusableDictionary.get(_e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}e.AmbiguousCharacters=Oe;class De{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(De.getRawData())),this._data}static isInvisibleCharacter(_e){return De.getData().has(_e)}static get codePoints(){return De.getData()}}e.InvisibleCharacters=De}),define(Q[1033],Y([1,0,33]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unquoteText=e.escapeUrl=e.escapeLabel=void 0;function y(T){return t.escape(T).replace(/[[]]/g,function(v){switch(v){case"[":return"[";case"]":return"]";default:return v}})}e.escapeLabel=y;function b(T){return t.escape(T).replace(/%20/g,"%2520").replace(/\s/g,"%20").replace(/[()]/g,function(v){switch(v){case"(":return"%28";case")":return"%29";default:return v}})}e.escapeUrl=b;function D(T){let v=/^[\"\'](.*)[\"\']$/.exec(T);return v&&v[1]?v[1]:T}e.unquoteText=D}),define(Q[128],Y([1,0,69,33]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fuzzyScoreGraceful=e.fuzzyScoreGracefulAggressive=e.fuzzyScore=e.FuzzyScoreOptions=e.FuzzyScore=e.isPatternInWord=e.createMatches=e.anyScore=e.matchesFuzzy2=e.matchesFuzzy=e.matchesWords=e.matchesCamelCase=e.isUpper=e.matchesSubString=e.matchesContiguousSubString=e.matchesPrefix=e.matchesStrictPrefix=e.or=void 0;function b(...ae){return function(ue,de){for(let ge=0,he=ae.length;ge<he;ge++){const be=ae[ge](ue,de);if(be)return be}return null}}e.or=b,e.matchesStrictPrefix=D.bind(void 0,!1),e.matchesPrefix=D.bind(void 0,!0);function D(ae,ue,de){if(!de||de.length<ue.length)return null;let ge;return ae?ge=y.startsWithIgnoreCase(de,ue):ge=de.indexOf(ue)===0,ge?ue.length>0?[{start:0,end:ue.length}]:[]:null}function T(ae,ue){const de=ue.toLowerCase().indexOf(ae.toLowerCase());return de===-1?null:[{start:de,end:de+ae.length}]}e.matchesContiguousSubString=T;function f(ae,ue){return v(ae.toLowerCase(),ue.toLowerCase(),0,0)}e.matchesSubString=f;function v(ae,ue,de,ge){if(de===ae.length)return[];if(ge===ue.length)return null;if(ae[de]===ue[ge]){let he=null;return(he=v(ae,ue,de+1,ge+1))?u({start:ge,end:ge+1},he):null}return v(ae,ue,de,ge+1)}function m(ae){return 97<=ae&&ae<=122}function S(ae){return 65<=ae&&ae<=90}e.isUpper=S;function h(ae){return 48<=ae&&ae<=57}function a(ae){return ae===32||ae===9||ae===10||ae===13}const r=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(ae=>r.add(ae.charCodeAt(0)));function i(ae){return a(ae)||r.has(ae)}function s(ae,ue){return ae===ue||i(ae)&&i(ue)}function o(ae){return m(ae)||S(ae)||h(ae)}function u(ae,ue){return ue.length===0?ue=[ae]:ae.end===ue[0].start?ue[0].start=ae.start:ue.unshift(ae),ue}function d(ae,ue){for(let de=ue;de<ae.length;de++){const ge=ae.charCodeAt(de);if(S(ge)||h(ge)||de>0&&!o(ae.charCodeAt(de-1)))return de}return ae.length}function p(ae,ue,de,ge){if(de===ae.length)return[];if(ge===ue.length)return null;if(ae[de]!==ue[ge].toLowerCase())return null;{let he=null,be=ge+1;for(he=p(ae,ue,de+1,ge+1);!he&&(be=d(ue,be))<ue.length;)he=p(ae,ue,de+1,be),be++;return he===null?null:u({start:ge,end:ge+1},he)}}function c(ae){let ue=0,de=0,ge=0,he=0,be=0;for(let ye=0;ye<ae.length;ye++)be=ae.charCodeAt(ye),S(be)&&ue++,m(be)&&de++,o(be)&&ge++,h(be)&&he++;const ve=ue/ae.length,Ie=de/ae.length,Se=ge/ae.length,we=he/ae.length;return{upperPercent:ve,lowerPercent:Ie,alphaPercent:Se,numericPercent:we}}function l(ae){const{upperPercent:ue,lowerPercent:de}=ae;return de===0&&ue>.6}function n(ae){const{upperPercent:ue,lowerPercent:de,alphaPercent:ge,numericPercent:he}=ae;return de>.2&&ue<.8&&ge>.6&&he<.2}function g(ae){let ue=0,de=0,ge=0,he=0;for(let be=0;be<ae.length;be++)ge=ae.charCodeAt(be),S(ge)&&ue++,m(ge)&&de++,a(ge)&&he++;return(ue===0||de===0)&&he===0?ae.length<=30:ue<=5}function w(ae,ue){if(!ue||(ue=ue.trim(),ue.length===0)||!g(ae)||ue.length>60)return null;const de=c(ue);if(!n(de)){if(!l(de))return null;ue=ue.toLowerCase()}let ge=null,he=0;for(ae=ae.toLowerCase();he<ue.length&&(ge=p(ae,ue,0,he))===null;)he=d(ue,he+1);return ge}e.matchesCamelCase=w;function E(ae,ue,de=!1){if(!ue||ue.length===0)return null;let ge=null,he=0;for(ae=ae.toLowerCase(),ue=ue.toLowerCase();he<ue.length&&(ge=C(ae,ue,0,he,de))===null;)he=I(ue,he+1);return ge}e.matchesWords=E;function C(ae,ue,de,ge,he){if(de===ae.length)return[];if(ge===ue.length)return null;if(s(ae.charCodeAt(de),ue.charCodeAt(ge))){let be=null,ve=ge+1;if(be=C(ae,ue,de+1,ge+1,he),!he)for(;!be&&(ve=I(ue,ve))<ue.length;)be=C(ae,ue,de+1,ve,he),ve++;return be?ae.charCodeAt(de)!==ue.charCodeAt(ge)?be:u({start:ge,end:ge+1},be):null}else return null}function I(ae,ue){for(let de=ue;de<ae.length;de++)if(i(ae.charCodeAt(de))||de>0&&i(ae.charCodeAt(de-1)))return de;return ae.length}const _=b(e.matchesPrefix,w,T),A=b(e.matchesPrefix,w,f),k=new t.LRUCache(1e4);function L(ae,ue,de=!1){if(typeof ae!="string"||typeof ue!="string")return null;let ge=k.get(ae);ge||(ge=new RegExp(y.convertSimple2RegExpPattern(ae),"i"),k.set(ae,ge));const he=ge.exec(ue);return he?[{start:he.index,end:he.index+he[0].length}]:de?A(ae,ue):_(ae,ue)}e.matchesFuzzy=L;function R(ae,ue){const de=Z(ae,ae.toLowerCase(),0,ue,ue.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return de?N(de):null}e.matchesFuzzy2=R;function M(ae,ue,de,ge,he,be){const ve=Math.min(13,ae.length);for(;de<ve;de++){const Ie=Z(ae,ue,de,ge,he,be,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(Ie)return Ie}return[0,be]}e.anyScore=M;function N(ae){if(typeof ae>"u")return[];const ue=[],de=ae[1];for(let ge=ae.length-1;ge>1;ge--){const he=ae[ge]+de,be=ue[ue.length-1];be&&be.end===he?be.end=he+1:ue.push({start:he,end:he+1})}return ue}e.createMatches=N;const P=128;function x(){const ae=[],ue=[];for(let de=0;de<=P;de++)ue[de]=0;for(let de=0;de<=P;de++)ae.push(ue.slice(0));return ae}function F(ae){const ue=[];for(let de=0;de<=ae;de++)ue[de]=0;return ue}const V=F(2*P),W=F(2*P),z=x(),B=x(),K=x(),H=!1;function U(ae,ue,de,ge,he){function be(Ie,Se,we=" "){for(;Ie.length<Se;)Ie=we+Ie;return Ie}let ve=` | |${ge.split("").map(Ie=>be(Ie,3)).join("|")} `;for(let Ie=0;Ie<=de;Ie++)Ie===0?ve+=" |":ve+=`${ue[Ie-1]}|`,ve+=ae[Ie].slice(0,he+1).map(Se=>be(Se.toString(),3)).join("|")+` `;return ve}function G(ae,ue,de,ge){ae=ae.substr(ue),de=de.substr(ge),console.log(U(B,ae,ae.length,de,de.length)),console.log(U(K,ae,ae.length,de,de.length)),console.log(U(z,ae,ae.length,de,de.length))}function $(ae,ue){if(ue<0||ue>=ae.length)return!1;const de=ae.codePointAt(ue);switch(de){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!y.isEmojiImprecise(de)}}function ie(ae,ue){if(ue<0||ue>=ae.length)return!1;switch(ae.charCodeAt(ue)){case 32:case 9:return!0;default:return!1}}function J(ae,ue,de){return ue[ae]!==de[ae]}function j(ae,ue,de,ge,he,be,ve=!1){for(;ue<de&&he<be;)ae[ue]===ge[he]&&(ve&&(V[ue]=he),ue+=1),he+=1;return ue===de}e.isPatternInWord=j;var ee;(function(ae){ae[ae.Diag=1]="Diag",ae[ae.Left=2]="Left",ae[ae.LeftLeft=3]="LeftLeft"})(ee||(ee={}));var X;(function(ae){ae.Default=[-100,0];function ue(de){return!de||de.length===2&&de[0]===-100&&de[1]===0}ae.isDefault=ue})(X||(e.FuzzyScore=X={}));class te{static{this.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}}constructor(ue,de){this.firstMatchCanBeWeak=ue,this.boostFullMatch=de}}e.FuzzyScoreOptions=te;function Z(ae,ue,de,ge,he,be,ve=te.default){const Ie=ae.length>P?P:ae.length,Se=ge.length>P?P:ge.length;if(de>=Ie||be>=Se||Ie-de>Se-be||!j(ue,de,Ie,he,be,Se,!0))return;se(Ie,Se,de,be,ue,he);let we=1,ye=1,Re=de,Le=be;const Pe=[!1];for(we=1,Re=de;Re<Ie;we++,Re++){const Ce=V[Re],_e=W[Re],me=Re+1<Ie?W[Re+1]:Se;for(ye=Ce-be+1,Le=Ce;Le<me;ye++,Le++){let ke=Number.MIN_SAFE_INTEGER,Ee=!1;Le<=_e&&(ke=re(ae,ue,Re,de,ge,he,Le,Se,be,z[we-1][ye-1]===0,Pe));let pe=0;ke!==Number.MAX_SAFE_INTEGER&&(Ee=!0,pe=ke+B[we-1][ye-1]);const Te=Le>Ce,Ne=Te?B[we][ye-1]+(z[we][ye-1]>0?-5:0):0,xe=Le>Ce+1&&z[we][ye-1]>0,Ve=xe?B[we][ye-2]+(z[we][ye-2]>0?-5:0):0;if(xe&&(!Te||Ve>=Ne)&&(!Ee||Ve>=pe))B[we][ye]=Ve,K[we][ye]=3,z[we][ye]=0;else if(Te&&(!Ee||Ne>=pe))B[we][ye]=Ne,K[we][ye]=2,z[we][ye]=0;else if(Ee)B[we][ye]=pe,K[we][ye]=1,z[we][ye]=z[we-1][ye-1]+1;else throw new Error("not possible")}}if(H&&G(ae,de,ge,be),!Pe[0]&&!ve.firstMatchCanBeWeak)return;we--,ye--;const Ae=[B[we][ye],be];let Me=0,Oe=0;for(;we>=1;){let Ce=ye;do{const _e=K[we][Ce];if(_e===3)Ce=Ce-2;else if(_e===2)Ce=Ce-1;else break}while(Ce>=1);Me>1&&ue[de+we-1]===he[be+ye-1]&&!J(Ce+be-1,ge,he)&&Me+1>z[we][Ce]&&(Ce=ye),Ce===ye?Me++:Me=1,Oe||(Oe=Ce),we--,ye=Ce-1,Ae.push(ye)}Se===Ie&&ve.boostFullMatch&&(Ae[0]+=2);const De=Oe-Ie;return Ae[0]-=De,Ae}e.fuzzyScore=Z;function se(ae,ue,de,ge,he,be){let ve=ae-1,Ie=ue-1;for(;ve>=de&&Ie>=ge;)he[ve]===be[Ie]&&(W[ve]=Ie,ve--),Ie--}function re(ae,ue,de,ge,he,be,ve,Ie,Se,we,ye){if(ue[de]!==be[ve])return Number.MIN_SAFE_INTEGER;let Re=1,Le=!1;return ve===de-ge?Re=ae[de]===he[ve]?7:5:J(ve,he,be)&&(ve===0||!J(ve-1,he,be))?(Re=ae[de]===he[ve]?7:5,Le=!0):$(be,ve)&&(ve===0||!$(be,ve-1))?Re=5:($(be,ve-1)||ie(be,ve-1))&&(Re=5,Le=!0),Re>1&&de===ge&&(ye[0]=!0),Le||(Le=J(ve,he,be)||$(be,ve-1)||ie(be,ve-1)),de===ge?ve>Se&&(Re-=Le?3:5):we?Re+=Le?2:0:Re+=Le?0:1,ve+1===Ie&&(Re-=Le?3:5),Re}function oe(ae,ue,de,ge,he,be,ve){return ne(ae,ue,de,ge,he,be,!0,ve)}e.fuzzyScoreGracefulAggressive=oe;function le(ae,ue,de,ge,he,be,ve){return ne(ae,ue,de,ge,he,be,!1,ve)}e.fuzzyScoreGraceful=le;function ne(ae,ue,de,ge,he,be,ve,Ie){let Se=Z(ae,ue,de,ge,he,be,Ie);if(Se&&!ve)return Se;if(ae.length>=3){const we=Math.min(7,ae.length-1);for(let ye=de+1;ye<we;ye++){const Re=ce(ae,ye);if(Re){const Le=Z(Re,Re.toLowerCase(),de,ge,he,be,Ie);Le&&(Le[0]-=3,(!Se||Le[0]>Se[0])&&(Se=Le))}}}return Se}function ce(ae,ue){if(ue+1>=ae.length)return;const de=ae[ue],ge=ae[ue+1];if(de!==ge)return ae.slice(0,ue)+ge+de+ae.slice(ue+2)}}),define(Q[122],Y([1,0,33]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringSHA1=e.toHexString=e.Hasher=e.stringHash=e.numberHash=e.doHash=e.hash=void 0;function y(u){return b(u,0)}e.hash=y;function b(u,d){switch(typeof u){case"object":return u===null?D(349,d):Array.isArray(u)?v(u,d):m(u,d);case"string":return f(u,d);case"boolean":return T(u,d);case"number":return D(u,d);case"undefined":return D(937,d);default:return D(617,d)}}e.doHash=b;function D(u,d){return(d<<5)-d+u|0}e.numberHash=D;function T(u,d){return D(u?433:863,d)}function f(u,d){d=D(149417,d);for(let p=0,c=u.length;p<c;p++)d=D(u.charCodeAt(p),d);return d}e.stringHash=f;function v(u,d){return d=D(104579,d),u.reduce((p,c)=>b(c,p),d)}function m(u,d){return d=D(181387,d),Object.keys(u).sort().reduce((p,c)=>(p=f(c,p),b(u[c],p)),d)}class S{constructor(){this._value=0}get value(){return this._value}hash(d){return this._value=b(d,this._value),this._value}}e.Hasher=S;var h;(function(u){u[u.BLOCK_SIZE=64]="BLOCK_SIZE",u[u.UNICODE_REPLACEMENT=65533]="UNICODE_REPLACEMENT"})(h||(h={}));function a(u,d,p=32){const c=p-d,l=~((1<<c)-1);return(u<<d|(l&u)>>>c)>>>0}function r(u,d=0,p=u.byteLength,c=0){for(let l=0;l<p;l++)u[d+l]=c}function i(u,d,p="0"){for(;u.length<d;)u=p+u;return u}function s(u,d=32){return u instanceof ArrayBuffer?Array.from(new Uint8Array(u)).map(p=>p.toString(16).padStart(2,"0")).join(""):i((u>>>0).toString(16),d/4)}e.toHexString=s;class o{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(d){const p=d.length;if(p===0)return;const c=this._buff;let l=this._buffLen,n=this._leftoverHighSurrogate,g,w;for(n!==0?(g=n,w=-1,n=0):(g=d.charCodeAt(0),w=0);;){let E=g;if(t.isHighSurrogate(g))if(w+1<p){const C=d.charCodeAt(w+1);t.isLowSurrogate(C)?(w++,E=t.computeCodePoint(g,C)):E=65533}else{n=g;break}else t.isLowSurrogate(g)&&(E=65533);if(l=this._push(c,l,E),w++,w<p)g=d.charCodeAt(w);else break}this._buffLen=l,this._leftoverHighSurrogate=n}_push(d,p,c){return c<128?d[p++]=c:c<2048?(d[p++]=192|(c&1984)>>>6,d[p++]=128|(c&63)>>>0):c<65536?(d[p++]=224|(c&61440)>>>12,d[p++]=128|(c&4032)>>>6,d[p++]=128|(c&63)>>>0):(d[p++]=240|(c&1835008)>>>18,d[p++]=128|(c&258048)>>>12,d[p++]=128|(c&4032)>>>6,d[p++]=128|(c&63)>>>0),p>=64&&(this._step(),p-=64,this._totalLen+=64,d[0]=d[64+0],d[1]=d[64+1],d[2]=d[64+2]),p}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),s(this._h0)+s(this._h1)+s(this._h2)+s(this._h3)+s(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,r(this._buff,this._buffLen),this._buffLen>56&&(this._step(),r(this._buff));const d=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(d/4294967296),!1),this._buffDV.setUint32(60,d%4294967296,!1),this._step()}_step(){const d=o._bigBlock32,p=this._buffDV;for(let _=0;_<64;_+=4)d.setUint32(_,p.getUint32(_,!1),!1);for(let _=64;_<320;_+=4)d.setUint32(_,a(d.getUint32(_-12,!1)^d.getUint32(_-32,!1)^d.getUint32(_-56,!1)^d.getUint32(_-64,!1),1),!1);let c=this._h0,l=this._h1,n=this._h2,g=this._h3,w=this._h4,E,C,I;for(let _=0;_<80;_++)_<20?(E=l&n|~l&g,C=1518500249):_<40?(E=l^n^g,C=1859775393):_<60?(E=l&n|l&g|n&g,C=2400959708):(E=l^n^g,C=3395469782),I=a(c,5)+E+w+C+d.getUint32(_*4,!1)&4294967295,w=g,g=n,n=a(l,30),l=c,c=I;this._h0=this._h0+c&4294967295,this._h1=this._h1+l&4294967295,this._h2=this._h2+n&4294967295,this._h3=this._h3+g&4294967295,this._h4=this._h4+w&4294967295}}e.StringSHA1=o}),define(Q[786],Y([1,0,62,122]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sha1Hex=void 0;async function b(D){if(globalThis?.crypto?.subtle){const T=t.VSBuffer.fromString(D,{dontUseNodeBuffer:!0}).buffer,f=await globalThis.crypto.subtle.digest({name:"sha-1"},T);return(0,y.toHexString)(f)}else{const T=new y.StringSHA1;return T.update(D),T.digest()}}e.sha1Hex=b}),define(Q[482],Y([1,0,1524,122]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LcsDiff=e.stringDiff=e.StringDiffSequence=void 0;class b{constructor(a){this.source=a}getElements(){const a=this.source,r=new Int32Array(a.length);for(let i=0,s=a.length;i<s;i++)r[i]=a.charCodeAt(i);return r}}e.StringDiffSequence=b;function D(h,a,r){return new S(new b(h),new b(a)).ComputeDiff(r).changes}e.stringDiff=D;class T{static Assert(a,r){if(!a)throw new Error(r)}}class f{static Copy(a,r,i,s,o){for(let u=0;u<o;u++)i[s+u]=a[r+u]}static Copy2(a,r,i,s,o){for(let u=0;u<o;u++)i[s+u]=a[r+u]}}var v;(function(h){h[h.MaxDifferencesHistory=1447]="MaxDifferencesHistory"})(v||(v={}));class m{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new t.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(a,r){this.m_originalStart=Math.min(this.m_originalStart,a),this.m_modifiedStart=Math.min(this.m_modifiedStart,r),this.m_originalCount++}AddModifiedElement(a,r){this.m_originalStart=Math.min(this.m_originalStart,a),this.m_modifiedStart=Math.min(this.m_modifiedStart,r),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 S{constructor(a,r,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=a,this._modifiedSequence=r;const[s,o,u]=S._getElements(a),[d,p,c]=S._getElements(r);this._hasStrings=u&&c,this._originalStringElements=s,this._originalElementsOrHash=o,this._modifiedStringElements=d,this._modifiedElementsOrHash=p,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(a){return a.length>0&&typeof a[0]=="string"}static _getElements(a){const r=a.getElements();if(S._isStringArray(r)){const i=new Int32Array(r.length);for(let s=0,o=r.length;s<o;s++)i[s]=(0,y.stringHash)(r[s],0);return[r,i,!0]}return r instanceof Int32Array?[[],r,!1]:[[],new Int32Array(r),!1]}ElementsAreEqual(a,r){return this._originalElementsOrHash[a]!==this._modifiedElementsOrHash[r]?!1:this._hasStrings?this._originalStringElements[a]===this._modifiedStringElements[r]:!0}ElementsAreStrictEqual(a,r){if(!this.ElementsAreEqual(a,r))return!1;const i=S._getStrictElement(this._originalSequence,a),s=S._getStrictElement(this._modifiedSequence,r);return i===s}static _getStrictElement(a,r){return typeof a.getStrictElement=="function"?a.getStrictElement(r):null}OriginalElementsAreEqual(a,r){return this._originalElementsOrHash[a]!==this._originalElementsOrHash[r]?!1:this._hasStrings?this._originalStringElements[a]===this._originalStringElements[r]:!0}ModifiedElementsAreEqual(a,r){return this._modifiedElementsOrHash[a]!==this._modifiedElementsOrHash[r]?!1:this._hasStrings?this._modifiedStringElements[a]===this._modifiedStringElements[r]:!0}ComputeDiff(a){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,a)}_ComputeDiff(a,r,i,s,o){const u=[!1];let d=this.ComputeDiffRecursive(a,r,i,s,u);return o&&(d=this.PrettifyChanges(d)),{quitEarly:u[0],changes:d}}ComputeDiffRecursive(a,r,i,s,o){for(o[0]=!1;a<=r&&i<=s&&this.ElementsAreEqual(a,i);)a++,i++;for(;r>=a&&s>=i&&this.ElementsAreEqual(r,s);)r--,s--;if(a>r||i>s){let n;return i<=s?(T.Assert(a===r+1,"originalStart should only be one more than originalEnd"),n=[new t.DiffChange(a,0,i,s-i+1)]):a<=r?(T.Assert(i===s+1,"modifiedStart should only be one more than modifiedEnd"),n=[new t.DiffChange(a,r-a+1,i,0)]):(T.Assert(a===r+1,"originalStart should only be one more than originalEnd"),T.Assert(i===s+1,"modifiedStart should only be one more than modifiedEnd"),n=[]),n}const u=[0],d=[0],p=this.ComputeRecursionPoint(a,r,i,s,u,d,o),c=u[0],l=d[0];if(p!==null)return p;if(!o[0]){const n=this.ComputeDiffRecursive(a,c,i,l,o);let g=[];return o[0]?g=[new t.DiffChange(c+1,r-(c+1)+1,l+1,s-(l+1)+1)]:g=this.ComputeDiffRecursive(c+1,r,l+1,s,o),this.ConcatenateChanges(n,g)}return[new t.DiffChange(a,r-a+1,i,s-i+1)]}WALKTRACE(a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A){let k=null,L=null,R=new m,M=r,N=i,P=w[0]-I[0]-s,x=-1073741824,F=this.m_forwardHistory.length-1;do{const V=P+a;V===M||V<N&&c[V-1]<c[V+1]?(n=c[V+1],E=n-P-s,n<x&&R.MarkNextChange(),x=n,R.AddModifiedElement(n+1,E),P=V+1-a):(n=c[V-1]+1,E=n-P-s,n<x&&R.MarkNextChange(),x=n-1,R.AddOriginalElement(n,E+1),P=V-1-a),F>=0&&(c=this.m_forwardHistory[F],a=c[0],M=1,N=c.length-1)}while(--F>=-1);if(k=R.getReverseChanges(),A[0]){let V=w[0]+1,W=I[0]+1;if(k!==null&&k.length>0){const z=k[k.length-1];V=Math.max(V,z.getOriginalEnd()),W=Math.max(W,z.getModifiedEnd())}L=[new t.DiffChange(V,g-V+1,W,C-W+1)]}else{R=new m,M=u,N=d,P=w[0]-I[0]-p,x=1073741824,F=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const V=P+o;V===M||V<N&&l[V-1]>=l[V+1]?(n=l[V+1]-1,E=n-P-p,n>x&&R.MarkNextChange(),x=n+1,R.AddOriginalElement(n+1,E+1),P=V+1-o):(n=l[V-1],E=n-P-p,n>x&&R.MarkNextChange(),x=n,R.AddModifiedElement(n+1,E+1),P=V-1-o),F>=0&&(l=this.m_reverseHistory[F],o=l[0],M=1,N=l.length-1)}while(--F>=-1);L=R.getChanges()}return this.ConcatenateChanges(k,L)}ComputeRecursionPoint(a,r,i,s,o,u,d){let p=0,c=0,l=0,n=0,g=0,w=0;a--,i--,o[0]=0,u[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const E=r-a+(s-i),C=E+1,I=new Int32Array(C),_=new Int32Array(C),A=s-i,k=r-a,L=a-i,R=r-s,N=(k-A)%2===0;I[A]=a,_[k]=r,d[0]=!1;for(let P=1;P<=E/2+1;P++){let x=0,F=0;l=this.ClipDiagonalBound(A-P,P,A,C),n=this.ClipDiagonalBound(A+P,P,A,C);for(let W=l;W<=n;W+=2){W===l||W<n&&I[W-1]<I[W+1]?p=I[W+1]:p=I[W-1]+1,c=p-(W-A)-L;const z=p;for(;p<r&&c<s&&this.ElementsAreEqual(p+1,c+1);)p++,c++;if(I[W]=p,p+c>x+F&&(x=p,F=c),!N&&Math.abs(W-k)<=P-1&&p>=_[W])return o[0]=p,u[0]=c,z<=_[W]&&1447>0&&P<=1447+1?this.WALKTRACE(A,l,n,L,k,g,w,R,I,_,p,r,o,c,s,u,N,d):null}const V=(x-a+(F-i)-P)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(x,V))return d[0]=!0,o[0]=x,u[0]=F,V>0&&1447>0&&P<=1447+1?this.WALKTRACE(A,l,n,L,k,g,w,R,I,_,p,r,o,c,s,u,N,d):(a++,i++,[new t.DiffChange(a,r-a+1,i,s-i+1)]);g=this.ClipDiagonalBound(k-P,P,k,C),w=this.ClipDiagonalBound(k+P,P,k,C);for(let W=g;W<=w;W+=2){W===g||W<w&&_[W-1]>=_[W+1]?p=_[W+1]-1:p=_[W-1],c=p-(W-k)-R;const z=p;for(;p>a&&c>i&&this.ElementsAreEqual(p,c);)p--,c--;if(_[W]=p,N&&Math.abs(W-A)<=P&&p<=I[W])return o[0]=p,u[0]=c,z>=I[W]&&1447>0&&P<=1447+1?this.WALKTRACE(A,l,n,L,k,g,w,R,I,_,p,r,o,c,s,u,N,d):null}if(P<=1447){let W=new Int32Array(n-l+2);W[0]=A-l+1,f.Copy2(I,l,W,1,n-l+1),this.m_forwardHistory.push(W),W=new Int32Array(w-g+2),W[0]=k-g+1,f.Copy2(_,g,W,1,w-g+1),this.m_reverseHistory.push(W)}}return this.WALKTRACE(A,l,n,L,k,g,w,R,I,_,p,r,o,c,s,u,N,d)}PrettifyChanges(a){for(let r=0;r<a.length;r++){const i=a[r],s=r<a.length-1?a[r+1].originalStart:this._originalElementsOrHash.length,o=r<a.length-1?a[r+1].modifiedStart:this._modifiedElementsOrHash.length,u=i.originalLength>0,d=i.modifiedLength>0;for(;i.originalStart+i.originalLength<s&&i.modifiedStart+i.modifiedLength<o&&(!u||this.OriginalElementsAreEqual(i.originalStart,i.originalStart+i.originalLength))&&(!d||this.ModifiedElementsAreEqual(i.modifiedStart,i.modifiedStart+i.modifiedLength));){const c=this.ElementsAreStrictEqual(i.originalStart,i.modifiedStart);if(this.ElementsAreStrictEqual(i.originalStart+i.originalLength,i.modifiedStart+i.modifiedLength)&&!c)break;i.originalStart++,i.modifiedStart++}const p=[null];if(r<a.length-1&&this.ChangesOverlap(a[r],a[r+1],p)){a[r]=p[0],a.splice(r+1,1),r--;continue}}for(let r=a.length-1;r>=0;r--){const i=a[r];let s=0,o=0;if(r>0){const n=a[r-1];s=n.originalStart+n.originalLength,o=n.modifiedStart+n.modifiedLength}const u=i.originalLength>0,d=i.modifiedLength>0;let p=0,c=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let n=1;;n++){const g=i.originalStart-n,w=i.modifiedStart-n;if(g<s||w<o||u&&!this.OriginalElementsAreEqual(g,g+i.originalLength)||d&&!this.ModifiedElementsAreEqual(w,w+i.modifiedLength))break;const C=(g===s&&w===o?5:0)+this._boundaryScore(g,i.originalLength,w,i.modifiedLength);C>c&&(c=C,p=n)}i.originalStart-=p,i.modifiedStart-=p;const l=[null];if(r>0&&this.ChangesOverlap(a[r-1],a[r],l)){a[r-1]=l[0],a.splice(r,1),r++;continue}}if(this._hasStrings)for(let r=1,i=a.length;r<i;r++){const s=a[r-1],o=a[r],u=o.originalStart-s.originalStart-s.originalLength,d=s.originalStart,p=o.originalStart+o.originalLength,c=p-d,l=s.modifiedStart,n=o.modifiedStart+o.modifiedLength,g=n-l;if(u<5&&c<20&&g<20){const w=this._findBetterContiguousSequence(d,c,l,g,u);if(w){const[E,C]=w;(E!==s.originalStart+s.originalLength||C!==s.modifiedStart+s.modifiedLength)&&(s.originalLength=E-s.originalStart,s.modifiedLength=C-s.modifiedStart,o.originalStart=E+u,o.modifiedStart=C+u,o.originalLength=p-o.originalStart,o.modifiedLength=n-o.modifiedStart)}}}return a}_findBetterContiguousSequence(a,r,i,s,o){if(r<o||s<o)return null;const u=a+r-o+1,d=i+s-o+1;let p=0,c=0,l=0;for(let n=a;n<u;n++)for(let g=i;g<d;g++){const w=this._contiguousSequenceScore(n,g,o);w>0&&w>p&&(p=w,c=n,l=g)}return p>0?[c,l]:null}_contiguousSequenceScore(a,r,i){let s=0;for(let o=0;o<i;o++){if(!this.ElementsAreEqual(a+o,r+o))return 0;s+=this._originalStringElements[a+o].length}return s}_OriginalIsBoundary(a){return a<=0||a>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[a])}_OriginalRegionIsBoundary(a,r){if(this._OriginalIsBoundary(a)||this._OriginalIsBoundary(a-1))return!0;if(r>0){const i=a+r;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(a){return a<=0||a>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[a])}_ModifiedRegionIsBoundary(a,r){if(this._ModifiedIsBoundary(a)||this._ModifiedIsBoundary(a-1))return!0;if(r>0){const i=a+r;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(a,r,i,s){const o=this._OriginalRegionIsBoundary(a,r)?1:0,u=this._ModifiedRegionIsBoundary(i,s)?1:0;return o+u}ConcatenateChanges(a,r){const i=[];if(a.length===0||r.length===0)return r.length>0?r:a;if(this.ChangesOverlap(a[a.length-1],r[0],i)){const s=new Array(a.length+r.length-1);return f.Copy(a,0,s,0,a.length-1),s[a.length-1]=i[0],f.Copy(r,1,s,a.length,r.length-1),s}else{const s=new Array(a.length+r.length);return f.Copy(a,0,s,0,a.length),f.Copy(r,0,s,a.length,r.length),s}}ChangesOverlap(a,r,i){if(T.Assert(a.originalStart<=r.originalStart,"Left change is not less than or equal to right change"),T.Assert(a.modifiedStart<=r.modifiedStart,"Left change is not less than or equal to right change"),a.originalStart+a.originalLength>=r.originalStart||a.modifiedStart+a.modifiedLength>=r.modifiedStart){const s=a.originalStart;let o=a.originalLength;const u=a.modifiedStart;let d=a.modifiedLength;return a.originalStart+a.originalLength>=r.originalStart&&(o=r.originalStart+r.originalLength-a.originalStart),a.modifiedStart+a.modifiedLength>=r.modifiedStart&&(d=r.modifiedStart+r.modifiedLength-a.modifiedStart),i[0]=new t.DiffChange(s,o,u,d),!0}else return i[0]=null,!1}ClipDiagonalBound(a,r,i,s){if(a>=0&&a<s)return a;const o=i,u=s-i-1,d=r%2===0;if(a<0){const p=o%2===0;return d===p?0:1}else{const p=u%2===0;return d===p?s-1:s-2}}}e.LcsDiff=S}),define(Q[1034],Y([1,0,33]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildReplaceStringWithCasePreserved=void 0;function y(T,f){if(T&&T[0]!==""){const v=b(T,f,"-"),m=b(T,f,"_");return v&&!m?D(T,f,"-"):!v&&m?D(T,f,"_"):T[0].toUpperCase()===T[0]?f.toUpperCase():T[0].toLowerCase()===T[0]?f.toLowerCase():t.containsUppercaseCharacter(T[0][0])&&f.length>0?f[0].toUpperCase()+f.substr(1):T[0][0].toUpperCase()!==T[0][0]&&f.length>0?f[0].toLowerCase()+f.substr(1):f}else return f}e.buildReplaceStringWithCasePreserved=y;function b(T,f,v){return T[0].indexOf(v)!==-1&&f.indexOf(v)!==-1&&T[0].split(v).length===f.split(v).length}function D(T,f,v){const m=f.split(v),S=T[0].split(v);let h="";return m.forEach((a,r)=>{h+=y([S[r]],a)+v}),h.slice(0,-1)}}),define(Q[63],Y([1,0,33]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var y;(function(b){b[b.Ignore=0]="Ignore",b[b.Info=1]="Info",b[b.Warning=2]="Warning",b[b.Error=3]="Error"})(y||(y={})),function(b){const D="error",T="warning",f="warn",v="info",m="ignore";function S(a){return a?t.equalsIgnoreCase(D,a)?b.Error:t.equalsIgnoreCase(T,a)||t.equalsIgnoreCase(f,a)?b.Warning:t.equalsIgnoreCase(v,a)?b.Info:b.Ignore:b.Ignore}b.fromValue=S;function h(a){switch(a){case b.Error:return D;case b.Warning:return T;case b.Info:return v;default:return m}}b.toString=h}(y||(y={})),e.default=y}),function(){function q(e,t,y,b){const D=/("[^"\\]*(?:\\.[^"\\]*)*")|('[^'\\]*(?:\\.[^'\\]*)*')|(\/\*[^\/\*]*(?:(?:\*|\/)[^\/\*]*)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))|(,\s*[}\]])/g;function T(f){return f.replace(D,function(v,m,S,h,a,r){if(h)return"";if(a){const i=a.length;return a[i-1]===` `?a[i-2]==="\r"?`\r `:` `:""}else return r?v.substring(1):v})}return{stripComments:T}}typeof define=="function"?define("vs/base/common/stripComments",[],function(){return q()}):typeof module=="object"&&typeof module.exports=="object"?module.exports=q():console.trace("strip comments defined in UNKNOWN context (neither requirejs or commonjs)")}(),define(Q[651],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MicrotaskDelay=void 0,e.MicrotaskDelay=Symbol("MicrotaskDelay")}),define(Q[283],Y([1,0,20,33]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TernarySearchTree=e.UriIterator=e.PathIterator=e.ConfigKeysIterator=e.StringIterator=void 0;class b{constructor(){this._value="",this._pos=0}reset(r){return this._value=r,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(r){const i=r.charCodeAt(0),s=this._value.charCodeAt(this._pos);return i-s}value(){return this._value[this._pos]}}e.StringIterator=b;class D{constructor(r=!0){this._caseSensitive=r}reset(r){return this._value=r,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let r=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(r)this._from++;else break;else r=!1;return this}cmp(r){return this._caseSensitive?(0,y.compareSubstring)(r,this._value,0,r.length,this._from,this._to):(0,y.compareSubstringIgnoreCase)(r,this._value,0,r.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.ConfigKeysIterator=D;class T{constructor(r=!0,i=!0){this._splitOnBackslash=r,this._caseSensitive=i}reset(r){this._from=0,this._to=0,this._value=r,this._valueLen=r.length;for(let i=r.length-1;i>=0;i--,this._valueLen--){const s=this._value.charCodeAt(i);if(!(s===47||this._splitOnBackslash&&s===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let r=!0;for(;this._to<this._valueLen;this._to++){const i=this._value.charCodeAt(this._to);if(i===47||this._splitOnBackslash&&i===92)if(r)this._from++;else break;else r=!1}return this}cmp(r){return this._caseSensitive?(0,y.compareSubstring)(r,this._value,0,r.length,this._from,this._to):(0,y.compareSubstringIgnoreCase)(r,this._value,0,r.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.PathIterator=T;var f;(function(a){a[a.Scheme=1]="Scheme",a[a.Authority=2]="Authority",a[a.Path=3]="Path",a[a.Query=4]="Query",a[a.Fragment=5]="Fragment"})(f||(f={}));class v{constructor(r,i){this._ignorePathCasing=r,this._ignoreQueryAndFragment=i,this._states=[],this._stateIdx=0}reset(r){return this._value=r,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new T(!1,!this._ignorePathCasing(r)),this._pathIterator.reset(r.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(r)||(this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5)),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(r){if(this._states[this._stateIdx]===1)return(0,y.compareIgnoreCase)(r,this._value.scheme);if(this._states[this._stateIdx]===2)return(0,y.compareIgnoreCase)(r,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(r);if(this._states[this._stateIdx]===4)return(0,y.compare)(r,this._value.query);if(this._states[this._stateIdx]===5)return(0,y.compare)(r,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}e.UriIterator=v;class m{constructor(){this.height=1}isEmpty(){return!this.left&&!this.mid&&!this.right&&!this.value}rotateLeft(){const r=this.right;return this.right=r.left,r.left=this,this.updateHeight(),r.updateHeight(),r}rotateRight(){const r=this.left;return this.left=r.right,r.right=this,this.updateHeight(),r.updateHeight(),r}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){return this.left?.height??0}get heightRight(){return this.right?.height??0}}var S;(function(a){a[a.Left=-1]="Left",a[a.Mid=0]="Mid",a[a.Right=1]="Right"})(S||(S={}));class h{static forUris(r=()=>!1,i=()=>!1){return new h(new v(r,i))}static forPaths(r=!1){return new h(new T(void 0,!r))}static forStrings(){return new h(new b)}static forConfigKeys(){return new h(new D)}constructor(r){this._iter=r}clear(){this._root=void 0}fill(r,i){if(i){const s=i.slice(0);(0,t.shuffle)(s);for(const o of s)this.set(o,r)}else{const s=r.slice(0);(0,t.shuffle)(s);for(const o of s)this.set(o[0],o[1])}}set(r,i){const s=this._iter.reset(r);let o;this._root||(this._root=new m,this._root.segment=s.value());const u=[];for(o=this._root;;){const p=s.cmp(o.segment);if(p>0)o.left||(o.left=new m,o.left.segment=s.value()),u.push([-1,o]),o=o.left;else if(p<0)o.right||(o.right=new m,o.right.segment=s.value()),u.push([1,o]),o=o.right;else if(s.hasNext())s.next(),o.mid||(o.mid=new m,o.mid.segment=s.value()),u.push([0,o]),o=o.mid;else break}const d=o.value;o.value=i,o.key=r;for(let p=u.length-1;p>=0;p--){const c=u[p][1];c.updateHeight();const l=c.balanceFactor();if(l<-1||l>1){const n=u[p][0],g=u[p+1][0];if(n===1&&g===1)u[p][1]=c.rotateLeft();else if(n===-1&&g===-1)u[p][1]=c.rotateRight();else if(n===1&&g===-1)c.right=u[p+1][1]=u[p+1][1].rotateRight(),u[p][1]=c.rotateLeft();else if(n===-1&&g===1)c.left=u[p+1][1]=u[p+1][1].rotateLeft(),u[p][1]=c.rotateRight();else throw new Error;if(p>0)switch(u[p-1][0]){case-1:u[p-1][1].left=u[p][1];break;case 1:u[p-1][1].right=u[p][1];break;case 0:u[p-1][1].mid=u[p][1];break}else this._root=u[0][1]}}return d}get(r){return this._getNode(r)?.value}_getNode(r){const i=this._iter.reset(r);let s=this._root;for(;s;){const o=i.cmp(s.segment);if(o>0)s=s.left;else if(o<0)s=s.right;else if(i.hasNext())i.next(),s=s.mid;else break}return s}has(r){const i=this._getNode(r);return!(i?.value===void 0&&i?.mid===void 0)}delete(r){return this._delete(r,!1)}deleteSuperstr(r){return this._delete(r,!0)}_delete(r,i){const s=this._iter.reset(r),o=[];let u=this._root;for(;u;){const d=s.cmp(u.segment);if(d>0)o.push([-1,u]),u=u.left;else if(d<0)o.push([1,u]),u=u.right;else if(s.hasNext())s.next(),o.push([0,u]),u=u.mid;else break}if(u){if(i?(u.left=void 0,u.mid=void 0,u.right=void 0,u.height=1):(u.key=void 0,u.value=void 0),!u.mid&&!u.value)if(u.left&&u.right){const d=this._min(u.right);if(d.key){const{key:p,value:c,segment:l}=d;this._delete(d.key,!1),u.key=p,u.value=c,u.segment=l}}else{const d=u.left??u.right;if(o.length>0){const[p,c]=o[o.length-1];switch(p){case-1:c.left=d;break;case 0:c.mid=d;break;case 1:c.right=d;break}}else this._root=d}for(let d=o.length-1;d>=0;d--){const p=o[d][1];p.updateHeight();const c=p.balanceFactor();if(c>1?(p.right.balanceFactor()>=0||(p.right=p.right.rotateRight()),o[d][1]=p.rotateLeft()):c<-1&&(p.left.balanceFactor()<=0||(p.left=p.left.rotateLeft()),o[d][1]=p.rotateRight()),d>0)switch(o[d-1][0]){case-1:o[d-1][1].left=o[d][1];break;case 1:o[d-1][1].right=o[d][1];break;case 0:o[d-1][1].mid=o[d][1];break}else this._root=o[0][1]}}}_min(r){for(;r.left;)r=r.left;return r}findSubstr(r){const i=this._iter.reset(r);let s=this._root,o;for(;s;){const u=i.cmp(s.segment);if(u>0)s=s.left;else if(u<0)s=s.right;else if(i.hasNext())i.next(),o=s.value||o,s=s.mid;else break}return s&&s.value||o}findSuperstr(r){return this._findSuperstrOrElement(r,!1)}_findSuperstrOrElement(r,i){const s=this._iter.reset(r);let o=this._root;for(;o;){const u=s.cmp(o.segment);if(u>0)o=o.left;else if(u<0)o=o.right;else if(s.hasNext())s.next(),o=o.mid;else return o.mid?this._entries(o.mid):i?o.value:void 0}}hasElementOrSubtree(r){return this._findSuperstrOrElement(r,!0)!==void 0}forEach(r){for(const[i,s]of this)r(s,i)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(r){const i=[];return this._dfsEntries(r,i),i[Symbol.iterator]()}_dfsEntries(r,i){r&&(r.left&&this._dfsEntries(r.left,i),r.value&&i.push([r.key,r.value]),r.mid&&this._dfsEntries(r.mid,i),r.right&&this._dfsEntries(r.right,i))}_isBalanced(){const r=i=>{if(!i)return!0;const s=i.balanceFactor();return s<-1||s>1?!1:r(i.left)&&r(i.right)};return r(this._root)}}e.TernarySearchTree=h}),define(Q[17],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withNullAsUndefined=e.validateConstraint=e.validateConstraints=e.areFunctions=e.isFunction=e.isEmptyObject=e.assertAllDefined=e.assertIsDefined=e.assertType=e.isUndefinedOrNull=e.isDefined=e.isUndefined=e.isBoolean=e.isIterable=e.isNumber=e.isTypedArray=e.isObject=e.isStringArray=e.isString=void 0;function t(n){return typeof n=="string"}e.isString=t;function y(n){return Array.isArray(n)&&n.every(g=>t(g))}e.isStringArray=y;function b(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&!(n instanceof RegExp)&&!(n instanceof Date)}e.isObject=b;function D(n){const g=Object.getPrototypeOf(Uint8Array);return typeof n=="object"&&n instanceof g}e.isTypedArray=D;function T(n){return typeof n=="number"&&!isNaN(n)}e.isNumber=T;function f(n){return!!n&&typeof n[Symbol.iterator]=="function"}e.isIterable=f;function v(n){return n===!0||n===!1}e.isBoolean=v;function m(n){return typeof n>"u"}e.isUndefined=m;function S(n){return!h(n)}e.isDefined=S;function h(n){return m(n)||n===null}e.isUndefinedOrNull=h;function a(n,g){if(!n)throw new Error(g?`Unexpected type, expected '${g}'`:"Unexpected type")}e.assertType=a;function r(n){if(h(n))throw new Error("Assertion Failed: argument is undefined or null");return n}e.assertIsDefined=r;function i(...n){const g=[];for(let w=0;w<n.length;w++){const E=n[w];if(h(E))throw new Error(`Assertion Failed: argument at index ${w} is undefined or null`);g.push(E)}return g}e.assertAllDefined=i;const s=Object.prototype.hasOwnProperty;function o(n){if(!b(n))return!1;for(const g in n)if(s.call(n,g))return!1;return!0}e.isEmptyObject=o;function u(n){return typeof n=="function"}e.isFunction=u;function d(...n){return n.length>0&&n.every(u)}e.areFunctions=d;function p(n,g){const w=Math.min(n.length,g.length);for(let E=0;E<w;E++)c(n[E],g[E])}e.validateConstraints=p;function c(n,g){if(t(g)){if(typeof n!==g)throw new Error(`argument does not match constraint: typeof ${g}`)}else if(u(g)){try{if(n instanceof g)return}catch{}if(!h(n)&&n.constructor===g||g.length===1&&g.call(void 0,n)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}e.validateConstraint=c;function l(n){return n===null?void 0:n}e.withNullAsUndefined=l}),define(Q[256],Y([1,0,6,17,33,4]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TableDataView=e.defaultFilter=e.defaultSort=e.defaultCellValueGetter=void 0;function T(S){return S}e.defaultCellValueGetter=T;function f(S,h,a=T){if(!S.sortCol||!S.sortCol.field||h.length===0)return h;const r=S.sortCol.field,i=S.sortAsc?1:-1,s=(o,u)=>{const d=a(o[r]),p=a(u[r]),c=Number(d),l=Number(p),n=!isNaN(c),g=!isNaN(l);return d===void 0||p===void 0?d===p?0:d===void 0?-1:1:n||g?n&&g?c===l?0:c>l?1:-1:n?-1:1:(0,b.compare)(d,p)};return h.sort((o,u)=>s(o,u)*i)}e.defaultSort=f;function v(S,h,a=T){let r=S;return h?.forEach(i=>{i.filterValues?.length>0&&i.field&&(r=r.filter(s=>i.filterValues.includes(a(s[i.field]))))}),r}e.defaultFilter=v;class m extends D.Disposable{get onRowCountChange(){return this._onRowCountChange.event}get onFindCountChange(){return this._onFindCountChange.event}get onFilterStateChange(){return this._onFilterStateChange.event}get onSortComplete(){return this._onSortComplete.event}constructor(h,a,r,i,s=T){super(),this._findFn=a,this._sortFn=r,this._filterFn=i,this._cellValueGetter=s,this._onRowCountChange=this._register(new t.Emitter),this._onFindCountChange=this._register(new t.Emitter),this._onFilterStateChange=this._register(new t.Emitter),this._onSortComplete=this._register(new t.Emitter),h?this._data=h:this._data=new Array,this._sortFn=r||((o,u)=>f(o,u,s)),this._filterFn=i||((o,u)=>v(o,u,s)),this._filterEnabled=!1,this._cellValueGetter=this._cellValueGetter?this._cellValueGetter:o=>o?.toString()}get isDataInMemory(){return!0}async getRangeAsync(h,a){return this._data.slice(h,h+a)}async getColumnValues(h){const a=new Set;return this._data.forEach(r=>{const i=r[h.field];(i instanceof Array?i:[i]).forEach(o=>a.add(this._cellValueGetter(o)))}),Array.from(a)}get filterEnabled(){return this._filterEnabled}async filter(h){this.filterEnabled||(this._allData=new Array(...this._data),this._filterEnabled=!0),this._currentColumnFilters=h,this._data=this._filterFn(this._allData,h),this._data.length===this._allData.length?this.clearFilter():this._onFilterStateChange.fire()}clearFilter(){this._filterEnabled&&(this._data=this._allData,this._allData=[],this._filterEnabled=!1,this._onFilterStateChange.fire())}async sort(h){this._data=this._sortFn(h,this._data),this._onSortComplete.fire(h)}getLength(){return this._data.length}getItem(h){return this._data[h]}getItems(){return this._data.slice()}getLengthNonFiltered(){return this.filterEnabled?this._allData.length:this._data.length}push(h){let a=new Array;if(Array.isArray(h)?a.push(...h):a.push(h),this._filterEnabled){this._allData.push(...a);let r=this._filterFn(a,this._currentColumnFilters);r.length!==0&&this._data.push(...r)}else this._data.push(...a);this._onRowCountChange.fire(this.getLength())}clear(){this._data=new Array,this._filterEnabled&&(this._allData=new Array),this._onRowCountChange.fire(this.getLength())}find(h,a){return this._findFn?(this._findArray=new Array,this._findIndex=0,this._onFindCountChange.fire(this._findArray.length),h?new Promise(r=>{const i=this.onFindCountChange(s=>{r(this._findArray[s-1]),i.dispose()});this._startSearch(h,a)}):Promise.reject(new Error("no expression"))):Promise.reject(new Error("no find function provided"))}_startSearch(h,a=0){for(let r=0;r<this._data.length;r++){const i=this._data[r],s=this._findFn(i,h);let o=!1;if(s)for(let u=0;u<s.length;u++){const p={col:s[u],row:r};if(this._findArray.push(p),this._onFindCountChange.fire(this._findArray.length),a>0&&this._findArray.length===a){o=!0;break}}if(o)break}}clearFind(){this._findArray=new Array,this._findIndex=0,this._onFindCountChange.fire(this._findArray.length)}findNext(){return this._findArray&&this._findArray.length!==0?(this._findIndex===this._findArray.length-1?this._findIndex=0:++this._findIndex,Promise.resolve(this._findArray[this._findIndex])):Promise.reject(new Error("no search running"))}findPrevious(){return this._findArray&&this._findArray.length!==0?(this._findIndex===0?this._findIndex=this._findArray.length-1:--this._findIndex,Promise.resolve(this._findArray[this._findIndex])):Promise.reject(new Error("no search running"))}get currentFindPosition(){return this._findArray&&this._findArray.length!==0?Promise.resolve(this._findArray[this._findIndex]):Promise.reject(new Error("no search running"))}get findPosition(){return y.isUndefinedOrNull(this._findIndex)?0:this._findIndex+1}get findCount(){return y.isUndefinedOrNull(this._findArray)?0:this._findArray.length}dispose(){super.dispose(),this._data=[],this._allData=[],this._findArray=[]}}e.TableDataView=m}),define(Q[1035],Y([1,0,558,256,6,4]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HybridDataProvider=void 0;class T extends D.Disposable{get onFilterStateChange(){return this._onFilterStateChange.event}get onSortComplete(){return this._onSortComplete.event}constructor(v,m,S,h,a,r){super(),this._loadDataFn=m,this._options=r,this._dataCached=!1,this._onFilterStateChange=this._register(new b.Emitter),this._onSortComplete=this._register(new b.Emitter),this._asyncDataProvider=new t.AsyncDataProvider(v),this._tableDataProvider=new y.TableDataView(void 0,void 0,h,S,a),this._register(this._asyncDataProvider.onFilterStateChange(()=>{this._onFilterStateChange.fire()})),this._register(this._asyncDataProvider.onSortComplete(i=>{this._onSortComplete.fire(i)})),this._register(this._tableDataProvider.onFilterStateChange(()=>{this._onFilterStateChange.fire()})),this._register(this._tableDataProvider.onSortComplete(i=>{this._onSortComplete.fire(i)})),this._register(this._asyncDataProvider),this._register(this._tableDataProvider)}get isDataInMemory(){return this._dataCached}async getRangeAsync(v,m){return this.provider.getRangeAsync(v,m)}async getColumnValues(v){return await this.initializeCacheIfNeeded(),this.provider.getColumnValues(v)}get dataRows(){return this._asyncDataProvider.dataRows}set dataRows(v){this._asyncDataProvider.dataRows=v}getLength(){return this.provider.getLength()}getItem(v){return this.provider.getItem(v)}getItems(){throw new Error("Method not implemented.")}get length(){return this.provider.getLength()}set length(v){this._asyncDataProvider.length=v}async filter(v){await this.initializeCacheIfNeeded(),this.provider.filter(v)}async sort(v){await this.initializeCacheIfNeeded(),this.provider.sort(v)}get thresholdReached(){return this._options.inMemoryDataCountThreshold!==void 0&&this.length>this._options.inMemoryDataCountThreshold}get provider(){return this._dataCached?this._tableDataProvider:this._asyncDataProvider}async initializeCacheIfNeeded(){if(this._options.inMemoryDataProcessing&&!this.thresholdReached&&!this._dataCached){const v=await this._loadDataFn(0,this.length);this._dataCached=!0,this._tableDataProvider.push(v)}}}e.HybridDataProvider=T}),define(Q[1036],Y([1,0,1494,17]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GridRange=void 0;class b{constructor(T,f,v,m){this.startRow=(0,y.isNumber)(v)?Math.min(T,v):T,this.startColumn=(0,y.isNumber)(m)?Math.min(f,m):f,this.endRow=(0,y.isNumber)(v)?Math.max(v,T):T,this.endColumn=(0,y.isNumber)(m)?Math.max(m,f):f}containsPosition(T){return b.containsPosition(this,T)}static containsPosition(T,f){return f.row>=T.startRow&&f.row<=T.endRow&&f.column>=T.startColumn&&f.column<=T.endColumn}containsRange(T){return b.containsRange(this,T)}static containsRange(T,f){return!(f.startRow<T.startRow||f.endRow<T.startRow||f.startRow>T.endRow||f.endRow>T.endRow||f.startRow===T.startRow&&f.startColumn<T.startColumn||f.endRow===T.endRow&&f.endColumn>T.endColumn)}plusRange(T){return b.plusRange(this,T)}static plusRange(T,f){let v=Math.min(T.startRow,f.startRow),m=Math.min(T.startColumn,f.startColumn),S=Math.max(T.endRow,f.endRow),h=Math.max(T.endColumn,f.endColumn);return new b(v,m,S,h)}intersectRanges(T){return b.intersectRanges(this,T)}static intersectRanges(T,f){let v=T.startRow,m=T.startColumn,S=T.endRow,h=T.endColumn,a=f.startRow,r=f.startColumn,i=f.endRow,s=f.endColumn;return v<a?(v=a,m=r):v===a&&(m=Math.max(m,r)),S>i?(S=i,h=s):S===i&&(h=Math.min(h,s)),v>S||v===S&&m>h?null:new b(v,m,S,h)}equalsRange(T){return b.equalsRange(this,T)}static equalsRange(T,f){return!!T&&!!f&&T.startRow===f.startRow&&T.startColumn===f.startColumn&&T.endRow===f.endRow&&T.endColumn===f.endColumn}getEndPosition(){return new t.GridPosition(this.endRow,this.endColumn)}getStartPosition(){return new t.GridPosition(this.startRow,this.startColumn)}toString(){return"["+this.startRow+","+this.startColumn+" -> "+this.endRow+","+this.endColumn+"]"}setEndPosition(T,f){return new b(this.startRow,this.startColumn,T,f)}setStartPosition(T,f){return new b(T,f,this.endRow,this.endColumn)}collapseToStart(){return b.collapseToStart(this)}static collapseToStart(T){return new b(T.startRow,T.startColumn,T.startRow,T.startColumn)}static fromPositions(T,f=T){return new b(T.row,T.column,f.row,f.column)}static lift(T){return T?new b(T.startRow,T.startColumn,T.endRow,T.endColumn):null}static isIRange(T){return T&&typeof T.startRow=="number"&&typeof T.startColumn=="number"&&typeof T.endRow=="number"&&typeof T.endColumn=="number"}static areIntersectingOrTouching(T,f){return!(T.endRow<f.startRow||T.endRow===f.startRow&&T.endColumn<f.startColumn||f.endRow<T.startRow||f.endRow===T.startRow&&f.endColumn<T.startColumn)}static areIntersecting(T,f){return!(T.endRow<f.startRow||T.endRow===f.startRow&&T.endColumn<=f.startColumn||f.endRow<T.startRow||f.endRow===T.startRow&&f.endColumn<=T.startColumn)}static compareRangesUsingStarts(T,f){if(T&&f){const S=T.startRow|0,h=f.startRow|0;if(S===h){const a=T.startColumn|0,r=f.startColumn|0;if(a===r){const i=T.endRow|0,s=f.endRow|0;if(i===s){const o=T.endColumn|0,u=f.endColumn|0;return o-u}return i-s}return a-r}return S-h}return(T?1:0)-(f?1:0)}static compareRangesUsingEnds(T,f){return T.endRow===f.endRow?T.endColumn===f.endColumn?T.startRow===f.startRow?T.startColumn-f.startColumn:T.startRow-f.startRow:T.endColumn-f.endColumn:T.endRow-f.endRow}static spansMultipleLines(T){return T.endRow>T.startRow}static fromSlickRange(T){return{startRow:T.fromRow,endRow:T.toRow,startColumn:T.fromCell,endColumn:T.toCell}}static fromSlickRanges(T){return T.map(f=>b.fromSlickRange(f))}static mergeRanges(T,f){let v=T.map(S=>f?{start:S.startRow,end:S.endRow}:{start:S.startColumn,end:S.endColumn});const m=[];return v=v.sort((S,h)=>S.start-h.start),v.forEach(S=>{let h=!1;for(let a=0;a<m.length;a++){const r=m[a];if(S.start<=r.end){r.end=Math.max(S.end,r.end),h=!0;break}}h||m.push(S)}),m}static getUniqueRows(T){return b.mergeRanges(T,!0)}static getUniqueColumns(T){return b.mergeRanges(T,!1)}}e.GridRange=b}),define(Q[389],Y([1,0,17]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mixin=void 0;function y(b,D,T=!0,f){return t.isObject(b)?(t.isObject(D)&&Object.keys(D).forEach(v=>{v in b?T&&(t.isObject(b[v])&&t.isObject(D[v])?y(b[v],D[v],T,f):f?b[v]=f(b[v],D[v],T):b[v]=D[v]):b[v]=D[v]}),b):D}e.mixin=y}),define(Q[194],Y([1,0,17]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionProfileGroup=void 0;class y{constructor(D,T,f,v,m){this.name=D,this.parent=T,this.id=f,this.color=v,this.description=m,this._childGroups=[],this._childConnections=[],this._isRenamed=!1,this.isRoot=!1,this.textColor="white",this.parentId=T?T.id:void 0,y.isRoot(this.name)&&(this.name="",this.isRoot=!0)}static{this.GroupNameSeparator="/"}static{this.RootGroupName="ROOT"}toObject(){let D;return this._childGroups.length>0&&(D=[],this._childGroups.forEach(T=>{D.push(T.toObject())})),Object.assign({},{name:this.name,id:this.id,parentId:this.parentId,children:D,color:this.color,description:this.description})}get groupName(){return this.name}get fullName(){let D=this.id==="root"?void 0:this.name;if(this.parent){let T=this.parent.fullName;T&&(D=T+y.GroupNameSeparator+this.name)}return D}get isRenamed(){return this._isRenamed}set isRenamed(D){this._isRenamed=D}get children(){return this._childGroups}set children(D){this._childGroups=D??[]}get connections(){return this._childConnections}set connections(D){this._childConnections=D??[]}hasChildren(){return this._childGroups.length>0||this._childConnections.length>0}get hasValidConnections(){if(this._childConnections.find(T=>T.serverCapabilities===void 0)!==void 0)return!1;{let T=!0;return this._childGroups.forEach(f=>{f.hasValidConnections||(T=!1)}),T}}getChildren(){let D=[];return this._childConnections.forEach(T=>{D.push(T)}),this._childGroups.forEach(T=>{D.push(T)}),D}equals(D){return D instanceof y?D.id===this.id:!1}addConnections(D){D?.forEach(T=>{this._childConnections=this._childConnections.filter(f=>f.id!==T.id),T.parent=this,T.groupId=this.id,this._childConnections.push(T)})}addGroups(D){D?.forEach(T=>{this._childGroups=this._childGroups.filter(f=>T.id!==f.id),T.parent=this,T.parentId=this.id,this._childGroups.push(T)})}removeConnections(D){const T=D.map(f=>f.id);this._childConnections=this._childConnections.filter(f=>!T.includes(f.id))}getMatchingConnection(D){return this._childConnections.find(T=>D.matches(T))}addOrReplaceConnection(D){const T=this.getMatchingConnection(D);D.parent=this,D.groupId=this.id,D.groupFullName=this.fullName,T?this.replaceConnection(D,T.id):this._childConnections.push(D)}replaceConnection(D,T){const f=this._childConnections.findIndex(v=>v.id===T);if(f!==-1)this._childConnections[f]=D,D.parent=this,D.groupId=this.id;else throw new Error(`Could not find connection with id ${T} in group ${this.name}`)}getParent(){return this.parent}isAncestorOf(D){let T=!1,f=D;for(;f;){if(f.parent&&f.parent.id===this.id){T=!0;break}f=f.parent}return T}static getGroupFullNameParts(D){D=D||"";let T=D.split(y.GroupNameSeparator);return T=T.filter(f=>!!f),T.length===0?T.push("ROOT"):T[0].toUpperCase()!=="ROOT"&&T.unshift("ROOT"),T[0]="ROOT",T}static isRoot(D){return!D||D.toUpperCase()===y.RootGroupName||D===y.GroupNameSeparator}static sameGroupName(D,T){const f=(0,t.isUndefinedOrNull)(D),v=(0,t.isUndefinedOrNull)(T);return f&&v?!0:f&&!v||!f&&v?!1:D.toUpperCase()===T.toUpperCase()?!0:y.isRoot(D)&&y.isRoot(T)}static getConnectionsInGroup(D){let T=[];return D&&D.connections&&D.connections.forEach(f=>T.push(f)),D&&D.children&&D.children.forEach(f=>{T=T.concat(this.getConnectionsInGroup(f))}),T}static getSubgroups(D){let T=[];return D&&D.children&&(D.children.forEach(f=>T.push(f)),D.children.forEach(f=>{T=T.concat(this.getSubgroups(f))})),T}static createConnectionProfileGroup(D,T){return new y(D.name,T,D.id,D.color,D.description)}}e.ConnectionProfileGroup=y}),define(Q[787],Y([1,0,4,6,17]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GridTableState=e.GridPanelState=void 0;class D{constructor(){this.tableStates=[]}dispose(){(0,t.dispose)(this.tableStates)}}e.GridPanelState=D;class T extends t.Disposable{constructor(v,m){super(),this.resultId=v,this.batchId=m,this._onMaximizedChange=this._register(new y.Emitter),this.onMaximizedChange=this._onMaximizedChange.event,this._onCanBeMaximizedChange=this._register(new y.Emitter),this.onCanBeMaximizedChange=this._onCanBeMaximizedChange.event,this.scrollPositionY=0,this.scrollPositionX=0}get canBeMaximized(){return this._canBeMaximized}set canBeMaximized(v){(0,b.isUndefined)(v)||v===this._canBeMaximized||(this._canBeMaximized=v,this._onCanBeMaximizedChange.fire(v))}get maximized(){return this._maximized}set maximized(v){(0,b.isUndefined)(v)||v===this._maximized||(this._maximized=v,this._onMaximizedChange.fire(v))}get columnFilters(){return this._columnFilters}set columnFilters(v){this._columnFilters=v}get sortState(){return this._sortState}set sortState(v){this._sortState=v}}e.GridTableState=T}),define(Q[215],Y([1,0,389,17]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataDirection=e.DataType=e.LegendPositionToChartJsPosition=e.LegendPosition=e.ChartTypeToChartJsType=e.ChartType=e.InsightType=e.customMixin=void 0;function b(S,h,a){if(y.isObject(h))(0,t.mixin)(S,h,a,b);else if(Array.isArray(h))for(let r=0;r<h.length;r++)S[r]?(0,t.mixin)(S[r],h[r],a,b):S[r]=h[r];else S=h;return S}e.customMixin=b;var D;(function(S){S.Image="image",S.Table="table",S.Count="count"})(D||(e.InsightType=D={}));var T;(function(S){S.Bar="bar",S.Doughnut="doughnut",S.HorizontalBar="horizontalBar",S.Line="line",S.Pie="pie",S.TimeSeries="timeSeries",S.Scatter="scatter"})(T||(e.ChartType=T={})),e.ChartTypeToChartJsType={bar:"bar",doughnut:"doughnut",horizontalBar:"bar",line:"line",pie:"pie",timeSeries:"line",scatter:"scatter"};var f;(function(S){S.Top="top",S.Bottom="bottom",S.Left="left",S.Right="right",S.None="none"})(f||(e.LegendPosition=f={})),e.LegendPositionToChartJsPosition={top:"top",bottom:"bottom",left:"left",right:"right",none:"left"};var v;(function(S){S.Number="number",S.Point="point"})(v||(e.DataType=v={}));var m;(function(S){S.Vertical="vertical",S.Horizontal="horizontal"})(m||(e.DataDirection=m={}))}),define(Q[652],Y([1,0,215]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultChartConfig=void 0,e.defaultChartConfig={labelFirstColumn:!0,columnsAsLabels:!0,legendPosition:t.LegendPosition.Top,dataDirection:t.DataDirection.Vertical}}),define(Q[1037],Y([1,0,194]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncRecentConnectionTreeDataSource=void 0;class y{hasChildren(D){return D instanceof t.ConnectionProfileGroup?D.hasChildren():!1}async getChildren(D){return D instanceof t.ConnectionProfileGroup?D.getChildren():[]}}e.AsyncRecentConnectionTreeDataSource=y}),define(Q[32],Y([1,0,17]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Codicon=e.getAllCodicons=e.getCodiconFontCharacters=void 0;const y=Object.create(null);function b(f,v){if((0,t.isString)(v)){const m=y[v];if(m===void 0)throw new Error(`${f} references an unknown codicon: ${v}`);v=m}return y[f]=v,{id:f}}function D(){return y}e.getCodiconFontCharacters=D;function T(){return Object.values(e.Codicon)}e.getAllCodicons=T,e.Codicon={add:b("add",6e4),plus:b("plus",6e4),gistNew:b("gist-new",6e4),repoCreate:b("repo-create",6e4),lightbulb:b("lightbulb",60001),lightBulb:b("light-bulb",60001),repo:b("repo",60002),repoDelete:b("repo-delete",60002),gistFork:b("gist-fork",60003),repoForked:b("repo-forked",60003),gitPullRequest:b("git-pull-request",60004),gitPullRequestAbandoned:b("git-pull-request-abandoned",60004),recordKeys:b("record-keys",60005),keyboard:b("keyboard",60005),tag:b("tag",60006),tagAdd:b("tag-add",60006),tagRemove:b("tag-remove",60006),gitPullRequestLabel:b("git-pull-request-label",60006),person:b("person",60007),personFollow:b("person-follow",60007),personOutline:b("person-outline",60007),personFilled:b("person-filled",60007),gitBranch:b("git-branch",60008),gitBranchCreate:b("git-branch-create",60008),gitBranchDelete:b("git-branch-delete",60008),sourceControl:b("source-control",60008),mirror:b("mirror",60009),mirrorPublic:b("mirror-public",60009),star:b("star",60010),starAdd:b("star-add",60010),starDelete:b("star-delete",60010),starEmpty:b("star-empty",60010),comment:b("comment",60011),commentAdd:b("comment-add",60011),alert:b("alert",60012),warning:b("warning",60012),search:b("search",60013),searchSave:b("search-save",60013),logOut:b("log-out",60014),signOut:b("sign-out",60014),logIn:b("log-in",60015),signIn:b("sign-in",60015),eye:b("eye",60016),eyeUnwatch:b("eye-unwatch",60016),eyeWatch:b("eye-watch",60016),circleFilled:b("circle-filled",60017),primitiveDot:b("primitive-dot",60017),closeDirty:b("close-dirty",60017),debugBreakpoint:b("debug-breakpoint",60017),debugBreakpointDisabled:b("debug-breakpoint-disabled",60017),debugHint:b("debug-hint",60017),primitiveSquare:b("primitive-square",60018),edit:b("edit",60019),pencil:b("pencil",60019),info:b("info",60020),issueOpened:b("issue-opened",60020),gistPrivate:b("gist-private",60021),gitForkPrivate:b("git-fork-private",60021),lock:b("lock",60021),mirrorPrivate:b("mirror-private",60021),close:b("close",60022),removeClose:b("remove-close",60022),x:b("x",60022),repoSync:b("repo-sync",60023),sync:b("sync",60023),clone:b("clone",60024),desktopDownload:b("desktop-download",60024),beaker:b("beaker",60025),microscope:b("microscope",60025),vm:b("vm",60026),deviceDesktop:b("device-desktop",60026),file:b("file",60027),fileText:b("file-text",60027),more:b("more",60028),ellipsis:b("ellipsis",60028),kebabHorizontal:b("kebab-horizontal",60028),mailReply:b("mail-reply",60029),reply:b("reply",60029),organization:b("organization",60030),organizationFilled:b("organization-filled",60030),organizationOutline:b("organization-outline",60030),newFile:b("new-file",60031),fileAdd:b("file-add",60031),newFolder:b("new-folder",60032),fileDirectoryCreate:b("file-directory-create",60032),trash:b("trash",60033),trashcan:b("trashcan",60033),history:b("history",60034),clock:b("clock",60034),folder:b("folder",60035),fileDirectory:b("file-directory",60035),symbolFolder:b("symbol-folder",60035),logoGithub:b("logo-github",60036),markGithub:b("mark-github",60036),github:b("github",60036),terminal:b("terminal",60037),console:b("console",60037),repl:b("repl",60037),zap:b("zap",60038),symbolEvent:b("symbol-event",60038),error:b("error",60039),stop:b("stop",60039),variable:b("variable",60040),symbolVariable:b("symbol-variable",60040),array:b("array",60042),symbolArray:b("symbol-array",60042),symbolModule:b("symbol-module",60043),symbolPackage:b("symbol-package",60043),symbolNamespace:b("symbol-namespace",60043),symbolObject:b("symbol-object",60043),symbolMethod:b("symbol-method",60044),symbolFunction:b("symbol-function",60044),symbolConstructor:b("symbol-constructor",60044),symbolBoolean:b("symbol-boolean",60047),symbolNull:b("symbol-null",60047),symbolNumeric:b("symbol-numeric",60048),symbolNumber:b("symbol-number",60048),symbolStructure:b("symbol-structure",60049),symbolStruct:b("symbol-struct",60049),symbolParameter:b("symbol-parameter",60050),symbolTypeParameter:b("symbol-type-parameter",60050),symbolKey:b("symbol-key",60051),symbolText:b("symbol-text",60051),symbolReference:b("symbol-reference",60052),goToFile:b("go-to-file",60052),symbolEnum:b("symbol-enum",60053),symbolValue:b("symbol-value",60053),symbolRuler:b("symbol-ruler",60054),symbolUnit:b("symbol-unit",60054),activateBreakpoints:b("activate-breakpoints",60055),archive:b("archive",60056),arrowBoth:b("arrow-both",60057),arrowDown:b("arrow-down",60058),arrowLeft:b("arrow-left",60059),arrowRight:b("arrow-right",60060),arrowSmallDown:b("arrow-small-down",60061),arrowSmallLeft:b("arrow-small-left",60062),arrowSmallRight:b("arrow-small-right",60063),arrowSmallUp:b("arrow-small-up",60064),arrowUp:b("arrow-up",60065),bell:b("bell",60066),bold:b("bold",60067),book:b("book",60068),bookmark:b("bookmark",60069),debugBreakpointConditionalUnverified:b("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:b("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:b("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:b("debug-breakpoint-data-unverified",60072),debugBreakpointData:b("debug-breakpoint-data",60073),debugBreakpointDataDisabled:b("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:b("debug-breakpoint-log-unverified",60074),debugBreakpointLog:b("debug-breakpoint-log",60075),debugBreakpointLogDisabled:b("debug-breakpoint-log-disabled",60075),briefcase:b("briefcase",60076),broadcast:b("broadcast",60077),browser:b("browser",60078),bug:b("bug",60079),calendar:b("calendar",60080),caseSensitive:b("case-sensitive",60081),check:b("check",60082),checklist:b("checklist",60083),chevronDown:b("chevron-down",60084),dropDownButton:b("drop-down-button",60084),chevronLeft:b("chevron-left",60085),chevronRight:b("chevron-right",60086),chevronUp:b("chevron-up",60087),chromeClose:b("chrome-close",60088),chromeMaximize:b("chrome-maximize",60089),chromeMinimize:b("chrome-minimize",60090),chromeRestore:b("chrome-restore",60091),circle:b("circle",60092),circleOutline:b("circle-outline",60092),debugBreakpointUnverified:b("debug-breakpoint-unverified",60092),circleSlash:b("circle-slash",60093),circuitBoard:b("circuit-board",60094),clearAll:b("clear-all",60095),clippy:b("clippy",60096),closeAll:b("close-all",60097),cloudDownload:b("cloud-download",60098),cloudUpload:b("cloud-upload",60099),code:b("code",60100),collapseAll:b("collapse-all",60101),colorMode:b("color-mode",60102),commentDiscussion:b("comment-discussion",60103),compareChanges:b("compare-changes",60157),creditCard:b("credit-card",60105),dash:b("dash",60108),dashboard:b("dashboard",60109),database:b("database",60110),debugContinue:b("debug-continue",60111),debugDisconnect:b("debug-disconnect",60112),debugPause:b("debug-pause",60113),debugRestart:b("debug-restart",60114),debugStart:b("debug-start",60115),debugStepInto:b("debug-step-into",60116),debugStepOut:b("debug-step-out",60117),debugStepOver:b("debug-step-over",60118),debugStop:b("debug-stop",60119),debug:b("debug",60120),deviceCameraVideo:b("device-camera-video",60121),deviceCamera:b("device-camera",60122),deviceMobile:b("device-mobile",60123),diffAdded:b("diff-added",60124),diffIgnored:b("diff-ignored",60125),diffModified:b("diff-modified",60126),diffRemoved:b("diff-removed",60127),diffRenamed:b("diff-renamed",60128),diff:b("diff",60129),discard:b("discard",60130),editorLayout:b("editor-layout",60131),emptyWindow:b("empty-window",60132),exclude:b("exclude",60133),extensions:b("extensions",60134),eyeClosed:b("eye-closed",60135),fileBinary:b("file-binary",60136),fileCode:b("file-code",60137),fileMedia:b("file-media",60138),filePdf:b("file-pdf",60139),fileSubmodule:b("file-submodule",60140),fileSymlinkDirectory:b("file-symlink-directory",60141),fileSymlinkFile:b("file-symlink-file",60142),fileZip:b("file-zip",60143),files:b("files",60144),filter:b("filter",60145),flame:b("flame",60146),foldDown:b("fold-down",60147),foldUp:b("fold-up",60148),fold:b("fold",60149),folderActive:b("folder-active",60150),folderOpened:b("folder-opened",60151),gear:b("gear",60152),gift:b("gift",60153),gistSecret:b("gist-secret",60154),gist:b("gist",60155),gitCommit:b("git-commit",60156),gitCompare:b("git-compare",60157),gitMerge:b("git-merge",60158),githubAction:b("github-action",60159),githubAlt:b("github-alt",60160),globe:b("globe",60161),grabber:b("grabber",60162),graph:b("graph",60163),gripper:b("gripper",60164),heart:b("heart",60165),home:b("home",60166),horizontalRule:b("horizontal-rule",60167),hubot:b("hubot",60168),inbox:b("inbox",60169),issueClosed:b("issue-closed",60324),issueReopened:b("issue-reopened",60171),issues:b("issues",60172),italic:b("italic",60173),jersey:b("jersey",60174),json:b("json",60175),bracket:b("bracket",60175),kebabVertical:b("kebab-vertical",60176),key:b("key",60177),law:b("law",60178),lightbulbAutofix:b("lightbulb-autofix",60179),linkExternal:b("link-external",60180),link:b("link",60181),listOrdered:b("list-ordered",60182),listUnordered:b("list-unordered",60183),liveShare:b("live-share",60184),loading:b("loading",60185),location:b("location",60186),mailRead:b("mail-read",60187),mail:b("mail",60188),markdown:b("markdown",60189),megaphone:b("megaphone",60190),mention:b("mention",60191),milestone:b("milestone",60192),gitPullRequestMilestone:b("git-pull-request-milestone",60192),mortarBoard:b("mortar-board",60193),move:b("move",60194),multipleWindows:b("multiple-windows",60195),mute:b("mute",60196),noNewline:b("no-newline",60197),note:b("note",60198),octoface:b("octoface",60199),openPreview:b("open-preview",60200),package_:b("package",60201),paintcan:b("paintcan",60202),pin:b("pin",60203),play:b("play",60204),run:b("run",60204),plug:b("plug",60205),preserveCase:b("preserve-case",60206),preview:b("preview",60207),project:b("project",60208),pulse:b("pulse",60209),question:b("question",60210),quote:b("quote",60211),radioTower:b("radio-tower",60212),reactions:b("reactions",60213),references:b("references",60214),refresh:b("refresh",60215),regex:b("regex",60216),remoteExplorer:b("remote-explorer",60217),remote:b("remote",60218),remove:b("remove",60219),replaceAll:b("replace-all",60220),replace:b("replace",60221),repoClone:b("repo-clone",60222),repoForcePush:b("repo-force-push",60223),repoPull:b("repo-pull",60224),repoPush:b("repo-push",60225),report:b("report",60226),requestChanges:b("request-changes",60227),rocket:b("rocket",60228),rootFolderOpened:b("root-folder-opened",60229),rootFolder:b("root-folder",60230),rss:b("rss",60231),ruby:b("ruby",60232),saveAll:b("save-all",60233),saveAs:b("save-as",60234),save:b("save",60235),screenFull:b("screen-full",60236),screenNormal:b("screen-normal",60237),searchStop:b("search-stop",60238),server:b("server",60240),settingsGear:b("settings-gear",60241),settings:b("settings",60242),shield:b("shield",60243),smiley:b("smiley",60244),sortPrecedence:b("sort-precedence",60245),splitHorizontal:b("split-horizontal",60246),splitVertical:b("split-vertical",60247),squirrel:b("squirrel",60248),starFull:b("star-full",60249),starHalf:b("star-half",60250),symbolClass:b("symbol-class",60251),symbolColor:b("symbol-color",60252),symbolCustomColor:b("symbol-customcolor",60252),symbolConstant:b("symbol-constant",60253),symbolEnumMember:b("symbol-enum-member",60254),symbolField:b("symbol-field",60255),symbolFile:b("symbol-file",60256),symbolInterface:b("symbol-interface",60257),symbolKeyword:b("symbol-keyword",60258),symbolMisc:b("symbol-misc",60259),symbolOperator:b("symbol-operator",60260),symbolProperty:b("symbol-property",60261),wrench:b("wrench",60261),wrenchSubaction:b("wrench-subaction",60261),symbolSnippet:b("symbol-snippet",60262),tasklist:b("tasklist",60263),telescope:b("telescope",60264),textSize:b("text-size",60265),threeBars:b("three-bars",60266),thumbsdown:b("thumbsdown",60267),thumbsup:b("thumbsup",60268),tools:b("tools",60269),triangleDown:b("triangle-down",60270),triangleLeft:b("triangle-left",60271),triangleRight:b("triangle-right",60272),triangleUp:b("triangle-up",60273),twitter:b("twitter",60274),unfold:b("unfold",60275),unlock:b("unlock",60276),unmute:b("unmute",60277),unverified:b("unverified",60278),verified:b("verified",60279),versions:b("versions",60280),vmActive:b("vm-active",60281),vmOutline:b("vm-outline",60282),vmRunning:b("vm-running",60283),watch:b("watch",60284),whitespace:b("whitespace",60285),wholeWord:b("whole-word",60286),window:b("window",60287),wordWrap:b("word-wrap",60288),zoomIn:b("zoom-in",60289),zoomOut:b("zoom-out",60290),listFilter:b("list-filter",60291),listFlat:b("list-flat",60292),listSelection:b("list-selection",60293),selection:b("selection",60293),listTree:b("list-tree",60294),debugBreakpointFunctionUnverified:b("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:b("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:b("debug-breakpoint-function-disabled",60296),debugStackframeActive:b("debug-stackframe-active",60297),circleSmallFilled:b("circle-small-filled",60298),debugStackframeDot:b("debug-stackframe-dot",60298),debugStackframe:b("debug-stackframe",60299),debugStackframeFocused:b("debug-stackframe-focused",60299),debugBreakpointUnsupported:b("debug-breakpoint-unsupported",60300),symbolString:b("symbol-string",60301),debugReverseContinue:b("debug-reverse-continue",60302),debugStepBack:b("debug-step-back",60303),debugRestartFrame:b("debug-restart-frame",60304),callIncoming:b("call-incoming",60306),callOutgoing:b("call-outgoing",60307),menu:b("menu",60308),expandAll:b("expand-all",60309),feedback:b("feedback",60310),gitPullRequestReviewer:b("git-pull-request-reviewer",60310),groupByRefType:b("group-by-ref-type",60311),ungroupByRefType:b("ungroup-by-ref-type",60312),account:b("account",60313),gitPullRequestAssignee:b("git-pull-request-assignee",60313),bellDot:b("bell-dot",60314),debugConsole:b("debug-console",60315),library:b("library",60316),output:b("output",60317),runAll:b("run-all",60318),syncIgnored:b("sync-ignored",60319),pinned:b("pinned",60320),githubInverted:b("github-inverted",60321),debugAlt:b("debug-alt",60305),serverProcess:b("server-process",60322),serverEnvironment:b("server-environment",60323),pass:b("pass",60324),stopCircle:b("stop-circle",60325),playCircle:b("play-circle",60326),record:b("record",60327),debugAltSmall:b("debug-alt-small",60328),vmConnect:b("vm-connect",60329),cloud:b("cloud",60330),merge:b("merge",60331),exportIcon:b("export",60332),graphLeft:b("graph-left",60333),magnet:b("magnet",60334),notebook:b("notebook",60335),redo:b("redo",60336),checkAll:b("check-all",60337),pinnedDirty:b("pinned-dirty",60338),passFilled:b("pass-filled",60339),circleLargeFilled:b("circle-large-filled",60340),circleLarge:b("circle-large",60341),circleLargeOutline:b("circle-large-outline",60341),combine:b("combine",60342),gather:b("gather",60342),table:b("table",60343),variableGroup:b("variable-group",60344),typeHierarchy:b("type-hierarchy",60345),typeHierarchySub:b("type-hierarchy-sub",60346),typeHierarchySuper:b("type-hierarchy-super",60347),gitPullRequestCreate:b("git-pull-request-create",60348),runAbove:b("run-above",60349),runBelow:b("run-below",60350),notebookTemplate:b("notebook-template",60351),debugRerun:b("debug-rerun",60352),workspaceTrusted:b("workspace-trusted",60353),workspaceUntrusted:b("workspace-untrusted",60354),workspaceUnspecified:b("workspace-unspecified",60355),terminalCmd:b("terminal-cmd",60356),terminalDebian:b("terminal-debian",60357),terminalLinux:b("terminal-linux",60358),terminalPowershell:b("terminal-powershell",60359),terminalTmux:b("terminal-tmux",60360),terminalUbuntu:b("terminal-ubuntu",60361),terminalBash:b("terminal-bash",60362),arrowSwap:b("arrow-swap",60363),copy:b("copy",60364),personAdd:b("person-add",60365),filterFilled:b("filter-filled",60366),wand:b("wand",60367),debugLineByLine:b("debug-line-by-line",60368),inspect:b("inspect",60369),layers:b("layers",60370),layersDot:b("layers-dot",60371),layersActive:b("layers-active",60372),compass:b("compass",60373),compassDot:b("compass-dot",60374),compassActive:b("compass-active",60375),azure:b("azure",60376),issueDraft:b("issue-draft",60377),gitPullRequestClosed:b("git-pull-request-closed",60378),gitPullRequestDraft:b("git-pull-request-draft",60379),debugAll:b("debug-all",60380),debugCoverage:b("debug-coverage",60381),runErrors:b("run-errors",60382),folderLibrary:b("folder-library",60383),debugContinueSmall:b("debug-continue-small",60384),beakerStop:b("beaker-stop",60385),graphLine:b("graph-line",60386),graphScatter:b("graph-scatter",60387),pieChart:b("pie-chart",60388),bracketDot:b("bracket-dot",60389),bracketError:b("bracket-error",60390),lockSmall:b("lock-small",60391),azureDevops:b("azure-devops",60392),verifiedFilled:b("verified-filled",60393),newLine:b("newline",60394),layout:b("layout",60395),layoutActivitybarLeft:b("layout-activitybar-left",60396),layoutActivitybarRight:b("layout-activitybar-right",60397),layoutPanelLeft:b("layout-panel-left",60398),layoutPanelCenter:b("layout-panel-center",60399),layoutPanelJustify:b("layout-panel-justify",60400),layoutPanelRight:b("layout-panel-right",60401),layoutPanel:b("layout-panel",60402),layoutSidebarLeft:b("layout-sidebar-left",60403),layoutSidebarRight:b("layout-sidebar-right",60404),layoutStatusbar:b("layout-statusbar",60405),layoutMenubar:b("layout-menubar",60406),layoutCentered:b("layout-centered",60407),layoutSidebarRightOff:b("layout-sidebar-right-off",60416),layoutPanelOff:b("layout-panel-off",60417),layoutSidebarLeftOff:b("layout-sidebar-left-off",60418),target:b("target",60408),indent:b("indent",60409),recordSmall:b("record-small",60410),errorSmall:b("error-small",60411),arrowCircleDown:b("arrow-circle-down",60412),arrowCircleLeft:b("arrow-circle-left",60413),arrowCircleRight:b("arrow-circle-right",60414),arrowCircleUp:b("arrow-circle-up",60415),heartFilled:b("heart-filled",60420),map:b("map",60421),mapFilled:b("map-filled",60422),circleSmall:b("circle-small",60423),bellSlash:b("bell-slash",60424),bellSlashDot:b("bell-slash-dot",60425),commentUnresolved:b("comment-unresolved",60426),gitPullRequestGoToChanges:b("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:b("git-pull-request-new-changes",60428),searchFuzzy:b("search-fuzzy",60429),commentDraft:b("comment-draft",60430),send:b("send",60431),sparkle:b("sparkle",60432),insert:b("insert",60433),mic:b("mic",60434),dialogError:b("dialog-error","error"),dialogWarning:b("dialog-warning","warning"),dialogInfo:b("dialog-info","info"),dialogClose:b("dialog-close","close"),treeItemExpanded:b("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:b("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:b("tree-filter-on-type-off","list-selection"),treeFilterClear:b("tree-filter-clear","close"),treeItemLoading:b("tree-item-loading","loading"),menuSelection:b("menu-selection","check"),menuSubmenu:b("menu-submenu","chevron-right"),menuBarMore:b("menubar-more","more"),scrollbarButtonLeft:b("scrollbar-button-left","triangle-left"),scrollbarButtonRight:b("scrollbar-button-right","triangle-right"),scrollbarButtonUp:b("scrollbar-button-up","triangle-up"),scrollbarButtonDown:b("scrollbar-button-down","triangle-down"),toolBarMore:b("toolbar-more","more"),quickInputBack:b("quick-input-back","arrow-left")}}),define(Q[42],Y([1,0,17]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProxyObject=e.getAllMethodNames=e.getAllPropertyNames=e.filter=e.getCaseInsensitive=e.distinct=e.getOrDefault=e.safeStringify=e.equals=e.mixin=e.cloneAndChange=e.deepFreeze=e.deepClone=void 0;function y(d){if(!d||typeof d!="object"||d instanceof RegExp)return d;const p=Array.isArray(d)?[]:{};return Object.entries(d).forEach(([c,l])=>{p[c]=l&&typeof l=="object"?y(l):l}),p}e.deepClone=y;function b(d){if(!d||typeof d!="object")return d;const p=[d];for(;p.length>0;){const c=p.shift();Object.freeze(c);for(const l in c)if(D.call(c,l)){const n=c[l];typeof n=="object"&&!Object.isFrozen(n)&&!(0,t.isTypedArray)(n)&&p.push(n)}}return d}e.deepFreeze=b;const D=Object.prototype.hasOwnProperty;function T(d,p){return f(d,p,new Set)}e.cloneAndChange=T;function f(d,p,c){if((0,t.isUndefinedOrNull)(d))return d;const l=p(d);if(typeof l<"u")return l;if(Array.isArray(d)){const n=[];for(const g of d)n.push(f(g,p,c));return n}if((0,t.isObject)(d)){if(c.has(d))throw new Error("Cannot clone recursive data-structure");c.add(d);const n={};for(const g in d)D.call(d,g)&&(n[g]=f(d[g],p,c));return c.delete(d),n}return d}function v(d,p,c=!0){return(0,t.isObject)(d)?((0,t.isObject)(p)&&Object.keys(p).forEach(l=>{l in d?c&&((0,t.isObject)(d[l])&&(0,t.isObject)(p[l])?v(d[l],p[l],c):d[l]=p[l]):d[l]=p[l]}),d):p}e.mixin=v;function m(d,p){if(d===p)return!0;if(d==null||p===null||p===void 0||typeof d!=typeof p||typeof d!="object"||Array.isArray(d)!==Array.isArray(p))return!1;let c,l;if(Array.isArray(d)){if(d.length!==p.length)return!1;for(c=0;c<d.length;c++)if(!m(d[c],p[c]))return!1}else{const n=[];for(l in d)n.push(l);n.sort();const g=[];for(l in p)g.push(l);if(g.sort(),!m(n,g))return!1;for(c=0;c<n.length;c++)if(!m(d[n[c]],p[n[c]]))return!1}return!0}e.equals=m;function S(d){const p=new Set;return JSON.stringify(d,(c,l)=>{if((0,t.isObject)(l)||Array.isArray(l)){if(p.has(l))return"[Circular]";p.add(l)}return l})}e.safeStringify=S;function h(d,p,c){const l=p(d);return typeof l>"u"?c:l}e.getOrDefault=h;function a(d,p){const c=Object.create(null);return!d||!p||Object.keys(p).forEach(n=>{const g=d[n],w=p[n];m(g,w)||(c[n]=w)}),c}e.distinct=a;function r(d,p){const c=p.toLowerCase(),l=Object.keys(d).find(n=>n.toLowerCase()===c);return l?d[l]:d[p]}e.getCaseInsensitive=r;function i(d,p){const c=Object.create(null);for(const[l,n]of Object.entries(d))p(l,n)&&(c[l]=n);return c}e.filter=i;function s(d){let p=[];for(;Object.prototype!==d;)p=p.concat(Object.getOwnPropertyNames(d)),d=Object.getPrototypeOf(d);return p}e.getAllPropertyNames=s;function o(d){const p=[];for(const c of s(d))typeof d[c]=="function"&&p.push(c);return p}e.getAllMethodNames=o;function u(d,p){const c=n=>function(){const g=Array.prototype.slice.call(arguments,0);return p(n,g)},l={};for(const n of d)l[n]=c(n);return l}e.createProxyObject=u}),define(Q[1539],Y([1,0,42]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellRangeSelector=void 0;const y={selectionCss:{border:"2px dashed blue"},offset:{top:-1,left:-1,height:2,width:2},dragClass:"drag"};class b{constructor(T){this.options=T,this.handler=new Slick.EventHandler,this.onBeforeCellRangeSelected=new Slick.Event,this.onCellRangeSelected=new Slick.Event,this.onAppendCellRangeSelected=new Slick.Event,this.options=(0,t.mixin)(this.options,y,!1)}init(T){this.decorator=this.options.cellDecorator||new Slick.CellRangeDecorator(T,this.options),this.grid=T,this.canvas=this.grid.getCanvasNode(),this.handler.subscribe(this.grid.onDragInit,f=>this.handleDragInit(f)).subscribe(this.grid.onDragStart,(f,v)=>this.handleDragStart(f,v)).subscribe(this.grid.onDrag,(f,v)=>this.handleDrag(f,v)).subscribe(this.grid.onDragEnd,(f,v)=>this.handleDragEnd(f,v))}destroy(){this.handler.unsubscribeAll()}getCellDecorator(){return this.decorator}getCurrentRange(){return this.currentlySelectedRange}handleDragInit(T){T.stopImmediatePropagation()}handleDragStart(T,f){let v=this.grid.getCellFromEvent(T);if(this.onBeforeCellRangeSelected.notify(v)!==!1&&this.grid.canCellBeSelected(v.row,v.cell)&&(this.dragging=!0,T.stopImmediatePropagation()),!this.dragging)return;this.canvas.classList.add(this.options.dragClass),this.grid.setActiveCell(v.row,v.cell);let m=this.grid.getCellFromPoint(f.startX-jQuery(this.canvas).offset().left,f.startY-jQuery(this.canvas).offset().top);return f.range={start:m,end:void 0},this.currentlySelectedRange=f.range,this.decorator.show(new Slick.Range(m.row,m.cell))}handleDrag(T,f){if(!this.dragging)return;T.stopImmediatePropagation();let v=this.grid.getCellFromPoint(T.pageX-jQuery(this.canvas).offset().left,T.pageY-jQuery(this.canvas).offset().top);this.grid.canCellBeSelected(v.row,v.cell)&&(f.range.end=v,this.currentlySelectedRange=f.range,this.decorator.show(new Slick.Range(f.range.start.row,f.range.start.cell,v.row,v.cell)))}handleDragEnd(T,f){if(!this.dragging||(this.canvas.classList.remove(this.options.dragClass),this.dragging=!1,T.stopImmediatePropagation(),this.decorator.hide(),!f||!f.range||!f.range.start||!f.range.end))return;let v=new Slick.Range(f.range.start.row,f.range.start.cell,f.range.end.row,f.range.end.cell);T.ctrlKey?this.onAppendCellRangeSelected.notify(v):this.onCellRangeSelected.notify(v)}}e.CellRangeSelector=b}),define(Q[653],Y([1,0,42]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RowNumberColumn=void 0;const y={autoCellSelection:!0};class b{constructor(T){this.options=T,this.handler=new Slick.EventHandler,this.options=(0,t.mixin)(this.options,y,!1)}init(T){this.grid=T,this.handler.subscribe(this.grid.onClick,(f,v)=>this.handleClick(f,v)).subscribe(this.grid.onHeaderClick,(f,v)=>this.handleHeaderClick(f,v))}destroy(){this.handler.unsubscribeAll()}handleClick(T,f){this.grid.getColumns()[f.cell].id==="rowNumber"&&this.options.autoCellSelection&&(this.grid.setActiveCell(f.row,1),this.grid.getSelectionModel()&&this.grid.setSelectedRows([f.row]))}handleHeaderClick(T,f){if(f.column.id==="rowNumber"&&this.options.autoCellSelection){this.grid.setActiveCell(this.grid.getViewport()?.top??0,1);let v=this.grid.getSelectionModel();v&&v.setSelectedRanges([new Slick.Range(0,0,this.grid.getDataLength()-1,this.grid.getColumns().length-1)])}}getColumnDefinition(){return{id:"rowNumber",name:"",field:"rowNumber",width:22,resizable:!0,cssClass:this.options.cssClass,focusable:!1,selectable:!1,filterable:!1,formatter:T=>this.formatter(T)}}formatter(T){return`<span>${T+1}</span>`}}e.RowNumberColumn=b}),define(Q[1540],Y([1,0,40,42]),function(q,e,t,y){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0});const D={encoding:"hex",imageFormat:"jpeg"};let T=b=class{constructor(v){this._changeRef=v,this._config=D}ngOnInit(){const v=Math.min(this.container.nativeElement.parentElement.parentElement.offsetHeight,this.container.nativeElement.parentElement.parentElement.offsetWidth);this.image.nativeElement.style.width=v+"px",this.image.nativeElement.style.height=v+"px"}set config(v){this._config=(0,y.mixin)(v,D,!1),this._changeRef.detectChanges()}set data(v){v.rows&&v.rows.length>0&&v.rows[0].length>0?this._rawSource=v.rows[0][0]:this._rawSource="",this._changeRef.detectChanges()}get hasData(){return this._rawSource&&this._rawSource!==""}get source(){let v=this._rawSource;return this._config.encoding==="hex"&&(v=b._hexToBase64(v)),`data:image/${this._config.imageFormat};base64,${v}`}static _hexToBase64(v){return v.startsWith("0x")&&(v=v.slice(2)),btoa(String.fromCharCode.apply(null,v.replace(/\r|\n/g,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ").map(m=>Number(m))))}};fe([(0,t.ViewChild)("image")],T.prototype,"image",void 0),fe([(0,t.ViewChild)("container")],T.prototype,"container",void 0),fe([(0,t.Input)()],T.prototype,"config",null),fe([(0,t.Input)()],T.prototype,"data",null),T=b=fe([(0,t.Component)({template:` <div *ngIf="hasData" #container style="display: block"> <img #image src="{{source}}" > </div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef)))],T),e.default=T}),define(Q[37],Y([1,0,32]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeIcon=e.themeColorFromId=e.ThemeColor=void 0;var y;(function(T){function f(v){return v&&typeof v=="object"&&typeof v.id=="string"}T.isThemeColor=f})(y||(e.ThemeColor=y={}));function b(T){return{id:T}}e.themeColorFromId=b;var D;(function(T){T.iconNameSegment="[A-Za-z0-9]+",T.iconNameExpression="[A-Za-z0-9-]+",T.iconModifierExpression="~[A-Za-z]+",T.iconNameCharacter="[A-Za-z0-9~-]";const f=new RegExp(`^(${T.iconNameExpression})(${T.iconModifierExpression})?$`);function v(d){const p=f.exec(d.id);if(!p)return v(t.Codicon.error);const[,c,l]=p;if(["active-connections-action","add-server-action","add-server-group-action","server-page"].includes(c))return["codicon",c];{const g=["codicon","codicon-"+c];return l&&g.push("codicon-modifier-"+l.substring(1)),g}}T.asClassNameArray=v;function m(d){return v(d).join(" ")}T.asClassName=m;function S(d){return"."+v(d).join(".")}T.asCSSSelector=S;function h(d){return d&&typeof d=="object"&&typeof d.id=="string"&&(typeof d.color>"u"||y.isThemeColor(d.color))}T.isThemeIcon=h;const a=new RegExp(`^\\$\\((${T.iconNameExpression}(?:${T.iconModifierExpression})?)\\)$`);function r(d){const p=a.exec(d);if(!p)return;const[,c]=p;return{id:c}}T.fromString=r;function i(d){return{id:d}}T.fromId=i;function s(d,p){let c=d.id;const l=c.lastIndexOf("~");return l!==-1&&(c=c.substring(0,l)),p&&(c=`${c}~${p}`),{id:c}}T.modify=s;function o(d){const p=d.id.lastIndexOf("~");if(p!==-1)return d.id.substring(p+1)}T.getModifier=o;function u(d,p){return d.id===p.id&&d.color?.id===p.color?.id}T.isEqual=u})(D||(e.ThemeIcon=D={}))}),define(Q[257],Y([1,0,128,33,37]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchesFuzzyIconAware=e.parseLabelWithIcons=e.getCodiconAriaLabel=e.stripIcons=e.markdownEscapeEscapedIcons=e.escapeIcons=void 0;const D="$(",T=new RegExp(`\\$\\(${b.ThemeIcon.iconNameExpression}(?:${b.ThemeIcon.iconModifierExpression})?\\)`,"g"),f=new RegExp(`(\\\\)?${T.source}`,"g");function v(u){return u.replace(f,(d,p)=>p?d:`\\${d}`)}e.escapeIcons=v;const m=new RegExp(`\\\\${T.source}`,"g");function S(u){return u.replace(m,d=>`\\${d}`)}e.markdownEscapeEscapedIcons=S;const h=new RegExp(`(\\s)?(\\\\)?${T.source}(\\s)?`,"g");function a(u){return u.indexOf(D)===-1?u:u.replace(h,(d,p,c,l)=>c?d:p||l||"")}e.stripIcons=a;function r(u){return u?u.replace(/\$\((.*?)\)/g,(d,p)=>` ${p} `).trim():""}e.getCodiconAriaLabel=r;const i=new RegExp(`\\$\\(${b.ThemeIcon.iconNameCharacter}+\\)`,"g");function s(u){i.lastIndex=0;let d="";const p=[];let c=0;for(;;){const l=i.lastIndex,n=i.exec(u),g=u.substring(l,n?.index);if(g.length>0){d+=g;for(let w=0;w<g.length;w++)p.push(c)}if(!n)break;c+=n[0].length}return{text:d,iconOffsets:p}}e.parseLabelWithIcons=s;function o(u,d,p=!1){const{text:c,iconOffsets:l}=d;if(!l||l.length===0)return(0,t.matchesFuzzy)(u,c,p);const n=(0,y.ltrim)(c," "),g=c.length-n.length,w=(0,t.matchesFuzzy)(u,n,p);if(w)for(const E of w){const C=l[E.start+g]+g;E.start+=C,E.end+=C}return w}e.matchesFuzzyIconAware=o}),define(Q[654],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toUint32=e.toUint8=e.Constants=void 0;var t;(function(D){D[D.MAX_SAFE_SMALL_INTEGER=1073741824]="MAX_SAFE_SMALL_INTEGER",D[D.MIN_SAFE_SMALL_INTEGER=-1073741824]="MIN_SAFE_SMALL_INTEGER",D[D.MAX_UINT_8=255]="MAX_UINT_8",D[D.MAX_UINT_16=65535]="MAX_UINT_16",D[D.MAX_UINT_32=4294967295]="MAX_UINT_32",D[D.UNICODE_SUPPLEMENTARY_PLANE_BEGIN=65536]="UNICODE_SUPPLEMENTARY_PLANE_BEGIN"})(t||(e.Constants=t={}));function y(D){return D<0?0:D>255?255:D|0}e.toUint8=y;function b(D){return D<0?0:D>4294967295?4294967295:D|0}e.toUint32=b}),define(Q[59],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=e.isUUID=void 0;const t=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function y(b){return t.test(b)}e.isUUID=y,e.generateUuid=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let b;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?b=crypto.getRandomValues.bind(crypto):b=function(f){for(let v=0;v<f.length;v++)f[v]=Math.floor(Math.random()*256);return f};const D=new Uint8Array(16),T=[];for(let f=0;f<256;f++)T.push(f.toString(16).padStart(2,"0"));return function(){b(D),D[6]=D[6]&15|64,D[8]=D[8]&63|128;let v=0,m="";return m+=T[D[v++]],m+=T[D[v++]],m+=T[D[v++]],m+=T[D[v++]],m+="-",m+=T[D[v++]],m+=T[D[v++]],m+="-",m+=T[D[v++]],m+=T[D[v++]],m+="-",m+=T[D[v++]],m+=T[D[v++]],m+="-",m+=T[D[v++]],m+=T[D[v++]],m+=T[D[v++]],m+=T[D[v++]],m+=T[D[v++]],m+=T[D[v++]],m}}()}),define(Q[1038],Y([1,0,40,1039,389,4,59]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Chart=void 0;let f=class extends D.Disposable{constructor(r){y.Chart.register(...y.registerables),super(),this._changeRef=r,this._options={events:["click","keyup"],responsive:!0,maintainAspectRatio:!1},this.chartCanvasId="chart"+(0,T.generateUuid)()}ngAfterViewInit(){}set type(r){this._type=r,r==="horizontalBar"&&(this._options=(0,b.mixin)({},(0,b.mixin)(this._options,{indexAxis:"y"}))),this._changeRef.detectChanges()}set data(r){this._data=this.convertData(r),this.drawChart()}set options(r){r!==void 0&&(this._options=(0,b.mixin)({},(0,b.mixin)(this._options,r)),r!==void 0&&(r.chartTitle?typeof r.chartTitle=="string"&&(this._options=(0,b.mixin)(this._options,{plugins:{title:{text:r.chartTitle,display:!0}}})):this._options=(0,b.mixin)(this._options,{plugins:{title:{display:!1}}}),r.legendVisible!==!1?this._options=(0,b.mixin)(this._options,{plugins:{legend:{display:!0}}}):this._options=(0,b.mixin)(this._options,{plugins:{legend:{display:!1}}})),this.drawChart())}set height(r){r&&this.chart&&(this.chart.canvas.parentNode.style.height=r)}set width(r){r&&this.chart&&(this.chart.canvas.parentNode.style.width=r)}drawChart(){let r=document.getElementById(this.chartCanvasId);this.canvas=r,this.chart?(this.chart.data=this._data,this.chart.update()):this.chart=new y.Chart(this.canvas.getContext("2d"),{type:this.convertChartType(),plugins:[h],data:this._data,options:this._options})}convertData(r){const i={datasets:[]};switch(this._type){case"bar":case"horizontalBar":case"line":{if(this.isBarOrLineChartData(r)){for(let s of r.datasets)i.datasets.push({data:s.data.map(o=>typeof o=="number"?o:o.x),backgroundColor:s.backgroundColor,borderColor:s.borderColor,label:s.dataLabel});i.labels=r.labels}break}case"pie":case"doughnut":{this.isPieOrDoughnutChartData(r)&&(i.datasets.push({data:r.dataset.map(s=>typeof s.value=="number"?s.value:s.value.x),backgroundColor:r.dataset.map(s=>s.backgroundColor),borderColor:r.dataset.map(s=>s.borderColor)}),i.labels=r.dataset.map(s=>s.dataLabel));break}case"scatter":{if(this.isScatterplotData(r))for(let s of r.datasets)i.datasets.push({data:s.data.map(o=>[o.x,o.y]),backgroundColor:s.backgroundColor,borderColor:s.borderColor,label:s.dataLabel});break}case"bubble":{if(this.isBubbleChartData(r))for(let s of r.datasets)i.datasets.push({data:s.data.map(o=>({x:o.x,y:o.y,r:o.r})),backgroundColor:s.backgroundColor,borderColor:s.borderColor,label:s.dataLabel});break}case"polarArea":{this.isPolarAreaChartData(r)&&(i.datasets.push({data:r.dataset.map(s=>typeof s.value=="number"?s.value:s.value.x),backgroundColor:r.dataset.map(s=>s.backgroundColor),borderColor:r.dataset.map(s=>s.borderColor)}),i.labels=r.dataset.map(s=>s.dataLabel));break}case"radar":{if(this.isRadarChartData(r)){for(let s of r.datasets)i.datasets.push({data:s.data.map(o=>typeof o=="number"?o:o.x),backgroundColor:s.backgroundColor,borderColor:s.borderColor,label:s.dataLabel});i.labels=r.labels}break}default:throw new Error(`Unsupported chart type: '${this._type}'`)}return i}convertChartType(){switch(this._type){case"horizontalBar":return"bar";default:return this._type}}isBarOrLineChartData(r){return r.datasets!==void 0&&r.labels!==void 0}isPieOrDoughnutChartData(r){return r.dataset!==void 0}isScatterplotData(r){return r.datasets!==void 0}isBubbleChartData(r){return r.datasets!==void 0}isPolarAreaChartData(r){return r.dataset!==void 0}isRadarChartData(r){return r.datasets!==void 0&&r.labels!==void 0}};e.Chart=f,e.Chart=f=fe([(0,t.Component)({selector:"chart-component",templateUrl:decodeURI(q.toUrl("./chart.component.html"))}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef)))],f);const v=function(a,r){a.setActiveElements([{datasetIndex:0,index:r}]),a.update()},m=function(a){return a.length?a[0].index:-1},S=function(a,r){const i=a.canvas,s=i.getBoundingClientRect(),o=new MouseEvent("click",{clientX:s.left+r.x,clientY:s.top+r.y,cancelable:!0,bubbles:!0});i.dispatchEvent(o)},h={id:"keyup",defaults:{events:["keyup"]},beforeEvent(a,r,i){const o=r.event.native.code,u=a.getActiveElements(),d=a.tooltip;if(o==="ArrowRight"){const p=m(u)+1,c=p===a.data.datasets[0].data.length?0:p;v(a,c),v(d,c)}else if(o==="ArrowLeft"){const p=m(u)-1,c=p<0?a.data.datasets[0].data.length-1:p;v(a,c),v(d,c)}else if(o==="Enter"&&u.length){const p=u[0],l=a.getDatasetMeta(p.datasetIndex).data[p.index];S(a,l)}return!1}}}),define(Q[1040],Y([1,0,40,341,1038]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChartModule=void 0;let D=class{};e.ChartModule=D,e.ChartModule=D=fe([(0,t.NgModule)({declarations:[b.Chart],imports:[y.CommonModule],exports:[b.Chart]})],D)}),define(Q[788],Y([1,0,59]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileNode=void 0;class y{constructor(D,T,f,v,m,S,h){D?this.id=D:this.id=(0,t.generateUuid)(),this.name=T,this.fullPath=f,this.isFile=v,this.ownerUri=S,this.isExpanded=m,this.parent=h}}e.FileNode=y}),define(Q[1541],Y([1,0,59]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookViewsUpgrades=void 0;var y;(function(b){class D{constructor(){this.sourceVersion=1,this.targetVersion=2}versionCheck(f){return f>this.targetVersion}apply(f){const S=f.notebook.getMetaValue("extensions").notebookviews.views,h={version:2,activeView:null,views:[]};S.forEach((a,r)=>{const i={guid:a.guid,name:a.name,cards:[]};f.notebook.cells.forEach(o=>{const u=o.metadata.extensions?.notebookviews?.views?.[r];if(u&&!u?.hidden){const d={guid:(0,t.generateUuid)(),y:u.y,x:u.x,width:u.width,height:u.height,tabs:[{title:"Untitled",guid:(0,t.generateUuid)(),cell:{guid:o.cellGuid}}]};i.cards.push(d)}}),h.views.push(i)}),f.setExtensionMetadata(f.notebook,h)}}b.V1ToV2NotebookViewsExtensionUpgrade=D})(y||(e.NotebookViewsUpgrades=y={}))}),define(Q[322],Y([1,0,298,59]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeNode=e.TreeItemCollapsibleState=void 0;var b;(function(T){T[T.None=0]="None",T[T.Collapsed=1]="Collapsed",T[T.Expanded=2]="Expanded"})(b||(e.TreeItemCollapsibleState=b={}));class D{constructor(f,v,m,S,h,a,r,i,s,o,u,d,p,c){this._objectExplorerCallbacks=c,this.forceRefresh=!1,this.nodeTypeId=f,this.objectType=v,this.label=m,this.isAlwaysLeaf=S,this.nodePath=h,this.parentNodePath=a,this.parent=s,this.metadata=o,this.iconType=u,this.id=y.generateUuid(),this.nodeSubType=r,this.nodeStatus=i,this.icon=d,this.filterProperties=p}getConnectionProfile(){let f=this;for(;!f.connection&&f.parent;)f=f.parent;return f.connection}getDatabaseName(){if(this.connection)return;let f=this;for(;f.nodeTypeId!==t.NodeType.Database&&f.nodeTypeId!==t.NodeType.Server&&f.parent;)f=f.parent;if(f&&f.nodeTypeId===t.NodeType.Database)return f?.metadata?.name}getSession(){let f=this;for(;!f.session&&f.parent;)f=f.parent;return f.session}isTopLevel(){return!!(this.parent&&this.parent.nodeTypeId===t.NodeType.Root)}toNodeInfo(){return{nodePath:this.nodePath,parentNodePath:this.parentNodePath,nodeType:this.nodeTypeId,nodeSubType:this.nodeSubType,nodeStatus:this.nodeStatus,label:this.label,isLeaf:this.isAlwaysLeaf,metadata:this.metadata,errorMessage:this.errorStateMessage,objectType:this.objectType}}getChildren(){return this._objectExplorerCallbacks?.getChildren(this)??Promise.resolve([])}isExpanded(){return this._objectExplorerCallbacks?.isExpanded(this)??Promise.resolve(!1)}setExpandedState(f){return this._objectExplorerCallbacks?.setNodeExpandedState(this,f)??Promise.resolve()}setSelected(f,v){return this._objectExplorerCallbacks?.setNodeSelected(this,f,v)??Promise.resolve()}}e.TreeNode=D}),define(Q[437],Y([1,0,145,59]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskNode=e.TaskExecutionMode=e.TaskStatus=void 0;var b;(function(f){f[f.NotStarted=0]="NotStarted",f[f.InProgress=1]="InProgress",f[f.Succeeded=2]="Succeeded",f[f.SucceededWithWarning=3]="SucceededWithWarning",f[f.Failed=4]="Failed",f[f.Canceled=5]="Canceled",f[f.Canceling=6]="Canceling"})(b||(e.TaskStatus=b={}));var D;(function(f){f[f.execute=0]="execute",f[f.script=1]="script",f[f.executeAndScript=2]="executeAndScript"})(D||(e.TaskExecutionMode=D={}));class T{constructor(v,m,S,h=void 0,a=D.execute,r=!0,i){this.id=h||(0,y.generateUuid)(),this.taskName=v,this.serverName=m,this.databaseName=S,this.timer=t.StopWatch.create(),this.startTime=new Date().toLocaleTimeString(),this.status=b.InProgress,this.hasChildren=!1,this.taskExecutionMode=a,this.isCancelable=r,this.targetLocation=i}}e.TaskNode=T}),define(Q[1542],Y([1,0,437]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskHistoryDataSource=void 0;class y{getId(D,T){return T.id}hasChildren(D,T){return T instanceof t.TaskNode?T.hasChildren:!1}getChildren(D,T){return T instanceof t.TaskNode?Promise.resolve(T.children):Promise.resolve(null)}getParent(D,T){return Promise.resolve(null)}}e.TaskHistoryDataSource=y}),define(Q[365],Y([1,0,20,83,59]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UriList=e.matchesMimeType=e.VSDataTransfer=e.createFileDataTransferItem=e.createStringDataTransferItem=void 0;function D(h){return{asString:async()=>h,asFile:()=>{},value:typeof h=="string"?h:void 0}}e.createStringDataTransferItem=D;function T(h,a,r){const i={id:(0,b.generateUuid)(),name:h,uri:a,data:r};return{asString:async()=>"",asFile:()=>i,value:void 0}}e.createFileDataTransferItem=T;class f{constructor(){this._entries=new Map}get size(){let a=0;for(const r of this._entries)a++;return a}has(a){return this._entries.has(this.toKey(a))}matches(a){const r=[...this._entries.keys()];return y.Iterable.some(this,([i,s])=>s.asFile())&&r.push("files"),S(v(a),r)}get(a){return this._entries.get(this.toKey(a))?.[0]}append(a,r){const i=this._entries.get(a);i?i.push(r):this._entries.set(this.toKey(a),[r])}replace(a,r){this._entries.set(this.toKey(a),[r])}delete(a){this._entries.delete(this.toKey(a))}*[Symbol.iterator](){for(const[a,r]of this._entries)for(const i of r)yield[a,i]}toKey(a){return v(a)}}e.VSDataTransfer=f;function v(h){return h.toLowerCase()}function m(h,a){return S(v(h),a.map(v))}e.matchesMimeType=m;function S(h,a){if(h==="*/*")return a.length>0;if(a.includes(h))return!0;const r=h.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!r)return!1;const[i,s,o]=r;return o==="*"?a.some(u=>u.startsWith(s+"/")):!1}e.UriList=Object.freeze({create:h=>(0,t.distinct)(h.map(a=>a.toString())).join(`\r `),split:h=>h.split(`\r `),parse:h=>e.UriList.split(h).filter(a=>!a.startsWith("#"))})}),define(Q[1543],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_MENU_CLOSE_CHANNEL=e.CONTEXT_MENU_CHANNEL=void 0,e.CONTEXT_MENU_CHANNEL="vscode:contextmenu",e.CONTEXT_MENU_CLOSE_CHANNEL="vscode:onCloseContextMenu"}),define(Q[1544],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Protocol=void 0;class t{constructor(b,D){this.sender=b,this.onMessage=D}send(b){try{this.sender.send("vscode:message",b.buffer)}catch{}}disconnect(){this.sender.send("vscode:disconnect",null)}}e.Protocol=t}),define(Q[1041],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OfflineError=e.isOfflineError=void 0;const t="Offline";function y(D){return D instanceof b?!0:D instanceof Error&&D.name===t&&D.message===t}e.isOfflineError=y;class b extends Error{constructor(){super(t),this.name=this.message}}e.OfflineError=b}),define(Q[1545],Y([1,0,62,15,1041]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.request=void 0;function D(v,m){v.proxyAuthorization&&(v.headers={...v.headers||{},"Proxy-Authorization":v.proxyAuthorization});const S=new XMLHttpRequest;return new Promise((h,a)=>{S.open(v.type||"GET",v.url||"",!0,v.user,v.password),T(S,v),S.responseType="arraybuffer",S.onerror=r=>a(navigator.onLine?new Error(S.statusText&&"XHR failed: "+S.statusText||"XHR failed"):new b.OfflineError),S.onload=r=>{h({res:{statusCode:S.status,headers:f(S)},stream:(0,t.bufferToStream)(t.VSBuffer.wrap(new Uint8Array(S.response)))})},S.ontimeout=r=>a(new Error(`XHR timeout: ${v.timeout}ms`)),v.timeout&&(S.timeout=v.timeout),S.send(v.data),m.onCancellationRequested(()=>{S.abort(),a((0,y.canceled)())})})}e.request=D;function T(v,m){if(m.headers)e:for(const S in m.headers){switch(S){case"User-Agent":case"Accept-Encoding":case"Content-Length":continue e}v.setRequestHeader(S,m.headers[S])}}function f(v){const m=Object.create(null);for(const S of v.getAllResponseHeaders().split(/\r\n|\n|\r/g))if(S){const h=S.indexOf(":");m[S.substr(0,h).trim().toLowerCase()]=S.substr(h+1).trim()}return m}}),define(Q[1546],Y([12]),{}),define(Q[1547],Y([1,0,40,552,645,136,1546]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbComponent=void 0;let T=class{constructor(v,m,S,h){this._breadcrumbService=v,this._router=m,this._activeRoute=S,this._changeRef=h,this.menuItems=[],this.disposables=new Array}ngOnInit(){this.disposables.push((0,D.subscriptionToDisposable)(this._breadcrumbService.breadcrumbItem.subscribe(v=>this.updateCrumb(v))))}ngOnDestroy(){this.disposables.forEach(v=>v.dispose())}updateCrumb(v){this.menuItems=v,this._changeRef.detectChanges()}route(v){return this._router.navigate(v,{relativeTo:this._activeRoute,skipLocationChange:!0})}};e.BreadcrumbComponent=T,e.BreadcrumbComponent=T=fe([(0,t.Component)({selector:"breadcrumb",template:` <span class="breadcrumb-container"> <ng-template ngFor let-item let-first="first" let-last="last" [ngForOf]="menuItems"> <span style="padding: 5px; display: flex; align-items: center"> <span *ngIf="item.icon" class="codicon" style="display: inline-block; margin-right: 5px" [ngClass]="item.icon"></span> <span *ngIf="first">{{item.label}}</span> <span *ngIf="last" style="">{{item.label}}</span> <a class="router-link" *ngIf="!last && !first" (click)="route(item.routerLink)" >{{item.label}}</a> </span> <span *ngIf="!last" class="codicon chevron-right"></span> </ng-template> </span> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>b.IBreadcrumbService))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>y.Router))),O(2,(0,t.Inject)((0,t.forwardRef)(()=>y.ActivatedRoute))),O(3,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef)))],T)}),define(Q[1548],Y([12]),{}),define(Q[1549],Y([12]),{}),define(Q[1550],Y([12]),{}),define(Q[1551],Y([12]),{}),define(Q[1042],Y([12]),{}),define(Q[1552],Y([12]),{}),define(Q[1553],Y([12]),{}),define(Q[1554],Y([12]),{}),define(Q[559],Y([1,0,1554]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequiredIndicatorClassName=void 0,e.RequiredIndicatorClassName="required-indicator"}),define(Q[1555],Y([12]),{}),define(Q[1556],Y([12]),{}),define(Q[1557],Y([12]),{}),define(Q[1558],Y([12]),{}),define(Q[1559],Y([12]),{}),define(Q[1560],Y([12]),{}),define(Q[1561],Y([12]),{}),define(Q[1043],Y([12]),{}),define(Q[1562],Y([12]),{}),define(Q[1563],Y([12]),{}),define(Q[1564],Y([12]),{}),define(Q[1565],Y([12]),{}),define(Q[1566],Y([12]),{}),define(Q[1567],Y([12]),{}),define(Q[1044],Y([12]),{}),define(Q[1568],Y([12]),{}),define(Q[1569],Y([12]),{}),define(Q[1570],Y([12]),{}),define(Q[1571],Y([12]),{}),define(Q[1572],Y([12]),{}),define(Q[1573],Y([12]),{}),define(Q[1574],Y([12]),{}),define(Q[1575],Y([12]),{}),define(Q[1576],Y([12]),{}),define(Q[1577],Y([12]),{}),define(Q[1578],Y([12]),{}),define(Q[1579],Y([12]),{}),define(Q[1580],Y([12]),{}),define(Q[1581],Y([12]),{}),define(Q[1582],Y([12]),{}),define(Q[1045],Y([12]),{}),define(Q[789],Y([12]),{}),define(Q[1583],Y([12]),{}),define(Q[1584],Y([12]),{}),define(Q[1585],Y([12]),{}),define(Q[1586],Y([12]),{}),define(Q[1587],Y([12]),{}),define(Q[1588],Y([12]),{}),define(Q[1589],Y([12]),{}),define(Q[1590],Y([12]),{}),define(Q[1591],Y([12]),{}),define(Q[1592],Y([12]),{}),define(Q[1593],Y([12]),{}),define(Q[1594],Y([12]),{}),define(Q[1595],Y([12]),{}),define(Q[1596],Y([12]),{}),define(Q[1597],Y([12]),{}),define(Q[1598],Y([12]),{}),define(Q[1599],Y([12]),{}),define(Q[1046],Y([12]),{}),define(Q[1600],Y([12]),{}),define(Q[1601],Y([12]),{}),define(Q[1602],Y([12]),{}),define(Q[1603],Y([12]),{}),define(Q[1604],Y([12]),{}),define(Q[1605],Y([12]),{}),define(Q[1606],Y([12]),{}),define(Q[1607],Y([12]),{}),define(Q[1608],Y([12]),{}),define(Q[1609],Y([12]),{}),define(Q[1610],Y([12]),{}),define(Q[1611],Y([12]),{}),define(Q[1612],Y([12]),{}),define(Q[1613],Y([12]),{}),define(Q[1614],Y([12]),{}),define(Q[1615],Y([12]),{}),define(Q[1616],Y([12]),{}),define(Q[1617],Y([12]),{}),define(Q[1618],Y([12]),{}),define(Q[1619],Y([12]),{}),define(Q[1620],Y([12]),{}),define(Q[1621],Y([12]),{}),define(Q[1622],Y([12]),{}),define(Q[790],Y([12]),{}),define(Q[1047],Y([12]),{}),define(Q[1623],Y([12]),{}),define(Q[483],Y([12]),{}),define(Q[1624],Y([12]),{}),define(Q[1625],Y([12]),{}),define(Q[1626],Y([12]),{}),define(Q[1627],Y([12]),{}),define(Q[655],Y([12]),{}),define(Q[1628],Y([12]),{}),define(Q[1629],Y([12]),{}),define(Q[1630],Y([12]),{}),define(Q[1631],Y([12]),{}),define(Q[1632],Y([12]),{}),define(Q[1633],Y([12]),{}),define(Q[1634],Y([12]),{}),define(Q[1635],Y([12]),{}),define(Q[1636],Y([12]),{}),define(Q[1637],Y([12]),{}),define(Q[1638],Y([12]),{}),define(Q[1639],Y([12]),{}),define(Q[1640],Y([12]),{}),define(Q[1048],Y([12]),{}),define(Q[1641],Y([12]),{}),define(Q[1642],Y([12]),{}),define(Q[1643],Y([12]),{}),define(Q[1644],Y([12]),{}),define(Q[1645],Y([12]),{}),define(Q[1646],Y([12]),{}),define(Q[1647],Y([12]),{}),define(Q[1049],Y([12]),{}),define(Q[1648],Y([12]),{}),define(Q[1050],Y([12]),{}),define(Q[1649],Y([12]),{}),define(Q[1650],Y([12]),{}),define(Q[1651],Y([12]),{}),define(Q[1652],Y([12]),{}),define(Q[1653],Y([12]),{}),define(Q[1654],Y([12]),{}),define(Q[1655],Y([12]),{}),define(Q[1656],Y([12]),{}),define(Q[1657],Y([12]),{}),define(Q[1658],Y([12]),{}),define(Q[1659],Y([12]),{}),define(Q[1660],Y([12]),{}),define(Q[1051],Y([12]),{}),define(Q[1661],Y([12]),{}),define(Q[560],Y([12]),{}),define(Q[1662],Y([12]),{}),define(Q[1663],Y([12]),{}),define(Q[1664],Y([12]),{}),define(Q[1665],Y([12]),{}),define(Q[1666],Y([12]),{}),define(Q[1052],Y([12]),{}),define(Q[1667],Y([12]),{}),define(Q[1668],Y([12]),{}),define(Q[1669],Y([12]),{}),define(Q[1670],Y([12]),{}),define(Q[1671],Y([12]),{}),define(Q[1672],Y([12]),{}),define(Q[1053],Y([12]),{}),define(Q[1673],Y([12]),{}),define(Q[1674],Y([12]),{}),define(Q[1675],Y([12]),{}),define(Q[1676],Y([12]),{}),define(Q[1677],Y([12]),{}),define(Q[791],Y([1,0,1676,1677]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(Q[1678],Y([12]),{}),define(Q[1679],Y([12]),{}),define(Q[1680],Y([12]),{}),define(Q[1054],Y([12]),{}),define(Q[1055],Y([12]),{}),define(Q[1056],Y([12]),{}),define(Q[1681],Y([12]),{}),define(Q[1682],Y([12]),{}),define(Q[1683],Y([12]),{}),define(Q[1684],Y([12]),{}),define(Q[1057],Y([12]),{}),define(Q[1685],Y([12]),{}),define(Q[1686],Y([12]),{}),define(Q[484],Y([1,0,1686]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME=void 0,e.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME="monaco-mouse-cursor-text"}),define(Q[1687],Y([12]),{}),define(Q[1688],Y([12]),{}),define(Q[1689],Y([12]),{}),define(Q[1690],Y([12]),{}),define(Q[1691],Y([12]),{}),define(Q[1692],Y([12]),{}),define(Q[1693],Y([12]),{}),define(Q[1694],Y([12]),{}),define(Q[1695],Y([12]),{}),define(Q[1696],Y([12]),{}),define(Q[1697],Y([12]),{}),define(Q[1698],Y([12]),{}),define(Q[1699],Y([12]),{}),define(Q[1700],Y([12]),{}),define(Q[1701],Y([12]),{}),define(Q[1702],Y([12]),{}),define(Q[1703],Y([12]),{}),define(Q[1704],Y([12]),{}),define(Q[1705],Y([12]),{}),define(Q[1706],Y([12]),{}),define(Q[1707],Y([12]),{}),define(Q[1708],Y([12]),{}),define(Q[1709],Y([12]),{}),define(Q[1710],Y([12]),{}),define(Q[1711],Y([12]),{}),define(Q[1712],Y([12]),{}),define(Q[1713],Y([12]),{}),define(Q[1714],Y([12]),{}),define(Q[1715],Y([12]),{}),define(Q[1716],Y([12]),{}),define(Q[1717],Y([12]),{}),define(Q[1718],Y([12]),{}),define(Q[1719],Y([12]),{}),define(Q[1720],Y([12]),{}),define(Q[1721],Y([12]),{}),define(Q[1722],Y([12]),{}),define(Q[1723],Y([12]),{}),define(Q[792],Y([12]),{}),define(Q[1724],Y([12]),{}),define(Q[1725],Y([12]),{}),define(Q[1726],Y([12]),{}),define(Q[1727],Y([12]),{}),define(Q[1728],Y([12]),{}),define(Q[1729],Y([12]),{}),define(Q[1730],Y([12]),{}),define(Q[1731],Y([12]),{}),define(Q[1732],Y([12]),{}),define(Q[1733],Y([12]),{}),define(Q[1734],Y([12]),{}),define(Q[1735],Y([12]),{}),define(Q[1736],Y([12]),{}),define(Q[1737],Y([12]),{}),define(Q[1738],Y([12]),{}),define(Q[1739],Y([12]),{}),define(Q[1740],Y([12]),{}),define(Q[1741],Y([12]),{}),define(Q[1742],Y([12]),{}),define(Q[1743],Y([12]),{}),define(Q[1744],Y([12]),{}),define(Q[1745],Y([12]),{}),define(Q[1746],Y([12]),{}),define(Q[1747],Y([12]),{}),define(Q[1748],Y([12]),{}),define(Q[1749],Y([12]),{}),define(Q[1750],Y([12]),{}),define(Q[1751],Y([12]),{}),define(Q[1058],Y([12]),{}),define(Q[1752],Y([12]),{}),define(Q[1753],Y([12]),{}),define(Q[656],Y([12]),{}),define(Q[1754],Y([12]),{}),define(Q[1755],Y([12]),{}),define(Q[1756],Y([12]),{}),define(Q[1757],Y([12]),{}),define(Q[1758],Y([12]),{}),define(Q[1759],Y([12]),{}),define(Q[1760],Y([12]),{}),define(Q[1761],Y([12]),{}),define(Q[1059],Y([12]),{}),define(Q[1762],Y([12]),{}),define(Q[1763],Y([12]),{}),define(Q[1764],Y([12]),{}),define(Q[1765],Y([12]),{}),define(Q[1766],Y([12]),{}),define(Q[1767],Y([12]),{}),define(Q[1768],Y([12]),{}),define(Q[1769],Y([12]),{}),define(Q[1770],Y([12]),{}),define(Q[1771],Y([12]),{}),define(Q[1060],Y([12]),{}),define(Q[1772],Y([12]),{}),define(Q[1773],Y([12]),{}),define(Q[1774],Y([12]),{}),define(Q[1775],Y([12]),{}),define(Q[1061],Y([12]),{}),define(Q[1062],Y([12]),{}),define(Q[1776],Y([12]),{}),define(Q[1777],Y([12]),{}),define(Q[1778],Y([12]),{}),define(Q[1063],Y([12]),{}),define(Q[1779],Y([12]),{}),define(Q[1780],Y([12]),{}),define(Q[1781],Y([12]),{}),define(Q[1782],Y([12]),{}),define(Q[1783],Y([12]),{}),define(Q[1784],Y([12]),{}),define(Q[1785],Y([12]),{}),define(Q[1786],Y([12]),{}),define(Q[1787],Y([12]),{}),define(Q[1788],Y([12]),{}),define(Q[1789],Y([12]),{}),define(Q[1790],Y([12]),{}),define(Q[1791],Y([12]),{}),define(Q[1792],Y([12]),{}),define(Q[793],Y([12]),{}),define(Q[1793],Y([12]),{}),define(Q[1794],Y([12]),{}),define(Q[1795],Y([12]),{}),define(Q[1796],Y([12]),{}),define(Q[1797],Y([12]),{}),define(Q[1798],Y([12]),{}),define(Q[1799],Y([12]),{}),define(Q[1800],Y([12]),{}),define(Q[1801],Y([12]),{}),define(Q[1802],Y([12]),{}),define(Q[1803],Y([12]),{}),define(Q[1804],Y([12]),{}),define(Q[1805],Y([12]),{}),define(Q[1806],Y([12]),{}),define(Q[1807],Y([12]),{}),define(Q[1808],Y([12]),{}),define(Q[1809],Y([12]),{}),define(Q[1810],Y([12]),{}),define(Q[1811],Y([12]),{}),define(Q[1812],Y([12]),{}),define(Q[1813],Y([12]),{}),define(Q[1814],Y([12]),{}),define(Q[1815],Y([12]),{}),define(Q[1816],Y([12]),{}),define(Q[1817],Y([12]),{}),define(Q[1818],Y([12]),{}),define(Q[1819],Y([12]),{}),define(Q[1820],Y([12]),{}),define(Q[1821],Y([12]),{}),define(Q[1822],Y([12]),{}),define(Q[1823],Y([12]),{}),define(Q[1824],Y([12]),{}),define(Q[1825],Y([12]),{}),define(Q[1826],Y([12]),{}),define(Q[1827],Y([12]),{}),define(Q[1828],Y([12]),{}),define(Q[1829],Y([12]),{}),define(Q[1830],Y([12]),{}),define(Q[1831],Y([12]),{}),define(Q[561],Y([12]),{}),define(Q[1832],Y([12]),{}),define(Q[1833],Y([12]),{}),define(Q[657],Y([12]),{}),define(Q[1834],Y([12]),{}),define(Q[1835],Y([12]),{}),define(Q[1836],Y([12]),{}),define(Q[1837],Y([12]),{}),define(Q[1838],Y([12]),{}),define(Q[1839],Y([12]),{}),define(Q[1840],Y([12]),{}),define(Q[1841],Y([12]),{}),define(Q[1842],Y([12]),{}),define(Q[1843],Y([12]),{}),define(Q[1844],Y([12]),{}),define(Q[1845],Y([12]),{}),define(Q[1846],Y([12]),{}),define(Q[1847],Y([12]),{}),define(Q[1848],Y([12]),{}),define(Q[1849],Y([12]),{}),define(Q[258],Y([1,0,140]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyFontInfo=void 0;function y(b,D){b instanceof t.FastDomNode?(b.setFontFamily(D.getMassagedFontFamily()),b.setFontWeight(D.fontWeight),b.setFontSize(D.fontSize),b.setFontFeatureSettings(D.fontFeatureSettings),b.setFontVariationSettings(D.fontVariationSettings),b.setLineHeight(D.lineHeight),b.setLetterSpacing(D.letterSpacing)):(b.style.fontFamily=D.getMassagedFontFamily(),b.style.fontWeight=D.fontWeight,b.style.fontSize=D.fontSize+"px",b.style.fontFeatureSettings=D.fontFeatureSettings,b.style.fontVariationSettings=D.fontVariationSettings,b.style.lineHeight=D.lineHeight+"px",b.style.letterSpacing=D.letterSpacing+"px")}e.applyFontInfo=y}),define(Q[1850],Y([1,0,258]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readCharWidths=e.CharWidthRequest=e.CharWidthRequestType=void 0;var y;(function(f){f[f.Regular=0]="Regular",f[f.Italic=1]="Italic",f[f.Bold=2]="Bold"})(y||(e.CharWidthRequestType=y={}));class b{constructor(v,m){this.chr=v,this.type=m,this.width=0}fulfill(v){this.width=v}}e.CharWidthRequest=b;class D{constructor(v,m){this._bareFontInfo=v,this._requests=m,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 v=document.createElement("div");v.style.position="absolute",v.style.top="-50000px",v.style.width="50000px";const m=document.createElement("div");(0,t.applyFontInfo)(m,this._bareFontInfo),v.appendChild(m);const S=document.createElement("div");(0,t.applyFontInfo)(S,this._bareFontInfo),S.style.fontWeight="bold",v.appendChild(S);const h=document.createElement("div");(0,t.applyFontInfo)(h,this._bareFontInfo),h.style.fontStyle="italic",v.appendChild(h);const a=[];for(const r of this._requests){let i;r.type===0&&(i=m),r.type===2&&(i=S),r.type===1&&(i=h),i.appendChild(document.createElement("br"));const s=document.createElement("span");D._render(s,r),i.appendChild(s),a.push(s)}this._container=v,this._testElements=a}static _render(v,m){if(m.chr===" "){let S="\xA0";for(let h=0;h<8;h++)S+=S;v.innerText=S}else{let S=m.chr;for(let h=0;h<8;h++)S+=S;v.textContent=S}}_readFromDomElements(){for(let v=0,m=this._requests.length;v<m;v++){const S=this._requests[v],h=this._testElements[v];S.fulfill(h.offsetWidth/256)}}}function T(f,v){new D(f,v).read()}e.readCharWidths=T}),define(Q[658],Y([1,0,4,6]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElementSizeObserver=void 0;class b extends t.Disposable{constructor(T,f){super(),this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this._referenceDomElement=T,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,f)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let T=null;const f=()=>{T?this.observe({width:T.width,height:T.height}):this.observe()};let v=!1,m=!1;const S=()=>{if(v&&!m)try{v=!1,m=!0,f()}finally{requestAnimationFrame(()=>{m=!1,S()})}};this._resizeObserver=new ResizeObserver(h=>{T=h&&h[0]&&h[0].contentRect?h[0].contentRect:null,v=!0,S()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(T){this.measureReferenceDomElement(!0,T)}measureReferenceDomElement(T,f){let v=0,m=0;f?(v=f.width,m=f.height):this._referenceDomElement&&(v=this._referenceDomElement.clientWidth,m=this._referenceDomElement.clientHeight),v=Math.max(5,v),m=Math.max(5,m),(this._width!==v||this._height!==m)&&(this._width=v,this._height=m,T&&this._onDidChange.fire())}}e.ElementSizeObserver=b}),define(Q[1064],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.migrateOptions=e.EditorSettingMigration=void 0;class t{static{this.items=[]}constructor(v,m){this.key=v,this.migrate=m}apply(v){const m=t._read(v,this.key),S=a=>t._read(v,a),h=(a,r)=>t._write(v,a,r);this.migrate(m,S,h)}static _read(v,m){if(typeof v>"u")return;const S=m.indexOf(".");if(S>=0){const h=m.substring(0,S);return this._read(v[h],m.substring(S+1))}return v[m]}static _write(v,m,S){const h=m.indexOf(".");if(h>=0){const a=m.substring(0,h);v[a]=v[a]||{},this._write(v[a],m.substring(h+1),S);return}v[m]=S}}e.EditorSettingMigration=t;function y(f,v){t.items.push(new t(f,v))}function b(f,v){y(f,(m,S,h)=>{if(typeof m<"u"){for(const[a,r]of v)if(m===a){h(f,r);return}}})}function D(f){t.items.forEach(v=>v.apply(f))}e.migrateOptions=D,b("wordWrap",[[!0,"on"],[!1,"off"]]),b("lineNumbers",[[!0,"on"],[!1,"off"]]),b("cursorBlinking",[["visible","solid"]]),b("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),b("renderLineHighlight",[[!0,"line"],[!1,"none"]]),b("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),b("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),b("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),b("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),b("autoIndent",[[!1,"advanced"],[!0,"full"]]),b("matchBrackets",[[!0,"always"],[!1,"never"]]),b("renderFinalNewline",[[!0,"on"],[!1,"off"]]),b("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),y("autoClosingBrackets",(f,v,m)=>{f===!1&&(m("autoClosingBrackets","never"),typeof v("autoClosingQuotes")>"u"&&m("autoClosingQuotes","never"),typeof v("autoSurround")>"u"&&m("autoSurround","never"))}),y("renderIndentGuides",(f,v,m)=>{typeof f<"u"&&(m("renderIndentGuides",void 0),typeof v("guides.indentation")>"u"&&m("guides.indentation",!!f))}),y("highlightActiveIndentGuide",(f,v,m)=>{typeof f<"u"&&(m("highlightActiveIndentGuide",void 0),typeof v("guides.highlightActiveIndentation")>"u"&&m("guides.highlightActiveIndentation",!!f))});const T={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};y("suggest.filteredTypes",(f,v,m)=>{if(f&&typeof f=="object"){for(const S of Object.entries(T))f[S[0]]===!1&&typeof v(`suggest.${S[1]}`)>"u"&&m(`suggest.${S[1]}`,!1);m("suggest.filteredTypes",void 0)}}),y("quickSuggestions",(f,v,m)=>{if(typeof f=="boolean"){const S=f?"on":"off";m("quickSuggestions",{comments:S,strings:S,other:S})}}),y("experimental.stickyScroll.enabled",(f,v,m)=>{typeof f=="boolean"&&(m("experimental.stickyScroll.enabled",void 0),typeof v("stickyScroll.enabled")>"u"&&m("stickyScroll.enabled",f))}),y("experimental.stickyScroll.maxLineCount",(f,v,m)=>{typeof f=="number"&&(m("experimental.stickyScroll.maxLineCount",void 0),typeof v("stickyScroll.maxLineCount")>"u"&&m("stickyScroll.maxLineCount",f))})}),define(Q[485],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabFocus=e.TabFocusContext=void 0;var y;(function(D){D.Terminal="terminalFocus",D.Editor="editorFocus"})(y||(e.TabFocusContext=y={}));class b{constructor(){this._tabFocusTerminal=!1,this._tabFocusEditor=!1,this._onDidChangeTabFocus=new t.Emitter,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(T){return T==="terminalFocus"?this._tabFocusTerminal:this._tabFocusEditor}setTabFocusMode(T,f){f==="terminalFocus"?this._tabFocusTerminal=T:this._tabFocusEditor=T,this._onDidChangeTabFocus.fire()}}e.TabFocus=new b}),define(Q[390],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StableEditorScrollState=void 0;class t{static capture(b){if(b.getScrollTop()===0||b.hasPendingScrollAnimation())return new t(b.getScrollTop(),b.getContentHeight(),null,0,null);let D=null,T=0;const f=b.getVisibleRanges();if(f.length>0){D=f[0].getStartPosition();const v=b.getTopForPosition(D.lineNumber,D.column);T=b.getScrollTop()-v}return new t(b.getScrollTop(),b.getContentHeight(),D,T,b.getPosition())}constructor(b,D,T,f,v){this._initialScrollTop=b,this._initialContentHeight=D,this._visiblePosition=T,this._visiblePositionScrollDelta=f,this._cursorPosition=v}restore(b){if(!(this._initialContentHeight===b.getContentHeight()&&this._initialScrollTop===b.getScrollTop())&&this._visiblePosition){const D=b.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);b.setScrollTop(D+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(b){if(this._initialContentHeight===b.getContentHeight()&&this._initialScrollTop===b.getScrollTop())return;const D=b.getPosition();if(!this._cursorPosition||!D)return;const T=b.getTopForLineNumber(D.lineNumber)-b.getTopForLineNumber(this._cursorPosition.lineNumber);b.setScrollTop(b.getScrollTop()+T)}}e.StableEditorScrollState=t}),define(Q[562],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleRanges=e.HorizontalPosition=e.FloatHorizontalRange=e.HorizontalRange=e.LineVisibleRanges=e.RenderingContext=e.RestrictedRenderingContext=void 0;class t{constructor(S,h){this._restrictedRenderingContextBrand=void 0,this._viewLayout=S,this.viewportData=h,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const a=this._viewLayout.getCurrentViewport();this.scrollTop=a.top,this.scrollLeft=a.left,this.viewportWidth=a.width,this.viewportHeight=a.height}getScrolledTopFromAbsoluteTop(S){return S-this.scrollTop}getVerticalOffsetForLineNumber(S,h){return this._viewLayout.getVerticalOffsetForLineNumber(S,h)}getVerticalOffsetAfterLineNumber(S,h){return this._viewLayout.getVerticalOffsetAfterLineNumber(S,h)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}e.RestrictedRenderingContext=t;class y extends t{constructor(S,h,a){super(S,h),this._renderingContextBrand=void 0,this._viewLines=a}linesVisibleRangesForRange(S,h){return this._viewLines.linesVisibleRangesForRange(S,h)}visibleRangeForPosition(S){return this._viewLines.visibleRangeForPosition(S)}}e.RenderingContext=y;class b{static firstLine(S){if(!S)return null;let h=null;for(const a of S)(!h||a.lineNumber<h.lineNumber)&&(h=a);return h}static lastLine(S){if(!S)return null;let h=null;for(const a of S)(!h||a.lineNumber>h.lineNumber)&&(h=a);return h}constructor(S,h,a,r){this.outsideRenderedLine=S,this.lineNumber=h,this.ranges=a,this.continuesOnNextLine=r}}e.LineVisibleRanges=b;class D{static from(S){const h=new Array(S.length);for(let a=0,r=S.length;a<r;a++){const i=S[a];h[a]=new D(i.left,i.width)}return h}constructor(S,h){this._horizontalRangeBrand=void 0,this.left=Math.round(S),this.width=Math.round(h)}toString(){return`[${this.left},${this.width}]`}}e.HorizontalRange=D;class T{constructor(S,h){this._floatHorizontalRangeBrand=void 0,this.left=S,this.width=h}toString(){return`[${this.left},${this.width}]`}static compare(S,h){return S.left-h.left}}e.FloatHorizontalRange=T;class f{constructor(S,h){this.outsideRenderedLine=S,this.originalLeft=h,this.left=Math.round(this.originalLeft)}}e.HorizontalPosition=f;class v{constructor(S,h){this.outsideRenderedLine=S,this.ranges=h}}e.VisibleRanges=v}),define(Q[1851],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomReadingContext=void 0;class t{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const b=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=b.left,this._clientRectScale=b.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(b,D){this._domNode=b,this.endNode=D,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}e.DomReadingContext=t}),define(Q[1852],Y([1,0,562]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeUtil=void 0;class y{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(D,T){D.selectNodeContents(T)}static _readClientRects(D,T,f,v,m){const S=this._createRange();try{return S.setStart(D,T),S.setEnd(f,v),S.getClientRects()}catch{return null}finally{this._detachRange(S,m)}}static _mergeAdjacentRanges(D){if(D.length===1)return D;D.sort(t.FloatHorizontalRange.compare);const T=[];let f=0,v=D[0];for(let m=1,S=D.length;m<S;m++){const h=D[m];v.left+v.width+.9>=h.left?v.width=Math.max(v.width,h.left+h.width-v.left):(T[f++]=v,v=h)}return T[f++]=v,T}static _createHorizontalRangesFromClientRects(D,T,f){if(!D||D.length===0)return null;const v=[];for(let m=0,S=D.length;m<S;m++){const h=D[m];v[m]=new t.FloatHorizontalRange(Math.max(0,(h.left-T)/f),h.width/f)}return this._mergeAdjacentRanges(v)}static readHorizontalRanges(D,T,f,v,m,S){const a=D.children.length-1;if(0>a)return null;if(T=Math.min(a,Math.max(0,T)),v=Math.min(a,Math.max(0,v)),T===v&&f===m&&f===0&&!D.children[T].firstChild){const o=D.children[T].getClientRects();return S.markDidDomLayout(),this._createHorizontalRangesFromClientRects(o,S.clientRectDeltaLeft,S.clientRectScale)}T!==v&&v>0&&m===0&&(v--,m=1073741824);let r=D.children[T].firstChild,i=D.children[v].firstChild;if((!r||!i)&&(!r&&f===0&&T>0&&(r=D.children[T-1].firstChild,f=1073741824),!i&&m===0&&v>0&&(i=D.children[v-1].firstChild,m=1073741824)),!r||!i)return null;f=Math.min(r.textContent.length,Math.max(0,f)),m=Math.min(i.textContent.length,Math.max(0,m));const s=this._readClientRects(r,f,i,m,S.endNode);return S.markDidDomLayout(),this._createHorizontalRangesFromClientRects(s,S.clientRectDeltaLeft,S.clientRectScale)}}e.RangeUtil=y}),define(Q[1065],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCharIndex=e.allCharCodes=e.Constants=void 0;var t;(function(b){b[b.START_CH_CODE=32]="START_CH_CODE",b[b.END_CH_CODE=126]="END_CH_CODE",b[b.UNKNOWN_CODE=65533]="UNKNOWN_CODE",b[b.CHAR_COUNT=96]="CHAR_COUNT",b[b.SAMPLED_CHAR_HEIGHT=16]="SAMPLED_CHAR_HEIGHT",b[b.SAMPLED_CHAR_WIDTH=10]="SAMPLED_CHAR_WIDTH",b[b.BASE_CHAR_HEIGHT=2]="BASE_CHAR_HEIGHT",b[b.BASE_CHAR_WIDTH=1]="BASE_CHAR_WIDTH",b[b.RGBA_CHANNELS_CNT=4]="RGBA_CHANNELS_CNT",b[b.RGBA_SAMPLED_ROW_WIDTH=3840]="RGBA_SAMPLED_ROW_WIDTH"})(t||(e.Constants=t={})),e.allCharCodes=(()=>{const b=[];for(let D=32;D<=126;D++)b.push(D);return b.push(65533),b})();const y=(b,D)=>(b-=32,b<0||b>96?D<=2?(b+96)%96:96-1:b);e.getCharIndex=y}),define(Q[1853],Y([1,0,1065,654]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRenderer=void 0;class b{constructor(T,f){this.scale=f,this._minimapCharRendererBrand=void 0,this.charDataNormal=b.soften(T,12/15),this.charDataLight=b.soften(T,50/60)}static soften(T,f){const v=new Uint8ClampedArray(T.length);for(let m=0,S=T.length;m<S;m++)v[m]=(0,y.toUint8)(T[m]*f);return v}renderChar(T,f,v,m,S,h,a,r,i,s,o){const u=1*this.scale,d=2*this.scale,p=o?1:d;if(f+u>T.width||v+p>T.height){console.warn("bad render request outside image data");return}const c=s?this.charDataLight:this.charDataNormal,l=(0,t.getCharIndex)(m,i),n=T.width*4,g=a.r,w=a.g,E=a.b,C=S.r-g,I=S.g-w,_=S.b-E,A=Math.max(h,r),k=T.data;let L=l*u*d,R=v*n+f*4;for(let M=0;M<p;M++){let N=R;for(let P=0;P<u;P++){const x=c[L++]/255*(h/255);k[N++]=g+C*x,k[N++]=w+I*x,k[N++]=E+_*x,k[N++]=A}R+=n}}blockRenderChar(T,f,v,m,S,h,a,r){const i=1*this.scale,s=2*this.scale,o=r?1:s;if(f+i>T.width||v+o>T.height){console.warn("bad render request outside image data");return}const u=T.width*4,d=.5*(S/255),p=h.r,c=h.g,l=h.b,n=m.r-p,g=m.g-c,w=m.b-l,E=p+n*d,C=c+g*d,I=l+w*d,_=Math.max(S,a),A=T.data;let k=v*u+f*4;for(let L=0;L<o;L++){let R=k;for(let M=0;M<i;M++)A[R++]=E,A[R++]=C,A[R++]=I,A[R++]=_;k+=u}}}e.MinimapCharRenderer=b}),define(Q[1854],Y([1,0,202]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prebakedMiniMaps=void 0;const y={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},b=D=>{const T=new Uint8ClampedArray(D.length/2);for(let f=0;f<D.length;f+=2)T[f>>1]=y[D[f]]<<4|y[D[f+1]]&15;return T};e.prebakedMiniMaps={1:(0,t.once)(()=>b("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,t.once)(()=>b("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}}),define(Q[1855],Y([1,0,1853,1065,1854,654]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRendererFactory=void 0;class T{static create(v,m){if(this.lastCreated&&v===this.lastCreated.scale&&m===this.lastFontFamily)return this.lastCreated;let S;return b.prebakedMiniMaps[v]?S=new t.MinimapCharRenderer(b.prebakedMiniMaps[v](),v):S=T.createFromSampleData(T.createSampleData(m).data,v),this.lastFontFamily=m,this.lastCreated=S,S}static createSampleData(v){const m=document.createElement("canvas"),S=m.getContext("2d");m.style.height="16px",m.height=16,m.width=96*10,m.style.width=96*10+"px",S.fillStyle="#ffffff",S.font=`bold 16px ${v}`,S.textBaseline="middle";let h=0;for(const a of y.allCharCodes)S.fillText(String.fromCharCode(a),h,16/2),h+=10;return S.getImageData(0,0,96*10,16)}static createFromSampleData(v,m){if(v.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const h=T._downsample(v,m);return new t.MinimapCharRenderer(h,m)}static _downsampleChar(v,m,S,h,a){const r=1*a,i=2*a;let s=h,o=0;for(let u=0;u<i;u++){const d=u/i*16,p=(u+1)/i*16;for(let c=0;c<r;c++){const l=c/r*10,n=(c+1)/r*10;let g=0,w=0;for(let C=d;C<p;C++){const I=m+Math.floor(C)*3840,_=1-(C-Math.floor(C));for(let A=l;A<n;A++){const k=1-(A-Math.floor(A)),L=I+Math.floor(A)*4,R=k*_;w+=R,g+=v[L]*v[L+3]/255*R}}const E=g/w;o=Math.max(o,E),S[s++]=(0,D.toUint8)(E)}}return o}static _downsample(v,m){const S=2*m*1*m,h=S*96,a=new Uint8ClampedArray(h);let r=0,i=0,s=0;for(let o=0;o<96;o++)s=Math.max(s,this._downsampleChar(v,i,a,r,m)),r+=S,i+=10*4;if(s>0){const o=255/s;for(let u=0;u<h;u++)a[u]*=o}return a}}e.MinimapCharRendererFactory=T}),define(Q[1856],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DelegatingEditor=void 0;class b extends y.Disposable{constructor(){super(...arguments),this._id=++b.idCounter,this._onDidDispose=this._register(new t.Emitter),this.onDidDispose=this._onDidDispose.event}static{this.idCounter=0}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(T){return this._targetEditor.getVisibleColumnFromPosition(T)}getStatusbarColumn(T){return this._targetEditor.getStatusbarColumn(T)}getPosition(){return this._targetEditor.getPosition()}setPosition(T,f="api"){this._targetEditor.setPosition(T,f)}revealLine(T,f=0){this._targetEditor.revealLine(T,f)}revealLineInCenter(T,f=0){this._targetEditor.revealLineInCenter(T,f)}revealLineInCenterIfOutsideViewport(T,f=0){this._targetEditor.revealLineInCenterIfOutsideViewport(T,f)}revealLineNearTop(T,f=0){this._targetEditor.revealLineNearTop(T,f)}revealPosition(T,f=0){this._targetEditor.revealPosition(T,f)}revealPositionInCenter(T,f=0){this._targetEditor.revealPositionInCenter(T,f)}revealPositionInCenterIfOutsideViewport(T,f=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(T,f)}revealPositionNearTop(T,f=0){this._targetEditor.revealPositionNearTop(T,f)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(T,f="api"){this._targetEditor.setSelection(T,f)}setSelections(T,f="api"){this._targetEditor.setSelections(T,f)}revealLines(T,f,v=0){this._targetEditor.revealLines(T,f,v)}revealLinesInCenter(T,f,v=0){this._targetEditor.revealLinesInCenter(T,f,v)}revealLinesInCenterIfOutsideViewport(T,f,v=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(T,f,v)}revealLinesNearTop(T,f,v=0){this._targetEditor.revealLinesNearTop(T,f,v)}revealRange(T,f=0,v=!1,m=!0){this._targetEditor.revealRange(T,f,v,m)}revealRangeInCenter(T,f=0){this._targetEditor.revealRangeInCenter(T,f)}revealRangeInCenterIfOutsideViewport(T,f=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(T,f)}revealRangeNearTop(T,f=0){this._targetEditor.revealRangeNearTop(T,f)}revealRangeNearTopIfOutsideViewport(T,f=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(T,f)}revealRangeAtTop(T,f=0){this._targetEditor.revealRangeAtTop(T,f)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(T,f,v){this._targetEditor.trigger(T,f,v)}createDecorationsCollection(T){return this._targetEditor.createDecorationsCollection(T)}changeDecorations(T){return this._targetEditor.changeDecorations(T)}}e.DelegatingEditor=b}),define(Q[391],Y([1,0,4,109,658]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyViewZones=e.observeHotReloadableExports=e.readHotReloadableExport=e.applyStyle=e.ManagedOverlayWidget=e.PlaceholderViewZone=e.ViewZoneOverlayWidget=e.deepMerge=e.animatedObservable=e.ObservableElementSizeObserver=e.observableConfigValue=e.appendRemoveOnDispose=e.applyObservableDecorations=e.joinCombine=void 0;function D(c,l,n,g){if(c.length===0)return l;if(l.length===0)return c;const w=[];let E=0,C=0;for(;E<c.length&&C<l.length;){const I=c[E],_=l[C],A=n(I),k=n(_);A<k?(w.push(I),E++):A>k?(w.push(_),C++):(w.push(g(I,_)),E++,C++)}for(;E<c.length;)w.push(c[E]),E++;for(;C<l.length;)w.push(l[C]),C++;return w}e.joinCombine=D;function T(c,l){const n=new t.DisposableStore,g=c.createDecorationsCollection();return n.add((0,y.autorunOpts)({debugName:`Apply decorations from ${l.debugName}`},w=>{const E=l.read(w);g.set(E)})),n.add({dispose:()=>{g.clear()}}),n}e.applyObservableDecorations=T;function f(c,l){return c.appendChild(l),(0,t.toDisposable)(()=>{c.removeChild(l)})}e.appendRemoveOnDispose=f;function v(c,l,n){return(0,y.observableFromEvent)(g=>n.onDidChangeConfiguration(w=>{w.affectsConfiguration(c)&&g(w)}),()=>n.getValue(c)??l)}e.observableConfigValue=v;class m extends t.Disposable{get width(){return this._width}get height(){return this._height}constructor(l,n){super(),this.elementSizeObserver=this._register(new b.ElementSizeObserver(l,n)),this._width=(0,y.observableValue)("width",this.elementSizeObserver.getWidth()),this._height=(0,y.observableValue)("height",this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(g=>(0,y.transaction)(w=>{this._width.set(this.elementSizeObserver.getWidth(),w),this._height.set(this.elementSizeObserver.getHeight(),w)})))}observe(l){this.elementSizeObserver.observe(l)}setAutomaticLayout(l){l?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}e.ObservableElementSizeObserver=m;function S(c,l){let n=c.get(),g=n,w=n;const E=(0,y.observableValue)("animatedValue",n);let C=-1;const I=300;let _;l.add((0,y.autorunHandleChanges)({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(k,L)=>(k.didChange(c)&&(L.animate=L.animate||k.change),!0)},(k,L)=>{_!==void 0&&(cancelAnimationFrame(_),_=void 0),g=w,n=c.read(k),C=Date.now()-(L.animate?0:I),A()}));function A(){const k=Date.now()-C;w=Math.floor(h(k,g,n-g,I)),k<I?_=requestAnimationFrame(A):w=n,E.set(w,void 0)}return E}e.animatedObservable=S;function h(c,l,n,g){return c===g?l+n:n*(-Math.pow(2,-10*c/g)+1)+l}function a(c,l){const n={};for(const g in c)n[g]=c[g];for(const g in l){const w=l[g];typeof n[g]=="object"&&w&&typeof w=="object"?n[g]=a(n[g],w):n[g]=w}return n}e.deepMerge=a;class r extends t.Disposable{constructor(l,n,g){super(),this._register(new s(l,g)),this._register(o(g,{height:n.actualHeight,top:n.actualTop}))}}e.ViewZoneOverlayWidget=r;class i{get afterLineNumber(){return this._afterLineNumber.get()}constructor(l,n){this._afterLineNumber=l,this.heightInPx=n,this.domNode=document.createElement("div"),this._actualTop=(0,y.observableValue)("actualTop",void 0),this._actualHeight=(0,y.observableValue)("actualHeight",void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=g=>{this._actualTop.set(g,void 0)},this.onComputedHeight=g=>{this._actualHeight.set(g,void 0)}}}e.PlaceholderViewZone=i;class s{static{this._counter=0}constructor(l,n){this._editor=l,this._domElement=n,this._overlayWidgetId=`managedOverlayWidget-${s._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}e.ManagedOverlayWidget=s;function o(c,l){return(0,y.autorun)(n=>{for(let[g,w]of Object.entries(l))w&&typeof w=="object"&&"read"in w&&(w=w.read(n)),typeof w=="number"&&(w=`${w}px`),g=g.replace(/[A-Z]/g,E=>"-"+E.toLowerCase()),c.style[g]=w})}e.applyStyle=o;function u(c,l){return d([c],l),c}e.readHotReloadableExport=u;function d(c,l){const n=globalThis.$hotReload_deprecateExports;if(!n)return;(0,y.observableSignalFromEvent)("reload",w=>{function E(C,I){return[...Object.values(C)].some(_=>c.includes(_))?(w(void 0),!0):!1}return n.add(E),{dispose(){n.delete(E)}}}).read(l)}e.observeHotReloadableExports=d;function p(c,l,n){const g=new t.DisposableStore,w=[];return g.add((0,y.autorun)(E=>{const C=l.read(E),I=new Map,_=new Map;n&&n(!0),c.changeViewZones(A=>{for(const k of w)A.removeZone(k);w.length=0;for(const k of C){const L=A.addZone(k);w.push(L),I.set(k,L)}}),n&&n(!1),g.add((0,y.autorunHandleChanges)({createEmptyChangeSummary(){return[]},handleChange(A,k){const L=_.get(A.changedObservable);return L!==void 0&&k.push(L),!0}},(A,k)=>{for(const L of C)L.onChange&&(_.set(L.onChange,I.get(L)),L.onChange.read(A));n&&n(!0),c.changeViewZones(L=>{for(const R of k)L.layoutZone(R)}),n&&n(!1)}))})),g.add({dispose(){n&&n(!0),c.changeViewZones(E=>{for(const C of w)E.removeZone(C)}),n&&n(!1)}}),g}e.applyViewZones=p}),define(Q[1066],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.diffEditorDefaultOptions=void 0,e.diffEditorDefaultOptions={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0}}),define(Q[659],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorZoom=void 0,e.EditorZoom=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new t.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(y){y=Math.min(Math.max(-5,y),20),this._zoomLevel!==y&&(this._zoomLevel=y,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}}),define(Q[486],Y([1,0,654]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterSet=e.CharacterClassifier=void 0;class y{constructor(f){const v=(0,t.toUint8)(f);this._defaultValue=v,this._asciiMap=y._createAsciiMap(v),this._map=new Map}static _createAsciiMap(f){const v=new Uint8Array(256);return v.fill(f),v}set(f,v){const m=(0,t.toUint8)(v);f>=0&&f<256?this._asciiMap[f]=m:this._map.set(f,m)}get(f){return f>=0&&f<256?this._asciiMap[f]:this._map.get(f)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}e.CharacterClassifier=y;var b;(function(T){T[T.False=0]="False",T[T.True=1]="True"})(b||(b={}));class D{constructor(){this._actual=new y(0)}add(f){this._actual.set(f,1)}has(f){return this._actual.get(f)===1}clear(){return this._actual.clear()}}e.CharacterSet=D}),define(Q[323],Y([1,0,33]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorColumns=void 0;class y{static _nextVisibleColumn(D,T,f){return D===9?y.nextRenderTabStop(T,f):t.isFullWidthCharacter(D)||t.isEmojiImprecise(D)?T+2:T+1}static visibleColumnFromColumn(D,T,f){const v=Math.min(T-1,D.length),m=D.substring(0,v),S=new t.GraphemeIterator(m);let h=0;for(;!S.eol();){const a=t.getNextCodePoint(m,v,S.offset);S.nextGraphemeLength(),h=this._nextVisibleColumn(a,h,f)}return h}static toStatusbarColumn(D,T,f){const v=D.substring(0,Math.min(T-1,D.length)),m=new t.CodePointIterator(v);let S=0;for(;!m.eol();)m.nextCodePoint()===9?S=y.nextRenderTabStop(S,f):S=S+1;return S+1}static columnFromVisibleColumn(D,T,f){if(T<=0)return 1;const v=D.length,m=new t.GraphemeIterator(D);let S=0,h=1;for(;!m.eol();){const a=t.getNextCodePoint(D,v,m.offset);m.nextGraphemeLength();const r=this._nextVisibleColumn(a,S,f),i=m.offset+1;if(r>=T){const s=T-S;return r-T<s?i:h}S=r,h=i}return v+1}static nextRenderTabStop(D,T){return D+T-D%T}static nextIndentTabStop(D,T){return D+T-D%T}static prevRenderTabStop(D,T){return Math.max(0,D-1-(D-1)%T)}static prevIndentTabStop(D,T){return Math.max(0,D-1-(D-1)%T)}}e.CursorColumns=y}),define(Q[392],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.countEOL=e.StringEOL=void 0;var t;(function(b){b[b.Unknown=0]="Unknown",b[b.Invalid=3]="Invalid",b[b.LF=1]="LF",b[b.CRLF=2]="CRLF"})(t||(e.StringEOL=t={}));function y(b){let D=0,T=0,f=0,v=0;for(let m=0,S=b.length;m<S;m++){const h=b.charCodeAt(m);h===13?(D===0&&(T=m),D++,m+1<S&&b.charCodeAt(m+1)===10?(v|=2,m++):v|=3,f=m+1):h===10&&(v|=1,D===0&&(T=m),D++,f=m+1)}return D===0&&(T=b.length),[D,T,b.length-f,v]}e.countEOL=y}),define(Q[794],Y([1,0,33,323]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeIndentation=void 0;function b(T,f,v){let m=0;for(let h=0;h<T.length;h++)T.charAt(h)===" "?m=y.CursorColumns.nextIndentTabStop(m,f):m++;let S="";if(!v){const h=Math.floor(m/f);m=m%f;for(let a=0;a<h;a++)S+=" "}for(let h=0;h<m;h++)S+=" ";return S}function D(T,f,v){let m=t.firstNonWhitespaceIndex(T);return m===-1&&(m=T.length),b(T.substring(0,m),f,v)+T.substring(m)}e.normalizeIndentation=D}),define(Q[366],Y([1,0,15]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OffsetRangeSet=e.OffsetRange=void 0;class y{static addRange(T,f){let v=0;for(;v<f.length&&f[v].endExclusive<T.start;)v++;let m=v;for(;m<f.length&&f[m].start<=T.endExclusive;)m++;if(v===m)f.splice(v,0,T);else{const S=Math.min(T.start,f[v].start),h=Math.max(T.endExclusive,f[m-1].endExclusive);f.splice(v,m-v,new y(S,h))}}static tryCreate(T,f){if(!(T>f))return new y(T,f)}static ofLength(T){return new y(0,T)}constructor(T,f){if(this.start=T,this.endExclusive=f,T>f)throw new t.BugIndicatingError(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(T){return new y(this.start+T,this.endExclusive+T)}deltaStart(T){return new y(this.start+T,this.endExclusive)}deltaEnd(T){return new y(this.start,this.endExclusive+T)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(T){return this.start===T.start&&this.endExclusive===T.endExclusive}containsRange(T){return this.start<=T.start&&T.endExclusive<=this.endExclusive}contains(T){return this.start<=T&&T<this.endExclusive}join(T){return new y(Math.min(this.start,T.start),Math.max(this.endExclusive,T.endExclusive))}intersect(T){const f=Math.max(this.start,T.start),v=Math.min(this.endExclusive,T.endExclusive);if(f<=v)return new y(f,v)}slice(T){return T.slice(this.start,this.endExclusive)}clip(T){if(this.isEmpty)throw new t.BugIndicatingError(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,T))}clipCyclic(T){if(this.isEmpty)throw new t.BugIndicatingError(`Invalid clipping range: ${this.toString()}`);return T<this.start?this.endExclusive-(this.start-T)%this.length:T>=this.endExclusive?this.start+(T-this.start)%this.length:T}}e.OffsetRange=y;class b{constructor(){this._sortedRanges=[]}addRange(T){let f=0;for(;f<this._sortedRanges.length&&this._sortedRanges[f].endExclusive<T.start;)f++;let v=f;for(;v<this._sortedRanges.length&&this._sortedRanges[v].start<=T.endExclusive;)v++;if(f===v)this._sortedRanges.splice(f,0,T);else{const m=Math.min(T.start,this._sortedRanges[f].start),S=Math.max(T.endExclusive,this._sortedRanges[v-1].endExclusive);this._sortedRanges.splice(f,v-f,new y(m,S))}}toString(){return this._sortedRanges.map(T=>T.toString()).join(", ")}intersectsStrict(T){let f=0;for(;f<this._sortedRanges.length&&this._sortedRanges[f].endExclusive<=T.start;)f++;return f<this._sortedRanges.length&&this._sortedRanges[f].start<T.endExclusive}intersectWithRange(T){const f=new b;for(const v of this._sortedRanges){const m=v.intersect(T);m&&f.addRange(m)}return f}intersectWithRangeLength(T){return this.intersectWithRange(T).length}get length(){return this._sortedRanges.reduce((T,f)=>T+f.length,0)}}e.OffsetRangeSet=b}),define(Q[51],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Position=void 0;class t{constructor(b,D){this.lineNumber=b,this.column=D}with(b=this.lineNumber,D=this.column){return b===this.lineNumber&&D===this.column?this:new t(b,D)}delta(b=0,D=0){return this.with(this.lineNumber+b,this.column+D)}equals(b){return t.equals(this,b)}static equals(b,D){return!b&&!D?!0:!!b&&!!D&&b.lineNumber===D.lineNumber&&b.column===D.column}isBefore(b){return t.isBefore(this,b)}static isBefore(b,D){return b.lineNumber<D.lineNumber?!0:D.lineNumber<b.lineNumber?!1:b.column<D.column}isBeforeOrEqual(b){return t.isBeforeOrEqual(this,b)}static isBeforeOrEqual(b,D){return b.lineNumber<D.lineNumber?!0:D.lineNumber<b.lineNumber?!1:b.column<=D.column}static compare(b,D){const T=b.lineNumber|0,f=D.lineNumber|0;if(T===f){const v=b.column|0,m=D.column|0;return v-m}return T-f}clone(){return new t(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(b){return new t(b.lineNumber,b.column)}static isIPosition(b){return b&&typeof b.lineNumber=="number"&&typeof b.column=="number"}}e.Position=t}),define(Q[1067],Y([1,0,51]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewUserInputEvents=void 0;class y{constructor(D){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=D}emitKeyDown(D){this.onKeyDown?.(D)}emitKeyUp(D){this.onKeyUp?.(D)}emitContextMenu(D){this.onContextMenu?.(this._convertViewToModelMouseEvent(D))}emitMouseMove(D){this.onMouseMove?.(this._convertViewToModelMouseEvent(D))}emitMouseLeave(D){this.onMouseLeave?.(this._convertViewToModelMouseEvent(D))}emitMouseDown(D){this.onMouseDown?.(this._convertViewToModelMouseEvent(D))}emitMouseUp(D){this.onMouseUp?.(this._convertViewToModelMouseEvent(D))}emitMouseDrag(D){this.onMouseDrag?.(this._convertViewToModelMouseEvent(D))}emitMouseDrop(D){this.onMouseDrop?.(this._convertViewToModelMouseEvent(D))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(D){this.onMouseWheel?.(D)}_convertViewToModelMouseEvent(D){return D.target?{event:D.event,target:this._convertViewToModelMouseTarget(D.target)}:D}_convertViewToModelMouseTarget(D){return y.convertViewToModelMouseTarget(D,this._coordinatesConverter)}static convertViewToModelMouseTarget(D,T){const f={...D};return f.position&&(f.position=T.convertViewPositionToModelPosition(f.position)),f.range&&(f.range=T.convertViewRangeToModelRange(f.range)),(f.type===5||f.type===8)&&(f.detail=this.convertViewToModelViewZoneData(f.detail,T)),f}static convertViewToModelViewZoneData(D,T){return{viewZoneId:D.viewZoneId,positionBefore:D.positionBefore?T.convertViewPositionToModelPosition(D.positionBefore):D.positionBefore,positionAfter:D.positionAfter?T.convertViewPositionToModelPosition(D.positionAfter):D.positionAfter,position:T.convertViewPositionToModelPosition(D.position),afterLineNumber:T.convertViewPositionToModelPosition(new t.Position(D.afterLineNumber,1)).lineNumber}}}e.ViewUserInputEvents=y}),define(Q[27],Y([1,0,51]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;class y{constructor(D,T,f,v){D>f||D===f&&T>v?(this.startLineNumber=f,this.startColumn=v,this.endLineNumber=D,this.endColumn=T):(this.startLineNumber=D,this.startColumn=T,this.endLineNumber=f,this.endColumn=v)}isEmpty(){return y.isEmpty(this)}static isEmpty(D){return D.startLineNumber===D.endLineNumber&&D.startColumn===D.endColumn}containsPosition(D){return y.containsPosition(this,D)}static containsPosition(D,T){return!(T.lineNumber<D.startLineNumber||T.lineNumber>D.endLineNumber||T.lineNumber===D.startLineNumber&&T.column<D.startColumn||T.lineNumber===D.endLineNumber&&T.column>D.endColumn)}static strictContainsPosition(D,T){return!(T.lineNumber<D.startLineNumber||T.lineNumber>D.endLineNumber||T.lineNumber===D.startLineNumber&&T.column<=D.startColumn||T.lineNumber===D.endLineNumber&&T.column>=D.endColumn)}containsRange(D){return y.containsRange(this,D)}static containsRange(D,T){return!(T.startLineNumber<D.startLineNumber||T.endLineNumber<D.startLineNumber||T.startLineNumber>D.endLineNumber||T.endLineNumber>D.endLineNumber||T.startLineNumber===D.startLineNumber&&T.startColumn<D.startColumn||T.endLineNumber===D.endLineNumber&&T.endColumn>D.endColumn)}strictContainsRange(D){return y.strictContainsRange(this,D)}static strictContainsRange(D,T){return!(T.startLineNumber<D.startLineNumber||T.endLineNumber<D.startLineNumber||T.startLineNumber>D.endLineNumber||T.endLineNumber>D.endLineNumber||T.startLineNumber===D.startLineNumber&&T.startColumn<=D.startColumn||T.endLineNumber===D.endLineNumber&&T.endColumn>=D.endColumn)}plusRange(D){return y.plusRange(this,D)}static plusRange(D,T){let f,v,m,S;return T.startLineNumber<D.startLineNumber?(f=T.startLineNumber,v=T.startColumn):T.startLineNumber===D.startLineNumber?(f=T.startLineNumber,v=Math.min(T.startColumn,D.startColumn)):(f=D.startLineNumber,v=D.startColumn),T.endLineNumber>D.endLineNumber?(m=T.endLineNumber,S=T.endColumn):T.endLineNumber===D.endLineNumber?(m=T.endLineNumber,S=Math.max(T.endColumn,D.endColumn)):(m=D.endLineNumber,S=D.endColumn),new y(f,v,m,S)}intersectRanges(D){return y.intersectRanges(this,D)}static intersectRanges(D,T){let f=D.startLineNumber,v=D.startColumn,m=D.endLineNumber,S=D.endColumn;const h=T.startLineNumber,a=T.startColumn,r=T.endLineNumber,i=T.endColumn;return f<h?(f=h,v=a):f===h&&(v=Math.max(v,a)),m>r?(m=r,S=i):m===r&&(S=Math.min(S,i)),f>m||f===m&&v>S?null:new y(f,v,m,S)}equalsRange(D){return y.equalsRange(this,D)}static equalsRange(D,T){return!D&&!T?!0:!!D&&!!T&&D.startLineNumber===T.startLineNumber&&D.startColumn===T.startColumn&&D.endLineNumber===T.endLineNumber&&D.endColumn===T.endColumn}getEndPosition(){return y.getEndPosition(this)}static getEndPosition(D){return new t.Position(D.endLineNumber,D.endColumn)}getStartPosition(){return y.getStartPosition(this)}static getStartPosition(D){return new t.Position(D.startLineNumber,D.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(D,T){return new y(this.startLineNumber,this.startColumn,D,T)}setStartPosition(D,T){return new y(D,T,this.endLineNumber,this.endColumn)}collapseToStart(){return y.collapseToStart(this)}static collapseToStart(D){return new y(D.startLineNumber,D.startColumn,D.startLineNumber,D.startColumn)}collapseToEnd(){return y.collapseToEnd(this)}static collapseToEnd(D){return new y(D.endLineNumber,D.endColumn,D.endLineNumber,D.endColumn)}delta(D){return new y(this.startLineNumber+D,this.startColumn,this.endLineNumber+D,this.endColumn)}static fromPositions(D,T=D){return new y(D.lineNumber,D.column,T.lineNumber,T.column)}static lift(D){return D?new y(D.startLineNumber,D.startColumn,D.endLineNumber,D.endColumn):null}static isIRange(D){return D&&typeof D.startLineNumber=="number"&&typeof D.startColumn=="number"&&typeof D.endLineNumber=="number"&&typeof D.endColumn=="number"}static areIntersectingOrTouching(D,T){return!(D.endLineNumber<T.startLineNumber||D.endLineNumber===T.startLineNumber&&D.endColumn<T.startColumn||T.endLineNumber<D.startLineNumber||T.endLineNumber===D.startLineNumber&&T.endColumn<D.startColumn)}static areIntersecting(D,T){return!(D.endLineNumber<T.startLineNumber||D.endLineNumber===T.startLineNumber&&D.endColumn<=T.startColumn||T.endLineNumber<D.startLineNumber||T.endLineNumber===D.startLineNumber&&T.endColumn<=D.startColumn)}static compareRangesUsingStarts(D,T){if(D&&T){const m=D.startLineNumber|0,S=T.startLineNumber|0;if(m===S){const h=D.startColumn|0,a=T.startColumn|0;if(h===a){const r=D.endLineNumber|0,i=T.endLineNumber|0;if(r===i){const s=D.endColumn|0,o=T.endColumn|0;return s-o}return r-i}return h-a}return m-S}return(D?1:0)-(T?1:0)}static compareRangesUsingEnds(D,T){return D.endLineNumber===T.endLineNumber?D.endColumn===T.endColumn?D.startLineNumber===T.startLineNumber?D.startColumn-T.startColumn:D.startLineNumber-T.startLineNumber:D.endColumn-T.endColumn:D.endLineNumber-T.endLineNumber}static spansMultipleLines(D){return D.endLineNumber>D.startLineNumber}toJSON(){return this}}e.Range=y}),define(Q[1857],Y([1,0,27,33]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookTextFileModel=void 0;class b{constructor(v){this._eol=v}get activeCellGuid(){return this._activeCellGuid}set activeCellGuid(v){this._activeCellGuid!==v&&(this._sourceBeginRange=void 0,this._outputBeginRange=void 0,this._activeCellGuid=v)}transformAndApplyEditForSourceUpdate(v,m){let S=this.getCellNodeByGuid(m,v.cells[0].cellGuid);if(v&&v.modelContentChangedEvent&&D(S))return v.modelContentChangedEvent.changes.forEach(h=>{let a=h.text.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),r=h.range.startLineNumber+S.startLineNumber-1,i=h.range.endLineNumber+S.startLineNumber-1,s=m.textEditorModel.getLineContent(r),o=m.textEditorModel.getLineContent(i),u=s.replace(/\\"/g,'"').replace(/\\\\/g,"\\").substr(S.startColumn,h.range.startColumn-1),d=o.replace(/\\"/g,'"').replace(/\\\\/g,"\\").substr(S.startColumn,h.range.endColumn-1),p=u.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),c=d.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),l=p.length+S.startColumn+1,n=c.length+S.startColumn+1,g={startLineNumber:r,endLineNumber:i,startColumn:l,endColumn:n},w=(0,y.repeat)(" ",S.startColumn-1);m.textEditorModel.applyEdits([{range:new t.Range(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn),text:a.split(/[\r\n]+/gm).join('\\n",'.concat(this._eol).concat(w).concat('"'))}])}),!0;if(v&&D(S)){let h=this.getSourceEndRange(m,v.cells[0].cellGuid);if(h){let a=(0,y.repeat)(" ",S.startColumn-1),r=v.cells[0].source.join(` `).replace(/\\/g,"\\\\").replace(/"/g,'\\"');return m.textEditorModel.applyEdits([{range:new t.Range(this._sourceBeginRange.startLineNumber,this._sourceBeginRange.startColumn+1,h.endLineNumber,h.endColumn),text:r.split(/[\r\n]+/gm).join('\\n",'.concat(this._eol).concat(a).concat('"'))}]),!0}}return!1}transformAndApplyEditForOutputUpdate(v,m){if(this.transformAndApplyEditForClearOutput(v,m),Array.isArray(v.cells[0].outputs)&&v.cells[0].outputs.length>0){for(let S=0;S<v.cells[0].outputs.length;S++){let h=JSON.stringify(v.cells[0].outputs[S],void 0," ");S>0?h=", ".concat(h):h=` `.concat(h).concat(` `);let a=this.getExecutionCountRange(m,v.cells[0].cellGuid);if(!a||!a.range)return!1;let r=this.getEndOfOutputs(m,v.cells[0].cellGuid);r&&r.startLineNumber<a.range.startLineNumber&&m.textEditorModel.applyEdits([{range:new t.Range(r.startLineNumber,r.startColumn,r.startLineNumber,r.startColumn),text:h}])}return!0}return!1}transformAndApplyEditForCellUpdated(v,m){let S=this.getExecutionCountRange(m,v.cells[0].cellGuid);if(S&&S.range){let h=S.range.endColumn,a=h+1,r=m.textEditorModel.getLineContent(S.range.endLineNumber);for(;r[a-1];)a++;if(v.cells[0].executionCount)m.textEditorModel.applyEdits([{range:new t.Range(S.range.startLineNumber,h,S.range.endLineNumber,a),text:v.cells[0].executionCount.toString()}]);else return!0}else return!1;return!0}transformAndApplyEditForClearOutput(v,m){if(!m||!v||!v.cells||!v.cells[0]||!v.cells[0].cellGuid)return!1;this.updateOutputBeginRange(m,v.cells[0].cellGuid);let S=this.getEndOfOutputs(m,v.cells[0].cellGuid),h=this.getOutputNodeByGuid(m,v.cells[0].cellGuid);return h&&S?(m.textEditorModel.applyEdits([{range:new t.Range(h.startLineNumber,h.endColumn,S.endLineNumber,S.endColumn),text:""}]),!0):!1}async replaceEntireTextEditorModel(v,m,S){let h,a=v.toJSON(m),r=v.serializationManager;r?h=await r.contentManager.serializeNotebook(a):h=JSON.stringify(a,void 0," ");let i=S.textEditorModel,s=i.getLineCount(),o=i.getLineMaxColumn(s);S.textEditorModel.applyEdits([{range:new t.Range(1,1,s,o),text:h}])}updateSourceBeginRange(v,m){if(!m)return;this._sourceBeginRange=void 0;let S=T(v,m);if(S&&S.length>0){let h=v.textEditorModel.findPreviousMatch('"source": [',{lineNumber:S[0].range.startLineNumber,column:S[0].range.startColumn},!1,!0,void 0,!0);if(!h||!h.range)return;let a=v.textEditorModel.findNextMatch('"',{lineNumber:h.range.startLineNumber,column:h.range.endColumn},!1,!0,void 0,!0);this._sourceBeginRange=a.range}else return}getSourceEndRange(v,m){if(!m)return;if(T(v,m)?.length>0){this._sourceBeginRange||this.updateSourceBeginRange(v,m);let h=this._sourceBeginRange?.startLineNumber-1;if(h){let a=v.textEditorModel.getLineMaxColumn(h);if(a){let r=v.textEditorModel.bracketPairs.matchBracket({column:a-1,lineNumber:h});if(r?.length===2){let i=r[1].endLineNumber-1,s=v.textEditorModel.getLineLength(i);return{startColumn:s,startLineNumber:i,endLineNumber:i,endColumn:s}}}}}}updateOutputBeginRange(v,m){if(!m)return;this._outputBeginRange=void 0;let S=T(v,m);if(S&&S.length>0){let h=v.textEditorModel.findNextMatch('"outputs": [',{lineNumber:S[0].range.endLineNumber,column:S[0].range.endColumn},!1,!0,void 0,!0);if(!h||!h.range)return;this._outputBeginRange=h.range}else return}getEndOfOutputs(v,m){let S;if(this._activeCellGuid===m&&(S=this._outputBeginRange),(!S||!(v.textEditorModel.getLineContent(S.startLineNumber).trim().indexOf("output")>-1))&&(this.updateOutputBeginRange(v,m),S=this._outputBeginRange,!S))return;let h=v.textEditorModel.bracketPairs.matchBracket({column:S.endColumn-1,lineNumber:S.endLineNumber});if(!(!h||h.length<2))return S.endLineNumber===h[1].startLineNumber?{startColumn:h[0].startColumn+1,startLineNumber:h[0].startLineNumber,endColumn:h[0].endColumn,endLineNumber:h[0].endLineNumber}:v.textEditorModel.getLineContent(h[1].endLineNumber-1).trim()==="}"?{startColumn:v.textEditorModel.getLineFirstNonWhitespaceColumn(h[1].endLineNumber-1)+1,startLineNumber:h[1].endLineNumber-1,endColumn:h[1].endColumn-1,endLineNumber:h[1].endLineNumber}:void 0}getExecutionCountRange(v,m){let S=this.getEndOfOutputs(v,m);if(S&&S.endLineNumber)return v.textEditorModel.findNextMatch('"execution_count": ',{lineNumber:S.endLineNumber,column:S.endColumn},!1,!0,void 0,!0)}getCellNodeByGuid(v,m){return(this._activeCellGuid!==m||!this._sourceBeginRange)&&this.updateSourceBeginRange(v,m),this._sourceBeginRange}getOutputNodeByGuid(v,m){return this._activeCellGuid!==m&&this.updateOutputBeginRange(v,m),this._outputBeginRange}}e.NotebookTextFileModel=b;function D(f){return f&&f.startLineNumber!==0&&f.startColumn!==0&&f.endLineNumber!==0&&f.endColumn!==0}function T(f,v){if(!(!f||!v))return f.textEditorModel.findMatches(v,!1,!1,!0,void 0,!0)}}),define(Q[1068],Y([1,0,33,27]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedScreenReaderStrategy=e.TextAreaState=e._debugComposition=void 0,e._debugComposition=!1;class b{static{this.EMPTY=new b("",0,0,null,void 0)}constructor(f,v,m,S,h){this.value=f,this.selectionStart=v,this.selectionEnd=m,this.selection=S,this.newlineCountBeforeSelection=h}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(f,v){const m=f.getValue(),S=f.getSelectionStart(),h=f.getSelectionEnd();let a;if(v){const r=m.substring(0,S),i=v.value.substring(0,v.selectionStart);r===i&&(a=v.newlineCountBeforeSelection)}return new b(m,S,h,null,a)}collapseSelection(){return this.selectionStart===this.value.length?this:new b(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(f,v,m){e._debugComposition&&console.log(`writeToTextArea ${f}: ${this.toString()}`),v.setValue(f,this.value),m&&v.setSelectionRange(f,this.selectionStart,this.selectionEnd)}deduceEditorPosition(f){if(f<=this.selectionStart){const S=this.value.substring(f,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,S,-1)}if(f>=this.selectionEnd){const S=this.value.substring(this.selectionEnd,f);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,S,1)}const v=this.value.substring(this.selectionStart,f);if(v.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,v,1);const m=this.value.substring(f,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,m,-1)}_finishDeduceEditorPosition(f,v,m){let S=0,h=-1;for(;(h=v.indexOf(` `,h+1))!==-1;)S++;return[f,m*v.length,S]}static deduceInput(f,v,m){if(!f)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};e._debugComposition&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${f.toString()}`),console.log(`CURRENT STATE: ${v.toString()}`));const S=Math.min(t.commonPrefixLength(f.value,v.value),f.selectionStart,v.selectionStart),h=Math.min(t.commonSuffixLength(f.value,v.value),f.value.length-f.selectionEnd,v.value.length-v.selectionEnd),a=f.value.substring(S,f.value.length-h),r=v.value.substring(S,v.value.length-h),i=f.selectionStart-S,s=f.selectionEnd-S,o=v.selectionStart-S,u=v.selectionEnd-S;if(e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${a}>, selectionStart: ${i}, selectionEnd: ${s}`),console.log(`AFTER DIFFING CURRENT STATE: <${r}>, selectionStart: ${o}, selectionEnd: ${u}`)),o===u){const p=f.selectionStart-S;return e._debugComposition&&console.log(`REMOVE PREVIOUS: ${p} chars`),{text:r,replacePrevCharCnt:p,replaceNextCharCnt:0,positionDelta:0}}const d=s-i;return{text:r,replacePrevCharCnt:d,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(f,v){if(!f)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e._debugComposition&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${f.toString()}`),console.log(`CURRENT STATE: ${v.toString()}`)),f.value===v.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:v.selectionEnd-f.selectionEnd};const m=Math.min(t.commonPrefixLength(f.value,v.value),f.selectionEnd),S=Math.min(t.commonSuffixLength(f.value,v.value),f.value.length-f.selectionEnd),h=f.value.substring(m,f.value.length-S),a=v.value.substring(m,v.value.length-S),r=f.selectionStart-m,i=f.selectionEnd-m,s=v.selectionStart-m,o=v.selectionEnd-m;return e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${h}>, selectionStart: ${r}, selectionEnd: ${i}`),console.log(`AFTER DIFFING CURRENT STATE: <${a}>, selectionStart: ${s}, selectionEnd: ${o}`)),{text:a,replacePrevCharCnt:i,replaceNextCharCnt:h.length-i,positionDelta:o-a.length}}}e.TextAreaState=b;class D{static _getPageOfLine(f,v){return Math.floor((f-1)/v)}static _getRangeForPage(f,v){const m=f*v,S=m+1,h=m+v;return new y.Range(S,1,h+1,1)}static fromEditorSelection(f,v,m,S){const a=D._getPageOfLine(v.startLineNumber,m),r=D._getRangeForPage(a,m),i=D._getPageOfLine(v.endLineNumber,m),s=D._getRangeForPage(i,m);let o=r.intersectRanges(new y.Range(1,1,v.startLineNumber,v.startColumn));if(S&&f.getValueLengthInRange(o,1)>500){const g=f.modifyPosition(o.getEndPosition(),-500);o=y.Range.fromPositions(g,o.getEndPosition())}const u=f.getValueInRange(o,1),d=f.getLineCount(),p=f.getLineMaxColumn(d);let c=s.intersectRanges(new y.Range(v.endLineNumber,v.endColumn,d,p));if(S&&f.getValueLengthInRange(c,1)>500){const g=f.modifyPosition(c.getStartPosition(),500);c=y.Range.fromPositions(c.getStartPosition(),g)}const l=f.getValueInRange(c,1);let n;if(a===i||a+1===i)n=f.getValueInRange(v,1);else{const g=r.intersectRanges(v),w=s.intersectRanges(v);n=f.getValueInRange(g,1)+String.fromCharCode(8230)+f.getValueInRange(w,1)}return S&&n.length>2*500&&(n=n.substring(0,500)+String.fromCharCode(8230)+n.substring(n.length-500,n.length)),new b(u+n+l,u.length,u.length+n.length,v,o.endLineNumber-o.startLineNumber)}}e.PagedScreenReaderStrategy=D}),define(Q[1858],Y([1,0,20,31,15,83,33,51,27]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModel=e.OutlineGroup=e.OutlineElement=e.TreeElement=void 0;class m{remove(){this.parent?.children.delete(this.id)}static findId(i,s){let o;typeof i=="string"?o=`${s.id}/${i}`:(o=`${s.id}/${i.name}`,s.children.get(o)!==void 0&&(o=`${s.id}/${i.name}_${i.range.startLineNumber}_${i.range.startColumn}`));let u=o;for(let d=0;s.children.get(u)!==void 0;d++)u=`${o}_${d}`;return u}static getElementById(i,s){if(!i)return;const o=(0,T.commonPrefixLength)(i,s.id);if(o===i.length)return s;if(!(o<s.id.length))for(const[,u]of s.children){const d=m.getElementById(i,u);if(d)return d}}static size(i){let s=1;for(const[,o]of i.children)s+=m.size(o);return s}static empty(i){return i.children.size===0}}e.TreeElement=m;class S extends m{constructor(i,s,o){super(),this.id=i,this.parent=s,this.symbol=o,this.children=new Map}}e.OutlineElement=S;class h extends m{constructor(i,s,o,u){super(),this.id=i,this.parent=s,this.label=o,this.order=u,this.children=new Map}getItemEnclosingPosition(i){return i?this._getItemEnclosingPosition(i,this.children):void 0}_getItemEnclosingPosition(i,s){for(const[,o]of s)if(!(!o.symbol.range||!v.Range.containsPosition(o.symbol.range,i)))return this._getItemEnclosingPosition(i,o.children)||o}updateMarker(i){for(const[,s]of this.children)this._updateMarker(i,s)}_updateMarker(i,s){s.marker=void 0;const o=(0,t.binarySearch)(i,s.symbol.range,v.Range.compareRangesUsingStarts);let u;o<0?(u=~o,u>0&&v.Range.areIntersecting(i[u-1],s.symbol.range)&&(u-=1)):u=o;const d=[];let p;for(;u<i.length&&v.Range.areIntersecting(s.symbol.range,i[u]);u++){const c=i[u];d.push(c),i[u]=void 0,(!p||c.severity>p)&&(p=c.severity)}for(const[,c]of s.children)this._updateMarker(d,c);p&&(s.marker={count:d.length,topSev:p}),(0,t.coalesceInPlace)(i)}}e.OutlineGroup=h;class a extends m{static create(i,s,o){const u=new y.CancellationTokenSource(o),d=new a(s.uri),p=i.ordered(s),c=p.map((n,g)=>{const w=m.findId(`provider_${g}`,d),E=new h(w,d,n.displayName??"Unknown Outline Provider",g);return Promise.resolve(n.provideDocumentSymbols(s,u.token)).then(C=>{for(const I of C||[])a._makeOutlineElement(I,E);return E},C=>((0,b.onUnexpectedExternalError)(C),E)).then(C=>{m.empty(C)?C.remove():d._groups.set(w,C)})}),l=i.onDidChange(()=>{const n=i.ordered(s);(0,t.equals)(n,p)||u.cancel()});return Promise.all(c).then(()=>u.token.isCancellationRequested&&!o.isCancellationRequested?a.create(i,s,o):d._compact()).finally(()=>{l.dispose()})}static _makeOutlineElement(i,s){const o=m.findId(i,s),u=new S(o,s,i);if(i.children)for(const d of i.children)a._makeOutlineElement(d,u);s.children.set(u.id,u)}static get(i){for(;i;){if(i instanceof a)return i;i=i.parent}}constructor(i){super(),this.uri=i,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let i=0;for(const[s,o]of this._groups)o.children.size===0?this._groups.delete(s):i+=1;if(i!==1)this.children=this._groups;else{const s=D.Iterable.first(this._groups.values());for(const[,o]of s.children)o.parent=this,this.children.set(o.id,o)}return this}merge(i){return this.uri.toString()!==i.uri.toString()||this._groups.size!==i._groups.size?!1:(this._groups=i._groups,this.children=i.children,!0)}getItemEnclosingPosition(i,s){let o;if(s){let d=s.parent;for(;d&&!o;)d instanceof h&&(o=d),d=d.parent}let u;for(const[,d]of this._groups)if(u=d.getItemEnclosingPosition(i),u&&(!o||o===d))break;return u}getItemById(i){return m.getElementById(i,this)}updateMarker(i){i.sort(v.Range.compareRangesUsingStarts);for(const[,s]of this._groups)s.updateMarker(i.slice(0))}getTopLevelSymbols(){const i=[];for(const s of this.children.values())s instanceof S?i.push(s.symbol):i.push(...D.Iterable.map(s.children.values(),o=>o.symbol));return i.sort((s,o)=>v.Range.compareRangesUsingStarts(s.range,o.range))}asListOfDocumentSymbols(){const i=this.getTopLevelSymbols(),s=[];return a._flattenDocumentSymbols(s,i,""),s.sort((o,u)=>f.Position.compare(v.Range.getStartPosition(o.range),v.Range.getStartPosition(u.range))||f.Position.compare(v.Range.getEndPosition(u.range),v.Range.getEndPosition(o.range)))}static _flattenDocumentSymbols(i,s,o){for(const u of s)i.push({kind:u.kind,tags:u.tags,name:u.name,detail:u.detail,containerName:u.containerName||o,range:u.range,selectionRange:u.selectionRange,children:void 0}),u.children&&a._flattenDocumentSymbols(i,u.children,u.name)}}e.OutlineModel=a}),define(Q[165],Y([1,0,27]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditOperation=void 0;class y{static insert(D,T){return{range:new t.Range(D.lineNumber,D.column,D.lineNumber,D.column),text:T,forceMoveMarkers:!0}}static delete(D){return{range:D,text:null}}static replace(D,T){return{range:D,text:T}}static replaceMove(D,T){return{range:D,text:T,forceMoveMarkers:!0}}}e.EditOperation=y}),define(Q[1069],Y([1,0,33,165,27]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trimTrailingWhitespace=e.TrimTrailingWhitespaceCommand=void 0;class D{constructor(v,m){this._selection=v,this._cursors=m,this._selectionId=null}getEditOperations(v,m){const S=T(v,this._cursors);for(let h=0,a=S.length;h<a;h++){const r=S[h];m.addEditOperation(r.range,r.text)}this._selectionId=m.trackSelection(this._selection)}computeCursorState(v,m){return m.getTrackedSelection(this._selectionId)}}e.TrimTrailingWhitespaceCommand=D;function T(f,v){v.sort((r,i)=>r.lineNumber===i.lineNumber?r.column-i.column:r.lineNumber-i.lineNumber);for(let r=v.length-2;r>=0;r--)v[r].lineNumber===v[r+1].lineNumber&&v.splice(r,1);const m=[];let S=0,h=0;const a=v.length;for(let r=1,i=f.getLineCount();r<=i;r++){const s=f.getLineContent(r),o=s.length+1;let u=0;if(h<a&&v[h].lineNumber===r&&(u=v[h].column,h++,u===o)||s.length===0)continue;const d=t.lastNonWhitespaceIndex(s);let p=0;if(d===-1)p=1;else if(d!==s.length-1)p=d+2;else continue;p=Math.max(u,p),m[S++]=y.EditOperation.delete(new b.Range(r,p,r,o))}return m}e.trimTrailingWhitespace=T}),define(Q[238],Y([1,0,15,366,27]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineRange=void 0;class D{static fromRange(f){return new D(f.startLineNumber,f.endLineNumber)}static subtract(f,v){return v?f.startLineNumber<v.startLineNumber&&v.endLineNumberExclusive<f.endLineNumberExclusive?[new D(f.startLineNumber,v.startLineNumber),new D(v.endLineNumberExclusive,f.endLineNumberExclusive)]:v.startLineNumber<=f.startLineNumber&&f.endLineNumberExclusive<=v.endLineNumberExclusive?[]:v.endLineNumberExclusive<f.endLineNumberExclusive?[new D(Math.max(v.endLineNumberExclusive,f.startLineNumber),f.endLineNumberExclusive)]:[new D(f.startLineNumber,Math.min(v.startLineNumber,f.endLineNumberExclusive))]:[f]}static joinMany(f){if(f.length===0)return[];let v=f[0];for(let m=1;m<f.length;m++)v=this.join(v,f[m]);return v}static join(f,v){if(f.length===0)return v;if(v.length===0)return f;const m=[];let S=0,h=0,a=null;for(;S<f.length||h<v.length;){let r=null;if(S<f.length&&h<v.length){const i=f[S],s=v[h];i.startLineNumber<s.startLineNumber?(r=i,S++):(r=s,h++)}else S<f.length?(r=f[S],S++):(r=v[h],h++);a===null?a=r:a.endLineNumberExclusive>=r.startLineNumber?a=new D(a.startLineNumber,Math.max(a.endLineNumberExclusive,r.endLineNumberExclusive)):(m.push(a),a=r)}return a!==null&&m.push(a),m}static ofLength(f,v){return new D(f,f+v)}static deserialize(f){return new D(f[0],f[1])}constructor(f,v){if(f>v)throw new t.BugIndicatingError(`startLineNumber ${f} cannot be after endLineNumberExclusive ${v}`);this.startLineNumber=f,this.endLineNumberExclusive=v}contains(f){return this.startLineNumber<=f&&f<this.endLineNumberExclusive}get isEmpty(){return this.startLineNumber===this.endLineNumberExclusive}delta(f){return new D(this.startLineNumber+f,this.endLineNumberExclusive+f)}deltaLength(f){return new D(this.startLineNumber,this.endLineNumberExclusive+f)}get length(){return this.endLineNumberExclusive-this.startLineNumber}join(f){return new D(Math.min(this.startLineNumber,f.startLineNumber),Math.max(this.endLineNumberExclusive,f.endLineNumberExclusive))}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}intersect(f){const v=Math.max(this.startLineNumber,f.startLineNumber),m=Math.min(this.endLineNumberExclusive,f.endLineNumberExclusive);if(v<=m)return new D(v,m)}intersectsStrict(f){return this.startLineNumber<f.endLineNumberExclusive&&f.startLineNumber<this.endLineNumberExclusive}overlapOrTouch(f){return this.startLineNumber<=f.endLineNumberExclusive&&f.startLineNumber<=this.endLineNumberExclusive}equals(f){return this.startLineNumber===f.startLineNumber&&this.endLineNumberExclusive===f.endLineNumberExclusive}toInclusiveRange(){return this.isEmpty?null:new b.Range(this.startLineNumber,1,this.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER)}toExclusiveRange(){return new b.Range(this.startLineNumber,1,this.endLineNumberExclusive,1)}mapToLineArray(f){const v=[];for(let m=this.startLineNumber;m<this.endLineNumberExclusive;m++)v.push(f(m));return v}forEach(f){for(let v=this.startLineNumber;v<this.endLineNumberExclusive;v++)f(v)}serialize(){return[this.startLineNumber,this.endLineNumberExclusive]}includes(f){return this.startLineNumber<=f&&f<this.endLineNumberExclusive}toOffsetRange(){return new y.OffsetRange(this.startLineNumber-1,this.endLineNumberExclusive-1)}}e.LineRange=D}),define(Q[1070],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA8=void 0;class t{static{this.Empty=new t(0,0,0,0)}constructor(b,D,T,f){this._rgba8Brand=void 0,this.r=t._clamp(b),this.g=t._clamp(D),this.b=t._clamp(T),this.a=t._clamp(f)}equals(b){return this.r===b.r&&this.g===b.g&&this.b===b.b&&this.a===b.a}static _clamp(b){return b<0?0:b>255?255:b|0}}e.RGBA8=t}),define(Q[96],Y([1,0,51,27]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=e.SelectionDirection=void 0;var b;(function(T){T[T.LTR=0]="LTR",T[T.RTL=1]="RTL"})(b||(e.SelectionDirection=b={}));class D extends y.Range{constructor(f,v,m,S){super(f,v,m,S),this.selectionStartLineNumber=f,this.selectionStartColumn=v,this.positionLineNumber=m,this.positionColumn=S}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(f){return D.selectionsEqual(this,f)}static selectionsEqual(f,v){return f.selectionStartLineNumber===v.selectionStartLineNumber&&f.selectionStartColumn===v.selectionStartColumn&&f.positionLineNumber===v.positionLineNumber&&f.positionColumn===v.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(f,v){return this.getDirection()===0?new D(this.startLineNumber,this.startColumn,f,v):new D(f,v,this.startLineNumber,this.startColumn)}getPosition(){return new t.Position(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new t.Position(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(f,v){return this.getDirection()===0?new D(f,v,this.endLineNumber,this.endColumn):new D(this.endLineNumber,this.endColumn,f,v)}static fromPositions(f,v=f){return new D(f.lineNumber,f.column,v.lineNumber,v.column)}static fromRange(f,v){return v===0?new D(f.startLineNumber,f.startColumn,f.endLineNumber,f.endColumn):new D(f.endLineNumber,f.endColumn,f.startLineNumber,f.startColumn)}static liftSelection(f){return new D(f.selectionStartLineNumber,f.selectionStartColumn,f.positionLineNumber,f.positionColumn)}static selectionsArrEqual(f,v){if(f&&!v||!f&&v)return!1;if(!f&&!v)return!0;if(f.length!==v.length)return!1;for(let m=0,S=f.length;m<S;m++)if(!this.selectionsEqual(f[m],v[m]))return!1;return!0}static isISelection(f){return f&&typeof f.selectionStartLineNumber=="number"&&typeof f.selectionStartColumn=="number"&&typeof f.positionLineNumber=="number"&&typeof f.positionColumn=="number"}static createWithDirection(f,v,m,S,h){return h===0?new D(f,v,m,S):new D(m,S,f,v)}}e.Selection=D}),define(Q[487],Y([1,0,96]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceCommandThatPreservesSelection=e.ReplaceCommandWithOffsetCursorState=e.ReplaceCommandWithoutChangingPosition=e.ReplaceCommandThatSelectsText=e.ReplaceCommand=void 0;class y{constructor(m,S,h=!1){this._range=m,this._text=S,this.insertsAutoWhitespace=h}getEditOperations(m,S){S.addTrackedEditOperation(this._range,this._text)}computeCursorState(m,S){const a=S.getInverseEditOperations()[0].range;return t.Selection.fromPositions(a.getEndPosition())}}e.ReplaceCommand=y;class b{constructor(m,S){this._range=m,this._text=S}getEditOperations(m,S){S.addTrackedEditOperation(this._range,this._text)}computeCursorState(m,S){const a=S.getInverseEditOperations()[0].range;return t.Selection.fromRange(a,0)}}e.ReplaceCommandThatSelectsText=b;class D{constructor(m,S,h=!1){this._range=m,this._text=S,this.insertsAutoWhitespace=h}getEditOperations(m,S){S.addTrackedEditOperation(this._range,this._text)}computeCursorState(m,S){const a=S.getInverseEditOperations()[0].range;return t.Selection.fromPositions(a.getStartPosition())}}e.ReplaceCommandWithoutChangingPosition=D;class T{constructor(m,S,h,a,r=!1){this._range=m,this._text=S,this._columnDeltaOffset=a,this._lineNumberDeltaOffset=h,this.insertsAutoWhitespace=r}getEditOperations(m,S){S.addTrackedEditOperation(this._range,this._text)}computeCursorState(m,S){const a=S.getInverseEditOperations()[0].range;return t.Selection.fromPositions(a.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}e.ReplaceCommandWithOffsetCursorState=T;class f{constructor(m,S,h,a=!1){this._range=m,this._text=S,this._initialSelection=h,this._forceMoveMarkers=a,this._selectionId=null}getEditOperations(m,S){S.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=S.trackSelection(this._initialSelection)}computeCursorState(m,S){return S.getTrackedSelection(this._selectionId)}}e.ReplaceCommandThatPreservesSelection=f}),define(Q[1859],Y([1,0,27,96]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionSurroundSelectionCommand=e.SurroundSelectionCommand=void 0;class b{constructor(f,v,m){this._range=f,this._charBeforeSelection=v,this._charAfterSelection=m}getEditOperations(f,v){v.addTrackedEditOperation(new t.Range(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),v.addTrackedEditOperation(new t.Range(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(f,v){const m=v.getInverseEditOperations(),S=m[0].range,h=m[1].range;return new y.Selection(S.endLineNumber,S.endColumn,h.endLineNumber,h.endColumn-this._charAfterSelection.length)}}e.SurroundSelectionCommand=b;class D{constructor(f,v,m){this._position=f,this._text=v,this._charAfter=m}getEditOperations(f,v){v.addTrackedEditOperation(new t.Range(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(f,v){const S=v.getInverseEditOperations()[0].range;return new y.Selection(S.endLineNumber,S.startColumn,S.endLineNumber,S.endColumn-this._charAfter.length)}}e.CompositionSurroundSelectionCommand=D}),define(Q[660],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EDITOR_MODEL_DEFAULTS=void 0,e.EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}}),define(Q[563],Y([1,0,486]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMapForWordSeparators=e.WordCharacterClassifier=e.WordCharacterClass=void 0;var y;(function(T){T[T.Regular=0]="Regular",T[T.Whitespace=1]="Whitespace",T[T.WordSeparator=2]="WordSeparator"})(y||(e.WordCharacterClass=y={}));class b extends t.CharacterClassifier{constructor(f){super(0);for(let v=0,m=f.length;v<m;v++)this.set(f.charCodeAt(v),2);this.set(32,1),this.set(9,1)}}e.WordCharacterClassifier=b;function D(T){const f={};return v=>(f.hasOwnProperty(v)||(f[v]=T(v)),f[v])}e.getMapForWordSeparators=D(T=>new b(T))}),define(Q[367],Y([1,0,83,4,204]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWordAtText=e.setDefaultGetWordAtTextConfig=e.ensureValidWordDefinition=e.DEFAULT_WORD_REGEXP=e.USUAL_WORD_SEPARATORS=void 0,e.USUAL_WORD_SEPARATORS="`~!#$%^&*()-=+[{]}\\|;:'\",.<>/?";function D(h=""){let a="(-?\\d*\\.\\d\\w*)|([^";for(const r of e.USUAL_WORD_SEPARATORS)h.indexOf(r)>=0||(a+="\\"+r);return a+="\\s]+)",new RegExp(a,"g")}e.DEFAULT_WORD_REGEXP=D();function T(h){let a=e.DEFAULT_WORD_REGEXP;if(h&&h instanceof RegExp)if(h.global)a=h;else{let r="g";h.ignoreCase&&(r+="i"),h.multiline&&(r+="m"),h.unicode&&(r+="u"),a=new RegExp(h.source,r)}return a.lastIndex=0,a}e.ensureValidWordDefinition=T;const f=new b.LinkedList;f.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function v(h){const a=f.unshift(h);return(0,y.toDisposable)(a)}e.setDefaultGetWordAtTextConfig=v;function m(h,a,r,i,s){if(s||(s=t.Iterable.first(f)),r.length>s.maxLen){let c=h-s.maxLen/2;return c<0?c=0:i+=c,r=r.substring(c,h+s.maxLen/2),m(h,a,r,i,s)}const o=Date.now(),u=h-1-i;let d=-1,p=null;for(let c=1;!(Date.now()-o>=s.timeBudget);c++){const l=u-s.windowSize*c;a.lastIndex=Math.max(0,l);const n=S(a,r,u,d);if(!n&&p||(p=n,l<=0))break;d=l}if(p){const c={word:p[0],startColumn:i+1+p.index,endColumn:i+1+p.index+p[0].length};return a.lastIndex=0,c}return null}e.getWordAtText=m;function S(h,a,r,i){let s;for(;s=h.exec(a);){const o=s.index||0;if(o<=r&&h.lastIndex>=r)return s;if(i>0&&o>i)return null}return null}}),define(Q[1071],Y([1,0,323]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AtomicTabMoveOperations=e.Direction=void 0;var y;(function(D){D[D.Left=0]="Left",D[D.Right=1]="Right",D[D.Nearest=2]="Nearest"})(y||(e.Direction=y={}));class b{static whitespaceVisibleColumn(T,f,v){const m=T.length;let S=0,h=-1,a=-1;for(let r=0;r<m;r++){if(r===f)return[h,a,S];switch(S%v===0&&(h=r,a=S),T.charCodeAt(r)){case 32:S+=1;break;case 9:S=t.CursorColumns.nextRenderTabStop(S,v);break;default:return[-1,-1,-1]}}return f===m?[h,a,S]:[-1,-1,-1]}static atomicPosition(T,f,v,m){const S=T.length,[h,a,r]=b.whitespaceVisibleColumn(T,f,v);if(r===-1)return-1;let i;switch(m){case 0:i=!0;break;case 1:i=!1;break;case 2:if(r%v===0)return f;i=r%v<=v/2;break}if(i){if(h===-1)return-1;let u=a;for(let d=h;d<S;++d){if(u===a+v)return h;switch(T.charCodeAt(d)){case 32:u+=1;break;case 9:u=t.CursorColumns.nextRenderTabStop(u,v);break;default:return-1}}return u===a+v?h:-1}const s=t.CursorColumns.nextRenderTabStop(r,v);let o=r;for(let u=f;u<S;u++){if(o===s)return u;switch(T.charCodeAt(u)){case 32:o+=1;break;case 9:o=t.CursorColumns.nextRenderTabStop(o,v);break;default:return-1}}return o===s?S:-1}}e.AtomicTabMoveOperations=b}),define(Q[1860],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorContext=void 0;class t{constructor(b,D,T,f){this._cursorContextBrand=void 0,this.model=b,this.viewModel=D,this.coordinatesConverter=T,this.cursorConfig=f}}e.CursorContext=t}),define(Q[661],Y([1,0,15,366]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DateTimeout=e.InfiniteTimeout=e.SequenceDiff=e.DiffAlgorithmResult=void 0;class b{static trivial(m,S){return new b([new D(new y.OffsetRange(0,m.length),new y.OffsetRange(0,S.length))],!1)}static trivialTimedOut(m,S){return new b([new D(new y.OffsetRange(0,m.length),new y.OffsetRange(0,S.length))],!0)}constructor(m,S){this.diffs=m,this.hitTimeout=S}}e.DiffAlgorithmResult=b;class D{constructor(m,S){this.seq1Range=m,this.seq2Range=S}reverse(){return new D(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(m){return new D(this.seq1Range.join(m.seq1Range),this.seq2Range.join(m.seq2Range))}delta(m){return m===0?this:new D(this.seq1Range.delta(m),this.seq2Range.delta(m))}}e.SequenceDiff=D;class T{static{this.instance=new T}isValid(){return!0}}e.InfiniteTimeout=T;class f{constructor(m){if(this.timeout=m,this.startTime=Date.now(),this.valid=!0,m<=0)throw new t.BugIndicatingError("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime<this.timeout)&&this.valid){this.valid=!1;debugger}return this.valid}disable(){this.timeout=Number.MAX_SAFE_INTEGER,this.isValid=()=>!0,this.valid=!0}}e.DateTimeout=f}),define(Q[1861],Y([1,0,366,661]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shiftSequenceDiffs=e.joinSequenceDiffs=e.removeRandomMatches=e.removeRandomLineMatches=e.smoothenSequenceDiffs=e.optimizeSequenceDiffs=void 0;function b(h,a,r){let i=r;return i=v(h,a,i),i=m(h,a,i),i}e.optimizeSequenceDiffs=b;function D(h,a,r){const i=[];for(const s of r){const o=i[i.length-1];if(!o){i.push(s);continue}s.seq1Range.start-o.seq1Range.endExclusive<=2||s.seq2Range.start-o.seq2Range.endExclusive<=2?i[i.length-1]=new y.SequenceDiff(o.seq1Range.join(s.seq1Range),o.seq2Range.join(s.seq2Range)):i.push(s)}return i}e.smoothenSequenceDiffs=D;function T(h,a,r){let i=r;if(i.length===0)return i;let s=0,o;do{o=!1;const u=[i[0]];for(let d=1;d<i.length;d++){let l=function(g,w){const E=new t.OffsetRange(c.seq1Range.endExclusive,p.seq1Range.start);return h.getText(E).replace(/\s/g,"").length<=4&&(g.seq1Range.length+g.seq2Range.length>5||w.seq1Range.length+w.seq2Range.length>5)};const p=i[d],c=u[u.length-1];l(c,p)?(o=!0,u[u.length-1]=u[u.length-1].join(p)):u.push(p)}i=u}while(s++<10&&o);return i}e.removeRandomLineMatches=T;function f(h,a,r){let i=r;if(i.length===0)return i;let s=0,o;do{o=!1;const u=[i[0]];for(let d=1;d<i.length;d++){let l=function(g,w){const E=new t.OffsetRange(c.seq1Range.endExclusive,p.seq1Range.start);if(h.countLinesIn(E)>5||E.length>500)return!1;const I=h.getText(E).trim();if(I.length>20||I.split(/\r\n|\r|\n/).length>1)return!1;const _=h.countLinesIn(g.seq1Range),A=g.seq1Range.length,k=a.countLinesIn(g.seq2Range),L=g.seq2Range.length,R=h.countLinesIn(w.seq1Range),M=w.seq1Range.length,N=a.countLinesIn(w.seq2Range),P=w.seq2Range.length,x=2*40+50;function F(V){return Math.min(V,x)}return Math.pow(Math.pow(F(_*40+A),1.5)+Math.pow(F(k*40+L),1.5),1.5)+Math.pow(Math.pow(F(R*40+M),1.5)+Math.pow(F(N*40+P),1.5),1.5)>(x**1.5)**1.5*1.3};const p=i[d],c=u[u.length-1];l(c,p)?(o=!0,u[u.length-1]=u[u.length-1].join(p)):u.push(p)}i=u}while(s++<10&&o);for(let u=0;u<i.length;u++){const d=i[u];let p=d.seq1Range,c=d.seq2Range;const l=h.extendToFullLines(d.seq1Range),n=h.getText(new t.OffsetRange(l.start,d.seq1Range.start));n.length>0&&n.trim().length<=3&&d.seq1Range.length+d.seq2Range.length>100&&(p=d.seq1Range.deltaStart(-n.length),c=d.seq2Range.deltaStart(-n.length));const g=h.getText(new t.OffsetRange(d.seq1Range.endExclusive,l.endExclusive));g.length>0&&g.trim().length<=3&&d.seq1Range.length+d.seq2Range.length>150&&(p=p.deltaEnd(g.length),c=c.deltaEnd(g.length)),i[u]=new y.SequenceDiff(p,c)}return i}e.removeRandomMatches=f;function v(h,a,r){if(r.length===0)return r;const i=[];i.push(r[0]);for(let o=1;o<r.length;o++){const u=i[i.length-1];let d=r[o];if(d.seq1Range.isEmpty||d.seq2Range.isEmpty){const p=d.seq1Range.start-u.seq1Range.endExclusive;let c;for(c=1;c<=p&&!(h.getElement(d.seq1Range.start-c)!==h.getElement(d.seq1Range.endExclusive-c)||a.getElement(d.seq2Range.start-c)!==a.getElement(d.seq2Range.endExclusive-c));c++);if(c--,c===p){i[i.length-1]=new y.SequenceDiff(new t.OffsetRange(u.seq1Range.start,d.seq1Range.endExclusive-p),new t.OffsetRange(u.seq2Range.start,d.seq2Range.endExclusive-p));continue}d=d.delta(-c)}i.push(d)}const s=[];for(let o=0;o<i.length-1;o++){const u=i[o+1];let d=i[o];if(d.seq1Range.isEmpty||d.seq2Range.isEmpty){const p=u.seq1Range.start-d.seq1Range.endExclusive;let c;for(c=0;c<p&&!(h.getElement(d.seq1Range.start+c)!==h.getElement(d.seq1Range.endExclusive+c)||a.getElement(d.seq2Range.start+c)!==a.getElement(d.seq2Range.endExclusive+c));c++);if(c===p){i[o+1]=new y.SequenceDiff(new t.OffsetRange(d.seq1Range.start+p,u.seq1Range.endExclusive),new t.OffsetRange(d.seq2Range.start+p,u.seq2Range.endExclusive));continue}c>0&&(d=d.delta(c))}s.push(d)}return i.length>0&&s.push(i[i.length-1]),s}e.joinSequenceDiffs=v;function m(h,a,r){if(!h.getBoundaryScore||!a.getBoundaryScore)return r;for(let i=0;i<r.length;i++){const s=i>0?r[i-1]:void 0,o=r[i],u=i+1<r.length?r[i+1]:void 0,d=new t.OffsetRange(s?s.seq1Range.start+1:0,u?u.seq1Range.endExclusive-1:h.length),p=new t.OffsetRange(s?s.seq2Range.start+1:0,u?u.seq2Range.endExclusive-1:a.length);o.seq1Range.isEmpty?r[i]=S(o,h,a,d,p):o.seq2Range.isEmpty&&(r[i]=S(o.reverse(),a,h,p,d).reverse())}return r}e.shiftSequenceDiffs=m;function S(h,a,r,i,s){let u=1;for(;h.seq1Range.start-u>=i.start&&h.seq2Range.start-u>=s.start&&r.isStronglyEqual(h.seq2Range.start-u,h.seq2Range.endExclusive-u)&&u<100;)u++;u--;let d=0;for(;h.seq1Range.start+d<i.endExclusive&&h.seq2Range.endExclusive+d<s.endExclusive&&r.isStronglyEqual(h.seq2Range.start+d,h.seq2Range.endExclusive+d)&&d<100;)d++;if(u===0&&d===0)return h;let p=0,c=-1;for(let l=-u;l<=d;l++){const n=h.seq2Range.start+l,g=h.seq2Range.endExclusive+l,w=h.seq1Range.start+l,E=a.getBoundaryScore(w)+r.getBoundaryScore(n)+r.getBoundaryScore(g);E>c&&(c=E,p=l)}return h.delta(p)}}),define(Q[1862],Y([1,0,366,661]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MyersDiffAlgorithm=void 0;class b{compute(m,S,h=y.InfiniteTimeout.instance){if(m.length===0||S.length===0)return y.DiffAlgorithmResult.trivial(m,S);function a(l,n){for(;l<m.length&&n<S.length&&m.getElement(l)===S.getElement(n);)l++,n++;return l}let r=0;const i=new T;i.set(0,a(0,0));const s=new f;s.set(0,i.get(0)===0?null:new D(null,0,0,i.get(0)));let o=0;e:for(;;){if(r++,!h.isValid())return y.DiffAlgorithmResult.trivialTimedOut(m,S);const l=-Math.min(r,S.length+r%2),n=Math.min(r,m.length+r%2);for(o=l;o<=n;o+=2){const g=o===n?-1:i.get(o+1),w=o===l?-1:i.get(o-1)+1,E=Math.min(Math.max(g,w),m.length),C=E-o;if(E>m.length||C>S.length)continue;const I=a(E,C);i.set(o,I);const _=E===g?s.get(o+1):s.get(o-1);if(s.set(o,I!==E?new D(_,E,C,I-E):_),i.get(o)===m.length&&i.get(o)-o===S.length)break e}}let u=s.get(o);const d=[];let p=m.length,c=S.length;for(;;){const l=u?u.x+u.length:0,n=u?u.y+u.length:0;if((l!==p||n!==c)&&d.push(new y.SequenceDiff(new t.OffsetRange(l,p),new t.OffsetRange(n,c))),!u)break;p=u.x,c=u.y,u=u.prev}return d.reverse(),new y.DiffAlgorithmResult(d,!1)}}e.MyersDiffAlgorithm=b;class D{constructor(m,S,h,a){this.prev=m,this.x=S,this.y=h,this.length=a}}class T{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(m){return m<0?(m=-m-1,this.negativeArr[m]):this.positiveArr[m]}set(m,S){if(m<0){if(m=-m-1,m>=this.negativeArr.length){const h=this.negativeArr;this.negativeArr=new Int32Array(h.length*2),this.negativeArr.set(h)}this.negativeArr[m]=S}else{if(m>=this.positiveArr.length){const h=this.positiveArr;this.positiveArr=new Int32Array(h.length*2),this.positiveArr.set(h)}this.positiveArr[m]=S}}}class f{constructor(){this.positiveArr=[],this.negativeArr=[]}get(m){return m<0?(m=-m-1,this.negativeArr[m]):this.positiveArr[m]}set(m,S){m<0?(m=-m-1,this.negativeArr[m]=S):this.positiveArr[m]=S}}}),define(Q[1863],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Array2D=void 0;class t{constructor(b,D){this.width=b,this.height=D,this.array=[],this.array=new Array(b*D)}get(b,D){return this.array[b+D*this.width]}set(b,D,T){this.array[b+D*this.width]=T}}e.Array2D=t}),define(Q[1864],Y([1,0,366,661,1863]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicProgrammingDiffing=void 0;class D{compute(f,v,m=y.InfiniteTimeout.instance,S){if(f.length===0||v.length===0)return y.DiffAlgorithmResult.trivial(f,v);const h=new b.Array2D(f.length,v.length),a=new b.Array2D(f.length,v.length),r=new b.Array2D(f.length,v.length);for(let c=0;c<f.length;c++)for(let l=0;l<v.length;l++){if(!m.isValid())return y.DiffAlgorithmResult.trivialTimedOut(f,v);const n=c===0?0:h.get(c-1,l),g=l===0?0:h.get(c,l-1);let w;f.getElement(c)===v.getElement(l)?(c===0||l===0?w=0:w=h.get(c-1,l-1),c>0&&l>0&&a.get(c-1,l-1)===3&&(w+=r.get(c-1,l-1)),w+=S?S(c,l):1):w=-1;const E=Math.max(n,g,w);if(E===w){const C=c>0&&l>0?r.get(c-1,l-1):0;r.set(c,l,C+1),a.set(c,l,3)}else E===n?(r.set(c,l,0),a.set(c,l,1)):E===g&&(r.set(c,l,0),a.set(c,l,2));h.set(c,l,E)}const i=[];let s=f.length,o=v.length;function u(c,l){(c+1!==s||l+1!==o)&&i.push(new y.SequenceDiff(new t.OffsetRange(c+1,s),new t.OffsetRange(l+1,o))),s=c,o=l}let d=f.length-1,p=v.length-1;for(;d>=0&&p>=0;)a.get(d,p)===3?(u(d,p),d--,p--):a.get(d,p)===1?d--:p--;return u(-1,-1),i.reverse(),new y.DiffAlgorithmResult(i,!1)}}e.DynamicProgrammingDiffing=D}),define(Q[438],Y([1,0,238]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MovedText=e.SimpleLineRangeMapping=e.RangeMapping=e.LineRangeMapping=e.LinesDiff=void 0;class y{constructor(m,S,h){this.changes=m,this.moves=S,this.hitTimeout=h}}e.LinesDiff=y;class b{static inverse(m,S,h){const a=[];let r=1,i=1;for(const o of m){const u=new b(new t.LineRange(r,o.originalRange.startLineNumber),new t.LineRange(i,o.modifiedRange.startLineNumber),void 0);u.modifiedRange.isEmpty||a.push(u),r=o.originalRange.endLineNumberExclusive,i=o.modifiedRange.endLineNumberExclusive}const s=new b(new t.LineRange(r,S+1),new t.LineRange(i,h+1),void 0);return s.modifiedRange.isEmpty||a.push(s),a}constructor(m,S,h){this.originalRange=m,this.modifiedRange=S,this.innerChanges=h}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}get changedLineCount(){return Math.max(this.originalRange.length,this.modifiedRange.length)}flip(){return new b(this.modifiedRange,this.originalRange,this.innerChanges?.map(m=>m.flip()))}}e.LineRangeMapping=b;class D{constructor(m,S){this.originalRange=m,this.modifiedRange=S}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new D(this.modifiedRange,this.originalRange)}}e.RangeMapping=D;class T{constructor(m,S){this.original=m,this.modified=S}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new T(this.modified,this.original)}join(m){return new T(this.original.join(m.original),this.modified.join(m.modified))}}e.SimpleLineRangeMapping=T;class f{constructor(m,S){this.lineRangeMapping=m,this.changes=S}flip(){return new f(this.lineRangeMapping.flip(),this.changes.map(m=>m.flip()))}}e.MovedText=f}),define(Q[1072],Y([1,0,20,214,141,15,238,366,51,27,661,1864,1861,1862,438]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findFirstMonotonous=e.findLastMonotonous=e.LinesSliceCharSequence=e.LineSequence=e.getLineRangeMapping=e.lineRangeMappingFromRangeMappings=e.AdvancedLinesDiffComputer=void 0;class s{constructor(){this.dynamicProgrammingDiffing=new h.DynamicProgrammingDiffing,this.myersDiffingAlgorithm=new r.MyersDiffAlgorithm}computeDiff(K,H,U){if(K.length<=1&&(0,t.equals)(K,H,(de,ge)=>de===ge))return new i.LinesDiff([],[],!1);if(K.length===1&&K[0].length===0||H.length===1&&H[0].length===0)return new i.LinesDiff([new i.LineRangeMapping(new T.LineRange(1,K.length+1),new T.LineRange(1,H.length+1),[new i.RangeMapping(new m.Range(1,1,K.length,K[0].length+1),new m.Range(1,1,H.length,H[0].length+1))])],[],!1);const G=U.maxComputationTimeMs===0?S.InfiniteTimeout.instance:new S.DateTimeout(U.maxComputationTimeMs),$=!U.ignoreTrimWhitespace,ie=new Map;function J(de){let ge=ie.get(de);return ge===void 0&&(ge=ie.size,ie.set(de,ge)),ge}const j=K.map(de=>J(de.trim())),ee=H.map(de=>J(de.trim())),X=new E(j,K),te=new E(ee,H),Z=(()=>X.length+te.length<1700?this.dynamicProgrammingDiffing.compute(X,te,G,(de,ge)=>K[de]===H[ge]?H[ge].length===0?.1:1+Math.log(1+H[ge].length):.99):this.myersDiffingAlgorithm.compute(X,te))();let se=Z.diffs,re=Z.hitTimeout;se=(0,a.optimizeSequenceDiffs)(X,te,se),se=(0,a.removeRandomLineMatches)(X,te,se);const oe=[],le=de=>{if($)for(let ge=0;ge<de;ge++){const he=ne+ge,be=ce+ge;if(K[he]!==H[be]){const ve=this.refineDiff(K,H,new S.SequenceDiff(new f.OffsetRange(he,he+1),new f.OffsetRange(be,be+1)),G,$);for(const Ie of ve.mappings)oe.push(Ie);ve.hitTimeout&&(re=!0)}}};let ne=0,ce=0;for(const de of se){(0,y.assertFn)(()=>de.seq1Range.start-ne===de.seq2Range.start-ce);const ge=de.seq1Range.start-ne;le(ge),ne=de.seq1Range.endExclusive,ce=de.seq2Range.endExclusive;const he=this.refineDiff(K,H,de,G,$);he.hitTimeout&&(re=!0);for(const be of he.mappings)oe.push(be)}le(K.length-ne);const ae=n(oe,K,H);let ue=[];return U.computeMoves&&(ue=this.computeMoves(ae,K,H,j,ee,G,$)),(0,y.assertFn)(()=>{function de(he,be){if(he.lineNumber<1||he.lineNumber>be.length)return!1;const ve=be[he.lineNumber-1];return!(he.column<1||he.column>ve.length+1)}function ge(he,be){return!(he.startLineNumber<1||he.startLineNumber>be.length+1||he.endLineNumberExclusive<1||he.endLineNumberExclusive>be.length+1)}for(const he of ae){if(!he.innerChanges)return!1;for(const be of he.innerChanges)if(!(de(be.modifiedRange.getStartPosition(),H)&&de(be.modifiedRange.getEndPosition(),H)&&de(be.originalRange.getStartPosition(),K)&&de(be.originalRange.getEndPosition(),K)))return!1;if(!ge(he.modifiedRange,H)||!ge(he.originalRange,K))return!1}return!0}),new i.LinesDiff(ae,ue,re)}computeMoves(K,H,U,G,$,ie,J){const j=[],ee=K.filter(ae=>ae.modifiedRange.isEmpty&&ae.originalRange.length>=3).map(ae=>new z(ae.originalRange,H,ae)),X=new Set(K.filter(ae=>ae.originalRange.isEmpty&&ae.modifiedRange.length>=3).map(ae=>new z(ae.modifiedRange,U,ae))),te=new Set;for(const ae of ee){let ue=-1,de;for(const ge of X){const he=ae.computeSimilarity(ge);he>ue&&(ue=he,de=ge)}if(ue>.9&&de&&(X.delete(de),j.push(new i.SimpleLineRangeMapping(ae.range,de.range)),te.add(ae.source),te.add(de.source)),!ie.isValid())return[]}const Z=new b.SetMap;for(const ae of K)if(!te.has(ae))for(let ue=ae.originalRange.startLineNumber;ue<ae.originalRange.endLineNumberExclusive-2;ue++){const de=`${G[ue-1]}:${G[ue+1-1]}:${G[ue+2-1]}`;Z.add(de,{range:new T.LineRange(ue,ue+3)})}const se=[];K.sort((0,t.compareBy)(ae=>ae.modifiedRange.startLineNumber,t.numberComparator));for(const ae of K){if(te.has(ae))continue;let ue=[];for(let de=ae.modifiedRange.startLineNumber;de<ae.modifiedRange.endLineNumberExclusive-2;de++){const ge=`${$[de-1]}:${$[de+1-1]}:${$[de+2-1]}`,he=new T.LineRange(de,de+3),be=[];Z.forEach(ge,({range:ve})=>{for(const Se of ue)if(Se.originalLineRange.endLineNumberExclusive+1===ve.endLineNumberExclusive&&Se.modifiedLineRange.endLineNumberExclusive+1===he.endLineNumberExclusive){Se.originalLineRange=new T.LineRange(Se.originalLineRange.startLineNumber,ve.endLineNumberExclusive),Se.modifiedLineRange=new T.LineRange(Se.modifiedLineRange.startLineNumber,he.endLineNumberExclusive),be.push(Se);return}const Ie={modifiedLineRange:he,originalLineRange:ve};se.push(Ie),be.push(Ie)}),ue=be}if(!ie.isValid())return[]}se.sort((0,t.reverseOrder)((0,t.compareBy)(ae=>ae.modifiedLineRange.length,t.numberComparator)));const re=new d,oe=new d;for(const ae of se){const ue=ae.modifiedLineRange.startLineNumber-ae.originalLineRange.startLineNumber,de=re.subtractFrom(ae.modifiedLineRange),ge=oe.subtractFrom(ae.originalLineRange).map(be=>be.delta(ue)),he=u(de,ge);for(const be of he){if(be.length<3)continue;const ve=be,Ie=be.delta(-ue);j.push(new i.SimpleLineRangeMapping(Ie,ve)),re.addRange(ve),oe.addRange(Ie)}}if(j.sort((0,t.compareBy)(ae=>ae.original.startLineNumber,t.numberComparator)),j.length===0)return[];let le=[j[0]];for(let ae=1;ae<j.length;ae++){const ue=le[le.length-1],de=j[ae],ge=de.original.startLineNumber-ue.original.endLineNumberExclusive,he=de.modified.startLineNumber-ue.modified.endLineNumberExclusive;if(ge>=0&&he>=0&&ge+he<=2){le[le.length-1]=ue.join(de);continue}de.original.toOffsetRange().slice(H).map(Ie=>Ie.trim()).join(` `).length<=10||le.push(de)}const ne=o.createOfSorted(K,ae=>ae.originalRange.endLineNumberExclusive,t.numberComparator);return le=le.filter(ae=>{const ue=ne.findLastItemBeforeOrEqual(ae.original.startLineNumber)||new i.LineRangeMapping(new T.LineRange(1,1),new T.LineRange(1,1),[]),de=ae.modified.startLineNumber-ue.modifiedRange.endLineNumberExclusive,ge=ae.original.startLineNumber-ue.originalRange.endLineNumberExclusive;return de!==ge}),le.map(ae=>{const ue=this.refineDiff(H,U,new S.SequenceDiff(ae.original.toOffsetRange(),ae.modified.toOffsetRange()),ie,J),de=n(ue.mappings,H,U,!0);return new i.MovedText(ae,de)})}refineDiff(K,H,U,G,$){const ie=new I(K,U.seq1Range,$),J=new I(H,U.seq2Range,$),j=ie.length+J.length<500?this.dynamicProgrammingDiffing.compute(ie,J,G):this.myersDiffingAlgorithm.compute(ie,J,G);let ee=j.diffs;return ee=(0,a.optimizeSequenceDiffs)(ie,J,ee),ee=c(ie,J,ee),ee=(0,a.smoothenSequenceDiffs)(ie,J,ee),ee=(0,a.removeRandomMatches)(ie,J,ee),{mappings:ee.map(te=>new i.RangeMapping(ie.translateRange(te.seq1Range),J.translateRange(te.seq2Range))),hitTimeout:j.hitTimeout}}}e.AdvancedLinesDiffComputer=s;class o{static create(K,H,U){return K.sort((G,$)=>U(H(G),H($))),new o(K,H,U)}static createOfSorted(K,H,U){return new o(K,H,U)}constructor(K,H,U){this._items=K,this._itemToDomain=H,this._domainComparator=U,this._currentIdx=0,this._lastValue=void 0,this._hasLastValue=!1}findLastItemBeforeOrEqual(K){if(this._hasLastValue&&t.CompareResult.isLessThan(this._domainComparator(K,this._lastValue)))throw new D.BugIndicatingError;for(this._lastValue=K,this._hasLastValue=!0;this._currentIdx<this._items.length&&t.CompareResult.isLessThanOrEqual(this._domainComparator(this._itemToDomain(this._items[this._currentIdx]),K));)this._currentIdx++;return this._currentIdx===0?void 0:this._items[this._currentIdx-1]}}function u(B,K){const H=[];let U=0,G=0;for(;U<B.length&&G<K.length;){const $=B[U],ie=K[G],J=$.intersect(ie);J&&!J.isEmpty&&H.push(J),$.endLineNumberExclusive<ie.endLineNumberExclusive?U++:G++}return H}class d{constructor(){this._normalizedRanges=[]}addRange(K){const H=p(this._normalizedRanges.findIndex(G=>G.endLineNumberExclusive>=K.startLineNumber),this._normalizedRanges.length),U=(0,t.findLastIndex)(this._normalizedRanges,G=>G.startLineNumber<=K.endLineNumberExclusive)+1;if(H===U)this._normalizedRanges.splice(H,0,K);else if(H===U-1){const G=this._normalizedRanges[H];this._normalizedRanges[H]=G.join(K)}else{const G=this._normalizedRanges[H].join(this._normalizedRanges[U-1]).join(K);this._normalizedRanges.splice(H,U-H,G)}}intersects(K){for(const H of this._normalizedRanges)if(H.intersectsStrict(K))return!0;return!1}subtractFrom(K){const H=p(this._normalizedRanges.findIndex(ie=>ie.endLineNumberExclusive>=K.startLineNumber),this._normalizedRanges.length),U=(0,t.findLastIndex)(this._normalizedRanges,ie=>ie.startLineNumber<=K.endLineNumberExclusive)+1;if(H===U)return[K];const G=[];let $=K.startLineNumber;for(let ie=H;ie<U;ie++){const J=this._normalizedRanges[ie];J.startLineNumber>$&&G.push(new T.LineRange($,J.startLineNumber)),$=J.endLineNumberExclusive}return $<K.endLineNumberExclusive&&G.push(new T.LineRange($,K.endLineNumberExclusive)),G}}function p(B,K){return B===-1?K:B}function c(B,K,H){const U=[];let G;function $(){if(!G)return;const J=G.s1Range.length-G.deleted,j=G.s2Range.length-G.added;Math.max(G.deleted,G.added)+(G.count-1)>J&&U.push(new S.SequenceDiff(G.s1Range,G.s2Range)),G=void 0}for(const J of H){let j=function(se,re){if(!G||!G.s1Range.containsRange(se)||!G.s2Range.containsRange(re))if(G&&!(G.s1Range.endExclusive<se.start&&G.s2Range.endExclusive<re.start)){const ne=f.OffsetRange.tryCreate(G.s1Range.endExclusive,se.start),ce=f.OffsetRange.tryCreate(G.s2Range.endExclusive,re.start);G.deleted+=ne?.length??0,G.added+=ce?.length??0,G.s1Range=G.s1Range.join(se),G.s2Range=G.s2Range.join(re)}else $(),G={added:0,deleted:0,count:0,s1Range:se,s2Range:re};const oe=se.intersect(J.seq1Range),le=re.intersect(J.seq2Range);G.count++,G.deleted+=oe?.length??0,G.added+=le?.length??0};const ee=B.findWordContaining(J.seq1Range.start-1),X=K.findWordContaining(J.seq2Range.start-1),te=B.findWordContaining(J.seq1Range.endExclusive),Z=K.findWordContaining(J.seq2Range.endExclusive);ee&&te&&X&&Z&&ee.equals(te)&&X.equals(Z)?j(ee,X):(ee&&X&&j(ee,X),te&&Z&&j(te,Z))}return $(),l(H,U)}function l(B,K){const H=[];for(;B.length>0||K.length>0;){const U=B[0],G=K[0];let $;U&&(!G||U.seq1Range.start<G.seq1Range.start)?$=B.shift():$=K.shift(),H.length>0&&H[H.length-1].seq1Range.endExclusive>=$.seq1Range.start?H[H.length-1]=H[H.length-1].join($):H.push($)}return H}function n(B,K,H,U=!1){const G=[];for(const $ of w(B.map(ie=>g(ie,K,H)),(ie,J)=>ie.originalRange.overlapOrTouch(J.originalRange)||ie.modifiedRange.overlapOrTouch(J.modifiedRange))){const ie=$[0],J=$[$.length-1];G.push(new i.LineRangeMapping(ie.originalRange.join(J.originalRange),ie.modifiedRange.join(J.modifiedRange),$.map(j=>j.innerChanges[0])))}return(0,y.assertFn)(()=>!U&&G.length>0&&G[0].originalRange.startLineNumber!==G[0].modifiedRange.startLineNumber?!1:(0,y.checkAdjacentItems)(G,($,ie)=>ie.originalRange.startLineNumber-$.originalRange.endLineNumberExclusive===ie.modifiedRange.startLineNumber-$.modifiedRange.endLineNumberExclusive&&$.originalRange.endLineNumberExclusive<ie.originalRange.startLineNumber&&$.modifiedRange.endLineNumberExclusive<ie.modifiedRange.startLineNumber)),G}e.lineRangeMappingFromRangeMappings=n;function g(B,K,H){let U=0,G=0;B.modifiedRange.endColumn===1&&B.originalRange.endColumn===1&&B.originalRange.startLineNumber+U<=B.originalRange.endLineNumber&&B.modifiedRange.startLineNumber+U<=B.modifiedRange.endLineNumber&&(G=-1),B.modifiedRange.startColumn-1>=H[B.modifiedRange.startLineNumber-1].length&&B.originalRange.startColumn-1>=K[B.originalRange.startLineNumber-1].length&&B.originalRange.startLineNumber<=B.originalRange.endLineNumber+G&&B.modifiedRange.startLineNumber<=B.modifiedRange.endLineNumber+G&&(U=1);const $=new T.LineRange(B.originalRange.startLineNumber+U,B.originalRange.endLineNumber+1+G),ie=new T.LineRange(B.modifiedRange.startLineNumber+U,B.modifiedRange.endLineNumber+1+G);return new i.LineRangeMapping($,ie,[B])}e.getLineRangeMapping=g;function*w(B,K){let H,U;for(const G of B)U!==void 0&&K(U,G)?H.push(G):(H&&(yield H),H=[G]),U=G;H&&(yield H)}class E{constructor(K,H){this.trimmedHash=K,this.lines=H}getElement(K){return this.trimmedHash[K]}get length(){return this.trimmedHash.length}getBoundaryScore(K){const H=K===0?0:C(this.lines[K-1]),U=K===this.lines.length?0:C(this.lines[K]);return 1e3-(H+U)}getText(K){return this.lines.slice(K.start,K.endExclusive).join(` `)}isStronglyEqual(K,H){return this.lines[K]===this.lines[H]}}e.LineSequence=E;function C(B){let K=0;for(;K<B.length&&(B.charCodeAt(K)===32||B.charCodeAt(K)===9);)K++;return K}class I{constructor(K,H,U){this.lines=K,this.considerWhitespaceChanges=U,this.elements=[],this.firstCharOffsetByLineMinusOne=[],this.additionalOffsetByLine=[];let G=!1;H.start>0&&H.endExclusive>=K.length&&(H=new f.OffsetRange(H.start-1,H.endExclusive),G=!0),this.lineRange=H;for(let $=this.lineRange.start;$<this.lineRange.endExclusive;$++){let ie=K[$],J=0;if(G)J=ie.length,ie="",G=!1;else if(!U){const j=ie.trimStart();J=ie.length-j.length,ie=j.trimEnd()}this.additionalOffsetByLine.push(J);for(let j=0;j<ie.length;j++)this.elements.push(ie.charCodeAt(j));$<K.length-1&&(this.elements.push(` `.charCodeAt(0)),this.firstCharOffsetByLineMinusOne[$-this.lineRange.start]=this.elements.length)}this.additionalOffsetByLine.push(0)}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new f.OffsetRange(0,this.length))}getText(K){return this.elements.slice(K.start,K.endExclusive).map(H=>String.fromCharCode(H)).join("")}getElement(K){return this.elements[K]}get length(){return this.elements.length}getBoundaryScore(K){const H=x(K>0?this.elements[K-1]:-1),U=x(K<this.elements.length?this.elements[K]:-1);if(H===6&&U===7)return 0;let G=0;return H!==U&&(G+=10,U===1&&(G+=1)),G+=P(H),G+=P(U),G}translateOffset(K){if(this.lineRange.isEmpty)return new v.Position(this.lineRange.start+1,1);let H=0,U=this.firstCharOffsetByLineMinusOne.length;for(;H<U;){const $=Math.floor((H+U)/2);this.firstCharOffsetByLineMinusOne[$]>K?U=$:H=$+1}const G=H===0?0:this.firstCharOffsetByLineMinusOne[H-1];return new v.Position(this.lineRange.start+H+1,K-G+1+this.additionalOffsetByLine[H])}translateRange(K){return m.Range.fromPositions(this.translateOffset(K.start),this.translateOffset(K.endExclusive))}findWordContaining(K){if(K<0||K>=this.elements.length||!R(this.elements[K]))return;let H=K;for(;H>0&&R(this.elements[H-1]);)H--;let U=K;for(;U<this.elements.length&&R(this.elements[U]);)U++;return new f.OffsetRange(H,U)}countLinesIn(K){return this.translateOffset(K.endExclusive).lineNumber-this.translateOffset(K.start).lineNumber}isStronglyEqual(K,H){return this.elements[K]===this.elements[H]}extendToFullLines(K){const H=A(this.firstCharOffsetByLineMinusOne,G=>G<=K.start)??0,U=L(this.firstCharOffsetByLineMinusOne,G=>K.endExclusive<=G)??this.elements.length;return new f.OffsetRange(H,U)}}e.LinesSliceCharSequence=I;function _(B,K){let H=0,U=B.length;for(;H<U;){const G=Math.floor((H+U)/2);K(B[G])?H=G+1:U=G}return H-1}function A(B,K){const H=_(B,K);return H===-1?void 0:B[H]}e.findLastMonotonous=A;function k(B,K){let H=0,U=B.length;for(;H<U;){const G=Math.floor((H+U)/2);K(B[G])?U=G:H=G+1}return H}function L(B,K){const H=k(B,K);return H===B.length?void 0:B[H]}e.findFirstMonotonous=L;function R(B){return B>=97&&B<=122||B>=65&&B<=90||B>=48&&B<=57}var M;(function(B){B[B.WordLower=0]="WordLower",B[B.WordUpper=1]="WordUpper",B[B.WordNumber=2]="WordNumber",B[B.End=3]="End",B[B.Other=4]="Other",B[B.Space=5]="Space",B[B.LineBreakCR=6]="LineBreakCR",B[B.LineBreakLF=7]="LineBreakLF"})(M||(M={}));const N={[0]:0,[1]:0,[2]:0,[3]:10,[4]:2,[5]:3,[6]:10,[7]:10};function P(B){return N[B]}function x(B){return B===10?7:B===13?6:F(B)?5:B>=97&&B<=122?0:B>=65&&B<=90?1:B>=48&&B<=57?2:B===-1?3:4}function F(B){return B===32||B===9}const V=new Map;function W(B){let K=V.get(B);return K===void 0&&(K=V.size,V.set(B,K)),K}class z{constructor(K,H,U){this.range=K,this.lines=H,this.source=U,this.histogram=[];let G=0;for(let $=K.startLineNumber-1;$<K.endLineNumberExclusive-1;$++){const ie=H[$];for(let j=0;j<ie.length;j++){G++;const ee=ie[j],X=W(ee);this.histogram[X]=(this.histogram[X]||0)+1}G++;const J=W(` `);this.histogram[J]=(this.histogram[J]||0)+1}this.totalCount=G}computeSimilarity(K){let H=0;const U=Math.max(this.histogram.length,K.histogram.length);for(let G=0;G<U;G++)H+=Math.abs((this.histogram[G]??0)-(K.histogram[G]??0));return 1-H/(this.totalCount+K.totalCount)}}}),define(Q[1073],Y([1,0,482,438,33,27,214,238]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffComputer=e.LegacyLinesDiffComputer=void 0;const v=3;class m{computeDiff(l,n,g){const E=new o(l,n,{maxComputationTime:g.maxComputationTimeMs,shouldIgnoreTrimWhitespace:g.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),C=[];let I=null;for(const _ of E.changes){let A;_.originalEndLineNumber===0?A=new f.LineRange(_.originalStartLineNumber+1,_.originalStartLineNumber+1):A=new f.LineRange(_.originalStartLineNumber,_.originalEndLineNumber+1);let k;_.modifiedEndLineNumber===0?k=new f.LineRange(_.modifiedStartLineNumber+1,_.modifiedStartLineNumber+1):k=new f.LineRange(_.modifiedStartLineNumber,_.modifiedEndLineNumber+1);let L=new y.LineRangeMapping(A,k,_.charChanges?.map(R=>new y.RangeMapping(new D.Range(R.originalStartLineNumber,R.originalStartColumn,R.originalEndLineNumber,R.originalEndColumn),new D.Range(R.modifiedStartLineNumber,R.modifiedStartColumn,R.modifiedEndLineNumber,R.modifiedEndColumn))));I&&(I.modifiedRange.endLineNumberExclusive===L.modifiedRange.startLineNumber||I.originalRange.endLineNumberExclusive===L.originalRange.startLineNumber)&&(L=new y.LineRangeMapping(I.originalRange.join(L.originalRange),I.modifiedRange.join(L.modifiedRange),I.innerChanges&&L.innerChanges?I.innerChanges.concat(L.innerChanges):void 0),C.pop()),C.push(L),I=L}return(0,T.assertFn)(()=>(0,T.checkAdjacentItems)(C,(_,A)=>A.originalRange.startLineNumber-_.originalRange.endLineNumberExclusive===A.modifiedRange.startLineNumber-_.modifiedRange.endLineNumberExclusive&&_.originalRange.endLineNumberExclusive<A.originalRange.startLineNumber&&_.modifiedRange.endLineNumberExclusive<A.modifiedRange.startLineNumber)),new y.LinesDiff(C,[],E.quitEarly)}}e.LegacyLinesDiffComputer=m;function S(c,l,n,g){return new t.LcsDiff(c,l,n).ComputeDiff(g)}class h{constructor(l){const n=[],g=[];for(let w=0,E=l.length;w<E;w++)n[w]=u(l[w],1),g[w]=d(l[w],1);this.lines=l,this._startColumns=n,this._endColumns=g}getElements(){const l=[];for(let n=0,g=this.lines.length;n<g;n++)l[n]=this.lines[n].substring(this._startColumns[n]-1,this._endColumns[n]-1);return l}getStrictElement(l){return this.lines[l]}getStartLineNumber(l){return l+1}getEndLineNumber(l){return l+1}createCharSequence(l,n,g){const w=[],E=[],C=[];let I=0;for(let _=n;_<=g;_++){const A=this.lines[_],k=l?this._startColumns[_]:1,L=l?this._endColumns[_]:A.length+1;for(let R=k;R<L;R++)w[I]=A.charCodeAt(R-1),E[I]=_+1,C[I]=R,I++;!l&&_<g&&(w[I]=10,E[I]=_+1,C[I]=A.length+1,I++)}return new a(w,E,C)}}class a{constructor(l,n,g){this._charCodes=l,this._lineNumbers=n,this._columns=g}toString(){return"["+this._charCodes.map((l,n)=>(l===10?"\\n":String.fromCharCode(l))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(l,n){if(l<0||l>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(l){return l>0&&l===this._lineNumbers.length?this.getEndLineNumber(l-1):(this._assertIndex(l,this._lineNumbers),this._lineNumbers[l])}getEndLineNumber(l){return l===-1?this.getStartLineNumber(l+1):(this._assertIndex(l,this._lineNumbers),this._charCodes[l]===10?this._lineNumbers[l]+1:this._lineNumbers[l])}getStartColumn(l){return l>0&&l===this._columns.length?this.getEndColumn(l-1):(this._assertIndex(l,this._columns),this._columns[l])}getEndColumn(l){return l===-1?this.getStartColumn(l+1):(this._assertIndex(l,this._columns),this._charCodes[l]===10?1:this._columns[l]+1)}}class r{constructor(l,n,g,w,E,C,I,_){this.originalStartLineNumber=l,this.originalStartColumn=n,this.originalEndLineNumber=g,this.originalEndColumn=w,this.modifiedStartLineNumber=E,this.modifiedStartColumn=C,this.modifiedEndLineNumber=I,this.modifiedEndColumn=_}static createFromDiffChange(l,n,g){const w=n.getStartLineNumber(l.originalStart),E=n.getStartColumn(l.originalStart),C=n.getEndLineNumber(l.originalStart+l.originalLength-1),I=n.getEndColumn(l.originalStart+l.originalLength-1),_=g.getStartLineNumber(l.modifiedStart),A=g.getStartColumn(l.modifiedStart),k=g.getEndLineNumber(l.modifiedStart+l.modifiedLength-1),L=g.getEndColumn(l.modifiedStart+l.modifiedLength-1);return new r(w,E,C,I,_,A,k,L)}}function i(c){if(c.length<=1)return c;const l=[c[0]];let n=l[0];for(let g=1,w=c.length;g<w;g++){const E=c[g],C=E.originalStart-(n.originalStart+n.originalLength),I=E.modifiedStart-(n.modifiedStart+n.modifiedLength);Math.min(C,I)<v?(n.originalLength=E.originalStart+E.originalLength-n.originalStart,n.modifiedLength=E.modifiedStart+E.modifiedLength-n.modifiedStart):(l.push(E),n=E)}return l}class s{constructor(l,n,g,w,E){this.originalStartLineNumber=l,this.originalEndLineNumber=n,this.modifiedStartLineNumber=g,this.modifiedEndLineNumber=w,this.charChanges=E}static createFromDiffResult(l,n,g,w,E,C,I){let _,A,k,L,R;if(n.originalLength===0?(_=g.getStartLineNumber(n.originalStart)-1,A=0):(_=g.getStartLineNumber(n.originalStart),A=g.getEndLineNumber(n.originalStart+n.originalLength-1)),n.modifiedLength===0?(k=w.getStartLineNumber(n.modifiedStart)-1,L=0):(k=w.getStartLineNumber(n.modifiedStart),L=w.getEndLineNumber(n.modifiedStart+n.modifiedLength-1)),C&&n.originalLength>0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&E()){const M=g.createCharSequence(l,n.originalStart,n.originalStart+n.originalLength-1),N=w.createCharSequence(l,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(M.getElements().length>0&&N.getElements().length>0){let P=S(M,N,E,!0).changes;I&&(P=i(P)),R=[];for(let x=0,F=P.length;x<F;x++)R.push(r.createFromDiffChange(P[x],M,N))}}return new s(_,A,k,L,R)}}class o{constructor(l,n,g){this.shouldComputeCharChanges=g.shouldComputeCharChanges,this.shouldPostProcessCharChanges=g.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=g.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=g.shouldMakePrettyDiff,this.originalLines=l,this.modifiedLines=n,this.original=new h(l),this.modified=new h(n),this.continueLineDiff=p(g.maxComputationTime),this.continueCharDiff=p(g.maxComputationTime===0?0:Math.min(g.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};const l=S(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),n=l.changes,g=l.quitEarly;if(this.shouldIgnoreTrimWhitespace){const I=[];for(let _=0,A=n.length;_<A;_++)I.push(s.createFromDiffResult(this.shouldIgnoreTrimWhitespace,n[_],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:g,changes:I}}const w=[];let E=0,C=0;for(let I=-1,_=n.length;I<_;I++){const A=I+1<_?n[I+1]:null,k=A?A.originalStart:this.originalLines.length,L=A?A.modifiedStart:this.modifiedLines.length;for(;E<k&&C<L;){const R=this.originalLines[E],M=this.modifiedLines[C];if(R!==M){{let N=u(R,1),P=u(M,1);for(;N>1&&P>1;){const x=R.charCodeAt(N-2),F=M.charCodeAt(P-2);if(x!==F)break;N--,P--}(N>1||P>1)&&this._pushTrimWhitespaceCharChange(w,E+1,1,N,C+1,1,P)}{let N=d(R,1),P=d(M,1);const x=R.length+1,F=M.length+1;for(;N<x&&P<F;){const V=R.charCodeAt(N-1),W=R.charCodeAt(P-1);if(V!==W)break;N++,P++}(N<x||P<F)&&this._pushTrimWhitespaceCharChange(w,E+1,N,x,C+1,P,F)}}E++,C++}A&&(w.push(s.createFromDiffResult(this.shouldIgnoreTrimWhitespace,A,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),E+=A.originalLength,C+=A.modifiedLength)}return{quitEarly:g,changes:w}}_pushTrimWhitespaceCharChange(l,n,g,w,E,C,I){if(this._mergeTrimWhitespaceCharChange(l,n,g,w,E,C,I))return;let _;this.shouldComputeCharChanges&&(_=[new r(n,g,n,w,E,C,E,I)]),l.push(new s(n,n,E,E,_))}_mergeTrimWhitespaceCharChange(l,n,g,w,E,C,I){const _=l.length;if(_===0)return!1;const A=l[_-1];return A.originalEndLineNumber===0||A.modifiedEndLineNumber===0?!1:A.originalEndLineNumber===n&&A.modifiedEndLineNumber===E?(this.shouldComputeCharChanges&&A.charChanges&&A.charChanges.push(new r(n,g,n,w,E,C,E,I)),!0):A.originalEndLineNumber+1===n&&A.modifiedEndLineNumber+1===E?(A.originalEndLineNumber=n,A.modifiedEndLineNumber=E,this.shouldComputeCharChanges&&A.charChanges&&A.charChanges.push(new r(n,g,n,w,E,C,E,I)),!0):!1}}e.DiffComputer=o;function u(c,l){const n=b.firstNonWhitespaceIndex(c);return n===-1?l:n+1}function d(c,l){const n=b.lastNonWhitespaceIndex(c);return n===-1?l:n+2}function p(c){if(c===0)return()=>!0;const l=Date.now();return()=>Date.now()-l<c}}),define(Q[1865],Y([1,0,1073,1072]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linesDiffComputers=void 0,e.linesDiffComputers={getLegacy:()=>new t.LegacyLinesDiffComputer,getAdvanced:()=>new y.AdvancedLinesDiffComputer}}),define(Q[1866],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalEditorAction=void 0;class t{constructor(b,D,T,f,v,m){this.id=b,this.label=D,this.alias=T,this._precondition=f,this._run=v,this._contextKeyService=m}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(b){return this.isSupported()?this._run(b):Promise.resolve(void 0)}}e.InternalEditorAction=t}),define(Q[393],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Handler=e.EditorType=e.isThemeColor=e.ScrollType=void 0;var t;(function(D){D[D.Smooth=0]="Smooth",D[D.Immediate=1]="Immediate"})(t||(e.ScrollType=t={}));function y(D){return D&&typeof D.id=="string"}e.isThemeColor=y,e.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};var b;(function(D){D.CompositionStart="compositionStart",D.CompositionEnd="compositionEnd",D.Type="type",D.ReplacePreviousChar="replacePreviousChar",D.CompositionType="compositionType",D.Paste="paste",D.Cut="cut"})(b||(e.Handler=b={}))}),define(Q[123],Y([1,0,393]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIEditor=e.getCodeEditor=e.isCompositeEditor=e.isDiffEditor=e.isCodeEditor=e.DiffEditorState=e.MouseTargetType=e.OverlayWidgetPositionPreference=e.ContentWidgetPositionPreference=void 0;var y;(function(a){a[a.EXACT=0]="EXACT",a[a.ABOVE=1]="ABOVE",a[a.BELOW=2]="BELOW"})(y||(e.ContentWidgetPositionPreference=y={}));var b;(function(a){a[a.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",a[a.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",a[a.TOP_CENTER=2]="TOP_CENTER"})(b||(e.OverlayWidgetPositionPreference=b={}));var D;(function(a){a[a.UNKNOWN=0]="UNKNOWN",a[a.TEXTAREA=1]="TEXTAREA",a[a.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",a[a.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",a[a.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",a[a.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",a[a.CONTENT_TEXT=6]="CONTENT_TEXT",a[a.CONTENT_EMPTY=7]="CONTENT_EMPTY",a[a.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",a[a.CONTENT_WIDGET=9]="CONTENT_WIDGET",a[a.OVERVIEW_RULER=10]="OVERVIEW_RULER",a[a.SCROLLBAR=11]="SCROLLBAR",a[a.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",a[a.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(D||(e.MouseTargetType=D={}));var T;(function(a){a[a.Idle=0]="Idle",a[a.ComputingDiff=1]="ComputingDiff",a[a.DiffComputed=2]="DiffComputed"})(T||(e.DiffEditorState=T={}));function f(a){return a&&typeof a.getEditorType=="function"?a.getEditorType()===t.EditorType.ICodeEditor:!1}e.isCodeEditor=f;function v(a){return a&&typeof a.getEditorType=="function"?a.getEditorType()===t.EditorType.IDiffEditor:!1}e.isDiffEditor=v;function m(a){return!!a&&typeof a=="object"&&typeof a.onDidChangeActiveEditor=="function"}e.isCompositeEditor=m;function S(a){return f(a)?a:v(a)?a.getModifiedEditor():m(a)&&f(a.activeCodeEditor)?a.activeCodeEditor:null}e.getCodeEditor=S;function h(a){return f(a)||v(a)?a:null}e.getIEditor=h}),define(Q[564],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditorFeatures=e.registerEditorFeature=void 0;const t=[];function y(D){t.push(D)}e.registerEditorFeature=y;function b(){return t.slice(0)}e.getEditorFeatures=b}),define(Q[1867],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorTheme=void 0;class t{get type(){return this._theme.type}get value(){return this._theme}constructor(b){this._theme=b}update(b){this._theme=b}getColor(b){return this._theme.getColor(b)}}e.EditorTheme=t}),define(Q[439],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenMetadata=e.MetadataConsts=e.StandardTokenType=e.ColorId=e.FontStyle=e.LanguageId=void 0;var t;(function(v){v[v.Null=0]="Null",v[v.PlainText=1]="PlainText"})(t||(e.LanguageId=t={}));var y;(function(v){v[v.NotSet=-1]="NotSet",v[v.None=0]="None",v[v.Italic=1]="Italic",v[v.Bold=2]="Bold",v[v.Underline=4]="Underline",v[v.Strikethrough=8]="Strikethrough"})(y||(e.FontStyle=y={}));var b;(function(v){v[v.None=0]="None",v[v.DefaultForeground=1]="DefaultForeground",v[v.DefaultBackground=2]="DefaultBackground"})(b||(e.ColorId=b={}));var D;(function(v){v[v.Other=0]="Other",v[v.Comment=1]="Comment",v[v.String=2]="String",v[v.RegEx=3]="RegEx"})(D||(e.StandardTokenType=D={}));var T;(function(v){v[v.LANGUAGEID_MASK=255]="LANGUAGEID_MASK",v[v.TOKEN_TYPE_MASK=768]="TOKEN_TYPE_MASK",v[v.BALANCED_BRACKETS_MASK=1024]="BALANCED_BRACKETS_MASK",v[v.FONT_STYLE_MASK=30720]="FONT_STYLE_MASK",v[v.FOREGROUND_MASK=16744448]="FOREGROUND_MASK",v[v.BACKGROUND_MASK=4278190080]="BACKGROUND_MASK",v[v.ITALIC_MASK=2048]="ITALIC_MASK",v[v.BOLD_MASK=4096]="BOLD_MASK",v[v.UNDERLINE_MASK=8192]="UNDERLINE_MASK",v[v.STRIKETHROUGH_MASK=16384]="STRIKETHROUGH_MASK",v[v.SEMANTIC_USE_ITALIC=1]="SEMANTIC_USE_ITALIC",v[v.SEMANTIC_USE_BOLD=2]="SEMANTIC_USE_BOLD",v[v.SEMANTIC_USE_UNDERLINE=4]="SEMANTIC_USE_UNDERLINE",v[v.SEMANTIC_USE_STRIKETHROUGH=8]="SEMANTIC_USE_STRIKETHROUGH",v[v.SEMANTIC_USE_FOREGROUND=16]="SEMANTIC_USE_FOREGROUND",v[v.SEMANTIC_USE_BACKGROUND=32]="SEMANTIC_USE_BACKGROUND",v[v.LANGUAGEID_OFFSET=0]="LANGUAGEID_OFFSET",v[v.TOKEN_TYPE_OFFSET=8]="TOKEN_TYPE_OFFSET",v[v.BALANCED_BRACKETS_OFFSET=10]="BALANCED_BRACKETS_OFFSET",v[v.FONT_STYLE_OFFSET=11]="FONT_STYLE_OFFSET",v[v.FOREGROUND_OFFSET=15]="FOREGROUND_OFFSET",v[v.BACKGROUND_OFFSET=24]="BACKGROUND_OFFSET"})(T||(e.MetadataConsts=T={}));class f{static getLanguageId(m){return(m&255)>>>0}static getTokenType(m){return(m&768)>>>8}static containsBalancedBrackets(m){return(m&1024)!==0}static getFontStyle(m){return(m&30720)>>>11}static getForeground(m){return(m&16744448)>>>15}static getBackground(m){return(m&4278190080)>>>24}static getClassNameFromMetadata(m){let h="mtk"+this.getForeground(m);const a=this.getFontStyle(m);return a&1&&(h+=" mtki"),a&2&&(h+=" mtkb"),a&4&&(h+=" mtku"),a&8&&(h+=" mtks"),h}static getInlineStyleFromMetadata(m,S){const h=this.getForeground(m),a=this.getFontStyle(m);let r=`color: ${S[h]};`;a&1&&(r+="font-style: italic;"),a&2&&(r+="font-weight: bold;");let i="";return a&4&&(i+=" underline"),a&8&&(i+=" line-through"),i&&(r+=`text-decoration:${i};`),r}static getPresentationFromMetadata(m){const S=this.getForeground(m),h=this.getFontStyle(m);return{foreground:S,italic:!!(h&1),bold:!!(h&2),underline:!!(h&4),strikethrough:!!(h&8)}}}e.TokenMetadata=f}),define(Q[1868],Y([1,0,80]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeDefaultDocumentColors=void 0;function y(a){const r=[];for(const i of a){const s=Number(i);(s||s===0&&i.replace(/\s/g,"")!=="")&&r.push(s)}return r}function b(a,r,i,s){return{red:a/255,blue:i/255,green:r/255,alpha:s}}function D(a,r){const i=r.index,s=r[0].length;if(!i)return;const o=a.positionAt(i);return{startLineNumber:o.lineNumber,startColumn:o.column,endLineNumber:o.lineNumber,endColumn:o.column+s}}function T(a,r){if(!a)return;const i=t.Color.Format.CSS.parseHex(r);if(i)return{range:a,color:b(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a)}}function f(a,r,i){if(!a||r.length!==1)return;const o=r[0].values(),u=y(o);return{range:a,color:b(u[0],u[1],u[2],i?u[3]:1)}}function v(a,r,i){if(!a||r.length!==1)return;const o=r[0].values(),u=y(o),d=new t.Color(new t.HSLA(u[0],u[1]/100,u[2]/100,i?u[3]:1));return{range:a,color:b(d.rgba.r,d.rgba.g,d.rgba.b,d.rgba.a)}}function m(a,r){return typeof a=="string"?[...a.matchAll(r)]:a.findMatches(r)}function S(a){const r=[],s=m(a,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(s.length>0)for(const o of s){const u=o.filter(l=>l!==void 0),d=u[1],p=u[2];if(!p)continue;let c;if(d==="rgb"){const l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;c=f(D(a,o),m(p,l),!1)}else if(d==="rgba"){const l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;c=f(D(a,o),m(p,l),!0)}else if(d==="hsl"){const l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;c=v(D(a,o),m(p,l),!1)}else if(d==="hsla"){const l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;c=v(D(a,o),m(p,l),!0)}else d==="#"&&(c=T(D(a,o),d+p));c&&r.push(c)}return r}function h(a){return!a||typeof a.getValue!="function"||typeof a.positionAt!="function"?[]:S(a)}e.computeDefaultDocumentColors=h}),define(Q[394],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoClosingPairs=e.StandardAutoClosingPairConditional=e.IndentAction=void 0;var t;(function(T){T[T.None=0]="None",T[T.Indent=1]="Indent",T[T.IndentOutdent=2]="IndentOutdent",T[T.Outdent=3]="Outdent"})(t||(e.IndentAction=t={}));class y{constructor(f){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=f.open,this.close=f.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(f.notIn))for(let v=0,m=f.notIn.length;v<m;v++)switch(f.notIn[v]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1;break}}isOK(f){switch(f){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(f,v){if(f.getTokenCount()===0)return!0;const m=f.findTokenIndexAtOffset(v-2),S=f.getStandardTokenType(m);return this.isOK(S)}_findNeutralCharacterInRange(f,v){for(let m=f;m<=v;m++){const S=String.fromCharCode(m);if(!this.open.includes(S)&&!this.close.includes(S))return S}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}e.StandardAutoClosingPairConditional=y;class b{constructor(f){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const v of f)D(this.autoClosingPairsOpenByStart,v.open.charAt(0),v),D(this.autoClosingPairsOpenByEnd,v.open.charAt(v.open.length-1),v),D(this.autoClosingPairsCloseByStart,v.close.charAt(0),v),D(this.autoClosingPairsCloseByEnd,v.close.charAt(v.close.length-1),v),v.close.length===1&&v.open.length===1&&D(this.autoClosingPairsCloseSingleChar,v.close,v)}}e.AutoClosingPairs=b;function D(T,f,v){T.has(f)?T.get(f).push(v):T.set(f,[v])}}),define(Q[1074],Y([1,0,486]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeLinks=e.LinkComputer=e.StateMachine=e.State=void 0;var y;(function(r){r[r.Invalid=0]="Invalid",r[r.Start=1]="Start",r[r.H=2]="H",r[r.HT=3]="HT",r[r.HTT=4]="HTT",r[r.HTTP=5]="HTTP",r[r.F=6]="F",r[r.FI=7]="FI",r[r.FIL=8]="FIL",r[r.BeforeColon=9]="BeforeColon",r[r.AfterColon=10]="AfterColon",r[r.AlmostThere=11]="AlmostThere",r[r.End=12]="End",r[r.Accept=13]="Accept",r[r.LastKnownState=14]="LastKnownState"})(y||(e.State=y={}));class b{constructor(i,s,o){const u=new Uint8Array(i*s);for(let d=0,p=i*s;d<p;d++)u[d]=o;this._data=u,this.rows=i,this.cols=s}get(i,s){return this._data[i*this.cols+s]}set(i,s,o){this._data[i*this.cols+s]=o}}class D{constructor(i){let s=0,o=0;for(let d=0,p=i.length;d<p;d++){const[c,l,n]=i[d];l>s&&(s=l),c>o&&(o=c),n>o&&(o=n)}s++,o++;const u=new b(o,s,0);for(let d=0,p=i.length;d<p;d++){const[c,l,n]=i[d];u.set(c,l,n)}this._states=u,this._maxCharCode=s}nextState(i,s){return s<0||s>=this._maxCharCode?0:this._states.get(i,s)}}e.StateMachine=D;let T=null;function f(){return T===null&&(T=new D([[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]])),T}var v;(function(r){r[r.None=0]="None",r[r.ForceTermination=1]="ForceTermination",r[r.CannotEndIn=2]="CannotEndIn"})(v||(v={}));let m=null;function S(){if(m===null){m=new t.CharacterClassifier(0);const r=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let s=0;s<r.length;s++)m.set(r.charCodeAt(s),1);const i=".,;:";for(let s=0;s<i.length;s++)m.set(i.charCodeAt(s),2)}return m}class h{static _createLink(i,s,o,u,d){let p=d-1;do{const c=s.charCodeAt(p);if(i.get(c)!==2)break;p--}while(p>u);if(u>0){const c=s.charCodeAt(u-1),l=s.charCodeAt(p);(c===40&&l===41||c===91&&l===93||c===123&&l===125)&&p--}return{range:{startLineNumber:o,startColumn:u+1,endLineNumber:o,endColumn:p+2},url:s.substring(u,p+1)}}static computeLinks(i,s=f()){const o=S(),u=[];for(let d=1,p=i.getLineCount();d<=p;d++){const c=i.getLineContent(d),l=c.length;let n=0,g=0,w=0,E=1,C=!1,I=!1,_=!1,A=!1;for(;n<l;){let k=!1;const L=c.charCodeAt(n);if(E===13){let R;switch(L){case 40:C=!0,R=0;break;case 41:R=C?0:1;break;case 91:_=!0,I=!0,R=0;break;case 93:_=!1,R=I?0:1;break;case 123:A=!0,R=0;break;case 125:R=A?0:1;break;case 39:case 34:case 96:w===L?R=1:w===39||w===34||w===96?R=0:R=1;break;case 42:R=w===42?1:0;break;case 124:R=w===124?1:0;break;case 32:R=_?0:1;break;default:R=o.get(L)}R===1&&(u.push(h._createLink(o,c,d,g,n)),k=!0)}else if(E===12){let R;L===91?(I=!0,R=0):R=o.get(L),R===1?k=!0:E=13}else E=s.nextState(E,L),E===0&&(k=!0);k&&(E=1,C=!1,I=!1,A=!1,g=n+1,w=L),n++}E===13&&u.push(h._createLink(o,c,d,g,l))}return u}}e.LinkComputer=h;function a(r){return!r||typeof r.getLineCount!="function"||typeof r.getLineContent!="function"?[]:h.computeLinks(r)}e.computeLinks=a}),define(Q[488],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreBracketsInToken=e.ScopedLineTokens=e.createScopedLineTokens=void 0;function t(T,f){const v=T.getCount(),m=T.findTokenIndexAtOffset(f),S=T.getLanguageId(m);let h=m;for(;h+1<v&&T.getLanguageId(h+1)===S;)h++;let a=m;for(;a>0&&T.getLanguageId(a-1)===S;)a--;return new y(T,S,a,h+1,T.getStartOffset(a),T.getEndOffset(h))}e.createScopedLineTokens=t;class y{constructor(f,v,m,S,h,a){this._scopedLineTokensBrand=void 0,this._actual=f,this.languageId=v,this._firstTokenIndex=m,this._lastTokenIndex=S,this.firstCharOffset=h,this._lastCharOffset=a}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(f){return this._actual.getLineContent().substring(0,this.firstCharOffset+f)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(f){return this._actual.findTokenIndexAtOffset(f+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(f){return this._actual.getStandardTokenType(f+this._firstTokenIndex)}}e.ScopedLineTokens=y;var b;(function(T){T[T.value=3]="value"})(b||(b={}));function D(T){return(T&3)!==0}e.ignoreBracketsInToken=D}),define(Q[301],Y([1,0,51,27,96,488,323,794]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isQuote=e.EditOperationResult=e.SingleCursorState=e.SelectionStartKind=e.PartialViewCursorState=e.PartialModelCursorState=e.CursorState=e.CursorConfiguration=e.EditOperationType=void 0;var v;(function(c){c[c.Other=0]="Other",c[c.DeletingLeft=2]="DeletingLeft",c[c.DeletingRight=3]="DeletingRight",c[c.TypingOther=4]="TypingOther",c[c.TypingFirstSpace=5]="TypingFirstSpace",c[c.TypingConsecutiveSpace=6]="TypingConsecutiveSpace"})(v||(e.EditOperationType=v={}));const m=()=>!0,S=()=>!1,h=c=>c===" "||c===" ";class a{static shouldRecreate(l){return l.hasChanged(142)||l.hasChanged(128)||l.hasChanged(36)||l.hasChanged(75)||l.hasChanged(77)||l.hasChanged(78)||l.hasChanged(6)||l.hasChanged(10)||l.hasChanged(8)||l.hasChanged(9)||l.hasChanged(13)||l.hasChanged(126)||l.hasChanged(49)||l.hasChanged(89)}constructor(l,n,g,w){this.languageConfigurationService=w,this._cursorMoveConfigurationBrand=void 0,this._languageId=l;const E=g.options,C=E.get(142),I=E.get(49);this.readOnly=E.get(89),this.tabSize=n.tabSize,this.indentSize=n.indentSize,this.insertSpaces=n.insertSpaces,this.stickyTabStops=E.get(114),this.lineHeight=I.lineHeight,this.typicalHalfwidthCharacterWidth=I.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(C.height/this.lineHeight)-2),this.useTabStops=E.get(126),this.wordSeparators=E.get(128),this.emptySelectionClipboard=E.get(36),this.copyWithSyntaxHighlighting=E.get(24),this.multiCursorMergeOverlapping=E.get(75),this.multiCursorPaste=E.get(77),this.multiCursorLimit=E.get(78),this.autoClosingBrackets=E.get(6),this.autoClosingQuotes=E.get(10),this.autoClosingDelete=E.get(8),this.autoClosingOvertype=E.get(9),this.autoSurround=E.get(13),this.autoIndent=E.get(11),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(l,this.autoClosingQuotes,!0),bracket:this._getShouldAutoClose(l,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(l).getAutoClosingPairs();const _=this.languageConfigurationService.getLanguageConfiguration(l).getSurroundingPairs();if(_)for(const A of _)this.surroundingPairs[A.open]=A.close}get electricChars(){if(!this._electricChars){this._electricChars={};const l=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter?.getElectricCharacters();if(l)for(const n of l)this._electricChars[n]=!0}return this._electricChars}onElectricCharacter(l,n,g){const w=(0,D.createScopedLineTokens)(n,g-1),E=this.languageConfigurationService.getLanguageConfiguration(w.languageId).electricCharacter;return E?E.onElectricCharacter(l,w,g-w.firstCharOffset):null}normalizeIndentation(l){return(0,f.normalizeIndentation)(l,this.indentSize,this.insertSpaces)}_getShouldAutoClose(l,n,g){switch(n){case"beforeWhitespace":return h;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(l,g);case"always":return m;case"never":return S}}_getLanguageDefinedShouldAutoClose(l,n){const g=this.languageConfigurationService.getLanguageConfiguration(l).getAutoCloseBeforeSet(n);return w=>g.indexOf(w)!==-1}visibleColumnFromColumn(l,n){return T.CursorColumns.visibleColumnFromColumn(l.getLineContent(n.lineNumber),n.column,this.tabSize)}columnFromVisibleColumn(l,n,g){const w=T.CursorColumns.columnFromVisibleColumn(l.getLineContent(n),g,this.tabSize),E=l.getLineMinColumn(n);if(w<E)return E;const C=l.getLineMaxColumn(n);return w>C?C:w}}e.CursorConfiguration=a;class r{static fromModelState(l){return new i(l)}static fromViewState(l){return new s(l)}static fromModelSelection(l){const n=b.Selection.liftSelection(l),g=new u(y.Range.fromPositions(n.getSelectionStart()),0,0,n.getPosition(),0);return r.fromModelState(g)}static fromModelSelections(l){const n=[];for(let g=0,w=l.length;g<w;g++)n[g]=this.fromModelSelection(l[g]);return n}constructor(l,n){this._cursorStateBrand=void 0,this.modelState=l,this.viewState=n}equals(l){return this.viewState.equals(l.viewState)&&this.modelState.equals(l.modelState)}}e.CursorState=r;class i{constructor(l){this.modelState=l,this.viewState=null}}e.PartialModelCursorState=i;class s{constructor(l){this.modelState=null,this.viewState=l}}e.PartialViewCursorState=s;var o;(function(c){c[c.Simple=0]="Simple",c[c.Word=1]="Word",c[c.Line=2]="Line"})(o||(e.SelectionStartKind=o={}));class u{constructor(l,n,g,w,E){this.selectionStart=l,this.selectionStartKind=n,this.selectionStartLeftoverVisibleColumns=g,this.position=w,this.leftoverVisibleColumns=E,this._singleCursorStateBrand=void 0,this.selection=u._computeSelection(this.selectionStart,this.position)}equals(l){return this.selectionStartLeftoverVisibleColumns===l.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===l.leftoverVisibleColumns&&this.selectionStartKind===l.selectionStartKind&&this.position.equals(l.position)&&this.selectionStart.equalsRange(l.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(l,n,g,w){return l?new u(this.selectionStart,this.selectionStartKind,this.selectionStartLeftoverVisibleColumns,new t.Position(n,g),w):new u(new y.Range(n,g,n,g),0,w,new t.Position(n,g),w)}static _computeSelection(l,n){return l.isEmpty()||!n.isBeforeOrEqual(l.getStartPosition())?b.Selection.fromPositions(l.getStartPosition(),n):b.Selection.fromPositions(l.getEndPosition(),n)}}e.SingleCursorState=u;class d{constructor(l,n,g){this._editOperationResultBrand=void 0,this.type=l,this.commands=n,this.shouldPushStackElementBefore=g.shouldPushStackElementBefore,this.shouldPushStackElementAfter=g.shouldPushStackElementAfter}}e.EditOperationResult=d;function p(c){return c==="'"||c==='"'||c==="`"}e.isQuote=p}),define(Q[1869],Y([1,0,301,51,27]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColumnSelection=void 0;class D{static columnSelect(f,v,m,S,h,a){const r=Math.abs(h-m)+1,i=m>h,s=S>a,o=S<a,u=[];for(let d=0;d<r;d++){const p=m+(i?-d:d),c=f.columnFromVisibleColumn(v,p,S),l=f.columnFromVisibleColumn(v,p,a),n=f.visibleColumnFromColumn(v,new y.Position(p,c)),g=f.visibleColumnFromColumn(v,new y.Position(p,l));o&&(n>a||g<S)||s&&(g>S||n<a)||u.push(new t.SingleCursorState(new b.Range(p,c,p,c),0,0,new y.Position(p,l),0))}if(u.length===0)for(let d=0;d<r;d++){const p=m+(i?-d:d),c=v.getLineMaxColumn(p);u.push(new t.SingleCursorState(new b.Range(p,c,p,c),0,0,new y.Position(p,c),0))}return{viewStates:u,reversed:i,fromLineNumber:m,fromVisualColumn:S,toLineNumber:h,toVisualColumn:a}}static columnSelectLeft(f,v,m){let S=m.toViewVisualColumn;return S>0&&S--,D.columnSelect(f,v,m.fromViewLineNumber,m.fromViewVisualColumn,m.toViewLineNumber,S)}static columnSelectRight(f,v,m){let S=0;const h=Math.min(m.fromViewLineNumber,m.toViewLineNumber),a=Math.max(m.fromViewLineNumber,m.toViewLineNumber);for(let i=h;i<=a;i++){const s=v.getLineMaxColumn(i),o=f.visibleColumnFromColumn(v,new y.Position(i,s));S=Math.max(S,o)}let r=m.toViewVisualColumn;return r<S&&r++,this.columnSelect(f,v,m.fromViewLineNumber,m.fromViewVisualColumn,m.toViewLineNumber,r)}static columnSelectUp(f,v,m,S){const h=S?f.pageSize:1,a=Math.max(1,m.toViewLineNumber-h);return this.columnSelect(f,v,m.fromViewLineNumber,m.fromViewVisualColumn,a,m.toViewVisualColumn)}static columnSelectDown(f,v,m,S){const h=S?f.pageSize:1,a=Math.min(v.getLineCount(),m.toViewLineNumber+h);return this.columnSelect(f,v,m.fromViewLineNumber,m.fromViewVisualColumn,a,m.toViewVisualColumn)}}e.ColumnSelection=D}),define(Q[795],Y([1,0,33,323,51,27,1071,301]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveOperations=e.CursorPosition=void 0;class v{constructor(h,a,r){this._cursorPositionBrand=void 0,this.lineNumber=h,this.column=a,this.leftoverVisibleColumns=r}}e.CursorPosition=v;class m{static leftPosition(h,a){if(a.column>h.getLineMinColumn(a.lineNumber))return a.delta(void 0,-t.prevCharLength(h.getLineContent(a.lineNumber),a.column-1));if(a.lineNumber>1){const r=a.lineNumber-1;return new b.Position(r,h.getLineMaxColumn(r))}else return a}static leftPositionAtomicSoftTabs(h,a,r){if(a.column<=h.getLineIndentColumn(a.lineNumber)){const i=h.getLineMinColumn(a.lineNumber),s=h.getLineContent(a.lineNumber),o=T.AtomicTabMoveOperations.atomicPosition(s,a.column-1,r,0);if(o!==-1&&o+1>=i)return new b.Position(a.lineNumber,o+1)}return this.leftPosition(h,a)}static left(h,a,r){const i=h.stickyTabStops?m.leftPositionAtomicSoftTabs(a,r,h.tabSize):m.leftPosition(a,r);return new v(i.lineNumber,i.column,0)}static moveLeft(h,a,r,i,s){let o,u;if(r.hasSelection()&&!i)o=r.selection.startLineNumber,u=r.selection.startColumn;else{const d=r.position.delta(void 0,-(s-1)),p=a.normalizePosition(m.clipPositionColumn(d,a),0),c=m.left(h,a,p);o=c.lineNumber,u=c.column}return r.move(i,o,u,0)}static clipPositionColumn(h,a){return new b.Position(h.lineNumber,m.clipRange(h.column,a.getLineMinColumn(h.lineNumber),a.getLineMaxColumn(h.lineNumber)))}static clipRange(h,a,r){return h<a?a:h>r?r:h}static rightPosition(h,a,r){return r<h.getLineMaxColumn(a)?r=r+t.nextCharLength(h.getLineContent(a),r-1):a<h.getLineCount()&&(a=a+1,r=h.getLineMinColumn(a)),new b.Position(a,r)}static rightPositionAtomicSoftTabs(h,a,r,i,s){if(r<h.getLineIndentColumn(a)){const o=h.getLineContent(a),u=T.AtomicTabMoveOperations.atomicPosition(o,r-1,i,1);if(u!==-1)return new b.Position(a,u+1)}return this.rightPosition(h,a,r)}static right(h,a,r){const i=h.stickyTabStops?m.rightPositionAtomicSoftTabs(a,r.lineNumber,r.column,h.tabSize,h.indentSize):m.rightPosition(a,r.lineNumber,r.column);return new v(i.lineNumber,i.column,0)}static moveRight(h,a,r,i,s){let o,u;if(r.hasSelection()&&!i)o=r.selection.endLineNumber,u=r.selection.endColumn;else{const d=r.position.delta(void 0,s-1),p=a.normalizePosition(m.clipPositionColumn(d,a),1),c=m.right(h,a,p);o=c.lineNumber,u=c.column}return r.move(i,o,u,0)}static vertical(h,a,r,i,s,o,u,d){const p=y.CursorColumns.visibleColumnFromColumn(a.getLineContent(r),i,h.tabSize)+s,c=a.getLineCount(),l=r===1&&i===1,n=r===c&&i===a.getLineMaxColumn(r),g=o<r?l:n;if(r=o,r<1?(r=1,u?i=a.getLineMinColumn(r):i=Math.min(a.getLineMaxColumn(r),i)):r>c?(r=c,u?i=a.getLineMaxColumn(r):i=Math.min(a.getLineMaxColumn(r),i)):i=h.columnFromVisibleColumn(a,r,p),g?s=0:s=p-y.CursorColumns.visibleColumnFromColumn(a.getLineContent(r),i,h.tabSize),d!==void 0){const w=new b.Position(r,i),E=a.normalizePosition(w,d);s=s+(i-E.column),r=E.lineNumber,i=E.column}return new v(r,i,s)}static down(h,a,r,i,s,o,u){return this.vertical(h,a,r,i,s,r+o,u,4)}static moveDown(h,a,r,i,s){let o,u;r.hasSelection()&&!i?(o=r.selection.endLineNumber,u=r.selection.endColumn):(o=r.position.lineNumber,u=r.position.column);let d=0,p;do if(p=m.down(h,a,o+d,u,r.leftoverVisibleColumns,s,!0),a.normalizePosition(new b.Position(p.lineNumber,p.column),2).lineNumber>o)break;while(d++<10&&o+d<a.getLineCount());return r.move(i,p.lineNumber,p.column,p.leftoverVisibleColumns)}static translateDown(h,a,r){const i=r.selection,s=m.down(h,a,i.selectionStartLineNumber,i.selectionStartColumn,r.selectionStartLeftoverVisibleColumns,1,!1),o=m.down(h,a,i.positionLineNumber,i.positionColumn,r.leftoverVisibleColumns,1,!1);return new f.SingleCursorState(new D.Range(s.lineNumber,s.column,s.lineNumber,s.column),0,s.leftoverVisibleColumns,new b.Position(o.lineNumber,o.column),o.leftoverVisibleColumns)}static up(h,a,r,i,s,o,u){return this.vertical(h,a,r,i,s,r-o,u,3)}static moveUp(h,a,r,i,s){let o,u;r.hasSelection()&&!i?(o=r.selection.startLineNumber,u=r.selection.startColumn):(o=r.position.lineNumber,u=r.position.column);const d=m.up(h,a,o,u,r.leftoverVisibleColumns,s,!0);return r.move(i,d.lineNumber,d.column,d.leftoverVisibleColumns)}static translateUp(h,a,r){const i=r.selection,s=m.up(h,a,i.selectionStartLineNumber,i.selectionStartColumn,r.selectionStartLeftoverVisibleColumns,1,!1),o=m.up(h,a,i.positionLineNumber,i.positionColumn,r.leftoverVisibleColumns,1,!1);return new f.SingleCursorState(new D.Range(s.lineNumber,s.column,s.lineNumber,s.column),0,s.leftoverVisibleColumns,new b.Position(o.lineNumber,o.column),o.leftoverVisibleColumns)}static _isBlankLine(h,a){return h.getLineFirstNonWhitespaceColumn(a)===0}static moveToPrevBlankLine(h,a,r,i){let s=r.position.lineNumber;for(;s>1&&this._isBlankLine(a,s);)s--;for(;s>1&&!this._isBlankLine(a,s);)s--;return r.move(i,s,a.getLineMinColumn(s),0)}static moveToNextBlankLine(h,a,r,i){const s=a.getLineCount();let o=r.position.lineNumber;for(;o<s&&this._isBlankLine(a,o);)o++;for(;o<s&&!this._isBlankLine(a,o);)o++;return r.move(i,o,a.getLineMinColumn(o),0)}static moveToBeginningOfLine(h,a,r,i){const s=r.position.lineNumber,o=a.getLineMinColumn(s),u=a.getLineFirstNonWhitespaceColumn(s)||o;let d;return r.position.column===u?d=o:d=u,r.move(i,s,d,0)}static moveToEndOfLine(h,a,r,i,s){const o=r.position.lineNumber,u=a.getLineMaxColumn(o);return r.move(i,o,u,s?1073741824-u:0)}static moveToBeginningOfBuffer(h,a,r,i){return r.move(i,1,1,0)}static moveToEndOfBuffer(h,a,r,i){const s=a.getLineCount(),o=a.getLineMaxColumn(s);return r.move(i,s,o,0)}}e.MoveOperations=m}),define(Q[796],Y([1,0,33,487,301,323,795,27,51]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteOperations=void 0;class m{static deleteRight(h,a,r,i){const s=[];let o=h!==3;for(let u=0,d=i.length;u<d;u++){const p=i[u];let c=p;if(c.isEmpty()){const l=p.getPosition(),n=T.MoveOperations.right(a,r,l);c=new f.Range(n.lineNumber,n.column,l.lineNumber,l.column)}if(c.isEmpty()){s[u]=null;continue}c.startLineNumber!==c.endLineNumber&&(o=!0),s[u]=new y.ReplaceCommand(c,"")}return[o,s]}static isAutoClosingPairDelete(h,a,r,i,s,o,u){if(a==="never"&&r==="never"||h==="never")return!1;for(let d=0,p=o.length;d<p;d++){const c=o[d],l=c.getPosition();if(!c.isEmpty())return!1;const n=s.getLineContent(l.lineNumber);if(l.column<2||l.column>=n.length+1)return!1;const g=n.charAt(l.column-2),w=i.get(g);if(!w)return!1;if((0,b.isQuote)(g)){if(r==="never")return!1}else if(a==="never")return!1;const E=n.charAt(l.column-1);let C=!1;for(const I of w)I.open===g&&I.close===E&&(C=!0);if(!C)return!1;if(h==="auto"){let I=!1;for(let _=0,A=u.length;_<A;_++){const k=u[_];if(l.lineNumber===k.startLineNumber&&l.column===k.startColumn){I=!0;break}}if(!I)return!1}}return!0}static _runAutoClosingPairDelete(h,a,r){const i=[];for(let s=0,o=r.length;s<o;s++){const u=r[s].getPosition(),d=new f.Range(u.lineNumber,u.column-1,u.lineNumber,u.column+1);i[s]=new y.ReplaceCommand(d,"")}return[!0,i]}static deleteLeft(h,a,r,i,s){if(this.isAutoClosingPairDelete(a.autoClosingDelete,a.autoClosingBrackets,a.autoClosingQuotes,a.autoClosingPairs.autoClosingPairsOpenByEnd,r,i,s))return this._runAutoClosingPairDelete(a,r,i);const o=[];let u=h!==2;for(let d=0,p=i.length;d<p;d++){const c=m.getDeleteRange(i[d],r,a);if(c.isEmpty()){o[d]=null;continue}c.startLineNumber!==c.endLineNumber&&(u=!0),o[d]=new y.ReplaceCommand(c,"")}return[u,o]}static getDeleteRange(h,a,r){if(!h.isEmpty())return h;const i=h.getPosition();if(r.useTabStops&&i.column>1){const s=a.getLineContent(i.lineNumber),o=t.firstNonWhitespaceIndex(s),u=o===-1?s.length+1:o+1;if(i.column<=u){const d=r.visibleColumnFromColumn(a,i),p=D.CursorColumns.prevIndentTabStop(d,r.indentSize),c=r.columnFromVisibleColumn(a,i.lineNumber,p);return new f.Range(i.lineNumber,c,i.lineNumber,i.column)}}return f.Range.fromPositions(m.getPositionAfterDeleteLeft(i,a),i)}static getPositionAfterDeleteLeft(h,a){if(h.column>1){const r=t.getLeftDeleteOffset(h.column-1,a.getLineContent(h.lineNumber));return h.with(void 0,r+1)}else if(h.lineNumber>1){const r=h.lineNumber-1;return new v.Position(r,a.getLineMaxColumn(r))}else return h}static cut(h,a,r){const i=[];let s=null;r.sort((o,u)=>v.Position.compare(o.getStartPosition(),u.getEndPosition()));for(let o=0,u=r.length;o<u;o++){const d=r[o];if(d.isEmpty())if(h.emptySelectionClipboard){const p=d.getPosition();let c,l,n,g;p.lineNumber<a.getLineCount()?(c=p.lineNumber,l=1,n=p.lineNumber+1,g=1):p.lineNumber>1&&s?.endLineNumber!==p.lineNumber?(c=p.lineNumber-1,l=a.getLineMaxColumn(p.lineNumber-1),n=p.lineNumber,g=a.getLineMaxColumn(p.lineNumber)):(c=p.lineNumber,l=1,n=p.lineNumber,g=a.getLineMaxColumn(p.lineNumber));const w=new f.Range(c,l,n,g);s=w,w.isEmpty()?i[o]=null:i[o]=new y.ReplaceCommand(w,"")}else i[o]=null;else i[o]=new y.ReplaceCommand(d,"")}return new b.EditOperationResult(0,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}e.DeleteOperations=m}),define(Q[662],Y([1,0,33,301,796,563,51,27]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordPartOperations=e.WordOperations=e.WordNavigationType=void 0;var v;(function(r){r[r.None=0]="None",r[r.Regular=1]="Regular",r[r.Separator=2]="Separator"})(v||(v={}));var m;(function(r){r[r.WordStart=0]="WordStart",r[r.WordStartFast=1]="WordStartFast",r[r.WordEnd=2]="WordEnd",r[r.WordAccessibility=3]="WordAccessibility"})(m||(e.WordNavigationType=m={}));class S{static _createWord(i,s,o,u,d){return{start:u,end:d,wordType:s,nextCharClass:o}}static _findPreviousWordOnLine(i,s,o){const u=s.getLineContent(o.lineNumber);return this._doFindPreviousWordOnLine(u,i,o)}static _doFindPreviousWordOnLine(i,s,o){let u=0;for(let d=o.column-2;d>=0;d--){const p=i.charCodeAt(d),c=s.get(p);if(c===0){if(u===2)return this._createWord(i,u,c,d+1,this._findEndOfWord(i,s,u,d+1));u=1}else if(c===2){if(u===1)return this._createWord(i,u,c,d+1,this._findEndOfWord(i,s,u,d+1));u=2}else if(c===1&&u!==0)return this._createWord(i,u,c,d+1,this._findEndOfWord(i,s,u,d+1))}return u!==0?this._createWord(i,u,1,0,this._findEndOfWord(i,s,u,0)):null}static _findEndOfWord(i,s,o,u){const d=i.length;for(let p=u;p<d;p++){const c=i.charCodeAt(p),l=s.get(c);if(l===1||o===1&&l===2||o===2&&l===0)return p}return d}static _findNextWordOnLine(i,s,o){const u=s.getLineContent(o.lineNumber);return this._doFindNextWordOnLine(u,i,o)}static _doFindNextWordOnLine(i,s,o){let u=0;const d=i.length;for(let p=o.column-1;p<d;p++){const c=i.charCodeAt(p),l=s.get(c);if(l===0){if(u===2)return this._createWord(i,u,l,this._findStartOfWord(i,s,u,p-1),p);u=1}else if(l===2){if(u===1)return this._createWord(i,u,l,this._findStartOfWord(i,s,u,p-1),p);u=2}else if(l===1&&u!==0)return this._createWord(i,u,l,this._findStartOfWord(i,s,u,p-1),p)}return u!==0?this._createWord(i,u,1,this._findStartOfWord(i,s,u,d-1),d):null}static _findStartOfWord(i,s,o,u){for(let d=u;d>=0;d--){const p=i.charCodeAt(d),c=s.get(p);if(c===1||o===1&&c===2||o===2&&c===0)return d+1}return 0}static moveWordLeft(i,s,o,u){let d=o.lineNumber,p=o.column;p===1&&d>1&&(d=d-1,p=s.getLineMaxColumn(d));let c=S._findPreviousWordOnLine(i,s,new T.Position(d,p));if(u===0)return new T.Position(d,c?c.start+1:1);if(u===1)return c&&c.wordType===2&&c.end-c.start===1&&c.nextCharClass===0&&(c=S._findPreviousWordOnLine(i,s,new T.Position(d,c.start+1))),new T.Position(d,c?c.start+1:1);if(u===3){for(;c&&c.wordType===2;)c=S._findPreviousWordOnLine(i,s,new T.Position(d,c.start+1));return new T.Position(d,c?c.start+1:1)}return c&&p<=c.end+1&&(c=S._findPreviousWordOnLine(i,s,new T.Position(d,c.start+1))),new T.Position(d,c?c.end+1:1)}static _moveWordPartLeft(i,s){const o=s.lineNumber,u=i.getLineMaxColumn(o);if(s.column===1)return o>1?new T.Position(o-1,i.getLineMaxColumn(o-1)):s;const d=i.getLineContent(o);for(let p=s.column-1;p>1;p--){const c=d.charCodeAt(p-2),l=d.charCodeAt(p-1);if(c===95&&l!==95)return new T.Position(o,p);if(c===45&&l!==45)return new T.Position(o,p);if((t.isLowerAsciiLetter(c)||t.isAsciiDigit(c))&&t.isUpperAsciiLetter(l))return new T.Position(o,p);if(t.isUpperAsciiLetter(c)&&t.isUpperAsciiLetter(l)&&p+1<u){const n=d.charCodeAt(p);if(t.isLowerAsciiLetter(n)||t.isAsciiDigit(n))return new T.Position(o,p)}}return new T.Position(o,1)}static moveWordRight(i,s,o,u){let d=o.lineNumber,p=o.column,c=!1;p===s.getLineMaxColumn(d)&&d<s.getLineCount()&&(c=!0,d=d+1,p=1);let l=S._findNextWordOnLine(i,s,new T.Position(d,p));if(u===2)l&&l.wordType===2&&l.end-l.start===1&&l.nextCharClass===0&&(l=S._findNextWordOnLine(i,s,new T.Position(d,l.end+1))),l?p=l.end+1:p=s.getLineMaxColumn(d);else if(u===3){for(c&&(p=0);l&&(l.wordType===2||l.start+1<=p);)l=S._findNextWordOnLine(i,s,new T.Position(d,l.end+1));l?p=l.start+1:p=s.getLineMaxColumn(d)}else l&&!c&&p>=l.start+1&&(l=S._findNextWordOnLine(i,s,new T.Position(d,l.end+1))),l?p=l.start+1:p=s.getLineMaxColumn(d);return new T.Position(d,p)}static _moveWordPartRight(i,s){const o=s.lineNumber,u=i.getLineMaxColumn(o);if(s.column===u)return o<i.getLineCount()?new T.Position(o+1,1):s;const d=i.getLineContent(o);for(let p=s.column+1;p<u;p++){const c=d.charCodeAt(p-2),l=d.charCodeAt(p-1);if(c!==95&&l===95)return new T.Position(o,p);if(c!==45&&l===45)return new T.Position(o,p);if((t.isLowerAsciiLetter(c)||t.isAsciiDigit(c))&&t.isUpperAsciiLetter(l))return new T.Position(o,p);if(t.isUpperAsciiLetter(c)&&t.isUpperAsciiLetter(l)&&p+1<u){const n=d.charCodeAt(p);if(t.isLowerAsciiLetter(n)||t.isAsciiDigit(n))return new T.Position(o,p)}}return new T.Position(o,u)}static _deleteWordLeftWhitespace(i,s){const o=i.getLineContent(s.lineNumber),u=s.column-2,d=t.lastNonWhitespaceIndex(o,u);return d+1<u?new f.Range(s.lineNumber,d+2,s.lineNumber,s.column):null}static deleteWordLeft(i,s){const o=i.wordSeparators,u=i.model,d=i.selection,p=i.whitespaceHeuristics;if(!d.isEmpty())return d;if(b.DeleteOperations.isAutoClosingPairDelete(i.autoClosingDelete,i.autoClosingBrackets,i.autoClosingQuotes,i.autoClosingPairs.autoClosingPairsOpenByEnd,i.model,[i.selection],i.autoClosedCharacters)){const w=i.selection.getPosition();return new f.Range(w.lineNumber,w.column-1,w.lineNumber,w.column+1)}const c=new T.Position(d.positionLineNumber,d.positionColumn);let l=c.lineNumber,n=c.column;if(l===1&&n===1)return null;if(p){const w=this._deleteWordLeftWhitespace(u,c);if(w)return w}let g=S._findPreviousWordOnLine(o,u,c);return s===0?g?n=g.start+1:n>1?n=1:(l--,n=u.getLineMaxColumn(l)):(g&&n<=g.end+1&&(g=S._findPreviousWordOnLine(o,u,new T.Position(l,g.start+1))),g?n=g.end+1:n>1?n=1:(l--,n=u.getLineMaxColumn(l))),new f.Range(l,n,c.lineNumber,c.column)}static deleteInsideWord(i,s,o){if(!o.isEmpty())return o;const u=new T.Position(o.positionLineNumber,o.positionColumn),d=this._deleteInsideWordWhitespace(s,u);return d||this._deleteInsideWordDetermineDeleteRange(i,s,u)}static _charAtIsWhitespace(i,s){const o=i.charCodeAt(s);return o===32||o===9}static _deleteInsideWordWhitespace(i,s){const o=i.getLineContent(s.lineNumber),u=o.length;if(u===0)return null;let d=Math.max(s.column-2,0);if(!this._charAtIsWhitespace(o,d))return null;let p=Math.min(s.column-1,u-1);if(!this._charAtIsWhitespace(o,p))return null;for(;d>0&&this._charAtIsWhitespace(o,d-1);)d--;for(;p+1<u&&this._charAtIsWhitespace(o,p+1);)p++;return new f.Range(s.lineNumber,d+1,s.lineNumber,p+2)}static _deleteInsideWordDetermineDeleteRange(i,s,o){const u=s.getLineContent(o.lineNumber),d=u.length;if(d===0)return o.lineNumber>1?new f.Range(o.lineNumber-1,s.getLineMaxColumn(o.lineNumber-1),o.lineNumber,1):o.lineNumber<s.getLineCount()?new f.Range(o.lineNumber,1,o.lineNumber+1,1):new f.Range(o.lineNumber,1,o.lineNumber,1);const p=w=>w.start+1<=o.column&&o.column<=w.end+1,c=(w,E)=>(w=Math.min(w,o.column),E=Math.max(E,o.column),new f.Range(o.lineNumber,w,o.lineNumber,E)),l=w=>{let E=w.start+1,C=w.end+1,I=!1;for(;C-1<d&&this._charAtIsWhitespace(u,C-1);)I=!0,C++;if(!I)for(;E>1&&this._charAtIsWhitespace(u,E-2);)E--;return c(E,C)},n=S._findPreviousWordOnLine(i,s,o);if(n&&p(n))return l(n);const g=S._findNextWordOnLine(i,s,o);return g&&p(g)?l(g):n&&g?c(n.end+1,g.start+1):n?c(n.start+1,n.end+1):g?c(g.start+1,g.end+1):c(1,d+1)}static _deleteWordPartLeft(i,s){if(!s.isEmpty())return s;const o=s.getPosition(),u=S._moveWordPartLeft(i,o);return new f.Range(o.lineNumber,o.column,u.lineNumber,u.column)}static _findFirstNonWhitespaceChar(i,s){const o=i.length;for(let u=s;u<o;u++){const d=i.charAt(u);if(d!==" "&&d!==" ")return u}return o}static _deleteWordRightWhitespace(i,s){const o=i.getLineContent(s.lineNumber),u=s.column-1,d=this._findFirstNonWhitespaceChar(o,u);return u+1<d?new f.Range(s.lineNumber,s.column,s.lineNumber,d+1):null}static deleteWordRight(i,s){const o=i.wordSeparators,u=i.model,d=i.selection,p=i.whitespaceHeuristics;if(!d.isEmpty())return d;const c=new T.Position(d.positionLineNumber,d.positionColumn);let l=c.lineNumber,n=c.column;const g=u.getLineCount(),w=u.getLineMaxColumn(l);if(l===g&&n===w)return null;if(p){const C=this._deleteWordRightWhitespace(u,c);if(C)return C}let E=S._findNextWordOnLine(o,u,c);return s===2?E?n=E.end+1:n<w||l===g?n=w:(l++,E=S._findNextWordOnLine(o,u,new T.Position(l,1)),E?n=E.start+1:n=u.getLineMaxColumn(l)):(E&&n>=E.start+1&&(E=S._findNextWordOnLine(o,u,new T.Position(l,E.end+1))),E?n=E.start+1:n<w||l===g?n=w:(l++,E=S._findNextWordOnLine(o,u,new T.Position(l,1)),E?n=E.start+1:n=u.getLineMaxColumn(l))),new f.Range(l,n,c.lineNumber,c.column)}static _deleteWordPartRight(i,s){if(!s.isEmpty())return s;const o=s.getPosition(),u=S._moveWordPartRight(i,o);return new f.Range(o.lineNumber,o.column,u.lineNumber,u.column)}static _createWordAtPosition(i,s,o){const u=new f.Range(s,o.start+1,s,o.end+1);return{word:i.getValueInRange(u),startColumn:u.startColumn,endColumn:u.endColumn}}static getWordAtPosition(i,s,o){const u=(0,D.getMapForWordSeparators)(s),d=S._findPreviousWordOnLine(u,i,o);if(d&&d.wordType===1&&d.start<=o.column-1&&o.column-1<=d.end)return S._createWordAtPosition(i,o.lineNumber,d);const p=S._findNextWordOnLine(u,i,o);return p&&p.wordType===1&&p.start<=o.column-1&&o.column-1<=p.end?S._createWordAtPosition(i,o.lineNumber,p):null}static word(i,s,o,u,d){const p=(0,D.getMapForWordSeparators)(i.wordSeparators),c=S._findPreviousWordOnLine(p,s,d),l=S._findNextWordOnLine(p,s,d);if(!u){let C,I;return c&&c.wordType===1&&c.start<=d.column-1&&d.column-1<=c.end?(C=c.start+1,I=c.end+1):l&&l.wordType===1&&l.start<=d.column-1&&d.column-1<=l.end?(C=l.start+1,I=l.end+1):(c?C=c.end+1:C=1,l?I=l.start+1:I=s.getLineMaxColumn(d.lineNumber)),new y.SingleCursorState(new f.Range(d.lineNumber,C,d.lineNumber,I),1,0,new T.Position(d.lineNumber,I),0)}let n,g;c&&c.wordType===1&&c.start<d.column-1&&d.column-1<c.end?(n=c.start+1,g=c.end+1):l&&l.wordType===1&&l.start<d.column-1&&d.column-1<l.end?(n=l.start+1,g=l.end+1):(n=d.column,g=d.column);const w=d.lineNumber;let E;if(o.selectionStart.containsPosition(d))E=o.selectionStart.endColumn;else if(d.isBeforeOrEqual(o.selectionStart.getStartPosition())){E=n;const C=new T.Position(w,E);o.selectionStart.containsPosition(C)&&(E=o.selectionStart.endColumn)}else{E=g;const C=new T.Position(w,E);o.selectionStart.containsPosition(C)&&(E=o.selectionStart.startColumn)}return o.move(!0,w,E,0)}}e.WordOperations=S;class h extends S{static deleteWordPartLeft(i){const s=a([S.deleteWordLeft(i,0),S.deleteWordLeft(i,2),S._deleteWordPartLeft(i.model,i.selection)]);return s.sort(f.Range.compareRangesUsingEnds),s[2]}static deleteWordPartRight(i){const s=a([S.deleteWordRight(i,0),S.deleteWordRight(i,2),S._deleteWordPartRight(i.model,i.selection)]);return s.sort(f.Range.compareRangesUsingStarts),s[0]}static moveWordPartLeft(i,s,o){const u=a([S.moveWordLeft(i,s,o,0),S.moveWordLeft(i,s,o,2),S._moveWordPartLeft(s,o)]);return u.sort(T.Position.compare),u[2]}static moveWordPartRight(i,s,o){const u=a([S.moveWordRight(i,s,o,0),S.moveWordRight(i,s,o,2),S._moveWordPartRight(s,o)]);return u.sort(T.Position.compare),u[0]}}e.WordPartOperations=h;function a(r){return r.filter(i=>!!i)}}),define(Q[797],Y([1,0,17,301,795,662,51,27]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorMove=e.CursorMoveCommands=void 0;class v{static addCursorDown(h,a,r){const i=[];let s=0;for(let o=0,u=a.length;o<u;o++){const d=a[o];i[s++]=new y.CursorState(d.modelState,d.viewState),r?i[s++]=y.CursorState.fromModelState(b.MoveOperations.translateDown(h.cursorConfig,h.model,d.modelState)):i[s++]=y.CursorState.fromViewState(b.MoveOperations.translateDown(h.cursorConfig,h,d.viewState))}return i}static addCursorUp(h,a,r){const i=[];let s=0;for(let o=0,u=a.length;o<u;o++){const d=a[o];i[s++]=new y.CursorState(d.modelState,d.viewState),r?i[s++]=y.CursorState.fromModelState(b.MoveOperations.translateUp(h.cursorConfig,h.model,d.modelState)):i[s++]=y.CursorState.fromViewState(b.MoveOperations.translateUp(h.cursorConfig,h,d.viewState))}return i}static moveToBeginningOfLine(h,a,r){const i=[];for(let s=0,o=a.length;s<o;s++){const u=a[s];i[s]=this._moveToLineStart(h,u,r)}return i}static _moveToLineStart(h,a,r){const i=a.viewState.position.column,s=a.modelState.position.column,o=i===s,u=a.viewState.position.lineNumber,d=h.getLineFirstNonWhitespaceColumn(u);return!o&&!(i===d)?this._moveToLineStartByView(h,a,r):this._moveToLineStartByModel(h,a,r)}static _moveToLineStartByView(h,a,r){return y.CursorState.fromViewState(b.MoveOperations.moveToBeginningOfLine(h.cursorConfig,h,a.viewState,r))}static _moveToLineStartByModel(h,a,r){return y.CursorState.fromModelState(b.MoveOperations.moveToBeginningOfLine(h.cursorConfig,h.model,a.modelState,r))}static moveToEndOfLine(h,a,r,i){const s=[];for(let o=0,u=a.length;o<u;o++){const d=a[o];s[o]=this._moveToLineEnd(h,d,r,i)}return s}static _moveToLineEnd(h,a,r,i){const s=a.viewState.position,o=h.getLineMaxColumn(s.lineNumber),u=s.column===o,d=a.modelState.position,p=h.model.getLineMaxColumn(d.lineNumber),c=o-s.column===p-d.column;return u||c?this._moveToLineEndByModel(h,a,r,i):this._moveToLineEndByView(h,a,r,i)}static _moveToLineEndByView(h,a,r,i){return y.CursorState.fromViewState(b.MoveOperations.moveToEndOfLine(h.cursorConfig,h,a.viewState,r,i))}static _moveToLineEndByModel(h,a,r,i){return y.CursorState.fromModelState(b.MoveOperations.moveToEndOfLine(h.cursorConfig,h.model,a.modelState,r,i))}static expandLineSelection(h,a){const r=[];for(let i=0,s=a.length;i<s;i++){const o=a[i],u=o.modelState.selection.startLineNumber,d=h.model.getLineCount();let p=o.modelState.selection.endLineNumber,c;p===d?c=h.model.getLineMaxColumn(d):(p++,c=1),r[i]=y.CursorState.fromModelState(new y.SingleCursorState(new f.Range(u,1,u,1),0,0,new T.Position(p,c),0))}return r}static moveToBeginningOfBuffer(h,a,r){const i=[];for(let s=0,o=a.length;s<o;s++){const u=a[s];i[s]=y.CursorState.fromModelState(b.MoveOperations.moveToBeginningOfBuffer(h.cursorConfig,h.model,u.modelState,r))}return i}static moveToEndOfBuffer(h,a,r){const i=[];for(let s=0,o=a.length;s<o;s++){const u=a[s];i[s]=y.CursorState.fromModelState(b.MoveOperations.moveToEndOfBuffer(h.cursorConfig,h.model,u.modelState,r))}return i}static selectAll(h,a){const r=h.model.getLineCount(),i=h.model.getLineMaxColumn(r);return y.CursorState.fromModelState(new y.SingleCursorState(new f.Range(1,1,1,1),0,0,new T.Position(r,i),0))}static line(h,a,r,i,s){const o=h.model.validatePosition(i),u=s?h.coordinatesConverter.validateViewPosition(new T.Position(s.lineNumber,s.column),o):h.coordinatesConverter.convertModelPositionToViewPosition(o);if(!r){const p=h.model.getLineCount();let c=o.lineNumber+1,l=1;return c>p&&(c=p,l=h.model.getLineMaxColumn(c)),y.CursorState.fromModelState(new y.SingleCursorState(new f.Range(o.lineNumber,1,c,l),2,0,new T.Position(c,l),0))}const d=a.modelState.selectionStart.getStartPosition().lineNumber;if(o.lineNumber<d)return y.CursorState.fromViewState(a.viewState.move(!0,u.lineNumber,1,0));if(o.lineNumber>d){const p=h.getLineCount();let c=u.lineNumber+1,l=1;return c>p&&(c=p,l=h.getLineMaxColumn(c)),y.CursorState.fromViewState(a.viewState.move(!0,c,l,0))}else{const p=a.modelState.selectionStart.getEndPosition();return y.CursorState.fromModelState(a.modelState.move(!0,p.lineNumber,p.column,0))}}static word(h,a,r,i){const s=h.model.validatePosition(i);return y.CursorState.fromModelState(D.WordOperations.word(h.cursorConfig,h.model,a.modelState,r,s))}static cancelSelection(h,a){if(!a.modelState.hasSelection())return new y.CursorState(a.modelState,a.viewState);const r=a.viewState.position.lineNumber,i=a.viewState.position.column;return y.CursorState.fromViewState(new y.SingleCursorState(new f.Range(r,i,r,i),0,0,new T.Position(r,i),0))}static moveTo(h,a,r,i,s){if(r){if(a.modelState.selectionStartKind===1)return this.word(h,a,r,i);if(a.modelState.selectionStartKind===2)return this.line(h,a,r,i,s)}const o=h.model.validatePosition(i),u=s?h.coordinatesConverter.validateViewPosition(new T.Position(s.lineNumber,s.column),o):h.coordinatesConverter.convertModelPositionToViewPosition(o);return y.CursorState.fromViewState(a.viewState.move(r,u.lineNumber,u.column,0))}static simpleMove(h,a,r,i,s,o){switch(r){case 0:return o===4?this._moveHalfLineLeft(h,a,i):this._moveLeft(h,a,i,s);case 1:return o===4?this._moveHalfLineRight(h,a,i):this._moveRight(h,a,i,s);case 2:return o===2?this._moveUpByViewLines(h,a,i,s):this._moveUpByModelLines(h,a,i,s);case 3:return o===2?this._moveDownByViewLines(h,a,i,s):this._moveDownByModelLines(h,a,i,s);case 4:return o===2?a.map(u=>y.CursorState.fromViewState(b.MoveOperations.moveToPrevBlankLine(h.cursorConfig,h,u.viewState,i))):a.map(u=>y.CursorState.fromModelState(b.MoveOperations.moveToPrevBlankLine(h.cursorConfig,h.model,u.modelState,i)));case 5:return o===2?a.map(u=>y.CursorState.fromViewState(b.MoveOperations.moveToNextBlankLine(h.cursorConfig,h,u.viewState,i))):a.map(u=>y.CursorState.fromModelState(b.MoveOperations.moveToNextBlankLine(h.cursorConfig,h.model,u.modelState,i)));case 6:return this._moveToViewMinColumn(h,a,i);case 7:return this._moveToViewFirstNonWhitespaceColumn(h,a,i);case 8:return this._moveToViewCenterColumn(h,a,i);case 9:return this._moveToViewMaxColumn(h,a,i);case 10:return this._moveToViewLastNonWhitespaceColumn(h,a,i);default:return null}}static viewportMove(h,a,r,i,s){const o=h.getCompletelyVisibleViewRange(),u=h.coordinatesConverter.convertViewRangeToModelRange(o);switch(r){case 11:{const d=this._firstLineNumberInRange(h.model,u,s),p=h.model.getLineFirstNonWhitespaceColumn(d);return[this._moveToModelPosition(h,a[0],i,d,p)]}case 13:{const d=this._lastLineNumberInRange(h.model,u,s),p=h.model.getLineFirstNonWhitespaceColumn(d);return[this._moveToModelPosition(h,a[0],i,d,p)]}case 12:{const d=Math.round((u.startLineNumber+u.endLineNumber)/2),p=h.model.getLineFirstNonWhitespaceColumn(d);return[this._moveToModelPosition(h,a[0],i,d,p)]}case 14:{const d=[];for(let p=0,c=a.length;p<c;p++){const l=a[p];d[p]=this.findPositionInViewportIfOutside(h,l,o,i)}return d}default:return null}}static findPositionInViewportIfOutside(h,a,r,i){const s=a.viewState.position.lineNumber;if(r.startLineNumber<=s&&s<=r.endLineNumber-1)return new y.CursorState(a.modelState,a.viewState);{let o;s>r.endLineNumber-1?o=r.endLineNumber-1:s<r.startLineNumber?o=r.startLineNumber:o=s;const u=b.MoveOperations.vertical(h.cursorConfig,h,s,a.viewState.position.column,a.viewState.leftoverVisibleColumns,o,!1);return y.CursorState.fromViewState(a.viewState.move(i,u.lineNumber,u.column,u.leftoverVisibleColumns))}}static _firstLineNumberInRange(h,a,r){let i=a.startLineNumber;return a.startColumn!==h.getLineMinColumn(i)&&i++,Math.min(a.endLineNumber,i+r-1)}static _lastLineNumberInRange(h,a,r){let i=a.startLineNumber;return a.startColumn!==h.getLineMinColumn(i)&&i++,Math.max(i,a.endLineNumber-r+1)}static _moveLeft(h,a,r,i){return a.map(s=>y.CursorState.fromViewState(b.MoveOperations.moveLeft(h.cursorConfig,h,s.viewState,r,i)))}static _moveHalfLineLeft(h,a,r){const i=[];for(let s=0,o=a.length;s<o;s++){const u=a[s],d=u.viewState.position.lineNumber,p=Math.round(h.getLineContent(d).length/2);i[s]=y.CursorState.fromViewState(b.MoveOperations.moveLeft(h.cursorConfig,h,u.viewState,r,p))}return i}static _moveRight(h,a,r,i){return a.map(s=>y.CursorState.fromViewState(b.MoveOperations.moveRight(h.cursorConfig,h,s.viewState,r,i)))}static _moveHalfLineRight(h,a,r){const i=[];for(let s=0,o=a.length;s<o;s++){const u=a[s],d=u.viewState.position.lineNumber,p=Math.round(h.getLineContent(d).length/2);i[s]=y.CursorState.fromViewState(b.MoveOperations.moveRight(h.cursorConfig,h,u.viewState,r,p))}return i}static _moveDownByViewLines(h,a,r,i){const s=[];for(let o=0,u=a.length;o<u;o++){const d=a[o];s[o]=y.CursorState.fromViewState(b.MoveOperations.moveDown(h.cursorConfig,h,d.viewState,r,i))}return s}static _moveDownByModelLines(h,a,r,i){const s=[];for(let o=0,u=a.length;o<u;o++){const d=a[o];s[o]=y.CursorState.fromModelState(b.MoveOperations.moveDown(h.cursorConfig,h.model,d.modelState,r,i))}return s}static _moveUpByViewLines(h,a,r,i){const s=[];for(let o=0,u=a.length;o<u;o++){const d=a[o];s[o]=y.CursorState.fromViewState(b.MoveOperations.moveUp(h.cursorConfig,h,d.viewState,r,i))}return s}static _moveUpByModelLines(h,a,r,i){const s=[];for(let o=0,u=a.length;o<u;o++){const d=a[o];s[o]=y.CursorState.fromModelState(b.MoveOperations.moveUp(h.cursorConfig,h.model,d.modelState,r,i))}return s}static _moveToViewPosition(h,a,r,i,s){return y.CursorState.fromViewState(a.viewState.move(r,i,s,0))}static _moveToModelPosition(h,a,r,i,s){return y.CursorState.fromModelState(a.modelState.move(r,i,s,0))}static _moveToViewMinColumn(h,a,r){const i=[];for(let s=0,o=a.length;s<o;s++){const u=a[s],d=u.viewState.position.lineNumber,p=h.getLineMinColumn(d);i[s]=this._moveToViewPosition(h,u,r,d,p)}return i}static _moveToViewFirstNonWhitespaceColumn(h,a,r){const i=[];for(let s=0,o=a.length;s<o;s++){const u=a[s],d=u.viewState.position.lineNumber,p=h.getLineFirstNonWhitespaceColumn(d);i[s]=this._moveToViewPosition(h,u,r,d,p)}return i}static _moveToViewCenterColumn(h,a,r){const i=[];for(let s=0,o=a.length;s<o;s++){const u=a[s],d=u.viewState.position.lineNumber,p=Math.round((h.getLineMaxColumn(d)+h.getLineMinColumn(d))/2);i[s]=this._moveToViewPosition(h,u,r,d,p)}return i}static _moveToViewMaxColumn(h,a,r){const i=[];for(let s=0,o=a.length;s<o;s++){const u=a[s],d=u.viewState.position.lineNumber,p=h.getLineMaxColumn(d);i[s]=this._moveToViewPosition(h,u,r,d,p)}return i}static _moveToViewLastNonWhitespaceColumn(h,a,r){const i=[];for(let s=0,o=a.length;s<o;s++){const u=a[s],d=u.viewState.position.lineNumber,p=h.getLineLastNonWhitespaceColumn(d);i[s]=this._moveToViewPosition(h,u,r,d,p)}return i}}e.CursorMoveCommands=v;var m;(function(S){const h=function(s){if(!t.isObject(s))return!1;const o=s;return!(!t.isString(o.to)||!t.isUndefined(o.select)&&!t.isBoolean(o.select)||!t.isUndefined(o.by)&&!t.isString(o.by)||!t.isUndefined(o.value)&&!t.isNumber(o.value))};S.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:`Property-value pairs that can be passed through this argument: * 'to': A mandatory logical position value providing where to move the cursor. \`\`\` 'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine', 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter' 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter' 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside' \`\`\` * 'by': Unit to move. Default is computed based on 'to' value. \`\`\` 'line', 'wrappedLine', 'character', 'halfLine' \`\`\` * 'value': Number of units to move. Default is '1'. * 'select': If 'true' makes the selection. Default is 'false'. `,constraint:h,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},S.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},S.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function a(s){if(!s.to)return null;let o;switch(s.to){case S.RawDirection.Left:o=0;break;case S.RawDirection.Right:o=1;break;case S.RawDirection.Up:o=2;break;case S.RawDirection.Down:o=3;break;case S.RawDirection.PrevBlankLine:o=4;break;case S.RawDirection.NextBlankLine:o=5;break;case S.RawDirection.WrappedLineStart:o=6;break;case S.RawDirection.WrappedLineFirstNonWhitespaceCharacter:o=7;break;case S.RawDirection.WrappedLineColumnCenter:o=8;break;case S.RawDirection.WrappedLineEnd:o=9;break;case S.RawDirection.WrappedLineLastNonWhitespaceCharacter:o=10;break;case S.RawDirection.ViewPortTop:o=11;break;case S.RawDirection.ViewPortBottom:o=13;break;case S.RawDirection.ViewPortCenter:o=12;break;case S.RawDirection.ViewPortIfOutside:o=14;break;default:return null}let u=0;switch(s.by){case S.RawUnit.Line:u=1;break;case S.RawUnit.WrappedLine:u=2;break;case S.RawUnit.Character:u=3;break;case S.RawUnit.HalfLine:u=4;break}return{direction:o,unit:u,select:!!s.select,value:s.value||1}}S.parse=a;let r;(function(s){s[s.Left=0]="Left",s[s.Right=1]="Right",s[s.Up=2]="Up",s[s.Down=3]="Down",s[s.PrevBlankLine=4]="PrevBlankLine",s[s.NextBlankLine=5]="NextBlankLine",s[s.WrappedLineStart=6]="WrappedLineStart",s[s.WrappedLineFirstNonWhitespaceCharacter=7]="WrappedLineFirstNonWhitespaceCharacter",s[s.WrappedLineColumnCenter=8]="WrappedLineColumnCenter",s[s.WrappedLineEnd=9]="WrappedLineEnd",s[s.WrappedLineLastNonWhitespaceCharacter=10]="WrappedLineLastNonWhitespaceCharacter",s[s.ViewPortTop=11]="ViewPortTop",s[s.ViewPortCenter=12]="ViewPortCenter",s[s.ViewPortBottom=13]="ViewPortBottom",s[s.ViewPortIfOutside=14]="ViewPortIfOutside"})(r=S.Direction||(S.Direction={}));let i;(function(s){s[s.None=0]="None",s[s.Line=1]="Line",s[s.WrappedLine=2]="WrappedLine",s[s.Character=3]="Character",s[s.HalfLine=4]="HalfLine"})(i=S.Unit||(S.Unit={}))})(m||(e.CursorMove=m={}))}),define(Q[1870],Y([1,0,301,51,27,96]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cursor=void 0;class T{constructor(v){this._selTrackedRange=null,this._trackSelection=!0,this._setState(v,new t.SingleCursorState(new b.Range(1,1,1,1),0,0,new y.Position(1,1),0),new t.SingleCursorState(new b.Range(1,1,1,1),0,0,new y.Position(1,1),0))}dispose(v){this._removeTrackedRange(v)}startTrackingSelection(v){this._trackSelection=!0,this._updateTrackedRange(v)}stopTrackingSelection(v){this._trackSelection=!1,this._removeTrackedRange(v)}_updateTrackedRange(v){this._trackSelection&&(this._selTrackedRange=v.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(v){this._selTrackedRange=v.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new t.CursorState(this.modelState,this.viewState)}readSelectionFromMarkers(v){const m=v.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!m.isEmpty()?D.Selection.fromRange(m.collapseToEnd(),this.modelState.selection.getDirection()):D.Selection.fromRange(m,this.modelState.selection.getDirection())}ensureValidState(v){this._setState(v,this.modelState,this.viewState)}setState(v,m,S){this._setState(v,m,S)}static _validatePositionWithCache(v,m,S,h){return m.equals(S)?h:v.normalizePosition(m,2)}static _validateViewState(v,m){const S=m.position,h=m.selectionStart.getStartPosition(),a=m.selectionStart.getEndPosition(),r=v.normalizePosition(S,2),i=this._validatePositionWithCache(v,h,S,r),s=this._validatePositionWithCache(v,a,h,i);return S.equals(r)&&h.equals(i)&&a.equals(s)?m:new t.SingleCursorState(b.Range.fromPositions(i,s),m.selectionStartKind,m.selectionStartLeftoverVisibleColumns+h.column-i.column,r,m.leftoverVisibleColumns+S.column-r.column)}_setState(v,m,S){if(S&&(S=T._validateViewState(v.viewModel,S)),m){const h=v.model.validateRange(m.selectionStart),a=m.selectionStart.equalsRange(h)?m.selectionStartLeftoverVisibleColumns:0,r=v.model.validatePosition(m.position),i=m.position.equals(r)?m.leftoverVisibleColumns:0;m=new t.SingleCursorState(h,m.selectionStartKind,a,r,i)}else{if(!S)return;const h=v.model.validateRange(v.coordinatesConverter.convertViewRangeToModelRange(S.selectionStart)),a=v.model.validatePosition(v.coordinatesConverter.convertViewPositionToModelPosition(S.position));m=new t.SingleCursorState(h,S.selectionStartKind,S.selectionStartLeftoverVisibleColumns,a,S.leftoverVisibleColumns)}if(S){const h=v.coordinatesConverter.validateViewRange(S.selectionStart,m.selectionStart),a=v.coordinatesConverter.validateViewPosition(S.position,m.position);S=new t.SingleCursorState(h,m.selectionStartKind,m.selectionStartLeftoverVisibleColumns,a,m.leftoverVisibleColumns)}else{const h=v.coordinatesConverter.convertModelPositionToViewPosition(new y.Position(m.selectionStart.startLineNumber,m.selectionStart.startColumn)),a=v.coordinatesConverter.convertModelPositionToViewPosition(new y.Position(m.selectionStart.endLineNumber,m.selectionStart.endColumn)),r=new b.Range(h.lineNumber,h.column,a.lineNumber,a.column),i=v.coordinatesConverter.convertModelPositionToViewPosition(m.position);S=new t.SingleCursorState(r,m.selectionStartKind,m.selectionStartLeftoverVisibleColumns,i,m.leftoverVisibleColumns)}this.modelState=m,this.viewState=S,this._updateTrackedRange(v)}}e.Cursor=T}),define(Q[1871],Y([1,0,20,301,1870,51,27,96]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorCollection=void 0;class v{constructor(S){this.context=S,this.cursors=[new b.Cursor(S)],this.lastAddedCursorIndex=0}dispose(){for(const S of this.cursors)S.dispose(this.context)}startTrackingSelections(){for(const S of this.cursors)S.startTrackingSelection(this.context)}stopTrackingSelections(){for(const S of this.cursors)S.stopTrackingSelection(this.context)}updateContext(S){this.context=S}ensureValidState(){for(const S of this.cursors)S.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(S=>S.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(S=>S.asCursorState())}getViewPositions(){return this.cursors.map(S=>S.viewState.position)}getTopMostViewPosition(){return(0,t.findMinBy)(this.cursors,(0,t.compareBy)(S=>S.viewState.position,D.Position.compare)).viewState.position}getBottomMostViewPosition(){return(0,t.findLastMaxBy)(this.cursors,(0,t.compareBy)(S=>S.viewState.position,D.Position.compare)).viewState.position}getSelections(){return this.cursors.map(S=>S.modelState.selection)}getViewSelections(){return this.cursors.map(S=>S.viewState.selection)}setSelections(S){this.setStates(y.CursorState.fromModelSelections(S))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(S){S!==null&&(this.cursors[0].setState(this.context,S[0].modelState,S[0].viewState),this._setSecondaryStates(S.slice(1)))}_setSecondaryStates(S){const h=this.cursors.length-1,a=S.length;if(h<a){const r=a-h;for(let i=0;i<r;i++)this._addSecondaryCursor()}else if(h>a){const r=h-a;for(let i=0;i<r;i++)this._removeSecondaryCursor(this.cursors.length-2)}for(let r=0;r<a;r++)this.cursors[r+1].setState(this.context,S[r].modelState,S[r].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new b.Cursor(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return this.cursors.length===1||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(S){this.lastAddedCursorIndex>=S+1&&this.lastAddedCursorIndex--,this.cursors[S+1].dispose(this.context),this.cursors.splice(S+1,1)}normalize(){if(this.cursors.length===1)return;const S=this.cursors.slice(0),h=[];for(let a=0,r=S.length;a<r;a++)h.push({index:a,selection:S[a].modelState.selection});h.sort((0,t.compareBy)(a=>a.selection,T.Range.compareRangesUsingStarts));for(let a=0;a<h.length-1;a++){const r=h[a],i=h[a+1],s=r.selection,o=i.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let u;if(o.isEmpty()||s.isEmpty()?u=o.getStartPosition().isBeforeOrEqual(s.getEndPosition()):u=o.getStartPosition().isBefore(s.getEndPosition()),u){const d=r.index<i.index?a:a+1,p=r.index<i.index?a+1:a,c=h[p].index,l=h[d].index,n=h[p].selection,g=h[d].selection;if(!n.equalsSelection(g)){const w=n.plusRange(g),E=n.selectionStartLineNumber===n.startLineNumber&&n.selectionStartColumn===n.startColumn,C=g.selectionStartLineNumber===g.startLineNumber&&g.selectionStartColumn===g.startColumn;let I;c===this.lastAddedCursorIndex?(I=E,this.lastAddedCursorIndex=l):I=C;let _;I?_=new f.Selection(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn):_=new f.Selection(w.endLineNumber,w.endColumn,w.startLineNumber,w.startColumn),h[d].selection=_;const A=y.CursorState.fromModelSelection(_);S[l].setState(this.context,A.modelState,A.viewState)}for(const w of h)w.index>c&&w.index--;S.splice(c,1),h.splice(p,1),this._removeSecondaryCursor(c-1),a--}}}}e.CursorCollection=v}),define(Q[1872],Y([1,0,394]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterPairSupport=void 0;class y{static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> `}static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])> `}static{this.DEFAULT_AUTOCLOSE_BEFORE_WHITESPACE=` `}constructor(D){if(D.autoClosingPairs?this._autoClosingPairs=D.autoClosingPairs.map(T=>new t.StandardAutoClosingPairConditional(T)):D.brackets?this._autoClosingPairs=D.brackets.map(T=>new t.StandardAutoClosingPairConditional({open:T[0],close:T[1]})):this._autoClosingPairs=[],D.__electricCharacterSupport&&D.__electricCharacterSupport.docComment){const T=D.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new t.StandardAutoClosingPairConditional({open:T.open,close:T.close||""}))}this._autoCloseBeforeForQuotes=typeof D.autoCloseBefore=="string"?D.autoCloseBefore:y.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof D.autoCloseBefore=="string"?D.autoCloseBefore:y.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=D.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(D){return D?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}e.CharacterPairSupport=y}),define(Q[1873],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentRulesSupport=e.IndentConsts=void 0;var t;(function(D){D[D.INCREASE_MASK=1]="INCREASE_MASK",D[D.DECREASE_MASK=2]="DECREASE_MASK",D[D.INDENT_NEXTLINE_MASK=4]="INDENT_NEXTLINE_MASK",D[D.UNINDENT_MASK=8]="UNINDENT_MASK"})(t||(e.IndentConsts=t={}));function y(D){return D.global&&(D.lastIndex=0),!0}class b{constructor(T){this._indentationRules=T}shouldIncrease(T){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&y(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(T))}shouldDecrease(T){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&y(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(T))}shouldIndentNextLine(T){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&y(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(T))}shouldIgnore(T){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&y(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(T))}getIndentMetadata(T){let f=0;return this.shouldIncrease(T)&&(f+=1),this.shouldDecrease(T)&&(f+=2),this.shouldIndentNextLine(T)&&(f+=4),this.shouldIgnore(T)&&(f+=8),f}}e.IndentRulesSupport=b}),define(Q[1874],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicInplaceReplace=void 0;class t{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}static{this.INSTANCE=new t}navigateValueSet(b,D,T,f,v){if(b&&D){const m=this.doNavigateValueSet(D,v);if(m)return{range:b,value:m}}if(T&&f){const m=this.doNavigateValueSet(f,v);if(m)return{range:T,value:m}}return null}doNavigateValueSet(b,D){const T=this.numberReplace(b,D);return T!==null?T:this.textReplace(b,D)}numberReplace(b,D){const T=Math.pow(10,b.length-(b.lastIndexOf(".")+1));let f=Number(b);const v=parseFloat(b);return!isNaN(f)&&!isNaN(v)&&f===v?f===0&&!D?null:(f=Math.floor(f*T),f+=D?T:-T,String(f/T)):null}textReplace(b,D){return this.valueSetsReplace(this._defaultValueSet,b,D)}valueSetsReplace(b,D,T){let f=null;for(let v=0,m=b.length;f===null&&v<m;v++)f=this.valueSetReplace(b[v],D,T);return f}valueSetReplace(b,D,T){let f=b.indexOf(D);return f>=0?(f+=T?1:-1,f<0?f=b.length-1:f%=b.length,b[f]):null}}e.BasicInplaceReplace=t}),define(Q[1875],Y([1,0,650]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClosingBracketKind=e.OpeningBracketKind=e.BracketKindBase=e.LanguageBracketsConfiguration=void 0;class y{constructor(m,S){this.languageId=m;const h=S.brackets?b(S.brackets):[],a=new t.CachedFunction(s=>{const o=new Set;return{info:new T(this,s,o),closing:o}}),r=new t.CachedFunction(s=>{const o=new Set,u=new Set;return{info:new f(this,s,o,u),opening:o,openingColorized:u}});for(const[s,o]of h){const u=a.get(s),d=r.get(o);u.closing.add(d.info),d.opening.add(u.info)}const i=S.colorizedBracketPairs?b(S.colorizedBracketPairs):h.filter(s=>!(s[0]==="<"&&s[1]===">"));for(const[s,o]of i){const u=a.get(s),d=r.get(o);u.closing.add(d.info),d.openingColorized.add(u.info),d.opening.add(u.info)}this._openingBrackets=new Map([...a.cachedValues].map(([s,o])=>[s,o.info])),this._closingBrackets=new Map([...r.cachedValues].map(([s,o])=>[s,o.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(m){return this._openingBrackets.get(m)}getClosingBracketInfo(m){return this._closingBrackets.get(m)}getBracketInfo(m){return this.getOpeningBracketInfo(m)||this.getClosingBracketInfo(m)}}e.LanguageBracketsConfiguration=y;function b(v){return v.filter(([m,S])=>m!==""&&S!=="")}class D{constructor(m,S){this.config=m,this.bracketText=S}get languageId(){return this.config.languageId}}e.BracketKindBase=D;class T extends D{constructor(m,S,h){super(m,S),this.openedBrackets=h,this.isOpeningBracket=!0}}e.OpeningBracketKind=T;class f extends D{constructor(m,S,h,a){super(m,S),this.openingBrackets=h,this.openingColorizedBrackets=a,this.isOpeningBracket=!1}closes(m){return m.config!==this.config?!1:this.openingBrackets.has(m)}closesColorized(m){return m.config!==this.config?!1:this.openingColorizedBrackets.has(m)}getOpeningBrackets(){return[...this.openingBrackets]}}e.ClosingBracketKind=f}),define(Q[1876],Y([1,0,15,33,394]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OnEnterSupport=void 0;class D{constructor(f){f=f||{},f.brackets=f.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],f.brackets.forEach(v=>{const m=D._createOpenBracketRegExp(v[0]),S=D._createCloseBracketRegExp(v[1]);m&&S&&this._brackets.push({open:v[0],openRegExp:m,close:v[1],closeRegExp:S})}),this._regExpRules=f.onEnterRules||[]}onEnter(f,v,m,S){if(f>=3)for(let h=0,a=this._regExpRules.length;h<a;h++){const r=this._regExpRules[h];if([{reg:r.beforeText,text:m},{reg:r.afterText,text:S},{reg:r.previousLineText,text:v}].every(s=>s.reg?(s.reg.lastIndex=0,s.reg.test(s.text)):!0))return r.action}if(f>=2&&m.length>0&&S.length>0)for(let h=0,a=this._brackets.length;h<a;h++){const r=this._brackets[h];if(r.openRegExp.test(m)&&r.closeRegExp.test(S))return{indentAction:b.IndentAction.IndentOutdent}}if(f>=2&&m.length>0){for(let h=0,a=this._brackets.length;h<a;h++)if(this._brackets[h].openRegExp.test(m))return{indentAction:b.IndentAction.Indent}}return null}static _createOpenBracketRegExp(f){let v=y.escapeRegExpCharacters(f);return/\B/.test(v.charAt(0))||(v="\\b"+v),v+="\\s*$",D._safeRegExp(v)}static _createCloseBracketRegExp(f){let v=y.escapeRegExpCharacters(f);return/\B/.test(v.charAt(v.length-1))||(v=v+"\\b"),v="^\\s*"+v,D._safeRegExp(v)}static _safeRegExp(f){try{return new RegExp(f)}catch(v){return(0,t.onUnexpectedError)(v),null}}}e.OnEnterSupport=D}),define(Q[798],Y([1,0,80]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateTokensCSSForColorMap=e.ThemeTrieElement=e.ExternalThemeTrieElement=e.ThemeTrieElementRule=e.strcmp=e.toStandardTokenType=e.TokenTheme=e.ColorMap=e.parseTokenTheme=e.ParsedTokenThemeRule=void 0;class y{constructor(u,d,p,c,l){this._parsedThemeRuleBrand=void 0,this.token=u,this.index=d,this.fontStyle=p,this.foreground=c,this.background=l}}e.ParsedTokenThemeRule=y;function b(o){if(!o||!Array.isArray(o))return[];const u=[];let d=0;for(let p=0,c=o.length;p<c;p++){const l=o[p];let n=-1;if(typeof l.fontStyle=="string"){n=0;const E=l.fontStyle.split(" ");for(let C=0,I=E.length;C<I;C++)switch(E[C]){case"italic":n=n|1;break;case"bold":n=n|2;break;case"underline":n=n|4;break;case"strikethrough":n=n|8;break}}let g=null;typeof l.foreground=="string"&&(g=l.foreground);let w=null;typeof l.background=="string"&&(w=l.background),u[d++]=new y(l.token||"",p,n,g,w)}return u}e.parseTokenTheme=b;function D(o,u){o.sort((C,I)=>{const _=h(C.token,I.token);return _!==0?_:C.index-I.index});let d=0,p="000000",c="ffffff";for(;o.length>=1&&o[0].token==="";){const C=o.shift();C.fontStyle!==-1&&(d=C.fontStyle),C.foreground!==null&&(p=C.foreground),C.background!==null&&(c=C.background)}const l=new f;for(const C of u)l.getId(C);const n=l.getId(p),g=l.getId(c),w=new a(d,n,g),E=new i(w);for(let C=0,I=o.length;C<I;C++){const _=o[C];E.insert(_.token,_.fontStyle,l.getId(_.foreground),l.getId(_.background))}return new v(l,E)}const T=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class f{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(u){if(u===null)return 0;const d=u.match(T);if(!d)throw new Error("Illegal value for token color: "+u);u=d[1].toUpperCase();let p=this._color2id.get(u);return p||(p=++this._lastColorId,this._color2id.set(u,p),this._id2color[p]=t.Color.fromHex("#"+u),p)}getColorMap(){return this._id2color.slice(0)}}e.ColorMap=f;class v{static createFromRawTokenTheme(u,d){return this.createFromParsedTokenTheme(b(u),d)}static createFromParsedTokenTheme(u,d){return D(u,d)}constructor(u,d){this._colorMap=u,this._root=d,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}getThemeTrieElement(){return this._root.toExternalThemeTrieElement()}_match(u){return this._root.match(u)}match(u,d){let p=this._cache.get(d);if(typeof p>"u"){const c=this._match(d),l=S(d);p=(c.metadata|l<<8)>>>0,this._cache.set(d,p)}return(p|u<<0)>>>0}}e.TokenTheme=v;const m=/\b(comment|string|regex|regexp)\b/;function S(o){const u=o.match(m);if(!u)return 0;switch(u[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}e.toStandardTokenType=S;function h(o,u){return o<u?-1:o>u?1:0}e.strcmp=h;class a{constructor(u,d,p){this._themeTrieElementRuleBrand=void 0,this._fontStyle=u,this._foreground=d,this._background=p,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new a(this._fontStyle,this._foreground,this._background)}acceptOverwrite(u,d,p){u!==-1&&(this._fontStyle=u),d!==0&&(this._foreground=d),p!==0&&(this._background=p),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}e.ThemeTrieElementRule=a;class r{constructor(u,d=new Map){if(this.mainRule=u,d instanceof Map)this.children=d;else{this.children=new Map;for(const p in d)this.children.set(p,d[p])}}}e.ExternalThemeTrieElement=r;class i{constructor(u){this._themeTrieElementBrand=void 0,this._mainRule=u,this._children=new Map}toExternalThemeTrieElement(){const u=new Map;return this._children.forEach((d,p)=>{u.set(p,d.toExternalThemeTrieElement())}),new r(this._mainRule,u)}match(u){if(u==="")return this._mainRule;const d=u.indexOf(".");let p,c;d===-1?(p=u,c=""):(p=u.substring(0,d),c=u.substring(d+1));const l=this._children.get(p);return typeof l<"u"?l.match(c):this._mainRule}insert(u,d,p,c){if(u===""){this._mainRule.acceptOverwrite(d,p,c);return}const l=u.indexOf(".");let n,g;l===-1?(n=u,g=""):(n=u.substring(0,l),g=u.substring(l+1));let w=this._children.get(n);typeof w>"u"&&(w=new i(this._mainRule.clone()),this._children.set(n,w)),w.insert(g,d,p,c)}}e.ThemeTrieElement=i;function s(o){const u=[];for(let d=1,p=o.length;d<p;d++){const c=o[d];u[d]=`.mtk${d} { color: ${c}; }`}return u.push(".mtki { font-style: italic; }"),u.push(".mtkb { font-weight: bold; }"),u.push(".mtku { text-decoration: underline; text-underline-position: under; }"),u.push(".mtks { text-decoration: line-through; }"),u.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),u.join(` `)}e.generateTokensCSSForColorMap=s}),define(Q[137],Y([1,0,42]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shouldSynchronizeModel=e.ApplyEditsResult=e.SearchData=e.ValidAnnotatedEditOperation=e.ModelConstants=e.PositionAffinity=e.isITextSnapshot=e.TrackedRangeStickiness=e.FindMatch=e.TextModelResolvedOptions=e.EndOfLineSequence=e.DefaultEndOfLine=e.EndOfLinePreference=e.InjectedTextCursorStops=e.MinimapPosition=e.GlyphMarginLane=e.OverviewRulerLane=void 0;var y;(function(c){c[c.Left=1]="Left",c[c.Center=2]="Center",c[c.Right=4]="Right",c[c.Full=7]="Full"})(y||(e.OverviewRulerLane=y={}));var b;(function(c){c[c.Left=1]="Left",c[c.Right=2]="Right"})(b||(e.GlyphMarginLane=b={}));var D;(function(c){c[c.Inline=1]="Inline",c[c.Gutter=2]="Gutter"})(D||(e.MinimapPosition=D={}));var T;(function(c){c[c.Both=0]="Both",c[c.Right=1]="Right",c[c.Left=2]="Left",c[c.None=3]="None"})(T||(e.InjectedTextCursorStops=T={}));var f;(function(c){c[c.TextDefined=0]="TextDefined",c[c.LF=1]="LF",c[c.CRLF=2]="CRLF"})(f||(e.EndOfLinePreference=f={}));var v;(function(c){c[c.LF=1]="LF",c[c.CRLF=2]="CRLF"})(v||(e.DefaultEndOfLine=v={}));var m;(function(c){c[c.LF=0]="LF",c[c.CRLF=1]="CRLF"})(m||(e.EndOfLineSequence=m={}));class S{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(l){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,l.tabSize|0),l.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,l.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!l.insertSpaces,this.defaultEOL=l.defaultEOL|0,this.trimAutoWhitespace=!!l.trimAutoWhitespace,this.bracketPairColorizationOptions=l.bracketPairColorizationOptions}equals(l){return this.tabSize===l.tabSize&&this._indentSizeIsTabSize===l._indentSizeIsTabSize&&this.indentSize===l.indentSize&&this.insertSpaces===l.insertSpaces&&this.defaultEOL===l.defaultEOL&&this.trimAutoWhitespace===l.trimAutoWhitespace&&(0,t.equals)(this.bracketPairColorizationOptions,l.bracketPairColorizationOptions)}createChangeEvent(l){return{tabSize:this.tabSize!==l.tabSize,indentSize:this.indentSize!==l.indentSize,insertSpaces:this.insertSpaces!==l.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==l.trimAutoWhitespace}}}e.TextModelResolvedOptions=S;class h{constructor(l,n){this._findMatchBrand=void 0,this.range=l,this.matches=n}}e.FindMatch=h;var a;(function(c){c[c.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",c[c.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",c[c.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",c[c.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(a||(e.TrackedRangeStickiness=a={}));function r(c){return c&&typeof c.read=="function"}e.isITextSnapshot=r;var i;(function(c){c[c.Left=0]="Left",c[c.Right=1]="Right",c[c.None=2]="None",c[c.LeftOfInjectedText=3]="LeftOfInjectedText",c[c.RightOfInjectedText=4]="RightOfInjectedText"})(i||(e.PositionAffinity=i={}));var s;(function(c){c[c.FIRST_LINE_DETECTION_LENGTH_LIMIT=1e3]="FIRST_LINE_DETECTION_LENGTH_LIMIT"})(s||(e.ModelConstants=s={}));class o{constructor(l,n,g,w,E,C){this.identifier=l,this.range=n,this.text=g,this.forceMoveMarkers=w,this.isAutoWhitespaceEdit=E,this._isTracked=C}}e.ValidAnnotatedEditOperation=o;class u{constructor(l,n,g){this.regex=l,this.wordSeparators=n,this.simpleSearch=g}}e.SearchData=u;class d{constructor(l,n,g){this.reverseEdits=l,this.changes=n,this.trimAutoWhitespaceLineNumbers=g}}e.ApplyEditsResult=d;function p(c){return!c.isTooLargeForSyncing()&&!c.isForSimpleWidget}e.shouldSynchronizeModel=p}),define(Q[302],Y([1,0,33,51,27]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lengthMax=e.lengthHash=e.lengthOfStringObj=e.lengthOfString=e.lengthCompare=e.lengthOfRange=e.lengthsToRange=e.positionToLength=e.lengthToPosition=e.lengthGreaterThanEqual=e.lengthLessThanEqual=e.lengthLessThan=e.lengthDiffNonNegative=e.lengthEquals=e.sumLengths=e.lengthAdd=e.lengthGetColumnCountIfZeroLineCount=e.lengthGetLineCount=e.lengthToObj=e.toLength=e.lengthIsZero=e.lengthZero=e.lengthDiff=e.LengthObj=void 0;class D{static{this.zero=new D(0,0)}static lengthDiffNonNegative(k,L){return L.isLessThan(k)?D.zero:k.lineCount===L.lineCount?new D(0,L.columnCount-k.columnCount):new D(L.lineCount-k.lineCount,L.columnCount)}constructor(k,L){this.lineCount=k,this.columnCount=L}isZero(){return this.lineCount===0&&this.columnCount===0}toLength(){return m(this.lineCount,this.columnCount)}isLessThan(k){return this.lineCount!==k.lineCount?this.lineCount<k.lineCount:this.columnCount<k.columnCount}isGreaterThan(k){return this.lineCount!==k.lineCount?this.lineCount>k.lineCount:this.columnCount>k.columnCount}equals(k){return this.lineCount===k.lineCount&&this.columnCount===k.columnCount}compare(k){return this.lineCount!==k.lineCount?this.lineCount-k.lineCount:this.columnCount-k.columnCount}add(k){return k.lineCount===0?new D(this.lineCount,this.columnCount+k.columnCount):new D(this.lineCount+k.lineCount,k.columnCount)}toString(){return`${this.lineCount},${this.columnCount}`}}e.LengthObj=D;function T(A,k,L,R){return A!==L?m(L-A,R):m(0,R-k)}e.lengthDiff=T,e.lengthZero=0;function f(A){return A===0}e.lengthIsZero=f;const v=2**26;function m(A,k){return A*v+k}e.toLength=m;function S(A){const k=A,L=Math.floor(k/v),R=k-L*v;return new D(L,R)}e.lengthToObj=S;function h(A){return Math.floor(A/v)}e.lengthGetLineCount=h;function a(A){return A}e.lengthGetColumnCountIfZeroLineCount=a;function r(A,k){let L=A+k;return k>=v&&(L=L-A%v),L}e.lengthAdd=r;function i(A,k){return A.reduce((L,R)=>r(L,k(R)),e.lengthZero)}e.sumLengths=i;function s(A,k){return A===k}e.lengthEquals=s;function o(A,k){const L=A,R=k;if(R-L<=0)return e.lengthZero;const N=Math.floor(L/v),P=Math.floor(R/v),x=R-P*v;if(N===P){const F=L-N*v;return m(0,x-F)}else return m(P-N,x)}e.lengthDiffNonNegative=o;function u(A,k){return A<k}e.lengthLessThan=u;function d(A,k){return A<=k}e.lengthLessThanEqual=d;function p(A,k){return A>=k}e.lengthGreaterThanEqual=p;function c(A){const k=A,L=Math.floor(k/v),R=k-L*v;return new y.Position(L+1,R+1)}e.lengthToPosition=c;function l(A){return m(A.lineNumber-1,A.column-1)}e.positionToLength=l;function n(A,k){const L=A,R=Math.floor(L/v),M=L-R*v,N=k,P=Math.floor(N/v),x=N-P*v;return new b.Range(R+1,M+1,P+1,x+1)}e.lengthsToRange=n;function g(A){return A.startLineNumber===A.endLineNumber?new D(0,A.endColumn-A.startColumn):new D(A.endLineNumber-A.startLineNumber,A.endColumn-1)}e.lengthOfRange=g;function w(A,k){return A-k}e.lengthCompare=w;function E(A){const k=(0,t.splitLines)(A);return m(k.length-1,k[k.length-1].length)}e.lengthOfString=E;function C(A){const k=(0,t.splitLines)(A);return new D(k.length-1,k[k.length-1].length)}e.lengthOfStringObj=C;function I(A){return A}e.lengthHash=I;function _(A,k){return A>k?A:k}e.lengthMax=_}),define(Q[663],Y([1,0,27,302]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BeforeEditPositionMapper=e.TextEditInfo=void 0;class b{static fromModelContentChanges(v){return v.map(S=>{const h=t.Range.lift(S.range);return new b((0,y.positionToLength)(h.getStartPosition()),(0,y.positionToLength)(h.getEndPosition()),(0,y.lengthOfString)(S.text))}).reverse()}constructor(v,m,S){this.startOffset=v,this.endOffset=m,this.newLength=S}toString(){return`[${(0,y.lengthToObj)(this.startOffset)}...${(0,y.lengthToObj)(this.endOffset)}) -> ${(0,y.lengthToObj)(this.newLength)}`}}e.TextEditInfo=b;class D{constructor(v){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=v.map(m=>T.from(m))}getOffsetBeforeChange(v){return this.adjustNextEdit(v),this.translateCurToOld(v)}getDistanceToNextChange(v){this.adjustNextEdit(v);const m=this.edits[this.nextEditIdx],S=m?this.translateOldToCur(m.offsetObj):null;return S===null?null:(0,y.lengthDiffNonNegative)(v,S)}translateOldToCur(v){return v.lineCount===this.deltaLineIdxInOld?(0,y.toLength)(v.lineCount+this.deltaOldToNewLineCount,v.columnCount+this.deltaOldToNewColumnCount):(0,y.toLength)(v.lineCount+this.deltaOldToNewLineCount,v.columnCount)}translateCurToOld(v){const m=(0,y.lengthToObj)(v);return m.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,y.toLength)(m.lineCount-this.deltaOldToNewLineCount,m.columnCount-this.deltaOldToNewColumnCount):(0,y.toLength)(m.lineCount-this.deltaOldToNewLineCount,m.columnCount)}adjustNextEdit(v){for(;this.nextEditIdx<this.edits.length;){const m=this.edits[this.nextEditIdx],S=this.translateOldToCur(m.endOffsetAfterObj);if((0,y.lengthLessThanEqual)(S,v)){this.nextEditIdx++;const h=(0,y.lengthToObj)(S),a=(0,y.lengthToObj)(this.translateOldToCur(m.endOffsetBeforeObj)),r=h.lineCount-a.lineCount;this.deltaOldToNewLineCount+=r;const i=this.deltaLineIdxInOld===m.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,s=h.columnCount-a.columnCount;this.deltaOldToNewColumnCount=i+s,this.deltaLineIdxInOld=m.endOffsetBeforeObj.lineCount}else break}}}e.BeforeEditPositionMapper=D;class T{static from(v){return new T(v.startOffset,v.endOffset,v.newLength)}constructor(v,m,S){this.endOffsetBeforeObj=(0,y.lengthToObj)(m),this.endOffsetAfterObj=(0,y.lengthToObj)((0,y.lengthAdd)(v,S)),this.offsetObj=(0,y.lengthToObj)(v)}}}),define(Q[1075],Y([1,0,20,663,302]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineTextEditInfos=void 0;function D(v,m){if(v.length===0)return m;if(m.length===0)return v;const S=new t.ArrayQueue(f(v)),h=f(m);h.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let a=S.dequeue();function r(u){if(u===void 0){const p=S.takeWhile(c=>!0)||[];return a&&p.unshift(a),p}const d=[];for(;a&&!(0,b.lengthIsZero)(u);){const[p,c]=a.splitAt(u);d.push(p),u=(0,b.lengthDiffNonNegative)(p.lengthAfter,u),a=c??S.dequeue()}return(0,b.lengthIsZero)(u)||d.push(new T(!1,u,u)),d}const i=[];function s(u,d,p){if(i.length>0&&(0,b.lengthEquals)(i[i.length-1].endOffset,u)){const c=i[i.length-1];i[i.length-1]=new y.TextEditInfo(c.startOffset,d,(0,b.lengthAdd)(c.newLength,p))}else i.push({startOffset:u,endOffset:d,newLength:p})}let o=b.lengthZero;for(const u of h){const d=r(u.lengthBefore);if(u.modified){const p=(0,b.sumLengths)(d,l=>l.lengthBefore),c=(0,b.lengthAdd)(o,p);s(o,c,u.lengthAfter),o=c}else for(const p of d){const c=o;o=(0,b.lengthAdd)(o,p.lengthBefore),p.modified&&s(c,o,p.lengthAfter)}}return i}e.combineTextEditInfos=D;class T{constructor(m,S,h){this.modified=m,this.lengthBefore=S,this.lengthAfter=h}splitAt(m){const S=(0,b.lengthDiffNonNegative)(m,this.lengthAfter);return(0,b.lengthEquals)(S,b.lengthZero)?[this,void 0]:this.modified?[new T(this.modified,this.lengthBefore,m),new T(this.modified,b.lengthZero,S)]:[new T(this.modified,m,m),new T(this.modified,S,S)]}toString(){return`${this.modified?"M":"U"}:${(0,b.lengthToObj)(this.lengthBefore)} -> ${(0,b.lengthToObj)(this.lengthAfter)}`}}function f(v){const m=[];let S=b.lengthZero;for(const h of v){const a=(0,b.lengthDiffNonNegative)(S,h.startOffset);(0,b.lengthIsZero)(a)||m.push(new T(!1,a,a));const r=(0,b.lengthDiffNonNegative)(h.startOffset,h.endOffset);m.push(new T(!0,r,h.newLength)),S=h.endOffset}return m}}),define(Q[1877],Y([1,0,302]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeReader=void 0;class y{constructor(f){this.lastOffset=t.lengthZero,this.nextNodes=[f],this.offsets=[t.lengthZero],this.idxs=[]}readLongestNodeAt(f,v){if((0,t.lengthLessThan)(f,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=f;;){const m=D(this.nextNodes);if(!m)return;const S=D(this.offsets);if((0,t.lengthLessThan)(f,S))return;if((0,t.lengthLessThan)(S,f))if((0,t.lengthAdd)(S,m.length)<=f)this.nextNodeAfterCurrent();else{const h=b(m);h!==-1?(this.nextNodes.push(m.getChild(h)),this.offsets.push(S),this.idxs.push(h)):this.nextNodeAfterCurrent()}else{if(v(m))return this.nextNodeAfterCurrent(),m;{const h=b(m);if(h===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(m.getChild(h)),this.offsets.push(S),this.idxs.push(h)}}}}nextNodeAfterCurrent(){for(;;){const f=D(this.offsets),v=D(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const m=D(this.nextNodes),S=b(m,this.idxs[this.idxs.length-1]);if(S!==-1){this.nextNodes.push(m.getChild(S)),this.offsets.push((0,t.lengthAdd)(f,v.length)),this.idxs[this.idxs.length-1]=S;break}else this.idxs.pop()}}}e.NodeReader=y;function b(T,f=-1){for(;;){if(f++,f>=T.childrenLength)return-1;if(T.getChild(f))return f}}function D(T){return T.length>0?T[T.length-1]:void 0}}),define(Q[489],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DenseKeyProvider=e.identityKeyProvider=e.SmallImmutableSet=void 0;const t=[];class y{static{this.cache=new Array(129)}static create(T,f){if(T<=128&&f.length===0){let v=y.cache[T];return v||(v=new y(T,f),y.cache[T]=v),v}return new y(T,f)}static{this.empty=y.create(0,t)}static getEmpty(){return this.empty}constructor(T,f){this.items=T,this.additionalItems=f}add(T,f){const v=f.getKey(T);let m=v>>5;if(m===0){const h=1<<v|this.items;return h===this.items?this:y.create(h,this.additionalItems)}m--;const S=this.additionalItems.slice(0);for(;S.length<m;)S.push(0);return S[m]|=1<<(v&31),y.create(this.items,S)}has(T,f){const v=f.getKey(T);let m=v>>5;return m===0?(this.items&1<<v)!==0:(m--,((this.additionalItems[m]||0)&1<<(v&31))!==0)}merge(T){const f=this.items|T.items;if(this.additionalItems===t&&T.additionalItems===t)return f===this.items?this:f===T.items?T:y.create(f,t);const v=[];for(let m=0;m<Math.max(this.additionalItems.length,T.additionalItems.length);m++){const S=this.additionalItems[m]||0,h=T.additionalItems[m]||0;v.push(S|h)}return y.create(f,v)}intersects(T){if(this.items&T.items)return!0;for(let f=0;f<Math.min(this.additionalItems.length,T.additionalItems.length);f++)if(this.additionalItems[f]&T.additionalItems[f])return!0;return!1}equals(T){if(this.items!==T.items||this.additionalItems.length!==T.additionalItems.length)return!1;for(let f=0;f<this.additionalItems.length;f++)if(this.additionalItems[f]!==T.additionalItems[f])return!1;return!0}}e.SmallImmutableSet=y,e.identityKeyProvider={getKey(D){return D}};class b{constructor(){this.items=new Map}getKey(T){let f=this.items.get(T);return f===void 0&&(f=this.items.size,this.items.set(T,f)),f}reverseLookup(T){return[...this.items].find(([f,v])=>v===T)?.[0]}reverseLookupSet(T){const f=[];for(const[v]of this.items)T.has(v,this)&&f.push(v);return f}keys(){return this.items.keys()}}e.DenseKeyProvider=b}),define(Q[664],Y([1,0,15,323,302,489]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidBracketAstNode=e.BracketAstNode=e.TextAstNode=e.ListAstNode=e.PairAstNode=e.AstNodeKind=void 0;var T;(function(p){p[p.Text=0]="Text",p[p.Bracket=1]="Bracket",p[p.Pair=2]="Pair",p[p.UnexpectedClosingBracket=3]="UnexpectedClosingBracket",p[p.List=4]="List"})(T||(e.AstNodeKind=T={}));class f{get length(){return this._length}constructor(c){this._length=c}}class v extends f{static create(c,l,n){let g=c.length;return l&&(g=(0,b.lengthAdd)(g,l.length)),n&&(g=(0,b.lengthAdd)(g,n.length)),new v(g,c,l,n,l?l.missingOpeningBracketIds:D.SmallImmutableSet.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(c){switch(c){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const c=[];return c.push(this.openingBracket),this.child&&c.push(this.child),this.closingBracket&&c.push(this.closingBracket),c}constructor(c,l,n,g,w){super(c),this.openingBracket=l,this.child=n,this.closingBracket=g,this.missingOpeningBracketIds=w}canBeReused(c){return!(this.closingBracket===null||c.intersects(this.missingOpeningBracketIds))}flattenLists(){return v.create(this.openingBracket.flattenLists(),this.child&&this.child.flattenLists(),this.closingBracket&&this.closingBracket.flattenLists())}deepClone(){return new v(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(c,l){return this.child?this.child.computeMinIndentation((0,b.lengthAdd)(c,this.openingBracket.length),l):Number.MAX_SAFE_INTEGER}}e.PairAstNode=v;class m extends f{static create23(c,l,n,g=!1){let w=c.length,E=c.missingOpeningBracketIds;if(c.listHeight!==l.listHeight)throw new Error("Invalid list heights");if(w=(0,b.lengthAdd)(w,l.length),E=E.merge(l.missingOpeningBracketIds),n){if(c.listHeight!==n.listHeight)throw new Error("Invalid list heights");w=(0,b.lengthAdd)(w,n.length),E=E.merge(n.missingOpeningBracketIds)}return g?new h(w,c.listHeight+1,c,l,n,E):new S(w,c.listHeight+1,c,l,n,E)}static create(c,l=!1){if(c.length===0)return this.getEmpty();{let n=c[0].length,g=c[0].missingOpeningBracketIds;for(let w=1;w<c.length;w++)n=(0,b.lengthAdd)(n,c[w].length),g=g.merge(c[w].missingOpeningBracketIds);return l?new r(n,c[0].listHeight+1,c,g):new a(n,c[0].listHeight+1,c,g)}}static getEmpty(){return new r(b.lengthZero,0,[],D.SmallImmutableSet.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(c,l,n){super(c),this.listHeight=l,this._missingOpeningBracketIds=n,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const c=this.childrenLength;if(c===0)return;const l=this.getChild(c-1),n=l.kind===4?l.toMutable():l;return l!==n&&this.setChild(c-1,n),n}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const l=this.getChild(0),n=l.kind===4?l.toMutable():l;return l!==n&&this.setChild(0,n),n}canBeReused(c){if(c.intersects(this.missingOpeningBracketIds)||this.childrenLength===0)return!1;let l=this;for(;l.kind===4;){const n=l.childrenLength;if(n===0)throw new t.BugIndicatingError;l=l.getChild(n-1)}return l.canBeReused(c)}handleChildrenChanged(){this.throwIfImmutable();const c=this.childrenLength;let l=this.getChild(0).length,n=this.getChild(0).missingOpeningBracketIds;for(let g=1;g<c;g++){const w=this.getChild(g);l=(0,b.lengthAdd)(l,w.length),n=n.merge(w.missingOpeningBracketIds)}this._length=l,this._missingOpeningBracketIds=n,this.cachedMinIndentation=-1}flattenLists(){const c=[];for(const l of this.children){const n=l.flattenLists();n.kind===4?c.push(...n.children):c.push(n)}return m.create(c)}computeMinIndentation(c,l){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let n=Number.MAX_SAFE_INTEGER,g=c;for(let w=0;w<this.childrenLength;w++){const E=this.getChild(w);E&&(n=Math.min(n,E.computeMinIndentation(g,l)),g=(0,b.lengthAdd)(g,E.length))}return this.cachedMinIndentation=n,n}}e.ListAstNode=m;class S extends m{get childrenLength(){return this._item3!==null?3:2}getChild(c){switch(c){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(c,l){switch(c){case 0:this._item1=l;return;case 1:this._item2=l;return;case 2:this._item3=l;return}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}constructor(c,l,n,g,w,E){super(c,l,E),this._item1=n,this._item2=g,this._item3=w}deepClone(){return new S(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(c){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=c,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const c=this._item3;return this._item3=null,this.handleChildrenChanged(),c}prependChildOfSameHeight(c){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=c,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const c=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),c}toMutable(){return this}}class h extends S{toMutable(){return new S(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class a extends m{get childrenLength(){return this._children.length}getChild(c){return this._children[c]}setChild(c,l){this._children[c]=l}get children(){return this._children}constructor(c,l,n,g){super(c,l,g),this._children=n}deepClone(){const c=new Array(this._children.length);for(let l=0;l<this._children.length;l++)c[l]=this._children[l].deepClone();return new a(this.length,this.listHeight,c,this.missingOpeningBracketIds)}appendChildOfSameHeight(c){this.throwIfImmutable(),this._children.push(c),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const c=this._children.pop();return this.handleChildrenChanged(),c}prependChildOfSameHeight(c){this.throwIfImmutable(),this._children.unshift(c),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const c=this._children.shift();return this.handleChildrenChanged(),c}toMutable(){return this}}class r extends a{toMutable(){return new a(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const i=[];class s extends f{get listHeight(){return 0}get childrenLength(){return 0}getChild(c){return null}get children(){return i}flattenLists(){return this}deepClone(){return this}}class o extends s{get kind(){return 0}get missingOpeningBracketIds(){return D.SmallImmutableSet.getEmpty()}canBeReused(c){return!0}computeMinIndentation(c,l){const n=(0,b.lengthToObj)(c),g=(n.columnCount===0?n.lineCount:n.lineCount+1)+1,w=(0,b.lengthGetLineCount)((0,b.lengthAdd)(c,this.length))+1;let E=Number.MAX_SAFE_INTEGER;for(let C=g;C<=w;C++){const I=l.getLineFirstNonWhitespaceColumn(C),_=l.getLineContent(C);if(I===0)continue;const A=y.CursorColumns.visibleColumnFromColumn(_,I,l.getOptions().tabSize);E=Math.min(E,A)}return E}}e.TextAstNode=o;class u extends s{static create(c,l,n){return new u(c,l,n)}get kind(){return 1}get missingOpeningBracketIds(){return D.SmallImmutableSet.getEmpty()}constructor(c,l,n){super(c),this.bracketInfo=l,this.bracketIds=n}get text(){return this.bracketInfo.bracketText}get languageId(){return this.bracketInfo.languageId}canBeReused(c){return!1}computeMinIndentation(c,l){return Number.MAX_SAFE_INTEGER}}e.BracketAstNode=u;class d extends s{get kind(){return 3}constructor(c,l){super(l),this.missingOpeningBracketIds=c}canBeReused(c){return!c.intersects(this.missingOpeningBracketIds)}computeMinIndentation(c,l){return Number.MAX_SAFE_INTEGER}}e.InvalidBracketAstNode=d}),define(Q[1878],Y([1,0,664]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.concat23TreesOfSameHeight=e.concat23Trees=void 0;function y(m){if(m.length===0)return null;if(m.length===1)return m[0];let S=0;function h(){if(S>=m.length)return null;const s=S,o=m[s].listHeight;for(S++;S<m.length&&m[S].listHeight===o;)S++;return S-s>=2?b(s===0&&S===m.length?m:m.slice(s,S),!1):m[s]}let a=h(),r=h();if(!r)return a;for(let s=h();s;s=h())D(a,r)<=D(r,s)?(a=T(a,r),r=s):r=T(r,s);return T(a,r)}e.concat23Trees=y;function b(m,S=!1){if(m.length===0)return null;if(m.length===1)return m[0];let h=m.length;for(;h>3;){const a=h>>1;for(let r=0;r<a;r++){const i=r<<1;m[r]=t.ListAstNode.create23(m[i],m[i+1],i+3===h?m[i+2]:null,S)}h=a}return t.ListAstNode.create23(m[0],m[1],h>=3?m[2]:null,S)}e.concat23TreesOfSameHeight=b;function D(m,S){return Math.abs(m.listHeight-S.listHeight)}function T(m,S){return m.listHeight===S.listHeight?t.ListAstNode.create23(m,S,null,!1):m.listHeight>S.listHeight?f(m,S):v(S,m)}function f(m,S){m=m.toMutable();let h=m;const a=[];let r;for(;;){if(S.listHeight===h.listHeight){r=S;break}if(h.kind!==4)throw new Error("unexpected");a.push(h),h=h.makeLastElementMutable()}for(let i=a.length-1;i>=0;i--){const s=a[i];r?s.childrenLength>=3?r=t.ListAstNode.create23(s.unappendChild(),r,null,!1):(s.appendChildOfSameHeight(r),r=void 0):s.handleChildrenChanged()}return r?t.ListAstNode.create23(m,r,null,!1):m}function v(m,S){m=m.toMutable();let h=m;const a=[];for(;S.listHeight!==h.listHeight;){if(h.kind!==4)throw new Error("unexpected");a.push(h),h=h.makeFirstElementMutable()}let r=S;for(let i=a.length-1;i>=0;i--){const s=a[i];r?s.childrenLength>=3?r=t.ListAstNode.create23(r,s.unprependChild(),null,!1):(s.prependChildOfSameHeight(r),r=void 0):s.handleChildrenChanged()}return r?t.ListAstNode.create23(r,m,null,!1):m}}),define(Q[1076],Y([1,0,664,663,489,302,1878,1877]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDocument=void 0;function v(S,h,a,r){return new m(S,h,a,r).parseDocument()}e.parseDocument=v;class m{get nodesConstructed(){return this._itemsConstructed}get nodesReused(){return this._itemsFromCache}constructor(h,a,r,i){if(this.tokenizer=h,this.createImmutableLists=i,this._itemsConstructed=0,this._itemsFromCache=0,r&&i)throw new Error("Not supported");this.oldNodeReader=r?new f.NodeReader(r):void 0,this.positionMapper=new y.BeforeEditPositionMapper(a)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let h=this.parseList(b.SmallImmutableSet.getEmpty(),0);return h||(h=t.ListAstNode.getEmpty()),h}parseList(h,a){const r=[];for(;;){let s=this.tryReadChildFromCache(h);if(!s){const o=this.tokenizer.peek();if(!o||o.kind===2&&o.bracketIds.intersects(h))break;s=this.parseChild(h,a+1)}s.kind===4&&s.childrenLength===0||r.push(s)}return this.oldNodeReader?(0,T.concat23Trees)(r):(0,T.concat23TreesOfSameHeight)(r,this.createImmutableLists)}tryReadChildFromCache(h){if(this.oldNodeReader){const a=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(a===null||!(0,D.lengthIsZero)(a)){const r=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),i=>a!==null&&!(0,D.lengthLessThan)(i.length,a)?!1:i.canBeReused(h));if(r)return this._itemsFromCache++,this.tokenizer.skip(r.length),r}}}parseChild(h,a){this._itemsConstructed++;const r=this.tokenizer.read();switch(r.kind){case 2:return new t.InvalidBracketAstNode(r.bracketIds,r.length);case 0:return r.astNode;case 1:{if(a>300)return new t.TextAstNode(r.length);const i=h.merge(r.bracketIds),s=this.parseList(i,a+1),o=this.tokenizer.peek();return o&&o.kind===2&&(o.bracketId===r.bracketId||o.bracketIds.intersects(r.bracketIds))?(this.tokenizer.read(),t.PairAstNode.create(r.astNode,s,o.astNode)):t.PairAstNode.create(r.astNode,s,null)}default:throw new Error("unexpected")}}}}),define(Q[799],Y([1,0,15,439,664,302,489]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastTokenizer=e.TextBufferTokenizer=e.Token=e.TokenKind=void 0;var f;(function(a){a[a.Text=0]="Text",a[a.OpeningBracket=1]="OpeningBracket",a[a.ClosingBracket=2]="ClosingBracket"})(f||(e.TokenKind=f={}));class v{constructor(r,i,s,o,u){this.length=r,this.kind=i,this.bracketId=s,this.bracketIds=o,this.astNode=u}}e.Token=v;class m{constructor(r,i){this.textModel=r,this.bracketTokens=i,this.reader=new S(this.textModel,this.bracketTokens),this._offset=D.lengthZero,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=r.getLineCount(),this.textBufferLastLineLength=r.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,D.toLength)(this.textBufferLineCount-1,this.textBufferLastLineLength)}getText(){return this.textModel.getValue()}skip(r){this.didPeek=!1,this._offset=(0,D.lengthAdd)(this._offset,r);const i=(0,D.lengthToObj)(this._offset);this.reader.setPosition(i.lineCount,i.columnCount)}read(){let r;return this.peeked?(this.didPeek=!1,r=this.peeked):r=this.reader.read(),r&&(this._offset=(0,D.lengthAdd)(this._offset,r.length)),r}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}e.TextBufferTokenizer=m;class S{constructor(r,i){this.textModel=r,this.bracketTokens=i,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=r.getLineCount(),this.textBufferLastLineLength=r.getLineLength(this.textBufferLineCount)}setPosition(r,i){r===this.lineIdx?(this.lineCharOffset=i,this.line!==null&&(this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=r,this.lineCharOffset=i,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const u=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,D.lengthGetColumnCountIfZeroLineCount)(u.length),u}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const r=this.lineIdx,i=this.lineCharOffset;let s=0;for(;;){const u=this.lineTokens,d=u.getCount();let p=null;if(this.lineTokenOffset<d){const c=u.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<d&&c===u.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const l=y.TokenMetadata.getTokenType(c)===0,n=y.TokenMetadata.containsBalancedBrackets(c),g=u.getEndOffset(this.lineTokenOffset);if(n&&l&&this.lineCharOffset<g){const w=u.getLanguageId(this.lineTokenOffset),E=this.line.substring(this.lineCharOffset,g),C=this.bracketTokens.getSingleLanguageBracketTokens(w),I=C.regExpGlobal;if(I){I.lastIndex=0;const _=I.exec(E);_&&(p=C.getToken(_[0]),p&&(this.lineCharOffset+=_.index))}}if(s+=g-this.lineCharOffset,p)if(r!==this.lineIdx||i!==this.lineCharOffset){this.peekedToken=p;break}else return this.lineCharOffset+=(0,D.lengthGetColumnCountIfZeroLineCount)(p.length),p;else this.lineTokenOffset++,this.lineCharOffset=g}else if(this.lineIdx===this.textBufferLineCount-1||(this.lineIdx++,this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,s+=33,s>1e3))break;if(s>1500)break}const o=(0,D.lengthDiff)(r,i,this.lineIdx,this.lineCharOffset);return new v(o,0,-1,T.SmallImmutableSet.getEmpty(),new b.TextAstNode(o))}}class h{constructor(r,i){this.text=r,this._offset=D.lengthZero,this.idx=0;const s=i.getRegExpStr(),o=s?new RegExp(s+`| `,"gi"):null,u=[];let d,p=0,c=0,l=0,n=0;const g=[];for(let C=0;C<60;C++)g.push(new v((0,D.toLength)(0,C),0,-1,T.SmallImmutableSet.getEmpty(),new b.TextAstNode((0,D.toLength)(0,C))));const w=[];for(let C=0;C<60;C++)w.push(new v((0,D.toLength)(1,C),0,-1,T.SmallImmutableSet.getEmpty(),new b.TextAstNode((0,D.toLength)(1,C))));if(o)for(o.lastIndex=0;(d=o.exec(r))!==null;){const C=d.index,I=d[0];if(I===` `)p++,c=C+1;else{if(l!==C){let _;if(n===p){const A=C-l;if(A<g.length)_=g[A];else{const k=(0,D.toLength)(0,A);_=new v(k,0,-1,T.SmallImmutableSet.getEmpty(),new b.TextAstNode(k))}}else{const A=p-n,k=C-c;if(A===1&&k<w.length)_=w[k];else{const L=(0,D.toLength)(A,k);_=new v(L,0,-1,T.SmallImmutableSet.getEmpty(),new b.TextAstNode(L))}}u.push(_)}u.push(i.getToken(I)),l=C+I.length,n=p}}const E=r.length;if(l!==E){const C=n===p?(0,D.toLength)(0,E-l):(0,D.toLength)(p-n,E-c);u.push(new v(C,0,-1,T.SmallImmutableSet.getEmpty(),new b.TextAstNode(C)))}this.length=(0,D.toLength)(p,E-c),this.tokens=u}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(r){throw new t.NotSupportedError}getText(){return this.text}}e.FastTokenizer=h}),define(Q[1077],Y([1,0,33,664,302,489,799]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageAgnosticBracketTokens=e.BracketTokens=void 0;class f{static createFromLanguage(h,a){function r(s){return a.getKey(`${s.languageId}:::${s.bracketText}`)}const i=new Map;for(const s of h.bracketsNew.openingBrackets){const o=(0,b.toLength)(0,s.bracketText.length),u=r(s),d=D.SmallImmutableSet.getEmpty().add(u,D.identityKeyProvider);i.set(s.bracketText,new T.Token(o,1,u,d,y.BracketAstNode.create(o,s,d)))}for(const s of h.bracketsNew.closingBrackets){const o=(0,b.toLength)(0,s.bracketText.length);let u=D.SmallImmutableSet.getEmpty();const d=s.getOpeningBrackets();for(const p of d)u=u.add(r(p),D.identityKeyProvider);i.set(s.bracketText,new T.Token(o,2,r(d[0]),u,y.BracketAstNode.create(o,s,u)))}return new f(i)}constructor(h){this.map=h,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const h=[...this.map.keys()];return h.sort(),h.reverse(),h.map(a=>v(a)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const h=this.getRegExpStr();this._regExpGlobal=h?new RegExp(h,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(h){return this.map.get(h.toLowerCase())}findClosingTokenText(h){for(const[a,r]of this.map)if(r.kind===2&&r.bracketIds.intersects(h))return a}get isEmpty(){return this.map.size===0}}e.BracketTokens=f;function v(S){let h=(0,t.escapeRegExpCharacters)(S);return/^[\w ]+/.test(S)&&(h=`\\b${h}`),/[\w ]+$/.test(S)&&(h=`${h}\\b`),h}class m{constructor(h,a){this.denseKeyProvider=h,this.getLanguageConfiguration=a,this.languageIdToBracketTokens=new Map}didLanguageChange(h){return this.languageIdToBracketTokens.has(h)}getSingleLanguageBracketTokens(h){let a=this.languageIdToBracketTokens.get(h);return a||(a=f.createFromLanguage(this.getLanguageConfiguration(h),this.denseKeyProvider),this.languageIdToBracketTokens.set(h,a)),a}getToken(h,a){return this.getSingleLanguageBracketTokens(a).getToken(h)}}e.LanguageAgnosticBracketTokens=m}),define(Q[1879],Y([1,0,1077,302,1076,489,799]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fixBracketsInLine=void 0;function f(m,S){const h=new D.DenseKeyProvider,a=new t.LanguageAgnosticBracketTokens(h,d=>S.getLanguageConfiguration(d)),r=new T.TextBufferTokenizer(new v([m]),a),i=(0,b.parseDocument)(r,[],void 0,!0);let s="";const o=m.getLineContent();function u(d,p){if(d.kind===2)if(u(d.openingBracket,p),p=(0,y.lengthAdd)(p,d.openingBracket.length),d.child&&(u(d.child,p),p=(0,y.lengthAdd)(p,d.child.length)),d.closingBracket)u(d.closingBracket,p),p=(0,y.lengthAdd)(p,d.closingBracket.length);else{const l=a.getSingleLanguageBracketTokens(d.openingBracket.languageId).findClosingTokenText(d.openingBracket.bracketIds);s+=l}else if(d.kind!==3){if(d.kind===0||d.kind===1)s+=o.substring((0,y.lengthGetColumnCountIfZeroLineCount)(p),(0,y.lengthGetColumnCountIfZeroLineCount)((0,y.lengthAdd)(p,d.length)));else if(d.kind===4)for(const c of d.children)u(c,p),p=(0,y.lengthAdd)(p,c.length)}}return u(i,y.lengthZero),s}e.fixBracketsInLine=f;class v{constructor(S){this.lines=S,this.tokenization={getLineTokens:h=>this.lines[h-1]}}getValue(){return this.lines.map(S=>S.getLineContent()).join(` `)}getLineCount(){return this.lines.length}getLineLength(S){return this.lines[S-1].getLineContent().length}}}),define(Q[1880],Y([1,0,20]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FixedArray=void 0;class y{constructor(T){this._default=T,this._store=[]}get(T){return T<this._store.length?this._store[T]:this._default}set(T,f){for(;T>=this._store.length;)this._store[this._store.length]=this._default;this._store[T]=f}replace(T,f,v){if(T>=this._store.length)return;if(f===0){this.insert(T,v);return}else if(v===0){this.delete(T,f);return}const m=this._store.slice(0,T),S=this._store.slice(T+f),h=b(v,this._default);this._store=m.concat(h,S)}delete(T,f){f===0||T>=this._store.length||this._store.splice(T,f)}insert(T,f){if(f===0||T>=this._store.length)return;const v=[];for(let m=0;m<f;m++)v[m]=this._default;this._store=(0,t.arrayInsert)(this._store,T,v)}}e.FixedArray=y;function b(D,T){const f=[];for(let v=0;v<D;v++)f[v]=T;return f}}),define(Q[1881],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.guessIndentation=void 0;class t{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function y(D,T,f,v,m){m.spacesDiff=0,m.looksLikeAlignment=!1;let S;for(S=0;S<T&&S<v;S++){const u=D.charCodeAt(S),d=f.charCodeAt(S);if(u!==d)break}let h=0,a=0;for(let u=S;u<T;u++)D.charCodeAt(u)===32?h++:a++;let r=0,i=0;for(let u=S;u<v;u++)f.charCodeAt(u)===32?r++:i++;if(h>0&&a>0||r>0&&i>0)return;const s=Math.abs(a-i),o=Math.abs(h-r);if(s===0){m.spacesDiff=o,o>0&&0<=r-1&&r-1<D.length&&r<f.length&&f.charCodeAt(r)!==32&&D.charCodeAt(r-1)===32&&D.charCodeAt(D.length-1)===44&&(m.looksLikeAlignment=!0);return}if(o%s===0){m.spacesDiff=o/s;return}}function b(D,T,f){const v=Math.min(D.getLineCount(),1e4);let m=0,S=0,h="",a=0;const r=[2,4,6,8,3,5,7],i=8,s=[0,0,0,0,0,0,0,0,0],o=new t;for(let p=1;p<=v;p++){const c=D.getLineLength(p),l=D.getLineContent(p),n=c<=65536;let g=!1,w=0,E=0,C=0;for(let _=0,A=c;_<A;_++){const k=n?l.charCodeAt(_):D.getLineCharCode(p,_);if(k===9)C++;else if(k===32)E++;else{g=!0,w=_;break}}if(!g||(C>0?m++:E>1&&S++,y(h,a,l,w,o),o.looksLikeAlignment&&!(f&&T===o.spacesDiff)))continue;const I=o.spacesDiff;I<=i&&s[I]++,h=l,a=w}let u=f;m!==S&&(u=m<S);let d=T;if(u){let p=u?0:.1*v;r.forEach(c=>{const l=s[c];l>p&&(p=l,d=c)}),d===4&&s[4]>0&&s[2]>0&&s[2]>=s[4]/2&&(d=2)}return{insertSpaces:u,tabSize:d}}e.guessIndentation=b}),define(Q[800],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.intervalCompare=e.recomputeMaxEnd=e.nodeAcceptEdit=e.IntervalTree=e.SENTINEL=e.IntervalNode=e.setNodeStickiness=e.getNodeColor=e.NodeColor=e.ClassName=void 0;var t;(function(B){B.EditorHintDecoration="squiggly-hint",B.EditorInfoDecoration="squiggly-info",B.EditorWarningDecoration="squiggly-warning",B.EditorErrorDecoration="squiggly-error",B.EditorUnnecessaryDecoration="squiggly-unnecessary",B.EditorUnnecessaryInlineDecoration="squiggly-inline-unnecessary",B.EditorDeprecatedInlineDecoration="squiggly-inline-deprecated"})(t||(e.ClassName=t={}));var y;(function(B){B[B.Black=0]="Black",B[B.Red=1]="Red"})(y||(e.NodeColor=y={}));var b;(function(B){B[B.ColorMask=1]="ColorMask",B[B.ColorMaskInverse=254]="ColorMaskInverse",B[B.ColorOffset=0]="ColorOffset",B[B.IsVisitedMask=2]="IsVisitedMask",B[B.IsVisitedMaskInverse=253]="IsVisitedMaskInverse",B[B.IsVisitedOffset=1]="IsVisitedOffset",B[B.IsForValidationMask=4]="IsForValidationMask",B[B.IsForValidationMaskInverse=251]="IsForValidationMaskInverse",B[B.IsForValidationOffset=2]="IsForValidationOffset",B[B.StickinessMask=24]="StickinessMask",B[B.StickinessMaskInverse=231]="StickinessMaskInverse",B[B.StickinessOffset=3]="StickinessOffset",B[B.CollapseOnReplaceEditMask=32]="CollapseOnReplaceEditMask",B[B.CollapseOnReplaceEditMaskInverse=223]="CollapseOnReplaceEditMaskInverse",B[B.CollapseOnReplaceEditOffset=5]="CollapseOnReplaceEditOffset",B[B.IsMarginMask=64]="IsMarginMask",B[B.IsMarginMaskInverse=191]="IsMarginMaskInverse",B[B.IsMarginOffset=6]="IsMarginOffset",B[B.MIN_SAFE_DELTA=-1073741824]="MIN_SAFE_DELTA",B[B.MAX_SAFE_DELTA=1073741824]="MAX_SAFE_DELTA"})(b||(b={}));function D(B){return(B.metadata&1)>>>0}e.getNodeColor=D;function T(B,K){B.metadata=B.metadata&254|K<<0}function f(B){return(B.metadata&2)>>>1===1}function v(B,K){B.metadata=B.metadata&253|(K?1:0)<<1}function m(B){return(B.metadata&4)>>>2===1}function S(B,K){B.metadata=B.metadata&251|(K?1:0)<<2}function h(B){return(B.metadata&64)>>>6===1}function a(B,K){B.metadata=B.metadata&191|(K?1:0)<<6}function r(B){return(B.metadata&24)>>>3}function i(B,K){B.metadata=B.metadata&231|K<<3}function s(B){return(B.metadata&32)>>>5===1}function o(B,K){B.metadata=B.metadata&223|(K?1:0)<<5}function u(B,K){i(B,K)}e.setNodeStickiness=u;class d{constructor(K,H,U){this.metadata=0,this.parent=this,this.left=this,this.right=this,T(this,1),this.start=H,this.end=U,this.delta=0,this.maxEnd=U,this.id=K,this.ownerId=0,this.options=null,S(this,!1),a(this,!1),i(this,1),o(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=H,this.cachedAbsoluteEnd=U,this.range=null,v(this,!1)}reset(K,H,U,G){this.start=H,this.end=U,this.maxEnd=U,this.cachedVersionId=K,this.cachedAbsoluteStart=H,this.cachedAbsoluteEnd=U,this.range=G}setOptions(K){this.options=K;const H=this.options.className;S(this,H==="squiggly-error"||H==="squiggly-warning"||H==="squiggly-info"),a(this,this.options.glyphMarginClassName!==null),i(this,this.options.stickiness),o(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(K,H,U){this.cachedVersionId!==U&&(this.range=null),this.cachedVersionId=U,this.cachedAbsoluteStart=K,this.cachedAbsoluteEnd=H}detach(){this.parent=null,this.left=null,this.right=null}}e.IntervalNode=d,e.SENTINEL=new d(null,0,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,T(e.SENTINEL,0);class p{constructor(){this.root=e.SENTINEL,this.requestNormalizeDelta=!1}intervalSearch(K,H,U,G,$,ie){return this.root===e.SENTINEL?[]:A(this,K,H,U,G,$,ie)}search(K,H,U,G){return this.root===e.SENTINEL?[]:_(this,K,H,U,G)}collectNodesFromOwner(K){return C(this,K)}collectNodesPostOrder(){return I(this)}insert(K){k(this,K),this._normalizeDeltaIfNecessary()}delete(K){R(this,K),this._normalizeDeltaIfNecessary()}resolveNode(K,H){const U=K;let G=0;for(;K!==this.root;)K===K.parent.right&&(G+=K.parent.delta),K=K.parent;const $=U.start+G,ie=U.end+G;U.setCachedOffsets($,ie,H)}acceptReplace(K,H,U,G){const $=w(this,K,K+H);for(let ie=0,J=$.length;ie<J;ie++){const j=$[ie];R(this,j)}this._normalizeDeltaIfNecessary(),E(this,K,K+H,U),this._normalizeDeltaIfNecessary();for(let ie=0,J=$.length;ie<J;ie++){const j=$[ie];j.start=j.cachedAbsoluteStart,j.end=j.cachedAbsoluteEnd,g(j,K,K+H,U,G),j.maxEnd=j.end,k(this,j)}this._normalizeDeltaIfNecessary()}getAllInOrder(){return _(this,0,!1,0,!1)}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,c(this))}}e.IntervalTree=p;function c(B){let K=B.root,H=0;for(;K!==e.SENTINEL;){if(K.left!==e.SENTINEL&&!f(K.left)){K=K.left;continue}if(K.right!==e.SENTINEL&&!f(K.right)){H+=K.delta,K=K.right;continue}K.start=H+K.start,K.end=H+K.end,K.delta=0,V(K),v(K,!0),v(K.left,!1),v(K.right,!1),K===K.parent.right&&(H-=K.parent.delta),K=K.parent}v(B.root,!1)}var l;(function(B){B[B.MarkerDefined=0]="MarkerDefined",B[B.ForceMove=1]="ForceMove",B[B.ForceStay=2]="ForceStay"})(l||(l={}));function n(B,K,H,U){return B<H?!0:B>H||U===1?!1:U===2?!0:K}function g(B,K,H,U,G){const $=r(B),ie=$===0||$===2,J=$===1||$===2,j=H-K,ee=U,X=Math.min(j,ee),te=B.start;let Z=!1;const se=B.end;let re=!1;K<=te&&se<=H&&s(B)&&(B.start=K,Z=!0,B.end=K,re=!0);{const le=G?1:j>0?2:0;!Z&&n(te,ie,K,le)&&(Z=!0),!re&&n(se,J,K,le)&&(re=!0)}if(X>0&&!G){const le=j>ee?2:0;!Z&&n(te,ie,K+X,le)&&(Z=!0),!re&&n(se,J,K+X,le)&&(re=!0)}{const le=G?1:0;!Z&&n(te,ie,H,le)&&(B.start=K+ee,Z=!0),!re&&n(se,J,H,le)&&(B.end=K+ee,re=!0)}const oe=ee-j;Z||(B.start=Math.max(0,te+oe)),re||(B.end=Math.max(0,se+oe)),B.start>B.end&&(B.end=B.start)}e.nodeAcceptEdit=g;function w(B,K,H){let U=B.root,G=0,$=0,ie=0,J=0;const j=[];let ee=0;for(;U!==e.SENTINEL;){if(f(U)){v(U.left,!1),v(U.right,!1),U===U.parent.right&&(G-=U.parent.delta),U=U.parent;continue}if(!f(U.left)){if($=G+U.maxEnd,$<K){v(U,!0);continue}if(U.left!==e.SENTINEL){U=U.left;continue}}if(ie=G+U.start,ie>H){v(U,!0);continue}if(J=G+U.end,J>=K&&(U.setCachedOffsets(ie,J,0),j[ee++]=U),v(U,!0),U.right!==e.SENTINEL&&!f(U.right)){G+=U.delta,U=U.right;continue}}return v(B.root,!1),j}function E(B,K,H,U){let G=B.root,$=0,ie=0,J=0;const j=U-(H-K);for(;G!==e.SENTINEL;){if(f(G)){v(G.left,!1),v(G.right,!1),G===G.parent.right&&($-=G.parent.delta),V(G),G=G.parent;continue}if(!f(G.left)){if(ie=$+G.maxEnd,ie<K){v(G,!0);continue}if(G.left!==e.SENTINEL){G=G.left;continue}}if(J=$+G.start,J>H){G.start+=j,G.end+=j,G.delta+=j,(G.delta<-1073741824||G.delta>1073741824)&&(B.requestNormalizeDelta=!0),v(G,!0);continue}if(v(G,!0),G.right!==e.SENTINEL&&!f(G.right)){$+=G.delta,G=G.right;continue}}v(B.root,!1)}function C(B,K){let H=B.root;const U=[];let G=0;for(;H!==e.SENTINEL;){if(f(H)){v(H.left,!1),v(H.right,!1),H=H.parent;continue}if(H.left!==e.SENTINEL&&!f(H.left)){H=H.left;continue}if(H.ownerId===K&&(U[G++]=H),v(H,!0),H.right!==e.SENTINEL&&!f(H.right)){H=H.right;continue}}return v(B.root,!1),U}function I(B){let K=B.root;const H=[];let U=0;for(;K!==e.SENTINEL;){if(f(K)){v(K.left,!1),v(K.right,!1),K=K.parent;continue}if(K.left!==e.SENTINEL&&!f(K.left)){K=K.left;continue}if(K.right!==e.SENTINEL&&!f(K.right)){K=K.right;continue}H[U++]=K,v(K,!0)}return v(B.root,!1),H}function _(B,K,H,U,G){let $=B.root,ie=0,J=0,j=0;const ee=[];let X=0;for(;$!==e.SENTINEL;){if(f($)){v($.left,!1),v($.right,!1),$===$.parent.right&&(ie-=$.parent.delta),$=$.parent;continue}if($.left!==e.SENTINEL&&!f($.left)){$=$.left;continue}J=ie+$.start,j=ie+$.end,$.setCachedOffsets(J,j,U);let te=!0;if(K&&$.ownerId&&$.ownerId!==K&&(te=!1),H&&m($)&&(te=!1),G&&!h($)&&(te=!1),te&&(ee[X++]=$),v($,!0),$.right!==e.SENTINEL&&!f($.right)){ie+=$.delta,$=$.right;continue}}return v(B.root,!1),ee}function A(B,K,H,U,G,$,ie){let J=B.root,j=0,ee=0,X=0,te=0;const Z=[];let se=0;for(;J!==e.SENTINEL;){if(f(J)){v(J.left,!1),v(J.right,!1),J===J.parent.right&&(j-=J.parent.delta),J=J.parent;continue}if(!f(J.left)){if(ee=j+J.maxEnd,ee<K){v(J,!0);continue}if(J.left!==e.SENTINEL){J=J.left;continue}}if(X=j+J.start,X>H){v(J,!0);continue}if(te=j+J.end,te>=K){J.setCachedOffsets(X,te,$);let re=!0;U&&J.ownerId&&J.ownerId!==U&&(re=!1),G&&m(J)&&(re=!1),ie&&!h(J)&&(re=!1),re&&(Z[se++]=J)}if(v(J,!0),J.right!==e.SENTINEL&&!f(J.right)){j+=J.delta,J=J.right;continue}}return v(B.root,!1),Z}function k(B,K){if(B.root===e.SENTINEL)return K.parent=e.SENTINEL,K.left=e.SENTINEL,K.right=e.SENTINEL,T(K,0),B.root=K,B.root;L(B,K),W(K.parent);let H=K;for(;H!==B.root&&D(H.parent)===1;)if(H.parent===H.parent.parent.left){const U=H.parent.parent.right;D(U)===1?(T(H.parent,0),T(U,0),T(H.parent.parent,1),H=H.parent.parent):(H===H.parent.right&&(H=H.parent,P(B,H)),T(H.parent,0),T(H.parent.parent,1),x(B,H.parent.parent))}else{const U=H.parent.parent.left;D(U)===1?(T(H.parent,0),T(U,0),T(H.parent.parent,1),H=H.parent.parent):(H===H.parent.left&&(H=H.parent,x(B,H)),T(H.parent,0),T(H.parent.parent,1),P(B,H.parent.parent))}return T(B.root,0),K}function L(B,K){let H=0,U=B.root;const G=K.start,$=K.end;for(;;)if(z(G,$,U.start+H,U.end+H)<0)if(U.left===e.SENTINEL){K.start-=H,K.end-=H,K.maxEnd-=H,U.left=K;break}else U=U.left;else if(U.right===e.SENTINEL){K.start-=H+U.delta,K.end-=H+U.delta,K.maxEnd-=H+U.delta,U.right=K;break}else H+=U.delta,U=U.right;K.parent=U,K.left=e.SENTINEL,K.right=e.SENTINEL,T(K,1)}function R(B,K){let H,U;if(K.left===e.SENTINEL?(H=K.right,U=K,H.delta+=K.delta,(H.delta<-1073741824||H.delta>1073741824)&&(B.requestNormalizeDelta=!0),H.start+=K.delta,H.end+=K.delta):K.right===e.SENTINEL?(H=K.left,U=K):(U=M(K.right),H=U.right,H.start+=U.delta,H.end+=U.delta,H.delta+=U.delta,(H.delta<-1073741824||H.delta>1073741824)&&(B.requestNormalizeDelta=!0),U.start+=K.delta,U.end+=K.delta,U.delta=K.delta,(U.delta<-1073741824||U.delta>1073741824)&&(B.requestNormalizeDelta=!0)),U===B.root){B.root=H,T(H,0),K.detach(),N(),V(H),B.root.parent=e.SENTINEL;return}const G=D(U)===1;if(U===U.parent.left?U.parent.left=H:U.parent.right=H,U===K?H.parent=U.parent:(U.parent===K?H.parent=U:H.parent=U.parent,U.left=K.left,U.right=K.right,U.parent=K.parent,T(U,D(K)),K===B.root?B.root=U:K===K.parent.left?K.parent.left=U:K.parent.right=U,U.left!==e.SENTINEL&&(U.left.parent=U),U.right!==e.SENTINEL&&(U.right.parent=U)),K.detach(),G){W(H.parent),U!==K&&(W(U),W(U.parent)),N();return}W(H),W(H.parent),U!==K&&(W(U),W(U.parent));let $;for(;H!==B.root&&D(H)===0;)H===H.parent.left?($=H.parent.right,D($)===1&&(T($,0),T(H.parent,1),P(B,H.parent),$=H.parent.right),D($.left)===0&&D($.right)===0?(T($,1),H=H.parent):(D($.right)===0&&(T($.left,0),T($,1),x(B,$),$=H.parent.right),T($,D(H.parent)),T(H.parent,0),T($.right,0),P(B,H.parent),H=B.root)):($=H.parent.left,D($)===1&&(T($,0),T(H.parent,1),x(B,H.parent),$=H.parent.left),D($.left)===0&&D($.right)===0?(T($,1),H=H.parent):(D($.left)===0&&(T($.right,0),T($,1),P(B,$),$=H.parent.left),T($,D(H.parent)),T(H.parent,0),T($.left,0),x(B,H.parent),H=B.root));T(H,0),N()}function M(B){for(;B.left!==e.SENTINEL;)B=B.left;return B}function N(){e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.delta=0,e.SENTINEL.start=0,e.SENTINEL.end=0}function P(B,K){const H=K.right;H.delta+=K.delta,(H.delta<-1073741824||H.delta>1073741824)&&(B.requestNormalizeDelta=!0),H.start+=K.delta,H.end+=K.delta,K.right=H.left,H.left!==e.SENTINEL&&(H.left.parent=K),H.parent=K.parent,K.parent===e.SENTINEL?B.root=H:K===K.parent.left?K.parent.left=H:K.parent.right=H,H.left=K,K.parent=H,V(K),V(H)}function x(B,K){const H=K.left;K.delta-=H.delta,(K.delta<-1073741824||K.delta>1073741824)&&(B.requestNormalizeDelta=!0),K.start-=H.delta,K.end-=H.delta,K.left=H.right,H.right!==e.SENTINEL&&(H.right.parent=K),H.parent=K.parent,K.parent===e.SENTINEL?B.root=H:K===K.parent.right?K.parent.right=H:K.parent.left=H,H.right=K,K.parent=H,V(K),V(H)}function F(B){let K=B.end;if(B.left!==e.SENTINEL){const H=B.left.maxEnd;H>K&&(K=H)}if(B.right!==e.SENTINEL){const H=B.right.maxEnd+B.delta;H>K&&(K=H)}return K}function V(B){B.maxEnd=F(B)}e.recomputeMaxEnd=V;function W(B){for(;B!==e.SENTINEL;){const K=F(B);if(B.maxEnd===K)return;B.maxEnd=K,B=B.parent}}function z(B,K,H,U){return B===H?K-U:B-H}e.intervalCompare=z}),define(Q[1882],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recomputeTreeMetadata=e.updateTreeMetadata=e.fixInsert=e.rbDelete=e.rightRotate=e.leftRotate=e.righttest=e.leftest=e.SENTINEL=e.NodeColor=e.TreeNode=void 0;class t{constructor(o,u){this.piece=o,this.color=u,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==e.SENTINEL)return b(this.right);let o=this;for(;o.parent!==e.SENTINEL&&o.parent.left!==o;)o=o.parent;return o.parent===e.SENTINEL?e.SENTINEL:o.parent}prev(){if(this.left!==e.SENTINEL)return D(this.left);let o=this;for(;o.parent!==e.SENTINEL&&o.parent.right!==o;)o=o.parent;return o.parent===e.SENTINEL?e.SENTINEL:o.parent}detach(){this.parent=null,this.left=null,this.right=null}}e.TreeNode=t;var y;(function(s){s[s.Black=0]="Black",s[s.Red=1]="Red"})(y||(e.NodeColor=y={})),e.SENTINEL=new t(null,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,e.SENTINEL.color=0;function b(s){for(;s.left!==e.SENTINEL;)s=s.left;return s}e.leftest=b;function D(s){for(;s.right!==e.SENTINEL;)s=s.right;return s}e.righttest=D;function T(s){return s===e.SENTINEL?0:s.size_left+s.piece.length+T(s.right)}function f(s){return s===e.SENTINEL?0:s.lf_left+s.piece.lineFeedCnt+f(s.right)}function v(){e.SENTINEL.parent=e.SENTINEL}function m(s,o){const u=o.right;u.size_left+=o.size_left+(o.piece?o.piece.length:0),u.lf_left+=o.lf_left+(o.piece?o.piece.lineFeedCnt:0),o.right=u.left,u.left!==e.SENTINEL&&(u.left.parent=o),u.parent=o.parent,o.parent===e.SENTINEL?s.root=u:o.parent.left===o?o.parent.left=u:o.parent.right=u,u.left=o,o.parent=u}e.leftRotate=m;function S(s,o){const u=o.left;o.left=u.right,u.right!==e.SENTINEL&&(u.right.parent=o),u.parent=o.parent,o.size_left-=u.size_left+(u.piece?u.piece.length:0),o.lf_left-=u.lf_left+(u.piece?u.piece.lineFeedCnt:0),o.parent===e.SENTINEL?s.root=u:o===o.parent.right?o.parent.right=u:o.parent.left=u,u.right=o,o.parent=u}e.rightRotate=S;function h(s,o){let u,d;if(o.left===e.SENTINEL?(d=o,u=d.right):o.right===e.SENTINEL?(d=o,u=d.left):(d=b(o.right),u=d.right),d===s.root){s.root=u,u.color=0,o.detach(),v(),s.root.parent=e.SENTINEL;return}const p=d.color===1;if(d===d.parent.left?d.parent.left=u:d.parent.right=u,d===o?(u.parent=d.parent,i(s,u)):(d.parent===o?u.parent=d:u.parent=d.parent,i(s,u),d.left=o.left,d.right=o.right,d.parent=o.parent,d.color=o.color,o===s.root?s.root=d:o===o.parent.left?o.parent.left=d:o.parent.right=d,d.left!==e.SENTINEL&&(d.left.parent=d),d.right!==e.SENTINEL&&(d.right.parent=d),d.size_left=o.size_left,d.lf_left=o.lf_left,i(s,d)),o.detach(),u.parent.left===u){const l=T(u),n=f(u);if(l!==u.parent.size_left||n!==u.parent.lf_left){const g=l-u.parent.size_left,w=n-u.parent.lf_left;u.parent.size_left=l,u.parent.lf_left=n,r(s,u.parent,g,w)}}if(i(s,u.parent),p){v();return}let c;for(;u!==s.root&&u.color===0;)u===u.parent.left?(c=u.parent.right,c.color===1&&(c.color=0,u.parent.color=1,m(s,u.parent),c=u.parent.right),c.left.color===0&&c.right.color===0?(c.color=1,u=u.parent):(c.right.color===0&&(c.left.color=0,c.color=1,S(s,c),c=u.parent.right),c.color=u.parent.color,u.parent.color=0,c.right.color=0,m(s,u.parent),u=s.root)):(c=u.parent.left,c.color===1&&(c.color=0,u.parent.color=1,S(s,u.parent),c=u.parent.left),c.left.color===0&&c.right.color===0?(c.color=1,u=u.parent):(c.left.color===0&&(c.right.color=0,c.color=1,m(s,c),c=u.parent.left),c.color=u.parent.color,u.parent.color=0,c.left.color=0,S(s,u.parent),u=s.root));u.color=0,v()}e.rbDelete=h;function a(s,o){for(i(s,o);o!==s.root&&o.parent.color===1;)if(o.parent===o.parent.parent.left){const u=o.parent.parent.right;u.color===1?(o.parent.color=0,u.color=0,o.parent.parent.color=1,o=o.parent.parent):(o===o.parent.right&&(o=o.parent,m(s,o)),o.parent.color=0,o.parent.parent.color=1,S(s,o.parent.parent))}else{const u=o.parent.parent.left;u.color===1?(o.parent.color=0,u.color=0,o.parent.parent.color=1,o=o.parent.parent):(o===o.parent.left&&(o=o.parent,S(s,o)),o.parent.color=0,o.parent.parent.color=1,m(s,o.parent.parent))}s.root.color=0}e.fixInsert=a;function r(s,o,u,d){for(;o!==s.root&&o!==e.SENTINEL;)o.parent.left===o&&(o.parent.size_left+=u,o.parent.lf_left+=d),o=o.parent}e.updateTreeMetadata=r;function i(s,o){let u=0,d=0;if(o!==s.root){for(;o!==s.root&&o===o.parent.right;)o=o.parent;if(o!==s.root)for(o=o.parent,u=T(o.left)-o.size_left,d=f(o.left)-o.lf_left,o.size_left+=u,o.lf_left+=d;o!==s.root&&(u!==0||d!==0);)o.parent.left===o&&(o.parent.size_left+=u,o.parent.lf_left+=d),o=o.parent}}e.recomputeTreeMetadata=i}),define(Q[490],Y([1,0,20,654]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSumIndexOfResult=e.ConstantTimePrefixSumComputer=e.PrefixSumComputer=void 0;class b{constructor(v){this.values=v,this.prefixSum=new Uint32Array(v.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}getCount(){return this.values.length}insertValues(v,m){v=(0,y.toUint32)(v);const S=this.values,h=this.prefixSum,a=m.length;return a===0?!1:(this.values=new Uint32Array(S.length+a),this.values.set(S.subarray(0,v),0),this.values.set(S.subarray(v),v+a),this.values.set(m,v),v-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=v-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(h.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(v,m){return v=(0,y.toUint32)(v),m=(0,y.toUint32)(m),this.values[v]===m?!1:(this.values[v]=m,v-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=v-1),!0)}removeValues(v,m){v=(0,y.toUint32)(v),m=(0,y.toUint32)(m);const S=this.values,h=this.prefixSum;if(v>=S.length)return!1;const a=S.length-v;return m>=a&&(m=a),m===0?!1:(this.values=new Uint32Array(S.length-m),this.values.set(S.subarray(0,v),0),this.values.set(S.subarray(v+m),v),this.prefixSum=new Uint32Array(this.values.length),v-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=v-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(h.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(v){return v<0?0:(v=(0,y.toUint32)(v),this._getPrefixSum(v))}_getPrefixSum(v){if(v<=this.prefixSumValidIndex[0])return this.prefixSum[v];let m=this.prefixSumValidIndex[0]+1;m===0&&(this.prefixSum[0]=this.values[0],m++),v>=this.values.length&&(v=this.values.length-1);for(let S=m;S<=v;S++)this.prefixSum[S]=this.prefixSum[S-1]+this.values[S];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],v),this.prefixSum[v]}getIndexOf(v){v=Math.floor(v),this.getTotalSum();let m=0,S=this.values.length-1,h=0,a=0,r=0;for(;m<=S;)if(h=m+(S-m)/2|0,a=this.prefixSum[h],r=a-this.values[h],v<r)S=h-1;else if(v>=a)m=h+1;else break;return new T(h,v-r)}}e.PrefixSumComputer=b;class D{constructor(v){this._values=v,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(v){return this._ensureValid(),v===0?0:this._prefixSum[v-1]}getIndexOf(v){this._ensureValid();const m=this._indexBySum[v],S=m>0?this._prefixSum[m-1]:0;return new T(m,v-S)}removeValues(v,m){this._values.splice(v,m),this._invalidate(v)}insertValues(v,m){this._values=(0,t.arrayInsert)(this._values,v,m),this._invalidate(v)}_invalidate(v){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,v-1)}_ensureValid(){if(!this._isValid){for(let v=this._validEndIndex+1,m=this._values.length;v<m;v++){const S=this._values[v],h=v>0?this._prefixSum[v-1]:0;this._prefixSum[v]=h+S;for(let a=0;a<S;a++)this._indexBySum[h+a]=v}this._prefixSum.length=this._values.length,this._indexBySum.length=this._prefixSum[this._prefixSum.length-1],this._isValid=!0,this._validEndIndex=this._values.length-1}}setValue(v,m){this._values[v]!==m&&(this._values[v]=m,this._invalidate(v))}}e.ConstantTimePrefixSumComputer=D;class T{constructor(v,m){this.index=v,this.remainder=m,this._prefixSumIndexOfResultBrand=void 0,this.index=v,this.remainder=m}}e.PrefixSumIndexOfResult=T}),define(Q[1883],Y([1,0,33,51,490]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MirrorTextModel=void 0;class D{constructor(f,v,m,S){this._uri=f,this._lines=v,this._eol=m,this._versionId=S,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(f){f.eol&&f.eol!==this._eol&&(this._eol=f.eol,this._lineStarts=null);const v=f.changes;for(const m of v)this._acceptDeleteRange(m.range),this._acceptInsertText(new y.Position(m.range.startLineNumber,m.range.startColumn),m.text);this._versionId=f.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const f=this._eol.length,v=this._lines.length,m=new Uint32Array(v);for(let S=0;S<v;S++)m[S]=this._lines[S].length+f;this._lineStarts=new b.PrefixSumComputer(m)}}_setLineText(f,v){this._lines[f]=v,this._lineStarts&&this._lineStarts.setValue(f,this._lines[f].length+this._eol.length)}_acceptDeleteRange(f){if(f.startLineNumber===f.endLineNumber){if(f.startColumn===f.endColumn)return;this._setLineText(f.startLineNumber-1,this._lines[f.startLineNumber-1].substring(0,f.startColumn-1)+this._lines[f.startLineNumber-1].substring(f.endColumn-1));return}this._setLineText(f.startLineNumber-1,this._lines[f.startLineNumber-1].substring(0,f.startColumn-1)+this._lines[f.endLineNumber-1].substring(f.endColumn-1)),this._lines.splice(f.startLineNumber,f.endLineNumber-f.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(f.startLineNumber,f.endLineNumber-f.startLineNumber)}_acceptInsertText(f,v){if(v.length===0)return;const m=(0,t.splitLines)(v);if(m.length===1){this._setLineText(f.lineNumber-1,this._lines[f.lineNumber-1].substring(0,f.column-1)+m[0]+this._lines[f.lineNumber-1].substring(f.column-1));return}m[m.length-1]+=this._lines[f.lineNumber-1].substring(f.column-1),this._setLineText(f.lineNumber-1,this._lines[f.lineNumber-1].substring(0,f.column-1)+m[0]);const S=new Uint32Array(m.length-1);for(let h=1;h<m.length;h++)this._lines.splice(f.lineNumber+h-1,0,m[h]),S[h-1]=m[h].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(f.lineNumber,S)}}e.MirrorTextModel=D}),define(Q[1078],Y([1,0,4]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelPart=void 0;class y extends t.Disposable{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}e.TextModelPart=y}),define(Q[440],Y([1,0,33,563,51,27,137]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Searcher=e.isValidMatch=e.TextModelSearch=e.createFindMatch=e.isMultilineRegexSource=e.SearchParams=void 0;const f=999;class v{constructor(d,p,c,l){this.searchString=d,this.isRegex=p,this.matchCase=c,this.wordSeparators=l}parseSearchRequest(){if(this.searchString==="")return null;let d;this.isRegex?d=m(this.searchString):d=this.searchString.indexOf(` `)>=0;let p=null;try{p=t.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:d,global:!0,unicode:!0})}catch{return null}if(!p)return null;let c=!this.isRegex&&!d;return c&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(c=this.matchCase),new T.SearchData(p,this.wordSeparators?(0,y.getMapForWordSeparators)(this.wordSeparators):null,c?this.searchString:null)}}e.SearchParams=v;function m(u){if(!u||u.length===0)return!1;for(let d=0,p=u.length;d<p;d++){const c=u.charCodeAt(d);if(c===10)return!0;if(c===92){if(d++,d>=p)break;const l=u.charCodeAt(d);if(l===110||l===114||l===87)return!0}}return!1}e.isMultilineRegexSource=m;function S(u,d,p){if(!p)return new T.FindMatch(u,null);const c=[];for(let l=0,n=d.length;l<n;l++)c[l]=d[l];return new T.FindMatch(u,c)}e.createFindMatch=S;class h{constructor(d){const p=[];let c=0;for(let l=0,n=d.length;l<n;l++)d.charCodeAt(l)===10&&(p[c++]=l);this._lineFeedsOffsets=p}findLineFeedCountBeforeOffset(d){const p=this._lineFeedsOffsets;let c=0,l=p.length-1;if(l===-1||d<=p[0])return 0;for(;c<l;){const n=c+((l-c)/2>>0);p[n]>=d?l=n-1:p[n+1]>=d?(c=n,l=n):c=n+1}return c+1}}class a{static findMatches(d,p,c,l,n){const g=p.parseSearchRequest();return g?g.regex.multiline?this._doFindMatchesMultiline(d,c,new o(g.wordSeparators,g.regex),l,n):this._doFindMatchesLineByLine(d,c,g,l,n):[]}static _getMultilineMatchRange(d,p,c,l,n,g){let w,E=0;l?(E=l.findLineFeedCountBeforeOffset(n),w=p+n+E):w=p+n;let C;if(l){const k=l.findLineFeedCountBeforeOffset(n+g.length)-E;C=w+g.length+k}else C=w+g.length;const I=d.getPositionAt(w),_=d.getPositionAt(C);return new D.Range(I.lineNumber,I.column,_.lineNumber,_.column)}static _doFindMatchesMultiline(d,p,c,l,n){const g=d.getOffsetAt(p.getStartPosition()),w=d.getValueInRange(p,1),E=d.getEOL()===`\r `?new h(w):null,C=[];let I=0,_;for(c.reset(0);_=c.next(w);)if(C[I++]=S(this._getMultilineMatchRange(d,g,w,E,_.index,_[0]),_,l),I>=n)return C;return C}static _doFindMatchesLineByLine(d,p,c,l,n){const g=[];let w=0;if(p.startLineNumber===p.endLineNumber){const C=d.getLineContent(p.startLineNumber).substring(p.startColumn-1,p.endColumn-1);return w=this._findMatchesInLine(c,C,p.startLineNumber,p.startColumn-1,w,g,l,n),g}const E=d.getLineContent(p.startLineNumber).substring(p.startColumn-1);w=this._findMatchesInLine(c,E,p.startLineNumber,p.startColumn-1,w,g,l,n);for(let C=p.startLineNumber+1;C<p.endLineNumber&&w<n;C++)w=this._findMatchesInLine(c,d.getLineContent(C),C,0,w,g,l,n);if(w<n){const C=d.getLineContent(p.endLineNumber).substring(0,p.endColumn-1);w=this._findMatchesInLine(c,C,p.endLineNumber,0,w,g,l,n)}return g}static _findMatchesInLine(d,p,c,l,n,g,w,E){const C=d.wordSeparators;if(!w&&d.simpleSearch){const A=d.simpleSearch,k=A.length,L=p.length;let R=-k;for(;(R=p.indexOf(A,R+k))!==-1;)if((!C||s(C,p,L,R,k))&&(g[n++]=new T.FindMatch(new D.Range(c,R+1+l,c,R+1+k+l),null),n>=E))return n;return n}const I=new o(d.wordSeparators,d.regex);let _;I.reset(0);do if(_=I.next(p),_&&(g[n++]=S(new D.Range(c,_.index+1+l,c,_.index+1+_[0].length+l),_,w),n>=E))return n;while(_);return n}static findNextMatch(d,p,c,l){const n=p.parseSearchRequest();if(!n)return null;const g=new o(n.wordSeparators,n.regex);return n.regex.multiline?this._doFindNextMatchMultiline(d,c,g,l):this._doFindNextMatchLineByLine(d,c,g,l)}static _doFindNextMatchMultiline(d,p,c,l){const n=new b.Position(p.lineNumber,1),g=d.getOffsetAt(n),w=d.getLineCount(),E=d.getValueInRange(new D.Range(n.lineNumber,n.column,w,d.getLineMaxColumn(w)),1),C=d.getEOL()===`\r `?new h(E):null;c.reset(p.column-1);const I=c.next(E);return I?S(this._getMultilineMatchRange(d,g,E,C,I.index,I[0]),I,l):p.lineNumber!==1||p.column!==1?this._doFindNextMatchMultiline(d,new b.Position(1,1),c,l):null}static _doFindNextMatchLineByLine(d,p,c,l){const n=d.getLineCount(),g=p.lineNumber,w=d.getLineContent(g),E=this._findFirstMatchInLine(c,w,g,p.column,l);if(E)return E;for(let C=1;C<=n;C++){const I=(g+C-1)%n,_=d.getLineContent(I+1),A=this._findFirstMatchInLine(c,_,I+1,1,l);if(A)return A}return null}static _findFirstMatchInLine(d,p,c,l,n){d.reset(l-1);const g=d.next(p);return g?S(new D.Range(c,g.index+1,c,g.index+1+g[0].length),g,n):null}static findPreviousMatch(d,p,c,l){const n=p.parseSearchRequest();if(!n)return null;const g=new o(n.wordSeparators,n.regex);return n.regex.multiline?this._doFindPreviousMatchMultiline(d,c,g,l):this._doFindPreviousMatchLineByLine(d,c,g,l)}static _doFindPreviousMatchMultiline(d,p,c,l){const n=this._doFindMatchesMultiline(d,new D.Range(1,1,p.lineNumber,p.column),c,l,10*f);if(n.length>0)return n[n.length-1];const g=d.getLineCount();return p.lineNumber!==g||p.column!==d.getLineMaxColumn(g)?this._doFindPreviousMatchMultiline(d,new b.Position(g,d.getLineMaxColumn(g)),c,l):null}static _doFindPreviousMatchLineByLine(d,p,c,l){const n=d.getLineCount(),g=p.lineNumber,w=d.getLineContent(g).substring(0,p.column-1),E=this._findLastMatchInLine(c,w,g,l);if(E)return E;for(let C=1;C<=n;C++){const I=(n+g-C-1)%n,_=d.getLineContent(I+1),A=this._findLastMatchInLine(c,_,I+1,l);if(A)return A}return null}static _findLastMatchInLine(d,p,c,l){let n=null,g;for(d.reset(0);g=d.next(p);)n=S(new D.Range(c,g.index+1,c,g.index+1+g[0].length),g,l);return n}}e.TextModelSearch=a;function r(u,d,p,c,l){if(c===0)return!0;const n=d.charCodeAt(c-1);if(u.get(n)!==0||n===13||n===10)return!0;if(l>0){const g=d.charCodeAt(c);if(u.get(g)!==0)return!0}return!1}function i(u,d,p,c,l){if(c+l===p)return!0;const n=d.charCodeAt(c+l);if(u.get(n)!==0||n===13||n===10)return!0;if(l>0){const g=d.charCodeAt(c+l-1);if(u.get(g)!==0)return!0}return!1}function s(u,d,p,c,l){return r(u,d,p,c,l)&&i(u,d,p,c,l)}e.isValidMatch=s;class o{constructor(d,p){this._wordSeparators=d,this._searchRegex=p,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(d){this._searchRegex.lastIndex=d,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(d){const p=d.length;let c;do{if(this._prevMatchStartIndex+this._prevMatchLength===p||(c=this._searchRegex.exec(d),!c))return null;const l=c.index,n=c[0].length;if(l===this._prevMatchStartIndex&&n===this._prevMatchLength){if(n===0){t.getNextCodePoint(d,p,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=l,this._prevMatchLength=n,!this._wordSeparators||s(this._wordSeparators,d,p,l,n))return c}while(c);return null}}e.Searcher=o}),define(Q[1079],Y([1,0,51,27,137,1882,440]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeBase=e.StringBuffer=e.Piece=e.createLineStarts=e.createLineStartsFast=void 0;const f=65535;function v(u){let d;return u[u.length-1]<65536?d=new Uint16Array(u.length):d=new Uint32Array(u.length),d.set(u,0),d}class m{constructor(d,p,c,l,n){this.lineStarts=d,this.cr=p,this.lf=c,this.crlf=l,this.isBasicASCII=n}}function S(u,d=!0){const p=[0];let c=1;for(let l=0,n=u.length;l<n;l++){const g=u.charCodeAt(l);g===13?l+1<n&&u.charCodeAt(l+1)===10?(p[c++]=l+2,l++):p[c++]=l+1:g===10&&(p[c++]=l+1)}return d?v(p):p}e.createLineStartsFast=S;function h(u,d){u.length=0,u[0]=0;let p=1,c=0,l=0,n=0,g=!0;for(let E=0,C=d.length;E<C;E++){const I=d.charCodeAt(E);I===13?E+1<C&&d.charCodeAt(E+1)===10?(n++,u[p++]=E+2,E++):(c++,u[p++]=E+1):I===10?(l++,u[p++]=E+1):g&&I!==9&&(I<32||I>126)&&(g=!1)}const w=new m(v(u),c,l,n,g);return u.length=0,w}e.createLineStarts=h;class a{constructor(d,p,c,l,n){this.bufferIndex=d,this.start=p,this.end=c,this.lineFeedCnt=l,this.length=n}}e.Piece=a;class r{constructor(d,p){this.buffer=d,this.lineStarts=p}}e.StringBuffer=r;class i{constructor(d,p){this._pieces=[],this._tree=d,this._BOM=p,this._index=0,d.root!==D.SENTINEL&&d.iterate(d.root,c=>(c!==D.SENTINEL&&this._pieces.push(c.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class s{constructor(d){this._limit=d,this._cache=[]}get(d){for(let p=this._cache.length-1;p>=0;p--){const c=this._cache[p];if(c.nodeStartOffset<=d&&c.nodeStartOffset+c.node.piece.length>=d)return c}return null}get2(d){for(let p=this._cache.length-1;p>=0;p--){const c=this._cache[p];if(c.nodeStartLineNumber&&c.nodeStartLineNumber<d&&c.nodeStartLineNumber+c.node.piece.lineFeedCnt>=d)return c}return null}set(d){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(d)}validate(d){let p=!1;const c=this._cache;for(let l=0;l<c.length;l++){const n=c[l];if(n.node.parent===null||n.nodeStartOffset>=d){c[l]=null,p=!0;continue}}if(p){const l=[];for(const n of c)n!==null&&l.push(n);this._cache=l}}}class o{constructor(d,p,c){this.create(d,p,c)}create(d,p,c){this._buffers=[new r("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=D.SENTINEL,this._lineCnt=1,this._length=0,this._EOL=p,this._EOLLength=p.length,this._EOLNormalized=c;let l=null;for(let n=0,g=d.length;n<g;n++)if(d[n].buffer.length>0){d[n].lineStarts||(d[n].lineStarts=S(d[n].buffer));const w=new a(n+1,{line:0,column:0},{line:d[n].lineStarts.length-1,column:d[n].buffer.length-d[n].lineStarts[d[n].lineStarts.length-1]},d[n].lineStarts.length-1,d[n].buffer.length);this._buffers.push(d[n]),l=this.rbInsertRight(l,w)}this._searchCache=new s(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(d){const p=f,c=p-Math.floor(p/3),l=c*2;let n="",g=0;const w=[];if(this.iterate(this.root,E=>{const C=this.getNodeContent(E),I=C.length;if(g<=c||g+I<l)return n+=C,g+=I,!0;const _=n.replace(/\r\n|\r|\n/g,d);return w.push(new r(_,S(_))),n=C,g=I,!0}),g>0){const E=n.replace(/\r\n|\r|\n/g,d);w.push(new r(E,S(E)))}this.create(w,d,!0)}getEOL(){return this._EOL}setEOL(d){this._EOL=d,this._EOLLength=this._EOL.length,this.normalizeEOL(d)}createSnapshot(d){return new i(this,d)}equal(d){if(this.getLength()!==d.getLength()||this.getLineCount()!==d.getLineCount())return!1;let p=0;return this.iterate(this.root,l=>{if(l===D.SENTINEL)return!0;const n=this.getNodeContent(l),g=n.length,w=d.nodeAt(p),E=d.nodeAt(p+g),C=d.getValueInRange2(w,E);return p+=g,n===C})}getOffsetAt(d,p){let c=0,l=this.root;for(;l!==D.SENTINEL;)if(l.left!==D.SENTINEL&&l.lf_left+1>=d)l=l.left;else if(l.lf_left+l.piece.lineFeedCnt+1>=d){c+=l.size_left;const n=this.getAccumulatedValue(l,d-l.lf_left-2);return c+=n+p-1}else d-=l.lf_left+l.piece.lineFeedCnt,c+=l.size_left+l.piece.length,l=l.right;return c}getPositionAt(d){d=Math.floor(d),d=Math.max(0,d);let p=this.root,c=0;const l=d;for(;p!==D.SENTINEL;)if(p.size_left!==0&&p.size_left>=d)p=p.left;else if(p.size_left+p.piece.length>=d){const n=this.getIndexOf(p,d-p.size_left);if(c+=p.lf_left+n.index,n.index===0){const g=this.getOffsetAt(c+1,1),w=l-g;return new t.Position(c+1,w+1)}return new t.Position(c+1,n.remainder+1)}else if(d-=p.size_left+p.piece.length,c+=p.lf_left+p.piece.lineFeedCnt,p.right===D.SENTINEL){const n=this.getOffsetAt(c+1,1),g=l-d-n;return new t.Position(c+1,g+1)}else p=p.right;return new t.Position(1,1)}getValueInRange(d,p){if(d.startLineNumber===d.endLineNumber&&d.startColumn===d.endColumn)return"";const c=this.nodeAt2(d.startLineNumber,d.startColumn),l=this.nodeAt2(d.endLineNumber,d.endColumn),n=this.getValueInRange2(c,l);return p?p!==this._EOL||!this._EOLNormalized?n.replace(/\r\n|\r|\n/g,p):p===this.getEOL()&&this._EOLNormalized?n:n.replace(/\r\n|\r|\n/g,p):n}getValueInRange2(d,p){if(d.node===p.node){const w=d.node,E=this._buffers[w.piece.bufferIndex].buffer,C=this.offsetInBuffer(w.piece.bufferIndex,w.piece.start);return E.substring(C+d.remainder,C+p.remainder)}let c=d.node;const l=this._buffers[c.piece.bufferIndex].buffer,n=this.offsetInBuffer(c.piece.bufferIndex,c.piece.start);let g=l.substring(n+d.remainder,n+c.piece.length);for(c=c.next();c!==D.SENTINEL;){const w=this._buffers[c.piece.bufferIndex].buffer,E=this.offsetInBuffer(c.piece.bufferIndex,c.piece.start);if(c===p.node){g+=w.substring(E,E+p.remainder);break}else g+=w.substr(E,c.piece.length);c=c.next()}return g}getLinesContent(){const d=[];let p=0,c="",l=!1;return this.iterate(this.root,n=>{if(n===D.SENTINEL)return!0;const g=n.piece;let w=g.length;if(w===0)return!0;const E=this._buffers[g.bufferIndex].buffer,C=this._buffers[g.bufferIndex].lineStarts,I=g.start.line,_=g.end.line;let A=C[I]+g.start.column;if(l&&(E.charCodeAt(A)===10&&(A++,w--),d[p++]=c,c="",l=!1,w===0))return!0;if(I===_)return!this._EOLNormalized&&E.charCodeAt(A+w-1)===13?(l=!0,c+=E.substr(A,w-1)):c+=E.substr(A,w),!0;c+=this._EOLNormalized?E.substring(A,Math.max(A,C[I+1]-this._EOLLength)):E.substring(A,C[I+1]).replace(/(\r\n|\r|\n)$/,""),d[p++]=c;for(let k=I+1;k<_;k++)c=this._EOLNormalized?E.substring(C[k],C[k+1]-this._EOLLength):E.substring(C[k],C[k+1]).replace(/(\r\n|\r|\n)$/,""),d[p++]=c;return!this._EOLNormalized&&E.charCodeAt(C[_]+g.end.column-1)===13?(l=!0,g.end.column===0?p--:c=E.substr(C[_],g.end.column-1)):c=E.substr(C[_],g.end.column),!0}),l&&(d[p++]=c,c=""),d[p++]=c,d}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(d){return this._lastVisitedLine.lineNumber===d?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=d,d===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(d):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(d,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(d).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(d){if(d.remainder===d.node.piece.length){const p=d.node.next();if(!p)return 0;const c=this._buffers[p.piece.bufferIndex],l=this.offsetInBuffer(p.piece.bufferIndex,p.piece.start);return c.buffer.charCodeAt(l)}else{const p=this._buffers[d.node.piece.bufferIndex],l=this.offsetInBuffer(d.node.piece.bufferIndex,d.node.piece.start)+d.remainder;return p.buffer.charCodeAt(l)}}getLineCharCode(d,p){const c=this.nodeAt2(d,p+1);return this._getCharCode(c)}getLineLength(d){if(d===this.getLineCount()){const p=this.getOffsetAt(d,1);return this.getLength()-p}return this.getOffsetAt(d+1,1)-this.getOffsetAt(d,1)-this._EOLLength}getCharCode(d){const p=this.nodeAt(d);return this._getCharCode(p)}findMatchesInNode(d,p,c,l,n,g,w,E,C,I,_){const A=this._buffers[d.piece.bufferIndex],k=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start),L=this.offsetInBuffer(d.piece.bufferIndex,n),R=this.offsetInBuffer(d.piece.bufferIndex,g);let M;const N={line:0,column:0};let P,x;p._wordSeparators?(P=A.buffer.substring(L,R),x=F=>F+L,p.reset(0)):(P=A.buffer,x=F=>F,p.reset(L));do if(M=p.next(P),M){if(x(M.index)>=R)return I;this.positionInBuffer(d,x(M.index)-k,N);const F=this.getLineFeedCnt(d.piece.bufferIndex,n,N),V=N.line===n.line?N.column-n.column+l:N.column+1,W=V+M[0].length;if(_[I++]=(0,T.createFindMatch)(new y.Range(c+F,V,c+F,W),M,E),x(M.index)+M[0].length>=R||I>=C)return I}while(M);return I}findMatchesLineByLine(d,p,c,l){const n=[];let g=0;const w=new T.Searcher(p.wordSeparators,p.regex);let E=this.nodeAt2(d.startLineNumber,d.startColumn);if(E===null)return[];const C=this.nodeAt2(d.endLineNumber,d.endColumn);if(C===null)return[];let I=this.positionInBuffer(E.node,E.remainder);const _=this.positionInBuffer(C.node,C.remainder);if(E.node===C.node)return this.findMatchesInNode(E.node,w,d.startLineNumber,d.startColumn,I,_,p,c,l,g,n),n;let A=d.startLineNumber,k=E.node;for(;k!==C.node;){const R=this.getLineFeedCnt(k.piece.bufferIndex,I,k.piece.end);if(R>=1){const N=this._buffers[k.piece.bufferIndex].lineStarts,P=this.offsetInBuffer(k.piece.bufferIndex,k.piece.start),x=N[I.line+R],F=A===d.startLineNumber?d.startColumn:1;if(g=this.findMatchesInNode(k,w,A,F,I,this.positionInBuffer(k,x-P),p,c,l,g,n),g>=l)return n;A+=R}const M=A===d.startLineNumber?d.startColumn-1:0;if(A===d.endLineNumber){const N=this.getLineContent(A).substring(M,d.endColumn-1);return g=this._findMatchesInLine(p,w,N,d.endLineNumber,M,g,n,c,l),n}if(g=this._findMatchesInLine(p,w,this.getLineContent(A).substr(M),A,M,g,n,c,l),g>=l)return n;A++,E=this.nodeAt2(A,1),k=E.node,I=this.positionInBuffer(E.node,E.remainder)}if(A===d.endLineNumber){const R=A===d.startLineNumber?d.startColumn-1:0,M=this.getLineContent(A).substring(R,d.endColumn-1);return g=this._findMatchesInLine(p,w,M,d.endLineNumber,R,g,n,c,l),n}const L=A===d.startLineNumber?d.startColumn:1;return g=this.findMatchesInNode(C.node,w,A,L,I,_,p,c,l,g,n),n}_findMatchesInLine(d,p,c,l,n,g,w,E,C){const I=d.wordSeparators;if(!E&&d.simpleSearch){const A=d.simpleSearch,k=A.length,L=c.length;let R=-k;for(;(R=c.indexOf(A,R+k))!==-1;)if((!I||(0,T.isValidMatch)(I,c,L,R,k))&&(w[g++]=new b.FindMatch(new y.Range(l,R+1+n,l,R+1+k+n),null),g>=C))return g;return g}let _;p.reset(0);do if(_=p.next(c),_&&(w[g++]=(0,T.createFindMatch)(new y.Range(l,_.index+1+n,l,_.index+1+_[0].length+n),_,E),g>=C))return g;while(_);return g}insert(d,p,c=!1){if(this._EOLNormalized=this._EOLNormalized&&c,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==D.SENTINEL){const{node:l,remainder:n,nodeStartOffset:g}=this.nodeAt(d),w=l.piece,E=w.bufferIndex,C=this.positionInBuffer(l,n);if(l.piece.bufferIndex===0&&w.end.line===this._lastChangeBufferPos.line&&w.end.column===this._lastChangeBufferPos.column&&g+w.length===d&&p.length<f){this.appendToNode(l,p),this.computeBufferMetadata();return}if(g===d)this.insertContentToNodeLeft(p,l),this._searchCache.validate(d);else if(g+l.piece.length>d){const I=[];let _=new a(w.bufferIndex,C,w.end,this.getLineFeedCnt(w.bufferIndex,C,w.end),this.offsetInBuffer(E,w.end)-this.offsetInBuffer(E,C));if(this.shouldCheckCRLF()&&this.endWithCR(p)&&this.nodeCharCodeAt(l,n)===10){const R={line:_.start.line+1,column:0};_=new a(_.bufferIndex,R,_.end,this.getLineFeedCnt(_.bufferIndex,R,_.end),_.length-1),p+=` `}if(this.shouldCheckCRLF()&&this.startWithLF(p))if(this.nodeCharCodeAt(l,n-1)===13){const R=this.positionInBuffer(l,n-1);this.deleteNodeTail(l,R),p="\r"+p,l.piece.length===0&&I.push(l)}else this.deleteNodeTail(l,C);else this.deleteNodeTail(l,C);const A=this.createNewPieces(p);_.length>0&&this.rbInsertRight(l,_);let k=l;for(let L=0;L<A.length;L++)k=this.rbInsertRight(k,A[L]);this.deleteNodes(I)}else this.insertContentToNodeRight(p,l)}else{const l=this.createNewPieces(p);let n=this.rbInsertLeft(null,l[0]);for(let g=1;g<l.length;g++)n=this.rbInsertRight(n,l[g])}this.computeBufferMetadata()}delete(d,p){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",p<=0||this.root===D.SENTINEL)return;const c=this.nodeAt(d),l=this.nodeAt(d+p),n=c.node,g=l.node;if(n===g){const A=this.positionInBuffer(n,c.remainder),k=this.positionInBuffer(n,l.remainder);if(c.nodeStartOffset===d){if(p===n.piece.length){const L=n.next();(0,D.rbDelete)(this,n),this.validateCRLFWithPrevNode(L),this.computeBufferMetadata();return}this.deleteNodeHead(n,k),this._searchCache.validate(d),this.validateCRLFWithPrevNode(n),this.computeBufferMetadata();return}if(c.nodeStartOffset+n.piece.length===d+p){this.deleteNodeTail(n,A),this.validateCRLFWithNextNode(n),this.computeBufferMetadata();return}this.shrinkNode(n,A,k),this.computeBufferMetadata();return}const w=[],E=this.positionInBuffer(n,c.remainder);this.deleteNodeTail(n,E),this._searchCache.validate(d),n.piece.length===0&&w.push(n);const C=this.positionInBuffer(g,l.remainder);this.deleteNodeHead(g,C),g.piece.length===0&&w.push(g);const I=n.next();for(let A=I;A!==D.SENTINEL&&A!==g;A=A.next())w.push(A);const _=n.piece.length===0?n.prev():n;this.deleteNodes(w),this.validateCRLFWithNextNode(_),this.computeBufferMetadata()}insertContentToNodeLeft(d,p){const c=[];if(this.shouldCheckCRLF()&&this.endWithCR(d)&&this.startWithLF(p)){const g=p.piece,w={line:g.start.line+1,column:0},E=new a(g.bufferIndex,w,g.end,this.getLineFeedCnt(g.bufferIndex,w,g.end),g.length-1);p.piece=E,d+=` `,(0,D.updateTreeMetadata)(this,p,-1,-1),p.piece.length===0&&c.push(p)}const l=this.createNewPieces(d);let n=this.rbInsertLeft(p,l[l.length-1]);for(let g=l.length-2;g>=0;g--)n=this.rbInsertLeft(n,l[g]);this.validateCRLFWithPrevNode(n),this.deleteNodes(c)}insertContentToNodeRight(d,p){this.adjustCarriageReturnFromNext(d,p)&&(d+=` `);const c=this.createNewPieces(d),l=this.rbInsertRight(p,c[0]);let n=l;for(let g=1;g<c.length;g++)n=this.rbInsertRight(n,c[g]);this.validateCRLFWithPrevNode(l)}positionInBuffer(d,p,c){const l=d.piece,n=d.piece.bufferIndex,g=this._buffers[n].lineStarts,E=g[l.start.line]+l.start.column+p;let C=l.start.line,I=l.end.line,_=0,A=0,k=0;for(;C<=I&&(_=C+(I-C)/2|0,k=g[_],_!==I);)if(A=g[_+1],E<k)I=_-1;else if(E>=A)C=_+1;else break;return c?(c.line=_,c.column=E-k,null):{line:_,column:E-k}}getLineFeedCnt(d,p,c){if(c.column===0)return c.line-p.line;const l=this._buffers[d].lineStarts;if(c.line===l.length-1)return c.line-p.line;const n=l[c.line+1],g=l[c.line]+c.column;if(n>g+1)return c.line-p.line;const w=g-1;return this._buffers[d].buffer.charCodeAt(w)===13?c.line-p.line+1:c.line-p.line}offsetInBuffer(d,p){return this._buffers[d].lineStarts[p.line]+p.column}deleteNodes(d){for(let p=0;p<d.length;p++)(0,D.rbDelete)(this,d[p])}createNewPieces(d){if(d.length>f){const I=[];for(;d.length>f;){const A=d.charCodeAt(f-1);let k;A===13||A>=55296&&A<=56319?(k=d.substring(0,f-1),d=d.substring(f-1)):(k=d.substring(0,f),d=d.substring(f));const L=S(k);I.push(new a(this._buffers.length,{line:0,column:0},{line:L.length-1,column:k.length-L[L.length-1]},L.length-1,k.length)),this._buffers.push(new r(k,L))}const _=S(d);return I.push(new a(this._buffers.length,{line:0,column:0},{line:_.length-1,column:d.length-_[_.length-1]},_.length-1,d.length)),this._buffers.push(new r(d,_)),I}let p=this._buffers[0].buffer.length;const c=S(d,!1);let l=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===p&&p!==0&&this.startWithLF(d)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},l=this._lastChangeBufferPos;for(let I=0;I<c.length;I++)c[I]+=p+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(c.slice(1)),this._buffers[0].buffer+="_"+d,p+=1}else{if(p!==0)for(let I=0;I<c.length;I++)c[I]+=p;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(c.slice(1)),this._buffers[0].buffer+=d}const n=this._buffers[0].buffer.length,g=this._buffers[0].lineStarts.length-1,w=n-this._buffers[0].lineStarts[g],E={line:g,column:w},C=new a(0,l,E,this.getLineFeedCnt(0,l,E),n-p);return this._lastChangeBufferPos=E,[C]}getLinesRawContent(){return this.getContentOfSubTree(this.root)}getLineRawContent(d,p=0){let c=this.root,l="";const n=this._searchCache.get2(d);if(n){c=n.node;const g=this.getAccumulatedValue(c,d-n.nodeStartLineNumber-1),w=this._buffers[c.piece.bufferIndex].buffer,E=this.offsetInBuffer(c.piece.bufferIndex,c.piece.start);if(n.nodeStartLineNumber+c.piece.lineFeedCnt===d)l=w.substring(E+g,E+c.piece.length);else{const C=this.getAccumulatedValue(c,d-n.nodeStartLineNumber);return w.substring(E+g,E+C-p)}}else{let g=0;const w=d;for(;c!==D.SENTINEL;)if(c.left!==D.SENTINEL&&c.lf_left>=d-1)c=c.left;else if(c.lf_left+c.piece.lineFeedCnt>d-1){const E=this.getAccumulatedValue(c,d-c.lf_left-2),C=this.getAccumulatedValue(c,d-c.lf_left-1),I=this._buffers[c.piece.bufferIndex].buffer,_=this.offsetInBuffer(c.piece.bufferIndex,c.piece.start);return g+=c.size_left,this._searchCache.set({node:c,nodeStartOffset:g,nodeStartLineNumber:w-(d-1-c.lf_left)}),I.substring(_+E,_+C-p)}else if(c.lf_left+c.piece.lineFeedCnt===d-1){const E=this.getAccumulatedValue(c,d-c.lf_left-2),C=this._buffers[c.piece.bufferIndex].buffer,I=this.offsetInBuffer(c.piece.bufferIndex,c.piece.start);l=C.substring(I+E,I+c.piece.length);break}else d-=c.lf_left+c.piece.lineFeedCnt,g+=c.size_left+c.piece.length,c=c.right}for(c=c.next();c!==D.SENTINEL;){const g=this._buffers[c.piece.bufferIndex].buffer;if(c.piece.lineFeedCnt>0){const w=this.getAccumulatedValue(c,0),E=this.offsetInBuffer(c.piece.bufferIndex,c.piece.start);return l+=g.substring(E,E+w-p),l}else{const w=this.offsetInBuffer(c.piece.bufferIndex,c.piece.start);l+=g.substr(w,c.piece.length)}c=c.next()}return l}computeBufferMetadata(){let d=this.root,p=1,c=0;for(;d!==D.SENTINEL;)p+=d.lf_left+d.piece.lineFeedCnt,c+=d.size_left+d.piece.length,d=d.right;this._lineCnt=p,this._length=c,this._searchCache.validate(this._length)}getIndexOf(d,p){const c=d.piece,l=this.positionInBuffer(d,p),n=l.line-c.start.line;if(this.offsetInBuffer(c.bufferIndex,c.end)-this.offsetInBuffer(c.bufferIndex,c.start)===p){const g=this.getLineFeedCnt(d.piece.bufferIndex,c.start,l);if(g!==n)return{index:g,remainder:0}}return{index:n,remainder:l.column}}getAccumulatedValue(d,p){if(p<0)return 0;const c=d.piece,l=this._buffers[c.bufferIndex].lineStarts,n=c.start.line+p+1;return n>c.end.line?l[c.end.line]+c.end.column-l[c.start.line]-c.start.column:l[n]-l[c.start.line]-c.start.column}deleteNodeTail(d,p){const c=d.piece,l=c.lineFeedCnt,n=this.offsetInBuffer(c.bufferIndex,c.end),g=p,w=this.offsetInBuffer(c.bufferIndex,g),E=this.getLineFeedCnt(c.bufferIndex,c.start,g),C=E-l,I=w-n,_=c.length+I;d.piece=new a(c.bufferIndex,c.start,g,E,_),(0,D.updateTreeMetadata)(this,d,I,C)}deleteNodeHead(d,p){const c=d.piece,l=c.lineFeedCnt,n=this.offsetInBuffer(c.bufferIndex,c.start),g=p,w=this.getLineFeedCnt(c.bufferIndex,g,c.end),E=this.offsetInBuffer(c.bufferIndex,g),C=w-l,I=n-E,_=c.length+I;d.piece=new a(c.bufferIndex,g,c.end,w,_),(0,D.updateTreeMetadata)(this,d,I,C)}shrinkNode(d,p,c){const l=d.piece,n=l.start,g=l.end,w=l.length,E=l.lineFeedCnt,C=p,I=this.getLineFeedCnt(l.bufferIndex,l.start,C),_=this.offsetInBuffer(l.bufferIndex,p)-this.offsetInBuffer(l.bufferIndex,n);d.piece=new a(l.bufferIndex,l.start,C,I,_),(0,D.updateTreeMetadata)(this,d,_-w,I-E);const A=new a(l.bufferIndex,c,g,this.getLineFeedCnt(l.bufferIndex,c,g),this.offsetInBuffer(l.bufferIndex,g)-this.offsetInBuffer(l.bufferIndex,c)),k=this.rbInsertRight(d,A);this.validateCRLFWithPrevNode(k)}appendToNode(d,p){this.adjustCarriageReturnFromNext(p,d)&&(p+=` `);const c=this.shouldCheckCRLF()&&this.startWithLF(p)&&this.endWithCR(d),l=this._buffers[0].buffer.length;this._buffers[0].buffer+=p;const n=S(p,!1);for(let k=0;k<n.length;k++)n[k]+=l;if(c){const k=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:l-k}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(n.slice(1));const g=this._buffers[0].lineStarts.length-1,w=this._buffers[0].buffer.length-this._buffers[0].lineStarts[g],E={line:g,column:w},C=d.piece.length+p.length,I=d.piece.lineFeedCnt,_=this.getLineFeedCnt(0,d.piece.start,E),A=_-I;d.piece=new a(d.piece.bufferIndex,d.piece.start,E,_,C),this._lastChangeBufferPos=E,(0,D.updateTreeMetadata)(this,d,p.length,A)}nodeAt(d){let p=this.root;const c=this._searchCache.get(d);if(c)return{node:c.node,nodeStartOffset:c.nodeStartOffset,remainder:d-c.nodeStartOffset};let l=0;for(;p!==D.SENTINEL;)if(p.size_left>d)p=p.left;else if(p.size_left+p.piece.length>=d){l+=p.size_left;const n={node:p,remainder:d-p.size_left,nodeStartOffset:l};return this._searchCache.set(n),n}else d-=p.size_left+p.piece.length,l+=p.size_left+p.piece.length,p=p.right;return null}nodeAt2(d,p){let c=this.root,l=0;for(;c!==D.SENTINEL;)if(c.left!==D.SENTINEL&&c.lf_left>=d-1)c=c.left;else if(c.lf_left+c.piece.lineFeedCnt>d-1){const n=this.getAccumulatedValue(c,d-c.lf_left-2),g=this.getAccumulatedValue(c,d-c.lf_left-1);return l+=c.size_left,{node:c,remainder:Math.min(n+p-1,g),nodeStartOffset:l}}else if(c.lf_left+c.piece.lineFeedCnt===d-1){const n=this.getAccumulatedValue(c,d-c.lf_left-2);if(n+p-1<=c.piece.length)return{node:c,remainder:n+p-1,nodeStartOffset:l};p-=c.piece.length-n;break}else d-=c.lf_left+c.piece.lineFeedCnt,l+=c.size_left+c.piece.length,c=c.right;for(c=c.next();c!==D.SENTINEL;){if(c.piece.lineFeedCnt>0){const n=this.getAccumulatedValue(c,0),g=this.offsetOfNode(c);return{node:c,remainder:Math.min(p-1,n),nodeStartOffset:g}}else if(c.piece.length>=p-1){const n=this.offsetOfNode(c);return{node:c,remainder:p-1,nodeStartOffset:n}}else p-=c.piece.length;c=c.next()}return null}nodeCharCodeAt(d,p){if(d.piece.lineFeedCnt<1)return-1;const c=this._buffers[d.piece.bufferIndex],l=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start)+p;return c.buffer.charCodeAt(l)}offsetOfNode(d){if(!d)return 0;let p=d.size_left;for(;d!==this.root;)d.parent.right===d&&(p+=d.parent.size_left+d.parent.piece.length),d=d.parent;return p}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` `)}startWithLF(d){if(typeof d=="string")return d.charCodeAt(0)===10;if(d===D.SENTINEL||d.piece.lineFeedCnt===0)return!1;const p=d.piece,c=this._buffers[p.bufferIndex].lineStarts,l=p.start.line,n=c[l]+p.start.column;return l===c.length-1||c[l+1]>n+1?!1:this._buffers[p.bufferIndex].buffer.charCodeAt(n)===10}endWithCR(d){return typeof d=="string"?d.charCodeAt(d.length-1)===13:d===D.SENTINEL||d.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(d,d.piece.length-1)===13}validateCRLFWithPrevNode(d){if(this.shouldCheckCRLF()&&this.startWithLF(d)){const p=d.prev();this.endWithCR(p)&&this.fixCRLF(p,d)}}validateCRLFWithNextNode(d){if(this.shouldCheckCRLF()&&this.endWithCR(d)){const p=d.next();this.startWithLF(p)&&this.fixCRLF(d,p)}}fixCRLF(d,p){const c=[],l=this._buffers[d.piece.bufferIndex].lineStarts;let n;d.piece.end.column===0?n={line:d.piece.end.line-1,column:l[d.piece.end.line]-l[d.piece.end.line-1]-1}:n={line:d.piece.end.line,column:d.piece.end.column-1};const g=d.piece.length-1,w=d.piece.lineFeedCnt-1;d.piece=new a(d.piece.bufferIndex,d.piece.start,n,w,g),(0,D.updateTreeMetadata)(this,d,-1,-1),d.piece.length===0&&c.push(d);const E={line:p.piece.start.line+1,column:0},C=p.piece.length-1,I=this.getLineFeedCnt(p.piece.bufferIndex,E,p.piece.end);p.piece=new a(p.piece.bufferIndex,E,p.piece.end,I,C),(0,D.updateTreeMetadata)(this,p,-1,-1),p.piece.length===0&&c.push(p);const _=this.createNewPieces(`\r `);this.rbInsertRight(d,_[0]);for(let A=0;A<c.length;A++)(0,D.rbDelete)(this,c[A])}adjustCarriageReturnFromNext(d,p){if(this.shouldCheckCRLF()&&this.endWithCR(d)){const c=p.next();if(this.startWithLF(c)){if(d+=` `,c.piece.length===1)(0,D.rbDelete)(this,c);else{const l=c.piece,n={line:l.start.line+1,column:0},g=l.length-1,w=this.getLineFeedCnt(l.bufferIndex,n,l.end);c.piece=new a(l.bufferIndex,n,l.end,w,g),(0,D.updateTreeMetadata)(this,c,-1,-1)}return!0}}return!1}iterate(d,p){if(d===D.SENTINEL)return p(D.SENTINEL);const c=this.iterate(d.left,p);return c&&p(d)&&this.iterate(d.right,p)}getNodeContent(d){if(d===D.SENTINEL)return"";const p=this._buffers[d.piece.bufferIndex],c=d.piece,l=this.offsetInBuffer(c.bufferIndex,c.start),n=this.offsetInBuffer(c.bufferIndex,c.end);return p.buffer.substring(l,n)}getPieceContent(d){const p=this._buffers[d.bufferIndex],c=this.offsetInBuffer(d.bufferIndex,d.start),l=this.offsetInBuffer(d.bufferIndex,d.end);return p.buffer.substring(c,l)}rbInsertRight(d,p){const c=new D.TreeNode(p,1);if(c.left=D.SENTINEL,c.right=D.SENTINEL,c.parent=D.SENTINEL,c.size_left=0,c.lf_left=0,this.root===D.SENTINEL)this.root=c,c.color=0;else if(d.right===D.SENTINEL)d.right=c,c.parent=d;else{const n=(0,D.leftest)(d.right);n.left=c,c.parent=n}return(0,D.fixInsert)(this,c),c}rbInsertLeft(d,p){const c=new D.TreeNode(p,1);if(c.left=D.SENTINEL,c.right=D.SENTINEL,c.parent=D.SENTINEL,c.size_left=0,c.lf_left=0,this.root===D.SENTINEL)this.root=c,c.color=0;else if(d.left===D.SENTINEL)d.left=c,c.parent=d;else{const l=(0,D.righttest)(d.left);l.right=c,c.parent=l}return(0,D.fixInsert)(this,c),c}getContentOfSubTree(d){let p="";return this.iterate(d,c=>(p+=this.getNodeContent(c),!0)),p}}e.PieceTreeBase=o}),define(Q[801],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeIndentLevel=void 0;function t(y,b){let D=0,T=0;const f=y.length;for(;T<f;){const v=y.charCodeAt(T);if(v===32)D++;else if(v===9)D=D-D%b+b;else break;T++}return T===f?-1:D}e.computeIndentLevel=t}),define(Q[1080],Y([1,0,214,51,137]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputPosition=e.InjectedText=e.ModelLineProjectionData=void 0;class D{constructor(h,a,r,i,s){this.injectionOffsets=h,this.injectionOptions=a,this.breakOffsets=r,this.breakOffsetsVisibleColumn=i,this.wrappedTextIndentLength=s}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(h){return h>0?this.wrappedTextIndentLength:0}getLineLength(h){const a=h>0?this.breakOffsets[h-1]:0;let i=this.breakOffsets[h]-a;return h>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(h){return this.getLineLength(h)}translateToInputOffset(h,a){h>0&&(a=Math.max(0,a-this.wrappedTextIndentLength));let i=h===0?a:this.breakOffsets[h-1]+a;if(this.injectionOffsets!==null)for(let s=0;s<this.injectionOffsets.length&&i>this.injectionOffsets[s];s++)i<this.injectionOffsets[s]+this.injectionOptions[s].content.length?i=this.injectionOffsets[s]:i-=this.injectionOptions[s].content.length;return i}translateToOutputPosition(h,a=2){let r=h;if(this.injectionOffsets!==null)for(let i=0;i<this.injectionOffsets.length&&!(h<this.injectionOffsets[i]||a!==1&&h===this.injectionOffsets[i]);i++)r+=this.injectionOptions[i].content.length;return this.offsetInInputWithInjectionsToOutputPosition(r,a)}offsetInInputWithInjectionsToOutputPosition(h,a=2){let r=0,i=this.breakOffsets.length-1,s=0,o=0;for(;r<=i;){s=r+(i-r)/2|0;const d=this.breakOffsets[s];if(o=s>0?this.breakOffsets[s-1]:0,a===0)if(h<=o)i=s-1;else if(h>d)r=s+1;else break;else if(h<o)i=s-1;else if(h>=d)r=s+1;else break}let u=h-o;return s>0&&(u+=this.wrappedTextIndentLength),new m(s,u)}normalizeOutputPosition(h,a,r){if(this.injectionOffsets!==null){const i=this.outputPositionToOffsetInInputWithInjections(h,a),s=this.normalizeOffsetInInputWithInjectionsAroundInjections(i,r);if(s!==i)return this.offsetInInputWithInjectionsToOutputPosition(s,r)}if(r===0){if(h>0&&a===this.getMinOutputOffset(h))return new m(h-1,this.getMaxOutputOffset(h-1))}else if(r===1){const i=this.getOutputLineCount()-1;if(h<i&&a===this.getMaxOutputOffset(h))return new m(h+1,this.getMinOutputOffset(h+1))}return new m(h,a)}outputPositionToOffsetInInputWithInjections(h,a){return h>0&&(a=Math.max(0,a-this.wrappedTextIndentLength)),(h>0?this.breakOffsets[h-1]:0)+a}normalizeOffsetInInputWithInjectionsAroundInjections(h,a){const r=this.getInjectedTextAtOffset(h);if(!r)return h;if(a===2){if(h===r.offsetInInputWithInjections+r.length&&T(this.injectionOptions[r.injectedTextIndex].cursorStops))return r.offsetInInputWithInjections+r.length;{let i=r.offsetInInputWithInjections;if(f(this.injectionOptions[r.injectedTextIndex].cursorStops))return i;let s=r.injectedTextIndex-1;for(;s>=0&&this.injectionOffsets[s]===this.injectionOffsets[r.injectedTextIndex]&&!(T(this.injectionOptions[s].cursorStops)||(i-=this.injectionOptions[s].content.length,f(this.injectionOptions[s].cursorStops)));)s--;return i}}else if(a===1||a===4){let i=r.offsetInInputWithInjections+r.length,s=r.injectedTextIndex;for(;s+1<this.injectionOffsets.length&&this.injectionOffsets[s+1]===this.injectionOffsets[s];)i+=this.injectionOptions[s+1].content.length,s++;return i}else if(a===0||a===3){let i=r.offsetInInputWithInjections,s=r.injectedTextIndex;for(;s-1>=0&&this.injectionOffsets[s-1]===this.injectionOffsets[s];)i-=this.injectionOptions[s-1].content.length,s--;return i}(0,t.assertNever)(a)}getInjectedText(h,a){const r=this.outputPositionToOffsetInInputWithInjections(h,a),i=this.getInjectedTextAtOffset(r);return i?{options:this.injectionOptions[i.injectedTextIndex]}:null}getInjectedTextAtOffset(h){const a=this.injectionOffsets,r=this.injectionOptions;if(a!==null){let i=0;for(let s=0;s<a.length;s++){const o=r[s].content.length,u=a[s]+i,d=a[s]+i+o;if(u>h)break;if(h<=d)return{injectedTextIndex:s,offsetInInputWithInjections:u,length:o};i+=o}}}}e.ModelLineProjectionData=D;function T(S){return S==null?!0:S===b.InjectedTextCursorStops.Right||S===b.InjectedTextCursorStops.Both}function f(S){return S==null?!0:S===b.InjectedTextCursorStops.Left||S===b.InjectedTextCursorStops.Both}class v{constructor(h){this.options=h}}e.InjectedText=v;class m{constructor(h,a){this.outputLineIndex=h,this.outputOffset=a}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(h){return new y.Position(h+this.outputLineIndex,this.outputOffset+1)}}e.OutputPosition=m}),define(Q[565],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DraggedTreeItemsIdentifier=e.TreeViewsDnDService=void 0;class t{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(D){if(D&&this._dragOperations.has(D)){const T=this._dragOperations.get(D);return this._dragOperations.delete(D),T}}addDragOperationTransfer(D,T){this._dragOperations.set(D,T)}}e.TreeViewsDnDService=t;class y{constructor(D){this.identifier=D}}e.DraggedTreeItemsIdentifier=y}),define(Q[1081],Y([1,0,27,440,33,214,367]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnicodeHighlighterReasonKind=e.UnicodeTextModelHighlighter=void 0;class f{static computeUnicodeHighlights(i,s,o){const u=o?o.startLineNumber:1,d=o?o.endLineNumber:i.getLineCount(),p=new S(s),c=p.getCandidateCodePoints();let l;c==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${v(Array.from(c))}`,"g");const n=new y.Searcher(null,l),g=[];let w=!1,E,C=0,I=0,_=0;e:for(let A=u,k=d;A<=k;A++){const L=i.getLineContent(A),R=L.length;n.reset(0);do if(E=n.next(L),E){let M=E.index,N=E.index+E[0].length;if(M>0){const V=L.charCodeAt(M-1);b.isHighSurrogate(V)&&M--}if(N+1<R){const V=L.charCodeAt(N-1);b.isHighSurrogate(V)&&N++}const P=L.substring(M,N);let x=(0,T.getWordAtText)(M+1,T.DEFAULT_WORD_REGEXP,L,0);x&&x.endColumn<=M+1&&(x=null);const F=p.shouldHighlightNonBasicASCII(P,x?x.word:null);if(F!==0){F===3?C++:F===2?I++:F===1?_++:(0,D.assertNever)(F);const V=1e3;if(g.length>=V){w=!0;break e}g.push(new t.Range(A,M+1,A,N+1))}}while(E)}return{ranges:g,hasMore:w,ambiguousCharacterCount:C,invisibleCharacterCount:I,nonBasicAsciiCharacterCount:_}}static computeUnicodeHighlightReason(i,s){const o=new S(s);switch(o.shouldHighlightNonBasicASCII(i,null)){case 0:return null;case 2:return{kind:1};case 3:{const d=i.codePointAt(0),p=o.ambiguousCharacters.getPrimaryConfusable(d),c=b.AmbiguousCharacters.getLocales().filter(l=>!b.AmbiguousCharacters.getInstance(new Set([...s.allowedLocales,l])).isAmbiguous(d));return{kind:0,confusableWith:String.fromCodePoint(p),notAmbiguousInLocales:c}}case 1:return{kind:2}}}}e.UnicodeTextModelHighlighter=f;function v(r,i){return`[${b.escapeRegExpCharacters(r.map(o=>String.fromCodePoint(o)).join(""))}]`}var m;(function(r){r[r.Ambiguous=0]="Ambiguous",r[r.Invisible=1]="Invisible",r[r.NonBasicAscii=2]="NonBasicAscii"})(m||(e.UnicodeHighlighterReasonKind=m={}));class S{constructor(i){this.options=i,this.allowedCodePoints=new Set(i.allowedCodePoints),this.ambiguousCharacters=b.AmbiguousCharacters.getInstance(new Set(i.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const i=new Set;if(this.options.invisibleCharacters)for(const s of b.InvisibleCharacters.codePoints)h(String.fromCodePoint(s))||i.add(s);if(this.options.ambiguousCharacters)for(const s of this.ambiguousCharacters.getConfusableCodePoints())i.add(s);for(const s of this.allowedCodePoints)i.delete(s);return i}shouldHighlightNonBasicASCII(i,s){const o=i.codePointAt(0);if(this.allowedCodePoints.has(o))return 0;if(this.options.nonBasicASCII)return 1;let u=!1,d=!1;if(s)for(const p of s){const c=p.codePointAt(0),l=b.isBasicASCII(p);u=u||l,!l&&!this.ambiguousCharacters.isAmbiguous(c)&&!b.InvisibleCharacters.isInvisibleCharacter(c)&&(d=!0)}return!u&&d?0:this.options.invisibleCharacters&&!h(i)&&b.InvisibleCharacters.isInvisibleCharacter(o)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(o)?3:0}}function h(r){return r===" "||r===` `||r===" "}var a;(function(r){r[r.None=0]="None",r[r.NonBasicASCII=1]="NonBasicASCII",r[r.Invisible=2]="Invisible",r[r.Ambiguous=3]="Ambiguous"})(a||(a={}))}),define(Q[1884],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WrappingIndent=e.TrackedRangeStickiness=e.TextEditorCursorStyle=e.TextEditorCursorBlinkingStyle=e.SymbolTag=e.SymbolKind=e.SignatureHelpTriggerKind=e.SelectionDirection=e.ScrollbarVisibility=e.ScrollType=e.RenderMinimap=e.RenderLineNumbersType=e.PositionAffinity=e.OverviewRulerLane=e.OverlayWidgetPositionPreference=e.MouseTargetType=e.MinimapPosition=e.MarkerTag=e.MarkerSeverity=e.KeyCode=e.InlineCompletionTriggerKind=e.InlayHintKind=e.InjectedTextCursorStops=e.IndentAction=e.GlyphMarginLane=e.EndOfLineSequence=e.EndOfLinePreference=e.EditorOption=e.EditorAutoIndentStrategy=e.DocumentHighlightKind=e.DefaultEndOfLine=e.CursorChangeReason=e.ContentWidgetPositionPreference=e.CompletionTriggerKind=e.CompletionItemTag=e.CompletionItemKind=e.CompletionItemInsertTextRule=e.CodeActionTriggerType=e.AccessibilitySupport=void 0;var t;(function(B){B[B.Unknown=0]="Unknown",B[B.Disabled=1]="Disabled",B[B.Enabled=2]="Enabled"})(t||(e.AccessibilitySupport=t={}));var y;(function(B){B[B.Invoke=1]="Invoke",B[B.Auto=2]="Auto"})(y||(e.CodeActionTriggerType=y={}));var b;(function(B){B[B.None=0]="None",B[B.KeepWhitespace=1]="KeepWhitespace",B[B.InsertAsSnippet=4]="InsertAsSnippet"})(b||(e.CompletionItemInsertTextRule=b={}));var D;(function(B){B[B.Method=0]="Method",B[B.Function=1]="Function",B[B.Constructor=2]="Constructor",B[B.Field=3]="Field",B[B.Variable=4]="Variable",B[B.Class=5]="Class",B[B.Struct=6]="Struct",B[B.Interface=7]="Interface",B[B.Module=8]="Module",B[B.Property=9]="Property",B[B.Event=10]="Event",B[B.Operator=11]="Operator",B[B.Unit=12]="Unit",B[B.Value=13]="Value",B[B.Constant=14]="Constant",B[B.Enum=15]="Enum",B[B.EnumMember=16]="EnumMember",B[B.Keyword=17]="Keyword",B[B.Text=18]="Text",B[B.Color=19]="Color",B[B.File=20]="File",B[B.Reference=21]="Reference",B[B.Customcolor=22]="Customcolor",B[B.Folder=23]="Folder",B[B.TypeParameter=24]="TypeParameter",B[B.User=25]="User",B[B.Issue=26]="Issue",B[B.Snippet=27]="Snippet"})(D||(e.CompletionItemKind=D={}));var T;(function(B){B[B.Deprecated=1]="Deprecated"})(T||(e.CompletionItemTag=T={}));var f;(function(B){B[B.Invoke=0]="Invoke",B[B.TriggerCharacter=1]="TriggerCharacter",B[B.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(f||(e.CompletionTriggerKind=f={}));var v;(function(B){B[B.EXACT=0]="EXACT",B[B.ABOVE=1]="ABOVE",B[B.BELOW=2]="BELOW"})(v||(e.ContentWidgetPositionPreference=v={}));var m;(function(B){B[B.NotSet=0]="NotSet",B[B.ContentFlush=1]="ContentFlush",B[B.RecoverFromMarkers=2]="RecoverFromMarkers",B[B.Explicit=3]="Explicit",B[B.Paste=4]="Paste",B[B.Undo=5]="Undo",B[B.Redo=6]="Redo"})(m||(e.CursorChangeReason=m={}));var S;(function(B){B[B.LF=1]="LF",B[B.CRLF=2]="CRLF"})(S||(e.DefaultEndOfLine=S={}));var h;(function(B){B[B.Text=0]="Text",B[B.Read=1]="Read",B[B.Write=2]="Write"})(h||(e.DocumentHighlightKind=h={}));var a;(function(B){B[B.None=0]="None",B[B.Keep=1]="Keep",B[B.Brackets=2]="Brackets",B[B.Advanced=3]="Advanced",B[B.Full=4]="Full"})(a||(e.EditorAutoIndentStrategy=a={}));var r;(function(B){B[B.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",B[B.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",B[B.accessibilitySupport=2]="accessibilitySupport",B[B.accessibilityPageSize=3]="accessibilityPageSize",B[B.ariaLabel=4]="ariaLabel",B[B.ariaRequired=5]="ariaRequired",B[B.autoClosingBrackets=6]="autoClosingBrackets",B[B.screenReaderAnnounceInlineSuggestion=7]="screenReaderAnnounceInlineSuggestion",B[B.autoClosingDelete=8]="autoClosingDelete",B[B.autoClosingOvertype=9]="autoClosingOvertype",B[B.autoClosingQuotes=10]="autoClosingQuotes",B[B.autoIndent=11]="autoIndent",B[B.automaticLayout=12]="automaticLayout",B[B.autoSurround=13]="autoSurround",B[B.bracketPairColorization=14]="bracketPairColorization",B[B.guides=15]="guides",B[B.codeLens=16]="codeLens",B[B.codeLensFontFamily=17]="codeLensFontFamily",B[B.codeLensFontSize=18]="codeLensFontSize",B[B.colorDecorators=19]="colorDecorators",B[B.colorDecoratorsLimit=20]="colorDecoratorsLimit",B[B.columnSelection=21]="columnSelection",B[B.comments=22]="comments",B[B.contextmenu=23]="contextmenu",B[B.copyWithSyntaxHighlighting=24]="copyWithSyntaxHighlighting",B[B.cursorBlinking=25]="cursorBlinking",B[B.cursorSmoothCaretAnimation=26]="cursorSmoothCaretAnimation",B[B.cursorStyle=27]="cursorStyle",B[B.cursorSurroundingLines=28]="cursorSurroundingLines",B[B.cursorSurroundingLinesStyle=29]="cursorSurroundingLinesStyle",B[B.cursorWidth=30]="cursorWidth",B[B.disableLayerHinting=31]="disableLayerHinting",B[B.disableMonospaceOptimizations=32]="disableMonospaceOptimizations",B[B.domReadOnly=33]="domReadOnly",B[B.dragAndDrop=34]="dragAndDrop",B[B.dropIntoEditor=35]="dropIntoEditor",B[B.emptySelectionClipboard=36]="emptySelectionClipboard",B[B.experimentalWhitespaceRendering=37]="experimentalWhitespaceRendering",B[B.extraEditorClassName=38]="extraEditorClassName",B[B.fastScrollSensitivity=39]="fastScrollSensitivity",B[B.find=40]="find",B[B.fixedOverflowWidgets=41]="fixedOverflowWidgets",B[B.folding=42]="folding",B[B.foldingStrategy=43]="foldingStrategy",B[B.foldingHighlight=44]="foldingHighlight",B[B.foldingImportsByDefault=45]="foldingImportsByDefault",B[B.foldingMaximumRegions=46]="foldingMaximumRegions",B[B.unfoldOnClickAfterEndOfLine=47]="unfoldOnClickAfterEndOfLine",B[B.fontFamily=48]="fontFamily",B[B.fontInfo=49]="fontInfo",B[B.fontLigatures=50]="fontLigatures",B[B.fontSize=51]="fontSize",B[B.fontWeight=52]="fontWeight",B[B.fontVariations=53]="fontVariations",B[B.formatOnPaste=54]="formatOnPaste",B[B.formatOnType=55]="formatOnType",B[B.glyphMargin=56]="glyphMargin",B[B.gotoLocation=57]="gotoLocation",B[B.hideCursorInOverviewRuler=58]="hideCursorInOverviewRuler",B[B.hover=59]="hover",B[B.inDiffEditor=60]="inDiffEditor",B[B.inlineSuggest=61]="inlineSuggest",B[B.letterSpacing=62]="letterSpacing",B[B.lightbulb=63]="lightbulb",B[B.lineDecorationsWidth=64]="lineDecorationsWidth",B[B.lineHeight=65]="lineHeight",B[B.lineNumbers=66]="lineNumbers",B[B.lineNumbersMinChars=67]="lineNumbersMinChars",B[B.linkedEditing=68]="linkedEditing",B[B.links=69]="links",B[B.matchBrackets=70]="matchBrackets",B[B.minimap=71]="minimap",B[B.mouseStyle=72]="mouseStyle",B[B.mouseWheelScrollSensitivity=73]="mouseWheelScrollSensitivity",B[B.mouseWheelZoom=74]="mouseWheelZoom",B[B.multiCursorMergeOverlapping=75]="multiCursorMergeOverlapping",B[B.multiCursorModifier=76]="multiCursorModifier",B[B.multiCursorPaste=77]="multiCursorPaste",B[B.multiCursorLimit=78]="multiCursorLimit",B[B.occurrencesHighlight=79]="occurrencesHighlight",B[B.overviewRulerBorder=80]="overviewRulerBorder",B[B.overviewRulerLanes=81]="overviewRulerLanes",B[B.padding=82]="padding",B[B.pasteAs=83]="pasteAs",B[B.parameterHints=84]="parameterHints",B[B.peekWidgetDefaultFocus=85]="peekWidgetDefaultFocus",B[B.definitionLinkOpensInPeek=86]="definitionLinkOpensInPeek",B[B.quickSuggestions=87]="quickSuggestions",B[B.quickSuggestionsDelay=88]="quickSuggestionsDelay",B[B.readOnly=89]="readOnly",B[B.readOnlyMessage=90]="readOnlyMessage",B[B.renameOnType=91]="renameOnType",B[B.renderControlCharacters=92]="renderControlCharacters",B[B.renderFinalNewline=93]="renderFinalNewline",B[B.renderLineHighlight=94]="renderLineHighlight",B[B.renderLineHighlightOnlyWhenFocus=95]="renderLineHighlightOnlyWhenFocus",B[B.renderValidationDecorations=96]="renderValidationDecorations",B[B.renderWhitespace=97]="renderWhitespace",B[B.revealHorizontalRightPadding=98]="revealHorizontalRightPadding",B[B.roundedSelection=99]="roundedSelection",B[B.rulers=100]="rulers",B[B.scrollbar=101]="scrollbar",B[B.scrollBeyondLastColumn=102]="scrollBeyondLastColumn",B[B.scrollBeyondLastLine=103]="scrollBeyondLastLine",B[B.scrollPredominantAxis=104]="scrollPredominantAxis",B[B.selectionClipboard=105]="selectionClipboard",B[B.selectionHighlight=106]="selectionHighlight",B[B.selectOnLineNumbers=107]="selectOnLineNumbers",B[B.showFoldingControls=108]="showFoldingControls",B[B.showUnused=109]="showUnused",B[B.snippetSuggestions=110]="snippetSuggestions",B[B.smartSelect=111]="smartSelect",B[B.smoothScrolling=112]="smoothScrolling",B[B.stickyScroll=113]="stickyScroll",B[B.stickyTabStops=114]="stickyTabStops",B[B.stopRenderingLineAfter=115]="stopRenderingLineAfter",B[B.suggest=116]="suggest",B[B.suggestFontSize=117]="suggestFontSize",B[B.suggestLineHeight=118]="suggestLineHeight",B[B.suggestOnTriggerCharacters=119]="suggestOnTriggerCharacters",B[B.suggestSelection=120]="suggestSelection",B[B.tabCompletion=121]="tabCompletion",B[B.tabIndex=122]="tabIndex",B[B.unicodeHighlighting=123]="unicodeHighlighting",B[B.unusualLineTerminators=124]="unusualLineTerminators",B[B.useShadowDOM=125]="useShadowDOM",B[B.useTabStops=126]="useTabStops",B[B.wordBreak=127]="wordBreak",B[B.wordSeparators=128]="wordSeparators",B[B.wordWrap=129]="wordWrap",B[B.wordWrapBreakAfterCharacters=130]="wordWrapBreakAfterCharacters",B[B.wordWrapBreakBeforeCharacters=131]="wordWrapBreakBeforeCharacters",B[B.wordWrapColumn=132]="wordWrapColumn",B[B.wordWrapOverride1=133]="wordWrapOverride1",B[B.wordWrapOverride2=134]="wordWrapOverride2",B[B.wrappingIndent=135]="wrappingIndent",B[B.wrappingStrategy=136]="wrappingStrategy",B[B.showDeprecated=137]="showDeprecated",B[B.inlayHints=138]="inlayHints",B[B.editorClassName=139]="editorClassName",B[B.pixelRatio=140]="pixelRatio",B[B.tabFocusMode=141]="tabFocusMode",B[B.layoutInfo=142]="layoutInfo",B[B.wrappingInfo=143]="wrappingInfo",B[B.defaultColorDecorators=144]="defaultColorDecorators",B[B.colorDecoratorsActivatedOn=145]="colorDecoratorsActivatedOn",B[B.inlineCompletionsAccessibilityVerbose=146]="inlineCompletionsAccessibilityVerbose"})(r||(e.EditorOption=r={}));var i;(function(B){B[B.TextDefined=0]="TextDefined",B[B.LF=1]="LF",B[B.CRLF=2]="CRLF"})(i||(e.EndOfLinePreference=i={}));var s;(function(B){B[B.LF=0]="LF",B[B.CRLF=1]="CRLF"})(s||(e.EndOfLineSequence=s={}));var o;(function(B){B[B.Left=1]="Left",B[B.Right=2]="Right"})(o||(e.GlyphMarginLane=o={}));var u;(function(B){B[B.None=0]="None",B[B.Indent=1]="Indent",B[B.IndentOutdent=2]="IndentOutdent",B[B.Outdent=3]="Outdent"})(u||(e.IndentAction=u={}));var d;(function(B){B[B.Both=0]="Both",B[B.Right=1]="Right",B[B.Left=2]="Left",B[B.None=3]="None"})(d||(e.InjectedTextCursorStops=d={}));var p;(function(B){B[B.Type=1]="Type",B[B.Parameter=2]="Parameter"})(p||(e.InlayHintKind=p={}));var c;(function(B){B[B.Automatic=0]="Automatic",B[B.Explicit=1]="Explicit"})(c||(e.InlineCompletionTriggerKind=c={}));var l;(function(B){B[B.DependsOnKbLayout=-1]="DependsOnKbLayout",B[B.Unknown=0]="Unknown",B[B.Backspace=1]="Backspace",B[B.Tab=2]="Tab",B[B.Enter=3]="Enter",B[B.Shift=4]="Shift",B[B.Ctrl=5]="Ctrl",B[B.Alt=6]="Alt",B[B.PauseBreak=7]="PauseBreak",B[B.CapsLock=8]="CapsLock",B[B.Escape=9]="Escape",B[B.Space=10]="Space",B[B.PageUp=11]="PageUp",B[B.PageDown=12]="PageDown",B[B.End=13]="End",B[B.Home=14]="Home",B[B.LeftArrow=15]="LeftArrow",B[B.UpArrow=16]="UpArrow",B[B.RightArrow=17]="RightArrow",B[B.DownArrow=18]="DownArrow",B[B.Insert=19]="Insert",B[B.Delete=20]="Delete",B[B.Digit0=21]="Digit0",B[B.Digit1=22]="Digit1",B[B.Digit2=23]="Digit2",B[B.Digit3=24]="Digit3",B[B.Digit4=25]="Digit4",B[B.Digit5=26]="Digit5",B[B.Digit6=27]="Digit6",B[B.Digit7=28]="Digit7",B[B.Digit8=29]="Digit8",B[B.Digit9=30]="Digit9",B[B.KeyA=31]="KeyA",B[B.KeyB=32]="KeyB",B[B.KeyC=33]="KeyC",B[B.KeyD=34]="KeyD",B[B.KeyE=35]="KeyE",B[B.KeyF=36]="KeyF",B[B.KeyG=37]="KeyG",B[B.KeyH=38]="KeyH",B[B.KeyI=39]="KeyI",B[B.KeyJ=40]="KeyJ",B[B.KeyK=41]="KeyK",B[B.KeyL=42]="KeyL",B[B.KeyM=43]="KeyM",B[B.KeyN=44]="KeyN",B[B.KeyO=45]="KeyO",B[B.KeyP=46]="KeyP",B[B.KeyQ=47]="KeyQ",B[B.KeyR=48]="KeyR",B[B.KeyS=49]="KeyS",B[B.KeyT=50]="KeyT",B[B.KeyU=51]="KeyU",B[B.KeyV=52]="KeyV",B[B.KeyW=53]="KeyW",B[B.KeyX=54]="KeyX",B[B.KeyY=55]="KeyY",B[B.KeyZ=56]="KeyZ",B[B.Meta=57]="Meta",B[B.ContextMenu=58]="ContextMenu",B[B.F1=59]="F1",B[B.F2=60]="F2",B[B.F3=61]="F3",B[B.F4=62]="F4",B[B.F5=63]="F5",B[B.F6=64]="F6",B[B.F7=65]="F7",B[B.F8=66]="F8",B[B.F9=67]="F9",B[B.F10=68]="F10",B[B.F11=69]="F11",B[B.F12=70]="F12",B[B.F13=71]="F13",B[B.F14=72]="F14",B[B.F15=73]="F15",B[B.F16=74]="F16",B[B.F17=75]="F17",B[B.F18=76]="F18",B[B.F19=77]="F19",B[B.F20=78]="F20",B[B.F21=79]="F21",B[B.F22=80]="F22",B[B.F23=81]="F23",B[B.F24=82]="F24",B[B.NumLock=83]="NumLock",B[B.ScrollLock=84]="ScrollLock",B[B.Semicolon=85]="Semicolon",B[B.Equal=86]="Equal",B[B.Comma=87]="Comma",B[B.Minus=88]="Minus",B[B.Period=89]="Period",B[B.Slash=90]="Slash",B[B.Backquote=91]="Backquote",B[B.BracketLeft=92]="BracketLeft",B[B.Backslash=93]="Backslash",B[B.BracketRight=94]="BracketRight",B[B.Quote=95]="Quote",B[B.OEM_8=96]="OEM_8",B[B.IntlBackslash=97]="IntlBackslash",B[B.Numpad0=98]="Numpad0",B[B.Numpad1=99]="Numpad1",B[B.Numpad2=100]="Numpad2",B[B.Numpad3=101]="Numpad3",B[B.Numpad4=102]="Numpad4",B[B.Numpad5=103]="Numpad5",B[B.Numpad6=104]="Numpad6",B[B.Numpad7=105]="Numpad7",B[B.Numpad8=106]="Numpad8",B[B.Numpad9=107]="Numpad9",B[B.NumpadMultiply=108]="NumpadMultiply",B[B.NumpadAdd=109]="NumpadAdd",B[B.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",B[B.NumpadSubtract=111]="NumpadSubtract",B[B.NumpadDecimal=112]="NumpadDecimal",B[B.NumpadDivide=113]="NumpadDivide",B[B.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",B[B.ABNT_C1=115]="ABNT_C1",B[B.ABNT_C2=116]="ABNT_C2",B[B.AudioVolumeMute=117]="AudioVolumeMute",B[B.AudioVolumeUp=118]="AudioVolumeUp",B[B.AudioVolumeDown=119]="AudioVolumeDown",B[B.BrowserSearch=120]="BrowserSearch",B[B.BrowserHome=121]="BrowserHome",B[B.BrowserBack=122]="BrowserBack",B[B.BrowserForward=123]="BrowserForward",B[B.MediaTrackNext=124]="MediaTrackNext",B[B.MediaTrackPrevious=125]="MediaTrackPrevious",B[B.MediaStop=126]="MediaStop",B[B.MediaPlayPause=127]="MediaPlayPause",B[B.LaunchMediaPlayer=128]="LaunchMediaPlayer",B[B.LaunchMail=129]="LaunchMail",B[B.LaunchApp2=130]="LaunchApp2",B[B.Clear=131]="Clear",B[B.MAX_VALUE=132]="MAX_VALUE"})(l||(e.KeyCode=l={}));var n;(function(B){B[B.Hint=1]="Hint",B[B.Info=2]="Info",B[B.Warning=4]="Warning",B[B.Error=8]="Error"})(n||(e.MarkerSeverity=n={}));var g;(function(B){B[B.Unnecessary=1]="Unnecessary",B[B.Deprecated=2]="Deprecated"})(g||(e.MarkerTag=g={}));var w;(function(B){B[B.Inline=1]="Inline",B[B.Gutter=2]="Gutter"})(w||(e.MinimapPosition=w={}));var E;(function(B){B[B.UNKNOWN=0]="UNKNOWN",B[B.TEXTAREA=1]="TEXTAREA",B[B.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",B[B.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",B[B.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",B[B.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",B[B.CONTENT_TEXT=6]="CONTENT_TEXT",B[B.CONTENT_EMPTY=7]="CONTENT_EMPTY",B[B.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",B[B.CONTENT_WIDGET=9]="CONTENT_WIDGET",B[B.OVERVIEW_RULER=10]="OVERVIEW_RULER",B[B.SCROLLBAR=11]="SCROLLBAR",B[B.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",B[B.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(E||(e.MouseTargetType=E={}));var C;(function(B){B[B.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",B[B.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",B[B.TOP_CENTER=2]="TOP_CENTER"})(C||(e.OverlayWidgetPositionPreference=C={}));var I;(function(B){B[B.Left=1]="Left",B[B.Center=2]="Center",B[B.Right=4]="Right",B[B.Full=7]="Full"})(I||(e.OverviewRulerLane=I={}));var _;(function(B){B[B.Left=0]="Left",B[B.Right=1]="Right",B[B.None=2]="None",B[B.LeftOfInjectedText=3]="LeftOfInjectedText",B[B.RightOfInjectedText=4]="RightOfInjectedText"})(_||(e.PositionAffinity=_={}));var A;(function(B){B[B.Off=0]="Off",B[B.On=1]="On",B[B.Relative=2]="Relative",B[B.Interval=3]="Interval",B[B.Custom=4]="Custom"})(A||(e.RenderLineNumbersType=A={}));var k;(function(B){B[B.None=0]="None",B[B.Text=1]="Text",B[B.Blocks=2]="Blocks"})(k||(e.RenderMinimap=k={}));var L;(function(B){B[B.Smooth=0]="Smooth",B[B.Immediate=1]="Immediate"})(L||(e.ScrollType=L={}));var R;(function(B){B[B.Auto=1]="Auto",B[B.Hidden=2]="Hidden",B[B.Visible=3]="Visible"})(R||(e.ScrollbarVisibility=R={}));var M;(function(B){B[B.LTR=0]="LTR",B[B.RTL=1]="RTL"})(M||(e.SelectionDirection=M={}));var N;(function(B){B[B.Invoke=1]="Invoke",B[B.TriggerCharacter=2]="TriggerCharacter",B[B.ContentChange=3]="ContentChange"})(N||(e.SignatureHelpTriggerKind=N={}));var P;(function(B){B[B.File=0]="File",B[B.Module=1]="Module",B[B.Namespace=2]="Namespace",B[B.Package=3]="Package",B[B.Class=4]="Class",B[B.Method=5]="Method",B[B.Property=6]="Property",B[B.Field=7]="Field",B[B.Constructor=8]="Constructor",B[B.Enum=9]="Enum",B[B.Interface=10]="Interface",B[B.Function=11]="Function",B[B.Variable=12]="Variable",B[B.Constant=13]="Constant",B[B.String=14]="String",B[B.Number=15]="Number",B[B.Boolean=16]="Boolean",B[B.Array=17]="Array",B[B.Object=18]="Object",B[B.Key=19]="Key",B[B.Null=20]="Null",B[B.EnumMember=21]="EnumMember",B[B.Struct=22]="Struct",B[B.Event=23]="Event",B[B.Operator=24]="Operator",B[B.TypeParameter=25]="TypeParameter"})(P||(e.SymbolKind=P={}));var x;(function(B){B[B.Deprecated=1]="Deprecated"})(x||(e.SymbolTag=x={}));var F;(function(B){B[B.Hidden=0]="Hidden",B[B.Blink=1]="Blink",B[B.Smooth=2]="Smooth",B[B.Phase=3]="Phase",B[B.Expand=4]="Expand",B[B.Solid=5]="Solid"})(F||(e.TextEditorCursorBlinkingStyle=F={}));var V;(function(B){B[B.Line=1]="Line",B[B.Block=2]="Block",B[B.Underline=3]="Underline",B[B.LineThin=4]="LineThin",B[B.BlockOutline=5]="BlockOutline",B[B.UnderlineThin=6]="UnderlineThin"})(V||(e.TextEditorCursorStyle=V={}));var W;(function(B){B[B.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",B[B.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",B[B.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",B[B.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(W||(e.TrackedRangeStickiness=W={}));var z;(function(B){B[B.None=0]="None",B[B.Same=1]="Same",B[B.Indent=2]="Indent",B[B.DeepIndent=3]="DeepIndent"})(z||(e.WrappingIndent=z={}))}),define(Q[1885],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairWithMinIndentationInfo=e.BracketPairInfo=e.BracketInfo=void 0;class t{constructor(T,f,v,m){this.range=T,this.nestingLevel=f,this.nestingLevelOfEqualBracketType=v,this.isInvalid=m}}e.BracketInfo=t;class y{constructor(T,f,v,m,S,h){this.range=T,this.openingBracketRange=f,this.closingBracketRange=v,this.nestingLevel=m,this.nestingLevelOfEqualBracketType=S,this.bracketPairNode=h}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}get closingBracketInfo(){return this.bracketPairNode.closingBracket?.bracketInfo}}e.BracketPairInfo=y;class b extends y{constructor(T,f,v,m,S,h,a){super(T,f,v,m,S,h),this.minVisibleColumnIndentation=a}}e.BracketPairWithMinIndentationInfo=b}),define(Q[1886],Y([1,0,6,4,1885,663,1077,302,1076,489,799,20,1075]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTree=void 0;class r extends y.Disposable{didLanguageChange(c){return this.brackets.didLanguageChange(c)}constructor(c,l){if(super(),this.textModel=c,this.getLanguageConfiguration=l,this.didChangeEmitter=new t.Emitter,this.denseKeyProvider=new m.DenseKeyProvider,this.brackets=new T.LanguageAgnosticBracketTokens(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],c.tokenization.hasTokens)c.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const n=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),g=new S.FastTokenizer(this.textModel.getValue(),n);this.initialAstWithoutTokens=(0,v.parseDocument)(g,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const c=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,c||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:c}){const l=c.map(n=>new D.TextEditInfo((0,f.toLength)(n.fromLineNumber-1,0),(0,f.toLength)(n.toLineNumber,0),(0,f.toLength)(n.toLineNumber-n.fromLineNumber+1,0)));this.handleEdits(l,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(c){const l=D.TextEditInfo.fromModelContentChanges(c.changes);this.handleEdits(l,!1)}handleEdits(c,l){const n=(0,a.combineTextEditInfos)(this.queuedTextEdits,c);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!l&&(this.queuedTextEditsForInitialAstWithoutTokens=(0,a.combineTextEditInfos)(this.queuedTextEditsForInitialAstWithoutTokens,c))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(c,l,n){const w=l,E=new S.TextBufferTokenizer(this.textModel,this.brackets);return(0,v.parseDocument)(E,c,w,n)}getBracketsInRange(c,l){this.flushQueue();const n=(0,f.toLength)(c.startLineNumber-1,c.startColumn-1),g=(0,f.toLength)(c.endLineNumber-1,c.endColumn-1);return new h.CallbackIterable(w=>{const E=this.initialAstWithoutTokens||this.astWithTokens;o(E,f.lengthZero,E.length,n,g,w,0,0,new Map,l)})}getBracketPairsInRange(c,l){this.flushQueue();const n=(0,f.positionToLength)(c.getStartPosition()),g=(0,f.positionToLength)(c.getEndPosition());return new h.CallbackIterable(w=>{const E=this.initialAstWithoutTokens||this.astWithTokens,C=new u(w,l,this.textModel);d(E,f.lengthZero,E.length,n,g,C,0,new Map)})}getFirstBracketAfter(c){this.flushQueue();const l=this.initialAstWithoutTokens||this.astWithTokens;return s(l,f.lengthZero,l.length,(0,f.positionToLength)(c))}getFirstBracketBefore(c){this.flushQueue();const l=this.initialAstWithoutTokens||this.astWithTokens;return i(l,f.lengthZero,l.length,(0,f.positionToLength)(c))}}e.BracketPairsTree=r;function i(p,c,l,n){if(p.kind===4||p.kind===2){const g=[];for(const w of p.children)l=(0,f.lengthAdd)(c,w.length),g.push({nodeOffsetStart:c,nodeOffsetEnd:l}),c=l;for(let w=g.length-1;w>=0;w--){const{nodeOffsetStart:E,nodeOffsetEnd:C}=g[w];if((0,f.lengthLessThan)(E,n)){const I=i(p.children[w],E,C,n);if(I)return I}}return null}else{if(p.kind===3)return null;if(p.kind===1){const g=(0,f.lengthsToRange)(c,l);return{bracketInfo:p.bracketInfo,range:g}}}return null}function s(p,c,l,n){if(p.kind===4||p.kind===2){for(const g of p.children){if(l=(0,f.lengthAdd)(c,g.length),(0,f.lengthLessThan)(n,l)){const w=s(g,c,l,n);if(w)return w}c=l}return null}else{if(p.kind===3)return null;if(p.kind===1){const g=(0,f.lengthsToRange)(c,l);return{bracketInfo:p.bracketInfo,range:g}}}return null}function o(p,c,l,n,g,w,E,C,I,_,A=!1){if(E>200)return!0;e:for(;;)switch(p.kind){case 4:{const k=p.childrenLength;for(let L=0;L<k;L++){const R=p.getChild(L);if(R){if(l=(0,f.lengthAdd)(c,R.length),(0,f.lengthLessThanEqual)(c,g)&&(0,f.lengthGreaterThanEqual)(l,n)){if((0,f.lengthGreaterThanEqual)(l,g)){p=R;continue e}if(!o(R,c,l,n,g,w,E,0,I,_))return!1}c=l}}return!0}case 2:{const k=!_||!p.closingBracket||p.closingBracket.bracketInfo.closesColorized(p.openingBracket.bracketInfo);let L=0;if(I){let M=I.get(p.openingBracket.text);M===void 0&&(M=0),L=M,k&&(M++,I.set(p.openingBracket.text,M))}const R=p.childrenLength;for(let M=0;M<R;M++){const N=p.getChild(M);if(N){if(l=(0,f.lengthAdd)(c,N.length),(0,f.lengthLessThanEqual)(c,g)&&(0,f.lengthGreaterThanEqual)(l,n)){if((0,f.lengthGreaterThanEqual)(l,g)&&N.kind!==1){p=N,k?(E++,C=L+1):C=L;continue e}if((k||N.kind!==1||!p.closingBracket)&&!o(N,c,l,n,g,w,k?E+1:E,k?L+1:L,I,_,!p.closingBracket))return!1}c=l}}return I?.set(p.openingBracket.text,L),!0}case 3:{const k=(0,f.lengthsToRange)(c,l);return w(new b.BracketInfo(k,E-1,0,!0))}case 1:{const k=(0,f.lengthsToRange)(c,l);return w(new b.BracketInfo(k,E-1,C-1,A))}case 0:return!0}}class u{constructor(c,l,n){this.push=c,this.includeMinIndentation=l,this.textModel=n}}function d(p,c,l,n,g,w,E,C){if(E>200)return!0;let I=!0;if(p.kind===2){let _=0;if(C){let L=C.get(p.openingBracket.text);L===void 0&&(L=0),_=L,L++,C.set(p.openingBracket.text,L)}const A=(0,f.lengthAdd)(c,p.openingBracket.length);let k=-1;if(w.includeMinIndentation&&(k=p.computeMinIndentation(c,w.textModel)),I=w.push(new b.BracketPairWithMinIndentationInfo((0,f.lengthsToRange)(c,l),(0,f.lengthsToRange)(c,A),p.closingBracket?(0,f.lengthsToRange)((0,f.lengthAdd)(A,p.child?.length||f.lengthZero),l):void 0,E,_,p,k)),c=A,I&&p.child){const L=p.child;if(l=(0,f.lengthAdd)(c,L.length),(0,f.lengthLessThanEqual)(c,g)&&(0,f.lengthGreaterThanEqual)(l,n)&&(I=d(L,c,l,n,g,w,E+1,C),!I))return!1}C?.set(p.openingBracket.text,_)}else{let _=c;for(const A of p.children){const k=_;if(_=(0,f.lengthAdd)(_,A.length),(0,f.lengthLessThanEqual)(k,g)&&(0,f.lengthLessThanEqual)(n,_)&&(I=d(A,k,_,n,g,w,E,C),!I))return!1}}return I}}),define(Q[441],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalModelContentChangeEvent=e.ModelInjectedTextChangedEvent=e.ModelRawContentChangedEvent=e.ModelRawEOLChanged=e.ModelRawLinesInserted=e.ModelRawLinesDeleted=e.ModelRawLineChanged=e.LineInjectedText=e.ModelRawFlush=e.RawContentChangedType=void 0;var t;(function(a){a[a.Flush=1]="Flush",a[a.LineChanged=2]="LineChanged",a[a.LinesDeleted=3]="LinesDeleted",a[a.LinesInserted=4]="LinesInserted",a[a.EOLChanged=5]="EOLChanged"})(t||(e.RawContentChangedType=t={}));class y{constructor(){this.changeType=1}}e.ModelRawFlush=y;class b{static applyInjectedText(r,i){if(!i||i.length===0)return r;let s="",o=0;for(const u of i)s+=r.substring(o,u.column-1),o=u.column-1,s+=u.options.content;return s+=r.substring(o),s}static fromDecorations(r){const i=[];for(const s of r)s.options.before&&s.options.before.content.length>0&&i.push(new b(s.ownerId,s.range.startLineNumber,s.range.startColumn,s.options.before,0)),s.options.after&&s.options.after.content.length>0&&i.push(new b(s.ownerId,s.range.endLineNumber,s.range.endColumn,s.options.after,1));return i.sort((s,o)=>s.lineNumber===o.lineNumber?s.column===o.column?s.order-o.order:s.column-o.column:s.lineNumber-o.lineNumber),i}constructor(r,i,s,o,u){this.ownerId=r,this.lineNumber=i,this.column=s,this.options=o,this.order=u}withText(r){return new b(this.ownerId,this.lineNumber,this.column,{...this.options,content:r},this.order)}}e.LineInjectedText=b;class D{constructor(r,i,s){this.changeType=2,this.lineNumber=r,this.detail=i,this.injectedText=s}}e.ModelRawLineChanged=D;class T{constructor(r,i){this.changeType=3,this.fromLineNumber=r,this.toLineNumber=i}}e.ModelRawLinesDeleted=T;class f{constructor(r,i,s,o){this.changeType=4,this.injectedTexts=o,this.fromLineNumber=r,this.toLineNumber=i,this.detail=s}}e.ModelRawLinesInserted=f;class v{constructor(){this.changeType=5}}e.ModelRawEOLChanged=v;class m{constructor(r,i,s,o){this.changes=r,this.versionId=i,this.isUndoing=s,this.isRedoing=o,this.resultingSelection=null}containsEvent(r){for(let i=0,s=this.changes.length;i<s;i++)if(this.changes[i].changeType===r)return!0;return!1}static merge(r,i){const s=[].concat(r.changes).concat(i.changes),o=i.versionId,u=r.isUndoing||i.isUndoing,d=r.isRedoing||i.isRedoing;return new m(s,o,u,d)}}e.ModelRawContentChangedEvent=m;class S{constructor(r){this.changes=r}}e.ModelInjectedTextChangedEvent=S;class h{constructor(r,i){this.rawContentChangedEvent=r,this.contentChangedEvent=i}merge(r){const i=m.merge(this.rawContentChangedEvent,r.rawContentChangedEvent),s=h._mergeChangeEvents(this.contentChangedEvent,r.contentChangedEvent);return new h(i,s)}static _mergeChangeEvents(r,i){const s=[].concat(r.changes).concat(i.changes),o=i.eol,u=i.versionId,d=r.isUndoing||i.isUndoing,p=r.isRedoing||i.isRedoing,c=r.isFlush||i.isFlush,l=r.isEolChange&&i.isEolChange;return{changes:s,eol:o,isEolChange:l,versionId:u,isUndoing:d,isRedoing:p,isFlush:c}}}e.InternalModelContentChangeEvent=h}),define(Q[802],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuideHorizontalLine=e.IndentGuide=e.HorizontalGuidesState=void 0;var t;(function(D){D[D.Disabled=0]="Disabled",D[D.EnabledForActive=1]="EnabledForActive",D[D.Enabled=2]="Enabled"})(t||(e.HorizontalGuidesState=t={}));class y{constructor(T,f,v,m,S,h){if(this.visibleColumn=T,this.column=f,this.className=v,this.horizontalLine=m,this.forWrappedLinesAfterColumn=S,this.forWrappedLinesBeforeOrAtColumn=h,T!==-1==(f!==-1))throw new Error}}e.IndentGuide=y;class b{constructor(T,f){this.top=T,this.endColumn=f}}e.IndentGuideHorizontalLine=b}),define(Q[1082],Y([1,0,20,33,323,27,1078,801,802,15]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairGuidesClassNames=e.GuidesTextModelPart=void 0;class S extends T.TextModelPart{constructor(r,i){super(),this.textModel=r,this.languageConfigurationService=i}getLanguageConfiguration(r){return this.languageConfigurationService.getLanguageConfiguration(r)}_computeIndentLevel(r){return(0,f.computeIndentLevel)(this.textModel.getLineContent(r+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(r,i,s){this.assertNotDisposed();const o=this.textModel.getLineCount();if(r<1||r>o)throw new m.BugIndicatingError("Illegal value for lineNumber");const u=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,d=!!(u&&u.offSide);let p=-2,c=-1,l=-2,n=-1;const g=P=>{if(p!==-1&&(p===-2||p>P-1)){p=-1,c=-1;for(let x=P-2;x>=0;x--){const F=this._computeIndentLevel(x);if(F>=0){p=x,c=F;break}}}if(l===-2){l=-1,n=-1;for(let x=P;x<o;x++){const F=this._computeIndentLevel(x);if(F>=0){l=x,n=F;break}}}};let w=-2,E=-1,C=-2,I=-1;const _=P=>{if(w===-2){w=-1,E=-1;for(let x=P-2;x>=0;x--){const F=this._computeIndentLevel(x);if(F>=0){w=x,E=F;break}}}if(C!==-1&&(C===-2||C<P-1)){C=-1,I=-1;for(let x=P;x<o;x++){const F=this._computeIndentLevel(x);if(F>=0){C=x,I=F;break}}}};let A=0,k=!0,L=0,R=!0,M=0,N=0;for(let P=0;k||R;P++){const x=r-P,F=r+P;P>1&&(x<1||x<i)&&(k=!1),P>1&&(F>o||F>s)&&(R=!1),P>5e4&&(k=!1,R=!1);let V=-1;if(k&&x>=1){const z=this._computeIndentLevel(x-1);z>=0?(l=x-1,n=z,V=Math.ceil(z/this.textModel.getOptions().indentSize)):(g(x),V=this._getIndentLevelForWhitespaceLine(d,c,n))}let W=-1;if(R&&F<=o){const z=this._computeIndentLevel(F-1);z>=0?(w=F-1,E=z,W=Math.ceil(z/this.textModel.getOptions().indentSize)):(_(F),W=this._getIndentLevelForWhitespaceLine(d,E,I))}if(P===0){N=V;continue}if(P===1){if(F<=o&&W>=0&&N+1===W){k=!1,A=F,L=F,M=W;continue}if(x>=1&&V>=0&&V-1===N){R=!1,A=x,L=x,M=V;continue}if(A=r,L=r,M=N,M===0)return{startLineNumber:A,endLineNumber:L,indent:M}}k&&(V>=M?A=x:k=!1),R&&(W>=M?L=F:R=!1)}return{startLineNumber:A,endLineNumber:L,indent:M}}getLinesBracketGuides(r,i,s,o){const u=[];for(let g=r;g<=i;g++)u.push([]);const d=!0,p=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new D.Range(r,1,i,this.textModel.getLineMaxColumn(i))).toArray();let c;if(s&&p.length>0){const g=(r<=s.lineNumber&&s.lineNumber<=i?p:this.textModel.bracketPairs.getBracketPairsInRange(D.Range.fromPositions(s)).toArray()).filter(w=>D.Range.strictContainsPosition(w.range,s));c=(0,t.findLast)(g,w=>d||w.range.startLineNumber!==w.range.endLineNumber)?.range}const l=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,n=new h;for(const g of p){if(!g.closingBracketRange)continue;const w=c&&g.range.equalsRange(c);if(!w&&!o.includeInactive)continue;const E=n.getInlineClassName(g.nestingLevel,g.nestingLevelOfEqualBracketType,l)+(o.highlightActive&&w?" "+n.activeClassName:""),C=g.openingBracketRange.getStartPosition(),I=g.closingBracketRange.getStartPosition(),_=o.horizontalGuides===v.HorizontalGuidesState.Enabled||o.horizontalGuides===v.HorizontalGuidesState.EnabledForActive&&w;if(g.range.startLineNumber===g.range.endLineNumber){d&&_&&u[g.range.startLineNumber-r].push(new v.IndentGuide(-1,g.openingBracketRange.getEndPosition().column,E,new v.IndentGuideHorizontalLine(!1,I.column),-1,-1));continue}const A=this.getVisibleColumnFromPosition(I),k=this.getVisibleColumnFromPosition(g.openingBracketRange.getStartPosition()),L=Math.min(k,A,g.minVisibleColumnIndentation+1);let R=!1;y.firstNonWhitespaceIndex(this.textModel.getLineContent(g.closingBracketRange.startLineNumber))<g.closingBracketRange.startColumn-1&&(R=!0);const P=Math.max(C.lineNumber,r),x=Math.min(I.lineNumber,i),F=R?1:0;for(let V=P;V<x+F;V++)u[V-r].push(new v.IndentGuide(L,-1,E,null,V===C.lineNumber?C.column:-1,V===I.lineNumber?I.column:-1));_&&(C.lineNumber>=r&&k>L&&u[C.lineNumber-r].push(new v.IndentGuide(L,-1,E,new v.IndentGuideHorizontalLine(!1,C.column),-1,-1)),I.lineNumber<=i&&A>L&&u[I.lineNumber-r].push(new v.IndentGuide(L,-1,E,new v.IndentGuideHorizontalLine(!R,I.column),-1,-1)))}for(const g of u)g.sort((w,E)=>w.visibleColumn-E.visibleColumn);return u}getVisibleColumnFromPosition(r){return b.CursorColumns.visibleColumnFromColumn(this.textModel.getLineContent(r.lineNumber),r.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(r,i){this.assertNotDisposed();const s=this.textModel.getLineCount();if(r<1||r>s)throw new Error("Illegal value for startLineNumber");if(i<1||i>s)throw new Error("Illegal value for endLineNumber");const o=this.textModel.getOptions(),u=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,d=!!(u&&u.offSide),p=new Array(i-r+1);let c=-2,l=-1,n=-2,g=-1;for(let w=r;w<=i;w++){const E=w-r,C=this._computeIndentLevel(w-1);if(C>=0){c=w-1,l=C,p[E]=Math.ceil(C/o.indentSize);continue}if(c===-2){c=-1,l=-1;for(let I=w-2;I>=0;I--){const _=this._computeIndentLevel(I);if(_>=0){c=I,l=_;break}}}if(n!==-1&&(n===-2||n<w-1)){n=-1,g=-1;for(let I=w;I<s;I++){const _=this._computeIndentLevel(I);if(_>=0){n=I,g=_;break}}}p[E]=this._getIndentLevelForWhitespaceLine(d,l,g)}return p}_getIndentLevelForWhitespaceLine(r,i,s){const o=this.textModel.getOptions();return i===-1||s===-1?0:i<s?1+Math.floor(i/o.indentSize):i===s||r?Math.ceil(s/o.indentSize):1+Math.floor(s/o.indentSize)}}e.GuidesTextModelPart=S;class h{constructor(){this.activeClassName="indent-active"}getInlineClassName(r,i,s){return this.getInlineClassNameOfLevel(s?i:r)}getInlineClassNameOfLevel(r){return`bracket-indent-guide lvl-${r%30}`}}e.BracketPairGuidesClassNames=h}),define(Q[1887],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistry=void 0;class b{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(f){this._onDidChange.fire({changedLanguages:f,changedColorMap:!1})}register(f,v){return this._tokenizationSupports.set(f,v),this.handleChange([f]),(0,y.toDisposable)(()=>{this._tokenizationSupports.get(f)===v&&(this._tokenizationSupports.delete(f),this.handleChange([f]))})}get(f){return this._tokenizationSupports.get(f)||null}registerFactory(f,v){this._factories.get(f)?.dispose();const m=new D(this,f,v);return this._factories.set(f,m),(0,y.toDisposable)(()=>{const S=this._factories.get(f);!S||S!==m||(this._factories.delete(f),S.dispose())})}async getOrCreate(f){const v=this.get(f);if(v)return v;const m=this._factories.get(f);return!m||m.isResolved?null:(await m.resolve(),this.get(f))}isResolved(f){if(this.get(f))return!0;const m=this._factories.get(f);return!!(!m||m.isResolved)}setColorMap(f){this._colorMap=f,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}e.TokenizationRegistry=b;class D extends y.Disposable{get isResolved(){return this._isResolved}constructor(f,v,m){super(),this._registry=f,this._languageId=v,this._factory=m,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const f=await this._factory.tokenizationSupport;this._isResolved=!0,f&&!this._isDisposed&&this._register(this._registry.register(this._languageId,f))}}}),define(Q[368],Y([1,0,439]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineTokens=void 0;class y{static{this.defaultTokenMetadata=(0<<11|1<<15|2<<24)>>>0}static createEmpty(T,f){const v=y.defaultTokenMetadata,m=new Uint32Array(2);return m[0]=T.length,m[1]=v,new y(m,T,f)}constructor(T,f,v){this._lineTokensBrand=void 0,this._tokens=T,this._tokensCount=this._tokens.length>>>1,this._text=f,this._languageIdCodec=v}equals(T){return T instanceof y?this.slicedEquals(T,0,this._tokensCount):!1}slicedEquals(T,f,v){if(this._text!==T._text||this._tokensCount!==T._tokensCount)return!1;const m=f<<1,S=m+(v<<1);for(let h=m;h<S;h++)if(this._tokens[h]!==T._tokens[h])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(T){return T>0?this._tokens[T-1<<1]:0}getMetadata(T){return this._tokens[(T<<1)+1]}getLanguageId(T){const f=this._tokens[(T<<1)+1],v=t.TokenMetadata.getLanguageId(f);return this._languageIdCodec.decodeLanguageId(v)}getStandardTokenType(T){const f=this._tokens[(T<<1)+1];return t.TokenMetadata.getTokenType(f)}getForeground(T){const f=this._tokens[(T<<1)+1];return t.TokenMetadata.getForeground(f)}getClassName(T){const f=this._tokens[(T<<1)+1];return t.TokenMetadata.getClassNameFromMetadata(f)}getInlineStyle(T,f){const v=this._tokens[(T<<1)+1];return t.TokenMetadata.getInlineStyleFromMetadata(v,f)}getPresentation(T){const f=this._tokens[(T<<1)+1];return t.TokenMetadata.getPresentationFromMetadata(f)}getEndOffset(T){return this._tokens[T<<1]}findTokenIndexAtOffset(T){return y.findIndexInTokensArray(this._tokens,T)}inflate(){return this}sliceAndInflate(T,f,v){return new b(this,T,f,v)}static convertToEndOffset(T,f){const m=(T.length>>>1)-1;for(let S=0;S<m;S++)T[S<<1]=T[S+1<<1];T[m<<1]=f}static findIndexInTokensArray(T,f){if(T.length<=2)return 0;let v=0,m=(T.length>>>1)-1;for(;v<m;){const S=v+Math.floor((m-v)/2),h=T[S<<1];if(h===f)return S+1;h<f?v=S+1:h>f&&(m=S)}return v}withInserted(T){if(T.length===0)return this;let f=0,v=0,m="";const S=new Array;let h=0;for(;;){const a=f<this._tokensCount?this._tokens[f<<1]:-1,r=v<T.length?T[v]:null;if(a!==-1&&(r===null||a<=r.offset)){m+=this._text.substring(h,a);const i=this._tokens[(f<<1)+1];S.push(m.length,i),f++,h=a}else if(r){if(r.offset>h){m+=this._text.substring(h,r.offset);const i=this._tokens[(f<<1)+1];S.push(m.length,i),h=r.offset}m+=r.text,S.push(m.length,r.tokenMetadata),v++}else break}return new y(new Uint32Array(S),m,this._languageIdCodec)}}e.LineTokens=y;class b{constructor(T,f,v,m){this._source=T,this._startOffset=f,this._endOffset=v,this._deltaOffset=m,this._firstTokenIndex=T.findTokenIndexAtOffset(f),this._tokensCount=0;for(let S=this._firstTokenIndex,h=T.getCount();S<h&&!(T.getStartOffset(S)>=v);S++)this._tokensCount++}getMetadata(T){return this._source.getMetadata(this._firstTokenIndex+T)}getLanguageId(T){return this._source.getLanguageId(this._firstTokenIndex+T)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(T){return T instanceof b?this._startOffset===T._startOffset&&this._endOffset===T._endOffset&&this._deltaOffset===T._deltaOffset&&this._source.slicedEquals(T._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(T){return this._source.getForeground(this._firstTokenIndex+T)}getEndOffset(T){const f=this._source.getEndOffset(this._firstTokenIndex+T);return Math.min(this._endOffset,f)-this._startOffset+this._deltaOffset}getClassName(T){return this._source.getClassName(this._firstTokenIndex+T)}getInlineStyle(T,f){return this._source.getInlineStyle(this._firstTokenIndex+T,f)}getPresentation(T){return this._source.getPresentation(this._firstTokenIndex+T)}findTokenIndexAtOffset(T){return this._source.findTokenIndexAtOffset(T+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}}),define(Q[1083],Y([1,0,368]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toUint32Array=e.ContiguousTokensEditing=e.EMPTY_LINE_TOKENS=void 0,e.EMPTY_LINE_TOKENS=new Uint32Array(0).buffer;class y{static deleteBeginning(T,f){return T===null||T===e.EMPTY_LINE_TOKENS?T:y.delete(T,0,f)}static deleteEnding(T,f){if(T===null||T===e.EMPTY_LINE_TOKENS)return T;const v=b(T),m=v[v.length-2];return y.delete(T,f,m)}static delete(T,f,v){if(T===null||T===e.EMPTY_LINE_TOKENS||f===v)return T;const m=b(T),S=m.length>>>1;if(f===0&&m[m.length-2]===v)return e.EMPTY_LINE_TOKENS;const h=t.LineTokens.findIndexInTokensArray(m,f),a=h>0?m[h-1<<1]:0,r=m[h<<1];if(v<r){const d=v-f;for(let p=h;p<S;p++)m[p<<1]-=d;return T}let i,s;a!==f?(m[h<<1]=f,i=h+1<<1,s=f):(i=h<<1,s=a);const o=v-f;for(let d=h+1;d<S;d++){const p=m[d<<1]-o;p>s&&(m[i++]=p,m[i++]=m[(d<<1)+1],s=p)}if(i===m.length)return T;const u=new Uint32Array(i);return u.set(m.subarray(0,i),0),u.buffer}static append(T,f){if(f===e.EMPTY_LINE_TOKENS)return T;if(T===e.EMPTY_LINE_TOKENS)return f;if(T===null)return T;if(f===null)return null;const v=b(T),m=b(f),S=m.length>>>1,h=new Uint32Array(v.length+m.length);h.set(v,0);let a=v.length;const r=v[v.length-2];for(let i=0;i<S;i++)h[a++]=m[i<<1]+r,h[a++]=m[(i<<1)+1];return h.buffer}static insert(T,f,v){if(T===null||T===e.EMPTY_LINE_TOKENS)return T;const m=b(T),S=m.length>>>1;let h=t.LineTokens.findIndexInTokensArray(m,f);h>0&&m[h-1<<1]===f&&h--;for(let a=h;a<S;a++)m[a<<1]+=v;return T}}e.ContiguousTokensEditing=y;function b(D){return D instanceof Uint32Array?D:new Uint32Array(D)}e.toUint32Array=b}),define(Q[1888],Y([1,0,20,62,51,392,1083,238]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokens=void 0;class v{static deserialize(S,h,a){const r=new Uint32Array(S.buffer),i=(0,y.readUInt32BE)(S,h);h+=4;const s=(0,y.readUInt32BE)(S,h);h+=4;const o=[];for(let u=0;u<s;u++){const d=(0,y.readUInt32BE)(S,h);h+=4,o.push(r.subarray(h/4,h/4+d/4)),h+=d}return a.push(new v(i,o)),h}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(S,h){this._startLineNumber=S,this._tokens=h}getLineRange(){return new f.LineRange(this._startLineNumber,this._startLineNumber+this._tokens.length)}getLineTokens(S){return this._tokens[S-this._startLineNumber]}appendLineTokens(S){this._tokens.push(S)}serializeSize(){let S=0;S+=4,S+=4;for(let h=0;h<this._tokens.length;h++){const a=this._tokens[h];if(!(a instanceof Uint32Array))throw new Error("Not supported!");S+=4,S+=a.byteLength}return S}serialize(S,h){(0,y.writeUInt32BE)(S,this._startLineNumber,h),h+=4,(0,y.writeUInt32BE)(S,this._tokens.length,h),h+=4;for(let a=0;a<this._tokens.length;a++){const r=this._tokens[a];if(!(r instanceof Uint32Array))throw new Error("Not supported!");(0,y.writeUInt32BE)(S,r.byteLength,h),h+=4,S.set(new Uint8Array(r.buffer),h),h+=r.byteLength}return h}applyEdit(S,h){const[a,r]=(0,D.countEOL)(h);this._acceptDeleteRange(S),this._acceptInsertText(new b.Position(S.startLineNumber,S.startColumn),a,r)}_acceptDeleteRange(S){if(S.startLineNumber===S.endLineNumber&&S.startColumn===S.endColumn)return;const h=S.startLineNumber-this._startLineNumber,a=S.endLineNumber-this._startLineNumber;if(a<0){const r=a-h;this._startLineNumber-=r;return}if(!(h>=this._tokens.length)){if(h<0&&a>=this._tokens.length){this._startLineNumber=0,this._tokens=[];return}if(h===a){this._tokens[h]=T.ContiguousTokensEditing.delete(this._tokens[h],S.startColumn-1,S.endColumn-1);return}if(h>=0)if(this._tokens[h]=T.ContiguousTokensEditing.deleteEnding(this._tokens[h],S.startColumn-1),a<this._tokens.length){const r=T.ContiguousTokensEditing.deleteBeginning(this._tokens[a],S.endColumn-1);this._tokens[h]=T.ContiguousTokensEditing.append(this._tokens[h],r),this._tokens.splice(h+1,a-h)}else this._tokens[h]=T.ContiguousTokensEditing.append(this._tokens[h],null),this._tokens=this._tokens.slice(0,h+1);else{const r=-h;this._startLineNumber-=r,this._tokens[a]=T.ContiguousTokensEditing.deleteBeginning(this._tokens[a],S.endColumn-1),this._tokens=this._tokens.slice(a)}}}_acceptInsertText(S,h,a){if(h===0&&a===0)return;const r=S.lineNumber-this._startLineNumber;if(r<0){this._startLineNumber+=h;return}if(!(r>=this._tokens.length)){if(h===0){this._tokens[r]=T.ContiguousTokensEditing.insert(this._tokens[r],S.column-1,a);return}this._tokens[r]=T.ContiguousTokensEditing.deleteEnding(this._tokens[r],S.column-1),this._tokens[r]=T.ContiguousTokensEditing.insert(this._tokens[r],S.column-1,a),this._insertLines(S.lineNumber,h)}}_insertLines(S,h){if(h===0)return;const a=[];for(let r=0;r<h;r++)a[r]=null;this._tokens=t.arrayInsert(this._tokens,S,a)}}e.ContiguousMultilineTokens=v}),define(Q[803],Y([1,0,62,1888]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokensBuilder=void 0;class b{static deserialize(T){let f=0;const v=(0,t.readUInt32BE)(T,f);f+=4;const m=[];for(let S=0;S<v;S++)f=y.ContiguousMultilineTokens.deserialize(T,f,m);return m}constructor(){this._tokens=[]}add(T,f){if(this._tokens.length>0){const v=this._tokens[this._tokens.length-1];if(v.endLineNumber+1===T){v.appendLineTokens(f);return}}this._tokens.push(new y.ContiguousMultilineTokens(T,[f]))}finalize(){return this._tokens}serialize(){const T=this._serializeSize(),f=new Uint8Array(T);return this._serialize(f),f}_serializeSize(){let T=0;T+=4;for(let f=0;f<this._tokens.length;f++)T+=this._tokens[f].serializeSize();return T}_serialize(T){let f=0;(0,t.writeUInt32BE)(T,this._tokens.length,f),f+=4;for(let v=0;v<this._tokens.length;v++)f=this._tokens[v].serialize(T,f)}}e.ContiguousMultilineTokensBuilder=b}),define(Q[1889],Y([1,0,20,51,1083,368,439]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousTokensStore=void 0;class f{constructor(S){this._lineTokens=[],this._len=0,this._languageIdCodec=S}flush(){this._lineTokens=[],this._len=0}get hasTokens(){return this._lineTokens.length>0}getTokens(S,h,a){let r=null;if(h<this._len&&(r=this._lineTokens[h]),r!==null&&r!==b.EMPTY_LINE_TOKENS)return new D.LineTokens((0,b.toUint32Array)(r),a,this._languageIdCodec);const i=new Uint32Array(2);return i[0]=a.length,i[1]=v(this._languageIdCodec.encodeLanguageId(S)),new D.LineTokens(i,a,this._languageIdCodec)}static _massageTokens(S,h,a){const r=a?(0,b.toUint32Array)(a):null;if(h===0){let i=!1;if(r&&r.length>1&&(i=T.TokenMetadata.getLanguageId(r[1])!==S),!i)return b.EMPTY_LINE_TOKENS}if(!r||r.length===0){const i=new Uint32Array(2);return i[0]=h,i[1]=v(S),i.buffer}return r[r.length-2]=h,r.byteOffset===0&&r.byteLength===r.buffer.byteLength?r.buffer:r}_ensureLine(S){for(;S>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(S,h){h!==0&&(S+h>this._len&&(h=this._len-S),this._lineTokens.splice(S,h),this._len-=h)}_insertLines(S,h){if(h===0)return;const a=[];for(let r=0;r<h;r++)a[r]=null;this._lineTokens=t.arrayInsert(this._lineTokens,S,a),this._len+=h}setTokens(S,h,a,r,i){const s=f._massageTokens(this._languageIdCodec.encodeLanguageId(S),a,r);this._ensureLine(h);const o=this._lineTokens[h];return this._lineTokens[h]=s,i?!f._equals(o,s):!1}static _equals(S,h){if(!S||!h)return!S&&!h;const a=(0,b.toUint32Array)(S),r=(0,b.toUint32Array)(h);if(a.length!==r.length)return!1;for(let i=0,s=a.length;i<s;i++)if(a[i]!==r[i])return!1;return!0}acceptEdit(S,h,a){this._acceptDeleteRange(S),this._acceptInsertText(new y.Position(S.startLineNumber,S.startColumn),h,a)}_acceptDeleteRange(S){const h=S.startLineNumber-1;if(h>=this._len)return;if(S.startLineNumber===S.endLineNumber){if(S.startColumn===S.endColumn)return;this._lineTokens[h]=b.ContiguousTokensEditing.delete(this._lineTokens[h],S.startColumn-1,S.endColumn-1);return}this._lineTokens[h]=b.ContiguousTokensEditing.deleteEnding(this._lineTokens[h],S.startColumn-1);const a=S.endLineNumber-1;let r=null;a<this._len&&(r=b.ContiguousTokensEditing.deleteBeginning(this._lineTokens[a],S.endColumn-1)),this._lineTokens[h]=b.ContiguousTokensEditing.append(this._lineTokens[h],r),this._deleteLines(S.startLineNumber,S.endLineNumber-S.startLineNumber)}_acceptInsertText(S,h,a){if(h===0&&a===0)return;const r=S.lineNumber-1;if(!(r>=this._len)){if(h===0){this._lineTokens[r]=b.ContiguousTokensEditing.insert(this._lineTokens[r],S.column-1,a);return}this._lineTokens[r]=b.ContiguousTokensEditing.deleteEnding(this._lineTokens[r],S.column-1),this._lineTokens[r]=b.ContiguousTokensEditing.insert(this._lineTokens[r],S.column-1,a),this._insertLines(S.lineNumber,h)}}setMultilineTokens(S,h){if(S.length===0)return{changes:[]};const a=[];for(let r=0,i=S.length;r<i;r++){const s=S[r];let o=0,u=0,d=!1;for(let p=s.startLineNumber;p<=s.endLineNumber;p++)d?(this.setTokens(h.getLanguageId(),p-1,h.getLineLength(p),s.getLineTokens(p),!1),u=p):this.setTokens(h.getLanguageId(),p-1,h.getLineLength(p),s.getLineTokens(p),!0)&&(d=!0,o=p,u=p);d&&a.push({fromLineNumber:o,toLineNumber:u})}return{changes:a}}}e.ContiguousTokensStore=f;function v(m){return(m<<0|0<<8|0<<11|1<<15|2<<24|1024)>>>0}}),define(Q[1890],Y([1,0,51,27,392]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseLineTokens=e.SparseMultilineTokens=void 0;class D{static create(m,S){return new D(m,new T(S))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(m,S){this._startLineNumber=m,this._tokens=S,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(m){return this._startLineNumber<=m&&m<=this._endLineNumber?this._tokens.getLineTokens(m-this._startLineNumber):null}getRange(){const m=this._tokens.getRange();return m&&new y.Range(this._startLineNumber+m.startLineNumber,m.startColumn,this._startLineNumber+m.endLineNumber,m.endColumn)}removeTokens(m){const S=m.startLineNumber-this._startLineNumber,h=m.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(S,m.startColumn-1,h,m.endColumn-1),this._updateEndLineNumber()}split(m){const S=m.startLineNumber-this._startLineNumber,h=m.endLineNumber-this._startLineNumber,[a,r,i]=this._tokens.split(S,m.startColumn-1,h,m.endColumn-1);return[new D(this._startLineNumber,a),new D(this._startLineNumber+i,r)]}applyEdit(m,S){const[h,a,r]=(0,b.countEOL)(S);this.acceptEdit(m,h,a,r,S.length>0?S.charCodeAt(0):0)}acceptEdit(m,S,h,a,r){this._acceptDeleteRange(m),this._acceptInsertText(new t.Position(m.startLineNumber,m.startColumn),S,h,a,r),this._updateEndLineNumber()}_acceptDeleteRange(m){if(m.startLineNumber===m.endLineNumber&&m.startColumn===m.endColumn)return;const S=m.startLineNumber-this._startLineNumber,h=m.endLineNumber-this._startLineNumber;if(h<0){const r=h-S;this._startLineNumber-=r;return}const a=this._tokens.getMaxDeltaLine();if(!(S>=a+1)){if(S<0&&h>=a+1){this._startLineNumber=0,this._tokens.clear();return}if(S<0){const r=-S;this._startLineNumber-=r,this._tokens.acceptDeleteRange(m.startColumn-1,0,0,h,m.endColumn-1)}else this._tokens.acceptDeleteRange(0,S,m.startColumn-1,h,m.endColumn-1)}}_acceptInsertText(m,S,h,a,r){if(S===0&&h===0)return;const i=m.lineNumber-this._startLineNumber;if(i<0){this._startLineNumber+=S;return}const s=this._tokens.getMaxDeltaLine();i>=s+1||this._tokens.acceptInsertText(i,m.column-1,S,h,a,r)}}e.SparseMultilineTokens=D;class T{constructor(m){this._tokens=m,this._tokenCount=m.length/4}toString(m){const S=[];for(let h=0;h<this._tokenCount;h++)S.push(`(${this._getDeltaLine(h)+m},${this._getStartCharacter(h)}-${this._getEndCharacter(h)})`);return`[${S.join(",")}]`}getMaxDeltaLine(){const m=this._getTokenCount();return m===0?-1:this._getDeltaLine(m-1)}getRange(){const m=this._getTokenCount();if(m===0)return null;const S=this._getStartCharacter(0),h=this._getDeltaLine(m-1),a=this._getEndCharacter(m-1);return new y.Range(0,S+1,h,a+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(m){return this._tokens[4*m]}_getStartCharacter(m){return this._tokens[4*m+1]}_getEndCharacter(m){return this._tokens[4*m+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(m){let S=0,h=this._getTokenCount()-1;for(;S<h;){const a=S+Math.floor((h-S)/2),r=this._getDeltaLine(a);if(r<m)S=a+1;else if(r>m)h=a-1;else{let i=a;for(;i>S&&this._getDeltaLine(i-1)===m;)i--;let s=a;for(;s<h&&this._getDeltaLine(s+1)===m;)s++;return new f(this._tokens.subarray(4*i,4*s+4))}}return this._getDeltaLine(S)===m?new f(this._tokens.subarray(4*S,4*S+4)):null}clear(){this._tokenCount=0}removeTokens(m,S,h,a){const r=this._tokens,i=this._tokenCount;let s=0,o=!1,u=0;for(let d=0;d<i;d++){const p=4*d,c=r[p],l=r[p+1],n=r[p+2],g=r[p+3];if((c>m||c===m&&n>=S)&&(c<h||c===h&&l<=a))o=!0;else{if(s===0&&(u=c),o){const w=4*s;r[w]=c-u,r[w+1]=l,r[w+2]=n,r[w+3]=g}s++}}return this._tokenCount=s,u}split(m,S,h,a){const r=this._tokens,i=this._tokenCount,s=[],o=[];let u=s,d=0,p=0;for(let c=0;c<i;c++){const l=4*c,n=r[l],g=r[l+1],w=r[l+2],E=r[l+3];if(n>m||n===m&&w>=S){if(n<h||n===h&&g<=a)continue;u!==o&&(u=o,d=0,p=n)}u[d++]=n-p,u[d++]=g,u[d++]=w,u[d++]=E}return[new T(new Uint32Array(s)),new T(new Uint32Array(o)),p]}acceptDeleteRange(m,S,h,a,r){const i=this._tokens,s=this._tokenCount,o=a-S;let u=0,d=!1;for(let p=0;p<s;p++){const c=4*p;let l=i[c],n=i[c+1],g=i[c+2];const w=i[c+3];if(l<S||l===S&&g<=h){u++;continue}else if(l===S&&n<h)l===a&&g>r?g-=r-h:g=h;else if(l===S&&n===h)if(l===a&&g>r)g-=r-h;else{d=!0;continue}else if(l<a||l===a&&n<r)if(l===a&&g>r)l=S,n=h,g=n+(g-r);else{d=!0;continue}else if(l>a){if(o===0&&!d){u=s;break}l-=o}else if(l===a&&n>=r)m&&l===0&&(n+=m,g+=m),l-=o,n-=r-h,g-=r-h;else throw new Error("Not possible!");const E=4*u;i[E]=l,i[E+1]=n,i[E+2]=g,i[E+3]=w,u++}this._tokenCount=u}acceptInsertText(m,S,h,a,r,i){const s=h===0&&a===1&&(i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122),o=this._tokens,u=this._tokenCount;for(let d=0;d<u;d++){const p=4*d;let c=o[p],l=o[p+1],n=o[p+2];if(!(c<m||c===m&&n<S)){if(c===m&&n===S)if(s)n+=1;else continue;else if(c===m&&l<S&&S<n)h===0?n+=a:n=S;else{if(c===m&&l===S&&s)continue;if(c===m)if(c+=h,h===0)l+=a,n+=a;else{const g=n-l;l=r+(l-S),n=l+g}else c+=h}o[p]=c,o[p+1]=l,o[p+2]=n}}}}class f{constructor(m){this._tokens=m}getCount(){return this._tokens.length/4}getStartCharacter(m){return this._tokens[4*m+1]}getEndCharacter(m){return this._tokens[4*m+2]}getMetadata(m){return this._tokens[4*m+3]}}e.SparseLineTokens=f}),define(Q[1891],Y([1,0,20,368]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseTokensStore=void 0;class b{constructor(T){this._pieces=[],this._isComplete=!1,this._languageIdCodec=T}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(T,f){this._pieces=T||[],this._isComplete=f}setPartial(T,f){let v=T;if(f.length>0){const S=f[0].getRange(),h=f[f.length-1].getRange();if(!S||!h)return T;v=T.plusRange(S).plusRange(h)}let m=null;for(let S=0,h=this._pieces.length;S<h;S++){const a=this._pieces[S];if(a.endLineNumber<v.startLineNumber)continue;if(a.startLineNumber>v.endLineNumber){m=m||{index:S};break}if(a.removeTokens(v),a.isEmpty()){this._pieces.splice(S,1),S--,h--;continue}if(a.endLineNumber<v.startLineNumber)continue;if(a.startLineNumber>v.endLineNumber){m=m||{index:S};continue}const[r,i]=a.split(v);if(r.isEmpty()){m=m||{index:S};continue}i.isEmpty()||(this._pieces.splice(S,1,r,i),S++,h++,m=m||{index:S})}return m=m||{index:this._pieces.length},f.length>0&&(this._pieces=t.arrayInsert(this._pieces,m.index,f)),v}isComplete(){return this._isComplete}addSparseTokens(T,f){if(f.getLineContent().length===0)return f;const v=this._pieces;if(v.length===0)return f;const m=b._findFirstPieceWithLine(v,T),S=v[m].getLineTokens(T);if(!S)return f;const h=f.getCount(),a=S.getCount();let r=0;const i=[];let s=0,o=0;const u=(d,p)=>{d!==o&&(o=d,i[s++]=d,i[s++]=p)};for(let d=0;d<a;d++){const p=S.getStartCharacter(d),c=S.getEndCharacter(d),l=S.getMetadata(d),n=((l&1?2048:0)|(l&2?4096:0)|(l&4?8192:0)|(l&8?16384:0)|(l&16?16744448:0)|(l&32?4278190080:0))>>>0,g=~n>>>0;for(;r<h&&f.getEndOffset(r)<=p;)u(f.getEndOffset(r),f.getMetadata(r)),r++;for(r<h&&f.getStartOffset(r)<p&&u(p,f.getMetadata(r));r<h&&f.getEndOffset(r)<c;)u(f.getEndOffset(r),f.getMetadata(r)&g|l&n),r++;if(r<h)u(c,f.getMetadata(r)&g|l&n),f.getEndOffset(r)===c&&r++;else{const w=Math.min(Math.max(0,r-1),h-1);u(c,f.getMetadata(w)&g|l&n)}}for(;r<h;)u(f.getEndOffset(r),f.getMetadata(r)),r++;return new y.LineTokens(new Uint32Array(i),f.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(T,f){let v=0,m=T.length-1;for(;v<m;){let S=v+Math.floor((m-v)/2);if(T[S].endLineNumber<f)v=S+1;else if(T[S].startLineNumber>f)m=S-1;else{for(;S>v&&T[S-1].startLineNumber<=f&&f<=T[S-1].endLineNumber;)S--;return S}}return v}acceptEdit(T,f,v,m,S){for(const h of this._pieces)h.acceptEdit(T,f,v,m,S)}}e.SparseTokensStore=b}),define(Q[566],Y([1,0,4]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewEventHandler=void 0;class y extends t.Disposable{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(D){return!1}onCompositionEnd(D){return!1}onConfigurationChanged(D){return!1}onCursorStateChanged(D){return!1}onDecorationsChanged(D){return!1}onFlushed(D){return!1}onFocusChanged(D){return!1}onLanguageConfigurationChanged(D){return!1}onLineMappingChanged(D){return!1}onLinesChanged(D){return!1}onLinesDeleted(D){return!1}onLinesInserted(D){return!1}onRevealRangeRequest(D){return!1}onScrollChanged(D){return!1}onThemeChanged(D){return!1}onTokensChanged(D){return!1}onTokensColorsChanged(D){return!1}onZonesChanged(D){return!1}handleEvents(D){let T=!1;for(let f=0,v=D.length;f<v;f++){const m=D[f];switch(m.type){case 0:this.onCompositionStart(m)&&(T=!0);break;case 1:this.onCompositionEnd(m)&&(T=!0);break;case 2:this.onConfigurationChanged(m)&&(T=!0);break;case 3:this.onCursorStateChanged(m)&&(T=!0);break;case 4:this.onDecorationsChanged(m)&&(T=!0);break;case 5:this.onFlushed(m)&&(T=!0);break;case 6:this.onFocusChanged(m)&&(T=!0);break;case 7:this.onLanguageConfigurationChanged(m)&&(T=!0);break;case 8:this.onLineMappingChanged(m)&&(T=!0);break;case 9:this.onLinesChanged(m)&&(T=!0);break;case 10:this.onLinesDeleted(m)&&(T=!0);break;case 11:this.onLinesInserted(m)&&(T=!0);break;case 12:this.onRevealRangeRequest(m)&&(T=!0);break;case 13:this.onScrollChanged(m)&&(T=!0);break;case 15:this.onTokensChanged(m)&&(T=!0);break;case 14:this.onThemeChanged(m)&&(T=!0);break;case 16:this.onTokensColorsChanged(m)&&(T=!0);break;case 17:this.onZonesChanged(m)&&(T=!0);break;default:console.info("View received unknown event: "),console.info(m)}}T&&(this._shouldRender=!0)}}e.ViewEventHandler=y}),define(Q[442],Y([1,0,566]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicViewOverlay=void 0;class y extends t.ViewEventHandler{}e.DynamicViewOverlay=y}),define(Q[239],Y([1,0,566]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartFingerprints=e.PartFingerprint=e.ViewPart=void 0;class y extends t.ViewEventHandler{constructor(f){super(),this._context=f,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}e.ViewPart=y;var b;(function(T){T[T.None=0]="None",T[T.ContentWidgets=1]="ContentWidgets",T[T.OverflowingContentWidgets=2]="OverflowingContentWidgets",T[T.OverflowGuard=3]="OverflowGuard",T[T.OverlayWidgets=4]="OverlayWidgets",T[T.ScrollableElement=5]="ScrollableElement",T[T.TextArea=6]="TextArea",T[T.ViewLines=7]="ViewLines",T[T.Minimap=8]="Minimap"})(b||(e.PartFingerprint=b={}));class D{static write(f,v){f.setAttribute("data-mprt",String(v))}static read(f){const v=f.getAttribute("data-mprt");return v===null?0:parseInt(v,10)}static collect(f,v){const m=[];let S=0;for(;f&&f!==document.body&&f!==v;)f.nodeType===f.ELEMENT_NODE&&(m[S++]=this.read(f)),f=f.parentElement;const h=new Uint8Array(S);for(let a=0;a<S;a++)h[a]=m[S-a-1];return h}}e.PartFingerprints=D}),define(Q[1892],Y([1,0,140,239,1699]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockDecorations=void 0;class b extends y.ViewPart{constructor(T){super(T),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,t.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let T=!1;const v=this._context.configuration.options.get(142),m=v.contentWidth-v.verticalScrollbarWidth;this.contentWidth!==m&&(this.contentWidth=m,T=!0);const S=v.contentLeft;return this.contentLeft!==S&&(this.contentLeft=S,T=!0),T}dispose(){super.dispose()}onConfigurationChanged(T){return this.update()}onScrollChanged(T){return T.scrollTopChanged||T.scrollLeftChanged}onDecorationsChanged(T){return!0}onZonesChanged(T){return!0}prepareRender(T){}render(T){let f=0;const v=T.getDecorationsInViewport();for(const m of v){if(!m.options.blockClassName)continue;let S=this.blocks[f];S||(S=this.blocks[f]=(0,t.createFastDomNode)(document.createElement("div")),this.domNode.appendChild(S));let h,a;m.options.blockIsAfterEnd?(h=T.getVerticalOffsetAfterLineNumber(m.range.endLineNumber,!1),a=T.getVerticalOffsetAfterLineNumber(m.range.endLineNumber,!0)):(h=T.getVerticalOffsetForLineNumber(m.range.startLineNumber,!0),a=m.range.isEmpty()&&!m.options.blockDoesNotCollapse?T.getVerticalOffsetForLineNumber(m.range.startLineNumber,!1):T.getVerticalOffsetAfterLineNumber(m.range.endLineNumber,!0));const[r,i,s,o]=m.options.blockPadding??[0,0,0,0];S.setClassName("blockDecorations-block "+m.options.blockClassName),S.setLeft(this.contentLeft-o),S.setWidth(this.contentWidth+o+i),S.setTop(h-T.scrollTop-r),S.setHeight(a-h+r+s),f++}for(let m=f;m<this.blocks.length;m++)this.blocks[m].domNode.remove();this.blocks.length=f}}e.BlockDecorations=b}),define(Q[1893],Y([1,0,442,562,27,1701]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverlay=void 0;class D extends t.DynamicViewOverlay{constructor(f){super(),this._context=f;const v=this._context.configuration.options;this._lineHeight=v.get(65),this._typicalHalfwidthCharacterWidth=v.get(49).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(f){const v=this._context.configuration.options;return this._lineHeight=v.get(65),this._typicalHalfwidthCharacterWidth=v.get(49).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(f){return!0}onFlushed(f){return!0}onLinesChanged(f){return!0}onLinesDeleted(f){return!0}onLinesInserted(f){return!0}onScrollChanged(f){return f.scrollTopChanged||f.scrollWidthChanged}onZonesChanged(f){return!0}prepareRender(f){const v=f.getDecorationsInViewport();let m=[],S=0;for(let i=0,s=v.length;i<s;i++){const o=v[i];o.options.className&&(m[S++]=o)}m=m.sort((i,s)=>{if(i.options.zIndex<s.options.zIndex)return-1;if(i.options.zIndex>s.options.zIndex)return 1;const o=i.options.className,u=s.options.className;return o<u?-1:o>u?1:b.Range.compareRangesUsingStarts(i.range,s.range)});const h=f.visibleRange.startLineNumber,a=f.visibleRange.endLineNumber,r=[];for(let i=h;i<=a;i++){const s=i-h;r[s]=""}this._renderWholeLineDecorations(f,m,r),this._renderNormalDecorations(f,m,r),this._renderResult=r}_renderWholeLineDecorations(f,v,m){const S=String(this._lineHeight),h=f.visibleRange.startLineNumber,a=f.visibleRange.endLineNumber;for(let r=0,i=v.length;r<i;r++){const s=v[r];if(!s.options.isWholeLine)continue;const o='<div class="cdr '+s.options.className+'" style="left:0;width:100%;height:'+S+'px;"></div>',u=Math.max(s.range.startLineNumber,h),d=Math.min(s.range.endLineNumber,a);for(let p=u;p<=d;p++){const c=p-h;m[c]+=o}}}_renderNormalDecorations(f,v,m){const S=String(this._lineHeight),h=f.visibleRange.startLineNumber;let a=null,r=!1,i=null,s=!1;for(let o=0,u=v.length;o<u;o++){const d=v[o];if(d.options.isWholeLine)continue;const p=d.options.className,c=!!d.options.showIfCollapsed;let l=d.range;if(c&&l.endColumn===1&&l.endLineNumber!==l.startLineNumber&&(l=new b.Range(l.startLineNumber,l.startColumn,l.endLineNumber-1,this._context.viewModel.getLineMaxColumn(l.endLineNumber-1))),a===p&&r===c&&b.Range.areIntersectingOrTouching(i,l)){i=b.Range.plusRange(i,l);continue}a!==null&&this._renderNormalDecoration(f,i,a,s,r,S,h,m),a=p,r=c,i=l,s=d.options.shouldFillLineOnLineBreak??!1}a!==null&&this._renderNormalDecoration(f,i,a,s,r,S,h,m)}_renderNormalDecoration(f,v,m,S,h,a,r,i){const s=f.linesVisibleRangesForRange(v,m==="findMatch");if(s)for(let o=0,u=s.length;o<u;o++){const d=s[o];if(d.outsideRenderedLine)continue;const p=d.lineNumber-r;if(h&&d.ranges.length===1){const c=d.ranges[0];if(c.width<this._typicalHalfwidthCharacterWidth){const l=Math.round(c.left+c.width/2),n=Math.max(0,Math.round(l-this._typicalHalfwidthCharacterWidth/2));d.ranges[0]=new y.HorizontalRange(n,this._typicalHalfwidthCharacterWidth)}}for(let c=0,l=d.ranges.length;c<l;c++){const n=S&&d.continuesOnNextLine&&l===1,g=d.ranges[c],w='<div class="cdr '+m+'" style="left:'+String(g.left)+(n?"px;width:100%;height:":"px;width:"+String(g.width)+"px;height:")+a+'px;"></div>';i[p]+=w}}}render(f,v){if(!this._renderResult)return"";const m=v-f;return m<0||m>=this._renderResult.length?"":this._renderResult[m]}}e.DecorationsOverlay=D}),define(Q[804],Y([1,0,140,20,442,239,27,1702]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphMarginWidgets=e.DedupOverlay=e.VisibleLineDecorationsToRender=e.LineDecorationToRender=e.DecorationToRender=void 0;class f{constructor(u,d,p,c){this._decorationToRenderBrand=void 0,this.startLineNumber=+u,this.endLineNumber=+d,this.className=String(p),this.zIndex=c??0}}e.DecorationToRender=f;class v{constructor(u,d){this.className=u,this.zIndex=d}}e.LineDecorationToRender=v;class m{constructor(){this.decorations=[]}add(u){this.decorations.push(u)}getDecorations(){return this.decorations}}e.VisibleLineDecorationsToRender=m;class S extends b.DynamicViewOverlay{_render(u,d,p){const c=[];for(let g=u;g<=d;g++){const w=g-u;c[w]=new m}if(p.length===0)return c;p.sort((g,w)=>g.className===w.className?g.startLineNumber===w.startLineNumber?g.endLineNumber-w.endLineNumber:g.startLineNumber-w.startLineNumber:g.className<w.className?-1:1);let l=null,n=0;for(let g=0,w=p.length;g<w;g++){const E=p[g],C=E.className,I=E.zIndex;let _=Math.max(E.startLineNumber,u)-u;const A=Math.min(E.endLineNumber,d)-u;l===C?(_=Math.max(n+1,_),n=Math.max(n,A)):(l=C,n=A);for(let k=_;k<=n;k++)c[k].add(new v(C,I))}return c}}e.DedupOverlay=S;class h extends D.ViewPart{constructor(u){super(u),this._widgets={},this._context=u;const d=this._context.configuration.options,p=d.get(142);this.domNode=(0,t.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("glyph-margin-widgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this._lineHeight=d.get(65),this._glyphMargin=d.get(56),this._glyphMarginLeft=p.glyphMarginLeft,this._glyphMarginWidth=p.glyphMarginWidth,this._glyphMarginDecorationLaneCount=p.glyphMarginDecorationLaneCount,this._managedDomNodes=[],this._decorationGlyphsToRender=[]}dispose(){this._managedDomNodes=[],this._decorationGlyphsToRender=[],this._widgets={},super.dispose()}getWidgets(){return Object.values(this._widgets)}onConfigurationChanged(u){const d=this._context.configuration.options,p=d.get(142);return this._lineHeight=d.get(65),this._glyphMargin=d.get(56),this._glyphMarginLeft=p.glyphMarginLeft,this._glyphMarginWidth=p.glyphMarginWidth,this._glyphMarginDecorationLaneCount=p.glyphMarginDecorationLaneCount,!0}onDecorationsChanged(u){return!0}onFlushed(u){return!0}onLinesChanged(u){return!0}onLinesDeleted(u){return!0}onLinesInserted(u){return!0}onScrollChanged(u){return u.scrollTopChanged}onZonesChanged(u){return!0}addWidget(u){const d=(0,t.createFastDomNode)(u.getDomNode());this._widgets[u.getId()]={widget:u,preference:u.getPosition(),domNode:d,renderInfo:null},d.setPosition("absolute"),d.setDisplay("none"),d.setAttribute("widgetId",u.getId()),this.domNode.appendChild(d),this.setShouldRender()}setWidgetPosition(u,d){const p=this._widgets[u.getId()];return p.preference.lane===d.lane&&p.preference.zIndex===d.zIndex&&T.Range.equalsRange(p.preference.range,d.range)?!1:(p.preference=d,this.setShouldRender(),!0)}removeWidget(u){const d=u.getId();if(this._widgets[d]){const c=this._widgets[d].domNode.domNode;delete this._widgets[d],c.parentNode?.removeChild(c),this.setShouldRender()}}_collectDecorationBasedGlyphRenderRequest(u,d){const p=u.visibleRange.startLineNumber,c=u.visibleRange.endLineNumber,l=u.getDecorationsInViewport();for(const n of l){const g=n.options.glyphMarginClassName;if(!g)continue;const w=Math.max(n.range.startLineNumber,p),E=Math.min(n.range.endLineNumber,c),C=Math.min(n.options.glyphMargin?.position??1,this._glyphMarginDecorationLaneCount),I=n.options.zIndex??0;for(let _=w;_<=E;_++)d.push(new r(_,C,I,g))}}_collectWidgetBasedGlyphRenderRequest(u,d){const p=u.visibleRange.startLineNumber,c=u.visibleRange.endLineNumber;for(const l of Object.values(this._widgets)){const n=l.preference.range;if(n.endLineNumber<p||n.startLineNumber>c)continue;const g=Math.max(n.startLineNumber,p),w=Math.min(l.preference.lane,this._glyphMarginDecorationLaneCount);d.push(new i(g,w,l.preference.zIndex,l))}}_collectSortedGlyphRenderRequests(u){const d=[];return this._collectDecorationBasedGlyphRenderRequest(u,d),this._collectWidgetBasedGlyphRenderRequest(u,d),d.sort((p,c)=>p.lineNumber===c.lineNumber?p.lane===c.lane?p.zIndex===c.zIndex?c.type===p.type?p.type===0&&c.type===0?p.className<c.className?-1:1:0:c.type-p.type:c.zIndex-p.zIndex:p.lane-c.lane:p.lineNumber-c.lineNumber),d}prepareRender(u){if(!this._glyphMargin){this._decorationGlyphsToRender=[];return}for(const c of Object.values(this._widgets))c.renderInfo=null;const d=new y.ArrayQueue(this._collectSortedGlyphRenderRequests(u)),p=[];for(;d.length>0;){const c=d.peek();if(!c)break;const l=d.takeWhile(g=>g.lineNumber===c.lineNumber&&g.lane===c.lane);if(!l||l.length===0)break;const n=l[0];if(n.type===0){const g=[];for(const w of l){if(w.zIndex!==n.zIndex||w.type!==n.type)break;(g.length===0||g[g.length-1]!==w.className)&&g.push(w.className)}p.push(n.accept(g.join(" ")))}else n.widget.renderInfo={lineNumber:n.lineNumber,lane:n.lane}}this._decorationGlyphsToRender=p}render(u){if(!this._glyphMargin){for(const p of Object.values(this._widgets))p.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;)this._managedDomNodes.pop()?.domNode.remove();return}const d=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const p of Object.values(this._widgets))if(!p.renderInfo)p.domNode.setDisplay("none");else{const c=u.viewportData.relativeVerticalOffset[p.renderInfo.lineNumber-u.viewportData.startLineNumber],l=this._glyphMarginLeft+(p.renderInfo.lane-1)*this._lineHeight;p.domNode.setDisplay("block"),p.domNode.setTop(c),p.domNode.setLeft(l),p.domNode.setWidth(d),p.domNode.setHeight(this._lineHeight)}for(let p=0;p<this._decorationGlyphsToRender.length;p++){const c=this._decorationGlyphsToRender[p],l=u.viewportData.relativeVerticalOffset[c.lineNumber-u.viewportData.startLineNumber],n=this._glyphMarginLeft+(c.lane-1)*this._lineHeight;let g;p<this._managedDomNodes.length?g=this._managedDomNodes[p]:(g=(0,t.createFastDomNode)(document.createElement("div")),this._managedDomNodes.push(g),this.domNode.appendChild(g)),g.setClassName("cgmr codicon "+c.combinedClassName),g.setPosition("absolute"),g.setTop(l),g.setLeft(n),g.setWidth(d),g.setHeight(this._lineHeight)}for(;this._managedDomNodes.length>this._decorationGlyphsToRender.length;)this._managedDomNodes.pop()?.domNode.remove()}}e.GlyphMarginWidgets=h;var a;(function(o){o[o.Decoration=0]="Decoration",o[o.Widget=1]="Widget"})(a||(a={}));class r{constructor(u,d,p,c){this.lineNumber=u,this.lane=d,this.zIndex=p,this.className=c,this.type=0}accept(u){return new s(this.lineNumber,this.lane,u)}}class i{constructor(u,d,p,c){this.lineNumber=u,this.lane=d,this.zIndex=p,this.widget=c,this.type=1}}class s{constructor(u,d,p){this.lineNumber=u,this.lane=d,this.combinedClassName=p}}}),define(Q[1894],Y([1,0,804,1706]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesDecorationsOverlay=void 0;class y extends t.DedupOverlay{constructor(D){super(),this._context=D;const f=this._context.configuration.options.get(142);this._decorationsLeft=f.decorationsLeft,this._decorationsWidth=f.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(D){const f=this._context.configuration.options.get(142);return this._decorationsLeft=f.decorationsLeft,this._decorationsWidth=f.decorationsWidth,!0}onDecorationsChanged(D){return!0}onFlushed(D){return!0}onLinesChanged(D){return!0}onLinesDeleted(D){return!0}onLinesInserted(D){return!0}onScrollChanged(D){return D.scrollTopChanged}onZonesChanged(D){return!0}_getDecorations(D){const T=D.getDecorationsInViewport(),f=[];let v=0;for(let m=0,S=T.length;m<S;m++){const h=T[m],a=h.options.linesDecorationsClassName,r=h.options.zIndex;a&&(f[v++]=new t.DecorationToRender(h.range.startLineNumber,h.range.endLineNumber,a,r));const i=h.options.firstLineDecorationClassName;i&&(f[v++]=new t.DecorationToRender(h.range.startLineNumber,h.range.startLineNumber,i,r))}return f}prepareRender(D){const T=D.visibleRange.startLineNumber,f=D.visibleRange.endLineNumber,v=this._render(T,f,this._getDecorations(D)),m=this._decorationsLeft.toString(),S=this._decorationsWidth.toString(),h='" style="left:'+m+"px;width:"+S+'px;"></div>',a=[];for(let r=T;r<=f;r++){const i=r-T,s=v[i].getDecorations();let o="";for(const u of s)o+='<div class="cldr '+u.className+h;a[i]=o}this._renderResult=a}render(D,T){return this._renderResult?this._renderResult[T-D]:""}}e.LinesDecorationsOverlay=y}),define(Q[1084],Y([1,0,140,239,1707]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Margin=void 0;class b extends y.ViewPart{static{this.CLASS_NAME="glyph-margin"}static{this.OUTER_CLASS_NAME="margin"}constructor(T){super(T);const f=this._context.configuration.options,v=f.get(142);this._canUseLayerHinting=!f.get(31),this._contentLeft=v.contentLeft,this._glyphMarginLeft=v.glyphMarginLeft,this._glyphMarginWidth=v.glyphMarginWidth,this._domNode=(0,t.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(b.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,t.createFastDomNode)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(b.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(T){const f=this._context.configuration.options,v=f.get(142);return this._canUseLayerHinting=!f.get(31),this._contentLeft=v.contentLeft,this._glyphMarginLeft=v.glyphMarginLeft,this._glyphMarginWidth=v.glyphMarginWidth,!0}onScrollChanged(T){return super.onScrollChanged(T)||T.scrollTopChanged}prepareRender(T){}render(T){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const f=T.scrollTop-T.bigNumbersDelta;this._domNode.setTop(-f);const v=Math.min(T.scrollHeight,1e6);this._domNode.setHeight(v),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(v)}}e.Margin=b}),define(Q[1895],Y([1,0,804,1708]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewLineDecorationsOverlay=void 0;class y extends t.DedupOverlay{constructor(D){super(),this._context=D,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(D){return!0}onDecorationsChanged(D){return!0}onFlushed(D){return!0}onLinesChanged(D){return!0}onLinesDeleted(D){return!0}onLinesInserted(D){return!0}onScrollChanged(D){return D.scrollTopChanged}onZonesChanged(D){return!0}_getDecorations(D){const T=D.getDecorationsInViewport(),f=[];let v=0;for(let m=0,S=T.length;m<S;m++){const h=T[m],a=h.options.marginClassName,r=h.options.zIndex;a&&(f[v++]=new t.DecorationToRender(h.range.startLineNumber,h.range.endLineNumber,a,r))}return f}prepareRender(D){const T=D.visibleRange.startLineNumber,f=D.visibleRange.endLineNumber,v=this._render(T,f,this._getDecorations(D)),m=[];for(let S=T;S<=f;S++){const h=S-T,a=v[h].getDecorations();let r="";for(const i of a)r+='<div class="cmdr '+i.className+'" style=""></div>';m[h]=r}this._renderResult=m}render(D,T){return this._renderResult?this._renderResult[T-D]:""}}e.MarginViewLineDecorationsOverlay=y}),define(Q[1896],Y([1,0,140,239,1710]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOverlayWidgets=void 0;class b extends y.ViewPart{constructor(T){super(T);const v=this._context.configuration.options.get(142);this._widgets={},this._verticalScrollbarWidth=v.verticalScrollbarWidth,this._minimapWidth=v.minimap.minimapWidth,this._horizontalScrollbarHeight=v.horizontalScrollbarHeight,this._editorHeight=v.height,this._editorWidth=v.width,this._domNode=(0,t.createFastDomNode)(document.createElement("div")),y.PartFingerprints.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(T){const v=this._context.configuration.options.get(142);return this._verticalScrollbarWidth=v.verticalScrollbarWidth,this._minimapWidth=v.minimap.minimapWidth,this._horizontalScrollbarHeight=v.horizontalScrollbarHeight,this._editorHeight=v.height,this._editorWidth=v.width,!0}addWidget(T){const f=(0,t.createFastDomNode)(T.getDomNode());this._widgets[T.getId()]={widget:T,preference:null,domNode:f},f.setPosition("absolute"),f.setAttribute("widgetId",T.getId()),this._domNode.appendChild(f),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(T,f){const v=this._widgets[T.getId()];return v.preference===f?(this._updateMaxMinWidth(),!1):(v.preference=f,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(T){const f=T.getId();if(this._widgets.hasOwnProperty(f)){const m=this._widgets[f].domNode.domNode;delete this._widgets[f],m.parentNode.removeChild(m),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let T=0;const f=Object.keys(this._widgets);for(let v=0,m=f.length;v<m;v++){const S=f[v],a=this._widgets[S].widget.getMinContentWidthInPx?.();typeof a<"u"&&(T=Math.max(T,a))}this._context.viewLayout.setOverlayWidgetsMinWidth(T)}_renderWidget(T){const f=T.domNode;if(T.preference===null){f.setTop("");return}if(T.preference===0)f.setTop(0),f.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(T.preference===1){const v=f.domNode.clientHeight;f.setTop(this._editorHeight-v-2*this._horizontalScrollbarHeight),f.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else T.preference===2&&(f.setTop(0),f.domNode.style.right="50%")}prepareRender(T){}render(T){this._domNode.setWidth(this._editorWidth);const f=Object.keys(this._widgets);for(let v=0,m=f.length;v<m;v++){const S=f[v];this._renderWidget(this._widgets[S])}}}e.ViewOverlayWidgets=b}),define(Q[1897],Y([1,0,140,239,1711]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rulers=void 0;class b extends y.ViewPart{constructor(T){super(T),this.domNode=(0,t.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const f=this._context.configuration.options;this._rulers=f.get(100),this._typicalHalfwidthCharacterWidth=f.get(49).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(T){const f=this._context.configuration.options;return this._rulers=f.get(100),this._typicalHalfwidthCharacterWidth=f.get(49).typicalHalfwidthCharacterWidth,!0}onScrollChanged(T){return T.scrollHeightChanged}prepareRender(T){}_ensureRulersCount(){const T=this._renderedRulers.length,f=this._rulers.length;if(T===f)return;if(T<f){const{tabSize:m}=this._context.viewModel.model.getOptions(),S=m;let h=f-T;for(;h>0;){const a=(0,t.createFastDomNode)(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(S),this.domNode.appendChild(a),this._renderedRulers.push(a),h--}return}let v=T-f;for(;v>0;){const m=this._renderedRulers.pop();this.domNode.removeChild(m),v--}}render(T){this._ensureRulersCount();for(let f=0,v=this._rulers.length;f<v;f++){const m=this._renderedRulers[f],S=this._rulers[f];m.setBoxShadow(S.color?`1px 0 0 0 ${S.color} inset`:""),m.setHeight(Math.min(T.scrollHeight,1e6)),m.setLeft(S.column*this._typicalHalfwidthCharacterWidth)}}}e.Rulers=b}),define(Q[1898],Y([1,0,140,239,1712]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollDecorationViewPart=void 0;class b extends y.ViewPart{constructor(T){super(T),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const v=this._context.configuration.options.get(101);this._useShadows=v.useShadows,this._domNode=(0,t.createFastDomNode)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const T=this._useShadows&&this._scrollTop>0;return this._shouldShow!==T?(this._shouldShow=T,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const f=this._context.configuration.options.get(142);f.minimap.renderMinimap===0||f.minimap.minimapWidth>0&&f.minimap.minimapLeft===0?this._width=f.width:this._width=f.width-f.verticalScrollbarWidth}onConfigurationChanged(T){const v=this._context.configuration.options.get(101);return this._useShadows=v.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(T){return this._scrollTop=T.scrollTop,this._updateShouldShow()}prepareRender(T){}render(T){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}e.ScrollDecorationViewPart=b}),define(Q[1899],Y([1,0,140,15,239,51]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZones=void 0;const T=()=>{throw new Error("Invalid change accessor")};class f extends b.ViewPart{constructor(S){super(S);const h=this._context.configuration.options,a=h.get(142);this._lineHeight=h.get(65),this._contentWidth=a.contentWidth,this._contentLeft=a.contentLeft,this.domNode=(0,t.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,t.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 S=this._context.viewLayout.getWhitespaces(),h=new Map;for(const r of S)h.set(r.id,r);let a=!1;return this._context.viewModel.changeWhitespace(r=>{const i=Object.keys(this._zones);for(let s=0,o=i.length;s<o;s++){const u=i[s],d=this._zones[u],p=this._computeWhitespaceProps(d.delegate);d.isInHiddenArea=p.isInHiddenArea;const c=h.get(u);c&&(c.afterLineNumber!==p.afterViewLineNumber||c.height!==p.heightInPx)&&(r.changeOneWhitespace(u,p.afterViewLineNumber,p.heightInPx),this._safeCallOnComputedHeight(d.delegate,p.heightInPx),a=!0)}}),a}onConfigurationChanged(S){const h=this._context.configuration.options,a=h.get(142);return this._lineHeight=h.get(65),this._contentWidth=a.contentWidth,this._contentLeft=a.contentLeft,S.hasChanged(65)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(S){return this._recomputeWhitespacesProps()}onLinesDeleted(S){return!0}onScrollChanged(S){return S.scrollTopChanged||S.scrollWidthChanged}onZonesChanged(S){return!0}onLinesInserted(S){return!0}_getZoneOrdinal(S){return S.ordinal??S.afterColumn??1e4}_computeWhitespaceProps(S){if(S.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(S),minWidthInPx:this._minWidthInPixels(S)};let h;if(typeof S.afterColumn<"u")h=this._context.viewModel.model.validatePosition({lineNumber:S.afterLineNumber,column:S.afterColumn});else{const s=this._context.viewModel.model.validatePosition({lineNumber:S.afterLineNumber,column:1}).lineNumber;h=new D.Position(s,this._context.viewModel.model.getLineMaxColumn(s))}let a;h.column===this._context.viewModel.model.getLineMaxColumn(h.lineNumber)?a=this._context.viewModel.model.validatePosition({lineNumber:h.lineNumber+1,column:1}):a=this._context.viewModel.model.validatePosition({lineNumber:h.lineNumber,column:h.column+1});const r=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(h,S.afterColumnAffinity,!0),i=S.showInHiddenAreas||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(a);return{isInHiddenArea:!i,afterViewLineNumber:r.lineNumber,heightInPx:i?this._heightInPixels(S):0,minWidthInPx:this._minWidthInPixels(S)}}changeViewZones(S){let h=!1;return this._context.viewModel.changeWhitespace(a=>{const r={addZone:i=>(h=!0,this._addZone(a,i)),removeZone:i=>{i&&(h=this._removeZone(a,i)||h)},layoutZone:i=>{i&&(h=this._layoutZone(a,i)||h)}};v(S,r),r.addZone=T,r.removeZone=T,r.layoutZone=T}),h}_addZone(S,h){const a=this._computeWhitespaceProps(h),i={whitespaceId:S.insertWhitespace(a.afterViewLineNumber,this._getZoneOrdinal(h),a.heightInPx,a.minWidthInPx),delegate:h,isInHiddenArea:a.isInHiddenArea,isVisible:!1,domNode:(0,t.createFastDomNode)(h.domNode),marginDomNode:h.marginDomNode?(0,t.createFastDomNode)(h.marginDomNode):null};return this._safeCallOnComputedHeight(i.delegate,a.heightInPx),i.domNode.setPosition("absolute"),i.domNode.domNode.style.width="100%",i.domNode.setDisplay("none"),i.domNode.setAttribute("monaco-view-zone",i.whitespaceId),this.domNode.appendChild(i.domNode),i.marginDomNode&&(i.marginDomNode.setPosition("absolute"),i.marginDomNode.domNode.style.width="100%",i.marginDomNode.setDisplay("none"),i.marginDomNode.setAttribute("monaco-view-zone",i.whitespaceId),this.marginDomNode.appendChild(i.marginDomNode)),this._zones[i.whitespaceId]=i,this.setShouldRender(),i.whitespaceId}_removeZone(S,h){if(this._zones.hasOwnProperty(h)){const a=this._zones[h];return delete this._zones[h],S.removeWhitespace(a.whitespaceId),a.domNode.removeAttribute("monaco-visible-view-zone"),a.domNode.removeAttribute("monaco-view-zone"),a.domNode.domNode.parentNode.removeChild(a.domNode.domNode),a.marginDomNode&&(a.marginDomNode.removeAttribute("monaco-visible-view-zone"),a.marginDomNode.removeAttribute("monaco-view-zone"),a.marginDomNode.domNode.parentNode.removeChild(a.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(S,h){if(this._zones.hasOwnProperty(h)){const a=this._zones[h],r=this._computeWhitespaceProps(a.delegate);return a.isInHiddenArea=r.isInHiddenArea,S.changeOneWhitespace(a.whitespaceId,r.afterViewLineNumber,r.heightInPx),this._safeCallOnComputedHeight(a.delegate,r.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(S){return this._zones.hasOwnProperty(S)?!!this._zones[S].delegate.suppressMouseDown:!1}_heightInPixels(S){return typeof S.heightInPx=="number"?S.heightInPx:typeof S.heightInLines=="number"?this._lineHeight*S.heightInLines:this._lineHeight}_minWidthInPixels(S){return typeof S.minWidthInPx=="number"?S.minWidthInPx:0}_safeCallOnComputedHeight(S,h){if(typeof S.onComputedHeight=="function")try{S.onComputedHeight(h)}catch(a){(0,y.onUnexpectedError)(a)}}_safeCallOnDomNodeTop(S,h){if(typeof S.onDomNodeTop=="function")try{S.onDomNodeTop(h)}catch(a){(0,y.onUnexpectedError)(a)}}prepareRender(S){}render(S){const h=S.viewportData.whitespaceViewportData,a={};let r=!1;for(const s of h)this._zones[s.id].isInHiddenArea||(a[s.id]=s,r=!0);const i=Object.keys(this._zones);for(let s=0,o=i.length;s<o;s++){const u=i[s],d=this._zones[u];let p=0,c=0,l="none";a.hasOwnProperty(u)?(p=a[u].verticalOffset-S.bigNumbersDelta,c=a[u].height,l="block",d.isVisible||(d.domNode.setAttribute("monaco-visible-view-zone","true"),d.isVisible=!0),this._safeCallOnDomNodeTop(d.delegate,S.getScrolledTopFromAbsoluteTop(a[u].verticalOffset))):(d.isVisible&&(d.domNode.removeAttribute("monaco-visible-view-zone"),d.isVisible=!1),this._safeCallOnDomNodeTop(d.delegate,S.getScrolledTopFromAbsoluteTop(-1e6))),d.domNode.setTop(p),d.domNode.setHeight(c),d.domNode.setDisplay(l),d.marginDomNode&&(d.marginDomNode.setTop(p),d.marginDomNode.setHeight(c),d.marginDomNode.setDisplay(l))}r&&(this.domNode.setWidth(Math.max(S.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}e.ViewZones=f;function v(m,S){try{return m(S)}catch(h){(0,y.onUnexpectedError)(h)}}}),define(Q[805],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZonesChangedEvent=e.ViewTokensColorsChangedEvent=e.ViewTokensChangedEvent=e.ViewThemeChangedEvent=e.ViewScrollChangedEvent=e.ViewRevealRangeRequestEvent=e.VerticalRevealType=e.ViewLinesInsertedEvent=e.ViewLinesDeletedEvent=e.ViewLinesChangedEvent=e.ViewLineMappingChangedEvent=e.ViewLanguageConfigurationEvent=e.ViewFocusChangedEvent=e.ViewFlushedEvent=e.ViewDecorationsChangedEvent=e.ViewCursorStateChangedEvent=e.ViewConfigurationChangedEvent=e.ViewCompositionEndEvent=e.ViewCompositionStartEvent=e.ViewEventType=void 0;var t;(function(n){n[n.ViewCompositionStart=0]="ViewCompositionStart",n[n.ViewCompositionEnd=1]="ViewCompositionEnd",n[n.ViewConfigurationChanged=2]="ViewConfigurationChanged",n[n.ViewCursorStateChanged=3]="ViewCursorStateChanged",n[n.ViewDecorationsChanged=4]="ViewDecorationsChanged",n[n.ViewFlushed=5]="ViewFlushed",n[n.ViewFocusChanged=6]="ViewFocusChanged",n[n.ViewLanguageConfigurationChanged=7]="ViewLanguageConfigurationChanged",n[n.ViewLineMappingChanged=8]="ViewLineMappingChanged",n[n.ViewLinesChanged=9]="ViewLinesChanged",n[n.ViewLinesDeleted=10]="ViewLinesDeleted",n[n.ViewLinesInserted=11]="ViewLinesInserted",n[n.ViewRevealRangeRequest=12]="ViewRevealRangeRequest",n[n.ViewScrollChanged=13]="ViewScrollChanged",n[n.ViewThemeChanged=14]="ViewThemeChanged",n[n.ViewTokensChanged=15]="ViewTokensChanged",n[n.ViewTokensColorsChanged=16]="ViewTokensColorsChanged",n[n.ViewZonesChanged=17]="ViewZonesChanged"})(t||(e.ViewEventType=t={}));class y{constructor(){this.type=0}}e.ViewCompositionStartEvent=y;class b{constructor(){this.type=1}}e.ViewCompositionEndEvent=b;class D{constructor(g){this.type=2,this._source=g}hasChanged(g){return this._source.hasChanged(g)}}e.ViewConfigurationChangedEvent=D;class T{constructor(g,w,E){this.selections=g,this.modelSelections=w,this.reason=E,this.type=3}}e.ViewCursorStateChangedEvent=T;class f{constructor(g){this.type=4,g?(this.affectsMinimap=g.affectsMinimap,this.affectsOverviewRuler=g.affectsOverviewRuler,this.affectsGlyphMargin=g.affectsGlyphMargin):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0)}}e.ViewDecorationsChangedEvent=f;class v{constructor(){this.type=5}}e.ViewFlushedEvent=v;class m{constructor(g){this.type=6,this.isFocused=g}}e.ViewFocusChangedEvent=m;class S{constructor(){this.type=7}}e.ViewLanguageConfigurationEvent=S;class h{constructor(){this.type=8}}e.ViewLineMappingChangedEvent=h;class a{constructor(g,w){this.fromLineNumber=g,this.count=w,this.type=9}}e.ViewLinesChangedEvent=a;class r{constructor(g,w){this.type=10,this.fromLineNumber=g,this.toLineNumber=w}}e.ViewLinesDeletedEvent=r;class i{constructor(g,w){this.type=11,this.fromLineNumber=g,this.toLineNumber=w}}e.ViewLinesInsertedEvent=i;var s;(function(n){n[n.Simple=0]="Simple",n[n.Center=1]="Center",n[n.CenterIfOutsideViewport=2]="CenterIfOutsideViewport",n[n.Top=3]="Top",n[n.Bottom=4]="Bottom",n[n.NearTop=5]="NearTop",n[n.NearTopIfOutsideViewport=6]="NearTopIfOutsideViewport"})(s||(e.VerticalRevealType=s={}));class o{constructor(g,w,E,C,I,_,A){this.source=g,this.minimalReveal=w,this.range=E,this.selections=C,this.verticalType=I,this.revealHorizontal=_,this.scrollType=A,this.type=12}}e.ViewRevealRangeRequestEvent=o;class u{constructor(g){this.type=13,this.scrollWidth=g.scrollWidth,this.scrollLeft=g.scrollLeft,this.scrollHeight=g.scrollHeight,this.scrollTop=g.scrollTop,this.scrollWidthChanged=g.scrollWidthChanged,this.scrollLeftChanged=g.scrollLeftChanged,this.scrollHeightChanged=g.scrollHeightChanged,this.scrollTopChanged=g.scrollTopChanged}}e.ViewScrollChangedEvent=u;class d{constructor(g){this.theme=g,this.type=14}}e.ViewThemeChangedEvent=d;class p{constructor(g){this.type=15,this.ranges=g}}e.ViewTokensChangedEvent=p;class c{constructor(){this.type=16}}e.ViewTokensColorsChangedEvent=c;class l{constructor(){this.type=17}}e.ViewZonesChangedEvent=l}),define(Q[491],Y([1,0,33]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDecorationsNormalizer=e.DecorationSegment=e.LineDecoration=void 0;class y{constructor(v,m,S,h){this.startColumn=v,this.endColumn=m,this.className=S,this.type=h,this._lineDecorationBrand=void 0}static _equals(v,m){return v.startColumn===m.startColumn&&v.endColumn===m.endColumn&&v.className===m.className&&v.type===m.type}static equalsArr(v,m){const S=v.length,h=m.length;if(S!==h)return!1;for(let a=0;a<S;a++)if(!y._equals(v[a],m[a]))return!1;return!0}static extractWrapped(v,m,S){if(v.length===0)return v;const h=m+1,a=S+1,r=S-m,i=[];let s=0;for(const o of v)o.endColumn<=h||o.startColumn>=a||(i[s++]=new y(Math.max(1,o.startColumn-h+1),Math.min(r+1,o.endColumn-h+1),o.className,o.type));return i}static filter(v,m,S,h){if(v.length===0)return[];const a=[];let r=0;for(let i=0,s=v.length;i<s;i++){const o=v[i],u=o.range;if(u.endLineNumber<m||u.startLineNumber>m||u.isEmpty()&&(o.type===0||o.type===3))continue;const d=u.startLineNumber===m?u.startColumn:S,p=u.endLineNumber===m?u.endColumn:h;a[r++]=new y(d,p,o.inlineClassName,o.type)}return a}static _typeCompare(v,m){const S=[2,0,1,3];return S[v]-S[m]}static compare(v,m){if(v.startColumn!==m.startColumn)return v.startColumn-m.startColumn;if(v.endColumn!==m.endColumn)return v.endColumn-m.endColumn;const S=y._typeCompare(v.type,m.type);return S!==0?S:v.className!==m.className?v.className<m.className?-1:1:0}}e.LineDecoration=y;class b{constructor(v,m,S,h){this.startOffset=v,this.endOffset=m,this.className=S,this.metadata=h}}e.DecorationSegment=b;class D{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(v){let m=0;for(let S=0,h=v.length;S<h;S++)m|=v[S];return m}consumeLowerThan(v,m,S){for(;this.count>0&&this.stopOffsets[0]<v;){let h=0;for(;h+1<this.count&&this.stopOffsets[h]===this.stopOffsets[h+1];)h++;S.push(new b(m,this.stopOffsets[h],this.classNames.join(" "),D._metadata(this.metadata))),m=this.stopOffsets[h]+1,this.stopOffsets.splice(0,h+1),this.classNames.splice(0,h+1),this.metadata.splice(0,h+1),this.count-=h+1}return this.count>0&&m<v&&(S.push(new b(m,v-1,this.classNames.join(" "),D._metadata(this.metadata))),m=v),m}insert(v,m,S){if(this.count===0||this.stopOffsets[this.count-1]<=v)this.stopOffsets.push(v),this.classNames.push(m),this.metadata.push(S);else for(let h=0;h<this.count;h++)if(this.stopOffsets[h]>=v){this.stopOffsets.splice(h,0,v),this.classNames.splice(h,0,m),this.metadata.splice(h,0,S);break}this.count++}}class T{static normalize(v,m){if(m.length===0)return[];const S=[],h=new D;let a=0;for(let r=0,i=m.length;r<i;r++){const s=m[r];let o=s.startColumn,u=s.endColumn;const d=s.className,p=s.type===1?2:s.type===2?4:0;if(o>1){const n=v.charCodeAt(o-2);t.isHighSurrogate(n)&&o--}if(u>1){const n=v.charCodeAt(u-2);t.isHighSurrogate(n)&&u--}const c=o-1,l=u-2;a=h.consumeLowerThan(c,a,S),h.count===0&&(a=c),h.insert(l,d,p)}return h.consumeLowerThan(1073741824,a,S),S}}e.LineDecorationsNormalizer=T}),define(Q[1900],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinePart=e.LinePartMetadata=void 0;var t;(function(b){b[b.IS_WHITESPACE=1]="IS_WHITESPACE",b[b.PSEUDO_BEFORE=2]="PSEUDO_BEFORE",b[b.PSEUDO_AFTER=4]="PSEUDO_AFTER",b[b.IS_WHITESPACE_MASK=1]="IS_WHITESPACE_MASK",b[b.PSEUDO_BEFORE_MASK=2]="PSEUDO_BEFORE_MASK",b[b.PSEUDO_AFTER_MASK=4]="PSEUDO_AFTER_MASK"})(t||(e.LinePartMetadata=t={}));class y{constructor(D,T,f,v){this.endIndex=D,this.type=T,this.metadata=f,this.containsRTL=v,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}e.LinePart=y}),define(Q[1901],Y([1,0,33]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesLayout=e.EditorWhitespace=void 0;class y{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(f){this._hasPending=!0,this._inserts.push(f)}change(f){this._hasPending=!0,this._changes.push(f)}remove(f){this._hasPending=!0,this._removes.push(f)}mustCommit(){return this._hasPending}commit(f){if(!this._hasPending)return;const v=this._inserts,m=this._changes,S=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],f._commitPendingChanges(v,m,S)}}class b{constructor(f,v,m,S,h){this.id=f,this.afterLineNumber=v,this.ordinal=m,this.height=S,this.minWidth=h,this.prefixSum=0}}e.EditorWhitespace=b;class D{static{this.INSTANCE_COUNT=0}constructor(f,v,m,S){this._instanceId=t.singleLetterHash(++D.INSTANCE_COUNT),this._pendingChanges=new y,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=f,this._lineHeight=v,this._paddingTop=m,this._paddingBottom=S}static findInsertionIndex(f,v,m){let S=0,h=f.length;for(;S<h;){const a=S+h>>>1;v===f[a].afterLineNumber?m<f[a].ordinal?h=a:S=a+1:v<f[a].afterLineNumber?h=a:S=a+1}return S}setLineHeight(f){this._checkPendingChanges(),this._lineHeight=f}setPadding(f,v){this._paddingTop=f,this._paddingBottom=v}onFlushed(f){this._checkPendingChanges(),this._lineCount=f}changeWhitespace(f){let v=!1;try{f({insertWhitespace:(S,h,a,r)=>{v=!0,S=S|0,h=h|0,a=a|0,r=r|0;const i=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new b(i,S,h,a,r)),i},changeOneWhitespace:(S,h,a)=>{v=!0,h=h|0,a=a|0,this._pendingChanges.change({id:S,newAfterLineNumber:h,newHeight:a})},removeWhitespace:S=>{v=!0,this._pendingChanges.remove({id:S})}})}finally{this._pendingChanges.commit(this)}return v}_commitPendingChanges(f,v,m){if((f.length>0||m.length>0)&&(this._minWidth=-1),f.length+v.length+m.length<=1){for(const i of f)this._insertWhitespace(i);for(const i of v)this._changeOneWhitespace(i.id,i.newAfterLineNumber,i.newHeight);for(const i of m){const s=this._findWhitespaceIndex(i.id);s!==-1&&this._removeWhitespace(s)}return}const S=new Set;for(const i of m)S.add(i.id);const h=new Map;for(const i of v)h.set(i.id,i);const a=i=>{const s=[];for(const o of i)if(!S.has(o.id)){if(h.has(o.id)){const u=h.get(o.id);o.afterLineNumber=u.newAfterLineNumber,o.height=u.newHeight}s.push(o)}return s},r=a(this._arr).concat(a(f));r.sort((i,s)=>i.afterLineNumber===s.afterLineNumber?i.ordinal-s.ordinal:i.afterLineNumber-s.afterLineNumber),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(f){const v=D.findInsertionIndex(this._arr,f.afterLineNumber,f.ordinal);this._arr.splice(v,0,f),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,v-1)}_findWhitespaceIndex(f){const v=this._arr;for(let m=0,S=v.length;m<S;m++)if(v[m].id===f)return m;return-1}_changeOneWhitespace(f,v,m){const S=this._findWhitespaceIndex(f);if(S!==-1&&(this._arr[S].height!==m&&(this._arr[S].height=m,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,S-1)),this._arr[S].afterLineNumber!==v)){const h=this._arr[S];this._removeWhitespace(S),h.afterLineNumber=v,this._insertWhitespace(h)}}_removeWhitespace(f){this._arr.splice(f,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,f-1)}onLinesDeleted(f,v){this._checkPendingChanges(),f=f|0,v=v|0,this._lineCount-=v-f+1;for(let m=0,S=this._arr.length;m<S;m++){const h=this._arr[m].afterLineNumber;f<=h&&h<=v?this._arr[m].afterLineNumber=f-1:h>v&&(this._arr[m].afterLineNumber-=v-f+1)}}onLinesInserted(f,v){this._checkPendingChanges(),f=f|0,v=v|0,this._lineCount+=v-f+1;for(let m=0,S=this._arr.length;m<S;m++){const h=this._arr[m].afterLineNumber;f<=h&&(this._arr[m].afterLineNumber+=v-f+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(f){this._checkPendingChanges(),f=f|0;let v=Math.max(0,this._prefixSumValidIndex+1);v===0&&(this._arr[0].prefixSum=this._arr[0].height,v++);for(let m=v;m<=f;m++)this._arr[m].prefixSum=this._arr[m-1].prefixSum+this._arr[m].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,f),this._arr[f].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const f=this._lineHeight*this._lineCount,v=this.getWhitespacesTotalHeight();return f+v+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(f){this._checkPendingChanges(),f=f|0;const v=this._findLastWhitespaceBeforeLineNumber(f);return v===-1?0:this.getWhitespacesAccumulatedHeight(v)}_findLastWhitespaceBeforeLineNumber(f){f=f|0;const v=this._arr;let m=0,S=v.length-1;for(;m<=S;){const a=(S-m|0)/2|0,r=m+a|0;if(v[r].afterLineNumber<f){if(r+1>=v.length||v[r+1].afterLineNumber>=f)return r;m=r+1|0}else S=r-1|0}return-1}_findFirstWhitespaceAfterLineNumber(f){f=f|0;const m=this._findLastWhitespaceBeforeLineNumber(f)+1;return m<this._arr.length?m:-1}getFirstWhitespaceIndexAfterLineNumber(f){return this._checkPendingChanges(),f=f|0,this._findFirstWhitespaceAfterLineNumber(f)}getVerticalOffsetForLineNumber(f,v=!1){this._checkPendingChanges(),f=f|0;let m;f>1?m=this._lineHeight*(f-1):m=0;const S=this.getWhitespaceAccumulatedHeightBeforeLineNumber(f-(v?1:0));return m+S+this._paddingTop}getVerticalOffsetAfterLineNumber(f,v=!1){this._checkPendingChanges(),f=f|0;const m=this._lineHeight*f,S=this.getWhitespaceAccumulatedHeightBeforeLineNumber(f+(v?1:0));return m+S+this._paddingTop}hasWhitespace(){return this._checkPendingChanges(),this.getWhitespacesCount()>0}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let f=0;for(let v=0,m=this._arr.length;v<m;v++)f=Math.max(f,this._arr[v].minWidth);this._minWidth=f}return this._minWidth}isAfterLines(f){this._checkPendingChanges();const v=this.getLinesTotalHeight();return f>v}isInTopPadding(f){return this._paddingTop===0?!1:(this._checkPendingChanges(),f<this._paddingTop)}isInBottomPadding(f){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const v=this.getLinesTotalHeight();return f>=v-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(f){if(this._checkPendingChanges(),f=f|0,f<0)return 1;const v=this._lineCount|0,m=this._lineHeight;let S=1,h=v;for(;S<h;){const a=(S+h)/2|0,r=this.getVerticalOffsetForLineNumber(a)|0;if(f>=r+m)S=a+1;else{if(f>=r)return a;h=a}}return S>v?v:S}getLinesViewportData(f,v){this._checkPendingChanges(),f=f|0,v=v|0;const m=this._lineHeight,S=this.getLineNumberAtOrAfterVerticalOffset(f)|0,h=this.getVerticalOffsetForLineNumber(S)|0;let a=this._lineCount|0,r=this.getFirstWhitespaceIndexAfterLineNumber(S)|0;const i=this.getWhitespacesCount()|0;let s,o;r===-1?(r=i,o=a+1,s=0):(o=this.getAfterLineNumberForWhitespaceIndex(r)|0,s=this.getHeightForWhitespaceIndex(r)|0);let u=h,d=u;const p=5e5;let c=0;h>=p&&(c=Math.floor(h/p)*p,c=Math.floor(c/m)*m,d-=c);const l=[],n=f+(v-f)/2;let g=-1;for(let I=S;I<=a;I++){if(g===-1){const _=u,A=u+m;(_<=n&&n<A||_>n)&&(g=I)}for(u+=m,l[I-S]=d,d+=m;o===I;)d+=s,u+=s,r++,r>=i?o=a+1:(o=this.getAfterLineNumberForWhitespaceIndex(r)|0,s=this.getHeightForWhitespaceIndex(r)|0);if(u>=v){a=I;break}}g===-1&&(g=a);const w=this.getVerticalOffsetForLineNumber(a)|0;let E=S,C=a;return E<C&&h<f&&E++,E<C&&w+m>v&&C--,{bigNumbersDelta:c,startLineNumber:S,endLineNumber:a,relativeVerticalOffset:l,centeredLineNumber:g,completelyVisibleStartLineNumber:E,completelyVisibleEndLineNumber:C}}getVerticalOffsetForWhitespaceIndex(f){this._checkPendingChanges(),f=f|0;const v=this.getAfterLineNumberForWhitespaceIndex(f);let m;v>=1?m=this._lineHeight*v:m=0;let S;return f>0?S=this.getWhitespacesAccumulatedHeight(f-1):S=0,m+S+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(f){this._checkPendingChanges(),f=f|0;let v=0,m=this.getWhitespacesCount()-1;if(m<0)return-1;const S=this.getVerticalOffsetForWhitespaceIndex(m),h=this.getHeightForWhitespaceIndex(m);if(f>=S+h)return-1;for(;v<m;){const a=Math.floor((v+m)/2),r=this.getVerticalOffsetForWhitespaceIndex(a),i=this.getHeightForWhitespaceIndex(a);if(f>=r+i)v=a+1;else{if(f>=r)return a;m=a}}return v}getWhitespaceAtVerticalOffset(f){this._checkPendingChanges(),f=f|0;const v=this.getWhitespaceIndexAtOrAfterVerticallOffset(f);if(v<0||v>=this.getWhitespacesCount())return null;const m=this.getVerticalOffsetForWhitespaceIndex(v);if(m>f)return null;const S=this.getHeightForWhitespaceIndex(v),h=this.getIdForWhitespaceIndex(v),a=this.getAfterLineNumberForWhitespaceIndex(v);return{id:h,afterLineNumber:a,verticalOffset:m,height:S}}getWhitespaceViewportData(f,v){this._checkPendingChanges(),f=f|0,v=v|0;const m=this.getWhitespaceIndexAtOrAfterVerticallOffset(f),S=this.getWhitespacesCount()-1;if(m<0)return[];const h=[];for(let a=m;a<=S;a++){const r=this.getVerticalOffsetForWhitespaceIndex(a),i=this.getHeightForWhitespaceIndex(a);if(r>=v)break;h.push({id:this.getIdForWhitespaceIndex(a),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(a),verticalOffset:r,height:i})}return h}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(f){return this._checkPendingChanges(),f=f|0,this._arr[f].id}getAfterLineNumberForWhitespaceIndex(f){return this._checkPendingChanges(),f=f|0,this._arr[f].afterLineNumber}getHeightForWhitespaceIndex(f){return this._checkPendingChanges(),f=f|0,this._arr[f].height}}e.LinesLayout=D}),define(Q[1902],Y([1,0,27]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportData=void 0;class y{constructor(D,T,f,v){this.selections=D,this.startLineNumber=T.startLineNumber|0,this.endLineNumber=T.endLineNumber|0,this.relativeVerticalOffset=T.relativeVerticalOffset,this.bigNumbersDelta=T.bigNumbersDelta|0,this.whitespaceViewportData=f,this._model=v,this.visibleRange=new t.Range(T.startLineNumber,this._model.getLineMinColumn(T.startLineNumber),T.endLineNumber,this._model.getLineMaxColumn(T.endLineNumber))}getViewLineRenderingData(D){return this._model.getViewportViewLineRenderingData(this.visibleRange,D)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}e.ViewportData=y}),define(Q[303],Y([1,0,33,27]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRulerDecorationsGroup=e.ViewModelDecoration=e.SingleLineInlineDecoration=e.InlineDecoration=e.InlineDecorationType=e.ViewLineRenderingData=e.ViewLineData=e.MinimapLinesRenderingData=e.Viewport=void 0;class b{constructor(i,s,o,u){this._viewportBrand=void 0,this.top=i|0,this.left=s|0,this.width=o|0,this.height=u|0}}e.Viewport=b;class D{constructor(i,s){this.tabSize=i,this.data=s}}e.MinimapLinesRenderingData=D;class T{constructor(i,s,o,u,d,p,c){this._viewLineDataBrand=void 0,this.content=i,this.continuesWithWrappedLine=s,this.minColumn=o,this.maxColumn=u,this.startVisibleColumn=d,this.tokens=p,this.inlineDecorations=c}}e.ViewLineData=T;class f{constructor(i,s,o,u,d,p,c,l,n,g){this.minColumn=i,this.maxColumn=s,this.content=o,this.continuesWithWrappedLine=u,this.isBasicASCII=f.isBasicASCII(o,p),this.containsRTL=f.containsRTL(o,this.isBasicASCII,d),this.tokens=c,this.inlineDecorations=l,this.tabSize=n,this.startVisibleColumn=g}static isBasicASCII(i,s){return s?t.isBasicASCII(i):!0}static containsRTL(i,s,o){return!s&&o?t.containsRTL(i):!1}}e.ViewLineRenderingData=f;var v;(function(r){r[r.Regular=0]="Regular",r[r.Before=1]="Before",r[r.After=2]="After",r[r.RegularAffectingLetterSpacing=3]="RegularAffectingLetterSpacing"})(v||(e.InlineDecorationType=v={}));class m{constructor(i,s,o){this.range=i,this.inlineClassName=s,this.type=o}}e.InlineDecoration=m;class S{constructor(i,s,o,u){this.startOffset=i,this.endOffset=s,this.inlineClassName=o,this.inlineClassNameAffectsLetterSpacing=u}toInlineDecoration(i){return new m(new y.Range(i,this.startOffset+1,i,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}e.SingleLineInlineDecoration=S;class h{constructor(i,s){this._viewModelDecorationBrand=void 0,this.range=i,this.options=s}}e.ViewModelDecoration=h;class a{constructor(i,s,o){this.color=i,this.zIndex=s,this.data=o}static cmp(i,s){return i.zIndex===s.zIndex?i.color<s.color?-1:i.color>s.color?1:0:i.zIndex-s.zIndex}}e.OverviewRulerDecorationsGroup=a}),define(Q[1903],Y([1,0,368,51,441,303]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createModelLineProjection=void 0;function T(r,i){return r===null?i?v.INSTANCE:m.INSTANCE:new f(r,i)}e.createModelLineProjection=T;class f{constructor(i,s){this._projectionData=i,this._isVisible=s}isVisible(){return this._isVisible}setVisible(i){return this._isVisible=i,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(i,s,o){this._assertVisible();const u=o>0?this._projectionData.breakOffsets[o-1]:0,d=this._projectionData.breakOffsets[o];let p;if(this._projectionData.injectionOffsets!==null){const c=this._projectionData.injectionOffsets.map((n,g)=>new b.LineInjectedText(0,0,n+1,this._projectionData.injectionOptions[g],0));p=b.LineInjectedText.applyInjectedText(i.getLineContent(s),c).substring(u,d)}else p=i.getValueInRange({startLineNumber:s,startColumn:u+1,endLineNumber:s,endColumn:d+1});return o>0&&(p=h(this._projectionData.wrappedTextIndentLength)+p),p}getViewLineLength(i,s,o){return this._assertVisible(),this._projectionData.getLineLength(o)}getViewLineMinColumn(i,s,o){return this._assertVisible(),this._projectionData.getMinOutputOffset(o)+1}getViewLineMaxColumn(i,s,o){return this._assertVisible(),this._projectionData.getMaxOutputOffset(o)+1}getViewLineData(i,s,o){const u=new Array;return this.getViewLinesData(i,s,o,1,0,[!0],u),u[0]}getViewLinesData(i,s,o,u,d,p,c){this._assertVisible();const l=this._projectionData,n=l.injectionOffsets,g=l.injectionOptions;let w=null;if(n){w=[];let C=0,I=0;for(let _=0;_<l.getOutputLineCount();_++){const A=new Array;w[_]=A;const k=_>0?l.breakOffsets[_-1]:0,L=l.breakOffsets[_];for(;I<n.length;){const R=g[I].content.length,M=n[I]+C,N=M+R;if(M>L)break;if(k<N){const P=g[I];if(P.inlineClassName){const x=_>0?l.wrappedTextIndentLength:0,F=x+Math.max(M-k,0),V=x+Math.min(N-k,L-k);F!==V&&A.push(new D.SingleLineInlineDecoration(F,V,P.inlineClassName,P.inlineClassNameAffectsLetterSpacing))}}if(N<=L)C+=R,I++;else break}}}let E;n?E=i.tokenization.getLineTokens(s).withInserted(n.map((C,I)=>({offset:C,text:g[I].content,tokenMetadata:t.LineTokens.defaultTokenMetadata}))):E=i.tokenization.getLineTokens(s);for(let C=o;C<o+u;C++){const I=d+C-o;if(!p[I]){c[I]=null;continue}c[I]=this._getViewLineData(E,w?w[C]:null,C)}}_getViewLineData(i,s,o){this._assertVisible();const u=this._projectionData,d=o>0?u.wrappedTextIndentLength:0,p=o>0?u.breakOffsets[o-1]:0,c=u.breakOffsets[o],l=i.sliceAndInflate(p,c,d);let n=l.getLineContent();o>0&&(n=h(u.wrappedTextIndentLength)+n);const g=this._projectionData.getMinOutputOffset(o)+1,w=n.length+1,E=o+1<this.getViewLineCount(),C=o===0?0:u.breakOffsetsVisibleColumn[o-1];return new D.ViewLineData(n,E,g,w,C,l,s)}getModelColumnOfViewPosition(i,s){return this._assertVisible(),this._projectionData.translateToInputOffset(i,s-1)+1}getViewPositionOfModelPosition(i,s,o=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(s-1,o).toPosition(i)}getViewLineNumberOfModelPosition(i,s){this._assertVisible();const o=this._projectionData.translateToOutputPosition(s-1);return i+o.outputLineIndex}normalizePosition(i,s,o){const u=s.lineNumber-i;return this._projectionData.normalizeOutputPosition(i,s.column-1,o).toPosition(u)}getInjectedTextAt(i,s){return this._projectionData.getInjectedText(i,s-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}}class v{static{this.INSTANCE=new v}constructor(){}isVisible(){return!0}setVisible(i){return i?this:m.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(i,s,o){return i.getLineContent(s)}getViewLineLength(i,s,o){return i.getLineLength(s)}getViewLineMinColumn(i,s,o){return i.getLineMinColumn(s)}getViewLineMaxColumn(i,s,o){return i.getLineMaxColumn(s)}getViewLineData(i,s,o){const u=i.tokenization.getLineTokens(s),d=u.getLineContent();return new D.ViewLineData(d,!1,1,d.length+1,0,u.inflate(),null)}getViewLinesData(i,s,o,u,d,p,c){if(!p[d]){c[d]=null;return}c[d]=this.getViewLineData(i,s,0)}getModelColumnOfViewPosition(i,s){return s}getViewPositionOfModelPosition(i,s){return new y.Position(i,s)}getViewLineNumberOfModelPosition(i,s){return i}normalizePosition(i,s,o){return s}getInjectedTextAt(i,s){return null}}class m{static{this.INSTANCE=new m}constructor(){}isVisible(){return!1}setVisible(i){return i?v.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(i,s,o){throw new Error("Not supported")}getViewLineLength(i,s,o){throw new Error("Not supported")}getViewLineMinColumn(i,s,o){throw new Error("Not supported")}getViewLineMaxColumn(i,s,o){throw new Error("Not supported")}getViewLineData(i,s,o){throw new Error("Not supported")}getViewLinesData(i,s,o,u,d,p,c){throw new Error("Not supported")}getModelColumnOfViewPosition(i,s){throw new Error("Not supported")}getViewPositionOfModelPosition(i,s){throw new Error("Not supported")}getViewLineNumberOfModelPosition(i,s){throw new Error("Not supported")}normalizePosition(i,s,o){throw new Error("Not supported")}getInjectedTextAt(i,s){throw new Error("Not supported")}}const S=[""];function h(r){if(r>=S.length)for(let i=1;i<=r;i++)S[i]=a(i);return S[r]}function a(r){return new Array(r+1).join(" ")}}),define(Q[1904],Y([1,0,33,486,441,1080]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonospaceLineBreaksComputerFactory=void 0;class T{static create(d){return new T(d.get(131),d.get(130))}constructor(d,p){this.classifier=new v(d,p)}createLineBreaksComputer(d,p,c,l,n){const g=[],w=[],E=[];return{addRequest:(C,I,_)=>{g.push(C),w.push(I),E.push(_)},finalize:()=>{const C=d.typicalFullwidthCharacterWidth/d.typicalHalfwidthCharacterWidth,I=[];for(let _=0,A=g.length;_<A;_++){const k=w[_],L=E[_];L&&!L.injectionOptions&&!k?I[_]=h(this.classifier,L,g[_],p,c,C,l,n):I[_]=a(this.classifier,g[_],k,p,c,C,l,n)}return m.length=0,S.length=0,I}}}}e.MonospaceLineBreaksComputerFactory=T;var f;(function(u){u[u.NONE=0]="NONE",u[u.BREAK_BEFORE=1]="BREAK_BEFORE",u[u.BREAK_AFTER=2]="BREAK_AFTER",u[u.BREAK_IDEOGRAPHIC=3]="BREAK_IDEOGRAPHIC"})(f||(f={}));class v extends y.CharacterClassifier{constructor(d,p){super(0);for(let c=0;c<d.length;c++)this.set(d.charCodeAt(c),1);for(let c=0;c<p.length;c++)this.set(p.charCodeAt(c),2)}get(d){return d>=0&&d<256?this._asciiMap[d]:d>=12352&&d<=12543||d>=13312&&d<=19903||d>=19968&&d<=40959?3:this._map.get(d)||this._defaultValue}}let m=[],S=[];function h(u,d,p,c,l,n,g,w){if(l===-1)return null;const E=p.length;if(E<=1)return null;const C=w==="keepAll",I=d.breakOffsets,_=d.breakOffsetsVisibleColumn,A=o(p,c,l,n,g),k=l-A,L=m,R=S;let M=0,N=0,P=0,x=l;const F=I.length;let V=0;if(V>=0){let W=Math.abs(_[V]-x);for(;V+1<F;){const z=Math.abs(_[V+1]-x);if(z>=W)break;W=z,V++}}for(;V<F;){let W=V<0?0:I[V],z=V<0?0:_[V];N>W&&(W=N,z=P);let B=0,K=0,H=0,U=0;if(z<=x){let $=z,ie=W===0?0:p.charCodeAt(W-1),J=W===0?0:u.get(ie),j=!0;for(let ee=W;ee<E;ee++){const X=ee,te=p.charCodeAt(ee);let Z,se;if(t.isHighSurrogate(te)?(ee++,Z=0,se=2):(Z=u.get(te),se=r(te,$,c,n)),X>N&&s(ie,J,te,Z,C)&&(B=X,K=$),$+=se,$>x){X>N?(H=X,U=$-se):(H=ee+1,U=$),$-K>k&&(B=0),j=!1;break}ie=te,J=Z}if(j){M>0&&(L[M]=I[I.length-1],R[M]=_[I.length-1],M++);break}}if(B===0){let $=z,ie=p.charCodeAt(W),J=u.get(ie),j=!1;for(let ee=W-1;ee>=N;ee--){const X=ee+1,te=p.charCodeAt(ee);if(te===9){j=!0;break}let Z,se;if(t.isLowSurrogate(te)?(ee--,Z=0,se=2):(Z=u.get(te),se=t.isFullWidthCharacter(te)?n:1),$<=x){if(H===0&&(H=X,U=$),$<=x-k)break;if(s(te,Z,ie,J,C)){B=X,K=$;break}}$-=se,ie=te,J=Z}if(B!==0){const ee=k-(U-K);if(ee<=c){const X=p.charCodeAt(H);let te;t.isHighSurrogate(X)?te=2:te=r(X,U,c,n),ee-te<0&&(B=0)}}if(j){V--;continue}}if(B===0&&(B=H,K=U),B<=N){const $=p.charCodeAt(N);t.isHighSurrogate($)?(B=N+2,K=P+2):(B=N+1,K=P+r($,P,c,n))}for(N=B,L[M]=B,P=K,R[M]=K,M++,x=K+k;V<0||V<F&&_[V]<K;)V++;let G=Math.abs(_[V]-x);for(;V+1<F;){const $=Math.abs(_[V+1]-x);if($>=G)break;G=$,V++}}return M===0?null:(L.length=M,R.length=M,m=d.breakOffsets,S=d.breakOffsetsVisibleColumn,d.breakOffsets=L,d.breakOffsetsVisibleColumn=R,d.wrappedTextIndentLength=A,d)}function a(u,d,p,c,l,n,g,w){const E=b.LineInjectedText.applyInjectedText(d,p);let C,I;if(p&&p.length>0?(C=p.map(K=>K.options),I=p.map(K=>K.column-1)):(C=null,I=null),l===-1)return C?new D.ModelLineProjectionData(I,C,[E.length],[],0):null;const _=E.length;if(_<=1)return C?new D.ModelLineProjectionData(I,C,[E.length],[],0):null;const A=w==="keepAll",k=o(E,c,l,n,g),L=l-k,R=[],M=[];let N=0,P=0,x=0,F=l,V=E.charCodeAt(0),W=u.get(V),z=r(V,0,c,n),B=1;t.isHighSurrogate(V)&&(z+=1,V=E.charCodeAt(1),W=u.get(V),B++);for(let K=B;K<_;K++){const H=K,U=E.charCodeAt(K);let G,$;t.isHighSurrogate(U)?(K++,G=0,$=2):(G=u.get(U),$=r(U,z,c,n)),s(V,W,U,G,A)&&(P=H,x=z),z+=$,z>F&&((P===0||z-x>L)&&(P=H,x=z-$),R[N]=P,M[N]=x,N++,F=x+L,P=0),V=U,W=G}return N===0&&(!p||p.length===0)?null:(R[N]=_,M[N]=z,new D.ModelLineProjectionData(I,C,R,M,k))}function r(u,d,p,c){return u===9?p-d%p:t.isFullWidthCharacter(u)||u<32?c:1}function i(u,d){return d-u%d}function s(u,d,p,c,l){return p!==32&&(d===2&&c!==2||d!==1&&c===1||!l&&d===3&&c!==2||!l&&c===3&&d!==1)}function o(u,d,p,c,l){let n=0;if(l!==0){const g=t.firstNonWhitespaceIndex(u);if(g!==-1){for(let E=0;E<g;E++){const C=u.charCodeAt(E)===9?i(n,d):1;n+=C}const w=l===3?2:l===2?1:0;for(let E=0;E<w;E++){const C=i(n,d);n+=C}n+c>p&&(n=0)}}return n}}),define(Q[806],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewZoneManager=e.OverviewRulerZone=e.ColorZone=void 0;var t;(function(T){T[T.MINIMUM_HEIGHT=4]="MINIMUM_HEIGHT"})(t||(t={}));class y{constructor(f,v,m){this._colorZoneBrand=void 0,this.from=f|0,this.to=v|0,this.colorId=m|0}static compare(f,v){return f.colorId===v.colorId?f.from===v.from?f.to-v.to:f.from-v.from:f.colorId-v.colorId}}e.ColorZone=y;class b{constructor(f,v,m,S){this._overviewRulerZoneBrand=void 0,this.startLineNumber=f,this.endLineNumber=v,this.heightInLines=m,this.color=S,this._colorZone=null}static compare(f,v){return f.color===v.color?f.startLineNumber===v.startLineNumber?f.heightInLines===v.heightInLines?f.endLineNumber-v.endLineNumber:f.heightInLines-v.heightInLines:f.startLineNumber-v.startLineNumber:f.color<v.color?-1:1}setColorZone(f){this._colorZone=f}getColorZones(){return this._colorZone}}e.OverviewRulerZone=b;class D{constructor(f){this._getVerticalOffsetForLine=f,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(f){this._zones=f,this._zones.sort(b.compare)}setLineHeight(f){return this._lineHeight===f?!1:(this._lineHeight=f,this._colorZonesInvalid=!0,!0)}setPixelRatio(f){this._pixelRatio=f,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(f){return this._domWidth===f?!1:(this._domWidth=f,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(f){return this._domHeight===f?!1:(this._domHeight=f,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(f){return this._outerHeight===f?!1:(this._outerHeight=f,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const f=this._colorZonesInvalid,v=Math.floor(this._lineHeight),m=Math.floor(this.getCanvasHeight()),S=Math.floor(this._outerHeight),h=m/S,a=Math.floor(4*this._pixelRatio/2),r=[];for(let i=0,s=this._zones.length;i<s;i++){const o=this._zones[i];if(!f){const C=o.getColorZones();if(C){r.push(C);continue}}const u=this._getVerticalOffsetForLine(o.startLineNumber),d=o.heightInLines===0?this._getVerticalOffsetForLine(o.endLineNumber)+v:u+o.heightInLines*v,p=Math.floor(h*u),c=Math.floor(h*d);let l=Math.floor((p+c)/2),n=c-l;n<a&&(n=a),l-n<0&&(l=n),l+n>m&&(l=m-n);const g=o.color;let w=this._color2Id[g];w||(w=++this._lastAssignedId,this._color2Id[g]=w,this._id2Color[w]=g);const E=new y(l-n,l+n,w);o.setColorZone(E),r.push(E)}return this._colorZonesInvalid=!1,r.sort(y.compare),r}}e.OverviewZoneManager=D}),define(Q[1905],Y([1,0,140,806,566]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRuler=void 0;class D extends b.ViewEventHandler{constructor(f,v){super(),this._context=f;const m=this._context.configuration.options;this._domNode=(0,t.createFastDomNode)(document.createElement("canvas")),this._domNode.setClassName(v),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new y.OverviewZoneManager(S=>this._context.viewLayout.getVerticalOffsetForLineNumber(S)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(m.get(65)),this._zoneManager.setPixelRatio(m.get(140)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(f){const v=this._context.configuration.options;return f.hasChanged(65)&&(this._zoneManager.setLineHeight(v.get(65)),this._render()),f.hasChanged(140)&&(this._zoneManager.setPixelRatio(v.get(140)),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(f){return this._render(),!0}onScrollChanged(f){return f.scrollHeightChanged&&(this._zoneManager.setOuterHeight(f.scrollHeight),this._render()),!0}onZonesChanged(f){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(f){this._domNode.setTop(f.top),this._domNode.setRight(f.right);let v=!1;v=this._zoneManager.setDOMWidth(f.width)||v,v=this._zoneManager.setDOMHeight(f.height)||v,v&&(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(f){this._zoneManager.setZones(f),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const f=this._zoneManager.getCanvasWidth(),v=this._zoneManager.getCanvasHeight(),m=this._zoneManager.resolveColorZones(),S=this._zoneManager.getId2Color(),h=this._domNode.domNode.getContext("2d");return h.clearRect(0,0,f,v),m.length>0&&this._renderOneLane(h,m,S,f),!0}_renderOneLane(f,v,m,S){let h=0,a=0,r=0;for(const i of v){const s=i.colorId,o=i.from,u=i.to;s!==h?(f.fillRect(0,a,S,r-a),h=s,f.fillStyle=m[h],a=o,r=u):r>=o?r=Math.max(r,u):(f.fillRect(0,a,S,r-a),a=o,r=u)}f.fillRect(0,a,S,r-a)}}e.OverviewRuler=D}),define(Q[1906],Y([1,0,1867]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=void 0;class y{constructor(D,T,f){this.configuration=D,this.theme=new t.EditorTheme(T),this.viewModel=f,this.viewLayout=f.viewLayout}addEventHandler(D){this.viewModel.addViewEventHandler(D)}removeEventHandler(D){this.viewModel.removeViewEventHandler(D)}}e.ViewContext=y}),define(Q[807],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelTokensChangedEvent=e.ModelOptionsChangedEvent=e.ModelContentChangedEvent=e.ModelLanguageConfigurationChangedEvent=e.ModelLanguageChangedEvent=e.ModelDecorationsChangedEvent=e.ReadOnlyEditAttemptEvent=e.CursorStateChangedEvent=e.HiddenAreasChangedEvent=e.ViewZonesChangedEvent=e.ScrollChangedEvent=e.FocusChangedEvent=e.ContentSizeChangedEvent=e.OutgoingViewModelEventKind=e.ViewModelEventsCollector=e.ViewModelEventDispatcher=void 0;class b extends y.Disposable{constructor(){super(),this._onEvent=this._register(new t.Emitter),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(l){this._addOutgoingEvent(l),this._emitOutgoingEvents()}_addOutgoingEvent(l){for(let n=0,g=this._outgoingEvents.length;n<g;n++){const w=this._outgoingEvents[n].kind===l.kind?this._outgoingEvents[n].attemptToMerge(l):null;if(w){this._outgoingEvents[n]=w;return}}this._outgoingEvents.push(l)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const l=this._outgoingEvents.shift();l.isNoOp()||this._onEvent.fire(l)}}addViewEventHandler(l){for(let n=0,g=this._eventHandlers.length;n<g;n++)this._eventHandlers[n]===l&&console.warn("Detected duplicate listener in ViewEventDispatcher",l);this._eventHandlers.push(l)}removeViewEventHandler(l){for(let n=0;n<this._eventHandlers.length;n++)if(this._eventHandlers[n]===l){this._eventHandlers.splice(n,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new D),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const l=this._collector.outgoingEvents,n=this._collector.viewEvents;this._collector=null;for(const g of l)this._addOutgoingEvent(g);n.length>0&&this._emitMany(n)}this._emitOutgoingEvents()}emitSingleViewEvent(l){try{this.beginEmitViewEvents().emitViewEvent(l)}finally{this.endEmitViewEvents()}}_emitMany(l){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(l):this._viewEventQueue=l,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const l=this._viewEventQueue;this._viewEventQueue=null;const n=this._eventHandlers.slice(0);for(const g of n)g.handleEvents(l)}}}e.ViewModelEventDispatcher=b;class D{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(l){this.viewEvents.push(l)}emitOutgoingEvent(l){this.outgoingEvents.push(l)}}e.ViewModelEventsCollector=D;var T;(function(c){c[c.ContentSizeChanged=0]="ContentSizeChanged",c[c.FocusChanged=1]="FocusChanged",c[c.ScrollChanged=2]="ScrollChanged",c[c.ViewZonesChanged=3]="ViewZonesChanged",c[c.HiddenAreasChanged=4]="HiddenAreasChanged",c[c.ReadOnlyEditAttempt=5]="ReadOnlyEditAttempt",c[c.CursorStateChanged=6]="CursorStateChanged",c[c.ModelDecorationsChanged=7]="ModelDecorationsChanged",c[c.ModelLanguageChanged=8]="ModelLanguageChanged",c[c.ModelLanguageConfigurationChanged=9]="ModelLanguageConfigurationChanged",c[c.ModelContentChanged=10]="ModelContentChanged",c[c.ModelOptionsChanged=11]="ModelOptionsChanged",c[c.ModelTokensChanged=12]="ModelTokensChanged"})(T||(e.OutgoingViewModelEventKind=T={}));class f{constructor(l,n,g,w){this.kind=0,this._oldContentWidth=l,this._oldContentHeight=n,this.contentWidth=g,this.contentHeight=w,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(l){return l.kind!==this.kind?null:new f(this._oldContentWidth,this._oldContentHeight,l.contentWidth,l.contentHeight)}}e.ContentSizeChangedEvent=f;class v{constructor(l,n){this.kind=1,this.oldHasFocus=l,this.hasFocus=n}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(l){return l.kind!==this.kind?null:new v(this.oldHasFocus,l.hasFocus)}}e.FocusChangedEvent=v;class m{constructor(l,n,g,w,E,C,I,_){this.kind=2,this._oldScrollWidth=l,this._oldScrollLeft=n,this._oldScrollHeight=g,this._oldScrollTop=w,this.scrollWidth=E,this.scrollLeft=C,this.scrollHeight=I,this.scrollTop=_,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(l){return l.kind!==this.kind?null:new m(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,l.scrollWidth,l.scrollLeft,l.scrollHeight,l.scrollTop)}}e.ScrollChangedEvent=m;class S{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(l){return l.kind!==this.kind?null:this}}e.ViewZonesChangedEvent=S;class h{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(l){return l.kind!==this.kind?null:this}}e.HiddenAreasChangedEvent=h;class a{constructor(l,n,g,w,E,C,I){this.kind=6,this.oldSelections=l,this.selections=n,this.oldModelVersionId=g,this.modelVersionId=w,this.source=E,this.reason=C,this.reachedMaxCursorCount=I}static _selectionsAreEqual(l,n){if(!l&&!n)return!0;if(!l||!n)return!1;const g=l.length,w=n.length;if(g!==w)return!1;for(let E=0;E<g;E++)if(!l[E].equalsSelection(n[E]))return!1;return!0}isNoOp(){return a._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}attemptToMerge(l){return l.kind!==this.kind?null:new a(this.oldSelections,l.selections,this.oldModelVersionId,l.modelVersionId,l.source,l.reason,this.reachedMaxCursorCount||l.reachedMaxCursorCount)}}e.CursorStateChangedEvent=a;class r{constructor(){this.kind=5}isNoOp(){return!1}attemptToMerge(l){return l.kind!==this.kind?null:this}}e.ReadOnlyEditAttemptEvent=r;class i{constructor(l){this.event=l,this.kind=7}isNoOp(){return!1}attemptToMerge(l){return null}}e.ModelDecorationsChangedEvent=i;class s{constructor(l){this.event=l,this.kind=8}isNoOp(){return!1}attemptToMerge(l){return null}}e.ModelLanguageChangedEvent=s;class o{constructor(l){this.event=l,this.kind=9}isNoOp(){return!1}attemptToMerge(l){return null}}e.ModelLanguageConfigurationChangedEvent=o;class u{constructor(l){this.event=l,this.kind=10}isNoOp(){return!1}attemptToMerge(l){return null}}e.ModelContentChangedEvent=u;class d{constructor(l){this.event=l,this.kind=11}isNoOp(){return!1}attemptToMerge(l){return null}}e.ModelOptionsChangedEvent=d;class p{constructor(l){this.event=l,this.kind=12}isNoOp(){return!1}attemptToMerge(l){return null}}e.ModelTokensChangedEvent=p}),define(Q[1907],Y([1,0,6,4,481,1901,303,807]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLayout=void 0;const v=125;class m{constructor(r,i,s,o){r=r|0,i=i|0,s=s|0,o=o|0,r<0&&(r=0),i<0&&(i=0),s<0&&(s=0),o<0&&(o=0),this.width=r,this.contentWidth=i,this.scrollWidth=Math.max(r,i),this.height=s,this.contentHeight=o,this.scrollHeight=Math.max(s,o)}equals(r){return this.width===r.width&&this.contentWidth===r.contentWidth&&this.height===r.height&&this.contentHeight===r.contentHeight}}class S extends y.Disposable{constructor(r,i){super(),this._onDidContentSizeChange=this._register(new t.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new m(0,0,0,0),this._scrollable=this._register(new b.Scrollable({forceIntegerValues:!0,smoothScrollDuration:r,scheduleAtNextAnimationFrame:i})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(r){this._scrollable.setSmoothScrollDuration(r)}validateScrollPosition(r){return this._scrollable.validateScrollPosition(r)}getScrollDimensions(){return this._dimensions}setScrollDimensions(r){if(this._dimensions.equals(r))return;const i=this._dimensions;this._dimensions=r,this._scrollable.setScrollDimensions({width:r.width,scrollWidth:r.scrollWidth,height:r.height,scrollHeight:r.scrollHeight},!0);const s=i.contentWidth!==r.contentWidth,o=i.contentHeight!==r.contentHeight;(s||o)&&this._onDidContentSizeChange.fire(new f.ContentSizeChangedEvent(i.contentWidth,i.contentHeight,r.contentWidth,r.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(r){this._scrollable.setScrollPositionNow(r)}setScrollPositionSmooth(r){this._scrollable.setScrollPositionSmooth(r)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class h extends y.Disposable{constructor(r,i,s){super(),this._configuration=r;const o=this._configuration.options,u=o.get(142),d=o.get(82);this._linesLayout=new D.LinesLayout(i,o.get(65),d.top,d.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new S(0,s)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new m(u.contentWidth,0,u.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(112)?v:0)}onConfigurationChanged(r){const i=this._configuration.options;if(r.hasChanged(65)&&this._linesLayout.setLineHeight(i.get(65)),r.hasChanged(82)){const s=i.get(82);this._linesLayout.setPadding(s.top,s.bottom)}if(r.hasChanged(142)){const s=i.get(142),o=s.contentWidth,u=s.height,d=this._scrollable.getScrollDimensions(),p=d.contentWidth;this._scrollable.setScrollDimensions(new m(o,d.contentWidth,u,this._getContentHeight(o,u,p)))}else this._updateHeight();r.hasChanged(112)&&this._configureSmoothScrollDuration()}onFlushed(r){this._linesLayout.onFlushed(r)}onLinesDeleted(r,i){this._linesLayout.onLinesDeleted(r,i)}onLinesInserted(r,i){this._linesLayout.onLinesInserted(r,i)}_getHorizontalScrollbarHeight(r,i){const o=this._configuration.options.get(101);return o.horizontal===2||r>=i?0:o.horizontalScrollbarSize}_getContentHeight(r,i,s){const o=this._configuration.options;let u=this._linesLayout.getLinesTotalHeight();return o.get(103)?u+=Math.max(0,i-o.get(65)-o.get(82).bottom):u+=this._getHorizontalScrollbarHeight(r,s),u}_updateHeight(){const r=this._scrollable.getScrollDimensions(),i=r.width,s=r.height,o=r.contentWidth;this._scrollable.setScrollDimensions(new m(i,r.contentWidth,s,this._getContentHeight(i,s,o)))}getCurrentViewport(){const r=this._scrollable.getScrollDimensions(),i=this._scrollable.getCurrentScrollPosition();return new T.Viewport(i.scrollTop,i.scrollLeft,r.width,r.height)}getFutureViewport(){const r=this._scrollable.getScrollDimensions(),i=this._scrollable.getFutureScrollPosition();return new T.Viewport(i.scrollTop,i.scrollLeft,r.width,r.height)}_computeContentWidth(){const r=this._configuration.options,i=this._maxLineWidth,s=r.get(143),o=r.get(49),u=r.get(142);if(s.isViewportWrapping){const d=r.get(71);return i>u.contentWidth+o.typicalHalfwidthCharacterWidth&&d.enabled&&d.side==="right"?i+u.verticalScrollbarWidth:i}else{const d=r.get(102)*o.typicalHalfwidthCharacterWidth,p=this._linesLayout.getWhitespaceMinWidth();return Math.max(i+d+u.verticalScrollbarWidth,p,this._overlayWidgetsMinWidth)}}setMaxLineWidth(r){this._maxLineWidth=r,this._updateContentWidth()}setOverlayWidgetsMinWidth(r){this._overlayWidgetsMinWidth=r,this._updateContentWidth()}_updateContentWidth(){const r=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new m(r.width,this._computeContentWidth(),r.height,r.contentHeight)),this._updateHeight()}saveState(){const r=this._scrollable.getFutureScrollPosition(),i=r.scrollTop,s=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(i),o=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(s);return{scrollTop:i,scrollTopWithoutViewZones:i-o,scrollLeft:r.scrollLeft}}changeWhitespace(r){const i=this._linesLayout.changeWhitespace(r);return i&&this.onHeightMaybeChanged(),i}getVerticalOffsetForLineNumber(r,i=!1){return this._linesLayout.getVerticalOffsetForLineNumber(r,i)}getVerticalOffsetAfterLineNumber(r,i=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(r,i)}isAfterLines(r){return this._linesLayout.isAfterLines(r)}isInTopPadding(r){return this._linesLayout.isInTopPadding(r)}isInBottomPadding(r){return this._linesLayout.isInBottomPadding(r)}getLineNumberAtVerticalOffset(r){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(r)}getWhitespaceAtVerticalOffset(r){return this._linesLayout.getWhitespaceAtVerticalOffset(r)}getLinesViewportData(){const r=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(r.top,r.top+r.height)}getLinesViewportDataAtScrollTop(r){const i=this._scrollable.getScrollDimensions();return r+i.height>i.scrollHeight&&(r=i.scrollHeight-i.height),r<0&&(r=0),this._linesLayout.getLinesViewportData(r,r+i.height)}getWhitespaceViewportData(){const r=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(r.top,r.top+r.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(r){return this._scrollable.validateScrollPosition(r)}setScrollPosition(r,i){i===1?this._scrollable.setScrollPositionNow(r):this._scrollable.setScrollPositionSmooth(r)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(r,i){const s=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:s.scrollLeft+r,scrollTop:s.scrollTop+i})}}e.ViewLayout=h}),define(Q[1908],Y([1,0,27,96]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveCaretCommand=void 0;class b{constructor(T,f){this._selection=T,this._isMovingLeft=f}getEditOperations(T,f){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const v=this._selection.startLineNumber,m=this._selection.startColumn,S=this._selection.endColumn;if(!(this._isMovingLeft&&m===1)&&!(!this._isMovingLeft&&S===T.getLineMaxColumn(v)))if(this._isMovingLeft){const h=new t.Range(v,m-1,v,m),a=T.getValueInRange(h);f.addEditOperation(h,null),f.addEditOperation(new t.Range(v,S,v,S),a)}else{const h=new t.Range(v,S,v,S+1),a=T.getValueInRange(h);f.addEditOperation(h,null),f.addEditOperation(new t.Range(v,m,v,m),a)}}computeCursorState(T,f){return this._isMovingLeft?new y.Selection(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new y.Selection(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}e.MoveCaretCommand=b}),define(Q[259],Y([1,0,15]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionItem=e.CodeActionCommandArgs=e.filtersAction=e.mayIncludeActionsOfKind=e.CodeActionTriggerSource=e.CodeActionAutoApply=e.CodeActionKind=void 0;class y{static{this.sep="."}static{this.None=new y("@@none@@")}static{this.Empty=new y("")}static{this.QuickFix=new y("quickfix")}static{this.Refactor=new y("refactor")}static{this.RefactorExtract=y.Refactor.append("extract")}static{this.RefactorInline=y.Refactor.append("inline")}static{this.RefactorMove=y.Refactor.append("move")}static{this.RefactorRewrite=y.Refactor.append("rewrite")}static{this.Source=new y("source")}static{this.SourceOrganizeImports=y.Source.append("organizeImports")}static{this.SourceFixAll=y.Source.append("fixAll")}static{this.SurroundWith=y.Refactor.append("surround")}constructor(a){this.value=a}equals(a){return this.value===a.value}contains(a){return this.equals(a)||this.value===""||a.value.startsWith(this.value+y.sep)}intersects(a){return this.contains(a)||a.contains(this)}append(a){return new y(this.value+y.sep+a)}}e.CodeActionKind=y;var b;(function(h){h.IfSingle="ifSingle",h.First="first",h.Never="never"})(b||(e.CodeActionAutoApply=b={}));var D;(function(h){h.Refactor="refactor",h.RefactorPreview="refactor preview",h.Lightbulb="lightbulb",h.Default="other (default)",h.SourceAction="source action",h.QuickFix="quick fix action",h.FixAll="fix all",h.OrganizeImports="organize imports",h.AutoFix="auto fix",h.QuickFixHover="quick fix hover window",h.OnSave="save participants",h.ProblemsView="problems view"})(D||(e.CodeActionTriggerSource=D={}));function T(h,a){return!(h.include&&!h.include.intersects(a)||h.excludes&&h.excludes.some(r=>v(a,r,h.include))||!h.includeSourceActions&&y.Source.contains(a))}e.mayIncludeActionsOfKind=T;function f(h,a){const r=a.kind?new y(a.kind):void 0;return!(h.include&&(!r||!h.include.contains(r))||h.excludes&&r&&h.excludes.some(i=>v(r,i,h.include))||!h.includeSourceActions&&r&&y.Source.contains(r)||h.onlyIncludePreferredActions&&!a.isPreferred)}e.filtersAction=f;function v(h,a,r){return!(!a.contains(h)||r&&a.contains(r))}class m{static fromUser(a,r){return!a||typeof a!="object"?new m(r.kind,r.apply,!1):new m(m.getKindFromUser(a,r.kind),m.getApplyFromUser(a,r.apply),m.getPreferredUser(a))}static getApplyFromUser(a,r){switch(typeof a.apply=="string"?a.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return r}}static getKindFromUser(a,r){return typeof a.kind=="string"?new y(a.kind):r}static getPreferredUser(a){return typeof a.preferred=="boolean"?a.preferred:!1}constructor(a,r,i){this.kind=a,this.apply=r,this.preferred=i}}e.CodeActionCommandArgs=m;class S{constructor(a,r){this.action=a,this.provider=r}async resolve(a){if(this.provider?.resolveCodeAction&&!this.action.edit){let r;try{r=await this.provider.resolveCodeAction(this.action,a)}catch(i){(0,t.onUnexpectedExternalError)(i)}r&&(this.action.edit=r.edit)}return this}}e.CodeActionItem=S}),define(Q[1909],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerModel=void 0;class y{get color(){return this._color}set color(D){this._color.equals(D)||(this._color=D,this._onDidChangeColor.fire(D))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(D){this._colorPresentations=D,this.presentationIndex>D.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(D,T,f){this.presentationIndex=f,this._onColorFlushed=new t.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new t.Emitter,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new t.Emitter,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=D,this._color=D,this._colorPresentations=T}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(D,T){let f=-1;for(let v=0;v<this.colorPresentations.length;v++)if(T.toLowerCase()===this.colorPresentations[v].label){f=v;break}if(f===-1){const v=T.split("(")[0].toLowerCase();for(let m=0;m<this.colorPresentations.length;m++)if(this.colorPresentations[m].label.toLowerCase().startsWith(v)){f=m;break}}f!==-1&&f!==this.presentationIndex&&(this.presentationIndex=f,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}e.ColorPickerModel=y}),define(Q[1085],Y([1,0,165,51,27,96]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockCommentCommand=void 0;class T{constructor(v,m,S){this.languageConfigurationService=S,this._selection=v,this._insertSpace=m,this._usedEndToken=null}static _haystackHasNeedleAtOffset(v,m,S){if(S<0)return!1;const h=m.length,a=v.length;if(S+h>a)return!1;for(let r=0;r<h;r++){const i=v.charCodeAt(S+r),s=m.charCodeAt(r);if(i!==s&&!(i>=65&&i<=90&&i+32===s)&&!(s>=65&&s<=90&&s+32===i))return!1}return!0}_createOperationsForBlockComment(v,m,S,h,a,r){const i=v.startLineNumber,s=v.startColumn,o=v.endLineNumber,u=v.endColumn,d=a.getLineContent(i),p=a.getLineContent(o);let c=d.lastIndexOf(m,s-1+m.length),l=p.indexOf(S,u-1-S.length);if(c!==-1&&l!==-1)if(i===o)d.substring(c+m.length,l).indexOf(S)>=0&&(c=-1,l=-1);else{const g=d.substring(c+m.length),w=p.substring(0,l);(g.indexOf(S)>=0||w.indexOf(S)>=0)&&(c=-1,l=-1)}let n;c!==-1&&l!==-1?(h&&c+m.length<d.length&&d.charCodeAt(c+m.length)===32&&(m=m+" "),h&&l>0&&p.charCodeAt(l-1)===32&&(S=" "+S,l-=1),n=T._createRemoveBlockCommentOperations(new b.Range(i,c+m.length+1,o,l+1),m,S)):(n=T._createAddBlockCommentOperations(v,m,S,this._insertSpace),this._usedEndToken=n.length===1?S:null);for(const g of n)r.addTrackedEditOperation(g.range,g.text)}static _createRemoveBlockCommentOperations(v,m,S){const h=[];return b.Range.isEmpty(v)?h.push(t.EditOperation.delete(new b.Range(v.startLineNumber,v.startColumn-m.length,v.endLineNumber,v.endColumn+S.length))):(h.push(t.EditOperation.delete(new b.Range(v.startLineNumber,v.startColumn-m.length,v.startLineNumber,v.startColumn))),h.push(t.EditOperation.delete(new b.Range(v.endLineNumber,v.endColumn,v.endLineNumber,v.endColumn+S.length)))),h}static _createAddBlockCommentOperations(v,m,S,h){const a=[];return b.Range.isEmpty(v)?a.push(t.EditOperation.replace(new b.Range(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn),m+" "+S)):(a.push(t.EditOperation.insert(new y.Position(v.startLineNumber,v.startColumn),m+(h?" ":""))),a.push(t.EditOperation.insert(new y.Position(v.endLineNumber,v.endColumn),(h?" ":"")+S))),a}getEditOperations(v,m){const S=this._selection.startLineNumber,h=this._selection.startColumn;v.tokenization.tokenizeIfCheap(S);const a=v.getLanguageIdAtPosition(S,h),r=this.languageConfigurationService.getLanguageConfiguration(a).comments;!r||!r.blockCommentStartToken||!r.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,r.blockCommentStartToken,r.blockCommentEndToken,this._insertSpace,v,m)}computeCursorState(v,m){const S=m.getInverseEditOperations();if(S.length===2){const h=S[0],a=S[1];return new D.Selection(h.range.endLineNumber,h.range.endColumn,a.range.startLineNumber,a.range.startColumn)}else{const h=S[0].range,a=this._usedEndToken?-this._usedEndToken.length-1:0;return new D.Selection(h.endLineNumber,h.endColumn+a,h.endLineNumber,h.endColumn+a)}}}e.BlockCommentCommand=T}),define(Q[1910],Y([1,0,33,165,51,27,96,1085]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineCommentCommand=e.Type=void 0;var v;(function(S){S[S.Toggle=0]="Toggle",S[S.ForceAdd=1]="ForceAdd",S[S.ForceRemove=2]="ForceRemove"})(v||(e.Type=v={}));class m{constructor(h,a,r,i,s,o,u){this.languageConfigurationService=h,this._selection=a,this._tabSize=r,this._type=i,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=o,this._ignoreFirstLine=u||!1}static _gatherPreflightCommentStrings(h,a,r,i){h.tokenization.tokenizeIfCheap(a);const s=h.getLanguageIdAtPosition(a,1),o=i.getLanguageConfiguration(s).comments,u=o?o.lineCommentToken:null;if(!u)return null;const d=[];for(let p=0,c=r-a+1;p<c;p++)d[p]={ignore:!1,commentStr:u,commentStrOffset:0,commentStrLength:u.length};return d}static _analyzeLines(h,a,r,i,s,o,u,d){let p=!0,c;h===0?c=!0:h===1?c=!1:c=!0;for(let l=0,n=i.length;l<n;l++){const g=i[l],w=s+l;if(w===s&&u){g.ignore=!0;continue}const E=r.getLineContent(w),C=t.firstNonWhitespaceIndex(E);if(C===-1){g.ignore=o,g.commentStrOffset=E.length;continue}if(p=!1,g.ignore=!1,g.commentStrOffset=C,c&&!f.BlockCommentCommand._haystackHasNeedleAtOffset(E,g.commentStr,C)&&(h===0?c=!1:h===1||(g.ignore=!0)),c&&a){const I=C+g.commentStrLength;I<E.length&&E.charCodeAt(I)===32&&(g.commentStrLength+=1)}}if(h===0&&p){c=!1;for(let l=0,n=i.length;l<n;l++)i[l].ignore=!1}return{supported:!0,shouldRemoveComments:c,lines:i}}static _gatherPreflightData(h,a,r,i,s,o,u,d){const p=m._gatherPreflightCommentStrings(r,i,s,d);return p===null?{supported:!1}:m._analyzeLines(h,a,r,p,i,o,u,d)}_executeLineComments(h,a,r,i){let s;r.shouldRemoveComments?s=m._createRemoveLineCommentsOperations(r.lines,i.startLineNumber):(m._normalizeInsertionPoint(h,r.lines,i.startLineNumber,this._tabSize),s=this._createAddLineCommentsOperations(r.lines,i.startLineNumber));const o=new b.Position(i.positionLineNumber,i.positionColumn);for(let u=0,d=s.length;u<d;u++)a.addEditOperation(s[u].range,s[u].text),D.Range.isEmpty(s[u].range)&&D.Range.getStartPosition(s[u].range).equals(o)&&h.getLineContent(o.lineNumber).length+1===o.column&&(this._deltaColumn=(s[u].text||"").length);this._selectionId=a.trackSelection(i)}_attemptRemoveBlockComment(h,a,r,i){let s=a.startLineNumber,o=a.endLineNumber;const u=i.length+Math.max(h.getLineFirstNonWhitespaceColumn(a.startLineNumber),a.startColumn);let d=h.getLineContent(s).lastIndexOf(r,u-1),p=h.getLineContent(o).indexOf(i,a.endColumn-1-r.length);return d!==-1&&p===-1&&(p=h.getLineContent(s).indexOf(i,d+r.length),o=s),d===-1&&p!==-1&&(d=h.getLineContent(o).lastIndexOf(r,p),s=o),a.isEmpty()&&(d===-1||p===-1)&&(d=h.getLineContent(s).indexOf(r),d!==-1&&(p=h.getLineContent(s).indexOf(i,d+r.length))),d!==-1&&h.getLineContent(s).charCodeAt(d+r.length)===32&&(r+=" "),p!==-1&&h.getLineContent(o).charCodeAt(p-1)===32&&(i=" "+i,p-=1),d!==-1&&p!==-1?f.BlockCommentCommand._createRemoveBlockCommentOperations(new D.Range(s,d+r.length+1,o,p+1),r,i):null}_executeBlockComment(h,a,r){h.tokenization.tokenizeIfCheap(r.startLineNumber);const i=h.getLanguageIdAtPosition(r.startLineNumber,1),s=this.languageConfigurationService.getLanguageConfiguration(i).comments;if(!s||!s.blockCommentStartToken||!s.blockCommentEndToken)return;const o=s.blockCommentStartToken,u=s.blockCommentEndToken;let d=this._attemptRemoveBlockComment(h,r,o,u);if(!d){if(r.isEmpty()){const p=h.getLineContent(r.startLineNumber);let c=t.firstNonWhitespaceIndex(p);c===-1&&(c=p.length),d=f.BlockCommentCommand._createAddBlockCommentOperations(new D.Range(r.startLineNumber,c+1,r.startLineNumber,p.length+1),o,u,this._insertSpace)}else d=f.BlockCommentCommand._createAddBlockCommentOperations(new D.Range(r.startLineNumber,h.getLineFirstNonWhitespaceColumn(r.startLineNumber),r.endLineNumber,h.getLineMaxColumn(r.endLineNumber)),o,u,this._insertSpace);d.length===1&&(this._deltaColumn=o.length+1)}this._selectionId=a.trackSelection(r);for(const p of d)a.addEditOperation(p.range,p.text)}getEditOperations(h,a){let r=this._selection;if(this._moveEndPositionDown=!1,r.startLineNumber===r.endLineNumber&&this._ignoreFirstLine){a.addEditOperation(new D.Range(r.startLineNumber,h.getLineMaxColumn(r.startLineNumber),r.startLineNumber+1,1),r.startLineNumber===h.getLineCount()?"":` `),this._selectionId=a.trackSelection(r);return}r.startLineNumber<r.endLineNumber&&r.endColumn===1&&(this._moveEndPositionDown=!0,r=r.setEndPosition(r.endLineNumber-1,h.getLineMaxColumn(r.endLineNumber-1)));const i=m._gatherPreflightData(this._type,this._insertSpace,h,r.startLineNumber,r.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return i.supported?this._executeLineComments(h,a,i,r):this._executeBlockComment(h,a,r)}computeCursorState(h,a){let r=a.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(r=r.setEndPosition(r.endLineNumber+1,1)),new T.Selection(r.selectionStartLineNumber,r.selectionStartColumn+this._deltaColumn,r.positionLineNumber,r.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(h,a){const r=[];for(let i=0,s=h.length;i<s;i++){const o=h[i];o.ignore||r.push(y.EditOperation.delete(new D.Range(a+i,o.commentStrOffset+1,a+i,o.commentStrOffset+o.commentStrLength+1)))}return r}_createAddLineCommentsOperations(h,a){const r=[],i=this._insertSpace?" ":"";for(let s=0,o=h.length;s<o;s++){const u=h[s];u.ignore||r.push(y.EditOperation.insert(new b.Position(a+s,u.commentStrOffset+1),u.commentStr+i))}return r}static nextVisibleColumn(h,a,r,i){return r?h+(a-h%a):h+i}static _normalizeInsertionPoint(h,a,r,i){let s=1073741824,o,u;for(let d=0,p=a.length;d<p;d++){if(a[d].ignore)continue;const c=h.getLineContent(r+d);let l=0;for(let n=0,g=a[d].commentStrOffset;l<s&&n<g;n++)l=m.nextVisibleColumn(l,i,c.charCodeAt(n)===9,1);l<s&&(s=l)}s=Math.floor(s/i)*i;for(let d=0,p=a.length;d<p;d++){if(a[d].ignore)continue;const c=h.getLineContent(r+d);let l=0;for(o=0,u=a[d].commentStrOffset;l<s&&o<u;o++)l=m.nextVisibleColumn(l,i,c.charCodeAt(o)===9,1);l>s?a[d].commentStrOffset=o-1:a[d].commentStrOffset=o}}}e.LineCommentCommand=m}),define(Q[1911],Y([1,0,27,96]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropCommand=void 0;class b{constructor(T,f,v){this.selection=T,this.targetPosition=f,this.copy=v,this.targetSelection=null}getEditOperations(T,f){const v=T.getValueInRange(this.selection);if(this.copy||f.addEditOperation(this.selection,null),f.addEditOperation(new t.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),v),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new y.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new y.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new y.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new y.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new y.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(T,f){return this.targetSelection}}e.DragAndDropCommand=b}),define(Q[1912],Y([1,0,27]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceAllCommand=void 0;class y{constructor(D,T,f){this._editorSelection=D,this._ranges=T,this._replaceStrings=f,this._trackedEditorSelectionId=null}getEditOperations(D,T){if(this._ranges.length>0){const f=[];for(let S=0;S<this._ranges.length;S++)f.push({range:this._ranges[S],text:this._replaceStrings[S]});f.sort((S,h)=>t.Range.compareRangesUsingStarts(S.range,h.range));const v=[];let m=f[0];for(let S=1;S<f.length;S++)m.range.endLineNumber===f[S].range.startLineNumber&&m.range.endColumn===f[S].range.startColumn?(m.range=m.range.plusRange(f[S].range),m.text=m.text+f[S].text):(v.push(m),m=f[S]);v.push(m);for(const S of v)T.addEditOperation(S.range,S.text)}this._trackedEditorSelectionId=T.trackSelection(this._editorSelection)}computeCursorState(D,T){return T.getTrackedSelection(this._trackedEditorSelectionId)}}e.ReplaceAllCommand=y}),define(Q[1086],Y([1,0,1034]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseReplaceString=e.ReplacePiece=e.ReplacePattern=void 0;var y;(function(S){S[S.StaticValue=0]="StaticValue",S[S.DynamicPieces=1]="DynamicPieces"})(y||(y={}));class b{constructor(h){this.staticValue=h,this.kind=0}}class D{constructor(h){this.pieces=h,this.kind=1}}class T{static fromStaticValue(h){return new T([f.staticValue(h)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(h){!h||h.length===0?this._state=new b(""):h.length===1&&h[0].staticValue!==null?this._state=new b(h[0].staticValue):this._state=new D(h)}buildReplaceString(h,a){if(this._state.kind===0)return a?(0,t.buildReplaceStringWithCasePreserved)(h,this._state.staticValue):this._state.staticValue;let r="";for(let i=0,s=this._state.pieces.length;i<s;i++){const o=this._state.pieces[i];if(o.staticValue!==null){r+=o.staticValue;continue}let u=T._substitute(o.matchIndex,h);if(o.caseOps!==null&&o.caseOps.length>0){const d=[],p=o.caseOps.length;let c=0;for(let l=0,n=u.length;l<n;l++){if(c>=p){d.push(u.slice(l));break}switch(o.caseOps[c]){case"U":d.push(u[l].toUpperCase());break;case"u":d.push(u[l].toUpperCase()),c++;break;case"L":d.push(u[l].toLowerCase());break;case"l":d.push(u[l].toLowerCase()),c++;break;default:d.push(u[l])}}u=d.join("")}r+=u}return r}static _substitute(h,a){if(a===null)return"";if(h===0)return a[0];let r="";for(;h>0;){if(h<a.length)return(a[h]||"")+r;r=String(h%10)+r,h=Math.floor(h/10)}return"$"+r}}e.ReplacePattern=T;class f{static staticValue(h){return new f(h,-1,null)}static matchIndex(h){return new f(null,h,null)}static caseOps(h,a){return new f(null,h,a)}constructor(h,a,r){this.staticValue=h,this.matchIndex=a,!r||r.length===0?this.caseOps=null:this.caseOps=r.slice(0)}}e.ReplacePiece=f;class v{constructor(h){this._source=h,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(h){this._emitStatic(this._source.substring(this._lastCharIndex,h)),this._lastCharIndex=h}emitStatic(h,a){this._emitStatic(h),this._lastCharIndex=a}_emitStatic(h){h.length!==0&&(this._currentStaticPiece+=h)}emitMatchIndex(h,a,r){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=f.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=f.caseOps(h,r),this._lastCharIndex=a}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=f.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new T(this._result)}}function m(S){if(!S||S.length===0)return new T(null);const h=[],a=new v(S);for(let r=0,i=S.length;r<i;r++){const s=S.charCodeAt(r);if(s===92){if(r++,r>=i)break;const o=S.charCodeAt(r);switch(o){case 92:a.emitUnchanged(r-1),a.emitStatic("\\",r+1);break;case 110:a.emitUnchanged(r-1),a.emitStatic(` `,r+1);break;case 116:a.emitUnchanged(r-1),a.emitStatic(" ",r+1);break;case 117:case 85:case 108:case 76:a.emitUnchanged(r-1),a.emitStatic("",r+1),h.push(String.fromCharCode(o));break}continue}if(s===36){if(r++,r>=i)break;const o=S.charCodeAt(r);if(o===36){a.emitUnchanged(r-1),a.emitStatic("$",r+1);continue}if(o===48||o===38){a.emitUnchanged(r-1),a.emitMatchIndex(0,r+1,h),h.length=0;continue}if(49<=o&&o<=57){let u=o-48;if(r+1<i){const d=S.charCodeAt(r+1);if(48<=d&&d<=57){r++,u=u*10+(d-48),a.emitUnchanged(r-2),a.emitMatchIndex(u,r+1,h),h.length=0;continue}}a.emitUnchanged(r-1),a.emitMatchIndex(u,r+1,h),h.length=0;continue}}}return a.finalize()}e.parseReplaceString=m}),define(Q[567],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRegion=e.FoldingRegions=e.MAX_LINE_NUMBER=e.MAX_FOLDING_REGIONS=e.foldSourceAbbr=e.FoldSource=void 0;var t;(function(f){f[f.provider=0]="provider",f[f.userDefined=1]="userDefined",f[f.recovered=2]="recovered"})(t||(e.FoldSource=t={})),e.foldSourceAbbr={[0]:" ",[1]:"u",[2]:"r"},e.MAX_FOLDING_REGIONS=65535,e.MAX_LINE_NUMBER=16777215;const y=4278190080;class b{constructor(v){const m=Math.ceil(v/32);this._states=new Uint32Array(m)}get(v){const m=v/32|0,S=v%32;return(this._states[m]&1<<S)!==0}set(v,m){const S=v/32|0,h=v%32,a=this._states[S];m?this._states[S]=a|1<<h:this._states[S]=a&~(1<<h)}}class D{constructor(v,m,S){if(v.length!==m.length||v.length>e.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=v,this._endIndexes=m,this._collapseStates=new b(v.length),this._userDefinedStates=new b(v.length),this._recoveredStates=new b(v.length),this._types=S,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const v=[],m=(S,h)=>{const a=v[v.length-1];return this.getStartLineNumber(a)<=S&&this.getEndLineNumber(a)>=h};for(let S=0,h=this._startIndexes.length;S<h;S++){const a=this._startIndexes[S],r=this._endIndexes[S];if(a>e.MAX_LINE_NUMBER||r>e.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+e.MAX_LINE_NUMBER);for(;v.length>0&&!m(a,r);)v.pop();const i=v.length>0?v[v.length-1]:-1;v.push(S),this._startIndexes[S]=a+((i&255)<<24),this._endIndexes[S]=r+((i&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(v){return this._startIndexes[v]&e.MAX_LINE_NUMBER}getEndLineNumber(v){return this._endIndexes[v]&e.MAX_LINE_NUMBER}getType(v){return this._types?this._types[v]:void 0}hasTypes(){return!!this._types}isCollapsed(v){return this._collapseStates.get(v)}setCollapsed(v,m){this._collapseStates.set(v,m)}isUserDefined(v){return this._userDefinedStates.get(v)}setUserDefined(v,m){return this._userDefinedStates.set(v,m)}isRecovered(v){return this._recoveredStates.get(v)}setRecovered(v,m){return this._recoveredStates.set(v,m)}getSource(v){return this.isUserDefined(v)?1:this.isRecovered(v)?2:0}setSource(v,m){m===1?(this.setUserDefined(v,!0),this.setRecovered(v,!1)):m===2?(this.setUserDefined(v,!1),this.setRecovered(v,!0)):(this.setUserDefined(v,!1),this.setRecovered(v,!1))}setCollapsedAllOfType(v,m){let S=!1;if(this._types)for(let h=0;h<this._types.length;h++)this._types[h]===v&&(this.setCollapsed(h,m),S=!0);return S}toRegion(v){return new T(this,v)}getParentIndex(v){this.ensureParentIndices();const m=((this._startIndexes[v]&y)>>>24)+((this._endIndexes[v]&y)>>>16);return m===e.MAX_FOLDING_REGIONS?-1:m}contains(v,m){return this.getStartLineNumber(v)<=m&&this.getEndLineNumber(v)>=m}findIndex(v){let m=0,S=this._startIndexes.length;if(S===0)return-1;for(;m<S;){const h=Math.floor((m+S)/2);v<this.getStartLineNumber(h)?S=h:m=h+1}return m-1}findRange(v){let m=this.findIndex(v);if(m>=0){if(this.getEndLineNumber(m)>=v)return m;for(m=this.getParentIndex(m);m!==-1;){if(this.contains(m,v))return m;m=this.getParentIndex(m)}}return-1}toString(){const v=[];for(let m=0;m<this.length;m++)v[m]=`[${e.foldSourceAbbr[this.getSource(m)]}${this.isCollapsed(m)?"+":"-"}] ${this.getStartLineNumber(m)}/${this.getEndLineNumber(m)}`;return v.join(", ")}toFoldRange(v){return{startLineNumber:this._startIndexes[v]&e.MAX_LINE_NUMBER,endLineNumber:this._endIndexes[v]&e.MAX_LINE_NUMBER,type:this._types?this._types[v]:void 0,isCollapsed:this.isCollapsed(v),source:this.getSource(v)}}static fromFoldRanges(v){const m=v.length,S=new Uint32Array(m),h=new Uint32Array(m);let a=[],r=!1;for(let s=0;s<m;s++){const o=v[s];S[s]=o.startLineNumber,h[s]=o.endLineNumber,a.push(o.type),o.type&&(r=!0)}r||(a=void 0);const i=new D(S,h,a);for(let s=0;s<m;s++)v[s].isCollapsed&&i.setCollapsed(s,!0),i.setSource(s,v[s].source);return i}static sanitizeAndMerge(v,m,S){S=S??Number.MAX_VALUE;const h=(n,g)=>Array.isArray(n)?w=>w<g?n[w]:void 0:w=>w<g?n.toFoldRange(w):void 0,a=h(v,v.length),r=h(m,m.length);let i=0,s=0,o=a(0),u=r(0);const d=[];let p,c=0;const l=[];for(;o||u;){let n;if(u&&(!o||o.startLineNumber>=u.startLineNumber))o&&o.startLineNumber===u.startLineNumber?(u.source===1?n=u:(n=o,n.isCollapsed=u.isCollapsed&&o.endLineNumber===u.endLineNumber,n.source=0),o=a(++i)):(n=u,u.isCollapsed&&u.source===0&&(n.source=2)),u=r(++s);else{let g=s,w=u;for(;;){if(!w||w.startLineNumber>o.endLineNumber){n=o;break}if(w.source===1&&w.endLineNumber>o.endLineNumber)break;w=r(++g)}o=a(++i)}if(n){for(;p&&p.endLineNumber<n.startLineNumber;)p=d.pop();n.endLineNumber>n.startLineNumber&&n.startLineNumber>c&&n.endLineNumber<=S&&(!p||p.endLineNumber>=n.endLineNumber)&&(l.push(n),c=n.startLineNumber,p&&d.push(p),p=n)}}return l}}e.FoldingRegions=D;class T{constructor(v,m){this.ranges=v,this.index=m}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(v){return v.startLineNumber<=this.startLineNumber&&v.endLineNumber>=this.endLineNumber}containsLine(v){return this.startLineNumber<=v&&v<=this.endLineNumber}hidesLine(v){return this.startLineNumber<v&&v<=this.endLineNumber}}e.FoldingRegion=T}),define(Q[1087],Y([1,0,6,567,122]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNextFoldLine=e.getPreviousFoldLine=e.getParentFoldLine=e.setCollapseStateForType=e.setCollapseStateForMatchingLines=e.setCollapseStateForRest=e.setCollapseStateAtLevel=e.setCollapseStateUp=e.setCollapseStateLevelsUp=e.setCollapseStateLevelsDown=e.toggleCollapseState=e.FoldingModel=void 0;class D{get regions(){return this._regions}get textModel(){return this._textModel}get decorationProvider(){return this._decorationProvider}constructor(d,p){this._updateEventEmitter=new t.Emitter,this.onDidChange=this._updateEventEmitter.event,this._textModel=d,this._decorationProvider=p,this._regions=new y.FoldingRegions(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(d){if(!d.length)return;d=d.sort((c,l)=>c.regionIndex-l.regionIndex);const p={};this._decorationProvider.changeDecorations(c=>{let l=0,n=-1,g=-1;const w=E=>{for(;l<E;){const C=this._regions.getEndLineNumber(l),I=this._regions.isCollapsed(l);if(C<=n){const _=this.regions.getSource(l)!==0;c.changeDecorationOptions(this._editorDecorationIds[l],this._decorationProvider.getDecorationOption(I,C<=g,_))}I&&C>g&&(g=C),l++}};for(const E of d){const C=E.regionIndex,I=this._editorDecorationIds[C];if(I&&!p[I]){p[I]=!0,w(C);const _=!this._regions.isCollapsed(C);this._regions.setCollapsed(C,_),n=Math.max(n,this._regions.getEndLineNumber(C))}}w(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:d})}removeManualRanges(d){const p=new Array,c=l=>{for(const n of d)if(!(n.startLineNumber>l.endLineNumber||l.startLineNumber>n.endLineNumber))return!0;return!1};for(let l=0;l<this._regions.length;l++){const n=this._regions.toFoldRange(l);(n.source===0||!c(n))&&p.push(n)}this.updatePost(y.FoldingRegions.fromFoldRanges(p))}update(d,p=[]){const c=this._currentFoldedOrManualRanges(p),l=y.FoldingRegions.sanitizeAndMerge(d,c,this._textModel.getLineCount());this.updatePost(y.FoldingRegions.fromFoldRanges(l))}updatePost(d){const p=[];let c=-1;for(let l=0,n=d.length;l<n;l++){const g=d.getStartLineNumber(l),w=d.getEndLineNumber(l),E=d.isCollapsed(l),C=d.getSource(l)!==0,I={startLineNumber:g,startColumn:this._textModel.getLineMaxColumn(g),endLineNumber:w,endColumn:this._textModel.getLineMaxColumn(w)+1};p.push({range:I,options:this._decorationProvider.getDecorationOption(E,w<=c,C)}),E&&w>c&&(c=w)}this._decorationProvider.changeDecorations(l=>this._editorDecorationIds=l.deltaDecorations(this._editorDecorationIds,p)),this._regions=d,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(d=[]){const p=(l,n)=>{for(const g of d)if(l<g&&g<=n)return!0;return!1},c=[];for(let l=0,n=this._regions.length;l<n;l++){let g=this.regions.isCollapsed(l);const w=this.regions.getSource(l);if(g||w!==0){const E=this._regions.toFoldRange(l),C=this._textModel.getDecorationRange(this._editorDecorationIds[l]);C&&(g&&p(C.startLineNumber,C.endLineNumber)&&(g=!1),c.push({startLineNumber:C.startLineNumber,endLineNumber:C.endLineNumber,type:E.type,isCollapsed:g,source:w}))}}return c}getMemento(){const d=this._currentFoldedOrManualRanges(),p=[],c=this._textModel.getLineCount();for(let l=0,n=d.length;l<n;l++){const g=d[l];if(g.startLineNumber>=g.endLineNumber||g.startLineNumber<1||g.endLineNumber>c)continue;const w=this._getLinesChecksum(g.startLineNumber+1,g.endLineNumber);p.push({startLineNumber:g.startLineNumber,endLineNumber:g.endLineNumber,isCollapsed:g.isCollapsed,source:g.source,checksum:w})}return p.length>0?p:void 0}applyMemento(d){if(!Array.isArray(d))return;const p=[],c=this._textModel.getLineCount();for(const n of d){if(n.startLineNumber>=n.endLineNumber||n.startLineNumber<1||n.endLineNumber>c)continue;const g=this._getLinesChecksum(n.startLineNumber+1,n.endLineNumber);(!n.checksum||g===n.checksum)&&p.push({startLineNumber:n.startLineNumber,endLineNumber:n.endLineNumber,type:void 0,isCollapsed:n.isCollapsed??!0,source:n.source??0})}const l=y.FoldingRegions.sanitizeAndMerge(this._regions,p,c);this.updatePost(y.FoldingRegions.fromFoldRanges(l))}_getLinesChecksum(d,p){return(0,b.hash)(this._textModel.getLineContent(d)+this._textModel.getLineContent(p))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(d,p){const c=[];if(this._regions){let l=this._regions.findRange(d),n=1;for(;l>=0;){const g=this._regions.toRegion(l);(!p||p(g,n))&&c.push(g),n++,l=g.parentIndex}}return c}getRegionAtLine(d){if(this._regions){const p=this._regions.findRange(d);if(p>=0)return this._regions.toRegion(p)}return null}getRegionsInside(d,p){const c=[],l=d?d.regionIndex+1:0,n=d?d.endLineNumber:Number.MAX_VALUE;if(p&&p.length===2){const g=[];for(let w=l,E=this._regions.length;w<E;w++){const C=this._regions.toRegion(w);if(this._regions.getStartLineNumber(w)<n){for(;g.length>0&&!C.containedBy(g[g.length-1]);)g.pop();g.push(C),p(C,g.length)&&c.push(C)}else break}}else for(let g=l,w=this._regions.length;g<w;g++){const E=this._regions.toRegion(g);if(this._regions.getStartLineNumber(g)<n)(!p||p(E))&&c.push(E);else break}return c}}e.FoldingModel=D;function T(u,d,p){const c=[];for(const l of p){const n=u.getRegionAtLine(l);if(n){const g=!n.isCollapsed;if(c.push(n),d>1){const w=u.getRegionsInside(n,(E,C)=>E.isCollapsed!==g&&C<d);c.push(...w)}}}u.toggleCollapseState(c)}e.toggleCollapseState=T;function f(u,d,p=Number.MAX_VALUE,c){const l=[];if(c&&c.length>0)for(const n of c){const g=u.getRegionAtLine(n);if(g&&(g.isCollapsed!==d&&l.push(g),p>1)){const w=u.getRegionsInside(g,(E,C)=>E.isCollapsed!==d&&C<p);l.push(...w)}}else{const n=u.getRegionsInside(null,(g,w)=>g.isCollapsed!==d&&w<p);l.push(...n)}u.toggleCollapseState(l)}e.setCollapseStateLevelsDown=f;function v(u,d,p,c){const l=[];for(const n of c){const g=u.getAllRegionsAtLine(n,(w,E)=>w.isCollapsed!==d&&E<=p);l.push(...g)}u.toggleCollapseState(l)}e.setCollapseStateLevelsUp=v;function m(u,d,p){const c=[];for(const l of p){const n=u.getAllRegionsAtLine(l,g=>g.isCollapsed!==d);n.length>0&&c.push(n[0])}u.toggleCollapseState(c)}e.setCollapseStateUp=m;function S(u,d,p,c){const l=(g,w)=>w===d&&g.isCollapsed!==p&&!c.some(E=>g.containsLine(E)),n=u.getRegionsInside(null,l);u.toggleCollapseState(n)}e.setCollapseStateAtLevel=S;function h(u,d,p){const c=[];for(const g of p){const w=u.getAllRegionsAtLine(g,void 0);w.length>0&&c.push(w[0])}const l=g=>c.every(w=>!w.containedBy(g)&&!g.containedBy(w))&&g.isCollapsed!==d,n=u.getRegionsInside(null,l);u.toggleCollapseState(n)}e.setCollapseStateForRest=h;function a(u,d,p){const c=u.textModel,l=u.regions,n=[];for(let g=l.length-1;g>=0;g--)if(p!==l.isCollapsed(g)){const w=l.getStartLineNumber(g);d.test(c.getLineContent(w))&&n.push(l.toRegion(g))}u.toggleCollapseState(n)}e.setCollapseStateForMatchingLines=a;function r(u,d,p){const c=u.regions,l=[];for(let n=c.length-1;n>=0;n--)p!==c.isCollapsed(n)&&d===c.getType(n)&&l.push(c.toRegion(n));u.toggleCollapseState(l)}e.setCollapseStateForType=r;function i(u,d){let p=null;const c=d.getRegionAtLine(u);if(c!==null&&(p=c.startLineNumber,u===p)){const l=c.parentIndex;l!==-1?p=d.regions.getStartLineNumber(l):p=null}return p}e.getParentFoldLine=i;function s(u,d){let p=d.getRegionAtLine(u);if(p!==null&&p.startLineNumber===u){if(u!==p.startLineNumber)return p.startLineNumber;{const c=p.parentIndex;let l=0;for(c!==-1&&(l=d.regions.getStartLineNumber(p.parentIndex));p!==null;)if(p.regionIndex>0){if(p=d.regions.toRegion(p.regionIndex-1),p.startLineNumber<=l)return null;if(p.parentIndex===c)return p.startLineNumber}else return null}}else if(d.regions.length>0)for(p=d.regions.toRegion(d.regions.length-1);p!==null;){if(p.startLineNumber<u)return p.startLineNumber;p.regionIndex>0?p=d.regions.toRegion(p.regionIndex-1):p=null}return null}e.getPreviousFoldLine=s;function o(u,d){let p=d.getRegionAtLine(u);if(p!==null&&p.startLineNumber===u){const c=p.parentIndex;let l=0;if(c!==-1)l=d.regions.getEndLineNumber(p.parentIndex);else{if(d.regions.length===0)return null;l=d.regions.getEndLineNumber(d.regions.length-1)}for(;p!==null;)if(p.regionIndex<d.regions.length){if(p=d.regions.toRegion(p.regionIndex+1),p.startLineNumber>=l)return null;if(p.parentIndex===c)return p.startLineNumber}else return null}else if(d.regions.length>0)for(p=d.regions.toRegion(0);p!==null;){if(p.startLineNumber>u)return p.startLineNumber;p.regionIndex<d.regions.length?p=d.regions.toRegion(p.regionIndex+1):p=null}return null}e.getNextFoldLine=o}),define(Q[1913],Y([1,0,20,6,27,392]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HiddenRangeModel=void 0;class T{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(S){this._updateEventEmitter=new y.Emitter,this._hasLineChanges=!1,this._foldingModel=S,this._foldingModelListener=S.onDidChange(h=>this.updateHiddenRanges()),this._hiddenRanges=[],S.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(S){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=S.changes.some(h=>h.range.endLineNumber!==h.range.startLineNumber||(0,D.countEOL)(h.text)[0]!==0))}updateHiddenRanges(){let S=!1;const h=[];let a=0,r=0,i=Number.MAX_VALUE,s=-1;const o=this._foldingModel.regions;for(;a<o.length;a++){if(!o.isCollapsed(a))continue;const u=o.getStartLineNumber(a)+1,d=o.getEndLineNumber(a);i<=u&&d<=s||(!S&&r<this._hiddenRanges.length&&this._hiddenRanges[r].startLineNumber===u&&this._hiddenRanges[r].endLineNumber===d?(h.push(this._hiddenRanges[r]),r++):(S=!0,h.push(new b.Range(u,1,d,1))),i=u,s=d)}(this._hasLineChanges||S||r<this._hiddenRanges.length)&&this.applyHiddenRanges(h)}applyHiddenRanges(S){this._hiddenRanges=S,this._hasLineChanges=!1,this._updateEventEmitter.fire(S)}hasRanges(){return this._hiddenRanges.length>0}isHidden(S){return v(this._hiddenRanges,S)!==null}adjustSelections(S){let h=!1;const a=this._foldingModel.textModel;let r=null;const i=s=>((!r||!f(s,r))&&(r=v(this._hiddenRanges,s)),r?r.startLineNumber-1:null);for(let s=0,o=S.length;s<o;s++){let u=S[s];const d=i(u.startLineNumber);d&&(u=u.setStartPosition(d,a.getLineMaxColumn(d)),h=!0);const p=i(u.endLineNumber);p&&(u=u.setEndPosition(p,a.getLineMaxColumn(p)),h=!0),S[s]=u}return h}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}e.HiddenRangeModel=T;function f(m,S){return m>=S.startLineNumber&&m<=S.endLineNumber}function v(m,S){const h=(0,t.findFirstInSorted)(m,a=>S<a.startLineNumber)-1;return h>=0&&m[h].endLineNumber>=S?m[h]:null}}),define(Q[1088],Y([1,0,801,567]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeRanges=e.RangesCollector=e.IndentRangeProvider=void 0;const b=5e3,D="indent";class T{constructor(h,a,r){this.editorModel=h,this.languageConfigurationService=a,this.foldingRangesLimit=r,this.id=D}dispose(){}compute(h){const a=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,r=a&&!!a.offSide,i=a&&a.markers;return Promise.resolve(m(this.editorModel,r,i,this.foldingRangesLimit))}}e.IndentRangeProvider=T;class f{constructor(h){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=h}insertFirst(h,a,r){if(h>y.MAX_LINE_NUMBER||a>y.MAX_LINE_NUMBER)return;const i=this._length;this._startIndexes[i]=h,this._endIndexes[i]=a,this._length++,r<1e3&&(this._indentOccurrences[r]=(this._indentOccurrences[r]||0)+1)}toIndentRanges(h){const a=this._foldingRangesLimit.limit;if(this._length<=a){this._foldingRangesLimit.update(this._length,!1);const r=new Uint32Array(this._length),i=new Uint32Array(this._length);for(let s=this._length-1,o=0;s>=0;s--,o++)r[o]=this._startIndexes[s],i[o]=this._endIndexes[s];return new y.FoldingRegions(r,i)}else{this._foldingRangesLimit.update(this._length,a);let r=0,i=this._indentOccurrences.length;for(let d=0;d<this._indentOccurrences.length;d++){const p=this._indentOccurrences[d];if(p){if(p+r>a){i=d;break}r+=p}}const s=h.getOptions().tabSize,o=new Uint32Array(a),u=new Uint32Array(a);for(let d=this._length-1,p=0;d>=0;d--){const c=this._startIndexes[d],l=h.getLineContent(c),n=(0,t.computeIndentLevel)(l,s);(n<i||n===i&&r++<a)&&(o[p]=c,u[p]=this._endIndexes[d],p++)}return new y.FoldingRegions(o,u)}}}e.RangesCollector=f;const v={limit:b,update:()=>{}};function m(S,h,a,r=v){const i=S.getOptions().tabSize,s=new f(r);let o;a&&(o=new RegExp(`(${a.start.source})|(?:${a.end.source})`));const u=[],d=S.getLineCount()+1;u.push({indent:-1,endAbove:d,line:d});for(let p=S.getLineCount();p>0;p--){const c=S.getLineContent(p),l=(0,t.computeIndentLevel)(c,i);let n=u[u.length-1];if(l===-1){h&&(n.endAbove=p);continue}let g;if(o&&(g=c.match(o)))if(g[1]){let w=u.length-1;for(;w>0&&u[w].indent!==-2;)w--;if(w>0){u.length=w+1,n=u[w],s.insertFirst(p,n.line,l),n.line=p,n.indent=l,n.endAbove=p;continue}}else{u.push({indent:-2,endAbove:p,line:p});continue}if(n.indent>l){do u.pop(),n=u[u.length-1];while(n.indent>l);const w=n.endAbove-1;w-p>=1&&s.insertFirst(p,w,l)}n.indent===l?n.endAbove=p:u.push({indent:l,endAbove:p,line:p})}return s.toIndentRanges(S)}e.computeRanges=m}),define(Q[808],Y([1,0,15,4,567]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeRanges=e.SyntaxRangeProvider=void 0;const D={},T="syntax";class f{constructor(a,r,i,s,o){this.editorModel=a,this.providers=r,this.handleFoldingRangesChange=i,this.foldingRangesLimit=s,this.fallbackRangeProvider=o,this.id=T,this.disposables=new y.DisposableStore,o&&this.disposables.add(o);for(const u of r)typeof u.onDidChange=="function"&&this.disposables.add(u.onDidChange(i))}compute(a){return v(this.providers,this.editorModel,a).then(r=>r?S(r,this.foldingRangesLimit):this.fallbackRangeProvider?.compute(a)??null)}dispose(){this.disposables.dispose()}}e.SyntaxRangeProvider=f;function v(h,a,r){let i=null;const s=h.map((o,u)=>Promise.resolve(o.provideFoldingRanges(a,D,r)).then(d=>{if(!r.isCancellationRequested&&Array.isArray(d)){Array.isArray(i)||(i=[]);const p=a.getLineCount();for(const c of d)c.start>0&&c.end>c.start&&c.end<=p&&i.push({start:c.start,end:c.end,rank:u,kind:c.kind})}},t.onUnexpectedExternalError));return Promise.all(s).then(o=>i)}class m{constructor(a){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=a}add(a,r,i,s){if(a>b.MAX_LINE_NUMBER||r>b.MAX_LINE_NUMBER)return;const o=this._length;this._startIndexes[o]=a,this._endIndexes[o]=r,this._nestingLevels[o]=s,this._types[o]=i,this._length++,s<30&&(this._nestingLevelCounts[s]=(this._nestingLevelCounts[s]||0)+1)}toIndentRanges(){const a=this._foldingRangesLimit.limit;if(this._length<=a){this._foldingRangesLimit.update(this._length,!1);const r=new Uint32Array(this._length),i=new Uint32Array(this._length);for(let s=0;s<this._length;s++)r[s]=this._startIndexes[s],i[s]=this._endIndexes[s];return new b.FoldingRegions(r,i,this._types)}else{this._foldingRangesLimit.update(this._length,a);let r=0,i=this._nestingLevelCounts.length;for(let d=0;d<this._nestingLevelCounts.length;d++){const p=this._nestingLevelCounts[d];if(p){if(p+r>a){i=d;break}r+=p}}const s=new Uint32Array(a),o=new Uint32Array(a),u=[];for(let d=0,p=0;d<this._length;d++){const c=this._nestingLevels[d];(c<i||c===i&&r++<a)&&(s[p]=this._startIndexes[d],o[p]=this._endIndexes[d],u[p]=this._types[d],p++)}return new b.FoldingRegions(s,o,u)}}}function S(h,a){const r=h.sort((u,d)=>{let p=u.start-d.start;return p===0&&(p=u.rank-d.rank),p}),i=new m(a);let s;const o=[];for(const u of r)if(!s)s=u,i.add(u.start,u.end,u.kind&&u.kind.value,o.length);else if(u.start>s.start)if(u.end<=s.end)o.push(s),s=u,i.add(u.start,u.end,u.kind&&u.kind.value,o.length);else{if(u.start>s.end){do s=o.pop();while(s&&u.start>s.end);s&&o.push(s),s=u}i.add(u.start,u.end,u.kind&&u.kind.value,o.length)}return i.toIndentRanges()}e.sanitizeRanges=S}),define(Q[1089],Y([1,0,165,27,390]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingEdit=void 0;class D{static _handleEolEdits(f,v){let m;const S=[];for(const h of v)typeof h.eol=="number"&&(m=h.eol),h.range&&typeof h.text=="string"&&S.push(h);return typeof m=="number"&&f.hasModel()&&f.getModel().pushEOL(m),S}static _isFullModelReplaceEdit(f,v){if(!f.hasModel())return!1;const m=f.getModel(),S=m.validateRange(v.range);return m.getFullModelRange().equalsRange(S)}static execute(f,v,m){m&&f.pushUndoStop();const S=b.StableEditorScrollState.capture(f),h=D._handleEolEdits(f,v);h.length===1&&D._isFullModelReplaceEdit(f,h[0])?f.executeEdits("formatEditsCommand",h.map(a=>t.EditOperation.replace(y.Range.lift(a.range),a.text))):f.executeEdits("formatEditsCommand",h.map(a=>t.EditOperation.replaceMove(y.Range.lift(a.range),a.text))),m&&f.pushUndoStop(),S.restoreRelativeVerticalPositionOfCursor(f)}}e.FormattingEdit=D}),define(Q[395],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverParticipantRegistry=e.HoverForeignElementAnchor=e.HoverRangeAnchor=e.HoverAnchorType=void 0;var t;(function(D){D[D.Range=1]="Range",D[D.ForeignElement=2]="ForeignElement"})(t||(e.HoverAnchorType=t={}));class y{constructor(T,f,v,m){this.priority=T,this.range=f,this.initialMousePosX=v,this.initialMousePosY=m,this.type=1}equals(T){return T.type===1&&this.range.equalsRange(T.range)}canAdoptVisibleHover(T,f){return T.type===1&&f.lineNumber===this.range.startLineNumber}}e.HoverRangeAnchor=y;class b{constructor(T,f,v,m,S,h){this.priority=T,this.owner=f,this.range=v,this.initialMousePosX=m,this.initialMousePosY=S,this.supportsMarkerHover=h,this.type=2}equals(T){return T.type===2&&this.owner===T.owner}canAdoptVisibleHover(T,f){return T.type===2&&this.owner===T.owner}}e.HoverForeignElementAnchor=b,e.HoverParticipantRegistry=new class{constructor(){this._participants=[]}register(T){this._participants.push(T)}getAll(){return this._participants}}}),define(Q[1914],Y([1,0,96]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InPlaceReplaceCommand=void 0;class y{constructor(D,T,f){this._editRange=D,this._originalSelection=T,this._text=f}getEditOperations(D,T){T.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(D,T){const v=T.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new t.Selection(v.endLineNumber,Math.min(this._originalSelection.positionColumn,v.endColumn),v.endLineNumber,Math.min(this._originalSelection.positionColumn,v.endColumn)):new t.Selection(v.endLineNumber,v.endColumn-this._text.length,v.endLineNumber,v.endColumn)}}e.InPlaceReplaceCommand=y}),define(Q[1090],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateIndent=e.getSpaceCnt=void 0;function t(b,D){let T=0;for(let f=0;f<b.length;f++)b.charAt(f)===" "?T+=D:T++;return T}e.getSpaceCnt=t;function y(b,D,T){b=b<0?0:b;let f="";if(!T){const v=Math.floor(b/D);b=b%D;for(let m=0;m<v;m++)f+=" "}for(let v=0;v<b;v++)f+=" ";return f}e.generateIndent=y}),define(Q[809],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showNextInlineSuggestionActionId=e.showPreviousInlineSuggestionActionId=e.inlineSuggestCommitId=void 0,e.inlineSuggestCommitId="editor.action.inlineSuggest.commit",e.showPreviousInlineSuggestionActionId="editor.action.inlineSuggest.showPrevious",e.showNextInlineSuggestionActionId="editor.action.inlineSuggest.showNext"}),define(Q[568],Y([1,0,15,4,109,51,27]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lengthOfText=e.addPositions=e.applyObservableDecorations=e.ColumnRange=e.getReadonlyEmptyArray=e.applyEdits=void 0;function f(s,o){const u=new v(s),d=o.map(p=>{const c=T.Range.lift(p.range);return{startOffset:u.getOffset(c.getStartPosition()),endOffset:u.getOffset(c.getEndPosition()),text:p.text}});d.sort((p,c)=>c.startOffset-p.startOffset);for(const p of d)s=s.substring(0,p.startOffset)+p.text+s.substring(p.endOffset);return s}e.applyEdits=f;class v{constructor(o){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let u=0;u<o.length;u++)o.charAt(u)===` `&&this.lineStartOffsetByLineIdx.push(u+1)}getOffset(o){return this.lineStartOffsetByLineIdx[o.lineNumber-1]+o.column-1}}const m=[];function S(){return m}e.getReadonlyEmptyArray=S;class h{constructor(o,u){if(this.startColumn=o,this.endColumnExclusive=u,o>u)throw new t.BugIndicatingError(`startColumn ${o} cannot be after endColumnExclusive ${u}`)}toRange(o){return new T.Range(o,this.startColumn,o,this.endColumnExclusive)}equals(o){return this.startColumn===o.startColumn&&this.endColumnExclusive===o.endColumnExclusive}}e.ColumnRange=h;function a(s,o){const u=new y.DisposableStore,d=s.createDecorationsCollection();return u.add((0,b.autorunOpts)({debugName:()=>`Apply decorations from ${o.debugName}`},p=>{const c=o.read(p);d.set(c)})),u.add({dispose:()=>{d.clear()}}),u}e.applyObservableDecorations=a;function r(s,o){return new D.Position(s.lineNumber+o.lineNumber-1,o.lineNumber===1?s.column+o.column-1:o.column)}e.addPositions=r;function i(s){let o=1,u=1;for(const d of s)d===` `?(o++,u=1):u++;return new D.Position(o,u)}e.lengthOfText=i}),define(Q[810],Y([1,0,27,568]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ghostTextOrReplacementEquals=e.GhostTextReplacement=e.GhostTextPart=e.GhostText=void 0;class b{constructor(m,S){this.lineNumber=m,this.parts=S}equals(m){return this.lineNumber===m.lineNumber&&this.parts.length===m.parts.length&&this.parts.every((S,h)=>S.equals(m.parts[h]))}render(m,S=!1){const h=this.lineNumber;return(0,y.applyEdits)(m,[...this.parts.map(a=>({range:{startLineNumber:h,endLineNumber:h,startColumn:a.column,endColumn:a.column},text:S?`[${a.lines.join(` `)}]`:a.lines.join(` `)}))])}renderForScreenReader(m){if(this.parts.length===0)return"";const S=this.parts[this.parts.length-1],h=m.substr(0,S.column-1);return(0,y.applyEdits)(h,this.parts.map(r=>({range:{startLineNumber:1,endLineNumber:1,startColumn:r.column,endColumn:r.column},text:r.lines.join(` `)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(m=>m.lines.length===0)}get lineCount(){return 1+this.parts.reduce((m,S)=>m+S.lines.length-1,0)}}e.GhostText=b;class D{constructor(m,S,h){this.column=m,this.lines=S,this.preview=h}equals(m){return this.column===m.column&&this.lines.length===m.lines.length&&this.lines.every((S,h)=>S===m.lines[h])}}e.GhostTextPart=D;class T{constructor(m,S,h,a=0){this.lineNumber=m,this.columnRange=S,this.newLines=h,this.additionalReservedLineCount=a,this.parts=[new D(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(m){return this.newLines.join(` `)}render(m,S=!1){const h=this.columnRange.toRange(this.lineNumber);return S?(0,y.applyEdits)(m,[{range:t.Range.fromPositions(h.getStartPosition()),text:"("},{range:t.Range.fromPositions(h.getEndPosition()),text:`)[${this.newLines.join(` `)}]`}]):(0,y.applyEdits)(m,[{range:h,text:this.newLines.join(` `)}])}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(m=>m.lines.length===0)}equals(m){return this.lineNumber===m.lineNumber&&this.columnRange.equals(m.columnRange)&&this.newLines.length===m.newLines.length&&this.newLines.every((S,h)=>S===m.newLines[h])&&this.additionalReservedLineCount===m.additionalReservedLineCount}}e.GhostTextReplacement=T;function f(v,m){return v===m?!0:!v||!m?!1:v instanceof b&&m instanceof b||v instanceof T&&m instanceof T?v.equals(m):!1}e.ghostTextOrReplacementEquals=f}),define(Q[811],Y([1,0,482,33,27,810,568]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SingleTextEdit=void 0;class f{constructor(i,s){this.range=i,this.text=s}removeCommonPrefix(i,s){const o=s?this.range.intersectRanges(s):this.range;if(!o)return this;const u=i.getValueInRange(o,1),d=(0,y.commonPrefixLength)(u,this.text),p=(0,T.addPositions)(this.range.getStartPosition(),(0,T.lengthOfText)(u.substring(0,d))),c=this.text.substring(d),l=b.Range.fromPositions(p,this.range.getEndPosition());return new f(l,c)}augments(i){return this.text.startsWith(i.text)&&v(this.range,i.range)}computeGhostText(i,s,o,u=0){let d=this.removeCommonPrefix(i);if(d.range.endLineNumber!==d.range.startLineNumber)return;const p=i.getLineContent(d.range.startLineNumber),c=(0,y.getLeadingWhitespace)(p).length;if(d.range.startColumn-1<=c){const I=(0,y.getLeadingWhitespace)(d.text).length,_=p.substring(d.range.startColumn-1,c),[A,k]=[d.range.getStartPosition(),d.range.getEndPosition()],L=A.column+_.length<=k.column?A.delta(0,_.length):k,R=b.Range.fromPositions(L,k),M=d.text.startsWith(_)?d.text.substring(_.length):d.text.substring(I);d=new f(R,M)}const n=i.getValueInRange(d.range),g=S(n,d.text);if(!g)return;const w=d.range.startLineNumber,E=new Array;if(s==="prefix"){const I=g.filter(_=>_.originalLength===0);if(I.length>1||I.length===1&&I[0].originalStart!==n.length)return}const C=d.text.length-u;for(const I of g){const _=d.range.startColumn+I.originalStart+I.originalLength;if(s==="subwordSmart"&&o&&o.lineNumber===d.range.startLineNumber&&_<o.column||I.originalLength>0)return;if(I.modifiedLength===0)continue;const A=I.modifiedStart+I.modifiedLength,k=Math.max(I.modifiedStart,Math.min(A,C)),L=d.text.substring(I.modifiedStart,k),R=d.text.substring(k,Math.max(I.modifiedStart,A));if(L.length>0){const M=(0,y.splitLines)(L);E.push(new D.GhostTextPart(_,M,!1))}if(R.length>0){const M=(0,y.splitLines)(R);E.push(new D.GhostTextPart(_,M,!0))}}return new D.GhostText(w,E)}}e.SingleTextEdit=f;function v(r,i){return i.getStartPosition().equals(r.getStartPosition())&&i.getEndPosition().isBeforeOrEqual(r.getEndPosition())}let m;function S(r,i){if(m?.originalValue===r&&m?.newValue===i)return m?.changes;{let s=a(r,i,!0);if(s){const o=h(s);if(o>0){const u=a(r,i,!1);u&&h(u)<o&&(s=u)}}return m={originalValue:r,newValue:i,changes:s},s}}function h(r){let i=0;for(const s of r)i+=s.originalLength;return i}function a(r,i,s){if(r.length>5e3||i.length>5e3)return;function o(n){let g=0;for(let w=0,E=n.length;w<E;w++){const C=n.charCodeAt(w);C>g&&(g=C)}return g}const u=Math.max(o(r),o(i));function d(n){if(n<0)throw new Error("unexpected");return u+n+1}function p(n){let g=0,w=0;const E=new Int32Array(n.length);for(let C=0,I=n.length;C<I;C++)if(s&&n[C]==="("){const _=w*100+g;E[C]=d(2*_),g++}else if(s&&n[C]===")"){g=Math.max(g-1,0);const _=w*100+g;E[C]=d(2*_+1),g===0&&w++}else E[C]=n.charCodeAt(C);return E}const c=p(r),l=p(i);return new t.LcsDiff({getElements:()=>c},{getElements:()=>l}).ComputeDiff(!1).changes}}),define(Q[1915],Y([1,0,27,96]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyLinesCommand=void 0;class b{constructor(T,f,v){this._selection=T,this._isCopyingDown=f,this._noop=v||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(T,f){let v=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,v.startLineNumber<v.endLineNumber&&v.endColumn===1&&(this._endLineNumberDelta=1,v=v.setEndPosition(v.endLineNumber-1,T.getLineMaxColumn(v.endLineNumber-1)));const m=[];for(let h=v.startLineNumber;h<=v.endLineNumber;h++)m.push(T.getLineContent(h));const S=m.join(` `);S===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?f.addEditOperation(new t.Range(v.endLineNumber,T.getLineMaxColumn(v.endLineNumber),v.endLineNumber+1,1),v.endLineNumber===T.getLineCount()?"":` `):this._isCopyingDown?f.addEditOperation(new t.Range(v.startLineNumber,1,v.startLineNumber,1),S+` `):f.addEditOperation(new t.Range(v.endLineNumber,T.getLineMaxColumn(v.endLineNumber),v.endLineNumber,T.getLineMaxColumn(v.endLineNumber)),` `+S),this._selectionId=f.trackSelection(v),this._selectionDirection=this._selection.getDirection()}computeCursorState(T,f){let v=f.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let m=v.startLineNumber,S=v.startColumn,h=v.endLineNumber,a=v.endColumn;this._startLineNumberDelta!==0&&(m=m+this._startLineNumberDelta,S=1),this._endLineNumberDelta!==0&&(h=h+this._endLineNumberDelta,a=1),v=y.Selection.createWithDirection(m,S,h,a,this._selectionDirection)}return v}}e.CopyLinesCommand=b}),define(Q[1916],Y([1,0,165,27]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SortLinesCommand=void 0;class b{static{this._COLLATOR=null}static getCollator(){return b._COLLATOR||(b._COLLATOR=new Intl.Collator),b._COLLATOR}constructor(v,m){this.selection=v,this.descending=m,this.selectionId=null}getEditOperations(v,m){const S=T(v,this.selection,this.descending);S&&m.addEditOperation(S.range,S.text),this.selectionId=m.trackSelection(this.selection)}computeCursorState(v,m){return m.getTrackedSelection(this.selectionId)}static canRun(v,m,S){if(v===null)return!1;const h=D(v,m,S);if(!h)return!1;for(let a=0,r=h.before.length;a<r;a++)if(h.before[a]!==h.after[a])return!0;return!1}}e.SortLinesCommand=b;function D(f,v,m){const S=v.startLineNumber;let h=v.endLineNumber;if(v.endColumn===1&&h--,S>=h)return null;const a=[];for(let i=S;i<=h;i++)a.push(f.getLineContent(i));let r=a.slice(0);return r.sort(b.getCollator().compare),m===!0&&(r=r.reverse()),{startLineNumber:S,endLineNumber:h,before:a,after:r}}function T(f,v,m){const S=D(f,v,m);return S?t.EditOperation.replace(new y.Range(S.startLineNumber,1,S.endLineNumber,f.getLineMaxColumn(S.endLineNumber)),S.after.join(` `)):null}}),define(Q[812],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isSemanticColoringEnabled=e.SEMANTIC_HIGHLIGHTING_SETTING_ID=void 0,e.SEMANTIC_HIGHLIGHTING_SETTING_ID="editor.semanticHighlighting";function t(y,b,D){const T=D.getValue(e.SEMANTIC_HIGHLIGHTING_SETTING_ID,{overrideIdentifier:y.getLanguageId(),resource:y.uri})?.enabled;return typeof T=="boolean"?T:b.getColorTheme().semanticHighlighting}e.isSemanticColoringEnabled=t}),define(Q[1091],Y([1,0,204,51,27]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketSelectionRangeProvider=void 0;class D{async provideSelectionRanges(f,v){const m=[];for(const S of v){const h=[];m.push(h);const a=new Map;await new Promise(r=>D._bracketsRightYield(r,0,f,S,a)),await new Promise(r=>D._bracketsLeftYield(r,0,f,S,a,h))}return m}static{this._maxDuration=30}static{this._maxRounds=2}static _bracketsRightYield(f,v,m,S,h){const a=new Map,r=Date.now();for(;;){if(v>=D._maxRounds){f();break}if(!S){f();break}const i=m.bracketPairs.findNextBracket(S);if(!i){f();break}if(Date.now()-r>D._maxDuration){setTimeout(()=>D._bracketsRightYield(f,v+1,m,S,h));break}if(i.bracketInfo.isOpeningBracket){const o=i.bracketInfo.bracketText,u=a.has(o)?a.get(o):0;a.set(o,u+1)}else{const o=i.bracketInfo.getOpeningBrackets()[0].bracketText;let u=a.has(o)?a.get(o):0;if(u-=1,a.set(o,Math.max(0,u)),u<0){let d=h.get(o);d||(d=new t.LinkedList,h.set(o,d)),d.push(i.range)}}S=i.range.getEndPosition()}}static _bracketsLeftYield(f,v,m,S,h,a){const r=new Map,i=Date.now();for(;;){if(v>=D._maxRounds&&h.size===0){f();break}if(!S){f();break}const s=m.bracketPairs.findPrevBracket(S);if(!s){f();break}if(Date.now()-i>D._maxDuration){setTimeout(()=>D._bracketsLeftYield(f,v+1,m,S,h,a));break}if(s.bracketInfo.isOpeningBracket){const u=s.bracketInfo.bracketText;let d=r.has(u)?r.get(u):0;if(d-=1,r.set(u,Math.max(0,d)),d<0){const p=h.get(u);if(p){const c=p.shift();p.size===0&&h.delete(u);const l=b.Range.fromPositions(s.range.getEndPosition(),c.getStartPosition()),n=b.Range.fromPositions(s.range.getStartPosition(),c.getEndPosition());a.push({range:l}),a.push({range:n}),D._addBracketLeading(m,n,a)}}}else{const u=s.bracketInfo.getOpeningBrackets()[0].bracketText,d=r.has(u)?r.get(u):0;r.set(u,d+1)}S=s.range.getStartPosition()}}static _addBracketLeading(f,v,m){if(v.startLineNumber===v.endLineNumber)return;const S=v.startLineNumber,h=f.getLineFirstNonWhitespaceColumn(S);h!==0&&h!==v.startColumn&&(m.push({range:b.Range.fromPositions(new y.Position(S,h),v.getEndPosition())}),m.push({range:b.Range.fromPositions(new y.Position(S,1),v.getEndPosition())}));const a=S-1;if(a>0){const r=f.getLineFirstNonWhitespaceColumn(a);r===v.startColumn&&r!==f.getLineLastNonWhitespaceColumn(a)&&(m.push({range:b.Range.fromPositions(new y.Position(a,r),v.getEndPosition())}),m.push({range:b.Range.fromPositions(new y.Position(a,1),v.getEndPosition())}))}}}e.BracketSelectionRangeProvider=D}),define(Q[1917],Y([1,0,33,27]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordSelectionRangeProvider=void 0;class b{constructor(T=!0){this.selectSubwords=T}provideSelectionRanges(T,f){const v=[];for(const m of f){const S=[];v.push(S),this.selectSubwords&&this._addInWordRanges(S,T,m),this._addWordRanges(S,T,m),this._addWhitespaceLine(S,T,m),S.push({range:T.getFullModelRange()})}return v}_addInWordRanges(T,f,v){const m=f.getWordAtPosition(v);if(!m)return;const{word:S,startColumn:h}=m,a=v.column-h;let r=a,i=a,s=0;for(;r>=0;r--){const o=S.charCodeAt(r);if(r!==a&&(o===95||o===45))break;if((0,t.isLowerAsciiLetter)(o)&&(0,t.isUpperAsciiLetter)(s))break;s=o}for(r+=1;i<S.length;i++){const o=S.charCodeAt(i);if((0,t.isUpperAsciiLetter)(o)&&(0,t.isLowerAsciiLetter)(s))break;if(o===95||o===45)break;s=o}r<i&&T.push({range:new y.Range(v.lineNumber,h+r,v.lineNumber,h+i)})}_addWordRanges(T,f,v){const m=f.getWordAtPosition(v);m&&T.push({range:new y.Range(v.lineNumber,m.startColumn,v.lineNumber,m.endColumn)})}_addWhitespaceLine(T,f,v){f.getLineLength(v.lineNumber)>0&&f.getLineFirstNonWhitespaceColumn(v.lineNumber)===0&&f.getLineLastNonWhitespaceColumn(v.lineNumber)===0&&T.push({range:new y.Range(v.lineNumber,1,v.lineNumber,f.getLineMaxColumn(v.lineNumber))})}}e.WordSelectionRangeProvider=b}),define(Q[304],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetParser=e.TextmateSnippet=e.Variable=e.FormatString=e.Transform=e.Choice=e.Placeholder=e.TransformableMarker=e.Text=e.Marker=e.Scanner=e.TokenType=void 0;var t;(function(s){s[s.Dollar=0]="Dollar",s[s.Colon=1]="Colon",s[s.Comma=2]="Comma",s[s.CurlyOpen=3]="CurlyOpen",s[s.CurlyClose=4]="CurlyClose",s[s.Backslash=5]="Backslash",s[s.Forwardslash=6]="Forwardslash",s[s.Pipe=7]="Pipe",s[s.Int=8]="Int",s[s.VariableName=9]="VariableName",s[s.Format=10]="Format",s[s.Plus=11]="Plus",s[s.Dash=12]="Dash",s[s.QuestionMark=13]="QuestionMark",s[s.EOF=14]="EOF"})(t||(e.TokenType=t={}));class y{constructor(){this.value="",this.pos=0}static{this._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13}}static isDigitCharacter(o){return o>=48&&o<=57}static isVariableCharacter(o){return o===95||o>=97&&o<=122||o>=65&&o<=90}text(o){this.value=o,this.pos=0}tokenText(o){return this.value.substr(o.pos,o.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const o=this.pos;let u=0,d=this.value.charCodeAt(o),p;if(p=y._table[d],typeof p=="number")return this.pos+=1,{type:p,pos:o,len:1};if(y.isDigitCharacter(d)){p=8;do u+=1,d=this.value.charCodeAt(o+u);while(y.isDigitCharacter(d));return this.pos+=u,{type:p,pos:o,len:u}}if(y.isVariableCharacter(d)){p=9;do d=this.value.charCodeAt(o+ ++u);while(y.isVariableCharacter(d)||y.isDigitCharacter(d));return this.pos+=u,{type:p,pos:o,len:u}}p=10;do u+=1,d=this.value.charCodeAt(o+u);while(!isNaN(d)&&typeof y._table[d]>"u"&&!y.isDigitCharacter(d)&&!y.isVariableCharacter(d));return this.pos+=u,{type:p,pos:o,len:u}}}e.Scanner=y;class b{constructor(){this._children=[]}appendChild(o){return o instanceof D&&this._children[this._children.length-1]instanceof D?this._children[this._children.length-1].value+=o.value:(o.parent=this,this._children.push(o)),this}replace(o,u){const{parent:d}=o,p=d.children.indexOf(o),c=d.children.slice(0);c.splice(p,1,...u),d._children=c,function l(n,g){for(const w of n)w.parent=g,l(w.children,w)}(u,d)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let o=this;for(;;){if(!o)return;if(o instanceof r)return o;o=o.parent}}toString(){return this.children.reduce((o,u)=>o+u.toString(),"")}len(){return 0}}e.Marker=b;class D extends b{static escape(o){return o.replace(/\$|}|\\/g,"\\$&")}constructor(o){super(),this.value=o}toString(){return this.value}toTextmateString(){return D.escape(this.value)}len(){return this.value.length}clone(){return new D(this.value)}}e.Text=D;class T extends b{}e.TransformableMarker=T;class f extends T{static compareByIndex(o,u){return o.index===u.index?0:o.isFinalTabstop?1:u.isFinalTabstop||o.index<u.index?-1:o.index>u.index?1:0}constructor(o){super(),this.index=o}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof v?this._children[0]:void 0}toTextmateString(){let o="";return this.transform&&(o=this.transform.toTextmateString()),this.children.length===0&&!this.transform?`$${this.index}`:this.children.length===0?`\${${this.index}${o}}`:this.choice?`\${${this.index}|${this.choice.toTextmateString()}|${o}}`:`\${${this.index}:${this.children.map(u=>u.toTextmateString()).join("")}${o}}`}clone(){const o=new f(this.index);return this.transform&&(o.transform=this.transform.clone()),o._children=this.children.map(u=>u.clone()),o}}e.Placeholder=f;class v extends b{constructor(){super(...arguments),this.options=[]}appendChild(o){return o instanceof D&&(o.parent=this,this.options.push(o)),this}toString(){return this.options[0].value}toTextmateString(){return this.options.map(o=>o.value.replace(/\||,|\\/g,"\\$&")).join(",")}len(){return this.options[0].len()}clone(){const o=new v;return this.options.forEach(o.appendChild,o),o}}e.Choice=v;class m extends b{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(o){const u=this;let d=!1,p=o.replace(this.regexp,function(){return d=!0,u._replace(Array.prototype.slice.call(arguments,0,-2))});return!d&&this._children.some(c=>c instanceof S&&!!c.elseValue)&&(p=this._replace([])),p}_replace(o){let u="";for(const d of this._children)if(d instanceof S){let p=o[d.index]||"";p=d.resolve(p),u+=p}else u+=d.toString();return u}toString(){return""}toTextmateString(){return`/${this.regexp.source}/${this.children.map(o=>o.toTextmateString())}/${(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")}`}clone(){const o=new m;return o.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),o._children=this.children.map(u=>u.clone()),o}}e.Transform=m;class S extends b{constructor(o,u,d,p){super(),this.index=o,this.shorthandName=u,this.ifValue=d,this.elseValue=p}resolve(o){return this.shorthandName==="upcase"?o?o.toLocaleUpperCase():"":this.shorthandName==="downcase"?o?o.toLocaleLowerCase():"":this.shorthandName==="capitalize"?o?o[0].toLocaleUpperCase()+o.substr(1):"":this.shorthandName==="pascalcase"?o?this._toPascalCase(o):"":this.shorthandName==="camelcase"?o?this._toCamelCase(o):"":o&&typeof this.ifValue=="string"?this.ifValue:!o&&typeof this.elseValue=="string"?this.elseValue:o||""}_toPascalCase(o){const u=o.match(/[a-z0-9]+/gi);return u?u.map(d=>d.charAt(0).toUpperCase()+d.substr(1)).join(""):o}_toCamelCase(o){const u=o.match(/[a-z0-9]+/gi);return u?u.map((d,p)=>p===0?d.charAt(0).toLowerCase()+d.substr(1):d.charAt(0).toUpperCase()+d.substr(1)).join(""):o}toTextmateString(){let o="${";return o+=this.index,this.shorthandName?o+=`:/${this.shorthandName}`:this.ifValue&&this.elseValue?o+=`:?${this.ifValue}:${this.elseValue}`:this.ifValue?o+=`:+${this.ifValue}`:this.elseValue&&(o+=`:-${this.elseValue}`),o+="}",o}clone(){return new S(this.index,this.shorthandName,this.ifValue,this.elseValue)}}e.FormatString=S;class h extends T{constructor(o){super(),this.name=o}resolve(o){let u=o.resolve(this);return this.transform&&(u=this.transform.resolve(u||"")),u!==void 0?(this._children=[new D(u)],!0):!1}toTextmateString(){let o="";return this.transform&&(o=this.transform.toTextmateString()),this.children.length===0?`\${${this.name}${o}}`:`\${${this.name}:${this.children.map(u=>u.toTextmateString()).join("")}${o}}`}clone(){const o=new h(this.name);return this.transform&&(o.transform=this.transform.clone()),o._children=this.children.map(u=>u.clone()),o}}e.Variable=h;function a(s,o){const u=[...s];for(;u.length>0;){const d=u.shift();if(!o(d))break;u.unshift(...d.children)}}class r extends b{get placeholderInfo(){if(!this._placeholders){const o=[];let u;this.walk(function(d){return d instanceof f&&(o.push(d),u=!u||u.index<d.index?d:u),!0}),this._placeholders={all:o,last:u}}return this._placeholders}get placeholders(){const{all:o}=this.placeholderInfo;return o}offset(o){let u=0,d=!1;return this.walk(p=>p===o?(d=!0,!1):(u+=p.len(),!0)),d?u:-1}fullLen(o){let u=0;return a([o],d=>(u+=d.len(),!0)),u}enclosingPlaceholders(o){const u=[];let{parent:d}=o;for(;d;)d instanceof f&&u.push(d),d=d.parent;return u}resolveVariables(o){return this.walk(u=>(u instanceof h&&u.resolve(o)&&(this._placeholders=void 0),!0)),this}appendChild(o){return this._placeholders=void 0,super.appendChild(o)}replace(o,u){return this._placeholders=void 0,super.replace(o,u)}toTextmateString(){return this.children.reduce((o,u)=>o+u.toTextmateString(),"")}clone(){const o=new r;return this._children=this.children.map(u=>u.clone()),o}walk(o){a(this.children,o)}}e.TextmateSnippet=r;class i{constructor(){this._scanner=new y,this._token={type:14,pos:0,len:0}}static escape(o){return o.replace(/\$|}|\\/g,"\\$&")}static asInsertText(o){return new i().parse(o).toString()}static guessNeedsClipboard(o){return/\${?CLIPBOARD/.test(o)}parse(o,u,d){const p=new r;return this.parseFragment(o,p),this.ensureFinalTabstop(p,d??!1,u??!1),p}parseFragment(o,u){const d=u.children.length;for(this._scanner.text(o),this._token=this._scanner.next();this._parse(u););const p=new Map,c=[];u.walk(g=>(g instanceof f&&(g.isFinalTabstop?p.set(0,void 0):!p.has(g.index)&&g.children.length>0?p.set(g.index,g.children):c.push(g)),!0));const l=(g,w)=>{const E=p.get(g.index);if(!E)return;const C=new f(g.index);C.transform=g.transform;for(const I of E){const _=I.clone();C.appendChild(_),_ instanceof f&&p.has(_.index)&&!w.has(_.index)&&(w.add(_.index),l(_,w),w.delete(_.index))}u.replace(g,[C])},n=new Set;for(const g of c)l(g,n);return u.children.slice(d)}ensureFinalTabstop(o,u,d){(u||d&&o.placeholders.length>0)&&(o.placeholders.find(c=>c.index===0)||o.appendChild(new f(0)))}_accept(o,u){if(o===void 0||this._token.type===o){const d=u?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),d}return!1}_backTo(o){return this._scanner.pos=o.pos+o.len,this._token=o,!1}_until(o){const u=this._token;for(;this._token.type!==o;){if(this._token.type===14)return!1;if(this._token.type===5){const p=this._scanner.next();if(p.type!==0&&p.type!==4&&p.type!==5)return!1}this._token=this._scanner.next()}const d=this._scanner.value.substring(u.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),d}_parse(o){return this._parseEscaped(o)||this._parseTabstopOrVariableName(o)||this._parseComplexPlaceholder(o)||this._parseComplexVariable(o)||this._parseAnything(o)}_parseEscaped(o){let u;return(u=this._accept(5,!0))?(u=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||u,o.appendChild(new D(u)),!0):!1}_parseTabstopOrVariableName(o){let u;const d=this._token;return this._accept(0)&&(u=this._accept(9,!0)||this._accept(8,!0))?(o.appendChild(/^\d+$/.test(u)?new f(Number(u)):new h(u)),!0):this._backTo(d)}_parseComplexPlaceholder(o){let u;const d=this._token;if(!(this._accept(0)&&this._accept(3)&&(u=this._accept(8,!0))))return this._backTo(d);const c=new f(Number(u));if(this._accept(1))for(;;){if(this._accept(4))return o.appendChild(c),!0;if(!this._parse(c))return o.appendChild(new D("${"+u+":")),c.children.forEach(o.appendChild,o),!0}else if(c.index>0&&this._accept(7)){const l=new v;for(;;){if(this._parseChoiceElement(l)){if(this._accept(2))continue;if(this._accept(7)&&(c.appendChild(l),this._accept(4)))return o.appendChild(c),!0}return this._backTo(d),!1}}else return this._accept(6)?this._parseTransform(c)?(o.appendChild(c),!0):(this._backTo(d),!1):this._accept(4)?(o.appendChild(c),!0):this._backTo(d)}_parseChoiceElement(o){const u=this._token,d=[];for(;!(this._token.type===2||this._token.type===7);){let p;if((p=this._accept(5,!0))?p=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||p:p=this._accept(void 0,!0),!p)return this._backTo(u),!1;d.push(p)}return d.length===0?(this._backTo(u),!1):(o.appendChild(new D(d.join(""))),!0)}_parseComplexVariable(o){let u;const d=this._token;if(!(this._accept(0)&&this._accept(3)&&(u=this._accept(9,!0))))return this._backTo(d);const c=new h(u);if(this._accept(1))for(;;){if(this._accept(4))return o.appendChild(c),!0;if(!this._parse(c))return o.appendChild(new D("${"+u+":")),c.children.forEach(o.appendChild,o),!0}else return this._accept(6)?this._parseTransform(c)?(o.appendChild(c),!0):(this._backTo(d),!1):this._accept(4)?(o.appendChild(c),!0):this._backTo(d)}_parseTransform(o){const u=new m;let d="",p="";for(;!this._accept(6);){let c;if(c=this._accept(5,!0)){c=this._accept(6,!0)||c,d+=c;continue}if(this._token.type!==14){d+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let c;if(c=this._accept(5,!0)){c=this._accept(5,!0)||this._accept(6,!0)||c,u.appendChild(new D(c));continue}if(!(this._parseFormatString(u)||this._parseAnything(u)))return!1}for(;!this._accept(4);){if(this._token.type!==14){p+=this._accept(void 0,!0);continue}return!1}try{u.regexp=new RegExp(d,p)}catch{return!1}return o.transform=u,!0}_parseFormatString(o){const u=this._token;if(!this._accept(0))return!1;let d=!1;this._accept(3)&&(d=!0);const p=this._accept(8,!0);if(p)if(d){if(this._accept(4))return o.appendChild(new S(Number(p))),!0;if(!this._accept(1))return this._backTo(u),!1}else return o.appendChild(new S(Number(p))),!0;else return this._backTo(u),!1;if(this._accept(6)){const c=this._accept(9,!0);return!c||!this._accept(4)?(this._backTo(u),!1):(o.appendChild(new S(Number(p),c)),!0)}else if(this._accept(11)){const c=this._until(4);if(c)return o.appendChild(new S(Number(p),void 0,c,void 0)),!0}else if(this._accept(12)){const c=this._until(4);if(c)return o.appendChild(new S(Number(p),void 0,void 0,c)),!0}else if(this._accept(13)){const c=this._until(1);if(c){const l=this._until(4);if(l)return o.appendChild(new S(Number(p),void 0,c,l)),!0}}else{const c=this._until(4);if(c)return o.appendChild(new S(Number(p),void 0,void 0,c)),!0}return this._backTo(u),!1}_parseAnything(o){return this._token.type!==14?(o.appendChild(new D(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}e.SnippetParser=i}),define(Q[1092],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyModel=e.StickyElement=e.StickyRange=void 0;class t{constructor(T,f){this.startLineNumber=T,this.endLineNumber=f}}e.StickyRange=t;class y{constructor(T,f,v){this.range=T,this.children=f,this.parent=v}}e.StickyElement=y;class b{constructor(T,f,v,m){this.uri=T,this.version=f,this.element=v,this.outlineProviderId=m}}e.StickyModel=b}),define(Q[1093],Y([1,0,20,128,33]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompletionModel=e.LineContext=void 0;class D{constructor(m,S){this.leadingLineContent=m,this.characterCountDelta=S}}e.LineContext=D;var T;(function(v){v[v.Nothing=0]="Nothing",v[v.All=1]="All",v[v.Incr=2]="Incr"})(T||(T={}));class f{constructor(m,S,h,a,r,i,s=y.FuzzyScoreOptions.default,o=void 0){this.clipboardText=o,this._snippetCompareFn=f._compareCompletionItems,this._items=m,this._column=S,this._wordDistance=a,this._options=r,this._refilterKind=1,this._lineContext=h,this._fuzzyScoreOptions=s,i==="top"?this._snippetCompareFn=f._compareCompletionItemsSnippetsUp:i==="bottom"&&(this._snippetCompareFn=f._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(m){(this._lineContext.leadingLineContent!==m.leadingLineContent||this._lineContext.characterCountDelta!==m.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<m.characterCountDelta&&this._filteredItems?2:1,this._lineContext=m)}get items(){return this._ensureCachedState(),this._filteredItems}getItemsByProvider(){return this._ensureCachedState(),this._itemsByProvider}getIncompleteProvider(){this._ensureCachedState();const m=new Set;for(const[S,h]of this.getItemsByProvider())h.length>0&&h[0].container.incomplete&&m.add(S);return m}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const m=[],{leadingLineContent:S,characterCountDelta:h}=this._lineContext;let a="",r="";const i=this._refilterKind===1?this._items:this._filteredItems,s=[],o=!this._options.filterGraceful||i.length>2e3?y.fuzzyScore:y.fuzzyScoreGracefulAggressive;for(let u=0;u<i.length;u++){const d=i[u];if(d.isInvalid)continue;const p=this._itemsByProvider.get(d.provider);p?p.push(d):this._itemsByProvider.set(d.provider,[d]);const c=d.position.column-d.editStart.column,l=c+h-(d.position.column-this._column);if(a.length!==l&&(a=l===0?"":S.slice(-l),r=a.toLowerCase()),d.word=a,l===0)d.score=y.FuzzyScore.Default;else{let n=0;for(;n<c;){const g=a.charCodeAt(n);if(g===32||g===9)n+=1;else break}if(n>=l)d.score=y.FuzzyScore.Default;else if(typeof d.completion.filterText=="string"){const g=o(a,r,n,d.completion.filterText,d.filterTextLow,0,this._fuzzyScoreOptions);if(!g)continue;(0,b.compareIgnoreCase)(d.completion.filterText,d.textLabel)===0?d.score=g:(d.score=(0,y.anyScore)(a,r,n,d.textLabel,d.labelLow,0),d.score[0]=g[0])}else{const g=o(a,r,n,d.textLabel,d.labelLow,0,this._fuzzyScoreOptions);if(!g)continue;d.score=g}}d.idx=u,d.distance=this._wordDistance.distance(d.position,d.completion),s.push(d),m.push(d.textLabel.length)}this._filteredItems=s.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:m.length?(0,t.quickSelect)(m.length-.85,m,(u,d)=>u-d):0}}static _compareCompletionItems(m,S){return m.score[0]>S.score[0]?-1:m.score[0]<S.score[0]?1:m.distance<S.distance?-1:m.distance>S.distance?1:m.idx<S.idx?-1:m.idx>S.idx?1:0}static _compareCompletionItemsSnippetsDown(m,S){if(m.completion.kind!==S.completion.kind){if(m.completion.kind===27)return 1;if(S.completion.kind===27)return-1}return f._compareCompletionItems(m,S)}static _compareCompletionItemsSnippetsUp(m,S){if(m.completion.kind!==S.completion.kind){if(m.completion.kind===27)return-1;if(S.completion.kind===27)return 1}return f._compareCompletionItems(m,S)}}e.CompletionModel=f}),define(Q[1918],Y([1,0,20,4,486]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommitCharacterController=void 0;class D{constructor(f,v,m,S){this._disposables=new y.DisposableStore,this._disposables.add(m.onDidSuggest(h=>{h.completionModel.items.length===0&&this.reset()})),this._disposables.add(m.onDidCancel(h=>{this.reset()})),this._disposables.add(v.onDidShow(()=>this._onItem(v.getFocusedItem()))),this._disposables.add(v.onDidFocus(this._onItem,this)),this._disposables.add(v.onDidHide(this.reset,this)),this._disposables.add(f.onWillType(h=>{if(this._active&&!v.isFrozen()&&m.state!==0){const a=h.charCodeAt(h.length-1);this._active.acceptCharacters.has(a)&&f.getOption(0)&&S(this._active.item)}}))}_onItem(f){if(!f||!(0,t.isNonEmptyArray)(f.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===f.item)return;const v=new b.CharacterSet;for(const m of f.item.completion.commitCharacters)m.length>0&&v.add(m.charCodeAt(0));this._active={acceptCharacters:v,item:f}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}e.CommitCharacterController=D}),define(Q[1919],Y([1,0,4]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OvertypingCapturer=void 0;class y{static{this._maxSelectionLength=51200}constructor(D,T){this._disposables=new t.DisposableStore,this._lastOvertyped=[],this._locked=!1,this._disposables.add(D.onWillType(()=>{if(this._locked||!D.hasModel())return;const f=D.getSelections(),v=f.length;let m=!1;for(let h=0;h<v;h++)if(!f[h].isEmpty()){m=!0;break}if(!m){this._lastOvertyped.length!==0&&(this._lastOvertyped.length=0);return}this._lastOvertyped=[];const S=D.getModel();for(let h=0;h<v;h++){const a=f[h];if(S.getValueLengthInRange(a)>y._maxSelectionLength)return;this._lastOvertyped[h]={value:S.getValueInRange(a),multiline:a.startLineNumber!==a.endLineNumber}}})),this._disposables.add(T.onDidTrigger(f=>{this._locked=!0})),this._disposables.add(T.onDidCancel(f=>{this._locked=!1}))}getLastOvertypedInfo(D){if(D>=0&&D<this._lastOvertyped.length)return this._lastOvertyped[D]}dispose(){this._disposables.dispose()}}e.OvertypingCapturer=y}),define(Q[1094],Y([1,0,20,27,1091]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordDistance=void 0;class D{static{this.None=new class extends D{distance(){return 0}}}static async create(f,v){if(!v.getOption(116).localityBonus||!v.hasModel())return D.None;const m=v.getModel(),S=v.getPosition();if(!f.canComputeWordRanges(m.uri))return D.None;const[h]=await new b.BracketSelectionRangeProvider().provideSelectionRanges(m,[S]);if(h.length===0)return D.None;const a=await f.computeWordRanges(m.uri,h[0].range);if(!a)return D.None;const r=m.getWordUntilPosition(S);return delete a[r.word],new class extends D{distance(i,s){if(!S.equals(v.getPosition()))return 0;if(s.kind===17)return 2<<20;const o=typeof s.label=="string"?s.label:s.label.label,u=a[o];if((0,t.isFalsyOrEmpty)(u))return 2<<20;const d=(0,t.binarySearch)(u,y.Range.fromPositions(i),y.Range.compareRangesUsingStarts),p=d>=0?u[d]:u[Math.max(0,~d-1)];let c=h.length;for(const l of h){if(!y.Range.containsRange(l.range,p))break;c-=1}return c}}}}e.WordDistance=D}),define(Q[1920],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/editableDropdown/browser/dropdown",e)}),define(Q[1921],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/loadingSpinner/loadingSpinner",e)}),define(Q[1922],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/loadingSpinner/loadingSpinner.component",e)}),define(Q[1923],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/panel/panel.component",e)}),define(Q[1924],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/panel/tabActions",e)}),define(Q[1925],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/propertiesContainer/togglePropertiesAction",e)}),define(Q[1926],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/selectBox/selectBox",e)}),define(Q[1927],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/table/formatters",e)}),define(Q[272],Y([1,0,201,1927]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTreeGridExpandableColumnFormatter=e.slickGridDataItemColumnValueWithNoData=e.slickGridDataItemColumnValueExtractor=e.imageFormatter=e.iconCssFormatter=e.getCellDisplayValue=e.textFormatter=e.hyperLinkFormatter=e.isCssIconCellValue=e.isHyperlinkCellValue=e.DBCellValue=void 0;var b;(function(s){function o(u){return u!==void 0&&u.displayValue!==void 0&&u.isNull!==void 0}s.isDBCellValue=o})(b||(e.DBCellValue=b={}));function D(s){return!!s?.linkOrCommand}e.isHyperlinkCellValue=D;function T(s){return!!s?.iconCssClass}e.isCssIconCellValue=T;function f(s,o,u,d,p){let c="grid-cell-value-container",l="",n=!1;return b.isDBCellValue(u)?(l="NULL",u.isNull?c+=" missing-value":(l=m(u.displayValue),n=!0)):D(u)&&(l=m(u.displayText),n=!0),n?`<a class="${c}" title="${l}">${l}</a>`:`<span title="${l}" class="${c}">${l}</span>`}e.hyperLinkFormatter=f;function v(s,o,u,d,p,c){let l="grid-cell-value-container",n="",g="",w="";b.isDBCellValue(u)?(n="NULL",u.isNull?l+=" missing-value":(n=m(u.displayValue),g=n)):typeof u=="string"||u&&u.text?(u.text?(n=u.text,u.style&&(w=u.style)):n=u,n=m(n),g=n):u&&u.title&&(u.title&&(n=u.title,u.style&&(w=u.style)),n=m(n),g=n);const E=`<span title="${g}" style="${w}" class="${l}">${n}</span>`;return c?{text:E,addClasses:c}:E}e.textFormatter=v;function m(s){let o=s.length>250?s.slice(0,250)+"...":s;return o=o.replace(/(\r\n|\n|\r)/g,"\u21B5"),(0,t.escape)(o)}e.getCellDisplayValue=m;function S(s,o,u,d,p){return T(u)?`<div role="image" title="${(0,t.escape)(u.title??"")}" aria-label="${(0,t.escape)(u.title??"")}" class="grid-cell-value-container icon codicon slick-icon-cell-content ${u.iconCssClass}"></div>`:v(s,o,u,d,p)}e.iconCssFormatter=S;function h(s,o,u,d,p){return`<img src="${u.text}" />`}e.imageFormatter=h;function a(s,o){let u=s[o.field];return o.type==="hyperlink"?{displayText:u.displayText,linkOrCommand:u.linkOrCommand}:{text:u,ariaLabel:u&&(0,t.escape)(u)}}e.slickGridDataItemColumnValueExtractor=a;function r(s,o){let u=s[o.field];return typeof u=="number"&&(u=u.toString()),u instanceof Array&&(u=u.toString()),T(u)?u:{text:u,ariaLabel:u?(0,t.escape)(u):u!==void 0?(0,y.localize)(0,null):u}}e.slickGridDataItemColumnValueWithNoData=r;function i(s){return(o,u,d,p,c)=>{const l=`<span style='display:inline-block;height:1px;width:${15*(c.level-1)}px'></span>`,n=s(o,u,d,p,c);return c.isParent?c.expanded?`<div>${l}<span class='codicon codicon-chevron-down toggle' style='font-weight:bold;'></span> ${n}</div>`:`<div>${l}<span class='codicon codicon-chevron-right toggle' style='font-weight:bold;'></span> ${n}</div>`:`${l}${n}`}}e.createTreeGridExpandableColumnFormatter=i}),define(Q[1928],Y([1,0,272]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDataGridFormatter=void 0;function y(b){switch(b){case"text":return t.textFormatter;case"hyperlink":return t.hyperLinkFormatter;case"image":return t.imageFormatter}}e.getDataGridFormatter=y}),define(Q[1929],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/table/plugins/checkboxSelectColumn.plugin",e)}),define(Q[1930],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/table/plugins/contextMenuColumn.plugin",e)}),define(Q[1931],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/table/plugins/headerFilter.plugin",e)}),define(Q[1932],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/table/plugins/loadingSpinner.plugin",e)}),define(Q[1933],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/table/plugins/rowDetailView",e)}),define(Q[492],Y([1,0,201,42,1933]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RowDetailView=void 0;const D={columnId:"_detail_selector",toolTip:"",width:30};class T{constructor(v){this.onAsyncResponse=new Slick.Event,this.onAsyncEndUpdate=new Slick.Event,this.onAfterRowDetailToggle=new Slick.Event,this.onBeforeRowDetailToggle=new Slick.Event,this._expandedRows=[],this._handler=new Slick.EventHandler,this._options=v||Object.create(null),(0,y.mixin)(this._options,D,!1)}init(v){this._grid=v,this._dataView=this._grid.getData(),this._grid.getOptions().minRowBuffer=this._options.panelRows+3,this._handler.subscribe(this._grid.onClick,(m,S)=>this.handleClick(m,S)).subscribe(this._grid.onSort,()=>this.handleSort()).subscribe(this._grid.onScroll,()=>this.handleScroll()),this._dataView.onRowCountChanged.subscribe(()=>{this._grid.updateRowCount(),this._grid.render()}),this._dataView.onRowsChanged.subscribe((m,S)=>{this._grid.invalidateRows(S.rows),this._grid.render()}),this.subscribeToOnAsyncResponse()}destroy(){this._handler.unsubscribeAll(),this.onAsyncResponse.unsubscribe(),this.onAsyncEndUpdate.unsubscribe(),this.onAfterRowDetailToggle.unsubscribe(),this.onBeforeRowDetailToggle.unsubscribe()}getOptions(){return this._options}setOptions(v){this._options=jQuery.extend(!0,{},this._options,v)}handleClick(v,m){if(this._options.useRowClick||this._grid.getColumns()[m.cell].id===this._options.columnId&&jQuery(v.target).hasClass("detailView-toggle")){if(this._grid.getEditorLock().isActive()&&!this._grid.getEditorLock().commitCurrentEdit()){v.preventDefault(),v.stopImmediatePropagation();return}const S=this._dataView.getItem(m.row);this.onBeforeRowDetailToggle.notify({grid:this._grid,item:S},v,this),this.toggleRowSelection(S),this.onAfterRowDetailToggle.notify({grid:this._grid,item:S},v,this),v.stopPropagation(),v.stopImmediatePropagation()}}handleSort(){this.collapseAll()}handleScroll(){const v=this._grid.getRenderedRange(),m=v.top>0?v.top:0,S=v.bottom>this._dataView.getLength()?v.bottom:this._dataView.getLength();if(S<=0)return;const h=this._dataView.getItemByIdx(m);if(h._parent===void 0){const r=this._dataView.getItemByIdx(m+1);r!==void 0&&r._parent!==void 0&&r._parent===h&&this.saveDetailView(h)}const a=this._dataView.getItemByIdx(S-1);a._parent!==void 0&&this.saveDetailView(a._parent)}toggleRowSelection(v){this._dataView.beginUpdate(),this.handleAccordionShowHide(v),this._dataView.endUpdate()}collapseAll(){for(let v=this._expandedRows.length-1;v>=0;v--)this.collapseItem(this._expandedRows[v])}saveDetailView(v){if(jQuery("#innerDetailView_"+v.id)){const S=jQuery("#innerDetailView_"+v.id).html();S!==void 0&&(v._detailContent=S)}}collapseItem(v){this._options.loadOnce&&this.saveDetailView(v),v._collapsed=!0;for(let m=1;m<=v._sizePadding;m++)this._dataView.deleteItem(v.id+"."+m);v._sizePadding=0,this._dataView.updateItem(v.id,v),this._expandedRows=this._expandedRows.filter(m=>m.id!==v.id)}expandItem(v){if(v._collapsed=!1,this._expandedRows.push(v),v._detailContent||(v._detailViewLoaded=!1),!v._detailViewLoaded||this._options.loadOnce!==!0)v._detailContent=this._options.preTemplate(v);else{this.onAsyncResponse.notify({itemDetail:v,detailView:v._detailContent},void 0,this),this.applyTemplateNewLineHeight(v),this._dataView.updateItem(v.id,v);return}this.applyTemplateNewLineHeight(v),this._dataView.updateItem(v.id,v),this._options.process(v)}subscribeToOnAsyncResponse(){this.onAsyncResponse.subscribe((v,m)=>{if(!m||!m.itemDetail)throw new Error('Slick.RowDetailView plugin requires the onAsyncResponse() to supply "args.itemDetail" property.');m.detailView?m.itemDetail._detailContent=m.detailView:m.itemDetail._detailContent=this._options.postTemplate(m.itemDetail),m.itemDetail._detailViewLoaded=!0,this._dataView.updateItem(m.itemDetail.id,m.itemDetail),this.onAsyncEndUpdate.notify({grid:this._grid,itemDetail:m.itemDetail},v,this)})}handleAccordionShowHide(v){v&&(v._collapsed?this.expandItem(v):this.collapseItem(v))}getPaddingItem(v,m){const S={};for(const h in this._grid.getData())S[h]=null;return S.id=v.id+"."+m,S._collapsed=!0,S._isPadding=!0,S._parent=v,S}getErrorItem(v,m){const S=Object.create(null);return S.id=v.id+"."+m,S._collapsed=!0,S._isPadding=!1,S._parent=v,S.name=v.message?v.message:b.localize(0,null),v._child=S,S}applyTemplateNewLineHeight(v,m=!1){const S=this._options.panelRows,h=13;v._sizePadding=Math.ceil(S*2*h/this._grid.getOptions().rowHeight),v._height=v._sizePadding*this._grid.getOptions().rowHeight;const a=this._dataView.getIdxById(v.id);for(let r=1;r<=v._sizePadding;r++)m?this._dataView.insertItem(a+r,this.getErrorItem(v,"error")):this._dataView.insertItem(a+r,this.getPaddingItem(v,r))}getColumnDefinition(){return{id:this._options.columnId,filterable:!1,name:"",toolTip:this._options.toolTip,field:"sel",width:this._options.width,resizable:!1,sortable:!1,cssClass:this._options.cssClass,formatter:(v,m,S,h,a)=>this.detailSelectionFormatter(v,m,S,h,a)}}detailSelectionFormatter(v,m,S,h,a){if(a._collapsed===void 0&&(a._collapsed=!0,a._sizePadding=0,a._height=0,a._isPadding=!1,a._parent=void 0),a._isPadding!==!0){if(a._collapsed)return"<div class='detailView-toggle expand'></div>";{const r=[],i=this._grid.getOptions().rowHeight,s=5;return r.push('<div class="detailView-toggle collapse"></div></div>'),r.push(`<div id='cellDetailView_${a.id}' class='dynamic-cell-detail' `),r.push(`style='height:${a._height}px;`),r.push(`top:${i}px'>`),r.push(`<div id='detailViewContainer_${a.id}"' class='detail-container' style='max-height:${a._height-i+s}px'>`),r.push(`<div id='innerDetailView_${a.id}'>${(0,t.escape)(a._detailContent)}</div></div>`),r.join("")}}}}e.RowDetailView=T}),define(Q[1934],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/table/table",e)}),define(Q[1935],Y([2,3]),function(q,e){return q.create("sql/base/browser/ui/taskbar/overflowActionbar",e)}),define(Q[1936],Y([2,3]),function(q,e){return q.create("sql/base/common/locConstants",e)}),define(Q[228],Y([1,0,1936]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.aboutDetail=e.getNewThemeNotification=e.getThemeUpdatedNotification=e.installTooltip=e.downloadTooltip=e.download=e.experimentalCustomizationDescription=e.outputFontFamilyDescription=e.outputFontSizeDescription=e.outputLineHeightDescription=e.interactiveWindowCollapseCodeCellsDescription=e.markupFontSizeDescription=e.textOutputLineLimitDescription=e.globalToolbarShowLabelDescription=e.consolidatedRunButtonDescription=e.dragAndDropDescription=e.showFoldingControlsDescription=e.consolidatedOutputButtonDescription=e.globalToolbarDescription=e.insertToolbarPositionDescription=e.focusIndicatorDescription=e.compactViewDescription=e.undoRedoPerCellDescription=e.cellToolbarVisibilityDescription=e.diffEnablePreviewDescription=e.showCellStatusbarDescription=e.cellToolbarLocationDescription=e.displayOrderDescription=e.issueReporterPageReviewGuidanceLabel=e.issueReporterServiceAzuredatastudio=e.terminalIntegratedInheritEnvDescription=e.terminalIntegratedEnvWindowsDescription=e.terminalIntegratedEnvLinuxDescription=e.terminalIntegratedEnvOsxDescription=e.terminalIntegratedDetectLocaleDescrption=e.terminalIntegratedCommandsToSkipShellDescrption=e.terminalIntegratedAutoRepliesDescription=e.terminalIntegratedAllowChordsDescription=e.windowTitleAppNameDescription=e.versionMismatchVsCode=e.versionMismatch=e.versionSyntax=e.notebooksNotSupportedError=e.workspaceTrustEmptyWindowDescription=e.workspaceTrustDescription=e.desktopContributionMiinstallVsix=e.watermarkNewNotebook=e.watermarkNewSqlFile=e.localizationsContributionActivateLanguagePack=e.localizationsContributionUpdateLocale=e.watcherExclude=e.filesContributionMaxMemoryForLargeFilesMB=e.fileActionsContributionMiNewDeployment=e.fileActionsContributionMiNewNotebook=e.fileActionsContributionMiNewQuery=e.fileActionsContributionNewQuery=e.extensionsWorkbenchServiceIncompatible=e.extensionsViewsScenarioTypeUndefined=e.extensionsViewletRecommendedExtensions=e.extensionsActionsReinstallActionSuccessReload=e.extensionsActionsInstallExtensionCompletedAndReloadRequired=e.extensionsActionsEnableRemote=e.extensionsActionsUninstallExtensionComplete=e.extensionsActionsPostDisableTooltip=e.extensionsActionsPostEnableTooltip=e.extensionsActionsEnableLocally=e.extensionsActionsPostUpdateTooltip=e.extensionsActionsPostUninstallTooltip=e.extensionsContributionInstallVSIXActionSuccessReload=e.extensionsContributionInstallVSIXActionAllowNone=e.extensionsContributionExtensionsPolicy=e.menusExtensionPointDataGridContext=e.menusExtensionPointConnectionDialogBrowseTreeContext=e.menusExtensionPointObjectExplorerContext=e.menusExtensionPointDataExplorerContext=e.menusExtensionPointDataExplorerAction=e.menusExtensionPointNotebookToolbar=e.menusExtensionPointNotebookTitle=e.menusExtensionPointNotebookCellTitle=e.menusExtensionPointDashboardToolbar=e.updateConfigContributionShowReleaseNotes=e.updateConfigContributionEnableWindowsBackgroundUpdates=e.updateConfigContributionDefault=void 0,e.updateConfigContributionDefault=(0,t.localize)(0,null),e.updateConfigContributionEnableWindowsBackgroundUpdates=(0,t.localize)(1,null),e.updateConfigContributionShowReleaseNotes=(0,t.localize)(2,null),e.menusExtensionPointDashboardToolbar=(0,t.localize)(3,null),e.menusExtensionPointNotebookCellTitle=(0,t.localize)(4,null),e.menusExtensionPointNotebookTitle=(0,t.localize)(5,null),e.menusExtensionPointNotebookToolbar=(0,t.localize)(6,null),e.menusExtensionPointDataExplorerAction=(0,t.localize)(7,null),e.menusExtensionPointDataExplorerContext=(0,t.localize)(8,null),e.menusExtensionPointObjectExplorerContext=(0,t.localize)(9,null),e.menusExtensionPointConnectionDialogBrowseTreeContext=(0,t.localize)(10,null),e.menusExtensionPointDataGridContext=(0,t.localize)(11,null),e.extensionsContributionExtensionsPolicy=(0,t.localize)(12,null),e.extensionsContributionInstallVSIXActionAllowNone=(0,t.localize)(13,null);function y(p){return(0,t.localize)(14,null,p)}e.extensionsContributionInstallVSIXActionSuccessReload=y,e.extensionsActionsPostUninstallTooltip=(0,t.localize)(15,null),e.extensionsActionsPostUpdateTooltip=(0,t.localize)(16,null),e.extensionsActionsEnableLocally=(0,t.localize)(17,null),e.extensionsActionsPostEnableTooltip=(0,t.localize)(18,null),e.extensionsActionsPostDisableTooltip=(0,t.localize)(19,null);function b(p){return(0,t.localize)(20,null,p)}e.extensionsActionsUninstallExtensionComplete=b;function D(p){return(0,t.localize)(21,null,p)}e.extensionsActionsEnableRemote=D;function T(p){return(0,t.localize)(22,null,p)}e.extensionsActionsInstallExtensionCompletedAndReloadRequired=T;function f(p){return(0,t.localize)(23,null,p)}e.extensionsActionsReinstallActionSuccessReload=f,e.extensionsViewletRecommendedExtensions=(0,t.localize)(24,null),e.extensionsViewsScenarioTypeUndefined=(0,t.localize)(25,null);function v(p,c,l,n){return(0,t.localize)(26,null,c,p,l,n)}e.extensionsWorkbenchServiceIncompatible=v,e.fileActionsContributionNewQuery=(0,t.localize)(27,null),e.fileActionsContributionMiNewQuery=(0,t.localize)(28,null),e.fileActionsContributionMiNewNotebook=(0,t.localize)(29,null),e.fileActionsContributionMiNewDeployment=(0,t.localize)(30,null),e.filesContributionMaxMemoryForLargeFilesMB=(0,t.localize)(31,null),e.watcherExclude=(0,t.localize)(32,null);function m(p){return(0,t.localize)(33,null,p)}e.localizationsContributionUpdateLocale=m;function S(p){return(0,t.localize)(34,null,p)}e.localizationsContributionActivateLanguagePack=S,e.watermarkNewSqlFile=(0,t.localize)(35,null),e.watermarkNewNotebook=(0,t.localize)(36,null),e.desktopContributionMiinstallVsix=(0,t.localize)(37,null),e.workspaceTrustDescription=(0,t.localize)(38,null);function h(p){return(0,t.localize)(39,null,p)}e.workspaceTrustEmptyWindowDescription=h,e.notebooksNotSupportedError=(0,t.localize)(40,null);function a(p,c){return(0,t.localize)(41,null,p,c)}e.versionSyntax=a;function r(p,c){return(0,t.localize)(42,null,p,c)}e.versionMismatch=r;function i(p,c,l){return(0,t.localize)(43,null,p,c,l)}e.versionMismatchVsCode=i,e.windowTitleAppNameDescription=(0,t.localize)(44,null),e.terminalIntegratedAllowChordsDescription=(0,t.localize)(45,null),e.terminalIntegratedAutoRepliesDescription=(0,t.localize)(46,null,'`"Terminate batch job (Y/N)": "\\r"`','`"\\r"`');function s(p){return(0,t.localize)(47,null,p.sort().map(c=>`- ${c}`).join(` `),`[${(0,t.localize)(48,null)}](command:workbench.action.openRawDefaultSettings '${(0,t.localize)(49,null)}')`)}e.terminalIntegratedCommandsToSkipShellDescrption=s,e.terminalIntegratedDetectLocaleDescrption=(0,t.localize)(50,null),e.terminalIntegratedEnvOsxDescription=(0,t.localize)(51,null),e.terminalIntegratedEnvLinuxDescription=(0,t.localize)(52,null),e.terminalIntegratedEnvWindowsDescription=(0,t.localize)(53,null),e.terminalIntegratedInheritEnvDescription=(0,t.localize)(54,null),e.issueReporterServiceAzuredatastudio=(0,t.localize)(55,null),e.issueReporterPageReviewGuidanceLabel=(0,t.localize)(56,null),e.displayOrderDescription=(0,t.localize)(57,null),e.cellToolbarLocationDescription=(0,t.localize)(58,null),e.showCellStatusbarDescription=(0,t.localize)(59,null),e.diffEnablePreviewDescription=(0,t.localize)(60,null),e.cellToolbarVisibilityDescription=(0,t.localize)(61,null),e.undoRedoPerCellDescription=(0,t.localize)(62,null),e.compactViewDescription=(0,t.localize)(63,null),e.focusIndicatorDescription=(0,t.localize)(64,null),e.insertToolbarPositionDescription=(0,t.localize)(65,null),e.globalToolbarDescription=(0,t.localize)(66,null),e.consolidatedOutputButtonDescription=(0,t.localize)(67,null),e.showFoldingControlsDescription=(0,t.localize)(68,null),e.dragAndDropDescription=(0,t.localize)(69,null),e.consolidatedRunButtonDescription=(0,t.localize)(70,null),e.globalToolbarShowLabelDescription=(0,t.localize)(71,null),e.textOutputLineLimitDescription=(0,t.localize)(72,null),e.markupFontSizeDescription=(0,t.localize)(73,null),e.interactiveWindowCollapseCodeCellsDescription=(0,t.localize)(74,null),e.outputLineHeightDescription=(0,t.localize)(75,null),e.outputFontSizeDescription=(0,t.localize)(76,null),e.outputFontFamilyDescription=(0,t.localize)(77,null),e.experimentalCustomizationDescription=(0,t.localize)(78,null),e.download=(0,t.localize)(79,null),e.downloadTooltip=(0,t.localize)(80,null),e.installTooltip=(0,t.localize)(81,null);function o(p){return(0,t.localize)(82,null,p)}e.getThemeUpdatedNotification=o;function u(p){return(0,t.localize)(83,null,p)}e.getNewThemeNotification=u;function d(p,c,l,n,g,w,E,C,I){return(0,t.localize)(84,null,p,c,l,I,n,g,w,E,C)}e.aboutDetail=d}),define(Q[1937],Y([2,3]),function(q,e){return q.create("sql/base/parts/tree/browser/treeDefaults",e)}),define(Q[1938],Y([2,3]),function(q,e){return q.create("sql/platform/accounts/common/accountActions",e)}),define(Q[1939],Y([2,3]),function(q,e){return q.create("sql/platform/clipboard/browser/clipboardService",e)}),define(Q[1940],Y([2,3]),function(q,e){return q.create("sql/platform/connection/common/connectionConfig",e)}),define(Q[1941],Y([2,3]),function(q,e){return q.create("sql/platform/connection/common/connectionStatusManager",e)}),define(Q[1942],Y([2,3]),function(q,e){return q.create("sql/platform/connection/common/providerConnectionInfo",e)}),define(Q[813],Y([1,0,17,117,432,1942]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderConnectionInfo=void 0;class T{static{this.ProviderPropertyName="providerName"}constructor(v,m){this.capabilitiesService=v,this.options={},m&&(this.providerName=(0,t.isString)(m)?m:"providerName"in m?m.providerName:m.providerId,(0,t.isString)(m)||(m.options&&this.serverCapabilities&&this.serverCapabilities.connectionOptions.forEach(S=>{let h=m.options[S.name];this.options[S.name]=h}),this.updateSpecialValueType("serverName",m),this.updateSpecialValueType("authenticationType",m),this.updateSpecialValueType("databaseName",m),this.updateSpecialValueType("password",m),this.updateSpecialValueType("userName",m),this.updateSpecialValueType("connectionName",m)))}updateSpecialValueType(v,m){this[v]||(this[v]=m[v])}get providerName(){return this._providerName}set providerName(v){this._providerName=v}clone(){let v=new T(this.capabilitiesService,this.providerName);return v.options=Object.assign({},this.options),v}get serverCapabilities(){return this.capabilitiesService?.getCapabilities(this.providerName)?.connection}get connectionName(){return this.getSpecialTypeOptionValue(b.ConnectionOptionSpecialType.connectionName)}get serverName(){return this.getSpecialTypeOptionValue(b.ConnectionOptionSpecialType.serverName)}get databaseName(){return this.getSpecialTypeOptionValue(b.ConnectionOptionSpecialType.databaseName)}get userName(){return this.getSpecialTypeOptionValue(b.ConnectionOptionSpecialType.userName)}get password(){return this.getSpecialTypeOptionValue(b.ConnectionOptionSpecialType.password)}get authenticationType(){return this.getSpecialTypeOptionValue(b.ConnectionOptionSpecialType.authType)}set connectionName(v){this.setSpecialTypeOptionName(b.ConnectionOptionSpecialType.connectionName,v)}set serverName(v){this.setSpecialTypeOptionName(b.ConnectionOptionSpecialType.serverName,v)}set databaseName(v){this.setSpecialTypeOptionName(b.ConnectionOptionSpecialType.databaseName,v)}set userName(v){this.setSpecialTypeOptionName(b.ConnectionOptionSpecialType.userName,v)}set password(v){this.setSpecialTypeOptionName(b.ConnectionOptionSpecialType.password,v)}set authenticationType(v){this.setSpecialTypeOptionName(b.ConnectionOptionSpecialType.authType,v)}getOptionValue(v){return this.options[v]}setOptionValue(v,m){this.options[v]=m}getServerInfo(){let v="";return this.serverCapabilities&&(v=this.serverName,this.serverCapabilities.connectionOptions?.find(m=>m.specialValueType===b.ConnectionOptionSpecialType.databaseName)&&(v+=`, ${this.databaseName||"<default>"}`),v+=` (${this.userName||this.authenticationType})`),v}get title(){let v="";if(this.serverCapabilities)this.connectionName?v=this.connectionName:v=this.getServerInfo();else return this.hasLoaded()?(0,D.localize)(0,null):(0,D.localize)(1,null);return v}hasLoaded(){return Object.keys(this.capabilitiesService.providers).length>0}get serverInfo(){let v=this.getServerInfo();return this.serverCapabilities?.useFullOptions&&(v+=this.getNonDefaultOptionsString()),v}isPasswordRequired(){if(!this.serverCapabilities)return!1;let v=this.serverCapabilities.connectionOptions.find(S=>S.specialValueType===b.ConnectionOptionSpecialType.password),m=v.isRequired;return this.providerName===y.mssqlProviderName&&(m=this.authenticationType===y.AuthenticationType.SqlLogin&&v.isRequired),m}getSpecialTypeOptionValue(v){let m=this.getSpecialTypeOptionName(v);if(m)return this.options[m]}getOptionsKey(v){let m=this.getOptionKeyIdNames(v);m=m.filter(h=>h!==void 0),m.sort();let S=[];for(let h=0;h<m.length;h++){let a=this.options[m[h]],i=this.serverCapabilities&&this.serverCapabilities.useFullOptions&&!v;if(i){let s,o=this.serverCapabilities.connectionOptions.filter(u=>u.name===m[h]);if(o.length>0&&a){let u=o[0].defaultValue??"";s=a&&a.toString().toLocaleLowerCase()!==u.toString().toLocaleLowerCase()?a:void 0,o[0].specialValueType==="appName"&&this.providerName===y.mssqlProviderName&&(s=a.startsWith("azdata")?void 0:s)}else o.length>0&&o[0].specialValueType==="authType"&&(s="");a=s}else a=a||"";(i&&a!==void 0||!i)&&S.push(`${m[h]}${T.nameValueSeparator}${a}`)}return T.ProviderPropertyName+T.nameValueSeparator+this.providerName+T.idSeparator+S.join(T.idSeparator)}getOptionKeyIdNames(v){let m=!1,S=[];return this.serverCapabilities?(m=this.serverCapabilities.useFullOptions,S=this.serverCapabilities.connectionOptions.map(h=>{let a=m&&h.specialValueType!==b.ConnectionOptionSpecialType.password&&!v,r=(h.specialValueType||h.isIdentity)&&h.specialValueType!==b.ConnectionOptionSpecialType.password&&h.specialValueType!==b.ConnectionOptionSpecialType.connectionName;if(a||r)return h.name})):S=["authenticationType","database","server","user"],S}static getDisplayOptionsKey(v){let m=v.split(T.idSeparator);return m=m.map(S=>{let h="",a=S.split(T.nameValueSeparator);return a[0]!=="group"&&a[1]!==""&&(h=a[0]+T.displayNameValueSeparator,a.length>=2&&(h+=a.slice(1).join(T.nameValueSeparator))),h}),m=m.filter(S=>S!==""),m.join(T.displayIdSeparator)}static getProviderFromOptionsKey(v){let m="";return v&&v.split(T.idSeparator).forEach(h=>{let a=h.split(T.nameValueSeparator);a.length>=2&&a[0]===T.ProviderPropertyName&&(m=a[1])}),m}getSpecialTypeOptionName(v){if(this.serverCapabilities){let m=this.serverCapabilities.connectionOptions.find(S=>S.specialValueType===v);return m?m.name:void 0}else return v.toString()}setSpecialTypeOptionName(v,m){let S=this.getSpecialTypeOptionName(v);S&&(this.options[S]=m)}get authenticationTypeDisplayName(){let v=this.serverCapabilities?this.serverCapabilities.connectionOptions.find(h=>h.specialValueType===b.ConnectionOptionSpecialType.authType):void 0,m=this.authenticationType,S=m;return v&&v.categoryValues&&v.categoryValues.forEach(h=>{h.name===m&&(S=h.displayName)}),S}getProviderOptions(){return this.serverCapabilities?.connectionOptions}static get idSeparator(){return"|"}static get nameValueSeparator(){return":"}static get displayIdSeparator(){return"; "}static get displayNameValueSeparator(){return"="}getConnectionOptionsList(v,m){let S=[];return this.serverCapabilities&&this.serverCapabilities.connectionOptions.forEach(h=>{if((!v&&h.specialValueType!==b.ConnectionOptionSpecialType.serverName&&h.specialValueType!==b.ConnectionOptionSpecialType.databaseName&&h.specialValueType!==b.ConnectionOptionSpecialType.authType&&h.specialValueType!==b.ConnectionOptionSpecialType.userName||v)&&h.specialValueType!==b.ConnectionOptionSpecialType.connectionName&&h.specialValueType!==b.ConnectionOptionSpecialType.password)if(m){let a=this.getOptionValue(h.name);a&&a.toString().toLocaleLowerCase()!==h.defaultValue?.toString().toLocaleLowerCase()&&S.push(h)}else S.push(h)}),S.sort(),S}getNonDefaultOptionsString(){let v="";return this.getConnectionOptionsList(!1,!0).forEach(S=>{let h=this.getOptionValue(S.name);v.length===0&&(v=" (");let a=S.name+T.displayNameValueSeparator+`${h}`;v+=v===" ("?a:T.displayIdSeparator+a}),v.length>0&&(v+=")"),v}}e.ProviderConnectionInfo=T}),define(Q[106],Y([1,0,813,432,59,17,42,117,184]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionProfile=void 0;class m extends t.ProviderConnectionInfo{constructor(h,a){if(super(h,a),this.isDisconnecting=!1,a&&!(0,D.isString)(a)){this.groupId=a.groupId,this.groupFullName=a.groupFullName,this.savePassword=a.savePassword,this.saveProfile=a.saveProfile,this.azureTenantId=a.azureTenantId;const r="id"in a;if(this._id=r?a.id:a.connectionId,this.azureAccount=r?a.azureAccount:"",this.azureResourceId=r?a.azureResourceId:"",this.azurePortalEndpoint=r?a.azurePortalEndpoint:"",this.capabilitiesService&&this.providerName){let i=this.capabilitiesService.getCapabilities(this.providerName);if(i&&i.connection&&i.connection.connectionOptions){const o=i.connection.connectionOptions;let u=o.find(d=>d.specialValueType===y.ConnectionOptionSpecialType.appName);if(u){let d=u.name;this.options[d]=f.applicationName}else(this.providerName===f.mssqlProviderName||this.providerName===f.mssqlCmsProviderName)&&(u=o.find(d=>d.name===f.mssqlApplicationNameOption),u&&(this.options[f.mssqlApplicationNameOption]=(0,v.adjustForMssqlAppName)(a.options[f.mssqlApplicationNameOption])));Object.keys(a.options).forEach(d=>{let p=o.find(c=>c.name===d);p!==void 0&&p.defaultValue?.toString().toLocaleLowerCase()!==a.options[d]?.toString().toLocaleLowerCase()&&(this.options[p.name]=a.options[d])})}a.options.registeredServerDescription&&(this.registeredServerDescription=a.options.registeredServerDescription);const s=a.options.expiresOn;typeof s=="number"&&!Number.isNaN(s)&&(this.options.expiresOn=a.options.expiresOn)}a.options?.originalDatabase&&(this.originalDatabase=a.options.originalDatabase)}else this.savePassword=!1,this.saveProfile=!0,this._groupName=m.RootGroupName,this._id=(0,b.generateUuid)();this.options.groupId=this.groupId,this.options.databaseDisplayName=this.databaseName}static matchesProfile(h,a){return h&&a&&h.getOptionsKey()===a.getOptionsKey()}matches(h){return m.matchesProfile(this,h)}generateNewId(){this._id=(0,b.generateUuid)()}getParent(){return this.parent}get id(){return this._id||(this._id=(0,b.generateUuid)()),this._id}set id(h){this._id=h}get azureTenantId(){return this.options.azureTenantId}set azureTenantId(h){this.options.azureTenantId=h}get azureAccount(){return this.options.azureAccount}set azureAccount(h){this.options.azureAccount=h}get azurePortalEndpoint(){return this.options.azurePortalEndpoint}set azurePortalEndpoint(h){this.options.azurePortalEndpoint=h}get azureResourceId(){return this.options.azureResourceId}set azureResourceId(h){this.options.azureResourceId=h}get originalDatabase(){return this.options.originalDatabase}set originalDatabase(h){this.options.originalDatabase=h}get registeredServerDescription(){return this.options.registeredServerDescription}set registeredServerDescription(h){this.options.registeredServerDescription=h}get groupFullName(){return this._groupName}set groupFullName(h){this._groupName=h}get isAddedToRootGroup(){return this._groupName===m.RootGroupName}get title(){return this._title?this._title:this.getOriginalTitle()}getOriginalTitle(){return super.title}set title(h){this._title=h}clone(){return new m(this.capabilitiesService,this)}cloneWithNewId(){let h=this.clone();return h.generateNewId(),h}cloneWithDatabase(h){let a=this.cloneWithNewId();return a.databaseName=h,a.originalDatabase=h,a}static{this.RootGroupName="/"}withoutPassword(){let h=this.clone();return h.password="",h}getOptionsKey(h){let a=super.getOptionsKey(h),r=this.options.databaseDisplayName;r&&(a+=t.ProviderConnectionInfo.idSeparator+"databaseDisplayName"+t.ProviderConnectionInfo.nameValueSeparator+r);let i="group";return!h&&this.serverCapabilities&&this.serverCapabilities.useFullOptions&&(i="groupId"),a+t.ProviderConnectionInfo.idSeparator+i+t.ProviderConnectionInfo.nameValueSeparator+this.groupId}getConnectionInfoId(h=!0){let a=super.getOptionsKey(h),r=this.options.databaseDisplayName;return r&&!h&&this.serverCapabilities?.useFullOptions&&(a+=t.ProviderConnectionInfo.idSeparator+"databaseDisplayName"+t.ProviderConnectionInfo.nameValueSeparator+r),a}toIConnectionProfile(){return{connectionName:this.connectionName,serverName:this.serverName,databaseName:this.databaseName,authenticationType:this.authenticationType,serverCapabilities:this.serverCapabilities,getOptionsKey:this.getOptionsKey,getOptionKeyIdNames:this.getOptionKeyIdNames,matches:this.matches,groupId:this.groupId,groupFullName:this.groupFullName,password:this.password,providerName:this.providerName,savePassword:this.savePassword,userName:this.userName,options:this.options,saveProfile:this.saveProfile,id:this.id,azureTenantId:this.azureTenantId,azureAccount:this.azureAccount,azurePortalEndpoint:this.azurePortalEndpoint,azureResourceId:this.azureResourceId}}toConnectionInfo(){return{options:this.options}}static isConnectionToDefaultDb(h){return!h.databaseName||h.databaseName.trim()===""}static fromIConnectionProfile(h,a){return a instanceof m?a:new m(h,a)}static createFromStoredProfile(h,a){let r=new m(a,h.providerName);return r.options=h.options,r.options=(0,T.deepClone)(h.options),r.options.groupId=r.groupId,r.options.databaseDisplayName=r.databaseName,r.groupId=h.groupId,r.providerName=h.providerName,r.saveProfile=!0,r.savePassword=h.savePassword,r.id=h.id||(0,b.generateUuid)(),r}static convertToProfileStore(h,a){let r=m.fromIConnectionProfile(h,a),i={options:{},groupId:a.groupId,providerName:r.providerName,savePassword:r.savePassword,id:r.id};return Object.keys(r.options).forEach(s=>{(0,D.isUndefinedOrNull)(r.options[s])||(i.options[s]=r.options[s])}),i}}e.ConnectionProfile=m}),define(Q[665],Y([1,0,106,194,117,184,59,1940,42,4,17]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionConfig=e.ConnectionsSortOrder=e.CONNECTIONS_SORT_BY_CONFIG_KEY=e.CONNECTIONS_CONFIG_KEY=e.GROUPS_CONFIG_KEY=void 0,e.GROUPS_CONFIG_KEY="datasource.connectionGroups",e.CONNECTIONS_CONFIG_KEY="datasource.connections",e.CONNECTIONS_SORT_BY_CONFIG_KEY="datasource.connectionsSortOrder";var h;(function(r){r.dateAdded="dateAdded",r.displayName="displayName"})(h||(e.ConnectionsSortOrder=h={}));class a{constructor(i,s){this.configurationService=i,this._capabilitiesService=s}getAllGroups(){let i=[];const s=this.configurationService.inspect(e.GROUPS_CONFIG_KEY);let{userValue:o}=s;const{workspaceValue:u}=s,d=this.configurationService.getValue(e.CONNECTIONS_SORT_BY_CONFIG_KEY);return o&&(u&&(o=o.filter(p=>u.find(c=>this.isSameGroupName(c,p))===void 0),i=i.concat(u)),i=i.concat(o)),d==="displayName"&&i.sort((p,c)=>p.name.localeCompare(c.name)),(0,v.deepClone)(i).map(p=>((p.parentId===""||!p.parentId)&&(p.parentId=void 0),p))}async isDuplicateEdit(i,s=t.ConnectionProfile.matchesProfile){let o=(0,v.deepClone)(this.configurationService.inspect(e.CONNECTIONS_CONFIG_KEY).userValue);o||(o=[]);let u=await this.addGroupFromProfile(i),d=this.getConnectionProfileInstance(i,u),p;if(o.find(c=>{const l=t.ConnectionProfile.createFromStoredProfile(c,this._capabilitiesService),n=s(l,d);return n&&s.toString()!==t.ConnectionProfile.matchesProfile.toString()&&(p=c),n}),p){const c=o.indexOf(p);return c>-1&&o.splice(c,1),o.find(n=>{const g=t.ConnectionProfile.createFromStoredProfile(n,this._capabilitiesService);return t.ConnectionProfile.matchesProfile(g,d)})!==void 0}return!1}async addConnection(i,s=t.ConnectionProfile.matchesProfile){if(i.saveProfile){let o=await this.addGroupFromProfile(i),u=(0,v.deepClone)(this.configurationService.inspect(e.CONNECTIONS_CONFIG_KEY).userValue);u||(u=[]);let d=this.getConnectionProfileInstance(i,o),p=t.ConnectionProfile.convertToProfileStore(this._capabilitiesService,d),c=u.find(l=>{const n=t.ConnectionProfile.createFromStoredProfile(l,this._capabilitiesService);return s(n,d)});if(c){let l=u.findIndex(n=>n===c);u[l]=p}else u.push(p);return await this.configurationService.updateValue(e.CONNECTIONS_CONFIG_KEY,u,2),u.forEach(l=>{l&&(0,m.isDisposable)(l)&&l.dispose()}),d}else return i}getConnectionProfileInstance(i,s){let o=i;return o===void 0&&(o=new t.ConnectionProfile(this._capabilitiesService,i)),o.groupId=s,o}async addGroupFromProfile(i){if(i.groupId&&i.groupId!==D.defaultGroupId)return i.groupId;{let s=(0,v.deepClone)(this.configurationService.inspect(e.GROUPS_CONFIG_KEY).userValue),o=this.saveGroup(s,i.groupFullName,void 0,void 0);return s=o.groups,await this.configurationService.updateValue(e.GROUPS_CONFIG_KEY,s,2),o.newGroupId}}addGroup(i){if(i.id)return Promise.resolve(i.id);{let s=(0,v.deepClone)(this.configurationService.inspect(e.GROUPS_CONFIG_KEY).userValue);if(s?s.find(u=>u.name===i.name):void 0){let u=f.localize(0,null);return Promise.reject(u)}else{let u=this.saveGroup(s,i.name,i.color,i.description);return s=u.groups,this.configurationService.updateValue(e.GROUPS_CONFIG_KEY,s,2).then(()=>u.newGroupId)}}}getConnectionProfilesForTarget(i){let s=this.configurationService.inspect(e.CONNECTIONS_CONFIG_KEY),o;if(s){let u;i===2?u=s.userValue:i===5&&(u=s.workspaceValue||[]),u?(o=(0,v.deepClone)(u),this.fixConnectionIds(o)&&this.configurationService.updateValue(e.CONNECTIONS_CONFIG_KEY,o,i)):o=[]}else o=[];return o}fixConnectionIds(i){let s={},o=!1;for(let u of i)u.id||(u.id=(0,T.generateUuid)(),o=!0),u.id in s&&(u.id=(0,T.generateUuid)(),o=!0),u.providerName==="MSSQL"&&(0,S.isUndefinedOrNull)(u.options.user)&&(u.options.user="",o=!0),s[u.id]=!0;return o}getIConnectionProfileStores(i){let s=[],o=this.getConnectionProfilesForTarget(2);if(o!==void 0&&(s=s.concat(o)),i){let u=this.getConnectionProfilesForTarget(5);u!==void 0&&(s=s.concat(u))}return s}getConnections(i){let s=this.getIConnectionProfileStores(i).map(u=>t.ConnectionProfile.createFromStoredProfile(u,this._capabilitiesService));return this.configurationService.getValue(e.CONNECTIONS_SORT_BY_CONFIG_KEY)==="displayName"&&s.sort((u,d)=>u.title.localeCompare(d.title)),s}deleteConnection(i){let s=this.configurationService.inspect(e.CONNECTIONS_CONFIG_KEY).userValue;return s=s.filter(o=>t.ConnectionProfile.createFromStoredProfile(o,this._capabilitiesService).getOptionsKey()!==i.getOptionsKey()),this.configurationService.updateValue(e.CONNECTIONS_CONFIG_KEY,s,2)}deleteGroup(i){let s=y.ConnectionProfileGroup.getConnectionsInGroup(i),o=y.ConnectionProfileGroup.getSubgroups(i);o.push(i);let u=this.configurationService.inspect(e.CONNECTIONS_CONFIG_KEY).userValue;u&&(u=u.filter(p=>{let c=t.ConnectionProfile.createFromStoredProfile(p,this._capabilitiesService);return!s.some(l=>l.getOptionsKey()===c.getOptionsKey())}));let d=this.configurationService.inspect(e.GROUPS_CONFIG_KEY).userValue;return d&&(d=d.filter(p=>!o.some(c=>c.id===p.id))),Promise.all([this.configurationService.updateValue(e.CONNECTIONS_CONFIG_KEY,u,2),this.configurationService.updateValue(e.GROUPS_CONFIG_KEY,d,2)]).then(()=>Promise.resolve())}changeGroupIdForConnectionGroup(i,s){let o=(0,v.deepClone)(this.configurationService.inspect(e.GROUPS_CONFIG_KEY).userValue);return o=o.map(u=>(u.id===i.id&&(u.parentId=s.id),u)),this.configurationService.updateValue(e.GROUPS_CONFIG_KEY,o,2)}canChangeConnectionConfig(i,s){return this.getIConnectionProfileStores(!0).find(d=>{let p=this.checkIfAuthenticationOptionsMatch(d,i),c=this.checkIfNonDefaultOptionsMatch(d,i),l=d.providerName===i.providerName&&d.options.database===i.options.database&&d.options.server===i.options.server&&d.options.user===i.options.user&&d.options.connectionName===i.options.connectionName&&d.groupId===s;return p&&c&&l})===void 0}checkIfNonDefaultOptionsMatch(i,s){let o=t.ConnectionProfile.createFromStoredProfile(i,this._capabilitiesService);return s.getNonDefaultOptionsString()===o.getNonDefaultOptionsString()}checkIfAuthenticationOptionsMatch(i,s){return(i.options.authenticationType===void 0||i.options.authenticationType==="")&&(s.options.authenticationType===void 0||s.options.authenticationType==="")||i.options.authenticationType===s.options.authenticationType}changeGroupIdForConnectionInSettings(i,s,o=2){let u=(0,v.deepClone)(o===2?this.configurationService.inspect(e.CONNECTIONS_CONFIG_KEY).userValue:this.configurationService.inspect(e.CONNECTIONS_CONFIG_KEY).workspaceValue);return u?(i.parent&&i.parent.id===b.UNSAVED_GROUP_ID?(i.groupId=s,u.push(t.ConnectionProfile.convertToProfileStore(this._capabilitiesService,i))):u.forEach(d=>{d.id===i.id&&(d.groupId=s)}),this.configurationService.updateValue(e.CONNECTIONS_CONFIG_KEY,u,o)):Promise.resolve()}changeGroupIdForConnection(i,s){return this.canChangeConnectionConfig(i,s)?Promise.all([this.changeGroupIdForConnectionInSettings(i,s,2),this.changeGroupIdForConnectionInSettings(i,s,5)]).then(()=>Promise.resolve()):Promise.reject("Same connection already exists in the group")}saveGroup(i,s,o,u){let d=y.ConnectionProfileGroup.getGroupFullNameParts(s);return this.saveGroupInTree(i,void 0,d,o,u,0)}editGroup(i){let s=(0,v.deepClone)(this.configurationService.inspect(e.GROUPS_CONFIG_KEY).userValue);if(s?s.find(u=>u.name===i.name&&u.id!==i.id):void 0){let u=f.localize(1,null);return Promise.reject(u)}return s=s.map(u=>(u.id===i.id&&(u.name=i.name,u.description=i.description,u.color=i.color,i.isRenamed=!1),u)),this.configurationService.updateValue(e.GROUPS_CONFIG_KEY,s,2)}isSameGroupName(i,s){let o=!1;return i&&s&&(o=(!i.name&&!s.name||i.name.toUpperCase()===s.name.toUpperCase())&&(i.parentId===s.parentId||!i.parentId&&!s.parentId)),o}saveGroupInTree(i,s,o,u,d,p){i||(i=[]);let c;if(p<o.length){let g={name:o[p],id:void 0,parentId:s,color:u,description:d},w=i.find(E=>this.isSameGroupName(E,g));if(w)if(p===o.length-1)c=w.id;else{let E=this.saveGroupInTree(i,w.id,o,u,d,p+1);i=E.groups,c=E.newGroupId}else{y.ConnectionProfileGroup.isRoot(g.name)?g.id=D.defaultGroupId:g.id=(0,T.generateUuid)();let E=this.saveGroupInTree(i,g.id,o,u,d,p+1);c=E.newGroupId,i=E.groups,i.push(g),p===o.length-1&&(c=g.id)}}return{groups:i,newGroupId:c}}}e.ConnectionConfig=a}),define(Q[1943],Y([1,0,194,106]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RecentConnectionDataSource=void 0;class b{getId(T,f){return f instanceof y.ConnectionProfile,f.id}hasChildren(T,f){return f instanceof y.ConnectionProfile?!1:f instanceof t.ConnectionProfileGroup?f.hasChildren():!1}getChildren(T,f){return f instanceof y.ConnectionProfile?Promise.resolve(null):f instanceof t.ConnectionProfileGroup?Promise.resolve(f.getChildren()):Promise.resolve(null)}getParent(T,f){return f instanceof y.ConnectionProfile||f instanceof t.ConnectionProfileGroup?Promise.resolve(f.getParent()):Promise.resolve(null)}}e.RecentConnectionDataSource=b}),define(Q[1944],Y([2,3]),function(q,e){return q.create("sql/platform/dashboard/browser/insightRegistry",e)}),define(Q[1945],Y([2,3]),function(q,e){return q.create("sql/platform/dashboard/browser/widgetRegistry",e)}),define(Q[1946],Y([2,3]),function(q,e){return q.create("sql/platform/serialization/common/serializationService",e)}),define(Q[1947],Y([2,3]),function(q,e){return q.create("sql/platform/theme/common/colorRegistry",e)}),define(Q[1948],Y([2,3]),function(q,e){return q.create("sql/platform/theme/common/colors",e)}),define(Q[1949],Y([2,3]),function(q,e){return q.create("sql/workbench/api/browser/mainThreadExtensionManagement",e)}),define(Q[1950],Y([2,3]),function(q,e){return q.create("sql/workbench/api/browser/mainThreadNotebookDocumentsAndEditors",e)}),define(Q[1951],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/actions",e)}),define(Q[1952],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/actions.contribution",e)}),define(Q[1953],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/designer/designer",e)}),define(Q[1954],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/designer/designerIssuesTabPanelView",e)}),define(Q[1955],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/designer/designerPropertiesPane",e)}),define(Q[1956],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/designer/designerScriptEditor",e)}),define(Q[1957],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/designer/tableActions",e)}),define(Q[1958],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/editData/editDataInput",e)}),define(Q[1959],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/editor/profiler/profilerInput",e)}),define(Q[1960],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/editor/resourceViewer/resourceViewerInput",e)}),define(Q[1961],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/editor/tableDesigner/tableDesignerInput",e)}),define(Q[1962],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/modal/modal",e)}),define(Q[1963],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/modal/optionsDialog",e)}),define(Q[1964],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/modal/optionsDialogHelper",e)}),define(Q[1965],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/modelComponents/componentBase",e)}),define(Q[1966],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/modelComponents/declarativeTable.component",e)}),define(Q[1967],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/modelComponents/dropdown.component",e)}),define(Q[1968],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/modelComponents/inputbox.component",e)}),define(Q[1969],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/modelComponents/loadingComponent.component",e)}),define(Q[1970],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/modelComponents/queryTextEditor",e)}),define(Q[1971],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/modelComponents/viewBase",e)}),define(Q[1972],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/parts/editor/editorStatusModeSelect",e)}),define(Q[1973],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/scriptingActions",e)}),define(Q[1974],Y([2,3]),function(q,e){return q.create("sql/workbench/browser/scriptingUtils",e)}),define(Q[1975],Y([2,3]),function(q,e){return q.create("sql/workbench/common/backup/constants",e)}),define(Q[1095],Y([1,0,1975]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asymmetricKey=e.serverCertificate=e.tripleDES=e.aes256=e.aes192=e.aes128=e.compressionOff=e.compressionOn=e.defaultCompression=e.labelUrl=e.labelDisk=e.labelLog=e.labelDifferential=e.labelFull=e.labelFilegroup=e.labelDatabase=e.recoveryModelFull=e.recoveryModelSimple=e.MediaDeviceType=e.PhysicalDeviceType=e.maxDevices=void 0,e.maxDevices=64;var y;(function(D){D[D.Disk=2]="Disk",D[D.FloppyA=3]="FloppyA",D[D.FloppyB=4]="FloppyB",D[D.Tape=5]="Tape",D[D.Pipe=6]="Pipe",D[D.CDRom=7]="CDRom",D[D.Url=9]="Url",D[D.Unknown=100]="Unknown"})(y||(e.PhysicalDeviceType=y={}));var b;(function(D){D[D.LogicalDevice=0]="LogicalDevice",D[D.Tape=1]="Tape",D[D.File=2]="File",D[D.Pipe=3]="Pipe",D[D.VirtualDevice=4]="VirtualDevice",D[D.Url=5]="Url"})(b||(e.MediaDeviceType=b={})),e.recoveryModelSimple="Simple",e.recoveryModelFull="Full",e.labelDatabase=(0,t.localize)(0,null),e.labelFilegroup=(0,t.localize)(1,null),e.labelFull=(0,t.localize)(2,null),e.labelDifferential=(0,t.localize)(3,null),e.labelLog=(0,t.localize)(4,null),e.labelDisk=(0,t.localize)(5,null),e.labelUrl=(0,t.localize)(6,null),e.defaultCompression=(0,t.localize)(7,null),e.compressionOn=(0,t.localize)(8,null),e.compressionOff=(0,t.localize)(9,null),e.aes128="AES 128",e.aes192="AES 192",e.aes256="AES 256",e.tripleDES="Triple DES",e.serverCertificate=(0,t.localize)(10,null),e.asymmetricKey=(0,t.localize)(11,null)}),define(Q[1976],Y([2,3]),function(q,e){return q.create("sql/workbench/common/constants",e)}),define(Q[1977],Y([2,3]),function(q,e){return q.create("sql/workbench/common/editor/query/queryEditorInput",e)}),define(Q[1978],Y([2,3]),function(q,e){return q.create("sql/workbench/common/editor/query/queryResultsInput",e)}),define(Q[1979],Y([2,3]),function(q,e){return q.create("sql/workbench/common/theme",e)}),define(Q[1980],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/accounts/browser/accountManagement.contribution",e)}),define(Q[1981],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/assessment/browser/asmtActions",e)}),define(Q[1982],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/assessment/browser/asmtResultsView.component",e)}),define(Q[1983],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/assessment/common/strings",e)}),define(Q[814],Y([1,0,1983]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalizedStrings=void 0,e.LocalizedStrings={SECTION_TITLE_API:(0,t.localize)(0,null),API_VERSION:(0,t.localize)(1,null),DEFAULT_RULESET_VERSION:(0,t.localize)(2,null),SECTION_TITLE_SQL_SERVER:(0,t.localize)(3,null),SERVER_VERSION:(0,t.localize)(4,null),SERVER_EDITION:(0,t.localize)(5,null),SERVER_INSTANCENAME:(0,t.localize)(6,null),SERVER_OSVERSION:(0,t.localize)(7,null),MESSAGE_COLUMN_NAME:(0,t.localize)(8,null),CHECKID_COLUMN_NAME:(0,t.localize)(9,null),TAGS_COLUMN_NAME:(0,t.localize)(10,null),LEARN_MORE_LINK:(0,t.localize)(11,null),REPORT_TITLE:(0,t.localize)(12,null),RESULTS_FOR_DATABASE:(0,t.localize)(13,null),RESULTS_FOR_INSTANCE:(0,t.localize)(14,null),REPORT_ERROR:(0,t.localize)(15,null),REPORT_WARNING:(0,t.localize)(16,null),REPORT_INFO:(0,t.localize)(17,null),HELP_LINK_COLUMN_NAME:(0,t.localize)(18,null),REPORT_SEVERITY_MESSAGE:function(y,b){return(0,t.localize)(19,null,y,b)}}}),define(Q[1984],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/azure/browser/azure.contribution",e)}),define(Q[1985],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/backup/browser/backup.component",e)}),define(Q[1986],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/backup/browser/backup.contribution",e)}),define(Q[1987],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/backup/browser/backupActions",e)}),define(Q[1988],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/backup/browser/backupUiService",e)}),define(Q[1989],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/charts/browser/actions",e)}),define(Q[1990],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/charts/browser/chartOptions",e)}),define(Q[1991],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/charts/browser/chartTab",e)}),define(Q[1992],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/charts/browser/chartView",e)}),define(Q[1993],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/charts/browser/charts.contribution",e)}),define(Q[1994],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/charts/browser/configureChartDialog",e)}),define(Q[1995],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/charts/browser/graphInsight",e)}),define(Q[1996],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/charts/browser/imageInsight",e)}),define(Q[1997],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/charts/browser/utils",e)}),define(Q[1998],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/commandLine/electron-sandbox/commandLine",e)}),define(Q[1999],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/configuration/common/configurationUpgrader",e)}),define(Q[2e3],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/connection/browser/connection.contribution",e)}),define(Q[2001],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/connection/browser/connectionStatus",e)}),define(Q[2002],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/connection/common/connectionProviderExtension",e)}),define(Q[2003],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/connection/common/connectionTreeProviderExentionPoint",e)}),define(Q[2004],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/containers/dashboardContainer.contribution",e)}),define(Q[2005],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/containers/dashboardControlHostContainer.contribution",e)}),define(Q[2006],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/containers/dashboardErrorContainer.component",e)}),define(Q[2007],Y([1,0,40,434,185,6,2006,1605]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DashboardErrorContainer=void 0;let f=class extends y.DashboardTab{constructor(m){super(),this._cd=m,this._onResize=new D.Emitter,this.onResize=this._onResize.event}ngAfterViewInit(){const m=this._errorMessageContainer.nativeElement;m.innerText=T.localize(0,null,this.tab.title)}get id(){return this.tab.id}get editable(){return!1}layout(){}refresh(){}};e.DashboardErrorContainer=f,fe([(0,t.Input)()],f.prototype,"tab",void 0),fe([(0,t.ViewChild)("errorMessage",{read:t.ElementRef})],f.prototype,"_errorMessageContainer",void 0),e.DashboardErrorContainer=f=fe([(0,t.Component)({selector:"dashboard-error-container",providers:[{provide:b.TabChild,useExisting:(0,t.forwardRef)(()=>f)}],template:` <div class="error-container"> <div class="codicon globalError"> </div> <div class="error-message" #errorMessage> </div> </div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef)))],f)}),define(Q[2008],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/containers/dashboardGridContainer.contribution",e)}),define(Q[2009],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/containers/dashboardModelViewContainer.contribution",e)}),define(Q[2010],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/containers/dashboardNavSection.contribution",e)}),define(Q[2011],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/containers/dashboardWebviewContainer.contribution",e)}),define(Q[2012],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/containers/dashboardWidgetContainer.contribution",e)}),define(Q[2013],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/core/actions",e)}),define(Q[2014],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/core/dashboardHelper",e)}),define(Q[2015],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/core/dashboardPage.component",e)}),define(Q[2016],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/core/dashboardTab.contribution",e)}),define(Q[2017],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/dashboard.contribution",e)}),define(Q[2018],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/dashboardActions",e)}),define(Q[2019],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/dashboardIconUtil",e)}),define(Q[2020],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/dashboardRegistry",e)}),define(Q[2021],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/pages/dashboardPageContribution",e)}),define(Q[2022],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/pages/databaseDashboardPage.component",e)}),define(Q[2023],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/pages/databaseDashboardPage.contribution",e)}),define(Q[2024],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/pages/serverDashboardPage.component",e)}),define(Q[2025],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/pages/serverDashboardPage.contribution",e)}),define(Q[2026],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/services/breadcrumb.service",e)}),define(Q[2027],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/services/dashboardServiceInterface.service",e)}),define(Q[2028],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerTable",e)}),define(Q[2029],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerView",e)}),define(Q[2030],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerWidget.component",e)}),define(Q[2031],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/widgets/insights/actions",e)}),define(Q[2032],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/widgets/insights/insightsWidget.component",e)}),define(Q[2033],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/widgets/insights/insightsWidgetSchemas",e)}),define(Q[2034],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/chartInsight.component",e)}),define(Q[2035],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/chartInsight.contribution",e)}),define(Q[815],Y([1,0,2035]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.chartInsightSchema=void 0,e.chartInsightSchema={type:"object",description:t.localize(0,null),properties:{colorMap:{type:"object",description:t.localize(1,null)},legendPosition:{type:"string",description:t.localize(2,null),default:"none",enum:["top","bottom","left","right","none"]},labelFirstColumn:{type:"boolean",description:t.localize(3,null),default:!1},columnsAsLabels:{type:"boolean",description:t.localize(4,null),default:!1},dataDirection:{type:"string",description:t.localize(5,null),default:"vertical",enum:["vertical","horizontal"],enumDescriptions:["When vertical, the first column is used to define the x-axis labels, with other columns expected to be numerical.","When horizontal, the column names are used as the x-axis labels."]},showTopNData:{type:"number",description:t.localize(6,null)}}}}),define(Q[2036],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/barChart.contribution",e)}),define(Q[2037],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/widgets/insights/views/charts/types/lineChart.contribution",e)}),define(Q[2038],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/widgets/insights/views/countInsight.contribution",e)}),define(Q[2039],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/widgets/insights/views/imageInsight.contribution",e)}),define(Q[2040],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/widgets/insights/views/tableInsight.contribution",e)}),define(Q[2041],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dashboard/browser/widgets/properties/propertiesWidget.component",e)}),define(Q[2042],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dataExplorer/browser/dataExplorer.contribution",e)}),define(Q[2043],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dataExplorer/browser/dataExplorerExtensionPoint",e)}),define(Q[2044],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dataExplorer/browser/dataExplorerViewlet",e)}),define(Q[2045],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/dataExplorer/browser/nodeActions.common.contribution",e)}),define(Q[2046],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/editData/browser/editData.contribution",e)}),define(Q[2047],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/editData/browser/editDataActions",e)}),define(Q[2048],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/editData/browser/editDataEditor",e)}),define(Q[2049],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/editData/browser/editDataGridActions",e)}),define(Q[2050],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/editData/browser/editDataGridPanel",e)}),define(Q[2051],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/editData/browser/gridActions",e)}),define(Q[2052],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/azdataGraphView",e)}),define(Q[2053],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/compareExecutionPlanInput",e)}),define(Q[2054],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/constants",e)}),define(Q[396],Y([1,0,2054]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.searchPlaceholder=e.topOperationsSearchDescription=e.propertiesSearchDescription=e.polygonFillColor=e.polygonBorderColor=e.executionPlanTopOperations=e.executionPlanComparisonPropertiesUpArrow=e.executionPlanComparisonPropertiesDownArrow=e.executionPlanComparisonPropertiesDifferent=e.executionPlanCompareIconClassName=e.resetZoomIconClassName=e.splitScreenVerticallyIconClassName=e.splitScreenHorizontallyIconClassName=e.settingsIconClassName=e.addIconClassName=e.disableTooltipIconClassName=e.enableTooltipIconClassName=e.zoomIconClassNames=e.zoomToFitIconClassNames=e.customZoomIconClassNames=e.zoomOutIconClassNames=e.zoomInIconClassNames=e.sortByDisplayOrderIconClassNames=e.sortReverseAlphabeticallyIconClassNames=e.sortAlphabeticallyIconClassNames=e.filterIconClassNames=e.searchIconClassNames=e.saveIconClassNames=e.openPlanFileIconClassNames=e.openQueryIconClassNames=e.openPropertiesIconClassNames=e.highlightExpensiveOperationClassNames=e.savePlanIconClassNames=e.collapseExpandNodeIconPaths=e.badgeIconPaths=e.executionPlanNodeIconPaths=void 0;let y=q.toUrl("./images/icons/");e.executionPlanNodeIconPaths={iteratorCatchAll:y+"iterator_catch_all.png",cursorCatchAll:y+"cursor_catch_all.png",languageConstructCatchAll:y+"language_construct_catch_all.png",adaptiveJoin:y+"adaptive_join.png",assert:y+"assert.png",bitmap:y+"bitmap.png",clusteredIndexDelete:y+"clustered_index_delete.png",clusteredIndexInsert:y+"clustered_index_insert.png",clusteredIndexScan:y+"clustered_index_scan.png",clusteredIndexSeek:y+"clustered_index_seek.png",clusteredIndexUpdate:y+"clustered_index_update.png",clusteredIndexMerge:y+"clustered_index_merge.png",clusteredUpdate:y+"clustered_update.png",collapse:y+"collapse.png",computeScalar:y+"compute_scalar.png",concatenation:y+"concatenation.png",constantScan:y+"constant_scan.png",deletedScan:y+"deleted_scan.png",filter:y+"filter.png",hashMatch:y+"hash_match.png",indexDelete:y+"index_delete.png",indexInsert:y+"index_insert.png",indexScan:y+"index_scan.png",columnstoreIndexDelete:y+"columnstore_index_delete.png",columnstoreIndexInsert:y+"columnstore_index_insert.png",columnstoreIndexMerge:y+"columnstore_index_merge.png",columnstoreIndexScan:y+"columnstore_index_scan.png",columnstoreIndexUpdate:y+"columnstore_index_update.png",indexSeek:y+"index_seek.png",indexSpool:y+"index_spool.png",indexUpdate:y+"index_update.png",insertedScan:y+"inserted_scan.png",logRowScan:y+"log_row_scan.png",mergeInterval:y+"merge_interval.png",mergeJoin:y+"merge_join.png",nestedLoops:y+"nested_loops.png",parallelism:y+"parallelism.png",parallelismDistribute:y+"parallelism_distribute.png",parallelismRepartition:y+"parallelism_repartition.png",parameterTableScan:y+"parameter_table_scan.png",print:y+"print.png",rank:y+"rank.png",foreignKeyReferencesCheck:y+"foreign_key_references_check.png",remoteDelete:y+"remote_delete.png",remoteIndexScan:y+"remote_index_scan.png",remoteIndexSeek:y+"remote_index_seek.png",remoteInsert:y+"remote_insert.png",remoteQuery:y+"remote_query.png",remoteScan:y+"remote_scan.png",remoteUpdate:y+"remote_update.png",ridLookup:y+"rid_lookup.png",rowCountSpool:y+"row_count_spool.png",segment:y+"segment.png",sequence:y+"sequence.png",sequenceProject:y+"sequence_project.png",sort:y+"sort.png",split:y+"split.png",streamAggregate:y+"stream_aggregate.png",switchStatement:y+"switch.png",tableValuedFunction:y+"table_valued_function.png",tableDelete:y+"table_delete.png",tableInsert:y+"table_insert.png",tableScan:y+"table_scan.png",tableSpool:y+"table_spool.png",tableUpdate:y+"table_update.png",tableMerge:y+"table_merge.png",tfp:y+"predict.png",top:y+"top.png",udx:y+"udx.png",batchHashTableBuild:y+"batch_hash_table_build.png",windowSpool:y+"table_spool.png",windowAggregate:y+"window_aggregate.png",fetchQuery:y+"fetch_query.png",populateQuery:y+"population_query.png",refreshQuery:y+"refresh_query.png",result:y+"result.png",aggregate:y+"aggregate.png",assign:y+"assign.png",arithmeticExpression:y+"arithmetic_expression.png",bookmarkLookup:y+"bookmark_lookup.png",convert:y+"convert.png",declare:y+"declare.png",deleteOperator:y+"delete.png",dynamic:y+"dynamic.png",hashMatchRoot:y+"hash_match_root.png",hashMatchTeam:y+"hash_match_team.png",ifOperator:y+"if.png",insert:y+"insert.png",intrinsic:y+"intrinsic.png",keyset:y+"keyset.png",locate:y+"locate.png",populationQuery:y+"population_query.png",setFunction:y+"set_function.png",snapshot:y+"snapshot.png",spool:y+"spool.png",tsql:y+"sql.png",update:y+"update.png",keyLookup:y+"bookmark_lookup.png",apply:y+"apply.png",broadcast:y+"broadcast.png",computeToControlNode:y+"compute_to_control_node.png",constTableGet:y+"const_table_get.png",controlToComputeNodes:y+"control_to_compute_nodes.png",externalBroadcast:y+"external_broadcast.png",externalExport:y+"external_export.png",externalLocalStreaming:y+"external_local_streaming.png",externalRoundRobin:y+"external_round_robin.png",externalShuffle:y+"external_shuffle.png",get:y+"get.png",groupByApply:y+"apply.png",groupByAggregate:y+"group_by_aggregate.png",join:y+"join.png",localCube:y+"intrinsic.png",project:y+"project.png",shuffle:y+"shuffle.png",singleSourceRoundRobin:y+"single_source_round_robin.png",singleSourceShuffle:y+"single_source_shuffle.png",trim:y+"trim.png",union:y+"union.png",unionAll:y+"union_all.png"},e.badgeIconPaths={warning:y+"badge_warning.svg",parallelism:y+"badge_parallelism.svg",criticalWarning:y+"badge_critical_warning.svg"},e.collapseExpandNodeIconPaths={collapse:y+"collapse.svg",expand:y+"expand.svg"},e.savePlanIconClassNames="ep-save-plan-icon",e.highlightExpensiveOperationClassNames="ep-highlight-expensive-operation-icon",e.openPropertiesIconClassNames="ep-open-properties-icon",e.openQueryIconClassNames="ep-open-query-icon",e.openPlanFileIconClassNames="ep-open-plan-file-icon",e.saveIconClassNames="ep-save-icon",e.searchIconClassNames="ep-search-icon",e.filterIconClassNames="ep-filter-icon",e.sortAlphabeticallyIconClassNames="ep-sort-alphabetically-icon",e.sortReverseAlphabeticallyIconClassNames="ep-sort-reverse-alphabetically-icon",e.sortByDisplayOrderIconClassNames="ep-sort-display-order-icon",e.zoomInIconClassNames="ep-zoom-in-icon",e.zoomOutIconClassNames="ep-zoom-out-icon",e.customZoomIconClassNames="ep-custom-zoom-icon",e.zoomToFitIconClassNames="ep-zoom-to-fit-icon",e.zoomIconClassNames="ep-zoom-icon",e.enableTooltipIconClassName="ep-enable-tooltip-icon",e.disableTooltipIconClassName="ep-disable-tooltip-icon",e.addIconClassName="ep-add-icon",e.settingsIconClassName="ep-settings-icon",e.splitScreenHorizontallyIconClassName="ep-split-screen-horizontally-icon",e.splitScreenVerticallyIconClassName="ep-split-screen-vertically-icon",e.resetZoomIconClassName="ep-reset-zoom-icon",e.executionPlanCompareIconClassName="ep-plan-compare-icon",e.executionPlanComparisonPropertiesDifferent="ep-properties-different",e.executionPlanComparisonPropertiesDownArrow="ep-properties-down-arrow",e.executionPlanComparisonPropertiesUpArrow="ep-properties-up-arrow",e.executionPlanTopOperations="ep-top-operations",e.polygonBorderColor=["rgba(0, 188, 242)","rgba(236, 0, 140)","rgba(0, 216, 204)","rgba(236, 0, 140)","rgba(255, 140, 0)","rgba(127, 186, 0)","rgba(252, 214, 241)","rgba(252, 209, 22)","rgba(68,35,89)","rgba(0, 114, 198)","rgba(160, 165, 168)","rgba(255, 140, 0)","rgba(199, 241, 199)","rgba(0, 24, 143)","rgba(186, 216, 10)","rgba(255, 252, 158)","rgba(221, 89, 0)","rgba(155, 79, 150)","rgba(109, 194, 233)","rgba(85, 212, 85)","rgba(180, 0, 158)","rgba(0, 32, 80)","rgba(0, 130, 114)","rgba(127, 186, 0)","rgba(255, 241, 0)","rgba(104, 33, 122)","rgba(0, 188, 242)","rgba(0, 158, 73)","rgba(187, 194, 202)","rgba(255, 185, 0)","rgba(244, 114, 208)","rgba(70, 104, 197)","rgba(226, 229, 132)"],e.polygonFillColor=["rgba(0, 188, 242, 0.1)","rgba(236, 0, 140, 0.1)","rgba(0, 216, 204, 0.1)","rgba(236, 0, 140, 0.1)","rgba(255, 140, 0, 0.1)","rgba(127, 186, 0, 0.1)","rgba(252, 214, 241, 0.1)","rgba(252, 209, 22, 0.1)","rgba(68,35,89, 0.1)","rgba(0, 114, 198, 0.1)","rgba(160, 165, 168, 0.1)","rgba(255, 140, 0, 0.1)","rgba(199, 241, 199, 0.1)","rgba(0, 24, 143, 0.1)","rgba(186, 216, 10, 0.1)","rgba(255, 252, 158, 0.1)","rgba(221, 89, 0, 0.1)","rgba(155, 79, 150, 0.1)","rgba(109, 194, 233, 0.1)","rgba(85, 212, 85, 0.1)","rgba(180, 0, 158, 0.1)","rgba(0, 32, 80, 0.1)","rgba(0, 130, 114, 0.1)","rgba(127, 186, 0, 0.1)","rgba(255, 241, 0, 0.1)","rgba(104, 33, 122, 0.1)","rgba(0, 188, 242, 0.1)","rgba(0, 158, 73, 0.1)","rgba(187, 194, 202, 0.1)","rgba(255, 185, 0, 0.1)","rgba(244, 114, 208, 0.1)","rgba(70, 104, 197, 0.1)","rgba(226, 229, 132, 0.1)"],e.propertiesSearchDescription=(0,t.localize)(0,null),e.topOperationsSearchDescription=(0,t.localize)(1,null),e.searchPlaceholder=(0,t.localize)(2,null)}),define(Q[2055],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/executionPlanComparisonEditor",e)}),define(Q[2056],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/executionPlanComparisonEditorView",e)}),define(Q[2057],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/executionPlanComparisonPropertiesView",e)}),define(Q[2058],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/executionPlanContribution",e)}),define(Q[2059],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/executionPlanEditor",e)}),define(Q[2060],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/executionPlanFileView",e)}),define(Q[2061],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/executionPlanInput",e)}),define(Q[2062],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/executionPlanPropertiesView",e)}),define(Q[2063],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/executionPlanPropertiesViewBase",e)}),define(Q[2064],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/executionPlanTab",e)}),define(Q[2065],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/executionPlanTreeTab",e)}),define(Q[2066],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/executionPlanView",e)}),define(Q[2067],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/executionPlanViewHeader",e)}),define(Q[2068],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/topOperationsTab",e)}),define(Q[2069],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/widgets/customZoomWidget",e)}),define(Q[2070],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/widgets/highlightExpensiveNodeWidget",e)}),define(Q[2071],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/executionPlan/browser/widgets/nodeSearchWidget",e)}),define(Q[2072],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/extensions/browser/contributionRenders",e)}),define(Q[2073],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/extensions/browser/extensions.contribution",e)}),define(Q[2074],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/extensions/browser/extensionsActions",e)}),define(Q[2075],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/extensions/browser/scenarioRecommendations",e)}),define(Q[2076],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/extensions/browser/staticRecommendations",e)}),define(Q[2077],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/jobManagement/browser/agentView.component",e)}),define(Q[2078],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/jobManagement/browser/alertsView.component",e)}),define(Q[2079],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/jobManagement/browser/jobActions",e)}),define(Q[2080],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/jobManagement/browser/jobHistory.component",e)}),define(Q[2081],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/jobManagement/browser/jobStepsView.component",e)}),define(Q[2082],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/jobManagement/browser/jobsView.component",e)}),define(Q[2083],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/jobManagement/browser/notebookHistory.component",e)}),define(Q[2084],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/jobManagement/browser/notebooksView.component",e)}),define(Q[2085],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/jobManagement/browser/operatorsView.component",e)}),define(Q[2086],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/jobManagement/browser/proxiesView.component",e)}),define(Q[2087],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/calloutDialog/common/constants",e)}),define(Q[1096],Y([1,0,2087]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linkAddressPlaceholder=e.linkAddressLabel=e.linkTextPlaceholder=e.linkTextLabel=e.locationRemote=e.locationLocal=e.embedImageLabel=e.browseAltText=e.urlPlaceholder=e.pathPlaceholder=e.pathInputLabel=e.remoteImageLabel=e.localImageLabel=e.locationLabel=e.cancelButtonText=e.insertButtonText=void 0,e.insertButtonText=(0,t.localize)(0,null),e.cancelButtonText=(0,t.localize)(1,null),e.locationLabel=(0,t.localize)(2,null),e.localImageLabel=(0,t.localize)(3,null),e.remoteImageLabel=(0,t.localize)(4,null),e.pathInputLabel=(0,t.localize)(5,null),e.pathPlaceholder=(0,t.localize)(6,null),e.urlPlaceholder=(0,t.localize)(7,null),e.browseAltText=(0,t.localize)(8,null),e.embedImageLabel=(0,t.localize)(9,null),e.locationLocal=(0,t.localize)(10,null),e.locationRemote=(0,t.localize)(11,null),e.linkTextLabel=(0,t.localize)(12,null),e.linkTextPlaceholder=(0,t.localize)(13,null),e.linkAddressLabel=(0,t.localize)(14,null),e.linkAddressPlaceholder=(0,t.localize)(15,null)}),define(Q[2088],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/cellToolbarActions",e)}),define(Q[2089],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/cellViews/cellToolbar.component",e)}),define(Q[2090],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/cellViews/code.component",e)}),define(Q[2091],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/cellViews/codeActions",e)}),define(Q[2092],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/cellViews/collapse.component",e)}),define(Q[2093],Y([1,0,40,435,2092,655]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapseComponent=e.COLLAPSE_SELECTOR=void 0,e.COLLAPSE_SELECTOR="collapse-component";let D=class extends y.CellView{constructor(){super(),this.expandButtonTitle=(0,b.localize)(0,null),this.expandButtonClass="arrow-down",this.collapseButtonTitle=(0,b.localize)(1,null),this.collapseButtonClass="arrow-up"}ngOnInit(){}ngOnChanges(f){}ngAfterContentInit(){this._register(this.cellModel.onCollapseStateChanged(f=>{this.handleCellCollapse(f)})),this.handleCellCollapse(this.cellModel.isCollapsed),this.activeCellId===this.cellModel.id&&this.toggleIconVisibility(!0)}handleCellCollapse(f){let v=this.collapseCellButtonElement.nativeElement;f?(v.classList.remove(this.collapseButtonClass),v.classList.add(this.expandButtonClass),v.title=this.expandButtonTitle):(v.classList.remove(this.expandButtonClass),v.classList.add(this.collapseButtonClass),v.title=this.collapseButtonTitle)}toggleCollapsed(f){f&&f.stopPropagation(),this.cellModel.isCollapsed=!this.cellModel.isCollapsed}onFocus(){this.cellModel.notebookModel.updateActiveCell(this.cellModel)}cellGuid(){return this.cellModel.cellGuid}layout(){}toggleIconVisibility(f){let v=this.collapseCellButtonElement.nativeElement;v.title===this.collapseButtonTitle&&(f?v.classList.add(this.collapseButtonClass):v.classList.remove(this.collapseButtonClass))}};e.CollapseComponent=D,fe([(0,t.ViewChild)("collapseCellButton",{read:t.ElementRef})],D.prototype,"collapseCellButtonElement",void 0),fe([(0,t.Input)()],D.prototype,"cellModel",void 0),fe([(0,t.Input)()],D.prototype,"activeCellId",void 0),e.CollapseComponent=D=fe([(0,t.Component)({selector:e.COLLAPSE_SELECTOR,templateUrl:decodeURI(q.toUrl("./collapse.component.html"))})],D)}),define(Q[2094],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/cellViews/markdownToolbar.component",e)}),define(Q[2095],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/cellViews/output.component",e)}),define(Q[2096],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/cellViews/placeholderCell.component",e)}),define(Q[2097],Y([1,0,40,435,2096,1633]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PlaceholderCellComponent=e.PLACEHOLDER_SELECTOR=void 0,e.PLACEHOLDER_SELECTOR="placeholder-cell-component";let D=class extends y.CellView{set model(f){this._model=f}constructor(f){super(),this._changeRef=f}ngOnInit(){this.cellModel&&this._register(this.cellModel.onOutputsChanged(()=>{this._changeRef.detectChanges()}))}ngOnChanges(f){}get model(){return this._model}get clickOn(){return(0,b.localize)(0,null)}get plusCode(){return(0,b.localize)(1,null)}get or(){return(0,b.localize)(2,null)}get plusText(){return(0,b.localize)(3,null)}get toAddCell(){return(0,b.localize)(4,null)}get plusCodeAriaLabel(){return(0,b.localize)(5,null)}get plusTextAriaLabel(){return(0,b.localize)(6,null)}addCell(f,v){v&&(v.preventDefault(),v.stopPropagation());let m=f;m||(m="code"),this._model.addCell(m)}layout(){}cellGuid(){return this.cellModel.cellGuid}};e.PlaceholderCellComponent=D,fe([(0,t.Input)()],D.prototype,"cellModel",void 0),fe([(0,t.Input)()],D.prototype,"model",null),e.PlaceholderCellComponent=D=fe([(0,t.Component)({selector:e.PLACEHOLDER_SELECTOR,templateUrl:decodeURI(q.toUrl("./placeholderCell.component.html"))}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef)))],D)}),define(Q[2098],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/cellViews/stdin.component",e)}),define(Q[2099],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/cellViews/textCell.component",e)}),define(Q[2100],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/find/notebookFindWidget",e)}),define(Q[2101],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/models/outputProcessor",e)}),define(Q[2102],Y([1,0,1517,1023,2101]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extract=e.getBundleOptions=e.getMetadata=e.getData=void 0;function D(S){let h={};if(y.nbformat.isExecuteResult(S)||y.nbformat.isDisplayData(S)||y.nbformat.isDisplayUpdate(S))h=S.data;else if(y.nbformat.isStream(S))S.name==="stderr"?h["application/vnd.jupyter.stderr"]=S.text:h["application/vnd.jupyter.stdout"]=S.text;else if(y.nbformat.isError(S)){let a=S.traceback?S.traceback.join(` `):void 0;h["application/vnd.jupyter.stderr"]=void 0,a?h["application/vnd.jupyter.stderr"]=a:S.evalue&&(h["application/vnd.jupyter.stderr"]=S.ename?`${S.ename}: ${S.evalue}`:`${S.evalue}`)}else h["application/vnd.jupyter.stderr"]=b.localize(0,null,S.output_type);return m(h)}e.getData=D;function T(S){let h=Object.create(null);if(y.nbformat.isExecuteResult(S)||y.nbformat.isDisplayData(S))for(let a in S.metadata)h[a]=v(S.metadata,a);return h}e.getMetadata=T;function f(S){let h=D(S.value),a=T(S.value),r=!!S.trusted;return{data:h,metadata:a,trusted:r}}e.getBundleOptions=f;function v(S,h){let a=S[h];return a==null||(0,t.isPrimitive)(a)?a:JSON.parse(JSON.stringify(a))}e.extract=v;function m(S){let h=Object.create(null);for(let a in S)h[a]=v(S,a);return h}}),define(Q[2103],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/notebook.component",e)}),define(Q[2104],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/notebook.contribution",e)}),define(Q[2105],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/notebookActions",e)}),define(Q[2106],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/notebookEditor",e)}),define(Q[2107],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/notebookEditor.component",e)}),define(Q[2108],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet",e)}),define(Q[2109],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/notebookExplorer/notebookSearch",e)}),define(Q[2110],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/notebookExplorer/notebookSearchWidget",e)}),define(Q[2111],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/notebookViews/insertCellsModal",e)}),define(Q[2112],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/notebookViews/notebookViews.component",e)}),define(Q[2113],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/notebookViews/notebookViewsActions",e)}),define(Q[2114],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/notebookViews/notebookViewsCodeCell.component",e)}),define(Q[2115],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/notebookViews/notebookViewsGrid.component",e)}),define(Q[2116],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/notebookViews/viewOptionsModal",e)}),define(Q[2117],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/outputs/gridOutput.component",e)}),define(Q[2118],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/outputs/mimeRenderer.component",e)}),define(Q[2119],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/browser/outputs/plotlyOutput.component",e)}),define(Q[2120],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/notebook/common/notebookLoc",e)}),define(Q[1097],Y([1,0,2120]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.moreActionsLabel=void 0,e.moreActionsLabel=(0,t.localize)(0,null)}),define(Q[2121],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/objectExplorer/browser/serverTreeView",e)}),define(Q[2122],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/objectExplorer/common/serverGroup.contribution",e)}),define(Q[2123],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/preferences/browser/sqlSettingsLayout",e)}),define(Q[2124],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/profiler/browser/profiler.contribution",e)}),define(Q[2125],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/profiler/browser/profilerActions",e)}),define(Q[2126],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/profiler/browser/profilerEditor",e)}),define(Q[2127],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/profiler/browser/profilerFindWidget",e)}),define(Q[2128],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/profiler/browser/profilerResourceEditor",e)}),define(Q[2129],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/profiler/browser/profilerTableEditor",e)}),define(Q[2130],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/query/browser/actions",e)}),define(Q[2131],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/query/browser/flavorStatus",e)}),define(Q[2132],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/query/browser/gridPanel",e)}),define(Q[2133],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/query/browser/keyboardQueryActions",e)}),define(Q[2134],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/query/browser/messagePanel",e)}),define(Q[2135],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/query/browser/query.contribution",e)}),define(Q[2136],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/query/browser/queryActions",e)}),define(Q[2137],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/query/browser/queryEditor",e)}),define(Q[2138],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/query/browser/queryResultsView",e)}),define(Q[2139],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/query/browser/statusBarItems",e)}),define(Q[2140],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/query/common/resultsGrid.contribution",e)}),define(Q[2141],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/resourceDeployment/browser/resourceDeployment.contribution",e)}),define(Q[2142],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/resourceViewer/browser/resourceViewer.contribution",e)}),define(Q[2143],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/resourceViewer/browser/resourceViewerActions",e)}),define(Q[2144],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/resourceViewer/browser/resourceViewerTable",e)}),define(Q[2145],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/resourceViewer/browser/resourceViewerView",e)}),define(Q[2146],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/resourceViewer/common/resourceViewerViewExtensionPoint",e)}),define(Q[2147],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/restore/browser/restore.contribution",e)}),define(Q[2148],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/restore/browser/restoreActions",e)}),define(Q[2149],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/scripting/browser/scripting.contribution",e)}),define(Q[2150],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/scripting/browser/scriptingActions",e)}),define(Q[2151],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/tableDesigner/browser/actions",e)}),define(Q[2152],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/tasks/browser/tasks.contribution",e)}),define(Q[2153],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/tasks/browser/tasksActions",e)}),define(Q[2154],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/tasks/browser/tasksRenderer",e)}),define(Q[2155],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/tasks/browser/tasksView",e)}),define(Q[2156],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/tasks/common/tasksAction",e)}),define(Q[2157],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/telemetry/browser/telemetryOptOut",e)}),define(Q[2158],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/tsgops/browser/tsgopsActions",e)}),define(Q[2159],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/views/browser/treeView",e)}),define(Q[2160],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/webview/browser/webViewDialog",e)}),define(Q[2161],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/welcome/browser/abstractEnablePreviewFeatures",e)}),define(Q[2162],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/welcome/browser/az_data_welcome_page",e)}),define(Q[2163],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/welcome/browser/gettingStartedTour",e)}),define(Q[2164],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/welcome/browser/retirementAnnouncement",e)}),define(Q[2165],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/welcome/browser/welcomePage",e)}),define(Q[2166],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/welcome/browser/welcomePage.contribution",e)}),define(Q[2167],Y([2,3]),function(q,e){return q.create("sql/workbench/contrib/welcome/electron-sandbox/gettingStarted",e)}),define(Q[2168],Y([2,3]),function(q,e){return q.create("sql/workbench/services/accountManagement/browser/accountDialog",e)}),define(Q[2169],Y([2,3]),function(q,e){return q.create("sql/workbench/services/accountManagement/browser/accountDialogController",e)}),define(Q[2170],Y([2,3]),function(q,e){return q.create("sql/workbench/services/accountManagement/browser/accountListRenderer",e)}),define(Q[2171],Y([2,3]),function(q,e){return q.create("sql/workbench/services/accountManagement/browser/accountManagementService",e)}),define(Q[2172],Y([2,3]),function(q,e){return q.create("sql/workbench/services/accountManagement/browser/accountPickerImpl",e)}),define(Q[2173],Y([2,3]),function(q,e){return q.create("sql/workbench/services/accountManagement/browser/autoOAuthDialog",e)}),define(Q[2174],Y([2,3]),function(q,e){return q.create("sql/workbench/services/accountManagement/browser/autoOAuthDialogController",e)}),define(Q[2175],Y([2,3]),function(q,e){return q.create("sql/workbench/services/admin/common/adminService",e)}),define(Q[2176],Y([2,3]),function(q,e){return q.create("sql/workbench/services/assessment/common/assessmentService",e)}),define(Q[2177],Y([2,3]),function(q,e){return q.create("sql/workbench/services/backupRestoreUrlBrowser/browser/urlBrowserDialog",e)}),define(Q[2178],Y([2,3]),function(q,e){return q.create("sql/workbench/services/backupRestoreUrlBrowser/browser/urlBrowserDialogService",e)}),define(Q[2179],Y([2,3]),function(q,e){return q.create("sql/workbench/services/connection/browser/advancedPropertiesController",e)}),define(Q[2180],Y([2,3]),function(q,e){return q.create("sql/workbench/services/connection/browser/cmsConnectionWidget",e)}),define(Q[2181],Y([2,3]),function(q,e){return q.create("sql/workbench/services/connection/browser/connectionActions",e)}),define(Q[2182],Y([2,3]),function(q,e){return q.create("sql/workbench/services/connection/browser/connectionBrowseTab",e)}),define(Q[2183],Y([2,3]),function(q,e){return q.create("sql/workbench/services/connection/browser/connectionDialogService",e)}),define(Q[2184],Y([2,3]),function(q,e){return q.create("sql/workbench/services/connection/browser/connectionDialogWidget",e)}),define(Q[2185],Y([2,3]),function(q,e){return q.create("sql/workbench/services/connection/browser/connectionManagementService",e)}),define(Q[2186],Y([2,3]),function(q,e){return q.create("sql/workbench/services/connection/browser/connectionWidget",e)}),define(Q[2187],Y([2,3]),function(q,e){return q.create("sql/workbench/services/connection/browser/localizedConstants",e)}),define(Q[2188],Y([1,0,2187]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unsavedGroupLabel=e.onDidDisconnectMessage=e.onDidConnectMessage=void 0,e.onDidConnectMessage=(0,t.localize)(0,null),e.onDidDisconnectMessage=(0,t.localize)(1,null),e.unsavedGroupLabel=(0,t.localize)(2,null)}),define(Q[2189],Y([2,3]),function(q,e){return q.create("sql/workbench/services/connection/browser/passwordChangeDialog",e)}),define(Q[2190],Y([2,3]),function(q,e){return q.create("sql/workbench/services/dashboard/browser/newDashboardTabDialogImpl",e)}),define(Q[2191],Y([2,3]),function(q,e){return q.create("sql/workbench/services/dialog/browser/dialogPane",e)}),define(Q[2192],Y([2,3]),function(q,e){return q.create("sql/workbench/services/dialog/browser/wizardNavigation.component",e)}),define(Q[2193],Y([2,3]),function(q,e){return q.create("sql/workbench/services/dialog/common/dialogTypes",e)}),define(Q[2194],Y([1,0,2193,6]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Wizard=e.WizardPage=e.DialogButton=e.Dialog=e.DialogTab=e.ModelViewPane=void 0;class b{constructor(){this._valid=!0,this._validityChangedEmitter=new y.Emitter,this.onValidityChanged=this._validityChangedEmitter.event}get valid(){return this._valid}notifyValidityChanged(h){this._valid!==h&&(this._valid=h,this._validityChangedEmitter.fire(this._valid))}}e.ModelViewPane=b;class D extends b{constructor(h,a){super(),this.title=h,this.content="",a&&(this.content=a)}}e.DialogTab=D;class T extends b{static{this.DONE_BUTTON_LABEL=(0,t.localize)(0,null)}static{this.CANCEL_BUTTON_LABEL=(0,t.localize)(1,null)}constructor(h,a,r,i,s,o,u,d){super(),this.title=h,this.width=a,this.content="",this.okButton=new f(T.DONE_BUTTON_LABEL,!0),this.cancelButton=new f(T.CANCEL_BUTTON_LABEL,!0),this.customButtons=[],this._onMessageChange=new y.Emitter,this.onMessageChange=this._onMessageChange.event,this._loading=!1,this._onLoadingChange=new y.Emitter,this._onLoadingTextChange=new y.Emitter,this._onLoadingCompletedTextChange=new y.Emitter,this.onLoadingChange=this._onLoadingChange.event,this.onLoadingTextChange=this._onLoadingTextChange.event,this.onLoadingCompletedTextChange=this._onLoadingCompletedTextChange.event,d&&(this.content=d),r&&(this.dialogStyle=r),i&&(this.dialogPosition=i),s&&(this.renderHeader=s),o&&(this.renderFooter=o),u&&(this.dialogProperties=u)}get message(){return this._message}set message(h){this._message=h,this._onMessageChange.fire(this._message)}get loading(){return this._loading}set loading(h){this.loading!==h&&(this._loading=h,this._onLoadingChange.fire(this._loading))}get loadingText(){return this._loadingText}set loadingText(h){this.loadingText!==h&&(this._loadingText=h,this._onLoadingTextChange.fire(this._loadingText))}get loadingCompletedText(){return this._loadingCompletedText}set loadingCompletedText(h){this._loadingCompletedText!==h&&(this._loadingCompletedText=h,this._onLoadingCompletedTextChange.fire(this._loadingCompletedText))}registerCloseValidator(h){this._closeValidator=h}validateClose(){return this._closeValidator?Promise.resolve(this._closeValidator()):Promise.resolve(!0)}}e.Dialog=T;class f{constructor(h,a){this._label=h,this._enabled=a,this._hidden=!1,this._onClick=new y.Emitter,this.onClick=this._onClick.event,this._onUpdate=new y.Emitter,this.onUpdate=this._onUpdate.event}setProperties(h){this._enabled=h.enabled,this._focused=h.focused,this._hidden=h.hidden,this._label=h.label,this._position=h.position,this._secondary=h.secondary,this._onUpdate.fire()}get label(){return this._label}set label(h){this._label=h,this._onUpdate.fire()}get enabled(){return this._enabled}set enabled(h){this._enabled=h,this._onUpdate.fire()}get hidden(){return this._hidden}set hidden(h){this._hidden=h,this._onUpdate.fire()}get focused(){return this._focused}set focused(h){this._focused=h,this._onUpdate.fire()}get position(){return this._position}set position(h){this._position=h,this._onUpdate.fire()}get secondary(){return this._secondary}set secondary(h){this._secondary=h}registerClickEvent(h){h(()=>this._onClick.fire())}}e.DialogButton=f;class v extends D{constructor(h,a,r){super(h,a),this.pageName=r,this.customButtons=[],this._enabled=!1,this._onUpdate=new y.Emitter,this.onUpdate=this._onUpdate.event}get enabled(){return this._enabled}set enabled(h){this._enabled=h,this._onUpdate.fire()}get description(){return this._description}set description(h){this._description=h,this._onUpdate.fire()}}e.WizardPage=v;class m{constructor(h,a,r,i,s,o,u){this.title=h,this.name=a,this.doneButton=r,this.cancelButton=i,this.nextButton=s,this.backButton=o,this.generateScriptButton=u,this.pages=[],this.customButtons=[],this._currentPage=-1,this._pageChangedEmitter=new y.Emitter,this.onPageChanged=this._pageChangedEmitter.event,this._pageAddedEmitter=new y.Emitter,this.onPageAdded=this._pageAddedEmitter.event,this._pageRemovedEmitter=new y.Emitter,this.onPageRemoved=this._pageRemovedEmitter.event,this._onMessageChange=new y.Emitter,this.onMessageChange=this._onMessageChange.event,this.displayPageTitles=!1,this._loading=!1,this._onLoadingChange=new y.Emitter,this._onLoadingTextChange=new y.Emitter,this._onLoadingCompletedTextChange=new y.Emitter,this.onLoadingChange=this._onLoadingChange.event,this.onLoadingTextChange=this._onLoadingTextChange.event,this.onLoadingCompletedTextChange=this._onLoadingCompletedTextChange.event}get currentPage(){return this._currentPage}setCurrentPage(h){if(h===void 0||h<0||h>=this.pages.length)throw new Error("Index is out of bounds");let a=this._currentPage;this._currentPage=h,a!==void 0&&this._currentPage!==void 0&&a!==this._currentPage&&this._pageChangedEmitter.fire({lastPage:a,newPage:this._currentPage})}addPage(h,a){if(a!==void 0&&(a<0||a>this.pages.length))throw new Error("Index is out of bounds");a!==void 0&&this.currentPage!==void 0&&a<=this.currentPage&&++this._currentPage,a===void 0?this.pages.push(h):this.pages=this.pages.slice(0,a).concat([h],this.pages.slice(a)),this._pageAddedEmitter.fire(h)}removePage(h){if(h===void 0||h<0||h>=this.pages.length)throw new Error("Index is out of bounds");if(h===this.currentPage){let r=this._currentPage>0?this._currentPage-1:this._currentPage+1;this.setCurrentPage(r)}this.currentPage!==void 0&&h<this.currentPage&&--this._currentPage;let a=this.pages[h];this.pages.splice(h,1),this._pageRemovedEmitter.fire(a)}registerNavigationValidator(h){this._navigationValidator=h}validateNavigation(h){return this._navigationValidator?Promise.resolve(this._navigationValidator({lastPage:this._currentPage,newPage:h})):Promise.resolve(!0)}get message(){return this._message}set message(h){this._message=h,this._onMessageChange.fire(this._message)}get loading(){return this._loading}set loading(h){this.loading!==h&&(this._loading=h,this._onLoadingChange.fire(this._loading))}get loadingText(){return this._loadingText}set loadingText(h){this.loadingText!==h&&(this._loadingText=h,this._onLoadingTextChange.fire(this._loadingText))}get loadingCompletedText(){return this._loadingCompletedText}set loadingCompletedText(h){this._loadingCompletedText!==h&&(this._loadingCompletedText=h,this._onLoadingCompletedTextChange.fire(this._loadingCompletedText))}}e.Wizard=m}),define(Q[2195],Y([2,3]),function(q,e){return q.create("sql/workbench/services/editData/common/editQueryRunner",e)}),define(Q[2196],Y([2,3]),function(q,e){return q.create("sql/workbench/services/errorMessage/browser/errorMessageDialog",e)}),define(Q[2197],Y([2,3]),function(q,e){return q.create("sql/workbench/services/errorMessage/browser/errorMessageService",e)}),define(Q[2198],Y([2,3]),function(q,e){return q.create("sql/workbench/services/executionPlan/common/executionPlanService",e)}),define(Q[2199],Y([2,3]),function(q,e){return q.create("sql/workbench/services/fileBrowser/browser/fileBrowserDialog",e)}),define(Q[2200],Y([2,3]),function(q,e){return q.create("sql/workbench/services/fileBrowser/browser/fileBrowserDialogController",e)}),define(Q[2201],Y([2,3]),function(q,e){return q.create("sql/workbench/services/fileBrowser/browser/fileBrowserTreeView",e)}),define(Q[2202],Y([2,3]),function(q,e){return q.create("sql/workbench/services/fileBrowser/common/fileBrowserService",e)}),define(Q[2203],Y([2,3]),function(q,e){return q.create("sql/workbench/services/fileBrowser/common/fileBrowserViewModel",e)}),define(Q[2204],Y([2,3]),function(q,e){return q.create("sql/workbench/services/insights/browser/insightDialogActions",e)}),define(Q[2205],Y([2,3]),function(q,e){return q.create("sql/workbench/services/insights/browser/insightsDialogController",e)}),define(Q[2206],Y([2,3]),function(q,e){return q.create("sql/workbench/services/insights/browser/insightsDialogView",e)}),define(Q[2207],Y([2,3]),function(q,e){return q.create("sql/workbench/services/insights/common/insightsUtils",e)}),define(Q[2208],Y([2,3]),function(q,e){return q.create("sql/workbench/services/jobManagement/browser/jobManagementUtilities",e)}),define(Q[816],Y([1,0,2208]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JobManagementUtilities=void 0;class y{static{this.startIconClass="action-label codicon runJobIcon"}static{this.stopIconClass="action-label codicon stopJobIcon"}static{this.jobMessageLength=110}static convertToStatusString(D){switch(D){case 0:return t.localize(0,null);case 1:return t.localize(1,null);case 2:return t.localize(2,null);case 3:return t.localize(3,null);case 4:return t.localize(4,null);case 5:return t.localize(5,null);default:return t.localize(6,null)}}static convertToExecutionStatusString(D){switch(D){case 1:return t.localize(7,null);case 2:return t.localize(8,null);case 3:return t.localize(9,null);case 4:return t.localize(10,null);case 5:return t.localize(11,null);case 6:return t.localize(12,null);case 7:return"PerformingCompletionActions";default:return t.localize(13,null)}}static convertToResponse(D){return D?t.localize(14,null):t.localize(15,null)}static convertToNextRun(D){return D.includes("1/1/0001")?t.localize(16,null):D}static convertToLastRun(D){return D.includes("1/1/0001")?t.localize(17,null):D}static setRunnable(D,T){D.classList.remove("non-runnable")}static getActionIconClassName(D,T,f){switch(this.setRunnable(D,y.startIconClass.length),this.setRunnable(T,y.stopIconClass.length),f){case 1:D.className+=" non-runnable";return;case 2:D.className+=" non-runnable";return;case 3:D.className+=" non-runnable";return;case 4:T.className+=" non-runnable";return;case 5:T.className+=" non-runnable";return;case 6:D.className+=" non-runnable",T.className+=" non-runnable";return;case 7:D.className+=" non-runnable";return;default:return}}static convertDurationToSeconds(D){let T=D.split(":");return+T[0]*60*60+ +T[1]*60+ +T[2]}static convertColFieldToName(D){switch(D){case"name":return"Name";case"lastRun":return"Last Run";case"nextRun":return"Next Run";case"enabled":return"Enabled";case"status":return"Status";case"category":return"Category";case"runnable":return"Runnable";case"schedule":return"Schedule";case"lastRunOutcome":return"Last Run Outcome"}return""}static convertColNameToField(D){switch(D){case"Name":return"name";case"Last Run":return"lastRun";case"Next Run":return"nextRun";case"Enabled":return"enabled";case"Status":return"status";case"Category":return"category";case"Runnable":return"runnable";case"Schedule":return"schedule";case"Last Run Outcome":return"lastRunOutcome"}return""}}e.JobManagementUtilities=y}),define(Q[2209],Y([2,3]),function(q,e){return q.create("sql/workbench/services/jobManagement/common/jobManagementService",e)}),define(Q[2210],Y([2,3]),function(q,e){return q.create("sql/workbench/services/notebook/browser/interfaces",e)}),define(Q[666],Y([1,0,117,2210]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notebookConstants=void 0;var b;(function(D){D.SQL="SQL",D.SQL_CONNECTION_PROVIDER=t.mssqlProviderName,D.MYSQL_CONNECTION_PROVIDER=t.mysqlProviderName,D.PGSQL_CONNECTION_PROVIDER=t.pgsqlProviderName,D.sqlKernel=(0,y.localize)(0,null),D.sqlKernelSpec={name:D.sqlKernel,language:"sql",display_name:D.sqlKernel}})(b||(e.notebookConstants=b={}))}),define(Q[2211],Y([2,3]),function(q,e){return q.create("sql/workbench/services/notebook/browser/models/cell",e)}),define(Q[2212],Y([2,3]),function(q,e){return q.create("sql/workbench/services/notebook/browser/models/cellEdit",e)}),define(Q[2213],Y([1,0,271,42,2212]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellOutputDataEdit=e.CellOutputEdit=e.ConvertCellTypeEdit=e.AddCellEdit=e.DeleteCellEdit=e.SplitCellEdit=e.MoveCellEdit=void 0;class D{constructor(r,i,s){this.model=r,this.cell=i,this.moveDirection=s,this.type=0,this.label=(0,b.localize)(0,null),this.resource=this.model.notebookUri,this.cellOperation={cell_operation:"move_cell"}}undo(){const r=this.moveDirection===t.MoveDirection.Down?t.MoveDirection.Up:t.MoveDirection.Down;this.model.moveCell(this.cell,r,!1),this.model.sendNotebookTelemetryActionEvent("UndoCell",this.cellOperation)}redo(){this.model.moveCell(this.cell,this.moveDirection,!1),this.model.sendNotebookTelemetryActionEvent("RedoCell",this.cellOperation)}}e.MoveCellEdit=D;class T{constructor(r,i){this.model=r,this.cells=i,this.type=0,this.label=(0,b.localize)(1,null),this.resource=this.model.notebookUri,this.cellOperation={cell_operation:"split_cell"},this.firstCellOriginalSource=(0,y.deepClone)(i[0].cell.source)}undo(){this.model.mergeCells(this.cells),this.model.sendNotebookTelemetryActionEvent("UndoCell",this.cellOperation)}redo(){this.model.splitCells(this.cells,this.firstCellOriginalSource),this.model.sendNotebookTelemetryActionEvent("RedoCell",this.cellOperation)}}e.SplitCellEdit=T;class f{constructor(r,i,s){this.model=r,this.cell=i,this.index=s,this.type=0,this.label=(0,b.localize)(2,null),this.resource=this.model.notebookUri,this.cellOperation={cell_operation:"delete_cell"}}undo(){this.model.insertCell(this.cell,this.index,!1),this.model.sendNotebookTelemetryActionEvent("UndoCell",this.cellOperation)}redo(){this.model.deleteCell(this.cell,!1),this.model.sendNotebookTelemetryActionEvent("RedoCell",this.cellOperation)}}e.DeleteCellEdit=f;class v{constructor(r,i,s){this.model=r,this.cell=i,this.index=s,this.type=0,this.label=(0,b.localize)(3,null),this.resource=this.model.notebookUri,this.cellOperation={cell_operation:"add_cell"}}undo(){this.model.deleteCell(this.cell,!1),this.model.sendNotebookTelemetryActionEvent("UndoCell",this.cellOperation)}redo(){this.model.insertCell(this.cell,this.index,!1),this.model.sendNotebookTelemetryActionEvent("RedoCell",this.cellOperation)}}e.AddCellEdit=v;class m{constructor(r,i){this.model=r,this.cell=i,this.type=0,this.label=(0,b.localize)(4,null),this.resource=this.model.notebookUri,this.cellOperation={cell_operation:"convert_cell_type"}}undo(){this.model.convertCellType(this.cell,!1),this.model.sendNotebookTelemetryActionEvent("UndoCell",this.cellOperation)}redo(){this.model.convertCellType(this.cell,!1),this.model.sendNotebookTelemetryActionEvent("RedoCell",this.cellOperation)}}e.ConvertCellTypeEdit=m;class S{constructor(r,i){this.outputs=r,this.append=i,this.type=0}}e.CellOutputEdit=S;class h{constructor(r,i,s){this.outputId=r,this.data=i,this.append=s,this.type=1}}e.CellOutputDataEdit=h}),define(Q[2214],Y([2,3]),function(q,e){return q.create("sql/workbench/services/notebook/browser/models/clientSession",e)}),define(Q[2215],Y([1,0,2214,15,183]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientSession=void 0;class D{constructor(f){this.options=f,this._errorMessage="",this._kernelChangeHandlers=[],this._serverLoadFinished=Promise.resolve(),this._isServerStarted=!1,this._kernelConfigActions=[],this._connectionId="",this._kernelNotFoundError=501,this._notebookUri=f.notebookUri,this._executeManager=f.executeManager,this._isReady=!1,this._ready=new b.Deferred,this._kernelChangeCompleted=new b.Deferred,this._defaultKernel=f.kernelSpec}async initialize(){try{this._serverLoadFinished=this.startServer(this.options.kernelSpec),await this.initializeSession(),await this.updateCachedKernelSpec()}catch(f){this._errorMessage=(0,y.getErrorMessage)(f)||(0,t.localize)(0,null)}this._isReady=!0,this._ready.resolve(),!this.isInErrorState&&this._session&&this._session.kernel&&await this.notifyKernelChanged(this._session.kernel)}async startServer(f){if(!this._executeManager)throw new Error((0,t.localize)(1,null));let v=this._executeManager.serverManager;if(v){if(await v.startServer(f),!v.isStarted)throw new Error((0,t.localize)(2,null));this._isServerStarted=v.isStarted}else this._isServerStarted=!0}async initializeSession(){await this._serverLoadFinished,this._isServerStarted&&(this._executeManager.sessionManager.isReady||await this._executeManager.sessionManager.ready,this._defaultKernel&&await this.startSessionInstance(this._defaultKernel))}async startSessionInstance(f){let v;try{v=await this._executeManager.sessionManager.startNew({path:this.notebookUri.fsPath,kernelName:f.name,kernelSpec:f}),v.defaultKernelLoaded=!0}catch(m){if(m.response?.status===this._kernelNotFoundError||m.errorCode===this._kernelNotFoundError)this.options.notificationService.warn((0,t.localize)(3,null,f.name)),v=await this._executeManager.sessionManager.startNew({path:this.notebookUri.fsPath,kernelName:void 0}),v.defaultKernelLoaded=!1;else throw m}this._session=v,await this.runKernelConfigActions(f.name)}async runKernelConfigActions(f){for(let v of this._kernelConfigActions)await v(f)}dispose(){}get serverLoadFinished(){return this._serverLoadFinished}onKernelChanging(f){f&&this._kernelChangeHandlers.push(f)}get kernel(){return this._session?this._session.kernel:void 0}get notebookUri(){return this._notebookUri}get status(){return this.isReady?this._session?this._session.status:"dead":"starting"}get isReady(){return this._isReady}get ready(){return this._ready.promise}get kernelChangeCompleted(){return this._kernelChangeCompleted.promise}get errorMessage(){return this._errorMessage}get isInErrorState(){return!!this._errorMessage}get cachedKernelSpec(){return this._cachedKernelSpec}async changeKernel(f,v){this._kernelChangeCompleted=new b.Deferred,this._isReady=!1;let m=v||this.kernel,S=await this.doChangeKernel(f);try{await S?.ready}catch(a){throw this._isReady=S?S.isReady:!1,this._kernelChangeCompleted.resolve(),a}let h=this._session?this._session.kernel:S;return this._isReady=S?S.isReady:!1,await this.updateCachedKernelSpec(),h&&await this.notifyKernelChanged(h,m),S}async notifyKernelChanged(f,v){let m={oldValue:v,newValue:f},S=this._kernelChangeHandlers.map(h=>h(m));await Promise.all(S),this._kernelChangeCompleted.resolve()}async updateCachedKernelSpec(){this._cachedKernelSpec=void 0;let f=this.kernel;f&&(await f.ready,f.isReady&&(this._cachedKernelSpec=await f.getSpec()))}async doChangeKernel(f){let v;return this._session?(v=await this._session.changeKernel(f),await this.runKernelConfigActions(v.name)):v=await this.startSessionInstance(f).then(()=>this.kernel),v}async configureKernel(f){this._session&&await this._session.configureKernel(f)}async updateConnection(f){this.kernel&&f.id!=="-1"&&f.id!==this._connectionId&&this._session&&(await this._session.configureConnection(f),this._connectionId=f.id)}async shutdown(){this._session&&this._session.id&&this._executeManager&&this._executeManager.sessionManager&&await this._executeManager.sessionManager.shutdown(this._session.id)}restart(){if(!this._session?.kernel)return Promise.resolve();let f=new b.Deferred;return this._session?.kernel?.restart().then(()=>{this.options.notificationService.info((0,t.localize)(4,null)),f.resolve()},v=>{this.options.notificationService.error((0,t.localize)(5,null,v)),f.reject(v)}),f.promise}}e.ClientSession=D}),define(Q[2216],Y([2,3]),function(q,e){return q.create("sql/workbench/services/notebook/browser/models/notebookContexts",e)}),define(Q[2217],Y([1,0,2216,117]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookContexts=void 0;class b{static get DefaultContext(){return{providerName:y.mssqlProviderName,id:"-1",serverName:(0,t.localize)(0,null)}}static get LocalContext(){return{providerName:y.mssqlProviderName,id:"-1",serverName:(0,t.localize)(1,null)}}static getContextForKernel(T,f){return f.length===0?b.LocalContext:T&&T.providerName&&f.filter(v=>v===T.providerName).length>0?T:b.DefaultContext}}e.NotebookContexts=b}),define(Q[2218],Y([2,3]),function(q,e){return q.create("sql/workbench/services/notebook/browser/models/notebookModel",e)}),define(Q[2219],Y([2,3]),function(q,e){return q.create("sql/workbench/services/notebook/browser/notebookServiceImpl",e)}),define(Q[2220],Y([2,3]),function(q,e){return q.create("sql/workbench/services/notebook/browser/notebookViews/notebookViewModel",e)}),define(Q[1098],Y([1,0,6,2220,59]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookViewModel=e.ViewsTab=e.ViewNameTakenError=e.GRID_COLUMNS=e.DEFAULT_VIEW_CARD_WIDTH=e.DEFAULT_VIEW_CARD_HEIGHT=void 0,e.DEFAULT_VIEW_CARD_HEIGHT=4,e.DEFAULT_VIEW_CARD_WIDTH=12,e.GRID_COLUMNS=12;class D extends Error{}e.ViewNameTakenError=D;function T(m,S){return!(m.y+m.height<=S.y||m.x+m.width<=S.x||m.x+m.width<=S.x||S.x+S.width<=m.x)}class f{constructor(S,h){this.fromJSON(S,h)}toJSON(){return{cell:this.cell,title:this.title,id:this.id,group:this.group,icon:this.icon}}fromJSON(S,h){this.cell=S.cell,this.title=S.title,this.id=S.id,this.group=S.group,this.icon=S.icon,this.cellModel=h}}e.ViewsTab=f;class v{constructor(S,h,a=[],r){this._name=S,this._notebookViews=h,this._cards=a,this._onDeleted=new t.Emitter,this._onCellVisibilityChanged=new t.Emitter,this._isNew=!1,this.onDeleted=this._onDeleted.event,this.onCellVisibilityChanged=this._onCellVisibilityChanged.event,this.guid=r??(0,b.generateUuid)(),this._cards.forEach(i=>{i.tabs.forEach(s=>{s.cellModel=this.cells.find(o=>o.cellGuid===s.cell.guid)})})}static load(S,h){const a=h.getViews().find(r=>r.guid===S);return new v(a.name,h,a.cards,a.guid)}initialize(S){S&&(this._isNew=S),S&&this.initializeCards()}initializeCards(){const S=this._notebookViews.notebook.cells;let h;S.forEach((a,r)=>{h={guid:(0,b.generateUuid)(),y:r*e.DEFAULT_VIEW_CARD_HEIGHT,x:0,width:e.DEFAULT_VIEW_CARD_WIDTH,height:e.DEFAULT_VIEW_CARD_HEIGHT,tabs:[]},this.createTab(a,h),this._cards.push(h)})}createTab(S,h){if(h===void 0)throw new Error("A card must be specified to create a tab");const a={title:(0,y.localize)(0,null),id:(0,b.generateUuid)(),group:h.guid,cell:{guid:S.cellGuid}};h.tabs.push(new f(a,S))}cellInitialized(S){return!!this.getCellMetadata(S)}get name(){return this._name}set name(S){if(this.name!==S&&this._notebookViews.viewNameIsTaken(S))throw new D((0,y.localize)(1,null,S));this._name=S}nameAvailable(S){return!this._notebookViews.viewNameIsTaken(S)}getCellMetadata(S){return this._notebookViews.getExtensionCellMetadata(S)?.views?.find(a=>a.guid===this.guid)}get hiddenCells(){const S=this.cards.flatMap(h=>h.tabs);return this.cells.filter(h=>!S.find(a=>a.cell.guid===h.cellGuid))}get cards(){return this._cards}get cells(){return this._notebookViews.notebook.cells}get displayedCells(){return this.cells.filter(S=>!this.getCellMetadata(S)?.hidden)}getCell(S){return this._notebookViews.notebook.cells.find(h=>h.cellGuid===S)}updateCell(S,h,a,r=!1){this._notebookViews.updateCell(S,h,a,r)}insertCell(S){let h={guid:(0,b.generateUuid)(),y:0,x:0,width:e.DEFAULT_VIEW_CARD_WIDTH,height:e.DEFAULT_VIEW_CARD_HEIGHT,tabs:[]};return this.createTab(S,h),this._cards.push(h),this._onCellVisibilityChanged.fire(S),this.save(),h}hideCell(S){this.cards.forEach(h=>{const a=h.tabs.filter(r=>r.cell.guid!==S.cellGuid);if(this._notebookViews.updateCard(h,{tabs:a},this),!a.length){const r=this.cards.findIndex(s=>s.guid===h.guid);this._cards.splice(r,1).length===1&&(this.compactCells(),this.save())}}),this._onCellVisibilityChanged.fire(S)}moveCard(S,h,a){this._notebookViews.updateCard(S,{x:h,y:a},this)}resizeCard(S,h,a){let r={};h&&(r.width=h),a&&(r.height=a),this._notebookViews.updateCard(S,r,this)}resizeCell(S,h,a){let r={};h&&(r.width=h),a&&(r.height=a),this.updateCell(S,this,r)}getCellSize(S){const h=this.getCellMetadata(S);return{width:h.width,height:h.height}}compactCells(){let S=[];this.cards.forEach(h=>{for(let a=0;;a++){const r=a%e.GRID_COLUMNS,i=Math.floor(a/e.GRID_COLUMNS);if(!(r+h.width>e.GRID_COLUMNS)&&!S.find(s=>T(s,{...h,x:r,y:i}))){this._notebookViews.updateCard(h,{x:r,y:i},this),S.push({...h,x:r,y:i});break}}})}save(){this._notebookViews.commit()}delete(){this._notebookViews.removeView(this.guid),this._onDeleted.fire(this)}get isNew(){return this._isNew}markAsViewed(){this._isNew=!1}toJSON(){return{guid:this.guid,name:this._name,cards:this.cards}}}e.NotebookViewModel=v}),define(Q[2221],Y([2,3]),function(q,e){return q.create("sql/workbench/services/notebook/browser/notebookViews/notebookViewsExtension",e)}),define(Q[2222],Y([2,3]),function(q,e){return q.create("sql/workbench/services/notebook/browser/sql/sqlSessionManager",e)}),define(Q[2223],Y([2,3]),function(q,e){return q.create("sql/workbench/services/notebook/common/contracts",e)}),define(Q[205],Y([1,0,2223]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextCellEditModes=e.ImageMimeTypes=e.NotebookChangeType=e.OutputTypes=e.MimeTypes=e.CellTypes=void 0;class y{static{this.Code="code"}static{this.Markdown="markdown"}}e.CellTypes=y;class b{static{this.PlainText="text/plain"}static{this.HTML="text/html"}}e.MimeTypes=b;class D{static{this.ExecuteResult="execute_result"}static{this.DisplayData="display_data"}static{this.Stream="stream"}static{this.Error="error"}static{this.UpdateDisplayData="update_display_data"}}e.OutputTypes=D;var T;(function(v){v[v.CellsModified=0]="CellsModified",v[v.CellSourceUpdated=1]="CellSourceUpdated",v[v.CellOutputUpdated=2]="CellOutputUpdated",v[v.DirtyStateChanged=3]="DirtyStateChanged",v[v.KernelChanged=4]="KernelChanged",v[v.MetadataChanged=5]="MetadataChanged",v[v.TrustChanged=6]="TrustChanged",v[v.Saved=7]="Saved",v[v.CellExecutionStarted=8]="CellExecutionStarted",v[v.CellExecuted=9]="CellExecuted",v[v.CellInputVisibilityChanged=10]="CellInputVisibilityChanged",v[v.CellAwaitingInput=11]="CellAwaitingInput",v[v.CellOutputCleared=12]="CellOutputCleared",v[v.CellMetadataUpdated=13]="CellMetadataUpdated"})(T||(e.NotebookChangeType=T={})),e.ImageMimeTypes=["image/bmp","image/png","image/jpeg","image/gif"];class f{static{this.RichText=(0,t.localize)(0,null)}static{this.SplitView=(0,t.localize)(1,null)}static{this.Markdown=(0,t.localize)(2,null)}}e.TextCellEditModes=f}),define(Q[2224],Y([1,0,205,42]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookExtension=void 0;class b{constructor(T){this.version=1,this.extensionNamespace="extensions",this._extensionName=T}get extensionName(){return this._extensionName}getExtensionMetadata(T){return(T.getMetaValue(this.extensionNamespace)||{})[this.extensionName]}setExtensionMetadata(T,f){const v={};v[this.extensionName]=f,T.setMetaValue(this.extensionNamespace,v),T.serializationStateChanged(t.NotebookChangeType.MetadataChanged)}getExtensionCellMetadata(T){return(T.metadata[this.extensionNamespace]||{})[this.extensionName]}setExtensionCellMetadata(T,f){const v={};v[this.extensionName]=f,T.metadata[this.extensionNamespace]=v,T.metadata=(0,y.deepClone)(T.metadata),T.sendChangeToNotebook(t.NotebookChangeType.CellsModified)}}e.NotebookExtension=b}),define(Q[2225],Y([1,0,59,6,2221,1098,2224,1541]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookViewsExtension=void 0;class v extends T.NotebookExtension{static{this.defaultViewName=(0,b.localize)(0,null)}static{this.extension="notebookviews"}static{this.upgrades=[new f.NotebookViewsUpgrades.V1ToV2NotebookViewsExtensionUpgrade]}constructor(S){super(v.extension),this._notebook=S,this.maxNameIterationAttempts=100,this.version=2,this._initialized=!1,this._onViewDeleted=new y.Emitter,this._onActiveViewChanged=new y.Emitter,this.load()}load(){this._metadata=this.getExtensionMetadata(),this._metadata&&(v.upgrades.forEach(S=>{S.versionCheck(this._metadata.version)&&(S.apply(this),this._metadata=this.getExtensionMetadata())}),this._metadata.views=this._metadata.views.map(S=>D.NotebookViewModel.load(S.guid,this)),this._initialized=!0)}initialize(){this._metadata=this.getExtensionMetadata(),this._metadata||(this.initializeNotebook(),this.initializeCells(),this.commit()),this._initialized=!0}initializeNotebook(){this._metadata={version:this.version,activeView:void 0,views:[]}}initializeCells(){this._notebook.cells.forEach(h=>{this.initializeCell(h)})}initializeCell(S){const h={views:[]};this.setExtensionCellMetadata(S,h)}createNewView(S){const h=S||this.generateDefaultViewName();this.initialized||this.initialize();const a=new D.NotebookViewModel(h,this);return a.initialize(!0),this._metadata=Object.assign({},this._metadata,{views:[...this._metadata.views,a]}),this.commit(),a}removeView(S){let h=this._metadata?.views.findIndex(a=>a.guid===S);h>=0&&this._metadata?.views.splice(h,1),S===this._metadata?.activeView&&(this._metadata.activeView=void 0),this._metadata=Object.assign({},this._metadata),this._onViewDeleted.fire(),this.commit()}generateDefaultViewName(){let S=1,h=v.defaultViewName;for(;this.viewNameIsTaken(h)&&S<=this.maxNameIterationAttempts;)h=`${v.defaultViewName} ${S++}`;return S<=this.maxNameIterationAttempts?h:(0,t.generateUuid)()}updateCell(S,h,a,r=!1){const i=this.getExtensionCellMetadata(S);if(i){const s=i.views.findIndex(o=>o.guid===h.guid);s>=0&&(i.views[s]=r?a:{...i.views[s],...a},this.setExtensionCellMetadata(S,i))}}updateCard(S,h,a,r=!1){const i=this.getExtensionMetadata();if(i){const s=i.views.findIndex(o=>o.guid===a.guid);if(s>=0){const o=i.views[s].cards.findIndex(u=>u.guid===S.guid);o>=0&&(i.views[s].cards[o]=r?h:{...i.views[s].cards[o],...h},this.setExtensionMetadata(this._notebook,i))}}}get notebook(){return this._notebook}getViews(){return this._metadata?.views??[]}get metadata(){return this._metadata}getCells(){return this._notebook.cells.map(S=>this.getExtensionCellMetadata(S))}getExtensionMetadata(){return super.getExtensionMetadata(this._notebook)}getActiveView(){return this.getViews().find(S=>S.guid===this._metadata?.activeView)}setActiveView(S){this._metadata&&(this._metadata.activeView=S.guid,this._onActiveViewChanged.fire())}commit(){this._metadata=Object.assign({},this._metadata),this.setExtensionMetadata(this._notebook,this._metadata)}viewNameIsTaken(S){return!!this.getViews().find(h=>h.name.toLowerCase()===S.toLowerCase())}get onViewDeleted(){return this._onViewDeleted.event}get onActiveViewChanged(){return this._onActiveViewChanged.event}get initialized(){return this._initialized}}e.NotebookViewsExtension=v}),define(Q[2226],Y([2,3]),function(q,e){return q.create("sql/workbench/services/notebook/common/localContentManager",e)}),define(Q[2227],Y([2,3]),function(q,e){return q.create("sql/workbench/services/notebook/common/notebookRegistry",e)}),define(Q[2228],Y([2,3]),function(q,e){return q.create("sql/workbench/services/objectExplorer/browser/connectionTreeAction",e)}),define(Q[2229],Y([2,3]),function(q,e){return q.create("sql/workbench/services/objectExplorer/browser/dragAndDropController",e)}),define(Q[2230],Y([2,3]),function(q,e){return q.create("sql/workbench/services/objectExplorer/browser/filterDialog/filterDialog",e)}),define(Q[2231],Y([2,3]),function(q,e){return q.create("sql/workbench/services/objectExplorer/browser/objectExplorerService",e)}),define(Q[2232],Y([2,3]),function(q,e){return q.create("sql/workbench/services/objectExplorer/browser/objectExplorerViewTreeShim",e)}),define(Q[2233],Y([2,3]),function(q,e){return q.create("sql/workbench/services/objectExplorer/browser/serverTreeRenderer",e)}),define(Q[2234],Y([2,3]),function(q,e){return q.create("sql/workbench/services/objectExplorer/browser/treeCreationUtils",e)}),define(Q[2235],Y([2,3]),function(q,e){return q.create("sql/workbench/services/objectExplorer/browser/treeUpdateUtils",e)}),define(Q[2236],Y([2,3]),function(q,e){return q.create("sql/workbench/services/profiler/browser/profilerColumnEditorDialog",e)}),define(Q[2237],Y([2,3]),function(q,e){return q.create("sql/workbench/services/profiler/browser/profilerFilterDialog",e)}),define(Q[2238],Y([2,3]),function(q,e){return q.create("sql/workbench/services/profiler/browser/profilerService",e)}),define(Q[2239],Y([2,3]),function(q,e){return q.create("sql/workbench/services/query/common/gridDataProvider",e)}),define(Q[2240],Y([2,3]),function(q,e){return q.create("sql/workbench/services/query/common/queryManagement",e)}),define(Q[2241],Y([2,3]),function(q,e){return q.create("sql/workbench/services/query/common/queryModelService",e)}),define(Q[2242],Y([2,3]),function(q,e){return q.create("sql/workbench/services/query/common/queryRunner",e)}),define(Q[2243],Y([2,3]),function(q,e){return q.create("sql/workbench/services/query/common/resultSerializer",e)}),define(Q[2244],Y([2,3]),function(q,e){return q.create("sql/workbench/services/resourceProvider/browser/firewallRuleDialog",e)}),define(Q[2245],Y([2,3]),function(q,e){return q.create("sql/workbench/services/resourceProvider/browser/firewallRuleDialogController",e)}),define(Q[2246],Y([2,3]),function(q,e){return q.create("sql/workbench/services/restore/browser/restoreDialog",e)}),define(Q[2247],Y([2,3]),function(q,e){return q.create("sql/workbench/services/restore/browser/restoreServiceImpl",e)}),define(Q[2248],Y([2,3]),function(q,e){return q.create("sql/workbench/services/restore/common/constants",e)}),define(Q[1099],Y([1,0,2248]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fileFiltersSet=void 0,e.fileFiltersSet=[{label:(0,t.localize)(0,null),filters:["*.bak","*.trn","*.log"]},{label:(0,t.localize)(1,null),filters:["*"]}]}),define(Q[2249],Y([2,3]),function(q,e){return q.create("sql/workbench/services/serverGroup/browser/serverGroupDialog",e)}),define(Q[2250],Y([2,3]),function(q,e){return q.create("sql/workbench/services/serverGroup/common/serverGroupViewModel",e)}),define(Q[667],Y([1,0,17,2250,33]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServerGroupViewModel=e.DefaultServerGroupColor=void 0,e.DefaultServerGroupColor="#515151";class D{constructor(f,v){this.colors=[e.DefaultServerGroupColor,"#004760","#771b00","#700060","#a17d01","#006749","#654502","#3A0293"],this._addServerGroupTitle=(0,y.localize)(0,null),this._editServerGroupTitle=(0,y.localize)(1,null),f?(this._domainModel=f,this.groupName=f.name,this.groupColor=f.color,this.groupDescription=f.description,this._editMode=!0):(this.groupName="",this.groupDescription="",this.groupColor=e.DefaultServerGroupColor,this._editMode=!1),v&&(this.colors=v)}hasPendingChanges(){return t.isUndefinedOrNull(this._domainModel)?b.isFalsyOrWhitespace(this.groupName)===!1:b.isFalsyOrWhitespace(this.groupName)===!1&&(this.groupName!==this._domainModel.name||this.groupDescription!==this._domainModel.description||this.groupColor!==this._domainModel.color)}getDialogTitle(){return this._editMode===!0?this._editServerGroupTitle:this._addServerGroupTitle}}e.ServerGroupViewModel=D}),define(Q[2251],Y([2,3]),function(q,e){return q.create("sql/workbench/services/tableDesigner/browser/tableDesignerComponentInput",e)}),define(Q[2252],Y([2,3]),function(q,e){return q.create("sql/workbench/services/tableDesigner/browser/tableDesignerPublishDialog",e)}),define(Q[2253],Y([2,3]),function(q,e){return q.create("sql/workbench/services/tableDesigner/browser/tableDesignerService",e)}),define(Q[2254],Y([2,3]),function(q,e){return q.create("sql/workbench/services/tasks/common/tasksService",e)}),define(Q[2255],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/actionbar/actionViewItems",e)}),define(Q[2256],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/button/button",e)}),define(Q[2257],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/dialog/dialog",e)}),define(Q[2258],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/dropdown/dropdownActionViewItem",e)}),define(Q[2259],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/findinput/findInput",e)}),define(Q[2260],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/findinput/findInputToggles",e)}),define(Q[2261],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/findinput/replaceInput",e)}),define(Q[2262],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/hover/hoverWidget",e)}),define(Q[2263],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/iconLabel/iconLabelHover",e)}),define(Q[2264],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/inputbox/inputBox",e)}),define(Q[2265],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",e)}),define(Q[2266],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/menu/menubar",e)}),define(Q[2267],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/selectBox/selectBoxCustom",e)}),define(Q[2268],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/splitview/paneview",e)}),define(Q[2269],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/toolbar/toolbar",e)}),define(Q[2270],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/tree/abstractTree",e)}),define(Q[2271],Y([2,3]),function(q,e){return q.create("vs/base/browser/ui/tree/treeDefaults",e)}),define(Q[2272],Y([2,3]),function(q,e){return q.create("vs/base/common/actions",e)}),define(Q[34],Y([1,0,6,4,2272]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toAction=e.EmptySubmenuAction=e.SubmenuAction=e.Separator=e.ActionRunner=e.Action=void 0;class D extends y.Disposable{constructor(a,r="",i="",s=!0,o){super(),this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._expanded=!1,this._id=a,this._label=r,this._cssClass=i,this._enabled=s,this._actionCallback=o}get id(){return this._id}get label(){return this._label}set label(a){this._setLabel(a)}_setLabel(a){this._label!==a&&(this._label=a,this._onDidChange.fire({label:a}))}get tooltip(){return this._tooltip||""}set tooltip(a){this._setTooltip(a)}_setTooltip(a){this._tooltip!==a&&(this._tooltip=a,this._onDidChange.fire({tooltip:a}))}get class(){return this._cssClass}set class(a){this._setClass(a)}_setClass(a){this._cssClass!==a&&(this._cssClass=a,this._onDidChange.fire({class:a}))}get enabled(){return this._enabled}set enabled(a){this._setEnabled(a)}_setEnabled(a){this._enabled!==a&&(this._enabled=a,this._onDidChange.fire({enabled:a}))}get checked(){return this._checked}set checked(a){this._setChecked(a)}_setChecked(a){this._checked!==a&&(this._checked=a,this._onDidChange.fire({checked:a}))}get expanded(){return this._expanded}set expanded(a){this._setExpanded(a)}_setExpanded(a){this._expanded!==a&&(this._expanded=a,this._onDidChange.fire({expanded:a}))}async run(a,r){this._actionCallback&&await this._actionCallback(a)}}e.Action=D;class T extends y.Disposable{constructor(){super(...arguments),this._onWillRun=this._register(new t.Emitter),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new t.Emitter),this.onDidRun=this._onDidRun.event}async run(a,r){if(!a.enabled)return;this._onWillRun.fire({action:a});let i;try{await this.runAction(a,r)}catch(s){i=s}this._onDidRun.fire({action:a,error:i})}async runAction(a,r){await a.run(r)}}e.ActionRunner=T;class f{constructor(){this.id=f.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...a){let r=[];for(const i of a)i.length&&(r.length?r=[...r,new f,...i]:r=i);return r}static{this.ID="vs.actions.separator"}async run(){}}e.Separator=f;class v{get actions(){return this._actions}constructor(a,r,i,s){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=a,this.label=r,this.class=s,this._actions=i}async run(){}get expanded(){return!1}set expanded(a){}_setExpanded(a){}}e.SubmenuAction=v;class m extends D{static{this.ID="vs.actions.empty"}constructor(){super(m.ID,b.localize(0,null),void 0,!1)}}e.EmptySubmenuAction=m;function S(h){return{id:h.id,label:h.label,class:void 0,expanded:!1,enabled:h.enabled??!0,checked:h.checked??!1,run:async()=>h.run(),tooltip:h.label}}e.toAction=S}),define(Q[2273],Y([1,0,34,1924]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CloseTabAction=void 0;class b extends t.Action{static{this.ID="closeTab"}static{this.LABEL=y.localize(0,null)}static{this.ICON="close"}constructor(T,f){super(b.ID,b.LABEL,b.ICON),this.closeFn=T,this.context=f}async run(){this.closeFn.apply(this.context)}}e.CloseTabAction=b}),define(Q[2274],Y([1,0,34,1925]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TogglePropertiesAction=void 0;class b extends t.Action{static{this.ID="TogglePropertiesAction"}static{this.COLLPASE_LABEL=y.localize(0,null)}static{this.EXPAND_LABEL=y.localize(1,null)}static{this.COLLAPSE_ICON="codicon-chevron-up"}static{this.EXPAND_ICON="codicon-chevron-down"}constructor(){super(b.ID,b.COLLPASE_LABEL,b.COLLAPSE_ICON),this.expanded=!0}async run(){this.expanded=!this.expanded,this.class=this.expanded?b.COLLAPSE_ICON:b.EXPAND_ICON,this.label=this.expanded?b.COLLPASE_LABEL:b.EXPAND_LABEL}}e.TogglePropertiesAction=b}),define(Q[2275],Y([1,0,647,34,1957]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InsertAfterSelectedRowAction=e.InsertBeforeSelectedRowAction=e.MoveRowDownAction=e.MoveRowUpAction=e.AddRowAction=e.DesignerTableAction=void 0;class D extends y.Action{constructor(a,r,i,s,o){super(r,i,s),this._designer=a,this.needsRowSelection=o}set table(a){this._table=a}updateState(a){a===void 0&&(this.needsRowSelection?this.enabled=!1:this.enabled=!0)}async run(a){await this._designer.submitPendingChanges()}}e.DesignerTableAction=D;class T extends D{static{this.ID="designer.addRowAction"}static{this.ICON="add-row-button new codicon"}static{this.LABEL=(0,b.localize)(0,null)}constructor(a,r){super(a,T.ID,r.labelForAddNewButton||T.LABEL,T.ICON,!1),this.designer=a,this.designer=a,this._tooltip=(0,b.localize)(1,null,r.ariaLabel)}async run(a){await super.run(a);const r=a.table.getData().getItems().length;return new Promise(i=>{this.designer.handleEdit({type:t.DesignerEditType.Add,path:[...a.path,r],source:a.source}),i()})}}e.AddRowAction=T;class f extends D{static{this.ID="designer.moveRowUpAction"}static{this.ICON="move-row-up-button arrow-up codicon"}static{this.LABEL=(0,b.localize)(2,null)}constructor(a){super(a,f.ID,f.LABEL,f.ICON,!0),this.designer=a,this.designer=a,this._tooltip=(0,b.localize)(3,null),this.enabled=!1}async run(a){await super.run(a);let r=a.selectedRow??a.table.getSelectedRows()[0];if(!(r-1<0))return new Promise(i=>{this.designer.handleEdit({type:t.DesignerEditType.Move,path:[...a.path,r],source:a.source,value:r-1}),i()})}updateState(a){a===0?this.enabled=!1:this.enabled=!0,super.updateState(a)}}e.MoveRowUpAction=f;class v extends D{static{this.ID="designer.moveRowDownAction"}static{this.ICON="move-row-down-button arrow-down codicon"}static{this.LABEL=(0,b.localize)(4,null)}constructor(a){super(a,v.ID,v.LABEL,v.ICON,!0),this.designer=a,this.designer=a,this._tooltip=(0,b.localize)(5,null),this.enabled=!1}async run(a){await super.run(a);let r=a.selectedRow??a.table.getSelectedRows()[0];const i=a.table.getData().getItems();if(!(r+1>=i.length))return new Promise(s=>{this.designer.handleEdit({type:t.DesignerEditType.Move,path:[...a.path,r],source:a.source,value:r+1}),s()})}updateState(a){super.updateState(a),a===this._table.getData().getLength()-1?this.enabled=!1:this.enabled=!0,super.updateState(a)}}e.MoveRowDownAction=v;class m extends y.Action{static{this.ID="designer.insertBeforeSelectedRow"}static{this.LABEL=(0,b.localize)(6,null)}constructor(a){super(m.ID,m.LABEL,"insertBeforeSelectedRow",!0),this.designer=a,this.designer=a}async run(a){const r=a.selectedRow;return new Promise(i=>{this.designer.handleEdit({type:t.DesignerEditType.Add,path:[...a.path,r],source:a.source}),i()})}}e.InsertBeforeSelectedRowAction=m;class S extends y.Action{static{this.ID="designer.insertAfterSelectedColumn"}static{this.LABEL=(0,b.localize)(7,null)}constructor(a){super(S.ID,S.LABEL,"insertAfterSelectedColumn",!0),this.designer=a}async run(a){const r=a.selectedRow;return new Promise(i=>{this.designer.handleEdit({type:t.DesignerEditType.Add,path:[...a.path,r+1],source:a.source}),i()})}}e.InsertAfterSelectedRowAction=S}),define(Q[2276],Y([1,0,34,2143]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceViewerRefresh=void 0;class b extends t.Action{static{this.ID="resourceViewer.refresh"}static{this.LABEL=y.localize(0,null)}constructor(){super(b.ID,b.LABEL,"codicon refresh")}async run(T){this.enabled=!1;try{await T.refresh()}finally{this.enabled=!0}}}e.ResourceViewerRefresh=b}),define(Q[2277],Y([1,0,34,32,4,37,2151]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaveTableChangesAction=void 0;const f=(0,T.localize)(0,null),v=(0,T.localize)(1,null);class m extends t.Action{static{this.ID="tableDesigner.publishTableChanges"}constructor(){super(m.ID),this._inputDisposableStore=new b.DisposableStore}setContext(h){this._input=h,this.updateState(),this.updateLabelAndIcon(),this._inputDisposableStore?.dispose(),this._inputDisposableStore=new b.DisposableStore,this._inputDisposableStore.add(h.onStateChange(a=>{this.updateState()})),this._inputDisposableStore.add(h.onInitialized(()=>{this.updateLabelAndIcon()}))}updateState(){this.enabled=this._input.dirty&&this._input.valid&&this._input.pendingAction===void 0}updateLabelAndIcon(){this._input?.tableDesignerView?.useAdvancedSaveMode?(this.label=f,this.class=D.ThemeIcon.asClassName(y.Codicon.repoPush)):(this.label=v,this.class=D.ThemeIcon.asClassName(y.Codicon.save))}async run(){await this._input.save()}dispose(){super.dispose(),this._inputDisposableStore?.dispose()}}e.SaveTableChangesAction=m}),define(Q[1100],Y([1,0,34,2271]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapseAllAction=void 0;class b extends t.Action{constructor(T,f){super("vs.tree.collapse",y.localize(0,null),"collapse-all",f),this.viewer=T}async run(){this.viewer.collapseAll(),this.viewer.setSelection([]),this.viewer.setFocus([])}}e.CollapseAllAction=b}),define(Q[2278],Y([2,3]),function(q,e){return q.create("vs/base/common/date",e)}),define(Q[260],Y([1,0,2278]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toLocalISOString=e.fromNow=void 0;const y=60,b=y*60,D=b*24,T=D*7,f=D*30,v=D*365;function m(h,a,r,i){typeof h!="number"&&(h=h.getTime());const s=Math.round((new Date().getTime()-h)/1e3);if(s<-30)return(0,t.localize)(0,null,m(new Date().getTime()+s*1e3,!1));if(!i&&s<30)return(0,t.localize)(1,null);let o;return s<y?(o=s,a?o===1?r?(0,t.localize)(2,null,o):(0,t.localize)(3,null,o):r?(0,t.localize)(4,null,o):(0,t.localize)(5,null,o):o===1?r?(0,t.localize)(6,null,o):(0,t.localize)(7,null,o):r?(0,t.localize)(8,null,o):(0,t.localize)(9,null,o)):s<b?(o=Math.floor(s/y),a?o===1?r?(0,t.localize)(10,null,o):(0,t.localize)(11,null,o):r?(0,t.localize)(12,null,o):(0,t.localize)(13,null,o):o===1?r?(0,t.localize)(14,null,o):(0,t.localize)(15,null,o):r?(0,t.localize)(16,null,o):(0,t.localize)(17,null,o)):s<D?(o=Math.floor(s/b),a?o===1?r?(0,t.localize)(18,null,o):(0,t.localize)(19,null,o):r?(0,t.localize)(20,null,o):(0,t.localize)(21,null,o):o===1?r?(0,t.localize)(22,null,o):(0,t.localize)(23,null,o):r?(0,t.localize)(24,null,o):(0,t.localize)(25,null,o)):s<T?(o=Math.floor(s/D),a?o===1?(0,t.localize)(26,null,o):(0,t.localize)(27,null,o):o===1?(0,t.localize)(28,null,o):(0,t.localize)(29,null,o)):s<f?(o=Math.floor(s/T),a?o===1?r?(0,t.localize)(30,null,o):(0,t.localize)(31,null,o):r?(0,t.localize)(32,null,o):(0,t.localize)(33,null,o):o===1?r?(0,t.localize)(34,null,o):(0,t.localize)(35,null,o):r?(0,t.localize)(36,null,o):(0,t.localize)(37,null,o)):s<v?(o=Math.floor(s/f),a?o===1?r?(0,t.localize)(38,null,o):(0,t.localize)(39,null,o):r?(0,t.localize)(40,null,o):(0,t.localize)(41,null,o):o===1?r?(0,t.localize)(42,null,o):(0,t.localize)(43,null,o):r?(0,t.localize)(44,null,o):(0,t.localize)(45,null,o)):(o=Math.floor(s/v),a?o===1?r?(0,t.localize)(46,null,o):(0,t.localize)(47,null,o):r?(0,t.localize)(48,null,o):(0,t.localize)(49,null,o):o===1?r?(0,t.localize)(50,null,o):(0,t.localize)(51,null,o):r?(0,t.localize)(52,null,o):(0,t.localize)(53,null,o))}e.fromNow=m;function S(h){return h.getFullYear()+"-"+String(h.getMonth()+1).padStart(2,"0")+"-"+String(h.getDate()).padStart(2,"0")+"T"+String(h.getHours()).padStart(2,"0")+":"+String(h.getMinutes()).padStart(2,"0")+":"+String(h.getSeconds()).padStart(2,"0")+"."+(h.getMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}e.toLocalISOString=S}),define(Q[2279],Y([2,3]),function(q,e){return q.create("vs/base/common/errorMessage",e)}),define(Q[132],Y([1,0,20,17,2279]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorWithActions=e.isErrorWithActions=e.toErrorMessage=void 0;function D(h,a){return a&&(h.stack||h.stacktrace)?b.localize(0,null,f(h),T(h.stack)||T(h.stacktrace)):f(h)}function T(h){return Array.isArray(h)?h.join(` `):h}function f(h){return h.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${h.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof h.code=="string"&&typeof h.errno=="number"&&typeof h.syscall=="string"?b.localize(1,null,h.message):h.message||b.localize(2,null)}function v(h=null,a=!1){if(!h)return b.localize(3,null);if(Array.isArray(h)){const r=t.coalesce(h),i=v(r[0],a);return r.length>1?b.localize(4,null,i,r.length):i}if(y.isString(h))return h;if(h.detail){const r=h.detail;if(r.error)return D(r.error,a);if(r.exception)return D(r.exception,a)}return h.stack?D(h,a):h.message?h.message:b.localize(5,null)}e.toErrorMessage=v;function m(h){const a=h;return a instanceof Error&&Array.isArray(a.actions)}e.isErrorWithActions=m;function S(h,a){let r;return typeof h=="string"?r=new Error(h):r=h,r.actions=a,r}e.createErrorWithActions=S}),define(Q[2280],Y([2,3]),function(q,e){return q.create("vs/base/common/jsonErrorMessages",e)}),define(Q[569],Y([1,0,2280]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getParseErrorMessage=void 0;function y(b){switch(b){case 1:return(0,t.localize)(0,null);case 2:return(0,t.localize)(1,null);case 3:return(0,t.localize)(2,null);case 4:return(0,t.localize)(3,null);case 5:return(0,t.localize)(4,null);case 6:return(0,t.localize)(5,null);case 7:return(0,t.localize)(6,null);case 8:return(0,t.localize)(7,null);case 9:return(0,t.localize)(8,null);default:return""}}e.getParseErrorMessage=y}),define(Q[2281],Y([2,3]),function(q,e){return q.create("vs/base/common/keybindingLabels",e)}),define(Q[443],Y([1,0,2281]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserSettingsLabelProvider=e.ElectronAcceleratorLabelProvider=e.AriaLabelProvider=e.UILabelProvider=e.ModifierLabelProvider=void 0;class y{constructor(T,f,v=f){this.modifierLabels=[null],this.modifierLabels[2]=T,this.modifierLabels[1]=f,this.modifierLabels[3]=v}toLabel(T,f,v){if(f.length===0)return null;const m=[];for(let S=0,h=f.length;S<h;S++){const a=f[S],r=v(a);if(r===null)return null;m[S]=b(a,r,this.modifierLabels[T])}return m.join(" ")}}e.ModifierLabelProvider=y,e.UILabelProvider=new y({ctrlKey:"\u2303",shiftKey:"\u21E7",altKey:"\u2325",metaKey:"\u2318",separator:""},{ctrlKey:t.localize(0,null),shiftKey:t.localize(1,null),altKey:t.localize(2,null),metaKey:t.localize(3,null),separator:"+"},{ctrlKey:t.localize(4,null),shiftKey:t.localize(5,null),altKey:t.localize(6,null),metaKey:t.localize(7,null),separator:"+"}),e.AriaLabelProvider=new y({ctrlKey:t.localize(8,null),shiftKey:t.localize(9,null),altKey:t.localize(10,null),metaKey:t.localize(11,null),separator:"+"},{ctrlKey:t.localize(12,null),shiftKey:t.localize(13,null),altKey:t.localize(14,null),metaKey:t.localize(15,null),separator:"+"},{ctrlKey:t.localize(16,null),shiftKey:t.localize(17,null),altKey:t.localize(18,null),metaKey:t.localize(19,null),separator:"+"}),e.ElectronAcceleratorLabelProvider=new y({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"}),e.UserSettingsLabelProvider=new y({ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"cmd",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"win",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"meta",separator:"+"});function b(D,T,f){if(T===null)return"";const v=[];return D.ctrlKey&&v.push(f.ctrlKey),D.shiftKey&&v.push(f.shiftKey),D.altKey&&v.push(f.altKey),D.metaKey&&v.push(f.metaKey),T!==""&&v.push(T),v.join(f.separator)}}),define(Q[2282],Y([2,3]),function(q,e){return q.create("vs/base/common/platform",e)}),define(Q[18],Y([1,0,2282]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAndroid=e.isEdge=e.isSafari=e.isFirefox=e.isChrome=e.isLittleEndian=e.OS=e.OperatingSystem=e.setTimeout0=e.setTimeout0IsFaster=e.translationsConfigFile=e.platformLocale=e.locale=e.Language=e.language=e.userAgent=e.platform=e.isCI=e.isMobile=e.isIOS=e.isWebWorker=e.isWeb=e.isElectron=e.isNative=e.isLinuxSnap=e.isLinux=e.isMacintosh=e.isWindows=e.PlatformToString=e.Platform=e.globals=e.LANGUAGE_DEFAULT=void 0,e.LANGUAGE_DEFAULT="en";let y=!1,b=!1,D=!1,T=!1,f=!1,v=!1,m=!1,S=!1,h=!1,a=!1,r,i=e.LANGUAGE_DEFAULT,s=e.LANGUAGE_DEFAULT,o,u;e.globals=typeof self=="object"?self:typeof global=="object"?global:{};let d;typeof e.globals.vscode<"u"&&typeof e.globals.vscode.process<"u"?d=e.globals.vscode.process:typeof process<"u"&&(d=process);const p=typeof d?.versions?.electron=="string",c=p&&d?.type==="renderer";if(typeof navigator=="object"&&!c)u=navigator.userAgent,y=u.indexOf("Windows")>=0,b=u.indexOf("Macintosh")>=0,S=(u.indexOf("Macintosh")>=0||u.indexOf("iPad")>=0||u.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,D=u.indexOf("Linux")>=0,a=u?.indexOf("Mobi")>=0,v=!0,r=t.getConfiguredDefaultLocale(t.localize(0,null))||e.LANGUAGE_DEFAULT,i=r,s=navigator.language;else if(typeof d=="object"){y=d.platform==="win32",b=d.platform==="darwin",D=d.platform==="linux",T=D&&!!d.env.SNAP&&!!d.env.SNAP_REVISION,m=p,h=!!d.env.CI||!!d.env.BUILD_ARTIFACTSTAGINGDIRECTORY,r=e.LANGUAGE_DEFAULT,i=e.LANGUAGE_DEFAULT;const A=d.env.VSCODE_NLS_CONFIG;if(A)try{const k=JSON.parse(A),L=k.availableLanguages["*"];r=k.locale,s=k.osLocale,i=L||e.LANGUAGE_DEFAULT,o=k._translationsConfigFile}catch{}f=!0}else console.error("Unable to resolve platform.");var l;(function(A){A[A.Web=0]="Web",A[A.Mac=1]="Mac",A[A.Linux=2]="Linux",A[A.Windows=3]="Windows"})(l||(e.Platform=l={}));function n(A){switch(A){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}e.PlatformToString=n;let g=0;b?g=1:y?g=3:D&&(g=2),e.isWindows=y,e.isMacintosh=b,e.isLinux=D,e.isLinuxSnap=T,e.isNative=f,e.isElectron=m,e.isWeb=v,e.isWebWorker=v&&typeof e.globals.importScripts=="function",e.isIOS=S,e.isMobile=a,e.isCI=h,e.platform=g,e.userAgent=u,e.language=i;var w;(function(A){function k(){return e.language}A.value=k;function L(){return e.language.length===2?e.language==="en":e.language.length>=3?e.language[0]==="e"&&e.language[1]==="n"&&e.language[2]==="-":!1}A.isDefaultVariant=L;function R(){return e.language==="en"}A.isDefault=R})(w||(e.Language=w={})),e.locale=r,e.platformLocale=s,e.translationsConfigFile=o,e.setTimeout0IsFaster=typeof e.globals.postMessage=="function"&&!e.globals.importScripts,e.setTimeout0=(()=>{if(e.setTimeout0IsFaster){const A=[];e.globals.addEventListener("message",L=>{if(L.data&&L.data.vscodeScheduleAsyncWork)for(let R=0,M=A.length;R<M;R++){const N=A[R];if(N.id===L.data.vscodeScheduleAsyncWork){A.splice(R,1),N.callback();return}}});let k=0;return L=>{const R=++k;A.push({id:R,callback:L}),e.globals.postMessage({vscodeScheduleAsyncWork:R},"*")}}return A=>setTimeout(A)})();var E;(function(A){A[A.Windows=1]="Windows",A[A.Macintosh=2]="Macintosh",A[A.Linux=3]="Linux"})(E||(e.OperatingSystem=E={})),e.OS=b||S?2:y?1:3;let C=!0,I=!1;function _(){if(!I){I=!0;const A=new Uint8Array(2);A[0]=1,A[1]=2,C=new Uint16Array(A.buffer)[0]===(2<<8)+1}return C}e.isLittleEndian=_,e.isChrome=!!(e.userAgent&&e.userAgent.indexOf("Chrome")>=0),e.isFirefox=!!(e.userAgent&&e.userAgent.indexOf("Firefox")>=0),e.isSafari=!!(!e.isChrome&&e.userAgent&&e.userAgent.indexOf("Safari")>=0),e.isEdge=!!(e.userAgent&&e.userAgent.indexOf("Edg/")>=0),e.isAndroid=!!(e.userAgent&&e.userAgent.indexOf("Android")>=0)}),define(Q[1101],Y([1,0,18]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.replaceInvalidLinkPath=void 0;function y(b){if(t.isWindows&&b.startsWith("...")){let D=b.indexOf("\\");return b="..\\".repeat(D/2)+b.substring(D+1),b}else return b}e.replaceInvalidLinkPath=y}),define(Q[324],Y([1,0,97,18]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserFeatures=e.KeyboardSupport=void 0;var b;(function(D){D[D.Always=0]="Always",D[D.FullScreen=1]="FullScreen",D[D.None=2]="None"})(b||(e.KeyboardSupport=b={})),e.BrowserFeatures={clipboard:{writeText:y.isNative||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:y.isNative||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>y.isNative||t.isStandalone()?0:navigator.keyboard||t.isSafari?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}}),define(Q[67],Y([1,0,97,105,321,18]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardKeyboardEvent=e.printStandardKeyboardEvent=e.printKeyboardEvent=void 0;function T(i){if(i.charCode){const o=String.fromCharCode(i.charCode).toUpperCase();return y.KeyCodeUtils.fromString(o)}const s=i.keyCode;if(s===3)return 7;if(t.isFirefox)switch(s){case 59:return 85;case 60:if(D.isLinux)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(D.isMacintosh)return 57;break}else if(t.isWebKit){if(D.isMacintosh&&s===93)return 57;if(!D.isMacintosh&&s===92)return 57}return y.EVENT_KEY_CODE_MAP[s]||0}const f=D.isMacintosh?256:2048,v=512,m=1024,S=D.isMacintosh?2048:256;function h(i){const s=[];return i.ctrlKey&&s.push("ctrl"),i.shiftKey&&s.push("shift"),i.altKey&&s.push("alt"),i.metaKey&&s.push("meta"),`modifiers: [${s.join(",")}], code: ${i.code}, keyCode: ${i.keyCode}, key: ${i.key}`}e.printKeyboardEvent=h;function a(i){const s=[];return i.ctrlKey&&s.push("ctrl"),i.shiftKey&&s.push("shift"),i.altKey&&s.push("alt"),i.metaKey&&s.push("meta"),`modifiers: [${s.join(",")}], code: ${i.code}, keyCode: ${i.keyCode} ('${y.KeyCodeUtils.toString(i.keyCode)}')`}e.printStandardKeyboardEvent=a;class r{constructor(s){this._standardKeyboardEventBrand=!0;const o=s;this.browserEvent=o,this.target=o.target,this.ctrlKey=o.ctrlKey,this.shiftKey=o.shiftKey,this.altKey=o.altKey,this.metaKey=o.metaKey,this.altGraphKey=o.getModifierState("AltGraph"),this.keyCode=T(o),this.code=o.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(s){return this._asKeybinding===s}_computeKeybinding(){let s=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(s=this.keyCode);let o=0;return this.ctrlKey&&(o|=f),this.altKey&&(o|=v),this.shiftKey&&(o|=m),this.metaKey&&(o|=S),o|=s,o}_computeKeyCodeChord(){let s=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(s=this.keyCode),new b.KeyCodeChord(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,s)}}e.StandardKeyboardEvent=r}),define(Q[129],Y([1,0,97,1522,18]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardWheelEvent=e.DragMouseEvent=e.StandardMouseEvent=void 0;class D{constructor(m){this.timestamp=Date.now(),this.browserEvent=m,this.leftButton=m.button===0,this.middleButton=m.button===1,this.rightButton=m.button===2,this.buttons=m.buttons,this.target=m.target,this.detail=m.detail||1,m.type==="dblclick"&&(this.detail=2),this.ctrlKey=m.ctrlKey,this.shiftKey=m.shiftKey,this.altKey=m.altKey,this.metaKey=m.metaKey,typeof m.pageX=="number"?(this.posx=m.pageX,this.posy=m.pageY):(this.posx=m.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=m.clientY+document.body.scrollTop+document.documentElement.scrollTop);const S=y.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(window,m.view);this.posx-=S.left,this.posy-=S.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}e.StandardMouseEvent=D;class T extends D{constructor(m){super(m),this.dataTransfer=m.dataTransfer}}e.DragMouseEvent=T;class f{constructor(m,S=0,h=0){if(this.browserEvent=m||null,this.target=m?m.target||m.targetNode||m.srcElement:null,this.deltaY=h,this.deltaX=S,m){const a=m,r=m;if(typeof a.wheelDeltaY<"u")this.deltaY=a.wheelDeltaY/120;else if(typeof r.VERTICAL_AXIS<"u"&&r.axis===r.VERTICAL_AXIS)this.deltaY=-r.detail/3;else if(m.type==="wheel"){const i=m;i.deltaMode===i.DOM_DELTA_LINE?t.isFirefox&&!b.isMacintosh?this.deltaY=-m.deltaY/3:this.deltaY=-m.deltaY:this.deltaY=-m.deltaY/40}if(typeof a.wheelDeltaX<"u")t.isSafari&&b.isWindows?this.deltaX=-(a.wheelDeltaX/120):this.deltaX=a.wheelDeltaX/120;else if(typeof r.HORIZONTAL_AXIS<"u"&&r.axis===r.HORIZONTAL_AXIS)this.deltaX=-m.detail/3;else if(m.type==="wheel"){const i=m;i.deltaMode===i.DOM_DELTA_LINE?t.isFirefox&&!b.isMacintosh?this.deltaX=-m.deltaX/3:this.deltaX=-m.deltaX:this.deltaX=-m.deltaX/40}this.deltaY===0&&this.deltaX===0&&m.wheelDelta&&(this.deltaY=m.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}}e.StandardWheelEvent=f}),define(Q[261],Y([1,0,18]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.arch=e.platform=e.env=e.cwd=void 0;let y;if(typeof t.globals.vscode<"u"&&typeof t.globals.vscode.process<"u"){const b=t.globals.vscode.process;y={get platform(){return b.platform},get arch(){return b.arch},get env(){return b.env},cwd(){return b.cwd()}}}else typeof process<"u"?y={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:y={get platform(){return t.isWindows?"win32":t.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};e.cwd=y.cwd,e.env=y.env,e.platform=y.platform,e.arch=y.arch}),define(Q[55],Y([1,0,261]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.delimiter=e.sep=e.toNamespacedPath=e.parse=e.format=e.extname=e.basename=e.dirname=e.relative=e.resolve=e.join=e.isAbsolute=e.normalize=e.posix=e.win32=void 0;const y=65,b=97,D=90,T=122,f=46,v=47,m=92,S=58,h=63;class a extends Error{constructor(g,w,E){let C;typeof w=="string"&&w.indexOf("not ")===0?(C="must not be",w=w.replace(/^not /,"")):C="must be";const I=g.indexOf(".")!==-1?"property":"argument";let _=`The "${g}" ${I} ${C} of type ${w}`;_+=`. Received type ${typeof E}`,super(_),this.code="ERR_INVALID_ARG_TYPE"}}function r(n,g){if(n===null||typeof n!="object")throw new a(g,"Object",n)}function i(n,g){if(typeof n!="string")throw new a(g,"string",n)}const s=t.platform==="win32";function o(n){return n===v||n===m}function u(n){return n===v}function d(n){return n>=y&&n<=D||n>=b&&n<=T}function p(n,g,w,E){let C="",I=0,_=-1,A=0,k=0;for(let L=0;L<=n.length;++L){if(L<n.length)k=n.charCodeAt(L);else{if(E(k))break;k=v}if(E(k)){if(!(_===L-1||A===1))if(A===2){if(C.length<2||I!==2||C.charCodeAt(C.length-1)!==f||C.charCodeAt(C.length-2)!==f){if(C.length>2){const R=C.lastIndexOf(w);R===-1?(C="",I=0):(C=C.slice(0,R),I=C.length-1-C.lastIndexOf(w)),_=L,A=0;continue}else if(C.length!==0){C="",I=0,_=L,A=0;continue}}g&&(C+=C.length>0?`${w}..`:"..",I=2)}else C.length>0?C+=`${w}${n.slice(_+1,L)}`:C=n.slice(_+1,L),I=L-_-1;_=L,A=0}else k===f&&A!==-1?++A:A=-1}return C}function c(n,g){r(g,"pathObject");const w=g.dir||g.root,E=g.base||`${g.name||""}${g.ext||""}`;return w?w===g.root?`${w}${E}`:`${w}${n}${E}`:E}e.win32={resolve(...n){let g="",w="",E=!1;for(let C=n.length-1;C>=-1;C--){let I;if(C>=0){if(I=n[C],i(I,"path"),I.length===0)continue}else g.length===0?I=t.cwd():(I=t.env[`=${g}`]||t.cwd(),(I===void 0||I.slice(0,2).toLowerCase()!==g.toLowerCase()&&I.charCodeAt(2)===m)&&(I=`${g}\\`));const _=I.length;let A=0,k="",L=!1;const R=I.charCodeAt(0);if(_===1)o(R)&&(A=1,L=!0);else if(o(R))if(L=!0,o(I.charCodeAt(1))){let M=2,N=M;for(;M<_&&!o(I.charCodeAt(M));)M++;if(M<_&&M!==N){const P=I.slice(N,M);for(N=M;M<_&&o(I.charCodeAt(M));)M++;if(M<_&&M!==N){for(N=M;M<_&&!o(I.charCodeAt(M));)M++;(M===_||M!==N)&&(k=`\\\\${P}\\${I.slice(N,M)}`,A=M)}}}else A=1;else d(R)&&I.charCodeAt(1)===S&&(k=I.slice(0,2),A=2,_>2&&o(I.charCodeAt(2))&&(L=!0,A=3));if(k.length>0)if(g.length>0){if(k.toLowerCase()!==g.toLowerCase())continue}else g=k;if(E){if(g.length>0)break}else if(w=`${I.slice(A)}\\${w}`,E=L,L&&g.length>0)break}return w=p(w,!E,"\\",o),E?`${g}\\${w}`:`${g}${w}`||"."},normalize(n){i(n,"path");const g=n.length;if(g===0)return".";let w=0,E,C=!1;const I=n.charCodeAt(0);if(g===1)return u(I)?"\\":n;if(o(I))if(C=!0,o(n.charCodeAt(1))){let A=2,k=A;for(;A<g&&!o(n.charCodeAt(A));)A++;if(A<g&&A!==k){const L=n.slice(k,A);for(k=A;A<g&&o(n.charCodeAt(A));)A++;if(A<g&&A!==k){for(k=A;A<g&&!o(n.charCodeAt(A));)A++;if(A===g)return`\\\\${L}\\${n.slice(k)}\\`;A!==k&&(E=`\\\\${L}\\${n.slice(k,A)}`,w=A)}}}else w=1;else d(I)&&n.charCodeAt(1)===S&&(E=n.slice(0,2),w=2,g>2&&o(n.charCodeAt(2))&&(C=!0,w=3));let _=w<g?p(n.slice(w),!C,"\\",o):"";return _.length===0&&!C&&(_="."),_.length>0&&o(n.charCodeAt(g-1))&&(_+="\\"),E===void 0?C?`\\${_}`:_:C?`${E}\\${_}`:`${E}${_}`},isAbsolute(n){i(n,"path");const g=n.length;if(g===0)return!1;const w=n.charCodeAt(0);return o(w)||g>2&&d(w)&&n.charCodeAt(1)===S&&o(n.charCodeAt(2))},join(...n){if(n.length===0)return".";let g,w;for(let I=0;I<n.length;++I){const _=n[I];i(_,"path"),_.length>0&&(g===void 0?g=w=_:g+=`\\${_}`)}if(g===void 0)return".";let E=!0,C=0;if(typeof w=="string"&&o(w.charCodeAt(0))){++C;const I=w.length;I>1&&o(w.charCodeAt(1))&&(++C,I>2&&(o(w.charCodeAt(2))?++C:E=!1))}if(E){for(;C<g.length&&o(g.charCodeAt(C));)C++;C>=2&&(g=`\\${g.slice(C)}`)}return e.win32.normalize(g)},relative(n,g){if(i(n,"from"),i(g,"to"),n===g)return"";const w=e.win32.resolve(n),E=e.win32.resolve(g);if(w===E||(n=w.toLowerCase(),g=E.toLowerCase(),n===g))return"";let C=0;for(;C<n.length&&n.charCodeAt(C)===m;)C++;let I=n.length;for(;I-1>C&&n.charCodeAt(I-1)===m;)I--;const _=I-C;let A=0;for(;A<g.length&&g.charCodeAt(A)===m;)A++;let k=g.length;for(;k-1>A&&g.charCodeAt(k-1)===m;)k--;const L=k-A,R=_<L?_:L;let M=-1,N=0;for(;N<R;N++){const x=n.charCodeAt(C+N);if(x!==g.charCodeAt(A+N))break;x===m&&(M=N)}if(N!==R){if(M===-1)return E}else{if(L>R){if(g.charCodeAt(A+N)===m)return E.slice(A+N+1);if(N===2)return E.slice(A+N)}_>R&&(n.charCodeAt(C+N)===m?M=N:N===2&&(M=3)),M===-1&&(M=0)}let P="";for(N=C+M+1;N<=I;++N)(N===I||n.charCodeAt(N)===m)&&(P+=P.length===0?"..":"\\..");return A+=M,P.length>0?`${P}${E.slice(A,k)}`:(E.charCodeAt(A)===m&&++A,E.slice(A,k))},toNamespacedPath(n){if(typeof n!="string"||n.length===0)return n;const g=e.win32.resolve(n);if(g.length<=2)return n;if(g.charCodeAt(0)===m){if(g.charCodeAt(1)===m){const w=g.charCodeAt(2);if(w!==h&&w!==f)return`\\\\?\\UNC\\${g.slice(2)}`}}else if(d(g.charCodeAt(0))&&g.charCodeAt(1)===S&&g.charCodeAt(2)===m)return`\\\\?\\${g}`;return n},dirname(n){i(n,"path");const g=n.length;if(g===0)return".";let w=-1,E=0;const C=n.charCodeAt(0);if(g===1)return o(C)?n:".";if(o(C)){if(w=E=1,o(n.charCodeAt(1))){let A=2,k=A;for(;A<g&&!o(n.charCodeAt(A));)A++;if(A<g&&A!==k){for(k=A;A<g&&o(n.charCodeAt(A));)A++;if(A<g&&A!==k){for(k=A;A<g&&!o(n.charCodeAt(A));)A++;if(A===g)return n;A!==k&&(w=E=A+1)}}}}else d(C)&&n.charCodeAt(1)===S&&(w=g>2&&o(n.charCodeAt(2))?3:2,E=w);let I=-1,_=!0;for(let A=g-1;A>=E;--A)if(o(n.charCodeAt(A))){if(!_){I=A;break}}else _=!1;if(I===-1){if(w===-1)return".";I=w}return n.slice(0,I)},basename(n,g){g!==void 0&&i(g,"ext"),i(n,"path");let w=0,E=-1,C=!0,I;if(n.length>=2&&d(n.charCodeAt(0))&&n.charCodeAt(1)===S&&(w=2),g!==void 0&&g.length>0&&g.length<=n.length){if(g===n)return"";let _=g.length-1,A=-1;for(I=n.length-1;I>=w;--I){const k=n.charCodeAt(I);if(o(k)){if(!C){w=I+1;break}}else A===-1&&(C=!1,A=I+1),_>=0&&(k===g.charCodeAt(_)?--_===-1&&(E=I):(_=-1,E=A))}return w===E?E=A:E===-1&&(E=n.length),n.slice(w,E)}for(I=n.length-1;I>=w;--I)if(o(n.charCodeAt(I))){if(!C){w=I+1;break}}else E===-1&&(C=!1,E=I+1);return E===-1?"":n.slice(w,E)},extname(n){i(n,"path");let g=0,w=-1,E=0,C=-1,I=!0,_=0;n.length>=2&&n.charCodeAt(1)===S&&d(n.charCodeAt(0))&&(g=E=2);for(let A=n.length-1;A>=g;--A){const k=n.charCodeAt(A);if(o(k)){if(!I){E=A+1;break}continue}C===-1&&(I=!1,C=A+1),k===f?w===-1?w=A:_!==1&&(_=1):w!==-1&&(_=-1)}return w===-1||C===-1||_===0||_===1&&w===C-1&&w===E+1?"":n.slice(w,C)},format:c.bind(null,"\\"),parse(n){i(n,"path");const g={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return g;const w=n.length;let E=0,C=n.charCodeAt(0);if(w===1)return o(C)?(g.root=g.dir=n,g):(g.base=g.name=n,g);if(o(C)){if(E=1,o(n.charCodeAt(1))){let M=2,N=M;for(;M<w&&!o(n.charCodeAt(M));)M++;if(M<w&&M!==N){for(N=M;M<w&&o(n.charCodeAt(M));)M++;if(M<w&&M!==N){for(N=M;M<w&&!o(n.charCodeAt(M));)M++;M===w?E=M:M!==N&&(E=M+1)}}}}else if(d(C)&&n.charCodeAt(1)===S){if(w<=2)return g.root=g.dir=n,g;if(E=2,o(n.charCodeAt(2))){if(w===3)return g.root=g.dir=n,g;E=3}}E>0&&(g.root=n.slice(0,E));let I=-1,_=E,A=-1,k=!0,L=n.length-1,R=0;for(;L>=E;--L){if(C=n.charCodeAt(L),o(C)){if(!k){_=L+1;break}continue}A===-1&&(k=!1,A=L+1),C===f?I===-1?I=L:R!==1&&(R=1):I!==-1&&(R=-1)}return A!==-1&&(I===-1||R===0||R===1&&I===A-1&&I===_+1?g.base=g.name=n.slice(_,A):(g.name=n.slice(_,I),g.base=n.slice(_,A),g.ext=n.slice(I,A))),_>0&&_!==E?g.dir=n.slice(0,_-1):g.dir=g.root,g},sep:"\\",delimiter:";",win32:null,posix:null};const l=(()=>{if(s){const n=/\\/g;return()=>{const g=t.cwd().replace(n,"/");return g.slice(g.indexOf("/"))}}return()=>t.cwd()})();e.posix={resolve(...n){let g="",w=!1;for(let E=n.length-1;E>=-1&&!w;E--){const C=E>=0?n[E]:l();i(C,"path"),C.length!==0&&(g=`${C}/${g}`,w=C.charCodeAt(0)===v)}return g=p(g,!w,"/",u),w?`/${g}`:g.length>0?g:"."},normalize(n){if(i(n,"path"),n.length===0)return".";const g=n.charCodeAt(0)===v,w=n.charCodeAt(n.length-1)===v;return n=p(n,!g,"/",u),n.length===0?g?"/":w?"./":".":(w&&(n+="/"),g?`/${n}`:n)},isAbsolute(n){return i(n,"path"),n.length>0&&n.charCodeAt(0)===v},join(...n){if(n.length===0)return".";let g;for(let w=0;w<n.length;++w){const E=n[w];i(E,"path"),E.length>0&&(g===void 0?g=E:g+=`/${E}`)}return g===void 0?".":e.posix.normalize(g)},relative(n,g){if(i(n,"from"),i(g,"to"),n===g||(n=e.posix.resolve(n),g=e.posix.resolve(g),n===g))return"";const w=1,E=n.length,C=E-w,I=1,_=g.length-I,A=C<_?C:_;let k=-1,L=0;for(;L<A;L++){const M=n.charCodeAt(w+L);if(M!==g.charCodeAt(I+L))break;M===v&&(k=L)}if(L===A)if(_>A){if(g.charCodeAt(I+L)===v)return g.slice(I+L+1);if(L===0)return g.slice(I+L)}else C>A&&(n.charCodeAt(w+L)===v?k=L:L===0&&(k=0));let R="";for(L=w+k+1;L<=E;++L)(L===E||n.charCodeAt(L)===v)&&(R+=R.length===0?"..":"/..");return`${R}${g.slice(I+k)}`},toNamespacedPath(n){return n},dirname(n){if(i(n,"path"),n.length===0)return".";const g=n.charCodeAt(0)===v;let w=-1,E=!0;for(let C=n.length-1;C>=1;--C)if(n.charCodeAt(C)===v){if(!E){w=C;break}}else E=!1;return w===-1?g?"/":".":g&&w===1?"//":n.slice(0,w)},basename(n,g){g!==void 0&&i(g,"ext"),i(n,"path");let w=0,E=-1,C=!0,I;if(g!==void 0&&g.length>0&&g.length<=n.length){if(g===n)return"";let _=g.length-1,A=-1;for(I=n.length-1;I>=0;--I){const k=n.charCodeAt(I);if(k===v){if(!C){w=I+1;break}}else A===-1&&(C=!1,A=I+1),_>=0&&(k===g.charCodeAt(_)?--_===-1&&(E=I):(_=-1,E=A))}return w===E?E=A:E===-1&&(E=n.length),n.slice(w,E)}for(I=n.length-1;I>=0;--I)if(n.charCodeAt(I)===v){if(!C){w=I+1;break}}else E===-1&&(C=!1,E=I+1);return E===-1?"":n.slice(w,E)},extname(n){i(n,"path");let g=-1,w=0,E=-1,C=!0,I=0;for(let _=n.length-1;_>=0;--_){const A=n.charCodeAt(_);if(A===v){if(!C){w=_+1;break}continue}E===-1&&(C=!1,E=_+1),A===f?g===-1?g=_:I!==1&&(I=1):g!==-1&&(I=-1)}return g===-1||E===-1||I===0||I===1&&g===E-1&&g===w+1?"":n.slice(g,E)},format:c.bind(null,"/"),parse(n){i(n,"path");const g={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return g;const w=n.charCodeAt(0)===v;let E;w?(g.root="/",E=1):E=0;let C=-1,I=0,_=-1,A=!0,k=n.length-1,L=0;for(;k>=E;--k){const R=n.charCodeAt(k);if(R===v){if(!A){I=k+1;break}continue}_===-1&&(A=!1,_=k+1),R===f?C===-1?C=k:L!==1&&(L=1):C!==-1&&(L=-1)}if(_!==-1){const R=I===0&&w?1:I;C===-1||L===0||L===1&&C===_-1&&C===I+1?g.base=g.name=n.slice(R,_):(g.name=n.slice(R,C),g.base=n.slice(R,_),g.ext=n.slice(C,_))}return I>0?g.dir=n.slice(0,I-1):w&&(g.dir="/"),g},sep:"/",delimiter:":",win32:null,posix:null},e.posix.win32=e.win32.win32=e.win32,e.posix.posix=e.win32.posix=e.posix,e.normalize=s?e.win32.normalize:e.posix.normalize,e.isAbsolute=s?e.win32.isAbsolute:e.posix.isAbsolute,e.join=s?e.win32.join:e.posix.join,e.resolve=s?e.win32.resolve:e.posix.resolve,e.relative=s?e.win32.relative:e.posix.relative,e.dirname=s?e.win32.dirname:e.posix.dirname,e.basename=s?e.win32.basename:e.posix.basename,e.extname=s?e.win32.extname:e.posix.extname,e.format=s?e.win32.format:e.posix.format,e.parse=s?e.win32.parse:e.posix.parse,e.toNamespacedPath=s?e.win32.toNamespacedPath:e.posix.toNamespacedPath,e.sep=s?e.win32.sep:e.posix.sep,e.delimiter=s?e.win32.delimiter:e.posix.delimiter}),define(Q[397],Y([1,0,203,55]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compareByPrefix=e.compareAnything=e.comparePaths=e.compareFileExtensionsUnicode=e.compareFileExtensionsLower=e.compareFileExtensionsUpper=e.compareFileExtensionsDefault=e.compareFileExtensions=e.compareFileNamesUnicode=e.compareFileNamesLower=e.compareFileNamesUpper=e.compareFileNamesDefault=e.compareFileNames=void 0;const b=new t.Lazy(()=>{const A=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:A,collatorIsNumeric:A.resolvedOptions().numeric}}),D=new t.Lazy(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),T=new t.Lazy(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function f(A,k,L=!1){const R=A||"",M=k||"",N=b.value.collator.compare(R,M);return b.value.collatorIsNumeric&&N===0&&R!==M?R<M?-1:1:N}e.compareFileNames=f;function v(A,k){const L=D.value.collator;return A=A||"",k=k||"",c(L,A,k)}e.compareFileNamesDefault=v;function m(A,k){const L=D.value.collator;return A=A||"",k=k||"",w(A,k)||c(L,A,k)}e.compareFileNamesUpper=m;function S(A,k){const L=D.value.collator;return A=A||"",k=k||"",g(A,k)||c(L,A,k)}e.compareFileNamesLower=S;function h(A,k){return A=A||"",k=k||"",A===k?0:A<k?-1:1}e.compareFileNamesUnicode=h;function a(A,k){const[L,R]=d(A),[M,N]=d(k);let P=b.value.collator.compare(R,N);if(P===0){if(b.value.collatorIsNumeric&&R!==N)return R<N?-1:1;if(P=b.value.collator.compare(L,M),b.value.collatorIsNumeric&&P===0&&L!==M)return L<M?-1:1}return P}e.compareFileExtensions=a;function r(A,k){A=A||"",k=k||"";const L=p(A),R=p(k),M=D.value.collator,N=T.value.collator;return c(N,L,R)||c(M,A,k)}e.compareFileExtensionsDefault=r;function i(A,k){A=A||"",k=k||"";const L=p(A),R=p(k),M=D.value.collator,N=T.value.collator;return c(N,L,R)||w(A,k)||c(M,A,k)}e.compareFileExtensionsUpper=i;function s(A,k){A=A||"",k=k||"";const L=p(A),R=p(k),M=D.value.collator,N=T.value.collator;return c(N,L,R)||g(A,k)||c(M,A,k)}e.compareFileExtensionsLower=s;function o(A,k){A=A||"",k=k||"";const L=p(A).toLowerCase(),R=p(k).toLowerCase();return L!==R?L<R?-1:1:A!==k?A<k?-1:1:0}e.compareFileExtensionsUnicode=o;const u=/^(.*?)(\.([^.]*))?$/;function d(A,k=!1){const L=A?u.exec(A):[];let R=[L&&L[1]||"",L&&L[3]||""];return k&&(!R[0]&&R[1]||R[0]&&R[0].charAt(0)===".")&&(R=[R[0]+"."+R[1],""]),R}function p(A){const k=A?u.exec(A):[];return k&&k[1]&&k[1].charAt(0)!=="."&&k[3]||""}function c(A,k,L){const R=A.compare(k,L);return R!==0?R:k.length!==L.length?k.length<L.length?-1:1:0}function l(A){const k=A.charAt(0);return k.toLocaleUpperCase()!==k}function n(A){const k=A.charAt(0);return k.toLocaleLowerCase()!==k}function g(A,k){return l(A)&&n(k)?-1:n(A)&&l(k)?1:0}function w(A,k){return n(A)&&l(k)?-1:l(A)&&n(k)?1:0}function E(A,k,L=!1){return L||(A=A&&A.toLowerCase(),k=k&&k.toLowerCase()),A===k?0:A<k?-1:1}function C(A,k,L=!1){const R=A.split(y.sep),M=k.split(y.sep),N=R.length-1,P=M.length-1;let x,F;for(let V=0;;V++){if(x=N===V,F=P===V,x&&F)return f(R[V],M[V],L);if(x)return-1;if(F)return 1;const W=E(R[V],M[V],L);if(W!==0)return W}}e.comparePaths=C;function I(A,k,L){const R=A.toLowerCase(),M=k.toLowerCase(),N=_(A,k,L);if(N)return N;const P=R.endsWith(L),x=M.endsWith(L);if(P!==x)return P?-1:1;const F=f(R,M);return F!==0?F:R.localeCompare(M)}e.compareAnything=I;function _(A,k,L){const R=A.toLowerCase(),M=k.toLowerCase(),N=R.startsWith(L),P=M.startsWith(L);if(N!==P)return N?-1:1;if(N&&P){if(R.length<M.length)return-1;if(R.length>M.length)return 1}return 0}e.compareByPrefix=_}),define(Q[206],Y([1,0,55,18,33,17]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomPath=e.parseLineAndColumnAware=e.indexOfPath=e.getDriveLetter=e.hasDriveLetter=e.isRootOrDriveLetter=e.sanitizeFilePath=e.isWindowsDriveLetter=e.isEqualOrParent=e.isEqual=e.isValidBasename=e.isUNC=e.getRoot=e.toPosixPath=e.toSlashes=e.isPathSeparator=void 0;function T(I){return I===47||I===92}e.isPathSeparator=T;function f(I){return I.replace(/[\\/]/g,t.posix.sep)}e.toSlashes=f;function v(I){return I.indexOf("/")===-1&&(I=f(I)),/^[a-zA-Z]:(\/|$)/.test(I)&&(I="/"+I),I}e.toPosixPath=v;function m(I,_=t.posix.sep){if(!I)return"";const A=I.length,k=I.charCodeAt(0);if(T(k)){if(T(I.charCodeAt(1))&&!T(I.charCodeAt(2))){let R=3;const M=R;for(;R<A&&!T(I.charCodeAt(R));R++);if(M!==R&&!T(I.charCodeAt(R+1))){for(R+=1;R<A;R++)if(T(I.charCodeAt(R)))return I.slice(0,R+1).replace(/[\\/]/g,_)}}return _}else if(u(k)&&I.charCodeAt(1)===58)return T(I.charCodeAt(2))?I.slice(0,2)+_:I.slice(0,2);let L=I.indexOf("://");if(L!==-1){for(L+=3;L<A;L++)if(T(I.charCodeAt(L)))return I.slice(0,L+1)}return""}e.getRoot=m;function S(I){if(!y.isWindows||!I||I.length<5)return!1;let _=I.charCodeAt(0);if(_!==92||(_=I.charCodeAt(1),_!==92))return!1;let A=2;const k=A;for(;A<I.length&&(_=I.charCodeAt(A),_!==92);A++);return!(k===A||(_=I.charCodeAt(A+1),isNaN(_)||_===92))}e.isUNC=S;const h=/[\\/:\*\?"<>\|]/g,a=/[\\/]/g,r=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;function i(I,_=y.isWindows){const A=_?h:a;return!(!I||I.length===0||/^\s+$/.test(I)||(A.lastIndex=0,A.test(I))||_&&r.test(I)||I==="."||I===".."||_&&I[I.length-1]==="."||_&&I.length!==I.trim().length||I.length>255)}e.isValidBasename=i;function s(I,_,A){const k=I===_;return!A||k?k:!I||!_?!1:(0,b.equalsIgnoreCase)(I,_)}e.isEqual=s;function o(I,_,A,k=t.sep){if(I===_)return!0;if(!I||!_||_.length>I.length)return!1;if(A){if(!(0,b.startsWithIgnoreCase)(I,_))return!1;if(_.length===I.length)return!0;let R=_.length;return _.charAt(_.length-1)===k&&R--,I.charAt(R)===k}return _.charAt(_.length-1)!==k&&(_+=k),I.indexOf(_)===0}e.isEqualOrParent=o;function u(I){return I>=65&&I<=90||I>=97&&I<=122}e.isWindowsDriveLetter=u;function d(I,_){return y.isWindows&&I.endsWith(":")&&(I+=t.sep),(0,t.isAbsolute)(I)||(I=(0,t.join)(_,I)),I=(0,t.normalize)(I),y.isWindows?(I=(0,b.rtrim)(I,t.sep),I.endsWith(":")&&(I+=t.sep)):(I=(0,b.rtrim)(I,t.sep),I||(I=t.sep)),I}e.sanitizeFilePath=d;function p(I){const _=(0,t.normalize)(I);return y.isWindows?I.length>3?!1:c(_)&&(I.length===2||_.charCodeAt(2)===92):_===t.posix.sep}e.isRootOrDriveLetter=p;function c(I,_=y.isWindows){return _?u(I.charCodeAt(0))&&I.charCodeAt(1)===58:!1}e.hasDriveLetter=c;function l(I,_=y.isWindows){return c(I,_)?I[0]:void 0}e.getDriveLetter=l;function n(I,_,A){return _.length>I.length?-1:I===_?0:(A&&(I=I.toLowerCase(),_=_.toLowerCase()),I.indexOf(_))}e.indexOfPath=n;function g(I){const _=I.split(":");let A,k,L;for(const R of _){const M=Number(R);(0,D.isNumber)(M)?k===void 0?k=M:L===void 0&&(L=M):A=A?[A,R].join(":"):R}if(!A)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:A,line:k!==void 0?k:void 0,column:L!==void 0?L:k!==void 0?1:void 0}}e.parseLineAndColumnAware=g;const w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",E="BDEFGHIJKMOQRSTUVWXYZbdefghijkmoqrstuvwxyz0123456789";function C(I,_,A=8){let k="";for(let R=0;R<A;R++){let M;R===0&&y.isWindows&&!_&&(A===3||A===4)?M=E:M=w,k+=M.charAt(Math.floor(Math.random()*M.length))}let L;return _?L=`${_}-${k}`:L=k,I?(0,t.join)(I,L):L}e.randomPath=C}),define(Q[570],Y([1,0,397,128,122,55,18,33]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pieceToQuery=e.prepareQuery=e.compareItemsByFuzzyScore=e.scoreItemFuzzy=e.scoreFuzzy2=e.scoreFuzzy=void 0;const v=0,m=[v,[]];function S(z,B,K,H){if(!z||!B)return m;const U=z.length,G=B.length;if(U<G)return m;const $=z.toLowerCase();return h(B,K,G,z,$,U,H)}e.scoreFuzzy=S;function h(z,B,K,H,U,G,$){const ie=[],J=[];for(let te=0;te<K;te++){const Z=te*G,se=Z-G,re=te>0,oe=z[te],le=B[te];for(let ne=0;ne<G;ne++){const ce=ne>0,ae=Z+ne,ue=ae-1,de=se+ne-1,ge=ce?ie[ue]:0,he=re&&ce?ie[de]:0,be=re&&ce?J[de]:0;let ve;!he&&re?ve=0:ve=a(oe,le,H,U,ne,be),ve&&he+ve>=ge&&($||re||U.startsWith(B,ne))?(J[ae]=be+1,ie[ae]=he+ve):(J[ae]=v,ie[ae]=ge)}}const j=[];let ee=K-1,X=G-1;for(;ee>=0&&X>=0;){const te=ee*G+X;J[te]===v||(j.push(X),ee--),X--}return[ie[K*G-1],j.reverse()]}function a(z,B,K,H,U,G){let $=0;if(!r(B,H[U]))return $;if($+=1,G>0&&($+=G*5),z===K[U]&&($+=1),U===0)$+=8;else{const ie=i(K.charCodeAt(U-1));ie?$+=ie:(0,y.isUpper)(K.charCodeAt(U))&&G===0&&($+=2)}return $}function r(z,B){return z===B?!0:z==="/"||z==="\\"?B==="/"||B==="\\":!1}function i(z){switch(z){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}}const s=[void 0,[]];function o(z,B,K=0,H=0){const U=B;return U.values&&U.values.length>1?u(z,U.values,K,H):d(z,B,K,H)}e.scoreFuzzy2=o;function u(z,B,K,H){let U=0;const G=[];for(const $ of B){const[ie,J]=d(z,$,K,H);if(typeof ie!="number")return s;U+=ie,G.push(...J)}return[U,A(G)]}function d(z,B,K,H){const U=(0,y.fuzzyScore)(B.original,B.originalLowercase,K,z,z.toLowerCase(),H,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return U?[U[0],(0,y.createMatches)(U)]:s}const p=Object.freeze({score:0}),c=1<<18,l=1<<17,n=1<<16;function g(z,B,K,H){const U=H.values?H.values:[H];return(0,b.hash)({[H.normalized]:{values:U.map($=>({value:$.normalized,expectContiguousMatch:$.expectContiguousMatch})),label:z,description:B,allowNonContiguousMatches:K}})}function w(z,B,K,H,U){if(!z||!B.normalized)return p;const G=H.getItemLabel(z);if(!G)return p;const $=H.getItemDescription(z),ie=g(G,$,K,B),J=U[ie];if(J)return J;const j=E(G,$,H.getItemPath(z),B,K);return U[ie]=j,j}e.scoreItemFuzzy=w;function E(z,B,K,H,U){const G=!K||!H.containsPathSeparator;return K&&(T.isLinux?H.pathNormalized===K:(0,f.equalsIgnoreCase)(H.pathNormalized,K))?{score:c,labelMatch:[{start:0,end:z.length}],descriptionMatch:B?[{start:0,end:B.length}]:void 0}:H.values&&H.values.length>1?C(z,B,K,H.values,G,U):I(z,B,K,H,G,U)}function C(z,B,K,H,U,G){let $=0;const ie=[],J=[];for(const j of H){const{score:ee,labelMatch:X,descriptionMatch:te}=I(z,B,K,j,U,G);if(ee===v)return p;$+=ee,X&&ie.push(...X),te&&J.push(...te)}return{score:$,labelMatch:A(ie),descriptionMatch:A(J)}}function I(z,B,K,H,U,G){if(U||!B){const[$,ie]=S(z,H.normalized,H.normalizedLowercase,G&&!H.expectContiguousMatch);if($){const J=(0,y.matchesPrefix)(H.normalized,z);let j;if(J){j=l;const ee=Math.round(H.normalized.length/z.length*100);j+=ee}else j=n;return{score:j+$,labelMatch:J||_(ie)}}}if(B){let $=B;K&&($=`${B}${D.sep}`);const ie=$.length,J=`${$}${z}`,[j,ee]=S(J,H.normalized,H.normalizedLowercase,G&&!H.expectContiguousMatch);if(j){const X=_(ee),te=[],Z=[];return X.forEach(se=>{se.start<ie&&se.end>ie?(te.push({start:0,end:se.end-ie}),Z.push({start:se.start,end:ie})):se.start>=ie?te.push({start:se.start-ie,end:se.end-ie}):Z.push(se)}),{score:j,labelMatch:te,descriptionMatch:Z}}}return p}function _(z){const B=[];if(!z)return B;let K;for(const H of z)K&&K.end===H?K.end+=1:(K={start:H,end:H+1},B.push(K));return B}function A(z){const B=z.sort((U,G)=>U.start-G.start),K=[];let H;for(const U of B)!H||!k(H,U)?(H=U,K.push(U)):(H.start=Math.min(H.start,U.start),H.end=Math.max(H.end,U.end));return K}function k(z,B){return!(z.end<B.start||B.end<z.start)}function L(z,B,K,H,U,G){const $=w(z,K,H,U,G),ie=w(B,K,H,U,G),J=$.score,j=ie.score;if((J===c||j===c)&&J!==j)return J===c?-1:1;if(J>n||j>n){if(J!==j)return J>j?-1:1;if(J<l&&j<l){const oe=M($.labelMatch,ie.labelMatch);if(oe!==0)return oe}const se=U.getItemLabel(z)||"",re=U.getItemLabel(B)||"";if(se.length!==re.length)return se.length-re.length}if(J!==j)return J>j?-1:1;const ee=Array.isArray($.labelMatch)&&$.labelMatch.length>0,X=Array.isArray(ie.labelMatch)&&ie.labelMatch.length>0;if(ee&&!X)return-1;if(X&&!ee)return 1;const te=R(z,$,U),Z=R(B,ie,U);return te&&Z&&te!==Z?Z>te?-1:1:N(z,B,K,U)}e.compareItemsByFuzzyScore=L;function R(z,B,K){let H=-1,U=-1;if(B.descriptionMatch&&B.descriptionMatch.length?H=B.descriptionMatch[0].start:B.labelMatch&&B.labelMatch.length&&(H=B.labelMatch[0].start),B.labelMatch&&B.labelMatch.length){if(U=B.labelMatch[B.labelMatch.length-1].end,B.descriptionMatch&&B.descriptionMatch.length){const G=K.getItemDescription(z);G&&(U+=G.length)}}else B.descriptionMatch&&B.descriptionMatch.length&&(U=B.descriptionMatch[B.descriptionMatch.length-1].end);return U-H}function M(z,B){if(!z&&!B||(!z||!z.length)&&(!B||!B.length))return 0;if(!B||!B.length)return-1;if(!z||!z.length)return 1;const K=z[0].start,U=z[z.length-1].end-K,G=B[0].start,ie=B[B.length-1].end-G;return U===ie?0:ie<U?1:-1}function N(z,B,K,H){const U=H.getItemLabel(z)||"",G=H.getItemLabel(B)||"",$=H.getItemDescription(z),ie=H.getItemDescription(B),J=U.length+($?$.length:0),j=G.length+(ie?ie.length:0);if(J!==j)return J-j;const ee=H.getItemPath(z),X=H.getItemPath(B);return ee&&X&&ee.length!==X.length?ee.length-X.length:U!==G?(0,t.compareAnything)(U,G,K.normalized):$&&ie&&$!==ie?(0,t.compareAnything)($,ie,K.normalized):ee&&X&&ee!==X?(0,t.compareAnything)(ee,X,K.normalized):0}function P(z){return z.startsWith('"')&&z.endsWith('"')}const x=" ";function F(z){typeof z!="string"&&(z="");const B=z.toLowerCase(),{pathNormalized:K,normalized:H,normalizedLowercase:U}=V(z),G=K.indexOf(D.sep)>=0,$=P(z);let ie;const J=z.split(x);if(J.length>1)for(const j of J){const ee=P(j),{pathNormalized:X,normalized:te,normalizedLowercase:Z}=V(j);te&&(ie||(ie=[]),ie.push({original:j,originalLowercase:j.toLowerCase(),pathNormalized:X,normalized:te,normalizedLowercase:Z,expectContiguousMatch:ee}))}return{original:z,originalLowercase:B,pathNormalized:K,normalized:H,normalizedLowercase:U,values:ie,containsPathSeparator:G,expectContiguousMatch:$}}e.prepareQuery=F;function V(z){let B;T.isWindows?B=z.replace(/\//g,D.sep):B=z.replace(/\\/g,D.sep);const K=(0,f.stripWildcards)(B).replace(/\s|"/g,"");return{pathNormalized:B,normalized:K,normalizedLowercase:K.toLowerCase()}}function W(z){return Array.isArray(z)?F(z.map(B=>B.original).join(x)):F(z.original)}e.pieceToQuery=W}),define(Q[197],Y([1,0,55]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeMimeType=e.getExtensionForMimeType=e.getMediaMime=e.getMediaOrTextMime=e.Mimes=void 0,e.Mimes=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"});const y={".css":"text/css",".csv":"text/csv",".htm":"text/html",".html":"text/html",".ics":"text/calendar",".js":"text/javascript",".mjs":"text/javascript",".txt":"text/plain",".xml":"text/xml"},b={".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",".opus":"audio/opus",".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"};function D(S){const h=(0,t.extname)(S),a=y[h.toLowerCase()];return a!==void 0?a:T(S)}e.getMediaOrTextMime=D;function T(S){const h=(0,t.extname)(S);return b[h.toLowerCase()]}e.getMediaMime=T;function f(S){for(const h in b)if(b[h]===S)return h}e.getExtensionForMimeType=f;const v=/^(.+)\/(.+?)(;.+)?$/;function m(S,h){const a=v.exec(S);return a?`${a[1].toLowerCase()}/${a[2].toLowerCase()}${a[3]??""}`:h?void 0:S}e.normalizeMimeType=m}),define(Q[1102],Y([1,0,18]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeDangerousEnvVariables=e.sanitizeProcessEnvironment=e.TerminateResponseCode=e.Source=void 0;var y;(function(f){f[f.stdout=0]="stdout",f[f.stderr=1]="stderr"})(y||(e.Source=y={}));var b;(function(f){f[f.Success=0]="Success",f[f.Unknown=1]="Unknown",f[f.AccessDenied=2]="AccessDenied",f[f.ProcessNotFound=3]="ProcessNotFound"})(b||(e.TerminateResponseCode=b={}));function D(f,...v){const m=v.reduce((a,r)=>(a[r]=!0,a),{}),S=[/^ELECTRON_.+$/,/^VSCODE_(?!(PORTABLE|SHELL_LOGIN|ENV_REPLACE|ENV_APPEND|ENV_PREPEND)).+$/,/^SNAP(|_.*)$/,/^GDK_PIXBUF_.+$/];Object.keys(f).filter(a=>!m[a]).forEach(a=>{for(let r=0;r<S.length;r++)if(a.search(S[r])!==-1){delete f[a];break}})}e.sanitizeProcessEnvironment=D;function T(f){f&&(delete f.DEBUG,t.isMacintosh&&delete f.DYLD_LIBRARY_PATH,t.isLinux&&delete f.LD_PRELOAD)}e.removeDangerousEnvVariables=T}),define(Q[10],Y([1,0,55,18]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.isUriComponents=e.URI=void 0;const b=/^\w[\w\d+.-]*$/,D=/^\//,T=/^\/\//;function f(E,C){if(!E.scheme&&C)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${E.authority}", path: "${E.path}", query: "${E.query}", fragment: "${E.fragment}"}`);if(E.scheme&&!b.test(E.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(E.path){if(E.authority){if(!D.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(T.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 ("//")')}}function v(E,C){return!E&&!C?"file":E}function m(E,C){switch(E){case"https":case"http":case"file":C?C[0]!==h&&(C=h+C):C=h;break}return C}const S="",h="/",a=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class r{static isUri(C){return C instanceof r?!0:C?typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="string"&&typeof C.with=="function"&&typeof C.toString=="function":!1}constructor(C,I,_,A,k,L=!1){typeof C=="object"?(this.scheme=C.scheme||S,this.authority=C.authority||S,this.path=C.path||S,this.query=C.query||S,this.fragment=C.fragment||S):(this.scheme=v(C,L),this.authority=I||S,this.path=m(this.scheme,_||S),this.query=A||S,this.fragment=k||S,f(this,L))}get fsPath(){return c(this,!1)}with(C){if(!C)return this;let{scheme:I,authority:_,path:A,query:k,fragment:L}=C;return I===void 0?I=this.scheme:I===null&&(I=S),_===void 0?_=this.authority:_===null&&(_=S),A===void 0?A=this.path:A===null&&(A=S),k===void 0?k=this.query:k===null&&(k=S),L===void 0?L=this.fragment:L===null&&(L=S),I===this.scheme&&_===this.authority&&A===this.path&&k===this.query&&L===this.fragment?this:new o(I,_,A,k,L)}static parse(C,I=!1){const _=a.exec(C);return _?new o(_[2]||S,w(_[4]||S),w(_[5]||S),w(_[7]||S),w(_[9]||S),I):new o(S,S,S,S,S)}static file(C){let I=S;if(y.isWindows&&(C=C.replace(/\\/g,h)),C[0]===h&&C[1]===h){const _=C.indexOf(h,2);_===-1?(I=C.substring(2),C=h):(I=C.substring(2,_),C=C.substring(_)||h)}return new o("file",I,C,S,S)}static from(C,I){return new o(C.scheme,C.authority,C.path,C.query,C.fragment,I)}static joinPath(C,...I){if(!C.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let _;return y.isWindows&&C.scheme==="file"?_=r.file(t.win32.join(c(C,!0),...I)).path:_=t.posix.join(C.path,...I),C.with({path:_})}toString(C=!1){return l(this,C)}toJSON(){return this}static revive(C){if(C){if(C instanceof r)return C;{const I=new o(C);return I._formatted=C.external??null,I._fsPath=C._sep===s?C.fsPath??null:null,I}}else return}}e.URI=r;function i(E){return!E||typeof E!="object"?!1:typeof E.scheme=="string"&&(typeof E.authority=="string"||typeof E.authority>"u")&&(typeof E.path=="string"||typeof E.path>"u")&&(typeof E.query=="string"||typeof E.query>"u")&&(typeof E.fragment=="string"||typeof E.fragment>"u")}e.isUriComponents=i;const s=y.isWindows?1:void 0;class o extends r{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=c(this,!1)),this._fsPath}toString(C=!1){return C?l(this,!0):(this._formatted||(this._formatted=l(this,!1)),this._formatted)}toJSON(){const C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=s),this._formatted&&(C.external=this._formatted),this.path&&(C.path=this.path),this.scheme&&(C.scheme=this.scheme),this.authority&&(C.authority=this.authority),this.query&&(C.query=this.query),this.fragment&&(C.fragment=this.fragment),C}}const u={[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 d(E,C,I){let _,A=-1;for(let k=0;k<E.length;k++){const L=E.charCodeAt(k);if(L>=97&&L<=122||L>=65&&L<=90||L>=48&&L<=57||L===45||L===46||L===95||L===126||C&&L===47||I&&L===91||I&&L===93||I&&L===58)A!==-1&&(_+=encodeURIComponent(E.substring(A,k)),A=-1),_!==void 0&&(_+=E.charAt(k));else{_===void 0&&(_=E.substr(0,k));const R=u[L];R!==void 0?(A!==-1&&(_+=encodeURIComponent(E.substring(A,k)),A=-1),_+=R):A===-1&&(A=k)}}return A!==-1&&(_+=encodeURIComponent(E.substring(A))),_!==void 0?_:E}function p(E){let C;for(let I=0;I<E.length;I++){const _=E.charCodeAt(I);_===35||_===63?(C===void 0&&(C=E.substr(0,I)),C+=u[_]):C!==void 0&&(C+=E[I])}return C!==void 0?C:E}function c(E,C){let I;return E.authority&&E.path.length>1&&E.scheme==="file"?I=`//${E.authority}${E.path}`:E.path.charCodeAt(0)===47&&(E.path.charCodeAt(1)>=65&&E.path.charCodeAt(1)<=90||E.path.charCodeAt(1)>=97&&E.path.charCodeAt(1)<=122)&&E.path.charCodeAt(2)===58?C?I=E.path.substr(1):I=E.path[1].toLowerCase()+E.path.substr(2):I=E.path,y.isWindows&&(I=I.replace(/\//g,"\\")),I}e.uriToFsPath=c;function l(E,C){const I=C?p:d;let _="",{scheme:A,authority:k,path:L,query:R,fragment:M}=E;if(A&&(_+=A,_+=":"),(k||A==="file")&&(_+=h,_+=h),k){let N=k.indexOf("@");if(N!==-1){const P=k.substr(0,N);k=k.substr(N+1),N=P.lastIndexOf(":"),N===-1?_+=I(P,!1,!1):(_+=I(P.substr(0,N),!1,!1),_+=":",_+=I(P.substr(N+1),!1,!0)),_+="@"}k=k.toLowerCase(),N=k.lastIndexOf(":"),N===-1?_+=I(k,!1,!0):(_+=I(k.substr(0,N),!1,!0),_+=k.substr(N))}if(L){if(L.length>=3&&L.charCodeAt(0)===47&&L.charCodeAt(2)===58){const N=L.charCodeAt(1);N>=65&&N<=90&&(L=`/${String.fromCharCode(N+32)}:${L.substr(3)}`)}else if(L.length>=2&&L.charCodeAt(1)===58){const N=L.charCodeAt(0);N>=65&&N<=90&&(L=`${String.fromCharCode(N+32)}:${L.substr(2)}`)}_+=I(L,!0,!1)}return R&&(_+="?",_+=I(R,!1,!1)),M&&(_+="#",_+=C?M:d(M,!1,!1)),_}function n(E){try{return decodeURIComponent(E)}catch{return E.length>3?E.substr(0,3)+n(E.substr(3)):E}}const g=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(E){return E.match(g)?E.replace(g,C=>n(C)):E}}),define(Q[2283],Y([1,0,4513,10]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderText=e.renderSVG=e.renderLatex=e.renderImage=e.renderHTML=void 0;function b(S){let{host:h,source:a,trusted:r,sanitizer:i,resolver:s,linkHandler:o,shouldTypeset:u,latexTypesetter:d}=S,p=a;if(!a)return h.textContent="",Promise.resolve(void 0);if(r||(p=`${a}`,a=i.sanitize(a)),h.innerHTML=a,h.getElementsByTagName("script").length>0)if(r)m.evalInnerHTMLScriptTags(h);else{const l=document.createElement("div"),n=document.createElement("pre");n.textContent="This HTML output contains inline scripts. Are you sure that you want to run arbitrary Javascript within your Notebook session?";const g=document.createElement("button");g.textContent="Run",g.onclick=w=>{h.innerHTML=p,m.evalInnerHTMLScriptTags(h),h.removeChild(h.firstChild)},l.appendChild(n),l.appendChild(g),h.insertBefore(l,h.firstChild)}m.handleDefaults(h,s);let c;return s?c=m.handleUrls(h,s,o):c=Promise.resolve(void 0),c.then(()=>{u&&d&&d.typeset(h)})}e.renderHTML=b;function D(S){let{host:h,mimeType:a,source:r,width:i,height:s,needsBackground:o,unconfined:u}=S;h.textContent="";let d=document.createElement("img");return d.src=`data:${a};base64,${r}`,typeof s=="number"&&(d.height=s),typeof i=="number"&&(d.width=i),o==="light"?d.classList.add("jp-needs-light-background"):o==="dark"&&d.classList.add("jp-needs-dark-background"),u===!0&&d.classList.add("jp-mod-unconfined"),h.appendChild(d),Promise.resolve(void 0)}e.renderImage=D;function T(S){let{host:h,source:a,shouldTypeset:r,latexTypesetter:i}=S;return h.textContent=a,r&&i&&i.typeset(h),Promise.resolve(void 0)}e.renderLatex=T;function f(S){let{host:h,source:a,trusted:r,unconfined:i}=S;if(h.textContent="",!a)return Promise.resolve(void 0);if(!r)return h.textContent="Cannot display an untrusted SVG. Maybe you need to run the cell?",Promise.resolve(void 0);const s=new Image;return s.src=`data:image/svg+xml,${encodeURIComponent(a)}`,h.appendChild(s),i===!0&&h.classList.add("jp-mod-unconfined"),Promise.resolve()}e.renderSVG=f;function v(S){let{host:h,source:a}=S;const r=new t.default;r.use_classes=!0;let i=r.ansi_to_html(a);return h.innerHTML=`<pre>${i}</pre>`,Promise.resolve(void 0)}e.renderText=v;var m;(function(S){function h(d){let p=d.getElementsByTagName("script");for(let c=0;c<p.length;c++){let l=p.item(c);if(!l.parentNode)continue;let n=document.createElement("script"),g=l.attributes;for(let w=0,E=g.length;w<E;++w){let{name:C,value:I}=g[w];n.setAttribute(C,I)}n.textContent=l.textContent,l.parentNode.replaceChild(n,l)}}S.evalInnerHTMLScriptTags=h;function a(d,p){let c=d.getElementsByTagName("a");for(let n=0;n<c.length;n++){let g=c[n].href||"";u(g,p)?c[n].target="_self":c[n].target="_blank"}let l=d.getElementsByTagName("img");for(let n=0;n<l.length;n++)l[n].alt||(l[n].alt="Image")}S.handleDefaults=a;function r(d,p,c){let l=[],n=d.querySelectorAll("*[src]");for(let E=0;E<n.length;E++)l.push(s(n[E],"src",p));let g=d.getElementsByTagName("a");for(let E=0;E<g.length;E++)l.push(o(g[E],p,c));let w=d.getElementsByTagName("link");for(let E=0;E<w.length;E++)l.push(s(w[E],"href",p));return Promise.all(l).then(()=>{})}S.handleUrls=r;function i(d){let p=["h1","h2","h3","h4","h5","h6"];for(let c of p){let l=d.getElementsByTagName(c);for(let n=0;n<l.length;n++){let g=l[n];g.id=encodeURIComponent(g.innerHTML.replace(/ /g,"-"));let w=document.createElement("a");w.target="_self",w.textContent="\xB6",w.href="#"+g.id,w.classList.add("jp-InternalAnchorLink"),g.appendChild(w)}}}S.headerAnchors=i;function s(d,p,c){let l=d.getAttribute(p)||"",n=u(l,c);return!l||!n?Promise.resolve(void 0):(d.setAttribute(p,""),c.resolveUrl(l).then(g=>c.getDownloadUrl(g)).then(g=>{y.URI.parse(g).scheme!=="data:"&&(g+=(/\?/.test(g)?"&":"?")+new Date().getTime()),d.setAttribute(p,g)}).catch(g=>{d.setAttribute(p,"")}))}function o(d,p,c){let l=d.getAttribute("href")||"",n=u(l,p);if(!l||!n)return Promise.resolve(void 0);let g=d.hash;if(g){if(g===l)return d.target="_self",Promise.resolve(void 0);l=l.replace(g,"")}return p.resolveUrl(l).then(w=>(c&&c.handleLink(d,w,g),p.getDownloadUrl(w))).then(w=>{d.href=w+g}).catch(w=>{d.href=""})}function u(d,p){let c;return d&&d.length>0?c=p&&p.isLocal?p.isLocal(d):!!y.URI.parse(d).scheme:c=!0,c}})(m||(m={}))}),define(Q[1103],Y([1,0,10]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.log=e.getFirstFrame=e.parse=e.isRemoteConsoleLog=void 0;function y(m){const S=m;return S&&typeof S.type=="string"&&typeof S.severity=="string"}e.isRemoteConsoleLog=y;function b(m){const S=[];let h;try{const a=JSON.parse(m.arguments),r=a[a.length-1];r&&r.__$stack&&(a.pop(),h=r.__$stack),S.push(...a)}catch{S.push("Unable to log remote console arguments",m.arguments)}return{args:S,stack:h}}e.parse=b;function D(m){if(typeof m!="string")return D(b(m).stack);const S=m;if(S){const h=T(S),a=/at [^\/]*((?:(?:[a-zA-Z]+:)|(?:[\/])|(?:\\\\))(?:.+)):(\d+):(\d+)/.exec(h||"");if(a&&a.length===4)return{uri:t.URI.file(a[1]),line:Number(a[2]),column:Number(a[3])}}}e.getFirstFrame=D;function T(m){if(!m)return m;const S=m.indexOf(` `);return S===-1?m:m.substring(0,S)}function f(m,S){const{args:h,stack:a}=b(m),r=typeof h[0]=="string"&&h.length===1;let i=T(a);i&&(i=`(${i.trim()})`);let s=[];if(typeof h[0]=="string"?i&&r?s=[`%c[${S}] %c${h[0]} %c${i}`,v("blue"),v(""),v("grey")]:s=[`%c[${S}] %c${h[0]}`,v("blue"),v(""),...h.slice(1)]:s=[`%c[${S}]%`,v("blue"),...h],i&&!r&&s.push(i),typeof console[m.severity]!="function")throw new Error("Unknown console method");console[m.severity].apply(console,s)}e.log=f;function v(m){return`color: ${m}`}}),define(Q[186],Y([1,0,62,10]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=e.stringify=void 0;function b(v){return JSON.stringify(v,T)}e.stringify=b;function D(v){let m=JSON.parse(v);return m=f(m),m}e.parse=D;function T(v,m){return m instanceof RegExp?{$mid:2,source:m.source,flags:m.flags}:m}function f(v,m=0){if(!v||m>200)return v;if(typeof v=="object"){switch(v.$mid){case 1:return y.URI.revive(v);case 2:return new RegExp(v.source,v.flags);case 16:return new Date(v.source)}if(v instanceof t.VSBuffer||v instanceof Uint8Array)return v;if(Array.isArray(v))for(let S=0;S<v.length;++S)v[S]=f(v[S],m+1);else for(const S in v)Object.hasOwnProperty.call(v,S)&&(v[S]=f(v[S],m+1))}return v}e.revive=f}),define(Q[22],Y([1,0,15,18,10]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COI=e.FileAccess=e.nodeModulesAsarUnpackedPath=e.nodeModulesAsarPath=e.nodeModulesPath=e.builtinExtensionsPath=e.RemoteAuthorities=e.connectionTokenQueryName=e.connectionTokenCookieName=e.Schemas=void 0;var D;(function(m){m.inMemory="inmemory",m.vscode="vscode",m.internal="private",m.walkThrough="walkThrough",m.walkThroughSnippet="walkThroughSnippet",m.http="http",m.https="https",m.file="file",m.mailto="mailto",m.untitled="untitled",m.data="data",m.attachment="attachment",m.command="command",m.vscodeRemote="vscode-remote",m.vscodeRemoteResource="vscode-remote-resource",m.vscodeManagedRemoteResource="vscode-managed-remote-resource",m.vscodeUserData="vscode-userdata",m.vscodeCustomEditor="vscode-custom-editor",m.vscodeNotebookCell="vscode-notebook-cell",m.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",m.vscodeNotebookCellOutput="vscode-notebook-cell-output",m.vscodeInteractiveInput="vscode-interactive-input",m.vscodeSettings="vscode-settings",m.vscodeWorkspaceTrust="vscode-workspace-trust",m.vscodeTerminal="vscode-terminal",m.vscodeChatSesssion="vscode-chat-editor",m.webviewPanel="webview-panel",m.vscodeWebview="vscode-webview",m.extension="extension",m.vscodeFileResource="vscode-file",m.tmp="tmp",m.vsls="vsls",m.vscodeSourceControl="vscode-scm"})(D||(e.Schemas=D={})),e.connectionTokenCookieName="vscode-tkn",e.connectionTokenQueryName="tkn";class T{constructor(){this._defaultWebPort=80,this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${D.vscodeRemoteResource}`}setPreferredWebSchema(S){this._preferredWebSchema=S}setDelegate(S){this._delegate=S}setServerRootPath(S){this._remoteResourcesPath=`${S}/${D.vscodeRemoteResource}`}set(S,h,a){this._hosts[S]=h,this._ports[S]=a}setConnectionToken(S,h){this._connectionTokens[S]=h}getPreferredWebSchema(){return this._preferredWebSchema}rewrite(S){if(this._delegate)try{return this._delegate(S)}catch(o){return t.onUnexpectedError(o),S}const h=S.authority;let a=this._hosts[h];a&&a.indexOf(":")!==-1&&a.indexOf("[")===-1&&(a=`[${a}]`);const r=this._ports[h],i=this._connectionTokens[h];let s=`path=${encodeURIComponent(S.path)}`;return typeof i=="string"&&(s+=`&${e.connectionTokenQueryName}=${encodeURIComponent(i)}`),b.URI.from({scheme:y.isWeb?this._preferredWebSchema:D.vscodeRemoteResource,authority:y.isWeb&&r===this._defaultWebPort?`${a}`:`${a}:${r}`,path:this._remoteResourcesPath,query:s})}}e.RemoteAuthorities=new T,e.builtinExtensionsPath="vs/../../extensions",e.nodeModulesPath="vs/../../node_modules",e.nodeModulesAsarPath="vs/../../node_modules.asar",e.nodeModulesAsarUnpackedPath="vs/../../node_modules.asar.unpacked";class f{static{this.FALLBACK_AUTHORITY="vscode-app"}asBrowserUri(S){const h=this.toUri(S,q);return this.uriToBrowserUri(h)}uriToBrowserUri(S){return S.scheme===D.vscodeRemote?e.RemoteAuthorities.rewrite(S):S.scheme===D.file&&(y.isNative||y.isWebWorker&&y.globals.origin===`${D.vscodeFileResource}://${f.FALLBACK_AUTHORITY}`)?S.with({scheme:D.vscodeFileResource,authority:S.authority||f.FALLBACK_AUTHORITY,query:null,fragment:null}):S}asFileUri(S){const h=this.toUri(S,q);return this.uriToFileUri(h)}uriToFileUri(S){return S.scheme===D.vscodeFileResource?S.with({scheme:D.file,authority:S.authority!==f.FALLBACK_AUTHORITY?S.authority:null,query:null,fragment:null}):S}toUri(S,h){return b.URI.isUri(S)?S:b.URI.parse(h.toUrl(S))}}e.FileAccess=new f;var v;(function(m){const S=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);m.CoopAndCoep=Object.freeze(S.get("3"));const h="vscode-coi";function a(i){let s;typeof i=="string"?s=new URL(i).searchParams:i instanceof URL?s=i.searchParams:b.URI.isUri(i)&&(s=new URL(i.toString(!0)).searchParams);const o=s?.get(h);if(o)return S.get(o)}m.getHeadersFromQuery=a;function r(i,s,o){if(!globalThis.crossOriginIsolated)return;const u=s&&o?"3":o?"2":"1";i instanceof URLSearchParams?i.set(h,u):i[h]=u}m.addSearchParam=r})(v||(e.COI=v={}))}),define(Q[2284],Y([1,0,55,10,22]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRootPath=e.resolveFilePath=e.resolveCurrentDirectory=void 0;function D(v,m){let S=y.URI.parse(v),h;if(S.scheme===b.Schemas.file)h=(0,t.dirname)(S.fsPath);else if(S.scheme===b.Schemas.untitled){let a=m;a&&(h=a)}else h=(0,t.dirname)(S.path);return h}e.resolveCurrentDirectory=D;function T(v,m,S){let h=D(v,S);if(h)return(0,t.normalize)((0,t.join)(h,m))}e.resolveFilePath=T;function f(v){if(v.getWorkbenchState()===3){let S=v.getWorkspace().folders[0];if(S&&S.uri)return S.uri.fsPath}}e.getRootPath=f}),define(Q[1104],Y([1,0,22,10]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleCopyRequest=void 0;function b(D,T,f,v){if(f){let m="";for(let S=f.fromRow;S<=f.toRow;S++){for(let h=f.fromCell;h<=f.toCell;h++){let a=v(S,h);h!==f.toCell&&(a+=" "),m+=a}S!==f.toRow&&(m+=T.getEOL(y.URI.from({scheme:t.Schemas.untitled})))}D.writeText(m)}}e.handleCopyRequest=b}),define(Q[493],Y([1,0,1025,22,18,10]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.importAMDNodeModule=void 0;class T{constructor(a,r,i){this.id=a,this.dependencies=r,this.callback=i}}class f{static{this.INSTANCE=new f}constructor(){this._isWebWorker=typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",this._isRenderer=typeof document=="object",this._defineCalls=[],this._initialized=!1}_initialize(){this._initialized||(this._initialized=!0,globalThis.define=(a,r,i)=>{typeof a!="string"&&(i=r,r=a,a=null),(typeof r!="object"||!Array.isArray(r))&&(i=r,r=null),this._defineCalls.push(new T(a,r,i))},globalThis.define.amd=!0,this._isRenderer?this._amdPolicy=window.trustedTypes?.createPolicy("amdLoader",{createScriptURL(a){if(a.startsWith(window.location.origin)||a.startsWith("vscode-file://vscode-app"))return a;throw new Error(`[trusted_script_src] Invalid script url: ${a}`)}}):this._isWebWorker&&(this._amdPolicy=globalThis.trustedTypes?.createPolicy("amdLoader",{createScriptURL(a){return a}})))}async load(a){this._initialize();const r=await(this._isWebWorker?this._workerLoadScript(a):this._isRenderer?this._rendererLoadScript(a):this._nodeJSLoadScript(a));if(!r)throw new Error(`Did not receive a define call from script ${a}`);if(Array.isArray(r.dependencies)&&r.dependencies.length>0)throw new Error(`Cannot resolve dependencies for script ${a}. The dependencies are: ${r.dependencies.join(", ")}`);return typeof r.callback=="function"?r.callback([]):r.callback}_rendererLoadScript(a){return new Promise((r,i)=>{const s=document.createElement("script");s.setAttribute("async","async"),s.setAttribute("type","text/javascript");const o=()=>{s.removeEventListener("load",u),s.removeEventListener("error",d)},u=p=>{o(),r(this._defineCalls.pop())},d=p=>{o(),i(p)};s.addEventListener("load",u),s.addEventListener("error",d),this._amdPolicy&&(a=this._amdPolicy.createScriptURL(a)),s.setAttribute("src",a),document.getElementsByTagName("head")[0].appendChild(s)})}_workerLoadScript(a){return new Promise((r,i)=>{try{this._amdPolicy&&(a=this._amdPolicy.createScriptURL(a)),importScripts(a),r(this._defineCalls.pop())}catch(s){i(s)}})}async _nodeJSLoadScript(a){try{const r=globalThis._VSCODE_NODE_MODULES.fs,i=globalThis._VSCODE_NODE_MODULES.vm,s=globalThis._VSCODE_NODE_MODULES.module,o=D.URI.parse(a).fsPath,u=r.readFileSync(o).toString(),d=s.wrap(u.replace(/^#!.*/,""));return new i.Script(d).runInThisContext().apply(),this._defineCalls.pop()}catch(r){throw r}}}const v=new Map;let m={};typeof globalThis.require=="object"&&(m=globalThis.require.paths??{});async function S(h,a,r){if(t.isESM){r===void 0&&(r=!!(globalThis._VSCODE_PRODUCT_JSON??globalThis.vscode?.context?.configuration()?.product)?.commit),m[h]&&(h=m[h]);const i=`${h}/${a}`;if(v.has(i))return v.get(i);let s;if(/^\w[\w\d+.-]*:\/\//.test(i))s=i;else{const p=`${r&&!b.isWeb?y.nodeModulesAsarPath:y.nodeModulesPath}/${i}`;s=y.FileAccess.asBrowserUri(p).toString(!0)}const o=f.INSTANCE.load(s);return v.set(i,o),o}else return await new Promise((i,s)=>{q([h],i,s)})}e.importAMDNodeModule=S}),define(Q[26],Y([1,0,206,22,55,18,33,10]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toLocalResource=e.DataUri=e.distinctParents=e.addTrailingPathSeparator=e.removeTrailingPathSeparator=e.hasTrailingPathSeparator=e.isEqualAuthority=e.isAbsolutePath=e.resolvePath=e.relativePath=e.normalizePath=e.joinPath=e.dirname=e.extname=e.basename=e.basenameOrAuthority=e.getComparisonKey=e.isEqualOrParent=e.isEqual=e.extUriIgnorePathCase=e.extUriBiasedIgnorePathCase=e.extUri=e.ExtUri=e.originalFSPath=void 0;function v(r){return(0,f.uriToFsPath)(r,!0)}e.originalFSPath=v;class m{constructor(i){this._ignorePathCasing=i}compare(i,s,o=!1){return i===s?0:(0,T.compare)(this.getComparisonKey(i,o),this.getComparisonKey(s,o))}isEqual(i,s,o=!1){return i===s?!0:!i||!s?!1:this.getComparisonKey(i,o)===this.getComparisonKey(s,o)}getComparisonKey(i,s=!1){return i.with({path:this._ignorePathCasing(i)?i.path.toLowerCase():void 0,fragment:s?null:void 0}).toString()}ignorePathCasing(i){return this._ignorePathCasing(i)}isEqualOrParent(i,s,o=!1){if(i.scheme===s.scheme){if(i.scheme===y.Schemas.file)return t.isEqualOrParent(v(i),v(s),this._ignorePathCasing(i))&&i.query===s.query&&(o||i.fragment===s.fragment);if((0,e.isEqualAuthority)(i.authority,s.authority))return t.isEqualOrParent(i.path,s.path,this._ignorePathCasing(i),"/")&&i.query===s.query&&(o||i.fragment===s.fragment)}return!1}joinPath(i,...s){return f.URI.joinPath(i,...s)}basenameOrAuthority(i){return(0,e.basename)(i)||i.authority}basename(i){return b.posix.basename(i.path)}extname(i){return b.posix.extname(i.path)}dirname(i){if(i.path.length===0)return i;let s;return i.scheme===y.Schemas.file?s=f.URI.file(b.dirname(v(i))).path:(s=b.posix.dirname(i.path),i.authority&&s.length&&s.charCodeAt(0)!==47&&(console.error(`dirname("${i.toString})) resulted in a relative path`),s="/")),i.with({path:s})}normalizePath(i){if(!i.path.length)return i;let s;return i.scheme===y.Schemas.file?s=f.URI.file(b.normalize(v(i))).path:s=b.posix.normalize(i.path),i.with({path:s})}relativePath(i,s){if(i.scheme!==s.scheme||!(0,e.isEqualAuthority)(i.authority,s.authority))return;if(i.scheme===y.Schemas.file){const d=b.relative(v(i),v(s));return D.isWindows?t.toSlashes(d):d}let o=i.path||"/";const u=s.path||"/";if(this._ignorePathCasing(i)){let d=0;for(const p=Math.min(o.length,u.length);d<p&&!(o.charCodeAt(d)!==u.charCodeAt(d)&&o.charAt(d).toLowerCase()!==u.charAt(d).toLowerCase());d++);o=u.substr(0,d)+o.substr(d)}return b.posix.relative(o,u)}resolvePath(i,s){if(i.scheme===y.Schemas.file){const o=f.URI.file(b.resolve(v(i),s));return i.with({authority:o.authority,path:o.path})}return s=t.toPosixPath(s),i.with({path:b.posix.resolve(i.path,s)})}isAbsolutePath(i){return!!i.path&&i.path[0]==="/"}isEqualAuthority(i,s){return i===s||i!==void 0&&s!==void 0&&(0,T.equalsIgnoreCase)(i,s)}hasTrailingPathSeparator(i,s=b.sep){if(i.scheme===y.Schemas.file){const o=v(i);return o.length>t.getRoot(o).length&&o[o.length-1]===s}else{const o=i.path;return o.length>1&&o.charCodeAt(o.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(i.fsPath)}}removeTrailingPathSeparator(i,s=b.sep){return(0,e.hasTrailingPathSeparator)(i,s)?i.with({path:i.path.substr(0,i.path.length-1)}):i}addTrailingPathSeparator(i,s=b.sep){let o=!1;if(i.scheme===y.Schemas.file){const u=v(i);o=u!==void 0&&u.length===t.getRoot(u).length&&u[u.length-1]===s}else{s="/";const u=i.path;o=u.length===1&&u.charCodeAt(u.length-1)===47}return!o&&!(0,e.hasTrailingPathSeparator)(i,s)?i.with({path:i.path+"/"}):i}}e.ExtUri=m,e.extUri=new m(()=>!1),e.extUriBiasedIgnorePathCase=new m(r=>r.scheme===y.Schemas.file?!D.isLinux:!0),e.extUriIgnorePathCase=new m(r=>!0),e.isEqual=e.extUri.isEqual.bind(e.extUri),e.isEqualOrParent=e.extUri.isEqualOrParent.bind(e.extUri),e.getComparisonKey=e.extUri.getComparisonKey.bind(e.extUri),e.basenameOrAuthority=e.extUri.basenameOrAuthority.bind(e.extUri),e.basename=e.extUri.basename.bind(e.extUri),e.extname=e.extUri.extname.bind(e.extUri),e.dirname=e.extUri.dirname.bind(e.extUri),e.joinPath=e.extUri.joinPath.bind(e.extUri),e.normalizePath=e.extUri.normalizePath.bind(e.extUri),e.relativePath=e.extUri.relativePath.bind(e.extUri),e.resolvePath=e.extUri.resolvePath.bind(e.extUri),e.isAbsolutePath=e.extUri.isAbsolutePath.bind(e.extUri),e.isEqualAuthority=e.extUri.isEqualAuthority.bind(e.extUri),e.hasTrailingPathSeparator=e.extUri.hasTrailingPathSeparator.bind(e.extUri),e.removeTrailingPathSeparator=e.extUri.removeTrailingPathSeparator.bind(e.extUri),e.addTrailingPathSeparator=e.extUri.addTrailingPathSeparator.bind(e.extUri);function S(r,i){const s=[];for(let o=0;o<r.length;o++){const u=i(r[o]);r.some((d,p)=>p===o?!1:(0,e.isEqualOrParent)(u,i(d)))||s.push(r[o])}return s}e.distinctParents=S;var h;(function(r){r.META_DATA_LABEL="label",r.META_DATA_DESCRIPTION="description",r.META_DATA_SIZE="size",r.META_DATA_MIME="mime";function i(s){const o=new Map;s.path.substring(s.path.indexOf(";")+1,s.path.lastIndexOf(";")).split(";").forEach(p=>{const[c,l]=p.split(":");c&&l&&o.set(c,l)});const d=s.path.substring(0,s.path.indexOf(";"));return d&&o.set(r.META_DATA_MIME,d),o}r.parseMetaData=i})(h||(e.DataUri=h={}));function a(r,i,s){if(i){let o=r.path;return o&&o[0]!==b.posix.sep&&(o=b.posix.sep+o),r.with({scheme:s,authority:i,path:o})}return r.with({scheme:s})}e.toLocalResource=a}),define(Q[14],Y([1,0,31,15,6,4,26,18,651]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCancelableAsyncIterable=e.CancelableAsyncIterableObject=e.AsyncIterableObject=e.Promises=e.DeferredPromise=e.IntervalCounter=e.TaskSequentializer=e.retry=e.IdleValue=e.runWhenIdle=e.ThrottledWorker=e.RunOnceWorker=e.ProcessTimeRunOnceScheduler=e.RunOnceScheduler=e.IntervalTimer=e.TimeoutTimer=e.ResourceQueue=e.LimitedQueue=e.Queue=e.Limiter=e.firstParallel=e.first=e.sequence=e.disposableTimeout=e.timeout=e.AutoOpenBarrier=e.Barrier=e.ThrottledDelayer=e.Delayer=e.SequencerByKey=e.Sequencer=e.Throttler=e.asPromise=e.raceTimeout=e.raceCancellablePromises=e.raceCancellationError=e.raceCancellation=e.createCancelablePromise=e.isThenable=void 0;function m(X){return!!X&&typeof X.then=="function"}e.isThenable=m;function S(X){const te=new t.CancellationTokenSource,Z=X(te.token),se=new Promise((re,oe)=>{const le=te.token.onCancellationRequested(()=>{le.dispose(),te.dispose(),oe(new y.CancellationError)});Promise.resolve(Z).then(ne=>{le.dispose(),te.dispose(),re(ne)},ne=>{le.dispose(),te.dispose(),oe(ne)})});return new class{cancel(){te.cancel()}then(re,oe){return se.then(re,oe)}catch(re){return this.then(void 0,re)}finally(re){return se.finally(re)}}}e.createCancelablePromise=S;function h(X,te,Z){return new Promise((se,re)=>{const oe=te.onCancellationRequested(()=>{oe.dispose(),se(Z)});X.then(se,re).finally(()=>oe.dispose())})}e.raceCancellation=h;function a(X,te){return new Promise((Z,se)=>{const re=te.onCancellationRequested(()=>{re.dispose(),se(new y.CancellationError)});X.then(Z,se).finally(()=>re.dispose())})}e.raceCancellationError=a;async function r(X){let te=-1;const Z=X.map((se,re)=>se.then(oe=>(te=re,oe)));try{return await Promise.race(Z)}finally{X.forEach((se,re)=>{re!==te&&se.cancel()})}}e.raceCancellablePromises=r;function i(X,te,Z){let se;const re=setTimeout(()=>{se?.(void 0),Z?.()},te);return Promise.race([X.finally(()=>clearTimeout(re)),new Promise(oe=>se=oe)])}e.raceTimeout=i;function s(X){return new Promise((te,Z)=>{const se=X();m(se)?se.then(te,Z):te(se)})}e.asPromise=s;class o{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(te){if(this.isDisposed)throw new Error("Throttler is disposed");if(this.activePromise){if(this.queuedPromiseFactory=te,!this.queuedPromise){const Z=()=>{if(this.queuedPromise=null,this.isDisposed)return;const se=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,se};this.queuedPromise=new Promise(se=>{this.activePromise.then(Z,Z).then(se)})}return new Promise((Z,se)=>{this.queuedPromise.then(Z,se)})}return this.activePromise=te(),new Promise((Z,se)=>{this.activePromise.then(re=>{this.activePromise=null,Z(re)},re=>{this.activePromise=null,se(re)})})}dispose(){this.isDisposed=!0}}e.Throttler=o;class u{constructor(){this.current=Promise.resolve(null)}queue(te){return this.current=this.current.then(()=>te(),()=>te())}}e.Sequencer=u;class d{constructor(){this.promiseMap=new Map}queue(te,Z){const re=(this.promiseMap.get(te)??Promise.resolve()).catch(()=>{}).then(Z).finally(()=>{this.promiseMap.get(te)===re&&this.promiseMap.delete(te)});return this.promiseMap.set(te,re),re}}e.SequencerByKey=d;const p=(X,te)=>{let Z=!0;const se=setTimeout(()=>{Z=!1,te()},X);return{isTriggered:()=>Z,dispose:()=>{clearTimeout(se),Z=!1}}},c=X=>{let te=!0;return queueMicrotask(()=>{te&&(te=!1,X())}),{isTriggered:()=>te,dispose:()=>{te=!1}}};class l{constructor(te){this.defaultDelay=te,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(te,Z=this.defaultDelay){this.task=te,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((re,oe)=>{this.doResolve=re,this.doReject=oe}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const re=this.task;return this.task=null,re()}}));const se=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=Z===v.MicrotaskDelay?c(se):p(Z,se),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new y.CancellationError),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}e.Delayer=l;class n{constructor(te){this.delayer=new l(te),this.throttler=new o}trigger(te,Z){return this.delayer.trigger(()=>this.throttler.queue(te),Z)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}e.ThrottledDelayer=n;class g{constructor(){this._isOpen=!1,this._promise=new Promise((te,Z)=>{this._completePromise=te})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}}e.Barrier=g;class w extends g{constructor(te){super(),this._timeout=setTimeout(()=>this.open(),te)}open(){clearTimeout(this._timeout),super.open()}}e.AutoOpenBarrier=w;function E(X,te){return te?new Promise((Z,se)=>{const re=setTimeout(()=>{oe.dispose(),Z()},X),oe=te.onCancellationRequested(()=>{clearTimeout(re),oe.dispose(),se(new y.CancellationError)})}):S(Z=>E(X,Z))}e.timeout=E;function C(X,te=0){const Z=setTimeout(X,te);return(0,D.toDisposable)(()=>clearTimeout(Z))}e.disposableTimeout=C;function I(X){const te=[];let Z=0;const se=X.length;function re(){return Z<se?X[Z++]():null}function oe(le){le!=null&&te.push(le);const ne=re();return ne?ne.then(oe):Promise.resolve(te)}return Promise.resolve(null).then(oe)}e.sequence=I;function _(X,te=se=>!!se,Z=null){let se=0;const re=X.length,oe=()=>{if(se>=re)return Promise.resolve(Z);const le=X[se++];return Promise.resolve(le()).then(ce=>te(ce)?Promise.resolve(ce):oe())};return oe()}e.first=_;function A(X,te=se=>!!se,Z=null){if(X.length===0)return Promise.resolve(Z);let se=X.length;const re=()=>{se=-1;for(const oe of X)oe.cancel?.()};return new Promise((oe,le)=>{for(const ne of X)ne.then(ce=>{--se>=0&&te(ce)?(re(),oe(ce)):se===0&&oe(Z)}).catch(ce=>{--se>=0&&(re(),le(ce))})})}e.firstParallel=A;class k{constructor(te){this._size=0,this.maxDegreeOfParalellism=te,this.outstandingPromises=[],this.runningPromises=0,this._onDrained=new b.Emitter}get onDrained(){return this._onDrained.event}get size(){return this._size}queue(te){return this._size++,new Promise((Z,se)=>{this.outstandingPromises.push({factory:te,c:Z,e:se}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){const te=this.outstandingPromises.shift();this.runningPromises++;const Z=te.factory();Z.then(te.c,te.e),Z.then(()=>this.consumed(),()=>this.consumed())}}consumed(){this._size--,this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onDrained.fire()}dispose(){this._onDrained.dispose()}}e.Limiter=k;class L extends k{constructor(){super(1)}}e.Queue=L;class R{constructor(){this.sequentializer=new K,this.tasks=0}queue(te){return this.sequentializer.isRunning()?this.sequentializer.queue(()=>this.sequentializer.run(this.tasks++,te())):this.sequentializer.run(this.tasks++,te())}}e.LimitedQueue=R;class M{constructor(){this.queues=new Map,this.drainers=new Set}async whenDrained(){if(this.isDrained())return;const te=new G;return this.drainers.add(te),te.p}isDrained(){for(const[,te]of this.queues)if(te.size>0)return!1;return!0}queueFor(te,Z=T.extUri){const se=Z.getComparisonKey(te);let re=this.queues.get(se);return re||(re=new L,b.Event.once(re.onDrained)(()=>{re?.dispose(),this.queues.delete(se),this.onDidQueueDrain()}),this.queues.set(se,re)),re}onDidQueueDrain(){this.isDrained()&&this.releaseDrainers()}releaseDrainers(){for(const te of this.drainers)te.complete();this.drainers.clear()}dispose(){for(const[,te]of this.queues)te.dispose();this.queues.clear(),this.releaseDrainers()}}e.ResourceQueue=M;class N{constructor(te,Z){this._token=-1,typeof te=="function"&&typeof Z=="number"&&this.setIfNotSet(te,Z)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(te,Z){this.cancel(),this._token=setTimeout(()=>{this._token=-1,te()},Z)}setIfNotSet(te,Z){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,te()},Z))}}e.TimeoutTimer=N;class P{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(te,Z){this.cancel(),this._token=setInterval(()=>{te()},Z)}}e.IntervalTimer=P;class x{constructor(te,Z){this.timeoutToken=-1,this.runner=te,this.timeout=Z,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(te=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,te)}get delay(){return this.timeout}set delay(te){this.timeout=te}isScheduled(){return this.timeoutToken!==-1}flush(){this.isScheduled()&&(this.cancel(),this.doRun())}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}e.RunOnceScheduler=x;class F{constructor(te,Z){Z%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${Z}ms is not a multiple of 1000ms.`),this.runner=te,this.timeout=Z,this.counter=0,this.intervalToken=-1,this.intervalHandler=this.onInterval.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearInterval(this.intervalToken),this.intervalToken=-1)}schedule(te=this.timeout){te%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${te}ms is not a multiple of 1000ms.`),this.cancel(),this.counter=Math.ceil(te/1e3),this.intervalToken=setInterval(this.intervalHandler,1e3)}isScheduled(){return this.intervalToken!==-1}onInterval(){this.counter--,!(this.counter>0)&&(clearInterval(this.intervalToken),this.intervalToken=-1,this.runner?.())}}e.ProcessTimeRunOnceScheduler=F;class V extends x{constructor(te,Z){super(te,Z),this.units=[]}work(te){this.units.push(te),this.isScheduled()||this.schedule()}doRun(){const te=this.units;this.units=[],this.runner?.(te)}dispose(){this.units=[],super.dispose()}}e.RunOnceWorker=V;class W extends D.Disposable{constructor(te,Z){super(),this.options=te,this.handler=Z,this.pendingWork=[],this.throttler=this._register(new D.MutableDisposable),this.disposed=!1}get pending(){return this.pendingWork.length}work(te){if(this.disposed)return!1;if(typeof this.options.maxBufferedWork=="number"){if(this.throttler.value){if(this.pending+te.length>this.options.maxBufferedWork)return!1}else if(this.pending+te.length-this.options.maxWorkChunkSize>this.options.maxBufferedWork)return!1}for(const Z of te)this.pendingWork.push(Z);return this.throttler.value||this.doWork(),!0}doWork(){this.handler(this.pendingWork.splice(0,this.options.maxWorkChunkSize)),this.pendingWork.length>0&&(this.throttler.value=new x(()=>{this.throttler.clear(),this.doWork()},this.options.throttleDelay),this.throttler.value.schedule())}dispose(){super.dispose(),this.disposed=!0}}e.ThrottledWorker=W,function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?e.runWhenIdle=X=>{(0,f.setTimeout0)(()=>{if(te)return;const Z=Date.now()+15;X(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,Z-Date.now())}}))});let te=!1;return{dispose(){te||(te=!0)}}}:e.runWhenIdle=(X,te)=>{const Z=requestIdleCallback(X,typeof te=="number"?{timeout:te}:void 0);let se=!1;return{dispose(){se||(se=!0,cancelIdleCallback(Z))}}}}();class z{constructor(te){this._didRun=!1,this._executor=()=>{try{this._value=te()}catch(Z){this._error=Z}finally{this._didRun=!0}},this._handle=(0,e.runWhenIdle)(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}e.IdleValue=z;async function B(X,te,Z){let se;for(let re=0;re<Z;re++)try{return await X()}catch(oe){se=oe,await E(te)}throw se}e.retry=B;class K{isRunning(te){return typeof te=="number"?this._running?.taskId===te:!!this._running}get running(){return this._running?.promise}cancelRunning(){this._running?.cancel()}run(te,Z,se){return this._running={taskId:te,cancel:()=>se?.(),promise:Z},Z.then(()=>this.doneRunning(te),()=>this.doneRunning(te)),Z}doneRunning(te){this._running&&te===this._running.taskId&&(this._running=void 0,this.runQueued())}runQueued(){if(this._queued){const te=this._queued;this._queued=void 0,te.run().then(te.promiseResolve,te.promiseReject)}}queue(te){if(this._queued)this._queued.run=te;else{let Z,se;const re=new Promise((oe,le)=>{Z=oe,se=le});this._queued={run:te,promise:re,promiseResolve:Z,promiseReject:se}}return this._queued.promise}hasQueued(){return!!this._queued}async join(){return this._queued?.promise??this._running?.promise}}e.TaskSequentializer=K;class H{constructor(te,Z=()=>Date.now()){this.interval=te,this.nowFn=Z,this.lastIncrementTime=0,this.value=0}increment(){const te=this.nowFn();return te-this.lastIncrementTime>this.interval&&(this.lastIncrementTime=te,this.value=0),this.value++,this.value}}e.IntervalCounter=H;var U;(function(X){X[X.Resolved=0]="Resolved",X[X.Rejected=1]="Rejected"})(U||(U={}));class G{get isRejected(){return this.outcome?.outcome===1}get isResolved(){return this.outcome?.outcome===0}get isSettled(){return!!this.outcome}get value(){return this.outcome?.outcome===0?this.outcome?.value:void 0}constructor(){this.p=new Promise((te,Z)=>{this.completeCallback=te,this.errorCallback=Z})}complete(te){return new Promise(Z=>{this.completeCallback(te),this.outcome={outcome:0,value:te},Z()})}error(te){return new Promise(Z=>{this.errorCallback(te),this.outcome={outcome:1,value:te},Z()})}cancel(){return this.error(new y.CancellationError)}}e.DeferredPromise=G;var $;(function(X){async function te(se){let re;const oe=await Promise.all(se.map(le=>le.then(ne=>ne,ne=>{re||(re=ne)})));if(typeof re<"u")throw re;return oe}X.settled=te;function Z(se){return new Promise(async(re,oe)=>{try{await se(re,oe)}catch(le){oe(le)}})}X.withAsyncBody=Z})($||(e.Promises=$={}));var ie;(function(X){X[X.Initial=0]="Initial",X[X.DoneOK=1]="DoneOK",X[X.DoneError=2]="DoneError"})(ie||(ie={}));class J{static fromArray(te){return new J(Z=>{Z.emitMany(te)})}static fromPromise(te){return new J(async Z=>{Z.emitMany(await te)})}static fromPromises(te){return new J(async Z=>{await Promise.all(te.map(async se=>Z.emitOne(await se)))})}static merge(te){return new J(async Z=>{await Promise.all(te.map(async se=>{for await(const re of se)Z.emitOne(re)}))})}static{this.EMPTY=J.fromArray([])}constructor(te){this._state=0,this._results=[],this._error=null,this._onStateChanged=new b.Emitter,queueMicrotask(async()=>{const Z={emitOne:se=>this.emitOne(se),emitMany:se=>this.emitMany(se),reject:se=>this.reject(se)};try{await Promise.resolve(te(Z)),this.resolve()}catch(se){this.reject(se)}finally{Z.emitOne=void 0,Z.emitMany=void 0,Z.reject=void 0}})}[Symbol.asyncIterator](){let te=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(te<this._results.length)return{done:!1,value:this._results[te++]};if(this._state===1)return{done:!0,value:void 0};await b.Event.toPromise(this._onStateChanged.event)}while(!0)}}}static map(te,Z){return new J(async se=>{for await(const re of te)se.emitOne(Z(re))})}map(te){return J.map(this,te)}static filter(te,Z){return new J(async se=>{for await(const re of te)Z(re)&&se.emitOne(re)})}filter(te){return J.filter(this,te)}static coalesce(te){return J.filter(te,Z=>!!Z)}coalesce(){return J.coalesce(this)}static async toPromise(te){const Z=[];for await(const se of te)Z.push(se);return Z}toPromise(){return J.toPromise(this)}emitOne(te){this._state===0&&(this._results.push(te),this._onStateChanged.fire())}emitMany(te){this._state===0&&(this._results=this._results.concat(te),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(te){this._state===0&&(this._state=2,this._error=te,this._onStateChanged.fire())}}e.AsyncIterableObject=J;class j extends J{constructor(te,Z){super(Z),this._source=te}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=j;function ee(X){const te=new t.CancellationTokenSource,Z=X(te.token);return new j(te,async se=>{const re=te.token.onCancellationRequested(()=>{re.dispose(),te.dispose(),se.reject(new y.CancellationError)});try{for await(const oe of Z){if(te.token.isCancellationRequested)return;se.emitOne(oe)}re.dispose(),te.dispose()}catch(oe){re.dispose(),te.dispose(),se.reject(oe)}})}e.createCancelableAsyncIterable=ee}),define(Q[7],Y([1,0,97,324,67,129,14,15,6,817,4,22,18,10]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.h=e.DragAndDropObserver=e.getCookieValue=e.ModifierKeyEmitter=e.multibyteAwareBtoa=e.safeInnerHtml=e.basicMarkupHtmlTags=e.hookDomPurifyHrefAndSrcSanitizer=e.detectFullscreen=e.DetectedFullscreenMode=e.triggerUpload=e.triggerDownload=e.asCssValueWithDefault=e.asCSSPropertyValue=e.asCSSUrl=e.animate=e.windowOpenWithSuccess=e.windowOpenPopup=e.windowOpenNoOpener=e.computeScreenAwareSize=e.domContentLoaded=e.finalHandler=e.removeTabIndexAndUpdateFocus=e.hide=e.show=e.setVisibility=e.join=e.$=e.Namespace=e.reset=e.prepend=e.append=e.after=e.trackFocus=e.restoreParentsScrollTop=e.saveParentsScrollTop=e.EventHelper=e.isEventLike=e.EventType=e.isHTMLElement=e.removeCSSRulesContainingSelector=e.createCSSRule=e.createMetaElement=e.createStyleSheet=e.getActiveElement=e.getShadowRoot=e.isInShadowDOM=e.isShadowRoot=e.hasParentWithClass=e.findParentWithClass=e.isAncestorUsingFlowTo=e.setParentFlowTo=e.isAncestor=e.getLargestChildWidth=e.getTotalHeight=e.getContentHeight=e.getTotalScrollWidth=e.getContentWidth=e.getTotalWidth=e.getDomNodeZoomLevel=e.getDomNodePagePosition=e.position=e.size=e.getTopLeftOffset=e.Dimension=e.getClientArea=e.getComputedStyle=e.addDisposableThrottledListener=e.modify=e.measure=e.scheduleAtNextAnimationFrame=e.runAtThisOrScheduleAtNextAnimationFrame=e.addDisposableGenericMouseUpListener=e.addDisposableGenericMouseMoveListener=e.addDisposableGenericMouseDownListener=e.addStandardDisposableGenericMouseUpListener=e.addStandardDisposableGenericMouseDownListener=e.addStandardDisposableListener=e.addDisposableListener=e.isInDOM=e.clearNode=void 0;function i($e){for(;$e.firstChild;)$e.firstChild.remove()}e.clearNode=i;function s($e){return $e?.isConnected??!1}e.isInDOM=s;class o{constructor(Qe,Ye,Ke,ht){this._node=Qe,this._type=Ye,this._handler=Ke,this._options=ht||!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 u($e,Qe,Ye,Ke){return new o($e,Qe,Ye,Ke)}e.addDisposableListener=u;function d($e){return function(Qe){return $e(new D.StandardMouseEvent(Qe))}}function p($e){return function(Qe){return $e(new b.StandardKeyboardEvent(Qe))}}const c=function(Qe,Ye,Ke,ht){let Tt=Ke;return Ye==="click"||Ye==="mousedown"?Tt=d(Ke):(Ye==="keydown"||Ye==="keypress"||Ye==="keyup")&&(Tt=p(Ke)),u(Qe,Ye,Tt,ht)};e.addStandardDisposableListener=c;const l=function(Qe,Ye,Ke){const ht=d(Ye);return g(Qe,ht,Ke)};e.addStandardDisposableGenericMouseDownListener=l;const n=function(Qe,Ye,Ke){const ht=d(Ye);return E(Qe,ht,Ke)};e.addStandardDisposableGenericMouseUpListener=n;function g($e,Qe,Ye){return u($e,a.isIOS&&y.BrowserFeatures.pointerEvents?e.EventType.POINTER_DOWN:e.EventType.MOUSE_DOWN,Qe,Ye)}e.addDisposableGenericMouseDownListener=g;function w($e,Qe,Ye){return u($e,a.isIOS&&y.BrowserFeatures.pointerEvents?e.EventType.POINTER_MOVE:e.EventType.MOUSE_MOVE,Qe,Ye)}e.addDisposableGenericMouseMoveListener=w;function E($e,Qe,Ye){return u($e,a.isIOS&&y.BrowserFeatures.pointerEvents?e.EventType.POINTER_UP:e.EventType.MOUSE_UP,Qe,Ye)}e.addDisposableGenericMouseUpListener=E;class C{constructor(Qe,Ye=0){this._runner=Qe,this.priority=Ye,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(Qe){(0,f.onUnexpectedError)(Qe)}}static sort(Qe,Ye){return Ye.priority-Qe.priority}}(function(){let $e=[],Qe=null,Ye=!1,Ke=!1;const ht=()=>{for(Ye=!1,Qe=$e,$e=[],Ke=!0;Qe.length>0;)Qe.sort(C.sort),Qe.shift().execute();Ke=!1};e.scheduleAtNextAnimationFrame=(Tt,Ft=0)=>{const Pt=new C(Tt,Ft);return $e.push(Pt),Ye||(Ye=!0,requestAnimationFrame(ht)),Pt},e.runAtThisOrScheduleAtNextAnimationFrame=(Tt,Ft)=>{if(Ke){const Pt=new C(Tt,Ft);return Qe.push(Pt),Pt}else return(0,e.scheduleAtNextAnimationFrame)(Tt,Ft)}})();function I($e){return(0,e.scheduleAtNextAnimationFrame)($e,1e4)}e.measure=I;function _($e){return(0,e.scheduleAtNextAnimationFrame)($e,-1e4)}e.modify=_;const A=8,k=function($e,Qe){return Qe};class L extends S.Disposable{constructor(Qe,Ye,Ke,ht=k,Tt=A){super();let Ft=null,Pt=0;const $t=this._register(new T.TimeoutTimer),Wt=()=>{Pt=new Date().getTime(),Ke(Ft),Ft=null};this._register(u(Qe,Ye,it=>{Ft=ht(Ft,it);const ut=new Date().getTime()-Pt;ut>=Tt?($t.cancel(),Wt()):$t.setIfNotSet(Wt,Tt-ut)}))}}function R($e,Qe,Ye,Ke,ht){return new L($e,Qe,Ye,Ke,ht)}e.addDisposableThrottledListener=R;function M($e){return document.defaultView.getComputedStyle($e,null)}e.getComputedStyle=M;function N($e){if($e!==document.body)return new x($e.clientWidth,$e.clientHeight);if(a.isIOS&&window.visualViewport)return new x(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new x(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new x(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new x(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}e.getClientArea=N;class P{static convertToPixels(Qe,Ye){return parseFloat(Ye)||0}static getDimension(Qe,Ye,Ke){const ht=M(Qe),Tt=ht?ht.getPropertyValue(Ye):"0";return P.convertToPixels(Qe,Tt)}static getBorderLeftWidth(Qe){return P.getDimension(Qe,"border-left-width","borderLeftWidth")}static getBorderRightWidth(Qe){return P.getDimension(Qe,"border-right-width","borderRightWidth")}static getBorderTopWidth(Qe){return P.getDimension(Qe,"border-top-width","borderTopWidth")}static getBorderBottomWidth(Qe){return P.getDimension(Qe,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(Qe){return P.getDimension(Qe,"padding-left","paddingLeft")}static getPaddingRight(Qe){return P.getDimension(Qe,"padding-right","paddingRight")}static getPaddingTop(Qe){return P.getDimension(Qe,"padding-top","paddingTop")}static getPaddingBottom(Qe){return P.getDimension(Qe,"padding-bottom","paddingBottom")}static getMarginLeft(Qe){return P.getDimension(Qe,"margin-left","marginLeft")}static getMarginTop(Qe){return P.getDimension(Qe,"margin-top","marginTop")}static getMarginRight(Qe){return P.getDimension(Qe,"margin-right","marginRight")}static getMarginBottom(Qe){return P.getDimension(Qe,"margin-bottom","marginBottom")}}class x{static{this.None=new x(0,0)}constructor(Qe,Ye){this.width=Qe,this.height=Ye}with(Qe=this.width,Ye=this.height){return Qe!==this.width||Ye!==this.height?new x(Qe,Ye):this}static is(Qe){return typeof Qe=="object"&&typeof Qe.height=="number"&&typeof Qe.width=="number"}static lift(Qe){return Qe instanceof x?Qe:new x(Qe.width,Qe.height)}static equals(Qe,Ye){return Qe===Ye?!0:!Qe||!Ye?!1:Qe.width===Ye.width&&Qe.height===Ye.height}}e.Dimension=x;function F($e){let Qe=$e.offsetParent,Ye=$e.offsetTop,Ke=$e.offsetLeft;for(;($e=$e.parentNode)!==null&&$e!==document.body&&$e!==document.documentElement;){Ye-=$e.scrollTop;const ht=oe($e)?null:M($e);ht&&(Ke-=ht.direction!=="rtl"?$e.scrollLeft:-$e.scrollLeft),$e===Qe&&(Ke+=P.getBorderLeftWidth($e),Ye+=P.getBorderTopWidth($e),Ye+=$e.offsetTop,Ke+=$e.offsetLeft,Qe=$e.offsetParent)}return{left:Ke,top:Ye}}e.getTopLeftOffset=F;function V($e,Qe,Ye){typeof Qe=="number"&&($e.style.width=`${Qe}px`),typeof Ye=="number"&&($e.style.height=`${Ye}px`)}e.size=V;function W($e,Qe,Ye,Ke,ht,Tt="absolute"){typeof Qe=="number"&&($e.style.top=`${Qe}px`),typeof Ye=="number"&&($e.style.right=`${Ye}px`),typeof Ke=="number"&&($e.style.bottom=`${Ke}px`),typeof ht=="number"&&($e.style.left=`${ht}px`),$e.style.position=Tt}e.position=W;function z($e){const Qe=$e.getBoundingClientRect();return{left:Qe.left+window.scrollX,top:Qe.top+window.scrollY,width:Qe.width,height:Qe.height}}e.getDomNodePagePosition=z;function B($e){let Qe=$e,Ye=1;do{const Ke=M(Qe).zoom;Ke!=null&&Ke!=="1"&&(Ye*=Ke),Qe=Qe.parentElement}while(Qe!==null&&Qe!==document.documentElement);return Ye}e.getDomNodeZoomLevel=B;function K($e){const Qe=P.getMarginLeft($e)+P.getMarginRight($e);return $e.offsetWidth+Qe}e.getTotalWidth=K;function H($e){const Qe=P.getBorderLeftWidth($e)+P.getBorderRightWidth($e),Ye=P.getPaddingLeft($e)+P.getPaddingRight($e);return $e.offsetWidth-Qe-Ye}e.getContentWidth=H;function U($e){const Qe=P.getMarginLeft($e)+P.getMarginRight($e);return $e.scrollWidth+Qe}e.getTotalScrollWidth=U;function G($e){const Qe=P.getBorderTopWidth($e)+P.getBorderBottomWidth($e),Ye=P.getPaddingTop($e)+P.getPaddingBottom($e);return $e.offsetHeight-Qe-Ye}e.getContentHeight=G;function $($e){const Qe=P.getMarginTop($e)+P.getMarginBottom($e);return $e.offsetHeight+Qe}e.getTotalHeight=$;function ie($e,Qe){if($e===null)return 0;const Ye=F($e),Ke=F(Qe);return Ye.left-Ke.left}function J($e,Qe){const Ye=Qe.map(ht=>Math.max(U(ht),K(ht))+ie(ht,$e)||0);return Math.max(...Ye)}e.getLargestChildWidth=J;function j($e,Qe){for(;$e;){if($e===Qe)return!0;$e=$e.parentNode}return!1}e.isAncestor=j;const ee="parentFlowToElementId";function X($e,Qe){$e.dataset[ee]=Qe.id}e.setParentFlowTo=X;function te($e){const Qe=$e.dataset[ee];return typeof Qe=="string"?document.getElementById(Qe):null}function Z($e,Qe){let Ye=$e;for(;Ye;){if(Ye===Qe)return!0;if(Ye instanceof HTMLElement){const Ke=te(Ye);if(Ke){Ye=Ke;continue}}Ye=Ye.parentNode}return!1}e.isAncestorUsingFlowTo=Z;function se($e,Qe,Ye){for(;$e&&$e.nodeType===$e.ELEMENT_NODE;){if($e.classList.contains(Qe))return $e;if(Ye){if(typeof Ye=="string"){if($e.classList.contains(Ye))return null}else if($e===Ye)return null}$e=$e.parentNode}return null}e.findParentWithClass=se;function re($e,Qe,Ye){return!!se($e,Qe,Ye)}e.hasParentWithClass=re;function oe($e){return $e&&!!$e.host&&!!$e.mode}e.isShadowRoot=oe;function le($e){return!!ne($e)}e.isInShadowDOM=le;function ne($e){for(;$e.parentNode;){if($e===document.body)return null;$e=$e.parentNode}return oe($e)?$e:null}e.getShadowRoot=ne;function ce(){let $e=document.activeElement;for(;$e?.shadowRoot;)$e=$e.shadowRoot.activeElement;return $e}e.getActiveElement=ce;function ae($e=document.getElementsByTagName("head")[0],Qe){const Ye=document.createElement("style");return Ye.type="text/css",Ye.media="screen",Qe?.(Ye),$e.appendChild(Ye),Ye}e.createStyleSheet=ae;function ue($e=document.getElementsByTagName("head")[0]){const Qe=document.createElement("meta");return $e.appendChild(Qe),Qe}e.createMetaElement=ue;let de=null;function ge(){return de||(de=ae()),de}function he($e){return $e?.sheet?.rules?$e.sheet.rules:$e?.sheet?.cssRules?$e.sheet.cssRules:[]}function be($e,Qe,Ye=ge()){!Ye||!Qe||Ye.sheet.insertRule($e+"{"+Qe+"}",0)}e.createCSSRule=be;function ve($e,Qe=ge()){if(!Qe)return;const Ye=he(Qe),Ke=[];for(let ht=0;ht<Ye.length;ht++)Ye[ht].selectorText.indexOf($e)!==-1&&Ke.push(ht);for(let ht=Ke.length-1;ht>=0;ht--)Qe.sheet.deleteRule(Ke[ht])}e.removeCSSRulesContainingSelector=ve;function Ie($e){return typeof HTMLElement=="object"?$e instanceof HTMLElement:$e&&typeof $e=="object"&&$e.nodeType===1&&typeof $e.nodeName=="string"}e.isHTMLElement=Ie,e.EventType={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:t.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:t.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:t.isWebKit?"webkitAnimationIteration":"animationiteration"};function Se($e){const Qe=$e;return!!(Qe&&typeof Qe.preventDefault=="function"&&typeof Qe.stopPropagation=="function")}e.isEventLike=Se,e.EventHelper={stop:($e,Qe)=>($e.preventDefault(),Qe&&$e.stopPropagation(),$e)};function we($e){const Qe=[];for(let Ye=0;$e&&$e.nodeType===$e.ELEMENT_NODE;Ye++)Qe[Ye]=$e.scrollTop,$e=$e.parentNode;return Qe}e.saveParentsScrollTop=we;function ye($e,Qe){for(let Ye=0;$e&&$e.nodeType===$e.ELEMENT_NODE;Ye++)$e.scrollTop!==Qe[Ye]&&($e.scrollTop=Qe[Ye]),$e=$e.parentNode}e.restoreParentsScrollTop=ye;class Re extends S.Disposable{static hasFocusWithin(Qe){const Ye=ne(Qe),Ke=Ye?Ye.activeElement:document.activeElement;return j(Ke,Qe)}constructor(Qe){super(),this._onDidFocus=this._register(new v.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new v.Emitter),this.onDidBlur=this._onDidBlur.event;let Ye=Re.hasFocusWithin(Qe),Ke=!1;const ht=()=>{Ke=!1,Ye||(Ye=!0,this._onDidFocus.fire())},Tt=()=>{Ye&&(Ke=!0,window.setTimeout(()=>{Ke&&(Ke=!1,Ye=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{Re.hasFocusWithin(Qe)!==Ye&&(Ye?Tt():ht())},this._register(u(Qe,e.EventType.FOCUS,ht,!0)),this._register(u(Qe,e.EventType.BLUR,Tt,!0)),this._register(u(Qe,e.EventType.FOCUS_IN,()=>this._refreshStateHandler())),this._register(u(Qe,e.EventType.FOCUS_OUT,()=>this._refreshStateHandler()))}refreshState(){this._refreshStateHandler()}}function Le($e){return new Re($e)}e.trackFocus=Le;function Pe($e,Qe){return $e.after(Qe),Qe}e.after=Pe;function Ae($e,...Qe){if($e.append(...Qe),Qe.length===1&&typeof Qe[0]!="string")return Qe[0]}e.append=Ae;function Me($e,Qe){return $e.insertBefore(Qe,$e.firstChild),Qe}e.prepend=Me;function Oe($e,...Qe){$e.innerText="",Ae($e,...Qe)}e.reset=Oe;const De=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Ce;(function($e){$e.HTML="http://www.w3.org/1999/xhtml",$e.SVG="http://www.w3.org/2000/svg"})(Ce||(e.Namespace=Ce={}));function _e($e,Qe,Ye,...Ke){const ht=De.exec(Qe);if(!ht)throw new Error("Bad use of emmet");const Tt=ht[1]||"div";let Ft;return $e!==Ce.HTML?Ft=document.createElementNS($e,Tt):Ft=document.createElement(Tt),ht[3]&&(Ft.id=ht[3]),ht[4]&&(Ft.className=ht[4].replace(/\./g," ").trim()),Ye&&Object.entries(Ye).forEach(([Pt,$t])=>{typeof $t>"u"||(/^on\w+$/.test(Pt)?Ft[Pt]=$t:Pt==="selected"?$t&&Ft.setAttribute(Pt,"true"):Ft.setAttribute(Pt,$t))}),Ft.append(...Ke),Ft}function me($e,Qe,...Ye){return _e(Ce.HTML,$e,Qe,...Ye)}e.$=me,me.SVG=function($e,Qe,...Ye){return _e(Ce.SVG,$e,Qe,...Ye)};function ke($e,Qe){const Ye=[];return $e.forEach((Ke,ht)=>{ht>0&&(Qe instanceof Node?Ye.push(Qe.cloneNode()):Ye.push(document.createTextNode(Qe))),Ye.push(Ke)}),Ye}e.join=ke;function Ee($e,...Qe){$e?pe(...Qe):Te(...Qe)}e.setVisibility=Ee;function pe(...$e){for(const Qe of $e)Qe.style.display="",Qe.removeAttribute("aria-hidden")}e.show=pe;function Te(...$e){for(const Qe of $e)Qe.style.display="none",Qe.setAttribute("aria-hidden","true")}e.hide=Te;function Ne($e,Qe){for(;$e&&$e.nodeType===$e.ELEMENT_NODE;){if($e instanceof HTMLElement&&$e.hasAttribute(Qe))return $e;$e=$e.parentNode}return null}function xe($e){!$e||!$e.hasAttribute("tabIndex")||(document.activeElement===$e&&Ne($e.parentElement,"tabIndex")?.focus(),$e.removeAttribute("tabindex"))}e.removeTabIndexAndUpdateFocus=xe;function Ve($e){return Qe=>{Qe.preventDefault(),Qe.stopPropagation(),$e(Qe)}}e.finalHandler=Ve;function Fe(){return new Promise($e=>{document.readyState==="complete"||document&&document.body!==null?$e(void 0):window.addEventListener("DOMContentLoaded",$e,!1)})}e.domContentLoaded=Fe;function Be($e){const Qe=window.devicePixelRatio*$e;return Math.max(1,Math.floor(Qe))/window.devicePixelRatio}e.computeScreenAwareSize=Be;function He($e){window.open($e,"_blank","noopener")}e.windowOpenNoOpener=He;const et=780,Je=640;function st($e){const Qe=Math.floor(window.screenLeft+window.innerWidth/2-et/2),Ye=Math.floor(window.screenTop+window.innerHeight/2-Je/2);window.open($e,"_blank",`width=${et},height=${Je},top=${Ye},left=${Qe}`)}e.windowOpenPopup=st;function ze($e,Qe=!0){const Ye=window.open();return Ye?(Qe&&(Ye.opener=null),Ye.location.href=$e,!0):!1}e.windowOpenWithSuccess=ze;function je($e){const Qe=()=>{$e(),Ye=(0,e.scheduleAtNextAnimationFrame)(Qe)};let Ye=(0,e.scheduleAtNextAnimationFrame)(Qe);return(0,S.toDisposable)(()=>Ye.dispose())}e.animate=je,h.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function Ge($e){return $e?`url('${h.FileAccess.uriToBrowserUri($e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}e.asCSSUrl=Ge;function Ze($e){return`'${$e.replace(/'/g,"%27")}'`}e.asCSSPropertyValue=Ze;function tt($e,Qe){if($e!==void 0){const Ye=$e.match(/^\s*var\((.+)\)$/);if(Ye){const Ke=Ye[1].split(",",2);return Ke.length===2&&(Qe=tt(Ke[1].trim(),Qe)),`var(${Ke[0]}, ${Qe})`}return $e}return Qe}e.asCssValueWithDefault=tt;function Xe($e,Qe){let Ye;if(r.URI.isUri($e))Ye=$e.toString(!0);else{const ht=new Blob([$e]);Ye=URL.createObjectURL(ht),setTimeout(()=>URL.revokeObjectURL(Ye))}const Ke=document.createElement("a");document.body.appendChild(Ke),Ke.download=Qe,Ke.href=Ye,Ke.click(),setTimeout(()=>document.body.removeChild(Ke))}e.triggerDownload=Xe;function nt(){return new Promise($e=>{const Qe=document.createElement("input");document.body.appendChild(Qe),Qe.type="file",Qe.multiple=!0,v.Event.once(v.Event.fromDOMEventEmitter(Qe,"input"))(()=>{$e(Qe.files??void 0)}),Qe.click(),setTimeout(()=>document.body.removeChild(Qe))})}e.triggerUpload=nt;var ft;(function($e){$e[$e.DOCUMENT=1]="DOCUMENT",$e[$e.BROWSER=2]="BROWSER"})(ft||(e.DetectedFullscreenMode=ft={}));function Et(){return document.fullscreenElement||document.webkitFullscreenElement||document.webkitIsFullScreen?{mode:ft.DOCUMENT,guess:!1}:window.innerHeight===screen.height?{mode:ft.BROWSER,guess:!1}:(a.isMacintosh||a.isLinux)&&window.outerHeight===screen.height&&window.outerWidth===screen.width?{mode:ft.BROWSER,guess:!0}:null}e.detectFullscreen=Et;function It($e,Qe=!1){const Ye=document.createElement("a");return m.addHook("afterSanitizeAttributes",Ke=>{for(const ht of["href","src"])if(Ke.hasAttribute(ht)){const Tt=Ke.getAttribute(ht);if(ht==="href"&&Tt.startsWith("#"))continue;if(Ye.href=Tt,!$e.includes(Ye.protocol.replace(/:$/,""))){if(Qe&&ht==="src"&&Ye.href.startsWith("data:"))continue;Ke.removeAttribute(ht)}}}),(0,S.toDisposable)(()=>{m.removeHook("afterSanitizeAttributes")})}e.hookDomPurifyHrefAndSrcSanitizer=It;const Nt=[h.Schemas.http,h.Schemas.https,h.Schemas.command,h.Schemas.vscodeFileResource];e.basicMarkupHtmlTags=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);function Ot($e,Qe,Ye=!1){const Ke=It(Nt);try{const ht=Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","i","img","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0,ALLOW_UNKNOWN_PROTOCOLS:Ye}),Tt=m.sanitize(Qe,ht);$e.innerHTML=Tt}finally{Ke.dispose()}}e.safeInnerHtml=Ot;function kt($e){const Qe=new Uint16Array($e.length);for(let ht=0;ht<Qe.length;ht++)Qe[ht]=$e.charCodeAt(ht);let Ye="";const Ke=new Uint8Array(Qe.buffer);for(let ht=0;ht<Ke.length;ht++)Ye+=String.fromCharCode(Ke[ht]);return Ye}function xt($e){return btoa(kt($e))}e.multibyteAwareBtoa=xt;class Mt extends v.Emitter{constructor(){super(),this._subscriptions=new S.DisposableStore,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(u(window,"keydown",Qe=>{if(Qe.defaultPrevented)return;const Ye=new b.StandardKeyboardEvent(Qe);if(!(Ye.keyCode===6&&Qe.repeat)){if(Qe.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(Qe.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(Qe.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(Qe.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(Ye.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=Qe.altKey,this._keyStatus.ctrlKey=Qe.ctrlKey,this._keyStatus.metaKey=Qe.metaKey,this._keyStatus.shiftKey=Qe.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=Qe,this.fire(this._keyStatus))}},!0)),this._subscriptions.add(u(window,"keyup",Qe=>{Qe.defaultPrevented||(!Qe.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!Qe.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!Qe.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!Qe.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=Qe.altKey,this._keyStatus.ctrlKey=Qe.ctrlKey,this._keyStatus.metaKey=Qe.metaKey,this._keyStatus.shiftKey=Qe.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=Qe,this.fire(this._keyStatus)))},!0)),this._subscriptions.add(u(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(u(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(u(document.body,"mousemove",Qe=>{Qe.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(u(window,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}get isModifierPressed(){return this._keyStatus.altKey||this._keyStatus.ctrlKey||this._keyStatus.metaKey||this._keyStatus.shiftKey}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Mt.instance||(Mt.instance=new Mt),Mt.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}e.ModifierKeyEmitter=Mt;function Ht($e){const Qe=document.cookie.match("(^|[^;]+)\\s*"+$e+"\\s*=\\s*([^;]+)");return Qe?Qe.pop():void 0}e.getCookieValue=Ht;class Yt extends S.Disposable{constructor(Qe,Ye){super(),this.element=Qe,this.callbacks=Ye,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this._register(u(this.element,e.EventType.DRAG_ENTER,Qe=>{this.counter++,this.dragStartTime=Qe.timeStamp,this.callbacks.onDragEnter(Qe)})),this._register(u(this.element,e.EventType.DRAG_OVER,Qe=>{Qe.preventDefault(),this.callbacks.onDragOver?.(Qe,Qe.timeStamp-this.dragStartTime)})),this._register(u(this.element,e.EventType.DRAG_LEAVE,Qe=>{this.counter--,this.counter===0&&(this.dragStartTime=0,this.callbacks.onDragLeave(Qe))})),this._register(u(this.element,e.EventType.DRAG_END,Qe=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd(Qe)})),this._register(u(this.element,e.EventType.DROP,Qe=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop(Qe)}))}}e.DragAndDropObserver=Yt;const jt=/(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;function ii($e,...Qe){let Ye,Ke;Array.isArray(Qe[0])?(Ye={},Ke=Qe[0]):(Ye=Qe[0]||{},Ke=Qe[1]);const ht=jt.exec($e);if(!ht||!ht.groups)throw new Error("Bad use of h");const Tt=ht.groups.tag||"div",Ft=document.createElement(Tt);ht.groups.id&&(Ft.id=ht.groups.id);const Pt=[];if(ht.groups.class)for(const Wt of ht.groups.class.split("."))Wt!==""&&Pt.push(Wt);if(Ye.className!==void 0)for(const Wt of Ye.className.split("."))Wt!==""&&Pt.push(Wt);Pt.length>0&&(Ft.className=Pt.join(" "));const $t={};if(ht.groups.name&&($t[ht.groups.name]=Ft),Ke)for(const Wt of Ke)Wt instanceof HTMLElement?Ft.appendChild(Wt):typeof Wt=="string"?Ft.append(Wt):"root"in Wt&&(Object.assign($t,Wt),Ft.appendChild(Wt.root));for(const[Wt,it]of Object.entries(Ye))if(Wt!=="className")if(Wt==="style")for(const[ut,qe]of Object.entries(it))Ft.style.setProperty(ri(ut),typeof qe=="number"?qe+"px":""+qe);else Wt==="tabIndex"?Ft.tabIndex=it:Ft.setAttribute(ri(Wt),it.toString());return $t.root=Ft,$t}e.h=ii;function ri($e){return $e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}}),define(Q[156],Y([1,0,7,17,67]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertJQueryKeyDownEvent=e.trapKeyboardNavigation=e.getFocusableElements=e.convertSizeToNumber=e.convertSize=e.validateCalcExpression=e.isHidden=void 0;function D(r){return r.style.display==="none"}e.isHidden=D;function T(r){return/calc\(( )?([\d\.]+(%|vh|vw|vmin|vmax|em|rem|px|cm|ex|in|mm|pc|pt|ch|q|deg|rad|grad|turn|s|ms|hz|khz))( )+[+\-\*\/]( )+(\-)?([\d\.]+(%|vh|vw|vmin|vmax|em|rem|px|cm|ex|in|mm|pc|pt|ch|q|deg|rad|grad|turn|s|ms|hz|khz))( )?\)/i.test(r)}e.validateCalcExpression=T;function f(r,i){if(y.isString(r)&&T(r))return r;if(i=i||"",y.isUndefinedOrNull(r))return i;let s=r?r.toString():i;return s=s.toLowerCase(),!s.endsWith("px")&&!s.endsWith("%")&&(s=s+"px"),s}e.convertSize=f;function v(r){if(r&&typeof r=="string"){if(r.toLowerCase().endsWith("px"))return+r.replace("px","");if(r.toLowerCase().endsWith("em"))return+r.replace("em","")*11}else if(!r)return 0;return+r}e.convertSizeToNumber=v;const m='a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]';function S(r){const i=[];return r.querySelectorAll(m).forEach(s=>{const o=window.getComputedStyle(s);s.offsetWidth>0&&s.offsetHeight>0&&o.visibility==="visible"&&i.push(s)}),i}e.getFocusableElements=S;function h(r){return(0,t.addDisposableListener)(r,t.EventType.KEY_DOWN,i=>{const s=S(r);if(s.length===0)return;const o=s[0],u=s[s.length-1],d=new b.StandardKeyboardEvent(i);let p;d.equals(1026)&&o===document.activeElement?p=u:d.equals(2)&&u===document.activeElement&&(p=o),p&&(i.preventDefault(),p.focus())})}e.trapKeyboardNavigation=h;function a(r){return new b.StandardKeyboardEvent(r.originalEvent)}e.convertJQueryKeyDownEvent=a}),define(Q[2285],Y([1,0,7,1042]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownDataSource=e.DropdownListRenderer=e.SELECT_OPTION_ENTRY_TEMPLATE_ID=void 0;const y=t.$;e.SELECT_OPTION_ENTRY_TEMPLATE_ID="editableDropDownOption.entry.template";class b{get templateId(){return e.SELECT_OPTION_ENTRY_TEMPLATE_ID}renderTemplate(f){const v=Object.create(null);return v.root=f,v.text=t.append(f,y("span.editable-drop-option-text")),v}renderElement(f,v,m){const S=m,h=f.text;S.text.textContent=h,S.text.title=h}disposeTemplate(f){}}e.DropdownListRenderer=b;class D{constructor(){this.values=[],this.filter=void 0}get filteredValues(){return this.filter?this.values.filter(f=>f.toLocaleLowerCase().indexOf(this.filter.toLocaleLowerCase())!==-1):this.values}}e.DropdownDataSource=D}),define(Q[818],Y([1,0,156]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AdditionalKeyBindings=void 0;class y{constructor(){this.handler=new Slick.EventHandler}init(D){this.grid=D,this.handler.subscribe(this.grid.onKeyDown,(T,f)=>this.handleKeyDown((0,t.convertJQueryKeyDownEvent)(T),f))}destroy(){this.handler.unsubscribeAll()}handleKeyDown(D,T){let f=!0;if(D.equals(2065))this.grid.setActiveCell(T.row,this.grid.getColumns().length-1);else if(D.equals(2063))this.grid.canCellBeActive(T.row,0)?this.grid.setActiveCell(T.row,0):this.grid.setActiveCell(T.row,1);else if(D.equals(2064))this.grid.setActiveCell(0,T.cell);else if(D.equals(2066))this.grid.setActiveCell(this.grid.getDataLength()-1,T.cell);else if(D.equals(2062))this.grid.canCellBeActive(0,0)?this.grid.setActiveCell(0,0):this.grid.setActiveCell(0,1);else if(D.equals(2061))this.grid.setActiveCell(this.grid.getDataLength()-1,this.grid.getColumns().length-1);else if(D.equals(2079)){let v=this.grid.getSelectionModel();v&&v.setSelectedRanges([new Slick.Range(0,0,this.grid.getDataLength()-1,this.grid.getColumns().length-1)])}else f=!1;f&&(D.preventDefault(),D.stopPropagation(),D.browserEvent.stopImmediatePropagation())}}e.AdditionalKeyBindings=y}),define(Q[819],Y([1,0,389,7,42]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoColumnSize=void 0;const D={maxWidth:212,autoSizeOnRender:!1,extraColumnHeaderWidth:0};class T{constructor(v=D){this.onPostEventHandler=new Slick.EventHandler,this._options=(0,t.mixin)(v,D,!1)}init(v){this._grid=v,this._options.autoSizeOnRender&&this.onPostEventHandler.subscribe(this._grid.onRendered,()=>this.onPostRender()),this._$container=jQuery(this._grid.getContainerNode()),this._$container.on("dblclick.autosize",".slick-resizable-handle",m=>this.handleDoubleClick(m)),this._context=document.createElement("canvas").getContext("2d")}destroy(){this._$container.off()}onPostRender(){if(!(0,y.isInDOM)(this._grid.getContainerNode()))return;let m=this._grid.getData().getItem(0);if(m&&Object.keys(m).length>0){let h=!1;for(let a in m)if(m.hasOwnProperty(a)&&m[a]){h=!0;break}if(!h)return}else return;let S=jQuery(this._grid.getContainerNode()).find(".slick-header-columns");if(S&&S.length){let h=S[0],a=this._grid.getColumns(),r=(0,b.deepClone)(a);r.forEach((c,l)=>{c.formatter=a[l].formatter,c.asyncPostRender=a[l].asyncPostRender});let i=!1,s=[],o=[],u=[];for(let c=0;c<=h.children.length;c++){let l=jQuery(h.children.item(c)),n=l.data("column");n&&(s.push(l[0]),o.push(n),u.push(this._grid.getColumnIndex(n.id)))}let d=this.getElementWidths(s);d=d.map(c=>c+this._options.extraColumnHeaderWidth);let p=this.getMaxColumnTextWidths(o,u);for(let c=0;c<o.length;c++){let l=u[c],n=r[l],g=Math.max(d[c],p[c])+1;g!==n.width&&(r[l].width=g,i=!0)}i&&(this.onPostEventHandler.unsubscribeAll(),this._grid.setColumns(r),this._grid.onColumnsResized.notify())}}handleDoubleClick(v){let m=jQuery(v.currentTarget).closest(".slick-header-column"),S=m.data("column");!S||!S.resizable||(v.preventDefault(),v.stopPropagation(),this.reSizeColumn(m,S))}reSizeColumn(v,m){let S=this.getElementWidths([v[0]])[0],h=this._grid.getColumnIndex(m.id),a=this._grid.getColumns(),r=(0,b.deepClone)(a);r.forEach((o,u)=>{o.formatter=a[u].formatter,o.asyncPostRender=a[u].asyncPostRender});let i=r[h],s=Math.max(S,this.getMaxColumnTextWidth(m,h))+1;s>i.width&&(r[h].width=s,this._grid.setColumns(r),this._grid.onColumnsResized.notify())}getMaxColumnTextWidths(v,m){let S=this._grid.getData(),h=this._grid.getViewport(),a=Math.max(0,h.top),r=Math.min(S.getLength(),h.bottom),i=[],s=[];v.forEach(d=>{let p=[];for(let l=a;l<r;l++)p.push(S.getItem(l)[d.field]);i.push(p);let c=this.createRow();s.push(c)});let o=this.getMaxTextTemplates(i,v,m,S,s),u=this.getTemplateWidths(s,o);return s.forEach(d=>{this.deleteRow(d)}),u.map(d=>Math.min(this._options.maxWidth,d))}getMaxColumnTextWidth(v,m){let S=[],h=this.createRow(),a=this._grid.getData(),r=this._grid.getViewport(),i=Math.max(0,r.top),s=Math.min(a.getLength(),r.bottom);for(let d=i;d<s;d++)S.push(a.getItem(d)[v.field]);let o=this.getMaxTextTemplate(S,v,m,a,h),u=this.getTemplateWidths([h],[o])[0];return this.deleteRow(h),u>this._options.maxWidth?this._options.maxWidth:u}getTemplateWidths(v,m){return m.map((h,a)=>{let r=v[a],i=jQuery(r.find(".slick-cell"));return i.append(h),jQuery(i).find("*").css("position","relative"),i}).map(h=>h.outerWidth()+1)}getMaxTextTemplates(v,m,S,h,a){return m.map((r,i)=>this.getMaxTextTemplate(v[i],r,S[i],h,a[i]))}getMaxTextTemplate(v,m,S,h,a){let r=0,i,s=m.formatter;return v.forEach((o,u)=>{let d;s&&(d=jQuery("<span>"+s(u,S,o,m,h.getItem(u))+"</span>"),o=d.text()||o);let p=o?this.getElementWidthUsingCanvas(a,o):0;p>r&&(r=p,i=d||o)}),i}createRow(){let v=jQuery('<div class="slick-row"><div class="slick-cell"></div></div>');v.find(".slick-cell").css({visibility:"hidden","text-overflow":"initial","white-space":"nowrap"});let m=this._$container.find(".grid-canvas");return jQuery(m).append(v),v}deleteRow(v){jQuery(v).remove()}getElementWidths(v){let m=[],S=[];return v.forEach(h=>{let a=h.cloneNode(!0);a.style.cssText="position: absolute; visibility: hidden;right: auto;text-overflow: initial;white-space: nowrap;",h.parentNode.insertBefore(a,h),m.push(a)}),m.forEach(h=>{S.push(h.offsetWidth)}),m.forEach(h=>{h.parentNode.removeChild(h)}),S}getElementWidthUsingCanvas(v,m){return this._context.font=v.css("font-size")+" "+v.css("font-family"),this._context.measureText(m).width}}e.AutoColumnSize=T}),define(Q[398],Y([1,0,42,17,18,1539,156]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellSelectionModel=void 0;const f={hasRowSelector:!1};class v{constructor(S=f){this.options=S,this.ranges=[],this._handler=new Slick.EventHandler,this.onSelectedRangesChanged=new Slick.Event,this.options=(0,t.mixin)(this.options,f,!1),this.options.cellRangeSelector?this.selector=this.options.cellRangeSelector:this.selector=new D.CellRangeSelector({selectionCss:{border:"2px dashed grey"}})}init(S){this.grid=S,this._handler.subscribe(this.grid.onKeyDown,h=>this.handleKeyDown((0,T.convertJQueryKeyDownEvent)(h))),this._handler.subscribe(this.grid.onAfterKeyboardNavigation,h=>this.handleAfterKeyboardNavigationEvent()),this._handler.subscribe(this.grid.onClick,(h,a)=>this.handleCellClick(h,a)),this._handler.subscribe(this.grid.onHeaderClick,(h,a)=>this.handleHeaderClick(h,a)),this.grid.registerPlugin(this.selector),this._handler.subscribe(this.selector.onCellRangeSelected,(h,a)=>this.handleCellRangeSelected(h,a,!1)),this._handler.subscribe(this.selector.onAppendCellRangeSelected,(h,a)=>this.handleCellRangeSelected(h,a,!0)),this._handler.subscribe(this.selector.onBeforeCellRangeSelected,(h,a)=>this.handleBeforeCellRangeSelected(h,a))}destroy(){this._handler.unsubscribeAll(),this.grid.unregisterPlugin(this.selector)}removeInvalidRanges(S){let h=[];for(let a=0;a<S.length;a++){let r=S[a];this.grid.canCellBeSelected(r.fromRow,r.fromCell)&&this.grid.canCellBeSelected(r.toRow,r.toCell)?h.push(r):this.grid.canCellBeSelected(r.fromRow,r.fromCell+1)&&this.grid.canCellBeSelected(r.toRow,r.toCell)&&h.push(new Slick.Range(r.fromRow,r.fromCell+1,r.toRow,r.toCell))}return h}setSelectedRanges(S){(!this.ranges||this.ranges.length===0)&&(!S||S.length===0)||(this.ranges=this.removeInvalidRanges(S),this.onSelectedRangesChanged.notify(this.ranges))}getSelectedRanges(){return this.ranges}handleBeforeCellRangeSelected(S,h){return this.grid.getEditorLock().isActive()?(S.stopPropagation(),!1):!0}handleCellRangeSelected(S,h,a){this.grid.setActiveCell(h.fromRow,h.fromCell,!1,!1,!0),a?this.setSelectedRanges(this.insertIntoSelections(this.getSelectedRanges(),h)):this.setSelectedRanges([h])}isMultiSelection(S){return b.isMacintosh?S.metaKey:S.ctrlKey}handleHeaderClick(S,h){if(S.target.className!=="slick-resizable-handle"&&!(0,y.isUndefinedOrNull)(h.column)){const a=this.grid.getColumnIndex(h.column.id),r=this.grid.getDataLength(),i=this.grid.getColumns().length,s=this.grid.getActiveCell();let o;if(this.options.hasRowSelector&&a===0)this.setSelectedRanges([new Slick.Range(0,1,r-1,i-1)]),o={row:this.grid.getViewport()?.top??0,cell:1};else if(this.grid.canCellBeSelected(0,a)){const u=S.shiftKey&&s?new Slick.Range(0,s.cell,r-1,a):new Slick.Range(0,a,r-1,a),d=this.isMultiSelection(S)?this.getSelectedRanges():[],p=this.insertIntoSelections(d,u);this.setSelectedRanges(p),o={row:this.grid.getViewport()?.top??0,cell:a}}o&&this.grid.setActiveCell(o.row,o.cell)}}mergeSelections(S,h){let a=[],r=!1;for(let i of S){if(r){a.push(i);continue}let s;if(!(i.fromRow===h.fromRow&&i.fromCell===h.fromCell&&i.toRow===h.toRow&&i.toCell===h.toCell)){if(i.fromRow===h.fromRow&&i.toRow===h.toRow){if(h.toCell+1===i.fromCell||h.fromCell-1===i.toCell){r=!0;let o=Math.min(h.fromCell,i.fromCell,h.toCell,i.toCell),u=Math.max(h.fromCell,i.fromCell,h.toCell,i.toCell);s=new Slick.Range(h.fromRow,o,h.toRow,u)}}else if(i.fromCell===h.fromCell&&i.toCell===h.toCell&&(h.toRow+1===i.fromRow||h.fromRow-1===i.toRow)){r=!0;let o=Math.min(h.fromRow,i.fromRow,h.fromRow,i.fromRow),u=Math.max(h.toRow,i.toRow,h.toRow,i.toRow);s=new Slick.Range(o,h.fromCell,u,h.toCell)}s?a.push(s):a.push(i)}}return r||a.push(h),{newRanges:a,handled:r}}insertIntoSelections(S,h){let a=this.mergeSelections(S,h),r=a.newRanges,i=0;for(;;){if(i++>1e4)throw new Error("InsertIntoSelection infinite loop");let s=!1;for(let o of r)if(a=this.mergeSelections(r,o),a.handled){s=!0,r=a.newRanges;break}if(!s)break}return r}handleCellClick(S,h){const a=this.grid.getActiveCell(),r=this.grid.getColumns(),i=this.options.hasRowSelector&&h.cell===0;let s;a!==void 0&&S.shiftKey?s=i?new Slick.Range(a.row,r.length-1,h.row,1):new Slick.Range(a.row,a.cell,h.row,h.cell):s=i?new Slick.Range(h.row,1,h.row,r.length-1):new Slick.Range(h.row,h.cell,h.row,h.cell);const o=this.isMultiSelection(S)?this.getSelectedRanges():[],u=this.insertIntoSelections(o,s);this.setSelectedRanges(u);const d=i?{cell:1,row:h.row}:{cell:h.cell,row:h.row};this.grid.setActiveCell(d.row,d.cell)}handleKeyDown(S){let h=this.grid.getActiveCell(),a=S.ctrlKey||S.metaKey;if(h&&S.shiftKey&&!a&&!S.altKey&&(S.keyCode===15||S.keyCode===17||S.keyCode===16||S.keyCode===18)){let r=this.getSelectedRanges(),i;r=this.getSelectedRanges(),r.length||r.push(new Slick.Range(h.row,h.cell)),i=r.pop(),i.contains(h.row,h.cell)||(i=new Slick.Range(h.row,h.cell));let s=i.toRow-i.fromRow,o=i.toCell-i.fromCell,u=h.row===i.fromRow?1:-1,d=h.cell===i.fromCell?1:-1;S.keyCode===15?o-=d:S.keyCode===17?o+=d:S.keyCode===16?s-=u:S.keyCode===18&&(s+=u);let p=new Slick.Range(h.row,h.cell,h.row+u*s,h.cell+d*o);if(this.removeInvalidRanges([p]).length){r.push(p);let c=u>0?p.toRow:p.fromRow,l=d>0?p.toCell:p.fromCell;this.grid.scrollRowIntoView(c,!1),this.grid.scrollCellIntoView(c,l,!1)}else r.push(i);this.setSelectedRanges(r),S.preventDefault(),S.stopPropagation()}}handleAfterKeyboardNavigationEvent(){const S=this.grid.getActiveCell();S&&this.setSelectedRanges([new Slick.Range(S.row,S.cell)])}}e.CellSelectionModel=v}),define(Q[2286],Y([1,0,201,6,156,4,1565]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckBoxColumn=void 0;class T extends D.Disposable{constructor(v){super(),this.options=v,this._handler=new Slick.EventHandler,this._onChange=this._register(new y.Emitter),this.onChange=this._onChange.event}init(v){this._grid=v,this._handler.subscribe(v.onClick,(m,S)=>this.handleClick(S)),this._handler.subscribe(v.onKeyDown,(m,S)=>this.handleKeyboardEvent((0,b.convertJQueryKeyDownEvent)(m),S)),this._handler.subscribe(v.onActiveCellChanged,(m,S)=>{this.handleActiveCellChanged(S)})}destroy(){this._handler.unsubscribeAll()}get definition(){return{id:this.options.field,formatter:(v,m,S,h,a)=>{const r=a[h.field],i=(0,t.escape)(h.name??""),s=r.enabled===!1?"disabled":"",o=r.checked?"checked":"";return`<input type="checkbox" tabindex=-1 title="${i}" aria-label="${i}" ${o} ${s}/>`},field:this.options.field,name:this.options.name,resizable:this.options.resizable,cssClass:"slick-plugin-checkbox-column"}}getCheckbox(){return this._grid.getActiveCellNode().children[0]}handleActiveCellChanged(v){this.isCurrentColumn(v.cell)&&this.getCheckbox().focus()}handleClick(v){this.isCurrentColumn(v.cell)&&setTimeout(()=>{this.fireOnChangeEvent()},0)}handleKeyboardEvent(v,m){v.equals(10)&&this.isCurrentColumn(m.cell)&&this.fireOnChangeEvent()}fireOnChangeEvent(){const v=this._grid.getActiveCell(),m=this.getCheckbox().checked,S=this._grid.getDataItem(v.row),h=S[this.options.field];m!==h.checked&&this._onChange.fire({row:v.row,column:v.cell,value:m,item:S})}isCurrentColumn(v){return this._grid.getColumns()[v]?.id===this.definition.id}}e.CheckBoxColumn=T}),define(Q[1105],Y([1,0,156,389,201,67,6,4,1929,1566]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckboxSelectColumn=e.ActionOnCheck=void 0;var m;(function(r){r[r.selectRow=0]="selectRow",r[r.customAction=1]="customAction"})(m||(e.ActionOnCheck=m={}));const S=v.localize(0,null),h={columnId:"_checkbox_selector",cssClass:"slick-plugin-checkbox-select-column",headerCssClass:"slick-plugin-checkbox-select-column",toolTip:void 0,width:30};class a extends f.Disposable{constructor(i,s){super(),this._handler=new Slick.EventHandler,this._onChange=this._register(new T.Emitter),this._onCheckAllChange=this._register(new T.Emitter),this.onChange=this._onChange.event,this.onCheckAllChange=this._onCheckAllChange.event,this._options=(0,y.mixin)(i,h,!1),this._options.headerCssClass=i.headerCssClass?i.headerCssClass+" "+h.headerCssClass:h.headerCssClass,this._options.cssClass=i.cssClass?i.cssClass+" "+h.cssClass:h.cssClass,this.index=s||0}get definition(){return{id:this._options.columnId,name:this._options.title||`<input type="checkbox" tabIndex="0" title=${S}/>`,toolTip:this._options.toolTip,field:"sel",width:this._options.width,resizable:!1,sortable:!1,cssClass:this._options.cssClass,headerCssClass:this._options.headerCssClass,formatter:(i,s,o,u,d)=>this.checkboxSelectionFormatter(i,s,o,u,d)}}checkboxSelectionFormatter(i,s,o,u,d){const p=this.getCheckboxPropertyValue(i),c=p.checked?"checked":"",l=p.enabled?"":"disabled";return`<input type="checkbox" style="pointer-events: none;" aria-label="${(0,b.escape)(u.name??"")}" tabIndex="-1" ${c} ${l}/>`}init(i){this._grid=i,this._handler.subscribe(this._grid.onClick,(s,o)=>this.handleClick(s,o)).subscribe(this._grid.onKeyDown,(s,o)=>this.handleKeyDown((0,t.convertJQueryKeyDownEvent)(s),o)).subscribe(this._grid.onHeaderCellRendered,(s,o)=>this.handleHeaderCellRendered(s,o)).subscribe(i.onActiveCellChanged,(s,o)=>{this.handleActiveCellChanged(o)}),this.isCheckAllHeaderCheckboxShown()&&this._handler.subscribe(this._grid.onHeaderClick,(s,o)=>this.handleHeaderClick(s,o))}handleClick(i,s){s.cell===this.index&&(this.toggleCellCheckbox(s.row),i.stopPropagation(),i.stopImmediatePropagation(),i.preventDefault())}handleKeyDown(i,s){s.cell===this.index&&(i.equals(3)||i.equals(10))&&(this.toggleCellCheckbox(s.row),i.stopPropagation(),i.preventDefault(),i.browserEvent.stopImmediatePropagation())}handleActiveCellChanged(i){if(i.cell===this.index){const s=this._grid.getActiveCellNode();s&&s.focus()}}toggleCellCheckbox(i){const s=this.getCheckboxPropertyValue(i);s.enabled&&(this.setCheckboxPropertyValue(i,!s.checked),this._grid.invalidateRow(i),this._grid.render(),this._grid.setActiveCell(i,this.index),this.updateSelectAllCheckboxState(),this._onChange.fire({checked:!s.checked,row:i,column:this.index}))}handleHeaderClick(i,s){this.onHeaderCheckboxStateChange(),i.preventDefault(),i.stopPropagation()}isCheckAllHeaderCheckboxShown(){return!this._options.title}handleHeaderKeyDown(i){const s=new D.StandardKeyboardEvent(i);(s.equals(3)||s.equals(10))&&(this._headerCheckbox.checked=!this._headerCheckbox.checked,this.onHeaderCheckboxStateChange(),this._headerCheckbox.focus(),s.preventDefault(),s.stopPropagation())}onHeaderCheckboxStateChange(){const i=this._grid.getDataLength();for(let s=0;s<i;s++)this.setCheckboxPropertyValue(s,this._headerCheckbox.checked);this._grid.updateColumnHeader(this._options.columnId,`<input type="checkbox" tabIndex="0" ${this._headerCheckbox.checked?"checked":""} title=${S}/>`,this._options.toolTip),this._onCheckAllChange.fire({checked:this._headerCheckbox.checked,column:this.index}),this._grid.invalidateAllRows(),this._grid.render()}handleHeaderCellRendered(i,s){s.column.id===this._options.columnId&&(this._headerCheckbox=s.node.firstChild.firstChild,this._headerCheckbox.onkeydown=o=>this.handleHeaderKeyDown(o))}updateSelectAllCheckboxState(){const i=this._grid.getDataLength();let s=!0;for(let o=0;o<i;o++)if(!this.getCheckboxPropertyValue(o).checked){s=!1;break}this._headerCheckbox&&(this._headerCheckbox.checked=s)}destroy(){this._handler.unsubscribeAll()}reactiveCheckboxCheck(i,s){this.setCheckboxPropertyValue(i,s),this._grid.invalidateRow(i),this._grid.render(),this._grid.scrollRowIntoView(i)}getCheckboxPropertyValue(i){const o=(this._grid?.getDataItem(i))[this._options.title];let u=!0,d=!1;return typeof o=="boolean"?(u=!0,d=o):o!==void 0?(u=o.enabled===void 0?!0:o.enabled,d=o.checked===void 0?!1:o.checked):o===void 0&&(u=!0,d=!1),{checked:d,enabled:u}}setCheckboxPropertyValue(i,s){const o=this._grid?.getDataItem(i),u=o[this._options.title];u===void 0||typeof u=="boolean"?o[this._options.title]=s:o[this._options.title]={checked:s,enabled:u.enabled}}}e.CheckboxSelectColumn=a}),define(Q[571],Y([1,0,6,17,156,4]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyKeybind=void 0;class T extends D.Disposable{constructor(){super(...arguments),this.handler=new Slick.EventHandler,this._onCopy=this._register(new t.Emitter),this.onCopy=this._onCopy.event}init(v){this.grid=v,this.handler.subscribe(this.grid.onKeyDown,(m,S)=>this.handleKeyDown((0,b.convertJQueryKeyDownEvent)(m),S))}destroy(){this.handler.unsubscribeAll()}handleKeyDown(v,m){let S=!1;if(v.equals(2081)){S=!0;let h=this.grid.getSelectionModel(),a;if(h)a=h.getSelectedRanges();else{let r=this.grid.getSelectedRows(),i=0;!(0,y.isUndefinedOrNull)(this.grid.getColumns()[0].selectable)&&!this.grid.getColumns()[0].selectable&&(i=1),a=[new Slick.Range(r[0],i,r[r.length-1],this.grid.getColumns().length)]}this._onCopy.fire(a)}S&&(v.preventDefault(),v.stopPropagation(),v.browserEvent.stopImmediatePropagation)}}e.CopyKeybind=T}),define(Q[2287],Y([1,0,7,1932,1568]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoadingSpinnerPlugin=void 0;const b=(0,y.localize)(0,null);class D{constructor(){this._loading=!1}init(f){this._loadingContainer=t.$("div.loading-spinner-plugin-container"),this._container=f.getContainerNode(),this._viewport=this._container.getElementsByClassName("slick-viewport")[0],this._viewport.parentElement.insertBefore(this._loadingContainer,this._viewport)}destroy(){}set loading(f){if(f){if(!this._loading){t.hide(this._viewport);const v=t.$("div.loading-spinner.codicon.in-progress",{title:b});this._loadingContainer.appendChild(v),this._container.setAttribute("aria-busy","true")}}else t.show(this._viewport),t.clearNode(this._loadingContainer),this._container.removeAttribute("aria-busy");this._loading=f}}e.LoadingSpinnerPlugin=D}),define(Q[1106],Y([1,0,7,18,129,4,42]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseWheelSupport=void 0;const v={scrollSpeed:50};class m{constructor(h={}){this._disposables=new D.DisposableStore,this.options=v,(0,T.mixin)(this.options,h)}init(h){this.canvas=h.getCanvasNode(),this.viewport=this.canvas.parentElement;let a=r=>{let i=new b.StandardWheelEvent(r);this._onMouseWheel(i)};this._disposables.add(t.addDisposableListener(this.viewport,"mousewheel",a)),this._disposables.add(t.addDisposableListener(this.viewport,"DOMMouseScroll",a))}_onMouseWheel(h){if(h.deltaY||h.deltaX){let a=h.deltaY*this.options.scrollSpeed,r=h.deltaX*this.options.scrollSpeed;const i=this.canvas.clientHeight,s=this.canvas.clientWidth,o=this.viewport.clientHeight,u=this.viewport.clientWidth;!y.isMacintosh&&h.browserEvent&&h.browserEvent.shiftKey&&!r&&(r=a,a=0),a<0?this.viewport.scrollTop-a+o>i?(this.viewport.scrollTop=i-o,this.viewport.dispatchEvent(new Event("scroll"))):(this.viewport.scrollTop=this.viewport.scrollTop-a,this.viewport.dispatchEvent(new Event("scroll")),h.stopPropagation(),h.preventDefault()):this.viewport.scrollTop-a<0?(this.viewport.scrollTop=0,this.viewport.dispatchEvent(new Event("scroll"))):(this.viewport.scrollTop=this.viewport.scrollTop-a,this.viewport.dispatchEvent(new Event("scroll")),h.stopPropagation(),h.preventDefault()),r<0?this.viewport.scrollLeft-r+u>s?(this.viewport.scrollLeft=s-u,this.viewport.dispatchEvent(new Event("scroll"))):(this.viewport.scrollLeft=this.viewport.scrollLeft-r,this.viewport.dispatchEvent(new Event("scroll")),h.stopPropagation(),h.preventDefault()):this.viewport.scrollLeft-r<0?(this.viewport.scrollLeft=0,this.viewport.dispatchEvent(new Event("scroll"))):(this.viewport.scrollLeft=this.viewport.scrollLeft-r,this.viewport.dispatchEvent(new Event("scroll")),h.stopPropagation(),h.preventDefault())}}destroy(){this._disposables.dispose()}}e.MouseWheelSupport=m}),define(Q[399],Y([1,0,156,42]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RowSelectionModel=void 0;const b={selectActiveRow:!0};class D{constructor(f){this._handler=new Slick.EventHandler,this._ranges=[],this.onSelectedRangesChanged=new Slick.Event,this._options=(0,y.mixin)(f,b,!1)}init(f){this._grid=f,this._handler.subscribe(this._grid.onActiveCellChanged,(v,m)=>this.handleActiveCellChange(v,m)).subscribe(this._grid.onKeyDown,v=>this.handleKeyDown((0,t.convertJQueryKeyDownEvent)(v))).subscribe(this._grid.onClick,v=>this.handleClick(v))}rangesToRows(f){const v=[];for(let m=0;m<f.length;m++)for(let S=f[m].fromRow;S<=f[m].toRow;S++)v.push(S);return v}rowsToRanges(f){const v=[],m=this._grid.getColumns().length-1;for(let S=0;S<f.length;S++)v.push(new Slick.Range(f[S],0,f[S],m));return v}getSelectedRows(){return this.rangesToRows(this._ranges)}setSelectedRows(f){this.setSelectedRanges(this.rowsToRanges(f))}setSelectedRanges(f){(!this._ranges||this._ranges.length===0)&&(!f||f.length===0)||(this._ranges=f,this.onSelectedRangesChanged.notify(this._ranges))}getSelectedRanges(){return this._ranges}getRowsRange(f,v){let m,S=[];for(m=f;m<=v;m++)S.push(m);for(m=v;m<f;m++)S.push(m);return S}handleActiveCellChange(f,v){this._options.selectActiveRow&&v.row!==null&&this.setSelectedRanges([new Slick.Range(v.row,0,v.row,this._grid.getColumns().length-1)])}handleKeyDown(f){const v=this._grid.getActiveCell();if(v&&f.shiftKey&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&(f.keyCode===16||f.keyCode===18)){let m=this.getSelectedRows();m.sort((r,i)=>r-i),m.length||(m=[v.row]);let S=m[0],h=m[m.length-1],a;if(f.keyCode===18?a=v.row<h||S===h?++h:++S:a=v.row<h?--h:--S,a>=0&&a<this._grid.getDataLength()){this._grid.scrollRowIntoView(a);const r=this.rowsToRanges(this.getRowsRange(S,h));this.setSelectedRanges(r)}f.preventDefault(),f.stopPropagation()}}handleClick(f){const v=this._grid.getCellFromEvent(f);if(!v||!this._grid.canCellBeActive(v.row,v.cell)||!this._grid.getOptions().multiSelect||!f.ctrlKey&&!f.shiftKey&&!f.metaKey)return!1;let m=this.rangesToRows(this._ranges);const S=jQuery.inArray(v.row,m);if(S===-1&&(f.ctrlKey||f.metaKey))m.push(v.row),this._grid.setActiveCell(v.row,v.cell);else if(S!==-1&&(f.ctrlKey||f.metaKey))m=m.filter(a=>a!==v.row),this._grid.setActiveCell(v.row,v.cell);else if(m.length&&f.shiftKey){const a=m.pop();if(a){const r=Math.min(v.row,a),i=Math.max(v.row,a);m=[];for(let s=r;s<=i;s++)s!==a&&m.push(s);m.push(a)}this._grid.setActiveCell(v.row,v.cell)}const h=this.rowsToRanges(m);return this.setSelectedRanges(h),f.stopImmediatePropagation(),!0}destroy(){this._handler.unsubscribeAll()}}e.RowSelectionModel=D}),define(Q[572],Y([1,0,156,6,4]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconCellValue=e.BaseClickableColumn=void 0;class D extends b.Disposable{constructor(v){super(),this._options=v,this._handler=new Slick.EventHandler,this._onClick=this._register(new y.Emitter),this.onClick=this._onClick.event}init(v){this._grid=v,this._handler.subscribe(v.onClick,(m,S)=>this.handleClick(S)),this._handler.subscribe(v.onKeyDown,(m,S)=>this.handleKeyboardEvent((0,t.convertJQueryKeyDownEvent)(m),S)),this._handler.subscribe(v.onActiveCellChanged,(m,S)=>{this.handleActiveCellChanged(S)})}destroy(){this._handler.unsubscribeAll()}dispose(){this.destroy()}handleActiveCellChanged(v){if(this.isCellEnabled(v.row,v.cell)){const m=this._grid.getActiveCellNode();m&&m.children&&m.children[0].focus()}}handleClick(v){this.isCellEnabled(v.row,v.cell)&&setTimeout(()=>{this.fireClickEvent()},0)}handleKeyboardEvent(v,m){(v.equals(3)||v.equals(10))&&this.isCellEnabled(m.row,m.cell)&&(v.stopPropagation(),v.preventDefault(),this.fireClickEvent())}fireClickEvent(){const v=this._grid.getActiveCell(),m=this._grid.getActiveCellPosition();v&&m&&this._onClick.fire({row:v.row,column:v.cell,item:this._grid.getDataItem(v.row),position:{x:(m.left+m.right)/2,y:(m.bottom+m.top)/2}})}isCellEnabled(v,m){const S=this._grid.getColumns()[m]?.id===this.definition.id,h=this._grid.getDataItem(v),a=h&&!!this._options.enabledField&&h[this._options.enabledField]===!1;return S&&!a}}e.BaseClickableColumn=D;function T(f,v){if(f.field&&v[f.field]){const m=v[f.field];return typeof m=="string"?{iconCssClass:"",title:m}:m}else return{iconCssClass:f.iconCssClass,title:f.title}}e.getIconCellValue=T}),define(Q[573],Y([1,0,572,201,1564,1044]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonColumn=void 0;class b extends t.BaseClickableColumn{constructor(T){super(T),this.options=T}get definition(){return{id:this.options.id||this.options.title||this.options.field,width:this.options.width??26,formatter:(T,f,v,m,S)=>{const h=(0,t.getIconCellValue)(this.options,S),a=(0,y.escape)(h.title??"");let r="";h.iconCssClass&&(r=this.options.isFontIcon?h.iconCssClass:`codicon icon slick-plugin-icon ${h.iconCssClass}`);const i=this.options.showText?"slick-plugin-button slick-plugin-text-button":"slick-plugin-button slick-plugin-image-only-button",s=this.options.showText?a:"",o=this.isCellEnabled(T,f)?"":"disabled";return`<button tabindex=-1 class="${r} ${i}" title="${a}" aria-label="${a}" ${o}>${s}</button>`},name:this.options.name,toolTip:this.options.title,resizable:this.options.resizable,selectable:!1,cssClass:"slick-plugin-button-cell"}}}e.ButtonColumn=b}),define(Q[2288],Y([1,0,572,1930]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuColumn=void 0;class b extends t.BaseClickableColumn{constructor(T){super(T),this.options=T}get definition(){return{id:this.options.id||this.options.title||this.options.field,width:this.options.width??26,formatter:(T,f,v,m,S)=>{const h=escape(this.options.title??(0,y.localize)(0,null));return` <button tabIndex=0 title="${h}" aria-label="${h}" class="codicon toggle-more context-menu-button"> </button> `},name:this.options.name,resizable:this.options.resizable,selectable:!1,focusable:!0}}}e.ContextMenuColumn=b}),define(Q[2289],Y([1,0,572,201,1567,1044]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HyperlinkColumn=void 0;class b extends t.BaseClickableColumn{constructor(T){super(T),this.options=T}get definition(){return{id:this.options.id||this.options.title||this.options.field,width:this.options.width,formatter:(T,f,v,m,S)=>{const h=(0,t.getIconCellValue)(this.options,S),a=(0,y.escape)(h.title??""),r=S[this.options.field],i=h.iconCssClass?`codicon icon slick-plugin-icon ${h.iconCssClass}`:"",s=r?.url?`href="${encodeURI(r.url)}" target="blank"`:"",o=this.isCellEnabled(T,f)?"":"disabled";return`<a ${s} class="slick-hyperlink-cell ${i}" tabindex=-1 title="${a}" aria-label="${a}" role="${r.role??"link"}" ${o}>${a}</a>`},name:this.options.name,resizable:!0,selectable:!1}}}e.HyperlinkColumn=b}),define(Q[2290],Y([1,0,399,572,42]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RowMoveManager=void 0;const D={cancelEditOnDrag:!1};class T extends y.BaseClickableColumn{constructor(v){super(v),this.options=v,this.onBeforeMoveRows=new Slick.Event,this.onMoveRows=new Slick.Event,this.options=(0,b.mixin)(v,D,!1)}get definition(){return{id:this.options.id||this.options.title||this.options.field,width:this.options.width??26,name:this.options.name,resizable:this.options.resizable,selectable:!1,behavior:this.options.behavior,cssClass:this.options.iconCssClass,toolTip:this.options.title}}init(v){this._grid=v,this._grid.setSelectionModel(new t.RowSelectionModel),this._canvas=this._grid.getCanvasNode(),this._handler.subscribe(this._grid.onDragInit,(m,S)=>this.onDragInit(m,S)).subscribe(this._grid.onDragStart,(m,S)=>this.onDragStart(m,S)).subscribe(this._grid.onDrag,(m,S)=>this.onDrag(m,S)).subscribe(this._grid.onDragEnd,(m,S)=>this.onDragEnd(m,S))}onDragInit(v,m){v.stopImmediatePropagation()}onDragStart(v,m){const S=this._grid.getCellFromEvent(v),h={},a=this._grid.getColumns();if(h[S.row]={},a.forEach(s=>{h[S.row][s.id]="isDragging"}),this._grid.setCellCssStyles("isDragging",h),this.options.cancelEditOnDrag&&this._grid.getEditorLock().isActive()&&this._grid.getEditorLock().cancelCurrentEdit(),this._grid.getEditorLock().isActive()||!/move|selectAndMove/.test(this._grid.getColumns()[S.cell].behavior))return;this._dragging=!0,v.stopImmediatePropagation();let r=this._grid.getSelectedRows();(r.length===0||jQuery.inArray(S.row,r)===-1)&&(r=[S.row],this._grid.setSelectedRows(r));const i=this._grid.getOptions().rowHeight;m.selectedRows=r,m.selectionProxy=jQuery('<div class="slick-reorder-proxy"/>').css("position","absolute").css("zIndex","99999").css("width",jQuery(this._canvas).innerWidth()).css("height",i*r.length).appendTo(this._canvas),m.guide=jQuery('<div class="slick-reorder-guide"/>').css("position","absolute").css("zIndex","99998").css("width",jQuery(this._canvas).innerWidth()).css("top",-1e3).appendTo(this._canvas),m.insertBefore=-1}onDrag(v,m){if(!this._dragging)return;v.stopImmediatePropagation();const S=v.pageY-jQuery(this._canvas).offset().top;m.selectionProxy.css("top",S-5);const h=Math.max(0,Math.min(Math.round(S/this._grid.getOptions().rowHeight),this._grid.getDataLength()));if(h!==m.insertBefore){const a={rows:m.selectedRows,insertBefore:h};this.onBeforeMoveRows.notify(a)===!1?(m.guide.css("top",-1e3),m.canMove=!1):(m.guide.css("top",h*this._grid.getOptions().rowHeight),m.canMove=!0),m.insertBefore=h}}onDragEnd(v,m){if(this._dragging&&(this._dragging=!1,this._grid.removeCellCssStyles("isDragging"),v.stopImmediatePropagation(),m.guide.remove(),m.selectionProxy.remove(),m.canMove)){const S={rows:m.selectedRows,insertBefore:m.insertBefore};this.onMoveRows.notify(S)}}}e.RowMoveManager=T}),define(Q[2291],Y([1,0,201,572]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextWithIconColumn=void 0;class b{constructor(T){this.options=T}get definition(){return{id:this.options.id||this.options.field,field:this.options.field,resizable:this.options.resizable,formatter:(T,f,v,m,S)=>{const h=(0,y.getIconCellValue)(this.options,S),a=(0,t.escape)(h.title??"");return`<div class="icon codicon slick-icon-cell-content ${h.iconCssClass??""}" title="${a}">${a}</div>`},width:this.options.width,name:this.options.name,cssClass:"slick-icon-cell",headerCssClass:this.options.headerCssClass,editor:this.options.editor}}}e.TextWithIconColumn=b}),define(Q[305],Y([1,0,1937,34,18,15,7,321]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapseAllAction=e.DefaultTreestyler=e.DefaultAccessibilityProvider=e.DefaultSorter=e.DefaultFilter=e.DefaultDragAndDrop=e.DefaultController=e.KeybindingDispatcher=e.OpenMode=e.ClickBehavior=void 0;var v;(function(d){d[d.ON_MOUSE_DOWN=0]="ON_MOUSE_DOWN",d[d.ON_MOUSE_UP=1]="ON_MOUSE_UP"})(v||(e.ClickBehavior=v={}));var m;(function(d){d[d.SINGLE_CLICK=0]="SINGLE_CLICK",d[d.DOUBLE_CLICK=1]="DOUBLE_CLICK"})(m||(e.OpenMode=m={}));class S{constructor(){this._arr=[]}has(p){let c=(0,f.decodeKeybinding)(p,b.OS);if(c!==null){for(const l of this._arr)if(c.equals(l.keybinding))return!0}return!1}set(p,c){this._arr.push({keybinding:(0,f.decodeKeybinding)(p,b.OS),callback:c})}dispatch(p){for(let c=this._arr.length-1;c>=0;c--){let l=this._arr[c];if(p.equals(l.keybinding))return l.callback}return null}}e.KeybindingDispatcher=S;class h{constructor(p={clickBehavior:0,keyboardSupport:!0,openMode:0}){this.options=p,this.downKeyBindingDispatcher=new S,this.upKeyBindingDispatcher=new S,(typeof p.keyboardSupport!="boolean"||p.keyboardSupport)&&(this.downKeyBindingDispatcher.set(16,(c,l)=>this.onUp(c,l)),this.downKeyBindingDispatcher.set(18,(c,l)=>this.onDown(c,l)),this.downKeyBindingDispatcher.set(15,(c,l)=>this.onLeft(c,l)),this.downKeyBindingDispatcher.set(17,(c,l)=>this.onRight(c,l)),b.isMacintosh&&(this.downKeyBindingDispatcher.set(2064,(c,l)=>this.onLeft(c,l)),this.downKeyBindingDispatcher.set(300,(c,l)=>this.onDown(c,l)),this.downKeyBindingDispatcher.set(302,(c,l)=>this.onUp(c,l))),this.downKeyBindingDispatcher.set(11,(c,l)=>this.onPageUp(c,l)),this.downKeyBindingDispatcher.set(12,(c,l)=>this.onPageDown(c,l)),this.downKeyBindingDispatcher.set(14,(c,l)=>this.onHome(c,l)),this.downKeyBindingDispatcher.set(13,(c,l)=>this.onEnd(c,l)),this.downKeyBindingDispatcher.set(10,(c,l)=>this.onSpace(c,l)),this.downKeyBindingDispatcher.set(9,(c,l)=>this.onEscape(c,l)),this.upKeyBindingDispatcher.set(3,this.onEnter.bind(this)),this.upKeyBindingDispatcher.set(2051,this.onEnter.bind(this)))}onMouseDown(p,c,l,n="mouse"){return this.options.clickBehavior===0&&(l.leftButton||l.middleButton)?l.target&&(l.target.tagName&&l.target.tagName.toLowerCase()==="input"||T.findParentWithClass(l.target,"scrollbar","monaco-tree")||T.findParentWithClass(l.target,"monaco-action-bar","row"))?!1:this.onLeftClick(p,c,l,n):!1}onClick(p,c,l){return b.isMacintosh&&l.ctrlKey?(l.preventDefault(),l.stopPropagation(),!1):l.target&&l.target.tagName&&l.target.tagName.toLowerCase()==="input"||this.options.clickBehavior===0&&(l.leftButton||l.middleButton)?!1:this.onLeftClick(p,c,l)}onLeftClick(p,c,l,n="mouse"){const g=l,w={origin:n,originalEvent:l,didClickOnTwistie:this.isClickOnTwistie(g)};return p.getInput()===c?(p.clearFocus(w),p.clearSelection(w)):(l&&g.browserEvent&&g.browserEvent.type==="mousedown"&&g.browserEvent.detail===1||l.preventDefault(),l.stopPropagation(),p.domFocus(),p.setSelection([c],w),p.setFocus(c,w),this.shouldToggleExpansion(c,g,n)&&(p.isExpanded(c)?p.collapse(c).then(void 0,D.onUnexpectedError):p.expand(c).then(void 0,D.onUnexpectedError))),!0}shouldToggleExpansion(p,c,l){const n=l==="mouse"&&c.detail===2;return this.openOnSingleClick||n||this.isClickOnTwistie(c)}setOpenMode(p){this.options.openMode=p}get openOnSingleClick(){return this.options.openMode===0}isClickOnTwistie(p){let c=p.target;if(!c.classList.contains("content"))return!1;const l=window.getComputedStyle(c,":before");if(l.backgroundImage==="none"||l.display==="none")return!1;const n=parseInt(l.width)+parseInt(l.paddingRight);return p.browserEvent.offsetX<=n}onContextMenu(p,c,l){return l.target&&l.target.tagName&&l.target.tagName.toLowerCase()==="input"||l&&(l.preventDefault(),l.stopPropagation()),!1}onTap(p,c,l){const n=l.initialTarget;return n&&n.tagName&&n.tagName.toLowerCase()==="input"?!1:this.onLeftClick(p,c,l,"touch")}onKeyDown(p,c){return this.onKey(this.downKeyBindingDispatcher,p,c)}onKeyUp(p,c){return this.onKey(this.upKeyBindingDispatcher,p,c)}onKey(p,c,l){const n=p.dispatch(l.toKeyCodeChord().toKeybinding());return n&&n(c,l)?(l.preventDefault(),l.stopPropagation(),!0):!1}onUp(p,c){const l={origin:"keyboard",originalEvent:c};return p.getHighlight()?p.clearHighlight(l):(p.focusPrevious(1,l),p.reveal(p.getFocus()).then(void 0,D.onUnexpectedError)),!0}onPageUp(p,c){const l={origin:"keyboard",originalEvent:c};return p.getHighlight()?p.clearHighlight(l):(p.focusPreviousPage(l),p.reveal(p.getFocus()).then(void 0,D.onUnexpectedError)),!0}onDown(p,c){const l={origin:"keyboard",originalEvent:c};return p.getHighlight()?p.clearHighlight(l):(p.focusNext(1,l),p.reveal(p.getFocus()).then(void 0,D.onUnexpectedError)),!0}onPageDown(p,c){const l={origin:"keyboard",originalEvent:c};return p.getHighlight()?p.clearHighlight(l):(p.focusNextPage(l),p.reveal(p.getFocus()).then(void 0,D.onUnexpectedError)),!0}onHome(p,c){const l={origin:"keyboard",originalEvent:c};return p.getHighlight()?p.clearHighlight(l):(p.focusFirst(l),p.reveal(p.getFocus()).then(void 0,D.onUnexpectedError)),!0}onEnd(p,c){const l={origin:"keyboard",originalEvent:c};return p.getHighlight()?p.clearHighlight(l):(p.focusLast(l),p.reveal(p.getFocus()).then(void 0,D.onUnexpectedError)),!0}onLeft(p,c){const l={origin:"keyboard",originalEvent:c};if(p.getHighlight())p.clearHighlight(l);else{const n=p.getFocus();p.collapse(n).then(g=>{if(n&&!g)return p.focusParent(l),p.reveal(p.getFocus())}).then(void 0,D.onUnexpectedError)}return!0}onRight(p,c){const l={origin:"keyboard",originalEvent:c};if(p.getHighlight())p.clearHighlight(l);else{const n=p.getFocus();p.expand(n).then(g=>{if(n&&!g)return p.focusFirstChild(l),p.reveal(p.getFocus())}).then(void 0,D.onUnexpectedError)}return!0}onEnter(p,c){const l={origin:"keyboard",originalEvent:c};if(p.getHighlight())return!1;const n=p.getFocus();return n&&p.setSelection([n],l),!0}onSpace(p,c){if(p.getHighlight())return!1;const l=p.getFocus();return l&&p.toggleExpansion(l),!0}onEscape(p,c){const l={origin:"keyboard",originalEvent:c};return p.getHighlight()?(p.clearHighlight(l),!0):p.getSelection().length?(p.clearSelection(l),!0):p.getFocus()?(p.clearFocus(l),!0):!1}}e.DefaultController=h;class a{getDragURI(p,c){return null}onDragStart(p,c,l){}onDragOver(p,c,l,n){return null}drop(p,c,l,n){}dropAbort(p,c){}}e.DefaultDragAndDrop=a;class r{isVisible(p,c){return!0}}e.DefaultFilter=r;class i{compare(p,c,l){return 0}}e.DefaultSorter=i;class s{getAriaLabel(p,c){return null}}e.DefaultAccessibilityProvider=s;class o{constructor(p,c){this.styleElement=p,this.selectorSuffix=c}style(p){const c=this.selectorSuffix?`.${this.selectorSuffix}`:"",l=[];p.listFocusBackground&&l.push(`.monaco-tree${c}.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: ${p.listFocusBackground}; }`),p.listFocusForeground&&l.push(`.monaco-tree${c}.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: ${p.listFocusForeground}; }`),p.listActiveSelectionBackground&&l.push(`.monaco-tree${c}.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${p.listActiveSelectionBackground}; }`),p.listActiveSelectionForeground&&l.push(`.monaco-tree${c}.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: ${p.listActiveSelectionForeground}; }`),p.listFocusAndSelectionBackground&&l.push(` .monaco-tree-drag-image, .monaco-tree${c}.focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: ${p.listFocusAndSelectionBackground}; } `),p.listFocusAndSelectionForeground&&l.push(` .monaco-tree-drag-image, .monaco-tree${c}.focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: ${p.listFocusAndSelectionForeground}; } `),p.listInactiveSelectionBackground&&l.push(`.monaco-tree${c} .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${p.listInactiveSelectionBackground}; }`),p.listInactiveSelectionForeground&&l.push(`.monaco-tree${c} .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: ${p.listInactiveSelectionForeground}; }`),p.listHoverBackground&&l.push(`.monaco-tree${c} .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: ${p.listHoverBackground}; }`),p.listHoverForeground&&l.push(`.monaco-tree${c} .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: ${p.listHoverForeground}; }`),p.listDropBackground&&l.push(` .monaco-tree${c} .monaco-tree-wrapper.drop-target, .monaco-tree${c} .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: ${p.listDropBackground} !important; color: inherit !important; } `),p.listFocusOutline&&l.push(` .monaco-tree-drag-image { border: 1px solid ${p.listFocusOutline}; background: #000; } .monaco-tree${c} .monaco-tree-rows > .monaco-tree-row { border: 1px solid transparent; } .monaco-tree${c}.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { border: 1px dotted ${p.listFocusOutline}; } .monaco-tree${c}.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { border: 1px solid ${p.listFocusOutline}; } .monaco-tree${c} .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { border: 1px solid ${p.listFocusOutline}; } .monaco-tree${c} .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { border: 1px dashed ${p.listFocusOutline}; } .monaco-tree${c} .monaco-tree-wrapper.drop-target, .monaco-tree${c} .monaco-tree-rows > .monaco-tree-row.drop-target { border: 1px dashed ${p.listFocusOutline}; } `);const n=l.join(` `);n!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=n)}}e.DefaultTreestyler=o;class u extends y.Action{constructor(p,c){super("vs.tree.collapse",t.localize(0,null),"monaco-tree-action collapse-all",c),this.viewer=p}run(p){return this.viewer.getHighlight()||(this.viewer.collapseAll(),this.viewer.clearSelection(),this.viewer.clearFocus(),this.viewer.domFocus(),this.viewer.focusFirst()),Promise.resolve()}}e.CollapseAllAction=u}),define(Q[820],Y([1,0,7,42]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.layoutDesignerTable=e.ScrollbarSize=e.TableHeaderRowHeight=e.TableRowHeight=void 0,e.TableRowHeight=25,e.TableHeaderRowHeight=28,e.ScrollbarSize=15;const b=T(1);function D(f,v){let m;f.container.contains(document.activeElement)&&(m=(0,y.deepClone)(f.activeCell));const S=f.getData().getLength(),h=T(S),a=Math.max(b,h);f.layout(new t.Dimension(v-20,a)),m&&S>m.row&&f.setActiveCell(m.row,m.cell)}e.layoutDesignerTable=D;function T(f){return f*e.TableRowHeight+e.TableHeaderRowHeight+e.ScrollbarSize}}),define(Q[494],Y([1,0,7,320,10]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconKey=e.createIconCssClass=void 0;const D=new y.IdGenerator("model-view-component-icon-");function T(h,a){let r=a;r||(r=D.nextId()),(0,t.removeCSSRulesContainingSelector)(r);const i=f(h),s=v(h)||i;return(0,t.createCSSRule)(`.icon.${r}, .hc-light .icon.${r}`,`background-image: ${(0,t.asCSSUrl)(i)}`),(0,t.createCSSRule)(`.vs-dark .icon.${r}, .hc-black .icon.${r}`,`background-image: ${(0,t.asCSSUrl)(s)}`),r}e.createIconCssClass=T;function f(h){return h&&h.light?m(h.light):m(h)}function v(h){return h&&h.dark?m(h.dark):null}function m(h){return typeof h=="string"?b.URI.file(h):b.URI.revive(h)}function S(h){return f(h).toString(!0)+v(h)?.toString(!0)}e.getIconKey=S}),define(Q[2292],Y([1,0,7,215,1603]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CountInsight=void 0;class b{static{this.types=[y.InsightType.Count]}constructor(T,f){this.options={type:y.InsightType.Count},this.types=b.types,this.countImage=(0,t.$)("div"),T.appendChild(this.countImage)}layout(){}set data(T){(0,t.clearNode)(this.countImage);for(let f=0;f<T.columns.length;f++){let v=(0,t.$)("div.count-label-container"),m=(0,t.$)("span.label-container");m.innerText=T.columns[f];let S=(0,t.$)("span.value-container");S.innerText=T.rows[0][f],v.appendChild(m),v.appendChild(S),this.countImage.appendChild(v)}}dispose(){}}e.CountInsight=b}),define(Q[1107],Y([1,0,7,320,26,2019]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isValidIcon=e.createCSSRuleForIcon=void 0;const T=new y.IdGenerator("contrib-dashboard-icon-");function f(m,S){let h;if(m)if(h=T.nextId(),typeof m=="string"){const a=b.joinPath(S.description.extensionLocation,m);(0,t.createCSSRule)(`.codicon.${h}`,`background-image: ${(0,t.asCSSUrl)(a)}`)}else{const a=b.joinPath(S.description.extensionLocation,m.light),r=b.joinPath(S.description.extensionLocation,m.dark);(0,t.createCSSRule)(`.codicon.${h}, .hc-light .codicon.${h}`,`background-image: ${(0,t.asCSSUrl)(a)}`),(0,t.createCSSRule)(`.vs-dark .codicon.${h}, .hc-black .codicon.${h}`,`background-image: ${(0,t.asCSSUrl)(r)}`)}return h}e.createCSSRuleForIcon=f;function v(m,S){return typeof m>"u"?!1:typeof m=="string"||typeof m.dark=="string"&&typeof m.light=="string"?!0:(S.collector.error(D.localize(0,null)),!1)}e.isValidIcon=v}),define(Q[2293],Y([1,0,7,2072]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderDashboardContributions=void 0;class b{constructor(m){this.manifest=m}dashboardInsights(){let m=this.manifest.contributes;if(m){let S=m["dashboard.insights"];if(S)return Array.isArray(S)?S:[S]}return[]}dashboardTabs(){let m=this.manifest.contributes;if(m){let S=m["dashboard.tabs"];if(S)return Array.isArray(S)?S:[S]}return[]}}function D(v,m,S){let h=new b(m);return T(S,h,v),f(S,h,v),!0}e.renderDashboardContributions=D;function T(v,m,S){let h=m.dashboardTabs();if(!h||!h.length)return!1;const a=(0,t.$)("details",{open:!0,ontoggle:v},(0,t.$)("summary",void 0,(0,y.localize)(0,null,h.length)),(0,t.$)("table",void 0,(0,t.$)("tr",void 0,(0,t.$)("th",void 0,(0,y.localize)(1,null)),(0,t.$)("th",void 0,(0,y.localize)(2,null)),(0,t.$)("th",void 0,(0,y.localize)(3,null))),...h.map(r=>(0,t.$)("tr",void 0,(0,t.$)("td",void 0,(0,t.$)("code",void 0,r.id)),(0,t.$)("td",void 0,r.title?r.title:r.id),(0,t.$)("td",void 0,r.description??"")))));return(0,t.append)(S,a),!0}function f(v,m,S){let h=m.dashboardInsights();if(!h||!h.length)return!1;const a=(0,t.$)("details",{open:!0,ontoggle:v},(0,t.$)("summary",void 0,(0,y.localize)(4,null,h.length)),(0,t.$)("table",void 0,(0,t.$)("tr",void 0,(0,t.$)("th",void 0,(0,y.localize)(5,null)),(0,t.$)("th",void 0,(0,y.localize)(6,null)),(0,t.$)("th",void 0,(0,y.localize)(7,null))),...h.map(r=>(0,t.$)("tr",void 0,(0,t.$)("td",void 0,(0,t.$)("code",void 0,r.id)),(0,t.$)("td",void 0,r.contrib.name?r.contrib.name:r.id),(0,t.$)("td",void 0,r.contrib.when??"")))));return(0,t.append)(S,a),!0}}),define(Q[2294],Y([1,0,305,59,7]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JobHistoryFilter=e.JobHistoryRenderer=e.JobHistoryDataSource=e.JobHistoryController=e.JobHistoryModel=e.JobHistoryRow=void 0;class D{constructor(){this.rowID=(0,y.generateUuid)()}}e.JobHistoryRow=D;class T{static{this.id=(0,y.generateUuid)()}}e.JobHistoryModel=T;class f extends t.DefaultController{onLeftClick(a,r,i,s="mouse"){return!0}set jobHistories(a){this._jobHistories=a}get jobHistories(){return this._jobHistories}onKeyDownWrapper(a,r){return r.code==="ArrowDown"||r.keyCode===40?(super.onDown(a,r),super.onEnter(a,r)):r.code==="ArrowUp"||r.keyCode===38?(super.onUp(a,r),super.onEnter(a,r)):r.code!=="Tab"&&r.keyCode!==2?(r.preventDefault(),r.stopPropagation(),!0):!1}}e.JobHistoryController=f;class v{getId(a,r){return r instanceof T?T.id:r.rowID}hasChildren(a,r){return r instanceof T}getChildren(a,r){return r instanceof T?Promise.resolve(this._data):Promise.resolve(void 0)}getParent(a,r){return r instanceof T?Promise.resolve(void 0):Promise.resolve(new T)}set data(a){this._data=a}getFirstElement(){return this._data[0]}}e.JobHistoryDataSource=v;class m{getHeight(a,r){return 30}getTemplateId(a,r){return r instanceof T?"jobHistoryModel":"jobHistoryInfo"}renderTemplate(a,r,i){let s=b.$(".list-row"),o=b.$(".label"),u=this.createStatusIcon();return s.appendChild(u),s.appendChild(o),i.appendChild(s),{statusIcon:u,label:o}}renderElement(a,r,i,s){s.label.innerHTML=r.runDate+" "+r.runStatus;let o;r.runStatus==="Succeeded"?o="status-icon job-passed":r.runStatus==="Failed"?o="status-icon job-failed":o="status-icon job-unknown",s.statusIcon.className=o}disposeTemplate(a,r,i){}createStatusIcon(){return b.$("div")}}e.JobHistoryRenderer=m;class S{isVisible(a,r){return this._isJobVisible()}_isJobVisible(){return!0}set filterString(a){}}e.JobHistoryFilter=S}),define(Q[1108],Y([1,0,7,305,59]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JobStepsViewFilter=e.JobStepsViewRenderer=e.JobStepsViewDataSource=e.JobStepsViewController=e.JobStepsViewModel=e.JobStepsViewRow=void 0;class D{constructor(){this.rowID=(0,b.generateUuid)()}}e.JobStepsViewRow=D;class T{static{this.id=(0,b.generateUuid)()}}e.JobStepsViewModel=T;class f extends y.DefaultController{onLeftClick(a,r,i,s="mouse"){return!0}onContextMenu(a,r,i){return!0}onKeyDownWrapper(a,r){return r.code==="ArrowDown"||r.keyCode===40?(super.onDown(a,r),super.onEnter(a,r)):r.code==="ArrowUp"||r.keyCode===38?(super.onUp(a,r),super.onEnter(a,r)):r.code!=="Tab"&&r.keyCode!==2?(r.preventDefault(),r.stopPropagation(),!0):!1}}e.JobStepsViewController=f;class v{getId(a,r){return r instanceof T?T.id:r.rowID}hasChildren(a,r){return r instanceof T}getChildren(a,r){return r instanceof T?Promise.resolve(this._data):Promise.resolve(void 0)}getParent(a,r){return r instanceof T?Promise.resolve(void 0):Promise.resolve(new T)}set data(a){this._data=a}}e.JobStepsViewDataSource=v;class m{getHeight(a,r){return 40}getTemplateId(a,r){return r instanceof T?"jobStepsViewModel":"jobStepsViewRow"}renderTemplate(a,r,i){let s=t.$(".list-row"),o=t.$(".label"),u=this.createStatusIcon();return s.appendChild(u),s.appendChild(o),i.appendChild(s),{statusIcon:u,label:o}}renderElement(a,r,i,s){let o=t.$("div");o.className="tree-id-col",o.innerText=r.stepId;let u=t.$("div");u.className="tree-name-col",u.innerText=r.stepName;let d=t.$("div");d.className="tree-message-col",d.innerText=r.message,r.rowID.indexOf("stepsColumn")!==-1&&(u.className+=" step-column-heading",o.className+=" step-column-heading",d.className+=" step-column-heading"),t.clearNode(s.label),s.label.appendChild(o),s.label.appendChild(u),s.label.appendChild(d),r.runStatus?r.runStatus==="Succeeded"?s.statusIcon.className="status-icon step-passed":r.runStatus==="Failed"?s.statusIcon.className="status-icon step-failed":s.statusIcon.className="status-icon step-unknown":s.statusIcon.className=""}disposeTemplate(a,r,i){}createStatusIcon(){return t.$("div")}}e.JobStepsViewRenderer=m;class S{isVisible(a,r){return this._isJobVisible()}_isJobVisible(){return!0}set filterString(a){}}e.JobStepsViewFilter=S}),define(Q[2295],Y([1,0,40,2119,17,136,15,7,4]),function(q,e,t,y,b,D,T,f,v){"use strict";var m;Object.defineProperty(e,"__esModule",{value:!0}),e.getResizesObserver=e.BrowserResizeObserver=e.PlotlyOutputComponent=void 0;let S=class extends D.AngularDisposable{static{m=this}static{this.SELECTOR="plotly-output"}constructor(){super(),this._initialized=!1,this._rendered=!1}set bundleOptions(i){this._bundleOptions=i,this._initialized&&this.renderPlotly()}get cellModel(){return this._cellModel}set cellModel(i){this._cellModel=i,this._initialized&&this.renderPlotly()}ngOnInit(){m.Plotly||(m.Plotly=new Promise((i,s)=>{q(["plotly.js-dist-min"],i,s)})),this._plotDiv=this.output.nativeElement,this._plotDiv.style.width="100%",this.renderPlotly(),this._initialized=!0,this._register(a(this._plotDiv,void 0,()=>{this.resize()})).startObserving()}renderPlotly(){if(this._rendered){this.layout();return}if(!this._bundleOptions||!this._cellModel||!this.mimeType||this.mimeType==="text/vnd.plotly.v1+html")return;this.errorText=void 0;const i=this.getFigure(!0);if(i){let s={responsive:!0};m.Plotly.then(o=>(this._plotly=o,o.newPlot(this._plotDiv,i.data,i.layout,s))).catch(o=>this.displayError(o))}this._rendered=!0}getFigure(i){const s=this._bundleOptions.data[this.mimeType];if(typeof s=="string")try{JSON.parse(s)}catch(d){i&&this.displayError(d)}const{data:o=[],layout:u={}}=s;return{data:o,layout:u}}displayError(i){this.errorText=(0,y.localize)(0,null,(0,T.getErrorMessage)(i))}layout(){}resize(){this._plotly.Plots.resize(this._plotDiv)}hasError(){return!b.isUndefinedOrNull(this.errorText)}};e.PlotlyOutputComponent=S,fe([(0,t.ViewChild)("output",{read:t.ElementRef})],S.prototype,"output",void 0),fe([(0,t.Input)()],S.prototype,"bundleOptions",null),fe([(0,t.Input)()],S.prototype,"mimeType",void 0),fe([(0,t.Input)()],S.prototype,"cellModel",null),e.PlotlyOutputComponent=S=m=fe([(0,t.Component)({selector:S.SELECTOR,template:`<div #output class="plotly-wrapper"></div> <pre *ngIf="hasError" class="p-Widget jp-RenderedText">{{errorText}}</pre> `})],S);class h extends v.Disposable{constructor(i,s,o){super(),this.referenceDomElement=i,this.width=-1,this.height=-1,this.observer=new ResizeObserver(u=>{for(const d of u)d.target===i&&d.contentRect&&(this.width!==d.contentRect.width||this.height!==d.contentRect.height)&&(this.width=d.contentRect.width,this.height=d.contentRect.height,f.scheduleAtNextAnimationFrame(()=>{o()}))})}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()}}e.BrowserResizeObserver=h;function a(r,i,s){return new h(r,i,s)}e.getResizesObserver=a}),define(Q[2296],Y([1,0,437,7,2154,184,4,14]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskHistoryRenderer=void 0;const v=y.$;class m{static{this.TASKOBJECT_HEIGHT=22}static{this.FAIL_CLASS="error"}static{this.SUCCESS_CLASS="success"}static{this.INPROGRESS_CLASS="in-progress"}static{this.NOTSTARTED_CLASS="not-started"}static{this.CANCELED_CLASS="canceled"}getHeight(h,a){return m.TASKOBJECT_HEIGHT}getTemplateId(h,a){return a.id}renderTemplate(h,a,r){const i=Object.create(null);return i.root=y.append(r,v(".task-group")),i.icon=y.append(i.root,v(".codicon.task-icon")),i.label=y.append(i.root,v(".label")),i.description=y.append(i.root,v(".description")),i.time=y.append(i.root,v(".time")),i.disposables=[],i}renderElement(h,a,r,i){let s;if(a){switch(i.icon.className="task-icon",a.status){case t.TaskStatus.SucceededWithWarning:case t.TaskStatus.Succeeded:i.icon.classList.add(m.SUCCESS_CLASS),s=(0,b.localize)(0,null);break;case t.TaskStatus.Failed:i.icon.classList.add(m.FAIL_CLASS),s=(0,b.localize)(1,null);break;case t.TaskStatus.InProgress:i.icon.classList.add(m.INPROGRESS_CLASS),s=(0,b.localize)(2,null);break;case t.TaskStatus.NotStarted:i.icon.classList.add(m.NOTSTARTED_CLASS),s=(0,b.localize)(3,null);break;case t.TaskStatus.Canceled:i.icon.classList.add(m.CANCELED_CLASS),s=(0,b.localize)(4,null);break;case t.TaskStatus.Canceling:i.icon.classList.add(m.INPROGRESS_CLASS),s=(0,b.localize)(5,null);break}i.icon.title=s,i.label.textContent=a.taskName+" "+s,i.label.title=i.label.textContent,i.label.setAttribute("role","alert");let o;a.targetLocation?o=a.targetLocation:(o=a.serverName,a.databaseName&&(o+=" | "+a.databaseName)),i.description.textContent=o??"",i.description.title=i.description.textContent,this.timer(a,i.time);const u=new f.IntervalTimer;u.cancelAndSet(()=>this.timer(a,i.time),1e3),i.disposables.push(u)}}timer(h,a){let r="";if(h.status===t.TaskStatus.Failed)r+=h.startTime+" Error: "+h.message;else if(h.startTime&&(r=h.startTime),h.endTime&&(r+=" - "+h.endTime),h.timer){let i=Math.floor(h.timer.elapsed()/1e3)*1e3;r+=" ("+D.parseNumAsTimeString(i)+")"}a.textContent=r,a.title=r}disposeTemplate(h,a,r){(0,T.dispose)(r.disposables)}}e.TaskHistoryRenderer=m}),define(Q[1109],Y([1,0,7]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TenantListRenderer=e.TenantPickerListRenderer=e.TenantListDelegate=void 0;class y{constructor(f){this._height=f}getHeight(f){return this._height}getTemplateId(f){return"tenantListRenderer"}}e.TenantListDelegate=y;class b{static{this.TEMPLATE_ID="tenantListRenderer"}get templateId(){return b.TEMPLATE_ID}renderTemplate(f){const v=Object.create(null);return v.root=t.append(f,t.$("div.list-row.tenant-picker-list")),v.label=t.append(v.root,t.$("div.label")),v.displayName=t.append(v.label,t.$("div.display-name")),v}renderElement(f,v,m){m.displayName.innerText=f.displayName.concat(" (",f.id,")")}disposeTemplate(f){}disposeElement(f,v,m){}}e.TenantPickerListRenderer=b;class D extends b{constructor(){super()}get templateId(){return b.TEMPLATE_ID}renderTemplate(f){const v=super.renderTemplate(f);return v.content=t.append(v.label,t.$("div.content")),v}renderElement(f,v,m){super.renderElement(f,v,m)}}e.TenantListRenderer=D}),define(Q[2297],Y([1,0,305]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileBrowserController=void 0;class y extends t.DefaultController{constructor(){super({clickBehavior:0,openMode:0})}onLeftClick(D,T,f,v="mouse"){if(f.detail===2){let m={origin:v,originalEvent:f};return D.getInput()===T?(D.clearFocus(m),D.clearSelection(m)):(f&&f.browserEvent&&f.browserEvent.type==="mousedown"||f.preventDefault(),f.stopPropagation(),D.domFocus(),D.setSelection([T],m)),!0}else return super.onLeftClick(D,T,f,v)}onEnter(D,T){let f={origin:"keyboard",originalEvent:T};if(D.getHighlight())return!1;let v=D.getFocus();return v&&D.setSelection([v],f),!0}}e.FileBrowserController=y}),define(Q[1110],Y([1,0,7,122,10]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.badgeRenderer=e.iconRenderer=void 0;class D{constructor(){this.iconRegistered=new Set}registerIcon(v){if(!v)return;const m=this.toThemedIconUri(v),S=this.getIconUid(m);return S&&!this.iconRegistered.has(S)&&((0,t.createCSSRule)(`.icon#${S}, .hc-light .icon#${S}`,`background-image: ${(0,t.asCSSUrl)(m.light||m.dark)};`),(0,t.createCSSRule)(`.vs-dark .icon#${S}, .hc-black .icon#${S}`,`background-image: ${(0,t.asCSSUrl)(m.dark)};`),(0,t.createCSSRule)(`.monaco-list:focus .monaco-list-rows > .monaco-list-row.selected .icon#${S}`,`background-image: ${(0,t.asCSSUrl)(m.dark)};`),this.iconRegistered.add(S)),S}getIconUid(v){if(!v)return;const m=this.toThemedIconUri(v);return`icon${(0,y.hash)(m.light.toString()+m.dark.toString())}`}toThemedIconUri(v){let m,S;return b.URI.isUri(v)||typeof v=="string"?m=S=v:(m=v.light,S=v.dark),{light:this.toUri(m),dark:this.toUri(S)}}toUri(v){return b.URI.isUri(v)?v:b.URI.file(v)}putIcon(v,m){let S=this.registerIcon(m);v.id=S??""}removeIcon(v){v&&(v.id="")}}e.iconRenderer=new D;class T{constructor(){this.serverConnected="serverConnected",this.serverDisconnected="serverDisconnected",this.newTag="newTag",this.badgeCreated=new Set,this.createBadge(this.serverConnected,this.getConnectionStatusBadge(!0)),this.createBadge(this.serverDisconnected,this.getConnectionStatusBadge(!1)),this.createBadge(this.newTag,this.getNewTagBadge())}getConnectionStatusBadge(v){return`position: absolute; height: 0.25rem; width: 0.25rem; top: 12px; left: 19px; border: 2.4px solid ${v?"rgba(59, 180, 74, 100%)":"rgba(208, 46, 0, 100%)"}; border-radius: 100%; background: ${v?"rgba(59, 180, 74, 100%)":"rgba(255, 255, 255, 80%)"}; content:""; font-size: 100%; line-height: 100%; color:white; text-align:center; vertical-align:middle;`.replace(/\t/g," ").replace(/\r?\n/g," ").replace(/ +/g," ")}getNewTagBadge(){return`position: absolute; height: 0.4rem; width: 0.4rem; top: 3px; left: 5px; border: 1px solid green; border-radius: 15%; background: green; content:"N"; font-size: 0.3rem; font-weight: bold; line-height: 0.4rem; color: white; text-align:center; vertical-align:middle;`.replace(/\t/g," ").replace(/\r?\n/g," ").replace(/ +/g," ")}createBadge(v,m){this.badgeCreated.has(v)||((0,t.createCSSRule)(`.${v}:after`,m),this.badgeCreated.add(v))}addBadge(v,m){v.innerHTML=(v.innerHTML||"")+`<div class="${m}" style="width: 0px; height: 0px;"><div>`}removeBadge(v,m){let h=v.children[0];for(;h;){let a=h.nextElementSibling;if(h.classList.contains(m)){h.remove();break}h=a}}}e.badgeRenderer=new T}),define(Q[240],Y([1,0,7,4,197]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyDragImage=e.DataTransfers=e.DelayedDragHandler=void 0;class D extends y.Disposable{constructor(v,m){super(),this._register((0,t.addDisposableListener)(v,"dragover",S=>{S.preventDefault(),this.timeout||(this.timeout=setTimeout(()=>{m(),this.timeout=null},800))})),["dragleave","drop","dragend"].forEach(S=>{this._register((0,t.addDisposableListener)(v,S,()=>{this.clearDragTimeout()}))})}clearDragTimeout(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){super.dispose(),this.clearDragTimeout()}}e.DelayedDragHandler=D,e.DataTransfers={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:b.Mimes.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"};function T(f,v,m,S,h){const a=document.createElement("div");a.className=m,a.textContent=v,h&&(a.style.color=h),S&&(a.style.background=S),f.dataTransfer&&(document.body.appendChild(a),f.dataTransfer.setDragImage(a,-10,-10),setTimeout(()=>document.body.removeChild(a),0))}e.applyDragImage=T}),define(Q[495],Y([1,0,7]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=e.renderFormattedText=e.renderText=void 0;function y(a,r={}){const i=D(r);return i.textContent=a,i}e.renderText=y;function b(a,r={}){const i=D(r);return v(i,m(a,!!r.renderCodeSegments),r.actionHandler,r.renderCodeSegments),i}e.renderFormattedText=b;function D(a){const r=a.inline?"span":"div",i=document.createElement(r);return a.className&&(i.className=a.className),i}e.createElement=D;class T{constructor(r){this.source=r,this.index=0}eos(){return this.index>=this.source.length}next(){const r=this.peek();return this.advance(),r}peek(){return this.source[this.index]}advance(){this.index++}}var f;(function(a){a[a.Invalid=0]="Invalid",a[a.Root=1]="Root",a[a.Text=2]="Text",a[a.Bold=3]="Bold",a[a.Italics=4]="Italics",a[a.Action=5]="Action",a[a.ActionClose=6]="ActionClose",a[a.Code=7]="Code",a[a.NewLine=8]="NewLine"})(f||(f={}));function v(a,r,i,s){let o;if(r.type===2)o=document.createTextNode(r.content||"");else if(r.type===3)o=document.createElement("b");else if(r.type===4)o=document.createElement("i");else if(r.type===7&&s)o=document.createElement("code");else if(r.type===5&&i){const u=document.createElement("a");i.disposables.add(t.addStandardDisposableListener(u,"click",d=>{i.callback(String(r.index),d)})),o=u}else r.type===8?o=document.createElement("br"):r.type===1&&(o=a);o&&a!==o&&a.appendChild(o),o&&Array.isArray(r.children)&&r.children.forEach(u=>{v(o,u,i,s)})}function m(a,r){const i={type:1,children:[]};let s=0,o=i;const u=[],d=new T(a);for(;!d.eos();){let p=d.next();const c=p==="\\"&&h(d.peek(),r)!==0;if(c&&(p=d.next()),!c&&S(p,r)&&p===d.peek()){d.advance(),o.type===2&&(o=u.pop());const l=h(p,r);if(o.type===l||o.type===5&&l===6)o=u.pop();else{const n={type:l,children:[]};l===5&&(n.index=s,s++),o.children.push(n),u.push(o),o=n}}else if(p===` `)o.type===2&&(o=u.pop()),o.children.push({type:8});else if(o.type!==2){const l={type:2,content:p};o.children.push(l),u.push(o),o=l}else o.content+=p}return o.type===2&&(o=u.pop()),u.length,i}function S(a,r){return h(a,r)!==0}function h(a,r){switch(a){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return r?7:0;default:return 0}}}),define(Q[574],Y([1,0,7,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalPointerMoveMonitor=void 0;class b{constructor(){this._hooks=new y.DisposableStore,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(T,f){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const v=this._onStopCallback;this._onStopCallback=null,T&&v&&v(f)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(T,f,v,m,S){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=m,this._onStopCallback=S;let h=T;try{T.setPointerCapture(f),this._hooks.add((0,y.toDisposable)(()=>{try{T.releasePointerCapture(f)}catch{}}))}catch{h=window}this._hooks.add(t.addDisposableListener(h,t.EventType.POINTER_MOVE,a=>{if(a.buttons!==v){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(t.addDisposableListener(h,t.EventType.POINTER_UP,a=>this.stopMonitoring(!0)))}}e.GlobalPointerMoveMonitor=b}),define(Q[151],Y([1,0,7,20,102,4,204]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Gesture=e.EventType=void 0;var f;(function(m){m.Tap="-monaco-gesturetap",m.Change="-monaco-gesturechange",m.Start="-monaco-gesturestart",m.End="-monaco-gesturesend",m.Contextmenu="-monaco-gesturecontextmenu"})(f||(e.EventType=f={}));class v extends D.Disposable{static{this.SCROLL_FRICTION=-.005}static{this.HOLD_DELAY=700}static{this.CLEAR_TAP_COUNT_TIME=400}constructor(){super(),this.dispatched=!1,this.targets=new T.LinkedList,this.ignoreTargets=new T.LinkedList,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(t.addDisposableListener(document,"touchstart",S=>this.onTouchStart(S),{passive:!1})),this._register(t.addDisposableListener(document,"touchend",S=>this.onTouchEnd(S))),this._register(t.addDisposableListener(document,"touchmove",S=>this.onTouchMove(S),{passive:!1}))}static addTarget(S){if(!v.isTouchDevice())return D.Disposable.None;v.INSTANCE||(v.INSTANCE=new v);const h=v.INSTANCE.targets.push(S);return(0,D.toDisposable)(h)}static ignoreTarget(S){if(!v.isTouchDevice())return D.Disposable.None;v.INSTANCE||(v.INSTANCE=new v);const h=v.INSTANCE.ignoreTargets.push(S);return(0,D.toDisposable)(h)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(S){const h=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let a=0,r=S.targetTouches.length;a<r;a++){const i=S.targetTouches.item(a);this.activeTouches[i.identifier]={id:i.identifier,initialTarget:i.target,initialTimeStamp:h,initialPageX:i.pageX,initialPageY:i.pageY,rollingTimestamps:[h],rollingPageX:[i.pageX],rollingPageY:[i.pageY]};const s=this.newGestureEvent(f.Start,i.target);s.pageX=i.pageX,s.pageY=i.pageY,this.dispatchEvent(s)}this.dispatched&&(S.preventDefault(),S.stopPropagation(),this.dispatched=!1)}onTouchEnd(S){const h=Date.now(),a=Object.keys(this.activeTouches).length;for(let r=0,i=S.changedTouches.length;r<i;r++){const s=S.changedTouches.item(r);if(!this.activeTouches.hasOwnProperty(String(s.identifier))){console.warn("move of an UNKNOWN touch",s);continue}const o=this.activeTouches[s.identifier],u=Date.now()-o.initialTimeStamp;if(u<v.HOLD_DELAY&&Math.abs(o.initialPageX-y.tail(o.rollingPageX))<30&&Math.abs(o.initialPageY-y.tail(o.rollingPageY))<30){const d=this.newGestureEvent(f.Tap,o.initialTarget);d.pageX=y.tail(o.rollingPageX),d.pageY=y.tail(o.rollingPageY),this.dispatchEvent(d)}else if(u>=v.HOLD_DELAY&&Math.abs(o.initialPageX-y.tail(o.rollingPageX))<30&&Math.abs(o.initialPageY-y.tail(o.rollingPageY))<30){const d=this.newGestureEvent(f.Contextmenu,o.initialTarget);d.pageX=y.tail(o.rollingPageX),d.pageY=y.tail(o.rollingPageY),this.dispatchEvent(d)}else if(a===1){const d=y.tail(o.rollingPageX),p=y.tail(o.rollingPageY),c=y.tail(o.rollingTimestamps)-o.rollingTimestamps[0],l=d-o.rollingPageX[0],n=p-o.rollingPageY[0],g=[...this.targets].filter(w=>o.initialTarget instanceof Node&&w.contains(o.initialTarget));this.inertia(g,h,Math.abs(l)/c,l>0?1:-1,d,Math.abs(n)/c,n>0?1:-1,p)}this.dispatchEvent(this.newGestureEvent(f.End,o.initialTarget)),delete this.activeTouches[s.identifier]}this.dispatched&&(S.preventDefault(),S.stopPropagation(),this.dispatched=!1)}newGestureEvent(S,h){const a=document.createEvent("CustomEvent");return a.initEvent(S,!1,!0),a.initialTarget=h,a.tapCount=0,a}dispatchEvent(S){if(S.type===f.Tap){const h=new Date().getTime();let a=0;h-this._lastSetTapCountTime>v.CLEAR_TAP_COUNT_TIME?a=1:a=2,this._lastSetTapCountTime=h,S.tapCount=a}else(S.type===f.Change||S.type===f.Contextmenu)&&(this._lastSetTapCountTime=0);if(S.initialTarget instanceof Node){for(const h of this.ignoreTargets)if(h.contains(S.initialTarget))return;for(const h of this.targets)h.contains(S.initialTarget)&&(h.dispatchEvent(S),this.dispatched=!0)}}inertia(S,h,a,r,i,s,o,u){this.handle=t.scheduleAtNextAnimationFrame(()=>{const d=Date.now(),p=d-h;let c=0,l=0,n=!0;a+=v.SCROLL_FRICTION*p,s+=v.SCROLL_FRICTION*p,a>0&&(n=!1,c=r*a*p),s>0&&(n=!1,l=o*s*p);const g=this.newGestureEvent(f.Change);g.translationX=c,g.translationY=l,S.forEach(w=>w.dispatchEvent(g)),n||this.inertia(S,d,a,r,i+c,s,o,u+l)})}onTouchMove(S){const h=Date.now();for(let a=0,r=S.changedTouches.length;a<r;a++){const i=S.changedTouches.item(a);if(!this.activeTouches.hasOwnProperty(String(i.identifier))){console.warn("end of an UNKNOWN touch",i);continue}const s=this.activeTouches[i.identifier],o=this.newGestureEvent(f.Change,s.initialTarget);o.translationX=i.pageX-y.tail(s.rollingPageX),o.translationY=i.pageY-y.tail(s.rollingPageY),o.pageX=i.pageX,o.pageY=i.pageY,this.dispatchEvent(o),s.rollingPageX.length>3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(i.pageX),s.rollingPageY.push(i.pageY),s.rollingTimestamps.push(h)}this.dispatched&&(S.preventDefault(),S.stopPropagation(),this.dispatched=!1)}}e.Gesture=v,fe([b.memoize],v,"isTouchDevice",null)}),define(Q[87],Y([1,0,7,1673]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.status=e.alert=e.setARIAContainer=void 0;const y=2e4;let b,D,T,f,v;function m(r){b=document.createElement("div"),b.className="monaco-aria-container";const i=()=>{const o=document.createElement("div");return o.className="monaco-alert",o.setAttribute("role","alert"),o.setAttribute("aria-atomic","true"),b.appendChild(o),o};D=i(),T=i();const s=()=>{const o=document.createElement("div");return o.className="monaco-status",o.setAttribute("aria-live","polite"),o.setAttribute("aria-atomic","true"),b.appendChild(o),o};f=s(),v=s(),r.appendChild(b)}e.setARIAContainer=m;function S(r){b&&(D.textContent!==r?(t.clearNode(T),a(D,r)):(t.clearNode(D),a(T,r)))}e.alert=S;function h(r){b&&(f.textContent!==r?(t.clearNode(v),a(f,r)):(t.clearNode(f),a(v,r)))}e.status=h;function a(r,i){t.clearNode(r),i.length>y&&(i=i.substr(0,y)),r.textContent=i,r.style.visibility="hidden",r.style.visibility="visible"}}),define(Q[575],Y([1,0,1921,87,4,7,42,1556]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoadingSpinner=void 0;const f=t.localize(0,null),v=t.localize(1,null),m={showText:!1,fullSize:!1};class S extends b.Disposable{constructor(a,r){super(),this._container=a,this._loading=!1,this._options=(0,T.mixin)(r||{},m,!1),this._loadingSpinner=D.$(`.loading-spinner-component-container${this._options.fullSize?".full-size":""}`),this._loadingSpinner.appendChild(D.$(".loading-spinner.codicon.in-progress")),this._options.showText&&(this._loadingSpinnerText=this._loadingSpinner.appendChild(D.$("")))}get loadingMessage(){return this._loadingMessage??f}set loadingMessage(a){this._loadingMessage=a}get loadingCompletedMessage(){return this._loadingCompletedMessage??v}set loadingCompletedMessage(a){this._loadingCompletedMessage=a}get loading(){return this._loading}set loading(a){if(a!==this._loading){this._loading=a;const r=this._loading?this.loadingMessage:this.loadingCompletedMessage;(0,y.status)(r),this._loading?this._container.appendChild(this._loadingSpinner):this._container.removeChild(this._loadingSpinner),this._options.showText&&(this._loadingSpinnerText.innerText=r)}}}e.LoadingSpinner=S}),define(Q[1111],Y([1,0,40,1922,87,1555]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const D=y.localize(0,null),T=y.localize(1,null);let f=class{ngOnChanges(m){if(m.loading!==void 0){const S=this.loading?this._loadingMessage:this._loadingCompletedMessage;(0,b.status)(S)}}get _loadingMessage(){return this.loadingMessage?this.loadingMessage:D}get _loadingCompletedMessage(){return this.loadingCompletedMessage?this.loadingCompletedMessage:T}};fe([(0,t.Input)()],f.prototype,"loading",void 0),fe([(0,t.Input)()],f.prototype,"loadingMessage",void 0),fe([(0,t.Input)()],f.prototype,"loadingCompletedMessage",void 0),f=fe([(0,t.Component)({selector:"loading-spinner",template:` <div class="loading-spinner-container"> <div class="loading-spinner codicon in-progress" *ngIf="loading" [title]="_loadingMessage" #spinnerElement></div> </div> `})],f),e.default=f}),define(Q[1112],Y([1,0,40,341,1111]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoadingSpinnerModule=void 0;let D=class{};e.LoadingSpinnerModule=D,e.LoadingSpinnerModule=D=fe([(0,t.NgModule)({imports:[y.CommonModule],exports:[b.default],declarations:[b.default]})],D)}),define(Q[821],Y([1,0,324,7,4,18,557,1678]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextView=e.layout=e.LayoutAnchorMode=e.LayoutAnchorPosition=e.AnchorAxisAlignment=e.AnchorPosition=e.AnchorAlignment=e.isAnchor=e.ContextViewDOMPosition=void 0;var f;(function(u){u[u.ABSOLUTE=1]="ABSOLUTE",u[u.FIXED=2]="FIXED",u[u.FIXED_SHADOW=3]="FIXED_SHADOW"})(f||(e.ContextViewDOMPosition=f={}));function v(u){const d=u;return!!d&&typeof d.x=="number"&&typeof d.y=="number"}e.isAnchor=v;var m;(function(u){u[u.LEFT=0]="LEFT",u[u.RIGHT=1]="RIGHT"})(m||(e.AnchorAlignment=m={}));var S;(function(u){u[u.BELOW=0]="BELOW",u[u.ABOVE=1]="ABOVE"})(S||(e.AnchorPosition=S={}));var h;(function(u){u[u.VERTICAL=0]="VERTICAL",u[u.HORIZONTAL=1]="HORIZONTAL"})(h||(e.AnchorAxisAlignment=h={}));var a;(function(u){u[u.Before=0]="Before",u[u.After=1]="After"})(a||(e.LayoutAnchorPosition=a={}));var r;(function(u){u[u.AVOID=0]="AVOID",u[u.ALIGN=1]="ALIGN"})(r||(e.LayoutAnchorMode=r={}));function i(u,d,p){const c=p.mode===r.ALIGN?p.offset:p.offset+p.size,l=p.mode===r.ALIGN?p.offset+p.size:p.offset;return p.position===0?d<=u-c?c:d<=l?l-d:Math.max(u-d,0):d<=l?l-d:d<=u-c?c:0}e.layout=i;class s extends b.Disposable{static{this.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"]}static{this.BUBBLE_DOWN_EVENTS=["click"]}constructor(d,p){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=b.Disposable.None,this.toDisposeOnSetContainer=b.Disposable.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=y.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,y.hide(this.view),this.setContainer(d,p),this._register((0,b.toDisposable)(()=>this.setContainer(null,1)))}setContainer(d,p){if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,this.shadowRootHostElement?.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),d){if(this.container=d,this.useFixedPosition=p!==1,this.useShadowDOM=p===3,this.useShadowDOM){this.shadowRootHostElement=y.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const l=document.createElement("style");l.textContent=o,this.shadowRoot.appendChild(l),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(y.$("slot"))}else this.container.appendChild(this.view);const c=new b.DisposableStore;s.BUBBLE_UP_EVENTS.forEach(l=>{c.add(y.addStandardDisposableListener(this.container,l,n=>{this.onDOMEvent(n,!1)}))}),s.BUBBLE_DOWN_EVENTS.forEach(l=>{c.add(y.addStandardDisposableListener(this.container,l,n=>{this.onDOMEvent(n,!0)},!0))}),this.toDisposeOnSetContainer=c}}show(d){this.isVisible()&&this.hide(),y.clearNode(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",y.show(this.view),this.toDisposeOnClean=d.render(this.view)||b.Disposable.None,this.delegate=d,this.doLayout(),this.delegate.focus?.()}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(D.isIOS&&t.BrowserFeatures.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;const d=this.delegate.getAnchor();let p;if(y.isHTMLElement(d)){const _=y.getDomNodePagePosition(d),A=y.getDomNodeZoomLevel(d);p={top:_.top*A,left:_.left*A,width:_.width*A,height:_.height*A}}else v(d)?p={top:d.y,left:d.x,width:d.width||1,height:d.height||2}:p={top:d.posy,left:d.posx,width:2,height:2};const c=y.getTotalWidth(this.view),l=y.getTotalHeight(this.view),n=this.delegate.anchorPosition||0,g=this.delegate.anchorAlignment||0,w=this.delegate.anchorAxisAlignment||0;let E,C;if(w===0){const _={offset:p.top-window.pageYOffset,size:p.height,position:n===0?0:1},A={offset:p.left,size:p.width,position:g===0?0:1,mode:r.ALIGN};E=i(window.innerHeight,l,_)+window.pageYOffset,T.Range.intersects({start:E,end:E+l},{start:_.offset,end:_.offset+_.size})&&(A.mode=r.AVOID),C=i(window.innerWidth,c,A)}else{const _={offset:p.left,size:p.width,position:g===0?0:1},A={offset:p.top,size:p.height,position:n===0?0:1,mode:r.ALIGN};C=i(window.innerWidth,c,_),T.Range.intersects({start:C,end:C+c},{start:_.offset,end:_.offset+_.size})&&(A.mode=r.AVOID),E=i(window.innerHeight,l,A)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(n===0?"bottom":"top"),this.view.classList.add(g===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const I=y.getDomNodePagePosition(this.container);this.view.style.top=`${E-(this.useFixedPosition?y.getDomNodePagePosition(this.view).top:I.top)}px`,this.view.style.left=`${C-(this.useFixedPosition?y.getDomNodePagePosition(this.view).left:I.left)}px`,this.view.style.width="initial"}hide(d){const p=this.delegate;this.delegate=null,p?.onHide&&p.onHide(d),this.toDisposeOnClean.dispose(),y.hide(this.view)}isVisible(){return!!this.delegate}onDOMEvent(d,p){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(d,document.activeElement):p&&!y.isAncestor(d.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}e.ContextView=s;const o=` :host { all: initial; /* 1st rule so subsequent properties are reset. */ } .codicon[class*='codicon-'] { font: normal normal normal 16px/1 codicon; display: inline-block; text-decoration: none; text-rendering: auto; text-align: center; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; user-select: none; -webkit-user-select: none; -ms-user-select: none; } :host { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif; } :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; } :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; } :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; } :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; } :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; } :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; } :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; } :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; } :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; } :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; } :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; } :host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; } :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; } :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; } :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; } `}),define(Q[369],Y([1,0,7,33,1679]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CountBadge=e.unthemedCountStyles=void 0,e.unthemedCountStyles={badgeBackground:"#4D4D4D",badgeForeground:"#FFFFFF",badgeBorder:void 0};class b{constructor(T,f,v){this.options=f,this.styles=v,this.count=0,this.element=(0,t.append)(T,(0,t.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(T){this.count=T,this.render()}setCountFormat(T){this.countFormat=T,this.render()}setTitleFormat(T){this.titleFormat=T,this.render()}render(){this.element.textContent=(0,y.format)(this.countFormat,this.count),this.element.title=(0,y.format)(this.titleFormat,this.count),this.element.style.backgroundColor=this.styles.badgeBackground??"",this.element.style.color=this.styles.badgeForeground??"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}e.CountBadge=b}),define(Q[822],Y([1,0,7,67,151,34,6,1054]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenu=e.BaseDropdown=void 0;class f extends D.ActionRunner{constructor(S,h){super(),this._onDidChangeVisibility=this._register(new T.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,t.append)(S,(0,t.$)(".monaco-dropdown")),this._label=(0,t.append)(this._element,(0,t.$)(".dropdown-label"));let a=h.labelRenderer;a||(a=i=>(i.textContent=h.label||"",null));for(const i of[t.EventType.CLICK,t.EventType.MOUSE_DOWN,b.EventType.Tap])this._register((0,t.addDisposableListener)(this.element,i,s=>t.EventHelper.stop(s,!0)));for(const i of[t.EventType.MOUSE_DOWN,b.EventType.Tap])this._register((0,t.addDisposableListener)(this._label,i,s=>{s instanceof MouseEvent&&(s.detail>1||s.button!==0)||(this.visible?this.hide():this.show())}));this._register((0,t.addDisposableListener)(this._label,t.EventType.KEY_UP,i=>{const s=new y.StandardKeyboardEvent(i);(s.equals(3)||s.equals(10))&&(t.EventHelper.stop(i,!0),this.visible?this.hide():this.show())}));const r=a(this._label);r&&this._register(r),this._register(b.Gesture.addTarget(this._label))}get element(){return this._element}get label(){return this._label}set tooltip(S){this._label&&(this._label.title=S)}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(S,h){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)}}e.BaseDropdown=f;class v extends f{constructor(S,h){super(S,h),this._options=h,this._actions=[],this.actions=h.actions||[]}set menuOptions(S){this._menuOptions=S}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(S){this._actions=S}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(S,h)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(S,h):void 0,getKeyBinding:S=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(S):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}e.DropdownMenu=v}),define(Q[169],Y([1,0,7,37]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderIcon=e.renderLabelWithIcons=void 0;const b=new RegExp(`(\\\\)?\\$\\((${y.ThemeIcon.iconNameExpression}(?:${y.ThemeIcon.iconModifierExpression})?)\\)`,"g");function D(f){const v=new Array;let m,S=0,h=0;for(;(m=b.exec(f))!==null;){h=m.index||0,S<h&&v.push(f.substring(S,h)),S=(m.index||0)+m[0].length;const[,a,r]=m;v.push(a?`$(${r})`:T({id:r}))}return S<f.length&&v.push(f.substring(S)),v}e.renderLabelWithIcons=D;function T(f){const v=t.$("span");return v.classList.add(...y.ThemeIcon.asClassNameArray(f)),v}e.renderIcon=T}),define(Q[444],Y([1,0,7,169,42]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HighlightedLabel=void 0;class D{constructor(f,v){this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=v?.supportIcons??!1,this.domNode=t.append(f,t.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(f,v=[],m="",S){f||(f=""),S&&(f=D.escapeNewLines(f,v)),!(this.didEverRender&&this.text===f&&this.title===m&&b.equals(this.highlights,v))&&(this.text=f,this.title=m,this.highlights=v,this.render())}render(){const f=[];let v=0;for(const m of this.highlights){if(m.end===m.start)continue;if(v<m.start){const a=this.text.substring(v,m.start);this.supportIcons?f.push(...(0,y.renderLabelWithIcons)(a)):f.push(a),v=m.start}const S=this.text.substring(v,m.end),h=t.$("span.highlight",void 0,...this.supportIcons?(0,y.renderLabelWithIcons)(S):[S]);m.extraClasses&&h.classList.add(...m.extraClasses),f.push(h),v=m.end}if(v<this.text.length){const m=this.text.substring(v);this.supportIcons?f.push(...(0,y.renderLabelWithIcons)(m)):f.push(m)}t.reset(this.domNode,...f),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(f,v){let m=0,S=0;return f.replace(/\r\n|\r|\n/g,(h,a)=>{S=h===`\r `?-1:0,a+=m;for(const r of v)r.end<=a||(r.start>=a&&(r.start+=S),r.end>=a&&(r.end+=S));return m+=S,"\u23CE"})}}e.HighlightedLabel=D}),define(Q[576],Y([1,0,7,169]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleIconLabel=void 0;class b{constructor(T){this._container=T}set text(T){(0,t.reset)(this._container,...(0,y.renderLabelWithIcons)(T??""))}set title(T){this._container.title=T}}e.SimpleIconLabel=b}),define(Q[400],Y([1,0,7,443,42,2265,1684]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingLabel=e.unthemedKeybindingLabelOptions=void 0;const T=t.$;e.unthemedKeybindingLabelOptions={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class f{constructor(m,S,h){this.os=S,this.keyElements=new Set,this.options=h||Object.create(null);const a=this.options.keybindingLabelForeground;this.domNode=t.append(m,T(".monaco-keybinding")),a&&(this.domNode.style.color=a),this.didEverRender=!1,m.appendChild(this.domNode)}get element(){return this.domNode}set(m,S){this.didEverRender&&this.keybinding===m&&f.areSame(this.matches,S)||(this.keybinding=m,this.matches=S,this.render())}render(){if(this.clear(),this.keybinding){const m=this.keybinding.getChords();m[0]&&this.renderChord(this.domNode,m[0],this.matches?this.matches.firstPart:null);for(let h=1;h<m.length;h++)t.append(this.domNode,T("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderChord(this.domNode,m[h],this.matches?this.matches.chordPart:null);const S=this.options.disableTitle??!1?void 0:this.keybinding.getAriaLabel()||void 0;S!==void 0?this.domNode.title=S:this.domNode.removeAttribute("title")}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.didEverRender=!0}clear(){t.clearNode(this.domNode),this.keyElements.clear()}renderChord(m,S,h){const a=y.UILabelProvider.modifierLabels[this.os];S.ctrlKey&&this.renderKey(m,a.ctrlKey,!!h?.ctrlKey,a.separator),S.shiftKey&&this.renderKey(m,a.shiftKey,!!h?.shiftKey,a.separator),S.altKey&&this.renderKey(m,a.altKey,!!h?.altKey,a.separator),S.metaKey&&this.renderKey(m,a.metaKey,!!h?.metaKey,a.separator);const r=S.keyLabel;r&&this.renderKey(m,r,!!h?.keyCode,"")}renderKey(m,S,h,a){t.append(m,this.createKeyElement(S,h?".highlight":"")),a&&t.append(m,T("span.monaco-keybinding-key-separator",void 0,a))}renderUnbound(m){t.append(m,this.createKeyElement((0,D.localize)(0,null)))}createKeyElement(m,S=""){const h=T("span.monaco-keybinding-key"+S,void 0,m);return this.keyElements.add(h),this.options.keybindingLabelBackground&&(h.style.backgroundColor=this.options.keybindingLabelBackground),this.options.keybindingLabelBorder&&(h.style.borderColor=this.options.keybindingLabelBorder),this.options.keybindingLabelBottomBorder&&(h.style.borderBottomColor=this.options.keybindingLabelBottomBorder),this.options.keybindingLabelShadow&&(h.style.boxShadow=`inset 0 -1px 0 ${this.options.keybindingLabelShadow}`),h}static areSame(m,S){return m===S||!m&&!S?!0:!!m&&!!S&&(0,b.equals)(m.firstPart,S.firstPart)&&(0,b.equals)(m.chordPart,S.chordPart)}}e.KeybindingLabel=f}),define(Q[2298],Y([1,0,7]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RowCache=void 0;function y(D){try{D.parentElement?.removeChild(D)}catch{}}class b{constructor(T){this.renderers=T,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(T){let f=this.getTemplateCache(T).pop(),v=!1;if(f)v=this.transactionNodesPendingRemoval.has(f.domNode),v&&this.transactionNodesPendingRemoval.delete(f.domNode);else{const m=(0,t.$)(".monaco-list-row"),h=this.getRenderer(T).renderTemplate(m);f={domNode:m,templateId:T,templateData:h}}return{row:f,isReusingConnectedDomNode:v}}release(T){T&&this.releaseRow(T)}transact(T){if(this.inTransaction)throw new Error("Already in transaction");this.inTransaction=!0;try{T()}finally{for(const f of this.transactionNodesPendingRemoval)this.doRemoveNode(f);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(T){const{domNode:f,templateId:v}=T;f&&(this.inTransaction?this.transactionNodesPendingRemoval.add(f):this.doRemoveNode(f)),this.getTemplateCache(v).push(T)}doRemoveNode(T){T.classList.remove("scrolling"),y(T)}getTemplateCache(T){let f=this.cache.get(T);return f||(f=[],this.cache.set(T,f)),f}dispose(){this.cache.forEach((T,f)=>{for(const v of T)this.getRenderer(f).disposeTemplate(v.templateData),v.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(T){const f=this.renderers.get(T);if(!f)throw new Error(`No renderer found for ${T}`);return f}}e.RowCache=b}),define(Q[342],Y([1,0,7,14,4,17,1687]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressBar=e.unthemedProgressBarOptions=void 0;const T="done",f="active",v="infinite",m="infinite-long-running",S="discrete";e.unthemedProgressBarOptions={progressBarBackground:void 0};class h extends b.Disposable{static{this.LONG_RUNNING_INFINITE_THRESHOLD=1e4}constructor(r,i){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new y.RunOnceScheduler(()=>(0,t.show)(this.element),0)),this.longRunningScheduler=this._register(new y.RunOnceScheduler(()=>this.infiniteLongRunning(),h.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(r,i)}create(r,i){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),r.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=i?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(f,v,m,S),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}done(){return this.doDone(!0)}stop(){return this.doDone(!1)}doDone(r){return this.element.classList.add(T),this.element.classList.contains(v)?(this.bit.style.opacity="0",r?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",r?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(S,T,m),this.element.classList.add(f,v),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(m)}total(r){return this.workedVal=0,this.totalWork=r,this.element.setAttribute("aria-valuemax",r.toString()),this}hasTotal(){return(0,D.isNumber)(this.totalWork)}worked(r){return r=Math.max(1,Number(r)),this.doSetWorked(this.workedVal+r)}setWorked(r){return r=Math.max(1,Number(r)),this.doSetWorked(r)}doSetWorked(r){const i=this.totalWork||100;return this.workedVal=r,this.workedVal=Math.min(i,this.workedVal),this.element.classList.remove(v,m,T),this.element.classList.add(f,S),this.element.setAttribute("aria-valuenow",r.toString()),this.bit.style.width=100*(this.workedVal/i)+"%",this}getContainer(){return this.element}show(r){this.showDelayedScheduler.cancel(),typeof r=="number"?this.showDelayedScheduler.schedule(r):(0,t.show)(this.element)}hide(){(0,t.hide)(this.element),this.showDelayedScheduler.cancel()}}e.ProgressBar=h}),define(Q[229],Y([1,0,7,227,151,14,102,6,4,18,1688]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sash=e.setGlobalHoverDelay=e.setGlobalSashSize=e.SashState=e.Orientation=e.OrthogonalEdge=void 0;const S=!1;var h;(function(E){E.North="north",E.South="south",E.East="east",E.West="west"})(h||(e.OrthogonalEdge=h={}));var a;(function(E){E[E.VERTICAL=0]="VERTICAL",E[E.HORIZONTAL=1]="HORIZONTAL"})(a||(e.Orientation=a={}));var r;(function(E){E[E.Disabled=0]="Disabled",E[E.AtMinimum=1]="AtMinimum",E[E.AtMaximum=2]="AtMaximum",E[E.Enabled=3]="Enabled"})(r||(e.SashState=r={}));let i=4;const s=new f.Emitter;function o(E){i=E,s.fire(E)}e.setGlobalSashSize=o;let u=300;const d=new f.Emitter;function p(E){u=E,d.fire(E)}e.setGlobalHoverDelay=p;class c{constructor(){this.disposables=new v.DisposableStore}get onPointerMove(){return this.disposables.add(new y.DomEmitter(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new y.DomEmitter(window,"mouseup")).event}dispose(){this.disposables.dispose()}}fe([T.memoize],c.prototype,"onPointerMove",null),fe([T.memoize],c.prototype,"onPointerUp",null);class l{get onPointerMove(){return this.disposables.add(new y.DomEmitter(this.el,b.EventType.Change)).event}get onPointerUp(){return this.disposables.add(new y.DomEmitter(this.el,b.EventType.End)).event}constructor(C){this.el=C,this.disposables=new v.DisposableStore}dispose(){this.disposables.dispose()}}fe([T.memoize],l.prototype,"onPointerMove",null),fe([T.memoize],l.prototype,"onPointerUp",null);class n{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(C){this.factory=C}dispose(){}}fe([T.memoize],n.prototype,"onPointerMove",null),fe([T.memoize],n.prototype,"onPointerUp",null);const g="pointer-events-disabled";class w extends v.Disposable{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(C){this._state!==C&&(this.el.classList.toggle("disabled",C===0),this.el.classList.toggle("minimum",C===1),this.el.classList.toggle("maximum",C===2),this._state=C,this.onDidEnablementChange.fire(C))}set orthogonalStartSash(C){if(this._orthogonalStartSash!==C){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),C){const I=_=>{this.orthogonalStartDragHandleDisposables.clear(),_!==0&&(this._orthogonalStartDragHandle=(0,t.append)(this.el,(0,t.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,v.toDisposable)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new y.DomEmitter(this._orthogonalStartDragHandle,"mouseenter")).event(()=>w.onMouseEnter(C),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new y.DomEmitter(this._orthogonalStartDragHandle,"mouseleave")).event(()=>w.onMouseLeave(C),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(C.onDidEnablementChange.event(I,this)),I(C.state)}this._orthogonalStartSash=C}}set orthogonalEndSash(C){if(this._orthogonalEndSash!==C){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),C){const I=_=>{this.orthogonalEndDragHandleDisposables.clear(),_!==0&&(this._orthogonalEndDragHandle=(0,t.append)(this.el,(0,t.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,v.toDisposable)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new y.DomEmitter(this._orthogonalEndDragHandle,"mouseenter")).event(()=>w.onMouseEnter(C),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new y.DomEmitter(this._orthogonalEndDragHandle,"mouseleave")).event(()=>w.onMouseLeave(C),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(C.onDidEnablementChange.event(I,this)),I(C.state)}this._orthogonalEndSash=C}}constructor(C,I,_){super(),this.hoverDelay=u,this.hoverDelayer=this._register(new D.Delayer(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new f.Emitter),this._onDidStart=this._register(new f.Emitter),this._onDidChange=this._register(new f.Emitter),this._onDidReset=this._register(new f.Emitter),this._onDidEnd=this._register(new f.Emitter),this.orthogonalStartSashDisposables=this._register(new v.DisposableStore),this.orthogonalStartDragHandleDisposables=this._register(new v.DisposableStore),this.orthogonalEndSashDisposables=this._register(new v.DisposableStore),this.orthogonalEndDragHandleDisposables=this._register(new v.DisposableStore),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=(0,t.append)(C,(0,t.$)(".monaco-sash")),_.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${_.orthogonalEdge}`),m.isMacintosh&&this.el.classList.add("mac");const A=this._register(new y.DomEmitter(this.el,"mousedown")).event;this._register(A(x=>this.onPointerStart(x,new c),this));const k=this._register(new y.DomEmitter(this.el,"dblclick")).event;this._register(k(this.onPointerDoublePress,this));const L=this._register(new y.DomEmitter(this.el,"mouseenter")).event;this._register(L(()=>w.onMouseEnter(this)));const R=this._register(new y.DomEmitter(this.el,"mouseleave")).event;this._register(R(()=>w.onMouseLeave(this))),this._register(b.Gesture.addTarget(this.el));const M=this._register(new y.DomEmitter(this.el,b.EventType.Start)).event;this._register(M(x=>this.onPointerStart(x,new l(this.el)),this));const N=this._register(new y.DomEmitter(this.el,b.EventType.Tap)).event;let P;this._register(N(x=>{if(P){clearTimeout(P),P=void 0,this.onPointerDoublePress(x);return}clearTimeout(P),P=setTimeout(()=>P=void 0,250)},this)),typeof _.size=="number"?(this.size=_.size,_.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=i,this._register(s.event(x=>{this.size=x,this.layout()}))),this._register(d.event(x=>this.hoverDelay=x)),this.layoutProvider=I,this.orthogonalStartSash=_.orthogonalStartSash,this.orthogonalEndSash=_.orthogonalEndSash,this.orientation=_.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",S),this.layout()}onPointerStart(C,I){t.EventHelper.stop(C);let _=!1;if(!C.__orthogonalSashEvent){const W=this.getOrthogonalSash(C);W&&(_=!0,C.__orthogonalSashEvent=!0,W.onPointerStart(C,new n(I)))}if(this.linkedSash&&!C.__linkedSashEvent&&(C.__linkedSashEvent=!0,this.linkedSash.onPointerStart(C,new n(I))),!this.state)return;const A=document.getElementsByTagName("iframe");for(const W of A)W.classList.add(g);const k=C.pageX,L=C.pageY,R=C.altKey,M={startX:k,currentX:k,startY:L,currentY:L,altKey:R};this.el.classList.add("active"),this._onDidStart.fire(M);const N=(0,t.createStyleSheet)(this.el),P=()=>{let W="";_?W="all-scroll":this.orientation===1?this.state===1?W="s-resize":this.state===2?W="n-resize":W=m.isMacintosh?"row-resize":"ns-resize":this.state===1?W="e-resize":this.state===2?W="w-resize":W=m.isMacintosh?"col-resize":"ew-resize",N.textContent=`* { cursor: ${W} !important; }`},x=new v.DisposableStore;P(),_||this.onDidEnablementChange.event(P,null,x);const F=W=>{t.EventHelper.stop(W,!1);const z={startX:k,currentX:W.pageX,startY:L,currentY:W.pageY,altKey:R};this._onDidChange.fire(z)},V=W=>{t.EventHelper.stop(W,!1),this.el.removeChild(N),this.el.classList.remove("active"),this._onDidEnd.fire(),x.dispose();for(const z of A)z.classList.remove(g)};I.onPointerMove(F,null,x),I.onPointerUp(V,null,x),x.add(I)}onPointerDoublePress(C){const I=this.getOrthogonalSash(C);I&&I._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(C,I=!1){C.el.classList.contains("active")?(C.hoverDelayer.cancel(),C.el.classList.add("hover")):C.hoverDelayer.trigger(()=>C.el.classList.add("hover"),C.hoverDelay).then(void 0,()=>{}),!I&&C.linkedSash&&w.onMouseEnter(C.linkedSash,!0)}static onMouseLeave(C,I=!1){C.hoverDelayer.cancel(),C.el.classList.remove("hover"),!I&&C.linkedSash&&w.onMouseLeave(C.linkedSash,!0)}clearSashHoverState(){w.onMouseLeave(this)}layout(){if(this.orientation===0){const C=this.layoutProvider;this.el.style.left=C.getVerticalSashLeft(this)-this.size/2+"px",C.getVerticalSashTop&&(this.el.style.top=C.getVerticalSashTop(this)+"px"),C.getVerticalSashHeight&&(this.el.style.height=C.getVerticalSashHeight(this)+"px")}else{const C=this.layoutProvider;this.el.style.top=C.getHorizontalSashTop(this)-this.size/2+"px",C.getHorizontalSashLeft&&(this.el.style.left=C.getHorizontalSashLeft(this)+"px"),C.getHorizontalSashWidth&&(this.el.style.width=C.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}getOrthogonalSash(C){const I=C.initialTarget??C.target;if(!(!I||!(I instanceof HTMLElement))&&I.classList.contains("orthogonal-drag-handle"))return I.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}e.Sash=w}),define(Q[2299],Y([1,0,4,6,229]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalFlexibleSash=void 0;class D extends t.Disposable{static{this.initialRatio=.4}get onPositionChange(){return this._onPositionChange.event}constructor(f,v){super(),this.minHeight=v,this._onPositionChange=new y.Emitter,this.ratio=D.initialRatio,this.left=0,this.sash=new b.Sash(f,this,{orientation:1}),this._register(this.sash.onDidStart(()=>this.onSashDragStart())),this._register(this.sash.onDidChange(m=>this.onSashDrag(m))),this._register(this.sash.onDidEnd(()=>this.onSashDragEnd())),this._register(this.sash.onDidReset(()=>this.onSashReset()))}getSplitPoint(){return this.getHorizontalSashTop()}getHorizontalSashLeft(){return this.left}getHorizontalSashTop(){return this.position}layout(){this.sash.layout()}show(){this.sash.show()}hide(){this.sash.hide()}getHorizontalSashWidth(){return this.dimension?.width??0}setDimension(f){this.dimension=f,this.compute(this.ratio)}setEdge(f){this.left=f}onSashDragStart(){this.startPosition=this.position}onSashDrag(f){this.compute((this.startPosition+(f.currentY-f.startY))/this.dimension.height)}compute(f){this.computeSashPosition(f),this.ratio=this.position/this.dimension.height,this._onPositionChange.fire(this.position)}onSashDragEnd(){this.sash.layout()}onSashReset(){this.ratio=D.initialRatio,this._onPositionChange.fire(this.position),this.sash.layout()}computeSashPosition(f=this.ratio){let v=this.dimension.height,m=Math.floor((f||.5)*v),S=Math.floor(.5*v);v>this.minHeight*4?(m<this.minHeight&&(m=this.minHeight),m>v-this.minHeight&&(m=v-this.minHeight)):m=S,this.position!==m&&(this.position=m,this.sash.layout())}}e.HorizontalFlexibleSash=D}),define(Q[668],Y([1,0,7,229,6,4]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableHTMLElement=void 0;class T{constructor(){this._onDidWillResize=new b.Emitter,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new b.Emitter,this.onDidResize=this._onDidResize.event,this._sashListener=new D.DisposableStore,this._size=new t.Dimension(0,0),this._minSize=new t.Dimension(0,0),this._maxSize=new t.Dimension(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new y.Sash(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new y.Sash(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new y.Sash(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:y.OrthogonalEdge.North}),this._southSash=new y.Sash(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:y.OrthogonalEdge.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let v,m=0,S=0;this._sashListener.add(b.Event.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{v===void 0&&(this._onDidWillResize.fire(),v=this._size,m=0,S=0)})),this._sashListener.add(b.Event.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{v!==void 0&&(v=void 0,m=0,S=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(h=>{v&&(S=h.currentX-h.startX,this.layout(v.height+m,v.width+S),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(h=>{v&&(S=-(h.currentX-h.startX),this.layout(v.height+m,v.width+S),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(h=>{v&&(m=-(h.currentY-h.startY),this.layout(v.height+m,v.width+S),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(h=>{v&&(m=h.currentY-h.startY,this.layout(v.height+m,v.width+S),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(b.Event.any(this._eastSash.onDidReset,this._westSash.onDidReset)(h=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(b.Event.any(this._northSash.onDidReset,this._southSash.onDidReset)(h=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(v,m,S,h){this._northSash.state=v?3:0,this._eastSash.state=m?3:0,this._southSash.state=S?3:0,this._westSash.state=h?3:0}layout(v=this.size.height,m=this.size.width){const{height:S,width:h}=this._minSize,{height:a,width:r}=this._maxSize;v=Math.max(S,Math.min(a,v)),m=Math.max(h,Math.min(r,m));const i=new t.Dimension(m,v);t.Dimension.equals(i,this._size)||(this.domNode.style.height=v+"px",this.domNode.style.width=m+"px",this._size=i,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(v){this._maxSize=v}get maxSize(){return this._maxSize}set minSize(v){this._minSize=v}get minSize(){return this._minSize}set preferredSize(v){this._preferredSize=v}get preferredSize(){return this._preferredSize}}e.ResizableHTMLElement=T}),define(Q[2300],Y([1,0,14,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarVisibilityController=void 0;class b extends y.Disposable{constructor(T,f,v){super(),this._visibility=T,this._visibleClassName=f,this._invisibleClassName=v,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new t.TimeoutTimer)}setVisibility(T){this._visibility!==T&&(this._visibility=T,this._updateShouldBeVisible())}setShouldBeVisible(T){this._rawShouldBeVisible=T,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const T=this._applyVisibilitySetting();this._shouldBeVisible!==T&&(this._shouldBeVisible=T,this.ensureVisibility())}setIsNeeded(T){this._isNeeded!==T&&(this._isNeeded=T,this.ensureVisibility())}setDomNode(T){this._domNode=T,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(T){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(T?" fade":"")))}}e.ScrollbarVisibilityController=b}),define(Q[2301],Y([1,0,7,151,20,6,4,18]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxNative=void 0;class v extends T.Disposable{constructor(S,h,a,r){super(),this.selected=0,this.selectBoxOptions=r||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new D.Emitter),this.styles=a,this.registerListeners(),this.setOptions(S,h)}registerListeners(){this._register(y.Gesture.addTarget(this.selectElement)),[y.EventType.Tap].forEach(S=>{this._register(t.addDisposableListener(this.selectElement,S,h=>{this.selectElement.focus()}))}),this._register(t.addStandardDisposableListener(this.selectElement,"click",S=>{t.EventHelper.stop(S,!0)})),this._register(t.addStandardDisposableListener(this.selectElement,"change",S=>{this.selectElement.title=S.target.value,this._onDidSelect.fire({index:S.target.selectedIndex,selected:S.target.value})})),this._register(t.addStandardDisposableListener(this.selectElement,"keydown",S=>{let h=!1;f.isMacintosh?(S.keyCode===18||S.keyCode===16||S.keyCode===10)&&(h=!0):(S.keyCode===18&&S.altKey||S.keyCode===10||S.keyCode===3)&&(h=!0),h&&S.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(S,h){(!this.options||!b.equals(this.options,S))&&(this.options=S,this.selectElement.options.length=0,this.options.forEach((a,r)=>{this.selectElement.add(this.createOption(a.text,r,a.isDisabled))})),h!==void 0&&this.select(h)}select(S){this.options.length===0?this.selected=0:S>=0&&S<this.options.length?this.selected=S:S>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected<this.options.length&&typeof this.options[this.selected].text=="string"?this.selectElement.title=this.options[this.selected].text:this.selectElement.title=""}setAriaLabel(S){this.selectBoxOptions.ariaLabel=S,this.selectElement.setAttribute("aria-label",S)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(S){this.selectElement.tabIndex=S?0:-1}render(S){S.classList.add("select-container"),S.appendChild(this.selectElement),this.setOptions(this.options,this.selected),this.applyStyles()}style(S){this.styles=S,this.applyStyles()}applyStyles(){this.selectElement&&(this.selectElement.style.backgroundColor=this.styles.selectBackground??"",this.selectElement.style.color=this.styles.selectForeground??"",this.selectElement.style.borderColor=this.styles.selectBorder??"")}createOption(S,h,a){const r=document.createElement("option");return r.value=S,r.text=S,r.disabled=!!a,r}}e.SelectBoxNative=v}),define(Q[823],Y([1,0,299,20,14,651,482,6,83]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndexTreeModel=e.getVisibleState=e.isFilterResult=void 0;function m(r){return typeof r=="object"&&"visibility"in r&&"data"in r}e.isFilterResult=m;function S(r){switch(r){case!0:return 1;case!1:return 0;default:return r}}e.getVisibleState=S;function h(r){return typeof r.collapsible=="boolean"}class a{constructor(i,s,o,u={}){this.user=i,this.list=s,this.rootRef=[],this.eventBufferer=new f.EventBufferer,this._onDidChangeCollapseState=new f.Emitter,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new f.Emitter,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new f.Emitter,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new b.Delayer(D.MicrotaskDelay),this.collapseByDefault=typeof u.collapseByDefault>"u"?!1:u.collapseByDefault,this.filter=u.filter,this.autoExpandSingleChildren=typeof u.autoExpandSingleChildren>"u"?!1:u.autoExpandSingleChildren,this.root={parent:void 0,element:o,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(i,s,o=v.Iterable.empty(),u={}){if(i.length===0)throw new t.TreeError(this.user,"Invalid tree location");u.diffIdentityProvider?this.spliceSmart(u.diffIdentityProvider,i,s,o,u):this.spliceSimple(i,s,o,u)}spliceSmart(i,s,o,u=v.Iterable.empty(),d,p=d.diffDepth??0){const{parentNode:c}=this.getParentNodeWithListIndex(s);if(!c.lastDiffIds)return this.spliceSimple(s,o,u,d);const l=[...u],n=s[s.length-1],g=new T.LcsDiff({getElements:()=>c.lastDiffIds},{getElements:()=>[...c.children.slice(0,n),...l,...c.children.slice(n+o)].map(_=>i.getId(_.element).toString())}).ComputeDiff(!1);if(g.quitEarly)return c.lastDiffIds=void 0,this.spliceSimple(s,o,l,d);const w=s.slice(0,-1),E=(_,A,k)=>{if(p>0)for(let L=0;L<k;L++)_--,A--,this.spliceSmart(i,[...w,_,0],Number.MAX_SAFE_INTEGER,l[A].children,d,p-1)};let C=Math.min(c.children.length,n+o),I=l.length;for(const _ of g.changes.sort((A,k)=>k.originalStart-A.originalStart))E(C,I,C-(_.originalStart+_.originalLength)),C=_.originalStart,I=_.modifiedStart-n,this.spliceSimple([...w,C],_.originalLength,v.Iterable.slice(l,I,I+_.modifiedLength),d);E(C,I,C)}spliceSimple(i,s,o=v.Iterable.empty(),{onDidCreateNode:u,onDidDeleteNode:d,diffIdentityProvider:p}){const{parentNode:c,listIndex:l,revealed:n,visible:g}=this.getParentNodeWithListIndex(i),w=[],E=v.Iterable.map(o,x=>this.createTreeNode(x,c,c.visible?1:0,n,w,u)),C=i[i.length-1],I=c.children.length>0;let _=0;for(let x=C;x>=0&&x<c.children.length;x--){const F=c.children[x];if(F.visible){_=F.visibleChildIndex;break}}const A=[];let k=0,L=0;for(const x of E)A.push(x),L+=x.renderNodeCount,x.visible&&(x.visibleChildIndex=_+k++);const R=(0,y.splice)(c.children,C,s,A);p?c.lastDiffIds?(0,y.splice)(c.lastDiffIds,C,s,A.map(x=>p.getId(x.element).toString())):c.lastDiffIds=c.children.map(x=>p.getId(x.element).toString()):c.lastDiffIds=void 0;let M=0;for(const x of R)x.visible&&M++;if(M!==0)for(let x=C+A.length;x<c.children.length;x++){const F=c.children[x];F.visible&&(F.visibleChildIndex-=M)}if(c.visibleChildrenCount+=k-M,n&&g){const x=R.reduce((F,V)=>F+(V.visible?V.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(c,L-x),this.list.splice(l,x,w)}if(R.length>0&&d){const x=F=>{d(F),F.children.forEach(x)};R.forEach(x)}this._onDidSplice.fire({insertedNodes:A,deletedNodes:R});const N=c.children.length>0;I!==N&&this.setCollapsible(i.slice(0,-1),N);let P=c;for(;P;){if(P.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}P=P.parent}}rerender(i){if(i.length===0)throw new t.TreeError(this.user,"Invalid tree location");const{node:s,listIndex:o,revealed:u}=this.getTreeNodeWithListIndex(i);s.visible&&u&&this.list.splice(o,1,[s])}updateElementHeight(i,s){if(i.length===0)throw new t.TreeError(this.user,"Invalid tree location");const{listIndex:o}=this.getTreeNodeWithListIndex(i);this.list.updateElementHeight(o,s)}has(i){return this.hasTreeNode(i)}getListIndex(i){const{listIndex:s,visible:o,revealed:u}=this.getTreeNodeWithListIndex(i);return o&&u?s:-1}getListRenderCount(i){return this.getTreeNode(i).renderNodeCount}isCollapsible(i){return this.getTreeNode(i).collapsible}setCollapsible(i,s){const o=this.getTreeNode(i);typeof s>"u"&&(s=!o.collapsible);const u={collapsible:s};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(i,u))}isCollapsed(i){return this.getTreeNode(i).collapsed}setCollapsed(i,s,o){const u=this.getTreeNode(i);typeof s>"u"&&(s=!u.collapsed);const d={collapsed:s,recursive:o||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(i,d))}_setCollapseState(i,s){const{node:o,listIndex:u,revealed:d}=this.getTreeNodeWithListIndex(i),p=this._setListNodeCollapseState(o,u,d,s);if(o!==this.root&&this.autoExpandSingleChildren&&p&&!h(s)&&o.collapsible&&!o.collapsed&&!s.recursive){let c=-1;for(let l=0;l<o.children.length;l++)if(o.children[l].visible)if(c>-1){c=-1;break}else c=l;c>-1&&this._setCollapseState([...i,c],s)}return p}_setListNodeCollapseState(i,s,o,u){const d=this._setNodeCollapseState(i,u,!1);if(!o||!i.visible||!d)return d;const p=i.renderNodeCount,c=this.updateNodeAfterCollapseChange(i),l=p-(s===-1?0:1);return this.list.splice(s+1,l,c.slice(1)),d}_setNodeCollapseState(i,s,o){let u;if(i===this.root?u=!1:(h(s)?(u=i.collapsible!==s.collapsible,i.collapsible=s.collapsible):i.collapsible?(u=i.collapsed!==s.collapsed,i.collapsed=s.collapsed):u=!1,u&&this._onDidChangeCollapseState.fire({node:i,deep:o})),!h(s)&&s.recursive)for(const d of i.children)u=this._setNodeCollapseState(d,s,!0)||u;return u}expandTo(i){this.eventBufferer.bufferEvents(()=>{let s=this.getTreeNode(i);for(;s.parent;)s=s.parent,i=i.slice(0,i.length-1),s.collapsed&&this._setCollapseState(i,{collapsed:!1,recursive:!1})})}refilter(){const i=this.root.renderNodeCount,s=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,i,s),this.refilterDelayer.cancel()}createTreeNode(i,s,o,u,d,p){const c={parent:s,element:i.element,children:[],depth:s.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof i.collapsible=="boolean"?i.collapsible:typeof i.collapsed<"u",collapsed:typeof i.collapsed>"u"?this.collapseByDefault:i.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(c,o);c.visibility=l,u&&d.push(c);const n=i.children||v.Iterable.empty(),g=u&&l!==0&&!c.collapsed;let w=0,E=1;for(const C of n){const I=this.createTreeNode(C,c,l,g,d,p);c.children.push(I),E+=I.renderNodeCount,I.visible&&(I.visibleChildIndex=w++)}return c.collapsible=c.collapsible||c.children.length>0,c.visibleChildrenCount=w,c.visible=l===2?w>0:l===1,c.visible?c.collapsed||(c.renderNodeCount=E):(c.renderNodeCount=0,u&&d.pop()),p?.(c),c}updateNodeAfterCollapseChange(i){const s=i.renderNodeCount,o=[];return this._updateNodeAfterCollapseChange(i,o),this._updateAncestorsRenderNodeCount(i.parent,o.length-s),o}_updateNodeAfterCollapseChange(i,s){if(i.visible===!1)return 0;if(s.push(i),i.renderNodeCount=1,!i.collapsed)for(const o of i.children)i.renderNodeCount+=this._updateNodeAfterCollapseChange(o,s);return this._onDidChangeRenderNodeCount.fire(i),i.renderNodeCount}updateNodeAfterFilterChange(i){const s=i.renderNodeCount,o=[];return this._updateNodeAfterFilterChange(i,i.visible?1:0,o),this._updateAncestorsRenderNodeCount(i.parent,o.length-s),o}_updateNodeAfterFilterChange(i,s,o,u=!0){let d;if(i!==this.root){if(d=this._filterNode(i,s),d===0)return i.visible=!1,i.renderNodeCount=0,!1;u&&o.push(i)}const p=o.length;i.renderNodeCount=i===this.root?0:1;let c=!1;if(!i.collapsed||d!==0){let l=0;for(const n of i.children)c=this._updateNodeAfterFilterChange(n,d,o,u&&!i.collapsed)||c,n.visible&&(n.visibleChildIndex=l++);i.visibleChildrenCount=l}else i.visibleChildrenCount=0;return i!==this.root&&(i.visible=d===2?c:d===1,i.visibility=d),i.visible?i.collapsed||(i.renderNodeCount+=o.length-p):(i.renderNodeCount=0,u&&o.pop()),this._onDidChangeRenderNodeCount.fire(i),i.visible}_updateAncestorsRenderNodeCount(i,s){if(s!==0)for(;i;)i.renderNodeCount+=s,this._onDidChangeRenderNodeCount.fire(i),i=i.parent}_filterNode(i,s){const o=this.filter?this.filter.filter(i.element,s):1;return typeof o=="boolean"?(i.filterData=void 0,o?1:0):m(o)?(i.filterData=o.data,S(o.visibility)):(i.filterData=void 0,S(o))}hasTreeNode(i,s=this.root){if(!i||i.length===0)return!0;const[o,...u]=i;return o<0||o>s.children.length?!1:this.hasTreeNode(u,s.children[o])}getTreeNode(i,s=this.root){if(!i||i.length===0)return s;const[o,...u]=i;if(o<0||o>s.children.length)throw new t.TreeError(this.user,"Invalid tree location");return this.getTreeNode(u,s.children[o])}getTreeNodeWithListIndex(i){if(i.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:s,listIndex:o,revealed:u,visible:d}=this.getParentNodeWithListIndex(i),p=i[i.length-1];if(p<0||p>s.children.length)throw new t.TreeError(this.user,"Invalid tree location");const c=s.children[p];return{node:c,listIndex:o,revealed:u,visible:d&&c.visible}}getParentNodeWithListIndex(i,s=this.root,o=0,u=!0,d=!0){const[p,...c]=i;if(p<0||p>s.children.length)throw new t.TreeError(this.user,"Invalid tree location");for(let l=0;l<p;l++)o+=s.children[l].renderNodeCount;return u=u&&!s.collapsed,d=d&&s.visible,c.length===0?{parentNode:s,listIndex:o,revealed:u,visible:d}:this.getParentNodeWithListIndex(c,s.children[p],o+1,u,d)}getNode(i=[]){return this.getTreeNode(i)}getNodeLocation(i){const s=[];let o=i;for(;o.parent;)s.push(o.parent.children.indexOf(o)),o=o.parent;return s.reverse()}getParentNodeLocation(i){if(i.length!==0)return i.length===1?[]:(0,y.tail2)(i)[0]}getFirstElementChild(i){const s=this.getTreeNode(i);if(s.children.length!==0)return s.children[0].element}getLastElementAncestor(i=[]){const s=this.getTreeNode(i);if(s.children.length!==0)return this._getLastElementAncestor(s)}_getLastElementAncestor(i){return i.children.length===0?i.element:this._getLastElementAncestor(i.children[i.children.length-1])}}e.IndexTreeModel=a}),define(Q[669],Y([1,0,823,299,83]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectTreeModel=void 0;class D{get size(){return this.nodes.size}constructor(f,v,m={}){this.user=f,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new t.IndexTreeModel(f,v,null,m),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,m.sorter&&(this.sorter={compare(S,h){return m.sorter.compare(S.element,h.element)}}),this.identityProvider=m.identityProvider}setChildren(f,v=b.Iterable.empty(),m={}){const S=this.getElementLocation(f);this._setChildren(S,this.preserveCollapseState(v),m)}_setChildren(f,v=b.Iterable.empty(),m){const S=new Set,h=new Set,a=i=>{if(i.element===null)return;const s=i;if(S.add(s.element),this.nodes.set(s.element,s),this.identityProvider){const o=this.identityProvider.getId(s.element).toString();h.add(o),this.nodesByIdentity.set(o,s)}m.onDidCreateNode?.(s)},r=i=>{if(i.element===null)return;const s=i;if(S.has(s.element)||this.nodes.delete(s.element),this.identityProvider){const o=this.identityProvider.getId(s.element).toString();h.has(o)||this.nodesByIdentity.delete(o)}m.onDidDeleteNode?.(s)};this.model.splice([...f,0],Number.MAX_VALUE,v,{...m,onDidCreateNode:a,onDidDeleteNode:r})}preserveCollapseState(f=b.Iterable.empty()){return this.sorter&&(f=[...f].sort(this.sorter.compare.bind(this.sorter))),b.Iterable.map(f,v=>{let m=this.nodes.get(v.element);if(!m&&this.identityProvider){const a=this.identityProvider.getId(v.element).toString();m=this.nodesByIdentity.get(a)}if(!m){let a;return typeof v.collapsed>"u"?a=void 0:v.collapsed===y.ObjectTreeElementCollapseState.Collapsed||v.collapsed===y.ObjectTreeElementCollapseState.PreserveOrCollapsed?a=!0:v.collapsed===y.ObjectTreeElementCollapseState.Expanded||v.collapsed===y.ObjectTreeElementCollapseState.PreserveOrExpanded?a=!1:a=!!v.collapsed,{...v,children:this.preserveCollapseState(v.children),collapsed:a}}const S=typeof v.collapsible=="boolean"?v.collapsible:m.collapsible;let h;return typeof v.collapsed>"u"||v.collapsed===y.ObjectTreeElementCollapseState.PreserveOrCollapsed||v.collapsed===y.ObjectTreeElementCollapseState.PreserveOrExpanded?h=m.collapsed:v.collapsed===y.ObjectTreeElementCollapseState.Collapsed?h=!0:v.collapsed===y.ObjectTreeElementCollapseState.Expanded?h=!1:h=!!v.collapsed,{...v,collapsible:S,collapsed:h,children:this.preserveCollapseState(v.children)}})}rerender(f){const v=this.getElementLocation(f);this.model.rerender(v)}updateElementHeight(f,v){const m=this.getElementLocation(f);this.model.updateElementHeight(m,v)}resort(f=null,v=!0){if(!this.sorter)return;const m=this.getElementLocation(f),S=this.model.getNode(m);this._setChildren(m,this.resortChildren(S,v),{})}resortChildren(f,v,m=!0){let S=[...f.children];return(v||m)&&(S=S.sort(this.sorter.compare.bind(this.sorter))),b.Iterable.map(S,h=>({element:h.element,collapsible:h.collapsible,collapsed:h.collapsed,children:this.resortChildren(h,v,!1)}))}getFirstElementChild(f=null){const v=this.getElementLocation(f);return this.model.getFirstElementChild(v)}getLastElementAncestor(f=null){const v=this.getElementLocation(f);return this.model.getLastElementAncestor(v)}has(f){return this.nodes.has(f)}getListIndex(f){const v=this.getElementLocation(f);return this.model.getListIndex(v)}getListRenderCount(f){const v=this.getElementLocation(f);return this.model.getListRenderCount(v)}isCollapsible(f){const v=this.getElementLocation(f);return this.model.isCollapsible(v)}setCollapsible(f,v){const m=this.getElementLocation(f);return this.model.setCollapsible(m,v)}isCollapsed(f){const v=this.getElementLocation(f);return this.model.isCollapsed(v)}setCollapsed(f,v,m){const S=this.getElementLocation(f);return this.model.setCollapsed(S,v,m)}expandTo(f){const v=this.getElementLocation(f);this.model.expandTo(v)}refilter(){this.model.refilter()}getNode(f=null){if(f===null)return this.model.getNode(this.model.rootRef);const v=this.nodes.get(f);if(!v)throw new y.TreeError(this.user,`Tree element not found: ${f}`);return v}getNodeLocation(f){return f.element}getParentNodeLocation(f){if(f===null)throw new y.TreeError(this.user,"Invalid getParentNodeLocation call");const v=this.nodes.get(f);if(!v)throw new y.TreeError(this.user,`Tree element not found: ${f}`);const m=this.model.getNodeLocation(v),S=this.model.getParentNodeLocation(m);return this.model.getNode(S).element}getElementLocation(f){if(f===null)return[];const v=this.nodes.get(f);if(!v)throw new y.TreeError(this.user,`Tree element not found: ${f}`);return this.model.getNodeLocation(v)}}e.ObjectTreeModel=D}),define(Q[2302],Y([1,0,669,299,20,6,83]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTreeModel=e.DefaultElementMapper=e.CompressedObjectTreeModel=e.decompress=e.compress=void 0;function f(p){const c=[p.element],l=p.incompressible||!1;return{element:{elements:c,incompressible:l},children:T.Iterable.map(T.Iterable.from(p.children),f),collapsible:p.collapsible,collapsed:p.collapsed}}function v(p){const c=[p.element],l=p.incompressible||!1;let n,g;for(;[g,n]=T.Iterable.consume(T.Iterable.from(p.children),2),!(g.length!==1||g[0].incompressible);)p=g[0],c.push(p.element);return{element:{elements:c,incompressible:l},children:T.Iterable.map(T.Iterable.concat(g,n),v),collapsible:p.collapsible,collapsed:p.collapsed}}e.compress=v;function m(p,c=0){let l;return c<p.element.elements.length-1?l=[m(p,c+1)]:l=T.Iterable.map(T.Iterable.from(p.children),n=>m(n,0)),c===0&&p.element.incompressible?{element:p.element.elements[c],children:l,incompressible:!0,collapsible:p.collapsible,collapsed:p.collapsed}:{element:p.element.elements[c],children:l,collapsible:p.collapsible,collapsed:p.collapsed}}function S(p){return m(p,0)}e.decompress=S;function h(p,c,l){return p.element===c?{...p,children:l}:{...p,children:T.Iterable.map(T.Iterable.from(p.children),n=>h(n,c,l))}}const a=p=>({getId(c){return c.elements.map(l=>p.getId(l).toString()).join("\0")}});class r{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}get size(){return this.nodes.size}constructor(c,l,n={}){this.user=c,this.rootRef=null,this.nodes=new Map,this.model=new t.ObjectTreeModel(c,l,n),this.enabled=typeof n.compressionEnabled>"u"?!0:n.compressionEnabled,this.identityProvider=n.identityProvider}setChildren(c,l=T.Iterable.empty(),n){const g=n.diffIdentityProvider&&a(n.diffIdentityProvider);if(c===null){const M=T.Iterable.map(l,this.enabled?v:f);this._setChildren(null,M,{diffIdentityProvider:g,diffDepth:1/0});return}const w=this.nodes.get(c);if(!w)throw new y.TreeError(this.user,"Unknown compressed tree node");const E=this.model.getNode(w),C=this.model.getParentNodeLocation(w),I=this.model.getNode(C),_=S(E),A=h(_,c,l),k=(this.enabled?v:f)(A),L=n.diffIdentityProvider?(M,N)=>n.diffIdentityProvider.getId(M)===n.diffIdentityProvider.getId(N):void 0;if((0,b.equals)(k.element.elements,E.element.elements,L)){this._setChildren(w,k.children||T.Iterable.empty(),{diffIdentityProvider:g,diffDepth:1});return}const R=I.children.map(M=>M===E?k:M);this._setChildren(I.element,R,{diffIdentityProvider:g,diffDepth:E.depth-I.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(c){if(c===this.enabled)return;this.enabled=c;const n=this.model.getNode().children,g=T.Iterable.map(n,S),w=T.Iterable.map(g,c?v:f);this._setChildren(null,w,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(c,l,n){const g=new Set,w=C=>{for(const I of C.element.elements)g.add(I),this.nodes.set(I,C.element)},E=C=>{for(const I of C.element.elements)g.has(I)||this.nodes.delete(I)};this.model.setChildren(c,l,{...n,onDidCreateNode:w,onDidDeleteNode:E})}has(c){return this.nodes.has(c)}getListIndex(c){const l=this.getCompressedNode(c);return this.model.getListIndex(l)}getListRenderCount(c){const l=this.getCompressedNode(c);return this.model.getListRenderCount(l)}getNode(c){if(typeof c>"u")return this.model.getNode();const l=this.getCompressedNode(c);return this.model.getNode(l)}getNodeLocation(c){const l=this.model.getNodeLocation(c);return l===null?null:l.elements[l.elements.length-1]}getParentNodeLocation(c){const l=this.getCompressedNode(c),n=this.model.getParentNodeLocation(l);return n===null?null:n.elements[n.elements.length-1]}getFirstElementChild(c){const l=this.getCompressedNode(c);return this.model.getFirstElementChild(l)}getLastElementAncestor(c){const l=typeof c>"u"?void 0:this.getCompressedNode(c);return this.model.getLastElementAncestor(l)}isCollapsible(c){const l=this.getCompressedNode(c);return this.model.isCollapsible(l)}setCollapsible(c,l){const n=this.getCompressedNode(c);return this.model.setCollapsible(n,l)}isCollapsed(c){const l=this.getCompressedNode(c);return this.model.isCollapsed(l)}setCollapsed(c,l,n){const g=this.getCompressedNode(c);return this.model.setCollapsed(g,l,n)}expandTo(c){const l=this.getCompressedNode(c);this.model.expandTo(l)}rerender(c){const l=this.getCompressedNode(c);this.model.rerender(l)}updateElementHeight(c,l){const n=this.getCompressedNode(c);n&&this.model.updateElementHeight(n,l)}refilter(){this.model.refilter()}resort(c=null,l=!0){const n=this.getCompressedNode(c);this.model.resort(n,l)}getCompressedNode(c){if(c===null)return null;const l=this.nodes.get(c);if(!l)throw new y.TreeError(this.user,`Tree element not found: ${c}`);return l}}e.CompressedObjectTreeModel=r;const i=p=>p[p.length-1];e.DefaultElementMapper=i;class s{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(c=>new s(this.unwrapper,c))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(c,l){this.unwrapper=c,this.node=l}}function o(p,c){return{splice(l,n,g){c.splice(l,n,g.map(w=>p.map(w)))},updateElementHeight(l,n){c.updateElementHeight(l,n)}}}function u(p,c){return{...c,identityProvider:c.identityProvider&&{getId(l){return c.identityProvider.getId(p(l))}},sorter:c.sorter&&{compare(l,n){return c.sorter.compare(l.elements[0],n.elements[0])}},filter:c.filter&&{filter(l,n){return c.filter.filter(p(l),n)}}}}class d{get onDidSplice(){return D.Event.map(this.model.onDidSplice,({insertedNodes:c,deletedNodes:l})=>({insertedNodes:c.map(n=>this.nodeMapper.map(n)),deletedNodes:l.map(n=>this.nodeMapper.map(n))}))}get onDidChangeCollapseState(){return D.Event.map(this.model.onDidChangeCollapseState,({node:c,deep:l})=>({node:this.nodeMapper.map(c),deep:l}))}get onDidChangeRenderNodeCount(){return D.Event.map(this.model.onDidChangeRenderNodeCount,c=>this.nodeMapper.map(c))}constructor(c,l,n={}){this.rootRef=null,this.elementMapper=n.elementMapper||e.DefaultElementMapper;const g=w=>this.elementMapper(w.elements);this.nodeMapper=new y.WeakMapper(w=>new s(g,w)),this.model=new r(c,o(this.nodeMapper,l),u(g,n))}setChildren(c,l=T.Iterable.empty(),n={}){this.model.setChildren(c,l,n)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(c){this.model.setCompressionEnabled(c)}has(c){return this.model.has(c)}getListIndex(c){return this.model.getListIndex(c)}getListRenderCount(c){return this.model.getListRenderCount(c)}getNode(c){return this.nodeMapper.map(this.model.getNode(c))}getNodeLocation(c){return c.element}getParentNodeLocation(c){return this.model.getParentNodeLocation(c)}getFirstElementChild(c){const l=this.model.getFirstElementChild(c);return l===null||typeof l>"u"?null:this.elementMapper(l.elements)}getLastElementAncestor(c){const l=this.model.getLastElementAncestor(c);return l===null||typeof l>"u"?null:this.elementMapper(l.elements)}isCollapsible(c){return this.model.isCollapsible(c)}setCollapsible(c,l){return this.model.setCollapsible(c,l)}isCollapsed(c){return this.model.isCollapsed(c)}setCollapsed(c,l,n){return this.model.setCollapsed(c,l,n)}expandTo(c){return this.model.expandTo(c)}rerender(c){return this.model.rerender(c)}updateElementHeight(c,l){this.model.updateElementHeight(c,l)}refilter(){return this.model.refilter()}resort(c=null,l=!0){return this.model.resort(c,l)}getCompressedTreeNode(c=null){return this.model.getNode(c)}}e.CompressibleObjectTreeModel=d}),define(Q[142],Y([1,0,7,67,129,151,4]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Widget=void 0;class f extends T.Disposable{onclick(m,S){this._register(t.addDisposableListener(m,t.EventType.CLICK,h=>S(new b.StandardMouseEvent(h))))}onmousedown(m,S){this._register(t.addDisposableListener(m,t.EventType.MOUSE_DOWN,h=>S(new b.StandardMouseEvent(h))))}onmouseover(m,S){this._register(t.addDisposableListener(m,t.EventType.MOUSE_OVER,h=>S(new b.StandardMouseEvent(h))))}onmouseleave(m,S){this._register(t.addDisposableListener(m,t.EventType.MOUSE_LEAVE,h=>S(new b.StandardMouseEvent(h))))}onkeydown(m,S){this._register(t.addDisposableListener(m,t.EventType.KEY_DOWN,h=>S(new y.StandardKeyboardEvent(h))))}onkeyup(m,S){this._register(t.addDisposableListener(m,t.EventType.KEY_UP,h=>S(new y.StandardKeyboardEvent(h))))}oninput(m,S){this._register(t.addDisposableListener(m,t.EventType.INPUT,S))}onblur(m,S){this._register(t.addDisposableListener(m,t.EventType.BLUR,S))}onfocus(m,S){this._register(t.addDisposableListener(m,t.EventType.FOCUS,S))}onchange(m,S){this._register(t.addDisposableListener(m,t.EventType.CHANGE,S))}ignoreGesture(m){return D.Gesture.ignoreTarget(m)}}e.Widget=f}),define(Q[343],Y([1,0,6,142,59,1549]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Checkbox=void 0;class D extends y.Widget{constructor(f,v){super(),this._options=v,this._onChange=this._register(new t.Emitter),this.onChange=this._onChange.event,this._onFocus=this._register(new t.Emitter),this.onFocus=this._onFocus.event;const m=(0,b.generateUuid)();this._el=document.createElement("input"),this._el.type="checkbox",this._el.style.verticalAlign="middle",this._el.id=m,v.ariaLabel&&(this.ariaLabel=v.ariaLabel),v.ariaDescription&&this._el.setAttribute("aria-description",v.ariaDescription),this.onchange(this._el,S=>{this._onChange.fire(this.checked)}),this.onfocus(this._el,()=>{this._onFocus.fire()}),this._label=document.createElement("label"),this._label.style.verticalAlign="middle",this._label.setAttribute("for",m),this.label=v.label,this.enabled=v.enabled??!0,this.checked=v.checked??!1,v.onChange&&this.onChange(v.onChange),f.appendChild(this._el),f.appendChild(this._label)}set label(f){this._label.innerText=f,this.ariaLabel||(this.ariaLabel=f)}set enabled(f){this._el.disabled=!f,this._label.style.color=!this.enabled&&this._options.disabledCheckboxForeground?this._options.disabledCheckboxForeground:"inherit"}get enabled(){return!this._el.disabled}set checked(f){this._el.checked=f}get checked(){return this._el.checked}set ariaLabel(f){this._el.setAttribute("aria-label",f||"")}get ariaLabel(){return this._el.getAttribute("aria-label")}set required(f){this._el.required=f}get required(){return this._el.required}focus(){this._el.focus()}disable(){this.enabled=!1}enable(){this.enabled=!0}setHeight(f){this._el.style.height=f}setWidth(f){this._el.style.width=f}}e.Checkbox=D}),define(Q[670],Y([1,0,40,343]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Checkbox=void 0;let b=class{constructor(T){this._el=T,this.enabled=!0,this.checked=!0,this.onChange=new t.EventEmitter}ngOnInit(){this._checkbox=new y.Checkbox(this._el.nativeElement,{label:this.label,ariaLabel:this.ariaLabel||this.label,checked:this.checked,enabled:this.enabled}),this._checkbox.onChange(T=>{this.onChange.emit(T)})}ngOnChanges(T){this._checkbox&&(T.label&&(this._checkbox.label=T.label.currentValue),T.enabled&&(this._checkbox.enabled=T.enabled.currentValue),T.checked&&(this._checkbox.checked=T.checked.currentValue))}};e.Checkbox=b,fe([(0,t.Input)()],b.prototype,"label",void 0),fe([(0,t.Input)()],b.prototype,"enabled",void 0),fe([(0,t.Input)()],b.prototype,"checked",void 0),fe([(0,t.Input)("aria-label")],b.prototype,"ariaLabel",void 0),fe([(0,t.Output)()],b.prototype,"onChange",void 0),e.Checkbox=b=fe([(0,t.Component)({selector:"checkbox",template:""}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef)))],b)}),define(Q[2303],Y([1,0,6,142,7,59,1550]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Colorbox=void 0;class T extends y.Widget{constructor(v,m){super(),this._onSelect=this._register(new t.Emitter),this.onSelect=this._onSelect.event;const S=b.$(".colorbox-container");this.colorElement=b.$(".color-element");const h=b.$(".color-selector-container");this.colorElement.style.background=m.color,this.radioButton=b.$("input"),this.radioButton.type="radio",this.radioButton.name=m.name,this.radioButton.id=(0,D.generateUuid)(),this.radioButton.classList.add("colorbox-radio"),m.class&&this.radioButton.classList.add(...m.class),this.radioButton.setAttribute("aria-label",m.color),this.labelNode=b.$("label.colorbox-label"),this.labelNode.setAttribute("for",this.radioButton.id),this.labelNode.innerText=m.color,h.appendChild(this.radioButton),h.appendChild(this.labelNode),S.appendChild(this.colorElement),S.appendChild(h),v.appendChild(S),this.onfocus(this.radioButton,()=>{this._onSelect.fire()})}get checked(){return this.radioButton.checked}set checked(v){this.radioButton.checked=v}focus(){this.radioButton.focus()}}e.Colorbox=T}),define(Q[1113],Y([1,0,142,7,1552]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FieldSet=void 0;class b extends t.Widget{constructor(T,f){super(),this.element=y.$("fieldset.default-fieldset"),this.element.setAttribute("aria-label",f.ariaLabel),T.appendChild(this.element)}}e.FieldSet=b}),define(Q[824],Y([1,0,6,142,17,59]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RadioButton=void 0;class T extends y.Widget{constructor(v,m){super(),this._onClicked=this._register(new t.Emitter),this.onClicked=this._onClicked.event,this._onChangedCheckedState=this._register(new t.Emitter),this.onDidChangeCheckedState=this._onChangedCheckedState.event,this._internalCheckedStateTracker=!1;const S=(0,D.generateUuid)();this.inputElement=document.createElement("input"),this.inputElement.type="radio",this.inputElement.style.verticalAlign="middle",this.inputElement.style.margin="3px",this.inputElement.id=S,this._label=document.createElement("label"),this._label.style.verticalAlign="middle",this._label.setAttribute("for",S),this.label=m.label,this.enabled=m.enabled||!0,this.checked=m.checked||!1,this._internalCheckedStateTracker=this.checked,this.onclick(this.inputElement,()=>{this._onClicked.fire(),this.checked=!0}),this.inputElement.addEventListener("change",()=>{this._internalCheckedStateTracker!==this.inputElement.checked&&(this._internalCheckedStateTracker=this.inputElement.checked,this._onChangedCheckedState.fire(this._internalCheckedStateTracker))}),v.appendChild(this.inputElement),v.appendChild(this._label)}set name(v){v&&this.inputElement.setAttribute("name",v)}get name(){return(0,b.withNullAsUndefined)(this.inputElement.getAttribute("name"))}set value(v){v&&this.inputElement.setAttribute("value",v)}get value(){return(0,b.withNullAsUndefined)(this.inputElement.getAttribute("value"))}set checked(v){if(v!==this._internalCheckedStateTracker){this.inputElement.checked=v;const m=document.createEvent("HTMLEvents");m.initEvent("change",!0,!0),this.name?document.getElementsByName(this.name).forEach(h=>{h.dispatchEvent(m)}):this.inputElement.dispatchEvent(m)}}get checked(){return this.inputElement.checked}set enabled(v){this.inputElement.disabled=!v}get enabled(){return!this.inputElement.disabled}isEnabled(){return!this.inputElement.hasAttribute("disabled")}set label(v){this._label.innerText=v,this.inputElement.setAttribute("aria-label",v)}focus(){this.inputElement.focus()}blur(){this.inputElement.blur()}}e.RadioButton=T}),define(Q[2304],Y([1,0,6,142]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Slider=e.DEFAULT_STEP=e.DEFAULT_MAX=e.DEFAULT_MIN=void 0;let b=1;e.DEFAULT_MIN="1",e.DEFAULT_MAX="100",e.DEFAULT_STEP="1";class D extends y.Widget{constructor(f,v){super(),this._container=f,this._datalist=void 0,this._showTicks=!1,this._onChange=this._register(new t.Emitter),this.onChange=this._onChange.event,this._onInput=this._register(new t.Emitter),this.onInput=this._onInput.event,this._el=document.createElement("input"),this._el.type="range",this._valueBox=document.createElement("input"),this._valueBox.type="text",this._valueBox.disabled=!0,this._valueBox.style.textAlign="center",this._valueBox.style.width="40px",this.width=v.width?.toString()||"",this.step=v.step,this.min=v.min,this.max=v.max,this.value=v.value,this._showTicks=v.showTicks,this._valueBox.value=this.value.toString(),this.updateTicksDisplay();const m=document.createElement("div");m.style.display="flex",m.style.flexFlow="row",v.ariaLabel&&(this.ariaLabel=v.ariaLabel),this.onchange(this._el,()=>{this._onChange.fire(this.value)}),this.oninput(this._el,()=>{this._valueBox.value=this.value.toString(),this._onInput.fire(this.value)}),this.enabled=v.enabled||!0,v.onChange&&this._register(this.onChange(v.onChange)),v.onInput&&this._register(this.onInput(v.onInput)),m.append(this._el,this._valueBox),this._container.appendChild(m)}updateTicksDisplay(){if(this.showTicks&&this.step){this._datalist||(this._datalist=document.createElement("datalist"),this._datalist.id=`slider-ticks-${b++}`,this._container.appendChild(this._datalist)),this._el.setAttribute("list",this._datalist.id);const f=(this.max-this.min)/this.step;for(let v=0;v<=f;++v){const m=document.createElement("option");m.value=(this.min+v*this.step).toString(),this._datalist.appendChild(m)}}else this._el.removeAttribute("list")}set enabled(f){this._el.disabled=!f}get enabled(){return!this._el.disabled}set min(f){this._el.min=f?.toString()||e.DEFAULT_MIN}get min(){return Number(this._el.min)}set max(f){this._el.max=f?.toString()||e.DEFAULT_MAX}get max(){return Number(this._el.max)}set value(f){this._el.value=f?.toString()||this.min.toString(),this._valueBox.value=this._el.value,this._onChange.fire(this.value)}get value(){return Number(this._el.value)}set step(f){this._el.step=f?.toString()||e.DEFAULT_STEP}get step(){return Number(this._el.step)}set width(f){this._el.style.width=f}get width(){return this._el.style.width}set showTicks(f){this._showTicks=f,this.updateTicksDisplay()}get showTicks(){return this._showTicks}set ariaLabel(f){this._el.setAttribute("aria-label",f||"")}get ariaLabel(){return this._el.getAttribute("aria-label")}focus(){this._el.focus()}disable(){this.enabled=!1}enable(){this.enabled=!0}setHeight(f){this._el.style.height=f}setWidth(f){this._el.style.width=f}}e.Slider=D}),define(Q[187],Y([1,0,256,7,42,142,17,6,20,558,1934,1563,1043,1562]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Table=void 0;function h(){return{syncColumnCellResize:!0,enableColumnReorder:!1,emulatePagingWhenScrolling:!1}}class a extends D.Widget{constructor(i,s,o,u,d,p){super(),this._quickInputProvider=o,this._onContextMenu=this._register(new f.Emitter),this.onContextMenu=this._onContextMenu.event,this._onClick=this._register(new f.Emitter),this.onClick=this._onClick.event,this._onDoubleClick=this._register(new f.Emitter),this.onDoubleClick=this._onDoubleClick.event,this._onHeaderClick=this._register(new f.Emitter),this.onHeaderClick=this._onHeaderClick.event,this._onColumnResize=this._register(new f.Emitter),this.onColumnResize=this._onColumnResize.event,this._onKeyDown=this._register(new f.Emitter),this.onKeyDown=this._onKeyDown.event,this._onBlur=this._register(new f.Emitter),this.onBlur=this._onBlur.event,!d||!d.dataProvider||Array.isArray(d.dataProvider)?this._data=new t.TableDataView(d&&d.dataProvider):this._data=d.dataProvider,this._register(this._data);let c=(0,b.mixin)(p||{},h(),!1);s?.isScreenReaderOptimized()&&(c.disableColumnBasedCellVirtualization=!0),this._container=document.createElement("div"),this._container.className="monaco-table",this._register(y.addDisposableListener(this._container,y.EventType.FOCUS,l=>{clearTimeout(this._classChangeTimeout),this._classChangeTimeout=setTimeout(()=>{this._container.classList.add("focused")},100)},!0)),this._register(y.addDisposableListener(this._container,y.EventType.BLUR,()=>{clearTimeout(this._classChangeTimeout),this._classChangeTimeout=setTimeout(()=>{this._container.classList.remove("focused"),this._onBlur.fire()},100)},!0)),i.appendChild(this._container),this.styleElement=y.createStyleSheet(this._container),this._tableContainer=document.createElement("div"),this._container.appendChild(this._tableContainer),this.styleElement=y.createStyleSheet(this._container),this._grid=new Slick.Grid(this._tableContainer,this._data,[],c),d&&d.columns?this.columns=d.columns:this.columns=new Array,this.idPrefix=this._tableContainer.classList[0],this._container.classList.add(this.idPrefix),d&&d.sorter&&(this._sorter=d.sorter,this._grid.onSort.subscribe((l,n)=>{this._sorter(n),this._grid.invalidate(),this._grid.render()})),this._register({dispose:()=>{this._grid.destroy()}}),this.mapMouseEvent(this._grid.onContextMenu,this._onContextMenu),this.mapMouseEvent(this._grid.onClick,this._onClick),this.mapMouseEvent(this._grid.onHeaderClick,this._onHeaderClick),this.mapMouseEvent(this._grid.onDblClick,this._onDoubleClick),this._grid.onColumnsResized.subscribe(()=>this._onColumnResize.fire()),this.style(u)}async resizeActiveColumn(){const i=this._grid.getActiveCell();if(i){const s=this._grid.getColumns();if(s[i.cell].resizable){const o=await this._quickInputProvider.input({placeHolder:(0,S.localize)(0,null),prompt:(0,S.localize)(1,null),value:s[i.cell].width.toString(),validateInput:async u=>{if(Number(u)){if(parseInt(u)<=0)return(0,S.localize)(3,null)}else return(0,S.localize)(2,null)}});o&&(s[i.cell].width=parseInt(o),this._grid.setColumns(s),this.grid.setActiveCell(i.row,i.cell))}}}rerenderGrid(){this._grid.updateRowCount(),this._grid.setColumns(this._grid.getColumns()),this._grid.invalidateAllRows(),this._grid.render()}mapMouseEvent(i,s){i.subscribe(o=>{const u=o.originalEvent,d=this._grid.getCellFromEvent(u),p=u instanceof MouseEvent?{x:u.x,y:u.y}:u.srcElement;s.fire({anchor:p,cell:d})})}dispose(){this._container.remove(),super.dispose()}invalidateRows(i,s){this._grid.invalidateRows(i,s),this._grid.render()}updateRowCount(){this._grid.updateRowCount(),this._grid.render(),this._autoscroll&&this._grid.scrollRowIntoView(this._data.getLength()-1,!1),this.ariaRowCount=this.grid.getDataLength(),this.ariaColumnCount=this.grid.getColumns().length}set columns(i){this._grid.setColumns(i)}get grid(){return this._grid}setData(i){i instanceof t.TableDataView||i instanceof m.AsyncDataProvider?this._data=i:this._data=new t.TableDataView(i),this._grid.setData(this._data,!0),this.updateRowCount()}getData(){return this._data}get columns(){return this._grid.getColumns()}setSelectedRows(i){(0,T.isBoolean)(i)?this._grid.setSelectedRows((0,v.range)(this._grid.getDataLength())):this._grid.setSelectedRows(i)}getSelectedRows(){return this._grid.getSelectedRows()}onSelectedRowsChanged(i){return this._grid.onSelectedRowsChanged.subscribe(i),{dispose:()=>{this._grid&&this._grid.onSelectedRowsChanged&&this._grid.onSelectedRowsChanged.unsubscribe(i)}}}setSelectionModel(i){this._grid.setSelectionModel(i)}getSelectionModel(){return this._grid.getSelectionModel()}getSelectedRanges(){let i=this._grid.getSelectionModel();if(i&&i.getSelectedRanges)return i.getSelectedRanges()}focus(){this._grid.focus()}setActiveCell(i,s){this._grid.setActiveCell(i,s)}get activeCell(){return this._grid.getActiveCell()}registerPlugin(i){this._grid.registerPlugin(i)}unregisterPlugin(i){this._grid.unregisterPlugin(i)}resizeCanvas(){this._grid.resizeCanvas()}layout(i,s){i instanceof y.Dimension?(this._container.style.width=i.width+"px",this._container.style.height=i.height+"px",this._tableContainer.style.width=i.width+"px",this._tableContainer.style.height=i.height+"px"):s===0?(this._container.style.width="100%",this._container.style.height=i+"px",this._tableContainer.style.width="100%",this._tableContainer.style.height=i+"px"):(this._container.style.width=i+"px",this._container.style.height="100%",this._tableContainer.style.width=i+"px",this._tableContainer.style.height="100%"),this.resizeCanvas()}autosizeColumns(){this._grid.autosizeColumns()}set autoScroll(i){this._autoscroll=i}style(i){const s=[];i.tableHeaderBackground&&s.push(`.monaco-table .${this.idPrefix} .slick-header .slick-header-column { background-color: ${i.tableHeaderBackground}; }`),i.tableHeaderForeground&&s.push(`.monaco-table .${this.idPrefix} .slick-header .slick-header-column { color: ${i.tableHeaderForeground}; }`),i.listFocusBackground&&(s.push(`.monaco-table.${this.idPrefix}.focused .slick-row .active { background-color: ${i.listFocusBackground}; }`),s.push(`.monaco-table.${this.idPrefix}.focused .slick-row .active:hover { background-color: ${i.listFocusBackground}; }`)),i.listFocusForeground&&s.push(`.monaco-table.${this.idPrefix}.focused .slick-row .active { color: ${i.listFocusForeground}; }`),i.listActiveSelectionBackground&&(s.push(`.monaco-table.${this.idPrefix}.focused .slick-row .selected { background-color: ${i.listActiveSelectionBackground}; }`),s.push(`.monaco-table.${this.idPrefix}.focused .slick-row .selected:hover { background-color: ${i.listActiveSelectionBackground}; }`)),i.listActiveSelectionForeground&&s.push(`.monaco-table.${this.idPrefix}.focused .slick-row .selected { color: ${i.listActiveSelectionForeground}; }`),i.listFocusAndSelectionBackground&&s.push(`.monaco-table.${this.idPrefix}.focused .slick-row .selected.active { background-color: ${i.listFocusAndSelectionBackground}; }`),i.listFocusAndSelectionForeground&&s.push(`.monaco-table.${this.idPrefix}.focused .slick-row .selected.active { color: ${i.listFocusAndSelectionForeground}; }`),i.listInactiveFocusBackground&&(s.push(`.monaco-table.${this.idPrefix} .slick-row .selected.active { background-color: ${i.listInactiveFocusBackground}; }`),s.push(`.monaco-table.${this.idPrefix} .slick-row .selected.active:hover { background-color: ${i.listInactiveFocusBackground}; }`)),i.listInactiveSelectionBackground&&(s.push(`.monaco-table.${this.idPrefix} .slick-row .selected { background-color: ${i.listInactiveSelectionBackground}; }`),s.push(`.monaco-table.${this.idPrefix} .slick-row .selected:hover { background-color: ${i.listInactiveSelectionBackground}; }`)),i.listInactiveSelectionForeground&&s.push(`.monaco-table.${this.idPrefix} .slick-row .selected { color: ${i.listInactiveSelectionForeground}; }`),i.listHoverBackground&&(s.push(`.monaco-table.${this.idPrefix} .slick-row:hover { background-color: ${i.listHoverBackground}; }`),s.push(`.monaco-table.${this.idPrefix} .drag .slick-row:hover { background-color: inherit; }`)),i.listHoverForeground&&(s.push(`.monaco-table.${this.idPrefix} .slick-row:hover { color: ${i.listHoverForeground}; }`),s.push(`.monaco-table.${this.idPrefix} .drag .slick-row:hover { color: inherit; }`)),i.listSelectionOutline&&s.push(`.monaco-table.${this.idPrefix} .slick-row .selected.active { outline: 1px dotted ${i.listSelectionOutline}; outline-offset: -1px; }`),i.listFocusOutline&&(s.push(`.monaco-table.${this.idPrefix}.focused .slick-row .selected { outline: 1px solid ${i.listFocusOutline}; outline-offset: -1px; }`),s.push(`.monaco-table.${this.idPrefix}.focused .slick-row .selected.active { outline: 2px solid ${i.listFocusOutline}; outline-offset: -1px; }`)),i.listInactiveFocusOutline&&s.push(`.monaco-table.${this.idPrefix} .slick-row .selected .active { outline: 1px dotted ${i.listInactiveFocusOutline}; outline-offset: -1px; }`),i.listHoverOutline&&s.push(`.monaco-table.${this.idPrefix} .slick-row:hover { outline: 1px dashed ${i.listHoverOutline}; outline-offset: -1px; }`),this.styleElement.innerHTML=s.join(` `)}setOptions(i){this._grid.setOptions(i),this._grid.invalidate()}setTableTitle(i){this._tableContainer.title=i}removeAriaRowCount(){this._tableContainer.removeAttribute("aria-rowcount")}set ariaRowCount(i){this._tableContainer.setAttribute("aria-rowcount",i.toString())}removeAriaColumnCount(){this._tableContainer.removeAttribute("aria-colcount")}set ariaColumnCount(i){this._tableContainer.setAttribute("aria-colcount",i.toString())}set ariaRole(i){this._tableContainer.setAttribute("role",i)}set ariaLabel(i){this._tableContainer.setAttribute("aria-label",i)}get container(){return this._tableContainer}}e.Table=a}),define(Q[1114],Y([1,0,187,59,256,558,67,272,201,1043]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeGrid=void 0;function m(h,a,r=b.defaultCellValueGetter){let i=(0,b.defaultFilter)(h,a,r);return i=i.filter(s=>{let o=h[s.parent];for(;o;){if(!o.expanded)return!1;o=h[o.parent]}return!0}),i}class S extends t.Table{constructor(a,r,i,s,o,u){super(a,r,i,s,o,u),this._tableContainer.setAttribute("role","treegrid"),o?.dataProvider&&o.dataProvider instanceof b.TableDataView?this._data=o.dataProvider:this._data=new b.TableDataView(o&&o.dataProvider,void 0,void 0,m,void 0),this._grid.onClick.subscribe((d,p)=>(this.setRowExpandedState(p.row),!1)),this._grid.onKeyDown.subscribe((d,p)=>{const c=d.originalEvent;if(c instanceof KeyboardEvent){let l=new T.StandardKeyboardEvent(c);if(l.keyCode===3)return this.setRowExpandedState(p.row),!1;if(l.keyCode===15){if(p.cell===0)return this.setRowExpandedState(p.row,!1),!1}else if(l.keyCode===17&&p.cell===this._grid.getColumns().length-1)return this.setRowExpandedState(p.row,!0),!1}return!0}),this._grid.onRendered.subscribe((d,p)=>{const c=this._grid.getViewport();for(let l=c.top;l<=c.bottom;l++){const n=this._data.getItem(l),g=this._tableContainer.querySelector(`div [role="row"][aria-rowindex="${l+1}"]`);if(g){const w=g.querySelector(".slick-cell.l0");w&&(n.expanded!==void 0?w.ariaExpanded=n.expanded:w.removeAttribute("aria-expanded")),n.setSize!==void 0?g.ariaSetSize=n.setSize:g.removeAttribute("aria-setsize"),n.posInSet!==void 0?g.ariaPosInSet=n.posInSet:g.removeAttribute("aria-posinset"),n.level!==void 0&&(g.ariaLevel=n.level)}}return!1}),this.style(s)}setData(a){a instanceof b.TableDataView||a instanceof D.AsyncDataProvider?this._data=a:this._data=new b.TableDataView(a,void 0,void 0,m),this.addTreeGridDataAttributes(this._data),this._grid.setData(this._data,!0),this._data.filter(this._grid.getColumns())}set columns(a){a[0]&&(a[0].formatter=(0,f.createTreeGridExpandableColumnFormatter)(a[0].formatter??f.textFormatter)),super.columns=a}setRowExpandedState(a,r){const i=this._data.getItem(a);i.isParent&&(r===void 0?i.expanded=!i.expanded:i.expanded=r,this._data.filter(this._grid.getColumns()),this.rerenderGrid(),this.focus())}addTreeGridDataAttributes(a){for(let r=0;r<a.getLength();r++){const i=a.getItem(r);if(i.parent===void 0||i.parent===-1)i.level=1;else{const s=a.getItem(i.parent);i.level=s.level+1,s.setSize===void 0?s.setSize=1:s.setSize+=1,i.posInSet=s.setSize,s.expanded===void 0&&(s.expanded=!1),s.isParent=!0,s._guid||(s._guid=(0,y.generateUuid)()),i.parentGuid=s._guid}}}style(a){super.style(a);const r=[];a.listFocusAndSelectionForeground&&r.push(`.monaco-table.${this.idPrefix}.focused .slick-row .selected.active .codicon.toggle { color: ${a.listFocusAndSelectionForeground}; }`),a.listInactiveSelectionForeground&&r.push(`.monaco-table.${this.idPrefix} .slick-row .selected.active .codicon.toggle { color: ${a.listInactiveSelectionForeground}; }`),r.length>0&&(this.styleElement.innerText+=(0,v.escape)(` `+r.join(` `)))}}e.TreeGrid=S}),define(Q[2305],Y([1,0,647,187,4,7,820]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignerTabPanelView=void 0;class f extends b.Disposable{constructor(m,S){super(),this._tab=m,this._createComponents=S,this._tables=[],this._viewContainer=D.$(".designer-tab-view"),this._componentsContainer=this._viewContainer.appendChild(D.$(".components-grid")),this._createComponents(this._componentsContainer,this._tab.components,t.DesignerRootObjectPath).forEach(a=>{a instanceof y.Table&&this._tables.push(a)})}render(m){m.appendChild(this._viewContainer)}layout(m){this._tables.forEach(S=>{(0,T.layoutDesignerTable)(S,m.width)})}}e.DesignerTabPanelView=f}),define(Q[825],Y([1,0,574,142,14,37,7]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarArrow=e.ARROW_IMG_SIZE=void 0,e.ARROW_IMG_SIZE=11;class f extends y.Widget{constructor(m){super(),this._onActivate=m.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=m.bgWidth+"px",this.bgDomNode.style.height=m.bgHeight+"px",typeof m.top<"u"&&(this.bgDomNode.style.top="0px"),typeof m.left<"u"&&(this.bgDomNode.style.left="0px"),typeof m.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof m.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=m.className,this.domNode.classList.add(...D.ThemeIcon.asClassNameArray(m.icon)),this.domNode.style.position="absolute",this.domNode.style.width=e.ARROW_IMG_SIZE+"px",this.domNode.style.height=e.ARROW_IMG_SIZE+"px",typeof m.top<"u"&&(this.domNode.style.top=m.top+"px"),typeof m.left<"u"&&(this.domNode.style.left=m.left+"px"),typeof m.bottom<"u"&&(this.domNode.style.bottom=m.bottom+"px"),typeof m.right<"u"&&(this.domNode.style.right=m.right+"px"),this._pointerMoveMonitor=this._register(new t.GlobalPointerMoveMonitor),this._register(T.addStandardDisposableListener(this.bgDomNode,T.EventType.POINTER_DOWN,S=>this._arrowPointerDown(S))),this._register(T.addStandardDisposableListener(this.domNode,T.EventType.POINTER_DOWN,S=>this._arrowPointerDown(S))),this._pointerdownRepeatTimer=this._register(new b.IntervalTimer),this._pointerdownScheduleRepeatTimer=this._register(new b.TimeoutTimer)}_arrowPointerDown(m){if(!m.target||!(m.target instanceof Element))return;const S=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(S,200),this._pointerMoveMonitor.startMonitoring(m.target,m.pointerId,m.buttons,h=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),m.preventDefault()}}e.ScrollbarArrow=f}),define(Q[1115],Y([1,0,7,140,574,825,2300,142,18]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractScrollbar=void 0;const m=140;class S extends f.Widget{constructor(a){super(),this._lazyRender=a.lazyRender,this._host=a.host,this._scrollable=a.scrollable,this._scrollByPage=a.scrollByPage,this._scrollbarState=a.scrollbarState,this._visibilityController=this._register(new T.ScrollbarVisibilityController(a.visibility,"visible scrollbar "+a.extraScrollbarClassName,"invisible scrollbar "+a.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new b.GlobalPointerMoveMonitor),this._shouldRender=!0,this.domNode=(0,y.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(t.addDisposableListener(this.domNode.domNode,t.EventType.POINTER_DOWN,r=>this._domNodePointerDown(r)))}_createArrow(a){const r=this._register(new D.ScrollbarArrow(a));this.domNode.domNode.appendChild(r.bgDomNode),this.domNode.domNode.appendChild(r.domNode)}_createSlider(a,r,i,s){this.slider=(0,y.createFastDomNode)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(a),this.slider.setLeft(r),typeof i=="number"&&this.slider.setWidth(i),typeof s=="number"&&this.slider.setHeight(s),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(t.addDisposableListener(this.slider.domNode,t.EventType.POINTER_DOWN,o=>{o.button===0&&(o.preventDefault(),this._sliderPointerDown(o))})),this.onclick(this.slider.domNode,o=>{o.leftButton&&o.stopPropagation()})}_onElementSize(a){return this._scrollbarState.setVisibleSize(a)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(a){return this._scrollbarState.setScrollSize(a)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(a){return this._scrollbarState.setScrollPosition(a)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(a){a.target===this.domNode.domNode&&this._onPointerDown(a)}delegatePointerDown(a){const r=this.domNode.domNode.getClientRects()[0].top,i=r+this._scrollbarState.getSliderPosition(),s=r+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderPointerPosition(a);i<=o&&o<=s?a.button===0&&(a.preventDefault(),this._sliderPointerDown(a)):this._onPointerDown(a)}_onPointerDown(a){let r,i;if(a.target===this.domNode.domNode&&typeof a.offsetX=="number"&&typeof a.offsetY=="number")r=a.offsetX,i=a.offsetY;else{const o=t.getDomNodePagePosition(this.domNode.domNode);r=a.pageX-o.left,i=a.pageY-o.top}const s=this._pointerDownRelativePosition(r,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(s):this._scrollbarState.getDesiredScrollPositionFromOffset(s)),a.button===0&&(a.preventDefault(),this._sliderPointerDown(a))}_sliderPointerDown(a){if(!a.target||!(a.target instanceof Element))return;const r=this._sliderPointerPosition(a),i=this._sliderOrthogonalPointerPosition(a),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(a.target,a.pointerId,a.buttons,o=>{const u=this._sliderOrthogonalPointerPosition(o),d=Math.abs(u-i);if(v.isWindows&&d>m){this._setDesiredScrollPositionNow(s.getScrollPosition());return}const c=this._sliderPointerPosition(o)-r;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(c))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(a){const r={};this.writeScrollPosition(r,a),this._scrollable.setScrollPositionNow(r)}updateScrollbarSize(a){this._updateScrollbarSize(a),this._scrollbarState.setScrollbarSize(a),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}e.AbstractScrollbar=S}),define(Q[2306],Y([1,0,129,1115,825,781,32]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalScrollbar=void 0;class f extends y.AbstractScrollbar{constructor(m,S,h){const a=m.getScrollDimensions(),r=m.getCurrentScrollPosition();if(super({lazyRender:S.lazyRender,host:h,scrollbarState:new D.ScrollbarState(S.horizontalHasArrows?S.arrowSize:0,S.horizontal===2?0:S.horizontalScrollbarSize,S.vertical===2?0:S.verticalScrollbarSize,a.width,a.scrollWidth,r.scrollLeft),visibility:S.horizontal,extraScrollbarClassName:"horizontal",scrollable:m,scrollByPage:S.scrollByPage}),S.horizontalHasArrows){const i=(S.arrowSize-b.ARROW_IMG_SIZE)/2,s=(S.horizontalScrollbarSize-b.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:T.Codicon.scrollbarButtonLeft,top:s,left:i,bottom:void 0,right:void 0,bgWidth:S.arrowSize,bgHeight:S.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new t.StandardWheelEvent(null,1,0))}),this._createArrow({className:"scra",icon:T.Codicon.scrollbarButtonRight,top:s,left:void 0,bottom:void 0,right:i,bgWidth:S.arrowSize,bgHeight:S.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new t.StandardWheelEvent(null,-1,0))})}this._createSlider(Math.floor((S.horizontalScrollbarSize-S.horizontalSliderSize)/2),0,void 0,S.horizontalSliderSize)}_updateSlider(m,S){this.slider.setWidth(m),this.slider.setLeft(S)}_renderDomNode(m,S){this.domNode.setWidth(m),this.domNode.setHeight(S),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(m){return this._shouldRender=this._onElementScrollSize(m.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(m.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(m.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(m,S){return m}_sliderPointerPosition(m){return m.pageX}_sliderOrthogonalPointerPosition(m){return m.pageY}_updateScrollbarSize(m){this.slider.setHeight(m)}writeScrollPosition(m,S){m.scrollLeft=S}updateOptions(m){this.updateScrollbarSize(m.horizontal===2?0:m.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(m.vertical===2?0:m.verticalScrollbarSize),this._visibilityController.setVisibility(m.horizontal),this._scrollByPage=m.scrollByPage}}e.HorizontalScrollbar=f}),define(Q[2307],Y([1,0,129,1115,825,781,32]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalScrollbar=void 0;class f extends y.AbstractScrollbar{constructor(m,S,h){const a=m.getScrollDimensions(),r=m.getCurrentScrollPosition();if(super({lazyRender:S.lazyRender,host:h,scrollbarState:new D.ScrollbarState(S.verticalHasArrows?S.arrowSize:0,S.vertical===2?0:S.verticalScrollbarSize,0,a.height,a.scrollHeight,r.scrollTop),visibility:S.vertical,extraScrollbarClassName:"vertical",scrollable:m,scrollByPage:S.scrollByPage}),S.verticalHasArrows){const i=(S.arrowSize-b.ARROW_IMG_SIZE)/2,s=(S.verticalScrollbarSize-b.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:T.Codicon.scrollbarButtonUp,top:i,left:s,bottom:void 0,right:void 0,bgWidth:S.verticalScrollbarSize,bgHeight:S.arrowSize,onActivate:()=>this._host.onMouseWheel(new t.StandardWheelEvent(null,0,1))}),this._createArrow({className:"scra",icon:T.Codicon.scrollbarButtonDown,top:void 0,left:s,bottom:i,right:void 0,bgWidth:S.verticalScrollbarSize,bgHeight:S.arrowSize,onActivate:()=>this._host.onMouseWheel(new t.StandardWheelEvent(null,0,-1))})}this._createSlider(0,Math.floor((S.verticalScrollbarSize-S.verticalSliderSize)/2),S.verticalSliderSize,void 0)}_updateSlider(m,S){this.slider.setHeight(m),this.slider.setTop(S)}_renderDomNode(m,S){this.domNode.setWidth(S),this.domNode.setHeight(m),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(m){return this._shouldRender=this._onElementScrollSize(m.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(m.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(m.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(m,S){return S}_sliderPointerPosition(m){return m.pageY}_sliderOrthogonalPointerPosition(m){return m.pageX}_updateScrollbarSize(m){this.slider.setWidth(m)}writeScrollPosition(m,S){m.scrollTop=S}updateOptions(m){this.updateScrollbarSize(m.vertical===2?0:m.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(m.vertical),this._scrollByPage=m.scrollByPage}}e.VerticalScrollbar=f}),define(Q[162],Y([1,0,97,7,140,129,2306,2307,142,14,6,4,18,481,1689]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomScrollableElement=e.SmoothScrollableElement=e.ScrollableElement=e.AbstractScrollableElement=e.MouseWheelClassifier=void 0;const i=500,s=50,o=!0;class u{constructor(E,C,I){this.timestamp=E,this.deltaX=C,this.deltaY=I,this.score=0}}class d{static{this.INSTANCE=new d}constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let E=1,C=0,I=1,_=this._rear;do{const A=_===this._front?E:Math.pow(2,-I);if(E-=A,C+=this._memory[_].score*A,_===this._front)break;_=(this._capacity+_-1)%this._capacity,I++}while(!0);return C<=.5}acceptStandardWheelEvent(E){const C=window.devicePixelRatio/(0,t.getZoomFactor)();a.isWindows||a.isLinux?this.accept(Date.now(),E.deltaX/C,E.deltaY/C):this.accept(Date.now(),E.deltaX,E.deltaY)}accept(E,C,I){const _=new u(E,C,I);_.score=this._computeScore(_),this._front===-1&&this._rear===-1?(this._memory[0]=_,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]=_)}_computeScore(E){if(Math.abs(E.deltaX)>0&&Math.abs(E.deltaY)>0)return 1;let C=.5;const I=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(E.deltaX)||!this._isAlmostInt(E.deltaY))&&(C+=.25),Math.min(Math.max(C,0),1)}_isAlmostInt(E){return Math.abs(Math.round(E)-E)<.01}}e.MouseWheelClassifier=d;class p extends v.Widget{get options(){return this._options}constructor(E,C,I){super(),this._onScroll=this._register(new S.Emitter),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new S.Emitter),this.onWillScroll=this._onWillScroll.event,E.style.overflow="hidden",this._options=g(C),this._scrollable=I,this._register(this._scrollable.onScroll(A=>{this._onWillScroll.fire(A),this._onDidScroll(A),this._onScroll.fire(A)}));const _={onMouseWheel:A=>this._onMouseWheel(A),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new f.VerticalScrollbar(this._scrollable,this._options,_)),this._horizontalScrollbar=this._register(new T.HorizontalScrollbar(this._scrollable,this._options,_)),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=(0,b.createFastDomNode)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,b.createFastDomNode)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,b.createFastDomNode)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,A=>this._onMouseOver(A)),this.onmouseleave(this._listenOnDomNode,A=>this._onMouseLeave(A)),this._hideTimeout=this._register(new m.TimeoutTimer),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,h.dispose)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(E){this._verticalScrollbar.delegatePointerDown(E)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(E){this._scrollable.setScrollDimensions(E,!1)}updateClassName(E){this._options.className=E,a.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(E){typeof E.handleMouseWheel<"u"&&(this._options.handleMouseWheel=E.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof E.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=E.mouseWheelScrollSensitivity),typeof E.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=E.fastScrollSensitivity),typeof E.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=E.scrollPredominantAxis),typeof E.horizontal<"u"&&(this._options.horizontal=E.horizontal),typeof E.vertical<"u"&&(this._options.vertical=E.vertical),typeof E.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=E.horizontalScrollbarSize),typeof E.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=E.verticalScrollbarSize),typeof E.scrollByPage<"u"&&(this._options.scrollByPage=E.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(E){this._revealOnScroll=E}delegateScrollFromMouseWheelEvent(E){this._onMouseWheel(new D.StandardWheelEvent(E))}_setListeningToMouseWheel(E){if(this._mouseWheelToDispose.length>0!==E&&(this._mouseWheelToDispose=(0,h.dispose)(this._mouseWheelToDispose),E)){const I=_=>{this._onMouseWheel(new D.StandardWheelEvent(_))};this._mouseWheelToDispose.push(y.addDisposableListener(this._listenOnDomNode,y.EventType.MOUSE_WHEEL,I,{passive:!1}))}}_onMouseWheel(E){if(E.browserEvent?.defaultPrevented)return;const C=d.INSTANCE;o&&C.acceptStandardWheelEvent(E);let I=!1;if(E.deltaY||E.deltaX){let A=E.deltaY*this._options.mouseWheelScrollSensitivity,k=E.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&k+A===0?k=A=0:Math.abs(A)>=Math.abs(k)?k=0:A=0),this._options.flipAxes&&([A,k]=[k,A]);const L=!a.isMacintosh&&E.browserEvent&&E.browserEvent.shiftKey;(this._options.scrollYToX||L)&&!k&&(k=A,A=0),E.browserEvent&&E.browserEvent.altKey&&(k=k*this._options.fastScrollSensitivity,A=A*this._options.fastScrollSensitivity);const R=this._scrollable.getFutureScrollPosition();let M={};if(A){const N=s*A,P=R.scrollTop-(N<0?Math.floor(N):Math.ceil(N));this._verticalScrollbar.writeScrollPosition(M,P)}if(k){const N=s*k,P=R.scrollLeft-(N<0?Math.floor(N):Math.ceil(N));this._horizontalScrollbar.writeScrollPosition(M,P)}M=this._scrollable.validateScrollPosition(M),(R.scrollLeft!==M.scrollLeft||R.scrollTop!==M.scrollTop)&&(o&&this._options.mouseWheelSmoothScroll&&C.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(M):this._scrollable.setScrollPositionNow(M),I=!0)}let _=I;!_&&this._options.alwaysConsumeMouseWheel&&(_=!0),!_&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(_=!0),_&&(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(),C=E.scrollTop>0,I=E.scrollLeft>0,_=I?" left":"",A=C?" top":"",k=I||C?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${_}`),this._topShadowDomNode.setClassName(`shadow${A}`),this._topLeftShadowDomNode.setClassName(`shadow${k}${A}${_}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(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(),i)}}e.AbstractScrollableElement=p;class c extends p{constructor(E,C){C=C||{},C.mouseWheelSmoothScroll=!1;const I=new r.Scrollable({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:_=>y.scheduleAtNextAnimationFrame(_)});super(E,C,I),this._register(I)}setScrollPosition(E){this._scrollable.setScrollPositionNow(E)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.ScrollableElement=c;class l extends p{constructor(E,C,I){super(E,C,I)}setScrollPosition(E){E.reuseAnimation?this._scrollable.setScrollPositionSmooth(E,E.reuseAnimation):this._scrollable.setScrollPositionNow(E)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.SmoothScrollableElement=l;class n extends p{constructor(E,C){C=C||{},C.mouseWheelSmoothScroll=!1;const I=new r.Scrollable({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:_=>y.scheduleAtNextAnimationFrame(_)});super(E,C,I),this._register(I),this._element=E,this.onScroll(_=>{_.scrollTopChanged&&(this._element.scrollTop=_.scrollTop),_.scrollLeftChanged&&(this._element.scrollLeft=_.scrollLeft)}),this.scanDomNode()}setScrollPosition(E){this._scrollable.setScrollPositionNow(E)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}e.DomScrollableElement=n;function g(w){const E={lazyRender:typeof w.lazyRender<"u"?w.lazyRender:!1,className:typeof w.className<"u"?w.className:"",useShadows:typeof w.useShadows<"u"?w.useShadows:!0,handleMouseWheel:typeof w.handleMouseWheel<"u"?w.handleMouseWheel:!0,flipAxes:typeof w.flipAxes<"u"?w.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof w.consumeMouseWheelIfScrollbarIsNeeded<"u"?w.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof w.alwaysConsumeMouseWheel<"u"?w.alwaysConsumeMouseWheel:!1,scrollYToX:typeof w.scrollYToX<"u"?w.scrollYToX:!1,mouseWheelScrollSensitivity:typeof w.mouseWheelScrollSensitivity<"u"?w.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof w.fastScrollSensitivity<"u"?w.fastScrollSensitivity:5,scrollPredominantAxis:typeof w.scrollPredominantAxis<"u"?w.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof w.mouseWheelSmoothScroll<"u"?w.mouseWheelSmoothScroll:!0,arrowSize:typeof w.arrowSize<"u"?w.arrowSize:11,listenOnDomNode:typeof w.listenOnDomNode<"u"?w.listenOnDomNode:null,horizontal:typeof w.horizontal<"u"?w.horizontal:1,horizontalScrollbarSize:typeof w.horizontalScrollbarSize<"u"?w.horizontalScrollbarSize:10,horizontalSliderSize:typeof w.horizontalSliderSize<"u"?w.horizontalSliderSize:0,horizontalHasArrows:typeof w.horizontalHasArrows<"u"?w.horizontalHasArrows:!1,vertical:typeof w.vertical<"u"?w.vertical:1,verticalScrollbarSize:typeof w.verticalScrollbarSize<"u"?w.verticalScrollbarSize:10,verticalHasArrows:typeof w.verticalHasArrows<"u"?w.verticalHasArrows:!1,verticalSliderSize:typeof w.verticalSliderSize<"u"?w.verticalSliderSize:0,scrollByPage:typeof w.scrollByPage<"u"?w.scrollByPage:!1};return E.horizontalSliderSize=typeof w.horizontalSliderSize<"u"?w.horizontalSliderSize:E.horizontalScrollbarSize,E.verticalSliderSize=typeof w.verticalSliderSize<"u"?w.verticalSliderSize:E.verticalScrollbarSize,a.isMacintosh&&(E.className+=" mac"),E}}),define(Q[826],Y([1,0,40,162,7,136]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollableDirective=void 0;let T=class extends D.AngularDisposable{constructor(v){super(),this._el=v,this.useShadow=!1,this.scrollYToX=!1}ngOnInit(){this.scrolled=this._el.nativeElement,this.parent=this.scrolled.parentElement;const v=this.scrolled.nextSibling;this.parent.removeChild(this.scrolled),this.scrolled.style.position="relative",this.scrollableElement=new y.ScrollableElement(this.scrolled,{horizontal:this.horizontalScroll,vertical:this.verticalScroll,useShadows:this.useShadow,scrollYToX:this.scrollYToX,horizontalScrollbarSize:3}),this.scrollableElement.onScroll(h=>{this.verticalScroll===1?this.scrolled.style.bottom=h.scrollTop+"px":this.horizontalScroll===1&&(this.scrolled.scrollLeft=h.scrollLeft)}),this.parent.insertBefore(this.scrollableElement.getDomNode(),v);const m=(0,b.getContentHeight)(this.scrolled),S=(0,b.getContentWidth)(this.scrolled);this.resetScrollDimensions(),this._register((0,b.addDisposableListener)(window,b.EventType.RESIZE,()=>{this.resetScrollDimensions()})),setTimeout(()=>{let h=(0,b.getContentHeight)(this.scrolled),a=(0,b.getContentWidth)(this.scrolled);(m!==h||S!==a)&&this.resetScrollDimensions()},200)}resetScrollDimensions(){this.scrollableElement.setScrollDimensions({scrollHeight:this.verticalScroll===1?(0,b.getContentHeight)(this.scrolled):void 0,height:this.verticalScroll===1?(0,b.getContentHeight)(this.parent):void 0,scrollWidth:this.horizontalScroll===1?this.scrolled.scrollWidth:void 0,width:this.horizontalScroll===1?this.scrolled.offsetWidth:void 0})}layout(){this.resetScrollDimensions()}};e.ScrollableDirective=T,fe([(0,t.Input)()],T.prototype,"horizontalScroll",void 0),fe([(0,t.Input)()],T.prototype,"verticalScroll",void 0),fe([(0,t.Input)()],T.prototype,"useShadow",void 0),fe([(0,t.Input)()],T.prototype,"scrollYToX",void 0),e.ScrollableDirective=T=fe([(0,t.Directive)({selector:"[scrollable]"}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef)))],T)}),define(Q[1116],Y([1,0,40,341,826]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollableModule=void 0;let D=class{};e.ScrollableModule=D,e.ScrollableModule=D=fe([(0,t.NgModule)({imports:[y.CommonModule],exports:[b.ScrollableDirective],declarations:[b.ScrollableDirective]})],D)}),define(Q[2308],Y([1,0,1031,162,481,42,7,4,6,557,226,227,1560]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollableView=void 0;const a={useShadows:!0,verticalScrollMode:1,scrollDebouce:25};class r extends f.Disposable{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get length(){return this.items.length}constructor(s,o=a){super(),this.rangeMap=new t.RangeMap,this.viewContainer=T.$("div.scrollable-view-container"),this.domNode=T.$("div.scrollable-view"),this._scrollHeight=0,this.renderHeight=0,this.lastRenderTop=0,this.lastRenderHeight=0,this.items=[],this.width=0,this.additionalScrollHeight=typeof o.additionalScrollHeight>"u"?0:o.additionalScrollHeight,this.scrollable=new b.Scrollable({forceIntegerValues:!0,smoothScrollDuration:(0,D.getOrDefault)(o,u=>u.smoothScrolling,!1)?125:0,scheduleAtNextAnimationFrame:u=>T.scheduleAtNextAnimationFrame(u)}),this.scrollableElement=this._register(new y.SmoothScrollableElement(this.viewContainer,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:(0,D.getOrDefault)(o,u=>u.verticalScrollMode,a.verticalScrollMode),useShadows:(0,D.getOrDefault)(o,u=>u.useShadows,a.useShadows)},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),s.appendChild(this.domNode),this._register(v.Event.debounce(this.scrollableElement.onScroll,(u,d)=>d,(0,D.getOrDefault)(o,u=>u.scrollDebouce,a.scrollDebouce))(this.onScroll,this)),this._register(new h.DomEmitter(this.scrollableElement.getDomNode(),"scroll")).event(u=>u.target.scrollTop=0)}elementTop(s){return this.rangeMap.positionAt(s)}layout(s,o){let u={height:typeof s=="number"?s:T.getContentHeight(this.domNode)};this.renderHeight=u.height,this.width=o??T.getContentWidth(this.domNode),this.calculateItemHeights(),this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=void 0,u.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(u),this.rerender(this.getRenderRange(this.lastRenderTop,this.lastRenderHeight))}setScrollTop(s){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=void 0,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:s})}rerender(s){this.calculateItemHeights(),this.render(s,this.lastRenderTop,this.lastRenderHeight,!0),this.eventuallyUpdateScrollDimensions()}addViews(s){const o=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),u=s.map(d=>({size:d.minimumSize,view:d,disposables:[],index:0}));u.map(d=>d.disposables.push(d.view.onDidChange(()=>this.rerender(this.getRenderRange(this.lastRenderTop,this.lastRenderHeight))))),this.splice(this.items.length,0,u),this.rerender(o)}splice(s,o,u=[]){return this.rangeMap.splice(s,o,u),this.items.splice(s,o,...u)}addView(s){this.addViews([s])}clear(){const s=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);for(const o of this.items)o.domNode&&(T.clearNode(o.domNode),o.domNode.remove(),o.domNode=void 0),(0,f.dispose)(o.disposables);this.splice(0,this.items.length),this.rerender(s)}calculateItemHeights(){let s=0;for(const o of this.items)if(s+=o.view.minimumSize,s>this.renderHeight)break;if(s>this.renderHeight)this.items.forEach((o,u)=>{o.size!==o.view.minimumSize&&(o.size=o.view.minimumSize,this.rangeMap.splice(u,1,[o]))});else{let o=this.renderHeight;this.items.forEach((u,d)=>{const p=Math.floor(o/(this.items.length-d)),c=(0,S.clamp)(p,u.view.minimumSize,u.view.maximumSize);u.size!==c&&(u.size=c,this.rangeMap.splice(d,1,[u])),o-=u.size})}}get scrollHeight(){return this._scrollHeight+this.additionalScrollHeight}onScroll(s){const o=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(o,s.scrollTop,s.height)}getRenderRange(s,o){return{start:this.rangeMap.indexAt(s),end:this.rangeMap.indexAfter(s+o-1)}}render(s,o,u,d=!1){const p=this.getRenderRange(o,u),c=m.Range.relativeComplement(p,s),l=m.Range.relativeComplement(s,p),n=this.getNextToLastElement(c);if(d){const g=m.Range.intersect(s,p);for(let w=g.start;w<g.end;w++)this.updateItemInDOM(this.items[w],w)}for(const g of c)for(let w=g.start;w<g.end;w++)this.insertItemInDOM(w,n);for(const g of l)for(let w=g.start;w<g.end;w++)this.removeItemFromDOM(w);this.viewContainer.style.top=`-${o}px`,this.lastRenderTop=o,this.lastRenderHeight=u}insertItemInDOM(s,o){const u=this.items[s];u.domNode||(u.domNode=T.$("div.scrollable-view-child"),u.domNode.appendChild(u.view.element)),u.domNode.parentElement||(o?this.viewContainer.insertBefore(u.domNode,o):this.viewContainer.appendChild(u.domNode)),this.updateItemInDOM(u,s,!1),u.onDidRemoveDisposable?.dispose(),u.onDidInsertDisposable=T.scheduleAtNextAnimationFrame(async()=>{u.view.onDidInsert&&await u.view.onDidInsert(),u.view.layout(u.size,this.width)})}updateItemInDOM(s,o,u=!0){s.domNode.style.top=`${this.elementTop(o)}px`,s.domNode.style.width=`${this.width}px`,s.domNode.style.height=`${s.size}px`,u&&T.scheduleAtNextAnimationFrame(()=>{s.view.layout(s.size,this.width)})}removeItemFromDOM(s){const o=this.items[s];o&&o.domNode&&(o.domNode.remove(),o.onDidInsertDisposable?.dispose(),o.view.onDidRemove&&(o.onDidRemoveDisposable=T.scheduleAtNextAnimationFrame(()=>{o.view.onDidRemove()})))}getNextToLastElement(s){const o=s[s.length-1];if(!o)return;const u=this.items[o.end];if(u)return u.domNode}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.viewContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=T.scheduleAtNextAnimationFrame(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.scrollableElementUpdateDisposable=void 0}))}}e.ScrollableView=r}),define(Q[2309],Y([1,0,7,162,20,37,6,4,1674]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbsWidget=e.BreadcrumbsItem=void 0;class v{dispose(){}}e.BreadcrumbsItem=v;class m{constructor(h,a,r,i){this._disposables=new f.DisposableStore,this._onDidSelectItem=new T.Emitter,this._onDidFocusItem=new T.Emitter,this._onDidChangeFocus=new T.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._enabled=!0,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 y.DomScrollableElement(this._domNode,{vertical:2,horizontal:1,horizontalScrollbarSize:a,useShadows:!1,scrollYToX:!0}),this._separatorIcon=r,this._disposables.add(this._scrollable),this._disposables.add(t.addStandardDisposableListener(this._domNode,"click",u=>this._onClick(u))),h.appendChild(this._scrollable.getDomNode());const s=t.createStyleSheet(this._domNode);this._style(s,i);const o=t.trackFocus(this._domNode);this._disposables.add(o),this._disposables.add(o.onDidBlur(u=>this._onDidChangeFocus.fire(!1))),this._disposables.add(o.onDidFocus(u=>this._onDidChangeFocus.fire(!0)))}setHorizontalScrollbarSize(h){this._scrollable.updateOptions({horizontalScrollbarSize:h})}dispose(){this._disposables.dispose(),this._pendingLayout?.dispose(),this._onDidSelectItem.dispose(),this._onDidFocusItem.dispose(),this._onDidChangeFocus.dispose(),this._domNode.remove(),this._nodes.length=0,this._freeNodes.length=0}layout(h){h&&t.Dimension.equals(h,this._dimension)||(this._pendingLayout?.dispose(),h?this._pendingLayout=this._updateDimensions(h):this._pendingLayout=this._updateScrollbar())}_updateDimensions(h){const a=new f.DisposableStore;return a.add(t.modify(()=>{this._dimension=h,this._domNode.style.width=`${h.width}px`,this._domNode.style.height=`${h.height}px`,a.add(this._updateScrollbar())})),a}_updateScrollbar(){return t.measure(()=>{t.measure(()=>{this._scrollable.setRevealOnScroll(!1),this._scrollable.scanDomNode(),this._scrollable.setRevealOnScroll(!0)})})}_style(h,a){let r="";a.breadcrumbsBackground&&(r+=`.monaco-breadcrumbs { background-color: ${a.breadcrumbsBackground}}`),a.breadcrumbsForeground&&(r+=`.monaco-breadcrumbs .monaco-breadcrumb-item { color: ${a.breadcrumbsForeground}} `),a.breadcrumbsFocusForeground&&(r+=`.monaco-breadcrumbs .monaco-breadcrumb-item.focused { color: ${a.breadcrumbsFocusForeground}} `),a.breadcrumbsFocusAndSelectionForeground&&(r+=`.monaco-breadcrumbs .monaco-breadcrumb-item.focused.selected { color: ${a.breadcrumbsFocusAndSelectionForeground}} `),a.breadcrumbsHoverForeground&&(r+=`.monaco-breadcrumbs:not(.disabled ) .monaco-breadcrumb-item:hover:not(.focused):not(.selected) { color: ${a.breadcrumbsHoverForeground}} `),h.innerText=r}setEnabled(h){this._enabled=h,this._domNode.classList.toggle("disabled",!this._enabled)}domFocus(){const h=this._focusedItemIdx>=0?this._focusedItemIdx:this._items.length-1;h>=0&&h<this._items.length?this._focus(h,void 0):this._domNode.focus()}isDOMFocused(){let h=document.activeElement;for(;h;){if(this._domNode===h)return!0;h=h.parentElement}return!1}getFocused(){return this._items[this._focusedItemIdx]}setFocused(h,a){this._focus(this._items.indexOf(h),a)}focusPrev(h){this._focusedItemIdx>0&&this._focus(this._focusedItemIdx-1,h)}focusNext(h){this._focusedItemIdx+1<this._nodes.length&&this._focus(this._focusedItemIdx+1,h)}_focus(h,a){this._focusedItemIdx=-1;for(let r=0;r<this._nodes.length;r++){const i=this._nodes[r];r!==h?i.classList.remove("focused"):(this._focusedItemIdx=r,i.classList.add("focused"),i.focus())}this._reveal(this._focusedItemIdx,!0),this._onDidFocusItem.fire({type:"focus",item:this._items[this._focusedItemIdx],node:this._nodes[this._focusedItemIdx],payload:a})}reveal(h){const a=this._items.indexOf(h);a>=0&&this._reveal(a,!1)}revealLast(){this._reveal(this._items.length-1,!1)}_reveal(h,a){if(h<0||h>=this._nodes.length)return;const r=this._nodes[h];if(!r)return;const{width:i}=this._scrollable.getScrollDimensions(),{scrollLeft:s}=this._scrollable.getScrollPosition();(!a||r.offsetLeft>s+i||r.offsetLeft<s)&&(this._scrollable.setRevealOnScroll(!1),this._scrollable.setScrollPosition({scrollLeft:r.offsetLeft}),this._scrollable.setRevealOnScroll(!0))}getSelection(){return this._items[this._selectedItemIdx]}setSelection(h,a){this._select(this._items.indexOf(h),a)}_select(h,a){this._selectedItemIdx=-1;for(let r=0;r<this._nodes.length;r++){const i=this._nodes[r];r!==h?i.classList.remove("selected"):(this._selectedItemIdx=r,i.classList.add("selected"))}this._onDidSelectItem.fire({type:"select",item:this._items[this._selectedItemIdx],node:this._nodes[this._selectedItemIdx],payload:a})}getItems(){return this._items}setItems(h){let a,r=[];try{a=(0,b.commonPrefixLength)(this._items,h,(i,s)=>i.equals(s)),r=this._items.splice(a,this._items.length-a,...h.slice(a)),this._render(a),(0,f.dispose)(r),this._focus(-1,void 0)}catch(i){const s=new Error(`BreadcrumbsItem#setItems: newItems: ${h.length}, prefix: ${a}, removed: ${r.length}`);throw s.name=i.name,s.stack=i.stack,s}}_render(h){let a=!1;for(;h<this._items.length&&h<this._nodes.length;h++){const r=this._items[h],i=this._nodes[h];this._renderItem(r,i),a=!0}for(;h<this._nodes.length;){const r=this._nodes.pop();r&&(this._freeNodes.push(r),r.remove(),a=!0)}for(;h<this._items.length;h++){const r=this._items[h],i=this._freeNodes.length>0?this._freeNodes.pop():document.createElement("div");i&&(this._renderItem(r,i),this._domNode.appendChild(i),this._nodes.push(i),a=!0)}a&&this.layout(void 0)}_renderItem(h,a){t.clearNode(a),a.className="";try{h.render(a)}catch(i){a.innerText="<<RENDER ERROR>>",console.error(i)}a.tabIndex=-1,a.setAttribute("role","listitem"),a.classList.add("monaco-breadcrumb-item");const r=t.$(D.ThemeIcon.asCSSSelector(this._separatorIcon));a.appendChild(r)}_onClick(h){if(this._enabled)for(let a=h.target;a;a=a.parentElement){const r=this._nodes.indexOf(a);if(r>=0){this._focus(r,h),this._select(r,h);break}}}}e.BreadcrumbsWidget=m}),define(Q[827],Y([1,0,7,67,162,4,2262,1681]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHoverAccessibleViewHint=e.HoverAction=e.HoverWidget=e.HoverPosition=void 0;const f=t.$;var v;(function(a){a[a.LEFT=0]="LEFT",a[a.RIGHT=1]="RIGHT",a[a.BELOW=2]="BELOW",a[a.ABOVE=3]="ABOVE"})(v||(e.HoverPosition=v={}));class m extends D.Disposable{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new b.DomScrollableElement(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}e.HoverWidget=m;class S extends D.Disposable{static render(r,i,s){return new S(r,i,s)}constructor(r,i,s){super(),this.actionContainer=t.append(r,f("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=t.append(this.actionContainer,f("a.action")),this.action.setAttribute("role","button"),i.iconClass&&t.append(this.action,f(`span.icon.${i.iconClass}`));const o=t.append(this.action,f("span"));o.textContent=s?`${i.label} (${s})`:i.label,this._register(t.addDisposableListener(this.actionContainer,t.EventType.CLICK,u=>{u.stopPropagation(),u.preventDefault(),i.run(this.actionContainer)})),this._register(t.addDisposableListener(this.actionContainer,t.EventType.KEY_DOWN,u=>{const d=new y.StandardKeyboardEvent(u);(d.equals(3)||d.equals(10))&&(u.stopPropagation(),u.preventDefault(),i.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(r){r?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}e.HoverAction=S;function h(a,r){return a&&r?(0,T.localize)(0,null,r):a?(0,T.localize)(1,null):""}e.getHoverAccessibleViewHint=h}),define(Q[401],Y([1,0,240,7,227,151,162,20,14,102,6,4,557,481,1031,2298,15]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListView=e.NativeDragAndDropData=e.ExternalElementsDragAndDropData=e.ElementsDragAndDropData=e.StaticDND=void 0,e.StaticDND={CurrentDragAndDropData:void 0};const u={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(w){return[w]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class d{get context(){return this._context}set context(E){this._context=E}constructor(E){this.elements=E}update(){}getData(){return this.elements}}e.ElementsDragAndDropData=d;class p{constructor(E){this.elements=E}update(){}getData(){return this.elements}}e.ExternalElementsDragAndDropData=p;class c{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 C=0;C<E.files.length;C++){const I=E.files.item(C);I&&(I.size||I.type)&&this.files.push(I)}}}getData(){return{types:this.types,files:this.files}}}e.NativeDragAndDropData=c;function l(w,E){return Array.isArray(w)&&Array.isArray(E)?(0,f.equals)(w,E):w===E}class n{constructor(E){E?.getSetSize?this.getSetSize=E.getSetSize.bind(E):this.getSetSize=(C,I,_)=>_,E?.getPosInSet?this.getPosInSet=E.getPosInSet.bind(E):this.getPosInSet=(C,I)=>I+1,E?.getRole?this.getRole=E.getRole.bind(E):this.getRole=C=>"listitem",E?.isChecked?this.isChecked=E.isChecked.bind(E):this.isChecked=C=>{}}}class g{static{this.InstanceCount=0}get contentHeight(){return this.rangeMap.size}get contentWidth(){return this.scrollWidth??0}get onDidScroll(){return this.scrollableElement.onScroll}get onWillScroll(){return this.scrollableElement.onWillScroll}get containerDomNode(){return this.rowsContainer}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}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 C of this.items)this.measureItemWidth(C);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,y.getContentWidth)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(E,C,I,_=u){if(this.virtualDelegate=C,this.domId=`list_id_${++g.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=h.Disposable.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=h.Disposable.None,this.onDragLeaveTimeout=h.Disposable.None,this.disposables=new h.DisposableStore,this._onDidChangeContentHeight=new S.Emitter,this._onDidChangeContentWidth=new S.Emitter,this.onDidChangeContentHeight=S.Event.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this.onDidChangeContentWidth=S.Event.latch(this._onDidChangeContentWidth.event,void 0,this.disposables),this._horizontalScrolling=!1,_.horizontalScrolling&&_.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new i.RangeMap(_.paddingTop??0);for(const k of I)this.renderers.set(k.templateId,k);this.cache=this.disposables.add(new s.RowCache(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof _.mouseSupport=="boolean"?_.mouseSupport:!0),this._horizontalScrolling=_.horizontalScrolling??u.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof _.paddingBottom>"u"?0:_.paddingBottom,this.accessibilityProvider=new n(_.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(_.transformOptimization??u.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(D.Gesture.addTarget(this.rowsContainer)),this.scrollable=new r.Scrollable({forceIntegerValues:!0,smoothScrollDuration:_.smoothScrolling??!1?125:0,scheduleAtNextAnimationFrame:k=>(0,y.scheduleAtNextAnimationFrame)(k)}),this.scrollableElement=this.disposables.add(new T.SmoothScrollableElement(this.rowsContainer,{alwaysConsumeMouseWheel:_.alwaysConsumeMouseWheel??u.alwaysConsumeMouseWheel,horizontal:1,vertical:_.verticalScrollMode??u.verticalScrollMode,useShadows:_.useShadows??u.useShadows,mouseWheelScrollSensitivity:_.mouseWheelScrollSensitivity,fastScrollSensitivity:_.fastScrollSensitivity,scrollByPage:_.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),E.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,y.addDisposableListener)(this.rowsContainer,D.EventType.Change,k=>this.onTouchChange(k))),this.disposables.add((0,y.addDisposableListener)(this.scrollableElement.getDomNode(),"scroll",k=>k.target.scrollTop=0)),this.disposables.add((0,y.addDisposableListener)(this.domNode,"dragover",k=>this.onDragOver(this.toDragEvent(k)))),this.disposables.add((0,y.addDisposableListener)(this.domNode,"drop",k=>this.onDrop(this.toDragEvent(k)))),this.disposables.add((0,y.addDisposableListener)(this.domNode,"dragleave",k=>this.onDragLeave(this.toDragEvent(k)))),this.disposables.add((0,y.addDisposableListener)(this.domNode,"dragend",k=>this.onDragEnd(k))),this.setRowLineHeight=_.setRowLineHeight??u.setRowLineHeight,this.setRowHeight=_.setRowHeight??u.setRowHeight,this.supportDynamicHeights=_.supportDynamicHeights??u.supportDynamicHeights,this.dnd=_.dnd??u.dnd,this.layout(_.initialSize?.height,_.initialSize?.width)}updateOptions(E){E.paddingBottom!==void 0&&(this.paddingBottom=E.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),E.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(E.smoothScrolling?125:0),E.horizontalScrolling!==void 0&&(this.horizontalScrolling=E.horizontalScrolling);let C;if(E.scrollByPage!==void 0&&(C={...C??{},scrollByPage:E.scrollByPage}),E.mouseWheelScrollSensitivity!==void 0&&(C={...C??{},mouseWheelScrollSensitivity:E.mouseWheelScrollSensitivity}),E.fastScrollSensitivity!==void 0&&(C={...C??{},fastScrollSensitivity:E.fastScrollSensitivity}),C&&this.scrollableElement.updateOptions(C),E.paddingTop!==void 0&&E.paddingTop!==this.rangeMap.paddingTop){const I=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),_=E.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=E.paddingTop,this.render(I,Math.max(0,this.lastRenderTop+_),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}delegateScrollFromMouseWheelEvent(E){this.scrollableElement.delegateScrollFromMouseWheelEvent(E)}delegateVerticalScrollbarPointerDown(E){this.scrollableElement.delegateVerticalScrollbarPointerDown(E)}updateElementHeight(E,C,I){if(E<0||E>=this.items.length)return;const _=this.items[E].size;if(typeof C>"u"){if(!this.supportDynamicHeights){console.warn("Dynamic heights not supported");return}this.items[E].lastDynamicHeightWidth=void 0,C=_+this.probeDynamicHeight(E)}if(_===C)return;const A=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);let k=0;E<A.start||I!==null&&I>E&&I<=A.end?k=C-_:k=0,this.rangeMap.splice(E,1,[{size:C}]),this.items[E].size=C,this.render(A,Math.max(0,this.lastRenderTop+k),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}splice(E,C,I=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(E,C,I)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(E,C,I=[]){const _=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),A={start:E,end:E+C},k=a.Range.intersect(_,A),L=new Map;for(let $=k.end-1;$>=k.start;$--){const ie=this.items[$];if(ie.dragStartDisposable.dispose(),ie.checkedDisposable.dispose(),ie.row){let J=L.get(ie.templateId);J||(J=[],L.set(ie.templateId,J));const j=this.renderers.get(ie.templateId);j&&j.disposeElement&&j.disposeElement(ie.element,$,ie.row.templateData,ie.size),J.push(ie.row)}ie.row=null}const R={start:E+C,end:this.items.length},M=a.Range.intersect(R,_),N=a.Range.relativeComplement(R,_),P=I.map($=>({id:String(this.itemId++),element:$,templateId:this.virtualDelegate.getTemplateId($),size:this.virtualDelegate.getHeight($),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight($),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:h.Disposable.None,checkedDisposable:h.Disposable.None}));let x;E===0&&C>=this.items.length?(this.rangeMap=new i.RangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,P),x=this.items,this.items=P):(this.rangeMap.splice(E,C,P),x=this.items.splice(E,C,...P));const F=I.length-C,V=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),W=(0,i.shift)(M,F),z=a.Range.intersect(V,W);for(let $=z.start;$<z.end;$++)this.updateItemInDOM(this.items[$],$);const B=a.Range.relativeComplement(W,V);for(const $ of B)for(let ie=$.start;ie<$.end;ie++)this.removeItemFromDOM(ie);const K=N.map($=>(0,i.shift)($,F)),U=[{start:E,end:E+I.length},...K].map($=>a.Range.intersect(V,$)),G=this.getNextToLastElement(U);for(const $ of U)for(let ie=$.start;ie<$.end;ie++){const J=this.items[ie],ee=L.get(J.templateId)?.pop();this.insertItemInDOM(ie,G,ee)}for(const $ of L.values())for(const ie of $)this.cache.release(ie);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),x.map($=>$.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,y.scheduleAtNextAnimationFrame)(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let E=0;for(const C of this.items)typeof C.width<"u"&&(E=Math.max(E,C.width));this.scrollWidth=E,this.scrollableElement.setScrollDimensions({scrollWidth:E===0?0:E+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}updateWidth(E){if(!this.horizontalScrolling||typeof this.scrollWidth>"u")return;const C=this.items[E];this.measureItemWidth(C),typeof C.width<"u"&&C.width>this.scrollWidth&&(this.scrollWidth=C.width,this.scrollableElement.setScrollDimensions({scrollWidth:this.scrollWidth+10}),this._onDidChangeContentWidth.fire(this.scrollWidth))}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),C=this.rangeMap.positionAt(E.start),I=this.rangeMap.positionAt(E.start+1);return I!==-1&&(I-C)/2+C<this.scrollTop?E.start+1:E.start}get lastVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).end-1}element(E){return this.items[E].element}indexOf(E){return this.items.findIndex(C=>C.element===E)}domElement(E){const C=this.items[E].row;return C&&C.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,C){const I={height:typeof E=="number"?E:(0,y.getContentHeight)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,I.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(I),typeof C<"u"&&(this.renderWidth=C,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof C=="number"?C:(0,y.getContentWidth)(this.domNode)})}render(E,C,I,_,A,k=!1){const L=this.getRenderRange(C,I),R=a.Range.relativeComplement(L,E),M=a.Range.relativeComplement(E,L),N=this.getNextToLastElement(R);if(k){const P=a.Range.intersect(E,L);for(let x=P.start;x<P.end;x++)this.updateItemInDOM(this.items[x],x)}this.cache.transact(()=>{for(const P of M)for(let x=P.start;x<P.end;x++)this.removeItemFromDOM(x);for(const P of R)for(let x=P.start;x<P.end;x++)this.insertItemInDOM(x,N)}),_!==void 0&&(this.rowsContainer.style.left=`-${_}px`),this.rowsContainer.style.top=`-${C}px`,this.horizontalScrolling&&A!==void 0&&(this.rowsContainer.style.width=`${Math.max(A,this.renderWidth)}px`),this.lastRenderTop=C,this.lastRenderHeight=I}insertItemInDOM(E,C,I){const _=this.items[E];let A=!1;if(!_.row)if(I)_.row=I;else{const N=this.cache.alloc(_.templateId);_.row=N.row,A=N.isReusingConnectedDomNode}const k=this.accessibilityProvider.getRole(_.element)||"listitem";_.row.domNode.setAttribute("role",k);const L=this.accessibilityProvider.isChecked(_.element);if(typeof L=="boolean")_.row.domNode.setAttribute("aria-checked",String(!!L));else if(L){const N=P=>_.row.domNode.setAttribute("aria-checked",String(!!P));N(L.value),_.checkedDisposable=L.onDidChange(N)}(A||!_.row.domNode.parentElement)&&(C?this.rowsContainer.insertBefore(_.row.domNode,C):this.rowsContainer.appendChild(_.row.domNode)),this.updateItemInDOM(_,E);const R=this.renderers.get(_.templateId);if(!R)throw new Error(`No renderer found for template id ${_.templateId}`);R?.renderElement(_.element,E,_.row.templateData,_.size);const M=this.dnd.getDragURI(_.element);_.dragStartDisposable.dispose(),_.row.domNode.draggable=!!M,M&&(_.dragStartDisposable=(0,y.addDisposableListener)(_.row.domNode,"dragstart",N=>this.onDragStart(_.element,M,N))),this.horizontalScrolling&&(this.measureItemWidth(_),this.eventuallyUpdateScrollWidth())}measureItemWidth(E){if(!E.row||!E.row.domNode)return;E.row.domNode.style.width="fit-content",E.width=(0,y.getContentWidth)(E.row.domNode);const C=window.getComputedStyle(E.row.domNode);C.paddingLeft&&(E.width+=parseFloat(C.paddingLeft)),C.paddingRight&&(E.width+=parseFloat(C.paddingRight)),E.row.domNode.style.width=""}updateItemInDOM(E,C){E.row.domNode.style.top=`${this.elementTop(C)}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",`${C}`),E.row.domNode.setAttribute("data-last-element",C===this.length-1?"true":"false"),E.row.domNode.setAttribute("data-parity",C%2===0?"even":"odd"),E.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(E.element,C,this.length))),E.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(E.element,C))),E.row.domNode.setAttribute("id",this.getElementDomId(C)),E.row.domNode.classList.toggle("drop-target",E.dropTarget)}removeItemFromDOM(E){const C=this.items[E];if(C.dragStartDisposable.dispose(),C.checkedDisposable.dispose(),C.row){const I=this.renderers.get(C.templateId);I&&I.disposeElement&&I.disposeElement(C.element,E,C.row.templateData,C.size),this.cache.release(C.row),C.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(E,C){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:E,reuseAnimation:C})}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.paddingBottom}get onMouseClick(){return S.Event.map(this.disposables.add(new b.DomEmitter(this.domNode,"click")).event,E=>this.toMouseEvent(E),this.disposables)}get onMouseDblClick(){return S.Event.map(this.disposables.add(new b.DomEmitter(this.domNode,"dblclick")).event,E=>this.toMouseEvent(E),this.disposables)}get onMouseMiddleClick(){return S.Event.filter(S.Event.map(this.disposables.add(new b.DomEmitter(this.domNode,"auxclick")).event,E=>this.toMouseEvent(E),this.disposables),E=>E.browserEvent.button===1,this.disposables)}get onMouseUp(){return S.Event.map(this.disposables.add(new b.DomEmitter(this.domNode,"mouseup")).event,E=>this.toMouseEvent(E),this.disposables)}get onMouseDown(){return S.Event.map(this.disposables.add(new b.DomEmitter(this.domNode,"mousedown")).event,E=>this.toMouseEvent(E),this.disposables)}get onMouseOver(){return S.Event.map(this.disposables.add(new b.DomEmitter(this.domNode,"mouseover")).event,E=>this.toMouseEvent(E),this.disposables)}get onMouseMove(){return S.Event.map(this.disposables.add(new b.DomEmitter(this.domNode,"mousemove")).event,E=>this.toMouseEvent(E),this.disposables)}get onMouseOut(){return S.Event.map(this.disposables.add(new b.DomEmitter(this.domNode,"mouseout")).event,E=>this.toMouseEvent(E),this.disposables)}get onContextMenu(){return S.Event.any(S.Event.map(this.disposables.add(new b.DomEmitter(this.domNode,"contextmenu")).event,E=>this.toMouseEvent(E),this.disposables),S.Event.map(this.disposables.add(new b.DomEmitter(this.domNode,D.EventType.Contextmenu)).event,E=>this.toGestureEvent(E),this.disposables))}get onTouchStart(){return S.Event.map(this.disposables.add(new b.DomEmitter(this.domNode,"touchstart")).event,E=>this.toTouchEvent(E),this.disposables)}get onTap(){return S.Event.map(this.disposables.add(new b.DomEmitter(this.rowsContainer,D.EventType.Tap)).event,E=>this.toGestureEvent(E),this.disposables)}toMouseEvent(E){const C=this.getItemIndexFromEventTarget(E.target||null),I=typeof C>"u"?void 0:this.items[C],_=I&&I.element;return{browserEvent:E,index:C,element:_}}toTouchEvent(E){const C=this.getItemIndexFromEventTarget(E.target||null),I=typeof C>"u"?void 0:this.items[C],_=I&&I.element;return{browserEvent:E,index:C,element:_}}toGestureEvent(E){const C=this.getItemIndexFromEventTarget(E.initialTarget||null),I=typeof C>"u"?void 0:this.items[C],_=I&&I.element;return{browserEvent:E,index:C,element:_}}toDragEvent(E){const C=this.getItemIndexFromEventTarget(E.target||null),I=typeof C>"u"?void 0:this.items[C],_=I&&I.element;return{browserEvent:E,index:C,element:_}}onScroll(E){try{const C=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(C,E.scrollTop,E.height,E.scrollLeft,E.scrollWidth),this.supportDynamicHeights&&this._rerender(E.scrollTop,E.height,E.inSmoothScrolling)}catch(C){throw console.error("Got bad scroll event:",E),C}}onTouchChange(E){E.preventDefault(),E.stopPropagation(),this.scrollTop-=E.translationY}onDragStart(E,C,I){if(!I.dataTransfer)return;const _=this.dnd.getDragElements(E);if(I.dataTransfer.effectAllowed="copyMove",I.dataTransfer.setData(t.DataTransfers.TEXT,C),I.dataTransfer.setDragImage){let A;this.dnd.getDragLabel&&(A=this.dnd.getDragLabel(_,I)),typeof A>"u"&&(A=String(_.length));const k=(0,y.$)(".monaco-drag-image");k.textContent=A;const R=(M=>{for(;M&&!M.classList.contains("monaco-workbench");)M=M.parentElement;return M||document.body})(this.domNode);R.appendChild(k),I.dataTransfer.setDragImage(k,-10,-10),setTimeout(()=>R.removeChild(k),0)}this.domNode.classList.add("dragging"),this.currentDragData=new d(_),e.StaticDND.CurrentDragAndDropData=new p(_),this.dnd.onDragStart?.(this.currentDragData,I)}onDragOver(E){if(E.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),e.StaticDND.CurrentDragAndDropData&&e.StaticDND.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(E.browserEvent),!E.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(e.StaticDND.CurrentDragAndDropData)this.currentDragData=e.StaticDND.CurrentDragAndDropData;else{if(!E.browserEvent.dataTransfer.types)return!1;this.currentDragData=new c}const C=this.dnd.onDragOver(this.currentDragData,E.element,E.index,E.browserEvent);if(this.canDrop=typeof C=="boolean"?C:C.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;E.browserEvent.dataTransfer.dropEffect=typeof C!="boolean"&&C.effect===0?"copy":"move";let I;if(typeof C!="boolean"&&C.feedback?I=C.feedback:typeof E.index>"u"?I=[-1]:I=[E.index],I=(0,f.distinct)(I).filter(_=>_>=-1&&_<this.length).sort((_,A)=>_-A),I=I[0]===-1?[-1]:I,l(this.currentDragFeedback,I))return!0;if(this.currentDragFeedback=I,this.currentDragFeedbackDisposable.dispose(),I[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,h.toDisposable)(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const _ of I){const A=this.items[_];A.dropTarget=!0,A.row?.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,h.toDisposable)(()=>{for(const _ of I){const A=this.items[_];A.dropTarget=!1,A.row?.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(E){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,v.disposableTimeout)(()=>this.clearDragOverFeedback(),100),this.currentDragData&&this.dnd.onDragLeave?.(this.currentDragData,E.element,E.index,E.browserEvent)}onDrop(E){if(!this.canDrop)return;const C=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,e.StaticDND.CurrentDragAndDropData=void 0,!(!C||!E.browserEvent.dataTransfer)&&(E.browserEvent.preventDefault(),C.update(E.browserEvent.dataTransfer),this.dnd.drop(C,E.element,E.index,E.browserEvent))}onDragEnd(E){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,e.StaticDND.CurrentDragAndDropData=void 0,this.dnd.onDragEnd?.(E)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=h.Disposable.None}setupDragAndDropScrollTopAnimation(E){if(!this.dragOverAnimationDisposable){const C=(0,y.getTopLeftOffset)(this.domNode).top;this.dragOverAnimationDisposable=(0,y.animate)(this.animateDragAndDropScrollTop.bind(this,C))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,v.disposableTimeout)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=E.pageY}animateDragAndDropScrollTop(E){if(this.dragOverMouseY===void 0)return;const C=this.dragOverMouseY-E,I=this.renderHeight-35;C<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(C-35))):C>I&&(this.scrollTop+=Math.min(14,Math.floor(.3*(C-I))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(E){const C=this.scrollableElement.getDomNode();let I=E;for(;I instanceof HTMLElement&&I!==this.rowsContainer&&C.contains(I);){const _=I.getAttribute("data-index");if(_){const A=Number(_);if(!isNaN(A))return A}I=I.parentElement}}getRenderRange(E,C){return{start:this.rangeMap.indexAt(E),end:this.rangeMap.indexAfter(E+C-1)}}_rerender(E,C,I){const _=this.getRenderRange(E,C);let A,k;E===this.elementTop(_.start)?(A=_.start,k=0):_.end-_.start>1&&(A=_.start+1,k=this.elementTop(A)-E);let L=0;for(;;){const R=this.getRenderRange(E,C);let M=!1;for(let N=R.start;N<R.end;N++){const P=this.probeDynamicHeight(N);P!==0&&this.rangeMap.splice(N,1,[this.items[N]]),L+=P,M=M||P!==0}if(!M){L!==0&&this.eventuallyUpdateScrollDimensions();const N=a.Range.relativeComplement(_,R);for(const x of N)for(let F=x.start;F<x.end;F++)this.items[F].row&&this.removeItemFromDOM(F);const P=a.Range.relativeComplement(R,_);for(const x of P)for(let F=x.start;F<x.end;F++){const V=F+1,W=V<this.items.length?this.items[V].row:null,z=W?W.domNode:null;this.insertItemInDOM(F,z)}for(let x=R.start;x<R.end;x++)this.items[x].row&&this.updateItemInDOM(this.items[x],x);if(typeof A=="number"){const x=this.scrollable.getFutureScrollPosition().scrollTop-E,F=this.elementTop(A)-k+x;this.setScrollTop(F,I)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(E){const C=this.items[E];if(this.virtualDelegate.getDynamicHeight){const k=this.virtualDelegate.getDynamicHeight(C.element);if(k!==null){const L=C.size;return C.size=k,C.lastDynamicHeightWidth=this.renderWidth,k-L}}if(!C.hasDynamicHeight||C.lastDynamicHeightWidth===this.renderWidth||this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(C.element))return 0;const I=C.size;if(C.row)return C.row.domNode.style.height="",C.size=C.row.domNode.offsetHeight,C.lastDynamicHeightWidth=this.renderWidth,C.size-I;const{row:_}=this.cache.alloc(C.templateId);_.domNode.style.height="",this.rowsContainer.appendChild(_.domNode);const A=this.renderers.get(C.templateId);if(!A)throw new o.BugIndicatingError("Missing renderer for templateId: "+C.templateId);return A.renderElement(C.element,E,_.templateData,void 0),C.size=_.domNode.offsetHeight,A.disposeElement?.(C.element,E,_.templateData,void 0),this.virtualDelegate.setDynamicHeight?.(C.element,C.size),C.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(_.domNode),this.cache.release(_),C.size-I}getNextToLastElement(E){const C=E[E.length-1];if(!C)return null;const I=this.items[C.end];return!I||!I.row?null:I.row.domNode}getElementDomId(E){return`${this.domId}_${E}`}dispose(){if(this.items){for(const E of this.items)if(E.row){const C=this.renderers.get(E.row.templateId);C&&(C.disposeElement?.(E.element,-1,E.row.templateData,void 0),C.disposeTemplate(E.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),(0,h.dispose)(this.disposables)}}e.ListView=g,fe([m.memoize],g.prototype,"onMouseClick",null),fe([m.memoize],g.prototype,"onMouseDblClick",null),fe([m.memoize],g.prototype,"onMouseMiddleClick",null),fe([m.memoize],g.prototype,"onMouseUp",null),fe([m.memoize],g.prototype,"onMouseDown",null),fe([m.memoize],g.prototype,"onMouseOver",null),fe([m.memoize],g.prototype,"onMouseMove",null),fe([m.memoize],g.prototype,"onMouseOut",null),fe([m.memoize],g.prototype,"onContextMenu",null),fe([m.memoize],g.prototype,"onTouchStart",null),fe([m.memoize],g.prototype,"onTap",null)}),define(Q[2310],Y([1,0,18,97,4,7,482,151,129,67,1497,784,162,1528,1009,6,240,305,14,1008,15,401]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeView=e.ViewItem=e.RowCache=void 0;function n(_){try{_.parentElement.removeChild(_)}catch{}}class g{constructor(A){this.context=A,this._cache={"":[]}}alloc(A){let k=this.cache(A).pop();if(!k){let L=document.createElement("div");L.className="content";let R=document.createElement("div");R.appendChild(L);let M=null;try{M=this.context.renderer.renderTemplate(this.context.tree,A,L)}catch(N){(0,c.onUnexpectedError)(`Tree usage error: exception while rendering template ${N}`)}k={element:R,templateId:A,templateData:M}}return k}release(A,k){n(k.element),this.cache(A).push(k)}cache(A){return this._cache[A]||(this._cache[A]=[])}garbageCollect(){this._cache&&Object.keys(this._cache).forEach(A=>{this._cache[A].forEach(k=>{this.context.renderer.disposeTemplate(this.context.tree,A,k.templateData),k.element=null,k.templateData=null}),delete this._cache[A]})}dispose(){this.garbageCollect(),this._cache=null}}e.RowCache=g;class w{constructor(A,k){this.width=0,this.needsRender=!1,this.uri=null,this.unbindDragStart=b.Disposable.None,this._draggable=!1,this.context=A,this.model=k,this.id=this.model.id,this.row=null,this.top=0,this.height=k.getHeight(),this._styles={},k.getAllTraits().forEach(L=>this._styles[L]=!0),k.isExpanded()&&this.addClass("expanded")}set expanded(A){A?this.addClass("expanded"):this.removeClass("expanded")}set loading(A){A?this.addClass("loading"):this.removeClass("loading")}set draggable(A){this._draggable=A,this.render(!0)}get draggable(){return this._draggable}set dropTarget(A){A?this.addClass("drop-target"):this.removeClass("drop-target")}get element(){return this.row&&this.row.element}get templateId(){return this._templateId||(this._templateId=this.context.renderer.getTemplateId&&this.context.renderer.getTemplateId(this.context.tree,this.model.getElement()))}addClass(A){this._styles[A]=!0,this.render(!0)}removeClass(A){delete this._styles[A],this.render(!0)}render(A=!1){if(!this.model||!this.element)return;let k=["monaco-tree-row"];k.push.apply(k,Object.keys(this._styles)),this.model.hasChildren()&&k.push("has-children"),this.element.className=k.join(" "),this.element.draggable=this.draggable,this.element.style.height=this.height+"px",this.element.setAttribute("role","treeitem");const L=this.context.accessibilityProvider,R=L.getAriaLabel(this.context.tree,this.model.getElement());if(R&&this.element.setAttribute("aria-label",R),L.getPosInSet&&L.getSetSize&&(this.element.setAttribute("aria-setsize",L.getSetSize()),this.element.setAttribute("aria-posinset",L.getPosInSet(this.context.tree,this.model.getElement()))),this.model.hasTrait("focused")){const N=btoa(encodeURIComponent(this.model.id));this.element.setAttribute("id",N),this.element.setAttribute("aria-selected","true")}else this.element.removeAttribute("id"),this.element.setAttribute("aria-selected","false");this.model.hasChildren()?this.element.setAttribute("aria-expanded",String(!!this._styles.expanded)):this.element.removeAttribute("aria-expanded"),this.element.setAttribute("aria-level",String(this.model.getDepth())),this.context.options.paddingOnRow?this.element.style.paddingLeft=this.context.options.twistiePixels+(this.model.getDepth()-1)*this.context.options.indentPixels+"px":(this.element.style.paddingLeft=(this.model.getDepth()-1)*this.context.options.indentPixels+"px",this.row.element.firstElementChild.style.paddingLeft=this.context.options.twistiePixels+"px");let M=this.context.dnd.getDragURI(this.context.tree,this.model.getElement());if(M!==this.uri&&(this.unbindDragStart&&this.unbindDragStart.dispose(),M?(this.uri=M,this.draggable=!0,this.unbindDragStart=D.addDisposableListener(this.element,"dragstart",N=>{this.onDragStart(N)})):this.uri=null),!A&&this.element){let N=0;if(this.context.horizontalScrolling){const P=window.getComputedStyle(this.element);N=parseFloat(P.paddingLeft)}this.context.horizontalScrolling&&(this.element.style.width=y.isFirefox?"-moz-fit-content":"fit-content");try{this.context.renderer.renderElement(this.context.tree,this.model.getElement(),this.templateId,this.row.templateData)}catch(P){(0,c.onUnexpectedError)(`Tree usage error: exception while rendering element. ${P}`)}this.context.horizontalScrolling&&(this.width=D.getContentWidth(this.element)+N,this.element.style.width="")}}updateWidth(){if(!this.context.horizontalScrolling||!this.element)return;const A=window.getComputedStyle(this.element),k=parseFloat(A.paddingLeft);this.element.style.width=y.isFirefox?"-moz-fit-content":"fit-content",this.width=D.getContentWidth(this.element)+k,this.element.style.width=""}insertInDOM(A,k){if(this.row||(this.row=this.context.cache.alloc(this.templateId),this.element[I.BINDING]=this),!this.element.parentElement){if(k===null)A.appendChild(this.element);else try{A.insertBefore(this.element,k)}catch{(0,c.onUnexpectedError)("Failed to locate previous tree element"),A.appendChild(this.element)}this.render()}}removeFromDOM(){this.row&&(this.unbindDragStart.dispose(),this.uri=null,this.element[I.BINDING]=null,this.context.cache.release(this.templateId,this.row),this.row=null)}dispose(){this.row=null}}e.ViewItem=w;class E extends w{constructor(A,k,L){super(A,k),this.row={element:L,templateData:null,templateId:null}}render(){if(!this.model||!this.element)return;let A=["monaco-tree-wrapper"];A.push.apply(A,Object.keys(this._styles)),this.model.hasChildren()&&A.push("has-children"),this.element.className=A.join(" ")}insertInDOM(A,k){}removeFromDOM(){}}function C(_,A){return!_&&!A?!0:!_||!A||_.accept!==A.accept||_.bubble!==A.bubble?!1:_.effect===A.effect}class I extends r.HeightMap{static{this.BINDING="monaco-tree-row"}static{this.LOADING_DECORATION_DELAY=100}static{this.counter=0}constructor(A,k){super(),this.model=null,this.lastPointerType="",this.contentWidthUpdateDelayer=new d.Delayer(50),this.isRefreshing=!1,this.refreshingPreviousChildrenIds={},this.currentDragAndDropData=null,this.currentDropTarget=null,this.currentDropTargets=null,this.currentDropDisposable=b.Disposable.None,this.gestureDisposable=b.Disposable.None,this.dragAndDropScrollInterval=null,this.dragAndDropScrollTimeout=null,this.dragAndDropMouseY=null,this.highlightedItemWasDraggable=!1,this.onHiddenScrollTop=null,this._onDOMFocus=this._register(new s.Emitter),this.onDOMFocus=this._onDOMFocus.event,this._onDOMBlur=this._register(new s.Emitter),this.onDOMBlur=this._onDOMBlur.event,this._onDidScroll=this._register(new s.Emitter),this.onDidScroll=this._onDidScroll.event,I.counter++,this.instance=I.counter;const L=typeof A.options.horizontalScrollMode>"u"?2:A.options.horizontalScrollMode;this.horizontalScrolling=L!==2,this.context={dataSource:A.dataSource,renderer:A.renderer,controller:A.controller,dnd:A.dnd,filter:A.filter,sorter:A.sorter,tree:A.tree,accessibilityProvider:A.accessibilityProvider,options:A.options,cache:new g(A),horizontalScrolling:this.horizontalScrolling},this.modelListeners=[],this.viewListeners=[],this.items={},this.domNode=document.createElement("div"),this.domNode.className=`monaco-tree no-focused-item monaco-tree-instance-${this.instance}`,this.domNode.tabIndex=A.options.preventRootFocus?-1:0,this.styleElement=D.createStyleSheet(this.domNode),this.treeStyler=A.styler||new u.DefaultTreestyler(this.styleElement,`monaco-tree-instance-${this.instance}`),this.domNode.setAttribute("role","tree"),this.context.options.ariaLabel&&this.domNode.setAttribute("aria-label",this.context.options.ariaLabel),this.context.options.alwaysFocused&&this.domNode.classList.add("focused"),this.context.options.paddingOnRow||this.domNode.classList.add("no-row-padding"),this.wrapper=document.createElement("div"),this.wrapper.className="monaco-tree-wrapper",this.scrollableElement=new a.ScrollableElement(this.wrapper,{alwaysConsumeMouseWheel:!0,horizontal:L,vertical:typeof A.options.verticalScrollMode<"u"?A.options.verticalScrollMode:1,useShadows:A.options.useShadows}),this.scrollableElement.onScroll(M=>{this.render(M.scrollTop,M.height,M.scrollLeft,M.width,M.scrollWidth),this._onDidScroll.fire()}),this.gestureDisposable=f.Gesture.addTarget(this.wrapper),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-tree-rows",A.options.showTwistie&&(this.rowsContainer.className+=" show-twisties");let R=D.trackFocus(this.domNode);this.viewListeners.push(R.onDidFocus(()=>this.onFocus())),this.viewListeners.push(R.onDidBlur(()=>this.onBlur())),this.viewListeners.push(R),this.viewListeners.push(D.addDisposableListener(this.domNode,"keydown",M=>this.onKeyDown(M))),this.viewListeners.push(D.addDisposableListener(this.domNode,"keyup",M=>this.onKeyUp(M))),this.viewListeners.push(D.addDisposableListener(this.domNode,"mousedown",M=>this.onMouseDown(M))),this.viewListeners.push(D.addDisposableListener(this.domNode,"mouseup",M=>this.onMouseUp(M))),this.viewListeners.push(D.addDisposableListener(this.wrapper,"auxclick",M=>{M&&M.button===1&&this.onMouseMiddleClick(M)})),this.viewListeners.push(D.addDisposableListener(this.wrapper,"click",M=>this.onClick(M))),this.viewListeners.push(D.addDisposableListener(this.domNode,"contextmenu",M=>this.onContextMenu(M))),this.viewListeners.push(D.addDisposableListener(this.wrapper,f.EventType.Tap,M=>this.onTap(M))),this.viewListeners.push(D.addDisposableListener(this.wrapper,f.EventType.Change,M=>this.onTouchChange(M))),this.viewListeners.push(D.addDisposableListener(window,"dragover",M=>this.onDragOver(M))),this.viewListeners.push(D.addDisposableListener(this.wrapper,"drop",M=>this.onDrop(M))),this.viewListeners.push(D.addDisposableListener(window,"dragend",M=>this.onDragEnd(M))),this.viewListeners.push(D.addDisposableListener(window,"dragleave",M=>this.onDragOver(M))),this.wrapper.appendChild(this.rowsContainer),this.domNode.appendChild(this.scrollableElement.getDomNode()),k.appendChild(this.domNode),this.lastRenderTop=0,this.lastRenderHeight=0,this.didJustPressContextMenuKey=!1,this.currentDropTarget=null,this.currentDropTargets=[],this.shouldInvalidateDropReaction=!1,this.dragAndDropScrollInterval=null,this.dragAndDropScrollTimeout=null,this.onRowsChanged(),this.layout(),this.setupMSGesture(),this.applyStyles(A.options)}applyStyles(A){this.treeStyler.style(A)}createViewItem(A){return new w(this.context,A)}getHTMLElement(){return this.domNode}focus(){this.domNode.focus()}isFocused(){return document.activeElement===this.domNode}blur(){this.domNode.blur()}onVisible(){this.scrollTop=this.onHiddenScrollTop,this.onHiddenScrollTop=null,this.setupMSGesture()}setupMSGesture(){window.MSGesture&&(this.msGesture=new MSGesture,setTimeout(()=>this.msGesture.target=this.wrapper,100))}onHidden(){this.onHiddenScrollTop=this.scrollTop}isTreeVisible(){return this.onHiddenScrollTop===null}layout(A,k){this.isTreeVisible()&&(this.viewHeight=A||D.getContentHeight(this.wrapper),this.scrollHeight=this.getContentHeight(),this.horizontalScrolling&&(this.viewWidth=k||D.getContentWidth(this.wrapper)))}render(A,k,L,R,M){let N,P,x=A,F=A+k,V=this.lastRenderTop+this.lastRenderHeight;for(N=this.indexAfter(F)-1,P=this.indexAt(Math.max(V,x));N>=P;N--)this.insertItemInDOM(this.itemAtIndex(N));for(N=Math.min(this.indexAt(this.lastRenderTop),this.indexAfter(F))-1,P=this.indexAt(x);N>=P;N--)this.insertItemInDOM(this.itemAtIndex(N));for(N=this.indexAt(this.lastRenderTop),P=Math.min(this.indexAt(x),this.indexAfter(V));N<P;N++)this.removeItemFromDOM(this.itemAtIndex(N));for(N=Math.max(this.indexAfter(F),this.indexAt(this.lastRenderTop)),P=this.indexAfter(V);N<P;N++)this.removeItemFromDOM(this.itemAtIndex(N));let W=this.itemAtIndex(this.indexAt(x));W&&(this.rowsContainer.style.top=W.top-x+"px"),this.horizontalScrolling&&(this.rowsContainer.style.left=-L+"px",this.rowsContainer.style.width=`${Math.max(M,R)}px`),this.lastRenderTop=x,this.lastRenderHeight=F-x}setModel(A){this.releaseModel(),this.model=A,this.model.onRefresh(this.onRefreshing,this,this.modelListeners),this.model.onDidRefresh(this.onRefreshed,this,this.modelListeners),this.model.onSetInput(this.onClearingInput,this,this.modelListeners),this.model.onDidSetInput(this.onSetInput,this,this.modelListeners),this.model.onDidFocus(this.onModelFocusChange,this,this.modelListeners),this.model.onRefreshItemChildren(this.onItemChildrenRefreshing,this,this.modelListeners),this.model.onDidRefreshItemChildren(this.onItemChildrenRefreshed,this,this.modelListeners),this.model.onDidRefreshItem(this.onItemRefresh,this,this.modelListeners),this.model.onExpandItem(this.onItemExpanding,this,this.modelListeners),this.model.onDidExpandItem(this.onItemExpanded,this,this.modelListeners),this.model.onCollapseItem(this.onItemCollapsing,this,this.modelListeners),this.model.onDidRevealItem(this.onItemReveal,this,this.modelListeners),this.model.onDidAddTraitItem(this.onItemAddTrait,this,this.modelListeners),this.model.onDidRemoveTraitItem(this.onItemRemoveTrait,this,this.modelListeners)}onRefreshing(){this.isRefreshing=!0}onRefreshed(){this.isRefreshing=!1,this.onRowsChanged()}onRowsChanged(A=this.scrollTop){this.isRefreshing||(this.scrollTop=A,this.updateScrollWidth())}updateScrollWidth(){this.horizontalScrolling&&this.contentWidthUpdateDelayer.trigger(()=>{const A=Object.keys(this.items);let k=0;for(const L of A)k=Math.max(k,this.items[L].width);this.scrollWidth=k+10})}focusNextPage(A){let k=this.indexAt(this.scrollTop+this.viewHeight);k=k===0?0:k-1;let L=this.itemAtIndex(k).model.getElement();if(this.model.getFocus()!==L)this.model.setFocus(L,A);else{let M=this.scrollTop;this.scrollTop+=this.viewHeight,this.scrollTop!==M&&setTimeout(()=>{this.focusNextPage(A)},0)}}focusPreviousPage(A){let k;this.scrollTop===0?k=this.indexAt(this.scrollTop):k=this.indexAfter(this.scrollTop-1);let L=this.itemAtIndex(k).model.getElement();if(this.model.getFocus()!==L)this.model.setFocus(L,A);else{let M=this.scrollTop;this.scrollTop-=this.viewHeight,this.scrollTop!==M&&setTimeout(()=>{this.focusPreviousPage(A)},0)}}get viewHeight(){return this.scrollableElement.getScrollDimensions().height}set viewHeight(A){this.scrollableElement.setScrollDimensions({height:A})}set scrollHeight(A){A=A+(this.horizontalScrolling?10:0),this.scrollableElement.setScrollDimensions({scrollHeight:A})}get viewWidth(){return this.scrollableElement.getScrollDimensions().width}set viewWidth(A){this.scrollableElement.setScrollDimensions({width:A})}set scrollWidth(A){this.scrollableElement.setScrollDimensions({scrollWidth:A})}get scrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}set scrollTop(A){const k=this.getContentHeight()+(this.horizontalScrolling?10:0);this.scrollableElement.setScrollDimensions({scrollHeight:k}),this.scrollableElement.setScrollPosition({scrollTop:A})}getScrollPosition(){const A=this.getContentHeight()-this.viewHeight;return A<=0?1:this.scrollTop/A}setScrollPosition(A){const k=this.getContentHeight()-this.viewHeight;this.scrollTop=k*A}onClearingInput(A){let k=A.item;k&&(this.onRemoveItems(new p.MappedNavigator(k.getNavigator(),L=>L&&L.id)),this.onRowsChanged())}onSetInput(A){this.context.cache.garbageCollect(),this.inputItem=new E(this.context,A.item,this.wrapper)}onItemChildrenRefreshing(A){let k=A.item,L=this.items[k.id];if(L&&this.context.options.showLoading&&(L.loadingTimer=setTimeout(()=>{L.loadingTimer=0,L.loading=!0},I.LOADING_DECORATION_DELAY)),!A.isNested){let R=[],M=k.getNavigator(),N;for(;N=M.next();)R.push(N.id);this.refreshingPreviousChildrenIds[k.id]=R}}onItemChildrenRefreshed(A){let k=A.item,L=this.items[k.id];if(L&&(L.loadingTimer&&(clearTimeout(L.loadingTimer),L.loadingTimer=0),L.loading=!1),!A.isNested){let R=this.refreshingPreviousChildrenIds[k.id],M=[],N=k.getNavigator(),P;for(;P=N.next();)M.push(P);let x=Math.abs(R.length-M.length)>1e3,F=[],V=!1;if(x||(F=new T.LcsDiff({getElements:()=>R},{getElements:()=>M.map(z=>z.id)},null).ComputeDiff(!1).changes,V=F.some(z=>{if(z.modifiedLength>0){for(let B=z.modifiedStart,K=z.modifiedStart+z.modifiedLength;B<K;B++)if(this.items.hasOwnProperty(M[B].id))return!0}return!1})),!x&&!V&&F.length<50){for(const W of F)if(W.originalLength>0&&this.onRemoveItems(new h.ArrayNavigator(R,W.originalStart,W.originalStart+W.originalLength)),W.modifiedLength>0){let z=M[W.modifiedStart-1]||k;z=z.getDepth()>0?z:null,this.onInsertItems(new h.ArrayNavigator(M,W.modifiedStart,W.modifiedStart+W.modifiedLength),z?z.id:null)}}else(x||F.length)&&(this.onRemoveItems(new h.ArrayNavigator(R)),this.onInsertItems(new h.ArrayNavigator(M),k.getDepth()>0?k.id:null));(x||F.length)&&this.onRowsChanged()}}onItemRefresh(A){this.onItemsRefresh([A])}onItemsRefresh(A){this.onRefreshItemSet(A.filter(k=>this.items.hasOwnProperty(k.id))),this.onRowsChanged()}onItemExpanding(A){let k=this.items[A.item.id];k&&(k.expanded=!0)}onItemExpanded(A){let k=A.item,L=this.items[k.id];if(L){L.expanded=!0;let R=this.onInsertItems(k.getNavigator(),k.id)||0,M=this.scrollTop;L.top+L.height<=this.scrollTop&&(M+=R),this.onRowsChanged(M)}}onItemCollapsing(A){let k=A.item,L=this.items[k.id];L&&(L.expanded=!1,this.onRemoveItems(new p.MappedNavigator(k.getNavigator(),R=>R&&R.id)),this.onRowsChanged())}onItemReveal(A){let k=A.item,L=A.relativeTop,R=this.items[k.id];if(R)if(L!==null){L=L<0?0:L,L=L>1?1:L;let M=R.height-this.viewHeight;this.scrollTop=M*L+R.top}else{let M=R.top+R.height,N=this.scrollTop+this.viewHeight;R.top<this.scrollTop?this.scrollTop=R.top:M>=N&&(this.scrollTop=M-this.viewHeight)}}onItemAddTrait(A){let k=A.item,L=A.trait,R=this.items[k.id];R&&R.addClass(L),L==="highlighted"&&(this.domNode.classList.add(L),R&&(this.highlightedItemWasDraggable=!!R.draggable,R.draggable&&(R.draggable=!1)))}onItemRemoveTrait(A){let k=A.item,L=A.trait,R=this.items[k.id];R&&R.removeClass(L),L==="highlighted"&&(this.domNode.classList.remove(L),this.highlightedItemWasDraggable&&(R.draggable=!0),this.highlightedItemWasDraggable=!1)}onModelFocusChange(){const A=this.model&&this.model.getFocus();this.domNode.classList.toggle("no-focused-item",!A),A?this.domNode.setAttribute("aria-activedescendant",btoa(encodeURIComponent(this.context.dataSource.getId(this.context.tree,A)))):this.domNode.removeAttribute("aria-activedescendant")}onInsertItem(A){A.onDragStart=k=>{this.onDragStart(A,k)},A.needsRender=!0,this.refreshViewItem(A),this.items[A.id]=A}onRefreshItem(A,k=!1){A.needsRender=A.needsRender||k,this.refreshViewItem(A)}onRemoveItem(A){this.removeItemFromDOM(A),A.dispose(),delete this.items[A.id]}refreshViewItem(A){A.render(),this.shouldBeRendered(A)?this.insertItemInDOM(A):this.removeItemFromDOM(A)}onClick(A){if(this.lastPointerType&&this.lastPointerType!=="mouse")return;let k=new v.StandardMouseEvent(A),L=this.getItemAround(k.target);L&&this.context.controller.onClick(this.context.tree,L.model.getElement(),k)}onMouseMiddleClick(A){if(!this.context.controller.onMouseMiddleClick)return;let k=new v.StandardMouseEvent(A),L=this.getItemAround(k.target);L&&this.context.controller.onMouseMiddleClick(this.context.tree,L.model.getElement(),k)}onMouseDown(A){if(this.didJustPressContextMenuKey=!1,!this.context.controller.onMouseDown||this.lastPointerType&&this.lastPointerType!=="mouse")return;let k=new v.StandardMouseEvent(A);if(k.ctrlKey&&t.isNative&&t.isMacintosh)return;let L=this.getItemAround(k.target);L&&this.context.controller.onMouseDown(this.context.tree,L.model.getElement(),k)}onMouseUp(A){if(!this.context.controller.onMouseUp||this.lastPointerType&&this.lastPointerType!=="mouse")return;let k=new v.StandardMouseEvent(A);if(k.ctrlKey&&t.isNative&&t.isMacintosh)return;let L=this.getItemAround(k.target);L&&this.context.controller.onMouseUp(this.context.tree,L.model.getElement(),k)}onTap(A){let k=this.getItemAround(A.initialTarget);k&&this.context.controller.onTap(this.context.tree,k.model.getElement(),A)}onTouchChange(A){A.preventDefault(),A.stopPropagation(),this.scrollTop-=A.translationY}onContextMenu(A){let k,L;if(A instanceof KeyboardEvent||this.didJustPressContextMenuKey){this.didJustPressContextMenuKey=!1;let R=new m.StandardKeyboardEvent(A);L=this.model.getFocus();let M;if(!L)L=this.model.getInput(),M=D.getDomNodePagePosition(this.inputItem.element);else{const N=this.context.dataSource.getId(this.context.tree,L),P=this.items[N];M=D.getDomNodePagePosition(P.element)}k=new i.KeyboardContextMenuEvent(M.left+M.width,M.top,R)}else{let R=new v.StandardMouseEvent(A),M=this.getItemAround(R.target);if(!M)return;L=M.model.getElement(),k=new i.MouseContextMenuEvent(R)}this.context.controller.onContextMenu(this.context.tree,L,k)}onKeyDown(A){let k=new m.StandardKeyboardEvent(A);this.didJustPressContextMenuKey=k.keyCode===58||k.shiftKey&&k.keyCode===68,!(k.target&&k.target.tagName&&k.target.tagName.toLowerCase()==="input")&&(this.didJustPressContextMenuKey&&(k.preventDefault(),k.stopPropagation()),this.context.controller.onKeyDown(this.context.tree,k))}onKeyUp(A){this.didJustPressContextMenuKey&&this.onContextMenu(A),this.didJustPressContextMenuKey=!1,this.context.controller.onKeyUp(this.context.tree,new m.StandardKeyboardEvent(A))}onDragStart(A,k){if(this.model.getHighlight())return;let L=A.model.getElement(),R=this.model.getSelection(),M;if(R.indexOf(L)>-1?M=R:M=[L],k.dataTransfer.effectAllowed="copyMove",k.dataTransfer.setData(o.DataTransfers.RESOURCES,JSON.stringify([A.uri])),k.dataTransfer.setDragImage){let N;this.context.dnd.getDragLabel?N=this.context.dnd.getDragLabel(this.context.tree,M):N=String(M.length);const P=document.createElement("div");P.className="monaco-tree-drag-image",P.textContent=N,document.body.appendChild(P),k.dataTransfer.setDragImage(P,-10,-10),setTimeout(()=>document.body.removeChild(P),0)}this.currentDragAndDropData=new S.ElementsDragAndDropData(M),l.StaticDND.CurrentDragAndDropData=new S.ExternalElementsDragAndDropData(M),this.context.dnd.onDragStart(this.context.tree,this.currentDragAndDropData,new v.DragMouseEvent(k))}setupDragAndDropScrollInterval(){let A=D.getTopLeftOffset(this.wrapper).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval(()=>{if(this.dragAndDropMouseY===null)return;let k=this.dragAndDropMouseY-A,L=0,R=this.viewHeight-35;k<35?L=Math.max(-14,.2*(k-35)):k>R&&(L=Math.min(14,.2*(k-R))),this.scrollTop+=L},10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout(()=>{this.cancelDragAndDropScrollInterval(),this.dragAndDropScrollTimeout=null},1e3))}cancelDragAndDropScrollInterval(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()}cancelDragAndDropScrollTimeout(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)}onDragOver(A){A.preventDefault();let k=new v.DragMouseEvent(A),L=this.getItemAround(k.target);if(!L||k.posx===0&&k.posy===0&&k.browserEvent.type===D.EventType.DRAG_LEAVE)return this.currentDropTarget&&(this.currentDropTargets.forEach(F=>F.dropTarget=!1),this.currentDropTargets=[],this.currentDropDisposable.dispose()),this.cancelDragAndDropScrollInterval(),this.currentDropTarget=null,this.currentDropElement=null,this.dragAndDropMouseY=null,!1;if(this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=k.posy,!this.currentDragAndDropData)if(l.StaticDND.CurrentDragAndDropData)this.currentDragAndDropData=l.StaticDND.CurrentDragAndDropData;else{if(!k.dataTransfer.types)return!1;this.currentDragAndDropData=new S.DesktopDragAndDropData}this.currentDragAndDropData.update(k.browserEvent.dataTransfer);let R,M=L.model,N;do{if(R=M?M.getElement():this.model.getInput(),N=this.context.dnd.onDragOver(this.context.tree,this.currentDragAndDropData,R,k),!N||N.bubble!==1)break;M=M&&M.parent}while(M);if(!M)return this.currentDropElement=null,!1;let P=N&&N.accept;P?(this.currentDropElement=M.getElement(),k.preventDefault(),k.dataTransfer.dropEffect=N.effect===0?"copy":"move"):this.currentDropElement=null;let x=M.id===this.inputItem.id?this.inputItem:this.items[M.id];if((this.shouldInvalidateDropReaction||this.currentDropTarget!==x||!C(this.currentDropElementReaction,N))&&(this.shouldInvalidateDropReaction=!1,this.currentDropTarget&&(this.currentDropTargets.forEach(F=>F.dropTarget=!1),this.currentDropTargets=[],this.currentDropDisposable.dispose()),this.currentDropTarget=x,this.currentDropElementReaction=N,P)){if(this.currentDropTarget&&(this.currentDropTarget.dropTarget=!0,this.currentDropTargets.push(this.currentDropTarget)),N.bubble===0){let F=M.getNavigator(),V;for(;V=F.next();)L=this.items[V.id],L&&(L.dropTarget=!0,this.currentDropTargets.push(L))}if(N.autoExpand){const F=(0,d.timeout)(500);this.currentDropDisposable=b.toDisposable(()=>F.cancel()),F.then(()=>this.context.tree.expand(this.currentDropElement)).then(()=>this.shouldInvalidateDropReaction=!0)}}return!0}onDrop(A){if(this.currentDropElement){let k=new v.DragMouseEvent(A);k.preventDefault(),this.currentDragAndDropData.update(k.browserEvent.dataTransfer),this.context.dnd.drop(this.context.tree,this.currentDragAndDropData,this.currentDropElement,k),this.onDragEnd(A)}else this.context.dnd.dropAbort(this.context.tree,this.currentDragAndDropData);this.cancelDragAndDropScrollInterval()}onDragEnd(A){this.currentDropTarget?(this.currentDropTargets.forEach(k=>k.dropTarget=!1),this.currentDropTargets=[]):this.context.dnd.dropAbort(this.context.tree,this.currentDragAndDropData),this.currentDropDisposable.dispose(),this.cancelDragAndDropScrollInterval(),this.currentDragAndDropData=null,l.StaticDND.CurrentDragAndDropData=void 0,this.currentDropElement=null,this.currentDropTarget=null,this.dragAndDropMouseY=null}onFocus(){this.context.options.alwaysFocused||this.domNode.classList.add("focused"),this._onDOMFocus.fire()}onBlur(){this.context.options.alwaysFocused||this.domNode.classList.remove("focused"),this.domNode.removeAttribute("aria-activedescendant"),this._onDOMBlur.fire()}insertItemInDOM(A){let k=null,L=this.itemAfter(A);L&&L.element&&(k=L.element),A.insertInDOM(this.rowsContainer,k)}removeItemFromDOM(A){A&&A.removeFromDOM()}shouldBeRendered(A){return A.top<this.lastRenderTop+this.lastRenderHeight&&A.top+A.height>this.lastRenderTop}getItemAround(A){let k=this.inputItem,L=A;do{if(L[I.BINDING]&&(k=L[I.BINDING]),L===this.wrapper||L===this.domNode)return k;if(L===this.scrollableElement.getDomNode()||L===document.body)return}while(L=L.parentElement)}releaseModel(){this.model&&(this.modelListeners=b.dispose(this.modelListeners),this.model=null)}dispose(){this.scrollableElement.dispose(),this.releaseModel(),this.viewListeners=b.dispose(this.viewListeners),this._onDOMFocus.dispose(),this._onDOMBlur.dispose(),this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.items&&Object.keys(this.items).forEach(A=>this.items[A].removeFromDOM()),this.context.cache&&this.context.cache.dispose(),this.gestureDisposable.dispose(),super.dispose()}}e.TreeView=I}),define(Q[445],Y([1,0,305,1531,2310,1008,6,80,42,4,1572]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tree=e.TreeContext=void 0;class S{constructor(i,s,o={}){if(this.tree=i,this.configuration=s,this.options=o,!s.dataSource)throw new Error("You must provide a Data Source to the tree.");this.dataSource=s.dataSource,this.renderer=s.renderer,this.controller=s.controller||new t.DefaultController({clickBehavior:1,keyboardSupport:typeof o.keyboardSupport!="boolean"||o.keyboardSupport}),this.dnd=s.dnd||new t.DefaultDragAndDrop,this.filter=s.filter||new t.DefaultFilter,this.sorter=s.sorter,this.accessibilityProvider=s.accessibilityProvider||new t.DefaultAccessibilityProvider,this.styler=s.styler}}e.TreeContext=S;const h={listFocusBackground:f.Color.fromHex("#073655"),listActiveSelectionBackground:f.Color.fromHex("#0E639C"),listActiveSelectionForeground:f.Color.fromHex("#FFFFFF"),listFocusAndSelectionBackground:f.Color.fromHex("#094771"),listFocusAndSelectionForeground:f.Color.fromHex("#FFFFFF"),listInactiveSelectionBackground:f.Color.fromHex("#3F3F46"),listHoverBackground:f.Color.fromHex("#2A2D2E"),listDropBackground:f.Color.fromHex("#383B3D")};class a extends m.Disposable{constructor(i,s,o={}){super(),this._onDidChangeFocus=new T.Relay,this.onDidChangeFocus=this._onDidChangeFocus.event,this._onDidChangeSelection=new T.Relay,this.onDidChangeSelection=this._onDidChangeSelection.event,this._onHighlightChange=new T.Relay,this.onDidChangeHighlight=this._onHighlightChange.event,this._onDidExpandItem=new T.Relay,this.onDidExpandItem=this._onDidExpandItem.event,this._onDidCollapseItem=new T.Relay,this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDispose=this._register(new T.Emitter),this.onDidDispose=this._onDispose.event,this.container=i,(0,v.mixin)(o,h,!1),o.twistiePixels=typeof o.twistiePixels=="number"?o.twistiePixels:32,o.showTwistie=o.showTwistie!==!1,o.indentPixels=typeof o.indentPixels=="number"?o.indentPixels:12,o.alwaysFocused=o.alwaysFocused===!0,o.useShadows=o.useShadows!==!1,o.paddingOnRow=o.paddingOnRow!==!1,o.showLoading=o.showLoading!==!1,this.context=new S(this,s,o),this.model=new y.TreeModel(this.context),this.view=new b.TreeView(this.context,this.container),this.view.setModel(this.model),this._onDidChangeFocus.input=this.model.onDidFocus,this._onDidChangeSelection.input=this.model.onDidSelect,this._onHighlightChange.input=this.model.onDidHighlight,this._onDidExpandItem.input=this.model.onDidExpandItem,this._onDidCollapseItem.input=this.model.onDidCollapseItem}style(i){this.view.applyStyles(i)}get onDidFocus(){return this.view.onDOMFocus}get onDidBlur(){return this.view.onDOMBlur}get onDidScroll(){return this.view.onDidScroll}getHTMLElement(){return this.view.getHTMLElement()}layout(i,s){this.view.layout(i,s)}domFocus(){this.view.focus()}isDOMFocused(){return this.view.isFocused()}domBlur(){this.view.blur()}onVisible(){this.view.onVisible()}onHidden(){this.view.onHidden()}setInput(i){return this.model.setInput(i)}getInput(){return this.model.getInput()}refresh(i=null,s=!0){return this.model.refresh(i,s)}expand(i){return this.model.expand(i)}expandAll(i){return this.model.expandAll(i)}collapse(i,s=!1){return this.model.collapse(i,s)}collapseAll(i=null,s=!1){return this.model.collapseAll(i,s)}toggleExpansion(i,s=!1){return this.model.toggleExpansion(i,s)}isExpanded(i){return this.model.isExpanded(i)}reveal(i,s=null){return this.model.reveal(i,s)}getExpandedElements(){return this.model.getExpandedElements()}getScrollPosition(){return this.view.getScrollPosition()}setScrollPosition(i){this.view.setScrollPosition(i)}getContentHeight(){return this.view.getContentHeight()}set ariaLabel(i){this.getHTMLElement().setAttribute("aria-label",i)}getHighlight(){return this.model.getHighlight()}clearHighlight(i){this.model.setHighlight(null,i)}setSelection(i,s){this.model.setSelection(i,s)}getSelection(){return this.model.getSelection()}clearSelection(i){this.model.setSelection([],i)}setFocus(i,s){this.model.setFocus(i,s)}getFocus(){return this.model.getFocus()}focusNext(i,s){this.model.focusNext(i,s)}focusPrevious(i,s){this.model.focusPrevious(i,s)}focusParent(i){this.model.focusParent(i)}focusFirstChild(i){this.model.focusFirstChild(i)}focusFirst(i,s){this.model.focusFirst(i,s)}focusNth(i,s){this.model.focusNth(i,s)}focusLast(i,s){this.model.focusLast(i,s)}focusNextPage(i){this.view.focusNextPage(i)}focusPreviousPage(i){this.view.focusPreviousPage(i)}clearFocus(i){this.model.setFocus(null,i)}addTraits(i,s){this.model.addTraits(i,s)}removeTraits(i,s){this.model.removeTraits(i,s)}select(i,s){this.model.select(i,s)}deselect(i,s){this.model.deselect(i,s)}getNavigator(i,s){return new D.MappedNavigator(this.model.getNavigator(i,s),o=>o&&o.getElement())}dispose(){super.dispose(),this._onDispose.fire(),this.model.dispose(),this.view.dispose(),this._onDidChangeFocus.dispose(),this._onDidChangeSelection.dispose(),this._onHighlightChange.dispose(),this._onDidExpandItem.dispose(),this._onDidCollapseItem.dispose(),this._onDispose.dispose()}}e.Tree=a}),define(Q[179],Y([1,0,7,227,67,151,87,1523,20,14,80,102,6,128,4,226,18,17,648,401,129,1057]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.List=e.unthemedListStyles=e.DefaultStyleController=e.MouseController=e.isSelectionRangeChangeEvent=e.isSelectionSingleChangeEvent=e.DefaultKeyboardNavigationDelegate=e.TypeNavigationMode=e.isButton=e.isMonacoEditor=e.isInputElement=void 0;class l{constructor(j){this.trait=j,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(j){return j}renderElement(j,ee,X){const te=this.renderedElements.findIndex(Z=>Z.templateData===X);if(te>=0){const Z=this.renderedElements[te];this.trait.unrender(X),Z.index=ee}else{const Z={index:ee,templateData:X};this.renderedElements.push(Z)}this.trait.renderIndex(ee,X)}splice(j,ee,X){const te=[];for(const Z of this.renderedElements)Z.index<j?te.push(Z):Z.index>=j+ee&&te.push({index:Z.index+X-ee,templateData:Z.templateData});this.renderedElements=te}renderIndexes(j){for(const{index:ee,templateData:X}of this.renderedElements)j.indexOf(ee)>-1&&this.trait.renderIndex(ee,X)}disposeTemplate(j){const ee=this.renderedElements.findIndex(X=>X.templateData===j);ee<0||this.renderedElements.splice(ee,1)}}class n{get name(){return this._trait}get renderer(){return new l(this)}constructor(j){this._trait=j,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new a.Emitter,this.onChange=this._onChange.event}splice(j,ee,X){ee=Math.max(0,Math.min(ee,this.length-j));const te=X.length-ee,Z=j+ee,se=[];let re=0;for(;re<this.sortedIndexes.length&&this.sortedIndexes[re]<j;)se.push(this.sortedIndexes[re++]);for(let le=0;le<X.length;le++)X[le]&&se.push(le+j);for(;re<this.sortedIndexes.length&&this.sortedIndexes[re]>=Z;)se.push(this.sortedIndexes[re++]+te);const oe=this.length+te;if(this.sortedIndexes.length>0&&se.length===0&&oe>0){const le=this.sortedIndexes.find(ne=>ne>=j)??oe-1;se.push(Math.min(le,oe-1))}this.renderer.splice(j,ee,X.length),this._set(se,se),this.length=oe}renderIndex(j,ee){ee.classList.toggle(this._trait,this.contains(j))}unrender(j){j.classList.remove(this._trait)}set(j,ee){return this._set(j,[...j].sort(H),ee)}_set(j,ee,X){const te=this.indexes,Z=this.sortedIndexes;this.indexes=j,this.sortedIndexes=ee;const se=B(Z,j);return this.renderer.renderIndexes(se),this._onChange.fire({indexes:j,browserEvent:X}),te}get(){return this.indexes}contains(j){return(0,v.binarySearch)(this.sortedIndexes,j,H)>=0}dispose(){(0,i.dispose)(this._onChange)}}fe([h.memoize],n.prototype,"renderer",null);class g extends n{constructor(j){super("selected"),this.setAriaSelected=j}renderIndex(j,ee){super.renderIndex(j,ee),this.setAriaSelected&&(this.contains(j)?ee.setAttribute("aria-selected","true"):ee.setAttribute("aria-selected","false"))}}class w{constructor(j,ee,X){this.trait=j,this.view=ee,this.identityProvider=X}splice(j,ee,X){if(!this.identityProvider)return this.trait.splice(j,ee,new Array(X.length).fill(!1));const te=this.trait.get().map(re=>this.identityProvider.getId(this.view.element(re)).toString());if(te.length===0)return this.trait.splice(j,ee,new Array(X.length).fill(!1));const Z=new Set(te),se=X.map(re=>Z.has(this.identityProvider.getId(re).toString()));this.trait.splice(j,ee,se)}}function E(J){return J.tagName==="INPUT"||J.tagName==="TEXTAREA"}e.isInputElement=E;function C(J){return J.classList.contains("monaco-editor")?!0:J.classList.contains("monaco-list")||!J.parentElement?!1:C(J.parentElement)}e.isMonacoEditor=C;function I(J){return J.tagName==="A"&&J.classList.contains("monaco-button")||J.tagName==="DIV"&&J.classList.contains("monaco-button-dropdown")?!0:J.classList.contains("monaco-list")||!J.parentElement?!1:I(J.parentElement)}e.isButton=I;class _{get onKeyDown(){return this.disposables.add(a.Event.chain(this.disposables.add(new y.DomEmitter(this.view.domNode,"keydown")).event).filter(j=>!E(j.target)).map(j=>new b.StandardKeyboardEvent(j)))}constructor(j,ee,X){this.list=j,this.view=ee,this.disposables=new i.DisposableStore,this.multipleSelectionDisposables=new i.DisposableStore,this.onKeyDown.filter(te=>te.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(te=>te.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(te=>te.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(te=>te.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(te=>te.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(te=>te.keyCode===9).on(this.onEscape,this,this.disposables),X.multipleSelectionSupport!==!1&&this.onKeyDown.filter(te=>(o.isMacintosh?te.metaKey:te.ctrlKey)&&te.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}updateOptions(j){j.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),j.multipleSelectionSupport&&this.onKeyDown.filter(ee=>(o.isMacintosh?ee.metaKey:ee.ctrlKey)&&ee.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(j){j.preventDefault(),j.stopPropagation(),this.list.setSelection(this.list.getFocus(),j.browserEvent)}onUpArrow(j){j.preventDefault(),j.stopPropagation(),this.list.focusPrevious(1,!1,j.browserEvent);const ee=this.list.getFocus()[0];this.list.setAnchor(ee),this.list.reveal(ee),this.view.domNode.focus()}onDownArrow(j){j.preventDefault(),j.stopPropagation(),this.list.focusNext(1,!1,j.browserEvent);const ee=this.list.getFocus()[0];this.list.setAnchor(ee),this.list.reveal(ee),this.view.domNode.focus()}onPageUpArrow(j){j.preventDefault(),j.stopPropagation(),this.list.focusPreviousPage(j.browserEvent);const ee=this.list.getFocus()[0];this.list.setAnchor(ee),this.list.reveal(ee),this.view.domNode.focus()}onPageDownArrow(j){j.preventDefault(),j.stopPropagation(),this.list.focusNextPage(j.browserEvent);const ee=this.list.getFocus()[0];this.list.setAnchor(ee),this.list.reveal(ee),this.view.domNode.focus()}onCtrlA(j){j.preventDefault(),j.stopPropagation(),this.list.setSelection((0,v.range)(this.list.length),j.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(j){this.list.getSelection().length&&(j.preventDefault(),j.stopPropagation(),this.list.setSelection([],j.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}fe([h.memoize],_.prototype,"onKeyDown",null);var A;(function(J){J[J.Automatic=0]="Automatic",J[J.Trigger=1]="Trigger"})(A||(e.TypeNavigationMode=A={}));var k;(function(J){J[J.Idle=0]="Idle",J[J.Typing=1]="Typing"})(k||(k={})),e.DefaultKeyboardNavigationDelegate=new class{mightProducePrintableCharacter(J){return J.ctrlKey||J.metaKey||J.altKey?!1:J.keyCode>=31&&J.keyCode<=56||J.keyCode>=21&&J.keyCode<=30||J.keyCode>=98&&J.keyCode<=107||J.keyCode>=85&&J.keyCode<=95}};class L{constructor(j,ee,X,te,Z){this.list=j,this.view=ee,this.keyboardNavigationLabelProvider=X,this.keyboardNavigationEventFilter=te,this.delegate=Z,this.enabled=!1,this.state=k.Idle,this.mode=A.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new i.DisposableStore,this.disposables=new i.DisposableStore,this.updateOptions(j.options)}updateOptions(j){j.typeNavigationEnabled??!0?this.enable():this.disable(),this.mode=j.typeNavigationMode??A.Automatic}trigger(){this.triggered=!this.triggered}enable(){if(this.enabled)return;let j=!1;const ee=this.enabledDisposables.add(a.Event.chain(this.enabledDisposables.add(new y.DomEmitter(this.view.domNode,"keydown")).event)).filter(Z=>!E(Z.target)).filter(()=>this.mode===A.Automatic||this.triggered).map(Z=>new b.StandardKeyboardEvent(Z)).filter(Z=>j||this.keyboardNavigationEventFilter(Z)).filter(Z=>this.delegate.mightProducePrintableCharacter(Z)).forEach(Z=>t.EventHelper.stop(Z,!0)).map(Z=>Z.browserEvent.key).event,X=a.Event.debounce(ee,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);a.Event.reduce(a.Event.any(ee,X),(Z,se)=>se===null?null:(Z||"")+se,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),X(this.onClear,this,this.enabledDisposables),ee(()=>j=!0,void 0,this.enabledDisposables),X(()=>j=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){const j=this.list.getFocus();if(j.length>0&&j[0]===this.previouslyFocused){const ee=this.list.options.accessibilityProvider?.getAriaLabel(this.list.element(j[0]));ee&&(0,T.alert)(ee)}this.previouslyFocused=-1}onInput(j){if(!j){this.state=k.Idle,this.triggered=!1;return}const ee=this.list.getFocus(),X=ee.length>0?ee[0]:0,te=this.state===k.Idle?1:0;this.state=k.Typing;for(let Z=0;Z<this.list.length;Z++){const se=(X+Z+te)%this.list.length,re=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(se)),oe=re&&re.toString();if(this.list.options.typeNavigationEnabled){if(typeof oe<"u"){const le=(0,r.matchesPrefix)(j,oe),ne=(0,r.matchesFuzzy2)(j,oe);if(ne){const ce=ne[0].end-ne[0].start;if(le||ce>1&&ne.length===1){this.previouslyFocused=X,this.list.setFocus([se]),this.list.reveal(se);return}}}}else if(typeof oe>"u"||(0,r.matchesPrefix)(j,oe)){this.previouslyFocused=X,this.list.setFocus([se]),this.list.reveal(se);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class R{constructor(j,ee){this.list=j,this.view=ee,this.disposables=new i.DisposableStore,this.disposables.add(a.Event.chain(this.disposables.add(new y.DomEmitter(ee.domNode,"keydown")).event)).filter(te=>!E(te.target)).map(te=>new b.StandardKeyboardEvent(te)).filter(te=>te.keyCode===2&&!te.ctrlKey&&!te.metaKey&&!te.shiftKey&&!te.altKey).on(this.onTab,this,this.disposables)}onTab(j){if(j.target!==this.view.domNode)return;const ee=this.list.getFocus();if(ee.length===0)return;const X=this.view.domElement(ee[0]);if(!X)return;const te=X.querySelector("[tabIndex]");if(!te||!(te instanceof HTMLElement)||te.tabIndex===-1)return;const Z=window.getComputedStyle(te);Z.visibility==="hidden"||Z.display==="none"||(j.preventDefault(),j.stopPropagation(),te.focus())}dispose(){this.disposables.dispose()}}function M(J){return o.isMacintosh?J.browserEvent.metaKey:J.browserEvent.ctrlKey}e.isSelectionSingleChangeEvent=M;function N(J){return J.browserEvent.shiftKey}e.isSelectionRangeChangeEvent=N;function P(J){return J instanceof MouseEvent&&J.button===2}const x={isSelectionSingleChangeEvent:M,isSelectionRangeChangeEvent:N};class F{constructor(j){this.list=j,this.disposables=new i.DisposableStore,this._onPointer=new a.Emitter,this.onPointer=this._onPointer.event,j.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||x),this.mouseSupport=typeof j.options.mouseSupport>"u"||!!j.options.mouseSupport,this.mouseSupport&&(j.onMouseDown(this.onMouseDown,this,this.disposables),j.onContextMenu(this.onContextMenu,this,this.disposables),j.onMouseDblClick(this.onDoubleClick,this,this.disposables),j.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(D.Gesture.addTarget(j.getHTMLElement()))),a.Event.any(j.onMouseClick,j.onMouseMiddleClick,j.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(j){j.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,j.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||x))}isSelectionSingleChangeEvent(j){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(j):!1}isSelectionRangeChangeEvent(j){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(j):!1}isSelectionChangeEvent(j){return this.isSelectionSingleChangeEvent(j)||this.isSelectionRangeChangeEvent(j)}onMouseDown(j){C(j.browserEvent.target)||document.activeElement!==j.browserEvent.target&&this.list.domFocus()}onContextMenu(j){if(E(j.browserEvent.target)||C(j.browserEvent.target))return;const ee=typeof j.index>"u"?[]:[j.index];this.list.setFocus(ee,j.browserEvent)}onViewPointer(j){if(!this.mouseSupport||E(j.browserEvent.target)||C(j.browserEvent.target)||j.browserEvent.isHandledByList)return;j.browserEvent.isHandledByList=!0;const ee=j.index;if(typeof ee>"u"){this.list.setFocus([],j.browserEvent),this.list.setSelection([],j.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(j))return this.changeSelection(j);this.list.setFocus([ee],j.browserEvent),this.list.setAnchor(ee),P(j.browserEvent)||this.list.setSelection([ee],j.browserEvent),this._onPointer.fire(j)}onDoubleClick(j){if(E(j.browserEvent.target)||C(j.browserEvent.target)||this.isSelectionChangeEvent(j)||j.browserEvent.isHandledByList)return;j.browserEvent.isHandledByList=!0;const ee=this.list.getFocus();this.list.setSelection(ee,j.browserEvent)}changeSelection(j){const ee=j.index;let X=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(j)){typeof X>"u"&&(X=this.list.getFocus()[0]??ee,this.list.setAnchor(X));const te=Math.min(X,ee),Z=Math.max(X,ee),se=(0,v.range)(te,Z+1),re=this.list.getSelection(),oe=z(B(re,[X]),X);if(oe.length===0)return;const le=B(se,K(re,oe));this.list.setSelection(le,j.browserEvent),this.list.setFocus([ee],j.browserEvent)}else if(this.isSelectionSingleChangeEvent(j)){const te=this.list.getSelection(),Z=te.filter(se=>se!==ee);this.list.setFocus([ee]),this.list.setAnchor(ee),te.length===Z.length?this.list.setSelection([...Z,ee],j.browserEvent):this.list.setSelection(Z,j.browserEvent)}}dispose(){this.disposables.dispose()}}e.MouseController=F;class V{constructor(j,ee){this.styleElement=j,this.selectorSuffix=ee}style(j){const ee=this.selectorSuffix&&`.${this.selectorSuffix}`,X=[];j.listBackground&&X.push(`.monaco-list${ee} .monaco-list-rows { background: ${j.listBackground}; }`),j.listFocusBackground&&(X.push(`.monaco-list${ee}:focus .monaco-list-row.focused { background-color: ${j.listFocusBackground}; }`),X.push(`.monaco-list${ee}:focus .monaco-list-row.focused:hover { background-color: ${j.listFocusBackground}; }`)),j.listFocusForeground&&X.push(`.monaco-list${ee}:focus .monaco-list-row.focused { color: ${j.listFocusForeground}; }`),j.listActiveSelectionBackground&&(X.push(`.monaco-list${ee}:focus .monaco-list-row.selected { background-color: ${j.listActiveSelectionBackground}; }`),X.push(`.monaco-list${ee}:focus .monaco-list-row.selected:hover { background-color: ${j.listActiveSelectionBackground}; }`)),j.listActiveSelectionForeground&&X.push(`.monaco-list${ee}:focus .monaco-list-row.selected { color: ${j.listActiveSelectionForeground}; }`),j.listActiveSelectionIconForeground&&X.push(`.monaco-list${ee}:focus .monaco-list-row.selected .codicon { color: ${j.listActiveSelectionIconForeground}; }`),j.listFocusAndSelectionBackground&&X.push(` .monaco-drag-image, .monaco-list${ee}:focus .monaco-list-row.selected.focused { background-color: ${j.listFocusAndSelectionBackground}; } `),j.listFocusAndSelectionForeground&&X.push(` .monaco-drag-image, .monaco-list${ee}:focus .monaco-list-row.selected.focused { color: ${j.listFocusAndSelectionForeground}; } `),j.listInactiveFocusForeground&&(X.push(`.monaco-list${ee} .monaco-list-row.focused { color: ${j.listInactiveFocusForeground}; }`),X.push(`.monaco-list${ee} .monaco-list-row.focused:hover { color: ${j.listInactiveFocusForeground}; }`)),j.listInactiveSelectionIconForeground&&X.push(`.monaco-list${ee} .monaco-list-row.focused .codicon { color: ${j.listInactiveSelectionIconForeground}; }`),j.listInactiveFocusBackground&&(X.push(`.monaco-list${ee} .monaco-list-row.focused { background-color: ${j.listInactiveFocusBackground}; }`),X.push(`.monaco-list${ee} .monaco-list-row.focused:hover { background-color: ${j.listInactiveFocusBackground}; }`)),j.listInactiveSelectionBackground&&(X.push(`.monaco-list${ee} .monaco-list-row.selected { background-color: ${j.listInactiveSelectionBackground}; }`),X.push(`.monaco-list${ee} .monaco-list-row.selected:hover { background-color: ${j.listInactiveSelectionBackground}; }`)),j.listInactiveSelectionForeground&&X.push(`.monaco-list${ee} .monaco-list-row.selected { color: ${j.listInactiveSelectionForeground}; }`),j.listHoverBackground&&X.push(`.monaco-list${ee}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${j.listHoverBackground}; }`),j.listHoverForeground&&X.push(`.monaco-list${ee}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${j.listHoverForeground}; }`);const te=(0,t.asCssValueWithDefault)(j.listFocusAndSelectionOutline,(0,t.asCssValueWithDefault)(j.listSelectionOutline,j.listFocusOutline??""));te&&X.push(`.monaco-list${ee}:focus .monaco-list-row.focused.selected { outline: 1px solid ${te}; outline-offset: -1px;}`),j.listFocusOutline&&X.push(` .monaco-drag-image, .monaco-list${ee}:focus .monaco-list-row.focused { outline: 1px solid ${j.listFocusOutline}; outline-offset: -1px; } .monaco-workbench.context-menu-visible .monaco-list${ee}.last-focused .monaco-list-row.focused { outline: 1px solid ${j.listFocusOutline}; outline-offset: -1px; } `);const Z=(0,t.asCssValueWithDefault)(j.listSelectionOutline,j.listInactiveFocusOutline??"");Z&&X.push(`.monaco-list${ee} .monaco-list-row.focused.selected { outline: 1px dotted ${Z}; outline-offset: -1px; }`),j.listSelectionOutline&&X.push(`.monaco-list${ee} .monaco-list-row.selected { outline: 1px dotted ${j.listSelectionOutline}; outline-offset: -1px; }`),j.listInactiveFocusOutline&&X.push(`.monaco-list${ee} .monaco-list-row.focused { outline: 1px dotted ${j.listInactiveFocusOutline}; outline-offset: -1px; }`),j.listHoverOutline&&X.push(`.monaco-list${ee} .monaco-list-row:hover { outline: 1px dashed ${j.listHoverOutline}; outline-offset: -1px; }`),j.listDropBackground&&X.push(` .monaco-list${ee}.drop-target, .monaco-list${ee} .monaco-list-rows.drop-target, .monaco-list${ee} .monaco-list-row.drop-target { background-color: ${j.listDropBackground} !important; color: inherit !important; } `),j.tableColumnsBorder&&X.push(` .monaco-table > .monaco-split-view2, .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before, .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2, .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { border-color: ${j.tableColumnsBorder}; } .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2, .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before { border-color: transparent; } `),j.tableOddRowsBackgroundColor&&X.push(` .monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr, .monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr, .monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr { background-color: ${j.tableOddRowsBackgroundColor}; } `),this.styleElement.textContent=X.join(` `)}}e.DefaultStyleController=V,e.unthemedListStyles={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropBackground:"#383B3D",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:S.Color.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:S.Color.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:S.Color.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0};const W={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function z(J,j){const ee=J.indexOf(j);if(ee===-1)return[];const X=[];let te=ee-1;for(;te>=0&&J[te]===j-(ee-te);)X.push(J[te--]);for(X.reverse(),te=ee;te<J.length&&J[te]===j+(te-ee);)X.push(J[te++]);return X}function B(J,j){const ee=[];let X=0,te=0;for(;X<J.length||te<j.length;)if(X>=J.length)ee.push(j[te++]);else if(te>=j.length)ee.push(J[X++]);else if(J[X]===j[te]){ee.push(J[X]),X++,te++;continue}else J[X]<j[te]?ee.push(J[X++]):ee.push(j[te++]);return ee}function K(J,j){const ee=[];let X=0,te=0;for(;X<J.length||te<j.length;)if(X>=J.length)ee.push(j[te++]);else if(te>=j.length)ee.push(J[X++]);else if(J[X]===j[te]){X++,te++;continue}else J[X]<j[te]?ee.push(J[X++]):te++;return ee}const H=(J,j)=>J-j;class U{constructor(j,ee){this._templateId=j,this.renderers=ee}get templateId(){return this._templateId}renderTemplate(j){return this.renderers.map(ee=>ee.renderTemplate(j))}renderElement(j,ee,X,te){let Z=0;for(const se of this.renderers)se.renderElement(j,ee,X[Z++],te)}disposeElement(j,ee,X,te){let Z=0;for(const se of this.renderers)se.disposeElement?.(j,ee,X[Z],te),Z+=1}disposeTemplate(j){let ee=0;for(const X of this.renderers)X.disposeTemplate(j[ee++])}}class G{constructor(j){this.accessibilityProvider=j,this.templateId="a18n"}renderTemplate(j){return j}renderElement(j,ee,X){const te=this.accessibilityProvider.getAriaLabel(j);te?X.setAttribute("aria-label",te):X.removeAttribute("aria-label");const Z=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(j);typeof Z=="number"?X.setAttribute("aria-level",`${Z}`):X.removeAttribute("aria-level")}disposeTemplate(j){}}class ${constructor(j,ee){this.list=j,this.dnd=ee}getDragElements(j){const ee=this.list.getSelectedElements();return ee.indexOf(j)>-1?ee:[j]}getDragURI(j){return this.dnd.getDragURI(j)}getDragLabel(j,ee){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(j,ee)}onDragStart(j,ee){this.dnd.onDragStart?.(j,ee)}onDragOver(j,ee,X,te){return this.dnd.onDragOver(j,ee,X,te)}onDragLeave(j,ee,X,te){this.dnd.onDragLeave?.(j,ee,X,te)}onDragEnd(j){this.dnd.onDragEnd?.(j)}drop(j,ee,X,te){this.dnd.drop(j,ee,X,te)}}class ie{get onDidChangeFocus(){return a.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),j=>this.toListEvent(j),this.disposables)}get onDidChangeSelection(){return a.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),j=>this.toListEvent(j),this.disposables)}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(){let j=!1;const ee=this.disposables.add(a.Event.chain(this.disposables.add(new y.DomEmitter(this.view.domNode,"keydown")).event)).map(Z=>new b.StandardKeyboardEvent(Z)).filter(Z=>j=Z.keyCode===58||Z.shiftKey&&Z.keyCode===68).map(Z=>t.EventHelper.stop(Z,!0)).filter(()=>!1).event,X=this.disposables.add(a.Event.chain(this.disposables.add(new y.DomEmitter(this.view.domNode,"keyup")).event)).forEach(()=>j=!1).map(Z=>new b.StandardKeyboardEvent(Z)).filter(Z=>Z.keyCode===58||Z.shiftKey&&Z.keyCode===68).map(Z=>t.EventHelper.stop(Z,!0)).map(({browserEvent:Z})=>{const se=this.getFocus(),re=se.length?se[0]:void 0,oe=typeof re<"u"?this.view.element(re):void 0,le=typeof re<"u"?this.view.domElement(re):this.view.domNode;return{index:re,element:oe,anchor:le,browserEvent:Z}}).event,te=this.disposables.add(a.Event.chain(this.view.onContextMenu)).filter(Z=>!j).map(({element:Z,index:se,browserEvent:re})=>({element:Z,index:se,anchor:new c.StandardMouseEvent(re),browserEvent:re})).event;return a.Event.any(ee,X,te)}get onKeyDown(){return this.disposables.add(new y.DomEmitter(this.view.domNode,"keydown")).event}get onKeyUp(){return this.disposables.add(new y.DomEmitter(this.view.domNode,"keyup")).event}get onKeyPress(){return this.disposables.add(new y.DomEmitter(this.view.domNode,"keypress")).event}get onDidFocus(){return a.Event.signal(this.disposables.add(new y.DomEmitter(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return a.Event.signal(this.disposables.add(new y.DomEmitter(this.view.domNode,"blur",!0)).event)}constructor(j,ee,X,te,Z=W){this.user=j,this._options=Z,this.focus=new n("focused"),this.anchor=new n("anchor"),this.eventBufferer=new a.EventBufferer,this._ariaLabel="",this.disposables=new i.DisposableStore,this._onDidDispose=new a.Emitter,this.onDidDispose=this._onDidDispose.event;const se=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?this._options.accessibilityProvider?.getWidgetRole():"list";this.selection=new g(se!=="list");const re=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=Z.accessibilityProvider,this.accessibilityProvider&&(re.push(new G(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant?.(this.onDidChangeActiveDescendant,this,this.disposables)),te=te.map(le=>new U(le.templateId,[...re,le]));const oe={...Z,dnd:Z.dnd&&new $(this,Z.dnd)};if(this.view=this.createListView(ee,X,te,oe),this.view.domNode.setAttribute("role",se),Z.styleController)this.styleController=Z.styleController(this.view.domId);else{const le=(0,t.createStyleSheet)(this.view.domNode);this.styleController=new V(le,this.view.domId)}if(this.spliceable=new f.CombinedSpliceable([new w(this.focus,this.view,Z.identityProvider),new w(this.selection,this.view,Z.identityProvider),new w(this.anchor,this.view,Z.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new R(this,this.view)),(typeof Z.keyboardSupport!="boolean"||Z.keyboardSupport)&&(this.keyboardController=new _(this,this.view,Z),this.disposables.add(this.keyboardController)),Z.keyboardNavigationLabelProvider){const le=Z.keyboardNavigationDelegate||e.DefaultKeyboardNavigationDelegate;this.typeNavigationController=new L(this,this.view,Z.keyboardNavigationLabelProvider,Z.keyboardNavigationEventFilter??(()=>!0),le),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(Z),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(j,ee,X,te){return new p.ListView(j,ee,X,te)}createMouseController(j){return new F(this)}updateOptions(j={}){this._options={...this._options,...j},this.typeNavigationController?.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(j),this.keyboardController?.updateOptions(j),this.view.updateOptions(j)}get options(){return this._options}splice(j,ee,X=[]){if(j<0||j>this.view.length)throw new d.ListError(this.user,`Invalid start index: ${j}`);if(ee<0)throw new d.ListError(this.user,`Invalid delete count: ${ee}`);ee===0&&X.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(j,ee,X))}updateWidth(j){this.view.updateWidth(j)}updateElementHeight(j,ee){this.view.updateElementHeight(j,ee,null)}rerender(){this.view.rerender()}element(j){return this.view.element(j)}indexOf(j){return this.view.indexOf(j)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get contentWidth(){return this.view.contentWidth}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get onDidChangeContentWidth(){return this.view.onDidChangeContentWidth}get scrollTop(){return this.view.getScrollTop()}set scrollTop(j){this.view.setScrollTop(j)}get scrollLeft(){return this.view.getScrollLeft()}set scrollLeft(j){this.view.setScrollLeft(j)}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(j){this._ariaLabel=j,this.view.domNode.setAttribute("aria-label",j)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(j,ee){this.view.layout(j,ee)}triggerTypeNavigation(){this.typeNavigationController?.trigger()}setSelection(j,ee){for(const X of j)if(X<0||X>=this.length)throw new d.ListError(this.user,`Invalid index ${X}`);this.selection.set(j,ee)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(j=>this.view.element(j))}setAnchor(j){if(typeof j>"u"){this.anchor.set([]);return}if(j<0||j>=this.length)throw new d.ListError(this.user,`Invalid index ${j}`);this.anchor.set([j])}getAnchor(){return(0,v.firstOrDefault)(this.anchor.get(),void 0)}getAnchorElement(){const j=this.getAnchor();return typeof j>"u"?void 0:this.element(j)}setFocus(j,ee){for(const X of j)if(X<0||X>=this.length)throw new d.ListError(this.user,`Invalid index ${X}`);this.focus.set(j,ee)}focusNext(j=1,ee=!1,X,te){if(this.length===0)return;const Z=this.focus.get(),se=this.findNextIndex(Z.length>0?Z[0]+j:0,ee,te);se>-1&&this.setFocus([se],X)}focusPrevious(j=1,ee=!1,X,te){if(this.length===0)return;const Z=this.focus.get(),se=this.findPreviousIndex(Z.length>0?Z[0]-j:0,ee,te);se>-1&&this.setFocus([se],X)}async focusNextPage(j,ee){let X=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);X=X===0?0:X-1;const te=this.getFocus()[0];if(te!==X&&(te===void 0||X>te)){const Z=this.findPreviousIndex(X,!1,ee);Z>-1&&te!==Z?this.setFocus([Z],j):this.setFocus([X],j)}else{const Z=this.view.getScrollTop();let se=Z+this.view.renderHeight;X>te&&(se-=this.view.elementHeight(X)),this.view.setScrollTop(se),this.view.getScrollTop()!==Z&&(this.setFocus([]),await(0,m.timeout)(0),await this.focusNextPage(j,ee))}}async focusPreviousPage(j,ee){let X;const te=this.view.getScrollTop();te===0?X=this.view.indexAt(te):X=this.view.indexAfter(te-1);const Z=this.getFocus()[0];if(Z!==X&&(Z===void 0||Z>=X)){const se=this.findNextIndex(X,!1,ee);se>-1&&Z!==se?this.setFocus([se],j):this.setFocus([X],j)}else{const se=te;this.view.setScrollTop(te-this.view.renderHeight),this.view.getScrollTop()!==se&&(this.setFocus([]),await(0,m.timeout)(0),await this.focusPreviousPage(j,ee))}}focusLast(j,ee){if(this.length===0)return;const X=this.findPreviousIndex(this.length-1,!1,ee);X>-1&&this.setFocus([X],j)}focusFirst(j,ee){this.focusNth(0,j,ee)}focusNth(j,ee,X){if(this.length===0)return;const te=this.findNextIndex(j,!1,X);te>-1&&this.setFocus([te],ee)}findNextIndex(j,ee=!1,X){for(let te=0;te<this.length;te++){if(j>=this.length&&!ee)return-1;if(j=j%this.length,!X||X(this.element(j)))return j;j++}return-1}findPreviousIndex(j,ee=!1,X){for(let te=0;te<this.length;te++){if(j<0&&!ee)return-1;if(j=(this.length+j%this.length)%this.length,!X||X(this.element(j)))return j;j--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(j=>this.view.element(j))}reveal(j,ee){if(j<0||j>=this.length)throw new d.ListError(this.user,`Invalid index ${j}`);const X=this.view.getScrollTop(),te=this.view.elementTop(j),Z=this.view.elementHeight(j);if((0,u.isNumber)(ee)){const se=Z-this.view.renderHeight;this.view.setScrollTop(se*(0,s.clamp)(ee,0,1)+te)}else{const se=te+Z,re=X+this.view.renderHeight;te<X&&se>=re||(te<X||se>=re&&Z>=this.view.renderHeight?this.view.setScrollTop(te):se>=re&&this.view.setScrollTop(se-this.view.renderHeight))}}getRelativeTop(j){if(j<0||j>=this.length)throw new d.ListError(this.user,`Invalid index ${j}`);const ee=this.view.getScrollTop(),X=this.view.elementTop(j),te=this.view.elementHeight(j);if(X<ee||X+te>ee+this.view.renderHeight)return null;const Z=te-this.view.renderHeight;return Math.abs((ee-X)/Z)}isDOMFocused(){return this.view.domNode===document.activeElement}getHTMLElement(){return this.view.domNode}getElementID(j){return this.view.getElementDomId(j)}style(j){this.styleController.style(j)}toListEvent({indexes:j,browserEvent:ee}){return{indexes:j,elements:j.map(X=>this.view.element(X)),browserEvent:ee}}_onFocusChange(){const j=this.focus.get();this.view.domNode.classList.toggle("element-focused",j.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){const j=this.focus.get();if(j.length>0){let ee;this.accessibilityProvider?.getActiveDescendantId&&(ee=this.accessibilityProvider.getActiveDescendantId(this.view.element(j[0]))),this.view.domNode.setAttribute("aria-activedescendant",ee||this.view.getElementDomId(j[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const j=this.selection.get();this.view.domNode.classList.toggle("selection-none",j.length===0),this.view.domNode.classList.toggle("selection-single",j.length===1),this.view.domNode.classList.toggle("selection-multiple",j.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}e.List=ie,fe([h.memoize],ie.prototype,"onDidChangeFocus",null),fe([h.memoize],ie.prototype,"onDidChangeSelection",null),fe([h.memoize],ie.prototype,"onContextMenu",null),fe([h.memoize],ie.prototype,"onKeyDown",null),fe([h.memoize],ie.prototype,"onKeyUp",null),fe([h.memoize],ie.prototype,"onKeyPress",null),fe([h.memoize],ie.prototype,"onDidFocus",null),fe([h.memoize],ie.prototype,"onDidBlur",null)}),define(Q[1117],Y([1,0,20,31,6,4,179,1057]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedList=void 0;class f{get templateId(){return this.renderer.templateId}constructor(a,r){this.renderer=a,this.modelProvider=r}renderTemplate(a){return{data:this.renderer.renderTemplate(a),disposable:D.Disposable.None}}renderElement(a,r,i,s){if(i.disposable?.dispose(),!i.data)return;const o=this.modelProvider();if(o.isResolved(a))return this.renderer.renderElement(o.get(a),a,i.data,s);const u=new y.CancellationTokenSource,d=o.resolve(a,u.token);i.disposable={dispose:()=>u.cancel()},this.renderer.renderPlaceholder(a,i.data),d.then(p=>this.renderer.renderElement(p,a,i.data,s))}disposeTemplate(a){a.disposable&&(a.disposable.dispose(),a.disposable=void 0),a.data&&(this.renderer.disposeTemplate(a.data),a.data=void 0)}}class v{constructor(a,r){this.modelProvider=a,this.accessibilityProvider=r}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(a){const r=this.modelProvider();return r.isResolved(a)?this.accessibilityProvider.getAriaLabel(r.get(a)):null}}function m(h,a){return{...a,accessibilityProvider:a.accessibilityProvider&&new v(h,a.accessibilityProvider)}}class S{constructor(a,r,i,s,o={}){const u=()=>this.model,d=s.map(p=>new f(p,u));this.list=new T.List(a,r,i,d,m(u,o))}updateOptions(a){this.list.updateOptions(a)}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 b.Event.map(this.list.onMouseClick,({element:a,index:r,browserEvent:i})=>({element:a===void 0?void 0:this._model.get(a),index:r,browserEvent:i}))}get onMouseDblClick(){return b.Event.map(this.list.onMouseDblClick,({element:a,index:r,browserEvent:i})=>({element:a===void 0?void 0:this._model.get(a),index:r,browserEvent:i}))}get onTap(){return b.Event.map(this.list.onTap,({element:a,index:r,browserEvent:i})=>({element:a===void 0?void 0:this._model.get(a),index:r,browserEvent:i}))}get onPointer(){return b.Event.map(this.list.onPointer,({element:a,index:r,browserEvent:i})=>({element:a===void 0?void 0:this._model.get(a),index:r,browserEvent:i}))}get onDidChangeFocus(){return b.Event.map(this.list.onDidChangeFocus,({elements:a,indexes:r,browserEvent:i})=>({elements:a.map(s=>this._model.get(s)),indexes:r,browserEvent:i}))}get onDidChangeSelection(){return b.Event.map(this.list.onDidChangeSelection,({elements:a,indexes:r,browserEvent:i})=>({elements:a.map(s=>this._model.get(s)),indexes:r,browserEvent:i}))}get onContextMenu(){return b.Event.map(this.list.onContextMenu,({element:a,index:r,anchor:i,browserEvent:s})=>typeof a>"u"?{element:a,index:r,anchor:i,browserEvent:s}:{element:this._model.get(a),index:r,anchor:i,browserEvent:s})}get model(){return this._model}set model(a){this._model=a,this.list.splice(0,this.list.length,(0,t.range)(a.length))}get length(){return this.list.length}get scrollTop(){return this.list.scrollTop}set scrollTop(a){this.list.scrollTop=a}get scrollLeft(){return this.list.scrollLeft}set scrollLeft(a){this.list.scrollLeft=a}setAnchor(a){this.list.setAnchor(a)}getAnchor(){return this.list.getAnchor()}setFocus(a){this.list.setFocus(a)}focusNext(a,r){this.list.focusNext(a,r)}focusPrevious(a,r){this.list.focusPrevious(a,r)}focusNextPage(){return this.list.focusNextPage()}focusPreviousPage(){return this.list.focusPreviousPage()}focusLast(){this.list.focusLast()}focusFirst(){this.list.focusFirst()}getFocus(){return this.list.getFocus()}setSelection(a,r){this.list.setSelection(a,r)}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(a=>this.model.get(a))}layout(a,r){this.list.layout(a,r)}triggerTypeNavigation(){this.list.triggerTypeNavigation()}reveal(a,r){this.list.reveal(a,r)}style(a){this.list.style(a)}dispose(){this.list.dispose()}}e.PagedList=S}),define(Q[216],Y([1,0,7,227,229,162,20,80,6,4,226,481,17,229,1693]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitView=e.Sizing=e.LayoutPriority=e.Orientation=void 0,Object.defineProperty(e,"Orientation",{enumerable:!0,get:function(){return r.Orientation}});const i={separatorBorder:f.Color.transparent};var s;(function(n){n[n.Normal=0]="Normal",n[n.Low=1]="Low",n[n.High=2]="High"})(s||(e.LayoutPriority=s={}));class o{set size(g){this._size=g}get size(){return this._size}get cachedVisibleSize(){return this._cachedVisibleSize}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(g,w){g!==this.visible&&(g?(this.size=(0,S.clamp)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof w=="number"?w:this.size,this.size=0),this.container.classList.toggle("visible",g),this.view.setVisible?.(g))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){return this.view.proportionalLayout??!0}get snap(){return!!this.view.snap}set enabled(g){this.container.style.pointerEvents=g?"":"none"}constructor(g,w,E,C){this.container=g,this.view=w,this.disposable=C,this._cachedVisibleSize=void 0,typeof E=="number"?(this._size=E,this._cachedVisibleSize=void 0,g.classList.add("visible")):(this._size=0,this._cachedVisibleSize=E.cachedVisibleSize)}layout(g,w){this.layoutContainer(g),this.view.layout(this.size,g,w)}dispose(){this.disposable.dispose()}}class u extends o{layoutContainer(g){this.container.style.top=`${g}px`,this.container.style.height=`${this.size}px`}}class d extends o{layoutContainer(g){this.container.style.left=`${g}px`,this.container.style.width=`${this.size}px`}}var p;(function(n){n[n.Idle=0]="Idle",n[n.Busy=1]="Busy"})(p||(p={}));var c;(function(n){n.Distribute={type:"distribute"};function g(C){return{type:"split",index:C}}n.Split=g;function w(C){return{type:"auto",index:C}}n.Auto=w;function E(C){return{type:"invisible",cachedVisibleSize:C}}n.Invisible=E})(c||(e.Sizing=c={}));class l extends m.Disposable{get length(){return this.viewItems.length}get minimumSize(){return this.viewItems.reduce((g,w)=>g+w.minimumSize,0)}get maximumSize(){return this.length===0?Number.POSITIVE_INFINITY:this.viewItems.reduce((g,w)=>g+w.maximumSize,0)}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(g){for(const w of this.sashItems)w.sash.orthogonalStartSash=g;this._orthogonalStartSash=g}set orthogonalEndSash(g){for(const w of this.sashItems)w.sash.orthogonalEndSash=g;this._orthogonalEndSash=g}get sashes(){return this.sashItems.map(g=>g.sash)}set startSnappingEnabled(g){this._startSnappingEnabled!==g&&(this._startSnappingEnabled=g,this.updateSashEnablement())}set endSnappingEnabled(g){this._endSnappingEnabled!==g&&(this._endSnappingEnabled=g,this.updateSashEnablement())}constructor(g,w={}){super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=p.Idle,this._onDidSashChange=this._register(new v.Emitter),this._onDidSashReset=this._register(new v.Emitter),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=w.orientation??0,this.inverseAltBehavior=w.inverseAltBehavior??!1,this.proportionalLayout=w.proportionalLayout??!0,this.getSashOrthogonalSize=w.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),g.appendChild(this.el),this.sashContainer=(0,t.append)(this.el,(0,t.$)(".sash-container")),this.viewContainer=(0,t.$)(".split-view-container"),this.scrollable=this._register(new h.Scrollable({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:t.scheduleAtNextAnimationFrame})),this.scrollableElement=this._register(new D.SmoothScrollableElement(this.viewContainer,{vertical:this.orientation===0?w.scrollbarVisibility??1:2,horizontal:this.orientation===1?w.scrollbarVisibility??1:2},this.scrollable));const E=this._register(new y.DomEmitter(this.viewContainer,"scroll")).event;this._register(E(C=>{const I=this.scrollableElement.getScrollPosition(),_=Math.abs(this.viewContainer.scrollLeft-I.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,A=Math.abs(this.viewContainer.scrollTop-I.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(_!==void 0||A!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:_,scrollTop:A})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(C=>{C.scrollTopChanged&&(this.viewContainer.scrollTop=C.scrollTop),C.scrollLeftChanged&&(this.viewContainer.scrollLeft=C.scrollLeft)})),(0,t.append)(this.el,this.scrollableElement.getDomNode()),this.style(w.styles||i),w.descriptor&&(this.size=w.descriptor.size,w.descriptor.views.forEach((C,I)=>{const _=a.isUndefined(C.visible)||C.visible?C.size:{type:"invisible",cachedVisibleSize:C.size},A=C.view;this.doAddView(A,_,I,!0)}),this.contentSize=this.viewItems.reduce((C,I)=>C+I.size,0),this.saveProportions())}style(g){g.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",g.separatorBorder.toString()))}addView(g,w,E=this.viewItems.length,C){this.doAddView(g,w,E,C)}removeView(g,w){if(this.state!==p.Idle)throw new Error("Cant modify splitview");if(this.state=p.Busy,g<0||g>=this.viewItems.length)throw new Error("Index out of bounds");w?.type==="auto"&&(this.areViewsDistributed()?w={type:"distribute"}:w={type:"split",index:w.index});const E=w?.type==="split"?this.viewItems[w.index]:void 0,C=this.viewItems.splice(g,1)[0];if(E&&(E.size+=C.size),this.viewItems.length>=1){const _=Math.max(g-1,0);this.sashItems.splice(_,1)[0].disposable.dispose()}this.relayout(),this.state=p.Idle,w?.type==="distribute"&&this.distributeViewSizes();const I=C.view;return C.dispose(),I}moveView(g,w){if(this.state!==p.Idle)throw new Error("Cant modify splitview");const E=this.getViewCachedVisibleSize(g),C=typeof E>"u"?this.getViewSize(g):c.Invisible(E),I=this.removeView(g);this.addView(I,C,w)}swapViews(g,w){if(this.state!==p.Idle)throw new Error("Cant modify splitview");if(g>w)return this.swapViews(w,g);const E=this.getViewSize(g),C=this.getViewSize(w),I=this.removeView(w),_=this.removeView(g);this.addView(I,E,g),this.addView(_,C,w)}isViewVisible(g){if(g<0||g>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[g].visible}setViewVisible(g,w){if(g<0||g>=this.viewItems.length)throw new Error("Index out of bounds");this.viewItems[g].setVisible(w),this.distributeEmptySpace(g),this.layoutViews(),this.saveProportions()}getViewCachedVisibleSize(g){if(g<0||g>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[g].cachedVisibleSize}layout(g,w){const E=Math.max(this.size,this.contentSize);if(this.size=g,this.layoutContext=w,this.proportions){let C=0;for(let I=0;I<this.viewItems.length;I++){const _=this.viewItems[I],A=this.proportions[I];typeof A=="number"?C+=A:g-=_.size}for(let I=0;I<this.viewItems.length;I++){const _=this.viewItems[I],A=this.proportions[I];typeof A=="number"&&(_.size=(0,S.clamp)(Math.round(A*g/C),_.minimumSize,_.maximumSize))}}else{const C=(0,T.range)(this.viewItems.length),I=C.filter(A=>this.viewItems[A].priority===1),_=C.filter(A=>this.viewItems[A].priority===2);this.resize(this.viewItems.length-1,g-E,void 0,I,_)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(g=>g.proportionalLayout?g.size/this.contentSize:void 0))}onSashStart({sash:g,start:w,alt:E}){for(const A of this.viewItems)A.enabled=!1;const C=this.sashItems.findIndex(A=>A.sash===g),I=(0,m.combinedDisposable)((0,t.addDisposableListener)(document.body,"keydown",A=>_(this.sashDragState.current,A.altKey)),(0,t.addDisposableListener)(document.body,"keyup",()=>_(this.sashDragState.current,!1))),_=(A,k)=>{const L=this.viewItems.map(x=>x.size);let R=Number.NEGATIVE_INFINITY,M=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(k=!k),k)if(C===this.sashItems.length-1){const F=this.viewItems[C];R=(F.minimumSize-F.size)/2,M=(F.maximumSize-F.size)/2}else{const F=this.viewItems[C+1];R=(F.size-F.maximumSize)/2,M=(F.size-F.minimumSize)/2}let N,P;if(!k){const x=(0,T.range)(C,-1),F=(0,T.range)(C+1,this.viewItems.length),V=x.reduce(($,ie)=>$+(this.viewItems[ie].minimumSize-L[ie]),0),W=x.reduce(($,ie)=>$+(this.viewItems[ie].viewMaximumSize-L[ie]),0),z=F.length===0?Number.POSITIVE_INFINITY:F.reduce(($,ie)=>$+(L[ie]-this.viewItems[ie].minimumSize),0),B=F.length===0?Number.NEGATIVE_INFINITY:F.reduce(($,ie)=>$+(L[ie]-this.viewItems[ie].viewMaximumSize),0),K=Math.max(V,B),H=Math.min(z,W),U=this.findFirstSnapIndex(x),G=this.findFirstSnapIndex(F);if(typeof U=="number"){const $=this.viewItems[U],ie=Math.floor($.viewMinimumSize/2);N={index:U,limitDelta:$.visible?K-ie:K+ie,size:$.size}}if(typeof G=="number"){const $=this.viewItems[G],ie=Math.floor($.viewMinimumSize/2);P={index:G,limitDelta:$.visible?H+ie:H-ie,size:$.size}}}this.sashDragState={start:A,current:A,index:C,sizes:L,minDelta:R,maxDelta:M,alt:k,snapBefore:N,snapAfter:P,disposable:I}};_(w,E)}onSashChange({current:g}){const{index:w,start:E,sizes:C,alt:I,minDelta:_,maxDelta:A,snapBefore:k,snapAfter:L}=this.sashDragState;this.sashDragState.current=g;const R=g-E,M=this.resize(w,R,C,void 0,void 0,_,A,k,L);if(I){const N=w===this.sashItems.length-1,P=this.viewItems.map(B=>B.size),x=N?w:w+1,F=this.viewItems[x],V=F.size-F.maximumSize,W=F.size-F.minimumSize,z=N?w-1:w+1;this.resize(z,-M,P,void 0,void 0,V,W)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(g){this._onDidSashChange.fire(g),this.sashDragState.disposable.dispose(),this.saveProportions();for(const w of this.viewItems)w.enabled=!0}onViewChange(g,w){const E=this.viewItems.indexOf(g);E<0||E>=this.viewItems.length||(w=typeof w=="number"?w:g.size,w=(0,S.clamp)(w,g.minimumSize,g.maximumSize),this.inverseAltBehavior&&E>0?(this.resize(E-1,Math.floor((g.size-w)/2)),this.distributeEmptySpace(),this.layoutViews()):(g.size=w,this.relayout([E],void 0)))}resizeView(g,w){if(this.state!==p.Idle)throw new Error("Cant modify splitview");if(this.state=p.Busy,g<0||g>=this.viewItems.length)return;const E=(0,T.range)(this.viewItems.length).filter(A=>A!==g),C=[...E.filter(A=>this.viewItems[A].priority===1),g],I=E.filter(A=>this.viewItems[A].priority===2),_=this.viewItems[g];w=Math.round(w),w=(0,S.clamp)(w,_.minimumSize,Math.min(_.maximumSize,this.size)),_.size=w,this.relayout(C,I),this.state=p.Idle}isViewSizeMaximized(g){if(g<0||g>=this.viewItems.length)return!1;for(const w of this.viewItems)if(w!==this.viewItems[g]&&w.size>w.minimumSize)return!1;return!0}distributeViewSizes(){const g=[];let w=0;for(const A of this.viewItems)A.maximumSize-A.minimumSize>0&&(g.push(A),w+=A.size);const E=Math.floor(w/g.length);for(const A of g)A.size=(0,S.clamp)(E,A.minimumSize,A.maximumSize);const C=(0,T.range)(this.viewItems.length),I=C.filter(A=>this.viewItems[A].priority===1),_=C.filter(A=>this.viewItems[A].priority===2);this.relayout(I,_)}getViewSize(g){return g<0||g>=this.viewItems.length?-1:this.viewItems[g].size}doAddView(g,w,E=this.viewItems.length,C){if(this.state!==p.Idle)throw new Error("Cant modify splitview");this.state=p.Busy;const I=(0,t.$)(".split-view-view");E===this.viewItems.length?this.viewContainer.appendChild(I):this.viewContainer.insertBefore(I,this.viewContainer.children.item(E));const _=g.onDidChange(N=>this.onViewChange(R,N)),A=(0,m.toDisposable)(()=>this.viewContainer.removeChild(I)),k=(0,m.combinedDisposable)(_,A);let L;typeof w=="number"?L=w:(w.type==="auto"&&(this.areViewsDistributed()?w={type:"distribute"}:w={type:"split",index:w.index}),w.type==="split"?L=this.getViewSize(w.index)/2:w.type==="invisible"?L={cachedVisibleSize:w.cachedVisibleSize}:L=g.minimumSize);const R=this.orientation===0?new u(I,g,L,k):new d(I,g,L,k);if(this.viewItems.splice(E,0,R),this.viewItems.length>1){const N={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},P=this.orientation===0?new b.Sash(this.sashContainer,{getHorizontalSashTop:$=>this.getSashPosition($),getHorizontalSashWidth:this.getSashOrthogonalSize},{...N,orientation:1}):new b.Sash(this.sashContainer,{getVerticalSashLeft:$=>this.getSashPosition($),getVerticalSashHeight:this.getSashOrthogonalSize},{...N,orientation:0}),x=this.orientation===0?$=>({sash:P,start:$.startY,current:$.currentY,alt:$.altKey}):$=>({sash:P,start:$.startX,current:$.currentX,alt:$.altKey}),V=v.Event.map(P.onDidStart,x)(this.onSashStart,this),z=v.Event.map(P.onDidChange,x)(this.onSashChange,this),K=v.Event.map(P.onDidEnd,()=>this.sashItems.findIndex($=>$.sash===P))(this.onSashEnd,this),H=P.onDidReset(()=>{const $=this.sashItems.findIndex(X=>X.sash===P),ie=(0,T.range)($,-1),J=(0,T.range)($+1,this.viewItems.length),j=this.findFirstSnapIndex(ie),ee=this.findFirstSnapIndex(J);typeof j=="number"&&!this.viewItems[j].visible||typeof ee=="number"&&!this.viewItems[ee].visible||this._onDidSashReset.fire($)}),U=(0,m.combinedDisposable)(V,z,K,H,P),G={sash:P,disposable:U};this.sashItems.splice(E-1,0,G)}I.appendChild(g.element);let M;typeof w!="number"&&w.type==="split"&&(M=[w.index]),C||this.relayout([E],M),this.state=p.Idle,!C&&typeof w!="number"&&w.type==="distribute"&&this.distributeViewSizes()}relayout(g,w){const E=this.viewItems.reduce((C,I)=>C+I.size,0);this.resize(this.viewItems.length-1,this.size-E,void 0,g,w),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(g,w,E=this.viewItems.map(R=>R.size),C,I,_=Number.NEGATIVE_INFINITY,A=Number.POSITIVE_INFINITY,k,L){if(g<0||g>=this.viewItems.length)return 0;const R=(0,T.range)(g,-1),M=(0,T.range)(g+1,this.viewItems.length);if(I)for(const G of I)(0,T.pushToStart)(R,G),(0,T.pushToStart)(M,G);if(C)for(const G of C)(0,T.pushToEnd)(R,G),(0,T.pushToEnd)(M,G);const N=R.map(G=>this.viewItems[G]),P=R.map(G=>E[G]),x=M.map(G=>this.viewItems[G]),F=M.map(G=>E[G]),V=R.reduce((G,$)=>G+(this.viewItems[$].minimumSize-E[$]),0),W=R.reduce((G,$)=>G+(this.viewItems[$].maximumSize-E[$]),0),z=M.length===0?Number.POSITIVE_INFINITY:M.reduce((G,$)=>G+(E[$]-this.viewItems[$].minimumSize),0),B=M.length===0?Number.NEGATIVE_INFINITY:M.reduce((G,$)=>G+(E[$]-this.viewItems[$].maximumSize),0),K=Math.max(V,B,_),H=Math.min(z,W,A);let U=!1;if(k){const G=this.viewItems[k.index],$=w>=k.limitDelta;U=$!==G.visible,G.setVisible($,k.size)}if(!U&&L){const G=this.viewItems[L.index],$=w<L.limitDelta;U=$!==G.visible,G.setVisible($,L.size)}if(U)return this.resize(g,w,E,C,I,_,A);w=(0,S.clamp)(w,K,H);for(let G=0,$=w;G<N.length;G++){const ie=N[G],J=(0,S.clamp)(P[G]+$,ie.minimumSize,ie.maximumSize),j=J-P[G];$-=j,ie.size=J}for(let G=0,$=w;G<x.length;G++){const ie=x[G],J=(0,S.clamp)(F[G]-$,ie.minimumSize,ie.maximumSize),j=J-F[G];$+=j,ie.size=J}return w}distributeEmptySpace(g){const w=this.viewItems.reduce((A,k)=>A+k.size,0);let E=this.size-w;const C=(0,T.range)(this.viewItems.length-1,-1),I=C.filter(A=>this.viewItems[A].priority===1),_=C.filter(A=>this.viewItems[A].priority===2);for(const A of _)(0,T.pushToStart)(C,A);for(const A of I)(0,T.pushToEnd)(C,A);typeof g=="number"&&(0,T.pushToEnd)(C,g);for(let A=0;E!==0&&A<C.length;A++){const k=this.viewItems[C[A]],L=(0,S.clamp)(k.size+E,k.minimumSize,k.maximumSize),R=L-k.size;E-=R,k.size=L}}layoutViews(){this.contentSize=this.viewItems.reduce((w,E)=>w+E.size,0);let g=0;for(const w of this.viewItems)w.layout(g,this.layoutContext),g+=w.size;this.sashItems.forEach(w=>w.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let g=!1;const w=this.viewItems.map(k=>g=k.size-k.minimumSize>0||g);g=!1;const E=this.viewItems.map(k=>g=k.maximumSize-k.size>0||g),C=[...this.viewItems].reverse();g=!1;const I=C.map(k=>g=k.size-k.minimumSize>0||g).reverse();g=!1;const _=C.map(k=>g=k.maximumSize-k.size>0||g).reverse();let A=0;for(let k=0;k<this.sashItems.length;k++){const{sash:L}=this.sashItems[k],R=this.viewItems[k];A+=R.size;const M=!(w[k]&&_[k+1]),N=!(E[k]&&I[k+1]);if(M&&N){const P=(0,T.range)(k,-1),x=(0,T.range)(k+1,this.viewItems.length),F=this.findFirstSnapIndex(P),V=this.findFirstSnapIndex(x),W=typeof F=="number"&&!this.viewItems[F].visible,z=typeof V=="number"&&!this.viewItems[V].visible;W&&I[k]&&(A>0||this.startSnappingEnabled)?L.state=1:z&&w[k]&&(A<this.contentSize||this.endSnappingEnabled)?L.state=2:L.state=0}else M&&!N?L.state=1:!M&&N?L.state=2:L.state=3}}getSashPosition(g){let w=0;for(let E=0;E<this.sashItems.length;E++)if(w+=this.viewItems[E].size,this.sashItems[E].sash===g)return w;return 0}findFirstSnapIndex(g){for(const w of g){const E=this.viewItems[w];if(E.visible&&E.snap)return w}for(const w of g){const E=this.viewItems[w];if(E.visible&&E.maximumSize-E.minimumSize>0)return;if(!E.visible&&E.snap)return w}}areViewsDistributed(){let g,w;for(const E of this.viewItems)if(g=g===void 0?E.size:Math.min(g,E.size),w=w===void 0?E.size:Math.max(w,E.size),w-g>2)return!1;return!0}dispose(){this.sashDragState?.disposable.dispose(),(0,m.dispose)(this.viewItems),this.viewItems=[],this.sashItems.forEach(g=>g.disposable.dispose()),this.sashItems=[],super.dispose()}}e.SplitView=l}),define(Q[2311],Y([1,0,7,216,6,4]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CenteredViewLayout=void 0;const T={targetWidth:900,leftMarginRatio:.1909,rightMarginRatio:.1909},f={type:"distribute"};function v(h){const a=(0,t.$)(".centered-layout-margin");return a.style.height="100%",h&&(a.style.backgroundColor=h.toString()),{element:a,layout:()=>{},minimumSize:60,maximumSize:Number.POSITIVE_INFINITY,onDidChange:b.Event.None}}function m(h,a){return{element:h.element,get maximumSize(){return h.maximumWidth},get minimumSize(){return h.minimumWidth},onDidChange:b.Event.map(h.onDidChange,r=>r&&r.width),layout:(r,i,s)=>h.layout(r,a(),s?.top??0,(s?.left??0)+i)}}class S{constructor(a,r,i={...T}){this.container=a,this.view=r,this.state=i,this.lastLayoutPosition={width:0,height:0,left:0,top:0},this.didLayout=!1,this.splitViewDisposables=new D.DisposableStore,this.centeredLayoutFixedWidth=!0,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(a){this._boundarySashes=a,this.splitView&&(this.splitView.orthogonalStartSash=a.top,this.splitView.orthogonalEndSash=a.bottom)}layout(a,r,i,s){this.lastLayoutPosition={width:a,height:r,top:i,left:s},this.splitView?(this.splitView.layout(a,this.lastLayoutPosition),(!this.didLayout||this.centeredLayoutFixedWidth)&&this.resizeSplitViews()):this.view.layout(a,r,i,s),this.didLayout=!0}resizeSplitViews(){if(this.splitView)if(this.centeredLayoutFixedWidth){const a=Math.min(this.lastLayoutPosition.width,this.state.targetWidth),r=(this.lastLayoutPosition.width-a)/2;this.splitView.resizeView(0,Math.floor(r)),this.splitView.resizeView(1,a),this.splitView.resizeView(2,Math.ceil(r))}else{const a=this.state.leftMarginRatio*this.lastLayoutPosition.width,r=this.state.rightMarginRatio*this.lastLayoutPosition.width,i=this.lastLayoutPosition.width-a-r;this.splitView.resizeView(0,a),this.splitView.resizeView(1,i),this.splitView.resizeView(2,r)}}setFixedWidth(a){this.centeredLayoutFixedWidth=a,this.splitView&&(this.updateState(),this.resizeSplitViews())}updateState(){this.splitView&&(this.state.targetWidth=this.splitView.getViewSize(1),this.state.leftMarginRatio=this.splitView.getViewSize(0)/this.lastLayoutPosition.width,this.state.rightMarginRatio=this.splitView.getViewSize(2)/this.lastLayoutPosition.width)}isActive(){return!!this.splitView}styles(a){this.style=a,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(a){if(a!==this.isActive())if(a){this.container.removeChild(this.view.element),this.splitView=new y.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.updateState()})),this.splitViewDisposables.add(this.splitView.onDidSashReset(()=>{this.state={...T},this.resizeSplitViews()})),this.splitView.layout(this.lastLayoutPosition.width,this.lastLayoutPosition);const r=this.style?this.style.background:void 0;this.emptyViews=[v(r),v(r)],this.splitView.addView(this.emptyViews[0],f,0),this.splitView.addView(m(this.view,()=>this.lastLayoutPosition.height),f,1),this.splitView.addView(this.emptyViews[1],f,2),this.resizeSplitViews()}else this.splitView&&this.container.removeChild(this.splitView.el),this.splitViewDisposables.clear(),this.splitView?.dispose(),this.splitView=void 0,this.emptyViews=void 0,this.container.appendChild(this.view.element),this.view.layout(this.lastLayoutPosition.width,this.lastLayoutPosition.height,this.lastLayoutPosition.top,this.lastLayoutPosition.left)}isDefault(a){return this.centeredLayoutFixedWidth?a.targetWidth===T.targetWidth:a.leftMarginRatio===T.leftMarginRatio&&a.rightMarginRatio===T.rightMarginRatio}dispose(){this.splitViewDisposables.dispose(),this.splitView&&(this.splitView.dispose(),this.splitView=void 0)}}e.CenteredViewLayout=S}),define(Q[1118],Y([1,0,7,216,20,80,6,4,226,17,229,216,1056]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GridView=e.isGridBranchNode=e.orthogonal=e.Sizing=e.LayoutPriority=e.Orientation=void 0,Object.defineProperty(e,"Orientation",{enumerable:!0,get:function(){return S.Orientation}}),Object.defineProperty(e,"LayoutPriority",{enumerable:!0,get:function(){return h.LayoutPriority}}),Object.defineProperty(e,"Sizing",{enumerable:!0,get:function(){return h.Sizing}});const a={separatorBorder:D.Color.transparent};function r(w){return w===0?1:0}e.orthogonal=r;function i(w){return!!w.children}e.isGridBranchNode=i;class s{constructor(E){this.isLayoutEnabled=E}}function o(w,E){return E===1?{left:w.start,right:w.end,top:w.orthogonalStart,bottom:w.orthogonalEnd}:{top:w.start,bottom:w.end,left:w.orthogonalStart,right:w.orthogonalEnd}}function u(w,E){return E===1?{start:w.left,end:w.right,orthogonalStart:w.top,orthogonalEnd:w.bottom}:{start:w.top,end:w.bottom,orthogonalStart:w.left,orthogonalEnd:w.right}}function d(w,E){if(Math.abs(w)>E)throw new Error("Invalid index");return(0,v.rot)(w,E+1)}class p{get size(){return this._size}get orthogonalSize(){return this._orthogonalSize}get absoluteOffset(){return this._absoluteOffset}get absoluteOrthogonalOffset(){return this._absoluteOrthogonalOffset}get styles(){return this._styles}get width(){return this.orientation===1?this.size:this.orthogonalSize}get height(){return this.orientation===1?this.orthogonalSize:this.size}get top(){return this.orientation===1?this._absoluteOffset:this._absoluteOrthogonalOffset}get left(){return this.orientation===1?this._absoluteOrthogonalOffset:this._absoluteOffset}get minimumSize(){return this.children.length===0?0:Math.max(...this.children.map(E=>E.minimumOrthogonalSize))}get maximumSize(){return Math.min(...this.children.map(E=>E.maximumOrthogonalSize))}get priority(){if(this.children.length===0)return 0;const E=this.children.map(C=>typeof C.priority>"u"?0:C.priority);return E.some(C=>C===2)?2:E.some(C=>C===1)?1:0}get proportionalLayout(){return this.children.length===0?!0:this.children.every(E=>E.proportionalLayout)}get minimumOrthogonalSize(){return this.splitview.minimumSize}get maximumOrthogonalSize(){return this.splitview.maximumSize}get minimumWidth(){return this.orientation===1?this.minimumOrthogonalSize:this.minimumSize}get minimumHeight(){return this.orientation===1?this.minimumSize:this.minimumOrthogonalSize}get maximumWidth(){return this.orientation===1?this.maximumOrthogonalSize:this.maximumSize}get maximumHeight(){return this.orientation===1?this.maximumSize:this.maximumOrthogonalSize}get boundarySashes(){return this._boundarySashes}set boundarySashes(E){if(!(this._boundarySashes.start===E.start&&this._boundarySashes.end===E.end&&this._boundarySashes.orthogonalStart===E.orthogonalStart&&this._boundarySashes.orthogonalEnd===E.orthogonalEnd)){this._boundarySashes=E,this.splitview.orthogonalStartSash=E.orthogonalStart,this.splitview.orthogonalEndSash=E.orthogonalEnd;for(let C=0;C<this.children.length;C++){const I=this.children[C],_=C===0,A=C===this.children.length-1;I.boundarySashes={start:E.orthogonalStart,end:E.orthogonalEnd,orthogonalStart:_?E.start:I.boundarySashes.orthogonalStart,orthogonalEnd:A?E.end:I.boundarySashes.orthogonalEnd}}}}get edgeSnapping(){return this._edgeSnapping}set edgeSnapping(E){if(this._edgeSnapping!==E){this._edgeSnapping=E;for(const C of this.children)C instanceof p&&(C.edgeSnapping=E);this.updateSplitviewEdgeSnappingEnablement()}}constructor(E,C,I,_,A=0,k=0,L=!1,R){if(this.orientation=E,this.layoutController=C,this.splitviewProportionalLayout=_,this.children=[],this._absoluteOffset=0,this._absoluteOrthogonalOffset=0,this.absoluteOrthogonalSize=0,this._onDidChange=new T.Emitter,this.onDidChange=this._onDidChange.event,this._onDidScroll=new T.Emitter,this.onDidScrollDisposable=f.Disposable.None,this.onDidScroll=this._onDidScroll.event,this.childrenChangeDisposable=f.Disposable.None,this._onDidSashReset=new T.Emitter,this.onDidSashReset=this._onDidSashReset.event,this.splitviewSashResetDisposable=f.Disposable.None,this.childrenSashResetDisposable=f.Disposable.None,this._boundarySashes={},this._edgeSnapping=!1,this._styles=I,this._size=A,this._orthogonalSize=k,this.element=(0,t.$)(".monaco-grid-branch-node"),!R)this.splitview=new y.SplitView(this.element,{orientation:E,styles:I,proportionalLayout:_}),this.splitview.layout(A,{orthogonalSize:k,absoluteOffset:0,absoluteOrthogonalOffset:0,absoluteSize:A,absoluteOrthogonalSize:k});else{const N={views:R.map(x=>({view:x.node,size:x.node.size,visible:x.node instanceof l&&x.visible!==void 0?x.visible:!0})),size:this.orthogonalSize},P={proportionalLayout:_,orientation:E,styles:I};this.children=R.map(x=>x.node),this.splitview=new y.SplitView(this.element,{...P,descriptor:N}),this.children.forEach((x,F)=>{const V=F===0,W=F===this.children.length;x.boundarySashes={start:this.boundarySashes.orthogonalStart,end:this.boundarySashes.orthogonalEnd,orthogonalStart:V?this.boundarySashes.start:this.splitview.sashes[F-1],orthogonalEnd:W?this.boundarySashes.end:this.splitview.sashes[F]}})}const M=T.Event.map(this.splitview.onDidSashReset,N=>[N]);this.splitviewSashResetDisposable=M(this._onDidSashReset.fire,this._onDidSashReset),this.updateChildrenEvents()}style(E){this._styles=E,this.splitview.style(E);for(const C of this.children)C instanceof p&&C.style(E)}layout(E,C,I){if(this.layoutController.isLayoutEnabled){if(typeof I>"u")throw new Error("Invalid state");this._size=I.orthogonalSize,this._orthogonalSize=E,this._absoluteOffset=I.absoluteOffset+C,this._absoluteOrthogonalOffset=I.absoluteOrthogonalOffset,this.absoluteOrthogonalSize=I.absoluteOrthogonalSize,this.splitview.layout(I.orthogonalSize,{orthogonalSize:E,absoluteOffset:this._absoluteOrthogonalOffset,absoluteOrthogonalOffset:this._absoluteOffset,absoluteSize:I.absoluteOrthogonalSize,absoluteOrthogonalSize:I.absoluteSize}),this.updateSplitviewEdgeSnappingEnablement()}}setVisible(E){for(const C of this.children)C.setVisible(E)}addChild(E,C,I,_){I=d(I,this.children.length),this.splitview.addView(E,C,I,_),this.children.splice(I,0,E),this.updateBoundarySashes(),this.onDidChildrenChange()}removeChild(E,C){E=d(E,this.children.length),this.splitview.removeView(E,C),this.children.splice(E,1),this.updateBoundarySashes(),this.onDidChildrenChange()}moveChild(E,C){E=d(E,this.children.length),C=d(C,this.children.length),E!==C&&(E<C&&(C-=1),this.splitview.moveView(E,C),this.children.splice(C,0,this.children.splice(E,1)[0]),this.updateBoundarySashes(),this.onDidChildrenChange())}swapChildren(E,C){E=d(E,this.children.length),C=d(C,this.children.length),E!==C&&(this.splitview.swapViews(E,C),[this.children[E].boundarySashes,this.children[C].boundarySashes]=[this.children[E].boundarySashes,this.children[C].boundarySashes],[this.children[E],this.children[C]]=[this.children[C],this.children[E]],this.onDidChildrenChange())}resizeChild(E,C){E=d(E,this.children.length),this.splitview.resizeView(E,C)}isChildSizeMaximized(E){return this.splitview.isViewSizeMaximized(E)}distributeViewSizes(E=!1){if(this.splitview.distributeViewSizes(),E)for(const C of this.children)C instanceof p&&C.distributeViewSizes(!0)}getChildSize(E){return E=d(E,this.children.length),this.splitview.getViewSize(E)}isChildVisible(E){return E=d(E,this.children.length),this.splitview.isViewVisible(E)}setChildVisible(E,C){E=d(E,this.children.length),this.splitview.isViewVisible(E)!==C&&this.splitview.setViewVisible(E,C)}getChildCachedVisibleSize(E){return E=d(E,this.children.length),this.splitview.getViewCachedVisibleSize(E)}updateBoundarySashes(){for(let E=0;E<this.children.length;E++)this.children[E].boundarySashes={start:this.boundarySashes.orthogonalStart,end:this.boundarySashes.orthogonalEnd,orthogonalStart:E===0?this.boundarySashes.start:this.splitview.sashes[E-1],orthogonalEnd:E===this.children.length-1?this.boundarySashes.end:this.splitview.sashes[E]}}onDidChildrenChange(){this.updateChildrenEvents(),this._onDidChange.fire(void 0)}updateChildrenEvents(){const E=T.Event.map(T.Event.any(...this.children.map(_=>_.onDidChange)),()=>{});this.childrenChangeDisposable.dispose(),this.childrenChangeDisposable=E(this._onDidChange.fire,this._onDidChange);const C=T.Event.any(...this.children.map((_,A)=>T.Event.map(_.onDidSashReset,k=>[A,...k])));this.childrenSashResetDisposable.dispose(),this.childrenSashResetDisposable=C(this._onDidSashReset.fire,this._onDidSashReset);const I=T.Event.any(T.Event.signal(this.splitview.onDidScroll),...this.children.map(_=>_.onDidScroll));this.onDidScrollDisposable.dispose(),this.onDidScrollDisposable=I(this._onDidScroll.fire,this._onDidScroll)}trySet2x2(E){if(this.children.length!==2||E.children.length!==2||this.getChildSize(0)!==E.getChildSize(0))return f.Disposable.None;const[C,I]=this.children,[_,A]=E.children;if(!(C instanceof l)||!(I instanceof l)||!(_ instanceof l)||!(A instanceof l))return f.Disposable.None;this.orientation===0?(I.linkedWidthNode=_.linkedHeightNode=C,C.linkedWidthNode=A.linkedHeightNode=I,A.linkedWidthNode=C.linkedHeightNode=_,_.linkedWidthNode=I.linkedHeightNode=A):(_.linkedWidthNode=I.linkedHeightNode=C,A.linkedWidthNode=C.linkedHeightNode=I,C.linkedWidthNode=A.linkedHeightNode=_,I.linkedWidthNode=_.linkedHeightNode=A);const k=this.splitview.sashes[0],L=E.splitview.sashes[0];return k.linkedSash=L,L.linkedSash=k,this._onDidChange.fire(void 0),E._onDidChange.fire(void 0),(0,f.toDisposable)(()=>{k.linkedSash=L.linkedSash=void 0,C.linkedHeightNode=C.linkedWidthNode=void 0,I.linkedHeightNode=I.linkedWidthNode=void 0,_.linkedHeightNode=_.linkedWidthNode=void 0,A.linkedHeightNode=A.linkedWidthNode=void 0})}updateSplitviewEdgeSnappingEnablement(){this.splitview.startSnappingEnabled=this._edgeSnapping||this._absoluteOrthogonalOffset>0,this.splitview.endSnappingEnabled=this._edgeSnapping||this._absoluteOrthogonalOffset+this._size<this.absoluteOrthogonalSize}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.onDidScrollDisposable.dispose(),this.splitview.dispose()}}function c(w){const[E,C]=T.Event.split(w.onDidChange,m.isUndefined);return T.Event.any(C,T.Event.map(T.Event.latch(T.Event.map(E,I=>[w.minimumWidth,w.maximumWidth,w.minimumHeight,w.maximumHeight]),b.equals),I=>{}))}class l{get size(){return this._size}get orthogonalSize(){return this._orthogonalSize}get linkedWidthNode(){return this._linkedWidthNode}set linkedWidthNode(E){this._onDidLinkedWidthNodeChange.input=E?E._onDidViewChange:T.Event.None,this._linkedWidthNode=E,this._onDidSetLinkedNode.fire(void 0)}get linkedHeightNode(){return this._linkedHeightNode}set linkedHeightNode(E){this._onDidLinkedHeightNodeChange.input=E?E._onDidViewChange:T.Event.None,this._linkedHeightNode=E,this._onDidSetLinkedNode.fire(void 0)}constructor(E,C,I,_,A=0){this.view=E,this.orientation=C,this.layoutController=I,this._size=0,this.absoluteOffset=0,this.absoluteOrthogonalOffset=0,this.onDidScroll=T.Event.None,this.onDidSashReset=T.Event.None,this._onDidLinkedWidthNodeChange=new T.Relay,this._linkedWidthNode=void 0,this._onDidLinkedHeightNodeChange=new T.Relay,this._linkedHeightNode=void 0,this._onDidSetLinkedNode=new T.Emitter,this.disposables=new f.DisposableStore,this._boundarySashes={},this.cachedWidth=0,this.cachedHeight=0,this.cachedTop=0,this.cachedLeft=0,this._orthogonalSize=_,this._size=A;const k=c(E);this._onDidViewChange=T.Event.map(k,L=>L&&(this.orientation===0?L.width:L.height),this.disposables),this.onDidChange=T.Event.any(this._onDidViewChange,this._onDidSetLinkedNode.event,this._onDidLinkedWidthNodeChange.event,this._onDidLinkedHeightNodeChange.event)}get width(){return this.orientation===1?this.orthogonalSize:this.size}get height(){return this.orientation===1?this.size:this.orthogonalSize}get top(){return this.orientation===1?this.absoluteOffset:this.absoluteOrthogonalOffset}get left(){return this.orientation===1?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 this.orientation===1?this.minimumHeight:this.minimumWidth}get maximumSize(){return this.orientation===1?this.maximumHeight:this.maximumWidth}get priority(){return this.view.priority}get proportionalLayout(){return this.view.proportionalLayout??!0}get snap(){return this.view.snap}get minimumOrthogonalSize(){return this.orientation===1?this.minimumWidth:this.minimumHeight}get maximumOrthogonalSize(){return this.orientation===1?this.maximumWidth:this.maximumHeight}get boundarySashes(){return this._boundarySashes}set boundarySashes(E){this._boundarySashes=E,this.view.setBoundarySashes?.(o(E,this.orientation))}layout(E,C,I){if(this.layoutController.isLayoutEnabled){if(typeof I>"u")throw new Error("Invalid state");this._size=E,this._orthogonalSize=I.orthogonalSize,this.absoluteOffset=I.absoluteOffset+C,this.absoluteOrthogonalOffset=I.absoluteOrthogonalOffset,this._layout(this.width,this.height,this.top,this.left)}}_layout(E,C,I,_){this.cachedWidth===E&&this.cachedHeight===C&&this.cachedTop===I&&this.cachedLeft===_||(this.cachedWidth=E,this.cachedHeight=C,this.cachedTop=I,this.cachedLeft=_,this.view.layout(E,C,I,_))}setVisible(E){this.view.setVisible?.(E)}dispose(){this.disposables.dispose()}}function n(w,E,C){if(w instanceof p){const I=new p(r(w.orientation),w.layoutController,w.styles,w.splitviewProportionalLayout,E,C,w.edgeSnapping);let _=0;for(let A=w.children.length-1;A>=0;A--){const k=w.children[A],L=k instanceof p?k.orthogonalSize:k.size;let R=w.size===0?0:Math.round(E*L/w.size);_+=R,A===0&&(R+=E-_),I.addChild(n(k,C,R),R,0,!0)}return I}else return new l(w.view,r(w.orientation),w.layoutController,C)}class g{get root(){return this._root}set root(E){const C=this._root;C&&(this.element.removeChild(C.element),C.dispose()),this._root=E,this.element.appendChild(E.element),this.onDidSashResetRelay.input=E.onDidSashReset,this._onDidChange.input=T.Event.map(E.onDidChange,()=>{}),this._onDidScroll.input=E.onDidScroll}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 orientation(){return this._root.orientation}get boundarySashes(){return this._boundarySashes}set orientation(E){if(this._root.orientation===E)return;const{size:C,orthogonalSize:I,absoluteOffset:_,absoluteOrthogonalOffset:A}=this._root;this.root=n(this._root,I,C),this.root.layout(C,0,{orthogonalSize:I,absoluteOffset:A,absoluteOrthogonalOffset:_,absoluteSize:C,absoluteOrthogonalSize:I}),this.boundarySashes=this.boundarySashes}set boundarySashes(E){this._boundarySashes=E,this.root.boundarySashes=u(E,this.orientation)}set edgeSnapping(E){this.root.edgeSnapping=E}constructor(E={}){this.onDidSashResetRelay=new T.Relay,this._onDidScroll=new T.Relay,this._onDidChange=new T.Relay,this._boundarySashes={},this.disposable2x2=f.Disposable.None,this.onDidSashReset=this.onDidSashResetRelay.event,this.onDidScroll=this._onDidScroll.event,this.onDidChange=this._onDidChange.event,this.element=(0,t.$)(".monaco-grid-view"),this.styles=E.styles||a,this.proportionalLayout=typeof E.proportionalLayout<"u"?!!E.proportionalLayout:!0,this.layoutController=new s(!1),this.root=new p(0,this.layoutController,this.styles,this.proportionalLayout)}style(E){this.styles=E,this.root.style(E)}layout(E,C,I=0,_=0){this.layoutController.isLayoutEnabled=!0;const[A,k,L,R]=this.root.orientation===1?[C,E,I,_]:[E,C,_,I];this.root.layout(A,0,{orthogonalSize:k,absoluteOffset:L,absoluteOrthogonalOffset:R,absoluteSize:A,absoluteOrthogonalSize:k})}addView(E,C,I){this.disposable2x2.dispose(),this.disposable2x2=f.Disposable.None;const[_,A]=(0,b.tail2)(I),[k,L]=this.getNode(_);if(L instanceof p){const R=new l(E,r(L.orientation),this.layoutController,L.orthogonalSize);L.addChild(R,C,A)}else{const[,R]=(0,b.tail2)(k),[,M]=(0,b.tail2)(_);let N=0;const P=R.getChildCachedVisibleSize(M);typeof P=="number"&&(N=y.Sizing.Invisible(P)),R.removeChild(M);const x=new p(L.orientation,L.layoutController,this.styles,this.proportionalLayout,L.size,L.orthogonalSize,R.edgeSnapping);R.addChild(x,L.size,M);const F=new l(L.view,R.orientation,this.layoutController,L.size);x.addChild(F,N,0),typeof C!="number"&&C.type==="split"&&(C=y.Sizing.Split(0));const V=new l(E,R.orientation,this.layoutController,L.size);x.addChild(V,C,A)}this.trySet2x2()}removeView(E,C){this.disposable2x2.dispose(),this.disposable2x2=f.Disposable.None;const[I,_]=(0,b.tail2)(E),[A,k]=this.getNode(I);if(!(k instanceof p))throw new Error("Invalid location");const L=k.children[_];if(!(L instanceof l))throw new Error("Invalid location");if(k.removeChild(_,C),k.children.length===0)throw new Error("Invalid grid state");if(k.children.length>1)return this.trySet2x2(),L.view;if(A.length===0){const F=k.children[0];return F instanceof l||(k.removeChild(0),this.root=F,this.boundarySashes=this.boundarySashes,this.trySet2x2()),L.view}const[,R]=(0,b.tail2)(A),[,M]=(0,b.tail2)(I),N=k.children[0],P=k.isChildVisible(0);k.removeChild(0);const x=R.children.map((F,V)=>R.getChildSize(V));if(R.removeChild(M,C),N instanceof p){x.splice(M,1,...N.children.map(F=>F.size));for(let F=0;F<N.children.length;F++){const V=N.children[F];R.addChild(V,V.size,M+F)}}else{const F=new l(N.view,r(N.orientation),this.layoutController,N.size),V=P?N.orthogonalSize:y.Sizing.Invisible(N.orthogonalSize);R.addChild(F,V,M)}for(let F=0;F<x.length;F++)R.resizeChild(F,x[F]);return this.trySet2x2(),L.view}moveView(E,C,I){const[,_]=this.getNode(E);if(!(_ instanceof p))throw new Error("Invalid location");_.moveChild(C,I),this.trySet2x2()}swapViews(E,C){const[I,_]=(0,b.tail2)(E),[,A]=this.getNode(I);if(!(A instanceof p))throw new Error("Invalid from location");const k=A.getChildSize(_),L=A.children[_];if(!(L instanceof l))throw new Error("Invalid from location");const[R,M]=(0,b.tail2)(C),[,N]=this.getNode(R);if(!(N instanceof p))throw new Error("Invalid to location");const P=N.getChildSize(M),x=N.children[M];if(!(x instanceof l))throw new Error("Invalid to location");A===N?A.swapChildren(_,M):(A.removeChild(_),N.removeChild(M),A.addChild(x,k,_),N.addChild(L,P,M)),this.trySet2x2()}resizeView(E,C){const[I,_]=(0,b.tail2)(E),[A,k]=this.getNode(I);if(!(k instanceof p))throw new Error("Invalid location");if(!C.width&&!C.height)return;const[L,R]=k.orientation===1?[C.width,C.height]:[C.height,C.width];if(typeof R=="number"&&A.length>0){const[,M]=(0,b.tail2)(A),[,N]=(0,b.tail2)(I);M.resizeChild(N,R)}typeof L=="number"&&k.resizeChild(_,L),this.trySet2x2()}getViewSize(E){if(!E)return{width:this.root.width,height:this.root.height};const[,C]=this.getNode(E);return{width:C.width,height:C.height}}getViewCachedVisibleSize(E){const[C,I]=(0,b.tail2)(E),[,_]=this.getNode(C);if(!(_ instanceof p))throw new Error("Invalid location");return _.getChildCachedVisibleSize(I)}maximizeViewSize(E){const[C,I]=this.getNode(E);if(!(I instanceof l))throw new Error("Invalid location");for(let _=0;_<C.length;_++)C[_].resizeChild(E[_],Number.POSITIVE_INFINITY)}isViewSizeMaximized(E){const[C,I]=this.getNode(E);if(!(I instanceof l))throw new Error("Invalid location");for(let _=0;_<C.length;_++)if(!C[_].isChildSizeMaximized(E[_]))return!1;return!0}distributeViewSizes(E){if(!E){this.root.distributeViewSizes(!0);return}const[,C]=this.getNode(E);if(!(C instanceof p))throw new Error("Invalid location");C.distributeViewSizes(),this.trySet2x2()}isViewVisible(E){const[C,I]=(0,b.tail2)(E),[,_]=this.getNode(C);if(!(_ instanceof p))throw new Error("Invalid from location");return _.isChildVisible(I)}setViewVisible(E,C){const[I,_]=(0,b.tail2)(E),[,A]=this.getNode(I);if(!(A instanceof p))throw new Error("Invalid from location");A.setChildVisible(_,C)}getView(E){const C=E?this.getNode(E)[1]:this._root;return this._getViews(C,this.orientation)}static deserialize(E,C,I={}){if(typeof E.orientation!="number")throw new Error("Invalid JSON: 'orientation' property must be a number.");if(typeof E.width!="number")throw new Error("Invalid JSON: 'width' property must be a number.");if(typeof E.height!="number")throw new Error("Invalid JSON: 'height' property must be a number.");if(E.root?.type!=="branch")throw new Error("Invalid JSON: 'root' property must have 'type' value of branch.");const _=E.orientation,A=E.height,k=new g(I);return k._deserialize(E.root,_,C,A),k}_deserialize(E,C,I,_){this.root=this._deserializeNode(E,C,I,_)}_deserializeNode(E,C,I,_){let A;if(E.type==="branch"){const L=E.data.map(R=>({node:this._deserializeNode(R,r(C),I,E.size),visible:R.visible}));A=new p(C,this.layoutController,this.styles,this.proportionalLayout,E.size,_,void 0,L)}else A=new l(I.fromJSON(E.data),C,this.layoutController,_,E.size);return A}_getViews(E,C,I){const _={top:E.top,left:E.left,width:E.width,height:E.height};if(E instanceof l)return{view:E.view,box:_,cachedVisibleSize:I};const A=[];for(let k=0;k<E.children.length;k++){const L=E.children[k],R=E.getChildCachedVisibleSize(k);A.push(this._getViews(L,r(C),R))}return{children:A,box:_}}getNode(E,C=this.root,I=[]){if(E.length===0)return[I,C];if(!(C instanceof p))throw new Error("Invalid location");const[_,...A]=E;if(_<0||_>=C.children.length)throw new Error("Invalid location");const k=C.children[_];return I.push(C),this.getNode(A,k,I)}trySet2x2(){if(this.disposable2x2.dispose(),this.disposable2x2=f.Disposable.None,this.root.children.length!==2)return;const[E,C]=this.root.children;!(E instanceof p)||!(C instanceof p)||(this.disposable2x2=E.trySet2x2(C))}getViewMap(E,C){C||(C=this.root),C instanceof p?C.children.forEach(I=>this.getViewMap(E,I)):E.set(C.view,C.element)}dispose(){this.onDidSashResetRelay.dispose(),this.root.dispose(),this.element&&this.element.parentElement&&this.element.parentElement.removeChild(this.element)}}e.GridView=g}),define(Q[828],Y([1,0,20,4,1118,1118,1056]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createSerializedGrid=e.sanitizeGridNodeDescriptor=e.SerializableGrid=e.Grid=e.Sizing=e.getRelativeLocation=e.isGridBranchNode=e.Direction=e.orthogonal=e.Orientation=e.LayoutPriority=void 0,Object.defineProperty(e,"LayoutPriority",{enumerable:!0,get:function(){return D.LayoutPriority}}),Object.defineProperty(e,"Orientation",{enumerable:!0,get:function(){return D.Orientation}}),Object.defineProperty(e,"orthogonal",{enumerable:!0,get:function(){return D.orthogonal}});var T;(function(C){C[C.Up=0]="Up",C[C.Down=1]="Down",C[C.Left=2]="Left",C[C.Right=3]="Right"})(T||(e.Direction=T={}));function f(C){switch(C){case 0:return 1;case 1:return 0;case 2:return 3;case 3:return 2}}function v(C){return!!C.children}e.isGridBranchNode=v;function m(C,I){if(I.length===0)return C;if(!v(C))throw new Error("Invalid location");const[_,...A]=I;return m(C.children[_],A)}function S(C,I){return!(C.start>=I.end||I.start>=C.end)}function h(C,I){const _=i(I),A=I===0?C.top:I===3?C.left+C.width:I===1?C.top+C.height:C.left,k={start:_===1?C.top:C.left,end:_===1?C.top+C.height:C.left+C.width};return{offset:A,range:k}}function a(C,I,_){const A=[];function k(L,R,M){if(v(L))for(const N of L.children)k(N,R,M);else{const{offset:N,range:P}=h(L.box,R);N===M.offset&&S(P,M.range)&&A.push(L)}}return k(C,I,_),A}function r(C,I){return I.length%2===0?(0,b.orthogonal)(C):C}function i(C){return C===0||C===1?0:1}function s(C,I,_){const A=r(C,I),k=i(_);if(A===k){let[L,R]=(0,t.tail2)(I);return(_===3||_===1)&&(R+=1),[...L,R]}else{const L=_===3||_===1?1:0;return[...I,L]}}e.getRelativeLocation=s;function o(C){const I=C.parentElement;if(!I)throw new Error("Invalid grid element");let _=I.firstElementChild,A=0;for(;_!==C&&_!==I.lastElementChild&&_;)_=_.nextElementSibling,A++;return A}function u(C){const I=C.parentElement;if(!I)throw new Error("Invalid grid element");if(/\bmonaco-grid-view\b/.test(I.className))return[];const _=o(I),A=I.parentElement.parentElement.parentElement.parentElement;return[...u(A),_]}var d;(function(C){C.Distribute={type:"distribute"},C.Split={type:"split"},C.Auto={type:"auto"};function I(_){return{type:"invisible",cachedVisibleSize:_}}C.Invisible=I})(d||(e.Sizing=d={}));class p extends y.Disposable{get orientation(){return this.gridview.orientation}set orientation(I){this.gridview.orientation=I}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 boundarySashes(){return this.gridview.boundarySashes}set boundarySashes(I){this.gridview.boundarySashes=I}set edgeSnapping(I){this.gridview.edgeSnapping=I}get element(){return this.gridview.element}constructor(I,_={}){super(),this.views=new Map,this.didLayout=!1,I instanceof b.GridView?(this.gridview=I,this.gridview.getViewMap(this.views)):this.gridview=new b.GridView(_),this._register(this.gridview),this._register(this.gridview.onDidSashReset(this.onDidSashReset,this)),I instanceof b.GridView||this._addView(I,0,[0]),this.onDidChange=this.gridview.onDidChange,this.onDidScroll=this.gridview.onDidScroll}style(I){this.gridview.style(I)}layout(I,_,A=0,k=0){this.gridview.layout(I,_,A,k),this.didLayout=!0}addView(I,_,A,k){if(this.views.has(I))throw new Error("Can't add same view twice");const L=i(k);this.views.size===1&&this.orientation!==L&&(this.orientation=L);const R=this.getViewLocation(A),M=s(this.gridview.orientation,R,k);let N;if(typeof _=="number")N=_;else if(_.type==="split"){const[,P]=(0,t.tail2)(R);N=b.Sizing.Split(P)}else if(_.type==="distribute")N=b.Sizing.Distribute;else if(_.type==="auto"){const[,P]=(0,t.tail2)(R);N=b.Sizing.Auto(P)}else N=_;this._addView(I,N,M)}addViewAt(I,_,A){if(this.views.has(I))throw new Error("Can't add same view twice");let k;typeof _=="number"?k=_:_.type==="distribute"?k=b.Sizing.Distribute:k=_,this._addView(I,k,A)}_addView(I,_,A){this.views.set(I,I.element),this.gridview.addView(I,_,A)}removeView(I,_){if(this.views.size===1)throw new Error("Can't remove last view");const A=this.getViewLocation(I);let k;if(_?.type==="distribute")k=b.Sizing.Distribute;else if(_?.type==="auto"){const L=A[A.length-1];k=b.Sizing.Auto(L===0?1:L-1)}this.gridview.removeView(A,k),this.views.delete(I)}moveView(I,_,A,k){const L=this.getViewLocation(I),[R,M]=(0,t.tail2)(L),N=this.getViewLocation(A),P=s(this.gridview.orientation,N,k),[x,F]=(0,t.tail2)(P);(0,t.equals)(R,x)?this.gridview.moveView(R,M,F):(this.removeView(I,typeof _=="number"?void 0:_),this.addView(I,_,A,k))}moveViewTo(I,_){const A=this.getViewLocation(I),[k,L]=(0,t.tail2)(A),[R,M]=(0,t.tail2)(_);if((0,t.equals)(k,R))this.gridview.moveView(k,L,M);else{const N=this.getViewSize(I),P=r(this.gridview.orientation,A),x=this.getViewCachedVisibleSize(I),F=typeof x>"u"?P===1?N.width:N.height:d.Invisible(x);this.removeView(I),this.addViewAt(I,F,_)}}swapViews(I,_){const A=this.getViewLocation(I),k=this.getViewLocation(_);return this.gridview.swapViews(A,k)}resizeView(I,_){const A=this.getViewLocation(I);return this.gridview.resizeView(A,_)}isViewSizeMaximized(I){const _=this.getViewLocation(I);return this.gridview.isViewSizeMaximized(_)}getViewSize(I){if(!I)return this.gridview.getViewSize();const _=this.getViewLocation(I);return this.gridview.getViewSize(_)}getViewCachedVisibleSize(I){const _=this.getViewLocation(I);return this.gridview.getViewCachedVisibleSize(_)}maximizeViewSize(I){const _=this.getViewLocation(I);this.gridview.maximizeViewSize(_)}distributeViewSizes(){this.gridview.distributeViewSizes()}isViewVisible(I){const _=this.getViewLocation(I);return this.gridview.isViewVisible(_)}setViewVisible(I,_){const A=this.getViewLocation(I);this.gridview.setViewVisible(A,_)}getViews(){return this.gridview.getView()}getNeighborViews(I,_,A=!1){if(!this.didLayout)throw new Error("Can't call getNeighborViews before first layout");const k=this.getViewLocation(I),L=this.getViews(),R=m(L,k);let M=h(R.box,_);return A&&(_===0&&R.box.top===0?M={offset:L.box.top+L.box.height,range:M.range}:_===3&&R.box.left+R.box.width===L.box.width?M={offset:0,range:M.range}:_===1&&R.box.top+R.box.height===L.box.height?M={offset:0,range:M.range}:_===2&&R.box.left===0&&(M={offset:L.box.left+L.box.width,range:M.range})),a(L,f(_),M).map(N=>N.view)}getViewLocation(I){const _=this.views.get(I);if(!_)throw new Error("View not found");return u(_)}onDidSashReset(I){const _=L=>{const R=this.gridview.getView(L);if(v(R))return!1;const M=r(this.orientation,L),N=M===1?R.view.preferredWidth:R.view.preferredHeight;if(typeof N!="number")return!1;const P=M===1?{width:Math.round(N)}:{height:Math.round(N)};return this.gridview.resizeView(L,P),!0};if(_(I))return;const[A,k]=(0,t.tail2)(I);_([...A,k+1])||this.gridview.distributeViewSizes(A)}}e.Grid=p;class c extends p{constructor(){super(...arguments),this.initialLayoutContext=!0}static serializeNode(I,_){const A=_===0?I.box.width:I.box.height;return v(I)?{type:"branch",data:I.children.map(k=>c.serializeNode(k,(0,b.orthogonal)(_))),size:A}:typeof I.cachedVisibleSize=="number"?{type:"leaf",data:I.view.toJSON(),size:I.cachedVisibleSize,visible:!1}:{type:"leaf",data:I.view.toJSON(),size:A}}static deserialize(I,_,A={}){if(typeof I.orientation!="number")throw new Error("Invalid JSON: 'orientation' property must be a number.");if(typeof I.width!="number")throw new Error("Invalid JSON: 'width' property must be a number.");if(typeof I.height!="number")throw new Error("Invalid JSON: 'height' property must be a number.");const k=b.GridView.deserialize(I,_,A);return new c(k,A)}static from(I,_={}){return c.deserialize(E(I),{fromJSON:A=>A},_)}serialize(){return{root:c.serializeNode(this.getViews(),this.orientation),orientation:this.orientation,width:this.width,height:this.height}}layout(I,_,A=0,k=0){super.layout(I,_,A,k),this.initialLayoutContext&&(this.initialLayoutContext=!1,this.gridview.trySet2x2())}}e.SerializableGrid=c;function l(C){return!!C.groups}function n(C,I){if(!I&&C.groups&&C.groups.length<=1&&(C.groups=void 0),!l(C))return;let _=0,A=0;for(const M of C.groups)n(M,!1),M.size&&(_+=M.size,A++);const k=A>0?_:1,L=C.groups.length-A,R=k/L;for(const M of C.groups)M.size||(M.size=R)}e.sanitizeGridNodeDescriptor=n;function g(C){return l(C)?{type:"branch",data:C.groups.map(I=>g(I)),size:C.size}:{type:"leaf",data:C.data,size:C.size}}function w(C,I){if(C.type==="branch"){const _=C.data.map(A=>w(A,(0,b.orthogonal)(I)));if(I===0){const A=C.size||(_.length===0?void 0:Math.max(..._.map(L=>L.width||0))),k=_.length===0?void 0:_.reduce((L,R)=>L+(R.height||0),0);return{width:A,height:k}}else{const A=_.length===0?void 0:_.reduce((L,R)=>L+(R.width||0),0),k=C.size||(_.length===0?void 0:Math.max(..._.map(L=>L.height||0)));return{width:A,height:k}}}else{const _=I===0?C.size:void 0,A=I===0?void 0:C.size;return{width:_,height:A}}}function E(C){n(C,!0);const I=g(C),{width:_,height:A}=w(I,C.orientation);return{root:I,orientation:C.orientation,width:_||1,height:A||1}}e.createSerializedGrid=E}),define(Q[1119],Y([1,0,97,240,7,227,67,151,80,6,4,2268,216,1692]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PaneView=e.DefaultPaneDndController=e.Pane=void 0;class r extends S.Disposable{static{this.HEADER_SIZE=22}get ariaHeaderLabel(){return this._ariaHeaderLabel}set ariaHeaderLabel(d){this._ariaHeaderLabel=d,this.header.setAttribute("aria-label",this.ariaHeaderLabel)}get draggableElement(){return this.header}get dropTargetElement(){return this.element}get dropBackground(){return this.styles.dropBackground}get minimumBodySize(){return this._minimumBodySize}set minimumBodySize(d){this._minimumBodySize=d,this._onDidChange.fire(void 0)}get maximumBodySize(){return this._maximumBodySize}set maximumBodySize(d){this._maximumBodySize=d,this._onDidChange.fire(void 0)}get headerSize(){return this.headerVisible?r.HEADER_SIZE:0}get minimumSize(){const d=this.headerSize,c=!this.headerVisible||this.isExpanded()?this.minimumBodySize:0;return d+c}get maximumSize(){const d=this.headerSize,c=!this.headerVisible||this.isExpanded()?this.maximumBodySize:0;return d+c}constructor(d){super(),this.expandedSize=void 0,this._headerVisible=!0,this._bodyRendered=!1,this.styles={dropBackground:void 0,headerBackground:void 0,headerBorder:void 0,headerForeground:void 0,leftBorder:void 0},this.animationTimer=void 0,this._onDidChange=this._register(new m.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeExpansionState=this._register(new m.Emitter),this.onDidChangeExpansionState=this._onDidChangeExpansionState.event,this.orthogonalSize=0,this._expanded=typeof d.expanded>"u"?!0:!!d.expanded,this._orientation=typeof d.orientation>"u"?0:d.orientation,this._ariaHeaderLabel=(0,h.localize)(0,null,d.title),this._minimumBodySize=typeof d.minimumBodySize=="number"?d.minimumBodySize:this._orientation===1?200:120,this._maximumBodySize=typeof d.maximumBodySize=="number"?d.maximumBodySize:Number.POSITIVE_INFINITY,this.element=(0,b.$)(".pane")}isExpanded(){return this._expanded}setExpanded(d){return this._expanded===!!d?!1:(this.element?.classList.toggle("expanded",d),this._expanded=!!d,this.updateHeader(),d?(this._bodyRendered||(this.renderBody(this.body),this._bodyRendered=!0),typeof this.animationTimer=="number"&&clearTimeout(this.animationTimer),(0,b.append)(this.element,this.body)):this.animationTimer=window.setTimeout(()=>{this.body.remove()},200),this._onDidChangeExpansionState.fire(d),this._onDidChange.fire(d?this.expandedSize:void 0),!0)}get headerVisible(){return this._headerVisible}set headerVisible(d){this._headerVisible!==!!d&&(this._headerVisible=!!d,this.updateHeader(),this._onDidChange.fire(void 0))}get orientation(){return this._orientation}set orientation(d){this._orientation!==d&&(this._orientation=d,this.element&&(this.element.classList.toggle("horizontal",this.orientation===1),this.element.classList.toggle("vertical",this.orientation===0)),this.header&&this.updateHeader())}render(){this.element.classList.toggle("expanded",this.isExpanded()),this.element.classList.toggle("horizontal",this.orientation===1),this.element.classList.toggle("vertical",this.orientation===0),this.header=(0,b.$)(".pane-header"),(0,b.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 d=(0,b.trackFocus)(this.header);this._register(d),this._register(d.onDidFocus(()=>this.header.classList.add("focused"),null)),this._register(d.onDidBlur(()=>this.header.classList.remove("focused"),null)),this.updateHeader();const p=this._register(new S.DisposableStore),c=this._register(new D.DomEmitter(this.header,"keydown")),l=m.Event.map(c.event,n=>new T.StandardKeyboardEvent(n),p);this._register(m.Event.filter(l,n=>n.keyCode===3||n.keyCode===10,p)(()=>this.setExpanded(!this.isExpanded()),null)),this._register(m.Event.filter(l,n=>n.keyCode===15,p)(()=>this.setExpanded(!1),null)),this._register(m.Event.filter(l,n=>n.keyCode===17,p)(()=>this.setExpanded(!0),null)),this._register(f.Gesture.addTarget(this.header)),[b.EventType.CLICK,f.EventType.Tap].forEach(n=>{this._register((0,b.addDisposableListener)(this.header,n,g=>{g.defaultPrevented||this.setExpanded(!this.isExpanded())}))}),this.body=(0,b.append)(this.element,(0,b.$)(".pane-body")),!this._bodyRendered&&this.isExpanded()&&(this.renderBody(this.body),this._bodyRendered=!0),this.isExpanded()||this.body.remove()}layout(d){const p=this.headerVisible?r.HEADER_SIZE:0,c=this._orientation===0?this.orthogonalSize:d,l=this._orientation===0?d-p:this.orthogonalSize-p;this.isExpanded()&&(this.body.classList.toggle("wide",c>=600),this.layoutBody(l,c),this.expandedSize=d)}style(d){this.styles=d,this.header&&this.updateHeader()}updateHeader(){const d=!this.headerVisible||this.isExpanded();this.header.style.lineHeight=`${this.headerSize}px`,this.header.classList.toggle("hidden",!this.headerVisible),this.header.classList.toggle("expanded",d),this.header.setAttribute("aria-expanded",String(d)),this.header.style.color=this.styles.headerForeground??"",this.header.style.backgroundColor=this.styles.headerBackground??"",this.header.style.borderTop=this.styles.headerBorder&&this.orientation===0?`1px solid ${this.styles.headerBorder}`:"",this.element.style.borderLeft=this.styles.leftBorder&&this.orientation===1?`1px solid ${this.styles.leftBorder}`:""}}e.Pane=r;class i extends S.Disposable{static{this.DefaultDragOverBackgroundColor=new v.Color(new v.RGBA(128,128,128,.5))}constructor(d,p,c){super(),this.pane=d,this.dnd=p,this.context=c,this.dragOverCounter=0,this._onDidDrop=this._register(new m.Emitter),this.onDidDrop=this._onDidDrop.event,d.draggableElement.draggable=!0,this._register((0,b.addDisposableListener)(d.draggableElement,"dragstart",l=>this.onDragStart(l))),this._register((0,b.addDisposableListener)(d.dropTargetElement,"dragenter",l=>this.onDragEnter(l))),this._register((0,b.addDisposableListener)(d.dropTargetElement,"dragleave",l=>this.onDragLeave(l))),this._register((0,b.addDisposableListener)(d.dropTargetElement,"dragend",l=>this.onDragEnd(l))),this._register((0,b.addDisposableListener)(d.dropTargetElement,"drop",l=>this.onDrop(l)))}onDragStart(d){if(!this.dnd.canDrag(this.pane)||!d.dataTransfer){d.preventDefault(),d.stopPropagation();return}d.dataTransfer.effectAllowed="move",t.isFirefox&&d.dataTransfer?.setData(y.DataTransfers.TEXT,this.pane.draggableElement.textContent||"");const p=(0,b.append)(document.body,(0,b.$)(".monaco-drag-image",{},this.pane.draggableElement.textContent||""));d.dataTransfer.setDragImage(p,-10,-10),setTimeout(()=>document.body.removeChild(p),0),this.context.draggable=this}onDragEnter(d){!this.context.draggable||this.context.draggable===this||this.dnd.canDrop(this.context.draggable.pane,this.pane)&&(this.dragOverCounter++,this.render())}onDragLeave(d){!this.context.draggable||this.context.draggable===this||this.dnd.canDrop(this.context.draggable.pane,this.pane)&&(this.dragOverCounter--,this.dragOverCounter===0&&this.render())}onDragEnd(d){this.context.draggable&&(this.dragOverCounter=0,this.render(),this.context.draggable=null)}onDrop(d){this.context.draggable&&(b.EventHelper.stop(d),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 d=null;this.dragOverCounter>0&&(d=this.pane.dropBackground??i.DefaultDragOverBackgroundColor.toString()),this.pane.dropTargetElement.style.backgroundColor=d||""}}class s{canDrag(d){return!0}canDrop(d,p){return!0}}e.DefaultPaneDndController=s;class o extends S.Disposable{constructor(d,p={}){super(),this.dndContext={draggable:null},this.paneItems=[],this.orthogonalSize=0,this.size=0,this.animationTimer=void 0,this._onDidDrop=this._register(new m.Emitter),this.onDidDrop=this._onDidDrop.event,this.dnd=p.dnd,this.orientation=p.orientation??0,this.element=(0,b.append)(d,(0,b.$)(".monaco-pane-view")),this.splitview=this._register(new a.SplitView(this.element,{orientation:this.orientation})),this.onDidSashReset=this.splitview.onDidSashReset,this.onDidSashChange=this.splitview.onDidSashChange,this.onDidScroll=this.splitview.onDidScroll;const c=this._register(new S.DisposableStore),l=this._register(new D.DomEmitter(this.element,"keydown")),n=m.Event.map(m.Event.filter(l.event,g=>g.target instanceof HTMLElement&&g.target.classList.contains("pane-header"),c),g=>new T.StandardKeyboardEvent(g),c);this._register(m.Event.filter(n,g=>g.keyCode===16,c)(()=>this.focusPrevious())),this._register(m.Event.filter(n,g=>g.keyCode===18,c)(()=>this.focusNext()))}addPane(d,p,c=this.splitview.length){const l=new S.DisposableStore;d.onDidChangeExpansionState(this.setupAnimation,this,l);const n={pane:d,disposable:l};if(this.paneItems.splice(c,0,n),d.orientation=this.orientation,d.orthogonalSize=this.orthogonalSize,this.splitview.addView(d,p,c),this.dnd){const g=new i(d,this.dnd,this.dndContext);l.add(g),l.add(g.onDidDrop(this._onDidDrop.fire,this._onDidDrop))}}removePane(d){const p=this.paneItems.findIndex(l=>l.pane===d);if(p===-1)return;this.splitview.removeView(p,d.isExpanded()?a.Sizing.Distribute:void 0),this.paneItems.splice(p,1)[0].disposable.dispose()}movePane(d,p){const c=this.paneItems.findIndex(g=>g.pane===d),l=this.paneItems.findIndex(g=>g.pane===p);if(c===-1||l===-1)return;const[n]=this.paneItems.splice(c,1);this.paneItems.splice(l,0,n),this.splitview.moveView(c,l)}resizePane(d,p){const c=this.paneItems.findIndex(l=>l.pane===d);c!==-1&&this.splitview.resizeView(c,p)}getPaneSize(d){const p=this.paneItems.findIndex(c=>c.pane===d);return p===-1?-1:this.splitview.getViewSize(p)}layout(d,p){this.orthogonalSize=this.orientation===0?p:d,this.size=this.orientation===1?p:d;for(const c of this.paneItems)c.pane.orthogonalSize=this.orthogonalSize;this.splitview.layout(this.size)}setBoundarySashes(d){this.boundarySashes=d,this.updateSplitviewOrthogonalSashes(d)}updateSplitviewOrthogonalSashes(d){this.orientation===0?(this.splitview.orthogonalStartSash=d?.left,this.splitview.orthogonalEndSash=d?.right):this.splitview.orthogonalEndSash=d?.bottom}flipOrientation(d,p){this.orientation=this.orientation===0?1:0;const c=this.paneItems.map(g=>this.getPaneSize(g.pane));this.splitview.dispose(),(0,b.clearNode)(this.element),this.splitview=this._register(new a.SplitView(this.element,{orientation:this.orientation})),this.updateSplitviewOrthogonalSashes(this.boundarySashes);const l=this.orientation===0?p:d,n=this.orientation===1?p:d;this.paneItems.forEach((g,w)=>{g.pane.orthogonalSize=l,g.pane.orientation=this.orientation;const E=this.size===0?0:n*c[w]/this.size;this.splitview.addView(g.pane,E,w)}),this.size=n,this.orthogonalSize=l,this.splitview.layout(this.size)}setupAnimation(){typeof this.animationTimer=="number"&&window.clearTimeout(this.animationTimer),this.element.classList.add("animated"),this.animationTimer=window.setTimeout(()=>{this.animationTimer=void 0,this.element.classList.remove("animated")},200)}getPaneHeaderElements(){return[...this.element.querySelectorAll(".pane-header")]}focusPrevious(){const d=this.getPaneHeaderElements(),p=d.indexOf(document.activeElement);p!==-1&&d[Math.max(p-1,0)].focus()}focusNext(){const d=this.getPaneHeaderElements(),p=d.indexOf(document.activeElement);p!==-1&&d[Math.min(p+1,d.length-1)].focus()}dispose(){super.dispose(),this.paneItems.forEach(d=>d.disposable.dispose())}}e.PaneView=o}),define(Q[1120],Y([1,0,7,179,216,6,4,1694]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Table=void 0;class f{static{this.TemplateId="row"}constructor(a,r,i){this.columns=a,this.getColumnSize=i,this.templateId=f.TemplateId,this.renderedTemplates=new Set;const s=new Map(r.map(o=>[o.templateId,o]));this.renderers=[];for(const o of a){const u=s.get(o.templateId);if(!u)throw new Error(`Table cell renderer for template id ${o.templateId} not found.`);this.renderers.push(u)}}renderTemplate(a){const r=(0,t.append)(a,(0,t.$)(".monaco-table-tr")),i=[],s=[];for(let u=0;u<this.columns.length;u++){const d=this.renderers[u],p=(0,t.append)(r,(0,t.$)(".monaco-table-td",{"data-col-index":u}));p.style.width=`${this.getColumnSize(u)}px`,i.push(p),s.push(d.renderTemplate(p))}const o={container:a,cellContainers:i,cellTemplateData:s};return this.renderedTemplates.add(o),o}renderElement(a,r,i,s){for(let o=0;o<this.columns.length;o++){const d=this.columns[o].project(a);this.renderers[o].renderElement(d,r,i.cellTemplateData[o],s)}}disposeElement(a,r,i,s){for(let o=0;o<this.columns.length;o++){const u=this.renderers[o];if(u.disposeElement){const p=this.columns[o].project(a);u.disposeElement(p,r,i.cellTemplateData[o],s)}}}disposeTemplate(a){for(let r=0;r<this.columns.length;r++)this.renderers[r].disposeTemplate(a.cellTemplateData[r]);(0,t.clearNode)(a.container),this.renderedTemplates.delete(a)}layoutColumn(a,r){for(const{cellContainers:i}of this.renderedTemplates)i[a].style.width=`${r}px`}}function v(h){return{getHeight(a){return h.getHeight(a)},getTemplateId(){return f.TemplateId}}}class m{get minimumSize(){return this.column.minimumWidth??120}get maximumSize(){return this.column.maximumWidth??Number.POSITIVE_INFINITY}get onDidChange(){return this.column.onDidChangeWidthConstraints??D.Event.None}constructor(a,r){this.column=a,this.index=r,this._onDidLayout=new D.Emitter,this.onDidLayout=this._onDidLayout.event,this.element=(0,t.$)(".monaco-table-th",{"data-col-index":r,title:a.tooltip},a.label)}layout(a){this._onDidLayout.fire([this.index,a])}}class S{static{this.InstanceCount=0}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onDidScroll(){return this.list.onDidScroll}get onMouseClick(){return this.list.onMouseClick}get onMouseDblClick(){return this.list.onMouseDblClick}get onMouseMiddleClick(){return this.list.onMouseMiddleClick}get onPointer(){return this.list.onPointer}get onMouseUp(){return this.list.onMouseUp}get onMouseDown(){return this.list.onMouseDown}get onMouseOver(){return this.list.onMouseOver}get onMouseMove(){return this.list.onMouseMove}get onMouseOut(){return this.list.onMouseOut}get onTouchStart(){return this.list.onTouchStart}get onTap(){return this.list.onTap}get onContextMenu(){return this.list.onContextMenu}get onDidFocus(){return this.list.onDidFocus}get onDidBlur(){return this.list.onDidBlur}get scrollTop(){return this.list.scrollTop}set scrollTop(a){this.list.scrollTop=a}get scrollLeft(){return this.list.scrollLeft}set scrollLeft(a){this.list.scrollLeft=a}get scrollHeight(){return this.list.scrollHeight}get renderHeight(){return this.list.renderHeight}get onDidDispose(){return this.list.onDidDispose}constructor(a,r,i,s,o,u){this.virtualDelegate=i,this.domId=`table_id_${++S.InstanceCount}`,this.disposables=new T.DisposableStore,this.cachedWidth=0,this.cachedHeight=0,this.domNode=(0,t.append)(r,(0,t.$)(`.monaco-table.${this.domId}`));const d=s.map((l,n)=>new m(l,n)),p={size:d.reduce((l,n)=>l+n.column.weight,0),views:d.map(l=>({size:l.column.weight,view:l}))};this.splitview=this.disposables.add(new b.SplitView(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:p})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const c=new f(s,o,l=>this.splitview.getViewSize(l));this.list=this.disposables.add(new y.List(a,this.domNode,v(i),[c],u)),D.Event.any(...d.map(l=>l.onDidLayout))(([l,n])=>c.layoutColumn(l,n),null,this.disposables),this.splitview.onDidSashReset(l=>{const n=s.reduce((w,E)=>w+E.weight,0),g=s[l].weight/n*this.cachedWidth;this.splitview.resizeView(l,g)},null,this.disposables),this.styleElement=(0,t.createStyleSheet)(this.domNode),this.style(y.unthemedListStyles)}updateOptions(a){this.list.updateOptions(a)}splice(a,r,i=[]){this.list.splice(a,r,i)}rerender(){this.list.rerender()}row(a){return this.list.element(a)}indexOf(a){return this.list.indexOf(a)}get length(){return this.list.length}getHTMLElement(){return this.domNode}layout(a,r){a=a??(0,t.getContentHeight)(this.domNode),r=r??(0,t.getContentWidth)(this.domNode),this.cachedWidth=r,this.cachedHeight=a,this.splitview.layout(r);const i=a-this.virtualDelegate.headerRowHeight;this.list.getHTMLElement().style.height=`${i}px`,this.list.layout(i,r)}triggerTypeNavigation(){this.list.triggerTypeNavigation()}style(a){const r=[];r.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { top: ${this.virtualDelegate.headerRowHeight+1}px; height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); }`),this.styleElement.textContent=r.join(` `),this.list.style(a)}domFocus(){this.list.domFocus()}setAnchor(a){this.list.setAnchor(a)}getAnchor(){return this.list.getAnchor()}getSelectedElements(){return this.list.getSelectedElements()}setSelection(a,r){this.list.setSelection(a,r)}getSelection(){return this.list.getSelection()}setFocus(a,r){this.list.setFocus(a,r)}focusNext(a=1,r=!1,i){this.list.focusNext(a,r,i)}focusPrevious(a=1,r=!1,i){this.list.focusPrevious(a,r,i)}focusNextPage(a){return this.list.focusNextPage(a)}focusPreviousPage(a){return this.list.focusPreviousPage(a)}focusFirst(a){this.list.focusFirst(a)}focusLast(a){this.list.focusLast(a)}getFocus(){return this.list.getFocus()}getFocusedElements(){return this.list.getFocusedElements()}getRelativeTop(a){return this.list.getRelativeTop(a)}reveal(a,r){this.list.reveal(a,r)}dispose(){this.disposables.dispose()}}e.Table=S}),define(Q[195],Y([1,0,20,14,206,69,55,18,33]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.patternsEquals=e.getPathTerms=e.getBasenameTerms=e.isRelativePattern=e.parse=e.match=e.splitGlobAware=e.GLOB_SPLIT=e.GLOBSTAR=e.getEmptyExpression=void 0;function m(){return Object.create(null)}e.getEmptyExpression=m,e.GLOBSTAR="**",e.GLOB_SPLIT="/";const S="[/\\\\]",h="[^/\\\\]",a=/\//g;function r(K,H){switch(K){case 0:return"";case 1:return`${h}*?`;default:return`(?:${S}|${h}+${S}${H?`|${S}${h}+`:""})*?`}}function i(K,H){if(!K)return[];const U=[];let G=!1,$=!1,ie="";for(const J of K){switch(J){case H:if(!G&&!$){U.push(ie),ie="";continue}break;case"{":G=!0;break;case"}":G=!1;break;case"[":$=!0;break;case"]":$=!1;break}ie+=J}return ie&&U.push(ie),U}e.splitGlobAware=i;function s(K){if(!K)return"";let H="";const U=i(K,e.GLOB_SPLIT);if(U.every(G=>G===e.GLOBSTAR))H=".*";else{let G=!1;U.forEach(($,ie)=>{if($===e.GLOBSTAR){if(G)return;H+=r(2,ie===U.length-1)}else{let J=!1,j="",ee=!1,X="";for(const te of $){if(te!=="}"&&J){j+=te;continue}if(ee&&(te!=="]"||!X)){let Z;te==="-"?Z=te:(te==="^"||te==="!")&&!X?Z="^":te===e.GLOB_SPLIT?Z="":Z=(0,v.escapeRegExpCharacters)(te),X+=Z;continue}switch(te){case"{":J=!0;continue;case"[":ee=!0;continue;case"}":{const se=`(?:${i(j,",").map(re=>s(re)).join("|")})`;H+=se,J=!1,j="";break}case"]":{H+="["+X+"]",ee=!1,X="";break}case"?":H+=h;continue;case"*":H+=r(1);continue;default:H+=(0,v.escapeRegExpCharacters)(te)}}ie<U.length-1&&(U[ie+1]!==e.GLOBSTAR||ie+2<U.length)&&(H+=S)}G=$===e.GLOBSTAR})}return H}const o=/^\*\*\/\*\.[\w\.-]+$/,u=/^\*\*\/([\w\.-]+)\/?$/,d=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,p=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,c=/^\*\*((\/[\w\.-]+)+)\/?$/,l=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,n=new D.LRUCache(1e4),g=function(){return!1},w=function(){return null};function E(K,H){if(!K)return w;let U;typeof K!="string"?U=K.pattern:U=K,U=U.trim();const G=`${U}_${!!H.trimForExclusions}`;let $=n.get(G);if($)return C($,K);let ie;return o.test(U)?$=_(U.substr(4),U):(ie=u.exec(I(U,H)))?$=A(ie[1],U):(H.trimForExclusions?p:d).test(U)?$=k(U,H):(ie=c.exec(I(U,H)))?$=L(ie[1].substr(1),U,!0):(ie=l.exec(I(U,H)))?$=L(ie[1],U,!1):$=R(U),n.set(G,$),C($,K)}function C(K,H){if(typeof H=="string")return K;const U=function(G,$){return(0,b.isEqualOrParent)(G,H.base,!f.isLinux)?K((0,v.ltrim)(G.substr(H.base.length),T.sep),$):null};return U.allBasenames=K.allBasenames,U.allPaths=K.allPaths,U.basenames=K.basenames,U.patterns=K.patterns,U}function I(K,H){return H.trimForExclusions&&K.endsWith("/**")?K.substr(0,K.length-2):K}function _(K,H){return function(U,G){return typeof U=="string"&&U.endsWith(K)?H:null}}function A(K,H){const U=`/${K}`,G=`\\${K}`,$=function(J,j){return typeof J!="string"?null:j?j===K?H:null:J===K||J.endsWith(U)||J.endsWith(G)?H:null},ie=[K];return $.basenames=ie,$.patterns=[H],$.allBasenames=ie,$}function k(K,H){const U=z(K.slice(1,-1).split(",").map(j=>E(j,H)).filter(j=>j!==w),K),G=U.length;if(!G)return w;if(G===1)return U[0];const $=function(j,ee){for(let X=0,te=U.length;X<te;X++)if(U[X](j,ee))return K;return null},ie=U.find(j=>!!j.allBasenames);ie&&($.allBasenames=ie.allBasenames);const J=U.reduce((j,ee)=>ee.allPaths?j.concat(ee.allPaths):j,[]);return J.length&&($.allPaths=J),$}function L(K,H,U){const G=T.sep===T.posix.sep,$=G?K:K.replace(a,T.sep),ie=T.sep+$,J=T.posix.sep+K;let j;return U?j=function(ee,X){return typeof ee=="string"&&(ee===$||ee.endsWith(ie)||!G&&(ee===K||ee.endsWith(J)))?H:null}:j=function(ee,X){return typeof ee=="string"&&(ee===$||!G&&ee===K)?H:null},j.allPaths=[(U?"*/":"./")+K],j}function R(K){try{const H=new RegExp(`^${s(K)}$`);return function(U){return H.lastIndex=0,typeof U=="string"&&H.test(U)?K:null}}catch{return w}}function M(K,H,U){return!K||typeof H!="string"?!1:N(K)(H,void 0,U)}e.match=M;function N(K,H={}){if(!K)return g;if(typeof K=="string"||P(K)){const U=E(K,H);if(U===w)return g;const G=function($,ie){return!!U($,ie)};return U.allBasenames&&(G.allBasenames=U.allBasenames),U.allPaths&&(G.allPaths=U.allPaths),G}return V(K,H)}e.parse=N;function P(K){const H=K;return H?typeof H.base=="string"&&typeof H.pattern=="string":!1}e.isRelativePattern=P;function x(K){return K.allBasenames||[]}e.getBasenameTerms=x;function F(K){return K.allPaths||[]}e.getPathTerms=F;function V(K,H){const U=z(Object.getOwnPropertyNames(K).map(j=>W(j,K[j],H)).filter(j=>j!==w)),G=U.length;if(!G)return w;if(!U.some(j=>!!j.requiresSiblings)){if(G===1)return U[0];const j=function(te,Z){let se;for(let re=0,oe=U.length;re<oe;re++){const le=U[re](te,Z);if(typeof le=="string")return le;(0,y.isThenable)(le)&&(se||(se=[]),se.push(le))}return se?(async()=>{for(const re of se){const oe=await re;if(typeof oe=="string")return oe}return null})():null},ee=U.find(te=>!!te.allBasenames);ee&&(j.allBasenames=ee.allBasenames);const X=U.reduce((te,Z)=>Z.allPaths?te.concat(Z.allPaths):te,[]);return X.length&&(j.allPaths=X),j}const $=function(j,ee,X){let te,Z;for(let se=0,re=U.length;se<re;se++){const oe=U[se];oe.requiresSiblings&&X&&(ee||(ee=(0,T.basename)(j)),te||(te=ee.substr(0,ee.length-(0,T.extname)(j).length)));const le=oe(j,ee,te,X);if(typeof le=="string")return le;(0,y.isThenable)(le)&&(Z||(Z=[]),Z.push(le))}return Z?(async()=>{for(const se of Z){const re=await se;if(typeof re=="string")return re}return null})():null},ie=U.find(j=>!!j.allBasenames);ie&&($.allBasenames=ie.allBasenames);const J=U.reduce((j,ee)=>ee.allPaths?j.concat(ee.allPaths):j,[]);return J.length&&($.allPaths=J),$}function W(K,H,U){if(H===!1)return w;const G=E(K,U);if(G===w)return w;if(typeof H=="boolean")return G;if(H){const $=H.when;if(typeof $=="string"){const ie=(J,j,ee,X)=>{if(!X||!G(J,j))return null;const te=$.replace("$(basename)",()=>ee),Z=X(te);return(0,y.isThenable)(Z)?Z.then(se=>se?K:null):Z?K:null};return ie.requiresSiblings=!0,ie}}return G}function z(K,H){const U=K.filter(j=>!!j.basenames);if(U.length<2)return K;const G=U.reduce((j,ee)=>{const X=ee.basenames;return X?j.concat(X):j},[]);let $;if(H){$=[];for(let j=0,ee=G.length;j<ee;j++)$.push(H)}else $=U.reduce((j,ee)=>{const X=ee.patterns;return X?j.concat(X):j},[]);const ie=function(j,ee){if(typeof j!="string")return null;if(!ee){let te;for(te=j.length;te>0;te--){const Z=j.charCodeAt(te-1);if(Z===47||Z===92)break}ee=j.substr(te)}const X=G.indexOf(ee);return X!==-1?$[X]:null};ie.basenames=G,ie.patterns=$,ie.allBasenames=G;const J=K.filter(j=>!j.basenames);return J.push(ie),J}function B(K,H){return(0,t.equals)(K,H,(U,G)=>typeof U=="string"&&typeof G=="string"?U===G:typeof U!="string"&&typeof G!="string"?U.base===G.base&&U.pattern===G.pattern:!1)}e.patternsEquals=B}),define(Q[110],Y([1,0,15,257,26,33,10]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseHrefAndDimensions=e.removeMarkdownEscapes=e.escapeDoubleQuotes=e.escapeMarkdownSyntaxTokens=e.markdownStringEqual=e.isMarkdownString=e.isEmptyMarkdownString=e.MarkdownString=e.MarkdownStringTextNewlineStyle=void 0;var f;(function(o){o[o.Paragraph=0]="Paragraph",o[o.Break=1]="Break"})(f||(e.MarkdownStringTextNewlineStyle=f={}));class v{constructor(u="",d=!1){if(this.value=u,typeof this.value!="string")throw(0,t.illegalArgument)("value");typeof d=="boolean"?(this.isTrusted=d,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=d.isTrusted??void 0,this.supportThemeIcons=d.supportThemeIcons??!1,this.supportHtml=d.supportHtml??!1)}appendText(u,d=0){return this.value+=a(this.supportThemeIcons?(0,y.escapeIcons)(u):u).replace(/([ \t]+)/g,(p,c)=>" ".repeat(c.length)).replace(/\>/gm,"\\>").replace(/\n/g,d===1?`\\ `:` `),this}appendMarkdown(u){return this.value+=u,this}appendCodeblock(u,d){return this.value+="\n```",this.value+=u,this.value+=` `,this.value+=d,this.value+="\n```\n",this}appendLink(u,d,p){return this.value+="[",this.value+=this._escape(d,"]"),this.value+="](",this.value+=this._escape(String(u),")"),p&&(this.value+=` "${this._escape(this._escape(p,'"'),")")}"`),this.value+=")",this}_escape(u,d){const p=new RegExp((0,D.escapeRegExpCharacters)(d),"g");return u.replace(p,(c,l)=>u.charAt(l-1)!=="\\"?`\\${c}`:c)}}e.MarkdownString=v;function m(o){return S(o)?!o.value:Array.isArray(o)?o.every(m):!0}e.isEmptyMarkdownString=m;function S(o){return o instanceof v?!0:o&&typeof o=="object"?typeof o.value=="string"&&(typeof o.isTrusted=="boolean"||typeof o.isTrusted=="object"||o.isTrusted===void 0)&&(typeof o.supportThemeIcons=="boolean"||o.supportThemeIcons===void 0):!1}e.isMarkdownString=S;function h(o,u){return o===u?!0:!o||!u?!1:o.value===u.value&&o.isTrusted===u.isTrusted&&o.supportThemeIcons===u.supportThemeIcons&&o.supportHtml===u.supportHtml&&(o.baseUri===u.baseUri||!!o.baseUri&&!!u.baseUri&&(0,b.isEqual)(T.URI.from(o.baseUri),T.URI.from(u.baseUri)))}e.markdownStringEqual=h;function a(o){return o.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}e.escapeMarkdownSyntaxTokens=a;function r(o){return o.replace(/"/g,""")}e.escapeDoubleQuotes=r;function i(o){return o&&o.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}e.removeMarkdownEscapes=i;function s(o){const u=[],d=o.split("|").map(c=>c.trim());o=d[0];const p=d[1];if(p){const c=/height=(\d+)/.exec(p),l=/width=(\d+)/.exec(p),n=c?c[1]:"",g=l?l[1]:"",w=isFinite(parseInt(g)),E=isFinite(parseInt(n));w&&u.push(`width="${g}"`),E&&u.push(`height="${n}"`)}return{href:o,dimensions:u}}e.parseHrefAndDimensions=s}),define(Q[217],Y([1,0,7,817,227,495,67,129,169,15,6,110,257,320,203,4,340,186,22,42,26,33,10]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fillInIncompleteTokens=e.renderMarkdownAsPlaintext=e.renderStringAsPlaintext=e.allowedMarkdownAttr=e.renderMarkdown=void 0;const g=Object.freeze({image:($,ie,J)=>{let j=[],ee=[];return $&&({href:$,dimensions:j}=(0,h.parseHrefAndDimensions)($),ee.push(`src="${(0,h.escapeDoubleQuotes)($)}"`)),J&&ee.push(`alt="${(0,h.escapeDoubleQuotes)(J)}"`),ie&&ee.push(`title="${(0,h.escapeDoubleQuotes)(ie)}"`),j.length&&(ee=ee.concat(j)),"<img "+ee.join(" ")+">"},paragraph:$=>`<p>${$}</p>`,link:($,ie,J)=>typeof $!="string"?"":($===J&&(J=(0,h.removeMarkdownEscapes)(J)),ie=typeof ie=="string"?(0,h.escapeDoubleQuotes)((0,h.removeMarkdownEscapes)(ie)):"",$=(0,h.removeMarkdownEscapes)($),$=$.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),`<a href="${$}" title="${ie||$}">${J}</a>`)});function w($,ie={},J={}){const j=new s.DisposableStore;let ee=!1;const X=(0,D.createElement)(ie),te=function(ue){let de;try{de=(0,u.parse)(decodeURIComponent(ue))}catch{}return de?(de=(0,p.cloneAndChange)(de,ge=>{if($.uris&&$.uris[ge])return n.URI.revive($.uris[ge])}),encodeURIComponent(JSON.stringify(de))):ue},Z=function(ue,de){const ge=$.uris&&$.uris[ue];let he=n.URI.revive(ge);return de?ue.startsWith(d.Schemas.data+":")?ue:(he||(he=n.URI.parse(ue)),d.FileAccess.uriToBrowserUri(he).toString(!0)):!he||n.URI.parse(ue).toString()===he.toString()?ue:(he.query&&(he=he.with({query:te(he.query)})),he.toString())},se=new o.marked.Renderer;se.image=g.image,se.link=g.link,se.paragraph=g.paragraph;const re=[],oe=[];if(ie.codeBlockRendererSync?se.code=(ue,de)=>{const ge=r.defaultGenerator.nextId(),he=ie.codeBlockRendererSync(E(de),ue);return oe.push([ge,he]),`<div class="code" data-code="${ge}">${(0,l.escape)(ue)}</div>`}:ie.codeBlockRenderer&&(se.code=(ue,de)=>{const ge=r.defaultGenerator.nextId(),he=ie.codeBlockRenderer(E(de),ue);return re.push(he.then(be=>[ge,be])),`<div class="code" data-code="${ge}">${(0,l.escape)(ue)}</div>`}),ie.actionHandler){const ue=function(he){let be=he.target;if(!(be.tagName!=="A"&&(be=be.parentElement,!be||be.tagName!=="A")))try{let ve=be.dataset.href;ve&&($.baseUri&&(ve=C(n.URI.from($.baseUri),ve)),ie.actionHandler.callback(ve,he))}catch(ve){(0,m.onUnexpectedError)(ve)}finally{he.preventDefault()}},de=ie.actionHandler.disposables.add(new b.DomEmitter(X,"click")),ge=ie.actionHandler.disposables.add(new b.DomEmitter(X,"auxclick"));ie.actionHandler.disposables.add(S.Event.any(de.event,ge.event)(he=>{const be=new f.StandardMouseEvent(he);!be.leftButton&&!be.middleButton||ue(be)})),ie.actionHandler.disposables.add(t.addDisposableListener(X,"keydown",he=>{const be=new T.StandardKeyboardEvent(he);!be.equals(10)&&!be.equals(3)||ue(be)}))}$.supportHtml||(J.sanitizer=ue=>($.isTrusted?ue.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?ue:"",J.sanitize=!0,J.silent=!0),J.renderer=se;let le=$.value??"";le.length>1e5&&(le=`${le.substr(0,1e5)}\u2026`),$.supportThemeIcons&&(le=(0,a.markdownEscapeEscapedIcons)(le));let ne;if(ie.fillInIncompleteTokens){const ue={...o.marked.defaults,...J},de=o.marked.lexer(le,ue),ge=P(de);ne=o.marked.parser(ge,ue)}else ne=o.marked.parse(le,J);$.supportThemeIcons&&(ne=(0,v.renderLabelWithIcons)(ne).map(de=>typeof de=="string"?de:de.outerHTML).join(""));const ae=new DOMParser().parseFromString(I($,ne),"text/html");if(ae.body.querySelectorAll("img").forEach(ue=>{const de=ue.getAttribute("src");if(de){let ge=de;try{$.baseUri&&(ge=C(n.URI.from($.baseUri),ge))}catch{}ue.src=Z(ge,!0)}}),ae.body.querySelectorAll("a").forEach(ue=>{const de=ue.getAttribute("href");if(ue.setAttribute("href",""),!de||/^data:|javascript:/i.test(de)||/^command:/i.test(de)&&!$.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(de))ue.replaceWith(...ue.childNodes);else{let ge=Z(de,!1);$.baseUri&&(ge=C(n.URI.from($.baseUri),de)),ue.dataset.href=ge}}),X.innerHTML=I($,ae.body.innerHTML),re.length>0)Promise.all(re).then(ue=>{if(ee)return;const de=new Map(ue),ge=X.querySelectorAll("div[data-code]");for(const he of ge){const be=de.get(he.dataset.code??"");be&&t.reset(he,be)}ie.asyncRenderCallback?.()});else if(oe.length>0){const ue=new Map(oe),de=X.querySelectorAll("div[data-code]");for(const ge of de){const he=ue.get(ge.dataset.code??"");he&&t.reset(ge,he)}}if(ie.asyncRenderCallback)for(const ue of X.getElementsByTagName("img")){const de=j.add(t.addDisposableListener(ue,"load",()=>{de.dispose(),ie.asyncRenderCallback()}))}return{element:X,dispose:()=>{ee=!0,j.dispose()}}}e.renderMarkdown=w;function E($){if(!$)return"";const ie=$.split(/[\s+|:|,|\{|\?]/,1);return ie.length?ie[0]:$}function C($,ie){return/^\w[\w\d+.-]*:/.test(ie)?ie:$.path.endsWith("/")?(0,c.resolvePath)($,ie).toString():(0,c.resolvePath)((0,c.dirname)($),ie).toString()}function I($,ie){const{config:J,allowedSchemes:j}=_($);y.addHook("uponSanitizeAttribute",(X,te)=>{if(te.attrName==="style"||te.attrName==="class"){if(X.tagName==="SPAN"){if(te.attrName==="style"){te.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(te.attrValue);return}else if(te.attrName==="class"){te.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(te.attrValue);return}}te.keepAttr=!1;return}});const ee=t.hookDomPurifyHrefAndSrcSanitizer(j);try{return y.sanitize(ie,{...J,RETURN_TRUSTED_TYPE:!0})}finally{y.removeHook("uponSanitizeAttribute"),ee.dispose()}}e.allowedMarkdownAttr=["align","autoplay","alt","class","controls","data-code","data-href","height","href","loop","muted","playsinline","poster","src","style","target","title","width","start"];function _($){const ie=[d.Schemas.http,d.Schemas.https,d.Schemas.mailto,d.Schemas.data,d.Schemas.file,d.Schemas.vscodeFileResource,d.Schemas.vscodeRemote,d.Schemas.vscodeRemoteResource];return $.isTrusted&&ie.push(d.Schemas.command),{config:{ALLOWED_TAGS:[...t.basicMarkupHtmlTags],ALLOWED_ATTR:e.allowedMarkdownAttr,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:ie}}function A($){return typeof $=="string"?$:k($)}e.renderStringAsPlaintext=A;function k($){let ie=$.value??"";ie.length>1e5&&(ie=`${ie.substr(0,1e5)}\u2026`);const J=o.marked.parse(ie,{renderer:R.value}).replace(/&(#\d+|[a-zA-Z]+);/g,j=>L.get(j)??j);return I({isTrusted:!1},J).toString()}e.renderMarkdownAsPlaintext=k;const L=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),R=new i.Lazy(()=>{const $=new o.marked.Renderer;return $.code=ie=>ie,$.blockquote=ie=>ie,$.html=ie=>"",$.heading=(ie,J,j)=>ie+` `,$.hr=()=>"",$.list=(ie,J)=>ie,$.listitem=ie=>ie+` `,$.paragraph=ie=>ie+` `,$.table=(ie,J)=>ie+J+` `,$.tablerow=ie=>ie,$.tablecell=(ie,J)=>ie+" ",$.strong=ie=>ie,$.em=ie=>ie,$.codespan=ie=>ie,$.br=()=>` `,$.del=ie=>ie,$.image=(ie,J,j)=>"",$.text=ie=>ie,$.link=(ie,J,j)=>j,$});function M($){let ie="";return $.forEach(J=>{ie+=J.raw}),ie}function N($){for(const ie of $.tokens)if(ie.type==="text"){const J=ie.raw.split(` `),j=J[J.length-1];if(j.includes("`"))return F($);if(j.includes("**"))return K($);if(j.match(/\*\w/))return V($);if(j.match(/(^|\s)__\w/))return H($);if(j.match(/(^|\s)_\w/))return W($);if(j.match(/(^|\s)\[.*\]\(\w*/))return z($);if(j.match(/(^|\s)\[\w/))return B($)}}function P($){let ie,J;for(ie=0;ie<$.length;ie++){const j=$[ie];if(j.type==="paragraph"&&j.raw.match(/(\n|^)```/)){J=x($.slice(ie));break}if(j.type==="paragraph"&&j.raw.match(/(\n|^)\|/)){J=G($.slice(ie));break}if(ie===$.length-1&&j.type==="paragraph"){const ee=N(j);if(ee){J=[ee];break}}}if(J){const j=[...$.slice(0,ie),...J];return j.links=$.links,j}return $}e.fillInIncompleteTokens=P;function x($){const ie=M($);return o.marked.lexer(ie+"\n```")}function F($){return U($,"`")}function V($){return U($,"*")}function W($){return U($,"_")}function z($){return U($,")")}function B($){return U($,"](about:blank)")}function K($){return U($,"**")}function H($){return U($,"__")}function U($,ie){const J=M(Array.isArray($)?$:[$]);return o.marked.lexer(J+ie)[0]}function G($){const ie=M($),J=ie.split(` `);let j,ee=!1;for(let X=0;X<J.length;X++){const te=J[X].trim();if(typeof j>"u"&&te.match(/^\s*\|/)){const Z=te.match(/(\|[^\|]+)(?=\||$)/g);Z&&(j=Z.length)}else if(typeof j=="number")if(te.match(/^\s*\|/)){if(X!==J.length-1)return;ee=!0}else return}if(typeof j=="number"&&j>0){const X=ee?J.slice(0,-1).join(` `):ie,te=!!X.match(/\|\s*$/),Z=X+(te?"":"|")+` |${" --- |".repeat(j)}`;return o.marked.lexer(Z)}}}),define(Q[207],Y([1,0,7,817,67,217,151,169,34,32,80,6,110,4,37,2256,1675]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonBar=e.ButtonWithDescription=e.ButtonWithDropdown=e.Button=e.unthemedButtonStyles=void 0,e.unthemedButtonStyles={buttonBackground:"#0E639C",buttonHoverBackground:"#006BB3",buttonSeparator:S.Color.white.toString(),buttonForeground:S.Color.white.toString(),buttonBorder:void 0,buttonSecondaryBackground:void 0,buttonSecondaryForeground:void 0,buttonSecondaryHoverBackground:void 0,buttonSecondaryBorder:void 0,buttonDisabledBackground:void 0,buttonDisabledForeground:void 0,buttonDisabledBorder:void 0};class o extends r.Disposable{get onDidClick(){return this._onDidClick.event}constructor(l,n){super(),this._label="",this.hasIcon=!1,this._onDidClick=this._register(new h.Emitter),this.options=n,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!n.secondary);const g=n.secondary?n.buttonSecondaryBackground:n.buttonBackground,w=n.secondary?n.buttonSecondaryForeground:n.buttonForeground;this._element.style.color=w||"",this._element.style.backgroundColor=g||"",n.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),l.appendChild(this._element),this._register(T.Gesture.addTarget(this._element)),[t.EventType.CLICK,T.EventType.Tap].forEach(E=>{this._register((0,t.addDisposableListener)(this._element,E,C=>{if(!this.enabled){t.EventHelper.stop(C);return}this._onDidClick.fire(C)}))}),this._register((0,t.addDisposableListener)(this._element,t.EventType.KEY_DOWN,E=>{const C=new b.StandardKeyboardEvent(E);let I=!1;this.enabled&&(C.equals(3)||C.equals(10))?(this._onDidClick.fire(E),I=!0):C.equals(9)&&(this._element.blur(),I=!0),I&&t.EventHelper.stop(C,!0)})),this._register((0,t.addDisposableListener)(this._element,t.EventType.MOUSE_OVER,E=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register((0,t.addDisposableListener)(this._element,t.EventType.MOUSE_OUT,E=>{this.updateBackground(!1)})),this.focusTracker=this._register((0,t.trackFocus)(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)})),this.updateStyles()}dispose(){super.dispose(),this._element.remove()}getContentElements(l){const n=[];for(let g of(0,f.renderLabelWithIcons)(l))if(typeof g=="string"){if(g=g.trim(),g==="")continue;const w=document.createElement("span");w.textContent=g,n.push(w)}else n.push(g);return n}updateBackground(l){if(!this.enabled||this.hasIcon)return;let n;this.options.secondary?n=l?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:n=l?this.options.buttonHoverBackground:this.options.buttonBackground,n&&(this._element.style.backgroundColor=n)}updateStyles(){let l,n,g,w,E;this.hasIcon?(l=g="transparent",n="inherit",w=E="inherit",this._element.style.backgroundRepeat="no-repeat"):(this.enabled?this.options.secondary?(n=this.options.buttonSecondaryForeground,l=this.options.buttonSecondaryBackground,g=this.options.buttonSecondaryBorder):(n=this.options.buttonForeground,l=this.options.buttonBackground,g=this.options.buttonBorder):(n=this.options.buttonDisabledForeground,l=this.options.buttonDisabledBackground,g=this.options.buttonDisabledBorder),w="600",E="12px"),this._element.style.color=n||"",this._element.style.backgroundColor=l||"",this._element.style.borderWidth=g?"1px":"",this._element.style.borderStyle=g?"solid":"",this._element.style.borderColor=g||"",this._element.style.opacity=this.hasIcon?"":"1",this._element.style.fontWeight=w,this._element.style.fontSize=E,this._element.style.borderRadius="2px"}get element(){return this._element}set label(l){if(this._label===l||(0,a.isMarkdownString)(this._label)&&(0,a.isMarkdownString)(l)&&(0,a.markdownStringEqual)(this._label,l))return;this._element.classList.add("monaco-text-button");const n=this.options.supportShortLabel?this._labelElement:this._element;if((0,a.isMarkdownString)(l)){const g=(0,D.renderMarkdown)(l,{inline:!0});g.dispose();const w=g.element.querySelector("p")?.innerHTML;if(w){const E=(0,y.sanitize)(w,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});n.innerHTML=E}else(0,t.reset)(n)}else this.options.supportIcons?(0,t.reset)(n,...this.getContentElements(l)):n.textContent=l;this._element.setAttribute("aria-label",l),typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=(0,D.renderStringAsPlaintext)(l)),this._label=l}get label(){return this._label}set labelShort(l){!this.options.supportShortLabel||!this._labelShortElement||(this.options.supportIcons?(0,t.reset)(this._labelShortElement,...this.getContentElements(l)):this._labelShortElement.textContent=l)}set icon(l){typeof l=="string"?this._element.classList.add(...l.split(" ")):this._element.classList.add(...i.ThemeIcon.asClassNameArray(l)),this.hasIcon=l!==void 0,this.updateStyles()}set enabled(l){l?(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)),(0,t.removeTabIndexAndUpdateFocus)(this._element)),this.updateStyles()}get enabled(){return!this._element.classList.contains("disabled")}focus(){this._element.focus()}hasFocus(){return this._element===document.activeElement}}e.Button=o;class u extends r.Disposable{constructor(l,n){super(),this._onDidClick=this._register(new h.Emitter),this.onDidClick=this._onDidClick.event,this.element=document.createElement("div"),this.element.classList.add("monaco-button-dropdown"),l.appendChild(this.element),this.button=this._register(new o(this.element,n)),this._register(this.button.onDidClick(E=>this._onDidClick.fire(E))),this.action=this._register(new v.Action("primaryAction",(0,D.renderStringAsPlaintext)(this.button.label),void 0,!0,async()=>this._onDidClick.fire(void 0))),this.separatorContainer=document.createElement("div"),this.separatorContainer.classList.add("monaco-button-dropdown-separator"),this.separator=document.createElement("div"),this.separatorContainer.appendChild(this.separator),this.element.appendChild(this.separatorContainer);const g=n.buttonBorder;g&&(this.separatorContainer.style.borderTop="1px solid "+g,this.separatorContainer.style.borderBottom="1px solid "+g);const w=n.secondary?n.buttonSecondaryBackground:n.buttonBackground;this.separatorContainer.style.backgroundColor=w??"",this.separator.style.backgroundColor=n.buttonSeparator??"",this.dropdownButton=this._register(new o(this.element,{...n,title:!1,supportIcons:!0})),this.dropdownButton.element.title=(0,s.localize)(0,null),this.dropdownButton.element.setAttribute("aria-haspopup","true"),this.dropdownButton.element.setAttribute("aria-expanded","false"),this.dropdownButton.element.classList.add("monaco-dropdown-button"),this.dropdownButton.icon=m.Codicon.dropDownButton,this._register(this.dropdownButton.onDidClick(E=>{n.contextMenuProvider.showContextMenu({getAnchor:()=>this.dropdownButton.element,getActions:()=>n.addPrimaryActionToDropdown===!1?[...n.actions]:[this.action,...n.actions],actionRunner:n.actionRunner,onHide:()=>this.dropdownButton.element.setAttribute("aria-expanded","false")}),this.dropdownButton.element.setAttribute("aria-expanded","true")}))}dispose(){super.dispose(),this.element.remove()}set label(l){this.button.label=l,this.action.label=l}set icon(l){this.button.icon=l}set enabled(l){this.button.enabled=l,this.dropdownButton.enabled=l,this.element.classList.toggle("disabled",!l)}get enabled(){return this.button.enabled}focus(){this.button.focus()}hasFocus(){return this.button.hasFocus()||this.dropdownButton.hasFocus()}}e.ButtonWithDropdown=u;class d{constructor(l,n){this.options=n,this._element=document.createElement("div"),this._element.classList.add("monaco-description-button"),this._button=new o(this._element,n),this._descriptionElement=document.createElement("div"),this._descriptionElement.classList.add("monaco-button-description"),this._element.appendChild(this._descriptionElement),l.appendChild(this._element)}get onDidClick(){return this._button.onDidClick}get element(){return this._element}set label(l){this._button.label=l}set icon(l){this._button.icon=l}get enabled(){return this._button.enabled}set enabled(l){this._button.enabled=l}focus(){this._button.focus()}hasFocus(){return this._button.hasFocus()}dispose(){this._button.dispose()}set description(l){this.options.supportIcons?(0,t.reset)(this._descriptionElement,...(0,f.renderLabelWithIcons)(l)):this._descriptionElement.textContent=l}}e.ButtonWithDescription=d;class p{constructor(l){this.container=l,this._buttons=[],this._buttonStore=new r.DisposableStore}dispose(){this._buttonStore.dispose()}get buttons(){return this._buttons}clear(){this._buttonStore.clear(),this._buttons.length=0}addButton(l){const n=this._buttonStore.add(new o(this.container,l));return this.pushButton(n),n}addButtonWithDescription(l){const n=this._buttonStore.add(new d(this.container,l));return this.pushButton(n),n}addButtonWithDropdown(l){const n=this._buttonStore.add(new u(this.container,l));return this.pushButton(n),n}pushButton(l){this._buttons.push(l);const n=this._buttons.length-1;this._buttonStore.add((0,t.addDisposableListener)(l.element,t.EventType.KEY_DOWN,g=>{const w=new b.StandardKeyboardEvent(g);let E=!0,C;w.equals(15)?C=n>0?n-1:this._buttons.length-1:w.equals(17)?C=n===this._buttons.length-1?0:n+1:E=!1,E&&typeof C=="number"&&(this._buttons[C].focus(),t.EventHelper.stop(g,!0))}))}}e.ButtonBar=p}),define(Q[198],Y([1,0,207]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Button=void 0;class y extends t.Button{constructor(D,T){super(D,T??{})}set title(D){this.element.title=D}set ariaLabel(D){this.element.setAttribute("aria-label",D)}setHeight(D){this.element.style.height=D}setWidth(D){this.element.style.width=D}}e.Button=y}),define(Q[2312],Y([1,0,7,151,67,198,822,1551]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownList=e.Dropdown=void 0;class f extends T.BaseDropdown{constructor(S,h){super(S,h),this.contextViewProvider=h.contextViewProvider}show(){super.show(),this.element.classList.add("active"),this.contextViewProvider.showContextView({getAnchor:()=>this.getAnchor(),render:S=>this.renderContents(S),onDOMEvent:(S,h)=>{this.onEvent(S,h)},onHide:()=>this.onHide()})}getAnchor(){return this.element}onHide(){this.element.classList.remove("active")}hide(){super.hide(),this.contextViewProvider&&this.contextViewProvider.hideContextView()}renderContents(S){return null}}e.Dropdown=f;class v extends f{constructor(S,h,a,r,i){super(S,h),this._options=h,this._contentContainer=a,this._list=r,this.borderWidth=1,i&&(this.button=new D.Button(a,this._options.buttonStyles),this.button.label=i.label,this._register(t.addDisposableListener(this.button.element,t.EventType.CLICK,()=>{i.run(),this.hide()})),this._register(t.addDisposableListener(this.button.element,t.EventType.KEY_DOWN,s=>{new b.StandardKeyboardEvent(s).equals(3)&&(s.stopPropagation(),i.run(),this.hide())}))),t.append(this.element,t.$("div.dropdown-icon")),[t.EventType.CLICK,t.EventType.MOUSE_DOWN,y.EventType.Tap].forEach(s=>{this._register(t.addDisposableListener(this.element,s,o=>t.EventHelper.stop(o,!0)))}),[t.EventType.MOUSE_DOWN,y.EventType.Tap].forEach(s=>{this._register(t.addDisposableListener(this.element,s,o=>setTimeout(()=>this.show(),100)))}),this._register(t.addStandardDisposableListener(this.element,t.EventType.KEY_DOWN,s=>{s.equals(3)&&(s.stopPropagation(),setTimeout(()=>{this.show(),this._list.getHTMLElement().focus()},100))})),this._register(this._list.onDidChangeSelection(()=>{this.element.focus(),this.hide()})),this.element.setAttribute("tabindex","0"),this.applyStylesOnElement(this._contentContainer,h.dropdownStyles.backgroundColor,h.dropdownStyles.foregroundColor,h.dropdownStyles.borderColor),this.label&&this.applyStylesOnElement(this.element,h.dropdownStyles.backgroundColor,h.dropdownStyles.foregroundColor,h.dropdownStyles.borderColor)}renderContents(S){let h=t.append(S,this._contentContainer);return h.style.width=t.getTotalWidth(this.element)-this.borderWidth*2+"px",{dispose:()=>{}}}renderLabel(){this._options.labelRenderer&&this.label&&this._options.labelRenderer(this.label)}onEvent(S,h){!t.isAncestor(S.target,this.element)&&!t.isAncestor(S.target,this._contentContainer)?(this.element.focus(),this.hide()):t.isAncestor(S.target,this._list.getHTMLElement())&&S instanceof KeyboardEvent&&new b.StandardKeyboardEvent(S).equals(9)&&(this.element.focus(),this.hide(),S.stopPropagation())}applyStylesOnElement(S,h,a,r){S&&(S.style.backgroundColor=h,S.style.color=a,this.borderWidth=r?1:0,S.style.borderWidth=r?this.borderWidth+"px":"",S.style.borderStyle=r?"solid":"",S.style.borderColor=r)}}e.DropdownList=v}),define(Q[2313],Y([1,0,198,1553]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InfoButton=void 0;class y extends t.Button{constructor(D,T){super(D,T),this._container=D,this._container.classList.add("info-button-container"),this._main=document.createElement("div"),this._main.classList.add("flexContainer"),this._main.classList.add("info-main"),this._iconContainer=document.createElement("div"),this._iconContainer.classList.add("info-icon"),this._iconContainer.style.alignItems="flex-start",this._iconElement=document.createElement("div"),this._iconElement.classList.add("icon"),this._textContainer=document.createElement("div"),this._textContainer.classList.add("info-text"),this._pTitle=document.createElement("p"),this._pTitle.classList.add("info-title"),this._pTitle.setAttribute("aria-hidden","false"),this._pDesc=document.createElement("p"),this._pDesc.classList.add("info-desc"),this._pDesc.setAttribute("aria-hidden","false"),this._textContainer.appendChild(this._pTitle),this._textContainer.appendChild(this._pDesc),this._iconContainer.appendChild(this._iconElement),this._main.appendChild(this._iconContainer),this._main.appendChild(this._textContainer),this.element.classList.add("info-button"),this.element.appendChild(this._main),this.element.style.background="none",this.infoButtonOptions=T}get title(){return this._title}set title(D){this._title=D,this._pTitle.innerText=this.title}get description(){return this._description}set description(D){this._description=D,this._pDesc.innerText=this.description}get buttonMaxHeight(){return this._buttonMaxHeight}set buttonMaxHeight(D){this._buttonMaxHeight=D,this._main.style.maxHeight=`${this._buttonMaxHeight}px`,this._iconContainer.style.height=`${this._buttonMaxHeight-20}px`,this._textContainer.style.height=`${this._buttonMaxHeight-20}px`}get buttonMaxWidth(){return this._buttonMaxWidth}set buttonMaxWidth(D){this._buttonMaxWidth=D,this._main.style.width=`${this._buttonMaxWidth}px`,this._textContainer.style.width=`${this._buttonMaxWidth-this._iconWidth}px`}get iconHeight(){return this._iconHeight}set iconHeight(D){this._iconHeight=D,this._iconElement.style.height=`${this._iconHeight}px`}get iconWidth(){return this._iconWidth}set iconWidth(D){this._iconWidth=D,this._iconContainer.style.width=`${this._iconWidth}px`,this._iconElement.style.width=`${this._iconWidth}px`}get iconClass(){return this._iconClass}set iconClass(D){this._iconClass=D,this._iconElement.classList.add(this._iconClass)}set infoButtonOptions(D){D&&(D.buttonMaxHeight!==void 0&&(this.buttonMaxHeight=D.buttonMaxHeight),D.buttonMaxWidth!==void 0&&(this.buttonMaxWidth=D.buttonMaxWidth),D.description&&(this.description=D.description),D.iconHeight!==void 0&&(this.iconHeight=D.iconHeight),D.iconWidth!==void 0&&(this.iconWidth=D.iconWidth),D.iconClass&&(this.iconClass=D.iconClass),D.title&&(this.title=D.title))}updateStyles(){this.element.style.backgroundColor=this.options.buttonBackground??"",this.element.style.color=this.options.buttonForeground??"",this.element.style.borderColor=this.options.buttonBorder??""}updateBackground(D){this.element.style.backgroundColor=(D?this.options.buttonHoverBackground:this.options.buttonBackground)??""}}e.InfoButton=y}),define(Q[446],Y([1,0,7,14,31,110,257,4,17,2263]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setupCustomHover=e.setupNativeHover=void 0;function S(r,i){(0,v.isString)(i)?r.title=(0,T.stripIcons)(i):i?.markdownNotSupportedFallback?r.title=i.markdownNotSupportedFallback:r.removeAttribute("title")}e.setupNativeHover=S;class h{constructor(i,s,o){this.hoverDelegate=i,this.target=s,this.fadeInAnimation=o}async update(i,s,o){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let u;if(i===void 0||(0,v.isString)(i)||i instanceof HTMLElement)u=i;else if(!(0,v.isFunction)(i.markdown))u=i.markdown??i.markdownNotSupportedFallback;else{this._hoverWidget||this.show((0,m.localize)(0,null),s),this._cancellationTokenSource=new b.CancellationTokenSource;const d=this._cancellationTokenSource.token;if(u=await i.markdown(d),u===void 0&&(u=i.markdownNotSupportedFallback),this.isDisposed||d.isCancellationRequested)return}this.show(u,s,o)}show(i,s,o){const u=this._hoverWidget;if(this.hasContent(i)){const d={content:i,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!u,...o};this._hoverWidget=this.hoverDelegate.showHover(d,s)}u?.dispose()}hasContent(i){return i?(0,D.isMarkdownString)(i)?!!i.value:!0:!1}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}function a(r,i,s,o){let u,d;const p=(w,E)=>{const C=d!==void 0;w&&(d?.dispose(),d=void 0),E&&(u?.dispose(),u=void 0),C&&r.onDidHideHover?.()},c=(w,E,C)=>new y.TimeoutTimer(async()=>{(!d||d.isDisposed)&&(d=new h(r,C||i,w>0),await d.update(s,E,o))},w),l=()=>{if(u)return;const w=new f.DisposableStore,E=_=>p(!1,_.fromElement===i);w.add(t.addDisposableListener(i,t.EventType.MOUSE_LEAVE,E,!0));const C=()=>p(!0,!0);w.add(t.addDisposableListener(i,t.EventType.MOUSE_DOWN,C,!0));const I={targetElements:[i],dispose:()=>{}};if(r.placement===void 0||r.placement==="mouse"){const _=A=>{I.x=A.x+10,A.target instanceof HTMLElement&&A.target.classList.contains("action-label")&&p(!0,!0)};w.add(t.addDisposableListener(i,t.EventType.MOUSE_MOVE,_,!0))}w.add(c(r.delay,!1,I)),u=w},n=t.addDisposableListener(i,t.EventType.MOUSE_OVER,l,!0);return{show:w=>{p(!1,!0),c(0,w)},hide:()=>{p(!0,!0)},update:async(w,E)=>{s=w,await d?.update(s,void 0,E)},dispose:()=>{n.dispose(),p(!0,!0)}}}e.setupCustomHover=a}),define(Q[306],Y([1,0,7,444,446,4,42,557,1682]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconLabel=void 0;class v{constructor(i){this._element=i}get element(){return this._element}set textContent(i){this.disposed||i===this._textContent||(this._textContent=i,this._element.textContent=i)}set className(i){this.disposed||i===this._className||(this._className=i,this._element.className=i)}set empty(i){this.disposed||i===this._empty||(this._empty=i,this._element.style.marginLeft=i?"0":"")}dispose(){this.disposed=!0}}class m extends D.Disposable{constructor(i,s){super(),this.customHovers=new Map,this.creationOptions=s,this.domNode=this._register(new v(t.append(i,t.$(".monaco-icon-label")))),this.labelContainer=t.append(this.domNode.element,t.$(".monaco-icon-label-container"));const o=t.append(this.labelContainer,t.$("span.monaco-icon-name-container"));s?.supportHighlights||s?.supportIcons?this.nameNode=new a(o,!!s.supportIcons):this.nameNode=new S(o),this.hoverDelegate=s?.hoverDelegate}get element(){return this.domNode.element}setLabel(i,s,o){const u=["monaco-icon-label"],d=["monaco-icon-label-container"];let p="";if(o&&(o.extraClasses&&u.push(...o.extraClasses),o.italic&&u.push("italic"),o.strikethrough&&u.push("strikethrough"),o.disabledCommand&&d.push("disabled"),o.title&&(p+=o.title)),this.domNode.className=u.join(" "),this.domNode.element.setAttribute("aria-label",p),this.labelContainer.className=d.join(" "),this.setupHover(o?.descriptionTitle?this.labelContainer:this.element,o?.title),this.nameNode.setLabel(i,o),s||this.descriptionNode){const c=this.getOrCreateDescriptionNode();c instanceof y.HighlightedLabel?(c.set(s||"",o?o.descriptionMatches:void 0,void 0,o?.labelEscapeNewLines),this.setupHover(c.element,o?.descriptionTitle)):(c.textContent=s&&o?.labelEscapeNewLines?y.HighlightedLabel.escapeNewLines(s,[]):s||"",this.setupHover(c.element,o?.descriptionTitle||""),c.empty=!s)}}setupHover(i,s){const o=this.customHovers.get(i);if(o&&(o.dispose(),this.customHovers.delete(i)),!s){i.removeAttribute("title");return}if(!this.hoverDelegate)(0,b.setupNativeHover)(i,s);else{const u=(0,b.setupCustomHover)(this.hoverDelegate,i,s);u&&this.customHovers.set(i,u)}}dispose(){super.dispose();for(const i of this.customHovers.values())i.dispose();this.customHovers.clear()}getOrCreateDescriptionNode(){if(!this.descriptionNode){const i=this._register(new v(t.append(this.labelContainer,t.$("span.monaco-icon-description-container"))));this.creationOptions?.supportDescriptionHighlights?this.descriptionNode=new y.HighlightedLabel(t.append(i.element,t.$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new v(t.append(i.element,t.$("span.label-description"))))}return this.descriptionNode}}e.IconLabel=m;class S{constructor(i){this.container=i,this.label=void 0,this.singleLabel=void 0}setLabel(i,s){if(!(this.label===i&&(0,T.equals)(this.options,s)))if(this.label=i,this.options=s,typeof i=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=t.append(this.container,t.$("a.label-name",{id:s?.domId}))),this.singleLabel.textContent=i;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let o=0;o<i.length;o++){const u=i[o],d=s?.domId&&`${s?.domId}_${o}`;t.append(this.container,t.$("a.label-name",{id:d,"data-icon-label-count":i.length,"data-icon-label-index":o,role:"treeitem"},u)),o<i.length-1&&t.append(this.container,t.$("span.label-separator",void 0,s?.separator||"/"))}}}}function h(r,i,s){if(!s)return;let o=0;return r.map(u=>{const d={start:o,end:o+u.length},p=s.map(c=>f.Range.intersect(d,c)).filter(c=>!f.Range.isEmpty(c)).map(({start:c,end:l})=>({start:c-o,end:l-o}));return o=d.end+i.length,p})}class a{constructor(i,s){this.container=i,this.supportIcons=s,this.label=void 0,this.singleLabel=void 0}setLabel(i,s){if(!(this.label===i&&(0,T.equals)(this.options,s)))if(this.label=i,this.options=s,typeof i=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new y.HighlightedLabel(t.append(this.container,t.$("a.label-name",{id:s?.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(i,s?.matches,void 0,s?.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const o=s?.separator||"/",u=h(i,o,s?.matches);for(let d=0;d<i.length;d++){const p=i[d],c=u?u[d]:void 0,l=s?.domId&&`${s?.domId}_${d}`,n=t.$("a.label-name",{id:l,"data-icon-label-count":i.length,"data-icon-label-index":d,role:"treeitem"});new y.HighlightedLabel(t.append(this.container,n),{supportIcons:this.supportIcons}).set(p,c,void 0,s?.labelEscapeNewLines),d<i.length-1&&t.append(n,t.$("span.label-separator",void 0,o))}}}}}),define(Q[1121],Y([1,0,7,227,67,217,179,20,6,105,4,18,2267,1691]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxList=void 0;const r=t.$,i="selectOption.entry.template";class s{get templateId(){return i}renderTemplate(d){const p=Object.create(null);return p.root=d,p.text=t.append(d,r(".option-text")),p.detail=t.append(d,r(".option-detail")),p.decoratorRight=t.append(d,r(".option-decorator-right")),p}renderElement(d,p,c){const l=c,n=d.text,g=d.detail,w=d.decoratorRight,E=d.isDisabled;l.text.textContent=n,l.text.setAttribute("aria-label",n),l.detail.textContent=g||"",l.decoratorRight.innerText=w||"",E?l.root.classList.add("option-disabled"):l.root.classList.remove("option-disabled")}disposeTemplate(d){}}class o extends S.Disposable{static{this.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32}static{this.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2}static{this.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3}constructor(d,p,c,l,n){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=l,this.selectBoxOptions=n||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=o.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new v.Emitter,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(c),this.selected=p||0,d&&this.setOptions(d,p),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return i}constructSelectDropDown(d){this.contextViewProvider=d,this.selectDropDownContainer=t.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=t.append(this.selectDropDownContainer,r(".select-box-details-pane"));const p=t.append(this.selectDropDownContainer,r(".select-box-dropdown-container-width-control")),c=t.append(p,r(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",t.append(c,this.widthControlElement),this._dropDownPosition=0,this.styleElement=t.createStyleSheet(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(t.addDisposableListener(this.selectDropDownContainer,t.EventType.DRAG_START,l=>{t.EventHelper.stop(l,!0)}))}registerListeners(){this._register(t.addStandardDisposableListener(this.selectElement,"change",p=>{this.selected=p.target.selectedIndex,this._onDidSelect.fire({index:p.target.selectedIndex,selected:p.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)})),this._register(t.addDisposableListener(this.selectElement,t.EventType.CLICK,p=>{t.EventHelper.stop(p),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(t.addDisposableListener(this.selectElement,t.EventType.MOUSE_DOWN,p=>{t.EventHelper.stop(p)}));let d;this._register(t.addDisposableListener(this.selectElement,"touchstart",p=>{d=this._isVisible})),this._register(t.addDisposableListener(this.selectElement,"touchend",p=>{t.EventHelper.stop(p),d?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(t.addDisposableListener(this.selectElement,t.EventType.KEY_DOWN,p=>{const c=new b.StandardKeyboardEvent(p);let l=!1;h.isMacintosh?(c.keyCode===18||c.keyCode===16||c.keyCode===10||c.keyCode===3)&&(l=!0):(c.keyCode===18&&c.altKey||c.keyCode===16&&c.altKey||c.keyCode===10||c.keyCode===3)&&(l=!0),l&&(this.showSelectDropDown(),t.EventHelper.stop(p,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(d,p){f.equals(this.options,d)||(this.options=d,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((c,l)=>{this.selectElement.add(this.createOption(c.text,l,c.isDisabled)),typeof c.description=="string"&&(this._hasDetails=!0)})),p!==void 0&&(this.select(p),this._currentSelection=this.selected)}setOptionsList(){this.selectList?.splice(0,this.selectList.length,this.options),this.selectList?.setSelection(this.selected!==-1?[this.selected]:[])}select(d){d>=0&&d<this.options.length?this.selected=d:d>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}setAriaLabel(d){this.selectBoxOptions.ariaLabel=d,this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(d){this.selectElement.tabIndex=d?0:-1}render(d){this.container=d,d.classList.add("select-container"),d.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const d=[];this.styles.listFocusBackground&&d.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&&d.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&d.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(d.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),d.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),d.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(d.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),d.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&d.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&d.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&d.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&&d.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),d.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),d.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=d.join(` `)}styleSelectElement(){const d=this.styles.selectBackground??"",p=this.styles.selectForeground??"",c=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=d,this.selectElement.style.color=p,this.selectElement.style.borderColor=c}styleList(){const d=this.styles.selectBackground??"",p=t.asCssValueWithDefault(this.styles.selectListBackground,d);this.selectDropDownListContainer.style.backgroundColor=p,this.selectionDetailsPane.style.backgroundColor=p;const c=this.styles.focusBorder??"";this.selectDropDownContainer.style.outlineColor=c,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(d,p,c){const l=document.createElement("option");return l.value=d,l.text=d,l.disabled=!!c,l}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:d=>this.renderSelectDropDown(d,!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:d=>this.renderSelectDropDown(d),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(d){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),d&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(d,p){return d.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(p),{dispose:()=>{try{d.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let d=0;return this.options.forEach((p,c)=>{this.updateDetail(c),this.selectionDetailsPane.offsetHeight>d&&(d=this.selectionDetailsPane.offsetHeight)}),d}layoutSelectDropDown(d){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const p=t.getDomNodePagePosition(this.selectElement),c=getComputedStyle(this.selectElement),l=parseFloat(c.getPropertyValue("--dropdown-padding-top"))+parseFloat(c.getPropertyValue("--dropdown-padding-bottom")),n=window.innerHeight-p.top-p.height-(this.selectBoxOptions.minBottomMargin||0),g=p.top-o.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,w=this.selectElement.offsetWidth,E=this.setWidthControlElement(this.widthControlElement),C=Math.max(E,Math.round(w)).toString()+"px";this.selectDropDownContainer.style.width=C,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let I=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const _=this._hasDetails?this._cachedMaxDetailsHeight:0,A=I+l+_,k=Math.floor((n-l-_)/this.getHeight()),L=Math.floor((g-l-_)/this.getHeight());if(d)return p.top+p.height>window.innerHeight-22||p.top<o.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||k<1&&L<1?!1:(k<o.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&L>k&&this.options.length>k?(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(p.top+p.height>window.innerHeight-22||p.top<o.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||this._dropDownPosition===0&&k<1||this._dropDownPosition===1&&L<1)return this.hideSelectDropDown(!0),!1;if(this._dropDownPosition===0){if(this._isVisible&&k+L<1)return this.hideSelectDropDown(!0),!1;A>n&&(I=k*this.getHeight())}else A>g&&(I=L*this.getHeight());return this.selectList.layout(I),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=I+l+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=I+l+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=C,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(d){let p=0;if(d){let c=0,l=0;this.options.forEach((n,g)=>{const w=n.detail?n.detail.length:0,E=n.decoratorRight?n.decoratorRight.length:0,C=n.text.length+w+E;C>l&&(c=g,l=C)}),d.textContent=this.options[c]?.text+(this.options[c]?.decoratorRight?this.options[c].decoratorRight+" ":""),p=t.getTotalWidth(d)}return p}createSelectList(d){if(this.selectList)return;this.selectDropDownListContainer=t.append(d,r(".select-box-dropdown-list-container")),this.listRenderer=new s,this.selectList=new T.List("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:l=>{let n=l.text;return l.detail&&(n+=`. ${l.detail}`),l.decoratorRight&&(n+=`. ${l.decoratorRight}`),l.description&&(n+=`. ${l.description}`),n},getWidgetAriaLabel:()=>(0,a.localize)(0,null),getRole:()=>h.isMacintosh?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const p=this._register(new y.DomEmitter(this.selectDropDownListContainer,"keydown")),c=v.Event.chain(p.event).filter(()=>this.selectList.length>0).map(l=>new b.StandardKeyboardEvent(l));this._register(c.filter(l=>l.keyCode===3).on(l=>this.onEnter(l),this)),this._register(c.filter(l=>l.keyCode===2).on(l=>this.onEnter(l),this)),this._register(c.filter(l=>l.keyCode===9).on(l=>this.onEscape(l),this)),this._register(c.filter(l=>l.keyCode===16).on(l=>this.onUpArrow(l),this)),this._register(c.filter(l=>l.keyCode===18).on(l=>this.onDownArrow(l),this)),this._register(c.filter(l=>l.keyCode===12).on(this.onPageDown,this)),this._register(c.filter(l=>l.keyCode===11).on(this.onPageUp,this)),this._register(c.filter(l=>l.keyCode===14).on(this.onHome,this)),this._register(c.filter(l=>l.keyCode===13).on(this.onEnd,this)),this._register(c.filter(l=>l.keyCode>=21&&l.keyCode<=56||l.keyCode>=85&&l.keyCode<=113).on(this.onCharacter,this)),this._register(t.addDisposableListener(this.selectList.getHTMLElement(),t.EventType.POINTER_UP,l=>this.onPointerUp(l))),this._register(this.selectList.onMouseOver(l=>typeof l.index<"u"&&this.selectList.setFocus([l.index]))),this._register(this.selectList.onDidChangeFocus(l=>this.onListFocus(l))),this._register(t.addDisposableListener(this.selectDropDownContainer,t.EventType.FOCUS_OUT,l=>{!this._isVisible||t.isAncestor(l.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(d){if(!this.selectList.length)return;t.EventHelper.stop(d);const p=d.target;if(!p||p.classList.contains("slider"))return;const c=p.closest(".monaco-list-row");if(!c)return;const l=Number(c.getAttribute("data-index")),n=c.classList.contains("option-disabled");l>=0&&l<this.options.length&&!n&&(this.selected=l,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this.hideSelectDropDown(!0),this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)))}onListBlur(){this._sticky||(this.selected!==this._currentSelection&&this.select(this._currentSelection),this.hideSelectDropDown(!1))}renderDescriptionMarkdown(d,p){const c=n=>{for(let g=0;g<n.childNodes.length;g++){const w=n.childNodes.item(g);(w.tagName&&w.tagName.toLowerCase())==="img"?n.removeChild(w):c(w)}},l=(0,D.renderMarkdown)({value:d,supportThemeIcons:!0},{actionHandler:p});return l.element.classList.add("select-box-description-markdown"),c(l.element),l.element}onListFocus(d){!this._isVisible||!this._hasDetails||this.updateDetail(d.indexes[0])}updateDetail(d){this.selectionDetailsPane.innerText="";const p=this.options[d],c=p?.description??"",l=p?.descriptionIsMarkdown??!1;if(c){if(l){const n=p.descriptionMarkdownActionHandler;this.selectionDetailsPane.appendChild(this.renderDescriptionMarkdown(c,n))}else this.selectionDetailsPane.innerText=c;this.selectionDetailsPane.style.display="block"}else this.selectionDetailsPane.style.display="none";this._skipLayout=!0,this.contextViewProvider.layout(),this._skipLayout=!1}onEscape(d){t.EventHelper.stop(d),this.select(this._currentSelection),this.hideSelectDropDown(!0)}onEnter(d){t.EventHelper.stop(d),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)),this.hideSelectDropDown(!0)}onDownArrow(d){if(this.selected<this.options.length-1){t.EventHelper.stop(d,!0);const p=this.options[this.selected+1].isDisabled;if(p&&this.options.length>this.selected+2)this.selected+=2;else{if(p)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(d){this.selected>0&&(t.EventHelper.stop(d,!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(d){t.EventHelper.stop(d),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected<this.options.length-1&&(this.selected++,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onPageDown(d){t.EventHelper.stop(d),this.selectList.focusNextPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(d){t.EventHelper.stop(d),!(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(d){t.EventHelper.stop(d),!(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(d){const p=m.KeyCodeUtils.toString(d.keyCode);let c=-1;for(let l=0;l<this.options.length-1;l++)if(c=(l+this.selected+1)%this.options.length,this.options[c].text.charAt(0).toUpperCase()===p&&!this.options[c].isDisabled){this.select(c),this.selectList.setFocus([c]),this.selectList.reveal(this.selectList.getFocus()[0]),t.EventHelper.stop(d);break}}dispose(){this.hideSelectDropDown(!1),super.dispose()}}e.SelectBoxList=o}),define(Q[447],Y([1,0,179,1121,2301,142,18,1690]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBox=e.unthemedSelectBoxStyles=void 0,e.unthemedSelectBoxStyles={...t.unthemedListStyles,selectBackground:"#3C3C3C",selectForeground:"#F0F0F0",selectBorder:"#3C3C3C",decoratorRightForeground:void 0,selectListBackground:void 0,selectListBorder:void 0,focusBorder:void 0};class f extends D.Widget{constructor(m,S,h,a,r){super(),T.isMacintosh&&!r?.useCustomDrawn?this.selectBoxDelegate=new b.SelectBoxNative(m,S,a,r):this.selectBoxDelegate=new y.SelectBoxList(m,S,h,a,r),this.selectElement=this.selectBoxDelegate.selectElement,this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(m,S){this.selectBoxDelegate.setOptions(m,S)}select(m){this.selectBoxDelegate.select(m)}setAriaLabel(m){this.selectBoxDelegate.setAriaLabel(m)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(m){this.selectBoxDelegate.setFocusable(m)}render(m){this.selectBoxDelegate.render(m)}createOption(m,S){let h=document.createElement("option");return h.value=m,h.text=m,h.disabled=S||!1,h}}e.SelectBox=f}),define(Q[1122],Y([1,0,447,17,7,6,495]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListBox=void 0;const f=b.$;class v extends t.SelectBox{constructor(S,h){super(S.items,0,h,S),this.options=S,this._onKeyDown=this._register(new D.Emitter),this.onKeyDown=this._onKeyDown.event,this.contextViewProvider=h,this.isValid=!0,this.selectElement.multiple=!0,this.selectElement.style.height="80px",this.selectElement.style.width="inherit",this.selectElement.style.minWidth="100%",this._register(b.addStandardDisposableListener(this.selectElement,b.EventType.KEY_DOWN,a=>this._onKeyDown.fire(a))),this._register(b.addDisposableListener(this.selectElement,b.EventType.CLICK,a=>{this.contextViewProvider.hideContextView();let r=a.target.index;(0,y.isUndefinedOrNull)(r)||this.select(r),this.selectElement.focus()})),this.onblur(this.selectElement,()=>this.onBlur()),this.onfocus(this.selectElement,()=>this.onFocus())}setValidation(S,h){if(this.isValid=S,this.message=h,this.isValid)this.selectElement.style.border=`1px solid ${this.options.selectBorder}`;else if(this.message){const a=this.stylesForType(this.message.type);this.selectElement.style.border=a.border?`1px solid ${a.border}`:""}}get isContentValid(){return this.isValid}get selectedOptions(){let S=[];for(let h=0;h<this.selectElement.selectedOptions.length;h++)S.push(this.selectElement.selectedOptions[h].innerHTML);return S}get count(){return this.selectElement.options.length}remove(){let S=[];for(let h=0;h<this.selectElement.selectedOptions.length;h++)S.push(this.selectElement.selectedOptions[h].index);S.sort((h,a)=>a-h);for(let h=0;h<S.length;h++)this.selectElement.remove(S[h]),this.options.items.splice(S[h],1);super.setOptions(this.options.items)}add(S){let h=this.createOption(S);this.selectElement.add(h),this.options.items.push(h),super.setOptions(this.options.items)}setOptions(S,h){this.options.items=S,super.setOptions(S,h)}enable(){this.selectElement.disabled=!1}disable(){this.selectElement.disabled=!0}onBlur(){this.isValid||this.contextViewProvider.hideContextView()}onFocus(){this.isValid||this.showMessage()}focus(){this.selectElement.focus()}showMessage(){let S,h=()=>S.style.width=b.getTotalWidth(this.selectElement)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,anchorAlignment:1,render:a=>{S=b.append(a,f(".monaco-inputbox-container")),h();const r={inline:!0,className:"monaco-inputbox-message"};if(this.message){let i=this.message.formatContent?(0,T.renderFormattedText)(this.message.content,r):(0,T.renderText)(this.message.content,r);i.classList.add(this.classForType(this.message.type));const s=this.stylesForType(this.message.type);i.style.backgroundColor=s.background?s.background:"",i.style.border=s.border?`1px solid ${s.border}`:"",b.append(S,i)}return{dispose:()=>{}}},layout:h})}classForType(S){switch(S){case 1:return"info";case 2:return"warning";default:return"error"}}stylesForType(S){switch(S){case 1:return{border:this.options.inputValidationInfoBorder,background:this.options.inputValidationInfoBackground};case 2:return{border:this.options.inputValidationWarningBorder,background:this.options.inputValidationWarningBackground};default:return{border:this.options.inputValidationErrorBorder,background:this.options.inputValidationErrorBackground}}}}e.ListBox=v}),define(Q[199],Y([1,0,447,7,87,1926,495,1121,6,1561]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBox=void 0;const m=y.$;class S extends t.SelectBox{constructor(a,r,i,s,o,u,d){let p=S.createOptions(a);super(p,0,s,i,u),this._styles=i,this._onDidSelect=this._register(new v.Emitter),this._onDidFocus=this._register(new v.Emitter),this._optionsDictionary=new Map,this.populateOptionsDictionary(p),this._dialogOptions=p;const c=this._optionsDictionary.get(r);c!==void 0&&super.select(c),this._selectedOption=r,this._register(super.onDidSelect(n=>{this.onSelect(n),this._onDidSelect.fire(n)})),this.contextViewProvider=s,o&&(this.element=y.append(o,m(".monaco-selectbox.idle"))),d!==void 0&&(this.selectElement.id=d),this._selectBoxOptions=u;let l=y.trackFocus(this.selectElement);this._register(l),this._register(l.onDidBlur(()=>this._hideMessage())),this._register(l.onDidFocus(()=>{this._showMessage(),this._onDidFocus.fire()})),this.onkeydown(this.selectElement,n=>{n.keyCode===3&&y.EventHelper.stop(n,!0)}),this.selectBoxDelegate instanceof f.SelectBoxList&&this.onkeydown(this.selectBoxDelegate.selectDropDownContainer,n=>{(n.keyCode===3||n.keyCode===9)&&y.EventHelper.stop(n,!0),n.keyCode===2&&this.focus()})}get onDidSelect(){return this._onDidSelect.event}get onDidFocus(){return this._onDidFocus.event}onSelect(a){const r=this._dialogOptions[a.index];this._selectedOption=r.value}static createOptions(a){let r;return Array.isArray(a)&&typeof a[0]=="string"?r=a.map(i=>({text:i,value:i})):r=a.map(s=>(s.value===void 0&&(s.value=s.text),s)),r}populateOptionsDictionary(a){this._optionsDictionary.clear();for(let r=0;r<a.length;r++)this._optionsDictionary.set(a[r].value,r);this._dialogOptions=a}selectWithOptionName(a,r=!0,i=!1){let s;a!==void 0&&(s=this._optionsDictionary.get(a)),s!==void 0?this.select(s,i):r&&this.select(0,i)}select(a,r=!1){super.select(a);let i=this._optionsDictionary.get(this._selectedOption);!r&&i===a||(this._dialogOptions!==void 0&&(this._selectedOption=this._dialogOptions[a]?.value),this._onDidSelect.fire({selected:this._selectedOption,index:a}))}setOptions(a,r){let i=S.createOptions(a);this.populateOptionsDictionary(i),super.setOptions(i,r)}get value(){return this._selectedOption}get label(){return this._dialogOptions?.find(a=>a.value===this._selectedOption)?.text}get values(){return this._dialogOptions.map(a=>a.value)}enable(){this.selectElement.disabled=!1}disable(){this.selectElement.disabled=!0}getAriaLabel(){return this.selectElem.ariaLabel}get id(){return this.selectElem.id}hasFocus(){return document.activeElement===this.selectElement}showMessage(a){this.message=a,this.element&&(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(a.type)));let r;a.type===3?r=D.localize(0,null,a.content):a.type===2?r=D.localize(1,null,a.content):r=D.localize(2,null,a.content),b.alert(r),this.hasFocus()&&this._showMessage()}_showMessage(){if(this.message&&this.contextViewProvider&&this.element){const a=this.message;let r,i=()=>r.style.width=y.getTotalWidth(this.selectElement)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,anchorAlignment:1,render:s=>{r=y.append(s,m(".monaco-inputbox-container")),i();const o={inline:!0,className:"monaco-inputbox-message"};let u=a.formatContent?(0,T.renderFormattedText)(a.content,o):(0,T.renderText)(a.content,o);u.classList.add(this.classForType(a.type));const d=this.stylesForType(a.type);return u.style.backgroundColor=d.background?d.background:"",u.style.border=d.border?`1px solid ${d.border}`:"",y.append(r,u),null},layout:i})}}hideMessage(){this.element&&(this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle")),this._hideMessage(),this.message=void 0}_hideMessage(){this.message&&this.contextViewProvider&&this.contextViewProvider.hideContextView()}classForType(a){switch(a){case 1:return"info";case 2:return"warning";default:return"error"}}stylesForType(a){switch(a){case 1:return{border:this._styles.inputValidationInfoBorder,background:this._styles.inputValidationInfoBackground};case 2:return{border:this._styles.inputValidationWarningBorder,background:this._styles.inputValidationWarningBackground};default:return{border:this._styles.inputValidationErrorBorder,background:this._styles.inputValidationErrorBackground}}}render(a){let r=this._selectBoxOptions;if(r&&r.labelText&&r.labelText!==void 0){let i=document.createElement("div"),s=document.createElement("div");s.setAttribute("role","presentation"),i.className=r.labelOnTop?"labelOnTopContainer":"labelOnLeftContainer";let o=document.createElement("div");o.className="action-item-label",o.innerHTML=r.labelText,a.appendChild(i),i.appendChild(o),i.appendChild(s),super.render(s),this.selectElement.classList.add("action-item-label"),this.selectElement.id=r.id}else super.render(a)}get selectElem(){return this.selectElement}}e.SelectBox=S}),define(Q[157],Y([1,0,97,240,7,151,446,447,34,4,18,17,2255,1053]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectActionViewItem=e.ActionViewItem=e.BaseActionViewItem=void 0;class r extends m.Disposable{get action(){return this._action}constructor(u,d,p={}){super(),this.options=p,this._context=u||this,this._action=d,d instanceof v.Action&&this._register(d.onDidChange(c=>{this.element&&this.handleActionChangeEvent(c)}))}handleActionChangeEvent(u){u.enabled!==void 0&&this.updateEnabled(),u.checked!==void 0&&this.updateChecked(),u.class!==void 0&&this.updateClass(),u.label!==void 0&&(this.updateLabel(),this.updateTooltip()),u.tooltip!==void 0&&this.updateTooltip(),u.expanded!==void 0&&this.updateExpanded()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new v.ActionRunner)),this._actionRunner}set actionRunner(u){this._actionRunner=u}isEnabled(){return this._action.enabled}setActionContext(u){this._context=u}render(u){const d=this.element=u;this._register(D.Gesture.addTarget(u));const p=this.options&&this.options.draggable;p&&(u.draggable=!0,t.isFirefox&&this._register((0,b.addDisposableListener)(u,b.EventType.DRAG_START,c=>c.dataTransfer?.setData(y.DataTransfers.TEXT,this._action.label)))),this._register((0,b.addDisposableListener)(d,D.EventType.Tap,c=>this.onClick(c,!0))),this._register((0,b.addDisposableListener)(d,b.EventType.MOUSE_DOWN,c=>{p||b.EventHelper.stop(c,!0),this._action.enabled&&c.button===0&&d.classList.add("active")})),S.isMacintosh&&this._register((0,b.addDisposableListener)(d,b.EventType.CONTEXT_MENU,c=>{c.button===0&&c.ctrlKey===!0&&this.onClick(c)})),this._register((0,b.addDisposableListener)(d,b.EventType.CLICK,c=>{b.EventHelper.stop(c,!0),this.options&&this.options.isMenu||this.onClick(c)})),this._register((0,b.addDisposableListener)(d,b.EventType.DBLCLICK,c=>{b.EventHelper.stop(c,!0)})),[b.EventType.MOUSE_UP,b.EventType.MOUSE_OUT].forEach(c=>{this._register((0,b.addDisposableListener)(d,c,l=>{b.EventHelper.stop(l),d.classList.remove("active")}))})}onClick(u,d=!1){b.EventHelper.stop(u,!0);const p=h.isUndefinedOrNull(this._context)?this.options?.useEventAsContext?u:{preserveFocus:d}:this._context;this.actionRunner.run(this._action,p)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}isFocused(){return!!this.element?.classList.contains("focused")}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(u){this.element&&(this.element.tabIndex=u?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getTooltip(){return this.action.tooltip}updateTooltip(){if(!this.element)return;const u=this.getTooltip()??"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(u):(this.customHover=(0,T.setupCustomHover)(this.options.hoverDelegate,this.element,u),this._store.add(this.customHover))):this.element.title=u}updateAriaLabel(){if(this.element){const u=this.getTooltip()??"";this.element.setAttribute("aria-label",u)}}updateClass(){}updateChecked(){}updateExpanded(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}e.BaseActionViewItem=r;class i extends r{constructor(u,d,p){super(u,d,p),this.options=p,this.options.icon=p.icon!==void 0?p.icon:!1,this.options.label=p.label!==void 0?p.label:!0,this.cssClass=""}render(u){super.render(u),this.element&&(this.label=(0,b.append)(this.element,(0,b.$)("a.action-label"))),this.label&&this.label.setAttribute("role",this.getDefaultAriaRole()),this.options.label&&this.options.keybinding&&this.element&&((0,b.append)(this.element,(0,b.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===v.Separator.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}isFocused(){return!!this.label&&this.label?.tabIndex===0}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(u){this.label&&(this.label.tabIndex=u?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let u=null;return this.action.tooltip?u=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(u=this.action.label,this.options.keybinding&&(u=a.localize(0,null,u,this.options.keybinding))),u??void 0}updateClass(){if(this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon){if(this.cssClass=this.action.class,this.label&&(this.label.classList.add("codicon"),this.cssClass)){let u=this.cssClass.split(" "),d=!1;if(u&&u.length>0){for(let p=0;p<u.length;++p)(u[p]===void 0||u[p]==="")&&(d=!0);d||this.label.classList.add(...this.cssClass.split(" "))}}this.updateEnabled()}else this.label?.classList.remove("codicon")}updateEnabled(){this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element?.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element?.classList.add("disabled"))}updateAriaLabel(){if(this.label){const u=this.getTooltip()??"";this.label.setAttribute("aria-label",u)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.setAttribute("aria-checked",""),this.label.setAttribute("role",this.getDefaultAriaRole())))}updateExpanded(){this.label&&(this.action.expanded!==void 0?this.label.setAttribute("aria-expanded",`${this.action.expanded}`):this.label.removeAttribute("aria-expanded"))}updateTooltip(){super.updateTooltip();const u=this.getTooltip();u&&this.label?.setAttribute("aria-label",u)}}e.ActionViewItem=i;class s extends r{constructor(u,d,p,c,l,n,g){super(u,d),this.selectBox=new f.SelectBox(p,c,l,n,g),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}setOptions(u,d){this.selectBox.setOptions(u,d)}select(u){this.selectBox.select(u)}registerListeners(){this._register(this.selectBox.onDidSelect(u=>this.runAction(u.selected,u.index)))}runAction(u,d){this.actionRunner.run(this._action,this.getActionContext(u,d))}getActionContext(u,d){return u}setFocusable(u){this.selectBox.setFocusable(u)}focus(){this.selectBox?.focus()}blur(){this.selectBox?.blur()}render(u){this.selectBox.render(u)}}e.SelectActionViewItem=s}),define(Q[829],Y([1,0,7,822,157,1548]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenuActionViewItem=void 0;class D extends b.BaseActionViewItem{constructor(f,v,m,S,h,a,r,i,s){super(null,f),this.menuActionsOrProvider=v,this.contextMenuProvider=m,this.actionViewItemProvider=S,this.actionRunner=h,this.keybindings=a,this.cssClass=r,this.menuLabel=i,this.anchorAlignmentProvider=s}render(f){const v=h=>(this.element=(0,t.append)(h,(0,t.$)("a.action-label.button-menu")),this.cssClass&&this.element.classList.add(...this.cssClass.split(" ")),this.menuLabel&&(this.element.innerText=this.menuLabel),this.element.tabIndex=0,this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.title=this._action.label||"",null),m=Array.isArray(this.menuActionsOrProvider),S={contextMenuProvider:this.contextMenuProvider,labelRenderer:v,actions:m?this.menuActionsOrProvider:void 0,actionProvider:m?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new y.DropdownMenu(f,S)),this.dropdownMenu.menuOptions={actionViewItemProvider:this.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.keybindings,context:this._context},this.anchorAlignmentProvider){const h=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return h.anchorAlignmentProvider()}}}}setActionContext(f){super.setActionContext(f),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=f:this.dropdownMenu.menuOptions={context:f})}show(){this.dropdownMenu?.show()}}e.DropdownMenuActionViewItem=D}),define(Q[402],Y([1,0,34,67,4,7,17,15,157,1569]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionBar=void 0;const m={orientation:0,context:null};class S extends t.ActionRunner{constructor(a,r=m){super(),this._triggerKeyDown=!1,this._options=r,this._context=r.context,this._options.actionRunner?this._actionRunner=this._options.actionRunner:(this._actionRunner=new t.ActionRunner,this._register(this._actionRunner)),this._items=[],this._focusedItem=void 0,this._domNode=document.createElement("div"),this._domNode.className="monaco-action-bar",r.animated!==!1&&this._domNode.classList.add("animated");let i=this._options.orientation===1;i&&(this._domNode.className+=" vertical"),this._register(D.addDisposableListener(this._domNode,D.EventType.KEY_DOWN,s=>{let o=new y.StandardKeyboardEvent(s),u=!0;o.equals(i?16:15)?this.focusPrevious():o.equals(i?18:17)?this.focusNext():o.equals(9)?this.cancel():o.equals(3)||o.equals(10)?this._triggerKeyDown=!0:u=!1,u&&(o.preventDefault(),o.stopPropagation())})),this._register(D.addDisposableListener(this._domNode,D.EventType.CONTEXT_MENU,s=>{s.preventDefault(),s.stopPropagation()})),this._register(D.addDisposableListener(this._domNode,D.EventType.KEY_UP,s=>{let o=new y.StandardKeyboardEvent(s);o.equals(3)||o.equals(10)?(this._triggerKeyDown&&(this.doTrigger(o),this._triggerKeyDown=!1),o.preventDefault(),o.stopPropagation()):(o.equals(2)||o.equals(1026))&&this.updateFocusedItem()})),this._focusTracker=this._register(D.trackFocus(this._domNode)),this._focusTracker.onDidBlur(()=>{(document.activeElement===this._domNode||!D.isAncestor(document.activeElement,this._domNode))&&(this._focusedItem=void 0)}),this._focusTracker.onDidFocus(()=>this.updateFocusedItem()),this._actionsList=document.createElement("ul"),this._actionsList.className="actions-container",this._actionsList.setAttribute("role","toolbar"),this._actionsList.id="actions-container",this._options.ariaLabel&&this._actionsList.setAttribute("aria-label",this._options.ariaLabel),this._domNode.appendChild(this._actionsList),a.appendChild(this._domNode)}setAriaLabel(a){a?this._actionsList.setAttribute("aria-label",a):this._actionsList.removeAttribute("aria-label")}updateFocusedItem(){let a=0;for(let r=0;r<this._actionsList.children.length;r++){let i=this._actionsList.children[r];if(D.isAncestor(document.activeElement,i)){this._focusedItem=a;break}i.classList.contains("action-item")&&r!==this._actionsList.children.length-1&&a++}}get context(){return this._context}set context(a){this._context=a,this._items.forEach(r=>r.setActionContext(a))}get actionRunner(){return this._actionRunner}set actionRunner(a){a&&(this._actionRunner=a,this._items.forEach(r=>r.actionRunner=a))}getContainer(){return this._domNode}pushElement(a,r={}){let i=T.isNumber(r.index)?r.index:null;i===null||i<0||i>=this._actionsList.children.length?this._actionsList.appendChild(a):this._actionsList.insertBefore(a,this._actionsList.children[i++])}pushAction(a,r={}){const i=Array.isArray(a)?a:[a];let s=T.isNumber(r.index)?r.index:null;i.forEach(o=>{const u=document.createElement("li");u.className="action-item",u.setAttribute("role","presentation");let d;this._options.actionViewItemProvider&&(d=this._options.actionViewItemProvider(o,{})),d||(d=new v.ActionViewItem(this.context,o,r)),d.actionRunner=this._actionRunner,d.setActionContext(this.context),d.render(u),d instanceof v.BaseActionViewItem&&d.setFocusable(!0),s===null||s<0||s>=this._actionsList.children.length?this._actionsList.appendChild(u):this._actionsList.insertBefore(u,this._actionsList.children[s++]),this._items.push(d)})}pull(a){a>=0&&a<this._items.length&&(this._items.splice(a,1),this._actionsList.removeChild(this._actionsList.childNodes[a]))}clear(){this._items=this._options.actionViewItemProvider?[]:b.dispose(this._items),D.clearNode(this._actionsList)}length(){return this._items.length}isEmpty(){return this._items.length===0}focus(a){a&&typeof this._focusedItem>"u"&&(this._focusedItem=0),this.updateFocus()}focusNext(){typeof this._focusedItem>"u"&&(this._focusedItem=this._items.length-1);let a=this._focusedItem,r;do this._focusedItem=(this._focusedItem+1)%this._items.length,r=this._items[this._focusedItem];while(this._focusedItem!==a&&!r.isEnabled());this._focusedItem===a&&!r.isEnabled()&&(this._focusedItem=void 0),this.updateFocus()}focusPrevious(){typeof this._focusedItem>"u"&&(this._focusedItem=0);let a=this._focusedItem,r;do this._focusedItem=this._focusedItem-1,this._focusedItem<0&&(this._focusedItem=this._items.length-1),r=this._items[this._focusedItem];while(this._focusedItem!==a&&!r.isEnabled());this._focusedItem===a&&!r.isEnabled()&&(this._focusedItem=void 0),this.updateFocus()}updateFocus(){if(typeof this._focusedItem>"u"){this._domNode.focus();return}for(let a=0;a<this._items.length;a++){let i=this._items[a];a===this._focusedItem?T.isFunction(i.focus)&&i.focus():i&&T.isFunction(i.blur)&&i.blur()}}doTrigger(a){if(typeof this._focusedItem>"u")return;let r=this._items[this._focusedItem];if(r instanceof v.BaseActionViewItem){const i=r._context===null||r._context===void 0?a:r._context;this.run(r._action,i).catch(s=>(0,f.onUnexpectedError)(s))}}cancel(){document.activeElement instanceof HTMLElement&&document.activeElement.blur()}async run(a,r){this._actionRunner.run(a,r)}dispose(){b.dispose(this._items),this._items=[],this._domNode.remove(),super.dispose()}}e.ActionBar=S}),define(Q[2314],Y([1,0,67,7,17,1935,102,402]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverflowActionBar=void 0;const v={orientation:0,context:null};class m extends f.ActionBar{constructor(h,a=v){super(h,a),this._previousWidth=0,this._register(y.addDisposableListener(window,y.EventType.RESIZE,r=>{this._actionsList&&this.resizeToolbar()})),this._register(y.addDisposableListener(window,y.EventType.MOUSE_MOVE,r=>{this._actionsList&&this.resizeToolbar()})),this._overflow=document.createElement("ul"),this._overflow.id="overflow",this._overflow.className="overflow",this._overflow.setAttribute("role","menu"),this._domNode.appendChild(this._overflow),this._register(y.addDisposableListener(this._overflow,y.EventType.FOCUS_OUT,r=>{this._overflow&&!y.isAncestor(r.relatedTarget,this._overflow)&&r.relatedTarget!==this._moreActionsElement&&this.hideOverflowDisplay()})),this._actionsList.style.flexWrap="nowrap",h.appendChild(this._domNode)}resizeToolbar(){let h=this._actionsList.offsetWidth,a=this._actionsList.scrollWidth;if(h<a)for(this._moreItemElement||this.createMoreItemElement(),this._moreItemElement.style.display="block";h<a&&this._actionsList.childNodes.length-2>-1;)this.collapseItem(),a=this._actionsList.scrollWidth;else if(this._overflow?.hasChildNodes()&&h>this._previousWidth)for(;h===a&&this._overflow.hasChildNodes();)if(this.restoreItem(),this._actionsList.scrollWidth>this._actionsList.offsetWidth){this.collapseItem();break}else this._overflow.hasChildNodes()||(this._moreItemElement.style.display="none");this._previousWidth=h}collapseItem(){let h=this._actionsList.childNodes.length-2,a=this._actionsList.removeChild(this._actionsList.childNodes[h]);if(this._overflow.insertBefore(a,this._overflow.firstChild),this._register(y.addDisposableListener(a,y.EventType.CLICK,r=>{this.hideOverflowDisplay()})),!a.classList.contains("taskbarSeparator")){let r=this._items.findIndex(s=>s===void 0),i=this._items.splice(r,1);this._items.splice(r-1,0,i[0])}this._overflow.firstChild.className!=="taskbarSeparator"&&this._overflow.firstChild.firstChild.setAttribute("role","menuItem")}restoreItem(){let h=this._overflow.firstChild;if(h){let a=this._overflow.removeChild(h);if(a.className!=="taskbarSeparator"&&a.firstChild.setAttribute("role","button"),this._actionsList.insertBefore(a,this._actionsList.lastChild),!a.classList.contains("taskbarSeparator")){let r=this._items.findIndex(s=>s===void 0),i=this._items.splice(r,1);this._items.splice(r+1,0,i[0])}}}createMoreItemElement(){this._moreItemElement=document.createElement("li"),this._moreItemElement.className="action-item more",this._moreItemElement.setAttribute("role","presentation"),this._moreActionsElement=document.createElement("a"),this._moreActionsElement.className="moreActionsElement action-label codicon toggle-more",this._moreActionsElement.setAttribute("role","button"),this._moreActionsElement.title=D.localize(0,null),this._moreActionsElement.tabIndex=0,this._moreActionsElement.setAttribute("aria-haspopup","true"),this._register(y.addDisposableListener(this._moreActionsElement,y.EventType.CLICK,h=>{this.moreElementOnClick(h)})),this._register(y.addDisposableListener(this._moreActionsElement,y.EventType.KEY_UP,h=>{let a=new t.StandardKeyboardEvent(h);(a.keyCode===3||a.keyCode===10)&&this.moreElementOnClick(a)})),this._register(y.addDisposableListener(this._overflow,y.EventType.KEY_DOWN,h=>{let a=new t.StandardKeyboardEvent(h);a.equals(9)?(this.hideOverflowDisplay(),this._moreActionsElement.focus()):a.equals(16)?this._focusedItem===this._actionsList.childElementCount?(this._focusedItem=this._actionsList.childElementCount+this._overflow.childElementCount-2,this.updateFocus()):this.focusPrevious():a.equals(18)?this._focusedItem===this._actionsList.childNodes.length+this._overflow.childNodes.length-2?(this._focusedItem=this._actionsList.childElementCount,this.updateFocus()):this.focusNext():a.equals(1026)?(this.hideOverflowDisplay(),this._focusedItem=this._actionsList.childElementCount-1,this.updateFocus()):a.equals(2)&&this.hideOverflowDisplay(),y.EventHelper.stop(a,!0)})),this._moreItemElement.appendChild(this._moreActionsElement),this._actionsList.appendChild(this._moreItemElement),this._items.push(void 0)}moreElementOnClick(h){this._overflow.style.display=this._overflow.style.display==="block"?"none":"block",this._overflow.style.display==="block"&&(this._focusedItem=this._actionsList.childElementCount-this.getActionListSeparatorCount(),this.updateFocus()),y.EventHelper.stop(h,!0)}getActionListSeparatorCount(){return Array.from(this._actionsList.children).filter(h=>h.className.includes("taskbarSeparator")).length}hideOverflowDisplay(){this._overflow.style.display="none",this._focusedItem=this._actionsList.childElementCount-1}updateFocusedItem(){let h=0;for(let a=0;a<this._actionsList.children.length;a++){let r=this._actionsList.children[a];if(y.isAncestor(document.activeElement,r)){this._focusedItem=h;break}r.classList.contains("action-item")&&a!==this._actionsList.children.length-1&&h++}if(this._overflow)for(let a=0;a<this._overflow.children.length;a++){let r=this._overflow.children[a];if(y.isAncestor(document.activeElement,r)){this._focusedItem=h;break}r.classList.contains("action-item")&&h++}}pushElement(h,a={}){super.pushElement(h,a),this.resizeToolbar()}pushAction(h,a={}){super.pushAction(h,a),this.resizeToolbar()}focusNext(){typeof this._focusedItem>"u"&&(this._focusedItem=this._items.length-1);let h=this._focusedItem,a;do this._focusedItem=(this._focusedItem+1)%this._items.length,a=this._items[this._focusedItem];while(this._focusedItem!==h&&a&&!a.isEnabled());this._focusedItem===h&&a&&!a.isEnabled()&&(this._focusedItem=void 0),this.updateFocus()}focusPrevious(){typeof this._focusedItem>"u"&&(this._focusedItem=0);let h=this._focusedItem,a;do this._focusedItem=this._focusedItem-1,this._focusedItem<0&&(this._focusedItem=this._items.length-1),a=this._items[this._focusedItem];while(this._focusedItem!==h&&a&&!a.isEnabled());this._focusedItem===h&&a&&!a.isEnabled()&&(this._focusedItem=void 0),this.updateFocus()}updateFocus(){if(typeof this._focusedItem>"u"){this._domNode.focus();return}for(let h=0;h<this._items.length;h++){let r=this._items[h];h===this._focusedItem?r?b.isFunction(r.focus)&&r.focus():this._moreActionsElement.focus():r&&b.isFunction(r.blur)&&r.blur()}}cancel(){super.cancel(),this._overflow&&this.hideOverflowDisplay()}async run(h,a){this.hideOverflowDisplay(),this._actionRunner.run(h,a)}get actionsList(){return this._actionsList}get items(){return this._items}get overflow(){return this._overflow}get focusedItem(){return this._focusedItem}}e.OverflowActionBar=m,fe([(0,T.debounce)(300)],m.prototype,"resizeToolbar",null)}),define(Q[218],Y([1,0,402,2314,1571,1570]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Taskbar=void 0;class b{constructor(T,f={orientation:0}){this.options=f;let v=document.createElement("div");v.className="monaco-toolbar carbon-taskbar",T.appendChild(v),f.collapseOverflow?this.actionBar=new y.OverflowActionBar(v,{orientation:f.orientation,ariaLabel:f.ariaLabel,actionViewItemProvider:m=>f.actionViewItemProvider?f.actionViewItemProvider(m,{}):void 0}):this.actionBar=new t.ActionBar(v,{orientation:f.orientation,ariaLabel:f.ariaLabel,actionViewItemProvider:m=>f.actionViewItemProvider?f.actionViewItemProvider(m,{}):void 0})}static createTaskbarSeparator(){let T=document.createElement("div");return T.className="taskbarSeparator",T.innerHTML=" ",T}static createTaskbarSpinner(){let T=document.createElement("div");return T.className="taskbar-progress codicon in-progress ",T.style.visibility="hidden",T}static createTaskbarText(T){let f=document.createElement("div");return f.className="taskbarTextSeparator",f.textContent=T,f}set actionRunner(T){this.actionBar.actionRunner=T}get actionRunner(){return this.actionBar.actionRunner}set context(T){this.actionBar.context=T}getContainer(){return this.actionBar.getContainer()}setAriaLabel(T){this.actionBar.setAriaLabel(T)}length(){return this.actionBar.length()}pull(T){this.actionBar.pull(T)}setContent(T){let f=T?T.slice(0):[];this.actionBar.clear();for(let v of f)v.action?this.actionBar.pushAction(v.action,{icon:!0,label:!0,keybinding:this.getKeybindingLabel(v.action)}):v.element&&this.actionBar.pushElement(v.element)}getKeybindingLabel(T){const f=this.options.getKeyBinding?this.options.getKeyBinding(T):void 0;return(f?f.getLabel():void 0)||""}addAction(T){this.actionBar.pushAction(T,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(T)})}addElement(T){this.actionBar.pushElement(T)}dispose(){this.actionBar.dispose()}clear(){this.actionBar.clear()}}e.Taskbar=b}),define(Q[85],Y([1,0,7,67,157,34,6,4,17,1053]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prepareActions=e.ActionBar=e.ActionsOrientation=void 0;var m;(function(a){a[a.HORIZONTAL=0]="HORIZONTAL",a[a.VERTICAL=1]="VERTICAL"})(m||(e.ActionsOrientation=m={}));class S extends f.Disposable{constructor(r,i={}){super(),this._actionRunnerDisposables=this._register(new f.DisposableStore),this.viewItemDisposables=this._register(new f.DisposableMap),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new T.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new T.Emitter({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new T.Emitter),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new T.Emitter),this.onWillRun=this._onWillRun.event,this.options=i,this._context=i.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:this.options.triggerKeys?.keyDown??!1,keys:this.options.triggerKeys?.keys??[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new D.ActionRunner,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(u=>this._onDidRun.fire(u))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(u=>this._onWillRun.fire(u))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",i.animated!==!1&&this.domNode.classList.add("animated");let s,o;switch(this._orientation){case 0:s=[15],o=[17];break;case 1:s=[16],o=[18],this.domNode.className+=" vertical";break}this._register(t.addDisposableListener(this.domNode,t.EventType.KEY_DOWN,u=>{const d=new y.StandardKeyboardEvent(u);let p=!0;const c=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;s&&(d.equals(s[0])||d.equals(s[1]))?p=this.focusPrevious():o&&(d.equals(o[0])||d.equals(o[1]))?p=this.focusNext():d.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():d.equals(14)?p=this.focusFirst():d.equals(13)?p=this.focusLast():d.equals(2)&&c instanceof b.BaseActionViewItem&&c.trapsArrowNavigation?p=this.focusNext():this.isTriggerKeyEvent(d)?this._triggerKeys.keyDown?this.doTrigger(d):this.triggerKeyDown=!0:p=!1,p&&(d.preventDefault(),d.stopPropagation())})),this._register(t.addDisposableListener(this.domNode,t.EventType.KEY_UP,u=>{const d=new y.StandardKeyboardEvent(u);this.isTriggerKeyEvent(d)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(d)),d.preventDefault(),d.stopPropagation()):(d.equals(2)||d.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(t.trackFocus(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(t.getActiveElement()===this.domNode||!t.isAncestor(t.getActiveElement(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),r.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setAriaLabel(r){r?this.actionsList.setAttribute("aria-label",r):this.actionsList.removeAttribute("aria-label")}setFocusable(r){if(this.focusable=r,this.focusable){const i=this.viewItems.find(s=>s instanceof b.BaseActionViewItem&&s.isEnabled());i instanceof b.BaseActionViewItem&&i.setFocusable(!0)}else this.viewItems.forEach(i=>{i instanceof b.BaseActionViewItem&&i.setFocusable(!1)})}isTriggerKeyEvent(r){let i=!1;return this._triggerKeys.keys.forEach(s=>{i=i||r.equals(s)}),i}updateFocusedItem(){for(let r=0;r<this.actionsList.children.length;r++){const i=this.actionsList.children[r];if(t.isAncestor(t.getActiveElement(),i)){this.focusedItem=r;break}}}get context(){return this._context}set context(r){this._context=r,this.viewItems.forEach(i=>i.setActionContext(r))}get actionRunner(){return this._actionRunner}set actionRunner(r){this._actionRunner=r,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(i=>this._onDidRun.fire(i))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(i=>this._onWillRun.fire(i))),this.viewItems.forEach(i=>i.actionRunner=r)}getContainer(){return this.domNode}hasAction(r){return this.viewItems.findIndex(i=>i.action.id===r.id)!==-1}getAction(r){if(typeof r=="number")return this.viewItems[r]?.action;if(r instanceof HTMLElement){for(;r.parentElement!==this.actionsList;){if(!r.parentElement)return;r=r.parentElement}for(let i=0;i<this.actionsList.childNodes.length;i++)if(this.actionsList.childNodes[i]===r)return this.viewItems[i].action}}push(r,i={}){const s=Array.isArray(r)?r:[r];let o=v.isNumber(i.index)?i.index:null;s.forEach(u=>{const d=document.createElement("li");d.className="action-item",d.setAttribute("role","presentation");let p;const c={hoverDelegate:this.options.hoverDelegate,...i};this.options.actionViewItemProvider&&(p=this.options.actionViewItemProvider(u,c)),p||(p=new b.ActionViewItem(this.context,u,c)),this.options.allowContextMenu||this.viewItemDisposables.set(p,t.addDisposableListener(d,t.EventType.CONTEXT_MENU,l=>{t.EventHelper.stop(l,!0)})),p.actionRunner=this._actionRunner,p.setActionContext(this.context),p.render(d),this.focusable&&p instanceof b.BaseActionViewItem&&this.viewItems.length===0&&p.setFocusable(!0),o===null||o<0||o>=this.actionsList.children.length?(this.actionsList.appendChild(d),this.viewItems.push(p)):(this.actionsList.insertBefore(d,this.actionsList.children[o]),this.viewItems.splice(o,0,p),o++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}getWidth(r){if(r>=0&&r<this.actionsList.children.length){const i=this.actionsList.children.item(r);if(i)return i.clientWidth}return 0}getHeight(r){if(r>=0&&r<this.actionsList.children.length){const i=this.actionsList.children.item(r);if(i)return i.clientHeight}return 0}pull(r){r>=0&&r<this.viewItems.length&&(this.actionsList.removeChild(this.actionsList.childNodes[r]),this.viewItemDisposables.deleteAndDispose(this.viewItems[r]),(0,f.dispose)(this.viewItems.splice(r,1)),this.refreshRole())}clear(){this.isEmpty()||(this.viewItems=(0,f.dispose)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),t.clearNode(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(r){let i=!1,s;if(r===void 0?i=!0:typeof r=="number"?s=r:typeof r=="boolean"&&(i=r),i&&typeof this.focusedItem>"u"){const o=this.viewItems.findIndex(u=>u.isEnabled());this.focusedItem=o===-1?void 0:o,this.updateFocus(void 0,void 0,!0)}else s!==void 0&&(this.focusedItem=s),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(r){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let s;do{if(!r&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=i,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,s=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!s.isEnabled()||s.action.id===D.Separator.ID));return this.updateFocus(),!0}focusPrevious(r){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let s;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!r&&this.options.preventLoopNavigation)return this.focusedItem=i,!1;this.focusedItem=this.viewItems.length-1}s=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!s.isEnabled()||s.action.id===D.Separator.ID));return this.updateFocus(!0),!0}updateFocus(r,i,s=!1){typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&this.viewItems[this.previouslyFocusedItem]?.blur();const o=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(o){let u=!0;v.isFunction(o.focus)||(u=!1),this.options.focusOnlyEnabledItems&&v.isFunction(o.isEnabled)&&!o.isEnabled()&&(u=!1),o.action.id===D.Separator.ID&&(u=!1),u?(s||this.previouslyFocusedItem!==this.focusedItem)&&(o.focus(r),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem=void 0)}}doTrigger(r){if(typeof this.focusedItem>"u")return;const i=this.viewItems[this.focusedItem];if(i instanceof b.BaseActionViewItem){const s=i._context===null||i._context===void 0?r:i._context;this.run(i._action,s)}}async run(r,i){await this._actionRunner.run(r,i)}dispose(){this._context=void 0,this.viewItems=(0,f.dispose)(this.viewItems),this.getContainer().remove(),super.dispose()}}e.ActionBar=S;function h(a){if(!a.length)return a;let r=-1;for(let s=0;s<a.length;s++)if(a[s].id!==D.Separator.ID){r=s;break}if(r===-1)return[];a=a.slice(r);for(let s=a.length-1;s>=0&&a[s].id===D.Separator.ID;s--)a.splice(s,1);let i=!1;for(let s=a.length-1;s>=0;s--){const o=a[s].id===D.Separator.ID;o&&!i?a.splice(s,1):o?o&&(i=!1):i=!0}return a}e.prepareActions=h}),define(Q[496],Y([1,0,6,7,85,67,4,17,1557]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabbedPanel=void 0;const v={showHeaderWhenSingleView:!0};class m extends T.Disposable{constructor(h,a=v){super(),this.options=a,this._tabMap=new Map,this.headersize=35,this._collapsed=!1,this._onTabChange=this._register(new t.Emitter),this.onTabChange=this._onTabChange.event,this.tabHistory=[],this._tabOrder=[],this.parent=y.$(".tabbedPanel"),this._styleElement=y.createStyleSheet(this.parent),h.appendChild(this.parent),this.header=y.$(".composite.title"),this.tabList=y.$(".tabList"),this.tabList.setAttribute("role","tablist"),this.tabList.style.height=this.headersize+"px",this.header.appendChild(this.tabList);let r=y.$(".title-actions");this._actionbar=new b.ActionBar(r),this.header.appendChild(r),a.showHeaderWhenSingleView?(this._headerVisible=!0,this.parent.appendChild(this.header)):this._headerVisible=!1,this.body=y.$(".tabBody"),this.body.setAttribute("role","tabpanel"),this.parent.appendChild(this.body)}get element(){return this.parent}get selectedTabId(){return this._shownTabId}dispose(){this.header.remove(),this.tabList.remove(),this.body.remove(),this.parent.remove(),this._styleElement.remove()}contains(h){return this._tabMap.has(h)}pushTab(h,a,r){let i={tab:h};return i.disposables=new T.DisposableStore,i.destroyTabBody=r,this._tabMap.set(h.identifier,i),this._createTab(i,a),this._shownTabId||this.showTab(h.identifier),this._tabMap.size>1&&!this._headerVisible&&(this.parent.insertBefore(this.header,this.parent.firstChild),this._headerVisible=!0,this._currentDimensions&&this.layout(this._currentDimensions)),h.identifier}pushAction(h,a={}){this._actionbar.push(h,a)}set actionBarContext(h){this._actionbar.context=h}_createTab(h,a){let r=y.$(".tab-header");r.setAttribute("tabindex","-1"),r.setAttribute("role","tab"),r.setAttribute("aria-selected","false"),r.setAttribute("aria-controls",h.tab.identifier);let i=y.$(".tab");r.appendChild(i);let s=y.$("a.tabLabel");s.innerText=h.tab.title,i.appendChild(s);const o=()=>{h.tab.tabSelectedHandler&&h.tab.tabSelectedHandler()};h.disposables.add(y.addDisposableListener(r,y.EventType.CLICK,d=>{this.showTab(h.tab.identifier),o()})),h.disposables.add(y.addDisposableListener(r,y.EventType.KEY_DOWN,d=>{let p=new D.StandardKeyboardEvent(d);if((p.equals(3)||p.equals(10))&&(this.showTab(h.tab.identifier),o(),d.stopImmediatePropagation()),p.equals(17)){let c=this._tabOrder.findIndex(l=>l===h.tab.identifier);this.focusNextTab(c+1)}if(p.equals(15)){let c=this._tabOrder.findIndex(l=>l===h.tab.identifier);this.focusNextTab(c-1)}}));const u=(0,f.isUndefinedOrNull)(a)?void 0:this.tabList.children.item(a);u?(this._tabOrder.splice(a,0,h.tab.identifier),this.tabList.insertBefore(r,u)):(this.tabList.append(r),this._tabOrder.push(h.tab.identifier)),h.header=r,h.label=s}showTab(h){if(this._shownTabId===h||!this._tabMap.has(h))return;if(this._shownTabId){const r=this._tabMap.get(this._shownTabId);r&&(r.label.classList.remove("selected"),r.header.classList.remove("selected"),r.header.setAttribute("aria-selected","false"),r.header.tabIndex=-1,r.body&&(r.body.remove(),r.tab.view.onHide&&r.tab.view.onHide()))}this._shownTabId=h,this.tabHistory.push(h);const a=this._tabMap.get(this._shownTabId);if(a.header.tabIndex=0,a.destroyTabBody&&a.body&&(a.body.remove(),a.body=void 0),a.body||(a.body=y.$(".tab-container"),a.body.style.width="100%",a.body.style.height="100%",a.tab.view.render(a.body)),this.body.appendChild(a.body),this.body.setAttribute("aria-labelledby",a.tab.identifier),a.label.classList.add("selected"),a.header.classList.add("selected"),a.header.setAttribute("aria-selected","true"),this._onTabChange.fire(h),a.tab.view.onShow&&a.tab.view.onShow(),this._currentDimensions){const r=this._currentDimensions.height-(this._headerVisible?this.headersize:0);this._layoutCurrentTab(new y.Dimension(this._currentDimensions.width,r))}}clearTabs(){this._tabMap.forEach((h,a,r)=>{this.removeTab(a)})}removeTab(h){const a=this._tabMap.get(h);if(!a)return;a.tab.view&&a.tab.view.remove&&a.tab.view.remove(),a.header&&a.header.remove&&a.header.remove(),a.body&&a.body.remove&&a.body.remove(),a.disposables.dispose(),this._tabMap.delete(h);let r=this._tabOrder.findIndex(i=>i===h);if(this._tabOrder.splice(r,1),this._shownTabId===h){for(this._shownTabId=void 0;this._shownTabId===void 0&&this.tabHistory.length>0;){let i=this.tabHistory.shift();i&&this._tabMap.get(i)&&this.showTab(i)}!this._shownTabId&&this._tabMap.size>0&&this.showTab(this._tabMap.values().next().value.tab.identifier)}!this.options.showHeaderWhenSingleView&&this._tabMap.size===1&&this._headerVisible&&(this.header.remove(),this._headerVisible=!1,this._currentDimensions&&this.layout(this._currentDimensions))}focusNextTab(h){if(h<0||h>this.tabList.children.length)return;let a=this.tabList.children[h];a&&a.focus()}focusCurrentTab(){if(this._shownTabId){const h=this._tabMap.get(this._shownTabId);h&&h.header.focus()}}style(h){const a=[];h.border&&a.push(` .tabbedPanel { border-color: ${h.border}; }`),h.titleSelectedForeground&&h.titleSelectedBorder&&a.push(` .tabbedPanel > .title .tabList .tab:hover .tabLabel, .tabbedPanel > .title .tabList .tab .tabLabel.selected { color: ${h.titleSelectedForeground}; border-bottom-color: ${h.titleSelectedBorder}; border-bottom-width: 2px; }`),h.titleUnSelectedForeground&&a.push(` .tabbedPanel > .title .tabList .tab .tabLabel { color: ${h.titleUnSelectedForeground}; }`),h.focusBorder&&h.titleSelectedForeground&&a.push(` .tabbedPanel > .title .tabList .tab .tabLabel:focus { color: ${h.titleSelectedForeground}; border-bottom-color: ${h.focusBorder} !important; border-bottom: 1px solid; outline: none; }`),h.outline&&a.push(` .tabbedPanel > .title .tabList .tab-header.selected, .tabbedPanel > .title .tabList .tab-header:hover { outline-color: ${h.outline}; outline-width: 1px; outline-style: solid; padding-bottom: 0; outline-offset: -5px; } .tabbedPanel > .title .tabList .tab-header:hover:not(.selected) { outline-style: dashed; }`);const r=a.join(` `);r!==this._styleElement.innerHTML&&(this._styleElement.innerHTML=r)}layout(h){if(h){this._currentDimensions=h,this.parent.style.height=h.height+"px",this.header.style.width=h.width+"px",this.body.style.width=h.width+"px";const a=h.height-(this._headerVisible?this.headersize:0);this.body.style.height=a+"px",this._layoutCurrentTab(new y.Dimension(h.width,a))}}_layoutCurrentTab(h){if(this._shownTabId){const a=this._tabMap.get(this._shownTabId);a&&a.body&&(a.body.style.width=h.width+"px",a.body.style.height=h.height+"px",a.tab.view.layout(h))}}set collapsed(h){h!==this._collapsed&&(this._collapsed=h!==!1,this.collapsed?this.body.remove():this.parent.appendChild(this.body))}get collapsed(){return this._collapsed}}e.TabbedPanel=m}),define(Q[830],Y([1,0,40,85,67,7,4,2273,1558]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabHeaderComponent=void 0;let v=class extends T.Disposable{constructor(S){super(),this._cd=S,this.onSelectTab=new t.EventEmitter,this.onCloseTab=new t.EventEmitter,this.onFocusTab=new t.EventEmitter,this._tabIndex=-1}get tabIndex(){return this._tabIndex}set tabIndex(S){this._tabIndex=S,this.refresh()}get nativeElement(){return this._actionHeaderRef.nativeElement}refresh(){this._cd.detectChanges()}ngAfterContentInit(){if((this.tab.canClose||this.tab.actions)&&(this._actionbar=new y.ActionBar(this._actionbarRef.nativeElement),this.tab.actions&&this._actionbar.push(this.tab.actions,{icon:!0,label:!1}),this.tab.canClose)){let S=this._register(new f.CloseTabAction(this.closeTab,this));this._actionbar.push(S,{icon:!0,label:!1})}this.tab.selected&&(this.tabIndex=0)}ngOnDestroy(){this._actionbar&&this._actionbar.dispose(),this.dispose()}selectTab(S){this.onSelectTab.emit(S)}closeTab(){this.onCloseTab.emit(this.tab)}focusOnTabHeader(){this._actionHeaderRef.nativeElement.focus()}onKey(S){if(D.isAncestor(S.target,this._actionHeaderRef.nativeElement)&&S instanceof KeyboardEvent){let h=new b.StandardKeyboardEvent(S);(h.equals(3)||h.equals(10))&&(this.onSelectTab.emit(this.tab),S.stopPropagation())}}};e.TabHeaderComponent=v,fe([(0,t.Input)()],v.prototype,"tab",void 0),fe([(0,t.Input)()],v.prototype,"showIcon",void 0),fe([(0,t.Input)()],v.prototype,"selected",void 0),fe([(0,t.Input)()],v.prototype,"loading",void 0),fe([(0,t.Output)()],v.prototype,"onSelectTab",void 0),fe([(0,t.Output)()],v.prototype,"onCloseTab",void 0),fe([(0,t.Output)()],v.prototype,"onFocusTab",void 0),fe([(0,t.ViewChild)("actionHeader",{read:t.ElementRef})],v.prototype,"_actionHeaderRef",void 0),fe([(0,t.ViewChild)("actionbar",{read:t.ElementRef})],v.prototype,"_actionbarRef",void 0),e.TabHeaderComponent=v=fe([(0,t.Component)({selector:"tab-header",template:` <div #actionHeader role="tab" [attr.aria-selected]="tab.selected" [class.selected]="tab.selected" [class.loading]="tab.loading" [attr.aria-busy]="tab.loading" [attr.aria-label]="tab.title" class="tab-header" style="flex: 0 0; flex-direction: row;" [class.selected]="tab.selected" [attr.tabindex] = "_tabIndex" (click)="selectTab(tab)" (keyup)="onKey($event)"> <div class="tab" role="presentation"> <a #tabIcon *ngIf="showIcon && tab.iconClass" class="tabIcon codicon icon {{tab.iconClass}}"></a> <a class="tabLabel" [class.selected]="tab.selected" [title]="tab.title" #tabLabel>{{tab.title}}</a> </div> <div #actionbar style="flex: 0 0 auto; align-self: end; margin-top: auto; margin-bottom: auto;" ></div> </div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef)))],v)}),define(Q[497],Y([1,0,40,185,826,136,85,17,42,4,1923,830,67,7]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PanelComponent=e.NavigationBarLayout=void 0;var i;(function(d){d[d.horizontal=0]="horizontal",d[d.vertical=1]="vertical"})(i||(e.NavigationBarLayout=i={}));const s={alwaysShowTabs:!0,layout:i.horizontal,showIcon:!1};let o=0,u=class extends m.Disposable{set options(p){this._options=p,this._cd.detectChanges()}constructor(p,c){super(),this._zone=p,this._cd=c,this._options=s,this.onTabChange=new t.EventEmitter,this.onTabClose=new t.EventEmitter,this._mru=[],this._tabExpanded=!0,this.AutoScrollbarVisibility=1,this.HiddenScrollbarVisibility=2,this.NavigationBarLayout=i}get toggleTabPanelButtonCssClass(){return this._tabExpanded?"tab-action collapse":"tab-action expand"}get toggleTabPanelButtonAriaLabel(){return this._tabExpanded?S.localize(0,null):S.localize(1,null)}toggleTabPanel(){this._tabExpanded=!this._tabExpanded,this._cd.detectChanges()}ngOnInit(){this._options=(0,v.mixin)(this._options||{},s,!1);const p=this._rootContainer.nativeElement;this._styleElement=(0,r.createStyleSheet)(p)}ngAfterContentInit(){this._tabs&&this._tabs.length>0&&this.selectTab(this._tabs.first),this._register((0,D.subscriptionToDisposable)(this._tabs.changes.subscribe(()=>{this._tabs&&this._tabs.length>0&&this.selectTab(this._tabs.first)})))}ngOnChanges(){this._actionbarRef&&!this._actionbar&&(this._actionbar=new T.ActionBar(this._actionbarRef.nativeElement)),this.actions&&this._actionbar&&(this._actionbar.clear(),this._actionbar.push(this.actions,{icon:!0,label:!1}))}ngAfterViewInit(){this._tabs.changes.subscribe(()=>{this.scrollable&&this.scrollable.layout()}),this.scrollable&&this.scrollable.layout()}ngOnDestroy(){this._actionbar&&this._actionbar.dispose(),this.actions&&this.actions.length>0&&this.actions.forEach(p=>p.dispose()),this.dispose()}selectTab(p){if(this._tabs&&this._tabs.length>0){let c;if(p instanceof y.TabComponent?c=p:f.isNumber(p)?c=this._tabs.toArray()[p]:f.isString(p)&&(c=this._tabs.find(l=>l.identifier===p)),c){if(c.loading)return;const l=c;if(this._tabs.forEach(n=>{n.identifier||(n.identifier="tabIndex_"+o++)}),this._selectedTab&&l===this._selectedTab){this.onTabChange.emit(l);return}this._zone.run(()=>{this._selectedTab&&(this._selectedTab.selected=!1),this._selectedTab=l,this.setMostRecentlyUsed(l),this._selectedTab.selected=!0,this.onTabChange.emit(l)}),this._tabHeaders?.forEach(n=>{n.tabIndex=n.tab.identifier===c.identifier?0:-1})}}}get getSelectedTab(){return this._selectedTab?.identifier}selectOnNextTab(){let c=this._tabs.toArray().findIndex(l=>l===this._selectedTab)+1;c===this._tabs.length&&(c=0),this.selectTab(c)}updateTab(p,c){let l;const n=this._tabHeaders.toArray(),g=this._tabs.find((w,E)=>w.identifier===p?(l=n?.length>E?n[E]:void 0,!0):!1);g&&(g.title=c.title,g.iconClass=c.iconClass,l?.refresh())}findAndRemoveTabFromMRU(p){let c=this._mru.findIndex(l=>l===p);c!==-1&&this._mru.splice(c,1)}setMostRecentlyUsed(p){this.findAndRemoveTabFromMRU(p),this._mru.unshift(p)}closeTab(p){this.onTabClose.emit(p),this.findAndRemoveTabFromMRU(p),this._mru.length>0&&this.selectTab(this._mru[0])}layout(){this._selectedTab?.layout()}onKey(p){const c=new a.StandardKeyboardEvent(p);let l=!1;c.equals(18)||c.equals(17)?(this.focusNextTab(),l=!0):(c.equals(16)||c.equals(15))&&(this.focusPreviousTab(),l=!0),l&&(c.preventDefault(),c.stopPropagation())}onTabHeaderFocusOut(p){p.currentTarget.contains(p.relatedTarget)||this._tabHeaders.forEach(c=>{c.tab===this._selectedTab&&(c.tabIndex=0)})}focusPreviousTab(){const p=this.focusedTabHeaderIndex;this._tabHeaders.toArray()[p].tabIndex=-1,p!==-1&&this.focusOnTabHeader(p===0?this._tabHeaders.length-1:p-1)}focusNextTab(){const p=this.focusedTabHeaderIndex;this._tabHeaders.toArray()[p].tabIndex=-1,p!==-1&&this.focusOnTabHeader(p===this._tabHeaders.length-1?0:p+1)}focusOnTabHeader(p){p>=0&&p<=this._tabHeaders.length-1&&this._tabHeaders.toArray()[p].focusOnTabHeader()}get focusedTabHeaderIndex(){return this._tabHeaders.toArray().findIndex(p=>p.nativeElement===document.activeElement)}style(p){if(this._styleElement){const c=[];p.titleUnSelectedForeground&&c.push(`.tabbedPanel.horizontal > .title .tabList .tab-header { color: ${p.titleUnSelectedForeground} }`),p.titleSelectedBorder&&p.titleSelectedForeground&&(c.push(`.tabbedPanel.horizontal > .title .tabList .tab-header.selected { border-color: ${p.titleSelectedBorder}; border-style: solid; color: ${p.titleSelectedForeground} }`),c.push(`.tabbedPanel.horizontal > .title .tabList .tab-header.selected {; border-width: 0 0 ${p.selectedTabContrastBorder?"0":"2"}px 0; }`),c.push(`.tabbedPanel.horizontal > .title .tabList .tab-header:hover { color: ${p.titleSelectedForeground} }`),c.push(`.tabbedPanel.horizontal > .title .tabList .tab-header:focus { outline: 1px solid; outline-offset: 2px; outline-color: ${p.titleSelectedBorder}; }`)),p.selectedBackgroundForVerticalLayout&&c.push(`.tabbedPanel.vertical > .title .tabList .tab-header.selected { background-color:${p.selectedBackgroundForVerticalLayout} }`),p.border&&c.push(`.tabbedPanel.vertical > .title > .tabContainer { border-right-width: 1px; border-right-style: solid; border-right-color: ${p.border}; } .tabbedPanel .tab-group-header { border-color: ${p.border}; }`),p.selectedTabContrastBorder&&c.push(` .tabbedPanel > .title .tabList .tab-header:focus, .tabbedPanel > .title .tabList .tab-header.selected { outline-width: 1px; outline-offset: -3px; outline-color: ${p.selectedTabContrastBorder}; } .tabbedPanel > .title .tabList .tab-header.selected { outline-style: dashed; } .tabbedPanel > .title .tabList .tab-header:focus, .tabbedPanel > .title .tabList .tab-header.selected:focus { outline-style: solid; } `);const l=c.join(` `);l!==this._styleElement.innerHTML&&(this._styleElement.innerHTML=l)}}};e.PanelComponent=u,fe([(0,t.Input)()],u.prototype,"options",null),fe([(0,t.Input)()],u.prototype,"actions",void 0),fe([(0,t.ContentChildren)(y.TabComponent)],u.prototype,"_tabs",void 0),fe([(0,t.ViewChildren)(h.TabHeaderComponent)],u.prototype,"_tabHeaders",void 0),fe([(0,t.ViewChild)(b.ScrollableDirective)],u.prototype,"scrollable",void 0),fe([(0,t.Output)()],u.prototype,"onTabChange",void 0),fe([(0,t.Output)()],u.prototype,"onTabClose",void 0),fe([(0,t.ViewChild)("panelActionbar",{read:t.ElementRef})],u.prototype,"_actionbarRef",void 0),fe([(0,t.ViewChild)("rootContainer",{read:t.ElementRef})],u.prototype,"_rootContainer",void 0),e.PanelComponent=u=fe([(0,t.Component)({selector:"panel",template:` <div #rootContainer class="tabbedPanel fullsize" [ngClass]="_options.layout === NavigationBarLayout.vertical ? 'vertical' : 'horizontal'"> <div *ngIf="!_options.alwaysShowTabs ? _tabs && _tabs.length !== 1 : true" class="composite title"> <div class="tabContainer"> <div *ngIf="_options.layout === NavigationBarLayout.vertical" class="vertical-tab-action-container"> <button [attr.aria-expanded]="_tabExpanded" [title]="toggleTabPanelButtonAriaLabel" [attr.aria-label]="toggleTabPanelButtonAriaLabel" [ngClass]="toggleTabPanelButtonCssClass" tabindex="0" (click)="toggleTabPanel()"></button> </div> <div [style.display]="_tabExpanded ? 'flex': 'none'" [attr.aria-hidden]="_tabExpanded ? 'false': 'true'" class="tabList" role="tablist" (keydown)="onKey($event)" (focusout)="onTabHeaderFocusOut($event)"> <div role="presentation" *ngFor="let tab of _tabs"> <ng-container *ngIf="tab.type!=='group-header'"> <tab-header role="presentation" [selected]="_selectedTab === tab" [tab]="tab" [showIcon]="_options.showIcon" (onSelectTab)='selectTab($event)' (onCloseTab)='closeTab($event)'></tab-header> </ng-container> <ng-container *ngIf="tab.type==='group-header' && _options.layout === NavigationBarLayout.vertical"> <div class="tab-group-header"> <span>{{tab.title}}</span> </div> </ng-container > </div> </div> </div> <div class="title-actions"> <div #panelActionbar class="panel-actions" style="flex: 0 0 auto; align-self: end; margin-top: auto; margin-bottom: auto;" > </div> </div> </div> <div class="tab-content"> <div class="fullsize" style="position: absolute"> <ng-content></ng-content> </div> </div> </div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.NgZone))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef)))],u)}),define(Q[1123],Y([1,0,40,341,185,830,497,1116]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PanelModule=void 0;let v=class{};e.PanelModule=v,e.PanelModule=v=fe([(0,t.NgModule)({imports:[y.CommonModule,f.ScrollableModule],exports:[b.TabComponent,T.PanelComponent],declarations:[b.TabComponent,D.TabHeaderComponent,T.PanelComponent]})],v)}),define(Q[831],Y([1,0,40,7,4,85,2274,1559]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PropertiesContainer=void 0;var f;(function(S){S.twoColumns="twoColumns",S.oneColumn="oneColumn"})(f||(f={}));var v;(function(S){S.row="rowLayout",S.column="columnLayout"})(v||(v={}));let m=class extends b.Disposable{constructor(h){super(),this._changeRef=h,this.gridDisplayLayout=f.twoColumns,this.propertyLayout=v.row,this._propertyItems=[],this._showToggleButton=!1,this._togglePropertiesAction=new T.TogglePropertiesAction}ngAfterViewInit(){this._register(this._togglePropertiesAction.onDidChange(h=>{h.expanded!==void 0&&this._changeRef.detectChanges()})),this._actionbar=this._register(new D.ActionBar(this._actionbarRef.nativeElement)),this._actionbar.push(this._togglePropertiesAction,{icon:!0,label:!1})}ngOnInit(){this._register(y.addDisposableListener(window,y.EventType.RESIZE,()=>this.layoutPropertyItems())),this._changeRef.detectChanges()}ngOnDestroy(){this.dispose()}layoutPropertyItems(){window.innerWidth>=1366?(this.gridDisplayLayout=f.twoColumns,this.propertyLayout=v.row):window.innerWidth<1366&&window.innerWidth>=1024?(this.gridDisplayLayout=f.twoColumns,this.propertyLayout=v.column):window.innerWidth<1024&&(this.gridDisplayLayout=f.oneColumn,this.propertyLayout=v.column),this._changeRef.detectChanges()}set propertyItems(h){this._propertyItems=h,this.layoutPropertyItems()}get propertyItems(){return this._propertyItems}get showToggleButton(){return this._showToggleButton}set showToggleButton(h){this._showToggleButton!==h&&(this._showToggleButton=h,this._changeRef.detectChanges())}};e.PropertiesContainer=m,fe([(0,t.ViewChild)("actionbar",{read:t.ElementRef})],m.prototype,"_actionbarRef",void 0),e.PropertiesContainer=m=fe([(0,t.Component)({selector:"properties-container",templateUrl:decodeURI(q.toUrl("./propertiesContainer.component.html"))}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef)))],m)}),define(Q[1124],Y([1,0,40,341,831,1112]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PropertiesContainerModule=void 0;let T=class{};e.PropertiesContainerModule=T,e.PropertiesContainerModule=T=fe([(0,t.NgModule)({imports:[y.CommonModule,D.LoadingSpinnerModule],exports:[b.PropertiesContainer],declarations:[b.PropertiesContainer]})],T)}),define(Q[325],Y([1,0,2258,7,67,157,822,34,32,37,6,1054]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionWithDropdownActionViewItem=e.DropdownMenuActionViewItem=void 0;class h extends D.BaseActionViewItem{constructor(i,s,o,u=Object.create(null)){super(null,i,u),this.actionItem=null,this._onDidChangeVisibility=this._register(new S.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=s,this.contextMenuProvider=o,this.options=u,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(i){this.actionItem=i;const s=d=>{this.element=(0,y.append)(d,(0,y.$)("a.action-label"));let p=[];return typeof this.options.classNames=="string"?p=this.options.classNames.split(/\s+/g).filter(c=>!!c):this.options.classNames&&(p=this.options.classNames),p.find(c=>c==="icon")||p.push("codicon"),this.element.classList.add(...p),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},o=Array.isArray(this.menuActionsOrProvider),u={contextMenuProvider:this.contextMenuProvider,labelRenderer:s,menuAsChild:this.options.menuAsChild,actions:o?this.menuActionsOrProvider:void 0,actionProvider:o?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new T.DropdownMenu(i,u)),this._register(this.dropdownMenu.onDidChangeVisibility(d=>{this.element?.setAttribute("aria-expanded",`${d}`),this._onDidChangeVisibility.fire(d)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const d=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return d.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let i=null;return this.action.tooltip?i=this.action.tooltip:this.action.label&&(i=this.action.label),i??void 0}setActionContext(i){super.setActionContext(i),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=i:this.dropdownMenu.menuOptions={context:i})}show(){this.dropdownMenu?.show()}updateEnabled(){const i=!this.action.enabled;this.actionItem?.classList.toggle("disabled",i),this.element?.classList.toggle("disabled",i)}}e.DropdownMenuActionViewItem=h;class a extends D.ActionViewItem{constructor(i,s,o,u){super(i,s,o),this.contextMenuProvider=u}render(i){if(super.render(i),this.element){this.element.classList.add("action-dropdown-item");const s={getActions:()=>{const d=this.options.menuActionsOrProvider;return Array.isArray(d)?d:d.getActions()}},o=this.options.menuActionClassNames||[],u=(0,y.h)("div.action-dropdown-item-separator",[(0,y.h)("div",{})]).root;u.classList.toggle("prominent",o.includes("prominent")),(0,y.append)(this.element,u),this.dropdownMenuActionViewItem=new h(this._register(new f.Action("dropdownAction",t.localize(0,null))),s,this.contextMenuProvider,{classNames:["dropdown",...m.ThemeIcon.asClassNameArray(v.Codicon.dropDownButton),...o]}),this.dropdownMenuActionViewItem.render(this.element),this._register((0,y.addDisposableListener)(this.element,y.EventType.KEY_DOWN,d=>{if(s.getActions().length===0)return;const p=new b.StandardKeyboardEvent(d);let c=!1;this.dropdownMenuActionViewItem?.isFocused()&&p.equals(15)?(c=!0,this.dropdownMenuActionViewItem?.blur(),this.focus()):this.isFocused()&&p.equals(17)&&(c=!0,this.blur(),this.dropdownMenuActionViewItem?.focus()),c&&(p.preventDefault(),p.stopPropagation())}))}}blur(){super.blur(),this.dropdownMenuActionViewItem?.blur()}setFocusable(i){super.setFocusable(i),this.dropdownMenuActionViewItem?.setFocusable(i)}}e.ActionWithDropdownActionViewItem=a}),define(Q[249],Y([1,0,7,227,495,85,87,162,142,6,555,42,2264,1683]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryInputBox=e.InputBox=e.unthemedInboxStyles=e.MessageType=void 0;const r=t.$;var i;(function(u){u[u.INFO=1]="INFO",u[u.WARNING=2]="WARNING",u[u.ERROR=3]="ERROR"})(i||(e.MessageType=i={})),e.unthemedInboxStyles={inputBackground:"#3C3C3C",inputForeground:"#CCCCCC",inputValidationInfoBorder:"#55AAFF",inputValidationInfoBackground:"#063B49",inputValidationWarningBorder:"#B89500",inputValidationWarningBackground:"#352A05",inputValidationErrorBorder:"#BE1100",inputValidationErrorBackground:"#5A1D1D",inputBorder:void 0,inputValidationErrorForeground:void 0,inputValidationInfoForeground:void 0,inputValidationWarningForeground:void 0,disabledInputBackground:void 0,disabledInputForeground:void 0,disabledInputBorder:void 0};class s extends v.Widget{constructor(d,p,c){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new m.Emitter),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new m.Emitter),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=p,this.options=c,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation,this.showValidationMessage=!0),this.element=t.append(d,r(".monaco-inputbox.idle"));const l=this.options.flexibleHeight?"textarea":"input",n=t.append(this.element,r(".ibwrapper"));if(this.input=t.append(n,r(l+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=t.append(n,r("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new f.ScrollableElement(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),t.append(d,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(E=>this.input.scrollTop=E.scrollTop));const g=this._register(new y.DomEmitter(document,"selectionchange")),w=m.Event.filter(g.event,()=>document.getSelection()?.anchorNode===n);this._register(w(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.options.min&&(this.input.min=this.options.min),this.options.max&&(this.input.max=this.options.max),this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new D.ActionBar(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1}),this.input.style.paddingRight=this.options.actions.length*22+"px"),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(d){this.placeholder=d,this.input.setAttribute("placeholder",d)}setTooltip(d){this.tooltip=d,this.input.title=d}setAriaLabel(d){this.ariaLabel=d,d?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(d){this.input.value!==d&&(this.input.value=d,this.onValueChange())}get step(){return this.input.step}set step(d){this.input.step=d}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:t.getTotalHeight(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(d=null){this.input.select(),d&&(this.input.setSelectionRange(d.start,d.end),d.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}setEnabled(d){d?this.enable():this.disable()}get width(){return t.getTotalWidth(this.input)}set width(d){if(this.options.flexibleHeight&&this.options.flexibleWidth){let p=0;if(this.mirror){const c=parseFloat(this.mirror.style.paddingLeft||"")||0,l=parseFloat(this.mirror.style.paddingRight||"")||0;p=c+l}this.input.style.width=d-p+"px"}else this.input.style.width=d+"px";this.mirror&&(this.mirror.style.width=d+"px")}set paddingRight(d){this.input.style.width=`calc(100% - ${d}px)`,this.mirror&&(this.mirror.style.paddingRight=d+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const d=this.cachedContentHeight,p=this.cachedHeight,c=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:d,height:p}),this.scrollableElement.setScrollPosition({scrollTop:c})}showMessage(d,p){if(this.state==="open"&&(0,h.equals)(this.message,d))return;this.message=d,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(d.type));const c=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${t.asCssValueWithDefault(c.border,"transparent")}`,this.message.content&&(this.hasFocus()||p)&&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 d=null;return this.validation&&(d=this.validation(this.value),!d&&this.options.useDefaultValidation&&this.inputElement.validationMessage&&(d={content:this.inputElement.validationMessage,type:3}),d?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(d)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),d?.type}stylesForType(d){const p=this.options.inputBoxStyles;switch(d){case 1:return{border:p.inputValidationInfoBorder,background:p.inputValidationInfoBackground,foreground:p.inputValidationInfoForeground};case 2:return{border:p.inputValidationWarningBorder,background:p.inputValidationWarningBackground,foreground:p.inputValidationWarningForeground};default:return{border:p.inputValidationErrorBorder,background:p.inputValidationErrorBackground,foreground:p.inputValidationErrorForeground}}}classForType(d){switch(d){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message||!this.showValidationMessage)return;let d;const p=()=>d.style.width=t.getTotalWidth(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:l=>{if(!this.message)return null;d=t.append(l,r(".monaco-inputbox-container")),p();const n={inline:!0,className:"monaco-inputbox-message"},g=this.message.formatContent?(0,b.renderFormattedText)(this.message.content,n):(0,b.renderText)(this.message.content,n);g.classList.add(this.classForType(this.message.type));const w=this.stylesForType(this.message.type);return g.style.backgroundColor=w.background??"",g.style.color=w.foreground??"",g.style.border=w.border?`1px solid ${w.border}`:"",t.append(d,g),null},onHide:()=>{this.state="closed"},layout:p});let c;this.message.type===3?c=a.localize(0,null,this.message.content):this.message.type===2?c=a.localize(1,null,this.message.content):c=a.localize(2,null,this.message.content),T.alert(c),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const d=this.value,c=d.charCodeAt(d.length-1)===10?" ":"";(d+c).replace(/\u000c/g,"")?this.mirror.textContent=d+c:this.mirror.innerText="\xA0",this.layout()}applyStyles(){if(!this.options?.inputBoxStyles)return;const d=this.options.inputBoxStyles,p=d.inputBackground??"",c=d.inputForeground??"",l=d.inputBorder??"";this.element.style.backgroundColor=p,this.element.style.color=c,this.input.style.backgroundColor="inherit",this.input.style.color=c,this.element.style.border=`1px solid ${t.asCssValueWithDefault(l,"transparent")}`}layout(){if(!this.mirror)return;const d=this.cachedContentHeight;this.cachedContentHeight=t.getTotalHeight(this.mirror),d!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(d){const p=this.inputElement,c=p.selectionStart,l=p.selectionEnd,n=p.value;c!==null&&l!==null&&(this.value=n.substr(0,c)+d+n.substr(l),p.setSelectionRange(c+1,c+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar?.dispose(),super.dispose()}}e.InputBox=s;class o extends s{constructor(d,p,c){super(d,p,c),this._onDidFocus=this._register(new m.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new m.Emitter),this.onDidBlur=this._onDidBlur.event;const l=a.localize(3,null),n=` or \u21C5 ${l}`,g=` (\u21C5 ${l})`;this.history=new S.HistoryNavigator(c.history,100);const w=()=>{if(c.showHistoryHint&&c.showHistoryHint()&&!this.placeholder.endsWith(n)&&!this.placeholder.endsWith(g)&&this.history.getHistory().length){const E=this.placeholder.endsWith(")")?n:g,C=this.placeholder+E;c.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=C:this.setPlaceHolder(C)}};this.observer=new MutationObserver((E,C)=>{E.forEach(I=>{I.target.textContent||w()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>w()),this.onblur(this.input,()=>{const E=C=>{if(this.placeholder.endsWith(C)){const I=this.placeholder.slice(0,this.placeholder.length-C.length);return c.showPlaceholderOnFocus?this.placeholder=I:this.setPlaceHolder(I),!0}else return!1};E(g)||E(n)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(d){this.value&&(d||this.value!==this.getCurrentValue())&&this.history.add(this.value)}prependHistory(d){const p=this.getHistory();this.clearHistory(),d.forEach(c=>{this.history.add(c)}),p.forEach(c=>{this.history.add(c)})}getHistory(){return this.history.getHistory()}isAtFirstInHistory(){return this.history.isFirst()}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let d=this.getNextValue();d&&(d=d===this.value?this.getNextValue():d),this.value=d??"",T.status(this.value?this.value:a.localize(4,null))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let d=this.getPreviousValue();d&&(d=d===this.value?this.getPreviousValue():d),d&&(this.value=d,T.status(this.value))}clearHistory(){this.history.clear()}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let d=this.history.current();return d||(d=this.history.last(),this.history.next()),d}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}e.HistoryInputBox=o}),define(Q[166],Y([1,0,249,6]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputBox=void 0;class b extends t.InputBox{constructor(T,f,v,m){super(T,f,v),this._sqlOptions=v,this._onLoseFocus=this._register(new y.Emitter),this.onLoseFocus=this._onLoseFocus.event,this._onInputFocus=this._register(new y.Emitter),this.onInputFocus=this._onInputFocus.event,this._isTextAreaInput=!1,this._hideErrors=!1,this._lastLoseFocusValue=this.value;let S=this;this.onblur(this.inputElement,()=>{S._onLoseFocus.fire({value:S.value,hasChanged:S._lastLoseFocusValue!==S.value}),S._lastLoseFocusValue=S.value}),this.onfocus(this.inputElement,()=>{S._onInputFocus.fire()}),v&&v.type==="textarea"&&(this._isTextAreaInput=!0),this.required=!!this._sqlOptions?.required,this._sqlOptions.ariaDescription&&this.inputElement.setAttribute("aria-description",this._sqlOptions.ariaDescription),m!==void 0&&(this.inputElement.id=m),this.updateInputEnabledDisabledColors()}enable(){super.enable(),this.updateInputEnabledDisabledColors()}set rows(T){this.inputElement.setAttribute("rows",T.toString())}set columns(T){this.inputElement.setAttribute("cols",T.toString())}layout(){this._isTextAreaInput||super.layout()}disable(){super.disable(),this.updateInputEnabledDisabledColors()}setHeight(T){this._isTextAreaInput&&(this.inputElement.style.height=T,this.inputElement.style.whiteSpace="normal")}setMaxLength(T){T===void 0?this.inputElement.removeAttribute("maxLength"):this.inputElement.maxLength=T}set ariaLive(T){this.element.setAttribute("aria-live",T)}isEnabled(){return!this.inputElement.hasAttribute("disabled")}get required(){return this.inputElement.required}set required(T){this.inputElement.required=T}get hideErrors(){return this._hideErrors}set hideErrors(T){this._hideErrors=T,T&&this.hideMessage()}showMessage(T,f){this.hideErrors||super.showMessage(T,f)}updateInputEnabledDisabledColors(){const T=this.isEnabled(),f=T?this._sqlOptions.inputBoxStyles.inputBackground:this._sqlOptions.inputBoxStyles.disabledInputBackground,v=T?this._sqlOptions.inputBoxStyles.inputForeground:this._sqlOptions.inputBoxStyles.disabledInputForeground,m=T?this._sqlOptions.inputBoxStyles.inputBorder:this._sqlOptions.inputBoxStyles.disabledInputBorder;this.element.style.backgroundColor=f,this.element.style.color=v,this.input.style.color=v,this.element.style.border=`1px solid ${m}`}validate(T){if(T||this._sqlOptions?.requireForceValidations!==!0)return super.validate()}set width(T){super.width=T,this.element.style.width="fit-content"}get value(){return super.value}set value(T){this._lastLoseFocusValue=T,super.value=T}get id(){return this.input.id}}e.InputBox=b}),define(Q[448],Y([1,0,166,2285,7,67,179,6,4,226,42,1920,1042]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dropdown=void 0;const r={strictSelection:!0,maxHeight:300,errorMessage:h.localize(0,null)};class i extends v.Disposable{constructor(o,u,d){super(),this.contextViewService=u,this._dataSource=new y.DropdownDataSource,this._onBlur=this._register(new f.Emitter),this.onBlur=this._onBlur.event,this._onValueChange=this._register(new f.Emitter),this.onValueChange=this._onValueChange.event,this._onFocus=this._register(new f.Emitter),this.onFocus=this._onFocus.event,this._options=d||Object.create(null),(0,S.mixin)(this._options,r,!1),this._widthControlElementContainer=b.append(o,document.createElement("div")),this._widthControlElementContainer.classList.add("monaco-dropdown-width-control-element","context-view","fixed"),this._widthControlElementContainer.setAttribute("aria-hidden","true"),this._widthControlElement=b.append(this._widthControlElementContainer,document.createElement("span")),this._widthControlElement.classList.add("editable-drop-option-text"),this._el=b.append(o,b.$(".monaco-dropdown")),this._el.style.width="100%",this._el.style.height="100%",this._inputContainer=b.append(this._el,b.$(".dropdown-input.select-container")),this._inputContainer.style.width="100%",this._inputContainer.style.height="100%",this._selectListContainer=b.$("div"),this._selectListContainer.style.backgroundColor=d.contextBackground,this._selectListContainer.style.outline=`1px solid ${d.contextBorder}`,this._input=this._register(new t.InputBox(this._inputContainer,u,{validationOptions:{validation:c=>this._inputValidator(c)},placeholder:this._options.placeholder,ariaLabel:this._options.ariaLabel,ariaDescription:this._options.ariaDescription,inputBoxStyles:this._options})),this._input.inputElement.title="",this._input.inputElement.style.paddingRight="22px",this._inputContainer.setAttribute("role","combobox"),this._register(b.addDisposableListener(this._input.inputElement,b.EventType.CLICK,()=>{this._showList()}));const p=this._register(b.trackFocus(this._input.inputElement));this._register(p.onDidBlur(()=>{this._selectList.isDOMFocused()||this._onBlur.fire()})),this._register(b.addDisposableListener(window,b.EventType.RESIZE,()=>{this._isDropDownVisible&&this._hideList()})),this._register(b.addStandardDisposableListener(this._input.inputElement,b.EventType.KEY_DOWN,c=>{switch(c.keyCode){case 3:this._input.validate()===void 0&&this._onValueChange.fire(this._input.value),c.stopPropagation();break;case 9:this._isDropDownVisible&&(this._onBlur.fire(),this._hideList(),c.stopPropagation());break;case 2:this._onBlur.fire(),this._hideList();break;case 18:this._isDropDownVisible||this._showList(),setTimeout(()=>{this._selectList.domFocus(),this._selectList.focusFirst()},0),c.stopPropagation(),c.preventDefault();break}})),this._selectList=new T.List("EditableDropdown",this._selectListContainer,this,[new y.DropdownListRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!0,mouseSupport:!0,accessibilityProvider:{getAriaLabel:c=>c.text,getWidgetAriaLabel:()=>h.localize(1,null),getRole:()=>"option",getWidgetRole:()=>"listbox"}}),this._selectList.style(this._options),this.values=this._options.values,this._register(this._selectList.onDidBlur(()=>{this._hideList()})),this._register(this._selectList.onKeyDown(c=>{const l=new D.StandardKeyboardEvent(c);let n=!1;switch(l.keyCode){case 9:this._hideList(),setTimeout(()=>{this._input.focus()},0),n=!0;break;case 3:case 10:const g=this._selectList.getFocusedElements();g.length!==0&&(this._updateSelection(g[0].text),n=!0);break;default:return}n&&(c.preventDefault(),c.stopPropagation())})),this._register(this._selectList.onMouseClick(c=>{c.element&&this._updateSelection(c.element.text)})),this._register(this._input.onDidChange(c=>{this._dataSource.values.length>0&&(this._dataSource.filter=c,this._isDropDownVisible&&this._updateDropDownList()),this.fireOnTextChange&&(this.value=c)})),this._register(this.onBlur(()=>{this._hideList()})),this._register(this._selectList),this._register(this._input)}getHeight(){return 22}getTemplateId(){return y.SELECT_OPTION_ENTRY_TEMPLATE_ID}get _isDropDownVisible(){return this._selectListContainer.classList.contains("visible")}setDropdownVisibility(o){o?this._selectListContainer.classList.add("visible"):this._selectListContainer.classList.remove("visible"),this._selectListContainer.setAttribute("aria-hidden",`${!o}`)}_updateSelection(o){this.value=o,this._input.focus(),this._hideList()}_showList(){this._input.isEnabled()&&(this._inputContainer.setAttribute("aria-expanded","true"),this._onFocus.fire(),this._dataSource.filter=void 0,this.contextViewService.showContextView({getAnchor:()=>this._inputContainer,render:o=>(this.setDropdownVisibility(!0),b.append(o,this._selectListContainer),this._updateDropDownList(),{dispose:()=>{this.setDropdownVisibility(!1)}})},this._inputContainer))}_hideList(){this.contextViewService.hideContextView(),this._inputContainer.setAttribute("aria-expanded","false"),this.input.validate()}_updateDropDownList(){this._selectList.splice(0,this._selectList.length,this._dataSource.filteredValues.map(l=>({text:l})));const o=this._dataSource.filteredValues.indexOf(this.value);this._selectList.setSelection(o!==-1?[o]:[]);const u=b.getContentWidth(this._inputContainer),d=b.getTotalWidth(this._widthControlElement);let p=(0,m.clamp)(d,u,500);const c=Math.min(this._dataSource.filteredValues.length*this.getHeight(),this._options.maxHeight??500);this._selectListContainer.style.width=`${p}px`,this._selectListContainer.style.height=`${c}px`,this._selectList.layout(c,p)}set values(o){if(o){this._dataSource.filter=void 0,this._dataSource.values=o;let u=this._dataSource.values.reduce((d,p)=>d.length>p.length?d:p,"");this._widthControlElement.innerText=u,this._isDropDownVisible&&this._updateDropDownList(),this._input.validate()}}get value(){return this._input.value}set value(o){(this._previousValue!==o||this._input.value!==o)&&(this._previousValue=o,this._input.value=o,this._onValueChange.fire(o))}get inputElement(){return this._input.inputElement}focus(){this._input.focus()}blur(){this._input.blur(),this._hideList()}_inputValidator(o){if(this._input.isEnabled()&&!this._selectList.isDOMFocused()&&!this._isDropDownVisible&&!this._dataSource.values.some(u=>u===o)){if(this._options.strictSelection&&this._options.errorMessage)return{content:this._options.errorMessage,type:3};if(this._options.warningMessage)return{content:this._options.warningMessage,type:2}}return null}set enabled(o){this._input.setEnabled(o)}get enabled(){return this._input.isEnabled()}set ariaLabel(o){this._input.setAriaLabel(o)}get input(){return this._input}get selectList(){return this._selectList}get options(){return this._options}set strictSelection(o){this._options.strictSelection=o}}e.Dropdown=i}),define(Q[403],Y([1,0,1931,198,7,4,17,1493,166,156,179,343,67,6,369]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HeaderFilter=e.FilterButtonWidth=void 0;const s=(0,t.localize)(0,null);e.FilterButtonWidth=34;class o extends D.Disposable{constructor(g,w,E){super(),this.options=g,this.contextViewProvider=w,this.notificationProvider=E,this.onFilterApplied=new Slick.Event,this.onCommand=new Slick.Event,this.enabled=!0,this.handler=new Slick.EventHandler,this.disposableStore=new D.DisposableStore,this.columnButtonMapping=new Map}init(g){this.grid=g,this.handler.subscribe(this.grid.onHeaderCellRendered,(w,E)=>this.handleHeaderCellRendered(w,E)).subscribe(this.grid.onBeforeHeaderCellDestroy,(w,E)=>this.handleBeforeHeaderCellDestroy(w,E)).subscribe(this.grid.onClick,w=>this.handleBodyMouseDown(w)).subscribe(this.grid.onColumnsResized,()=>this.columnsResized()),this.options.refreshColumns!==!1&&this.grid.setColumns(this.grid.getColumns()),this.disposableStore.add((0,b.addDisposableListener)(document.body,"mousedown",w=>this.handleBodyMouseDown(w),!0)),this.disposableStore.add((0,b.addDisposableListener)(document.body,"keydown",w=>this.handleKeyDown(w)))}destroy(){this.handler.unsubscribeAll(),this.disposableStore.dispose()}async showMenu(){const g=this.grid.getActiveCell();if(g){const w=this.grid.getColumns()[g.cell];w.filterable!==!1&&this.columnButtonMapping[w.id]&&await this.showFilter(this.columnButtonMapping[w.id])}}handleKeyDown(g){const w=new a.StandardKeyboardEvent(g);this.menu&&w.keyCode===9&&(this.hideMenu(),this.previouslyFocusedElement?.focus&&this.previouslyFocusedElement.tabIndex!==-1&&this.previouslyFocusedElement?.focus(),b.EventHelper.stop(g,!0))}handleBodyMouseDown(g){this.menu&&this.menu!==g.target&&!(0,b.isAncestor)(g.target,this.menu)&&this.hideMenu()}hideMenu(){this.contextViewProvider.hideContextView()}handleHeaderCellRendered(g,w){const E=w.column;if(E.filterable===!1||w.node.classList.contains("slick-header-with-filter"))return;E.sortable!==!0&&(w.node.classList.add("slick-header-sortable"),(0,b.append)(w.node,(0,b.$)("span.slick-sort-indicator"))),w.node.classList.add("slick-header-with-filter");const C=jQuery(`<button tabindex="-1" aria-label="${s}" title="${s}"></button>`).addClass("slick-header-menubutton").data("column",E);this.setButtonImage(C,E.filterValues?.length>0),C.click(async I=>{I.stopPropagation(),I.preventDefault(),await this.showFilter(C[0])}),C.appendTo(w.node),this.columnButtonMapping[E.id]=C[0]}handleBeforeHeaderCellDestroy(g,w){jQuery(w.node).find(".slick-header-menubutton").remove()}createButtonMenuItem(g,w,E){const C=(0,b.append)(this.menu,(0,b.$)(".slick-header-menu-image-button-container")),I=new y.Button(C,this.options);return I.icon=`slick-header-menuicon ${E}`,I.label=g,I.onDidClick(async()=>{await this.handleMenuItemClick(w,this.columnDef)}),I}createSearchInputRow(){const g=(0,b.append)(this.menu,(0,b.$)(".searchbox-row"));this.selectAllCheckBox=new h.Checkbox((0,b.append)(g,(0,b.$)(".select-all-checkbox")),{onChange:C=>{this.filteredListData.forEach(I=>{I.checked=C})},label:"",ariaLabel:(0,t.localize)(1,null)}),this.searchInputBox=this._register(new v.InputBox((0,b.append)(g,(0,b.$)(".search-input")),this.contextViewProvider,{placeholder:(0,t.localize)(2,null),inputBoxStyles:this.options}));const w=(0,b.append)(g,(0,b.$)(".visible-count"));w.setAttribute("aria-live","polite"),w.setAttribute("aria-atomic","true"),this.visibleCountBadge=new i.CountBadge(w,{countFormat:(0,t.localize)(3,null)},this.options);const E=(0,b.append)(g,(0,b.$)(".selected-count"));E.setAttribute("aria-live","polite"),this.countBadge=new i.CountBadge(E,{countFormat:(0,t.localize)(4,null)},this.options),this._register(this.searchInputBox.onDidChange(async C=>{this.filteredListData=this.listData.filter(I=>I.value?.toUpperCase().indexOf(C.toUpperCase())!==-1),this.list.splice(0,this.list.length,this.filteredListData),this.updateSelectionState()}))}async createFilterList(){this.columnDef.filterValues=this.columnDef.filterValues||[];const g=this.columnDef.filterValues.slice(0);let w;const E=this.grid.getData();(0,f.instanceOfIDisposableDataProvider)(E)?w=await E.getColumnValues(this.columnDef):this.grid.getColumns().findIndex(_=>_.filterValues?.length>0)!==-1?w=this.getAllFilterValues(this.grid.getData().getFilteredItems(),this.columnDef):w=this.getFilterValues(this.grid.getData(),this.columnDef),w.sort();const C=w.indexOf(void 0);C!==-1&&(w.splice(C,1),w.unshift(void 0)),this.listData=[];for(let I=0;I<w.length;I++){const _=g.some(k=>k===w[I]),A=w[I];if(!A||A.indexOf("Error:")<0){let k=new u(A,_);this._register(k),this.listData.push(k)}}this.elementDisposables=this.listData.map(I=>I.onCheckStateChanged(_=>{this.updateSelectionState()})),this.filteredListData=this.listData,this.listContainer=(0,b.append)(this.menu,(0,b.$)(".filter")),this.list=new S.List("TableFilter",this.listContainer,new p,[new c],{multipleSelectionSupport:!1,keyboardSupport:!0,mouseSupport:!0,accessibilityProvider:new l}),this.list.onKeyDown(I=>{switch(new a.StandardKeyboardEvent(I).keyCode){case 14:this.filteredListData.length>0&&(this.list.focusFirst(),this.list.reveal(0),b.EventHelper.stop(I,!0));break;case 13:this.filteredListData.length>0&&(this.list.focusLast(),this.list.reveal(this.filteredListData.length-1),b.EventHelper.stop(I,!0));break;case 10:this.list.getFocus().length!==0&&(this.list.setSelection(this.list.getFocus()),this.toggleCheckbox(),b.EventHelper.stop(I,!0));break}}),this.list.splice(0,this.filteredListData.length,this.filteredListData),this.updateSelectionState()}createButton(g,w,E,C){const I=(0,b.append)(g,(0,b.$)(".filter-menu-button")),_=new y.Button(I,C);return _.label=_.title=E,_.element.id=w,_}toggleCheckbox(){if(this.list.getFocus().length!==0){const g=this.list.getFocusedElements()[0];g.checked=!g.checked,this.updateSelectionState()}}updateSelectionState(){const g=this.filteredListData.filter(w=>w.checked);this.selectAllCheckBox.checked=this.filteredListData.length>0&&g.length===this.filteredListData.length,this.countBadge.setCount(g.length),this.visibleCountBadge.setCount(this.filteredListData.length)}async showFilter(g){if(!this.enabled){this.notificationProvider&&this.options?.disabledFilterMessage&&this.notificationProvider.info(this.options.disabledFilterMessage);return}this.previouslyFocusedElement=document.activeElement,await this.createFilterMenu(g);const w=jQuery(g).offset(),E=w.top+this.menu.offsetHeight<=window.innerHeight?w.top:window.innerHeight-this.menu.offsetHeight,C=w.left+g.offsetWidth+this.menu.offsetWidth<=window.innerWidth?w.left+g.offsetWidth:window.innerWidth-this.menu.offsetWidth;this.contextViewProvider.showContextView({getAnchor:()=>({x:C,y:E}),render:I=>(I.appendChild(this.menu),this.list.layout(this.listContainer.clientHeight),{dispose:()=>{this.disposeMenu()}}),focus:()=>{this.okButton.focus()}})}disposeMenu(){this.menu&&((0,b.clearNode)(this.menu),this.menu.remove(),this.menu=void 0,(0,D.dispose)(this.elementDisposables))}async createFilterMenu(g){const w=(0,T.withNullAsUndefined)(g),E=jQuery(w);this.columnDef=E.data("column"),this.disposeMenu(),this.menu=(0,b.append)(document.body,(0,b.$)(".slick-header-menu"));const C=10,I=30,_=350;this.menu.style.height=`${Math.min(_,window.innerHeight-I)-C}px`,this.createButtonMenuItem((0,t.localize)(5,null),"sort-asc","ascending"),this.createButtonMenuItem((0,t.localize)(6,null),"sort-desc","descending"),this.createSearchInputRow(),await this.createFilterList();const A=(0,b.append)(this.menu,(0,b.$)(".filter-menu-button-container"));this.okButton=this.createButton(A,"filter-ok-button",(0,t.localize)(7,null),this.options),this.okButton.onDidClick(async()=>{this.columnDef.filterValues=this.listData.filter(k=>k.checked).map(k=>k.value),this.setButtonImage(E,this.columnDef.filterValues.length>0),await this.handleApply(this.columnDef)}),this.clearButton=this.createButton(A,"filter-clear-button",(0,t.localize)(8,null),{secondary:!0,...this.options}),this.clearButton.onDidClick(async()=>{this.columnDef.filterValues.length=0,this.setButtonImage(E,!1),await this.handleApply(this.columnDef)}),this.cancelButton=this.createButton(A,"filter-cancel-button",(0,t.localize)(9,null),{secondary:!0,...this.options}),this.cancelButton.onDidClick(()=>{this.hideMenu()}),(0,m.trapKeyboardNavigation)(this.menu)}columnsResized(){this.hideMenu()}setButtonImage(g,w){const E=g.get(0);if(w)E.className+=" filtered";else{const C=E.classList;C.contains("filtered")&&C.remove("filtered")}}async handleApply(g){this.hideMenu();const w=this.grid.getData();(0,f.instanceOfIDisposableDataProvider)(w)&&(await w.filter(this.grid.getColumns()),this.grid.invalidateAllRows(),this.grid.updateRowCount(),this.grid.render()),this.onFilterApplied.notify({grid:this.grid,column:g}),this.setFocusToColumn(g)}getFilterValues(g,w){const E=new Set;return g.getItems().forEach(C=>{const I=C[w.field];(I instanceof Array?I:[I]).forEach(A=>E.add(A))}),Array.from(E)}getAllFilterValues(g,w){const E=new Set;return g.forEach(C=>{const I=C[w.field];(I instanceof Array?I:[I]).forEach(A=>E.add(A))}),Array.from(E).sort(C=>C)}async handleMenuItemClick(g,w){this.hideMenu();const E=this.grid.getData();(g==="sort-asc"||g==="sort-desc")&&this.grid.setSortColumn(w.id,g==="sort-asc"),(0,f.instanceOfIDisposableDataProvider)(E)&&(g==="sort-asc"||g==="sort-desc")&&(await E.sort({grid:this.grid,multiColumnSort:!1,sortCol:this.columnDef,sortAsc:g==="sort-asc"}),this.grid.invalidateAllRows(),this.grid.updateRowCount(),this.grid.render()),this.onCommand.notify({grid:this.grid,column:w,command:g}),this.setFocusToColumn(w)}setFocusToColumn(g){if(this.grid.getDataLength()>0){const w=this.grid.getColumns().findIndex(E=>E.id===g.id);w>=0&&this.grid.setActiveCell(0,w)}}}e.HeaderFilter=o;class u extends D.Disposable{constructor(g,w){super(),this._onCheckStateChanged=this._register(new r.Emitter),this.onCheckStateChanged=this._onCheckStateChanged.event,this.value=g,this._checked=w,g===void 0?this.displayText=(0,t.localize)(10,null):g===""?this.displayText=(0,t.localize)(11,null):this.displayText=g}get checked(){return this._checked}set checked(g){this._checked!==g&&(this._checked=g,this._onCheckStateChanged.fire(g))}}const d="TableFilterListTemplate";class p{getHeight(g){return 22}getTemplateId(g){return d}}class c{renderTemplate(g){const w=Object.create(null);return w.templateDisposables=[],w.elementDisposables=[],w.label=(0,b.append)(g,(0,b.$)("label.filter-option")),w.checkbox=(0,b.append)(w.label,(0,b.$)("input",{type:"checkbox",tabIndex:-1})),w.text=(0,b.append)(w.label,(0,b.$)("div")),w.text.style.flex="1 1 auto",w.templateDisposables.push((0,b.addDisposableListener)(w.checkbox,b.EventType.CHANGE,E=>{w.element.checked=w.checkbox.checked})),w}renderElement(g,w,E,C){E.element=g,E.elementDisposables=(0,D.dispose)(E.elementDisposables),E.elementDisposables.push(E.element.onCheckStateChanged(I=>{E.checkbox.checked=I})),E.checkbox.checked=g.checked,E.checkbox.setAttribute("aria-label",g.displayText),E.text.innerText=g.displayText,E.label.title=g.displayText,E.label.style.fontStyle=g.displayText===g.value?"normal":"italic"}disposeElement(g,w,E,C){E.elementDisposables=(0,D.dispose)(E.elementDisposables)}disposeTemplate(g){g.elementDisposables=(0,D.dispose)(g.elementDisposables),g.templateDisposables=(0,D.dispose)(g.templateDisposables)}get templateId(){return d}}class l{getAriaLabel(g){return g.value}getWidgetAriaLabel(){return(0,t.localize)(12,null)}getWidgetRole(){return"listbox"}getRole(g){return"option"}}}),define(Q[832],Y([1,0,97,151,7,67,129,85,157,821,162,34,14,32,37,257,4,18,33]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatRule=e.cleanMnemonic=e.Menu=e.unthemedMenuStyles=e.Direction=e.MENU_ESCAPED_MNEMONIC_REGEX=e.MENU_MNEMONIC_REGEX=void 0,e.MENU_MNEMONIC_REGEX=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,e.MENU_ESCAPED_MNEMONIC_REGEX=/(&)?(&)([^\s&])/g;var p;(function(I){I[I.Right=0]="Right",I[I.Left=1]="Left"})(p||(e.Direction=p={})),e.unthemedMenuStyles={shadowColor:void 0,borderColor:void 0,foregroundColor:void 0,backgroundColor:void 0,selectionForegroundColor:void 0,selectionBackgroundColor:void 0,selectionBorderColor:void 0,separatorColor:void 0,scrollbarShadow:void 0,scrollbarSliderBackground:void 0,scrollbarSliderHoverBackground:void 0,scrollbarSliderActiveBackground:void 0};class c extends f.ActionBar{constructor(_,A,k,L){_.classList.add("monaco-menu-container"),_.setAttribute("role","presentation");const R=document.createElement("div");R.classList.add("monaco-menu"),R.setAttribute("role","presentation"),super(R,{orientation:1,actionViewItemProvider:P=>this.doGetActionViewItem(P,k,M),context:k.context,actionRunner:k.actionRunner,ariaLabel:k.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...u.isMacintosh||u.isLinux?[10]:[]],keyDown:!0}}),this.menuStyles=L,this.menuElement=R,this.actionsList.tabIndex=0,this.menuDisposables=this._register(new o.DisposableStore),this.initializeOrUpdateStyleSheet(_,L),this._register(y.Gesture.addTarget(R)),(0,b.addDisposableListener)(R,b.EventType.KEY_DOWN,P=>{new D.StandardKeyboardEvent(P).equals(2)&&P.preventDefault()}),k.enableMnemonics&&this.menuDisposables.add((0,b.addDisposableListener)(R,b.EventType.KEY_DOWN,P=>{const x=P.key.toLocaleLowerCase();if(this.mnemonics.has(x)){b.EventHelper.stop(P,!0);const F=this.mnemonics.get(x);if(F.length===1&&(F[0]instanceof n&&F[0].container&&this.focusItemByElement(F[0].container),F[0].onClick(P)),F.length>1){const V=F.shift();V&&V.container&&(this.focusItemByElement(V.container),F.push(V)),this.mnemonics.set(x,F)}}})),u.isLinux&&this._register((0,b.addDisposableListener)(R,b.EventType.KEY_DOWN,P=>{const x=new D.StandardKeyboardEvent(P);x.equals(14)||x.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),b.EventHelper.stop(P,!0)):(x.equals(13)||x.equals(12))&&(this.focusedItem=0,this.focusPrevious(),b.EventHelper.stop(P,!0))})),this._register((0,b.addDisposableListener)(this.domNode,b.EventType.MOUSE_OUT,P=>{const x=P.relatedTarget;(0,b.isAncestor)(x,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),P.stopPropagation())})),this._register((0,b.addDisposableListener)(this.actionsList,b.EventType.MOUSE_OVER,P=>{let x=P.target;if(!(!x||!(0,b.isAncestor)(x,this.actionsList)||x===this.actionsList)){for(;x.parentElement!==this.actionsList&&x.parentElement!==null;)x=x.parentElement;if(x.classList.contains("action-item")){const F=this.focusedItem;this.setFocusedItem(x),F!==this.focusedItem&&this.updateFocus()}}})),this._register(y.Gesture.addTarget(this.actionsList)),this._register((0,b.addDisposableListener)(this.actionsList,y.EventType.Tap,P=>{let x=P.initialTarget;if(!(!x||!(0,b.isAncestor)(x,this.actionsList)||x===this.actionsList)){for(;x.parentElement!==this.actionsList&&x.parentElement!==null;)x=x.parentElement;if(x.classList.contains("action-item")){const F=this.focusedItem;this.setFocusedItem(x),F!==this.focusedItem&&this.updateFocus()}}}));const M={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new S.DomScrollableElement(R,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const N=this.scrollableElement.getDomNode();N.style.position="",this.styleScrollElement(N,L),this._register((0,b.addDisposableListener)(R,y.EventType.Change,P=>{b.EventHelper.stop(P,!0);const x=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:x-P.translationY})})),this._register((0,b.addDisposableListener)(N,b.EventType.MOUSE_UP,P=>{P.preventDefault()})),R.style.maxHeight=`${Math.max(10,window.innerHeight-_.getBoundingClientRect().top-35)}px`,A=A.filter(P=>k.submenuIds?.has(P.id)?(console.warn(`Found submenu cycle: ${P.id}`),!1):!0),this.push(A,{icon:!0,label:!0,isMenu:!0}),_.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(P=>!(P instanceof g)).forEach((P,x,F)=>{P.updatePositionInSet(x+1,F.length)})}initializeOrUpdateStyleSheet(_,A){this.styleSheet||((0,b.isInShadowDOM)(_)?this.styleSheet=(0,b.createStyleSheet)(_):(c.globalStyleSheet||(c.globalStyleSheet=(0,b.createStyleSheet)()),this.styleSheet=c.globalStyleSheet)),this.styleSheet.textContent=C(A,(0,b.isInShadowDOM)(_))}styleScrollElement(_,A){const k=A.foregroundColor??"",L=A.backgroundColor??"",R=A.borderColor?`1px solid ${A.borderColor}`:"",M="5px",N=A.shadowColor?`0 2px 8px ${A.shadowColor}`:"";_.style.outline=R,_.style.borderRadius=M,_.style.color=k,_.style.backgroundColor=L,_.style.boxShadow=N}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}get scrollOffset(){return this.menuElement.scrollTop}trigger(_){if(_<=this.viewItems.length&&_>=0){const A=this.viewItems[_];if(A instanceof n)super.focus(_),A.open(!0);else if(A instanceof l)super.run(A._action,A._context);else return}}focusItemByElement(_){const A=this.focusedItem;this.setFocusedItem(_),A!==this.focusedItem&&this.updateFocus()}setFocusedItem(_){for(let A=0;A<this.actionsList.children.length;A++){const k=this.actionsList.children[A];if(_===k){this.focusedItem=A;break}}}updateFocus(_){super.updateFocus(_,!0,!0),typeof this.focusedItem<"u"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(_,A,k){if(_ instanceof h.Separator)return new g(A.context,_,{icon:!0},this.menuStyles);if(_ instanceof h.SubmenuAction){const L=new n(_,_.actions,k,{...A,submenuIds:new Set([...A.submenuIds||[],_.id])},this.menuStyles);if(A.enableMnemonics){const R=L.getMnemonic();if(R&&L.isEnabled()){let M=[];this.mnemonics.has(R)&&(M=this.mnemonics.get(R)),M.push(L),this.mnemonics.set(R,M)}}return L}else{const L={enableMnemonics:A.enableMnemonics,useEventAsContext:A.useEventAsContext};if(A.getKeyBinding){const M=A.getKeyBinding(_);if(M){const N=M.getLabel();N&&(L.keybinding=N)}}const R=new l(A.context,_,L,this.menuStyles);if(A.enableMnemonics){const M=R.getMnemonic();if(M&&R.isEnabled()){let N=[];this.mnemonics.has(M)&&(N=this.mnemonics.get(M)),N.push(R),this.mnemonics.set(M,N)}}return R}}}e.Menu=c;class l extends v.BaseActionViewItem{constructor(_,A,k,L){if(k.isMenu=!0,super(A,A,k),this.menuStyle=L,this.options=k,this.options.icon=k.icon!==void 0?k.icon:!1,this.options.label=k.label!==void 0?k.label:!0,this.cssClass="",this.options.label&&k.enableMnemonics){const R=this.action.label;if(R){const M=e.MENU_MNEMONIC_REGEX.exec(R);M&&(this.mnemonic=(M[1]?M[1]:M[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new a.RunOnceScheduler(()=>{this.element&&(this._register((0,b.addDisposableListener)(this.element,b.EventType.MOUSE_UP,R=>{if(b.EventHelper.stop(R,!0),t.isFirefox){if(new T.StandardMouseEvent(R).rightButton)return;this.onClick(R)}else setTimeout(()=>{this.onClick(R)},0)})),this._register((0,b.addDisposableListener)(this.element,b.EventType.CONTEXT_MENU,R=>{b.EventHelper.stop(R,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(_){super.render(_),this.element&&(this.container=_,this.item=(0,b.append)(this.element,(0,b.$)("a.action-menu-item")),this._action.id===h.Separator.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,b.append)(this.item,(0,b.$)("span.menu-item-check"+i.ThemeIcon.asCSSSelector(r.Codicon.menuSelection))),this.check.setAttribute("role","none"),this.label=(0,b.append)(this.item,(0,b.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,b.append)(this.item,(0,b.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item?.focus(),this.applyStyle()}updatePositionInSet(_,A){this.item&&(this.item.setAttribute("aria-posinset",`${_}`),this.item.setAttribute("aria-setsize",`${A}`))}updateLabel(){if(this.label&&this.options.label){(0,b.clearNode)(this.label);let _=(0,s.stripIcons)(this.action.label);if(_){const A=w(_);this.options.enableMnemonics||(_=A),this.label.setAttribute("aria-label",A.replace(/&&/g,"&"));const k=e.MENU_MNEMONIC_REGEX.exec(_);if(k){_=d.escape(_),e.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let L=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(_);for(;L&&L[1];)L=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(_);const R=M=>M.replace(/&&/g,"&");L?this.label.append(d.ltrim(R(_.substr(0,L.index))," "),(0,b.$)("u",{"aria-hidden":"true"},L[3]),d.rtrim(R(_.substr(L.index+L[0].length))," ")):this.label.innerText=R(_).trim(),this.item?.setAttribute("aria-keyshortcuts",(k[1]?k[1]:k[3]).toLocaleLowerCase())}else this.label.innerText=_.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const _=this.action.checked;this.item.classList.toggle("checked",!!_),_!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",_?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const _=this.element&&this.element.classList.contains("focused"),A=_&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,k=_&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,L=_&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",R=_&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=A??"",this.item.style.backgroundColor=k??"",this.item.style.outline=L,this.item.style.outlineOffset=R),this.check&&(this.check.style.color=A??"")}}class n extends l{constructor(_,A,k,L,R){super(_,_,L,R),this.submenuActions=A,this.parentData=k,this.submenuOptions=L,this.mysubmenu=null,this.submenuDisposables=this._register(new o.DisposableStore),this.mouseOver=!1,this.expandDirection=L&&L.expandDirection!==void 0?L.expandDirection:p.Right,this.showScheduler=new a.RunOnceScheduler(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new a.RunOnceScheduler(()=>{this.element&&!(0,b.isAncestor)((0,b.getActiveElement)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(_){super.render(_),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,b.append)(this.item,(0,b.$)("span.submenu-indicator"+i.ThemeIcon.asCSSSelector(r.Codicon.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,b.addDisposableListener)(this.element,b.EventType.KEY_UP,A=>{const k=new D.StandardKeyboardEvent(A);(k.equals(17)||k.equals(3))&&(b.EventHelper.stop(A,!0),this.createSubmenu(!0))})),this._register((0,b.addDisposableListener)(this.element,b.EventType.KEY_DOWN,A=>{const k=new D.StandardKeyboardEvent(A);(0,b.getActiveElement)()===this.item&&(k.equals(17)||k.equals(3))&&b.EventHelper.stop(A,!0)})),this._register((0,b.addDisposableListener)(this.element,b.EventType.MOUSE_OVER,A=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register((0,b.addDisposableListener)(this.element,b.EventType.MOUSE_LEAVE,A=>{this.mouseOver=!1})),this._register((0,b.addDisposableListener)(this.element,b.EventType.FOCUS_OUT,A=>{this.element&&!(0,b.isAncestor)((0,b.getActiveElement)(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}open(_){this.cleanupExistingSubmenu(!1),this.createSubmenu(_)}onClick(_){b.EventHelper.stop(_,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(_){if(this.parentData.submenu&&(_||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(_,A,k,L){const R={top:0,left:0};return R.left=(0,m.layout)(_.width,A.width,{position:L===p.Right?0:1,offset:k.left,size:k.width}),R.left>=k.left&&R.left<k.left+k.width&&(k.left+10+A.width<=_.width&&(R.left=k.left+10),k.top+=10,k.height=0),R.top=(0,m.layout)(_.height,A.height,{position:0,offset:k.top,size:0}),R.top+A.height===k.top&&R.top+k.height+A.height<=_.height&&(R.top+=k.height),R}createSubmenu(_=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=(0,b.append)(this.element,(0,b.$)("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const A=getComputedStyle(this.parentData.parent.domNode),k=parseFloat(A.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new c(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new h.EmptySubmenuAction],this.submenuOptions,this.menuStyle);const L=this.element.getBoundingClientRect(),R={top:L.top-k,left:L.left,height:L.height+2*k,width:L.width},M=this.submenuContainer.getBoundingClientRect(),{top:N,left:P}=this.calculateSubmenuMenuLayout(new b.Dimension(window.innerWidth,window.innerHeight),b.Dimension.lift(M),R,this.expandDirection);this.submenuContainer.style.left=`${P-M.left}px`,this.submenuContainer.style.top=`${N-M.top}px`,this.submenuDisposables.add((0,b.addDisposableListener)(this.submenuContainer,b.EventType.KEY_UP,x=>{new D.StandardKeyboardEvent(x).equals(15)&&(b.EventHelper.stop(x,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add((0,b.addDisposableListener)(this.submenuContainer,b.EventType.KEY_DOWN,x=>{new D.StandardKeyboardEvent(x).equals(15)&&b.EventHelper.stop(x,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(_),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(_){this.item&&this.item?.setAttribute("aria-expanded",_)}applyStyle(){super.applyStyle();const A=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=A??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class g extends v.ActionViewItem{constructor(_,A,k,L){super(_,A,k),this.menuStyles=L}render(_){super.render(_),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function w(I){const _=e.MENU_MNEMONIC_REGEX,A=_.exec(I);if(!A)return I;const k=!A[1];return I.replace(_,k?"$2$3":"").trim()}e.cleanMnemonic=w;function E(I){const _=(0,r.getCodiconFontCharacters)()[I.id];return`.codicon-${I.id}:before { content: '\\${_.toString(16)}'; }`}e.formatRule=E;function C(I,_){let A=` .monaco-menu { font-size: 13px; border-radius: 5px; min-width: 160px; } ${E(r.Codicon.menuSelection)} ${E(r.Codicon.menuSubmenu)} .monaco-menu .monaco-action-bar { text-align: right; overflow: hidden; white-space: nowrap; } .monaco-menu .monaco-action-bar .actions-container { display: flex; margin: 0 auto; padding: 0; width: 100%; justify-content: flex-end; } .monaco-menu .monaco-action-bar.vertical .actions-container { display: inline-block; } .monaco-menu .monaco-action-bar.reverse .actions-container { flex-direction: row-reverse; } .monaco-menu .monaco-action-bar .action-item { cursor: pointer; display: inline-block; transition: transform 50ms ease; position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */ } .monaco-menu .monaco-action-bar .action-item.disabled { cursor: default; } .monaco-menu .monaco-action-bar.animated .action-item.active { transform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221A\u03C6 */ } .monaco-menu .monaco-action-bar .action-item .icon, .monaco-menu .monaco-action-bar .action-item .codicon { display: inline-block; } .monaco-menu .monaco-action-bar .action-item .codicon { display: flex; align-items: center; } .monaco-menu .monaco-action-bar .action-label { font-size: 11px; margin-right: 4px; } .monaco-menu .monaco-action-bar .action-item.disabled .action-label, .monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover { color: var(--vscode-disabledForeground); } /* Vertical actions */ .monaco-menu .monaco-action-bar.vertical { text-align: left; } .monaco-menu .monaco-action-bar.vertical .action-item { display: block; } .monaco-menu .monaco-action-bar.vertical .action-label.separator { display: block; border-bottom: 1px solid var(--vscode-menu-separatorBackground); padding-top: 1px; padding: 30px; } .monaco-menu .secondary-actions .monaco-action-bar .action-label { margin-left: 6px; } /* Action Items */ .monaco-menu .monaco-action-bar .action-item.select-container { overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */ flex: 1; max-width: 170px; min-width: 60px; display: flex; align-items: center; justify-content: center; margin-right: 10px; } .monaco-menu .monaco-action-bar.vertical { margin-left: 0; overflow: visible; } .monaco-menu .monaco-action-bar.vertical .actions-container { display: block; } .monaco-menu .monaco-action-bar.vertical .action-item { padding: 0; transform: none; display: flex; } .monaco-menu .monaco-action-bar.vertical .action-item.active { transform: none; } .monaco-menu .monaco-action-bar.vertical .action-menu-item { flex: 1 1 auto; display: flex; height: 2em; align-items: center; position: relative; margin: 0 4px; border-radius: 4px; } .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding, .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding { opacity: unset; } .monaco-menu .monaco-action-bar.vertical .action-label { flex: 1 1 auto; text-decoration: none; padding: 0 1em; background: none; font-size: 12px; line-height: 1; } .monaco-menu .monaco-action-bar.vertical .keybinding, .monaco-menu .monaco-action-bar.vertical .submenu-indicator { display: inline-block; flex: 2 1 auto; padding: 0 1em; text-align: right; font-size: 12px; line-height: 1; } .monaco-menu .monaco-action-bar.vertical .submenu-indicator { height: 100%; } .monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon { font-size: 16px !important; display: flex; align-items: center; } .monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before { margin-left: auto; margin-right: -20px; } .monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding, .monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator { opacity: 0.4; } .monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) { display: inline-block; box-sizing: border-box; margin: 0; } .monaco-menu .monaco-action-bar.vertical .action-item { position: static; overflow: visible; } .monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu { position: absolute; } .monaco-menu .monaco-action-bar.vertical .action-label.separator { width: 100%; height: 0px !important; opacity: 1; } .monaco-menu .monaco-action-bar.vertical .action-label.separator.text { padding: 0.7em 1em 0.1em 1em; font-weight: bold; opacity: 1; } .monaco-menu .monaco-action-bar.vertical .action-label:hover { color: inherit; } .monaco-menu .monaco-action-bar.vertical .menu-item-check { position: absolute; visibility: hidden; width: 1em; height: 100%; } .monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check { visibility: visible; display: flex; align-items: center; justify-content: center; } /* Context Menu */ .context-view.monaco-menu-container { outline: 0; border: none; animation: fadeIn 0.083s linear; -webkit-app-region: no-drag; } .context-view.monaco-menu-container :focus, .context-view.monaco-menu-container .monaco-action-bar.vertical:focus, .context-view.monaco-menu-container .monaco-action-bar.vertical :focus { outline: 0; } .hc-black .context-view.monaco-menu-container, .hc-light .context-view.monaco-menu-container, :host-context(.hc-black) .context-view.monaco-menu-container, :host-context(.hc-light) .context-view.monaco-menu-container { box-shadow: none; } .hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused, .hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused, :host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused, :host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused { background: none; } /* Vertical Action Bar Styles */ .monaco-menu .monaco-action-bar.vertical { padding: 4px 0; } .monaco-menu .monaco-action-bar.vertical .action-menu-item { height: 2em; } .monaco-menu .monaco-action-bar.vertical .action-label:not(.separator), .monaco-menu .monaco-action-bar.vertical .keybinding { font-size: inherit; padding: 0 2em; } .monaco-menu .monaco-action-bar.vertical .menu-item-check { font-size: inherit; width: 2em; } .monaco-menu .monaco-action-bar.vertical .action-label.separator { font-size: inherit; margin: 5px 0 !important; padding: 0; border-radius: 0; } .linux .monaco-menu .monaco-action-bar.vertical .action-label.separator, :host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator { margin-left: 0; margin-right: 0; } .monaco-menu .monaco-action-bar.vertical .submenu-indicator { font-size: 60%; padding: 0 1.8em; } .linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator, :host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator { height: 100%; mask-size: 10px 10px; -webkit-mask-size: 10px 10px; } .monaco-menu .action-item { cursor: default; }`;if(_){A+=` /* Arrows */ .monaco-scrollable-element > .scrollbar > .scra { cursor: pointer; font-size: 11px !important; } .monaco-scrollable-element > .visible { opacity: 1; /* Background rule added for IE9 - to allow clicks on dom node */ background:rgba(0,0,0,0); transition: opacity 100ms linear; } .monaco-scrollable-element > .invisible { opacity: 0; pointer-events: none; } .monaco-scrollable-element > .invisible.fade { transition: opacity 800ms linear; } /* Scrollable Content Inset Shadow */ .monaco-scrollable-element > .shadow { position: absolute; display: none; } .monaco-scrollable-element > .shadow.top { display: block; top: 0; left: 3px; height: 3px; width: 100%; } .monaco-scrollable-element > .shadow.left { display: block; top: 3px; left: 0; height: 100%; width: 3px; } .monaco-scrollable-element > .shadow.top-left-corner { display: block; top: 0; left: 0; height: 3px; width: 3px; } `;const k=I.scrollbarShadow;k&&(A+=` .monaco-scrollable-element > .shadow.top { box-shadow: ${k} 0 6px 6px -6px inset; } .monaco-scrollable-element > .shadow.left { box-shadow: ${k} 6px 0 6px -6px inset; } .monaco-scrollable-element > .shadow.top.left { box-shadow: ${k} 6px 6px 6px -6px inset; } `);const L=I.scrollbarSliderBackground;L&&(A+=` .monaco-scrollable-element > .scrollbar > .slider { background: ${L}; } `);const R=I.scrollbarSliderHoverBackground;R&&(A+=` .monaco-scrollable-element > .scrollbar > .slider:hover { background: ${R}; } `);const M=I.scrollbarSliderActiveBackground;M&&(A+=` .monaco-scrollable-element > .scrollbar > .slider.active { background: ${M}; } `)}return A}}),define(Q[2315],Y([1,0,97,7,67,129,151,832,34,20,14,32,37,6,105,4,18,33,2266,1685]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuBar=void 0;const p=y.$;var c;(function(n){n[n.HIDDEN=0]="HIDDEN",n[n.VISIBLE=1]="VISIBLE",n[n.FOCUSED=2]="FOCUSED",n[n.OPEN=3]="OPEN"})(c||(c={}));class l extends s.Disposable{static{this.OVERFLOW_INDEX=-1}constructor(g,w,E){super(),this.container=g,this.options=w,this.menuStyle=E,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"),this.isCompact&&this.container.classList.add("compact"),this.menus=[],this.mnemonics=new Map,this._focusState=c.VISIBLE,this._onVisibilityChange=this._register(new r.Emitter),this._onFocusStateChange=this._register(new r.Emitter),this.createOverflowMenu(),this.menuUpdater=this._register(new S.RunOnceScheduler(()=>this.update(),200)),this.actionRunner=this.options.actionRunner??this._register(new v.ActionRunner),this._register(this.actionRunner.onWillRun(()=>{this.setUnfocusedState()})),this._register(y.ModifierKeyEmitter.getInstance().event(this.onModifierKeyToggled,this)),this._register(y.addDisposableListener(this.container,y.EventType.KEY_DOWN,C=>{const I=new b.StandardKeyboardEvent(C);let _=!0;const A=C.key?C.key.toLocaleLowerCase():"",k=o.isMacintosh&&!this.isCompact;if(I.equals(15)||k&&I.equals(1026))this.focusPrevious();else if(I.equals(17)||k&&I.equals(2))this.focusNext();else if(I.equals(9)&&this.isFocused&&!this.isOpen)this.setUnfocusedState();else if(!this.isOpen&&!I.ctrlKey&&this.options.enableMnemonics&&this.mnemonicsInUse&&this.mnemonics.has(A)){const L=this.mnemonics.get(A);this.onMenuTriggered(L,!1)}else _=!1;!this.isCompact&&(I.equals(1026)||I.equals(2))&&I.preventDefault(),_&&(I.preventDefault(),I.stopPropagation())})),this._register(y.addDisposableListener(window,y.EventType.MOUSE_DOWN,()=>{this.isFocused&&this.setUnfocusedState()})),this._register(y.addDisposableListener(this.container,y.EventType.FOCUS_IN,C=>{const I=C;I.relatedTarget&&(this.container.contains(I.relatedTarget)||(this.focusToReturn=I.relatedTarget))})),this._register(y.addDisposableListener(this.container,y.EventType.FOCUS_OUT,C=>{const I=C;I.relatedTarget?I.relatedTarget&&!this.container.contains(I.relatedTarget)&&(this.focusToReturn=void 0,this.setUnfocusedState()):this.setUnfocusedState()})),this._register(y.addDisposableListener(window,y.EventType.KEY_DOWN,C=>{if(!this.options.enableMnemonics||!C.altKey||C.ctrlKey||C.defaultPrevented)return;const I=C.key.toLocaleLowerCase();if(!this.mnemonics.has(I))return;this.mnemonicsInUse=!0,this.updateMnemonicVisibility(!0);const _=this.mnemonics.get(I);this.onMenuTriggered(_,!1)})),this.setUnfocusedState()}push(g){(0,m.asArray)(g).forEach(E=>{const C=this.menus.length,I=(0,f.cleanMnemonic)(E.label),_=f.MENU_MNEMONIC_REGEX.exec(E.label);if(_){const A=_[1]?_[1]:_[3];this.registerMnemonic(this.menus.length,A)}if(this.isCompact)this.menus.push(E);else{const A=p("div.menubar-menu-button",{role:"menuitem",tabindex:-1,"aria-label":I,"aria-haspopup":!0}),k=p("div.menubar-menu-title",{role:"none","aria-hidden":!0});A.appendChild(k),this.container.insertBefore(A,this.overflowMenu.buttonElement),this.updateLabels(k,A,E.label),this._register(y.addDisposableListener(A,y.EventType.KEY_UP,L=>{const R=new b.StandardKeyboardEvent(L);let M=!0;(R.equals(18)||R.equals(3))&&!this.isOpen?(this.focusedMenu={index:C},this.openedViaKeyboard=!0,this.focusState=c.OPEN):M=!1,M&&(R.preventDefault(),R.stopPropagation())})),this._register(T.Gesture.addTarget(A)),this._register(y.addDisposableListener(A,T.EventType.Tap,L=>{this.isOpen&&this.focusedMenu&&this.focusedMenu.holder&&y.isAncestor(L.initialTarget,this.focusedMenu.holder)||(this.ignoreNextMouseUp=!1,this.onMenuTriggered(C,!0),L.preventDefault(),L.stopPropagation())})),this._register(y.addDisposableListener(A,y.EventType.MOUSE_DOWN,L=>{if(!new D.StandardMouseEvent(L).leftButton){L.preventDefault();return}this.isOpen?this.ignoreNextMouseUp=!1:(this.ignoreNextMouseUp=!0,this.onMenuTriggered(C,!0)),L.preventDefault(),L.stopPropagation()})),this._register(y.addDisposableListener(A,y.EventType.MOUSE_UP,L=>{L.defaultPrevented||(this.ignoreNextMouseUp?this.ignoreNextMouseUp=!1:this.isFocused&&this.onMenuTriggered(C,!0))})),this._register(y.addDisposableListener(A,y.EventType.MOUSE_ENTER,()=>{this.isOpen&&!this.isCurrentMenu(C)?(A.focus(),this.cleanupCustomMenu(),this.showCustomMenu(C,!1)):this.isFocused&&!this.isOpen&&(this.focusedMenu={index:C},A.focus())})),this.menus.push({label:E.label,actions:E.actions,buttonElement:A,titleElement:k})}})}createOverflowMenu(){const g=this.isCompact?d.localize(0,null):d.localize(1,null),w=p("div.menubar-menu-button",{role:"menuitem",tabindex:this.isCompact?0:-1,"aria-label":g,"aria-haspopup":!0}),E=p("div.menubar-menu-title.toolbar-toggle-more"+a.ThemeIcon.asCSSSelector(h.Codicon.menuBarMore),{role:"none","aria-hidden":!0});w.appendChild(E),this.container.appendChild(w),w.style.visibility="hidden",this._register(y.addDisposableListener(w,y.EventType.KEY_UP,C=>{const I=new b.StandardKeyboardEvent(C);let _=!0;const A=[3];this.isCompact?(A.push(10),this.options.compactMode===f.Direction.Right?A.push(17):this.options.compactMode===f.Direction.Left&&A.push(15)):A.push(18),A.some(k=>I.equals(k))&&!this.isOpen?(this.focusedMenu={index:l.OVERFLOW_INDEX},this.openedViaKeyboard=!0,this.focusState=c.OPEN):_=!1,_&&(I.preventDefault(),I.stopPropagation())})),this._register(T.Gesture.addTarget(w)),this._register(y.addDisposableListener(w,T.EventType.Tap,C=>{this.isOpen&&this.focusedMenu&&this.focusedMenu.holder&&y.isAncestor(C.initialTarget,this.focusedMenu.holder)||(this.ignoreNextMouseUp=!1,this.onMenuTriggered(l.OVERFLOW_INDEX,!0),C.preventDefault(),C.stopPropagation())})),this._register(y.addDisposableListener(w,y.EventType.MOUSE_DOWN,C=>{if(!new D.StandardMouseEvent(C).leftButton){C.preventDefault();return}this.isOpen?this.ignoreNextMouseUp=!1:(this.ignoreNextMouseUp=!0,this.onMenuTriggered(l.OVERFLOW_INDEX,!0)),C.preventDefault(),C.stopPropagation()})),this._register(y.addDisposableListener(w,y.EventType.MOUSE_UP,C=>{C.defaultPrevented||(this.ignoreNextMouseUp?this.ignoreNextMouseUp=!1:this.isFocused&&this.onMenuTriggered(l.OVERFLOW_INDEX,!0))})),this._register(y.addDisposableListener(w,y.EventType.MOUSE_ENTER,()=>{this.isOpen&&!this.isCurrentMenu(l.OVERFLOW_INDEX)?(this.overflowMenu.buttonElement.focus(),this.cleanupCustomMenu(),this.showCustomMenu(l.OVERFLOW_INDEX,!1)):this.isFocused&&!this.isOpen&&(this.focusedMenu={index:l.OVERFLOW_INDEX},w.focus())})),this.overflowMenu={buttonElement:w,titleElement:E,label:"More",actions:[]}}updateMenu(g){const w=this.menus.filter(E=>E.label===g.label);w&&w.length&&(w[0].actions=g.actions)}dispose(){super.dispose(),this.menus.forEach(g=>{g.titleElement?.remove(),g.buttonElement?.remove()}),this.overflowMenu.titleElement.remove(),this.overflowMenu.buttonElement.remove(),(0,s.dispose)(this.overflowLayoutScheduled),this.overflowLayoutScheduled=void 0}blur(){this.setUnfocusedState()}getWidth(){if(!this.isCompact&&this.menus){const g=this.menus[0].buttonElement.getBoundingClientRect().left;return(this.hasOverflow?this.overflowMenu.buttonElement.getBoundingClientRect().right:this.menus[this.menus.length-1].buttonElement.getBoundingClientRect().right)-g}return 0}getHeight(){return this.container.clientHeight}toggleFocus(){!this.isFocused&&this.options.visibility!=="hidden"?(this.mnemonicsInUse=!0,this.focusedMenu={index:this.numMenusShown>0?0:l.OVERFLOW_INDEX},this.focusState=c.FOCUSED):this.isOpen||this.setUnfocusedState()}updateOverflowAction(){if(!this.menus||!this.menus.length)return;const g="overflow-menu-only";this.container.classList.toggle(g,!1);const w=this.container.offsetWidth;let E=0,C=this.isCompact;const I=this.numMenusShown;this.numMenusShown=0;const _=this.menus.filter(A=>A.buttonElement!==void 0&&A.titleElement!==void 0);for(const A of _){if(!C){const k=A.buttonElement.offsetWidth;E+k>w?C=!0:(E+=k,this.numMenusShown++,this.numMenusShown>I&&(A.buttonElement.style.visibility="visible"))}C&&(A.buttonElement.style.visibility="hidden")}if(this.numMenusShown-1<=_.length/2){for(const A of _)A.buttonElement.style.visibility="hidden";C=!0,this.numMenusShown=0,E=0}if(this.isCompact){this.overflowMenu.actions=[];for(let k=this.numMenusShown;k<this.menus.length;k++)this.overflowMenu.actions.push(new v.SubmenuAction(`menubar.submenu.${this.menus[k].label}`,this.menus[k].label,this.menus[k].actions||[]));const A=this.options.getCompactMenuActions?.();A&&A.length&&(this.overflowMenu.actions.push(new v.Separator),this.overflowMenu.actions.push(...A)),this.overflowMenu.buttonElement.style.visibility="visible"}else if(C){for(;E+this.overflowMenu.buttonElement.offsetWidth>w&&this.numMenusShown>0;){this.numMenusShown--;const A=_[this.numMenusShown].buttonElement.offsetWidth;_[this.numMenusShown].buttonElement.style.visibility="hidden",E-=A}this.overflowMenu.actions=[];for(let A=this.numMenusShown;A<_.length;A++)this.overflowMenu.actions.push(new v.SubmenuAction(`menubar.submenu.${_[A].label}`,_[A].label,_[A].actions||[]));this.overflowMenu.buttonElement.nextElementSibling!==_[this.numMenusShown].buttonElement&&(this.overflowMenu.buttonElement.remove(),this.container.insertBefore(this.overflowMenu.buttonElement,_[this.numMenusShown].buttonElement)),this.overflowMenu.buttonElement.style.visibility="visible"}else this.overflowMenu.buttonElement.remove(),this.container.appendChild(this.overflowMenu.buttonElement),this.overflowMenu.buttonElement.style.visibility="hidden";this.container.classList.toggle(g,this.numMenusShown===0)}updateLabels(g,w,E){const C=(0,f.cleanMnemonic)(E);if(this.options.enableMnemonics){const _=u.escape(E);f.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let A=f.MENU_ESCAPED_MNEMONIC_REGEX.exec(_);for(;A&&A[1];)A=f.MENU_ESCAPED_MNEMONIC_REGEX.exec(_);const k=L=>L.replace(/&&/g,"&");A?(g.innerText="",g.append(u.ltrim(k(_.substr(0,A.index))," "),p("mnemonic",{"aria-hidden":"true"},A[3]),u.rtrim(k(_.substr(A.index+A[0].length))," "))):g.innerText=k(_).trim()}else g.innerText=C.replace(/&&/g,"&");const I=f.MENU_MNEMONIC_REGEX.exec(E);if(I){const _=I[1]?I[1]:I[3];this.options.enableMnemonics?w.setAttribute("aria-keyshortcuts","Alt+"+_.toLocaleLowerCase()):w.removeAttribute("aria-keyshortcuts")}}update(g){if(g&&(this.options=g),this.isFocused){this.updatePending=!0;return}this.menus.forEach(w=>{!w.buttonElement||!w.titleElement||this.updateLabels(w.titleElement,w.buttonElement,w.label)}),this.overflowLayoutScheduled||(this.overflowLayoutScheduled=y.scheduleAtNextAnimationFrame(()=>{this.updateOverflowAction(),this.overflowLayoutScheduled=void 0})),this.setUnfocusedState()}registerMnemonic(g,w){this.mnemonics.set(w.toLocaleLowerCase(),g)}hideMenubar(){this.container.style.display!=="none"&&(this.container.style.display="none",this._onVisibilityChange.fire(!1))}showMenubar(){this.container.style.display!=="flex"&&(this.container.style.display="flex",this._onVisibilityChange.fire(!0),this.updateOverflowAction())}get focusState(){return this._focusState}set focusState(g){if(this._focusState>=c.FOCUSED&&g<c.FOCUSED&&this.updatePending&&(this.menuUpdater.schedule(),this.updatePending=!1),g===this._focusState)return;const w=this.isVisible,E=this.isOpen,C=this.isFocused;switch(this._focusState=g,g){case c.HIDDEN:w&&this.hideMenubar(),E&&this.cleanupCustomMenu(),C&&(this.focusedMenu=void 0,this.focusToReturn&&(this.focusToReturn.focus(),this.focusToReturn=void 0));break;case c.VISIBLE:w||this.showMenubar(),E&&this.cleanupCustomMenu(),C&&(this.focusedMenu&&(this.focusedMenu.index===l.OVERFLOW_INDEX?this.overflowMenu.buttonElement.blur():this.menus[this.focusedMenu.index].buttonElement?.blur()),this.focusedMenu=void 0,this.focusToReturn&&(this.focusToReturn.focus(),this.focusToReturn=void 0));break;case c.FOCUSED:w||this.showMenubar(),E&&this.cleanupCustomMenu(),this.focusedMenu&&(this.focusedMenu.index===l.OVERFLOW_INDEX?this.overflowMenu.buttonElement.focus():this.menus[this.focusedMenu.index].buttonElement?.focus());break;case c.OPEN:w||this.showMenubar(),this.focusedMenu&&this.showCustomMenu(this.focusedMenu.index,this.openedViaKeyboard);break}this._focusState=g,this._onFocusStateChange.fire(this.focusState>=c.FOCUSED)}get isVisible(){return this.focusState>=c.VISIBLE}get isFocused(){return this.focusState>=c.FOCUSED}get isOpen(){return this.focusState>=c.OPEN}get hasOverflow(){return this.isCompact||this.numMenusShown<this.menus.length}get isCompact(){return this.options.compactMode!==void 0}setUnfocusedState(){this.options.visibility==="toggle"||this.options.visibility==="hidden"?this.focusState=c.HIDDEN:this.options.visibility==="classic"&&t.isFullscreen()?this.focusState=c.HIDDEN:this.focusState=c.VISIBLE,this.ignoreNextMouseUp=!1,this.mnemonicsInUse=!1,this.updateMnemonicVisibility(!1)}focusPrevious(){if(!this.focusedMenu||this.numMenusShown===0)return;let g=(this.focusedMenu.index-1+this.numMenusShown)%this.numMenusShown;this.focusedMenu.index===l.OVERFLOW_INDEX?g=this.numMenusShown-1:this.focusedMenu.index===0&&this.hasOverflow&&(g=l.OVERFLOW_INDEX),g!==this.focusedMenu.index&&(this.isOpen?(this.cleanupCustomMenu(),this.showCustomMenu(g)):this.isFocused&&(this.focusedMenu.index=g,g===l.OVERFLOW_INDEX?this.overflowMenu.buttonElement.focus():this.menus[g].buttonElement?.focus()))}focusNext(){if(!this.focusedMenu||this.numMenusShown===0)return;let g=(this.focusedMenu.index+1)%this.numMenusShown;this.focusedMenu.index===l.OVERFLOW_INDEX?g=0:this.focusedMenu.index===this.numMenusShown-1&&(g=l.OVERFLOW_INDEX),g!==this.focusedMenu.index&&(this.isOpen?(this.cleanupCustomMenu(),this.showCustomMenu(g)):this.isFocused&&(this.focusedMenu.index=g,g===l.OVERFLOW_INDEX?this.overflowMenu.buttonElement.focus():this.menus[g].buttonElement?.focus()))}updateMnemonicVisibility(g){this.menus&&this.menus.forEach(w=>{if(w.titleElement&&w.titleElement.children.length){const E=w.titleElement.children.item(0);E&&(E.style.textDecoration=this.options.alwaysOnMnemonics||g?"underline":"")}})}get mnemonicsInUse(){return this._mnemonicsInUse}set mnemonicsInUse(g){this._mnemonicsInUse=g}get shouldAltKeyFocus(){return o.isMacintosh?!1:!this.options.disableAltFocus||this.options.visibility==="toggle"}get onVisibilityChange(){return this._onVisibilityChange.event}get onFocusStateChange(){return this._onFocusStateChange.event}onMenuTriggered(g,w){this.isOpen?this.isCurrentMenu(g)?this.setUnfocusedState():(this.cleanupCustomMenu(),this.showCustomMenu(g,this.openedViaKeyboard)):(this.focusedMenu={index:g},this.openedViaKeyboard=!w,this.focusState=c.OPEN)}onModifierKeyToggled(g){const w=!g.altKey&&!g.ctrlKey&&!g.shiftKey&&!g.metaKey;this.options.visibility!=="hidden"&&(g.event&&this.shouldAltKeyFocus&&i.ScanCodeUtils.toEnum(g.event.code)===159&&g.event.preventDefault(),this.isFocused&&g.lastKeyPressed==="alt"&&g.altKey&&(this.setUnfocusedState(),this.mnemonicsInUse=!1,this.awaitingAltRelease=!0),w&&g.lastKeyPressed==="alt"&&g.lastKeyReleased==="alt"&&(this.awaitingAltRelease||(!this.isFocused&&this.shouldAltKeyFocus?(this.mnemonicsInUse=!0,this.focusedMenu={index:this.numMenusShown>0?0:l.OVERFLOW_INDEX},this.focusState=c.FOCUSED):this.isOpen||this.setUnfocusedState())),!g.altKey&&g.lastKeyReleased==="alt"&&(this.awaitingAltRelease=!1),this.options.enableMnemonics&&this.menus&&!this.isOpen&&this.updateMnemonicVisibility(!this.awaitingAltRelease&&g.altKey||this.mnemonicsInUse))}isCurrentMenu(g){return this.focusedMenu?this.focusedMenu.index===g:!1}cleanupCustomMenu(){this.focusedMenu&&(this.focusedMenu.index===l.OVERFLOW_INDEX?this.overflowMenu.buttonElement.focus():this.menus[this.focusedMenu.index].buttonElement?.focus(),this.focusedMenu.holder&&(this.focusedMenu.holder.parentElement?.classList.remove("open"),this.focusedMenu.holder.remove()),this.focusedMenu.widget?.dispose(),this.focusedMenu={index:this.focusedMenu.index})}showCustomMenu(g,w=!0){const E=g>=this.numMenusShown?l.OVERFLOW_INDEX:g,C=E===l.OVERFLOW_INDEX?this.overflowMenu:this.menus[E];if(!C.actions||!C.buttonElement||!C.titleElement)return;const I=p("div.menubar-menu-items-holder",{title:""});C.buttonElement.classList.add("open");const _=C.titleElement.getBoundingClientRect(),A=y.getDomNodeZoomLevel(C.titleElement);this.options.compactMode===f.Direction.Right?(I.style.top=`${_.top}px`,I.style.left=`${_.left+this.container.clientWidth}px`):this.options.compactMode===f.Direction.Left?(I.style.top=`${_.top}px`,I.style.right=`${this.container.clientWidth}px`,I.style.left="auto"):(I.style.top=`${_.bottom*A}px`,I.style.left=`${_.left*A}px`),C.buttonElement.appendChild(I);const k={getKeyBinding:this.options.getKeybinding,actionRunner:this.actionRunner,enableMnemonics:this.options.alwaysOnMnemonics||this.mnemonicsInUse&&this.options.enableMnemonics,ariaLabel:C.buttonElement.getAttribute("aria-label")??void 0,expandDirection:this.isCompact?this.options.compactMode:f.Direction.Right,useEventAsContext:!0},L=this._register(new f.Menu(I,C.actions,k,this.menuStyle));this._register(L.onDidCancel(()=>{this.focusState=c.FOCUSED})),E!==g?L.trigger(g-this.numMenusShown):L.focus(w),this.focusedMenu={index:E,holder:I,widget:L}}}e.MenuBar=l}),define(Q[273],Y([1,0,157,142,32,37,6,1695]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Checkbox=e.Toggle=e.ToggleActionViewItem=e.unthemedToggleStyles=void 0,e.unthemedToggleStyles={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class f extends t.BaseActionViewItem{constructor(h,a,r){super(h,a,r),this.toggle=this._register(new v({actionClassName:this._action.class,isChecked:!!this._action.checked,title:this.options.keybinding?`${this._action.label} (${this.options.keybinding})`:this._action.label,notFocusable:!0,inputActiveOptionBackground:r.toggleStyles?.inputActiveOptionBackground,inputActiveOptionBorder:r.toggleStyles?.inputActiveOptionBorder,inputActiveOptionForeground:r.toggleStyles?.inputActiveOptionForeground})),this._register(this.toggle.onChange(()=>this._action.checked=!!this.toggle&&this.toggle.checked))}render(h){this.element=h,this.element.appendChild(this.toggle.domNode)}updateEnabled(){this.toggle&&(this.isEnabled()?this.toggle.enable():this.toggle.disable())}updateChecked(){this.toggle.checked=!!this._action.checked}focus(){this.toggle.domNode.tabIndex=0,this.toggle.focus()}blur(){this.toggle.domNode.tabIndex=-1,this.toggle.domNode.blur()}setFocusable(h){this.toggle.domNode.tabIndex=h?0:-1}}e.ToggleActionViewItem=f;class v extends y.Widget{constructor(h){super(),this._onChange=this._register(new T.Emitter),this.onChange=this._onChange.event,this._onKeyDown=this._register(new T.Emitter),this.onKeyDown=this._onKeyDown.event,this._opts=h,this._checked=this._opts.isChecked;const a=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,a.push(...D.ThemeIcon.asClassNameArray(this._icon))),this._opts.actionClassName&&a.push(...this._opts.actionClassName.split(" ")),this._checked&&a.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...a),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,r=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),r.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,r=>{if(r.keyCode===10||r.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),r.preventDefault(),r.stopPropagation();return}this._onKeyDown.fire(r)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(h){this._checked=h,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}setIcon(h){this._icon&&this.domNode.classList.remove(...D.ThemeIcon.asClassNameArray(this._icon)),this._icon=h,this._icon&&this.domNode.classList.add(...D.ThemeIcon.asClassNameArray(this._icon))}width(){return 2+2+2+16}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}setTitle(h){this.domNode.title=h,this.domNode.setAttribute("aria-label",h)}}e.Toggle=v;class m extends y.Widget{constructor(h,a,r){super(),this.title=h,this.isChecked=a,this.checkbox=new v({title:this.title,isChecked:this.isChecked,icon:b.Codicon.check,actionClassName:"monaco-checkbox",...e.unthemedToggleStyles}),this.domNode=this.checkbox.domNode,this.styles=r,this.applyStyles(),this._register(this.checkbox.onChange(()=>this.applyStyles()))}get checked(){return this.checkbox.checked}set checked(h){this.checkbox.checked=h,this.applyStyles()}focus(){this.domNode.focus()}hasFocus(){return this.domNode===document.activeElement}applyStyles(){this.domNode.style.color=this.styles.checkboxForeground||"",this.domNode.style.backgroundColor=this.styles.checkboxBackground||"",this.domNode.style.borderColor=this.styles.checkboxBorder||""}}e.Checkbox=m}),define(Q[1125],Y([1,0,273,32,2260]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegexToggle=e.WholeWordsToggle=e.CaseSensitiveToggle=void 0;const D=b.localize(0,null),T=b.localize(1,null),f=b.localize(2,null);class v extends t.Toggle{constructor(a){super({icon:y.Codicon.caseSensitive,title:D+a.appendTitle,isChecked:a.isChecked,inputActiveOptionBorder:a.inputActiveOptionBorder,inputActiveOptionForeground:a.inputActiveOptionForeground,inputActiveOptionBackground:a.inputActiveOptionBackground})}}e.CaseSensitiveToggle=v;class m extends t.Toggle{constructor(a){super({icon:y.Codicon.wholeWord,title:T+a.appendTitle,isChecked:a.isChecked,inputActiveOptionBorder:a.inputActiveOptionBorder,inputActiveOptionForeground:a.inputActiveOptionForeground,inputActiveOptionBackground:a.inputActiveOptionBackground})}}e.WholeWordsToggle=m;class S extends t.Toggle{constructor(a){super({icon:y.Codicon.regex,title:f+a.appendTitle,isChecked:a.isChecked,inputActiveOptionBorder:a.inputActiveOptionBorder,inputActiveOptionForeground:a.inputActiveOptionForeground,inputActiveOptionBackground:a.inputActiveOptionBackground})}}e.RegexToggle=S}),define(Q[498],Y([1,0,7,1125,249,142,6,2259,4,1055]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindInput=void 0;const m=f.localize(0,null);class S extends D.Widget{static{this.OPTION_CHANGE="optionChange"}constructor(a,r,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=new v.DisposableStore,this.additionalToggles=[],this._onDidOptionChange=this._register(new T.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new T.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new T.Emitter),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new T.Emitter),this.onInput=this._onInput.event,this._onKeyUp=this._register(new T.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCaseSensitiveKeyDown=this._register(new T.Emitter),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new T.Emitter),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||m,this.showCommonFindToggles=!!i.showCommonFindToggles;const s=i.appendCaseSensitiveLabel||"",o=i.appendWholeWordsLabel||"",u=i.appendRegexLabel||"",d=i.history||[],p=!!i.flexibleHeight,c=!!i.flexibleWidth,l=i.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new b.HistoryInputBox(this.domNode,r,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:d,showHistoryHint:i.showHistoryHint,flexibleHeight:p,flexibleWidth:c,flexibleMaxHeight:l,inputBoxStyles:i.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new y.RegexToggle({appendTitle:u,isChecked:!1,...i.toggleStyles})),this._register(this.regex.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(g=>{this._onRegexKeyDown.fire(g)})),this.wholeWords=this._register(new y.WholeWordsToggle({appendTitle:o,isChecked:!1,...i.toggleStyles})),this._register(this.wholeWords.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new y.CaseSensitiveToggle({appendTitle:s,isChecked:!1,...i.toggleStyles})),this._register(this.caseSensitive.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(g=>{this._onCaseSensitiveKeyDown.fire(g)}));const n=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,g=>{if(g.equals(15)||g.equals(17)||g.equals(9)){const w=n.indexOf(document.activeElement);if(w>=0){let E=-1;g.equals(17)?E=(w+1)%n.length:g.equals(15)&&(w===0?E=n.length-1:E=w-1),g.equals(9)?(n[w].blur(),this.inputBox.focus()):E>=0&&n[E].focus(),t.EventHelper.stop(g,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(i?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),a?.appendChild(this.domNode),this._register(t.addDisposableListener(this.inputBox.inputElement,"compositionstart",n=>{this.imeSessionInProgress=!0})),this._register(t.addDisposableListener(this.inputBox.inputElement,"compositionend",n=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,n=>this._onKeyDown.fire(n)),this.onkeyup(this.inputBox.inputElement,n=>this._onKeyUp.fire(n)),this.oninput(this.inputBox.inputElement,n=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,n=>this._onMouseDown.fire(n))}get isImeSessionInProgress(){return this.imeSessionInProgress}get onDidChange(){return this.inputBox.onDidChange}layout(a){this.inputBox.layout(),this.updateInputBoxPadding(a.collapsedFindWidget)}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex?.enable(),this.wholeWords?.enable(),this.caseSensitive?.enable();for(const a of this.additionalToggles)a.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex?.disable(),this.wholeWords?.disable(),this.caseSensitive?.disable();for(const a of this.additionalToggles)a.disable()}setFocusInputOnOptionClick(a){this.fixFocusOnOptionClickEnabled=a}setEnabled(a){a?this.enable():this.disable()}setAdditionalToggles(a){for(const r of this.additionalToggles)r.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.dispose(),this.additionalTogglesDisposables=new v.DisposableStore;for(const r of a??[])this.additionalTogglesDisposables.add(r),this.controls.appendChild(r.domNode),this.additionalTogglesDisposables.add(r.onChange(i=>{this._onDidOptionChange.fire(i),!i&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(r);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(a=!1){a?this.inputBox.paddingRight=0:this.inputBox.paddingRight=(this.caseSensitive?.width()??0)+(this.wholeWords?.width()??0)+(this.regex?.width()??0)+this.additionalToggles.reduce((r,i)=>r+i.width(),0)}clear(){this.clearValidation(),this.setValue(""),this.focus()}getValue(){return this.inputBox.value}setValue(a){this.inputBox.value!==a&&(this.inputBox.value=a)}onSearchSubmit(){this.inputBox.addToHistory()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive?.checked??!1}setCaseSensitive(a){this.caseSensitive&&(this.caseSensitive.checked=a)}getWholeWords(){return this.wholeWords?.checked??!1}setWholeWords(a){this.wholeWords&&(this.wholeWords.checked=a)}getRegex(){return this.regex?.checked??!1}setRegex(a){this.regex&&(this.regex.checked=a,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(a){this.inputBox.showMessage(a)}clearMessage(){this.inputBox.hideMessage()}clearValidation(){this.inputBox.hideMessage()}}e.FindInput=S}),define(Q[2316],Y([1,0,7,273,249,142,32,6,2261,1055]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceInput=void 0;const m=v.localize(0,null),S=v.localize(1,null);class h extends y.Toggle{constructor(i){super({icon:T.Codicon.preserveCase,title:S+i.appendTitle,isChecked:i.isChecked,inputActiveOptionBorder:i.inputActiveOptionBorder,inputActiveOptionForeground:i.inputActiveOptionForeground,inputActiveOptionBackground:i.inputActiveOptionBackground})}}class a extends D.Widget{static{this.OPTION_CHANGE="optionChange"}constructor(i,s,o,u){super(),this._showOptionButtons=o,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new f.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new f.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new f.Emitter),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new f.Emitter),this.onInput=this._onInput.event,this._onKeyUp=this._register(new f.Emitter),this.onKeyUp=this._onKeyUp.event,this._onPreserveCaseKeyDown=this._register(new f.Emitter),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=s,this.placeholder=u.placeholder||"",this.validation=u.validation,this.label=u.label||m;const d=u.appendPreserveCaseLabel||"",p=u.history||[],c=!!u.flexibleHeight,l=!!u.flexibleWidth,n=u.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new b.HistoryInputBox(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:p,showHistoryHint:u.showHistoryHint,flexibleHeight:c,flexibleWidth:l,flexibleMaxHeight:n,inputBoxStyles:u.inputBoxStyles})),this.preserveCase=this._register(new h({appendTitle:d,isChecked:!1,...u.toggleStyles})),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;const g=[this.preserveCase.domNode];this.onkeydown(this.domNode,E=>{if(E.equals(15)||E.equals(17)||E.equals(9)){const C=g.indexOf(document.activeElement);if(C>=0){let I=-1;E.equals(17)?I=(C+1)%g.length:E.equals(15)&&(C===0?I=g.length-1:I=C-1),E.equals(9)?(g[C].blur(),this.inputBox.focus()):I>=0&&g[I].focus(),t.EventHelper.stop(E,!0)}}});const w=document.createElement("div");w.className="controls",w.style.display=this._showOptionButtons?"block":"none",w.appendChild(this.preserveCase.domNode),this.domNode.appendChild(w),i?.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(i){this.fixFocusOnOptionClickEnabled=i}setEnabled(i){i?this.enable():this.disable()}clear(){this.clearValidation(),this.setValue(""),this.focus()}getValue(){return this.inputBox.value}setValue(i){this.inputBox.value!==i&&(this.inputBox.value=i)}onSearchSubmit(){this.inputBox.addToHistory()}applyStyles(){}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(i){this.preserveCase.checked=i}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?.validate()}showMessage(i){this.inputBox?.showMessage(i)}clearMessage(){this.inputBox?.hideMessage()}clearValidation(){this.inputBox?.hideMessage()}set width(i){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=i+"px"}dispose(){super.dispose()}}e.ReplaceInput=a}),define(Q[344],Y([1,0,85,325,34,32,37,6,4,2269,1696]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMenuAction=e.ToolBar=void 0;class S extends v.Disposable{constructor(r,i,s={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new f.EventMultiplexer),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new v.DisposableStore),this.options=s,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new h(()=>this.toggleMenuActionViewItem?.show(),s.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",r.appendChild(this.element),this.actionBar=this._register(new t.ActionBar(this.element,{orientation:s.orientation,ariaLabel:s.ariaLabel,actionRunner:s.actionRunner,allowContextMenu:s.allowContextMenu,highlightToggledItems:s.highlightToggledItems,actionViewItemProvider:(o,u)=>{if(o.id===h.ID)return this.toggleMenuActionViewItem=new y.DropdownMenuActionViewItem(o,o.menuActions,i,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:T.ThemeIcon.asClassNameArray(s.moreIcon??D.Codicon.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(s.actionViewItemProvider){const d=s.actionViewItemProvider(o,u);if(d)return d}if(o instanceof b.SubmenuAction){const d=new y.DropdownMenuActionViewItem(o,o.actions,i,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:o.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return d.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(d),this.disposables.add(this._onDidChangeDropdownVisibility.add(d.onDidChangeVisibility)),d}}}))}set actionRunner(r){this.actionBar.actionRunner=r}get actionRunner(){return this.actionBar.actionRunner}set context(r){this.actionBar.context=r,this.toggleMenuActionViewItem?.setActionContext(r);for(const i of this.submenuActionViewItems)i.setActionContext(r)}getElement(){return this.element}focus(){this.actionBar.focus()}getItemsWidth(){let r=0;for(let i=0;i<this.actionBar.length();i++)r+=this.actionBar.getWidth(i);return r}getItemAction(r){return this.actionBar.getAction(r)}getItemWidth(r){return this.actionBar.getWidth(r)}getItemsLength(){return this.actionBar.length()}setAriaLabel(r){this.actionBar.setAriaLabel(r)}setActions(r,i){this.clear();const s=r?r.slice(0):[];this.hasSecondaryActions=!!(i&&i.length>0),this.hasSecondaryActions&&i&&(this.toggleMenuAction.menuActions=i.slice(0),s.push(this.toggleMenuAction)),s.forEach(o=>{this.actionBar.push(o,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(o)})})}isEmpty(){return this.actionBar.isEmpty()}getKeybindingLabel(r){return(this.lookupKeybindings?this.options.getKeyBinding?.(r):void 0)?.getLabel()??void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}e.ToolBar=S;class h extends b.Action{static{this.ID="toolbar.toggle.more"}constructor(r,i){i=i||m.localize(0,null),super(h.ID,i,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=r}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(r){this._menuActions=r}}e.ToggleMenuAction=h}),define(Q[404],Y([1,0,7,227,67,85,498,249,401,179,273,823,299,34,20,14,32,37,141,6,128,4,226,17,2270,1697]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTree=e.TreeFindMatchType=e.TreeFindMode=e.FuzzyToggle=e.ModeToggle=e.RenderIndentGuides=e.AbstractTreeViewState=e.ComposedTreeDelegate=void 0;class E extends v.ElementsDragAndDropData{set context(X){this.data.context=X}get context(){return this.data.context}constructor(X){super(X.elements.map(te=>te.element)),this.data=X}}function C(ee){return ee instanceof v.ElementsDragAndDropData?new E(ee):ee}class I{constructor(X,te){this.modelProvider=X,this.dnd=te,this.autoExpandDisposable=l.Disposable.None}getDragURI(X){return this.dnd.getDragURI(X.element)}getDragLabel(X,te){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(X.map(Z=>Z.element),te)}onDragStart(X,te){this.dnd.onDragStart?.(C(X),te)}onDragOver(X,te,Z,se,re=!0){const oe=this.dnd.onDragOver(C(X),te&&te.element,Z,se),le=this.autoExpandNode!==te;if(le&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=te),typeof te>"u")return oe;if(le&&typeof oe!="boolean"&&oe.autoExpand&&(this.autoExpandDisposable=(0,s.disposableTimeout)(()=>{const de=this.modelProvider(),ge=de.getNodeLocation(te);de.isCollapsed(ge)&&de.setCollapsed(ge,!1),this.autoExpandNode=void 0},500)),typeof oe=="boolean"||!oe.accept||typeof oe.bubble>"u"||oe.feedback){if(!re){const de=typeof oe=="boolean"?oe:oe.accept,ge=typeof oe=="boolean"?void 0:oe.effect;return{accept:de,effect:ge,feedback:[Z]}}return oe}if(oe.bubble===1){const de=this.modelProvider(),ge=de.getNodeLocation(te),he=de.getParentNodeLocation(ge),be=de.getNode(he),ve=he&&de.getListIndex(he);return this.onDragOver(X,be,ve,se,!1)}const ne=this.modelProvider(),ce=ne.getNodeLocation(te),ae=ne.getListIndex(ce),ue=ne.getListRenderCount(ce);return{...oe,feedback:(0,i.range)(ae,ae+ue)}}drop(X,te,Z,se){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(C(X),te&&te.element,Z,se)}onDragEnd(X){this.dnd.onDragEnd?.(X)}}function _(ee,X){return X&&{...X,identityProvider:X.identityProvider&&{getId(te){return X.identityProvider.getId(te.element)}},dnd:X.dnd&&new I(ee,X.dnd),multipleSelectionController:X.multipleSelectionController&&{isSelectionSingleChangeEvent(te){return X.multipleSelectionController.isSelectionSingleChangeEvent({...te,element:te.element})},isSelectionRangeChangeEvent(te){return X.multipleSelectionController.isSelectionRangeChangeEvent({...te,element:te.element})}},accessibilityProvider:X.accessibilityProvider&&{...X.accessibilityProvider,getSetSize(te){const Z=ee(),se=Z.getNodeLocation(te),re=Z.getParentNodeLocation(se);return Z.getNode(re).visibleChildrenCount},getPosInSet(te){return te.visibleChildIndex+1},isChecked:X.accessibilityProvider&&X.accessibilityProvider.isChecked?te=>X.accessibilityProvider.isChecked(te.element):void 0,getRole:X.accessibilityProvider&&X.accessibilityProvider.getRole?te=>X.accessibilityProvider.getRole(te.element):()=>"treeitem",getAriaLabel(te){return X.accessibilityProvider.getAriaLabel(te.element)},getWidgetAriaLabel(){return X.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:X.accessibilityProvider&&X.accessibilityProvider.getWidgetRole?()=>X.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:X.accessibilityProvider&&X.accessibilityProvider.getAriaLevel?te=>X.accessibilityProvider.getAriaLevel(te.element):te=>te.depth,getActiveDescendantId:X.accessibilityProvider.getActiveDescendantId&&(te=>X.accessibilityProvider.getActiveDescendantId(te.element))},keyboardNavigationLabelProvider:X.keyboardNavigationLabelProvider&&{...X.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(te){return X.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(te.element)}}}}class A{constructor(X){this.delegate=X}getHeight(X){return this.delegate.getHeight(X.element)}getTemplateId(X){return this.delegate.getTemplateId(X.element)}hasDynamicHeight(X){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(X.element)}setDynamicHeight(X,te){this.delegate.setDynamicHeight?.(X.element,te)}}e.ComposedTreeDelegate=A;class k{static lift(X){return X instanceof k?X:new k(X)}static empty(X=0){return new k({focus:[],selection:[],expanded:Object.create(null),scrollTop:X})}constructor(X){if(this.focus=new Set(X.focus),this.selection=new Set(X.selection),X.expanded instanceof Array){this.expanded=Object.create(null);for(const te of X.expanded)this.expanded[te]=1}else this.expanded=X.expanded;this.expanded=X.expanded,this.scrollTop=X.scrollTop}toJSON(){return{focus:Array.from(this.focus),selection:Array.from(this.selection),expanded:this.expanded,scrollTop:this.scrollTop}}}e.AbstractTreeViewState=k;var L;(function(ee){ee.None="none",ee.OnHover="onHover",ee.Always="always"})(L||(e.RenderIndentGuides=L={}));class R{get elements(){return this._elements}constructor(X,te=[]){this._elements=te,this.disposables=new l.DisposableStore,this.onDidChange=p.Event.forEach(X,Z=>this._elements=Z,this.disposables)}dispose(){this.disposables.dispose()}}class M{static{this.DefaultIndent=8}constructor(X,te,Z,se,re,oe={}){this.renderer=X,this.modelProvider=te,this.activeNodes=se,this.renderedIndentGuides=re,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=M.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=l.Disposable.None,this.disposables=new l.DisposableStore,this.templateId=X.templateId,this.updateOptions(oe),p.Event.map(Z,le=>le.node)(this.onDidChangeNodeTwistieState,this,this.disposables),X.onDidChangeTwistieState?.(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(X={}){if(typeof X.indent<"u"){const te=(0,n.clamp)(X.indent,0,40);if(te!==this.indent){this.indent=te;for(const[Z,se]of this.renderedNodes)this.renderTreeElement(Z,se)}}if(typeof X.renderIndentGuides<"u"){const te=X.renderIndentGuides!==L.None;if(te!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=te;for(const[Z,se]of this.renderedNodes)this._renderIndentGuides(Z,se);if(this.indentGuidesDisposable.dispose(),te){const Z=new l.DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,Z),this.indentGuidesDisposable=Z,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof X.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=X.hideTwistiesOfChildlessElements)}renderTemplate(X){const te=(0,t.append)(X,(0,t.$)(".monaco-tl-row")),Z=(0,t.append)(te,(0,t.$)(".monaco-tl-indent")),se=(0,t.append)(te,(0,t.$)(".monaco-tl-twistie")),re=(0,t.append)(te,(0,t.$)(".monaco-tl-contents")),oe=this.renderer.renderTemplate(re);return{container:X,indent:Z,twistie:se,indentGuidesDisposable:l.Disposable.None,templateData:oe}}renderElement(X,te,Z,se){this.renderedNodes.set(X,Z),this.renderedElements.set(X.element,X),this.renderTreeElement(X,Z),this.renderer.renderElement(X,te,Z.templateData,se)}disposeElement(X,te,Z,se){Z.indentGuidesDisposable.dispose(),this.renderer.disposeElement?.(X,te,Z.templateData,se),typeof se=="number"&&(this.renderedNodes.delete(X),this.renderedElements.delete(X.element))}disposeTemplate(X){this.renderer.disposeTemplate(X.templateData)}onDidChangeTwistieState(X){const te=this.renderedElements.get(X);te&&this.onDidChangeNodeTwistieState(te)}onDidChangeNodeTwistieState(X){const te=this.renderedNodes.get(X);te&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(X,te))}renderTreeElement(X,te){const Z=M.DefaultIndent+(X.depth-1)*this.indent;te.twistie.style.paddingLeft=`${Z}px`,te.indent.style.width=`${Z+this.indent-16}px`,X.collapsible?te.container.setAttribute("aria-expanded",String(!X.collapsed)):te.container.removeAttribute("aria-expanded"),te.twistie.classList.remove(...u.ThemeIcon.asClassNameArray(o.Codicon.treeItemExpanded));let se=!1;this.renderer.renderTwistie&&(se=this.renderer.renderTwistie(X.element,te.twistie)),X.collapsible&&(!this.hideTwistiesOfChildlessElements||X.visibleChildrenCount>0)?(se||te.twistie.classList.add(...u.ThemeIcon.asClassNameArray(o.Codicon.treeItemExpanded)),te.twistie.classList.add("collapsible"),te.twistie.classList.toggle("collapsed",X.collapsed)):te.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(X,te)}_renderIndentGuides(X,te){if((0,t.clearNode)(te.indent),te.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const Z=new l.DisposableStore,se=this.modelProvider();for(;;){const re=se.getNodeLocation(X),oe=se.getParentNodeLocation(re);if(!oe)break;const le=se.getNode(oe),ne=(0,t.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(le)&&ne.classList.add("active"),te.indent.childElementCount===0?te.indent.appendChild(ne):te.indent.insertBefore(ne,te.indent.firstElementChild),this.renderedIndentGuides.add(le,ne),Z.add((0,l.toDisposable)(()=>this.renderedIndentGuides.delete(le,ne))),X=le}te.indentGuidesDisposable=Z}_onDidChangeActiveNodes(X){if(!this.shouldRenderIndentGuides)return;const te=new Set,Z=this.modelProvider();X.forEach(se=>{const re=Z.getNodeLocation(se);try{const oe=Z.getParentNodeLocation(re);se.collapsible&&se.children.length>0&&!se.collapsed?te.add(se):oe&&te.add(Z.getNode(oe))}catch{}}),this.activeIndentNodes.forEach(se=>{te.has(se)||this.renderedIndentGuides.forEach(se,re=>re.classList.remove("active"))}),te.forEach(se=>{this.activeIndentNodes.has(se)||this.renderedIndentGuides.forEach(se,re=>re.classList.add("active"))}),this.activeIndentNodes=te}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,l.dispose)(this.disposables)}}class N{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(X){this._pattern=X,this._lowercasePattern=X.toLowerCase()}constructor(X,te,Z){this.tree=X,this.keyboardNavigationLabelProvider=te,this._filter=Z,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new l.DisposableStore,X.onWillRefilter(this.reset,this,this.disposables)}filter(X,te){let Z=1;if(this._filter){const oe=this._filter.filter(X,te);if(typeof oe=="boolean"?Z=oe?1:0:(0,h.isFilterResult)(oe)?Z=(0,h.getVisibleState)(oe.visibility):Z=oe,Z===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:c.FuzzyScore.Default,visibility:Z};const se=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(X),re=Array.isArray(se)?se:[se];for(const oe of re){const le=oe&&oe.toString();if(typeof le>"u")return{data:c.FuzzyScore.Default,visibility:Z};let ne;if(this.tree.findMatchType===W.Contiguous){const ce=le.toLowerCase().indexOf(this._lowercasePattern);if(ce>-1){ne=[Number.MAX_SAFE_INTEGER,0];for(let ae=this._lowercasePattern.length;ae>0;ae--)ne.push(ce+ae-1)}}else ne=(0,c.fuzzyScore)(this._pattern,this._lowercasePattern,0,le,le.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(ne)return this._matchCount++,re.length===1?{data:ne,visibility:Z}:{data:{label:le,score:ne},visibility:Z}}return this.tree.findMode===V.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(X):2:{data:c.FuzzyScore.Default,visibility:Z}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,l.dispose)(this.disposables)}}class P extends S.Toggle{constructor(X){super({icon:o.Codicon.listFilter,title:(0,w.localize)(0,null),isChecked:X.isChecked??!1,inputActiveOptionBorder:X.inputActiveOptionBorder,inputActiveOptionForeground:X.inputActiveOptionForeground,inputActiveOptionBackground:X.inputActiveOptionBackground})}}e.ModeToggle=P;class x extends S.Toggle{constructor(X){super({icon:o.Codicon.searchFuzzy,title:(0,w.localize)(1,null),isChecked:X.isChecked??!1,inputActiveOptionBorder:X.inputActiveOptionBorder,inputActiveOptionForeground:X.inputActiveOptionForeground,inputActiveOptionBackground:X.inputActiveOptionBackground})}}e.FuzzyToggle=x;const F={inputBoxStyles:f.unthemedInboxStyles,toggleStyles:S.unthemedToggleStyles,listFilterWidgetBackground:void 0,listFilterWidgetNoMatchesOutline:void 0,listFilterWidgetOutline:void 0,listFilterWidgetShadow:void 0};var V;(function(ee){ee[ee.Highlight=0]="Highlight",ee[ee.Filter=1]="Filter"})(V||(e.TreeFindMode=V={}));var W;(function(ee){ee[ee.Fuzzy=0]="Fuzzy",ee[ee.Contiguous=1]="Contiguous"})(W||(e.TreeFindMatchType=W={}));class z extends l.Disposable{set mode(X){this.modeToggle.checked=X===V.Filter,this.findInput.inputBox.setPlaceHolder(X===V.Filter?(0,w.localize)(2,null):(0,w.localize)(3,null))}set matchType(X){this.matchTypeToggle.checked=X===W.Fuzzy}get value(){return this.findInput.inputBox.value}set value(X){this.findInput.inputBox.value=X}constructor(X,te,Z,se,re,oe){super(),this.tree=te,this.elements=(0,t.h)(".monaco-tree-type-filter",[(0,t.h)(".monaco-tree-type-filter-grab.codicon.codicon-debug-gripper@grab",{tabIndex:0}),(0,t.h)(".monaco-tree-type-filter-input@findInput"),(0,t.h)(".monaco-tree-type-filter-actionbar@actionbar")]),this.width=0,this.right=0,this.top=0,this._onDidDisable=new p.Emitter,this.onDidDisable=this._onDidDisable.event,X.appendChild(this.elements.root),this._register((0,l.toDisposable)(()=>X.removeChild(this.elements.root)));const le=oe?.styles??F;le.listFilterWidgetBackground&&(this.elements.root.style.backgroundColor=le.listFilterWidgetBackground),le.listFilterWidgetShadow&&(this.elements.root.style.boxShadow=`0 0 8px 2px ${le.listFilterWidgetShadow}`),this.modeToggle=this._register(new P({...le.toggleStyles,isChecked:se===V.Filter})),this.matchTypeToggle=this._register(new x({...le.toggleStyles,isChecked:re===W.Fuzzy})),this.onDidChangeMode=p.Event.map(this.modeToggle.onChange,()=>this.modeToggle.checked?V.Filter:V.Highlight,this._store),this.onDidChangeMatchType=p.Event.map(this.matchTypeToggle.onChange,()=>this.matchTypeToggle.checked?W.Fuzzy:W.Contiguous,this._store),this.findInput=this._register(new T.FindInput(this.elements.findInput,Z,{label:(0,w.localize)(4,null),additionalToggles:[this.modeToggle,this.matchTypeToggle],showCommonFindToggles:!1,inputBoxStyles:le.inputBoxStyles,toggleStyles:le.toggleStyles,history:oe?.history})),this.actionbar=this._register(new D.ActionBar(this.elements.actionbar)),this.mode=se;const ne=this._register(new y.DomEmitter(this.findInput.inputBox.inputElement,"keydown")),ce=this._register(p.Event.chain(ne.event)).map(ge=>new b.StandardKeyboardEvent(ge)).event;this._register(ce(ge=>{if(ge.equals(3)){ge.preventDefault(),ge.stopPropagation(),this.findInput.inputBox.addToHistory(),this.tree.domFocus();return}if(ge.equals(18)){ge.preventDefault(),ge.stopPropagation(),this.findInput.inputBox.isAtLastInHistory()||this.findInput.inputBox.isNowhereInHistory()?(this.findInput.inputBox.addToHistory(),this.tree.domFocus()):this.findInput.inputBox.showNextValue();return}if(ge.equals(16)){ge.preventDefault(),ge.stopPropagation(),this.findInput.inputBox.showPreviousValue();return}}));const ae=this._register(new r.Action("close",(0,w.localize)(5,null),"codicon codicon-close",!0,()=>this.dispose()));this.actionbar.push(ae,{icon:!0,label:!1});const ue=this._register(new y.DomEmitter(this.elements.grab,"mousedown"));this._register(ue.event(ge=>{const he=new l.DisposableStore,be=he.add(new y.DomEmitter(window,"mousemove")),ve=he.add(new y.DomEmitter(window,"mouseup")),Ie=this.right,Se=ge.pageX,we=this.top,ye=ge.pageY;this.elements.grab.classList.add("grabbing");const Re=this.elements.root.style.transition;this.elements.root.style.transition="unset";const Le=Pe=>{const Ae=Pe.pageX-Se;this.right=Ie-Ae;const Me=Pe.pageY-ye;this.top=we+Me,this.layout()};he.add(be.event(Le)),he.add(ve.event(Pe=>{Le(Pe),this.elements.grab.classList.remove("grabbing"),this.elements.root.style.transition=Re,he.dispose()}))}));const de=this._register(p.Event.chain(this._register(new y.DomEmitter(this.elements.grab,"keydown")).event)).map(ge=>new b.StandardKeyboardEvent(ge)).event;this._register(de(ge=>{let he,be;if(ge.keyCode===15?he=Number.POSITIVE_INFINITY:ge.keyCode===17?he=0:ge.keyCode===10&&(he=this.right===0?Number.POSITIVE_INFINITY:0),ge.keyCode===16?be=0:ge.keyCode===18&&(be=Number.POSITIVE_INFINITY),he!==void 0&&(ge.preventDefault(),ge.stopPropagation(),this.right=he,this.layout()),be!==void 0){ge.preventDefault(),ge.stopPropagation(),this.top=be;const ve=this.elements.root.style.transition;this.elements.root.style.transition="unset",this.layout(),setTimeout(()=>{this.elements.root.style.transition=ve},0)}})),this.onDidChangeValue=this.findInput.onDidChange}getHistory(){return this.findInput.inputBox.getHistory()}focus(){this.findInput.focus()}select(){this.findInput.select(),this.findInput.inputBox.addToHistory(!0)}layout(X=this.width){this.width=X,this.right=(0,n.clamp)(this.right,0,Math.max(0,X-212)),this.elements.root.style.right=`${this.right}px`,this.top=(0,n.clamp)(this.top,0,24),this.elements.root.style.top=`${this.top}px`}showMessage(X){this.findInput.showMessage(X)}clearMessage(){this.findInput.clearMessage()}async dispose(){this._onDidDisable.fire(),this.elements.root.classList.add("disabled"),await(0,s.timeout)(300),super.dispose()}}class B{get pattern(){return this._pattern}get mode(){return this._mode}set mode(X){X!==this._mode&&(this._mode=X,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(X))}get matchType(){return this._matchType}set matchType(X){X!==this._matchType&&(this._matchType=X,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(X))}constructor(X,te,Z,se,re,oe={}){this.tree=X,this.view=Z,this.filter=se,this.contextViewProvider=re,this.options=oe,this._pattern="",this.previousPattern="",this.width=0,this._onDidChangeMode=new p.Emitter,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new p.Emitter,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new p.Emitter,this.onDidChangePattern=this._onDidChangePattern.event,this._onDidChangeOpenState=new p.Emitter,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new l.DisposableStore,this.disposables=new l.DisposableStore,this._mode=X.options.defaultFindMode??V.Highlight,this._matchType=X.options.defaultFindMatchType??W.Fuzzy,te.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(X={}){X.defaultFindMode!==void 0&&(this.mode=X.defaultFindMode),X.defaultFindMatchType!==void 0&&(this.matchType=X.defaultFindMatchType)}open(){if(this.widget){this.widget.focus(),this.widget.select();return}this.widget=new z(this.view.getHTMLElement(),this.tree,this.contextViewProvider,this.mode,this.matchType,{...this.options,history:this._history}),this.enabledDisposables.add(this.widget),this.widget.onDidChangeValue(this.onDidChangeValue,this,this.enabledDisposables),this.widget.onDidChangeMode(X=>this.mode=X,void 0,this.enabledDisposables),this.widget.onDidChangeMatchType(X=>this.matchType=X,void 0,this.enabledDisposables),this.widget.onDidDisable(this.close,this,this.enabledDisposables),this.widget.layout(this.width),this.widget.focus(),this.widget.value=this.previousPattern,this.widget.select(),this._onDidChangeOpenState.fire(!0)}close(){this.widget&&(this._history=this.widget.getHistory(),this.widget=void 0,this.enabledDisposables.dispose(),this.enabledDisposables=new l.DisposableStore,this.previousPattern=this.pattern,this.onDidChangeValue(""),this.tree.domFocus(),this._onDidChangeOpenState.fire(!1))}onDidChangeValue(X){this._pattern=X,this._onDidChangePattern.fire(X),this.filter.pattern=X,this.tree.refilter(),X&&this.tree.focusNext(0,!0,void 0,Z=>!c.FuzzyScore.isDefault(Z.filterData));const te=this.tree.getFocus();if(te.length>0){const Z=te[0];this.tree.getRelativeTop(Z)===null&&this.tree.reveal(Z,.5)}this.render()}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){const X=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&X?this.tree.options.showNotFoundMessage??!0?this.widget?.showMessage({type:2,content:(0,w.localize)(6,null)}):this.widget?.showMessage({type:2}):this.widget?.clearMessage()}shouldAllowFocus(X){return!this.widget||!this.pattern||this._mode===V.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!c.FuzzyScore.isDefault(X.filterData)}layout(X){this.width=X,this.widget?.layout(X)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function K(ee){let X=a.TreeMouseEventTarget.Unknown;return(0,t.hasParentWithClass)(ee.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?X=a.TreeMouseEventTarget.Twistie:(0,t.hasParentWithClass)(ee.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?X=a.TreeMouseEventTarget.Element:(0,t.hasParentWithClass)(ee.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(X=a.TreeMouseEventTarget.Filter),{browserEvent:ee.browserEvent,element:ee.element?ee.element.element:null,target:X}}function H(ee){return{element:ee.element?ee.element.element:null,browserEvent:ee.browserEvent,anchor:ee.anchor}}function U(ee,X){X(ee),ee.children.forEach(te=>U(te,X))}class G{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(X,te){this.getFirstViewElementWithTrait=X,this.identityProvider=te,this.nodes=[],this._onDidChange=new p.Emitter,this.onDidChange=this._onDidChange.event}set(X,te){!te?.__forceEvent&&(0,i.equals)(this.nodes,X)||this._set(X,!1,te)}_set(X,te,Z){if(this.nodes=[...X],this.elements=void 0,this._nodeSet=void 0,!te){const se=this;this._onDidChange.fire({get elements(){return se.get()},browserEvent:Z})}}get(){return this.elements||(this.elements=this.nodes.map(X=>X.element)),[...this.elements]}getNodes(){return this.nodes}has(X){return this.nodeSet.has(X)}onDidModelSplice({insertedNodes:X,deletedNodes:te}){if(!this.identityProvider){const ne=this.createNodeSet(),ce=ae=>ne.delete(ae);te.forEach(ae=>U(ae,ce)),this.set([...ne.values()]);return}const Z=new Set,se=ne=>Z.add(this.identityProvider.getId(ne.element).toString());te.forEach(ne=>U(ne,se));const re=new Map,oe=ne=>re.set(this.identityProvider.getId(ne.element).toString(),ne);X.forEach(ne=>U(ne,oe));const le=[];for(const ne of this.nodes){const ce=this.identityProvider.getId(ne.element).toString();if(!Z.has(ce))le.push(ne);else{const ue=re.get(ce);ue&&ue.visible&&le.push(ue)}}if(this.nodes.length>0&&le.length===0){const ne=this.getFirstViewElementWithTrait();ne&&le.push(ne)}this._set(le,!0)}createNodeSet(){const X=new Set;for(const te of this.nodes)X.add(te);return X}}class $ extends m.MouseController{constructor(X,te){super(X),this.tree=te}onViewPointer(X){if((0,m.isButton)(X.browserEvent.target)||(0,m.isInputElement)(X.browserEvent.target)||(0,m.isMonacoEditor)(X.browserEvent.target)||X.browserEvent.isHandledByList)return;const te=X.element;if(!te)return super.onViewPointer(X);if(this.isSelectionRangeChangeEvent(X)||this.isSelectionSingleChangeEvent(X))return super.onViewPointer(X);const Z=X.browserEvent.target,se=Z.classList.contains("monaco-tl-twistie")||Z.classList.contains("monaco-icon-label")&&Z.classList.contains("folder-icon")&&X.browserEvent.offsetX<16;let re=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?re=this.tree.expandOnlyOnTwistieClick(te.element):re=!!this.tree.expandOnlyOnTwistieClick,re&&!se&&X.browserEvent.detail!==2)return super.onViewPointer(X);if(!this.tree.expandOnDoubleClick&&X.browserEvent.detail===2)return super.onViewPointer(X);if(te.collapsible){const oe=this.tree.getNodeLocation(te),le=X.browserEvent.altKey;if(this.tree.setFocus([oe]),this.tree.toggleCollapsed(oe,le),re&&se){X.browserEvent.isHandledByList=!0;return}}super.onViewPointer(X)}onDoubleClick(X){X.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||X.browserEvent.isHandledByList||super.onDoubleClick(X)}}class ie extends m.List{constructor(X,te,Z,se,re,oe,le,ne){super(X,te,Z,se,ne),this.focusTrait=re,this.selectionTrait=oe,this.anchorTrait=le}createMouseController(X){return new $(this,X.tree)}splice(X,te,Z=[]){if(super.splice(X,te,Z),Z.length===0)return;const se=[],re=[];let oe;Z.forEach((le,ne)=>{this.focusTrait.has(le)&&se.push(X+ne),this.selectionTrait.has(le)&&re.push(X+ne),this.anchorTrait.has(le)&&(oe=X+ne)}),se.length>0&&super.setFocus((0,i.distinct)([...super.getFocus(),...se])),re.length>0&&super.setSelection((0,i.distinct)([...super.getSelection(),...re])),typeof oe=="number"&&super.setAnchor(oe)}setFocus(X,te,Z=!1){super.setFocus(X,te),Z||this.focusTrait.set(X.map(se=>this.element(se)),te)}setSelection(X,te,Z=!1){super.setSelection(X,te),Z||this.selectionTrait.set(X.map(se=>this.element(se)),te)}setAnchor(X,te=!1){super.setAnchor(X),te||(typeof X>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(X)]))}}class J{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 p.Event.map(this.view.onMouseClick,K)}get onMouseDblClick(){return p.Event.filter(p.Event.map(this.view.onMouseDblClick,K),X=>X.target!==a.TreeMouseEventTarget.Filter)}get onContextMenu(){return p.Event.map(this.view.onContextMenu,H)}get onTap(){return p.Event.map(this.view.onTap,K)}get onPointer(){return p.Event.map(this.view.onPointer,K)}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 onDidChangeModel(){return p.Event.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}get findMode(){return this.findController?.mode??V.Highlight}set findMode(X){this.findController&&(this.findController.mode=X)}get findMatchType(){return this.findController?.matchType??W.Fuzzy}set findMatchType(X){this.findController&&(this.findController.matchType=X)}get onDidChangeFindPattern(){return this.findController?this.findController.onDidChangePattern:p.Event.None}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(X,te,Z,se,re={}){this._user=X,this._options=re,this.eventBufferer=new p.EventBufferer,this.onDidChangeFindOpenState=p.Event.None,this.disposables=new l.DisposableStore,this._onWillRefilter=new p.Emitter,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new p.Emitter,this.onDidUpdateOptions=this._onDidUpdateOptions.event;const oe=new A(Z),le=new p.Relay,ne=new p.Relay,ce=this.disposables.add(new R(ne.event)),ae=new d.SetMap;this.renderers=se.map(ge=>new M(ge,()=>this.model,le.event,ce,ae,re));for(const ge of this.renderers)this.disposables.add(ge);let ue;re.keyboardNavigationLabelProvider&&(ue=new N(this,re.keyboardNavigationLabelProvider,re.filter),re={...re,filter:ue},this.disposables.add(ue)),this.focus=new G(()=>this.view.getFocusedElements()[0],re.identityProvider),this.selection=new G(()=>this.view.getSelectedElements()[0],re.identityProvider),this.anchor=new G(()=>this.view.getAnchorElement(),re.identityProvider),this.view=new ie(X,te,oe,this.renderers,this.focus,this.selection,this.anchor,{..._(()=>this.model,re),tree:this}),this.model=this.createModel(X,this.view,re),le.input=this.model.onDidChangeCollapseState;const de=p.Event.forEach(this.model.onDidSplice,ge=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(ge),this.selection.onDidModelSplice(ge)})},this.disposables);if(de(()=>null,null,this.disposables),ne.input=p.Event.chain(p.Event.any(de,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const ge=new Set;for(const he of this.focus.getNodes())ge.add(he);for(const he of this.selection.getNodes())ge.add(he);return[...ge.values()]}).event,re.keyboardSupport!==!1){const ge=p.Event.chain(this.view.onKeyDown).filter(he=>!(0,m.isInputElement)(he.target)).map(he=>new b.StandardKeyboardEvent(he));ge.filter(he=>he.keyCode===15).on(this.onLeftArrow,this,this.disposables),ge.filter(he=>he.keyCode===17).on(this.onRightArrow,this,this.disposables),ge.filter(he=>he.keyCode===10).on(this.onSpace,this,this.disposables)}if((re.findWidgetEnabled??!0)&&re.keyboardNavigationLabelProvider&&re.contextViewProvider){const ge=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new B(this,this.model,this.view,ue,re.contextViewProvider,ge),this.focusNavigationFilter=he=>this.findController.shouldAllowFocus(he),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=p.Event.None,this.onDidChangeFindMatchType=p.Event.None;this.styleElement=(0,t.createStyleSheet)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===L.Always)}updateOptions(X={}){this._options={...this._options,...X};for(const te of this.renderers)te.updateOptions(X);this.view.updateOptions(this._options),this.findController?.updateOptions(X),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===L.Always)}get options(){return this._options}updateWidth(X){const te=this.model.getListIndex(X);te!==-1&&this.view.updateWidth(te)}getHTMLElement(){return this.view.getHTMLElement()}get contentHeight(){return this.view.contentHeight}get contentWidth(){return this.view.contentWidth}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get onDidChangeContentWidth(){return this.view.onDidChangeContentWidth}get scrollTop(){return this.view.scrollTop}set scrollTop(X){this.view.scrollTop=X}get scrollLeft(){return this.view.scrollLeft}set scrollLeft(X){this.view.scrollLeft=X}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleElement(){const X=this.view.firstVisibleIndex;return X<0||X>=this.view.length?void 0:this.view.element(X).element}get lastVisibleElement(){const X=this.view.lastVisibleIndex;return this.view.element(X).element}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(X){this.view.ariaLabel=X}get selectionSize(){return this.selection.getNodes().length}domFocus(){this.view.domFocus()}isDOMFocused(){return this.getHTMLElement()===document.activeElement}layout(X,te){this.view.layout(X,te),(0,g.isNumber)(te)&&this.findController?.layout(te)}style(X){const te=`.${this.view.domId}`,Z=[];X.treeIndentGuidesStroke&&(Z.push(`.monaco-list${te}:hover .monaco-tl-indent > .indent-guide, .monaco-list${te}.always .monaco-tl-indent > .indent-guide { border-color: ${X.treeInactiveIndentGuidesStroke}; }`),Z.push(`.monaco-list${te} .monaco-tl-indent > .indent-guide.active { border-color: ${X.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=Z.join(` `),this.view.style(X)}getParentElement(X){const te=this.model.getParentNodeLocation(X);return this.model.getNode(te).element}getFirstElementChild(X){return this.model.getFirstElementChild(X)}getNode(X){return this.model.getNode(X)}getNodeLocation(X){return this.model.getNodeLocation(X)}collapse(X,te=!1){return this.model.setCollapsed(X,!0,te)}expand(X,te=!1){return this.model.setCollapsed(X,!1,te)}toggleCollapsed(X,te=!1){return this.model.setCollapsed(X,void 0,te)}expandAll(){this.model.setCollapsed(this.model.rootRef,!1,!0)}collapseAll(){this.model.setCollapsed(this.model.rootRef,!0,!0)}isCollapsible(X){return this.model.isCollapsible(X)}setCollapsible(X,te){return this.model.setCollapsible(X,te)}isCollapsed(X){return this.model.isCollapsed(X)}triggerTypeNavigation(){this.view.triggerTypeNavigation()}openFind(){this.findController?.open()}closeFind(){this.findController?.close()}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setAnchor(X){if(typeof X>"u")return this.view.setAnchor(void 0);const te=this.model.getNode(X);this.anchor.set([te]);const Z=this.model.getListIndex(X);Z>-1&&this.view.setAnchor(Z,!0)}getAnchor(){return(0,i.firstOrDefault)(this.anchor.get(),void 0)}setSelection(X,te){const Z=X.map(re=>this.model.getNode(re));this.selection.set(Z,te);const se=X.map(re=>this.model.getListIndex(re)).filter(re=>re>-1);this.view.setSelection(se,te,!0)}getSelection(){return this.selection.get()}setFocus(X,te){const Z=X.map(re=>this.model.getNode(re));this.focus.set(Z,te);const se=X.map(re=>this.model.getListIndex(re)).filter(re=>re>-1);this.view.setFocus(se,te,!0)}focusNext(X=1,te=!1,Z,se=this.focusNavigationFilter){this.view.focusNext(X,te,Z,se)}focusPrevious(X=1,te=!1,Z,se=this.focusNavigationFilter){this.view.focusPrevious(X,te,Z,se)}focusNextPage(X,te=this.focusNavigationFilter){return this.view.focusNextPage(X,te)}focusPreviousPage(X,te=this.focusNavigationFilter){return this.view.focusPreviousPage(X,te)}focusLast(X,te=this.focusNavigationFilter){this.view.focusLast(X,te)}focusFirst(X,te=this.focusNavigationFilter){this.view.focusFirst(X,te)}getFocus(){return this.focus.get()}reveal(X,te){this.model.expandTo(X);const Z=this.model.getListIndex(X);Z!==-1&&this.view.reveal(Z,te)}getRelativeTop(X){const te=this.model.getListIndex(X);return te===-1?null:this.view.getRelativeTop(te)}getViewState(X=this.options.identityProvider){if(!X)throw new a.TreeError(this._user,"Can't get tree view state without an identity provider");const te=oe=>X.getId(oe).toString(),Z=k.empty(this.scrollTop);for(const oe of this.getFocus())Z.focus.add(te(oe));for(const oe of this.getSelection())Z.selection.add(te(oe));const se=this.model.getNode(),re=[se];for(;re.length>0;){const oe=re.shift();oe!==se&&oe.collapsible&&(Z.expanded[te(oe.element)]=oe.collapsed?0:1),re.push(...oe.children)}return Z}onLeftArrow(X){X.preventDefault(),X.stopPropagation();const te=this.view.getFocusedElements();if(te.length===0)return;const Z=te[0],se=this.model.getNodeLocation(Z);if(!this.model.setCollapsed(se,!0)){const oe=this.model.getParentNodeLocation(se);if(!oe)return;const le=this.model.getListIndex(oe);this.view.reveal(le),this.view.setFocus([le])}}onRightArrow(X){X.preventDefault(),X.stopPropagation();const te=this.view.getFocusedElements();if(te.length===0)return;const Z=te[0],se=this.model.getNodeLocation(Z);if(!this.model.setCollapsed(se,!1)){if(!Z.children.some(ne=>ne.visible))return;const[oe]=this.view.getFocus(),le=oe+1;this.view.reveal(le),this.view.setFocus([le])}}onSpace(X){X.preventDefault(),X.stopPropagation();const te=this.view.getFocusedElements();if(te.length===0)return;const Z=te[0],se=this.model.getNodeLocation(Z),re=X.browserEvent.altKey;this.model.setCollapsed(se,void 0,re)}navigate(X){return new j(this.view,this.model,X)}dispose(){(0,l.dispose)(this.disposables),this.view.dispose()}}e.AbstractTree=J;class j{constructor(X,te,Z){this.view=X,this.model=te,Z?this.index=this.model.getListIndex(Z):this.index=-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(Q[1126],Y([1,0,404,669,299,83]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTree=void 0;class T extends t.AbstractTree{constructor(v,m,S,h,a,r={}){super(v,m,S,h,r),this.user=v,this.dataSource=a,this.nodesByIdentity=new Map,this.identityProvider=r.identityProvider}getInput(){return this.input}setInput(v,m){if(m&&!this.identityProvider)throw new b.TreeError(this.user,"Can't restore tree view state without an identity provider");if(this.input=v,!v){this.nodesByIdentity.clear(),this.model.setChildren(null,D.Iterable.empty());return}if(!m){this._refresh(v);return}const S=[],h=[],a=i=>{const s=this.identityProvider.getId(i).toString();return!m.expanded[s]},r=i=>{const s=this.identityProvider.getId(i.element).toString();m.focus.has(s)&&S.push(i.element),m.selection.has(s)&&h.push(i.element)};this._refresh(v,a,r),this.setFocus(S),this.setSelection(h),m&&typeof m.scrollTop=="number"&&(this.scrollTop=m.scrollTop)}updateChildren(v=this.input){if(typeof this.input>"u")throw new b.TreeError(this.user,"Tree input not set");let m;this.identityProvider&&(m=S=>{const h=this.identityProvider.getId(S).toString(),a=this.nodesByIdentity.get(h);if(a)return a.collapsed}),this._refresh(v,m)}resort(v=this.input,m=!0){this.model.resort(v===this.input?null:v,m)}refresh(v){if(v===void 0){this.view.rerender();return}this.model.rerender(v)}_refresh(v,m,S){let h;if(this.identityProvider){const a=new Set,r=S;S=i=>{const s=this.identityProvider.getId(i.element).toString();a.add(s),this.nodesByIdentity.set(s,i),r?.(i)},h=i=>{const s=this.identityProvider.getId(i.element).toString();a.has(s)||this.nodesByIdentity.delete(s)}}this.model.setChildren(v===this.input?null:v,this.iterate(v,m).elements,{onDidCreateNode:S,onDidDeleteNode:h})}iterate(v,m){const S=[...this.dataSource.getChildren(v)];return{elements:D.Iterable.map(S,a=>{const{elements:r,size:i}=this.iterate(a,m),s=this.dataSource.hasChildren?this.dataSource.hasChildren(a):void 0,o=i===0?void 0:m&&m(a);return{element:a,children:r,collapsible:s,collapsed:o}}),size:S.length}}createModel(v,m,S){return new y.ObjectTreeModel(v,m,S)}}e.DataTree=T}),define(Q[833],Y([1,0,404,2302,669,102,83]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTree=e.ObjectTree=void 0;class f extends t.AbstractTree{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(a,r,i,s,o={}){super(a,r,i,s,o),this.user=a}setChildren(a,r=T.Iterable.empty(),i){this.model.setChildren(a,r,i)}rerender(a){if(a===void 0){this.view.rerender();return}this.model.rerender(a)}updateElementHeight(a,r){this.model.updateElementHeight(a,r)}resort(a,r=!0){this.model.resort(a,r)}hasElement(a){return this.model.has(a)}createModel(a,r,i){return new b.ObjectTreeModel(a,r,i)}}e.ObjectTree=f;class v{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(a,r){this._compressedTreeNodeProvider=a,this.renderer=r,this.templateId=r.templateId,r.onDidChangeTwistieState&&(this.onDidChangeTwistieState=r.onDidChangeTwistieState)}renderTemplate(a){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(a)}}renderElement(a,r,i,s){const o=this.compressedTreeNodeProvider.getCompressedTreeNode(a.element);o.element.elements.length===1?(i.compressedTreeNode=void 0,this.renderer.renderElement(a,r,i.data,s)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,r,i.data,s))}disposeElement(a,r,i,s){i.compressedTreeNode?this.renderer.disposeCompressedElements?.(i.compressedTreeNode,r,i.data,s):this.renderer.disposeElement?.(a,r,i.data,s)}disposeTemplate(a){this.renderer.disposeTemplate(a.data)}renderTwistie(a,r){return this.renderer.renderTwistie?this.renderer.renderTwistie(a,r):!1}}fe([D.memoize],v.prototype,"compressedTreeNodeProvider",null);function m(h,a){return a&&{...a,keyboardNavigationLabelProvider:a.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(r){let i;try{i=h().getCompressedTreeNode(r)}catch{return a.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(r)}return i.element.elements.length===1?a.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(r):a.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}}}class S extends f{constructor(a,r,i,s,o={}){const u=()=>this,d=s.map(p=>new v(u,p));super(a,r,i,d,m(u,o))}setChildren(a,r=T.Iterable.empty(),i){this.model.setChildren(a,r,i)}createModel(a,r,i){return new y.CompressibleObjectTreeModel(a,r,i)}updateOptions(a={}){super.updateOptions(a),typeof a.compressionEnabled<"u"&&this.model.setCompressionEnabled(a.compressionEnabled)}getCompressedTreeNode(a=null){return this.model.getCompressedTreeNode(a)}}e.CompressibleObjectTree=S}),define(Q[671],Y([1,0,401,404,823,833,299,14,32,37,15,6,83,4,17]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleAsyncDataTree=e.AsyncDataTree=void 0;function s(N){return{...N,children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0}}function o(N,P){return P.parent?P.parent===N?!0:o(N,P.parent):!1}function u(N,P){return N===P||o(N,P)||o(P,N)}class d{get element(){return this.node.element.element}get children(){return this.node.children.map(P=>new d(P))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(P){this.node=P}}class p{constructor(P,x,F){this.renderer=P,this.nodeMapper=x,this.onDidChangeTwistieState=F,this.renderedNodes=new Map,this.templateId=P.templateId}renderTemplate(P){return{templateData:this.renderer.renderTemplate(P)}}renderElement(P,x,F,V){this.renderer.renderElement(this.nodeMapper.map(P),x,F.templateData,V)}renderTwistie(P,x){return P.slow?(x.classList.add(...m.ThemeIcon.asClassNameArray(v.Codicon.treeItemLoading)),!0):(x.classList.remove(...m.ThemeIcon.asClassNameArray(v.Codicon.treeItemLoading)),!1)}disposeElement(P,x,F,V){this.renderer.disposeElement?.(this.nodeMapper.map(P),x,F.templateData,V)}disposeTemplate(P){this.renderer.disposeTemplate(P.templateData)}dispose(){this.renderedNodes.clear()}}function c(N){return{browserEvent:N.browserEvent,elements:N.elements.map(P=>P.element)}}function l(N){return{browserEvent:N.browserEvent,element:N.element&&N.element.element,target:N.target}}function n(N){return{browserEvent:N.browserEvent,element:N.element&&N.element.element,anchor:N.anchor}}class g extends t.ElementsDragAndDropData{set context(P){this.data.context=P}get context(){return this.data.context}constructor(P){super(P.elements.map(x=>x.element)),this.data=P}}function w(N){return N instanceof t.ElementsDragAndDropData?new g(N):N}class E{constructor(P){this.dnd=P}getDragURI(P){return this.dnd.getDragURI(P.element)}getDragLabel(P,x){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(P.map(F=>F.element),x)}onDragStart(P,x){this.dnd.onDragStart?.(w(P),x)}onDragOver(P,x,F,V,W=!0){return this.dnd.onDragOver(w(P),x&&x.element,F,V)}drop(P,x,F,V){this.dnd.drop(w(P),x&&x.element,F,V)}onDragEnd(P){this.dnd.onDragEnd?.(P)}}function C(N){return N&&{...N,collapseByDefault:!0,identityProvider:N.identityProvider&&{getId(P){return N.identityProvider.getId(P.element)}},dnd:N.dnd&&new E(N.dnd),multipleSelectionController:N.multipleSelectionController&&{isSelectionSingleChangeEvent(P){return N.multipleSelectionController.isSelectionSingleChangeEvent({...P,element:P.element})},isSelectionRangeChangeEvent(P){return N.multipleSelectionController.isSelectionRangeChangeEvent({...P,element:P.element})}},accessibilityProvider:N.accessibilityProvider&&{...N.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:N.accessibilityProvider.getRole?P=>N.accessibilityProvider.getRole(P.element):()=>"treeitem",isChecked:N.accessibilityProvider.isChecked?P=>!!N.accessibilityProvider?.isChecked(P.element):void 0,getAriaLabel(P){return N.accessibilityProvider.getAriaLabel(P.element)},getWidgetAriaLabel(){return N.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:N.accessibilityProvider.getWidgetRole?()=>N.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:N.accessibilityProvider.getAriaLevel&&(P=>N.accessibilityProvider.getAriaLevel(P.element)),getActiveDescendantId:N.accessibilityProvider.getActiveDescendantId&&(P=>N.accessibilityProvider.getActiveDescendantId(P.element))},filter:N.filter&&{filter(P,x){return N.filter.filter(P.element,x)}},keyboardNavigationLabelProvider:N.keyboardNavigationLabelProvider&&{...N.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(P){return N.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(P.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof N.expandOnlyOnTwistieClick>"u"?void 0:typeof N.expandOnlyOnTwistieClick!="function"?N.expandOnlyOnTwistieClick:P=>N.expandOnlyOnTwistieClick(P.element),defaultFindVisibility:P=>P.hasChildren&&P.stale?1:typeof N.defaultFindVisibility=="number"?N.defaultFindVisibility:typeof N.defaultFindVisibility>"u"?2:N.defaultFindVisibility(P.element)}}function I(N,P){P(N),N.children.forEach(x=>I(x,P))}class _{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return h.Event.map(this.tree.onDidChangeFocus,c)}get onDidChangeSelection(){return h.Event.map(this.tree.onDidChangeSelection,c)}get onKeyDown(){return this.tree.onKeyDown}get onMouseClick(){return h.Event.map(this.tree.onMouseClick,l)}get onMouseDblClick(){return h.Event.map(this.tree.onMouseDblClick,l)}get onContextMenu(){return h.Event.map(this.tree.onContextMenu,n)}get onTap(){return h.Event.map(this.tree.onTap,l)}get onPointer(){return h.Event.map(this.tree.onPointer,l)}get onDidFocus(){return this.tree.onDidFocus}get onDidBlur(){return this.tree.onDidBlur}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidUpdateOptions(){return this.tree.onDidUpdateOptions}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get findMode(){return this.tree.findMode}set findMode(P){this.tree.findMode=P}get expandOnlyOnTwistieClick(){if(typeof this.tree.expandOnlyOnTwistieClick=="boolean")return this.tree.expandOnlyOnTwistieClick;const P=this.tree.expandOnlyOnTwistieClick;return x=>P(this.nodes.get(x===this.root.element?null:x)||null)}get onDidDispose(){return this.tree.onDidDispose}constructor(P,x,F,V,W,z={}){this.user=P,this.dataSource=W,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new h.Emitter,this._onDidChangeNodeSlowState=new h.Emitter,this.nodeMapper=new T.WeakMapper(B=>new d(B)),this.disposables=new r.DisposableStore,this.identityProvider=z.identityProvider,this.autoExpandSingleChildren=typeof z.autoExpandSingleChildren>"u"?!1:z.autoExpandSingleChildren,this.sorter=z.sorter,this.collapseByDefault=z.collapseByDefault,this.tree=this.createTree(P,x,F,V,z),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=s({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(P,x,F,V,W){const z=new y.ComposedTreeDelegate(F),B=V.map(H=>new p(H,this.nodeMapper,this._onDidChangeNodeSlowState.event)),K=C(W)||{};return new D.ObjectTree(P,x,z,B,K)}updateOptions(P={}){this.tree.updateOptions(P)}get options(){return this.tree.options}getHTMLElement(){return this.tree.getHTMLElement()}get contentHeight(){return this.tree.contentHeight}get contentWidth(){return this.tree.contentWidth}get onDidChangeContentHeight(){return this.tree.onDidChangeContentHeight}get onDidChangeContentWidth(){return this.tree.onDidChangeContentWidth}get scrollTop(){return this.tree.scrollTop}set scrollTop(P){this.tree.scrollTop=P}get scrollLeft(){return this.tree.scrollLeft}set scrollLeft(P){this.tree.scrollLeft=P}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(P){this.tree.ariaLabel=P}domFocus(){this.tree.domFocus()}layout(P,x){this.tree.layout(P,x)}style(P){this.tree.style(P)}getInput(){return this.root.element}async setInput(P,x){this.refreshPromises.forEach(V=>V.cancel()),this.refreshPromises.clear(),this.root.element=P;const F=x&&{viewState:x,focus:[],selection:[]};await this._updateChildren(P,!0,!1,F),F&&(this.tree.setFocus(F.focus),this.tree.setSelection(F.selection)),x&&typeof x.scrollTop=="number"&&(this.scrollTop=x.scrollTop)}async updateChildren(P=this.root.element,x=!0,F=!1,V){await this._updateChildren(P,x,F,void 0,V)}async _updateChildren(P=this.root.element,x=!0,F=!1,V,W){if(typeof this.root.element>"u")throw new T.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await h.Event.toPromise(this._onDidRender.event));const z=this.getDataNode(P);if(await this.refreshAndRenderNode(z,x,V,W),F)try{this.tree.rerender(z)}catch{}}resort(P=this.root.element,x=!0){this.tree.resort(this.getDataNode(P),x)}hasNode(P){return P===this.root.element||this.nodes.has(P)}rerender(P){if(P===void 0||P===this.root.element){this.tree.rerender();return}const x=this.getDataNode(P);this.tree.rerender(x)}updateWidth(P){const x=this.getDataNode(P);this.tree.updateWidth(x)}getNode(P=this.root.element){const x=this.getDataNode(P),F=this.tree.getNode(x===this.root?null:x);return this.nodeMapper.map(F)}collapse(P,x=!1){const F=this.getDataNode(P);return this.tree.collapse(F===this.root?null:F,x)}async expand(P,x=!1){if(typeof this.root.element>"u")throw new T.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await h.Event.toPromise(this._onDidRender.event));const F=this.getDataNode(P);if(this.tree.hasElement(F)&&!this.tree.isCollapsible(F)||(F.refreshPromise&&(await this.root.refreshPromise,await h.Event.toPromise(this._onDidRender.event)),F!==this.root&&!F.refreshPromise&&!this.tree.isCollapsed(F)))return!1;const V=this.tree.expand(F===this.root?null:F,x);return F.refreshPromise&&(await this.root.refreshPromise,await h.Event.toPromise(this._onDidRender.event)),V}toggleCollapsed(P,x=!1){return this.tree.toggleCollapsed(this.getDataNode(P),x)}expandAll(){this.tree.expandAll()}collapseAll(){this.tree.collapseAll()}isCollapsible(P){return this.tree.isCollapsible(this.getDataNode(P))}isCollapsed(P){return this.tree.isCollapsed(this.getDataNode(P))}triggerTypeNavigation(){this.tree.triggerTypeNavigation()}openFind(){this.tree.openFind()}closeFind(){this.tree.closeFind()}refilter(){this.tree.refilter()}setAnchor(P){this.tree.setAnchor(typeof P>"u"?void 0:this.getDataNode(P))}getAnchor(){return this.tree.getAnchor()?.element}setSelection(P,x){const F=P.map(V=>this.getDataNode(V));this.tree.setSelection(F,x)}getSelection(){return this.tree.getSelection().map(x=>x.element)}setFocus(P,x){const F=P.map(V=>this.getDataNode(V));this.tree.setFocus(F,x)}focusNext(P=1,x=!1,F){this.tree.focusNext(P,x,F)}focusPrevious(P=1,x=!1,F){this.tree.focusPrevious(P,x,F)}focusNextPage(P){return this.tree.focusNextPage(P)}focusPreviousPage(P){return this.tree.focusPreviousPage(P)}focusLast(P){this.tree.focusLast(P)}focusFirst(P){this.tree.focusFirst(P)}getFocus(){return this.tree.getFocus().map(x=>x.element)}reveal(P,x){this.tree.reveal(this.getDataNode(P),x)}getRelativeTop(P){return this.tree.getRelativeTop(this.getDataNode(P))}getParentElement(P){const x=this.tree.getParentElement(this.getDataNode(P));return x&&x.element}getFirstElementChild(P=this.root.element){const x=this.getDataNode(P),F=this.tree.getFirstElementChild(x===this.root?null:x);return F&&F.element}getDataNode(P){const x=this.nodes.get(P===this.root.element?null:P);if(!x)throw new T.TreeError(this.user,`Data tree node not found: ${P}`);return x}async refreshAndRenderNode(P,x,F,V){await this.refreshNode(P,x,F),this.render(P,F,V)}async refreshNode(P,x,F){let V;if(this.subTreeRefreshPromises.forEach((W,z)=>{!V&&u(z,P)&&(V=W.then(()=>this.refreshNode(P,x,F)))}),V)return V;if(P!==this.root&&this.tree.getNode(P).collapsed){P.hasChildren=!!this.dataSource.hasChildren(P.element),P.stale=!0;return}return this.doRefreshSubTree(P,x,F)}async doRefreshSubTree(P,x,F){let V;P.refreshPromise=new Promise(W=>V=W),this.subTreeRefreshPromises.set(P,P.refreshPromise),P.refreshPromise.finally(()=>{P.refreshPromise=void 0,this.subTreeRefreshPromises.delete(P)});try{const W=await this.doRefreshNode(P,x,F);P.stale=!1,await f.Promises.settled(W.map(z=>this.doRefreshSubTree(z,x,F)))}finally{V()}}async doRefreshNode(P,x,F){P.hasChildren=!!this.dataSource.hasChildren(P.element);let V;if(!P.hasChildren)V=Promise.resolve(a.Iterable.empty());else{const W=this.doGetChildren(P);if((0,i.isIterable)(W))V=Promise.resolve(W);else{const z=(0,f.timeout)(800);z.then(()=>{P.slow=!0,this._onDidChangeNodeSlowState.fire(P)},B=>null),V=W.finally(()=>z.cancel())}}try{const W=await V;return this.setChildren(P,W,x,F)}catch(W){if(P!==this.root&&this.tree.hasElement(P)&&this.tree.collapse(P),(0,S.isCancellationError)(W))return[];throw W}finally{P.slow&&(P.slow=!1,this._onDidChangeNodeSlowState.fire(P))}}doGetChildren(P){let x=this.refreshPromises.get(P);if(x)return x;const F=this.dataSource.getChildren(P.element);return(0,i.isIterable)(F)?this.processChildren(F):(x=(0,f.createCancelablePromise)(async()=>this.processChildren(await F)),this.refreshPromises.set(P,x),x.finally(()=>{this.refreshPromises.delete(P)}))}_onDidChangeCollapseState({node:P,deep:x}){P.element!==null&&!P.collapsed&&P.element.stale&&(x?this.collapse(P.element.element):this.refreshAndRenderNode(P.element,!1).catch(S.onUnexpectedError))}setChildren(P,x,F,V){const W=[...x];if(P.children.length===0&&W.length===0)return[];const z=new Map,B=new Map;for(const U of P.children)if(z.set(U.element,U),this.identityProvider){const G=this.tree.isCollapsed(U);B.set(U.id,{node:U,collapsed:G})}const K=[],H=W.map(U=>{const G=!!this.dataSource.hasChildren(U);if(!this.identityProvider){const j=s({element:U,parent:P,hasChildren:G});return G&&this.collapseByDefault&&!this.collapseByDefault(U)&&(j.collapsedByDefault=!1,K.push(j)),j}const $=this.identityProvider.getId(U).toString(),ie=B.get($);if(ie){const j=ie.node;return z.delete(j.element),this.nodes.delete(j.element),this.nodes.set(U,j),j.element=U,j.hasChildren=G,F?ie.collapsed?(j.children.forEach(ee=>I(ee,X=>this.nodes.delete(X.element))),j.children.splice(0,j.children.length),j.stale=!0):K.push(j):G&&this.collapseByDefault&&!this.collapseByDefault(U)&&(j.collapsedByDefault=!1,K.push(j)),j}const J=s({element:U,parent:P,id:$,hasChildren:G});return V&&V.viewState.focus&&V.viewState.focus.indexOf($)>-1&&V.focus.push(J),V&&V.viewState.selection&&V.viewState.selection.indexOf($)>-1&&V.selection.push(J),V&&V.viewState.expanded&&V.viewState.expanded.indexOf($)>-1?K.push(J):G&&this.collapseByDefault&&!this.collapseByDefault(U)&&(J.collapsedByDefault=!1,K.push(J)),J});for(const U of z.values())I(U,G=>this.nodes.delete(G.element));for(const U of H)this.nodes.set(U.element,U);return P.children.splice(0,P.children.length,...H),P!==this.root&&this.autoExpandSingleChildren&&H.length===1&&K.length===0&&(H[0].collapsedByDefault=!1,K.push(H[0])),K}render(P,x,F){const V=P.children.map(z=>this.asTreeElement(z,x)),W=F&&{...F,diffIdentityProvider:F.diffIdentityProvider&&{getId(z){return F.diffIdentityProvider.getId(z.element)}}};this.tree.setChildren(P===this.root?null:P,V,W),P!==this.root&&this.tree.setCollapsible(P,P.hasChildren),this._onDidRender.fire()}asTreeElement(P,x){if(P.stale)return{element:P,collapsible:P.hasChildren,collapsed:!0};let F;return x&&x.viewState.expanded&&P.id&&x.viewState.expanded.indexOf(P.id)>-1?F=!1:F=P.collapsedByDefault,P.collapsedByDefault=void 0,{element:P,children:P.hasChildren?a.Iterable.map(P.children,V=>this.asTreeElement(V,x)):[],collapsible:P.hasChildren,collapsed:F}}processChildren(P){return this.sorter&&(P=[...P].sort(this.sorter.compare.bind(this.sorter))),P}getViewState(){if(!this.identityProvider)throw new T.TreeError(this.user,"Can't get tree view state without an identity provider");const P=B=>this.identityProvider.getId(B).toString(),x=this.getFocus().map(P),F=this.getSelection().map(P),V=[],W=this.tree.getNode(),z=[W];for(;z.length>0;){const B=z.pop();B!==W&&B.collapsible&&!B.collapsed&&V.push(P(B.element.element)),z.push(...B.children)}return{focus:x,selection:F,expanded:V,scrollTop:this.scrollTop}}dispose(){this.disposables.dispose()}}e.AsyncDataTree=_;class A{get element(){return{elements:this.node.element.elements.map(P=>P.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(P=>new A(P))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(P){this.node=P}}class k{constructor(P,x,F,V){this.renderer=P,this.nodeMapper=x,this.compressibleNodeMapperProvider=F,this.onDidChangeTwistieState=V,this.renderedNodes=new Map,this.disposables=[],this.templateId=P.templateId}renderTemplate(P){return{templateData:this.renderer.renderTemplate(P)}}renderElement(P,x,F,V){this.renderer.renderElement(this.nodeMapper.map(P),x,F.templateData,V)}renderCompressedElements(P,x,F,V){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(P),x,F.templateData,V)}renderTwistie(P,x){return P.slow?(x.classList.add(...m.ThemeIcon.asClassNameArray(v.Codicon.treeItemLoading)),!0):(x.classList.remove(...m.ThemeIcon.asClassNameArray(v.Codicon.treeItemLoading)),!1)}disposeElement(P,x,F,V){this.renderer.disposeElement?.(this.nodeMapper.map(P),x,F.templateData,V)}disposeCompressedElements(P,x,F,V){this.renderer.disposeCompressedElements?.(this.compressibleNodeMapperProvider().map(P),x,F.templateData,V)}disposeTemplate(P){this.renderer.disposeTemplate(P.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,r.dispose)(this.disposables)}}function L(N){const P=N&&C(N);return P&&{...P,keyboardNavigationLabelProvider:P.keyboardNavigationLabelProvider&&{...P.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(x){return N.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(x.map(F=>F.element))}}}}class R extends _{constructor(P,x,F,V,W,z,B={}){super(P,x,F,W,z,B),this.compressionDelegate=V,this.compressibleNodeMapper=new T.WeakMapper(K=>new A(K)),this.filter=B.filter}createTree(P,x,F,V,W){const z=new y.ComposedTreeDelegate(F),B=V.map(H=>new k(H,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),K=L(W)||{};return new D.CompressibleObjectTree(P,x,z,B,K)}asTreeElement(P,x){return{incompressible:this.compressionDelegate.isIncompressible(P.element),...super.asTreeElement(P,x)}}updateOptions(P={}){this.tree.updateOptions(P)}getViewState(){if(!this.identityProvider)throw new T.TreeError(this.user,"Can't get tree view state without an identity provider");const P=B=>this.identityProvider.getId(B).toString(),x=this.getFocus().map(P),F=this.getSelection().map(P),V=[],W=this.tree.getCompressedTreeNode(),z=[W];for(;z.length>0;){const B=z.pop();if(B!==W&&B.collapsible&&!B.collapsed)for(const K of B.element.elements)V.push(P(K.element));z.push(...B.children)}return{focus:x,selection:F,expanded:V,scrollTop:this.scrollTop}}render(P,x){if(!this.identityProvider)return super.render(P,x);const F=$=>this.identityProvider.getId($).toString(),V=$=>{const ie=new Set;for(const J of $){const j=this.tree.getCompressedTreeNode(J===this.root?null:J);if(j.element)for(const ee of j.element.elements)ie.add(F(ee.element))}return ie},W=V(this.tree.getSelection()),z=V(this.tree.getFocus());super.render(P,x);const B=this.getSelection();let K=!1;const H=this.getFocus();let U=!1;const G=$=>{const ie=$.element;if(ie)for(let J=0;J<ie.elements.length;J++){const j=F(ie.elements[J].element),ee=ie.elements[ie.elements.length-1].element;W.has(j)&&B.indexOf(ee)===-1&&(B.push(ee),K=!0),z.has(j)&&H.indexOf(ee)===-1&&(H.push(ee),U=!0)}$.children.forEach(G)};G(this.tree.getCompressedTreeNode(P===this.root?null:P)),K&&this.setSelection(B),U&&this.setFocus(H)}processChildren(P){return this.filter&&(P=a.Iterable.filter(P,x=>{const F=this.filter.filter(x,1),V=M(F);if(V===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return V===1})),super.processChildren(P)}}e.CompressibleAsyncDataTree=R;function M(N){return typeof N=="boolean"?N?1:0:(0,b.isFilterResult)(N)?(0,b.getVisibleState)(N.visibility):(0,b.getVisibleState)(N)}}),define(Q[180],Y([1,0,20,206,55,18,26,33]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.splitRecentLabel=e.unmnemonicLabel=e.mnemonicButtonLabel=e.mnemonicMenuLabel=e.template=e.shorten=e.untildify=e.tildify=e.normalizeDriveLetter=e.getPathLabel=void 0;function v(E,C){const{os:I,tildify:_,relative:A}=C;if(A){const R=m(E,A,I);if(typeof R=="string")return R}let k=E.fsPath;if(I===1&&!D.isWindows?k=k.replace(/\//g,"\\"):I!==1&&D.isWindows&&(k=k.replace(/\\/g,"/")),I!==1&&_?.userHome){const R=_.userHome.fsPath;let M;E.scheme!==_.userHome.scheme&&E.path.startsWith(b.posix.sep)?M=_.userHome.with({path:E.path}).fsPath:M=E.fsPath,k=a(M,R,I)}return(I===1?b.win32:b.posix).normalize(S(k,I===1))}e.getPathLabel=v;function m(E,C,I){const _=I===1?b.win32:b.posix,A=I===3?T.extUri:T.extUriIgnorePathCase,k=C.getWorkspace(),L=(0,t.firstOrDefault)(k.folders);if(!L)return;E.scheme!==L.uri.scheme&&E.path.startsWith(b.posix.sep)&&(E=L.uri.with({path:E.path}));const R=C.getWorkspaceFolder(E);if(!R)return;let M;if(A.isEqual(R.uri,E)?M="":M=A.relativePath(R.uri,E)??"",M&&(M=_.normalize(M)),k.folders.length>1&&!C.noPrefix){const N=R.name?R.name:A.basenameOrAuthority(R.uri);M=M?`${N} \u2022 ${M}`:N}return M}function S(E,C=D.isWindows){return(0,y.hasDriveLetter)(E,C)?E.charAt(0).toUpperCase()+E.slice(1):E}e.normalizeDriveLetter=S;let h=Object.create(null);function a(E,C,I=D.OS){if(I===1||!E||!C)return E;let _=h.original===C?h.normalized:void 0;_||(_=C,D.isWindows&&(_=(0,y.toSlashes)(_)),_=`${(0,f.rtrim)(_,b.posix.sep)}${b.posix.sep}`,h={original:C,normalized:_});let A=E;return D.isWindows&&(A=(0,y.toSlashes)(A)),(I===3?A.startsWith(_):(0,f.startsWithIgnoreCase)(A,_))?`~/${A.substr(_.length)}`:E}e.tildify=a;function r(E,C){return E.replace(/^~($|\/|\\)/,`${C}$1`)}e.untildify=r;const i="\u2026",s="\\\\",o="~";function u(E,C=b.sep){const I=new Array(E.length);let _=!1;for(let A=0;A<E.length;A++){const k=E[A];if(k===""){I[A]=`.${C}`;continue}if(!k){I[A]=k;continue}_=!0;let L="",R=k;R.indexOf(s)===0?(L=R.substr(0,R.indexOf(s)+s.length),R=R.substr(R.indexOf(s)+s.length)):R.indexOf(C)===0?(L=R.substr(0,R.indexOf(C)+C.length),R=R.substr(R.indexOf(C)+C.length)):R.indexOf(o)===0&&(L=R.substr(0,R.indexOf(o)+o.length),R=R.substr(R.indexOf(o)+o.length));const M=R.split(C);for(let N=1;_&&N<=M.length;N++)for(let P=M.length-N;_&&P>=0;P--){_=!1;let x=M.slice(P,P+N).join(C);for(let F=0;!_&&F<E.length;F++)if(F!==A&&E[F]&&E[F].indexOf(x)>-1){const V=P+N===M.length,W=P>0&&E[F].indexOf(C)>-1?C+x:x,z=E[F].endsWith(W);_=!V||z}if(!_){let F="";(M[0].endsWith(":")||L!=="")&&(P===1&&(P=0,N++,x=M[0]+C+x),P>0&&(F=M[0]+C),F=L+F),P>0&&(F=F+i+C),F=F+x,P+N<M.length&&(F=F+C+i),I[A]=F}}_&&(I[A]=k)}return I}e.shorten=u;var d;(function(E){E[E.TEXT=0]="TEXT",E[E.VARIABLE=1]="VARIABLE",E[E.SEPARATOR=2]="SEPARATOR"})(d||(d={}));function p(E,C=Object.create(null)){const I=[];let _=!1,A="";for(const k of E)if(k==="$"||_&&k==="{")A&&I.push({value:A,type:d.TEXT}),A="",_=!0;else if(k==="}"&&_){const L=C[A];if(typeof L=="string")L.length&&I.push({value:L,type:d.VARIABLE});else if(L){const R=I[I.length-1];(!R||R.type!==d.SEPARATOR)&&I.push({value:L.label,type:d.SEPARATOR})}A="",_=!1}else A+=k;return A&&!_&&I.push({value:A,type:d.TEXT}),I.filter((k,L)=>{if(k.type===d.SEPARATOR){const R=I[L-1],M=I[L+1];return[R,M].every(N=>N&&(N.type===d.VARIABLE||N.type===d.TEXT)&&N.value.length>0)}return!0}).map(k=>k.value).join("")}e.template=p;function c(E,C){return D.isMacintosh||C?E.replace(/\(&&\w\)|&&/g,"").replace(/&/g,D.isMacintosh?"&":"&&"):E.replace(/&&|&/g,I=>I==="&"?"&&":"&")}e.mnemonicMenuLabel=c;function l(E,C){return D.isMacintosh||C?E.replace(/\(&&\w\)|&&/g,""):D.isWindows?E.replace(/&&|&/g,I=>I==="&"?"&&":"&"):E.replace(/&&/g,"_")}e.mnemonicButtonLabel=l;function n(E){return E.replace(/&/g,"&&")}e.unmnemonicLabel=n;function g(E){if(E.endsWith("]")){const C=E.lastIndexOf(" [",E.length-2);if(C!==-1){const I=w(E.substring(0,C));return{name:I.name,parentPath:I.parentPath+E.substring(C)}}}return w(E)}e.splitRecentLabel=g;function w(E){const C=E.indexOf("/")!==-1?b.posix:b.win32,I=C.basename(E),_=C.dirname(E);return I.length?{name:I,parentPath:_}:{name:_,parentPath:""}}}),define(Q[1127],Y([1,0,7,67,85,207,273,249,34,32,37,180,4,18,2257,1680]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dialog=void 0;class s extends a.Disposable{constructor(u,d,p,c){super(),this.container=u,this.message=d,this.options=c,this.modalElement=this.container.appendChild((0,t.$)(".monaco-dialog-modal-block.dimmed")),this.shadowElement=this.modalElement.appendChild((0,t.$)(".dialog-shadow")),this.element=this.shadowElement.appendChild((0,t.$)(".monaco-dialog-box")),this.element.setAttribute("role","dialog"),this.element.tabIndex=-1,(0,t.hide)(this.element),this.buttonStyles=c.buttonStyles,Array.isArray(p)&&p.length>0?this.buttons=p:this.options.disableDefaultAction?this.buttons=[]:this.buttons=[i.localize(0,null)];const l=this.element.appendChild((0,t.$)(".dialog-buttons-row"));this.buttonsContainer=l.appendChild((0,t.$)(".dialog-buttons"));const n=this.element.appendChild((0,t.$)(".dialog-message-row"));if(this.iconElement=n.appendChild((0,t.$)("#monaco-dialog-icon.dialog-icon")),this.iconElement.setAttribute("aria-label",this.getIconAriaLabel()),this.messageContainer=n.appendChild((0,t.$)(".dialog-message-container")),this.options.detail||this.options.renderBody){const E=this.messageContainer.appendChild((0,t.$)(".dialog-message")).appendChild((0,t.$)("#monaco-dialog-message-text.dialog-message-text"));E.innerText=this.message}if(this.messageDetailElement=this.messageContainer.appendChild((0,t.$)("#monaco-dialog-message-detail.dialog-message-detail")),this.options.detail||!this.options.renderBody?this.messageDetailElement.innerText=this.options.detail?this.options.detail:d:this.messageDetailElement.style.display="none",this.options.renderBody){const w=this.messageContainer.appendChild((0,t.$)("#monaco-dialog-message-body.dialog-message-body"));this.options.renderBody(w);for(const E of this.messageContainer.querySelectorAll("a"))E.tabIndex=0}if(this.options.inputs?this.inputs=this.options.inputs.map(w=>{const E=this.messageContainer.appendChild((0,t.$)(".dialog-message-input")),C=this._register(new f.InputBox(E,void 0,{placeholder:w.placeholder,type:w.type??"text",inputBoxStyles:c.inputBoxStyles}));return w.value&&(C.value=w.value),C}):this.inputs=[],this.options.checkboxLabel){const w=this.messageContainer.appendChild((0,t.$)(".dialog-checkbox-row")),E=this.checkbox=this._register(new T.Checkbox(this.options.checkboxLabel,!!this.options.checkboxChecked,c.checkboxStyles));w.appendChild(E.domNode);const C=w.appendChild((0,t.$)(".dialog-checkbox-message"));C.innerText=this.options.checkboxLabel,this._register((0,t.addDisposableListener)(C,t.EventType.CLICK,()=>E.checked=!E.checked))}const g=this.element.appendChild((0,t.$)(".dialog-toolbar-row"));this.toolbarContainer=g.appendChild((0,t.$)(".dialog-toolbar")),this.applyStyles()}getIconAriaLabel(){let u=i.localize(1,null);switch(this.options.type){case"error":u=i.localize(2,null);break;case"warning":u=i.localize(3,null);break;case"pending":u=i.localize(4,null);break;case"none":case"info":case"question":default:break}return u}updateMessage(u){this.messageDetailElement.innerText=u}async show(){return this.focusToReturn=document.activeElement,new Promise(u=>{(0,t.clearNode)(this.buttonsContainer);const d=this.buttonBar=this._register(new D.ButtonBar(this.buttonsContainer)),p=this.rearrangeButtons(this.buttons,this.options.cancelId);p.forEach((l,n)=>{const g=p[n].index===0,w=this.options.buttonDetails?this._register(d.addButtonWithDescription({title:!0,secondary:!g,...this.buttonStyles})):this._register(d.addButton({title:!0,secondary:!g,...this.buttonStyles}));w.label=(0,h.mnemonicButtonLabel)(p[n].label,!0),w instanceof D.ButtonWithDescription&&(w.description=this.options.buttonDetails[p[n].index]),this._register(w.onDidClick(E=>{E&&t.EventHelper.stop(E),u({button:p[n].index,checkboxChecked:this.checkbox?this.checkbox.checked:void 0,values:this.inputs.length>0?this.inputs.map(C=>C.value):void 0})}))}),this._register((0,t.addDisposableListener)(window,"keydown",l=>{const n=new y.StandardKeyboardEvent(l);if(n.equals(512)&&n.preventDefault(),n.equals(3)){this.inputs.some(w=>w.hasFocus())&&(t.EventHelper.stop(l),u({button:p.find(w=>w.index!==this.options.cancelId)?.index??0,checkboxChecked:this.checkbox?this.checkbox.checked:void 0,values:this.inputs.length>0?this.inputs.map(w=>w.value):void 0}));return}if(n.equals(10))return;let g=!1;if(n.equals(2)||n.equals(17)||n.equals(1026)||n.equals(15)){const w=[];let E=-1;if(this.messageContainer){const C=this.messageContainer.querySelectorAll("a");for(const I of C)w.push(I),I===document.activeElement&&(E=w.length-1)}for(const C of this.inputs)w.push(C),C.hasFocus()&&(E=w.length-1);if(this.checkbox&&(w.push(this.checkbox),this.checkbox.hasFocus()&&(E=w.length-1)),this.buttonBar)for(const C of this.buttonBar.buttons)w.push(C),C.hasFocus()&&(E=w.length-1);if(n.equals(2)||n.equals(17)){E===-1&&(E=0);const C=(E+1)%w.length;w[C].focus()}else{E===-1&&(E=w.length);let C=E-1;C===-1&&(C=w.length-1),w[C].focus()}g=!0}g?t.EventHelper.stop(l,!0):this.options.keyEventProcessor&&this.options.keyEventProcessor(n)},!0)),this._register((0,t.addDisposableListener)(window,"keyup",l=>{t.EventHelper.stop(l,!0);const n=new y.StandardKeyboardEvent(l);!this.options.disableCloseAction&&n.equals(9)&&u({button:this.options.cancelId||0,checkboxChecked:this.checkbox?this.checkbox.checked:void 0})},!0)),this._register((0,t.addDisposableListener)(this.element,"focusout",l=>{l.relatedTarget&&this.element&&((0,t.isAncestor)(l.relatedTarget,this.element)||(this.focusToReturn=l.relatedTarget,l.target&&(l.target.focus(),t.EventHelper.stop(l,!0))))},!1));const c="codicon-modifier-spin";if(this.iconElement.classList.remove(...S.ThemeIcon.asClassNameArray(m.Codicon.dialogError),...S.ThemeIcon.asClassNameArray(m.Codicon.dialogWarning),...S.ThemeIcon.asClassNameArray(m.Codicon.dialogInfo),...S.ThemeIcon.asClassNameArray(m.Codicon.loading),c),this.options.icon)this.iconElement.classList.add(...S.ThemeIcon.asClassNameArray(this.options.icon));else switch(this.options.type){case"error":this.iconElement.classList.add(...S.ThemeIcon.asClassNameArray(m.Codicon.dialogError));break;case"warning":this.iconElement.classList.add(...S.ThemeIcon.asClassNameArray(m.Codicon.dialogWarning));break;case"pending":this.iconElement.classList.add(...S.ThemeIcon.asClassNameArray(m.Codicon.loading),c);break;case"none":this.iconElement.classList.add("no-codicon");break;case"info":case"question":default:this.iconElement.classList.add(...S.ThemeIcon.asClassNameArray(m.Codicon.dialogInfo));break}if(!this.options.disableCloseAction){const l=this._register(new b.ActionBar(this.toolbarContainer,{})),n=this._register(new v.Action("dialog.close",i.localize(5,null),S.ThemeIcon.asClassName(m.Codicon.dialogClose),!0,async()=>{u({button:this.options.cancelId||0,checkboxChecked:this.checkbox?this.checkbox.checked:void 0})}));l.push(n,{icon:!0,label:!1})}this.applyStyles(),this.element.setAttribute("aria-modal","true"),this.element.setAttribute("aria-labelledby","monaco-dialog-icon monaco-dialog-message-text"),this.element.setAttribute("aria-describedby","monaco-dialog-icon monaco-dialog-message-text monaco-dialog-message-detail monaco-dialog-message-body"),(0,t.show)(this.element),this.inputs.length>0?(this.inputs[0].focus(),this.inputs[0].select()):p.forEach((l,n)=>{l.index===0&&d.buttons[n].focus()})})}applyStyles(){const u=this.options.dialogStyles,d=u.dialogForeground,p=u.dialogBackground,c=u.dialogShadow?`0 0px 8px ${u.dialogShadow}`:"",l=u.dialogBorder?`1px solid ${u.dialogBorder}`:"",n=u.textLinkForeground;if(this.shadowElement.style.boxShadow=c,this.element.style.color=d??"",this.element.style.backgroundColor=p??"",this.element.style.border=l,n)for(const w of this.messageContainer.getElementsByTagName("a"))w.style.color=n;let g;switch(this.options.type){case"error":g=u.errorIconForeground;break;case"warning":g=u.warningIconForeground;break;default:g=u.infoIconForeground;break}g&&(this.iconElement.style.color=g)}dispose(){super.dispose(),this.modalElement&&(this.modalElement.remove(),this.modalElement=void 0),this.focusToReturn&&(0,t.isAncestor)(this.focusToReturn,document.body)&&(this.focusToReturn.focus(),this.focusToReturn=void 0)}rearrangeButtons(u,d){const p=u.map((c,l)=>({label:c,index:l}));if(u.length<2)return p;if(r.isMacintosh||r.isLinux){if(typeof d=="number"&&p[d]){const c=p.splice(d,1)[0];p.splice(1,0,c)}p.reverse()}else if(r.isWindows&&typeof d=="number"&&p[d]){const c=p.splice(d,1)[0];p.push(c)}return p}}e.Dialog=s}),define(Q[2317],Y([1,0,102,283,55,26,10]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceTree=void 0;class f{get childrenCount(){return this._children.size}get children(){return this._children.values()}get name(){return b.posix.basename(this.relativePath)}constructor(h,a,r,i=void 0,s=void 0){this.uri=h,this.relativePath=a,this.context=r,this.element=i,this.parent=s,this._children=new Map}get(h){return this._children.get(h)}set(h,a){this._children.set(h,a)}delete(h){this._children.delete(h)}clear(){this._children.clear()}}fe([t.memoize],f.prototype,"name",null);function v(S,h){typeof S.element<"u"&&h.push(S.element);for(const a of S.children)v(a,h);return h}class m{static getRoot(h){for(;h.parent;)h=h.parent;return h}static collect(h){return v(h,[])}static isResourceNode(h){return h instanceof f}constructor(h,a=T.URI.file("/"),r=D.extUri){this.extUri=r,this.root=new f(a,"",h)}add(h,a){const r=this.extUri.relativePath(this.root.uri,h)||h.path,i=new y.PathIterator(!1).reset(r);let s=this.root,o="";for(;;){const u=i.value();o=o+"/"+u;let d=s.get(u);if(d?i.hasNext()||(d.element=a):(d=new f(this.extUri.joinPath(this.root.uri,o),o,this.root.context,i.hasNext()?void 0:a,s),s.set(u,d)),s=d,!i.hasNext())return;i.next()}}delete(h){const a=this.extUri.relativePath(this.root.uri,h)||h.path,r=new y.PathIterator(!1).reset(a);return this._delete(this.root,r)}_delete(h,a){const r=a.value(),i=h.get(r);if(i){if(a.hasNext()){const s=this._delete(i,a.next());return typeof s<"u"&&i.childrenCount===0&&h.delete(r),s}return h.delete(r),i.element}}clear(){this.root.clear()}getNode(h){const a=this.extUri.relativePath(this.root.uri,h)||h.path,r=new y.PathIterator(!1).reset(a);let i=this.root;for(;;){const s=r.value(),o=i.get(s);if(!o||!r.hasNext())return o;i=o,r.next()}}}e.ResourceTree=m}),define(Q[834],Y([1,0,62,10]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformAndReviveIncomingURIs=e.transformIncomingURIs=e.transformOutgoingURIs=e.DefaultURITransformer=e.URITransformer=void 0;function b(h){return h.toJSON()}class D{constructor(a){this._uriTransformer=a}transformIncoming(a){const r=this._uriTransformer.transformIncoming(a);return r===a?a:b(y.URI.from(r))}transformOutgoing(a){const r=this._uriTransformer.transformOutgoing(a);return r===a?a:b(y.URI.from(r))}transformOutgoingURI(a){const r=this._uriTransformer.transformOutgoing(a);return r===a?a:y.URI.from(r)}transformOutgoingScheme(a){return this._uriTransformer.transformOutgoingScheme(a)}}e.URITransformer=D,e.DefaultURITransformer=new class{transformIncoming(h){return h}transformOutgoing(h){return h}transformOutgoingURI(h){return h}transformOutgoingScheme(h){return h}};function T(h,a,r){if(!h||r>200)return null;if(typeof h=="object"){if(h instanceof y.URI)return a.transformOutgoing(h);for(const i in h)if(Object.hasOwnProperty.call(h,i)){const s=T(h[i],a,r+1);s!==null&&(h[i]=s)}}return null}function f(h,a){const r=T(h,a,0);return r===null?h:r}e.transformOutgoingURIs=f;function v(h,a,r,i){if(!h||i>200)return null;if(typeof h=="object"){if(h.$mid===1)return r?y.URI.revive(a.transformIncoming(h)):a.transformIncoming(h);if(h instanceof t.VSBuffer)return null;for(const s in h)if(Object.hasOwnProperty.call(h,s)){const o=v(h[s],a,r,i+1);o!==null&&(h[s]=o)}}return null}function m(h,a){const r=v(h,a,!1,0);return r===null?h:r}e.transformIncomingURIs=m;function S(h,a){const r=v(h,a,!0,0);return r===null?h:r}e.transformAndReviveIncomingURIs=S}),define(Q[577],Y([1,0,15,6,4,42,18,33]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.SimpleWorkerServer=e.SimpleWorkerClient=e.logOnceWebWorkerWarning=void 0;const v="$initialize";let m=!1;function S(w){T.isWeb&&(m||(m=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(w.message))}e.logOnceWebWorkerWarning=S;var h;(function(w){w[w.Request=0]="Request",w[w.Reply=1]="Reply",w[w.SubscribeEvent=2]="SubscribeEvent",w[w.Event=3]="Event",w[w.UnsubscribeEvent=4]="UnsubscribeEvent"})(h||(h={}));class a{constructor(E,C,I,_){this.vsWorker=E,this.req=C,this.method=I,this.args=_,this.type=0}}class r{constructor(E,C,I,_){this.vsWorker=E,this.seq=C,this.res=I,this.err=_,this.type=1}}class i{constructor(E,C,I,_){this.vsWorker=E,this.req=C,this.eventName=I,this.arg=_,this.type=2}}class s{constructor(E,C,I){this.vsWorker=E,this.req=C,this.event=I,this.type=3}}class o{constructor(E,C){this.vsWorker=E,this.req=C,this.type=4}}class u{constructor(E){this._workerId=-1,this._handler=E,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(E){this._workerId=E}sendMessage(E,C){const I=String(++this._lastSentReq);return new Promise((_,A)=>{this._pendingReplies[I]={resolve:_,reject:A},this._send(new a(this._workerId,I,E,C))})}listen(E,C){let I=null;const _=new y.Emitter({onWillAddFirstListener:()=>{I=String(++this._lastSentReq),this._pendingEmitters.set(I,_),this._send(new i(this._workerId,I,E,C))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(I),this._send(new o(this._workerId,I)),I=null}});return _.event}handleMessage(E){!E||!E.vsWorker||this._workerId!==-1&&E.vsWorker!==this._workerId||this._handleMessage(E)}_handleMessage(E){switch(E.type){case 1:return this._handleReplyMessage(E);case 0:return this._handleRequestMessage(E);case 2:return this._handleSubscribeEventMessage(E);case 3:return this._handleEventMessage(E);case 4:return this._handleUnsubscribeEventMessage(E)}}_handleReplyMessage(E){if(!this._pendingReplies[E.seq]){console.warn("Got reply to unknown seq");return}const C=this._pendingReplies[E.seq];if(delete this._pendingReplies[E.seq],E.err){let I=E.err;E.err.$isError&&(I=new Error,I.name=E.err.name,I.message=E.err.message,I.stack=E.err.stack),C.reject(I);return}C.resolve(E.res)}_handleRequestMessage(E){const C=E.req;this._handler.handleMessage(E.method,E.args).then(_=>{this._send(new r(this._workerId,C,_,void 0))},_=>{_.detail instanceof Error&&(_.detail=(0,t.transformErrorForSerialization)(_.detail)),this._send(new r(this._workerId,C,void 0,(0,t.transformErrorForSerialization)(_)))})}_handleSubscribeEventMessage(E){const C=E.req,I=this._handler.handleEvent(E.eventName,E.arg)(_=>{this._send(new s(this._workerId,C,_))});this._pendingEvents.set(C,I)}_handleEventMessage(E){if(!this._pendingEmitters.has(E.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(E.req).fire(E.event)}_handleUnsubscribeEventMessage(E){if(!this._pendingEvents.has(E.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(E.req).dispose(),this._pendingEvents.delete(E.req)}_send(E){const C=[];if(E.type===0)for(let I=0;I<E.args.length;I++)E.args[I]instanceof ArrayBuffer&&C.push(E.args[I]);else E.type===1&&E.res instanceof ArrayBuffer&&C.push(E.res);this._handler.sendMessage(E,C)}}class d extends b.Disposable{constructor(E,C,I){super();let _=null;this._worker=this._register(E.create("vs/base/common/worker/simpleWorker",N=>{this._protocol.handleMessage(N)},N=>{_?.(N)})),this._protocol=new u({sendMessage:(N,P)=>{this._worker.postMessage(N,P)},handleMessage:(N,P)=>{if(typeof I[N]!="function")return Promise.reject(new Error("Missing method "+N+" on main thread host."));try{return Promise.resolve(I[N].apply(I,P))}catch(x){return Promise.reject(x)}},handleEvent:(N,P)=>{if(c(N)){const x=I[N].call(I,P);if(typeof x!="function")throw new Error(`Missing dynamic event ${N} on main thread host.`);return x}if(p(N)){const x=I[N];if(typeof x!="function")throw new Error(`Missing event ${N} on main thread host.`);return x}throw new Error(`Malformed event name ${N}`)}}),this._protocol.setWorkerId(this._worker.getId());let A=null;const k=globalThis.require;typeof k<"u"&&typeof k.getConfig=="function"?A=k.getConfig():typeof globalThis.requirejs<"u"&&(A=globalThis.requirejs.s.contexts._.config);const L=(0,D.getAllMethodNames)(I);this._onModuleLoaded=this._protocol.sendMessage(v,[this._worker.getId(),JSON.parse(JSON.stringify(A)),C,L]);const R=(N,P)=>this._request(N,P),M=(N,P)=>this._protocol.listen(N,P);this._lazyProxy=new Promise((N,P)=>{_=P,this._onModuleLoaded.then(x=>{N(l(x,R,M))},x=>{P(x),this._onError("Worker failed to load "+C,x)})})}getProxyObject(){return this._lazyProxy}_request(E,C){return new Promise((I,_)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(E,C).then(I,_)},_)})}_onError(E,C){console.error(E),console.info(C)}}e.SimpleWorkerClient=d;function p(w){return w[0]==="o"&&w[1]==="n"&&f.isUpperAsciiLetter(w.charCodeAt(2))}function c(w){return/^onDynamic/.test(w)&&f.isUpperAsciiLetter(w.charCodeAt(9))}function l(w,E,C){const I=k=>function(){const L=Array.prototype.slice.call(arguments,0);return E(k,L)},_=k=>function(L){return C(k,L)},A={};for(const k of w){if(c(k)){A[k]=_(k);continue}if(p(k)){A[k]=C(k,void 0);continue}A[k]=I(k)}return A}class n{constructor(E,C){this._requestHandlerFactory=C,this._requestHandler=null,this._protocol=new u({sendMessage:(I,_)=>{E(I,_)},handleMessage:(I,_)=>this._handleMessage(I,_),handleEvent:(I,_)=>this._handleEvent(I,_)})}onmessage(E){this._protocol.handleMessage(E)}_handleMessage(E,C){if(E===v)return this.initialize(C[0],C[1],C[2],C[3]);if(!this._requestHandler||typeof this._requestHandler[E]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+E));try{return Promise.resolve(this._requestHandler[E].apply(this._requestHandler,C))}catch(I){return Promise.reject(I)}}_handleEvent(E,C){if(!this._requestHandler)throw new Error("Missing requestHandler");if(c(E)){const I=this._requestHandler[E].call(this._requestHandler,C);if(typeof I!="function")throw new Error(`Missing dynamic event ${E} on request handler.`);return I}if(p(E)){const I=this._requestHandler[E];if(typeof I!="function")throw new Error(`Missing event ${E} on request handler.`);return I}throw new Error(`Malformed event name ${E}`)}initialize(E,C,I,_){this._protocol.setWorkerId(E);const L=l(_,(R,M)=>this._protocol.sendMessage(R,M),(R,M)=>this._protocol.listen(R,M));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(L),Promise.resolve((0,D.getAllMethodNames)(this._requestHandler))):(C&&(typeof C.baseUrl<"u"&&delete C.baseUrl,typeof C.paths<"u"&&typeof C.paths.vs<"u"&&delete C.paths.vs,typeof C.trustedTypesPolicy!==void 0&&delete C.trustedTypesPolicy,C.catchError=!0,globalThis.require.config(C)),new Promise((R,M)=>{(globalThis.require||q)([I],P=>{if(this._requestHandler=P.create(L),!this._requestHandler){M(new Error("No RequestHandler!"));return}R((0,D.getAllMethodNames)(this._requestHandler))},M)}))}}e.SimpleWorkerServer=n;function g(w){return new n(w,null)}e.create=g}),define(Q[672],Y([1,0,364,15,22,577]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultWorkerFactory=e.getWorkerBootstrapUrl=e.createBlobWorker=void 0;const T=(0,t.createTrustedTypesPolicy)("defaultWorkerFactory",{createScriptURL:r=>r});function f(r,i){if(!r.startsWith("blob:"))throw new URIError("Not a blob-url: "+r);return new Worker(T?T.createScriptURL(r):r,i)}e.createBlobWorker=f;function v(r){const i=globalThis.MonacoEnvironment;if(i){if(typeof i.getWorker=="function")return i.getWorker("workerMain.js",r);if(typeof i.getWorkerUrl=="function"){const s=i.getWorkerUrl("workerMain.js",r);return new Worker(T?T.createScriptURL(s):s,{name:r})}}if(typeof q=="function"){const s=q.toUrl("vs/base/worker/workerMain.js"),o=m(s,r);return new Worker(T?T.createScriptURL(o):o,{name:r})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function m(r,i){if(/^((http:)|(https:)|(file:))/.test(r)&&r.substring(0,globalThis.origin.length)!==globalThis.origin){const p="vs/base/worker/defaultWorkerFactory.js",c=q.toUrl(p).slice(0,-p.length),l=`/*${i}*/globalThis.MonacoEnvironment={baseUrl: '${c}'};const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });importScripts(ttPolicy?.createScriptURL('${r}') ?? '${r}');/*${i}*/`,n=new Blob([l],{type:"application/javascript"});return URL.createObjectURL(n)}const s=r.lastIndexOf("?"),o=r.lastIndexOf("#",s),u=s>0?new URLSearchParams(r.substring(s+1,~o?o:void 0)):new URLSearchParams;return b.COI.addSearchParam(u,!0,!0),u.toString()?`${r}?${u.toString()}#${i}`:`${r}#${i}`}e.getWorkerBootstrapUrl=m;function S(r){return typeof r.then=="function"}class h{constructor(i,s,o,u,d){this.id=s,this.label=o;const p=v(o);S(p)?this.worker=p:this.worker=Promise.resolve(p),this.postMessage(i,[]),this.worker.then(c=>{c.onmessage=function(l){u(l.data)},c.onmessageerror=d,typeof c.addEventListener=="function"&&c.addEventListener("error",d)})}getId(){return this.id}postMessage(i,s){this.worker?.then(o=>{try{o.postMessage(i,s)}catch(u){(0,y.onUnexpectedError)(u),(0,y.onUnexpectedError)(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:u}))}})}dispose(){this.worker?.then(i=>i.terminate()),this.worker=null}}class a{static{this.LAST_WORKER_ID=0}constructor(i){this._label=i,this._webWorkerFailedBeforeError=!1}create(i,s,o){const u=++a.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new h(i,u,this._label||"anonymous"+u,s,d=>{(0,D.logOnceWebWorkerWarning)(d),this._webWorkerFailedBeforeError=d,o(d)})}}e.DefaultWorkerFactory=a}),define(Q[250],Y([1,0,20,14,62,31,102,15,6,4,186,33,17]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPCLogger=e.ProxyChannel=e.StaticRouter=e.getNextTickChannel=e.getDelayedChannel=e.IPCClient=e.IPCServer=e.ChannelClient=e.RequestInitiator=e.ChannelServer=e.deserialize=e.serialize=e.BufferWriter=e.BufferReader=void 0;var r;(function(H){H[H.Promise=100]="Promise",H[H.PromiseCancel=101]="PromiseCancel",H[H.EventListen=102]="EventListen",H[H.EventDispose=103]="EventDispose"})(r||(r={}));function i(H){switch(H){case 100:return"req";case 101:return"cancel";case 102:return"subscribe";case 103:return"unsubscribe"}}var s;(function(H){H[H.Initialize=200]="Initialize",H[H.PromiseSuccess=201]="PromiseSuccess",H[H.PromiseError=202]="PromiseError",H[H.PromiseErrorObj=203]="PromiseErrorObj",H[H.EventFire=204]="EventFire"})(s||(s={}));function o(H){switch(H){case 200:return"init";case 201:return"reply:";case 202:case 203:return"replyErr:";case 204:return"event:"}}var u;(function(H){H[H.Uninitialized=0]="Uninitialized",H[H.Idle=1]="Idle"})(u||(u={}));function d(H){let U=0;for(let G=0;;G+=7){const $=H.read(1);if(U|=($.buffer[0]&127)<<G,!($.buffer[0]&128))return U}}const p=w(0);function c(H,U){if(U===0){H.write(p);return}let G=0;for(let ie=U;ie!==0;ie=ie>>>7)G++;const $=b.VSBuffer.alloc(G);for(let ie=0;U!==0;ie++)$.buffer[ie]=U&127,U=U>>>7,U>0&&($.buffer[ie]|=128);H.write($)}class l{constructor(U){this.buffer=U,this.pos=0}read(U){const G=this.buffer.slice(this.pos,this.pos+U);return this.pos+=G.byteLength,G}}e.BufferReader=l;class n{constructor(){this.buffers=[]}get buffer(){return b.VSBuffer.concat(this.buffers)}write(U){this.buffers.push(U)}}e.BufferWriter=n;var g;(function(H){H[H.Undefined=0]="Undefined",H[H.String=1]="String",H[H.Buffer=2]="Buffer",H[H.VSBuffer=3]="VSBuffer",H[H.Array=4]="Array",H[H.Object=5]="Object",H[H.Int=6]="Int"})(g||(g={}));function w(H){const U=b.VSBuffer.alloc(1);return U.writeUInt8(H,0),U}const E={Undefined:w(g.Undefined),String:w(g.String),Buffer:w(g.Buffer),VSBuffer:w(g.VSBuffer),Array:w(g.Array),Object:w(g.Object),Uint:w(g.Int)},C=typeof Buffer<"u";function I(H,U){if(typeof U>"u")H.write(E.Undefined);else if(typeof U=="string"){const G=b.VSBuffer.fromString(U);H.write(E.String),c(H,G.byteLength),H.write(G)}else if(C&&Buffer.isBuffer(U)){const G=b.VSBuffer.wrap(U);H.write(E.Buffer),c(H,G.byteLength),H.write(G)}else if(U instanceof b.VSBuffer)H.write(E.VSBuffer),c(H,U.byteLength),H.write(U);else if(Array.isArray(U)){H.write(E.Array),c(H,U.length);for(const G of U)I(H,G)}else if(typeof U=="number"&&(U|0)===U)H.write(E.Uint),c(H,U);else{const G=b.VSBuffer.fromString(JSON.stringify(U));H.write(E.Object),c(H,G.byteLength),H.write(G)}}e.serialize=I;function _(H){switch(H.read(1).readUInt8(0)){case g.Undefined:return;case g.String:return H.read(d(H)).toString();case g.Buffer:return H.read(d(H)).buffer;case g.VSBuffer:return H.read(d(H));case g.Array:{const G=d(H),$=[];for(let ie=0;ie<G;ie++)$.push(_(H));return $}case g.Object:return JSON.parse(H.read(d(H)).toString());case g.Int:return d(H)}}e.deserialize=_;class A{constructor(U,G,$=null,ie=1e3){this.protocol=U,this.ctx=G,this.logger=$,this.timeoutDelay=ie,this.channels=new Map,this.activeRequests=new Map,this.pendingRequests=new Map,this.protocolListener=this.protocol.onMessage(J=>this.onRawMessage(J)),this.sendResponse({type:200})}registerChannel(U,G){this.channels.set(U,G),setTimeout(()=>this.flushPendingRequests(U),0)}sendResponse(U){switch(U.type){case 200:{const G=this.send([U.type]);this.logger?.logOutgoing(G,0,1,o(U.type));return}case 201:case 202:case 204:case 203:{const G=this.send([U.type,U.id],U.data);this.logger?.logOutgoing(G,U.id,1,o(U.type),U.data);return}}}send(U,G=void 0){const $=new n;return I($,U),I($,G),this.sendBuffer($.buffer)}sendBuffer(U){try{return this.protocol.send(U),U.byteLength}catch{return 0}}onRawMessage(U){const G=new l(U),$=_(G),ie=_(G),J=$[0];switch(J){case 100:return this.logger?.logIncoming(U.byteLength,$[1],1,`${i(J)}: ${$[2]}.${$[3]}`,ie),this.onPromise({type:J,id:$[1],channelName:$[2],name:$[3],arg:ie});case 102:return this.logger?.logIncoming(U.byteLength,$[1],1,`${i(J)}: ${$[2]}.${$[3]}`,ie),this.onEventListen({type:J,id:$[1],channelName:$[2],name:$[3],arg:ie});case 101:return this.logger?.logIncoming(U.byteLength,$[1],1,`${i(J)}`),this.disposeActiveRequest({type:J,id:$[1]});case 103:return this.logger?.logIncoming(U.byteLength,$[1],1,`${i(J)}`),this.disposeActiveRequest({type:J,id:$[1]})}}onPromise(U){const G=this.channels.get(U.channelName);if(!G){this.collectPendingRequest(U);return}const $=new D.CancellationTokenSource;let ie;try{ie=G.call(this.ctx,U.name,U.arg,$.token)}catch(ee){ie=Promise.reject(ee)}const J=U.id;ie.then(ee=>{this.sendResponse({id:J,data:ee,type:201}),this.activeRequests.delete(U.id)},ee=>{ee instanceof Error?this.sendResponse({id:J,data:{message:ee.message,name:ee.name,stack:ee.stack?ee.stack.split?ee.stack.split(` `):ee.stack:void 0},type:202}):this.sendResponse({id:J,data:ee,type:203}),this.activeRequests.delete(U.id)});const j=(0,m.toDisposable)(()=>$.cancel());this.activeRequests.set(U.id,j)}onEventListen(U){const G=this.channels.get(U.channelName);if(!G){this.collectPendingRequest(U);return}const $=U.id,J=G.listen(this.ctx,U.name,U.arg)(j=>this.sendResponse({id:$,data:j,type:204}));this.activeRequests.set(U.id,J)}disposeActiveRequest(U){const G=this.activeRequests.get(U.id);G&&(G.dispose(),this.activeRequests.delete(U.id))}collectPendingRequest(U){let G=this.pendingRequests.get(U.channelName);G||(G=[],this.pendingRequests.set(U.channelName,G));const $=setTimeout(()=>{console.error(`Unknown channel: ${U.channelName}`),U.type===100&&this.sendResponse({id:U.id,data:{name:"Unknown channel",message:`Channel name '${U.channelName}' timed out after ${this.timeoutDelay}ms`,stack:void 0},type:202})},this.timeoutDelay);G.push({request:U,timeoutTimer:$})}flushPendingRequests(U){const G=this.pendingRequests.get(U);if(G){for(const $ of G)switch(clearTimeout($.timeoutTimer),$.request.type){case 100:this.onPromise($.request);break;case 102:this.onEventListen($.request);break}this.pendingRequests.delete(U)}}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,m.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}e.ChannelServer=A;var k;(function(H){H[H.LocalSide=0]="LocalSide",H[H.OtherSide=1]="OtherSide"})(k||(e.RequestInitiator=k={}));class L{constructor(U,G=null){this.protocol=U,this.isDisposed=!1,this.state=u.Uninitialized,this.activeRequests=new Set,this.handlers=new Map,this.lastRequestId=0,this._onDidInitialize=new v.Emitter,this.onDidInitialize=this._onDidInitialize.event,this.protocolListener=this.protocol.onMessage($=>this.onBuffer($)),this.logger=G}getChannel(U){const G=this;return{call($,ie,J){return G.isDisposed?Promise.reject(new f.CancellationError):G.requestPromise(U,$,ie,J)},listen($,ie){return G.isDisposed?v.Event.None:G.requestEvent(U,$,ie)}}}requestPromise(U,G,$,ie=D.CancellationToken.None){const J=this.lastRequestId++,ee={id:J,type:100,channelName:U,name:G,arg:$};if(ie.isCancellationRequested)return Promise.reject(new f.CancellationError);let X;return new Promise((Z,se)=>{if(ie.isCancellationRequested)return se(new f.CancellationError);const re=()=>{const ce=ae=>{switch(ae.type){case 201:this.handlers.delete(J),Z(ae.data);break;case 202:{this.handlers.delete(J);const ue=new Error(ae.data.message);ue.stack=Array.isArray(ae.data.stack)?ae.data.stack.join(` `):ae.data.stack,ue.name=ae.data.name,se(ue);break}case 203:this.handlers.delete(J),se(ae.data);break}};this.handlers.set(J,ce),this.sendRequest(ee)};let oe=null;this.state===u.Idle?re():(oe=(0,y.createCancelablePromise)(ce=>this.whenInitialized()),oe.then(()=>{oe=null,re()}));const le=()=>{oe?(oe.cancel(),oe=null):this.sendRequest({id:J,type:101}),se(new f.CancellationError)},ne=ie.onCancellationRequested(le);X=(0,m.combinedDisposable)((0,m.toDisposable)(le),ne),this.activeRequests.add(X)}).finally(()=>{this.activeRequests.delete(X)})}requestEvent(U,G,$){const ie=this.lastRequestId++,j={id:ie,type:102,channelName:U,name:G,arg:$};let ee=null;const X=new v.Emitter({onWillAddFirstListener:()=>{ee=(0,y.createCancelablePromise)(Z=>this.whenInitialized()),ee.then(()=>{ee=null,this.activeRequests.add(X),this.sendRequest(j)})},onDidRemoveLastListener:()=>{ee?(ee.cancel(),ee=null):(this.activeRequests.delete(X),this.sendRequest({id:ie,type:103}))}}),te=Z=>X.fire(Z.data);return this.handlers.set(ie,te),X.event}sendRequest(U){switch(U.type){case 100:case 102:{const G=this.send([U.type,U.id,U.channelName,U.name],U.arg);this.logger?.logOutgoing(G,U.id,0,`${i(U.type)}: ${U.channelName}.${U.name}`,U.arg);return}case 101:case 103:{const G=this.send([U.type,U.id]);this.logger?.logOutgoing(G,U.id,0,i(U.type));return}}}send(U,G=void 0){const $=new n;return I($,U),I($,G),this.sendBuffer($.buffer)}sendBuffer(U){try{return this.protocol.send(U),U.byteLength}catch{return 0}}onBuffer(U){const G=new l(U),$=_(G),ie=_(G),J=$[0];switch(J){case 200:return this.logger?.logIncoming(U.byteLength,0,0,o(J)),this.onResponse({type:$[0]});case 201:case 202:case 204:case 203:return this.logger?.logIncoming(U.byteLength,$[1],0,o(J),ie),this.onResponse({type:$[0],id:$[1],data:ie})}}onResponse(U){if(U.type===200){this.state=u.Idle,this._onDidInitialize.fire();return}this.handlers.get(U.id)?.(U)}get onDidInitializePromise(){return v.Event.toPromise(this.onDidInitialize)}whenInitialized(){return this.state===u.Idle?Promise.resolve():this.onDidInitializePromise}dispose(){this.isDisposed=!0,this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,m.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}e.ChannelClient=L,fe([T.memoize],L.prototype,"onDidInitializePromise",null);class R{get connections(){const U=[];return this._connections.forEach(G=>U.push(G)),U}constructor(U){this.channels=new Map,this._connections=new Set,this._onDidAddConnection=new v.Emitter,this.onDidAddConnection=this._onDidAddConnection.event,this._onDidRemoveConnection=new v.Emitter,this.onDidRemoveConnection=this._onDidRemoveConnection.event,U(({protocol:G,onDidClientDisconnect:$})=>{v.Event.once(G.onMessage)(J=>{const j=new l(J),ee=_(j),X=new A(G,ee),te=new L(G);this.channels.forEach((se,re)=>X.registerChannel(re,se));const Z={channelServer:X,channelClient:te,ctx:ee};this._connections.add(Z),this._onDidAddConnection.fire(Z),$(()=>{X.dispose(),te.dispose(),this._connections.delete(Z),this._onDidRemoveConnection.fire(Z)})})})}getChannel(U,G){const $=this;return{call(ie,J,j){let ee;if((0,a.isFunction)(G)){const te=(0,t.getRandomElement)($.connections.filter(G));ee=te?Promise.resolve(te):v.Event.toPromise(v.Event.filter($.onDidAddConnection,G))}else ee=G.routeCall($,ie,J);const X=ee.then(te=>te.channelClient.getChannel(U));return N(X).call(ie,J,j)},listen(ie,J){if((0,a.isFunction)(G))return $.getMulticastEvent(U,G,ie,J);const j=G.routeEvent($,ie,J).then(ee=>ee.channelClient.getChannel(U));return N(j).listen(ie,J)}}}getMulticastEvent(U,G,$,ie){const J=this;let j=new m.DisposableStore;const ee=new v.Emitter({onWillAddFirstListener:()=>{j=new m.DisposableStore;const X=new v.EventMultiplexer,te=new Map,Z=re=>{const le=re.channelClient.getChannel(U).listen($,ie),ne=X.add(le);te.set(re,ne)},se=re=>{const oe=te.get(re);oe&&(oe.dispose(),te.delete(re))};J.connections.filter(G).forEach(Z),v.Event.filter(J.onDidAddConnection,G)(Z,void 0,j),J.onDidRemoveConnection(se,void 0,j),X.event(ee.fire,ee,j),j.add(X)},onDidRemoveLastListener:()=>{j.dispose()}});return ee.event}registerChannel(U,G){this.channels.set(U,G),this._connections.forEach($=>{$.channelServer.registerChannel(U,G)})}dispose(){this.channels.clear(),this._connections.clear(),this._onDidAddConnection.dispose(),this._onDidRemoveConnection.dispose()}}e.IPCServer=R;class M{constructor(U,G,$=null){const ie=new n;I(ie,G),U.send(ie.buffer),this.channelClient=new L(U,$),this.channelServer=new A(U,G,$)}getChannel(U){return this.channelClient.getChannel(U)}registerChannel(U,G){this.channelServer.registerChannel(U,G)}dispose(){this.channelClient.dispose(),this.channelServer.dispose()}}e.IPCClient=M;function N(H){return{call(U,G,$){return H.then(ie=>ie.call(U,G,$))},listen(U,G){const $=new v.Relay;return H.then(ie=>$.input=ie.listen(U,G)),$.event}}}e.getDelayedChannel=N;function P(H){let U=!1;return{call(G,$,ie){return U?H.call(G,$,ie):(0,y.timeout)(0).then(()=>U=!0).then(()=>H.call(G,$,ie))},listen(G,$){if(U)return H.listen(G,$);const ie=new v.Relay;return(0,y.timeout)(0).then(()=>U=!0).then(()=>ie.input=H.listen(G,$)),ie.event}}}e.getNextTickChannel=P;class x{constructor(U){this.fn=U}routeCall(U){return this.route(U)}routeEvent(U){return this.route(U)}async route(U){for(const G of U.connections)if(await Promise.resolve(this.fn(G.ctx)))return Promise.resolve(G);return await v.Event.toPromise(U.onDidAddConnection),await this.route(U)}}e.StaticRouter=x;var F;(function(H){function U(J,j){const ee=J,X=j&&j.disableMarshalling,te=new Map;for(const Z in ee)$(Z)&&te.set(Z,v.Event.buffer(ee[Z],!0));return new class{listen(Z,se,re){const oe=te.get(se);if(oe)return oe;if(ie(se)){const le=ee[se];if(typeof le=="function")return le.call(ee,re)}throw new f.ErrorNoTelemetry(`Event not found: ${se}`)}call(Z,se,re){const oe=ee[se];if(typeof oe=="function"){if(!X&&Array.isArray(re))for(let le=0;le<re.length;le++)re[le]=(0,S.revive)(re[le]);return oe.apply(ee,re)}throw new f.ErrorNoTelemetry(`Method not found: ${se}`)}}}H.fromService=U;function G(J,j){const ee=j&&j.disableMarshalling;return new Proxy({},{get(X,te){if(typeof te=="string")return j?.properties?.has(te)?j.properties.get(te):ie(te)?function(Z){return J.listen(te,Z)}:$(te)?J.listen(te):async function(...Z){let se;j&&!(0,a.isUndefinedOrNull)(j.context)?se=[j.context,...Z]:se=Z;const re=await J.call(te,se);return ee?re:(0,S.revive)(re)};throw new f.ErrorNoTelemetry(`Property not found: ${String(te)}`)}})}H.toService=G;function $(J){return J[0]==="o"&&J[1]==="n"&&h.isUpperAsciiLetter(J.charCodeAt(2))}function ie(J){return/^onDynamic/.test(J)&&h.isUpperAsciiLetter(J.charCodeAt(9))}})(F||(e.ProxyChannel=F={}));const V=[["#2977B1","#FC802D","#34A13A","#D3282F","#9366BA"],["#8B564C","#E177C0","#7F7F7F","#BBBE3D","#2EBECD"]];function W(H){if(Array.isArray(H))return H;if(H&&typeof H=="object"&&typeof H.toString=="function"){const U=H.toString();if(U!=="[object Object]")return U}return H}function z(H){return Array.isArray(H)?H.map(W):W(H)}function B(H,U,G,$,ie,J,j){j=z(j);const ee=V[ie],X=ee[$%ee.length];let te=[`%c[${H}]%c[${String(U).padStart(7," ")}]%c[len: ${String(G).padStart(5," ")}]%c${String($).padStart(5," ")} - ${J}`,"color: darkgreen","color: grey","color: grey",`color: ${X}`];/\($/.test(J)?(te=te.concat(j),te.push(")")):te.push(j),console.log.apply(console,te)}class K{constructor(U,G){this._outgoingPrefix=U,this._incomingPrefix=G,this._totalIncoming=0,this._totalOutgoing=0}logOutgoing(U,G,$,ie,J){this._totalOutgoing+=U,B(this._outgoingPrefix,this._totalOutgoing,U,G,$,ie,J)}logIncoming(U,G,$,ie,J){this._totalIncoming+=U,B(this._incomingPrefix,this._totalIncoming,U,G,$,ie,J)}}e.IPCLogger=K}),define(Q[835],Y([1,0,62,6,250]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Client=e.Protocol=void 0;class D{constructor(v){this.port=v,this.onMessage=y.Event.fromDOMEventEmitter(this.port,"message",m=>t.VSBuffer.wrap(m.data)),v.start()}send(v){this.port.postMessage(v.buffer)}disconnect(){this.port.close()}}e.Protocol=D;class T extends b.IPCClient{constructor(v,m){const S=new D(v);super(S,m),this.protocol=S}dispose(){this.protocol.disconnect()}}e.Client=T}),define(Q[673],Y([1,0,62,6,4,250]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PersistentProtocol=e.BufferedEmitter=e.Client=e.Protocol=e.ProtocolConstants=e.ChunkStream=e.SocketCloseEventType=e.SocketDiagnostics=e.SocketDiagnosticsEventType=void 0;var T;(function(E){E.Created="created",E.Read="read",E.Write="write",E.Open="open",E.Error="error",E.Close="close",E.BrowserWebSocketBlobReceived="browserWebSocketBlobReceived",E.NodeEndReceived="nodeEndReceived",E.NodeEndSent="nodeEndSent",E.NodeDrainBegin="nodeDrainBegin",E.NodeDrainEnd="nodeDrainEnd",E.zlibInflateError="zlibInflateError",E.zlibInflateData="zlibInflateData",E.zlibInflateInitialWrite="zlibInflateInitialWrite",E.zlibInflateInitialFlushFired="zlibInflateInitialFlushFired",E.zlibInflateWrite="zlibInflateWrite",E.zlibInflateFlushFired="zlibInflateFlushFired",E.zlibDeflateError="zlibDeflateError",E.zlibDeflateData="zlibDeflateData",E.zlibDeflateWrite="zlibDeflateWrite",E.zlibDeflateFlushFired="zlibDeflateFlushFired",E.WebSocketNodeSocketWrite="webSocketNodeSocketWrite",E.WebSocketNodeSocketPeekedHeader="webSocketNodeSocketPeekedHeader",E.WebSocketNodeSocketReadHeader="webSocketNodeSocketReadHeader",E.WebSocketNodeSocketReadData="webSocketNodeSocketReadData",E.WebSocketNodeSocketUnmaskedData="webSocketNodeSocketUnmaskedData",E.WebSocketNodeSocketDrainBegin="webSocketNodeSocketDrainBegin",E.WebSocketNodeSocketDrainEnd="webSocketNodeSocketDrainEnd",E.ProtocolHeaderRead="protocolHeaderRead",E.ProtocolMessageRead="protocolMessageRead",E.ProtocolHeaderWrite="protocolHeaderWrite",E.ProtocolMessageWrite="protocolMessageWrite",E.ProtocolWrite="protocolWrite"})(T||(e.SocketDiagnosticsEventType=T={}));var f;(function(E){E.enableDiagnostics=!1,E.records=[];const C=new WeakMap;let I=0;function _(k,L){if(!C.has(k)){const R=String(++I);C.set(k,R)}return C.get(k)}function A(k,L,R,M){if(!E.enableDiagnostics)return;const N=_(k,L);if(M instanceof t.VSBuffer||M instanceof Uint8Array||M instanceof ArrayBuffer||ArrayBuffer.isView(M)){const P=t.VSBuffer.alloc(M.byteLength);P.set(M),E.records.push({timestamp:Date.now(),id:N,label:L,type:R,buff:P})}else E.records.push({timestamp:Date.now(),id:N,label:L,type:R,data:M})}E.traceSocketEvent=A})(f||(e.SocketDiagnostics=f={}));var v;(function(E){E[E.NodeSocketCloseEvent=0]="NodeSocketCloseEvent",E[E.WebSocketCloseEvent=1]="WebSocketCloseEvent"})(v||(e.SocketCloseEventType=v={}));let m=null;function S(){return m||(m=t.VSBuffer.alloc(0)),m}class h{get byteLength(){return this._totalLength}constructor(){this._chunks=[],this._totalLength=0}acceptChunk(C){this._chunks.push(C),this._totalLength+=C.byteLength}read(C){return this._read(C,!0)}peek(C){return this._read(C,!1)}_read(C,I){if(C===0)return S();if(C>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===C){const L=this._chunks[0];return I&&(this._chunks.shift(),this._totalLength-=C),L}if(this._chunks[0].byteLength>C){const L=this._chunks[0].slice(0,C);return I&&(this._chunks[0]=this._chunks[0].slice(C),this._totalLength-=C),L}const _=t.VSBuffer.alloc(C);let A=0,k=0;for(;C>0;){const L=this._chunks[k];if(L.byteLength>C){const R=L.slice(0,C);_.set(R,A),A+=C,I&&(this._chunks[k]=L.slice(C),this._totalLength-=C),C-=C}else _.set(L,A),A+=L.byteLength,I?(this._chunks.shift(),this._totalLength-=L.byteLength):k++,C-=L.byteLength}return _}}e.ChunkStream=h;var a;(function(E){E[E.None=0]="None",E[E.Regular=1]="Regular",E[E.Control=2]="Control",E[E.Ack=3]="Ack",E[E.Disconnect=5]="Disconnect",E[E.ReplayRequest=6]="ReplayRequest",E[E.Pause=7]="Pause",E[E.Resume=8]="Resume",E[E.KeepAlive=9]="KeepAlive"})(a||(a={}));function r(E){switch(E){case 0:return"None";case 1:return"Regular";case 2:return"Control";case 3:return"Ack";case 5:return"Disconnect";case 6:return"ReplayRequest";case 7:return"PauseWriting";case 8:return"ResumeWriting";case 9:return"KeepAlive"}}var i;(function(E){E[E.HeaderLength=13]="HeaderLength",E[E.AcknowledgeTime=2e3]="AcknowledgeTime",E[E.TimeoutTime=2e4]="TimeoutTime",E[E.ReconnectionGraceTime=108e5]="ReconnectionGraceTime",E[E.ReconnectionShortGraceTime=3e5]="ReconnectionShortGraceTime",E[E.KeepAliveSendTime=5e3]="KeepAliveSendTime"})(i||(e.ProtocolConstants=i={}));class s{constructor(C,I,_,A){this.type=C,this.id=I,this.ack=_,this.data=A,this.writtenTime=0}get size(){return this.data.byteLength}}class o extends b.Disposable{constructor(C){super(),this._onMessage=this._register(new y.Emitter),this.onMessage=this._onMessage.event,this._state={readHead:!0,readLen:13,messageType:0,id:0,ack:0},this._socket=C,this._isDisposed=!1,this._incomingData=new h,this._register(this._socket.onData(I=>this.acceptChunk(I))),this.lastReadTime=Date.now()}acceptChunk(C){if(!(!C||C.byteLength===0))for(this.lastReadTime=Date.now(),this._incomingData.acceptChunk(C);this._incomingData.byteLength>=this._state.readLen;){const I=this._incomingData.read(this._state.readLen);if(this._state.readHead)this._state.readHead=!1,this._state.readLen=I.readUInt32BE(9),this._state.messageType=I.readUInt8(0),this._state.id=I.readUInt32BE(1),this._state.ack=I.readUInt32BE(5),this._socket.traceSocketEvent("protocolHeaderRead",{messageType:r(this._state.messageType),id:this._state.id,ack:this._state.ack,messageSize:this._state.readLen});else{const _=this._state.messageType,A=this._state.id,k=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._socket.traceSocketEvent("protocolMessageRead",I),this._onMessage.fire(new s(_,A,k,I)),this._isDisposed)break}}}readEntireBuffer(){return this._incomingData.read(this._incomingData.byteLength)}dispose(){this._isDisposed=!0,super.dispose()}}class u{constructor(C){this._writeNowTimeout=null,this._isDisposed=!1,this._isPaused=!1,this._socket=C,this._data=[],this._totalLength=0,this.lastWriteTime=0}dispose(){try{this.flush()}catch{}this._isDisposed=!0}drain(){return this.flush(),this._socket.drain()}flush(){this._writeNow()}pause(){this._isPaused=!0}resume(){this._isPaused=!1,this._scheduleWriting()}write(C){if(this._isDisposed)return;C.writtenTime=Date.now(),this.lastWriteTime=Date.now();const I=t.VSBuffer.alloc(13);I.writeUInt8(C.type,0),I.writeUInt32BE(C.id,1),I.writeUInt32BE(C.ack,5),I.writeUInt32BE(C.data.byteLength,9),this._socket.traceSocketEvent("protocolHeaderWrite",{messageType:r(C.type),id:C.id,ack:C.ack,messageSize:C.data.byteLength}),this._socket.traceSocketEvent("protocolMessageWrite",C.data),this._writeSoon(I,C.data)}_bufferAdd(C,I){const _=this._totalLength===0;return this._data.push(C,I),this._totalLength+=C.byteLength+I.byteLength,_}_bufferTake(){const C=t.VSBuffer.concat(this._data,this._totalLength);return this._data.length=0,this._totalLength=0,C}_writeSoon(C,I){this._bufferAdd(C,I)&&this._scheduleWriting()}_scheduleWriting(){this._writeNowTimeout||(this._writeNowTimeout=setTimeout(()=>{this._writeNowTimeout=null,this._writeNow()}))}_writeNow(){if(this._totalLength===0||this._isPaused)return;const C=this._bufferTake();this._socket.traceSocketEvent("protocolWrite",{byteLength:C.byteLength}),this._socket.write(C)}}class d extends b.Disposable{constructor(C){super(),this._onMessage=new y.Emitter,this.onMessage=this._onMessage.event,this._onDidDispose=new y.Emitter,this.onDidDispose=this._onDidDispose.event,this._socket=C,this._socketWriter=this._register(new u(this._socket)),this._socketReader=this._register(new o(this._socket)),this._register(this._socketReader.onMessage(I=>{I.type===1&&this._onMessage.fire(I.data)})),this._register(this._socket.onClose(()=>this._onDidDispose.fire()))}drain(){return this._socketWriter.drain()}getSocket(){return this._socket}sendDisconnect(){}send(C){this._socketWriter.write(new s(1,0,0,C))}}e.Protocol=d;class p extends D.IPCClient{static fromSocket(C,I){return new p(new d(C),I)}get onDidDispose(){return this.protocol.onDidDispose}constructor(C,I,_=null){super(C,I,_),this.protocol=C}dispose(){super.dispose();const C=this.protocol.getSocket();this.protocol.sendDisconnect(),this.protocol.dispose(),C.end()}}e.Client=p;class c{constructor(){this._hasListeners=!1,this._isDeliveringMessages=!1,this._bufferedMessages=[],this._emitter=new y.Emitter({onWillAddFirstListener:()=>{this._hasListeners=!0,queueMicrotask(()=>this._deliverMessages())},onDidRemoveLastListener:()=>{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(C){this._hasListeners?this._bufferedMessages.length>0?this._bufferedMessages.push(C):this._emitter.fire(C):this._bufferedMessages.push(C)}flushBuffer(){this._bufferedMessages=[]}}e.BufferedEmitter=c;class l{constructor(C){this.data=C,this.next=null}}class n{constructor(){this._first=null,this._last=null}length(){let C=0,I=this._first;for(;I;)I=I.next,C++;return C}peek(){return this._first?this._first.data:null}toArray(){const C=[];let I=0,_=this._first;for(;_;)C[I++]=_.data,_=_.next;return C}pop(){if(this._first){if(this._first===this._last){this._first=null,this._last=null;return}this._first=this._first.next}}push(C){const I=new l(C);if(!this._first){this._first=I,this._last=I;return}this._last.next=I,this._last=I}}class g{static{this._HISTORY_LENGTH=10}static{this._INSTANCE=null}static getInstance(){return g._INSTANCE||(g._INSTANCE=new g),g._INSTANCE}constructor(){this.lastRuns=[];const C=Date.now();for(let I=0;I<g._HISTORY_LENGTH;I++)this.lastRuns[I]=C-1e3*I;setInterval(()=>{for(let I=g._HISTORY_LENGTH;I>=1;I--)this.lastRuns[I]=this.lastRuns[I-1];this.lastRuns[0]=Date.now()},1e3)}load(){const C=Date.now(),I=(1+g._HISTORY_LENGTH)*1e3;let _=0;for(let A=0;A<g._HISTORY_LENGTH;A++)C-this.lastRuns[A]<=I&&_++;return 1-_/g._HISTORY_LENGTH}hasHighLoad(){return this.load()>=.5}}class w{get unacknowledgedCount(){return this._outgoingMsgId-this._outgoingAckId}constructor(C){this._onControlMessage=new c,this.onControlMessage=this._onControlMessage.event,this._onMessage=new c,this.onMessage=this._onMessage.event,this._onDidDispose=new c,this.onDidDispose=this._onDidDispose.event,this._onSocketClose=new c,this.onSocketClose=this._onSocketClose.event,this._onSocketTimeout=new c,this.onSocketTimeout=this._onSocketTimeout.event,this._loadEstimator=C.loadEstimator??g.getInstance(),this._shouldSendKeepAlive=C.sendKeepAlive??!0,this._isReconnecting=!1,this._outgoingUnackMsg=new n,this._outgoingMsgId=0,this._outgoingAckId=0,this._outgoingAckTimeout=null,this._incomingMsgId=0,this._incomingAckId=0,this._incomingMsgLastTime=0,this._incomingAckTimeout=null,this._lastReplayRequestTime=0,this._lastSocketTimeoutTime=Date.now(),this._socketDisposables=new b.DisposableStore,this._socket=C.socket,this._socketWriter=this._socketDisposables.add(new u(this._socket)),this._socketReader=this._socketDisposables.add(new o(this._socket)),this._socketDisposables.add(this._socketReader.onMessage(I=>this._receiveMessage(I))),this._socketDisposables.add(this._socket.onClose(I=>this._onSocketClose.fire(I))),C.initialChunk&&this._socketReader.acceptChunk(C.initialChunk),this._shouldSendKeepAlive?this._keepAliveInterval=setInterval(()=>{this._sendKeepAlive()},5e3):this._keepAliveInterval=null}dispose(){this._outgoingAckTimeout&&(clearTimeout(this._outgoingAckTimeout),this._outgoingAckTimeout=null),this._incomingAckTimeout&&(clearTimeout(this._incomingAckTimeout),this._incomingAckTimeout=null),this._keepAliveInterval&&(clearInterval(this._keepAliveInterval),this._keepAliveInterval=null),this._socketDisposables.dispose()}drain(){return this._socketWriter.drain()}sendDisconnect(){const C=new s(5,0,0,S());this._socketWriter.write(C),this._socketWriter.flush()}sendPause(){const C=new s(7,0,0,S());this._socketWriter.write(C)}sendResume(){const C=new s(8,0,0,S());this._socketWriter.write(C)}pauseSocketWriting(){this._socketWriter.pause()}getSocket(){return this._socket}getMillisSinceLastIncomingData(){return Date.now()-this._socketReader.lastReadTime}beginAcceptReconnection(C,I){this._isReconnecting=!0,this._socketDisposables.dispose(),this._socketDisposables=new b.DisposableStore,this._onControlMessage.flushBuffer(),this._onSocketClose.flushBuffer(),this._onSocketTimeout.flushBuffer(),this._socket.dispose(),this._lastReplayRequestTime=0,this._lastSocketTimeoutTime=Date.now(),this._socket=C,this._socketWriter=this._socketDisposables.add(new u(this._socket)),this._socketReader=this._socketDisposables.add(new o(this._socket)),this._socketDisposables.add(this._socketReader.onMessage(_=>this._receiveMessage(_))),this._socketDisposables.add(this._socket.onClose(_=>this._onSocketClose.fire(_))),this._socketReader.acceptChunk(I)}endAcceptReconnection(){this._isReconnecting=!1,this._incomingAckId=this._incomingMsgId;const C=new s(3,0,this._incomingAckId,S());this._socketWriter.write(C);const I=this._outgoingUnackMsg.toArray();for(let _=0,A=I.length;_<A;_++)this._socketWriter.write(I[_]);this._recvAckCheck()}acceptDisconnect(){this._onDidDispose.fire()}_receiveMessage(C){if(C.ack>this._outgoingAckId){this._outgoingAckId=C.ack;do{const I=this._outgoingUnackMsg.peek();if(I&&I.id<=C.ack)this._outgoingUnackMsg.pop();else break}while(!0)}switch(C.type){case 0:break;case 1:{if(C.id>this._incomingMsgId)if(C.id!==this._incomingMsgId+1){const I=Date.now();I-this._lastReplayRequestTime>1e4&&(this._lastReplayRequestTime=I,this._socketWriter.write(new s(6,0,0,S())))}else this._incomingMsgId=C.id,this._incomingMsgLastTime=Date.now(),this._sendAckCheck(),this._onMessage.fire(C.data);break}case 2:{this._onControlMessage.fire(C.data);break}case 3:break;case 5:{this._onDidDispose.fire();break}case 6:{const I=this._outgoingUnackMsg.toArray();for(let _=0,A=I.length;_<A;_++)this._socketWriter.write(I[_]);this._recvAckCheck();break}case 7:{this._socketWriter.pause();break}case 8:{this._socketWriter.resume();break}case 9:break}}readEntireBuffer(){return this._socketReader.readEntireBuffer()}flush(){this._socketWriter.flush()}send(C){const I=++this._outgoingMsgId;this._incomingAckId=this._incomingMsgId;const _=new s(1,I,this._incomingAckId,C);this._outgoingUnackMsg.push(_),this._isReconnecting||(this._socketWriter.write(_),this._recvAckCheck())}sendControl(C){const I=new s(2,0,0,C);this._socketWriter.write(I)}_sendAckCheck(){if(this._incomingMsgId<=this._incomingAckId||this._incomingAckTimeout)return;const C=Date.now()-this._incomingMsgLastTime;if(C>=2e3){this._sendAck();return}this._incomingAckTimeout=setTimeout(()=>{this._incomingAckTimeout=null,this._sendAckCheck()},2e3-C+5)}_recvAckCheck(){if(this._outgoingMsgId<=this._outgoingAckId||this._outgoingAckTimeout||this._isReconnecting)return;const C=this._outgoingUnackMsg.peek(),I=Date.now()-C.writtenTime,_=Date.now()-this._socketReader.lastReadTime,A=Date.now()-this._lastSocketTimeoutTime;if(I>=2e4&&_>=2e4&&A>=2e4&&!this._loadEstimator.hasHighLoad()){this._lastSocketTimeoutTime=Date.now(),this._onSocketTimeout.fire({unacknowledgedMsgCount:this._outgoingUnackMsg.length(),timeSinceOldestUnacknowledgedMsg:I,timeSinceLastReceivedSomeData:_});return}const k=Math.max(2e4-I,2e4-_,2e4-A,500);this._outgoingAckTimeout=setTimeout(()=>{this._outgoingAckTimeout=null,this._recvAckCheck()},k)}_sendAck(){if(this._incomingMsgId<=this._incomingAckId)return;this._incomingAckId=this._incomingMsgId;const C=new s(3,0,this._incomingAckId,S());this._socketWriter.write(C)}_sendKeepAlive(){this._incomingAckId=this._incomingMsgId;const C=new s(9,0,this._incomingAckId,S());this._socketWriter.write(C)}}e.PersistentProtocol=w}),define(Q[274],Y([1,0,18]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.context=e.process=e.webFrame=e.ipcMessagePort=e.ipcRenderer=void 0,e.ipcRenderer=t.globals.vscode.ipcRenderer,e.ipcMessagePort=t.globals.vscode.ipcMessagePort,e.webFrame=t.globals.vscode.webFrame,e.process=t.globals.vscode.process,e.context=t.globals.vscode.context}),define(Q[2318],Y([1,0,1543,274]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.popup=void 0;let b=0;function D(f,v,m){const S=[],h=b++,a=`vscode:onContextMenu${h}`,r=(i,s,o)=>{S[s].click?.(o)};y.ipcRenderer.once(a,r),y.ipcRenderer.once(t.CONTEXT_MENU_CLOSE_CHANNEL,(i,s)=>{s===h&&(y.ipcRenderer.removeListener(a,r),m?.())}),y.ipcRenderer.send(t.CONTEXT_MENU_CHANNEL,h,f.map(i=>T(i,S)),a,v)}e.popup=D;function T(f,v){const m={id:v.length,label:f.label,type:f.type,accelerator:f.accelerator,checked:f.checked,enabled:typeof f.enabled=="boolean"?f.enabled:!0,visible:typeof f.visible=="boolean"?f.visible:!0};return v.push(f),Array.isArray(f.submenu)&&(m.submenu=f.submenu.map(S=>T(S,v))),m}}),define(Q[2319],Y([1,0,62,6,250,1544,274]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Client=void 0;class f extends b.IPCClient{static createProtocol(){const m=y.Event.fromNodeEventEmitter(T.ipcRenderer,"vscode:message",(S,h)=>t.VSBuffer.wrap(h));return T.ipcRenderer.send("vscode:hello"),new D.Protocol(T.ipcRenderer,m)}constructor(m){const S=f.createProtocol();super(S,m),this.protocol=S}dispose(){this.protocol.disconnect()}}e.Client=f}),define(Q[674],Y([1,0,6,59,274]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.acquirePort=void 0;async function D(T,f,v=(0,y.generateUuid)()){b.ipcMessagePort.acquire(f,v),typeof T=="string"&&b.ipcRenderer.send(T,v);const m=t.Event.fromDOMEventEmitter(window,"message",h=>({nonce:h.data,port:h.ports[0],source:h.source})),{port:S}=await t.Event.toPromise(t.Event.once(t.Event.filter(m,h=>h.nonce===v&&h.source===window)));return S}e.acquirePort=D}),define(Q[836],Y([1,0,14,6,4,186,17]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=e.StorageState=e.isStorageItemsChangeEvent=e.StorageHint=void 0;var f;(function(a){a[a.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",a[a.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(f||(e.StorageHint=f={}));function v(a){const r=a;return r?.changed instanceof Map||r?.deleted instanceof Set}e.isStorageItemsChangeEvent=v;var m;(function(a){a[a.None=0]="None",a[a.Initialized=1]="Initialized",a[a.Closed=2]="Closed"})(m||(e.StorageState=m={}));class S extends b.Disposable{static{this.DEFAULT_FLUSH_DELAY=100}constructor(r,i=Object.create(null)){super(),this.database=r,this.options=i,this._onDidChangeStorage=this._register(new y.PauseableEmitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=m.None,this.cache=new Map,this.flushDelayer=new t.ThrottledDelayer(S.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.pendingClose=void 0,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(r=>this.onDidChangeItemsExternal(r)))}onDidChangeItemsExternal(r){this._onDidChangeStorage.pause();try{r.changed?.forEach((i,s)=>this.acceptExternal(s,i)),r.deleted?.forEach(i=>this.acceptExternal(i,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(r,i){if(this.state===m.Closed)return;let s=!1;(0,T.isUndefinedOrNull)(i)?s=this.cache.delete(r):this.cache.get(r)!==i&&(this.cache.set(r,i),s=!0),s&&this._onDidChangeStorage.fire({key:r,external:!0})}get items(){return this.cache}get size(){return this.cache.size}async init(){this.state===m.None&&(this.state=m.Initialized,this.options.hint!==f.STORAGE_DOES_NOT_EXIST&&(this.cache=await this.database.getItems()))}get(r,i){const s=this.cache.get(r);return(0,T.isUndefinedOrNull)(s)?i:s}getBoolean(r,i){const s=this.get(r);return(0,T.isUndefinedOrNull)(s)?i:s==="true"}getNumber(r,i){const s=this.get(r);return(0,T.isUndefinedOrNull)(s)?i:parseInt(s,10)}getObject(r,i){const s=this.get(r);return(0,T.isUndefinedOrNull)(s)?i:(0,D.parse)(s)}async set(r,i,s=!1){if(this.state===m.Closed)return;if((0,T.isUndefinedOrNull)(i))return this.delete(r,s);const o=(0,T.isObject)(i)||Array.isArray(i)?(0,D.stringify)(i):String(i);if(this.cache.get(r)!==o)return this.cache.set(r,o),this.pendingInserts.set(r,o),this.pendingDeletes.delete(r),this._onDidChangeStorage.fire({key:r,external:s}),this.doFlush()}async delete(r,i=!1){if(!(this.state===m.Closed||!this.cache.delete(r)))return this.pendingDeletes.has(r)||this.pendingDeletes.add(r),this.pendingInserts.delete(r),this._onDidChangeStorage.fire({key:r,external:i}),this.doFlush()}async close(){return this.pendingClose||(this.pendingClose=this.doClose()),this.pendingClose}async doClose(){this.state=m.Closed;try{await this.doFlush(0)}catch{}await this.database.close(()=>this.cache)}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const r={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(r).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async flush(r){if(this.hasPending)return this.doFlush(r)}async doFlush(r){return this.flushDelayer.trigger(()=>this.flushPending(),r)}async whenFlushed(){if(this.hasPending)return new Promise(r=>this.whenFlushedCallbacks.push(r))}isInMemory(){return this.options.hint===f.STORAGE_IN_MEMORY}dispose(){this.flushDelayer.dispose(),super.dispose()}}e.Storage=S;class h{constructor(){this.onDidChangeItemsExternal=y.Event.None,this.items=new Map}async getItems(){return this.items}async updateItems(r){r.insert?.forEach((i,s)=>this.items.set(s,i)),r.delete?.forEach(i=>this.items.delete(i))}async close(){}}e.InMemoryStorageDatabase=h}),define(Q[675],Y([1,0,97,7,227,67,780,14,6,4,197,33,1068,96]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaWrapper=e.ClipboardEventUtils=e.TextAreaInput=e.InMemoryClipboardMetadataManager=e.CopyOptions=e.TextAreaSyntethicEvents=void 0;var i;(function(p){p.Tap="-monaco-textarea-synthetic-tap"})(i||(e.TextAreaSyntethicEvents=i={})),e.CopyOptions={forceCopyWithSyntaxHighlighting:!1};class s{static{this.INSTANCE=new s}constructor(){this._lastState=null}set(c,l){this._lastState={lastCopiedValue:c,data:l}}get(c){return this._lastState&&this._lastState.lastCopiedValue===c?this._lastState.data:(this._lastState=null,null)}}e.InMemoryClipboardMetadataManager=s;class o{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(c){c=c||"";const l={text:c,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=c.length,l}}class u extends m.Disposable{get textAreaState(){return this._textAreaState}constructor(c,l,n,g){super(),this._host=c,this._textArea=l,this._OS=n,this._browser=g,this._onFocus=this._register(new v.Emitter),this.onFocus=this._onFocus.event,this._onBlur=this._register(new v.Emitter),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new v.Emitter),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new v.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new v.Emitter),this.onCut=this._onCut.event,this._onPaste=this._register(new v.Emitter),this.onPaste=this._onPaste.event,this._onType=this._register(new v.Emitter),this.onType=this._onType.event,this._onCompositionStart=this._register(new v.Emitter),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new v.Emitter),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new v.Emitter),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new v.Emitter),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new f.RunOnceScheduler(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new f.RunOnceScheduler(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=a.TextAreaState.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let w=null;this._register(this._textArea.onKeyDown(E=>{const C=new D.StandardKeyboardEvent(E);(C.keyCode===114||this._currentComposition&&C.keyCode===1)&&C.stopPropagation(),C.equals(9)&&C.preventDefault(),w=C,this._onKeyDown.fire(C)})),this._register(this._textArea.onKeyUp(E=>{const C=new D.StandardKeyboardEvent(E);this._onKeyUp.fire(C)})),this._register(this._textArea.onCompositionStart(E=>{a._debugComposition&&console.log("[compositionstart]",E);const C=new o;if(this._currentComposition){this._currentComposition=C;return}if(this._currentComposition=C,this._OS===2&&w&&w.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===E.data&&(w.code==="ArrowRight"||w.code==="ArrowLeft")){a._debugComposition&&console.log("[compositionstart] Handling long press case on macOS + arrow key",E),C.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:E.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:E.data});return}this._onCompositionStart.fire({data:E.data})})),this._register(this._textArea.onCompositionUpdate(E=>{a._debugComposition&&console.log("[compositionupdate]",E);const C=this._currentComposition;if(!C)return;if(this._browser.isAndroid){const _=a.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),A=a.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,_);this._textAreaState=_,this._onType.fire(A),this._onCompositionUpdate.fire(E);return}const I=C.handleCompositionUpdate(E.data);this._textAreaState=a.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(I),this._onCompositionUpdate.fire(E)})),this._register(this._textArea.onCompositionEnd(E=>{a._debugComposition&&console.log("[compositionend]",E);const C=this._currentComposition;if(!C)return;if(this._currentComposition=null,this._browser.isAndroid){const _=a.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),A=a.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,_);this._textAreaState=_,this._onType.fire(A),this._onCompositionEnd.fire();return}const I=C.handleCompositionUpdate(E.data);this._textAreaState=a.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(I),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(E=>{if(a._debugComposition&&console.log("[input]",E),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const C=a.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),I=a.TextAreaState.deduceInput(this._textAreaState,C,this._OS===2);I.replacePrevCharCnt===0&&I.text.length===1&&(h.isHighSurrogate(I.text.charCodeAt(0))||I.text.charCodeAt(0)===127)||(this._textAreaState=C,(I.text!==""||I.replacePrevCharCnt!==0||I.replaceNextCharCnt!==0||I.positionDelta!==0)&&this._onType.fire(I))})),this._register(this._textArea.onCut(E=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(E),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(E=>{this._ensureClipboardGetsEditorSelection(E)})),this._register(this._textArea.onPaste(E=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),E.preventDefault(),!E.clipboardData)return;let[C,I]=e.ClipboardEventUtils.getTextData(E.clipboardData);C&&(I=I||s.INSTANCE.get(C),this._onPaste.fire({text:C,metadata:I}))})),this._register(this._textArea.onFocus(()=>{const E=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!E&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_initializeFromTest(){this._hasFocus=!0,this._textAreaState=a.TextAreaState.readFromTextArea(this._textArea,null)}_installSelectionChangeListener(){let c=0;return y.addDisposableListener(document,"selectionchange",l=>{if(T.inputLatency.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const n=Date.now(),g=n-c;if(c=n,g<5)return;const w=n-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),w<100||!this._textAreaState.selection)return;const E=this._textArea.getValue();if(this._textAreaState.value!==E)return;const C=this._textArea.getSelectionStart(),I=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===C&&this._textAreaState.selectionEnd===I)return;const _=this._textAreaState.deduceEditorPosition(C),A=this._host.deduceModelPosition(_[0],_[1],_[2]),k=this._textAreaState.deduceEditorPosition(I),L=this._host.deduceModelPosition(k[0],k[1],k[2]),R=new r.Selection(A.lineNumber,A.column,L.lineNumber,L.column);this._onSelectionChangeRequest.fire(R)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(c){this._hasFocus!==c&&(this._hasFocus=c,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(c,l){this._hasFocus||(l=l.collapseSelection()),l.writeToTextArea(c,this._textArea,this._hasFocus),this._textAreaState=l}writeScreenReaderContent(c){this._currentComposition||this._setAndWriteTextAreaState(c,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(c){const l=this._host.getDataToCopy(),n={version:1,isFromEmptySelection:l.isFromEmptySelection,multicursorText:l.multicursorText,mode:l.mode};s.INSTANCE.set(this._browser.isFirefox?l.text.replace(/\r\n/g,` `):l.text,n),c.preventDefault(),c.clipboardData&&e.ClipboardEventUtils.setTextData(c.clipboardData,l.text,l.html,n)}}e.TextAreaInput=u,e.ClipboardEventUtils={getTextData(p){const c=p.getData(S.Mimes.text);let l=null;const n=p.getData("vscode-editor-data");if(typeof n=="string")try{l=JSON.parse(n),l.version!==1&&(l=null)}catch{}return c.length===0&&l===null&&p.files.length>0?[Array.prototype.slice.call(p.files,0).map(w=>w.name).join(` `),null]:[c,l]},setTextData(p,c,l,n){p.setData(S.Mimes.text,c),typeof l=="string"&&p.setData("text/html",l),p.setData("vscode-editor-data",JSON.stringify(n))}};class d extends m.Disposable{constructor(c){super(),this._actual=c,this.onKeyDown=this._register(new b.DomEmitter(this._actual,"keydown")).event,this.onKeyPress=this._register(new b.DomEmitter(this._actual,"keypress")).event,this.onKeyUp=this._register(new b.DomEmitter(this._actual,"keyup")).event,this.onCompositionStart=this._register(new b.DomEmitter(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new b.DomEmitter(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new b.DomEmitter(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new b.DomEmitter(this._actual,"beforeinput")).event,this.onInput=this._register(new b.DomEmitter(this._actual,"input")).event,this.onCut=this._register(new b.DomEmitter(this._actual,"cut")).event,this.onCopy=this._register(new b.DomEmitter(this._actual,"copy")).event,this.onPaste=this._register(new b.DomEmitter(this._actual,"paste")).event,this.onFocus=this._register(new b.DomEmitter(this._actual,"focus")).event,this.onBlur=this._register(new b.DomEmitter(this._actual,"blur")).event,this._onSyntheticTap=this._register(new v.Emitter),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>T.inputLatency.onKeyDown())),this._register(this.onBeforeInput(()=>T.inputLatency.onBeforeInput())),this._register(this.onInput(()=>T.inputLatency.onInput())),this._register(this.onKeyUp(()=>T.inputLatency.onKeyUp())),this._register(y.addDisposableListener(this._actual,i.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const c=y.getShadowRoot(this._actual);return c?c.activeElement===this._actual:y.isInDOM(this._actual)?document.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(c){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(c,l){const n=this._actual;n.value!==l&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=l)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(c,l,n){const g=this._actual;let w=null;const E=y.getShadowRoot(g);E?w=E.activeElement:w=document.activeElement;const C=w===g,I=g.selectionStart,_=g.selectionEnd;if(C&&I===l&&_===n){t.isFirefox&&window.parent!==window&&g.focus();return}if(C){this.setIgnoreSelectionChangeTime("setSelectionRange"),g.setSelectionRange(l,n),t.isFirefox&&window.parent!==window&&g.focus();return}try{const A=y.saveParentsScrollTop(g);this.setIgnoreSelectionChangeTime("setSelectionRange"),g.focus(),g.setSelectionRange(l,n),y.restoreParentsScrollTop(g,A)}catch{}}}e.TextAreaWrapper=d}),define(Q[2320],Y([1,0,7,140,239]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContentWidgets=void 0;class D extends b.ViewPart{constructor(a,r){super(a),this._viewDomNode=r,this._widgets={},this.domNode=(0,y.createFastDomNode)(document.createElement("div")),b.PartFingerprints.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,y.createFastDomNode)(document.createElement("div")),b.PartFingerprints.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(a){const r=Object.keys(this._widgets);for(const i of r)this._widgets[i].onConfigurationChanged(a);return!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLineMappingChanged(a){return this._updateAnchorsViewPositions(),!0}onLinesChanged(a){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(a){return this._updateAnchorsViewPositions(),!0}onLinesInserted(a){return this._updateAnchorsViewPositions(),!0}onScrollChanged(a){return!0}onZonesChanged(a){return!0}_updateAnchorsViewPositions(){const a=Object.keys(this._widgets);for(const r of a)this._widgets[r].updateAnchorViewPosition()}addWidget(a){const r=new T(this._context,this._viewDomNode,a);this._widgets[r.id]=r,r.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(r.domNode):this.domNode.appendChild(r.domNode),this.setShouldRender()}setWidgetPosition(a,r,i,s,o){this._widgets[a.getId()].setPosition(r,i,s,o),this.setShouldRender()}removeWidget(a){const r=a.getId();if(this._widgets.hasOwnProperty(r)){const i=this._widgets[r];delete this._widgets[r];const s=i.domNode.domNode;s.parentNode.removeChild(s),s.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(a){return this._widgets.hasOwnProperty(a)?this._widgets[a].suppressMouseDown:!1}onBeforeRender(a){const r=Object.keys(this._widgets);for(const i of r)this._widgets[i].onBeforeRender(a)}prepareRender(a){const r=Object.keys(this._widgets);for(const i of r)this._widgets[i].prepareRender(a)}render(a){const r=Object.keys(this._widgets);for(const i of r)this._widgets[i].render(a)}}e.ViewContentWidgets=D;class T{constructor(a,r,i){this._primaryAnchor=new f(null,null),this._secondaryAnchor=new f(null,null),this._context=a,this._viewDomNode=r,this._actual=i,this.domNode=(0,y.createFastDomNode)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const s=this._context.configuration.options,o=s.get(142);this._fixedOverflowWidgets=s.get(41),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=s.get(65),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(a){const r=this._context.configuration.options;if(this._lineHeight=r.get(65),a.hasChanged(142)){const i=r.get(142);this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(a,r,i){this._affinity=a,this._primaryAnchor=s(r,this._context.viewModel,this._affinity),this._secondaryAnchor=s(i,this._context.viewModel,this._affinity);function s(o,u,d){if(!o)return new f(null,null);const p=u.model.validatePosition(o);if(u.coordinatesConverter.modelPositionIsVisible(p)){const c=u.coordinatesConverter.convertModelPositionToViewPosition(p,d??void 0);return new f(o,c)}return new f(o,null)}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(a,r,i,s){this._setPosition(s,a,r),this._preference=i,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(a,r,i,s){const o=a.top,u=o,d=a.top+a.height,p=s.viewportHeight-d,c=o-i,l=u>=i,n=d,g=p>=i;let w=a.left;return w+r>s.scrollLeft+s.viewportWidth&&(w=s.scrollLeft+s.viewportWidth-r),w<s.scrollLeft&&(w=s.scrollLeft),{fitsAbove:l,aboveTop:c,fitsBelow:g,belowTop:n,left:w}}_layoutHorizontalSegmentInPage(a,r,i,s){const d=Math.max(15,r.left-s),p=Math.min(r.left+r.width+s,a.width-15);let c=r.left+i-window.scrollX;if(c+s>p){const l=c-(p-s);c-=l,i-=l}if(c<d){const l=c-d;c-=l,i-=l}return[i,c]}_layoutBoxInPage(a,r,i,s){const o=a.top-i,u=a.top+a.height,d=t.getDomNodePagePosition(this._viewDomNode.domNode),p=d.top+o-window.scrollY,c=d.top+u-window.scrollY,l=t.getClientArea(document.body),[n,g]=this._layoutHorizontalSegmentInPage(l,d,a.left-s.scrollLeft+this._contentLeft,r),w=22,E=22,C=p>=w,I=c+i<=l.height-E;return this._fixedOverflowWidgets?{fitsAbove:C,aboveTop:Math.max(p,w),fitsBelow:I,belowTop:c,left:g}:{fitsAbove:C,aboveTop:o,fitsBelow:I,belowTop:u,left:n}}_prepareRenderWidgetAtExactPositionOverflowing(a){return new v(a.top,a.left+this._contentLeft)}_getAnchorsCoordinates(a){const r=o(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),i=this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,s=o(i,this._affinity,this._lineHeight);return{primary:r,secondary:s};function o(u,d,p){if(!u)return null;const c=a.visibleRangeForPosition(u);if(!c)return null;const l=u.column===1&&d===3?0:c.left,n=a.getVerticalOffsetForLineNumber(u.lineNumber)-a.scrollTop;return new m(n,l,p)}}_reduceAnchorCoordinates(a,r,i){if(!r)return a;const s=this._context.configuration.options.get(49);let o=r.left;return o<a.left?o=Math.max(o,a.left-i+s.typicalFullwidthCharacterWidth):o=Math.min(o,a.left+i-s.typicalFullwidthCharacterWidth),new m(a.top,o,a.height)}_prepareRenderWidget(a){if(!this._preference||this._preference.length===0)return null;const{primary:r,secondary:i}=this._getAnchorsCoordinates(a);if(!r)return null;if(this._cachedDomNodeOffsetWidth===-1||this._cachedDomNodeOffsetHeight===-1){let u=null;if(typeof this._actual.beforeRender=="function"&&(u=S(this._actual.beforeRender,this._actual)),u)this._cachedDomNodeOffsetWidth=u.width,this._cachedDomNodeOffsetHeight=u.height;else{const p=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(p.width),this._cachedDomNodeOffsetHeight=Math.round(p.height)}}const s=this._reduceAnchorCoordinates(r,i,this._cachedDomNodeOffsetWidth);let o;this.allowEditorOverflow?o=this._layoutBoxInPage(s,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,a):o=this._layoutBoxInViewport(s,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,a);for(let u=1;u<=2;u++)for(const d of this._preference)if(d===1){if(!o)return null;if(u===2||o.fitsAbove)return{coordinate:new v(o.aboveTop,o.left),position:1}}else if(d===2){if(!o)return null;if(u===2||o.fitsBelow)return{coordinate:new v(o.belowTop,o.left),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new v(s.top,s.left)),position:0}:{coordinate:new v(s.top,s.left),position:0};return null}onBeforeRender(a){!this._primaryAnchor.viewPosition||!this._preference||this._primaryAnchor.viewPosition.lineNumber<a.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>a.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(a){this._renderData=this._prepareRenderWidget(a)}render(a){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&S(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+a.scrollTop-a.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&S(this._actual.afterRender,this._actual,this._renderData.position)}}class f{constructor(a,r){this.modelPosition=a,this.viewPosition=r}}class v{constructor(a,r){this.top=a,this.left=r,this._coordinateBrand=void 0}}class m{constructor(a,r,i){this.top=a,this.left=r,this.height=i,this._anchorCoordinateBrand=void 0}}function S(h,a,...r){try{return h.call(a,...r)}catch{return null}}}),define(Q[2321],Y([1,0,229,4,109]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorSash=void 0;class D extends y.Disposable{constructor(f,v,m){super(),this._options=f,this._domNode=v,this._dimensions=m,this._sashRatio=(0,b.observableValue)("sashRatio",void 0),this.sashLeft=(0,b.derived)(S=>{const h=this._sashRatio.read(S)??this._options.splitViewDefaultRatio.read(S);return this._computeSashLeft(h,S)}),this._sash=this._register(new t.Sash(this._domNode,{getVerticalSashTop:S=>0,getVerticalSashLeft:S=>this.sashLeft.get(),getVerticalSashHeight:S=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(S=>{const h=this._dimensions.width.get(),a=this._computeSashLeft((this._startSashPosition+(S.currentX-S.startX))/h,void 0);this._sashRatio.set(a/h,void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._sashRatio.set(void 0,void 0))),this._register((0,b.autorun)(S=>{const h=this._options.enableSplitViewResizing.read(S);this._sash.state=h?3:0,this.sashLeft.read(S),this._sash.layout()}))}setBoundarySashes(f){this._sash.orthogonalEndSash=f.bottom}_computeSashLeft(f,v){const m=this._dimensions.width.read(v),S=Math.floor(this._options.splitViewDefaultRatio.read(v)*m),h=this._options.enableSplitViewResizing.read(v)?Math.floor(f*m):S,a=100;return m<=a*2?S:h<a?a:h>m-a?m-a:h}}e.DiffEditorSash=D}),define(Q[1128],Y([1,0,14,31,4,109,391,238,1072,438,663,1075]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnchangedRegion=e.DiffMapping=e.DiffState=e.DiffEditorViewModel=void 0;class a extends b.Disposable{setActiveMovedText(p){this._activeMovedText.set(p,void 0)}setHoveredMovedText(p){this._hoveredMovedText.set(p,void 0)}constructor(p,c,l){super(),this.model=p,this._options=c,this._isDiffUpToDate=(0,D.observableValue)("isDiffUpToDate",!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=(0,D.observableValue)("diff",void 0),this.diff=this._diff,this._unchangedRegions=(0,D.observableValue)("unchangedRegion",{regions:[],originalDecorationIds:[],modifiedDecorationIds:[]}),this.unchangedRegions=(0,D.derived)(C=>this._options.hideUnchangedRegions.read(C)?this._unchangedRegions.read(C).regions:((0,D.transaction)(I=>{for(const _ of this._unchangedRegions.get().regions)_.collapseAll(I)}),[])),this.movedTextToCompare=(0,D.observableValue)("movedTextToCompare",void 0),this._activeMovedText=(0,D.observableValue)("activeMovedText",void 0),this._hoveredMovedText=(0,D.observableValue)("hoveredMovedText",void 0),this.activeMovedText=(0,D.derived)(C=>this.movedTextToCompare.read(C)??this._hoveredMovedText.read(C)??this._activeMovedText.read(C)),this._cancellationTokenSource=new y.CancellationTokenSource,this._register((0,b.toDisposable)(()=>this._cancellationTokenSource.cancel()));const n=(0,D.observableSignal)("contentChangedSignal"),g=this._register(new t.RunOnceScheduler(()=>n.trigger(void 0),200)),w=(C,I,_)=>{const A=s.fromDiffs(C.changes,p.original.getLineCount(),p.modified.getLineCount(),this._options.hideUnchangedRegionsminimumLineCount.read(_),this._options.hideUnchangedRegionsContextLineCount.read(_)),k=this._unchangedRegions.get(),L=k.originalDecorationIds.map(P=>p.original.getDecorationRange(P)).filter(P=>!!P).map(P=>f.LineRange.fromRange(P)),R=k.modifiedDecorationIds.map(P=>p.modified.getDecorationRange(P)).filter(P=>!!P).map(P=>f.LineRange.fromRange(P)),M=p.original.deltaDecorations(k.originalDecorationIds,A.map(P=>({range:P.originalRange.toInclusiveRange(),options:{description:"unchanged"}}))),N=p.modified.deltaDecorations(k.modifiedDecorationIds,A.map(P=>({range:P.modifiedRange.toInclusiveRange(),options:{description:"unchanged"}})));for(const P of A)for(let x=0;x<k.regions.length;x++)if(P.originalRange.intersectsStrict(L[x])&&P.modifiedRange.intersectsStrict(R[x])){P.setHiddenModifiedRange(k.regions[x].getHiddenModifiedRange(void 0),I);break}this._unchangedRegions.set({regions:A,originalDecorationIds:M,modifiedDecorationIds:N},I)};this._register(p.modified.onDidChangeContent(C=>{if(this._diff.get()){const _=S.TextEditInfo.fromModelContentChanges(C.changes),A=(this._lastDiff,p.original,p.modified,void 0);A&&(this._lastDiff=A,(0,D.transaction)(k=>{this._diff.set(r.fromDiffResult(this._lastDiff),k),w(A,k);const L=this.movedTextToCompare.get();this.movedTextToCompare.set(L?this._lastDiff.moves.find(R=>R.lineRangeMapping.modified.intersect(L.lineRangeMapping.modified)):void 0,k)}))}g.schedule()})),this._register(p.original.onDidChangeContent(C=>{if(this._diff.get()){const _=S.TextEditInfo.fromModelContentChanges(C.changes),A=(this._lastDiff,p.original,p.modified,void 0);A&&(this._lastDiff=A,(0,D.transaction)(k=>{this._diff.set(r.fromDiffResult(this._lastDiff),k),w(A,k);const L=this.movedTextToCompare.get();this.movedTextToCompare.set(L?this._lastDiff.moves.find(R=>R.lineRangeMapping.modified.intersect(L.lineRangeMapping.modified)):void 0,k)}))}g.schedule()}));const E=(0,D.observableSignalFromEvent)("documentDiffProviderOptionChanged",l.onDidChange);this._register((0,D.autorunWithStore)(async(C,I)=>{this._options.hideUnchangedRegionsminimumLineCount.read(C),this._options.hideUnchangedRegionsContextLineCount.read(C),g.cancel(),n.read(C),E.read(C),(0,T.readHotReloadableExport)(v.AdvancedLinesDiffComputer,C),this._isDiffUpToDate.set(!1,void 0);let _=[];I.add(p.original.onDidChangeContent(L=>{const R=S.TextEditInfo.fromModelContentChanges(L.changes);_=(0,h.combineTextEditInfos)(_,R)}));let A=[];I.add(p.modified.onDidChangeContent(L=>{const R=S.TextEditInfo.fromModelContentChanges(L.changes);A=(0,h.combineTextEditInfos)(A,R)}));let k=await l.computeDiff(p.original,p.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(C),maxComputationTimeMs:this._options.maxComputationTimeMs.read(C),computeMoves:this._options.showMoves.read(C)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||(k=(p.original,p.modified,void 0)??k,k=(p.original,p.modified,void 0)??k,(0,D.transaction)(L=>{w(k,L),this._lastDiff=k;const R=r.fromDiffResult(k);this._diff.set(R,L),this._isDiffUpToDate.set(!0,L);const M=this.movedTextToCompare.get();this.movedTextToCompare.set(M?this._lastDiff.moves.find(N=>N.lineRangeMapping.modified.intersect(M.lineRangeMapping.modified)):void 0,L)}))}))}ensureModifiedLineIsVisible(p,c){if(this.diff.get()?.mappings.length===0)return;const l=this._unchangedRegions.get().regions;for(const n of l)if(n.getHiddenModifiedRange(void 0).contains(p)){n.showModifiedLine(p,c);return}}ensureOriginalLineIsVisible(p,c){if(this.diff.get()?.mappings.length===0)return;const l=this._unchangedRegions.get().regions;for(const n of l)if(n.getHiddenOriginalRange(void 0).contains(p)){n.showOriginalLine(p,c);return}}async waitForDiff(){await(0,D.waitForState)(this.isDiffUpToDate,p=>p)}serializeState(){return{collapsedRegions:this._unchangedRegions.get().regions.map(c=>({range:c.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(p){const c=p.collapsedRegions.map(n=>f.LineRange.deserialize(n.range)),l=this._unchangedRegions.get();(0,D.transaction)(n=>{for(const g of l.regions)for(const w of c)if(g.modifiedRange.intersect(w)){g.setHiddenModifiedRange(w,n);break}})}}e.DiffEditorViewModel=a;class r{static fromDiffResult(p){return new r(p.changes.map(c=>new i(c)),p.moves||[],p.identical,p.quitEarly)}constructor(p,c,l,n){this.mappings=p,this.movedTexts=c,this.identical=l,this.quitEarly=n}}e.DiffState=r;class i{constructor(p){this.lineRangeMapping=p}}e.DiffMapping=i;class s{static fromDiffs(p,c,l,n,g){const w=m.LineRangeMapping.inverse(p,c,l),E=[];for(const C of w){let I=C.originalRange.startLineNumber,_=C.modifiedRange.startLineNumber,A=C.originalRange.length;const k=I===1&&_===1,L=I+A===c+1&&_+A===l+1;(k||L)&&A>=g+n?(k&&!L&&(A-=g),L&&!k&&(I+=g,_+=g,A-=g),E.push(new s(I,_,A,0,0))):A>=g*2+n&&(I+=g,_+=g,A-=g*2,E.push(new s(I,_,A,0,0)))}return E}get originalRange(){return f.LineRange.ofLength(this.originalLineNumber,this.lineCount)}get modifiedRange(){return f.LineRange.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(p,c,l,n,g){this.originalLineNumber=p,this.modifiedLineNumber=c,this.lineCount=l,this._visibleLineCountTop=(0,D.observableValue)("visibleLineCountTop",0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=(0,D.observableValue)("visibleLineCountBottom",0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=(0,D.derived)(w=>this.visibleLineCountTop.read(w)+this.visibleLineCountBottom.read(w)===this.lineCount&&!this.isDragged.read(w)),this.isDragged=(0,D.observableValue)("isDragged",!1),this._visibleLineCountTop.set(n,void 0),this._visibleLineCountBottom.set(g,void 0)}shouldHideControls(p){return this._shouldHideControls.read(p)}getHiddenOriginalRange(p){return f.LineRange.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(p),this.lineCount-this._visibleLineCountTop.read(p)-this._visibleLineCountBottom.read(p))}getHiddenModifiedRange(p){return f.LineRange.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(p),this.lineCount-this._visibleLineCountTop.read(p)-this._visibleLineCountBottom.read(p))}setHiddenModifiedRange(p,c){const l=p.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-p.endLineNumberExclusive;this.setState(l,n,c)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(p=10,c){const l=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+p,l),c)}showMoreBelow(p=10,c){const l=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+p,l),c)}showAll(p){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),p)}showModifiedLine(p,c){const l=p+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),n=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-p;l<n?this._visibleLineCountTop.set(this._visibleLineCountTop.get()+l,c):this._visibleLineCountBottom.set(this._visibleLineCountBottom.get()+n,c)}showOriginalLine(p,c){const l=p-this.originalLineNumber,n=this.originalLineNumber+this.lineCount-p;l<n?this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+n-l,this.getMaxVisibleLineCountTop()),c):this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+l-n,this.getMaxVisibleLineCountBottom()),c)}collapseAll(p){this._visibleLineCountTop.set(0,p),this._visibleLineCountBottom.set(0,p)}setState(p,c,l){p=Math.max(Math.min(p,this.lineCount),0),c=Math.max(Math.min(c,this.lineCount-p),0),this._visibleLineCountTop.set(p,l),this._visibleLineCountBottom.set(c,l)}}e.UnchangedRegion=s;function o(d,p,c,l){}function u(d,p,c,l){}}),define(Q[370],Y([1,0,33,18,62]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringBuilder=e.decodeUTF16LE=e.getPlatformTextDecoder=void 0;let D;function T(){return D||(D=new TextDecoder("UTF-16LE")),D}let f;function v(){return f||(f=new TextDecoder("UTF-16BE")),f}let m;function S(){return m||(m=y.isLittleEndian()?T():v()),m}e.getPlatformTextDecoder=S;function h(i,s,o){const u=new Uint16Array(i.buffer,s,o);return o>0&&(u[0]===65279||u[0]===65534)?a(i,s,o):T().decode(u)}e.decodeUTF16LE=h;function a(i,s,o){const u=[];let d=0;for(let p=0;p<o;p++){const c=b.readUInt16LE(i,s);s+=2,u[d++]=String.fromCharCode(c)}return u.join("")}class r{constructor(s){this._capacity=s|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";const s=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return S().decode(s)}_flushBuffer(){const s=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[s]:this._completedStrings[this._completedStrings.length]=s}appendCharCode(s){const o=this._capacity-this._bufferLength;o<=1&&(o===0||t.isHighSurrogate(s))&&this._flushBuffer(),this._buffer[this._bufferLength++]=s}appendASCIICharCode(s){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=s}appendString(s){const o=s.length;if(this._bufferLength+o>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=s;return}for(let u=0;u<o;u++)this._buffer[this._bufferLength++]=s.charCodeAt(u)}}e.StringBuilder=r}),define(Q[2322],Y([1,0,364,33,258,370,1080,441]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DOMLineBreaksComputerFactory=void 0;const v=(0,t.createTrustedTypesPolicy)("domLineBreaksComputer",{createHTML:o=>o});class m{static create(){return new m}constructor(){}createLineBreaksComputer(u,d,p,c,l){const n=[],g=[];return{addRequest:(w,E,C)=>{n.push(w),g.push(E)},finalize:()=>S(n,u,d,p,c,l,g)}}}e.DOMLineBreaksComputerFactory=m;function S(o,u,d,p,c,l,n){function g(z){const B=n[z];if(B){const K=f.LineInjectedText.applyInjectedText(o[z],B),H=B.map(G=>G.options),U=B.map(G=>G.column-1);return new T.ModelLineProjectionData(U,H,[K.length],[],0)}else return null}if(p===-1){const z=[];for(let B=0,K=o.length;B<K;B++)z[B]=g(B);return z}const w=Math.round(p*u.typicalHalfwidthCharacterWidth),C=Math.round(d*(c===3?2:c===2?1:0)),I=Math.ceil(u.spaceWidth*C),_=document.createElement("div");(0,b.applyFontInfo)(_,u);const A=new D.StringBuilder(1e4),k=[],L=[],R=[],M=[],N=[];for(let z=0;z<o.length;z++){const B=f.LineInjectedText.applyInjectedText(o[z],n[z]);let K=0,H=0,U=w;if(c!==0)if(K=y.firstNonWhitespaceIndex(B),K===-1)K=0;else{for(let J=0;J<K;J++){const j=B.charCodeAt(J)===9?d-H%d:1;H+=j}const ie=Math.ceil(u.spaceWidth*H);ie+u.typicalFullwidthCharacterWidth>w?(K=0,H=0):U=w-ie}const G=B.substr(K),$=a(G,H,d,U,A,I);k[z]=K,L[z]=H,R[z]=G,M[z]=$[0],N[z]=$[1]}const P=A.build(),x=v?.createHTML(P)??P;_.innerHTML=x,_.style.position="absolute",_.style.top="10000",l==="keepAll"?(_.style.wordBreak="keep-all",_.style.overflowWrap="anywhere"):(_.style.wordBreak="inherit",_.style.overflowWrap="break-word"),document.body.appendChild(_);const F=document.createRange(),V=Array.prototype.slice.call(_.children,0),W=[];for(let z=0;z<o.length;z++){const B=V[z],K=r(F,B,R[z],M[z]);if(K===null){W[z]=g(z);continue}const H=k[z],U=L[z]+C,G=N[z],$=[];for(let ee=0,X=K.length;ee<X;ee++)$[ee]=G[K[ee]];if(H!==0)for(let ee=0,X=K.length;ee<X;ee++)K[ee]+=H;let ie,J;const j=n[z];j?(ie=j.map(ee=>ee.options),J=j.map(ee=>ee.column-1)):(ie=null,J=null),W[z]=new T.ModelLineProjectionData(J,ie,K,$,U)}return document.body.removeChild(_),W}var h;(function(o){o[o.SPAN_MODULO_LIMIT=16384]="SPAN_MODULO_LIMIT"})(h||(h={}));function a(o,u,d,p,c,l){if(l!==0){const _=String(l);c.appendString('<div style="text-indent: -'),c.appendString(_),c.appendString("px; padding-left: "),c.appendString(_),c.appendString("px; box-sizing: border-box; width:")}else c.appendString('<div style="width:');c.appendString(String(p)),c.appendString('px;">');const n=o.length;let g=u,w=0;const E=[],C=[];let I=0<n?o.charCodeAt(0):0;c.appendString("<span>");for(let _=0;_<n;_++){_!==0&&_%16384===0&&c.appendString("</span><span>"),E[_]=w,C[_]=g;const A=I;I=_+1<n?o.charCodeAt(_+1):0;let k=1,L=1;switch(A){case 9:k=d-g%d,L=k;for(let R=1;R<=k;R++)R<k?c.appendCharCode(160):c.appendASCIICharCode(32);break;case 32:I===32?c.appendCharCode(160):c.appendASCIICharCode(32);break;case 60:c.appendString("<");break;case 62:c.appendString(">");break;case 38:c.appendString("&");break;case 0:c.appendString("�");break;case 65279:case 8232:case 8233:case 133:c.appendCharCode(65533);break;default:y.isFullWidthCharacter(A)&&L++,A<32?c.appendCharCode(9216+A):c.appendCharCode(A)}w+=k,g+=L}return c.appendString("</span>"),E[o.length]=w,C[o.length]=g,c.appendString("</div>"),[E,C]}function r(o,u,d,p){if(d.length<=1)return null;const c=Array.prototype.slice.call(u.children,0),l=[];try{i(o,c,p,0,null,d.length-1,null,l)}catch(n){return console.log(n),null}return l.length===0?null:(l.push(d.length),l)}function i(o,u,d,p,c,l,n,g){if(p===l||(c=c||s(o,u,d[p],d[p+1]),n=n||s(o,u,d[l],d[l+1]),Math.abs(c[0].top-n[0].top)<=.1))return;if(p+1===l){g.push(l);return}const w=p+(l-p)/2|0,E=s(o,u,d[w],d[w+1]);i(o,u,d,p,c,w,E,g),i(o,u,d,w,E,l,n,g)}function s(o,u,d,p){return o.setStart(u[d/16384|0].firstChild,d%16384),o.setEnd(u[p/16384|0].firstChild,p%16384),o.getClientRects()}}),define(Q[837],Y([1,0,140,364,15,370]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleLinesCollection=e.RenderedLinesCollection=void 0;class T{constructor(S){this._createLine=S,this._set(1,[])}flush(){this._set(1,[])}_set(S,h){this._lines=h,this._rendLineNumberStart=S}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(S){const h=S-this._rendLineNumberStart;if(h<0||h>=this._lines.length)throw new b.BugIndicatingError("Illegal value for lineNumber");return this._lines[h]}onLinesDeleted(S,h){if(this.getCount()===0)return null;const a=this.getStartLineNumber(),r=this.getEndLineNumber();if(h<a){const u=h-S+1;return this._rendLineNumberStart-=u,null}if(S>r)return null;let i=0,s=0;for(let u=a;u<=r;u++){const d=u-this._rendLineNumberStart;S<=u&&u<=h&&(s===0?(i=d,s=1):s++)}if(S<a){let u=0;h<a?u=h-S+1:u=a-S,this._rendLineNumberStart-=u}return this._lines.splice(i,s)}onLinesChanged(S,h){const a=S+h-1;if(this.getCount()===0)return!1;const r=this.getStartLineNumber(),i=this.getEndLineNumber();let s=!1;for(let o=S;o<=a;o++)o>=r&&o<=i&&(this._lines[o-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(S,h){if(this.getCount()===0)return null;const a=h-S+1,r=this.getStartLineNumber(),i=this.getEndLineNumber();if(S<=r)return this._rendLineNumberStart+=a,null;if(S>i)return null;if(a+S>i)return this._lines.splice(S-this._rendLineNumberStart,i-S+1);const s=[];for(let c=0;c<a;c++)s[c]=this._createLine();const o=S-this._rendLineNumberStart,u=this._lines.slice(0,o),d=this._lines.slice(o,this._lines.length-a),p=this._lines.slice(this._lines.length-a,this._lines.length);return this._lines=u.concat(s).concat(d),p}onTokensChanged(S){if(this.getCount()===0)return!1;const h=this.getStartLineNumber(),a=this.getEndLineNumber();let r=!1;for(let i=0,s=S.length;i<s;i++){const o=S[i];if(o.toLineNumber<h||o.fromLineNumber>a)continue;const u=Math.max(h,o.fromLineNumber),d=Math.min(a,o.toLineNumber);for(let p=u;p<=d;p++){const c=p-this._rendLineNumberStart;this._lines[c].onTokensChanged(),r=!0}}return r}}e.RenderedLinesCollection=T;class f{constructor(S){this._host=S,this.domNode=this._createDomNode(),this._linesCollection=new T(()=>this._host.createVisibleLine())}_createDomNode(){const S=(0,t.createFastDomNode)(document.createElement("div"));return S.setClassName("view-layer"),S.setPosition("absolute"),S.domNode.setAttribute("role","presentation"),S.domNode.setAttribute("aria-hidden","true"),S}onConfigurationChanged(S){return!!S.hasChanged(142)}onFlushed(S){return this._linesCollection.flush(),!0}onLinesChanged(S){return this._linesCollection.onLinesChanged(S.fromLineNumber,S.count)}onLinesDeleted(S){const h=this._linesCollection.onLinesDeleted(S.fromLineNumber,S.toLineNumber);if(h)for(let a=0,r=h.length;a<r;a++){const i=h[a].getDomNode();i&&this.domNode.domNode.removeChild(i)}return!0}onLinesInserted(S){const h=this._linesCollection.onLinesInserted(S.fromLineNumber,S.toLineNumber);if(h)for(let a=0,r=h.length;a<r;a++){const i=h[a].getDomNode();i&&this.domNode.domNode.removeChild(i)}return!0}onScrollChanged(S){return S.scrollTopChanged}onTokensChanged(S){return this._linesCollection.onTokensChanged(S.ranges)}onZonesChanged(S){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(S){return this._linesCollection.getLine(S)}renderLines(S){const h=this._linesCollection._get(),a=new v(this.domNode.domNode,this._host,S),r={rendLineNumberStart:h.rendLineNumberStart,lines:h.lines,linesLength:h.lines.length},i=a.render(r,S.startLineNumber,S.endLineNumber,S.relativeVerticalOffset);this._linesCollection._set(i.rendLineNumberStart,i.lines)}}e.VisibleLinesCollection=f;class v{static{this._ttPolicy=(0,y.createTrustedTypesPolicy)("editorViewLayer",{createHTML:S=>S})}constructor(S,h,a){this.domNode=S,this.host=h,this.viewportData=a}render(S,h,a,r){const i={rendLineNumberStart:S.rendLineNumberStart,lines:S.lines.slice(0),linesLength:S.linesLength};if(i.rendLineNumberStart+i.linesLength-1<h||a<i.rendLineNumberStart){i.rendLineNumberStart=h,i.linesLength=a-h+1,i.lines=[];for(let s=h;s<=a;s++)i.lines[s-h]=this.host.createVisibleLine();return this._finishRendering(i,!0,r),i}if(this._renderUntouchedLines(i,Math.max(h-i.rendLineNumberStart,0),Math.min(a-i.rendLineNumberStart,i.linesLength-1),r,h),i.rendLineNumberStart>h){const s=h,o=Math.min(a,i.rendLineNumberStart-1);s<=o&&(this._insertLinesBefore(i,s,o,r,h),i.linesLength+=o-s+1)}else if(i.rendLineNumberStart<h){const s=Math.min(i.linesLength,h-i.rendLineNumberStart);s>0&&(this._removeLinesBefore(i,s),i.linesLength-=s)}if(i.rendLineNumberStart=h,i.rendLineNumberStart+i.linesLength-1<a){const s=i.rendLineNumberStart+i.linesLength,o=a;s<=o&&(this._insertLinesAfter(i,s,o,r,h),i.linesLength+=o-s+1)}else if(i.rendLineNumberStart+i.linesLength-1>a){const s=Math.max(0,a-i.rendLineNumberStart+1),u=i.linesLength-1-s+1;u>0&&(this._removeLinesAfter(i,u),i.linesLength-=u)}return this._finishRendering(i,!1,r),i}_renderUntouchedLines(S,h,a,r,i){const s=S.rendLineNumberStart,o=S.lines;for(let u=h;u<=a;u++){const d=s+u;o[u].layoutLine(d,r[d-i])}}_insertLinesBefore(S,h,a,r,i){const s=[];let o=0;for(let u=h;u<=a;u++)s[o++]=this.host.createVisibleLine();S.lines=s.concat(S.lines)}_removeLinesBefore(S,h){for(let a=0;a<h;a++){const r=S.lines[a].getDomNode();r&&this.domNode.removeChild(r)}S.lines.splice(0,h)}_insertLinesAfter(S,h,a,r,i){const s=[];let o=0;for(let u=h;u<=a;u++)s[o++]=this.host.createVisibleLine();S.lines=S.lines.concat(s)}_removeLinesAfter(S,h){const a=S.linesLength-h;for(let r=0;r<h;r++){const i=S.lines[a+r].getDomNode();i&&this.domNode.removeChild(i)}S.lines.splice(a,h)}_finishRenderingNewLines(S,h,a,r){v._ttPolicy&&(a=v._ttPolicy.createHTML(a));const i=this.domNode.lastChild;h||!i?this.domNode.innerHTML=a:i.insertAdjacentHTML("afterend",a);let s=this.domNode.lastChild;for(let o=S.linesLength-1;o>=0;o--){const u=S.lines[o];r[o]&&(u.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(S,h,a){const r=document.createElement("div");v._ttPolicy&&(h=v._ttPolicy.createHTML(h)),r.innerHTML=h;for(let i=0;i<S.linesLength;i++){const s=S.lines[i];if(a[i]){const o=r.firstChild,u=s.getDomNode();u.parentNode.replaceChild(o,u),s.setDomNode(o)}}}static{this._sb=new D.StringBuilder(1e5)}_finishRendering(S,h,a){const r=v._sb,i=S.linesLength,s=S.lines,o=S.rendLineNumberStart,u=[];{r.reset();let d=!1;for(let p=0;p<i;p++){const c=s[p];u[p]=!1,!(c.getDomNode()||!c.renderLine(p+o,a[p],this.viewportData,r))&&(u[p]=!0,d=!0)}d&&this._finishRenderingNewLines(S,h,r.build(),u)}{r.reset();let d=!1;const p=[];for(let c=0;c<i;c++){const l=s[c];p[c]=!1,!(u[c]||!l.renderLine(c+o,a[c],this.viewportData,r))&&(p[c]=!0,d=!0)}d&&this._finishRenderingInvalidLines(S,r.build(),p)}}}}),define(Q[2323],Y([1,0,140,258,837,239]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewOverlays=e.ContentViewOverlays=e.ViewOverlayLine=e.ViewOverlays=void 0;class T extends D.ViewPart{constructor(h){super(h),this._visibleLines=new b.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const r=this._context.configuration.options.get(49);(0,y.applyFontInfo)(this.domNode,r),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let h=0,a=this._dynamicOverlays.length;h<a;h++)if(this._dynamicOverlays[h].shouldRender())return!0;return!1}dispose(){super.dispose();for(let h=0,a=this._dynamicOverlays.length;h<a;h++)this._dynamicOverlays[h].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new f(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(h){this._dynamicOverlays.push(h)}onConfigurationChanged(h){this._visibleLines.onConfigurationChanged(h);const a=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();for(let o=a;o<=r;o++)this._visibleLines.getVisibleLine(o).onConfigurationChanged(h);const s=this._context.configuration.options.get(49);return(0,y.applyFontInfo)(this.domNode,s),!0}onFlushed(h){return this._visibleLines.onFlushed(h)}onFocusChanged(h){return this._isFocused=h.isFocused,!0}onLinesChanged(h){return this._visibleLines.onLinesChanged(h)}onLinesDeleted(h){return this._visibleLines.onLinesDeleted(h)}onLinesInserted(h){return this._visibleLines.onLinesInserted(h)}onScrollChanged(h){return this._visibleLines.onScrollChanged(h)||!0}onTokensChanged(h){return this._visibleLines.onTokensChanged(h)}onZonesChanged(h){return this._visibleLines.onZonesChanged(h)}prepareRender(h){const a=this._dynamicOverlays.filter(r=>r.shouldRender());for(let r=0,i=a.length;r<i;r++){const s=a[r];s.prepareRender(h),s.onDidRender()}}render(h){this._viewOverlaysRender(h),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(h){this._visibleLines.renderLines(h.viewportData)}}e.ViewOverlays=T;class f{constructor(h,a){this._configuration=h,this._lineHeight=this._configuration.options.get(65),this._dynamicOverlays=a,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(h){this._domNode=(0,t.createFastDomNode)(h)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(h){this._lineHeight=this._configuration.options.get(65)}renderLine(h,a,r,i){let s="";for(let o=0,u=this._dynamicOverlays.length;o<u;o++){const d=this._dynamicOverlays[o];s+=d.render(r.startLineNumber,h)}return this._renderedContent===s?!1:(this._renderedContent=s,i.appendString('<div style="position:absolute;top:'),i.appendString(String(a)),i.appendString("px;width:100%;height:"),i.appendString(String(this._lineHeight)),i.appendString('px;">'),i.appendString(s),i.appendString("</div>"),!0)}layoutLine(h,a){this._domNode&&(this._domNode.setTop(a),this._domNode.setHeight(this._lineHeight))}}e.ViewOverlayLine=f;class v extends T{constructor(h){super(h);const r=this._context.configuration.options.get(142);this._contentWidth=r.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(h){const r=this._context.configuration.options.get(142);return this._contentWidth=r.contentWidth,super.onConfigurationChanged(h)||!0}onScrollChanged(h){return super.onScrollChanged(h)||h.scrollWidthChanged}_viewOverlaysRender(h){super._viewOverlaysRender(h),this.domNode.setWidth(Math.max(h.scrollWidth,this._contentWidth))}}e.ContentViewOverlays=v;class m extends T{constructor(h){super(h);const a=this._context.configuration.options,r=a.get(142);this._contentLeft=r.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,y.applyFontInfo)(this.domNode,a.get(49))}onConfigurationChanged(h){const a=this._context.configuration.options;(0,y.applyFontInfo)(this.domNode,a.get(49));const r=a.get(142);return this._contentLeft=r.contentLeft,super.onConfigurationChanged(h)||!0}onScrollChanged(h){return super.onScrollChanged(h)||h.scrollHeightChanged}_viewOverlaysRender(h){super._viewOverlaysRender(h);const a=Math.min(h.scrollHeight,1e6);this.domNode.setHeight(a),this.domNode.setWidth(this._contentLeft)}}e.MarginViewOverlays=m}),define(Q[1129],Y([1,0,62,370]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compressConsecutiveTextChanges=e.TextChange=void 0;function b(v){return v.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class D{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(m,S,h,a){this.oldPosition=m,this.oldText=S,this.newPosition=h,this.newText=a}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${b(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${b(this.oldText)}")`:`(replace@${this.oldPosition} "${b(this.oldText)}" with "${b(this.newText)}")`}static _writeStringSize(m){return 4+2*m.length}static _writeString(m,S,h){const a=S.length;t.writeUInt32BE(m,a,h),h+=4;for(let r=0;r<a;r++)t.writeUInt16LE(m,S.charCodeAt(r),h),h+=2;return h}static _readString(m,S){const h=t.readUInt32BE(m,S);return S+=4,(0,y.decodeUTF16LE)(m,S,h)}writeSize(){return 4+4+D._writeStringSize(this.oldText)+D._writeStringSize(this.newText)}write(m,S){return t.writeUInt32BE(m,this.oldPosition,S),S+=4,t.writeUInt32BE(m,this.newPosition,S),S+=4,S=D._writeString(m,this.oldText,S),S=D._writeString(m,this.newText,S),S}static read(m,S,h){const a=t.readUInt32BE(m,S);S+=4;const r=t.readUInt32BE(m,S);S+=4;const i=D._readString(m,S);S+=D._writeStringSize(i);const s=D._readString(m,S);return S+=D._writeStringSize(s),h.push(new D(a,i,r,s)),S}}e.TextChange=D;function T(v,m){return v===null||v.length===0?m:new f(v,m).compress()}e.compressConsecutiveTextChanges=T;class f{constructor(m,S){this._prevEdits=m,this._currEdits=S,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let m=0,S=0,h=this._getPrev(m),a=this._getCurr(S);for(;m<this._prevLen||S<this._currLen;){if(h===null){this._acceptCurr(a),a=this._getCurr(++S);continue}if(a===null){this._acceptPrev(h),h=this._getPrev(++m);continue}if(a.oldEnd<=h.newPosition){this._acceptCurr(a),a=this._getCurr(++S);continue}if(h.newEnd<=a.oldPosition){this._acceptPrev(h),h=this._getPrev(++m);continue}if(a.oldPosition<h.newPosition){const[u,d]=f._splitCurr(a,h.newPosition-a.oldPosition);this._acceptCurr(u),a=d;continue}if(h.newPosition<a.oldPosition){const[u,d]=f._splitPrev(h,a.oldPosition-h.newPosition);this._acceptPrev(u),h=d;continue}let s,o;if(a.oldEnd===h.newEnd)s=h,o=a,h=this._getPrev(++m),a=this._getCurr(++S);else if(a.oldEnd<h.newEnd){const[u,d]=f._splitPrev(h,a.oldLength);s=u,o=a,h=d,a=this._getCurr(++S)}else{const[u,d]=f._splitCurr(a,h.newLength);s=h,o=u,h=this._getPrev(++m),a=d}this._result[this._resultLen++]=new D(s.oldPosition,s.oldText,o.newPosition,o.newText),this._prevDeltaOffset+=s.newLength-s.oldLength,this._currDeltaOffset+=o.newLength-o.oldLength}const r=f._merge(this._result);return f._removeNoOps(r)}_acceptCurr(m){this._result[this._resultLen++]=f._rebaseCurr(this._prevDeltaOffset,m),this._currDeltaOffset+=m.newLength-m.oldLength}_getCurr(m){return m<this._currLen?this._currEdits[m]:null}_acceptPrev(m){this._result[this._resultLen++]=f._rebasePrev(this._currDeltaOffset,m),this._prevDeltaOffset+=m.newLength-m.oldLength}_getPrev(m){return m<this._prevLen?this._prevEdits[m]:null}static _rebaseCurr(m,S){return new D(S.oldPosition-m,S.oldText,S.newPosition,S.newText)}static _rebasePrev(m,S){return new D(S.oldPosition,S.oldText,S.newPosition+m,S.newText)}static _splitPrev(m,S){const h=m.newText.substr(0,S),a=m.newText.substr(S);return[new D(m.oldPosition,m.oldText,m.newPosition,h),new D(m.oldEnd,"",m.newPosition+S,a)]}static _splitCurr(m,S){const h=m.oldText.substr(0,S),a=m.oldText.substr(S);return[new D(m.oldPosition,h,m.newPosition,m.newText),new D(m.oldPosition+S,a,m.newEnd,"")]}static _merge(m){if(m.length===0)return m;const S=[];let h=0,a=m[0];for(let r=1;r<m.length;r++){const i=m[r];a.oldEnd===i.oldPosition?a=new D(a.oldPosition,a.oldText+i.oldText,a.newPosition,a.newText+i.newText):(S[h++]=a,a=i)}return S[h++]=a,S}static _removeNoOps(m){if(m.length===0)return m;const S=[];let h=0;for(let a=0;a<m.length;a++){const r=m[a];r.oldText!==r.newText&&(S[h++]=r)}return S}}}),define(Q[838],Y([1,0,195,55]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.score=void 0;function b(D,T,f,v,m,S){if(Array.isArray(D)){let h=0;for(const a of D){const r=b(a,T,f,v,m,S);if(r===10)return r;r>h&&(h=r)}return h}else{if(typeof D=="string")return v?D==="*"?5:D===f?10:0:0;if(D){const{language:h,pattern:a,scheme:r,hasAccessToAllModels:i,notebookType:s}=D;if(!v&&!i)return 0;s&&m&&(T=m);let o=0;if(r)if(r===T.scheme)o=10;else if(r==="*")o=5;else return 0;if(h)if(h===f)o=10;else if(h==="*")o=Math.max(o,5);else return 0;if(s)if(s===S)o=10;else if(s==="*"&&S!==void 0)o=Math.max(o,5);else return 0;if(a){let u;if(typeof a=="string"?u=a:u={...a,base:(0,y.normalize)(a.base)},u===T.fsPath||(0,t.match)(u,T.fsPath))o=10;else return 0}return o}else return 0}}e.score=b}),define(Q[676],Y([1,0,6,4,137,838]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureRegistry=void 0;function T(S){return typeof S=="string"?!1:Array.isArray(S)?S.every(T):!!S.exclusive}class f{constructor(h,a,r,i){this.uri=h,this.languageId=a,this.notebookUri=r,this.notebookType=i}equals(h){return this.notebookType===h.notebookType&&this.languageId===h.languageId&&this.uri.toString()===h.uri.toString()&&this.notebookUri?.toString()===h.notebookUri?.toString()}}class v{constructor(h){this._notebookInfoResolver=h,this._clock=0,this._entries=[],this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event}register(h,a){let r={selector:h,provider:a,_score:-1,_time:this._clock++};return this._entries.push(r),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,y.toDisposable)(()=>{if(r){const i=this._entries.indexOf(r);i>=0&&(this._entries.splice(i,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),r=void 0)}})}has(h){return this.all(h).length>0}all(h){if(!h)return[];this._updateScores(h);const a=[];for(const r of this._entries)r._score>0&&a.push(r.provider);return a}ordered(h){const a=[];return this._orderedForEach(h,r=>a.push(r.provider)),a}orderedGroups(h){const a=[];let r,i;return this._orderedForEach(h,s=>{r&&i===s._score?r.push(s.provider):(i=s._score,r=[s.provider],a.push(r))}),a}_orderedForEach(h,a){this._updateScores(h);for(const r of this._entries)r._score>0&&a(r)}_updateScores(h){const a=this._notebookInfoResolver?.(h.uri),r=a?new f(h.uri,h.getLanguageId(),a.uri,a.type):new f(h.uri,h.getLanguageId(),void 0,void 0);if(!this._lastCandidate?.equals(r)){this._lastCandidate=r;for(const i of this._entries)if(i._score=(0,D.score)(i.selector,r.uri,r.languageId,(0,b.shouldSynchronizeModel)(h),r.notebookUri,r.notebookType),T(i.selector)&&i._score>0){for(const s of this._entries)s._score=0;i._score=1e3;break}this._entries.sort(v._compareByScoreAndTime)}}static _compareByScoreAndTime(h,a){return h._score<a._score?1:h._score>a._score?-1:m(h.selector)&&!m(a.selector)?1:!m(h.selector)&&m(a.selector)?-1:h._time<a._time?1:h._time>a._time?-1:0}}e.LanguageFeatureRegistry=v;function m(S){return typeof S=="string"?!1:Array.isArray(S)?S.some(m):!!S.isBuiltin}}),define(Q[839],Y([1,0,33,370,27]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketsUtils=e.RichEditBrackets=e.RichEditBracket=void 0;class D{constructor(c,l,n,g,w,E){this._richEditBracketBrand=void 0,this.languageId=c,this.index=l,this.open=n,this.close=g,this.forwardRegex=w,this.reversedRegex=E,this._openSet=D._toSet(this.open),this._closeSet=D._toSet(this.close)}isOpen(c){return this._openSet.has(c)}isClose(c){return this._closeSet.has(c)}static _toSet(c){const l=new Set;for(const n of c)l.add(n);return l}}e.RichEditBracket=D;function T(p){const c=p.length;p=p.map(E=>[E[0].toLowerCase(),E[1].toLowerCase()]);const l=[];for(let E=0;E<c;E++)l[E]=E;const n=(E,C)=>{const[I,_]=E,[A,k]=C;return I===A||I===k||_===A||_===k},g=(E,C)=>{const I=Math.min(E,C),_=Math.max(E,C);for(let A=0;A<c;A++)l[A]===_&&(l[A]=I)};for(let E=0;E<c;E++){const C=p[E];for(let I=E+1;I<c;I++){const _=p[I];n(C,_)&&g(l[E],l[I])}}const w=[];for(let E=0;E<c;E++){const C=[],I=[];for(let _=0;_<c;_++)if(l[_]===E){const[A,k]=p[_];C.push(A),I.push(k)}C.length>0&&w.push({open:C,close:I})}return w}class f{constructor(c,l){this._richEditBracketsBrand=void 0;const n=T(l);this.brackets=n.map((g,w)=>new D(c,w,g.open,g.close,h(g.open,g.close,n,w),a(g.open,g.close,n,w))),this.forwardRegex=r(this.brackets),this.reversedRegex=i(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const g of this.brackets){for(const w of g.open)this.textIsBracket[w]=g,this.textIsOpenBracket[w]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,w.length);for(const w of g.close)this.textIsBracket[w]=g,this.textIsOpenBracket[w]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,w.length)}}}e.RichEditBrackets=f;function v(p,c,l,n){for(let g=0,w=c.length;g<w;g++){if(g===l)continue;const E=c[g];for(const C of E.open)C.indexOf(p)>=0&&n.push(C);for(const C of E.close)C.indexOf(p)>=0&&n.push(C)}}function m(p,c){return p.length-c.length}function S(p){if(p.length<=1)return p;const c=[],l=new Set;for(const n of p)l.has(n)||(c.push(n),l.add(n));return c}function h(p,c,l,n){let g=[];g=g.concat(p),g=g.concat(c);for(let w=0,E=g.length;w<E;w++)v(g[w],l,n,g);return g=S(g),g.sort(m),g.reverse(),o(g)}function a(p,c,l,n){let g=[];g=g.concat(p),g=g.concat(c);for(let w=0,E=g.length;w<E;w++)v(g[w],l,n,g);return g=S(g),g.sort(m),g.reverse(),o(g.map(u))}function r(p){let c=[];for(const l of p){for(const n of l.open)c.push(n);for(const n of l.close)c.push(n)}return c=S(c),o(c)}function i(p){let c=[];for(const l of p){for(const n of l.open)c.push(n);for(const n of l.close)c.push(n)}return c=S(c),o(c.map(u))}function s(p){const c=/^[\w ]+$/.test(p);return p=t.escapeRegExpCharacters(p),c?`\\b${p}\\b`:p}function o(p){const c=`(${p.map(s).join(")|(")})`;return t.createRegExp(c,!0)}const u=function(){function p(n){const g=new Uint16Array(n.length);let w=0;for(let E=n.length-1;E>=0;E--)g[w++]=n.charCodeAt(E);return y.getPlatformTextDecoder().decode(g)}let c=null,l=null;return function(g){return c!==g&&(c=g,l=p(c)),l}}();class d{static _findPrevBracketInText(c,l,n,g){const w=n.match(c);if(!w)return null;const E=n.length-(w.index||0),C=w[0].length,I=g+E;return new b.Range(l,I-C+1,l,I+1)}static findPrevBracketInRange(c,l,n,g,w){const C=u(n).substring(n.length-w,n.length-g);return this._findPrevBracketInText(c,l,C,g)}static findNextBracketInText(c,l,n,g){const w=n.match(c);if(!w)return null;const E=w.index||0,C=w[0].length;if(C===0)return null;const I=g+E;return new b.Range(l,I+1,l,I+1+C)}static findNextBracketInRange(c,l,n,g,w){const E=n.substring(g,w);return this.findNextBracketInText(c,l,E,g)}}e.BracketsUtils=d}),define(Q[2324],Y([1,0,20,488,839]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketElectricCharacterSupport=void 0;class D{constructor(f){this._richEditBrackets=f}getElectricCharacters(){const f=[];if(this._richEditBrackets)for(const v of this._richEditBrackets.brackets)for(const m of v.close){const S=m.charAt(m.length-1);f.push(S)}return(0,t.distinct)(f)}onElectricCharacter(f,v,m){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const S=v.findTokenIndexAtOffset(m-1);if((0,y.ignoreBracketsInToken)(v.getStandardTokenType(S)))return null;const h=this._richEditBrackets.reversedRegex,a=v.getLineContent().substring(0,m-1)+f,r=b.BracketsUtils.findPrevBracketInRange(h,1,a,0,a.length);if(!r)return null;const i=a.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[i])return null;const o=v.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(o)?{matchOpenBracket:i}:null}}e.BracketElectricCharacterSupport=D}),define(Q[2325],Y([1,0,20,6,4,27,488,839,1886]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTextModelPart=void 0;class m extends b.Disposable{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(s,o){super(),this.textModel=s,this.languageConfigurationService=o,this.bracketPairsTree=this._register(new b.MutableDisposable),this.onDidChangeEmitter=new y.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(u=>{(!u.languageId||this.bracketPairsTree.value?.object.didLanguageChange(u.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}handleDidChangeOptions(s){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(s){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(s){this.bracketPairsTree.value?.object.handleContentChanged(s)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(s){this.bracketPairsTree.value?.object.handleDidChangeTokens(s)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const s=new b.DisposableStore;this.bracketPairsTree.value=S(s.add(new v.BracketPairsTree(this.textModel,o=>this.languageConfigurationService.getLanguageConfiguration(o))),s),s.add(this.bracketPairsTree.value.object.onDidChange(o=>this.onDidChangeEmitter.fire(o))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(s){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(s,!1)||t.CallbackIterable.empty}getBracketPairsInRangeWithMinIndentation(s){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(s,!0)||t.CallbackIterable.empty}getBracketsInRange(s,o=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(s,o)||t.CallbackIterable.empty}findMatchingBracketUp(s,o,u){const d=this.textModel.validatePosition(o),p=this.textModel.getLanguageIdAtPosition(d.lineNumber,d.column);if(this.canBuildAST){const c=this.languageConfigurationService.getLanguageConfiguration(p).bracketsNew.getClosingBracketInfo(s);if(!c)return null;const l=this.getBracketPairsInRange(D.Range.fromPositions(o,o)).findLast(n=>c.closes(n.openingBracketInfo));return l?l.openingBracketRange:null}else{const c=s.toLowerCase(),l=this.languageConfigurationService.getLanguageConfiguration(p).brackets;if(!l)return null;const n=l.textIsBracket[c];return n?r(this._findMatchingBracketUp(n,d,h(u))):null}}matchBracket(s,o){{const u=h(o);return this._matchBracket(this.textModel.validatePosition(s),u)}}_establishBracketSearchOffsets(s,o,u,d){const p=o.getCount(),c=o.getLanguageId(d);let l=Math.max(0,s.column-1-u.maxBracketLength);for(let g=d-1;g>=0;g--){const w=o.getEndOffset(g);if(w<=l)break;if((0,T.ignoreBracketsInToken)(o.getStandardTokenType(g))||o.getLanguageId(g)!==c){l=w;break}}let n=Math.min(o.getLineContent().length,s.column-1+u.maxBracketLength);for(let g=d+1;g<p;g++){const w=o.getStartOffset(g);if(w>=n)break;if((0,T.ignoreBracketsInToken)(o.getStandardTokenType(g))||o.getLanguageId(g)!==c){n=w;break}}return{searchStartOffset:l,searchEndOffset:n}}_matchBracket(s,o){const u=s.lineNumber,d=this.textModel.tokenization.getLineTokens(u),p=this.textModel.getLineContent(u),c=d.findTokenIndexAtOffset(s.column-1);if(c<0)return null;const l=this.languageConfigurationService.getLanguageConfiguration(d.getLanguageId(c)).brackets;if(l&&!(0,T.ignoreBracketsInToken)(d.getStandardTokenType(c))){let{searchStartOffset:n,searchEndOffset:g}=this._establishBracketSearchOffsets(s,d,l,c),w=null;for(;;){const E=f.BracketsUtils.findNextBracketInRange(l.forwardRegex,u,p,n,g);if(!E)break;if(E.startColumn<=s.column&&s.column<=E.endColumn){const C=p.substring(E.startColumn-1,E.endColumn-1).toLowerCase(),I=this._matchFoundBracket(E,l.textIsBracket[C],l.textIsOpenBracket[C],o);if(I){if(I instanceof a)return null;w=I}}n=E.endColumn-1}if(w)return w}if(c>0&&d.getStartOffset(c)===s.column-1){const n=c-1,g=this.languageConfigurationService.getLanguageConfiguration(d.getLanguageId(n)).brackets;if(g&&!(0,T.ignoreBracketsInToken)(d.getStandardTokenType(n))){const{searchStartOffset:w,searchEndOffset:E}=this._establishBracketSearchOffsets(s,d,g,n),C=f.BracketsUtils.findPrevBracketInRange(g.reversedRegex,u,p,w,E);if(C&&C.startColumn<=s.column&&s.column<=C.endColumn){const I=p.substring(C.startColumn-1,C.endColumn-1).toLowerCase(),_=this._matchFoundBracket(C,g.textIsBracket[I],g.textIsOpenBracket[I],o);if(_)return _ instanceof a?null:_}}}return null}_matchFoundBracket(s,o,u,d){if(!o)return null;const p=u?this._findMatchingBracketDown(o,s.getEndPosition(),d):this._findMatchingBracketUp(o,s.getStartPosition(),d);return p?p instanceof a?p:[s,p]:null}_findMatchingBracketUp(s,o,u){const d=s.languageId,p=s.reversedRegex;let c=-1,l=0;const n=(g,w,E,C)=>{for(;;){if(u&&++l%100===0&&!u())return a.INSTANCE;const I=f.BracketsUtils.findPrevBracketInRange(p,g,w,E,C);if(!I)break;const _=w.substring(I.startColumn-1,I.endColumn-1).toLowerCase();if(s.isOpen(_)?c++:s.isClose(_)&&c--,c===0)return I;C=I.startColumn-1}return null};for(let g=o.lineNumber;g>=1;g--){const w=this.textModel.tokenization.getLineTokens(g),E=w.getCount(),C=this.textModel.getLineContent(g);let I=E-1,_=C.length,A=C.length;g===o.lineNumber&&(I=w.findTokenIndexAtOffset(o.column-1),_=o.column-1,A=o.column-1);let k=!0;for(;I>=0;I--){const L=w.getLanguageId(I)===d&&!(0,T.ignoreBracketsInToken)(w.getStandardTokenType(I));if(L)k?_=w.getStartOffset(I):(_=w.getStartOffset(I),A=w.getEndOffset(I));else if(k&&_!==A){const R=n(g,C,_,A);if(R)return R}k=L}if(k&&_!==A){const L=n(g,C,_,A);if(L)return L}}return null}_findMatchingBracketDown(s,o,u){const d=s.languageId,p=s.forwardRegex;let c=1,l=0;const n=(w,E,C,I)=>{for(;;){if(u&&++l%100===0&&!u())return a.INSTANCE;const _=f.BracketsUtils.findNextBracketInRange(p,w,E,C,I);if(!_)break;const A=E.substring(_.startColumn-1,_.endColumn-1).toLowerCase();if(s.isOpen(A)?c++:s.isClose(A)&&c--,c===0)return _;C=_.endColumn-1}return null},g=this.textModel.getLineCount();for(let w=o.lineNumber;w<=g;w++){const E=this.textModel.tokenization.getLineTokens(w),C=E.getCount(),I=this.textModel.getLineContent(w);let _=0,A=0,k=0;w===o.lineNumber&&(_=E.findTokenIndexAtOffset(o.column-1),A=o.column-1,k=o.column-1);let L=!0;for(;_<C;_++){const R=E.getLanguageId(_)===d&&!(0,T.ignoreBracketsInToken)(E.getStandardTokenType(_));if(R)L||(A=E.getStartOffset(_)),k=E.getEndOffset(_);else if(L&&A!==k){const M=n(w,I,A,k);if(M)return M}L=R}if(L&&A!==k){const R=n(w,I,A,k);if(R)return R}}return null}findPrevBracket(s){const o=this.textModel.validatePosition(s);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketBefore(o)||null;let u=null,d=null,p=null;for(let c=o.lineNumber;c>=1;c--){const l=this.textModel.tokenization.getLineTokens(c),n=l.getCount(),g=this.textModel.getLineContent(c);let w=n-1,E=g.length,C=g.length;if(c===o.lineNumber){w=l.findTokenIndexAtOffset(o.column-1),E=o.column-1,C=o.column-1;const _=l.getLanguageId(w);u!==_&&(u=_,d=this.languageConfigurationService.getLanguageConfiguration(u).brackets,p=this.languageConfigurationService.getLanguageConfiguration(u).bracketsNew)}let I=!0;for(;w>=0;w--){const _=l.getLanguageId(w);if(u!==_){if(d&&p&&I&&E!==C){const k=f.BracketsUtils.findPrevBracketInRange(d.reversedRegex,c,g,E,C);if(k)return this._toFoundBracket(p,k);I=!1}u=_,d=this.languageConfigurationService.getLanguageConfiguration(u).brackets,p=this.languageConfigurationService.getLanguageConfiguration(u).bracketsNew}const A=!!d&&!(0,T.ignoreBracketsInToken)(l.getStandardTokenType(w));if(A)I?E=l.getStartOffset(w):(E=l.getStartOffset(w),C=l.getEndOffset(w));else if(p&&d&&I&&E!==C){const k=f.BracketsUtils.findPrevBracketInRange(d.reversedRegex,c,g,E,C);if(k)return this._toFoundBracket(p,k)}I=A}if(p&&d&&I&&E!==C){const _=f.BracketsUtils.findPrevBracketInRange(d.reversedRegex,c,g,E,C);if(_)return this._toFoundBracket(p,_)}}return null}findNextBracket(s){const o=this.textModel.validatePosition(s);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(o)||null;const u=this.textModel.getLineCount();let d=null,p=null,c=null;for(let l=o.lineNumber;l<=u;l++){const n=this.textModel.tokenization.getLineTokens(l),g=n.getCount(),w=this.textModel.getLineContent(l);let E=0,C=0,I=0;if(l===o.lineNumber){E=n.findTokenIndexAtOffset(o.column-1),C=o.column-1,I=o.column-1;const A=n.getLanguageId(E);d!==A&&(d=A,p=this.languageConfigurationService.getLanguageConfiguration(d).brackets,c=this.languageConfigurationService.getLanguageConfiguration(d).bracketsNew)}let _=!0;for(;E<g;E++){const A=n.getLanguageId(E);if(d!==A){if(c&&p&&_&&C!==I){const L=f.BracketsUtils.findNextBracketInRange(p.forwardRegex,l,w,C,I);if(L)return this._toFoundBracket(c,L);_=!1}d=A,p=this.languageConfigurationService.getLanguageConfiguration(d).brackets,c=this.languageConfigurationService.getLanguageConfiguration(d).bracketsNew}const k=!!p&&!(0,T.ignoreBracketsInToken)(n.getStandardTokenType(E));if(k)_||(C=n.getStartOffset(E)),I=n.getEndOffset(E);else if(c&&p&&_&&C!==I){const L=f.BracketsUtils.findNextBracketInRange(p.forwardRegex,l,w,C,I);if(L)return this._toFoundBracket(c,L)}_=k}if(c&&p&&_&&C!==I){const A=f.BracketsUtils.findNextBracketInRange(p.forwardRegex,l,w,C,I);if(A)return this._toFoundBracket(c,A)}}return null}findEnclosingBrackets(s,o){const u=this.textModel.validatePosition(s);if(this.canBuildAST){const I=D.Range.fromPositions(u),_=this.getBracketPairsInRange(D.Range.fromPositions(u,u)).findLast(A=>A.closingBracketRange!==void 0&&A.range.strictContainsRange(I));return _?[_.openingBracketRange,_.closingBracketRange]:null}const d=h(o),p=this.textModel.getLineCount(),c=new Map;let l=[];const n=(I,_)=>{if(!c.has(I)){const A=[];for(let k=0,L=_?_.brackets.length:0;k<L;k++)A[k]=0;c.set(I,A)}l=c.get(I)};let g=0;const w=(I,_,A,k,L)=>{for(;;){if(d&&++g%100===0&&!d())return a.INSTANCE;const R=f.BracketsUtils.findNextBracketInRange(I.forwardRegex,_,A,k,L);if(!R)break;const M=A.substring(R.startColumn-1,R.endColumn-1).toLowerCase(),N=I.textIsBracket[M];if(N&&(N.isOpen(M)?l[N.index]++:N.isClose(M)&&l[N.index]--,l[N.index]===-1))return this._matchFoundBracket(R,N,!1,d);k=R.endColumn-1}return null};let E=null,C=null;for(let I=u.lineNumber;I<=p;I++){const _=this.textModel.tokenization.getLineTokens(I),A=_.getCount(),k=this.textModel.getLineContent(I);let L=0,R=0,M=0;if(I===u.lineNumber){L=_.findTokenIndexAtOffset(u.column-1),R=u.column-1,M=u.column-1;const P=_.getLanguageId(L);E!==P&&(E=P,C=this.languageConfigurationService.getLanguageConfiguration(E).brackets,n(E,C))}let N=!0;for(;L<A;L++){const P=_.getLanguageId(L);if(E!==P){if(C&&N&&R!==M){const F=w(C,I,k,R,M);if(F)return r(F);N=!1}E=P,C=this.languageConfigurationService.getLanguageConfiguration(E).brackets,n(E,C)}const x=!!C&&!(0,T.ignoreBracketsInToken)(_.getStandardTokenType(L));if(x)N||(R=_.getStartOffset(L)),M=_.getEndOffset(L);else if(C&&N&&R!==M){const F=w(C,I,k,R,M);if(F)return r(F)}N=x}if(C&&N&&R!==M){const P=w(C,I,k,R,M);if(P)return r(P)}}return null}_toFoundBracket(s,o){if(!o)return null;let u=this.textModel.getValueInRange(o);u=u.toLowerCase();const d=s.getBracketInfo(u);return d?{range:o,bracketInfo:d}:null}}e.BracketPairsTextModelPart=m;function S(i,s){return{object:i,dispose:()=>s?.dispose()}}function h(i){if(typeof i>"u")return()=>!0;{const s=Date.now();return()=>Date.now()-s<=i}}class a{static{this.INSTANCE=new a}constructor(){this._searchCanceledBrand=void 0}}function r(i){return i instanceof a?null:i}}),define(Q[840],Y([1,0,6,33,27,137,1079,392,1129,4]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBuffer=void 0;class S extends m.Disposable{constructor(a,r,i,s,o,u,d){super(),this._onDidChangeContent=this._register(new t.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._BOM=r,this._mightContainNonBasicASCII=!u,this._mightContainRTL=s,this._mightContainUnusualLineTerminators=o,this._pieceTree=new T.PieceTreeBase(a,i,d)}equals(a){return!(a instanceof S)||this._BOM!==a._BOM||this.getEOL()!==a.getEOL()?!1:this._pieceTree.equal(a._pieceTree)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(a){return this._pieceTree.createSnapshot(a?this._BOM:"")}getOffsetAt(a,r){return this._pieceTree.getOffsetAt(a,r)}getPositionAt(a){return this._pieceTree.getPositionAt(a)}getRangeAt(a,r){const i=a+r,s=this.getPositionAt(a),o=this.getPositionAt(i);return new b.Range(s.lineNumber,s.column,o.lineNumber,o.column)}getValueInRange(a,r=0){if(a.isEmpty())return"";const i=this._getEndOfLine(r);return this._pieceTree.getValueInRange(a,i)}getValueLengthInRange(a,r=0){if(a.isEmpty())return 0;if(a.startLineNumber===a.endLineNumber)return a.endColumn-a.startColumn;const i=this.getOffsetAt(a.startLineNumber,a.startColumn),s=this.getOffsetAt(a.endLineNumber,a.endColumn);let o=0;const u=this._getEndOfLine(r),d=this.getEOL();if(u.length!==d.length){const p=u.length-d.length,c=a.endLineNumber-a.startLineNumber;o=p*c}return s-i+o}getCharacterCountInRange(a,r=0){if(this._mightContainNonBasicASCII){let i=0;const s=a.startLineNumber,o=a.endLineNumber;for(let u=s;u<=o;u++){const d=this.getLineContent(u),p=u===s?a.startColumn-1:0,c=u===o?a.endColumn-1:d.length;for(let l=p;l<c;l++)y.isHighSurrogate(d.charCodeAt(l))?(i=i+1,l=l+1):i=i+1}return i+=this._getEndOfLine(r).length*(o-s),i}return this.getValueLengthInRange(a,r)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(a){return this._pieceTree.getLineContent(a)}getLineCharCode(a,r){return this._pieceTree.getLineCharCode(a,r)}getCharCode(a){return this._pieceTree.getCharCode(a)}getLineLength(a){return this._pieceTree.getLineLength(a)}getLineMinColumn(a){return 1}getLineMaxColumn(a){return this.getLineLength(a)+1}getLineFirstNonWhitespaceColumn(a){const r=y.firstNonWhitespaceIndex(this.getLineContent(a));return r===-1?0:r+1}getLineLastNonWhitespaceColumn(a){const r=y.lastNonWhitespaceIndex(this.getLineContent(a));return r===-1?0:r+2}_getEndOfLine(a){switch(a){case 1:return` `;case 2:return`\r `;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(a){this._pieceTree.setEOL(a)}applyEdits(a,r,i){let s=this._mightContainRTL,o=this._mightContainUnusualLineTerminators,u=this._mightContainNonBasicASCII,d=!0,p=[];for(let C=0;C<a.length;C++){const I=a[C];d&&I._isTracked&&(d=!1);const _=I.range;if(I.text){let M=!0;u||(M=!y.isBasicASCII(I.text),u=M),!s&&M&&(s=y.containsRTL(I.text)),!o&&M&&(o=y.containsUnusualLineTerminators(I.text))}let A="",k=0,L=0,R=0;if(I.text){let M;[k,L,R,M]=(0,f.countEOL)(I.text);const N=this.getEOL();M===0||M===(N===`\r `?2:1)?A=I.text:A=I.text.replace(/\r\n|\r|\n/g,N)}p[C]={sortIndex:C,identifier:I.identifier||null,range:_,rangeOffset:this.getOffsetAt(_.startLineNumber,_.startColumn),rangeLength:this.getValueLengthInRange(_),text:A,eolCount:k,firstLineLength:L,lastLineLength:R,forceMoveMarkers:!!I.forceMoveMarkers,isAutoWhitespaceEdit:I.isAutoWhitespaceEdit||!1}}p.sort(S._sortOpsAscending);let c=!1;for(let C=0,I=p.length-1;C<I;C++){const _=p[C].range.getEndPosition(),A=p[C+1].range.getStartPosition();if(A.isBeforeOrEqual(_)){if(A.isBefore(_))throw new Error("Overlapping ranges are not allowed!");c=!0}}d&&(p=this._reduceOperations(p));const l=i||r?S._getInverseEditRanges(p):[],n=[];if(r)for(let C=0;C<p.length;C++){const I=p[C],_=l[C];if(I.isAutoWhitespaceEdit&&I.range.isEmpty())for(let A=_.startLineNumber;A<=_.endLineNumber;A++){let k="";A===_.startLineNumber&&(k=this.getLineContent(I.range.startLineNumber),y.firstNonWhitespaceIndex(k)!==-1)||n.push({lineNumber:A,oldContent:k})}}let g=null;if(i){let C=0;g=[];for(let I=0;I<p.length;I++){const _=p[I],A=l[I],k=this.getValueInRange(_.range),L=_.rangeOffset+C;C+=_.text.length-k.length,g[I]={sortIndex:_.sortIndex,identifier:_.identifier,range:A,text:k,textChange:new v.TextChange(_.rangeOffset,k,L,_.text)}}c||g.sort((I,_)=>I.sortIndex-_.sortIndex)}this._mightContainRTL=s,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=u;const w=this._doApplyEdits(p);let E=null;if(r&&n.length>0){n.sort((C,I)=>I.lineNumber-C.lineNumber),E=[];for(let C=0,I=n.length;C<I;C++){const _=n[C].lineNumber;if(C>0&&n[C-1].lineNumber===_)continue;const A=n[C].oldContent,k=this.getLineContent(_);k.length===0||k===A||y.firstNonWhitespaceIndex(k)!==-1||E.push(_)}}return this._onDidChangeContent.fire(),new D.ApplyEditsResult(g,w,E)}_reduceOperations(a){return a.length<1e3?a:[this._toSingleEditOperation(a)]}_toSingleEditOperation(a){let r=!1;const i=a[0].range,s=a[a.length-1].range,o=new b.Range(i.startLineNumber,i.startColumn,s.endLineNumber,s.endColumn);let u=i.startLineNumber,d=i.startColumn;const p=[];for(let w=0,E=a.length;w<E;w++){const C=a[w],I=C.range;r=r||C.forceMoveMarkers,p.push(this.getValueInRange(new b.Range(u,d,I.startLineNumber,I.startColumn))),C.text.length>0&&p.push(C.text),u=I.endLineNumber,d=I.endColumn}const c=p.join(""),[l,n,g]=(0,f.countEOL)(c);return{sortIndex:0,identifier:a[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:c,eolCount:l,firstLineLength:n,lastLineLength:g,forceMoveMarkers:r,isAutoWhitespaceEdit:!1}}_doApplyEdits(a){a.sort(S._sortOpsDescending);const r=[];for(let i=0;i<a.length;i++){const s=a[i],o=s.range.startLineNumber,u=s.range.startColumn,d=s.range.endLineNumber,p=s.range.endColumn;if(o===d&&u===p&&s.text.length===0)continue;s.text?(this._pieceTree.delete(s.rangeOffset,s.rangeLength),this._pieceTree.insert(s.rangeOffset,s.text,!0)):this._pieceTree.delete(s.rangeOffset,s.rangeLength);const c=new b.Range(o,u,d,p);r.push({range:c,rangeLength:s.rangeLength,text:s.text,rangeOffset:s.rangeOffset,forceMoveMarkers:s.forceMoveMarkers})}return r}findMatchesLineByLine(a,r,i,s){return this._pieceTree.findMatchesLineByLine(a,r,i,s)}getPieceTree(){return this._pieceTree}static _getInverseEditRange(a,r){const i=a.startLineNumber,s=a.startColumn,[o,u,d]=(0,f.countEOL)(r);let p;if(r.length>0){const c=o+1;c===1?p=new b.Range(i,s,i,s+u):p=new b.Range(i,s,i+c-1,d+1)}else p=new b.Range(i,s,i,s);return p}static _getInverseEditRanges(a){const r=[];let i=0,s=0,o=null;for(let u=0,d=a.length;u<d;u++){const p=a[u];let c,l;o?o.range.endLineNumber===p.range.startLineNumber?(c=i,l=s+(p.range.startColumn-o.range.endColumn)):(c=i+(p.range.startLineNumber-o.range.endLineNumber),l=p.range.startColumn):(c=p.range.startLineNumber,l=p.range.startColumn);let n;if(p.text.length>0){const g=p.eolCount+1;g===1?n=new b.Range(c,l,c,l+p.firstLineLength):n=new b.Range(c,l,c+g-1,p.lastLineLength+1)}else n=new b.Range(c,l,c,l);i=n.endLineNumber,s=n.endColumn,r.push(n),o=p}return r}static _sortOpsAscending(a,r){const i=b.Range.compareRangesUsingEnds(a.range,r.range);return i===0?a.sortIndex-r.sortIndex:i}static _sortOpsDescending(a,r){const i=b.Range.compareRangesUsingEnds(a.range,r.range);return i===0?r.sortIndex-a.sortIndex:-i}}e.PieceTreeTextBuffer=S}),define(Q[841],Y([1,0,33,1079,840]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBufferBuilder=void 0;class D{constructor(v,m,S,h,a,r,i,s,o){this._chunks=v,this._bom=m,this._cr=S,this._lf=h,this._crlf=a,this._containsRTL=r,this._containsUnusualLineTerminators=i,this._isBasicASCII=s,this._normalizeEOL=o}_getEOL(v){const m=this._cr+this._lf+this._crlf,S=this._cr+this._crlf;return m===0?v===1?` `:`\r `:S>m/2?`\r `:` `}create(v){const m=this._getEOL(v),S=this._chunks;if(this._normalizeEOL&&(m===`\r `&&(this._cr>0||this._lf>0)||m===` `&&(this._cr>0||this._crlf>0)))for(let a=0,r=S.length;a<r;a++){const i=S[a].buffer.replace(/\r\n|\r|\n/g,m),s=(0,y.createLineStartsFast)(i);S[a]=new y.StringBuffer(i,s)}const h=new b.PieceTreeTextBuffer(S,this._bom,m,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:h,disposable:h}}getFirstLineText(v){return this._chunks[0].buffer.substr(0,v).split(/\r\n|\r|\n/)[0]}}class T{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(v){if(v.length===0)return;this.chunks.length===0&&t.startsWithUTF8BOM(v)&&(this.BOM=t.UTF8_BOM_CHARACTER,v=v.substr(1));const m=v.charCodeAt(v.length-1);m===13||m>=55296&&m<=56319?(this._acceptChunk1(v.substr(0,v.length-1),!1),this._hasPreviousChar=!0,this._previousChar=m):(this._acceptChunk1(v,!1),this._hasPreviousChar=!1,this._previousChar=m)}_acceptChunk1(v,m){!m&&v.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+v):this._acceptChunk2(v))}_acceptChunk2(v){const m=(0,y.createLineStarts)(this._tmpLineStarts,v);this.chunks.push(new y.StringBuffer(v,m.lineStarts)),this.cr+=m.cr,this.lf+=m.lf,this.crlf+=m.crlf,m.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=t.containsRTL(v)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=t.containsUnusualLineTerminators(v)))}finish(v=!0){return this._finish(),new D(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,v)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const v=this.chunks[this.chunks.length-1];v.buffer+=String.fromCharCode(this._previousChar);const m=(0,y.createLineStartsFast)(v.buffer);v.lineStarts=m,this._previousChar===13&&this.cr++}}}e.PieceTreeTextBufferBuilder=T}),define(Q[1130],Y([1,0,62,18]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeSemanticTokensDto=e.encodeSemanticTokensDto=void 0;var b;(function(h){h[h.Full=1]="Full",h[h.Delta=2]="Delta"})(b||(b={}));function D(h){for(let a=0,r=h.length;a<r;a+=4){const i=h[a+0],s=h[a+1],o=h[a+2],u=h[a+3];h[a+0]=u,h[a+1]=o,h[a+2]=s,h[a+3]=i}}function T(h){const a=new Uint8Array(h.buffer,h.byteOffset,h.length*4);return y.isLittleEndian()||D(a),t.VSBuffer.wrap(a)}function f(h){const a=h.buffer;if(y.isLittleEndian()||D(a),a.byteOffset%4===0)return new Uint32Array(a.buffer,a.byteOffset,a.length/4);{const r=new Uint8Array(a.byteLength);return r.set(a),new Uint32Array(r.buffer,r.byteOffset,r.length/4)}}function v(h){const a=new Uint32Array(m(h));let r=0;if(a[r++]=h.id,h.type==="full")a[r++]=1,a[r++]=h.data.length,a.set(h.data,r),r+=h.data.length;else{a[r++]=2,a[r++]=h.deltas.length;for(const i of h.deltas)a[r++]=i.start,a[r++]=i.deleteCount,i.data?(a[r++]=i.data.length,a.set(i.data,r),r+=i.data.length):a[r++]=0}return T(a)}e.encodeSemanticTokensDto=v;function m(h){let a=0;if(a+=1+1,h.type==="full")a+=1+h.data.length;else{a+=1,a+=(1+1+1)*h.deltas.length;for(const r of h.deltas)r.data&&(a+=r.data.length)}return a}function S(h){const a=f(h);let r=0;const i=a[r++];if(a[r++]===1){const d=a[r++],p=a.subarray(r,r+d);return r+=d,{id:i,type:"full",data:p}}const o=a[r++],u=[];for(let d=0;d<o;d++){const p=a[r++],c=a[r++],l=a[r++];let n;l>0&&(n=a.subarray(r,r+l),r+=l),u[d]={start:p,deleteCount:c,data:n}}return{id:i,type:"delta",deltas:u}}e.decodeSemanticTokensDto=S}),define(Q[677],Y([1,0,6,4,18]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClickLinkGesture=e.ClickLinkOptions=e.ClickLinkKeyboardEvent=e.ClickLinkMouseEvent=void 0;function D(h,a){return!!h[a]}class T{constructor(a,r){this.target=a.target,this.isLeftClick=a.event.leftButton,this.isMiddleClick=a.event.middleButton,this.isRightClick=a.event.rightButton,this.hasTriggerModifier=D(a.event,r.triggerModifier),this.hasSideBySideModifier=D(a.event,r.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=a.event.detail<=1}}e.ClickLinkMouseEvent=T;class f{constructor(a,r){this.keyCodeIsTriggerKey=a.keyCode===r.triggerKey,this.keyCodeIsSideBySideKey=a.keyCode===r.triggerSideBySideKey,this.hasTriggerModifier=D(a,r.triggerModifier)}}e.ClickLinkKeyboardEvent=f;class v{constructor(a,r,i,s){this.triggerKey=a,this.triggerModifier=r,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=s}equals(a){return this.triggerKey===a.triggerKey&&this.triggerModifier===a.triggerModifier&&this.triggerSideBySideKey===a.triggerSideBySideKey&&this.triggerSideBySideModifier===a.triggerSideBySideModifier}}e.ClickLinkOptions=v;function m(h){return h==="altKey"?b.isMacintosh?new v(57,"metaKey",6,"altKey"):new v(5,"ctrlKey",6,"altKey"):b.isMacintosh?new v(6,"altKey",57,"metaKey"):new v(6,"altKey",5,"ctrlKey")}class S extends y.Disposable{constructor(a,r){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new t.Emitter),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new t.Emitter),this.onExecute=this._onExecute.event,this._onCancel=this._register(new t.Emitter),this.onCancel=this._onCancel.event,this._editor=a,this._extractLineNumberFromMouseEvent=r?.extractLineNumberFromMouseEvent??(i=>i.target.position?i.target.position.lineNumber:0),this._opts=m(this._editor.getOption(76)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(i=>{if(i.hasChanged(76)){const s=m(this._editor.getOption(76));if(this._opts.equals(s))return;this._opts=s,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(i=>this._onEditorMouseMove(new T(i,this._opts)))),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(new T(i,this._opts)))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(new T(i,this._opts)))),this._register(this._editor.onKeyDown(i=>this._onEditorKeyDown(new f(i,this._opts)))),this._register(this._editor.onKeyUp(i=>this._onEditorKeyUp(new f(i,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(i=>this._onDidChangeCursorSelection(i))),this._register(this._editor.onDidChangeModel(i=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(i=>{(i.scrollTopChanged||i.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(a){a.selection&&a.selection.startColumn!==a.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(a){this._lastMouseMoveEvent=a,this._onMouseMoveOrRelevantKeyDown.fire([a,null])}_onEditorMouseDown(a){this._hasTriggerKeyOnMouseDown=a.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(a)}_onEditorMouseUp(a){const r=this._extractLineNumberFromMouseEvent(a);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===r&&this._onExecute.fire(a)}_onEditorKeyDown(a){this._lastMouseMoveEvent&&(a.keyCodeIsTriggerKey||a.keyCodeIsSideBySideKey&&a.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,a]):a.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(a){a.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}e.ClickLinkGesture=S}),define(Q[1131],Y([1,0,14,15,6,4]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverOperation=e.HoverResult=e.HoverStartSource=e.HoverStartMode=void 0;var T;(function(h){h[h.Idle=0]="Idle",h[h.FirstWait=1]="FirstWait",h[h.SecondWait=2]="SecondWait",h[h.WaitingForAsync=3]="WaitingForAsync",h[h.WaitingForAsyncShowingLoading=4]="WaitingForAsyncShowingLoading"})(T||(T={}));var f;(function(h){h[h.Delayed=0]="Delayed",h[h.Immediate=1]="Immediate"})(f||(e.HoverStartMode=f={}));var v;(function(h){h[h.Mouse=0]="Mouse",h[h.Keyboard=1]="Keyboard"})(v||(e.HoverStartSource=v={}));class m{constructor(a,r,i){this.value=a,this.isComplete=r,this.hasLoadingMessage=i}}e.HoverResult=m;class S extends D.Disposable{constructor(a,r){super(),this._editor=a,this._computer=r,this._onResult=this._register(new b.Emitter),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new t.RunOnceScheduler(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new t.RunOnceScheduler(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new t.RunOnceScheduler(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(59).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(a,r=!0){this._state=a,r&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,t.createCancelableAsyncIterable)(a=>this._computer.computeAsync(a)),(async()=>{try{for await(const a of this._asyncIterable)a&&(this._result.push(a),this._fireResult());this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(a){(0,y.onUnexpectedError)(a)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const a=this._state===0,r=this._state===4;this._onResult.fire(new m(this._result.slice(0),a,r))}start(a){if(a===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}e.HoverOperation=S}),define(Q[2326],Y([1,0,668,4,51,7]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableContentWidget=void 0;const T=30,f=24;class v extends y.Disposable{constructor(S,h=new D.Dimension(10,10)){super(),this._editor=S,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new t.ResizableHTMLElement),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=D.Dimension.lift(h),this._resizableNode.layout(h.height,h.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(a=>{this._resize(new D.Dimension(a.dimension.width,a.dimension.height)),a.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){return this._contentPosition?.position?b.Position.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(S){const h=this._editor.getDomNode(),a=this._editor.getScrolledVisiblePosition(S);return!h||!a?void 0:D.getDomNodePagePosition(h).top+a.top-T}_availableVerticalSpaceBelow(S){const h=this._editor.getDomNode(),a=this._editor.getScrolledVisiblePosition(S);if(!h||!a)return;const r=D.getDomNodePagePosition(h),i=D.getClientArea(document.body),s=r.top+a.top+a.height;return i.height-s-f}_findPositionPreference(S,h){const a=Math.min(this._availableVerticalSpaceBelow(h)??1/0,S),r=Math.min(this._availableVerticalSpaceAbove(h)??1/0,S),i=Math.min(Math.max(r,a),S),s=Math.min(S,i);let o;return this._editor.getOption(59).above?o=s<=r?1:2:o=s<=a?2:1,o===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),o}_resize(S){this._resizableNode.layout(S.height,S.width)}}e.ResizableContentWidget=v}),define(Q[842],Y([1,0,15,4,51,27,22,10]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asCommandLink=e.InlayHintsFragments=e.InlayHintItem=e.InlayHintAnchor=void 0;class v{constructor(r,i){this.range=r,this.direction=i}}e.InlayHintAnchor=v;class m{constructor(r,i,s){this.hint=r,this.anchor=i,this.provider=s,this._isResolved=!1}with(r){const i=new m(this.hint,r.anchor,this.provider);return i._isResolved=this._isResolved,i._currentResolve=this._currentResolve,i}async resolve(r){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return await this._currentResolve,r.isCancellationRequested?void 0:this.resolve(r);this._isResolved||(this._currentResolve=this._doResolve(r).finally(()=>this._currentResolve=void 0)),await this._currentResolve}}async _doResolve(r){try{const i=await Promise.resolve(this.provider.resolveInlayHint(this.hint,r));this.hint.tooltip=i?.tooltip??this.hint.tooltip,this.hint.label=i?.label??this.hint.label,this._isResolved=!0}catch(i){(0,t.onUnexpectedExternalError)(i),this._isResolved=!1}}}e.InlayHintItem=m;class S{static async create(r,i,s,o){const u=[],d=r.ordered(i).reverse().map(p=>s.map(async c=>{try{const l=await p.provideInlayHints(i,c,o);l?.hints.length&&u.push([l,p])}catch(l){(0,t.onUnexpectedExternalError)(l)}}));if(await Promise.all(d.flat()),o.isCancellationRequested||i.isDisposed())throw new t.CancellationError;return new S(s,u,i)}constructor(r,i,s){this._disposables=new y.DisposableStore,this.ranges=r,this.provider=new Set;const o=[];for(const[u,d]of i){this._disposables.add(u),this.provider.add(d);for(const p of u.hints){const c=s.validatePosition(p.position);let l="before";const n=S._getRangeAtPosition(s,c);let g;n.getStartPosition().isBefore(c)?(g=D.Range.fromPositions(n.getStartPosition(),c),l="after"):(g=D.Range.fromPositions(c,n.getEndPosition()),l="before"),o.push(new m(p,new v(g,l),d))}}this.items=o.sort((u,d)=>b.Position.compare(u.hint.position,d.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(r,i){const s=i.lineNumber,o=r.getWordAtPosition(i);if(o)return new D.Range(s,o.startColumn,s,o.endColumn);r.tokenization.tokenizeIfCheap(s);const u=r.tokenization.getLineTokens(s),d=i.column-1,p=u.findTokenIndexAtOffset(d);let c=u.getStartOffset(p),l=u.getEndOffset(p);return l-c===1&&(c===d&&p>1?(c=u.getStartOffset(p-1),l=u.getEndOffset(p-1)):l===d&&p<u.getCount()-1&&(c=u.getStartOffset(p+1),l=u.getEndOffset(p+1))),new D.Range(s,c+1,s,l+1)}}e.InlayHintsFragments=S;function h(a){return f.URI.from({scheme:T.Schemas.command,path:a.id,query:a.arguments&&encodeURIComponent(JSON.stringify(a.arguments))}).toString()}e.asCommandLink=h}),define(Q[2327],Y([1,0,214,14,31,141,15,27,1879,811,568,304]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionItem=e.InlineCompletionList=e.InlineCompletionProviderResult=e.provideInlineCompletions=void 0;async function a(d,p,c,l,n=b.CancellationToken.None,g){const w=o(p,c),E=d.all(c),C=new D.SetMap;for(const P of E)P.groupId&&C.add(P.groupId,P);function I(P){if(!P.yieldsToGroupIds)return[];const x=[];for(const F of P.yieldsToGroupIds||[]){const V=C.get(F);for(const W of V)x.push(W)}return x}const _=new Map,A=new Set;function k(P,x){if(x=[...x,P],A.has(P))return x;A.add(P);try{const F=I(P);for(const V of F){const W=k(V,x);if(W)return W}}finally{A.delete(P)}}function L(P){const x=_.get(P);if(x)return x;const F=k(P,[]);F&&(0,T.onUnexpectedExternalError)(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${F.map(W=>W.toString?W.toString():""+W).join(" -> ")}`));const V=new y.DeferredPromise;return _.set(P,V.p),(async()=>{if(!F){const W=I(P);for(const z of W){const B=await L(z);if(B&&B.items.length>0)return}}try{return await P.provideInlineCompletions(c,p,l,n)}catch(W){(0,T.onUnexpectedExternalError)(W);return}})().then(W=>V.complete(W),W=>V.error(W)),V.p}const R=await Promise.all(E.map(async P=>({provider:P,completions:await L(P)}))),M=new Map,N=[];for(const P of R){const x=P.completions;if(!x)continue;const F=new i(x,P.provider);N.push(F);for(const V of x.items){const W=s.from(V,F,w,c,g);M.set(W.hash(),W)}}return new r(Array.from(M.values()),new Set(M.keys()),N)}e.provideInlineCompletions=a;class r{constructor(p,c,l){this.completions=p,this.hashs=c,this.providerResults=l}has(p){return this.hashs.has(p.hash())}dispose(){for(const p of this.providerResults)p.removeRef()}}e.InlineCompletionProviderResult=r;class i{constructor(p,c){this.inlineCompletions=p,this.provider=c,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}}e.InlineCompletionList=i;class s{static from(p,c,l,n,g){let w,E,C=p.range?f.Range.lift(p.range):l;if(typeof p.insertText=="string"){if(w=p.insertText,g&&p.completeBracketPairs){w=u(w,C.getStartPosition(),n,g);const I=w.length-p.insertText.length;I!==0&&(C=new f.Range(C.startLineNumber,C.startColumn,C.endLineNumber,C.endColumn+I))}E=void 0}else if("snippet"in p.insertText){const I=p.insertText.snippet.length;if(g&&p.completeBracketPairs){p.insertText.snippet=u(p.insertText.snippet,C.getStartPosition(),n,g);const A=p.insertText.snippet.length-I;A!==0&&(C=new f.Range(C.startLineNumber,C.startColumn,C.endLineNumber,C.endColumn+A))}const _=new h.SnippetParser().parse(p.insertText.snippet);_.children.length===1&&_.children[0]instanceof h.Text?(w=_.children[0].value,E=void 0):(w=_.toString(),E={snippet:p.insertText.snippet,range:C})}else(0,t.assertNever)(p.insertText);return new s(w,p.command,C,w,E,p.additionalTextEdits||(0,S.getReadonlyEmptyArray)(),p,c)}constructor(p,c,l,n,g,w,E,C){this.filterText=p,this.command=c,this.range=l,this.insertText=n,this.snippetInfo=g,this.additionalTextEdits=w,this.sourceInlineCompletion=E,this.source=C,p=p.replace(/\r\n|\r/g,` `),n=p.replace(/\r\n|\r/g,` `)}withRange(p){return new s(this.filterText,this.command,p,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}toSingleTextEdit(){return new m.SingleTextEdit(this.range,this.insertText)}}e.InlineCompletionItem=s;function o(d,p){const c=p.getWordAtPosition(d),l=p.getLineMaxColumn(d.lineNumber);return c?new f.Range(d.lineNumber,c.startColumn,d.lineNumber,l):f.Range.fromPositions(d,d.with(void 0,l))}function u(d,p,c,l){const g=c.getLineContent(p.lineNumber).substring(0,p.column-1)+d,E=c.tokenization.tokenizeLineWithEdit(p,g.length-(p.column-1),d)?.sliceAndInflate(p.column-1,g.length,0);return E?(0,v.fixBracketsInLine)(E,l):d}}),define(Q[2328],Y([2,3]),function(q,e){return q.create("vs/editor/browser/controller/textAreaHandler",e)}),define(Q[2329],Y([2,3]),function(q,e){return q.create("vs/editor/browser/coreCommands",e)}),define(Q[2330],Y([2,3]),function(q,e){return q.create("vs/editor/browser/editorExtensions",e)}),define(Q[2331],Y([2,3]),function(q,e){return q.create("vs/editor/browser/widget/codeEditorWidget",e)}),define(Q[2332],Y([2,3]),function(q,e){return q.create("vs/editor/browser/widget/diffEditor.contribution",e)}),define(Q[2333],Y([2,3]),function(q,e){return q.create("vs/editor/browser/widget/diffEditorWidget",e)}),define(Q[2334],Y([2,3]),function(q,e){return q.create("vs/editor/browser/widget/diffEditorWidget2/accessibleDiffViewer",e)}),define(Q[2335],Y([2,3]),function(q,e){return q.create("vs/editor/browser/widget/diffEditorWidget2/colors",e)}),define(Q[2336],Y([2,3]),function(q,e){return q.create("vs/editor/browser/widget/diffEditorWidget2/decorations",e)}),define(Q[2337],Y([2,3]),function(q,e){return q.create("vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors",e)}),define(Q[2338],Y([2,3]),function(q,e){return q.create("vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.contribution",e)}),define(Q[2339],Y([2,3]),function(q,e){return q.create("vs/editor/browser/widget/diffEditorWidget2/inlineDiffDeletedCodeMargin",e)}),define(Q[2340],Y([1,0,7,34,32,4,18,37,2339]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffDeletedCodeMargin=void 0;class m extends D.Disposable{get visibility(){return this._visibility}set visibility(h){this._visibility!==h&&(this._visibility=h,this._diffActions.style.visibility=h?"visible":"hidden")}constructor(h,a,r,i,s,o,u,d,p){super(),this._getViewZoneId=h,this._marginDomNode=a,this._modifiedEditor=r,this._diff=i,this._editor=s,this._viewLineCounts=o,this._originalTextModel=u,this._contextMenuService=d,this._clipboardService=p,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=f.ThemeIcon.asClassName(b.Codicon.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const c=this._modifiedEditor.getOption(65);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${c}px`,this._diffActions.style.lineHeight=`${c}px`,this._marginDomNode.appendChild(this._diffActions);let l=0;const n=r.getOption(125)&&!T.isIOS,g=(w,E)=>{this._contextMenuService.showContextMenu({domForShadowRoot:n?r.getDomNode()??void 0:void 0,getAnchor:()=>({x:w,y:E}),getActions:()=>{const C=[],I=i.modifiedRange.isEmpty;return C.push(new y.Action("diff.clipboard.copyDeletedContent",I?i.originalRange.length>1?(0,v.localize)(0,null):(0,v.localize)(1,null):i.originalRange.length>1?(0,v.localize)(2,null):(0,v.localize)(3,null),void 0,!0,async()=>{const A=this._originalTextModel.getValueInRange(i.originalRange.toExclusiveRange());await this._clipboardService.writeText(A)})),i.originalRange.length>1&&C.push(new y.Action("diff.clipboard.copyDeletedLineContent",I?(0,v.localize)(4,null,i.originalRange.startLineNumber+l):(0,v.localize)(5,null,i.originalRange.startLineNumber+l),void 0,!0,async()=>{let A=this._originalTextModel.getLineContent(i.originalRange.startLineNumber+l);A===""&&(A=this._originalTextModel.getEndOfLineSequence()===0?` `:`\r `),await this._clipboardService.writeText(A)})),r.getOption(89)||C.push(new y.Action("diff.inline.revertChange",(0,v.localize)(6,null),void 0,!0,async()=>{this._editor.revert(this._diff)})),C},autoSelectFirstItem:!0})};this._register((0,t.addStandardDisposableListener)(this._diffActions,"mousedown",w=>{const{top:E,height:C}=(0,t.getDomNodePagePosition)(this._diffActions),I=Math.floor(c/3);w.preventDefault(),g(w.posx,E+C+I)})),this._register(r.onMouseMove(w=>{(w.target.type===8||w.target.type===5)&&w.target.detail.viewZoneId===this._getViewZoneId()?(l=this._updateLightBulbPosition(this._marginDomNode,w.event.browserEvent.y,c),this.visibility=!0):this.visibility=!1})),this._register(r.onMouseDown(w=>{w.event.rightButton&&(w.target.type===8||w.target.type===5)&&w.target.detail.viewZoneId===this._getViewZoneId()&&(w.event.preventDefault(),l=this._updateLightBulbPosition(this._marginDomNode,w.event.browserEvent.y,c),g(w.event.posx,w.event.posy+c))}))}_updateLightBulbPosition(h,a,r){const{top:i}=(0,t.getDomNodePagePosition)(h),s=a-i,o=Math.floor(s/r),u=o*r;if(this._diffActions.style.top=`${u}px`,this._viewLineCounts){let d=0;for(let p=0;p<this._viewLineCounts.length;p++)if(d+=this._viewLineCounts[p],o<d)return p}return o}}e.InlineDiffDeletedCodeMargin=m}),define(Q[2341],Y([2,3]),function(q,e){return q.create("vs/editor/browser/widget/diffEditorWidget2/movedBlocksLines",e)}),define(Q[1132],Y([1,0,7,85,34,20,32,4,109,37,391,366,2341]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MovedBlocksLinesPart=void 0;class r extends f.Disposable{static{this.movedCodeBlockPadding=4}constructor(u,d,p,c,l){super(),this._rootElement=u,this._diffModel=d,this._originalEditorLayoutInfo=p,this._modifiedEditorLayoutInfo=c,this._editors=l,this._originalScrollTop=(0,v.observableFromEvent)(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=(0,v.observableFromEvent)(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=(0,v.observableSignalFromEvent)("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=(0,v.observableValue)("width",0),this._modifiedViewZonesChangedSignal=(0,v.observableSignalFromEvent)("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=(0,v.observableSignalFromEvent)("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=(0,v.derivedWithStore)("state",(_,A)=>{this._element.replaceChildren();const k=this._diffModel.read(_),L=k?.diff.read(_)?.movedTexts;if(!L||L.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(_);const R=this._originalEditorLayoutInfo.read(_),M=this._modifiedEditorLayoutInfo.read(_);if(!R||!M){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(_),this._originalViewZonesChangedSignal.read(_);const N=L.map(B=>{function K(X,te){const Z=te.getTopForLineNumber(X.startLineNumber,!0),se=te.getTopForLineNumber(X.endLineNumberExclusive,!0);return(Z+se)/2}const H=K(B.lineRangeMapping.original,this._editors.original),U=this._originalScrollTop.read(_),G=K(B.lineRangeMapping.modified,this._editors.modified),$=this._modifiedScrollTop.read(_),ie=H-U,J=G-$,j=Math.min(H,G),ee=Math.max(H,G);return{range:new h.OffsetRange(j,ee),from:ie,to:J,fromWithoutScroll:H,toWithoutScroll:G,move:B}});N.sort((0,D.tieBreakComparators)((0,D.compareBy)(B=>B.fromWithoutScroll>B.toWithoutScroll,D.booleanComparator),(0,D.compareBy)(B=>B.fromWithoutScroll>B.toWithoutScroll?B.fromWithoutScroll:-B.toWithoutScroll,D.numberComparator)));const P=i.compute(N.map(B=>B.range)),x=10,F=R.verticalScrollbarWidth,V=(P.getTrackCount()-1)*10+x*2,W=F+V+(M.contentLeft-r.movedCodeBlockPadding);let z=0;for(const B of N){const K=P.getTrack(z),H=F+x+K*10,U=15,G=15,$=W,ie=M.glyphMarginWidth+M.lineNumbersWidth,J=18,j=document.createElementNS("http://www.w3.org/2000/svg","rect");j.classList.add("arrow-rectangle"),j.setAttribute("x",`${$-ie}`),j.setAttribute("y",`${B.to-J/2}`),j.setAttribute("width",`${ie}`),j.setAttribute("height",`${J}`),this._element.appendChild(j);const ee=document.createElementNS("http://www.w3.org/2000/svg","g"),X=document.createElementNS("http://www.w3.org/2000/svg","path");X.setAttribute("d",`M 0 ${B.from} L ${H} ${B.from} L ${H} ${B.to} L ${$-G} ${B.to}`),X.setAttribute("fill","none"),ee.appendChild(X);const te=document.createElementNS("http://www.w3.org/2000/svg","polygon");te.classList.add("arrow"),A.add((0,v.autorun)(Z=>{X.classList.toggle("currentMove",B.move===k.activeMovedText.read(Z)),te.classList.toggle("currentMove",B.move===k.activeMovedText.read(Z))})),te.setAttribute("points",`${$-G},${B.to-U/2} ${$},${B.to} ${$-G},${B.to+U/2}`),ee.appendChild(te),this._element.appendChild(ee),z++}this.width.set(V,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register((0,f.toDisposable)(()=>this._element.remove())),this._register((0,v.autorun)(_=>{const A=this._originalEditorLayoutInfo.read(_),k=this._modifiedEditorLayoutInfo.read(_);!A||!k||(this._element.style.left=`${A.width-A.verticalScrollbarWidth}px`,this._element.style.height=`${A.height}px`,this._element.style.width=`${A.verticalScrollbarWidth+A.contentLeft-r.movedCodeBlockPadding+this.width.read(_)}px`)})),this._register((0,v.keepAlive)(this._state,!0));const n=(0,v.derived)(_=>{const k=this._diffModel.read(_)?.diff.read(_);return k?k.movedTexts.map(L=>({move:L,original:new S.PlaceholderViewZone((0,v.constObservable)(L.lineRangeMapping.original.startLineNumber-1),18),modified:new S.PlaceholderViewZone((0,v.constObservable)(L.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register((0,S.applyViewZones)(this._editors.original,n.map(_=>_.map(A=>A.original)))),this._register((0,S.applyViewZones)(this._editors.modified,n.map(_=>_.map(A=>A.modified)))),this._register((0,v.autorunWithStore)((_,A)=>{const k=n.read(_);for(const L of k)A.add(new s(this._editors.original,L.original,L.move,"original",this._diffModel.get())),A.add(new s(this._editors.modified,L.modified,L.move,"modified",this._diffModel.get()))}));const g=(0,v.observableFromEvent)(this._editors.original.onDidChangeCursorPosition,()=>this._editors.original.getPosition()),w=(0,v.observableFromEvent)(this._editors.modified.onDidChangeCursorPosition,()=>this._editors.modified.getPosition()),E=(0,v.observableSignalFromEvent)("original.onDidFocusEditorWidget",_=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>_(void 0),0))),C=(0,v.observableSignalFromEvent)("modified.onDidFocusEditorWidget",_=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>_(void 0),0)));let I="modified";this._register((0,v.autorunHandleChanges)({createEmptyChangeSummary:()=>{},handleChange:(_,A)=>(_.didChange(E)&&(I="original"),_.didChange(C)&&(I="modified"),!0)},_=>{E.read(_),C.read(_);const A=this._diffModel.read(_);if(!A)return;const k=A.diff.read(_);let L;if(k&&I==="original"){const R=g.read(_);R&&(L=k.movedTexts.find(M=>M.lineRangeMapping.original.contains(R.lineNumber)))}if(k&&I==="modified"){const R=w.read(_);R&&(L=k.movedTexts.find(M=>M.lineRangeMapping.modified.contains(R.lineNumber)))}L!==A.movedTextToCompare.get()&&A.movedTextToCompare.set(void 0,void 0),A.setActiveMovedText(L)}))}}e.MovedBlocksLinesPart=r;class i{static compute(u){const d=[],p=[];for(const c of u){let l=d.findIndex(n=>!n.intersectsStrict(c));l===-1&&(d.length>=6?l=(0,D.findMaxIdxBy)(d,(0,D.compareBy)(g=>g.intersectWithRangeLength(c),D.numberComparator)):(l=d.length,d.push(new h.OffsetRangeSet))),d[l].addRange(c),p.push(l)}return new i(d.length,p)}constructor(u,d){this._trackCount=u,this.trackPerLineIdx=d}getTrack(u){return this.trackPerLineIdx[u]}getTrackCount(){return this._trackCount}}class s extends S.ViewZoneOverlayWidget{constructor(u,d,p,c,l){const n=(0,t.h)("div.diff-hidden-lines-widget");super(u,d,n.root),this._editor=u,this._move=p,this._kind=c,this._diffModel=l,this._nodes=(0,t.h)("div.diff-moved-code-block",{style:{marginRight:"4px"}},[(0,t.h)("div.text-content@textContent"),(0,t.h)("div.action-bar@actionBar")]),n.root.appendChild(this._nodes.root);const g=(0,v.observableFromEvent)(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register((0,S.applyStyle)(this._nodes.root,{paddingRight:g.map(_=>_.verticalScrollbarWidth)}));let w;p.changes.length>0?w=this._kind==="original"?(0,a.localize)(0,null,this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive):(0,a.localize)(1,null,this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive):w=this._kind==="original"?(0,a.localize)(2,null,this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive):(0,a.localize)(3,null,this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive);const E=this._register(new y.ActionBar(this._nodes.actionBar,{highlightToggledItems:!0})),C=new b.Action("",w,"",!1);E.push(C,{icon:!1,label:!0});const I=new b.Action("","Compare",m.ThemeIcon.asClassName(T.Codicon.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===p?void 0:this._move,void 0)});this._register((0,v.autorun)(_=>{const A=this._diffModel.movedTextToCompare.read(_)===p;I.checked=A})),E.push(I,{icon:!1,label:!0})}}}),define(Q[2342],Y([2,3]),function(q,e){return q.create("vs/editor/browser/widget/diffEditorWidget2/unchangedRanges",e)}),define(Q[2343],Y([2,3]),function(q,e){return q.create("vs/editor/browser/widget/diffReview",e)}),define(Q[2344],Y([2,3]),function(q,e){return q.create("vs/editor/browser/widget/inlineDiffMargin",e)}),define(Q[2345],Y([1,0,2344,7,34,4,27,32,37,18]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffMargin=void 0;class S extends D.Disposable{get visibility(){return this._visibility}set visibility(a){this._visibility!==a&&(this._visibility=a,a?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}constructor(a,r,i,s,o,u){super(),this._viewZoneId=a,this._marginDomNode=r,this.editor=i,this.diff=s,this._contextMenuService=o,this._clipboardService=u,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=v.ThemeIcon.asClassName(f.Codicon.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const d=i.getOption(65),p=i.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${d}px`,this._diffActions.style.lineHeight=`${d}px`,this._marginDomNode.appendChild(this._diffActions);const c=[],l=s.modifiedEndLineNumber===0;c.push(new b.Action("diff.clipboard.copyDeletedContent",l?s.originalEndLineNumber>s.modifiedStartLineNumber?t.localize(0,null):t.localize(1,null):s.originalEndLineNumber>s.modifiedStartLineNumber?t.localize(2,null):t.localize(3,null),void 0,!0,async()=>{const I=new T.Range(s.originalStartLineNumber,1,s.originalEndLineNumber+1,1),_=s.originalModel.getValueInRange(I);await this._clipboardService.writeText(_)}));let n=0,g;s.originalEndLineNumber>s.modifiedStartLineNumber&&(g=new b.Action("diff.clipboard.copyDeletedLineContent",l?t.localize(4,null,s.originalStartLineNumber):t.localize(5,null,s.originalStartLineNumber),void 0,!0,async()=>{const I=s.originalModel.getLineContent(s.originalStartLineNumber+n);if(I===""){const _=s.originalModel.getEndOfLineSequence();await this._clipboardService.writeText(_===0?` `:`\r `)}else await this._clipboardService.writeText(I)}),c.push(g)),i.getOption(89)||c.push(new b.Action("diff.inline.revertChange",t.localize(6,null),void 0,!0,async()=>{const I=new T.Range(s.originalStartLineNumber,1,s.originalEndLineNumber,s.originalModel.getLineMaxColumn(s.originalEndLineNumber)),_=s.originalModel.getValueInRange(I);if(s.modifiedEndLineNumber===0){const A=i.getModel().getLineMaxColumn(s.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new T.Range(s.modifiedStartLineNumber,A,s.modifiedStartLineNumber,A),text:p+_}])}else{const A=i.getModel().getLineMaxColumn(s.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new T.Range(s.modifiedStartLineNumber,1,s.modifiedEndLineNumber,A),text:_}])}}));const E=i.getOption(125)&&!m.isIOS,C=(I,_)=>{this._contextMenuService.showContextMenu({domForShadowRoot:E?i.getDomNode()??void 0:void 0,getAnchor:()=>({x:I,y:_}),getActions:()=>(g&&(g.label=l?t.localize(7,null,s.originalStartLineNumber+n):t.localize(8,null,s.originalStartLineNumber+n)),c),autoSelectFirstItem:!0})};this._register(y.addStandardDisposableListener(this._diffActions,"mousedown",I=>{const{top:_,height:A}=y.getDomNodePagePosition(this._diffActions),k=Math.floor(d/3);I.preventDefault(),C(I.posx,_+A+k)})),this._register(i.onMouseMove(I=>{I.target.type===8||I.target.type===5?I.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,n=this._updateLightBulbPosition(this._marginDomNode,I.event.browserEvent.y,d)):this.visibility=!1:this.visibility=!1})),this._register(i.onMouseDown(I=>{I.event.rightButton&&(I.target.type===8||I.target.type===5)&&I.target.detail.viewZoneId===this._viewZoneId&&(I.event.preventDefault(),n=this._updateLightBulbPosition(this._marginDomNode,I.event.browserEvent.y,d),C(I.event.posx,I.event.posy+d))}))}_updateLightBulbPosition(a,r,i){const{top:s}=y.getDomNodePagePosition(a),o=r-s,u=Math.floor(o/i),d=u*i;if(this._diffActions.style.top=`${d}px`,this.diff.viewLineCounts){let p=0;for(let c=0;c<this.diff.viewLineCounts.length;c++)if(p+=this.diff.viewLineCounts[c],u<p)return c}return u}}e.InlineDiffMargin=S}),define(Q[2346],Y([2,3]),function(q,e){return q.create("vs/editor/common/config/editorConfigurationSchema",e)}),define(Q[2347],Y([2,3]),function(q,e){return q.create("vs/editor/common/config/editorOptions",e)}),define(Q[133],Y([1,0,20,42,18,660,367,2347]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOptions=e.EditorOption=e.editorOptionsRegistry=e.EDITOR_FONT_DEFAULTS=e.WrappingIndent=e.unicodeHighlightConfigKeys=e.inUntrustedWorkspace=e.filterValidationDecorations=e.RenderLineNumbersType=e.EditorLayoutInfoComputer=e.RenderMinimap=e.EditorFontVariations=e.EditorFontLigatures=e.cursorStyleToString=e.TextEditorCursorStyle=e.TextEditorCursorBlinkingStyle=e.stringSet=e.clampedFloat=e.clampedInt=e.boolean=e.ApplyUpdateResult=e.ComputeOptionsMemory=e.ConfigurationChangedEvent=e.MINIMAP_GUTTER_WIDTH=e.EditorAutoIndentStrategy=void 0;var v;(function(Ee){Ee[Ee.None=0]="None",Ee[Ee.Keep=1]="Keep",Ee[Ee.Brackets=2]="Brackets",Ee[Ee.Advanced=3]="Advanced",Ee[Ee.Full=4]="Full"})(v||(e.EditorAutoIndentStrategy=v={})),e.MINIMAP_GUTTER_WIDTH=8;class m{constructor(pe){this._values=pe}hasChanged(pe){return this._values[pe]}}e.ConfigurationChangedEvent=m;class S{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=S;class h{constructor(pe,Te,Ne,xe){this.id=pe,this.name=Te,this.defaultValue=Ne,this.schema=xe}applyUpdate(pe,Te){return r(pe,Te)}compute(pe,Te,Ne){return Ne}}class a{constructor(pe,Te){this.newValue=pe,this.didChange=Te}}e.ApplyUpdateResult=a;function r(Ee,pe){if(typeof Ee!="object"||typeof pe!="object"||!Ee||!pe)return new a(pe,Ee!==pe);if(Array.isArray(Ee)||Array.isArray(pe)){const Ne=Array.isArray(Ee)&&Array.isArray(pe)&&t.equals(Ee,pe);return new a(pe,!Ne)}let Te=!1;for(const Ne in pe)if(pe.hasOwnProperty(Ne)){const xe=r(Ee[Ne],pe[Ne]);xe.didChange&&(Ee[Ne]=xe.newValue,Te=!0)}return new a(Ee,Te)}class i{constructor(pe){this.schema=void 0,this.id=pe,this.name="_never_",this.defaultValue=void 0}applyUpdate(pe,Te){return r(pe,Te)}validate(pe){return this.defaultValue}}class s{constructor(pe,Te,Ne,xe){this.id=pe,this.name=Te,this.defaultValue=Ne,this.schema=xe}applyUpdate(pe,Te){return r(pe,Te)}validate(pe){return typeof pe>"u"?this.defaultValue:pe}compute(pe,Te,Ne){return Ne}}function o(Ee,pe){return typeof Ee>"u"?pe:Ee==="false"?!1:!!Ee}e.boolean=o;class u extends s{constructor(pe,Te,Ne,xe=void 0){typeof xe<"u"&&(xe.type="boolean",xe.default=Ne),super(pe,Te,Ne,xe)}validate(pe){return o(pe,this.defaultValue)}}function d(Ee,pe,Te,Ne){if(typeof Ee>"u")return pe;let xe=parseInt(Ee,10);return isNaN(xe)?pe:(xe=Math.max(Te,xe),xe=Math.min(Ne,xe),xe|0)}e.clampedInt=d;class p extends s{static clampedInt(pe,Te,Ne,xe){return d(pe,Te,Ne,xe)}constructor(pe,Te,Ne,xe,Ve,Fe=void 0){typeof Fe<"u"&&(Fe.type="integer",Fe.default=Ne,Fe.minimum=xe,Fe.maximum=Ve),super(pe,Te,Ne,Fe),this.minimum=xe,this.maximum=Ve}validate(pe){return p.clampedInt(pe,this.defaultValue,this.minimum,this.maximum)}}function c(Ee,pe,Te,Ne){if(typeof Ee>"u")return pe;const xe=l.float(Ee,pe);return l.clamp(xe,Te,Ne)}e.clampedFloat=c;class l extends s{static clamp(pe,Te,Ne){return pe<Te?Te:pe>Ne?Ne:pe}static float(pe,Te){if(typeof pe=="number")return pe;if(typeof pe>"u")return Te;const Ne=parseFloat(pe);return isNaN(Ne)?Te:Ne}constructor(pe,Te,Ne,xe,Ve){typeof Ve<"u"&&(Ve.type="number",Ve.default=Ne),super(pe,Te,Ne,Ve),this.validationFn=xe}validate(pe){return this.validationFn(l.float(pe,this.defaultValue))}}class n extends s{static string(pe,Te){return typeof pe!="string"?Te:pe}constructor(pe,Te,Ne,xe=void 0){typeof xe<"u"&&(xe.type="string",xe.default=Ne),super(pe,Te,Ne,xe)}validate(pe){return n.string(pe,this.defaultValue)}}function g(Ee,pe,Te,Ne){return typeof Ee!="string"?pe:Ne&&Ee in Ne?Ne[Ee]:Te.indexOf(Ee)===-1?pe:Ee}e.stringSet=g;class w extends s{constructor(pe,Te,Ne,xe,Ve=void 0){typeof Ve<"u"&&(Ve.type="string",Ve.enum=xe,Ve.default=Ne),super(pe,Te,Ne,Ve),this._allowedValues=xe}validate(pe){return g(pe,this.defaultValue,this._allowedValues)}}class E extends h{constructor(pe,Te,Ne,xe,Ve,Fe,Be=void 0){typeof Be<"u"&&(Be.type="string",Be.enum=Ve,Be.default=xe),super(pe,Te,Ne,Be),this._allowedValues=Ve,this._convert=Fe}validate(pe){return typeof pe!="string"?this.defaultValue:this._allowedValues.indexOf(pe)===-1?this.defaultValue:this._convert(pe)}}function C(Ee){switch(Ee){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class I extends h{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[f.localize(0,null),f.localize(1,null),f.localize(2,null)],default:"auto",tags:["accessibility"],description:f.localize(3,null)})}validate(pe){switch(pe){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(pe,Te,Ne){return Ne===0?pe.accessibilitySupport:Ne}}class _ extends h{constructor(){const pe={insertSpace:!0,ignoreEmptyLines:!0};super(22,"comments",pe,{"editor.comments.insertSpace":{type:"boolean",default:pe.insertSpace,description:f.localize(4,null)},"editor.comments.ignoreEmptyLines":{type:"boolean",default:pe.ignoreEmptyLines,description:f.localize(5,null)}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{insertSpace:o(Te.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:o(Te.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}var A;(function(Ee){Ee[Ee.Hidden=0]="Hidden",Ee[Ee.Blink=1]="Blink",Ee[Ee.Smooth=2]="Smooth",Ee[Ee.Phase=3]="Phase",Ee[Ee.Expand=4]="Expand",Ee[Ee.Solid=5]="Solid"})(A||(e.TextEditorCursorBlinkingStyle=A={}));function k(Ee){switch(Ee){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var L;(function(Ee){Ee[Ee.Line=1]="Line",Ee[Ee.Block=2]="Block",Ee[Ee.Underline=3]="Underline",Ee[Ee.LineThin=4]="LineThin",Ee[Ee.BlockOutline=5]="BlockOutline",Ee[Ee.UnderlineThin=6]="UnderlineThin"})(L||(e.TextEditorCursorStyle=L={}));function R(Ee){switch(Ee){case L.Line:return"line";case L.Block:return"block";case L.Underline:return"underline";case L.LineThin:return"line-thin";case L.BlockOutline:return"block-outline";case L.UnderlineThin:return"underline-thin"}}e.cursorStyleToString=R;function M(Ee){switch(Ee){case"line":return L.Line;case"block":return L.Block;case"underline":return L.Underline;case"line-thin":return L.LineThin;case"block-outline":return L.BlockOutline;case"underline-thin":return L.UnderlineThin}}class N extends i{constructor(){super(139)}compute(pe,Te,Ne){const xe=["monaco-editor"];return Te.get(38)&&xe.push(Te.get(38)),pe.extraEditorClassName&&xe.push(pe.extraEditorClassName),Te.get(72)==="default"?xe.push("mouse-default"):Te.get(72)==="copy"&&xe.push("mouse-copy"),Te.get(109)&&xe.push("showUnused"),Te.get(137)&&xe.push("showDeprecated"),xe.join(" ")}}class P extends u{constructor(){super(36,"emptySelectionClipboard",!0,{description:f.localize(6,null)})}compute(pe,Te,Ne){return Ne&&pe.emptySelectionClipboard}}class x extends h{constructor(){const pe={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(40,"find",pe,{"editor.find.cursorMoveOnType":{type:"boolean",default:pe.cursorMoveOnType,description:f.localize(7,null)},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:pe.seedSearchStringFromSelection,enumDescriptions:[f.localize(8,null),f.localize(9,null),f.localize(10,null)],description:f.localize(11,null)},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:pe.autoFindInSelection,enumDescriptions:[f.localize(12,null),f.localize(13,null),f.localize(14,null)],description:f.localize(15,null)},"editor.find.globalFindClipboard":{type:"boolean",default:pe.globalFindClipboard,description:f.localize(16,null),included:b.isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:pe.addExtraSpaceOnTop,description:f.localize(17,null)},"editor.find.loop":{type:"boolean",default:pe.loop,description:f.localize(18,null)}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{cursorMoveOnType:o(Te.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof pe.seedSearchStringFromSelection=="boolean"?pe.seedSearchStringFromSelection?"always":"never":g(Te.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof pe.autoFindInSelection=="boolean"?pe.autoFindInSelection?"always":"never":g(Te.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:o(Te.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:o(Te.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:o(Te.loop,this.defaultValue.loop)}}}class F extends h{static{this.OFF='"liga" off, "calt" off'}static{this.ON='"liga" on, "calt" on'}constructor(){super(50,"fontLigatures",F.OFF,{anyOf:[{type:"boolean",description:f.localize(19,null)},{type:"string",description:f.localize(20,null)}],description:f.localize(21,null),default:!1})}validate(pe){return typeof pe>"u"?this.defaultValue:typeof pe=="string"?pe==="false"?F.OFF:pe==="true"?F.ON:pe:pe?F.ON:F.OFF}}e.EditorFontLigatures=F;class V extends h{static{this.OFF="normal"}static{this.TRANSLATE="translate"}constructor(){super(53,"fontVariations",V.OFF,{anyOf:[{type:"boolean",description:f.localize(22,null)},{type:"string",description:f.localize(23,null)}],description:f.localize(24,null),default:!1})}validate(pe){return typeof pe>"u"?this.defaultValue:typeof pe=="string"?pe==="false"?V.OFF:pe==="true"?V.TRANSLATE:pe:pe?V.TRANSLATE:V.OFF}compute(pe,Te,Ne){return pe.fontInfo.fontVariationSettings}}e.EditorFontVariations=V;class W extends i{constructor(){super(49)}compute(pe,Te,Ne){return pe.fontInfo}}class z extends s{constructor(){super(51,"fontSize",e.EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100,default:e.EDITOR_FONT_DEFAULTS.fontSize,description:f.localize(25,null)})}validate(pe){const Te=l.float(pe,this.defaultValue);return Te===0?e.EDITOR_FONT_DEFAULTS.fontSize:l.clamp(Te,6,100)}compute(pe,Te,Ne){return pe.fontInfo.fontSize}}class B extends h{static{this.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"]}static{this.MINIMUM_VALUE=1}static{this.MAXIMUM_VALUE=1e3}constructor(){super(52,"fontWeight",e.EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:B.MINIMUM_VALUE,maximum:B.MAXIMUM_VALUE,errorMessage:f.localize(26,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:B.SUGGESTION_VALUES}],default:e.EDITOR_FONT_DEFAULTS.fontWeight,description:f.localize(27,null)})}validate(pe){return pe==="normal"||pe==="bold"?pe:String(p.clampedInt(pe,e.EDITOR_FONT_DEFAULTS.fontWeight,B.MINIMUM_VALUE,B.MAXIMUM_VALUE))}}class K extends h{constructor(){const pe={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:""},Te={type:"string",enum:["peek","gotoAndPeek","goto"],default:pe.multiple,enumDescriptions:[f.localize(28,null),f.localize(29,null),f.localize(30,null)]},Ne=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(57,"gotoLocation",pe,{"editor.gotoLocation.multiple":{deprecationMessage:f.localize(31,null)},"editor.gotoLocation.multipleDefinitions":{description:f.localize(32,null),...Te},"editor.gotoLocation.multipleTypeDefinitions":{description:f.localize(33,null),...Te},"editor.gotoLocation.multipleDeclarations":{description:f.localize(34,null),...Te},"editor.gotoLocation.multipleImplementations":{description:f.localize(35,null),...Te},"editor.gotoLocation.multipleReferences":{description:f.localize(36,null),...Te},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:pe.alternativeDefinitionCommand,enum:Ne,description:f.localize(37,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:pe.alternativeTypeDefinitionCommand,enum:Ne,description:f.localize(38,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:pe.alternativeDeclarationCommand,enum:Ne,description:f.localize(39,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:pe.alternativeImplementationCommand,enum:Ne,description:f.localize(40,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:pe.alternativeReferenceCommand,enum:Ne,description:f.localize(41,null)}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{multiple:g(Te.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:Te.multipleDefinitions??g(Te.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:Te.multipleTypeDefinitions??g(Te.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:Te.multipleDeclarations??g(Te.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:Te.multipleImplementations??g(Te.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:Te.multipleReferences??g(Te.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:n.string(Te.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:n.string(Te.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:n.string(Te.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:n.string(Te.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:n.string(Te.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class H extends h{constructor(){const pe={enabled:!0,delay:300,sticky:!0,above:!0};super(59,"hover",pe,{"editor.hover.enabled":{type:"boolean",default:pe.enabled,description:f.localize(42,null)},"editor.hover.delay":{type:"number",default:pe.delay,minimum:0,maximum:1e4,description:f.localize(43,null)},"editor.hover.sticky":{type:"boolean",default:pe.sticky,description:f.localize(44,null)},"editor.hover.above":{type:"boolean",default:pe.above,description:f.localize(45,null)}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{enabled:o(Te.enabled,this.defaultValue.enabled),delay:p.clampedInt(Te.delay,this.defaultValue.delay,0,1e4),sticky:o(Te.sticky,this.defaultValue.sticky),above:o(Te.above,this.defaultValue.above)}}}var U;(function(Ee){Ee[Ee.None=0]="None",Ee[Ee.Text=1]="Text",Ee[Ee.Blocks=2]="Blocks"})(U||(e.RenderMinimap=U={}));class G extends i{constructor(){super(142)}compute(pe,Te,Ne){return G.computeLayout(Te,{memory:pe.memory,outerWidth:pe.outerWidth,outerHeight:pe.outerHeight,isDominatedByLongLines:pe.isDominatedByLongLines,lineHeight:pe.fontInfo.lineHeight,viewLineCount:pe.viewLineCount,lineNumbersDigitCount:pe.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:pe.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:pe.fontInfo.maxDigitWidth,pixelRatio:pe.pixelRatio,glyphMarginDecorationLaneCount:pe.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(pe){const Te=pe.height/pe.lineHeight,Ne=Math.floor(pe.paddingTop/pe.lineHeight);let xe=Math.floor(pe.paddingBottom/pe.lineHeight);pe.scrollBeyondLastLine&&(xe=Math.max(xe,Te-1));const Ve=(Ne+pe.viewLineCount+xe)/(pe.pixelRatio*pe.height),Fe=Math.floor(pe.viewLineCount/Ve);return{typicalViewportLineCount:Te,extraLinesBeforeFirstLine:Ne,extraLinesBeyondLastLine:xe,desiredRatio:Ve,minimapLineCount:Fe}}static _computeMinimapLayout(pe,Te){const Ne=pe.outerWidth,xe=pe.outerHeight,Ve=pe.pixelRatio;if(!pe.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(Ve*xe),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:xe};const Fe=Te.stableMinimapLayoutInput,Be=Fe&&pe.outerHeight===Fe.outerHeight&&pe.lineHeight===Fe.lineHeight&&pe.typicalHalfwidthCharacterWidth===Fe.typicalHalfwidthCharacterWidth&&pe.pixelRatio===Fe.pixelRatio&&pe.scrollBeyondLastLine===Fe.scrollBeyondLastLine&&pe.paddingTop===Fe.paddingTop&&pe.paddingBottom===Fe.paddingBottom&&pe.minimap.enabled===Fe.minimap.enabled&&pe.minimap.side===Fe.minimap.side&&pe.minimap.size===Fe.minimap.size&&pe.minimap.showSlider===Fe.minimap.showSlider&&pe.minimap.renderCharacters===Fe.minimap.renderCharacters&&pe.minimap.maxColumn===Fe.minimap.maxColumn&&pe.minimap.scale===Fe.minimap.scale&&pe.verticalScrollbarWidth===Fe.verticalScrollbarWidth&&pe.isViewportWrapping===Fe.isViewportWrapping,He=pe.lineHeight,et=pe.typicalHalfwidthCharacterWidth,Je=pe.scrollBeyondLastLine,st=pe.minimap.renderCharacters;let ze=Ve>=2?Math.round(pe.minimap.scale*2):pe.minimap.scale;const je=pe.minimap.maxColumn,Ge=pe.minimap.size,Ze=pe.minimap.side,tt=pe.verticalScrollbarWidth,Xe=pe.viewLineCount,nt=pe.remainingWidth,ft=pe.isViewportWrapping,Et=st?2:3;let It=Math.floor(Ve*xe);const Nt=It/Ve;let Ot=!1,kt=!1,xt=Et*ze,Mt=ze/Ve,Ht=1;if(Ge==="fill"||Ge==="fit"){const{typicalViewportLineCount:Ye,extraLinesBeforeFirstLine:Ke,extraLinesBeyondLastLine:ht,desiredRatio:Tt,minimapLineCount:Ft}=G.computeContainedMinimapLineCount({viewLineCount:Xe,scrollBeyondLastLine:Je,paddingTop:pe.paddingTop,paddingBottom:pe.paddingBottom,height:xe,lineHeight:He,pixelRatio:Ve});if(Xe/Ft>1)Ot=!0,kt=!0,ze=1,xt=1,Mt=ze/Ve;else{let $t=!1,Wt=ze+1;if(Ge==="fit"){const it=Math.ceil((Ke+Xe+ht)*xt);ft&&Be&&nt<=Te.stableFitRemainingWidth?($t=!0,Wt=Te.stableFitMaxMinimapScale):$t=it>It}if(Ge==="fill"||$t){Ot=!0;const it=ze;xt=Math.min(He*Ve,Math.max(1,Math.floor(1/Tt))),ft&&Be&&nt<=Te.stableFitRemainingWidth&&(Wt=Te.stableFitMaxMinimapScale),ze=Math.min(Wt,Math.max(1,Math.floor(xt/Et))),ze>it&&(Ht=Math.min(2,ze/it)),Mt=ze/Ve/Ht,It=Math.ceil(Math.max(Ye,Ke+Xe+ht)*xt),ft?(Te.stableMinimapLayoutInput=pe,Te.stableFitRemainingWidth=nt,Te.stableFitMaxMinimapScale=ze):(Te.stableMinimapLayoutInput=null,Te.stableFitRemainingWidth=0)}}}const Yt=Math.floor(je*Mt),jt=Math.min(Yt,Math.max(0,Math.floor((nt-tt-2)*Mt/(et+Mt)))+e.MINIMAP_GUTTER_WIDTH);let ii=Math.floor(Ve*jt);const ri=ii/Ve;ii=Math.floor(ii*Ht);const $e=st?1:2,Qe=Ze==="left"?0:Ne-jt-tt;return{renderMinimap:$e,minimapLeft:Qe,minimapWidth:jt,minimapHeightIsEditorHeight:Ot,minimapIsSampling:kt,minimapScale:ze,minimapLineHeight:xt,minimapCanvasInnerWidth:ii,minimapCanvasInnerHeight:It,minimapCanvasOuterWidth:ri,minimapCanvasOuterHeight:Nt}}static computeLayout(pe,Te){const Ne=Te.outerWidth|0,xe=Te.outerHeight|0,Ve=Te.lineHeight|0,Fe=Te.lineNumbersDigitCount|0,Be=Te.typicalHalfwidthCharacterWidth,He=Te.maxDigitWidth,et=Te.pixelRatio,Je=Te.viewLineCount,st=pe.get(134),ze=st==="inherit"?pe.get(133):st,je=ze==="inherit"?pe.get(129):ze,Ge=pe.get(132),Ze=Te.isDominatedByLongLines,tt=pe.get(56),Xe=pe.get(66).renderType!==0,nt=pe.get(67),ft=pe.get(103),Et=pe.get(82),It=pe.get(71),Nt=pe.get(101),Ot=Nt.verticalScrollbarSize,kt=Nt.verticalHasArrows,xt=Nt.arrowSize,Mt=Nt.horizontalScrollbarSize,Ht=pe.get(42),Yt=pe.get(108)!=="never";let jt=pe.get(64);Ht&&Yt&&(jt+=16);let ii=0;if(Xe){const qe=Math.max(Fe,nt);ii=Math.round(qe*He)}let ri=0;tt&&(ri=Ve*Te.glyphMarginDecorationLaneCount);let $e=0,Qe=$e+ri,Ye=Qe+ii,Ke=Ye+jt;const ht=Ne-ri-ii-jt;let Tt=!1,Ft=!1,Pt=-1;ze==="inherit"&&Ze?(Tt=!0,Ft=!0):je==="on"||je==="bounded"?Ft=!0:je==="wordWrapColumn"&&(Pt=Ge);const $t=G._computeMinimapLayout({outerWidth:Ne,outerHeight:xe,lineHeight:Ve,typicalHalfwidthCharacterWidth:Be,pixelRatio:et,scrollBeyondLastLine:ft,paddingTop:Et.top,paddingBottom:Et.bottom,minimap:It,verticalScrollbarWidth:Ot,viewLineCount:Je,remainingWidth:ht,isViewportWrapping:Ft},Te.memory||new S);$t.renderMinimap!==0&&$t.minimapLeft===0&&($e+=$t.minimapWidth,Qe+=$t.minimapWidth,Ye+=$t.minimapWidth,Ke+=$t.minimapWidth);const Wt=ht-$t.minimapWidth,it=Math.max(1,Math.floor((Wt-Ot-2)/Be)),ut=kt?xt:0;return Ft&&(Pt=Math.max(1,it),je==="bounded"&&(Pt=Math.min(Pt,Ge))),{width:Ne,height:xe,glyphMarginLeft:$e,glyphMarginWidth:ri,glyphMarginDecorationLaneCount:Te.glyphMarginDecorationLaneCount,lineNumbersLeft:Qe,lineNumbersWidth:ii,decorationsLeft:Ye,decorationsWidth:jt,contentLeft:Ke,contentWidth:Wt,minimap:$t,viewportColumn:it,isWordWrapMinified:Tt,isViewportWrapping:Ft,wrappingColumn:Pt,verticalScrollbarWidth:Ot,horizontalScrollbarHeight:Mt,overviewRuler:{top:ut,width:Ot,height:xe-2*ut,right:0}}}}e.EditorLayoutInfoComputer=G;class $ extends h{constructor(){super(136,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[f.localize(46,null),f.localize(47,null)],type:"string",enum:["simple","advanced"],default:"simple",description:f.localize(48,null)}})}validate(pe){return g(pe,"simple",["simple","advanced"])}compute(pe,Te,Ne){return Te.get(2)===2?"advanced":Ne}}class ie extends h{constructor(){const pe={enabled:!0};super(63,"lightbulb",pe,{"editor.lightbulb.enabled":{type:"boolean",default:pe.enabled,description:f.localize(49,null)}})}validate(pe){return!pe||typeof pe!="object"?this.defaultValue:{enabled:o(pe.enabled,this.defaultValue.enabled)}}}class J extends h{constructor(){const pe={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(113,"stickyScroll",pe,{"editor.stickyScroll.enabled":{type:"boolean",default:pe.enabled,description:f.localize(50,null)},"editor.stickyScroll.maxLineCount":{type:"number",default:pe.maxLineCount,minimum:1,maximum:10,description:f.localize(51,null)},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:pe.defaultModel,description:f.localize(52,null)},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:pe.scrollWithEditor,description:f.localize(53,null)}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{enabled:o(Te.enabled,this.defaultValue.enabled),maxLineCount:p.clampedInt(Te.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:g(Te.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:o(Te.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class j extends h{constructor(){const pe={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(138,"inlayHints",pe,{"editor.inlayHints.enabled":{type:"string",default:pe.enabled,description:f.localize(54,null),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[f.localize(55,null),f.localize(56,null,b.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),f.localize(57,null,b.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),f.localize(58,null)]},"editor.inlayHints.fontSize":{type:"number",default:pe.fontSize,markdownDescription:f.localize(59,null,"`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:pe.fontFamily,markdownDescription:f.localize(60,null,"`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:pe.padding,description:f.localize(61,null)}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return typeof Te.enabled=="boolean"&&(Te.enabled=Te.enabled?"on":"off"),{enabled:g(Te.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:p.clampedInt(Te.fontSize,this.defaultValue.fontSize,0,100),fontFamily:n.string(Te.fontFamily,this.defaultValue.fontFamily),padding:o(Te.padding,this.defaultValue.padding)}}}class ee extends h{constructor(){super(64,"lineDecorationsWidth",10)}validate(pe){return typeof pe=="string"&&/^\d+(\.\d+)?ch$/.test(pe)?-parseFloat(pe.substring(0,pe.length-2)):p.clampedInt(pe,this.defaultValue,0,1e3)}compute(pe,Te,Ne){return Ne<0?p.clampedInt(-Ne*pe.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):Ne}}class X extends l{constructor(){super(65,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,pe=>l.clamp(pe,0,150),{markdownDescription:f.localize(62,null)})}compute(pe,Te,Ne){return pe.fontInfo.lineHeight}}class te extends h{constructor(){const pe={enabled:!1,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(71,"minimap",pe,{"editor.minimap.enabled":{type:"boolean",default:pe.enabled,description:f.localize(63,null)},"editor.minimap.autohide":{type:"boolean",default:pe.autohide,description:f.localize(64,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[f.localize(65,null),f.localize(66,null),f.localize(67,null)],default:pe.size,description:f.localize(68,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:pe.side,description:f.localize(69,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:pe.showSlider,description:f.localize(70,null)},"editor.minimap.scale":{type:"number",default:pe.scale,minimum:1,maximum:3,enum:[1,2,3],description:f.localize(71,null)},"editor.minimap.renderCharacters":{type:"boolean",default:pe.renderCharacters,description:f.localize(72,null)},"editor.minimap.maxColumn":{type:"number",default:pe.maxColumn,description:f.localize(73,null)}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{enabled:o(Te.enabled,this.defaultValue.enabled),autohide:o(Te.autohide,this.defaultValue.autohide),size:g(Te.size,this.defaultValue.size,["proportional","fill","fit"]),side:g(Te.side,this.defaultValue.side,["right","left"]),showSlider:g(Te.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:o(Te.renderCharacters,this.defaultValue.renderCharacters),scale:p.clampedInt(Te.scale,1,1,3),maxColumn:p.clampedInt(Te.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function Z(Ee){return Ee==="ctrlCmd"?b.isMacintosh?"metaKey":"ctrlKey":"altKey"}class se extends h{constructor(){super(82,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:f.localize(74,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:f.localize(75,null)}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{top:p.clampedInt(Te.top,0,0,1e3),bottom:p.clampedInt(Te.bottom,0,0,1e3)}}}class re extends h{constructor(){const pe={enabled:!0,cycle:!0};super(84,"parameterHints",pe,{"editor.parameterHints.enabled":{type:"boolean",default:pe.enabled,description:f.localize(76,null)},"editor.parameterHints.cycle":{type:"boolean",default:pe.cycle,description:f.localize(77,null)}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{enabled:o(Te.enabled,this.defaultValue.enabled),cycle:o(Te.cycle,this.defaultValue.cycle)}}}class oe extends i{constructor(){super(140)}compute(pe,Te,Ne){return pe.pixelRatio}}class le extends h{constructor(){const pe={other:"on",comments:"off",strings:"off"},Te=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[f.localize(78,null),f.localize(79,null),f.localize(80,null)]}];super(87,"quickSuggestions",pe,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:Te,default:pe.strings,description:f.localize(81,null)},comments:{anyOf:Te,default:pe.comments,description:f.localize(82,null)},other:{anyOf:Te,default:pe.other,description:f.localize(83,null)}},default:pe,markdownDescription:f.localize(84,null,"#editor.suggestOnTriggerCharacters#")}),this.defaultValue=pe}validate(pe){if(typeof pe=="boolean"){const et=pe?"on":"off";return{comments:et,strings:et,other:et}}if(!pe||typeof pe!="object")return this.defaultValue;const{other:Te,comments:Ne,strings:xe}=pe,Ve=["on","inline","off"];let Fe,Be,He;return typeof Te=="boolean"?Fe=Te?"on":"off":Fe=g(Te,this.defaultValue.other,Ve),typeof Ne=="boolean"?Be=Ne?"on":"off":Be=g(Ne,this.defaultValue.comments,Ve),typeof xe=="boolean"?He=xe?"on":"off":He=g(xe,this.defaultValue.strings,Ve),{other:Fe,comments:Be,strings:He}}}var ne;(function(Ee){Ee[Ee.Off=0]="Off",Ee[Ee.On=1]="On",Ee[Ee.Relative=2]="Relative",Ee[Ee.Interval=3]="Interval",Ee[Ee.Custom=4]="Custom"})(ne||(e.RenderLineNumbersType=ne={}));class ce extends h{constructor(){super(66,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[f.localize(85,null),f.localize(86,null),f.localize(87,null),f.localize(88,null)],default:"on",description:f.localize(89,null)})}validate(pe){let Te=this.defaultValue.renderType,Ne=this.defaultValue.renderFn;return typeof pe<"u"&&(typeof pe=="function"?(Te=4,Ne=pe):pe==="interval"?Te=3:pe==="relative"?Te=2:pe==="on"?Te=1:Te=0),{renderType:Te,renderFn:Ne}}}function ae(Ee){const pe=Ee.get(96);return pe==="editable"?Ee.get(89):pe!=="on"}e.filterValidationDecorations=ae;class ue extends h{constructor(){const pe=[],Te={type:"number",description:f.localize(90,null)};super(100,"rulers",pe,{type:"array",items:{anyOf:[Te,{type:["object"],properties:{column:Te,color:{type:"string",description:f.localize(91,null),format:"color-hex"}}}]},default:pe,description:f.localize(92,null)})}validate(pe){if(Array.isArray(pe)){const Te=[];for(const Ne of pe)if(typeof Ne=="number")Te.push({column:p.clampedInt(Ne,0,0,1e4),color:null});else if(Ne&&typeof Ne=="object"){const xe=Ne;Te.push({column:p.clampedInt(xe.column,0,0,1e4),color:xe.color})}return Te.sort((Ne,xe)=>Ne.column-xe.column),Te}return this.defaultValue}}class de extends h{constructor(){super(90,"readOnlyMessage",void 0)}validate(pe){return!pe||typeof pe!="object"?this.defaultValue:pe}}function ge(Ee,pe){if(typeof Ee!="string")return pe;switch(Ee){case"hidden":return 2;case"visible":return 3;default:return 1}}class he extends h{constructor(){const pe={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(101,"scrollbar",pe,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[f.localize(93,null),f.localize(94,null),f.localize(95,null)],default:"auto",description:f.localize(96,null)},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[f.localize(97,null),f.localize(98,null),f.localize(99,null)],default:"auto",description:f.localize(100,null)},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:pe.verticalScrollbarSize,description:f.localize(101,null)},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:pe.horizontalScrollbarSize,description:f.localize(102,null)},"editor.scrollbar.scrollByPage":{type:"boolean",default:pe.scrollByPage,description:f.localize(103,null)}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe,Ne=p.clampedInt(Te.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),xe=p.clampedInt(Te.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:p.clampedInt(Te.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:ge(Te.vertical,this.defaultValue.vertical),horizontal:ge(Te.horizontal,this.defaultValue.horizontal),useShadows:o(Te.useShadows,this.defaultValue.useShadows),verticalHasArrows:o(Te.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:o(Te.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:o(Te.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:o(Te.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:Ne,horizontalSliderSize:p.clampedInt(Te.horizontalSliderSize,Ne,0,1e3),verticalScrollbarSize:xe,verticalSliderSize:p.clampedInt(Te.verticalSliderSize,xe,0,1e3),scrollByPage:o(Te.scrollByPage,this.defaultValue.scrollByPage)}}}e.inUntrustedWorkspace="inUntrustedWorkspace",e.unicodeHighlightConfigKeys={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class be extends h{constructor(){const pe={nonBasicASCII:e.inUntrustedWorkspace,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:e.inUntrustedWorkspace,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(123,"unicodeHighlight",pe,{[e.unicodeHighlightConfigKeys.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:pe.nonBasicASCII,description:f.localize(104,null)},[e.unicodeHighlightConfigKeys.invisibleCharacters]:{restricted:!0,type:"boolean",default:pe.invisibleCharacters,description:f.localize(105,null)},[e.unicodeHighlightConfigKeys.ambiguousCharacters]:{restricted:!0,type:"boolean",default:pe.ambiguousCharacters,description:f.localize(106,null)},[e.unicodeHighlightConfigKeys.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:pe.includeComments,description:f.localize(107,null)},[e.unicodeHighlightConfigKeys.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:pe.includeStrings,description:f.localize(108,null)},[e.unicodeHighlightConfigKeys.allowedCharacters]:{restricted:!0,type:"object",default:pe.allowedCharacters,description:f.localize(109,null),additionalProperties:{type:"boolean"}},[e.unicodeHighlightConfigKeys.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:pe.allowedLocales,description:f.localize(110,null)}})}applyUpdate(pe,Te){let Ne=!1;Te.allowedCharacters&&pe&&(y.equals(pe.allowedCharacters,Te.allowedCharacters)||(pe={...pe,allowedCharacters:Te.allowedCharacters},Ne=!0)),Te.allowedLocales&&pe&&(y.equals(pe.allowedLocales,Te.allowedLocales)||(pe={...pe,allowedLocales:Te.allowedLocales},Ne=!0));const xe=super.applyUpdate(pe,Te);return Ne?new a(xe.newValue,!0):xe}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{nonBasicASCII:we(Te.nonBasicASCII,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),invisibleCharacters:o(Te.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:o(Te.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:we(Te.includeComments,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),includeStrings:we(Te.includeStrings,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),allowedCharacters:this.validateBooleanMap(pe.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(pe.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(pe,Te){if(typeof pe!="object"||!pe)return Te;const Ne={};for(const[xe,Ve]of Object.entries(pe))Ve===!0&&(Ne[xe]=!0);return Ne}}class ve extends h{constructor(){const pe={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1};super(61,"inlineSuggest",pe,{"editor.inlineSuggest.enabled":{type:"boolean",default:pe.enabled,description:f.localize(111,null)},"editor.inlineSuggest.showToolbar":{type:"string",default:pe.showToolbar,enum:["always","onHover"],enumDescriptions:[f.localize(112,null),f.localize(113,null)],description:f.localize(114,null)},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:pe.suppressSuggestions,description:f.localize(115,null)}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{enabled:o(Te.enabled,this.defaultValue.enabled),mode:g(Te.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:g(Te.showToolbar,this.defaultValue.showToolbar,["always","onHover"]),suppressSuggestions:o(Te.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:o(Te.keepOnBlur,this.defaultValue.keepOnBlur)}}}class Ie extends h{constructor(){const pe={enabled:D.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:D.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(14,"bracketPairColorization",pe,{"editor.bracketPairColorization.enabled":{type:"boolean",default:pe.enabled,markdownDescription:f.localize(116,null,"`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:pe.independentColorPoolPerBracketType,description:f.localize(117,null)}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{enabled:o(Te.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:o(Te.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class Se extends h{constructor(){const pe={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(15,"guides",pe,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[f.localize(118,null),f.localize(119,null),f.localize(120,null)],default:pe.bracketPairs,description:f.localize(121,null)},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[f.localize(122,null),f.localize(123,null),f.localize(124,null)],default:pe.bracketPairsHorizontal,description:f.localize(125,null)},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:pe.highlightActiveBracketPair,description:f.localize(126,null)},"editor.guides.indentation":{type:"boolean",default:pe.indentation,description:f.localize(127,null)},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[f.localize(128,null),f.localize(129,null),f.localize(130,null)],default:pe.highlightActiveIndentation,description:f.localize(131,null)}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{bracketPairs:we(Te.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:we(Te.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:o(Te.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:o(Te.indentation,this.defaultValue.indentation),highlightActiveIndentation:we(Te.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function we(Ee,pe,Te){const Ne=Te.indexOf(Ee);return Ne===-1?pe:Te[Ne]}class ye extends h{constructor(){const pe={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(116,"suggest",pe,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[f.localize(132,null),f.localize(133,null)],default:pe.insertMode,description:f.localize(134,null)},"editor.suggest.filterGraceful":{type:"boolean",default:pe.filterGraceful,description:f.localize(135,null)},"editor.suggest.localityBonus":{type:"boolean",default:pe.localityBonus,description:f.localize(136,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:pe.shareSuggestSelections,markdownDescription:f.localize(137,null)},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[f.localize(138,null),f.localize(139,null),f.localize(140,null),f.localize(141,null)],default:pe.selectionMode,markdownDescription:f.localize(142,null)},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:pe.snippetsPreventQuickSuggestions,description:f.localize(143,null)},"editor.suggest.showIcons":{type:"boolean",default:pe.showIcons,description:f.localize(144,null)},"editor.suggest.showStatusBar":{type:"boolean",default:pe.showStatusBar,description:f.localize(145,null)},"editor.suggest.preview":{type:"boolean",default:pe.preview,description:f.localize(146,null)},"editor.suggest.showInlineDetails":{type:"boolean",default:pe.showInlineDetails,description:f.localize(147,null)},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:f.localize(148,null)},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:f.localize(149,null)},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:f.localize(150,null)},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:f.localize(151,null)},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:f.localize(152,null)},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:f.localize(153,null)},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:f.localize(154,null)},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:f.localize(155,null)},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:f.localize(156,null)},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:f.localize(157,null)},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:f.localize(158,null)},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:f.localize(159,null)},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:f.localize(160,null)},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:f.localize(161,null)},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:f.localize(162,null)},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:f.localize(163,null)},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:f.localize(164,null)},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:f.localize(165,null)},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:f.localize(166,null)},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:f.localize(167,null)},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:f.localize(168,null)},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:f.localize(169,null)},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:f.localize(170,null)},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:f.localize(171,null)},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:f.localize(172,null)},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:f.localize(173,null)},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:f.localize(174,null)},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:f.localize(175,null)},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:f.localize(176,null)},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:f.localize(177,null)},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:f.localize(178,null)},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:f.localize(179,null)}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{insertMode:g(Te.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:o(Te.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:o(Te.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:o(Te.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:o(Te.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:g(Te.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:o(Te.showIcons,this.defaultValue.showIcons),showStatusBar:o(Te.showStatusBar,this.defaultValue.showStatusBar),preview:o(Te.preview,this.defaultValue.preview),previewMode:g(Te.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:o(Te.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:o(Te.showMethods,this.defaultValue.showMethods),showFunctions:o(Te.showFunctions,this.defaultValue.showFunctions),showConstructors:o(Te.showConstructors,this.defaultValue.showConstructors),showDeprecated:o(Te.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:o(Te.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:o(Te.showFields,this.defaultValue.showFields),showVariables:o(Te.showVariables,this.defaultValue.showVariables),showClasses:o(Te.showClasses,this.defaultValue.showClasses),showStructs:o(Te.showStructs,this.defaultValue.showStructs),showInterfaces:o(Te.showInterfaces,this.defaultValue.showInterfaces),showModules:o(Te.showModules,this.defaultValue.showModules),showProperties:o(Te.showProperties,this.defaultValue.showProperties),showEvents:o(Te.showEvents,this.defaultValue.showEvents),showOperators:o(Te.showOperators,this.defaultValue.showOperators),showUnits:o(Te.showUnits,this.defaultValue.showUnits),showValues:o(Te.showValues,this.defaultValue.showValues),showConstants:o(Te.showConstants,this.defaultValue.showConstants),showEnums:o(Te.showEnums,this.defaultValue.showEnums),showEnumMembers:o(Te.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:o(Te.showKeywords,this.defaultValue.showKeywords),showWords:o(Te.showWords,this.defaultValue.showWords),showColors:o(Te.showColors,this.defaultValue.showColors),showFiles:o(Te.showFiles,this.defaultValue.showFiles),showReferences:o(Te.showReferences,this.defaultValue.showReferences),showFolders:o(Te.showFolders,this.defaultValue.showFolders),showTypeParameters:o(Te.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:o(Te.showSnippets,this.defaultValue.showSnippets),showUsers:o(Te.showUsers,this.defaultValue.showUsers),showIssues:o(Te.showIssues,this.defaultValue.showIssues)}}}class Re extends h{constructor(){super(111,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:f.localize(180,null),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:f.localize(181,null),default:!0,type:"boolean"}})}validate(pe){return!pe||typeof pe!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:o(pe.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:o(pe.selectSubwords,this.defaultValue.selectSubwords)}}}var Le;(function(Ee){Ee[Ee.None=0]="None",Ee[Ee.Same=1]="Same",Ee[Ee.Indent=2]="Indent",Ee[Ee.DeepIndent=3]="DeepIndent"})(Le||(e.WrappingIndent=Le={}));class Pe extends h{constructor(){super(135,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[f.localize(182,null),f.localize(183,null),f.localize(184,null),f.localize(185,null)],description:f.localize(186,null),default:"same"}})}validate(pe){switch(pe){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(pe,Te,Ne){return Te.get(2)===2?0:Ne}}class Ae extends i{constructor(){super(143)}compute(pe,Te,Ne){const xe=Te.get(142);return{isDominatedByLongLines:pe.isDominatedByLongLines,isWordWrapMinified:xe.isWordWrapMinified,isViewportWrapping:xe.isViewportWrapping,wrappingColumn:xe.wrappingColumn}}}class Me extends h{constructor(){const pe={enabled:!0,showDropSelector:"afterDrop"};super(35,"dropIntoEditor",pe,{"editor.dropIntoEditor.enabled":{type:"boolean",default:pe.enabled,markdownDescription:f.localize(187,null)},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:f.localize(188,null),enum:["afterDrop","never"],enumDescriptions:[f.localize(189,null),f.localize(190,null)],default:"afterDrop"}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{enabled:o(Te.enabled,this.defaultValue.enabled),showDropSelector:g(Te.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class Oe extends h{constructor(){const pe={enabled:!0,showPasteSelector:"afterPaste"};super(83,"pasteAs",pe,{"editor.pasteAs.enabled":{type:"boolean",default:pe.enabled,markdownDescription:f.localize(191,null)},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:f.localize(192,null),enum:["afterPaste","never"],enumDescriptions:[f.localize(193,null),f.localize(194,null)],default:"afterPaste"}})}validate(pe){if(!pe||typeof pe!="object")return this.defaultValue;const Te=pe;return{enabled:o(Te.enabled,this.defaultValue.enabled),showPasteSelector:g(Te.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const De="Consolas, 'Courier New', monospace",Ce="Menlo, Monaco, 'Courier New', monospace",_e="'Droid Sans Mono', 'monospace', monospace";e.EDITOR_FONT_DEFAULTS={fontFamily:b.isMacintosh?Ce:b.isLinux?_e:De,fontWeight:"normal",fontSize:12,lineHeight:0,letterSpacing:0},e.editorOptionsRegistry=[];function me(Ee){return e.editorOptionsRegistry[Ee.id]=Ee,Ee}var ke;(function(Ee){Ee[Ee.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",Ee[Ee.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",Ee[Ee.accessibilitySupport=2]="accessibilitySupport",Ee[Ee.accessibilityPageSize=3]="accessibilityPageSize",Ee[Ee.ariaLabel=4]="ariaLabel",Ee[Ee.ariaRequired=5]="ariaRequired",Ee[Ee.autoClosingBrackets=6]="autoClosingBrackets",Ee[Ee.screenReaderAnnounceInlineSuggestion=7]="screenReaderAnnounceInlineSuggestion",Ee[Ee.autoClosingDelete=8]="autoClosingDelete",Ee[Ee.autoClosingOvertype=9]="autoClosingOvertype",Ee[Ee.autoClosingQuotes=10]="autoClosingQuotes",Ee[Ee.autoIndent=11]="autoIndent",Ee[Ee.automaticLayout=12]="automaticLayout",Ee[Ee.autoSurround=13]="autoSurround",Ee[Ee.bracketPairColorization=14]="bracketPairColorization",Ee[Ee.guides=15]="guides",Ee[Ee.codeLens=16]="codeLens",Ee[Ee.codeLensFontFamily=17]="codeLensFontFamily",Ee[Ee.codeLensFontSize=18]="codeLensFontSize",Ee[Ee.colorDecorators=19]="colorDecorators",Ee[Ee.colorDecoratorsLimit=20]="colorDecoratorsLimit",Ee[Ee.columnSelection=21]="columnSelection",Ee[Ee.comments=22]="comments",Ee[Ee.contextmenu=23]="contextmenu",Ee[Ee.copyWithSyntaxHighlighting=24]="copyWithSyntaxHighlighting",Ee[Ee.cursorBlinking=25]="cursorBlinking",Ee[Ee.cursorSmoothCaretAnimation=26]="cursorSmoothCaretAnimation",Ee[Ee.cursorStyle=27]="cursorStyle",Ee[Ee.cursorSurroundingLines=28]="cursorSurroundingLines",Ee[Ee.cursorSurroundingLinesStyle=29]="cursorSurroundingLinesStyle",Ee[Ee.cursorWidth=30]="cursorWidth",Ee[Ee.disableLayerHinting=31]="disableLayerHinting",Ee[Ee.disableMonospaceOptimizations=32]="disableMonospaceOptimizations",Ee[Ee.domReadOnly=33]="domReadOnly",Ee[Ee.dragAndDrop=34]="dragAndDrop",Ee[Ee.dropIntoEditor=35]="dropIntoEditor",Ee[Ee.emptySelectionClipboard=36]="emptySelectionClipboard",Ee[Ee.experimentalWhitespaceRendering=37]="experimentalWhitespaceRendering",Ee[Ee.extraEditorClassName=38]="extraEditorClassName",Ee[Ee.fastScrollSensitivity=39]="fastScrollSensitivity",Ee[Ee.find=40]="find",Ee[Ee.fixedOverflowWidgets=41]="fixedOverflowWidgets",Ee[Ee.folding=42]="folding",Ee[Ee.foldingStrategy=43]="foldingStrategy",Ee[Ee.foldingHighlight=44]="foldingHighlight",Ee[Ee.foldingImportsByDefault=45]="foldingImportsByDefault",Ee[Ee.foldingMaximumRegions=46]="foldingMaximumRegions",Ee[Ee.unfoldOnClickAfterEndOfLine=47]="unfoldOnClickAfterEndOfLine",Ee[Ee.fontFamily=48]="fontFamily",Ee[Ee.fontInfo=49]="fontInfo",Ee[Ee.fontLigatures=50]="fontLigatures",Ee[Ee.fontSize=51]="fontSize",Ee[Ee.fontWeight=52]="fontWeight",Ee[Ee.fontVariations=53]="fontVariations",Ee[Ee.formatOnPaste=54]="formatOnPaste",Ee[Ee.formatOnType=55]="formatOnType",Ee[Ee.glyphMargin=56]="glyphMargin",Ee[Ee.gotoLocation=57]="gotoLocation",Ee[Ee.hideCursorInOverviewRuler=58]="hideCursorInOverviewRuler",Ee[Ee.hover=59]="hover",Ee[Ee.inDiffEditor=60]="inDiffEditor",Ee[Ee.inlineSuggest=61]="inlineSuggest",Ee[Ee.letterSpacing=62]="letterSpacing",Ee[Ee.lightbulb=63]="lightbulb",Ee[Ee.lineDecorationsWidth=64]="lineDecorationsWidth",Ee[Ee.lineHeight=65]="lineHeight",Ee[Ee.lineNumbers=66]="lineNumbers",Ee[Ee.lineNumbersMinChars=67]="lineNumbersMinChars",Ee[Ee.linkedEditing=68]="linkedEditing",Ee[Ee.links=69]="links",Ee[Ee.matchBrackets=70]="matchBrackets",Ee[Ee.minimap=71]="minimap",Ee[Ee.mouseStyle=72]="mouseStyle",Ee[Ee.mouseWheelScrollSensitivity=73]="mouseWheelScrollSensitivity",Ee[Ee.mouseWheelZoom=74]="mouseWheelZoom",Ee[Ee.multiCursorMergeOverlapping=75]="multiCursorMergeOverlapping",Ee[Ee.multiCursorModifier=76]="multiCursorModifier",Ee[Ee.multiCursorPaste=77]="multiCursorPaste",Ee[Ee.multiCursorLimit=78]="multiCursorLimit",Ee[Ee.occurrencesHighlight=79]="occurrencesHighlight",Ee[Ee.overviewRulerBorder=80]="overviewRulerBorder",Ee[Ee.overviewRulerLanes=81]="overviewRulerLanes",Ee[Ee.padding=82]="padding",Ee[Ee.pasteAs=83]="pasteAs",Ee[Ee.parameterHints=84]="parameterHints",Ee[Ee.peekWidgetDefaultFocus=85]="peekWidgetDefaultFocus",Ee[Ee.definitionLinkOpensInPeek=86]="definitionLinkOpensInPeek",Ee[Ee.quickSuggestions=87]="quickSuggestions",Ee[Ee.quickSuggestionsDelay=88]="quickSuggestionsDelay",Ee[Ee.readOnly=89]="readOnly",Ee[Ee.readOnlyMessage=90]="readOnlyMessage",Ee[Ee.renameOnType=91]="renameOnType",Ee[Ee.renderControlCharacters=92]="renderControlCharacters",Ee[Ee.renderFinalNewline=93]="renderFinalNewline",Ee[Ee.renderLineHighlight=94]="renderLineHighlight",Ee[Ee.renderLineHighlightOnlyWhenFocus=95]="renderLineHighlightOnlyWhenFocus",Ee[Ee.renderValidationDecorations=96]="renderValidationDecorations",Ee[Ee.renderWhitespace=97]="renderWhitespace",Ee[Ee.revealHorizontalRightPadding=98]="revealHorizontalRightPadding",Ee[Ee.roundedSelection=99]="roundedSelection",Ee[Ee.rulers=100]="rulers",Ee[Ee.scrollbar=101]="scrollbar",Ee[Ee.scrollBeyondLastColumn=102]="scrollBeyondLastColumn",Ee[Ee.scrollBeyondLastLine=103]="scrollBeyondLastLine",Ee[Ee.scrollPredominantAxis=104]="scrollPredominantAxis",Ee[Ee.selectionClipboard=105]="selectionClipboard",Ee[Ee.selectionHighlight=106]="selectionHighlight",Ee[Ee.selectOnLineNumbers=107]="selectOnLineNumbers",Ee[Ee.showFoldingControls=108]="showFoldingControls",Ee[Ee.showUnused=109]="showUnused",Ee[Ee.snippetSuggestions=110]="snippetSuggestions",Ee[Ee.smartSelect=111]="smartSelect",Ee[Ee.smoothScrolling=112]="smoothScrolling",Ee[Ee.stickyScroll=113]="stickyScroll",Ee[Ee.stickyTabStops=114]="stickyTabStops",Ee[Ee.stopRenderingLineAfter=115]="stopRenderingLineAfter",Ee[Ee.suggest=116]="suggest",Ee[Ee.suggestFontSize=117]="suggestFontSize",Ee[Ee.suggestLineHeight=118]="suggestLineHeight",Ee[Ee.suggestOnTriggerCharacters=119]="suggestOnTriggerCharacters",Ee[Ee.suggestSelection=120]="suggestSelection",Ee[Ee.tabCompletion=121]="tabCompletion",Ee[Ee.tabIndex=122]="tabIndex",Ee[Ee.unicodeHighlighting=123]="unicodeHighlighting",Ee[Ee.unusualLineTerminators=124]="unusualLineTerminators",Ee[Ee.useShadowDOM=125]="useShadowDOM",Ee[Ee.useTabStops=126]="useTabStops",Ee[Ee.wordBreak=127]="wordBreak",Ee[Ee.wordSeparators=128]="wordSeparators",Ee[Ee.wordWrap=129]="wordWrap",Ee[Ee.wordWrapBreakAfterCharacters=130]="wordWrapBreakAfterCharacters",Ee[Ee.wordWrapBreakBeforeCharacters=131]="wordWrapBreakBeforeCharacters",Ee[Ee.wordWrapColumn=132]="wordWrapColumn",Ee[Ee.wordWrapOverride1=133]="wordWrapOverride1",Ee[Ee.wordWrapOverride2=134]="wordWrapOverride2",Ee[Ee.wrappingIndent=135]="wrappingIndent",Ee[Ee.wrappingStrategy=136]="wrappingStrategy",Ee[Ee.showDeprecated=137]="showDeprecated",Ee[Ee.inlayHints=138]="inlayHints",Ee[Ee.editorClassName=139]="editorClassName",Ee[Ee.pixelRatio=140]="pixelRatio",Ee[Ee.tabFocusMode=141]="tabFocusMode",Ee[Ee.layoutInfo=142]="layoutInfo",Ee[Ee.wrappingInfo=143]="wrappingInfo",Ee[Ee.defaultColorDecorators=144]="defaultColorDecorators",Ee[Ee.colorDecoratorsActivatedOn=145]="colorDecoratorsActivatedOn",Ee[Ee.inlineCompletionsAccessibilityVerbose=146]="inlineCompletionsAccessibilityVerbose"})(ke||(e.EditorOption=ke={})),e.EditorOptions={acceptSuggestionOnCommitCharacter:me(new u(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:f.localize(195,null)})),acceptSuggestionOnEnter:me(new w(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",f.localize(196,null),""],markdownDescription:f.localize(197,null)})),accessibilitySupport:me(new I),accessibilityPageSize:me(new p(3,"accessibilityPageSize",10,1,1073741824,{description:f.localize(198,null),tags:["accessibility"]})),ariaLabel:me(new n(4,"ariaLabel",f.localize(199,null))),ariaRequired:me(new u(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:me(new u(7,"screenReaderAnnounceInlineSuggestion",!0,{description:f.localize(200,null),tags:["accessibility"]})),autoClosingBrackets:me(new w(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",f.localize(201,null),f.localize(202,null),""],description:f.localize(203,null)})),autoClosingDelete:me(new w(8,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",f.localize(204,null),""],description:f.localize(205,null)})),autoClosingOvertype:me(new w(9,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",f.localize(206,null),""],description:f.localize(207,null)})),autoClosingQuotes:me(new w(10,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",f.localize(208,null),f.localize(209,null),""],description:f.localize(210,null)})),autoIndent:me(new E(11,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],C,{enumDescriptions:[f.localize(211,null),f.localize(212,null),f.localize(213,null),f.localize(214,null),f.localize(215,null)],description:f.localize(216,null)})),automaticLayout:me(new u(12,"automaticLayout",!1)),autoSurround:me(new w(13,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[f.localize(217,null),f.localize(218,null),f.localize(219,null),""],description:f.localize(220,null)})),bracketPairColorization:me(new Ie),bracketPairGuides:me(new Se),stickyTabStops:me(new u(114,"stickyTabStops",!1,{description:f.localize(221,null)})),codeLens:me(new u(16,"codeLens",!0,{description:f.localize(222,null)})),codeLensFontFamily:me(new n(17,"codeLensFontFamily","",{description:f.localize(223,null)})),codeLensFontSize:me(new p(18,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:f.localize(224,null)})),colorDecorators:me(new u(19,"colorDecorators",!0,{description:f.localize(225,null)})),colorDecoratorActivatedOn:me(new w(145,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[f.localize(226,null),f.localize(227,null),f.localize(228,null)],description:f.localize(229,null)})),colorDecoratorsLimit:me(new p(20,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:f.localize(230,null)})),columnSelection:me(new u(21,"columnSelection",!1,{description:f.localize(231,null)})),comments:me(new _),contextmenu:me(new u(23,"contextmenu",!0)),copyWithSyntaxHighlighting:me(new u(24,"copyWithSyntaxHighlighting",!0,{description:f.localize(232,null)})),cursorBlinking:me(new E(25,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],k,{description:f.localize(233,null)})),cursorSmoothCaretAnimation:me(new w(26,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[f.localize(234,null),f.localize(235,null),f.localize(236,null)],description:f.localize(237,null)})),cursorStyle:me(new E(27,"cursorStyle",L.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],M,{description:f.localize(238,null)})),cursorSurroundingLines:me(new p(28,"cursorSurroundingLines",0,0,1073741824,{description:f.localize(239,null)})),cursorSurroundingLinesStyle:me(new w(29,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[f.localize(240,null),f.localize(241,null)],description:f.localize(242,null)})),cursorWidth:me(new p(30,"cursorWidth",0,0,1073741824,{markdownDescription:f.localize(243,null)})),disableLayerHinting:me(new u(31,"disableLayerHinting",!1)),disableMonospaceOptimizations:me(new u(32,"disableMonospaceOptimizations",!1)),domReadOnly:me(new u(33,"domReadOnly",!1)),dragAndDrop:me(new u(34,"dragAndDrop",!0,{description:f.localize(244,null)})),emptySelectionClipboard:me(new P),dropIntoEditor:me(new Me),stickyScroll:me(new J),experimentalWhitespaceRendering:me(new w(37,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[f.localize(245,null),f.localize(246,null),f.localize(247,null)],description:f.localize(248,null)})),extraEditorClassName:me(new n(38,"extraEditorClassName","")),fastScrollSensitivity:me(new l(39,"fastScrollSensitivity",5,Ee=>Ee<=0?5:Ee,{markdownDescription:f.localize(249,null)})),find:me(new x),fixedOverflowWidgets:me(new u(41,"fixedOverflowWidgets",!1)),folding:me(new u(42,"folding",!0,{description:f.localize(250,null)})),foldingStrategy:me(new w(43,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[f.localize(251,null),f.localize(252,null)],description:f.localize(253,null)})),foldingHighlight:me(new u(44,"foldingHighlight",!0,{description:f.localize(254,null)})),foldingImportsByDefault:me(new u(45,"foldingImportsByDefault",!1,{description:f.localize(255,null)})),foldingMaximumRegions:me(new p(46,"foldingMaximumRegions",5e3,10,65e3,{description:f.localize(256,null)})),unfoldOnClickAfterEndOfLine:me(new u(47,"unfoldOnClickAfterEndOfLine",!1,{description:f.localize(257,null)})),fontFamily:me(new n(48,"fontFamily",e.EDITOR_FONT_DEFAULTS.fontFamily,{description:f.localize(258,null)})),fontInfo:me(new W),fontLigatures2:me(new F),fontSize:me(new z),fontWeight:me(new B),fontVariations:me(new V),formatOnPaste:me(new u(54,"formatOnPaste",!1,{description:f.localize(259,null)})),formatOnType:me(new u(55,"formatOnType",!1,{description:f.localize(260,null)})),glyphMargin:me(new u(56,"glyphMargin",!0,{description:f.localize(261,null)})),gotoLocation:me(new K),hideCursorInOverviewRuler:me(new u(58,"hideCursorInOverviewRuler",!1,{description:f.localize(262,null)})),hover:me(new H),inDiffEditor:me(new u(60,"inDiffEditor",!1)),letterSpacing:me(new l(62,"letterSpacing",e.EDITOR_FONT_DEFAULTS.letterSpacing,Ee=>l.clamp(Ee,-5,20),{description:f.localize(263,null)})),lightbulb:me(new ie),lineDecorationsWidth:me(new ee),lineHeight:me(new X),lineNumbers:me(new ce),lineNumbersMinChars:me(new p(67,"lineNumbersMinChars",5,1,300)),linkedEditing:me(new u(68,"linkedEditing",!1,{description:f.localize(264,null)})),links:me(new u(69,"links",!0,{description:f.localize(265,null)})),matchBrackets:me(new w(70,"matchBrackets","always",["always","near","never"],{description:f.localize(266,null)})),minimap:me(new te),mouseStyle:me(new w(72,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:me(new l(73,"mouseWheelScrollSensitivity",1,Ee=>Ee===0?1:Ee,{markdownDescription:f.localize(267,null)})),mouseWheelZoom:me(new u(74,"mouseWheelZoom",!1,{markdownDescription:f.localize(268,null)})),multiCursorMergeOverlapping:me(new u(75,"multiCursorMergeOverlapping",!0,{description:f.localize(269,null)})),multiCursorModifier:me(new E(76,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],Z,{markdownEnumDescriptions:[f.localize(270,null),f.localize(271,null)],markdownDescription:f.localize(272,null)})),multiCursorPaste:me(new w(77,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[f.localize(273,null),f.localize(274,null)],markdownDescription:f.localize(275,null)})),multiCursorLimit:me(new p(78,"multiCursorLimit",1e4,1,1e5,{markdownDescription:f.localize(276,null)})),occurrencesHighlight:me(new u(79,"occurrencesHighlight",!0,{description:f.localize(277,null)})),overviewRulerBorder:me(new u(80,"overviewRulerBorder",!0,{description:f.localize(278,null)})),overviewRulerLanes:me(new p(81,"overviewRulerLanes",3,0,3)),padding:me(new se),pasteAs:me(new Oe),parameterHints:me(new re),peekWidgetDefaultFocus:me(new w(85,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[f.localize(279,null),f.localize(280,null)],description:f.localize(281,null)})),definitionLinkOpensInPeek:me(new u(86,"definitionLinkOpensInPeek",!1,{description:f.localize(282,null)})),quickSuggestions:me(new le),quickSuggestionsDelay:me(new p(88,"quickSuggestionsDelay",10,0,1073741824,{description:f.localize(283,null)})),readOnly:me(new u(89,"readOnly",!1)),readOnlyMessage:me(new de),renameOnType:me(new u(91,"renameOnType",!1,{description:f.localize(284,null),markdownDeprecationMessage:f.localize(285,null)})),renderControlCharacters:me(new u(92,"renderControlCharacters",!0,{description:f.localize(286,null),restricted:!0})),renderFinalNewline:me(new w(93,"renderFinalNewline",b.isLinux?"dimmed":"on",["off","on","dimmed"],{description:f.localize(287,null)})),renderLineHighlight:me(new w(94,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",f.localize(288,null)],description:f.localize(289,null)})),renderLineHighlightOnlyWhenFocus:me(new u(95,"renderLineHighlightOnlyWhenFocus",!1,{description:f.localize(290,null)})),renderValidationDecorations:me(new w(96,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:me(new w(97,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",f.localize(291,null),f.localize(292,null),f.localize(293,null),""],description:f.localize(294,null)})),revealHorizontalRightPadding:me(new p(98,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:me(new u(99,"roundedSelection",!0,{description:f.localize(295,null)})),rulers:me(new ue),scrollbar:me(new he),scrollBeyondLastColumn:me(new p(102,"scrollBeyondLastColumn",4,0,1073741824,{description:f.localize(296,null)})),scrollBeyondLastLine:me(new u(103,"scrollBeyondLastLine",!0,{description:f.localize(297,null)})),scrollPredominantAxis:me(new u(104,"scrollPredominantAxis",!0,{description:f.localize(298,null)})),selectionClipboard:me(new u(105,"selectionClipboard",!0,{description:f.localize(299,null),included:b.isLinux})),selectionHighlight:me(new u(106,"selectionHighlight",!0,{description:f.localize(300,null)})),selectOnLineNumbers:me(new u(107,"selectOnLineNumbers",!0)),showFoldingControls:me(new w(108,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[f.localize(301,null),f.localize(302,null),f.localize(303,null)],description:f.localize(304,null)})),showUnused:me(new u(109,"showUnused",!0,{description:f.localize(305,null)})),showDeprecated:me(new u(137,"showDeprecated",!0,{description:f.localize(306,null)})),inlayHints:me(new j),snippetSuggestions:me(new w(110,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[f.localize(307,null),f.localize(308,null),f.localize(309,null),f.localize(310,null)],description:f.localize(311,null)})),smartSelect:me(new Re),smoothScrolling:me(new u(112,"smoothScrolling",!1,{description:f.localize(312,null)})),stopRenderingLineAfter:me(new p(115,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:me(new ye),inlineSuggest:me(new ve),inlineCompletionsAccessibilityVerbose:me(new u(146,"inlineCompletionsAccessibilityVerbose",!1,{description:f.localize(313,null)})),suggestFontSize:me(new p(117,"suggestFontSize",0,0,1e3,{markdownDescription:f.localize(314,null,"`0`","`#editor.fontSize#`")})),suggestLineHeight:me(new p(118,"suggestLineHeight",0,0,1e3,{markdownDescription:f.localize(315,null,"`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:me(new u(119,"suggestOnTriggerCharacters",!0,{description:f.localize(316,null)})),suggestSelection:me(new w(120,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[f.localize(317,null),f.localize(318,null),f.localize(319,null)],description:f.localize(320,null)})),tabCompletion:me(new w(121,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[f.localize(321,null),f.localize(322,null),f.localize(323,null)],description:f.localize(324,null)})),tabIndex:me(new p(122,"tabIndex",0,-1,1073741824)),unicodeHighlight:me(new be),unusualLineTerminators:me(new w(124,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[f.localize(325,null),f.localize(326,null),f.localize(327,null)],description:f.localize(328,null)})),useShadowDOM:me(new u(125,"useShadowDOM",!0)),useTabStops:me(new u(126,"useTabStops",!0,{description:f.localize(329,null)})),wordBreak:me(new w(127,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[f.localize(330,null),f.localize(331,null)],description:f.localize(332,null)})),wordSeparators:me(new n(128,"wordSeparators",T.USUAL_WORD_SEPARATORS,{description:f.localize(333,null)})),wordWrap:me(new w(129,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[f.localize(334,null),f.localize(335,null),f.localize(336,null),f.localize(337,null)],description:f.localize(338,null)})),wordWrapBreakAfterCharacters:me(new n(130,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:me(new n(131,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:me(new p(132,"wordWrapColumn",80,1,1073741824,{markdownDescription:f.localize(339,null)})),wordWrapOverride1:me(new w(133,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:me(new w(134,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:me(new N),defaultColorDecorators:me(new u(144,"defaultColorDecorators",!1,{markdownDescription:f.localize(340,null)})),pixelRatio:me(new oe),tabFocusMode:me(new u(141,"tabFocusMode",!1,{markdownDescription:f.localize(341,null)})),layoutInfo:me(new G),wrappingInfo:me(new Ae),wrappingIndent:me(new Pe),wrappingStrategy:me(new $)}}),define(Q[2348],Y([1,0,7,140,33,258,133,51,27,484]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursor=void 0;class S{constructor(r,i,s,o,u,d,p){this.top=r,this.left=i,this.paddingLeft=s,this.width=o,this.height=u,this.textContent=d,this.textContentClassName=p}}class h{constructor(r){this._context=r;const i=this._context.configuration.options,s=i.get(49);this._cursorStyle=i.get(27),this._lineHeight=i.get(65),this._typicalHalfwidthCharacterWidth=s.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(30),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,y.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(`cursor ${m.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,D.applyFontInfo)(this._domNode,s),this._domNode.setDisplay("none"),this._position=new f.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(r){const i=this._context.configuration.options,s=i.get(49);return this._cursorStyle=i.get(27),this._lineHeight=i.get(65),this._typicalHalfwidthCharacterWidth=s.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(30),this._typicalHalfwidthCharacterWidth),(0,D.applyFontInfo)(this._domNode,s),!0}onCursorPositionChanged(r,i){return i?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=r,!0}_getGraphemeAwarePosition(){const{lineNumber:r,column:i}=this._position,s=this._context.viewModel.getLineContent(r),[o,u]=b.getCharContainingOffset(s,i-1);return[new f.Position(r,o+1),s.substring(o,u)]}_prepareRender(r){let i="",s="";const[o,u]=this._getGraphemeAwarePosition();if(this._cursorStyle===T.TextEditorCursorStyle.Line||this._cursorStyle===T.TextEditorCursorStyle.LineThin){const w=r.visibleRangeForPosition(o);if(!w||w.outsideRenderedLine)return null;let E;this._cursorStyle===T.TextEditorCursorStyle.Line?(E=t.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2),E>2&&(i=u,s=this._getTokenClassName(o))):E=t.computeScreenAwareSize(1);let C=w.left,I=0;E>=2&&C>=1&&(I=1,C-=I);const _=r.getVerticalOffsetForLineNumber(o.lineNumber)-r.bigNumbersDelta;return new S(_,C,I,E,this._lineHeight,i,s)}const d=r.linesVisibleRangesForRange(new v.Range(o.lineNumber,o.column,o.lineNumber,o.column+u.length),!1);if(!d||d.length===0)return null;const p=d[0];if(p.outsideRenderedLine||p.ranges.length===0)return null;const c=p.ranges[0],l=u===" "?this._typicalHalfwidthCharacterWidth:c.width<1?this._typicalHalfwidthCharacterWidth:c.width;this._cursorStyle===T.TextEditorCursorStyle.Block&&(i=u,s=this._getTokenClassName(o));let n=r.getVerticalOffsetForLineNumber(o.lineNumber)-r.bigNumbersDelta,g=this._lineHeight;return(this._cursorStyle===T.TextEditorCursorStyle.Underline||this._cursorStyle===T.TextEditorCursorStyle.UnderlineThin)&&(n+=this._lineHeight-2,g=2),new S(n,c.left,0,l,g,i,s)}_getTokenClassName(r){const i=this._context.viewModel.getViewLineData(r.lineNumber),s=i.tokens.findTokenIndexAtOffset(r.column-1);return i.tokens.getClassName(s)}prepareRender(r){this._renderData=this._prepareRender(r)}render(r){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${m.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}e.ViewCursor=h}),define(Q[2349],Y([1,0,109,1066,133]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorOptions=void 0;class D{get editorOptions(){return this._options}constructor(v,m){this.diffEditorWidth=m,this.couldShowInlineViewBecauseOfSize=(0,t.derived)(h=>this._options.read(h).renderSideBySide&&this.diffEditorWidth.read(h)<=this._options.read(h).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=(0,t.derived)(h=>this._options.read(h).renderOverviewRuler),this.renderSideBySide=(0,t.derived)(h=>this._options.read(h).renderSideBySide&&!(this._options.read(h).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(h))),this.readOnly=(0,t.derived)(h=>this._options.read(h).readOnly),this.shouldRenderRevertArrows=(0,t.derived)(h=>!(!this._options.read(h).renderMarginRevertIcon||!this.renderSideBySide.read(h)||this.readOnly.read(h))),this.renderIndicators=(0,t.derived)(h=>this._options.read(h).renderIndicators),this.enableSplitViewResizing=(0,t.derived)(h=>this._options.read(h).enableSplitViewResizing),this.splitViewDefaultRatio=(0,t.derived)(h=>this._options.read(h).splitViewDefaultRatio),this.ignoreTrimWhitespace=(0,t.derived)(h=>this._options.read(h).ignoreTrimWhitespace),this.maxComputationTimeMs=(0,t.derived)(h=>this._options.read(h).maxComputationTime),this.showMoves=(0,t.derived)(h=>this._options.read(h).experimental.showMoves&&this.renderSideBySide.read(h)),this.isInEmbeddedEditor=(0,t.derived)(h=>this._options.read(h).isInEmbeddedEditor),this.diffWordWrap=(0,t.derived)(h=>this._options.read(h).diffWordWrap),this.originalEditable=(0,t.derived)(h=>this._options.read(h).originalEditable),this.diffCodeLens=(0,t.derived)(h=>this._options.read(h).diffCodeLens),this.accessibilityVerbose=(0,t.derived)(h=>this._options.read(h).accessibilityVerbose),this.diffAlgorithm=(0,t.derived)(h=>this._options.read(h).diffAlgorithm),this.showEmptyDecorations=(0,t.derived)(h=>this._options.read(h).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=(0,t.derived)(h=>this._options.read(h).onlyShowAccessibleDiffViewer),this.hideUnchangedRegions=(0,t.derived)(h=>this._options.read(h).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=(0,t.derived)(h=>this._options.read(h).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=(0,t.derived)(h=>this._options.read(h).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsminimumLineCount=(0,t.derived)(h=>this._options.read(h).hideUnchangedRegions.minimumLineCount);const S={...v,...T(v,y.diffEditorDefaultOptions)};this._options=(0,t.observableValue)("options",S)}updateOptions(v){const m=T(v,this._options.get()),S={...this._options.get(),...v,...m};this._options.set(S,void 0,{changedOptions:v})}}e.DiffEditorOptions=D;function T(f,v){return{enableSplitViewResizing:(0,b.boolean)(f.enableSplitViewResizing,v.enableSplitViewResizing),splitViewDefaultRatio:(0,b.clampedFloat)(f.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,b.boolean)(f.renderSideBySide,v.renderSideBySide),renderMarginRevertIcon:(0,b.boolean)(f.renderMarginRevertIcon,v.renderMarginRevertIcon),maxComputationTime:(0,b.clampedInt)(f.maxComputationTime,v.maxComputationTime,0,1073741824),maxFileSize:(0,b.clampedInt)(f.maxFileSize,v.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,b.boolean)(f.ignoreTrimWhitespace,v.ignoreTrimWhitespace),renderIndicators:(0,b.boolean)(f.renderIndicators,v.renderIndicators),originalEditable:(0,b.boolean)(f.originalEditable,v.originalEditable),diffCodeLens:(0,b.boolean)(f.diffCodeLens,v.diffCodeLens),renderOverviewRuler:(0,b.boolean)(f.renderOverviewRuler,v.renderOverviewRuler),diffWordWrap:(0,b.stringSet)(f.diffWordWrap,v.diffWordWrap,["off","on","inherit"]),diffAlgorithm:(0,b.stringSet)(f.diffAlgorithm,v.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,b.boolean)(f.accessibilityVerbose,v.accessibilityVerbose),experimental:{showMoves:(0,b.boolean)(f.experimental?.showMoves,v.experimental.showMoves),showEmptyDecorations:(0,b.boolean)(f.experimental?.showEmptyDecorations,v.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:(0,b.boolean)(f.hideUnchangedRegions?.enabled??f.experimental?.collapseUnchangedRegions,v.hideUnchangedRegions.enabled),contextLineCount:(0,b.clampedInt)(f.hideUnchangedRegions?.contextLineCount,v.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:(0,b.clampedInt)(f.hideUnchangedRegions?.minimumLineCount,v.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:(0,b.clampedInt)(f.hideUnchangedRegions?.revealLineCount,v.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:(0,b.boolean)(f.isInEmbeddedEditor,v.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:(0,b.boolean)(f.onlyShowAccessibleDiffViewer,v.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:(0,b.clampedInt)(f.renderSideBySideInlineBreakpoint,v.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:(0,b.boolean)(f.useInlineViewWhenSpaceIsLimited,v.useInlineViewWhenSpaceIsLimited),reverse:(0,b.boolean)(f.reverse,v.reverse)}}}),define(Q[345],Y([1,0,18,133,659]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontInfo=e.SERIALIZED_FONT_INFO_VERSION=e.BareFontInfo=void 0;const D=t.isMacintosh?1.5:1.35,T=8;class f{static createFromValidatedSettings(S,h,a){const r=S.get(48),i=S.get(52),s=S.get(51),o=S.get(50),u=S.get(53),d=S.get(65),p=S.get(62);return f._create(r,i,s,o,u,d,p,h,a)}static createFromRawSettings(S,h,a=!1){const r=y.EditorOptions.fontFamily.validate(S.fontFamily),i=y.EditorOptions.fontWeight.validate(S.fontWeight),s=y.EditorOptions.fontSize.validate(S.fontSize),o=y.EditorOptions.fontLigatures2.validate(S.fontLigatures),u=y.EditorOptions.fontVariations.validate(S.fontVariations),d=y.EditorOptions.lineHeight.validate(S.lineHeight),p=y.EditorOptions.letterSpacing.validate(S.letterSpacing);return f._create(r,i,s,o,u,d,p,h,a)}static _create(S,h,a,r,i,s,o,u,d){s===0?s=D*a:s<T&&(s=s*a),s=Math.round(s),s<T&&(s=T);const p=1+(d?0:b.EditorZoom.getZoomLevel()*.1);return a*=p,s*=p,i===y.EditorFontVariations.TRANSLATE&&(h==="normal"||h==="bold"?i=y.EditorFontVariations.OFF:(i=`'wght' ${parseInt(h,10)}`,h="normal")),new f({pixelRatio:u,fontFamily:S,fontWeight:h,fontSize:a,fontFeatureSettings:r,fontVariationSettings:i,lineHeight:s,letterSpacing:o})}constructor(S){this._bareFontInfoBrand=void 0,this.pixelRatio=S.pixelRatio,this.fontFamily=String(S.fontFamily),this.fontWeight=String(S.fontWeight),this.fontSize=S.fontSize,this.fontFeatureSettings=S.fontFeatureSettings,this.fontVariationSettings=S.fontVariationSettings,this.lineHeight=S.lineHeight|0,this.letterSpacing=S.letterSpacing}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){const S=y.EDITOR_FONT_DEFAULTS.fontFamily,h=f._wrapInQuotes(this.fontFamily);return S&&this.fontFamily!==S?`${h}, ${S}`:h}static _wrapInQuotes(S){return/[,"']/.test(S)?S:/[+ ]/.test(S)?`"${S}"`:S}}e.BareFontInfo=f,e.SERIALIZED_FONT_INFO_VERSION=2;class v extends f{constructor(S,h){super(S),this._editorStylingBrand=void 0,this.version=e.SERIALIZED_FONT_INFO_VERSION,this.isTrusted=h,this.isMonospace=S.isMonospace,this.typicalHalfwidthCharacterWidth=S.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=S.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=S.canUseHalfwidthRightwardsArrow,this.spaceWidth=S.spaceWidth,this.middotWidth=S.middotWidth,this.wsmiddotWidth=S.wsmiddotWidth,this.maxDigitWidth=S.maxDigitWidth}equals(S){return this.fontFamily===S.fontFamily&&this.fontWeight===S.fontWeight&&this.fontSize===S.fontSize&&this.fontFeatureSettings===S.fontFeatureSettings&&this.fontVariationSettings===S.fontVariationSettings&&this.lineHeight===S.lineHeight&&this.letterSpacing===S.letterSpacing&&this.typicalHalfwidthCharacterWidth===S.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===S.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===S.canUseHalfwidthRightwardsArrow&&this.spaceWidth===S.spaceWidth&&this.middotWidth===S.middotWidth&&this.wsmiddotWidth===S.wsmiddotWidth&&this.maxDigitWidth===S.maxDigitWidth}}e.FontInfo=v}),define(Q[499],Y([1,0,97,6,4,1850,133,345]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontMeasurements=e.FontMeasurementsImpl=void 0;class v extends b.Disposable{constructor(){super(),this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this._cache=new m,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new m,this._onDidChange.fire()}_writeToCache(h,a){this._cache.put(h,a),!a.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=window.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const h=this._cache.getValues();let a=!1;for(const r of h)r.isTrusted||(a=!0,this._cache.remove(r));a&&this._onDidChange.fire()}serializeFontInfo(){return this._cache.getValues().filter(h=>h.isTrusted)}restoreFontInfo(h){for(const a of h){if(a.version!==f.SERIALIZED_FONT_INFO_VERSION)continue;const r=new f.FontInfo(a,!1);this._writeToCache(r,r)}}readFontInfo(h){if(!this._cache.has(h)){let a=this._actualReadFontInfo(h);(a.typicalHalfwidthCharacterWidth<=2||a.typicalFullwidthCharacterWidth<=2||a.spaceWidth<=2||a.maxDigitWidth<=2)&&(a=new f.FontInfo({pixelRatio:t.PixelRatio.value,fontFamily:a.fontFamily,fontWeight:a.fontWeight,fontSize:a.fontSize,fontFeatureSettings:a.fontFeatureSettings,fontVariationSettings:a.fontVariationSettings,lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,isMonospace:a.isMonospace,typicalHalfwidthCharacterWidth:Math.max(a.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(a.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:a.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(a.spaceWidth,5),middotWidth:Math.max(a.middotWidth,5),wsmiddotWidth:Math.max(a.wsmiddotWidth,5),maxDigitWidth:Math.max(a.maxDigitWidth,5)},!1)),this._writeToCache(h,a)}return this._cache.get(h)}_createRequest(h,a,r,i){const s=new D.CharWidthRequest(h,a);return r.push(s),i?.push(s),s}_actualReadFontInfo(h){const a=[],r=[],i=this._createRequest("n",0,a,r),s=this._createRequest("\uFF4D",0,a,null),o=this._createRequest(" ",0,a,r),u=this._createRequest("0",0,a,r),d=this._createRequest("1",0,a,r),p=this._createRequest("2",0,a,r),c=this._createRequest("3",0,a,r),l=this._createRequest("4",0,a,r),n=this._createRequest("5",0,a,r),g=this._createRequest("6",0,a,r),w=this._createRequest("7",0,a,r),E=this._createRequest("8",0,a,r),C=this._createRequest("9",0,a,r),I=this._createRequest("\u2192",0,a,r),_=this._createRequest("\uFFEB",0,a,null),A=this._createRequest("\xB7",0,a,r),k=this._createRequest(String.fromCharCode(11825),0,a,null),L="|/-_ilm%";for(let x=0,F=L.length;x<F;x++)this._createRequest(L.charAt(x),0,a,r),this._createRequest(L.charAt(x),1,a,r),this._createRequest(L.charAt(x),2,a,r);(0,D.readCharWidths)(h,a);const R=Math.max(u.width,d.width,p.width,c.width,l.width,n.width,g.width,w.width,E.width,C.width);let M=h.fontFeatureSettings===T.EditorFontLigatures.OFF;const N=r[0].width;for(let x=1,F=r.length;M&&x<F;x++){const V=N-r[x].width;if(V<-.001||V>.001){M=!1;break}}let P=!0;return M&&_.width!==N&&(P=!1),_.width>I.width&&(P=!1),new f.FontInfo({pixelRatio:t.PixelRatio.value,fontFamily:h.fontFamily,fontWeight:h.fontWeight,fontSize:h.fontSize,fontFeatureSettings:h.fontFeatureSettings,fontVariationSettings:h.fontVariationSettings,lineHeight:h.lineHeight,letterSpacing:h.letterSpacing,isMonospace:M,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:P,spaceWidth:o.width,middotWidth:A.width,wsmiddotWidth:k.width,maxDigitWidth:R},!0)}}e.FontMeasurementsImpl=v;class m{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(h){const a=h.getId();return!!this._values[a]}get(h){const a=h.getId();return this._values[a]}put(h,a){const r=h.getId();this._keys[r]=h,this._values[r]=a}remove(h){const a=h.getId();delete this._keys[a],delete this._values[a]}getValues(){return Object.keys(this._keys).map(h=>this._values[h])}}e.FontMeasurements=new v}),define(Q[1133],Y([1,0,51,27,303,133]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isModelDecorationInString=e.isModelDecorationInComment=e.isModelDecorationVisible=e.ViewModelDecorations=void 0;class T{constructor(a,r,i,s,o){this.editorId=a,this.model=r,this.configuration=i,this._linesCollection=s,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(a){const r=a.id;let i=this._decorationsCache[r];if(!i){const s=a.range,o=a.options;let u;if(o.isWholeLine){const d=this._coordinatesConverter.convertModelPositionToViewPosition(new t.Position(s.startLineNumber,1),0,!1,!0),p=this._coordinatesConverter.convertModelPositionToViewPosition(new t.Position(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber)),1);u=new y.Range(d.lineNumber,d.column,p.lineNumber,p.column)}else u=this._coordinatesConverter.convertModelRangeToViewRange(s,1);i=new b.ViewModelDecoration(u,o),this._decorationsCache[r]=i}return i}getMinimapDecorationsInRange(a){return this._getDecorationsInRange(a,!0,!1).decorations}getDecorationsViewportData(a){let r=this._cachedModelDecorationsResolver!==null;return r=r&&a.equalsRange(this._cachedModelDecorationsResolverViewRange),r||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(a,!1,!1),this._cachedModelDecorationsResolverViewRange=a),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(a,r=!1,i=!1){const s=new y.Range(a,this._linesCollection.getViewLineMinColumn(a),a,this._linesCollection.getViewLineMaxColumn(a));return this._getDecorationsInRange(s,r,i).inlineDecorations[0]}_getDecorationsInRange(a,r,i){const s=this._linesCollection.getDecorationsInRange(a,this.editorId,(0,D.filterValidationDecorations)(this.configuration.options),r,i),o=a.startLineNumber,u=a.endLineNumber,d=[];let p=0;const c=[];for(let l=o;l<=u;l++)c[l-o]=[];for(let l=0,n=s.length;l<n;l++){const g=s[l],w=g.options;if(!f(this.model,g))continue;const E=this._getOrCreateViewModelDecoration(g),C=E.range;if(d[p++]=E,w.inlineClassName){const I=new b.InlineDecoration(C,w.inlineClassName,w.inlineClassNameAffectsLetterSpacing?3:0),_=Math.max(o,C.startLineNumber),A=Math.min(u,C.endLineNumber);for(let k=_;k<=A;k++)c[k-o].push(I)}if(w.beforeContentClassName&&o<=C.startLineNumber&&C.startLineNumber<=u){const I=new b.InlineDecoration(new y.Range(C.startLineNumber,C.startColumn,C.startLineNumber,C.startColumn),w.beforeContentClassName,1);c[C.startLineNumber-o].push(I)}if(w.afterContentClassName&&o<=C.endLineNumber&&C.endLineNumber<=u){const I=new b.InlineDecoration(new y.Range(C.endLineNumber,C.endColumn,C.endLineNumber,C.endColumn),w.afterContentClassName,2);c[C.endLineNumber-o].push(I)}}return{decorations:d,inlineDecorations:c}}}e.ViewModelDecorations=T;function f(h,a){return!(a.options.hideInCommentTokens&&v(h,a)||a.options.hideInStringTokens&&m(h,a))}e.isModelDecorationVisible=f;function v(h,a){return S(h,a.range,r=>r===1)}e.isModelDecorationInComment=v;function m(h,a){return S(h,a.range,r=>r===2)}e.isModelDecorationInString=m;function S(h,a,r){for(let i=a.startLineNumber;i<=a.endLineNumber;i++){const s=h.tokenization.getLineTokens(i),o=i===a.startLineNumber,u=i===a.endLineNumber;let d=o?s.findTokenIndexAtOffset(a.startColumn-1):0;for(;d<s.getCount()&&!(u&&s.getStartOffset(d)>a.endColumn-1);){if(!r(s.getStandardTokenType(d)))return!1;d++}}return!0}}),define(Q[2350],Y([2,3]),function(q,e){return q.create("vs/editor/common/core/editorColorRegistry",e)}),define(Q[2351],Y([2,3]),function(q,e){return q.create("vs/editor/common/editorContextKeys",e)}),define(Q[2352],Y([2,3]),function(q,e){return q.create("vs/editor/common/languages",e)}),define(Q[99],Y([1,0,32,10,165,27,1887,2352]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExternalUriOpenerPriority=e.TokenizationRegistry=e.LazyTokenizationSupport=e.InlayHintKind=e.CommentState=e.CommentMode=e.CommentThreadState=e.CommentThreadCollapsibleState=e.Command=e.FoldingRangeKind=e.TextEdit=e.SymbolKinds=e.SymbolTag=e.getAriaLabelForSymbol=e.symbolKindNames=e.SymbolKind=e.isLocationLink=e.DocumentHighlightKind=e.SignatureHelpTriggerKind=e.CodeActionTriggerType=e.SelectedSuggestionInfo=e.InlineCompletionTriggerKind=e.CompletionTriggerKind=e.CompletionItemInsertTextRule=e.CompletionItemTag=e.CompletionItemKinds=e.CompletionItemKind=e.EncodedTokenizationResult=e.TokenizationResult=e.Token=void 0;class v{constructor(F,V,W){this.offset=F,this.type=V,this.language=W,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}e.Token=v;class m{constructor(F,V){this.tokens=F,this.endState=V,this._tokenizationResultBrand=void 0}}e.TokenizationResult=m;class S{constructor(F,V){this.tokens=F,this.endState=V,this._encodedTokenizationResultBrand=void 0}}e.EncodedTokenizationResult=S;var h;(function(x){x[x.Method=0]="Method",x[x.Function=1]="Function",x[x.Constructor=2]="Constructor",x[x.Field=3]="Field",x[x.Variable=4]="Variable",x[x.Class=5]="Class",x[x.Struct=6]="Struct",x[x.Interface=7]="Interface",x[x.Module=8]="Module",x[x.Property=9]="Property",x[x.Event=10]="Event",x[x.Operator=11]="Operator",x[x.Unit=12]="Unit",x[x.Value=13]="Value",x[x.Constant=14]="Constant",x[x.Enum=15]="Enum",x[x.EnumMember=16]="EnumMember",x[x.Keyword=17]="Keyword",x[x.Text=18]="Text",x[x.Color=19]="Color",x[x.File=20]="File",x[x.Reference=21]="Reference",x[x.Customcolor=22]="Customcolor",x[x.Folder=23]="Folder",x[x.TypeParameter=24]="TypeParameter",x[x.User=25]="User",x[x.Issue=26]="Issue",x[x.Snippet=27]="Snippet"})(h||(e.CompletionItemKind=h={}));var a;(function(x){const F=new Map;F.set(0,t.Codicon.symbolMethod),F.set(1,t.Codicon.symbolFunction),F.set(2,t.Codicon.symbolConstructor),F.set(3,t.Codicon.symbolField),F.set(4,t.Codicon.symbolVariable),F.set(5,t.Codicon.symbolClass),F.set(6,t.Codicon.symbolStruct),F.set(7,t.Codicon.symbolInterface),F.set(8,t.Codicon.symbolModule),F.set(9,t.Codicon.symbolProperty),F.set(10,t.Codicon.symbolEvent),F.set(11,t.Codicon.symbolOperator),F.set(12,t.Codicon.symbolUnit),F.set(13,t.Codicon.symbolValue),F.set(15,t.Codicon.symbolEnum),F.set(14,t.Codicon.symbolConstant),F.set(15,t.Codicon.symbolEnum),F.set(16,t.Codicon.symbolEnumMember),F.set(17,t.Codicon.symbolKeyword),F.set(27,t.Codicon.symbolSnippet),F.set(18,t.Codicon.symbolText),F.set(19,t.Codicon.symbolColor),F.set(20,t.Codicon.symbolFile),F.set(21,t.Codicon.symbolReference),F.set(22,t.Codicon.symbolCustomColor),F.set(23,t.Codicon.symbolFolder),F.set(24,t.Codicon.symbolTypeParameter),F.set(25,t.Codicon.account),F.set(26,t.Codicon.issues);function V(B){let K=F.get(B);return K||(console.info("No codicon found for CompletionItemKind "+B),K=t.Codicon.symbolProperty),K}x.toIcon=V;const W=new Map;W.set("method",0),W.set("function",1),W.set("constructor",2),W.set("field",3),W.set("variable",4),W.set("class",5),W.set("struct",6),W.set("interface",7),W.set("module",8),W.set("property",9),W.set("event",10),W.set("operator",11),W.set("unit",12),W.set("value",13),W.set("constant",14),W.set("enum",15),W.set("enum-member",16),W.set("enumMember",16),W.set("keyword",17),W.set("snippet",27),W.set("text",18),W.set("color",19),W.set("file",20),W.set("reference",21),W.set("customcolor",22),W.set("folder",23),W.set("type-parameter",24),W.set("typeParameter",24),W.set("account",25),W.set("issue",26);function z(B,K){let H=W.get(B);return typeof H>"u"&&!K&&(H=9),H}x.fromString=z})(a||(e.CompletionItemKinds=a={}));var r;(function(x){x[x.Deprecated=1]="Deprecated"})(r||(e.CompletionItemTag=r={}));var i;(function(x){x[x.None=0]="None",x[x.KeepWhitespace=1]="KeepWhitespace",x[x.InsertAsSnippet=4]="InsertAsSnippet"})(i||(e.CompletionItemInsertTextRule=i={}));var s;(function(x){x[x.Invoke=0]="Invoke",x[x.TriggerCharacter=1]="TriggerCharacter",x[x.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(s||(e.CompletionTriggerKind=s={}));var o;(function(x){x[x.Automatic=0]="Automatic",x[x.Explicit=1]="Explicit"})(o||(e.InlineCompletionTriggerKind=o={}));class u{constructor(F,V,W,z){this.range=F,this.text=V,this.completionKind=W,this.isSnippetText=z}equals(F){return D.Range.lift(this.range).equalsRange(F.range)&&this.text===F.text&&this.completionKind===F.completionKind&&this.isSnippetText===F.isSnippetText}}e.SelectedSuggestionInfo=u;var d;(function(x){x[x.Invoke=1]="Invoke",x[x.Auto=2]="Auto"})(d||(e.CodeActionTriggerType=d={}));var p;(function(x){x[x.Invoke=1]="Invoke",x[x.TriggerCharacter=2]="TriggerCharacter",x[x.ContentChange=3]="ContentChange"})(p||(e.SignatureHelpTriggerKind=p={}));var c;(function(x){x[x.Text=0]="Text",x[x.Read=1]="Read",x[x.Write=2]="Write"})(c||(e.DocumentHighlightKind=c={}));function l(x){return x&&y.URI.isUri(x.uri)&&D.Range.isIRange(x.range)&&(D.Range.isIRange(x.originSelectionRange)||D.Range.isIRange(x.targetSelectionRange))}e.isLocationLink=l;var n;(function(x){x[x.File=0]="File",x[x.Module=1]="Module",x[x.Namespace=2]="Namespace",x[x.Package=3]="Package",x[x.Class=4]="Class",x[x.Method=5]="Method",x[x.Property=6]="Property",x[x.Field=7]="Field",x[x.Constructor=8]="Constructor",x[x.Enum=9]="Enum",x[x.Interface=10]="Interface",x[x.Function=11]="Function",x[x.Variable=12]="Variable",x[x.Constant=13]="Constant",x[x.String=14]="String",x[x.Number=15]="Number",x[x.Boolean=16]="Boolean",x[x.Array=17]="Array",x[x.Object=18]="Object",x[x.Key=19]="Key",x[x.Null=20]="Null",x[x.EnumMember=21]="EnumMember",x[x.Struct=22]="Struct",x[x.Event=23]="Event",x[x.Operator=24]="Operator",x[x.TypeParameter=25]="TypeParameter"})(n||(e.SymbolKind=n={})),e.symbolKindNames={[17]:(0,f.localize)(0,null),[16]:(0,f.localize)(1,null),[4]:(0,f.localize)(2,null),[13]:(0,f.localize)(3,null),[8]:(0,f.localize)(4,null),[9]:(0,f.localize)(5,null),[21]:(0,f.localize)(6,null),[23]:(0,f.localize)(7,null),[7]:(0,f.localize)(8,null),[0]:(0,f.localize)(9,null),[11]:(0,f.localize)(10,null),[10]:(0,f.localize)(11,null),[19]:(0,f.localize)(12,null),[5]:(0,f.localize)(13,null),[1]:(0,f.localize)(14,null),[2]:(0,f.localize)(15,null),[20]:(0,f.localize)(16,null),[15]:(0,f.localize)(17,null),[18]:(0,f.localize)(18,null),[24]:(0,f.localize)(19,null),[3]:(0,f.localize)(20,null),[6]:(0,f.localize)(21,null),[14]:(0,f.localize)(22,null),[22]:(0,f.localize)(23,null),[25]:(0,f.localize)(24,null),[12]:(0,f.localize)(25,null)};function g(x,F){return(0,f.localize)(26,null,x,e.symbolKindNames[F])}e.getAriaLabelForSymbol=g;var w;(function(x){x[x.Deprecated=1]="Deprecated"})(w||(e.SymbolTag=w={}));var E;(function(x){const F=new Map;F.set(0,t.Codicon.symbolFile),F.set(1,t.Codicon.symbolModule),F.set(2,t.Codicon.symbolNamespace),F.set(3,t.Codicon.symbolPackage),F.set(4,t.Codicon.symbolClass),F.set(5,t.Codicon.symbolMethod),F.set(6,t.Codicon.symbolProperty),F.set(7,t.Codicon.symbolField),F.set(8,t.Codicon.symbolConstructor),F.set(9,t.Codicon.symbolEnum),F.set(10,t.Codicon.symbolInterface),F.set(11,t.Codicon.symbolFunction),F.set(12,t.Codicon.symbolVariable),F.set(13,t.Codicon.symbolConstant),F.set(14,t.Codicon.symbolString),F.set(15,t.Codicon.symbolNumber),F.set(16,t.Codicon.symbolBoolean),F.set(17,t.Codicon.symbolArray),F.set(18,t.Codicon.symbolObject),F.set(19,t.Codicon.symbolKey),F.set(20,t.Codicon.symbolNull),F.set(21,t.Codicon.symbolEnumMember),F.set(22,t.Codicon.symbolStruct),F.set(23,t.Codicon.symbolEvent),F.set(24,t.Codicon.symbolOperator),F.set(25,t.Codicon.symbolTypeParameter);function V(W){let z=F.get(W);return z||(console.info("No codicon found for SymbolKind "+W),z=t.Codicon.symbolProperty),z}x.toIcon=V})(E||(e.SymbolKinds=E={}));class C{static asEditOperation(F){return b.EditOperation.replace(D.Range.lift(F.range),F.text)}}e.TextEdit=C;class I{static{this.Comment=new I("comment")}static{this.Imports=new I("imports")}static{this.Region=new I("region")}static fromValue(F){switch(F){case"comment":return I.Comment;case"imports":return I.Imports;case"region":return I.Region}return new I(F)}constructor(F){this.value=F}}e.FoldingRangeKind=I;var _;(function(x){function F(V){return!V||typeof V!="object"?!1:typeof V.id=="string"&&typeof V.title=="string"}x.is=F})(_||(e.Command=_={}));var A;(function(x){x[x.Collapsed=0]="Collapsed",x[x.Expanded=1]="Expanded"})(A||(e.CommentThreadCollapsibleState=A={}));var k;(function(x){x[x.Unresolved=0]="Unresolved",x[x.Resolved=1]="Resolved"})(k||(e.CommentThreadState=k={}));var L;(function(x){x[x.Editing=0]="Editing",x[x.Preview=1]="Preview"})(L||(e.CommentMode=L={}));var R;(function(x){x[x.Published=0]="Published",x[x.Draft=1]="Draft"})(R||(e.CommentState=R={}));var M;(function(x){x[x.Type=1]="Type",x[x.Parameter=2]="Parameter"})(M||(e.InlayHintKind=M={}));class N{constructor(F){this.createSupport=F,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(F=>{F&&F.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}e.LazyTokenizationSupport=N,e.TokenizationRegistry=new T.TokenizationRegistry;var P;(function(x){x[x.None=0]="None",x[x.Option=1]="Option",x[x.Default=2]="Default",x[x.Preferred=3]="Preferred"})(P||(e.ExternalUriOpenerPriority=P={}))}),define(Q[843],Y([1,0,99]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nullTokenizeEncoded=e.nullTokenize=e.NullState=void 0,e.NullState=new class{clone(){return this}equals(D){return this===D}};function y(D,T){return new t.TokenizationResult([new t.Token(0,"",D)],T)}e.nullTokenize=y;function b(D,T){const f=new Uint32Array(2);return f[0]=0,f[1]=(D<<0|0<<8|0<<11|1<<15|2<<24)>>>0,new t.EncodedTokenizationResult(f,T===null?e.NullState:T)}e.nullTokenizeEncoded=b}),define(Q[449],Y([1,0,33,368,99,843]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._tokenizeToString=e.tokenizeLineToHTML=e.tokenizeToString=e.tokenizeToStringSync=void 0;const T={getInitialState:()=>D.NullState,tokenizeEncoded:(h,a,r)=>(0,D.nullTokenizeEncoded)(0,r)};function f(h,a,r){return S(a,h.languageIdCodec,b.TokenizationRegistry.get(r)||T)}e.tokenizeToStringSync=f;async function v(h,a,r){if(!r)return S(a,h.languageIdCodec,T);const i=await b.TokenizationRegistry.getOrCreate(r);return S(a,h.languageIdCodec,i||T)}e.tokenizeToString=v;function m(h,a,r,i,s,o,u){let d="<div>",p=i,c=0,l=!0;for(let n=0,g=a.getCount();n<g;n++){const w=a.getEndOffset(n);if(w<=i)continue;let E="";for(;p<w&&p<s;p++){const C=h.charCodeAt(p);switch(C){case 9:{let I=o-(p+c)%o;for(c+=I-1;I>0;)u&&l?(E+=" ",l=!1):(E+=" ",l=!0),I--;break}case 60:E+="<",l=!1;break;case 62:E+=">",l=!1;break;case 38:E+="&",l=!1;break;case 0:E+="�",l=!1;break;case 65279:case 8232:case 8233:case 133:E+="\uFFFD",l=!1;break;case 13:E+="​",l=!1;break;case 32:u&&l?(E+=" ",l=!1):(E+=" ",l=!0);break;default:E+=String.fromCharCode(C),l=!1}}if(d+=`<span style="${a.getInlineStyle(n,r)}">${E}</span>`,w>s||p>=s)break}return d+="</div>",d}e.tokenizeLineToHTML=m;function S(h,a,r){let i='<div class="monaco-tokenized-source">';const s=t.splitLines(h);let o=r.getInitialState();for(let u=0,d=s.length;u<d;u++){const p=s[u];u>0&&(i+="<br/>");const c=r.tokenizeEncoded(p,!0,o);y.LineTokens.convertToEndOffset(c.tokens,p.length);const n=new y.LineTokens(c.tokens,p,a).inflate();let g=0;for(let w=0,E=n.getCount();w<E;w++){const C=n.getClassName(w),I=n.getEndOffset(w);i+=`<span class="${C}">${t.escape(p.substring(g,I))}</span>`,g=I}o=c.endState}return i+="</div>",i}e._tokenizeToString=S}),define(Q[1134],Y([1,0,14,15,18,145,392,238,366,843,1880,803,368]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultBackgroundTokenizer=e.RangePriorityQueueImpl=e.TokenizationStateStore=e.TrackingTokenizationStateStore=e.TokenizerWithStateStoreAndTextModel=e.TokenizerWithStateStore=void 0;var r;(function(l){l[l.CHEAP_TOKENIZATION_LENGTH_LIMIT=2048]="CHEAP_TOKENIZATION_LENGTH_LIMIT"})(r||(r={}));class i{constructor(n,g){this.tokenizationSupport=g,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new o(n)}getStartState(n){return this.store.getStartState(n,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}e.TokenizerWithStateStore=i;class s extends i{constructor(n,g,w,E){super(n,g),this._textModel=w,this._languageIdCodec=E}updateTokensUntilLine(n,g){const w=this._textModel.getLanguageId();for(;;){const E=this.getFirstInvalidLine();if(!E||E.lineNumber>g)break;const C=this._textModel.getLineContent(E.lineNumber),I=p(this._languageIdCodec,w,this.tokenizationSupport,C,!0,E.startState);n.add(E.lineNumber,I.tokens),this.store.setEndState(E.lineNumber,I.endState)}}getTokenTypeIfInsertingCharacter(n,g){const w=this.getStartState(n.lineNumber);if(!w)return 0;const E=this._textModel.getLanguageId(),C=this._textModel.getLineContent(n.lineNumber),I=C.substring(0,n.column-1)+g+C.substring(n.column-1),_=p(this._languageIdCodec,E,this.tokenizationSupport,I,!0,w),A=new a.LineTokens(_.tokens,I,this._languageIdCodec);if(A.getCount()===0)return 0;const k=A.findTokenIndexAtOffset(n.column-1);return A.getStandardTokenType(k)}tokenizeLineWithEdit(n,g,w){const E=n.lineNumber,C=n.column,I=this.getStartState(E);if(!I)return null;const _=this._textModel.getLineContent(E),A=_.substring(0,C-1)+w+_.substring(C-1+g),k=this._textModel.getLanguageIdAtPosition(E,0),L=p(this._languageIdCodec,k,this.tokenizationSupport,A,!0,I);return new a.LineTokens(L.tokens,A,this._languageIdCodec)}isCheapToTokenize(n){const g=this.store.getFirstInvalidEndStateLineNumberOrMax();return n<g||n===g&&this._textModel.getLineLength(n)<2048}tokenizeHeuristically(n,g,w){if(w<=this.store.getFirstInvalidEndStateLineNumberOrMax())return{heuristicTokens:!1};if(g<=this.store.getFirstInvalidEndStateLineNumberOrMax())return this.updateTokensUntilLine(n,w),{heuristicTokens:!1};let E=this.guessStartState(g);const C=this._textModel.getLanguageId();for(let I=g;I<=w;I++){const _=this._textModel.getLineContent(I),A=p(this._languageIdCodec,C,this.tokenizationSupport,_,!0,E);n.add(I,A.tokens),E=A.endState}return{heuristicTokens:!0}}guessStartState(n){let g=this._textModel.getLineFirstNonWhitespaceColumn(n);const w=[];let E=null;for(let _=n-1;g>1&&_>=1;_--){const A=this._textModel.getLineFirstNonWhitespaceColumn(_);if(A!==0&&A<g&&(w.push(this._textModel.getLineContent(_)),g=A,E=this.getStartState(_),E))break}E||(E=this.tokenizationSupport.getInitialState()),w.reverse();const C=this._textModel.getLanguageId();let I=E;for(const _ of w)I=p(this._languageIdCodec,C,this.tokenizationSupport,_,!1,I).endState;return I}}e.TokenizerWithStateStoreAndTextModel=s;class o{constructor(n){this.lineCount=n,this._tokenizationStateStore=new u,this._invalidEndStatesLineNumbers=new d,this._invalidEndStatesLineNumbers.addRange(new v.OffsetRange(1,n+1))}getEndState(n){return this._tokenizationStateStore.getEndState(n)}setEndState(n,g){if(!g)throw new y.BugIndicatingError("Cannot set null/undefined state");this._invalidEndStatesLineNumbers.delete(n);const w=this._tokenizationStateStore.setEndState(n,g);return w&&n<this.lineCount&&this._invalidEndStatesLineNumbers.addRange(new v.OffsetRange(n+1,n+2)),w}acceptChange(n,g){this.lineCount+=g-n.length,this._tokenizationStateStore.acceptChange(n,g),this._invalidEndStatesLineNumbers.addRangeAndResize(new v.OffsetRange(n.startLineNumber,n.endLineNumberExclusive),g)}acceptChanges(n){for(const g of n){const[w]=(0,T.countEOL)(g.text);this.acceptChange(new f.LineRange(g.range.startLineNumber,g.range.endLineNumber+1),w+1)}}invalidateEndStateRange(n){this._invalidEndStatesLineNumbers.addRange(new v.OffsetRange(n.startLineNumber,n.endLineNumberExclusive))}getFirstInvalidEndStateLineNumber(){return this._invalidEndStatesLineNumbers.min}getFirstInvalidEndStateLineNumberOrMax(){return this.getFirstInvalidEndStateLineNumber()||Number.MAX_SAFE_INTEGER}allStatesValid(){return this._invalidEndStatesLineNumbers.min===null}getStartState(n,g){return n===1?g:this.getEndState(n-1)}getFirstInvalidLine(n){const g=this.getFirstInvalidEndStateLineNumber();if(g===null)return null;const w=this.getStartState(g,n);if(!w)throw new y.BugIndicatingError("Start state must be defined");return{lineNumber:g,startState:w}}}e.TrackingTokenizationStateStore=o;class u{constructor(){this._lineEndStates=new S.FixedArray(null)}getEndState(n){return this._lineEndStates.get(n)}setEndState(n,g){const w=this._lineEndStates.get(n);return w&&w.equals(g)?!1:(this._lineEndStates.set(n,g),!0)}acceptChange(n,g){let w=n.length;g>0&&w>0&&(w--,g--),this._lineEndStates.replace(n.startLineNumber,w,g)}acceptChanges(n){for(const g of n){const[w]=(0,T.countEOL)(g.text);this.acceptChange(new f.LineRange(g.range.startLineNumber,g.range.endLineNumber+1),w+1)}}}e.TokenizationStateStore=u;class d{constructor(){this._ranges=[]}getRanges(){return this._ranges}get min(){return this._ranges.length===0?null:this._ranges[0].start}removeMin(){if(this._ranges.length===0)return null;const n=this._ranges[0];return n.start+1===n.endExclusive?this._ranges.shift():this._ranges[0]=new v.OffsetRange(n.start+1,n.endExclusive),n.start}delete(n){const g=this._ranges.findIndex(w=>w.contains(n));if(g!==-1){const w=this._ranges[g];w.start===n?w.endExclusive===n+1?this._ranges.splice(g,1):this._ranges[g]=new v.OffsetRange(n+1,w.endExclusive):w.endExclusive===n+1?this._ranges[g]=new v.OffsetRange(w.start,n):this._ranges.splice(g,1,new v.OffsetRange(w.start,n),new v.OffsetRange(n+1,w.endExclusive))}}addRange(n){v.OffsetRange.addRange(n,this._ranges)}addRangeAndResize(n,g){let w=0;for(;!(w>=this._ranges.length||n.start<=this._ranges[w].endExclusive);)w++;let E=w;for(;!(E>=this._ranges.length||n.endExclusive<this._ranges[E].start);)E++;const C=g-n.length;for(let I=E;I<this._ranges.length;I++)this._ranges[I]=this._ranges[I].delta(C);if(w===E){const I=new v.OffsetRange(n.start,n.start+g);I.isEmpty||this._ranges.splice(w,0,I)}else{const I=Math.min(n.start,this._ranges[w].start),_=Math.max(n.endExclusive,this._ranges[E-1].endExclusive),A=new v.OffsetRange(I,_+C);A.isEmpty?this._ranges.splice(w,E-w):this._ranges.splice(w,E-w,A)}}toString(){return this._ranges.map(n=>n.toString()).join(" + ")}}e.RangePriorityQueueImpl=d;function p(l,n,g,w,E,C){let I=null;if(g)try{I=g.tokenizeEncoded(w,E,C.clone())}catch(_){(0,y.onUnexpectedError)(_)}return I||(I=(0,m.nullTokenizeEncoded)(l.encodeLanguageId(n),C)),a.LineTokens.convertToEndOffset(I.tokens,w.length),I}class c{constructor(n,g){this._tokenizerWithStateStore=n,this._backgroundTokenStore=g,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,(0,t.runWhenIdle)(n=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(n)}))}_backgroundTokenizeWithDeadline(n){const g=Date.now()+n.timeRemaining(),w=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()<g?(0,b.setTimeout0)(w):this._beginBackgroundTokenization())};w()}_backgroundTokenizeForAtLeast1ms(){const n=this._tokenizerWithStateStore._textModel.getLineCount(),g=new h.ContiguousMultilineTokensBuilder,w=D.StopWatch.create(!1);do if(w.elapsed()>1||this._tokenizeOneInvalidLine(g)>=n)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(g.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(n){const g=this._tokenizerWithStateStore?.getFirstInvalidLine();return g?(this._tokenizerWithStateStore.updateTokensUntilLine(n,g.lineNumber),g.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(n,g){this._tokenizerWithStateStore.store.invalidateEndStateRange(new f.LineRange(n,g))}}e.DefaultBackgroundTokenizer=c}),define(Q[2353],Y([1,0,20,14,15,6,4,392,238,51,367,99,1078,1134,803,1889,1891]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationTextModelPart=void 0;class u extends a.TextModelPart{constructor(l,n,g,w,E,C){super(),this._languageService=l,this._languageConfigurationService=n,this._textModel=g,this._bracketPairsTextModelPart=w,this._languageId=E,this._attachedViews=C,this._semanticTokens=new o.SparseTokensStore(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new D.Emitter),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new D.Emitter),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new D.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new d(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),this._register(this._languageConfigurationService.onDidChange(I=>{I.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(this.grammarTokens.onDidChangeTokens(I=>{this._emitModelTokensChangedEvent(I)})),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState(I=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))}_hasListeners(){return this._onDidChangeLanguage.hasListeners()||this._onDidChangeLanguageConfiguration.hasListeners()||this._onDidChangeTokens.hasListeners()}handleDidChangeContent(l){if(l.isFlush)this._semanticTokens.flush();else if(!l.isEolChange)for(const n of l.changes){const[g,w,E]=(0,f.countEOL)(n.text);this._semanticTokens.acceptEdit(n.range,g,w,E,n.text.length>0?n.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(l)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(l){this.validateLineNumber(l);const n=this.grammarTokens.getLineTokens(l);return this._semanticTokens.addSparseTokens(l,n)}_emitModelTokensChangedEvent(l){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(l),this._onDidChangeTokens.fire(l))}validateLineNumber(l){if(l<1||l>this._textModel.getLineCount())throw new b.BugIndicatingError("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(l){this.validateLineNumber(l),this.grammarTokens.forceTokenization(l)}isCheapToTokenize(l){return this.validateLineNumber(l),this.grammarTokens.isCheapToTokenize(l)}tokenizeIfCheap(l){this.validateLineNumber(l),this.grammarTokens.tokenizeIfCheap(l)}getTokenTypeIfInsertingCharacter(l,n,g){return this.grammarTokens.getTokenTypeIfInsertingCharacter(l,n,g)}tokenizeLineWithEdit(l,n,g){return this.grammarTokens.tokenizeLineWithEdit(l,n,g)}setSemanticTokens(l,n){this._semanticTokens.set(l,n),this._emitModelTokensChangedEvent({semanticTokensApplied:l!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(l,n){if(this.hasCompleteSemanticTokens())return;const g=this._textModel.validateRange(this._semanticTokens.setPartial(l,n));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:g.startLineNumber,toLineNumber:g.endLineNumber}]})}getWordAtPosition(l){this.assertNotDisposed();const n=this._textModel.validatePosition(l),g=this._textModel.getLineContent(n.lineNumber),w=this.getLineTokens(n.lineNumber),E=w.findTokenIndexAtOffset(n.column-1),[C,I]=u._findLanguageBoundaries(w,E),_=(0,S.getWordAtText)(n.column,this.getLanguageConfiguration(w.getLanguageId(E)).getWordDefinition(),g.substring(C,I),C);if(_&&_.startColumn<=l.column&&l.column<=_.endColumn)return _;if(E>0&&C===n.column-1){const[A,k]=u._findLanguageBoundaries(w,E-1),L=(0,S.getWordAtText)(n.column,this.getLanguageConfiguration(w.getLanguageId(E-1)).getWordDefinition(),g.substring(A,k),A);if(L&&L.startColumn<=l.column&&l.column<=L.endColumn)return L}return null}getLanguageConfiguration(l){return this._languageConfigurationService.getLanguageConfiguration(l)}static _findLanguageBoundaries(l,n){const g=l.getLanguageId(n);let w=0;for(let C=n;C>=0&&l.getLanguageId(C)===g;C--)w=l.getStartOffset(C);let E=l.getLineContent().length;for(let C=n,I=l.getCount();C<I&&l.getLanguageId(C)===g;C++)E=l.getEndOffset(C);return[w,E]}getWordUntilPosition(l){const n=this.getWordAtPosition(l);return n?{word:n.word.substr(0,l.column-n.startColumn),startColumn:n.startColumn,endColumn:l.column}:{word:"",startColumn:l.column,endColumn:l.column}}getLanguageId(){return this._languageId}getLanguageIdAtPosition(l,n){const g=this._textModel.validatePosition(new m.Position(l,n)),w=this.getLineTokens(g.lineNumber);return w.getLanguageId(w.findTokenIndexAtOffset(g.column-1))}setLanguageId(l,n="api"){if(this._languageId===l)return;const g={oldLanguage:this._languageId,newLanguage:l,source:n};this._languageId=l,this._bracketPairsTextModelPart.handleDidChangeLanguage(g),this.grammarTokens.resetTokenization(),this._onDidChangeLanguage.fire(g),this._onDidChangeLanguageConfiguration.fire({})}}e.TokenizationTextModelPart=u;class d extends T.Disposable{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(l,n,g,w){super(),this._languageIdCodec=l,this._textModel=n,this.getLanguageId=g,this._tokenizer=null,this._defaultBackgroundTokenizer=null,this._backgroundTokenizer=this._register(new T.MutableDisposable),this._tokens=new s.ContiguousTokensStore(this._languageIdCodec),this._debugBackgroundTokenizer=this._register(new T.MutableDisposable),this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new D.Emitter),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new D.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this._attachedViewStates=this._register(new T.DisposableMap),this._register(h.TokenizationRegistry.onDidChange(E=>{const C=this.getLanguageId();E.changedLanguages.indexOf(C)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(w.onDidChangeVisibleRanges(({view:E,state:C})=>{if(C){let I=this._attachedViewStates.get(E);I||(I=new p(()=>this.refreshRanges(I.lineRanges)),this._attachedViewStates.set(E,I)),I.handleStateChange(C)}else this._attachedViewStates.deleteAndDispose(E)}))}resetTokenization(l=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new r.TrackingTokenizationStateStore(this._textModel.getLineCount())),l&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const n=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const E=h.TokenizationRegistry.get(this.getLanguageId());if(!E)return[null,null];let C;try{C=E.getInitialState()}catch(I){return(0,b.onUnexpectedError)(I),[null,null]}return[E,C]},[g,w]=n();if(g&&w?this._tokenizer=new r.TokenizerWithStateStoreAndTextModel(this._textModel.getLineCount(),g,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const E={setTokens:C=>{this.setTokens(C)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;const C=2;this._backgroundTokenizationState=C,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(C,I)=>{if(!this._tokenizer)return;const _=this._tokenizer.store.getFirstInvalidEndStateLineNumber();_!==null&&C>=_&&this._tokenizer?.store.setEndState(C,I)}};g&&g.createBackgroundTokenizer&&!g.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=g.createBackgroundTokenizer(this._textModel,E)),this._backgroundTokenizer.value||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new r.DefaultBackgroundTokenizer(this._tokenizer,E),this._defaultBackgroundTokenizer.handleChanges()),g?.backgroundTokenizerShouldOnlyVerifyTokens&&g.createBackgroundTokenizer?(this._debugBackgroundTokens=new s.ContiguousTokensStore(this._languageIdCodec),this._debugBackgroundStates=new r.TrackingTokenizationStateStore(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=g.createBackgroundTokenizer(this._textModel,{setTokens:C=>{this._debugBackgroundTokens?.setMultilineTokens(C,this._textModel)},backgroundTokenizationFinished(){},setEndState:(C,I)=>{this._debugBackgroundStates?.setEndState(C,I)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(l){if(l.isFlush)this.resetTokenization(!1);else if(!l.isEolChange){for(const n of l.changes){const[g,w]=(0,f.countEOL)(n.text);this._tokens.acceptEdit(n.range,g,w),this._debugBackgroundTokens?.acceptEdit(n.range,g,w)}this._debugBackgroundStates?.acceptChanges(l.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(l.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(l){const{changes:n}=this._tokens.setMultilineTokens(l,this._textModel);return n.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:n}),{changes:n}}refreshAllVisibleLineTokens(){const l=v.LineRange.joinMany([...this._attachedViewStates].map(([n,g])=>g.lineRanges));this.refreshRanges(l)}refreshRanges(l){for(const n of l)this.refreshRange(n.startLineNumber,n.endLineNumberExclusive-1)}refreshRange(l,n){if(!this._tokenizer)return;l=Math.max(1,Math.min(this._textModel.getLineCount(),l)),n=Math.min(this._textModel.getLineCount(),n);const g=new i.ContiguousMultilineTokensBuilder,{heuristicTokens:w}=this._tokenizer.tokenizeHeuristically(g,l,n),E=this.setTokens(g.finalize());if(w)for(const C of E.changes)this._backgroundTokenizer.value?.requestTokens(C.fromLineNumber,C.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(l){const n=new i.ContiguousMultilineTokensBuilder;this._tokenizer?.updateTokensUntilLine(n,l),this.setTokens(n.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}isCheapToTokenize(l){return this._tokenizer?this._tokenizer.isCheapToTokenize(l):!0}tokenizeIfCheap(l){this.isCheapToTokenize(l)&&this.forceTokenization(l)}getLineTokens(l){const n=this._textModel.getLineContent(l),g=this._tokens.getTokens(this._textModel.getLanguageId(),l-1,n);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>l&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>l){const w=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),l-1,n);!g.equals(w)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(l)}return g}getTokenTypeIfInsertingCharacter(l,n,g){if(!this._tokenizer)return 0;const w=this._textModel.validatePosition(new m.Position(l,n));return this.forceTokenization(w.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(w,g)}tokenizeLineWithEdit(l,n,g){if(!this._tokenizer)return null;const w=this._textModel.validatePosition(l);return this.forceTokenization(w.lineNumber),this._tokenizer.tokenizeLineWithEdit(w,n,g)}get hasTokens(){return this._tokens.hasTokens}}class p extends T.Disposable{get lineRanges(){return this._lineRanges}constructor(l){super(),this._refreshTokens=l,this.runner=this._register(new y.RunOnceScheduler(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,t.equals)(this._computedLineRanges,this._lineRanges,(l,n)=>l.equals(n))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(l){this._lineRanges=l.visibleLineRanges,l.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}}),define(Q[2354],Y([1,0,31,6,105,10,51,27,96,99,1884]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoBaseAPI=e.KeyMod=void 0;class h{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(i,s){return(0,b.KeyChord)(i,s)}}e.KeyMod=h;function a(){return{editor:void 0,languages:void 0,CancellationTokenSource:t.CancellationTokenSource,Emitter:y.Emitter,KeyCode:S.KeyCode,KeyMod:h,Position:T.Position,Range:f.Range,Selection:v.Selection,SelectionDirection:S.SelectionDirection,MarkerSeverity:S.MarkerSeverity,MarkerTag:S.MarkerTag,Uri:D.URI,Token:m.Token}}e.createMonacoBaseAPI=a}),define(Q[2355],Y([1,0,482,10,51,27,1883,367,1074,1874,2354,145,1081,1073,1865,42,15,1868]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.EditorSimpleWorker=void 0;class d extends T.MirrorTextModel{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(n){const g=[];for(let w=0;w<this._lines.length;w++){const E=this._lines[w],C=this.offsetAt(new b.Position(w+1,1)),I=E.matchAll(n);for(const _ of I)(_.index||_.index===0)&&(_.index=_.index+C),g.push(_)}return g}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(n){return this._lines[n-1]}getWordAtPosition(n,g){const w=(0,f.getWordAtText)(n.column,(0,f.ensureValidWordDefinition)(g),this._lines[n.lineNumber-1],0);return w?new D.Range(n.lineNumber,w.startColumn,n.lineNumber,w.endColumn):null}getWordUntilPosition(n,g){const w=this.getWordAtPosition(n,g);return w?{word:this._lines[n.lineNumber-1].substring(w.startColumn-1,n.column-1),startColumn:w.startColumn,endColumn:n.column}:{word:"",startColumn:n.column,endColumn:n.column}}words(n){const g=this._lines,w=this._wordenize.bind(this);let E=0,C="",I=0,_=[];return{*[Symbol.iterator](){for(;;)if(I<_.length){const A=C.substring(_[I].start,_[I].end);I+=1,yield A}else if(E<g.length)C=g[E],_=w(C,n),I=0,E+=1;else break}}}getLineWords(n,g){const w=this._lines[n-1],E=this._wordenize(w,g),C=[];for(const I of E)C.push({word:w.substring(I.start,I.end),startColumn:I.start+1,endColumn:I.end+1});return C}_wordenize(n,g){const w=[];let E;for(g.lastIndex=0;(E=g.exec(n))&&E[0].length!==0;)w.push({start:E.index,end:E.index+E[0].length});return w}getValueInRange(n){if(n=this._validateRange(n),n.startLineNumber===n.endLineNumber)return this._lines[n.startLineNumber-1].substring(n.startColumn-1,n.endColumn-1);const g=this._eol,w=n.startLineNumber-1,E=n.endLineNumber-1,C=[];C.push(this._lines[w].substring(n.startColumn-1));for(let I=w+1;I<E;I++)C.push(this._lines[I]);return C.push(this._lines[E].substring(0,n.endColumn-1)),C.join(g)}offsetAt(n){return n=this._validatePosition(n),this._ensureLineStarts(),this._lineStarts.getPrefixSum(n.lineNumber-2)+(n.column-1)}positionAt(n){n=Math.floor(n),n=Math.max(0,n),this._ensureLineStarts();const g=this._lineStarts.getIndexOf(n),w=this._lines[g.index].length;return{lineNumber:1+g.index,column:1+Math.min(g.remainder,w)}}_validateRange(n){const g=this._validatePosition({lineNumber:n.startLineNumber,column:n.startColumn}),w=this._validatePosition({lineNumber:n.endLineNumber,column:n.endColumn});return g.lineNumber!==n.startLineNumber||g.column!==n.startColumn||w.lineNumber!==n.endLineNumber||w.column!==n.endColumn?{startLineNumber:g.lineNumber,startColumn:g.column,endLineNumber:w.lineNumber,endColumn:w.column}:n}_validatePosition(n){if(!b.Position.isIPosition(n))throw new Error("bad position");let{lineNumber:g,column:w}=n,E=!1;if(g<1)g=1,w=1,E=!0;else if(g>this._lines.length)g=this._lines.length,w=this._lines[g-1].length+1,E=!0;else{const C=this._lines[g-1].length+1;w<1?(w=1,E=!0):w>C&&(w=C,E=!0)}return E?{lineNumber:g,column:w}:n}}class p{constructor(n,g){this._host=n,this._models=Object.create(null),this._foreignModuleFactory=g,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(n){return this._models[n]}_getModels(){const n=[];return Object.keys(this._models).forEach(g=>n.push(this._models[g])),n}acceptNewModel(n){this._models[n.url]=new d(y.URI.parse(n.url),n.lines,n.EOL,n.versionId)}acceptModelChanged(n,g){if(!this._models[n])return;this._models[n].onEvents(g)}acceptRemovedModel(n){this._models[n]&&delete this._models[n]}async computeUnicodeHighlights(n,g,w){const E=this._getModel(n);return E?a.UnicodeTextModelHighlighter.computeUnicodeHighlights(E,g,w):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async computeDiff(n,g,w,E){const C=this._getModel(n),I=this._getModel(g);return!C||!I?null:p.computeDiff(C,I,w,E)}static computeDiff(n,g,w,E){const C=E==="advanced"?i.linesDiffComputers.getAdvanced():i.linesDiffComputers.getLegacy(),I=n.getLinesContent(),_=g.getLinesContent(),A=C.computeDiff(I,_,w),k=A.changes.length>0?!1:this._modelsAreIdentical(n,g);function L(R){return R.map(M=>[M.originalRange.startLineNumber,M.originalRange.endLineNumberExclusive,M.modifiedRange.startLineNumber,M.modifiedRange.endLineNumberExclusive,M.innerChanges?.map(N=>[N.originalRange.startLineNumber,N.originalRange.startColumn,N.originalRange.endLineNumber,N.originalRange.endColumn,N.modifiedRange.startLineNumber,N.modifiedRange.startColumn,N.modifiedRange.endLineNumber,N.modifiedRange.endColumn])])}return{identical:k,quitEarly:A.hitTimeout,changes:L(A.changes),moves:A.moves.map(R=>[R.lineRangeMapping.original.startLineNumber,R.lineRangeMapping.original.endLineNumberExclusive,R.lineRangeMapping.modified.startLineNumber,R.lineRangeMapping.modified.endLineNumberExclusive,L(R.changes)])}}static _modelsAreIdentical(n,g){const w=n.getLineCount(),E=g.getLineCount();if(w!==E)return!1;for(let C=1;C<=w;C++){const I=n.getLineContent(C),_=g.getLineContent(C);if(I!==_)return!1}return!0}async computeDirtyDiff(n,g,w){const E=this._getModel(n),C=this._getModel(g);if(!E||!C)return null;const I=E.getLinesContent(),_=C.getLinesContent();return new r.DiffComputer(I,_,{shouldComputeCharChanges:!1,shouldPostProcessCharChanges:!1,shouldIgnoreTrimWhitespace:w,shouldMakePrettyDiff:!0,maxComputationTime:1e3}).computeDiff().changes}static{this._diffLimit=1e5}async computeMoreMinimalEdits(n,g,w){const E=this._getModel(n);if(!E)return g;const C=[];let I;g=g.slice(0).sort((_,A)=>{if(_.range&&A.range)return D.Range.compareRangesUsingStarts(_.range,A.range);const k=_.range?0:1,L=A.range?0:1;return k-L});for(let{range:_,text:A,eol:k}of g){if(typeof k=="number"&&(I=k),D.Range.isEmpty(_)&&!A)continue;const L=E.getValueInRange(_);if(A=A.replace(/\r\n|\n|\r/g,E.eol),L===A)continue;if(Math.max(A.length,L.length)>p._diffLimit){C.push({range:_,text:A});continue}const R=(0,t.stringDiff)(L,A,w),M=E.offsetAt(D.Range.lift(_).getStartPosition());for(const N of R){const P=E.positionAt(M+N.originalStart),x=E.positionAt(M+N.originalStart+N.originalLength),F={text:A.substr(N.modifiedStart,N.modifiedLength),range:{startLineNumber:P.lineNumber,startColumn:P.column,endLineNumber:x.lineNumber,endColumn:x.column}};E.getValueInRange(F.range)!==F.text&&C.push(F)}}return typeof I=="number"&&C.push({eol:I,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),C}async computeHumanReadableDiff(n,g,w){const E=this._getModel(n);if(!E)return g;const C=[];let I;g=g.slice(0).sort((_,A)=>{if(_.range&&A.range)return D.Range.compareRangesUsingStarts(_.range,A.range);const k=_.range?0:1,L=A.range?0:1;return k-L});for(let{range:_,text:A,eol:k}of g){let x=function(V,W){return new b.Position(V.lineNumber+W.lineNumber-1,W.lineNumber===1?V.column+W.column-1:W.column)},F=function(V,W){const z=[];for(let B=W.startLineNumber;B<=W.endLineNumber;B++){const K=V[B-1];B===W.startLineNumber&&B===W.endLineNumber?z.push(K.substring(W.startColumn-1,W.endColumn-1)):B===W.startLineNumber?z.push(K.substring(W.startColumn-1)):B===W.endLineNumber?z.push(K.substring(0,W.endColumn-1)):z.push(K)}return z};if(typeof k=="number"&&(I=k),D.Range.isEmpty(_)&&!A)continue;const L=E.getValueInRange(_);if(A=A.replace(/\r\n|\n|\r/g,E.eol),L===A)continue;if(Math.max(A.length,L.length)>p._diffLimit){C.push({range:_,text:A});continue}const R=L.split(/\r\n|\n|\r/),M=A.split(/\r\n|\n|\r/),N=i.linesDiffComputers.getAdvanced().computeDiff(R,M,w),P=D.Range.lift(_).getStartPosition();for(const V of N.changes)if(V.innerChanges)for(const W of V.innerChanges)C.push({range:D.Range.fromPositions(x(P,W.originalRange.getStartPosition()),x(P,W.originalRange.getEndPosition())),text:F(M,W.modifiedRange).join(E.eol)});else throw new o.BugIndicatingError("The experimental diff algorithm always produces inner changes")}return typeof I=="number"&&C.push({eol:I,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),C}async computeLinks(n){const g=this._getModel(n);return g?(0,v.computeLinks)(g):null}async computeDefaultDocumentColors(n){const g=this._getModel(n);return g?(0,u.computeDefaultDocumentColors)(g):null}static{this._suggestionsLimit=1e4}async textualSuggest(n,g,w,E){const C=new h.StopWatch,I=new RegExp(w,E),_=new Set;e:for(const A of n){const k=this._getModel(A);if(k){for(const L of k.words(I))if(!(L===g||!isNaN(Number(L)))&&(_.add(L),_.size>p._suggestionsLimit))break e}}return{words:Array.from(_),duration:C.elapsed()}}async computeWordRanges(n,g,w,E){const C=this._getModel(n);if(!C)return Object.create(null);const I=new RegExp(w,E),_=Object.create(null);for(let A=g.startLineNumber;A<g.endLineNumber;A++){const k=C.getLineWords(A,I);for(const L of k){if(!isNaN(Number(L.word)))continue;let R=_[L.word];R||(R=[],_[L.word]=R),R.push({startLineNumber:A,startColumn:L.startColumn,endLineNumber:A,endColumn:L.endColumn})}}return _}async navigateValueSet(n,g,w,E,C){const I=this._getModel(n);if(!I)return null;const _=new RegExp(E,C);g.startColumn===g.endColumn&&(g={startLineNumber:g.startLineNumber,startColumn:g.startColumn,endLineNumber:g.endLineNumber,endColumn:g.endColumn+1});const A=I.getValueInRange(g),k=I.getWordAtPosition({lineNumber:g.startLineNumber,column:g.startColumn},_);if(!k)return null;const L=I.getValueInRange(k);return m.BasicInplaceReplace.INSTANCE.navigateValueSet(g,A,k,L,w)}loadForeignModule(n,g,w){const E=(_,A)=>this._host.fhr(_,A),I={host:(0,s.createProxyObject)(w,E),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(I,g),Promise.resolve((0,s.getAllMethodNames)(this._foreignModule))):new Promise((_,A)=>{q([n],k=>{this._foreignModule=k.create(I,g),_((0,s.getAllMethodNames)(this._foreignModule))},A)})}fmr(n,g){if(!this._foreignModule||typeof this._foreignModule[n]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+n));try{return Promise.resolve(this._foreignModule[n].apply(this._foreignModule,g))}catch(w){return Promise.reject(w)}}}e.EditorSimpleWorker=p;function c(l){return new p(l,null)}e.create=c,typeof importScripts=="function"&&(globalThis.monaco=(0,S.createMonacoBaseAPI)())}),define(Q[1135],Y([1,0,6,4,1070,99]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapTokensColorTracker=void 0;class T extends y.Disposable{static{this._INSTANCE=null}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,y.markAsSingleton)(new T)),this._INSTANCE}constructor(){super(),this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(D.TokenizationRegistry.onDidChange(v=>{v.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const v=D.TokenizationRegistry.getColorMap();if(!v){this._colors=[b.RGBA8.Empty],this._backgroundIsLight=!0;return}this._colors=[b.RGBA8.Empty];for(let S=1;S<v.length;S++){const h=v[S].rgba;this._colors[S]=new b.RGBA8(h.r,h.g,h.b,Math.round(h.a*255))}const m=v[2].getRelativeLuminance();this._backgroundIsLight=m>=.5,this._onDidChange.fire(void 0)}getColor(v){return(v<1||v>=this._colors.length)&&(v=2),this._colors[v]}backgroundIsLight(){return this._backgroundIsLight}}e.MinimapTokensColorTracker=T}),define(Q[2356],Y([2,3]),function(q,e){return q.create("vs/editor/common/languages/modesRegistry",e)}),define(Q[2357],Y([2,3]),function(q,e){return q.create("vs/editor/common/model/editStack",e)}),define(Q[578],Y([1,0,2357,15,96,10,1129,62,26]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditStack=e.isEditStackElement=e.MultiModelEditStackElement=e.SingleModelEditStackElement=e.SingleModelEditStackData=void 0;function m(o){return o.toString()}class S{static create(u,d){const p=u.getAlternativeVersionId(),c=r(u);return new S(p,p,c,c,d,d,[])}constructor(u,d,p,c,l,n,g){this.beforeVersionId=u,this.afterVersionId=d,this.beforeEOL=p,this.afterEOL=c,this.beforeCursorState=l,this.afterCursorState=n,this.changes=g}append(u,d,p,c,l){d.length>0&&(this.changes=(0,T.compressConsecutiveTextChanges)(this.changes,d)),this.afterEOL=p,this.afterVersionId=c,this.afterCursorState=l}static _writeSelectionsSize(u){return 4+4*4*(u?u.length:0)}static _writeSelections(u,d,p){if(f.writeUInt32BE(u,d?d.length:0,p),p+=4,d)for(const c of d)f.writeUInt32BE(u,c.selectionStartLineNumber,p),p+=4,f.writeUInt32BE(u,c.selectionStartColumn,p),p+=4,f.writeUInt32BE(u,c.positionLineNumber,p),p+=4,f.writeUInt32BE(u,c.positionColumn,p),p+=4;return p}static _readSelections(u,d,p){const c=f.readUInt32BE(u,d);d+=4;for(let l=0;l<c;l++){const n=f.readUInt32BE(u,d);d+=4;const g=f.readUInt32BE(u,d);d+=4;const w=f.readUInt32BE(u,d);d+=4;const E=f.readUInt32BE(u,d);d+=4,p.push(new b.Selection(n,g,w,E))}return d}serialize(){let u=10+S._writeSelectionsSize(this.beforeCursorState)+S._writeSelectionsSize(this.afterCursorState)+4;for(const c of this.changes)u+=c.writeSize();const d=new Uint8Array(u);let p=0;f.writeUInt32BE(d,this.beforeVersionId,p),p+=4,f.writeUInt32BE(d,this.afterVersionId,p),p+=4,f.writeUInt8(d,this.beforeEOL,p),p+=1,f.writeUInt8(d,this.afterEOL,p),p+=1,p=S._writeSelections(d,this.beforeCursorState,p),p=S._writeSelections(d,this.afterCursorState,p),f.writeUInt32BE(d,this.changes.length,p),p+=4;for(const c of this.changes)p=c.write(d,p);return d.buffer}static deserialize(u){const d=new Uint8Array(u);let p=0;const c=f.readUInt32BE(d,p);p+=4;const l=f.readUInt32BE(d,p);p+=4;const n=f.readUInt8(d,p);p+=1;const g=f.readUInt8(d,p);p+=1;const w=[];p=S._readSelections(d,p,w);const E=[];p=S._readSelections(d,p,E);const C=f.readUInt32BE(d,p);p+=4;const I=[];for(let _=0;_<C;_++)p=T.TextChange.read(d,p,I);return new S(c,l,n,g,w,E,I)}}e.SingleModelEditStackData=S;class h{get type(){return 0}get resource(){return D.URI.isUri(this.model)?this.model:this.model.uri}constructor(u,d,p,c){this.label=u,this.code=d,this.model=p,this._data=S.create(p,c)}toString(){return(this._data instanceof S?this._data:S.deserialize(this._data)).changes.map(d=>d.toString()).join(", ")}matchesResource(u){return(D.URI.isUri(this.model)?this.model:this.model.uri).toString()===u.toString()}setModel(u){this.model=u}canAppend(u){return this.model===u&&this._data instanceof S}append(u,d,p,c,l){this._data instanceof S&&this._data.append(u,d,p,c,l)}close(){this._data instanceof S&&(this._data=this._data.serialize())}open(){this._data instanceof S||(this._data=S.deserialize(this._data))}undo(){if(D.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof S&&(this._data=this._data.serialize());const u=S.deserialize(this._data);this.model._applyUndo(u.changes,u.beforeEOL,u.beforeVersionId,u.beforeCursorState)}redo(){if(D.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof S&&(this._data=this._data.serialize());const u=S.deserialize(this._data);this.model._applyRedo(u.changes,u.afterEOL,u.afterVersionId,u.afterCursorState)}heapSize(){return this._data instanceof S&&(this._data=this._data.serialize()),this._data.byteLength+168}}e.SingleModelEditStackElement=h;class a{get resources(){return this._editStackElementsArr.map(u=>u.resource)}constructor(u,d,p){this.label=u,this.code=d,this.type=1,this._isOpen=!0,this._editStackElementsArr=p.slice(0),this._editStackElementsMap=new Map;for(const c of this._editStackElementsArr){const l=m(c.resource);this._editStackElementsMap.set(l,c)}this._delegate=null}setDelegate(u){this._delegate=u}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}getMissingModels(){const u=[];for(const d of this._editStackElementsArr)D.URI.isUri(d.model)&&u.push(d.model);return u}matchesResource(u){const d=m(u);return this._editStackElementsMap.has(d)}setModel(u){const d=m(D.URI.isUri(u)?u:u.uri);this._editStackElementsMap.has(d)&&this._editStackElementsMap.get(d).setModel(u)}canAppend(u){if(!this._isOpen)return!1;const d=m(u.uri);return this._editStackElementsMap.has(d)?this._editStackElementsMap.get(d).canAppend(u):!1}append(u,d,p,c,l){const n=m(u.uri);this._editStackElementsMap.get(n).append(u,d,p,c,l)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const u of this._editStackElementsArr)u.undo()}redo(){for(const u of this._editStackElementsArr)u.redo()}heapSize(u){const d=m(u);return this._editStackElementsMap.has(d)?this._editStackElementsMap.get(d).heapSize():0}split(){return this._editStackElementsArr}toString(){const u=[];for(const d of this._editStackElementsArr)u.push(`${(0,v.basename)(d.resource)}: ${d}`);return`{${u.join(", ")}}`}}e.MultiModelEditStackElement=a;function r(o){return o.getEOL()===` `?0:1}function i(o){return o?o instanceof h||o instanceof a:!1}e.isEditStackElement=i;class s{constructor(u,d){this._model=u,this._undoRedoService=d}pushStackElement(){const u=this._undoRedoService.getLastElement(this._model.uri);i(u)&&u.close()}popStackElement(){const u=this._undoRedoService.getLastElement(this._model.uri);i(u)&&u.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(u,d){const p=this._undoRedoService.getLastElement(this._model.uri);if(i(p)&&p.canAppend(this._model))return p;const c=new h(t.localize(0,null),"undoredo.textBufferEdit",this._model,u);return this._undoRedoService.pushElement(c,d),c}pushEOL(u){const d=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(u),d.append(this._model,[],r(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(u,d,p,c){const l=this._getOrCreateEditStackElement(u,c),n=this._model.applyEdits(d,!0),g=s._computeCursorState(p,n),w=n.map((E,C)=>({index:C,textChange:E.textChange}));return w.sort((E,C)=>E.textChange.oldPosition===C.textChange.oldPosition?E.index-C.index:E.textChange.oldPosition-C.textChange.oldPosition),l.append(this._model,w.map(E=>E.textChange),r(this._model),this._model.getAlternativeVersionId(),g),g}static _computeCursorState(u,d){try{return u?u(d):null}catch(p){return(0,y.onUnexpectedError)(p),null}}}e.EditStack=s}),define(Q[2358],Y([2,3]),function(q,e){return q.create("vs/editor/common/standaloneStrings",e)}),define(Q[678],Y([1,0,2358]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServicesNLS=e.ToggleHighContrastNLS=e.StandaloneCodeEditorNLS=e.QuickOutlineNLS=e.QuickCommandNLS=e.QuickHelpNLS=e.GoToLineNLS=e.InspectTokensNLS=e.AccessibilityHelpNLS=void 0;var y;(function(a){a.accessibilityHelpTitle=t.localize(0,null),a.openingDocs=t.localize(1,null),a.readonlyDiffEditor=t.localize(2,null),a.editableDiffEditor=t.localize(3,null),a.readonlyEditor=t.localize(4,null),a.editableEditor=t.localize(5,null),a.changeConfigToOnMac=t.localize(6,null),a.changeConfigToOnWinLinux=t.localize(7,null),a.auto_on=t.localize(8,null),a.auto_off=t.localize(9,null),a.screenReaderModeEnabled=t.localize(10,null),a.screenReaderModeDisabled=t.localize(11,null),a.tabFocusModeOnMsg=t.localize(12,null),a.tabFocusModeOnMsgNoKb=t.localize(13,null),a.stickScrollKb=t.localize(14,null),a.stickScrollNoKb=t.localize(15,null),a.tabFocusModeOffMsg=t.localize(16,null),a.tabFocusModeOffMsgNoKb=t.localize(17,null),a.showAccessibilityHelpAction=t.localize(18,null)})(y||(e.AccessibilityHelpNLS=y={}));var b;(function(a){a.inspectTokensAction=t.localize(19,null)})(b||(e.InspectTokensNLS=b={}));var D;(function(a){a.gotoLineActionLabel=t.localize(20,null)})(D||(e.GoToLineNLS=D={}));var T;(function(a){a.helpQuickAccessActionLabel=t.localize(21,null)})(T||(e.QuickHelpNLS=T={}));var f;(function(a){a.quickCommandActionLabel=t.localize(22,null),a.quickCommandHelp=t.localize(23,null)})(f||(e.QuickCommandNLS=f={}));var v;(function(a){a.quickOutlineActionLabel=t.localize(24,null),a.quickOutlineByCategoryActionLabel=t.localize(25,null)})(v||(e.QuickOutlineNLS=v={}));var m;(function(a){a.editorViewAccessibleLabel=t.localize(26,null),a.accessibilityHelpMessage=t.localize(27,null)})(m||(e.StandaloneCodeEditorNLS=m={}));var S;(function(a){a.toggleHighContrast=t.localize(28,null)})(S||(e.ToggleHighContrastNLS=S={}));var h;(function(a){a.bulkEditServiceSummary=t.localize(29,null)})(h||(e.StandaloneServicesNLS=h={}))}),define(Q[2359],Y([2,3]),function(q,e){return q.create("vs/editor/common/viewLayout/viewLineRenderer",e)}),define(Q[405],Y([1,0,2359,33,370,491,1900]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderViewLine2=e.RenderLineOutput2=e.renderViewLine=e.RenderLineOutput=e.ForeignElementType=e.CharacterMapping=e.DomPosition=e.RenderLineInput=e.LineRange=e.RenderWhitespace=void 0;var f;(function(k){k[k.None=0]="None",k[k.Boundary=1]="Boundary",k[k.Selection=2]="Selection",k[k.Trailing=3]="Trailing",k[k.All=4]="All"})(f||(e.RenderWhitespace=f={}));class v{constructor(L,R){this.startOffset=L,this.endOffset=R}equals(L){return this.startOffset===L.startOffset&&this.endOffset===L.endOffset}}e.LineRange=v;class m{constructor(L,R,M,N,P,x,F,V,W,z,B,K,H,U,G,$,ie,J,j){this.useMonospaceOptimizations=L,this.canUseHalfwidthRightwardsArrow=R,this.lineContent=M,this.continuesWithWrappedLine=N,this.isBasicASCII=P,this.containsRTL=x,this.fauxIndentLength=F,this.lineTokens=V,this.lineDecorations=W.sort(D.LineDecoration.compare),this.tabSize=z,this.startVisibleColumn=B,this.spaceWidth=K,this.stopRenderingLineAfter=G,this.renderWhitespace=$==="all"?4:$==="boundary"?1:$==="selection"?2:$==="trailing"?3:0,this.renderControlCharacters=ie,this.fontLigatures=J,this.selectionsOnLine=j&&j.sort((te,Z)=>te.startOffset<Z.startOffset?-1:1);const ee=Math.abs(U-K),X=Math.abs(H-K);ee<X?(this.renderSpaceWidth=U,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=H,this.renderSpaceCharCode=183)}sameSelection(L){if(this.selectionsOnLine===null)return L===null;if(L===null||L.length!==this.selectionsOnLine.length)return!1;for(let R=0;R<this.selectionsOnLine.length;R++)if(!this.selectionsOnLine[R].equals(L[R]))return!1;return!0}equals(L){return this.useMonospaceOptimizations===L.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===L.canUseHalfwidthRightwardsArrow&&this.lineContent===L.lineContent&&this.continuesWithWrappedLine===L.continuesWithWrappedLine&&this.isBasicASCII===L.isBasicASCII&&this.containsRTL===L.containsRTL&&this.fauxIndentLength===L.fauxIndentLength&&this.tabSize===L.tabSize&&this.startVisibleColumn===L.startVisibleColumn&&this.spaceWidth===L.spaceWidth&&this.renderSpaceWidth===L.renderSpaceWidth&&this.renderSpaceCharCode===L.renderSpaceCharCode&&this.stopRenderingLineAfter===L.stopRenderingLineAfter&&this.renderWhitespace===L.renderWhitespace&&this.renderControlCharacters===L.renderControlCharacters&&this.fontLigatures===L.fontLigatures&&D.LineDecoration.equalsArr(this.lineDecorations,L.lineDecorations)&&this.lineTokens.equals(L.lineTokens)&&this.sameSelection(L.selectionsOnLine)}}e.RenderLineInput=m;var S;(function(k){k[k.PART_INDEX_MASK=4294901760]="PART_INDEX_MASK",k[k.CHAR_INDEX_MASK=65535]="CHAR_INDEX_MASK",k[k.CHAR_INDEX_OFFSET=0]="CHAR_INDEX_OFFSET",k[k.PART_INDEX_OFFSET=16]="PART_INDEX_OFFSET"})(S||(S={}));class h{constructor(L,R){this.partIndex=L,this.charIndex=R}}e.DomPosition=h;class a{static getPartIndex(L){return(L&4294901760)>>>16}static getCharIndex(L){return(L&65535)>>>0}constructor(L,R){this.length=L,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(L,R,M,N){const P=(R<<16|M<<0)>>>0;this._data[L-1]=P,this._horizontalOffset[L-1]=N}getHorizontalOffset(L){return this._horizontalOffset.length===0?0:this._horizontalOffset[L-1]}charOffsetToPartData(L){return this.length===0?0:L<0?this._data[0]:L>=this.length?this._data[this.length-1]:this._data[L]}getDomPosition(L){const R=this.charOffsetToPartData(L-1),M=a.getPartIndex(R),N=a.getCharIndex(R);return new h(M,N)}getColumn(L,R){return this.partDataToCharOffset(L.partIndex,R,L.charIndex)+1}partDataToCharOffset(L,R,M){if(this.length===0)return 0;const N=(L<<16|M<<0)>>>0;let P=0,x=this.length-1;for(;P+1<x;){const G=P+x>>>1,$=this._data[G];if($===N)return G;$>N?x=G:P=G}if(P===x)return P;const F=this._data[P],V=this._data[x];if(F===N)return P;if(V===N)return x;const W=a.getPartIndex(F),z=a.getCharIndex(F),B=a.getPartIndex(V);let K;W!==B?K=R:K=a.getCharIndex(V);const H=M-z,U=K-M;return H<=U?P:x}inflate(){const L=[];for(let R=0;R<this.length;R++){const M=this._data[R],N=a.getPartIndex(M),P=a.getCharIndex(M),x=this._horizontalOffset[R];L.push([N,P,x])}return L}}e.CharacterMapping=a;var r;(function(k){k[k.None=0]="None",k[k.Before=1]="Before",k[k.After=2]="After"})(r||(e.ForeignElementType=r={}));class i{constructor(L,R,M){this._renderLineOutputBrand=void 0,this.characterMapping=L,this.containsRTL=R,this.containsForeignElements=M}}e.RenderLineOutput=i;function s(k,L){if(k.lineContent.length===0){if(k.lineDecorations.length>0){L.appendString("<span>");let R=0,M=0,N=0;for(const x of k.lineDecorations)(x.type===1||x.type===2)&&(L.appendString('<span class="'),L.appendString(x.className),L.appendString('"></span>'),x.type===1&&(N|=1,R++),x.type===2&&(N|=2,M++));L.appendString("</span>");const P=new a(1,R+M);return P.setColumnInfo(1,R,0,0),new i(P,!1,N)}return L.appendString("<span><span></span></span>"),new i(new a(0,0),!1,0)}return I(p(k),L)}e.renderViewLine=s;class o{constructor(L,R,M,N){this.characterMapping=L,this.html=R,this.containsRTL=M,this.containsForeignElements=N}}e.RenderLineOutput2=o;function u(k){const L=new b.StringBuilder(1e4),R=s(k,L);return new o(R.characterMapping,L.build(),R.containsRTL,R.containsForeignElements)}e.renderViewLine2=u;class d{constructor(L,R,M,N,P,x,F,V,W,z,B,K,H,U,G,$){this.fontIsMonospace=L,this.canUseHalfwidthRightwardsArrow=R,this.lineContent=M,this.len=N,this.isOverflowing=P,this.overflowingCharCount=x,this.parts=F,this.containsForeignElements=V,this.fauxIndentLength=W,this.tabSize=z,this.startVisibleColumn=B,this.containsRTL=K,this.spaceWidth=H,this.renderSpaceCharCode=U,this.renderWhitespace=G,this.renderControlCharacters=$}}function p(k){const L=k.lineContent;let R,M,N;k.stopRenderingLineAfter!==-1&&k.stopRenderingLineAfter<L.length?(R=!0,M=L.length-k.stopRenderingLineAfter,N=k.stopRenderingLineAfter):(R=!1,M=0,N=L.length);let P=c(L,k.containsRTL,k.lineTokens,k.fauxIndentLength,N);k.renderControlCharacters&&!k.isBasicASCII&&(P=w(L,P)),(k.renderWhitespace===4||k.renderWhitespace===1||k.renderWhitespace===2&&k.selectionsOnLine||k.renderWhitespace===3&&!k.continuesWithWrappedLine)&&(P=E(k,L,N,P));let x=0;if(k.lineDecorations.length>0){for(let F=0,V=k.lineDecorations.length;F<V;F++){const W=k.lineDecorations[F];W.type===3||W.type===1?x|=1:W.type===2&&(x|=2)}P=C(L,N,P,k.lineDecorations)}return k.containsRTL||(P=n(L,P,!k.isBasicASCII||k.fontLigatures)),new d(k.useMonospaceOptimizations,k.canUseHalfwidthRightwardsArrow,L,N,R,M,P,x,k.fauxIndentLength,k.tabSize,k.startVisibleColumn,k.containsRTL,k.spaceWidth,k.renderSpaceCharCode,k.renderWhitespace,k.renderControlCharacters)}function c(k,L,R,M,N){const P=[];let x=0;M>0&&(P[x++]=new T.LinePart(M,"",0,!1));let F=M;for(let V=0,W=R.getCount();V<W;V++){const z=R.getEndOffset(V);if(z<=M)continue;const B=R.getClassName(V);if(z>=N){const H=L?y.containsRTL(k.substring(F,N)):!1;P[x++]=new T.LinePart(N,B,0,H);break}const K=L?y.containsRTL(k.substring(F,z)):!1;P[x++]=new T.LinePart(z,B,0,K),F=z}return P}var l;(function(k){k[k.LongToken=50]="LongToken"})(l||(l={}));function n(k,L,R){let M=0;const N=[];let P=0;if(R)for(let x=0,F=L.length;x<F;x++){const V=L[x],W=V.endIndex;if(M+50<W){const z=V.type,B=V.metadata,K=V.containsRTL;let H=-1,U=M;for(let G=M;G<W;G++)k.charCodeAt(G)===32&&(H=G),H!==-1&&G-U>=50&&(N[P++]=new T.LinePart(H+1,z,B,K),U=H+1,H=-1);U!==W&&(N[P++]=new T.LinePart(W,z,B,K))}else N[P++]=V;M=W}else for(let x=0,F=L.length;x<F;x++){const V=L[x],W=V.endIndex,z=W-M;if(z>50){const B=V.type,K=V.metadata,H=V.containsRTL,U=Math.ceil(z/50);for(let G=1;G<U;G++){const $=M+G*50;N[P++]=new T.LinePart($,B,K,H)}N[P++]=new T.LinePart(W,B,K,H)}else N[P++]=V;M=W}return N}function g(k){return k<32?k!==9:k===127||k>=8234&&k<=8238||k>=8294&&k<=8297||k>=8206&&k<=8207||k===1564}function w(k,L){const R=[];let M=new T.LinePart(0,"",0,!1),N=0;for(const P of L){const x=P.endIndex;for(;N<x;N++){const F=k.charCodeAt(N);g(F)&&(N>M.endIndex&&(M=new T.LinePart(N,P.type,P.metadata,P.containsRTL),R.push(M)),M=new T.LinePart(N+1,"mtkcontrol",P.metadata,!1),R.push(M))}N>M.endIndex&&(M=new T.LinePart(x,P.type,P.metadata,P.containsRTL),R.push(M))}return R}function E(k,L,R,M){const N=k.continuesWithWrappedLine,P=k.fauxIndentLength,x=k.tabSize,F=k.startVisibleColumn,V=k.useMonospaceOptimizations,W=k.selectionsOnLine,z=k.renderWhitespace===1,B=k.renderWhitespace===3,K=k.renderSpaceWidth!==k.spaceWidth,H=[];let U=0,G=0,$=M[G].type,ie=M[G].containsRTL,J=M[G].endIndex;const j=M.length;let ee=!1,X=y.firstNonWhitespaceIndex(L),te;X===-1?(ee=!0,X=R,te=R):te=y.lastNonWhitespaceIndex(L);let Z=!1,se=0,re=W&&W[se],oe=F%x;for(let ne=P;ne<R;ne++){const ce=L.charCodeAt(ne);re&&ne>=re.endOffset&&(se++,re=W&&W[se]);let ae;if(ne<X||ne>te)ae=!0;else if(ce===9)ae=!0;else if(ce===32)if(z)if(Z)ae=!0;else{const ue=ne+1<R?L.charCodeAt(ne+1):0;ae=ue===32||ue===9}else ae=!0;else ae=!1;if(ae&&W&&(ae=!!re&&re.startOffset<=ne&&re.endOffset>ne),ae&&B&&(ae=ee||ne>te),ae&&ie&&ne>=X&&ne<=te&&(ae=!1),Z){if(!ae||!V&&oe>=x){if(K){const ue=U>0?H[U-1].endIndex:P;for(let de=ue+1;de<=ne;de++)H[U++]=new T.LinePart(de,"mtkw",1,!1)}else H[U++]=new T.LinePart(ne,"mtkw",1,!1);oe=oe%x}}else(ne===J||ae&&ne>P)&&(H[U++]=new T.LinePart(ne,$,0,ie),oe=oe%x);for(ce===9?oe=x:y.isFullWidthCharacter(ce)?oe+=2:oe++,Z=ae;ne===J&&(G++,G<j);)$=M[G].type,ie=M[G].containsRTL,J=M[G].endIndex}let le=!1;if(Z)if(N&&z){const ne=R>0?L.charCodeAt(R-1):0,ce=R>1?L.charCodeAt(R-2):0;ne===32&&ce!==32&&ce!==9||(le=!0)}else le=!0;if(le)if(K){const ne=U>0?H[U-1].endIndex:P;for(let ce=ne+1;ce<=R;ce++)H[U++]=new T.LinePart(ce,"mtkw",1,!1)}else H[U++]=new T.LinePart(R,"mtkw",1,!1);else H[U++]=new T.LinePart(R,$,0,ie);return H}function C(k,L,R,M){M.sort(D.LineDecoration.compare);const N=D.LineDecorationsNormalizer.normalize(k,M),P=N.length;let x=0;const F=[];let V=0,W=0;for(let B=0,K=R.length;B<K;B++){const H=R[B],U=H.endIndex,G=H.type,$=H.metadata,ie=H.containsRTL;for(;x<P&&N[x].startOffset<U;){const J=N[x];if(J.startOffset>W&&(W=J.startOffset,F[V++]=new T.LinePart(W,G,$,ie)),J.endOffset+1<=U)W=J.endOffset+1,F[V++]=new T.LinePart(W,G+" "+J.className,$|J.metadata,ie),x++;else{W=U,F[V++]=new T.LinePart(W,G+" "+J.className,$|J.metadata,ie);break}}U>W&&(W=U,F[V++]=new T.LinePart(W,G,$,ie))}const z=R[R.length-1].endIndex;if(x<P&&N[x].startOffset===z)for(;x<P&&N[x].startOffset===z;){const B=N[x];F[V++]=new T.LinePart(W,B.className,B.metadata,!1),x++}return F}function I(k,L){const R=k.fontIsMonospace,M=k.canUseHalfwidthRightwardsArrow,N=k.containsForeignElements,P=k.lineContent,x=k.len,F=k.isOverflowing,V=k.overflowingCharCount,W=k.parts,z=k.fauxIndentLength,B=k.tabSize,K=k.startVisibleColumn,H=k.containsRTL,U=k.spaceWidth,G=k.renderSpaceCharCode,$=k.renderWhitespace,ie=k.renderControlCharacters,J=new a(x+1,W.length);let j=!1,ee=0,X=K,te=0,Z=0,se=0;H?L.appendString('<span dir="ltr">'):L.appendString("<span>");for(let re=0,oe=W.length;re<oe;re++){const le=W[re],ne=le.endIndex,ce=le.type,ae=le.containsRTL,ue=$!==0&&le.isWhitespace(),de=ue&&!R&&(ce==="mtkw"||!N),ge=ee===ne&&le.isPseudoAfter();if(te=0,L.appendString("<span "),ae&&L.appendString('style="unicode-bidi:isolate" '),L.appendString('class="'),L.appendString(de?"mtkz":ce),L.appendASCIICharCode(34),ue){let he=0;{let be=ee,ve=X;for(;be<ne;be++){const Se=(P.charCodeAt(be)===9?B-ve%B:1)|0;he+=Se,be>=z&&(ve+=Se)}}for(de&&(L.appendString(' style="width:'),L.appendString(String(U*he)),L.appendString('px"')),L.appendASCIICharCode(62);ee<ne;ee++){J.setColumnInfo(ee+1,re-se,te,Z),se=0;const be=P.charCodeAt(ee);let ve,Ie;if(be===9){ve=B-X%B|0,Ie=ve,!M||Ie>1?L.appendCharCode(8594):L.appendCharCode(65515);for(let Se=2;Se<=Ie;Se++)L.appendCharCode(160)}else ve=2,Ie=1,L.appendCharCode(G),L.appendCharCode(8204);te+=ve,Z+=Ie,ee>=z&&(X+=Ie)}}else for(L.appendASCIICharCode(62);ee<ne;ee++){J.setColumnInfo(ee+1,re-se,te,Z),se=0;const he=P.charCodeAt(ee);let be=1,ve=1;switch(he){case 9:be=B-X%B,ve=be;for(let Ie=1;Ie<=be;Ie++)L.appendCharCode(160);break;case 32:L.appendCharCode(160);break;case 60:L.appendString("<");break;case 62:L.appendString(">");break;case 38:L.appendString("&");break;case 0:ie?L.appendCharCode(9216):L.appendString("�");break;case 65279:case 8232:case 8233:case 133:L.appendCharCode(65533);break;default:y.isFullWidthCharacter(he)&&ve++,ie&&he<32?L.appendCharCode(9216+he):ie&&he===127?L.appendCharCode(9249):ie&&g(he)?(L.appendString("[U+"),L.appendString(_(he)),L.appendString("]"),be=8,ve=be):L.appendCharCode(he)}te+=be,Z+=ve,ee>=z&&(X+=ve)}ge?se++:se=0,ee>=x&&!j&&le.isPseudoAfter()&&(j=!0,J.setColumnInfo(ee+1,re,te,Z)),L.appendString("</span>")}return j||J.setColumnInfo(x+1,W.length-1,te,Z),F&&(L.appendString('<span class="mtkoverflow">'),L.appendString(t.localize(0,null,A(V))),L.appendString("</span>")),L.appendString("</span>"),new i(J,H,N)}function _(k){return k.toString(16).toUpperCase().padStart(4,"0")}function A(k){return k<1024?t.localize(1,null,k):k<1024*1024?`${(k/1024).toFixed(1)} KB`:`${(k/1024/1024).toFixed(1)} MB`}}),define(Q[2360],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/anchorSelect/browser/anchorSelect",e)}),define(Q[2361],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/bracketMatching/browser/bracketMatching",e)}),define(Q[2362],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/caretOperations/browser/caretOperations",e)}),define(Q[2363],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/caretOperations/browser/transpose",e)}),define(Q[2364],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/clipboard/browser/clipboard",e)}),define(Q[2365],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/codeAction/browser/codeAction",e)}),define(Q[2366],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/codeAction/browser/codeActionCommands",e)}),define(Q[2367],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/codeAction/browser/codeActionContributions",e)}),define(Q[2368],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/codeAction/browser/codeActionController",e)}),define(Q[2369],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/codeAction/browser/codeActionMenu",e)}),define(Q[2370],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/codeAction/browser/lightBulbWidget",e)}),define(Q[2371],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/codelens/browser/codelensController",e)}),define(Q[2372],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/colorPicker/browser/colorPickerWidget",e)}),define(Q[2373],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions",e)}),define(Q[2374],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/comment/browser/comment",e)}),define(Q[2375],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/contextmenu/browser/contextmenu",e)}),define(Q[2376],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/cursorUndo/browser/cursorUndo",e)}),define(Q[2377],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution",e)}),define(Q[2378],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/dropOrPasteInto/browser/copyPasteController",e)}),define(Q[2379],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/dropOrPasteInto/browser/defaultProviders",e)}),define(Q[2380],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution",e)}),define(Q[2381],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController",e)}),define(Q[2382],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/editorState/browser/keybindingCancellation",e)}),define(Q[2383],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/find/browser/findController",e)}),define(Q[2384],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/find/browser/findWidget",e)}),define(Q[2385],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/folding/browser/folding",e)}),define(Q[2386],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/folding/browser/foldingDecorations",e)}),define(Q[2387],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/fontZoom/browser/fontZoom",e)}),define(Q[2388],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/format/browser/format",e)}),define(Q[2389],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/format/browser/formatActions",e)}),define(Q[2390],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/gotoError/browser/gotoError",e)}),define(Q[2391],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/gotoError/browser/gotoErrorWidget",e)}),define(Q[2392],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/browser/goToCommands",e)}),define(Q[2393],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition",e)}),define(Q[2394],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesController",e)}),define(Q[2395],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesTree",e)}),define(Q[2396],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget",e)}),define(Q[2397],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/browser/referencesModel",e)}),define(Q[579],Y([1,0,15,6,320,4,69,26,33,27,2397]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesModel=e.FileReferences=e.FilePreview=e.OneReference=void 0;class h{constructor(o,u,d,p){this.isProviderFirst=o,this.parent=u,this.link=d,this._rangeCallback=p,this.id=b.defaultGenerator.nextId()}get uri(){return this.link.uri}get range(){return this._range??this.link.targetSelectionRange??this.link.range}set range(o){this._range=o,this._rangeCallback(this)}get ariaMessage(){const o=this.parent.getPreview(this)?.preview(this.range);return o?(0,S.localize)(1,null,o.value,(0,f.basename)(this.uri),this.range.startLineNumber,this.range.startColumn):(0,S.localize)(0,null,(0,f.basename)(this.uri),this.range.startLineNumber,this.range.startColumn)}}e.OneReference=h;class a{constructor(o){this._modelReference=o}dispose(){this._modelReference.dispose()}preview(o,u=8){const d=this._modelReference.object.textEditorModel;if(!d)return;const{startLineNumber:p,startColumn:c,endLineNumber:l,endColumn:n}=o,g=d.getWordUntilPosition({lineNumber:p,column:c-u}),w=new m.Range(p,g.startColumn,p,c),E=new m.Range(l,n,l,1073741824),C=d.getValueInRange(w).replace(/^\s+/,""),I=d.getValueInRange(o),_=d.getValueInRange(E).replace(/\s+$/,"");return{value:C+I+_,highlight:{start:C.length,end:C.length+I.length}}}}e.FilePreview=a;class r{constructor(o,u){this.parent=o,this.uri=u,this.children=[],this._previews=new T.ResourceMap}dispose(){(0,D.dispose)(this._previews.values()),this._previews.clear()}getPreview(o){return this._previews.get(o.uri)}get ariaMessage(){const o=this.children.length;return o===1?(0,S.localize)(2,null,(0,f.basename)(this.uri),this.uri.fsPath):(0,S.localize)(3,null,o,(0,f.basename)(this.uri),this.uri.fsPath)}async resolve(o){if(this._previews.size!==0)return this;for(const u of this.children)if(!this._previews.has(u.uri))try{const d=await o.createModelReference(u.uri);this._previews.set(u.uri,new a(d))}catch(d){(0,t.onUnexpectedError)(d)}return this}}e.FileReferences=r;class i{constructor(o,u){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new y.Emitter,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=o,this._title=u;const[d]=o;o.sort(i._compareReferences);let p;for(const c of o)if((!p||!f.extUri.isEqual(p.uri,c.uri,!0))&&(p=new r(this,c.uri),this.groups.push(p)),p.children.length===0||i._compareReferences(c,p.children[p.children.length-1])!==0){const l=new h(d===c,p,c,n=>this._onDidChangeReferenceRange.fire(n));this.references.push(l),p.children.push(l)}}dispose(){(0,D.dispose)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new i(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?(0,S.localize)(4,null):this.references.length===1?(0,S.localize)(5,null,this.references[0].uri.fsPath):this.groups.length===1?(0,S.localize)(6,null,this.references.length,this.groups[0].uri.fsPath):(0,S.localize)(7,null,this.references.length,this.groups.length)}nextOrPreviousReference(o,u){const{parent:d}=o;let p=d.children.indexOf(o);const c=d.children.length,l=d.parent.groups.length;return l===1||u&&p+1<c||!u&&p>0?(u?p=(p+1)%c:p=(p+c-1)%c,d.children[p]):(p=d.parent.groups.indexOf(d),u?(p=(p+1)%l,d.parent.groups[p].children[0]):(p=(p+l-1)%l,d.parent.groups[p].children[d.parent.groups[p].children.length-1]))}nearestReference(o,u){const d=this.references.map((p,c)=>({idx:c,prefixLen:v.commonPrefixLength(p.uri.toString(),o.toString()),offsetDist:Math.abs(p.range.startLineNumber-u.lineNumber)*100+Math.abs(p.range.startColumn-u.column)})).sort((p,c)=>p.prefixLen>c.prefixLen?-1:p.prefixLen<c.prefixLen?1:p.offsetDist<c.offsetDist?-1:p.offsetDist>c.offsetDist?1:0)[0];if(d)return this.references[d.idx]}referenceAt(o,u){for(const d of this.references)if(d.uri.toString()===o.toString()&&m.Range.containsPosition(d.range,u))return d}firstReference(){for(const o of this.references)if(o.isProviderFirst)return o;return this.references[0]}static _compareReferences(o,u){return f.extUri.compare(o.uri,u.uri)||m.Range.compareRangesUsingStarts(o.range,u.range)}}e.ReferencesModel=i}),define(Q[2398],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/gotoSymbol/browser/symbolNavigation",e)}),define(Q[2399],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/hover/browser/hover",e)}),define(Q[2400],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/hover/browser/markdownHoverParticipant",e)}),define(Q[2401],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/hover/browser/markerHoverParticipant",e)}),define(Q[2402],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace",e)}),define(Q[2403],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/indentation/browser/indentation",e)}),define(Q[2404],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/inlayHints/browser/inlayHintsHover",e)}),define(Q[2405],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/inlineCompletions/browser/commands",e)}),define(Q[2406],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/inlineCompletions/browser/hoverParticipant",e)}),define(Q[2407],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys",e)}),define(Q[2408],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController",e)}),define(Q[2409],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget",e)}),define(Q[2410],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/lineSelection/browser/lineSelection",e)}),define(Q[2411],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/linesOperations/browser/linesOperations",e)}),define(Q[2412],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/linkedEditing/browser/linkedEditing",e)}),define(Q[2413],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/links/browser/links",e)}),define(Q[2414],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/message/browser/messageController",e)}),define(Q[2415],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/multicursor/browser/multicursor",e)}),define(Q[2416],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/parameterHints/browser/parameterHints",e)}),define(Q[2417],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/parameterHints/browser/parameterHintsWidget",e)}),define(Q[2418],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/peekView/browser/peekView",e)}),define(Q[2419],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess",e)}),define(Q[2420],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess",e)}),define(Q[2421],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/readOnlyMessage/browser/contribution",e)}),define(Q[2422],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/rename/browser/rename",e)}),define(Q[2423],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/rename/browser/renameInputField",e)}),define(Q[2424],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/smartSelect/browser/smartSelect",e)}),define(Q[2425],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/snippet/browser/snippetController2",e)}),define(Q[2426],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/snippet/browser/snippetVariables",e)}),define(Q[2427],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/stickyScroll/browser/stickyScrollActions",e)}),define(Q[2428],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/suggest/browser/suggest",e)}),define(Q[2429],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/suggest/browser/suggestController",e)}),define(Q[2430],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/suggest/browser/suggestWidget",e)}),define(Q[2431],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/suggest/browser/suggestWidgetDetails",e)}),define(Q[2432],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/suggest/browser/suggestWidgetRenderer",e)}),define(Q[2433],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/suggest/browser/suggestWidgetStatus",e)}),define(Q[2434],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/symbolIcons/browser/symbolIcons",e)}),define(Q[2435],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode",e)}),define(Q[2436],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/tokenization/browser/tokenization",e)}),define(Q[2437],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter",e)}),define(Q[2438],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators",e)}),define(Q[2439],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/wordHighlighter/browser/highlightDecorations",e)}),define(Q[2440],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/wordHighlighter/browser/wordHighlighter",e)}),define(Q[2441],Y([2,3]),function(q,e){return q.create("vs/editor/contrib/wordOperations/browser/wordOperations",e)}),define(Q[2442],Y([2,3]),function(q,e){return q.create("vs/platform/action/common/actionCommonCategories",e)}),define(Q[2443],Y([2,3]),function(q,e){return q.create("vs/platform/actionWidget/browser/actionList",e)}),define(Q[2444],Y([2,3]),function(q,e){return q.create("vs/platform/actionWidget/browser/actionWidget",e)}),define(Q[2445],Y([2,3]),function(q,e){return q.create("vs/platform/actions/browser/buttonbar",e)}),define(Q[2446],Y([2,3]),function(q,e){return q.create("vs/platform/actions/browser/menuEntryActionViewItem",e)}),define(Q[2447],Y([2,3]),function(q,e){return q.create("vs/platform/actions/browser/toolbar",e)}),define(Q[2448],Y([2,3]),function(q,e){return q.create("vs/platform/actions/common/menuResetAction",e)}),define(Q[2449],Y([2,3]),function(q,e){return q.create("vs/platform/actions/common/menuService",e)}),define(Q[2450],Y([2,3]),function(q,e){return q.create("vs/platform/audioCues/browser/audioCueService",e)}),define(Q[2451],Y([2,3]),function(q,e){return q.create("vs/platform/configuration/common/configurationRegistry",e)}),define(Q[2452],Y([2,3]),function(q,e){return q.create("vs/platform/contextkey/browser/contextKeyService",e)}),define(Q[2453],Y([2,3]),function(q,e){return q.create("vs/platform/contextkey/common/contextkey",e)}),define(Q[2454],Y([2,3]),function(q,e){return q.create("vs/platform/contextkey/common/contextkeys",e)}),define(Q[2455],Y([2,3]),function(q,e){return q.create("vs/platform/contextkey/common/scanner",e)}),define(Q[2456],Y([2,3]),function(q,e){return q.create("vs/platform/dialogs/common/dialogs",e)}),define(Q[2457],Y([2,3]),function(q,e){return q.create("vs/platform/dnd/browser/dnd",e)}),define(Q[2458],Y([2,3]),function(q,e){return q.create("vs/platform/extensionManagement/common/extensionManagement",e)}),define(Q[2459],Y([2,3]),function(q,e){return q.create("vs/platform/extensionManagement/common/extensionManagementCLI",e)}),define(Q[2460],Y([2,3]),function(q,e){return q.create("vs/platform/extensionManagement/common/extensionNls",e)}),define(Q[2461],Y([2,3]),function(q,e){return q.create("vs/platform/extensionManagement/common/extensionsScannerService",e)}),define(Q[2462],Y([2,3]),function(q,e){return q.create("vs/platform/extensions/common/extensionValidator",e)}),define(Q[2463],Y([2,3]),function(q,e){return q.create("vs/platform/files/browser/htmlFileSystemProvider",e)}),define(Q[2464],Y([2,3]),function(q,e){return q.create("vs/platform/files/common/fileService",e)}),define(Q[2465],Y([2,3]),function(q,e){return q.create("vs/platform/files/common/files",e)}),define(Q[2466],Y([2,3]),function(q,e){return q.create("vs/platform/files/common/io",e)}),define(Q[2467],Y([2,3]),function(q,e){return q.create("vs/platform/history/browser/contextScopedHistoryWidget",e)}),define(Q[2468],Y([2,3]),function(q,e){return q.create("vs/platform/keybinding/common/abstractKeybindingService",e)}),define(Q[2469],Y([2,3]),function(q,e){return q.create("vs/platform/keyboardLayout/common/keyboardConfig",e)}),define(Q[2470],Y([2,3]),function(q,e){return q.create("vs/platform/languagePacks/common/languagePacks",e)}),define(Q[2471],Y([2,3]),function(q,e){return q.create("vs/platform/languagePacks/common/localizedStrings",e)}),define(Q[2472],Y([2,3]),function(q,e){return q.create("vs/platform/list/browser/listService",e)}),define(Q[2473],Y([2,3]),function(q,e){return q.create("vs/platform/markers/common/markers",e)}),define(Q[2474],Y([2,3]),function(q,e){return q.create("vs/platform/quickinput/browser/commandsQuickAccess",e)}),define(Q[2475],Y([2,3]),function(q,e){return q.create("vs/platform/quickinput/browser/helpQuickAccess",e)}),define(Q[2476],Y([2,3]),function(q,e){return q.create("vs/platform/quickinput/browser/quickInput",e)}),define(Q[2477],Y([2,3]),function(q,e){return q.create("vs/platform/quickinput/browser/quickInputController",e)}),define(Q[2478],Y([2,3]),function(q,e){return q.create("vs/platform/quickinput/browser/quickInputList",e)}),define(Q[2479],Y([2,3]),function(q,e){return q.create("vs/platform/quickinput/browser/quickInputUtils",e)}),define(Q[2480],Y([2,3]),function(q,e){return q.create("vs/platform/quickinput/browser/quickPickPin",e)}),define(Q[2481],Y([2,3]),function(q,e){return q.create("vs/platform/remoteTunnel/common/remoteTunnel",e)}),define(Q[2482],Y([2,3]),function(q,e){return q.create("vs/platform/request/common/request",e)}),define(Q[2483],Y([2,3]),function(q,e){return q.create("vs/platform/telemetry/common/telemetryService",e)}),define(Q[2484],Y([2,3]),function(q,e){return q.create("vs/platform/terminal/common/terminalLogService",e)}),define(Q[2485],Y([2,3]),function(q,e){return q.create("vs/platform/terminal/common/terminalPlatformConfiguration",e)}),define(Q[2486],Y([2,3]),function(q,e){return q.create("vs/platform/terminal/common/terminalProfiles",e)}),define(Q[2487],Y([2,3]),function(q,e){return q.create("vs/platform/theme/common/colorRegistry",e)}),define(Q[2488],Y([2,3]),function(q,e){return q.create("vs/platform/theme/common/iconRegistry",e)}),define(Q[2489],Y([2,3]),function(q,e){return q.create("vs/platform/theme/common/tokenClassificationRegistry",e)}),define(Q[2490],Y([2,3]),function(q,e){return q.create("vs/platform/undoRedo/common/undoRedoService",e)}),define(Q[2491],Y([2,3]),function(q,e){return q.create("vs/platform/update/common/update.config.contribution",e)}),define(Q[2492],Y([2,3]),function(q,e){return q.create("vs/platform/userDataProfile/common/userDataProfile",e)}),define(Q[2493],Y([2,3]),function(q,e){return q.create("vs/platform/userDataSync/common/abstractSynchronizer",e)}),define(Q[2494],Y([2,3]),function(q,e){return q.create("vs/platform/userDataSync/common/userDataSync",e)}),define(Q[2495],Y([2,3]),function(q,e){return q.create("vs/platform/userDataSync/common/userDataSyncLog",e)}),define(Q[2496],Y([2,3]),function(q,e){return q.create("vs/platform/userDataSync/common/userDataSyncMachines",e)}),define(Q[2497],Y([2,3]),function(q,e){return q.create("vs/platform/workspace/common/workspace",e)}),define(Q[2498],Y([2,3]),function(q,e){return q.create("vs/platform/workspace/common/workspaceTrust",e)}),define(Q[2499],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadAuthentication",e)}),define(Q[2500],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadCLICommands",e)}),define(Q[2501],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadComments",e)}),define(Q[2502],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadCustomEditors",e)}),define(Q[2503],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant",e)}),define(Q[2504],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadExtensionService",e)}),define(Q[2505],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadFileSystemEventService",e)}),define(Q[2506],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadMessageService",e)}),define(Q[2507],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadNotebookSaveParticipant",e)}),define(Q[2508],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadProgress",e)}),define(Q[2509],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadSaveParticipant",e)}),define(Q[2510],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadTask",e)}),define(Q[2511],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadTunnelService",e)}),define(Q[2512],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadUriOpeners",e)}),define(Q[2513],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadWebviews",e)}),define(Q[2514],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/mainThreadWorkspace",e)}),define(Q[2515],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/statusBarExtensionPoint",e)}),define(Q[2516],Y([2,3]),function(q,e){return q.create("vs/workbench/api/browser/viewsExtensionPoint",e)}),define(Q[2517],Y([2,3]),function(q,e){return q.create("vs/workbench/api/common/configurationExtensionPoint",e)}),define(Q[2518],Y([2,3]),function(q,e){return q.create("vs/workbench/api/common/extHostTunnelService",e)}),define(Q[2519],Y([2,3]),function(q,e){return q.create("vs/workbench/api/common/jsonValidationExtensionPoint",e)}),define(Q[2520],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/actions/developerActions",e)}),define(Q[2521],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/actions/helpActions",e)}),define(Q[2522],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/actions/layoutActions",e)}),define(Q[2523],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/actions/navigationActions",e)}),define(Q[2524],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/actions/quickAccessActions",e)}),define(Q[2525],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/actions/textInputActions",e)}),define(Q[2526],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/actions/windowActions",e)}),define(Q[2527],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/actions/workspaceActions",e)}),define(Q[2528],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/actions/workspaceCommands",e)}),define(Q[2529],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/editor",e)}),define(Q[2530],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/activitybar/activitybarActions",e)}),define(Q[2531],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/activitybar/activitybarPart",e)}),define(Q[2532],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions",e)}),define(Q[2533],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart",e)}),define(Q[2534],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/banner/bannerPart",e)}),define(Q[2535],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/compositeBar",e)}),define(Q[2536],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/compositeBarActions",e)}),define(Q[2537],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/compositePart",e)}),define(Q[2538],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/dialogs/dialogHandler",e)}),define(Q[2539],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/accessibilityStatus",e)}),define(Q[2540],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/binaryDiffEditor",e)}),define(Q[2541],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/binaryEditor",e)}),define(Q[2542],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/breadcrumbs",e)}),define(Q[2543],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/breadcrumbsControl",e)}),define(Q[2544],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/breadcrumbsPicker",e)}),define(Q[2545],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/editor.contribution",e)}),define(Q[2546],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/editorActions",e)}),define(Q[2547],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/editorCommands",e)}),define(Q[2548],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/editorConfiguration",e)}),define(Q[2549],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/editorDropTarget",e)}),define(Q[2550],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/editorGroupView",e)}),define(Q[2551],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/editorGroupWatermark",e)}),define(Q[2552],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/editorPanes",e)}),define(Q[2553],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/editorPlaceholder",e)}),define(Q[2554],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/editorQuickAccess",e)}),define(Q[2555],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/editorStatus",e)}),define(Q[2556],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/sideBySideEditor",e)}),define(Q[2557],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/tabsTitleControl",e)}),define(Q[2558],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/textCodeEditor",e)}),define(Q[2559],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/textDiffEditor",e)}),define(Q[2560],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/textEditor",e)}),define(Q[2561],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/editor/titleControl",e)}),define(Q[2562],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/notifications/notificationsActions",e)}),define(Q[2563],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/notifications/notificationsAlerts",e)}),define(Q[2564],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/notifications/notificationsCenter",e)}),define(Q[2565],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/notifications/notificationsCommands",e)}),define(Q[2566],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/notifications/notificationsList",e)}),define(Q[2567],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/notifications/notificationsStatus",e)}),define(Q[2568],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/notifications/notificationsToasts",e)}),define(Q[2569],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/notifications/notificationsViewer",e)}),define(Q[2570],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/panel/panelActions",e)}),define(Q[2571],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/panel/panelPart",e)}),define(Q[2572],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/sidebar/sidebarActions",e)}),define(Q[2573],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/statusbar/statusbarActions",e)}),define(Q[2574],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/statusbar/statusbarPart",e)}),define(Q[2575],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/titlebar/commandCenterControl",e)}),define(Q[2576],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/titlebar/menubarControl",e)}),define(Q[2577],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/titlebar/titlebarPart",e)}),define(Q[2578],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/titlebar/windowTitle",e)}),define(Q[2579],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/views/checkbox",e)}),define(Q[2580],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/views/treeView",e)}),define(Q[2581],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/views/viewFilter",e)}),define(Q[2582],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/views/viewPane",e)}),define(Q[2583],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/views/viewPaneContainer",e)}),define(Q[2584],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/parts/views/viewsService",e)}),define(Q[2585],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/quickaccess",e)}),define(Q[2586],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/workbench",e)}),define(Q[2587],Y([2,3]),function(q,e){return q.create("vs/workbench/browser/workbench.contribution",e)}),define(Q[2588],Y([2,3]),function(q,e){return q.create("vs/workbench/common/configuration",e)}),define(Q[2589],Y([2,3]),function(q,e){return q.create("vs/workbench/common/contextkeys",e)}),define(Q[2590],Y([2,3]),function(q,e){return q.create("vs/workbench/common/editor",e)}),define(Q[2591],Y([2,3]),function(q,e){return q.create("vs/workbench/common/editor/diffEditorInput",e)}),define(Q[2592],Y([2,3]),function(q,e){return q.create("vs/workbench/common/editor/sideBySideEditorInput",e)}),define(Q[2593],Y([2,3]),function(q,e){return q.create("vs/workbench/common/editor/textEditorModel",e)}),define(Q[2594],Y([2,3]),function(q,e){return q.create("vs/workbench/common/theme",e)}),define(Q[2595],Y([2,3]),function(q,e){return q.create("vs/workbench/common/views",e)}),define(Q[2596],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/accessibility/browser/accessibilityConfiguration",e)}),define(Q[2597],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/accessibility/browser/accessibilityContributions",e)}),define(Q[2598],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/accessibility/browser/accessibleView",e)}),define(Q[2599],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/accessibility/browser/accessibleViewActions",e)}),define(Q[2600],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/audioCues/browser/audioCues.contribution",e)}),define(Q[2601],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/audioCues/browser/commands",e)}),define(Q[2602],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/bulkEdit/browser/bulkEditService",e)}),define(Q[2603],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution",e)}),define(Q[2604],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane",e)}),define(Q[2605],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview",e)}),define(Q[2606],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree",e)}),define(Q[2607],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution",e)}),define(Q[2608],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek",e)}),define(Q[2609],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/callHierarchy/browser/callHierarchyTree",e)}),define(Q[2610],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp",e)}),define(Q[2611],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/actions/chatActions",e)}),define(Q[2612],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/actions/chatClearActions",e)}),define(Q[2613],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/actions/chatCodeblockActions",e)}),define(Q[2614],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/actions/chatCopyActions",e)}),define(Q[2615],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/actions/chatExecuteActions",e)}),define(Q[2616],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/actions/chatFileTreeActions",e)}),define(Q[2617],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/actions/chatImportExport",e)}),define(Q[2618],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/actions/chatMoveActions",e)}),define(Q[2619],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/actions/chatQuickInputActions",e)}),define(Q[2620],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/actions/chatTitleActions",e)}),define(Q[2621],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/chat.contribution",e)}),define(Q[2622],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/chatContributionServiceImpl",e)}),define(Q[2623],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/chatEditorInput",e)}),define(Q[2624],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/chatInputPart",e)}),define(Q[2625],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/chatListRenderer",e)}),define(Q[2626],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget",e)}),define(Q[2627],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib",e)}),define(Q[2628],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/common/chatColors",e)}),define(Q[2629],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/common/chatContextKeys",e)}),define(Q[2630],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/common/chatServiceImpl",e)}),define(Q[2631],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/common/chatSlashCommands",e)}),define(Q[2632],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/common/chatViewModel",e)}),define(Q[2633],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/chat/electron-sandbox/actions/voiceChatActions",e)}),define(Q[2634],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeActions/browser/codeActionsContribution",e)}),define(Q[2635],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint",e)}),define(Q[2636],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeActions/common/documentationExtensionPoint",e)}),define(Q[2637],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/accessibility/accessibility",e)}),define(Q[2638],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/diffEditorHelper",e)}),define(Q[2639],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget",e)}),define(Q[2640],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens",e)}),define(Q[2641],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/inspectKeybindings",e)}),define(Q[2642],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint",e)}),define(Q[2643],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/largeFileOptimizations",e)}),define(Q[2644],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline",e)}),define(Q[2645],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree",e)}),define(Q[2646],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess",e)}),define(Q[2647],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess",e)}),define(Q[2648],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/saveParticipants",e)}),define(Q[2649],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/toggleColumnSelection",e)}),define(Q[2650],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/toggleMinimap",e)}),define(Q[2651],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier",e)}),define(Q[2652],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter",e)}),define(Q[2653],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace",e)}),define(Q[2654],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/toggleWordWrap",e)}),define(Q[2655],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/browser/untitledTextEditorHint/untitledTextEditorHint",e)}),define(Q[2656],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard",e)}),define(Q[2657],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/codeEditor/electron-sandbox/startDebugTextMate",e)}),define(Q[2658],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/commands/common/commands.contribution",e)}),define(Q[2659],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/browser/commentColors",e)}),define(Q[2660],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/browser/commentGlyphWidget",e)}),define(Q[2661],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/browser/commentNode",e)}),define(Q[2662],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/browser/commentReply",e)}),define(Q[2663],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/browser/commentService",e)}),define(Q[2664],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/browser/commentThreadBody",e)}),define(Q[2665],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/browser/commentThreadHeader",e)}),define(Q[2666],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/browser/comments.contribution",e)}),define(Q[2667],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/browser/commentsController",e)}),define(Q[2668],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/browser/commentsEditorContribution",e)}),define(Q[2669],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/browser/commentsTreeViewer",e)}),define(Q[2670],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/browser/commentsView",e)}),define(Q[2671],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/browser/commentsViewActions",e)}),define(Q[2672],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/browser/reactionsAction",e)}),define(Q[2673],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/common/commentContextKeys",e)}),define(Q[2674],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/comments/common/commentModel",e)}),define(Q[2675],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/customEditor/common/contributedCustomEditors",e)}),define(Q[2676],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/customEditor/common/customEditor",e)}),define(Q[2677],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/customEditor/common/extensionPoint",e)}),define(Q[2678],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/debug/browser/debugColors",e)}),define(Q[2679],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/debug/browser/debugIcons",e)}),define(Q[2680],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/debug/common/debug",e)}),define(Q[2681],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/deprecatedExtensionMigrator/browser/deprecatedExtensionMigrator.contribution",e)}),define(Q[2682],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/editSessions/browser/editSessions.contribution",e)}),define(Q[2683],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/editSessions/browser/editSessionsStorageService",e)}),define(Q[2684],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/editSessions/browser/editSessionsViews",e)}),define(Q[2685],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/editSessions/common/editSessions",e)}),define(Q[2686],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/editSessions/common/editSessionsLogService",e)}),define(Q[2687],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor",e)}),define(Q[2688],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/configBasedRecommendations",e)}),define(Q[2689],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/deprecatedExtensionsChecker",e)}),define(Q[2690],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/exeBasedRecommendations",e)}),define(Q[2691],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensionEditor",e)}),define(Q[2692],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant",e)}),define(Q[2693],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService",e)}),define(Q[2694],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensions.contribution",e)}),define(Q[2695],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensionsActions",e)}),define(Q[2696],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensionsActivationProgress",e)}),define(Q[2697],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider",e)}),define(Q[2698],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensionsDependencyChecker",e)}),define(Q[2699],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensionsIcons",e)}),define(Q[2700],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensionsQuickAccess",e)}),define(Q[2701],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensionsViewer",e)}),define(Q[2702],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensionsViewlet",e)}),define(Q[2703],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensionsViews",e)}),define(Q[2704],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensionsWidgets",e)}),define(Q[2705],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/extensionsWorkbenchService",e)}),define(Q[2706],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/fileBasedRecommendations",e)}),define(Q[2707],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/webRecommendations",e)}),define(Q[2708],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/browser/workspaceRecommendations",e)}),define(Q[2709],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/common/extensionsFileTemplate",e)}),define(Q[2710],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/common/extensionsInput",e)}),define(Q[2711],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/common/extensionsUtils",e)}),define(Q[2712],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/common/reportExtensionIssueAction",e)}),define(Q[2713],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/common/runtimeExtensionsInput",e)}),define(Q[2714],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/electron-sandbox/debugExtensionHostAction",e)}),define(Q[2715],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/electron-sandbox/extensionProfileService",e)}),define(Q[2716],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/electron-sandbox/extensions.contribution",e)}),define(Q[2717],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/electron-sandbox/extensionsActions",e)}),define(Q[2718],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/electron-sandbox/extensionsAutoProfiler",e)}),define(Q[2719],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions",e)}),define(Q[2720],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/extensions/electron-sandbox/runtimeExtensionsEditor",e)}),define(Q[2721],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/externalTerminal/browser/externalTerminal.contribution",e)}),define(Q[2722],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/externalTerminal/electron-sandbox/externalTerminal.contribution",e)}),define(Q[2723],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/externalUriOpener/common/configuration",e)}),define(Q[2724],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService",e)}),define(Q[2725],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/editors/binaryFileEditor",e)}),define(Q[2726],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/editors/textFileEditor",e)}),define(Q[2727],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler",e)}),define(Q[2728],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/explorerViewlet",e)}),define(Q[2729],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/fileActions",e)}),define(Q[2730],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/fileActions.contribution",e)}),define(Q[2731],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/fileCommands",e)}),define(Q[2732],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/fileConstants",e)}),define(Q[2733],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/fileImportExport",e)}),define(Q[2734],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/files.contribution",e)}),define(Q[2735],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/views/emptyView",e)}),define(Q[2736],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/views/explorerDecorationsProvider",e)}),define(Q[2737],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/views/explorerView",e)}),define(Q[2738],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/views/explorerViewer",e)}),define(Q[2739],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/views/openEditorsView",e)}),define(Q[2740],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/browser/workspaceWatcher",e)}),define(Q[2741],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/common/dirtyFilesIndicator",e)}),define(Q[2742],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/common/files",e)}),define(Q[2743],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/files/electron-sandbox/fileActions.contribution",e)}),define(Q[2744],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/folding/browser/folding.contribution",e)}),define(Q[2745],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/format/browser/formatActionsMultiple",e)}),define(Q[2746],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/format/browser/formatActionsNone",e)}),define(Q[2747],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/format/browser/formatModified",e)}),define(Q[2748],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty",e)}),define(Q[2749],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/inlineChat/browser/inlineChatActions",e)}),define(Q[2750],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/inlineChat/browser/inlineChatController",e)}),define(Q[2751],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/inlineChat/browser/inlineChatStrategies",e)}),define(Q[2752],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/inlineChat/browser/inlineChatWidget",e)}),define(Q[2753],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/inlineChat/common/inlineChat",e)}),define(Q[2754],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/interactive/browser/interactive.contribution",e)}),define(Q[2755],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/interactive/browser/interactiveEditor",e)}),define(Q[2756],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/issue/common/issue.contribution",e)}),define(Q[2757],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/issue/electron-sandbox/issue.contribution",e)}),define(Q[2758],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/keybindings/browser/keybindings.contribution",e)}),define(Q[2759],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/languageDetection/browser/languageDetection.contribution",e)}),define(Q[2760],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/languageStatus/browser/languageStatus.contribution",e)}),define(Q[2761],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution",e)}),define(Q[2762],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/localHistory/browser/localHistory",e)}),define(Q[2763],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/localHistory/browser/localHistoryCommands",e)}),define(Q[2764],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/localHistory/browser/localHistoryTimeline",e)}),define(Q[2765],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/localHistory/electron-sandbox/localHistoryCommands",e)}),define(Q[2766],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/localization/common/localization.contribution",e)}),define(Q[2767],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/localization/common/localizationsActions",e)}),define(Q[2768],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/localization/electron-sandbox/localization.contribution",e)}),define(Q[2769],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/localization/electron-sandbox/minimalTranslations",e)}),define(Q[2770],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/logs/common/logs.contribution",e)}),define(Q[2771],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/logs/common/logsActions",e)}),define(Q[2772],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/logs/electron-sandbox/logsActions",e)}),define(Q[2773],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/markers/browser/markers.contribution",e)}),define(Q[2774],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/markers/browser/markersFileDecorations",e)}),define(Q[2775],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/markers/browser/markersTable",e)}),define(Q[2776],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/markers/browser/markersTreeViewer",e)}),define(Q[2777],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/markers/browser/markersView",e)}),define(Q[2778],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/markers/browser/messages",e)}),define(Q[2779],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/browser/commands/commands",e)}),define(Q[2780],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/browser/commands/devCommands",e)}),define(Q[2781],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution",e)}),define(Q[2782],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/browser/mergeEditorInput",e)}),define(Q[2783],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel",e)}),define(Q[2784],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController",e)}),define(Q[2785],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel",e)}),define(Q[2786],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/browser/view/colors",e)}),define(Q[2787],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/browser/view/conflictActions",e)}),define(Q[2788],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView",e)}),define(Q[2789],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView",e)}),define(Q[2790],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView",e)}),define(Q[2791],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/browser/view/mergeEditor",e)}),define(Q[2792],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/browser/view/viewModel",e)}),define(Q[2793],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/common/mergeEditor",e)}),define(Q[2794],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/mergeEditor/electron-sandbox/devCommands",e)}),define(Q[2795],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands",e)}),define(Q[2796],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController",e)}),define(Q[2797],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders",e)}),define(Q[2798],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard",e)}),define(Q[2799],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar",e)}),define(Q[2800],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/find/notebookFind",e)}),define(Q[2801],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget",e)}),define(Q[2802],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget",e)}),define(Q[2803],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/format/formatting",e)}),define(Q[2804],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted",e)}),define(Q[2805],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions",e)}),define(Q[2806],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/navigation/arrow",e)}),define(Q[2807],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline",e)}),define(Q[2808],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile",e)}),define(Q[2809],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants",e)}),define(Q[2810],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout",e)}),define(Q[2811],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/controller/cellOperations",e)}),define(Q[2812],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/controller/cellOutputActions",e)}),define(Q[2813],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/controller/coreActions",e)}),define(Q[2814],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/controller/editActions",e)}),define(Q[2815],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/controller/executeActions",e)}),define(Q[2816],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/controller/foldingController",e)}),define(Q[2817],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/controller/insertCellActions",e)}),define(Q[2818],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/controller/layoutActions",e)}),define(Q[2819],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/diff/diffElementOutputs",e)}),define(Q[2820],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/diff/notebookDiffActions",e)}),define(Q[2821],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor",e)}),define(Q[2822],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/notebook.contribution",e)}),define(Q[2823],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/notebookAccessibility",e)}),define(Q[2824],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/notebookEditor",e)}),define(Q[2825],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/notebookEditorWidget",e)}),define(Q[2826],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/notebookExtensionPoint",e)}),define(Q[2827],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/notebookIcons",e)}),define(Q[2828],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl",e)}),define(Q[2829],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl",e)}),define(Q[2830],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl",e)}),define(Q[2831],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl",e)}),define(Q[2832],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/services/notebookServiceImpl",e)}),define(Q[2833],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions",e)}),define(Q[2834],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput",e)}),define(Q[2835],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/view/cellParts/codeCell",e)}),define(Q[2836],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon",e)}),define(Q[2837],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar",e)}),define(Q[2838],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput",e)}),define(Q[2839],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint",e)}),define(Q[2840],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/view/cellParts/markupCell",e)}),define(Q[2841],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView",e)}),define(Q[2842],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer",e)}),define(Q[2843],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider",e)}),define(Q[2844],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll",e)}),define(Q[2845],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy",e)}),define(Q[2846],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView",e)}),define(Q[2847],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/notebook/common/notebookEditorInput",e)}),define(Q[2848],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/outline/browser/outline.contribution",e)}),define(Q[2849],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/outline/browser/outlineActions",e)}),define(Q[2850],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/outline/browser/outlinePane",e)}),define(Q[2851],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/output/browser/logViewer",e)}),define(Q[2852],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/output/browser/output.contribution",e)}),define(Q[2853],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/output/browser/outputView",e)}),define(Q[2854],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/performance/browser/performance.contribution",e)}),define(Q[2855],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/performance/browser/perfviewEditor",e)}),define(Q[2856],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/performance/electron-sandbox/performance.contribution",e)}),define(Q[2857],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/performance/electron-sandbox/startupProfiler",e)}),define(Q[2858],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/keybindingWidgets",e)}),define(Q[2859],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/keybindingsEditor",e)}),define(Q[2860],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/keybindingsEditorContribution",e)}),define(Q[2861],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/preferences.contribution",e)}),define(Q[2862],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/preferencesActions",e)}),define(Q[2863],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/preferencesIcons",e)}),define(Q[2864],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/preferencesRenderers",e)}),define(Q[2865],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/preferencesWidgets",e)}),define(Q[2866],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/settingsEditor2",e)}),define(Q[2867],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators",e)}),define(Q[2868],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/settingsLayout",e)}),define(Q[2869],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/settingsSearchMenu",e)}),define(Q[2870],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/settingsTree",e)}),define(Q[2871],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/settingsWidgets",e)}),define(Q[2872],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/browser/tocTree",e)}),define(Q[2873],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/common/preferencesContribution",e)}),define(Q[2874],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/preferences/common/settingsEditorColorRegistry",e)}),define(Q[2875],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/quickaccess/browser/commandsQuickAccess",e)}),define(Q[2876],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/quickaccess/browser/quickAccess.contribution",e)}),define(Q[2877],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/quickaccess/browser/viewQuickAccess",e)}),define(Q[2878],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/relauncher/browser/relauncher.contribution",e)}),define(Q[2879],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/remote/browser/remoteExplorer",e)}),define(Q[2880],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/remote/browser/remoteIcons",e)}),define(Q[2881],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/remote/browser/tunnelView",e)}),define(Q[2882],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/remote/electron-sandbox/remote.contribution",e)}),define(Q[2883],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/remoteTunnel/electron-sandbox/remoteTunnel.contribution",e)}),define(Q[2884],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/sash/browser/sash.contribution",e)}),define(Q[2885],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/scm/browser/activity",e)}),define(Q[2886],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/scm/browser/dirtyDiffSwitcher",e)}),define(Q[2887],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/scm/browser/dirtydiffDecorator",e)}),define(Q[2888],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/scm/browser/menus",e)}),define(Q[2889],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/scm/browser/scm.contribution",e)}),define(Q[2890],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/scm/browser/scmRepositoriesViewPane",e)}),define(Q[2891],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/scm/browser/scmViewPane",e)}),define(Q[2892],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/scm/browser/scmViewPaneContainer",e)}),define(Q[2893],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/anythingQuickAccess",e)}),define(Q[2894],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/patternInputWidget",e)}),define(Q[2895],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess",e)}),define(Q[2896],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/replaceService",e)}),define(Q[2897],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/search.contribution",e)}),define(Q[2898],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/searchActionsBase",e)}),define(Q[2899],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/searchActionsCopy",e)}),define(Q[2900],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/searchActionsFind",e)}),define(Q[2901],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/searchActionsNav",e)}),define(Q[2902],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/searchActionsRemoveReplace",e)}),define(Q[2903],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/searchActionsSymbol",e)}),define(Q[2904],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/searchActionsTextQuickAccess",e)}),define(Q[2905],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/searchActionsTopBar",e)}),define(Q[2906],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/searchFindInput",e)}),define(Q[2907],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/searchIcons",e)}),define(Q[2908],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/searchMessage",e)}),define(Q[2909],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/searchResultsView",e)}),define(Q[2910],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/searchView",e)}),define(Q[2911],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/searchWidget",e)}),define(Q[2912],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/search/browser/symbolsQuickAccess",e)}),define(Q[2913],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/searchEditor/browser/searchEditor",e)}),define(Q[2914],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/searchEditor/browser/searchEditor.contribution",e)}),define(Q[2915],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/searchEditor/browser/searchEditorInput",e)}),define(Q[2916],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/searchEditor/browser/searchEditorSerialization",e)}),define(Q[2917],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/share/browser/share.contribution",e)}),define(Q[2918],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/share/browser/shareService",e)}),define(Q[2919],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions",e)}),define(Q[2920],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/snippets/browser/commands/configureSnippets",e)}),define(Q[2921],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets",e)}),define(Q[2922],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/snippets/browser/commands/insertSnippet",e)}),define(Q[2923],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/snippets/browser/commands/surroundWithSnippet",e)}),define(Q[2924],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/snippets/browser/snippetCodeActionProvider",e)}),define(Q[2925],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/snippets/browser/snippetCompletionProvider",e)}),define(Q[2926],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/snippets/browser/snippetPicker",e)}),define(Q[2927],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/snippets/browser/snippets.contribution",e)}),define(Q[2928],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/snippets/browser/snippetsFile",e)}),define(Q[2929],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/snippets/browser/snippetsService",e)}),define(Q[2930],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/surveys/browser/ces.contribution",e)}),define(Q[2931],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/surveys/browser/languageSurveys.contribution",e)}),define(Q[2932],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/surveys/browser/nps.contribution",e)}),define(Q[2933],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/browser/abstractTaskService",e)}),define(Q[2934],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/browser/runAutomaticTasks",e)}),define(Q[2935],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/browser/task.contribution",e)}),define(Q[2936],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/browser/taskQuickPick",e)}),define(Q[2937],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/browser/taskTerminalStatus",e)}),define(Q[2938],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/browser/tasksQuickAccess",e)}),define(Q[2939],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/browser/terminalTaskSystem",e)}),define(Q[2940],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/common/jsonSchemaCommon",e)}),define(Q[2941],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/common/jsonSchema_v1",e)}),define(Q[2942],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/common/jsonSchema_v2",e)}),define(Q[2943],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/common/problemMatcher",e)}),define(Q[2944],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/common/taskConfiguration",e)}),define(Q[2945],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/common/taskDefinitionRegistry",e)}),define(Q[2946],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/common/taskService",e)}),define(Q[2947],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/common/taskTemplates",e)}),define(Q[2948],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/common/tasks",e)}),define(Q[2949],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/tasks/electron-sandbox/taskService",e)}),define(Q[2950],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/baseTerminalBackend",e)}),define(Q[2951],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/environmentVariableInfo",e)}),define(Q[2952],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminal.contribution",e)}),define(Q[2953],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalActions",e)}),define(Q[2954],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalConfigHelper",e)}),define(Q[2955],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalEditorInput",e)}),define(Q[2956],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalIcons",e)}),define(Q[2957],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalInstance",e)}),define(Q[2958],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalMenus",e)}),define(Q[2959],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalProcessManager",e)}),define(Q[2960],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalProfileQuickpick",e)}),define(Q[2961],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalQuickAccess",e)}),define(Q[2962],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick",e)}),define(Q[2963],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalService",e)}),define(Q[2964],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalTabbedView",e)}),define(Q[2965],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalTabsList",e)}),define(Q[2966],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalTooltip",e)}),define(Q[2967],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/terminalView",e)}),define(Q[2968],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/xterm/decorationAddon",e)}),define(Q[2969],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/xterm/decorationStyles",e)}),define(Q[2970],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/browser/xterm/xtermTerminal",e)}),define(Q[2971],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/common/terminal",e)}),define(Q[2972],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/common/terminalColorRegistry",e)}),define(Q[2973],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/common/terminalConfiguration",e)}),define(Q[2974],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/common/terminalContextKey",e)}),define(Q[2975],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/common/terminalStrings",e)}),define(Q[2976],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminal/electron-sandbox/terminalRemote",e)}),define(Q[2977],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/accessibility/browser/terminal.accessibility.contribution",e)}),define(Q[2978],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibilityHelp",e)}),define(Q[2979],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibleBuffer",e)}),define(Q[2980],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibleWidget",e)}),define(Q[2981],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/developer/browser/terminal.developer.contribution",e)}),define(Q[2982],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/environmentChanges/browser/terminal.environmentChanges.contribution",e)}),define(Q[2983],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/find/browser/terminal.find.contribution",e)}),define(Q[2984],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/links/browser/terminal.links.contribution",e)}),define(Q[2985],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/links/browser/terminalLinkDetectorAdapter",e)}),define(Q[2986],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/links/browser/terminalLinkManager",e)}),define(Q[2987],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/links/browser/terminalLinkQuickpick",e)}),define(Q[2988],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/quickFix/browser/quickFixAddon",e)}),define(Q[2989],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/quickFix/browser/terminal.quickFix.contribution",e)}),define(Q[2990],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixBuiltinActions",e)}),define(Q[2991],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixService",e)}),define(Q[2992],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/browser/icons",e)}),define(Q[2993],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/browser/testExplorerActions",e)}),define(Q[2994],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/browser/testing.contribution",e)}),define(Q[2995],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/browser/testingConfigurationUi",e)}),define(Q[2996],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/browser/testingDecorations",e)}),define(Q[2997],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/browser/testingExplorerFilter",e)}),define(Q[2998],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/browser/testingExplorerView",e)}),define(Q[2999],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/browser/testingOutputPeek",e)}),define(Q[3e3],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/browser/testingProgressUiService",e)}),define(Q[3001],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/browser/testingViewPaneContainer",e)}),define(Q[3002],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/browser/theme",e)}),define(Q[3003],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/common/configuration",e)}),define(Q[3004],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/common/constants",e)}),define(Q[3005],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/common/testResult",e)}),define(Q[3006],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/common/testServiceImpl",e)}),define(Q[3007],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/common/testingContentProvider",e)}),define(Q[3008],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/testing/common/testingContextKeys",e)}),define(Q[3009],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/themes/browser/themes.contribution",e)}),define(Q[3010],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/timeline/browser/timeline.contribution",e)}),define(Q[3011],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/timeline/browser/timelinePane",e)}),define(Q[3012],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution",e)}),define(Q[3013],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek",e)}),define(Q[3014],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree",e)}),define(Q[3015],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/update/browser/update",e)}),define(Q[3016],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/update/browser/update.contribution",e)}),define(Q[3017],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/url/browser/trustedDomains",e)}),define(Q[3018],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/url/browser/trustedDomainsValidator",e)}),define(Q[3019],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/url/browser/url.contribution",e)}),define(Q[3020],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/userDataProfile/browser/userDataProfile",e)}),define(Q[3021],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/userDataProfile/browser/userDataProfileActions",e)}),define(Q[3022],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/userDataSync/browser/userDataSync",e)}),define(Q[3023],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/userDataSync/browser/userDataSync.contribution",e)}),define(Q[3024],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/userDataSync/browser/userDataSyncConflictsView",e)}),define(Q[3025],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/userDataSync/browser/userDataSyncViews",e)}),define(Q[3026],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/userDataSync/electron-sandbox/userDataSync.contribution",e)}),define(Q[3027],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/webview/browser/webview.contribution",e)}),define(Q[3028],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/webview/browser/webviewElement",e)}),define(Q[3029],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/webview/electron-sandbox/webviewCommands",e)}),define(Q[3030],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/webviewPanel/browser/webviewCommands",e)}),define(Q[3031],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/webviewPanel/browser/webviewEditor",e)}),define(Q[3032],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution",e)}),define(Q[3033],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/welcomeViews/common/newFile.contribution",e)}),define(Q[3034],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution",e)}),define(Q[3035],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint",e)}),define(Q[3036],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough",e)}),define(Q[3037],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution",e)}),define(Q[3038],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart",e)}),define(Q[3039],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/welcomeWalkthrough/common/walkThroughUtils",e)}),define(Q[3040],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/workspace/browser/workspace.contribution",e)}),define(Q[3041],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/workspace/browser/workspaceTrustEditor",e)}),define(Q[3042],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/workspace/common/workspace",e)}),define(Q[3043],Y([2,3]),function(q,e){return q.create("vs/workbench/contrib/workspaces/browser/workspaces.contribution",e)}),define(Q[3044],Y([2,3]),function(q,e){return q.create("vs/workbench/electron-sandbox/actions/developerActions",e)}),define(Q[3045],Y([2,3]),function(q,e){return q.create("vs/workbench/electron-sandbox/actions/installActions",e)}),define(Q[3046],Y([2,3]),function(q,e){return q.create("vs/workbench/electron-sandbox/actions/windowActions",e)}),define(Q[3047],Y([2,3]),function(q,e){return q.create("vs/workbench/electron-sandbox/desktop.contribution",e)}),define(Q[3048],Y([2,3]),function(q,e){return q.create("vs/workbench/electron-sandbox/desktop.main",e)}),define(Q[3049],Y([2,3]),function(q,e){return q.create("vs/workbench/electron-sandbox/parts/dialogs/dialogHandler",e)}),define(Q[3050],Y([2,3]),function(q,e){return q.create("vs/workbench/electron-sandbox/window",e)}),define(Q[3051],Y([2,3]),function(q,e){return q.create("vs/workbench/services/actions/common/menusExtensionPoint",e)}),define(Q[3052],Y([2,3]),function(q,e){return q.create("vs/workbench/services/assignment/common/assignmentService",e)}),define(Q[3053],Y([2,3]),function(q,e){return q.create("vs/workbench/services/authentication/browser/authenticationService",e)}),define(Q[3054],Y([2,3]),function(q,e){return q.create("vs/workbench/services/configuration/browser/configurationService",e)}),define(Q[3055],Y([2,3]),function(q,e){return q.create("vs/workbench/services/configuration/common/configurationEditing",e)}),define(Q[3056],Y([2,3]),function(q,e){return q.create("vs/workbench/services/configuration/common/jsonEditingService",e)}),define(Q[3057],Y([2,3]),function(q,e){return q.create("vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService",e)}),define(Q[3058],Y([2,3]),function(q,e){return q.create("vs/workbench/services/configurationResolver/common/configurationResolverSchema",e)}),define(Q[3059],Y([2,3]),function(q,e){return q.create("vs/workbench/services/configurationResolver/common/configurationResolverUtils",e)}),define(Q[3060],Y([2,3]),function(q,e){return q.create("vs/workbench/services/configurationResolver/common/variableResolver",e)}),define(Q[3061],Y([2,3]),function(q,e){return q.create("vs/workbench/services/decorations/browser/decorationsService",e)}),define(Q[3062],Y([2,3]),function(q,e){return q.create("vs/workbench/services/dialogs/browser/abstractFileDialogService",e)}),define(Q[3063],Y([2,3]),function(q,e){return q.create("vs/workbench/services/dialogs/browser/simpleFileDialog",e)}),define(Q[3064],Y([2,3]),function(q,e){return q.create("vs/workbench/services/editor/browser/editorResolverService",e)}),define(Q[3065],Y([2,3]),function(q,e){return q.create("vs/workbench/services/editor/common/editorResolverService",e)}),define(Q[3066],Y([2,3]),function(q,e){return q.create("vs/workbench/services/extensionManagement/browser/extensionBisect",e)}),define(Q[3067],Y([2,3]),function(q,e){return q.create("vs/workbench/services/extensionManagement/browser/extensionEnablementService",e)}),define(Q[3068],Y([2,3]),function(q,e){return q.create("vs/workbench/services/extensionManagement/common/extensionManagementService",e)}),define(Q[3069],Y([2,3]),function(q,e){return q.create("vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementServerService",e)}),define(Q[3070],Y([2,3]),function(q,e){return q.create("vs/workbench/services/extensionManagement/electron-sandbox/remoteExtensionManagementService",e)}),define(Q[3071],Y([2,3]),function(q,e){return q.create("vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig",e)}),define(Q[3072],Y([2,3]),function(q,e){return q.create("vs/workbench/services/extensions/browser/extensionUrlHandler",e)}),define(Q[3073],Y([2,3]),function(q,e){return q.create("vs/workbench/services/extensions/common/abstractExtensionService",e)}),define(Q[3074],Y([2,3]),function(q,e){return q.create("vs/workbench/services/extensions/common/extensionHostManager",e)}),define(Q[3075],Y([2,3]),function(q,e){return q.create("vs/workbench/services/extensions/common/extensionsRegistry",e)}),define(Q[3076],Y([2,3]),function(q,e){return q.create("vs/workbench/services/extensions/common/extensionsUtil",e)}),define(Q[3077],Y([2,3]),function(q,e){return q.create("vs/workbench/services/extensions/electron-sandbox/cachedExtensionScanner",e)}),define(Q[3078],Y([2,3]),function(q,e){return q.create("vs/workbench/services/extensions/electron-sandbox/localProcessExtensionHost",e)}),define(Q[3079],Y([2,3]),function(q,e){return q.create("vs/workbench/services/extensions/electron-sandbox/nativeExtensionService",e)}),define(Q[3080],Y([2,3]),function(q,e){return q.create("vs/workbench/services/filesConfiguration/common/filesConfigurationService",e)}),define(Q[3081],Y([2,3]),function(q,e){return q.create("vs/workbench/services/history/browser/historyService",e)}),define(Q[3082],Y([2,3]),function(q,e){return q.create("vs/workbench/services/hover/browser/hoverWidget",e)}),define(Q[3083],Y([2,3]),function(q,e){return q.create("vs/workbench/services/integrity/electron-sandbox/integrityService",e)}),define(Q[3084],Y([2,3]),function(q,e){return q.create("vs/workbench/services/issue/browser/issueTroubleshoot",e)}),define(Q[3085],Y([2,3]),function(q,e){return q.create("vs/workbench/services/keybinding/browser/keybindingService",e)}),define(Q[3086],Y([2,3]),function(q,e){return q.create("vs/workbench/services/keybinding/common/keybindingEditing",e)}),define(Q[3087],Y([2,3]),function(q,e){return q.create("vs/workbench/services/label/common/labelService",e)}),define(Q[3088],Y([2,3]),function(q,e){return q.create("vs/workbench/services/language/common/languageService",e)}),define(Q[3089],Y([2,3]),function(q,e){return q.create("vs/workbench/services/localization/electron-sandbox/localeService",e)}),define(Q[3090],Y([2,3]),function(q,e){return q.create("vs/workbench/services/log/electron-sandbox/logService",e)}),define(Q[3091],Y([2,3]),function(q,e){return q.create("vs/workbench/services/notification/common/notificationService",e)}),define(Q[3092],Y([2,3]),function(q,e){return q.create("vs/workbench/services/preferences/browser/keybindingsEditorInput",e)}),define(Q[3093],Y([2,3]),function(q,e){return q.create("vs/workbench/services/preferences/browser/keybindingsEditorModel",e)}),define(Q[3094],Y([2,3]),function(q,e){return q.create("vs/workbench/services/preferences/browser/preferencesService",e)}),define(Q[3095],Y([2,3]),function(q,e){return q.create("vs/workbench/services/preferences/common/preferencesEditorInput",e)}),define(Q[3096],Y([2,3]),function(q,e){return q.create("vs/workbench/services/preferences/common/preferencesModels",e)}),define(Q[3097],Y([2,3]),function(q,e){return q.create("vs/workbench/services/preferences/common/preferencesValidation",e)}),define(Q[3098],Y([2,3]),function(q,e){return q.create("vs/workbench/services/progress/browser/progressService",e)}),define(Q[3099],Y([2,3]),function(q,e){return q.create("vs/workbench/services/remote/common/tunnelModel",e)}),define(Q[3100],Y([2,3]),function(q,e){return q.create("vs/workbench/services/remote/electron-sandbox/remoteAgentService",e)}),define(Q[3101],Y([2,3]),function(q,e){return q.create("vs/workbench/services/search/common/queryBuilder",e)}),define(Q[3102],Y([2,3]),function(q,e){return q.create("vs/workbench/services/secrets/electron-sandbox/secretStorageService",e)}),define(Q[3103],Y([2,3]),function(q,e){return q.create("vs/workbench/services/suggest/browser/simpleSuggestWidget",e)}),define(Q[3104],Y([2,3]),function(q,e){return q.create("vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl",e)}),define(Q[3105],Y([2,3]),function(q,e){return q.create("vs/workbench/services/textMate/common/TMGrammars",e)}),define(Q[3106],Y([2,3]),function(q,e){return q.create("vs/workbench/services/textfile/browser/textFileService",e)}),define(Q[3107],Y([2,3]),function(q,e){return q.create("vs/workbench/services/textfile/common/textFileEditorModel",e)}),define(Q[3108],Y([2,3]),function(q,e){return q.create("vs/workbench/services/textfile/common/textFileEditorModelManager",e)}),define(Q[3109],Y([2,3]),function(q,e){return q.create("vs/workbench/services/textfile/common/textFileSaveParticipant",e)}),define(Q[3110],Y([2,3]),function(q,e){return q.create("vs/workbench/services/textfile/electron-sandbox/nativeTextFileService",e)}),define(Q[3111],Y([2,3]),function(q,e){return q.create("vs/workbench/services/themes/browser/fileIconThemeData",e)}),define(Q[3112],Y([2,3]),function(q,e){return q.create("vs/workbench/services/themes/browser/productIconThemeData",e)}),define(Q[3113],Y([2,3]),function(q,e){return q.create("vs/workbench/services/themes/browser/workbenchThemeService",e)}),define(Q[3114],Y([2,3]),function(q,e){return q.create("vs/workbench/services/themes/common/colorExtensionPoint",e)}),define(Q[3115],Y([2,3]),function(q,e){return q.create("vs/workbench/services/themes/common/colorThemeData",e)}),define(Q[3116],Y([2,3]),function(q,e){return q.create("vs/workbench/services/themes/common/colorThemeSchema",e)}),define(Q[3117],Y([2,3]),function(q,e){return q.create("vs/workbench/services/themes/common/fileIconThemeSchema",e)}),define(Q[3118],Y([2,3]),function(q,e){return q.create("vs/workbench/services/themes/common/iconExtensionPoint",e)}),define(Q[3119],Y([2,3]),function(q,e){return q.create("vs/workbench/services/themes/common/productIconThemeSchema",e)}),define(Q[3120],Y([2,3]),function(q,e){return q.create("vs/workbench/services/themes/common/themeConfiguration",e)}),define(Q[3121],Y([2,3]),function(q,e){return q.create("vs/workbench/services/themes/common/themeExtensionPoints",e)}),define(Q[3122],Y([2,3]),function(q,e){return q.create("vs/workbench/services/themes/common/tokenClassificationExtensionPoint",e)}),define(Q[3123],Y([2,3]),function(q,e){return q.create("vs/workbench/services/userDataProfile/browser/extensionsResource",e)}),define(Q[3124],Y([2,3]),function(q,e){return q.create("vs/workbench/services/userDataProfile/browser/globalStateResource",e)}),define(Q[3125],Y([2,3]),function(q,e){return q.create("vs/workbench/services/userDataProfile/browser/keybindingsResource",e)}),define(Q[3126],Y([2,3]),function(q,e){return q.create("vs/workbench/services/userDataProfile/browser/settingsResource",e)}),define(Q[3127],Y([2,3]),function(q,e){return q.create("vs/workbench/services/userDataProfile/browser/snippetsResource",e)}),define(Q[3128],Y([2,3]),function(q,e){return q.create("vs/workbench/services/userDataProfile/browser/tasksResource",e)}),define(Q[3129],Y([2,3]),function(q,e){return q.create("vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService",e)}),define(Q[3130],Y([2,3]),function(q,e){return q.create("vs/workbench/services/userDataProfile/browser/userDataProfileManagement",e)}),define(Q[3131],Y([2,3]),function(q,e){return q.create("vs/workbench/services/userDataProfile/common/userDataProfile",e)}),define(Q[3132],Y([2,3]),function(q,e){return q.create("vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService",e)}),define(Q[3133],Y([2,3]),function(q,e){return q.create("vs/workbench/services/userDataSync/common/userDataSync",e)}),define(Q[3134],Y([2,3]),function(q,e){return q.create("vs/workbench/services/views/browser/viewDescriptorService",e)}),define(Q[3135],Y([2,3]),function(q,e){return q.create("vs/workbench/services/views/common/viewContainerModel",e)}),define(Q[3136],Y([2,3]),function(q,e){return q.create("vs/workbench/services/voiceRecognition/electron-sandbox/workbenchVoiceRecognitionService",e)}),define(Q[3137],Y([2,3]),function(q,e){return q.create("vs/workbench/services/workingCopy/common/fileWorkingCopyManager",e)}),define(Q[3138],Y([2,3]),function(q,e){return q.create("vs/workbench/services/workingCopy/common/storedFileWorkingCopy",e)}),define(Q[3139],Y([2,3]),function(q,e){return q.create("vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager",e)}),define(Q[3140],Y([2,3]),function(q,e){return q.create("vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant",e)}),define(Q[3141],Y([2,3]),function(q,e){return q.create("vs/workbench/services/workingCopy/common/workingCopyHistoryService",e)}),define(Q[3142],Y([2,3]),function(q,e){return q.create("vs/workbench/services/workingCopy/common/workingCopyHistoryTracker",e)}),define(Q[3143],Y([2,3]),function(q,e){return q.create("vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupService",e)}),define(Q[3144],Y([2,3]),function(q,e){return q.create("vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupTracker",e)}),define(Q[3145],Y([2,3]),function(q,e){return q.create("vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService",e)}),define(Q[3146],Y([2,3]),function(q,e){return q.create("vs/workbench/services/workspaces/browser/workspaceTrustEditorInput",e)}),define(Q[3147],Y([2,3]),function(q,e){return q.create("vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService",e)}),define(Q[844],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isICommandActionToggleInfo=void 0;function t(y){return y?y.condition!==void 0:!1}e.isICommandActionToggleInfo=t}),define(Q[81],Y([1,0,2442]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Categories=void 0,e.Categories=Object.freeze({View:{value:(0,t.localize)(0,null),original:"View"},Help:{value:(0,t.localize)(1,null),original:"Help"},Test:{value:(0,t.localize)(2,null),original:"Test"},File:{value:(0,t.localize)(3,null),original:"File"},Preferences:{value:(0,t.localize)(4,null),original:"Preferences"},Developer:{value:(0,t.localize)(5,null),original:"Developer"}})}),define(Q[3148],Y([1,0,18]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AssignmentFilterProvider=e.Filters=e.TargetPopulation=e.ASSIGNMENT_REFETCH_INTERVAL=e.ASSIGNMENT_STORAGE_KEY=void 0,e.ASSIGNMENT_STORAGE_KEY="VSCode.ABExp.FeatureData",e.ASSIGNMENT_REFETCH_INTERVAL=0;var y;(function(T){T.Insiders="insider",T.Public="public",T.Exploration="exploration"})(y||(e.TargetPopulation=y={}));var b;(function(T){T.Market="X-MSEdge-Market",T.CorpNet="X-FD-Corpnet",T.ApplicationVersion="X-VSCode-AppVersion",T.Build="X-VSCode-Build",T.ClientId="X-MSEdge-ClientId",T.ExtensionName="X-VSCode-ExtensionName",T.ExtensionVersion="X-VSCode-ExtensionVersion",T.Language="X-VSCode-Language",T.TargetPopulation="X-VSCode-TargetPopulation"})(b||(e.Filters=b={}));class D{constructor(f,v,m,S){this.version=f,this.appName=v,this.machineId=m,this.targetPopulation=S}getFilterValue(f){switch(f){case b.ApplicationVersion:return this.version;case b.Build:return this.appName;case b.ClientId:return this.machineId;case b.Language:return t.language;case b.ExtensionName:return"vscode-core";case b.ExtensionVersion:return"999999.0";case b.TargetPopulation:return this.targetPopulation;default:return""}}getFilters(){const f=new Map,v=Object.values(b);for(const m of v)f.set(m,this.getFilterValue(m));return f}}e.AssignmentFilterProvider=D}),define(Q[3149],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWorkspaceBackupInfo=e.isFolderBackupInfo=void 0;function t(b){return b&&b.hasOwnProperty("folderUri")}e.isFolderBackupInfo=t;function y(b){return b&&b.hasOwnProperty("workspace")}e.isWorkspaceBackupInfo=y}),define(Q[3150],Y([1,0,15,2455]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scanner=e.TokenType=void 0;var b;(function(m){m[m.LParen=0]="LParen",m[m.RParen=1]="RParen",m[m.Neg=2]="Neg",m[m.Eq=3]="Eq",m[m.NotEq=4]="NotEq",m[m.Lt=5]="Lt",m[m.LtEq=6]="LtEq",m[m.Gt=7]="Gt",m[m.GtEq=8]="GtEq",m[m.RegexOp=9]="RegexOp",m[m.RegexStr=10]="RegexStr",m[m.True=11]="True",m[m.False=12]="False",m[m.In=13]="In",m[m.Not=14]="Not",m[m.And=15]="And",m[m.Or=16]="Or",m[m.Str=17]="Str",m[m.QuotedStr=18]="QuotedStr",m[m.Error=19]="Error",m[m.EOF=20]="EOF"})(b||(e.TokenType=b={}));function D(...m){switch(m.length){case 1:return(0,y.localize)(0,null,m[0]);case 2:return(0,y.localize)(1,null,m[0],m[1]);case 3:return(0,y.localize)(2,null,m[0],m[1],m[2]);default:return}}const T=(0,y.localize)(3,null),f=(0,y.localize)(4,null);class v{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(S){switch(S.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return S.isTripleEq?"===":"==";case 4:return S.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return S.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return S.lexeme;case 18:return S.lexeme;case 19:return S.lexeme;case 20:return"EOF";default:throw(0,t.illegalState)(`unhandled token type: ${JSON.stringify(S)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map(S=>S.charCodeAt(0)))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}get errors(){return this._errors}reset(S){return this._input=S,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const h=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:h})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const h=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:h})}else this._match(126)?this._addToken(9):this._error(D("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(D("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(D("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(S){return this._isAtEnd()||this._input.charCodeAt(this._current)!==S?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(S){this._tokens.push({type:S,offset:this._start})}_error(S){const h=this._start,a=this._input.substring(this._start,this._current),r={type:19,offset:this._start,lexeme:a};this._errors.push({offset:h,lexeme:a,additionalInfo:S}),this._tokens.push(r)}_string(){this.stringRe.lastIndex=this._start;const S=this.stringRe.exec(this._input);if(S){this._current=this._start+S[0].length;const h=this._input.substring(this._start,this._current),a=v._keywords.get(h);a?this._addToken(a):this._tokens.push({type:17,lexeme:h,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(T);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let S=this._current,h=!1,a=!1;for(;;){if(S>=this._input.length){this._current=S,this._error(f);return}const i=this._input.charCodeAt(S);if(h)h=!1;else if(i===47&&!a){S++;break}else i===91?a=!0:i===92?h=!0:i===93&&(a=!1);S++}for(;S<this._input.length&&v._regexFlags.has(this._input.charCodeAt(S));)S++;this._current=S;const r=this._input.substring(this._start,this._current);this._tokens.push({type:10,lexeme:r,offset:this._start})}_isAtEnd(){return this._current>=this._input.length}}e.Scanner=v}),define(Q[3151],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostDebugChannelClient=e.ExtensionHostDebugBroadcastChannel=void 0;class b{constructor(){this._onCloseEmitter=new t.Emitter,this._onReloadEmitter=new t.Emitter,this._onTerminateEmitter=new t.Emitter,this._onAttachEmitter=new t.Emitter}static{this.ChannelName="extensionhostdebugservice"}call(f,v,m){switch(v){case"close":return Promise.resolve(this._onCloseEmitter.fire({sessionId:m[0]}));case"reload":return Promise.resolve(this._onReloadEmitter.fire({sessionId:m[0]}));case"terminate":return Promise.resolve(this._onTerminateEmitter.fire({sessionId:m[0]}));case"attach":return Promise.resolve(this._onAttachEmitter.fire({sessionId:m[0],port:m[1],subId:m[2]}))}throw new Error("Method not implemented.")}listen(f,v,m){switch(v){case"close":return this._onCloseEmitter.event;case"reload":return this._onReloadEmitter.event;case"terminate":return this._onTerminateEmitter.event;case"attach":return this._onAttachEmitter.event}throw new Error("Method not implemented.")}}e.ExtensionHostDebugBroadcastChannel=b;class D extends y.Disposable{constructor(f){super(),this.channel=f}reload(f){this.channel.call("reload",[f])}get onReload(){return this.channel.listen("reload")}close(f){this.channel.call("close",[f])}get onClose(){return this.channel.listen("close")}attachSession(f,v,m){this.channel.call("attach",[f,v,m])}get onAttachSession(){return this.channel.listen("attach")}terminateSession(f,v){this.channel.call("terminate",[f,v])}get onTerminateSession(){return this.channel.listen("terminate")}openExtensionDevelopmentHostWindow(f,v){return this.channel.call("openExtensionDevelopmentHostWindow",[f,v])}}e.ExtensionHostDebugChannelClient=D}),define(Q[208],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextEditorSelectionSource=e.TextEditorSelectionRevealType=e.EditorOpenSource=e.EditorResolution=e.EditorActivation=void 0;var t;(function(f){f[f.ACTIVATE=1]="ACTIVATE",f[f.RESTORE=2]="RESTORE",f[f.PRESERVE=3]="PRESERVE"})(t||(e.EditorActivation=t={}));var y;(function(f){f[f.PICK=0]="PICK",f[f.EXCLUSIVE_ONLY=1]="EXCLUSIVE_ONLY"})(y||(e.EditorResolution=y={}));var b;(function(f){f[f.API=0]="API",f[f.USER=1]="USER"})(b||(e.EditorOpenSource=b={}));var D;(function(f){f[f.Center=0]="Center",f[f.CenterIfOutsideViewport=1]="CenterIfOutsideViewport",f[f.NearTop=2]="NearTop",f[f.NearTopIfOutsideViewport=3]="NearTopIfOutsideViewport"})(D||(e.TextEditorSelectionRevealType=D={}));var T;(function(f){f.PROGRAMMATIC="api",f.NAVIGATION="code.navigation",f.JUMP="code.jump"})(T||(e.TextEditorSelectionSource=T={}))}),define(Q[845],Y([1,0,260,102,22,55,261,26,10]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDebugParams=e.parseExtensionHostDebugPort=e.AbstractNativeEnvironmentService=e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX=void 0,e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX=/^([^.]+\..+):(.+)$/;class m{get appRoot(){return(0,D.dirname)(b.FileAccess.asFileUri("").fsPath)}get userHome(){return v.URI.file(this.paths.homeDir)}get userDataPath(){return this.paths.userDataDir}get appSettingsHome(){return v.URI.file((0,D.join)(this.userDataPath,"User"))}get tmpDir(){return v.URI.file(this.paths.tmpDir)}get cacheHome(){return v.URI.file(this.userDataPath)}get stateResource(){return(0,f.joinPath)(this.appSettingsHome,"globalStorage","storage.json")}get userRoamingDataHome(){return this.appSettingsHome.with({scheme:b.Schemas.vscodeUserData})}get userDataSyncHome(){return(0,f.joinPath)(this.appSettingsHome,"sync")}get logsHome(){if(!this.args.logsPath){const r=(0,t.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"");this.args.logsPath=(0,D.join)(this.userDataPath,"logs",r)}return v.URI.file(this.args.logsPath)}get sync(){return this.args.sync}get machineSettingsResource(){return(0,f.joinPath)(v.URI.file((0,D.join)(this.userDataPath,"Machine")),"settings.json")}get workspaceStorageHome(){return(0,f.joinPath)(this.appSettingsHome,"workspaceStorage")}get localHistoryHome(){return(0,f.joinPath)(this.appSettingsHome,"History")}get keyboardLayoutResource(){return(0,f.joinPath)(this.userRoamingDataHome,"keyboardLayout.json")}get argvResource(){const r=T.env.VSCODE_PORTABLE;return r?v.URI.file((0,D.join)(r,"argv.json")):(0,f.joinPath)(this.userHome,this.productService.dataFolderName,"argv.json")}get isExtensionDevelopment(){return!!this.args.extensionDevelopmentPath}get untitledWorkspacesHome(){return v.URI.file((0,D.join)(this.userDataPath,"Workspaces"))}get builtinExtensionsPath(){const r=this.args["builtin-extensions-dir"];return r?(0,D.resolve)(r):(0,D.normalize)((0,D.join)(b.FileAccess.asFileUri("").fsPath,"..","extensions"))}get extensionsDownloadLocation(){const r=this.args["extensions-download-dir"];return r?v.URI.file((0,D.resolve)(r)):v.URI.file((0,D.join)(this.userDataPath,"CachedExtensionVSIXs"))}get extensionsPath(){const r=this.args["extensions-dir"];if(r)return(0,D.resolve)(r);const i=T.env.ADS_EXTENSIONS||T.env.VSCODE_EXTENSIONS;if(i)return i;const s=T.env.VSCODE_PORTABLE;return s?(0,D.join)(s,"extensions"):(0,f.joinPath)(this.userHome,this.productService.dataFolderName,"extensions").fsPath}get extensionDevelopmentLocationURI(){const r=this.args.extensionDevelopmentPath;if(Array.isArray(r))return r.map(i=>/^[^:/?#]+?:\/\//.test(i)?v.URI.parse(i):v.URI.file((0,D.normalize)(i)))}get extensionDevelopmentKind(){return this.args.extensionDevelopmentKind?.map(r=>r==="ui"||r==="workspace"||r==="web"?r:"workspace")}get extensionTestsLocationURI(){const r=this.args.extensionTestsPath;if(r)return/^[^:/?#]+?:\/\//.test(r)?v.URI.parse(r):v.URI.file((0,D.normalize)(r))}get disableExtensions(){if(this.args["disable-extensions"])return!0;const r=this.args["disable-extension"];if(r){if(typeof r=="string")return[r];if(Array.isArray(r)&&r.length>0)return r}return!1}get debugExtensionHost(){return S(this.args,this.isBuilt)}get debugRenderer(){return!!this.args.debugRenderer}get isBuilt(){return!T.env.VSCODE_DEV}get verbose(){return!!this.args.verbose}get logLevel(){return this.args.log?.find(r=>!e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.test(r))}get extensionLogLevel(){const r=[];for(const i of this.args.log||[]){const s=e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.exec(i);s&&s[1]&&s[2]&&r.push([s[1],s[2]])}return r.length?r:void 0}get serviceMachineIdResource(){return(0,f.joinPath)(v.URI.file(this.userDataPath),"machineid")}get crashReporterId(){return this.args["crash-reporter-id"]}get crashReporterDirectory(){return this.args["crash-reporter-directory"]}get disableTelemetry(){return!!this.args["disable-telemetry"]}get disableWorkspaceTrust(){return!!this.args["disable-workspace-trust"]}get disableKeytar(){return!!this.args["disable-keytar"]}get policyFile(){if(this.args["__enable-file-policy"]){const r=T.env.VSCODE_PORTABLE;return r?v.URI.file((0,D.join)(r,"policy.json")):(0,f.joinPath)(this.userHome,this.productService.dataFolderName,"policy.json")}}get continueOn(){return this.args.continueOn}set continueOn(r){this.args.continueOn=r}get args(){return this._args}constructor(r,i,s){this._args=r,this.paths=i,this.productService=s,this.editSessionId=this.args.editSessionId}}e.AbstractNativeEnvironmentService=m,fe([y.memoize],m.prototype,"appRoot",null),fe([y.memoize],m.prototype,"userHome",null),fe([y.memoize],m.prototype,"userDataPath",null),fe([y.memoize],m.prototype,"appSettingsHome",null),fe([y.memoize],m.prototype,"tmpDir",null),fe([y.memoize],m.prototype,"cacheHome",null),fe([y.memoize],m.prototype,"stateResource",null),fe([y.memoize],m.prototype,"userRoamingDataHome",null),fe([y.memoize],m.prototype,"userDataSyncHome",null),fe([y.memoize],m.prototype,"sync",null),fe([y.memoize],m.prototype,"machineSettingsResource",null),fe([y.memoize],m.prototype,"workspaceStorageHome",null),fe([y.memoize],m.prototype,"localHistoryHome",null),fe([y.memoize],m.prototype,"keyboardLayoutResource",null),fe([y.memoize],m.prototype,"argvResource",null),fe([y.memoize],m.prototype,"isExtensionDevelopment",null),fe([y.memoize],m.prototype,"untitledWorkspacesHome",null),fe([y.memoize],m.prototype,"builtinExtensionsPath",null),fe([y.memoize],m.prototype,"extensionsPath",null),fe([y.memoize],m.prototype,"extensionDevelopmentLocationURI",null),fe([y.memoize],m.prototype,"extensionDevelopmentKind",null),fe([y.memoize],m.prototype,"extensionTestsLocationURI",null),fe([y.memoize],m.prototype,"debugExtensionHost",null),fe([y.memoize],m.prototype,"logLevel",null),fe([y.memoize],m.prototype,"extensionLogLevel",null),fe([y.memoize],m.prototype,"serviceMachineIdResource",null),fe([y.memoize],m.prototype,"disableTelemetry",null),fe([y.memoize],m.prototype,"disableWorkspaceTrust",null),fe([y.memoize],m.prototype,"disableKeytar",null),fe([y.memoize],m.prototype,"policyFile",null);function S(a,r){return h(a["inspect-extensions"],a["inspect-brk-extensions"],5870,r,a.debugId,a.extensionEnvironment)}e.parseExtensionHostDebugPort=S;function h(a,r,i,s,o,u){const p=Number(r||a)||(s?null:i),c=p?!!r:!1;let l;if(u)try{l=JSON.parse(u)}catch{}return{port:p,break:c,debugId:o,env:l}}e.parseDebugParams=h}),define(Q[1136],Y([1,0,10]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRemotes=e.getDomainsOfRemotes=e.AllowedSecondLevelDomains=void 0;const y=/^([^@:]+@)?([^:]+):/,b=/^([^@:]+@)?([^:]+):(.+)$/,D=/^([^@]+@)?([^:]+)(:\d+)?$/,T=/([^@:.]+\.[^@:.]+)(:\d+)?$/,f=/^\s*url\s*=\s*(.+\S)\s*$/mg,v=/[^.]/g;e.AllowedSecondLevelDomains=["github.com","bitbucket.org","visualstudio.com","gitlab.com","heroku.com","azurewebsites.net","ibm.com","amazon.com","amazonaws.com","cloudapp.net","rhcloud.com","google.com","azure.com"];function m(o){const u=o.match(T);return u?u[1]:null}function S(o){if(o.indexOf("://")===-1){const u=o.match(y);return u?m(u[2]):null}try{const u=t.URI.parse(o);if(u.authority)return m(u.authority)}catch{}return null}function h(o,u){const d=new Set;let p;for(;p=f.exec(o);){const l=S(p[1]);l&&d.add(l)}const c=new Set(u);return Array.from(d).map(l=>c.has(l)?l:l.replace(v,"a"))}e.getDomainsOfRemotes=h;function a(o){const u=o.match(D);return u?u[2]:null}function r(o,u,d){return o&&u?(d&&u.endsWith(".git")&&(u=u.substr(0,u.length-4)),u.indexOf("/")===0?`${o}${u}`:`${o}/${u}`):null}function i(o,u){if(o.indexOf("://")===-1){const d=o.match(b);if(d)return r(d[2],d[3],u)}try{const d=t.URI.parse(o);if(d.authority)return r(a(d.authority),d.path,u)}catch{}return null}function s(o,u=!1){const d=[];let p;for(;p=f.exec(o);){const c=i(p[1],u);c&&d.push(c)}return d}e.getRemotes=s}),define(Q[1137],Y([1,0,17,2460]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.localizeManifest=void 0;function b(T,f,v){try{D(T,f,v)}catch(m){console.error(m?.message??m)}return T}e.localizeManifest=b;function D(T,f,v){const m=(S,h,a)=>{const r=S[h];if((0,t.isString)(r)){const i=r,s=i.length;if(s>1&&i[0]==="%"&&i[s-1]==="%"){const o=i.substr(1,s-2);let u=f[o];u===void 0&&v&&(u=v[o]);const d=typeof u=="string"?u:u?.message,p=v?.[o],c=typeof p=="string"?p:p?.message;if(!d){c||console.warn(`[${T.name}]: ${(0,y.localize)(0,null,o)}`);return}if(a&&(h==="title"||h==="category")&&c&&c!==d){const l={value:d,original:c};S[h]=l}else S[h]=d}}else if((0,t.isObject)(r))for(const i in r)r.hasOwnProperty(i)&&(i==="commands"?m(r,i,!0):m(r,i,a));else if(Array.isArray(r))for(let i=0;i<r.length;i++)m(r,i,a)};for(const S in T)T.hasOwnProperty(S)&&m(T,S)}}),define(Q[3152],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionRecommendationNotificationServiceChannel=e.ExtensionRecommendationNotificationServiceChannelClient=void 0;class t{constructor(D){this.channel=D}get ignoredRecommendations(){throw new Error("not supported")}promptImportantExtensionsInstallNotification(D){return this.channel.call("promptImportantExtensionsInstallNotification",[D])}promptWorkspaceRecommendations(D){throw new Error("not supported")}hasToIgnoreRecommendationNotifications(){throw new Error("not supported")}}e.ExtensionRecommendationNotificationServiceChannelClient=t;class y{constructor(D){this.service=D}listen(D,T){throw new Error(`Event not found: ${T}`)}call(D,T,f){switch(T){case"promptImportantExtensionsInstallNotification":return this.service.promptImportantExtensionsInstallNotification(f[0])}throw new Error(`Call not found: ${T}`)}}e.ExtensionRecommendationNotificationServiceChannel=y}),define(Q[846],Y([1,0,26,63,2462,406,228]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEngineValid=e.isValidExtensionVersion=e.validateExtensionManifest=e.isValidVersion=e.normalizeVersion=e.parseVersion=e.isValidVersionStr=void 0;const f=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/,v=/^-(\d{4})(\d{2})(\d{2})$/;function m(d){return d=d.trim(),d==="*"||f.test(d)}e.isValidVersionStr=m;function S(d){if(!m(d))return null;if(d=d.trim(),d==="*")return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};const p=d.match(f);return p?{hasCaret:p[1]==="^",hasGreaterEquals:p[1]===">=",majorBase:p[2]==="x"?0:parseInt(p[2],10),majorMustEqual:p[2]!=="x",minorBase:p[4]==="x"?0:parseInt(p[4],10),minorMustEqual:p[4]!=="x",patchBase:p[6]==="x"?0:parseInt(p[6],10),patchMustEqual:p[6]!=="x",preRelease:p[8]||null}:null}e.parseVersion=S;function h(d){if(!d)return null;const p=d.majorBase,c=d.majorMustEqual,l=d.minorBase;let n=d.minorMustEqual;const g=d.patchBase;let w=d.patchMustEqual;d.hasCaret&&(p===0||(n=!1),w=!1);let E=0;if(d.preRelease){const C=v.exec(d.preRelease);if(C){const[,I,_,A]=C;E=Date.UTC(Number(I),Number(_)-1,Number(A))}}return{majorBase:p,majorMustEqual:c,minorBase:l,minorMustEqual:n,patchBase:g,patchMustEqual:w,isMinimum:d.hasGreaterEquals,notBefore:E}}e.normalizeVersion=h;function a(d,p,c){let l;typeof d=="string"?l=h(S(d)):l=d;let n;p instanceof Date?n=p.getTime():typeof p=="string"&&(n=new Date(p).getTime());let g;if(typeof c=="string"?g=h(S(c)):g=c,!l||!g)return!1;const w=l.majorBase,E=l.minorBase,C=l.patchBase;let I=g.majorBase,_=g.minorBase,A=g.patchBase;const k=g.notBefore;let L=g.majorMustEqual,R=g.minorMustEqual,M=g.patchMustEqual;return g.isMinimum?w>I?!0:w<I?!1:E>_?!0:E<_||n&&n<k?!1:C>=A:(w===1&&I===0&&(!L||!R||!M)&&(I=1,_=0,A=0,L=!0,R=!1,M=!1),w<I?!1:w>I?!L:E<_?!1:E>_?!R:C<A?!1:C>A?!M:!(n&&n<k))}e.isValidVersion=a;function r(d,p,c,l,n,g){const w=[];if(typeof n.publisher<"u"&&typeof n.publisher!="string")return w.push([y.default.Error,b.localize(0,null)]),w;if(typeof n.name!="string")return w.push([y.default.Error,b.localize(1,null,"name")]),w;if(typeof n.version!="string")return w.push([y.default.Error,b.localize(2,null,"version")]),w;if(!n.engines)return w.push([y.default.Error,b.localize(3,null,"engines")]),w;if(typeof n.engines.vscode!="string")return w.push([y.default.Error,b.localize(4,null,"engines.vscode")]),w;if(typeof n.extensionDependencies<"u"&&!u(n.extensionDependencies))return w.push([y.default.Error,b.localize(5,null,"extensionDependencies")]),w;if(typeof n.activationEvents<"u"){if(!u(n.activationEvents))return w.push([y.default.Error,b.localize(6,null,"activationEvents")]),w;if(typeof n.main>"u"&&typeof n.browser>"u")return w.push([y.default.Error,b.localize(7,null,"activationEvents","main","browser")]),w}if(typeof n.extensionKind<"u"&&typeof n.main>"u"&&w.push([y.default.Warning,b.localize(8,null,"extensionKind")]),typeof n.main<"u"){if(typeof n.main!="string")return w.push([y.default.Error,b.localize(9,null,"main")]),w;{const I=(0,t.joinPath)(l,n.main);(0,t.isEqualOrParent)(I,l)||w.push([y.default.Warning,b.localize(10,null,I.path,l.path)])}}if(typeof n.browser<"u"){if(typeof n.browser!="string")return w.push([y.default.Error,b.localize(11,null,"browser")]),w;{const I=(0,t.joinPath)(l,n.browser);(0,t.isEqualOrParent)(I,l)||w.push([y.default.Warning,b.localize(12,null,I.path,l.path)])}}if(!D.valid(n.version))return w.push([y.default.Error,b.localize(13,null)]),w;const E=[];if(!i(d,p,c,n,g,E))for(const I of E)w.push([y.default.Error,I]);return w}e.validateExtensionManifest=r;function i(d,p,c,l,n,g){if(n||typeof l.main>"u"&&typeof l.browser>"u")return!0;const w=l.engines.azdata,E=l.engines.vscode,C=w?w==="*"||o(d,c,w,T.versionSyntax("engines.azdata",w),T.versionMismatch(d,w),g):!0,I=E?E==="*"||o(p,c,E,T.versionSyntax("engines.vscode",E),T.versionMismatchVsCode(d,E,p),g):!0;return C&&I}e.isValidExtensionVersion=i;function s(d,p,c){return d==="*"||o(p,c,d,"","")}e.isEngineValid=s;function o(d,p,c,l,n,g=[]){const w=h(S(c));return w?a(d,p,w)?!0:(g.push(n),!1):(g.push(l),!1)}function u(d){if(!Array.isArray(d))return!1;for(let p=0,c=d.length;p<c;p++)if(typeof d[p]!="string")return!1;return!0}}),define(Q[500],Y([1,0,62,59]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getServiceMachineId=void 0;async function b(D,T,f){let v=f&&f.get("storage.serviceMachineId",-1)||null;if(v)return v;try{const S=(await T.readFile(D.serviceMachineIdResource)).value.toString();v=(0,y.isUUID)(S)?S:null}catch{v=null}if(!v){v=(0,y.generateUuid)();try{await T.writeFile(D.serviceMachineIdResource,t.VSBuffer.fromString(v))}catch{}}return f?.store("storage.serviceMachineId",v,-1,1),v}e.getServiceMachineId=b}),define(Q[580],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebFileSystemAccess=void 0;var t;(function(y){function b(v){return typeof v?.showDirectoryPicker=="function"}y.supported=b;function D(v){const m=v;return m?typeof m.kind=="string"&&typeof m.queryPermission=="function"&&typeof m.requestPermission=="function":!1}y.isFileSystemHandle=D;function T(v){return v.kind==="file"}y.isFileSystemFileHandle=T;function f(v){return v.kind==="directory"}y.isFileSystemDirectoryHandle=f})(t||(e.WebFileSystemAccess=t={}))}),define(Q[501],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showHistoryKeybindingHint=void 0;function t(y){return y.lookupKeybinding("history.showPrevious")?.getElectronAccelerator()==="Up"&&y.lookupKeybinding("history.showNext")?.getElectronAccelerator()==="Down"}e.showHistoryKeybindingHint=t}),define(Q[94],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class t{constructor(b,D=[],T=!1){this.ctor=b,this.staticArguments=D,this.supportsDelayedInstantiation=T}}e.SyncDescriptor=t}),define(Q[35],Y([1,0,94]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=e.InstantiationType=void 0;const y=[];var b;(function(f){f[f.Eager=0]="Eager",f[f.Delayed=1]="Delayed"})(b||(e.InstantiationType=b={}));function D(f,v,m){v instanceof t.SyncDescriptor||(v=new t.SyncDescriptor(v,[],!!m)),y.push([f,v])}e.registerSingleton=D;function T(){return y}e.getSingletonServiceDescriptors=T}),define(Q[3153],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class t{constructor(D,T){this.key=D,this.data=T,this.incoming=new Map,this.outgoing=new Map}}e.Node=t;class y{constructor(D){this._hashFn=D,this._nodes=new Map}roots(){const D=[];for(const T of this._nodes.values())T.outgoing.size===0&&D.push(T);return D}insertEdge(D,T){const f=this.lookupOrInsertNode(D),v=this.lookupOrInsertNode(T);f.outgoing.set(v.key,v),v.incoming.set(f.key,f)}removeNode(D){const T=this._hashFn(D);this._nodes.delete(T);for(const f of this._nodes.values())f.outgoing.delete(T),f.incoming.delete(T)}lookupOrInsertNode(D){const T=this._hashFn(D);let f=this._nodes.get(T);return f||(f=new t(T,D),this._nodes.set(T,f)),f}lookup(D){return this._nodes.get(this._hashFn(D))}isEmpty(){return this._nodes.size===0}toString(){const D=[];for(const[T,f]of this._nodes)D.push(`${T} (-> incoming)[${[...f.incoming.keys()].join(", ")}] (outgoing ->)[${[...f.outgoing.keys()].join(",")}] `);return D.join(` `)}findCycleSlow(){for(const[D,T]of this._nodes){const f=new Set([D]),v=this._findCycle(T,f);if(v)return v}}_findCycle(D,T){for(const[f,v]of D.outgoing){if(T.has(f))return[...T,f].join(" -> ");T.add(f);const m=this._findCycle(v,T);if(m)return m;T.delete(f)}}}e.Graph=y}),define(Q[5],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.refineServiceDecorator=e.createDecorator=e.IInstantiationService=e._util=void 0;var t;(function(T){T.serviceIds=new Map,T.DI_TARGET="$di$target",T.DI_DEPENDENCIES="$di$dependencies";function f(v){return v[T.DI_DEPENDENCIES]||[]}T.getServiceDependencies=f})(t||(e._util=t={})),e.IInstantiationService=b("instantiationService");function y(T,f,v){f[t.DI_TARGET]===f?f[t.DI_DEPENDENCIES].push({id:T,index:v}):(f[t.DI_DEPENDENCIES]=[{id:T,index:v}],f[t.DI_TARGET]=f)}function b(T){if(t.serviceIds.has(T))return t.serviceIds.get(T);const f=function(v,m,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");y(f,v,S)};return f.toString=()=>T,t.serviceIds.set(T,f),f}e.createDecorator=b;function D(T){return T}e.refineServiceDecorator=D}),define(Q[262],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IAccountManagementService=e.SERVICE_ID=void 0,e.SERVICE_ID="accountManagementService",e.IAccountManagementService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[3154],Y([1,0,6,262]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccountPickerViewModel=void 0;let b=class{get updateAccountListEvent(){return this._updateAccountListEmitter.event}constructor(T){this._accountManagementService=T,this._updateAccountListEmitter=new t.Emitter,this._accountManagementService.updateAccountListEvent(f=>this._updateAccountListEmitter.fire(f))}async initialize(){try{return await this._accountManagementService.getAccounts()}catch{return[]}}};e.AccountPickerViewModel=b,e.AccountPickerViewModel=b=fe([O(0,y.IAccountManagementService)],b)}),define(Q[326],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AngularEventType=e.IAngularEventingService=void 0;const y="angularEventingService";e.IAngularEventingService=(0,t.createDecorator)(y);var b;(function(D){D[D.NAV_DATABASE=0]="NAV_DATABASE",D[D.NAV_SERVER=1]="NAV_SERVER",D[D.DELETE_WIDGET=2]="DELETE_WIDGET",D[D.PINUNPIN_TAB=3]="PINUNPIN_TAB",D[D.NEW_TABS=4]="NEW_TABS",D[D.CLOSE_TAB=5]="CLOSE_TAB",D[D.COLLAPSE_WIDGET=6]="COLLAPSE_WIDGET"})(b||(e.AngularEventType=b={}))}),define(Q[847],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IAzureAccountService=e.SERVICE_ID=void 0,e.SERVICE_ID="azureAccountService",e.IAzureAccountService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[679],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IAzureBlobService=e.SERVICE_ID=void 0,e.SERVICE_ID="azureBlobService",e.IAzureBlobService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[581],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBackupService=e.SERVICE_ID=e.TaskExecutionMode=void 0;var y;(function(b){b[b.execute=0]="execute",b[b.script=1]="script",b[b.executeAndScript=2]="executeAndScript"})(y||(e.TaskExecutionMode=y={})),e.SERVICE_ID="backupService",e.IBackupService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[107],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICapabilitiesService=e.ConnectionProviderAndExtensionMap=e.clientCapabilities=e.HOST_VERSION=e.HOST_NAME=e.SERVICE_ID=void 0,e.SERVICE_ID="capabilitiesService",e.HOST_NAME="azdata",e.HOST_VERSION="1.0",e.clientCapabilities={hostName:e.HOST_NAME,hostVersion:e.HOST_VERSION},e.ConnectionProviderAndExtensionMap=new Map([["PGSQL","microsoft.azuredatastudio-postgresql"],["KUSTO","microsoft.kusto"],["LOGANALYTICS","microsoft.azuremonitor"],["COSMOSDB_MONGO","microsoft.azure-cosmosdb-ads-extension"],["COSMOSDB_NOSQL","microsoft.azure-cosmosdb-ads-extension"],["MySQL","microsoft.azuredatastudio-mysql"]]),e.ICapabilitiesService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[3155],Y([1,0,6,4,773,107]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CapabilitiesService=void 0;class T extends y.Disposable{constructor(){super(...arguments),this._providers=new Map,this._legacyProviders=new Map,this._onCapabilitiesRegistered=this._register(new t.Emitter),this.onCapabilitiesRegistered=this._onCapabilitiesRegistered.event,this._onCapabilitiesUnregistered=this._register(new t.Emitter),this.onCapabilitiesUnregistered=this._onCapabilitiesUnregistered.event}handleConnectionProvider(v,m){let S=this._providers.get(v);S?S.connection=m:(S={connection:m},this._providers.set(v,S)),S.connection.isQueryProvider=S.connection.isQueryProvider!==!1,S.connection.connectionStringOptions={isEnabled:!!S.connection.connectionStringOptions?.isEnabled,isDefault:!!S.connection.connectionStringOptions?.isDefault},this._onCapabilitiesRegistered.fire({id:v,features:S})}getCapabilities(v){return this._providers.get(v)}getLegacyCapabilities(v){return this._legacyProviders.get(v)}get providers(){return(0,b.toObject)(this._providers)}registerProvider(v){v.getServerCapabilities(D.clientCapabilities).then(m=>{this._legacyProviders.set(m.providerName,m)})}registerConnectionProvider(v,m){return this.handleConnectionProvider(v,m),(0,y.toDisposable)(()=>{this._providers.delete(v),this._onCapabilitiesUnregistered.fire(v)})}}e.CapabilitiesService=T}),define(Q[263],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IClipboardService=void 0,e.IClipboardService=(0,t.createDecorator)("sqlclipboardService")}),define(Q[58],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskStatus=e.MetadataType=e.ConnectionType=e.RunQueryOnConnectionMode=e.IConnectionManagementService=e.SERVICE_ID=void 0,e.SERVICE_ID="connectionManagementService",e.IConnectionManagementService=(0,t.createDecorator)(e.SERVICE_ID);var y;(function(f){f[f.none=0]="none",f[f.executeQuery=1]="executeQuery",f[f.executeCurrentQuery=2]="executeCurrentQuery",f[f.estimatedQueryPlan=3]="estimatedQueryPlan",f[f.actualQueryPlan=4]="actualQueryPlan"})(y||(e.RunQueryOnConnectionMode=y={}));var b;(function(f){f[f.default=0]="default",f[f.editor=1]="editor",f[f.temporary=2]="temporary"})(b||(e.ConnectionType=b={}));var D;(function(f){f[f.Table=0]="Table",f[f.View=1]="View",f[f.SProc=2]="SProc",f[f.Function=3]="Function"})(D||(e.MetadataType=D={}));var T;(function(f){f[f.NotStarted=0]="NotStarted",f[f.InProgress=1]="InProgress",f[f.Succeeded=2]="Succeeded",f[f.SucceededWithWarning=3]="SucceededWithWarning",f[f.Failed=4]="Failed",f[f.Canceled=5]="Canceled",f[f.Canceling=6]="Canceling"})(T||(e.TaskStatus=T={}))}),define(Q[848],Y([1,0,5,183]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CredentialsService=e.ICredentialsService=e.SERVICE_ID=void 0,e.SERVICE_ID="sqlCredentialsService",e.ICredentialsService=(0,t.createDecorator)(e.SERVICE_ID);class b{constructor(){this._serverEvents=Object.create(null),this._onServerEventsReady=new y.Deferred}addEventListener(T,f){return this._lastHandle=T,this._serverEvents[T]=f,this._onServerEventsReady.resolve(),{dispose:()=>{}}}saveCredential(T,f){return this._onServerEventsReady.promise.then(()=>this._serverEvents[this._lastHandle].onSaveCredential(T,f))}readCredential(T){return this._onServerEventsReady.promise.then(()=>this._serverEvents[this._lastHandle].onReadCredential(T))}deleteCredential(T){return this._onServerEventsReady.promise.then(()=>this._serverEvents[this._lastHandle].onDeleteCredential(T))}}e.CredentialsService=b}),define(Q[284],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDashboardService=void 0,e.IDashboardService=(0,t.createDecorator)("dashboardService")}),define(Q[680],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDashboardViewService=e.SERVICE_ID=void 0,e.SERVICE_ID="dashboardViewService",e.IDashboardViewService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[188],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IErrorMessageService=void 0,e.IErrorMessageService=(0,t.createDecorator)("errorMessageService")}),define(Q[681],Y([1,0,5,58]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataService=e.IMetadataService=e.SERVICE_ID=void 0,e.SERVICE_ID="metadataService",e.IMetadataService=(0,t.createDecorator)(e.SERVICE_ID);let b=class{constructor(T){this._connectionService=T,this._providers=Object.create(null)}getMetadata(T){let f=this._connectionService.getProviderIdFromUri(T);if(f){let v=this._providers[f];if(v)return v.getMetadata(T)}return Promise.resolve(void 0)}getDatabases(T){let f=this._connectionService.getProviderIdFromUri(T);if(f){let v=this._providers[f];if(v)return v.getDatabases(T)}return Promise.resolve([])}getTableInfo(T,f){let v=this._connectionService.getProviderIdFromUri(T);if(v){let m=this._providers[v];if(m)return m.getTableInfo(T,f)}return Promise.resolve(void 0)}getViewInfo(T,f){let v=this._connectionService.getProviderIdFromUri(T);if(v){let m=this._providers[v];if(m)return m.getViewInfo(T,f)}return Promise.resolve(void 0)}registerProvider(T,f){this._providers[T]=f}};e.MetadataService=b,e.MetadataService=b=fe([O(0,y.IConnectionManagementService)],b)}),define(Q[849],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IModelViewService=e.SERVICE_ID=void 0,e.SERVICE_ID="modelViewService",e.IModelViewService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[3156],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISqlOAuthService=void 0,e.ISqlOAuthService=(0,t.createDecorator)("sqlOAuthService")}),define(Q[850],Y([1,0,5,58,107,1946,15]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SerializationService=e.ISerializationService=e.SERVICE_ID=void 0,e.SERVICE_ID="serializationService",e.ISerializationService=(0,t.createDecorator)(e.SERVICE_ID);const f=(0,D.localize)(0,null),v=500;function m(h,a){let r=h-a;return v<r?v:r}let S=class{constructor(a,r){this._connectionService=a,this._capabilitiesService=r,this.providers=[]}isProviderRegistered(a){return this.providers.find(r=>r.providerId.toUpperCase()===a.toUpperCase())!==void 0}registerProvider(a,r){this.providers.push({providerId:a,provider:r})}hasProvider(){return this.providers.length>0}saveAs(a,r,i,s){return Promise.reject(new Error(f))}disabledSaveAs(){return Promise.resolve({messages:f})}getSaveResultsFeatureMetadataProvider(a){let r=this._connectionService.getProviderIdFromUri(a),i=this._capabilitiesService.getLegacyCapabilities(r);if(i)return i.features.find(s=>s.featureName===e.SERVICE_ID)}async serializeResults(a){if(!a)throw new Error("request data for serialization is missing");if(!this.hasProvider())return{messages:(0,D.localize)(1,null),succeeded:!1};try{let r=this.providers.find(u=>u.providerId===a.serializationProviderId)?.provider;if(!r)return{messages:(0,D.localize)(2,null,a.serializationProviderId),succeeded:!1};let i=0,s=this.createStartRequest(a,i);i=i+s.rows.length;let o=await r.startSerialization(s);if(!o)return{messages:(0,D.localize)(3,null),succeeded:!1};if(!o.succeeded)return o;for(;i<a.rowCount;){let u=this.createContinueRequest(a,i);i+=u.rows.length;let d=await r.continueSerialization(u);if(!d.succeeded)return d}return{messages:void 0,succeeded:!0}}catch(r){return{messages:(0,T.getErrorMessage)(r),succeeded:!1}}}createStartRequest(a,r){let i=m(a.rowCount,r),s=a.getRowRange(r,a.includeHeaders??!1,i),o=a.columns.map(p=>({name:p.columnName,dataTypeName:"NVarChar"})),u=r+s.length>=a.rowCount;return{saveFormat:a.saveFormat,filePath:a.filePath,columns:o,rows:s,isLastBatch:u,delimiter:a.delimiter,encoding:a.encoding,formatted:a.formatted,includeHeaders:a.includeHeaders,lineSeperator:a.lineSeperator,textIdentifier:a.textIdentifier}}createContinueRequest(a,r){let i=m(a.rowCount,r),s=a.getRowRange(r,!1,i),o=r+s.length>=a.rowCount;return{filePath:a.filePath,rows:s,isLastBatch:o}}};e.SerializationService=S,e.SerializationService=S=fe([O(0,y.IConnectionManagementService),O(1,b.ICapabilitiesService)],S)}),define(Q[682],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IServerGroupController=void 0,e.IServerGroupController=(0,t.createDecorator)("serverGroupController")}),define(Q[76],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IAdsTelemetryService=void 0,e.IAdsTelemetryService=(0,t.createDecorator)("adsTelemetryService")}),define(Q[3157],Y([1,0,58,363,76]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackupService=void 0;let D=class{constructor(f,v){this._connectionService=f,this._telemetryService=v,this._providers=Object.create(null)}getBackupConfigInfo(f){let v=this._connectionService.getProviderIdFromUri(f);if(v){let m=this._providers[v];if(m)return Promise.resolve(m.getBackupConfigInfo(f))}return Promise.resolve(void 0)}backup(f,v,m){return new Promise((S,h)=>{const a=this.getProvider(f);a?(this._telemetryService.createActionEvent("Shell","BackupCreated").withAdditionalProperties({providerId:a.providerName}).send(),a.provider.backup(f,v,m).then(r=>{S(r)},r=>{h(r)})):h((0,y.invalidProvider)())})}getProvider(f){let v=this._connectionService.getProviderIdFromUri(f);if(v)return{provider:this._providers[v],providerName:v}}registerProvider(f,v){this._providers[f]=v}};e.BackupService=D,e.BackupService=D=fe([O(0,t.IConnectionManagementService),O(1,b.IAdsTelemetryService)],D)}),define(Q[851],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBackupUiService=e.UI_SERVICE_ID=void 0,e.UI_SERVICE_ID="backupUiService",e.IBackupUiService=(0,t.createDecorator)(e.UI_SERVICE_ID)}),define(Q[3158],Y([1,0,58]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerFilter=void 0;class y{constructor(D,T){this.context=D,this.targetProperties=T}filter(D,T){if(D){let f;if(this.context==="database"&&D.indexOf(":")>-1){const v=D.split(":");switch(v.length>2?D=v.slice(1,v.length-1).join(":"):D=v[1],v[0].toLowerCase()){case"v":f=t.MetadataType.View;break;case"t":f=t.MetadataType.Table;break;case"sp":f=t.MetadataType.SProc;break;case"f":f=t.MetadataType.Function;break;default:break}}return T.filter(v=>{if(f!==void 0&&v.metadataType!==f)return!1;let m=!1;for(let S=0;S<this.targetProperties.length;S++){const h=this.targetProperties[S],a=v[h];if(v[h]&&typeof a=="string"&&a.toLowerCase().indexOf(D.toLowerCase())!==-1){m=!0;break}}return m})}else return T}}e.ExplorerFilter=y}),define(Q[1138],Y([1,0,58,2029]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerView=e.NameProperty=void 0,e.NameProperty="name";const b=y.localize(0,null);class D{constructor(f){this.context=f}getPropertyList(f){let v;return this.context==="database"?f&&f.objectsListProperties&&f.objectsListProperties.length>0?v=f.objectsListProperties:v=[{displayName:b,value:e.NameProperty,widthWeight:60},{displayName:y.localize(1,null),value:"schema",widthWeight:20},{displayName:y.localize(2,null),value:"metadataTypeName",widthWeight:20}]:f&&f.databasesListProperties&&f.databasesListProperties.length>0?v=f.databasesListProperties:v=[{displayName:b,value:e.NameProperty,widthWeight:80}],v}getIconClass(f){if(this.context==="database"){let v;switch(f.metadataType){case t.MetadataType.Function:v="scalarvaluedfunction";break;case t.MetadataType.SProc:v="storedprocedure";break;case t.MetadataType.Table:v="table";break;case t.MetadataType.View:v="view";break}return v}else return"database-colored"}}e.ExplorerView=D}),define(Q[1139],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IAccountPickerService=void 0,e.IAccountPickerService=(0,t.createDecorator)("AccountPickerService")}),define(Q[683],Y([1,0,2175,5,58]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AdminService=e.IAdminService=e.SERVICE_ID=void 0,e.SERVICE_ID="adminService",e.IAdminService=(0,y.createDecorator)(e.SERVICE_ID);let D=class{constructor(f){this._connectionService=f,this._providers=Object.create(null)}_runAction(f,v){let m=this._connectionService.getProviderIdFromUri(f);if(!m)return Promise.reject(new Error((0,t.localize)(0,null)));let S=this._providers[m];return S?v(S):Promise.reject(new Error((0,t.localize)(1,null)))}getDefaultDatabaseInfo(f){let v=this._connectionService.getProviderIdFromUri(f);if(v){let m=this._providers[v];if(m)return m.getDefaultDatabaseInfo(f)}return Promise.resolve(void 0)}getDatabaseInfo(f){return this._runAction(f,v=>v.getDatabaseInfo(f))}registerProvider(f,v){this._providers[f]=v}};e.AdminService=D,e.AdminService=D=fe([O(0,b.IConnectionManagementService)],D)}),define(Q[3159],Y([1,0,2176,6,58]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AssessmentService=void 0;let D=class{constructor(f){this._connectionService=f,this._onDidChange=new y.Emitter,this.onDidChange=this._onDidChange.event,this._providers=Object.create(null)}getAssessmentItems(f,v){return this._runAction(f,m=>m.getAssessmentItems(f,v))}assessmentInvoke(f,v){return this._runAction(f,m=>m.assessmentInvoke(f,v))}generateAssessmentScript(f,v){return this._runAction(f,m=>m.generateAssessmentScript(v))}registerProvider(f,v){this._providers[f]=v}_runAction(f,v){let m=this._connectionService.getProviderIdFromUri(f);if(!m)return Promise.reject(new Error((0,t.localize)(0,null)));let S=this._providers[m];return S?v(S):Promise.reject(new Error((0,t.localize)(1,null)))}};e.AssessmentService=D,e.AssessmentService=D=fe([O(0,b.IConnectionManagementService)],D)}),define(Q[852],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IAssessmentService=e.SERVICE_ID=void 0,e.SERVICE_ID="assessmentService",e.IAssessmentService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[684],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBackupRestoreUrlBrowserDialogService=void 0,e.IBackupRestoreUrlBrowserDialogService=(0,t.createDecorator)("backupRestoreUrlBrowserDialogService")}),define(Q[502],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IConnectionDialogService=void 0,e.IConnectionDialogService=(0,t.createDecorator)("connectionDialogService")}),define(Q[853],Y([1,0,4,35,5,6]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionTreeService=e.IConnectionTreeService=void 0,e.IConnectionTreeService=(0,b.createDecorator)("connectionTreeService");class T{constructor(){this._onDidAddProvider=new D.Emitter,this.onDidAddProvider=this._onDidAddProvider.event,this._onDidRemoveProvider=new D.Emitter,this.onDidRemoveProvider=this._onDidRemoveProvider.event,this._providers=new Map,this._descriptors=new Set}registerTreeProvider(v,m){return this._providers.set(v,m),this._onDidAddProvider.fire(m),(0,t.toDisposable)(()=>{this._providers.delete(v),this._onDidRemoveProvider.fire()})}registerTreeDescriptor(v){return this._descriptors.add(v),(0,t.toDisposable)(()=>{this._descriptors.delete(v)})}get descriptors(){return this._descriptors.values()}get providers(){return this._providers.entries()}get view(){return this._view}setView(v){this._view=v}}e.ConnectionTreeService=T,(0,y.registerSingleton)(e.IConnectionTreeService,T,1)}),define(Q[582],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IServerContextualizationService=e.SERVICE_ID=void 0,e.SERVICE_ID="serverContextualizationService",e.IServerContextualizationService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[1140],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INewDashboardTabDialogService=void 0,e.INewDashboardTabDialogService=(0,t.createDecorator)("addNewDashboardTabService")}),define(Q[854],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDataGridProviderService=e.SERVICE_ID=void 0,e.SERVICE_ID="dataGridProviderService",e.IDataGridProviderService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[855],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IErrorDiagnosticsService=e.SERVICE_ID=void 0,e.SERVICE_ID="errorDiagnosticsService",e.IErrorDiagnosticsService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[450],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExecutionPlanService=e.SERVICE_ID=void 0,e.SERVICE_ID="executionPlanService",e.IExecutionPlanService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[685],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IFileBrowserDialogController=void 0,e.IFileBrowserDialogController=(0,t.createDecorator)("fileBrowserDialogService")}),define(Q[3160],Y([1,0,58,788,188,6,63,2202,33,363]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.FileBrowserService=void 0;let h=class{static{S=this}static{this.fileNodeId=0}constructor(r,i){this._connectionService=r,this._errorMessageService=i,this._providers=Object.create(null),this._onAddFileTree=new D.Emitter,this._onExpandFolder=new D.Emitter,this._onPathValidate=new D.Emitter,this._pathToFileNodeMap={},this._expandResolveMap={}}registerProvider(r,i){this._providers[r]=i}get onAddFileTree(){return this._onAddFileTree.event}get onExpandFolder(){return this._onExpandFolder.event}get onPathValidate(){return this._onPathValidate.event}openFileBrowser(r,i,s,o,u){return new Promise((d,p)=>{const c=this.getProvider(r);c?c.openFileBrowser(r,i,s,o,u).then(l=>{d(l)},l=>{p(l)}):p((0,m.invalidProvider)())})}onFileBrowserOpened(r,i){if(i.succeeded===!0&&i.fileTree&&i.fileTree.rootNode&&i.fileTree.selectedNode){let s=this.convertFileTree(void 0,i.fileTree.rootNode,i.fileTree.selectedNode.fullPath,i.ownerUri);this._onAddFileTree.fire({rootNode:s.rootNode,selectedNode:s.selectedNode,expandedNodes:s.expandedNodes})}else{let s=(0,f.localize)(0,null),o=(0,f.localize)(1,null),u=v.isFalsyOrWhitespace(i.message)?s:i.message;this._errorMessageService.showDialog(T.default.Error,o,u)}}expandFolderNode(r){this._pathToFileNodeMap[r.fullPath]=r;let i=this;return new Promise((s,o)=>{const u=this.getProvider(r.ownerUri);u?u.expandFolderNode(r.ownerUri,r.fullPath).then(d=>{let p=i.generateResolveMapKey(r.ownerUri,r.fullPath);i._expandResolveMap[p]=s},d=>{o(d)}):o((0,m.invalidProvider)())})}onFolderNodeExpanded(r,i){let s=this.generateResolveMapKey(i.ownerUri,i.expandPath),o=this._expandResolveMap[s];if(o)if(i.succeeded===!0){let u=this._pathToFileNodeMap[i.expandPath];u?(i.children&&i.children.length>0&&(u.children=this.convertChildren(u,i.children,i.ownerUri)),o(u.children?u.children:[]),this._onExpandFolder.fire(u)):o([])}else o([])}validateFilePaths(r,i,s){return new Promise((o,u)=>{const d=this.getProvider(r);d?d.validateFilePaths(r,i,s).then(p=>{o(p)},p=>{u(p)}):u((0,m.invalidProvider)())})}onFilePathsValidated(r,i){this._onPathValidate.fire(i)}closeFileBrowser(r){let i=this.getProvider(r);return i?Promise.resolve(i.closeFileBrowser(r)):Promise.resolve(void 0)}generateResolveMapKey(r,i){return r+":"+i}getProvider(r){let i=this._connectionService.getProviderIdFromUri(r);if(i)return this._providers[i]}convertFileTree(r,i,s,o){S.fileNodeId+=1;let u=[],d,p=new y.FileNode(S.fileNodeId.toString(),i.name,i.fullPath,i.isFile,i.isExpanded,o,r);if(p.isExpanded===!0&&u.push(p),i.children){let c=[];for(let l=0;l<i.children.length;l++){let n=this.convertFileTree(p,i.children[l],s,o);c.push(n.rootNode),n.expandedNodes.length>0&&(u=u.concat(n.expandedNodes)),n.selectedNode&&(d=n.selectedNode)}c.length>0&&(p.children=c)}return!d&&i.fullPath===s&&(d=p),i.isFile===!1&&(p.hasChildren=!0),{rootNode:p,selectedNode:d,expandedNodes:u}}convertChildren(r,i,s){let o=[];for(let u=0;u<i.length;u++){S.fileNodeId+=1;let d=new y.FileNode(S.fileNodeId.toString(),i[u].name,i[u].fullPath,i[u].isFile,i[u].isExpanded,s,r);i[u].isFile===!1&&(d.hasChildren=!0),o.push(d)}return o}};e.FileBrowserService=h,e.FileBrowserService=h=S=fe([O(0,t.IConnectionManagementService),O(1,b.IErrorMessageService)],h)}),define(Q[583],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IFileBrowserService=void 0,e.IFileBrowserService=(0,t.createDecorator)("fileBrowserService")}),define(Q[3161],Y([1,0,583,788]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileBrowserDataSource=void 0;let b=class{constructor(T){this._fileBrowserService=T}getId(T,f){if(f instanceof y.FileNode)return f.id}hasChildren(T,f){return f instanceof y.FileNode?f.hasChildren:!1}getChildren(T,f){return new Promise(v=>{if(f instanceof y.FileNode){let m=f;m.children?v(m.children):this._fileBrowserService.expandFolderNode(m).then(S=>{v(S)},S=>{v([])})}else v([])})}getParent(T,f){return Promise.resolve(null)}};e.FileBrowserDataSource=b,e.FileBrowserDataSource=b=fe([O(0,t.IFileBrowserService)],b)}),define(Q[1141],Y([1,0,583,2203,15]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileBrowserViewModel=void 0;let D=class{constructor(f){this._fileBrowserService=f}onAddFileTree(f){this._fileBrowserService.onAddFileTree(v=>f(v))}onPathValidate(f){this._fileBrowserService.onPathValidate(v=>f(v))}get showFoldersOnly(){return this._showFoldersOnly}initialize(f,v,m,S,h){this._ownerUri=f,this._expandPath=v,this._fileValidationServiceType=S,this._showFoldersOnly=!!h,m?this._fileFilters=m:this._fileFilters=[{label:(0,y.localize)(0,null),filters:["*"]}],this.formattedFileFilters=[];for(let a=0;a<this._fileFilters.length;a++){let r=this._fileFilters[a].label+"("+this._fileFilters[a].filters.join(";")+")";this.formattedFileFilters.push(r)}}async validateFilePaths(f){return this._fileBrowserService.validateFilePaths(this._ownerUri,this._fileValidationServiceType,f)}async openFileBrowser(f,v){this._fileFilters[f]&&await this._fileBrowserService.openFileBrowser(this._ownerUri,this._expandPath,this._fileFilters[f].filters,v,this._showFoldersOnly)}async closeFileBrowser(){await this._fileBrowserService.closeFileBrowser(this._ownerUri).catch(f=>(0,b.onUnexpectedError)(f))}};e.FileBrowserViewModel=D,e.FileBrowserViewModel=D=fe([O(0,t.IFileBrowserService)],D)}),define(Q[856],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.insertValueRegex=e.IInsightsDialogService=void 0,e.IInsightsDialogService=(0,t.createDecorator)("insightsDialogService"),e.insertValueRegex=/\${(.*?)\}/}),define(Q[307],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IJobManagementService=e.SERVICE_ID=void 0,e.SERVICE_ID="jobManagementService",e.IJobManagementService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[407],Y([1,0,2077,40,497,307,483]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AgentViewComponent=e.DASHBOARD_SELECTOR=void 0,e.DASHBOARD_SELECTOR="agentview-component";let T=class{constructor(v,m){this._cd=v,this._showHistory=!1,this._showNotebookHistory=!1,this._jobId=null,this._notebookId=null,this._agentJobInfo=null,this._agentNotebookInfo=null,this._refresh=void 0,this.jobsIconClass="jobsview-icon",this.notebooksIconClass="notebooksview-icon",this.alertsIconClass="alertsview-icon",this.proxiesIconClass="proxiesview-icon",this.operatorsIconClass="operatorsview-icon",this.jobsComponentTitle=t.localize(0,null),this.notebooksComponentTitle=t.localize(1,null),this.alertsComponentTitle=t.localize(2,null),this.proxiesComponentTitle=t.localize(3,null),this.operatorsComponentTitle=t.localize(4,null),this.panelOpt={alwaysShowTabs:!0,layout:b.NavigationBarLayout.horizontal,showIcon:!0},this._expanded=new Map;let S=this;m.onDidChange(h=>{S.refresh=!0,S._cd.detectChanges()})}get jobId(){return this._jobId}get notebookId(){return this._notebookId}get showHistory(){return this._showHistory}get showNotebookHistory(){return this._showNotebookHistory}get agentJobInfo(){return this._agentJobInfo}get agentNotebookInfo(){return this._agentNotebookInfo}get refresh(){return this._refresh}get expanded(){return this._expanded}get expandedNotebook(){return this._expandedNotebook}set jobId(v){this._jobId=v}set notebookId(v){this._notebookId=v}set showHistory(v){this._showHistory=v,this._cd.detectChanges()}set showNotebookHistory(v){this._showNotebookHistory=v,this._cd.detectChanges()}set agentJobInfo(v){this._agentJobInfo=v}set agentNotebookInfo(v){this._agentNotebookInfo=v}set refresh(v){this._refresh=v,this._cd.detectChanges()}setExpanded(v,m){this._expanded.set(v,m)}setExpandedNotebook(v,m){this._expandedNotebook.set(v,m)}set expanded(v){this._expanded=v}set expandedNotebook(v){this._expandedNotebook=v}layout(){this._panel.layout()}};e.AgentViewComponent=T,fe([(0,y.ViewChild)(b.PanelComponent)],T.prototype,"_panel",void 0),e.AgentViewComponent=T=fe([(0,y.Component)({selector:e.DASHBOARD_SELECTOR,templateUrl:decodeURI(q.toUrl("./agentView.component.html"))}),(0,y.Injectable)(),O(0,(0,y.Inject)((0,y.forwardRef)(()=>y.ChangeDetectorRef))),O(1,(0,y.Inject)(D.IJobManagementService))],T)}),define(Q[408],Y([1,0,2209,58,6]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxiesCacheObject=e.AlertsCacheObject=e.OperatorsCacheObject=e.NotebookCacheObject=e.JobCacheObject=e.JobManagementService=void 0;let D=class{constructor(a){this._connectionService=a,this._onDidChange=new b.Emitter,this.onDidChange=this._onDidChange.event,this._stepsChanged=new b.Emitter,this.stepsChanged=this._stepsChanged.event,this._providers=Object.create(null),this._jobCacheObjectMap={},this._operatorsCacheObjectMap={},this._alertsCacheObject={},this._proxiesCacheObjectMap={},this._notebookCacheObjectMap={}}fireOnDidChange(){this._onDidChange.fire(void 0)}getJobs(a){return this._runAction(a,r=>r.getJobs(a))}deleteJob(a,r){return this._runAction(a,i=>i.deleteJob(a,r))}getJobHistory(a,r,i){return this._runAction(a,s=>s.getJobHistory(a,r,i))}jobAction(a,r,i){return this._runAction(a,s=>s.jobAction(a,r,i))}deleteJobStep(a,r){return this._runAction(a,i=>i.deleteJobStep(a,r))}onStepsChange(a){this._stepsChanged.fire(a)}getNotebooks(a){return this._runAction(a,r=>r.getNotebooks(a))}getNotebookHistory(a,r,i,s){return this._runAction(a,o=>o.getNotebookHistory(a,r,i,s))}getMaterialziedNotebook(a,r,i){return this._runAction(a,s=>s.getMaterializedNotebook(a,r,i))}getTemplateNotebook(a,r,i){return this._runAction(a,s=>s.getTemplateNotebook(a,r,i))}deleteNotebook(a,r){return this._runAction(a,i=>i.deleteNotebook(a,r))}deleteMaterializedNotebook(a,r,i){return this._runAction(a,s=>s.deleteMaterializedNotebook(a,r,i))}updateNotebookMaterializedName(a,r,i,s){return this._runAction(a,o=>o.updateNotebookMaterializedName(a,r,i,s))}updateNotebookMaterializedPin(a,r,i,s){return this._runAction(a,o=>o.updateNotebookMaterializedPin(a,r,i,s))}getAlerts(a){return this._runAction(a,r=>r.getAlerts(a))}deleteAlert(a,r){return this._runAction(a,i=>i.deleteAlert(a,r))}getOperators(a){return this._runAction(a,r=>r.getOperators(a))}deleteOperator(a,r){return this._runAction(a,i=>i.deleteOperator(a,r))}getProxies(a){return this._runAction(a,r=>r.getProxies(a))}deleteProxy(a,r){return this._runAction(a,i=>i.deleteProxy(a,r))}getCredentials(a){return this._runAction(a,r=>r.getCredentials(a))}_runAction(a,r){let i=this._connectionService.getProviderIdFromUri(a);if(!i)return Promise.reject(new Error((0,t.localize)(0,null)));let s=this._providers[i];return s?Promise.resolve(r(s)):Promise.reject(new Error((0,t.localize)(1,null)))}registerProvider(a,r){this._providers[a]=r}get jobCacheObjectMap(){return this._jobCacheObjectMap}get alertsCacheObjectMap(){return this._alertsCacheObject}get notebookCacheObjectMap(){return this._notebookCacheObjectMap}get proxiesCacheObjectMap(){return this._proxiesCacheObjectMap}get operatorsCacheObjectMap(){return this._operatorsCacheObjectMap}addToCache(a,r){r instanceof T?this._jobCacheObjectMap[a]=r:r instanceof v?this._operatorsCacheObjectMap[a]=r:r instanceof m?this._alertsCacheObject[a]=r:r instanceof S?this._proxiesCacheObjectMap[a]=r:r instanceof f&&(this._notebookCacheObjectMap[a]=r)}};e.JobManagementService=D,e.JobManagementService=D=fe([O(0,y.IConnectionManagementService)],D);class T{constructor(){this._jobs=[],this._jobHistories={},this._jobSteps={},this._jobAlerts={},this._jobSchedules={},this._runCharts={}}get jobs(){return this._jobs}get jobHistories(){return this._jobHistories}get prevJobID(){return this._prevJobID}getJobHistory(a){return this._jobHistories[a]}get serverName(){return this._serverName}get dataView(){return this._dataView}getRunChart(a){return this._runCharts[a]}getJobSteps(a){return this._jobSteps[a]}getJobAlerts(a){return this._jobAlerts[a]}getJobSchedules(a){return this._jobSchedules[a]}set jobs(a){this._jobs=a}set jobHistories(a){this._jobHistories=a}set prevJobID(a){this._prevJobID=a}setJobHistory(a,r){this._jobHistories[a]=r}setRunChart(a,r){this._runCharts[a]=r}set serverName(a){this._serverName=a}set dataView(a){this._dataView=a}setJobSteps(a,r){this._jobSteps[a]=r}setJobAlerts(a,r){this._jobAlerts[a]=r}setJobSchedules(a,r){this._jobSchedules[a]=r}}e.JobCacheObject=T;class f{constructor(){this._notebooks=[],this._notebookHistories={},this._jobSteps={},this._jobSchedules={},this._runCharts={}}get notebooks(){return this._notebooks}get notebookHistories(){return this._notebookHistories}get prevJobID(){return this._prevJobID}getNotebookHistory(a){return this._notebookHistories[a]}get serverName(){return this._serverName}get dataView(){return this._dataView}getRunChart(a){return this._runCharts[a]}getJobSteps(a){return this._jobSteps[a]}getJobSchedules(a){return this._jobSchedules[a]}set notebooks(a){this._notebooks=a}set notebookHistories(a){this._notebookHistories=a}set prevJobID(a){this._prevJobID=a}setNotebookHistory(a,r){this._notebookHistories[a]=r}setRunChart(a,r){this._runCharts[a]=r}set serverName(a){this._serverName=a}set dataView(a){this._dataView=a}setJobSteps(a,r){this._jobSteps[a]=r}setJobSchedules(a,r){this._jobSchedules[a]=r}}e.NotebookCacheObject=f;class v{get operators(){return this._operators}get dataview(){return this._dataView}get serverName(){return this._serverName}set operators(a){this._operators=a}set dataview(a){this._dataView=a}set serverName(a){this._serverName=a}}e.OperatorsCacheObject=v;class m{get alerts(){return this._alerts}get dataview(){return this._dataView}get serverName(){return this._serverName}set alerts(a){this._alerts=a}set dataview(a){this._dataView=a}set serverName(a){this._serverName=a}}e.AlertsCacheObject=m;class S{get proxies(){return this._proxies}get dataview(){return this._dataView}get serverName(){return this._serverName}set proxies(a){this._proxies=a}set dataview(a){this._dataView=a}set serverName(a){this._serverName=a}}e.ProxiesCacheObject=S}),define(Q[346],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProfilerFilterClauseOperator=e.EngineType=e.ProfilingSessionType=e.PROFILER_SETTINGS=e.PROFILER_FILTER_SETTINGS=e.PROFILER_SESSION_TEMPLATE_SETTINGS=e.PROFILER_VIEW_TEMPLATE_SETTINGS=e.IProfilerService=void 0;const y="profilerService";e.IProfilerService=(0,t.createDecorator)(y),e.PROFILER_VIEW_TEMPLATE_SETTINGS="profiler.viewTemplates",e.PROFILER_SESSION_TEMPLATE_SETTINGS="profiler.sessionTemplates",e.PROFILER_FILTER_SETTINGS="profiler.filters",e.PROFILER_SETTINGS="profiler";var b;(function(f){f[f.RemoteSession=0]="RemoteSession",f[f.LocalFile=1]="LocalFile"})(b||(e.ProfilingSessionType=b={}));var D;(function(f){f.AzureSQLDB="AzureSQLDB",f.Standalone="Standalone"})(D||(e.EngineType=D={}));var T;(function(f){f[f.Equals=0]="Equals",f[f.NotEquals=1]="NotEquals",f[f.LessThan=2]="LessThan",f[f.LessThanOrEquals=3]="LessThanOrEquals",f[f.GreaterThan=4]="GreaterThan",f[f.GreaterThanOrEquals=5]="GreaterThanOrEquals",f[f.IsNull=6]="IsNull",f[f.IsNotNull=7]="IsNotNull",f[f.Contains=8]="Contains",f[f.NotContains=9]="NotContains",f[f.StartsWith=10]="StartsWith",f[f.NotStartsWith=11]="NotStartsWith"})(T||(e.ProfilerFilterClauseOperator=T={}))}),define(Q[3162],Y([1,0,346]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilterData=void 0;function y(f,v){return!v||!f?v:v.filter(m=>b(m,f.clauses))}e.FilterData=y;function b(f,v){let m=!0;if(!f)m=!1;else if(v)for(let S=0;S<v.length;S++){let h=v[S];if(h&&h.field){let a=f[h.field],r=h.value,i=a===void 0?void 0:a.toLocaleLowerCase(),s=r===void 0?void 0:r.toLocaleLowerCase(),o=new Date(a).valueOf(),u=new Date(r).valueOf(),d=Number(a).valueOf(),p=Number(r).valueOf();switch(D(a)&&D(r)?(a=d,r=p):T(a)&&T(r)?(a=o,r=u):(a=i,r=s),h.operator){case t.ProfilerFilterClauseOperator.Equals:m=a===r;break;case t.ProfilerFilterClauseOperator.NotEquals:m=a!==r;break;case t.ProfilerFilterClauseOperator.LessThan:m=a<r;break;case t.ProfilerFilterClauseOperator.LessThanOrEquals:m=a<=r;break;case t.ProfilerFilterClauseOperator.GreaterThan:m=a>r;break;case t.ProfilerFilterClauseOperator.GreaterThanOrEquals:m=a>=r;break;case t.ProfilerFilterClauseOperator.IsNull:m=a==null||a==="";break;case t.ProfilerFilterClauseOperator.IsNotNull:m=a!=null&&a!=="";break;case t.ProfilerFilterClauseOperator.Contains:m=!!i&&i.indexOf(s)>-1;break;case t.ProfilerFilterClauseOperator.NotContains:m=!i||!(i.indexOf(s)>-1);break;case t.ProfilerFilterClauseOperator.StartsWith:m=i.startsWith(s);break;case t.ProfilerFilterClauseOperator.NotStartsWith:m=!i||!i.startsWith(s);break;default:throw new Error(`Not a valid operator: ${h.operator}`)}}if(!m)break}return m}function D(f){let v=Number(f);return f!==void 0&&!isNaN(v.valueOf())&&f.replace(" ","")!==""}function T(f){let v=new Date(f);return f!==void 0&&!isNaN(v.valueOf())}}),define(Q[241],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IQueryModelService=e.SERVICE_ID=void 0,e.SERVICE_ID="queryModelService",e.IQueryModelService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[275],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IQueryEditorService=void 0,e.IQueryEditorService=(0,t.createDecorator)("QueryEditorService")}),define(Q[686],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IResourceProviderService=e.SERVICE_ID=void 0,e.SERVICE_ID="resourceProviderService",e.IResourceProviderService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[687],Y([1,0,5,581]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IRestoreDialogController=e.IRestoreService=e.SERVICE_ID=e.TaskExecutionMode=void 0,Object.defineProperty(e,"TaskExecutionMode",{enumerable:!0,get:function(){return y.TaskExecutionMode}}),e.SERVICE_ID="restoreService",e.IRestoreService=(0,t.createDecorator)(e.SERVICE_ID),e.IRestoreDialogController=(0,t.createDecorator)("restoreDialogService")}),define(Q[1142],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITableDesignerService=e.SERVICE_ID=void 0,e.SERVICE_ID="tableDesignerService",e.ITableDesignerService=(0,t.createDecorator)(e.SERVICE_ID)}),define(Q[152],Y([1,0,5,10,17]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceFileEdit=e.ResourceTextEdit=e.ResourceEdit=e.IBulkEditService=void 0,e.IBulkEditService=(0,t.createDecorator)("IWorkspaceEditService");class D{constructor(m){this.metadata=m}static convert(m){return m.edits.map(S=>{if(T.is(S))return T.lift(S);if(f.is(S))return f.lift(S);throw new Error("Unsupported edit")})}}e.ResourceEdit=D;class T extends D{static is(m){return m instanceof T?!0:(0,b.isObject)(m)&&y.URI.isUri(m.resource)&&(0,b.isObject)(m.textEdit)}static lift(m){return m instanceof T?m:new T(m.resource,m.textEdit,m.versionId,m.metadata)}constructor(m,S,h=void 0,a){super(a),this.resource=m,this.textEdit=S,this.versionId=h}}e.ResourceTextEdit=T;class f extends D{static is(m){return m instanceof f?!0:(0,b.isObject)(m)&&(!!m.newResource||!!m.oldResource)}static lift(m){return m instanceof f?m:new f(m.oldResource,m.newResource,m.options,m.metadata)}constructor(m,S,h={},a){super(a),this.oldResource=m,this.newResource=S,this.options=h}}e.ResourceFileEdit=f}),define(Q[79],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICodeEditorService=void 0,e.ICodeEditorService=(0,t.createDecorator)("codeEditorService")}),define(Q[50],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageService=void 0,e.ILanguageService=(0,t.createDecorator)("languageService")}),define(Q[242],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorWorkerService=void 0,e.IEditorWorkerService=(0,t.createDecorator)("editorWorkerService")}),define(Q[74],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageFeaturesService=void 0,e.ILanguageFeaturesService=(0,t.createDecorator)("ILanguageFeaturesService")}),define(Q[3163],Y([1,0,7,169,20,31,32,6,110,4,109,37,17,1858,391,238,51,27,99,74,2342]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnchangedRangesFeature=void 0;let l=class extends m.Disposable{get isUpdatingViewZones(){return this._isUpdatingViewZones}constructor(C,I,_,A){super(),this._editors=C,this._diffModel=I,this._options=_,this._languageFeaturesService=A,this._isUpdatingViewZones=!1,this._modifiedModel=(0,S.observableFromEvent)(this._editors.modified.onDidChangeModel,()=>this._editors.modified.getModel()),this._modifiedOutlineSource=(0,S.derivedWithStore)("modified outline source",(N,P)=>{const x=this._modifiedModel.read(N);if(x)return P.add(new g(this._languageFeaturesService,x))}),this._register(this._editors.original.onDidChangeCursorPosition(N=>{if(N.reason===3){const P=this._diffModel.get();(0,S.transaction)(x=>{for(const F of this._editors.original.getSelections()||[])P?.ensureOriginalLineIsVisible(F.getStartPosition().lineNumber,x),P?.ensureOriginalLineIsVisible(F.getEndPosition().lineNumber,x)})}})),this._register(this._editors.modified.onDidChangeCursorPosition(N=>{if(N.reason===3){const P=this._diffModel.get();(0,S.transaction)(x=>{for(const F of this._editors.modified.getSelections()||[])P?.ensureModifiedLineIsVisible(F.getStartPosition().lineNumber,x),P?.ensureModifiedLineIsVisible(F.getEndPosition().lineNumber,x)})}}));const k=this._diffModel.map((N,P)=>N?.diff.read(P)?.mappings.length===0?[]:N?.unchangedRegions.read(P)??[]),L=(0,S.derivedWithStore)("view zones",(N,P)=>{const x=[],F=[],V=this._options.renderSideBySide.read(N),W=this._modifiedOutlineSource.read(N);if(!W)return{origViewZones:x,modViewZones:F};const z=k.read(N);for(const B of z)if(!B.shouldHideControls(N)){{const K=(0,S.derived)(U=>B.getHiddenOriginalRange(U).startLineNumber-1),H=new i.PlaceholderViewZone(K,24);x.push(H),P.add(new w(this._editors.original,H,B,B.originalRange,!V,W,U=>this._diffModel.get().ensureModifiedLineIsVisible(U,void 0),this._options))}{const K=(0,S.derived)(U=>B.getHiddenModifiedRange(U).startLineNumber-1),H=new i.PlaceholderViewZone(K,24);F.push(H),P.add(new w(this._editors.modified,H,B,B.modifiedRange,!1,W,U=>this._diffModel.get().ensureModifiedLineIsVisible(U,void 0),this._options))}}return{origViewZones:x,modViewZones:F}}),R={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},M={description:"Fold Unchanged",glyphMarginHoverMessage:new v.MarkdownString(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,c.localize)(0,null)),glyphMarginClassName:"fold-unchanged "+h.ThemeIcon.asClassName(T.Codicon.fold),zIndex:10001};this._register((0,i.applyObservableDecorations)(this._editors.original,(0,S.derived)(N=>{const P=k.read(N),x=P.map(F=>({range:F.originalRange.toInclusiveRange(),options:R}));for(const F of P)F.shouldHideControls(N)&&x.push({range:u.Range.fromPositions(new o.Position(F.originalLineNumber,1)),options:M});return x}))),this._register((0,i.applyObservableDecorations)(this._editors.modified,(0,S.derived)(N=>{const P=k.read(N),x=P.map(F=>({range:F.modifiedRange.toInclusiveRange(),options:R}));for(const F of P)F.shouldHideControls(N)&&x.push({range:s.LineRange.ofLength(F.modifiedLineNumber,1).toInclusiveRange(),options:M});return x}))),this._register((0,i.applyViewZones)(this._editors.original,L.map(N=>N.origViewZones),N=>this._isUpdatingViewZones=N)),this._register((0,i.applyViewZones)(this._editors.modified,L.map(N=>N.modViewZones),N=>this._isUpdatingViewZones=N)),this._register((0,S.autorun)(N=>{const P=k.read(N);this._editors.original.setHiddenAreas(P.map(x=>x.getHiddenOriginalRange(N).toInclusiveRange()).filter(a.isDefined)),this._editors.modified.setHiddenAreas(P.map(x=>x.getHiddenModifiedRange(N).toInclusiveRange()).filter(a.isDefined))})),this._register(this._editors.modified.onMouseUp(N=>{if(!N.event.rightButton&&N.target.position&&N.target.element?.className.includes("fold-unchanged")){const P=N.target.position.lineNumber,x=this._diffModel.get();if(!x)return;const F=x.unchangedRegions.get().find(V=>V.modifiedRange.includes(P));if(!F)return;F.collapseAll(void 0),N.event.stopPropagation(),N.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(N=>{if(!N.event.rightButton&&N.target.position&&N.target.element?.className.includes("fold-unchanged")){const P=N.target.position.lineNumber,x=this._diffModel.get();if(!x)return;const F=x.unchangedRegions.get().find(V=>V.originalRange.includes(P));if(!F)return;F.collapseAll(void 0),N.event.stopPropagation(),N.event.preventDefault()}}))}};e.UnchangedRangesFeature=l,e.UnchangedRangesFeature=l=fe([O(3,p.ILanguageFeaturesService)],l);class n extends D.CancellationTokenSource{dispose(){super.dispose(!0)}}let g=class extends m.Disposable{constructor(C,I){super(),this._languageFeaturesService=C,this._textModel=I,this._currentModel=(0,S.observableValue)("current model",void 0);const _=(0,S.observableSignalFromEvent)("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),A=(0,S.observableSignalFromEvent)("_textModel.onDidChangeContent",f.Event.debounce(k=>this._textModel.onDidChangeContent(k),()=>{},100));this._register((0,S.autorunWithStore)(async(k,L)=>{_.read(k),A.read(k);const R=L.add(new n),M=await r.OutlineModel.create(this._languageFeaturesService.documentSymbolProvider,this._textModel,R.token);L.isDisposed||this._currentModel.set(M,void 0)}))}getBreadcrumbItems(C,I){const _=this._currentModel.read(I);if(!_)return[];const A=_.asListOfDocumentSymbols().filter(k=>C.contains(k.range.startLineNumber)&&!C.contains(k.range.endLineNumber));return A.sort((0,b.reverseOrder)((0,b.compareBy)(k=>k.range.endLineNumber-k.range.startLineNumber,b.numberComparator))),A.map(k=>({name:k.name,kind:k.kind,startLineNumber:k.range.startLineNumber}))}};g=fe([O(0,p.ILanguageFeaturesService)],g);class w extends i.ViewZoneOverlayWidget{constructor(C,I,_,A,k,L,R,M){const N=(0,t.h)("div.diff-hidden-lines-widget");super(C,I,N.root),this._editor=C,this._unchangedRegion=_,this._unchangedRegionRange=A,this.hide=k,this._modifiedOutlineSource=L,this._revealModifiedHiddenLine=R,this._options=M,this._nodes=(0,t.h)("div.diff-hidden-lines",[(0,t.h)("div.top@top",{title:(0,c.localize)(1,null)}),(0,t.h)("div.center@content",{style:{display:"flex"}},[(0,t.h)("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[(0,t.$)("a",{title:(0,c.localize)(2,null),role:"button",onclick:()=>{this.showAll()}},...(0,y.renderLabelWithIcons)("$(unfold)"))]),(0,t.h)("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),(0,t.h)("div.bottom@bottom",{title:(0,c.localize)(3,null),role:"button"})]),N.root.appendChild(this._nodes.root);const P=(0,S.observableFromEvent)(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this.hide?(0,t.reset)(this._nodes.first):this._register((0,i.applyStyle)(this._nodes.first,{width:P.map(F=>F.contentLeft)}));const x=this._editor;this._register((0,t.addDisposableListener)(this._nodes.top,"mousedown",F=>{if(F.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),F.preventDefault();const V=F.clientY;let W=!1;const z=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set(!0,void 0);const B=(0,t.addDisposableListener)(window,"mousemove",H=>{const G=H.clientY-V;W=W||Math.abs(G)>2;const $=Math.round(G/x.getOption(65)),ie=Math.max(0,Math.min(z+$,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(ie,void 0)}),K=(0,t.addDisposableListener)(window,"mouseup",H=>{W||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(!1,void 0),B.dispose(),K.dispose()})})),this._register((0,t.addDisposableListener)(this._nodes.bottom,"mousedown",F=>{if(F.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),F.preventDefault();const V=F.clientY;let W=!1;const z=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set(!0,void 0);const B=(0,t.addDisposableListener)(window,"mousemove",H=>{const G=H.clientY-V;W=W||Math.abs(G)>2;const $=Math.round(G/x.getOption(65)),ie=Math.max(0,Math.min(z-$,this._unchangedRegion.getMaxVisibleLineCountBottom())),J=x.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(ie,void 0);const j=x.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);x.setScrollTop(x.getScrollTop()+(j-J))}),K=(0,t.addDisposableListener)(window,"mouseup",H=>{if(this._unchangedRegion.isDragged.set(!1,void 0),!W){const U=x.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const G=x.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);x.setScrollTop(x.getScrollTop()+(G-U))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),B.dispose(),K.dispose()})})),this._register((0,S.autorun)(F=>{const V=[];if(!this.hide){const W=_.getHiddenModifiedRange(F).length,z=(0,c.localize)(4,null,W),B=(0,t.$)("span",{title:(0,c.localize)(5,null)},z);B.addEventListener("dblclick",U=>{U.button===0&&(U.preventDefault(),this.showAll())}),V.push(B);const K=this._unchangedRegion.getHiddenModifiedRange(F),H=this._modifiedOutlineSource.getBreadcrumbItems(K,F);if(H.length>0){V.push((0,t.$)("span",void 0,"\xA0\xA0|\xA0\xA0"));for(let U=0;U<H.length;U++){const G=H[U],$=d.SymbolKinds.toIcon(G.kind),ie=(0,t.h)("div.breadcrumb-item",{style:{display:"flex",alignItems:"center"}},[(0,y.renderIcon)($),"\xA0",G.name,...U===H.length-1?[]:[(0,y.renderIcon)(T.Codicon.chevronRight)]]).root;V.push(ie),ie.onclick=()=>{this._revealModifiedHiddenLine(G.startLineNumber)}}}}(0,t.reset)(this._nodes.others,...V)}))}showAll(){this._unchangedRegion.showAll(void 0)}}}),define(Q[3164],Y([1,0,676,74,35]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeaturesService=void 0;class D{constructor(){this.referenceProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.renameProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.codeActionProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.definitionProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.typeDefinitionProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.declarationProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.implementationProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentSymbolProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.inlayHintsProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.colorProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.codeLensProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentFormattingEditProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentRangeFormattingEditProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.onTypeFormattingEditProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.signatureHelpProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.hoverProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentHighlightProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.selectionRangeProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.foldingRangeProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.linkProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.inlineCompletionsProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.completionProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.linkedEditingRangeProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.inlineValuesProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.evaluatableExpressionProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentSemanticTokensProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentOnDropEditProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentPasteEditProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.mappedEditsProvider=new t.LanguageFeatureRegistry(this._score.bind(this))}setNotebookTypeResolver(f){this._notebookTypeResolver=f}_score(f){return this._notebookTypeResolver?.(f)}}e.LanguageFeaturesService=D,(0,b.registerSingleton)(y.ILanguageFeaturesService,D,1)}),define(Q[688],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerDecorationsService=void 0,e.IMarkerDecorationsService=(0,t.createDecorator)("markerDecorationsService")}),define(Q[57],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IModelService=void 0,e.IModelService=(0,t.createDecorator)("modelService")}),define(Q[75],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isResolvedTextEditorModel=e.ITextModelService=void 0,e.ITextModelService=(0,t.createDecorator)("textModelService");function y(b){return!!b.textEditorModel}e.isResolvedTextEditorModel=y}),define(Q[857],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISemanticTokensStylingService=void 0,e.ISemanticTokensStylingService=(0,t.createDecorator)("semanticTokensStylingService")}),define(Q[78],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextResourcePropertiesService=e.ITextResourceConfigurationService=void 0,e.ITextResourceConfigurationService=(0,t.createDecorator)("textResourceConfigurationService"),e.ITextResourcePropertiesService=(0,t.createDecorator)("textResourcePropertiesService")}),define(Q[584],Y([1,0,35,5,565]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITreeViewsDnDService=void 0,e.ITreeViewsDnDService=(0,y.createDecorator)("treeViewsDndService"),(0,t.registerSingleton)(e.ITreeViewsDnDService,b.TreeViewsDnDService,1)}),define(Q[1143],Y([1,0,152]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sortEditsByYieldTo=e.createCombinedWorkspaceEdit=void 0;function y(D,T,f){return{edits:[...T.map(v=>new t.ResourceTextEdit(D,typeof f.insertText=="string"?{range:v,text:f.insertText,insertAsSnippet:!1}:{range:v,text:f.insertText.snippet,insertAsSnippet:!0})),...f.additionalEdit?.edits??[]]}}e.createCombinedWorkspaceEdit=y;function b(D){function T(h,a){return"providerId"in h&&h.providerId===a.providerId||"mimeType"in h&&h.mimeType===a.handledMimeType}const f=new Map;for(const h of D)for(const a of h.yieldTo??[])for(const r of D)if(r!==h&&T(a,r)){let i=f.get(h);i||(i=[],f.set(h,i)),i.push(r)}if(!f.size)return Array.from(D);const v=new Set,m=[];function S(h){if(!h.length)return[];const a=h[0];if(m.includes(a))return console.warn(`Yield to cycle detected for ${a.providerId}`),h;if(v.has(a))return S(h.slice(1));let r=[];const i=f.get(a);return i&&(m.push(a),r=S(i),m.pop()),v.add(a),[...r,a,...S(h.slice(1))]}return S(Array.from(D))}e.sortEditsByYieldTo=b}),define(Q[3165],Y([1,0,364,6,4,109,33,258,133,51,27,370,50,137,368,491,405,810,568,1734]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GhostTextWidget=void 0;let p=class extends b.Disposable{constructor(w,E,C){super(),this.editor=w,this.model=E,this.languageService=C,this.isDisposed=(0,D.observableValue)("isDisposed",!1),this.currentTextModel=(0,D.observableFromEvent)(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=(0,D.derived)(I=>{if(this.isDisposed.read(I))return;const _=this.currentTextModel.read(I);if(_!==this.model.targetTextModel.read(I))return;const A=this.model.ghostText.read(I);if(!A)return;const k=A instanceof u.GhostTextReplacement?A.columnRange:void 0,L=[],R=[];function M(V,W){if(R.length>0){const z=R[R.length-1];W&&z.decorations.push(new s.LineDecoration(z.content.length+1,z.content.length+1+V[0].length,W,0)),z.content+=V[0],V=V.slice(1)}for(const z of V)R.push({content:z,decorations:W?[new s.LineDecoration(1,z.length+1,W,0)]:[]})}const N=_.getLineContent(A.lineNumber);let P,x=0;for(const V of A.parts){let W=V.lines;P===void 0?(L.push({column:V.column,text:W[0],preview:V.preview}),W=W.slice(1)):M([N.substring(x,V.column-1)],void 0),W.length>0&&(M(W,"ghost-text"),P===void 0&&V.column<=N.length&&(P=V.column)),x=V.column-1}P!==void 0&&M([N.substring(x)],void 0);const F=P!==void 0?new d.ColumnRange(P,N.length+1):void 0;return{replacedRange:k,inlineTexts:L,additionalLines:R,hiddenRange:F,lineNumber:A.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(I),targetTextModel:_}}),this.decorations=(0,D.derived)(I=>{const _=this.uiState.read(I);if(!_)return[];const A=[];_.replacedRange&&A.push({range:_.replacedRange.toRange(_.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),_.hiddenRange&&A.push({range:_.hiddenRange.toRange(_.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const k of _.inlineTexts)A.push({range:S.Range.fromPositions(new m.Position(_.lineNumber,k.column)),options:{description:"ghost-text",after:{content:k.text,inlineClassName:k.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:r.InjectedTextCursorStops.Left},showIfCollapsed:!0}});return A}),this.additionalLinesWidget=this._register(new c(this.editor,this.languageService.languageIdCodec,(0,D.derived)(I=>{const _=this.uiState.read(I);return _?{lineNumber:_.lineNumber,additionalLines:_.additionalLines,minReservedLineCount:_.additionalReservedLineCount,targetTextModel:_.targetTextModel}:void 0}))),this._register((0,b.toDisposable)(()=>{this.isDisposed.set(!0,void 0)})),this._register((0,d.applyObservableDecorations)(this.editor,this.decorations))}ownsViewZone(w){return this.additionalLinesWidget.viewZoneId===w}};e.GhostTextWidget=p,e.GhostTextWidget=p=fe([O(2,a.ILanguageService)],p);class c extends b.Disposable{get viewZoneId(){return this._viewZoneId}constructor(w,E,C){super(),this.editor=w,this.languageIdCodec=E,this.lines=C,this._viewZoneId=void 0,this.editorOptionsChanged=(0,D.observableSignalFromEvent)("editorOptionChanged",y.Event.filter(this.editor.onDidChangeConfiguration,I=>I.hasChanged(32)||I.hasChanged(115)||I.hasChanged(97)||I.hasChanged(92)||I.hasChanged(50)||I.hasChanged(49)||I.hasChanged(65))),this._register((0,D.autorun)(I=>{const _=this.lines.read(I);this.editorOptionsChanged.read(I),_?this.updateLines(_.lineNumber,_.additionalLines,_.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(w=>{this._viewZoneId&&(w.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(w,E,C){const I=this.editor.getModel();if(!I)return;const{tabSize:_}=I.getOptions();this.editor.changeViewZones(A=>{this._viewZoneId&&(A.removeZone(this._viewZoneId),this._viewZoneId=void 0);const k=Math.max(E.length,C);if(k>0){const L=document.createElement("div");l(L,_,E,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=A.addZone({afterLineNumber:w,heightInLines:k,domNode:L,afterColumnAffinity:1})}})}}function l(g,w,E,C,I){const _=C.get(32),A=C.get(115),k="none",L=C.get(92),R=C.get(50),M=C.get(49),N=C.get(65),P=new h.StringBuilder(1e4);P.appendString('<div class="suggest-preview-text">');for(let V=0,W=E.length;V<W;V++){const z=E[V],B=z.content;P.appendString('<div class="view-line'),P.appendString('" style="top:'),P.appendString(String(V*N)),P.appendString('px;width:1000000px;">');const K=T.isBasicASCII(B),H=T.containsRTL(B),U=i.LineTokens.createEmpty(B,I);(0,o.renderViewLine)(new o.RenderLineInput(M.isMonospace&&!_,M.canUseHalfwidthRightwardsArrow,B,!1,K,H,0,U,z.decorations,w,0,M.spaceWidth,M.middotWidth,M.wsmiddotWidth,A,k,L,R!==v.EditorFontLigatures.OFF,null),P),P.appendString("</div>")}P.appendString("</div>"),(0,f.applyFontInfo)(g,M);const x=P.build(),F=n?n.createHTML(x):x;g.innerHTML=F}const n=(0,t.createTrustedTypesPolicy)("editorGhostText",{createHTML:g=>g})}),define(Q[1144],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IChecksumService=void 0,e.IChecksumService=(0,t.createDecorator)("checksumService")}),define(Q[68],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IClipboardService=void 0,e.IClipboardService=(0,t.createDecorator)("clipboardService")}),define(Q[3166],Y([1,0,34,2204,68]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyInsightDialogSelectionAction=void 0;let D=class extends t.Action{static{this.ID="workbench.action.insights.copySelection"}static{this.LABEL=y.localize(0,null)}constructor(f,v,m){super(f,v),this._clipboardService=m}async run(f){await this._clipboardService.writeText(f.cellData)}};e.CopyInsightDialogSelectionAction=D,e.CopyInsightDialogSelectionAction=D=fe([O(2,b.IClipboardService)],D)}),define(Q[28],Y([1,0,6,83,4,204,17,5]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsRegistry=e.ICommandService=void 0,e.ICommandService=(0,f.createDecorator)("commandService"),e.CommandsRegistry=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new t.Emitter,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(v,m){if(!v)throw new Error("invalid command");if(typeof v=="string"){if(!m)throw new Error("invalid command");return this.registerCommand({id:v,handler:m})}if(v.description){const i=[];for(const o of v.description.args)i.push(o.constraint);const s=v.handler;v.handler=function(o,...u){return(0,T.validateConstraints)(u,i),s(o,...u)}}const{id:S}=v;let h=this._commands.get(S);h||(h=new D.LinkedList,this._commands.set(S,h));const a=h.unshift(v),r=(0,b.toDisposable)(()=>{a(),this._commands.get(S)?.isEmpty()&&this._commands.delete(S)});return this._onDidRegisterCommand.fire(S),r}registerCommandAlias(v,m){return e.CommandsRegistry.registerCommand(v,(S,...h)=>S.get(e.ICommandService).executeCommand(m,...h))}getCommand(v){const m=this._commands.get(v);if(!(!m||m.isEmpty()))return y.Iterable.first(m)}getCommands(){const v=new Map;for(const m of this._commands.keys()){const S=this.getCommand(m);S&&v.set(m,S)}return v}},e.CommandsRegistry.registerCommand("noop",()=>{})}),define(Q[3167],Y([1,0,28,262]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.CommandsRegistry.registerCommand("workbench.actions.modal.linkedAccount",async b=>{await b.get(y.IAccountManagementService).openAccountListDialog()})}),define(Q[1145],Y([1,0,31,15,4,17,10,57,28,74]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeLensModel=e.CodeLensModel=void 0;class S{constructor(){this.lenses=[],this._disposables=new b.DisposableStore}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(r,i){this._disposables.add(r);for(const s of r.lenses)this.lenses.push({symbol:s,provider:i})}}e.CodeLensModel=S;async function h(a,r,i){const s=a.ordered(r),o=new Map,u=new S,d=s.map(async(p,c)=>{o.set(p,c);try{const l=await Promise.resolve(p.provideCodeLenses(r,i));l&&u.add(l,p)}catch(l){(0,y.onUnexpectedExternalError)(l)}});return await Promise.all(d),u.lenses=u.lenses.sort((p,c)=>p.symbol.range.startLineNumber<c.symbol.range.startLineNumber?-1:p.symbol.range.startLineNumber>c.symbol.range.startLineNumber?1:o.get(p.provider)<o.get(c.provider)?-1:o.get(p.provider)>o.get(c.provider)?1:p.symbol.range.startColumn<c.symbol.range.startColumn?-1:p.symbol.range.startColumn>c.symbol.range.startColumn?1:0),u}e.getCodeLensModel=h,v.CommandsRegistry.registerCommand("_executeCodeLensProvider",function(a,...r){let[i,s]=r;(0,D.assertType)(T.URI.isUri(i)),(0,D.assertType)(typeof s=="number"||!s);const{codeLensProvider:o}=a.get(m.ILanguageFeaturesService),u=a.get(f.IModelService).getModel(i);if(!u)throw(0,y.illegalArgument)();const d=[],p=new b.DisposableStore;return h(o,u,t.CancellationToken.None).then(c=>{p.add(c);const l=[];for(const n of c.lenses)s==null||n.symbol.command?d.push(n.symbol):s-- >0&&n.provider.resolveCodeLens&&l.push(Promise.resolve(n.provider.resolveCodeLens(u,n.symbol,t.CancellationToken.None)).then(g=>d.push(g||n.symbol)));return Promise.all(l)}).then(()=>d).finally(()=>{setTimeout(()=>p.dispose(),100)})})}),define(Q[3168],Y([1,0,20,31,15,4,17,10,27,57,28,74]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLinks=e.LinksList=e.Link=void 0;class a{constructor(o,u){this._link=o,this._provider=u}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(o){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,o)).then(u=>(this._link=u||this._link,this._link.url?this.resolve(o):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}}e.Link=a;class r{constructor(o){this._disposables=new D.DisposableStore;let u=[];for(const[d,p]of o){const c=d.links.map(l=>new a(l,p));u=r._union(u,c),(0,D.isDisposable)(d)&&this._disposables.add(d)}this.links=u}dispose(){this._disposables.dispose(),this.links.length=0}static _union(o,u){const d=[];let p,c,l,n;for(p=0,l=0,c=o.length,n=u.length;p<c&&l<n;){const g=o[p],w=u[l];if(v.Range.areIntersectingOrTouching(g.range,w.range)){p++;continue}v.Range.compareRangesUsingStarts(g.range,w.range)<0?(d.push(g),p++):(d.push(w),l++)}for(;p<c;p++)d.push(o[p]);for(;l<n;l++)d.push(u[l]);return d}}e.LinksList=r;function i(s,o,u){const d=[],p=s.ordered(o).reverse().map((c,l)=>Promise.resolve(c.provideLinks(o,u)).then(n=>{n&&(d[l]=[n,c])},b.onUnexpectedExternalError));return Promise.all(p).then(()=>{const c=new r((0,t.coalesce)(d));return u.isCancellationRequested?(c.dispose(),new r([])):c})}e.getLinks=i,S.CommandsRegistry.registerCommand("_executeLinkProvider",async(s,...o)=>{let[u,d]=o;(0,T.assertType)(u instanceof f.URI),typeof d!="number"&&(d=0);const{linkProvider:p}=s.get(h.ILanguageFeaturesService),c=s.get(m.IModelService).getModel(u);if(!c)return[];const l=await i(p,c,y.CancellationToken.None);if(!l)return[];for(let g=0;g<Math.min(d,l.links.length);g++)await l.links[g].resolve(y.CancellationToken.None);const n=l.links.slice(0);return l.dispose(),n})}),define(Q[1146],Y([1,0,31,15,10,57,28,17,1130,27,74]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDocumentRangeSemanticTokens=e.hasDocumentRangeSemanticTokensProvider=e.getDocumentSemanticTokens=e.hasDocumentSemanticTokensProvider=e.DocumentSemanticTokensResult=e.isSemanticTokensEdits=e.isSemanticTokens=void 0;function h(n){return n&&!!n.data}e.isSemanticTokens=h;function a(n){return n&&Array.isArray(n.edits)}e.isSemanticTokensEdits=a;class r{constructor(g,w,E){this.provider=g,this.tokens=w,this.error=E}}e.DocumentSemanticTokensResult=r;function i(n,g){return n.has(g)}e.hasDocumentSemanticTokensProvider=i;function s(n,g){const w=n.orderedGroups(g);return w.length>0?w[0]:[]}async function o(n,g,w,E,C){const I=s(n,g),_=await Promise.all(I.map(async A=>{let k,L=null;try{k=await A.provideDocumentSemanticTokens(g,A===w?E:null,C)}catch(R){L=R,k=null}return(!k||!h(k)&&!a(k))&&(k=null),new r(A,k,L)}));for(const A of _){if(A.error)throw A.error;if(A.tokens)return A}return _.length>0?_[0]:null}e.getDocumentSemanticTokens=o;function u(n,g){const w=n.orderedGroups(g);return w.length>0?w[0]:null}class d{constructor(g,w){this.provider=g,this.tokens=w}}function p(n,g){return n.has(g)}e.hasDocumentRangeSemanticTokensProvider=p;function c(n,g){const w=n.orderedGroups(g);return w.length>0?w[0]:[]}async function l(n,g,w,E){const C=c(n,g),I=await Promise.all(C.map(async _=>{let A;try{A=await _.provideDocumentRangeSemanticTokens(g,w,E)}catch(k){(0,y.onUnexpectedExternalError)(k),A=null}return(!A||!h(A))&&(A=null),new d(_,A)}));for(const _ of I)if(_.tokens)return _;return I.length>0?I[0]:null}e.getDocumentRangeSemanticTokens=l,T.CommandsRegistry.registerCommand("_provideDocumentSemanticTokensLegend",async(n,...g)=>{const[w]=g;(0,f.assertType)(w instanceof b.URI);const E=n.get(D.IModelService).getModel(w);if(!E)return;const{documentSemanticTokensProvider:C}=n.get(S.ILanguageFeaturesService),I=u(C,E);return I?I[0].getLegend():n.get(T.ICommandService).executeCommand("_provideDocumentRangeSemanticTokensLegend",w)}),T.CommandsRegistry.registerCommand("_provideDocumentSemanticTokens",async(n,...g)=>{const[w]=g;(0,f.assertType)(w instanceof b.URI);const E=n.get(D.IModelService).getModel(w);if(!E)return;const{documentSemanticTokensProvider:C}=n.get(S.ILanguageFeaturesService);if(!i(C,E))return n.get(T.ICommandService).executeCommand("_provideDocumentRangeSemanticTokens",w,E.getFullModelRange());const I=await o(C,E,null,null,t.CancellationToken.None);if(!I)return;const{provider:_,tokens:A}=I;if(!A||!h(A))return;const k=(0,v.encodeSemanticTokensDto)({id:0,type:"full",data:A.data});return A.resultId&&_.releaseDocumentSemanticTokens(A.resultId),k}),T.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(n,...g)=>{const[w,E]=g;(0,f.assertType)(w instanceof b.URI);const C=n.get(D.IModelService).getModel(w);if(!C)return;const{documentRangeSemanticTokensProvider:I}=n.get(S.ILanguageFeaturesService),_=c(I,C);if(_.length===0)return;if(_.length===1)return _[0].getLegend();if(!E||!m.Range.isIRange(E))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),_[0].getLegend();const A=await l(I,C,m.Range.lift(E),t.CancellationToken.None);if(A)return A.provider.getLegend()}),T.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokens",async(n,...g)=>{const[w,E]=g;(0,f.assertType)(w instanceof b.URI),(0,f.assertType)(m.Range.isIRange(E));const C=n.get(D.IModelService).getModel(w);if(!C)return;const{documentRangeSemanticTokensProvider:I}=n.get(S.ILanguageFeaturesService),_=await l(I,C,m.Range.lift(E),t.CancellationToken.None);if(!(!_||!_.tokens))return(0,v.encodeSemanticTokensDto)({id:0,type:"full",data:_.tokens.data})})}),define(Q[9],Y([1,0,17,10,5]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageTagSettingPlainKey=e.merge=e.getConfigurationValue=e.removeFromValueTree=e.addToValueTree=e.toValuesTree=e.isConfigured=e.ConfigurationTargetToString=e.ConfigurationTarget=e.isConfigurationUpdateOverrides=e.isConfigurationOverrides=e.IConfigurationService=void 0,e.IConfigurationService=(0,b.createDecorator)("configurationService");function D(u){return u&&typeof u=="object"&&(!u.overrideIdentifier||typeof u.overrideIdentifier=="string")&&(!u.resource||u.resource instanceof y.URI)}e.isConfigurationOverrides=D;function T(u){return u&&typeof u=="object"&&(!u.overrideIdentifiers||Array.isArray(u.overrideIdentifiers))&&!u.overrideIdentifier&&(!u.resource||u.resource instanceof y.URI)}e.isConfigurationUpdateOverrides=T;var f;(function(u){u[u.APPLICATION=1]="APPLICATION",u[u.USER=2]="USER",u[u.USER_LOCAL=3]="USER_LOCAL",u[u.USER_REMOTE=4]="USER_REMOTE",u[u.WORKSPACE=5]="WORKSPACE",u[u.WORKSPACE_FOLDER=6]="WORKSPACE_FOLDER",u[u.DEFAULT=7]="DEFAULT",u[u.MEMORY=8]="MEMORY"})(f||(e.ConfigurationTarget=f={}));function v(u){switch(u){case 1:return"APPLICATION";case 2:return"USER";case 3:return"USER_LOCAL";case 4:return"USER_REMOTE";case 5:return"WORKSPACE";case 6:return"WORKSPACE_FOLDER";case 7:return"DEFAULT";case 8:return"MEMORY"}}e.ConfigurationTargetToString=v;function m(u){return u.applicationValue!==void 0||u.userValue!==void 0||u.userLocalValue!==void 0||u.userRemoteValue!==void 0||u.workspaceValue!==void 0||u.workspaceFolderValue!==void 0}e.isConfigured=m;function S(u,d){const p=Object.create(null);for(const c in u)h(p,c,u[c],d);return p}e.toValuesTree=S;function h(u,d,p,c){const l=d.split("."),n=l.pop();let g=u;for(let w=0;w<l.length;w++){const E=l[w];let C=g[E];switch(typeof C){case"undefined":C=g[E]=Object.create(null);break;case"object":break;default:c(`Ignoring ${d} as ${l.slice(0,w+1).join(".")} is ${JSON.stringify(C)}`);return}g=C}if(typeof g=="object"&&g!==null)try{g[n]=p}catch{c(`Ignoring ${d} as ${l.join(".")} is ${JSON.stringify(g)}`)}else c(`Ignoring ${d} as ${l.join(".")} is ${JSON.stringify(g)}`)}e.addToValueTree=h;function a(u,d){const p=d.split(".");r(u,p)}e.removeFromValueTree=a;function r(u,d){const p=d.shift();if(d.length===0){delete u[p];return}if(Object.keys(u).indexOf(p)!==-1){const c=u[p];typeof c=="object"&&!Array.isArray(c)&&(r(c,d),Object.keys(c).length===0&&delete u[p])}}function i(u,d,p){function c(g,w){let E=g;for(const C of w){if(typeof E!="object"||E===null)return;E=E[C]}return E}const l=d.split("."),n=c(u,l);return typeof n>"u"?p:n}e.getConfigurationValue=i;function s(u,d,p){Object.keys(d).forEach(c=>{c!=="__proto__"&&(c in u?t.isObject(u[c])&&t.isObject(d[c])?s(u[c],d[c],p):p&&(u[c]=d[c]):u[c]=d[c])})}e.merge=s;function o(u){return u.replace(/[\[\]]/g,"")}e.getLanguageTagSettingPlainKey=o}),define(Q[1147],Y([1,0,10,55,22,9,1101,18,1495]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findPathRelativeToContent=e.NotebookLinkHandler=void 0;const m="notebook.useAbsoluteFilePaths";let S=class{constructor(r,i,s){this._notebookURI=r,this._link=i,this._configurationService=s,typeof this._link=="string"?(this._notebookUriLink=t.URI.parse(this._link),this._isFile=this._notebookUriLink.scheme==="file",this.isAbsolutePath=y.isAbsolute(this._link),this._isAnchorLink=this._link.includes("#")&&this._isFile):(this.isAbsolutePath=this._link.attributes["is-absolute"]?.nodeValue==="true",this.isMarkdown=this._link.attributes["is-markdown"]?.nodeValue==="true",this.isEncoded=this._link.attributes["is-encoded"]?.nodeValue==="true",this._isFile=this._link.protocol===`${b.Schemas.file}:`||this._link.protocol===`${b.Schemas.vscodeFileResource}:`,f.isWindows?this._href=this.isMarkdown||this.isEncoded?y.normalize(this._link.href?.replace(/%5C/g,"\\")):this._link.attributes.href?.nodeValue:this._href=this._isFile?y.normalize(this._link.attributes.href?.nodeValue):this._link.attributes.href?.nodeValue,this._notebookUriLink=this._href?t.URI.parse(encodeURI(this._href)):void 0,this._isAnchorLink=!!this._notebookUriLink?.fragment),this._notebookDirectory=this._notebookURI?y.dirname(this._notebookURI.fsPath):""}getLinkUrl(){if(typeof this._link=="string"){if(this._isFile&&this.isAbsolutePath&&this._configurationService.getValue(m)===!0)return this._link;if(this._isFile&&!this.isAbsolutePath&&!this._isAnchorLink){const r=this._link.replace(/\\/g,y.posix.sep);return y.resolve(this._notebookDirectory,r)}return this._link}else{if(this._notebookUriLink&&this._isFile){let r;return this.isAbsolutePath&&this._configurationService.getValue(m)===!0?this._href:(this._isAnchorLink?r=this.getUriAnchorLink(this._link,this._notebookURI):r=this._link?this._notebookUriLink:t.URI.file(this._link.title),this._notebookUriLink.fsPath!==this._notebookURI.fsPath&&!r?.fragment?h(this._notebookDirectory,r,this.isMarkdown,this.isEncoded):r.fragment)}return this._href||""}}getEncodedLinkUrl(){if(typeof this._link=="string")return(0,v.containsEncodedUriComponentReservedCharacters)(this._link)?this._link:encodeURI(this._link)}getUriAnchorLink(r,i){if(r.href.includes("#")&&!r.attributes.href?.nodeValue.startsWith("#")){let o=y.isAbsolute(r.attributes.href?.nodeValue)?r.attributes.href?.nodeValue:y.resolve(y.dirname(i.fsPath),r.attributes.href?.nodeValue);return t.URI.file(o)}else return t.URI.from({scheme:"file",path:i.path,fragment:r.attributes.href?.nodeValue})}};e.NotebookLinkHandler=S,e.NotebookLinkHandler=S=fe([O(2,D.IConfigurationService)],S);function h(a,r,i,s){if(r?.scheme==="file"){let o=r.fsPath!==decodeURI(r.fsPath),u=r.fsPath;o&&(u=decodeURI(r.fsPath));let d=r.fragment?y.relative(a,u).concat("#",r.fragment):y.relative(a,u);return d=i||s?(0,T.replaceInvalidLinkPath)(d):encodeURI((0,T.replaceInvalidLinkPath)(d)).replace(/%5C/g,"\\"),d=o?encodeURI(d):d,d.startsWith(y.join("..",y.sep))||d.startsWith(y.join(".",y.sep))?d:`.${y.join(y.sep,d)}`}return""}e.findPathRelativeToContent=h}),define(Q[3169],Y([1,0,4514,10,55,1510,9,1147,22]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addHighlightIfYellowBgExists=e.HTMLMarkdownConverter=void 0;const m=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "],[/</g,"\\<"],[/>/g,"\\>"]];let S=class{constructor(o,u){this.notebookUri=o,this.configurationService=u,this.turndownService=new t({emDelimiter:"_",bulletListMarker:"-",headingStyle:"atx",blankReplacement:a}),this.setTurndownOptions()}convert(o){return this.turndownService.turndown(o,{gfm:!0})}setTableTurndownOptions(){this.configurationService.getValue("notebook.renderTablesInHtml")?(this.turndownService.keep(["table","tr","th","td"]),this.turndownService.use(D.gfmHtmlTables)):this.turndownService.use(D.gfm)}setTurndownOptions(){this.turndownService.keep(["style"]),this.setTableTurndownOptions(),this.turndownService.addRule("pre",{filter:"pre",replacement:function(o,u){return"\n```\n"+u.textContent+"\n```\n"}}),this.turndownService.addRule("mark",{filter:"mark",replacement:(o,u)=>"<mark>"+o+"</mark>"}),this.turndownService.addRule("underline",{filter:["u"],replacement:(o,u,d)=>o.trim()?(o=i(u,o),"<u>"+o+"</u>"):""}),this.turndownService.addRule("caption",{filter:"caption",replacement:function(o,u){return`${u.outerHTML} `}}),this.turndownService.addRule("span",{filter:"span",replacement:function(o,u){if(u&&u.style&&(u.style.color||u.style.fontSize||u.style.backgroundColor&&u.style.backgroundColor!=="yellow"||u.style.background&&u.style.background!=="yellow"||u.style.lineHeight||u.style.marginLeft||u.style.marginBottom||u.style.textAlign))return u.outerHTML;let d="",p="";return u?.style?.backgroundColor==="yellow"&&(d="<mark>"+d,p+="</mark>"),u?.style?.fontWeight==="bold"&&(d="**"+d,p+="**"),u?.style?.fontStyle==="italic"&&(d="_"+d,p+="_"),u?.style?.textDecorationLine==="underline"&&(d="<u>"+d,p+="</u>"),d+o+p}}),this.turndownService.addRule("img",{filter:"img",replacement:(o,u)=>{if(u?.src){let d=v.FileAccess.uriToFileUri(y.URI.parse(u.src));const p=this.notebookUri?b.join(b.dirname(this.notebookUri.fsPath),b.sep):"";let c=(0,f.findPathRelativeToContent)(p,d);if(c)return``}return``}}),this.turndownService.addRule("a",{filter:"a",replacement:(o,u)=>{const p=new f.NotebookLinkHandler(this.notebookUri,u,this.configurationService).getLinkUrl();return`[${o}](${p})`}}),this.turndownService.addRule("list",{filter:["ul","ol"],replacement:function(o,u){let d=u.parentNode;return d.nodeName==="LI"&&d.lastElementChild===u?` `+o:d.nodeName==="UL"||d.nodeName==="OL"?` `+o+` `:` `+o+` `}}),this.turndownService.addRule("lineBreak",{filter:"br",replacement:function(o,u,d){if(u.parentElement?.nodeName!=="LI")return u.parentElement?.nodeName==="TD"||u.parentElement?.nodeName==="TH"?"<br>":d.br+` `;let p=0;return u.parentElement?.childNodes?.forEach(c=>{c.nodeName==="BR"&&p++}),p>1?d.br+` `:""}}),this.turndownService.addRule("listItem",{filter:"li",replacement:function(o,u,d){o=o.replace(/^\n+/,"").replace(/\n+$/,` `).replace(/\n/gm,` `);let p=d.bulletListMarker+" ",c=u.parentNode,l=0;if(c.nodeName==="OL"){let n=c.getAttribute("start"),g=Array.prototype.indexOf.call(c.children,u);p=(n?Number(n)+g:g+1)+". "}else if(c.nodeName==="UL"){for(;c?.nodeName==="UL";)l++,c=c?.parentNode;p=" ".repeat(l-1)+d.bulletListMarker+" "}return p+o+(u.nextSibling&&!/\n$/.test(o)?` `:"")}}),this.turndownService.addRule("heading",{filter:["h1","h2","h3","h4","h5","h6"],replacement:function(o,u,d){let p=Number(u.nodeName.charAt(1));if(d.headingStyle==="setext"&&p<3){let c="#".repeat(p);return` `+o+` `+c+` `}else return` `+"#".repeat(p)+" "+o+` `}}),this.turndownService.addRule("bold",{filter:["strong","b"],replacement:function(o,u,d){return o=i(u,o),o.trim()?d.strongDelimiter+o+d.strongDelimiter:""}}),this.turndownService.addRule("italicize",{filter:["em","i"],replacement:function(o,u,d){return o=i(u,o),o.trim()?d.emDelimiter+o+d.emDelimiter:""}}),this.turndownService.addRule("code",{filter:function(o){let u=o.previousSibling||o.nextSibling,d=o.parentNode.nodeName==="PRE"&&!u;return o.nodeName==="CODE"&&!d},replacement:function(o,u,d){if(!o.trim())return"";let p="`",c="",l="",n=o.match(/`+/gm);if(n)for(/^`/.test(o)&&(c=" "),/`$/.test(o)&&(l=" ");n.indexOf(p)!==-1;)p=p+"`";return p+c+o+l+p}}),this.turndownService.addRule("p",{filter:"p",replacement:function(o,u){return r(u)?o:` `+o+` `}}),this.turndownService.escape=h}};e.HTMLMarkdownConverter=S,e.HTMLMarkdownConverter=S=fe([O(1,T.IConfigurationService)],S);function h(s){return m.reduce((o,u)=>o.replace(u[0],u[1]),s)}function a(s,o){return o.nodeName==="UL"||o.nodeName==="OL"?` `:r(o)?" ":o.isBlock?` `:""}function r(s){return s.parentNode?.nodeName==="TH"||s.parentNode?.nodeName==="TD"}function i(s,o){return s?.style?.backgroundColor==="yellow"?"<mark>"+o+"</mark>":o}e.addHighlightIfYellowBgExists=i}),define(Q[1148],Y([1,0,55,10,110,4515,340,320,186,205,1101,9,1016,22]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookMarkdownRenderer=void 0;let i=class{constructor(u){this._configurationService=u,this._baseUrls=[]}render(u){return{element:u?this.renderMarkdown(u,{cellAttachments:u.cellAttachments}):document.createElement("span"),dispose:()=>{}}}createElement(u){const d=u.inline?"span":"div",p=document.createElement(d);return u.className&&(p.className=u.className),p}parse(u){let d=JSON.parse(u);return d=(0,v.revive)(d,0),d}renderMarkdown(u,d={}){const p=this.createElement(d);let c;const l=new Promise(E=>c=E);let n=this._notebookURI?t.join(t.dirname(this._notebookURI.fsPath),t.sep):"";this._baseUrls.some(E=>E===n)||this._baseUrls.push(n);const g=this._configurationService.getValue(a.useNewMarkdownRendererKey),w=g?new T.marked.Renderer({baseUrl:n}):new D.Renderer({baseUrl:n});if(w.image=(E,C,I)=>{const _=s(E,d.cellAttachments);E=_||this.cleanUrl(!u.isTrusted,n,E);let A=[];if(E){const L=E.split("|").map(M=>M.trim());E=L[0];const R=L[1];if(R){const M=/height=(\d+)/.exec(R),N=/width=(\d+)/.exec(R),P=M?M[1]:"",x=N?N[1]:"",F=isFinite(parseInt(x)),V=isFinite(parseInt(P));F&&A.push(`width="${x}"`),V&&A.push(`height="${P}"`)}}let k=[];if(E){let L=y.URI.parse(E);L.scheme===r.Schemas.https||L.scheme===r.Schemas.http||L.scheme===r.Schemas.data||L.scheme===r.Schemas.attachment||L.scheme===r.Schemas.vscodeFileResource||(L=r.FileAccess.uriToBrowserUri(y.URI.file(E))),k.push(`src="${L.toString(!0)}"`)}return I&&k.push(`alt="${I}"`),C&&k.push(`title="${C}"`),A.length&&(k=k.concat(A)),"<img "+k.join(" ")+">"},w.link=(E,C,I)=>{let _=t.isAbsolute(E);if(E=this.cleanUrl(!u.isTrusted,n,E),E===null||(E===I&&(I=(0,b.removeMarkdownEscapes)(I)),C=(0,b.removeMarkdownEscapes)(C),_||(E=(0,b.removeMarkdownEscapes)(E)),!E||!u.isTrusted||E.match(/^data:|javascript:/i)||E.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)))return I;{y.URI.parse(E).scheme!=="mailto"&&(E=E.replace(/&(?!amp;)/g,"&")),E=E.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");let k=!!u.value;return`<a href=${E} data-href="${E}" title="${C||E}" is-markdown=${k} is-absolute=${_}>${I}</a>`}},w.paragraph=E=>`<p>${E}</p>`,d.codeBlockRenderer&&(w.code=(E,C)=>{const I=d.codeBlockRenderer(C,E),_=f.defaultGenerator.nextId(),A=I.then(k=>{l.then(L=>{const R=p.querySelector(`div[data-code="${_}"]`);R&&(R.innerHTML=k.innerHTML)}).catch(L=>{})});return d.asyncRenderCallback&&A.then(d.asyncRenderCallback),`<div class="code" data-code="${_}">${escape(E)}</div>`}),g){const E={sanitize:!u.isTrusted,renderer:w,baseUrl:n};p.innerHTML=T.marked.parse(u.value,E)}else{const E={sanitize:!u.isTrusted,renderer:w,baseUrl:n};p.innerHTML=D.parse(u.value,E)}return c(),p}cleanUrl(u,d,p){if(u){let l;try{l=decodeURIComponent(unescape(p)).replace(/[^\w:]/g,"").toLowerCase()}catch{return null}if(l.indexOf("javascript:")===0||l.indexOf("vbscript:")===0||l.indexOf("data:")===0)return null}try{if(y.URI.parse(p)&&t.isAbsolute(p))return p}catch{}d&&!/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i.test(p)&&!t.isAbsolute(p)&&(p=this.resolveUrl(d,p));try{p=encodeURI(p).replace(/%5C/g,"\\").replace(/%7C/g,"|").replace(/%25/g,"%")}catch{return null}return p}resolveUrl(u,d){return this._baseUrls[" "+u]||(/^[^:]+:\/*[^/]*$/.test(u)?this._baseUrls[" "+u]=u+"/":this._baseUrls[" "+u]=u.replace(/c*$/,"")),u=this._baseUrls[" "+u],d.slice(0,2)==="//"?u.replace(/:[\s\S]*/,":")+d:d.charAt(0)==="/"?u.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+d:d.slice(0,2)===".."?(d=(0,S.replaceInvalidLinkPath)(d),t.join(u,d)):u+d}setNotebookURI(u){this._notebookURI=u}};e.NotebookMarkdownRenderer=i,e.NotebookMarkdownRenderer=i=fe([O(0,h.IConfigurationService)],i);function s(o,u){if(o.startsWith("attachment:")&&u){const d=o.replace("attachment:",""),p=u[d];if(p){for(let c=0;c<m.ImageMimeTypes.length;c++)if(p[m.ImageMimeTypes[c]])return`data:${m.ImageMimeTypes[c]};base64,${p[m.ImageMimeTypes[c]]}`}}return""}}),define(Q[3170],Y([1,0,40,136,5,1148]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkdownOutputComponent=void 0;let T=class extends y.AngularDisposable{static{this.SELECTOR="markdown-output"}constructor(v){super(),this._instantiationService=v,this._initialized=!1,this.loading=!1,this._markdownRenderer=this._instantiationService.createInstance(D.NotebookMarkdownRenderer)}set bundleOptions(v){this._bundleOptions=v,this._initialized&&this.updatePreview()}get cellModel(){return this._cellModel}set cellModel(v){this._cellModel=v,this._initialized&&this.updatePreview()}get isTrusted(){return this._bundleOptions&&this._bundleOptions.trusted}get notebookUri(){return this.cellModel.notebookModel.notebookUri}ngOnInit(){this.updatePreview()}updatePreview(){if(!this._bundleOptions||!this._cellModel)return;if(this._bundleOptions&&this._lastTrustedMode!==this.isTrusted||!this._initialized){this._lastTrustedMode=this.isTrusted;let m=this._bundleOptions.data["text/markdown"];this._markdownRenderer.setNotebookURI(this.cellModel.notebookModel.notebookUri);let S=this._markdownRenderer.render({isTrusted:this.cellModel.trustedMode,value:m.toString()}),h=this.output.nativeElement;h.innerHTML=S.element.innerHTML,this._initialized=!0}}layout(){}handleContentChanged(){this.updatePreview()}};e.MarkdownOutputComponent=T,fe([(0,t.ViewChild)("output",{read:t.ElementRef})],T.prototype,"output",void 0),fe([(0,t.Input)()],T.prototype,"bundleOptions",null),fe([(0,t.Input)()],T.prototype,"mimeType",void 0),fe([(0,t.Input)()],T.prototype,"cellModel",null),e.MarkdownOutputComponent=T=fe([(0,t.Component)({selector:T.SELECTOR,templateUrl:decodeURI(q.toUrl("./markdownOutput.component.html"))}),O(0,(0,t.Inject)(b.IInstantiationService))],T)}),define(Q[3171],Y([1,0,6,4,51,50,57,9]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextResourceConfigurationService=void 0;let v=class extends y.Disposable{constructor(S,h,a){super(),this.configurationService=S,this.modelService=h,this.languageService=a,this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._register(this.configurationService.onDidChangeConfiguration(r=>this._onDidChangeConfiguration.fire(this.toResourceConfigurationChangeEvent(r))))}getValue(S,h,a){return typeof a=="string"?this._getValue(S,b.Position.isIPosition(h)?h:null,a):this._getValue(S,null,typeof h=="string"?h:void 0)}updateValue(S,h,a,r){const i=this.getLanguage(S,null),s=this.configurationService.inspect(h,{resource:S,overrideIdentifier:i});switch(r===void 0&&(r=this.deriveConfigurationTarget(s,i)),r){case 8:return this._updateValue(h,a,r,s.memory?.override,S,i);case 6:return this._updateValue(h,a,r,s.workspaceFolder?.override,S,i);case 5:return this._updateValue(h,a,r,s.workspace?.override,S,i);case 4:return this._updateValue(h,a,r,s.userRemote?.override,S,i);default:return this._updateValue(h,a,r,s.userLocal?.override,S,i)}}_updateValue(S,h,a,r,i,s){return s&&r!==void 0?this.configurationService.updateValue(S,h,{resource:i,overrideIdentifier:s},a):this.configurationService.updateValue(S,h,{resource:i},a)}deriveConfigurationTarget(S,h){if(h){if(S.memory?.override!==void 0)return 8;if(S.workspaceFolder?.override!==void 0)return 6;if(S.workspace?.override!==void 0)return 5;if(S.userRemote?.override!==void 0)return 4;if(S.userLocal?.override!==void 0)return 3}return S.memory?.value!==void 0?8:S.workspaceFolder?.value!==void 0?6:S.workspace?.value!==void 0?5:S.userRemote?.value!==void 0?4:3}_getValue(S,h,a){const r=S?this.getLanguage(S,h):void 0;return typeof a>"u"?this.configurationService.getValue({resource:S,overrideIdentifier:r}):this.configurationService.getValue(a,{resource:S,overrideIdentifier:r})}inspect(S,h,a){const r=S?this.getLanguage(S,h):void 0;return this.configurationService.inspect(a,{resource:S,overrideIdentifier:r})}getLanguage(S,h){const a=this.modelService.getModel(S);return a?h?a.getLanguageIdAtPosition(h.lineNumber,h.column):a.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(S)}toResourceConfigurationChangeEvent(S){return{affectedKeys:S.affectedKeys,affectsConfiguration:(h,a)=>{const r=h?this.getLanguage(h,null):void 0;return S.affectsConfiguration(a,{resource:h,overrideIdentifier:r})}}}};e.TextResourceConfigurationService=v,e.TextResourceConfigurationService=v=fe([O(0,f.IConfigurationService),O(1,T.IModelService),O(2,D.ILanguageService)],v)}),define(Q[8],Y([1,0,18,33,3150,5,2453,15]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.implies=e.IContextKeyService=e.RawContextKey=e.ContextKeyOrExpr=e.ContextKeyAndExpr=e.ContextKeyNotRegexExpr=e.ContextKeyRegexExpr=e.ContextKeySmallerEqualsExpr=e.ContextKeySmallerExpr=e.ContextKeyGreaterEqualsExpr=e.ContextKeyGreaterExpr=e.ContextKeyNotExpr=e.ContextKeyNotEqualsExpr=e.ContextKeyNotInExpr=e.ContextKeyInExpr=e.ContextKeyEqualsExpr=e.ContextKeyDefinedExpr=e.ContextKeyTrueExpr=e.ContextKeyFalseExpr=e.expressionsAreEqualWithConstantSubstitution=e.validateWhenClauses=e.ContextKeyExpr=e.Parser=e.ContextKeyExprType=e.setConstant=void 0;const v=new Map;v.set("false",!1),v.set("true",!0),v.set("isMac",t.isMacintosh),v.set("isLinux",t.isLinux),v.set("isWindows",t.isWindows),v.set("isWeb",t.isWeb),v.set("isMacNative",t.isMacintosh&&!t.isWeb),v.set("isEdge",t.isEdge),v.set("isFirefox",t.isFirefox),v.set("isChrome",t.isChrome),v.set("isSafari",t.isSafari);function m(ee,X){if(v.get(ee)!==void 0)throw(0,f.illegalArgument)("contextkey.setConstant(k, v) invoked with already set constant `k`");v.set(ee,X)}e.setConstant=m;const S=Object.prototype.hasOwnProperty;var h;(function(ee){ee[ee.False=0]="False",ee[ee.True=1]="True",ee[ee.Defined=2]="Defined",ee[ee.Not=3]="Not",ee[ee.Equals=4]="Equals",ee[ee.NotEquals=5]="NotEquals",ee[ee.And=6]="And",ee[ee.Regex=7]="Regex",ee[ee.NotRegex=8]="NotRegex",ee[ee.Or=9]="Or",ee[ee.In=10]="In",ee[ee.NotIn=11]="NotIn",ee[ee.Greater=12]="Greater",ee[ee.GreaterEquals=13]="GreaterEquals",ee[ee.Smaller=14]="Smaller",ee[ee.SmallerEquals=15]="SmallerEquals"})(h||(e.ContextKeyExprType=h={}));const a={regexParsingWithErrorRecovery:!0},r=(0,T.localize)(0,null),i=(0,T.localize)(1,null),s=(0,T.localize)(2,null),o=(0,T.localize)(3,null),u=(0,T.localize)(4,null),d=(0,T.localize)(5,null),p=(0,T.localize)(6,null),c=(0,T.localize)(7,null);class l{static{this._parseError=new Error}get lexingErrors(){return this._scanner.errors}get parsingErrors(){return this._parsingErrors}constructor(X=a){this._config=X,this._scanner=new b.Scanner,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(X){if(X===""){this._parsingErrors.push({message:r,offset:0,lexeme:"",additionalInfo:i});return}this._tokens=this._scanner.reset(X).scan(),this._current=0,this._parsingErrors=[];try{const te=this._expr();if(!this._isAtEnd()){const Z=this._peek(),se=Z.type===17?d:void 0;throw this._parsingErrors.push({message:u,offset:Z.offset,lexeme:b.Scanner.getLexeme(Z),additionalInfo:se}),l._parseError}return te}catch(te){if(te!==l._parseError)throw te;return}}_expr(){return this._or()}_or(){const X=[this._and()];for(;this._matchOne(16);){const te=this._and();X.push(te)}return X.length===1?X[0]:n.or(...X)}_and(){const X=[this._term()];for(;this._matchOne(15);){const te=this._term();X.push(te)}return X.length===1?X[0]:n.and(...X)}_term(){if(this._matchOne(2)){const X=this._peek();switch(X.type){case 11:return this._advance(),C.INSTANCE;case 12:return this._advance(),I.INSTANCE;case 0:{this._advance();const te=this._expr();return this._consume(1,o),te?.negate()}case 17:return this._advance(),M.create(X.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",X)}}return this._primary()}_primary(){const X=this._peek();switch(X.type){case 11:return this._advance(),n.true();case 12:return this._advance(),n.false();case 0:{this._advance();const te=this._expr();return this._consume(1,o),te}case 17:{const te=X.lexeme;if(this._advance(),this._matchOne(9)){const se=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),se.type!==10)throw this._errExpectedButGot("REGEX",se);const re=se.lexeme,oe=re.lastIndexOf("/"),le=oe===re.length-1?void 0:this._removeFlagsGY(re.substring(oe+1));let ne;try{ne=new RegExp(re.substring(1,oe),le)}catch{throw this._errExpectedButGot("REGEX",se)}return W.create(te,ne)}switch(se.type){case 10:case 19:{const re=[se.lexeme];this._advance();let oe=this._peek(),le=0;for(let de=0;de<se.lexeme.length;de++)se.lexeme.charCodeAt(de)===40?le++:se.lexeme.charCodeAt(de)===41&&le--;for(;!this._isAtEnd()&&oe.type!==15&&oe.type!==16;){switch(oe.type){case 0:le++;break;case 1:le--;break;case 10:case 18:for(let de=0;de<oe.lexeme.length;de++)oe.lexeme.charCodeAt(de)===40?le++:se.lexeme.charCodeAt(de)===41&&le--}if(le<0)break;re.push(b.Scanner.getLexeme(oe)),this._advance(),oe=this._peek()}const ne=re.join(""),ce=ne.lastIndexOf("/"),ae=ce===ne.length-1?void 0:this._removeFlagsGY(ne.substring(ce+1));let ue;try{ue=new RegExp(ne.substring(1,ce),ae)}catch{throw this._errExpectedButGot("REGEX",se)}return n.regex(te,ue)}case 18:{const re=se.lexeme;this._advance();let oe=null;if(!(0,y.isFalsyOrWhitespace)(re)){const le=re.indexOf("/"),ne=re.lastIndexOf("/");if(le!==ne&&le>=0){const ce=re.slice(le+1,ne),ae=re[ne+1]==="i"?"i":"";try{oe=new RegExp(ce,ae)}catch{throw this._errExpectedButGot("REGEX",se)}}}if(oe===null)throw this._errExpectedButGot("REGEX",se);return W.create(te,oe)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,s);const se=this._value();return n.notIn(te,se)}switch(this._peek().type){case 3:{this._advance();const se=this._value();if(this._previous().type===18)return n.equals(te,se);switch(se){case"true":return n.has(te);case"false":return n.not(te);default:return n.equals(te,se)}}case 4:{this._advance();const se=this._value();if(this._previous().type===18)return n.notEquals(te,se);switch(se){case"true":return n.not(te);case"false":return n.has(te);default:return n.notEquals(te,se)}}case 5:return this._advance(),F.create(te,this._value());case 6:return this._advance(),V.create(te,this._value());case 7:return this._advance(),P.create(te,this._value());case 8:return this._advance(),x.create(te,this._value());case 13:return this._advance(),n.in(te,this._value());default:return n.has(te)}}case 20:throw this._parsingErrors.push({message:p,offset:X.offset,lexeme:"",additionalInfo:c}),l._parseError;default:throw this._errExpectedButGot(`true | false | KEY | KEY '=~' REGEX | KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const X=this._peek();switch(X.type){case 17:case 18:return this._advance(),X.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(X){return X.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(X){return this._check(X)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(X,te){if(this._check(X))return this._advance();throw this._errExpectedButGot(te,this._peek())}_errExpectedButGot(X,te,Z){const se=(0,T.localize)(8,null,X,b.Scanner.getLexeme(te)),re=te.offset,oe=b.Scanner.getLexeme(te);return this._parsingErrors.push({message:se,offset:re,lexeme:oe,additionalInfo:Z}),l._parseError}_check(X){return this._peek().type===X}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}}e.Parser=l;class n{static false(){return C.INSTANCE}static true(){return I.INSTANCE}static has(X){return _.create(X)}static equals(X,te){return A.create(X,te)}static notEquals(X,te){return R.create(X,te)}static regex(X,te){return W.create(X,te)}static in(X,te){return k.create(X,te)}static notIn(X,te){return L.create(X,te)}static not(X){return M.create(X)}static and(...X){return K.create(X,null,!0)}static or(...X){return H.create(X,null,!0)}static greater(X,te){return P.create(X,te)}static greaterEquals(X,te){return x.create(X,te)}static smaller(X,te){return F.create(X,te)}static smallerEquals(X,te){return V.create(X,te)}static{this._parser=new l({regexParsingWithErrorRecovery:!1})}static deserialize(X){return X==null?void 0:this._parser.parse(X)}}e.ContextKeyExpr=n;function g(ee){const X=new l({regexParsingWithErrorRecovery:!1});return ee.map(te=>(X.parse(te),X.lexingErrors.length>0?X.lexingErrors.map(Z=>({errorMessage:Z.additionalInfo?(0,T.localize)(9,null,Z.additionalInfo):(0,T.localize)(10,null),offset:Z.offset,length:Z.lexeme.length})):X.parsingErrors.length>0?X.parsingErrors.map(Z=>({errorMessage:Z.additionalInfo?`${Z.message}. ${Z.additionalInfo}`:Z.message,offset:Z.offset,length:Z.lexeme.length})):[]))}e.validateWhenClauses=g;function w(ee,X){const te=ee?ee.substituteConstants():void 0,Z=X?X.substituteConstants():void 0;return!te&&!Z?!0:!te||!Z?!1:te.equals(Z)}e.expressionsAreEqualWithConstantSubstitution=w;function E(ee,X){return ee.cmp(X)}class C{static{this.INSTANCE=new C}constructor(){this.type=0}cmp(X){return this.type-X.type}equals(X){return X.type===this.type}substituteConstants(){return this}evaluate(X){return!1}serialize(){return"false"}keys(){return[]}map(X){return this}negate(){return I.INSTANCE}}e.ContextKeyFalseExpr=C;class I{static{this.INSTANCE=new I}constructor(){this.type=1}cmp(X){return this.type-X.type}equals(X){return X.type===this.type}substituteConstants(){return this}evaluate(X){return!0}serialize(){return"true"}keys(){return[]}map(X){return this}negate(){return C.INSTANCE}}e.ContextKeyTrueExpr=I;class _{static create(X,te=null){const Z=v.get(X);return typeof Z=="boolean"?Z?I.INSTANCE:C.INSTANCE:new _(X,te)}constructor(X,te){this.key=X,this.negated=te,this.type=2}cmp(X){return X.type!==this.type?this.type-X.type:G(this.key,X.key)}equals(X){return X.type===this.type?this.key===X.key:!1}substituteConstants(){const X=v.get(this.key);return typeof X=="boolean"?X?I.INSTANCE:C.INSTANCE:this}evaluate(X){return!!X.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}map(X){return X.mapDefined(this.key)}negate(){return this.negated||(this.negated=M.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=_;class A{static create(X,te,Z=null){if(typeof te=="boolean")return te?_.create(X,Z):M.create(X,Z);const se=v.get(X);return typeof se=="boolean"?te===(se?"true":"false")?I.INSTANCE:C.INSTANCE:new A(X,te,Z)}constructor(X,te,Z){this.key=X,this.value=te,this.negated=Z,this.type=4}cmp(X){return X.type!==this.type?this.type-X.type:$(this.key,this.value,X.key,X.value)}equals(X){return X.type===this.type?this.key===X.key&&this.value===X.value:!1}substituteConstants(){const X=v.get(this.key);if(typeof X=="boolean"){const te=X?"true":"false";return this.value===te?I.INSTANCE:C.INSTANCE}return this}evaluate(X){return X.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}map(X){return X.mapEquals(this.key,this.value)}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=A;class k{static create(X,te){return new k(X,te)}constructor(X,te){this.key=X,this.valueKey=te,this.type=10,this.negated=null}cmp(X){return X.type!==this.type?this.type-X.type:$(this.key,this.valueKey,X.key,X.valueKey)}equals(X){return X.type===this.type?this.key===X.key&&this.valueKey===X.valueKey:!1}substituteConstants(){return this}evaluate(X){const te=X.getValue(this.valueKey),Z=X.getValue(this.key);return Array.isArray(te)?te.includes(Z):typeof Z=="string"&&typeof te=="object"&&te!==null?S.call(te,Z):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}map(X){return X.mapIn(this.key,this.valueKey)}negate(){return this.negated||(this.negated=L.create(this.key,this.valueKey)),this.negated}}e.ContextKeyInExpr=k;class L{static create(X,te){return new L(X,te)}constructor(X,te){this.key=X,this.valueKey=te,this.type=11,this._negated=k.create(X,te)}cmp(X){return X.type!==this.type?this.type-X.type:this._negated.cmp(X._negated)}equals(X){return X.type===this.type?this._negated.equals(X._negated):!1}substituteConstants(){return this}evaluate(X){return!this._negated.evaluate(X)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}map(X){return X.mapNotIn(this.key,this.valueKey)}negate(){return this._negated}}e.ContextKeyNotInExpr=L;class R{static create(X,te,Z=null){if(typeof te=="boolean")return te?M.create(X,Z):_.create(X,Z);const se=v.get(X);return typeof se=="boolean"?te===(se?"true":"false")?C.INSTANCE:I.INSTANCE:new R(X,te,Z)}constructor(X,te,Z){this.key=X,this.value=te,this.negated=Z,this.type=5}cmp(X){return X.type!==this.type?this.type-X.type:$(this.key,this.value,X.key,X.value)}equals(X){return X.type===this.type?this.key===X.key&&this.value===X.value:!1}substituteConstants(){const X=v.get(this.key);if(typeof X=="boolean"){const te=X?"true":"false";return this.value===te?C.INSTANCE:I.INSTANCE}return this}evaluate(X){return X.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}map(X){return X.mapNotEquals(this.key,this.value)}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=R;class M{static create(X,te=null){const Z=v.get(X);return typeof Z=="boolean"?Z?C.INSTANCE:I.INSTANCE:new M(X,te)}constructor(X,te){this.key=X,this.negated=te,this.type=3}cmp(X){return X.type!==this.type?this.type-X.type:G(this.key,X.key)}equals(X){return X.type===this.type?this.key===X.key:!1}substituteConstants(){const X=v.get(this.key);return typeof X=="boolean"?X?C.INSTANCE:I.INSTANCE:this}evaluate(X){return!X.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}map(X){return X.mapNot(this.key)}negate(){return this.negated||(this.negated=_.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=M;function N(ee,X){if(typeof ee=="string"){const te=parseFloat(ee);isNaN(te)||(ee=te)}return typeof ee=="string"||typeof ee=="number"?X(ee):C.INSTANCE}class P{static create(X,te,Z=null){return N(te,se=>new P(X,se,Z))}constructor(X,te,Z){this.key=X,this.value=te,this.negated=Z,this.type=12}cmp(X){return X.type!==this.type?this.type-X.type:$(this.key,this.value,X.key,X.value)}equals(X){return X.type===this.type?this.key===X.key&&this.value===X.value:!1}substituteConstants(){return this}evaluate(X){return typeof this.value=="string"?!1:parseFloat(X.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}map(X){return X.mapGreater(this.key,this.value)}negate(){return this.negated||(this.negated=V.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=P;class x{static create(X,te,Z=null){return N(te,se=>new x(X,se,Z))}constructor(X,te,Z){this.key=X,this.value=te,this.negated=Z,this.type=13}cmp(X){return X.type!==this.type?this.type-X.type:$(this.key,this.value,X.key,X.value)}equals(X){return X.type===this.type?this.key===X.key&&this.value===X.value:!1}substituteConstants(){return this}evaluate(X){return typeof this.value=="string"?!1:parseFloat(X.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}map(X){return X.mapGreaterEquals(this.key,this.value)}negate(){return this.negated||(this.negated=F.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=x;class F{static create(X,te,Z=null){return N(te,se=>new F(X,se,Z))}constructor(X,te,Z){this.key=X,this.value=te,this.negated=Z,this.type=14}cmp(X){return X.type!==this.type?this.type-X.type:$(this.key,this.value,X.key,X.value)}equals(X){return X.type===this.type?this.key===X.key&&this.value===X.value:!1}substituteConstants(){return this}evaluate(X){return typeof this.value=="string"?!1:parseFloat(X.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}map(X){return X.mapSmaller(this.key,this.value)}negate(){return this.negated||(this.negated=x.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerExpr=F;class V{static create(X,te,Z=null){return N(te,se=>new V(X,se,Z))}constructor(X,te,Z){this.key=X,this.value=te,this.negated=Z,this.type=15}cmp(X){return X.type!==this.type?this.type-X.type:$(this.key,this.value,X.key,X.value)}equals(X){return X.type===this.type?this.key===X.key&&this.value===X.value:!1}substituteConstants(){return this}evaluate(X){return typeof this.value=="string"?!1:parseFloat(X.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}map(X){return X.mapSmallerEquals(this.key,this.value)}negate(){return this.negated||(this.negated=P.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=V;class W{static create(X,te){return new W(X,te)}constructor(X,te){this.key=X,this.regexp=te,this.type=7,this.negated=null}cmp(X){if(X.type!==this.type)return this.type-X.type;if(this.key<X.key)return-1;if(this.key>X.key)return 1;const te=this.regexp?this.regexp.source:"",Z=X.regexp?X.regexp.source:"";return te<Z?-1:te>Z?1:0}equals(X){if(X.type===this.type){const te=this.regexp?this.regexp.source:"",Z=X.regexp?X.regexp.source:"";return this.key===X.key&&te===Z}return!1}substituteConstants(){return this}evaluate(X){const te=X.getValue(this.key);return this.regexp?this.regexp.test(te):!1}serialize(){const X=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${X}`}keys(){return[this.key]}map(X){return X.mapRegex(this.key,this.regexp)}negate(){return this.negated||(this.negated=z.create(this)),this.negated}}e.ContextKeyRegexExpr=W;class z{static create(X){return new z(X)}constructor(X){this._actual=X,this.type=8}cmp(X){return X.type!==this.type?this.type-X.type:this._actual.cmp(X._actual)}equals(X){return X.type===this.type?this._actual.equals(X._actual):!1}substituteConstants(){return this}evaluate(X){return!this._actual.evaluate(X)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}map(X){return new z(this._actual.map(X))}negate(){return this._actual}}e.ContextKeyNotRegexExpr=z;function B(ee){let X=null;for(let te=0,Z=ee.length;te<Z;te++){const se=ee[te].substituteConstants();if(ee[te]!==se&&X===null){X=[];for(let re=0;re<te;re++)X[re]=ee[re]}X!==null&&(X[te]=se)}return X===null?ee:X}class K{static create(X,te,Z){return K._normalizeArr(X,te,Z)}constructor(X,te){this.expr=X,this.negated=te,this.type=6}cmp(X){if(X.type!==this.type)return this.type-X.type;if(this.expr.length<X.expr.length)return-1;if(this.expr.length>X.expr.length)return 1;for(let te=0,Z=this.expr.length;te<Z;te++){const se=E(this.expr[te],X.expr[te]);if(se!==0)return se}return 0}equals(X){if(X.type===this.type){if(this.expr.length!==X.expr.length)return!1;for(let te=0,Z=this.expr.length;te<Z;te++)if(!this.expr[te].equals(X.expr[te]))return!1;return!0}return!1}substituteConstants(){const X=B(this.expr);return X===this.expr?this:K.create(X,this.negated,!1)}evaluate(X){for(let te=0,Z=this.expr.length;te<Z;te++)if(!this.expr[te].evaluate(X))return!1;return!0}static _normalizeArr(X,te,Z){const se=[];let re=!1;for(const oe of X)if(oe){if(oe.type===1){re=!0;continue}if(oe.type===0)return C.INSTANCE;if(oe.type===6){se.push(...oe.expr);continue}se.push(oe)}if(se.length===0&&re)return I.INSTANCE;if(se.length!==0){if(se.length===1)return se[0];se.sort(E);for(let oe=1;oe<se.length;oe++)se[oe-1].equals(se[oe])&&(se.splice(oe,1),oe--);if(se.length===1)return se[0];for(;se.length>1;){const oe=se[se.length-1];if(oe.type!==9)break;se.pop();const le=se.pop(),ne=se.length===0,ce=H.create(oe.expr.map(ae=>K.create([ae,le],null,Z)),null,ne);ce&&(se.push(ce),se.sort(E))}if(se.length===1)return se[0];if(Z){for(let oe=0;oe<se.length;oe++)for(let le=oe+1;le<se.length;le++)if(se[oe].negate().equals(se[le]))return C.INSTANCE;if(se.length===1)return se[0]}return new K(se,te)}}serialize(){return this.expr.map(X=>X.serialize()).join(" && ")}keys(){const X=[];for(const te of this.expr)X.push(...te.keys());return X}map(X){return new K(this.expr.map(te=>te.map(X)),null)}negate(){if(!this.negated){const X=[];for(const te of this.expr)X.push(te.negate());this.negated=H.create(X,this,!0)}return this.negated}}e.ContextKeyAndExpr=K;class H{static create(X,te,Z){return H._normalizeArr(X,te,Z)}constructor(X,te){this.expr=X,this.negated=te,this.type=9}cmp(X){if(X.type!==this.type)return this.type-X.type;if(this.expr.length<X.expr.length)return-1;if(this.expr.length>X.expr.length)return 1;for(let te=0,Z=this.expr.length;te<Z;te++){const se=E(this.expr[te],X.expr[te]);if(se!==0)return se}return 0}equals(X){if(X.type===this.type){if(this.expr.length!==X.expr.length)return!1;for(let te=0,Z=this.expr.length;te<Z;te++)if(!this.expr[te].equals(X.expr[te]))return!1;return!0}return!1}substituteConstants(){const X=B(this.expr);return X===this.expr?this:H.create(X,this.negated,!1)}evaluate(X){for(let te=0,Z=this.expr.length;te<Z;te++)if(this.expr[te].evaluate(X))return!0;return!1}static _normalizeArr(X,te,Z){let se=[],re=!1;if(X){for(let oe=0,le=X.length;oe<le;oe++){const ne=X[oe];if(ne){if(ne.type===0){re=!0;continue}if(ne.type===1)return I.INSTANCE;if(ne.type===9){se=se.concat(ne.expr);continue}se.push(ne)}}if(se.length===0&&re)return C.INSTANCE;se.sort(E)}if(se.length!==0){if(se.length===1)return se[0];for(let oe=1;oe<se.length;oe++)se[oe-1].equals(se[oe])&&(se.splice(oe,1),oe--);if(se.length===1)return se[0];if(Z){for(let oe=0;oe<se.length;oe++)for(let le=oe+1;le<se.length;le++)if(se[oe].negate().equals(se[le]))return I.INSTANCE;if(se.length===1)return se[0]}return new H(se,te)}}serialize(){return this.expr.map(X=>X.serialize()).join(" || ")}keys(){const X=[];for(const te of this.expr)X.push(...te.keys());return X}map(X){return new H(this.expr.map(te=>te.map(X)),null)}negate(){if(!this.negated){const X=[];for(const te of this.expr)X.push(te.negate());for(;X.length>1;){const te=X.shift(),Z=X.shift(),se=[];for(const re of j(te))for(const oe of j(Z))se.push(K.create([re,oe],null,!1));X.unshift(H.create(se,null,!1))}this.negated=H.create(X,this,!0)}return this.negated}}e.ContextKeyOrExpr=H;class U extends _{static{this._info=[]}static all(){return U._info.values()}constructor(X,te,Z){super(X,null),this._defaultValue=te,typeof Z=="object"?U._info.push({...Z,key:X}):Z!==!0&&U._info.push({key:X,description:Z,type:te!=null?typeof te:void 0})}bindTo(X){return X.createKey(this.key,this._defaultValue)}getValue(X){return X.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(X){return A.create(this.key,X)}notEqualsTo(X){return R.create(this.key,X)}}e.RawContextKey=U,e.IContextKeyService=(0,D.createDecorator)("contextKeyService");function G(ee,X){return ee<X?-1:ee>X?1:0}function $(ee,X,te,Z){return ee<te?-1:ee>te?1:X<Z?-1:X>Z?1:0}function ie(ee,X){if(ee.type===0||X.type===1)return!0;if(ee.type===9)return X.type===9?J(ee.expr,X.expr):!1;if(X.type===9){for(const te of X.expr)if(ie(ee,te))return!0;return!1}if(ee.type===6){if(X.type===6)return J(X.expr,ee.expr);for(const te of ee.expr)if(ie(te,X))return!0;return!1}return ee.equals(X)}e.implies=ie;function J(ee,X){let te=0,Z=0;for(;te<ee.length&&Z<X.length;){const se=ee[te].cmp(X[Z]);if(se<0)return!1;se===0&&te++,Z++}return te===ee.length}function j(ee){return ee.type===9?ee.expr:[ee]}}),define(Q[143],Y([1,0,8,1976]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notebookMultipleRequestsError=e.RESULTS_GRID_DEFAULTS=e.NotebookLanguage=e.NBFORMAT_MINOR=e.NBFORMAT=e.DEFAULT_NOTEBOOK_FILETYPE=e.CELL_URI_PATH_PREFIX=e.TSGOPS_WEB_QUALITY=e.IPYKERNEL_DISPLAY_NAME=e.VSCODE_JUPYTER_PROVIDER_ID=e.JUPYTER_PROVIDER_ID=e.RESOURCE_VIEWER_TYPEID=e.FILE_QUERY_EDITOR_TYPEID=e.UNTITLED_QUERY_EDITOR_TYPEID=e.UNTITLED_NOTEBOOK_TYPEID=e.SearchInputBoxFocusedKey=e.InputBoxFocusedKey=e.SearchViewFocusedKey=e.CONFIG_WORKBENCH_USEVSCODENOTEBOOKS=e.CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES=e.AddCursorsAtSearchResults=e.ToggleRegexCommandId=e.ToggleWholeWordCommandId=e.ToggleCaseSensitiveCommandId=e.FocusSearchListCommandID=e.ClearSearchHistoryCommandId=e.OpenInEditorCommandId=e.CopyAllCommandId=e.CopyMatchCommandId=e.CopyPathCommandId=e.RemoveActionId=e.CancelActionId=e.OpenMatchToSide=e.FocusSearchFromResults=e.FocusActiveEditorCommandId=e.FindInNotebooksActionId=void 0,e.FindInNotebooksActionId="workbench.action.findInNotebooks",e.FocusActiveEditorCommandId="notebookSearch.action.focusActiveEditor",e.FocusSearchFromResults="notebookSearch.action.focusSearchFromResults",e.OpenMatchToSide="notebookSearch.action.openResultToSide",e.CancelActionId="notebookSearch.action.cancel",e.RemoveActionId="notebookSearch.action.remove",e.CopyPathCommandId="notebookSearch.action.copyPath",e.CopyMatchCommandId="notebookSearch.action.copyMatch",e.CopyAllCommandId="notebookSearch.action.copyAll",e.OpenInEditorCommandId="notebookSearch.action.openInEditor",e.ClearSearchHistoryCommandId="notebookSearch.action.clearHistory",e.FocusSearchListCommandID="notebookSearch.action.focusSearchList",e.ToggleCaseSensitiveCommandId="toggleSearchCaseSensitive",e.ToggleWholeWordCommandId="toggleSearchWholeWord",e.ToggleRegexCommandId="toggleSearchRegex",e.AddCursorsAtSearchResults="addCursorsAtSearchResults",e.CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES="workbench.enablePreviewFeatures",e.CONFIG_WORKBENCH_USEVSCODENOTEBOOKS="workbench.useVSCodeNotebooks",e.SearchViewFocusedKey=new t.RawContextKey("notebookSearchViewletFocus",!1),e.InputBoxFocusedKey=new t.RawContextKey("inputBoxFocus",!1),e.SearchInputBoxFocusedKey=new t.RawContextKey("searchInputBoxFocus",!1),e.UNTITLED_NOTEBOOK_TYPEID="workbench.editorinputs.untitledNotebookInput",e.UNTITLED_QUERY_EDITOR_TYPEID="workbench.editorInput.untitledQueryInput",e.FILE_QUERY_EDITOR_TYPEID="workbench.editorInput.fileQueryInput",e.RESOURCE_VIEWER_TYPEID="workbench.editorInput.resourceViewerInput",e.JUPYTER_PROVIDER_ID="jupyter",e.VSCODE_JUPYTER_PROVIDER_ID="jupyter-notebook",e.IPYKERNEL_DISPLAY_NAME="Python 3 (ipykernel)",e.TSGOPS_WEB_QUALITY="tsgops-image",e.CELL_URI_PATH_PREFIX="notebook-editor-",e.DEFAULT_NOTEBOOK_FILETYPE=".ipynb",e.NBFORMAT=4,e.NBFORMAT_MINOR=2;var b;(function(D){D.Notebook="notebook",D.Ipynb="ipynb"})(b||(e.NotebookLanguage=b={})),e.RESULTS_GRID_DEFAULTS={cellPadding:[5,8,4],rowHeight:24},e.notebookMultipleRequestsError=y.localize(0,null)}),define(Q[451],Y([1,0,4,8,58,774]),function(q,e,t,y,b,D){"use strict";var T;Object.defineProperty(e,"__esModule",{value:!0}),e.ItemContextKey=void 0;let f=class extends t.Disposable{static{T=this}static{this.ItemType=new y.RawContextKey("itemType",void 0)}static{this.Item=new y.RawContextKey("item",void 0)}static{this.ConnectionProvider=new y.RawContextKey("provider",void 0)}static{this.IsCloud=new y.RawContextKey("isCloud",void 0)}static{this.EngineEdition=new y.RawContextKey("engineEdition",void 0)}constructor(m){super(),this._itemTypeKey=T.ItemType.bindTo(m),this._itemKey=T.Item.bindTo(m),this._connectionProviderKey=T.ConnectionProvider.bindTo(m),this._isCloudKey=T.IsCloud.bindTo(m),this._engineEditionKey=T.EngineEdition.bindTo(m)}set(m){if(this._itemKey.set(m),this._connectionProviderKey.set(m.providerName.toLowerCase()),this._isCloudKey.set(m.isCloud),this._engineEditionKey.set(m.engineEdition),m.resource instanceof D.ObjectMetadataWrapper)switch(m.resource.metadataType){case b.MetadataType.Function:this._itemTypeKey.set("function");break;case b.MetadataType.SProc:this._itemTypeKey.set("sproc");break;case b.MetadataType.Table:this._itemTypeKey.set("table");break;case b.MetadataType.View:this._itemTypeKey.set("view");break}else this._itemTypeKey.set("database")}reset(){this._itemTypeKey.reset(),this._itemKey.reset(),this._connectionProviderKey.reset(),this._isCloudKey.reset(),this._engineEditionKey.reset()}get(){return this._itemKey.get()}};e.ItemContextKey=f,e.ItemContextKey=f=T=fe([O(0,y.IContextKeyService)],f)}),define(Q[585],Y([1,0,8]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResultsMessagesFocussedContext=e.ResultsGridFocussedContext=e.ResultsVisibleContext=e.QueryEditorVisibleContext=e.resultsMessagesFocussedId=e.resultsGridFocussedId=e.resultsVisibleId=e.queryEditorVisibleId=void 0,e.queryEditorVisibleId="queryEditorVisible",e.resultsVisibleId="resultsVisible",e.resultsGridFocussedId="resultsGridFocussed",e.resultsMessagesFocussedId="resultsMessagesFocussed",e.QueryEditorVisibleContext=new t.RawContextKey(e.queryEditorVisibleId,!1),e.ResultsVisibleContext=new t.RawContextKey(e.resultsVisibleId,!1),e.ResultsGridFocussedContext=new t.RawContextKey(e.resultsGridFocussedId,!1),e.ResultsMessagesFocussedContext=new t.RawContextKey(e.resultsMessagesFocussedId,!1)}),define(Q[858],Y([1,0,8]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InQueryResultGridContextKey=e.TableFilteringEnabledContextKey=e.InTableContextKey=void 0,e.InTableContextKey=new t.RawContextKey("inTable",!0),e.TableFilteringEnabledContextKey=new t.RawContextKey("filteringEnabled",!1),e.InQueryResultGridContextKey=new t.RawContextKey("inQueryResultGrid",!0)}),define(Q[170],Y([1,0,858,5,8,403]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComponentContextService=e.IComponentContextService=e.SERVICE_ID=void 0,e.SERVICE_ID="componentContextService",e.IComponentContextService=(0,y.createDecorator)(e.SERVICE_ID);var T;(function(v){v.Table="Table",v.QueryResultGrid="QueryResultGrid"})(T||(T={}));let f=class{constructor(m){this._contextKeyService=m,this._components=new Map,this._currentId=1}registerTable(m,S){return this.registerComponent(T.Table,m,m.grid.getContainerNode(),S,h=>{t.InTableContextKey.bindTo(h).set(!0),t.TableFilteringEnabledContextKey.bindTo(h).set(m.grid.getPlugins().find(a=>a instanceof D.HeaderFilter)!==void 0)})}getActiveTable(){return this.getActiveComponent(T.Table,m=>m.grid.getContainerNode())}registerQueryResultGrid(m,S){return this.registerComponent(T.QueryResultGrid,m,m.htmlElement,S,h=>{t.InQueryResultGridContextKey.bindTo(h).set(!0)})}getActiveQueryResultGrid(){return this.getActiveComponent(T.QueryResultGrid,m=>m.htmlElement)}registerComponent(m,S,h,a,r){const i=a??this._contextKeyService,s=this._currentId++;this._components.set(s,{type:m,component:S});const o=i.createScoped(h);return r(o),{componentContextKeyService:o,dispose:()=>{this._components.delete(s),o.dispose()}}}getActiveComponent(m,S){for(const h of this._components.values())if(h.type===m&&S(h.component).contains(document.activeElement))return h.component}};e.ComponentContextService=f,e.ComponentContextService=f=fe([O(0,b.IContextKeyService)],f)}),define(Q[130],Y([1,0,5,27,143]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookRange=e.unsavedBooksContextKey=e.NavigationProviders=e.DefaultNotebookProviders=e.OVERRIDE_EDITOR_THEMING_SETTING=e.SQL_NOTEBOOK_PROVIDER=e.DEFAULT_NOTEBOOK_PROVIDER=e.INotebookService=e.SERVICE_ID=void 0,e.SERVICE_ID="sqlNotebookService",e.INotebookService=(0,t.createDecorator)(e.SERVICE_ID),e.DEFAULT_NOTEBOOK_PROVIDER="builtin",e.SQL_NOTEBOOK_PROVIDER="sql",e.OVERRIDE_EDITOR_THEMING_SETTING="notebook.overrideEditorTheming",e.DefaultNotebookProviders=[e.SQL_NOTEBOOK_PROVIDER,b.JUPYTER_PROVIDER_ID];var D;(function(f){f.NotebooksNavigator="BookNavigator.Notebooks",f.ProvidedBooksNavigator="BookNavigator.ProvidedBooks"})(D||(e.NavigationProviders=D={})),e.unsavedBooksContextKey="unsavedBooks";class T extends y.Range{updateActiveCell(v){this.cell=v}constructor(v,m,S,h,a,r,i){super(m,S,h,a),this.updateActiveCell(v),this.isMarkdownSourceCell=r||!1,this.outputComponentIndex=i>=0?i:-1}}e.NotebookRange=T}),define(Q[3172],Y([1,0,34,130,27,165,51,1015]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleViewAction=e.insertFormattedMarkdown=e.MarkdownLineType=e.MarkdownButtonType=e.MarkdownTextTransformer=e.TransformMarkdownAction=void 0;let v=class extends t.Action{constructor(l,n,g,w,E,C,I){super(l,n,g),this._cellModel=E,this._type=C,this._notebookService=I,this._tooltip=w}async run(l){!l?.cellModel?.showMarkdown&&l?.cellModel?.showPreview?(this.transformDocumentCommand(),this._cellModel.notebookModel.sendNotebookTelemetryActionEvent("TextCellToolbarAction",{transformAction:this._type,mode:"RichTextView"})):(await new m(this._notebookService,this._cellModel).transformText(this._type),this._cellModel.notebookModel.sendNotebookTelemetryActionEvent("TextCellToolbarAction",{transformAction:this._type,mode:l.cellModel.showPreview?"Splitview":"MarkdownView"}))}transformDocumentCommand(){switch(this._type){case S.BOLD:document.execCommand("bold");break;case S.CODE:document.execCommand("formatBlock",!1,"pre");break;case S.HEADING1:document.execCommand("formatBlock",!1,"H1");break;case S.HEADING2:document.execCommand("formatBlock",!1,"H2");break;case S.HEADING3:document.execCommand("formatBlock",!1,"H3");break;case S.HIGHLIGHT:(0,f.highlightSelectedText)();break;case S.IMAGE:case S.IMAGE_PREVIEW:break;case S.ITALIC:document.execCommand("italic");break;case S.LINK:case S.LINK_PREVIEW:document.execCommand("createLink",!1,window.getSelection()?.focusNode?.textContent);break;case S.ORDERED_LIST:document.execCommand("insertOrderedList");break;case S.PARAGRAPH:document.execCommand("formatBlock",!1,"p");break;case S.UNDERLINE:document.execCommand("underline");break;case S.UNORDERED_LIST:document.execCommand("insertUnorderedList");break}}};e.TransformMarkdownAction=v,e.TransformMarkdownAction=v=fe([O(6,y.INotebookService)],v);class m{constructor(l,n,g){this._notebookService=l,this._cellModel=n,this._notebookEditor=g}get notebookEditor(){return this._notebookEditor}async transformText(l){let n=this.getEditorControl();if(n){let g=n.getSelections(),w=g[0],E=this.editorHasNoSelection(w),C={startColumn:w.startColumn,endColumn:w.startColumn,startLineNumber:w.startLineNumber,endLineNumber:w.startLineNumber},I=i(l),_=s(l),A={startColumn:w.endColumn,endColumn:w.endColumn,startLineNumber:w.endLineNumber,endLineNumber:w.endLineNumber},k=n.getModel(),L=!1;if(k){let M=o(l);L=I&&this.isUndoOperation(w,l,M,k),L?this.handleUndoOperation(M,C,A,k,I,_,g,w):this.handleTransformOperation(M,l,C,A,k,I,_,g,w)}let R=w.startLineNumber===w.endLineNumber?I.length:0;A=this.getIRangeWithOffsets(A,R,0,R,0),this.setEndSelection(A,l,n,k,E,L),n.focus()}}getEditorControl(){if(this._notebookEditor||(this._notebookEditor=this._notebookService.findNotebookEditor(this._cellModel?.notebookModel?.notebookUri)),this._notebookEditor?.cellEditors?.length>0){let l=this._notebookEditor.cellEditors.find(n=>n.cellGuid()===this._cellModel.cellGuid);if(l){let n=l.getEditor();if(n)return n.getControl()}}}editorHasNoSelection(l){return!l||l.startLineNumber===l.endLineNumber&&l.startColumn===l.endColumn}setEndSelection(l,n,g,w,E,C){if(!l||!g||C)return;let I=u(n,E);if(I>-1){let _;n!==S.CODE?_={startColumn:l.startColumn+I,startLineNumber:l.startLineNumber,endColumn:l.startColumn+I,endLineNumber:l.endLineNumber}:_={startColumn:1,startLineNumber:l.startLineNumber+1,endColumn:1,endLineNumber:l.endLineNumber+1},g.setSelection(_)}else{let _=o(n),A=g.getSelection();if(_===h.BEGIN_AND_END_LINES)g.setSelection({startColumn:A.startColumn+i(n).length,startLineNumber:A.startLineNumber,endColumn:A.endColumn-s(n).length,endLineNumber:A.endLineNumber});else if(_===h.WRAPPED_ABOVE_AND_BELOW){let k=w.getLineLength(A.endLineNumber-1);g.setSelection({startColumn:1,startLineNumber:A.startLineNumber+1,endColumn:k+1,endLineNumber:A.endLineNumber-1})}}}isUndoOperation(l,n,g,w){if(g===h.BEGIN_AND_END_LINES||g===h.WRAPPED_ABOVE_AND_BELOW){const E=this.getExtendedSelectedText(l,n,g,w);return E&&E.startsWith(i(n))&&E.endsWith(s(n))}else return this.everyLineMatchesBeginString(l,n,w)}handleUndoOperation(l,n,g,w,E,C,I,_){if(l===h.BEGIN_AND_END_LINES)n=this.getIRangeWithOffsets(n,-1*E.length,0,0,0),g=this.getIRangeWithOffsets(g,0,0,C.length,0),w.pushEditOperations(I,[{range:g,text:""},{range:n,text:""}],void 0);else if(l===h.WRAPPED_ABOVE_AND_BELOW){const A=new b.Range(n.startLineNumber-1,1,n.startLineNumber,1),k=new b.Range(g.startLineNumber,w.getLineLength(g.startLineNumber)+1,g.startLineNumber+1,C.length+1);w.pushEditOperations(I,[D.EditOperation.delete(k),D.EditOperation.delete(A)],void 0)}else if(l===h.EVERY_LINE){let A=[];for(let k=_.startLineNumber;k<=_.endLineNumber;k++)A.push(D.EditOperation.delete(new b.Range(k,1,k,E.length+1)));w.pushEditOperations(I,A,void 0)}}handleTransformOperation(l,n,g,w,E,C,I,_,A){if(l===h.BEGIN_AND_END_LINES||l===h.WRAPPED_ABOVE_AND_BELOW)E.pushEditOperations(_,[{range:g,text:C},{range:w,text:I}],void 0);else if(l===h.EVERY_LINE){const k=r(n),L=[];for(let R=A.startLineNumber;R<=A.endLineNumber;R++){const M=k.find(N=>E.getValueInRange({startColumn:1,startLineNumber:R,endColumn:N.length+1,endLineNumber:R})===N);M?L.push(D.EditOperation.replace(new b.Range(R,1,R,M.length+1),C)):L.push(D.EditOperation.insert(new T.Position(R,0),C))}E.pushEditOperations(_,L,void 0)}}getExtendedSelectedText(l,n,g,w){return g===h.BEGIN_AND_END_LINES?w.getValueInRange({startColumn:l.startColumn-i(n).length,startLineNumber:l.startLineNumber,endColumn:l.endColumn+s(n).length,endLineNumber:l.endLineNumber}):g===h.WRAPPED_ABOVE_AND_BELOW?w.getValueInRange({startColumn:1,startLineNumber:l.startLineNumber-1,endColumn:s(n).length+1,endLineNumber:l.endLineNumber+1}):""}everyLineMatchesBeginString(l,n,g){for(let w=l.startLineNumber;w<=l.endLineNumber;w++)if(!g.getLineContent(w).startsWith(i(n)))return!1;return!0}getIRangeWithOffsets(l,n=0,g=0,w=0,E=0){return{startColumn:l.startColumn+n,startLineNumber:l.startLineNumber+g,endColumn:l.endColumn+w,endLineNumber:l.endLineNumber+E}}}e.MarkdownTextTransformer=m;var S;(function(c){c[c.BOLD=0]="BOLD",c[c.ITALIC=1]="ITALIC",c[c.UNDERLINE=2]="UNDERLINE",c[c.CODE=3]="CODE",c[c.HIGHLIGHT=4]="HIGHLIGHT",c[c.LINK=5]="LINK",c[c.LINK_PREVIEW=6]="LINK_PREVIEW",c[c.UNORDERED_LIST=7]="UNORDERED_LIST",c[c.ORDERED_LIST=8]="ORDERED_LIST",c[c.IMAGE=9]="IMAGE",c[c.IMAGE_PREVIEW=10]="IMAGE_PREVIEW",c[c.HEADING1=11]="HEADING1",c[c.HEADING2=12]="HEADING2",c[c.HEADING3=13]="HEADING3",c[c.PARAGRAPH=14]="PARAGRAPH"})(S||(e.MarkdownButtonType=S={}));var h;(function(c){c[c.BEGIN_AND_END_LINES=0]="BEGIN_AND_END_LINES",c[c.EVERY_LINE=1]="EVERY_LINE",c[c.WRAPPED_ABOVE_AND_BELOW=2]="WRAPPED_ABOVE_AND_BELOW"})(h||(e.MarkdownLineType=h={}));const a=[[S.HEADING1,S.HEADING2,S.HEADING3,S.PARAGRAPH]];function r(c){for(const l of a)if(l.find(g=>g===c))return l.filter(g=>g!==c).map(g=>i(g));return[]}function i(c){switch(c){case S.BOLD:return"**";case S.ITALIC:return"_";case S.UNDERLINE:return"<u>";case S.CODE:return"```\n";case S.LINK:case S.LINK_PREVIEW:return"[";case S.UNORDERED_LIST:return"- ";case S.ORDERED_LIST:return"1. ";case S.IMAGE:case S.IMAGE_PREVIEW:return"![";case S.HIGHLIGHT:return"<mark>";case S.HEADING1:return"# ";case S.HEADING2:return"## ";case S.HEADING3:return"### ";default:return""}}function s(c){switch(c){case S.BOLD:return"**";case S.ITALIC:return"_";case S.UNDERLINE:return"</u>";case S.CODE:return"\n```";case S.LINK:case S.LINK_PREVIEW:case S.IMAGE:case S.IMAGE_PREVIEW:return"]()";case S.HIGHLIGHT:return"</mark>";case S.UNORDERED_LIST:case S.ORDERED_LIST:case S.HEADING1:case S.HEADING2:case S.HEADING3:case S.PARAGRAPH:default:return""}}function o(c){switch(c){case S.CODE:return h.WRAPPED_ABOVE_AND_BELOW;case S.UNORDERED_LIST:case S.ORDERED_LIST:case S.HEADING1:case S.HEADING2:case S.HEADING3:case S.PARAGRAPH:return h.EVERY_LINE;default:return h.BEGIN_AND_END_LINES}}function u(c,l){if(l)return 0;switch(c){case S.LINK:case S.LINK_PREVIEW:return 2;case S.IMAGE:case S.IMAGE_PREVIEW:return 2;default:return-1}}async function d(c,l){if(l){let n=l.getSelections(),g=n[0],w={startColumn:g.startColumn,endColumn:g.startColumn,startLineNumber:g.startLineNumber,endLineNumber:g.startLineNumber},E=l.getModel();w={startColumn:g.startColumn,endColumn:g.endColumn,startLineNumber:g.startLineNumber,endLineNumber:g.endLineNumber},E.pushEditOperations(n,[{range:w,text:c}],void 0)}}e.insertFormattedMarkdown=d;class p extends t.Action{constructor(l,n,g,w,E,C){super(l,n,g),this.showPreview=E,this.showMarkdown=C,this._tooltip=w}async run(l){l.cellModel.showPreview=this.showPreview,l.cellModel.showMarkdown=this.showMarkdown,this.showPreview&&!this.showMarkdown?l.hideImageButton():l.showLinkAndImageButtons(),l.updateActiveViewAction()}}e.ToggleViewAction=p}),define(Q[3173],Y([1,0,136,40,1021,130,2118]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MimeRendererComponent=void 0;let f=class extends t.AngularDisposable{static{this.SELECTOR="mime-output"}constructor(m,S){super(),this.el=m,this._notebookService=S,this._initialized=!1,this.registry=this._notebookService.getMimeRegistry()}set bundleOptions(m){this._bundleOptions=m,this._initialized&&this.renderOutput()}ngOnInit(){this.renderOutput(),this._initialized=!0}layout(){this.renderOutput()}renderOutput(){this.createRenderedMimetype(this._bundleOptions,this.el.nativeElement)}createRenderedMimetype(m,S){if(this.mimeType){let h=this.registry.createRenderer(this.mimeType);h.node=S;let a=new b.MimeModel(m);h.renderModel(a).catch(r=>{h.node.innerHTML=`<pre>Javascript Error: ${r.message}</pre>`,h.node.className="p-Widget jp-RenderedText",h.node.setAttribute("data-mime-type","application/vnd.jupyter.stderr")})}else S.innerHTML=(0,T.localize)(0,null,m.trusted?"":(0,T.localize)(1,null),Object.keys(m.data).join(", "))}};e.MimeRendererComponent=f,fe([(0,y.Input)()],f.prototype,"bundleOptions",null),fe([(0,y.Input)()],f.prototype,"mimeType",void 0),e.MimeRendererComponent=f=fe([(0,y.Component)({selector:f.SELECTOR,template:""}),O(0,(0,y.Inject)((0,y.forwardRef)(()=>y.ElementRef))),O(1,(0,y.Inject)(D.INotebookService))],f)}),define(Q[586],Y([1,0,55,130,143]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asyncForEach=e.getStandardKernelsForProvider=e.getProvidersForFileName=e.isStream=void 0;function D(m){return m.output_type==="stream"}e.isStream=D;function T(m,S,h){let a=t.extname(m);!a&&h&&h!=="notebook"&&(a=`.${h}`);let r;return a&&(r=S.getProvidersForFileType(a)),(!r||r.length===0)&&(r=S.getProvidersForFileType(b.DEFAULT_NOTEBOOK_FILETYPE)),(!r||r.length===0)&&(r=[y.DEFAULT_NOTEBOOK_PROVIDER]),r}e.getProvidersForFileName=T;async function f(m,S){if(!m||!S)return[];let h=await S.getStandardKernelsForProvider(m);return(!h||h.length===0)&&(h=await S.getStandardKernelsForProvider(y.SQL_NOTEBOOK_PROVIDER)??[],m=y.SQL_NOTEBOOK_PROVIDER),h.forEach(a=>{Object.assign(a,{name:a.name,connectionProviderIds:a.connectionProviderIds,notebookProvider:m})}),h}e.getStandardKernelsForProvider=f;async function v(m,S){if(m&&S)for(let h=0;h<m.length;h++)await S(m[h],h,m)}e.asyncForEach=v}),define(Q[859],Y([1,0,161,2226,205,777,1023,143]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalContentManager=void 0;class v{constructor(){}async deserializeNotebook(a){let r;if(a===""||a===void 0)return m.createEmptyNotebook();if(r=this.parseFromJson(a),r){if(r.nbformat===4)return m.readNotebook(r);if(r.nbformat===3)return S.readNotebook(r);if(r.nbformat)throw new TypeError((0,y.localize)(0,null,r.nbformat,r.nbformat_minor))}throw new TypeError((0,y.localize)(1,null))}async serializeNotebook(a){return JSON.stringify(a,void 0," ")}parseFromJson(a){let r;try{r=JSON.parse(a)}catch{r=t.parse(a)}return r}}e.LocalContentManager=v;var m;(function(h){function a(g){let w={cells:[],metadata:g.metadata,nbformat:f.NBFORMAT,nbformat_minor:g.nbformat_minor};if(g.cells)for(let E of g.cells)w.cells.push(i(E));return w}h.readNotebook=a;function r(){return{cells:[],metadata:void 0,nbformat:T.nbformat.MAJOR_VERSION,nbformat_minor:T.nbformat.MINOR_VERSION}}h.createEmptyNotebook=r;function i(g){switch(g.cell_type){case"markdown":case"raw":return s(g);case"code":return o(g);default:throw new TypeError((0,y.localize)(2,null,g.cell_type))}}function s(g){return{cell_type:g.cell_type,source:g.source,metadata:g.metadata,attachments:g.attachments}}h.createDefaultCell=s;function o(g){return{cell_type:g.cell_type,source:g.source,metadata:g.metadata,execution_count:g.execution_count,outputs:u(g)}}function u(g){return g.outputs&&g.outputs.length>0?g.outputs.map(w=>d(w)):[]}function d(g){switch(g.output_type){case b.OutputTypes.ExecuteResult:return{output_type:g.output_type,execution_count:g.execution_count,data:p(g.data),metadata:g.metadata};case b.OutputTypes.DisplayData:case b.OutputTypes.UpdateDisplayData:return{output_type:g.output_type,data:p(g.data),metadata:g.metadata};case"stream":return{output_type:g.output_type,name:g.name,text:l(g.text)};case"error":return{output_type:"error",ename:g.ename,evalue:g.evalue,traceback:g.traceback};default:return g}}function p(g){let w={};for(let E of Object.keys(g))w[E]=c(E,g[E]);return w}function c(g,w){if(n(g))return w;if(typeof w=="string"||Array.isArray(w))return l(w);throw new TypeError((0,y.localize)(3,null,g))}h.cleanMimeData=c;function l(g){return Array.isArray(g)?g.join(""):g}h.demultiline=l;function n(g){return/^application\/(.*\+)?json$/.test(g)}})(m||(m={}));var S;(function(h){function a(p){let c={cells:[],metadata:p.metadata,nbformat:f.NBFORMAT,nbformat_minor:D.nbversion.MINOR_VERSION};if(p.worksheets)for(let l of p.worksheets)l.cells&&c.cells.push(...l.cells.map(n=>r(n)));return c}h.readNotebook=a;function r(p){switch(p.cell_type){case"markdown":case"raw":return m.createDefaultCell(p);case"code":return o(p);case"heading":return u(p);default:throw new TypeError(`Cell type ${p.cell_type} unknown`)}}function i(p){let c={};for(let l of Object.keys(p))if(l in d){let n=d[l];c[n]=m.cleanMimeData(n,p[l])}return c}const s=p=>{switch(p.output_type){case"pyout":return{output_type:b.OutputTypes.ExecuteResult,execution_count:p.prompt_number,data:i(p),metadata:p.metadata};case"display_data":return{output_type:b.OutputTypes.DisplayData,data:i(p),metadata:p.metadata};case"stream":const c=p.stream==="stderr"?"stderr":"stdout";return{output_type:b.OutputTypes.Stream,name:c,text:m.demultiline(p.text)};case"error":case"pyerr":return{output_type:b.OutputTypes.Error,ename:p.ename,evalue:p.evalue,traceback:p.traceback};default:return p}};function o(p){return{cell_type:p.cell_type,source:m.demultiline(p.input),outputs:p.outputs.map(s),execution_count:p.prompt_number,metadata:p.metadata}}function u(p){return{cell_type:"markdown",source:Array.isArray(p.source)?m.demultiline(p.source.map(c=>Array(p.level).join("#").concat(" ").concat(c))):p.source,metadata:p.metadata}}const d={text:"text/plain",latex:"text/latex",png:"image/png",jpeg:"image/jpeg",svg:"image/svg+xml",html:"text/html",javascript:"application/x-javascript",json:"application/javascript",pdf:"application/pdf"}})(S||(S={}))}),define(Q[3174],Y([1,0,130,859]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SqlSerializationManager=void 0;class b{constructor(T){this._manager=T.createInstance(y.LocalContentManager)}get providerId(){return t.SQL_NOTEBOOK_PROVIDER}get contentManager(){return this._manager}}e.SqlSerializationManager=b}),define(Q[3175],Y([1,0,130,3174]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SqlSerializationProvider=void 0;class b{constructor(T){this._manager=new y.SqlSerializationManager(T)}get providerId(){return t.SQL_NOTEBOOK_PROVIDER}getSerializationManager(T){return Promise.resolve(this._manager)}}e.SqlSerializationProvider=b}),define(Q[452],Y([1,0,8,107]),function(q,e,t,y){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.TreeNodeContextKey=void 0;let D=class{static{b=this}static{this.NodeType=new t.RawContextKey("nodeType",void 0)}static{this.ObjectType=new t.RawContextKey("objectType",void 0)}static{this.SubType=new t.RawContextKey("nodeSubType",void 0)}static{this.Status=new t.RawContextKey("nodeStatus",void 0)}static{this.TreeNode=new t.RawContextKey("treeNode",void 0)}static{this.NodeLabel=new t.RawContextKey("nodeLabel",void 0)}static{this.NodePath=new t.RawContextKey("nodePath",void 0)}static{this.IsQueryProvider=new t.RawContextKey("isQueryProvider",!1)}constructor(f,v){this._capabilitiesService=v,this._nodeTypeKey=b.NodeType.bindTo(f),this._objectTypeKey=b.ObjectType.bindTo(f),this._subTypeKey=b.SubType.bindTo(f),this._statusKey=b.Status.bindTo(f),this._treeNodeKey=b.TreeNode.bindTo(f),this._nodeLabelKey=b.NodeLabel.bindTo(f),this._nodePathKey=b.NodePath.bindTo(f),this._isQueryProvider=b.IsQueryProvider.bindTo(f)}set(f){this._treeNodeKey.set(f),this._nodeTypeKey.set(f&&f.nodeTypeId),this._objectTypeKey.set(f&&f.objectType),this._subTypeKey.set(f&&f.nodeSubType),f.nodeStatus&&this._statusKey.set(f&&f.nodeStatus),this._nodeLabelKey.set(f&&f.label),this._nodePathKey.set(f&&f.nodePath);const v=f.getConnectionProfile(),m=v?this._capabilitiesService.getCapabilities(v.providerName):void 0;this._isQueryProvider.set(m?.connection.isQueryProvider)}reset(){this._nodeTypeKey.reset(),this._objectTypeKey.reset(),this._subTypeKey.reset(),this._statusKey.reset(),this._treeNodeKey.reset(),this._nodeLabelKey.reset(),this._nodePathKey.reset(),this._isQueryProvider.reset()}get(){return this._treeNodeKey.get()}};e.TreeNodeContextKey=D,e.TreeNodeContextKey=D=b=fe([O(0,t.IContextKeyService),O(1,y.ICapabilitiesService)],D)}),define(Q[73],Y([1,0,2351,8]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContextKeys=void 0;var b;(function(D){D.editorSimpleInput=new y.RawContextKey("editorSimpleInput",!1,!0),D.editorTextFocus=new y.RawContextKey("editorTextFocus",!1,t.localize(0,null)),D.focus=new y.RawContextKey("editorFocus",!1,t.localize(1,null)),D.textInputFocus=new y.RawContextKey("textInputFocus",!1,t.localize(2,null)),D.readOnly=new y.RawContextKey("editorReadonly",!1,t.localize(3,null)),D.inDiffEditor=new y.RawContextKey("inDiffEditor",!1,t.localize(4,null)),D.isEmbeddedDiffEditor=new y.RawContextKey("isEmbeddedDiffEditor",!1,t.localize(5,null)),D.comparingMovedCode=new y.RawContextKey("comparingMovedCode",!1,t.localize(6,null)),D.accessibleDiffViewerVisible=new y.RawContextKey("accessibleDiffViewerVisible",!1,t.localize(7,null)),D.diffEditorRenderSideBySideInlineBreakpointReached=new y.RawContextKey("diffEditorRenderSideBySideInlineBreakpointReached",!1,t.localize(8,null)),D.columnSelection=new y.RawContextKey("editorColumnSelection",!1,t.localize(9,null)),D.writable=D.readOnly.toNegated(),D.hasNonEmptySelection=new y.RawContextKey("editorHasSelection",!1,t.localize(10,null)),D.hasOnlyEmptySelection=D.hasNonEmptySelection.toNegated(),D.hasMultipleSelections=new y.RawContextKey("editorHasMultipleSelections",!1,t.localize(11,null)),D.hasSingleSelection=D.hasMultipleSelections.toNegated(),D.tabMovesFocus=new y.RawContextKey("editorTabMovesFocus",!1,t.localize(12,null)),D.tabDoesNotMoveFocus=D.tabMovesFocus.toNegated(),D.isInWalkThroughSnippet=new y.RawContextKey("isInEmbeddedEditor",!1,!0),D.canUndo=new y.RawContextKey("canUndo",!1,!0),D.canRedo=new y.RawContextKey("canRedo",!1,!0),D.hoverVisible=new y.RawContextKey("editorHoverVisible",!1,t.localize(13,null)),D.hoverFocused=new y.RawContextKey("editorHoverFocused",!1,t.localize(14,null)),D.stickyScrollFocused=new y.RawContextKey("stickyScrollFocused",!1,t.localize(15,null)),D.stickyScrollVisible=new y.RawContextKey("stickyScrollVisible",!1,t.localize(16,null)),D.standaloneColorPickerVisible=new y.RawContextKey("standaloneColorPickerVisible",!1,t.localize(17,null)),D.standaloneColorPickerFocused=new y.RawContextKey("standaloneColorPickerFocused",!1,t.localize(18,null)),D.inCompositeEditor=new y.RawContextKey("inCompositeEditor",void 0,t.localize(19,null)),D.notInCompositeEditor=D.inCompositeEditor.toNegated(),D.languageId=new y.RawContextKey("editorLangId","",t.localize(20,null)),D.hasCompletionItemProvider=new y.RawContextKey("editorHasCompletionItemProvider",!1,t.localize(21,null)),D.hasCodeActionsProvider=new y.RawContextKey("editorHasCodeActionsProvider",!1,t.localize(22,null)),D.hasCodeLensProvider=new y.RawContextKey("editorHasCodeLensProvider",!1,t.localize(23,null)),D.hasDefinitionProvider=new y.RawContextKey("editorHasDefinitionProvider",!1,t.localize(24,null)),D.hasDeclarationProvider=new y.RawContextKey("editorHasDeclarationProvider",!1,t.localize(25,null)),D.hasImplementationProvider=new y.RawContextKey("editorHasImplementationProvider",!1,t.localize(26,null)),D.hasTypeDefinitionProvider=new y.RawContextKey("editorHasTypeDefinitionProvider",!1,t.localize(27,null)),D.hasHoverProvider=new y.RawContextKey("editorHasHoverProvider",!1,t.localize(28,null)),D.hasDocumentHighlightProvider=new y.RawContextKey("editorHasDocumentHighlightProvider",!1,t.localize(29,null)),D.hasDocumentSymbolProvider=new y.RawContextKey("editorHasDocumentSymbolProvider",!1,t.localize(30,null)),D.hasReferenceProvider=new y.RawContextKey("editorHasReferenceProvider",!1,t.localize(31,null)),D.hasRenameProvider=new y.RawContextKey("editorHasRenameProvider",!1,t.localize(32,null)),D.hasSignatureHelpProvider=new y.RawContextKey("editorHasSignatureHelpProvider",!1,t.localize(33,null)),D.hasInlayHintsProvider=new y.RawContextKey("editorHasInlayHintsProvider",!1,t.localize(34,null)),D.hasDocumentFormattingProvider=new y.RawContextKey("editorHasDocumentFormattingProvider",!1,t.localize(35,null)),D.hasDocumentSelectionFormattingProvider=new y.RawContextKey("editorHasDocumentSelectionFormattingProvider",!1,t.localize(36,null)),D.hasMultipleDocumentFormattingProvider=new y.RawContextKey("editorHasMultipleDocumentFormattingProvider",!1,t.localize(37,null)),D.hasMultipleDocumentSelectionFormattingProvider=new y.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider",!1,t.localize(38,null))})(b||(e.EditorContextKeys=b={}))}),define(Q[689],Y([1,0,109,33,323,8,4,2407]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionContextKeys=void 0;class v extends T.Disposable{static{this.inlineSuggestionVisible=new D.RawContextKey("inlineSuggestionVisible",!1,(0,f.localize)(0,null))}static{this.inlineSuggestionHasIndentation=new D.RawContextKey("inlineSuggestionHasIndentation",!1,(0,f.localize)(1,null))}static{this.inlineSuggestionHasIndentationLessThanTabSize=new D.RawContextKey("inlineSuggestionHasIndentationLessThanTabSize",!0,(0,f.localize)(2,null))}static{this.suppressSuggestions=new D.RawContextKey("inlineSuggestionSuppressSuggestions",void 0,(0,f.localize)(3,null))}constructor(S,h){super(),this.contextKeyService=S,this.model=h,this.inlineCompletionVisible=v.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=v.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=v.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=v.suppressSuggestions.bindTo(this.contextKeyService),this._register((0,t.autorun)(a=>{const i=this.model.read(a)?.state.read(a),s=!!i?.inlineCompletion&&i?.ghostText!==void 0&&!i?.ghostText.isEmpty();this.inlineCompletionVisible.set(s),i?.ghostText&&i?.inlineCompletion&&this.suppressSuggestions.set(i.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register((0,t.autorun)(a=>{const r=this.model.read(a);let i=!1,s=!0;const o=r?.ghostText.read(a);if(r?.selectedSuggestItem&&o&&o.parts.length>0){const{column:u,lines:d}=o.parts[0],p=d[0],c=r.textModel.getLineIndentColumn(o.lineNumber);if(u<=c){let n=(0,y.firstNonWhitespaceIndex)(p);n===-1&&(n=p.length-1),i=n>0;const g=r.textModel.getOptions().tabSize;s=b.CursorColumns.visibleColumnFromColumn(p,n+1,g)<g}}this.inlineCompletionSuggestsIndentation.set(i),this.inlineCompletionSuggestsIndentationLessThanTabSize.set(s)}))}}e.InlineCompletionContextKeys=v}),define(Q[860],Y([1,0,31,15,17,10,51,99,74,75,28,8]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSignatureHelp=e.Context=void 0,e.Context={Visible:new h.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new h.RawContextKey("parameterHintsMultipleSignatures",!1)};async function a(r,i,s,o,u){const d=r.ordered(i);for(const p of d)try{const c=await p.provideSignatureHelp(i,s,u,o);if(c)return c}catch(c){(0,y.onUnexpectedExternalError)(c)}}e.provideSignatureHelp=a,S.CommandsRegistry.registerCommand("_executeSignatureHelpProvider",async(r,...i)=>{const[s,o,u]=i;(0,b.assertType)(D.URI.isUri(s)),(0,b.assertType)(T.Position.isIPosition(o)),(0,b.assertType)(typeof u=="string"||!u);const d=r.get(v.ILanguageFeaturesService),p=await r.get(m.ITextModelService).createModelReference(s);try{const c=await a(d.signatureHelpProvider,p.object.textEditorModel,T.Position.lift(o),{triggerKind:f.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:u},t.CancellationToken.None);return c?(setTimeout(()=>c.dispose(),0),c.value):void 0}finally{p.dispose()}})}),define(Q[3176],Y([1,0,14,15,6,4,486,99,860]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsModel=void 0;var m;(function(a){let r;(function(o){o[o.Default=0]="Default",o[o.Active=1]="Active",o[o.Pending=2]="Pending"})(r=a.Type||(a.Type={})),a.Default={type:0};class i{constructor(u,d){this.request=u,this.previouslyActiveHints=d,this.type=2}}a.Pending=i;class s{constructor(u){this.hints=u,this.type=1}}a.Active=s})(m||(m={}));class S extends D.Disposable{static{this.DEFAULT_DELAY=120}constructor(r,i,s=S.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new b.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=m.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new D.MutableDisposable),this.triggerChars=new T.CharacterSet,this.retriggerChars=new T.CharacterSet,this.triggerId=0,this.editor=r,this.providers=i,this.throttledDelayer=new t.Delayer(s),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(o=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(o=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(o=>this.onCursorChange(o))),this._register(this.editor.onDidChangeModelContent(o=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(o=>this.onDidType(o))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(r){this._state.type===2&&this._state.request.cancel(),this._state=r}cancel(r=!1){this.state=m.Default,this.throttledDelayer.cancel(),r||this._onChangedHints.fire(void 0)}trigger(r,i){const s=this.editor.getModel();if(!s||!this.providers.has(s))return;const o=++this.triggerId;this._pendingTriggers.push(r),this.throttledDelayer.trigger(()=>this.doTrigger(o),i).catch(y.onUnexpectedError)}next(){if(this.state.type!==1)return;const r=this.state.hints.signatures.length,i=this.state.hints.activeSignature,s=i%r===r-1,o=this.editor.getOption(84).cycle;if((r<2||s)&&!o){this.cancel();return}this.updateActiveSignature(s&&o?0:i+1)}previous(){if(this.state.type!==1)return;const r=this.state.hints.signatures.length,i=this.state.hints.activeSignature,s=i===0,o=this.editor.getOption(84).cycle;if((r<2||s)&&!o){this.cancel();return}this.updateActiveSignature(s&&o?r-1:i-1)}updateActiveSignature(r){this.state.type===1&&(this.state=new m.Active({...this.state.hints,activeSignature:r}),this._onChangedHints.fire(this.state.hints))}async doTrigger(r){const i=this.state.type===1||this.state.type===2,s=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const o=this._pendingTriggers.reduce(h);this._pendingTriggers=[];const u={triggerKind:o.triggerKind,triggerCharacter:o.triggerCharacter,isRetrigger:i,activeSignatureHelp:s};if(!this.editor.hasModel())return!1;const d=this.editor.getModel(),p=this.editor.getPosition();this.state=new m.Pending((0,t.createCancelablePromise)(c=>(0,v.provideSignatureHelp)(this.providers,d,p,u,c)),s);try{const c=await this.state.request;return r!==this.triggerId?(c?.dispose(),!1):!c||!c.value.signatures||c.value.signatures.length===0?(c?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new m.Active(c.value),this._lastSignatureHelpResult.value=c,this._onChangedHints.fire(this.state.hints),!0)}catch(c){return r===this.triggerId&&(this.state=m.Default),(0,y.onUnexpectedError)(c),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const r=this.editor.getModel();if(r)for(const i of this.providers.ordered(r)){for(const s of i.signatureHelpTriggerCharacters||[])if(s.length){const o=s.charCodeAt(0);this.triggerChars.add(o),this.retriggerChars.add(o)}for(const s of i.signatureHelpRetriggerCharacters||[])s.length&&this.retriggerChars.add(s.charCodeAt(0))}}onDidType(r){if(!this.triggerOnType)return;const i=r.length-1,s=r.charCodeAt(i);(this.triggerChars.has(s)||this.isTriggered&&this.retriggerChars.has(s))&&this.trigger({triggerKind:f.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:r.charAt(i)})}onCursorChange(r){r.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:f.SignatureHelpTriggerKind.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:f.SignatureHelpTriggerKind.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(84).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}e.ParameterHintsModel=S;function h(a,r){switch(r.triggerKind){case f.SignatureHelpTriggerKind.Invoke:return r;case f.SignatureHelpTriggerKind.ContentChange:return a;case f.SignatureHelpTriggerKind.TriggerCharacter:default:return r}}}),define(Q[3177],Y([1,0,8]),function(q,e,t){"use strict";var y;Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAlternatives=void 0;let b=class{static{y=this}static{this.OtherSuggestions=new t.RawContextKey("hasOtherSuggestions",!1)}constructor(T,f){this._editor=T,this._index=0,this._ckOtherSuggestions=y.OtherSuggestions.bindTo(f)}dispose(){this.reset()}reset(){this._ckOtherSuggestions.reset(),this._listener?.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:T,index:f},v){if(T.items.length===0){this.reset();return}if(y._moveIndex(!0,T,f)===f){this.reset();return}this._acceptNext=v,this._model=T,this._index=f,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(T,f,v){let m=v;for(let S=f.items.length;S>0&&(m=(m+f.items.length+(T?1:-1))%f.items.length,!(m===v||!f.items[m].completion.additionalTextEdits));S--);return m}next(){this._move(!0)}prev(){this._move(!1)}_move(T){if(this._model)try{this._ignore=!0,this._index=y._moveIndex(T,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};e.SuggestAlternatives=b,e.SuggestAlternatives=b=y=fe([O(1,t.IContextKeyService)],b)}),define(Q[3178],Y([1,0,8]),function(q,e,t){"use strict";var y;Object.defineProperty(e,"__esModule",{value:!0}),e.WordContextKey=void 0;let b=class{static{y=this}static{this.AtEnd=new t.RawContextKey("atEndOfWord",!1)}constructor(T,f){this._editor=T,this._enabled=!1,this._ckAtEnd=y.AtEnd.bindTo(f),this._configListener=this._editor.onDidChangeConfiguration(v=>v.hasChanged(121)&&this._update()),this._update()}dispose(){this._configListener.dispose(),this._selectionListener?.dispose(),this._ckAtEnd.reset()}_update(){const T=this._editor.getOption(121)==="on";if(this._enabled!==T)if(this._enabled=T,this._enabled){const f=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const v=this._editor.getModel(),m=this._editor.getSelection(),S=v.getWordAtPosition(m.getStartPosition());if(!S){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(S.endColumn===m.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(f),f()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};e.WordContextKey=b,e.WordContextKey=b=y=fe([O(1,t.IContextKeyService)],b)}),define(Q[66],Y([1,0,8,5]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAccessibilityInformation=e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=e.AccessibilitySupport=e.IAccessibilityService=void 0,e.IAccessibilityService=(0,y.createDecorator)("accessibilityService");var b;(function(T){T[T.Unknown=0]="Unknown",T[T.Disabled=1]="Disabled",T[T.Enabled=2]="Enabled"})(b||(e.AccessibilitySupport=b={})),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=new t.RawContextKey("accessibilityModeEnabled",!1);function D(T){return T&&typeof T=="object"&&typeof T.label=="string"&&(typeof T.role>"u"||typeof T.role=="string")}e.isAccessibilityInformation=D}),define(Q[3179],Y([1,0,97,20,6,4,42,18,658,499,1064,485,133,659,345,66]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComputedEditorOptions=e.EditorConfiguration=void 0;let o=class extends D.Disposable{constructor(w,E,C,I){super(),this._accessibilityService=I,this._onDidChange=this._register(new b.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new b.Emitter),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new a.ComputeOptionsMemory,this.isSimpleWidget=w,this._containerObserver=this._register(new v.ElementSizeObserver(C,E.dimension)),this._rawOptions=n(E),this._validatedOptions=l.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(12)&&this._containerObserver.startObserving(),this._register(r.EditorZoom.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(h.TabFocus.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(m.FontMeasurements.onDidChange(()=>this._recomputeOptions())),this._register(t.PixelRatio.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const w=this._computeOptions(),E=l.checkEquals(this.options,w);E!==null&&(this.options=w,this._onDidChangeFast.fire(E),this._onDidChange.fire(E))}_computeOptions(){const w=this._readEnvConfiguration(),E=i.BareFontInfo.createFromValidatedSettings(this._validatedOptions,w.pixelRatio,this.isSimpleWidget),C=this._readFontInfo(E),I={memory:this._computeOptionsMemory,outerWidth:w.outerWidth,outerHeight:w.outerHeight-this._reservedHeight,fontInfo:C,extraEditorClassName:w.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:w.emptySelectionClipboard,pixelRatio:w.pixelRatio,tabFocusMode:h.TabFocus.getTabFocusMode("editorFocus"),accessibilitySupport:w.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return l.computeOptions(this._validatedOptions,I)}_readEnvConfiguration(){return{extraEditorClassName:d(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:t.isWebKit||t.isFirefox,pixelRatio:t.PixelRatio.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(w){return m.FontMeasurements.readFontInfo(w)}getRawOptions(){return this._rawOptions}updateOptions(w){const E=n(w);l.applyUpdate(this._rawOptions,E)&&(this._validatedOptions=l.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(w){this._containerObserver.observe(w)}setIsDominatedByLongLines(w){this._isDominatedByLongLines!==w&&(this._isDominatedByLongLines=w,this._recomputeOptions())}setModelLineCount(w){const E=u(w);this._lineNumbersDigitCount!==E&&(this._lineNumbersDigitCount=E,this._recomputeOptions())}setViewLineCount(w){this._viewLineCount!==w&&(this._viewLineCount=w,this._recomputeOptions())}setReservedHeight(w){this._reservedHeight!==w&&(this._reservedHeight=w,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(w){this._glyphMarginDecorationLaneCount!==w&&(this._glyphMarginDecorationLaneCount=w,this._recomputeOptions())}};e.EditorConfiguration=o,e.EditorConfiguration=o=fe([O(3,s.IAccessibilityService)],o);function u(g){let w=0;for(;g;)g=Math.floor(g/10),w++;return w||1}function d(){let g="";return!t.isSafari&&!t.isWebkitWebView&&(g+="no-user-select "),t.isSafari&&(g+="no-minimap-shadow ",g+="enable-user-select "),f.isMacintosh&&(g+="mac "),g}class p{constructor(){this._values=[]}_read(w){return this._values[w]}get(w){return this._values[w]}_write(w,E){this._values[w]=E}}class c{constructor(){this._values=[]}_read(w){if(w>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[w]}get(w){return this._read(w)}_write(w,E){this._values[w]=E}}e.ComputedEditorOptions=c;class l{static validateOptions(w){const E=new p;for(const C of a.editorOptionsRegistry){const I=C.name==="_never_"?void 0:w[C.name];E._write(C.id,C.validate(I))}return E}static computeOptions(w,E){const C=new c;for(const I of a.editorOptionsRegistry)C._write(I.id,I.compute(E,C,w._read(I.id)));return C}static _deepEquals(w,E){if(typeof w!="object"||typeof E!="object"||!w||!E)return w===E;if(Array.isArray(w)||Array.isArray(E))return Array.isArray(w)&&Array.isArray(E)?y.equals(w,E):!1;if(Object.keys(w).length!==Object.keys(E).length)return!1;for(const C in w)if(!l._deepEquals(w[C],E[C]))return!1;return!0}static checkEquals(w,E){const C=[];let I=!1;for(const _ of a.editorOptionsRegistry){const A=!l._deepEquals(w._read(_.id),E._read(_.id));C[_.id]=A,A&&(I=!0)}return I?new a.ConfigurationChangedEvent(C):null}static applyUpdate(w,E){let C=!1;for(const I of a.editorOptionsRegistry)if(E.hasOwnProperty(I.name)){const _=I.applyUpdate(w[I.name],E[I.name]);w[I.name]=_.newValue,C=C||_.didChange}return C}}function n(g){const w=T.deepClone(g);return(0,S.migrateOptions)(w),w}}),define(Q[3180],Y([1,0,6,83,4,42,283,10,2452,28,9,8]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setContext=e.ContextKeyService=e.AbstractContextKeyService=e.Context=void 0;const a="data-keybinding-context";class r{constructor(k,L){this._id=k,this._parent=L,this._value=Object.create(null),this._value._contextId=k}get value(){return{...this._value}}setValue(k,L){return this._value[k]!==L?(this._value[k]=L,!0):!1}removeValue(k){return k in this._value?(delete this._value[k],!0):!1}getValue(k){const L=this._value[k];return typeof L>"u"&&this._parent?this._parent.getValue(k):L}updateParent(k){this._parent=k}collectAllValues(){let k=this._parent?this._parent.collectAllValues():Object.create(null);return k={...k,...this._value},delete k._contextId,k}}e.Context=r;class i extends r{static{this.INSTANCE=new i}constructor(){super(-1,null)}setValue(k,L){return!1}removeValue(k){return!1}getValue(k){}collectAllValues(){return Object.create(null)}}class s extends r{static{this._keyPrefix="config."}constructor(k,L,R){super(k,null),this._configurationService=L,this._values=T.TernarySearchTree.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(M=>{if(M.source===7){const N=Array.from(this._values,([P])=>P);this._values.clear(),R.fire(new d(N))}else{const N=[];for(const P of M.affectedKeys){const x=`config.${P}`,F=this._values.findSuperstr(x);F!==void 0&&(N.push(...y.Iterable.map(F,([V])=>V)),this._values.deleteSuperstr(x)),this._values.has(x)&&(N.push(x),this._values.delete(x))}R.fire(new d(N))}})}dispose(){this._listener.dispose()}getValue(k){if(k.indexOf(s._keyPrefix)!==0)return super.getValue(k);if(this._values.has(k))return this._values.get(k);const L=k.substr(s._keyPrefix.length),R=this._configurationService.getValue(L);let M;switch(typeof R){case"number":case"boolean":case"string":M=R;break;default:Array.isArray(R)?M=JSON.stringify(R):M=R}return this._values.set(k,M),M}setValue(k,L){return super.setValue(k,L)}removeValue(k){return super.removeValue(k)}collectAllValues(){const k=Object.create(null);return this._values.forEach((L,R)=>k[R]=L),{...k,...super.collectAllValues()}}}class o{constructor(k,L,R){this._service=k,this._key=L,this._defaultValue=R,this.reset()}set(k){this._service.setContext(this._key,k)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class u{constructor(k){this.key=k}affectsSome(k){return k.has(this.key)}allKeysContainedIn(k){return this.affectsSome(k)}}class d{constructor(k){this.keys=k}affectsSome(k){for(const L of this.keys)if(k.has(L))return!0;return!1}allKeysContainedIn(k){return this.keys.every(L=>k.has(L))}}class p{constructor(k){this.events=k}affectsSome(k){for(const L of this.events)if(L.affectsSome(k))return!0;return!1}allKeysContainedIn(k){return this.events.every(L=>L.allKeysContainedIn(k))}}function c(A,k){return A.allKeysContainedIn(new Set(Object.keys(k)))}class l{constructor(k){this._onDidChangeContext=new t.PauseableEmitter({merge:L=>new p(L)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=k}get contextId(){return this._myContextId}createKey(k,L){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new o(this,k,L)}bufferChangeEvents(k){this._onDidChangeContext.pause();try{k()}finally{this._onDidChangeContext.resume()}}createScoped(k){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new g(this,k)}createOverlay(k=y.Iterable.empty()){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new E(this,k)}contextMatchesRules(k){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const L=this.getContextValuesContainer(this._myContextId);return k?k.evaluate(L):!0}getContextKeyValue(k){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(k)}setContext(k,L){if(this._isDisposed)return;const R=this.getContextValuesContainer(this._myContextId);R&&R.setValue(k,L)&&this._onDidChangeContext.fire(new u(k))}removeContext(k){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(k)&&this._onDidChangeContext.fire(new u(k))}getContext(k){return this._isDisposed?i.INSTANCE:this.getContextValuesContainer(C(k))}}e.AbstractContextKeyService=l;let n=class extends l{constructor(k){super(0),this._contexts=new Map,this._toDispose=new b.DisposableStore,this._lastContextId=0;const L=new s(this._myContextId,k,this._onDidChangeContext);this._contexts.set(this._myContextId,L),this._toDispose.add(L)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(k){return this._isDisposed?i.INSTANCE:this._contexts.get(k)||i.INSTANCE}createChildContext(k=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const L=++this._lastContextId;return this._contexts.set(L,new r(L,this.getContextValuesContainer(k))),L}disposeContext(k){this._isDisposed||this._contexts.delete(k)}updateParent(k){throw new Error("Cannot update parent of root ContextKeyService")}};e.ContextKeyService=n,e.ContextKeyService=n=fe([O(0,S.IConfigurationService)],n);class g extends l{constructor(k,L){if(super(k.createChildContext()),this._parentChangeListener=new b.MutableDisposable,this._parent=k,this._updateParentChangeListener(),this._domNode=L,this._domNode.hasAttribute(a)){let R="";this._domNode.classList&&(R=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${R?": "+R:""}`)}this._domNode.setAttribute(a,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(k=>{const R=this._parent.getContextValuesContainer(this._myContextId).value;c(k,R)||this._onDidChangeContext.fire(k)})}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(a),this._isDisposed=!0)}getContextValuesContainer(k){return this._isDisposed?i.INSTANCE:this._parent.getContextValuesContainer(k)}createChildContext(k=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(k)}disposeContext(k){this._isDisposed||this._parent.disposeContext(k)}updateParent(k){if(this._parent===k)return;const L=this._parent.getContextValuesContainer(this._myContextId),R=L.collectAllValues();this._parent=k,this._updateParentChangeListener();const M=this._parent.getContextValuesContainer(this._parent.contextId);L.updateParent(M);const N=L.collectAllValues(),P={...(0,D.distinct)(R,N),...(0,D.distinct)(N,R)},x=Object.keys(P);this._onDidChangeContext.fire(new d(x))}}class w{constructor(k,L){this.parent=k,this.overlay=L}getValue(k){return this.overlay.has(k)?this.overlay.get(k):this.parent.getValue(k)}}class E{get contextId(){return this.parent.contextId}get onDidChangeContext(){return this.parent.onDidChangeContext}constructor(k,L){this.parent=k,this.overlay=new Map(L)}bufferChangeEvents(k){this.parent.bufferChangeEvents(k)}createKey(){throw new Error("Not supported.")}getContext(k){return new w(this.parent.getContext(k),this.overlay)}getContextValuesContainer(k){const L=this.parent.getContextValuesContainer(k);return new w(L,this.overlay)}contextMatchesRules(k){const L=this.getContextValuesContainer(this.contextId);return k?k.evaluate(L):!0}getContextKeyValue(k){return this.overlay.has(k)?this.overlay.get(k):this.parent.getContextKeyValue(k)}createScoped(){throw new Error("Not supported.")}createOverlay(k=y.Iterable.empty()){return new E(this,k)}updateParent(){throw new Error("Not supported.")}}function C(A){for(;A;){if(A.hasAttribute(a)){const k=A.getAttribute(a);return k?parseInt(k,10):NaN}A=A.parentElement}return 0}function I(A,k,L){A.get(h.IContextKeyService).createKey(String(k),_(L))}e.setContext=I;function _(A){return(0,D.cloneAndChange)(A,k=>{if(typeof k=="object"&&k.$mid===1)return f.URI.revive(k).toString();if(k instanceof f.URI)return k.toString()})}m.CommandsRegistry.registerCommand("_setContext",I),m.CommandsRegistry.registerCommand({id:"getContextKeyInfo",handler(){return[...h.RawContextKey.all()].sort((A,k)=>A.key.localeCompare(k.key))},description:{description:(0,v.localize)(0,null),args:[]}}),m.CommandsRegistry.registerCommand("_generateContextKeyInfo",function(){const A=[],k=new Set;for(const L of h.RawContextKey.all())k.has(L.key)||(k.add(L.key),A.push(L));A.sort((L,R)=>L.key.localeCompare(R.key)),console.log(JSON.stringify(A,void 0,2))})}),define(Q[171],Y([1,0,18,2454,8]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFocusedContext=e.InputFocusedContextKey=e.ProductQualityContext=e.IsDevelopmentContext=e.IsMobileContext=e.IsIOSContext=e.IsMacNativeContext=e.IsWebContext=e.IsWindowsContext=e.IsLinuxContext=e.IsMacContext=void 0,e.IsMacContext=new b.RawContextKey("isMac",t.isMacintosh,(0,y.localize)(0,null)),e.IsLinuxContext=new b.RawContextKey("isLinux",t.isLinux,(0,y.localize)(1,null)),e.IsWindowsContext=new b.RawContextKey("isWindows",t.isWindows,(0,y.localize)(2,null)),e.IsWebContext=new b.RawContextKey("isWeb",t.isWeb,(0,y.localize)(3,null)),e.IsMacNativeContext=new b.RawContextKey("isMacNative",t.isMacintosh&&!t.isWeb,(0,y.localize)(4,null)),e.IsIOSContext=new b.RawContextKey("isIOS",t.isIOS,(0,y.localize)(5,null)),e.IsMobileContext=new b.RawContextKey("isMobile",t.isMobile,(0,y.localize)(6,null)),e.IsDevelopmentContext=new b.RawContextKey("isDevelopment",!1,!0),e.ProductQualityContext=new b.RawContextKey("productQualityType","",(0,y.localize)(7,null)),e.InputFocusedContextKey="inputFocus",e.InputFocusedContext=new b.RawContextKey(e.InputFocusedContextKey,!1,(0,y.localize)(8,null))}),define(Q[29],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IContextMenuService=e.IContextViewService=void 0,e.IContextViewService=(0,t.createDecorator)("contextViewService"),e.IContextMenuService=(0,t.createDecorator)("contextMenuService")}),define(Q[1149],Y([1,0,34,2013,29,326,1140]),function(q,e,t,y,b,D,T){"use strict";var f,v,m,S,h;Object.defineProperty(e,"__esModule",{value:!0}),e.CollapseWidgetAction=e.AddFeatureTabAction=e.PinUnpinTabAction=e.DeleteWidgetAction=e.ToggleMoreWidgetAction=e.ToolbarAction=e.RefreshWidgetAction=e.EditDashboardAction=void 0;class a extends t.Action{static{this.ID="editDashboard"}static{this.EDITLABEL=y.localize(0,null)}static{this.EXITLABEL=y.localize(1,null)}static{this.ICON="edit"}constructor(l,n){super(a.ID,a.EDITLABEL,a.ICON),this.editFn=l,this.context=n,this._state=0}async run(){this.editFn.apply(this.context),this.toggleLabel()}toggleLabel(){this._state===0?(this.label=a.EXITLABEL,this._state=1):(this.label=a.EDITLABEL,this._state=0)}}e.EditDashboardAction=a;class r extends t.Action{static{this.ID="refreshWidget"}static{this.LABEL=y.localize(2,null)}static{this.ICON="refresh"}constructor(l,n){super(r.ID,r.LABEL,r.ICON),this.refreshFn=l,this.context=n}async run(){this.refreshFn.apply(this.context)}}e.RefreshWidgetAction=r;class i extends t.Action{constructor(l,n,g,w,E,C,I){super(l,n,w),this.runFn=E,this.context=C,this.logService=I,this.tooltip=g}async run(){try{this.runFn.apply(this.context,[this.id])}catch(l){this.logService.error(l)}}}e.ToolbarAction=i;let s=class extends t.Action{static{f=this}static{this.ID="toggleMore"}static{this.LABEL=y.localize(3,null)}static{this.ICON="toggle-more"}constructor(l,n,g){super(f.ID,f.LABEL,f.ICON),this._actions=l,this._context=n,this._contextMenuService=g}async run(l){this._contextMenuService.showContextMenu({getAnchor:()=>l.target,getActions:()=>this._actions,getActionsContext:()=>this._context})}};e.ToggleMoreWidgetAction=s,e.ToggleMoreWidgetAction=s=f=fe([O(2,b.IContextMenuService)],s);let o=class extends t.Action{static{v=this}static{this.ID="deleteWidget"}static{this.LABEL=y.localize(4,null)}static{this.ICON="close"}constructor(l,n,g){super(v.ID,v.LABEL,v.ICON),this._widgetId=l,this._uri=n,this.angularEventService=g}async run(){this.angularEventService.sendAngularEvent(this._uri,D.AngularEventType.DELETE_WIDGET,{id:this._widgetId})}};e.DeleteWidgetAction=o,e.DeleteWidgetAction=o=v=fe([O(2,D.IAngularEventingService)],o);let u=class extends t.Action{static{m=this}static{this.ID="pinTab"}static{this.PINLABEL=y.localize(5,null)}static{this.UNPINLABEL=y.localize(6,null)}static{this.PINICON="pin"}static{this.UNPINICON="unpin"}constructor(l,n,g,w){super(m.ID,m.PINLABEL,m.PINICON),this._tabId=l,this._uri=n,this._isPinned=g,this.angularEventService=w,this.updatePinStatus()}updatePinStatus(){this._isPinned?(this.label=m.PINLABEL,this.class=m.PINICON):(this.label=m.UNPINLABEL,this.class=m.UNPINICON)}async run(){this._isPinned=!this._isPinned,this.updatePinStatus(),this.angularEventService.sendAngularEvent(this._uri,D.AngularEventType.PINUNPIN_TAB,{tabId:this._tabId,isPinned:this._isPinned})}};e.PinUnpinTabAction=u,e.PinUnpinTabAction=u=m=fe([O(3,D.IAngularEventingService)],u);let d=class extends t.Action{static{S=this}static{this.ID="openInstalledFeatures"}static{this.LABEL=y.localize(7,null)}static{this.ICON="new"}constructor(l,n,g,w,E){super(S.ID,S.LABEL,S.ICON),this._dashboardTabs=l,this._openedTabs=n,this._uri=g,this._newDashboardTabService=w,this._angularEventService=E,this._register(this._angularEventService.onAngularEvent(this._uri)(C=>this.handleDashboardEvent(C)))}async run(){this._newDashboardTabService.showDialog(this._dashboardTabs,this._openedTabs,this._uri)}handleDashboardEvent(l){switch(l.event){case D.AngularEventType.NEW_TABS:l.payload.dashboardTabs.forEach(w=>{this._openedTabs.find(C=>C===w)||this._openedTabs.push(w)});break;case D.AngularEventType.CLOSE_TAB:const g=this._openedTabs.findIndex(w=>w.id===l.payload.id);this._openedTabs.splice(g,1);break}}};e.AddFeatureTabAction=d,e.AddFeatureTabAction=d=S=fe([O(3,T.INewDashboardTabDialogService),O(4,D.IAngularEventingService)],d);let p=class extends t.Action{static{h=this}static{this.ID="collapseWidget"}static{this.COLLPASE_LABEL=y.localize(8,null)}static{this.EXPAND_LABEL=y.localize(9,null)}static{this.COLLAPSE_ICON="codicon-chevron-up"}static{this.EXPAND_ICON="codicon-chevron-down"}constructor(l,n,g,w){super(h.ID,g?h.EXPAND_LABEL:h.COLLPASE_LABEL,g?h.EXPAND_ICON:h.COLLAPSE_ICON),this._uri=l,this._widgetUuid=n,this.collpasedState=g,this._angularEventService=w,this.expanded=!this.collpasedState}async run(){this._toggleState(),this._angularEventService.sendAngularEvent(this._uri,D.AngularEventType.COLLAPSE_WIDGET,this._widgetUuid)}_toggleState(){this._updateState(!this.collpasedState)}_updateState(l){l!==this.collpasedState&&(this.collpasedState=l,this.class=this.collpasedState?h.EXPAND_ICON:h.COLLAPSE_ICON,this.label=this.collpasedState?h.EXPAND_LABEL:h.COLLPASE_LABEL,this.expanded=!this.collpasedState)}set state(l){this._updateState(l)}};e.CollapseWidgetAction=p,e.CollapseWidgetAction=p=h=fe([O(3,D.IAngularEventingService)],p)}),define(Q[503],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryCredentialsProvider=e.ICredentialsMainService=e.ICredentialsService=void 0,e.ICredentialsService=(0,t.createDecorator)("credentialsService"),e.ICredentialsMainService=(0,t.createDecorator)("credentialsMainService");class y{constructor(){this.secretVault={}}async getPassword(D,T){return this.secretVault[D]?.[T]??null}async setPassword(D,T,f){this.secretVault[D]=this.secretVault[D]??{},this.secretVault[D][T]=f}async deletePassword(D,T){return this.secretVault[D]?.[T]?(delete this.secretVault[D][T],Object.keys(this.secretVault[D]).length===0&&delete this.secretVault[D],!0):!1}async findPassword(D){return JSON.stringify(this.secretVault[D])??null}async findCredentials(D){const T=[];for(const f of Object.keys(this.secretVault[D]||{}))T.push({account:f,password:this.secretVault[D][f]});return T}async clear(){this.secretVault={}}}e.InMemoryCredentialsProvider=y}),define(Q[861],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionHostDebugService=void 0,e.IExtensionHostDebugService=(0,t.createDecorator)("extensionHostDebugService")}),define(Q[862],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullDiagnosticsService=e.isRemoteDiagnosticError=e.IDiagnosticsService=e.ID=void 0,e.ID="diagnosticsService",e.IDiagnosticsService=(0,t.createDecorator)(e.ID);function y(D){return!!D.hostName&&!!D.errorMessage}e.isRemoteDiagnosticError=y;class b{async getPerformanceInfo(T,f){return{}}async getSystemInfo(T,f){return{processArgs:"nullProcessArgs",gpuStatus:"nullGpuStatus",screenReader:"nullScreenReader",remoteData:[],os:"nullOs",memory:"nullMemory",vmHint:"nullVmHint"}}async getDiagnostics(T,f){return""}async getWorkspaceFileExtensions(T){return{extensions:[]}}async reportWorkspaceStats(T){}}e.NullDiagnosticsService=b}),define(Q[49],Y([1,0,26,63,2456,5,180,18,42]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.massageMessageBoxOptions=e.getFileNamesMessage=e.ConfirmResult=e.IFileDialogService=e.AbstractDialogHandler=e.IDialogService=void 0,e.IDialogService=(0,D.createDecorator)("dialogService");var m;(function(s){s[s.Confirmation=1]="Confirmation",s[s.Prompt=2]="Prompt",s[s.Input=3]="Input"})(m||(m={}));class S{getConfirmationButtons(o){return this.getButtons(o,m.Confirmation)}getPromptButtons(o){return this.getButtons(o,m.Prompt)}getInputButtons(o){return this.getButtons(o,m.Input)}getButtons(o,u){const d=[];switch(u){case m.Confirmation:{const p=o;p.primaryButton?d.push(p.primaryButton):d.push((0,b.localize)(0,null)),p.cancelButton?d.push(p.cancelButton):d.push((0,b.localize)(1,null));break}case m.Prompt:{const p=o;Array.isArray(p.buttons)&&p.buttons.length>0&&d.push(...p.buttons.map(c=>c.label)),p.cancelButton&&(p.cancelButton===!0?d.push((0,b.localize)(2,null)):typeof p.cancelButton=="string"?d.push(p.cancelButton):p.cancelButton.label?d.push(p.cancelButton.label):d.push((0,b.localize)(3,null))),d.length===0&&d.push((0,b.localize)(4,null));break}case m.Input:{const p=o;p.primaryButton?d.push(p.primaryButton):d.push((0,b.localize)(5,null)),p.cancelButton?d.push(p.cancelButton):d.push((0,b.localize)(6,null));break}}return d}getDialogType(o){if(typeof o=="string")return o;if(typeof o=="number")return o===y.default.Info?"info":o===y.default.Error?"error":o===y.default.Warning?"warning":"none"}async getPromptResult(o,u,d){const p=[...o.buttons??[]];return o.cancelButton&&typeof o.cancelButton!="string"&&typeof o.cancelButton!="boolean"&&p.push(o.cancelButton),{result:await p[u]?.run({checkboxChecked:d}),checkboxChecked:d}}}e.AbstractDialogHandler=S,e.IFileDialogService=(0,D.createDecorator)("fileDialogService");var h;(function(s){s[s.SAVE=0]="SAVE",s[s.DONT_SAVE=1]="DONT_SAVE",s[s.CANCEL=2]="CANCEL"})(h||(e.ConfirmResult=h={}));const a=10;function r(s){const o=[];return o.push(...s.slice(0,a).map(u=>typeof u=="string"?u:(0,t.basename)(u))),s.length>a&&(s.length-a===1?o.push((0,b.localize)(7,null)):o.push((0,b.localize)(8,null,s.length-a))),o.push(""),o.join(` `)}e.getFileNamesMessage=r;function i(s,o){const u=(0,v.deepClone)(s);let d=(u.buttons??[]).map(n=>(0,T.mnemonicButtonLabel)(n)),p=(s.buttons||[]).map((n,g)=>g),c=0,l=u.cancelId??d.length-1;if(d.length>1){const n=typeof l=="number"?d[l]:void 0;if(f.isLinux||f.isMacintosh){if(typeof n=="string"&&d.length>1&&l!==1){d.splice(l,1),d.splice(1,0,n);const g=p[l];p.splice(l,1),p.splice(1,0,g),l=1}f.isLinux&&d.length>1&&(d=d.reverse(),p=p.reverse(),c=d.length-1,typeof n=="string"&&(l=c-1))}else if(f.isWindows&&typeof n=="string"&&d.length>1&&l!==d.length-1){d.splice(l,1),d.push(n);const g=p[l];p.splice(l,1),p.push(g),l=d.length-1}}return u.buttons=d,u.defaultId=c,u.cancelId=l,u.noLink=!0,u.title=u.title||o.nameLong,{options:u,buttonIndeces:p}}e.massageMessageBoxOptions=i}),define(Q[587],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDownloadService=void 0,e.IDownloadService=(0,t.createDecorator)("downloadService")}),define(Q[690],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isGnome=e.isKwallet=e.KnownStorageProvider=e.PasswordStoreCLIOption=e.IEncryptionMainService=e.IEncryptionService=void 0,e.IEncryptionService=(0,t.createDecorator)("encryptionService"),e.IEncryptionMainService=(0,t.createDecorator)("encryptionMainService");var y;(function(f){f.kwallet="kwallet",f.kwallet5="kwallet5",f.gnome="gnome",f.gnomeKeyring="gnome-keyring",f.gnomeLibsecret="gnome-libsecret",f.basic="basic"})(y||(e.PasswordStoreCLIOption=y={}));var b;(function(f){f.unknown="unknown",f.basicText="basic_text",f.gnomeAny="gnome_any",f.gnomeLibsecret="gnome_libsecret",f.gnomeKeyring="gnome_keyring",f.kwallet="kwallet",f.kwallet5="kwallet5",f.kwallet6="kwallet6",f.dplib="dpapi",f.keychainAccess="keychain_access"})(b||(e.KnownStorageProvider=b={}));function D(f){return f==="kwallet"||f==="kwallet5"||f==="kwallet6"}e.isKwallet=D;function T(f){return f==="gnome_any"||f==="gnome_libsecret"||f==="gnome_keyring"}e.isGnome=T}),define(Q[91],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INativeEnvironmentService=e.IEnvironmentService=void 0,e.IEnvironmentService=(0,t.createDecorator)("environmentService"),e.INativeEnvironmentService=(0,t.refineServiceDecorator)(e.IEnvironmentService)}),define(Q[95],Y([1,0,2458,5]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreferencesLocalizedLabel=e.ExtensionsLocalizedLabel=e.ExtensionsLabel=e.IExtensionTipsService=e.IGlobalExtensionEnablementService=e.ENABLED_EXTENSIONS_STORAGE_PATH=e.DISABLED_EXTENSIONS_STORAGE_PATH=e.IExtensionManagementService=e.ExtensionManagementError=e.ExtensionSignaturetErrorCode=e.ExtensionManagementErrorCode=e.IExtensionGalleryService=e.InstallOperation=e.StatisticType=e.SortOrder=e.SortBy=e.isIExtensionIdentifier=e.getFallbackTargetPlarforms=e.isTargetPlatformCompatible=e.isNotWebExtensionInWebTargetPlatform=e.getTargetPlatform=e.toTargetPlatform=e.TargetPlatformToString=e.EXTENSION_INSTALL_DEP_PACK_CONTEXT=e.EXTENSION_INSTALL_SYNC_CONTEXT=e.EXTENSION_INSTALL_SKIP_WALKTHROUGH_CONTEXT=e.WEB_EXTENSION_TAG=e.EXTENSION_IDENTIFIER_REGEX=e.EXTENSION_IDENTIFIER_PATTERN=void 0,e.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",e.EXTENSION_IDENTIFIER_REGEX=new RegExp(e.EXTENSION_IDENTIFIER_PATTERN),e.WEB_EXTENSION_TAG="__web_extension",e.EXTENSION_INSTALL_SKIP_WALKTHROUGH_CONTEXT="skipWalkthrough",e.EXTENSION_INSTALL_SYNC_CONTEXT="extensionsSync",e.EXTENSION_INSTALL_DEP_PACK_CONTEXT="dependecyOrPackExtensionInstall";function b(d){switch(d){case"win32-x64":return"Windows 64 bit";case"win32-ia32":return"Windows 32 bit";case"win32-arm64":return"Windows ARM";case"linux-x64":return"Linux 64 bit";case"linux-arm64":return"Linux ARM 64";case"linux-armhf":return"Linux ARM";case"alpine-x64":return"Alpine Linux 64 bit";case"alpine-arm64":return"Alpine ARM 64";case"darwin-x64":return"Mac";case"darwin-arm64":return"Mac Silicon";case"web":return"Web";case"universal":return"universal";case"unknown":return"unknown";case"undefined":return"undefined"}}e.TargetPlatformToString=b;function D(d){switch(d){case"win32-x64":return"win32-x64";case"win32-ia32":return"win32-ia32";case"win32-arm64":return"win32-arm64";case"linux-x64":return"linux-x64";case"linux-arm64":return"linux-arm64";case"linux-armhf":return"linux-armhf";case"alpine-x64":return"alpine-x64";case"alpine-arm64":return"alpine-arm64";case"darwin-x64":return"darwin-x64";case"darwin-arm64":return"darwin-arm64";case"web":return"web";case"universal":return"universal";default:return"unknown"}}e.toTargetPlatform=D;function T(d,p){switch(d){case 3:return p==="x64"?"win32-x64":p==="ia32"?"win32-ia32":p==="arm64"?"win32-arm64":"unknown";case 2:return p==="x64"?"linux-x64":p==="arm64"?"linux-arm64":p==="arm"?"linux-armhf":"unknown";case"alpine":return p==="x64"?"alpine-x64":p==="arm64"?"alpine-arm64":"unknown";case 1:return p==="x64"?"darwin-x64":p==="arm64"?"darwin-arm64":"unknown";case 0:return"web"}}e.getTargetPlatform=T;function f(d,p){return p==="web"&&!d.includes("web")}e.isNotWebExtensionInWebTargetPlatform=f;function v(d,p,c){return f(p,c)?!1:d==="undefined"||d==="universal"?!0:d==="unknown"?!1:d===c?!0:m(c).includes(d)}e.isTargetPlatformCompatible=v;function m(d){switch(d){case"win32-x64":return["win32-ia32"];case"win32-arm64":return["win32-ia32"]}return[]}e.getFallbackTargetPlarforms=m;function S(d){return d&&typeof d=="object"&&typeof d.id=="string"&&(!d.uuid||typeof d.uuid=="string")}e.isIExtensionIdentifier=S;var h;(function(d){d[d.NoneOrRelevance=0]="NoneOrRelevance",d[d.LastUpdatedDate=1]="LastUpdatedDate",d[d.Title=2]="Title",d[d.PublisherName=3]="PublisherName",d[d.InstallCount=4]="InstallCount",d[d.PublishedDate=10]="PublishedDate",d[d.AverageRating=6]="AverageRating",d[d.WeightedRating=12]="WeightedRating"})(h||(e.SortBy=h={}));var a;(function(d){d[d.Default=0]="Default",d[d.Ascending=1]="Ascending",d[d.Descending=2]="Descending"})(a||(e.SortOrder=a={}));var r;(function(d){d.Install="install",d.Uninstall="uninstall"})(r||(e.StatisticType=r={}));var i;(function(d){d[d.None=1]="None",d[d.Install=2]="Install",d[d.Update=3]="Update",d[d.Migrate=4]="Migrate"})(i||(e.InstallOperation=i={})),e.IExtensionGalleryService=(0,y.createDecorator)("extensionGalleryService");var s;(function(d){d.Unsupported="Unsupported",d.Deprecated="Deprecated",d.Malicious="Malicious",d.Incompatible="Incompatible",d.IncompatibleTargetPlatform="IncompatibleTargetPlatform",d.ReleaseVersionNotFound="ReleaseVersionNotFound",d.Invalid="Invalid",d.Download="Download",d.Extract="Extract",d.Delete="Delete",d.Rename="Rename",d.CorruptZip="CorruptZip",d.IncompleteZip="IncompleteZip",d.Signature="Signature",d.Internal="Internal"})(s||(e.ExtensionManagementErrorCode=s={}));var o;(function(d){d.UnknownError="UnknownError",d.PackageIsInvalidZip="PackageIsInvalidZip",d.SignatureArchiveIsInvalidZip="SignatureArchiveIsInvalidZip"})(o||(e.ExtensionSignaturetErrorCode=o={}));class u extends Error{constructor(p,c){super(p),this.code=c,this.name=c}}e.ExtensionManagementError=u,e.IExtensionManagementService=(0,y.createDecorator)("extensionManagementService"),e.DISABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/disabled",e.ENABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/enabled",e.IGlobalExtensionEnablementService=(0,y.createDecorator)("IGlobalExtensionEnablementService"),e.IExtensionTipsService=(0,y.createDecorator)("IExtensionTipsService"),e.ExtensionsLabel=(0,t.localize)(0,null),e.ExtensionsLocalizedLabel={value:e.ExtensionsLabel,original:"Extensions"},e.PreferencesLocalizedLabel={value:(0,t.localize)(1,null),original:"Preferences"}}),define(Q[3181],Y([1,0,6,4,42,10,834,95]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionTipsChannel=e.ExtensionManagementChannelClient=e.ExtensionManagementChannel=void 0;function v(o,u){return o?D.URI.revive(u?u.transformIncoming(o):o):void 0}function m(o,u){return u?u.transformOutgoingURI(o):o}function S(o,u){u=u||T.DefaultURITransformer;const d=o.manifest;return{...(0,T.transformAndReviveIncomingURIs)({...o,manifest:void 0},u),manifest:d}}function h(o,u){return o?.profileLocation?(0,T.transformAndReviveIncomingURIs)(o,u??T.DefaultURITransformer):o}function a(o,u){return u?(0,b.cloneAndChange)(o,d=>d instanceof D.URI?u.transformOutgoingURI(d):void 0):o}class r{constructor(u,d){this.service=u,this.getUriTransformer=d,this.onInstallExtension=t.Event.buffer(u.onInstallExtension,!0),this.onDidInstallExtensions=t.Event.buffer(u.onDidInstallExtensions,!0),this.onUninstallExtension=t.Event.buffer(u.onUninstallExtension,!0),this.onDidUninstallExtension=t.Event.buffer(u.onDidUninstallExtension,!0),this.onDidUpdateExtensionMetadata=t.Event.buffer(u.onDidUpdateExtensionMetadata,!0)}listen(u,d){const p=this.getUriTransformer(u);switch(d){case"onInstallExtension":return t.Event.map(this.onInstallExtension,c=>({...c,profileLocation:c.profileLocation?m(c.profileLocation,p):c.profileLocation}));case"onDidInstallExtensions":return t.Event.map(this.onDidInstallExtensions,c=>c.map(l=>({...l,local:l.local?a(l.local,p):l.local,profileLocation:l.profileLocation?m(l.profileLocation,p):l.profileLocation})));case"onUninstallExtension":return t.Event.map(this.onUninstallExtension,c=>({...c,profileLocation:c.profileLocation?m(c.profileLocation,p):c.profileLocation}));case"onDidUninstallExtension":return t.Event.map(this.onDidUninstallExtension,c=>({...c,profileLocation:c.profileLocation?m(c.profileLocation,p):c.profileLocation}));case"onDidUpdateExtensionMetadata":return t.Event.map(this.onDidUpdateExtensionMetadata,c=>a(c,p))}throw new Error("Invalid listen")}async call(u,d,p){const c=this.getUriTransformer(u);switch(d){case"zip":{const l=S(p[0],c),n=await this.service.zip(l);return m(n,c)}case"unzip":return this.service.unzip(v(p[0],c));case"install":return this.service.install(v(p[0],c),h(p[1],c));case"installFromLocation":return this.service.installFromLocation(v(p[0],c),v(p[1],c));case"installExtensionsFromProfile":return this.service.installExtensionsFromProfile(p[0],v(p[1],c),v(p[2],c));case"getManifest":return this.service.getManifest(v(p[0],c));case"getTargetPlatform":return this.service.getTargetPlatform();case"canInstall":return this.service.canInstall(p[0]);case"installFromGallery":return this.service.installFromGallery(p[0],h(p[1],c));case"installGalleryExtensions":{const l=p[0];return this.service.installGalleryExtensions(l.map(({extension:n,options:g})=>({extension:n,options:h(g,c)??{}})))}case"uninstall":return this.service.uninstall(S(p[0],c),h(p[1],c));case"reinstallFromGallery":return this.service.reinstallFromGallery(S(p[0],c));case"getInstalled":return(await this.service.getInstalled(p[0],v(p[1],c))).map(n=>a(n,c));case"toggleAppliationScope":{const l=await this.service.toggleAppliationScope(S(p[0],c),v(p[1],c));return a(l,c)}case"copyExtensions":return this.service.copyExtensions(v(p[0],c),v(p[1],c));case"updateMetadata":{const l=await this.service.updateMetadata(S(p[0],c),p[1],v(p[2],c));return a(l,c)}case"getExtensionsControlManifest":return this.service.getExtensionsControlManifest();case"download":return this.service.download(p[0],p[1],p[2]);case"cleanUp":return this.service.cleanUp()}throw new Error("Invalid call")}}e.ExtensionManagementChannel=r;class i extends y.Disposable{get onInstallExtension(){return this._onInstallExtension.event}get onDidInstallExtensions(){return this._onDidInstallExtensions.event}get onUninstallExtension(){return this._onUninstallExtension.event}get onDidUninstallExtension(){return this._onDidUninstallExtension.event}get onDidUpdateExtensionMetadata(){return this._onDidUpdateExtensionMetadata.event}constructor(u){super(),this.channel=u,this._onInstallExtension=this._register(new t.Emitter),this._onDidInstallExtensions=this._register(new t.Emitter),this._onUninstallExtension=this._register(new t.Emitter),this._onDidUninstallExtension=this._register(new t.Emitter),this._onDidUpdateExtensionMetadata=this._register(new t.Emitter),this._register(this.channel.listen("onInstallExtension")(d=>this.fireEvent(this._onInstallExtension,{...d,source:this.isUriComponents(d.source)?D.URI.revive(d.source):d.source,profileLocation:D.URI.revive(d.profileLocation)}))),this._register(this.channel.listen("onDidInstallExtensions")(d=>this.fireEvent(this._onDidInstallExtensions,d.map(p=>({...p,local:p.local?S(p.local,null):p.local,source:this.isUriComponents(p.source)?D.URI.revive(p.source):p.source,profileLocation:D.URI.revive(p.profileLocation)}))))),this._register(this.channel.listen("onUninstallExtension")(d=>this.fireEvent(this._onUninstallExtension,{...d,profileLocation:D.URI.revive(d.profileLocation)}))),this._register(this.channel.listen("onDidUninstallExtension")(d=>this.fireEvent(this._onDidUninstallExtension,{...d,profileLocation:D.URI.revive(d.profileLocation)}))),this._register(this.channel.listen("onDidUpdateExtensionMetadata")(d=>this._onDidUpdateExtensionMetadata.fire(S(d,null))))}fireEvent(u,d){u.fire(d)}isUriComponents(u){return u?typeof u.path=="string"&&typeof u.scheme=="string":!1}getTargetPlatform(){return this._targetPlatformPromise||(this._targetPlatformPromise=this.channel.call("getTargetPlatform")),this._targetPlatformPromise}async canInstall(u){const d=await this.getTargetPlatform();return u.allTargetPlatforms.some(p=>(0,f.isTargetPlatformCompatible)(p,u.allTargetPlatforms,d))}zip(u){return Promise.resolve(this.channel.call("zip",[u]).then(d=>D.URI.revive(d)))}unzip(u){return Promise.resolve(this.channel.call("unzip",[u]))}install(u,d){return Promise.resolve(this.channel.call("install",[u,d])).then(p=>S(p,null))}installFromLocation(u,d){return Promise.resolve(this.channel.call("installFromLocation",[u,d])).then(p=>S(p,null))}async installExtensionsFromProfile(u,d,p){return(await this.channel.call("installExtensionsFromProfile",[u,d,p])).map(l=>S(l,null))}getManifest(u){return Promise.resolve(this.channel.call("getManifest",[u]))}installFromGallery(u,d){return Promise.resolve(this.channel.call("installFromGallery",[u,d])).then(p=>S(p,null))}async installGalleryExtensions(u){return(await this.channel.call("installGalleryExtensions",[u])).map(p=>({...p,local:p.local?S(p.local,null):p.local,source:this.isUriComponents(p.source)?D.URI.revive(p.source):p.source,profileLocation:D.URI.revive(p.profileLocation)}))}uninstall(u,d){return Promise.resolve(this.channel.call("uninstall",[u,d]))}reinstallFromGallery(u){return Promise.resolve(this.channel.call("reinstallFromGallery",[u])).then(d=>S(d,null))}getInstalled(u=null,d){return Promise.resolve(this.channel.call("getInstalled",[u,d])).then(p=>p.map(c=>S(c,null)))}updateMetadata(u,d,p){return Promise.resolve(this.channel.call("updateMetadata",[u,d,p])).then(c=>S(c,null))}toggleAppliationScope(u,d){return this.channel.call("toggleAppliationScope",[u,d]).then(p=>S(p,null))}copyExtensions(u,d){return this.channel.call("copyExtensions",[u,d])}getExtensionsControlManifest(){return Promise.resolve(this.channel.call("getExtensionsControlManifest"))}async download(u,d,p){const c=await this.channel.call("download",[u,d,p]);return D.URI.revive(c)}async cleanUp(){return this.channel.call("cleanUp")}registerParticipant(){throw new Error("Not Supported")}}e.ExtensionManagementChannelClient=i;class s{constructor(u){this.service=u}listen(u,d){throw new Error("Invalid listen")}call(u,d,p){switch(d){case"getConfigBasedTips":return this.service.getConfigBasedTips(D.URI.revive(p[0]));case"getImportantExecutableBasedTips":return this.service.getImportantExecutableBasedTips();case"getOtherExecutableBasedTips":return this.service.getOtherExecutableBasedTips()}throw new Error("Invalid call")}}e.ExtensionTipsChannel=s}),define(Q[1150],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionUrlTrustService=void 0,e.IExtensionUrlTrustService=(0,t.createDecorator)("extensionUrlTrustService")}),define(Q[588],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionRecommendationNotificationService=e.RecommendationsNotificationResult=e.RecommendationSourceToString=e.RecommendationSource=void 0;var y;(function(T){T[T.FILE=1]="FILE",T[T.WORKSPACE=2]="WORKSPACE",T[T.EXE=3]="EXE"})(y||(e.RecommendationSource=y={}));function b(T){switch(T){case 1:return"file";case 2:return"workspace";case 3:return"exe"}}e.RecommendationSourceToString=b;var D;(function(T){T.Ignored="ignored",T.Cancelled="cancelled",T.TooMany="toomany",T.IncompatibleWindow="incompatibleWindow",T.Accepted="reacted"})(D||(e.RecommendationsNotificationResult=D={})),e.IExtensionRecommendationNotificationService=(0,t.createDecorator)("IExtensionRecommendationNotificationService")}),define(Q[1151],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ipcExtensionHostStarterChannelName=e.IExtensionHostStarter=void 0,e.IExtensionHostStarter=(0,t.createDecorator)("extensionHostStarter"),e.ipcExtensionHostStarterChannelName="extensionHostStarter"}),define(Q[1152],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExternalTerminalMainService=e.DEFAULT_TERMINAL_OSX=e.IExternalTerminalService=void 0,e.IExternalTerminalService=(0,t.createDecorator)("externalTerminal"),e.DEFAULT_TERMINAL_OSX="Terminal.app",e.IExternalTerminalMainService=(0,t.createDecorator)("externalTerminal")}),define(Q[25],Y([1,0,283,55,33,17,10,2465,5,18,22]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLargeFileConfirmationLimit=e.ByteSize=e.whenProviderRegistered=e.etag=e.ETAG_DISABLED=e.FileKind=e.FILES_READONLY_FROM_PERMISSIONS_CONFIG=e.FILES_READONLY_EXCLUDE_CONFIG=e.FILES_READONLY_INCLUDE_CONFIG=e.FILES_EXCLUDE_CONFIG=e.FILES_ASSOCIATIONS_CONFIG=e.HotExitConfiguration=e.AutoSaveConfiguration=e.FileOperationResult=e.NotModifiedSinceFileOperationError=e.TooLargeFileOperationError=e.FileOperationError=e.isParent=e.FileChangesEvent=e.FileChangeType=e.FileOperationEvent=e.FileOperation=e.toFileOperationResult=e.toFileSystemProviderErrorCode=e.markAsFileSystemProviderError=e.ensureFileSystemProviderError=e.createFileSystemProviderError=e.FileSystemProviderError=e.FileSystemProviderErrorCode=e.hasReadonlyCapability=e.hasFileAtomicDeleteCapability=e.hasFileAtomicWriteCapability=e.hasFileAtomicReadCapability=e.hasFileReadStreamCapability=e.hasOpenReadWriteCloseCapability=e.hasFileCloneCapability=e.hasFileFolderCopyCapability=e.hasReadWriteCapability=e.FileSystemProviderCapabilities=e.FilePermission=e.FileType=e.isFileOpenForWriteOptions=e.IFileService=void 0,e.IFileService=(0,v.createDecorator)("fileService");function h(G){return G.create===!0}e.isFileOpenForWriteOptions=h;var a;(function(G){G[G.Unknown=0]="Unknown",G[G.File=1]="File",G[G.Directory=2]="Directory",G[G.SymbolicLink=64]="SymbolicLink"})(a||(e.FileType=a={}));var r;(function(G){G[G.Readonly=1]="Readonly",G[G.Locked=2]="Locked"})(r||(e.FilePermission=r={}));var i;(function(G){G[G.None=0]="None",G[G.FileReadWrite=2]="FileReadWrite",G[G.FileOpenReadWriteClose=4]="FileOpenReadWriteClose",G[G.FileReadStream=16]="FileReadStream",G[G.FileFolderCopy=8]="FileFolderCopy",G[G.PathCaseSensitive=1024]="PathCaseSensitive",G[G.Readonly=2048]="Readonly",G[G.Trash=4096]="Trash",G[G.FileWriteUnlock=8192]="FileWriteUnlock",G[G.FileAtomicRead=16384]="FileAtomicRead",G[G.FileAtomicWrite=32768]="FileAtomicWrite",G[G.FileAtomicDelete=65536]="FileAtomicDelete",G[G.FileClone=131072]="FileClone"})(i||(e.FileSystemProviderCapabilities=i={}));function s(G){return!!(G.capabilities&2)}e.hasReadWriteCapability=s;function o(G){return!!(G.capabilities&8)}e.hasFileFolderCopyCapability=o;function u(G){return!!(G.capabilities&131072)}e.hasFileCloneCapability=u;function d(G){return!!(G.capabilities&4)}e.hasOpenReadWriteCloseCapability=d;function p(G){return!!(G.capabilities&16)}e.hasFileReadStreamCapability=p;function c(G){return s(G)?!!(G.capabilities&16384):!1}e.hasFileAtomicReadCapability=c;function l(G){return s(G)?!!(G.capabilities&32768):!1}e.hasFileAtomicWriteCapability=l;function n(G){return!!(G.capabilities&65536)}e.hasFileAtomicDeleteCapability=n;function g(G){return!!(G.capabilities&2048)}e.hasReadonlyCapability=g;var w;(function(G){G.FileExists="EntryExists",G.FileNotFound="EntryNotFound",G.FileNotADirectory="EntryNotADirectory",G.FileIsADirectory="EntryIsADirectory",G.FileExceedsStorageQuota="EntryExceedsStorageQuota",G.FileTooLarge="EntryTooLarge",G.FileWriteLocked="EntryWriteLocked",G.NoPermissions="NoPermissions",G.Unavailable="Unavailable",G.Unknown="Unknown"})(w||(e.FileSystemProviderErrorCode=w={}));class E extends Error{static create($,ie){const J=new E($.toString(),ie);return _(J,ie),J}constructor($,ie){super($),this.code=ie}}e.FileSystemProviderError=E;function C(G,$){return E.create(G,$)}e.createFileSystemProviderError=C;function I(G){return G||C((0,f.localize)(0,null),w.Unknown)}e.ensureFileSystemProviderError=I;function _(G,$){return G.name=$?`${$} (FileSystemError)`:"FileSystemError",G}e.markAsFileSystemProviderError=_;function A(G){if(!G)return w.Unknown;if(G instanceof E)return G.code;const $=/^(.+) \(FileSystemError\)$/.exec(G.name);if(!$)return w.Unknown;switch($[1]){case w.FileExists:return w.FileExists;case w.FileIsADirectory:return w.FileIsADirectory;case w.FileNotADirectory:return w.FileNotADirectory;case w.FileNotFound:return w.FileNotFound;case w.FileTooLarge:return w.FileTooLarge;case w.FileWriteLocked:return w.FileWriteLocked;case w.NoPermissions:return w.NoPermissions;case w.Unavailable:return w.Unavailable}return w.Unknown}e.toFileSystemProviderErrorCode=A;function k(G){if(G instanceof x)return G.fileOperationResult;switch(A(G)){case w.FileNotFound:return 1;case w.FileIsADirectory:return 0;case w.FileNotADirectory:return 9;case w.FileWriteLocked:return 5;case w.NoPermissions:return 6;case w.FileExists:return 4;case w.FileTooLarge:return 7;default:return 10}}e.toFileOperationResult=k;var L;(function(G){G[G.CREATE=0]="CREATE",G[G.DELETE=1]="DELETE",G[G.MOVE=2]="MOVE",G[G.COPY=3]="COPY",G[G.WRITE=4]="WRITE"})(L||(e.FileOperation=L={}));class R{constructor($,ie,J){this.resource=$,this.operation=ie,this.target=J}isOperation($){return this.operation===$}}e.FileOperationEvent=R;var M;(function(G){G[G.UPDATED=0]="UPDATED",G[G.ADDED=1]="ADDED",G[G.DELETED=2]="DELETED"})(M||(e.FileChangeType=M={}));class N{constructor($,ie){this.added=void 0,this.updated=void 0,this.deleted=void 0,this.rawAdded=[],this.rawUpdated=[],this.rawDeleted=[];const J=new Map;for(const j of $){const ee=J.get(j.type);switch(ee?ee.push([j.resource,j]):J.set(j.type,[[j.resource,j]]),j.type){case 1:this.rawAdded.push(j.resource);break;case 0:this.rawUpdated.push(j.resource);break;case 2:this.rawDeleted.push(j.resource);break}}for(const[j,ee]of J)switch(j){case 1:this.added=t.TernarySearchTree.forUris(()=>ie),this.added.fill(ee);break;case 0:this.updated=t.TernarySearchTree.forUris(()=>ie),this.updated.fill(ee);break;case 2:this.deleted=t.TernarySearchTree.forUris(()=>ie),this.deleted.fill(ee);break}}contains($,...ie){return this.doContains($,{includeChildren:!1},...ie)}affects($,...ie){return this.doContains($,{includeChildren:!0},...ie)}doContains($,ie,...J){if(!$)return!1;const j=J.length>0;return!!((!j||J.includes(1))&&(this.added?.get($)||ie.includeChildren&&this.added?.findSuperstr($))||(!j||J.includes(0))&&(this.updated?.get($)||ie.includeChildren&&this.updated?.findSuperstr($))||(!j||J.includes(2))&&(this.deleted?.findSubstr($)||ie.includeChildren&&this.deleted?.findSuperstr($)))}gotAdded(){return!!this.added}gotDeleted(){return!!this.deleted}gotUpdated(){return!!this.updated}}e.FileChangesEvent=N;function P(G,$,ie){return!G||!$||G===$||$.length>G.length?!1:($.charAt($.length-1)!==y.sep&&($+=y.sep),ie?(0,b.startsWithIgnoreCase)(G,$):G.indexOf($)===0)}e.isParent=P;class x extends Error{constructor($,ie,J){super($),this.fileOperationResult=ie,this.options=J}}e.FileOperationError=x;class F extends x{constructor($,ie,J,j){super($,ie,j),this.fileOperationResult=ie,this.size=J}}e.TooLargeFileOperationError=F;class V extends x{constructor($,ie,J){super($,2,J),this.stat=ie}}e.NotModifiedSinceFileOperationError=V;var W;(function(G){G[G.FILE_IS_DIRECTORY=0]="FILE_IS_DIRECTORY",G[G.FILE_NOT_FOUND=1]="FILE_NOT_FOUND",G[G.FILE_NOT_MODIFIED_SINCE=2]="FILE_NOT_MODIFIED_SINCE",G[G.FILE_MODIFIED_SINCE=3]="FILE_MODIFIED_SINCE",G[G.FILE_MOVE_CONFLICT=4]="FILE_MOVE_CONFLICT",G[G.FILE_WRITE_LOCKED=5]="FILE_WRITE_LOCKED",G[G.FILE_PERMISSION_DENIED=6]="FILE_PERMISSION_DENIED",G[G.FILE_TOO_LARGE=7]="FILE_TOO_LARGE",G[G.FILE_INVALID_PATH=8]="FILE_INVALID_PATH",G[G.FILE_NOT_DIRECTORY=9]="FILE_NOT_DIRECTORY",G[G.FILE_OTHER_ERROR=10]="FILE_OTHER_ERROR"})(W||(e.FileOperationResult=W={})),e.AutoSaveConfiguration={OFF:"off",AFTER_DELAY:"afterDelay",ON_FOCUS_CHANGE:"onFocusChange",ON_WINDOW_CHANGE:"onWindowChange"},e.HotExitConfiguration={OFF:"off",ON_EXIT:"onExit",ON_EXIT_AND_WINDOW_CLOSE:"onExitAndWindowClose"},e.FILES_ASSOCIATIONS_CONFIG="files.associations",e.FILES_EXCLUDE_CONFIG="files.exclude",e.FILES_READONLY_INCLUDE_CONFIG="files.readonlyInclude",e.FILES_READONLY_EXCLUDE_CONFIG="files.readonlyExclude",e.FILES_READONLY_FROM_PERMISSIONS_CONFIG="files.readonlyFromPermissions";var z;(function(G){G[G.FILE=0]="FILE",G[G.FOLDER=1]="FOLDER",G[G.ROOT_FOLDER=2]="ROOT_FOLDER"})(z||(e.FileKind=z={})),e.ETAG_DISABLED="";function B(G){if(!(typeof G.size!="number"||typeof G.mtime!="number"))return G.mtime.toString(29)+G.size.toString(31)}e.etag=B;async function K(G,$){if(!$.hasProvider(T.URI.from({scheme:G.scheme})))return new Promise(ie=>{const J=$.onDidChangeFileSystemProviderRegistrations(j=>{j.scheme===G.scheme&&j.added&&(J.dispose(),ie())})})}e.whenProviderRegistered=K;class H{static{this.KB=1024}static{this.MB=H.KB*H.KB}static{this.GB=H.MB*H.KB}static{this.TB=H.GB*H.KB}static formatSize($){return(0,D.isNumber)($)||($=0),$<H.KB?(0,f.localize)(1,null,$.toFixed(0)):$<H.MB?(0,f.localize)(2,null,($/H.KB).toFixed(2)):$<H.GB?(0,f.localize)(3,null,($/H.MB).toFixed(2)):$<H.TB?(0,f.localize)(4,null,($/H.GB).toFixed(2)):(0,f.localize)(5,null,($/H.TB).toFixed(2))}}e.ByteSize=H;function U(G){const $=typeof G=="string"||G?.scheme===S.Schemas.vscodeRemote;return typeof G!="string"&&G?.scheme===S.Schemas.file?1024*H.MB:$?10*H.MB:m.isWeb?50*H.MB:1024*H.MB}e.getLargeFileConfirmationLimit=U}),define(Q[3182],Y([1,0,2463,10,62,6,4,22,55,18,26,300,25,580]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLFileSystemProvider=void 0;class i{get capabilities(){return this._capabilities||(this._capabilities=18,m.isLinux&&(this._capabilities|=1024)),this._capabilities}constructor(o,u,d){this.indexedDB=o,this.store=u,this.logService=d,this.onDidChangeCapabilities=D.Event.None,this.onDidChangeFile=D.Event.None,this.extUri=m.isLinux?S.extUri:S.extUriIgnorePathCase,this._files=new Map,this._directories=new Map}async stat(o){try{const u=await this.getHandle(o);if(!u)throw this.createFileSystemProviderError(o,"No such file or directory, stat",a.FileSystemProviderErrorCode.FileNotFound);if(r.WebFileSystemAccess.isFileSystemFileHandle(u)){const d=await u.getFile();return{type:a.FileType.File,mtime:d.lastModified,ctime:0,size:d.size}}return{type:a.FileType.Directory,mtime:0,ctime:0,size:0}}catch(u){throw this.toFileSystemProviderError(u)}}async readdir(o){try{const u=await this.getDirectoryHandle(o);if(!u)throw this.createFileSystemProviderError(o,"No such file or directory, readdir",a.FileSystemProviderErrorCode.FileNotFound);const d=[];for await(const[p,c]of u)d.push([p,r.WebFileSystemAccess.isFileSystemFileHandle(c)?a.FileType.File:a.FileType.Directory]);return d}catch(u){throw this.toFileSystemProviderError(u)}}readFileStream(o,u,d){const p=(0,h.newWriteableStream)(c=>b.VSBuffer.concat(c.map(l=>b.VSBuffer.wrap(l))).buffer,{highWaterMark:10});return(async()=>{try{const c=await this.getFileHandle(o);if(!c)throw this.createFileSystemProviderError(o,"No such file or directory, readFile",a.FileSystemProviderErrorCode.FileNotFound);const l=await c.getFile();if(typeof u.length=="number"||typeof u.position=="number"){let n=new Uint8Array(await l.arrayBuffer());typeof u?.position=="number"&&(n=n.slice(u.position)),typeof u?.length=="number"&&(n=n.slice(0,u.length)),p.end(n)}else{const n=l.stream().getReader();let g=await n.read();for(;!g.done&&!(d.isCancellationRequested||(await p.write(g.value),d.isCancellationRequested));)g=await n.read();p.end(void 0)}}catch(c){p.error(this.toFileSystemProviderError(c)),p.end()}})(),p}async readFile(o){try{const u=await this.getFileHandle(o);if(!u)throw this.createFileSystemProviderError(o,"No such file or directory, readFile",a.FileSystemProviderErrorCode.FileNotFound);const d=await u.getFile();return new Uint8Array(await d.arrayBuffer())}catch(u){throw this.toFileSystemProviderError(u)}}async writeFile(o,u,d){try{let p=await this.getFileHandle(o);if(!d.create||!d.overwrite){if(p){if(!d.overwrite)throw this.createFileSystemProviderError(o,"File already exists, writeFile",a.FileSystemProviderErrorCode.FileExists)}else if(!d.create)throw this.createFileSystemProviderError(o,"No such file, writeFile",a.FileSystemProviderErrorCode.FileNotFound)}if(!p){const l=await this.getDirectoryHandle(this.extUri.dirname(o));if(!l)throw this.createFileSystemProviderError(o,"No such parent directory, writeFile",a.FileSystemProviderErrorCode.FileNotFound);if(p=await l.getFileHandle(this.extUri.basename(o),{create:!0}),!p)throw this.createFileSystemProviderError(o,"Unable to create file , writeFile",a.FileSystemProviderErrorCode.Unknown)}const c=await p.createWritable();await c.write(u),await c.close()}catch(p){throw this.toFileSystemProviderError(p)}}async mkdir(o){try{const u=await this.getDirectoryHandle(this.extUri.dirname(o));if(!u)throw this.createFileSystemProviderError(o,"No such parent directory, mkdir",a.FileSystemProviderErrorCode.FileNotFound);await u.getDirectoryHandle(this.extUri.basename(o),{create:!0})}catch(u){throw this.toFileSystemProviderError(u)}}async delete(o,u){try{const d=await this.getDirectoryHandle(this.extUri.dirname(o));if(!d)throw this.createFileSystemProviderError(o,"No such parent directory, delete",a.FileSystemProviderErrorCode.FileNotFound);return d.removeEntry(this.extUri.basename(o),{recursive:u.recursive})}catch(d){throw this.toFileSystemProviderError(d)}}async rename(o,u,d){try{if(this.extUri.isEqual(o,u))return;const p=await this.getFileHandle(o);if(p){const c=await p.getFile(),l=new Uint8Array(await c.arrayBuffer());await this.writeFile(u,l,{create:!0,overwrite:d.overwrite,unlock:!1,atomic:!1}),await this.delete(o,{recursive:!1,useTrash:!1,atomic:!1})}else throw this.createFileSystemProviderError(o,(0,t.localize)(0,null),a.FileSystemProviderErrorCode.Unavailable)}catch(p){throw this.toFileSystemProviderError(p)}}watch(o,u){return T.Disposable.None}registerFileHandle(o){return this.registerHandle(o,this._files)}registerDirectoryHandle(o){return this.registerHandle(o,this._directories)}get directories(){return this._directories.values()}async registerHandle(o,u){let d=`/${o.name}`;if(u.has(d)&&!await u.get(d)?.isSameEntry(o)){const p=(0,v.extname)(o.name),c=(0,v.basename)(o.name,p);let l=1;do d=`/${c}-${l++}${p}`;while(u.has(d)&&!await u.get(d)?.isSameEntry(o))}u.set(d,o);try{await this.indexedDB?.runInTransaction(this.store,"readwrite",p=>p.put(o,d))}catch(p){this.logService.error(p)}return y.URI.from({scheme:f.Schemas.file,path:d})}async getHandle(o){let u=await this.doGetHandle(o);if(!u){const d=await this.getDirectoryHandle(this.extUri.dirname(o));if(d){const p=S.extUri.basename(o);try{u=await d.getFileHandle(p)}catch{try{u=await d.getDirectoryHandle(p)}catch{}}}}return u}async getFileHandle(o){const u=await this.doGetHandle(o);if(u instanceof FileSystemFileHandle)return u;const d=await this.getDirectoryHandle(this.extUri.dirname(o));try{return await d?.getFileHandle(S.extUri.basename(o))}catch{return}}async getDirectoryHandle(o){const u=await this.doGetHandle(o);if(u instanceof FileSystemDirectoryHandle)return u;const d=this.extUri.dirname(o);if(this.extUri.isEqual(d,o))return;const p=await this.getDirectoryHandle(d);try{return await p?.getDirectoryHandle(S.extUri.basename(o))}catch{return}}async doGetHandle(o){if(this.extUri.dirname(o).path!=="/")return;const u=o.path.replace(/\/$/,""),d=this._files.get(u)??this._directories.get(u);if(d)return d;const p=await this.indexedDB?.runInTransaction(this.store,"readonly",c=>c.get(u));if(r.WebFileSystemAccess.isFileSystemHandle(p)){let c=await p.queryPermission()==="granted";try{c||(c=await p.requestPermission()==="granted")}catch(l){this.logService.error(l)}if(c)return r.WebFileSystemAccess.isFileSystemFileHandle(p)?this._files.set(u,p):r.WebFileSystemAccess.isFileSystemDirectoryHandle(p)&&this._directories.set(u,p),p}throw this.createFileSystemProviderError(o,"No file system handle registered",a.FileSystemProviderErrorCode.Unavailable)}toFileSystemProviderError(o){if(o instanceof a.FileSystemProviderError)return o;let u=a.FileSystemProviderErrorCode.Unknown;return o.name==="NotAllowedError"&&(o=new Error((0,t.localize)(1,null)),u=a.FileSystemProviderErrorCode.Unavailable),(0,a.createFileSystemProviderError)(o,u)}createFileSystemProviderError(o,u,d){return(0,a.createFileSystemProviderError)(new Error(`${u} (${(0,v.normalize)(o.path)})`),d)}}e.HTMLFileSystemProvider=i}),define(Q[1153],Y([1,0,62,132,15,6,4,300,10,59,25]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiskFileSystemProviderClient=e.LOCAL_FILE_SYSTEM_CHANNEL_NAME=void 0,e.LOCAL_FILE_SYSTEM_CHANNEL_NAME="localFilesystem";class h extends T.Disposable{constructor(r,i){super(),this.channel=r,this.extraCapabilities=i,this.onDidChangeCapabilities=D.Event.None,this._onDidChange=this._register(new D.Emitter),this.onDidChangeFile=this._onDidChange.event,this._onDidWatchError=this._register(new D.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.sessionId=(0,m.generateUuid)(),this.registerFileChangeListeners()}get capabilities(){return this._capabilities||(this._capabilities=253982,this.extraCapabilities.pathCaseSensitive&&(this._capabilities|=1024),this.extraCapabilities.trash&&(this._capabilities|=4096)),this._capabilities}stat(r){return this.channel.call("stat",[r])}readdir(r){return this.channel.call("readdir",[r])}async readFile(r,i){const{buffer:s}=await this.channel.call("readFile",[r,i]);return s}readFileStream(r,i,s){const o=(0,f.newWriteableStream)(d=>t.VSBuffer.concat(d.map(p=>t.VSBuffer.wrap(p))).buffer),u=this.channel.listen("readFileStream",[r,i])(d=>{if(d instanceof t.VSBuffer)o.write(d.buffer);else{if(d==="end")o.end();else{let p;if(d instanceof Error)p=d;else{const c=d;p=(0,S.createFileSystemProviderError)(c.message??(0,y.toErrorMessage)(c),c.code??S.FileSystemProviderErrorCode.Unknown)}o.error(p),o.end()}u.dispose()}});return s.onCancellationRequested(()=>{o.error((0,b.canceled)()),o.end(),u.dispose()}),o}writeFile(r,i,s){return this.channel.call("writeFile",[r,t.VSBuffer.wrap(i),s])}open(r,i){return this.channel.call("open",[r,i])}close(r){return this.channel.call("close",[r])}async read(r,i,s,o,u){const[d,p]=await this.channel.call("read",[r,i,u]);return s.set(d.buffer.slice(0,p),o),p}write(r,i,s,o,u){return this.channel.call("write",[r,i,t.VSBuffer.wrap(s),o,u])}mkdir(r){return this.channel.call("mkdir",[r])}delete(r,i){return this.channel.call("delete",[r,i])}rename(r,i,s){return this.channel.call("rename",[r,i,s])}copy(r,i,s){return this.channel.call("copy",[r,i,s])}cloneFile(r,i){return this.channel.call("cloneFile",[r,i])}registerFileChangeListeners(){this._register(this.channel.listen("fileChange",[this.sessionId])(r=>{if(Array.isArray(r)){const i=r;this._onDidChange.fire(i.map(s=>({resource:v.URI.revive(s.resource),type:s.type})))}else{const i=r;this._onDidWatchError.fire(i)}}))}watch(r,i){const s=(0,m.generateUuid)();return this.channel.call("watch",[this.sessionId,s,r,i]),(0,T.toDisposable)(()=>this.channel.call("unwatch",[this.sessionId,s]))}}e.DiskFileSystemProviderClient=h}),define(Q[3183],Y([1,0,6,4,26,25]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryFileSystemProvider=void 0;class T{constructor(S){this.type=D.FileType.File,this.ctime=Date.now(),this.mtime=Date.now(),this.size=0,this.name=S}}class f{constructor(S){this.type=D.FileType.Directory,this.ctime=Date.now(),this.mtime=Date.now(),this.size=0,this.name=S,this.entries=new Map}}class v extends y.Disposable{constructor(){super(...arguments),this._onDidChangeCapabilities=this._register(new t.Emitter),this.onDidChangeCapabilities=this._onDidChangeCapabilities.event,this._capabilities=1026,this.root=new f(""),this._onDidChangeFile=this._register(new t.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this._bufferedChanges=[]}get capabilities(){return this._capabilities}setReadOnly(S){const h=!!(this._capabilities&2048);S!==h&&(this._capabilities=S?3074:1026,this._onDidChangeCapabilities.fire())}async stat(S){return this._lookup(S,!1)}async readdir(S){const h=this._lookupAsDirectory(S,!1),a=[];return h.entries.forEach((r,i)=>a.push([i,r.type])),a}async readFile(S){const h=this._lookupAsFile(S,!1).data;if(h)return h;throw(0,D.createFileSystemProviderError)("file not found",D.FileSystemProviderErrorCode.FileNotFound)}async writeFile(S,h,a){const r=b.basename(S),i=this._lookupParentDirectory(S);let s=i.entries.get(r);if(s instanceof f)throw(0,D.createFileSystemProviderError)("file is directory",D.FileSystemProviderErrorCode.FileIsADirectory);if(!s&&!a.create)throw(0,D.createFileSystemProviderError)("file not found",D.FileSystemProviderErrorCode.FileNotFound);if(s&&a.create&&!a.overwrite)throw(0,D.createFileSystemProviderError)("file exists already",D.FileSystemProviderErrorCode.FileExists);s||(s=new T(r),i.entries.set(r,s),this._fireSoon({type:1,resource:S})),s.mtime=Date.now(),s.size=h.byteLength,s.data=h,this._fireSoon({type:0,resource:S})}async rename(S,h,a){if(!a.overwrite&&this._lookup(h,!0))throw(0,D.createFileSystemProviderError)("file exists already",D.FileSystemProviderErrorCode.FileExists);const r=this._lookup(S,!1),i=this._lookupParentDirectory(S),s=this._lookupParentDirectory(h),o=b.basename(h);i.entries.delete(r.name),r.name=o,s.entries.set(o,r),this._fireSoon({type:2,resource:S},{type:1,resource:h})}async delete(S,h){const a=b.dirname(S),r=b.basename(S),i=this._lookupAsDirectory(a,!1);i.entries.has(r)&&(i.entries.delete(r),i.mtime=Date.now(),i.size-=1,this._fireSoon({type:0,resource:a},{resource:S,type:2}))}async mkdir(S){if(this._lookup(S,!0))throw(0,D.createFileSystemProviderError)("file exists already",D.FileSystemProviderErrorCode.FileExists);const h=b.basename(S),a=b.dirname(S),r=this._lookupAsDirectory(a,!1),i=new f(h);r.entries.set(i.name,i),r.mtime=Date.now(),r.size+=1,this._fireSoon({type:0,resource:a},{type:1,resource:S})}_lookup(S,h){const a=S.path.split("/");let r=this.root;for(const i of a){if(!i)continue;let s;if(r instanceof f&&(s=r.entries.get(i)),!s){if(h)return;throw(0,D.createFileSystemProviderError)("file not found",D.FileSystemProviderErrorCode.FileNotFound)}r=s}return r}_lookupAsDirectory(S,h){const a=this._lookup(S,h);if(a instanceof f)return a;throw(0,D.createFileSystemProviderError)("file not a directory",D.FileSystemProviderErrorCode.FileNotADirectory)}_lookupAsFile(S,h){const a=this._lookup(S,h);if(a instanceof T)return a;throw(0,D.createFileSystemProviderError)("file is a directory",D.FileSystemProviderErrorCode.FileIsADirectory)}_lookupParentDirectory(S){const h=b.dirname(S);return this._lookupAsDirectory(h,!1)}watch(S,h){return y.Disposable.None}_fireSoon(...S){this._bufferedChanges.push(...S),this._fireSoonHandle&&clearTimeout(this._fireSoonHandle),this._fireSoonHandle=setTimeout(()=>{this._onDidChangeFile.fire(this._bufferedChanges),this._bufferedChanges.length=0},5)}}e.InMemoryFileSystemProvider=v}),define(Q[3184],Y([1,0,62,15,2466,25]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readFileIntoStream=void 0;async function T(S,h,a,r,i,s){let o;try{await f(S,h,a,r,i,s)}catch(u){o=u}finally{o&&i.errorTransformer&&(o=i.errorTransformer(o)),typeof o<"u"&&a.error(o),a.end()}}e.readFileIntoStream=T;async function f(S,h,a,r,i,s){v(s);const o=await S.open(h,{create:!1});try{v(s);let u=0,d=0,p=i&&typeof i.length=="number"?i.length:void 0,c=t.VSBuffer.alloc(Math.min(i.bufferSize,typeof p=="number"?p:i.bufferSize)),l=i&&typeof i.position=="number"?i.position:0,n=0;do d=await S.read(o,l,c.buffer,n,c.byteLength-n),l+=d,n+=d,u+=d,typeof p=="number"&&(p-=d),n===c.byteLength&&(await a.write(r(c)),c=t.VSBuffer.alloc(Math.min(i.bufferSize,typeof p=="number"?p:i.bufferSize)),n=0);while(d>0&&(typeof p!="number"||p>0)&&v(s)&&m(u,i));if(n>0){let g=n;typeof p=="number"&&(g=Math.min(n,p)),a.write(r(c.slice(0,g)))}}catch(u){throw(0,D.ensureFileSystemProviderError)(u)}finally{await S.close(o)}}function v(S){if(S.isCancellationRequested)throw(0,y.canceled)();return!0}function m(S,h){if(typeof h?.limits?.size=="number"&&S>h.limits.size)throw(0,D.createFileSystemProviderError)((0,b.localize)(0,null),D.FileSystemProviderErrorCode.FileTooLarge);return!0}}),define(Q[863],Y([1,0,195,4,55,18,10,25]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseWatcherPatterns=e.normalizeWatcherPattern=e.coalesceEvents=e.toFileChanges=e.AbstractUniversalWatcherClient=e.AbstractNonRecursiveWatcherClient=e.AbstractWatcherClient=e.isRecursiveWatchRequest=void 0;function v(u){return u.recursive===!0}e.isRecursiveWatchRequest=v;class m extends y.Disposable{static{this.MAX_RESTARTS=5}constructor(d,p,c,l){super(),this.onFileChanges=d,this.onLogMessage=p,this.verboseLogging=c,this.options=l,this.watcherDisposables=this._register(new y.MutableDisposable),this.requests=void 0,this.restartCounter=0}init(){const d=new y.DisposableStore;this.watcherDisposables.value=d,this.watcher=this.createWatcher(d),this.watcher.setVerboseLogging(this.verboseLogging),d.add(this.watcher.onDidChangeFile(p=>this.onFileChanges(p))),d.add(this.watcher.onDidLogMessage(p=>this.onLogMessage(p))),d.add(this.watcher.onDidError(p=>this.onError(p)))}onError(d){this.options.restartOnError?this.restartCounter<m.MAX_RESTARTS&&this.requests?(this.error(`restarting watcher after error: ${d}`),this.restart(this.requests)):this.error(`gave up attempting to restart watcher after error: ${d}`):this.error(d)}restart(d){this.restartCounter++,this.init(),this.watch(d)}async watch(d){this.requests=d,await this.watcher?.watch(d)}async setVerboseLogging(d){this.verboseLogging=d,await this.watcher?.setVerboseLogging(d)}error(d){this.onLogMessage({type:"error",message:`[File Watcher (${this.options.type})] ${d}`})}trace(d){this.onLogMessage({type:"trace",message:`[File Watcher (${this.options.type})] ${d}`})}dispose(){return this.watcher=void 0,super.dispose()}}e.AbstractWatcherClient=m;class S extends m{constructor(d,p,c){super(d,p,c,{type:"node.js",restartOnError:!1})}}e.AbstractNonRecursiveWatcherClient=S;class h extends m{constructor(d,p,c){super(d,p,c,{type:"universal",restartOnError:!0})}}e.AbstractUniversalWatcherClient=h;function a(u){return u.map(d=>({type:d.type,resource:T.URI.file(d.path)}))}e.toFileChanges=a;function r(u){const d=new o;for(const p of u)d.processEvent(p);return d.coalesce()}e.coalesceEvents=r;function i(u,d){return typeof d=="string"&&!d.startsWith(t.GLOBSTAR)&&!(0,b.isAbsolute)(d)?{base:u,pattern:d}:d}e.normalizeWatcherPattern=i;function s(u,d){const p=[];for(const c of d)p.push((0,t.parse)(i(u,c)));return p}e.parseWatcherPatterns=s;class o{constructor(){this.coalesced=new Set,this.mapPathToChange=new Map}toKey(d){return D.isLinux?d.path:d.path.toLowerCase()}processEvent(d){const p=this.mapPathToChange.get(this.toKey(d));let c=!1;if(p){const l=p.type,n=d.type;p.path!==d.path&&(d.type===2||d.type===1)?c=!0:l===1&&n===2?(this.mapPathToChange.delete(this.toKey(d)),this.coalesced.delete(p)):l===2&&n===1?p.type=0:l===1&&n===0||(p.type=n)}else c=!0;c&&(this.coalesced.add(d),this.mapPathToChange.set(this.toKey(d),d))}coalesce(){const d=[],p=[];return Array.from(this.coalesced).filter(c=>c.type!==2?(d.push(c),!1):!0).sort((c,l)=>c.path.length-l.path.length).filter(c=>p.some(l=>(0,f.isParent)(c.path,l,!D.isLinux))?!1:(p.push(c.path),!0)).concat(d)}}}),define(Q[134],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class t{constructor(...b){this._entries=new Map;for(const[D,T]of b)this.set(D,T)}set(b,D){const T=this._entries.get(b);return this._entries.set(b,D),T}has(b){return this._entries.has(b)}get(b){return this._entries.get(b)}}e.ServiceCollection=t}),define(Q[864],Y([1,0,14,15,4,94,3153,5,134,204]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const S=!1;class h extends Error{constructor(o){super("cyclic dependency between services"),this.message=o.findCycleSlow()??`UNABLE to detect cycle, dumping graph: ${o.toString()}`}}class a{constructor(o=new v.ServiceCollection,u=!1,d,p=S){this._services=o,this._strict=u,this._parent=d,this._enableTracing=p,this._activeInstantiations=new Set,this._services.set(f.IInstantiationService,this),this._globalGraph=p?d?._globalGraph??new T.Graph(c=>c):void 0}createChild(o){return new a(o,this._strict,this,this._enableTracing)}invokeFunction(o,...u){const d=i.traceInvocation(this._enableTracing,o);let p=!1;try{return o({get:l=>{if(p)throw(0,y.illegalState)("service accessor is only valid during the invocation of its target method");const n=this._getOrCreateServiceInstance(l,d);if(!n)throw new Error(`[invokeFunction] unknown service '${l}'`);return n}},...u)}finally{p=!0,d.stop()}}createInstance(o,...u){let d,p;return o instanceof D.SyncDescriptor?(d=i.traceCreation(this._enableTracing,o.ctor),p=this._createInstance(o.ctor,o.staticArguments.concat(u),d)):(d=i.traceCreation(this._enableTracing,o),p=this._createInstance(o,u,d)),d.stop(),p}_createInstance(o,u=[],d){const p=f._util.getServiceDependencies(o).sort((n,g)=>n.index-g.index),c=[];for(const n of p){const g=this._getOrCreateServiceInstance(n.id,d);g||this._throwIfStrict(`[createInstance] ${o.name} depends on UNKNOWN service ${n.id}.`,!1),c.push(g)}const l=p.length>0?p[0].index:u.length;if(u.length!==l){console.trace(`[createInstance] First service dependency of ${o.name} at position ${l+1} conflicts with ${u.length} static arguments`);const n=l-u.length;n>0?u=u.concat(new Array(n)):u=u.slice(0,l)}return Reflect.construct(o,u.concat(c))}_setServiceInstance(o,u){if(this._services.get(o)instanceof D.SyncDescriptor)this._services.set(o,u);else if(this._parent)this._parent._setServiceInstance(o,u);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(o){const u=this._services.get(o);return!u&&this._parent?this._parent._getServiceInstanceOrDescriptor(o):u}_getOrCreateServiceInstance(o,u){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(o));const d=this._getServiceInstanceOrDescriptor(o);return d instanceof D.SyncDescriptor?this._safeCreateAndCacheServiceInstance(o,d,u.branch(o,!0)):(u.branch(o,!1),d)}_safeCreateAndCacheServiceInstance(o,u,d){if(this._activeInstantiations.has(o))throw new Error(`illegal state - RECURSIVELY instantiating service '${o}'`);this._activeInstantiations.add(o);try{return this._createAndCacheServiceInstance(o,u,d)}finally{this._activeInstantiations.delete(o)}}_createAndCacheServiceInstance(o,u,d){const p=new T.Graph(n=>n.id.toString());let c=0;const l=[{id:o,desc:u,_trace:d}];for(;l.length;){const n=l.pop();if(p.lookupOrInsertNode(n),c++>1e3)throw new h(p);for(const g of f._util.getServiceDependencies(n.desc.ctor)){const w=this._getServiceInstanceOrDescriptor(g.id);if(w||this._throwIfStrict(`[createInstance] ${o} depends on ${g.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(n.id),String(g.id)),w instanceof D.SyncDescriptor){const E={id:g.id,desc:w,_trace:n._trace.branch(g.id,!0)};p.insertEdge(n,E),l.push(E)}}}for(;;){const n=p.roots();if(n.length===0){if(!p.isEmpty())throw new h(p);break}for(const{data:g}of n){if(this._getServiceInstanceOrDescriptor(g.id)instanceof D.SyncDescriptor){const E=this._createServiceInstanceWithOwner(g.id,g.desc.ctor,g.desc.staticArguments,g.desc.supportsDelayedInstantiation,g._trace);this._setServiceInstance(g.id,E)}p.removeNode(g)}}return this._getServiceInstanceOrDescriptor(o)}_createServiceInstanceWithOwner(o,u,d=[],p,c){if(this._services.get(o)instanceof D.SyncDescriptor)return this._createServiceInstance(o,u,d,p,c);if(this._parent)return this._parent._createServiceInstanceWithOwner(o,u,d,p,c);throw new Error(`illegalState - creating UNKNOWN service instance ${u.name}`)}_createServiceInstance(o,u,d=[],p,c){if(p){const l=new a(void 0,this._strict,this,this._enableTracing);l._globalGraphImplicitDependency=String(o);const n=new Map,g=new t.IdleValue(()=>{const w=l._createInstance(u,d,c);for(const[E,C]of n){const I=w[E];if(typeof I=="function")for(const _ of C)I.apply(w,_)}return n.clear(),w});return new Proxy(Object.create(null),{get(w,E){if(!g.isInitialized&&typeof E=="string"&&(E.startsWith("onDid")||E.startsWith("onWill"))){let _=n.get(E);return _||(_=new m.LinkedList,n.set(E,_)),(k,L,R)=>{const M=_.push([k,L,R]);return(0,b.toDisposable)(M)}}if(E in w)return w[E];const C=g.value;let I=C[E];return typeof I!="function"||(I=I.bind(C),w[E]=I),I},set(w,E,C){return g.value[E]=C,!0},getPrototypeOf(w){return u.prototype}})}else return this._createInstance(u,d,c)}_throwIfStrict(o,u){if(u&&console.warn(o),this._strict)throw new Error(o)}}e.InstantiationService=a;var r;(function(s){s[s.None=0]="None",s[s.Creation=1]="Creation",s[s.Invocation=2]="Invocation",s[s.Branch=3]="Branch"})(r||(r={}));class i{static{this.all=new Set}static{this._None=new class extends i{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(o,u){return o?new i(2,u.name||new Error().stack.split(` `).slice(3,4).join(` `)):i._None}static traceCreation(o,u){return o?new i(1,u.name):i._None}static{this._totals=0}constructor(o,u){this.type=o,this.name=u,this._start=Date.now(),this._dep=[]}branch(o,u){const d=new i(3,o.toString());return this._dep.push([o,u,d]),d}stop(){const o=Date.now()-this._start;i._totals+=o;let u=!1;function d(c,l){const n=[],g=new Array(c+1).join(" ");for(const[w,E,C]of l._dep)if(E&&C){u=!0,n.push(`${g}CREATES -> ${w}`);const I=d(c+1,C);I&&n.push(I)}else n.push(`${g}uses -> ${w}`);return n.join(` `)}const p=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${d(1,this)}`,`DONE, took ${o.toFixed(2)}ms (grand total ${i._totals.toFixed(2)}ms)`];(o>2||u)&&i.all.add(p.join(` `))}}e.Trace=i}),define(Q[327],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainProcessService=e.IMainProcessService=void 0,e.IMainProcessService=(0,t.createDecorator)("mainProcessService");class y{constructor(D,T){this.server=D,this.router=T}getChannel(D){return this.server.getChannel(D,this.router)}registerChannel(D,T){this.server.registerChannel(D,T)}}e.MainProcessService=y}),define(Q[3185],Y([1,0,4,2319]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronIPCMainProcessService=void 0;class b extends t.Disposable{constructor(T){super(),this.mainProcessConnection=this._register(new y.Client(`window:${T}`))}getChannel(T){return this.mainProcessConnection.getChannel(T)}registerChannel(T,f){this.mainProcessConnection.registerChannel(T,f)}}e.ElectronIPCMainProcessService=b}),define(Q[153],Y([1,0,250,94,35,5,327]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerSharedProcessRemoteService=e.ISharedProcessService=e.registerMainProcessRemoteService=void 0;class f{constructor(i,s,o,u){const d=o.getChannel(i);return v(s)?u.createInstance(new y.SyncDescriptor(s.channelClientCtor,[d])):t.ProxyChannel.toService(d,s?.proxyOptions)}}function v(r){return!!r?.channelClientCtor}let m=class extends f{constructor(i,s,o,u){super(i,s,o,u)}};m=fe([O(2,T.IMainProcessService),O(3,D.IInstantiationService)],m);function S(r,i,s){(0,b.registerSingleton)(r,new y.SyncDescriptor(m,[i,s],!0))}e.registerMainProcessRemoteService=S,e.ISharedProcessService=(0,D.createDecorator)("sharedProcessService");let h=class extends f{constructor(i,s,o,u){super(i,s,o,u)}};h=fe([O(2,e.ISharedProcessService),O(3,D.IInstantiationService)],h);function a(r,i,s){(0,b.registerSingleton)(r,new y.SyncDescriptor(h,[i,s],!0))}e.registerSharedProcessRemoteService=a}),define(Q[3186],Y([1,0,862,153]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,y.registerSharedProcessRemoteService)(t.IDiagnosticsService,"diagnostics")}),define(Q[3187],Y([1,0,5,153]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExternalTerminalMainService=void 0,e.IExternalTerminalMainService=(0,t.createDecorator)("externalTerminal"),(0,y.registerMainProcessRemoteService)(e.IExternalTerminalMainService,"externalTerminal")}),define(Q[865],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IIssueMainService=e.IssueType=void 0;var y;(function(b){b[b.Bug=0]="Bug",b[b.PerformanceIssue=1]="PerformanceIssue",b[b.FeatureRequest=2]="FeatureRequest"})(y||(e.IssueType=y={})),e.IIssueMainService=(0,t.createDecorator)("issueService")}),define(Q[866],Y([1,0,15,443,321]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseResolvedKeybinding=void 0;class D extends b.ResolvedKeybinding{constructor(f,v){if(super(),v.length===0)throw(0,t.illegalArgument)("chords");this._os=f,this._chords=v}getLabel(){return y.UILabelProvider.toLabel(this._os,this._chords,f=>this._getLabel(f))}getAriaLabel(){return y.AriaLabelProvider.toLabel(this._os,this._chords,f=>this._getAriaLabel(f))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:y.ElectronAcceleratorLabelProvider.toLabel(this._os,this._chords,f=>this._getElectronAccelerator(f))}getUserSettingsLabel(){return y.UserSettingsLabelProvider.toLabel(this._os,this._chords,f=>this._getUserSettingsLabel(f))}isWYSIWYG(){return this._chords.every(f=>this._isWYSIWYG(f))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(f=>this._getChord(f))}_getChord(f){return new b.ResolvedChord(f.ctrlKey,f.shiftKey,f.altKey,f.metaKey,this._getLabel(f),this._getAriaLabel(f))}getDispatchChords(){return this._chords.map(f=>this._getChordDispatch(f))}getSingleModifierDispatchChords(){return this._chords.map(f=>this._getSingleModifierChordDispatch(f))}}e.BaseResolvedKeybinding=D}),define(Q[38],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IKeybindingService=void 0,e.IKeybindingService=(0,t.createDecorator)("keybindingService")}),define(Q[3188],Y([1,0,305,29,38]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskHistoryController=void 0;let D=class extends t.DefaultController{constructor(f,v,m){super({clickBehavior:0}),this.actionProvider=f,this.contextMenuService=v,this.keybindingService=m}onClick(f,v,m){return super.onClick(f,v,m)}onLeftClick(f,v,m,S="mouse"){return super.onLeftClick(f,v,m,S)}onLeft(f,v){return!0}onRight(f,v){return!0}onEnter(f,v){return super.onEnter(f,v)}onContextMenu(f,v,m){if(m.target&&m.target.tagName&&m.target.tagName.toLowerCase()==="input"||v===f.getInput())return!1;m.preventDefault(),m.stopPropagation(),f.setFocus(v);let S={x:m.posx+1,y:m.posy};return this.contextMenuService.showContextMenu({getAnchor:()=>S,getActions:()=>this.actionProvider.getActions(f,v),getKeyBinding:h=>this.keybindingService.lookupKeybinding(h.id),onHide:h=>{h&&f.domFocus()},getActionsContext:()=>v}),!0}};e.TaskHistoryController=D,e.TaskHistoryController=D=fe([O(1,y.IContextMenuService),O(2,b.IKeybindingService)],D)}),define(Q[1154],Y([1,0,7,207,34,6,4,152,8,29,5,38,1725]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.PostEditWidgetManager=void 0;let r=class extends T.Disposable{static{a=this}static{this.baseId="editor.widget.postEditWidget"}constructor(o,u,d,p,c,l,n,g,w,E){super(),this.typeId=o,this.editor=u,this.showCommand=p,this.range=c,this.edits=l,this.onSelectNewEdit=n,this._contextMenuService=g,this._keybindingService=E,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=d.bindTo(w),this.visibleContext.set(!0),this._register((0,T.toDisposable)(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register((0,T.toDisposable)(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(C=>{c.containsPosition(C.position)||this.dispose()})),this._register(D.Event.runAndSubscribe(E.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){const o=this._keybindingService.lookupKeybinding(this.showCommand.id)?.getLabel();this.button.element.title=this.showCommand.label+(o?` (${o})`:"")}create(){this.domNode=t.$(".post-edit-widget"),this.button=this._register(new y.Button(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(t.addDisposableListener(this.domNode,t.EventType.CLICK,()=>this.showSelector()))}getId(){return a.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const o=t.getDomNodePagePosition(this.button.element);return{x:o.left+o.width,y:o.top+o.height}},getActions:()=>this.edits.allEdits.map((o,u)=>(0,b.toAction)({id:"",label:o.label,checked:u===this.edits.activeEditIndex,run:()=>{if(u!==this.edits.activeEditIndex)return this.onSelectNewEdit(u)}}))})}};r=a=fe([O(7,m.IContextMenuService),O(8,v.IContextKeyService),O(9,h.IKeybindingService)],r);let i=class extends T.Disposable{constructor(o,u,d,p,c,l){super(),this._id=o,this._editor=u,this._visibleContext=d,this._showCommand=p,this._instantiationService=c,this._bulkEditService=l,this._currentWidget=this._register(new T.MutableDisposable),this._register(D.Event.any(u.onDidChangeModel,u.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(o,u,d,p){const c=this._editor.getModel();if(!c||!o.length)return;const l=u.allEdits[u.activeEditIndex];if(!l)return;let n=[];(typeof l.insertText=="string"?l.insertText==="":l.insertText.snippet==="")?n=[]:n=o.map(A=>new f.ResourceTextEdit(c.uri,typeof l.insertText=="string"?{range:A,text:l.insertText,insertAsSnippet:!1}:{range:A,text:l.insertText.snippet,insertAsSnippet:!0}));const w={edits:[...n,...l.additionalEdit?.edits??[]]},E=o[0],C=c.deltaDecorations([],[{range:E,options:{description:"paste-line-suffix",stickiness:0}}]);let I,_;try{I=await this._bulkEditService.apply(w,{editor:this._editor,token:p}),_=c.getDecorationRange(C[0])}finally{c.deltaDecorations(C,[])}d&&I.isApplied&&u.allEdits.length>1&&this.show(_??E,u,async A=>{const k=this._editor.getModel();k&&(await k.undo(),this.applyEditAndShowIfNeeded(o,{activeEditIndex:A,allEdits:u.allEdits},d,p))})}show(o,u,d){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(r,this._id,this._editor,this._visibleContext,this._showCommand,o,u,d))}clear(){this._currentWidget.clear()}tryShowSelector(){this._currentWidget.value?.showSelector()}};e.PostEditWidgetManager=i,e.PostEditWidgetManager=i=fe([O(4,S.IInstantiationService),O(5,f.IBulkEditService)],i)}),define(Q[1155],Y([1,0,8]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingResolver=e.NoMatchingKb=e.ResultKind=void 0;var y;(function(m){m[m.NoMatchingKb=0]="NoMatchingKb",m[m.MoreChordsNeeded=1]="MoreChordsNeeded",m[m.KbFound=2]="KbFound"})(y||(e.ResultKind=y={})),e.NoMatchingKb={kind:0};const b={kind:1};function D(m,S,h){return{kind:2,commandId:m,commandArgs:S,isBubble:h}}class T{constructor(S,h,a){this._log=a,this._defaultKeybindings=S,this._defaultBoundCommands=new Map;for(const r of S){const i=r.command;i&&i.charAt(0)!=="-"&&this._defaultBoundCommands.set(i,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=T.handleRemovals([].concat(S).concat(h));for(let r=0,i=this._keybindings.length;r<i;r++){const s=this._keybindings[r];if(s.chords.length===0)continue;const o=s.when?.substituteConstants();o&&o.type===0||this._addKeyPress(s.chords[0],s)}}static _isTargetedForRemoval(S,h,a){if(h){for(let r=0;r<h.length;r++)if(h[r]!==S.chords[r])return!1}return!(a&&a.type!==1&&(!S.when||!(0,t.expressionsAreEqualWithConstantSubstitution)(a,S.when)))}static handleRemovals(S){const h=new Map;for(let r=0,i=S.length;r<i;r++){const s=S[r];if(s.command&&s.command.charAt(0)==="-"){const o=s.command.substring(1);h.has(o)?h.get(o).push(s):h.set(o,[s])}}if(h.size===0)return S;const a=[];for(let r=0,i=S.length;r<i;r++){const s=S[r];if(!s.command||s.command.length===0){a.push(s);continue}if(s.command.charAt(0)==="-")continue;const o=h.get(s.command);if(!o||!s.isDefault){a.push(s);continue}let u=!1;for(const d of o){const p=d.when;if(this._isTargetedForRemoval(s,d.chords,p)){u=!0;break}}if(!u){a.push(s);continue}}return a}_addKeyPress(S,h){const a=this._map.get(S);if(typeof a>"u"){this._map.set(S,[h]),this._addToLookupMap(h);return}for(let r=a.length-1;r>=0;r--){const i=a[r];if(i.command===h.command)continue;let s=!0;for(let o=1;o<i.chords.length&&o<h.chords.length;o++)if(i.chords[o]!==h.chords[o]){s=!1;break}s&&T.whenIsEntirelyIncluded(i.when,h.when)&&this._removeFromLookupMap(i)}a.push(h),this._addToLookupMap(h)}_addToLookupMap(S){if(!S.command)return;let h=this._lookupMap.get(S.command);typeof h>"u"?(h=[S],this._lookupMap.set(S.command,h)):h.push(S)}_removeFromLookupMap(S){if(!S.command)return;const h=this._lookupMap.get(S.command);if(!(typeof h>"u")){for(let a=0,r=h.length;a<r;a++)if(h[a]===S){h.splice(a,1);return}}}static whenIsEntirelyIncluded(S,h){return!h||h.type===1?!0:!S||S.type===1?!1:(0,t.implies)(S,h)}getDefaultBoundCommands(){return this._defaultBoundCommands}getDefaultKeybindings(){return this._defaultKeybindings}getKeybindings(){return this._keybindings}lookupKeybindings(S){const h=this._lookupMap.get(S);if(typeof h>"u"||h.length===0)return[];const a=[];let r=0;for(let i=h.length-1;i>=0;i--)a[r++]=h[i];return a}lookupPrimaryKeybinding(S,h){const a=this._lookupMap.get(S);if(typeof a>"u"||a.length===0)return null;if(a.length===1)return a[0];for(let r=a.length-1;r>=0;r--){const i=a[r];if(h.contextMatchesRules(i.when))return i}return a[a.length-1]}resolve(S,h,a){const r=[...h,a];this._log(`| Resolving ${r}`);const i=this._map.get(r[0]);if(i===void 0)return this._log("\\ No keybinding entries."),e.NoMatchingKb;let s=null;if(r.length<2)s=i;else{s=[];for(let u=0,d=i.length;u<d;u++){const p=i[u];if(r.length>p.chords.length)continue;let c=!0;for(let l=1;l<r.length;l++)if(p.chords[l]!==r[l]){c=!1;break}c&&s.push(p)}}const o=this._findCommand(S,s);return o?r.length<o.chords.length?(this._log(`\\ From ${s.length} keybinding entries, awaiting ${o.chords.length-r.length} more chord(s), when: ${f(o.when)}, source: ${v(o)}.`),b):(this._log(`\\ From ${s.length} keybinding entries, matched ${o.command}, when: ${f(o.when)}, source: ${v(o)}.`),D(o.command,o.commandArgs,o.bubble)):(this._log(`\\ From ${s.length} keybinding entries, no when clauses matched the context.`),e.NoMatchingKb)}_findCommand(S,h){for(let a=h.length-1;a>=0;a--){const r=h[a];if(T._contextMatchesRules(S,r.when))return r}return null}static _contextMatchesRules(S,h){return h?h.evaluate(S):!0}}e.KeybindingResolver=T;function f(m){return m?`${m.serialize()}`:"no when condition"}function v(m){return m.extensionId?m.isBuiltinExtension?`built-in extension ${m.extensionId}`:`user extension ${m.extensionId}`:m.isDefault?"built-in":"user"}}),define(Q[3189],Y([1,0,20,14,15,6,1032,4,2468,1155]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractKeybindingService=void 0;const S=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class h extends f.Disposable{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:D.Event.None}get inChordMode(){return this._currentChords.length>0}constructor(i,s,o,u,d){super(),this._contextKeyService=i,this._commandService=s,this._telemetryService=o,this._notificationService=u,this._logService=d,this._onDidUpdateKeybindings=this._register(new D.Emitter),this._currentChords=[],this._currentChordChecker=new y.IntervalTimer,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=a.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new y.TimeoutTimer,this._logging=!1}dispose(){super.dispose()}getDefaultKeybindingsContent(){return""}toggleLogging(){return this._logging=!this._logging,this._logging}_log(i){this._logging&&this._logService.info(`[KeybindingService]: ${i}`)}getDefaultKeybindings(){return this._getResolver().getDefaultKeybindings()}getKeybindings(){return this._getResolver().getKeybindings()}customKeybindingsCount(){return 0}lookupKeybindings(i){return t.coalesce(this._getResolver().lookupKeybindings(i).map(s=>s.resolvedKeybinding))}lookupKeybinding(i,s){const o=this._getResolver().lookupPrimaryKeybinding(i,s||this._contextKeyService);if(o)return o.resolvedKeybinding}dispatchEvent(i,s){return this._dispatch(i,s)}softDispatch(i,s){this._log("/ Soft dispatching keyboard event");const o=this.resolveKeyboardEvent(i);if(o.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),m.NoMatchingKb;const[u]=o.getDispatchChords();if(u===null)return this._log("\\ Keyboard event cannot be dispatched"),m.NoMatchingKb;const d=this._contextKeyService.getContext(s),p=this._currentChords.map(({keypress:c})=>c);return this._getResolver().resolve(d,p,u)}_scheduleLeaveChordMode(){const i=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-i>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(i,s){switch(this._currentChords.push({keypress:i,label:s}),this._currentChords.length){case 0:throw(0,b.illegalState)("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(v.localize(0,null,s));break;default:{const o=this._currentChords.map(({label:u})=>u).join(", ");this._currentChordStatusMessage=this._notificationService.status(v.localize(1,null,o))}}this._scheduleLeaveChordMode(),T.IME.enabled&&T.IME.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],T.IME.enable()}dispatchByUserSettingsLabel(i,s){this._log(`/ Dispatching keybinding triggered via menu entry accelerator - ${i}`);const o=this.resolveUserBinding(i);o.length===0?this._log(`\\ Could not resolve - ${i}`):this._doDispatch(o[0],s,!1)}_dispatch(i,s){return this._doDispatch(this.resolveKeyboardEvent(i),s,!1)}_singleModifierDispatch(i,s){const o=this.resolveKeyboardEvent(i),[u]=o.getSingleModifierDispatchChords();if(u)return this._ignoreSingleModifiers.has(u)?(this._log(`+ Ignoring single modifier ${u} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=a.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=a.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${u}.`),this._currentSingleModifier=u,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):u===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${u} ${u}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(o,s,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${u}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[d]=o.getChords();return this._ignoreSingleModifiers=new a(d),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(i,s,o=!1){let u=!1;if(i.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let d=null,p=null;if(o){const[g]=i.getSingleModifierDispatchChords();d=g,p=g?[g]:[]}else[d]=i.getDispatchChords(),p=this._currentChords.map(({keypress:g})=>g);if(d===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),u;const c=this._contextKeyService.getContext(s),l=i.getLabel(),n=this._getResolver().resolve(c,p,d);switch(n.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){const g=this._currentChords.map(({label:w})=>w).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${g}, ${l}".`),this._notificationService.status(v.localize(2,null,g,l),{hideAfter:10*1e3}),this._leaveChordMode(),u=!0}return u}case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),u=!0,this._expectAnotherChord(d,l),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),u;case 2:{if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${n.commandId} ]`),n.commandId===null||n.commandId===""){if(this.inChordMode){const g=this._currentChords.map(({label:w})=>w).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${g}, ${l}".`),this._notificationService.status(v.localize(3,null,g,l),{hideAfter:10*1e3}),this._leaveChordMode(),u=!0}}else this.inChordMode&&this._leaveChordMode(),n.isBubble||(u=!0),this._log(`+ Invoking command ${n.commandId}.`),typeof n.commandArgs>"u"?this._commandService.executeCommand(n.commandId).then(void 0,g=>this._notificationService.warn(g)):this._commandService.executeCommand(n.commandId,n.commandArgs).then(void 0,g=>this._notificationService.warn(g)),S.test(n.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:n.commandId,from:"keybinding",detail:i.getUserSettingsLabel()??void 0});return u}}}mightProducePrintableCharacter(i){return i.ctrlKey||i.metaKey?!1:i.keyCode>=31&&i.keyCode<=56||i.keyCode>=21&&i.keyCode<=30}}e.AbstractKeybindingService=h;class a{static{this.EMPTY=new a(null)}constructor(i){this._ctrlKey=i?i.ctrlKey:!1,this._shiftKey=i?i.shiftKey:!1,this._altKey=i?i.altKey:!1,this._metaKey=i?i.metaKey:!1}has(i){switch(i){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}}),define(Q[691],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toEmptyArrayIfContainsNull=e.ResolvedKeybindingItem=void 0;class t{constructor(D,T,f,v,m,S,h){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=D,this.chords=D?y(D.getDispatchChords()):[],D&&this.chords.length===0&&(this.chords=y(D.getSingleModifierDispatchChords())),this.bubble=T?T.charCodeAt(0)===94:!1,this.command=this.bubble?T.substr(1):T,this.commandArgs=f,this.when=v,this.isDefault=m,this.extensionId=S,this.isBuiltinExtension=h}}e.ResolvedKeybindingItem=t;function y(b){const D=[];for(let T=0,f=b.length;T<f;T++){const v=b[T];if(!v)return[];D.push(v)}return D}e.toEmptyArrayIfContainsNull=y}),define(Q[3190],Y([1,0,105,321,866,691]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USLayoutResolvedKeybinding=void 0;class T extends b.BaseResolvedKeybinding{constructor(v,m){super(m,v)}_keyCodeToUILabel(v){if(this._os===2)switch(v){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return t.KeyCodeUtils.toString(v)}_getLabel(v){return v.isDuplicateModifierCase()?"":this._keyCodeToUILabel(v.keyCode)}_getAriaLabel(v){return v.isDuplicateModifierCase()?"":t.KeyCodeUtils.toString(v.keyCode)}_getElectronAccelerator(v){return t.KeyCodeUtils.toElectronAccelerator(v.keyCode)}_getUserSettingsLabel(v){if(v.isDuplicateModifierCase())return"";const m=t.KeyCodeUtils.toUserSettingsUS(v.keyCode);return m&&m.toLowerCase()}_isWYSIWYG(){return!0}_getChordDispatch(v){return T.getDispatchStr(v)}static getDispatchStr(v){if(v.isModifierKey())return null;let m="";return v.ctrlKey&&(m+="ctrl+"),v.shiftKey&&(m+="shift+"),v.altKey&&(m+="alt+"),v.metaKey&&(m+="meta+"),m+=t.KeyCodeUtils.toString(v.keyCode),m}_getSingleModifierChordDispatch(v){return v.keyCode===5&&!v.shiftKey&&!v.altKey&&!v.metaKey?"ctrl":v.keyCode===4&&!v.ctrlKey&&!v.altKey&&!v.metaKey?"shift":v.keyCode===6&&!v.ctrlKey&&!v.shiftKey&&!v.metaKey?"alt":v.keyCode===57&&!v.ctrlKey&&!v.shiftKey&&!v.altKey?"meta":null}static _scanCodeToKeyCode(v){const m=t.IMMUTABLE_CODE_TO_KEY_CODE[v];if(m!==-1)return m;switch(v){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(v){if(!v)return null;if(v instanceof y.KeyCodeChord)return v;const m=this._scanCodeToKeyCode(v.scanCode);return m===0?null:new y.KeyCodeChord(v.ctrlKey,v.shiftKey,v.altKey,v.metaKey,m)}static resolveKeybinding(v,m){const S=(0,D.toEmptyArrayIfContainsNull)(v.chords.map(h=>this._toKeyCodeChord(h)));return S.length>0?[new T(S,m)]:[]}}e.USLayoutResolvedKeybinding=T}),define(Q[867],Y([1,0,105,5]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.macLinuxKeyboardMappingEquals=e.windowsKeyboardMappingEquals=e.getKeyboardLayoutId=e.parseKeyboardLayoutDescription=e.areKeyboardLayoutsEqual=e.IKeyboardLayoutService=void 0,e.IKeyboardLayoutService=(0,y.createDecorator)("keyboardLayoutService");function b(h,a){return!h||!a?!1:!!(h.name&&a.name&&h.name===a.name||h.id&&a.id&&h.id===a.id||h.model&&a.model&&h.model===a.model&&h.layout===a.layout)}e.areKeyboardLayoutsEqual=b;function D(h){if(!h)return{label:"",description:""};if(h.name)return{label:h.text,description:""};if(h.id){const r=h;return r.localizedName?{label:r.localizedName,description:""}:/^com\.apple\.keylayout\./.test(r.id)?{label:r.id.replace(/^com\.apple\.keylayout\./,"").replace(/-/," "),description:""}:/^.*inputmethod\./.test(r.id)?{label:r.id.replace(/^.*inputmethod\./,"").replace(/[-\.]/," "),description:`Input Method (${r.lang})`}:{label:r.lang,description:""}}return{label:h.layout,description:""}}e.parseKeyboardLayoutDescription=D;function T(h){return h.name?h.name:h.id?h.id:h.layout}e.getKeyboardLayoutId=T;function f(h,a){return!h&&!a?!0:!h||!a?!1:h.vkey===a.vkey&&h.value===a.value&&h.withShift===a.withShift&&h.withAltGr===a.withAltGr&&h.withShiftAltGr===a.withShiftAltGr}function v(h,a){if(!h&&!a)return!0;if(!h||!a)return!1;for(let r=0;r<193;r++){const i=t.ScanCodeUtils.toString(r),s=h[i],o=a[i];if(!f(s,o))return!1}return!0}e.windowsKeyboardMappingEquals=v;function m(h,a){return!h&&!a?!0:!h||!a?!1:h.value===a.value&&h.withShift===a.withShift&&h.withAltGr===a.withAltGr&&h.withShiftAltGr===a.withShiftAltGr}function S(h,a){if(!h&&!a)return!0;if(!h||!a)return!1;for(let r=0;r<193;r++){const i=t.ScanCodeUtils.toString(r),s=h[i],o=a[i];if(!m(s,o))return!1}return!0}e.macLinuxKeyboardMappingEquals=S}),define(Q[3191],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedKeyboardMapper=void 0;class t{constructor(b){this._actual=b,this._cache=new Map}dumpDebugInfo(){return this._actual.dumpDebugInfo()}resolveKeyboardEvent(b){return this._actual.resolveKeyboardEvent(b)}resolveKeybinding(b){const D=b.getHashCode(),T=this._cache.get(D);if(!T){const f=this._actual.resolveKeybinding(b);return this._cache.set(D,f),f}return T}}e.CachedKeyboardMapper=t}),define(Q[61],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Verbosity=e.ILabelService=void 0,e.ILabelService=(0,t.createDecorator)("labelService");var y;(function(b){b[b.SHORT=0]="SHORT",b[b.MEDIUM=1]="MEDIUM",b[b.LONG=2]="LONG"})(y||(e.Verbosity=y={}))}),define(Q[504],Y([1,0,31,4,18,2470,95,5]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagePackBaseService=e.ILanguagePackService=e.getLocale=void 0;function v(S){return S.tags.find(h=>h.startsWith("lp-"))?.split("lp-")[1]}e.getLocale=v,e.ILanguagePackService=(0,f.createDecorator)("languagePackService");let m=class extends y.Disposable{constructor(h){super(),this.extensionGalleryService=h}async getAvailableLanguages(){const h=new t.CancellationTokenSource;setTimeout(()=>h.cancel(),1e3);let a;try{a=await this.extensionGalleryService.query({text:'category:"language packs"',pageSize:20},h.token)}catch{return[]}const i=a.firstPage.filter(s=>s.properties.localizedLanguages?.length&&s.tags.some(o=>o.startsWith("lp-"))).map(s=>{const o=s.properties.localizedLanguages?.[0],u=v(s);return{...this.createQuickPickItem(u,o,s),extensionId:s.identifier.id,galleryExtension:s}});return i.push(this.createQuickPickItem("en","English")),i}createQuickPickItem(h,a,r){const i=a??h;let s;if(i!==h&&(s=`(${h})`),h.toLowerCase()===b.language.toLowerCase()&&(s??="",s+=(0,D.localize)(0,null)),r?.installCount){s??="";const o=r.installCount;let u;o>1e6?u=`${Math.floor(o/1e5)/10}M`:o>1e3?u=`${Math.floor(o/1e3)}K`:u=String(o),s+=` $(cloud-download) ${u}`}return{id:h,label:i,description:s}}};e.LanguagePackBaseService=m,e.LanguagePackBaseService=m=fe([O(0,T.IExtensionGalleryService)],m)}),define(Q[3192],Y([1,0,2471]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const y=t.localize(0,null),b=t.localize(1,null),D=t.localize(2,null);e.default={open:y,close:b,find:D}}),define(Q[111],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILayoutService=void 0,e.ILayoutService=(0,t.createDecorator)("layoutService")}),define(Q[3193],Y([1,0,7,87,6,4,66,9,8,111]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityService=void 0;let S=class extends D.Disposable{constructor(a,r,i){super(),this._contextKeyService=a,this._layoutService=r,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new b.Emitter,this._onDidChangeReducedMotion=new b.Emitter,this._accessibilityModeEnabledContext=T.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);const s=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(u=>{u.affectsConfiguration("editor.accessibilitySupport")&&(s(),this._onDidChangeScreenReaderOptimized.fire()),u.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),s(),this._register(this.onDidChangeScreenReaderOptimized(()=>s()));const o=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=o.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(o)}initReducedMotionListeners(a){if(!this._layoutService.hasContainer)return;this._register((0,t.addDisposableListener)(a,"change",()=>{this._systemMotionReduced=a.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const r=()=>{const i=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",i),this._layoutService.container.classList.toggle("enable-motion",!i)};r(),this._register(this.onDidChangeReducedMotion(()=>r()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const a=this._configurationService.getValue("editor.accessibilitySupport");return a==="on"||a==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const a=this._configMotionReduced;return a==="on"||a==="auto"&&this._systemMotionReduced}alwaysUnderlineAccessKeys(){return Promise.resolve(!1)}getAccessibilitySupport(){return this._accessibilitySupport}setAccessibilitySupport(a){this._accessibilitySupport!==a&&(this._accessibilitySupport=a,this._onDidChangeScreenReaderOptimized.fire())}alert(a){(0,y.alert)(a)}};e.AccessibilityService=S,e.AccessibilityService=S=fe([O(0,v.IContextKeyService),O(1,m.ILayoutService),O(2,f.IConfigurationService)],S)}),define(Q[3194],Y([1,0,821,4,111]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextViewService=void 0;let D=class extends y.Disposable{constructor(f){super(),this.layoutService=f,this.currentViewDisposable=y.Disposable.None,this.container=f.hasContainer?f.container:null,this.contextView=this._register(new t.ContextView(this.container,1)),this.layout(),this._register(f.onDidLayout(()=>this.layout()))}setContainer(f,v){this.contextView.setContainer(f,v||1)}showContextView(f,v,m){v?(v!==this.container||this.shadowRoot!==m)&&(this.container=v,this.setContainer(v,m?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=m,this.contextView.show(f);const S=(0,y.toDisposable)(()=>{this.currentViewDisposable===S&&this.hideContextView()});return this.currentViewDisposable=S,S}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(f){this.contextView.hide(f)}};e.ContextViewService=D,e.ContextViewService=D=fe([O(0,b.ILayoutService)],D)}),define(Q[1156],Y([1,0,7,14]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerZIndex=e.ZIndex=void 0;var b;(function(S){S[S.Base=0]="Base",S[S.Sash=35]="Sash",S[S.SuggestWidget=40]="SuggestWidget",S[S.Hover=50]="Hover",S[S.DragImage=1e3]="DragImage",S[S.MenubarMenuItemsHolder=2e3]="MenubarMenuItemsHolder",S[S.ContextView=2500]="ContextView",S[S.ModalDialog=2600]="ModalDialog",S[S.PaneDropOverlay=1e4]="PaneDropOverlay"})(b||(e.ZIndex=b={}));const D=Object.keys(b).filter(S=>!isNaN(Number(S))).map(S=>Number(S)).sort((S,h)=>h-S);function T(S){for(const h of D)if(S>=h)return h;return-1}class f{constructor(){this.styleSheet=(0,t.createStyleSheet)(),this.zIndexMap=new Map,this.scheduler=new y.RunOnceScheduler(()=>this.updateStyleElement(),200)}registerZIndex(h,a,r){if(this.zIndexMap.get(r))throw new Error(`z-index with name ${r} has already been registered.`);const i=h+a;if(T(i)!==h)throw new Error(`Relative layer: ${h} + z-index: ${a} exceeds next layer ${i}.`);return this.zIndexMap.set(r,i),this.scheduler.schedule(),this.getVarName(r)}getVarName(h){return`--z-index-${h}`}updateStyleElement(){(0,t.clearNode)(this.styleSheet);let h="";this.zIndexMap.forEach((a,r)=>{h+=`${this.getVarName(r)}: ${a}; `}),(0,t.createCSSRule)(":root",h,this.styleSheet)}}const v=new f;function m(S,h,a){return v.registerZIndex(S,h,a)}e.registerZIndex=m}),define(Q[1157],Y([1,0,14]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleVetos=void 0;function y(b,D){if(b.length===0)return Promise.resolve(!1);const T=[];let f=!1;for(const v of b){if(v===!0)return Promise.resolve(!0);(0,t.isThenable)(v)&&T.push(v.then(m=>{m&&(f=!0)},m=>{D(m),f=!0}))}return t.Promises.settled(T).then(()=>f)}e.handleVetos=y}),define(Q[11],Y([1,0,132,6,122,4,69,18,26,17,10,8,5]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_LOG_LEVEL=e.parseLogLevel=e.LogLevelToString=e.getLogLevel=e.NullLogService=e.NullLogger=e.AbstractLoggerService=e.MultiplexLogger=e.AdapterLogger=e.ConsoleLogger=e.ConsoleMainLogger=e.AbstractMessageLogger=e.AbstractLogger=e.log=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.isLogLevel=e.ILoggerService=e.ILogService=void 0,e.ILogService=(0,a.createDecorator)("logService"),e.ILoggerService=(0,a.createDecorator)("loggerService");function r(){return new Date().toISOString()}function i(k){return(0,m.isNumber)(k)}e.isLogLevel=i;var s;(function(k){k[k.Off=0]="Off",k[k.Trace=1]="Trace",k[k.Debug=2]="Debug",k[k.Info=3]="Info",k[k.Warning=4]="Warning",k[k.Error=5]="Error"})(s||(e.LogLevel=s={})),e.DEFAULT_LOG_LEVEL=s.Info;function o(k,L,R){switch(L){case s.Trace:k.trace(R);break;case s.Debug:k.debug(R);break;case s.Info:k.info(R);break;case s.Warning:k.warn(R);break;case s.Error:k.error(R);break;case s.Off:break;default:throw new Error(`Invalid log level ${L}`)}}e.log=o;function u(k,L=!1){let R="";for(let M=0;M<k.length;M++){let N=k[M];if(N instanceof Error&&(N=(0,t.toErrorMessage)(N,L)),typeof N=="object")try{N=JSON.stringify(N)}catch{}R+=(M>0?" ":"")+N}return R}class d extends D.Disposable{constructor(){super(...arguments),this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new y.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(L){this.level!==L&&(this.level=L,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(L){return this.level!==s.Off&&this.level<=L}}e.AbstractLogger=d;class p extends d{constructor(L){super(),this.logAlways=L}checkLogLevel(L){return this.logAlways||super.checkLogLevel(L)}trace(L,...R){this.checkLogLevel(s.Trace)&&this.log(s.Trace,u([L,...R],!0))}debug(L,...R){this.checkLogLevel(s.Debug)&&this.log(s.Debug,u([L,...R]))}info(L,...R){this.checkLogLevel(s.Info)&&this.log(s.Info,u([L,...R]))}warn(L,...R){this.checkLogLevel(s.Warning)&&this.log(s.Warning,u([L,...R]))}error(L,...R){if(this.checkLogLevel(s.Error))if(L instanceof Error){const M=Array.prototype.slice.call(arguments);M[0]=L.stack,this.log(s.Error,u(M))}else this.log(s.Error,u([L,...R]))}flush(){}}e.AbstractMessageLogger=p;class c extends d{constructor(L=e.DEFAULT_LOG_LEVEL){super(),this.setLevel(L),this.useColors=!f.isWindows}trace(L,...R){this.checkLogLevel(s.Trace)&&(this.useColors?console.log(`\x1B[90m[main ${r()}]\x1B[0m`,L,...R):console.log(`[main ${r()}]`,L,...R))}debug(L,...R){this.checkLogLevel(s.Debug)&&(this.useColors?console.log(`\x1B[90m[main ${r()}]\x1B[0m`,L,...R):console.log(`[main ${r()}]`,L,...R))}info(L,...R){this.checkLogLevel(s.Info)&&(this.useColors?console.log(`\x1B[90m[main ${r()}]\x1B[0m`,L,...R):console.log(`[main ${r()}]`,L,...R))}warn(L,...R){this.checkLogLevel(s.Warning)&&(this.useColors?console.warn(`\x1B[93m[main ${r()}]\x1B[0m`,L,...R):console.warn(`[main ${r()}]`,L,...R))}error(L,...R){this.checkLogLevel(s.Error)&&(this.useColors?console.error(`\x1B[91m[main ${r()}]\x1B[0m`,L,...R):console.error(`[main ${r()}]`,L,...R))}dispose(){}flush(){}}e.ConsoleMainLogger=c;class l extends d{constructor(L=e.DEFAULT_LOG_LEVEL,R=!0){super(),this.useColors=R,this.setLevel(L)}trace(L,...R){this.checkLogLevel(s.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",L,...R):console.log(L,...R))}debug(L,...R){this.checkLogLevel(s.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",L,...R):console.log(L,...R))}info(L,...R){this.checkLogLevel(s.Info)&&(this.useColors?console.log("%c INFO","color: #33f",L,...R):console.log(L,...R))}warn(L,...R){this.checkLogLevel(s.Warning)&&(this.useColors?console.log("%c WARN","color: #993",L,...R):console.log(L,...R))}error(L,...R){this.checkLogLevel(s.Error)&&(this.useColors?console.log("%c ERR","color: #f33",L,...R):console.error(L,...R))}dispose(){}flush(){}}e.ConsoleLogger=l;class n extends d{constructor(L,R=e.DEFAULT_LOG_LEVEL){super(),this.adapter=L,this.setLevel(R)}trace(L,...R){this.checkLogLevel(s.Trace)&&this.adapter.log(s.Trace,[this.extractMessage(L),...R])}debug(L,...R){this.checkLogLevel(s.Debug)&&this.adapter.log(s.Debug,[this.extractMessage(L),...R])}info(L,...R){this.checkLogLevel(s.Info)&&this.adapter.log(s.Info,[this.extractMessage(L),...R])}warn(L,...R){this.checkLogLevel(s.Warning)&&this.adapter.log(s.Warning,[this.extractMessage(L),...R])}error(L,...R){this.checkLogLevel(s.Error)&&this.adapter.log(s.Error,[this.extractMessage(L),...R])}extractMessage(L){return typeof L=="string"?L:(0,t.toErrorMessage)(L,this.checkLogLevel(s.Trace))}dispose(){}flush(){}}e.AdapterLogger=n;class g extends d{constructor(L){super(),this.loggers=L,L.length&&this.setLevel(L[0].getLevel())}setLevel(L){for(const R of this.loggers)R.setLevel(L);super.setLevel(L)}trace(L,...R){for(const M of this.loggers)M.trace(L,...R)}debug(L,...R){for(const M of this.loggers)M.debug(L,...R)}info(L,...R){for(const M of this.loggers)M.info(L,...R)}warn(L,...R){for(const M of this.loggers)M.warn(L,...R)}error(L,...R){for(const M of this.loggers)M.error(L,...R)}flush(){for(const L of this.loggers)L.flush()}dispose(){for(const L of this.loggers)L.dispose()}}e.MultiplexLogger=g;class w extends D.Disposable{constructor(L,R,M){if(super(),this.logLevel=L,this.logsHome=R,this._loggers=new T.ResourceMap,this._onDidChangeLoggers=this._register(new y.Emitter),this.onDidChangeLoggers=this._onDidChangeLoggers.event,this._onDidChangeLogLevel=this._register(new y.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event,this._onDidChangeVisibility=this._register(new y.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,M)for(const N of M)this._loggers.set(N.resource,{logger:void 0,info:N})}getLoggerEntry(L){return(0,m.isString)(L)?[...this._loggers.values()].find(R=>R.info.id===L):this._loggers.get(L)}getLogger(L){return this.getLoggerEntry(L)?.logger}createLogger(L,R){const M=this.toResource(L),N=(0,m.isString)(L)?L:R?.id??(0,b.hash)(M.toString()).toString(16);let P=this._loggers.get(M)?.logger;const x=R?.logLevel==="always"?s.Trace:R?.logLevel;P||(P=this.doCreateLogger(M,x??this.getLogLevel(M)??this.logLevel,{...R,id:N}));const F={logger:P,info:{resource:M,id:N,logLevel:x,name:R?.name,hidden:R?.hidden,extensionId:R?.extensionId,when:R?.when}};return this.registerLogger(F.info),this._loggers.set(M,F),P}toResource(L){return(0,m.isString)(L)?(0,v.joinPath)(this.logsHome,`${L}.log`):L}setLogLevel(L,R){if(S.URI.isUri(L)){const M=L,N=R,P=this._loggers.get(M);P&&N!==P.info.logLevel&&(P.info.logLevel=N===this.logLevel?void 0:N,P.logger?.setLevel(N),this._loggers.set(P.info.resource,P),this._onDidChangeLogLevel.fire([M,N]))}else{this.logLevel=L;for(const[M,N]of this._loggers.entries())this._loggers.get(M)?.info.logLevel===void 0&&N.logger?.setLevel(this.logLevel);this._onDidChangeLogLevel.fire(this.logLevel)}}setVisibility(L,R){const M=this.getLoggerEntry(L);M&&R!==!M.info.hidden&&(M.info.hidden=!R,this._loggers.set(M.info.resource,M),this._onDidChangeVisibility.fire([M.info.resource,R]))}getLogLevel(L){let R;return L&&(R=this._loggers.get(L)?.info.logLevel),R??this.logLevel}registerLogger(L){const R=this._loggers.get(L.resource);R?R.info.hidden!==L.hidden&&this.setVisibility(L.resource,!L.hidden):(this._loggers.set(L.resource,{info:L,logger:void 0}),this._onDidChangeLoggers.fire({added:[L],removed:[]}))}deregisterLogger(L){const R=this._loggers.get(L);R&&(R.logger&&R.logger.dispose(),this._loggers.delete(L),this._onDidChangeLoggers.fire({added:[],removed:[R.info]}))}*getRegisteredLoggers(){for(const L of this._loggers.values())yield L.info}getRegisteredLogger(L){return this._loggers.get(L)?.info}dispose(){this._loggers.forEach(L=>L.logger?.dispose()),this._loggers.clear(),super.dispose()}}e.AbstractLoggerService=w;class E{constructor(){this.onDidChangeLogLevel=new y.Emitter().event}setLevel(L){}getLevel(){return s.Info}trace(L,...R){}debug(L,...R){}info(L,...R){}warn(L,...R){}error(L,...R){}critical(L,...R){}dispose(){}flush(){}}e.NullLogger=E;class C extends E{}e.NullLogService=C;function I(k){if(k.verbose)return s.Trace;if(typeof k.logLevel=="string"){const L=A(k.logLevel.toLowerCase());if(L!==void 0)return L}return e.DEFAULT_LOG_LEVEL}e.getLogLevel=I;function _(k){switch(k){case s.Trace:return"trace";case s.Debug:return"debug";case s.Info:return"info";case s.Warning:return"warn";case s.Error:return"error";case s.Off:return"off"}}e.LogLevelToString=_;function A(k){switch(k){case"trace":return s.Trace;case"debug":return s.Debug;case"info":return s.Info;case"warn":return s.Warning;case"error":return s.Error;case"critical":return s.Error;case"off":return s.Off}}e.parseLogLevel=A,e.CONTEXT_LOG_LEVEL=new h.RawContextKey("logLevel",_(s.Info))}),define(Q[3195],Y([1,0,42,11]),function(q,e,t,y){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0});let D=class{static{b=this}static{this.MEMENTO_KEY="Microsoft.SqlTools.Accounts"}constructor(f,v){this._memento=f,this.logService=v,this.deprecatedProviders=["azurePublicCloud"]}addOrUpdate(f){return this.doOperation(()=>this.readFromMemento().then(v=>v.findIndex(S=>b.isSameAccountKey(S.key,f.key))<0?this.addToAccountList(v,f):this.updateAccountList(v,f.key,S=>b.mergeAccounts(f,S))).then(v=>this.writeToMemento(v.updatedAccounts).then(()=>v)).then(v=>({accountAdded:v.accountAdded,accountModified:v.accountModified,changedAccount:v.changedAccount})))}async getAccountsByProvider(f){return await this.doOperation(async()=>(await this.cleanupDeprecatedAccounts(),(await this.readFromMemento()).filter(S=>S.key.providerId===f)))??[]}async getAllAccounts(){return await this.doOperation(async()=>(await this.cleanupDeprecatedAccounts(),this.readFromMemento()))??[]}cleanupDeprecatedAccounts(){return this.readFromMemento().then(f=>{if(!f||f.length===0)return Promise.resolve();try{f=f.filter(v=>{const m=v?.key?.providerId;return m===void 0?!1:!this.deprecatedProviders.includes(m)})}catch(v){return this.logService.error(v),Promise.resolve()}return this.writeToMemento(f)})}remove(f){return this.doOperation(()=>this.readFromMemento().then(v=>this.removeFromAccountList(v,f)).then(v=>this.writeToMemento(v.updatedAccounts).then(()=>v)).then(v=>v.accountRemoved))}update(f,v){return this.doOperation(()=>this.readFromMemento().then(m=>this.updateAccountList(m,f,v)).then(m=>this.writeToMemento(m.updatedAccounts).then(()=>m)).then(m=>m.accountModified))}static isSameAccountKey(f,v){return f&&v?f.providerId===v.providerId&&f.accountId===v.accountId:!1}static mergeAccounts(f,v){v.displayInfo=f.displayInfo,v.properties=f.properties,v.isStale=f.isStale}doOperation(f){let v=this._activeOperation||Promise.resolve();return v=v.then(f),v=v.then(void 0,m=>{this.logService.error(m)}),this._activeOperation=v,this._activeOperation}addToAccountList(f,v){return f.findIndex(S=>b.isSameAccountKey(S.key,v.key))>=0?{accountAdded:!1,accountModified:!1,accountRemoved:!1,changedAccount:void 0,updatedAccounts:f}:(f.push(v),{accountAdded:!0,accountModified:!1,accountRemoved:!1,changedAccount:v,updatedAccounts:f})}removeFromAccountList(f,v){const m=f.findIndex(S=>b.isSameAccountKey(S.key,v));return m>=0&&f.splice(m,1),{accountAdded:!1,accountModified:!1,accountRemoved:m>=0,changedAccount:void 0,updatedAccounts:f}}updateAccountList(f,v,m){const S=f.findIndex(h=>b.isSameAccountKey(h.key,v));return S<0?{accountAdded:!1,accountModified:!1,accountRemoved:!1,changedAccount:void 0,updatedAccounts:f}:(m(f[S]),{accountAdded:!1,accountModified:!0,accountRemoved:!1,changedAccount:f[S],updatedAccounts:f})}readFromMemento(){let f=this._memento[b.MEMENTO_KEY];return f||(f=[]),this.logService.debug(`Read accounts from memento ${JSON.stringify(f)}`),f=(0,t.deepClone)(f),Promise.resolve(f)}writeToMemento(f){return this._memento[b.MEMENTO_KEY]=(0,t.deepClone)(f),Promise.resolve()}};D=b=fe([O(1,y.ILogService)],D),e.default=D}),define(Q[3196],Y([1,0,11,6]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AngularEventingService=void 0;let b=class{constructor(T){this.logService=T,this._angularMap=new Map}onAngularEvent(T){let f=this._angularMap.get(T);return f||(f=new y.Emitter,this._angularMap.set(T,f)),f.event}sendAngularEvent(T,f,v){const m=this._angularMap.get(T);m?m.fire({event:f,payload:v}):this.logService.warn("Got request to send an event to a dashboard that has not started listening")}};e.AngularEventingService=b,e.AngularEventingService=b=fe([O(0,t.ILogService)],b)}),define(Q[3197],Y([1,0,107,106,145,11,184,1941,141,22]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionStatusManager=void 0;let S=class{constructor(a,r){this._capabilitiesService=a,this._logService=r,this._connections={}}findConnection(a){if(a in this._connections)return this._connections[a]}findConnectionByProfileId(a){return(0,v.values)(this._connections).find(r=>r.connectionProfile.id===a)}findConnectionProfile(a){let r=T.generateUri(a);return this.findConnection(r)}hasConnection(a){return!!this.findConnection(a)}changeConnectionUri(a,r){let i=this.findConnection(r);if(!i)throw this._logService.error(`No connection found associated with old URI : '${r}'`),new Error(f.localize(0,null,r));if(this._connections[a])throw this._logService.error(`New URI : '${a}' is already in the connections list.`),new Error(f.localize(1,null,a));i.ownerUri=a,this._connections[a]=i,delete this._connections[r]}deleteConnection(a){let r=this.findConnection(a);if(r)for(let i in this._connections)this._connections[i].connectionId===r.connectionId&&(this._connections[i].connecting?(this._logService.info(`Deleting connection ${a} (connecting)`),this._connections[i].deleted=!0):(this._logService.info(`Deleting connection ${a}`),delete this._connections[i]))}getConnectionProfile(a){let r=this.findConnection(a);return r?r.connectionProfile:void 0}addConnection(a,r){this._logService.info(`Adding connection ${r}`);let i=new y.ConnectionProfile(this._capabilitiesService,a),s={providerId:a.providerName,extensionTimer:b.StopWatch.create(),intelliSenseTimer:b.StopWatch.create(),connectionProfile:i,connecting:!0,serviceTimer:b.StopWatch.create(),ownerUri:r};return this._connections[r]=s,this._logService.info(`Successfully added connection ${r}`),s}removeConnection(a){this._logService.info(`Removing connection ${a}`),delete this._connections[a]}updateConnectionProfile(a,r){let i=r,s=this._connections[r];return s&&a&&(this.isDefaultTypeUri(r)&&(s.connectionProfile.groupId=a.groupId,i=T.generateUri(a),i!==r&&(this.deleteConnection(r),this._logService.info(`Adding connection (update) ${i} (old=${r})`),this._connections[i]=s)),s.connectionProfile.id=a.id),i}onConnectionComplete(a){let r=this._connections[a.ownerUri];if(!r)throw this._logService.error(`OnConnectionComplete but no connection found '${a.ownerUri}' Connections = [${Object.keys(this._connections)}]`),new Error("Unexpected error occurred while connecting.");return r.serviceTimer.stop(),r.connecting=!1,r.connectionId=a.connectionId,r.serverInfo=a.serverInfo,r}updateDatabaseName(a){let r=this._connections[a.ownerUri];if(r.connectionProfile.databaseName!==a.connectionSummary.databaseName){r.connectionProfile.databaseName=a.connectionSummary.databaseName;let i=T.getUriPrefix(a.ownerUri),s=T.generateUriWithPrefix(r.connectionProfile,i);s in this._connections||(this._logService.info(`Adding connection with DB name ${s}`),this._connections[s]=r)}}getOriginalOwnerUri(a){let r=a,i=this.findConnection(r);return i&&i.ownerUri&&(r=i.ownerUri),r}onConnectionChanged(a){let r=this._connections[a.connectionUri];if(r&&r.connectionProfile)return r.connectionProfile.serverName=a.connection.serverName,r.connectionProfile.databaseName=a.connection.databaseName,r.connectionProfile.userName=a.connection.userName,r.connectionProfile}isSharedSession(a){return!!(a&&a.startsWith("vsls:"))}isConnected(a){return this.isSharedSession(a)?!0:!!(a in this._connections&&this._connections[a].connectionId&&this._connections[a].connectionId)}isConnecting(a){return a in this._connections&&this._connections[a].connecting}isDefaultTypeUri(a){return!!(a&&a.startsWith(T.uriPrefixes.default))}isEditorTypeUri(a){return!!(a&&(a.startsWith(m.Schemas.untitled)||a.startsWith(m.Schemas.file)))}getProviderIdFromUri(a){let r="",i=this.findConnection(a);if(i&&(r=i.connectionProfile.providerName),!r&&this.isDefaultTypeUri(a)){let s=a.replace(T.uriPrefixes.default,"");r=y.ConnectionProfile.getProviderFromOptionsKey(s)}return r}getActiveConnectionProfiles(a){let r=(0,v.values)(this._connections).map(i=>i.connectionProfile);return r=r.filter((i,s)=>r.findIndex(o=>o.id===i.id)===s),a&&(r=r.filter(i=>a.find(s=>s===i.providerName))),r}};e.ConnectionStatusManager=S,e.ConnectionStatusManager=S=fe([O(0,t.ICapabilitiesService),O(1,D.ILogService)],S)}),define(Q[589],Y([1,0,5,58,11]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScriptingService=e.ScriptOperation=e.IScriptingService=e.SERVICE_ID=void 0,e.SERVICE_ID="scriptingService",e.IScriptingService=(0,t.createDecorator)(e.SERVICE_ID);var D;(function(f){f[f.Select=0]="Select",f[f.Create=1]="Create",f[f.Insert=2]="Insert",f[f.Update=3]="Update",f[f.Delete=4]="Delete",f[f.Execute=5]="Execute",f[f.Alter=6]="Alter"})(D||(e.ScriptOperation=D={}));let T=class{constructor(v,m){this._connectionService=v,this.logService=m,this._providers=Object.create(null),this.failedScriptingOperations={}}script(v,m,S,h){let a=this._connectionService.getProviderIdFromUri(v);if(a){let r=this._providers[a];if(r)return r.scriptAsOperation(v,S,m,h)}return Promise.resolve(void 0)}onScriptingComplete(v,m){m&&m.hasError&&m.errorMessage&&(this.logService.error(`Scripting failed. error: ${m.errorMessage}`),m.operationId&&(this.failedScriptingOperations[m.operationId]=m))}getOperationFailedResult(v){if(v&&v in this.failedScriptingOperations)return this.failedScriptingOperations[v]}registerProvider(v,m){this._providers[v]=m}isProviderRegistered(v){return!!this._providers[v]}};e.ScriptingService=T,e.ScriptingService=T=fe([O(0,y.IConnectionManagementService),O(1,b.ILogService)],T)}),define(Q[3198],Y([1,0,58,1974,63,589]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.script=e.GetScriptOperationName=e.scriptEditSelect=e.scriptSelect=void 0;const T={90:"Script90Compat",100:"Script100Compat",105:"Script105Compat",110:"Script110Compat",120:"Script120Compat",130:"Script130Compat",140:"Script140Compat"},f={0:"SqlServerEnterpriseEdition",1:"SqlServerPersonalEdition",2:"SqlServerStandardEdition",3:"SqlServerEnterpriseEdition",4:"SqlServerExpressEdition",5:"SqlAzureDatabaseEdition",6:"SqlDatawarehouseEdition",7:"SqlServerStretchEdition",11:"SqlServerOnDemandEdition"},v=y.localize(0,null);async function m(s,o,u,d,p,c){try{const l=await u.connectIfNotConnected(s);let n=r(u,l,o);const g=await p.script(l,o,D.ScriptOperation.Select,n);if(g&&g.script){const w=await d.newSqlEditor({initialContent:g.script},s?.providerName);let E={params:{connectionType:t.ConnectionType.editor,runQueryOnCompletion:t.RunQueryOnConnectionMode.executeQuery,input:w},saveTheConnection:!1,showDashboard:!1,showConnectionDialogOnError:!0,showFirewallRuleOnError:!0};await u.connect(s,w.uri,E)}else throw new Error(y.localize(1,null))}catch(l){c.showDialog(b.default.Error,v,l?.message??l)}}e.scriptSelect=m;async function S(s,o,u,d,p,c){try{const l=await u.connectIfNotConnected(s);let n=r(u,l,o);const g=await p.script(l,o,D.ScriptOperation.Select,n);if(g&&g.script){const w=await d.newEditDataEditor(o.schema,o.name,g.script);let E={params:{connectionType:t.ConnectionType.editor,runQueryOnCompletion:t.RunQueryOnConnectionMode.none,input:w},saveTheConnection:!1,showDashboard:!1,showConnectionDialogOnError:!0,showFirewallRuleOnError:!0};await u.connect(s,w.uri,E)}else throw new Error(y.localize(2,null))}catch(l){c.showDialog(b.default.Error,v,l?.message??l)}}e.scriptEditSelect=S;function h(s){let o=D.ScriptOperation[s];switch(s){case D.ScriptOperation.Select:return y.localize(3,null);case D.ScriptOperation.Create:return y.localize(4,null);case D.ScriptOperation.Insert:return y.localize(5,null);case D.ScriptOperation.Update:return y.localize(6,null);case D.ScriptOperation.Delete:return y.localize(7,null);default:return o}}e.GetScriptOperationName=h;async function a(s,o,u,d,p,c,l){try{const n=await u.connectIfNotConnected(s);let g=r(u,n,o);const w=await p.script(n,o,c,g);if(w){let E=w.script;if(E){let C=o.schema&&o.schema!==""?`${o.schema}.${o.name}`:o.name;const I=await d.newSqlEditor({initialContent:E,description:C},s.providerName);let _={params:{connectionType:t.ConnectionType.editor,runQueryOnCompletion:t.RunQueryOnConnectionMode.none,input:I},saveTheConnection:!1,showDashboard:!1,showConnectionDialogOnError:!0,showFirewallRuleOnError:!0};await u.connect(s,I.uri,_)}else{let C=y.localize(8,null,h(c),o.metadataTypeName),I="",_=p.getOperationFailedResult(w.operationId);_&&_.hasError&&_.errorMessage&&(C=_.errorMessage,I=_.errorDetails),l&&l.showDialog(b.default.Error,v,C,I)}}else throw new Error(y.localize(9,null,h(c)))}catch(n){l.showDialog(b.default.Error,v,n?.message??n)}}e.script=a;function r(s,o,u){let d=i(s,o);if(d)return{filePath:void 0,scriptCompatibilityOption:T[d.serverMajorVersion],targetDatabaseEngineEdition:f[d.engineEditionId],targetDatabaseEngineType:d.isCloud?"SqlAzure":"SingleInstance"}}function i(s,o){return s.getConnectionInfo(o)?.serverInfo}}),define(Q[1158],Y([1,0,34,1973,275,58,589,3198,188]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScriptDeleteAction=e.ScriptCreateAction=e.EditDataAction=e.ScriptAlterAction=e.ScriptExecuteAction=e.ScriptSelectAction=void 0;let m=class extends t.Action{static{this.ID="selectTop"}static{this.LABEL=y.localize(0,null)}static{this.KUSTOLABEL=y.localize(1,null)}constructor(o,u,d,p,c,l){super(o,u),this._queryEditorService=d,this._connectionManagementService=p,this._scriptingService=c,this._errorMessageService=l}async run(o){await(0,f.scriptSelect)(o.profile,o.object,this._connectionManagementService,this._queryEditorService,this._scriptingService,this._errorMessageService)}};e.ScriptSelectAction=m,e.ScriptSelectAction=m=fe([O(2,b.IQueryEditorService),O(3,D.IConnectionManagementService),O(4,T.IScriptingService),O(5,v.IErrorMessageService)],m);let S=class extends t.Action{static{this.ID="scriptExecute"}static{this.LABEL=y.localize(2,null)}constructor(o,u,d,p,c,l){super(o,u),this._queryEditorService=d,this._connectionManagementService=p,this._scriptingService=c,this._errorMessageService=l}async run(o){await(0,f.script)(o.profile,o.object,this._connectionManagementService,this._queryEditorService,this._scriptingService,T.ScriptOperation.Execute,this._errorMessageService)}};e.ScriptExecuteAction=S,e.ScriptExecuteAction=S=fe([O(2,b.IQueryEditorService),O(3,D.IConnectionManagementService),O(4,T.IScriptingService),O(5,v.IErrorMessageService)],S);let h=class extends t.Action{static{this.ID="scriptAlter"}static{this.LABEL=y.localize(3,null)}constructor(o,u,d,p,c,l){super(o,u),this._queryEditorService=d,this._connectionManagementService=p,this._scriptingService=c,this._errorMessageService=l}async run(o){await(0,f.script)(o.profile,o.object,this._connectionManagementService,this._queryEditorService,this._scriptingService,T.ScriptOperation.Alter,this._errorMessageService)}};e.ScriptAlterAction=h,e.ScriptAlterAction=h=fe([O(2,b.IQueryEditorService),O(3,D.IConnectionManagementService),O(4,T.IScriptingService),O(5,v.IErrorMessageService)],h);let a=class extends t.Action{static{this.ID="editData"}static{this.LABEL=y.localize(4,null)}constructor(o,u,d,p,c,l){super(o,u),this._queryEditorService=d,this._connectionManagementService=p,this._scriptingService=c,this._errorMessageService=l}async run(o){await(0,f.scriptEditSelect)(o.profile,o.object,this._connectionManagementService,this._queryEditorService,this._scriptingService,this._errorMessageService)}};e.EditDataAction=a,e.EditDataAction=a=fe([O(2,b.IQueryEditorService),O(3,D.IConnectionManagementService),O(4,T.IScriptingService),O(5,v.IErrorMessageService)],a);let r=class extends t.Action{static{this.ID="scriptCreate"}static{this.LABEL=y.localize(5,null)}constructor(o,u,d,p,c,l){super(o,u),this._queryEditorService=d,this._connectionManagementService=p,this._scriptingService=c,this._errorMessageService=l}async run(o){await(0,f.script)(o.profile,o.object,this._connectionManagementService,this._queryEditorService,this._scriptingService,T.ScriptOperation.Create,this._errorMessageService)}};e.ScriptCreateAction=r,e.ScriptCreateAction=r=fe([O(2,b.IQueryEditorService),O(3,D.IConnectionManagementService),O(4,T.IScriptingService),O(5,v.IErrorMessageService)],r);let i=class extends t.Action{static{this.ID="scriptDelete"}static{this.LABEL=y.localize(6,null)}constructor(o,u,d,p,c,l){super(o,u),this._queryEditorService=d,this._connectionManagementService=p,this._scriptingService=c,this._errorMessageService=l}async run(o){await(0,f.script)(o.profile,o.object,this._connectionManagementService,this._queryEditorService,this._scriptingService,T.ScriptOperation.Delete,this._errorMessageService)}};e.ScriptDeleteAction=i,e.ScriptDeleteAction=i=fe([O(2,b.IQueryEditorService),O(3,D.IConnectionManagementService),O(4,T.IScriptingService),O(5,v.IErrorMessageService)],i)}),define(Q[285],Y([1,0,40,4516,5,864,91,11]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bootstrapAngular=e.providerIterator=void 0;const v=new Map;function m(r){return Array.from(b._util.serviceIds.values()).map(i=>{let s=()=>r._getOrCreateServiceInstance(i,D.Trace.traceCreation(!1,i));return s.prototype=s,{provide:i,useFactory:s}})}e.providerIterator=m;function S(r){let i;return v.has(r)?i=v.get(r):i=0,v.set(r,i+1),`${r}_${i}`}let h;function a(r,i,s,o,u,d,p){let c=S(o),l=document.createElement(c);s.appendChild(l);const n=r.get(b.IInstantiationService),g=r.get(f.ILogService);return h||(n.invokeFunction(w=>{w.get(T.IEnvironmentService).isBuilt&&(0,t.enableProdMode)()}),h=(0,y.platformBrowserDynamic)()),h.bootstrapModule(i(u,c,n)).then(w=>{d&&d.onWillDispose(()=>{w.destroy()}),p&&p(w)}).catch(w=>{g.error(w)}),c}e.bootstrapAngular=a}),define(Q[3199],Y([1,0,11,184]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorDiagnosticsService=void 0;let b=class{constructor(T){this._logService=T,this._providers=Object.create(null)}async tryHandleConnectionError(T,f,v){let m={handled:!1},S=this._providers[f];if(S){let h={errorCode:T.errorCode??0,errorMessage:T.errorMessage??"",messageDetails:T.messageDetails??""};m=await S.handleConnectionError(h,y.convertToRpcConnectionProfile(v))}return m}registerDiagnosticsProvider(T,f){this._providers[T]?this._logService.error("Provider "+T+" was already registered, cannot register again."):this._providers[T]=f}unregisterDiagnosticsProvider(T){delete this._providers[T]}};e.ErrorDiagnosticsService=b,e.ErrorDiagnosticsService=b=fe([O(0,t.ILogService)],b)}),define(Q[172],Y([1,0,298,322,106,5,58,6,2231,107,184,11,646,141,76,117]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectExplorerService=e.ERROR_NODE_TYPE=e.ServerTreeViewView=e.IObjectExplorerService=e.SERVICE_ID=void 0,e.SERVICE_ID="ObjectExplorerService",e.IObjectExplorerService=(0,D.createDecorator)(e.SERVICE_ID);var o;(function(p){p.all="all",p.active="active"})(o||(e.ServerTreeViewView=o={})),e.ERROR_NODE_TYPE="error";const u=v.localize(0,null);let d=class{constructor(c,l,n,g){this._connectionManagementService=c,this._telemetryService=l,this._capabilitiesService=n,this.logService=g,this._providers=Object.create(null),this._nodeProviders=Object.create(null),this._onNodeExpandedError=new f.Emitter,this._onCreateNewSession=new f.Emitter,this._connectionsWaitingForSession=new Map,this._treeNodeCache=new Map,this._nodeFilterCache=new Map,this._onUpdateObjectExplorerNodes=new f.Emitter,this._activeObjectExplorerNodes={},this._sessions={},this._providers={},this._nodeProviders={},this._onSelectionOrFocusChange=new f.Emitter}getSession(c){let l=this._sessions[c];if(!l)return;let n=this._activeObjectExplorerNodes[l.connection.id];return n?n.getSession():void 0}providerRegistered(c){return!!this._providers[c]}get onUpdateObjectExplorerNodes(){return this._onUpdateObjectExplorerNodes.event}get onSelectionOrFocusChange(){return this._onSelectionOrFocusChange.event}async updateObjectExplorerNodes(c,l){const n=await this._connectionManagementService.addSavedPassword(c),g=b.ConnectionProfile.fromIConnectionProfile(this._capabilitiesService,n);return this.updateNewObjectExplorerNode(g,l)}async deleteObjectExplorerNode(c){let l=c.id,n=this._activeObjectExplorerNodes[l];if(n){const g=n?.getSession();if(!g)return;this._treeNodeCache.delete(g.sessionId),this._nodeFilterCache.delete(g.sessionId),await this.closeSession(c.providerName,g),delete this._activeObjectExplorerNodes[l],delete this._sessions[g.sessionId]}}onNodeExpanded(c){c.errorMessage&&this.logService.error(c.errorMessage);let l=this._sessions[c.sessionId];if(l){const n=l.nodes[c.nodePath];n?n.expandEmitter?n.expandEmitter.fire(c):this.logService.warn(`No expand emitter for session: ${c.sessionId} and node path: ${c.nodePath}`):(this.logService.warn(`Cannot find node status for session: ${c.sessionId} and node path: ${c.nodePath}`),this._onNodeExpandedError.fire(c))}else this.logService.warn(`Cannot find session ${c.sessionId} for node path: ${c.nodePath}`),this._onNodeExpandedError.fire(c)}async onSessionCreated(c,l){if(l&&l.success)await this.handleSessionCreated(l).catch(n=>this.logService.error(n));else{let n=l&&l.errorMessage?l.errorMessage:u;this.logService.error(n)}}async handleSessionCreated(c){let l,n;const g=c.sessionId;await new Promise((w,E)=>{const C=()=>{l&&this._connectionsWaitingForSession.delete(l.id),I.dispose()},I=this._onCreateNewSession.event(A=>{_()}),_=()=>{this._sessions[g]&&(l=this._sessions[g].connection,l&&this._connectionsWaitingForSession.get(l.id)===!1&&(w(),C()))};_()});try{if(c.success&&c.rootNode){let E=this.toTreeNode(c.rootNode,void 0);this._treeNodeCache.set(g,new Map),this._treeNodeCache.get(g).set(this.getTreeNodeCacheKey(E.toNodeInfo()),E),this._nodeFilterCache.set(g,new Map),E.connection=l,E.session=c,this._activeObjectExplorerNodes[l.id]=E}else n=c&&c.errorMessage?c.errorMessage:u,this.logService.error(n);let w=this._nodeProviders[l.providerName];if(w){const E=w.map(C=>C.handleSessionOpen(c));await Promise.all(E)}}catch(w){this.logService.error(`An error occured while handling session ${g} in all nodeProviders.`,w)}finally{this.sendUpdateNodeEvent(l,n)}}onSessionDisconnected(c,l){if(this._sessions[l.sessionId]){let n=this._sessions[l.sessionId].connection;if(n&&this._connectionManagementService.isProfileConnected(n)){let g=S.generateUri(n);this._serverTreeView?.isObjectExplorerConnectionUri(g)&&this._serverTreeView?.deleteObjectExplorerNodeAndRefreshTree(n).then(()=>{this.sendUpdateNodeEvent(n,l.errorMessage),n.isDisconnecting=!0,this._connectionManagementService.disconnect(n).then(()=>{n.isDisconnecting=!1}).catch(w=>this.logService.error(w))}).catch(w=>this.logService.error(w))}}else this.logService.warn(`Cannot find session ${l.sessionId}`)}sendUpdateNodeEvent(c,l){let n={connection:c,errorMessage:l};this._onUpdateObjectExplorerNodes.fire(n)}async updateNewObjectExplorerNode(c,l){if(this._activeObjectExplorerNodes[c.id])this.sendUpdateNodeEvent(c);else try{l||await this.createNewSession(c.providerName,c)}catch(n){throw this.sendUpdateNodeEvent(c,n),n}}getObjectExplorerNode(c){return this._activeObjectExplorerNodes[c.id]}async createNewSession(c,l){const n=this._providers[c];if(n){this._connectionsWaitingForSession.set(l.id,!0);const g=await n.createNewSession(l.toConnectionInfo());if(!g?.sessionId)throw this.logService.error(`The session ID returned by provider "${c}" for connection "${l.title}" is invalid.`),new Error(v.localize(1,null,c,l.title));return this._sessions[g.sessionId]&&this.logService.trace(`Overwriting session ${g.sessionId}`),this._sessions[g.sessionId]={connection:l,nodes:{}},this._connectionsWaitingForSession.set(l.id,!1),this._onCreateNewSession.fire(g),g}else throw this._connectionsWaitingForSession.delete(l.id),new Error(`Provider doesn't exist. id: ${c}`)}async expandNode(c,l,n){if(this._providers[c])return this._telemetryService.createActionEvent("Shell","ObjectExplorerExpand").withAdditionalProperties({refresh:!1,provider:c}).send(),await this.expandOrRefreshNode(c,l,n);throw new Error(`Provider doesn't exist. id: ${c}`)}async callExpandOrRefreshFromProvider(c,l,n=!1){return n?c.refreshNode(l):c.expandNode(l)}expandOrRefreshNode(c,l,n,g=!1){let w=this;return new Promise((E,C)=>{const I=this._nodeFilterCache.get(l.sessionId);if(n.filters&&I&&I.set(this.getTreeNodeCacheKey(n),n.filters),l.sessionId in w._sessions&&w._sessions[l.sessionId]){let _=!1;w._sessions[l.sessionId].nodes[n.nodePath]||(w._sessions[l.sessionId].nodes[n.nodePath]={expandEmitter:new f.Emitter},this.logService.trace(`Adding node ${n.nodePath} to session ${l.sessionId}`),_=!0);let A=this._providers[c];if(A){let k=new Map,L=[A],R=this._nodeProviders[c];R&&(R=R.sort((N,P)=>N.group.toLowerCase().localeCompare(P.group.toLowerCase())),L.push(...R)),this.logService.trace(`${l.sessionId}: got providers for node expansion: ${L.map(N=>N.providerId).join(", ")}`);const M=()=>{const N=w.mergeResults(L,k,n.nodePath);(N.errorMessage||N.nodes.some(P=>P.errorMessage))&&this._onUpdateObjectExplorerNodes.fire({connection:n.getConnectionProfile(),errorMessage:N.errorMessage}),E(N),_&&(delete w._sessions[l.sessionId].nodes[n.nodePath],this.logService.trace(`Deleted node ${n.nodePath} from session ${l.sessionId}`))};this._onNodeExpandedError.event(N=>{N.sessionId===l.sessionId&&N.nodePath===n.nodePath&&(k.set(N.providerId,N),k.size===L.length&&M())}),w._sessions[l.sessionId].nodes[n.nodePath].expandEmitter.event(N=>{if(N&&N.providerId){if(this.logService.trace(`${l.sessionId}: Received expand result for node ${n.nodePath} from provider ${N.providerId}`),k.set(N.providerId,N),N.errorMessage){const P=N.errorMessage.indexOf("Object Explorer task didn't complete")!==-1?"Timeout":"Other",x=N.providerId===s.mssqlProviderName&&n.nodeTypeId===t.NodeType.Folder?n.label:n.nodeTypeId;this._telemetryService.createErrorEvent("Shell","ObjectExplorerExpandError",void 0,P).withAdditionalProperties({nodeType:x,providerId:N.providerId}).send()}}else this.logService.error("OE provider returns empty result or providerId");k.size===L.length&&M()}),_&&L.forEach(N=>{let P={sessionId:l.sessionId,nodePath:n.nodePath,securityToken:l.securityToken};n?.filters?.length>0&&(P.filters=n.filters),w.callExpandOrRefreshFromProvider(N,P,g).then(x=>{if(!x){let F={errorMessage:void 0,nodePath:n.nodePath,nodes:[],sessionId:l.sessionId};k.set(N.providerId,F),k.size===L.length&&M()}},x=>{C(x)})})}}else C(`session cannot find to expand node. id: ${l.sessionId} nodePath: ${n.nodePath}`)})}mergeResults(c,l,n){let g={sessionId:void 0,nodePath:n,nodes:[]},w=[],E={nodePath:"",parentNodePath:"",objectType:"error",label:"Error",errorMessage:"",nodeType:e.ERROR_NODE_TYPE,isLeaf:!0,nodeSubType:"",nodeStatus:"",metadata:void 0},C=[];for(let I of c)if(l.has(I.providerId)){let _=l.get(I.providerId);_&&(_.errorMessage?(g.sessionId=_.sessionId,C.push(_.errorMessage)):(g=_,_.nodes!==void 0&&_.nodes&&(w=w.concat(_.nodes))))}return g&&(C.length>0&&(C.length>1&&C.unshift(v.localize(2,null)),E.errorMessage=C.join(` `),E.label=E.errorMessage,w=[E].concat(w),this._onUpdateObjectExplorerNodes.fire({connection:void 0,errorMessage:E.errorMessage})),g.nodes=w,g.errorMessage=C.join(` `)),g}refreshNode(c,l,n){return this._providers[c]?(this._telemetryService.createActionEvent("Shell","ObjectExplorerExpand").withAdditionalProperties({refresh:!0,provider:c}).send(),this.expandOrRefreshNode(c,l,n,!0)):Promise.resolve(void 0)}closeSession(c,l){let n=this._sessions[l.sessionId];n&&n.nodes&&(0,a.entries)(n.nodes).forEach(w=>{const E=w[0],C=w[1];C.expandEmitter&&C.expandEmitter.fire({sessionId:l.sessionId,nodes:[],nodePath:E,errorMessage:void 0,providerId:c})});let g=this._providers[c];if(g){let w=this._nodeProviders[c];if(w)for(let E of w)E.handleSessionClose({sessionId:l?l.sessionId:void 0});return Promise.resolve(g.closeSession({sessionId:l?l.sessionId:void 0}))}return Promise.resolve(void 0)}registerProvider(c,l){this._providers[c]=l}registerNodeProvider(c){let l=this._nodeProviders[c.supportedProviderId]||[];l.push(c),this._nodeProviders[c.supportedProviderId]=l}resolveTreeNodeChildren(c,l){let n=!!l.errorStateMessage||l.forceRefresh;return l.forceRefresh=!1,this.expandOrRefreshTreeNode(c,l,n)}refreshTreeNode(c,l){return this.expandOrRefreshTreeNode(c,l,!0)}callExpandOrRefreshFromService(c,l,n,g=!1){return g?this.refreshNode(c,l,n):this.expandNode(c,l,n)}async expandOrRefreshTreeNode(c,l,n=!1){let g=l.getConnectionProfile();g&&await this._connectionManagementService.refreshAzureAccountTokenIfNecessary(g)&&(c.securityToken={token:g.options.azureAccountToken,expiresOn:g.options.expiresOn});const w=g?.providerName;if(!w)throw new Error("Failed to expand node - no provider name");const E=await this.callExpandOrRefreshFromService(w,c,l,n),C=this._treeNodeCache.get(c.sessionId);if(E&&E.nodes){if(n&&l?.children){const _=[...l.children];for(;_.length>0;){const A=_.pop();A&&(C.delete(this.getTreeNodeCacheKey(A.toNodeInfo())),A.children&&_.push(...A.children))}}const I=E.nodes.map(_=>{let A;const k=this.getTreeNodeCacheKey(_);!n&&C.has(k)?A=C.get(k):(A=this.toTreeNode(_,l),C.set(k,A));const L=this.getTreeNodeCacheKey(A),R=this._nodeFilterCache.get(c.sessionId);return A?.filterProperties?.length>0?R?.has(L)?A.filters=R.get(L)??[]:A.filters=[]:(R.delete(L),A.filters=[]),A});return l.children=I.filter(_=>_!==void 0),I}else throw new Error(E?.errorMessage?E.errorMessage:"Failed to expand node")}toTreeNode(c,l){let n=c.isLeaf;c.nodeType===t.NodeType.Database&&(c.nodeStatus&&(c.label=c.label+" ("+c.nodeStatus+")"),n?c.nodeStatus="Unavailable":c.nodeStatus=void 0);let g=new y.TreeNode(c.nodeType,c.objectType,c.label,n,c.nodePath,c.parentNodePath,c.nodeSubType,c.nodeStatus,l,c.metadata,c.iconType,c.icon,c.filterableProperties,{getChildren:w=>this.getChildren(w),isExpanded:w=>this.isExpanded(w),setNodeExpandedState:async(w,E)=>await this.setNodeExpandedState(w,E),setNodeSelected:(w,E,C)=>this.setNodeSelected(w,E,C)});return g.childProvider=c.childProvider,g.payload=c.payload,g}registerServerTreeView(c){if(this._serverTreeView)throw new Error("The object explorer server tree view is already registered");this._serverTreeView=c,this._serverTreeView.onSelectionOrFocusChange(()=>this._onSelectionOrFocusChange.fire())}getSelectedProfileAndDatabase(){if(!this._serverTreeView||!this._serverTreeView.tree)return;let c=this._serverTreeView.getSelection();if(c?.length===1){let l=c[0];if(l instanceof b.ConnectionProfile)return{profile:l,databaseName:void 0};if(l instanceof y.TreeNode){let n=l.getConnectionProfile(),g=l.getDatabaseName();return l.nodeTypeId==="Database"&&l.isAlwaysLeaf&&(g=void 0),{profile:n,databaseName:g}}}}isFocused(){return this._serverTreeView?.isFocused()??!1}getServerTreeView(){return this._serverTreeView}async findNodes(c,l,n,g,w,E=[]){let C=this._activeObjectExplorerNodes[c];if(!C)return[];let I=C?.session?.sessionId??"";return(await this._providers[this._sessions[I].connection.providerName].findNodes({type:l,name:g,schema:n,database:w,parentObjectNames:E,sessionId:I})).nodes}getActiveConnectionNodes(){return(0,r.values)(this._activeObjectExplorerNodes)}async getNodeActions(c,l){const n=await this.getTreeNode(c,l);if(!n||!this._serverTreeView?.tree)return[];let g=this.getTreeItem(n);return g?this._serverTreeView?.treeActionProvider.getActions(this._serverTreeView.tree,g)?.filter(E=>E.label).map(E=>E.label)??[]:[]}async refreshNodeInView(c,l){let n=await this.getTreeNode(c,l);if(!n)return;const g=n.getSession();if(g&&await this.refreshTreeNode(g,n),n=await this.getTreeNode(c,l),!!n)return await this._serverTreeView?.refreshElement(this.getTreeItem(n)),(n?.children?.length??-1>0)&&await n?.setExpandedState(y.TreeItemCollapsibleState.Expanded),n}getSessionConnectionProfile(c){return this._sessions[c].connection.toIConnectionProfile()}async setNodeExpandedState(c,l){if(c=await this.getUpdatedTreeNode(c),!c)return;let n=this.getTreeItem(c);if(n)return l===y.TreeItemCollapsibleState.Expanded&&await this._serverTreeView?.reveal(n),this._serverTreeView?.setExpandedState(n,l)}async setNodeSelected(c,l,n){if(c=await this.getUpdatedTreeNode(c),!c)return Promise.resolve();let g=this.getTreeItem(c);if(g)return l&&await this._serverTreeView?.reveal(g),this._serverTreeView?.setSelected(g,l,n)}async getChildren(c){if(c=await this.getUpdatedTreeNode(c),!c)return Promise.resolve([]);if(c.isAlwaysLeaf)return[];if(!c.children){const l=c.getSession();l&&await this.resolveTreeNodeChildren(l,c)}return c.children??[]}async isExpanded(c){if(!c||(c=await this.getUpdatedTreeNode(c),!c))return!1;do{let l=this.getTreeItem(c);if(!this._serverTreeView?.isExpanded(l))return!1;c=c.parent}while(c);return!0}getTreeItem(c){const l=c?.getConnectionProfile()?.id;if(!l)return;let n=this._activeObjectExplorerNodes[l];return c===n?c.connection:c}async getUpdatedTreeNode(c){const l=await this.getTreeNode(c?.getConnectionProfile()?.id,c?.nodePath);if(l)return l}async getTreeNode(c,l){if(!c)return;let n=this._activeObjectExplorerNodes[c];if(!n)return;if(!l)return n;let g=n;for(;g.nodePath!==l;){let w;if(!g.isAlwaysLeaf&&!g.children){const E=g?.getSession();E&&await this.resolveTreeNodeChildren(E,g)}if(g.children){let E=g.children.filter(C=>l.startsWith(C.nodePath));E.length>0&&(w=E.reduce((C,I)=>C.nodePath.length<I.nodePath.length?I:C))}if(!w)return;g=w}return g}getTreeNodeCacheKey(c){return c.nodePath}};e.ObjectExplorerService=d,e.ObjectExplorerService=d=fe([O(0,T.IConnectionManagementService),O(1,i.IAdsTelemetryService),O(2,m.ICapabilitiesService),O(3,h.ILogService)],d)}),define(Q[692],Y([1,0,7,194,106,58,1110,10,667,17,298,172,2233,1052]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.ServerTreeRenderer=e.getLabelWithFilteredSuffix=void 0;function i(o){return(0,a.localize)(0,null,o)}e.getLabelWithFilteredSuffix=i;let s=class{static{r=this}static{this.CONNECTION_HEIGHT=23}static{this.CONNECTION_GROUP_HEIGHT=33}static{this.CONNECTION_TEMPLATE_ID="connectionProfile"}static{this.CONNECTION_GROUP_TEMPLATE_ID="connectionProfileGroup"}static{this.OBJECTEXPLORER_HEIGHT=23}static{this.OBJECTEXPLORER_TEMPLATE_ID="objectExplorer"}constructor(u,d,p){this._connectionManagementService=d,this._objectExplorerService=p,this._isCompact=!1,u&&(this._isCompact=u)}getHeight(u,d){return d instanceof y.ConnectionProfileGroup?r.CONNECTION_GROUP_HEIGHT:d instanceof b.ConnectionProfile?r.CONNECTION_HEIGHT:r.OBJECTEXPLORER_HEIGHT}getTemplateId(u,d){return d instanceof y.ConnectionProfileGroup?r.CONNECTION_GROUP_TEMPLATE_ID:d instanceof b.ConnectionProfile?r.CONNECTION_TEMPLATE_ID:r.OBJECTEXPLORER_TEMPLATE_ID}renderTemplate(u,d,p){if(d===r.CONNECTION_TEMPLATE_ID){const c=Object.create(null);return c.root=t.append(p,t.$(".connection-tile")),c.icon=t.append(c.root,t.$("div.icon.server-page")),c.label=t.append(c.root,t.$("div.label")),c}else if(d===r.CONNECTION_GROUP_TEMPLATE_ID){p.classList.add("server-group");const c=Object.create(null);return c.root=t.append(p,t.$(".server-group")),c.name=t.append(c.root,t.$("span.name")),c}else{const c=Object.create(null);return c.root=t.append(p,t.$(".object-element-group")),c.icon=t.append(c.root,t.$("div.object-icon")),c.label=t.append(c.root,t.$("div.label")),c}}renderElement(u,d,p,c){p===r.CONNECTION_TEMPLATE_ID?this.renderConnection(d,c):p===r.CONNECTION_GROUP_TEMPLATE_ID?this.renderConnectionProfileGroup(d,c):this.renderObjectExplorer(d,c)}renderObjectExplorer(u,d){let p;u.iconType?p=typeof u.iconType=="string"?u.iconType:u.iconType.id:(0,S.instanceOfSqlThemeIcon)(u.icon)?p=u.icon.id:(p=u.nodeTypeId,u.nodeStatus&&(p=u.nodeTypeId+"_"+u.nodeStatus),u.nodeSubType&&(p=u.nodeTypeId+"_"+u.nodeSubType));let c=[];for(let g=1;g<d.icon.classList.length;g++)c.push(d.icon.classList.item(g));d.icon.classList.remove(...c),d.icon.classList.add("icon");let l=p.toLocaleLowerCase();l&&d.icon.classList.add(l),T.iconRenderer.removeIcon(d.icon),u.icon&&!(0,S.instanceOfSqlThemeIcon)(u.icon)&&T.iconRenderer.putIcon(d.icon,u.icon);const n=u.filters?.length>0?i(u.label):u.label;d.label.textContent=n,d.root.title=n}getIconPath(u){if(!u)return;if(u.iconPath)return u.iconPath;let d=this._connectionManagementService.getConnectionIconId(u.id),p=this._connectionManagementService.getProviderProperties(u.providerName);if(!p)return;let c,l=p.iconPath;if(Array.isArray(l)){for(const n of l)if(!n.id||n.id===d||!d&&n.default){c=n.path,u.iconPath=c;break}}else if(f.URI.isUri(l)){let n=l;c={light:n,dark:n},u.iconPath=c}else c=l,u.iconPath=c;return c}renderServerIcon(u,d,p){if(!u)return;T.iconRenderer.putIcon(u,d);let c=p?T.badgeRenderer.serverDisconnected:T.badgeRenderer.serverConnected,l=p?T.badgeRenderer.serverConnected:T.badgeRenderer.serverDisconnected;T.badgeRenderer.removeBadge(u,c),T.badgeRenderer.addBadge(u,l)}renderConnection(u,d){let p=this._connectionManagementService.isConnected(void 0,u);this._isCompact||(p?(d.icon.classList.remove("disconnected"),d.icon.classList.add("connected")):(d.icon.classList.remove("connected"),d.icon.classList.add("disconnected")));let c=this.getIconPath(u);if(this.renderServerIcon(d.icon,c,p),this._objectExplorerService){const l=this._objectExplorerService.getObjectExplorerNode(u);let n=l?.filters?.length>0?i(u.title):u.title;d.label.textContent=n,d.root.title=l?.filters?.length>0?i(u.serverInfo):u.serverInfo,d.connectionProfile=u}}renderConnectionProfileGroup(u,d){let p=this.findParentElement(d.root,"server-group");p&&(u.color?p.style.background=u.color:p.style.background=v.DefaultServerGroupColor),u.description&&u.description!==""&&(d.root.title=u.description),d.name.hidden=!1,d.name.textContent=u.name}findParentElement(u,d){let p=u;for(;p&&!(p.className.indexOf(d)>-1);)p=p.parentElement;return(0,m.withNullAsUndefined)(p)}disposeTemplate(u,d,p){}};e.ServerTreeRenderer=s,e.ServerTreeRenderer=s=r=fe([O(1,D.IConnectionManagementService),O(2,h.IObjectExplorerService)],s)}),define(Q[3200],Y([1,0,692,194,106]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncServerTreeDelegate=void 0;class D{getHeight(f){return f instanceof y.ConnectionProfileGroup?t.ServerTreeRenderer.CONNECTION_GROUP_HEIGHT:f instanceof b.ConnectionProfile?t.ServerTreeRenderer.CONNECTION_HEIGHT:t.ServerTreeRenderer.OBJECTEXPLORER_HEIGHT}getTemplateId(f){return f instanceof y.ConnectionProfileGroup?t.ServerTreeRenderer.CONNECTION_GROUP_TEMPLATE_ID:f instanceof b.ConnectionProfile?t.ServerTreeRenderer.CONNECTION_TEMPLATE_ID:t.ServerTreeRenderer.OBJECTEXPLORER_TEMPLATE_ID}}e.AsyncServerTreeDelegate=D}),define(Q[251],Y([1,0,58,5,173,6,76,27,17,11,2240]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QueryManagementService=e.IQueryManagementService=e.SERVICE_ID=void 0,e.SERVICE_ID="queryManagementService",e.IQueryManagementService=(0,y.createDecorator)(e.SERVICE_ID);let h=class{constructor(s,o,u){this._connectionService=s,this._telemetryService=o,this._logService=u,this._requestHandlers=new Map,this._onHandlerAddedEmitter=new D.Emitter,this._queryRunners=new Map,this._handlerCallbackQueue=[]}registerRunner(s,o){for(;this._handlerCallbackQueue.length>0;)this._handlerCallbackQueue.shift()(s);s.hasCompleted||this._queryRunners.set(o,s)}getRunner(s){return this._queryRunners.get(s)}getProviderIdFromUri(s){return this._connectionService.getProviderIdFromUri(s)}enqueueOrRun(s,o){o===void 0?this._handlerCallbackQueue.push(s):s(o)}_notify(s,o){let u=this._queryRunners.get(s);this.enqueueOrRun(o,u)}addQueryRequestHandler(s,o){return this._requestHandlers.set(s,o),this._onHandlerAddedEmitter.fire(s),{dispose:()=>{}}}get onHandlerAdded(){return this._onHandlerAddedEmitter.event}isProviderRegistered(s){return!!this._requestHandlers.get(s)}getRegisteredProviders(){return Array.from(this._requestHandlers.keys())}addTelemetry(s,o,u){const p={provider:this._connectionService.getProviderIdFromUri(o)};u&&Object.assign(p,{displayEstimatedQueryPlan:u.displayEstimatedQueryPlan,displayActualQueryPlan:u.displayActualQueryPlan}),this._telemetryService.createActionEvent("Shell",s).withAdditionalProperties(p).send()}_runAction(s,o,u=!1){let d=this._connectionService.getProviderIdFromUri(s);if(!d&&u&&(d=this._connectionService.getDefaultProviderId()),!d)return Promise.reject(new Error("Connection is required in order to interact with queries"));let p=this._requestHandlers.get(d);return p?this._connectionService.refreshAzureAccountTokenIfNecessary(s).then(()=>o(p)):Promise.reject(new Error("No Handler Registered"))}cancelQuery(s){return this.addTelemetry("CancelQuery",s),this._runAction(s,o=>o.cancelQuery(s))}runQuery(s,o,u){return this.addTelemetry("RunQuery",s,u),b.mark(`sql/query/${s}/runQuery`),this._runAction(s,d=>d.runQuery(s,r(o),u))}runQueryStatement(s,o,u){return this.addTelemetry("RunQueryStatement",s),b.mark(`sql/query/${s}/runQueryStatement`),this._runAction(s,d=>d.runQueryStatement(s,o-1,u-1))}runQueryString(s,o){return this.addTelemetry("RunQueryString",s),b.mark(`sql/query/${s}/runQueryString`),this._runAction(s,u=>u.runQueryString(s,o))}runQueryAndReturn(s,o){return this._runAction(s,u=>u.runQueryAndReturn(s,o))}parseSyntax(s,o){return this._runAction(s,u=>u.parseSyntax(s,o))}async getQueryRows(s){return this._runAction(s.ownerUri,o=>o.getQueryRows(s).then(u=>u.resultSubset))}async getQueryRowsPaged(s,o,u){return this._runAction(s.ownerUri,async p=>{const c=[];let l=s.rowsStartIndex;this._logService.trace(`Getting ${s.rowsCount} rows starting from index: ${s.rowsStartIndex}.`);let n=1;do{const g=Math.min(500,s.rowsStartIndex+s.rowsCount-l);this._logService.trace(`Page ${n} - Getting ${g} rows starting from index: ${l}.`);const w=await p.getQueryRows({ownerUri:s.ownerUri,batchIndex:s.batchIndex,resultSetIndex:s.resultSetIndex,rowsCount:g,rowsStartIndex:l});this._logService.trace(`Page ${n} - Received ${w.resultSubset.rows.length} rows starting from index: ${l}.`),c.push(...w.resultSubset.rows),l+=g,n++,u&&u(l-s.rowsStartIndex)}while(l<s.rowsStartIndex+s.rowsCount&&(o===void 0||!o.isCancellationRequested));return o?.isCancellationRequested?this._logService.trace("Stop getting more rows since cancellation has been requested."):this._logService.trace(`Successfully fetched ${c.length} rows. Expected Rows: ${s.rowsCount}.`),{rows:c,rowCount:c.length}})}disposeQuery(s){return this._queryRunners.delete(s),this._runAction(s,o=>o.disposeQuery(s))}changeConnectionUri(s,o){let u=this._queryRunners.get(o);if(!u)this._logService.error(`No query runner found for old URI : '${o}'`);else{if(this._queryRunners.get(s))throw this._logService.error(`New URI : '${s}' already has a query runner.`),new Error(S.localize(0,null,s));this._queryRunners.set(s,u),this._queryRunners.delete(o)}return this._runAction(s,d=>d.connectionUriChanged(s,o))}setQueryExecutionOptions(s,o){return this._runAction(s,u=>u.setQueryExecutionOptions(s,o),!0)}saveResults(s){return this._runAction(s.ownerUri,o=>o.saveResults(s))}copyResults(s){return this._runAction(s.ownerUri,o=>o.copyResults(s))}onQueryComplete(s){this._notify(s.ownerUri,o=>{s.serverConnectionId&&o.handleServerConnId(s.serverConnectionId),o.handleQueryComplete(s.batchSummaries.map(u=>({...u,range:a(u.selection)})))})}onBatchStart(s){this._notify(s.ownerUri,o=>{o.handleBatchStart({...s.batchSummary,range:a(s.batchSummary.selection)})})}onBatchComplete(s){this._notify(s.ownerUri,o=>{o.handleBatchComplete({range:a(s.batchSummary.selection),...s.batchSummary})})}onResultSetAvailable(s){this._notify(s.ownerUri,o=>{o.handleResultSetAvailable(s.resultSetSummary)})}onResultSetUpdated(s){this._notify(s.ownerUri,o=>{o.handleResultSetUpdated(s.resultSetSummary),s.executionPlans&&o.handleExecutionPlanAvailable(s.executionPlans)})}onMessage(s){for(const[o,u]of s)u&&this._notify(o,d=>{d.handleMessage(u.map(p=>p.message))})}initializeEdit(s,o,u,d,p,c){return this._runAction(s,l=>l.initializeEdit(s,o,u,d,p,c))}onEditSessionReady(s,o,u){this._notify(s,d=>{d.handleEditSessionReady(s,o,u)})}updateCell(s,o,u,d){return this._runAction(s,p=>p.updateCell(s,o,u,d))}commitEdit(s){return this._runAction(s,o=>o.commitEdit(s))}createRow(s){return this._runAction(s,o=>o.createRow(s))}deleteRow(s,o){return this._runAction(s,u=>u.deleteRow(s,o))}disposeEdit(s){return this._runAction(s,o=>o.disposeEdit(s))}revertCell(s,o,u){return this._runAction(s,d=>d.revertCell(s,o,u))}revertRow(s,o){return this._runAction(s,u=>u.revertRow(s,o))}getEditRows(s){return this._runAction(s.ownerUri,o=>o.getEditRows(s))}};e.QueryManagementService=h,e.QueryManagementService=h=fe([O(0,t.IConnectionManagementService),O(1,T.IAdsTelemetryService),O(2,m.ILogService)],h);function a(i){return(0,v.isUndefined)(i)?void 0:new f.Range(i.startLine+1,i.startColumn+1,i.endLine+1,i.endColumn+1)}function r(i){return(0,v.isUndefined)(i)?void 0:{startLine:i.startLineNumber-1,startColumn:i.startColumn-1,endLine:i.endLineNumber-1,endColumn:i.endColumn-1}}}),define(Q[144],Y([1,0,40,3201,248,681,58,683,251,136,3202]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommonServiceInterface=e.SingleQueryManagementService=e.SingleAdminService=e.SingleConnectionManagementService=e.SingleConnectionMetadataService=void 0;class S{constructor(o,u){this._metadataService=o,this._uri=u}get metadata(){return y.Observable.fromPromise(this._metadataService.getMetadata(this._uri))}get databases(){return y.Observable.fromPromise(this._metadataService.getDatabases(this._uri))}}e.SingleConnectionMetadataService=S;class h{constructor(o,u,d){this._connectionService=o,this._uri=u,this._contextKey=d}changeDatabase(o){return Promise.resolve(this._connectionService.changeDatabase(this._uri,o).then(u=>(this._contextKey.set(this.connectionInfo.connectionProfile),u)))}get connectionInfo(){return this._connectionService.getConnectionInfo(this._uri)}}e.SingleConnectionManagementService=h;class a{constructor(o,u){this._adminService=o,this._uri=u}get databaseInfo(){return y.Observable.fromPromise(this._adminService.getDatabaseInfo(this._uri))}}e.SingleAdminService=a;class r{constructor(o,u){this._queryManagementService=o,this._uri=u}runQueryAndReturn(o){return this._queryManagementService.runQueryAndReturn(this._uri,o)}}e.SingleQueryManagementService=r;let i=class extends m.AngularDisposable{constructor(o,u,d,p,c){super(),this._params=o,this._metadataService=u,this._connectionManagementService=d,this._adminService=p,this._queryManagementService=c,this.scopedContextKeyService=this._params.scopedContextService,this._connectionContextKey=this._params.connectionContextKey,this.uri=this._params.ownerUri}get metadataService(){return this._singleMetadataService}get connectionManagementService(){return this._singleConnectionManagementService}get adminService(){return this._singleAdminService}get queryManagementService(){return this._singleQueryManagementService}set uri(o){this._uri=o,this._singleMetadataService=new S(this._metadataService,this._uri),this._singleConnectionManagementService=new h(this._connectionManagementService,this._uri,this._connectionContextKey),this._singleAdminService=new a(this._adminService,this._uri),this._singleQueryManagementService=new r(this._queryManagementService,this._uri)}get uri(){return this._uri}getUnderlyingUri(){return this._uri}getOriginalConnectionProfile(){return this._params.connection}};e.CommonServiceInterface=i,e.CommonServiceInterface=i=fe([(0,t.Injectable)(),O(0,(0,t.Inject)(b.IBootstrapParams)),O(1,(0,t.Inject)(D.IMetadataService)),O(2,(0,t.Inject)(T.IConnectionManagementService)),O(3,(0,t.Inject)(f.IAdminService)),O(4,(0,t.Inject)(v.IQueryManagementService))],i)}),define(Q[1159],Y([1,0,40,136,144,814,1046]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AsmtViewComponent=e.DASHBOARD_SELECTOR=void 0,e.DASHBOARD_SELECTOR="asmtview-component";let T=class extends y.AngularDisposable{constructor(v,m){super(),this._cd=v,this._commonService=m,this.localizedStrings=D.LocalizedStrings,this.connectionInfo=null,this.instanceName="",this.ruleset="",this.api=""}ngOnInit(){this.displayConnectionInfo()}displayConnectionInfo(){this.connectionInfo=this._commonService.connectionManagementService.connectionInfo.serverInfo;let v=this._commonService.connectionManagementService.connectionInfo.connectionProfile.serverName;this.instanceName=v}displayAssessmentInfo(v,m){this.api=v,this.ruleset=m,this._cd.detectChanges()}};e.AsmtViewComponent=T,e.AsmtViewComponent=T=fe([(0,t.Component)({selector:e.DASHBOARD_SELECTOR,templateUrl:decodeURI(q.toUrl("./asmtView.component.html"))}),(0,t.Injectable)(),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>b.CommonServiceInterface)))],T)}),define(Q[1160],Y([1,0,40,6,144,102,1611]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ControlHostContent=void 0;let T=class{constructor(v,m){this._dashboardService=v,this._changeRef=m,this._onResize=new y.Emitter,this.onResize=this._onResize.event,this._onMessage=new y.Emitter,this.onMessage=this._onMessage.event}layout(){this._agentViewComponent?.layout()}get id(){return this.webviewId}get connection(){const v=this._dashboardService.connectionManagementService.connectionInfo.connectionProfile;return{providerName:v.providerName,connectionId:v.id,options:v.options}}get serverInfo(){return this._dashboardService.connectionManagementService.connectionInfo.serverInfo}setControlType(v){this._type=v,this._changeRef.detectChanges()}get controlType(){return this._type}refresh(){this._agentViewComponent!==void 0&&(this._agentViewComponent.refresh=!0)}};e.ControlHostContent=T,fe([(0,t.Input)()],T.prototype,"webviewId",void 0),fe([(0,t.ViewChild)("agent")],T.prototype,"_agentViewComponent",void 0),fe([D.memoize],T.prototype,"connection",null),fe([D.memoize],T.prototype,"serverInfo",null),e.ControlHostContent=T=fe([(0,t.Component)({templateUrl:decodeURI(q.toUrl("./controlHostContent.component.html")),selector:"controlhost-content"}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>b.CommonServiceInterface))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef)))],T)}),define(Q[3203],Y([1,0,40,6,434,1160,185,1604]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DashboardControlHostContainer=void 0;let f=class extends b.DashboardTab{constructor(){super(),this._onResize=new y.Emitter,this.onResize=this._onResize.event}ngAfterContentInit(){this._register(this._hostContent.onResize(()=>{this._onResize.fire()}));const m=this.tab.container;m["controlhost-container"]&&m["controlhost-container"].type&&this._hostContent.setControlType(m["controlhost-container"].type)}layout(){this._hostContent.layout()}get id(){return this.tab.id}get editable(){return this.tab.editable}refresh(){this._hostContent.refresh()}};e.DashboardControlHostContainer=f,fe([(0,t.Input)()],f.prototype,"tab",void 0),fe([(0,t.ViewChild)(D.ControlHostContent)],f.prototype,"_hostContent",void 0),e.DashboardControlHostContainer=f=fe([(0,t.Component)({selector:"dashboard-controlhost-container",providers:[{provide:T.TabChild,useExisting:(0,t.forwardRef)(()=>f)}],template:` <controlhost-content [webviewId]="tab.id"> </controlhost-content> `})],f)}),define(Q[868],Y([1,0,40,4517,144,2026]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbService=e.BreadcrumbClass=void 0;var T;(function(v){v[v.DatabasePage=0]="DatabasePage",v[v.ServerPage=1]="ServerPage"})(T||(e.BreadcrumbClass=T={}));let f=class{constructor(m){this.commonService=m,this.commonService.onUpdatePage(()=>{this.setBreadcrumbs(this._currentPage)}),this.breadcrumbItem=new y.Subject}setBreadcrumbs(m){this._currentPage=m,this.itemBreadcrums=[];const S=this.getBreadcrumbsLink(m);this.breadcrumbItem.next(S)}getBreadcrumbsLink(m){this.itemBreadcrums=[];const S=this.commonService.connectionManagementService.connectionInfo.connectionProfile;switch(this.itemBreadcrums.push({label:D.localize(0,null)}),m){case T.DatabasePage:this.itemBreadcrums.push(this.getServerBreadcrumb(S)),this.itemBreadcrums.push(this.getDbBreadcrumb(S));break;case T.ServerPage:this.itemBreadcrums.push(this.getServerBreadcrumb(S));break;default:this.itemBreadcrums=[]}return this.itemBreadcrums}getServerBreadcrumb(m){return{label:m.serverName,routerLink:["server-dashboard"]}}getDbBreadcrumb(m){let S=m.providerName==="LOGANALYTICS"?"workspace-name":"database-name";return{label:m.databaseName?m.databaseName:S,routerLink:["database-dashboard"]}}};e.BreadcrumbService=f,e.BreadcrumbService=f=fe([(0,t.Injectable)(),O(0,(0,t.Inject)((0,t.forwardRef)(()=>b.CommonServiceInterface)))],f)}),define(Q[453],Y([1,0,8,251]),function(q,e,t,y){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionContextKey=void 0;let D=class{static{b=this}static{this.Provider=new t.RawContextKey("connectionProvider",void 0)}static{this.Server=new t.RawContextKey("serverName",void 0)}static{this.Database=new t.RawContextKey("databaseName",void 0)}static{this.Connection=new t.RawContextKey("connection",void 0)}static{this.IsQueryProvider=new t.RawContextKey("isQueryProvider",!1)}static{this.CanOpenInAzurePortal=new t.RawContextKey("canOpenInAzurePortal",!1)}constructor(f,v){this.queryManagementService=v,this._providerKey=b.Provider.bindTo(f),this._serverKey=b.Server.bindTo(f),this._databaseKey=b.Database.bindTo(f),this._connectionKey=b.Connection.bindTo(f),this._isQueryProviderKey=b.IsQueryProvider.bindTo(f),this._canOpenInAzurePortal=b.CanOpenInAzurePortal.bindTo(f)}set(f){this.setCanOpenInPortal(f);let v=this.queryManagementService.getRegisteredProviders();this._connectionKey.set(f),this._providerKey.set(f&&f.providerName),this._serverKey.set(f&&f.serverName),this._databaseKey.set(f&&f.databaseName),this._isQueryProviderKey.set(!!f&&!!f.providerName&&v.indexOf(f.providerName)!==-1)}setCanOpenInPortal(f){f&&f.azureResourceId&&f.azureTenantId&&f.azurePortalEndpoint&&this._canOpenInAzurePortal.set(!0)}reset(){this._providerKey.reset(),this._serverKey.reset(),this._databaseKey.reset(),this._connectionKey.reset(),this._isQueryProviderKey.reset(),this._canOpenInAzurePortal.reset()}get(){return this._connectionKey.get()}};e.ConnectionContextKey=D,e.ConnectionContextKey=D=b=fe([O(0,t.IContextKeyService),O(1,y.IQueryManagementService)],D)}),define(Q[3204],Y([1,0,20,14,15,6,4,55,863,11]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDiskFileSystemProvider=void 0;class S extends T.Disposable{constructor(a,r){super(),this.logService=a,this.options=r,this._onDidChangeFile=this._register(new D.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this._onDidWatchError=this._register(new D.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.universalPathsToWatch=[],this.universalWatchRequestDelayer=this._register(new y.ThrottledDelayer(0)),this.nonRecursivePathsToWatch=[],this.nonRecursiveWatchRequestDelayer=this._register(new y.ThrottledDelayer(0))}watch(a,r){return r.recursive||this.options?.watcher?.forceUniversal?this.watchUniversal(a,r):this.watchNonRecursive(a,r)}watchUniversal(a,r){const i={path:this.toFilePath(a),excludes:r.excludes,includes:r.includes,recursive:r.recursive},s=(0,t.insert)(this.universalPathsToWatch,i);return this.refreshUniversalWatchers(),(0,T.toDisposable)(()=>{s(),this.refreshUniversalWatchers()})}refreshUniversalWatchers(){this.universalWatchRequestDelayer.trigger(()=>this.doRefreshUniversalWatchers()).catch(a=>(0,b.onUnexpectedError)(a))}doRefreshUniversalWatchers(){this.universalWatcher||(this.universalWatcher=this._register(this.createUniversalWatcher(r=>this._onDidChangeFile.fire((0,v.toFileChanges)(r)),r=>this.onWatcherLogMessage(r),this.logService.getLevel()===m.LogLevel.Trace)),this._register(this.logService.onDidChangeLogLevel(()=>{this.universalWatcher?.setVerboseLogging(this.logService.getLevel()===m.LogLevel.Trace)})));const a=this.options?.watcher?.recursive?.usePolling;if(a===!0)for(const r of this.universalPathsToWatch)(0,v.isRecursiveWatchRequest)(r)&&(r.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3);else if(Array.isArray(a))for(const r of this.universalPathsToWatch)(0,v.isRecursiveWatchRequest)(r)&&a.includes(r.path)&&(r.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3);return this.universalWatcher.watch(this.universalPathsToWatch)}watchNonRecursive(a,r){const i={path:this.toFilePath(a),excludes:r.excludes,includes:r.includes,recursive:!1},s=(0,t.insert)(this.nonRecursivePathsToWatch,i);return this.refreshNonRecursiveWatchers(),(0,T.toDisposable)(()=>{s(),this.refreshNonRecursiveWatchers()})}refreshNonRecursiveWatchers(){this.nonRecursiveWatchRequestDelayer.trigger(()=>this.doRefreshNonRecursiveWatchers()).catch(a=>(0,b.onUnexpectedError)(a))}doRefreshNonRecursiveWatchers(){return this.nonRecursiveWatcher||(this.nonRecursiveWatcher=this._register(this.createNonRecursiveWatcher(a=>this._onDidChangeFile.fire((0,v.toFileChanges)(a)),a=>this.onWatcherLogMessage(a),this.logService.getLevel()===m.LogLevel.Trace)),this._register(this.logService.onDidChangeLogLevel(()=>{this.nonRecursiveWatcher?.setVerboseLogging(this.logService.getLevel()===m.LogLevel.Trace)}))),this.nonRecursiveWatcher.watch(this.nonRecursivePathsToWatch)}onWatcherLogMessage(a){a.type==="error"&&this._onDidWatchError.fire(a.message),this.logService[a.type](a.message)}toFilePath(a){return(0,f.normalize)(a.fsPath)}}e.AbstractDiskFileSystemProvider=S}),define(Q[3205],Y([1,0,20,14,62,31,6,122,83,4,283,22,173,26,300,2464,25,3184,11,15]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileService=void 0;let c=class extends m.Disposable{constructor(n){super(),this.logService=n,this.BUFFER_SIZE=256*1024,this._onDidChangeFileSystemProviderRegistrations=this._register(new T.Emitter),this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=this._register(new T.Emitter),this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this._onDidChangeFileSystemProviderCapabilities=this._register(new T.Emitter),this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event,this.provider=new Map,this._onDidRunOperation=this._register(new T.Emitter),this.onDidRunOperation=this._onDidRunOperation.event,this._onDidFilesChange=this._register(new T.Emitter),this.onDidFilesChange=this._onDidFilesChange.event,this._onDidWatchError=this._register(new T.Emitter),this.onDidWatchError=this._onDidWatchError.event,this.activeWatchers=new Map,this.writeQueue=this._register(new y.ResourceQueue)}registerProvider(n,g){if(this.provider.has(n))throw new Error(`A filesystem provider for the scheme '${n}' is already registered.`);(0,a.mark)(`code/registerFilesystem/${n}`);const w=new m.DisposableStore;return this.provider.set(n,g),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:n,provider:g}),w.add(g.onDidChangeFile(E=>this._onDidFilesChange.fire(new o.FileChangesEvent(E,!this.isPathCaseSensitive(g))))),typeof g.onDidWatchError=="function"&&w.add(g.onDidWatchError(E=>this._onDidWatchError.fire(new Error(E)))),w.add(g.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:g,scheme:n}))),(0,m.toDisposable)(()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:n,provider:g}),this.provider.delete(n),(0,m.dispose)(w)})}getProvider(n){return this.provider.get(n)}async activateProvider(n){const g=[];this._onWillActivateFileSystemProvider.fire({scheme:n,join(w){g.push(w)}}),!this.provider.has(n)&&await y.Promises.settled(g)}async canHandleResource(n){return await this.activateProvider(n.scheme),this.hasProvider(n)}hasProvider(n){return this.provider.has(n.scheme)}hasCapability(n,g){const w=this.provider.get(n.scheme);return!!(w&&w.capabilities&g)}listCapabilities(){return v.Iterable.map(this.provider,([n,g])=>({scheme:n,capabilities:g.capabilities}))}async withProvider(n){if(!(0,r.isAbsolutePath)(n))throw new o.FileOperationError((0,s.localize)(0,null,this.resourceForError(n)),8);await this.activateProvider(n.scheme);const g=this.provider.get(n.scheme);if(!g){const w=new p.ErrorNoTelemetry;throw w.message=(0,s.localize)(1,null,n.toString()),w}return g}async withReadProvider(n){const g=await this.withProvider(n);if((0,o.hasOpenReadWriteCloseCapability)(g)||(0,o.hasReadWriteCapability)(g)||(0,o.hasFileReadStreamCapability)(g))return g;throw new Error(`Filesystem provider for scheme '${n.scheme}' neither has FileReadWrite, FileReadStream nor FileOpenReadWriteClose capability which is needed for the read operation.`)}async withWriteProvider(n){const g=await this.withProvider(n);if((0,o.hasOpenReadWriteCloseCapability)(g)||(0,o.hasReadWriteCapability)(g))return g;throw new Error(`Filesystem provider for scheme '${n.scheme}' neither has FileReadWrite nor FileOpenReadWriteClose capability which is needed for the write operation.`)}async resolve(n,g){try{return await this.doResolveFile(n,g)}catch(w){throw(0,o.toFileSystemProviderErrorCode)(w)===o.FileSystemProviderErrorCode.FileNotFound?new o.FileOperationError((0,s.localize)(2,null,this.resourceForError(n)),1):(0,o.ensureFileSystemProviderError)(w)}}async doResolveFile(n,g){const w=await this.withProvider(n),E=this.isPathCaseSensitive(w),C=g?.resolveTo,I=g?.resolveSingleChildDescendants,_=g?.resolveMetadata,A=await w.stat(n);let k;return this.toFileStat(w,n,A,void 0,!!_,(L,R)=>(k||(k=S.TernarySearchTree.forUris(()=>!E),k.set(n,!0),C&&k.fill(!0,C)),k.get(L.resource)||k.findSuperstr(L.resource.with({query:null,fragment:null}))?!0:L.isDirectory&&I?R===1:!1))}async toFileStat(n,g,w,E,C,I){const{providerExtUri:_}=this.getExtUri(n),A={resource:g,name:_.basename(g),isFile:(w.type&o.FileType.File)!==0,isDirectory:(w.type&o.FileType.Directory)!==0,isSymbolicLink:(w.type&o.FileType.SymbolicLink)!==0,mtime:w.mtime,ctime:w.ctime,size:w.size,readonly:!!((w.permissions??0)&o.FilePermission.Readonly)||!!(n.capabilities&2048),locked:!!((w.permissions??0)&o.FilePermission.Locked),etag:(0,o.etag)({mtime:w.mtime,size:w.size}),children:void 0};if(A.isDirectory&&I(A,E)){try{const k=await n.readdir(g),L=await y.Promises.settled(k.map(async([R,M])=>{try{const N=_.joinPath(g,R),P=C?await n.stat(N):{type:M};return await this.toFileStat(n,N,P,k.length,C,I)}catch(N){return this.logService.trace(N),null}}));A.children=(0,t.coalesce)(L)}catch(k){this.logService.trace(k),A.children=[]}return A}return A}async resolveAll(n){return y.Promises.settled(n.map(async g=>{try{return{stat:await this.doResolveFile(g.resource,g.options),success:!0}}catch(w){return this.logService.trace(w),{stat:void 0,success:!1}}}))}async stat(n){const g=await this.withProvider(n),w=await g.stat(n);return this.toFileStat(g,n,w,void 0,!0,()=>!1)}async exists(n){const g=await this.withProvider(n);try{return!!await g.stat(n)}catch{return!1}}async canCreateFile(n,g){try{await this.doValidateCreateFile(n,g)}catch(w){return w}return!0}async doValidateCreateFile(n,g){if(!g?.overwrite&&await this.exists(n))throw new o.FileOperationError((0,s.localize)(3,null,this.resourceForError(n)),3,g)}async createFile(n,g=b.VSBuffer.fromString(""),w){await this.doValidateCreateFile(n,w);const E=await this.writeFile(n,g);return this._onDidRunOperation.fire(new o.FileOperationEvent(n,0,E)),E}async writeFile(n,g,w){const E=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(n),n),{providerExtUri:C}=this.getExtUri(E);try{await this.validateWriteFile(E,n,w)||await this.mkdirp(E,C.dirname(n));let _;if((0,o.hasReadWriteCapability)(E)&&!(g instanceof b.VSBuffer))if((0,i.isReadableStream)(g)){const A=await(0,i.peekStream)(g,3);A.ended?_=b.VSBuffer.concat(A.buffer):_=A}else _=(0,i.peekReadable)(g,A=>b.VSBuffer.concat(A),3);else _=g;if(!(0,o.hasOpenReadWriteCloseCapability)(E)||(0,o.hasReadWriteCapability)(E)&&_ instanceof b.VSBuffer)await this.doWriteUnbuffered(E,n,w,_);else{const A=_ instanceof b.VSBuffer?(0,b.bufferToReadable)(_):_;w?.atomic!==!1&&w?.atomic?.postfix?await this.doWriteBufferedAtomic(E,n,(0,r.joinPath)((0,r.dirname)(n),`${(0,r.basename)(n)}${w.atomic.postfix}`),w,A):await this.doWriteBuffered(E,n,w,A)}this._onDidRunOperation.fire(new o.FileOperationEvent(n,4))}catch(I){throw new o.FileOperationError((0,s.localize)(4,null,this.resourceForError(n),(0,o.ensureFileSystemProviderError)(I).toString()),(0,o.toFileOperationResult)(I),w)}return this.resolve(n,{resolveMetadata:!0})}async validateWriteFile(n,g,w){const E=!!w?.unlock;if(E&&!(n.capabilities&8192))throw new Error((0,s.localize)(5,null,this.resourceForError(g)));if(!!w?.atomic){if(!(n.capabilities&32768))throw new Error((0,s.localize)(6,null,this.resourceForError(g)));if(E)throw new Error((0,s.localize)(7,null,this.resourceForError(g)))}let I;try{I=await n.stat(g)}catch{return}if(I.type&o.FileType.Directory)throw new o.FileOperationError((0,s.localize)(8,null,this.resourceForError(g)),0,w);if(this.throwIfFileIsReadonly(g,I),typeof w?.mtime=="number"&&typeof w.etag=="string"&&w.etag!==o.ETAG_DISABLED&&typeof I.mtime=="number"&&typeof I.size=="number"&&w.mtime<I.mtime&&w.etag!==(0,o.etag)({mtime:w.mtime,size:I.size}))throw new o.FileOperationError((0,s.localize)(9,null),3,w);return I}async readFile(n,g,w){const E=await this.withReadProvider(n);return g?.atomic?this.doReadFileAtomic(E,n,g,w):this.doReadFile(E,n,g,w)}async doReadFileAtomic(n,g,w,E){return new Promise((C,I)=>{this.writeQueue.queueFor(g,this.getExtUri(n).providerExtUri).queue(async()=>{try{const _=await this.doReadFile(n,g,w,E);C(_)}catch(_){I(_)}})})}async doReadFile(n,g,w,E){const C=await this.doReadFileStream(n,g,{...w,preferUnbuffered:!0},E);return{...C,value:await(0,b.streamToBuffer)(C.value)}}async readFileStream(n,g,w){const E=await this.withReadProvider(n);return this.doReadFileStream(E,n,g,w)}async doReadFileStream(n,g,w,E){const C=new D.CancellationTokenSource(E),I=this.validateReadFile(g,w).then(A=>A,A=>{throw C.cancel(),A});let _;try{return typeof w?.etag=="string"&&w.etag!==o.ETAG_DISABLED&&await I,w?.atomic&&(0,o.hasFileAtomicReadCapability)(n)||!((0,o.hasOpenReadWriteCloseCapability)(n)||(0,o.hasFileReadStreamCapability)(n))||(0,o.hasReadWriteCapability)(n)&&w?.preferUnbuffered?_=this.readFileUnbuffered(n,g,w):(0,o.hasFileReadStreamCapability)(n)?_=this.readFileStreamed(n,g,C.token,w):_=this.readFileBuffered(n,g,C.token,w),{...await I,value:_}}catch(A){throw _&&await(0,i.consumeStream)(_),this.restoreReadError(A,g,w)}}restoreReadError(n,g,w){const E=(0,s.localize)(10,null,this.resourceForError(g),(0,o.ensureFileSystemProviderError)(n).toString());return n instanceof o.NotModifiedSinceFileOperationError?new o.NotModifiedSinceFileOperationError(E,n.stat,w):n instanceof o.TooLargeFileOperationError?new o.TooLargeFileOperationError(E,n.fileOperationResult,n.size,n.options):new o.FileOperationError(E,(0,o.toFileOperationResult)(n),w)}readFileStreamed(n,g,w,E=Object.create(null)){const C=n.readFileStream(g,E,w);return(0,i.transform)(C,{data:I=>I instanceof b.VSBuffer?I:b.VSBuffer.wrap(I),error:I=>this.restoreReadError(I,g,E)},I=>b.VSBuffer.concat(I))}readFileBuffered(n,g,w,E=Object.create(null)){const C=(0,b.newWriteableBufferStream)();return(0,u.readFileIntoStream)(n,g,C,I=>I,{...E,bufferSize:this.BUFFER_SIZE,errorTransformer:I=>this.restoreReadError(I,g,E)},w),C}readFileUnbuffered(n,g,w){const E=(0,i.newWriteableStream)(C=>b.VSBuffer.concat(C));return(async()=>{try{let C;w?.atomic&&(0,o.hasFileAtomicReadCapability)(n)?C=await n.readFile(g,{atomic:!0}):C=await n.readFile(g),typeof w?.position=="number"&&(C=C.slice(w.position)),typeof w?.length=="number"&&(C=C.slice(0,w.length)),this.validateReadFileLimits(g,C.byteLength,w),E.end(b.VSBuffer.wrap(C))}catch(C){E.error(C),E.end()}})(),E}async validateReadFile(n,g){const w=await this.resolve(n,{resolveMetadata:!0});if(w.isDirectory)throw new o.FileOperationError((0,s.localize)(11,null,this.resourceForError(n)),0,g);if(typeof g?.etag=="string"&&g.etag!==o.ETAG_DISABLED&&g.etag===w.etag)throw new o.NotModifiedSinceFileOperationError((0,s.localize)(12,null),w,g);return this.validateReadFileLimits(n,w.size,g),w}validateReadFileLimits(n,g,w){if(typeof w?.limits?.size=="number"&&g>w.limits.size)throw new o.TooLargeFileOperationError((0,s.localize)(13,null,this.resourceForError(n)),7,g,w)}async canMove(n,g,w){return this.doCanMoveCopy(n,g,"move",w)}async canCopy(n,g,w){return this.doCanMoveCopy(n,g,"copy",w)}async doCanMoveCopy(n,g,w,E){if(n.toString()!==g.toString())try{const C=w==="move"?this.throwIfFileSystemIsReadonly(await this.withWriteProvider(n),n):await this.withReadProvider(n),I=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(g),g);await this.doValidateMoveCopy(C,n,I,g,w,E)}catch(C){return C}return!0}async move(n,g,w){const E=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(n),n),C=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(g),g),I=await this.doMoveCopy(E,n,C,g,"move",!!w),_=await this.resolve(g,{resolveMetadata:!0});return this._onDidRunOperation.fire(new o.FileOperationEvent(n,I==="move"?2:3,_)),_}async copy(n,g,w){const E=await this.withReadProvider(n),C=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(g),g),I=await this.doMoveCopy(E,n,C,g,"copy",!!w),_=await this.resolve(g,{resolveMetadata:!0});return this._onDidRunOperation.fire(new o.FileOperationEvent(n,I==="copy"?3:2,_)),_}async doMoveCopy(n,g,w,E,C,I){if(g.toString()===E.toString())return C;const{exists:_,isSameResourceWithDifferentPathCase:A}=await this.doValidateMoveCopy(n,g,w,E,C,I);if(_&&!A&&I&&await this.del(E,{recursive:!0}),await this.mkdirp(w,this.getExtUri(w).providerExtUri.dirname(E)),C==="copy"){if(n===w&&(0,o.hasFileFolderCopyCapability)(n))await n.copy(g,E,{overwrite:I});else{const k=await this.resolve(g);k.isDirectory?await this.doCopyFolder(n,k,w,E):await this.doCopyFile(n,g,w,E)}return C}else return n===w?(await n.rename(g,E,{overwrite:I}),C):(await this.doMoveCopy(n,g,w,E,"copy",I),await this.del(g,{recursive:!0}),"copy")}async doCopyFile(n,g,w,E){if((0,o.hasOpenReadWriteCloseCapability)(n)&&(0,o.hasOpenReadWriteCloseCapability)(w))return this.doPipeBuffered(n,g,w,E);if((0,o.hasOpenReadWriteCloseCapability)(n)&&(0,o.hasReadWriteCapability)(w))return this.doPipeBufferedToUnbuffered(n,g,w,E);if((0,o.hasReadWriteCapability)(n)&&(0,o.hasOpenReadWriteCloseCapability)(w))return this.doPipeUnbufferedToBuffered(n,g,w,E);if((0,o.hasReadWriteCapability)(n)&&(0,o.hasReadWriteCapability)(w))return this.doPipeUnbuffered(n,g,w,E)}async doCopyFolder(n,g,w,E){await w.mkdir(E),Array.isArray(g.children)&&await y.Promises.settled(g.children.map(async C=>{const I=this.getExtUri(w).providerExtUri.joinPath(E,C.name);return C.isDirectory?this.doCopyFolder(n,await this.resolve(C.resource),w,I):this.doCopyFile(n,C.resource,w,I)}))}async doValidateMoveCopy(n,g,w,E,C,I){let _=!1;if(n===w){const{providerExtUri:k,isPathCaseSensitive:L}=this.getExtUri(n);if(L||(_=k.isEqual(g,E)),_&&C==="copy")throw new Error((0,s.localize)(14,null,this.resourceForError(g),this.resourceForError(E)));if(!_&&k.isEqualOrParent(E,g))throw new Error((0,s.localize)(15,null,this.resourceForError(g),this.resourceForError(E)))}const A=await this.exists(E);if(A&&!_){if(!I)throw new o.FileOperationError((0,s.localize)(16,null,this.resourceForError(g),this.resourceForError(E)),4);if(n===w){const{providerExtUri:k}=this.getExtUri(n);if(k.isEqualOrParent(g,E))throw new Error((0,s.localize)(17,null,this.resourceForError(g),this.resourceForError(E)))}}return{exists:A,isSameResourceWithDifferentPathCase:_}}getExtUri(n){const g=this.isPathCaseSensitive(n);return{providerExtUri:g?r.extUri:r.extUriIgnorePathCase,isPathCaseSensitive:g}}isPathCaseSensitive(n){return!!(n.capabilities&1024)}async createFolder(n){const g=this.throwIfFileSystemIsReadonly(await this.withProvider(n),n);await this.mkdirp(g,n);const w=await this.resolve(n,{resolveMetadata:!0});return this._onDidRunOperation.fire(new o.FileOperationEvent(n,0,w)),w}async mkdirp(n,g){const w=[],{providerExtUri:E}=this.getExtUri(n);for(;!E.isEqual(g,E.dirname(g));)try{if(!((await n.stat(g)).type&o.FileType.Directory))throw new Error((0,s.localize)(18,null,this.resourceForError(g)));break}catch(C){if((0,o.toFileSystemProviderErrorCode)(C)!==o.FileSystemProviderErrorCode.FileNotFound)throw C;w.push(E.basename(g)),g=E.dirname(g)}for(let C=w.length-1;C>=0;C--){g=E.joinPath(g,w[C]);try{await n.mkdir(g)}catch(I){if((0,o.toFileSystemProviderErrorCode)(I)!==o.FileSystemProviderErrorCode.FileExists)throw I}}}async canDelete(n,g){try{await this.doValidateDelete(n,g)}catch(w){return w}return!0}async doValidateDelete(n,g){const w=this.throwIfFileSystemIsReadonly(await this.withProvider(n),n),E=!!g?.useTrash;if(E&&!(w.capabilities&4096))throw new Error((0,s.localize)(19,null,this.resourceForError(n)));const C=g?.atomic;if(C&&!(w.capabilities&65536))throw new Error((0,s.localize)(20,null,this.resourceForError(n)));if(E&&C)throw new Error((0,s.localize)(21,null,this.resourceForError(n)));let I;try{I=await w.stat(n)}catch{}if(I)this.throwIfFileIsReadonly(n,I);else throw new o.FileOperationError((0,s.localize)(22,null,this.resourceForError(n)),1);if(!!!g?.recursive){const A=await this.resolve(n);if(A.isDirectory&&Array.isArray(A.children)&&A.children.length>0)throw new Error((0,s.localize)(23,null,this.resourceForError(n)))}return w}async del(n,g){const w=await this.doValidateDelete(n,g),E=!!g?.useTrash,C=!!g?.recursive,I=g?.atomic??!1;await w.delete(n,{recursive:C,useTrash:E,atomic:I}),this._onDidRunOperation.fire(new o.FileOperationEvent(n,1))}async cloneFile(n,g){const w=await this.withProvider(n),E=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(g),g);if(w===E&&this.getExtUri(w).providerExtUri.isEqual(n,g))return;if(w===E&&(0,o.hasFileCloneCapability)(w))return w.cloneFile(n,g);await this.mkdirp(E,this.getExtUri(E).providerExtUri.dirname(g));const C=this.writeQueue.queueFor(n,this.getExtUri(w).providerExtUri);return w===E&&(0,o.hasFileFolderCopyCapability)(w)?C.queue(()=>w.copy(n,g,{overwrite:!0})):C.queue(()=>this.doCopyFile(w,n,E,g))}watch(n,g={recursive:!1,excludes:[]}){const w=new m.DisposableStore;let E=!1,C=()=>{E=!0};return w.add((0,m.toDisposable)(()=>C())),(async()=>{try{const I=await this.doWatch(n,g);E?(0,m.dispose)(I):C=()=>(0,m.dispose)(I)}catch(I){this.logService.error(I)}})(),w}async doWatch(n,g){const w=await this.withProvider(n),E=(0,f.hash)([this.getExtUri(w).providerExtUri.getComparisonKey(n),g]);let C=this.activeWatchers.get(E);return C||(C={count:0,disposable:w.watch(n,g)},this.activeWatchers.set(E,C)),C.count+=1,(0,m.toDisposable)(()=>{C&&(C.count--,C.count===0&&((0,m.dispose)(C.disposable),this.activeWatchers.delete(E)))})}dispose(){super.dispose();for(const[,n]of this.activeWatchers)(0,m.dispose)(n.disposable);this.activeWatchers.clear()}async doWriteBufferedAtomic(n,g,w,E,C){await this.doWriteBuffered(n,w,E,C);try{await n.rename(w,g,{overwrite:!0})}catch(I){try{await n.delete(w,{recursive:!1,useTrash:!1,atomic:!1})}catch{}throw I}}async doWriteBuffered(n,g,w,E){return this.writeQueue.queueFor(g,this.getExtUri(n).providerExtUri).queue(async()=>{const C=await n.open(g,{create:!0,unlock:w?.unlock??!1});try{(0,i.isReadableStream)(E)||(0,i.isReadableBufferedStream)(E)?await this.doWriteStreamBufferedQueued(n,C,E):await this.doWriteReadableBufferedQueued(n,C,E)}catch(I){throw(0,o.ensureFileSystemProviderError)(I)}finally{await n.close(C)}})}async doWriteStreamBufferedQueued(n,g,w){let E=0,C;if((0,i.isReadableBufferedStream)(w)){if(w.buffer.length>0){const I=b.VSBuffer.concat(w.buffer);await this.doWriteBuffer(n,g,I,I.byteLength,E,0),E+=I.byteLength}if(w.ended)return;C=w.stream}else C=w;return new Promise((I,_)=>{(0,i.listenStream)(C,{onData:async A=>{C.pause();try{await this.doWriteBuffer(n,g,A,A.byteLength,E,0)}catch(k){return _(k)}E+=A.byteLength,setTimeout(()=>C.resume())},onError:A=>_(A),onEnd:()=>I()})})}async doWriteReadableBufferedQueued(n,g,w){let E=0,C;for(;(C=w.read())!==null;)await this.doWriteBuffer(n,g,C,C.byteLength,E,0),E+=C.byteLength}async doWriteBuffer(n,g,w,E,C,I){let _=0;for(;_<E;){const A=await n.write(g,C+_,w.buffer,I+_,E-_);_+=A}}async doWriteUnbuffered(n,g,w,E){return this.writeQueue.queueFor(g,this.getExtUri(n).providerExtUri).queue(()=>this.doWriteUnbufferedQueued(n,g,w,E))}async doWriteUnbufferedQueued(n,g,w,E){let C;E instanceof b.VSBuffer?C=E:(0,i.isReadableStream)(E)?C=await(0,b.streamToBuffer)(E):(0,i.isReadableBufferedStream)(E)?C=await(0,b.bufferedStreamToBuffer)(E):C=(0,b.readableToBuffer)(E),await n.writeFile(g,C.buffer,{create:!0,overwrite:!0,unlock:w?.unlock??!1,atomic:w?.atomic??!1})}async doPipeBuffered(n,g,w,E){return this.writeQueue.queueFor(E,this.getExtUri(w).providerExtUri).queue(()=>this.doPipeBufferedQueued(n,g,w,E))}async doPipeBufferedQueued(n,g,w,E){let C,I;try{C=await n.open(g,{create:!1}),I=await w.open(E,{create:!0,unlock:!1});const _=b.VSBuffer.alloc(this.BUFFER_SIZE);let A=0,k=0,L=0;do L=await n.read(C,A,_.buffer,k,_.byteLength-k),await this.doWriteBuffer(w,I,_,L,A,k),A+=L,k+=L,k===_.byteLength&&(k=0);while(L>0)}catch(_){throw(0,o.ensureFileSystemProviderError)(_)}finally{await y.Promises.settled([typeof C=="number"?n.close(C):Promise.resolve(),typeof I=="number"?w.close(I):Promise.resolve()])}}async doPipeUnbuffered(n,g,w,E){return this.writeQueue.queueFor(E,this.getExtUri(w).providerExtUri).queue(()=>this.doPipeUnbufferedQueued(n,g,w,E))}async doPipeUnbufferedQueued(n,g,w,E){return w.writeFile(E,await n.readFile(g),{create:!0,overwrite:!0,unlock:!1,atomic:!1})}async doPipeUnbufferedToBuffered(n,g,w,E){return this.writeQueue.queueFor(E,this.getExtUri(w).providerExtUri).queue(()=>this.doPipeUnbufferedToBufferedQueued(n,g,w,E))}async doPipeUnbufferedToBufferedQueued(n,g,w,E){const C=await w.open(E,{create:!0,unlock:!1});try{const I=await n.readFile(g);await this.doWriteBuffer(w,C,b.VSBuffer.wrap(I),I.byteLength,0,0)}catch(I){throw(0,o.ensureFileSystemProviderError)(I)}finally{await w.close(C)}}async doPipeBufferedToUnbuffered(n,g,w,E){const C=await(0,b.streamToBuffer)(this.readFileBuffered(n,g,D.CancellationToken.None));await this.doWriteUnbuffered(w,E,void 0,C)}throwIfFileSystemIsReadonly(n,g){if(n.capabilities&2048)throw new o.FileOperationError((0,s.localize)(24,null,this.resourceForError(g)),6);return n}throwIfFileIsReadonly(n,g){if((g.permissions??0)&o.FilePermission.Readonly)throw new o.FileOperationError((0,s.localize)(25,null,this.resourceForError(n)),6)}resourceForError(n){return n.scheme===h.Schemas.file?n.fsPath:n.toString(!0)}};e.FileService=c,e.FileService=c=fe([O(0,d.ILogService)],c)}),define(Q[3206],Y([1,0,26,11]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConsoleLogInAutomationLogger=e.getLogs=void 0;async function b(v,m){const S=[];return await D(v,S,m.logsHome,m.logsHome),S}e.getLogs=b;async function D(v,m,S,h){const a=await v.resolve(S);for(const{resource:r,isDirectory:i}of a.children||[])if(i)await D(v,m,r,h);else{const s=(await v.readFile(r)).value.toString();if(s){const o=(0,t.relativePath)(h,r);o&&m.push({relativePath:o,contents:s})}}}function T(v){switch(v){case y.LogLevel.Trace:return"trace";case y.LogLevel.Debug:return"debug";case y.LogLevel.Info:return"info";case y.LogLevel.Warning:return"warn";case y.LogLevel.Error:return"error"}return"info"}class f extends y.AdapterLogger{constructor(m=y.DEFAULT_LOG_LEVEL){super({log:(S,h)=>this.consoleLog(T(S),h)},m)}consoleLog(m,S){const h=window;if(typeof h.codeAutomationLog=="function")try{h.codeAutomationLog(m,S)}catch(a){console.error("Problems writing to codeAutomationLog",a)}}}e.ConsoleLogInAutomationLogger=f}),define(Q[3207],Y([1,0,7,20,18,91,25,3192,3206]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerWindowDriver=e.BrowserWindowDriver=void 0;let m=class{constructor(a,r){this.fileService=a,this.environmentService=r}async getLogs(){return(0,v.getLogs)(this.fileService,this.environmentService)}async setValue(a,r){const i=document.querySelector(a);if(!i)return Promise.reject(new Error(`Element not found: ${a}`));const s=i;s.value=r;const o=new Event("input",{bubbles:!0,cancelable:!0});s.dispatchEvent(o)}async isActiveElement(a){if(document.querySelector(a)!==document.activeElement){const i=[];let s=document.activeElement;for(;s;){const o=s.tagName,u=s.id?`#${s.id}`:"",d=(0,y.coalesce)(s.className.split(/\s+/g).map(p=>p.trim())).map(p=>`.${p}`).join("");i.unshift(`${o}${u}${d}`),s=s.parentElement}throw new Error(`Active element not found. Current active element is '${i.join(" > ")}'. Looking for ${a}`)}return!0}async getElements(a,r){const i=document.querySelectorAll(a),s=[];for(let o=0;o<i.length;o++){const u=i.item(o);s.push(this.serializeElement(u,r))}return s}serializeElement(a,r){const i=Object.create(null);for(let d=0;d<a.attributes.length;d++){const p=a.attributes.item(d);p&&(i[p.name]=p.value)}const s=[];if(r)for(let d=0;d<a.children.length;d++){const p=a.children.item(d);p&&s.push(this.serializeElement(p,!0))}const{left:o,top:u}=(0,t.getTopLeftOffset)(a);return{tagName:a.tagName,className:a.className,textContent:a.textContent||"",attributes:i,children:s,left:o,top:u}}async getElementXY(a,r,i){const s=typeof r=="number"&&typeof i=="number"?{x:r,y:i}:void 0;return this._getElementXY(a,s)}async typeInEditor(a,r){const i=document.querySelector(a);if(!i)throw new Error(`Editor not found: ${a}`);const s=i,o=s.selectionStart,u=o+r.length,d=s.value,p=d.substr(0,o)+r+d.substr(o);s.value=p,s.setSelectionRange(u,u);const c=new Event("input",{bubbles:!0,cancelable:!0});s.dispatchEvent(c)}async getTerminalBuffer(a){const r=document.querySelector(a);if(!r)throw new Error(`Terminal not found: ${a}`);const i=r.xterm;if(!i)throw new Error(`Xterm not found: ${a}`);const s=[];for(let o=0;o<i.buffer.active.length;o++)s.push(i.buffer.active.getLine(o).translateToString(!0));return s}async writeInTerminal(a,r){const i=document.querySelector(a);if(!i)throw new Error(`Element not found: ${a}`);const s=i.xterm;if(!s)throw new Error(`Xterm not found: ${a}`);s._core.coreService.triggerDataEvent(r)}getLocaleInfo(){return Promise.resolve({language:b.language,locale:b.locale})}getLocalizedStrings(){return Promise.resolve({open:f.default.open,close:f.default.close,find:f.default.find})}async _getElementXY(a,r){const i=document.querySelector(a);if(!i)return Promise.reject(new Error(`Element not found: ${a}`));const{left:s,top:o}=(0,t.getTopLeftOffset)(i),{width:u,height:d}=(0,t.getClientArea)(i);let p,c;return r?(p=s+r.x,c=o+r.y):(p=s+u/2,c=o+d/2),p=Math.round(p),c=Math.round(c),{x:p,y:c}}async exitApplication(){}};e.BrowserWindowDriver=m,e.BrowserWindowDriver=m=fe([O(0,T.IFileService),O(1,D.IEnvironmentService)],m);function S(h){Object.assign(window,{driver:h.createInstance(m)})}e.registerWindowDriver=S}),define(Q[3208],Y([1,0,3207,91,25]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerWindowDriver=void 0;let D=class extends t.BrowserWindowDriver{constructor(v,m,S){super(m,S),this.helper=v}exitApplication(){return this.helper.exitApplication()}};D=fe([O(1,b.IFileService),O(2,y.IEnvironmentService)],D);function T(f,v){Object.assign(window,{driver:f.createInstance(D,v)})}e.registerWindowDriver=T}),define(Q[3209],Y([1,0,10,6,11,4]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteLoggerChannelClient=e.LoggerChannel=e.LoggerChannelClient=void 0;class T extends b.AbstractLoggerService{constructor(h,a,r,i,s){super(a,r,i),this.windowId=h,this.channel=s,this._register(s.listen("onDidChangeLogLevel",h)(o=>{(0,b.isLogLevel)(o)?super.setLogLevel(o):super.setLogLevel(t.URI.revive(o[0]),o[1])})),this._register(s.listen("onDidChangeVisibility",h)(([o,u])=>super.setVisibility(t.URI.revive(o),u))),this._register(s.listen("onDidChangeLoggers",h)(({added:o,removed:u})=>{for(const d of o)super.registerLogger({...d,resource:t.URI.revive(d.resource)});for(const d of u)super.deregisterLogger(d.resource)}))}createConsoleMainLogger(){return new b.AdapterLogger({log:(h,a)=>{this.channel.call("consoleLog",[h,a])}})}registerLogger(h){super.registerLogger(h),this.channel.call("registerLogger",[h,this.windowId])}deregisterLogger(h){super.deregisterLogger(h),this.channel.call("deregisterLogger",[h,this.windowId])}setLogLevel(h,a){super.setLogLevel(h,a),this.channel.call("setLogLevel",[h,a])}setVisibility(h,a){super.setVisibility(h,a),this.channel.call("setVisibility",[this.toResource(h),a])}doCreateLogger(h,a,r){return new f(this.channel,h,a,r,this.windowId)}static setLogLevel(h,a,r){return h.call("setLogLevel",[a,r])}}e.LoggerChannelClient=T;class f extends b.AbstractMessageLogger{constructor(h,a,r,i,s){super(i?.logLevel==="always"),this.channel=h,this.file=a,this.isLoggerCreated=!1,this.buffer=[],this.setLevel(r),this.channel.call("createLogger",[a,i,s]).then(()=>{this.doLog(this.buffer),this.isLoggerCreated=!0})}log(h,a){const r=[[h,a]];this.isLoggerCreated?this.doLog(r):this.buffer.push(...r)}doLog(h){this.channel.call("log",[this.file,h])}}class v{constructor(h,a){this.loggerService=h,this.getUriTransformer=a}listen(h,a){const r=this.getUriTransformer(h);switch(a){case"onDidChangeLoggers":return y.Event.map(this.loggerService.onDidChangeLoggers,i=>({added:[...i.added].map(s=>this.transformLogger(s,r)),removed:[...i.removed].map(s=>this.transformLogger(s,r))}));case"onDidChangeVisibility":return y.Event.map(this.loggerService.onDidChangeVisibility,i=>[r.transformOutgoingURI(i[0]),i[1]]);case"onDidChangeLogLevel":return y.Event.map(this.loggerService.onDidChangeLogLevel,i=>(0,b.isLogLevel)(i)?i:[r.transformOutgoingURI(i[0]),i[1]])}throw new Error(`Event not found: ${a}`)}async call(h,a,r){const i=this.getUriTransformer(h);switch(a){case"setLogLevel":return(0,b.isLogLevel)(r[0])?this.loggerService.setLogLevel(r[0]):this.loggerService.setLogLevel(t.URI.revive(i.transformIncoming(r[0][0])),r[0][1]);case"getRegisteredLoggers":return Promise.resolve([...this.loggerService.getRegisteredLoggers()].map(s=>this.transformLogger(s,i)))}throw new Error(`Call not found: ${a}`)}transformLogger(h,a){return{...h,resource:a.transformOutgoingURI(h.resource)}}}e.LoggerChannel=v;class m extends D.Disposable{constructor(h,a){super(),a.call("setLogLevel",[h.getLogLevel()]),this._register(h.onDidChangeLogLevel(r=>a.call("setLogLevel",[r]))),a.call("getRegisteredLoggers").then(r=>{for(const i of r)h.registerLogger({...i,resource:t.URI.revive(i.resource)})}),this._register(a.listen("onDidChangeVisibility")(([r,i])=>h.setVisibility(t.URI.revive(r),i))),this._register(a.listen("onDidChangeLoggers")(({added:r,removed:i})=>{for(const s of r)h.registerLogger({...s,resource:t.URI.revive(s.resource)});for(const s of i)h.deregisterLogger(s.resource)}))}}e.RemoteLoggerChannelClient=m}),define(Q[3210],Y([1,0,4,11]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogService=void 0;class b extends t.Disposable{constructor(T,f=[]){super(),this.logger=new y.MultiplexLogger([T,...f]),this._register(T.onDidChangeLogLevel(v=>this.setLevel(v)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(T){this.logger.setLevel(T)}getLevel(){return this.logger.getLevel()}trace(T,...f){this.logger.trace(T,...f)}debug(T,...f){this.logger.debug(T,...f)}info(T,...f){this.logger.info(T,...f)}warn(T,...f){this.logger.warn(T,...f)}error(T,...f){this.logger.error(T,...f)}flush(){this.logger.flush()}}e.LogService=b}),define(Q[154],Y([1,0,63,2473,5]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerService=e.IMarkerData=e.MarkerSeverity=e.MarkerTag=void 0;var D;(function(v){v[v.Unnecessary=1]="Unnecessary",v[v.Deprecated=2]="Deprecated"})(D||(e.MarkerTag=D={}));var T;(function(v){v[v.Hint=1]="Hint",v[v.Info=2]="Info",v[v.Warning=4]="Warning",v[v.Error=8]="Error"})(T||(e.MarkerSeverity=T={})),function(v){function m(i,s){return s-i}v.compare=m;const S=Object.create(null);S[v.Error]=(0,y.localize)(0,null),S[v.Warning]=(0,y.localize)(1,null),S[v.Info]=(0,y.localize)(2,null);function h(i){return S[i]||""}v.toString=h;function a(i){switch(i){case t.default.Error:return v.Error;case t.default.Warning:return v.Warning;case t.default.Info:return v.Info;case t.default.Ignore:return v.Hint}}v.fromSeverity=a;function r(i){switch(i){case v.Error:return t.default.Error;case v.Warning:return t.default.Warning;case v.Info:return t.default.Info;case v.Hint:return t.default.Ignore}}v.toSeverity=r}(T||(e.MarkerSeverity=T={}));var f;(function(v){const m="";function S(a){return h(a,!0)}v.makeKey=S;function h(a,r){const i=[m];return a.source?i.push(a.source.replace("\xA6","\\\xA6")):i.push(m),a.code?typeof a.code=="string"?i.push(a.code.replace("\xA6","\\\xA6")):i.push(a.code.value.replace("\xA6","\\\xA6")):i.push(m),a.severity!==void 0&&a.severity!==null?i.push(T.toString(a.severity)):i.push(m),a.message&&r?i.push(a.message.replace("\xA6","\\\xA6")):i.push(m),a.startLineNumber!==void 0&&a.startLineNumber!==null?i.push(a.startLineNumber.toString()):i.push(m),a.startColumn!==void 0&&a.startColumn!==null?i.push(a.startColumn.toString()):i.push(m),a.endLineNumber!==void 0&&a.endLineNumber!==null?i.push(a.endLineNumber.toString()):i.push(m),a.endColumn!==void 0&&a.endColumn!==null?i.push(a.endColumn.toString()):i.push(m),i.push(m),i.join("\xA6")}v.makeKeyOptionalMessage=h})(f||(e.IMarkerData=f={})),e.IMarkerService=(0,b.createDecorator)("markerService")}),define(Q[1161],Y([1,0,20,6,4,204,33,10,27,35,5,154,9]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerNavigationService=e.MarkerList=e.MarkerCoordinate=void 0;class r{constructor(u,d,p){this.marker=u,this.index=d,this.total=p}}e.MarkerCoordinate=r;let i=class{constructor(u,d,p){this._markerService=d,this._configService=p,this._onDidChange=new y.Emitter,this.onDidChange=this._onDidChange.event,this._dispoables=new b.DisposableStore,this._markers=[],this._nextIdx=-1,f.URI.isUri(u)?this._resourceFilter=g=>g.toString()===u.toString():u&&(this._resourceFilter=u);const c=this._configService.getValue("problems.sortOrder"),l=(g,w)=>{let E=(0,T.compare)(g.resource.toString(),w.resource.toString());return E===0&&(c==="position"?E=v.Range.compareRangesUsingStarts(g,w)||h.MarkerSeverity.compare(g.severity,w.severity):E=h.MarkerSeverity.compare(g.severity,w.severity)||v.Range.compareRangesUsingStarts(g,w)),E},n=()=>{this._markers=this._markerService.read({resource:f.URI.isUri(u)?u:void 0,severities:h.MarkerSeverity.Error|h.MarkerSeverity.Warning|h.MarkerSeverity.Info}),typeof u=="function"&&(this._markers=this._markers.filter(g=>this._resourceFilter(g.resource))),this._markers.sort(l)};n(),this._dispoables.add(d.onMarkerChanged(g=>{(!this._resourceFilter||g.some(w=>this._resourceFilter(w)))&&(n(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(u){return!this._resourceFilter&&!u?!0:!this._resourceFilter||!u?!1:this._resourceFilter(u)}get selected(){const u=this._markers[this._nextIdx];return u&&new r(u,this._nextIdx+1,this._markers.length)}_initIdx(u,d,p){let c=!1,l=this._markers.findIndex(n=>n.resource.toString()===u.uri.toString());l<0&&(l=(0,t.binarySearch)(this._markers,{resource:u.uri},(n,g)=>(0,T.compare)(n.resource.toString(),g.resource.toString())),l<0&&(l=~l));for(let n=l;n<this._markers.length;n++){let g=v.Range.lift(this._markers[n]);if(g.isEmpty()){const w=u.getWordAtPosition(g.getStartPosition());w&&(g=new v.Range(g.startLineNumber,w.startColumn,g.startLineNumber,w.endColumn))}if(d&&(g.containsPosition(d)||d.isBeforeOrEqual(g.getStartPosition()))){this._nextIdx=n,c=!0;break}if(this._markers[n].resource.toString()!==u.uri.toString())break}c||(this._nextIdx=p?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(u,d,p){if(this._markers.length===0)return!1;const c=this._nextIdx;return this._nextIdx===-1?this._initIdx(d,p,u):u?this._nextIdx=(this._nextIdx+1)%this._markers.length:u||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),c!==this._nextIdx}find(u,d){let p=this._markers.findIndex(c=>c.resource.toString()===u.toString());if(!(p<0)){for(;p<this._markers.length;p++)if(v.Range.containsPosition(this._markers[p],d))return new r(this._markers[p],p+1,this._markers.length)}}};e.MarkerList=i,e.MarkerList=i=fe([O(1,h.IMarkerService),O(2,a.IConfigurationService)],i),e.IMarkerNavigationService=(0,S.createDecorator)("IMarkerNavigationService");let s=class{constructor(u,d){this._markerService=u,this._configService=d,this._provider=new D.LinkedList}registerProvider(u){const d=this._provider.unshift(u);return(0,b.toDisposable)(()=>d())}getMarkerList(u){for(const d of this._provider){const p=d.getMarkerList(u);if(p)return p}return new i(u,this._markerService,this._configService)}};s=fe([O(0,h.IMarkerService),O(1,a.IConfigurationService)],s),(0,m.registerSingleton)(e.IMarkerNavigationService,s,1)}),define(Q[693],Y([1,0,20,6,83,69,22,10,154]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerService=e.unsupportedSchemas=void 0,e.unsupportedSchemas=new Set([T.Schemas.inMemory,T.Schemas.vscodeSourceControl,T.Schemas.walkThrough,T.Schemas.walkThroughSnippet]);class m{constructor(){this._byResource=new D.ResourceMap,this._byOwner=new Map}set(r,i,s){let o=this._byResource.get(r);o||(o=new Map,this._byResource.set(r,o)),o.set(i,s);let u=this._byOwner.get(i);u||(u=new D.ResourceMap,this._byOwner.set(i,u)),u.set(r,s)}get(r,i){return this._byResource.get(r)?.get(i)}delete(r,i){let s=!1,o=!1;const u=this._byResource.get(r);u&&(s=u.delete(i));const d=this._byOwner.get(i);if(d&&(o=d.delete(r)),s!==o)throw new Error("illegal state");return s&&o}values(r){return typeof r=="string"?this._byOwner.get(r)?.values()??b.Iterable.empty():f.URI.isUri(r)?this._byResource.get(r)?.values()??b.Iterable.empty():b.Iterable.map(b.Iterable.concat(...this._byOwner.values()),i=>i[1])}}class S{constructor(r){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new D.ResourceMap,this._service=r,this._subscription=r.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(r){for(const i of r){const s=this._data.get(i);s&&this._substract(s);const o=this._resourceStats(i);this._add(o),this._data.set(i,o)}}_resourceStats(r){const i={errors:0,warnings:0,infos:0,unknowns:0};if(e.unsupportedSchemas.has(r.scheme))return i;for(const{severity:s}of this._service.read({resource:r}))s===v.MarkerSeverity.Error?i.errors+=1:s===v.MarkerSeverity.Warning?i.warnings+=1:s===v.MarkerSeverity.Info?i.infos+=1:i.unknowns+=1;return i}_substract(r){this.errors-=r.errors,this.warnings-=r.warnings,this.infos-=r.infos,this.unknowns-=r.unknowns}_add(r){this.errors+=r.errors,this.warnings+=r.warnings,this.infos+=r.infos,this.unknowns+=r.unknowns}}class h{constructor(){this._onMarkerChanged=new y.DebounceEmitter({delay:0,merge:h._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new m,this._stats=new S(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}getStatistics(){return this._stats}remove(r,i){for(const s of i||[])this.changeOne(r,s,[])}changeOne(r,i,s){if((0,t.isFalsyOrEmpty)(s))this._data.delete(i,r)&&this._onMarkerChanged.fire([i]);else{const o=[];for(const u of s){const d=h._toMarker(r,i,u);d&&o.push(d)}this._data.set(i,r,o),this._onMarkerChanged.fire([i])}}static _toMarker(r,i,s){let{code:o,severity:u,message:d,source:p,startLineNumber:c,startColumn:l,endLineNumber:n,endColumn:g,relatedInformation:w,tags:E}=s;if(d)return c=c>0?c:1,l=l>0?l:1,n=n>=c?n:c,g=g>0?g:l,{resource:i,owner:r,code:o,severity:u,message:d,source:p,startLineNumber:c,startColumn:l,endLineNumber:n,endColumn:g,relatedInformation:w,tags:E}}changeAll(r,i){const s=[],o=this._data.values(r);if(o)for(const u of o){const d=b.Iterable.first(u);d&&(s.push(d.resource),this._data.delete(d.resource,r))}if((0,t.isNonEmptyArray)(i)){const u=new D.ResourceMap;for(const{resource:d,marker:p}of i){const c=h._toMarker(r,d,p);if(!c)continue;const l=u.get(d);l?l.push(c):(u.set(d,[c]),s.push(d))}for(const[d,p]of u)this._data.set(d,r,p)}s.length>0&&this._onMarkerChanged.fire(s)}read(r=Object.create(null)){let{owner:i,resource:s,severities:o,take:u}=r;if((!u||u<0)&&(u=-1),i&&s){const d=this._data.get(s,i);if(d){const p=[];for(const c of d)if(h._accept(c,o)){const l=p.push(c);if(u>0&&l===u)break}return p}else return[]}else if(!i&&!s){const d=[];for(const p of this._data.values())for(const c of p)if(h._accept(c,o)){const l=d.push(c);if(u>0&&l===u)return d}return d}else{const d=this._data.values(s??i),p=[];for(const c of d)for(const l of c)if(h._accept(l,o)){const n=p.push(l);if(u>0&&n===u)return p}return p}}static _accept(r,i){return i===void 0||(i&r.severity)===r.severity}static _merge(r){const i=new D.ResourceMap;for(const s of r)for(const o of s)i.set(o,!0);return Array.from(i.keys())}}e.MarkerService=h}),define(Q[1162],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMenubarService=void 0,e.IMenubarService=(0,t.createDecorator)("menubarService")}),define(Q[100],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INativeHostService=void 0,e.INativeHostService=(0,t.createDecorator)("nativeHostService")}),define(Q[3211],Y([1,0,250,327]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeHostService=void 0;let b=class{constructor(T,f){return this.windowId=T,t.ProxyChannel.toService(f.getChannel("nativeHost"),{context:T,properties:(()=>{const v=new Map;return v.set("windowId",T),v})()})}};e.NativeHostService=b,e.NativeHostService=b=fe([O(1,y.IMainProcessService)],b)}),define(Q[23],Y([1,0,6,63,5]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoOpProgress=e.NoOpNotification=e.NotificationsFilter=e.NeverShowAgainScope=e.NotificationPriority=e.INotificationService=e.Severity=void 0,e.Severity=y.default,e.INotificationService=(0,b.createDecorator)("notificationService");var D;(function(S){S[S.DEFAULT=0]="DEFAULT",S[S.SILENT=1]="SILENT",S[S.URGENT=2]="URGENT"})(D||(e.NotificationPriority=D={}));var T;(function(S){S[S.WORKSPACE=0]="WORKSPACE",S[S.PROFILE=1]="PROFILE",S[S.APPLICATION=2]="APPLICATION"})(T||(e.NeverShowAgainScope=T={}));var f;(function(S){S[S.OFF=0]="OFF",S[S.SILENT=1]="SILENT",S[S.ERROR=2]="ERROR"})(f||(e.NotificationsFilter=f={}));class v{constructor(){this.progress=new m,this.onDidClose=t.Event.None,this.onDidChangeVisibility=t.Event.None}updateSeverity(h){}updateMessage(h){}updateActions(h){}close(){}}e.NoOpNotification=v;class m{infinite(){}done(){}total(h){}worked(h){}}e.NoOpProgress=m}),define(Q[3212],Y([1,0,68,23,1939]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserClipboardService=void 0;let D=class{constructor(f,v){this._vsClipboardService=f,this._notificationService=v}async writeImageDataUrl(f){this._notificationService.info((0,b.localize)(0,null))}write(f){return this._vsClipboardService.write(f)}writeText(f){return this._vsClipboardService.writeText(f)}readText(){return this._vsClipboardService.readText()}readFindText(){return this._vsClipboardService.readFindText()}writeFindText(f){return this._vsClipboardService.writeFindText(f)}writeResources(f){return this._vsClipboardService.writeResources(f)}readResources(){return this._vsClipboardService.readResources()}hasResources(){return this._vsClipboardService.hasResources()}};e.BrowserClipboardService=D,e.BrowserClipboardService=D=fe([O(0,t.IClipboardService),O(1,y.INotificationService)],D)}),define(Q[3213],Y([1,0,23,68,3212,1010]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClipboardService=void 0;let T=class extends b.BrowserClipboardService{constructor(v,m){super(v,m)}async writeImageDataUrl(v){let m=D.nativeImage.createFromDataURL(v);return D.clipboard.writeImage(m)}};e.ClipboardService=T,e.ClipboardService=T=fe([O(0,y.IClipboardService),O(1,t.INotificationService)],T)}),define(Q[3214],Y([1,0,23,7,42,215,1996]),function(q,e,t,y,b,D,T){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.ImageInsight=void 0;const v={type:D.InsightType.Image,encoding:"hex",imageFormat:"jpeg"};let m=class{static{f=this}static{this.types=[D.InsightType.Image]}constructor(h,a,r){this._notificationService=r,this.types=f.types,this._options=(0,b.mixin)(a,v,!1),this.imageEle=(0,y.$)("img"),h.appendChild(this.imageEle)}layout(){}dispose(){}set options(h){this._options=(0,b.mixin)(h,v,!1)}get options(){return this._options}set data(h){const a=this;if(h.rows&&h.rows.length>0&&h.rows[0].length>0){let r=h.rows[0][0];this._options.encoding==="hex"&&(r=f._hexToBase64(r)),this.imageEle.onerror=function(){this.src=q.toUrl("./media/images/invalidImage.png"),a._notificationService.error(T.localize(0,null))},this.imageEle.src=`data:image/${this._options.imageFormat};base64,${r}`}}static _hexToBase64(h){return h.startsWith("0x")&&(h=h.slice(2)),btoa(String.fromCharCode.apply(null,h.replace(/\r|\n/g,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ").map(a=>Number(a))))}};e.ImageInsight=m,e.ImageInsight=m=f=fe([O(2,t.INotificationService)],m)}),define(Q[869],Y([1,0,1997,23]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notifyMaxRowCountExceeded=e.getChartMaxRowCount=void 0;function b(T){return T.getValue("builtinCharts").maxRowCount}e.getChartMaxRowCount=b;function D(T,f,v){const m="charts/ignoreMaxRowCountExceededNotification";T.getBoolean(m,-1,!1)||f.prompt(y.Severity.Info,t.localize(0,null,b(v)),[{label:t.localize(1,null),isSecondary:!0,run:()=>{T.store(m,!0,-1,1)}}])}e.notifyMaxRowCountExceeded=D}),define(Q[3215],Y([1,0,40,552,248,681,58,683,251,326,144,9,6,63,2027,42,8,23,15]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DashboardServiceInterface=void 0;const p="dashboard";let c=class extends S.CommonServiceInterface{constructor(n,g,w,E,C,I,_,A,k,L){super(C,n,g,w,E),this._router=I,this._activeRoute=_,this._notificationService=A,this.angularEventingService=k,this._configService=L,this._updatePage=new a.Emitter,this.onUpdatePage=this._updatePage.event,this._onDeleteWidget=new a.Emitter,this.onDeleteWidget=this._onDeleteWidget.event,this._onPinUnpinTab=new a.Emitter,this.onPinUnpinTab=this._onPinUnpinTab.event,this._onAddNewTabs=new a.Emitter,this.onAddNewTabs=this._onAddNewTabs.event,this._onCloseTab=new a.Emitter,this.onCloseTab=this._onCloseTab.event,this._dashboardContextKey=new o.RawContextKey("dashboardContext",void 0),this._numberOfPageNavigations=0,this._params&&(this.dashboardContextKey=this._dashboardContextKey.bindTo(this.scopedContextKeyService),this._register(this.angularEventingService.onAngularEvent(this._uri)(R=>this.handleDashboardEvent(R))))}getNumberOfPageNavigations(){return this._numberOfPageNavigations}handlePageNavigation(){this._numberOfPageNavigations++}getSettings(n){let g=this._configService.getValue([p,n].join("."));return(0,s.deepClone)(g)}writeSettings(n,g,w){this._configService.updateValue([p,n].join("."),g,w)}handleDashboardEvent(n){switch(n.event){case m.AngularEventType.NAV_DATABASE:this.connectionManagementService.changeDatabase(this.connectionManagementService.connectionInfo.connectionProfile.databaseName).then(g=>{g?this._router.url==="/database-dashboard"?this._updatePage.fire():this._router.navigate(["database-dashboard"],{relativeTo:this._activeRoute,skipLocationChange:!0}).catch(d.onUnexpectedError):this._notificationService.notify({severity:r.default.Error,message:i.localize(0,null)})},()=>{this._notificationService.notify({severity:r.default.Error,message:i.localize(1,null)})});break;case m.AngularEventType.NAV_SERVER:this._router.navigate(["server-dashboard"],{relativeTo:this._activeRoute,skipLocationChange:!0}).catch(d.onUnexpectedError);break;case m.AngularEventType.DELETE_WIDGET:this._onDeleteWidget.fire(n.payload.id);break;case m.AngularEventType.PINUNPIN_TAB:this._onPinUnpinTab.fire(n.payload);break;case m.AngularEventType.NEW_TABS:this._onAddNewTabs.fire(n.payload.dashboardTabs);break;case m.AngularEventType.CLOSE_TAB:this._onCloseTab.fire(n.payload.id)}}};e.DashboardServiceInterface=c,e.DashboardServiceInterface=c=fe([(0,t.Injectable)(),O(0,(0,t.Inject)(D.IMetadataService)),O(1,(0,t.Inject)(T.IConnectionManagementService)),O(2,(0,t.Inject)(f.IAdminService)),O(3,(0,t.Inject)(v.IQueryManagementService)),O(4,(0,t.Inject)(b.IBootstrapParams)),O(5,(0,t.Inject)((0,t.forwardRef)(()=>y.Router))),O(6,(0,t.Inject)((0,t.forwardRef)(()=>y.ActivatedRoute))),O(7,(0,t.Inject)(u.INotificationService)),O(8,(0,t.Inject)(m.IAngularEventingService)),O(9,(0,t.Inject)(h.IConfigurationService))],c)}),define(Q[409],Y([1,0,34,2079,23,63,307,28,5,188,76]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h,a,r,i,s,o,u,d,p,c,l,n,g,w;Object.defineProperty(e,"__esModule",{value:!0}),e.OpenLatestRunMaterializedNotebook=e.RenameNotebookMaterializedAction=e.UnpinNotebookMaterializedAction=e.DeleteMaterializedNotebookAction=e.PinNotebookMaterializedAction=e.DeleteNotebookAction=e.OpenTemplateNotebookAction=e.EditNotebookJobAction=e.NewNotebookJobAction=e.DeleteProxyAction=e.EditProxyAction=e.NewProxyAction=e.DeleteOperatorAction=e.EditOperatorAction=e.NewOperatorAction=e.DeleteAlertAction=e.EditAlertAction=e.NewAlertAction=e.DeleteStepAction=e.NewStepAction=e.DeleteJobAction=e.OpenMaterializedNotebookAction=e.EditJobAction=e.StopJobAction=e.RunJobAction=e.NewJobAction=e.JobsRefreshAction=e.IJobActionInfo=e.JobActions=e.errorLabel=e.successLabel=void 0,e.successLabel=y.localize(0,null),e.errorLabel=y.localize(1,null);var E;(function(se){se.Run="run",se.Stop="stop"})(E||(e.JobActions=E={}));class C{}e.IJobActionInfo=C;class I extends t.Action{static{this.ID="jobaction.refresh"}static{this.LABEL=y.localize(2,null)}constructor(){super(I.ID,I.LABEL,"refreshIcon")}async run(re){re?.component?.refreshJobs()}}e.JobsRefreshAction=I;class _ extends t.Action{static{this.ID="jobaction.newJob"}static{this.LABEL=y.localize(3,null)}constructor(){super(_.ID,_.LABEL,"newStepIcon")}async run(re){await re.component.openCreateJobDialog()}}e.NewJobAction=_;let A=class extends t.Action{static{h=this}static{this.ID="jobaction.runJob"}static{this.LABEL=y.localize(4,null)}constructor(re,oe,le,ne,ce){super(h.ID,h.LABEL,"start"),this.notificationService=re,this.errorMessageService=oe,this.jobManagementService=le,this.instantationService=ne,this.telemetryService=ce}async run(re){let oe=re.targetObject.job.name,le=re.ownerUri,ne=this.instantationService.createInstance(I);this.telemetryService.sendActionEvent("Agent","RunAgentJob");const ce=await this.jobManagementService.jobAction(le,oe,E.Run);if(ce.success){let ae=y.localize(5,null);this.notificationService.info(oe+ae),await ne.run(re)}else this.errorMessageService.showDialog(D.default.Error,e.errorLabel,ce.errorMessage)}};e.RunJobAction=A,e.RunJobAction=A=h=fe([O(0,b.INotificationService),O(1,m.IErrorMessageService),O(2,T.IJobManagementService),O(3,v.IInstantiationService),O(4,S.IAdsTelemetryService)],A);let k=class extends t.Action{static{a=this}static{this.ID="jobaction.stopJob"}static{this.LABEL=y.localize(6,null)}constructor(re,oe,le,ne,ce){super(a.ID,a.LABEL,"stop"),this.notificationService=re,this.errorMessageService=oe,this.jobManagementService=le,this.instantationService=ne,this.telemetryService=ce}async run(re){let oe=re.targetObject.name,le=re.ownerUri,ne=this.instantationService.createInstance(I);this.telemetryService.sendActionEvent("Agent","StopAgentJob");const ce=await this.jobManagementService.jobAction(le,oe,E.Stop);if(ce.success){await ne.run(re);let ae=y.localize(7,null);this.notificationService.info(oe+ae)}else this.errorMessageService.showDialog(D.default.Error,"Error",ce.errorMessage)}};e.StopJobAction=k,e.StopJobAction=k=a=fe([O(0,b.INotificationService),O(1,m.IErrorMessageService),O(2,T.IJobManagementService),O(3,v.IInstantiationService),O(4,S.IAdsTelemetryService)],k);let L=class extends t.Action{static{r=this}static{this.ID="jobaction.editJob"}static{this.LABEL=y.localize(8,null)}constructor(re){super(r.ID,r.LABEL,"edit"),this._commandService=re}async run(re){await this._commandService.executeCommand("agent.openJobDialog",re.ownerUri,re.targetObject.job)}};e.EditJobAction=L,e.EditJobAction=L=r=fe([O(0,f.ICommandService)],L);class R extends t.Action{static{this.ID="notebookAction.openNotebook"}static{this.LABEL=y.localize(9,null)}constructor(){super(R.ID,R.LABEL,"openNotebook")}async run(re){re.component.openNotebook(re.history)}}e.OpenMaterializedNotebookAction=R;let M=class extends t.Action{static{i=this}static{this.ID="jobaction.deleteJob"}static{this.LABEL=y.localize(10,null)}constructor(re,oe,le,ne){super(i.ID,i.LABEL),this._notificationService=re,this._errorMessageService=oe,this._jobService=le,this._telemetryService=ne}async run(re){let oe=re.targetObject.job;this._notificationService.prompt(D.default.Info,y.localize(11,null,oe.name),[{label:i.LABEL,run:()=>{this._telemetryService.sendActionEvent("Agent","DeleteAgentJob"),this._jobService.deleteJob(re.ownerUri,re.targetObject.job).then(le=>{if(!le||!le.success){let ne=y.localize(12,null,oe.name,le.errorMessage?le.errorMessage:"Unknown error");this._errorMessageService.showDialog(D.default.Error,e.errorLabel,ne)}else{let ne=y.localize(13,null);this._notificationService.info(ne)}})}},{label:V.CancelLabel,run:()=>{}}])}};e.DeleteJobAction=M,e.DeleteJobAction=M=i=fe([O(0,b.INotificationService),O(1,m.IErrorMessageService),O(2,T.IJobManagementService),O(3,S.IAdsTelemetryService)],M);let N=class extends t.Action{static{s=this}static{this.ID="jobaction.newStep"}static{this.LABEL=y.localize(14,null)}constructor(re){super(s.ID,s.LABEL,"newStepIcon"),this._commandService=re}async run(re){let oe=re.ownerUri,le=re.serverName,ne=re.agentJobInfo;await this._commandService.executeCommand("agent.openNewStepDialog",oe,le,ne,void 0)}};e.NewStepAction=N,e.NewStepAction=N=s=fe([O(0,f.ICommandService)],N);let P=class extends t.Action{static{o=this}static{this.ID="jobaction.deleteStep"}static{this.LABEL=y.localize(15,null)}constructor(re,oe,le,ne,ce){super(o.ID,o.LABEL),this._notificationService=re,this._errorMessageService=oe,this._jobService=le,this.instantationService=ne,this._telemetryService=ce}async run(re){let oe=re.targetObject,le=this.instantationService.createInstance(I);this._notificationService.prompt(D.default.Info,y.localize(16,null,oe.stepName),[{label:o.LABEL,run:()=>{this._telemetryService.sendActionEvent("Agent","DeleteAgentJobStep"),this._jobService.deleteJobStep(re.ownerUri,re.targetObject).then(async ne=>{if(!ne||!ne.success){let ce=y.localize(17,null,oe.stepName,ne.errorMessage?ne.errorMessage:"Unknown error");this._errorMessageService.showDialog(D.default.Error,e.errorLabel,ce),await le.run(re)}else{let ce=y.localize(18,null);this._notificationService.info(ce)}})}},{label:V.CancelLabel,run:()=>{}}])}};e.DeleteStepAction=P,e.DeleteStepAction=P=o=fe([O(0,b.INotificationService),O(1,m.IErrorMessageService),O(2,T.IJobManagementService),O(3,v.IInstantiationService),O(4,S.IAdsTelemetryService)],P);class x extends t.Action{static{this.ID="jobaction.newAlert"}static{this.LABEL=y.localize(19,null)}constructor(){super(x.ID,x.LABEL,"newStepIcon")}async run(re){await re.component.openCreateAlertDialog()}}e.NewAlertAction=x;let F=class extends t.Action{static{u=this}static{this.ID="jobaction.editAlert"}static{this.LABEL=y.localize(20,null)}constructor(re){super(u.ID,u.LABEL),this._commandService=re}async run(re){await this._commandService.executeCommand("agent.openAlertDialog",re.ownerUri,re.targetObject.jobInfo,re.targetObject.alertInfo)}};e.EditAlertAction=F,e.EditAlertAction=F=u=fe([O(0,f.ICommandService)],F);let V=class extends t.Action{static{d=this}static{this.ID="jobaction.deleteAlert"}static{this.LABEL=y.localize(21,null)}static{this.CancelLabel=y.localize(22,null)}constructor(re,oe,le,ne){super(d.ID,d.LABEL),this._notificationService=re,this._errorMessageService=oe,this._jobService=le,this._telemetryService=ne}async run(re){let oe=re.targetObject.alertInfo;this._notificationService.prompt(D.default.Info,y.localize(23,null,oe.name),[{label:d.LABEL,run:async()=>{this._telemetryService.sendActionEvent("Agent","DeleteAgentAlert");const le=await this._jobService.deleteAlert(re.ownerUri,oe);if(!le||!le.success){let ne=y.localize(24,null,oe.name,le.errorMessage?le.errorMessage:"Unknown error");this._errorMessageService.showDialog(D.default.Error,e.errorLabel,ne)}else{let ne=y.localize(25,null);this._notificationService.info(ne)}}},{label:d.CancelLabel,run:()=>{}}])}};e.DeleteAlertAction=V,e.DeleteAlertAction=V=d=fe([O(0,b.INotificationService),O(1,m.IErrorMessageService),O(2,T.IJobManagementService),O(3,S.IAdsTelemetryService)],V);class W extends t.Action{static{this.ID="jobaction.newOperator"}static{this.LABEL=y.localize(26,null)}constructor(){super(W.ID,W.LABEL,"newStepIcon")}async run(re){await re.component.openCreateOperatorDialog()}}e.NewOperatorAction=W;let z=class extends t.Action{static{p=this}static{this.ID="jobaction.editAlert"}static{this.LABEL=y.localize(27,null)}constructor(re){super(p.ID,p.LABEL),this._commandService=re}async run(re){await this._commandService.executeCommand("agent.openOperatorDialog",re.ownerUri,re.targetObject)}};e.EditOperatorAction=z,e.EditOperatorAction=z=p=fe([O(0,f.ICommandService)],z);let B=class extends t.Action{static{c=this}static{this.ID="jobaction.deleteOperator"}static{this.LABEL=y.localize(28,null)}constructor(re,oe,le,ne){super(c.ID,c.LABEL),this._notificationService=re,this._errorMessageService=oe,this._jobService=le,this._telemetryService=ne}async run(re){let oe=re.targetObject;this._notificationService.prompt(D.default.Info,y.localize(29,null,oe.name),[{label:c.LABEL,run:async()=>{this._telemetryService.sendActionEvent("Agent","DeleteAgentOperator");const le=await this._jobService.deleteOperator(re.ownerUri,re.targetObject);if(!le||!le.success){let ne=y.localize(30,null,oe.name,le.errorMessage?le.errorMessage:"Unknown error");this._errorMessageService.showDialog(D.default.Error,e.errorLabel,ne)}else{let ne=y.localize(31,null);this._notificationService.info(ne)}}},{label:V.CancelLabel,run:()=>{}}])}};e.DeleteOperatorAction=B,e.DeleteOperatorAction=B=c=fe([O(0,b.INotificationService),O(1,m.IErrorMessageService),O(2,T.IJobManagementService),O(3,S.IAdsTelemetryService)],B);class K extends t.Action{static{this.ID="jobaction.newProxy"}static{this.LABEL=y.localize(32,null)}constructor(){super(K.ID,K.LABEL,"newStepIcon")}async run(re){re.component.openCreateProxyDialog()}}e.NewProxyAction=K;let H=class extends t.Action{static{l=this}static{this.ID="jobaction.editProxy"}static{this.LABEL=y.localize(33,null)}constructor(re,oe){super(l.ID,l.LABEL),this._commandService=re,this._jobManagementService=oe}async run(re){const oe=await this._jobManagementService.getCredentials(re.ownerUri);oe&&oe.credentials&&await this._commandService.executeCommand("agent.openProxyDialog",re.ownerUri,re.targetObject,oe.credentials)}};e.EditProxyAction=H,e.EditProxyAction=H=l=fe([O(0,f.ICommandService),O(1,T.IJobManagementService)],H);let U=class extends t.Action{static{n=this}static{this.ID="jobaction.deleteProxy"}static{this.LABEL=y.localize(34,null)}constructor(re,oe,le,ne){super(n.ID,n.LABEL),this._notificationService=re,this._errorMessageService=oe,this._jobService=le,this._telemetryService=ne}async run(re){let oe=re.targetObject;this._notificationService.prompt(D.default.Info,y.localize(35,null,oe.accountName),[{label:n.LABEL,run:async()=>{this._telemetryService.sendActionEvent("Agent","DeleteAgentProxy");const le=await this._jobService.deleteProxy(re.ownerUri,re.targetObject);if(!le||!le.success){let ne=y.localize(36,null,oe.accountName,le.errorMessage?le.errorMessage:"Unknown error");this._errorMessageService.showDialog(D.default.Error,e.errorLabel,ne)}else{let ne=y.localize(37,null);this._notificationService.info(ne)}}},{label:V.CancelLabel,run:()=>{}}])}};e.DeleteProxyAction=U,e.DeleteProxyAction=U=n=fe([O(0,b.INotificationService),O(1,m.IErrorMessageService),O(2,T.IJobManagementService),O(3,S.IAdsTelemetryService)],U);class G extends t.Action{static{this.ID="notebookaction.newJob"}static{this.LABEL=y.localize(38,null)}constructor(){super(G.ID,G.LABEL,"newStepIcon")}async run(re){await re.component.openCreateNotebookDialog()}}e.NewNotebookJobAction=G;let $=class extends t.Action{static{g=this}static{this.ID="notebookaction.editNotebook"}static{this.LABEL=y.localize(39,null)}constructor(re){super(g.ID,g.LABEL,"edit"),this._commandService=re}async run(re){await this._commandService.executeCommand("agent.openNotebookDialog",re.ownerUri,re.targetObject.job)}};e.EditNotebookJobAction=$,e.EditNotebookJobAction=$=g=fe([O(0,f.ICommandService)],$);class ie extends t.Action{static{this.ID="notebookaction.openTemplate"}static{this.LABEL=y.localize(40,null)}constructor(){super(ie.ID,ie.LABEL,"opennotebook")}async run(re){re.component.openTemplateNotebook()}}e.OpenTemplateNotebookAction=ie;let J=class extends t.Action{static{w=this}static{this.ID="notebookaction.deleteNotebook"}static{this.LABEL=y.localize(41,null)}constructor(re,oe,le,ne,ce){super(w.ID,w.LABEL),this._notificationService=re,this._errorMessageService=oe,this._jobService=le,this.instantationService=ne,this._telemetryService=ce}async run(re){let oe=re.targetObject.job,le=this.instantationService.createInstance(I);this._notificationService.prompt(D.default.Info,y.localize(42,null,oe.name),[{label:w.LABEL,run:async()=>{this._telemetryService.sendActionEvent("Agent","DeleteAgentJob");const ne=await this._jobService.deleteNotebook(re.ownerUri,re.targetObject.job);if(!ne||!ne.success){await le.run(re);let ce=y.localize(43,null,oe.name,ne.errorMessage?ne.errorMessage:"Unknown error");this._errorMessageService.showDialog(D.default.Error,e.errorLabel,ce)}else{let ce=y.localize(44,null);this._notificationService.info(ce)}}},{label:V.CancelLabel,run:()=>{}}])}};e.DeleteNotebookAction=J,e.DeleteNotebookAction=J=w=fe([O(0,b.INotificationService),O(1,m.IErrorMessageService),O(2,T.IJobManagementService),O(3,v.IInstantiationService),O(4,S.IAdsTelemetryService)],J);class j extends t.Action{static{this.ID="notebookaction.openTemplate"}static{this.LABEL=y.localize(45,null)}constructor(){super(j.ID,j.LABEL)}async run(re){re.component.toggleNotebookPin(re.history,!0)}}e.PinNotebookMaterializedAction=j;class ee extends t.Action{static{this.ID="notebookaction.deleteMaterializedNotebook"}static{this.LABEL=y.localize(46,null)}constructor(){super(ee.ID,ee.LABEL)}async run(re){re.component.deleteMaterializedNotebook(re.history)}}e.DeleteMaterializedNotebookAction=ee;class X extends t.Action{static{this.ID="notebookaction.unpinNotebook"}static{this.LABEL=y.localize(47,null)}constructor(){super(X.ID,X.LABEL)}async run(re){re.component.toggleNotebookPin(re.history,!1)}}e.UnpinNotebookMaterializedAction=X;class te extends t.Action{static{this.ID="notebookaction.openTemplate"}static{this.LABEL=y.localize(48,null)}constructor(){super(te.ID,te.LABEL)}async run(re){re.component.renameNotebook(re.history)}}e.RenameNotebookMaterializedAction=te;class Z extends t.Action{static{this.ID="notebookaction.openLatestRun"}static{this.LABEL=y.localize(49,null)}constructor(){super(Z.ID,Z.LABEL)}async run(re){re.component.openLastNRun(re.targetObject.job,0,1)}}e.OpenLatestRunMaterializedNotebook=Z}),define(Q[410],Y([1,0,40,218,409,185]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JobManagementView=void 0;class T extends D.TabChild{constructor(v,m,S,h,a,r){super(),this._commonService=v,this._dashboardService=m,this._contextMenuService=S,this._keybindingService=h,this._instantiationService=a,this._agentViewComponent=r,this.isVisible=!1,this.isInitialized=!1,this.isRefreshing=!1;let i=this;this._serverName=this._commonService.connectionManagementService.connectionInfo.connectionProfile.serverName,this._dashboardService.onLayout(s=>{i.layout()})}ngAfterContentChecked(){this._visibilityElement&&this._parentComponent&&(this.isVisible===!1&&this._visibilityElement.nativeElement.offsetParent!==null?(this.isVisible=!0,this.isInitialized||(this._showProgressWheel=!0,this.onFirstVisible(),this.layout(),this.isInitialized=!0)):this.isVisible===!0&&this._parentComponent.refresh===!0?(this._showProgressWheel=!0,this.isRefreshing=!0,this.onFirstVisible(),this.layout(),this._parentComponent.refresh=!1):this.isVisible===!0&&this._visibilityElement.nativeElement.offsetParent===null&&(this.isVisible=!1))}openContextMenu(v){const m=v.cell.row,S=this.getCurrentTableObject(m),h=this.getTableActions(S);if(h){const r={ownerUri:this._commonService.connectionManagementService.connectionInfo.ownerUri,targetObject:S,component:this};this._contextMenuService.showContextMenu({getAnchor:()=>v.anchor,getActions:()=>h,getKeyBinding:i=>this._keybindingFor(i),getActionsContext:()=>r})}}_keybindingFor(v){let[m]=this._keybindingService.lookupKeybindings(v.id);return m}getTableActions(v){}getCurrentTableObject(v){}initActionBar(){let v=this._instantiationService.createInstance(b.JobsRefreshAction),m=this._instantiationService.createInstance(this.contextAction),S=this.actionBarContainer.nativeElement;this._actionBar=new y.Taskbar(S),this._actionBar.setContent([{action:v},{action:m}]);let h={component:this,ownerUri:this._commonService.connectionManagementService.connectionInfo.ownerUri};this._actionBar.context=h}refreshJobs(){this._agentViewComponent.refresh=!0}openLastNRun(v,m,S){}}e.JobManagementView=T,fe([(0,t.ViewChild)("actionbarContainer")],T.prototype,"actionBarContainer",void 0)}),define(Q[505],Y([1,0,34,2091,17,23,271,58,38,11,15]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.RunCellAction=e.MultiStateAction=e.IMultiStateData=e.CellActionBase=e.CellContext=void 0;let a=(0,y.localize)(0,null);const r="[ ]",i="hideIcon";function s(l,n){return!l||!l.model?!1:l.cell===void 0?(n.notify({severity:D.Severity.Error,message:a}),!1):!0}class o{constructor(n,g){this.model=n,this._cell=g}get cell(){return this._cell?this._cell:this.model.activeCell}}e.CellContext=o;class u extends t.Action{constructor(n,g,w,E){super(n,g,w),this.notificationService=E}canRun(n){return!0}async run(n){if(s(n,this.notificationService))return this.doRun(n)}}e.CellActionBase=u;class d{constructor(n,g,w){this._state=g,this._baseClass=w,this._stateMap=new Map,n&&n.forEach(E=>this._stateMap.set(E.key,E.value))}set state(n){if(!this._stateMap.has(n))throw new Error("State value must be in stateMap");this._state=n}updateStateData(n,g){let w=this._stateMap.get(n);w&&g(w)}get classes(){let n=this.getStateValueOrDefault(w=>w.className,""),g=this._baseClass?`${this._baseClass} `:"";return g+=n,this.getStateValueOrDefault(w=>w.hideIcon,!1)&&(g+=i),g}get label(){return this.getStateValueOrDefault(n=>n.label,"")}get tooltip(){return this.getStateValueOrDefault(n=>n.tooltip,"")}get commandId(){return this.getStateValueOrDefault(n=>n.commandId,"")}getStateValueOrDefault(n,g){let w=this._stateMap.get(this._state);return w?n(w):g}}e.IMultiStateData=d;class p extends t.Action{constructor(n,g,w,E){super(n,""),this.states=g,this._keybindingService=w,this.logService=E,this.updateLabelAndIcon()}updateLabelAndIcon(){let n;try{if(this.states.commandId!==""){let g=this._keybindingService.lookupKeybinding(this.states.commandId);n=g?g.getLabel():void 0}}catch(g){this.logService.error(g)}this.label=this.states.label,this.tooltip=n?this.states.tooltip+` (${n})`:this.states.tooltip,this.class=this.states.classes}updateState(n){this.states.state=n,this.updateLabelAndIcon()}}e.MultiStateAction=p;let c=class extends p{static{h=this}static{this.ID="notebook.runCell"}static{this.LABEL="Run cell"}constructor(n,g,w,E,C){super(h.ID,new d([{key:T.CellExecutionState.Hidden,value:{label:r,className:"",tooltip:"",hideIcon:!0}},{key:T.CellExecutionState.Stopped,value:{label:"",className:"toolbarIconRun",tooltip:(0,y.localize)(1,null),commandId:"notebook.command.runactivecell"}},{key:T.CellExecutionState.Running,value:{label:"",className:"toolbarIconStop",tooltip:(0,y.localize)(2,null)}},{key:T.CellExecutionState.Error,value:{label:"",className:"toolbarIconRunError",tooltip:(0,y.localize)(3,null)}}],T.CellExecutionState.Hidden),E,C),this.notificationService=g,this.connectionManagementService=w,this.ensureContextIsUpdated(n)}async run(n){return this.doRun(n)}async doRun(n){if(this.ensureContextIsUpdated(n),!!this._context)try{await this._context.cell.runCell(this.notificationService,this.connectionManagementService)}catch(g){let w=(0,S.getErrorMessage)(g);this.notificationService.error(w)}}ensureContextIsUpdated(n){n&&n!==this._context&&(this._executionChangedDisposable&&this._executionChangedDisposable.dispose(),this._context=n,this.updateStateAndExecutionCount(n.cell.executionState),this._executionChangedDisposable=this._context.cell.onExecutionStateChange(g=>{this.updateStateAndExecutionCount(g)}))}updateStateAndExecutionCount(n){let g=r,w="";b.isUndefinedOrNull(this._context.cell.executionCount)||(g=`[${this._context.cell.executionCount}]`,g.length===4?w="execCountTen":g.length>4&&(w="execCountHundred")),this.states.updateStateData(T.CellExecutionState.Hidden,E=>{E.label=g,E.className=w}),this.updateState(n)}};e.RunCellAction=c,e.RunCellAction=c=h=fe([O(1,D.INotificationService),O(2,f.IConnectionManagementService),O(3,v.IKeybindingService),O(4,m.ILogService)],c)}),define(Q[3216],Y([1,0,2188,23]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionGlobalStatus=void 0;let b=class{constructor(T){this._notificationService=T,this._displayTime=5e3}setStatusToConnected(T){if(this._notificationService){let f,v=T.serverName;v&&(T.databaseName&&T.databaseName!==""?v=v+" : "+T.databaseName:v=v+" : <default>",f=t.onDidConnectMessage+" "+v),this._notificationService.status(f,{hideAfter:this._displayTime})}}setStatusToDisconnected(T){this._notificationService&&this._notificationService.status(t.onDidDisconnectMessage,{hideAfter:this._displayTime})}};e.ConnectionGlobalStatus=b,e.ConnectionGlobalStatus=b=fe([O(0,y.INotificationService)],b)}),define(Q[1163],Y([1,0,17,23,2239,34,31,1036]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTableHeaderString=e.copySelectionToClipboard=e.executeCopyWithNotification=void 0;async function v(i,s,o,u,d){const c=f.GridRange.getUniqueRows(f.GridRange.fromSlickRanges(o)).map(g=>g.end-g.start+1).reduce((g,w)=>g+w),l=s.getValue("queryEditor").results.showCopyCompletedNotification,n=i.notify({message:b.localize(0,null),severity:y.Severity.Info,progress:{infinite:!0},actions:{primary:d?[(0,D.toAction)({id:"cancelCopyResults",label:b.localize(1,null),run:()=>{d.cancel(),n.close()}})]:[]}});try{await u(n,c),(d===void 0||!d.token.isCancellationRequested)&&(n.progress.done(),l?(n.updateActions({primary:[(0,D.toAction)({id:"closeCopyResultsNotification",label:b.localize(2,null),run:()=>{n.close()}}),(0,D.toAction)({id:"disableCopyNotification",label:b.localize(3,null),run:()=>{r(s),i.info(b.localize(4,null))}})]}),n.updateMessage(b.localize(5,null,c)),setTimeout(()=>n.close(),3e3)):n.close())}catch(g){throw n.close(),g}}e.executeCopyWithNotification=v;async function m(i,s,o,u,d,p,c){const l=new T.CancellationTokenSource;await v(s,o,d,async(n,g)=>{const w=u.getEolString(),E=" ",C=u.shouldRemoveNewLines(),I=u.shouldSkipNewLineAfterTrailingLineBreak(),_=f.GridRange.fromSlickRanges(d),A=f.GridRange.getUniqueColumns(_),k=f.GridRange.getUniqueRows(_);let L=0;const R=()=>b.localize(6,null,L,g);let M="";if(p){const P=[];A.forEach(x=>{P.push(...u.getColumnHeaders({fromCell:x.start,toCell:x.end}))}),M=Array.from(P.values()).join(E).concat(w)}const N=[];for(const P of k){let x,F=L;const V=P.end-P.start+1;c&&c.isDataInMemory?(x=(await c.getRangeAsync(P.start,V)).map(z=>Object.keys(z).map(B=>z[B])),L+=V,n.updateMessage(R())):x=(await u.getRowData(P.start,V,l.token,W=>{L=F+W,n.updateMessage(R())})).rows,x.forEach((W,z)=>{const B=z+P.start,K=[];A.forEach(H=>{for(let U=H.start;U<=H.end;U++)d.some(G=>G.contains(B,U))&&K.push(C?a(W[U].displayValue):W[U].displayValue)}),N.push(K.join(E))})}if(!l.token.isCancellationRequested){const P=[];if(p&&P.push(M),N.length>0){let x=N[0];P.push(x);for(let F=1;F<N.length;F++){const V=N[F];P.push((!x?.endsWith(w)||!I?w:"")+V),x=V}}await i.writeText(P.join(""))}},l)}e.copySelectionToClipboard=m;function S(i,s){let o=new Map;return s.forEach(d=>{let p=d.fromCell,c=i.getColumnHeaders(d);if(c!==void 0){let l=0;for(let n of c)o.set(p+l,n),l++}}),o=h(o),Array.from(o.values()).map(d=>d||"").join(" ")}e.getTableHeaderString=S;function h(i){const s=(o,u)=>o[0]-u[0];return new Map([...i].sort(s))}function a(i){return t.isUndefinedOrNull(i)?"null":i.replace(/(\r\n|\n|\r)/gm," ")}function r(i){i.updateValue("queryEditor.results.showCopyCompletedNotification",!1)}}),define(Q[41],Y([1,0,33,10,5]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extractSelection=e.withSelection=e.matchesSomeScheme=e.matchesScheme=e.IOpenerService=void 0,e.IOpenerService=(0,b.createDecorator)("openerService");function D(m,S){return y.URI.isUri(m)?(0,t.equalsIgnoreCase)(m.scheme,S):(0,t.startsWithIgnoreCase)(m,S+":")}e.matchesScheme=D;function T(m,...S){return S.some(h=>D(m,h))}e.matchesSomeScheme=T;function f(m,S){return m.with({fragment:`${S.startLineNumber},${S.startColumn}${S.endLineNumber?`-${S.endLineNumber}${S.endColumn?`,${S.endColumn}`:""}`:""}`})}e.withSelection=f;function v(m){let S;const h=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(m.fragment);return h&&(S={startLineNumber:parseInt(h[1]),startColumn:h[2]?parseInt(h[2]):1,endLineNumber:h[4]?parseInt(h[4]):void 0,endColumn:h[4]?h[5]?parseInt(h[5]):1:void 0},m=m.with({fragment:""})),{selection:S,uri:m}}e.extractSelection=v}),define(Q[3217],Y([1,0,40,10,41,15,130,55,25,18,22]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkHandlerDirective=void 0;const h=new Set(["http","https","file","mailto","data","azuredatastudio","azuredatastudio-insiders","vscode","vscode-insiders","vscode-resource","onenote"]);let a=class{constructor(i,s,o){this.openerService=i,this.notebookService=s,this.fileService=o,this.workbenchFilePath=y.URI.parse(q.toUrl("vs/code/electron-sandbox/workbench/workbench.html"))}async onclick(i){let s=i.target;if(!(s.tagName!=="A"&&(s=s.parentElement,!s||s.tagName!=="A")))try{const o=s.href;o&&await this.handleLink(o)}catch(o){(0,D.onUnexpectedError)(o)}finally{i.preventDefault()}}async handleLink(i){let s;try{s=y.URI.parse(i)}catch{}if(m.isWeb&&window.location.host===s.authority){s=s.with({scheme:"vscode-remote"}),this.openerService.open(s);return}if(s&&this.openerService){const o=s.fragment;if(s=S.FileAccess.uriToFileUri(s),this.isSupportedLink(s))if(o&&o.length>0&&s.fsPath===this.workbenchFilePath.fsPath)this.notebookService.navigateTo(this.notebookUri,o);else{if(s.scheme==="file"&&!await this.fileService.exists(s)){let d=(0,f.relative)(this.workbenchFilePath.fsPath,s.fsPath),p=(0,f.resolve)(this.notebookUri.fsPath,d);try{s=y.URI.file(p)}catch(c){(0,D.onUnexpectedError)(c)}}this.forceOpenExternal(s)?this.openerService.open(s,{openExternal:!0}).catch(D.onUnexpectedError):this.openerService.open(s,{allowCommands:!0}).catch(D.onUnexpectedError)}}}isSupportedLink(i){return h.has(i.scheme)?!0:!!this.isTrusted&&i.scheme==="command"}forceOpenExternal(i){return i.scheme.toLowerCase()==="onenote"}};e.LinkHandlerDirective=a,fe([(0,t.Input)()],a.prototype,"isTrusted",void 0),fe([(0,t.Input)()],a.prototype,"notebookUri",void 0),fe([(0,t.HostListener)("click",["$event"])],a.prototype,"onclick",null),e.LinkHandlerDirective=a=fe([(0,t.Directive)({selector:"[link-handler]"}),O(0,(0,t.Inject)(b.IOpenerService)),O(1,(0,t.Inject)(T.INotebookService)),O(2,(0,t.Inject)(v.IFileService))],a)}),define(Q[3218],Y([1,0,7,31,204,69,186,22,26,10,79,28,208,41]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenerService=void 0;let i=class{constructor(d){this._commandService=d}async open(d,p){if(!(0,r.matchesScheme)(d,f.Schemas.command))return!1;if(!p?.allowCommands||(typeof d=="string"&&(d=m.URI.parse(d)),Array.isArray(p.allowCommands)&&!p.allowCommands.includes(d.path)))return!0;let c=[];try{c=(0,T.parse)(decodeURIComponent(d.query))}catch{try{c=(0,T.parse)(d.query)}catch{}}return Array.isArray(c)||(c=[c]),await this._commandService.executeCommand(d.path,...c),!0}};i=fe([O(0,h.ICommandService)],i);let s=class{constructor(d){this._editorService=d}async open(d,p){typeof d=="string"&&(d=m.URI.parse(d));const{selection:c,uri:l}=(0,r.extractSelection)(d);return d=l,d.scheme===f.Schemas.file&&(d=(0,v.normalizePath)(d)),await this._editorService.openCodeEditor({resource:d,options:{selection:c,source:p?.fromUserGesture?a.EditorOpenSource.USER:a.EditorOpenSource.API,...p?.editorOptions}},this._editorService.getFocusedCodeEditor(),p?.openToSide),!0}};s=fe([O(0,S.ICodeEditorService)],s);let o=class{constructor(d,p){this._openers=new b.LinkedList,this._validators=new b.LinkedList,this._resolvers=new b.LinkedList,this._resolvedUriTargets=new D.ResourceMap(c=>c.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new b.LinkedList,this._defaultExternalOpener={openExternal:async c=>((0,r.matchesSomeScheme)(c,f.Schemas.http,f.Schemas.https)?t.windowOpenNoOpener(c):window.location.href=c,!0)},this._openers.push({open:async(c,l)=>l?.openExternal||(0,r.matchesSomeScheme)(c,f.Schemas.mailto,f.Schemas.http,f.Schemas.https,f.Schemas.vsls)?(await this._doOpenExternal(c,l),!0):!1}),this._openers.push(new i(p)),this._openers.push(new s(d))}registerOpener(d){return{dispose:this._openers.unshift(d)}}registerValidator(d){return{dispose:this._validators.push(d)}}registerExternalUriResolver(d){return{dispose:this._resolvers.push(d)}}setDefaultExternalOpener(d){this._defaultExternalOpener=d}registerExternalOpener(d){return{dispose:this._externalOpeners.push(d)}}async open(d,p){const c=typeof d=="string"?m.URI.parse(d):d,l=this._resolvedUriTargets.get(c)??d;for(const n of this._validators)if(!await n.shouldOpen(l,p))return!1;for(const n of this._openers)if(await n.open(d,p))return!0;return!1}async resolveExternalUri(d,p){for(const c of this._resolvers)try{const l=await c.resolveExternalUri(d,p);if(l)return this._resolvedUriTargets.has(l.resolved)||this._resolvedUriTargets.set(l.resolved,d),l}catch{}throw new Error("Could not resolve external URI: "+d.toString())}async _doOpenExternal(d,p){const c=typeof d=="string"?m.URI.parse(d):d;let l;try{l=(await this.resolveExternalUri(c,p)).resolved}catch{l=c}let n;if(typeof d=="string"&&c.toString()===l.toString()?n=d:n=encodeURI(l.toString(!0)),p?.allowContributedOpeners){const g=typeof p?.allowContributedOpeners=="string"?p?.allowContributedOpeners:void 0;for(const w of this._externalOpeners)if(await w.openExternal(n,{sourceUri:c,preferredOpenerId:g},y.CancellationToken.None))return!0}return this._defaultExternalOpener.openExternal(n,{sourceUri:c},y.CancellationToken.None)}dispose(){this._validators.clear()}};e.OpenerService=o,e.OpenerService=o=fe([O(0,S.ICodeEditorService),O(1,h.ICommandService)],o)}),define(Q[328],Y([1,0,122,69,226,91,35,5,11,41]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureDebounceService=e.ILanguageFeatureDebounceService=void 0,e.ILanguageFeatureDebounceService=(0,f.createDecorator)("ILanguageFeatureDebounceService");var S;(function(i){const s=new WeakMap;let o=0;function u(d){let p=s.get(d);return p===void 0&&(p=++o,s.set(d,p)),p}i.of=u})(S||(S={}));class h{constructor(s){this._default=s}get(s){return this._default}update(s,o){return this._default}default(){return this._default}}class a{constructor(s,o,u,d,p,c){this._logService=s,this._name=o,this._registry=u,this._default=d,this._min=p,this._max=c,this._cache=new y.LRUCache(50,.7)}_key(s){return s.id+this._registry.all(s).reduce((o,u)=>(0,t.doHash)(S.of(u),o),0)}get(s){const o=this._key(s),u=this._cache.get(o);return u?(0,b.clamp)(u.value,this._min,this._max):this.default()}update(s,o){const u=this._key(s);let d=this._cache.get(u);d||(d=new b.SlidingWindowAverage(6),this._cache.set(u,d));const p=(0,b.clamp)(d.update(o),this._min,this._max);return(0,m.matchesScheme)(s.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${s.uri.toString()} is ${p}ms`),p}_overall(){const s=new b.MovingAverage;for(const[,o]of this._cache)s.update(o.value);return s.value}default(){const s=this._overall()|0||this._default;return(0,b.clamp)(s,this._min,this._max)}}let r=class{constructor(s,o){this._logService=s,this._data=new Map,this._isDev=o.isExtensionDevelopment||!o.isBuilt}for(s,o,u){const d=u?.min??50,p=u?.max??d**2,c=u?.key??void 0,l=`${S.of(s)},${d}${c?","+c:""}`;let n=this._data.get(l);return n||(this._isDev?n=new a(this._logService,o,s,this._overallAverage()|0||d*1.5,d,p):(this._logService.debug(`[DEBOUNCE: ${o}] is disabled in developed mode`),n=new h(d*1.5)),this._data.set(l,n)),n}_overallAverage(){const s=new b.MovingAverage;for(const o of this._data.values())s.update(o.default());return s.value}};e.LanguageFeatureDebounceService=r,e.LanguageFeatureDebounceService=r=fe([O(0,v.ILogService),O(1,D.IEnvironmentService)],r),(0,T.registerSingleton)(e.ILanguageFeatureDebounceService,r,1)}),define(Q[506],Y([1,0,20,31,15,83,69,33,51,27,328,5,35,57,4,74]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModelService=e.IOutlineModelService=e.OutlineModel=e.OutlineGroup=e.OutlineElement=e.TreeElement=void 0;class o{remove(){this.parent?.children.delete(this.id)}static findId(n,g){let w;typeof n=="string"?w=`${g.id}/${n}`:(w=`${g.id}/${n.name}`,g.children.get(w)!==void 0&&(w=`${g.id}/${n.name}_${n.range.startLineNumber}_${n.range.startColumn}`));let E=w;for(let C=0;g.children.get(E)!==void 0;C++)E=`${w}_${C}`;return E}static getElementById(n,g){if(!n)return;const w=(0,f.commonPrefixLength)(n,g.id);if(w===n.length)return g;if(!(w<g.id.length))for(const[,E]of g.children){const C=o.getElementById(n,E);if(C)return C}}static size(n){let g=1;for(const[,w]of n.children)g+=o.size(w);return g}static empty(n){return n.children.size===0}}e.TreeElement=o;class u extends o{constructor(n,g,w){super(),this.id=n,this.parent=g,this.symbol=w,this.children=new Map}}e.OutlineElement=u;class d extends o{constructor(n,g,w,E){super(),this.id=n,this.parent=g,this.label=w,this.order=E,this.children=new Map}getItemEnclosingPosition(n){return n?this._getItemEnclosingPosition(n,this.children):void 0}_getItemEnclosingPosition(n,g){for(const[,w]of g)if(!(!w.symbol.range||!m.Range.containsPosition(w.symbol.range,n)))return this._getItemEnclosingPosition(n,w.children)||w}updateMarker(n){for(const[,g]of this.children)this._updateMarker(n,g)}_updateMarker(n,g){g.marker=void 0;const w=(0,t.binarySearch)(n,g.symbol.range,m.Range.compareRangesUsingStarts);let E;w<0?(E=~w,E>0&&m.Range.areIntersecting(n[E-1],g.symbol.range)&&(E-=1)):E=w;const C=[];let I;for(;E<n.length&&m.Range.areIntersecting(g.symbol.range,n[E]);E++){const _=n[E];C.push(_),n[E]=void 0,(!I||_.severity>I)&&(I=_.severity)}for(const[,_]of g.children)this._updateMarker(C,_);I&&(g.marker={count:C.length,topSev:I}),(0,t.coalesceInPlace)(n)}}e.OutlineGroup=d;class p extends o{static create(n,g,w){const E=new y.CancellationTokenSource(w),C=new p(g.uri),I=n.ordered(g),_=I.map((k,L)=>{const R=o.findId(`provider_${L}`,C),M=new d(R,C,k.displayName??"Unknown Outline Provider",L);return Promise.resolve(k.provideDocumentSymbols(g,E.token)).then(N=>{for(const P of N||[])p._makeOutlineElement(P,M);return M},N=>((0,b.onUnexpectedExternalError)(N),M)).then(N=>{o.empty(N)?N.remove():C._groups.set(R,N)})}),A=n.onDidChange(()=>{const k=n.ordered(g);(0,t.equals)(k,I)||E.cancel()});return Promise.all(_).then(()=>E.token.isCancellationRequested&&!w.isCancellationRequested?p.create(n,g,w):C._compact()).finally(()=>{A.dispose()})}static _makeOutlineElement(n,g){const w=o.findId(n,g),E=new u(w,g,n);if(n.children)for(const C of n.children)p._makeOutlineElement(C,E);g.children.set(E.id,E)}static get(n){for(;n;){if(n instanceof p)return n;n=n.parent}}constructor(n){super(),this.uri=n,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let n=0;for(const[g,w]of this._groups)w.children.size===0?this._groups.delete(g):n+=1;if(n!==1)this.children=this._groups;else{const g=D.Iterable.first(this._groups.values());for(const[,w]of g.children)w.parent=this,this.children.set(w.id,w)}return this}merge(n){return this.uri.toString()!==n.uri.toString()||this._groups.size!==n._groups.size?!1:(this._groups=n._groups,this.children=n.children,!0)}getItemEnclosingPosition(n,g){let w;if(g){let C=g.parent;for(;C&&!w;)C instanceof d&&(w=C),C=C.parent}let E;for(const[,C]of this._groups)if(E=C.getItemEnclosingPosition(n),E&&(!w||w===C))break;return E}getItemById(n){return o.getElementById(n,this)}updateMarker(n){n.sort(m.Range.compareRangesUsingStarts);for(const[,g]of this._groups)g.updateMarker(n.slice(0))}getTopLevelSymbols(){const n=[];for(const g of this.children.values())g instanceof u?n.push(g.symbol):n.push(...D.Iterable.map(g.children.values(),w=>w.symbol));return n.sort((g,w)=>m.Range.compareRangesUsingStarts(g.range,w.range))}asListOfDocumentSymbols(){const n=this.getTopLevelSymbols(),g=[];return p._flattenDocumentSymbols(g,n,""),g.sort((w,E)=>v.Position.compare(m.Range.getStartPosition(w.range),m.Range.getStartPosition(E.range))||v.Position.compare(m.Range.getEndPosition(E.range),m.Range.getEndPosition(w.range)))}static _flattenDocumentSymbols(n,g,w){for(const E of g)n.push({kind:E.kind,tags:E.tags,name:E.name,detail:E.detail,containerName:E.containerName||w,range:E.range,selectionRange:E.selectionRange,children:void 0}),E.children&&p._flattenDocumentSymbols(n,E.children,E.name)}}e.OutlineModel=p,e.IOutlineModelService=(0,h.createDecorator)("IOutlineModelService");let c=class{constructor(n,g,w){this._languageFeaturesService=n,this._disposables=new i.DisposableStore,this._cache=new T.LRUCache(10,.7),this._debounceInformation=g.for(n.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(w.onModelRemoved(E=>{this._cache.delete(E.id)}))}dispose(){this._disposables.dispose()}async getOrCreate(n,g){const w=this._languageFeaturesService.documentSymbolProvider,E=w.ordered(n);let C=this._cache.get(n.id);if(!C||C.versionId!==n.getVersionId()||!(0,t.equals)(C.provider,E)){const _=new y.CancellationTokenSource;C={versionId:n.getVersionId(),provider:E,promiseCnt:0,source:_,promise:p.create(w,n,_.token),model:void 0},this._cache.set(n.id,C);const A=Date.now();C.promise.then(k=>{C.model=k,this._debounceInformation.update(n,Date.now()-A)}).catch(k=>{this._cache.delete(n.id)})}if(C.model)return C.model;C.promiseCnt+=1;const I=g.onCancellationRequested(()=>{--C.promiseCnt===0&&(C.source.cancel(),this._cache.delete(n.id))});try{return await C.promise}finally{I.dispose()}}getDebounceValue(n){return this._debounceInformation.get(n)}};e.OutlineModelService=c,e.OutlineModelService=c=fe([O(0,s.ILanguageFeaturesService),O(1,S.ILanguageFeatureDebounceService),O(2,r.IModelService)],c),(0,a.registerSingleton)(e.IOutlineModelService,c,1)}),define(Q[3219],Y([1,0,31,17,10,75,506,28]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),f.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider",async function(v,...m){const[S]=m;(0,y.assertType)(b.URI.isUri(S));const h=v.get(T.IOutlineModelService),r=await v.get(D.ITextModelService).createModelReference(S);try{return(await h.getOrCreate(r.object.textEditorModel,t.CancellationToken.None)).getTopLevelSymbols()}finally{r.dispose()}})}),define(Q[276],Y([1,0,7,227,67,151,6,4,41,1753]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Link=void 0;let m=class extends f.Disposable{get enabled(){return this._enabled}set enabled(h){h?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=h}set link(h){typeof h.label=="string"?this.el.textContent=h.label:((0,t.clearNode)(this.el),this.el.appendChild(h.label)),this.el.href=h.href,typeof h.tabIndex<"u"&&(this.el.tabIndex=h.tabIndex),typeof h.title<"u"&&(this.el.title=h.title),this._link=h}constructor(h,a,r={},i){super(),this._link=a,this._enabled=!0,this.el=(0,t.append)(h,(0,t.$)("a.monaco-link",{tabIndex:a.tabIndex??0,href:a.href,title:a.title},a.label)),this.el.setAttribute("role","button");const s=this._register(new y.DomEmitter(this.el,"click")),o=this._register(new y.DomEmitter(this.el,"keypress")),u=T.Event.chain(o.event).map(c=>new b.StandardKeyboardEvent(c)).filter(c=>c.keyCode===3).event,d=this._register(new y.DomEmitter(this.el,D.EventType.Tap)).event;this._register(D.Gesture.addTarget(this.el));const p=T.Event.any(s.event,u,d);this._register(p(c=>{this.enabled&&(t.EventHelper.stop(c,!0),r?.opener?r.opener(this._link.href):i.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};e.Link=m,e.Link=m=fe([O(3,v.IOpenerService)],m)}),define(Q[1164],Y([1,0,4,87,7,6,32,67,41,11,37,5,276,1599]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InfoBox=void 0;let r=class extends t.Disposable{get onDidClick(){return this._onDidClick.event}get onLinkClick(){return this._onLinkClick.event}constructor(s,o,u,d,p,c){super(),this._styles=o,this._openerService=d,this._logService=p,this.instantiationService=c,this._text="",this._links=[],this._infoBoxStyle="information",this._announceText=!1,this._isClickable=!1,this._clickListenersDisposableStore=new t.DisposableStore,this._onDidClick=this._register(new D.Emitter),this._linkListenersDisposableStore=new t.DisposableStore,this._onLinkClick=this._register(new D.Emitter),this._infoBoxElement=document.createElement("div"),this._imageElement=document.createElement("div"),this._imageElement.setAttribute("role","image"),this._textElement=document.createElement("div"),this._textElement.classList.add("infobox-text"),s.appendChild(this._infoBoxElement),this._infoBoxElement.appendChild(this._imageElement),this._infoBoxElement.appendChild(this._textElement),this._clickableIndicator=b.$("a"),this._clickableIndicator.classList.add("infobox-clickable-arrow",...S.ThemeIcon.asClassNameArray(T.Codicon.arrowRight)),this._infoBoxElement.appendChild(this._clickableIndicator),u&&(this.infoBoxStyle=u.style,this.links=u.links,this.text=u.text,this._announceText=u.announceText===!0,this.isClickable=u.isClickable===!0,this.clickableButtonAriaLabel=u.clickableButtonAriaLabel),this.updateClickableState()}get announceText(){return this._announceText}set announceText(s){this._announceText=s}get infoBoxStyle(){return this._infoBoxStyle}set infoBoxStyle(s){this._infoBoxStyle=s,this._infoBoxElement.classList.remove(...this._infoBoxElement.classList),this._imageElement.classList.remove(...this._imageElement.classList),this._imageElement.setAttribute("aria-label",s),this._infoBoxElement.classList.add("infobox-container",s),this._imageElement.classList.add("infobox-image",s),this.updateStyle()}get links(){return this._links}set links(s){this._links=s??[],this.createTextWithHyperlinks()}get text(){return this._text}set text(s){this._text!==s&&(this._text=s,this.createTextWithHyperlinks())}createTextWithHyperlinks(){let s=this._text;b.clearNode(this._textElement),this._linkListenersDisposableStore.clear();for(let o=0;o<this._links.length;o++){const u=s.indexOf(`{${o}}`);if(u<0){this._logService.warn(`Could not find placeholder text {${o}} in text '${s}'. Link: ${JSON.stringify(this._links[o])}`);continue}if(s.slice(0,u)){const l=b.$("span");l.innerText=s.slice(0,u),this._textElement.appendChild(l)}const p=this._links[o],c=this._register(this.instantiationService.createInstance(a.Link,this._textElement,{label:p.text,href:p.url===""?" ":p.url},void 0)).el;p.accessibilityInformation&&(c.setAttribute("aria-label",p.accessibilityInformation.label),p.accessibilityInformation.role&&c.setAttribute("role",p.accessibilityInformation.role)),this._linkListenersDisposableStore.add(b.addDisposableListener(c,b.EventType.CLICK,l=>{this._onLinkClick.fire({index:o,link:p}),p.url&&this.openLink(p.url),l.stopPropagation()})),this._linkListenersDisposableStore.add(b.addDisposableListener(c,b.EventType.KEY_PRESS,l=>{const n=new f.StandardKeyboardEvent(l);this._isClickable&&(n.equals(3)||!n.equals(10))&&(this._onLinkClick.fire({index:o,link:p}),p.url&&this.openLink(p.url),l.stopPropagation())})),this._textElement.appendChild(c),s=s.slice(u+3)}if(s){const o=b.$("span");o.innerText=s,this._textElement.appendChild(o)}this.announceText&&(this.infoBoxStyle==="warning"||this.infoBoxStyle==="error"?(0,y.alert)(s):(0,y.status)(s))}openLink(s){this._openerService.open(s)}get isClickable(){return this._isClickable}set isClickable(s){this._isClickable!==s&&(this._isClickable=s,this.updateClickableState())}registerClickListeners(){this._clickListenersDisposableStore.add(b.addDisposableListener(this._infoBoxElement,b.EventType.CLICK,s=>{this._isClickable&&this._onDidClick.fire()})),this._clickListenersDisposableStore.add(b.addDisposableListener(this._infoBoxElement,b.EventType.KEY_PRESS,s=>{const o=new f.StandardKeyboardEvent(s);if(this._isClickable&&(o.equals(3)||!o.equals(10))){this._onDidClick.fire(),b.EventHelper.stop(s);return}}))}unregisterClickListeners(){this._clickListenersDisposableStore.clear()}get clickableButtonAriaLabel(){return this._clickableButtonAriaLabel}set clickableButtonAriaLabel(s){this._clickableButtonAriaLabel=s,this._clickableIndicator.ariaLabel=this._clickableButtonAriaLabel,this._clickableIndicator.title=this._clickableButtonAriaLabel}updateStyle(){let s;switch(this.infoBoxStyle){case"error":s=this._styles.errorBackground;break;case"warning":s=this._styles.warningBackground;break;case"success":s=this._styles.successBackground;break;default:s=this._styles.informationBackground;break}this._infoBoxElement.style.backgroundColor=s}updateClickableState(){this._isClickable?(this._clickableIndicator.style.display="",this._clickableIndicator.tabIndex=0,this._infoBoxElement.style.cursor="pointer",this._infoBoxElement.setAttribute("role","button"),this._textElement.style.maxWidth="calc(100% - 75px)",this.registerClickListeners()):(this._clickableIndicator.style.display="none",this._clickableIndicator.tabIndex=-1,this._infoBoxElement.style.cursor="default",this._infoBoxElement.removeAttribute("role"),this._textElement.style.maxWidth="",this.unregisterClickListeners())}};e.InfoBox=r,e.InfoBox=r=fe([O(3,v.IOpenerService),O(4,m.ILogService),O(5,h.IInstantiationService)],r)}),define(Q[694],Y([1,0,6,83,4,5]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullPolicyService=e.AbstractPolicyService=e.IPolicyService=void 0,e.IPolicyService=(0,D.createDecorator)("policy");class T extends b.Disposable{constructor(){super(...arguments),this.policyDefinitions={},this.policies=new Map,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event}async updatePolicyDefinitions(m){const S=Object.keys(this.policyDefinitions).length;return this.policyDefinitions={...m,...this.policyDefinitions},S!==Object.keys(this.policyDefinitions).length&&await this._updatePolicyDefinitions(m),y.Iterable.reduce(this.policies.entries(),(h,[a,r])=>({...h,[a]:r}),{})}getPolicyValue(m){return this.policies.get(m)}serialize(){return y.Iterable.reduce(Object.entries(this.policyDefinitions),(m,[S,h])=>({...m,[S]:{definition:h,value:this.policies.get(S)}}),{})}}e.AbstractPolicyService=T;class f{constructor(){this.onDidChange=t.Event.None}async updatePolicyDefinitions(){return{}}getPolicyValue(){}serialize(){}}e.NullPolicyService=f}),define(Q[3220],Y([1,0,6,4,694]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolicyChannelClient=e.PolicyChannel=void 0;class D{constructor(v){this.service=v,this.disposables=new y.DisposableStore}listen(v,m){switch(m){case"onDidChange":return t.Event.map(this.service.onDidChange,S=>S.reduce((h,a)=>({...h,[a]:this.service.getPolicyValue(a)??null}),{}),this.disposables)}throw new Error(`Event not found: ${m}`)}call(v,m,S){switch(m){case"updatePolicyDefinitions":return this.service.updatePolicyDefinitions(S)}throw new Error(`Call not found: ${m}`)}dispose(){this.disposables.dispose()}}e.PolicyChannel=D;class T extends b.AbstractPolicyService{constructor(v,m){super(),this.channel=m;for(const S in v){const{definition:h,value:a}=v[S];this.policyDefinitions[S]=h,a!==void 0&&this.policies.set(S,a)}this.channel.listen("onDidChange")(S=>{for(const h in S){const a=S[h];a===null?this.policies.delete(h):this.policies.set(h,a)}this._onDidChange.fire(Object.keys(S))})}async _updatePolicyDefinitions(v){const m=await this.channel.call("updatePolicyDefinitions",v);for(const S in m)this.policies.set(S,m[S])}}e.PolicyChannelClient=T}),define(Q[286],Y([1,0,18,261]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let b;if(typeof t.globals.vscode<"u"&&typeof t.globals.vscode.context<"u"){const D=t.globals.vscode.context.configuration();if(D)b=D.product;else throw new Error("Sandbox: unable to resolve product configuration from preload script.")}else if(globalThis._VSCODE_PRODUCT_JSON&&globalThis._VSCODE_PACKAGE_JSON){if(b=globalThis._VSCODE_PRODUCT_JSON,y.env.VSCODE_DEV&&Object.assign(b,{nameShort:`${b.nameShort} Dev`,nameLong:`${b.nameLong} Dev`,dataFolderName:`${b.dataFolderName}-dev`,serverDataFolderName:b.serverDataFolderName?`${b.serverDataFolderName}-dev`:void 0}),!b.version){const D=globalThis._VSCODE_PACKAGE_JSON;Object.assign(b,{version:D.version})}}else b={},Object.keys(b).length===0&&Object.assign(b,{version:"1.78.0-dev",nameShort:"Azure Data Studio Dev",nameLong:"Azure Data Studio Dev",applicationName:"azuredatastudio-oss",dataFolderName:"azuredatastudio-oss",urlProtocol:"azuredatastudio-oss",reportIssueUrl:"https://github.com/microsoft/azuredatastudio/issues/new",licenseName:"MIT",licenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt",serverLicenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt"});e.default=b}),define(Q[52],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.productSchemaId=e.IProductService=void 0,e.IProductService=(0,t.createDecorator)("productService"),e.productSchemaId="vscode://schemas/vscode-product"}),define(Q[695],Y([1,0,55,5]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=e.IV8InspectProfilingService=void 0,e.IV8InspectProfilingService=(0,y.createDecorator)("IV8InspectProfilingService");var b;(function(D){function T(v){return!!(v.samples&&v.timeDeltas)}D.isValidProfile=T;function f(v,m="noAbsolutePaths"){for(const S of v.nodes)S.callFrame&&S.callFrame.url&&((0,t.isAbsolute)(S.callFrame.url)||/^\w[\w\d+.-]*:\/\/\/?/.test(S.callFrame.url))&&(S.callFrame.url=(0,t.join)(m,(0,t.basename)(S.callFrame.url)));return v}D.rewriteAbsolutePaths=f})(b||(e.Utils=b={}))}),define(Q[3221],Y([1,0,15]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reportSample=void 0;function y(D,T,f,v){const{sample:m,perfBaseline:S,source:h}=D;T.publicLog2("unresponsive.sample",{perfBaseline:S,selfTime:m.selfTime,totalTime:m.totalTime,percentage:m.percentage,functionName:m.location,callers:m.caller.map(r=>r.location).join("<"),callersAnnotated:m.caller.map(r=>`${r.percentage}|${r.location}`).join("<"),source:h});const a=new b(D);v?t.errorHandler.onUnexpectedError(a):f.error(a)}e.reportSample=y;class b extends Error{constructor(T){super(`PerfSampleError: by ${T.source} in ${T.sample.location}`),this.name="PerfSampleError",this.selfTime=T.sample.selfTime;const f=[T.sample.absLocation,...T.sample.caller.map(v=>v.absLocation)];this.stack=` at ${f.join(` at `)}`}}}),define(Q[3222],Y([1,0,153,695]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSharedProcessRemoteService)(y.IV8InspectProfilingService,"v8InspectProfiling")}),define(Q[72],Y([1,0,14,31,4,5]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorProgressService=e.LongRunningOperation=e.UnmanagedProgress=e.Progress=e.emptyProgressRunner=e.ProgressLocation=e.IProgressService=void 0,e.IProgressService=(0,D.createDecorator)("progressService");var T;(function(S){S[S.Explorer=1]="Explorer",S[S.Scm=3]="Scm",S[S.Extensions=5]="Extensions",S[S.Window=10]="Window",S[S.Notification=15]="Notification",S[S.Dialog=20]="Dialog"})(T||(e.ProgressLocation=T={})),e.emptyProgressRunner=Object.freeze({total(){},worked(){},done(){}});class f{static{this.None=Object.freeze({report(){}})}get value(){return this._value}constructor(h,a){this.callback=h,this.report=a?.async?this._reportAsync.bind(this):this._reportSync.bind(this)}_reportSync(h){this._value=h,this.callback(this._value)}_reportAsync(h){Promise.resolve(this._lastTask).finally(()=>{this._value=h;const a=this.callback(this._value);this._lastTask=Promise.resolve(a).finally(()=>this._lastTask=void 0)})}}e.Progress=f;let v=class extends b.Disposable{constructor(h,a){super(),this.deferred=new t.DeferredPromise,a.withProgress(h,r=>(this.reporter=r,this.lastStep&&r.report(this.lastStep),this.deferred.p)),this._register((0,b.toDisposable)(()=>this.deferred.complete()))}report(h){this.reporter?this.reporter.report(h):this.lastStep=h}};e.UnmanagedProgress=v,e.UnmanagedProgress=v=fe([O(1,e.IProgressService)],v);class m extends b.Disposable{constructor(h){super(),this.progressIndicator=h,this.currentOperationId=0,this.currentOperationDisposables=this._register(new b.DisposableStore)}start(h){this.stop();const a=++this.currentOperationId,r=new y.CancellationTokenSource;return this.currentProgressTimeout=setTimeout(()=>{a===this.currentOperationId&&(this.currentProgressRunner=this.progressIndicator.show(!0))},h),this.currentOperationDisposables.add((0,b.toDisposable)(()=>clearTimeout(this.currentProgressTimeout))),this.currentOperationDisposables.add((0,b.toDisposable)(()=>r.cancel())),this.currentOperationDisposables.add((0,b.toDisposable)(()=>this.currentProgressRunner?this.currentProgressRunner.done():void 0)),{id:a,token:r.token,stop:()=>this.doStop(a),isCurrent:()=>this.currentOperationId===a}}stop(){this.doStop(this.currentOperationId)}doStop(h){this.currentOperationId===h&&this.currentOperationDisposables.clear()}}e.LongRunningOperation=m,e.IEditorProgressService=(0,D.createDecorator)("editorProgressService")}),define(Q[347],Y([1,0,14,31,4,17]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PickerQuickAccessProvider=e.TriggerAction=void 0;var T;(function(S){S[S.NO_ACTION=0]="NO_ACTION",S[S.CLOSE_PICKER=1]="CLOSE_PICKER",S[S.REFRESH_PICKER=2]="REFRESH_PICKER",S[S.REMOVE_ITEM=3]="REMOVE_ITEM"})(T||(e.TriggerAction=T={}));function f(S){const h=S;return Array.isArray(h.items)}function v(S){const h=S;return!!h.picks&&(0,t.isThenable)(h.additionalPicks)}class m extends b.Disposable{constructor(h,a){super(),this.prefix=h,this.options=a}provide(h,a,r){const i=new b.DisposableStore;h.canAcceptInBackground=!!this.options?.canAcceptInBackground,h.matchOnLabel=h.matchOnDescription=h.matchOnDetail=h.sortByLabel=!1;let s;const o=i.add(new b.MutableDisposable),u=async()=>{const d=o.value=new b.DisposableStore;s?.dispose(!0),h.busy=!1,s=new y.CancellationTokenSource(a);const p=s.token,c=h.value.substr(this.prefix.length).trim(),l=this._getPicks(c,d,p,r),n=(w,E)=>{let C,I;if(f(w)?(C=w.items,I=w.active):C=w,C.length===0){if(E)return!1;(c.length>0||h.hideInput)&&this.options?.noResultsPick&&((0,D.isFunction)(this.options.noResultsPick)?C=[this.options.noResultsPick(c)]:C=[this.options.noResultsPick])}return h.items=C,I&&(h.activeItems=[I]),!0},g=async w=>{let E=!1,C=!1;await Promise.all([(async()=>{typeof w.mergeDelay=="number"&&(await(0,t.timeout)(w.mergeDelay),p.isCancellationRequested)||C||(E=n(w.picks,!0))})(),(async()=>{h.busy=!0;try{const I=await w.additionalPicks;if(p.isCancellationRequested)return;let _,A;f(w.picks)?(_=w.picks.items,A=w.picks.active):_=w.picks;let k,L;if(f(I)?(k=I.items,L=I.active):k=I,k.length>0||!E){let R;if(!A&&!L){const M=h.activeItems[0];M&&_.indexOf(M)!==-1&&(R=M)}n({items:[..._,...k],active:A||L||R})}}finally{p.isCancellationRequested||(h.busy=!1),C=!0}})()])};if(l!==null)if(v(l))await g(l);else if(!(0,t.isThenable)(l))n(l);else{h.busy=!0;try{const w=await l;if(p.isCancellationRequested)return;v(w)?await g(w):n(w)}finally{p.isCancellationRequested||(h.busy=!1)}}};return i.add(h.onDidChangeValue(()=>u())),u(),i.add(h.onDidAccept(d=>{const[p]=h.selectedItems;typeof p?.accept=="function"&&(d.inBackground||h.hide(),p.accept(h.keyMods,d))})),i.add(h.onDidTriggerItemButton(async({button:d,item:p})=>{if(typeof p.trigger=="function"){const c=p.buttons?.indexOf(d)??-1;if(c>=0){const l=p.trigger(c,h.keyMods),n=typeof l=="number"?l:await l;if(a.isCancellationRequested)return;switch(n){case T.NO_ACTION:break;case T.CLOSE_PICKER:h.hide();break;case T.REFRESH_PICKER:u();break;case T.REMOVE_ITEM:{const g=h.items.indexOf(p);if(g!==-1){const w=h.items.slice(),E=w.splice(g,1),C=h.activeItems.filter(_=>_!==E[0]),I=h.keepScrollPosition;h.keepScrollPosition=!0,h.items=w,C&&(h.activeItems=C),h.keepScrollPosition=I}break}}}}})),i}}e.PickerQuickAccessProvider=m}),define(Q[3223],Y([1,0,7,67,129,498,4,63,656]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputBox=void 0;const v=t.$;class m extends T.Disposable{constructor(h,a,r){super(),this.parent=h,this.onKeyDown=s=>t.addDisposableListener(this.findInput.inputBox.inputElement,t.EventType.KEY_DOWN,o=>{s(new y.StandardKeyboardEvent(o))}),this.onMouseDown=s=>t.addDisposableListener(this.findInput.inputBox.inputElement,t.EventType.MOUSE_DOWN,o=>{s(new b.StandardMouseEvent(o))}),this.onDidChange=s=>this.findInput.onDidChange(s),this.container=t.append(this.parent,v(".quick-input-box")),this.findInput=this._register(new D.FindInput(this.container,void 0,{label:"",inputBoxStyles:a,toggleStyles:r}));const i=this.findInput.inputBox.inputElement;i.role="combobox",i.ariaHasPopup="menu",i.ariaAutoComplete="list",i.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(h){this.findInput.setValue(h)}select(h=null){this.findInput.inputBox.select(h)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}setPlaceholder(h){this.findInput.inputBox.setPlaceHolder(h)}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(h){this.findInput.inputBox.setPlaceHolder(h)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(h){this.findInput.inputBox.inputElement.type=h?"password":"text"}set enabled(h){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!h)}set toggles(h){this.findInput.setAdditionalToggles(h)}hasFocus(){return this.findInput.inputBox.hasFocus()}setAttribute(h,a){this.findInput.inputBox.inputElement.setAttribute(h,a)}removeAttribute(h){this.findInput.inputBox.inputElement.removeAttribute(h)}showDecoration(h){h===f.default.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:h===f.default.Info?1:h===f.default.Warning?2:3,content:""})}stylesForType(h){return this.findInput.inputBox.stylesForType(h===f.default.Info?1:h===f.default.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}e.QuickInputBox=m}),define(Q[1165],Y([1,0,7,227,6,67,151,169,320,436,2479,656]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderQuickInputDescription=e.getIconClass=void 0;const h={},a=new v.IdGenerator("quick-input-button-icon-");function r(s){if(!s)return;let o;const u=s.dark.toString();return h[u]?o=h[u]:(o=a.nextId(),t.createCSSRule(`.${o}, .hc-light .${o}`,`background-image: ${t.asCSSUrl(s.light||s.dark)}`),t.createCSSRule(`.vs-dark .${o}, .hc-black .${o}`,`background-image: ${t.asCSSUrl(s.dark)}`),h[u]=o),o}e.getIconClass=r;function i(s,o,u){t.reset(o);const d=(0,m.parseLinkedText)(s);let p=0;for(const c of d.nodes)if(typeof c=="string")o.append(...(0,f.renderLabelWithIcons)(c));else{let l=c.title;!l&&c.href.startsWith("command:")?l=(0,S.localize)(0,null,c.href.substring(8)):l||(l=c.href);const n=t.$("a",{href:c.href,title:l,tabIndex:p++},c.label);n.style.textDecoration="underline";const g=_=>{t.isEventLike(_)&&t.EventHelper.stop(_,!0),u.callback(c.href)},w=u.disposables.add(new y.DomEmitter(n,t.EventType.CLICK)).event,E=u.disposables.add(new y.DomEmitter(n,t.EventType.KEY_DOWN)).event,C=u.disposables.add(b.Event.chain(E)).filter(_=>{const A=new D.StandardKeyboardEvent(_);return A.equals(10)||A.equals(3)}).event;u.disposables.add(T.Gesture.addTarget(n));const I=u.disposables.add(new y.DomEmitter(n,T.EventType.Tap)).event;b.Event.any(w,I,C)(g,null,u.disposables),o.appendChild(n)}}e.renderQuickInputDescription=i}),define(Q[1166],Y([1,0,32,2480,37]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showWithPinnedItems=void 0;const D=b.ThemeIcon.asClassName(t.Codicon.pin),T=b.ThemeIcon.asClassName(t.Codicon.pinned),f=[D,T];async function v(s,o,u,d){const p=u.items;let c=m(o,u,s,void 0,d);u.onDidTriggerItemButton(async l=>{l.button.iconClass&&f.includes(l.button.iconClass)&&(u.items=p,c=m(o,u,s,l.item,d),u.items=u.value?p:c)}),u.onDidChangeValue(async l=>{u.items===c&&l?u.items=p:u.items===p&&!l&&(u.items=c)}),u.items=u.value?p:c,u.show()}e.showWithPinnedItems=v;function m(s,o,u,d,p){const c=[];let l;d?l=r(s,d,u):l=i(s,u),l.length&&c.push({type:"separator",label:(0,y.localize)(0,null)});const n=new Set;for(const g of l){const w=o.items.find(E=>a(E,g));if(w){const E=S(w),C=Object.assign({},w);(!p||!n.has(E))&&(n.add(E),h(C,!1),c.push(C))}}for(const g of o.items)h(g,!0),c.push(g);return c}function S(s){return s.type==="separator"?"":s.id||`${s.label}${s.description}${s.detail}}`}function h(s,o){if(s.type==="separator")return;const u=s.buttons?.filter(d=>d.iconClass&&!f.includes(d.iconClass))??[];u.unshift({iconClass:o?D:T,tooltip:o?(0,y.localize)(1,null):(0,y.localize)(2,null),alwaysVisible:!1}),s.buttons=u}function a(s,o){return S(s)===S(o)}function r(s,o,u){const d=o.buttons?.find(c=>c.iconClass===T);let p=i(s,u);return d?p=p.filter(c=>S(c)!==S(o)):p.push(o),u.store(s,JSON.stringify(p),1,1),p}function i(s,o){const u=o.get(s,1);return u?JSON.parse(u):[]}}),define(Q[43],Y([1,0,5,22]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IQuickInputService=e.quickPickItemScorerAccessor=e.QuickPickItemScorerAccessor=e.ItemActivation=e.QuickInputHideReason=e.NO_KEY_MODS=void 0,e.NO_KEY_MODS={ctrlCmd:!1,alt:!1};var b;(function(f){f[f.Blur=1]="Blur",f[f.Gesture=2]="Gesture",f[f.Other=3]="Other"})(b||(e.QuickInputHideReason=b={}));var D;(function(f){f[f.NONE=0]="NONE",f[f.FIRST=1]="FIRST",f[f.SECOND=2]="SECOND",f[f.LAST=3]="LAST"})(D||(e.ItemActivation=D={}));class T{constructor(v){this.options=v}getItemLabel(v){return v.label}getItemDescription(v){if(!this.options?.skipDescription)return v.description}getItemPath(v){if(!this.options?.skipPath)return v.resource?.scheme===y.Schemas.file?v.resource.fsPath:v.resource?.path}}e.QuickPickItemScorerAccessor=T,e.quickPickItemScorerAccessor=new T,e.IQuickInputService=(0,t.createDecorator)("quickInputService")}),define(Q[3224],Y([1,0,2083,7,40,218,407,144,409,408,307,5,29,410,28,185,284,38,43,76,1047]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookHistoryComponent=e.GridSection=e.DASHBOARD_SELECTOR=void 0,e.DASHBOARD_SELECTOR="notebookhistory-component";class l{}e.GridSection=l;let n=class extends r.JobManagementView{static{c=this}static{this.HEADING_HEIGHT=24}constructor(w,E,C,I,_,A,k,L,R,M,N){super(E,R,_,L,I,C),this._cd=w,this.instantiationService=I,this._jobManagementService=A,this._commandService=k,this._telemetryService=M,this._quickInputService=N,this.agentNotebookInfo=void 0,this.agentJobHistories=void 0,this.notebookHistories=void 0,this.agentNotebookHistoryInfo=void 0,this._stepRows=[],this._showSteps=void 0,this._showPreviousRuns=void 0,this._noJobsAvailable=!1,this._grids=[];let P=this._jobManagementService.notebookCacheObjectMap;this._serverName=E.connectionManagementService.connectionInfo.connectionProfile.serverName;let x=P[this._serverName];x?this._notebookCacheObject=x:(this._notebookCacheObject=new m.NotebookCacheObject,this._notebookCacheObject.serverName=this._serverName,this._jobManagementService.addToCache(this._serverName,this._notebookCacheObject))}ngOnInit(){this._visibilityElement=this._tableContainer,this._parentComponent=this._agentViewComponent,this._agentNotebookInfo=this._agentViewComponent.agentNotebookInfo,this.initActionBar(),this._telemetryService.sendViewEvent("AgentNotebookHistory")}loadHistory(){const w=this;let E=this._commonService.connectionManagementService.connectionInfo.ownerUri,C=this._agentViewComponent.agentNotebookInfo.name,I=this._agentViewComponent.notebookId,_=this._agentViewComponent.agentNotebookInfo.targetDatabase;this._jobManagementService.getNotebookHistory(E,I,C,_).then(A=>{A&&A.histories?(this.notebookHistories=A.histories,w._notebookCacheObject.setNotebookHistory(I,this.notebookHistories),w._notebookCacheObject.setJobSchedules(I,A.schedules),w._notebookCacheObject.setJobSteps(I,A.steps),this._agentViewComponent.agentNotebookInfo.jobSteps=this._notebookCacheObject.getJobSteps(I),this._agentViewComponent.agentNotebookInfo.jobSchedules=this._notebookCacheObject.getJobSchedules(I),this._agentNotebookInfo=this._agentViewComponent.agentNotebookInfo,A.histories.length>0?(w._noJobsAvailable=!1,w._showPreviousRuns=!0):(w._notebookCacheObject.setNotebookHistory(w._agentViewComponent.notebookId,A.histories),w._noJobsAvailable=!0,w._showPreviousRuns=!1)):(w._noJobsAvailable=!0,w._showPreviousRuns=!1,w._showSteps=!1),this._actionBar.context={targetObject:{canEdit:!0,notebook:this._agentNotebookInfo,job:this._agentNotebookInfo},ownerUri:this.ownerUri,component:this},this._editNotebookJobAction.enabled=!0,this._actionBar.setContent([{action:this._runJobAction},{action:this._stopJobAction},{action:this._refreshAction},{action:this._editNotebookJobAction},{action:this._openNotebookTemplateAction}]),this.createGrid(),w._agentViewComponent.showNotebookHistory&&(w._cd.detectChanges(),this.collapseGrid())})}toggleCollapse(){let w=jQuery(".resultsViewCollapsible").get(0),E=document.getElementById("accordion");w.className==="resultsViewCollapsible"&&E.checked===!1?w.className="resultsViewCollapsible collapsed":w.className==="resultsViewCollapsible collapsed"&&E.checked===!0&&(w.className="resultsViewCollapsible")}toggleGridCollapse(w){let E=document.getElementById("notebook-grid"+w),C=document.getElementById("accordion"+w),I=document.getElementById("history-grid-icon"+w);E.className==="notebook-grid "+w&&C.checked===!0?(E.className="notebook-grid "+w+" collapsed",E.style.display="none",I.className="resultsViewCollapsible collapsed"):E.className==="notebook-grid "+w+" collapsed"&&C.checked===!1&&(E.className="notebook-grid "+w,E.style.display="grid",I.className="resultsViewCollapsible")}goToJobs(){this._agentViewComponent.showNotebookHistory=!1}formatDateTimetoLocaleDate(w){return new Date(w).toLocaleDateString()}formatDateTimetoLocaleTime(w){return new Date(w).toLocaleTimeString()}showProgressWheel(){return this._showPreviousRuns!==!0&&this._noJobsAvailable===!1}onFirstVisible(){if(this._agentNotebookInfo=this._agentViewComponent.agentNotebookInfo,this.agentNotebookInfo||(this.agentNotebookInfo=this._agentNotebookInfo),this.isRefreshing){this.loadHistory();return}else this.createGrid();let w=this._notebookCacheObject.notebookHistories[this._agentViewComponent.notebookId];w?(w.length>0?(this._noJobsAvailable=!1,(this._notebookCacheObject.prevJobID===this._agentViewComponent.notebookId||w[0].jobId===this._agentViewComponent.notebookId)&&(this._showPreviousRuns=!0,this._agentViewComponent.agentNotebookInfo.jobSteps=this._notebookCacheObject.getJobSteps(this._agentNotebookInfo.jobId),this._agentViewComponent.agentNotebookInfo.jobSchedules=this._notebookCacheObject.getJobSchedules(this._agentNotebookInfo.jobId),this._agentNotebookInfo=this._agentViewComponent.agentNotebookInfo)):w.length===0&&(this._showPreviousRuns=!1,this._showSteps=!1,this._noJobsAvailable=!0),this._editNotebookJobAction.enabled=!0,this._actionBar.setContent([{action:this._runJobAction},{action:this._stopJobAction},{action:this._refreshAction},{action:this._editNotebookJobAction},{action:this._openNotebookTemplateAction}]),this._cd.detectChanges(),this.collapseGrid()):this.loadHistory(),this._notebookCacheObject.prevJobID=this._agentViewComponent.notebookId}layout(){let w=jQuery(".overview-container").get(0),E=jQuery(".part.statusbar").get(0);if(w&&E){let C=w.getBoundingClientRect().bottom,_=E.getBoundingClientRect().top-C-c.HEADING_HEIGHT;this._table&&this._table.layout(new y.Dimension(y.getContentWidth(this._tableContainer.nativeElement),_))}}initActionBar(){this._runJobAction=this.instantiationService.createInstance(v.RunJobAction),this._stopJobAction=this.instantiationService.createInstance(v.StopJobAction),this._editNotebookJobAction=this.instantiationService.createInstance(v.EditNotebookJobAction),this._refreshAction=this.instantiationService.createInstance(v.JobsRefreshAction),this._openNotebookTemplateAction=this.instantiationService.createInstance(v.OpenTemplateNotebookAction);let w=this.actionBarContainer.nativeElement;this._actionBar=new D.Taskbar(w),this._editNotebookJobAction.enabled=!this.showProgressWheel();let E={canEdit:!this.showProgressWheel(),job:this._agentNotebookInfo};this._actionBar.context={targetObject:E,ownerUri:this.ownerUri,component:this},this._actionBar.setContent([{action:this._runJobAction},{action:this._stopJobAction},{action:this._refreshAction},{action:this._editNotebookJobAction},{action:this._openNotebookTemplateAction}])}openNotebook(w){if(w.runStatus===0)return;let E=this._commonService.connectionManagementService.connectionInfo.ownerUri,C=this._agentViewComponent.agentNotebookInfo.targetDatabase;this._jobManagementService.getMaterialziedNotebook(E,C,w.materializedNotebookId).then(async I=>{if(I){let _=/:|-/gi,A=w.runDate.replace(_,"").replace(" ",""),k=this._agentViewComponent.agentNotebookInfo.name+"_"+A;await this._commandService.executeCommand("agent.openNotebookEditorFromJsonString",k,I.notebookMaterialized)}})}deleteMaterializedNotebook(w){let E=this._commonService.connectionManagementService.connectionInfo.ownerUri,C=this._agentViewComponent.agentNotebookInfo.targetDatabase;this._jobManagementService.deleteMaterializedNotebook(E,w,C).then(async I=>{I&&this.loadHistory()})}openTemplateNotebook(){let w=this._commonService.connectionManagementService.connectionInfo.ownerUri,E=this._agentViewComponent.agentNotebookInfo.targetDatabase,C=this._agentViewComponent.agentNotebookInfo.jobId;this._jobManagementService.getTemplateNotebook(w,E,C).then(async I=>{I&&await this._commandService.executeCommand("agent.openNotebookEditorFromJsonString",this._agentViewComponent.agentNotebookInfo.name,I.notebookTemplate,this.agentNotebookInfo,w)})}renameNotebook(w){const E=new Date(w.runDate).toLocaleDateString()+" "+new Date(w.runDate).toLocaleTimeString();let C=w.materializedNotebookName===""?E:w.materializedNotebookName,I=this._commonService.connectionManagementService.connectionInfo.ownerUri,_=this._agentViewComponent.agentNotebookInfo.targetDatabase;this._quickInputService.input({placeHolder:C}).then(async A=>{A&&(/\S/.test(A)||(A=""),await this._jobManagementService.updateNotebookMaterializedName(I,w,_,A).then(async k=>{k&&(w.materializedNotebookName=A,this.loadHistory())}))})}toggleNotebookPin(w,E){let C=this._commonService.connectionManagementService.connectionInfo.ownerUri,I=this._agentViewComponent.agentNotebookInfo.targetDatabase;this._jobManagementService.updateNotebookMaterializedPin(C,w,I,E).then(async _=>{_&&(w.materializedNotebookPin=E,this.loadHistory())})}openHistoryContextMenu(w,E,C){let I={x:w.clientX,y:w.clientY},_={component:this,history:E};this._contextMenuService.showContextMenu({getAnchor:()=>I,getActions:()=>C===1?this.getPinnedGridActions():this.getGridActions(),getKeyBinding:A=>this._keybindingFor(A),getActionsContext:()=>_})}getGridActions(){const w=this._instantiationService.createInstance(v.OpenMaterializedNotebookAction),E=this._instantiationService.createInstance(v.RenameNotebookMaterializedAction),C=this._instantiationService.createInstance(v.PinNotebookMaterializedAction),I=this._instantiationService.createInstance(v.DeleteMaterializedNotebookAction);return[w,E,C,I]}getPinnedGridActions(){const w=this._instantiationService.createInstance(v.OpenMaterializedNotebookAction),E=this._instantiationService.createInstance(v.RenameNotebookMaterializedAction),C=this._instantiationService.createInstance(v.UnpinNotebookMaterializedAction),I=this._instantiationService.createInstance(v.DeleteMaterializedNotebookAction);return[w,E,C,I]}createdTooltip(w){let E="";w.materializedNotebookName&&w.materializedNotebookName!==""&&(E=w.materializedNotebookName);let C={weekday:"long",year:"numeric",month:"long",day:"numeric"};return E+=` `+t.localize(0,null)+new Date(w.runDate).toLocaleDateString(void 0,C),w.materializedNotebookErrorInfo&&/\S/.test(w.materializedNotebookErrorInfo)&&(E+=` `+t.localize(1,null)+w.materializedNotebookErrorInfo),w.runStatus===0&&w.message&&/\S/.test(w.message)&&(E+=` `+t.localize(2,null)+w.message),E}createGrid(){let w=this._notebookCacheObject.getNotebookHistory(this._agentViewComponent.notebookId);w=w.sort((_,A)=>new Date(A.runDate).getTime()-new Date(_.runDate).getTime()),this._grids=[];let E=[];for(let _=0;_<w.length;_++)w[_].materializedNotebookPin&&E.push(w[_]);this._grids.push({title:t.localize(3,null),histories:E,contextMenuType:1,style:"grid"}),E=[];let C=0,I=0;for(;I<w.length&&(!w[I].materializedNotebookPin&&C<10&&(E.push(w[I]),C++),C!==10);I++);for(this._grids.push({title:t.localize(4,null),histories:E,contextMenuType:0,style:"grid"}),E=[],I+=1;I<w.length;I++)w[I].materializedNotebookPin||E.push(w[I]);this._grids.push({title:t.localize(5,null),histories:E,contextMenuType:0,style:"none"})}collapseGrid(){for(let w=0;w<this._grids.length;w++){let E=document.getElementById("notebook-grid"+w),C=document.getElementById("history-grid-icon"+w);if(E){let I=document.getElementById("accordion"+w);this._grids[w].style==="none"?(E.className="notebook-grid "+w+" collapsed",C.className="resultsViewCollapsible collapsed",E.style.display="none",I.checked=!0):(E.className="notebook-grid "+w,E.style.display="grid",C.className="resultsViewCollapsible",I.checked=!1)}}}refreshJobs(){this._agentViewComponent.refresh=!0,this.loadHistory()}get showSteps(){return this._showSteps}get stepRows(){return this._stepRows}get ownerUri(){return this._commonService.connectionManagementService.connectionInfo.ownerUri}get serverName(){return this._serverName}set showSteps(w){this._showSteps=w,this._cd.detectChanges()}};e.NotebookHistoryComponent=n,fe([(0,b.ViewChild)("table")],n.prototype,"_tableContainer",void 0),fe([(0,b.Input)()],n.prototype,"agentNotebookInfo",void 0),fe([(0,b.Input)()],n.prototype,"agentJobHistories",void 0),e.NotebookHistoryComponent=n=c=fe([(0,b.Component)({selector:e.DASHBOARD_SELECTOR,templateUrl:decodeURI(q.toUrl("./notebookHistory.component.html")),providers:[{provide:s.TabChild,useExisting:(0,b.forwardRef)(()=>n)}],changeDetection:b.ChangeDetectionStrategy.OnPush}),(0,b.Injectable)(),O(0,(0,b.Inject)((0,b.forwardRef)(()=>b.ChangeDetectorRef))),O(1,(0,b.Inject)((0,b.forwardRef)(()=>f.CommonServiceInterface))),O(2,(0,b.Inject)((0,b.forwardRef)(()=>T.AgentViewComponent))),O(3,(0,b.Inject)(h.IInstantiationService)),O(4,(0,b.Inject)(a.IContextMenuService)),O(5,(0,b.Inject)(S.IJobManagementService)),O(6,(0,b.Inject)(i.ICommandService)),O(7,(0,b.Inject)(u.IKeybindingService)),O(8,(0,b.Inject)(o.IDashboardService)),O(9,(0,b.Inject)(p.IAdsTelemetryService)),O(10,(0,b.Inject)(d.IQuickInputService))],n)}),define(Q[16],Y([1,0,214,17]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class b{constructor(){this.data=new Map}add(T,f){t.ok(y.isString(T)),t.ok(y.isObject(f)),t.ok(!this.data.has(T),"There is already an extension with this id"),this.data.set(T,f)}knows(T){return this.data.has(T)}as(T){return this.data.get(T)||null}}e.Registry=new b}),define(Q[230],Y([1,0,16,1944,141]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setWidgetAutoRefreshState=e.getWidgetAutoRefreshState=e.registerInsight=e.Extensions=void 0,e.Extensions={InsightContribution:"dashboard.contributions.insights"};class D{constructor(){this._insightSchema={type:"object",description:y.localize(0,null),properties:{},additionalProperties:!1},this._extensionInsights={},this._idToCtor={}}registerInsight(a,r,i,s){return this._insightSchema.properties[a]=i,this._idToCtor[a]=s,a}registerExtensionInsight(a,r){this._extensionInsights[a]=r}getRegisteredExtensionInsights(a){return this._extensionInsights[a]}getCtorFromId(a){return this._idToCtor[a]}getAllCtors(){return(0,b.values)(this._idToCtor)}getAllIds(){return Object.keys(this._idToCtor)}get insightSchema(){return this._insightSchema}}const T=new D;t.Registry.add(e.Extensions.InsightContribution,T);function f(h,a,r,i){return T.registerInsight(h,a,r,i)}e.registerInsight=f;const v={};function m(h,a){const r=h+a;return Object.keys(v).indexOf(r)===-1||v[r]}e.getWidgetAutoRefreshState=m;function S(h,a,r){v[h+a]=r}e.setWidgetAutoRefreshState=S}),define(Q[507],Y([1,0,16,141,168]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerComponentType=e.Extensions=void 0,e.Extensions={ComponentContribution:"dashboard.contributions.components"};class D{constructor(){this._idToCtor={},this._typeNameToId={}}registerComponentType(m,S,h){return this._idToCtor[m]=h,this._typeNameToId[b.ModelComponentTypes[S]]=m,m}getIdForTypeMapping(m){return this._typeNameToId[b.ModelComponentTypes[m]]}getCtorForType(m){let S=this.getIdForTypeMapping(m);return S?this._idToCtor[S]:void 0}getCtorFromId(m){return this._idToCtor[m]}getAllCtors(){return(0,y.values)(this._idToCtor)}getAllIds(){return Object.keys(this._idToCtor)}}const T=new D;t.Registry.add(e.Extensions.ComponentContribution,T);function f(v,m,S){return T.registerComponentType(v,m,S)}e.registerComponentType=f}),define(Q[696],Y([1,0,16,1945]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerNonCustomDashboardWidget=e.registerDashboardWidget=e.Extensions=void 0,e.Extensions={DashboardWidgetContribution:"dashboard.contributions.widgets"};class b{constructor(){this._allSchema={type:"object",description:y.localize(0,null),properties:{},extensionProperties:{},additionalProperties:!1},this._dashboardWidgetSchema={type:"object",description:y.localize(1,null),properties:{},extensionProperties:{},additionalProperties:!1},this._serverWidgetSchema={type:"object",description:y.localize(2,null),properties:{},extensionProperties:{},additionalProperties:!1}}registerWidget(m,S,h,a,r){return r&&r.extensionOnly?((a===void 0||a==="database")&&(this._dashboardWidgetSchema.extensionProperties[m]=h),(a===void 0||a==="server")&&(this._serverWidgetSchema.extensionProperties[m]=h),this._allSchema.extensionProperties[m]=h):((a===void 0||a==="database")&&(this._dashboardWidgetSchema.properties[m]=h),(a===void 0||a==="server")&&(this._serverWidgetSchema.properties[m]=h),this._allSchema.properties[m]=h),m}registerNonCustomDashboardWidget(m,S,h,a){return(a===void 0||a==="database")&&(this._dashboardWidgetSchema.properties[m]={type:"null",default:null}),(a===void 0||a==="server")&&(this._serverWidgetSchema.properties[m]={type:"null",default:null}),m}get databaseWidgetSchema(){return this._dashboardWidgetSchema}get serverWidgetSchema(){return this._serverWidgetSchema}get allSchema(){return this._allSchema}}const D=new b;t.Registry.add(e.Extensions.DashboardWidgetContribution,D);function T(v,m,S,h,a){return D.registerWidget(v,m,S,h,a)}e.registerDashboardWidget=T;function f(v,m,S){return D.registerNonCustomDashboardWidget(v,m,S)}e.registerNonCustomDashboardWidget=f}),define(Q[371],Y([1,0,16]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateNavSectionContainerTypeSchemaProperties=e.registerNavSectionContainerType=e.generateContainerTypeSchemaProperties=e.registerContainerType=e.registerContainer=e.Extensions=void 0,e.Extensions={dashboardContainerContributions:"dashboard.contributions.container"};class y{constructor(){this._containers={},this._dashboardContainerTypeSchemaProperties={},this._dashboardNavSectionContainerTypeSchemaProperties={}}registerContainer(h){this._containers[h.id]=h}getRegisteredContainer(h){return this._containers[h]}registerContainerType(h,a){this._dashboardContainerTypeSchemaProperties[h]=a}get containerTypeSchemaProperties(){return this._dashboardContainerTypeSchemaProperties}registerNavSectionContainerType(h,a){this._dashboardNavSectionContainerTypeSchemaProperties[h]=a}get navSectionContainerTypeSchemaProperties(){return this._dashboardNavSectionContainerTypeSchemaProperties}}const b=new y;t.Registry.add(e.Extensions.dashboardContainerContributions,b);function D(S){b.registerContainer(S)}e.registerContainer=D;function T(S,h){b.registerContainerType(S,h)}e.registerContainerType=T;function f(){return b.containerTypeSchemaProperties}e.generateContainerTypeSchemaProperties=f;function v(S,h){b.registerNavSectionContainerType(S,h)}e.registerNavSectionContainerType=v;function m(){return b.navSectionContainerTypeSchemaProperties}e.generateNavSectionContainerTypeSchemaProperties=m}),define(Q[870],Y([1,0,16]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerCellComponent=e.InjectedParametersTag=e.ParametersTag=e.HideInputTag=e.Extensions=void 0,e.Extensions={CellComponentContributions:"notebook.contributions.cells"},e.HideInputTag="hide_input",e.ParametersTag="parameters",e.InjectedParametersTag="injected-parameters";class y{constructor(){this.components=new Array}registerComponent(f){this.components.push(f)}getComponents(){return this.components.slice()}}const b=new y;t.Registry.add(e.Extensions.CellComponentContributions,b);function D(T){b.registerComponent(T)}e.registerCellComponent=D}),define(Q[1167],Y([1,0,6,16]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={ResourceViewerExtension:"resourceViewer.resources"};const b=new class{constructor(){this.resources=[],this._onDidRegisterResource=new t.Emitter,this.onDidRegisterResource=this._onDidRegisterResource.event}registerResource(D){this.resources.push(Object.assign({},D)),this._onDidRegisterResource.fire()}get allResources(){return this.resources}};y.Registry.add(e.Extensions.ResourceViewerExtension,b)}),define(Q[590],Y([1,0,40,136,1502,507,16,102,59,11,248,388]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelComponentWrapper=void 0;const a=T.Registry.as(D.Extensions.ComponentContribution);let r=class extends y.AngularDisposable{get guid(){return(0,v.generateUuid)()}constructor(s,o,u,d,p){super(),this._componentFactoryResolver=s,this._changeref=o,this._injector=u,this.logService=d,p&&p.onLayoutRequested&&(this._modelViewId=p.modelViewId,this._register(p.onLayoutRequested(c=>{c&&(c.alwaysRefresh||c.modelViewId===this._modelViewId)&&this.layout()})))}ngAfterViewInit(){this.componentHost&&this.loadComponent(),this._changeref.detectChanges(),this.layout()}layout(){this.componentInstance&&this.componentInstance.layout&&this.componentInstance.layout()}get id(){return this._componentInstance.descriptor.id}get componentConfig(){return{descriptor:this.descriptor,modelStore:this.modelStore}}get componentInstance(){return this._componentInstance||this.loadComponent(),this._componentInstance}loadComponent(){if(!this.descriptor||!this.descriptor.type){this.logService.error("No descriptor or type defined for this component");return}let s=a.getCtorFromId(this.descriptor.type);if(s===void 0){this.logService.error("No selector defined for type ",this.descriptor.type);return}let o=this._componentFactoryResolver.resolveComponentFactory(s),u=this.componentHost.viewContainerRef;u.clear();let d=t.ReflectiveInjector.resolveAndCreate([{provide:b.COMPONENT_CONFIG,useValue:this.componentConfig}],this._injector),p;try{p=u.createComponent(o,0,d),this._componentInstance=p.instance,this._componentInstance.descriptor=this.descriptor,this._componentInstance.modelStore=this.modelStore,this._changeref.detectChanges()}catch(l){this.isDisposed||this.logService.error("Error rendering component: ",l);return}let c=p.location.nativeElement;c.style.overflow="hidden",c.style.position="relative"}};e.ModelComponentWrapper=r,fe([(0,t.Input)()],r.prototype,"descriptor",void 0),fe([(0,t.Input)()],r.prototype,"modelStore",void 0),fe([f.memoize],r.prototype,"guid",null),fe([(0,t.ViewChild)(h.ComponentHostDirective)],r.prototype,"componentHost",void 0),e.ModelComponentWrapper=r=fe([(0,t.Component)({selector:"model-component-wrapper",template:` <ng-template component-host> </ng-template> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ComponentFactoryResolver))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(2,(0,t.Inject)((0,t.forwardRef)(()=>t.Injector))),O(3,(0,t.Inject)(m.ILogService)),O(4,(0,t.Inject)(S.IBootstrapParams))],r)}),define(Q[155],Y([1,0,40,17,6,4,590,1965,7,67,168,156,15,789]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContainerBase=e.ComponentBase=e.ItemDescriptor=void 0;class r{constructor(u,d){this.descriptor=u,this.config=d}}e.ItemDescriptor=r;class i extends D.Disposable{constructor(u,d,p){super(),this._changeRef=u,this._el=d,this.logService=p,this.properties={},this._valid=!0,this._validations=[],this._eventQueue=[],this._onEventEmitter=this._register(new b.Emitter)}layout(){this._changeRef.destroyed||this._changeRef.detectChanges()}baseInit(){this.modelStore&&(this.modelStore.registerComponent(this),this._validations.push(()=>this.modelStore.validate(this))),this.fireEvent({eventType:S.ComponentEventType.onComponentLoaded,args:void 0})}baseDestroy(){this.modelStore&&this.modelStore.unregisterComponent(this),this.dispose()}ngOnDestroy(){this.dispose()}getHtml(){return this._el.nativeElement}dispose(){super.dispose(),this.getHtml().remove()}setDataProvider(u,d,p){}refreshDataProvider(u){}setProperties(u){u=u||{},this.properties=u,this.layout(),this.validate().catch(a.onUnexpectedError)}updateProperty(u,d){u&&(this.properties[u]=d,this.layout(),this.validate().catch(a.onUnexpectedError))}getProperties(){return this.properties}getPropertyOrDefault(u,d){let p=u(this.getProperties());return y.isUndefinedOrNull(p)?d:p}setPropertyFromUI(u,d){u(this.getProperties(),d),this.fireEvent({eventType:S.ComponentEventType.PropertiesChanged,args:this.getProperties()}),this.validate().catch(a.onUnexpectedError)}get enabled(){let u=this.getProperties(),d=u.enabled;return d===void 0&&(d=!0,u.enabled=d),d}set enabled(u){let d=this.getProperties();d.enabled=u,this.setProperties(d)}get height(){return this.getPropertyOrDefault(u=>u.height,void 0)}set height(u){this.setPropertyFromUI((d,p)=>d.height=p,u)}get width(){return this.getPropertyOrDefault(u=>u.width,void 0)}set width(u){this.setPropertyFromUI((d,p)=>d.width=p,u)}get position(){return this.getPropertyOrDefault(u=>u.position,"")}set position(u){this.setPropertyFromUI((d,p)=>{d.position=p},u)}get display(){return this.getPropertyOrDefault(u=>u.display,void 0)}set display(u){this.setPropertyFromUI((d,p)=>{d.display=p},u)}get ariaLabel(){return this.getPropertyOrDefault(u=>u.ariaLabel,"")}set ariaLabel(u){this.setPropertyFromUI((d,p)=>d.ariaLabel=p,u)}get ariaRole(){return this.getPropertyOrDefault(u=>u.ariaRole,"")}set ariaRole(u){this.setPropertyFromUI((d,p)=>d.ariaRole=p,u)}get ariaSelected(){return this.getPropertyOrDefault(u=>u.ariaSelected,!1)}set ariaSelected(u){this.setPropertyFromUI((d,p)=>d.ariaSelected=p,u)}get ariaHidden(){return this.getPropertyOrDefault(u=>u.ariaHidden,!1)}set ariaHidden(u){this.setPropertyFromUI((d,p)=>d.ariaHidden=p,u)}get CSSStyles(){return this.getPropertyOrDefault(u=>u.CSSStyles,{})}set CSSStyles(u){this.setPropertyFromUI((d,p)=>{d.CSSStyles=p},u)}getWidth(){return this.width?(0,h.convertSize)(this.width):""}getHeight(){return this.height?(0,h.convertSize)(this.height):""}get valid(){return this._valid}registerEventHandler(u){if(this._eventQueue){for(;this._eventQueue.length>0;){let d=this._eventQueue.pop();u(d)}this._eventQueue=void 0}return this._onEventEmitter.event(u)}fireEvent(u){this._onEventEmitter.fire(u),this._eventQueue&&this._eventQueue.push(u)}async validate(){let u=this._validations.map(c=>Promise.resolve(c()));const p=(await Promise.all(u)).every(c=>c===!0);return this._valid!==p&&(this._valid=p,this.fireEvent({eventType:S.ComponentEventType.validityChanged,args:this._valid})),p}focus(){this._el.nativeElement.focus()}doAction(u,...d){}onkeydown(u,d){this._register((0,v.addDisposableListener)(u,v.EventType.KEY_DOWN,p=>d(new m.StandardKeyboardEvent(p))))}mergeCss(...u){return u.reduce((p,c)=>c?Object.assign(p,c):p,{})}}e.ComponentBase=i;class s extends i{constructor(u,d,p){super(u,d,p),this.items=[],this._validations.push(()=>(this.logService.debug(`Running container validation on component ${this.descriptor.id} to check validity of all child items`),this.items.every(c=>{const l=this.modelStore.getComponent(c.descriptor.id);l===void 0?this.logService.warn(`Child item ${c.descriptor.id} of type ${c.descriptor.type} is undefined`):l.valid===void 0&&this.logService.warn(`The validity of child item ${c.descriptor.id} of type ${c.descriptor.type} undefined`);const n=l?.valid??!0;return this.logService.debug(`Child item ${c.descriptor.id} validity is ${n}`),n})))}addToContainer(u){u.forEach(d=>{if(this.logService.debug(`Adding component ${d.componentDescriptor.id} to container ${this.descriptor.id}`),!!d.componentDescriptor&&!this.items.some(p=>p.descriptor.id===d.componentDescriptor.id&&p.descriptor.type===d.componentDescriptor.type)){if(d.index!==void 0&&d.index!==null&&d.index>=0&&d.index<=this.items.length)this.items.splice(d.index,0,new r(d.componentDescriptor,d.config));else if(!d.index)this.items.push(new r(d.componentDescriptor,d.config));else throw new Error(f.localize(0,null,d.index));this.logService.debug(`Queueing up action to register validation event handler on component ${d.componentDescriptor.id} in container ${this.descriptor.id}`),this.modelStore.eventuallyRunOnComponent(d.componentDescriptor.id,p=>{this.logService.debug(`Registering validation event handler on component ${d.componentDescriptor.id} in container ${this.descriptor.id}`),p.registerEventHandler(async c=>{c.eventType===S.ComponentEventType.validityChanged&&(this.logService.debug(`Running validation on container ${this.descriptor.id} because validity of child component ${d.componentDescriptor.id} changed`),this.validate().catch(a.onUnexpectedError))})},!0)}}),this._changeRef.detectChanges(),this.onItemsUpdated()}removeFromContainer(u){if(!u)return!1;let d=this.items.findIndex(p=>p.descriptor.id===u.id&&p.descriptor.type===u.type);return d>=0?(this.items.splice(d,1),this._changeRef.detectChanges(),this.onItemsUpdated(),!0):!1}clearContainer(){this.items=[],this.onItemsUpdated(),this._changeRef.detectChanges(),this.validate().catch(a.onUnexpectedError)}setProperties(u){super.setProperties(u),this.items.forEach(d=>{let p=this.modelStore.getComponent(d.descriptor.id);p&&u.enabled!==void 0&&(p.enabled=this.enabled)})}layout(){super.layout(),this._componentWrappers&&this._componentWrappers.forEach(u=>{u.layout()})}setItemLayout(u,d){if(!u)return;const p=this.items.find(c=>c.descriptor.id===u.id&&c.descriptor.type===u.type);if(p)p.config=d,this.onItemLayoutUpdated(p),this._changeRef.detectChanges();else throw new Error(`Unable to set item layout - unknown item ${u.id}`)}onItemsUpdated(){}onItemLayoutUpdated(u){}get ariaLive(){return this.getPropertyOrDefault(u=>u.ariaLive,void 0)}set ariaLive(u){this.setPropertyFromUI((d,p)=>d.ariaLive=p,u)}}e.ContainerBase=s,fe([(0,t.ViewChildren)(T.ModelComponentWrapper)],s.prototype,"_componentWrappers",void 0)}),define(Q[3225],Y([1,0,40,155,1038,11]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let T=class extends y.ComponentBase{constructor(v,m,S){super(v,m,S)}ngAfterViewInit(){this.baseInit()}ngOnDestroy(){this.baseDestroy()}setProperties(v){super.setProperties(v),this.chartType&&(this._chart.type=this.chartType),this.data&&(this._chart.data=this.data),this.options&&(this._chart.options=this.options),this.height&&(this._chart.height=this.height),this.width&&(this._chart.width=this.width)}get chartType(){return this.getProperties().chartType}get data(){return this.getProperties().data}get options(){return this.getProperties().options}setLayout(v){this.layout()}};fe([(0,t.Input)()],T.prototype,"descriptor",void 0),fe([(0,t.Input)()],T.prototype,"modelStore",void 0),fe([(0,t.ViewChild)(b.Chart)],T.prototype,"_chart",void 0),T=fe([(0,t.Component)({selector:"modelview-chart",templateUrl:decodeURI(q.toUrl("./chart.component.html"))}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(D.ILogService))],T),e.default=T}),define(Q[871],Y([1,0,155,494,7,156]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComponentWithIconBase=e.ItemDescriptor=void 0;class T{constructor(m,S){this.descriptor=m,this.config=S}}e.ItemDescriptor=T;class f extends t.ComponentBase{constructor(m,S,h){super(m,S,h)}get iconClass(){return this._iconClass+" icon"}updateIcon(){this.iconPath&&this.iconPath!==this._iconPath&&(this._iconPath=this.iconPath,this._iconClass=(0,y.createIconCssClass)(this.iconPath,this._iconClass),this._changeRef.detectChanges())}get defaultIconWidth(){return 50}get defaultIconHeight(){return 50}getIconWidth(){return(0,D.convertSize)(this.iconWidth,`${this.defaultIconWidth}px`)}getIconHeight(){return(0,D.convertSize)(this.iconHeight,`${this.defaultIconHeight}px`)}get iconPath(){return this.getPropertyOrDefault(m=>m.iconPath,void 0)}get iconHeight(){return this.getPropertyOrDefault(m=>m.iconHeight,this.defaultIconHeight)}get iconWidth(){return this.getPropertyOrDefault(m=>m.iconWidth,this.defaultIconWidth)}get title(){return this.getPropertyOrDefault(m=>m.title,"")}set title(m){this.setPropertyFromUI((S,h)=>{S.title=h},m)}ngOnDestroy(){this._iconClass&&(0,b.removeCSSRulesContainingSelector)(this._iconClass),super.ngOnDestroy()}}e.ComponentWithIconBase=f}),define(Q[3226],Y([1,0,40,155,156,11,789]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FlexItem=void 0;class T{constructor(m,S){this.descriptor=m,this.config=S}}e.FlexItem=T;let f=class extends y.ContainerBase{constructor(m,S,h){super(m,S,h),this._flexFlow="",this._justifyContent=""}ngAfterViewInit(){this.baseInit()}ngOnDestroy(){this.baseDestroy()}setLayout(m){this._flexFlow=m.flexFlow?m.flexFlow:"",this._justifyContent=m.justifyContent?m.justifyContent:"",this._alignItems=m.alignItems?m.alignItems:"",this._alignContent=m.alignContent?m.alignContent:"",this._textAlign=m.textAlign?m.textAlign:"",this._position=m.position?m.position:"",this._height=(0,b.convertSize)(m.height),this._width=(0,b.convertSize)(m.width),this._flexWrap=m.flexWrap?m.flexWrap:"",this.layout()}get flexFlow(){return this._flexFlow}get justifyContent(){return this._justifyContent}get alignItems(){return this._alignItems}get height(){return this._height}get width(){return this._width}get alignContent(){return this._alignContent}get textAlign(){return this._textAlign}get position(){return this._position}get flexWrap(){return this._flexWrap}getItemFlex(m){return m.config?m.config.flex:"1 1 auto"}getItemOrder(m){return m.config?m.config.order:0}getItemStyles(m){return m.config&&m.config.CSSStyles?m.config.CSSStyles:{}}};fe([(0,t.Input)()],f.prototype,"descriptor",void 0),fe([(0,t.Input)()],f.prototype,"modelStore",void 0),f=fe([(0,t.Component)({template:` <div *ngIf="items" class="flexContainer" [ngStyle]="CSSStyles" [style.display]="display" [style.flexFlow]="flexFlow" [style.justifyContent]="justifyContent" [style.position]="position" [style.alignItems]="alignItems" [style.alignContent]="alignContent" [style.height]="height" [style.width]="width" [style.flex-wrap]="flexWrap" [attr.role]="ariaRole" [attr.aria-live] = "ariaLive" [attr.aria-label]="ariaLabel"> <div *ngFor="let item of items" [style.flex]="getItemFlex(item)" [style.textAlign]="textAlign" [style.order]="getItemOrder(item)" [ngStyle]="getItemStyles(item)"> <model-component-wrapper [descriptor]="item.descriptor" [modelStore]="modelStore"> </model-component-wrapper> </div> </div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(D.ILogService))],f),e.default=f}),define(Q[3227],Y([1,0,40,155,156,11,1583]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class T{constructor(m,S){this.descriptor=m,this.config=S}}let f=class extends y.ContainerBase{constructor(m,S,h){super(m,S,h)}ngOnDestroy(){this.baseDestroy()}ngAfterViewInit(){this.baseInit()}layout(){super.layout()}get alignItems(){return this._alignItems}get alignContent(){return this._alignContent}getFormWidth(){return(0,b.convertSize)(this._formLayout&&this._formLayout.width,"")}getFormPadding(){return this._formLayout&&this._formLayout.padding?this._formLayout.padding:"10px 30px 0px 30px"}getFormHeight(){return(0,b.convertSize)(this._formLayout&&this._formLayout.height,"")}getComponentWidth(m){let S=m.config;return S&&S.componentWidth?(0,b.convertSize)(S.componentWidth,""):""}getRowHeight(m){let S=m.config;return S&&S.componentHeight?(0,b.convertSize)(S.componentHeight,""):""}isItemRequired(m){let S=m.config;return S&&S.required}getItemInfo(m){let S=m.config;return S&&S.info}itemHasInfo(m){let S=m.config;return S&&S.info!==void 0}getItemTitle(m){let S=m.config;return S?S.title:""}hasItemTitle(m){return this.getItemTitle(m)!==""}getItemTitleFontSize(m){let S="14px";this.isInGroup(m)&&(S="12px");let h=m.config;return h&&h.titleFontSize?(0,b.convertSize)(h.titleFontSize,S):S}getActionComponents(m){let S=this.items,h=m.config;return h&&h.actions?h.actions.map(r=>S.find(s=>s.descriptor.id===r)).filter(r=>r&&r.descriptor):[]}isGroupLabel(m){return m&&m.config&&m.config.isGroupLabel}isInGroup(m){return m&&m.config&&m.config.isInGroup}isFormComponent(m){return m&&m.config&&m.config.isFormComponent}itemHasActions(m){let S=m.config;return S&&S.actions!==void 0&&S.actions.length>0}setLayout(m){this._formLayout=m,this.layout()}isHorizontal(m){return m&&m.config&&m.config.horizontal}isVertical(m){return m&&m.config&&!m.config.horizontal}get CSSStyles(){return this.mergeCss(super.CSSStyles,{padding:this.getFormPadding(),width:this.getFormWidth(),height:this.getFormHeight()})}};fe([(0,t.Input)()],f.prototype,"descriptor",void 0),fe([(0,t.Input)()],f.prototype,"modelStore",void 0),f=fe([(0,t.Component)({template:` <div #container [ngStyle]="CSSStyles" *ngIf="items" class="form-table" role="presentation"> <ng-container *ngFor="let item of items"> <div class="form-row" *ngIf="isGroupLabel(item)" [style.font-size]="getItemTitleFontSize(item)"> <div class="form-item-row form-group-label"> <model-component-wrapper [descriptor]="item.descriptor" [modelStore]="modelStore"> </model-component-wrapper> </div> </div> <div class="form-row" *ngIf="isFormComponent(item)" [style.height]="getRowHeight(item)" tabindex="0"> <ng-container *ngIf="isHorizontal(item)"> <div *ngIf="hasItemTitle(item)" class="form-cell form-cell-title" [style.font-size]="getItemTitleFontSize(item)" [ngClass]="{'form-group-item': isInGroup(item)}"> {{getItemTitle(item)}}<span class="form-required" *ngIf="isItemRequired(item)">*</span> <span class="codicon help form-info" *ngIf="itemHasInfo(item)" [title]="getItemInfo(item)" role="tooltip"></span> </div> <div class="form-cell"> <div class="form-component-container"> <div [style.width]="getComponentWidth(item)" [ngClass]="{'form-input-flex': !getComponentWidth(item)}"> <model-component-wrapper [descriptor]="item.descriptor" [modelStore]="modelStore"> </model-component-wrapper> </div> <div *ngIf="itemHasActions(item)" class="form-component-actions"> <ng-container *ngFor="let actionItem of getActionComponents(item)"> <model-component-wrapper [descriptor]="actionItem.descriptor" [modelStore]="modelStore" > </model-component-wrapper> </ng-container> </div> </div> </div> </ng-container> <div class="form-vertical-container" *ngIf="isVertical(item)" [style.height]="getRowHeight(item)" [ngClass]="{'form-group-item': isInGroup(item)}"> <div class="form-item-row" [style.font-size]="getItemTitleFontSize(item)"> {{getItemTitle(item)}}<span class="form-required" *ngIf="isItemRequired(item)">*</span> <span class="codicon help form-info" *ngIf="itemHasInfo(item)" [title]="getItemInfo(item)" role="tooltip"></span> </div> <div class="form-item-row" [style.width]="getComponentWidth(item)" [style.height]="getRowHeight(item)"> <model-component-wrapper [descriptor]="item.descriptor" [modelStore]="modelStore" [style.width]="getComponentWidth(item)" [style.height]="getRowHeight(item)"> </model-component-wrapper> </div> <div *ngIf="itemHasActions(item)" class="form-item-row form-actions-table form-item-last-row" role="presentation"> <div *ngFor="let actionItem of getActionComponents(item)" class="form-actions-cell" > <model-component-wrapper [descriptor]="actionItem.descriptor" [modelStore]="modelStore"> </model-component-wrapper> </div> </div> </div> </div> </ng-container> </div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(D.ILogService))],f),e.default=f}),define(Q[3228],Y([1,0,40,155,67,7,11,1584]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let f=class extends y.ContainerBase{constructor(m,S,h){super(m,S,h)}ngAfterViewInit(){this.baseInit()}ngOnDestroy(){this.baseDestroy()}onKeyDown(m){let S=new b.StandardKeyboardEvent(m);S.keyCode===3||S.keyCode===10?(this.changeState(),D.EventHelper.stop(S,!0)):S.keyCode===15?(this.collapsed||this.changeState(),D.EventHelper.stop(S,!0)):S.keyCode===17&&(this.collapsed&&this.changeState(),D.EventHelper.stop(S,!0))}setLayout(m){this._containerLayout=m,this.collapsed=!!m.collapsed,this.layout()}set collapsed(m){this.setPropertyFromUI((S,h)=>{S.collapsed=h},m)}get collapsed(){return this.getPropertyOrDefault(m=>m.collapsed,!1)}get header(){return this._containerLayout?.header??""}hasHeader(){return this._containerLayout&&!!this._containerLayout.header}isCollapsible(){return this.hasHeader()&&this._containerLayout.collapsible===!0}getContainerWidth(){if(this._containerLayout&&this._containerLayout.width){let m=this._containerLayout.width.toString();return!m.endsWith("%")&&!m.toLowerCase().endsWith("px")&&(m=m+"px"),m}else return"100%"}getContainerDisplayStyle(){return!this.isCollapsible()||!this.collapsed?"block":"none"}getHeaderClass(){return this.isCollapsible()?`modelview-group-header-collapsible ${this.collapsed?"collapsed":"expanded"}`:"modelview-group-header"}changeState(){this.isCollapsible()&&(this.collapsed=!this.collapsed,this._changeRef.detectChanges())}get CSSStyles(){return this.mergeCss(super.CSSStyles,{display:this.getContainerDisplayStyle(),width:this.getContainerWidth()})}};fe([(0,t.Input)()],f.prototype,"descriptor",void 0),fe([(0,t.Input)()],f.prototype,"modelStore",void 0),f=fe([(0,t.Component)({selector:"modelview-groupContainer",template:` <div *ngIf="hasHeader()" [class]="getHeaderClass()" (click)="changeState()" (keydown)="onKeyDown($event)" [tabindex]="isCollapsible()? 0 : -1" [attr.role]="isCollapsible() ? 'button' : null" [attr.aria-expanded]="isCollapsible() ? !collapsed : null"> {{header}} </div> <!-- This extra div is needed so that the expanded state of the header is updated correctly. See https://github.com/microsoft/azuredatastudio/pull/16499 for more details --> <fieldset [attr.aria-label]="header" class="modelview-group-fieldset"> <div> <div #container *ngIf="items" class="modelview-group-container" [ngStyle]="CSSStyles"> <ng-container *ngFor="let item of items"> <div class="modelview-group-row" > <div class="modelview-group-cell"> <model-component-wrapper [descriptor]="item.descriptor" [modelStore]="modelStore" > </model-component-wrapper> </div> </div> </ng-container> </div> </div> </fieldset> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(T.ILogService))],f),e.default=f}),define(Q[1168],Y([1,0,40,871,11,1586]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let D=class extends y.ComponentWithIconBase{constructor(f,v,m){super(f,v,m)}ngAfterViewInit(){this.baseInit()}ngOnDestroy(){this.baseDestroy()}setLayout(f){this.layout()}setProperties(f){super.setProperties(f),this.updateIcon(),this._changeRef.detectChanges()}updateIcon(){this.iconPath&&(this._iconClass?super.updateIcon():(super.updateIcon(),this.imageContainer.nativeElement.classList.add(this._iconClass,"icon")))}getImageSize(){return`${this.getIconWidth()} ${this.getIconHeight()}`}get CSSStyles(){return this.mergeCss(super.CSSStyles,{"background-size":this.getImageSize(),width:this.getWidth(),height:this.getHeight()})}};fe([(0,t.Input)()],D.prototype,"descriptor",void 0),fe([(0,t.Input)()],D.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("imageContainer",{read:t.ElementRef})],D.prototype,"imageContainer",void 0),D=fe([(0,t.Component)({selector:"modelview-image",template:` <div #imageContainer role="img" [ngStyle]="CSSStyles" [title]="title">`}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(b.ILogService))],D),e.default=D}),define(Q[3229],Y([1,0,40,155,1969,168,87,11,15,1589]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let m=class extends y.ComponentBase{constructor(h,a,r){super(h,a,r),this._validations.push(()=>this._component?this.loading?!1:this.modelStore.getComponent(this._component.id).validate():!0)}ngAfterViewInit(){this.setLayout(),this.baseInit()}ngOnDestroy(){this.baseDestroy()}setLayout(){this.layout()}layout(){super.layout(),this._component&&this.modelStore.getComponent(this._component.id)?.layout()}setProperties(h){const a=this.loading;super.setProperties(h),a!==this.loading&&(0,T.status)(this.getStatusText())}get loading(){return this.getPropertyOrDefault(h=>h.loading,!1)}set loading(h){this.setPropertyFromUI((a,r)=>{a.loading=r},h),this.layout()}get showText(){return this.getPropertyOrDefault(h=>h.showText,!1)}get loadingText(){return this.getPropertyOrDefault(h=>h.loadingText,(0,b.localize)(0,null))}get loadingCompletedText(){return this.getPropertyOrDefault(h=>h.loadingCompletedText,(0,b.localize)(1,null))}addToContainer(h){this._component=h[0].componentDescriptor,this.modelStore.eventuallyRunOnComponent(this._component.id,a=>{this._componentEventDisposable=a.registerEventHandler(async r=>{r.eventType===D.ComponentEventType.validityChanged&&this.validate().catch(v.onUnexpectedError)})},!1),this.layout()}removeFromContainer(h){this._component=void 0,this._componentEventDisposable.dispose(),this.layout()}getStatusText(){return this.loading?this.loadingText:this.loadingCompletedText}};fe([(0,t.Input)()],m.prototype,"descriptor",void 0),fe([(0,t.Input)()],m.prototype,"modelStore",void 0),m=fe([(0,t.Component)({selector:"modelview-loadingComponent",template:` <div class="modelview-loadingComponent-container" aria-busy="true" *ngIf="loading" [ngStyle]="CSSStyles"> <div class="modelview-loadingComponent-spinner" [title]="getStatusText()" #spinnerElement></div> <div *ngIf="showText" class="modelview-loadingComponent-status-text">{{getStatusText()}}</div> </div> <model-component-wrapper #childElement [descriptor]="_component" [modelStore]="modelStore" *ngIf="_component" [ngClass]="{'modelview-loadingComponent-content-loading': loading}"> </model-component-wrapper> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(f.ILogService))],m),e.default=m}),define(Q[3230],Y([1,0,40,155,824,168,11,1592]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let f=class extends y.ComponentBase{constructor(m,S,h){super(m,S,h)}ngAfterViewInit(){this._inputContainer&&(this._input=new b.RadioButton(this._inputContainer.nativeElement,{label:this.label}),this._register(this._input),this._register(this._input.onClicked(m=>{this.checked=this._input.checked,this.fireEvent({eventType:D.ComponentEventType.onDidClick,args:m})})),this._register(this._input.onDidChangeCheckedState(m=>{this.checked=m,this.fireEvent({eventType:D.ComponentEventType.onDidChange,args:m})}))),this.baseInit()}ngOnDestroy(){this.baseDestroy()}setLayout(m){this.layout()}setProperties(m){super.setProperties(m),this._input.name=this.name,this._input.value=this.value,this._input.label=this.label,this._input.enabled=this.enabled,this._input.checked=this.checked}get checked(){return this.getPropertyOrDefault(m=>m.checked,!1)}set checked(m){this.setPropertyFromUI((S,h)=>{S.checked=h},m)}set value(m){this.setPropertyFromUI((S,h)=>{S.value=h},m)}get value(){return this.getPropertyOrDefault(m=>m.value,"")}getLabel(){return this.label}get label(){return this.getPropertyOrDefault(m=>m.label,"")}set label(m){this.setPropertyFromUI((S,h)=>{S.label=h},m)}get name(){return this.getPropertyOrDefault(m=>m.name,"")}set name(m){this.setPropertyFromUI((S,h)=>{S.name=h},m)}focus(){this._input.focus()}};fe([(0,t.Input)()],f.prototype,"descriptor",void 0),fe([(0,t.Input)()],f.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("input",{read:t.ElementRef})],f.prototype,"_inputContainer",void 0),f=fe([(0,t.Component)({selector:"modelview-radioButton",template:` <div #input [ngStyle]="CSSStyles" class="modelview-radiobutton-container"> </div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(T.ILogService))],f),e.default=f}),define(Q[3231],Y([1,0,40,155,1526,11]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let T=class extends y.ComponentBase{constructor(v,m,S){super(v,m,S)}ngAfterViewInit(){this._separatorContainer&&(this._separator=new b.Separator(this._separatorContainer.nativeElement),this._register(this._separator)),this.baseInit()}setLayout(v){this.layout()}};fe([(0,t.Input)()],T.prototype,"descriptor",void 0),fe([(0,t.Input)()],T.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("separator",{read:t.ElementRef})],T.prototype,"_separatorContainer",void 0),T=fe([(0,t.Component)({selector:"modelview-separator",template:` <div [ngStyle]="CSSStyles" #separator> </div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(D.ILogService))],T),e.default=T}),define(Q[3232],Y([1,0,40,155,168,15,11,2304,156]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let m=class extends y.ComponentBase{constructor(h,a,r){super(h,a,r)}ngAfterViewInit(){this._slider=this._register(new f.Slider(this._sliderContainer.nativeElement,{width:(0,v.convertSize)(this.width),min:this.min,max:this.max,value:this.value,step:this.step,showTicks:this.showTicks})),this._register(this._slider.onChange(async h=>{this.value=this._slider.value,await this.validate(),this.fireEvent({eventType:b.ComponentEventType.onDidChange,args:h})})),this._register(this._slider.onInput(h=>{this.fireEvent({eventType:b.ComponentEventType.onInput,args:h})})),this.baseInit()}get sliderElement(){return this._slider}ngOnDestroy(){this.baseDestroy()}setLayout(h){this.layout()}setProperties(h){super.setProperties(h),this.setSliderProperties(this.sliderElement),this.validate().catch(D.onUnexpectedError)}setSliderProperties(h){h.min=this.min,h.max=this.max,h.step=this.step,h.value=this.value,h.showTicks=this.showTicks,h.ariaLabel=this.ariaLabel,h.enabled=this.enabled,h.width=(0,v.convertSize)(this.width)}get value(){return this.getPropertyOrDefault(h=>h.value,void 0)}set value(h){this.setPropertyFromUI((a,r)=>a.value=r,h)}get min(){return this.getPropertyOrDefault(h=>h.min,void 0)}set min(h){this.setPropertyFromUI((a,r)=>a.min=r,h)}get max(){return this.getPropertyOrDefault(h=>h.max,void 0)}set max(h){this.setPropertyFromUI((a,r)=>a.max=r,h)}get step(){return this.getPropertyOrDefault(h=>h.step,void 0)}set step(h){this.setPropertyFromUI((a,r)=>a.step=r,h)}get showTicks(){return this.getPropertyOrDefault(h=>h.showTicks,void 0)}set showTicks(h){this.setPropertyFromUI((a,r)=>a.showTicks=r,h)}focus(){this.sliderElement.focus()}get inputBoxCSSStyles(){return this.mergeCss(super.CSSStyles,{width:this.getWidth()})}};fe([(0,t.Input)()],m.prototype,"descriptor",void 0),fe([(0,t.Input)()],m.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("slider",{read:t.ElementRef})],m.prototype,"_sliderContainer",void 0),m=fe([(0,t.Component)({selector:"modelview-slider",template:` <div #slider [ngStyle]="CSSStyles"></div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(T.ILogService))],m),e.default=m}),define(Q[3233],Y([1,0,7,40,155,6,216,11,156,102,789]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class S{constructor(){this.onDidChange=D.Event.None}layout(r){this.size=r;try{this.orientation===0?this.component.updateProperty("height",r):this.component.updateProperty("width",r)}catch{}}}let h=class extends b.ContainerBase{constructor(r,i,s){super(r,i,s),this._flexFlow="",this._justifyContent="",this._orientation=0,this._register(t.addDisposableListener(window,t.EventType.RESIZE,o=>{this.resizeSplitview()}))}ngOnDestroy(){this.baseDestroy()}ngAfterViewInit(){this._splitView=this._register(new T.SplitView(this._el.nativeElement,{orientation:this._orientation})),this.baseInit()}GetCorrespondingView(r,i){let s=r,o=new S;return o.orientation=i,o.element=s.getHtml(),o.component=s,o.minimumSize=50,o.maximumSize=Number.MAX_VALUE,o}resizeSplitview(){this._resizeable&&(this._splitViewSize=this.calculateSplitViewSize(this.orientation),this._splitView.layout(this._splitViewSize))}calculateSplitViewSize(r){const s=t.findParentWithClass(this._el.nativeElement,"model-view-container").getBoundingClientRect();return r.toLowerCase()==="vertical"?s.height:s.width}setLayout(r){this._flexFlow=r.flexFlow?r.flexFlow:"",this._justifyContent=r.justifyContent?r.justifyContent:"",this._alignItems=r.alignItems?r.alignItems:"",this._alignContent=r.alignContent?r.alignContent:"",this._textAlign=r.textAlign?r.textAlign:"",this._position=r.position?r.position:"",this._height=(0,v.convertSize)(r.height),this._width=(0,v.convertSize)(r.width),r.splitViewSize?(this._resizeable=!1,this._splitViewSize=(0,v.convertSizeToNumber)(r.splitViewSize)):(this._resizeable=!0,this._splitViewSize=this.calculateSplitViewSize(r.orientation));const i=r.orientation.toLowerCase()==="vertical"?0:1;this._orientation!==i&&(this._splitView.el.remove(),this._splitView.dispose(),this._splitView=this._register(new T.SplitView(this._el.nativeElement,{orientation:i})),this._orientation=i),this._componentWrappers&&this._componentWrappers.forEach(s=>{let o=s.modelStore.getComponent(s.descriptor.id);s.modelStore.validate(o).then(u=>{if(u===!0){let d=this.GetCorrespondingView(o,this._orientation);this._splitView.addView(d,T.Sizing.Distribute)}else this.logService.warn("Could not add views inside split view container")})}),this._splitView.layout(this._splitViewSize)}get flexFlow(){return this._flexFlow}get justifyContent(){return this._justifyContent}get alignItems(){return this._alignItems}get height(){return this._height}get width(){return this._width}get alignContent(){return this._alignContent}get textAlign(){return this._textAlign}get position(){return this._position}get orientation(){return this._orientation.toString()}getItemFlex(r){return r.config?r.config.flex:"1 1 auto"}getItemOrder(r){return r.config?r.config.order:0}getItemStyles(r){return r.config&&r.config.CSSStyles?r.config.CSSStyles:{}}get CSSStyles(){return this.mergeCss(super.CSSStyles,{width:this.getWidth(),height:this.getHeight(),flexFlow:this.flexFlow,justifyContent:this.justifyContent,position:this.position,alignItems:this.alignItems,alignContent:this.alignContent})}};fe([(0,y.Input)()],h.prototype,"descriptor",void 0),fe([(0,y.Input)()],h.prototype,"modelStore",void 0),fe([(0,m.debounce)(20)],h.prototype,"resizeSplitview",null),h=fe([(0,y.Component)({template:` <div *ngIf="items" class="splitViewContainer" [ngStyle]="CSSStyles"> <div *ngFor="let item of items" [style.flex]="getItemFlex(item)" [style.textAlign]="textAlign" [style.order]="getItemOrder(item)" [ngStyle]="getItemStyles(item)"> <model-component-wrapper [descriptor]="item.descriptor" [modelStore]="modelStore"> </model-component-wrapper> </div> </div> `}),O(0,(0,y.Inject)((0,y.forwardRef)(()=>y.ChangeDetectorRef))),O(1,(0,y.Inject)((0,y.forwardRef)(()=>y.ElementRef))),O(2,(0,y.Inject)(f.ILogService))],h),e.default=h}),define(Q[1169],Y([1,0,155]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TitledComponent=void 0;class y extends t.ComponentBase{constructor(D,T,f){super(D,T,f)}get title(){return this.getPropertyOrDefault(D=>D.title,"")}set title(D){this.setPropertyFromUI((T,f)=>{T.title=f},D)}}e.TitledComponent=y}),define(Q[3234],Y([1,0,40,155,11,1596]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToolbarItem=e.Orientation=void 0;var D;(function(v){v.Horizontal="horizontal",v.Vertical="vertical"})(D||(e.Orientation=D={}));class T{constructor(m,S){this.descriptor=m,this.config=S}}e.ToolbarItem=T;let f=class extends y.ContainerBase{constructor(m,S,h){super(m,S,h),this._orientation=D.Horizontal}ngAfterViewInit(){this.baseInit()}ngOnDestroy(){this.baseDestroy()}setLayout(m){this._orientation=m.orientation?m.orientation:D.Horizontal,this.layout()}getItemTitle(m){let S=m.config;return S?S.title:""}shouldShowTitle(m){return this.hasTitle(m)&&this.isHorizontal()}shouldShowToolbarSeparator(m){return!m||!m.config?!1:m.config.toolbarSeparatorAfter}hasTitle(m){return m&&m.config&&m.config.title!==void 0}get paddingTop(){return this.isHorizontal(),""}get toolbarClass(){let m=["modelview-toolbar-container"];return this.isHorizontal()?m.push("toolbar-horizontal"):m.push("toolbar-vertical"),m.join(" ")}isHorizontal(){return this._orientation===D.Horizontal}};fe([(0,t.Input)()],f.prototype,"descriptor",void 0),fe([(0,t.Input)()],f.prototype,"modelStore",void 0),f=fe([(0,t.Component)({selector:"modelview-toolbarContainer",template:` <div #container *ngIf="items" [class]="toolbarClass" [ngStyle]="CSSStyles"> <ng-container *ngFor="let item of items"> <div class="modelview-toolbar-item" [style.paddingTop]="paddingTop"> <div *ngIf="shouldShowTitle(item)" class="modelview-toolbar-title" > {{getItemTitle(item)}} </div> <div class="modelview-toolbar-component"> <model-component-wrapper [descriptor]="item.descriptor" [modelStore]="modelStore" > </model-component-wrapper> </div> <div *ngIf="shouldShowToolbarSeparator(item)" class="taskbarSeparator" > </div> </div> </ng-container> </div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(b.ILogService))],f),e.default=f}),define(Q[3235],Y([1,0,16,1971,507,136,1525,6,168]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewBase=void 0;const m=t.Registry.as(b.Extensions.ComponentContribution);class S extends D.AngularDisposable{constructor(a,r){super(),this.changeRef=a,this.logService=r,this._onDestroy=this._register(new f.Emitter),this.onDestroy=this._onDestroy.event,this._onEventEmitter=this._register(new f.Emitter),this.modelStore=new T.ModelStore(r)}initializeModel(a,r){let i=this.defineComponent(a);this.logService.debug(`Initializing view ${this.id} with root component ${a.id}`),this.rootDescriptor=i,this.modelStore.registerValidationCallback(r),this.changeRef.destroyed||this.changeRef.detectChanges()}defineComponent(a){this.logService.debug(`Defining component ${a.id} in view ${this.id}`);let r=this.modelStore.getComponentDescriptor(a.id);if(r)return this.logService.debug(`Component ${a.id} already defined`),r;let i=m.getIdForTypeMapping(a.type);if(!i)throw new Error(y.localize(0,null,v.ModelComponentTypes[a.type]));let s=this.modelStore.createComponentDescriptor(i,a.id);if(this.setProperties(a.id,a.properties,!0),this.setLayout(a.id,a.layout,!0),this.registerEvent(a.id,!0),a.itemConfigs){const o=a.itemConfigs.map(u=>({itemConfig:u,index:void 0,initial:!0}));this.addToContainer(a.id,o,!0)}return s}removeComponentChildren(a){if(this.logService.debug(`Removing children of component ${a.id} from view ${this.id}`),a.itemConfigs)for(let r of a.itemConfigs)this.removeFromContainer(a.id,r)}clearContainer(a){this.logService.debug(`Queuing action to clear component ${a}`),this.queueAction(a,r=>{if(!r.clearContainer){this.logService.warn(`Trying to clear container ${a} but does not implement clearContainer!`);return}this.logService.debug(`Clearing component ${a}`),r.clearContainer()})}addToContainer(a,r,i){if(r.length===0)return;const s=r.map(o=>o.itemConfig.componentShape.id).join(",");this.logService.debug(`Queueing action to add components ${s} to container ${a}`),this.queueAction(a,o=>{if(!o.addToContainer){this.logService.warn(`Container ${a} is trying to add components ${s} but does not implement addToContainer!`);return}this.logService.debug(`Adding components ${s} to container ${a}`);const u=r.map(d=>({componentDescriptor:this.defineComponent(d.itemConfig.componentShape),config:d.itemConfig.config,index:d.index}));o.addToContainer(u)},i)}removeFromContainer(a,r){this.logService.debug(`Queueing action to remove component ${r.componentShape.id} from container ${a}`),this.queueAction(a,i=>{if(!i.removeFromContainer){this.logService.warn(`Container ${a} is trying to remove component ${r.componentShape.id} but does not implement removeFromContainer!`);return}this.logService.debug(`Removing component ${r.componentShape.id} from container ${a}`),this.removeComponentChildren(r.componentShape),i.removeFromContainer({id:r.componentShape.id,type:m.getIdForTypeMapping(r.componentShape.type)})})}setLayout(a,r,i=!1){r&&(this.logService.debug(`Queuing action to set layout for component ${a}`),this.queueAction(a,s=>{this.logService.debug(`Setting layout for component ${a}. Layout : ${JSON.stringify(r)}`),s.setLayout(r)},i))}setItemLayout(a,r){this.logService.debug(`Queuing action to set item layout for component ${r.componentShape.id} in container ${a}`);let i=this.modelStore.getComponentDescriptor(r.componentShape.id);this.queueAction(a,s=>{this.logService.debug(`Setting item layout for component ${r.componentShape.id} in container ${a}. Layout : ${JSON.stringify(r.config)}`),s.setItemLayout(i,r.config)})}setProperties(a,r,i=!1){r&&(this.logService.debug(`Queuing action to set properties for component ${a}`),this.queueAction(a,s=>{this.logService.debug(`Setting properties for component ${a}. Properties : ${JSON.stringify(r)}`),s.setProperties(r)},i))}refreshDataProvider(a,r){this.logService.debug(`Queuing action to refresh data provider for component ${a}`),this.queueAction(a,i=>{this.logService.debug(`Refreshing data provider for component ${a}`),i.refreshDataProvider(r)})}queueAction(a,r,i=!1){this.modelStore.eventuallyRunOnComponent(a,r,i)}registerEvent(a,r=!1){this.logService.debug(`Queuing action to register event handler for component ${a}`),this.queueAction(a,i=>{this.logService.debug(`Registering event handler for component ${a}`),this._register(i.registerEventHandler(s=>{let o=Object.assign({componentId:a,isRootComponent:a===this.rootDescriptor.id},s);this._onEventEmitter.fire(o)}))},r)}get onEvent(){return this._onEventEmitter.event}validate(a){return new Promise(r=>this.modelStore.eventuallyRunOnComponent(a,i=>r(i.validate()),!1))}setDataProvider(a,r,i){return this.queueAction(r,s=>s.setDataProvider(a,r,i),!1)}focus(a){return this.logService.debug(`Queuing action to focus component ${a}`),this.queueAction(a,r=>{this.logService.debug(`Focusing component ${a}`),r.focus()})}doAction(a,r,...i){return this.logService.debug(`Queuing action to do action ${r} for component ${a}`),this.queueAction(a,s=>{this.logService.debug(`Doing action ${r} for component ${a}`),s.doAction(r,...i)})}}e.ViewBase=S}),define(Q[508],Y([1,0,40,6,7,102,144,3235,849,11]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelViewContent=void 0;let S=class extends f.ViewBase{constructor(a,r,i,s){super(r,s),this._commonService=a,this.modelViewService=i,this._onResize=this._register(new y.Emitter),this.onResize=this._onResize.event,this._onMessage=this._register(new y.Emitter),this.onMessage=this._onMessage.event}ngOnInit(){this.modelViewService.registerModelView(this),this._register((0,b.addDisposableListener)(window,b.EventType.RESIZE,a=>{this.layout()}))}ngOnDestroy(){this._onDestroy.fire(),super.ngOnDestroy()}layout(){this.changeRef.detectChanges()}get id(){return this.modelViewId}get connection(){if(!this._commonService.connectionManagementService||!this._commonService.connectionManagementService.connectionInfo)return;let a=this._commonService.connectionManagementService.connectionInfo.connectionProfile;return{providerName:a.providerName,connectionId:a.id,options:a.options}}get serverInfo(){if(!(!this._commonService.connectionManagementService||!this._commonService.connectionManagementService.connectionInfo))return this._commonService.connectionManagementService.connectionInfo.serverInfo}};e.ModelViewContent=S,fe([(0,t.Input)()],S.prototype,"modelViewId",void 0),fe([D.memoize],S.prototype,"connection",null),fe([D.memoize],S.prototype,"serverInfo",null),e.ModelViewContent=S=fe([(0,t.Component)({selector:"modelview-content",template:` <div *ngIf="rootDescriptor" style="width: 100%; height: 100%;"> <model-component-wrapper style="display: block; height: 100%" [descriptor]="rootDescriptor" [modelStore]="modelStore"> </model-component-wrapper> </div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>T.CommonServiceInterface))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(2,(0,t.Inject)(v.IModelViewService)),O(3,(0,t.Inject)(m.ILogService))],S)}),define(Q[3236],Y([1,0,1990,16,230,215,141]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChartOptions=e.ControlType=void 0;const f=y.Registry.as(b.Extensions.InsightContribution);var v;(function(n){n[n.combo=0]="combo",n[n.numberInput=1]="numberInput",n[n.input=2]="input",n[n.checkbox=3]="checkbox",n[n.dateInput=4]="dateInput"})(v||(e.ControlType=v={}));const m={label:(0,t.localize)(0,null),type:v.combo,displayableOptions:[(0,t.localize)(1,null),(0,t.localize)(2,null)],options:[D.DataDirection.Vertical,D.DataDirection.Horizontal],configEntry:"dataDirection",default:D.DataDirection.Horizontal},S={label:(0,t.localize)(3,null),type:v.checkbox,configEntry:"columnsAsLabels",default:!0,if:n=>n.dataDirection===D.DataDirection.Vertical&&n.dataType!==D.DataType.Point},h={label:(0,t.localize)(4,null),type:v.checkbox,configEntry:"labelFirstColumn",default:!1,if:n=>n.dataDirection===D.DataDirection.Horizontal&&n.dataType!==D.DataType.Point},a={label:(0,t.localize)(5,null),type:v.combo,options:(0,T.values)(D.LegendPosition),configEntry:"legendPosition",default:D.LegendPosition.Top},r={label:(0,t.localize)(6,null),type:v.input,configEntry:"yAxisLabel",default:void 0},i={label:(0,t.localize)(7,null),type:v.numberInput,configEntry:"yAxisMin",default:void 0},s={label:(0,t.localize)(8,null),type:v.numberInput,configEntry:"yAxisMax",default:void 0},o={label:(0,t.localize)(9,null),type:v.input,configEntry:"xAxisLabel",default:void 0},u={label:(0,t.localize)(10,null),type:v.numberInput,configEntry:"xAxisMin",default:void 0},d={label:(0,t.localize)(11,null),type:v.numberInput,configEntry:"xAxisMax",default:void 0},p={label:(0,t.localize)(12,null),type:v.dateInput,configEntry:"xAxisMin",default:void 0},c={label:(0,t.localize)(13,null),type:v.dateInput,configEntry:"xAxisMax",default:void 0},l={label:(0,t.localize)(14,null),type:v.combo,options:[D.DataType.Number,D.DataType.Point],displayableOptions:[(0,t.localize)(15,null),(0,t.localize)(16,null)],configEntry:"dataType",default:D.DataType.Number};e.ChartOptions={general:[{label:(0,t.localize)(17,null),type:v.combo,options:f.getAllIds(),configEntry:"type",default:D.ChartType.Bar}],[D.ChartType.Line]:[m,l,S,h,r,o,a],[D.ChartType.Scatter]:[a,r,o],[D.ChartType.TimeSeries]:[a,r,i,s,o,p,c],[D.ChartType.Bar]:[m,S,h,a,r,i,s,o],[D.ChartType.HorizontalBar]:[m,S,h,a,o,u,d,r],[D.ChartType.Pie]:[m,S,h,a],[D.ChartType.Doughnut]:[m,S,h,a],[D.InsightType.Table]:[],[D.InsightType.Count]:[],[D.InsightType.Image]:[{configEntry:"encoding",label:(0,t.localize)(18,null),type:v.input,default:"hex"},{configEntry:"imageFormat",label:(0,t.localize)(19,null),type:v.input,default:"jpeg"}]}}),define(Q[1170],Y([1,0,2005,371]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTROLHOST_CONTAINER=void 0,e.CONTROLHOST_CONTAINER="controlhost-container";let b={type:"null",description:t.localize(0,null),default:null};(0,y.registerContainerType)(e.CONTROLHOST_CONTAINER,b),(0,y.registerNavSectionContainerType)(e.CONTROLHOST_CONTAINER,b)}),define(Q[3237],Y([1,0,40,6,434,508,185]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DashboardModelViewContainer=void 0;let f=class extends b.DashboardTab{constructor(){super(),this._onResize=new y.Emitter,this.onResize=this._onResize.event}ngAfterContentInit(){this._register(this._modelViewContent.onResize(()=>{this._onResize.fire()}))}layout(){this._modelViewContent.layout()}get id(){return this.tab.id}get editable(){return this.tab.editable}refresh(){}};e.DashboardModelViewContainer=f,fe([(0,t.Input)()],f.prototype,"tab",void 0),fe([(0,t.ViewChild)(D.ModelViewContent)],f.prototype,"_modelViewContent",void 0),e.DashboardModelViewContainer=f=fe([(0,t.Component)({selector:"dashboard-modelview-container",providers:[{provide:T.TabChild,useExisting:(0,t.forwardRef)(()=>f)}],template:` <modelview-content [modelViewId]="tab.id"> </modelview-content> `})],f)}),define(Q[1171],Y([1,0,2009,371]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MODELVIEW_CONTAINER=void 0,e.MODELVIEW_CONTAINER="modelview-container";let b={type:"null",description:t.localize(0,null),default:null};(0,y.registerContainerType)(e.MODELVIEW_CONTAINER,b),(0,y.registerNavSectionContainerType)(e.MODELVIEW_CONTAINER,b)}),define(Q[872],Y([1,0,2011,371]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WEBVIEW_CONTAINER=void 0,e.WEBVIEW_CONTAINER="webview-container";let b={type:"null",description:t.localize(0,null),default:null};(0,y.registerContainerType)(e.WEBVIEW_CONTAINER,b),(0,y.registerNavSectionContainerType)(e.WEBVIEW_CONTAINER,b)}),define(Q[509],Y([1,0,696,16,42,2021]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DASHBOARD_TABS_KEY_PROPERTY=e.DASHBOARD_CONFIG_ID=e.generateDashboardTabSchema=e.generateDashboardGridLayoutSchema=e.generateDashboardWidgetSchema=void 0;let T=y.Registry.as(t.Extensions.DashboardWidgetContribution);function f(S,h){let a;if(h){const r=S==="server"?T.serverWidgetSchema.extensionProperties:S==="database"?T.databaseWidgetSchema.extensionProperties:T.allSchema.extensionProperties;a=S==="server"?T.serverWidgetSchema.properties:S==="database"?T.databaseWidgetSchema.properties:T.allSchema.properties,a=(0,b.mixin)(a,r,!0)}else a=S==="server"?T.serverWidgetSchema.properties:S==="database"?T.databaseWidgetSchema.properties:T.allSchema.properties;return{type:"object",properties:{name:{type:"string"},icon:{type:"string"},when:{description:(0,D.localize)(0,null),type:"string"},gridItemConfig:{type:"object",properties:{sizex:{type:"number"},sizey:{type:"number"},col:{type:"number"},row:{type:"number"}}},widget:{type:"object",properties:a,minItems:1,maxItems:1},hideHeader:{type:"boolean",description:(0,D.localize)(1,null)}}}}e.generateDashboardWidgetSchema=f;function v(S,h){let a;if(h){const r=S==="server"?T.serverWidgetSchema.extensionProperties:S==="database"?T.databaseWidgetSchema.extensionProperties:T.allSchema.extensionProperties;a=S==="server"?T.serverWidgetSchema.properties:S==="database"?T.databaseWidgetSchema.properties:T.allSchema.properties,a=(0,b.mixin)(a,r,!0)}else a=S==="server"?T.serverWidgetSchema.properties:S==="database"?T.databaseWidgetSchema.properties:T.allSchema.properties;return{type:"object",properties:{name:{type:"string",description:(0,D.localize)(2,null)},row:{type:"number",description:(0,D.localize)(3,null)},rowspan:{type:["string","number"],description:(0,D.localize)(4,null)},col:{type:"number",description:(0,D.localize)(5,null)},colspan:{type:["string","number"],description:(0,D.localize)(6,null)},widget:{anyOf:[{type:"object",properties:a,minItems:1,maxItems:1}]},webview:{anyOf:[{type:"object",properties:{id:{type:"string"}}}]},when:{description:(0,D.localize)(7,null),type:"string"}}}}e.generateDashboardGridLayoutSchema=v;function m(S){return{type:"object",properties:{tabId:{type:"string",description:(0,D.localize)(8,null),enum:[],enumDescriptions:[],errorMessage:(0,D.localize)(9,null)},isPinned:{type:"boolean"}}}}e.generateDashboardTabSchema=m,e.DASHBOARD_CONFIG_ID="Dashboard",e.DASHBOARD_TABS_KEY_PROPERTY="tabId"}),define(Q[454],Y([1,0,2008,509,371]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateGridContainerContribution=e.GRID_CONTAINER=void 0,e.GRID_CONTAINER="grid-container";let D={type:"array",description:t.localize(0,null),items:(0,y.generateDashboardGridLayoutSchema)(void 0,!0)};(0,b.registerContainerType)(e.GRID_CONTAINER,D),(0,b.registerNavSectionContainerType)(e.GRID_CONTAINER,D);function T(f,v){let m=!0;return v.forEach(S=>{if(!Object.keys(S).find(r=>r==="widget"||r==="webview")){m=!1,f.collector.error(t.localize(1,null));return}}),m}e.validateGridContainerContribution=T}),define(Q[455],Y([1,0,2012,509,371]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateWidgetContainerContribution=e.WIDGETS_CONTAINER=void 0,e.WIDGETS_CONTAINER="widgets-container";const D={type:"array",description:t.localize(0,null),items:(0,y.generateDashboardWidgetSchema)(void 0,!0)};(0,b.registerContainerType)(e.WIDGETS_CONTAINER,D),(0,b.registerNavSectionContainerType)(e.WIDGETS_CONTAINER,D);function T(f,v){let m=!0;return v.forEach(S=>{Object.keys(S).find(r=>r==="widget")||(m=!1,f.collector.error(t.localize(1,null)))}),m}e.validateWidgetContainerContribution=T}),define(Q[591],Y([1,0,2010,371,455,454,141,1107]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateNavSectionContributionAndRegisterIcon=e.NAV_SECTION=void 0,e.NAV_SECTION="nav-section";const v={type:"object",properties:{id:{type:"string",description:t.localize(0,null)},icon:{description:t.localize(1,null),anyOf:[{type:"string"},{type:"object",properties:{light:{description:t.localize(2,null),type:"string"},dark:{description:t.localize(3,null),type:"string"}}}]},title:{type:"string",description:t.localize(4,null)},container:{description:t.localize(5,null),type:"object",properties:(0,y.generateNavSectionContainerTypeSchemaProperties)()}}},m={type:"array",description:t.localize(6,null),items:v};(0,y.registerContainerType)(e.NAV_SECTION,m);function S(h,a){let r=!0;return a.forEach(i=>{i.title||(r=!1,h.collector.error(t.localize(7,null))),i.container||(r=!1,h.collector.error(t.localize(8,null))),Object.keys(i.container).length!==1&&(r=!1,h.collector.error(t.localize(9,null))),(0,f.isValidIcon)(i.icon,h)&&(i.iconClass=(0,f.createCSSRuleForIcon)(i.icon,h));const s=Object.keys(i.container)[0],o=(0,T.values)(i.container)[0];switch(s){case b.WIDGETS_CONTAINER:r=r&&(0,b.validateWidgetContainerContribution)(h,o);break;case D.GRID_CONTAINER:r=r&&(0,D.validateGridContainerContribution)(h,o);break;case e.NAV_SECTION:r=!1,h.collector.error(t.localize(10,null));break}}),r}e.validateNavSectionContributionAndRegisterIcon=S}),define(Q[1172],Y([1,0,17,59,16,2014,8,230,455,454,872,1171,1170,591,371,117]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDashboardContainer=e.filterConfigs=e.addContext=e.addEdition=e.addProvider=e.initExtensionConfigs=e.validateGridConfig=e.removeEmpty=void 0;const o=b.Registry.as(i.Extensions.dashboardContainerContributions),u=[v.WIDGETS_CONTAINER,m.GRID_CONTAINER,S.WEBVIEW_CONTAINER,h.MODELVIEW_CONTAINER,a.CONTROLHOST_CONTAINER,r.NAV_SECTION];function d(I){return I.filter(_=>!t.isUndefinedOrNull(_))}e.removeEmpty=d;function p(I,_){return I.map((A,k)=>{A.gridItemConfig===void 0&&(A.gridItemConfig={});const L=(0,y.generateUuid)();return A.gridItemConfig.payload={id:L},A.id=L,_&&_[k]&&(_[k].id=L),A})}e.validateGridConfig=p;function c(I){const _=b.Registry.as(f.Extensions.InsightContribution);return I.map(A=>{if(A.widget&&Object.keys(A.widget).length===1){const k=Object.keys(A.widget)[0],L=_.getRegisteredExtensionInsights(k);L!==void 0&&(!A.when&&L.when&&(A.when=L.when),!A.gridItemConfig&&L.gridItemConfig&&(A.gridItemConfig={sizex:L.gridItemConfig.x,sizey:L.gridItemConfig.y}),A.gridItemConfig&&!A.gridItemConfig.sizex&&L.gridItemConfig&&L.gridItemConfig.x&&(A.gridItemConfig.sizex=L.gridItemConfig.x),A.gridItemConfig&&!A.gridItemConfig.sizey&&L.gridItemConfig&&L.gridItemConfig.y&&(A.gridItemConfig.sizey=L.gridItemConfig.y))}return A})}e.initExtensionConfigs=c;function l(I,_){const A=_.connectionManagementService.connectionInfo.providerId;return I.map(k=>(k.provider===void 0&&(k.provider=A),k))}e.addProvider=l;function n(I,_){const A=_.connectionManagementService.connectionInfo;if(A.serverInfo){const k=A.serverInfo.engineEditionId;return I.map(L=>(L.edition===void 0&&(L.edition=k),L))}else return I}e.addEdition=n;function g(I,_,A){return I.map(k=>(k.context===void 0&&(k.context=A),k))}e.addContext=g;function w(I,_){return I.filter(A=>E(A.provider,_.contextKeyService)?A.when?_.contextKeyService.contextMatchesRules(T.ContextKeyExpr.deserialize(A.when)):!0:!1)}e.filterConfigs=w;function E(I,_){let A=!0;const k=_.getContextKeyValue(s.connectionProviderContextKey);return k&&(A=(I instanceof Array?I:[I]).find(M=>M===k||M===s.anyProviderName)!==void 0),A}function C(I,_){const A=Object.keys(I)[0];if(!u.find(L=>L===A)){const L=o.getRegisteredContainer(A);if(L)I=L.container;else{const R=D.localize(0,null,A);return _.error(R),{result:!1,message:R,container:void 0}}}return{result:!0,message:void 0,container:I}}e.getDashboardContainer=C}),define(Q[3238],Y([1,0,40,144,497,185,434,455,454,1172,6,11,141,1608]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DashboardNavSection=void 0;let r=class extends T.DashboardTab{constructor(s,o,u){super(),this.dashboardService=s,this._cd=o,this.logService=u,this.tabs=[],this._onResize=new S.Emitter,this.onResize=this._onResize.event,this.panelOpt={layout:b.NavigationBarLayout.horizontal},this._configModifiers=[m.removeEmpty,m.initExtensionConfigs,m.addProvider,m.addEdition,m.addContext,m.filterConfigs],this._gridModifiers=[m.validateGridConfig]}ngOnChanges(){this.tabs=[];let s=[];if(this.tab.container){s=(0,a.values)(this.tab.container)[0];let o=!0;s.forEach(u=>{u.iconClass||(o=!1)}),this.panelOpt.showIcon=o,this.loadNewTabs(s)}}ngAfterContentInit(){this._tabs&&this._tabs.forEach(s=>{this._register(s.onResize(()=>{this._onResize.fire()}))})}ngOnDestroy(){this.dispose()}loadNewTabs(s){s&&s.length>0&&s.map(o=>{const u=m.getDashboardContainer(o.container,this.logService);if(!u.result)return{id:o.id,title:o.title,container:{"error-container":void 0}};const d=Object.keys(u.container)[0];if(d===f.WIDGETS_CONTAINER||d===v.GRID_CONTAINER){let p=(0,a.values)(u.container)[0];return this._configModifiers.forEach(c=>{p=c.apply(this,[p,this,this.tab.context])}),this._gridModifiers.forEach(c=>{p=c.apply(this,[p])}),d===f.WIDGETS_CONTAINER?{id:o.id,title:o.title,container:{"widgets-container":p},iconClass:o.iconClass}:{id:o.id,title:o.title,container:{"grid-container":p},iconClass:o.iconClass}}return{id:o.id,title:o.title,container:u.container,iconClass:o.iconClass}}).map(o=>{const u=o;return u.context=this.tab.context,u.editable=!1,u.canClose=!1,this.addNewTab(u),u})}addNewTab(s){this.tabs.find(u=>u.id===s.id)||(this.tabs.push(s),this._cd.detectChanges())}getContentType(s){return s.container?Object.keys(s.container)[0]:""}get id(){return this.tab.id}get editable(){return this.tab.editable}layout(){if(this._tabs){const s=this._panel.getSelectedTab,o=this._tabs.find(u=>u.id===s);this._cd.detectChanges(),o.layout()}}refresh(){this._tabs&&this._tabs.forEach(s=>{s.refresh()})}enableEdit(){this._tabs&&this._tabs.forEach(s=>{s.enableEdit()})}get connectionManagementService(){return this.dashboardService.connectionManagementService}get contextKeyService(){return this.dashboardService.scopedContextKeyService}};e.DashboardNavSection=r,fe([(0,t.Input)()],r.prototype,"tab",void 0),fe([(0,t.ViewChildren)(D.TabChild)],r.prototype,"_tabs",void 0),fe([(0,t.ViewChild)(b.PanelComponent)],r.prototype,"_panel",void 0),e.DashboardNavSection=r=fe([(0,t.Component)({selector:"dashboard-nav-section",providers:[{provide:D.TabChild,useExisting:(0,t.forwardRef)(()=>r)}],templateUrl:decodeURI(q.toUrl("./dashboardNavSection.component.html"))}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>y.CommonServiceInterface))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(2,(0,t.Inject)(h.ILogService))],r)}),define(Q[3239],Y([1,0,230,16,2033]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.insightsContribution=e.insightsSchema=void 0;const D=y.Registry.as(t.Extensions.InsightContribution);e.insightsSchema={type:"object",description:b.localize(0,null),properties:{cacheId:{type:"string",description:b.localize(1,null)},type:{type:"object",properties:D.insightSchema.properties,minItems:1,maxItems:1},query:{type:["string","array"],description:b.localize(2,null)},queryFile:{type:"string",description:b.localize(3,null)},autoRefreshInterval:{type:"number",description:b.localize(4,null)},details:{type:"object",properties:{query:{type:["string","array"]},queryFile:{type:"string"},value:{type:"string"},label:{type:["string","object"],properties:{column:{type:"string"},icon:{type:"string"},state:{type:"array",items:{type:"object",properties:{condition:{type:"object",properties:{if:{type:"string",enum:["equals","notEquals","greaterThanOrEquals","greaterThan","lessThanOrEquals","lessThan","always"]},equals:{type:"string"}}},color:{type:"string"},icon:{type:"string"}}}}}},actions:{type:"object",properties:{types:{description:b.localize(5,null),type:"array",items:{type:"string"}},database:{type:"string",description:b.localize(6,null)},server:{type:"string",description:b.localize(7,null)},user:{type:"string",description:b.localize(8,null)}}}}}}};const T={type:"object",properties:{id:{description:b.localize(9,null),type:"string"},contrib:e.insightsSchema}};e.insightsContribution={description:b.localize(10,null),oneOf:[T,{type:"array",items:T}]}}),define(Q[3240],Y([1,0,230,1508,2038]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const D={type:"null",description:b.localize(0,null)};(0,t.registerInsight)("count","",D,y.default)}),define(Q[3241],Y([1,0,230,1540,2039]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const D={type:"object",description:b.localize(0,null),properties:{imageFormat:{type:"string",description:b.localize(1,null),default:"jpeg",enum:["jpeg","png"]},encoding:{type:"string",description:b.localize(2,null),default:"hex",enum:["hex","base64"]}}};(0,t.registerInsight)("image","",D,y.default)}),define(Q[3242],Y([1,0,696]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const y={type:"object",properties:{id:{type:"string"}}};(0,t.registerDashboardWidget)("webview-widget","",y,void 0,{extensionOnly:!0})}),define(Q[873],Y([1,0,16,17,141]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerComponentType=e.Extensions=void 0,e.Extensions={MimeComponentContribution:"notebook.contributions.mimecomponents"};class D{constructor(){this._id=0,this._ranks={},this._types=null,this._componentDefinitions={}}registerComponentType(S){let h=y.isUndefinedOrNull(S.rank)?100:S.rank;for(let a of S.mimeTypes)this._componentDefinitions[a]=S,this._ranks[a]={rank:h,id:this._id++};this._types=null}getPreferredMimeType(S,h="ensure"){if(h==="ensure"||h==="prefer"){for(let a of this.mimeTypes)if(a in S&&this._componentDefinitions[a].safe)return a}if(h!=="ensure"){for(let a of this.mimeTypes)if(a in S)return a}}getCtorFromMimeType(S){let h=this._componentDefinitions[S];return h?h.ctor:void 0}getAllCtors(){let S=[];return(0,b.values)(this._componentDefinitions).map(a=>a.ctor).filter(a=>{let r=!S.some(i=>a===i);return r&&S.push(a),r})}getAllMimeTypes(){return Object.keys(this._componentDefinitions)}get mimeTypes(){return this._types||(this._types=v(this._ranks))}}const T=new D;t.Registry.add(e.Extensions.MimeComponentContribution,T);function f(m){T.registerComponentType(m)}e.registerComponentType=f;function v(m){return Object.keys(m).sort((S,h)=>{let a=m[S],r=m[h];return a.rank!==r.rank?a.rank-r.rank:a.id-r.id})}}),define(Q[3243],Y([1,0,40,508,6,248,168,1049]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QueryModelViewTabContainer=void 0;let f=class{constructor(m,S){this._el=m,this._params=S,this._onResize=new b.Emitter,this.onResize=this._onResize.event,this.modelViewId=this._params.modelViewId}ngAfterViewInit(){this._modelViewContent.onEvent(S=>{S.isRootComponent&&S.eventType===T.ComponentEventType.validityChanged&&this._params.validityChangedCallback(S.args)});let m=this._el.nativeElement;m.style.height="100%",m.style.width="100%"}layout(){this._modelViewContent.layout()}};e.QueryModelViewTabContainer=f,fe([(0,t.ViewChild)(y.ModelViewContent)],f.prototype,"_modelViewContent",void 0),e.QueryModelViewTabContainer=f=fe([(0,t.Component)({selector:"querytab-modelview-container",providers:[],template:` <modelview-content [modelViewId]="modelViewId"> </modelview-content> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(1,(0,t.Inject)(D.IBootstrapParams))],f)}),define(Q[3244],Y([1,0,40,508,6,248,168,156,560]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogContainer=void 0;let v=class{constructor(S,h,a){this._el=S,this._changeRef=h,this._params=a,this._onResize=new b.Emitter,this.onResize=this._onResize.event,this.modelViewId=this._params.modelViewId,this._params.onLayoutRequested(r=>{r&&(r.alwaysRefresh||r.modelViewId===this.modelViewId)&&this.layout()}),this._dialogPane=this._params.dialogPane}ngAfterViewInit(){const S=this._el.nativeElement;this._modelViewContent.onEvent(h=>{if(h.isRootComponent&&h.eventType===T.ComponentEventType.validityChanged&&this._params.validityChangedCallback(h.args),this._params.setInitialFocus&&h.isRootComponent&&h.eventType===T.ComponentEventType.onComponentLoaded&&!S.contains(document.activeElement)){const a=(0,f.getFocusableElements)(S);a?.length>0&&a[0].focus()}}),S.style.height="100%",S.style.width="100%"}layout(){this._modelViewContent.layout(),this._changeRef.detectChanges()}};e.DialogContainer=v,fe([(0,t.ViewChild)(y.ModelViewContent)],v.prototype,"_modelViewContent",void 0),e.DialogContainer=v=fe([(0,t.Component)({selector:"dialog-modelview-container",providers:[],template:` <div class="dialogContainer" *ngIf="_dialogPane && _dialogPane.displayPageTitle"> <div class="dialogModal-wizardHeader" *ngIf="_dialogPane && _dialogPane.displayPageTitle"> <h2 *ngIf="_dialogPane.pageNumber" class="wizardPageTitle">{{_dialogPane.pageNumberDisplayText}}: {{_dialogPane.title}}</h2> <h2 *ngIf="!_dialogPane.pageNumber" class="wizardPageTitle">{{_dialogPane.title}}</h2> <div *ngIf="_dialogPane.description">{{_dialogPane.description}}</div> </div> <div style="flex: 1 1 auto; position: relative;"> <modelview-content [modelViewId]="modelViewId" style="width: 100%; height: 100%; position: absolute;"> </modelview-content> </div> </div> <modelview-content [modelViewId]="modelViewId" *ngIf="!_dialogPane || !_dialogPane.displayPageTitle"> </modelview-content> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(2,(0,t.Inject)(D.IBootstrapParams))],v)}),define(Q[510],Y([1,0,16,5,4]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0;const D=new class{constructor(){this.associationsInstances=new Map,this.associationContructors=new Map}start(T){const f=T.get(y.IInstantiationService);for(const[v,m]of this.associationContructors){const S=f.createInstance(m);this.associationsInstances.set(v,S)}this.defaultAssociationsConstructor&&(this.defaultAssociationsInstance=[this.defaultAssociationsConstructor[0],f.createInstance(this.defaultAssociationsConstructor[1])])}registerLanguageAssociation(T,f,v){T=T.map(m=>m.toLowerCase());for(const m of T)this.associationContructors.set(m,f);return v&&(this.defaultAssociationsConstructor=[T[0],f]),(0,b.toDisposable)(()=>{for(const m of T)this.associationContructors.delete(m),this.associationsInstances.delete(m)})}getAssociationForLanguage(T){return this.associationsInstances.get(T.toLowerCase())}get defaultAssociation(){return this.defaultAssociationsInstance}};e.Extensions={LanguageAssociations:"workbench.contributions.editor.languageAssociation"},t.Registry.add(e.Extensions.LanguageAssociations,D)}),define(Q[1173],Y([1,0,6,10,2211,586,205,271,23,22,130,15,59,870,28,776,9,4,11,50,87,143]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellModel=void 0;let n=0;const g="ads_execute_command",w=/data:(?:(application\/octet-stream|image\/png));base64,(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})/;let E=class extends u.Disposable{constructor(_,A,k,L,R,M,N){super(),this._options=A,this._notebookService=k,this._commandService=L,this._configurationService=R,this._logService=M,this._languageService=N,this._outputs=[],this._outputsIdMap=new Map,this._renderedOutputTextContent=[],this._onOutputsChanged=new t.Emitter,this._onTableUpdated=new t.Emitter,this._onCellEditModeChanged=new t.Emitter,this._onExecutionStateChanged=new t.Emitter,this._onCurrentEditModeChanged=new t.Emitter,this._onCellLoaded=new t.Emitter,this._onLanguageChanged=new t.Emitter,this._onCollapseStateChanged=new t.Emitter,this._isCommandExecutionSettingEnabled=!1,this._showPreview=!0,this._showMarkdown=!1,this._cellSourceChanged=!1,this._onParameterStateChanged=new t.Emitter,this._previousChartState=[],this._outputCounter=0,this._preventNextChartCache=!1,this.cellPreviewUpdated=new t.Emitter,this.id=`${n++}`,_?this.fromJSON(_):(this._cellType=T.CellTypes.Code,this._source=""),this._isEditMode=!1,this._stdInVisible=!1,A&&A.isTrusted?this._isTrusted=!0:this._isTrusted=!1,this._cellGuid=this._cellGuid||(0,a.generateUuid)(),this._cellType==="code"?this.cellLabel=(0,b.localize)(0,null,this.id):this.cellLabel=(0,b.localize)(1,null,this.id),this.createUri(),this.populatePropertiesFromSettings()}equals(_){return _!==void 0&&_.id===this.id}get onLanguageChanged(){return this._onLanguageChanged.event}get onCollapseStateChanged(){return this._onCollapseStateChanged.event}get onOutputsChanged(){return this._onOutputsChanged.event}get onTableUpdated(){return this._onTableUpdated.event}get onCellEditModeChanged(){return this._onCellEditModeChanged.event}set metadata(_){this._metadata=_,this.sendChangeToNotebook(T.NotebookChangeType.CellMetadataUpdated)}get metadata(){return this._metadata}get attachments(){return this._attachments}set attachments(_){this._attachments=_??{}}addAttachment(_,A,k){let L=A.indexOf("base64,");if(this.isValidBase64OctetStream(A)){A=A.substring(L+7);let R={};R[_]=A,this._attachments||(this._attachments={}),this._attachments[k]&&this._attachments[k][_]!==R[_]&&(k=this.getUniqueAttachmentName(k.substring(0,k.lastIndexOf(".")),k.substring(k.lastIndexOf(".")+1))),this._attachments[k]||(this._attachments[k]=R,this.sendChangeToNotebook(T.NotebookChangeType.CellMetadataUpdated))}return k}isValidBase64OctetStream(_){return _&&w.test(_)}get isEditMode(){return this._isEditMode}get future(){return this._future}get isCollapsed(){return this._isCollapsed}set isCollapsed(_){if(this.cellType!==T.CellTypes.Code)return;let A=this._isCollapsed!==_;this._isCollapsed=_;let k=-1;this._metadata.tags&&(k=this._metadata.tags.findIndex(L=>L===r.HideInputTag)),this._isCollapsed?k===-1&&(this._metadata.tags||(this._metadata.tags=[]),this._metadata.tags.push(r.HideInputTag)):k>-1&&this._metadata.tags.splice(k,1),A&&(this._onCollapseStateChanged.fire(this._isCollapsed),this.sendChangeToNotebook(T.NotebookChangeType.CellInputVisibilityChanged))}set isEditMode(_){if(this._isEditMode!==_){if(this._isEditMode=_,this._isEditMode){const A=this._lastEditMode??this._defaultTextEditMode;this.showPreview=A!==T.TextCellEditModes.Markdown,this.showMarkdown=A!==T.TextCellEditModes.RichText}else this._showMarkdown=!1,this._showPreview=!0;this._onCellEditModeChanged.fire(this._isEditMode)}}get trustedMode(){return this._isTrusted}set trustedMode(_){if(this._isTrusted!==_){this._isTrusted=_;let A={outputs:this._outputs,shouldScroll:!1};this._onOutputsChanged.fire(A)}}get active(){return this._active}set active(_){this._active=_,this.fireExecutionStateChanged()}get hover(){return this._hover}set hover(_){this._hover=_,this.active||this.fireExecutionStateChanged()}get executionCount(){return this._executionCount}set executionCount(_){this._executionCount=_,this.fireExecutionStateChanged()}get cellUri(){return this._cellUri}get notebookModel(){return this._options&&this._options.notebook}set cellUri(_){this._cellUri=_}get cellType(){return this._cellType}set cellType(_){_!==this._cellType&&(this._cellType=_,this._outputs=[],this._outputsIdMap.clear())}get source(){return this._source}set source(_){this.updateAttachmentsFromSource(Array.isArray(_)?_.join():_),_=this.attachImageFromSource(_),_=this.getMultilineSource(_),this._source!==_&&(this._source=_,this.sendChangeToNotebook(T.NotebookChangeType.CellSourceUpdated),this.cellSourceChanged=!0),this._modelContentChangedEvent=void 0,this._preventNextChartCache=!0}attachImageFromSource(_){if(!Array.isArray(_)&&this.isValidBase64OctetStream(_)){let A,k=/<img\s+[^>]*src="([^"]*)"[^>]*>/,L;for(;(A=w.exec(_))!==null&&(L=k.exec(_))!==null&&this.isValidBase64OctetStream(L[1])&&A[0]!==L[1];){let R=this.addAttachment(A[1],A[0],"image.png");_=_.replace(w,`attachment:${R}`)}return _}return _}updateAttachmentsFromSource(_,A){const k=A||this._attachments;this._attachments={};const L=/!\[.*?\]\(attachment:(.*?)\)/g;let R;for(;R=L.exec(_);)this._attachments[R[1]]=k[R[1]]}getUniqueAttachmentName(_,A){let k=0;for(;;){let L=_?`${_}${k}.${A??"png"}`:`image${k}.png`;if(!this._attachments||!this._attachments[L])return L;k++}}get modelContentChangedEvent(){return this._modelContentChangedEvent}set modelContentChangedEvent(_){this._modelContentChangedEvent=_}get language(){return this._cellType===T.CellTypes.Markdown?"markdown":this._language?this._language:this._options.notebook.language}get displayLanguage(){let _;return this._cellType===T.CellTypes.Markdown?_="Markdown":this._languageService?_=this._languageService.getLanguageName(this.language)??this.language:_=this.language,_}get savedConnectionName(){return this._savedConnectionName}get cellGuid(){return this._cellGuid}setOverrideLanguage(_){_!==this._language&&(this._language=_,this._onLanguageChanged.fire(_),this.sendChangeToNotebook(T.NotebookChangeType.CellMetadataUpdated))}get onExecutionStateChange(){return this._onExecutionStateChanged.event}get onCurrentEditModeChanged(){return this._onCurrentEditModeChanged.event}fireExecutionStateChanged(){this._onExecutionStateChanged.fire(this.executionState)}get onLoaded(){return this._onCellLoaded.event}get loaded(){return this._loaded}set loaded(_){this._loaded=_,_&&this._onCellLoaded.fire(this._cellType)}get stdInVisible(){return this._stdInVisible}set stdInVisible(_){this._stdInVisible=_}get showPreview(){return this._showPreview}set showPreview(_){this._showPreview=_,this.doModeUpdates()}get showMarkdown(){return this._showMarkdown}set showMarkdown(_){this._showMarkdown=_,this.doModeUpdates()}doModeUpdates(){this._isEditMode&&(this._lastEditMode=this._showPreview&&this._showMarkdown?T.TextCellEditModes.SplitView:this._showMarkdown?T.TextCellEditModes.Markdown:T.TextCellEditModes.RichText),this._onCurrentEditModeChanged.fire(this.currentMode)}get defaultTextEditMode(){return this._defaultTextEditMode}get cellSourceChanged(){return this._cellSourceChanged}set cellSourceChanged(_){this._cellSourceChanged=_}get onCellPreviewUpdated(){return this.cellPreviewUpdated.event}get onParameterStateChanged(){return this._onParameterStateChanged.event}get isParameter(){return this._isParameter}set isParameter(_){if(this.cellType!==T.CellTypes.Code)return;_=this.notebookModel?.cells?.find(L=>L.isParameter)?!1:_;let A=this._isParameter!==_;this._isParameter=_;let k=-1;this._metadata.tags&&(k=this._metadata.tags.findIndex(L=>L===r.ParametersTag)),this._isParameter?k===-1&&(this._metadata.tags||(this._metadata.tags=[]),this._metadata.tags.push(r.ParametersTag)):k>-1&&this._metadata.tags.splice(k,1),A&&(this._onParameterStateChanged.fire(this._isParameter),this.sendChangeToNotebook(T.NotebookChangeType.CellInputVisibilityChanged))}get isInjectedParameter(){return this._isInjectedParameter}set isInjectedParameter(_){if(this.cellType!==T.CellTypes.Code)return;this._isInjectedParameter=_;let A=-1;this._metadata.tags&&(A=this._metadata.tags.findIndex(k=>k===r.InjectedParametersTag)),this._isInjectedParameter?A===-1&&(this._metadata.tags||(this._metadata.tags=[]),this._metadata.tags.push(r.InjectedParametersTag)):A>-1&&this._metadata.tags.splice(A,1)}notifyExecutionComplete(){this._notebookService&&this._notebookService.serializeNotebookStateChange(this.notebookModel.notebookUri,T.NotebookChangeType.CellExecuted,this).catch(_=>(0,h.onUnexpectedError)(_))}get executionState(){return this._future&&this._future.inProgress?f.CellExecutionState.Running:this.active||this.hover?f.CellExecutionState.Stopped:f.CellExecutionState.Hidden}async runCell(_,A){let k;try{if((0,c.alert)((0,b.localize)(2,null)),!this.active&&this!==this.notebookModel.activeCell&&(this.notebookModel.updateActiveCell(this),this.active=!0),this.cellType!==T.CellTypes.Code||(k=await this.getOrStartKernel(_),!k))return!1;if(this._outputCounter=0,this._commandService.executeCommand("hideSuggestWidget"),this.notebookModel.sendNotebookTelemetryActionEvent("RunCell",{cell_language:k.name,azdata_cell_guid:this._cellGuid}),this.future&&this.future.inProgress)this._stdInVisible&&this._stdInHandler&&this.future.sendInputReply({value:""}),this.future.inProgress=!1,await k.interrupt(),this.sendNotification(_,v.Severity.Info,(0,b.localize)(3,null));else{if(k.requiresConnection&&!this.notebookModel.context&&!await this.notebookModel.requestConnection())return!1;let L=this.source;if(Array.isArray(L)&&L.length>0||!Array.isArray(L)&&L)if(this.notebookModel.trustedMode=!0,L=Array.isArray(L)?L.join(""):L,(0,s.tryMatchCellMagic)(this.source[0])!==g||!this._isCommandExecutionSettingEnabled){const R=k.requestExecute({code:L,stop_on_error:!0,language:this.language},!1);this.setFuture(R),this.fireExecutionStateChanged(),this.notebookModel.onCellChange(this,T.NotebookChangeType.CellExecutionStarted),this._notebookService?.notifyCellExecutionStarted();let M=await R.done;if(M&&M.content&&(this.executionCount=M.content.execution_count,M.content.status!=="ok"))return!1}else{let R=(0,s.extractCellMagicCommandPlusArgs)(this._source[0],g);if(R?.commandId!=="_workbench.downloadResource")try{this._outputs=[],this._outputsIdMap.clear();let M=this._commandService?.executeCommand(R.commandId,R.args);this.fireExecutionStateChanged(),this._notebookService?.notifyCellExecutionStarted(),await M,R?.commandId!=="workbench.action.files.saveFiles"&&this.handleIOPub(this.toIOPubMessage(!1))}catch(M){return this.handleIOPub(this.toIOPubMessage(!0,M?.message)),!1}}}}catch(L){let R;L.message==="Canceled"?R=(0,b.localize)(4,null):R=(0,h.getErrorMessage)(L),this.notebookModel.sendNotebookTelemetryActionEvent("CellExecutionFailed",{kernel:k,reason:L.message==="Canceled"?"Canceled":"Other"}),this.sendNotification(_,v.Severity.Error,R)}finally{this.disposeFuture(),this.fireExecutionStateChanged(),this.sendChangeToNotebook(T.NotebookChangeType.CellOutputUpdated),this.notifyExecutionComplete(),(0,c.alert)((0,b.localize)(5,null))}return!0}async getOrStartKernel(_){let A=this._options.notebook;A&&await A.sessionLoadFinished;let k=A&&A.clientSession;if(k)(!k.isReady||k.status==="dead")&&(this.sendNotification(_,v.Severity.Info,(0,b.localize)(7,null)),await k.kernelChangeCompleted);else{this.sendNotification(_,v.Severity.Error,(0,b.localize)(6,null));return}if(!k.kernel){let L=A&&A.defaultKernel;if(!L){this.sendNotification(_,v.Severity.Error,(0,b.localize)(8,null));return}await k.changeKernel(L)}return k.kernel}sendNotification(_,A,k){_&&_.notify({severity:A,message:k})}setFuture(_){this._future!==_&&(this._isTrusted=!0,this._future&&this._future.dispose(),this.clearOutputs(!0),this._future=_,_.setReplyHandler({handle:A=>this.handleReply(A)}),_.setIOPubHandler({handle:A=>this.handleIOPub(A)}),_.setStdInHandler({handle:A=>this.handleStdIn(A)}))}clearOutputs(_=!1){_?this.cacheChartStateIfExists():this.clearPreviousChartState(),this._outputs=[],this._outputsIdMap.clear(),this.fireOutputsChanged(),this.executionCount=void 0}get previousChartState(){return this._previousChartState}fireOutputsChanged(_=!1){let A={outputs:this.outputs,shouldScroll:!!_};this._onOutputsChanged.fire(A),this.outputs.length===0&&this.sendChangeToNotebook(T.NotebookChangeType.CellOutputCleared)}sendChangeToNotebook(_){this._options&&this._options.notebook&&this._options.notebook.onCellChange(this,_)}get outputs(){return this._outputs}getOutputId(_){return this._outputsIdMap.get(_)}get renderedOutputTextContent(){return this._renderedOutputTextContent}set renderedOutputTextContent(_){this._renderedOutputTextContent=_}handleReply(_){this._future.inProgress||this.disposeFuture()}handleIOPub(_){let A=_.header.msg_type,k,L=!1;switch(A){case"execute_result":k=_.content,k.output_type=A;for(let M=0;M<this._outputs.length;M++)if(this._outputs[M].output_type==="execute_result"){let N=this._outputsIdMap.get(this._outputs[M]);if(N.batchId===_.metadata.batchId&&N.id===_.metadata.id){this._outputs[M].data=k.data,L=!0;break}}L||(this._previousChartState[this._outputCounter]&&(k.metadata||(k.metadata={}),k.metadata.azdata_chartOptions=this._previousChartState[this._outputCounter]),this._outputsIdMap.set(k,{batchId:_.metadata.batchId,id:_.metadata.id}),this._outputCounter++);break;case"execute_result_update":let R=_.content;this._onTableUpdated.fire({resultSet:R.resultSet,rows:R.data});break;case"display_data":if(k=_.content,k.output_type=A,this._outputs.length>0){for(let M=0;M<this._outputs.length;M++)if(this._outputs[M].output_type==="execute_result"){delete k.transient,this._outputs.splice(M,0,k),this.fireOutputsChanged(),L=!0;break}}break;case"stream":case"error":k=_.content,k.output_type=A;break;case"clear_output":this.clearOutputs();break;case"update_display_data":k=_.content,k.output_type="display_data";break;default:break}if(k&&!L){delete k.transient,this._outputs.push(k);let R=this._outputs.length===1;this.fireOutputsChanged(R)}}setStdInHandler(_){this._stdInHandler=_}handleStdIn(_){let A=async()=>{if(this._stdInHandler)try{await this._stdInHandler.handle(_)}catch{this.future&&this.future.sendInputReply({value:""})}};return this.sendChangeToNotebook(T.NotebookChangeType.CellAwaitingInput),A()}toJSON(){let _=this._metadata||{},A={cell_type:this._cellType,source:this._source,metadata:_};return A.metadata.azdata_cell_guid=this._cellGuid,this._cellType===T.CellTypes.Code?(A.metadata.language=this._language,A.metadata.tags=_.tags,A.outputs=this._outputs,A.execution_count=this.executionCount?this.executionCount:null,this._configurationService?.getValue("notebook.saveConnectionName")&&(_.connection_name=this._savedConnectionName)):this._cellType===T.CellTypes.Markdown&&this._attachments&&(A.attachments=this._attachments),A}fromJSON(_){if(_&&(this._cellType=_.cell_type,this.executionCount=_.execution_count,this._source=this.getMultilineSource(_.source),this._metadata=_.metadata||{},this._metadata.tags&&this._cellType===T.CellTypes.Code?(this._isCollapsed=this._metadata.tags.some(A=>A===r.HideInputTag),this._isParameter=this._metadata.tags.some(A=>A===r.ParametersTag),this._isInjectedParameter=this._metadata.tags.some(A=>A===r.InjectedParametersTag)):(this._isCollapsed=!1,this._isParameter=!1,this._isInjectedParameter=!1),this._attachments=_.attachments,this._cellGuid=_.metadata&&_.metadata.azdata_cell_guid?_.metadata.azdata_cell_guid:(0,a.generateUuid)(),this.setLanguageFromContents(_.cell_type,_.metadata),this._savedConnectionName=this._metadata.connection_name,_.outputs))for(let A of _.outputs)this.addOutput(A)}get currentMode(){return this._cellType===T.CellTypes.Code?f.CellEditModes.CODE:this._showMarkdown&&this._showPreview?f.CellEditModes.SPLIT:this._showMarkdown&&!this._showPreview?f.CellEditModes.MARKDOWN:f.CellEditModes.WYSIWYG}processEdits(_){for(const A of _)switch(A.type){case 0:const k=A;k.append?this._outputs.push(...k.outputs):this._outputs=k.outputs;break;case 1:const L=A,R=this._outputs.findIndex(M=>L.outputId===M.id);if(R>-1){const M=this._outputs[R],N=A.append?Object.assign(M.data,L.data):L.data;M.data=N,this._outputs[R]=Object.assign({},M)}else this._logService.warn(`Unable to find output with ID ${L.outputId} when processing ReplaceOutputData`);break}this.fireOutputsChanged(!1)}setLanguageFromContents(_,A){_===T.CellTypes.Markdown?this._language="markdown":A?.language?this._language=A.language:this._language=this._options?.notebook?.language}addOutput(_){this._normalize(_),this._outputs.push(_)}_normalize(_){D.isStream(_)&&Array.isArray(_.text)&&(_.text=_.text.join(` `))}createUri(){let _=y.URI.from({scheme:m.Schemas.untitled,path:`${l.CELL_URI_PATH_PREFIX}${this.id}`});this.cellUri=_}getMultilineSource(_){if(_===void 0)return[];if(typeof _=="string"){let A=_.split(` `);if(A.length===1)return[_];if(A.length===0)return[];for(let k=0;k<A.length-1;k++)A[k]+=` `;return A}return _}toIOPubMessage(_,A){return{channel:"iopub",type:"iopub",header:{msg_id:void 0,msg_type:_?"error":"display_data"},content:_?{output_type:"error",evalue:A,ename:"",traceback:[]}:{output_type:"execute_result",data:{"text/html":(0,b.localize)(9,null)}},metadata:void 0,parent_header:void 0}}disposeFuture(){this._future&&this._future.dispose(),this._future=void 0}populatePropertiesFromSettings(){if(this._configurationService){const _="notebook.defaultTextEditMode";this._defaultTextEditMode=this._configurationService.getValue(_);const A="notebook.allowAzureDataStudioCommands";this._isCommandExecutionSettingEnabled=this._configurationService.getValue(A),this._register(this._configurationService.onDidChangeConfiguration(k=>{k.affectsConfiguration(A)?this._isCommandExecutionSettingEnabled=this._configurationService.getValue(A):k.affectsConfiguration(_)&&(this._defaultTextEditMode=this._configurationService.getValue(_))}))}}cacheChartStateIfExists(){this.clearPreviousChartState(),this._preventNextChartCache||this._outputs?.forEach(_=>{C(_)&&(_.metadata?.azdata_chartOptions?this._previousChartState.push(_.metadata.azdata_chartOptions):this._previousChartState.push(void 0))}),this._preventNextChartCache=!1}clearPreviousChartState(){this._previousChartState=[]}};e.CellModel=E,e.CellModel=E=fe([O(2,S.INotebookService),O(3,i.ICommandService),O(4,o.IConfigurationService),O(5,d.ILogService),O(6,p.ILanguageService)],E);function C(I){return I.data?.["application/vnd.dataresource+json"]}}),define(Q[3245],Y([1,0,1173,2215]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelFactory=void 0;class b{constructor(T){this.instantiationService=T}createCell(T,f){return this.instantiationService.createInstance(t.CellModel,T,f)}createClientSession(T){return this.instantiationService.createInstance(y.ClientSession,T)}}e.ModelFactory=b}),define(Q[277],Y([1,0,240,20,14,62,69,186,22,18,10,2457,49,3182,580,25,5,41,16]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalSelectionTransfer=e.Extensions=e.containsDragType=e.extractFileListData=e.createDraggedEditorInputFromRawResourcesData=e.extractEditorsAndFilesDropData=e.extractEditorsDropData=e.CodeDataTransfers=void 0,e.CodeDataTransfers={EDITORS:"CodeEditors",FILES:"CodeFiles"};function p(_){const A=[];if(_.dataTransfer&&_.dataTransfer.types.length>0){const R=_.dataTransfer.getData(e.CodeDataTransfers.EDITORS);if(R)try{A.push(...(0,f.parse)(R))}catch{}else try{const P=_.dataTransfer.getData(t.DataTransfers.RESOURCES);A.push(...l(P))}catch{}if(_.dataTransfer?.files)for(let P=0;P<_.dataTransfer.files.length;P++){const x=_.dataTransfer.files[P];if(x&&x.path)try{A.push({resource:S.URI.file(x.path),isExternal:!0,allowWorkspaceOpen:!0})}catch{}}const M=_.dataTransfer.getData(e.CodeDataTransfers.FILES);if(M)try{const P=JSON.parse(M);for(const x of P)A.push({resource:S.URI.file(x),isExternal:!0,allowWorkspaceOpen:!0})}catch{}const N=d.Registry.as(e.Extensions.DragAndDropContribution).getAll();for(const P of N){const x=_.dataTransfer.getData(P.dataFormatKey);if(x)try{A.push(...P.getEditorInputs(x))}catch{}}}const k=[],L=new T.ResourceMap;for(const R of A)R.resource?L.has(R.resource)||(k.push(R),L.set(R.resource,!0)):k.push(R);return k}e.extractEditorsDropData=p;async function c(_,A){const k=p(A);if(A.dataTransfer&&m.isWeb&&E(A,t.DataTransfers.FILES)&&A.dataTransfer.items){const M=await _.get(o.IInstantiationService).invokeFunction(N=>n(N,A));for(const N of M)k.push({resource:N.resource,contents:N.contents?.toString(),isExternal:!0,allowWorkspaceOpen:N.isDirectory})}return k}e.extractEditorsAndFilesDropData=c;function l(_){const A=[];if(_){const k=JSON.parse(_);for(const L of k)if(L.indexOf(":")>0){const{selection:R,uri:M}=(0,u.extractSelection)(S.URI.parse(L));A.push({resource:M,options:{selection:R}})}}return A}e.createDraggedEditorInputFromRawResourcesData=l;async function n(_,A){if(i.WebFileSystemAccess.supported(window)){const L=A.dataTransfer?.items;if(L)return g(_,L)}const k=A.dataTransfer?.files;return k?w(_,k):[]}async function g(_,A){const k=_.get(s.IFileService).getProvider(v.Schemas.file);if(!(k instanceof r.HTMLFileSystemProvider))return[];const L=[];for(let R=0;R<A.length;R++){const M=A[R];if(M){const N=new b.DeferredPromise;L.push(N),(async()=>{try{const P=await M.getAsFileSystemHandle();if(!P){N.complete(void 0);return}i.WebFileSystemAccess.isFileSystemFileHandle(P)?N.complete({resource:await k.registerFileHandle(P),isDirectory:!1}):i.WebFileSystemAccess.isFileSystemDirectoryHandle(P)?N.complete({resource:await k.registerDirectoryHandle(P),isDirectory:!0}):N.complete(void 0)}catch{N.complete(void 0)}})()}}return(0,y.coalesce)(await Promise.all(L.map(R=>R.p)))}async function w(_,A){const k=_.get(a.IDialogService),L=[];for(let R=0;R<A.length;R++){const M=A.item(R);if(M){if(M.size>100*s.ByteSize.MB){k.warn((0,h.localize)(0,null));continue}const N=new b.DeferredPromise;L.push(N);const P=new FileReader;P.onerror=()=>N.complete(void 0),P.onabort=()=>N.complete(void 0),P.onload=async x=>{const F=M.name,V=x.target?.result??void 0;if(typeof F!="string"||typeof V>"u"){N.complete(void 0);return}N.complete({resource:S.URI.from({scheme:v.Schemas.untitled,path:F}),contents:typeof V=="string"?D.VSBuffer.fromString(V):D.VSBuffer.wrap(new Uint8Array(V))})},P.readAsArrayBuffer(M)}}return(0,y.coalesce)(await Promise.all(L.map(R=>R.p)))}e.extractFileListData=w;function E(_,...A){if(!_.dataTransfer)return!1;const k=_.dataTransfer.types,L=[];for(let R=0;R<k.length;R++)L.push(k[R].toLowerCase());for(const R of A)if(L.indexOf(R.toLowerCase())>=0)return!0;return!1}e.containsDragType=E;class C{constructor(){this._contributions=new Map}register(A){if(this._contributions.has(A.dataFormatKey))throw new Error(`A drag and drop contributiont with key '${A.dataFormatKey}' was already registered.`);this._contributions.set(A.dataFormatKey,A)}getAll(){return this._contributions.values()}}e.Extensions={DragAndDropContribution:"workbench.contributions.dragAndDrop"},d.Registry.add(e.Extensions.DragAndDropContribution,new C);class I{static{this.INSTANCE=new I}constructor(){}static getInstance(){return I.INSTANCE}hasData(A){return A&&A===this.proto}clearData(A){this.hasData(A)&&(this.proto=void 0,this.data=void 0)}getData(A){if(this.hasData(A))return this.data}setData(A,k){k&&(this.data=A,this.proto=k)}}e.LocalSelectionTransfer=I}),define(Q[874],Y([1,0,240,365,197,10,277]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toExternalVSDataTransfer=e.toVSDataTransfer=void 0;function f(h){const a=new y.VSDataTransfer;for(const r of h.items){const i=r.type;if(r.kind==="string"){const s=new Promise(o=>r.getAsString(o));a.append(i,(0,y.createStringDataTransferItem)(s))}else if(r.kind==="file"){const s=r.getAsFile();s&&a.append(i,v(s))}}return a}e.toVSDataTransfer=f;function v(h){const a=h.path?D.URI.parse(h.path):void 0;return(0,y.createFileDataTransferItem)(h.name,a,async()=>new Uint8Array(await h.arrayBuffer()))}const m=Object.freeze([T.CodeDataTransfers.EDITORS,T.CodeDataTransfers.FILES,t.DataTransfers.RESOURCES,t.DataTransfers.INTERNAL_URI_LIST]);function S(h,a=!1){const r=f(h),i=r.get(t.DataTransfers.INTERNAL_URI_LIST);if(i)r.replace(b.Mimes.uriList,i);else if(a||!r.has(b.Mimes.uriList)){const s=[];for(const o of h.items){const u=o.getAsFile();if(u){const d=u.path;try{d?s.push(D.URI.file(d).toString()):s.push(D.URI.parse(u.name,!0).toString())}catch{}}}s.length&&r.replace(b.Mimes.uriList,(0,y.createStringDataTransferItem)(y.UriList.create(s)))}for(const s of m)r.delete(s);return r}e.toExternalVSDataTransfer=S}),define(Q[219],Y([1,0,6,16]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function b(f){return f.length>0&&f.charAt(f.length-1)==="#"?f.substring(0,f.length-1):f}class D{constructor(){this._onDidChangeSchema=new t.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}registerSchema(v,m){this.schemasById[b(v)]=m,this._onDidChangeSchema.fire(v)}notifySchemaChanged(v){this._onDidChangeSchema.fire(v)}getSchemaContributions(){return{schemas:this.schemasById}}}const T=new D;y.Registry.add(e.Extensions.JSONContribution,T)}),define(Q[56],Y([1,0,20,6,17,2451,9,219,16]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getScopes=e.validateProperty=e.getDefaultValue=e.keyFromOverrideIdentifiers=e.overrideIdentifiersFromKey=e.OVERRIDE_PROPERTY_REGEX=e.OVERRIDE_PROPERTY_PATTERN=e.configurationDefaultsSchemaId=e.resourceLanguageSettingsSchemaId=e.resourceSettings=e.windowSettings=e.machineOverridableSettings=e.machineSettings=e.applicationSettings=e.allSettings=e.ConfigurationScope=e.Extensions=e.EditPresentationTypes=void 0;var m;(function(l){l.Multiline="multilineText",l.Singleline="singlelineText"})(m||(e.EditPresentationTypes=m={})),e.Extensions={Configuration:"base.contributions.configuration"};var S;(function(l){l[l.APPLICATION=1]="APPLICATION",l[l.MACHINE=2]="MACHINE",l[l.WINDOW=3]="WINDOW",l[l.RESOURCE=4]="RESOURCE",l[l.LANGUAGE_OVERRIDABLE=5]="LANGUAGE_OVERRIDABLE",l[l.MACHINE_OVERRIDABLE=6]="MACHINE_OVERRIDABLE"})(S||(e.ConfigurationScope=S={})),e.allSettings={properties:{},patternProperties:{}},e.applicationSettings={properties:{},patternProperties:{}},e.machineSettings={properties:{},patternProperties:{}},e.machineOverridableSettings={properties:{},patternProperties:{}},e.windowSettings={properties:{},patternProperties:{}},e.resourceSettings={properties:{},patternProperties:{}},e.resourceLanguageSettingsSchemaId="vscode://schemas/settings/resourceLanguage",e.configurationDefaultsSchemaId="vscode://schemas/settings/configurationDefaults";const h=v.Registry.as(f.Extensions.JSONContribution);class a{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new y.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidUpdateConfiguration=new y.Emitter,this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:D.localize(0,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},h.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(n,g=!0){this.registerConfigurations([n],g)}registerConfigurations(n,g=!0){const w=new Set;this.doRegisterConfigurations(n,g,w),h.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:w})}deregisterConfigurations(n){const g=new Set;this.doDeregisterConfigurations(n,g),h.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:g})}updateConfigurations({add:n,remove:g}){const w=new Set;this.doDeregisterConfigurations(g,w),this.doRegisterConfigurations(n,!1,w),h.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:w})}registerDefaultConfigurations(n){const g=new Set;this.doRegisterDefaultConfigurations(n,g),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:g,defaultsOverrides:!0})}doRegisterDefaultConfigurations(n,g){const w=[];for(const{overrides:E,source:C}of n)for(const I in E)if(g.add(I),e.OVERRIDE_PROPERTY_REGEX.test(I)){const _=this.configurationDefaultsOverrides.get(I),A=_?.valuesSources??new Map;if(C)for(const M of Object.keys(E[I]))A.set(M,C);const k={..._?.value||{},...E[I]};this.configurationDefaultsOverrides.set(I,{source:C,value:k,valuesSources:A});const L=(0,T.getLanguageTagSettingPlainKey)(I),R={type:"object",default:k,description:D.localize(1,null,L),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:k,source:b.isString(C)?void 0:C,defaultValueSource:C};w.push(...s(I)),this.configurationProperties[I]=R,this.defaultLanguageConfigurationOverridesNode.properties[I]=R}else{this.configurationDefaultsOverrides.set(I,{value:E[I],source:C});const _=this.configurationProperties[I];_&&(this.updatePropertyDefaultValue(I,_),this.updateSchema(I,_))}this.doRegisterOverrideIdentifiers(w)}deregisterDefaultConfigurations(n){const g=new Set;this.doDeregisterDefaultConfigurations(n,g),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:g,defaultsOverrides:!0})}doDeregisterDefaultConfigurations(n,g){for(const{overrides:w,source:E}of n)for(const C in w){const I=this.configurationDefaultsOverrides.get(C),_=b.isString(E)?E:E?.id,A=b.isString(I?.source)?I?.source:I?.source?.id;if(_===A)if(g.add(C),this.configurationDefaultsOverrides.delete(C),e.OVERRIDE_PROPERTY_REGEX.test(C))delete this.configurationProperties[C],delete this.defaultLanguageConfigurationOverridesNode.properties[C];else{const k=this.configurationProperties[C];k&&(this.updatePropertyDefaultValue(C,k),this.updateSchema(C,k))}}this.updateOverridePropertyPatternKey()}deltaConfiguration(n){let g=!1;const w=new Set;n.removedDefaults&&(this.doDeregisterDefaultConfigurations(n.removedDefaults,w),g=!0),n.addedDefaults&&(this.doRegisterDefaultConfigurations(n.addedDefaults,w),g=!0),n.removedConfigurations&&this.doDeregisterConfigurations(n.removedConfigurations,w),n.addedConfigurations&&this.doRegisterConfigurations(n.addedConfigurations,!1,w),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:w,defaultsOverrides:g})}notifyConfigurationSchemaUpdated(...n){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(n){this.doRegisterOverrideIdentifiers(n),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(n){for(const g of n)this.overrideIdentifiers.add(g);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(n,g,w){n.forEach(E=>{this.validateAndRegisterProperties(E,g,E.extensionInfo,E.restrictedProperties,void 0,w),this.configurationContributors.push(E),this.registerJSONConfiguration(E)})}doDeregisterConfigurations(n,g){const w=E=>{if(E.properties)for(const C in E.properties){g.add(C);const I=this.configurationProperties[C];I?.policy?.name&&this.policyConfigurations.delete(I.policy.name),delete this.configurationProperties[C],this.removeFromSchema(C,E.properties[C])}E.allOf?.forEach(C=>w(C))};for(const E of n){w(E);const C=this.configurationContributors.indexOf(E);C!==-1&&this.configurationContributors.splice(C,1)}}validateAndRegisterProperties(n,g=!0,w,E,C=3,I){C=b.isUndefinedOrNull(n.scope)?C:n.scope;const _=n.properties;if(_)for(const k in _){const L=_[k];if(g&&p(k,L)){delete _[k];continue}if(L.source=w,L.defaultDefaultValue=_[k].default,this.updatePropertyDefaultValue(k,L),e.OVERRIDE_PROPERTY_REGEX.test(k)?L.scope=void 0:(L.scope=b.isUndefinedOrNull(L.scope)?C:L.scope,L.restricted=b.isUndefinedOrNull(L.restricted)?!!E?.includes(k):L.restricted),_[k].hasOwnProperty("included")&&!_[k].included){this.excludedConfigurationProperties[k]=_[k],delete _[k];continue}else this.configurationProperties[k]=_[k],_[k].policy?.name&&this.policyConfigurations.set(_[k].policy.name,k);!_[k].deprecationMessage&&_[k].markdownDeprecationMessage&&(_[k].deprecationMessage=_[k].markdownDeprecationMessage),I.add(k)}const A=n.allOf;if(A)for(const k of A)this.validateAndRegisterProperties(k,g,w,E,C,I)}getConfigurations(){return this.configurationContributors}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}getConfigurationDefaultsOverrides(){return this.configurationDefaultsOverrides}registerJSONConfiguration(n){const g=w=>{const E=w.properties;if(E)for(const I in E)this.updateSchema(I,E[I]);w.allOf?.forEach(g)};g(n)}updateSchema(n,g){switch(e.allSettings.properties[n]=g,g.scope){case 1:e.applicationSettings.properties[n]=g;break;case 2:e.machineSettings.properties[n]=g;break;case 6:e.machineOverridableSettings.properties[n]=g;break;case 3:e.windowSettings.properties[n]=g;break;case 4:e.resourceSettings.properties[n]=g;break;case 5:e.resourceSettings.properties[n]=g,this.resourceLanguageSettingsSchema.properties[n]=g;break}}removeFromSchema(n,g){switch(delete e.allSettings.properties[n],g.scope){case 1:delete e.applicationSettings.properties[n];break;case 2:delete e.machineSettings.properties[n];break;case 6:delete e.machineOverridableSettings.properties[n];break;case 3:delete e.windowSettings.properties[n];break;case 4:case 5:delete e.resourceSettings.properties[n],delete this.resourceLanguageSettingsSchema.properties[n];break}}updateOverridePropertyPatternKey(){for(const n of this.overrideIdentifiers.values()){const g=`[${n}]`,w={type:"object",description:D.localize(2,null),errorMessage:D.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(g,w),e.allSettings.properties[g]=w,e.applicationSettings.properties[g]=w,e.machineSettings.properties[g]=w,e.machineOverridableSettings.properties[g]=w,e.windowSettings.properties[g]=w,e.resourceSettings.properties[g]=w}}registerOverridePropertyPatternKey(){const n={type:"object",description:D.localize(4,null),errorMessage:D.localize(5,null),$ref:e.resourceLanguageSettingsSchemaId};e.allSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.applicationSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.machineSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.machineOverridableSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.windowSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,e.resourceSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=n,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(n,g){const w=this.configurationDefaultsOverrides.get(n);let E=w?.value,C=w?.source;b.isUndefined(E)&&(E=g.defaultDefaultValue,C=void 0),b.isUndefined(E)&&(E=u(g.type)),g.default=E,g.defaultValueSource=C}}const r="\\[([^\\]]+)\\]",i=new RegExp(r,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${r})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function s(l){const n=[];if(e.OVERRIDE_PROPERTY_REGEX.test(l)){let g=i.exec(l);for(;g?.length;){const w=g[1].trim();w&&n.push(w),g=i.exec(l)}}return(0,t.distinct)(n)}e.overrideIdentifiersFromKey=s;function o(l){return l.reduce((n,g)=>`${n}[${g}]`,"")}e.keyFromOverrideIdentifiers=o;function u(l){switch(Array.isArray(l)?l[0]:l){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=u;const d=new a;v.Registry.add(e.Extensions.Configuration,d);function p(l,n){return l.trim()?e.OVERRIDE_PROPERTY_REGEX.test(l)?D.localize(7,null,l):d.getConfigurationProperties()[l]!==void 0?D.localize(8,null,l):n.policy?.name&&d.getPolicyConfigurations().get(n.policy?.name)!==void 0?D.localize(9,null,l,n.policy?.name,d.getPolicyConfigurations().get(n.policy?.name)):null:D.localize(6,null)}e.validateProperty=p;function c(){const l=[],n=d.getConfigurationProperties();for(const g of Object.keys(n))l.push([g,n[g].scope]);return l.push(["launch",4]),l.push(["task",4]),l}e.getScopes=c}),define(Q[3246],Y([1,0,56,16,1993]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const D=y.Registry.as(t.Extensions.Configuration),T={id:"builtinCharts",type:"object",title:b.localize(0,null),properties:{"builtinCharts.maxRowCount":{type:"number",default:300,description:b.localize(1,null)}}};D.registerConfiguration(T)}),define(Q[1174],Y([1,0,56,16,2122,779,667]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USE_ASYNC_SERVER_TREE_CONFIG=e.SERVER_GROUP_AUTOEXPAND_CONFIG=void 0;const f=y.Registry.as(t.Extensions.Configuration);e.SERVER_GROUP_AUTOEXPAND_CONFIG="autoExpand";const v={id:"serverGroup",type:"object",title:(0,b.localize)(0,null),order:2,properties:{[`${D.SERVER_GROUP_CONFIG}.${e.SERVER_GROUP_AUTOEXPAND_CONFIG}`]:{order:2,type:"boolean",description:(0,b.localize)(1,null),default:"true"},[`${D.SERVER_GROUP_CONFIG}.${D.SERVER_GROUP_COLORS_CONFIG}`]:{type:"array",items:"string",order:3,description:(0,b.localize)(2,null),default:["#A1634D","#7F0000","#914576","#6E9B59","#5F82A5","#4452A6","#6A6599",T.DefaultServerGroupColor]}}};e.USE_ASYNC_SERVER_TREE_CONFIG="serverTree.useAsyncServerTree";const m={id:"serverTree",title:(0,b.localize)(3,null),type:"object",order:1,properties:{["serverTree.useAsyncServerTree"]:{type:"boolean",default:!0,description:(0,b.localize)(4,null)}}};f.registerConfiguration(m),f.registerConfiguration(v)}),define(Q[3247],Y([1,0,56,16,2140,133,143]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var f=D.EDITOR_FONT_DEFAULTS;const v=y.Registry.as(t.Extensions.Configuration),m={id:"resultsGrid",type:"object",title:b.localize(0,null),properties:{"resultsGrid.fontFamily":{type:"string",default:f.fontFamily,description:b.localize(1,null)},"resultsGrid.fontWeight":{type:"string",enum:["normal","bold","100","200","300","400","500","600","700","800","900"],default:f.fontWeight,description:b.localize(2,null)},"resultsGrid.fontSize":{type:"number",default:f.fontSize,description:b.localize(3,null)},"resultsGrid.letterSpacing":{type:"number",default:f.letterSpacing,description:b.localize(4,null)},"resultsGrid.rowHeight":{type:"number",default:T.RESULTS_GRID_DEFAULTS.rowHeight,description:b.localize(5,null)},"resultsGrid.cellPadding":{oneOf:[{type:"number"},{type:"array",items:{type:"number"}}],default:T.RESULTS_GRID_DEFAULTS.cellPadding,description:b.localize(6,null)},"resultsGrid.autoSizeColumns":{type:"boolean",default:!0,description:b.localize(7,null)},"resultsGrid.maxColumnWidth":{type:"number",default:400,description:b.localize(8,null)},"resultsGrid.showJsonAsLink":{type:"boolean",description:b.localize(9,null),default:!0}}};v.registerConfiguration(m)}),define(Q[456],Y([1,0,1066,133,660,2346,56,16]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDiffEditorConfigurationKey=e.isEditorConfigurationKey=e.editorConfigurationBaseNode=void 0,e.editorConfigurationBaseNode=Object.freeze({id:"editor",order:5,type:"object",title:D.localize(0,null),scope:5});const v={...e.editorConfigurationBaseNode,properties:{"editor.tabSize":{type:"number",default:b.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:D.localize(1,null,"`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:D.localize(2,null)},"editor.insertSpaces":{type:"boolean",default:b.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:D.localize(3,null,"`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:b.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:D.localize(4,null,"`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:b.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:D.localize(5,null)},"editor.largeFileOptimizations":{type:"boolean",default:b.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:D.localize(6,null)},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:D.localize(7,null)},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[D.localize(8,null),D.localize(9,null),D.localize(10,null)],description:D.localize(11,null)},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[D.localize(12,null),D.localize(13,null),D.localize(14,null)],default:"configuredByTheme",description:D.localize(15,null)},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:D.localize(16,null)},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:D.localize(17,null)},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:D.localize(18,null),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:D.localize(19,null)},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:D.localize(20,null),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:D.localize(21,null),items:{type:"array",items:[{type:"string",description:D.localize(22,null)},{type:"string",description:D.localize(23,null)}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:D.localize(24,null),items:{type:"array",items:[{type:"string",description:D.localize(25,null)},{type:"string",description:D.localize(26,null)}]}},"diffEditor.maxComputationTime":{type:"number",default:t.diffEditorDefaultOptions.maxComputationTime,description:D.localize(27,null)},"diffEditor.maxFileSize":{type:"number",default:t.diffEditorDefaultOptions.maxFileSize,description:D.localize(28,null)},"diffEditor.renderSideBySide":{type:"boolean",default:t.diffEditorDefaultOptions.renderSideBySide,description:D.localize(29,null)},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:t.diffEditorDefaultOptions.renderSideBySideInlineBreakpoint,description:D.localize(30,null)},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:t.diffEditorDefaultOptions.useInlineViewWhenSpaceIsLimited,description:D.localize(31,null)},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:t.diffEditorDefaultOptions.renderMarginRevertIcon,description:D.localize(32,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:t.diffEditorDefaultOptions.ignoreTrimWhitespace,description:D.localize(33,null)},"diffEditor.renderIndicators":{type:"boolean",default:t.diffEditorDefaultOptions.renderIndicators,description:D.localize(34,null)},"diffEditor.codeLens":{type:"boolean",default:t.diffEditorDefaultOptions.diffCodeLens,description:D.localize(35,null)},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:t.diffEditorDefaultOptions.diffWordWrap,markdownEnumDescriptions:[D.localize(36,null),D.localize(37,null),D.localize(38,null,"`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:t.diffEditorDefaultOptions.diffAlgorithm,markdownEnumDescriptions:[D.localize(39,null),D.localize(40,null)],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:t.diffEditorDefaultOptions.hideUnchangedRegions.enabled,markdownDescription:D.localize(41,null,"`#diffEditor.experimental.useVersion2#`")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:t.diffEditorDefaultOptions.hideUnchangedRegions.revealLineCount,markdownDescription:D.localize(42,null,"`#diffEditor.experimental.useVersion2#`"),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:t.diffEditorDefaultOptions.hideUnchangedRegions.minimumLineCount,markdownDescription:D.localize(43,null,"`#diffEditor.experimental.useVersion2#`"),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:t.diffEditorDefaultOptions.hideUnchangedRegions.contextLineCount,markdownDescription:D.localize(44,null,"`#diffEditor.experimental.useVersion2#`"),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:t.diffEditorDefaultOptions.experimental.showMoves,markdownDescription:D.localize(45,null,"`#diffEditor.experimental.useVersion2#`")},"diffEditor.experimental.useVersion2":{type:"boolean",default:!1,description:D.localize(46,null),tags:["experimental"]},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:t.diffEditorDefaultOptions.experimental.showEmptyDecorations,description:D.localize(47,null)}}};function m(s){return typeof s.type<"u"||typeof s.anyOf<"u"}for(const s of y.editorOptionsRegistry){const o=s.schema;if(typeof o<"u")if(m(o))v.properties[`editor.${s.name}`]=o;else for(const u in o)Object.hasOwnProperty.call(o,u)&&(v.properties[u]=o[u])}let S=null;function h(){return S===null&&(S=Object.create(null),Object.keys(v.properties).forEach(s=>{S[s]=!0})),S}function a(s){return h()[`editor.${s}`]||!1}e.isEditorConfigurationKey=a;function r(s){return h()[`diffEditor.${s}`]||!1}e.isDiffEditorConfigurationKey=r,f.Registry.as(T.Extensions.Configuration).registerConfiguration(v)}),define(Q[146],Y([1,0,2356,6,16,197,56]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PLAINTEXT_EXTENSION=e.PLAINTEXT_LANGUAGE_ID=e.ModesRegistry=e.EditorModesRegistry=e.Extensions=void 0,e.Extensions={ModesRegistry:"editor.modesRegistry"};class f{constructor(){this._onDidChangeLanguages=new y.Emitter,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(m){return this._languages.push(m),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let S=0,h=this._languages.length;S<h;S++)if(this._languages[S]===m){this._languages.splice(S,1);return}}}}getLanguages(){return this._languages}}e.EditorModesRegistry=f,e.ModesRegistry=new f,b.Registry.add(e.Extensions.ModesRegistry,e.ModesRegistry),e.PLAINTEXT_LANGUAGE_ID="plaintext",e.PLAINTEXT_EXTENSION=".txt",e.ModesRegistry.registerLanguage({id:e.PLAINTEXT_LANGUAGE_ID,extensions:[e.PLAINTEXT_EXTENSION],aliases:[t.localize(0,null),"text"],mimetypes:[D.Mimes.text]}),b.Registry.as(T.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])}),define(Q[125],Y([1,0,6,4,33,367,394,488,1872,2324,1873,1876,839,5,9,50,35,146,1875]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedLanguageConfiguration=e.LanguageConfigurationRegistry=e.LanguageConfigurationChangeEvent=e.getScopedLineTokens=e.getIndentationAtPosition=e.LanguageConfigurationService=e.ILanguageConfigurationService=e.LanguageConfigurationServiceChangeEvent=void 0;class p{constructor(N){this.languageId=N}affects(N){return this.languageId?this.languageId===N:!0}}e.LanguageConfigurationServiceChangeEvent=p,e.ILanguageConfigurationService=(0,r.createDecorator)("languageConfigurationService");let c=class extends y.Disposable{constructor(N,P){super(),this.configurationService=N,this.languageService=P,this._registry=this._register(new L),this.onDidChangeEmitter=this._register(new t.Emitter),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const x=new Set(Object.values(n));this._register(this.configurationService.onDidChangeConfiguration(F=>{const V=F.change.keys.some(z=>x.has(z)),W=F.change.overrides.filter(([z,B])=>B.some(K=>x.has(K))).map(([z])=>z);if(V)this.configurations.clear(),this.onDidChangeEmitter.fire(new p(void 0));else for(const z of W)this.languageService.isRegisteredLanguageId(z)&&(this.configurations.delete(z),this.onDidChangeEmitter.fire(new p(z)))})),this._register(this._registry.onDidChange(F=>{this.configurations.delete(F.languageId),this.onDidChangeEmitter.fire(new p(F.languageId))}))}register(N,P,x){return this._registry.register(N,P,x)}getLanguageConfiguration(N){let P=this.configurations.get(N);return P||(P=l(N,this._registry,this.configurationService,this.languageService),this.configurations.set(N,P)),P}};e.LanguageConfigurationService=c,e.LanguageConfigurationService=c=fe([O(0,i.IConfigurationService),O(1,s.ILanguageService)],c);function l(M,N,P,x){let F=N.getLanguageConfiguration(M);if(!F){if(!x.isRegisteredLanguageId(M))return new R(M,{});F=new R(M,{})}const V=g(F.languageId,P),W=_([F.underlyingConfig,V]);return new R(F.languageId,W)}const n={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function g(M,N){const P=N.getValue(n.brackets,{overrideIdentifier:M}),x=N.getValue(n.colorizedBracketPairs,{overrideIdentifier:M});return{brackets:w(P),colorizedBracketPairs:w(x)}}function w(M){if(Array.isArray(M))return M.map(N=>{if(!(!Array.isArray(N)||N.length!==2))return[N[0],N[1]]}).filter(N=>!!N)}function E(M,N,P){const x=M.getLineContent(N);let F=b.getLeadingWhitespace(x);return F.length>P-1&&(F=F.substring(0,P-1)),F}e.getIndentationAtPosition=E;function C(M,N,P){M.tokenization.forceTokenization(N);const x=M.tokenization.getLineTokens(N),F=typeof P>"u"?M.getLineMaxColumn(N)-1:P-1;return(0,f.createScopedLineTokens)(x,F)}e.getScopedLineTokens=C;class I{constructor(N){this.languageId=N,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(N,P){const x=new A(N,P,++this._order);return this._entries.push(x),this._resolved=null,(0,y.toDisposable)(()=>{for(let F=0;F<this._entries.length;F++)if(this._entries[F]===x){this._entries.splice(F,1),this._resolved=null;break}})}getResolvedConfiguration(){if(!this._resolved){const N=this._resolve();N&&(this._resolved=new R(this.languageId,N))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(A.cmp),_(this._entries.map(N=>N.configuration)))}}function _(M){let N={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const P of M)N={comments:P.comments||N.comments,brackets:P.brackets||N.brackets,wordPattern:P.wordPattern||N.wordPattern,indentationRules:P.indentationRules||N.indentationRules,onEnterRules:P.onEnterRules||N.onEnterRules,autoClosingPairs:P.autoClosingPairs||N.autoClosingPairs,surroundingPairs:P.surroundingPairs||N.surroundingPairs,autoCloseBefore:P.autoCloseBefore||N.autoCloseBefore,folding:P.folding||N.folding,colorizedBracketPairs:P.colorizedBracketPairs||N.colorizedBracketPairs,__electricCharacterSupport:P.__electricCharacterSupport||N.__electricCharacterSupport};return N}class A{constructor(N,P,x){this.configuration=N,this.priority=P,this.order=x}static cmp(N,P){return N.priority===P.priority?N.order-P.order:N.priority-P.priority}}class k{constructor(N){this.languageId=N}}e.LanguageConfigurationChangeEvent=k;class L extends y.Disposable{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._register(this.register(u.PLAINTEXT_LANGUAGE_ID,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(N,P,x=0){let F=this._entries.get(N);F||(F=new I(N),this._entries.set(N,F));const V=F.register(P,x);return this._onDidChange.fire(new k(N)),(0,y.toDisposable)(()=>{V.dispose(),this._onDidChange.fire(new k(N))})}getLanguageConfiguration(N){return this._entries.get(N)?.getResolvedConfiguration()||null}}e.LanguageConfigurationRegistry=L;class R{constructor(N,P){this.languageId=N,this.underlyingConfig=P,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new h.OnEnterSupport(this.underlyingConfig):null,this.comments=R._handleComments(this.underlyingConfig),this.characterPair=new v.CharacterPairSupport(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||D.DEFAULT_WORD_REGEXP,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new S.IndentRulesSupport(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new d.LanguageBracketsConfiguration(N,this.underlyingConfig)}getWordDefinition(){return(0,D.ensureValidWordDefinition)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new a.RichEditBrackets(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new m.BracketElectricCharacterSupport(this.brackets)),this._electricCharacter}onEnter(N,P,x,F){return this._onEnterSupport?this._onEnterSupport.onEnter(N,P,x,F):null}getAutoClosingPairs(){return new T.AutoClosingPairs(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(N){return this.characterPair.getAutoCloseBeforeSet(N)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(N){const P=N.comments;if(!P)return null;const x={};if(P.lineComment&&(x.lineCommentToken=P.lineComment),P.blockComment){const[F,V]=P.blockComment;x.blockCommentStartToken=F,x.blockCommentEndToken=V}return x}}e.ResolvedLanguageConfiguration=R,(0,o.registerSingleton)(e.ILanguageConfigurationService,c,1)}),define(Q[697],Y([1,0,14,4,577,672,27,125,2355,57,78,20,11,145,15,74,438,238]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWorkerClient=e.EditorWorkerHost=e.EditorWorkerService=void 0;const d=60*1e3,p=5*60*1e3;function c(_,A){const k=_.getModel(A);return!(!k||k.isTooLargeForSyncing())}let l=class extends y.Disposable{constructor(A,k,L,R,M){super(),this._modelService=A,this._workerManager=this._register(new g(this._modelService,R)),this._logService=L,this._register(M.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(N,P)=>c(this._modelService,N.uri)?this._workerManager.withWorker().then(x=>x.computeLinks(N.uri)).then(x=>x&&{links:x}):Promise.resolve({links:[]})})),this._register(M.completionProvider.register("*",new n(this._workerManager,k,this._modelService,R)))}dispose(){super.dispose()}canComputeUnicodeHighlights(A){return c(this._modelService,A)}computedUnicodeHighlights(A,k,L){return this._workerManager.withWorker().then(R=>R.computedUnicodeHighlights(A,k,L))}async computeDiff(A,k,L,R){const M=await this._workerManager.withWorker().then(x=>x.computeDiff(A,k,L,R));if(!M)return null;return{identical:M.identical,quitEarly:M.quitEarly,changes:P(M.changes),moves:M.moves.map(x=>new o.MovedText(new o.SimpleLineRangeMapping(new u.LineRange(x[0],x[1]),new u.LineRange(x[2],x[3])),P(x[4])))};function P(x){return x.map(F=>new o.LineRangeMapping(new u.LineRange(F[0],F[1]),new u.LineRange(F[2],F[3]),F[4]?.map(V=>new o.RangeMapping(new T.Range(V[0],V[1],V[2],V[3]),new T.Range(V[4],V[5],V[6],V[7])))))}}canComputeDirtyDiff(A,k){return c(this._modelService,A)&&c(this._modelService,k)}computeDirtyDiff(A,k,L){return this._workerManager.withWorker().then(R=>R.computeDirtyDiff(A,k,L))}computeMoreMinimalEdits(A,k,L=!1){if((0,h.isNonEmptyArray)(k)){if(!c(this._modelService,A))return Promise.resolve(k);const R=r.StopWatch.create(),M=this._workerManager.withWorker().then(N=>N.computeMoreMinimalEdits(A,k,L));return M.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",A.toString(!0),R.elapsed())),Promise.race([M,(0,t.timeout)(1e3).then(()=>k)])}else return Promise.resolve(void 0)}computeHumanReadableDiff(A,k){if((0,h.isNonEmptyArray)(k)){if(!c(this._modelService,A))return Promise.resolve(k);const L=r.StopWatch.create(),R=this._workerManager.withWorker().then(M=>M.computeHumanReadableDiff(A,k,{ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3,computeMoves:!1})).catch(M=>((0,i.onUnexpectedError)(M),this.computeMoreMinimalEdits(A,k,!0)));return R.finally(()=>this._logService.trace("FORMAT#computeHumanReadableDiff",A.toString(!0),L.elapsed())),R}else return Promise.resolve(void 0)}canNavigateValueSet(A){return c(this._modelService,A)}navigateValueSet(A,k,L){return this._workerManager.withWorker().then(R=>R.navigateValueSet(A,k,L))}canComputeWordRanges(A){return c(this._modelService,A)}computeWordRanges(A,k){return this._workerManager.withWorker().then(L=>L.computeWordRanges(A,k))}};e.EditorWorkerService=l,e.EditorWorkerService=l=fe([O(0,m.IModelService),O(1,S.ITextResourceConfigurationService),O(2,a.ILogService),O(3,f.ILanguageConfigurationService),O(4,s.ILanguageFeaturesService)],l);class n{constructor(A,k,L,R){this.languageConfigurationService=R,this._debugDisplayName="wordbasedCompletions",this._workerManager=A,this._configurationService=k,this._modelService=L}async provideCompletionItems(A,k){const L=this._configurationService.getValue(A.uri,k,"editor");if(!L.wordBasedSuggestions)return;const R=[];if(L.wordBasedSuggestionsMode==="currentDocument")c(this._modelService,A.uri)&&R.push(A.uri);else for(const W of this._modelService.getModels())c(this._modelService,W.uri)&&(W===A?R.unshift(W.uri):(L.wordBasedSuggestionsMode==="allDocuments"||W.getLanguageId()===A.getLanguageId())&&R.push(W.uri));if(R.length===0)return;const M=this.languageConfigurationService.getLanguageConfiguration(A.getLanguageId()).getWordDefinition(),N=A.getWordAtPosition(k),P=N?new T.Range(k.lineNumber,N.startColumn,k.lineNumber,N.endColumn):T.Range.fromPositions(k),x=P.setEndPosition(k.lineNumber,k.column),V=await(await this._workerManager.withWorker()).textualSuggest(R,N?.word,M);if(V)return{duration:V.duration,suggestions:V.words.map(W=>({kind:18,label:W,insertText:W,range:{insert:x,replace:P}}))}}}class g extends y.Disposable{constructor(A,k){super(),this.languageConfigurationService=k,this._modelService=A,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new t.IntervalTimer).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(p/2)),this._register(this._modelService.onModelRemoved(R=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>p&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new I(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class w extends y.Disposable{constructor(A,k,L){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=A,this._modelService=k,!L){const R=new t.IntervalTimer;R.cancelAndSet(()=>this._checkStopModelSync(),Math.round(d/2)),this._register(R)}}dispose(){for(const A in this._syncedModels)(0,y.dispose)(this._syncedModels[A]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(A,k){for(const L of A){const R=L.toString();this._syncedModels[R]||this._beginModelSync(L,k),this._syncedModels[R]&&(this._syncedModelsLastUsedTime[R]=new Date().getTime())}}_checkStopModelSync(){const A=new Date().getTime(),k=[];for(const L in this._syncedModelsLastUsedTime)A-this._syncedModelsLastUsedTime[L]>d&&k.push(L);for(const L of k)this._stopModelSync(L)}_beginModelSync(A,k){const L=this._modelService.getModel(A);if(!L||!k&&L.isTooLargeForSyncing())return;const R=A.toString();this._proxy.acceptNewModel({url:L.uri.toString(),lines:L.getLinesContent(),EOL:L.getEOL(),versionId:L.getVersionId()});const M=new y.DisposableStore;M.add(L.onDidChangeContent(N=>{this._proxy.acceptModelChanged(R.toString(),N)})),M.add(L.onWillDispose(()=>{this._stopModelSync(R)})),M.add((0,y.toDisposable)(()=>{this._proxy.acceptRemovedModel(R)})),this._syncedModels[R]=M}_stopModelSync(A){const k=this._syncedModels[A];delete this._syncedModels[A],delete this._syncedModelsLastUsedTime[A],(0,y.dispose)(k)}}class E{constructor(A){this._instance=A,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class C{constructor(A){this._workerClient=A}fhr(A,k){return this._workerClient.fhr(A,k)}}e.EditorWorkerHost=C;class I extends y.Disposable{constructor(A,k,L,R){super(),this.languageConfigurationService=R,this._disposed=!1,this._modelService=A,this._keepIdleModels=k,this._workerFactory=new D.DefaultWorkerFactory(L),this._worker=null,this._modelManager=null}fhr(A,k){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new b.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new C(this)))}catch(A){(0,b.logOnceWebWorkerWarning)(A),this._worker=new E(new v.EditorSimpleWorker(new C(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,A=>((0,b.logOnceWebWorkerWarning)(A),this._worker=new E(new v.EditorSimpleWorker(new C(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(A){return this._modelManager||(this._modelManager=this._register(new w(A,this._modelService,this._keepIdleModels))),this._modelManager}async _withSyncedResources(A,k=!1){return this._disposed?Promise.reject((0,i.canceled)()):this._getProxy().then(L=>(this._getOrCreateModelManager(L).ensureSyncedResources(A,k),L))}computedUnicodeHighlights(A,k,L){return this._withSyncedResources([A]).then(R=>R.computeUnicodeHighlights(A.toString(),k,L))}computeDiff(A,k,L,R){return this._withSyncedResources([A,k],!0).then(M=>M.computeDiff(A.toString(),k.toString(),L,R))}computeDirtyDiff(A,k,L){return this._withSyncedResources([A,k]).then(R=>R.computeDirtyDiff(A.toString(),k.toString(),L))}computeMoreMinimalEdits(A,k,L){return this._withSyncedResources([A]).then(R=>R.computeMoreMinimalEdits(A.toString(),k,L))}computeHumanReadableDiff(A,k,L){return this._withSyncedResources([A]).then(R=>R.computeHumanReadableDiff(A.toString(),k,L))}computeLinks(A){return this._withSyncedResources([A]).then(k=>k.computeLinks(A.toString()))}computeDefaultDocumentColors(A){return this._withSyncedResources([A]).then(k=>k.computeDefaultDocumentColors(A.toString()))}async textualSuggest(A,k,L){const R=await this._withSyncedResources(A),M=L.source,N=L.flags;return R.textualSuggest(A.map(P=>P.toString()),k,M,N)}computeWordRanges(A,k){return this._withSyncedResources([A]).then(L=>{const R=this._modelService.getModel(A);if(!R)return Promise.resolve(null);const M=this.languageConfigurationService.getLanguageConfiguration(R.getLanguageId()).getWordDefinition(),N=M.source,P=M.flags;return L.computeWordRanges(A.toString(),k,N,P)})}navigateValueSet(A,k,L){return this._withSyncedResources([A]).then(R=>{const M=this._modelService.getModel(A);if(!M)return null;const N=this.languageConfigurationService.getLanguageConfiguration(M.getLanguageId()).getWordDefinition(),P=N.source,x=N.flags;return R.navigateValueSet(A.toString(),k,L,P,x)})}dispose(){super.dispose(),this._disposed=!0}}e.EditorWorkerClient=I}),define(Q[1175],Y([1,0,42,697]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWebWorker=void 0;function b(T,f,v){return new D(T,f,v)}e.createWebWorker=b;class D extends y.EditorWorkerClient{constructor(f,v,m){super(f,m.keepIdleModels||!1,m.label,v),this._foreignModuleId=m.moduleId,this._foreignModuleCreateData=m.createData||null,this._foreignModuleHost=m.host||null,this._foreignProxy=null}fhr(f,v){if(!this._foreignModuleHost||typeof this._foreignModuleHost[f]!="function")return Promise.reject(new Error("Missing method "+f+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[f].apply(this._foreignModuleHost,v))}catch(m){return Promise.reject(m)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(f=>{const v=this._foreignModuleHost?(0,t.getAllMethodNames)(this._foreignModuleHost):[];return f.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,v).then(m=>{this._foreignModuleCreateData=null;const S=(r,i)=>f.fmr(r,i),h=(r,i)=>function(){const s=Array.prototype.slice.call(arguments,0);return i(r,s)},a={};for(const r of m)a[r]=h(r,S);return a})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(f){return this._withSyncedResources(f).then(v=>this.getProxy())}}}),define(Q[875],Y([1,0,33,394,488,125]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIndentMetadata=e.getIndentActionForType=e.getIndentForEnter=e.getGoodIndentForLine=e.getInheritIndentForLine=void 0;function T(a,r,i){const s=a.tokenization.getLanguageIdAtPosition(r,0);if(r>1){let o,u=-1;for(o=r-1;o>=1;o--){if(a.tokenization.getLanguageIdAtPosition(o,0)!==s)return u;const d=a.getLineContent(o);if(i.shouldIgnore(d)||/^\s+$/.test(d)||d===""){u=o;continue}return o}}return-1}function f(a,r,i,s=!0,o){if(a<4)return null;const u=o.getLanguageConfiguration(r.tokenization.getLanguageId()).indentRulesSupport;if(!u)return null;if(i<=1)return{indentation:"",action:null};for(let c=i-1;c>0&&r.getLineContent(c)==="";c--)if(c===1)return{indentation:"",action:null};const d=T(r,i,u);if(d<0)return null;if(d<1)return{indentation:"",action:null};const p=r.getLineContent(d);if(u.shouldIncrease(p)||u.shouldIndentNextLine(p))return{indentation:t.getLeadingWhitespace(p),action:y.IndentAction.Indent,line:d};if(u.shouldDecrease(p))return{indentation:t.getLeadingWhitespace(p),action:null,line:d};{if(d===1)return{indentation:t.getLeadingWhitespace(r.getLineContent(d)),action:null,line:d};const c=d-1,l=u.getIndentMetadata(r.getLineContent(c));if(!(l&3)&&l&4){let n=0;for(let g=c-1;g>0;g--)if(!u.shouldIndentNextLine(r.getLineContent(g))){n=g;break}return{indentation:t.getLeadingWhitespace(r.getLineContent(n+1)),action:null,line:n+1}}if(s)return{indentation:t.getLeadingWhitespace(r.getLineContent(d)),action:null,line:d};for(let n=d;n>0;n--){const g=r.getLineContent(n);if(u.shouldIncrease(g))return{indentation:t.getLeadingWhitespace(g),action:y.IndentAction.Indent,line:n};if(u.shouldIndentNextLine(g)){let w=0;for(let E=n-1;E>0;E--)if(!u.shouldIndentNextLine(r.getLineContent(n))){w=E;break}return{indentation:t.getLeadingWhitespace(r.getLineContent(w+1)),action:null,line:w+1}}else if(u.shouldDecrease(g))return{indentation:t.getLeadingWhitespace(g),action:null,line:n}}return{indentation:t.getLeadingWhitespace(r.getLineContent(1)),action:null,line:1}}}e.getInheritIndentForLine=f;function v(a,r,i,s,o,u){if(a<4)return null;const d=u.getLanguageConfiguration(i);if(!d)return null;const p=u.getLanguageConfiguration(i).indentRulesSupport;if(!p)return null;const c=f(a,r,s,void 0,u),l=r.getLineContent(s);if(c){const n=c.line;if(n!==void 0){let g=!0;for(let w=n;w<s-1;w++)if(!/^\s*$/.test(r.getLineContent(w))){g=!1;break}if(g){const w=d.onEnter(a,"",r.getLineContent(n),"");if(w){let E=t.getLeadingWhitespace(r.getLineContent(n));return w.removeText&&(E=E.substring(0,E.length-w.removeText)),w.indentAction===y.IndentAction.Indent||w.indentAction===y.IndentAction.IndentOutdent?E=o.shiftIndent(E):w.indentAction===y.IndentAction.Outdent&&(E=o.unshiftIndent(E)),p.shouldDecrease(l)&&(E=o.unshiftIndent(E)),w.appendText&&(E+=w.appendText),t.getLeadingWhitespace(E)}}}return p.shouldDecrease(l)?c.action===y.IndentAction.Indent?c.indentation:o.unshiftIndent(c.indentation):c.action===y.IndentAction.Indent?o.shiftIndent(c.indentation):c.indentation}return null}e.getGoodIndentForLine=v;function m(a,r,i,s,o){if(a<4)return null;r.tokenization.forceTokenization(i.startLineNumber);const u=r.tokenization.getLineTokens(i.startLineNumber),d=(0,b.createScopedLineTokens)(u,i.startColumn-1),p=d.getLineContent();let c=!1,l;d.firstCharOffset>0&&u.getLanguageId(0)!==d.languageId?(c=!0,l=p.substr(0,i.startColumn-1-d.firstCharOffset)):l=u.getLineContent().substring(0,i.startColumn-1);let n;i.isEmpty()?n=p.substr(i.startColumn-1-d.firstCharOffset):n=(0,D.getScopedLineTokens)(r,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-d.firstCharOffset);const g=o.getLanguageConfiguration(d.languageId).indentRulesSupport;if(!g)return null;const w=l,E=t.getLeadingWhitespace(l),C={tokenization:{getLineTokens:k=>r.tokenization.getLineTokens(k),getLanguageId:()=>r.getLanguageId(),getLanguageIdAtPosition:(k,L)=>r.getLanguageIdAtPosition(k,L)},getLineContent:k=>k===i.startLineNumber?w:r.getLineContent(k)},I=t.getLeadingWhitespace(u.getLineContent()),_=f(a,C,i.startLineNumber+1,void 0,o);if(!_){const k=c?I:E;return{beforeEnter:k,afterEnter:k}}let A=c?I:_.indentation;return _.action===y.IndentAction.Indent&&(A=s.shiftIndent(A)),g.shouldDecrease(n)&&(A=s.unshiftIndent(A)),{beforeEnter:c?I:E,afterEnter:A}}e.getIndentForEnter=m;function S(a,r,i,s,o,u){if(a<4)return null;const d=(0,D.getScopedLineTokens)(r,i.startLineNumber,i.startColumn);if(d.firstCharOffset)return null;const p=u.getLanguageConfiguration(d.languageId).indentRulesSupport;if(!p)return null;const c=d.getLineContent(),l=c.substr(0,i.startColumn-1-d.firstCharOffset);let n;if(i.isEmpty()?n=c.substr(i.startColumn-1-d.firstCharOffset):n=(0,D.getScopedLineTokens)(r,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-d.firstCharOffset),!p.shouldDecrease(l+n)&&p.shouldDecrease(l+s+n)){const g=f(a,r,i.startLineNumber,!1,u);if(!g)return null;let w=g.indentation;return g.action!==y.IndentAction.Indent&&(w=o.unshiftIndent(w)),w}return null}e.getIndentActionForType=S;function h(a,r,i){const s=i.getLanguageConfiguration(a.getLanguageId()).indentRulesSupport;return!s||r<1||r>a.getLineCount()?null:s.getIndentMetadata(a.getLineContent(r))}e.getIndentMetadata=h}),define(Q[876],Y([1,0,394,125]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnterAction=void 0;function b(D,T,f,v){const m=(0,y.getScopedLineTokens)(T,f.startLineNumber,f.startColumn),S=v.getLanguageConfiguration(m.languageId);if(!S)return null;const h=m.getLineContent(),a=h.substr(0,f.startColumn-1-m.firstCharOffset);let r;f.isEmpty()?r=h.substr(f.startColumn-1-m.firstCharOffset):r=(0,y.getScopedLineTokens)(T,f.endLineNumber,f.endColumn).getLineContent().substr(f.endColumn-1-m.firstCharOffset);let i="";if(f.startLineNumber>1&&m.firstCharOffset===0){const c=(0,y.getScopedLineTokens)(T,f.startLineNumber-1);c.languageId===m.languageId&&(i=c.getLineContent())}const s=S.onEnter(D,i,a,r);if(!s)return null;const o=s.indentAction;let u=s.appendText;const d=s.removeText||0;u?o===t.IndentAction.Indent&&(u=" "+u):o===t.IndentAction.Indent||o===t.IndentAction.IndentOutdent?u=" ":u="";let p=(0,y.getIndentationAtPosition)(T,f.startLineNumber,f.startColumn);return d&&(p=p.substring(0,p.length-d)),{indentAction:o,appendText:u,removeText:d,indentation:p}}e.getEnterAction=b}),define(Q[877],Y([1,0,33,323,27,96,876,125]),function(q,e,t,y,b,D,T,f){"use strict";var v;Object.defineProperty(e,"__esModule",{value:!0}),e.ShiftCommand=void 0;const m=Object.create(null);function S(a,r){if(r<=0)return"";m[a]||(m[a]=["",a]);const i=m[a];for(let s=i.length;s<=r;s++)i[s]=i[s-1]+a;return i[r]}let h=v=class{static unshiftIndent(r,i,s,o,u){const d=y.CursorColumns.visibleColumnFromColumn(r,i,s);if(u){const p=S(" ",o),l=y.CursorColumns.prevIndentTabStop(d,o)/o;return S(p,l)}else{const p=" ",l=y.CursorColumns.prevRenderTabStop(d,s)/s;return S(p,l)}}static shiftIndent(r,i,s,o,u){const d=y.CursorColumns.visibleColumnFromColumn(r,i,s);if(u){const p=S(" ",o),l=y.CursorColumns.nextIndentTabStop(d,o)/o;return S(p,l)}else{const p=" ",l=y.CursorColumns.nextRenderTabStop(d,s)/s;return S(p,l)}}constructor(r,i,s){this._languageConfigurationService=s,this._opts=i,this._selection=r,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(r,i,s){this._useLastEditRangeForCursorEndPosition?r.addTrackedEditOperation(i,s):r.addEditOperation(i,s)}getEditOperations(r,i){const s=this._selection.startLineNumber;let o=this._selection.endLineNumber;this._selection.endColumn===1&&s!==o&&(o=o-1);const{tabSize:u,indentSize:d,insertSpaces:p}=this._opts,c=s===o;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(r.getLineContent(s))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,n=0;for(let g=s;g<=o;g++,l=n){n=0;const w=r.getLineContent(g);let E=t.firstNonWhitespaceIndex(w);if(this._opts.isUnshift&&(w.length===0||E===0)||!c&&!this._opts.isUnshift&&w.length===0)continue;if(E===-1&&(E=w.length),g>1&&y.CursorColumns.visibleColumnFromColumn(w,E+1,u)%d!==0&&r.tokenization.isCheapToTokenize(g-1)){const _=(0,T.getEnterAction)(this._opts.autoIndent,r,new b.Range(g-1,r.getLineMaxColumn(g-1),g-1,r.getLineMaxColumn(g-1)),this._languageConfigurationService);if(_){if(n=l,_.appendText)for(let A=0,k=_.appendText.length;A<k&&n<d&&_.appendText.charCodeAt(A)===32;A++)n++;_.removeText&&(n=Math.max(0,n-_.removeText));for(let A=0;A<n&&!(E===0||w.charCodeAt(E-1)!==32);A++)E--}}if(this._opts.isUnshift&&E===0)continue;let C;this._opts.isUnshift?C=v.unshiftIndent(w,E+1,u,d,p):C=v.shiftIndent(w,E+1,u,d,p),this._addEditOperation(i,new b.Range(g,1,g,E+1),C),g===s&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=E+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&r.getLineLength(s)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const l=p?S(" ",d):" ";for(let n=s;n<=o;n++){const g=r.getLineContent(n);let w=t.firstNonWhitespaceIndex(g);if(!(this._opts.isUnshift&&(g.length===0||w===0))&&!(!c&&!this._opts.isUnshift&&g.length===0)&&(w===-1&&(w=g.length),!(this._opts.isUnshift&&w===0)))if(this._opts.isUnshift){w=Math.min(w,d);for(let E=0;E<w;E++)if(g.charCodeAt(E)===9){w=E+1;break}this._addEditOperation(i,new b.Range(n,1,n,w+1),"")}else this._addEditOperation(i,new b.Range(n,1,n,1),l),n===s&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=i.trackSelection(this._selection)}computeCursorState(r,i){if(this._useLastEditRangeForCursorEndPosition){const o=i.getInverseEditOperations()[0];return new D.Selection(o.range.endLineNumber,o.range.endColumn,o.range.endLineNumber,o.range.endColumn)}const s=i.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const o=this._selection.startColumn;return s.startColumn<=o?s:s.getDirection()===0?new D.Selection(s.startLineNumber,o,s.endLineNumber,s.endColumn):new D.Selection(s.endLineNumber,s.endColumn,s.startLineNumber,o)}return s}};e.ShiftCommand=h,e.ShiftCommand=h=v=fe([O(2,f.ILanguageConfigurationService)],h)}),define(Q[878],Y([1,0,15,33,487,877,1859,301,563,27,51,394,125,488,875,876]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionOutcome=e.TypeWithAutoClosingCommand=e.TypeOperations=void 0;class o{static indent(w,E,C){if(E===null||C===null)return[];const I=[];for(let _=0,A=C.length;_<A;_++)I[_]=new D.ShiftCommand(C[_],{isUnshift:!1,tabSize:w.tabSize,indentSize:w.indentSize,insertSpaces:w.insertSpaces,useTabStops:w.useTabStops,autoIndent:w.autoIndent},w.languageConfigurationService);return I}static outdent(w,E,C){const I=[];for(let _=0,A=C.length;_<A;_++)I[_]=new D.ShiftCommand(C[_],{isUnshift:!0,tabSize:w.tabSize,indentSize:w.indentSize,insertSpaces:w.insertSpaces,useTabStops:w.useTabStops,autoIndent:w.autoIndent},w.languageConfigurationService);return I}static shiftIndent(w,E,C){return C=C||1,D.ShiftCommand.shiftIndent(E,E.length+C,w.tabSize,w.indentSize,w.insertSpaces)}static unshiftIndent(w,E,C){return C=C||1,D.ShiftCommand.unshiftIndent(E,E.length+C,w.tabSize,w.indentSize,w.insertSpaces)}static _distributedPaste(w,E,C,I){const _=[];for(let A=0,k=C.length;A<k;A++)_[A]=new b.ReplaceCommand(C[A],I[A]);return new f.EditOperationResult(0,_,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(w,E,C,I,_){const A=[];for(let k=0,L=C.length;k<L;k++){const R=C[k],M=R.getPosition();if(_&&!R.isEmpty()&&(_=!1),_&&I.indexOf(` `)!==I.length-1&&(_=!1),_){const N=new m.Range(M.lineNumber,1,M.lineNumber,1);A[k]=new b.ReplaceCommandThatPreservesSelection(N,I,R,!0)}else A[k]=new b.ReplaceCommand(R,I)}return new f.EditOperationResult(0,A,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(w,E,C,I,_){if(I||E.length===1)return null;if(_&&_.length===E.length)return _;if(w.multiCursorPaste==="spread"){C.charCodeAt(C.length-1)===10&&(C=C.substr(0,C.length-1)),C.charCodeAt(C.length-1)===13&&(C=C.substr(0,C.length-1));const A=y.splitLines(C);if(A.length===E.length)return A}return null}static paste(w,E,C,I,_,A){const k=this._distributePasteToCursors(w,C,I,_,A);return k?(C=C.sort(m.Range.compareRangesUsingStarts),this._distributedPaste(w,E,C,k)):this._simplePaste(w,E,C,I,_)}static _goodIndentForLine(w,E,C){let I=null,_="";const A=(0,i.getInheritIndentForLine)(w.autoIndent,E,C,!1,w.languageConfigurationService);if(A)I=A.action,_=A.indentation;else if(C>1){let k;for(k=C-1;k>=1;k--){const M=E.getLineContent(k);if(y.lastNonWhitespaceIndex(M)>=0)break}if(k<1)return null;const L=E.getLineMaxColumn(k),R=(0,s.getEnterAction)(w.autoIndent,E,new m.Range(k,L,k,L),w.languageConfigurationService);R&&(_=R.indentation+R.appendText)}return I&&(I===h.IndentAction.Indent&&(_=o.shiftIndent(w,_)),I===h.IndentAction.Outdent&&(_=o.unshiftIndent(w,_)),_=w.normalizeIndentation(_)),_||null}static _replaceJumpToNextIndent(w,E,C,I){let _="";const A=C.getStartPosition();if(w.insertSpaces){const k=w.visibleColumnFromColumn(E,A),L=w.indentSize,R=L-k%L;for(let M=0;M<R;M++)_+=" "}else _=" ";return new b.ReplaceCommand(C,_,I)}static tab(w,E,C){const I=[];for(let _=0,A=C.length;_<A;_++){const k=C[_];if(k.isEmpty()){const L=E.getLineContent(k.startLineNumber);if(/^\s*$/.test(L)&&E.tokenization.isCheapToTokenize(k.startLineNumber)){let R=this._goodIndentForLine(w,E,k.startLineNumber);R=R||" ";const M=w.normalizeIndentation(R);if(!L.startsWith(M)){I[_]=new b.ReplaceCommand(new m.Range(k.startLineNumber,1,k.startLineNumber,L.length+1),M,!0);continue}}I[_]=this._replaceJumpToNextIndent(w,E,k,!0)}else{if(k.startLineNumber===k.endLineNumber){const L=E.getLineMaxColumn(k.startLineNumber);if(k.startColumn!==1||k.endColumn!==L){I[_]=this._replaceJumpToNextIndent(w,E,k,!1);continue}}I[_]=new D.ShiftCommand(k,{isUnshift:!1,tabSize:w.tabSize,indentSize:w.indentSize,insertSpaces:w.insertSpaces,useTabStops:w.useTabStops,autoIndent:w.autoIndent},w.languageConfigurationService)}}return I}static compositionType(w,E,C,I,_,A,k,L){const R=I.map(M=>this._compositionType(C,M,_,A,k,L));return new f.EditOperationResult(4,R,{shouldPushStackElementBefore:c(w,4),shouldPushStackElementAfter:!1})}static _compositionType(w,E,C,I,_,A){if(!E.isEmpty())return null;const k=E.getPosition(),L=Math.max(1,k.column-I),R=Math.min(w.getLineMaxColumn(k.lineNumber),k.column+_),M=new m.Range(k.lineNumber,L,k.lineNumber,R);return w.getValueInRange(M)===C&&A===0?null:new b.ReplaceCommandWithOffsetCursorState(M,C,0,A)}static _typeCommand(w,E,C){return C?new b.ReplaceCommandWithoutChangingPosition(w,E,!0):new b.ReplaceCommand(w,E,!0)}static _enter(w,E,C,I){if(w.autoIndent===0)return o._typeCommand(I,` `,C);if(!E.tokenization.isCheapToTokenize(I.getStartPosition().lineNumber)||w.autoIndent===1){const L=E.getLineContent(I.startLineNumber),R=y.getLeadingWhitespace(L).substring(0,I.startColumn-1);return o._typeCommand(I,` `+w.normalizeIndentation(R),C)}const _=(0,s.getEnterAction)(w.autoIndent,E,I,w.languageConfigurationService);if(_){if(_.indentAction===h.IndentAction.None)return o._typeCommand(I,` `+w.normalizeIndentation(_.indentation+_.appendText),C);if(_.indentAction===h.IndentAction.Indent)return o._typeCommand(I,` `+w.normalizeIndentation(_.indentation+_.appendText),C);if(_.indentAction===h.IndentAction.IndentOutdent){const L=w.normalizeIndentation(_.indentation),R=w.normalizeIndentation(_.indentation+_.appendText),M=` `+R+` `+L;return C?new b.ReplaceCommandWithoutChangingPosition(I,M,!0):new b.ReplaceCommandWithOffsetCursorState(I,M,-1,R.length-L.length,!0)}else if(_.indentAction===h.IndentAction.Outdent){const L=o.unshiftIndent(w,_.indentation);return o._typeCommand(I,` `+w.normalizeIndentation(L+_.appendText),C)}}const A=E.getLineContent(I.startLineNumber),k=y.getLeadingWhitespace(A).substring(0,I.startColumn-1);if(w.autoIndent>=4){const L=(0,i.getIndentForEnter)(w.autoIndent,E,I,{unshiftIndent:R=>o.unshiftIndent(w,R),shiftIndent:R=>o.shiftIndent(w,R),normalizeIndentation:R=>w.normalizeIndentation(R)},w.languageConfigurationService);if(L){let R=w.visibleColumnFromColumn(E,I.getEndPosition());const M=I.endColumn,N=E.getLineContent(I.endLineNumber),P=y.firstNonWhitespaceIndex(N);if(P>=0?I=I.setEndPosition(I.endLineNumber,Math.max(I.endColumn,P+1)):I=I.setEndPosition(I.endLineNumber,E.getLineMaxColumn(I.endLineNumber)),C)return new b.ReplaceCommandWithoutChangingPosition(I,` `+w.normalizeIndentation(L.afterEnter),!0);{let x=0;return M<=P+1&&(w.insertSpaces||(R=Math.ceil(R/w.indentSize)),x=Math.min(R+1-w.normalizeIndentation(L.afterEnter).length-1,0)),new b.ReplaceCommandWithOffsetCursorState(I,` `+w.normalizeIndentation(L.afterEnter),0,x,!0)}}}return o._typeCommand(I,` `+w.normalizeIndentation(k),C)}static _isAutoIndentType(w,E,C){if(w.autoIndent<4)return!1;for(let I=0,_=C.length;I<_;I++)if(!E.tokenization.isCheapToTokenize(C[I].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(w,E,C,I){const _=(0,a.getIndentationAtPosition)(E,C.startLineNumber,C.startColumn),A=(0,i.getIndentActionForType)(w.autoIndent,E,C,I,{shiftIndent:k=>o.shiftIndent(w,k),unshiftIndent:k=>o.unshiftIndent(w,k)},w.languageConfigurationService);if(A===null)return null;if(A!==w.normalizeIndentation(_)){const k=E.getLineFirstNonWhitespaceColumn(C.startLineNumber);return k===0?o._typeCommand(new m.Range(C.startLineNumber,1,C.endLineNumber,C.endColumn),w.normalizeIndentation(A)+I,!1):o._typeCommand(new m.Range(C.startLineNumber,1,C.endLineNumber,C.endColumn),w.normalizeIndentation(A)+E.getLineContent(C.startLineNumber).substring(k-1,C.startColumn-1)+I,!1)}return null}static _isAutoClosingOvertype(w,E,C,I,_){if(w.autoClosingOvertype==="never"||!w.autoClosingPairs.autoClosingPairsCloseSingleChar.has(_))return!1;for(let A=0,k=C.length;A<k;A++){const L=C[A];if(!L.isEmpty())return!1;const R=L.getPosition(),M=E.getLineContent(R.lineNumber);if(M.charAt(R.column-1)!==_)return!1;const P=(0,f.isQuote)(_);if((R.column>2?M.charCodeAt(R.column-2):0)===92&&P)return!1;if(w.autoClosingOvertype==="auto"){let F=!1;for(let V=0,W=I.length;V<W;V++){const z=I[V];if(R.lineNumber===z.startLineNumber&&R.column===z.startColumn){F=!0;break}}if(!F)return!1}}return!0}static _runAutoClosingOvertype(w,E,C,I,_){const A=[];for(let k=0,L=I.length;k<L;k++){const M=I[k].getPosition(),N=new m.Range(M.lineNumber,M.column,M.lineNumber,M.column+1);A[k]=new b.ReplaceCommand(N,_)}return new f.EditOperationResult(4,A,{shouldPushStackElementBefore:c(w,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(w,E){const C=E.charAt(0),I=w.autoClosingPairs.autoClosingPairsOpenByStart.get(C)||[],_=w.autoClosingPairs.autoClosingPairsCloseByStart.get(C)||[],A=I.some(L=>E.startsWith(L.open)),k=_.some(L=>E.startsWith(L.close));return!A&&k}static _findAutoClosingPairOpen(w,E,C,I){const _=w.autoClosingPairs.autoClosingPairsOpenByEnd.get(I);if(!_)return null;let A=null;for(const k of _)if(A===null||k.open.length>A.open.length){let L=!0;for(const R of C)if(E.getValueInRange(new m.Range(R.lineNumber,R.column-k.open.length+1,R.lineNumber,R.column))+I!==k.open){L=!1;break}L&&(A=k)}return A}static _findContainedAutoClosingPair(w,E){if(E.open.length<=1)return null;const C=E.close.charAt(E.close.length-1),I=w.autoClosingPairs.autoClosingPairsCloseByEnd.get(C)||[];let _=null;for(const A of I)A.open!==E.open&&E.open.includes(A.open)&&E.close.endsWith(A.close)&&(!_||A.open.length>_.open.length)&&(_=A);return _}static _getAutoClosingPairClose(w,E,C,I,_){const A=(0,f.isQuote)(I),k=A?w.autoClosingQuotes:w.autoClosingBrackets,L=A?w.shouldAutoCloseBefore.quote:w.shouldAutoCloseBefore.bracket;if(k==="never")return null;for(const F of C)if(!F.isEmpty())return null;const R=C.map(F=>{const V=F.getPosition();return _?{lineNumber:V.lineNumber,beforeColumn:V.column-I.length,afterColumn:V.column}:{lineNumber:V.lineNumber,beforeColumn:V.column,afterColumn:V.column}}),M=this._findAutoClosingPairOpen(w,E,R.map(F=>new S.Position(F.lineNumber,F.beforeColumn)),I);if(!M)return null;const N=this._findContainedAutoClosingPair(w,M),P=N?N.close:"";let x=!0;for(const F of R){const{lineNumber:V,beforeColumn:W,afterColumn:z}=F,B=E.getLineContent(V),K=B.substring(0,W-1),H=B.substring(z-1);if(H.startsWith(P)||(x=!1),H.length>0){const ie=H.charAt(0);if(!o._isBeforeClosingBrace(w,H)&&!L(ie))return null}if(M.open.length===1&&(I==="'"||I==='"')&&k!=="always"){const ie=(0,v.getMapForWordSeparators)(w.wordSeparators);if(K.length>0){const J=K.charCodeAt(K.length-1);if(ie.get(J)===0)return null}}if(!E.tokenization.isCheapToTokenize(V))return null;E.tokenization.forceTokenization(V);const U=E.tokenization.getLineTokens(V),G=(0,r.createScopedLineTokens)(U,W-1);if(!M.shouldAutoClose(G,W-G.firstCharOffset))return null;const $=M.findNeutralCharacter();if($){const ie=E.tokenization.getTokenTypeIfInsertingCharacter(V,W,$);if(!M.isOK(ie))return null}}return x?M.close.substring(0,M.close.length-P.length):M.close}static _runAutoClosingOpenCharType(w,E,C,I,_,A,k){const L=[];for(let R=0,M=I.length;R<M;R++){const N=I[R];L[R]=new u(N,_,!A,k)}return new f.EditOperationResult(4,L,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(w,E){return(0,f.isQuote)(E)?w.autoSurround==="quotes"||w.autoSurround==="languageDefined":w.autoSurround==="brackets"||w.autoSurround==="languageDefined"}static _isSurroundSelectionType(w,E,C,I){if(!o._shouldSurroundChar(w,I)||!w.surroundingPairs.hasOwnProperty(I))return!1;const _=(0,f.isQuote)(I);for(const A of C){if(A.isEmpty())return!1;let k=!0;for(let L=A.startLineNumber;L<=A.endLineNumber;L++){const R=E.getLineContent(L),M=L===A.startLineNumber?A.startColumn-1:0,N=L===A.endLineNumber?A.endColumn-1:R.length,P=R.substring(M,N);if(/[^ \t]/.test(P)){k=!1;break}}if(k)return!1;if(_&&A.startLineNumber===A.endLineNumber&&A.startColumn+1===A.endColumn){const L=E.getValueInRange(A);if((0,f.isQuote)(L))return!1}}return!0}static _runSurroundSelectionType(w,E,C,I,_){const A=[];for(let k=0,L=I.length;k<L;k++){const R=I[k],M=E.surroundingPairs[_];A[k]=new T.SurroundSelectionCommand(R,_,M)}return new f.EditOperationResult(0,A,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(w,E,C){return!!(C.length===1&&E.tokenization.isCheapToTokenize(C[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(w,E,C,I,_){if(!E.electricChars.hasOwnProperty(_)||!I.isEmpty())return null;const A=I.getPosition();C.tokenization.forceTokenization(A.lineNumber);const k=C.tokenization.getLineTokens(A.lineNumber);let L;try{L=E.onElectricCharacter(_,k,A.column)}catch(R){return(0,t.onUnexpectedError)(R),null}if(!L)return null;if(L.matchOpenBracket){const R=(k.getLineContent()+_).lastIndexOf(L.matchOpenBracket)+1,M=C.bracketPairs.findMatchingBracketUp(L.matchOpenBracket,{lineNumber:A.lineNumber,column:R},500);if(M){if(M.startLineNumber===A.lineNumber)return null;const N=C.getLineContent(M.startLineNumber),P=y.getLeadingWhitespace(N),x=E.normalizeIndentation(P),F=C.getLineContent(A.lineNumber),V=C.getLineFirstNonWhitespaceColumn(A.lineNumber)||A.column,W=F.substring(V-1,A.column-1),z=x+W+_,B=new m.Range(A.lineNumber,1,A.lineNumber,A.column),K=new b.ReplaceCommand(B,z);return new f.EditOperationResult(p(z,w),[K],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(w,E,C,I,_,A){if(!I)return null;let k=null;for(const N of I)if(k===null)k=N.insertedText;else if(k!==N.insertedText)return null;if(!k||k.length!==1)return null;const L=k;let R=!1;for(const N of I)if(N.deletedText.length!==0){R=!0;break}if(R){if(!o._shouldSurroundChar(E,L)||!E.surroundingPairs.hasOwnProperty(L))return null;const N=(0,f.isQuote)(L);for(const F of I)if(F.deletedSelectionStart!==0||F.deletedSelectionEnd!==F.deletedText.length||/^[ \t]+$/.test(F.deletedText)||N&&(0,f.isQuote)(F.deletedText))return null;const P=[];for(const F of _){if(!F.isEmpty())return null;P.push(F.getPosition())}if(P.length!==I.length)return null;const x=[];for(let F=0,V=P.length;F<V;F++)x.push(new T.CompositionSurroundSelectionCommand(P[F],I[F].deletedText,E.surroundingPairs[L]));return new f.EditOperationResult(4,x,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(E,C,_,A,L)){const N=_.map(P=>new b.ReplaceCommand(new m.Range(P.positionLineNumber,P.positionColumn,P.positionLineNumber,P.positionColumn+1),"",!1));return new f.EditOperationResult(4,N,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const M=this._getAutoClosingPairClose(E,C,_,L,!0);return M!==null?this._runAutoClosingOpenCharType(w,E,C,_,L,!0,M):null}static typeWithInterceptors(w,E,C,I,_,A,k){if(!w&&k===` `){const M=[];for(let N=0,P=_.length;N<P;N++)M[N]=o._enter(C,I,!1,_[N]);return new f.EditOperationResult(4,M,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!w&&this._isAutoIndentType(C,I,_)){const M=[];let N=!1;for(let P=0,x=_.length;P<x;P++)if(M[P]=this._runAutoIndentType(C,I,_[P],k),!M[P]){N=!0;break}if(!N)return new f.EditOperationResult(4,M,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(C,I,_,A,k))return this._runAutoClosingOvertype(E,C,I,_,k);if(!w){const M=this._getAutoClosingPairClose(C,I,_,k,!1);if(M)return this._runAutoClosingOpenCharType(E,C,I,_,k,!1,M)}if(!w&&this._isSurroundSelectionType(C,I,_,k))return this._runSurroundSelectionType(E,C,I,_,k);if(!w&&this._isTypeInterceptorElectricChar(C,I,_)){const M=this._typeInterceptorElectricChar(E,C,I,_[0],k);if(M)return M}const L=[];for(let M=0,N=_.length;M<N;M++)L[M]=new b.ReplaceCommand(_[M],k);const R=p(k,E);return new f.EditOperationResult(R,L,{shouldPushStackElementBefore:c(E,R),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(w,E,C,I,_){const A=[];for(let L=0,R=I.length;L<R;L++)A[L]=new b.ReplaceCommand(I[L],_);const k=p(_,w);return new f.EditOperationResult(k,A,{shouldPushStackElementBefore:c(w,k),shouldPushStackElementAfter:!1})}static lineInsertBefore(w,E,C){if(E===null||C===null)return[];const I=[];for(let _=0,A=C.length;_<A;_++){let k=C[_].positionLineNumber;if(k===1)I[_]=new b.ReplaceCommandWithoutChangingPosition(new m.Range(1,1,1,1),` `);else{k--;const L=E.getLineMaxColumn(k);I[_]=this._enter(w,E,!1,new m.Range(k,L,k,L))}}return I}static lineInsertAfter(w,E,C){if(E===null||C===null)return[];const I=[];for(let _=0,A=C.length;_<A;_++){const k=C[_].positionLineNumber,L=E.getLineMaxColumn(k);I[_]=this._enter(w,E,!1,new m.Range(k,L,k,L))}return I}static lineBreakInsert(w,E,C){const I=[];for(let _=0,A=C.length;_<A;_++)I[_]=this._enter(w,E,!0,C[_]);return I}}e.TypeOperations=o;class u extends b.ReplaceCommandWithOffsetCursorState{constructor(w,E,C,I){super(w,(C?E:"")+I,0,-I.length),this._openCharacter=E,this._closeCharacter=I,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(w,E){const I=E.getInverseEditOperations()[0].range;return this.closeCharacterRange=new m.Range(I.startLineNumber,I.endColumn-this._closeCharacter.length,I.endLineNumber,I.endColumn),this.enclosingRange=new m.Range(I.startLineNumber,I.endColumn-this._openCharacter.length-this._closeCharacter.length,I.endLineNumber,I.endColumn),super.computeCursorState(w,E)}}e.TypeWithAutoClosingCommand=u;class d{constructor(w,E,C,I,_,A){this.deletedText=w,this.deletedSelectionStart=E,this.deletedSelectionEnd=C,this.insertedText=I,this.insertedSelectionStart=_,this.insertedSelectionEnd=A}}e.CompositionOutcome=d;function p(g,w){return g===" "?w===5||w===6?6:5:4}function c(g,w){return n(g)&&!n(w)?!0:g===5?!1:l(g)!==l(w)}function l(g){return g===6||g===5?"space":g}function n(g){return g===4||g===5||g===6}}),define(Q[3248],Y([1,0,15,33,1871,301,1860,796,878,27,96,441,805,4,807]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorsController=void 0;class s extends r.Disposable{constructor(n,g,w,E){super(),this._model=n,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=g,this._coordinatesConverter=w,this.context=new T.CursorContext(this._model,this._viewModel,this._coordinatesConverter,E),this._cursors=new b.CursorCollection(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=(0,r.dispose)(this._autoClosedActions),super.dispose()}updateConfiguration(n){this.context=new T.CursorContext(this._model,this._viewModel,this._coordinatesConverter,n),this._cursors.updateContext(this.context)}onLineMappingChanged(n){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(n,"viewModel",0,this.getCursorStates())}setHasFocus(n){this._hasFocus=n}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){const n=this._cursors.getSelections();for(let g=0;g<this._autoClosedActions.length;g++){const w=this._autoClosedActions[g];w.isValid(n)||(w.dispose(),this._autoClosedActions.splice(g,1),g--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(n,g,w,E){let C=!1;const I=this.context.cursorConfig.multiCursorLimit;E!==null&&E.length>I&&(E=E.slice(0,I),C=!0);const _=o.from(this._model,this);return this._cursors.setStates(E),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(n,g,w,_,C)}setCursorColumnSelectData(n){this._columnSelectData=n}revealPrimary(n,g,w,E,C,I){const _=this._cursors.getViewPositions();let A=null,k=null;_.length>1?k=this._cursors.getViewSelections():A=m.Range.fromPositions(_[0],_[0]),n.emitViewEvent(new a.ViewRevealRangeRequestEvent(g,w,A,k,E,C,I))}saveState(){const n=[],g=this._cursors.getSelections();for(let w=0,E=g.length;w<E;w++){const C=g[w];n.push({inSelectionMode:!C.isEmpty(),selectionStart:{lineNumber:C.selectionStartLineNumber,column:C.selectionStartColumn},position:{lineNumber:C.positionLineNumber,column:C.positionColumn}})}return n}restoreState(n,g){const w=[];for(let E=0,C=g.length;E<C;E++){const I=g[E];let _=1,A=1;I.position&&I.position.lineNumber&&(_=I.position.lineNumber),I.position&&I.position.column&&(A=I.position.column);let k=_,L=A;I.selectionStart&&I.selectionStart.lineNumber&&(k=I.selectionStart.lineNumber),I.selectionStart&&I.selectionStart.column&&(L=I.selectionStart.column),w.push({selectionStartLineNumber:k,selectionStartColumn:L,positionLineNumber:_,positionColumn:A})}this.setStates(n,"restoreState",0,D.CursorState.fromModelSelections(w)),this.revealPrimary(n,"restoreState",!1,0,!0,1)}onModelContentChanged(n,g){if(g instanceof h.ModelInjectedTextChangedEvent){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(n,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{const w=g.rawContentChangedEvent;if(this._knownModelVersionId=w.versionId,this._isHandling)return;const E=w.containsEvent(1);if(this._prevEditOperationType=0,E)this._cursors.dispose(),this._cursors=new b.CursorCollection(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(n,"model",1,null,!1);else if(this._hasFocus&&w.resultingSelection&&w.resultingSelection.length>0){const C=D.CursorState.fromModelSelections(w.resultingSelection);this.setStates(n,"modelChange",w.isUndoing?5:w.isRedoing?6:2,C)&&this.revealPrimary(n,"modelChange",!1,0,!0,0)}else{const C=this._cursors.readSelectionFromMarkers();this.setStates(n,"modelChange",2,D.CursorState.fromModelSelections(C))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const n=this._cursors.getPrimaryCursor(),g=n.viewState.selectionStart.getStartPosition(),w=n.viewState.position;return{isReal:!1,fromViewLineNumber:g.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,g),toViewLineNumber:w.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,w)}}getSelections(){return this._cursors.getSelections()}getPosition(){return this._cursors.getPrimaryCursor().modelState.position}setSelections(n,g,w,E){this.setStates(n,g,E,D.CursorState.fromModelSelections(w))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(n){this._prevEditOperationType=n}_pushAutoClosedAction(n,g){const w=[],E=[];for(let _=0,A=n.length;_<A;_++)w.push({range:n[_],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),E.push({range:g[_],options:{description:"auto-closed-enclosing",stickiness:1}});const C=this._model.deltaDecorations([],w),I=this._model.deltaDecorations([],E);this._autoClosedActions.push(new u(this._model,C,I))}_executeEditOperation(n){if(!n)return;n.shouldPushStackElementBefore&&this._model.pushStackElement();const g=d.executeCommands(this._model,this._cursors.getSelections(),n.commands);if(g){this._interpretCommandResult(g);const w=[],E=[];for(let C=0;C<n.commands.length;C++){const I=n.commands[C];I instanceof v.TypeWithAutoClosingCommand&&I.enclosingRange&&I.closeCharacterRange&&(w.push(I.closeCharacterRange),E.push(I.enclosingRange))}w.length>0&&this._pushAutoClosedAction(w,E),this._prevEditOperationType=n.type}n.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(n){(!n||n.length===0)&&(n=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(n),this._cursors.normalize()}_emitStateChangedIfNecessary(n,g,w,E,C){const I=o.from(this._model,this);if(I.equals(E))return!1;const _=this._cursors.getSelections(),A=this._cursors.getViewSelections();if(n.emitViewEvent(new a.ViewCursorStateChangedEvent(A,_,w)),!E||E.cursorState.length!==I.cursorState.length||I.cursorState.some((k,L)=>!k.modelState.equals(E.cursorState[L].modelState))){const k=E?E.cursorState.map(R=>R.modelState.selection):null,L=E?E.modelVersionId:0;n.emitOutgoingEvent(new i.CursorStateChangedEvent(k,_,L,I.modelVersionId,g||"keyboard",w,C))}return!0}_findAutoClosingPairs(n){if(!n.length)return null;const g=[];for(let w=0,E=n.length;w<E;w++){const C=n[w];if(!C.text||C.text.indexOf(` `)>=0)return null;const I=C.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!I)return null;const _=I[1],A=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(_);if(!A||A.length!==1)return null;const k=A[0].open,L=C.text.length-I[2].length-1,R=C.text.lastIndexOf(k,L-1);if(R===-1)return null;g.push([R,L])}return g}executeEdits(n,g,w,E){let C=null;g==="snippet"&&(C=this._findAutoClosingPairs(w)),C&&(w[0]._isTracked=!0);const I=[],_=[],A=this._model.pushEditOperations(this.getSelections(),w,k=>{if(C)for(let R=0,M=C.length;R<M;R++){const[N,P]=C[R],x=k[R],F=x.range.startLineNumber,V=x.range.startColumn-1+N,W=x.range.startColumn-1+P;I.push(new m.Range(F,W+1,F,W+2)),_.push(new m.Range(F,V+1,F,W+2))}const L=E(k);return L&&(this._isHandling=!0),L});A&&(this._isHandling=!1,this.setSelections(n,g,A,0)),I.length>0&&this._pushAutoClosedAction(I,_)}_executeEdit(n,g,w,E=0){if(this.context.cursorConfig.readOnly)return;const C=o.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),n()}catch(I){(0,t.onUnexpectedError)(I)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(g,w,E,C,!1)&&this.revealPrimary(g,w,!1,0,!0,0)}getAutoClosedCharacters(){return u.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(n){this._compositionState=new c(this._model,this.getSelections())}endComposition(n,g){const w=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{g==="keyboard"&&this._executeEditOperation(v.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,w,this.getSelections(),this.getAutoClosedCharacters()))},n,g)}type(n,g,w){this._executeEdit(()=>{if(w==="keyboard"){const E=g.length;let C=0;for(;C<E;){const I=y.nextCharLength(g,C),_=g.substr(C,I);this._executeEditOperation(v.TypeOperations.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),_)),C+=I}}else this._executeEditOperation(v.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),g))},n,w)}compositionType(n,g,w,E,C,I){if(g.length===0&&w===0&&E===0){if(C!==0){const _=this.getSelections().map(A=>{const k=A.getPosition();return new S.Selection(k.lineNumber,k.column+C,k.lineNumber,k.column+C)});this.setSelections(n,I,_,0)}return}this._executeEdit(()=>{this._executeEditOperation(v.TypeOperations.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),g,w,E,C))},n,I)}paste(n,g,w,E,C){this._executeEdit(()=>{this._executeEditOperation(v.TypeOperations.paste(this.context.cursorConfig,this._model,this.getSelections(),g,w,E||[]))},n,C,4)}cut(n,g){this._executeEdit(()=>{this._executeEditOperation(f.DeleteOperations.cut(this.context.cursorConfig,this._model,this.getSelections()))},n,g)}executeCommand(n,g,w){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new D.EditOperationResult(0,[g],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},n,w)}executeCommands(n,g,w){this._executeEdit(()=>{this._executeEditOperation(new D.EditOperationResult(0,g,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},n,w)}}e.CursorsController=s;class o{static from(n,g){return new o(n.getVersionId(),g.getCursorStates())}constructor(n,g){this.modelVersionId=n,this.cursorState=g}equals(n){if(!n||this.modelVersionId!==n.modelVersionId||this.cursorState.length!==n.cursorState.length)return!1;for(let g=0,w=this.cursorState.length;g<w;g++)if(!this.cursorState[g].equals(n.cursorState[g]))return!1;return!0}}class u{static getAllAutoClosedCharacters(n){let g=[];for(const w of n)g=g.concat(w.getAutoClosedCharactersRanges());return g}constructor(n,g,w){this._model=n,this._autoClosedCharactersDecorations=g,this._autoClosedEnclosingDecorations=w}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const n=[];for(let g=0;g<this._autoClosedCharactersDecorations.length;g++){const w=this._model.getDecorationRange(this._autoClosedCharactersDecorations[g]);w&&n.push(w)}return n}isValid(n){const g=[];for(let w=0;w<this._autoClosedEnclosingDecorations.length;w++){const E=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[w]);if(E&&(g.push(E),E.startLineNumber!==E.endLineNumber))return!1}g.sort(m.Range.compareRangesUsingStarts),n.sort(m.Range.compareRangesUsingStarts);for(let w=0;w<n.length;w++)if(w>=g.length||!g[w].strictContainsRange(n[w]))return!1;return!0}}class d{static executeCommands(n,g,w){const E={model:n,selectionsBefore:g,trackedRanges:[],trackedRangesDirection:[]},C=this._innerExecuteCommands(E,w);for(let I=0,_=E.trackedRanges.length;I<_;I++)E.model._setTrackedRange(E.trackedRanges[I],null,0);return C}static _innerExecuteCommands(n,g){if(this._arrayIsEmpty(g))return null;const w=this._getEditOperations(n,g);if(w.operations.length===0)return null;const E=w.operations,C=this._getLoserCursorMap(E);if(C.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;const I=[];for(let k=0,L=E.length;k<L;k++)C.hasOwnProperty(E[k].identifier.major.toString())||I.push(E[k]);w.hadTrackedEditOperation&&I.length>0&&(I[0]._isTracked=!0);let _=n.model.pushEditOperations(n.selectionsBefore,I,k=>{const L=[];for(let N=0;N<n.selectionsBefore.length;N++)L[N]=[];for(const N of k)N.identifier&&L[N.identifier.major].push(N);const R=(N,P)=>N.identifier.minor-P.identifier.minor,M=[];for(let N=0;N<n.selectionsBefore.length;N++)L[N].length>0?(L[N].sort(R),M[N]=g[N].computeCursorState(n.model,{getInverseEditOperations:()=>L[N],getTrackedSelection:P=>{const x=parseInt(P,10),F=n.model._getTrackedRange(n.trackedRanges[x]);return n.trackedRangesDirection[x]===0?new S.Selection(F.startLineNumber,F.startColumn,F.endLineNumber,F.endColumn):new S.Selection(F.endLineNumber,F.endColumn,F.startLineNumber,F.startColumn)}})):M[N]=n.selectionsBefore[N];return M});_||(_=n.selectionsBefore);const A=[];for(const k in C)C.hasOwnProperty(k)&&A.push(parseInt(k,10));A.sort((k,L)=>L-k);for(const k of A)_.splice(k,1);return _}static _arrayIsEmpty(n){for(let g=0,w=n.length;g<w;g++)if(n[g])return!1;return!0}static _getEditOperations(n,g){let w=[],E=!1;for(let C=0,I=g.length;C<I;C++){const _=g[C];if(_){const A=this._getEditOperationsFromCommand(n,C,_);w=w.concat(A.operations),E=E||A.hadTrackedEditOperation}}return{operations:w,hadTrackedEditOperation:E}}static _getEditOperationsFromCommand(n,g,w){const E=[];let C=0;const I=(R,M,N=!1)=>{m.Range.isEmpty(R)&&M===""||E.push({identifier:{major:g,minor:C++},range:R,text:M,forceMoveMarkers:N,isAutoWhitespaceEdit:w.insertsAutoWhitespace})};let _=!1;const L={addEditOperation:I,addTrackedEditOperation:(R,M,N)=>{_=!0,I(R,M,N)},trackSelection:(R,M)=>{const N=S.Selection.liftSelection(R);let P;if(N.isEmpty())if(typeof M=="boolean")M?P=2:P=3;else{const V=n.model.getLineMaxColumn(N.startLineNumber);N.startColumn===V?P=2:P=3}else P=1;const x=n.trackedRanges.length,F=n.model._setTrackedRange(null,N,P);return n.trackedRanges[x]=F,n.trackedRangesDirection[x]=N.getDirection(),x.toString()}};try{w.getEditOperations(n.model,L)}catch(R){return(0,t.onUnexpectedError)(R),{operations:[],hadTrackedEditOperation:!1}}return{operations:E,hadTrackedEditOperation:_}}static _getLoserCursorMap(n){n=n.slice(0),n.sort((w,E)=>-m.Range.compareRangesUsingEnds(w.range,E.range));const g={};for(let w=1;w<n.length;w++){const E=n[w-1],C=n[w];if(m.Range.getStartPosition(E.range).isBefore(m.Range.getEndPosition(C.range))){let I;E.identifier.major>C.identifier.major?I=E.identifier.major:I=C.identifier.major,g[I.toString()]=!0;for(let _=0;_<n.length;_++)n[_].identifier.major===I&&(n.splice(_,1),_<w&&w--,_--);w>0&&w--}}return g}}class p{constructor(n,g,w){this.text=n,this.startSelection=g,this.endSelection=w}}class c{static _capture(n,g){const w=[];for(const E of g){if(E.startLineNumber!==E.endLineNumber)return null;w.push(new p(n.getLineContent(E.startLineNumber),E.startColumn-1,E.endColumn-1))}return w}constructor(n,g){this._original=c._capture(n,g)}deduceOutcome(n,g){if(!this._original)return null;const w=c._capture(n,g);if(!w||this._original.length!==w.length)return null;const E=[];for(let C=0,I=this._original.length;C<I;C++)E.push(c._deduceOutcome(this._original[C],w[C]));return E}static _deduceOutcome(n,g){const w=Math.min(n.startSelection,g.startSelection,y.commonPrefixLength(n.text,g.text)),E=Math.min(n.text.length-n.endSelection,g.text.length-g.endSelection,y.commonSuffixLength(n.text,g.text)),C=n.text.substring(w,n.text.length-E),I=g.text.substring(w,g.text.length-E);return new v.CompositionOutcome(C,n.startSelection-w,n.endSelection-w,I,g.startSelection-w,g.endSelection-w)}}}),define(Q[252],Y([1,0,22,26,146,25]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconClassesForLanguageId=e.getIconClasses=void 0;const T=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function f(h,a,r,i){const s=i===D.FileKind.ROOT_FOLDER?["rootfolder-icon"]:i===D.FileKind.FOLDER?["folder-icon"]:["file-icon"];if(r){let o;if(r.scheme===t.Schemas.data)o=y.DataUri.parseMetaData(r).get(y.DataUri.META_DATA_LABEL);else{const u=r.path.match(T);u?(o=S(u[2].toLowerCase()),u[1]&&s.push(`${S(u[1].toLowerCase())}-name-dir-icon`)):o=S(r.authority.toLowerCase())}if(i===D.FileKind.FOLDER)s.push(`${o}-name-folder-icon`);else{if(o){if(s.push(`${o}-name-file-icon`),s.push("name-file-icon"),o.length<=255){const d=o.split(".");for(let p=1;p<d.length;p++)s.push(`${d.slice(p).join(".")}-ext-file-icon`)}s.push("ext-file-icon")}const u=m(h,a,r);u&&s.push(`${S(u)}-lang-file-icon`)}}return s}e.getIconClasses=f;function v(h){return["file-icon",`${S(h)}-lang-file-icon`]}e.getIconClassesForLanguageId=v;function m(h,a,r){if(!r)return null;let i=null;if(r.scheme===t.Schemas.data){const o=y.DataUri.parseMetaData(r).get(y.DataUri.META_DATA_MIME);o&&(i=a.getLanguageIdByMimeType(o))}else{const s=h.getModel(r);s&&(i=s.getLanguageId())}return i&&i!==b.PLAINTEXT_LANGUAGE_ID?i:a.guessLanguageIdByFilepathOrFirstLine(r)}function S(h){return h.replace(/[\11\12\14\15\40]/g,"/")}}),define(Q[698],Y([1,0,195,197,22,55,26,33,146]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageIds=e.getMimeTypes=e.clearConfiguredLanguageAssociations=e.clearPlatformLanguageAssociations=e.registerConfiguredLanguageAssociation=e.registerPlatformLanguageAssociation=void 0;let m=[],S=[],h=[];function a(g,w=!1){i(g,!1,w)}e.registerPlatformLanguageAssociation=a;function r(g){i(g,!0,!1)}e.registerConfiguredLanguageAssociation=r;function i(g,w,E){const C=s(g,w);m.push(C),C.userConfigured?h.push(C):S.push(C),E&&!C.userConfigured&&m.forEach(I=>{I.mime===C.mime||I.userConfigured||(C.extension&&I.extension===C.extension&&console.warn(`Overwriting extension <<${C.extension}>> to now point to mime <<${C.mime}>>`),C.filename&&I.filename===C.filename&&console.warn(`Overwriting filename <<${C.filename}>> to now point to mime <<${C.mime}>>`),C.filepattern&&I.filepattern===C.filepattern&&console.warn(`Overwriting filepattern <<${C.filepattern}>> to now point to mime <<${C.mime}>>`),C.firstline&&I.firstline===C.firstline&&console.warn(`Overwriting firstline <<${C.firstline}>> to now point to mime <<${C.mime}>>`))})}function s(g,w){return{id:g.id,mime:g.mime,filename:g.filename,extension:g.extension,filepattern:g.filepattern,firstline:g.firstline,userConfigured:w,filenameLowercase:g.filename?g.filename.toLowerCase():void 0,extensionLowercase:g.extension?g.extension.toLowerCase():void 0,filepatternLowercase:g.filepattern?(0,t.parse)(g.filepattern.toLowerCase()):void 0,filepatternOnPath:g.filepattern?g.filepattern.indexOf(D.posix.sep)>=0:!1}}function o(){m=m.filter(g=>g.userConfigured),S=[]}e.clearPlatformLanguageAssociations=o;function u(){m=m.filter(g=>!g.userConfigured),h=[]}e.clearConfiguredLanguageAssociations=u;function d(g,w){return c(g,w).map(E=>E.mime)}e.getMimeTypes=d;function p(g,w){return c(g,w).map(E=>E.id)}e.getLanguageIds=p;function c(g,w){let E;if(g)switch(g.scheme){case b.Schemas.file:E=g.fsPath;break;case b.Schemas.data:{E=T.DataUri.parseMetaData(g).get(T.DataUri.META_DATA_LABEL);break}case b.Schemas.vscodeNotebookCell:E=void 0;break;default:E=g.path}if(!E)return[{id:"unknown",mime:y.Mimes.unknown}];E=E.toLowerCase();const C=(0,D.basename)(E),I=l(E,C,h);if(I)return[I,{id:v.PLAINTEXT_LANGUAGE_ID,mime:y.Mimes.text}];const _=l(E,C,S);if(_)return[_,{id:v.PLAINTEXT_LANGUAGE_ID,mime:y.Mimes.text}];if(w){const A=n(w);if(A)return[A,{id:v.PLAINTEXT_LANGUAGE_ID,mime:y.Mimes.text}]}return[{id:"unknown",mime:y.Mimes.unknown}]}function l(g,w,E){let C,I,_;for(let A=E.length-1;A>=0;A--){const k=E[A];if(w===k.filenameLowercase){C=k;break}if(k.filepattern&&(!I||k.filepattern.length>I.filepattern.length)){const L=k.filepatternOnPath?g:w;k.filepatternLowercase?.(L)&&(I=k)}k.extension&&(!_||k.extension.length>_.extension.length)&&w.endsWith(k.extensionLowercase)&&(_=k)}if(C)return C;if(I)return I;if(_)return _}function n(g){if((0,f.startsWithUTF8BOM)(g)&&(g=g.substr(1)),g.length>0)for(let w=m.length-1;w>=0;w--){const E=m[w];if(!E.firstline)continue;const C=g.match(E.firstline);if(C&&C.length>0)return E}}}),define(Q[3249],Y([1,0,6,4,33,698,146,56,16]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagesRegistry=e.LanguageIdCodec=void 0;const m=Object.prototype.hasOwnProperty,S="vs.editor.nullLanguage";class h{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(S,0),this._register(T.PLAINTEXT_LANGUAGE_ID,1),this._nextLanguageId=2}_register(i,s){this._languageIdToLanguage[s]=i,this._languageToLanguageId.set(i,s)}register(i){if(this._languageToLanguageId.has(i))return;const s=this._nextLanguageId++;this._register(i,s)}encodeLanguageId(i){return this._languageToLanguageId.get(i)||0}decodeLanguageId(i){return this._languageIdToLanguage[i]||S}}e.LanguageIdCodec=h;class a extends y.Disposable{static{this.instanceCount=0}constructor(i=!0,s=!1){super(),this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,a.instanceCount++,this._warnOnOverwrite=s,this.languageIdCodec=new h,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},i&&(this._initializeFromRegistry(),this._register(T.ModesRegistry.onDidChangeLanguages(o=>{this._initializeFromRegistry()})))}dispose(){a.instanceCount--,super.dispose()}setDynamicLanguages(i){this._dynamicLanguages=i,this._initializeFromRegistry()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,D.clearPlatformLanguageAssociations)();const i=[].concat(T.ModesRegistry.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(i)}registerLanguage(i){return T.ModesRegistry.registerLanguage(i)}_registerLanguages(i){for(const s of i)this._registerLanguage(s);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(s=>{const o=this._languages[s];o.name&&(this._nameMap[o.name]=o.identifier),o.aliases.forEach(u=>{this._lowercaseNameMap[u.toLowerCase()]=o.identifier}),o.mimetypes.forEach(u=>{this._mimeTypesMap[u]=o.identifier})}),v.Registry.as(f.Extensions.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(i){const s=i.id;let o;m.call(this._languages,s)?o=this._languages[s]:(this.languageIdCodec.register(s),o={identifier:s,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[s]=o),this._mergeLanguage(o,i)}_mergeLanguage(i,s){const o=s.id;let u=null;if(Array.isArray(s.mimetypes)&&s.mimetypes.length>0&&(i.mimetypes.push(...s.mimetypes),u=s.mimetypes[0]),u||(u=`text/x-${o}`,i.mimetypes.push(u)),Array.isArray(s.extensions)){s.configuration?i.extensions=s.extensions.concat(i.extensions):i.extensions=i.extensions.concat(s.extensions);for(const c of s.extensions)(0,D.registerPlatformLanguageAssociation)({id:o,mime:u,extension:c},this._warnOnOverwrite)}if(Array.isArray(s.filenames))for(const c of s.filenames)(0,D.registerPlatformLanguageAssociation)({id:o,mime:u,filename:c},this._warnOnOverwrite),i.filenames.push(c);if(Array.isArray(s.filenamePatterns))for(const c of s.filenamePatterns)(0,D.registerPlatformLanguageAssociation)({id:o,mime:u,filepattern:c},this._warnOnOverwrite);if(typeof s.firstLine=="string"&&s.firstLine.length>0){let c=s.firstLine;c.charAt(0)!=="^"&&(c="^"+c);try{const l=new RegExp(c);(0,b.regExpLeadsToEndlessLoop)(l)||(0,D.registerPlatformLanguageAssociation)({id:o,mime:u,firstline:l},this._warnOnOverwrite)}catch(l){console.warn(`[${s.id}]: Invalid regular expression \`${c}\`: `,l)}}i.aliases.push(o);let d=null;if(typeof s.aliases<"u"&&Array.isArray(s.aliases)&&(s.aliases.length===0?d=[null]:d=s.aliases),d!==null)for(const c of d)!c||c.length===0||i.aliases.push(c);const p=d!==null&&d.length>0;if(!(p&&d[0]===null)){const c=(p?d[0]:null)||o;(p||!i.name)&&(i.name=c)}s.configuration&&i.configurationFiles.push(s.configuration),s.icon&&i.icons.push(s.icon)}isRegisteredLanguageId(i){return i?m.call(this._languages,i):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getSortedRegisteredLanguageNames(){const i=[];for(const s in this._nameMap)m.call(this._nameMap,s)&&i.push({languageName:s,languageId:this._nameMap[s]});return i.sort((s,o)=>(0,b.compareIgnoreCase)(s.languageName,o.languageName)),i}getLanguageName(i){return m.call(this._languages,i)?this._languages[i].name:null}getMimeType(i){return m.call(this._languages,i)&&this._languages[i].mimetypes[0]||null}getExtensions(i){return m.call(this._languages,i)?this._languages[i].extensions:[]}getFilenames(i){return m.call(this._languages,i)?this._languages[i].filenames:[]}getIcon(i){return m.call(this._languages,i)&&this._languages[i].icons[0]||null}getConfigurationFiles(i){return m.call(this._languages,i)?this._languages[i].configurationFiles||[]:[]}getLanguageIdByLanguageName(i){const s=i.toLowerCase();return m.call(this._lowercaseNameMap,s)?this._lowercaseNameMap[s]:null}getLanguageIdByMimeType(i){return i&&m.call(this._mimeTypesMap,i)?this._mimeTypesMap[i]:null}guessLanguageIdByFilepathOrFirstLine(i,s){return!i&&!s?[]:(0,D.getLanguageIds)(i,s)}}e.LanguagesRegistry=a}),define(Q[3250],Y([1,0,6,4,3249,20,99,146]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageService=void 0;class v extends y.Disposable{static{this.instanceCount=0}constructor(h=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new t.Emitter),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new t.Emitter),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new t.Emitter({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,v.instanceCount++,this._registry=this._register(new b.LanguagesRegistry(!0,h)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){v.instanceCount--,super.dispose()}registerLanguage(h){return this._registry.registerLanguage(h)}isRegisteredLanguageId(h){return this._registry.isRegisteredLanguageId(h)}getRegisteredLanguageIds(){return this._registry.getRegisteredLanguageIds()}getSortedRegisteredLanguageNames(){return this._registry.getSortedRegisteredLanguageNames()}getLanguageName(h){return this._registry.getLanguageName(h)}getMimeType(h){return this._registry.getMimeType(h)}getIcon(h){return this._registry.getIcon(h)}getExtensions(h){return this._registry.getExtensions(h)}getFilenames(h){return this._registry.getFilenames(h)}getConfigurationFiles(h){return this._registry.getConfigurationFiles(h)}getLanguageIdByLanguageName(h){return this._registry.getLanguageIdByLanguageName(h)}getLanguageIdByMimeType(h){return this._registry.getLanguageIdByMimeType(h)}guessLanguageIdByFilepathOrFirstLine(h,a){const r=this._registry.guessLanguageIdByFilepathOrFirstLine(h,a);return(0,D.firstOrDefault)(r,null)}createById(h){return new m(this.onDidChange,()=>this._createAndGetLanguageIdentifier(h))}createByMimeType(h){return new m(this.onDidChange,()=>{const a=this.getLanguageIdByMimeType(h);return this._createAndGetLanguageIdentifier(a)})}createByFilepathOrFirstLine(h,a){return new m(this.onDidChange,()=>{const r=this.guessLanguageIdByFilepathOrFirstLine(h,a);return this._createAndGetLanguageIdentifier(r)})}_createAndGetLanguageIdentifier(h){return(!h||!this.isRegisteredLanguageId(h))&&(h=f.PLAINTEXT_LANGUAGE_ID),h}requestBasicLanguageFeatures(h){this._requestedBasicLanguages.has(h)||(this._requestedBasicLanguages.add(h),this._onDidRequestBasicLanguageFeatures.fire(h))}requestRichLanguageFeatures(h){this._requestedRichLanguages.has(h)||(this._requestedRichLanguages.add(h),this.requestBasicLanguageFeatures(h),T.TokenizationRegistry.getOrCreate(h),this._onDidRequestRichLanguageFeatures.fire(h))}}e.LanguageService=v;class m{constructor(h,a){this._onDidChangeLanguages=h,this._selector=a,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new t.Emitter({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){const h=this._selector();h!==this.languageId&&(this.languageId=h,this._emitter?.fire(this.languageId))}}}),define(Q[1176],Y([1,0,80,697,57,125,4,74,564]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultDocumentColorProvider=void 0;class m{constructor(a,r){this._editorWorkerClient=new y.EditorWorkerClient(a,!1,"editorWorkerService",r)}async provideDocumentColors(a,r){return this._editorWorkerClient.computeDefaultDocumentColors(a.uri)}provideColorPresentations(a,r,i){const s=r.range,o=r.color,u=o.alpha,d=new t.Color(new t.RGBA(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),u)),p=u?t.Color.Format.CSS.formatRGB(d):t.Color.Format.CSS.formatRGBA(d),c=u?t.Color.Format.CSS.formatHSL(d):t.Color.Format.CSS.formatHSLA(d),l=u?t.Color.Format.CSS.formatHex(d):t.Color.Format.CSS.formatHexA(d),n=[];return n.push({label:p,textEdit:{range:s,text:p}}),n.push({label:c,textEdit:{range:s,text:c}}),n.push({label:l,textEdit:{range:s,text:l}}),n}}e.DefaultDocumentColorProvider=m;let S=class extends T.Disposable{constructor(a,r,i){super(),this._register(i.colorProvider.register("*",new m(a,r)))}};S=fe([O(0,b.IModelService),O(1,D.ILanguageConfigurationService),O(2,f.ILanguageFeaturesService)],S),(0,v.registerEditorFeature)(S)}),define(Q[1177],Y([1,0,31,15,10,27,57,28,74,1176,9]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorPresentations=e.getColors=void 0;async function h(d,p,c,l=!0){return o(new r,d,p,c,l)}e.getColors=h;function a(d,p,c,l){return Promise.resolve(c.provideColorPresentations(d,p,l))}e.getColorPresentations=a;class r{constructor(){}async compute(p,c,l,n){const g=await p.provideDocumentColors(c,l);if(Array.isArray(g))for(const w of g)n.push({colorInfo:w,provider:p});return Array.isArray(g)}}class i{constructor(){}async compute(p,c,l,n){const g=await p.provideDocumentColors(c,l);if(Array.isArray(g))for(const w of g)n.push({range:w.range,color:[w.color.red,w.color.green,w.color.blue,w.color.alpha]});return Array.isArray(g)}}class s{constructor(p){this.colorInfo=p}async compute(p,c,l,n){const g=await p.provideColorPresentations(c,this.colorInfo,t.CancellationToken.None);return Array.isArray(g)&&n.push(...g),Array.isArray(g)}}async function o(d,p,c,l,n){let g=!1,w;const E=[],C=p.ordered(c);for(let I=C.length-1;I>=0;I--){const _=C[I];if(_ instanceof m.DefaultDocumentColorProvider)w=_;else try{await d.compute(_,c,l,E)&&(g=!0)}catch(A){(0,y.onUnexpectedExternalError)(A)}}return g?E:w&&n?(await d.compute(w,c,l,E),E):[]}function u(d,p){const{colorProvider:c}=d.get(v.ILanguageFeaturesService),l=d.get(T.IModelService).getModel(p);if(!l)throw(0,y.illegalArgument)();const n=d.get(S.IConfigurationService).getValue("editor.defaultColorDecorators",{resource:p});return{model:l,colorProviderRegistry:c,isDefaultColorDecoratorsEnabled:n}}f.CommandsRegistry.registerCommand("_executeDocumentColorProvider",function(d,...p){const[c]=p;if(!(c instanceof b.URI))throw(0,y.illegalArgument)();const{model:l,colorProviderRegistry:n,isDefaultColorDecoratorsEnabled:g}=u(d,c);return o(new i,n,l,t.CancellationToken.None,g)}),f.CommandsRegistry.registerCommand("_executeColorPresentationProvider",function(d,...p){const[c,l]=p,{uri:n,range:g}=l;if(!(n instanceof b.URI)||!Array.isArray(c)||c.length!==4||!D.Range.isIRange(g))throw(0,y.illegalArgument)();const{model:w,colorProviderRegistry:E,isDefaultColorDecoratorsEnabled:C}=u(d,n),[I,_,A,k]=c;return o(new s({range:g,color:{red:I,green:_,blue:A,alpha:k}}),E,w,t.CancellationToken.None,C)})}),define(Q[3251],Y([1,0,31,128,4,109,51,99,125,74,2327,811]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionWithUpdatedRange=e.UpToDateInlineCompletions=e.InlineCompletionsSource=void 0;let a=class extends b.Disposable{constructor(l,n,g,w,E){super(),this.textModel=l,this.versionId=n,this._debounceValue=g,this.languageFeaturesService=w,this.languageConfigurationService=E,this._updateOperation=this._register(new b.MutableDisposable),this.inlineCompletions=(0,D.disposableObservableValue)("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=(0,D.disposableObservableValue)("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(l,n,g){const w=new i(l,n,this.textModel.getVersionId()),E=n.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(this._updateOperation.value?.request.satisfies(w))return this._updateOperation.value.promise;if(E.get()?.request.satisfies(w))return Promise.resolve(!0);const C=!!this._updateOperation.value;this._updateOperation.clear();const I=new t.CancellationTokenSource,_=(async()=>{if((C||n.triggerKind===f.InlineCompletionTriggerKind.Automatic)&&await r(this._debounceValue.get(this.textModel)),I.token.isCancellationRequested||this.textModel.getVersionId()!==w.versionId)return!1;const L=new Date,R=await(0,S.provideInlineCompletions)(this.languageFeaturesService.inlineCompletionsProvider,l,this.textModel,n,I.token,this.languageConfigurationService);if(I.token.isCancellationRequested||this.textModel.getVersionId()!==w.versionId)return!1;const M=new Date;this._debounceValue.update(this.textModel,M.getTime()-L.getTime());const N=new u(R,w,this.textModel,this.versionId);if(g){const P=g.toInlineCompletion(void 0);g.canBeReused(this.textModel,l)&&!R.has(P)&&N.prepend(g.inlineCompletion,P.range,!0)}return this._updateOperation.clear(),(0,D.transaction)(P=>{E.set(N,P)}),!0})(),A=new o(w,I,_);return this._updateOperation.value=A,_}clear(l){this._updateOperation.clear(),this.inlineCompletions.set(void 0,l),this.suggestWidgetInlineCompletions.set(void 0,l)}clearSuggestWidgetInlineCompletions(l){this._updateOperation.value?.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,l)}cancelUpdate(){this._updateOperation.clear()}};e.InlineCompletionsSource=a,e.InlineCompletionsSource=a=fe([O(3,m.ILanguageFeaturesService),O(4,v.ILanguageConfigurationService)],a);function r(c,l){return new Promise(n=>{let g;const w=setTimeout(()=>{g&&g.dispose(),n()},c);l&&(g=l.onCancellationRequested(()=>{clearTimeout(w),g&&g.dispose(),n()}))})}class i{constructor(l,n,g){this.position=l,this.context=n,this.versionId=g}satisfies(l){return this.position.equals(l.position)&&s(this.context.selectedSuggestionInfo,l.context.selectedSuggestionInfo,(n,g)=>n.equals(g))&&(l.context.triggerKind===f.InlineCompletionTriggerKind.Automatic||this.context.triggerKind===f.InlineCompletionTriggerKind.Explicit)&&this.versionId===l.versionId}}function s(c,l,n){return!c||!l?c===l:n(c,l)}class o{constructor(l,n,g){this.request=l,this.cancellationTokenSource=n,this.promise=g}dispose(){this.cancellationTokenSource.cancel()}}class u{get inlineCompletions(){return this._inlineCompletions}constructor(l,n,g,w){this.inlineCompletionProviderResult=l,this.request=n,this.textModel=g,this.versionId=w,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=(0,D.derived)(C=>{this.versionId.read(C);let I=!1;for(const _ of this._inlineCompletions)I=I||_._updateRange(this.textModel);return I&&this._rangeVersionIdValue++,this._rangeVersionIdValue});const E=g.deltaDecorations([],l.completions.map(C=>({range:C.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=l.completions.map((C,I)=>new d(C,E[I],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this.textModel.isDisposed()||this.textModel.deltaDecorations(this._inlineCompletions.map(l=>l.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(const l of this._prependedInlineCompletionItems)l.source.removeRef()}}prepend(l,n,g){g&&l.source.addRef();const w=this.textModel.deltaDecorations([],[{range:n,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new d(l,w,this._rangeVersionId,n)),this._prependedInlineCompletionItems.push(l)}}e.UpToDateInlineCompletions=u;class d{get forwardStable(){return this.inlineCompletion.source.inlineCompletions.enableForwardStability??!1}constructor(l,n,g,w){this.inlineCompletion=l,this.decorationId=n,this.rangeVersion=g,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=w??l.range}toInlineCompletion(l){return this.inlineCompletion.withRange(this._getUpdatedRange(l))}toSingleTextEdit(l){return new h.SingleTextEdit(this._getUpdatedRange(l),this.inlineCompletion.insertText)}isVisible(l,n,g){const w=this._toFilterTextReplacement(g).removeCommonPrefix(l);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(g).getStartPosition())||n.lineNumber!==w.range.startLineNumber)return!1;const E=l.getValueInRange(w.range,1).toLowerCase(),C=w.text.toLowerCase(),I=Math.max(0,n.column-w.range.startColumn);let _=C.substring(0,I),A=C.substring(I),k=E.substring(0,I),L=E.substring(I);const R=l.getLineIndentColumn(w.range.startLineNumber);return w.range.startColumn<=R&&(k=k.trimStart(),k.length===0&&(L=L.trimStart()),_=_.trimStart(),_.length===0&&(A=A.trimStart())),_.startsWith(k)&&!!(0,y.matchesSubString)(L,A)}canBeReused(l,n){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(n)&&this.isVisible(l,n,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(l){return new h.SingleTextEdit(this._getUpdatedRange(l),this.inlineCompletion.filterText)}_isSmallerThanOriginal(l){return p(this._getUpdatedRange(l)).isBefore(p(this.inlineCompletion.range))}_getUpdatedRange(l){return this.rangeVersion.read(l),this._updatedRange}_updateRange(l){const n=l.getDecorationRange(this.decorationId);return n?this._updatedRange.equalsRange(n)?!1:(this._updatedRange=n,!0):(this._isValid=!1,!0)}}e.InlineCompletionWithUpdatedRange=d;function p(c){return c.startLineNumber===c.endLineNumber?new T.Position(1,1+c.endColumn-c.startColumn):new T.Position(1+c.endLineNumber-c.startLineNumber,c.endColumn)}}),define(Q[3252],Y([1,0,33,877,27,96,394,125,1090,875,876]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveLinesCommand=void 0;let h=class{constructor(r,i,s,o){this._languageConfigurationService=o,this._selection=r,this._isMovingDown=i,this._autoIndent=s,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(r,i){const s=r.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===s){this._selectionId=i.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=i.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let o=this._selection;o.startLineNumber<o.endLineNumber&&o.endColumn===1&&(this._moveEndPositionDown=!0,o=o.setEndPosition(o.endLineNumber-1,r.getLineMaxColumn(o.endLineNumber-1)));const{tabSize:u,indentSize:d,insertSpaces:p}=r.getOptions(),c=this.buildIndentConverter(u,d,p),l={tokenization:{getLineTokens:n=>r.tokenization.getLineTokens(n),getLanguageId:()=>r.getLanguageId(),getLanguageIdAtPosition:(n,g)=>r.getLanguageIdAtPosition(n,g)},getLineContent:null};if(o.startLineNumber===o.endLineNumber&&r.getLineMaxColumn(o.startLineNumber)===1){const n=o.startLineNumber,g=this._isMovingDown?n+1:n-1;r.getLineMaxColumn(g)===1?i.addEditOperation(new b.Range(1,1,1,1),null):(i.addEditOperation(new b.Range(n,1,n,1),r.getLineContent(g)),i.addEditOperation(new b.Range(g,1,g,r.getLineMaxColumn(g)),null)),o=new D.Selection(g,1,g,1)}else{let n,g;if(this._isMovingDown){n=o.endLineNumber+1,g=r.getLineContent(n),i.addEditOperation(new b.Range(n-1,r.getLineMaxColumn(n-1),n,r.getLineMaxColumn(n)),null);let w=g;if(this.shouldAutoIndent(r,o)){const E=this.matchEnterRule(r,c,u,n,o.startLineNumber-1);if(E!==null){const I=t.getLeadingWhitespace(r.getLineContent(n)),_=E+v.getSpaceCnt(I,u);w=v.generateIndent(_,u,p)+this.trimStart(g)}else{l.getLineContent=_=>_===o.startLineNumber?r.getLineContent(n):r.getLineContent(_);const I=(0,m.getGoodIndentForLine)(this._autoIndent,l,r.getLanguageIdAtPosition(n,1),o.startLineNumber,c,this._languageConfigurationService);if(I!==null){const _=t.getLeadingWhitespace(r.getLineContent(n)),A=v.getSpaceCnt(I,u),k=v.getSpaceCnt(_,u);A!==k&&(w=v.generateIndent(A,u,p)+this.trimStart(g))}}i.addEditOperation(new b.Range(o.startLineNumber,1,o.startLineNumber,1),w+` `);const C=this.matchEnterRuleMovingDown(r,c,u,o.startLineNumber,n,w);if(C!==null)C!==0&&this.getIndentEditsOfMovingBlock(r,i,o,u,p,C);else{l.getLineContent=_=>_===o.startLineNumber?w:_>=o.startLineNumber+1&&_<=o.endLineNumber+1?r.getLineContent(_-1):r.getLineContent(_);const I=(0,m.getGoodIndentForLine)(this._autoIndent,l,r.getLanguageIdAtPosition(n,1),o.startLineNumber+1,c,this._languageConfigurationService);if(I!==null){const _=t.getLeadingWhitespace(r.getLineContent(o.startLineNumber)),A=v.getSpaceCnt(I,u),k=v.getSpaceCnt(_,u);if(A!==k){const L=A-k;this.getIndentEditsOfMovingBlock(r,i,o,u,p,L)}}}}else i.addEditOperation(new b.Range(o.startLineNumber,1,o.startLineNumber,1),w+` `)}else if(n=o.startLineNumber-1,g=r.getLineContent(n),i.addEditOperation(new b.Range(n,1,n+1,1),null),i.addEditOperation(new b.Range(o.endLineNumber,r.getLineMaxColumn(o.endLineNumber),o.endLineNumber,r.getLineMaxColumn(o.endLineNumber)),` `+g),this.shouldAutoIndent(r,o)){l.getLineContent=E=>E===n?r.getLineContent(o.startLineNumber):r.getLineContent(E);const w=this.matchEnterRule(r,c,u,o.startLineNumber,o.startLineNumber-2);if(w!==null)w!==0&&this.getIndentEditsOfMovingBlock(r,i,o,u,p,w);else{const E=(0,m.getGoodIndentForLine)(this._autoIndent,l,r.getLanguageIdAtPosition(o.startLineNumber,1),n,c,this._languageConfigurationService);if(E!==null){const C=t.getLeadingWhitespace(r.getLineContent(o.startLineNumber)),I=v.getSpaceCnt(E,u),_=v.getSpaceCnt(C,u);if(I!==_){const A=I-_;this.getIndentEditsOfMovingBlock(r,i,o,u,p,A)}}}}}this._selectionId=i.trackSelection(o)}buildIndentConverter(r,i,s){return{shiftIndent:o=>y.ShiftCommand.shiftIndent(o,o.length+1,r,i,s),unshiftIndent:o=>y.ShiftCommand.unshiftIndent(o,o.length+1,r,i,s)}}parseEnterResult(r,i,s,o,u){if(u){let d=u.indentation;u.indentAction===T.IndentAction.None||u.indentAction===T.IndentAction.Indent?d=u.indentation+u.appendText:u.indentAction===T.IndentAction.IndentOutdent?d=u.indentation:u.indentAction===T.IndentAction.Outdent&&(d=i.unshiftIndent(u.indentation)+u.appendText);const p=r.getLineContent(o);if(this.trimStart(p).indexOf(this.trimStart(d))>=0){const c=t.getLeadingWhitespace(r.getLineContent(o));let l=t.getLeadingWhitespace(d);const n=(0,m.getIndentMetadata)(r,o,this._languageConfigurationService);n!==null&&n&2&&(l=i.unshiftIndent(l));const g=v.getSpaceCnt(l,s),w=v.getSpaceCnt(c,s);return g-w}}return null}matchEnterRuleMovingDown(r,i,s,o,u,d){if(t.lastNonWhitespaceIndex(d)>=0){const p=r.getLineMaxColumn(u),c=(0,S.getEnterAction)(this._autoIndent,r,new b.Range(u,p,u,p),this._languageConfigurationService);return this.parseEnterResult(r,i,s,o,c)}else{let p=o-1;for(;p>=1;){const n=r.getLineContent(p);if(t.lastNonWhitespaceIndex(n)>=0)break;p--}if(p<1||o>r.getLineCount())return null;const c=r.getLineMaxColumn(p),l=(0,S.getEnterAction)(this._autoIndent,r,new b.Range(p,c,p,c),this._languageConfigurationService);return this.parseEnterResult(r,i,s,o,l)}}matchEnterRule(r,i,s,o,u,d){let p=u;for(;p>=1;){let n;if(p===u&&d!==void 0?n=d:n=r.getLineContent(p),t.lastNonWhitespaceIndex(n)>=0)break;p--}if(p<1||o>r.getLineCount())return null;const c=r.getLineMaxColumn(p),l=(0,S.getEnterAction)(this._autoIndent,r,new b.Range(p,c,p,c),this._languageConfigurationService);return this.parseEnterResult(r,i,s,o,l)}trimStart(r){return r.replace(/^\s+/,"")}shouldAutoIndent(r,i){if(this._autoIndent<4||!r.tokenization.isCheapToTokenize(i.startLineNumber))return!1;const s=r.getLanguageIdAtPosition(i.startLineNumber,1),o=r.getLanguageIdAtPosition(i.endLineNumber,1);return!(s!==o||this._languageConfigurationService.getLanguageConfiguration(s).indentRulesSupport===null)}getIndentEditsOfMovingBlock(r,i,s,o,u,d){for(let p=s.startLineNumber;p<=s.endLineNumber;p++){const c=r.getLineContent(p),l=t.getLeadingWhitespace(c),g=v.getSpaceCnt(l,o)+d,w=v.generateIndent(g,o,u);w!==l&&(i.addEditOperation(new b.Range(p,1,p,l.length+1),w),p===s.endLineNumber&&s.endColumn<=l.length+1&&w===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(r,i){let s=i.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(s=s.setEndPosition(s.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&s.startLineNumber<s.endLineNumber&&(s=s.setEndPosition(s.endLineNumber,2)),s}};e.MoveLinesCommand=h,e.MoveLinesCommand=h=fe([O(3,f.ILanguageConfigurationService)],h)}),define(Q[209],Y([1,0,217,364,15,6,4,258,50,146,449,41,1739]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.openLinkFromMarkdown=e.MarkdownRenderer=void 0;let r=class{static{a=this}static{this._ttpTokenizer=(0,y.createTrustedTypesPolicy)("tokenizeToString",{createHTML(u){return u}})}constructor(u,d,p){this._options=u,this._languageService=d,this._openerService=p,this._onDidRenderAsync=new D.Emitter,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(u,d,p){if(!u)return{element:document.createElement("span"),dispose:()=>{}};const c=new T.DisposableStore,l=c.add((0,t.renderMarkdown)(u,{...this._getRenderOptions(u,c),...d},p));return l.element.classList.add("rendered-markdown"),{element:l.element,dispose:()=>c.dispose()}}_getRenderOptions(u,d){return{codeBlockRenderer:async(p,c)=>{let l;p?l=this._languageService.getLanguageIdByLanguageName(p):this._options.editor&&(l=this._options.editor.getModel()?.getLanguageId()),l||(l=m.PLAINTEXT_LANGUAGE_ID);const n=await(0,S.tokenizeToString)(this._languageService,c,l),g=document.createElement("span");if(g.innerHTML=a._ttpTokenizer?.createHTML(n)??n,this._options.editor){const w=this._options.editor.getOption(49);(0,f.applyFontInfo)(g,w)}else this._options.codeBlockFontFamily&&(g.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(g.style.fontSize=this._options.codeBlockFontSize),g},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:p=>i(this._openerService,p,u.isTrusted),disposables:d}}}};e.MarkdownRenderer=r,e.MarkdownRenderer=r=a=fe([O(1,v.ILanguageService),O(2,h.IOpenerService)],r);async function i(o,u,d){try{return await o.open(u,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:s(d)})}catch(p){return(0,b.onUnexpectedError)(p),!1}}e.openLinkFromMarkdown=i;function s(o){return o===!0?!0:o&&Array.isArray(o.enabledCommands)?o.enabledCommands:!1}}),define(Q[3253],Y([1,0,7,42,209,1955]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignerPropertiesPane=void 0;class T{constructor(v,m,S,h){this._createComponents=m,this._setComponentValue=S,this._componentMap=new Map;const a=v.appendChild(t.$(".title-container"));this._titleElement=a.appendChild(t.$("div")),this._contentElement=v.appendChild(t.$(".properties-content.components-grid")),this._titleElement.innerText=(0,D.localize)(0,null),this.createDescriptionComponent(v),this._markdownRenderer=h.createInstance(b.MarkdownRenderer,{})}get descriptionElement(){return this._descriptionContainer}get componentMap(){return this._componentMap}get objectPath(){return this._objectPath}updateDescription(v){this._descriptionContainer.style.display="block";const m=v.componentProperties.title||v.componentProperties.ariaLabel||"",S=v.description??"";if(this._descriptionTitleContainer.innerText=m,t.clearNode(this._descriptionTextContainer),S){const h=this._markdownRenderer.render({value:S}).element;this._descriptionTextContainer.appendChild(h)}}clear(){this._componentMap.forEach(v=>{v.component.dispose()}),this._componentMap.clear(),t.clearNode(this._contentElement),this._objectPath=void 0}createDescriptionComponent(v){this._descriptionContainer=v.appendChild(t.$(".description-component")),this._descriptionTitleContainer=this._descriptionContainer.appendChild(t.$("")).appendChild(t.$(".description-component-label")),this._descriptionTitleContainer.classList.add("codicon","info"),this._descriptionTextContainer=this._descriptionContainer.appendChild(t.$(".description-component-content")),this._descriptionTitleContainer.innerText="",this._descriptionTextContainer.innerText=""}show(v){(0,y.equals)(v.path,this._objectPath)||(this.clear(),this._objectPath=v.path,this._createComponents(this._contentElement,v.components,this.objectPath)),this._titleElement.innerText=(0,D.localize)(1,null,v.type),this._componentMap.forEach(m=>{this._setComponentValue(m.defintion,m.component,v.viewModel)}),this._descriptionContainer.style.display="none"}selectProperty(v){const m=this.componentMap.get(v[0]);if(m.defintion.componentType!=="table"){m.component.focus();return}const S=m.component,h=v[1];let a=0;if(v.length===3){const r=v[2];a=S.columns.findIndex(i=>i.field===r)}S.setActiveCell(h,a),S.grid.scrollCellIntoView(h,a,!1)}}e.DesignerPropertiesPane=T}),define(Q[3254],Y([1,0,7,20,110,4,209,1131,827]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginHoverWidget=void 0;const m=t.$;class S extends D.Disposable{static{this.ID="editor.contrib.modesGlyphHoverWidget"}constructor(r,i,s){super(),this._renderDisposeables=this._register(new D.DisposableStore),this._editor=r,this._isVisible=!1,this._messages=[],this._hover=this._register(new v.HoverWidget),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new T.MarkdownRenderer({editor:this._editor},i,s)),this._computer=new h(this._editor),this._hoverOperation=this._register(new f.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(o=>{this._withResult(o.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(49)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return S.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(i=>this._editor.applyFontInfo(i))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(r){this._computer.lineNumber!==r&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=r,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(r){this._messages=r,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(r,i){this._renderDisposeables.clear();const s=document.createDocumentFragment();for(const o of i){const u=m("div.hover-row.markdown-hover"),d=t.append(u,m("div.hover-contents")),p=this._renderDisposeables.add(this._markdownRenderer.render(o.value));d.appendChild(p.element),s.appendChild(u)}this._updateContents(s),this._showAt(r)}_updateContents(r){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(r),this._updateFont()}_showAt(r){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const i=this._editor.getLayoutInfo(),s=this._editor.getTopForLineNumber(r),o=this._editor.getScrollTop(),u=this._editor.getOption(65),d=this._hover.containerDomNode.clientHeight,p=s-o-(d-u)/2;this._hover.containerDomNode.style.left=`${i.glyphMarginLeft+i.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(p),0)}px`}}e.MarginHoverWidget=S;class h{get lineNumber(){return this._lineNumber}set lineNumber(r){this._lineNumber=r}constructor(r){this._editor=r,this._lineNumber=-1}computeSync(){const r=o=>({value:o}),i=this._editor.getLineDecorations(this._lineNumber),s=[];if(!i)return s;for(const o of i){if(!o.options.glyphMarginClassName)continue;const u=o.options.glyphMarginHoverMessage;!u||(0,b.isEmptyMarkdownString)(u)||s.push(...(0,y.asArray)(u).map(r))}return s}}}),define(Q[1178],Y([1,0,7,162,32,37,6,110,4,209,668,2431,5]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestDetailsOverlay=e.SuggestDetailsWidget=e.canExpandCompletionItem=void 0;function r(o){return!!o&&!!(o.completion.documentation||o.completion.detail&&o.completion.detail!==o.completion.label)}e.canExpandCompletionItem=r;let i=class{constructor(u,d){this._editor=u,this._onDidClose=new T.Emitter,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new T.Emitter,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new v.DisposableStore,this._renderDisposeable=new v.DisposableStore,this._borderWidth=1,this._size=new t.Dimension(330,0),this.domNode=t.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=d.createInstance(m.MarkdownRenderer,{editor:u}),this._body=t.$(".body"),this._scrollbar=new y.DomScrollableElement(this._body,{alwaysConsumeMouseWheel:!0}),t.append(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=t.append(this._body,t.$(".header")),this._close=t.append(this._header,t.$("span"+D.ThemeIcon.asCSSSelector(b.Codicon.close))),this._close.title=h.localize(0,null),this._type=t.append(this._header,t.$("p.type")),this._docs=t.append(this._body,t.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(p=>{p.hasChanged(49)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const u=this._editor.getOptions(),d=u.get(49),p=d.getMassagedFontFamily(),c=u.get(117)||d.fontSize,l=u.get(118)||d.lineHeight,n=d.fontWeight,g=`${c}px`,w=`${l}px`;this.domNode.style.fontSize=g,this.domNode.style.lineHeight=`${l/c}`,this.domNode.style.fontWeight=n,this.domNode.style.fontFeatureSettings=d.fontFeatureSettings,this._type.style.fontFamily=p,this._close.style.height=w,this._close.style.width=w}getLayoutInfo(){const u=this._editor.getOption(118)||this._editor.getOption(49).lineHeight,d=this._borderWidth,p=d*2;return{lineHeight:u,borderWidth:d,borderHeight:p,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=h.localize(1,null),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(u,d){this._renderDisposeable.clear();let{detail:p,documentation:c}=u.completion;if(d){let l="";l+=`score: ${u.score[0]} `,l+=`prefix: ${u.word??"(no prefix)"} `,l+=`word: ${u.completion.filterText?u.completion.filterText+" (filterText)":u.textLabel} `,l+=`distance: ${u.distance} (localityBonus-setting) `,l+=`index: ${u.idx}, based on ${u.completion.sortText&&`sortText: "${u.completion.sortText}"`||"label"} `,l+=`commit_chars: ${u.completion.commitCharacters?.join("")} `,c=new f.MarkdownString().appendCodeblock("empty",l),p=`Provider: ${u.provider._debugDisplayName}`}if(!d&&!r(u)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),p){const l=p.length>1e5?`${p.substr(0,1e5)}\u2026`:p;this._type.textContent=l,this._type.title=l,t.show(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(l))}else t.clearNode(this._type),this._type.title="",t.hide(this._type),this.domNode.classList.add("no-type");if(t.clearNode(this._docs),typeof c=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=c;else if(c){this._docs.classList.add("markdown-docs"),t.clearNode(this._docs);const l=this._markdownRenderer.render(c);this._docs.appendChild(l.element),this._renderDisposeable.add(l),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=l=>{l.preventDefault(),l.stopPropagation()},this._close.onclick=l=>{l.preventDefault(),l.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(u,d){const p=new t.Dimension(u,d);t.Dimension.equals(p,this._size)||(this._size=p,t.size(this.domNode,u,d)),this._scrollbar.scanDomNode()}scrollDown(u=8){this._body.scrollTop+=u}scrollUp(u=8){this._body.scrollTop-=u}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(u){this._borderWidth=u}get borderWidth(){return this._borderWidth}};e.SuggestDetailsWidget=i,e.SuggestDetailsWidget=i=fe([O(1,a.IInstantiationService)],i);class s{constructor(u,d){this.widget=u,this._editor=d,this._disposables=new v.DisposableStore,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new S.ResizableHTMLElement,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(u.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let p,c,l=0,n=0;this._disposables.add(this._resizable.onDidWillResize(()=>{p=this._topLeft,c=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(g=>{if(p&&c){this.widget.layout(g.dimension.width,g.dimension.height);let w=!1;g.west&&(n=c.width-g.dimension.width,w=!0),g.north&&(l=c.height-g.dimension.height,w=!0),w&&this._applyTopLeft({top:p.top+l,left:p.left+n})}g.done&&(p=void 0,c=void 0,l=0,n=0,this._userSize=g.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{this._anchorBox&&this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(u=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),u&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(u,d){const p=u.getBoundingClientRect();this._anchorBox=p,this._preferAlignAtTop=d,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,d)}_placeAtAnchor(u,d,p){const c=t.getClientArea(document.body),l=this.widget.getLayoutInfo(),n=new t.Dimension(220,2*l.lineHeight),g=u.top,w=function(){const N=c.width-(u.left+u.width+l.borderWidth+l.horizontalPadding),P=-l.borderWidth+u.left+u.width,x=new t.Dimension(N,c.height-u.top-l.borderHeight-l.verticalPadding),F=x.with(void 0,u.top+u.height-l.borderHeight-l.verticalPadding);return{top:g,left:P,fit:N-d.width,maxSizeTop:x,maxSizeBottom:F,minSize:n.with(Math.min(N,n.width))}}(),E=function(){const N=u.left-l.borderWidth-l.horizontalPadding,P=Math.max(l.horizontalPadding,u.left-d.width-l.borderWidth),x=new t.Dimension(N,c.height-u.top-l.borderHeight-l.verticalPadding),F=x.with(void 0,u.top+u.height-l.borderHeight-l.verticalPadding);return{top:g,left:P,fit:N-d.width,maxSizeTop:x,maxSizeBottom:F,minSize:n.with(Math.min(N,n.width))}}(),C=function(){const N=u.left,P=-l.borderWidth+u.top+u.height,x=new t.Dimension(u.width-l.borderHeight,c.height-u.top-u.height-l.verticalPadding);return{top:P,left:N,fit:x.height-d.height,maxSizeBottom:x,maxSizeTop:x,minSize:n.with(x.width)}}(),I=[w,E,C],_=I.find(N=>N.fit>=0)??I.sort((N,P)=>P.fit-N.fit)[0],A=u.top+u.height-l.borderHeight;let k,L=d.height;const R=Math.max(_.maxSizeTop.height,_.maxSizeBottom.height);L>R&&(L=R);let M;p?L<=_.maxSizeTop.height?(k=!0,M=_.maxSizeTop):(k=!1,M=_.maxSizeBottom):L<=_.maxSizeBottom.height?(k=!1,M=_.maxSizeBottom):(k=!0,M=_.maxSizeTop),this._applyTopLeft({left:_.left,top:k?_.top:A-L}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!k,_===w,k,_!==w),this._resizable.minSize=_.minSize,this._resizable.maxSize=M,this._resizable.layout(L,Math.min(M.width,d.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(u){this._topLeft=u,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}e.SuggestDetailsOverlay=s}),define(Q[699],Y([1,0,20,6,161,4,69,42,17,10,9,56,16]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.mergeChanges=e.Configuration=e.UserSettings=e.ConfigurationModelParser=e.ConfigurationModel=void 0;function r(g){return Object.isFrozen(g)?g:f.deepFreeze(g)}class i{constructor(w={},E=[],C=[],I){this._contents=w,this._keys=E,this._overrides=C,this.raw=I,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw?.length){const w=this.raw.map(E=>{if(E instanceof i)return E;const C=new s("");return C.parseRaw(E),C.configurationModel});this._rawConfiguration=w.reduce((E,C)=>C===E?C:E.merge(C),w[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(w){return w?(0,S.getConfigurationValue)(this.contents,w):this.contents}inspect(w,E){const C=this.rawConfiguration.getValue(w),I=E?this.rawConfiguration.getOverrideValue(w,E):void 0,_=E?this.rawConfiguration.override(E).getValue(w):C;return{value:C,override:I,merged:_}}getOverrideValue(w,E){const C=this.getContentsForOverrideIdentifer(E);return C?w?(0,S.getConfigurationValue)(C,w):C:void 0}getKeysForOverrideIdentifier(w){const E=[];for(const C of this.overrides)C.identifiers.includes(w)&&E.push(...C.keys);return t.distinct(E)}getAllOverrideIdentifiers(){const w=[];for(const E of this.overrides)w.push(...E.identifiers);return t.distinct(w)}override(w){let E=this.overrideConfigurations.get(w);return E||(E=this.createOverrideConfigurationModel(w),this.overrideConfigurations.set(w,E)),E}merge(...w){const E=f.deepClone(this.contents),C=f.deepClone(this.overrides),I=[...this.keys],_=this.raw?.length?[...this.raw]:[this];for(const A of w)if(_.push(...A.raw?.length?A.raw:[A]),!A.isEmpty()){this.mergeContents(E,A.contents);for(const k of A.overrides){const[L]=C.filter(R=>t.equals(R.identifiers,k.identifiers));L?(this.mergeContents(L.contents,k.contents),L.keys.push(...k.keys),L.keys=t.distinct(L.keys)):C.push(f.deepClone(k))}for(const k of A.keys)I.indexOf(k)===-1&&I.push(k)}return new i(E,I,C,_.every(A=>A instanceof i)?void 0:_)}createOverrideConfigurationModel(w){const E=this.getContentsForOverrideIdentifer(w);if(!E||typeof E!="object"||!Object.keys(E).length)return this;const C={};for(const I of t.distinct([...Object.keys(this.contents),...Object.keys(E)])){let _=this.contents[I];const A=E[I];A&&(typeof _=="object"&&typeof A=="object"?(_=f.deepClone(_),this.mergeContents(_,A)):_=A),C[I]=_}return new i(C,this.keys,this.overrides)}mergeContents(w,E){for(const C of Object.keys(E)){if(C in w&&v.isObject(w[C])&&v.isObject(E[C])){this.mergeContents(w[C],E[C]);continue}w[C]=f.deepClone(E[C])}}getContentsForOverrideIdentifer(w){let E=null,C=null;const I=_=>{_&&(C?this.mergeContents(C,_):C=f.deepClone(_))};for(const _ of this.overrides)_.identifiers.length===1&&_.identifiers[0]===w?E=_.contents:_.identifiers.includes(w)&&I(_.contents);return I(E),C}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(w,E){this.updateValue(w,E,!0)}setValue(w,E){this.updateValue(w,E,!1)}removeValue(w){const E=this.keys.indexOf(w);E!==-1&&(this.keys.splice(E,1),(0,S.removeFromValueTree)(this.contents,w),h.OVERRIDE_PROPERTY_REGEX.test(w)&&this.overrides.splice(this.overrides.findIndex(C=>t.equals(C.identifiers,(0,h.overrideIdentifiersFromKey)(w))),1))}updateValue(w,E,C){(0,S.addToValueTree)(this.contents,w,E,I=>console.error(I)),C=C||this.keys.indexOf(w)===-1,C&&this.keys.push(w),h.OVERRIDE_PROPERTY_REGEX.test(w)&&this.overrides.push({identifiers:(0,h.overrideIdentifiersFromKey)(w),keys:Object.keys(this.contents[w]),contents:(0,S.toValuesTree)(this.contents[w],I=>console.error(I))})}}e.ConfigurationModel=i;class s{constructor(w){this._name=w,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[],this._parseErrors=[]}get configurationModel(){return this._configurationModel||new i}get restrictedConfigurations(){return this._restrictedConfigurations}get errors(){return this._parseErrors}parse(w,E){if(!v.isUndefinedOrNull(w)){const C=this.doParseContent(w);this.parseRaw(C,E)}}reparse(w){this._raw&&this.parseRaw(this._raw,w)}parseRaw(w,E){this._raw=w;const{contents:C,keys:I,overrides:_,restricted:A,hasExcludedProperties:k}=this.doParseRaw(w,E);this._configurationModel=new i(C,I,_,k?[w]:void 0),this._restrictedConfigurations=A||[]}doParseContent(w){let E={},C=null,I=[];const _=[],A=[];function k(R){Array.isArray(I)?I.push(R):C!==null&&(I[C]=R)}const L={onObjectBegin:()=>{const R={};k(R),_.push(I),I=R,C=null},onObjectProperty:R=>{C=R},onObjectEnd:()=>{I=_.pop()},onArrayBegin:()=>{const R=[];k(R),_.push(I),I=R,C=null},onArrayEnd:()=>{I=_.pop()},onLiteralValue:k,onError:(R,M,N)=>{A.push({error:R,offset:M,length:N})}};if(w)try{b.visit(w,L),E=I[0]||{}}catch(R){console.error(`Error while parsing settings file ${this._name}: ${R}`),this._parseErrors=[R]}return E}doParseRaw(w,E){const C=a.Registry.as(h.Extensions.Configuration).getConfigurationProperties(),I=this.filter(w,C,!0,E);w=I.raw;const _=(0,S.toValuesTree)(w,L=>console.error(`Conflict in settings file ${this._name}: ${L}`)),A=Object.keys(w),k=this.toOverrides(w,L=>console.error(`Conflict in settings file ${this._name}: ${L}`));return{contents:_,keys:A,overrides:k,restricted:I.restricted,hasExcludedProperties:I.hasExcludedProperties}}filter(w,E,C,I){let _=!1;if(!I?.scopes&&!I?.skipRestricted&&!I?.exclude?.length)return{raw:w,restricted:[],hasExcludedProperties:_};const A={},k=[];for(const L in w)if(h.OVERRIDE_PROPERTY_REGEX.test(L)&&C){const R=this.filter(w[L],E,!1,I);A[L]=R.raw,_=_||R.hasExcludedProperties,k.push(...R.restricted)}else{const R=E[L],M=R?typeof R.scope<"u"?R.scope:3:void 0;R?.restricted&&k.push(L),!I.exclude?.includes(L)&&(I.include?.includes(L)||(M===void 0||I.scopes===void 0||I.scopes.includes(M))&&!(I.skipRestricted&&R?.restricted))?A[L]=w[L]:_=!0}return{raw:A,restricted:k,hasExcludedProperties:_}}toOverrides(w,E){const C=[];for(const I of Object.keys(w))if(h.OVERRIDE_PROPERTY_REGEX.test(I)){const _={};for(const A in w[I])_[A]=w[I][A];C.push({identifiers:(0,h.overrideIdentifiersFromKey)(I),keys:Object.keys(_),contents:(0,S.toValuesTree)(_,E)})}return C}}e.ConfigurationModelParser=s;class o extends D.Disposable{constructor(w,E,C,I){super(),this.userSettingsResource=w,this.parseOptions=E,this.fileService=I,this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this.parser=new s(this.userSettingsResource.toString()),this._register(this.fileService.watch(C.dirname(this.userSettingsResource))),this._register(this.fileService.watch(this.userSettingsResource)),this._register(y.Event.any(y.Event.filter(this.fileService.onDidFilesChange,_=>_.contains(this.userSettingsResource)),y.Event.filter(this.fileService.onDidRunOperation,_=>(_.isOperation(0)||_.isOperation(3)||_.isOperation(1)||_.isOperation(4))&&C.isEqual(_.resource,w)))(()=>this._onDidChange.fire()))}async loadConfiguration(){try{const w=await this.fileService.readFile(this.userSettingsResource);return this.parser.parse(w.value.toString()||"{}",this.parseOptions),this.parser.configurationModel}catch{return new i}}reparse(w){return w&&(this.parseOptions=w),this.parser.reparse(this.parseOptions),this.parser.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}}e.UserSettings=o;class u{constructor(w,E,C,I,_,A,k,L,R,M,N,P,x){this.key=w,this.overrides=E,this._value=C,this.overrideIdentifiers=I,this.defaultConfiguration=_,this.policyConfiguration=A,this.applicationConfiguration=k,this.userConfiguration=L,this.localUserConfiguration=R,this.remoteUserConfiguration=M,this.workspaceConfiguration=N,this.folderConfigurationModel=P,this.memoryConfigurationModel=x}get value(){return r(this._value)}inspect(w,E,C){const I=w.inspect(E,C);return{get value(){return r(I.value)},get override(){return r(I.override)},get merged(){return r(I.merged)}}}get defaultInspectValue(){return this._defaultInspectValue||(this._defaultInspectValue=this.inspect(this.defaultConfiguration,this.key,this.overrides.overrideIdentifier)),this._defaultInspectValue}get defaultValue(){return this.defaultInspectValue.merged}get default(){return this.defaultInspectValue.value!==void 0||this.defaultInspectValue.override!==void 0?{value:this.defaultInspectValue.value,override:this.defaultInspectValue.override}:void 0}get policyInspectValue(){return this._policyInspectValue===void 0&&(this._policyInspectValue=this.policyConfiguration?this.inspect(this.policyConfiguration,this.key):null),this._policyInspectValue}get policyValue(){return this.policyInspectValue?.merged}get policy(){return this.policyInspectValue?.value!==void 0?{value:this.policyInspectValue.value}:void 0}get applicationInspectValue(){return this._applicationInspectValue===void 0&&(this._applicationInspectValue=this.applicationConfiguration?this.inspect(this.applicationConfiguration,this.key):null),this._applicationInspectValue}get applicationValue(){return this.applicationInspectValue?.merged}get application(){return this.applicationInspectValue?.value!==void 0||this.applicationInspectValue?.override!==void 0?{value:this.applicationInspectValue.value,override:this.applicationInspectValue.override}:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get userValue(){return this.userInspectValue.merged}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}get userLocalInspectValue(){return this._userLocalInspectValue||(this._userLocalInspectValue=this.inspect(this.localUserConfiguration,this.key,this.overrides.overrideIdentifier)),this._userLocalInspectValue}get userLocalValue(){return this.userLocalInspectValue.merged}get userLocal(){return this.userLocalInspectValue.value!==void 0||this.userLocalInspectValue.override!==void 0?{value:this.userLocalInspectValue.value,override:this.userLocalInspectValue.override}:void 0}get userRemoteInspectValue(){return this._userRemoteInspectValue||(this._userRemoteInspectValue=this.inspect(this.remoteUserConfiguration,this.key,this.overrides.overrideIdentifier)),this._userRemoteInspectValue}get userRemoteValue(){return this.userRemoteInspectValue.merged}get userRemote(){return this.userRemoteInspectValue.value!==void 0||this.userRemoteInspectValue.override!==void 0?{value:this.userRemoteInspectValue.value,override:this.userRemoteInspectValue.override}:void 0}get workspaceInspectValue(){return this._workspaceInspectValue===void 0&&(this._workspaceInspectValue=this.workspaceConfiguration?this.inspect(this.workspaceConfiguration,this.key,this.overrides.overrideIdentifier):null),this._workspaceInspectValue}get workspaceValue(){return this.workspaceInspectValue?.merged}get workspace(){return this.workspaceInspectValue?.value!==void 0||this.workspaceInspectValue?.override!==void 0?{value:this.workspaceInspectValue.value,override:this.workspaceInspectValue.override}:void 0}get workspaceFolderInspectValue(){return this._workspaceFolderInspectValue===void 0&&(this._workspaceFolderInspectValue=this.folderConfigurationModel?this.inspect(this.folderConfigurationModel,this.key,this.overrides.overrideIdentifier):null),this._workspaceFolderInspectValue}get workspaceFolderValue(){return this.workspaceFolderInspectValue?.merged}get workspaceFolder(){return this.workspaceFolderInspectValue?.value!==void 0||this.workspaceFolderInspectValue?.override!==void 0?{value:this.workspaceFolderInspectValue.value,override:this.workspaceFolderInspectValue.override}:void 0}get memoryInspectValue(){return this._memoryInspectValue===void 0&&(this._memoryInspectValue=this.inspect(this.memoryConfigurationModel,this.key,this.overrides.overrideIdentifier)),this._memoryInspectValue}get memoryValue(){return this.memoryInspectValue.merged}get memory(){return this.memoryInspectValue.value!==void 0||this.memoryInspectValue.override!==void 0?{value:this.memoryInspectValue.value,override:this.memoryInspectValue.override}:void 0}}class d{constructor(w,E,C,I,_=new i,A=new i,k=new T.ResourceMap,L=new i,R=new T.ResourceMap){this._defaultConfiguration=w,this._policyConfiguration=E,this._applicationConfiguration=C,this._localUserConfiguration=I,this._remoteUserConfiguration=_,this._workspaceConfiguration=A,this._folderConfigurations=k,this._memoryConfiguration=L,this._memoryConfigurationByResource=R,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new T.ResourceMap,this._userConfiguration=null}getValue(w,E,C){return this.getConsolidatedConfigurationModel(w,E,C).getValue(w)}updateValue(w,E,C={}){let I;C.resource?(I=this._memoryConfigurationByResource.get(C.resource),I||(I=new i,this._memoryConfigurationByResource.set(C.resource,I))):I=this._memoryConfiguration,E===void 0?I.removeValue(w):I.setValue(w,E),C.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(w,E,C){const I=this.getConsolidatedConfigurationModel(w,E,C),_=this.getFolderConfigurationModelForResource(E.resource,C),A=E.resource?this._memoryConfigurationByResource.get(E.resource)||this._memoryConfiguration:this._memoryConfiguration,k=new Set;for(const L of I.overrides)for(const R of L.identifiers)I.getOverrideValue(w,R)!==void 0&&k.add(R);return new u(w,E,I.getValue(w),k.size?[...k]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,C?this._workspaceConfiguration:void 0,_||void 0,A)}keys(w){const E=this.getFolderConfigurationModelForResource(void 0,w);return{default:this._defaultConfiguration.keys.slice(0),user:this.userConfiguration.keys.slice(0),workspace:this._workspaceConfiguration.keys.slice(0),workspaceFolder:E?E.keys.slice(0):[]}}updateDefaultConfiguration(w){this._defaultConfiguration=w,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updatePolicyConfiguration(w){this._policyConfiguration=w}updateApplicationConfiguration(w){this._applicationConfiguration=w,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateLocalUserConfiguration(w){this._localUserConfiguration=w,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateRemoteUserConfiguration(w){this._remoteUserConfiguration=w,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateWorkspaceConfiguration(w){this._workspaceConfiguration=w,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateFolderConfiguration(w,E){this._folderConfigurations.set(w,E),this._foldersConsolidatedConfigurations.delete(w)}deleteFolderConfiguration(w){this.folderConfigurations.delete(w),this._foldersConsolidatedConfigurations.delete(w)}compareAndUpdateDefaultConfiguration(w,E){const C=[];if(!E){const{added:I,updated:_,removed:A}=l(this._defaultConfiguration,w);E=[...I,..._,...A]}for(const I of E)for(const _ of(0,h.overrideIdentifiersFromKey)(I)){const A=this._defaultConfiguration.getKeysForOverrideIdentifier(_),k=w.getKeysForOverrideIdentifier(_),L=[...k.filter(R=>A.indexOf(R)===-1),...A.filter(R=>k.indexOf(R)===-1),...A.filter(R=>!f.equals(this._defaultConfiguration.override(_).getValue(R),w.override(_).getValue(R)))];C.push([_,L])}return this.updateDefaultConfiguration(w),{keys:E,overrides:C}}compareAndUpdatePolicyConfiguration(w){const{added:E,updated:C,removed:I}=l(this._policyConfiguration,w),_=[...E,...C,...I];return _.length&&this.updatePolicyConfiguration(w),{keys:_,overrides:[]}}compareAndUpdateApplicationConfiguration(w){const{added:E,updated:C,removed:I,overrides:_}=l(this.applicationConfiguration,w),A=[...E,...C,...I];return A.length&&this.updateApplicationConfiguration(w),{keys:A,overrides:_}}compareAndUpdateLocalUserConfiguration(w){const{added:E,updated:C,removed:I,overrides:_}=l(this.localUserConfiguration,w),A=[...E,...C,...I];return A.length&&this.updateLocalUserConfiguration(w),{keys:A,overrides:_}}compareAndUpdateRemoteUserConfiguration(w){const{added:E,updated:C,removed:I,overrides:_}=l(this.remoteUserConfiguration,w),A=[...E,...C,...I];return A.length&&this.updateRemoteUserConfiguration(w),{keys:A,overrides:_}}compareAndUpdateWorkspaceConfiguration(w){const{added:E,updated:C,removed:I,overrides:_}=l(this.workspaceConfiguration,w),A=[...E,...C,...I];return A.length&&this.updateWorkspaceConfiguration(w),{keys:A,overrides:_}}compareAndUpdateFolderConfiguration(w,E){const C=this.folderConfigurations.get(w),{added:I,updated:_,removed:A,overrides:k}=l(C,E),L=[...I,..._,...A];return(L.length||!C)&&this.updateFolderConfiguration(w,E),{keys:L,overrides:k}}compareAndDeleteFolderConfiguration(w){const E=this.folderConfigurations.get(w);if(!E)throw new Error("Unknown folder");this.deleteFolderConfiguration(w);const{added:C,updated:I,removed:_,overrides:A}=l(E,void 0);return{keys:[...C,...I,..._],overrides:A}}get defaults(){return this._defaultConfiguration}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}get workspaceConfiguration(){return this._workspaceConfiguration}get folderConfigurations(){return this._folderConfigurations}getConsolidatedConfigurationModel(w,E,C){let I=this.getConsolidatedConfigurationModelForResource(E,C);return E.overrideIdentifier&&(I=I.override(E.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(w)!==void 0&&(I=I.merge(this._policyConfiguration)),I}getConsolidatedConfigurationModelForResource({resource:w},E){let C=this.getWorkspaceConsolidatedConfiguration();if(E&&w){const I=E.getFolder(w);I&&(C=this.getFolderConsolidatedConfiguration(I.uri)||C);const _=this._memoryConfigurationByResource.get(w);_&&(C=C.merge(_))}return C}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(w){let E=this._foldersConsolidatedConfigurations.get(w);if(!E){const C=this.getWorkspaceConsolidatedConfiguration(),I=this._folderConfigurations.get(w);I?(E=C.merge(I),this._foldersConsolidatedConfigurations.set(w,E)):E=C}return E}getFolderConfigurationModelForResource(w,E){if(E&&w){const C=E.getFolder(w);if(C)return this._folderConfigurations.get(C.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((w,E)=>{const{contents:C,overrides:I,keys:_}=this._folderConfigurations.get(E);return w.push([E,{contents:C,overrides:I,keys:_}]),w},[])}}allKeys(){const w=new Set;return this._defaultConfiguration.keys.forEach(E=>w.add(E)),this.userConfiguration.keys.forEach(E=>w.add(E)),this._workspaceConfiguration.keys.forEach(E=>w.add(E)),this._folderConfigurations.forEach(E=>E.keys.forEach(C=>w.add(C))),[...w.values()]}allOverrideIdentifiers(){const w=new Set;return this._defaultConfiguration.getAllOverrideIdentifiers().forEach(E=>w.add(E)),this.userConfiguration.getAllOverrideIdentifiers().forEach(E=>w.add(E)),this._workspaceConfiguration.getAllOverrideIdentifiers().forEach(E=>w.add(E)),this._folderConfigurations.forEach(E=>E.getAllOverrideIdentifiers().forEach(C=>w.add(C))),[...w.values()]}getAllKeysForOverrideIdentifier(w){const E=new Set;return this._defaultConfiguration.getKeysForOverrideIdentifier(w).forEach(C=>E.add(C)),this.userConfiguration.getKeysForOverrideIdentifier(w).forEach(C=>E.add(C)),this._workspaceConfiguration.getKeysForOverrideIdentifier(w).forEach(C=>E.add(C)),this._folderConfigurations.forEach(C=>C.getKeysForOverrideIdentifier(w).forEach(I=>E.add(I))),[...E.values()]}static parse(w){const E=this.parseConfigurationModel(w.defaults),C=this.parseConfigurationModel(w.policy),I=this.parseConfigurationModel(w.application),_=this.parseConfigurationModel(w.user),A=this.parseConfigurationModel(w.workspace),k=w.folders.reduce((L,R)=>(L.set(m.URI.revive(R[0]),this.parseConfigurationModel(R[1])),L),new T.ResourceMap);return new d(E,C,I,_,new i,A,k,new i,new T.ResourceMap)}static parseConfigurationModel(w){return new i(w.contents,w.keys,w.overrides)}}e.Configuration=d;function p(...g){if(g.length===0)return{keys:[],overrides:[]};if(g.length===1)return g[0];const w=new Set,E=new Map;for(const I of g)I.keys.forEach(_=>w.add(_)),I.overrides.forEach(([_,A])=>{const k=(0,T.getOrSet)(E,_,new Set);A.forEach(L=>k.add(L))});const C=[];return E.forEach((I,_)=>C.push([_,[...I.values()]])),{keys:[...w.values()],overrides:C}}e.mergeChanges=p;class c{constructor(w,E,C,I){this.change=w,this.previous=E,this.currentConfiguraiton=C,this.currentWorkspace=I,this._marker=` `,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const _ of w.keys)this.affectedKeys.add(_);for(const[,_]of w.overrides)for(const A of _)this.affectedKeys.add(A);this._affectsConfigStr=this._marker;for(const _ of this.affectedKeys)this._affectsConfigStr+=_+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=d.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(w,E){const C=this._marker+w,I=this._affectsConfigStr.indexOf(C);if(I<0)return!1;const _=I+C.length;if(_>=this._affectsConfigStr.length)return!1;const A=this._affectsConfigStr.charCodeAt(_);if(A!==this._markerCode1&&A!==this._markerCode2)return!1;if(E){const k=this.previousConfiguration?this.previousConfiguration.getValue(w,E,this.previous?.workspace):void 0,L=this.currentConfiguraiton.getValue(w,E,this.currentWorkspace);return!f.equals(k,L)}return!0}}e.ConfigurationChangeEvent=c;function l(g,w){const{added:E,removed:C,updated:I}=n(w?.rawConfiguration,g?.rawConfiguration),_=[],A=g?.getAllOverrideIdentifiers()||[],k=w?.getAllOverrideIdentifiers()||[];if(w){const L=k.filter(R=>!A.includes(R));for(const R of L)_.push([R,w.getKeysForOverrideIdentifier(R)])}if(g){const L=A.filter(R=>!k.includes(R));for(const R of L)_.push([R,g.getKeysForOverrideIdentifier(R)])}if(w&&g){for(const L of A)if(k.includes(L)){const R=n({contents:g.getOverrideValue(void 0,L)||{},keys:g.getKeysForOverrideIdentifier(L)},{contents:w.getOverrideValue(void 0,L)||{},keys:w.getKeysForOverrideIdentifier(L)});_.push([L,[...R.added,...R.removed,...R.updated]])}}return{added:E,removed:C,updated:I,overrides:_}}function n(g,w){const E=g?w?g.keys.filter(_=>w.keys.indexOf(_)===-1):[...g.keys]:[],C=w?g?w.keys.filter(_=>g.keys.indexOf(_)===-1):[...w.keys]:[],I=[];if(g&&w){for(const _ of w.keys)if(g.keys.indexOf(_)!==-1){const A=(0,S.getConfigurationValue)(w.contents,_),k=(0,S.getConfigurationValue)(g.contents,_);f.equals(A,k)||I.push(_)}}return{added:E,removed:C,updated:I}}}),define(Q[1179],Y([1,0,20,6,4,42,17,699,56,11,694,16]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolicyConfiguration=e.NullPolicyConfiguration=e.DefaultConfiguration=void 0;class a extends b.Disposable{constructor(){super(...arguments),this._onDidChangeConfiguration=this._register(new y.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configurationModel=new f.ConfigurationModel}get configurationModel(){return this._configurationModel}async initialize(){return this.resetConfigurationModel(),this._register(h.Registry.as(v.Extensions.Configuration).onDidUpdateConfiguration(({properties:o,defaultsOverrides:u})=>this.onDidUpdateConfiguration(Array.from(o),u))),this.configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}onDidUpdateConfiguration(o,u){this.updateConfigurationModel(o,h.Registry.as(v.Extensions.Configuration).getConfigurationProperties()),this._onDidChangeConfiguration.fire({defaults:this.configurationModel,properties:o})}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new f.ConfigurationModel;const o=h.Registry.as(v.Extensions.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(o),o)}updateConfigurationModel(o,u){const d=this.getConfigurationDefaultOverrides();for(const p of o){const c=d[p],l=u[p];c!==void 0?this._configurationModel.addValue(p,c):l?this._configurationModel.addValue(p,l.default):this._configurationModel.removeValue(p)}}}e.DefaultConfiguration=a;class r{constructor(){this.onDidChangeConfiguration=y.Event.None,this.configurationModel=new f.ConfigurationModel}async initialize(){return this.configurationModel}}e.NullPolicyConfiguration=r;let i=class extends b.Disposable{get configurationModel(){return this._configurationModel}constructor(o,u,d){super(),this.defaultConfiguration=o,this.policyService=u,this.logService=d,this._onDidChangeConfiguration=this._register(new y.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configurationModel=new f.ConfigurationModel}async initialize(){return this.logService.trace("PolicyConfiguration#initialize"),this.update(await this.updatePolicyDefinitions(this.defaultConfiguration.configurationModel.keys),!1),this._register(this.policyService.onDidChange(o=>this.onDidChangePolicies(o))),this._register(this.defaultConfiguration.onDidChangeConfiguration(async({properties:o})=>this.update(await this.updatePolicyDefinitions(o),!0))),this._configurationModel}async updatePolicyDefinitions(o){this.logService.trace("PolicyConfiguration#updatePolicyDefinitions",o);const u={},d=[],p=h.Registry.as(v.Extensions.Configuration).getConfigurationProperties();for(const c of o){const l=p[c];if(!l){d.push(c);continue}if(l.policy){if(l.type!=="string"&&l.type!=="number"){this.logService.warn(`Policy ${l.policy.name} has unsupported type ${l.type}`);continue}d.push(c),u[l.policy.name]={type:l.type}}}return(0,T.isEmptyObject)(u)||await this.policyService.updatePolicyDefinitions(u),d}onDidChangePolicies(o){this.logService.trace("PolicyConfiguration#onDidChangePolicies",o);const u=h.Registry.as(v.Extensions.Configuration).getPolicyConfigurations(),d=(0,t.coalesce)(o.map(p=>u.get(p)));this.update(d,!0)}update(o,u){this.logService.trace("PolicyConfiguration#update",o);const d=h.Registry.as(v.Extensions.Configuration).getConfigurationProperties(),p=[],c=this._configurationModel.isEmpty();for(const l of o){const n=d[l]?.policy?.name;if(n){const g=this.policyService.getPolicyValue(n);(c?g!==void 0:!(0,D.equals)(this._configurationModel.getValue(l),g))&&p.push([l,g])}else this._configurationModel.getValue(l)!==void 0&&p.push([l,void 0])}if(p.length){this.logService.trace("PolicyConfiguration#changed",p);const l=this._configurationModel;this._configurationModel=new f.ConfigurationModel;for(const n of l.keys)this._configurationModel.setValue(n,l.getValue(n));for(const[n,g]of p)g===void 0?this._configurationModel.removeValue(n):this._configurationModel.setValue(n,g);u&&this._onDidChangeConfiguration.fire(this._configurationModel)}}};e.PolicyConfiguration=i,e.PolicyConfiguration=i=fe([O(1,S.IPolicyService),O(2,m.ILogService)],i)}),define(Q[113],Y([1,0,321,18,28,16,4,204]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.KeybindingsRegistry=e.KeybindingWeight=void 0;var v;(function(h){h[h.EditorCore=0]="EditorCore",h[h.EditorContrib=100]="EditorContrib",h[h.WorkbenchContrib=200]="WorkbenchContrib",h[h.BuiltinExtension=300]="BuiltinExtension",h[h.ExternalExtension=400]="ExternalExtension"})(v||(e.KeybindingWeight=v={}));class m{constructor(){this._coreKeybindings=new f.LinkedList,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(a){if(y.OS===1){if(a&&a.win)return a.win}else if(y.OS===2){if(a&&a.mac)return a.mac}else if(a&&a.linux)return a.linux;return a}registerKeybindingRule(a){const r=m.bindToCurrentPlatform(a),i=new T.DisposableStore;if(r&&r.primary){const s=(0,t.decodeKeybinding)(r.primary,y.OS);s&&i.add(this._registerDefaultKeybinding(s,a.id,a.args,a.weight,0,a.when))}if(r&&Array.isArray(r.secondary))for(let s=0,o=r.secondary.length;s<o;s++){const u=r.secondary[s],d=(0,t.decodeKeybinding)(u,y.OS);d&&i.add(this._registerDefaultKeybinding(d,a.id,a.args,a.weight,-s-1,a.when))}return i}setExtensionKeybindings(a){const r=[];let i=0;for(const s of a)s.keybinding&&(r[i++]={keybinding:s.keybinding,command:s.id,commandArgs:s.args,when:s.when,weight1:s.weight,weight2:0,extensionId:s.extensionId||null,isBuiltinExtension:s.isBuiltinExtension||!1});this._extensionKeybindings=r,this._cachedMergedKeybindings=null}registerCommandAndKeybindingRule(a){return(0,T.combinedDisposable)(this.registerKeybindingRule(a),b.CommandsRegistry.registerCommand(a))}_registerDefaultKeybinding(a,r,i,s,o,u){const d=this._coreKeybindings.push({keybinding:a,command:r,commandArgs:i,when:u,weight1:s,weight2:o,extensionId:null,isBuiltinExtension:!1});return this._cachedMergedKeybindings=null,(0,T.toDisposable)(()=>{d(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(S)),this._cachedMergedKeybindings.slice(0)}}e.KeybindingsRegistry=new m,e.Extensions={EditorModes:"platform.keybindingsRegistry"},D.Registry.add(e.Extensions.EditorModes,e.KeybindingsRegistry);function S(h,a){if(h.weight1!==a.weight1)return h.weight1-a.weight1;if(h.command&&a.command){if(h.command<a.command)return-1;if(h.command>a.command)return 1}return h.weight2-a.weight2}}),define(Q[3255],Y([1,0,858,113,403,8,1035,170]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SORT_COLUMN_COMMAND_ID=e.SHOW_COLUMN_MENU_COMMAND_ID=e.RESIZE_COLUMN_COMMAND_ID=void 0,e.RESIZE_COLUMN_COMMAND_ID="grid.resizeColumn",e.SHOW_COLUMN_MENU_COMMAND_ID="grid.showColumnMenu",e.SORT_COLUMN_COMMAND_ID="grid.sortColumn",y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.RESIZE_COLUMN_COMMAND_ID,weight:200,when:t.InTableContextKey,primary:1585,handler:async m=>{await v(m,async S=>{await S.resizeActiveColumn()})}}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.SHOW_COLUMN_MENU_COMMAND_ID,weight:200,when:D.ContextKeyExpr.and(t.InTableContextKey,t.TableFilteringEnabledContextKey),primary:61,handler:async m=>{await v(m,async S=>{let h=S.grid.getPlugins().find(a=>a instanceof b.HeaderFilter);h&&await h.showMenu()})}}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.SORT_COLUMN_COMMAND_ID,weight:200,when:t.InTableContextKey,primary:1581,handler:async m=>{await v(m,async S=>{const h=S.grid.getActiveCell();if(h&&h.cell>=0){const a=S.grid.getColumns()[h.cell];if(a.sortable)S.grid.sortColumnByActiveCell();else if(S.getData()instanceof T.HybridDataProvider){let r=S.grid.getSortColumns().find(s=>s.columnId===a.id);r?r.sortAsc=!r.sortAsc:r={columnId:a.id,sortAsc:!0},S.grid.setSortColumn(r.columnId,r.sortAsc),await S.getData().sort({grid:S.grid,multiColumnSort:!1,sortCol:a,sortAsc:r.sortAsc}),S.rerenderGrid(),S.setActiveCell(h.row,h.cell)}}})}});async function v(m,S){const a=m.get(f.IComponentContextService).getActiveTable();a&&await S(a)}}),define(Q[13],Y([1,0,34,37,6,4,204,28,8,5,113]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.ExecuteCommandAction=e.registerAction2=e.Action2=e.MenuItemAction=e.SubmenuItemAction=e.MenuRegistry=e.IMenuService=e.MenuId=e.isISubmenuItem=e.isIMenuItem=void 0;function a(l){return l.command!==void 0}e.isIMenuItem=a;function r(l){return l.submenu!==void 0}e.isISubmenuItem=r;class i{static{this._instances=new Map}static{this.CommandPalette=new i("CommandPalette")}static{this.DebugBreakpointsContext=new i("DebugBreakpointsContext")}static{this.DebugCallStackContext=new i("DebugCallStackContext")}static{this.DebugConsoleContext=new i("DebugConsoleContext")}static{this.DebugVariablesContext=new i("DebugVariablesContext")}static{this.DebugWatchContext=new i("DebugWatchContext")}static{this.DebugToolBar=new i("DebugToolBar")}static{this.DebugToolBarStop=new i("DebugToolBarStop")}static{this.EditorContext=new i("EditorContext")}static{this.SimpleEditorContext=new i("SimpleEditorContext")}static{this.EditorContent=new i("EditorContent")}static{this.EditorLineNumberContext=new i("EditorLineNumberContext")}static{this.EditorContextCopy=new i("EditorContextCopy")}static{this.EditorContextPeek=new i("EditorContextPeek")}static{this.EditorContextShare=new i("EditorContextShare")}static{this.EditorTitle=new i("EditorTitle")}static{this.EditorTitleRun=new i("EditorTitleRun")}static{this.EditorTitleContext=new i("EditorTitleContext")}static{this.EditorTitleContextShare=new i("EditorTitleContextShare")}static{this.EmptyEditorGroup=new i("EmptyEditorGroup")}static{this.EmptyEditorGroupContext=new i("EmptyEditorGroupContext")}static{this.EditorTabsBarContext=new i("EditorTabsBarContext")}static{this.ExplorerContext=new i("ExplorerContext")}static{this.ExplorerContextShare=new i("ExplorerContextShare")}static{this.ExtensionContext=new i("ExtensionContext")}static{this.GlobalActivity=new i("GlobalActivity")}static{this.CommandCenter=new i("CommandCenter")}static{this.LayoutControlMenuSubmenu=new i("LayoutControlMenuSubmenu")}static{this.LayoutControlMenu=new i("LayoutControlMenu")}static{this.MenubarMainMenu=new i("MenubarMainMenu")}static{this.MenubarAppearanceMenu=new i("MenubarAppearanceMenu")}static{this.MenubarDebugMenu=new i("MenubarDebugMenu")}static{this.MenubarEditMenu=new i("MenubarEditMenu")}static{this.MenubarCopy=new i("MenubarCopy")}static{this.MenubarFileMenu=new i("MenubarFileMenu")}static{this.MenubarGoMenu=new i("MenubarGoMenu")}static{this.MenubarHelpMenu=new i("MenubarHelpMenu")}static{this.MenubarLayoutMenu=new i("MenubarLayoutMenu")}static{this.MenubarNewBreakpointMenu=new i("MenubarNewBreakpointMenu")}static{this.PanelAlignmentMenu=new i("PanelAlignmentMenu")}static{this.PanelPositionMenu=new i("PanelPositionMenu")}static{this.MenubarPreferencesMenu=new i("MenubarPreferencesMenu")}static{this.MenubarRecentMenu=new i("MenubarRecentMenu")}static{this.MenubarSelectionMenu=new i("MenubarSelectionMenu")}static{this.MenubarShare=new i("MenubarShare")}static{this.MenubarSwitchEditorMenu=new i("MenubarSwitchEditorMenu")}static{this.MenubarSwitchGroupMenu=new i("MenubarSwitchGroupMenu")}static{this.MenubarTerminalMenu=new i("MenubarTerminalMenu")}static{this.MenubarViewMenu=new i("MenubarViewMenu")}static{this.MenubarHomeMenu=new i("MenubarHomeMenu")}static{this.OpenEditorsContext=new i("OpenEditorsContext")}static{this.OpenEditorsContextShare=new i("OpenEditorsContextShare")}static{this.ProblemsPanelContext=new i("ProblemsPanelContext")}static{this.SCMChangeContext=new i("SCMChangeContext")}static{this.SCMResourceContext=new i("SCMResourceContext")}static{this.SCMResourceContextShare=new i("SCMResourceContextShare")}static{this.SCMResourceFolderContext=new i("SCMResourceFolderContext")}static{this.SCMResourceGroupContext=new i("SCMResourceGroupContext")}static{this.SCMSourceControl=new i("SCMSourceControl")}static{this.SCMTitle=new i("SCMTitle")}static{this.SearchContext=new i("SearchContext")}static{this.SearchActionMenu=new i("SearchActionContext")}static{this.StatusBarWindowIndicatorMenu=new i("StatusBarWindowIndicatorMenu")}static{this.StatusBarRemoteIndicatorMenu=new i("StatusBarRemoteIndicatorMenu")}static{this.StickyScrollContext=new i("StickyScrollContext")}static{this.TestItem=new i("TestItem")}static{this.TestItemGutter=new i("TestItemGutter")}static{this.TestMessageContext=new i("TestMessageContext")}static{this.TestMessageContent=new i("TestMessageContent")}static{this.TestPeekElement=new i("TestPeekElement")}static{this.TestPeekTitle=new i("TestPeekTitle")}static{this.TouchBarContext=new i("TouchBarContext")}static{this.TitleBarContext=new i("TitleBarContext")}static{this.TitleBarTitleContext=new i("TitleBarTitleContext")}static{this.TunnelContext=new i("TunnelContext")}static{this.TunnelPrivacy=new i("TunnelPrivacy")}static{this.TunnelProtocol=new i("TunnelProtocol")}static{this.TunnelPortInline=new i("TunnelInline")}static{this.TunnelTitle=new i("TunnelTitle")}static{this.TunnelLocalAddressInline=new i("TunnelLocalAddressInline")}static{this.TunnelOriginInline=new i("TunnelOriginInline")}static{this.ViewItemContext=new i("ViewItemContext")}static{this.ViewContainerTitle=new i("ViewContainerTitle")}static{this.ViewContainerTitleContext=new i("ViewContainerTitleContext")}static{this.ViewTitle=new i("ViewTitle")}static{this.ViewTitleContext=new i("ViewTitleContext")}static{this.CommentEditorActions=new i("CommentEditorActions")}static{this.CommentThreadTitle=new i("CommentThreadTitle")}static{this.CommentThreadActions=new i("CommentThreadActions")}static{this.CommentThreadAdditionalActions=new i("CommentThreadAdditionalActions")}static{this.CommentThreadTitleContext=new i("CommentThreadTitleContext")}static{this.CommentThreadCommentContext=new i("CommentThreadCommentContext")}static{this.CommentTitle=new i("CommentTitle")}static{this.CommentActions=new i("CommentActions")}static{this.InteractiveToolbar=new i("InteractiveToolbar")}static{this.InteractiveCellTitle=new i("InteractiveCellTitle")}static{this.InteractiveCellDelete=new i("InteractiveCellDelete")}static{this.InteractiveCellExecute=new i("InteractiveCellExecute")}static{this.InteractiveInputExecute=new i("InteractiveInputExecute")}static{this.NotebookStickyScrollContext=new i("NotebookStickyScrollContext")}static{this.NotebookCellTitle=new i("NotebookCellTitle")}static{this.NotebookCellDelete=new i("NotebookCellDelete")}static{this.NotebookCellInsert=new i("NotebookCellInsert")}static{this.NotebookCellBetween=new i("NotebookCellBetween")}static{this.NotebookCellListTop=new i("NotebookCellTop")}static{this.NotebookCellExecute=new i("NotebookCellExecute")}static{this.NotebookCellExecutePrimary=new i("NotebookCellExecutePrimary")}static{this.NotebookDiffCellInputTitle=new i("NotebookDiffCellInputTitle")}static{this.NotebookDiffCellMetadataTitle=new i("NotebookDiffCellMetadataTitle")}static{this.NotebookDiffCellOutputsTitle=new i("NotebookDiffCellOutputsTitle")}static{this.NotebookOutputToolbar=new i("NotebookOutputToolbar")}static{this.NotebookEditorLayoutConfigure=new i("NotebookEditorLayoutConfigure")}static{this.NotebookKernelSource=new i("NotebookKernelSource")}static{this.BulkEditTitle=new i("BulkEditTitle")}static{this.BulkEditContext=new i("BulkEditContext")}static{this.ObjectExplorerItemContext=new i("ObjectExplorerItemContext")}static{this.NotebookToolbar=new i("NotebookToolbar")}static{this.DataExplorerContext=new i("DataExplorerContext")}static{this.DataExplorerAction=new i("DataExplorerAction")}static{this.ExplorerWidgetContext=new i("ExplorerWidgetContext")}static{this.DashboardToolbar=new i("DashboardToolbar")}static{this.NotebookTitle=new i("NotebookTitle")}static{this.ConnectionDialogBrowseTreeContext=new i("ConnectionDialogBrowseTreeContext")}static{this.DataGridItemContext=new i("DataGridItemContext")}static{this.TimelineItemContext=new i("TimelineItemContext")}static{this.TimelineTitle=new i("TimelineTitle")}static{this.TimelineTitleContext=new i("TimelineTitleContext")}static{this.TimelineFilterSubMenu=new i("TimelineFilterSubMenu")}static{this.AccountsContext=new i("AccountsContext")}static{this.PanelTitle=new i("PanelTitle")}static{this.AuxiliaryBarTitle=new i("AuxiliaryBarTitle")}static{this.TerminalInstanceContext=new i("TerminalInstanceContext")}static{this.TerminalEditorInstanceContext=new i("TerminalEditorInstanceContext")}static{this.TerminalNewDropdownContext=new i("TerminalNewDropdownContext")}static{this.TerminalTabContext=new i("TerminalTabContext")}static{this.TerminalTabEmptyAreaContext=new i("TerminalTabEmptyAreaContext")}static{this.WebviewContext=new i("WebviewContext")}static{this.InlineCompletionsActions=new i("InlineCompletionsActions")}static{this.NewFile=new i("NewFile")}static{this.MergeInput1Toolbar=new i("MergeToolbar1Toolbar")}static{this.MergeInput2Toolbar=new i("MergeToolbar2Toolbar")}static{this.MergeBaseToolbar=new i("MergeBaseToolbar")}static{this.MergeInputResultToolbar=new i("MergeToolbarResultToolbar")}static{this.InlineSuggestionToolbar=new i("InlineSuggestionToolbar")}static{this.ChatContext=new i("ChatContext")}static{this.ChatCodeBlock=new i("ChatCodeblock")}static{this.ChatMessageTitle=new i("ChatMessageTitle")}static{this.ChatExecute=new i("ChatExecute")}static{this.ChatInputSide=new i("ChatInputSide")}static{this.AccessibleView=new i("AccessibleView")}static for(n){return i._instances.get(n)??new i(n)}constructor(n){if(i._instances.has(n))throw new TypeError(`MenuId with identifier '${n}' already exists. Use MenuId.for(ident) or a unique identifier`);i._instances.set(n,this),this.id=n}}e.MenuId=i,e.IMenuService=(0,m.createDecorator)("menuService");class s{static{this._all=new Map}static for(n){let g=this._all.get(n);return g||(g=new s(n),this._all.set(n,g)),g}static merge(n){const g=new Set;for(const w of n)w instanceof s&&g.add(w.id);return g}constructor(n){this.id=n,this.has=g=>g===n}}e.MenuRegistry=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new b.MicrotaskEmitter({merge:s.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(l){return this._commands.set(l.id,l),this._onDidChangeMenu.fire(s.for(i.CommandPalette)),(0,D.toDisposable)(()=>{this._commands.delete(l.id)&&this._onDidChangeMenu.fire(s.for(i.CommandPalette))})}getCommand(l){return this._commands.get(l)}getCommands(){const l=new Map;return this._commands.forEach((n,g)=>l.set(g,n)),l}appendMenuItem(l,n){let g=this._menuItems.get(l);g||(g=new T.LinkedList,this._menuItems.set(l,g));const w=g.push(n);return this._onDidChangeMenu.fire(s.for(l)),(0,D.toDisposable)(()=>{w(),this._onDidChangeMenu.fire(s.for(l))})}appendMenuItems(l){const n=new D.DisposableStore;for(const{id:g,item:w}of l)n.add(this.appendMenuItem(g,w));return n}getMenuItems(l){let n;return this._menuItems.has(l)?n=[...this._menuItems.get(l)]:n=[],l===i.CommandPalette&&this._appendImplicitItems(n),n}_appendImplicitItems(l){const n=new Set;for(const g of l)a(g)&&(n.add(g.command.id),g.alt&&n.add(g.alt.id));this._commands.forEach((g,w)=>{n.has(w)||l.push({command:g})})}};class o extends t.SubmenuAction{constructor(n,g,w){super(`submenuitem.${n.submenu.id}`,typeof n.title=="string"?n.title:n.title.value,w,"submenu"),this.item=n,this.hideActions=g}}e.SubmenuItemAction=o;let u=h=class{static label(n,g){return g?.renderShortTitle&&n.shortTitle?typeof n.shortTitle=="string"?n.shortTitle:n.shortTitle.value:typeof n.title=="string"?n.title:n.title.value}constructor(n,g,w,E,C,I){this.hideActions=E,this._commandService=I,this.isDefault=!1,this.expanded=!1,this.id=n.id,this.label=h.label(n,w),this.tooltip=(typeof n.tooltip=="string"?n.tooltip:n.tooltip?.value)??"",this.enabled=!n.precondition||C.contextMatchesRules(n.precondition),this.checked=void 0;let _;if(n.toggled){const A=n.toggled.condition?n.toggled:{condition:n.toggled};this.checked=C.contextMatchesRules(A.condition),this.checked&&A.tooltip&&(this.tooltip=typeof A.tooltip=="string"?A.tooltip:A.tooltip.value),this.checked&&y.ThemeIcon.isThemeIcon(A.icon)&&(_=A.icon),this.checked&&A.title&&(this.label=typeof A.title=="string"?A.title:A.title.value)}_||(_=y.ThemeIcon.isThemeIcon(n.icon)?n.icon:void 0),this.item=n,this.alt=g?new h(g,void 0,w,E,C,I):void 0,this._options=w,this.class=_&&y.ThemeIcon.asClassName(_)}run(...n){let g=[];return this._options?.arg&&(g=[...g,this._options.arg]),this._options?.shouldForwardArgs&&(g=[...g,...n]),this._commandService.executeCommand(this.id,...g)}};e.MenuItemAction=u,e.MenuItemAction=u=h=fe([O(4,v.IContextKeyService),O(5,f.ICommandService)],u);class d{constructor(n){this.desc=n}}e.Action2=d;function p(l){const n=new D.DisposableStore,g=new l,{f1:w,menu:E,keybinding:C,description:I,..._}=g.desc;if(n.add(f.CommandsRegistry.registerCommand({id:_.id,handler:(A,...k)=>g.run(A,...k),description:I})),Array.isArray(E))for(const A of E)n.add(e.MenuRegistry.appendMenuItem(A.id,{command:{..._,precondition:A.precondition===null?void 0:_.precondition},...A}));else E&&n.add(e.MenuRegistry.appendMenuItem(E.id,{command:{..._,precondition:E.precondition===null?void 0:_.precondition},...E}));if(w&&(n.add(e.MenuRegistry.appendMenuItem(i.CommandPalette,{command:_,when:_.precondition})),n.add(e.MenuRegistry.addCommand(_))),Array.isArray(C))for(const A of C)n.add(S.KeybindingsRegistry.registerKeybindingRule({...A,id:_.id,when:_.precondition?v.ContextKeyExpr.and(_.precondition,A.when):A.when}));else C&&n.add(S.KeybindingsRegistry.registerKeybindingRule({...C,id:_.id,when:_.precondition?v.ContextKeyExpr.and(_.precondition,C.when):C.when}));return n}e.registerAction2=p;let c=class extends t.Action{constructor(n,g,w){super(n,g),this._commandService=w}run(...n){return this._commandService.executeCommand(this.id,...n)}};e.ExecuteCommandAction=c,e.ExecuteCommandAction=c=fe([O(2,f.ICommandService)],c)}),define(Q[3256],Y([1,0,2167,286,10,41,13]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowGettingStartedAction=void 0;class f extends T.Action2{static{this.ID="update.showGettingStarted"}static{this.LABEL_ORG="Show Getting Started"}static{this.LABEL=t.localize(0,null)}constructor(){super({id:f.ID,title:{value:f.LABEL,original:f.LABEL_ORG}})}run(m){const S=m.get(D.IOpenerService),h=b.URI.parse(y.default.gettingStartedUrl);return S.open(h)}}e.ShowGettingStartedAction=f,T.MenuRegistry.appendMenuItem(T.MenuId.MenubarHelpMenu,{group:"1_welcome",command:{id:f.ID,title:t.localize(1,null)},order:1})}),define(Q[372],Y([1,0,13,17,6,10,28,7,320,37]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Task=e.TaskRegistry=void 0;const S=new v.IdGenerator("task-icon-");e.TaskRegistry=new class{constructor(){this._tasks=new Array,this._onTaskRegistered=new b.Emitter,this.onTaskRegistered=this._onTaskRegistered.event,this.taskIdToIconClassNameMap=new Map}registerTask(a,r){let i,s;return y.isString(a)?(i=T.CommandsRegistry.registerCommand(a,r),s=a):(a.iconClass&&this.taskIdToIconClassNameMap.set(a.id,a.iconClass),i=T.CommandsRegistry.registerCommand(a),s=a.id),this._tasks.push(s),this._onTaskRegistered.fire(s),{dispose:()=>{let o=this._tasks.indexOf(s);o>=0&&(this._tasks=this._tasks.splice(o,1)),i.dispose()}}}getOrCreateTaskIconClassName(a){let r,i=a.icon;return this.taskIdToIconClassNameMap.has(a.id)?r=this.taskIdToIconClassNameMap.get(a.id):m.ThemeIcon.isThemeIcon(a.icon)||i?.dark&&(r=S.nextId(),(0,f.createCSSRule)(`.codicon.${r}, .hc-light .codicon.${r}`,`background-image: ${(0,f.asCSSUrl)(i.light||i.dark)}`),(0,f.createCSSRule)(`.vs-dark .codicon.${r}, .hc-black .codicon.${r}`,`background-image: ${(0,f.asCSSUrl)(i.dark)}`),this.taskIdToIconClassNameMap.set(a.id,r)),r}getTasks(){return this._tasks.slice(0)}};class h{constructor(r){this.id=r.id,this.title=r.title,r.iconPath&&(this.iconPath={dark:D.URI.parse(r.iconPath.dark),light:r.iconPath.light?D.URI.parse(r.iconPath.light):void 0}),this._iconClass=r.iconClass,this._description=r.description}toITask(){return{id:this.id,handler:(r,i,s)=>this.runTask(r,i,s),description:this._description,iconClass:this._iconClass}}toCommandAction(){return{icon:this.iconPath,id:this.id,title:this.title}}registerTask(){return t.MenuRegistry.addCommand(this.toCommandAction()),e.TaskRegistry.registerTask(this.toITask())}}e.Task=h}),define(Q[879],Y([1,0,58,326,856,372,34,1951,41,10,262,11]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClearSavedAccountsAction=e.ConfigureDashboardAction=e.InsightAction=e.ManageAction=void 0;let a=class extends T.Action{static{this.ID="manage"}static{this.LABEL=f.localize(0,null)}constructor(u,d,p,c){super(u,d),this._connectionManagementService=p,this._angularEventingService=c}async run(u){u.profile&&(await this._connectionManagementService.connect(u.profile,u.uri,{showDashboard:!0,saveTheConnection:!1,showConnectionDialogOnError:!1,showFirewallRuleOnError:!0}),this._angularEventingService.sendAngularEvent(u.uri,y.AngularEventType.NAV_DATABASE))}};e.ManageAction=a,e.ManageAction=a=fe([O(2,t.IConnectionManagementService),O(3,y.IAngularEventingService)],a);let r=class extends T.Action{static{this.ID="showInsight"}static{this.LABEL=f.localize(1,null)}constructor(u,d,p){super(u,d),this._insightsDialogService=p}async run(u){u.profile&&await this._insightsDialogService.show(u.insight,u.profile)}};e.InsightAction=r,e.InsightAction=r=fe([O(2,b.IInsightsDialogService)],r);class i extends D.Task{static{this.ID="configureDashboard"}static{this.LABEL=f.localize(2,null)}static{this.ICON="info"}static{this.configHelpUri="https://aka.ms/sqldashboardconfig"}constructor(){super({id:i.ID,title:i.LABEL,iconPath:void 0,iconClass:i.ICON})}async runTask(u){u.get(v.IOpenerService).open(m.URI.parse(i.configHelpUri))}}e.ConfigureDashboardAction=i;class s extends D.Task{static{this.ID="clearSavedAccounts"}static{this.LABEL=f.localize(3,null)}constructor(){super({id:s.ID,title:s.LABEL,iconPath:void 0})}async runTask(u){const d=u.get(h.ILogService);try{await u.get(S.IAccountManagementService).removeAccounts()}catch(p){d.error(p)}}}e.ClearSavedAccountsAction=s}),define(Q[3257],Y([1,0,879,1952,16,56]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),new t.ConfigureDashboardAction().registerTask(),new t.ClearSavedAccountsAction().registerTask(),b.Registry.as(D.Extensions.Configuration).registerConfiguration({id:"previewFeatures",title:y.localize(0,null),type:"object",properties:{"workbench.enablePreviewFeatures":{type:"boolean",default:void 0,description:y.localize(1,null)}}}),b.Registry.as(D.Extensions.Configuration).registerConfiguration({id:"showConnectDialogOnStartup",title:y.localize(2,null),type:"object",properties:{"workbench.showConnectDialogOnStartup":{type:"boolean",default:!1,description:y.localize(3,null)}}}),b.Registry.as(D.Extensions.Configuration).registerConfiguration({id:"enableObsoleteApiUsageNotification",title:y.localize(4,null),type:"object",properties:{"workbench.enableObsoleteApiUsageNotification":{type:"boolean",default:!0,description:y.localize(5,null)}}}),b.Registry.as(D.Extensions.Configuration).registerConfiguration({id:"useVSCodeNotebooks",title:y.localize(6,null),type:"object",properties:{"workbench.useVSCodeNotebooks":{type:"boolean",default:!1,description:y.localize(7,null)}}})}),define(Q[3258],Y([1,0,879,58,326]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerManageAction=void 0;let D=class extends t.ManageAction{static{this.ID="explorerwidget.manage"}constructor(f,v,m,S){super(f,v,m,S)}async run(f){await super.run(f)}};e.ExplorerManageAction=D,e.ExplorerManageAction=D=fe([O(2,y.IConnectionManagementService),O(3,b.IAngularEventingService)],D)}),define(Q[3259],Y([1,0,696,13,3258,28,5,451]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const v={type:"object"};(0,t.registerDashboardWidget)("explorer-widget","",v),D.CommandsRegistry.registerCommand(b.ExplorerManageAction.ID,(m,S)=>{m.get(T.IInstantiationService).createInstance(b.ExplorerManageAction,b.ExplorerManageAction.ID,b.ExplorerManageAction.LABEL).run(S)}),y.MenuRegistry.appendMenuItem(y.MenuId.ExplorerWidgetContext,{command:{id:b.ExplorerManageAction.ID,title:b.ExplorerManageAction.LABEL},when:f.ItemContextKey.ItemType.isEqualTo("database"),order:1})}),define(Q[700],Y([1,0,79,73,2332,13,28,8]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findFocusedDiffEditor=e.AccessibleDiffViewerPrev=e.AccessibleDiffViewerNext=void 0;const v={value:(0,b.localize)(0,null),original:"Accessible Diff Viewer"};class m extends D.Action2{static{this.id="editor.action.accessibleDiffViewer.next"}constructor(){super({id:m.id,title:{value:(0,b.localize)(1,null),original:"Go to Next Difference"},category:v,precondition:f.ContextKeyExpr.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(i){h(i)?.accessibleDiffViewerNext()}}e.AccessibleDiffViewerNext=m,D.MenuRegistry.appendMenuItem(D.MenuId.EditorTitle,{command:{id:m.id,title:(0,b.localize)(2,null)},order:10,group:"2_diff",when:f.ContextKeyExpr.and(y.EditorContextKeys.accessibleDiffViewerVisible.negate(),f.ContextKeyExpr.has("isInDiffEditor"))});class S extends D.Action2{static{this.id="editor.action.accessibleDiffViewer.prev"}constructor(){super({id:S.id,title:{value:(0,b.localize)(3,null),original:"Go to Previous Difference"},category:v,precondition:f.ContextKeyExpr.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(i){h(i)?.accessibleDiffViewerPrev()}}e.AccessibleDiffViewerPrev=S;function h(r){const i=r.get(t.ICodeEditorService),s=i.listDiffEditors(),o=i.getFocusedCodeEditor()??i.getActiveCodeEditor();if(!o)return null;for(let u=0,d=s.length;u<d;u++){const p=s[u];if(p.getModifiedEditor().getId()===o.getId()||p.getOriginalEditor().getId()===o.getId())return p}if(document.activeElement)for(const u of s){const d=u.getContainerDomNode();if(a(d,document.activeElement))return u}return null}e.findFocusedDiffEditor=h;function a(r,i){let s=i;for(;s;){if(s===r)return!0;s=s.parentElement}return!1}T.CommandsRegistry.registerCommandAlias("editor.action.diffReview.next",m.id),(0,D.registerAction2)(m),T.CommandsRegistry.registerCommandAlias("editor.action.diffReview.prev",S.id),(0,D.registerAction2)(S)}),define(Q[3260],Y([1,0,14,15,4,700]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeEditorContributions=void 0;class D extends b.Disposable{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new b.DisposableMap),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(f,v,m){this._editor=f,this._instantiationService=m;for(const S of v){if(this._pending.has(S.id)){(0,y.onUnexpectedError)(new Error(`Cannot have two contributions with the same id ${S.id}`));continue}this._pending.set(S.id,S)}this._instantiateSome(0),this._register((0,t.runWhenIdle)(()=>{this._instantiateSome(1)})),this._register((0,t.runWhenIdle)(()=>{this._instantiateSome(2)})),this._register((0,t.runWhenIdle)(()=>{this._instantiateSome(3)},5e3))}saveViewState(){const f={};for(const[v,m]of this._instances)typeof m.saveViewState=="function"&&(f[v]=m.saveViewState());return f}restoreViewState(f){for(const[v,m]of this._instances)typeof m.restoreViewState=="function"&&m.restoreViewState(f[v])}get(f){return this._instantiateById(f),this._instances.get(f)||null}set(f,v){this._instances.set(f,v)}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){this._register((0,t.runWhenIdle)(()=>{this._instantiateSome(1)},50))}_instantiateSome(f){if(this._finishedInstantiation[f])return;this._finishedInstantiation[f]=!0;const v=this._findPendingContributionsByInstantiation(f);for(const m of v)this._instantiateById(m.id)}_findPendingContributionsByInstantiation(f){const v=[];for(const[,m]of this._pending)m.instantiation===f&&v.push(m);return v}_instantiateById(f){const v=this._pending.get(f);if(v){if(this._pending.delete(f),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const m=this._instantiationService.createInstance(v.ctor,this._editor);this._instances.set(v.id,m),typeof m.restoreViewState=="function"&&v.instantiation!==0&&console.warn(`Editor contribution '${v.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(m){(0,y.onUnexpectedError)(m)}}}}e.CodeEditorContributions=D}),define(Q[880],Y([1,0,87,105,485,2435,13,8]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTabFocusModeAction=void 0;class v extends T.Action2{static{this.ID="editor.action.toggleTabFocusMode"}static{this.LABEL=D.localize(0,null)}constructor(){super({id:v.ID,title:{value:v.LABEL,original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:(0,y.KeyChord)(2089,3115),mac:{primary:1323},weight:100},f1:!0})}run(S){const h=S.get(f.IContextKeyService).getContextKeyValue("focusedView")==="terminal"?"terminalFocus":"editorFocus",r=!b.TabFocus.getTabFocusMode(h);b.TabFocus.setTabFocusMode(r,h),r?(0,t.alert)(D.localize(1,null)):(0,t.alert)(D.localize(2,null))}}e.ToggleTabFocusModeAction=v,(0,T.registerAction2)(v)}),define(Q[3261],Y([1,0,2448,81,13,11]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuHiddenStatesReset=void 0;class T extends b.Action2{constructor(){super({id:"menu.resetHiddenStates",title:{value:(0,t.localize)(0,null),original:"Reset All Menus"},category:y.Categories.View,f1:!0})}run(v){v.get(b.IMenuService).resetHiddenStates(),v.get(D.ILogService).info("did RESET all menu hidden states")}}e.MenuHiddenStatesReset=T}),define(Q[308],Y([1,0,498,2316,249,8,113,2467,4]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedReplaceInput=e.ContextScopedFindInput=e.ContextScopedHistoryInputBox=e.registerAndCreateHistoryNavigationContext=e.historyNavigationVisible=void 0,e.historyNavigationVisible=new D.RawContextKey("suggestWidgetVisible",!1,(0,f.localize)(0,null));const m="historyNavigationWidgetFocus",S="historyNavigationForwardsEnabled",h="historyNavigationBackwardsEnabled";let a;const r=[];function i(d,p){if(r.includes(p))throw new Error("Cannot register the same widget multiple times");r.push(p);const c=new v.DisposableStore,l=new D.RawContextKey(m,!1).bindTo(d),n=new D.RawContextKey(S,!0).bindTo(d),g=new D.RawContextKey(h,!0).bindTo(d),w=()=>{l.set(!0),a=p},E=()=>{l.set(!1),a===p&&(a=void 0)};return p.element===document.activeElement&&w(),c.add(p.onDidFocus(()=>w())),c.add(p.onDidBlur(()=>E())),c.add((0,v.toDisposable)(()=>{r.splice(r.indexOf(p),1),E()})),{historyNavigationForwardsEnablement:n,historyNavigationBackwardsEnablement:g,dispose(){c.dispose()}}}e.registerAndCreateHistoryNavigationContext=i;let s=class extends b.HistoryInputBox{constructor(p,c,l,n){super(p,c,l);const g=this._register(n.createScoped(this.element));this._register(i(g,this))}};e.ContextScopedHistoryInputBox=s,e.ContextScopedHistoryInputBox=s=fe([O(3,D.IContextKeyService)],s);let o=class extends t.FindInput{constructor(p,c,l,n){super(p,c,l);const g=this._register(n.createScoped(this.inputBox.element));this._register(i(g,this.inputBox))}};e.ContextScopedFindInput=o,e.ContextScopedFindInput=o=fe([O(3,D.IContextKeyService)],o);let u=class extends y.ReplaceInput{constructor(p,c,l,n,g=!1){super(p,c,g,l);const w=this._register(n.createScoped(this.inputBox.element));this._register(i(w,this.inputBox))}};e.ContextScopedReplaceInput=u,e.ContextScopedReplaceInput=u=fe([O(3,D.IContextKeyService)],u),T.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:D.ContextKeyExpr.and(D.ContextKeyExpr.has(m),D.ContextKeyExpr.equals(h,!0),D.ContextKeyExpr.not("isComposing"),e.historyNavigationVisible.isEqualTo(!1)),primary:16,secondary:[528],handler:d=>{a?.showPreviousValue()}}),T.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:D.ContextKeyExpr.and(D.ContextKeyExpr.has(m),D.ContextKeyExpr.equals(S,!0),D.ContextKeyExpr.not("isComposing"),e.historyNavigationVisible.isEqualTo(!1)),primary:18,secondary:[530],handler:d=>{a?.showNextValue()}})}),define(Q[329],Y([1,0,31,15,128,4,145,17,10,51,27,75,304,2428,13,28,8,74,308]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickSuggestionsOptions=e.showSimpleSuggestions=e.getSuggestionComparator=e.provideSuggestionItems=e.CompletionItemModel=e.setSnippetSuggestSupport=e.getSnippetSuggestSupport=e.CompletionOptions=e.SnippetSortOrder=e.CompletionItem=e.suggestWidgetStatusbarMenu=e.Context=void 0,e.Context={Visible:d.historyNavigationVisible,HasFocusedSuggestion:new o.RawContextKey("suggestWidgetHasFocusedSuggestion",!1,(0,r.localize)(0,null)),DetailsVisible:new o.RawContextKey("suggestWidgetDetailsVisible",!1,(0,r.localize)(1,null)),MultipleSuggestions:new o.RawContextKey("suggestWidgetMultipleSuggestions",!1,(0,r.localize)(2,null)),MakesTextEdit:new o.RawContextKey("suggestionMakesTextEdit",!0,(0,r.localize)(3,null)),AcceptSuggestionsOnEnter:new o.RawContextKey("acceptSuggestionOnEnter",!0,(0,r.localize)(4,null)),HasInsertAndReplaceRange:new o.RawContextKey("suggestionHasInsertAndReplaceRange",!1,(0,r.localize)(5,null)),InsertMode:new o.RawContextKey("suggestionInsertMode",void 0,{type:"string",description:(0,r.localize)(6,null)}),CanResolve:new o.RawContextKey("suggestionCanResolve",!1,(0,r.localize)(7,null))},e.suggestWidgetStatusbarMenu=new i.MenuId("suggestWidgetStatusBar");class p{constructor(P,x,F,V){this.position=P,this.completion=x,this.container=F,this.provider=V,this.isInvalid=!1,this.score=b.FuzzyScore.Default,this.distance=0,this.textLabel=typeof x.label=="string"?x.label:x.label?.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=x.sortText&&x.sortText.toLowerCase(),this.filterTextLow=x.filterText&&x.filterText.toLowerCase(),this.extensionId=x.extensionId,S.Range.isIRange(x.range)?(this.editStart=new m.Position(x.range.startLineNumber,x.range.startColumn),this.editInsertEnd=new m.Position(x.range.endLineNumber,x.range.endColumn),this.editReplaceEnd=new m.Position(x.range.endLineNumber,x.range.endColumn),this.isInvalid=this.isInvalid||S.Range.spansMultipleLines(x.range)||x.range.startLineNumber!==P.lineNumber):(this.editStart=new m.Position(x.range.insert.startLineNumber,x.range.insert.startColumn),this.editInsertEnd=new m.Position(x.range.insert.endLineNumber,x.range.insert.endColumn),this.editReplaceEnd=new m.Position(x.range.replace.endLineNumber,x.range.replace.endColumn),this.isInvalid=this.isInvalid||S.Range.spansMultipleLines(x.range.insert)||S.Range.spansMultipleLines(x.range.replace)||x.range.insert.startLineNumber!==P.lineNumber||x.range.replace.startLineNumber!==P.lineNumber||x.range.insert.startColumn!==x.range.replace.startColumn),typeof V.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}async resolve(P){if(!this._resolveCache){const x=P.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),F=new T.StopWatch(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,P)).then(V=>{Object.assign(this.completion,V),this._resolveDuration=F.elapsed(),x.dispose()},V=>{(0,y.isCancellationError)(V)&&(this._resolveCache=void 0,this._resolveDuration=void 0)})}return this._resolveCache}}e.CompletionItem=p;var c;(function(N){N[N.Top=0]="Top",N[N.Inline=1]="Inline",N[N.Bottom=2]="Bottom"})(c||(e.SnippetSortOrder=c={}));class l{static{this.default=new l}constructor(P=2,x=new Set,F=new Set,V=new Map,W=!0){this.snippetSortOrder=P,this.kindFilter=x,this.providerFilter=F,this.providerItemsToReuse=V,this.showDeprecated=W}}e.CompletionOptions=l;let n;function g(){return n}e.getSnippetSuggestSupport=g;function w(N){const P=n;return n=N,P}e.setSnippetSuggestSupport=w;class E{constructor(P,x,F,V){this.items=P,this.needsClipboard=x,this.durations=F,this.disposable=V}}e.CompletionItemModel=E;async function C(N,P,x,F=l.default,V={triggerKind:0},W=t.CancellationToken.None){const z=new T.StopWatch;x=x.clone();const B=P.getWordAtPosition(x),K=B?new S.Range(x.lineNumber,B.startColumn,x.lineNumber,B.endColumn):S.Range.fromPositions(x),H={replace:K,insert:K.setEndPosition(x.lineNumber,x.column)},U=[],G=new D.DisposableStore,$=[];let ie=!1;const J=(ee,X,te)=>{let Z=!1;if(!X)return Z;for(const se of X.suggestions)if(!F.kindFilter.has(se.kind)){if(!F.showDeprecated&&se?.tags?.includes(1))continue;se.range||(se.range=H),se.sortText||(se.sortText=typeof se.label=="string"?se.label:se.label.label),!ie&&se.insertTextRules&&se.insertTextRules&4&&(ie=a.SnippetParser.guessNeedsClipboard(se.insertText)),U.push(new p(x,se,X,ee)),Z=!0}return(0,D.isDisposable)(X)&&G.add(X),$.push({providerName:ee._debugDisplayName??"unknown_provider",elapsedProvider:X.duration??-1,elapsedOverall:te.elapsed()}),Z},j=(async()=>{if(!n||F.kindFilter.has(27))return;const ee=F.providerItemsToReuse.get(n);if(ee){ee.forEach(Z=>U.push(Z));return}if(F.providerFilter.size>0&&!F.providerFilter.has(n))return;const X=new T.StopWatch,te=await n.provideCompletionItems(P,x,V,W);J(n,te,X)})();for(const ee of N.orderedGroups(P)){let X=!1;if(await Promise.all(ee.map(async te=>{if(F.providerItemsToReuse.has(te)){const Z=F.providerItemsToReuse.get(te);Z.forEach(se=>U.push(se)),X=X||Z.length>0;return}if(!(F.providerFilter.size>0&&!F.providerFilter.has(te)))try{const Z=new T.StopWatch,se=await te.provideCompletionItems(P,x,V,W);X=J(te,se,Z)||X}catch(Z){(0,y.onUnexpectedExternalError)(Z)}})),X||W.isCancellationRequested)break}return await j,W.isCancellationRequested?(G.dispose(),Promise.reject(new y.CancellationError)):new E(U.sort(L(F.snippetSortOrder)),ie,{entries:$,elapsed:z.elapsed()},G)}e.provideSuggestionItems=C;function I(N,P){if(N.sortTextLow&&P.sortTextLow){if(N.sortTextLow<P.sortTextLow)return-1;if(N.sortTextLow>P.sortTextLow)return 1}return N.textLabel<P.textLabel?-1:N.textLabel>P.textLabel?1:N.completion.kind-P.completion.kind}function _(N,P){if(N.completion.kind!==P.completion.kind){if(N.completion.kind===27)return-1;if(P.completion.kind===27)return 1}return I(N,P)}function A(N,P){if(N.completion.kind!==P.completion.kind){if(N.completion.kind===27)return 1;if(P.completion.kind===27)return-1}return I(N,P)}const k=new Map;k.set(0,_),k.set(2,A),k.set(1,I);function L(N){return k.get(N)}e.getSuggestionComparator=L,s.CommandsRegistry.registerCommand("_executeCompletionItemProvider",async(N,...P)=>{const[x,F,V,W]=P;(0,f.assertType)(v.URI.isUri(x)),(0,f.assertType)(m.Position.isIPosition(F)),(0,f.assertType)(typeof V=="string"||!V),(0,f.assertType)(typeof W=="number"||!W);const{completionProvider:z}=N.get(u.ILanguageFeaturesService),B=await N.get(h.ITextModelService).createModelReference(x);try{const K={incomplete:!1,suggestions:[]},H=[],U=B.object.textEditorModel.validatePosition(F),G=await C(z,B.object.textEditorModel,U,void 0,{triggerCharacter:V??void 0,triggerKind:V?1:0});for(const $ of G.items)H.length<(W??0)&&H.push($.resolve(t.CancellationToken.None)),K.incomplete=K.incomplete||$.container.incomplete,K.suggestions.push($.completion);try{return await Promise.all(H),K}finally{setTimeout(()=>G.disposable.dispose(),100)}}finally{B.dispose()}});function R(N,P){N.getContribution("editor.contrib.suggestController")?.triggerSuggest(new Set().add(P),void 0,!0)}e.showSimpleSuggestions=R;class M{static isAllOff(P){return P.other==="off"&&P.comments==="off"&&P.strings==="off"}static isAllOn(P){return P.other==="on"&&P.comments==="on"&&P.strings==="on"}static valueFor(P,x){switch(x){case 1:return P.comments;case 2:return P.strings;default:return P.other}}}e.QuickSuggestionsOptions=M}),define(Q[3262],Y([1,0,2469,18,56,16]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readKeyboardConfig=e.DispatchConfig=void 0;var T;(function(S){S[S.Code=0]="Code",S[S.KeyCode=1]="KeyCode"})(T||(e.DispatchConfig=T={}));function f(S){const h=S.getValue("keyboard"),a=h?.dispatch==="keyCode"?1:0,r=!!h?.mapAltGrToCtrlAlt;return{dispatch:a,mapAltGrToCtrlAlt:r}}e.readKeyboardConfig=f;const v=D.Registry.as(b.Extensions.Configuration),m={id:"keyboard",order:15,type:"object",title:t.localize(0,null),properties:{"keyboard.dispatch":{scope:1,type:"string",enum:["code","keyCode"],default:"code",markdownDescription:t.localize(1,null),included:y.OS===2||y.OS===3},"keyboard.mapAltGrToCtrlAlt":{scope:1,type:"boolean",default:!1,markdownDescription:t.localize(2,null),included:y.OS===1}}};v.registerConfiguration(m)}),define(Q[287],Y([1,0,20,4,16]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessRegistry=e.Extensions=e.DefaultQuickAccessFilterValue=void 0;var D;(function(f){f[f.PRESERVE=0]="PRESERVE",f[f.LAST=1]="LAST"})(D||(e.DefaultQuickAccessFilterValue=D={})),e.Extensions={Quickaccess:"workbench.contributions.quickaccess"};class T{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(v){return v.prefix.length===0?this.defaultProvider=v:this.providers.push(v),this.providers.sort((m,S)=>S.prefix.length-m.prefix.length),(0,y.toDisposable)(()=>{this.providers.splice(this.providers.indexOf(v),1),this.defaultProvider===v&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,t.coalesce)([this.defaultProvider,...this.providers])}getQuickAccessProvider(v){return v&&this.providers.find(S=>v.startsWith(S.prefix))||void 0||this.defaultProvider}clear(){const v=[...this.providers],m=this.defaultProvider;return this.providers=[],this.defaultProvider=void 0,()=>{this.providers=v,this.defaultProvider=m}}}e.QuickAccessRegistry=T,b.Registry.add(e.Extensions.Quickaccess,new T)}),define(Q[3263],Y([1,0,2475,16,4,38,287,43]),function(q,e,t,y,b,D,T,f){"use strict";var v;Object.defineProperty(e,"__esModule",{value:!0}),e.HelpQuickAccessProvider=void 0;let m=class{static{v=this}static{this.PREFIX="?"}constructor(h,a){this.quickInputService=h,this.keybindingService=a,this.registry=y.Registry.as(T.Extensions.Quickaccess)}provide(h){const a=new b.DisposableStore;return a.add(h.onDidAccept(()=>{const[r]=h.selectedItems;r&&this.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})})),a.add(h.onDidChangeValue(r=>{const i=this.registry.getQuickAccessProvider(r.substr(v.PREFIX.length));i&&i.prefix&&i.prefix!==v.PREFIX&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),h.items=this.getQuickAccessProviders().filter(r=>r.prefix!==v.PREFIX),a}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((a,r)=>a.prefix.localeCompare(r.prefix)).flatMap(a=>this.createPicks(a))}createPicks(h){return h.helpEntries.map(a=>{const r=a.prefix||h.prefix,i=r||"\u2026";return{prefix:r,label:i,keybinding:a.commandId?this.keybindingService.lookupKeybinding(a.commandId):void 0,ariaLabel:(0,t.localize)(0,null,i,a.description),description:a.description}})}};e.HelpQuickAccessProvider=m,e.HelpQuickAccessProvider=m=v=fe([O(0,f.IQuickInputService),O(1,D.IKeybindingService)],m)}),define(Q[3264],Y([1,0,14,31,202,4,5,287,43,16]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessController=void 0;let S=class extends D.Disposable{constructor(a,r){super(),this.quickInputService=a,this.instantiationService=r,this.registry=m.Registry.as(f.Extensions.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}pick(a="",r){return this.doShowOrPick(a,!0,r)}show(a="",r){this.doShowOrPick(a,!1,r)}doShowOrPick(a,r,i){const[s,o]=this.getOrInstantiateProvider(a),u=this.visibleQuickAccess,d=u?.descriptor;if(u&&o&&d===o){a!==o.prefix&&!i?.preserveValue&&(u.picker.value=a),this.adjustValueSelection(u.picker,o,i);return}if(o&&!i?.preserveValue){let g;if(u&&d&&d!==o){const w=u.value.substr(d.prefix.length);w&&(g=`${o.prefix}${w}`)}if(!g){const w=s?.defaultFilterValue;w===f.DefaultQuickAccessFilterValue.LAST?g=this.lastAcceptedPickerValues.get(o):typeof w=="string"&&(g=`${o.prefix}${w}`)}typeof g=="string"&&(a=g)}const p=new D.DisposableStore,c=p.add(this.quickInputService.createQuickPick());c.value=a,this.adjustValueSelection(c,o,i),c.placeholder=o?.placeholder,c.quickNavigate=i?.quickNavigateConfiguration,c.hideInput=!!c.quickNavigate&&!u,(typeof i?.itemActivation=="number"||i?.quickNavigateConfiguration)&&(c.itemActivation=i?.itemActivation??v.ItemActivation.SECOND),c.contextKey=o?.contextKey,c.filterValue=g=>g.substring(o?o.prefix.length:0);let l;r&&(l=new t.DeferredPromise,p.add((0,b.once)(c.onWillAccept)(g=>{g.veto(),c.hide()}))),p.add(this.registerPickerListeners(c,s,o,a,i?.providerOptions));const n=p.add(new y.CancellationTokenSource);if(s&&p.add(s.provide(c,n.token,i?.providerOptions)),(0,b.once)(c.onDidHide)(()=>{c.selectedItems.length===0&&n.cancel(),p.dispose(),l?.complete(c.selectedItems.slice(0))}),c.show(),r)return l?.p}adjustValueSelection(a,r,i){let s;i?.preserveValue?s=[a.value.length,a.value.length]:s=[r?.prefix.length??0,a.value.length],a.valueSelection=s}registerPickerListeners(a,r,i,s,o){const u=new D.DisposableStore,d=this.visibleQuickAccess={picker:a,descriptor:i,value:s};return u.add((0,D.toDisposable)(()=>{d===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),u.add(a.onDidChangeValue(p=>{const[c]=this.getOrInstantiateProvider(p);c!==r?this.show(p,{preserveValue:!0,providerOptions:o}):d.value=p})),i&&u.add(a.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,a.value)})),u}getOrInstantiateProvider(a){const r=this.registry.getQuickAccessProvider(a);if(!r)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(r);return i||(i=this.instantiationService.createInstance(r.ctor),this.mapProviderToDescriptor.set(r,i)),[i,r]}};e.QuickAccessController=S,e.QuickAccessController=S=fe([O(0,v.IQuickInputService),O(1,T.IInstantiationService)],S)}),define(Q[3265],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeRemoteResourceRouter=e.NODE_REMOTE_RESOURCE_CHANNEL_NAME=e.NODE_REMOTE_RESOURCE_IPC_METHOD_NAME=void 0,e.NODE_REMOTE_RESOURCE_IPC_METHOD_NAME="request",e.NODE_REMOTE_RESOURCE_CHANNEL_NAME="remoteResourceHandler";class t{async routeCall(b,D,T){if(D!==e.NODE_REMOTE_RESOURCE_IPC_METHOD_NAME)throw new Error(`Call not found: ${D}`);const f=T[0];if(f?.authority){const v=b.connections.find(m=>m.ctx===f.authority);if(v)return v}throw new Error("Caller not found")}routeEvent(b,D){throw new Error(`Event not found: ${D}`)}}e.NodeRemoteResourceRouter=t}),define(Q[3266],Y([1,0,62,6,4,673]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ManagedSocket=e.connectManagedSocket=e.socketRawEndHeaderSequence=e.makeRawSocketHeaders=void 0;const T=(m,S,h)=>{const a=new Uint8Array(16);for(let s=0;s<16;s++)a[s]=Math.round(Math.random()*256);const r=(0,t.encodeBase64)(t.VSBuffer.wrap(a));return[`GET ws://localhost${m}?${S}&skipWebSocketFrames=true HTTP/1.1`,"Connection: Upgrade","Upgrade: websocket",`Sec-WebSocket-Key: ${r}`].join(`\r `)+`\r \r `};e.makeRawSocketHeaders=T,e.socketRawEndHeaderSequence=t.VSBuffer.fromString(`\r \r `);async function f(m,S,h,a,r){m.write(t.VSBuffer.fromString((0,e.makeRawSocketHeaders)(S,h,a)));const i=new b.DisposableStore;try{return await new Promise((s,o)=>{let u;i.add(m.onData(d=>{u?u=t.VSBuffer.concat([u,d],u.byteLength+d.byteLength):u=d;const p=u.indexOf(e.socketRawEndHeaderSequence);if(p===-1)return;s(m),m.pauseData();const c=u.slice(p+e.socketRawEndHeaderSequence.byteLength);c.byteLength&&r.onData.fire(c)})),i.add(m.onClose(d=>o(d??new Error("socket closed")))),i.add(m.onEnd(()=>o(new Error("socket ended"))))})}catch(s){throw m.dispose(),s}finally{i.dispose()}}e.connectManagedSocket=f;class v extends b.Disposable{constructor(S,h){super(),this.debugLabel=S,this.pausableDataEmitter=this._register(new y.PauseableEmitter),this.onData=(...a)=>(this.pausableDataEmitter.isPaused&&queueMicrotask(()=>this.pausableDataEmitter.resume()),this.pausableDataEmitter.event(...a)),this.didDisposeEmitter=this._register(new y.Emitter),this.onDidDispose=this.didDisposeEmitter.event,this.ended=!1,this._register(h.onData),this._register(h.onData.event(a=>this.pausableDataEmitter.fire(a))),this.onClose=this._register(h.onClose).event,this.onEnd=this._register(h.onEnd).event}pauseData(){this.pausableDataEmitter.pause()}drain(){return Promise.resolve()}end(){this.ended=!0,this.closeRemote()}traceSocketEvent(S,h){D.SocketDiagnostics.traceSocketEvent(this,this.debugLabel,S,h)}dispose(){this.ended||this.closeRemote(),this.didDisposeEmitter.fire(),super.dispose()}}e.ManagedSocket=v}),define(Q[181],Y([1,0,15,5]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRemoteAuthorityPrefix=e.RemoteAuthorityResolverError=e.RemoteAuthorityResolverErrorCode=e.WebSocketRemoteConnection=e.ManagedRemoteConnection=e.RemoteConnectionType=e.IRemoteAuthorityResolverService=void 0,e.IRemoteAuthorityResolverService=(0,y.createDecorator)("remoteAuthorityResolverService");var b;(function(S){S[S.WebSocket=0]="WebSocket",S[S.Managed=1]="Managed"})(b||(e.RemoteConnectionType=b={}));class D{constructor(h){this.id=h,this.type=1}toString(){return`Managed(${this.id})`}}e.ManagedRemoteConnection=D;class T{constructor(h,a){this.host=h,this.port=a,this.type=0}toString(){return`WebSocket(${this.host}:${this.port})`}}e.WebSocketRemoteConnection=T;var f;(function(S){S.Unknown="Unknown",S.NotAvailable="NotAvailable",S.TemporarilyNotAvailable="TemporarilyNotAvailable",S.NoResolverFound="NoResolverFound",S.InvalidAuthority="InvalidAuthority"})(f||(e.RemoteAuthorityResolverErrorCode=f={}));class v extends t.ErrorNoTelemetry{static isNotAvailable(h){return h instanceof v&&h._code===f.NotAvailable}static isTemporarilyNotAvailable(h){return h instanceof v&&h._code===f.TemporarilyNotAvailable}static isNoResolverFound(h){return h instanceof v&&h._code===f.NoResolverFound}static isInvalidAuthority(h){return h instanceof v&&h._code===f.InvalidAuthority}static isHandled(h){return h instanceof v&&h.isHandled}constructor(h,a=f.Unknown,r){super(h),this._message=h,this._code=a,this._detail=r,this.isHandled=a===f.NotAvailable&&r===!0,Object.setPrototypeOf(this,v.prototype)}}e.RemoteAuthorityResolverError=v;function m(S){const h=S.indexOf("+");return h===-1?S:S.substring(0,h)}e.getRemoteAuthorityPrefix=m}),define(Q[3267],Y([1,0,7,14,62,6,4,673,181]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserSocketFactory=void 0;class m extends T.Disposable{traceSocketEvent(i,s){f.SocketDiagnostics.traceSocketEvent(this._socket,this._debugLabel,i,s)}constructor(i,s){super(),this._onData=new D.Emitter,this.onData=this._onData.event,this._onOpen=this._register(new D.Emitter),this.onOpen=this._onOpen.event,this._onClose=this._register(new D.Emitter),this.onClose=this._onClose.event,this._onError=this._register(new D.Emitter),this.onError=this._onError.event,this._debugLabel=s,this._socket=new WebSocket(i),this.traceSocketEvent("created",{type:"BrowserWebSocket",url:i}),this._fileReader=new FileReader,this._queue=[],this._isReading=!1,this._isClosed=!1,this._fileReader.onload=n=>{this._isReading=!1;const g=n.target.result;this.traceSocketEvent("read",g),this._onData.fire(g),this._queue.length>0&&o(this._queue.shift())};const o=n=>{if(this._isReading){this._queue.push(n);return}this._isReading=!0,this._fileReader.readAsArrayBuffer(n)};this._socketMessageListener=n=>{const g=n.data;this.traceSocketEvent("browserWebSocketBlobReceived",{type:g.type,size:g.size}),o(g)},this._socket.addEventListener("message",this._socketMessageListener),this._register(t.addDisposableListener(this._socket,"open",n=>{this.traceSocketEvent("open"),this._onOpen.fire()}));let u=null;const d=()=>{const n=u;u=null,this._onError.fire(n)},p=this._register(new y.RunOnceScheduler(d,0)),c=n=>{p.cancel(),u=n,p.schedule()},l=n=>{p.cancel(),u=n,d()};this._register(t.addDisposableListener(this._socket,"close",n=>{this.traceSocketEvent("close",{code:n.code,reason:n.reason,wasClean:n.wasClean}),this._isClosed=!0,u&&(window.navigator.onLine?n.wasClean?(p.cancel(),d()):l(new v.RemoteAuthorityResolverError(n.reason||`WebSocket close with status code ${n.code}`,v.RemoteAuthorityResolverErrorCode.TemporarilyNotAvailable,n)):l(new v.RemoteAuthorityResolverError("Browser is offline",v.RemoteAuthorityResolverErrorCode.TemporarilyNotAvailable,n))),this._onClose.fire({code:n.code,reason:n.reason,wasClean:n.wasClean,event:n})})),this._register(t.addDisposableListener(this._socket,"error",n=>{this.traceSocketEvent("error",{message:n?.message}),c(n)}))}send(i){this._isClosed||(this.traceSocketEvent("write",i),this._socket.send(i))}close(){this._isClosed=!0,this.traceSocketEvent("close"),this._socket.close(),this._socket.removeEventListener("message",this._socketMessageListener),this.dispose()}}const S=new class{create(r,i){return new m(r,i)}};class h{traceSocketEvent(i,s){typeof this.socket.traceSocketEvent=="function"?this.socket.traceSocketEvent(i,s):f.SocketDiagnostics.traceSocketEvent(this.socket,this.debugLabel,i,s)}constructor(i,s){this.socket=i,this.debugLabel=s}dispose(){this.socket.close()}onData(i){return this.socket.onData(s=>i(b.VSBuffer.wrap(new Uint8Array(s))))}onClose(i){const s=o=>{i(typeof o>"u"?o:{type:1,code:o.code,reason:o.reason,wasClean:o.wasClean,event:o.event})};return this.socket.onClose(s)}onEnd(i){return T.Disposable.None}write(i){this.socket.send(i.buffer)}end(){this.socket.close()}drain(){return Promise.resolve()}}class a{constructor(i){this._webSocketFactory=i||S}supports(i){return!0}connect({host:i,port:s},o,u,d){return new Promise((p,c)=>{const l=/^https:/.test(window.location.href)?"wss":"ws",n=this._webSocketFactory.create(`${l}://${/:/.test(i)&&!/\[/.test(i)?`[${i}]`:i}:${s}${o}?${u}&skipWebSocketFrames=false`,d),g=n.onError(c);n.onOpen(()=>{g.dispose(),p(new h(n,d))})})}}e.BrowserSocketFactory=a}),define(Q[701],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteExtensionsScannerChannelName=e.IRemoteExtensionsScannerService=void 0,e.IRemoteExtensionsScannerService=(0,t.createDecorator)("IRemoteExtensionsScannerService"),e.RemoteExtensionsScannerChannelName="remoteExtensionsScanner"}),define(Q[330],Y([1,0,22]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseAuthorityWithOptionalPort=e.parseAuthorityWithPort=e.getRemoteServerRootPath=e.getRemoteName=e.getRemoteAuthority=void 0;function y(m){return m.scheme===t.Schemas.vscodeRemote?m.authority:void 0}e.getRemoteAuthority=y;function b(m){if(!m)return;const S=m.indexOf("+");return S<0?m:m.substr(0,S)}e.getRemoteName=b;function D(m){return`/${m.quality??"oss"}-${m.commit??"dev"}`}e.getRemoteServerRootPath=D;function T(m){const{host:S,port:h}=v(m);if(typeof h>"u")throw new Error("Remote authority doesn't contain a port!");return{host:S,port:h}}e.parseAuthorityWithPort=T;function f(m,S){let{host:h,port:a}=v(m);return typeof a>"u"&&(a=S),{host:h,port:a}}e.parseAuthorityWithOptionalPort=f;function v(m){const S=m.match(/^(\[[0-9a-z:]+\]):(\d+)$/);if(S)return{host:S[1],port:parseInt(S[2],10)};const h=m.match(/^(\[[0-9a-z:]+\])$/);if(h)return{host:h[1],port:void 0};const a=m.match(/(.*):(\d+)$/);return a?{host:a[1],port:parseInt(a[2],10)}:{host:m,port:void 0}}}),define(Q[112],Y([1,0,33,5,330]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBuiltinExtensionsScannerService=e.isResolverExtension=e.isAuthenticationProviderExtension=e.isLanguagePackExtension=e.isApplicationScopedExtension=e.ExtensionIdentifierMap=e.ExtensionIdentifierSet=e.ExtensionIdentifier=e.TargetPlatform=e.ExtensionType=e.EXTENSION_CATEGORIES=e.getWorkspaceSupportTypeMessage=e.ALL_EXTENSION_KINDS=e.ExtensionsPolicy=e.ExtensionsPolicyKey=e.UNDEFINED_PUBLISHER=e.BUILTIN_MANIFEST_CACHE_FILE=e.USER_MANIFEST_CACHE_FILE=void 0,e.USER_MANIFEST_CACHE_FILE="extensions.user.cache",e.BUILTIN_MANIFEST_CACHE_FILE="extensions.builtin.cache",e.UNDEFINED_PUBLISHER="undefined_publisher",e.ExtensionsPolicyKey="extensions.extensionsPolicy";var D;(function(o){o.allowAll="allowAll",o.allowNone="allowNone",o.allowMicrosoft="allowMicrosoft"})(D||(e.ExtensionsPolicy=D={})),e.ALL_EXTENSION_KINDS=["ui","workspace","web"];function T(o){if(typeof o=="object"&&o!==null&&o.supported!==!0)return o.description}e.getWorkspaceSupportTypeMessage=T,e.EXTENSION_CATEGORIES=["Language Packs"];var f;(function(o){o[o.System=0]="System",o[o.User=1]="User"})(f||(e.ExtensionType=f={}));var v;(function(o){o.WIN32_X64="win32-x64",o.WIN32_IA32="win32-ia32",o.WIN32_ARM64="win32-arm64",o.LINUX_X64="linux-x64",o.LINUX_ARM64="linux-arm64",o.LINUX_ARMHF="linux-armhf",o.ALPINE_X64="alpine-x64",o.ALPINE_ARM64="alpine-arm64",o.DARWIN_X64="darwin-x64",o.DARWIN_ARM64="darwin-arm64",o.WEB="web",o.UNIVERSAL="universal",o.UNKNOWN="unknown",o.UNDEFINED="undefined"})(v||(e.TargetPlatform=v={}));class m{constructor(u){this.value=u,this._lower=u.toLowerCase()}static equals(u,d){if(typeof u>"u"||u===null)return typeof d>"u"||d===null;if(typeof d>"u"||d===null)return!1;if(typeof u=="string"||typeof d=="string"){const p=typeof u=="string"?u:u.value,c=typeof d=="string"?d:d.value;return t.equalsIgnoreCase(p,c)}return u._lower===d._lower}static toKey(u){return typeof u=="string"?u.toLowerCase():u._lower}}e.ExtensionIdentifier=m;class S{get size(){return this._set.size}constructor(u){if(this._set=new Set,u)for(const d of u)this.add(d)}add(u){this._set.add(m.toKey(u))}delete(u){return this._set.delete(m.toKey(u))}has(u){return this._set.has(m.toKey(u))}}e.ExtensionIdentifierSet=S;class h{constructor(){this._map=new Map}clear(){this._map.clear()}delete(u){this._map.delete(m.toKey(u))}get(u){return this._map.get(m.toKey(u))}has(u){return this._map.has(m.toKey(u))}set(u,d){this._map.set(m.toKey(u),d)}values(){return this._map.values()}forEach(u){this._map.forEach(u)}[Symbol.iterator](){return this._map[Symbol.iterator]()}}e.ExtensionIdentifierMap=h;function a(o){return r(o)}e.isApplicationScopedExtension=a;function r(o){return o.contributes&&o.contributes.localizations?o.contributes.localizations.length>0:!1}e.isLanguagePackExtension=r;function i(o){return o.contributes&&o.contributes.authentication?o.contributes.authentication.length>0:!1}e.isAuthenticationProviderExtension=i;function s(o,u){if(u){const d=`onResolveRemoteAuthority:${(0,b.getRemoteName)(u)}`;return!!o.activationEvents?.includes(d)}return!1}e.isResolverExtension=s,e.IBuiltinExtensionsScannerService=(0,y.createDecorator)("IBuiltinExtensionsScannerService")}),define(Q[881],Y([1,0,15,112]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImplicitActivationEvents=e.ImplicitActivationEventsImpl=void 0;class b{constructor(){this._generators=new Map,this._cache=new WeakMap}register(T,f){this._generators.set(T,f)}readActivationEvents(T){return this._cache.has(T)||this._cache.set(T,this._readActivationEvents(T)),this._cache.get(T)}createActivationEventsMap(T){const f=Object.create(null);for(const v of T){const m=this.readActivationEvents(v);m.length>0&&(f[y.ExtensionIdentifier.toKey(v.identifier)]=m)}return f}_readActivationEvents(T){if(typeof T.main>"u"&&typeof T.browser>"u")return[];const f=Array.isArray(T.activationEvents)?T.activationEvents.slice(0):[];if(!T.contributes)return f;for(const v in T.contributes){const m=this._generators.get(v);if(!m)continue;const S=T.contributes[v],h=Array.isArray(S)?S:[S];try{m(h,f)}catch(a){(0,t.onUnexpectedError)(a)}}return f}}e.ImplicitActivationEventsImpl=b,e.ImplicitActivationEvents=new b}),define(Q[1180],Y([1,0,14,62,31,15,6,4,173,145,59,673,181,330]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostPersistentConnection=e.ManagementPersistentConnection=e.PersistentConnection=e.ReconnectionPermanentFailureEvent=e.ConnectionGainEvent=e.ReconnectionRunningEvent=e.ReconnectionWaitEvent=e.ConnectionLostEvent=e.PersistentConnectionEventType=e.connectRemoteAgentTunnel=e.connectRemoteAgentExtensionHost=e.connectRemoteAgentManagement=e.ConnectionType=void 0;const i=30*1e3;var s;(function(ee){ee[ee.Management=1]="Management",ee[ee.ExtensionHost=2]="ExtensionHost",ee[ee.Tunnel=3]="Tunnel"})(s||(e.ConnectionType=s={}));function o(ee){switch(ee){case 1:return"Management";case 2:return"ExtensionHost";case 3:return"Tunnel"}}function u(ee){const X=new b.CancellationTokenSource;return setTimeout(()=>X.cancel(),ee),X.token}function d(ee,X){if(ee.isCancellationRequested||X.isCancellationRequested)return b.CancellationToken.Cancelled;const te=new b.CancellationTokenSource;return ee.onCancellationRequested(()=>te.cancel()),X.onCancellationRequested(()=>te.cancel()),te.token}class p{get didTimeout(){return this._state==="timedout"}constructor(X){this._state="pending",this._disposables=new f.DisposableStore,this.promise=new Promise((te,Z)=>{this._resolvePromise=te,this._rejectPromise=Z}),X.isCancellationRequested?this._timeout():this._disposables.add(X.onCancellationRequested(()=>this._timeout()))}registerDisposable(X){this._state==="pending"?this._disposables.add(X):X.dispose()}_timeout(){this._state==="pending"&&(this._disposables.dispose(),this._state="timedout",this._rejectPromise(this._createTimeoutError()))}_createTimeoutError(){const X=new Error("Time limit reached");return X.code="ETIMEDOUT",X.syscall="connect",X}resolve(X){this._state==="pending"&&(this._disposables.dispose(),this._state="resolved",this._resolvePromise(X))}reject(X){this._state==="pending"&&(this._disposables.dispose(),this._state="rejected",this._rejectPromise(X))}}function c(ee,X){const te=new p(X);return te.registerDisposable(ee.onControlMessage(Z=>{const se=JSON.parse(Z.toString()),re=U(se);re?te.reject(re):te.resolve(se)})),te.promise}function l(ee,X,te,Z,se,re,oe,le){const ne=new p(le),ce=m.StopWatch.create(!1);return ee.info(`Creating a socket (${oe})...`),v.mark(`code/willCreateSocket/${re}`),X.connect(te,Z,se,oe).then(ae=>{ne.didTimeout?(v.mark(`code/didCreateSocketError/${re}`),ee.info(`Creating a socket (${oe}) finished after ${ce.elapsed()} ms, but this is too late and has timed out already.`),ae?.dispose()):(v.mark(`code/didCreateSocketOK/${re}`),ee.info(`Creating a socket (${oe}) was successful after ${ce.elapsed()} ms.`),ne.resolve(ae))},ae=>{v.mark(`code/didCreateSocketError/${re}`),ee.info(`Creating a socket (${oe}) returned an error after ${ce.elapsed()} ms.`),ee.error(ae),ne.reject(ae)}),ne.promise}function n(ee,X){const te=new p(X);return ee.then(Z=>{te.didTimeout||te.resolve(Z)},Z=>{te.didTimeout||te.reject(Z)}),te.promise}async function g(ee,X,te,Z){const se=J(ee,X);ee.logService.trace(`${se} 1/6. invoking socketFactory.connect().`);let re;try{re=await l(ee.logService,ee.remoteSocketFactoryService,ee.connectTo,(0,r.getRemoteServerRootPath)(ee),`reconnectionToken=${ee.reconnectionToken}&reconnection=${ee.reconnectionProtocol?"true":"false"}`,o(X),`renderer-${o(X)}-${ee.reconnectionToken}`,Z)}catch(ae){throw ee.logService.error(`${se} socketFactory.connect() failed or timed out. Error:`),ee.logService.error(ae),ae}ee.logService.trace(`${se} 2/6. socketFactory.connect() was successful.`);let oe,le;ee.reconnectionProtocol?(ee.reconnectionProtocol.beginAcceptReconnection(re,null),oe=ee.reconnectionProtocol,le=!1):(oe=new h.PersistentProtocol({socket:re}),le=!0),ee.logService.trace(`${se} 3/6. sending AuthRequest control message.`);const ne=await n(ee.signService.createNewMessage((0,S.generateUuid)()),Z),ce={type:"auth",auth:ee.connectionToken||"00000000000000000000",data:ne.data};oe.sendControl(y.VSBuffer.fromString(JSON.stringify(ce)));try{const ae=await c(oe,d(Z,u(1e4)));if(ae.type!=="sign"||typeof ae.data!="string"){const he=new Error("Unexpected handshake message");throw he.code="VSCODE_CONNECTION_ERROR",he}if(ee.logService.trace(`${se} 4/6. received SignRequest control message.`),!await n(ee.signService.validate(ne,ae.signedData),Z)){const he=new Error("Refused to connect to unsupported server");throw he.code="VSCODE_CONNECTION_ERROR",he}const de=await n(ee.signService.sign(ae.data),Z),ge={type:"connectionType",commit:ee.commit,signedData:de,desiredConnectionType:X};return te&&(ge.args=te),ee.logService.trace(`${se} 5/6. sending ConnectionTypeRequest control message.`),oe.sendControl(y.VSBuffer.fromString(JSON.stringify(ge))),{protocol:oe,ownsProtocol:le}}catch(ae){throw ae&&ae.code==="ETIMEDOUT"&&(ee.logService.error(`${se} the handshake timed out. Error:`),ee.logService.error(ae)),ae&&ae.code==="VSCODE_CONNECTION_ERROR"&&(ee.logService.error(`${se} received error control message when negotiating connection. Error:`),ee.logService.error(ae)),le&&H(oe),ae}}async function w(ee,X,te,Z){const se=Date.now(),re=J(ee,X),{protocol:oe,ownsProtocol:le}=await g(ee,X,te,Z),ne=new p(Z);return ne.registerDisposable(oe.onControlMessage(ce=>{const ae=JSON.parse(ce.toString()),ue=U(ae);ue?(ee.logService.error(`${re} received error control message when negotiating connection. Error:`),ee.logService.error(ue),le&&H(oe),ne.reject(ue)):(ee.reconnectionProtocol?.endAcceptReconnection(),ee.logService.trace(`${re} 6/6. handshake finished, connection is up and running after ${j(se)}!`),ne.resolve({protocol:oe,firstMessage:ae}))})),ne.promise}async function E(ee,X){const{protocol:te}=await w(ee,1,void 0,X);return{protocol:te}}async function C(ee,X,te){const{protocol:Z,firstMessage:se}=await w(ee,2,X,te),re=se&&se.debugPort;return{protocol:Z,debugPort:re}}async function I(ee,X,te){const Z=Date.now(),se=J(ee,3),{protocol:re}=await g(ee,3,X,te);return ee.logService.trace(`${se} 6/6. handshake finished, connection is up and running after ${j(Z)}!`),re}async function _(ee,X,te){const{connectTo:Z,connectionToken:se}=await ee.addressProvider.getAddress();return{commit:ee.commit,quality:ee.quality,connectTo:Z,connectionToken:se,reconnectionToken:X,reconnectionProtocol:te,remoteSocketFactoryService:ee.remoteSocketFactoryService,signService:ee.signService,logService:ee.logService}}async function A(ee,X,te){return L(ee,async Z=>{const{protocol:se}=await E(Z,b.CancellationToken.None);return new B(ee,X,te,Z.reconnectionToken,se)})}e.connectRemoteAgentManagement=A;async function k(ee,X){return L(ee,async te=>{const{protocol:Z,debugPort:se}=await C(te,X,b.CancellationToken.None);return new K(ee,X,te.reconnectionToken,Z,se)})}e.connectRemoteAgentExtensionHost=k;async function L(ee,X){for(let Z=1;;Z++)try{const se=(0,S.generateUuid)(),re=await _(ee,se,null);return await X(re)}catch(se){if(Z<5)ee.logService.error(`[remote-connection][attempt ${Z}] An error occurred in initial connection! Will retry... Error:`),ee.logService.error(se);else throw ee.logService.error(`[remote-connection][attempt ${Z}] An error occurred in initial connection! It will be treated as a permanent error. Error:`),ee.logService.error(se),z.triggerPermanentFailure(0,0,a.RemoteAuthorityResolverError.isHandled(se)),se}}async function R(ee,X,te){const Z=await _(ee,(0,S.generateUuid)(),null);return await I(Z,{host:X,port:te},b.CancellationToken.None)}e.connectRemoteAgentTunnel=R;function M(ee){return(0,t.createCancelablePromise)(X=>new Promise((te,Z)=>{const se=setTimeout(te,ee*1e3);X.onCancellationRequested(()=>{clearTimeout(se),te()})}))}var N;(function(ee){ee[ee.ConnectionLost=0]="ConnectionLost",ee[ee.ReconnectionWait=1]="ReconnectionWait",ee[ee.ReconnectionRunning=2]="ReconnectionRunning",ee[ee.ReconnectionPermanentFailure=3]="ReconnectionPermanentFailure",ee[ee.ConnectionGain=4]="ConnectionGain"})(N||(e.PersistentConnectionEventType=N={}));class P{constructor(X,te){this.reconnectionToken=X,this.millisSinceLastIncomingData=te,this.type=0}}e.ConnectionLostEvent=P;class x{constructor(X,te,Z,se){this.reconnectionToken=X,this.millisSinceLastIncomingData=te,this.durationSeconds=Z,this.cancellableTimer=se,this.type=1}skipWait(){this.cancellableTimer.cancel()}}e.ReconnectionWaitEvent=x;class F{constructor(X,te,Z){this.reconnectionToken=X,this.millisSinceLastIncomingData=te,this.attempt=Z,this.type=2}}e.ReconnectionRunningEvent=F;class V{constructor(X,te,Z){this.reconnectionToken=X,this.millisSinceLastIncomingData=te,this.attempt=Z,this.type=4}}e.ConnectionGainEvent=V;class W{constructor(X,te,Z,se){this.reconnectionToken=X,this.millisSinceLastIncomingData=te,this.attempt=Z,this.handled=se,this.type=3}}e.ReconnectionPermanentFailureEvent=W;class z extends f.Disposable{static triggerPermanentFailure(X,te,Z){this._permanentFailure=!0,this._permanentFailureMillisSinceLastIncomingData=X,this._permanentFailureAttempt=te,this._permanentFailureHandled=Z,this._instances.forEach(se=>se._gotoPermanentFailure(this._permanentFailureMillisSinceLastIncomingData,this._permanentFailureAttempt,this._permanentFailureHandled))}static debugTriggerReconnection(){this._instances.forEach(X=>X._beginReconnecting())}static debugPauseSocketWriting(){this._instances.forEach(X=>X._pauseSocketWriting())}static{this._permanentFailure=!1}static{this._permanentFailureMillisSinceLastIncomingData=0}static{this._permanentFailureAttempt=0}static{this._permanentFailureHandled=!1}static{this._instances=[]}get _isPermanentFailure(){return this._permanentFailure||z._permanentFailure}constructor(X,te,Z,se,re){super(),this._connectionType=X,this._options=te,this.reconnectionToken=Z,this.protocol=se,this._reconnectionFailureIsFatal=re,this._onDidStateChange=this._register(new T.Emitter),this.onDidStateChange=this._onDidStateChange.event,this._permanentFailure=!1,this._isReconnecting=!1,this._isDisposed=!1,this._onDidStateChange.fire(new V(this.reconnectionToken,0,0)),this._register(se.onSocketClose(oe=>{const le=ie(this._connectionType,this.reconnectionToken,!0);oe?oe.type===0?(this._options.logService.info(`${le} received socket close event (hadError: ${oe.hadError}).`),oe.error&&this._options.logService.error(oe.error)):(this._options.logService.info(`${le} received socket close event (wasClean: ${oe.wasClean}, code: ${oe.code}, reason: ${oe.reason}).`),oe.event&&this._options.logService.error(oe.event)):this._options.logService.info(`${le} received socket close event.`),this._beginReconnecting()})),this._register(se.onSocketTimeout(oe=>{const le=ie(this._connectionType,this.reconnectionToken,!0);this._options.logService.info(`${le} received socket timeout event (unacknowledgedMsgCount: ${oe.unacknowledgedMsgCount}, timeSinceOldestUnacknowledgedMsg: ${oe.timeSinceOldestUnacknowledgedMsg}, timeSinceLastReceivedSomeData: ${oe.timeSinceLastReceivedSomeData}).`),this._beginReconnecting()})),z._instances.push(this),this._register((0,f.toDisposable)(()=>{const oe=z._instances.indexOf(this);oe>=0&&z._instances.splice(oe,1)})),this._isPermanentFailure&&this._gotoPermanentFailure(z._permanentFailureMillisSinceLastIncomingData,z._permanentFailureAttempt,z._permanentFailureHandled)}dispose(){super.dispose(),this._isDisposed=!0}async _beginReconnecting(){if(!this._isReconnecting)try{this._isReconnecting=!0,await this._runReconnectingLoop()}finally{this._isReconnecting=!1}}async _runReconnectingLoop(){if(this._isPermanentFailure||this._isDisposed)return;const X=ie(this._connectionType,this.reconnectionToken,!0);this._options.logService.info(`${X} starting reconnecting loop. You can get more information with the trace log level.`),this._onDidStateChange.fire(new P(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData()));const te=[0,5,5,10,10,10,10,10,30];let Z=-1;do{Z++;const se=Z<te.length?te[Z]:te[te.length-1];try{if(se>0){const oe=M(se);this._onDidStateChange.fire(new x(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),se,oe)),this._options.logService.info(`${X} waiting for ${se} seconds before reconnecting...`);try{await oe}catch{}}if(this._isPermanentFailure){this._options.logService.error(`${X} permanent failure occurred while running the reconnecting loop.`);break}this._onDidStateChange.fire(new F(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),Z+1)),this._options.logService.info(`${X} resolving connection...`);const re=await _(this._options,this.reconnectionToken,this.protocol);this._options.logService.info(`${X} connecting to ${re.connectTo}...`),await this._reconnect(re,u(i)),this._options.logService.info(`${X} reconnected!`),this._onDidStateChange.fire(new V(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),Z+1));break}catch(re){if(re.code==="VSCODE_CONNECTION_ERROR"){this._options.logService.error(`${X} A permanent error occurred in the reconnecting loop! Will give up now! Error:`),this._options.logService.error(re),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),Z+1,!1);break}if(Z>360){this._options.logService.error(`${X} 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(re),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),Z+1,!1);break}if(a.RemoteAuthorityResolverError.isTemporarilyNotAvailable(re)){this._options.logService.info(`${X} A temporarily not available error occurred while trying to reconnect, will try again...`),this._options.logService.trace(re);continue}if((re.code==="ETIMEDOUT"||re.code==="ENETUNREACH"||re.code==="ECONNREFUSED"||re.code==="ECONNRESET")&&re.syscall==="connect"){this._options.logService.info(`${X} A network error occurred while trying to reconnect, will try again...`),this._options.logService.trace(re);continue}if((0,D.isCancellationError)(re)){this._options.logService.info(`${X} A promise cancelation error occurred while trying to reconnect, will try again...`),this._options.logService.trace(re);continue}if(re instanceof a.RemoteAuthorityResolverError){this._options.logService.error(`${X} A RemoteAuthorityResolverError occurred while trying to reconnect. Will give up now! Error:`),this._options.logService.error(re),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),Z+1,a.RemoteAuthorityResolverError.isHandled(re));break}this._options.logService.error(`${X} 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(re),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),Z+1,!1);break}}while(!this._isPermanentFailure&&!this._isDisposed)}_onReconnectionPermanentFailure(X,te,Z){this._reconnectionFailureIsFatal?z.triggerPermanentFailure(X,te,Z):this._gotoPermanentFailure(X,te,Z)}_gotoPermanentFailure(X,te,Z){this._onDidStateChange.fire(new W(this.reconnectionToken,X,te,Z)),H(this.protocol)}_pauseSocketWriting(){this.protocol.pauseSocketWriting()}}e.PersistentConnection=z;class B extends z{constructor(X,te,Z,se,re){super(1,X,se,re,!0),this.client=this._register(new h.Client(re,{remoteAuthority:te,clientId:Z},X.ipcLogger))}async _reconnect(X,te){await E(X,te)}}e.ManagementPersistentConnection=B;class K extends z{constructor(X,te,Z,se,re){super(2,X,Z,se,!1),this._startArguments=te,this.debugPort=re}async _reconnect(X,te){await C(X,this._startArguments,te)}}e.ExtensionHostPersistentConnection=K;function H(ee){try{ee.acceptDisconnect();const X=ee.getSocket();ee.dispose(),X.dispose()}catch(X){(0,D.onUnexpectedError)(X)}}function U(ee){if(ee&&ee.type==="error"){const X=new Error(`Connection error: ${ee.reason}`);return X.code="VSCODE_CONNECTION_ERROR",X}return null}function G(ee,X){for(;ee.length<X;)ee+=" ";return ee}function $(ee,X){return`[remote-connection][${G(o(ee),13)}][${X.substr(0,5)}\u2026]`}function ie(ee,X,te){return`${$(ee,X)}[${te?"reconnect":"initial"}]`}function J(ee,X){return`${ie(X,ee.reconnectionToken,!!ee.reconnectionProtocol)}[${ee.connectTo}]`}function j(ee){return`${Date.now()-ee} ms`}}),define(Q[592],Y([1,0,4,5]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteSocketFactoryService=e.IRemoteSocketFactoryService=void 0,e.IRemoteSocketFactoryService=(0,y.createDecorator)("remoteSocketFactoryService");class b{constructor(){this.factories={}}register(T,f){return this.factories[T]??=[],this.factories[T].push(f),(0,t.toDisposable)(()=>{const v=this.factories[T]?.indexOf(f);typeof v=="number"&&v>=0&&this.factories[T]?.splice(v,1)})}getSocketFactory(T){return(this.factories[T.type]||[]).find(v=>v.supports(T))}connect(T,f,v,m){const S=this.getSocketFactory(T);if(!S)throw new Error(`No socket factory found for ${T}`);return S.connect(T,f,v,m)}}e.RemoteSocketFactoryService=b}),define(Q[1181],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ipcSharedProcessTunnelChannelName=e.ISharedProcessTunnelService=void 0,e.ISharedProcessTunnelService=(0,t.createDecorator)("sharedProcessTunnelService"),e.ipcSharedProcessTunnelChannelName="sharedProcessTunnel"}),define(Q[3268],Y([1,0,62,4,197,22,10,25,327,3265]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronRemoteResourceLoader=void 0;let S=class extends y.Disposable{constructor(a,r,i){super(),this.windowId=a,this.fileService=i;const s={listen(o,u){throw new Error(`Event not found: ${u}`)},call:(o,u,d)=>{switch(u){case m.NODE_REMOTE_RESOURCE_IPC_METHOD_NAME:return this.doRequest(T.URI.revive(d[0]))}throw new Error(`Call not found: ${u}`)}};r.registerChannel(m.NODE_REMOTE_RESOURCE_CHANNEL_NAME,s)}async doRequest(a){let r;try{const s=new URLSearchParams(a.query),o=a.with({scheme:s.get("scheme"),authority:s.get("authority"),query:""});r=await this.fileService.readFile(o)}catch(s){const o=(0,t.encodeBase64)(t.VSBuffer.fromString(s.message));return s instanceof f.FileOperationError&&s.fileOperationResult===1?{statusCode:404,body:o}:{statusCode:500,body:o}}const i=a.path&&(0,b.getMediaOrTextMime)(a.path);return{statusCode:200,body:(0,t.encodeBase64)(r.value),mimeType:i}}getResourceUriProvider(){return a=>a.with({scheme:D.Schemas.vscodeManagedRemoteResource,authority:`window:${this.windowId}`,query:new URLSearchParams({authority:a.authority,scheme:a.scheme}).toString()})}};e.ElectronRemoteResourceLoader=S,e.ElectronRemoteResourceLoader=S=fe([O(1,v.IMainProcessService),O(2,f.IFileService)],S)}),define(Q[3269],Y([1,0,14,15,6,4,22,52,330]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteAuthorityResolverService=void 0;let m=class extends D.Disposable{constructor(h,a){super(),this.remoteResourceLoader=a,this._onDidChangeConnectionData=this._register(new b.Emitter),this.onDidChangeConnectionData=this._onDidChangeConnectionData.event,this._resolveAuthorityRequests=new Map,this._connectionTokens=new Map,this._canonicalURIRequests=new Map,this._canonicalURIProvider=null,T.RemoteAuthorities.setServerRootPath((0,v.getRemoteServerRootPath)(h))}resolveAuthority(h){return this._resolveAuthorityRequests.has(h)||this._resolveAuthorityRequests.set(h,new t.DeferredPromise),this._resolveAuthorityRequests.get(h).p}async getCanonicalURI(h){const a=h.toString(),r=this._canonicalURIRequests.get(a);if(r)return r.result.p;const i=new t.DeferredPromise;return this._canonicalURIProvider?.(h).then(s=>i.complete(s),s=>i.error(s)),this._canonicalURIRequests.set(a,{input:h,result:i}),i.p}getConnectionData(h){if(!this._resolveAuthorityRequests.has(h))return null;const a=this._resolveAuthorityRequests.get(h);if(!a.isResolved)return null;const r=this._connectionTokens.get(h);return{connectTo:a.value.authority.connectTo,connectionToken:r}}_clearResolvedAuthority(h){this._resolveAuthorityRequests.has(h)&&(this._resolveAuthorityRequests.get(h).cancel(),this._resolveAuthorityRequests.delete(h))}_setResolvedAuthority(h,a){if(this._resolveAuthorityRequests.has(h.authority)){const r=this._resolveAuthorityRequests.get(h.authority);h.connectTo.type===0?T.RemoteAuthorities.set(h.authority,h.connectTo.host,h.connectTo.port):T.RemoteAuthorities.setDelegate(this.remoteResourceLoader.getResourceUriProvider()),h.connectionToken&&T.RemoteAuthorities.setConnectionToken(h.authority,h.connectionToken),r.complete({authority:h,options:a}),this._onDidChangeConnectionData.fire()}}_setResolvedAuthorityError(h,a){this._resolveAuthorityRequests.has(h)&&this._resolveAuthorityRequests.get(h).error(y.ErrorNoTelemetry.fromError(a))}_setAuthorityConnectionToken(h,a){this._connectionTokens.set(h,a),T.RemoteAuthorities.setConnectionToken(h,a),this._onDidChangeConnectionData.fire()}_setCanonicalURIProvider(h){this._canonicalURIProvider=h,this._canonicalURIRequests.forEach(({result:a,input:r})=>{this._canonicalURIProvider(r).then(i=>a.complete(i),i=>a.error(i))})}};e.RemoteAuthorityResolverService=m,e.RemoteAuthorityResolverService=m=fe([O(0,f.IProductService)],m)}),define(Q[3270],Y([1,0,153,1181]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSharedProcessRemoteService)(y.ISharedProcessTunnelService,y.ipcSharedProcessTunnelChannelName)}),define(Q[1182],Y([1,0,5,2481]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LOGGER_NAME=e.LOG_ID=e.CONFIGURATION_KEY_PREVENT_SLEEP=e.CONFIGURATION_KEY_HOST_NAME=e.CONFIGURATION_KEY_PREFIX=e.TunnelStates=e.INACTIVE_TUNNEL_MODE=e.IRemoteTunnelService=void 0,e.IRemoteTunnelService=(0,t.createDecorator)("IRemoteTunnelService"),e.INACTIVE_TUNNEL_MODE={active:!1};var b;(function(D){D.disconnected=T=>({type:"disconnected",onTokenFailed:T}),D.connected=(T,f)=>({type:"connected",info:T,serviceInstallFailed:f}),D.connecting=T=>({type:"connecting",progress:T}),D.uninitialized={type:"uninitialized"}})(b||(e.TunnelStates=b={})),e.CONFIGURATION_KEY_PREFIX="remote.tunnels.access",e.CONFIGURATION_KEY_HOST_NAME=e.CONFIGURATION_KEY_PREFIX+".hostNameOverride",e.CONFIGURATION_KEY_PREVENT_SLEEP=e.CONFIGURATION_KEY_PREFIX+".preventSleep",e.LOG_ID="remoteTunnelService",e.LOGGER_NAME=(0,y.localize)(0,null)}),define(Q[3271],Y([1,0,153,1182]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSharedProcessRemoteService)(y.IRemoteTunnelService,"remoteTunnel")}),define(Q[288],Y([1,0,62,15,4,2482,56,5,11,16]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateProxyConfigurationsScope=e.asJson=e.asTextOrError=e.asText=e.isSuccess=e.AbstractRequestService=e.IRequestService=void 0,e.IRequestService=(0,f.createDecorator)("requestService");class S{constructor(l){this.original=l}toJSON(){if(!this.headers){const l=Object.create(null);for(const n in this.original)n.toLowerCase()==="authorization"||n.toLowerCase()==="proxy-authorization"?l[n]="*****":l[n]=this.original[n];this.headers=l}return this.headers}}class h extends b.Disposable{constructor(l){super(),this.counter=0,this.logger=l.createLogger("network",{name:(0,D.localize)(0,null),when:v.CONTEXT_LOG_LEVEL.isEqualTo((0,v.LogLevelToString)(v.LogLevel.Trace)).serialize()})}async logAndRequest(l,n,g){const w=`${l} #${++this.counter}: ${n.url}`;this.logger.trace(`${w} - begin`,n.type,new S(n.headers??{}));try{const E=await g();return this.logger.trace(`${w} - end`,n.type,E.res.statusCode,E.res.headers),E}catch(E){throw this.logger.error(`${w} - error`,n.type,(0,y.getErrorMessage)(E)),E}}}e.AbstractRequestService=h;function a(c){return c.res.statusCode&&c.res.statusCode>=200&&c.res.statusCode<300||c.res.statusCode===1223}e.isSuccess=a;function r(c){return c.res.statusCode===204}async function i(c){return r(c)?null:(await(0,t.streamToBuffer)(c.stream)).toString()}e.asText=i;async function s(c){if(!a(c))throw new Error("Server returned "+c.res.statusCode);return i(c)}e.asTextOrError=s;async function o(c){if(!a(c))throw new Error("Server returned "+c.res.statusCode);if(r(c))return null;const n=(await(0,t.streamToBuffer)(c.stream)).toString();try{return JSON.parse(n)}catch(g){throw g.message+=`: `+n,g}}e.asJson=o;function u(c){p(c)}e.updateProxyConfigurationsScope=u;let d;function p(c){const l=m.Registry.as(T.Extensions.Configuration),n=d;d={id:"http",order:15,title:(0,D.localize)(1,null),type:"object",scope:c,properties:{"http.proxy":{type:"string",pattern:"^(https?|socks|socks4a?|socks5h?)://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$",markdownDescription:(0,D.localize)(2,null),restricted:!0},"http.proxyStrictSSL":{type:"boolean",default:!0,description:(0,D.localize)(3,null),restricted:!0},"http.proxyKerberosServicePrincipal":{type:"string",markdownDescription:(0,D.localize)(4,null),restricted:!0},"http.proxyAuthorization":{type:["null","string"],default:null,markdownDescription:(0,D.localize)(5,null),restricted:!0},"http.proxySupport":{type:"string",enum:["off","on","fallback","override"],enumDescriptions:[(0,D.localize)(6,null),(0,D.localize)(7,null),(0,D.localize)(8,null),(0,D.localize)(9,null)],default:"override",description:(0,D.localize)(10,null),restricted:!0},"http.systemCertificates":{type:"boolean",default:!0,description:(0,D.localize)(11,null),restricted:!0}}},l.updateConfigurations({add:[d],remove:n?[n]:[]})}p(1)}),define(Q[3272],Y([1,0,31,22,25,288]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DownloadService=void 0;let T=class{constructor(v,m){this.requestService=v,this.fileService=m}async download(v,m,S=t.CancellationToken.None){if(v.scheme===y.Schemas.file||v.scheme===y.Schemas.vscodeRemote){await this.fileService.copy(v,m);return}const h={type:"GET",url:v.toString(!0)},a=await this.requestService.request(h,S);if(a.res.statusCode===200)await this.fileService.writeFile(m,a.stream);else{const r=await(0,D.asTextOrError)(a);throw new Error(`Expected 200, got back ${a.res.statusCode} instead. ${r}`)}}};e.DownloadService=T,e.DownloadService=T=fe([O(0,D.IRequestService),O(1,b.IFileService)],T)}),define(Q[3273],Y([1,0,1545,9,11,288]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestService=void 0;let T=class extends D.AbstractRequestService{constructor(v,m){super(m),this.configurationService=v}async request(v,m){return v.proxyAuthorization||(v.proxyAuthorization=this.configurationService.getValue("http.proxyAuthorization")),this.logAndRequest("browser",v,()=>(0,t.request)(v,m))}async resolveProxy(v){}};e.RequestService=T,e.RequestService=T=fe([O(0,y.IConfigurationService),O(1,b.ILoggerService)],T)}),define(Q[593],Y([1,0,32,37,63,1754]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIcon=void 0;var D;(function(T){function f(v){switch(v){case b.default.Ignore:return"severity-ignore "+y.ThemeIcon.asClassName(t.Codicon.info);case b.default.Info:return y.ThemeIcon.asClassName(t.Codicon.info);case b.default.Warning:return y.ThemeIcon.asClassName(t.Codicon.warning);case b.default.Error:return y.ThemeIcon.asClassName(t.Codicon.error);default:return""}}T.className=f})(D||(e.SeverityIcon=D={}))}),define(Q[3274],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedProcessRawConnection=e.SharedProcessChannelConnection=e.SharedProcessLifecycle=void 0,e.SharedProcessLifecycle={exit:"vscode:electron-main->shared-process=exit",ipcReady:"vscode:shared-process->electron-main=ipc-ready",initDone:"vscode:shared-process->electron-main=init-done"},e.SharedProcessChannelConnection={request:"vscode:createSharedProcessChannelConnection",response:"vscode:createSharedProcessChannelConnectionResult"},e.SharedProcessRawConnection={request:"vscode:createSharedProcessRawConnection",response:"vscode:createSharedProcessRawConnectionResult"}}),define(Q[702],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISignService=e.SIGN_SERVICE_ID=void 0,e.SIGN_SERVICE_ID="signService",e.ISignService=(0,t.createDecorator)(e.SIGN_SERVICE_ID)}),define(Q[1183],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageClient=e.WorkspaceStorageDatabaseClient=e.ProfileStorageDatabaseClient=e.ApplicationStorageDatabaseClient=void 0;class b extends y.Disposable{constructor(h,a,r){super(),this.channel=h,this.profile=a,this.workspace=r}async getItems(){const h={profile:this.profile,workspace:this.workspace},a=await this.channel.call("getItems",h);return new Map(a)}updateItems(h){const a={profile:this.profile,workspace:this.workspace};return h.insert&&(a.insert=Array.from(h.insert.entries())),h.delete&&(a.delete=Array.from(h.delete.values())),this.channel.call("updateItems",a)}}class D extends b{constructor(h,a){super(h,a,void 0),this._onDidChangeItemsExternal=this._register(new t.Emitter),this.onDidChangeItemsExternal=this._onDidChangeItemsExternal.event,this.registerListeners()}registerListeners(){this._register(this.channel.listen("onDidChangeStorage",{profile:this.profile})(h=>this.onDidChangeStorage(h)))}onDidChangeStorage(h){(Array.isArray(h.changed)||Array.isArray(h.deleted))&&this._onDidChangeItemsExternal.fire({changed:h.changed?new Map(h.changed):void 0,deleted:h.deleted?new Set(h.deleted):void 0})}}class T extends D{constructor(h){super(h,void 0)}async close(){this.dispose()}}e.ApplicationStorageDatabaseClient=T;class f extends D{constructor(h,a){super(h,a)}async close(){this.dispose()}}e.ProfileStorageDatabaseClient=f;class v extends b{constructor(h,a){super(h,void 0,a),this.onDidChangeItemsExternal=t.Event.None}async close(){this.dispose()}}e.WorkspaceStorageDatabaseClient=v;class m{constructor(h){this.channel=h}isUsed(h){const a={payload:h,profile:void 0,workspace:void 0};return this.channel.call("isUsed",a)}}e.StorageClient=m}),define(Q[1184],Y([1,0,18,261,59,286]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyMicrosoftInternalDomain=e.resolveCommonProperties=void 0;const T=D.default;function f(S){if(t.platform===2&&/^penguin(\.|$)/i.test(S))return"chromebook"}function v(S,h,a,r,i,s,o,u){const d=Object.create(null);d["common.machineId"]=s,d.sessionID=(0,b.generateUuid)()+Date.now(),d.commitHash=r,d.version=i,d["common.platformVersion"]=(S||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),d["common.platform"]=(0,t.PlatformToString)(t.platform),d["common.nodePlatform"]=y.platform,d["common.nodeArch"]=a,d["common.product"]=T.nameShort||"desktop",d["common.application.name"]=T.nameLong,d.quality=T.quality||"dev",o&&(d["common.msftInternal"]=o);let p=0;const c=Date.now();Object.defineProperties(d,{timestamp:{get:()=>new Date,enumerable:!0},"common.timesincesessionstart":{get:()=>Date.now()-c,enumerable:!0},"common.sequence":{get:()=>p++,enumerable:!0}}),t.isLinuxSnap&&(d["common.snap"]="true");const l=f(h);return l&&(d["common.platformDetail"]=l),d}e.resolveCommonProperties=v;function m(S){const h=y.env.USERDNSDOMAIN;if(!h)return!1;const a=h.toLowerCase();return S.some(r=>a===r)}e.verifyMicrosoftInternalDomain=m}),define(Q[3275],Y([1,0,20,15,4,42,25]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorEvent=void 0;var f;(function(m){function S(h,a){return h.callstack<a.callstack?-1:h.callstack>a.callstack?1:0}m.compare=S})(f||(e.ErrorEvent=f={}));class v{static{this.ERROR_FLUSH_TIMEOUT=5*1e3}constructor(S,h=v.ERROR_FLUSH_TIMEOUT){this._flushHandle=-1,this._buffer=[],this._disposables=new b.DisposableStore,this._flushDelay=h;const a=y.errorHandler.addListener(r=>this._onErrorEvent(r));this._disposables.add((0,b.toDisposable)(a)),this.installErrorListeners()}dispose(){clearTimeout(this._flushHandle),this._flushBuffer(),this._disposables.dispose()}installErrorListeners(){}_onErrorEvent(S){if(!S||S.code||(S.detail&&S.detail.stack&&(S=S.detail),y.ErrorNoTelemetry.isErrorNoTelemetry(S)||S instanceof T.FileOperationError||typeof S?.message=="string"&&S.message.includes("Unable to read file")))return;const h=Array.isArray(S.stack)?S.stack.join(` `):S.stack,a=S.message?S.message:(0,D.safeStringify)(S);h&&this._enqueue({msg:a,callstack:h})}_enqueue(S){const h=(0,t.binarySearch)(this._buffer,S,f.compare);h<0?(S.count=1,this._buffer.splice(~h,0,S)):(this._buffer[h].count||(this._buffer[h].count=0),this._buffer[h].count+=1),this._flushHandle===-1&&(this._flushHandle=setTimeout(()=>{this._flushBuffer(),this._flushHandle=-1},this._flushDelay))}_flushBuffer(){this._buffer.length=0}}e.default=v}),define(Q[3276],Y([1,0,15,4,18,3275]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class T extends D.default{installErrorListeners(){let v;const m=this;typeof b.globals.onerror=="function"&&(v=b.globals.onerror),b.globals.onerror=function(S,h,a,r,i){m._onUncaughtError(S,h,a,r,i),v?.apply(this,arguments)},this._disposables.add((0,y.toDisposable)(()=>{v&&(b.globals.onerror=v)}))}_onUncaughtError(v,m,S,h,a){const r={callstack:v,msg:v,file:m,line:S,column:h};if(a){if(t.ErrorNoTelemetry.isErrorNoTelemetry(a))return;const{name:i,message:s,stack:o}=a;r.uncaught_error_name=i,s&&(r.uncaught_error_msg=s),o&&(r.callstack=Array.isArray(a.stack)?a.stack=a.stack.join(` `):a.stack)}this._enqueue(r)}}e.default=T}),define(Q[30],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryConfiguration=e.TelemetryLevel=e.TELEMETRY_OLD_SETTING_ID=e.TELEMETRY_CRASH_REPORTER_SETTING_ID=e.TELEMETRY_SETTING_ID=e.TELEMETRY_SECTION_ID=e.machineIdKey=e.lastSessionDateStorageKey=e.firstSessionDateStorageKey=e.currentSessionDateStorageKey=e.ICustomEndpointTelemetryService=e.ITelemetryService=void 0,e.ITelemetryService=(0,t.createDecorator)("telemetryService"),e.ICustomEndpointTelemetryService=(0,t.createDecorator)("customEndpointTelemetryService"),e.currentSessionDateStorageKey="telemetry.currentSessionDate",e.firstSessionDateStorageKey="telemetry.firstSessionDate",e.lastSessionDateStorageKey="telemetry.lastSessionDate",e.machineIdKey="telemetry.machineId",e.TELEMETRY_SECTION_ID="telemetry",e.TELEMETRY_SETTING_ID="telemetry.telemetryLevel",e.TELEMETRY_CRASH_REPORTER_SETTING_ID="telemetry.enableCrashReporter",e.TELEMETRY_OLD_SETTING_ID="telemetry.enableTelemetry";var y;(function(D){D[D.NONE=0]="NONE",D[D.CRASH=1]="CRASH",D[D.ERROR=2]="ERROR",D[D.USAGE=3]="USAGE"})(y||(e.TelemetryLevel=y={}));var b;(function(D){D.OFF="off",D.CRASH="crash",D.ERROR="error",D.ON="all"})(b||(e.TelemetryConfiguration=b={}))}),define(Q[3277],Y([1,0,11,30]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullAdsTelemetryService=e.AdsTelemetryService=void 0;class b{constructor(m,S,h,a,r){this._telemetryService=m,this._logService=S,this._eventName=h,this._properties=a,this._measurements=r,this._properties=a||{},this._measurements=r||{}}send(){try{this._telemetryService.publicLog(this._eventName,{properties:this._properties,measurements:this._measurements})}catch(m){if(this._logService){const S=m instanceof Error?m.message:m;this._logService.warn(`Error sending ${this._eventName} event ${S}`)}}}withAdditionalProperties(m){return Object.assign(this._properties,m),this}withAdditionalMeasurements(m){return Object.assign(this._measurements,m),this}withConnectionInfo(m){return Object.assign(this._properties,{authenticationType:m?.authenticationType,providerName:m?.providerName}),this}withServerInfo(m){return Object.assign(this._properties,{connectionType:m?.isCloud!==void 0?m.isCloud?"Azure":"Standalone":"",serverVersion:m?.serverVersion??"",serverEdition:m?.serverEdition??"",serverEngineEdition:m?.engineEditionId??""}),this}}class D{constructor(){}send(){}withAdditionalProperties(m){return this}withAdditionalMeasurements(m){return this}withConnectionInfo(m){return this}withServerInfo(m){return this}}let T=class{constructor(m,S){this.telemetryService=m,this.logService=S}createViewEvent(m){return new b(this.telemetryService,this.logService,"view",{view:m})}sendViewEvent(m){this.createViewEvent(m).send()}createActionEvent(m,S,h="",a="",r){const i=r?{durationInMs:r}:{};return new b(this.telemetryService,this.logService,"action",{view:m,action:S,target:h,source:a},i)}sendActionEvent(m,S,h="",a="",r){this.createActionEvent(m,S,h,a,r).send()}createMetricsEvent(m,S=""){return new b(this.telemetryService,this.logService,"metrics",{groupName:S},m)}sendMetricsEvent(m,S=""){this.createMetricsEvent(m,S).send()}createErrorEvent(m,S,h="",a=""){return new b(this.telemetryService,this.logService,"error",{view:m,name:S,errorCode:h,errorType:a})}sendErrorEvent(m,S,h="",a=""){this.createErrorEvent(m,S,h,a).send()}createTelemetryEvent(m,S,h){return new b(this.telemetryService,this.logService,m,S,h)}sendTelemetryEvent(m,S,h){this.createTelemetryEvent(m,S,h).send()}};e.AdsTelemetryService=T,e.AdsTelemetryService=T=fe([O(0,y.ITelemetryService),O(1,t.ILogService)],T);class f{createViewEvent(m){return new D}sendViewEvent(m){}createActionEvent(m,S,h,a,r){return new D}sendActionEvent(m,S,h,a,r){}createMetricsEvent(m,S){return new D}sendMetricsEvent(m,S){}createErrorEvent(m,S,h,a){return new D}sendErrorEvent(m,S,h,a){}createTelemetryEvent(m,S,h){return new D}sendTelemetryEvent(m,S,h){}}e.NullAdsTelemetryService=f}),define(Q[48],Y([1,0,2330,10,79,51,57,75,13,28,8,5,113,16,30,17,11]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectAllCommand=e.RedoCommand=e.UndoCommand=e.EditorExtensionsRegistry=e.registerDiffEditorContribution=e.registerEditorContribution=e.registerInstantiatedEditorAction=e.registerMultiEditorAction=e.registerEditorAction=e.registerEditorCommand=e.registerModelAndPositionCommand=e.EditorAction2=e.MultiEditorAction=e.EditorAction=e.EditorCommand=e.ProxyCommand=e.MultiCommand=e.Command=e.EditorContributionInstantiation=void 0;var u;(function(x){x[x.Eager=0]="Eager",x[x.AfterFirstRender=1]="AfterFirstRender",x[x.BeforeFirstInteraction=2]="BeforeFirstInteraction",x[x.Eventually=3]="Eventually",x[x.Lazy=4]="Lazy"})(u||(e.EditorContributionInstantiation=u={}));class d{constructor(F){this.id=F.id,this.precondition=F.precondition,this._kbOpts=F.kbOpts,this._menuOpts=F.menuOpts,this._description=F.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const F=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const V of F){let W=V.kbExpr;this.precondition&&(W?W=S.ContextKeyExpr.and(W,this.precondition):W=this.precondition);const z={id:this.id,weight:V.weight,args:V.args,when:W,primary:V.primary,secondary:V.secondary,win:V.win,linux:V.linux,mac:V.mac};a.KeybindingsRegistry.registerKeybindingRule(z)}}m.CommandsRegistry.registerCommand({id:this.id,handler:(F,V)=>this.runCommand(F,V),description:this._description})}_registerMenuItem(F){v.MenuRegistry.appendMenuItem(F.menuId,{group:F.group,command:{id:this.id,title:F.title,icon:F.icon,precondition:this.precondition},when:F.when,order:F.order})}}e.Command=d;class p extends d{constructor(){super(...arguments),this._implementations=[]}addImplementation(F,V,W,z){return this._implementations.push({priority:F,name:V,implementation:W,when:z}),this._implementations.sort((B,K)=>K.priority-B.priority),{dispose:()=>{for(let B=0;B<this._implementations.length;B++)if(this._implementations[B].implementation===W){this._implementations.splice(B,1);return}}}}runCommand(F,V){const W=F.get(o.ILogService),z=F.get(S.IContextKeyService);W.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const B of this._implementations){if(B.when){const H=z.getContext(document.activeElement);if(!B.when.evaluate(H))continue}const K=B.implementation(F,V);if(K)return W.trace(`Command '${this.id}' was handled by '${B.name}'.`),typeof K=="boolean"?void 0:K}W.trace(`The Command '${this.id}' was not handled by any implementation.`)}}e.MultiCommand=p;class c extends d{constructor(F,V){super(V),this.command=F}runCommand(F,V){return this.command.runCommand(F,V)}}e.ProxyCommand=c;class l extends d{static bindToContribution(F){return class extends l{constructor(W){super(W),this._callback=W.handler}runEditorCommand(W,z,B){const K=F(z);K&&this._callback(K,B)}}}static runEditorCommand(F,V,W,z){const B=F.get(b.ICodeEditorService),K=B.getFocusedCodeEditor()||B.getActiveCodeEditor();if(K)return K.invokeWithinContext(H=>{if(H.get(S.IContextKeyService).contextMatchesRules(W??void 0))return z(H,K,V)})}runCommand(F,V){return l.runEditorCommand(F,V,this.precondition,(W,z,B)=>this.runEditorCommand(W,z,B))}}e.EditorCommand=l;class n extends l{static convertOptions(F){let V;Array.isArray(F.menuOpts)?V=F.menuOpts:F.menuOpts?V=[F.menuOpts]:V=[];function W(z){return z.menuId||(z.menuId=v.MenuId.EditorContext),z.title||(z.title=F.label),z.when=S.ContextKeyExpr.and(F.precondition,z.when),z}return Array.isArray(F.contextMenuOpts)?V.push(...F.contextMenuOpts.map(W)):F.contextMenuOpts&&V.push(W(F.contextMenuOpts)),F.menuOpts=V,F}constructor(F){super(n.convertOptions(F)),this.label=F.label,this.alias=F.alias}runEditorCommand(F,V,W){return this.reportTelemetry(F,V),this.run(F,V,W||{})}reportTelemetry(F,V){F.get(i.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}e.EditorAction=n;class g extends n{constructor(){super(...arguments),this._implementations=[]}addImplementation(F,V){return this._implementations.push([F,V]),this._implementations.sort((W,z)=>z[0]-W[0]),{dispose:()=>{for(let W=0;W<this._implementations.length;W++)if(this._implementations[W][1]===V){this._implementations.splice(W,1);return}}}}run(F,V,W){for(const z of this._implementations){const B=z[1](F,V,W);if(B)return typeof B=="boolean"?void 0:B}}}e.MultiEditorAction=g;class w extends v.Action2{run(F,...V){const W=F.get(b.ICodeEditorService),z=W.getFocusedCodeEditor()||W.getActiveCodeEditor();if(z)return z.invokeWithinContext(B=>{const K=B.get(S.IContextKeyService),H=B.get(o.ILogService);if(!K.contextMatchesRules(this.desc.precondition??void 0)){H.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,this.desc.precondition?.serialize());return}return this.runEditorCommand(B,z,...V)})}}e.EditorAction2=w;function E(x,F){m.CommandsRegistry.registerCommand(x,function(V,...W){const z=V.get(h.IInstantiationService),[B,K]=W;(0,s.assertType)(y.URI.isUri(B)),(0,s.assertType)(D.Position.isIPosition(K));const H=V.get(T.IModelService).getModel(B);if(H){const U=D.Position.lift(K);return z.invokeFunction(F,H,U,...W.slice(2))}return V.get(f.ITextModelService).createModelReference(B).then(U=>new Promise((G,$)=>{try{const ie=z.invokeFunction(F,U.object.textEditorModel,D.Position.lift(K),W.slice(2));G(ie)}catch(ie){$(ie)}}).finally(()=>{U.dispose()}))})}e.registerModelAndPositionCommand=E;function C(x){return N.INSTANCE.registerEditorCommand(x),x}e.registerEditorCommand=C;function I(x){const F=new x;return N.INSTANCE.registerEditorAction(F),F}e.registerEditorAction=I;function _(x){return N.INSTANCE.registerEditorAction(x),x}e.registerMultiEditorAction=_;function A(x){N.INSTANCE.registerEditorAction(x)}e.registerInstantiatedEditorAction=A;function k(x,F,V){N.INSTANCE.registerEditorContribution(x,F,V)}e.registerEditorContribution=k;function L(x,F){N.INSTANCE.registerDiffEditorContribution(x,F)}e.registerDiffEditorContribution=L;var R;(function(x){function F(K){return N.INSTANCE.getEditorCommand(K)}x.getEditorCommand=F;function V(){return N.INSTANCE.getEditorActions()}x.getEditorActions=V;function W(){return N.INSTANCE.getEditorContributions()}x.getEditorContributions=W;function z(K){return N.INSTANCE.getEditorContributions().filter(H=>K.indexOf(H.id)>=0)}x.getSomeEditorContributions=z;function B(){return N.INSTANCE.getDiffEditorContributions()}x.getDiffEditorContributions=B})(R||(e.EditorExtensionsRegistry=R={}));const M={EditorCommonContributions:"editor.contributions"};class N{static{this.INSTANCE=new N}constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(F,V,W){this.editorContributions.push({id:F,ctor:V,instantiation:W})}getEditorContributions(){return this.editorContributions.slice(0)}registerDiffEditorContribution(F,V){this.diffEditorContributions.push({id:F,ctor:V})}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(F){F.register(),this.editorActions.push(F)}getEditorActions(){return this.editorActions}registerEditorCommand(F){F.register(),this.editorCommands[F.id]=F}getEditorCommand(F){return this.editorCommands[F]||null}}r.Registry.add(M.EditorCommonContributions,N.INSTANCE);function P(x){return x.register(),x}e.UndoCommand=P(new p({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:v.MenuId.MenubarEditMenu,group:"1_do",title:t.localize(0,null),order:1},{menuId:v.MenuId.CommandPalette,group:"",title:t.localize(1,null),order:1}]})),P(new c(e.UndoCommand,{id:"default:undo",precondition:void 0})),e.RedoCommand=P(new p({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:v.MenuId.MenubarEditMenu,group:"1_do",title:t.localize(2,null),order:2},{menuId:v.MenuId.CommandPalette,group:"",title:t.localize(3,null),order:1}]})),P(new c(e.RedoCommand,{id:"default:redo",precondition:void 0})),e.SelectAllCommand=P(new p({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:v.MenuId.MenubarEditMenu,group:"4_find_global",title:t.localize(4,null),order:1},{menuId:v.MenuId.CommandPalette,group:"",title:t.localize(5,null),order:1}]}))}),define(Q[511],Y([1,0,2329,97,17,87,48,79,1869,301,796,797,878,51,27,73,8,113]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoreEditingCommands=e.CoreNavigationCommands=e.NavigationCommandRevealType=e.RevealLine_=e.EditorScroll_=e.CoreEditorCommand=void 0;const d=0;class p extends T.EditorCommand{runEditorCommand(R,M,N){const P=M._getViewModel();P&&this.runCoreEditorCommand(P,N||{})}}e.CoreEditorCommand=p;var c;(function(L){const R=function(x){if(!b.isObject(x))return!1;const F=x;return!(!b.isString(F.to)||!b.isUndefined(F.by)&&!b.isString(F.by)||!b.isUndefined(F.value)&&!b.isNumber(F.value)||!b.isUndefined(F.revealCursor)&&!b.isBoolean(F.revealCursor))};L.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:R,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},L.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},L.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"};function M(x){let F;switch(x.to){case L.RawDirection.Up:F=1;break;case L.RawDirection.Right:F=2;break;case L.RawDirection.Down:F=3;break;case L.RawDirection.Left:F=4;break;default:return null}let V;switch(x.by){case L.RawUnit.Line:V=1;break;case L.RawUnit.WrappedLine:V=2;break;case L.RawUnit.Page:V=3;break;case L.RawUnit.HalfPage:V=4;break;case L.RawUnit.Editor:V=5;break;case L.RawUnit.Column:V=6;break;default:V=2}const W=Math.floor(x.value||1),z=!!x.revealCursor;return{direction:F,unit:V,value:W,revealCursor:z,select:!!x.select}}L.parse=M;let N;(function(x){x[x.Up=1]="Up",x[x.Right=2]="Right",x[x.Down=3]="Down",x[x.Left=4]="Left"})(N=L.Direction||(L.Direction={}));let P;(function(x){x[x.Line=1]="Line",x[x.WrappedLine=2]="WrappedLine",x[x.Page=3]="Page",x[x.HalfPage=4]="HalfPage",x[x.Editor=5]="Editor",x[x.Column=6]="Column"})(P=L.Unit||(L.Unit={}))})(c||(e.EditorScroll_=c={}));var l;(function(L){const R=function(M){if(!b.isObject(M))return!1;const N=M;return!(!b.isNumber(N.lineNumber)&&!b.isString(N.lineNumber)||!b.isUndefined(N.at)&&!b.isString(N.at))};L.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:R,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},L.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(l||(e.RevealLine_=l={}));class n{constructor(R){R.addImplementation(1e4,"code-editor",(M,N)=>{const P=M.get(f.ICodeEditorService).getFocusedCodeEditor();return P&&P.hasTextFocus()?this._runEditorCommand(M,P,N):!1}),R.addImplementation(1e3,"generic-dom-input-textarea",(M,N)=>{const P=document.activeElement;return P&&["input","textarea"].indexOf(P.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),R.addImplementation(0,"generic-dom",(M,N)=>{const P=M.get(f.ICodeEditorService).getActiveCodeEditor();return P?(P.focus(),this._runEditorCommand(M,P,N)):!1})}_runEditorCommand(R,M,N){const P=this.runEditorCommand(R,M,N);return P||!0}}var g;(function(L){L[L.Regular=0]="Regular",L[L.Minimal=1]="Minimal",L[L.None=2]="None"})(g||(e.NavigationCommandRevealType=g={}));var w;(function(L){class R extends p{constructor(ee){super(ee),this._inSelectionMode=ee.inSelectionMode}runCoreEditorCommand(ee,X){if(!X.position)return;ee.model.pushStackElement(),ee.setCursorStates(X.source,3,[h.CursorMoveCommands.moveTo(ee,ee.getPrimaryCursorState(),this._inSelectionMode,X.position,X.viewPosition)])&&X.revealType!==2&&ee.revealPrimaryCursor(X.source,!0,!0)}}L.MoveTo=(0,T.registerEditorCommand)(new R({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),L.MoveToSelect=(0,T.registerEditorCommand)(new R({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class M extends p{runCoreEditorCommand(ee,X){ee.model.pushStackElement();const te=this._getColumnSelectResult(ee,ee.getPrimaryCursorState(),ee.getCursorColumnSelectData(),X);te!==null&&(ee.setCursorStates(X.source,3,te.viewStates.map(Z=>m.CursorState.fromViewState(Z))),ee.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:te.fromLineNumber,fromViewVisualColumn:te.fromVisualColumn,toViewLineNumber:te.toLineNumber,toViewVisualColumn:te.toVisualColumn}),te.reversed?ee.revealTopMostCursor(X.source):ee.revealBottomMostCursor(X.source))}}L.ColumnSelect=(0,T.registerEditorCommand)(new class extends M{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(j,ee,X,te){if(typeof te.position>"u"||typeof te.viewPosition>"u"||typeof te.mouseColumn>"u")return null;const Z=j.model.validatePosition(te.position),se=j.coordinatesConverter.validateViewPosition(new r.Position(te.viewPosition.lineNumber,te.viewPosition.column),Z),re=te.doColumnSelect?X.fromViewLineNumber:se.lineNumber,oe=te.doColumnSelect?X.fromViewVisualColumn:te.mouseColumn-1;return v.ColumnSelection.columnSelect(j.cursorConfig,j,re,oe,se.lineNumber,te.mouseColumn-1)}}),L.CursorColumnSelectLeft=(0,T.registerEditorCommand)(new class extends M{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(j,ee,X,te){return v.ColumnSelection.columnSelectLeft(j.cursorConfig,j,X)}}),L.CursorColumnSelectRight=(0,T.registerEditorCommand)(new class extends M{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(j,ee,X,te){return v.ColumnSelection.columnSelectRight(j.cursorConfig,j,X)}});class N extends M{constructor(ee){super(ee),this._isPaged=ee.isPaged}_getColumnSelectResult(ee,X,te,Z){return v.ColumnSelection.columnSelectUp(ee.cursorConfig,ee,te,this._isPaged)}}L.CursorColumnSelectUp=(0,T.registerEditorCommand)(new N({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:3600,linux:{primary:0}}})),L.CursorColumnSelectPageUp=(0,T.registerEditorCommand)(new N({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:3595,linux:{primary:0}}}));class P extends M{constructor(ee){super(ee),this._isPaged=ee.isPaged}_getColumnSelectResult(ee,X,te,Z){return v.ColumnSelection.columnSelectDown(ee.cursorConfig,ee,te,this._isPaged)}}L.CursorColumnSelectDown=(0,T.registerEditorCommand)(new P({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:3602,linux:{primary:0}}})),L.CursorColumnSelectPageDown=(0,T.registerEditorCommand)(new P({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:3596,linux:{primary:0}}}));class x extends p{constructor(){super({id:"cursorMove",precondition:void 0,description:h.CursorMove.description})}runCoreEditorCommand(ee,X){const te=h.CursorMove.parse(X);te&&this._runCursorMove(ee,X.source,te)}_runCursorMove(ee,X,te){ee.model.pushStackElement(),ee.setCursorStates(X,3,x._move(ee,ee.getCursorStates(),te)),ee.revealPrimaryCursor(X,!0)}static _move(ee,X,te){const Z=te.select,se=te.value;switch(te.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return h.CursorMoveCommands.simpleMove(ee,X,te.direction,Z,se,te.unit);case 11:case 13:case 12:case 14:return h.CursorMoveCommands.viewportMove(ee,X,te.direction,Z,se);default:return null}}}L.CursorMoveImpl=x,L.CursorMove=(0,T.registerEditorCommand)(new x);let F;(function(j){j[j.PAGE_SIZE_MARKER=-1]="PAGE_SIZE_MARKER"})(F||(F={}));class V extends p{constructor(ee){super(ee),this._staticArgs=ee.args}runCoreEditorCommand(ee,X){let te=this._staticArgs;this._staticArgs.value===-1&&(te={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:X.pageSize||ee.cursorConfig.pageSize}),ee.model.pushStackElement(),ee.setCursorStates(X.source,3,h.CursorMoveCommands.simpleMove(ee,ee.getCursorStates(),te.direction,te.select,te.value,te.unit)),ee.revealPrimaryCursor(X.source,!0)}}L.CursorLeft=(0,T.registerEditorCommand)(new V({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),L.CursorLeftSelect=(0,T.registerEditorCommand)(new V({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:1039}})),L.CursorRight=(0,T.registerEditorCommand)(new V({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),L.CursorRightSelect=(0,T.registerEditorCommand)(new V({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:1041}})),L.CursorUp=(0,T.registerEditorCommand)(new V({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),L.CursorUpSelect=(0,T.registerEditorCommand)(new V({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),L.CursorPageUp=(0,T.registerEditorCommand)(new V({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:11}})),L.CursorPageUpSelect=(0,T.registerEditorCommand)(new V({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:1035}})),L.CursorDown=(0,T.registerEditorCommand)(new V({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),L.CursorDownSelect=(0,T.registerEditorCommand)(new V({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),L.CursorPageDown=(0,T.registerEditorCommand)(new V({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:12}})),L.CursorPageDownSelect=(0,T.registerEditorCommand)(new V({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:1036}})),L.CreateCursor=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(j,ee){if(!ee.position)return;let X;ee.wholeLine?X=h.CursorMoveCommands.line(j,j.getPrimaryCursorState(),!1,ee.position,ee.viewPosition):X=h.CursorMoveCommands.moveTo(j,j.getPrimaryCursorState(),!1,ee.position,ee.viewPosition);const te=j.getCursorStates();if(te.length>1){const Z=X.modelState?X.modelState.position:null,se=X.viewState?X.viewState.position:null;for(let re=0,oe=te.length;re<oe;re++){const le=te[re];if(!(Z&&!le.modelState.selection.containsPosition(Z))&&!(se&&!le.viewState.selection.containsPosition(se))){te.splice(re,1),j.model.pushStackElement(),j.setCursorStates(ee.source,3,te);return}}}te.push(X),j.model.pushStackElement(),j.setCursorStates(ee.source,3,te)}}),L.LastCursorMoveToSelect=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(j,ee){if(!ee.position)return;const X=j.getLastAddedCursorIndex(),te=j.getCursorStates(),Z=te.slice(0);Z[X]=h.CursorMoveCommands.moveTo(j,te[X],!0,ee.position,ee.viewPosition),j.model.pushStackElement(),j.setCursorStates(ee.source,3,Z)}});class W extends p{constructor(ee){super(ee),this._inSelectionMode=ee.inSelectionMode}runCoreEditorCommand(ee,X){ee.model.pushStackElement(),ee.setCursorStates(X.source,3,h.CursorMoveCommands.moveToBeginningOfLine(ee,ee.getCursorStates(),this._inSelectionMode)),ee.revealPrimaryCursor(X.source,!0)}}L.CursorHome=(0,T.registerEditorCommand)(new W({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),L.CursorHomeSelect=(0,T.registerEditorCommand)(new W({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class z extends p{constructor(ee){super(ee),this._inSelectionMode=ee.inSelectionMode}runCoreEditorCommand(ee,X){ee.model.pushStackElement(),ee.setCursorStates(X.source,3,this._exec(ee.getCursorStates())),ee.revealPrimaryCursor(X.source,!0)}_exec(ee){const X=[];for(let te=0,Z=ee.length;te<Z;te++){const se=ee[te],re=se.modelState.position.lineNumber;X[te]=m.CursorState.fromModelState(se.modelState.move(this._inSelectionMode,re,1,0))}return X}}L.CursorLineStart=(0,T.registerEditorCommand)(new z({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:287}}})),L.CursorLineStartSelect=(0,T.registerEditorCommand)(new z({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1311}}}));class B extends p{constructor(ee){super(ee),this._inSelectionMode=ee.inSelectionMode}runCoreEditorCommand(ee,X){ee.model.pushStackElement(),ee.setCursorStates(X.source,3,h.CursorMoveCommands.moveToEndOfLine(ee,ee.getCursorStates(),this._inSelectionMode,X.sticky||!1)),ee.revealPrimaryCursor(X.source,!0)}}L.CursorEnd=(0,T.registerEditorCommand)(new B({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:t.localize(0,null),type:"boolean",default:!1}}}}]}})),L.CursorEndSelect=(0,T.registerEditorCommand)(new B({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:t.localize(1,null),type:"boolean",default:!1}}}}]}}));class K extends p{constructor(ee){super(ee),this._inSelectionMode=ee.inSelectionMode}runCoreEditorCommand(ee,X){ee.model.pushStackElement(),ee.setCursorStates(X.source,3,this._exec(ee,ee.getCursorStates())),ee.revealPrimaryCursor(X.source,!0)}_exec(ee,X){const te=[];for(let Z=0,se=X.length;Z<se;Z++){const re=X[Z],oe=re.modelState.position.lineNumber,le=ee.model.getLineMaxColumn(oe);te[Z]=m.CursorState.fromModelState(re.modelState.move(this._inSelectionMode,oe,le,0))}return te}}L.CursorLineEnd=(0,T.registerEditorCommand)(new K({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:291}}})),L.CursorLineEndSelect=(0,T.registerEditorCommand)(new K({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1315}}}));class H extends p{constructor(ee){super(ee),this._inSelectionMode=ee.inSelectionMode}runCoreEditorCommand(ee,X){ee.model.pushStackElement(),ee.setCursorStates(X.source,3,h.CursorMoveCommands.moveToBeginningOfBuffer(ee,ee.getCursorStates(),this._inSelectionMode)),ee.revealPrimaryCursor(X.source,!0)}}L.CursorTop=(0,T.registerEditorCommand)(new H({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:2062,mac:{primary:2064}}})),L.CursorTopSelect=(0,T.registerEditorCommand)(new H({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:3086,mac:{primary:3088}}}));class U extends p{constructor(ee){super(ee),this._inSelectionMode=ee.inSelectionMode}runCoreEditorCommand(ee,X){ee.model.pushStackElement(),ee.setCursorStates(X.source,3,h.CursorMoveCommands.moveToEndOfBuffer(ee,ee.getCursorStates(),this._inSelectionMode)),ee.revealPrimaryCursor(X.source,!0)}}L.CursorBottom=(0,T.registerEditorCommand)(new U({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:2061,mac:{primary:2066}}})),L.CursorBottomSelect=(0,T.registerEditorCommand)(new U({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:3085,mac:{primary:3090}}}));class G extends p{constructor(){super({id:"editorScroll",precondition:void 0,description:c.description})}determineScrollMethod(ee){const X=[6],te=[1,2,3,4,5,6],Z=[4,2],se=[1,3];return X.includes(ee.unit)&&Z.includes(ee.direction)?this._runHorizontalEditorScroll.bind(this):te.includes(ee.unit)&&se.includes(ee.direction)?this._runVerticalEditorScroll.bind(this):null}runCoreEditorCommand(ee,X){const te=c.parse(X);if(!te)return;const Z=this.determineScrollMethod(te);Z&&Z(ee,X.source,te)}_runVerticalEditorScroll(ee,X,te){const Z=this._computeDesiredScrollTop(ee,te);if(te.revealCursor){const se=ee.getCompletelyVisibleViewRangeAtScrollTop(Z);ee.setCursorStates(X,3,[h.CursorMoveCommands.findPositionInViewportIfOutside(ee,ee.getPrimaryCursorState(),se,te.select)])}ee.viewLayout.setScrollPosition({scrollTop:Z},0)}_computeDesiredScrollTop(ee,X){if(X.unit===1){const se=ee.viewLayout.getFutureViewport(),re=ee.getCompletelyVisibleViewRangeAtScrollTop(se.top),oe=ee.coordinatesConverter.convertViewRangeToModelRange(re);let le;X.direction===1?le=Math.max(1,oe.startLineNumber-X.value):le=Math.min(ee.model.getLineCount(),oe.startLineNumber+X.value);const ne=ee.coordinatesConverter.convertModelPositionToViewPosition(new r.Position(le,1));return ee.viewLayout.getVerticalOffsetForLineNumber(ne.lineNumber)}if(X.unit===5){let se=0;return X.direction===3&&(se=ee.model.getLineCount()-ee.cursorConfig.pageSize),ee.viewLayout.getVerticalOffsetForLineNumber(se)}let te;X.unit===3?te=ee.cursorConfig.pageSize*X.value:X.unit===4?te=Math.round(ee.cursorConfig.pageSize/2)*X.value:te=X.value;const Z=(X.direction===1?-1:1)*te;return ee.viewLayout.getCurrentScrollTop()+Z*ee.cursorConfig.lineHeight}_runHorizontalEditorScroll(ee,X,te){const Z=this._computeDesiredScrollLeft(ee,te);ee.viewLayout.setScrollPosition({scrollLeft:Z},0)}_computeDesiredScrollLeft(ee,X){const te=(X.direction===4?-1:1)*X.value;return ee.viewLayout.getCurrentScrollLeft()+te*ee.cursorConfig.typicalHalfwidthCharacterWidth}}L.EditorScrollImpl=G,L.EditorScroll=(0,T.registerEditorCommand)(new G),L.ScrollLineUp=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(j,ee){L.EditorScroll.runCoreEditorCommand(j,{to:c.RawDirection.Up,by:c.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:ee.source})}}),L.ScrollPageUp=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(j,ee){L.EditorScroll.runCoreEditorCommand(j,{to:c.RawDirection.Up,by:c.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:ee.source})}}),L.ScrollEditorTop=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"scrollEditorTop",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(j,ee){L.EditorScroll.runCoreEditorCommand(j,{to:c.RawDirection.Up,by:c.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:ee.source})}}),L.ScrollLineDown=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(j,ee){L.EditorScroll.runCoreEditorCommand(j,{to:c.RawDirection.Down,by:c.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:ee.source})}}),L.ScrollPageDown=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(j,ee){L.EditorScroll.runCoreEditorCommand(j,{to:c.RawDirection.Down,by:c.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:ee.source})}}),L.ScrollEditorBottom=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"scrollEditorBottom",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(j,ee){L.EditorScroll.runCoreEditorCommand(j,{to:c.RawDirection.Down,by:c.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:ee.source})}}),L.ScrollLeft=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"scrollLeft",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(j,ee){L.EditorScroll.runCoreEditorCommand(j,{to:c.RawDirection.Left,by:c.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:ee.source})}}),L.ScrollRight=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"scrollRight",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(j,ee){L.EditorScroll.runCoreEditorCommand(j,{to:c.RawDirection.Right,by:c.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:ee.source})}});class $ extends p{constructor(ee){super(ee),this._inSelectionMode=ee.inSelectionMode}runCoreEditorCommand(ee,X){X.position&&(ee.model.pushStackElement(),ee.setCursorStates(X.source,3,[h.CursorMoveCommands.word(ee,ee.getPrimaryCursorState(),this._inSelectionMode,X.position)]),X.revealType!==2&&ee.revealPrimaryCursor(X.source,!0,!0))}}L.WordSelect=(0,T.registerEditorCommand)(new $({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),L.WordSelectDrag=(0,T.registerEditorCommand)(new $({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),L.LastCursorWordSelect=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(j,ee){if(!ee.position)return;const X=j.getLastAddedCursorIndex(),te=j.getCursorStates(),Z=te.slice(0),se=te[X];Z[X]=h.CursorMoveCommands.word(j,se,se.modelState.hasSelection(),ee.position),j.model.pushStackElement(),j.setCursorStates(ee.source,3,Z)}});class ie extends p{constructor(ee){super(ee),this._inSelectionMode=ee.inSelectionMode}runCoreEditorCommand(ee,X){X.position&&(ee.model.pushStackElement(),ee.setCursorStates(X.source,3,[h.CursorMoveCommands.line(ee,ee.getPrimaryCursorState(),this._inSelectionMode,X.position,X.viewPosition)]),X.revealType!==2&&ee.revealPrimaryCursor(X.source,!1,!0))}}L.LineSelect=(0,T.registerEditorCommand)(new ie({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),L.LineSelectDrag=(0,T.registerEditorCommand)(new ie({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class J extends p{constructor(ee){super(ee),this._inSelectionMode=ee.inSelectionMode}runCoreEditorCommand(ee,X){if(!X.position)return;const te=ee.getLastAddedCursorIndex(),Z=ee.getCursorStates(),se=Z.slice(0);se[te]=h.CursorMoveCommands.line(ee,Z[te],this._inSelectionMode,X.position,X.viewPosition),ee.model.pushStackElement(),ee.setCursorStates(X.source,3,se)}}L.LastCursorLineSelect=(0,T.registerEditorCommand)(new J({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),L.LastCursorLineSelectDrag=(0,T.registerEditorCommand)(new J({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),L.CancelSelection=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"cancelSelection",precondition:s.EditorContextKeys.hasNonEmptySelection,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(j,ee){j.model.pushStackElement(),j.setCursorStates(ee.source,3,[h.CursorMoveCommands.cancelSelection(j,j.getPrimaryCursorState())]),j.revealPrimaryCursor(ee.source,!0)}}),L.RemoveSecondaryCursors=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"removeSecondaryCursors",precondition:s.EditorContextKeys.hasMultipleSelections,kbOpts:{weight:d+1,kbExpr:s.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(j,ee){j.model.pushStackElement(),j.setCursorStates(ee.source,3,[j.getPrimaryCursorState()]),j.revealPrimaryCursor(ee.source,!0),(0,D.status)(t.localize(2,null))}}),L.RevealLine=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"revealLine",precondition:void 0,description:l.description})}runCoreEditorCommand(j,ee){const X=ee,te=X.lineNumber||0;let Z=typeof te=="number"?te+1:parseInt(te)+1;Z<1&&(Z=1);const se=j.model.getLineCount();Z>se&&(Z=se);const re=new i.Range(Z,1,Z,j.model.getLineMaxColumn(Z));let oe=0;if(X.at)switch(X.at){case l.RawAtArgument.Top:oe=3;break;case l.RawAtArgument.Center:oe=1;break;case l.RawAtArgument.Bottom:oe=4;break;default:break}const le=j.coordinatesConverter.convertModelRangeToViewRange(re);j.revealRange(ee.source,!1,le,oe,0)}}),L.SelectAll=new class extends n{constructor(){super(T.SelectAllCommand)}runDOMCommand(){y.isFirefox&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(j,ee,X){const te=ee._getViewModel();te&&this.runCoreEditorCommand(te,X)}runCoreEditorCommand(j,ee){j.model.pushStackElement(),j.setCursorStates("keyboard",3,[h.CursorMoveCommands.selectAll(j,j.getPrimaryCursorState())])}},L.SetSelection=(0,T.registerEditorCommand)(new class extends p{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(j,ee){ee.selection&&(j.model.pushStackElement(),j.setCursorStates(ee.source,3,[m.CursorState.fromModelSelection(ee.selection)]))}})})(w||(e.CoreNavigationCommands=w={}));const E=o.ContextKeyExpr.and(s.EditorContextKeys.textInputFocus,s.EditorContextKeys.columnSelection);function C(L,R){u.KeybindingsRegistry.registerKeybindingRule({id:L,primary:R,when:E,weight:d+1})}C(w.CursorColumnSelectLeft.id,1039),C(w.CursorColumnSelectRight.id,1041),C(w.CursorColumnSelectUp.id,1040),C(w.CursorColumnSelectPageUp.id,1035),C(w.CursorColumnSelectDown.id,1042),C(w.CursorColumnSelectPageDown.id,1036);function I(L){return L.register(),L}var _;(function(L){class R extends T.EditorCommand{runEditorCommand(N,P,x){const F=P._getViewModel();F&&this.runCoreEditingCommand(P,F,x||{})}}L.CoreEditingCommand=R,L.LineBreakInsert=(0,T.registerEditorCommand)(new class extends R{constructor(){super({id:"lineBreakInsert",precondition:s.EditorContextKeys.writable,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(M,N,P){M.pushUndoStop(),M.executeCommands(this.id,a.TypeOperations.lineBreakInsert(N.cursorConfig,N.model,N.getCursorStates().map(x=>x.modelState.selection)))}}),L.Outdent=(0,T.registerEditorCommand)(new class extends R{constructor(){super({id:"outdent",precondition:s.EditorContextKeys.writable,kbOpts:{weight:d,kbExpr:o.ContextKeyExpr.and(s.EditorContextKeys.editorTextFocus,s.EditorContextKeys.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(M,N,P){M.pushUndoStop(),M.executeCommands(this.id,a.TypeOperations.outdent(N.cursorConfig,N.model,N.getCursorStates().map(x=>x.modelState.selection))),M.pushUndoStop()}}),L.Tab=(0,T.registerEditorCommand)(new class extends R{constructor(){super({id:"tab",precondition:s.EditorContextKeys.writable,kbOpts:{weight:d,kbExpr:o.ContextKeyExpr.and(s.EditorContextKeys.editorTextFocus,s.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(M,N,P){M.pushUndoStop(),M.executeCommands(this.id,a.TypeOperations.tab(N.cursorConfig,N.model,N.getCursorStates().map(x=>x.modelState.selection))),M.pushUndoStop()}}),L.DeleteLeft=(0,T.registerEditorCommand)(new class extends R{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(M,N,P){const[x,F]=S.DeleteOperations.deleteLeft(N.getPrevEditOperationType(),N.cursorConfig,N.model,N.getCursorStates().map(V=>V.modelState.selection),N.getCursorAutoClosedCharacters());x&&M.pushUndoStop(),M.executeCommands(this.id,F),N.setPrevEditOperationType(2)}}),L.DeleteRight=(0,T.registerEditorCommand)(new class extends R{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:d,kbExpr:s.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(M,N,P){const[x,F]=S.DeleteOperations.deleteRight(N.getPrevEditOperationType(),N.cursorConfig,N.model,N.getCursorStates().map(V=>V.modelState.selection));x&&M.pushUndoStop(),M.executeCommands(this.id,F),N.setPrevEditOperationType(3)}}),L.Undo=new class extends n{constructor(){super(T.UndoCommand)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(M,N,P){if(!(!N.hasModel()||N.getOption(89)===!0))return N.getModel().undo()}},L.Redo=new class extends n{constructor(){super(T.RedoCommand)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(M,N,P){if(!(!N.hasModel()||N.getOption(89)===!0))return N.getModel().redo()}}})(_||(e.CoreEditingCommands=_={}));class A extends T.Command{constructor(R,M,N){super({id:R,precondition:void 0,description:N}),this._handlerId=M}runCommand(R,M){const N=R.get(f.ICodeEditorService).getFocusedCodeEditor();N&&N.trigger("keyboard",this._handlerId,M)}}function k(L,R){I(new A("default:"+L,L)),I(new A(L,L,R))}k("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),k("replacePreviousChar"),k("compositionType"),k("compositionStart"),k("compositionEnd"),k("paste"),k("cut")}),define(Q[3278],Y([1,0,688,48]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsContribution=void 0;let b=class{static{this.ID="editor.contrib.markerDecorations"}constructor(T,f){}dispose(){}};e.MarkerDecorationsContribution=b,e.MarkerDecorationsContribution=b=fe([O(1,t.IMarkerDecorationsService)],b),(0,y.registerEditorContribution)(b.ID,b,0)}),define(Q[3279],Y([1,0,511,51,18]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewController=void 0;class D{constructor(f,v,m,S){this.configuration=f,this.viewModel=v,this.userInputEvents=m,this.commandDelegate=S}paste(f,v,m,S){this.commandDelegate.paste(f,v,m,S)}type(f){this.commandDelegate.type(f)}compositionType(f,v,m,S){this.commandDelegate.compositionType(f,v,m,S)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(f){t.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:f})}_validateViewColumn(f){const v=this.viewModel.getLineMinColumn(f.lineNumber);return f.column<v?new y.Position(f.lineNumber,v):f}_hasMulticursorModifier(f){switch(this.configuration.options.get(76)){case"altKey":return f.altKey;case"ctrlKey":return f.ctrlKey;case"metaKey":return f.metaKey;default:return!1}}_hasNonMulticursorModifier(f){switch(this.configuration.options.get(76)){case"altKey":return f.ctrlKey||f.metaKey;case"ctrlKey":return f.altKey||f.metaKey;case"metaKey":return f.ctrlKey||f.altKey;default:return!1}}dispatchMouse(f){const v=this.configuration.options,m=b.isLinux&&v.get(105),S=v.get(21);f.middleButton&&!m?this._columnSelect(f.position,f.mouseColumn,f.inSelectionMode):f.startedOnLineNumbers?this._hasMulticursorModifier(f)?f.inSelectionMode?this._lastCursorLineSelect(f.position,f.revealType):this._createCursor(f.position,!0):f.inSelectionMode?this._lineSelectDrag(f.position,f.revealType):this._lineSelect(f.position,f.revealType):f.mouseDownCount>=4?this._selectAll():f.mouseDownCount===3?this._hasMulticursorModifier(f)?f.inSelectionMode?this._lastCursorLineSelectDrag(f.position,f.revealType):this._lastCursorLineSelect(f.position,f.revealType):f.inSelectionMode?this._lineSelectDrag(f.position,f.revealType):this._lineSelect(f.position,f.revealType):f.mouseDownCount===2?f.onInjectedText||(this._hasMulticursorModifier(f)?this._lastCursorWordSelect(f.position,f.revealType):f.inSelectionMode?this._wordSelectDrag(f.position,f.revealType):this._wordSelect(f.position,f.revealType)):this._hasMulticursorModifier(f)?this._hasNonMulticursorModifier(f)||(f.shiftKey?this._columnSelect(f.position,f.mouseColumn,!0):f.inSelectionMode?this._lastCursorMoveToSelect(f.position,f.revealType):this._createCursor(f.position,!1)):f.inSelectionMode?f.altKey?this._columnSelect(f.position,f.mouseColumn,!0):S?this._columnSelect(f.position,f.mouseColumn,!0):this._moveToSelect(f.position,f.revealType):this.moveTo(f.position,f.revealType)}_usualArgs(f,v){return f=this._validateViewColumn(f),{source:"mouse",position:this._convertViewToModelPosition(f),viewPosition:f,revealType:v}}moveTo(f,v){t.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(f,v))}_moveToSelect(f,v){t.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,v))}_columnSelect(f,v,m){f=this._validateViewColumn(f),t.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(f),viewPosition:f,mouseColumn:v,doColumnSelect:m})}_createCursor(f,v){f=this._validateViewColumn(f),t.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(f),viewPosition:f,wholeLine:v})}_lastCursorMoveToSelect(f,v){t.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,v))}_wordSelect(f,v){t.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,v))}_wordSelectDrag(f,v){t.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(f,v))}_lastCursorWordSelect(f,v){t.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,v))}_lineSelect(f,v){t.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,v))}_lineSelectDrag(f,v){t.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(f,v))}_lastCursorLineSelect(f,v){t.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(f,v))}_lastCursorLineSelectDrag(f,v){t.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(f,v))}_selectAll(){t.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(f){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(f)}emitKeyDown(f){this.userInputEvents.emitKeyDown(f)}emitKeyUp(f){this.userInputEvents.emitKeyUp(f)}emitContextMenu(f){this.userInputEvents.emitContextMenu(f)}emitMouseMove(f){this.userInputEvents.emitMouseMove(f)}emitMouseLeave(f){this.userInputEvents.emitMouseLeave(f)}emitMouseUp(f){this.userInputEvents.emitMouseUp(f)}emitMouseDown(f){this.userInputEvents.emitMouseDown(f)}emitMouseDrag(f){this.userInputEvents.emitMouseDrag(f)}emitMouseDrop(f){this.userInputEvents.emitMouseDrop(f)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(f){this.userInputEvents.emitMouseWheel(f)}}e.ViewController=D}),define(Q[1185],Y([1,0,6,145,238,438,242,30]),function(q,e,t,y,b,D,T,f){"use strict";var v;Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBasedDocumentDiffProvider=void 0;let m=class{static{v=this}static{this.diffCache=new Map}constructor(h,a,r){this.editorWorkerService=a,this.telemetryService=r,this.onDidChangeEventEmitter=new t.Emitter,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(h)}dispose(){this.diffAlgorithmOnDidChangeSubscription?.dispose()}async computeDiff(h,a,r,i){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(h,a,r,i);if(h.getLineCount()===1&&h.getLineMaxColumn(1)===1)return a.getLineCount()===1&&a.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new D.LineRangeMapping(new b.LineRange(1,2),new b.LineRange(1,a.getLineCount()+1),[new D.RangeMapping(h.getFullModelRange(),a.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const s=JSON.stringify([h.uri.toString(),a.uri.toString()]),o=JSON.stringify([h.id,a.id,h.getAlternativeVersionId(),a.getAlternativeVersionId(),JSON.stringify(r)]),u=v.diffCache.get(s);if(u&&u.context===o)return u.result;const d=y.StopWatch.create(),p=await this.editorWorkerService.computeDiff(h.uri,a.uri,r,this.diffAlgorithm),c=d.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:c,timedOut:p?.quitEarly??!0,detectedMoves:r.computeMoves?p?.moves.length??0:-1}),i.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!p)throw new Error("no diff result available");return v.diffCache.size>10&&v.diffCache.delete(v.diffCache.keys().next().value),v.diffCache.set(s,{result:p,context:o}),p}setOptions(h){let a=!1;h.diffAlgorithm&&this.diffAlgorithm!==h.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=h.diffAlgorithm,typeof h.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=h.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),a=!0),a&&this.onDidChangeEventEmitter.fire()}};e.WorkerBasedDocumentDiffProvider=m,e.WorkerBasedDocumentDiffProvider=m=v=fe([O(1,T.IEditorWorkerService),O(2,f.ITelemetryService)],m)}),define(Q[3280],Y([1,0,87,110,105,48,96,73,2360,8,1720]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionAnchorSet=void 0,e.SelectionAnchorSet=new m.RawContextKey("selectionAnchorSet",!1);let h=class{static{S=this}static{this.ID="editor.contrib.selectionAnchorController"}static get(u){return u.getContribution(S.ID)}constructor(u,d){this.editor=u,this.selectionAnchorSetContextKey=e.SelectionAnchorSet.bindTo(d),this.modelChangeListener=u.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const u=this.editor.getPosition();this.editor.changeDecorations(d=>{this.decorationId&&d.removeDecoration(this.decorationId),this.decorationId=d.addDecoration(T.Selection.fromPositions(u,u),{description:"selection-anchor",stickiness:1,hoverMessage:new y.MarkdownString().appendText((0,v.localize)(0,null)),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,t.alert)((0,v.localize)(1,null,u.lineNumber,u.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const u=this.editor.getModel().getDecorationRange(this.decorationId);u&&this.editor.setPosition(u.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const u=this.editor.getModel().getDecorationRange(this.decorationId);if(u){const d=this.editor.getPosition();this.editor.setSelection(T.Selection.fromPositions(u.getStartPosition(),d)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const u=this.decorationId;this.editor.changeDecorations(d=>{d.removeDecoration(u),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};h=S=fe([O(1,m.IContextKeyService)],h);class a extends D.EditorAction{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,v.localize)(2,null),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:f.EditorContextKeys.editorTextFocus,primary:(0,b.KeyChord)(2089,2080),weight:100}})}async run(u,d){h.get(d)?.setSelectionAnchor()}}class r extends D.EditorAction{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,v.localize)(3,null),alias:"Go to Selection Anchor",precondition:e.SelectionAnchorSet})}async run(u,d){h.get(d)?.goToSelectionAnchor()}}class i extends D.EditorAction{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,v.localize)(4,null),alias:"Select from Anchor to Cursor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:f.EditorContextKeys.editorTextFocus,primary:(0,b.KeyChord)(2089,2089),weight:100}})}async run(u,d){h.get(d)?.selectFromAnchorToCursor()}}class s extends D.EditorAction{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,v.localize)(5,null),alias:"Cancel Selection Anchor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:f.EditorContextKeys.editorTextFocus,primary:9,weight:100}})}async run(u,d){h.get(d)?.cancelSelectionAnchor()}}(0,D.registerEditorContribution)(h.ID,h,4),(0,D.registerEditorAction)(a),(0,D.registerEditorAction)(r),(0,D.registerEditorAction)(i),(0,D.registerEditorAction)(s)}),define(Q[3281],Y([1,0,48,73,1908,2362]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class T extends t.EditorAction{constructor(S,h){super(h),this.left=S}run(S,h){if(!h.hasModel())return;const a=[],r=h.getSelections();for(const i of r)a.push(new b.MoveCaretCommand(i,this.left));h.pushUndoStop(),h.executeCommands(this.id,a),h.pushUndoStop()}}class f extends T{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:D.localize(0,null),alias:"Move Selected Text Left",precondition:y.EditorContextKeys.writable})}}class v extends T{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:D.localize(1,null),alias:"Move Selected Text Right",precondition:y.EditorContextKeys.writable})}}(0,t.registerEditorAction)(f),(0,t.registerEditorAction)(v)}),define(Q[3282],Y([1,0,48,487,795,27,73,2363]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class v extends t.EditorAction{constructor(){super({id:"editor.action.transposeLetters",label:f.localize(0,null),alias:"Transpose Letters",precondition:T.EditorContextKeys.writable,kbOpts:{kbExpr:T.EditorContextKeys.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(S,h){if(!h.hasModel())return;const a=h.getModel(),r=[],i=h.getSelections();for(const s of i){if(!s.isEmpty())continue;const o=s.startLineNumber,u=s.startColumn,d=a.getLineMaxColumn(o);if(o===1&&(u===1||u===2&&d===2))continue;const p=u===d?s.getPosition():b.MoveOperations.rightPosition(a,s.getPosition().lineNumber,s.getPosition().column),c=b.MoveOperations.leftPosition(a,p),l=b.MoveOperations.leftPosition(a,c),n=a.getValueInRange(D.Range.fromPositions(l,c)),g=a.getValueInRange(D.Range.fromPositions(c,p)),w=D.Range.fromPositions(l,p);r.push(new y.ReplaceCommand(w,g+n))}r.length>0&&(h.pushUndoStop(),h.executeCommands(this.id,r),h.pushUndoStop())}}(0,t.registerEditorAction)(v)}),define(Q[512],Y([1,0,97,18,675,48,79,73,2364,13,68,8]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PasteAction=e.CopyAction=e.CutAction=void 0;const a="9_cutcopypaste",r=y.isNative||document.queryCommandSupported("cut"),i=y.isNative||document.queryCommandSupported("copy"),s=typeof navigator.clipboard>"u"||t.isFirefox?document.queryCommandSupported("paste"):!0;function o(p){return p.register(),p}e.CutAction=r?o(new D.MultiCommand({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:y.isNative?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:m.MenuId.MenubarEditMenu,group:"2_ccp",title:v.localize(0,null),order:1},{menuId:m.MenuId.EditorContext,group:a,title:v.localize(1,null),when:f.EditorContextKeys.writable,order:1},{menuId:m.MenuId.CommandPalette,group:"",title:v.localize(2,null),order:1},{menuId:m.MenuId.SimpleEditorContext,group:a,title:v.localize(3,null),when:f.EditorContextKeys.writable,order:1}]})):void 0,e.CopyAction=i?o(new D.MultiCommand({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:y.isNative?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:m.MenuId.MenubarEditMenu,group:"2_ccp",title:v.localize(4,null),order:2},{menuId:m.MenuId.EditorContext,group:a,title:v.localize(5,null),order:2},{menuId:m.MenuId.CommandPalette,group:"",title:v.localize(6,null),order:1},{menuId:m.MenuId.SimpleEditorContext,group:a,title:v.localize(7,null),order:2}]})):void 0,m.MenuRegistry.appendMenuItem(m.MenuId.MenubarEditMenu,{submenu:m.MenuId.MenubarCopy,title:{value:v.localize(8,null),original:"Copy As"},group:"2_ccp",order:3}),m.MenuRegistry.appendMenuItem(m.MenuId.EditorContext,{submenu:m.MenuId.EditorContextCopy,title:{value:v.localize(9,null),original:"Copy As"},group:a,order:3}),m.MenuRegistry.appendMenuItem(m.MenuId.EditorContext,{submenu:m.MenuId.EditorContextShare,title:{value:v.localize(10,null),original:"Share"},group:"11_share",order:-1,when:h.ContextKeyExpr.and(h.ContextKeyExpr.notEquals("resourceScheme","output"),f.EditorContextKeys.editorTextFocus)}),m.MenuRegistry.appendMenuItem(m.MenuId.EditorTitleContext,{submenu:m.MenuId.EditorTitleContextShare,title:{value:v.localize(11,null),original:"Share"},group:"11_share",order:-1}),m.MenuRegistry.appendMenuItem(m.MenuId.ExplorerContext,{submenu:m.MenuId.ExplorerContextShare,title:{value:v.localize(12,null),original:"Share"},group:"11_share",order:-1}),e.PasteAction=s?o(new D.MultiCommand({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:y.isNative?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:m.MenuId.MenubarEditMenu,group:"2_ccp",title:v.localize(13,null),order:4},{menuId:m.MenuId.EditorContext,group:a,title:v.localize(14,null),when:f.EditorContextKeys.writable,order:4},{menuId:m.MenuId.CommandPalette,group:"",title:v.localize(15,null),order:1},{menuId:m.MenuId.SimpleEditorContext,group:a,title:v.localize(16,null),when:f.EditorContextKeys.writable,order:4}]})):void 0;class u extends D.EditorAction{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:v.localize(17,null),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:f.EditorContextKeys.textInputFocus,primary:0,weight:100}})}run(c,l){!l.hasModel()||!l.getOption(36)&&l.getSelection().isEmpty()||(b.CopyOptions.forceCopyWithSyntaxHighlighting=!0,l.focus(),document.execCommand("copy"),b.CopyOptions.forceCopyWithSyntaxHighlighting=!1)}}function d(p,c){p&&(p.addImplementation(1e4,"code-editor",(l,n)=>{const g=l.get(T.ICodeEditorService).getFocusedCodeEditor();if(g&&g.hasTextFocus()){const w=g.getOption(36),E=g.getSelection();return E&&E.isEmpty()&&!w||document.execCommand(c),!0}return!1}),p.addImplementation(0,"generic-dom",(l,n)=>(document.execCommand(c),!0)))}d(e.CutAction,"cut"),d(e.CopyAction,"copy"),e.PasteAction&&(e.PasteAction.addImplementation(1e4,"code-editor",(p,c)=>{const l=p.get(T.ICodeEditorService),n=p.get(S.IClipboardService),g=l.getFocusedCodeEditor();return g&&g.hasTextFocus()?!document.execCommand("paste")&&y.isWeb?(async()=>{const E=await n.readText();if(E!==""){const C=b.InMemoryClipboardMetadataManager.INSTANCE.get(E);let I=!1,_=null,A=null;C&&(I=g.getOption(36)&&!!C.isFromEmptySelection,_=typeof C.multicursorText<"u"?C.multicursorText:null,A=C.mode),g.trigger("keyboard","paste",{text:E,pasteOnNewLine:I,multicursorText:_,mode:A})}})():!0:!1}),e.PasteAction.addImplementation(0,"generic-dom",(p,c)=>(document.execCommand("paste"),!0))),i&&(0,D.registerEditorAction)(u)}),define(Q[3283],Y([1,0,105,48,27,73,125,1085,1910,2374]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class S extends y.EditorAction{constructor(o,u){super(u),this._type=o}run(o,u){const d=o.get(T.ILanguageConfigurationService);if(!u.hasModel())return;const p=u.getModel(),c=[],l=p.getOptions(),n=u.getOption(22),g=u.getSelections().map((E,C)=>({selection:E,index:C,ignoreFirstLine:!1}));g.sort((E,C)=>b.Range.compareRangesUsingStarts(E.selection,C.selection));let w=g[0];for(let E=1;E<g.length;E++){const C=g[E];w.selection.endLineNumber===C.selection.startLineNumber&&(w.index<C.index?C.ignoreFirstLine=!0:(w.ignoreFirstLine=!0,w=C))}for(const E of g)c.push(new v.LineCommentCommand(d,E.selection,l.tabSize,this._type,n.insertSpace,n.ignoreEmptyLines,E.ignoreFirstLine));u.pushUndoStop(),u.executeCommands(this.id,c),u.pushUndoStop()}}class h extends S{constructor(){super(0,{id:"editor.action.commentLine",label:m.localize(0,null),alias:"Toggle Line Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:2138,weight:100}})}}class a extends S{constructor(){super(1,{id:"editor.action.addCommentLine",label:m.localize(1,null),alias:"Add Line Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:(0,t.KeyChord)(2089,2081),weight:100}})}}class r extends S{constructor(){super(2,{id:"editor.action.removeCommentLine",label:m.localize(2,null),alias:"Remove Line Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:(0,t.KeyChord)(2089,2099),weight:100}})}}class i extends y.EditorAction{constructor(){super({id:"editor.action.blockComment",label:m.localize(3,null),alias:"Toggle Block Comment",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:1567,linux:{primary:3103},weight:100}})}run(o,u){const d=o.get(T.ILanguageConfigurationService);if(!u.hasModel())return;const p=u.getOption(22),c=[],l=u.getSelections();for(const n of l)c.push(new f.BlockCommentCommand(n,p.insertSpace,d));u.pushUndoStop(),u.executeCommands(this.id,c),u.pushUndoStop()}}(0,y.registerEditorAction)(h),(0,y.registerEditorAction)(a),(0,y.registerEditorAction)(r),(0,y.registerEditorAction)(i)}),define(Q[3284],Y([1,0,4,48,73,2376]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRedo=e.CursorUndo=e.CursorUndoRedoController=void 0;class T{constructor(a){this.selections=a}equals(a){const r=this.selections.length,i=a.selections.length;if(r!==i)return!1;for(let s=0;s<r;s++)if(!this.selections[s].equalsSelection(a.selections[s]))return!1;return!0}}class f{constructor(a,r,i){this.cursorState=a,this.scrollTop=r,this.scrollLeft=i}}class v extends t.Disposable{static{this.ID="editor.contrib.cursorUndoRedoController"}static get(a){return a.getContribution(v.ID)}constructor(a){super(),this._editor=a,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(a.onDidChangeModel(r=>{this._undoStack=[],this._redoStack=[]})),this._register(a.onDidChangeModelContent(r=>{this._undoStack=[],this._redoStack=[]})),this._register(a.onDidChangeCursorSelection(r=>{if(this._isCursorUndoRedo||!r.oldSelections||r.oldModelVersionId!==r.modelVersionId)return;const i=new T(r.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new f(i,a.getScrollTop(),a.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new f(new T(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new f(new T(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(a){this._isCursorUndoRedo=!0,this._editor.setSelections(a.cursorState.selections),this._editor.setScrollPosition({scrollTop:a.scrollTop,scrollLeft:a.scrollLeft}),this._isCursorUndoRedo=!1}}e.CursorUndoRedoController=v;class m extends y.EditorAction{constructor(){super({id:"cursorUndo",label:D.localize(0,null),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.textInputFocus,primary:2099,weight:100}})}run(a,r,i){v.get(r)?.cursorUndo()}}e.CursorUndo=m;class S extends y.EditorAction{constructor(){super({id:"cursorRedo",label:D.localize(1,null),alias:"Cursor Redo",precondition:void 0})}run(a,r,i){v.get(r)?.cursorRedo()}}e.CursorRedo=S,(0,y.registerEditorContribution)(v.ID,v,0),(0,y.registerEditorAction)(m),(0,y.registerEditorAction)(S)}),define(Q[3285],Y([1,0,48,8,31,204,5,35,2382]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorKeybindingCancellationTokenSource=void 0;const m=(0,T.createDecorator)("IEditorCancelService"),S=new y.RawContextKey("cancellableOperation",!1,(0,v.localize)(0,null));(0,f.registerSingleton)(m,class{constructor(){this._tokens=new WeakMap}add(a,r){let i=this._tokens.get(a);i||(i=a.invokeWithinContext(o=>{const u=S.bindTo(o.get(y.IContextKeyService)),d=new D.LinkedList;return{key:u,tokens:d}}),this._tokens.set(a,i));let s;return i.key.set(!0),s=i.tokens.push(r),()=>{s&&(s(),i.key.set(!i.tokens.isEmpty()),s=void 0)}}cancel(a){const r=this._tokens.get(a);if(!r)return;const i=r.tokens.pop();i&&(i.cancel(),r.key.set(!r.tokens.isEmpty()))}},1);class h extends b.CancellationTokenSource{constructor(r,i){super(i),this.editor=r,this._unregister=r.invokeWithinContext(s=>s.get(m).add(r,this))}dispose(){this._unregister(),super.dispose()}}e.EditorKeybindingCancellationTokenSource=h,(0,t.registerEditorCommand)(new class extends t.EditorCommand{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:S})}runEditorCommand(a,r){a.get(m).cancel(r)}})}),define(Q[348],Y([1,0,33,27,31,4,3285]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelCancellationTokenSource=e.EditorStateCancellationTokenSource=e.EditorState=e.CodeEditorStateFlag=void 0;var f;(function(h){h[h.Value=1]="Value",h[h.Selection=2]="Selection",h[h.Position=4]="Position",h[h.Scroll=8]="Scroll"})(f||(e.CodeEditorStateFlag=f={}));class v{constructor(a,r){if(this.flags=r,this.flags&1){const i=a.getModel();this.modelVersionId=i?t.format("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=a.getPosition():this.position=null,this.flags&2?this.selection=a.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=a.getScrollLeft(),this.scrollTop=a.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(a){if(!(a instanceof v))return!1;const r=a;return!(this.modelVersionId!==r.modelVersionId||this.scrollLeft!==r.scrollLeft||this.scrollTop!==r.scrollTop||!this.position&&r.position||this.position&&!r.position||this.position&&r.position&&!this.position.equals(r.position)||!this.selection&&r.selection||this.selection&&!r.selection||this.selection&&r.selection&&!this.selection.equalsRange(r.selection))}validate(a){return this._equals(new v(a,this.flags))}}e.EditorState=v;class m extends T.EditorKeybindingCancellationTokenSource{constructor(a,r,i,s){super(a,s),this._listener=new D.DisposableStore,r&4&&this._listener.add(a.onDidChangeCursorPosition(o=>{(!i||!y.Range.containsPosition(i,o.position))&&this.cancel()})),r&2&&this._listener.add(a.onDidChangeCursorSelection(o=>{(!i||!y.Range.containsRange(i,o.selection))&&this.cancel()})),r&8&&this._listener.add(a.onDidScrollChange(o=>this.cancel())),r&1&&(this._listener.add(a.onDidChangeModel(o=>this.cancel())),this._listener.add(a.onDidChangeModelContent(o=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}e.EditorStateCancellationTokenSource=m;class S extends b.CancellationTokenSource{constructor(a,r){super(r),this._listener=a.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}e.TextModelCancellationTokenSource=S}),define(Q[349],Y([1,0,20,31,15,4,10,152,27,96,74,57,348,2365,28,23,72,30,259]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyCodeAction=e.ApplyCodeActionReason=e.getCodeActions=e.fixAllCommandId=e.organizeImportsCommandId=e.sourceActionCommandId=e.refactorPreviewCommandId=e.refactorCommandId=e.autoFixCommandId=e.quickFixCommandId=e.codeActionCommandId=void 0,e.codeActionCommandId="editor.action.codeAction",e.quickFixCommandId="editor.action.quickFix",e.autoFixCommandId="editor.action.autoFix",e.refactorCommandId="editor.action.refactor",e.refactorPreviewCommandId="editor.action.refactor.preview",e.sourceActionCommandId="editor.action.sourceAction",e.organizeImportsCommandId="editor.action.organizeImports",e.fixAllCommandId="editor.action.fixAll";class p extends D.Disposable{static codeActionsPreferredComparator(A,k){return A.isPreferred&&!k.isPreferred?-1:!A.isPreferred&&k.isPreferred?1:0}static codeActionsComparator({action:A},{action:k}){return(0,t.isNonEmptyArray)(A.diagnostics)?(0,t.isNonEmptyArray)(k.diagnostics)?p.codeActionsPreferredComparator(A,k):-1:(0,t.isNonEmptyArray)(k.diagnostics)?1:p.codeActionsPreferredComparator(A,k)}constructor(A,k,L){super(),this.documentation=k,this._register(L),this.allActions=[...A].sort(p.codeActionsComparator),this.validActions=this.allActions.filter(({action:R})=>!R.disabled)}get hasAutoFix(){return this.validActions.some(({action:A})=>!!A.kind&&d.CodeActionKind.QuickFix.contains(new d.CodeActionKind(A.kind))&&!!A.isPreferred)}}const c={actions:[],documentation:void 0};async function l(_,A,k,L,R,M){const N=L.filter||{},P={only:N.include?.value,trigger:L.type},x=new a.TextModelCancellationTokenSource(A,M),F=n(_,A,N),V=new D.DisposableStore,W=F.map(async B=>{try{R.report(B);const K=await B.provideCodeActions(A,k,P,x.token);if(K&&V.add(K),x.token.isCancellationRequested)return c;const H=(K?.actions||[]).filter(G=>G&&(0,d.filtersAction)(N,G)),U=w(B,H,N.include);return{actions:H.map(G=>new d.CodeActionItem(G,B)),documentation:U}}catch(K){if((0,b.isCancellationError)(K))throw K;return(0,b.onUnexpectedExternalError)(K),c}}),z=_.onDidChange(()=>{const B=_.all(A);(0,t.equals)(B,F)||x.cancel()});try{const B=await Promise.all(W),K=B.map(U=>U.actions).flat(),H=[...(0,t.coalesce)(B.map(U=>U.documentation)),...g(_,A,L,K)];return new p(K,H,V)}finally{z.dispose(),x.dispose()}}e.getCodeActions=l;function n(_,A,k){return _.all(A).filter(L=>L.providedCodeActionKinds?L.providedCodeActionKinds.some(R=>(0,d.mayIncludeActionsOfKind)(k,new d.CodeActionKind(R))):!0)}function*g(_,A,k,L){if(A&&L.length)for(const R of _.all(A))R._getAdditionalMenuItems&&(yield*R._getAdditionalMenuItems?.({trigger:k.type,only:k.filter?.include?.value},L.map(M=>M.action)))}function w(_,A,k){if(!_.documentation)return;const L=_.documentation.map(R=>({kind:new d.CodeActionKind(R.kind),command:R.command}));if(k){let R;for(const M of L)M.kind.contains(k)&&(R?R.kind.contains(M.kind)&&(R=M):R=M);if(R)return R?.command}for(const R of A)if(R.kind){for(const M of L)if(M.kind.contains(new d.CodeActionKind(R.kind)))return M.command}}var E;(function(_){_.OnSave="onSave",_.FromProblemsView="fromProblemsView",_.FromCodeActions="fromCodeActions"})(E||(e.ApplyCodeActionReason=E={}));async function C(_,A,k,L,R=y.CancellationToken.None){const M=_.get(f.IBulkEditService),N=_.get(i.ICommandService),P=_.get(u.ITelemetryService),x=_.get(s.INotificationService);if(P.publicLog2("codeAction.applyCodeAction",{codeActionTitle:A.action.title,codeActionKind:A.action.kind,codeActionIsPreferred:!!A.action.isPreferred,reason:k}),await A.resolve(R),!R.isCancellationRequested&&!(A.action.edit?.edits.length&&!(await M.apply(A.action.edit,{editor:L?.editor,label:A.action.title,quotableLabel:A.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:k!==E.OnSave,showPreview:L?.preview})).isApplied)&&A.action.command)try{await N.executeCommand(A.action.command.id,...A.action.command.arguments||[])}catch(F){const V=I(F);x.error(typeof V=="string"?V:r.localize(0,null))}}e.applyCodeAction=C;function I(_){return typeof _=="string"?_:_ instanceof Error&&typeof _.message=="string"?_.message:void 0}i.CommandsRegistry.registerCommand("_executeCodeActionProvider",async function(_,A,k,L,R){if(!(A instanceof T.URI))throw(0,b.illegalArgument)();const{codeActionProvider:M}=_.get(S.ILanguageFeaturesService),N=_.get(h.IModelService).getModel(A);if(!N)throw(0,b.illegalArgument)();const P=m.Selection.isISelection(k)?m.Selection.liftSelection(k):v.Range.isIRange(k)?N.validateRange(k):void 0;if(!P)throw(0,b.illegalArgument)();const x=typeof L=="string"?new d.CodeActionKind(L):void 0,F=await l(M,N,P,{type:1,triggerAction:d.CodeActionTriggerSource.Default,filter:{includeSourceActions:!0,include:x}},o.Progress.None,y.CancellationToken.None),V=[],W=Math.min(F.validActions.length,typeof R=="number"?R:0);for(let z=0;z<W;z++)V.push(F.validActions[z].resolve(y.CancellationToken.None));try{return await Promise.all(V),F.validActions.map(z=>z.action)}finally{setTimeout(()=>F.dispose(),100)}})}),define(Q[3286],Y([1,0,203,349,259,38]),function(q,e,t,y,b,D){"use strict";var T;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionKeybindingResolver=void 0;let f=class{static{T=this}static{this.codeActionCommands=[y.refactorCommandId,y.codeActionCommandId,y.sourceActionCommandId,y.organizeImportsCommandId,y.fixAllCommandId]}constructor(m){this.keybindingService=m}getResolver(){const m=new t.Lazy(()=>this.keybindingService.getKeybindings().filter(S=>T.codeActionCommands.indexOf(S.command)>=0).filter(S=>S.resolvedKeybinding).map(S=>{let h=S.commandArgs;return S.command===y.organizeImportsCommandId?h={kind:b.CodeActionKind.SourceOrganizeImports.value}:S.command===y.fixAllCommandId&&(h={kind:b.CodeActionKind.SourceFixAll.value}),{resolvedKeybinding:S.resolvedKeybinding,...b.CodeActionCommandArgs.fromUser(h,{kind:b.CodeActionKind.None,apply:"never"})}}));return S=>{if(S.kind)return this.bestKeybindingForCodeAction(S,m.value)?.resolvedKeybinding}}bestKeybindingForCodeAction(m,S){if(!m.kind)return;const h=new b.CodeActionKind(m.kind);return S.filter(a=>a.kind.contains(h)).filter(a=>a.preferred?m.isPreferred:!0).reduceRight((a,r)=>a?a.kind.contains(r.kind)?r:a:r,void 0)}};e.CodeActionKeybindingResolver=f,e.CodeActionKeybindingResolver=f=T=fe([O(0,D.IKeybindingService)],f)}),define(Q[1186],Y([1,0,14,15,6,4,26,8,72,259,349]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionModel=e.CodeActionsState=e.SUPPORTED_CODE_ACTIONS=void 0,e.SUPPORTED_CODE_ACTIONS=new f.RawContextKey("supportedCodeAction","");class h extends D.Disposable{constructor(o,u,d,p=250){super(),this._editor=o,this._markerService=u,this._signalChange=d,this._delay=p,this._autoTriggerTimer=this._register(new t.TimeoutTimer),this._register(this._markerService.onMarkerChanged(c=>this._onMarkerChanges(c))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(o){const u=this._getRangeOfSelectionUnlessWhitespaceEnclosed(o);this._signalChange(u?{trigger:o,selection:u}:void 0)}_onMarkerChanges(o){const u=this._editor.getModel();u&&o.some(d=>(0,T.isEqual)(d,u.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:m.CodeActionTriggerSource.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(o){if(!this._editor.hasModel())return;const u=this._editor.getModel(),d=this._editor.getSelection();if(d.isEmpty()&&o.type===2){const{lineNumber:p,column:c}=d.getPosition(),l=u.getLineContent(p);if(l.length===0)return;if(c===1){if(/\s/.test(l[0]))return}else if(c===u.getLineMaxColumn(p)){if(/\s/.test(l[l.length-1]))return}else if(/\s/.test(l[c-2])&&/\s/.test(l[c-1]))return}return d}}var a;(function(s){let o;(function(d){d[d.Empty=0]="Empty",d[d.Triggered=1]="Triggered"})(o=s.Type||(s.Type={})),s.Empty={type:0};class u{constructor(p,c,l){this.trigger=p,this.position=c,this._cancellablePromise=l,this.type=1,this.actions=l.catch(n=>{if((0,y.isCancellationError)(n))return r;throw n})}cancel(){this._cancellablePromise.cancel()}}s.Triggered=u})(a||(e.CodeActionsState=a={}));const r=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class i extends D.Disposable{constructor(o,u,d,p,c){super(),this._editor=o,this._registry=u,this._markerService=d,this._progressService=c,this._codeActionOracle=this._register(new D.MutableDisposable),this._state=a.Empty,this._onDidChangeState=this._register(new b.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=e.SUPPORTED_CODE_ACTIONS.bindTo(p),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(a.Empty,!0))}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(a.Empty);const o=this._editor.getModel();if(o&&this._registry.has(o)&&!this._editor.getOption(89)){const u=this._registry.all(o).flatMap(d=>d.providedCodeActionKinds??[]);this._supportedCodeActions.set(u.join(" ")),this._codeActionOracle.value=new h(this._editor,this._markerService,d=>{if(!d){this.setState(a.Empty);return}const p=(0,t.createCancelablePromise)(c=>(0,S.getCodeActions)(this._registry,o,d.selection,d.trigger,v.Progress.None,c));d.trigger.type===1&&this._progressService?.showWhile(p,250),this.setState(new a.Triggered(d.trigger,d.selection.getStartPosition(),p))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:m.CodeActionTriggerSource.Default})}else this._supportedCodeActions.reset()}trigger(o){this._codeActionOracle.value?.trigger(o)}setState(o,u){o!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=o,!u&&!this._disposed&&this._onDidChangeState.fire(o))}}e.CodeActionModel=i}),define(Q[1187],Y([1,0,7,151,32,6,4,37,801,349,2370,38,1722]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.LightBulbWidget=void 0;var r;(function(s){let o;(function(d){d[d.Hidden=0]="Hidden",d[d.Showing=1]="Showing"})(o=s.Type||(s.Type={})),s.Hidden={type:0};class u{constructor(p,c,l,n){this.actions=p,this.trigger=c,this.editorPosition=l,this.widgetPosition=n,this.type=1}}s.Showing=u})(r||(r={}));let i=class extends T.Disposable{static{a=this}static{this.ID="editor.contrib.lightbulbWidget"}static{this._posPref=[0]}constructor(o,u){super(),this._editor=o,this._onClick=this._register(new D.Emitter),this.onClick=this._onClick.event,this._state=r.Hidden,this._domNode=t.$("div.lightBulbWidget"),this._register(y.Gesture.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(d=>{const p=this._editor.getModel();(this.state.type!==1||!p||this.state.editorPosition.lineNumber>=p.getLineCount())&&this.hide()})),this._register(t.addStandardDisposableGenericMouseDownListener(this._domNode,d=>{if(this.state.type!==1)return;this._editor.focus(),d.preventDefault();const{top:p,height:c}=t.getDomNodePagePosition(this._domNode),l=this._editor.getOption(65);let n=Math.floor(l/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(n+=l),this._onClick.fire({x:d.posx,y:p+c+n,actions:this.state.actions,trigger:this.state.trigger})})),this._register(t.addDisposableListener(this._domNode,"mouseenter",d=>{(d.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(d=>{d.hasChanged(63)&&!this._editor.getOption(63).enabled&&this.hide()})),this._register(D.Event.runAndSubscribe(u.onDidUpdateKeybindings,()=>{this._preferredKbLabel=u.lookupKeybinding(m.autoFixCommandId)?.getLabel()??void 0,this._quickFixKbLabel=u.lookupKeybinding(m.quickFixCommandId)?.getLabel()??void 0,this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(o,u,d){if(o.validActions.length<=0)return this.hide();const p=this._editor.getOptions();if(!p.get(63).enabled)return this.hide();const c=this._editor.getModel();if(!c)return this.hide();const{lineNumber:l,column:n}=c.validatePosition(d),g=c.getOptions().tabSize,w=p.get(49),E=c.getLineContent(l),C=(0,v.computeIndentLevel)(E,g),I=w.spaceWidth*C>22,_=k=>k>2&&this._editor.getTopForLineNumber(k)===this._editor.getTopForLineNumber(k-1);let A=l;if(!I){if(l>1&&!_(l-1))A-=1;else if(!_(l+1))A+=1;else if(n*w.spaceWidth<22)return this.hide()}this.state=new r.Showing(o,u,d,{position:{lineNumber:A,column:1},preference:a._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==r.Hidden&&(this.state=r.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(o){this._state=o,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...f.ThemeIcon.asClassNameArray(b.Codicon.lightBulb)),this._domNode.classList.add(...f.ThemeIcon.asClassNameArray(b.Codicon.lightbulbAutofix)),this._preferredKbLabel)){this.title=S.localize(0,null,this._preferredKbLabel);return}this._domNode.classList.remove(...f.ThemeIcon.asClassNameArray(b.Codicon.lightbulbAutofix)),this._domNode.classList.add(...f.ThemeIcon.asClassNameArray(b.Codicon.lightBulb)),this._quickFixKbLabel?this.title=S.localize(1,null,this._quickFixKbLabel):this.title=S.localize(2,null)}set title(o){this._domNode.title=o}};e.LightBulbWidget=i,e.LightBulbWidget=i=a=fe([O(1,h.IKeybindingService)],i)}),define(Q[3287],Y([1,0,48,659,2387]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D extends t.EditorAction{constructor(){super({id:"editor.action.fontZoomIn",label:b.localize(0,null),alias:"Editor Font Zoom In",precondition:void 0})}run(m,S){y.EditorZoom.setZoomLevel(y.EditorZoom.getZoomLevel()+1)}}class T extends t.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:b.localize(1,null),alias:"Editor Font Zoom Out",precondition:void 0})}run(m,S){y.EditorZoom.setZoomLevel(y.EditorZoom.getZoomLevel()-1)}}class f extends t.EditorAction{constructor(){super({id:"editor.action.fontZoomReset",label:b.localize(2,null),alias:"Editor Font Zoom Reset",precondition:void 0})}run(m,S){y.EditorZoom.setZoomLevel(0)}}(0,t.registerEditorAction)(D),(0,t.registerEditorAction)(T),(0,t.registerEditorAction)(f)}),define(Q[411],Y([1,0,87,20,31,15,83,204,17,10,348,123,51,27,96,242,75,1089,2388,28,112,5,74,11]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOnTypeFormattingEdits=e.getDocumentFormattingEditsUntilResult=e.getDocumentRangeFormattingEditsUntilResult=e.formatDocumentWithProvider=e.formatDocumentWithSelectedProvider=e.formatDocumentRangesWithProvider=e.formatDocumentRangesWithSelectedProvider=e.FormattingConflicts=e.FormattingMode=e.getRealAndSyntheticDocumentFormattersOrdered=e.alertFormattingEdits=void 0;function w(P){if(P=P.filter(W=>W.range),!P.length)return;let{range:x}=P[0];for(let W=1;W<P.length;W++)x=r.Range.plusRange(x,P[W].range);const{startLineNumber:F,endLineNumber:V}=x;F===V?P.length===1?(0,t.alert)(d.localize(0,null,F)):(0,t.alert)(d.localize(1,null,P.length,F)):P.length===1?(0,t.alert)(d.localize(2,null,F,V)):(0,t.alert)(d.localize(3,null,P.length,F,V))}e.alertFormattingEdits=w;function E(P,x,F){const V=[],W=new c.ExtensionIdentifierSet,z=P.ordered(F);for(const K of z)V.push(K),K.extensionId&&W.add(K.extensionId);const B=x.ordered(F);for(const K of B){if(K.extensionId){if(W.has(K.extensionId))continue;W.add(K.extensionId)}V.push({displayName:K.displayName,extensionId:K.extensionId,provideDocumentFormattingEdits(H,U,G){return K.provideDocumentRangeFormattingEdits(H,H.getFullModelRange(),U,G)}})}return V}e.getRealAndSyntheticDocumentFormattersOrdered=E;var C;(function(P){P[P.Explicit=1]="Explicit",P[P.Silent=2]="Silent"})(C||(e.FormattingMode=C={}));class I{static{this._selectors=new f.LinkedList}static setFormatterSelector(x){return{dispose:I._selectors.unshift(x)}}static async select(x,F,V){if(x.length===0)return;const W=T.Iterable.first(I._selectors);if(W)return await W(x,F,V)}}e.FormattingConflicts=I;async function _(P,x,F,V,W,z){const B=P.get(l.IInstantiationService),{documentRangeFormattingEditProvider:K}=P.get(n.ILanguageFeaturesService),H=(0,h.isCodeEditor)(x)?x.getModel():x,U=K.ordered(H),G=await I.select(U,H,V);G&&(W.report(G),await B.invokeFunction(A,G,x,F,z))}e.formatDocumentRangesWithSelectedProvider=_;async function A(P,x,F,V,W){const z=P.get(s.IEditorWorkerService),B=P.get(g.ILogService);let K,H;(0,h.isCodeEditor)(F)?(K=F.getModel(),H=new S.EditorStateCancellationTokenSource(F,5,void 0,W)):(K=F,H=new S.TextModelCancellationTokenSource(F,W));const U=[];let G=0;for(const ee of(0,y.asArray)(V).sort(r.Range.compareRangesUsingStarts))G>0&&r.Range.areIntersectingOrTouching(U[G-1],ee)?U[G-1]=r.Range.fromPositions(U[G-1].getStartPosition(),ee.getEndPosition()):G=U.push(ee);const $=async ee=>{B.trace("[format][provideDocumentRangeFormattingEdits] (request)",x.extensionId?.value,ee);const X=await x.provideDocumentRangeFormattingEdits(K,ee,K.getFormattingOptions(),H.token)||[];return B.trace("[format][provideDocumentRangeFormattingEdits] (response)",x.extensionId?.value,X),X},ie=(ee,X)=>{if(!ee.length||!X.length)return!1;const te=ee.reduce((Z,se)=>r.Range.plusRange(Z,se.range),ee[0].range);if(!X.some(Z=>r.Range.intersectRanges(te,Z.range)))return!1;for(const Z of ee)for(const se of X)if(r.Range.intersectRanges(Z.range,se.range))return!0;return!1},J=[],j=[];try{if(typeof x.provideDocumentRangesFormattingEdits=="function"){B.trace("[format][provideDocumentRangeFormattingEdits] (request)",x.extensionId?.value,U);const ee=await x.provideDocumentRangesFormattingEdits(K,U,K.getFormattingOptions(),H.token)||[];B.trace("[format][provideDocumentRangeFormattingEdits] (response)",x.extensionId?.value,ee),j.push(ee)}else{for(const ee of U){if(H.token.isCancellationRequested)return!0;j.push(await $(ee))}for(let ee=0;ee<U.length;++ee)for(let X=ee+1;X<U.length;++X){if(H.token.isCancellationRequested)return!0;if(ie(j[ee],j[X])){const te=r.Range.plusRange(U[ee],U[X]),Z=await $(te);U.splice(X,1),U.splice(ee,1),U.push(te),j.splice(X,1),j.splice(ee,1),j.push(Z),ee=0,X=0}}}for(const ee of j){if(H.token.isCancellationRequested)return!0;const X=await z.computeMoreMinimalEdits(K.uri,ee);X&&J.push(...X)}}finally{H.dispose()}if(J.length===0)return!1;if((0,h.isCodeEditor)(F))u.FormattingEdit.execute(F,J,!0),w(J),F.revealPositionInCenterIfOutsideViewport(F.getPosition(),1);else{const[{range:ee}]=J,X=new i.Selection(ee.startLineNumber,ee.startColumn,ee.endLineNumber,ee.endColumn);K.pushEditOperations([X],J.map(te=>({text:te.text,range:r.Range.lift(te.range),forceMoveMarkers:!0})),te=>{for(const{range:Z}of te)if(r.Range.areIntersectingOrTouching(Z,X))return[new i.Selection(Z.startLineNumber,Z.startColumn,Z.endLineNumber,Z.endColumn)];return null})}return!0}e.formatDocumentRangesWithProvider=A;async function k(P,x,F,V,W){const z=P.get(l.IInstantiationService),B=P.get(n.ILanguageFeaturesService),K=(0,h.isCodeEditor)(x)?x.getModel():x,H=E(B.documentFormattingEditProvider,B.documentRangeFormattingEditProvider,K),U=await I.select(H,K,F);U&&(V.report(U),await z.invokeFunction(L,U,x,F,W))}e.formatDocumentWithSelectedProvider=k;async function L(P,x,F,V,W){const z=P.get(s.IEditorWorkerService);let B,K;(0,h.isCodeEditor)(F)?(B=F.getModel(),K=new S.EditorStateCancellationTokenSource(F,5,void 0,W)):(B=F,K=new S.TextModelCancellationTokenSource(F,W));let H;try{const U=await x.provideDocumentFormattingEdits(B,B.getFormattingOptions(),K.token);if(H=await z.computeMoreMinimalEdits(B.uri,U),K.token.isCancellationRequested)return!0}finally{K.dispose()}if(!H||H.length===0)return!1;if((0,h.isCodeEditor)(F))u.FormattingEdit.execute(F,H,V!==2),V!==2&&(w(H),F.revealPositionInCenterIfOutsideViewport(F.getPosition(),1));else{const[{range:U}]=H,G=new i.Selection(U.startLineNumber,U.startColumn,U.endLineNumber,U.endColumn);B.pushEditOperations([G],H.map($=>({text:$.text,range:r.Range.lift($.range),forceMoveMarkers:!0})),$=>{for(const{range:ie}of $)if(r.Range.areIntersectingOrTouching(ie,G))return[new i.Selection(ie.startLineNumber,ie.startColumn,ie.endLineNumber,ie.endColumn)];return null})}return!0}e.formatDocumentWithProvider=L;async function R(P,x,F,V,W,z){const B=x.documentRangeFormattingEditProvider.ordered(F);for(const K of B){const H=await Promise.resolve(K.provideDocumentRangeFormattingEdits(F,V,W,z)).catch(D.onUnexpectedExternalError);if((0,y.isNonEmptyArray)(H))return await P.computeMoreMinimalEdits(F.uri,H)}}e.getDocumentRangeFormattingEditsUntilResult=R;async function M(P,x,F,V,W){const z=E(x.documentFormattingEditProvider,x.documentRangeFormattingEditProvider,F);for(const B of z){const K=await Promise.resolve(B.provideDocumentFormattingEdits(F,V,W)).catch(D.onUnexpectedExternalError);if((0,y.isNonEmptyArray)(K))return await P.computeMoreMinimalEdits(F.uri,K)}}e.getDocumentFormattingEditsUntilResult=M;function N(P,x,F,V,W,z,B){const K=x.onTypeFormattingEditProvider.ordered(F);return K.length===0||K[0].autoFormatTriggerCharacters.indexOf(W)<0?Promise.resolve(void 0):Promise.resolve(K[0].provideOnTypeFormattingEdits(F,V,W,z,B)).catch(D.onUnexpectedExternalError).then(H=>P.computeMoreMinimalEdits(F.uri,H))}e.getOnTypeFormattingEdits=N,p.CommandsRegistry.registerCommand("_executeFormatRangeProvider",async function(P,...x){const[F,V,W]=x;(0,v.assertType)(m.URI.isUri(F)),(0,v.assertType)(r.Range.isIRange(V));const z=P.get(o.ITextModelService),B=P.get(s.IEditorWorkerService),K=P.get(n.ILanguageFeaturesService),H=await z.createModelReference(F);try{return R(B,K,H.object.textEditorModel,r.Range.lift(V),W,b.CancellationToken.None)}finally{H.dispose()}}),p.CommandsRegistry.registerCommand("_executeFormatDocumentProvider",async function(P,...x){const[F,V]=x;(0,v.assertType)(m.URI.isUri(F));const W=P.get(o.ITextModelService),z=P.get(s.IEditorWorkerService),B=P.get(n.ILanguageFeaturesService),K=await W.createModelReference(F);try{return M(z,B,K.object.textEditorModel,V,b.CancellationToken.None)}finally{K.dispose()}}),p.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",async function(P,...x){const[F,V,W,z]=x;(0,v.assertType)(m.URI.isUri(F)),(0,v.assertType)(a.Position.isIPosition(V)),(0,v.assertType)(typeof W=="string");const B=P.get(o.ITextModelService),K=P.get(s.IEditorWorkerService),H=P.get(n.ILanguageFeaturesService),U=await B.createModelReference(F);try{return N(K,H,U.object.textEditorModel,a.Position.lift(V),W,z,b.CancellationToken.None)}finally{U.dispose()}})}),define(Q[3288],Y([1,0,20,31,15,105,4,48,79,486,27,73,242,74,411,1089,2389,28,8,5,72]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let l=class{static{this.ID="editor.contrib.autoFormat"}constructor(C,I,_){this._editor=C,this._languageFeaturesService=I,this._workerService=_,this._disposables=new T.DisposableStore,this._sessionDisposables=new T.DisposableStore,this._disposables.add(I.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(C.onDidChangeModel(()=>this._update())),this._disposables.add(C.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(C.onDidChangeConfiguration(A=>{A.hasChanged(55)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(55)||!this._editor.hasModel())return;const C=this._editor.getModel(),[I]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(C);if(!I||!I.autoFormatTriggerCharacters)return;const _=new m.CharacterSet;for(const A of I.autoFormatTriggerCharacters)_.add(A.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(A=>{const k=A.charCodeAt(A.length-1);_.has(k)&&this._trigger(String.fromCharCode(k))}))}_trigger(C){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const I=this._editor.getModel(),_=this._editor.getPosition(),A=new y.CancellationTokenSource,k=this._editor.onDidChangeModelContent(L=>{if(L.isFlush){A.cancel(),k.dispose();return}for(let R=0,M=L.changes.length;R<M;R++)if(L.changes[R].range.endLineNumber<=_.lineNumber){A.cancel(),k.dispose();return}});(0,i.getOnTypeFormattingEdits)(this._workerService,this._languageFeaturesService,I,_,C,I.getFormattingOptions(),A.token).then(L=>{A.token.isCancellationRequested||(0,t.isNonEmptyArray)(L)&&(s.FormattingEdit.execute(this._editor,L,!0),(0,i.alertFormattingEdits)(L))}).finally(()=>{k.dispose()})}};l=fe([O(1,r.ILanguageFeaturesService),O(2,a.IEditorWorkerService)],l);let n=class{static{this.ID="editor.contrib.formatOnPaste"}constructor(C,I,_){this.editor=C,this._languageFeaturesService=I,this._instantiationService=_,this._callOnDispose=new T.DisposableStore,this._callOnModel=new T.DisposableStore,this._callOnDispose.add(C.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(C.onDidChangeModel(()=>this._update())),this._callOnDispose.add(C.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(I.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(54)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:C})=>this._trigger(C)))}_trigger(C){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(i.formatDocumentRangesWithSelectedProvider,this.editor,C,2,c.Progress.None,y.CancellationToken.None).catch(b.onUnexpectedError))}};n=fe([O(1,r.ILanguageFeaturesService),O(2,p.IInstantiationService)],n);class g extends f.EditorAction{constructor(){super({id:"editor.action.formatDocument",label:o.localize(0,null),alias:"Format Document",precondition:d.ContextKeyExpr.and(h.EditorContextKeys.notInCompositeEditor,h.EditorContextKeys.writable,h.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(C,I){if(I.hasModel()){const _=C.get(p.IInstantiationService);await C.get(c.IEditorProgressService).showWhile(_.invokeFunction(i.formatDocumentWithSelectedProvider,I,1,c.Progress.None,y.CancellationToken.None),250)}}}class w extends f.EditorAction{constructor(){super({id:"editor.action.formatSelection",label:o.localize(1,null),alias:"Format Selection",precondition:d.ContextKeyExpr.and(h.EditorContextKeys.writable,h.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2084),weight:100},contextMenuOpts:{when:h.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(C,I){if(!I.hasModel())return;const _=C.get(p.IInstantiationService),A=I.getModel(),k=I.getSelections().map(R=>R.isEmpty()?new S.Range(R.startLineNumber,1,R.startLineNumber,A.getLineMaxColumn(R.startLineNumber)):R);await C.get(c.IEditorProgressService).showWhile(_.invokeFunction(i.formatDocumentRangesWithSelectedProvider,I,k,1,c.Progress.None,y.CancellationToken.None),250)}}(0,f.registerEditorContribution)(l.ID,l,2),(0,f.registerEditorContribution)(n.ID,n,2),(0,f.registerEditorAction)(g),(0,f.registerEditorAction)(w),u.CommandsRegistry.registerCommand("editor.action.format",async E=>{const C=E.get(v.ICodeEditorService).getFocusedCodeEditor();if(!C||!C.hasModel())return;const I=E.get(u.ICommandService);C.getSelection().isEmpty()?await I.executeCommand("editor.action.formatDocument"):await I.executeCommand("editor.action.formatSelection")})}),define(Q[882],Y([1,0,20,31,15,48,74,579]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getReferencesAtPosition=e.getTypeDefinitionsAtPosition=e.getImplementationsAtPosition=e.getDeclarationsAtPosition=e.getDefinitionsAtPosition=void 0;async function v(s,o,u,d){const c=u.ordered(s).map(n=>Promise.resolve(d(n,s,o)).then(void 0,g=>{(0,b.onUnexpectedExternalError)(g)})),l=await Promise.all(c);return(0,t.coalesce)(l.flat())}function m(s,o,u,d){return v(o,u,s,(p,c,l)=>p.provideDefinition(c,l,d))}e.getDefinitionsAtPosition=m;function S(s,o,u,d){return v(o,u,s,(p,c,l)=>p.provideDeclaration(c,l,d))}e.getDeclarationsAtPosition=S;function h(s,o,u,d){return v(o,u,s,(p,c,l)=>p.provideImplementation(c,l,d))}e.getImplementationsAtPosition=h;function a(s,o,u,d){return v(o,u,s,(p,c,l)=>p.provideTypeDefinition(c,l,d))}e.getTypeDefinitionsAtPosition=a;function r(s,o,u,d,p){return v(o,u,s,async(c,l,n)=>{const g=await c.provideReferences(l,n,{includeDeclaration:!0},p);if(!d||!g||g.length!==2)return g;const w=await c.provideReferences(l,n,{includeDeclaration:!1},p);return w&&w.length===1?w:g})}e.getReferencesAtPosition=r;async function i(s){const o=await s(),u=new f.ReferencesModel(o,""),d=u.references.map(p=>p.link);return u.dispose(),d}(0,D.registerModelAndPositionCommand)("_executeDefinitionProvider",(s,o,u)=>{const d=s.get(T.ILanguageFeaturesService),p=m(d.definitionProvider,o,u,y.CancellationToken.None);return i(()=>p)}),(0,D.registerModelAndPositionCommand)("_executeTypeDefinitionProvider",(s,o,u)=>{const d=s.get(T.ILanguageFeaturesService),p=a(d.typeDefinitionProvider,o,u,y.CancellationToken.None);return i(()=>p)}),(0,D.registerModelAndPositionCommand)("_executeDeclarationProvider",(s,o,u)=>{const d=s.get(T.ILanguageFeaturesService),p=S(d.declarationProvider,o,u,y.CancellationToken.None);return i(()=>p)}),(0,D.registerModelAndPositionCommand)("_executeReferenceProvider",(s,o,u)=>{const d=s.get(T.ILanguageFeaturesService),p=r(d.referenceProvider,o,u,!1,y.CancellationToken.None);return i(()=>p)}),(0,D.registerModelAndPositionCommand)("_executeImplementationProvider",(s,o,u)=>{const d=s.get(T.ILanguageFeaturesService),p=h(d.implementationProvider,o,u,y.CancellationToken.None);return i(()=>p)})}),define(Q[3289],Y([1,0,6,4,26,48,79,27,2398,8,35,5,38,113,23]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISymbolNavigationService=e.ctxHasSymbols=void 0,e.ctxHasSymbols=new m.RawContextKey("hasSymbols",!1,(0,v.localize)(0,null)),e.ISymbolNavigationService=(0,h.createDecorator)("ISymbolNavigationService");let s=class{constructor(d,p,c,l){this._editorService=p,this._notificationService=c,this._keybindingService=l,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=e.ctxHasSymbols.bindTo(d)}reset(){this._ctxHasSymbols.reset(),this._currentState?.dispose(),this._currentMessage?.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(d){const p=d.parent.parent;if(p.references.length<=1){this.reset();return}this._currentModel=p,this._currentIdx=p.references.indexOf(d),this._ctxHasSymbols.set(!0),this._showMessage();const c=new o(this._editorService),l=c.onDidChange(n=>{if(this._ignoreEditorChange)return;const g=this._editorService.getActiveCodeEditor();if(!g)return;const w=g.getModel(),E=g.getPosition();if(!w||!E)return;let C=!1,I=!1;for(const _ of p.references)if((0,b.isEqual)(_.uri,w.uri))C=!0,I=I||f.Range.containsPosition(_.range,E);else if(C)break;(!C||!I)&&this.reset()});this._currentState=(0,y.combinedDisposable)(c,l)}revealNext(d){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const p=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:p.uri,options:{selection:f.Range.collapseToStart(p.range),selectionRevealType:3}},d).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){this._currentMessage?.dispose();const d=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),p=d?(0,v.localize)(1,null,this._currentIdx+1,this._currentModel.references.length,d.getLabel()):(0,v.localize)(2,null,this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(p)}};s=fe([O(0,m.IContextKeyService),O(1,T.ICodeEditorService),O(2,i.INotificationService),O(3,a.IKeybindingService)],s),(0,S.registerSingleton)(e.ISymbolNavigationService,s,1),(0,D.registerEditorCommand)(new class extends D.EditorCommand{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:e.ctxHasSymbols,kbOpts:{weight:100,primary:70}})}runEditorCommand(u,d){return u.get(e.ISymbolNavigationService).revealNext(d)}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:e.ctxHasSymbols,primary:9,handler(u){u.get(e.ISymbolNavigationService).reset()}});let o=class{constructor(d){this._listener=new Map,this._disposables=new y.DisposableStore,this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event,this._disposables.add(d.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(d.onCodeEditorAdd(this._onDidAddEditor,this)),d.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,y.dispose)(this._listener.values())}_onDidAddEditor(d){this._listener.set(d,(0,y.combinedDisposable)(d.onDidChangeCursorPosition(p=>this._onDidChange.fire({editor:d})),d.onDidChangeModelContent(p=>this._onDidChange.fire({editor:d}))))}_onDidRemoveEditor(d){this._listener.get(d)?.dispose(),this._listener.delete(d)}};o=fe([O(0,T.ICodeEditorService)],o)}),define(Q[1188],Y([1,0,14,31,15,48,74]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHoverPromise=e.getHover=e.HoverProviderResult=void 0;class f{constructor(r,i,s){this.provider=r,this.hover=i,this.ordinal=s}}e.HoverProviderResult=f;async function v(a,r,i,s,o){try{const u=await Promise.resolve(a.provideHover(i,s,o));if(u&&h(u))return new f(a,u,r)}catch(u){(0,b.onUnexpectedExternalError)(u)}}function m(a,r,i,s){const u=a.ordered(r).map((d,p)=>v(d,p,r,i,s));return t.AsyncIterableObject.fromPromises(u).coalesce()}e.getHover=m;function S(a,r,i,s){return m(a,r,i,s).map(o=>o.hover).toPromise()}e.getHoverPromise=S,(0,D.registerModelAndPositionCommand)("_executeHoverProvider",(a,r,i)=>{const s=a.get(T.ILanguageFeaturesService);return S(s.hoverProvider,r,i,y.CancellationToken.None)});function h(a){const r=typeof a.range<"u",i=typeof a.contents<"u"&&a.contents&&a.contents.length>0;return r&&i}}),define(Q[883],Y([1,0,7,20,14,110,4,209,51,27,50,1188,2400,9,41,74]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdownHovers=e.MarkdownHoverParticipant=e.MarkdownHover=void 0;const o=t.$;class u{constructor(l,n,g,w,E){this.owner=l,this.range=n,this.contents=g,this.isBeforeContent=w,this.ordinal=E}isValidForHoverAnchor(l){return l.type===1&&this.range.startColumn<=l.range.startColumn&&this.range.endColumn>=l.range.endColumn}}e.MarkdownHover=u;let d=class{constructor(l,n,g,w,E){this._editor=l,this._languageService=n,this._openerService=g,this._configurationService=w,this._languageFeaturesService=E,this.hoverOrdinal=3}createLoadingMessage(l){return new u(this,l.range,[new D.MarkdownString().appendText(a.localize(0,null))],!1,2e3)}computeSync(l,n){if(!this._editor.hasModel()||l.type!==1)return[];const g=this._editor.getModel(),w=l.range.startLineNumber,E=g.getLineMaxColumn(w),C=[];let I=1e3;const _=g.getLineLength(w),A=g.getLanguageIdAtPosition(l.range.startLineNumber,l.range.startColumn),k=this._editor.getOption(115),L=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:A});let R=!1;k>=0&&_>k&&l.range.startColumn>=k&&(R=!0,C.push(new u(this,l.range,[{value:a.localize(1,null)}],!1,I++))),!R&&typeof L=="number"&&_>=L&&C.push(new u(this,l.range,[{value:a.localize(2,null)}],!1,I++));let M=!1;for(const N of n){const P=N.range.startLineNumber===w?N.range.startColumn:1,x=N.range.endLineNumber===w?N.range.endColumn:E,F=N.options.hoverMessage;if(!F||(0,D.isEmptyMarkdownString)(F))continue;N.options.beforeContentClassName&&(M=!0);const V=new m.Range(l.range.startLineNumber,P,l.range.startLineNumber,x);C.push(new u(this,V,(0,y.asArray)(F),M,I++))}return C}computeAsync(l,n,g){if(!this._editor.hasModel()||l.type!==1)return b.AsyncIterableObject.EMPTY;const w=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(w))return b.AsyncIterableObject.EMPTY;const E=new v.Position(l.range.startLineNumber,l.range.startColumn);return(0,h.getHover)(this._languageFeaturesService.hoverProvider,w,E,g).filter(C=>!(0,D.isEmptyMarkdownString)(C.hover.contents)).map(C=>{const I=C.hover.range?m.Range.lift(C.hover.range):l.range;return new u(this,I,C.hover.contents,!1,C.ordinal)})}renderHoverParts(l,n){return p(l,n,this._editor,this._languageService,this._openerService)}};e.MarkdownHoverParticipant=d,e.MarkdownHoverParticipant=d=fe([O(1,S.ILanguageService),O(2,i.IOpenerService),O(3,r.IConfigurationService),O(4,s.ILanguageFeaturesService)],d);function p(c,l,n,g,w){l.sort((C,I)=>C.ordinal-I.ordinal);const E=new T.DisposableStore;for(const C of l)for(const I of C.contents){if((0,D.isEmptyMarkdownString)(I))continue;const _=o("div.hover-row.markdown-hover"),A=t.append(_,o("div.hover-contents")),k=E.add(new f.MarkdownRenderer({editor:n},g,w));E.add(k.onDidRenderAsync(()=>{A.className="hover-contents code-hover-contents",c.onContentsChanged()}));const L=E.add(k.render(I));A.appendChild(L.element),c.fragment.appendChild(_)}return E}e.renderMarkdownHovers=p}),define(Q[1189],Y([1,0,4,33,48,877,165,27,96,73,125,57,1090,2403,43,794,875]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentationToTabsCommand=e.IndentationToSpacesCommand=e.AutoIndentOnPaste=e.AutoIndentOnPasteCommand=e.ReindentSelectedLinesAction=e.ReindentLinesAction=e.DetectIndentation=e.ChangeTabDisplaySize=e.IndentUsingSpaces=e.IndentUsingTabs=e.ChangeIndentationSizeAction=e.IndentationToTabsAction=e.IndentationToSpacesAction=e.getReindentEditOperations=void 0;function u(R,M,N,P,x){if(R.getLineCount()===1&&R.getLineMaxColumn(1)===1)return[];const F=M.getLanguageConfiguration(R.getLanguageId()).indentationRules;if(!F)return[];for(P=Math.min(P,R.getLineCount());N<=P&&F.unIndentedLinePattern;){const J=R.getLineContent(N);if(!F.unIndentedLinePattern.test(J))break;N++}if(N>P-1)return[];const{tabSize:V,indentSize:W,insertSpaces:z}=R.getOptions(),B=(J,j)=>(j=j||1,D.ShiftCommand.shiftIndent(J,J.length+j,V,W,z)),K=(J,j)=>(j=j||1,D.ShiftCommand.unshiftIndent(J,J.length+j,V,W,z)),H=[];let U;const G=R.getLineContent(N);let $=G;if(x!=null){U=x;const J=y.getLeadingWhitespace(G);$=U+G.substring(J.length),F.decreaseIndentPattern&&F.decreaseIndentPattern.test($)&&(U=K(U),$=U+G.substring(J.length)),G!==$&&H.push(T.EditOperation.replaceMove(new v.Selection(N,1,N,J.length+1),(0,s.normalizeIndentation)(U,W,z)))}else U=y.getLeadingWhitespace(G);let ie=U;F.increaseIndentPattern&&F.increaseIndentPattern.test($)?(ie=B(ie),U=B(U)):F.indentNextLinePattern&&F.indentNextLinePattern.test($)&&(ie=B(ie)),N++;for(let J=N;J<=P;J++){const j=R.getLineContent(J),ee=y.getLeadingWhitespace(j),X=ie+j.substring(ee.length);F.decreaseIndentPattern&&F.decreaseIndentPattern.test(X)&&(ie=K(ie),U=K(U)),ee!==ie&&H.push(T.EditOperation.replaceMove(new v.Selection(J,1,J,ee.length+1),(0,s.normalizeIndentation)(ie,W,z))),!(F.unIndentedLinePattern&&F.unIndentedLinePattern.test(j))&&(F.increaseIndentPattern&&F.increaseIndentPattern.test(X)?(U=B(U),ie=U):F.indentNextLinePattern&&F.indentNextLinePattern.test(X)?ie=B(ie):ie=U)}return H}e.getReindentEditOperations=u;class d extends b.EditorAction{static{this.ID="editor.action.indentationToSpaces"}constructor(){super({id:d.ID,label:r.localize(0,null),alias:"Convert Indentation to Spaces",precondition:m.EditorContextKeys.writable})}run(M,N){const P=N.getModel();if(!P)return;const x=P.getOptions(),F=N.getSelection();if(!F)return;const V=new k(F,x.tabSize);N.pushUndoStop(),N.executeCommands(this.id,[V]),N.pushUndoStop(),P.updateOptions({insertSpaces:!0})}}e.IndentationToSpacesAction=d;class p extends b.EditorAction{static{this.ID="editor.action.indentationToTabs"}constructor(){super({id:p.ID,label:r.localize(1,null),alias:"Convert Indentation to Tabs",precondition:m.EditorContextKeys.writable})}run(M,N){const P=N.getModel();if(!P)return;const x=P.getOptions(),F=N.getSelection();if(!F)return;const V=new L(F,x.tabSize);N.pushUndoStop(),N.executeCommands(this.id,[V]),N.pushUndoStop(),P.updateOptions({insertSpaces:!1})}}e.IndentationToTabsAction=p;class c extends b.EditorAction{constructor(M,N,P){super(P),this.insertSpaces=M,this.displaySizeOnly=N}run(M,N){const P=M.get(i.IQuickInputService),x=M.get(h.IModelService),F=N.getModel();if(!F)return;const V=x.getCreationOptions(F.getLanguageId(),F.uri,F.isForSimpleWidget),W=F.getOptions(),z=[1,2,3,4,5,6,7,8].map(K=>({id:K.toString(),label:K.toString(),description:K===V.tabSize&&K===W.tabSize?r.localize(2,null):K===V.tabSize?r.localize(3,null):K===W.tabSize?r.localize(4,null):void 0})),B=Math.min(F.getOptions().tabSize-1,7);setTimeout(()=>{P.pick(z,{placeHolder:r.localize(5,null),activeItem:z[B]}).then(K=>{if(K&&F&&!F.isDisposed()){const H=parseInt(K.label,10);this.displaySizeOnly?F.updateOptions({tabSize:H}):F.updateOptions({tabSize:H,indentSize:H,insertSpaces:this.insertSpaces})}})},50)}}e.ChangeIndentationSizeAction=c;class l extends c{static{this.ID="editor.action.indentUsingTabs"}constructor(){super(!1,!1,{id:l.ID,label:r.localize(6,null),alias:"Indent Using Tabs",precondition:void 0})}}e.IndentUsingTabs=l;class n extends c{static{this.ID="editor.action.indentUsingSpaces"}constructor(){super(!0,!1,{id:n.ID,label:r.localize(7,null),alias:"Indent Using Spaces",precondition:void 0})}}e.IndentUsingSpaces=n;class g extends c{static{this.ID="editor.action.changeTabDisplaySize"}constructor(){super(!0,!0,{id:g.ID,label:r.localize(8,null),alias:"Change Tab Display Size",precondition:void 0})}}e.ChangeTabDisplaySize=g;class w extends b.EditorAction{static{this.ID="editor.action.detectIndentation"}constructor(){super({id:w.ID,label:r.localize(9,null),alias:"Detect Indentation from Content",precondition:void 0})}run(M,N){const P=M.get(h.IModelService),x=N.getModel();if(!x)return;const F=P.getCreationOptions(x.getLanguageId(),x.uri,x.isForSimpleWidget);x.detectIndentation(F.insertSpaces,F.tabSize)}}e.DetectIndentation=w;class E extends b.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:r.localize(10,null),alias:"Reindent Lines",precondition:m.EditorContextKeys.writable})}run(M,N){const P=M.get(S.ILanguageConfigurationService),x=N.getModel();if(!x)return;const F=u(x,P,1,x.getLineCount());F.length>0&&(N.pushUndoStop(),N.executeEdits(this.id,F),N.pushUndoStop())}}e.ReindentLinesAction=E;class C extends b.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:r.localize(11,null),alias:"Reindent Selected Lines",precondition:m.EditorContextKeys.writable})}run(M,N){const P=M.get(S.ILanguageConfigurationService),x=N.getModel();if(!x)return;const F=N.getSelections();if(F===null)return;const V=[];for(const W of F){let z=W.startLineNumber,B=W.endLineNumber;if(z!==B&&W.endColumn===1&&B--,z===1){if(z===B)continue}else z--;const K=u(x,P,z,B);V.push(...K)}V.length>0&&(N.pushUndoStop(),N.executeEdits(this.id,V),N.pushUndoStop())}}e.ReindentSelectedLinesAction=C;class I{constructor(M,N){this._initialSelection=N,this._edits=[],this._selectionId=null;for(const P of M)P.range&&typeof P.text=="string"&&this._edits.push(P)}getEditOperations(M,N){for(const x of this._edits)N.addEditOperation(f.Range.lift(x.range),x.text);let P=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(P=!0,this._selectionId=N.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(P=!0,this._selectionId=N.trackSelection(this._initialSelection,!1))),P||(this._selectionId=N.trackSelection(this._initialSelection))}computeCursorState(M,N){return N.getTrackedSelection(this._selectionId)}}e.AutoIndentOnPasteCommand=I;let _=class{static{this.ID="editor.contrib.autoIndentOnPaste"}constructor(M,N){this.editor=M,this._languageConfigurationService=N,this.callOnDispose=new t.DisposableStore,this.callOnModel=new t.DisposableStore,this.callOnDispose.add(M.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(M.onDidChangeModel(()=>this.update())),this.callOnDispose.add(M.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(11)<4||this.editor.getOption(54))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:M})=>{this.trigger(M)}))}trigger(M){const N=this.editor.getSelections();if(N===null||N.length>1)return;const P=this.editor.getModel();if(!P||!P.tokenization.isCheapToTokenize(M.getStartPosition().lineNumber))return;const x=this.editor.getOption(11),{tabSize:F,indentSize:V,insertSpaces:W}=P.getOptions(),z=[],B={shiftIndent:G=>D.ShiftCommand.shiftIndent(G,G.length+1,F,V,W),unshiftIndent:G=>D.ShiftCommand.unshiftIndent(G,G.length+1,F,V,W)};let K=M.startLineNumber;for(;K<=M.endLineNumber;){if(this.shouldIgnoreLine(P,K)){K++;continue}break}if(K>M.endLineNumber)return;let H=P.getLineContent(K);if(!/\S/.test(H.substring(0,M.startColumn-1))){const G=(0,o.getGoodIndentForLine)(x,P,P.getLanguageId(),K,B,this._languageConfigurationService);if(G!==null){const $=y.getLeadingWhitespace(H),ie=a.getSpaceCnt(G,F),J=a.getSpaceCnt($,F);if(ie!==J){const j=a.generateIndent(ie,F,W);z.push({range:new f.Range(K,1,K,$.length+1),text:j}),H=j+H.substr($.length)}else{const j=(0,o.getIndentMetadata)(P,K,this._languageConfigurationService);if(j===0||j===8)return}}}const U=K;for(;K<M.endLineNumber;){if(!/\S/.test(P.getLineContent(K+1))){K++;continue}break}if(K!==M.endLineNumber){const G={tokenization:{getLineTokens:ie=>P.tokenization.getLineTokens(ie),getLanguageId:()=>P.getLanguageId(),getLanguageIdAtPosition:(ie,J)=>P.getLanguageIdAtPosition(ie,J)},getLineContent:ie=>ie===U?H:P.getLineContent(ie)},$=(0,o.getGoodIndentForLine)(x,G,P.getLanguageId(),K+1,B,this._languageConfigurationService);if($!==null){const ie=a.getSpaceCnt($,F),J=a.getSpaceCnt(y.getLeadingWhitespace(P.getLineContent(K+1)),F);if(ie!==J){const j=ie-J;for(let ee=K+1;ee<=M.endLineNumber;ee++){const X=P.getLineContent(ee),te=y.getLeadingWhitespace(X),se=a.getSpaceCnt(te,F)+j,re=a.generateIndent(se,F,W);re!==te&&z.push({range:new f.Range(ee,1,ee,te.length+1),text:re})}}}}if(z.length>0){this.editor.pushUndoStop();const G=new I(z,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",G),this.editor.pushUndoStop()}}shouldIgnoreLine(M,N){M.tokenization.forceTokenization(N);const P=M.getLineFirstNonWhitespaceColumn(N);if(P===0)return!0;const x=M.tokenization.getLineTokens(N);if(x.getCount()>0){const F=x.findTokenIndexAtOffset(P);if(F>=0&&x.getStandardTokenType(F)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};e.AutoIndentOnPaste=_,e.AutoIndentOnPaste=_=fe([O(1,S.ILanguageConfigurationService)],_);function A(R,M,N,P){if(R.getLineCount()===1&&R.getLineMaxColumn(1)===1)return;let x="";for(let V=0;V<N;V++)x+=" ";const F=new RegExp(x,"gi");for(let V=1,W=R.getLineCount();V<=W;V++){let z=R.getLineFirstNonWhitespaceColumn(V);if(z===0&&(z=R.getLineMaxColumn(V)),z===1)continue;const B=new f.Range(V,1,V,z),K=R.getValueInRange(B),H=P?K.replace(/\t/ig,x):K.replace(F," ");M.addEditOperation(B,H)}}class k{constructor(M,N){this.selection=M,this.tabSize=N,this.selectionId=null}getEditOperations(M,N){this.selectionId=N.trackSelection(this.selection),A(M,N,this.tabSize,!0)}computeCursorState(M,N){return N.getTrackedSelection(this.selectionId)}}e.IndentationToSpacesCommand=k;class L{constructor(M,N){this.selection=M,this.tabSize=N,this.selectionId=null}getEditOperations(M,N){this.selectionId=N.trackSelection(this.selection),A(M,N,this.tabSize,!1)}computeCursorState(M,N){return N.getTrackedSelection(this.selectionId)}}e.IndentationToTabsCommand=L,(0,b.registerEditorContribution)(_.ID,_,2),(0,b.registerEditorAction)(d),(0,b.registerEditorAction)(p),(0,b.registerEditorAction)(l),(0,b.registerEditorAction)(n),(0,b.registerEditorAction)(g),(0,b.registerEditorAction)(w),(0,b.registerEditorAction)(E),(0,b.registerEditorAction)(C)}),define(Q[3290],Y([1,0,48,797,73,2410]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExpandLineSelectionAction=void 0;class T extends t.EditorAction{constructor(){super({id:"expandLineSelection",label:D.localize(0,null),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:b.EditorContextKeys.textInputFocus,primary:2090}})}run(v,m,S){if(S=S||{},!m.hasModel())return;const h=m._getViewModel();h.model.pushStackElement(),h.setCursorStates(S.source,3,y.CursorMoveCommands.expandLineSelection(h,h.getCursorStates())),h.revealPrimaryCursor(S.source,!0)}}e.ExpandLineSelectionAction=T,(0,t.registerEditorAction)(T)}),define(Q[1190],Y([1,0,105,511,48,487,1069,878,165,51,27,96,73,1915,3252,1916,2411,13,125]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KebabCaseAction=e.CamelCaseAction=e.SnakeCaseAction=e.TitleCaseAction=e.LowerCaseAction=e.UpperCaseAction=e.AbstractCaseAction=e.TransposeAction=e.JoinLinesAction=e.DeleteAllRightAction=e.DeleteAllLeftAction=e.AbstractDeleteAllToBoundaryAction=e.InsertLineAfterAction=e.InsertLineBeforeAction=e.IndentLinesAction=e.DeleteLinesAction=e.TrimTrailingWhitespaceAction=e.DeleteDuplicateLinesAction=e.SortLinesDescendingAction=e.SortLinesAscendingAction=e.AbstractSortLinesAction=e.DuplicateSelectionAction=void 0;class p extends b.EditorAction{constructor(ee,X){super(X),this.down=ee}run(ee,X){if(!X.hasModel())return;const te=X.getSelections().map((re,oe)=>({selection:re,index:oe,ignore:!1}));te.sort((re,oe)=>S.Range.compareRangesUsingStarts(re.selection,oe.selection));let Z=te[0];for(let re=1;re<te.length;re++){const oe=te[re];Z.selection.endLineNumber===oe.selection.startLineNumber&&(Z.index<oe.index?oe.ignore=!0:(Z.ignore=!0,Z=oe))}const se=[];for(const re of te)se.push(new r.CopyLinesCommand(re.selection,this.down,re.ignore));X.pushUndoStop(),X.executeCommands(this.id,se),X.pushUndoStop()}}class c extends p{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:o.localize(0,null),alias:"Copy Line Up",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"2_line",title:o.localize(1,null),order:1}})}}class l extends p{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:o.localize(2,null),alias:"Copy Line Down",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"2_line",title:o.localize(3,null),order:2}})}}class n extends b.EditorAction{constructor(){super({id:"editor.action.duplicateSelection",label:o.localize(4,null),alias:"Duplicate Selection",precondition:a.EditorContextKeys.writable,menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"2_line",title:o.localize(5,null),order:5}})}run(ee,X,te){if(!X.hasModel())return;const Z=[],se=X.getSelections(),re=X.getModel();for(const oe of se)if(oe.isEmpty())Z.push(new r.CopyLinesCommand(oe,!0));else{const le=new h.Selection(oe.endLineNumber,oe.endColumn,oe.endLineNumber,oe.endColumn);Z.push(new D.ReplaceCommandThatSelectsText(le,re.getValueInRange(oe)))}X.pushUndoStop(),X.executeCommands(this.id,Z),X.pushUndoStop()}}e.DuplicateSelectionAction=n;class g extends b.EditorAction{constructor(ee,X){super(X),this.down=ee}run(ee,X){const te=ee.get(d.ILanguageConfigurationService),Z=[],se=X.getSelections()||[],re=X.getOption(11);for(const oe of se)Z.push(new i.MoveLinesCommand(oe,this.down,re,te));X.pushUndoStop(),X.executeCommands(this.id,Z),X.pushUndoStop()}}class w extends g{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:o.localize(6,null),alias:"Move Line Up",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"2_line",title:o.localize(7,null),order:3}})}}class E extends g{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:o.localize(8,null),alias:"Move Line Down",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"2_line",title:o.localize(9,null),order:4}})}}class C extends b.EditorAction{constructor(ee,X){super(X),this.descending=ee}run(ee,X){const te=X.getSelections()||[];for(const se of te)if(!s.SortLinesCommand.canRun(X.getModel(),se,this.descending))return;const Z=[];for(let se=0,re=te.length;se<re;se++)Z[se]=new s.SortLinesCommand(te[se],this.descending);X.pushUndoStop(),X.executeCommands(this.id,Z),X.pushUndoStop()}}e.AbstractSortLinesAction=C;class I extends C{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:o.localize(10,null),alias:"Sort Lines Ascending",precondition:a.EditorContextKeys.writable})}}e.SortLinesAscendingAction=I;class _ extends C{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:o.localize(11,null),alias:"Sort Lines Descending",precondition:a.EditorContextKeys.writable})}}e.SortLinesDescendingAction=_;class A extends b.EditorAction{constructor(){super({id:"editor.action.removeDuplicateLines",label:o.localize(12,null),alias:"Delete Duplicate Lines",precondition:a.EditorContextKeys.writable})}run(ee,X){if(!X.hasModel())return;const te=X.getModel();if(te.getLineCount()===1&&te.getLineMaxColumn(1)===1)return;const Z=[],se=[];let re=0;for(const oe of X.getSelections()){const le=new Set,ne=[];for(let de=oe.startLineNumber;de<=oe.endLineNumber;de++){const ge=te.getLineContent(de);le.has(ge)||(ne.push(ge),le.add(ge))}const ce=new h.Selection(oe.startLineNumber,1,oe.endLineNumber,te.getLineMaxColumn(oe.endLineNumber)),ae=oe.startLineNumber-re,ue=new h.Selection(ae,1,ae+ne.length-1,ne[ne.length-1].length);Z.push(v.EditOperation.replace(ce,ne.join(` `))),se.push(ue),re+=oe.endLineNumber-oe.startLineNumber+1-ne.length}X.pushUndoStop(),X.executeEdits(this.id,Z,se),X.pushUndoStop()}}e.DeleteDuplicateLinesAction=A;class k extends b.EditorAction{static{this.ID="editor.action.trimTrailingWhitespace"}constructor(){super({id:k.ID,label:o.localize(13,null),alias:"Trim Trailing Whitespace",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,t.KeyChord)(2089,2102),weight:100}})}run(ee,X,te){let Z=[];te.reason==="auto-save"&&(Z=(X.getSelections()||[]).map(oe=>new m.Position(oe.positionLineNumber,oe.positionColumn)));const se=X.getSelection();if(se===null)return;const re=new T.TrimTrailingWhitespaceCommand(se,Z);X.pushUndoStop(),X.executeCommands(this.id,[re]),X.pushUndoStop()}}e.TrimTrailingWhitespaceAction=k;class L extends b.EditorAction{constructor(){super({id:"editor.action.deleteLines",label:o.localize(14,null),alias:"Delete Line",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.textInputFocus,primary:3113,weight:100}})}run(ee,X){if(!X.hasModel())return;const te=this._getLinesToRemove(X),Z=X.getModel();if(Z.getLineCount()===1&&Z.getLineMaxColumn(1)===1)return;let se=0;const re=[],oe=[];for(let le=0,ne=te.length;le<ne;le++){const ce=te[le];let ae=ce.startLineNumber,ue=ce.endLineNumber,de=1,ge=Z.getLineMaxColumn(ue);ue<Z.getLineCount()?(ue+=1,ge=1):ae>1&&(ae-=1,de=Z.getLineMaxColumn(ae)),re.push(v.EditOperation.replace(new h.Selection(ae,de,ue,ge),"")),oe.push(new h.Selection(ae-se,ce.positionColumn,ae-se,ce.positionColumn)),se+=ce.endLineNumber-ce.startLineNumber+1}X.pushUndoStop(),X.executeEdits(this.id,re,oe),X.pushUndoStop()}_getLinesToRemove(ee){const X=ee.getSelections().map(se=>{let re=se.endLineNumber;return se.startLineNumber<se.endLineNumber&&se.endColumn===1&&(re-=1),{startLineNumber:se.startLineNumber,selectionStartColumn:se.selectionStartColumn,endLineNumber:re,positionColumn:se.positionColumn}});X.sort((se,re)=>se.startLineNumber===re.startLineNumber?se.endLineNumber-re.endLineNumber:se.startLineNumber-re.startLineNumber);const te=[];let Z=X[0];for(let se=1;se<X.length;se++)Z.endLineNumber+1>=X[se].startLineNumber?Z.endLineNumber=X[se].endLineNumber:(te.push(Z),Z=X[se]);return te.push(Z),te}}e.DeleteLinesAction=L;class R extends b.EditorAction{constructor(){super({id:"editor.action.indentLines",label:o.localize(15,null),alias:"Indent Line",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:2142,weight:100}})}run(ee,X){const te=X._getViewModel();te&&(X.pushUndoStop(),X.executeCommands(this.id,f.TypeOperations.indent(te.cursorConfig,X.getModel(),X.getSelections())),X.pushUndoStop())}}e.IndentLinesAction=R;class M extends b.EditorAction{constructor(){super({id:"editor.action.outdentLines",label:o.localize(16,null),alias:"Outdent Line",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:2140,weight:100}})}run(ee,X){y.CoreEditingCommands.Outdent.runEditorCommand(ee,X,null)}}class N extends b.EditorAction{constructor(){super({id:"editor.action.insertLineBefore",label:o.localize(17,null),alias:"Insert Line Above",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:3075,weight:100}})}run(ee,X){const te=X._getViewModel();te&&(X.pushUndoStop(),X.executeCommands(this.id,f.TypeOperations.lineInsertBefore(te.cursorConfig,X.getModel(),X.getSelections())))}}e.InsertLineBeforeAction=N;class P extends b.EditorAction{constructor(){super({id:"editor.action.insertLineAfter",label:o.localize(18,null),alias:"Insert Line Below",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:2051,weight:100}})}run(ee,X){const te=X._getViewModel();te&&(X.pushUndoStop(),X.executeCommands(this.id,f.TypeOperations.lineInsertAfter(te.cursorConfig,X.getModel(),X.getSelections())))}}e.InsertLineAfterAction=P;class x extends b.EditorAction{run(ee,X){if(!X.hasModel())return;const te=X.getSelection(),Z=this._getRangesToDelete(X),se=[];for(let le=0,ne=Z.length-1;le<ne;le++){const ce=Z[le],ae=Z[le+1];S.Range.intersectRanges(ce,ae)===null?se.push(ce):Z[le+1]=S.Range.plusRange(ce,ae)}se.push(Z[Z.length-1]);const re=this._getEndCursorState(te,se),oe=se.map(le=>v.EditOperation.replace(le,""));X.pushUndoStop(),X.executeEdits(this.id,oe,re),X.pushUndoStop()}}e.AbstractDeleteAllToBoundaryAction=x;class F extends x{constructor(){super({id:"deleteAllLeft",label:o.localize(19,null),alias:"Delete All Left",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(ee,X){let te=null;const Z=[];let se=0;return X.forEach(re=>{let oe;if(re.endColumn===1&&se>0){const le=re.startLineNumber-se;oe=new h.Selection(le,re.startColumn,le,re.startColumn)}else oe=new h.Selection(re.startLineNumber,re.startColumn,re.startLineNumber,re.startColumn);se+=re.endLineNumber-re.startLineNumber,re.intersectRanges(ee)?te=oe:Z.push(oe)}),te&&Z.unshift(te),Z}_getRangesToDelete(ee){const X=ee.getSelections();if(X===null)return[];let te=X;const Z=ee.getModel();return Z===null?[]:(te.sort(S.Range.compareRangesUsingStarts),te=te.map(se=>{if(se.isEmpty())if(se.startColumn===1){const re=Math.max(1,se.startLineNumber-1),oe=se.startLineNumber===1?1:Z.getLineContent(re).length+1;return new S.Range(re,oe,se.startLineNumber,1)}else return new S.Range(se.startLineNumber,1,se.startLineNumber,se.startColumn);else return new S.Range(se.startLineNumber,1,se.endLineNumber,se.endColumn)}),te)}}e.DeleteAllLeftAction=F;class V extends x{constructor(){super({id:"deleteAllRight",label:o.localize(20,null),alias:"Delete All Right",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(ee,X){let te=null;const Z=[];for(let se=0,re=X.length,oe=0;se<re;se++){const le=X[se],ne=new h.Selection(le.startLineNumber-oe,le.startColumn,le.startLineNumber-oe,le.startColumn);le.intersectRanges(ee)?te=ne:Z.push(ne)}return te&&Z.unshift(te),Z}_getRangesToDelete(ee){const X=ee.getModel();if(X===null)return[];const te=ee.getSelections();if(te===null)return[];const Z=te.map(se=>{if(se.isEmpty()){const re=X.getLineMaxColumn(se.startLineNumber);return se.startColumn===re?new S.Range(se.startLineNumber,se.startColumn,se.startLineNumber+1,1):new S.Range(se.startLineNumber,se.startColumn,se.startLineNumber,re)}return se});return Z.sort(S.Range.compareRangesUsingStarts),Z}}e.DeleteAllRightAction=V;class W extends b.EditorAction{constructor(){super({id:"editor.action.joinLines",label:o.localize(21,null),alias:"Join Lines",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(ee,X){const te=X.getSelections();if(te===null)return;let Z=X.getSelection();if(Z===null)return;te.sort(S.Range.compareRangesUsingStarts);const se=[],re=te.reduce((ue,de)=>ue.isEmpty()?ue.endLineNumber===de.startLineNumber?(Z.equalsSelection(ue)&&(Z=de),de):de.startLineNumber>ue.endLineNumber+1?(se.push(ue),de):new h.Selection(ue.startLineNumber,ue.startColumn,de.endLineNumber,de.endColumn):de.startLineNumber>ue.endLineNumber?(se.push(ue),de):new h.Selection(ue.startLineNumber,ue.startColumn,de.endLineNumber,de.endColumn));se.push(re);const oe=X.getModel();if(oe===null)return;const le=[],ne=[];let ce=Z,ae=0;for(let ue=0,de=se.length;ue<de;ue++){const ge=se[ue],he=ge.startLineNumber,be=1;let ve=0,Ie,Se;const we=oe.getLineContent(ge.endLineNumber).length-ge.endColumn;if(ge.isEmpty()||ge.startLineNumber===ge.endLineNumber){const Le=ge.getStartPosition();Le.lineNumber<oe.getLineCount()?(Ie=he+1,Se=oe.getLineMaxColumn(Ie)):(Ie=Le.lineNumber,Se=oe.getLineMaxColumn(Le.lineNumber))}else Ie=ge.endLineNumber,Se=oe.getLineMaxColumn(Ie);let ye=oe.getLineContent(he);for(let Le=he+1;Le<=Ie;Le++){const Pe=oe.getLineContent(Le),Ae=oe.getLineFirstNonWhitespaceColumn(Le);if(Ae>=1){let Me=!0;ye===""&&(Me=!1),Me&&(ye.charAt(ye.length-1)===" "||ye.charAt(ye.length-1)===" ")&&(Me=!1,ye=ye.replace(/[\s\uFEFF\xA0]+$/g," "));const Oe=Pe.substr(Ae-1);ye+=(Me?" ":"")+Oe,Me?ve=Oe.length+1:ve=Oe.length}else ve=0}const Re=new S.Range(he,be,Ie,Se);if(!Re.isEmpty()){let Le;ge.isEmpty()?(le.push(v.EditOperation.replace(Re,ye)),Le=new h.Selection(Re.startLineNumber-ae,ye.length-ve+1,he-ae,ye.length-ve+1)):ge.startLineNumber===ge.endLineNumber?(le.push(v.EditOperation.replace(Re,ye)),Le=new h.Selection(ge.startLineNumber-ae,ge.startColumn,ge.endLineNumber-ae,ge.endColumn)):(le.push(v.EditOperation.replace(Re,ye)),Le=new h.Selection(ge.startLineNumber-ae,ge.startColumn,ge.startLineNumber-ae,ye.length-we)),S.Range.intersectRanges(Re,Z)!==null?ce=Le:ne.push(Le)}ae+=Re.endLineNumber-Re.startLineNumber}ne.unshift(ce),X.pushUndoStop(),X.executeEdits(this.id,le,ne),X.pushUndoStop()}}e.JoinLinesAction=W;class z extends b.EditorAction{constructor(){super({id:"editor.action.transpose",label:o.localize(22,null),alias:"Transpose Characters around the Cursor",precondition:a.EditorContextKeys.writable})}run(ee,X){const te=X.getSelections();if(te===null)return;const Z=X.getModel();if(Z===null)return;const se=[];for(let re=0,oe=te.length;re<oe;re++){const le=te[re];if(!le.isEmpty())continue;const ne=le.getStartPosition(),ce=Z.getLineMaxColumn(ne.lineNumber);if(ne.column>=ce){if(ne.lineNumber===Z.getLineCount())continue;const ae=new S.Range(ne.lineNumber,Math.max(1,ne.column-1),ne.lineNumber+1,1),ue=Z.getValueInRange(ae).split("").reverse().join("");se.push(new D.ReplaceCommand(new h.Selection(ne.lineNumber,Math.max(1,ne.column-1),ne.lineNumber+1,1),ue))}else{const ae=new S.Range(ne.lineNumber,Math.max(1,ne.column-1),ne.lineNumber,ne.column+1),ue=Z.getValueInRange(ae).split("").reverse().join("");se.push(new D.ReplaceCommandThatPreservesSelection(ae,ue,new h.Selection(ne.lineNumber,ne.column+1,ne.lineNumber,ne.column+1)))}}X.pushUndoStop(),X.executeCommands(this.id,se),X.pushUndoStop()}}e.TransposeAction=z;class B extends b.EditorAction{run(ee,X){const te=X.getSelections();if(te===null)return;const Z=X.getModel();if(Z===null)return;const se=X.getOption(128),re=[];for(const oe of te)if(oe.isEmpty()){const le=oe.getStartPosition(),ne=X.getConfiguredWordAtPosition(le);if(!ne)continue;const ce=new S.Range(le.lineNumber,ne.startColumn,le.lineNumber,ne.endColumn),ae=Z.getValueInRange(ce);re.push(v.EditOperation.replace(ce,this._modifyText(ae,se)))}else{const le=Z.getValueInRange(oe);re.push(v.EditOperation.replace(oe,this._modifyText(le,se)))}X.pushUndoStop(),X.executeEdits(this.id,re),X.pushUndoStop()}}e.AbstractCaseAction=B;class K extends B{constructor(){super({id:"editor.action.transformToUppercase",label:o.localize(23,null),alias:"Transform to Uppercase",precondition:a.EditorContextKeys.writable})}_modifyText(ee,X){return ee.toLocaleUpperCase()}}e.UpperCaseAction=K;class H extends B{constructor(){super({id:"editor.action.transformToLowercase",label:o.localize(24,null),alias:"Transform to Lowercase",precondition:a.EditorContextKeys.writable})}_modifyText(ee,X){return ee.toLocaleLowerCase()}}e.LowerCaseAction=H;class U{constructor(ee,X){this._pattern=ee,this._flags=X,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}class G extends B{static{this.titleBoundary=new U("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu")}constructor(){super({id:"editor.action.transformToTitlecase",label:o.localize(25,null),alias:"Transform to Title Case",precondition:a.EditorContextKeys.writable})}_modifyText(ee,X){const te=G.titleBoundary.get();return te?ee.toLocaleLowerCase().replace(te,Z=>Z.toLocaleUpperCase()):ee}}e.TitleCaseAction=G;class $ extends B{static{this.caseBoundary=new U("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new U("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu")}constructor(){super({id:"editor.action.transformToSnakecase",label:o.localize(26,null),alias:"Transform to Snake Case",precondition:a.EditorContextKeys.writable})}_modifyText(ee,X){const te=$.caseBoundary.get(),Z=$.singleLetters.get();return!te||!Z?ee:ee.replace(te,"$1_$2").replace(Z,"$1_$2$3").toLocaleLowerCase()}}e.SnakeCaseAction=$;class ie extends B{static{this.wordBoundary=new U("[_\\s-]","gm")}constructor(){super({id:"editor.action.transformToCamelcase",label:o.localize(27,null),alias:"Transform to Camel Case",precondition:a.EditorContextKeys.writable})}_modifyText(ee,X){const te=ie.wordBoundary.get();if(!te)return ee;const Z=ee.split(te);return Z.shift()+Z.map(re=>re.substring(0,1).toLocaleUpperCase()+re.substring(1)).join("")}}e.CamelCaseAction=ie;class J extends B{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(X=>X.isSupported())}static{this.caseBoundary=new U("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new U("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu")}static{this.underscoreBoundary=new U("(\\S)(_)(\\S)","gm")}constructor(){super({id:"editor.action.transformToKebabcase",label:o.localize(28,null),alias:"Transform to Kebab Case",precondition:a.EditorContextKeys.writable})}_modifyText(ee,X){const te=J.caseBoundary.get(),Z=J.singleLetters.get(),se=J.underscoreBoundary.get();return!te||!Z||!se?ee:ee.replace(se,"$1-$3").replace(te,"$1-$2").replace(Z,"$1-$2").toLocaleLowerCase()}}e.KebabCaseAction=J,(0,b.registerEditorAction)(c),(0,b.registerEditorAction)(l),(0,b.registerEditorAction)(n),(0,b.registerEditorAction)(w),(0,b.registerEditorAction)(E),(0,b.registerEditorAction)(I),(0,b.registerEditorAction)(_),(0,b.registerEditorAction)(A),(0,b.registerEditorAction)(k),(0,b.registerEditorAction)(L),(0,b.registerEditorAction)(R),(0,b.registerEditorAction)(M),(0,b.registerEditorAction)(N),(0,b.registerEditorAction)(P),(0,b.registerEditorAction)(F),(0,b.registerEditorAction)(V),(0,b.registerEditorAction)(W),(0,b.registerEditorAction)(z),(0,b.registerEditorAction)(K),(0,b.registerEditorAction)(H),$.caseBoundary.isSupported()&&$.singleLetters.isSupported()&&(0,b.registerEditorAction)($),ie.wordBoundary.isSupported()&&(0,b.registerEditorAction)(ie),G.titleBoundary.isSupported()&&(0,b.registerEditorAction)(G),J.isSupported()&&(0,b.registerEditorAction)(J)}),define(Q[3291],Y([1,0,4,48]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class b extends t.Disposable{static{this.ID="editor.contrib.longLinesHelper"}static get(T){return T.getContribution(b.ID)}constructor(T){super(),this._editor=T,this._register(this._editor.onMouseDown(f=>{const v=this._editor.getOption(115);v>=0&&f.target.type===6&&f.target.position.column>=v&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}(0,y.registerEditorContribution)(b.ID,b,2)}),define(Q[513],Y([1,0,217,87,6,110,4,48,27,209,2414,8,41,7,1740]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.MessageController=void 0;let s=class{static{i=this}static{this.ID="editor.contrib.messageController"}static{this.MESSAGE_VISIBLE=new h.RawContextKey("messageVisible",!1,S.localize(0,null))}static get(p){return p.getContribution(i.ID)}constructor(p,c,l){this._openerService=l,this._messageWidget=new T.MutableDisposable,this._messageListeners=new T.DisposableStore,this._mouseOverMessage=!1,this._editor=p,this._visible=i.MESSAGE_VISIBLE.bindTo(c)}dispose(){this._message?.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}isVisible(){return this._visible.get()}showMessage(p,c){(0,y.alert)((0,D.isMarkdownString)(p)?p.value:p),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=(0,D.isMarkdownString)(p)?(0,t.renderMarkdown)(p,{actionHandler:{callback:n=>(0,m.openLinkFromMarkdown)(this._openerService,n,(0,D.isMarkdownString)(p)?p.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new u(this._editor,c,typeof p=="string"?p:this._message.element),this._messageListeners.add(b.Event.debounce(this._editor.onDidBlurEditorText,(n,g)=>g,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&r.isAncestor(document.activeElement,this._messageWidget.value.getDomNode())||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(r.addDisposableListener(this._messageWidget.value.getDomNode(),r.EventType.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(r.addDisposableListener(this._messageWidget.value.getDomNode(),r.EventType.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let l;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(l?l.containsPosition(n.target.position)||this.closeMessage():l=new v.Range(c.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(u.fadeOut(this._messageWidget.value))}};e.MessageController=s,e.MessageController=s=i=fe([O(1,h.IContextKeyService),O(2,a.IOpenerService)],s);const o=f.EditorCommand.bindToContribution(s.get);(0,f.registerEditorCommand)(new o({id:"leaveEditorMessage",precondition:s.MESSAGE_VISIBLE,handler:d=>d.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class u{static fadeOut(p){const c=()=>{p.dispose(),clearTimeout(l),p.getDomNode().removeEventListener("animationend",c)},l=setTimeout(c,110);return p.getDomNode().addEventListener("animationend",c),p.getDomNode().classList.add("fadeOut"),{dispose:c}}constructor(p,{lineNumber:c,column:l},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=p,this._editor.revealLinesInCenterIfOutsideViewport(c,c,0),this._position={lineNumber:c,column:l},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const g=document.createElement("div");g.classList.add("anchor","top"),this._domNode.appendChild(g);const w=document.createElement("div");typeof n=="string"?(w.classList.add("message"),w.textContent=n):(n.classList.add("message"),w.appendChild(n)),this._domNode.appendChild(w);const E=document.createElement("div");E.classList.add("anchor","below"),this._domNode.appendChild(E),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(p){this._domNode.classList.toggle("below",p===2)}}(0,f.registerEditorContribution)(s.ID,s,4)}),define(Q[3292],Y([1,0,110,4,48,513,2421]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadOnlyMessageController=void 0;class f extends y.Disposable{static{this.ID="editor.contrib.readOnlyMessageController"}constructor(m){super(),this.editor=m,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const m=D.MessageController.get(this.editor);if(m&&this.editor.hasModel()){let S=this.editor.getOptions().get(90);S||(this.editor.isSimpleWidget?S=new t.MarkdownString(T.localize(0,null)):S=new t.MarkdownString(T.localize(1,null))),m.showMessage(S,this.editor.getPosition())}}}e.ReadOnlyMessageController=f,(0,b.registerEditorContribution)(f.ID,f,2)}),define(Q[1191],Y([1,0,20,31,15,48,51,27,96,73,1091,1917,2424,13,28,74,75,17,10]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.provideSelectionRanges=e.SmartSelectController=void 0;class c{constructor(I,_){this.index=I,this.ranges=_}mov(I){const _=this.index+(I?1:-1);if(_<0||_>=this.ranges.length)return this;const A=new c(_,this.ranges);return A.ranges[_].equalsRange(this.ranges[this.index])?A.mov(I):A}}let l=class{static{p=this}static{this.ID="editor.contrib.smartSelectController"}static get(I){return I.getContribution(p.ID)}constructor(I,_){this._editor=I,this._languageFeaturesService=_,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(I){if(!this._editor.hasModel())return;const _=this._editor.getSelections(),A=this._editor.getModel();if(this._state||await E(this._languageFeaturesService.selectionRangeProvider,A,_.map(L=>L.getPosition()),this._editor.getOption(111),y.CancellationToken.None).then(L=>{if(!(!t.isNonEmptyArray(L)||L.length!==_.length)&&!(!this._editor.hasModel()||!t.equals(this._editor.getSelections(),_,(R,M)=>R.equalsSelection(M)))){for(let R=0;R<L.length;R++)L[R]=L[R].filter(M=>M.containsPosition(_[R].getStartPosition())&&M.containsPosition(_[R].getEndPosition())),L[R].unshift(_[R]);this._state=L.map(R=>new c(0,R)),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(L=>L.mov(I));const k=this._state.map(L=>v.Selection.fromPositions(L.ranges[L.index].getStartPosition(),L.ranges[L.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(k)}finally{this._ignoreSelection=!1}}};e.SmartSelectController=l,e.SmartSelectController=l=p=fe([O(1,s.ILanguageFeaturesService)],l);class n extends D.EditorAction{constructor(I,_){super(_),this._forward=I}async run(I,_){const A=l.get(_);A&&await A.run(this._forward)}}class g extends n{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:a.localize(0,null),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"1_basic",title:a.localize(1,null),order:2}})}}i.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class w extends n{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:a.localize(2,null),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"1_basic",title:a.localize(3,null),order:3}})}}(0,D.registerEditorContribution)(l.ID,l,4),(0,D.registerEditorAction)(g),(0,D.registerEditorAction)(w);async function E(C,I,_,A,k){const L=C.all(I).concat(new h.WordSelectionRangeProvider(A.selectSubwords));L.length===1&&L.unshift(new S.BracketSelectionRangeProvider);const R=[],M=[];for(const N of L)R.push(Promise.resolve(N.provideSelectionRanges(I,_,k)).then(P=>{if(t.isNonEmptyArray(P)&&P.length===_.length)for(let x=0;x<_.length;x++){M[x]||(M[x]=[]);for(const F of P[x])f.Range.isIRange(F.range)&&f.Range.containsPosition(F.range,_[x])&&M[x].push(f.Range.lift(F.range))}},b.onUnexpectedExternalError));return await Promise.all(R),M.map(N=>{if(N.length===0)return[];N.sort((V,W)=>T.Position.isBefore(V.getStartPosition(),W.getStartPosition())?1:T.Position.isBefore(W.getStartPosition(),V.getStartPosition())||T.Position.isBefore(V.getEndPosition(),W.getEndPosition())?-1:T.Position.isBefore(W.getEndPosition(),V.getEndPosition())?1:0);const P=[];let x;for(const V of N)(!x||f.Range.containsRange(V,x)&&!f.Range.equalsRange(V,x))&&(P.push(V),x=V);if(!A.selectLeadingAndTrailingWhitespace)return P;const F=[P[0]];for(let V=1;V<P.length;V++){const W=P[V-1],z=P[V];if(z.startLineNumber!==W.startLineNumber||z.endLineNumber!==W.endLineNumber){const B=new f.Range(W.startLineNumber,I.getLineFirstNonWhitespaceColumn(W.startLineNumber),W.endLineNumber,I.getLineLastNonWhitespaceColumn(W.endLineNumber));B.containsRange(W)&&!B.equalsRange(W)&&z.containsRange(B)&&!z.equalsRange(B)&&F.push(B);const K=new f.Range(W.startLineNumber,1,W.endLineNumber,I.getLineMaxColumn(W.endLineNumber));K.containsRange(W)&&!K.equalsRange(B)&&z.containsRange(K)&&!z.equalsRange(K)&&F.push(K)}F.push(z)}return F})}e.provideSelectionRanges=E,i.CommandsRegistry.registerCommand("_executeSelectionRangeProvider",async function(C,...I){const[_,A]=I;(0,u.assertType)(d.URI.isUri(_));const k=C.get(s.ILanguageFeaturesService).selectionRangeProvider,L=await C.get(o.ITextModelService).createModelReference(_);try{return E(k,L.object.textEditorModel,A,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},y.CancellationToken.None)}finally{L.dispose()}})}),define(Q[3293],Y([1,0,145,48,2436]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D extends y.EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:b.localize(0,null),alias:"Developer: Force Retokenize",precondition:void 0})}run(f,v){if(!v.hasModel())return;const m=v.getModel();m.tokenization.resetTokenization();const S=new t.StopWatch;m.tokenization.forceTokenization(m.getLineCount()),S.stop(),console.log(`tokenization took ${S.elapsed()}`)}}(0,y.registerEditorAction)(D)}),define(Q[1192],Y([1,0,4,26,48,79,2438,49]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnusualLineTerminatorsDetector=void 0;const v="ignoreUnusualLineTerminators";function m(a,r,i){a.setModelProperty(r.uri,v,i)}function S(a,r){return a.getModelProperty(r.uri,v)}let h=class extends t.Disposable{static{this.ID="editor.contrib.unusualLineTerminatorsDetector"}constructor(r,i,s){super(),this._editor=r,this._dialogService=i,this._codeEditorService=s,this._isPresentingDialog=!1,this._config=this._editor.getOption(124),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(124)&&(this._config=this._editor.getOption(124),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(o=>{o.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const r=this._editor.getModel();if(!r.mightContainUnusualLineTerminators()||S(this._codeEditorService,r)===!0||this._editor.getOption(89))return;if(this._config==="auto"){r.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let s;try{this._isPresentingDialog=!0,s=await this._dialogService.confirm({title:T.localize(0,null),message:T.localize(1,null),detail:T.localize(2,null,(0,y.basename)(r.uri)),primaryButton:T.localize(3,null),cancelButton:T.localize(4,null)})}finally{this._isPresentingDialog=!1}if(!s.confirmed){m(this._codeEditorService,r,!0);return}r.removeUnusualLineTerminators(this._editor.getSelections())}};e.UnusualLineTerminatorsDetector=h,e.UnusualLineTerminatorsDetector=h=fe([O(1,f.IDialogService),O(2,D.ICodeEditorService)],h),(0,b.registerEditorContribution)(h.ID,h,1)}),define(Q[1193],Y([1,0,48,487,133,301,662,563,51,27,96,73,125,2441,66,8,171]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteInsideWord=e.DeleteWordRight=e.DeleteWordEndRight=e.DeleteWordStartRight=e.DeleteWordLeft=e.DeleteWordEndLeft=e.DeleteWordStartLeft=e.DeleteWordRightCommand=e.DeleteWordLeftCommand=e.DeleteWordCommand=e.CursorWordAccessibilityRightSelect=e.CursorWordAccessibilityRight=e.CursorWordRightSelect=e.CursorWordEndRightSelect=e.CursorWordStartRightSelect=e.CursorWordRight=e.CursorWordEndRight=e.CursorWordStartRight=e.CursorWordAccessibilityLeftSelect=e.CursorWordAccessibilityLeft=e.CursorWordLeftSelect=e.CursorWordEndLeftSelect=e.CursorWordStartLeftSelect=e.CursorWordLeft=e.CursorWordEndLeft=e.CursorWordStartLeft=e.WordRightCommand=e.WordLeftCommand=e.MoveWordCommand=void 0;class u extends t.EditorCommand{constructor(ie){super(ie),this._inSelectionMode=ie.inSelectionMode,this._wordNavigationType=ie.wordNavigationType}runEditorCommand(ie,J,j){if(!J.hasModel())return;const ee=(0,f.getMapForWordSeparators)(J.getOption(128)),X=J.getModel(),Z=J.getSelections().map(se=>{const re=new v.Position(se.positionLineNumber,se.positionColumn),oe=this._move(ee,X,re,this._wordNavigationType);return this._moveTo(se,oe,this._inSelectionMode)});if(X.pushStackElement(),J._getViewModel().setCursorStates("moveWordCommand",3,Z.map(se=>D.CursorState.fromModelSelection(se))),Z.length===1){const se=new v.Position(Z[0].positionLineNumber,Z[0].positionColumn);J.revealPosition(se,0)}}_moveTo(ie,J,j){return j?new S.Selection(ie.selectionStartLineNumber,ie.selectionStartColumn,J.lineNumber,J.column):new S.Selection(J.lineNumber,J.column,J.lineNumber,J.column)}}e.MoveWordCommand=u;class d extends u{_move(ie,J,j,ee){return T.WordOperations.moveWordLeft(ie,J,j,ee)}}e.WordLeftCommand=d;class p extends u{_move(ie,J,j,ee){return T.WordOperations.moveWordRight(ie,J,j,ee)}}e.WordRightCommand=p;class c extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}e.CursorWordStartLeft=c;class l extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}e.CursorWordEndLeft=l;class n extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:s.ContextKeyExpr.and(h.EditorContextKeys.textInputFocus,s.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,o.IsWindowsContext)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}e.CursorWordLeft=n;class g extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}e.CursorWordStartLeftSelect=g;class w extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}e.CursorWordEndLeftSelect=w;class E extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:s.ContextKeyExpr.and(h.EditorContextKeys.textInputFocus,s.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,o.IsWindowsContext)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}e.CursorWordLeftSelect=E;class C extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(ie,J,j,ee){return super._move((0,f.getMapForWordSeparators)(b.EditorOptions.wordSeparators.defaultValue),J,j,ee)}}e.CursorWordAccessibilityLeft=C;class I extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(ie,J,j,ee){return super._move((0,f.getMapForWordSeparators)(b.EditorOptions.wordSeparators.defaultValue),J,j,ee)}}e.CursorWordAccessibilityLeftSelect=I;class _ extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}e.CursorWordStartRight=_;class A extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:s.ContextKeyExpr.and(h.EditorContextKeys.textInputFocus,s.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,o.IsWindowsContext)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}e.CursorWordEndRight=A;class k extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}e.CursorWordRight=k;class L extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}e.CursorWordStartRightSelect=L;class R extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:s.ContextKeyExpr.and(h.EditorContextKeys.textInputFocus,s.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,o.IsWindowsContext)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}e.CursorWordEndRightSelect=R;class M extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}e.CursorWordRightSelect=M;class N extends p{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(ie,J,j,ee){return super._move((0,f.getMapForWordSeparators)(b.EditorOptions.wordSeparators.defaultValue),J,j,ee)}}e.CursorWordAccessibilityRight=N;class P extends p{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(ie,J,j,ee){return super._move((0,f.getMapForWordSeparators)(b.EditorOptions.wordSeparators.defaultValue),J,j,ee)}}e.CursorWordAccessibilityRightSelect=P;class x extends t.EditorCommand{constructor(ie){super(ie),this._whitespaceHeuristics=ie.whitespaceHeuristics,this._wordNavigationType=ie.wordNavigationType}runEditorCommand(ie,J,j){const ee=ie.get(a.ILanguageConfigurationService);if(!J.hasModel())return;const X=(0,f.getMapForWordSeparators)(J.getOption(128)),te=J.getModel(),Z=J.getSelections(),se=J.getOption(6),re=J.getOption(10),oe=ee.getLanguageConfiguration(te.getLanguageId()).getAutoClosingPairs(),le=J._getViewModel(),ne=Z.map(ce=>{const ae=this._delete({wordSeparators:X,model:te,selection:ce,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:J.getOption(8),autoClosingBrackets:se,autoClosingQuotes:re,autoClosingPairs:oe,autoClosedCharacters:le.getCursorAutoClosedCharacters()},this._wordNavigationType);return new y.ReplaceCommand(ae,"")});J.pushUndoStop(),J.executeCommands(this.id,ne),J.pushUndoStop()}}e.DeleteWordCommand=x;class F extends x{_delete(ie,J){const j=T.WordOperations.deleteWordLeft(ie,J);return j||new m.Range(1,1,1,1)}}e.DeleteWordLeftCommand=F;class V extends x{_delete(ie,J){const j=T.WordOperations.deleteWordRight(ie,J);if(j)return j;const ee=ie.model.getLineCount(),X=ie.model.getLineMaxColumn(ee);return new m.Range(ee,X,ee,X)}}e.DeleteWordRightCommand=V;class W extends F{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:h.EditorContextKeys.writable})}}e.DeleteWordStartLeft=W;class z extends F{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:h.EditorContextKeys.writable})}}e.DeleteWordEndLeft=z;class B extends F{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:h.EditorContextKeys.writable,kbOpts:{kbExpr:h.EditorContextKeys.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}e.DeleteWordLeft=B;class K extends V{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:h.EditorContextKeys.writable})}}e.DeleteWordStartRight=K;class H extends V{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:h.EditorContextKeys.writable})}}e.DeleteWordEndRight=H;class U extends V{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:h.EditorContextKeys.writable,kbOpts:{kbExpr:h.EditorContextKeys.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}e.DeleteWordRight=U;class G extends t.EditorAction{constructor(){super({id:"deleteInsideWord",precondition:h.EditorContextKeys.writable,label:r.localize(0,null),alias:"Delete Word"})}run(ie,J,j){if(!J.hasModel())return;const ee=(0,f.getMapForWordSeparators)(J.getOption(128)),X=J.getModel(),Z=J.getSelections().map(se=>{const re=T.WordOperations.deleteInsideWord(ee,X,se);return new y.ReplaceCommand(re,"")});J.pushUndoStop(),J.executeCommands(this.id,Z),J.pushUndoStop()}}e.DeleteInsideWord=G,(0,t.registerEditorCommand)(new c),(0,t.registerEditorCommand)(new l),(0,t.registerEditorCommand)(new n),(0,t.registerEditorCommand)(new g),(0,t.registerEditorCommand)(new w),(0,t.registerEditorCommand)(new E),(0,t.registerEditorCommand)(new _),(0,t.registerEditorCommand)(new A),(0,t.registerEditorCommand)(new k),(0,t.registerEditorCommand)(new L),(0,t.registerEditorCommand)(new R),(0,t.registerEditorCommand)(new M),(0,t.registerEditorCommand)(new C),(0,t.registerEditorCommand)(new I),(0,t.registerEditorCommand)(new N),(0,t.registerEditorCommand)(new P),(0,t.registerEditorCommand)(new W),(0,t.registerEditorCommand)(new z),(0,t.registerEditorCommand)(new B),(0,t.registerEditorCommand)(new K),(0,t.registerEditorCommand)(new H),(0,t.registerEditorCommand)(new U),(0,t.registerEditorAction)(G)}),define(Q[3294],Y([1,0,48,662,27,73,1193,28]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorWordPartRightSelect=e.CursorWordPartRight=e.WordPartRightCommand=e.CursorWordPartLeftSelect=e.CursorWordPartLeft=e.WordPartLeftCommand=e.DeleteWordPartRight=e.DeleteWordPartLeft=void 0;class v extends T.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(u,d){const p=y.WordPartOperations.deleteWordPartLeft(u);return p||new b.Range(1,1,1,1)}}e.DeleteWordPartLeft=v;class m extends T.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(u,d){const p=y.WordPartOperations.deleteWordPartRight(u);if(p)return p;const c=u.model.getLineCount(),l=u.model.getLineMaxColumn(c);return new b.Range(c,l,c,l)}}e.DeleteWordPartRight=m;class S extends T.MoveWordCommand{_move(u,d,p,c){return y.WordPartOperations.moveWordPartLeft(u,d,p)}}e.WordPartLeftCommand=S;class h extends S{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}e.CursorWordPartLeft=h,f.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class a extends S{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}e.CursorWordPartLeftSelect=a,f.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class r extends T.MoveWordCommand{_move(u,d,p,c){return y.WordPartOperations.moveWordPartRight(u,d,p)}}e.WordPartRightCommand=r;class i extends r{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}e.CursorWordPartRight=i;class s extends r{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}e.CursorWordPartRightSelect=s,(0,t.registerEditorCommand)(new v),(0,t.registerEditorCommand)(new m),(0,t.registerEditorCommand)(new h),(0,t.registerEditorCommand)(new a),(0,t.registerEditorCommand)(new i),(0,t.registerEditorCommand)(new s)}),define(Q[3295],Y([1,0,207,34,6,4,37,2445,13,8,29,38,30]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuWorkbenchButtonBar=void 0;let r=class extends t.ButtonBar{constructor(s,o,u,d,p,c,l,n){super(s),this._store=new D.DisposableStore,this._onDidChangeMenuItems=new b.Emitter,this.onDidChangeMenuItems=this._onDidChangeMenuItems.event;const g=d.createMenu(o,p);this._store.add(g);const w=this._store.add(new y.ActionRunner);u?.telemetrySource&&w.onDidRun(I=>{n.publicLog2("workbenchActionExecuted",{id:I.action.id,from:u.telemetrySource})},void 0,this._store);const E=u?.buttonConfigProvider??(()=>({showLabel:!0})),C=()=>{this.clear();const I=g.getActions({renderShortTitle:!0}).flatMap(_=>_[1]);for(let _=0;_<I.length;_++){const A=_>0,k=I[_];let L,R;if(k instanceof v.SubmenuItemAction&&k.actions.length>0){const[N,...P]=k.actions;L=N,R=this.addButtonWithDropdown({secondary:E(L)?.isSecondary??A,actionRunner:w,actions:P,contextMenuProvider:c})}else L=k,R=this.addButton({secondary:E(L)?.isSecondary??A});R.enabled=L.enabled,R.element.classList.add("default-colors"),E(L)?.showLabel??!0?R.label=L.label:R.element.classList.add("monaco-text-button"),E(L)?.showIcon&&T.ThemeIcon.isThemeIcon(L.item.icon)&&(R.icon=L.item.icon);const M=l.lookupKeybinding(L.id);M?R.element.title=(0,f.localize)(0,null,L.label,M.getLabel()):R.element.title=L.label,R.onDidClick(async()=>{w.run(L)})}this._onDidChangeMenuItems.fire(this)};this._store.add(g.onDidChange(C)),C()}dispose(){this._onDidChangeMenuItems.dispose(),this._store.dispose(),super.dispose()}};e.MenuWorkbenchButtonBar=r,e.MenuWorkbenchButtonBar=r=fe([O(3,v.IMenuService),O(4,m.IContextKeyService),O(5,S.IContextMenuService),O(6,h.IKeybindingService),O(7,a.ITelemetryService)],r)}),define(Q[220],Y([1,0,4,22,66,9,5,6,2450,109,30]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioCue=e.SoundSource=e.Sound=e.AudioCueService=e.IAudioCueService=void 0,e.IAudioCueService=(0,T.createDecorator)("audioCue");let h=class extends t.Disposable{constructor(d,p,c){super(),this.configurationService=d,this.accessibilityService=p,this.telemetryService=c,this.sounds=new Map,this.screenReaderAttached=(0,m.observableFromEvent)(this.accessibilityService.onDidChangeScreenReaderOptimized,()=>this.accessibilityService.isScreenReaderOptimized()),this.sentTelemetry=new Set,this.playingSounds=new Set,this.obsoleteAudioCuesEnabled=(0,m.observableFromEvent)(f.Event.filter(this.configurationService.onDidChangeConfiguration,l=>l.affectsConfiguration("audioCues.enabled")),()=>this.configurationService.getValue("audioCues.enabled")),this.isEnabledCache=new r(l=>{const n=(0,m.observableFromEvent)(f.Event.filter(this.configurationService.onDidChangeConfiguration,g=>g.affectsConfiguration(l.settingsKey)),()=>this.configurationService.getValue(l.settingsKey));return(0,m.derived)(g=>{const w=n.read(g);if(w==="on"||w==="auto"&&this.screenReaderAttached.read(g))return!0;const E=this.obsoleteAudioCuesEnabled.read(g);return!!(E==="on"||E==="auto"&&this.screenReaderAttached.read(g))})})}async playAudioCue(d,p={}){this.isEnabled(d)&&(this.sendAudioCueTelemetry(d,p.source),await this.playSound(d.sound.getSound(),p.allowManyInParallel))}async playAudioCues(d){for(const c of d)this.sendAudioCueTelemetry("cue"in c?c.cue:c,"source"in c?c.source:void 0);const p=new Set(d.map(c=>"cue"in c?c.cue:c).filter(c=>this.isEnabled(c)).map(c=>c.sound.getSound()));await Promise.all(Array.from(p).map(c=>this.playSound(c,!0)))}sendAudioCueTelemetry(d,p){const c=this.accessibilityService.isScreenReaderOptimized(),l=d.name+(p?`::${p}`:"")+(c?"{screenReaderOptimized}":"");this.sentTelemetry.has(l)||this.getVolumeInPercent()===0||(this.sentTelemetry.add(l),this.telemetryService.publicLog2("audioCue.played",{audioCue:d.name,source:p??"",isScreenReaderOptimized:c}))}getVolumeInPercent(){const d=this.configurationService.getValue("audioCues.volume");return typeof d!="number"?50:Math.max(Math.min(d,100),0)}async playSound(d,p=!1){if(!p&&this.playingSounds.has(d))return;this.playingSounds.add(d);const c=y.FileAccess.asBrowserUri(`vs/platform/audioCues/browser/media/${d.fileName}`).toString(!0);try{const l=this.sounds.get(c);if(l)l.volume=this.getVolumeInPercent()/100,l.currentTime=0,await l.play();else{const n=await a(c,this.getVolumeInPercent()/100);this.sounds.set(c,n)}}catch(l){console.error("Error while playing sound",l)}finally{this.playingSounds.delete(d)}}playAudioCueLoop(d,p){let c=!0;const l=()=>{c&&this.playAudioCue(d,{allowManyInParallel:!0}).finally(()=>{setTimeout(()=>{c&&l()},p)})};return l(),(0,t.toDisposable)(()=>c=!1)}isEnabled(d){return this.isEnabledCache.get(d).get()}onEnabledChanged(d){return f.Event.fromObservableLight(this.isEnabledCache.get(d))}};e.AudioCueService=h,e.AudioCueService=h=fe([O(0,D.IConfigurationService),O(1,b.IAccessibilityService),O(2,S.ITelemetryService)],h);function a(u,d){return new Promise((p,c)=>{const l=new Audio(u);l.volume=d,l.addEventListener("ended",()=>{p(l)}),l.addEventListener("error",n=>{c(n.error)}),l.play().catch(n=>{c(n)})})}class r{constructor(d){this.getValue=d,this.map=new Map}get(d){if(this.map.has(d))return this.map.get(d);const p=this.getValue(d);return this.map.set(d,p),p}}class i{static register(d){return new i(d.fileName)}static{this.error=i.register({fileName:"error.mp3"})}static{this.warning=i.register({fileName:"warning.mp3"})}static{this.foldedArea=i.register({fileName:"foldedAreas.mp3"})}static{this.break=i.register({fileName:"break.mp3"})}static{this.quickFixes=i.register({fileName:"quickFixes.mp3"})}static{this.taskCompleted=i.register({fileName:"taskCompleted.mp3"})}static{this.taskFailed=i.register({fileName:"taskFailed.mp3"})}static{this.terminalBell=i.register({fileName:"terminalBell.mp3"})}static{this.diffLineInserted=i.register({fileName:"diffLineInserted.mp3"})}static{this.diffLineDeleted=i.register({fileName:"diffLineDeleted.mp3"})}static{this.diffLineModified=i.register({fileName:"diffLineModified.mp3"})}static{this.chatRequestSent=i.register({fileName:"chatRequestSent.mp3"})}static{this.chatResponsePending=i.register({fileName:"chatResponsePending.mp3"})}static{this.chatResponseReceived1=i.register({fileName:"chatResponseReceived1.mp3"})}static{this.chatResponseReceived2=i.register({fileName:"chatResponseReceived2.mp3"})}static{this.chatResponseReceived3=i.register({fileName:"chatResponseReceived3.mp3"})}static{this.chatResponseReceived4=i.register({fileName:"chatResponseReceived4.mp3"})}constructor(d){this.fileName=d}}e.Sound=i;class s{constructor(d){this.randomOneOf=d}getSound(d=!1){if(d||this.randomOneOf.length===1)return this.randomOneOf[0];{const p=Math.floor(Math.random()*this.randomOneOf.length);return this.randomOneOf[p]}}}e.SoundSource=s;class o{static{this._audioCues=new Set}static register(d){const p=new s("randomOneOf"in d.sound?d.sound.randomOneOf:[d.sound]),c=new o(p,d.name,d.settingsKey);return o._audioCues.add(c),c}static get allAudioCues(){return[...this._audioCues]}static{this.error=o.register({name:(0,v.localize)(0,null),sound:i.error,settingsKey:"audioCues.lineHasError"})}static{this.warning=o.register({name:(0,v.localize)(1,null),sound:i.warning,settingsKey:"audioCues.lineHasWarning"})}static{this.foldedArea=o.register({name:(0,v.localize)(2,null),sound:i.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"})}static{this.break=o.register({name:(0,v.localize)(3,null),sound:i.break,settingsKey:"audioCues.lineHasBreakpoint"})}static{this.inlineSuggestion=o.register({name:(0,v.localize)(4,null),sound:i.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"})}static{this.terminalQuickFix=o.register({name:(0,v.localize)(5,null),sound:i.quickFixes,settingsKey:"audioCues.terminalQuickFix"})}static{this.onDebugBreak=o.register({name:(0,v.localize)(6,null),sound:i.break,settingsKey:"audioCues.onDebugBreak"})}static{this.noInlayHints=o.register({name:(0,v.localize)(7,null),sound:i.error,settingsKey:"audioCues.noInlayHints"})}static{this.taskCompleted=o.register({name:(0,v.localize)(8,null),sound:i.taskCompleted,settingsKey:"audioCues.taskCompleted"})}static{this.taskFailed=o.register({name:(0,v.localize)(9,null),sound:i.taskFailed,settingsKey:"audioCues.taskFailed"})}static{this.terminalCommandFailed=o.register({name:(0,v.localize)(10,null),sound:i.error,settingsKey:"audioCues.terminalCommandFailed"})}static{this.terminalBell=o.register({name:(0,v.localize)(11,null),sound:i.terminalBell,settingsKey:"audioCues.terminalBell"})}static{this.notebookCellCompleted=o.register({name:(0,v.localize)(12,null),sound:i.taskCompleted,settingsKey:"audioCues.notebookCellCompleted"})}static{this.notebookCellFailed=o.register({name:(0,v.localize)(13,null),sound:i.taskFailed,settingsKey:"audioCues.notebookCellFailed"})}static{this.diffLineInserted=o.register({name:(0,v.localize)(14,null),sound:i.diffLineInserted,settingsKey:"audioCues.diffLineInserted"})}static{this.diffLineDeleted=o.register({name:(0,v.localize)(15,null),sound:i.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"})}static{this.diffLineModified=o.register({name:(0,v.localize)(16,null),sound:i.diffLineModified,settingsKey:"audioCues.diffLineModified"})}static{this.chatRequestSent=o.register({name:(0,v.localize)(17,null),sound:i.chatRequestSent,settingsKey:"audioCues.chatRequestSent"})}static{this.chatResponseReceived=o.register({name:(0,v.localize)(18,null),settingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[i.chatResponseReceived1,i.chatResponseReceived2,i.chatResponseReceived3,i.chatResponseReceived4]}})}static{this.chatResponsePending=o.register({name:(0,v.localize)(19,null),sound:i.chatResponsePending,settingsKey:"audioCues.chatResponsePending"})}constructor(d,p,c){this.sound=d,this.name=p,this.settingsKey=c}}e.AudioCue=o}),define(Q[1194],Y([1,0,214,6,4,42,27,220,79,66]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffNavigator=void 0;const S={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0,findResultLoop:!0};let h=class extends b.Disposable{constructor(r,i={},s,o,u){super(),this._audioCueService=s,this._codeEditorService=o,this._accessibilityService=u,this._onDidUpdate=this._register(new y.Emitter),this.onDidUpdate=this._onDidUpdate.event,this._editor=r,this._options=D.mixin(i,S,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=!!this._options.alwaysRevealFirst,this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(d=>{this.ignoreSelectionChange||(this._updateAccessibilityState(d.position.lineNumber),this.nextIdx=-1)})),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&this._editor.getLineChanges()!==null&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(r){this.ranges=[],r&&r.forEach(i=>{!this._options.ignoreCharChanges&&i.charChanges?i.charChanges.forEach(s=>{this.ranges.push({rhs:!0,range:new T.Range(s.modifiedStartLineNumber,s.modifiedStartColumn,s.modifiedEndLineNumber,s.modifiedEndColumn)})}):i.modifiedEndLineNumber===0?this.ranges.push({rhs:!0,range:new T.Range(i.modifiedStartLineNumber,1,i.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new T.Range(i.modifiedStartLineNumber,1,i.modifiedEndLineNumber+1,1)})}),this.ranges.sort((i,s)=>T.Range.compareRangesUsingStarts(i.range,s.range)),this._onDidUpdate.fire(this)}_initIdx(r){let i=!1;const s=this._editor.getPosition();if(!s){this.nextIdx=0;return}for(let o=0,u=this.ranges.length;o<u&&!i;o++){const d=this.ranges[o].range;s.isBeforeOrEqual(d.getStartPosition())&&(this.nextIdx=o+(r?0:-1),i=!0)}i||(this.nextIdx=r?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(r,i){if(t.ok(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;this.nextIdx===-1?this._initIdx(r):r?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const s=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const o=s.range.getStartPosition();this._editor.setPosition(o),this._editor.revealRangeInCenter(s.range,i),this._updateAccessibilityState(o.lineNumber,!0)}finally{this.ignoreSelectionChange=!1}}_updateAccessibilityState(r,i){const s=this._editor.getModel()?.modified;if(!s)return;const o=s.getLineDecorations(r).find(d=>d.options.className==="line-insert");if(o)this._audioCueService.playAudioCue(f.AudioCue.diffLineModified,{allowManyInParallel:!0});else if(i)this._audioCueService.playAudioCue(f.AudioCue.diffLineDeleted,{allowManyInParallel:!0});else return;const u=this._codeEditorService.getActiveCodeEditor();i&&u&&o&&this._accessibilityService.isScreenReaderOptimized()&&(u.setSelection({startLineNumber:r,startColumn:0,endLineNumber:r,endColumn:Number.MAX_VALUE}),u.writeScreenReaderContent("diff-navigation"))}canNavigate(){return this.ranges&&this.ranges.length>0}next(r=0){this.canNavigateNext()&&this._move(!0,r)}previous(r=0){this.canNavigatePrevious()&&this._move(!1,r)}canNavigateNext(){return this.canNavigateLoop()||this.nextIdx<this.ranges.length-1}canNavigatePrevious(){return this.canNavigateLoop()||this.nextIdx!==0}canNavigateLoop(){return!!this._options.findResultLoop}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}};e.DiffNavigator=h,e.DiffNavigator=h=fe([O(2,f.IAudioCueService),O(3,v.ICodeEditorService),O(4,m.IAccessibilityService)],h)}),define(Q[1195],Y([1,0,672,577,35,5,11,3221,30]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IProfileAnalysisWorkerService=e.ProfilingOutput=void 0;var m;(function(h){h[h.Failure=0]="Failure",h[h.Irrelevant=1]="Irrelevant",h[h.Interesting=2]="Interesting"})(m||(e.ProfilingOutput=m={})),e.IProfileAnalysisWorkerService=(0,D.createDecorator)("IProfileAnalysisWorkerService");let S=class{constructor(a,r){this._telemetryService=a,this._logService=r,this._workerFactory=new t.DefaultWorkerFactory("CpuProfileAnalysis")}async _withWorker(a){const r=new y.SimpleWorkerClient(this._workerFactory,"vs/platform/profiling/electron-sandbox/profileAnalysisWorker",{});try{return await a(await r.getProxyObject())}finally{r.dispose()}}async analyseBottomUp(a,r,i,s){return this._withWorker(async o=>{const u=await o.analyseBottomUp(a);if(u.kind===2)for(const d of u.samples)(0,f.reportSample)({sample:d,perfBaseline:i,source:r(d.url)},this._telemetryService,this._logService,s);return u.kind})}async analyseByLocation(a,r){return this._withWorker(async i=>await i.analyseByUrlCategory(a,r))}};S=fe([O(0,v.ITelemetryService),O(1,T.ILogService)],S),(0,b.registerSingleton)(e.IProfileAnalysisWorkerService,S,1)}),define(Q[3296],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryAppenderClient=e.TelemetryAppenderChannel=void 0;class t{constructor(D){this.appenders=D}listen(D,T){throw new Error(`Event not found: ${T}`)}call(D,T,{eventName:f,data:v}){return this.appenders.forEach(m=>m.log(f,v)),Promise.resolve(null)}}e.TelemetryAppenderChannel=t;class y{constructor(D){this.channel=D}log(D,T){return this.channel.call("log",{eventName:D,data:T}).then(void 0,f=>`Failed to log telemetry: ${console.warn(f)}`),Promise.resolve(null)}flush(){return Promise.resolve()}}e.TelemetryAppenderClient=y}),define(Q[231],Y([1,0,42,17,6,9,330,1184,30]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cleanData=e.getPiiPathsFromEnvironment=e.isInternalTelemetry=e.cleanRemoteAuthority=e.validateTelemetryData=e.getTelemetryLevel=e.isLoggingOnly=e.supportsTelemetry=e.configurationTelemetry=e.NullAppender=e.extensionTelemetryLogChannelId=e.telemetryLogId=e.NullEndpointTelemetryService=e.NullTelemetryService=e.NullTelemetryServiceShape=e.TelemetryTrustedValue=void 0;class m{constructor(C){this.value=C,this.isTrustedTelemetryValue=!0}}e.TelemetryTrustedValue=m;class S{constructor(){this.telemetryLevel=0,this.sessionId="someValue.sessionId",this.machineId="someValue.machineId",this.firstSessionDate="someValue.firstSessionDate",this.sendErrorTelemetry=!1}publicLog(){}publicLog2(){}publicLogError(){}publicLogError2(){}setExperimentProperty(){}}e.NullTelemetryServiceShape=S,e.NullTelemetryService=new S;class h{async publicLog(C,I,_){}async publicLogError(C,I,_){}}e.NullEndpointTelemetryService=h,e.telemetryLogId="telemetry",e.extensionTelemetryLogChannelId="extensionTelemetryLog",e.NullAppender={log:()=>null,flush:()=>Promise.resolve(null)};function a(E,C){return b.Event.debounce(C.onDidChangeConfiguration,(_,A)=>{const k=_?new Set([..._.affectedKeys,...A.affectedKeys]):A.affectedKeys;return{...A,affectedKeys:k}},1e3,!0)(_=>{_.source!==7&&E.publicLog2("updateConfiguration",{configurationSource:(0,D.ConfigurationTargetToString)(_.source),configurationKeys:Array.from(_.affectedKeys)})})}e.configurationTelemetry=a;function r(E,C){return!C.isBuilt&&!C.disableTelemetry?!0:!(C.disableTelemetry||!E.enableTelemetry||C.extensionTestsLocationURI)}e.supportsTelemetry=r;function i(E,C){return!(C.isBuilt||C.disableTelemetry||E.enableTelemetry&&E.aiConfig?.ariaKey)}e.isLoggingOnly=i;function s(E){const C=E.getValue(v.TELEMETRY_SETTING_ID),I=E.getValue(v.TELEMETRY_CRASH_REPORTER_SETTING_ID);if(E.getValue(v.TELEMETRY_OLD_SETTING_ID)===!1||I===!1)return 0;switch(C??"all"){case"all":return 3;case"error":return 2;case"crash":return 1;case"off":return 0}}e.getTelemetryLevel=s;function o(E){const C={},I={},_={};p(E,_);for(let A in _){A=A.length>150?A.substr(A.length-149):A;const k=_[A];typeof k=="number"?I[A]=k:typeof k=="boolean"?I[A]=k?1:0:typeof k=="string"?(k.length>8192&&console.warn(`Telemetry property: ${A} has been trimmed to 8192, the original length is ${k.length}`),C[A]=k.substring(0,8191)):typeof k<"u"&&k!==null&&(C[A]=k)}return{properties:C,measurements:I}}e.validateTelemetryData=o;const u=new Set(["ssh-remote","dev-container","attached-container","wsl","tunnel","codespaces","amlext"]);function d(E){if(!E)return"none";const C=(0,T.getRemoteName)(E);return u.has(C)?C:"other"}e.cleanRemoteAuthority=d;function p(E,C,I=0,_){if(E)for(const A of Object.getOwnPropertyNames(E)){const k=E[A],L=_?_+A:A;Array.isArray(k)?C[L]=(0,t.safeStringify)(k):k instanceof Date?C[L]=k.toISOString():(0,y.isObject)(k)?I<2?p(k,C,I+1,L+"."):C[L]=(0,t.safeStringify)(k):C[L]=k}}function c(E,C){const I=E.msftInternalDomains||[],_=C.getValue("telemetry.internalTesting");return(0,f.verifyMicrosoftInternalDomain)(I)||_}e.isInternalTelemetry=c;function l(E){return[E.appRoot,E.extensionsPath,E.userHome.fsPath,E.tmpDir.fsPath,E.userDataPath]}e.getPiiPathsFromEnvironment=l;function n(E,C){if(!E||!E.includes("/")&&!E.includes("\\"))return E;let I=E;const _=[];for(const R of C)for(;;){const M=R.exec(E);if(!M)break;_.push([M.index,R.lastIndex])}const A=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,k=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g;let L=0;for(I="";;){const R=k.exec(E);if(!R)break;const M=_.some(([N,P])=>R.index<P&&N<k.lastIndex);!A.test(R[0])&&!M&&(I+=E.substring(L,R.index)+"<REDACTED: user-file-path>",L=k.lastIndex)}return L<E.length&&(I+=E.substr(L)),I}function g(E){if(!E)return E;const C=[{label:"Google API Key",regex:/AIza[A-Za-z0-9_\\\-]{35}/},{label:"Slack Token",regex:/xox[pbar]\-[A-Za-z0-9]/},{label:"Generic Secret",regex:/(key|token|sig|secret|signature|password|passwd|pwd|android:value)[^a-zA-Z0-9]/i},{label:"Email",regex:/@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+/}];for(const I of C)if(I.regex.test(E))return`<REDACTED: ${I.label}>`;return E}function w(E,C){return(0,t.cloneAndChange)(E,I=>{if(I instanceof m||Object.hasOwnProperty.call(I,"isTrustedTelemetryValue"))return I.value;if(typeof I=="string"){let _=I.replaceAll("%20"," ");_=n(_,C);for(const A of C)_=_.replace(A,"");return _=g(_),_}})}e.cleanData=w}),define(Q[3297],Y([1,0,231,3148,493]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseAssignmentService=void 0;class D{get experimentsEnabled(){return!0}constructor(f,v,m,S,h){this.machineId=f,this.configurationService=v,this.productService=m,this.telemetry=S,this.keyValueStorage=h,this.networkInitialized=!1,m.tasConfig&&this.experimentsEnabled&&(0,t.getTelemetryLevel)(this.configurationService)===3&&(this.tasClient=this.setupTASClient());const a=this.configurationService.getValue("experiments.overrideDelay"),r=typeof a=="number"?a:0;this.overrideInitDelay=new Promise(i=>setTimeout(i,r))}async getTreatment(f){await this.overrideInitDelay;const v=this.configurationService.getValue("experiments.override."+f);if(v!==void 0)return v;if(!this.tasClient||!this.experimentsEnabled)return;let m;const S=await this.tasClient;return this.networkInitialized?m=S.getTreatmentVariable("vscode",f):m=await S.getTreatmentVariableAsync("vscode",f,!0),m=S.getTreatmentVariable("vscode",f),m}async setupTASClient(){const f=this.productService.quality==="stable"?y.TargetPopulation.Public:this.productService.quality==="exploration"?y.TargetPopulation.Exploration:y.TargetPopulation.Insiders,v=new y.AssignmentFilterProvider(this.productService.version,this.productService.nameLong,this.machineId,f),m=this.productService.tasConfig,S=new(await(0,b.importAMDNodeModule)("tas-client-umd","lib/tas-client-umd.js")).ExperimentationService({filterProviders:[v],telemetry:this.telemetry,storageKey:y.ASSIGNMENT_STORAGE_KEY,keyValueStorage:this.keyValueStorage,assignmentContextTelemetryPropertyName:m.assignmentContextTelemetryPropertyName,telemetryEventName:m.telemetryEventName,endpoint:m.endpoint,refetchInterval:y.ASSIGNMENT_REFETCH_INTERVAL});return await S.initializePromise,S.initialFetch.then(()=>this.networkInitialized=!0),S}}e.BaseAssignmentService=D}),define(Q[115],Y([1,0,33,95,112,18,10,15,261,231]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeTargetPlatform=e.getExtensionDependencies=e.BetterMergeId=e.getGalleryExtensionTelemetryData=e.getLocalExtensionTelemetryData=e.groupByExtension=e.getGalleryExtensionId=e.adoptToGalleryExtensionId=e.getExtensionId=e.getIdAndVersion=e.ExtensionKey=e.areSameExtensions=void 0;function S(w,E){return w.id===E.id?!0:(0,t.compareIgnoreCase)(w.id,E.id)===0}e.areSameExtensions=S;const h=/^([^.]+\..+)-(\d+\.\d+\.\d+)(-(.+))?$/;class a{static create(E){const C=E.manifest?E.manifest.version:E.version,I=E.manifest?E.targetPlatform:E.properties.targetPlatform;return new a(E.identifier,C,I)}static parse(E){const C=h.exec(E);return C&&C[1]&&C[2]?new a({id:C[1]},C[2],C[4]||void 0):null}constructor(E,C,I="undefined"){this.version=C,this.targetPlatform=I,this.id=E.id}toString(){return`${this.id}-${this.version}${this.targetPlatform!=="undefined"?`-${this.targetPlatform}`:""}`}equals(E){return E instanceof a?S(this,E)&&this.version===E.version&&this.targetPlatform===E.targetPlatform:!1}}e.ExtensionKey=a;const r=/^([^.]+\..+)@((prerelease)|(\d+\.\d+\.\d+(-.*)?))$/;function i(w){const E=r.exec(w);return E&&E[1]?[o(E[1]),E[2]]:[o(w),void 0]}e.getIdAndVersion=i;function s(w,E){return`${w}.${E}`}e.getExtensionId=s;function o(w){return w.toLowerCase()}e.adoptToGalleryExtensionId=o;function u(w,E){return o(s(w??b.UNDEFINED_PUBLISHER,E))}e.getGalleryExtensionId=u;function d(w,E){const C=[],I=_=>{for(const A of C)if(A.some(k=>S(E(k),E(_))))return A;return null};for(const _ of w){const A=I(_);A?A.push(_):C.push([_])}return C}e.groupByExtension=d;function p(w){return{id:w.identifier.id,name:w.manifest.name,galleryId:null,publisherId:w.publisherId,publisherName:w.manifest.publisher,publisherDisplayName:w.publisherDisplayName,dependencies:w.manifest.extensionDependencies&&w.manifest.extensionDependencies.length>0,extensionVersion:w.manifest.version}}e.getLocalExtensionTelemetryData=p;function c(w){return{id:new m.TelemetryTrustedValue(w.identifier.id),name:new m.TelemetryTrustedValue(w.name),galleryId:w.identifier.uuid,publisherId:w.publisherId,publisherName:w.publisher,publisherDisplayName:w.publisherDisplayName,isPreReleaseVersion:w.properties.isPreReleaseVersion,dependencies:!!(w.properties.dependencies&&w.properties.dependencies.length>0),isSigned:w.isSigned,extensionVersion:w.version,...w.telemetryData}}e.getGalleryExtensionTelemetryData=c,e.BetterMergeId=new b.ExtensionIdentifier("pprice.better-merge");function l(w,E){const C=[],I=E.manifest.extensionDependencies?.slice(0)??[];for(;I.length;){const _=I.shift();if(_&&C.every(A=>!S(A.identifier,{id:_}))){const A=w.filter(k=>S(k.identifier,{id:_}));A.length===1&&(C.push(A[0]),I.push(...A[0].manifest.extensionDependencies?.slice(0)??[]))}}return C}e.getExtensionDependencies=l;async function n(w,E){if(!D.isLinux)return!1;let C;try{C=(await w.readFile(T.URI.file("/etc/os-release"))).value.toString()}catch{try{C=(await w.readFile(T.URI.file("/usr/lib/os-release"))).value.toString()}catch(_){E.debug("Error while getting the os-release file.",(0,f.getErrorMessage)(_))}}return!!C&&(C.match(/^ID=([^\u001b\r\n]*)/m)||[])[1]==="alpine"}async function g(w,E){const C=await n(w,E),I=(0,y.getTargetPlatform)(C?"alpine":D.platform,v.arch);return E.debug("ComputeTargetPlatform:",I),I}e.computeTargetPlatform=g}),define(Q[3298],Y([1,0,31,15,22,26,406,10,2459,95,115,112]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionManagementCLI=void 0;const a=o=>(0,v.localize)(0,null,o),r=(0,v.localize)(1,null,"ms-dotnettools.csharp");function i(o,u){return u?`${o.publisher}.${o.name}@${o.version}`:`${o.publisher}.${o.name}`}let s=class{constructor(u,d,p){this.logger=u,this.extensionManagementService=d,this.extensionGalleryService=p}get location(){}async listExtensions(u,d,p){let c=await this.extensionManagementService.getInstalled(1,p);const l=h.EXTENSION_CATEGORIES.map(g=>g.toLowerCase());if(d&&d!==""){if(l.indexOf(d.toLowerCase())<0){this.logger.info("Invalid category please enter a valid category. To list valid categories run --category without a category specified");return}c=c.filter(g=>g.manifest.categories?g.manifest.categories.map(E=>E.toLowerCase()).indexOf(d.toLowerCase())>-1:!1)}else if(d===""){this.logger.info("Possible Categories: "),l.forEach(g=>{this.logger.info(g)});return}this.location&&this.logger.info((0,v.localize)(2,null,this.location)),c=c.sort((g,w)=>g.identifier.id.localeCompare(w.identifier.id));let n;for(const g of c)n!==g.identifier.id&&(n=g.identifier.id,this.logger.info(i(g.manifest,u)))}async installExtensions(u,d,p,c){const l=[];try{const n=[];u.length&&this.logger.info(this.location?(0,v.localize)(3,null,this.location):(0,v.localize)(4,null));const g=[];let w=[];const E=(I,_,A)=>{w.push({id:I,version:_!=="prerelease"?_:void 0,installOptions:{...p,isBuiltin:A,installPreReleaseVersion:_==="prerelease"||p.installPreReleaseVersion}})};for(const I of u)if(I instanceof f.URI)g.push({vsix:I,installOptions:p});else{const[_,A]=(0,S.getIdAndVersion)(I);E(_,A,!1)}for(const I of d)if(I instanceof f.URI)g.push({vsix:I,installOptions:{...p,isBuiltin:!0,donotIncludePackAndDependencies:!0}});else{const[_,A]=(0,S.getIdAndVersion)(I);E(_,A,!0)}const C=await this.extensionManagementService.getInstalled(1,p.profileLocation);if(g.length&&await Promise.all(g.map(async({vsix:I,installOptions:_})=>{try{const A=await this.installVSIX(I,_,c,C);A&&n.push(A)}catch(A){this.logger.error(A),l.push(I.toString())}})),w.length&&(w=w.filter(({id:I,version:_})=>{const A=C.find(k=>(0,S.areSameExtensions)(k.identifier,{id:I}));if(A){if(!c&&(!_||_==="prerelease"&&A.preRelease))return this.logger.info((0,v.localize)(5,null,I,A.manifest.version,I)),!1;if(_&&A.manifest.version===_)return this.logger.info((0,v.localize)(6,null,`${I}@${_}`)),!1}return!0}),w.length)){const I=await this.getGalleryExtensions(w);await Promise.all(w.map(async _=>{const A=I.get(_.id.toLowerCase());if(A)try{const k=await this.installFromGallery(_,A,C);k&&n.push(k)}catch(k){this.logger.error(k.message||k.stack||k),l.push(_.id)}else this.logger.error(`${a(_.version?`${_.id}@${_.version}`:_.id)} ${r}`),l.push(_.id)}))}}catch(n){throw this.logger.error((0,v.localize)(7,null,(0,y.getErrorMessage)(n))),n}if(l.length)throw new Error((0,v.localize)(8,null,l.join(", ")))}async installVSIX(u,d,p,c){const l=await this.extensionManagementService.getManifest(u);if(!l)throw new Error("Invalid vsix");if(await this.validateVSIX(l,p,d.profileLocation,c))try{return await this.extensionManagementService.install(u,d),this.logger.info((0,v.localize)(9,null,(0,D.basename)(u))),l}catch(g){if((0,y.isCancellationError)(g))return this.logger.info((0,v.localize)(10,null,(0,D.basename)(u))),null;throw g}return null}async getGalleryExtensions(u){const d=new Map,p=u.some(n=>n.installOptions.installPreReleaseVersion),c=await this.extensionManagementService.getTargetPlatform(),l=[];for(const n of u)m.EXTENSION_IDENTIFIER_REGEX.test(n.id)&&l.push({...n,preRelease:p});if(l.length){const n=await this.extensionGalleryService.getExtensions(l,{targetPlatform:c},t.CancellationToken.None);for(const g of n)d.set(g.identifier.id.toLowerCase(),g)}return d}async installFromGallery({id:u,version:d,installOptions:p},c,l){const n=await this.extensionGalleryService.getManifest(c,t.CancellationToken.None);if(n&&!this.validateExtensionKind(n))return null;const g=l.find(w=>(0,S.areSameExtensions)(w.identifier,c.identifier));if(g){if(c.version===g.manifest.version)return this.logger.info((0,v.localize)(11,null,d?`${u}@${d}`:u)),null;this.logger.info((0,v.localize)(12,null,u,c.version))}try{p.isBuiltin?this.logger.info(d?(0,v.localize)(13,null,u,d):(0,v.localize)(14,null,u)):this.logger.info(d?(0,v.localize)(15,null,u,d):(0,v.localize)(16,null,u));const w=await this.extensionManagementService.installFromGallery(c,{...p,installGivenVersion:!!d});return this.logger.info((0,v.localize)(17,null,u,w.manifest.version)),n}catch(w){if((0,y.isCancellationError)(w))return this.logger.info((0,v.localize)(18,null,u)),null;throw w}}validateExtensionKind(u){return!0}async validateVSIX(u,d,p,c){if(!d){const l={id:(0,S.getGalleryExtensionId)(u.publisher,u.name)},n=c.find(g=>(0,S.areSameExtensions)(l,g.identifier)&&(0,T.gt)(g.manifest.version,u.version));if(n)return this.logger.info((0,v.localize)(19,null,n.identifier.id,n.manifest.version,u.version)),!1}return this.validateExtensionKind(u)}async uninstallExtensions(u,d,p){const c=async n=>{if(n instanceof f.URI){const g=await this.extensionManagementService.getManifest(n);return i(g)}return n},l=[];for(const n of u){const g=await c(n),E=(await this.extensionManagementService.getInstalled(void 0,p)).filter(C=>(0,S.areSameExtensions)(C.identifier,{id:g}));if(!E.length)throw new Error(`${this.notInstalled(g)} ${r}`);if(E.some(C=>C.type===0)){this.logger.info((0,v.localize)(20,null,g));return}if(!d&&E.some(C=>C.isBuiltin)){this.logger.info((0,v.localize)(21,null,g));return}this.logger.info((0,v.localize)(22,null,g));for(const C of E)await this.extensionManagementService.uninstall(C,{profileLocation:p}),l.push(C);this.location?this.logger.info((0,v.localize)(23,null,g,this.location)):this.logger.info((0,v.localize)(24,null,g))}}async locateExtension(u){const d=await this.extensionManagementService.getInstalled();u.forEach(p=>{d.forEach(c=>{if(c.identifier.id===p&&c.location.scheme===b.Schemas.file){this.logger.info(c.location.fsPath);return}})})}notInstalled(u){return this.location?(0,v.localize)(25,null,u,this.location):(0,v.localize)(26,null,u)}};e.ExtensionManagementCLI=s,e.ExtensionManagementCLI=s=fe([O(1,m.IExtensionManagementService),O(2,m.IExtensionGalleryService)],s)}),define(Q[3299],Y([1,0,20,4,26,10,25,52,14,6,55,18,261,115]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractNativeExtensionTipsService=e.ExtensionTipsService=void 0;let i=class extends y.Disposable{constructor(p,c){super(),this.fileService=p,this.productService=c,this.allConfigBasedTips=new Map,this.productService.configBasedExtensionTips&&Object.entries(this.productService.configBasedExtensionTips).forEach(([,l])=>this.allConfigBasedTips.set(l.configPath,l))}getConfigBasedTips(p){return this.getValidConfigBasedTips(p)}async getImportantExecutableBasedTips(){return[]}async getOtherExecutableBasedTips(){return[]}async getValidConfigBasedTips(p){const c=[];for(const[l,n]of this.allConfigBasedTips)if(!(n.configScheme&&n.configScheme!==p.scheme))try{const g=(await this.fileService.readFile((0,b.joinPath)(p,l))).value.toString();for(const[w,E]of Object.entries(n.recommendations))(!E.contentPattern||new RegExp(E.contentPattern,"mig").test(g))&&c.push({extensionId:w,extensionName:E.name,configName:n.configName,important:!!E.important,isExtensionPack:!!E.isExtensionPack,whenNotInstalled:E.whenNotInstalled})}catch{}return c}};e.ExtensionTipsService=i,e.ExtensionTipsService=i=fe([O(0,T.IFileService),O(1,f.IProductService)],i);const s="extensionTips/promptedExecutableTips",o="extensionTips/lastPromptedMediumImpExeTime";class u extends i{constructor(p,c,l,n,g,w,E,C){super(E,C),this.userHome=p,this.windowEvents=c,this.telemetryService=l,this.extensionManagementService=n,this.storageService=g,this.extensionRecommendationNotificationService=w,this.highImportanceExecutableTips=new Map,this.mediumImportanceExecutableTips=new Map,this.allOtherExecutableTips=new Map,this.highImportanceTipsByExe=new Map,this.mediumImportanceTipsByExe=new Map,C.exeBasedExtensionTips&&Object.entries(C.exeBasedExtensionTips).forEach(([I,_])=>{const A=[],k=[],L=[];Object.entries(_.recommendations).forEach(([R,M])=>{M.important?_.important?A.push({extensionId:R,extensionName:M.name,isExtensionPack:!!M.isExtensionPack}):k.push({extensionId:R,extensionName:M.name,isExtensionPack:!!M.isExtensionPack}):L.push({extensionId:R,extensionName:M.name,isExtensionPack:!!M.isExtensionPack})}),A.length&&this.highImportanceExecutableTips.set(I,{exeFriendlyName:_.friendlyName,windowsPath:_.windowsPath,recommendations:A}),k.length&&this.mediumImportanceExecutableTips.set(I,{exeFriendlyName:_.friendlyName,windowsPath:_.windowsPath,recommendations:k}),L.length&&this.allOtherExecutableTips.set(I,{exeFriendlyName:_.friendlyName,windowsPath:_.windowsPath,recommendations:L})}),(0,v.timeout)(3e3).then(async()=>{await this.collectTips(),this.promptHighImportanceExeBasedTip(),this.promptMediumImportanceExeBasedTip()})}async getImportantExecutableBasedTips(){const p=await this.getValidExecutableBasedExtensionTips(this.highImportanceExecutableTips),c=await this.getValidExecutableBasedExtensionTips(this.mediumImportanceExecutableTips);return[...p,...c]}getOtherExecutableBasedTips(){return this.getValidExecutableBasedExtensionTips(this.allOtherExecutableTips)}async collectTips(){const p=await this.getValidExecutableBasedExtensionTips(this.highImportanceExecutableTips),c=await this.getValidExecutableBasedExtensionTips(this.mediumImportanceExecutableTips),l=await this.extensionManagementService.getInstalled();this.highImportanceTipsByExe=this.groupImportantTipsByExe(p,l),this.mediumImportanceTipsByExe=this.groupImportantTipsByExe(c,l)}groupImportantTipsByExe(p,c){const l=new Map;p.forEach(C=>l.set(C.extensionId.toLowerCase(),C));const{installed:n,uninstalled:g}=this.groupByInstalled([...l.keys()],c);for(const C of n){const I=l.get(C);I&&this.telemetryService.publicLog2("exeExtensionRecommendations:alreadyInstalled",{extensionId:C,exeName:I.exeName})}for(const C of g){const I=l.get(C);I&&this.telemetryService.publicLog2("exeExtensionRecommendations:notInstalled",{extensionId:C,exeName:I.exeName})}const w=this.getPromptedExecutableTips(),E=new Map;for(const C of g){const I=l.get(C);if(I&&(!w[I.exeName]||!w[I.exeName].includes(I.extensionId))){let _=E.get(I.exeName);_||(_=[],E.set(I.exeName,_)),_.push(I)}}return E}promptHighImportanceExeBasedTip(){if(this.highImportanceTipsByExe.size===0)return;const[p,c]=[...this.highImportanceTipsByExe.entries()][0];this.promptExeRecommendations(c).then(l=>{switch(l){case"reacted":this.addToRecommendedExecutables(c[0].exeName,c);break;case"ignored":this.highImportanceTipsByExe.delete(p);break;case"incompatibleWindow":{const n=m.Event.once(m.Event.latch(m.Event.any(this.windowEvents.onDidOpenWindow,this.windowEvents.onDidFocusWindow)));this._register(n(()=>this.promptHighImportanceExeBasedTip()));break}case"toomany":{const n=this._register((0,v.disposableTimeout)(()=>{n.dispose(),this.promptHighImportanceExeBasedTip()},36e5));break}}})}promptMediumImportanceExeBasedTip(){if(this.mediumImportanceTipsByExe.size===0)return;const p=this.getLastPromptedMediumExeTime(),c=Date.now()-p,l=7*24*60*60*1e3;if(c<l){const w=this._register((0,v.disposableTimeout)(()=>{w.dispose(),this.promptMediumImportanceExeBasedTip()},l-c));return}const[n,g]=[...this.mediumImportanceTipsByExe.entries()][0];this.promptExeRecommendations(g).then(w=>{switch(w){case"reacted":{this.updateLastPromptedMediumExeTime(Date.now()),this.mediumImportanceTipsByExe.delete(n),this.addToRecommendedExecutables(g[0].exeName,g);const E=this._register((0,v.disposableTimeout)(()=>{E.dispose(),this.promptMediumImportanceExeBasedTip()},l));break}case"ignored":this.mediumImportanceTipsByExe.delete(n),this.promptMediumImportanceExeBasedTip();break;case"incompatibleWindow":{const E=m.Event.once(m.Event.latch(m.Event.any(this.windowEvents.onDidOpenWindow,this.windowEvents.onDidFocusWindow)));this._register(E(()=>this.promptMediumImportanceExeBasedTip()));break}case"toomany":{const E=this._register((0,v.disposableTimeout)(()=>{E.dispose(),this.promptMediumImportanceExeBasedTip()},36e5));break}}})}async promptExeRecommendations(p){const c=await this.extensionManagementService.getInstalled(1),l=p.filter(n=>!n.whenNotInstalled||n.whenNotInstalled.every(g=>c.every(w=>!(0,r.areSameExtensions)(w.identifier,{id:g})))).map(({extensionId:n})=>n.toLowerCase());return this.extensionRecommendationNotificationService.promptImportantExtensionsInstallNotification({extensions:l,source:3,name:p[0].exeFriendlyName,searchValue:`@exe:"${p[0].exeName}"`})}getLastPromptedMediumExeTime(){let p=this.storageService.getNumber(o,-1);return p||(p=Date.now(),this.updateLastPromptedMediumExeTime(p)),p}updateLastPromptedMediumExeTime(p){this.storageService.store(o,p,-1,1)}getPromptedExecutableTips(){return JSON.parse(this.storageService.get(s,-1,"{}"))}addToRecommendedExecutables(p,c){const l=this.getPromptedExecutableTips();l[p]=c.map(({extensionId:n})=>n.toLowerCase()),this.storageService.store(s,JSON.stringify(l),-1,0)}groupByInstalled(p,c){const l=[],n=[],g=c.reduce((w,E)=>(w.add(E.identifier.id.toLowerCase()),w),new Set);return p.forEach(w=>{g.has(w.toLowerCase())?l.push(w):n.push(w)}),{installed:l,uninstalled:n}}async getValidExecutableBasedExtensionTips(p){const c=[],l=new Map;for(const n of p.keys()){const g=p.get(n);if(!g||!(0,t.isNonEmptyArray)(g.recommendations))continue;const w=[];h.isWindows?g.windowsPath&&w.push(g.windowsPath.replace("%USERPROFILE%",()=>a.env.USERPROFILE).replace("%ProgramFiles(x86)%",()=>a.env["ProgramFiles(x86)"]).replace("%ProgramFiles%",()=>a.env.ProgramFiles).replace("%APPDATA%",()=>a.env.APPDATA).replace("%WINDIR%",()=>a.env.WINDIR)):(w.push((0,S.join)("/usr/local/bin",n)),w.push((0,S.join)("/usr/bin",n)),w.push((0,S.join)(this.userHome.fsPath,n)));for(const E of w){let C=l.get(E);if(C===void 0&&(C=await this.fileService.exists(D.URI.file(E)),l.set(E,C)),C)for(const{extensionId:I,extensionName:_,isExtensionPack:A,whenNotInstalled:k}of g.recommendations)c.push({extensionId:I,extensionName:_,isExtensionPack:A,exeName:n,exeFriendlyName:g.exeFriendlyName,windowsPath:g.windowsPath,whenNotInstalled:k})}}return c}}e.AbstractNativeExtensionTipsService=u}),define(Q[3300],Y([1,0,31,115]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.migrateUnsupportedExtensions=void 0;async function b(D,T,f,v,m){try{const S=await D.getExtensionsControlManifest();if(!S.deprecated)return;const h=await D.getInstalled(1);for(const[a,r]of Object.entries(S.deprecated)){if(!r?.extension)continue;const{id:i,autoMigrate:s,preRelease:o}=r.extension;if(!s)continue;const u=h.find(p=>(0,y.areSameExtensions)(p.identifier,{id:a}));if(!u)continue;const d=(await T.getExtensions([{id:i,preRelease:o}],{targetPlatform:await D.getTargetPlatform(),compatible:!0},t.CancellationToken.None))[0];if(!d){m.info(`Skipping migrating '${u.identifier.id}' extension because, the comaptible target '${i}' extension is not found`);continue}try{m.info(`Migrating '${u.identifier.id}' extension to '${i}' extension...`);const p=!v.getDisabledExtensions().some(l=>(0,y.areSameExtensions)(l,u.identifier));await D.uninstall(u),m.info(`Uninstalled the unsupported extension '${u.identifier.id}'`);let c=h.find(l=>(0,y.areSameExtensions)(l.identifier,{id:i}));(!c||!c.isPreReleaseVersion&&p)&&(c=await D.installFromGallery(d,{installPreReleaseVersion:!0,isMachineScoped:u.isMachineScoped,operation:4}),m.info(`Installed the pre-release extension '${c.identifier.id}'`),p||(await v.disableExtension(c.identifier),m.info(`Disabled the pre-release extension '${c.identifier.id}' because the unsupported extension '${u.identifier.id}' is disabled`)),s.storage&&(f.addToMigrationList((0,y.getExtensionId)(u.manifest.publisher,u.manifest.name),(0,y.getExtensionId)(c.manifest.publisher,c.manifest.name)),m.info("Added pre-release extension to the storage migration list"))),m.info(`Migrated '${u.identifier.id}' extension to '${i}' extension.`)}catch(p){m.error(p)}}}catch(S){m.error(S)}}e.migrateUnsupportedExtensions=b}),define(Q[412],Y([1,0,18,33,10,5,500,231,22,330]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractExtensionResourceLoaderService=e.migratePlatformSpecificExtensionGalleryResourceURL=e.IExtensionResourceLoaderService=void 0;const S="web-extension-resource";e.IExtensionResourceLoaderService=(0,D.createDecorator)("extensionResourceLoaderService");function h(r,i){if(r.query!==`target=${i}`)return;const s=r.path.split("/");if(s[3])return s[3]=`${s[3]}+${i}`,r.with({query:null,path:s.join("/")})}e.migratePlatformSpecificExtensionGalleryResourceURL=h;class a{constructor(i,s,o,u,d){this._fileService=i,this._storageService=s,this._productService=o,this._environmentService=u,this._configurationService=d,this._webExtensionResourceEndPoint=`${(0,m.getRemoteServerRootPath)(o)}/${S}/`,o.extensionsGallery&&(this._extensionGalleryResourceUrlTemplate=o.extensionsGallery.resourceUrlTemplate,this._extensionGalleryAuthority=this._extensionGalleryResourceUrlTemplate?this._getExtensionGalleryAuthority(b.URI.parse(this._extensionGalleryResourceUrlTemplate)):void 0)}get supportsExtensionGalleryResources(){return this._extensionGalleryResourceUrlTemplate!==void 0}getExtensionGalleryResourceURL({publisher:i,name:s,version:o,targetPlatform:u},d){if(this._extensionGalleryResourceUrlTemplate){const p=b.URI.parse((0,y.format2)(this._extensionGalleryResourceUrlTemplate,{publisher:i,name:s,version:u!==void 0&&u!=="undefined"&&u!=="unknown"&&u!=="universal"?`${o}+${u}`:o,path:"extension"}));return this._isWebExtensionResourceEndPoint(p)?p.with({scheme:v.RemoteAuthorities.getPreferredWebSchema()}):p}}isExtensionGalleryResource(i){return!!this._extensionGalleryAuthority&&this._extensionGalleryAuthority===this._getExtensionGalleryAuthority(i)}async getExtensionGalleryRequestHeaders(){const i={"X-Client-Name":`${this._productService.applicationName}${t.isWeb?"-web":""}`,"X-Client-Version":this._productService.version};return(0,f.supportsTelemetry)(this._productService,this._environmentService)&&(0,f.getTelemetryLevel)(this._configurationService)===3&&(i["X-Machine-Id"]=await this._getServiceMachineId()),this._productService.commit&&(i["X-Client-Commit"]=this._productService.commit),i}_getServiceMachineId(){return this._serviceMachineIdPromise||(this._serviceMachineIdPromise=(0,T.getServiceMachineId)(this._environmentService,this._fileService,this._storageService)),this._serviceMachineIdPromise}_getExtensionGalleryAuthority(i){if(this._isWebExtensionResourceEndPoint(i))return i.authority;const s=i.authority.indexOf(".");return s!==-1?i.authority.substring(s+1):void 0}_isWebExtensionResourceEndPoint(i){return i.path.startsWith(this._webExtensionResourceEndPoint)}}e.AbstractExtensionResourceLoaderService=a}),define(Q[3301],Y([1,0,500,231]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveMarketplaceHeaders=void 0;async function b(D,T,f,v,m,S,h){const a={"X-Market-Client-Id":`VSCode ${D}`,"User-Agent":`VSCode ${D} (${T.nameShort})`};if((0,y.supportsTelemetry)(T,f)&&(0,y.getTelemetryLevel)(v)===3){const r=await(0,t.getServiceMachineId)(f,m,S);a["X-Market-User-Id"]=r,a["VSCode-SessionId"]=h.machineId||r}return a}e.resolveMarketplaceHeaders=b}),define(Q[3302],Y([1,0,4,42,18,33,2483,9,56,286,52,16,30,231]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryService=void 0;let i=class{static{this.IDLE_START_EVENT_NAME="UserIdleStart"}static{this.IDLE_STOP_EVENT_NAME="UserIdleStop"}constructor(u,d,p){this._configurationService=d,this._productService=p,this._experimentProperties={},this._disposables=new t.DisposableStore,this._cleanupPatterns=[],this._appenders=u.appenders,this._commonProperties=u.commonProperties??Object.create(null),this.sessionId=this._commonProperties.sessionID,this.machineId=this._commonProperties["common.machineId"],this.firstSessionDate=this._commonProperties["common.firstSessionDate"],this.msftInternal=this._commonProperties["common.msftInternal"],this._piiPaths=u.piiPaths||[],this._telemetryLevel=3,this._sendErrorTelemetry=!!u.sendErrorTelemetry,this._cleanupPatterns=[/(vscode-)?file:\/\/\/.*?\/resources\/app\//gi];for(const c of this._piiPaths)this._cleanupPatterns.push(new RegExp((0,D.escapeRegExpCharacters)(c),"gi")),c.indexOf("\\")>=0&&this._cleanupPatterns.push(new RegExp((0,D.escapeRegExpCharacters)(c.replace(/\\/g,"/")),"gi"));this._updateTelemetryLevel(),this._disposables.add(this._configurationService.onDidChangeConfiguration(c=>{(c.affectsConfiguration(a.TELEMETRY_SETTING_ID)||c.affectsConfiguration(a.TELEMETRY_OLD_SETTING_ID)||c.affectsConfiguration(a.TELEMETRY_CRASH_REPORTER_SETTING_ID))&&this._updateTelemetryLevel()}))}setExperimentProperty(u,d){this._experimentProperties[u]=d}_updateTelemetryLevel(){let u=(0,r.getTelemetryLevel)(this._configurationService);const d=this._productService.enabledTelemetryLevels;if(d){this._sendErrorTelemetry=this.sendErrorTelemetry?d.error:!1;const p=d.usage?3:d.error?2:0;u=Math.min(u,p)}this._telemetryLevel=u}get sendErrorTelemetry(){return this._sendErrorTelemetry}get telemetryLevel(){return this._telemetryLevel}dispose(){this._disposables.dispose()}_log(u,d,p){this._telemetryLevel<d||(p=(0,y.mixin)(p,this._experimentProperties),p=(0,r.cleanData)(p,this._cleanupPatterns),p=(0,y.mixin)(p,this._commonProperties),this._appenders.forEach(c=>c.log(u,p)))}publicLog(u,d){this._log(u,3,d)}publicLog2(u,d){this.publicLog(u,d)}publicLogError(u,d){this._sendErrorTelemetry&&this._log(u,2,d)}publicLogError2(u,d){this.publicLogError(u,d)}};e.TelemetryService=i,e.TelemetryService=i=fe([O(1,f.IConfigurationService),O(2,S.IProductService)],i);function s(){const o=(0,T.localize)(0,null,m.default.nameLong),u=m.default.privacyStatementUrl?(0,T.localize)(2,null,"https://aka.ms/vscode-telemetry",m.default.privacyStatementUrl):(0,T.localize)(1,null,"https://aka.ms/vscode-telemetry"),d=b.isWeb?"":(0,T.localize)(3,null),p=(0,T.localize)(4,null),c=(0,T.localize)(5,null),l=(0,T.localize)(6,null),n=(0,T.localize)(7,null),g=` | | ${p} | ${c} | ${l} | |:------|:---------------------:|:---------------:|:--------------:| | all | \u2713 | \u2713 | \u2713 | | error | \u2713 | \u2713 | - | | crash | \u2713 | - | - | | off | - | - | - | `,w=(0,T.localize)(8,null);return` ${o} ${u} ${d} ${n} ${g} ${w} `}h.Registry.as(v.Extensions.Configuration).registerConfiguration({id:a.TELEMETRY_SECTION_ID,order:1,type:"object",title:(0,T.localize)(9,null),properties:{[a.TELEMETRY_SETTING_ID]:{type:"string",enum:["all","error","crash","off"],enumDescriptions:[(0,T.localize)(10,null),(0,T.localize)(11,null),(0,T.localize)(12,null),(0,T.localize)(13,null)],markdownDescription:s(),default:"all",restricted:!0,scope:1,tags:["usesOnlineServices","telemetry"]}}}),h.Registry.as(v.Extensions.Configuration).registerConfiguration({id:a.TELEMETRY_SECTION_ID,order:110,type:"object",title:(0,T.localize)(14,null),properties:{[a.TELEMETRY_OLD_SETTING_ID]:{type:"boolean",markdownDescription:m.default.privacyStatementUrl?(0,T.localize)(16,null,m.default.nameLong,m.default.privacyStatementUrl):(0,T.localize)(15,null,m.default.nameLong),default:!0,restricted:!0,markdownDeprecationMessage:(0,T.localize)(17,null,`\`#${a.TELEMETRY_SETTING_ID}#\``),scope:1,tags:["usesOnlineServices","telemetry"]}}})}),define(Q[3303],Y([1,0,153,30]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSharedProcessRemoteService)(y.ICustomEndpointTelemetryService,"customEndpointTelemetry")}),define(Q[3304],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BufferMarkCapability=void 0;class b extends y.Disposable{constructor(T){super(),this._terminal=T,this.type=4,this._idToMarkerMap=new Map,this._anonymousMarkers=new Map,this._onMarkAdded=this._register(new t.Emitter),this.onMarkAdded=this._onMarkAdded.event}*markers(){for(const T of this._idToMarkerMap.values())yield T;for(const T of this._anonymousMarkers.values())yield T}addMark(T){const f=T?.marker||this._terminal.registerMarker(),v=T?.id;f&&(v?(this._idToMarkerMap.set(v,f),f.onDispose(()=>this._idToMarkerMap.delete(v))):(this._anonymousMarkers.set(f.id,f),f.onDispose(()=>this._anonymousMarkers.delete(f.id))),this._onMarkAdded.fire({marker:f,id:v,hidden:T?.hidden,hoverMessage:T?.hoverMessage}))}getMark(T){return this._idToMarkerMap.get(T)}}e.BufferMarkCapability=b}),define(Q[1196],Y([1,0,14,102,6,4]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLinesForCommand=e.CommandDetectionCapability=void 0;class T extends D.Disposable{get commands(){return this._commands}get executingCommand(){return this._currentCommand.command}get executingCommandObject(){if(this._currentCommand.commandStartMarker)return{marker:this._currentCommand.commandStartMarker}}get currentCommand(){return this._currentCommand}get cwd(){return this._cwd}get _isInputting(){return!!(this._currentCommand.commandStartMarker&&!this._currentCommand.commandExecutedMarker)}get hasInput(){if(!(!this._isInputting||!this._currentCommand?.commandStartMarker)){if(this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY===this._currentCommand.commandStartMarker?.line){const r=this._terminal.buffer.active.getLine(this._terminal.buffer.active.cursorY)?.translateToString(!0,this._currentCommand.commandStartX);return r===void 0?void 0:r.length>0}return!0}}constructor(r,i){super(),this._terminal=r,this._logService=i,this.type=2,this._commands=[],this._currentCommand={},this._isWindowsPty=!1,this._commandMarkers=[],this.__isCommandStorageDisabled=!1,this._onCommandStarted=this._register(new b.Emitter),this.onCommandStarted=this._onCommandStarted.event,this._onBeforeCommandFinished=this._register(new b.Emitter),this.onBeforeCommandFinished=this._onBeforeCommandFinished.event,this._onCommandFinished=this._register(new b.Emitter),this.onCommandFinished=this._onCommandFinished.event,this._onCommandExecuted=this._register(new b.Emitter),this.onCommandExecuted=this._onCommandExecuted.event,this._onCommandInvalidated=this._register(new b.Emitter),this.onCommandInvalidated=this._onCommandInvalidated.event,this._onCurrentCommandInvalidated=this._register(new b.Emitter),this.onCurrentCommandInvalidated=this._onCurrentCommandInvalidated.event,this._dimensions={cols:this._terminal.cols,rows:this._terminal.rows},this._register(this._terminal.onResize(s=>this._handleResize(s))),this._register(this._terminal.onCursorMove(()=>this._handleCursorMove())),this._setupClearListeners()}_handleResize(r){this._isWindowsPty&&this._preHandleResizeWindows(r),this._dimensions.cols=r.cols,this._dimensions.rows=r.rows}_handleCursorMove(){this._terminal.buffer.active===this._terminal.buffer.normal&&this._currentCommand.commandStartMarker&&this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY<this._currentCommand.commandStartMarker.line&&(this._clearCommandsInViewport(),this._currentCommand.isInvalid=!0,this._onCurrentCommandInvalidated.fire({reason:"windows"}))}_setupClearListeners(){this.onBeforeCommandFinished(r=>{this._isWindowsPty&&(r.command.trim().toLowerCase()==="clear"||r.command.trim().toLowerCase()==="cls")&&(this._clearCommandsInViewport(),this._currentCommand.isInvalid=!0,this._onCurrentCommandInvalidated.fire({reason:"windows"}))}),this._terminal.parser.registerCsiHandler({final:"J"},r=>(this._isWindowsPty||r.length>=1&&(r[0]===2||r[0]===3)&&this._clearCommandsInViewport(),!1))}_preHandleResizeWindows(r){const i=this._terminal.buffer.active.baseY,s=r.rows-this._dimensions.rows;s>0&&this._waitForCursorMove().then(()=>{const o=Math.min(s,i);for(let u=this.commands.length-1;u>=0;u--){const d=this.commands[u];if(!d.marker||d.marker.line<i||d.commandStartLineContent===void 0)break;const p=this._terminal.buffer.active.getLine(d.marker.line);if(!p||p.translateToString(!0)===d.commandStartLineContent)continue;const c=d.marker.line-o;this._terminal.buffer.active.getLine(c)?.translateToString(!0)===d.commandStartLineContent&&this._terminal._core._bufferService.buffer.lines.onDeleteEmitter.fire({index:this._terminal.buffer.active.baseY,amount:o})}})}_clearCommandsInViewport(){let r=0;for(let i=this._commands.length-1;i>=0;i--){const s=this._commands[i].marker?.line;if(s&&s<this._terminal.buffer.active.baseY)break;r++}r>0&&this._onCommandInvalidated.fire(this._commands.splice(this._commands.length-r,r))}_waitForCursorMove(){const r=this._terminal.buffer.active.cursorX,i=this._terminal.buffer.active.cursorY;let s=0;return new Promise((o,u)=>{const d=setInterval(()=>{if(r!==this._terminal.buffer.active.cursorX||i!==this._terminal.buffer.active.cursorY){o(),clearInterval(d);return}s+=10,s>1e3&&(clearInterval(d),o())},10)})}setCwd(r){this._cwd=r}setIsWindowsPty(r){this._isWindowsPty=r}setIsCommandStorageDisabled(){this.__isCommandStorageDisabled=!0}getCwdForLine(r){return this._currentCommand.promptStartMarker&&r>=this._currentCommand.promptStartMarker?.line?this._cwd:[...this._commands].reverse().find(s=>s.marker.line<=r-1)?.cwd}handlePromptStart(r){this._currentCommand.promptStartMarker=r?.marker||this._terminal.registerMarker(0),this._logService.debug("CommandDetectionCapability#handlePromptStart",this._terminal.buffer.active.cursorX,this._currentCommand.promptStartMarker?.line)}handleContinuationStart(){this._currentCommand.currentContinuationMarker=this._terminal.registerMarker(0),this._logService.debug("CommandDetectionCapability#handleContinuationStart",this._currentCommand.currentContinuationMarker)}handleContinuationEnd(){if(!this._currentCommand.currentContinuationMarker){this._logService.warn("CommandDetectionCapability#handleContinuationEnd Received continuation end without start");return}this._currentCommand.continuations||(this._currentCommand.continuations=[]),this._currentCommand.continuations.push({marker:this._currentCommand.currentContinuationMarker,end:this._terminal.buffer.active.cursorX}),this._currentCommand.currentContinuationMarker=void 0,this._logService.debug("CommandDetectionCapability#handleContinuationEnd",this._currentCommand.continuations[this._currentCommand.continuations.length-1])}handleRightPromptStart(){this._currentCommand.commandRightPromptStartX=this._terminal.buffer.active.cursorX,this._logService.debug("CommandDetectionCapability#handleRightPromptStart",this._currentCommand.commandRightPromptStartX)}handleRightPromptEnd(){this._currentCommand.commandRightPromptEndX=this._terminal.buffer.active.cursorX,this._logService.debug("CommandDetectionCapability#handleRightPromptEnd",this._currentCommand.commandRightPromptEndX)}handleCommandStart(r){if(this._handleCommandStartOptions=r,this._currentCommand.commandStartMarker=r?.marker||this._currentCommand.commandStartMarker,this._currentCommand.commandStartMarker?.line===this._terminal.buffer.active.cursorY){this._currentCommand.commandStartX=this._terminal.buffer.active.cursorX,this._logService.debug("CommandDetectionCapability#handleCommandStart",this._currentCommand.commandStartX,this._currentCommand.commandStartMarker?.line);return}if(this._isWindowsPty){this._handleCommandStartWindows();return}this._currentCommand.commandStartX=this._terminal.buffer.active.cursorX,this._currentCommand.commandStartMarker=r?.marker||this._terminal.registerMarker(0),this._currentCommand.commandExecutedMarker?.dispose(),this._currentCommand.commandExecutedMarker=void 0,this._currentCommand.commandExecutedX=void 0;for(const i of this._commandMarkers)i.dispose();this._commandMarkers.length=0,this._onCommandStarted.fire({marker:r?.marker||this._currentCommand.commandStartMarker,markProperties:r?.markProperties}),this._logService.debug("CommandDetectionCapability#handleCommandStart",this._currentCommand.commandStartX,this._currentCommand.commandStartMarker?.line)}_handleCommandStartWindows(){this._currentCommand.commandStartX=this._terminal.buffer.active.cursorX,this._commandMarkers.length=0,(0,t.timeout)(0).then(()=>{if(this._currentCommand.commandExecutedMarker||(this._onCursorMoveListener=this._terminal.onCursorMove(()=>{if(this._commandMarkers.length===0||this._commandMarkers[this._commandMarkers.length-1].line!==this._terminal.buffer.active.cursorY){const r=this._terminal.registerMarker(0);r&&this._commandMarkers.push(r)}})),this._currentCommand.commandStartMarker=this._terminal.registerMarker(0),this._currentCommand.commandStartMarker){const r=this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line);r&&(this._currentCommand.commandStartLineContent=r.translateToString(!0))}this._onCommandStarted.fire({marker:this._currentCommand.commandStartMarker}),this._logService.debug("CommandDetectionCapability#_handleCommandStartWindows",this._currentCommand.commandStartX,this._currentCommand.commandStartMarker?.line)})}handleGenericCommand(r){r?.markProperties?.disableCommandStorage&&this.setIsCommandStorageDisabled(),this.handlePromptStart(r),this.handleCommandStart(r),this.handleCommandExecuted(r),this.handleCommandFinished(void 0,r)}handleCommandExecuted(r){if(this._isWindowsPty){this._handleCommandExecutedWindows();return}if(this._currentCommand.commandExecutedMarker=r?.marker||this._terminal.registerMarker(0),this._currentCommand.commandExecutedX=this._terminal.buffer.active.cursorX,this._logService.debug("CommandDetectionCapability#handleCommandExecuted",this._currentCommand.commandExecutedX,this._currentCommand.commandExecutedMarker?.line),!this._currentCommand.commandStartMarker||!this._currentCommand.commandExecutedMarker||this._currentCommand.commandStartX===void 0)return;this._currentCommand.command=this.__isCommandStorageDisabled?"":this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line)?.translateToString(!0,this._currentCommand.commandStartX,this._currentCommand.commandRightPromptStartX).trim();let i=this._currentCommand.commandStartMarker.line+1;const s=this._currentCommand.commandExecutedMarker.line;for(;i<s;i++){const o=this._terminal.buffer.active.getLine(i);if(o){const u=this._currentCommand.continuations?.find(p=>p.marker.line===i);u&&(this._currentCommand.command+=` `);const d=u?.end??0;this._currentCommand.command+=o.translateToString(!0,d)}}i===s&&(this._currentCommand.command+=this._terminal.buffer.active.getLine(s)?.translateToString(!0,void 0,this._currentCommand.commandExecutedX)||""),this._onCommandExecuted.fire()}_handleCommandExecutedWindows(){this._onCursorMoveListener?.dispose(),this._onCursorMoveListener=void 0,this._evaluateCommandMarkersWindows(),this._currentCommand.commandExecutedX=this._terminal.buffer.active.cursorX,this._onCommandExecuted.fire(),this._logService.debug("CommandDetectionCapability#handleCommandExecuted",this._currentCommand.commandExecutedX,this._currentCommand.commandExecutedMarker?.line)}invalidateCurrentCommand(r){this._currentCommand.isInvalid=!0,this._onCurrentCommandInvalidated.fire(r)}handleCommandFinished(r,i){this._isWindowsPty&&this._preHandleCommandFinishedWindows(),this._currentCommand.commandFinishedMarker=i?.marker||this._terminal.registerMarker(0);let s=this._currentCommand.command;if(this._logService.debug("CommandDetectionCapability#handleCommandFinished",this._terminal.buffer.active.cursorX,this._currentCommand.commandFinishedMarker?.line,this._currentCommand.command,this._currentCommand),this._exitCode=r,this._exitCode===void 0){const o=this.commands.length>0?this.commands[this.commands.length-1]:void 0;s&&s.length>0&&o?.command===s&&(this._exitCode=o.exitCode)}if(!(this._currentCommand.commandStartMarker===void 0||!this._terminal.buffer.active)){if(this._exitCode===void 0&&s===void 0&&(s=""),s!==void 0&&!s.startsWith("\\")||this._handleCommandStartOptions?.ignoreCommandLine){const o=this._terminal.buffer.active,u=Date.now(),d=this._currentCommand.commandExecutedMarker,p=this._currentCommand.commandFinishedMarker,c={command:this._handleCommandStartOptions?.ignoreCommandLine?"":s||"",isTrusted:!!this._currentCommand.isTrusted,marker:this._currentCommand.commandStartMarker,endMarker:p,executedMarker:d,timestamp:u,cwd:this._cwd,exitCode:this._exitCode,commandStartLineContent:this._currentCommand.commandStartLineContent,hasOutput:()=>!d?.isDisposed&&!p?.isDisposed&&!!(d&&p&&d?.line<p.line),getOutput:()=>f(d,p,o),getOutputMatch:l=>v(this._isWindowsPty&&d?.line===p?.line?this._currentCommand.commandStartMarker:d,p,o,this._terminal.cols,l),markProperties:i?.markProperties};this._commands.push(c),this._logService.debug("CommandDetectionCapability#onCommandFinished",c),this._onBeforeCommandFinished.fire(c),this._currentCommand.isInvalid||this._onCommandFinished.fire(c)}this._currentCommand.previousCommandMarker=this._currentCommand.commandStartMarker,this._currentCommand={},this._handleCommandStartOptions=void 0}}_preHandleCommandFinishedWindows(){this._currentCommand.commandExecutedMarker||(this._commandMarkers.length===0&&(this._currentCommand.commandStartMarker||(this._currentCommand.commandStartMarker=this._terminal.registerMarker(0)),this._currentCommand.commandStartMarker&&this._commandMarkers.push(this._currentCommand.commandStartMarker)),this._evaluateCommandMarkersWindows())}_evaluateCommandMarkersWindows(){if(this._commandMarkers.length!==0){if(this._commandMarkers=this._commandMarkers.sort((r,i)=>r.line-i.line),this._currentCommand.commandStartMarker=this._commandMarkers[0],this._currentCommand.commandStartMarker){const r=this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line);r&&(this._currentCommand.commandStartLineContent=r.translateToString(!0))}this._currentCommand.commandExecutedMarker=this._commandMarkers[this._commandMarkers.length-1]}}setCommandLine(r,i){this._logService.debug("CommandDetectionCapability#setCommandLine",r,i),this._currentCommand.command=r,this._currentCommand.isTrusted=i}serialize(){const r=this.commands.map(i=>({startLine:i.marker?.line,startX:void 0,endLine:i.endMarker?.line,executedLine:i.executedMarker?.line,command:this.__isCommandStorageDisabled?"":i.command,isTrusted:i.isTrusted,cwd:i.cwd,exitCode:i.exitCode,commandStartLineContent:i.commandStartLineContent,timestamp:i.timestamp,markProperties:i.markProperties,aliases:i.aliases}));return this._currentCommand.commandStartMarker&&r.push({startLine:this._currentCommand.commandStartMarker.line,startX:this._currentCommand.commandStartX,endLine:void 0,executedLine:void 0,command:"",isTrusted:!0,cwd:this._cwd,exitCode:void 0,commandStartLineContent:void 0,timestamp:0,markProperties:void 0}),{isWindowsPty:this._isWindowsPty,commands:r}}deserialize(r){r.isWindowsPty&&this.setIsWindowsPty(r.isWindowsPty);const i=this._terminal.buffer.normal;for(const s of r.commands){const o=s.startLine!==void 0?this._terminal.registerMarker(s.startLine-(i.baseY+i.cursorY)):void 0;if(!o)continue;if(!s.endLine){this._currentCommand.commandStartMarker=o,this._currentCommand.commandStartX=s.startX,this._cwd=s.cwd,this._onCommandStarted.fire({marker:o});continue}const u=s.endLine!==void 0?this._terminal.registerMarker(s.endLine-(i.baseY+i.cursorY)):void 0,d=s.executedLine!==void 0?this._terminal.registerMarker(s.executedLine-(i.baseY+i.cursorY)):void 0,p={command:this.__isCommandStorageDisabled?"":s.command,isTrusted:s.isTrusted,marker:o,endMarker:u,executedMarker:d,timestamp:s.timestamp,cwd:s.cwd,commandStartLineContent:s.commandStartLineContent,exitCode:s.exitCode,hasOutput:()=>!d?.isDisposed&&!u?.isDisposed&&!!(d&&u&&d.line<u.line),getOutput:()=>f(d,u,i),getOutputMatch:c=>v(this._isWindowsPty&&d?.line===u?.line?o:d,u,i,this._terminal.cols,c),markProperties:s.markProperties,wasReplayed:!0};this._commands.push(p),this._logService.debug("CommandDetectionCapability#onCommandFinished",p),this._onCommandFinished.fire(p)}}}e.CommandDetectionCapability=T,fe([(0,y.debounce)(500)],T.prototype,"_handleCursorMove",null);function f(a,r,i){if(!a||!r)return;const s=a.line,o=r.line;if(s===o)return;let u="",d;for(let p=s;p<o;p++)d=i.getLine(p),d&&(u+=d.translateToString(!d.isWrapped)+(d.isWrapped?"":` `));return u===""?void 0:u}function v(a,r,i,s,o){if(!a||!r)return;const u=r.line;if(u===-1)return;const d=Math.max(a.line,0),p=o.lineMatcher,c=typeof p=="string"?1:o.length||h(p),l=[];let n;if(o.anchor==="bottom")for(let g=u-(o.offset||0);g>=d;g--){let w=g;const E=g;for(;w>=d&&i.getLine(w)?.isWrapped;)w--;if(g=w,l.unshift(S(i,w,E,s)),n||(n=l[0].match(p)),l.length>=c)break}else for(let g=d+(o.offset||0);g<u;g++){const w=g;let E=g;for(;E+1<u&&i.getLine(E+1)?.isWrapped;)E++;if(g=E,l.push(S(i,w,E,s)),n||(n=l[l.length-1].match(p)),l.length>=c)break}return n?{regexMatch:n,outputLines:l}:void 0}function m(a,r,i,s){if(!s)return;const o=r.executedMarker,u=r.endMarker;if(!o||!u)return;const d=o.line,p=u.line,c=s.length,l=[];if(s.anchor==="bottom")for(let n=p-(s.offset||0);n>=d;n--){let g=n;const w=n;for(;g>=d&&a.getLine(g)?.isWrapped;)g--;n=g,l.unshift(S(a,g,w,i)),l.length>c&&l.pop()}else for(let n=d+(s.offset||0);n<p;n++){const g=n;let w=n;for(;w+1<p&&a.getLine(w+1)?.isWrapped;)w++;n=w,l.push(S(a,g,w,i)),l.length===c&&l.shift()}return l}e.getLinesForCommand=m;function S(a,r,i,s){const o=Math.max(2048/s*2);i=Math.min(i,r+o);let u="";for(let d=r;d<=i;d++){const p=a.getLine(d);p&&(u+=p.translateToString(!0,0,s))}return u}function h(a){if(!a.multiline)return 1;const r=a.source;let i=1,s=r.indexOf("\\n");for(;s!==-1;)i++,s=r.indexOf("\\n",s+1);return i}}),define(Q[3305],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CwdDetectionCapability=void 0;class b extends y.Disposable{constructor(){super(...arguments),this.type=0,this._cwd="",this._cwds=new Map,this._onDidChangeCwd=this._register(new t.Emitter),this.onDidChangeCwd=this._onDidChangeCwd.event}get cwds(){return Array.from(this._cwds.keys())}getCwd(){return this._cwd}updateCwd(T){const f=this._cwd!==T;this._cwd=T;const v=this._cwds.get(this._cwd)||0;this._cwds.delete(this._cwd),this._cwds.set(this._cwd,v+1),f&&this._onDidChangeCwd.fire(T)}}e.CwdDetectionCapability=b}),define(Q[3306],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NaiveCwdDetectionCapability=void 0;class y{constructor(D){this._process=D,this.type=1,this._cwd="",this._onDidChangeCwd=new t.Emitter,this.onDidChangeCwd=this._onDidChangeCwd.event}async getCwd(){if(!this._process)return Promise.resolve("");const D=await this._process.getCwd();return D!==this._cwd&&this._onDidChangeCwd.fire(D),this._cwd=D,this._cwd}}e.NaiveCwdDetectionCapability=y}),define(Q[3307],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartialCommandDetectionCapability=void 0;var y;(function(D){D[D.MinimumPromptLength=2]="MinimumPromptLength"})(y||(y={}));class b{get commands(){return this._commands}constructor(T){this._terminal=T,this.type=3,this._commands=[],this._onCommandFinished=new t.Emitter,this.onCommandFinished=this._onCommandFinished.event,this._terminal.onData(f=>this._onData(f)),this._terminal.parser.registerCsiHandler({final:"J"},f=>(f.length>=1&&(f[0]===2||f[0]===3)&&this._clearCommandsInViewport(),!1))}_onData(T){T==="\r"&&this._onEnter()}_onEnter(){if(this._terminal&&this._terminal.buffer.active.cursorX>=2){const T=this._terminal.registerMarker(0);T&&(this._commands.push(T),this._onCommandFinished.fire(T))}}_clearCommandsInViewport(){let T=0;for(let f=this._commands.length-1;f>=0&&!(this._commands[f].line<this._terminal.buffer.active.baseY);f--)T++;this._commands.splice(this._commands.length-T,T)}}e.PartialCommandDetectionCapability=b}),define(Q[514],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalCapabilityStoreMultiplexer=e.TerminalCapabilityStore=void 0;class b extends y.Disposable{constructor(){super(...arguments),this._map=new Map,this._onDidRemoveCapabilityType=this._register(new t.Emitter),this.onDidRemoveCapabilityType=this._onDidRemoveCapabilityType.event,this._onDidAddCapabilityType=this._register(new t.Emitter),this.onDidAddCapabilityType=this._onDidAddCapabilityType.event,this._onDidRemoveCapability=this._register(new t.Emitter),this.onDidRemoveCapability=this._onDidRemoveCapability.event,this._onDidAddCapability=this._register(new t.Emitter),this.onDidAddCapability=this._onDidAddCapability.event}get items(){return this._map.keys()}add(f,v){this._map.set(f,v),this._onDidAddCapabilityType.fire(f),this._onDidAddCapability.fire({id:f,capability:v})}get(f){return this._map.get(f)}remove(f){const v=this._map.get(f);v&&(this._map.delete(f),this._onDidRemoveCapabilityType.fire(f),this._onDidAddCapability.fire({id:f,capability:v}))}has(f){return this._map.has(f)}}e.TerminalCapabilityStore=b;class D extends y.Disposable{constructor(){super(...arguments),this._stores=[],this._onDidRemoveCapabilityType=this._register(new t.Emitter),this.onDidRemoveCapabilityType=this._onDidRemoveCapabilityType.event,this._onDidAddCapabilityType=this._register(new t.Emitter),this.onDidAddCapabilityType=this._onDidAddCapabilityType.event,this._onDidRemoveCapability=this._register(new t.Emitter),this.onDidRemoveCapability=this._onDidRemoveCapability.event,this._onDidAddCapability=this._register(new t.Emitter),this.onDidAddCapability=this._onDidAddCapability.event}get items(){return this._items()}*_items(){for(const f of this._stores)for(const v of f.items)yield v}has(f){for(const v of this._stores)for(const m of v.items)if(m===f)return!0;return!1}get(f){for(const v of this._stores){const m=v.get(f);if(m)return m}}add(f){this._stores.push(f);for(const v of f.items)this._onDidAddCapabilityType.fire(v),this._onDidAddCapability.fire({id:v,capability:f.get(v)});f.onDidAddCapabilityType(v=>this._onDidAddCapabilityType.fire(v)),f.onDidAddCapability(v=>this._onDidAddCapability.fire(v)),f.onDidRemoveCapabilityType(v=>this._onDidRemoveCapabilityType.fire(v)),f.onDidRemoveCapability(v=>this._onDidRemoveCapability.fire(v))}}e.TerminalCapabilityStoreMultiplexer=D}),define(Q[1197],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentVariableMutatorType=void 0;var t;(function(y){y[y.Replace=1]="Replace",y[y.Append=2]="Append",y[y.Prepend=3]="Prepend"})(t||(e.EnvironmentVariableMutatorType=t={}))}),define(Q[1198],Y([1,0,18,1197]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergedEnvironmentVariableCollection=void 0;const b=new Map([[y.EnvironmentVariableMutatorType.Append,"APPEND"],[y.EnvironmentVariableMutatorType.Prepend,"PREPEND"],[y.EnvironmentVariableMutatorType.Replace,"REPLACE"]]);class D{constructor(S){this.collections=S,this.map=new Map,this.descriptionMap=new Map,S.forEach((h,a)=>{this.populateDescriptionMap(h,a);const r=h.map.entries();let i=r.next();for(;!i.done;){const s=i.value[1],o=i.value[0];let u=this.map.get(o);if(u||(u=[],this.map.set(o,u)),u.length>0&&u[0].type===y.EnvironmentVariableMutatorType.Replace){i=r.next();continue}const d={extensionIdentifier:a,value:s.value,type:s.type,scope:s.scope,variable:s.variable,options:s.options};d.scope||delete d.scope,u.unshift(d),i=r.next()}})}async applyToProcessEnvironment(S,h,a){let r;t.isWindows&&(r={},Object.keys(S).forEach(i=>r[i.toLowerCase()]=i));for(const[i,s]of this.getVariableMap(h)){const o=t.isWindows&&r[i.toLowerCase()]||i;for(const u of s){const d=a?await a(u.value):u.value;if(u.options?.applyAtProcessCreation??!0)switch(u.type){case y.EnvironmentVariableMutatorType.Append:S[o]=(S[o]||"")+d;break;case y.EnvironmentVariableMutatorType.Prepend:S[o]=d+(S[o]||"");break;case y.EnvironmentVariableMutatorType.Replace:S[o]=d;break}if(u.options?.applyAtShellIntegration??!1){const p=`VSCODE_ENV_${b.get(u.type)}`;S[p]=(S[p]?S[p]+":":"")+i+"="+this._encodeColons(d)}}}}_encodeColons(S){return S.replaceAll(":","\\x3a")}diff(S,h){const a=new Map,r=new Map,i=new Map;if(S.getVariableMap(h).forEach((s,o)=>{const u=this.getVariableMap(h).get(o),d=f(s,u);d&&a.set(o,d)}),this.getVariableMap(h).forEach((s,o)=>{const u=S.getVariableMap(h).get(o),d=f(s,u);d&&i.set(o,d)}),this.getVariableMap(h).forEach((s,o)=>{const u=S.getVariableMap(h).get(o),d=v(s,u);d&&r.set(o,d)}),!(a.size===0&&r.size===0&&i.size===0))return{added:a,changed:r,removed:i}}getVariableMap(S){const h=new Map;for(const a of this.map.values()){const r=a.filter(i=>T(i,S));r.length>0&&h.set(r[0].variable,r)}return h}getDescriptionMap(S){const h=new Map;for(const a of this.descriptionMap.values()){const r=a.filter(i=>T(i,S,!0));for(const i of r)h.set(i.extensionIdentifier,i.description)}return h}populateDescriptionMap(S,h){if(!S.descriptionMap)return;const a=S.descriptionMap.entries();let r=a.next();for(;!r.done;){const i=r.value[1],s=r.value[0];let o=this.descriptionMap.get(s);o||(o=[],this.descriptionMap.set(s,o));const u={extensionIdentifier:h,scope:i.scope,description:i.description};u.scope||delete u.scope,o.push(u),r=a.next()}}}e.MergedEnvironmentVariableCollection=D;function T(m,S,h=!1){return m.scope?!!(m.scope.workspaceFolder&&S?.workspaceFolder&&m.scope.workspaceFolder.index===S.workspaceFolder.index):h?S===m.scope:!0}function f(m,S){if(!S)return m;const h=new Set;S.forEach(r=>h.add(r.extensionIdentifier));const a=[];return m.forEach(r=>{h.has(r.extensionIdentifier)||a.push(r)}),a.length===0?void 0:a}function v(m,S){if(!S)return;const h=new Map;S.forEach(r=>h.set(r.extensionIdentifier,r));const a=[];return m.forEach(r=>{const i=h.get(r.extensionIdentifier);i&&(r.type!==i.type||r.value!==i.value||r.scope?.workspaceFolder?.index!==i.scope?.workspaceFolder?.index)&&a.push(i)}),a.length===0?void 0:a}}),define(Q[594],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeEnvironmentVariableCollections=e.serializeEnvironmentVariableCollections=e.deserializeEnvironmentDescriptionMap=e.deserializeEnvironmentVariableCollection=e.serializeEnvironmentDescriptionMap=e.serializeEnvironmentVariableCollection=void 0;function t(v){return[...v.entries()]}e.serializeEnvironmentVariableCollection=t;function y(v){return v?[...v.entries()]:[]}e.serializeEnvironmentDescriptionMap=y;function b(v){return new Map(v)}e.deserializeEnvironmentVariableCollection=b;function D(v){return new Map(v??[])}e.deserializeEnvironmentDescriptionMap=D;function T(v){return Array.from(v.entries()).map(m=>[m[0],t(m[1].map),y(m[1].descriptionMap)])}e.serializeEnvironmentVariableCollections=T;function f(v){return new Map(v.map(m=>[m[0],{map:b(m[1]),descriptionMap:D(m[2])}]))}e.deserializeEnvironmentVariableCollections=f}),define(Q[126],Y([1,0,5,8,16]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITerminalLogService=e.ILocalPtyService=e.TerminalExtensions=e.TerminalExitReason=e.ShellIntegrationStatus=e.ProfileSource=e.FlowControlConstants=e.LocalReconnectConstants=e.TerminalLocationString=e.TerminalLocation=e.HeartbeatConstants=e.IPtyService=e.ProcessPropertyType=e.TerminalIpcChannels=e.TitleEventSource=e.WindowsShellType=e.PosixShellType=e.TerminalSettingId=e.TerminalSettingPrefix=e.terminalTabFocusModeContextKey=void 0,e.terminalTabFocusModeContextKey=new y.RawContextKey("terminalTabFocusMode",!1,!0);var D;(function(l){l.DefaultProfile="terminal.integrated.defaultProfile.",l.Profiles="terminal.integrated.profiles."})(D||(e.TerminalSettingPrefix=D={}));var T;(function(l){l.SendKeybindingsToShell="terminal.integrated.sendKeybindingsToShell",l.AutomationProfileLinux="terminal.integrated.automationProfile.linux",l.AutomationProfileMacOs="terminal.integrated.automationProfile.osx",l.AutomationProfileWindows="terminal.integrated.automationProfile.windows",l.ProfilesWindows="terminal.integrated.profiles.windows",l.ProfilesMacOs="terminal.integrated.profiles.osx",l.ProfilesLinux="terminal.integrated.profiles.linux",l.DefaultProfileLinux="terminal.integrated.defaultProfile.linux",l.DefaultProfileMacOs="terminal.integrated.defaultProfile.osx",l.DefaultProfileWindows="terminal.integrated.defaultProfile.windows",l.UseWslProfiles="terminal.integrated.useWslProfiles",l.TabsDefaultColor="terminal.integrated.tabs.defaultColor",l.TabsDefaultIcon="terminal.integrated.tabs.defaultIcon",l.TabsEnabled="terminal.integrated.tabs.enabled",l.TabsEnableAnimation="terminal.integrated.tabs.enableAnimation",l.TabsHideCondition="terminal.integrated.tabs.hideCondition",l.TabsShowActiveTerminal="terminal.integrated.tabs.showActiveTerminal",l.TabsShowActions="terminal.integrated.tabs.showActions",l.TabsLocation="terminal.integrated.tabs.location",l.TabsFocusMode="terminal.integrated.tabs.focusMode",l.MacOptionIsMeta="terminal.integrated.macOptionIsMeta",l.MacOptionClickForcesSelection="terminal.integrated.macOptionClickForcesSelection",l.AltClickMovesCursor="terminal.integrated.altClickMovesCursor",l.CopyOnSelection="terminal.integrated.copyOnSelection",l.EnableMultiLinePasteWarning="terminal.integrated.enableMultiLinePasteWarning",l.DrawBoldTextInBrightColors="terminal.integrated.drawBoldTextInBrightColors",l.FontFamily="terminal.integrated.fontFamily",l.FontSize="terminal.integrated.fontSize",l.LetterSpacing="terminal.integrated.letterSpacing",l.LineHeight="terminal.integrated.lineHeight",l.MinimumContrastRatio="terminal.integrated.minimumContrastRatio",l.TabStopWidth="terminal.integrated.tabStopWidth",l.FastScrollSensitivity="terminal.integrated.fastScrollSensitivity",l.MouseWheelScrollSensitivity="terminal.integrated.mouseWheelScrollSensitivity",l.BellDuration="terminal.integrated.bellDuration",l.FontWeight="terminal.integrated.fontWeight",l.FontWeightBold="terminal.integrated.fontWeightBold",l.CursorBlinking="terminal.integrated.cursorBlinking",l.CursorStyle="terminal.integrated.cursorStyle",l.CursorStyleInactive="terminal.integrated.cursorStyleInactive",l.CursorWidth="terminal.integrated.cursorWidth",l.Scrollback="terminal.integrated.scrollback",l.DetectLocale="terminal.integrated.detectLocale",l.DefaultLocation="terminal.integrated.defaultLocation",l.GpuAcceleration="terminal.integrated.gpuAcceleration",l.TerminalTitleSeparator="terminal.integrated.tabs.separator",l.TerminalTitle="terminal.integrated.tabs.title",l.TerminalDescription="terminal.integrated.tabs.description",l.RightClickBehavior="terminal.integrated.rightClickBehavior",l.Cwd="terminal.integrated.cwd",l.ConfirmOnExit="terminal.integrated.confirmOnExit",l.ConfirmOnKill="terminal.integrated.confirmOnKill",l.EnableBell="terminal.integrated.enableBell",l.CommandsToSkipShell="terminal.integrated.commandsToSkipShell",l.AllowChords="terminal.integrated.allowChords",l.AllowMnemonics="terminal.integrated.allowMnemonics",l.TabFocusMode="terminal.integrated.tabFocusMode",l.EnvMacOs="terminal.integrated.env.osx",l.EnvLinux="terminal.integrated.env.linux",l.EnvWindows="terminal.integrated.env.windows",l.EnvironmentChangesIndicator="terminal.integrated.environmentChangesIndicator",l.EnvironmentChangesRelaunch="terminal.integrated.environmentChangesRelaunch",l.ShowExitAlert="terminal.integrated.showExitAlert",l.SplitCwd="terminal.integrated.splitCwd",l.WindowsEnableConpty="terminal.integrated.windowsEnableConpty",l.WordSeparators="terminal.integrated.wordSeparators",l.EnableFileLinks="terminal.integrated.enableFileLinks",l.UnicodeVersion="terminal.integrated.unicodeVersion",l.LocalEchoLatencyThreshold="terminal.integrated.localEchoLatencyThreshold",l.LocalEchoEnabled="terminal.integrated.localEchoEnabled",l.LocalEchoExcludePrograms="terminal.integrated.localEchoExcludePrograms",l.LocalEchoStyle="terminal.integrated.localEchoStyle",l.EnablePersistentSessions="terminal.integrated.enablePersistentSessions",l.PersistentSessionReviveProcess="terminal.integrated.persistentSessionReviveProcess",l.HideOnStartup="terminal.integrated.hideOnStartup",l.CustomGlyphs="terminal.integrated.customGlyphs",l.PersistentSessionScrollback="terminal.integrated.persistentSessionScrollback",l.InheritEnv="terminal.integrated.inheritEnv",l.ShowLinkHover="terminal.integrated.showLinkHover",l.IgnoreProcessNames="terminal.integrated.ignoreProcessNames",l.AutoReplies="terminal.integrated.autoReplies",l.ShellIntegrationEnabled="terminal.integrated.shellIntegration.enabled",l.ShellIntegrationShowWelcome="terminal.integrated.shellIntegration.showWelcome",l.ShellIntegrationDecorationsEnabled="terminal.integrated.shellIntegration.decorationsEnabled",l.ShellIntegrationCommandHistory="terminal.integrated.shellIntegration.history",l.ShellIntegrationSuggestEnabled="terminal.integrated.shellIntegration.suggestEnabled",l.EnableImages="terminal.integrated.enableImages",l.SmoothScrolling="terminal.integrated.smoothScrolling",l.IgnoreBracketedPasteMode="terminal.integrated.ignoreBracketedPasteMode",l.FocusAfterRun="terminal.integrated.focusAfterRun",l.DeveloperPtyHostLatency="terminal.integrated.developer.ptyHost.latency",l.DeveloperPtyHostStartupDelay="terminal.integrated.developer.ptyHost.startupDelay",l.DevMode="terminal.integrated.developer.devMode"})(T||(e.TerminalSettingId=T={}));var f;(function(l){l.PowerShell="pwsh",l.Bash="bash",l.Fish="fish",l.Sh="sh",l.Csh="csh",l.Ksh="ksh",l.Zsh="zsh"})(f||(e.PosixShellType=f={}));var v;(function(l){l.CommandPrompt="cmd",l.PowerShell="pwsh",l.Wsl="wsl",l.GitBash="gitbash"})(v||(e.WindowsShellType=v={}));var m;(function(l){l[l.Api=0]="Api",l[l.Process=1]="Process",l[l.Sequence=2]="Sequence",l[l.Config=3]="Config"})(m||(e.TitleEventSource=m={}));var S;(function(l){l.LocalPty="localPty",l.PtyHost="ptyHost",l.PtyHostWindow="ptyHostWindow",l.Logger="logger",l.Heartbeat="heartbeat"})(S||(e.TerminalIpcChannels=S={}));var h;(function(l){l.Cwd="cwd",l.InitialCwd="initialCwd",l.FixedDimensions="fixedDimensions",l.Title="title",l.ShellType="shellType",l.HasChildProcesses="hasChildProcesses",l.ResolvedShellLaunchConfig="resolvedShellLaunchConfig",l.OverrideDimensions="overrideDimensions",l.FailedShellIntegrationActivation="failedShellIntegrationActivation",l.UsedShellIntegrationInjection="usedShellIntegrationInjection"})(h||(e.ProcessPropertyType=h={})),e.IPtyService=(0,t.createDecorator)("ptyService");var a;(function(l){l[l.BeatInterval=5e3]="BeatInterval",l[l.ConnectingBeatInterval=2e4]="ConnectingBeatInterval",l[l.FirstWaitMultiplier=1.2]="FirstWaitMultiplier",l[l.SecondWaitMultiplier=1]="SecondWaitMultiplier",l[l.CreateProcessTimeout=5e3]="CreateProcessTimeout"})(a||(e.HeartbeatConstants=a={}));var r;(function(l){l[l.Panel=1]="Panel",l[l.Editor=2]="Editor"})(r||(e.TerminalLocation=r={}));var i;(function(l){l.TerminalView="view",l.Editor="editor"})(i||(e.TerminalLocationString=i={}));var s;(function(l){l[l.GraceTime=6e4]="GraceTime",l[l.ShortGraceTime=6e3]="ShortGraceTime"})(s||(e.LocalReconnectConstants=s={}));var o;(function(l){l[l.HighWatermarkChars=1e5]="HighWatermarkChars",l[l.LowWatermarkChars=5e3]="LowWatermarkChars",l[l.CharCountAckSize=5e3]="CharCountAckSize"})(o||(e.FlowControlConstants=o={}));var u;(function(l){l.GitBash="Git Bash",l.Pwsh="PowerShell"})(u||(e.ProfileSource=u={}));var d;(function(l){l[l.Off=0]="Off",l[l.FinalTerm=1]="FinalTerm",l[l.VSCode=2]="VSCode"})(d||(e.ShellIntegrationStatus=d={}));var p;(function(l){l[l.Unknown=0]="Unknown",l[l.Shutdown=1]="Shutdown",l[l.Process=2]="Process",l[l.User=3]="User",l[l.Extension=4]="Extension"})(p||(e.TerminalExitReason=p={})),e.TerminalExtensions={Backend:"workbench.contributions.terminal.processBackend"};class c{constructor(){this._backends=new Map}get backends(){return this._backends}registerTerminalBackend(n){const g=this._sanitizeRemoteAuthority(n.remoteAuthority);if(this._backends.has(g))throw new Error(`A terminal backend with remote authority '${g}' was already registered.`);this._backends.set(g,n)}getTerminalBackend(n){return this._backends.get(this._sanitizeRemoteAuthority(n))}_sanitizeRemoteAuthority(n){return n?.toLowerCase()??""}}b.Registry.add(e.TerminalExtensions.Backend,new c),e.ILocalPtyService=(0,t.createDecorator)("localPtyService"),e.ITerminalLogService=(0,t.createDecorator)("terminalLogService")}),define(Q[3308],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalDataBufferer=void 0;class t{constructor(b){this._callback=b,this._terminalBufferMap=new Map}dispose(){for(const b of this._terminalBufferMap.values())b.dispose()}startBuffering(b,D,T=5){const f=D(v=>{const m=typeof v=="string"?v:v.data;let S=this._terminalBufferMap.get(b);if(S){S.data.push(m);return}const h=setTimeout(()=>this.flushBuffer(b),T);S={data:[m],timeoutId:h,dispose:()=>{clearTimeout(h),this.flushBuffer(b),f.dispose()}},this._terminalBufferMap.set(b,S)});return f}stopBuffering(b){this._terminalBufferMap.get(b)?.dispose()}flushBuffer(b){const D=this._terminalBufferMap.get(b);D&&(this._terminalBufferMap.delete(b),this._callback(b,D.data.join("")))}}e.TerminalDataBufferer=t}),define(Q[884],Y([1,0,18]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeCwd=e.collapseTildePath=e.escapeNonWindowsPath=void 0;function y(T){let f=T;f.includes("\\")&&(f=f.replace(/\\/g,"\\\\"));const v=/[\`\$\|\&\>\~\#\!\^\*\;\<\"\']/g;return f=f.replace(v,""),`'${f}'`}e.escapeNonWindowsPath=y;function b(T,f,v){if(!T)return"";if(!f)return T;f.match(/[\/\\]$/)&&(f=f.slice(0,f.length-1));const m=T.replace(/\\/g,"/").toLowerCase(),S=f.replace(/\\/g,"/").toLowerCase();return m.includes(S)?`~${v}${T.slice(f.length+1)}`:T}e.collapseTildePath=b;function D(T){return T.match(/^['"].*['"]$/)&&(T=T.substring(1,T.length-1)),t.OS===1&&T&&T[1]===":"?T[0].toUpperCase()+T.substring(1):T}e.sanitizeCwd=D}),define(Q[703],Y([1,0,32,10,2486,37]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isUriComponents=e.terminalIconsEqual=e.terminalProfileArgsMatch=e.createProfileSchemaEnums=void 0;function T(a,r){const i=[{name:null,description:(0,b.localize)(0,null)}];return i.push(...a.map(s=>({name:s.profileName,description:f(s)}))),r&&i.push(...r.map(s=>({name:s.title,description:v(s)}))),{values:i.map(s=>s.name),markdownDescriptions:i.map(s=>s.description)}}e.createProfileSchemaEnums=T;function f(a){let r=`$(${D.ThemeIcon.isThemeIcon(a.icon)?a.icon.id:a.icon?a.icon:t.Codicon.terminal.id}) ${a.profileName} - path: ${a.path}`;return a.args&&(typeof a.args=="string"?r+=` - args: "${a.args}"`:r+=` - args: [${a.args.length===0?"":`'${a.args.join("','")}'`}]`),a.overrideName!==void 0&&(r+=` - overrideName: ${a.overrideName}`),a.color&&(r+=` - color: ${a.color}`),a.env&&(r+=` - env: ${JSON.stringify(a.env)}`),r}function v(a){return`$(${D.ThemeIcon.isThemeIcon(a.icon)?a.icon.id:a.icon?a.icon:t.Codicon.terminal.id}) ${a.title} - extensionIdentifier: ${a.extensionIdentifier}`}function m(a,r){if(!a&&!r)return!0;if(typeof a=="string"&&typeof r=="string")return a===r;if(Array.isArray(a)&&Array.isArray(r)){if(a.length!==r.length)return!1;for(let i=0;i<a.length;i++)if(a[i]!==r[i])return!1;return!0}return!1}e.terminalProfileArgsMatch=m;function S(a,r){if(!a&&!r)return!0;if(!a||!r)return!1;if(D.ThemeIcon.isThemeIcon(a)&&D.ThemeIcon.isThemeIcon(r))return a.id===r.id&&a.color===r.color;if(typeof a=="object"&&"light"in a&&"dark"in a&&typeof r=="object"&&"light"in r&&"dark"in r){const i=a,s=r;if((y.URI.isUri(i.light)||h(i.light))&&(y.URI.isUri(i.dark)||h(i.dark))&&(y.URI.isUri(s.light)||h(s.light))&&(y.URI.isUri(s.dark)||h(s.dark)))return i.light.path===s.light.path&&i.dark.path===s.dark.path}if(y.URI.isUri(a)&&y.URI.isUri(r)||h(a)||h(r)){const i=a,s=r;return i.path===s.path&&i.scheme===s.scheme}return!1}e.terminalIconsEqual=S;function h(a){return a?typeof a.path=="string"&&typeof a.scheme=="string":!1}e.isUriComponents=h}),define(Q[885],Y([1,0,32,18,2485,56,16,703,228]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerTerminalDefaultProfileConfiguration=e.registerTerminalPlatformConfiguration=e.terminalIconSchema=e.terminalColorSchema=void 0,e.terminalColorSchema={type:["string","null"],enum:["terminal.ansiBlack","terminal.ansiRed","terminal.ansiGreen","terminal.ansiYellow","terminal.ansiBlue","terminal.ansiMagenta","terminal.ansiCyan","terminal.ansiWhite"],default:null},e.terminalIconSchema={type:"string",enum:Array.from((0,t.getAllCodicons)(),u=>u.id),markdownEnumDescriptions:Array.from((0,t.getAllCodicons)(),u=>`$(${u.id})`)};const m={args:{description:(0,b.localize)(0,null),type:"array",items:{type:"string"}},overrideName:{description:(0,b.localize)(1,null),type:"boolean"},icon:{description:(0,b.localize)(2,null),...e.terminalIconSchema},color:{description:(0,b.localize)(3,null),...e.terminalColorSchema},env:{markdownDescription:(0,b.localize)(4,null),type:"object",additionalProperties:{type:["string","null"]},default:{}}},S={type:"object",required:["path"],properties:{path:{description:(0,b.localize)(5,null),type:["string","array"],items:{type:"string"}},...m}},h={type:"object",required:["path"],properties:{path:{description:(0,b.localize)(6,null),type:["string"],items:{type:"string"}},...m}};function a(u){const d=u===2?"linux":u===1?"osx":"windows";return(0,b.localize)(7,null,(0,y.PlatformToString)(u),'```json\n"terminal.integrated.profile.'+d+'": {\n "bash": null\n}\n```',"[","](https://code.visualstudio.com/docs/terminal/profiles)")}const r={id:"terminal",order:100,title:(0,b.localize)(8,null),type:"object",properties:{["terminal.integrated.automationProfile.linux"]:{restricted:!0,markdownDescription:(0,b.localize)(9,null),type:["object","null"],default:null,anyOf:[{type:"null"},h],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.automationProfile.osx"]:{restricted:!0,markdownDescription:(0,b.localize)(10,null),type:["object","null"],default:null,anyOf:[{type:"null"},h],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.automationProfile.windows"]:{restricted:!0,markdownDescription:(0,b.localize)(11,null,"`terminal.integrated.automationShell.windows`"),type:["object","null"],default:null,anyOf:[{type:"null"},h],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.profiles.windows"]:{restricted:!0,markdownDescription:a(3),type:"object",default:{PowerShell:{source:"PowerShell",icon:"terminal-powershell"},"Command Prompt":{path:["${env:windir}\\Sysnative\\cmd.exe","${env:windir}\\System32\\cmd.exe"],args:[],icon:"terminal-cmd"},"Git Bash":{source:"Git Bash"}},additionalProperties:{anyOf:[{type:"object",required:["source"],properties:{source:{description:(0,b.localize)(12,null),enum:["PowerShell","Git Bash"]},...m}},{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:(0,b.localize)(13,null),type:"string"},id:{description:(0,b.localize)(14,null),type:"string"},title:{description:(0,b.localize)(15,null),type:"string"},...m}},{type:"null"},S]}},["terminal.integrated.profiles.osx"]:{restricted:!0,markdownDescription:a(1),type:"object",default:{bash:{path:"bash",args:["-l"],icon:"terminal-bash"},zsh:{path:"zsh",args:["-l"]},fish:{path:"fish",args:["-l"]},tmux:{path:"tmux",icon:"terminal-tmux"},pwsh:{path:"pwsh",icon:"terminal-powershell"}},additionalProperties:{anyOf:[{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:(0,b.localize)(16,null),type:"string"},id:{description:(0,b.localize)(17,null),type:"string"},title:{description:(0,b.localize)(18,null),type:"string"},...m}},{type:"null"},S]}},["terminal.integrated.profiles.linux"]:{restricted:!0,markdownDescription:a(2),type:"object",default:{bash:{path:"bash",icon:"terminal-bash"},zsh:{path:"zsh"},fish:{path:"fish"},tmux:{path:"tmux",icon:"terminal-tmux"},pwsh:{path:"pwsh",icon:"terminal-powershell"}},additionalProperties:{anyOf:[{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:(0,b.localize)(19,null),type:"string"},id:{description:(0,b.localize)(20,null),type:"string"},title:{description:(0,b.localize)(21,null),type:"string"},...m}},{type:"null"},S]}},["terminal.integrated.useWslProfiles"]:{description:(0,b.localize)(22,null),type:"boolean",default:!0},["terminal.integrated.inheritEnv"]:{scope:1,description:v.terminalIntegratedInheritEnvDescription,type:"boolean",default:!0},["terminal.integrated.persistentSessionScrollback"]:{scope:1,markdownDescription:(0,b.localize)(23,null),type:"number",default:100},["terminal.integrated.showLinkHover"]:{scope:1,description:(0,b.localize)(24,null),type:"boolean",default:!0},["terminal.integrated.ignoreProcessNames"]:{description:(0,b.localize)(25,null,"`terminal.integrated.confirmOnKill`"),type:"array",items:{type:"string",uniqueItems:!0},default:["starship","oh-my-posh","bash","zsh"]}}};function i(){T.Registry.as(D.Extensions.Configuration).registerConfiguration(r),o()}e.registerTerminalPlatformConfiguration=i;let s;function o(u,d){const p=T.Registry.as(D.Extensions.Configuration);let c;u&&(c=(0,f.createProfileSchemaEnums)(u?.profiles,d));const l=s;s={id:"terminal",order:100,title:(0,b.localize)(26,null),type:"object",properties:{["terminal.integrated.defaultProfile.linux"]:{restricted:!0,markdownDescription:(0,b.localize)(27,null),type:["string","null"],default:null,enum:u?.os===3?c?.values:void 0,markdownEnumDescriptions:u?.os===3?c?.markdownDescriptions:void 0},["terminal.integrated.defaultProfile.osx"]:{restricted:!0,markdownDescription:(0,b.localize)(28,null),type:["string","null"],default:null,enum:u?.os===2?c?.values:void 0,markdownEnumDescriptions:u?.os===2?c?.markdownDescriptions:void 0},["terminal.integrated.defaultProfile.windows"]:{restricted:!0,markdownDescription:(0,b.localize)(29,null),type:["string","null"],default:null,enum:u?.os===1?c?.values:void 0,markdownEnumDescriptions:u?.os===1?c?.markdownDescriptions:void 0}}},p.updateConfigurations({add:[s],remove:l?[l]:[]})}e.registerTerminalDefaultProfileConfiguration=o}),define(Q[3309],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalRecorder=void 0;var t;(function(b){b[b.MaxRecorderDataSize=1048576]="MaxRecorderDataSize"})(t||(t={}));class y{constructor(D,T){this._totalDataLength=0,this._entries=[{cols:D,rows:T,data:[]}]}handleResize(D,T){if(this._entries.length>0&&this._entries[this._entries.length-1].data.length===0&&this._entries.pop(),this._entries.length>0){const f=this._entries[this._entries.length-1];if(f.cols===D&&f.rows===T)return;if(f.cols===0&&f.rows===0){f.cols=D,f.rows=T;return}}this._entries.push({cols:D,rows:T,data:[]})}handleData(D){for(this._entries[this._entries.length-1].data.push(D),this._totalDataLength+=D.length;this._totalDataLength>1048576;){const f=this._entries[0],v=this._totalDataLength-1048576;v>=f.data[0].length?(this._totalDataLength-=f.data[0].length,f.data.shift(),f.data.length===0&&this._entries.shift()):(f.data[0]=f.data[0].substr(v),this._totalDataLength-=v)}}generateReplayEventSync(){return this._entries.forEach(D=>{D.data.length>0&&(D.data=[D.data.join("")])}),{events:this._entries.map(D=>({cols:D.cols,rows:D.rows,data:D.data[0]??""})),commands:{isWindowsPty:!1,commands:[]}}}async generateReplayEvent(){return this.generateReplayEventSync()}}e.TerminalRecorder=y}),define(Q[704],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatMessageForTerminal=void 0;function t(y,b={}){let D="";return b.excludeLeadingNewLine||(D+=`\r `),D+="\x1B[0m\x1B[7m * ",b.loudFormatting?D+="\x1B[0;104m":D+="\x1B[0m",D+=` ${y} \x1B[0m \r`,D}e.formatMessageForTerminal=t}),define(Q[3310],Y([1,0,4,514,1196,3305,3307,6,3304,10,884]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseMarkSequence=e.parseKeyValueAssignment=e.deserializeMessage=e.ShellIntegrationAddon=void 0;var h;(function(d){d[d.FinalTerm=133]="FinalTerm",d[d.VSCode=633]="VSCode",d[d.ITerm=1337]="ITerm",d[d.SetCwd=7]="SetCwd",d[d.SetWindowsFriendlyCwd=9]="SetWindowsFriendlyCwd"})(h||(h={}));var a;(function(d){d.PromptStart="A",d.CommandStart="B",d.CommandExecuted="C",d.CommandFinished="D",d.CommandLine="E",d.ContinuationStart="F",d.ContinuationEnd="G",d.RightPromptStart="H",d.RightPromptEnd="I",d.Property="P",d.SetMark="SetMark"})(a||(a={}));var r;(function(d){d.SetMark="SetMark",d.CurrentDir="CurrentDir"})(r||(r={}));class i extends t.Disposable{get status(){return this._status}constructor(p,c,l,n){super(),this._nonce=p,this._disableTelemetry=c,this._telemetryService=l,this._logService=n,this.capabilities=new y.TerminalCapabilityStore,this._hasUpdatedTelemetry=!1,this._commonProtocolDisposables=[],this._status=0,this._onDidChangeStatus=new f.Emitter,this.onDidChangeStatus=this._onDidChangeStatus.event,this._register((0,t.toDisposable)(()=>{this._clearActivationTimeout(),this._disposeCommonProtocol()}))}_disposeCommonProtocol(){(0,t.dispose)(this._commonProtocolDisposables),this._commonProtocolDisposables.length=0}activate(p){this._terminal=p,this.capabilities.add(3,new T.PartialCommandDetectionCapability(this._terminal)),this._register(p.parser.registerOscHandler(633,c=>this._handleVSCodeSequence(c))),this._register(p.parser.registerOscHandler(1337,c=>this._doHandleITermSequence(c))),this._commonProtocolDisposables.push(p.parser.registerOscHandler(133,c=>this._handleFinalTermSequence(c))),this._register(p.parser.registerOscHandler(7,c=>this._doHandleSetCwd(c))),this._register(p.parser.registerOscHandler(9,c=>this._doHandleSetWindowsFriendlyCwd(c))),this._ensureCapabilitiesOrAddFailureTelemetry()}getMarkerId(p,c){this._createOrGetBufferMarkDetection(p).getMark(c)}_handleFinalTermSequence(p){const c=this._doHandleFinalTermSequence(p);return this._status===0&&(this._status=1,this._onDidChangeStatus.fire(this._status)),c}_doHandleFinalTermSequence(p){if(!this._terminal)return!1;const[c,...l]=p.split(";");switch(c){case"A":return this._createOrGetCommandDetection(this._terminal).handlePromptStart(),!0;case"B":return this._createOrGetCommandDetection(this._terminal).handleCommandStart({ignoreCommandLine:!0}),!0;case"C":return this._createOrGetCommandDetection(this._terminal).handleCommandExecuted(),!0;case"D":{const n=l.length===1?parseInt(l[0]):void 0;return this._createOrGetCommandDetection(this._terminal).handleCommandFinished(n),!0}}return!1}_handleVSCodeSequence(p){const c=this._doHandleVSCodeSequence(p);return!this._hasUpdatedTelemetry&&c&&(this._telemetryService?.publicLog2("terminal/shellIntegrationActivationSucceeded"),this._hasUpdatedTelemetry=!0,this._clearActivationTimeout()),this._status!==2&&(this._status=2,this._onDidChangeStatus.fire(this._status)),c}async _ensureCapabilitiesOrAddFailureTelemetry(){!this._telemetryService||this._disableTelemetry||(this._activationTimeout=setTimeout(()=>{!this.capabilities.get(2)&&!this.capabilities.get(0)&&(this._telemetryService?.publicLog2("terminal/shellIntegrationActivationTimeout"),this._logService.warn("Shell integration failed to add capabilities within 10 seconds")),this._hasUpdatedTelemetry=!0},1e4))}_clearActivationTimeout(){this._activationTimeout!==void 0&&(clearTimeout(this._activationTimeout),this._activationTimeout=void 0)}_doHandleVSCodeSequence(p){if(!this._terminal)return!1;const c=p.indexOf(";"),l=c===-1?p:p.substring(0,c),n=c===-1?[]:p.substring(c+1).split(";");switch(l){case"A":return this._createOrGetCommandDetection(this._terminal).handlePromptStart(),!0;case"B":return this._createOrGetCommandDetection(this._terminal).handleCommandStart(),!0;case"C":return this._createOrGetCommandDetection(this._terminal).handleCommandExecuted(),!0;case"D":{const g=n[0],w=g!==void 0?parseInt(g):void 0;return this._createOrGetCommandDetection(this._terminal).handleCommandFinished(w),!0}case"E":{const g=n[0],w=n[1];let E;return g!==void 0?E=s(g):E="",this._createOrGetCommandDetection(this._terminal).setCommandLine(E,w===this._nonce),!0}case"F":return this._createOrGetCommandDetection(this._terminal).handleContinuationStart(),!0;case"G":return this._createOrGetCommandDetection(this._terminal).handleContinuationEnd(),!0;case"H":return this._createOrGetCommandDetection(this._terminal).handleRightPromptStart(),!0;case"I":return this._createOrGetCommandDetection(this._terminal).handleRightPromptEnd(),!0;case"P":{const g=n[0],w=g!==void 0?s(g):"",{key:E,value:C}=o(w);if(C===void 0)return!0;switch(E){case"Cwd":return this._updateCwd(C),!0;case"IsWindows":return this._createOrGetCommandDetection(this._terminal).setIsWindowsPty(C==="True"),!0;case"Task":return this._createOrGetBufferMarkDetection(this._terminal),this.capabilities.get(2)?.setIsCommandStorageDisabled(),!0}}case"SetMark":return this._createOrGetBufferMarkDetection(this._terminal).addMark(u(n)),!0}return!1}_updateCwd(p){p=(0,S.sanitizeCwd)(p),this._createOrGetCwdDetection().updateCwd(p),this.capabilities.get(2)?.setCwd(p)}_doHandleITermSequence(p){if(!this._terminal)return!1;const[c]=p.split(";");switch(c){case"SetMark":this._createOrGetBufferMarkDetection(this._terminal).addMark();default:{const{key:l,value:n}=o(c);if(n===void 0)return!0;switch(l){case"CurrentDir":return this._updateCwd(n),!0}}}return!1}_doHandleSetWindowsFriendlyCwd(p){if(!this._terminal)return!1;const[c,...l]=p.split(";");switch(c){case"9":return l.length&&this._updateCwd(l[0]),!0}return!1}_doHandleSetCwd(p){if(!this._terminal)return!1;const[c]=p.split(";");if(c.match(/^file:\/\/.*\//)){const l=m.URI.parse(c);if(l.path&&l.path.length>0)return this._updateCwd(l.path),!0}return!1}serialize(){return!this._terminal||!this.capabilities.has(2)?{isWindowsPty:!1,commands:[]}:this._createOrGetCommandDetection(this._terminal).serialize()}deserialize(p){if(!this._terminal)throw new Error("Cannot restore commands before addon is activated");this._createOrGetCommandDetection(this._terminal).deserialize(p)}_createOrGetCwdDetection(){let p=this.capabilities.get(0);return p||(p=this._register(new D.CwdDetectionCapability),this.capabilities.add(0,p)),p}_createOrGetCommandDetection(p){let c=this.capabilities.get(2);return c||(c=this._register(new b.CommandDetectionCapability(p,this._logService)),this.capabilities.add(2,c)),c}_createOrGetBufferMarkDetection(p){let c=this.capabilities.get(4);return c||(c=this._register(new v.BufferMarkCapability(p)),this.capabilities.add(4,c)),c}}e.ShellIntegrationAddon=i;function s(d){return d.replaceAll(/\\(\\|x([0-9a-f]{2}))/gi,(p,c,l)=>l?String.fromCharCode(parseInt(l,16)):c)}e.deserializeMessage=s;function o(d){const p=d.indexOf("=");return p===-1?{key:d,value:void 0}:{key:d.substring(0,p),value:d.substring(1+p)}}e.parseKeyValueAssignment=o;function u(d){let p,c=!1;for(const l of d)l!==void 0&&(l==="Hidden"&&(c=!0),l.startsWith("Id=")&&(p=l.substring(3)));return{id:p,hidden:c}}e.parseMarkSequence=u}),define(Q[36],Y([1,0,14,80,6,214,2487,219,16]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.workbenchColorsSchemaId=e.resolveColorValue=e.ifDefinedThenElse=e.oneOf=e.opaque=e.transparent=e.lighten=e.darken=e.executeTransform=e.chartsPurple=e.chartsGreen=e.chartsOrange=e.chartsYellow=e.chartsBlue=e.chartsRed=e.chartsLines=e.chartsForeground=e.problemsInfoIconForeground=e.problemsWarningIconForeground=e.problemsErrorIconForeground=e.minimapSliderActiveBackground=e.minimapSliderHoverBackground=e.minimapSliderBackground=e.minimapForegroundOpacity=e.minimapBackground=e.minimapWarning=e.minimapError=e.minimapSelection=e.minimapSelectionOccurrenceHighlight=e.minimapFindMatch=e.overviewRulerSelectionHighlightForeground=e.overviewRulerFindMatchForeground=e.overviewRulerCommonContentForeground=e.overviewRulerIncomingContentForeground=e.overviewRulerCurrentContentForeground=e.mergeBorder=e.mergeCommonContentBackground=e.mergeCommonHeaderBackground=e.mergeIncomingContentBackground=e.mergeIncomingHeaderBackground=e.mergeCurrentContentBackground=e.mergeCurrentHeaderBackground=e.breadcrumbsPickerBackground=e.breadcrumbsActiveSelectionForeground=e.breadcrumbsFocusForeground=e.breadcrumbsBackground=e.breadcrumbsForeground=e.snippetFinalTabstopHighlightBorder=e.snippetFinalTabstopHighlightBackground=e.snippetTabstopHighlightBorder=e.snippetTabstopHighlightBackground=e.toolbarActiveBackground=e.toolbarHoverOutline=e.toolbarHoverBackground=e.menuSeparatorBackground=e.menuSelectionBorder=e.menuSelectionBackground=e.menuSelectionForeground=e.menuBackground=e.menuForeground=e.menuBorder=e.quickInputListFocusBackground=e.quickInputListFocusIconForeground=e.quickInputListFocusForeground=e._deprecatedQuickInputListFocusBackground=e.checkboxSelectBorder=e.checkboxBorder=e.checkboxForeground=e.checkboxSelectBackground=e.checkboxBackground=e.listDeemphasizedForeground=e.tableOddRowsBackgroundColor=e.tableColumnsBorder=e.treeInactiveIndentGuidesStroke=e.treeIndentGuidesStroke=e.listFilterMatchHighlightBorder=e.listFilterMatchHighlight=e.listFilterWidgetShadow=e.listFilterWidgetNoMatchesOutline=e.listFilterWidgetOutline=e.listFilterWidgetBackground=e.listWarningForeground=e.listErrorForeground=e.listInvalidItemForeground=e.listFocusHighlightForeground=e.listHighlightForeground=e.listDropBackground=e.listHoverForeground=e.listHoverBackground=e.listInactiveFocusOutline=e.listInactiveFocusBackground=e.listInactiveSelectionIconForeground=e.listInactiveSelectionForeground=e.listInactiveSelectionBackground=e.listActiveSelectionIconForeground=e.listActiveSelectionForeground=e.listActiveSelectionBackground=e.listFocusAndSelectionOutline=e.listFocusOutline=e.listFocusForeground=e.listFocusBackground=e.diffUnchangedTextBackground=e.diffUnchangedRegionForeground=e.diffUnchangedRegionBackground=e.diffDiagonalFill=e.diffBorder=e.diffRemovedOutline=e.diffInsertedOutline=e.diffOverviewRulerRemoved=e.diffOverviewRulerInserted=e.diffRemovedLineGutter=e.diffInsertedLineGutter=e.diffRemovedLine=e.diffInsertedLine=e.diffRemoved=e.diffInserted=e.defaultRemoveColor=e.defaultInsertColor=e.editorLightBulbAutoFixForeground=e.editorLightBulbForeground=e.editorInlayHintParameterBackground=e.editorInlayHintParameterForeground=e.editorInlayHintTypeBackground=e.editorInlayHintTypeForeground=e.editorInlayHintBackground=e.editorInlayHintForeground=e.editorActiveLinkForeground=e.editorHoverStatusBarBackground=e.editorHoverBorder=e.editorHoverForeground=e.editorHoverBackground=e.editorHoverHighlight=e.searchResultsInfoForeground=e.searchEditorFindMatchBorder=e.searchEditorFindMatch=e.editorFindRangeHighlightBorder=e.editorFindMatchHighlightBorder=e.editorFindMatchBorder=e.editorFindRangeHighlight=e.editorFindMatchHighlight=e.editorFindMatch=e.editorSelectionHighlightBorder=e.editorSelectionHighlight=e.editorInactiveSelection=e.editorSelectionForeground=e.editorSelectionBackground=e.keybindingLabelBottomBorder=e.keybindingLabelBorder=e.keybindingLabelForeground=e.keybindingLabelBackground=e.pickerGroupBorder=e.pickerGroupForeground=e.quickInputTitleBackground=e.quickInputForeground=e.quickInputBackground=e.editorWidgetResizeBorder=e.editorWidgetBorder=e.editorWidgetForeground=e.editorWidgetBackground=e.editorStickyScrollHoverBackground=e.editorStickyScrollBackground=e.editorForeground=e.editorBackground=e.sashHoverBorder=e.editorHintBorder=e.editorHintForeground=e.editorInfoBorder=e.editorInfoForeground=e.editorInfoBackground=e.editorWarningBorder=e.editorWarningForeground=e.editorWarningBackground=e.editorErrorBorder=e.editorErrorForeground=e.editorErrorBackground=e.progressBarBackground=e.scrollbarSliderActiveBackground=e.scrollbarSliderHoverBackground=e.scrollbarSliderBackground=e.scrollbarShadow=e.badgeForeground=e.badgeBackground=e.buttonDisabledBackground=e.buttonDisabledForeground=e.buttonDisabledBorder=e.buttonSecondaryBorder=e.buttonSecondaryHoverBackground=e.buttonSecondaryBackground=e.buttonSecondaryForeground=e.buttonBorder=e.buttonHoverBackground=e.buttonBackground=e.buttonSeparator=e.buttonForeground=e.selectBorder=e.selectForeground=e.selectListBackground=e.selectBackground=e.inputValidationErrorBorder=e.inputValidationErrorForeground=e.inputValidationErrorBackground=e.inputValidationWarningBorder=e.inputValidationWarningForeground=e.inputValidationWarningBackground=e.inputValidationInfoBorder=e.inputValidationInfoForeground=e.inputValidationInfoBackground=e.inputPlaceholderForeground=e.inputActiveOptionForeground=e.inputActiveOptionBackground=e.inputActiveOptionHoverBackground=e.inputActiveOptionBorder=e.inputBorder=e.inputForeground=e.inputBackground=e.widgetBorder=e.widgetShadow=e.textCodeBlockBackground=e.textBlockQuoteBorder=e.textBlockQuoteBackground=e.textPreformatForeground=e.textLinkActiveForeground=e.textLinkForeground=e.textSeparatorForeground=e.selectionBackground=e.activeContrastBorder=e.contrastBorder=e.focusBorder=e.iconForeground=e.descriptionForeground=e.errorForeground=e.disabledForeground=e.foreground=e.getColorRegistry=e.registerColor=e.Extensions=e.ColorTransformType=e.asCssVariableWithDefault=e.asCssVariable=e.asCssVariableName=void 0;function m(N){return`--vscode-${N.replace(/\./g,"-")}`}e.asCssVariableName=m;function S(N){return`var(${m(N)})`}e.asCssVariable=S;function h(N,P){return`var(${m(N)}, ${P})`}e.asCssVariableWithDefault=h;var a;(function(N){N[N.Darken=0]="Darken",N[N.Lighten=1]="Lighten",N[N.Transparent=2]="Transparent",N[N.Opaque=3]="Opaque",N[N.OneOf=4]="OneOf",N[N.LessProminent=5]="LessProminent",N[N.IfDefinedThenElse=6]="IfDefinedThenElse"})(a||(e.ColorTransformType=a={})),e.Extensions={ColorContribution:"base.contributions.colors"};class r{constructor(){this._onDidChangeSchema=new b.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(P,x,F,V=!1,W){const z={id:P,description:F,defaults:x,needsTransparency:V,deprecationMessage:W};this.colorsById[P]=z;const B={type:"string",description:F,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return W&&(B.deprecationMessage=W),this.colorSchema.properties[P]=B,this.colorReferenceSchema.enum.push(P),this.colorReferenceSchema.enumDescriptions.push(F),this._onDidChangeSchema.fire(),P}deregisterColor(P){delete this.colorsById[P],delete this.colorSchema.properties[P];const x=this.colorReferenceSchema.enum.indexOf(P);x!==-1&&(this.colorReferenceSchema.enum.splice(x,1),this.colorReferenceSchema.enumDescriptions.splice(x,1)),this._onDidChangeSchema.fire()}getColors(){return Object.keys(this.colorsById).map(P=>this.colorsById[P])}resolveDefaultColor(P,x){const F=this.colorsById[P];if(F&&F.defaults){const V=F.defaults[x.type];return L(V,x)}}getColorSchema(){return this.colorSchema}getColorReferenceSchema(){return this.colorReferenceSchema}toString(){const P=(x,F)=>{const V=x.indexOf(".")===-1?0:1,W=F.indexOf(".")===-1?0:1;return V!==W?V-W:x.localeCompare(F)};return Object.keys(this.colorsById).sort(P).map(x=>`- \`${x}\`: ${this.colorsById[x].description}`).join(` `)}}const i=new r;v.Registry.add(e.Extensions.ColorContribution,i);function s(N,P,x,F,V){return i.registerColor(N,P,x,F,V)}e.registerColor=s;function o(){return i}e.getColorRegistry=o,e.foreground=s("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},T.localize(0,null)),e.disabledForeground=s("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},T.localize(1,null)),e.errorForeground=s("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},T.localize(2,null)),e.descriptionForeground=s("descriptionForeground",{light:"#717171",dark:C(e.foreground,.7),hcDark:C(e.foreground,.7),hcLight:C(e.foreground,.7)},T.localize(3,null)),e.iconForeground=s("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},T.localize(4,null)),e.focusBorder=s("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},T.localize(5,null)),e.contrastBorder=s("contrastBorder",{light:null,dark:null,hcLight:"#6FC3DF",hcDark:"#6FC3DF"},T.localize(6,null)),e.activeContrastBorder=s("contrastActiveBorder",{light:null,dark:null,hcDark:e.focusBorder,hcLight:e.focusBorder},T.localize(7,null)),e.selectionBackground=s("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},T.localize(8,null)),e.textSeparatorForeground=s("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:y.Color.black,hcLight:"#292929"},T.localize(9,null)),e.textLinkForeground=s("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},T.localize(10,null)),e.textLinkActiveForeground=s("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},T.localize(11,null)),e.textPreformatForeground=s("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},T.localize(12,null)),e.textBlockQuoteBackground=s("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},T.localize(13,null)),e.textBlockQuoteBorder=s("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:y.Color.white,hcLight:"#292929"},T.localize(14,null)),e.textCodeBlockBackground=s("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:y.Color.black,hcLight:"#F2F2F2"},T.localize(15,null)),e.widgetShadow=s("widget.shadow",{dark:C(y.Color.black,.36),light:C(y.Color.black,.16),hcDark:null,hcLight:null},T.localize(16,null)),e.widgetBorder=s("widget.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},T.localize(17,null)),e.inputBackground=s("input.background",{dark:"#3C3C3C",light:y.Color.white,hcDark:y.Color.black,hcLight:y.Color.white},T.localize(18,null)),e.inputForeground=s("input.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},T.localize(19,null)),e.inputBorder=s("input.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},T.localize(20,null)),e.inputActiveOptionBorder=s("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:e.contrastBorder,hcLight:e.contrastBorder},T.localize(21,null)),e.inputActiveOptionHoverBackground=s("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},T.localize(22,null)),e.inputActiveOptionBackground=s("inputOption.activeBackground",{dark:C(e.focusBorder,.4),light:C(e.focusBorder,.2),hcDark:y.Color.transparent,hcLight:y.Color.transparent},T.localize(23,null)),e.inputActiveOptionForeground=s("inputOption.activeForeground",{dark:y.Color.white,light:y.Color.black,hcDark:e.foreground,hcLight:e.foreground},T.localize(24,null)),e.inputPlaceholderForeground=s("input.placeholderForeground",{light:C(e.foreground,.5),dark:C(e.foreground,.5),hcDark:C(e.foreground,.7),hcLight:C(e.foreground,.7)},T.localize(25,null)),e.inputValidationInfoBackground=s("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:y.Color.black,hcLight:y.Color.white},T.localize(26,null)),e.inputValidationInfoForeground=s("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},T.localize(27,null)),e.inputValidationInfoBorder=s("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:e.contrastBorder,hcLight:e.contrastBorder},T.localize(28,null)),e.inputValidationWarningBackground=s("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:y.Color.black,hcLight:y.Color.white},T.localize(29,null)),e.inputValidationWarningForeground=s("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},T.localize(30,null)),e.inputValidationWarningBorder=s("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:e.contrastBorder,hcLight:e.contrastBorder},T.localize(31,null)),e.inputValidationErrorBackground=s("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:y.Color.black,hcLight:y.Color.white},T.localize(32,null)),e.inputValidationErrorForeground=s("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},T.localize(33,null)),e.inputValidationErrorBorder=s("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},T.localize(34,null)),e.selectBackground=s("dropdown.background",{dark:"#3C3C3C",light:y.Color.white,hcDark:y.Color.black,hcLight:y.Color.white},T.localize(35,null)),e.selectListBackground=s("dropdown.listBackground",{dark:null,light:null,hcDark:y.Color.black,hcLight:y.Color.white},T.localize(36,null)),e.selectForeground=s("dropdown.foreground",{dark:"#F0F0F0",light:e.foreground,hcDark:y.Color.white,hcLight:e.foreground},T.localize(37,null)),e.selectBorder=s("dropdown.border",{dark:e.selectBackground,light:"#CECECE",hcDark:e.contrastBorder,hcLight:e.contrastBorder},T.localize(38,null)),e.buttonForeground=s("button.foreground",{dark:y.Color.white,light:y.Color.white,hcLight:y.Color.black,hcDark:y.Color.white},T.localize(39,null)),e.buttonSeparator=s("button.separator",{dark:C(e.buttonForeground,.4),light:C(e.buttonForeground,.4),hcDark:C(e.buttonForeground,.4),hcLight:C(e.buttonForeground,.4)},T.localize(40,null)),e.buttonBackground=s("button.background",{dark:"#0E639C",light:"#007ACC",hcLight:null,hcDark:null},T.localize(41,null)),e.buttonHoverBackground=s("button.hoverBackground",{dark:E(e.buttonBackground,.2),light:w(e.buttonBackground,.2),hcDark:null,hcLight:null},T.localize(42,null)),e.buttonBorder=s("button.border",{dark:e.contrastBorder,light:e.contrastBorder,hcLight:e.contrastBorder,hcDark:e.contrastBorder},T.localize(43,null)),e.buttonSecondaryForeground=s("button.secondaryForeground",{dark:y.Color.white,light:y.Color.white,hcLight:y.Color.black,hcDark:y.Color.white},T.localize(44,null)),e.buttonSecondaryBackground=s("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcLight:null,hcDark:null},T.localize(45,null)),e.buttonSecondaryHoverBackground=s("button.secondaryHoverBackground",{dark:E(e.buttonSecondaryBackground,.2),light:w(e.buttonSecondaryBackground,.2),hcLight:null,hcDark:null},T.localize(46,null)),e.buttonSecondaryBorder=s("button.secondaryBorder",{dark:"#4894FE",light:"#8A8886",hcLight:e.contrastBorder,hcDark:e.contrastBorder},T.localize(47,null)),e.buttonDisabledBorder=s("button.disabledBorder",{dark:new y.Color(new y.RGBA(127,127,127,.1)),light:"#F3F2F1",hcLight:e.disabledForeground,hcDark:"#00FF00"},T.localize(48,null)),e.buttonDisabledForeground=s("button.disabledForeground",{dark:new y.Color(new y.RGBA(127,127,127,.7)),light:"#A19F9D",hcLight:e.disabledForeground,hcDark:"#00FF00"},T.localize(49,null)),e.buttonDisabledBackground=s("button.disabledBackground",{dark:new y.Color(new y.RGBA(127,127,127,.1)),light:"#F3F2F1",hcLight:y.Color.black,hcDark:y.Color.black},T.localize(50,null)),e.badgeBackground=s("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:y.Color.black,hcLight:"#0F4A85"},T.localize(51,null)),e.badgeForeground=s("badge.foreground",{dark:y.Color.white,light:"#333",hcDark:y.Color.white,hcLight:y.Color.white},T.localize(52,null)),e.scrollbarShadow=s("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},T.localize(53,null)),e.scrollbarSliderBackground=s("scrollbarSlider.background",{dark:y.Color.fromHex("#797979").transparent(.4),light:y.Color.fromHex("#646464").transparent(.4),hcDark:C(e.contrastBorder,.6),hcLight:C(e.contrastBorder,.4)},T.localize(54,null)),e.scrollbarSliderHoverBackground=s("scrollbarSlider.hoverBackground",{dark:y.Color.fromHex("#646464").transparent(.7),light:y.Color.fromHex("#646464").transparent(.7),hcDark:C(e.contrastBorder,.8),hcLight:C(e.contrastBorder,.8)},T.localize(55,null)),e.scrollbarSliderActiveBackground=s("scrollbarSlider.activeBackground",{dark:y.Color.fromHex("#BFBFBF").transparent(.4),light:y.Color.fromHex("#000000").transparent(.6),hcDark:e.contrastBorder,hcLight:e.contrastBorder},T.localize(56,null)),e.progressBarBackground=s("progressBar.background",{dark:y.Color.fromHex("#0E70C0"),light:y.Color.fromHex("#0E70C0"),hcDark:e.contrastBorder,hcLight:e.contrastBorder},T.localize(57,null)),e.editorErrorBackground=s("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(58,null),!0),e.editorErrorForeground=s("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},T.localize(59,null)),e.editorErrorBorder=s("editorError.border",{dark:null,light:null,hcDark:y.Color.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},T.localize(60,null)),e.editorWarningBackground=s("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(61,null),!0),e.editorWarningForeground=s("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},T.localize(62,null)),e.editorWarningBorder=s("editorWarning.border",{dark:null,light:null,hcDark:y.Color.fromHex("#FFCC00").transparent(.8),hcLight:y.Color.fromHex("#FFCC00").transparent(.8)},T.localize(63,null)),e.editorInfoBackground=s("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(64,null),!0),e.editorInfoForeground=s("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},T.localize(65,null)),e.editorInfoBorder=s("editorInfo.border",{dark:null,light:null,hcDark:y.Color.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},T.localize(66,null)),e.editorHintForeground=s("editorHint.foreground",{dark:y.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},T.localize(67,null)),e.editorHintBorder=s("editorHint.border",{dark:null,light:null,hcDark:y.Color.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},T.localize(68,null)),e.sashHoverBorder=s("sash.hoverBorder",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.focusBorder,hcLight:e.focusBorder},T.localize(69,null)),e.editorBackground=s("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:y.Color.black,hcLight:y.Color.white},T.localize(70,null)),e.editorForeground=s("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:y.Color.white,hcLight:e.foreground},T.localize(71,null)),e.editorStickyScrollBackground=s("editorStickyScroll.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},T.localize(72,null)),e.editorStickyScrollHoverBackground=s("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:y.Color.fromHex("#0F4A85").transparent(.1)},T.localize(73,null)),e.editorWidgetBackground=s("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:y.Color.white},T.localize(74,null)),e.editorWidgetForeground=s("editorWidget.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},T.localize(75,null)),e.editorWidgetBorder=s("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:e.contrastBorder,hcLight:e.contrastBorder},T.localize(76,null)),e.editorWidgetResizeBorder=s("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},T.localize(77,null)),e.quickInputBackground=s("quickInput.background",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},T.localize(78,null)),e.quickInputForeground=s("quickInput.foreground",{dark:e.editorWidgetForeground,light:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},T.localize(79,null)),e.quickInputTitleBackground=s("quickInputTitle.background",{dark:new y.Color(new y.RGBA(255,255,255,.105)),light:new y.Color(new y.RGBA(0,0,0,.06)),hcDark:"#000000",hcLight:y.Color.white},T.localize(80,null)),e.pickerGroupForeground=s("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:y.Color.white,hcLight:"#0F4A85"},T.localize(81,null)),e.pickerGroupBorder=s("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:y.Color.white,hcLight:"#0F4A85"},T.localize(82,null)),e.keybindingLabelBackground=s("keybindingLabel.background",{dark:new y.Color(new y.RGBA(128,128,128,.17)),light:new y.Color(new y.RGBA(221,221,221,.4)),hcDark:y.Color.transparent,hcLight:y.Color.transparent},T.localize(83,null)),e.keybindingLabelForeground=s("keybindingLabel.foreground",{dark:y.Color.fromHex("#CCCCCC"),light:y.Color.fromHex("#555555"),hcDark:y.Color.white,hcLight:e.foreground},T.localize(84,null)),e.keybindingLabelBorder=s("keybindingLabel.border",{dark:new y.Color(new y.RGBA(51,51,51,.6)),light:new y.Color(new y.RGBA(204,204,204,.4)),hcDark:new y.Color(new y.RGBA(111,195,223)),hcLight:e.contrastBorder},T.localize(85,null)),e.keybindingLabelBottomBorder=s("keybindingLabel.bottomBorder",{dark:new y.Color(new y.RGBA(68,68,68,.6)),light:new y.Color(new y.RGBA(187,187,187,.4)),hcDark:new y.Color(new y.RGBA(111,195,223)),hcLight:e.foreground},T.localize(86,null)),e.editorSelectionBackground=s("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},T.localize(87,null)),e.editorSelectionForeground=s("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:y.Color.white},T.localize(88,null)),e.editorInactiveSelection=s("editor.inactiveSelectionBackground",{light:C(e.editorSelectionBackground,.5),dark:C(e.editorSelectionBackground,.5),hcDark:C(e.editorSelectionBackground,.7),hcLight:C(e.editorSelectionBackground,.5)},T.localize(89,null),!0),e.editorSelectionHighlight=s("editor.selectionHighlightBackground",{light:k(e.editorSelectionBackground,e.editorBackground,.3,.6),dark:k(e.editorSelectionBackground,e.editorBackground,.3,.6),hcDark:null,hcLight:null},T.localize(90,null),!0),e.editorSelectionHighlightBorder=s("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},T.localize(91,null)),e.editorFindMatch=s("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},T.localize(92,null)),e.editorFindMatchHighlight=s("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},T.localize(93,null),!0),e.editorFindRangeHighlight=s("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},T.localize(94,null),!0),e.editorFindMatchBorder=s("editor.findMatchBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},T.localize(95,null)),e.editorFindMatchHighlightBorder=s("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},T.localize(96,null)),e.editorFindRangeHighlightBorder=s("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:C(e.activeContrastBorder,.4),hcLight:C(e.activeContrastBorder,.4)},T.localize(97,null),!0),e.searchEditorFindMatch=s("searchEditor.findMatchBackground",{light:C(e.editorFindMatchHighlight,.66),dark:C(e.editorFindMatchHighlight,.66),hcDark:e.editorFindMatchHighlight,hcLight:e.editorFindMatchHighlight},T.localize(98,null)),e.searchEditorFindMatchBorder=s("searchEditor.findMatchBorder",{light:C(e.editorFindMatchHighlightBorder,.66),dark:C(e.editorFindMatchHighlightBorder,.66),hcDark:e.editorFindMatchHighlightBorder,hcLight:e.editorFindMatchHighlightBorder},T.localize(99,null)),e.searchResultsInfoForeground=s("search.resultsInfoForeground",{light:e.foreground,dark:C(e.foreground,.65),hcDark:e.foreground,hcLight:e.foreground},T.localize(100,null)),e.editorHoverHighlight=s("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},T.localize(101,null),!0),e.editorHoverBackground=s("editorHoverWidget.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},T.localize(102,null)),e.editorHoverForeground=s("editorHoverWidget.foreground",{light:e.editorWidgetForeground,dark:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},T.localize(103,null)),e.editorHoverBorder=s("editorHoverWidget.border",{light:e.editorWidgetBorder,dark:e.editorWidgetBorder,hcDark:e.editorWidgetBorder,hcLight:e.editorWidgetBorder},T.localize(104,null)),e.editorHoverStatusBarBackground=s("editorHoverWidget.statusBarBackground",{dark:E(e.editorHoverBackground,.2),light:w(e.editorHoverBackground,.05),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},T.localize(105,null)),e.editorActiveLinkForeground=s("editorLink.activeForeground",{dark:"#4E94CE",light:y.Color.blue,hcDark:y.Color.cyan,hcLight:"#292929"},T.localize(106,null)),e.editorInlayHintForeground=s("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:y.Color.white,hcLight:y.Color.black},T.localize(107,null)),e.editorInlayHintBackground=s("editorInlayHint.background",{dark:C(e.badgeBackground,.1),light:C(e.badgeBackground,.1),hcDark:C(y.Color.white,.1),hcLight:C(e.badgeBackground,.1)},T.localize(108,null)),e.editorInlayHintTypeForeground=s("editorInlayHint.typeForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},T.localize(109,null)),e.editorInlayHintTypeBackground=s("editorInlayHint.typeBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},T.localize(110,null)),e.editorInlayHintParameterForeground=s("editorInlayHint.parameterForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},T.localize(111,null)),e.editorInlayHintParameterBackground=s("editorInlayHint.parameterBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},T.localize(112,null)),e.editorLightBulbForeground=s("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},T.localize(113,null)),e.editorLightBulbAutoFixForeground=s("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},T.localize(114,null)),e.defaultInsertColor=new y.Color(new y.RGBA(155,185,85,.2)),e.defaultRemoveColor=new y.Color(new y.RGBA(255,0,0,.2)),e.diffInserted=s("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},T.localize(115,null),!0),e.diffRemoved=s("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},T.localize(116,null),!0),e.diffInsertedLine=s("diffEditor.insertedLineBackground",{dark:e.defaultInsertColor,light:e.defaultInsertColor,hcDark:null,hcLight:null},T.localize(117,null),!0),e.diffRemovedLine=s("diffEditor.removedLineBackground",{dark:e.defaultRemoveColor,light:e.defaultRemoveColor,hcDark:null,hcLight:null},T.localize(118,null),!0),e.diffInsertedLineGutter=s("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(119,null)),e.diffRemovedLineGutter=s("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(120,null)),e.diffOverviewRulerInserted=s("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(121,null)),e.diffOverviewRulerRemoved=s("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(122,null)),e.diffInsertedOutline=s("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},T.localize(123,null)),e.diffRemovedOutline=s("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},T.localize(124,null)),e.diffBorder=s("diffEditor.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},T.localize(125,null)),e.diffDiagonalFill=s("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},T.localize(126,null)),e.diffUnchangedRegionBackground=s("diffEditor.unchangedRegionBackground",{dark:"#3e3e3e",light:"#e4e4e4",hcDark:null,hcLight:null},T.localize(127,null)),e.diffUnchangedRegionForeground=s("diffEditor.unchangedRegionForeground",{dark:"#a3a2a2",light:"#4d4c4c",hcDark:null,hcLight:null},T.localize(128,null)),e.diffUnchangedTextBackground=s("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},T.localize(129,null)),e.listFocusBackground=s("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(130,null)),e.listFocusForeground=s("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(131,null)),e.listFocusOutline=s("list.focusOutline",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},T.localize(132,null)),e.listFocusAndSelectionOutline=s("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(133,null)),e.listActiveSelectionBackground=s("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:y.Color.fromHex("#0F4A85").transparent(.1)},T.localize(134,null)),e.listActiveSelectionForeground=s("list.activeSelectionForeground",{dark:y.Color.white,light:y.Color.white,hcDark:null,hcLight:null},T.localize(135,null)),e.listActiveSelectionIconForeground=s("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(136,null)),e.listInactiveSelectionBackground=s("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:y.Color.fromHex("#0F4A85").transparent(.1)},T.localize(137,null)),e.listInactiveSelectionForeground=s("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(138,null)),e.listInactiveSelectionIconForeground=s("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(139,null)),e.listInactiveFocusBackground=s("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(140,null)),e.listInactiveFocusOutline=s("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(141,null)),e.listHoverBackground=s("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:y.Color.white.transparent(.1),hcLight:y.Color.fromHex("#0F4A85").transparent(.1)},T.localize(142,null)),e.listHoverForeground=s("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(143,null)),e.listDropBackground=s("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},T.localize(144,null)),e.listHighlightForeground=s("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:e.focusBorder,hcLight:e.focusBorder},T.localize(145,null)),e.listFocusHighlightForeground=s("list.focusHighlightForeground",{dark:e.listHighlightForeground,light:A(e.listActiveSelectionBackground,e.listHighlightForeground,"#BBE7FF"),hcDark:e.listHighlightForeground,hcLight:e.listHighlightForeground},T.localize(146,null)),e.listInvalidItemForeground=s("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},T.localize(147,null)),e.listErrorForeground=s("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},T.localize(148,null)),e.listWarningForeground=s("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},T.localize(149,null)),e.listFilterWidgetBackground=s("listFilterWidget.background",{light:w(e.editorWidgetBackground,0),dark:E(e.editorWidgetBackground,0),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},T.localize(150,null)),e.listFilterWidgetOutline=s("listFilterWidget.outline",{dark:y.Color.transparent,light:y.Color.transparent,hcDark:"#f38518",hcLight:"#007ACC"},T.localize(151,null)),e.listFilterWidgetNoMatchesOutline=s("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},T.localize(152,null)),e.listFilterWidgetShadow=s("listFilterWidget.shadow",{dark:e.widgetShadow,light:e.widgetShadow,hcDark:e.widgetShadow,hcLight:e.widgetShadow},T.localize(153,null)),e.listFilterMatchHighlight=s("list.filterMatchBackground",{dark:e.editorFindMatchHighlight,light:e.editorFindMatchHighlight,hcDark:null,hcLight:null},T.localize(154,null)),e.listFilterMatchHighlightBorder=s("list.filterMatchBorder",{dark:e.editorFindMatchHighlightBorder,light:e.editorFindMatchHighlightBorder,hcDark:e.contrastBorder,hcLight:e.activeContrastBorder},T.localize(155,null)),e.treeIndentGuidesStroke=s("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},T.localize(156,null)),e.treeInactiveIndentGuidesStroke=s("tree.inactiveIndentGuidesStroke",{dark:C(e.treeIndentGuidesStroke,.4),light:C(e.treeIndentGuidesStroke,.4),hcDark:C(e.treeIndentGuidesStroke,.4),hcLight:C(e.treeIndentGuidesStroke,.4)},T.localize(157,null)),e.tableColumnsBorder=s("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},T.localize(158,null)),e.tableOddRowsBackgroundColor=s("tree.tableOddRowsBackground",{dark:C(e.foreground,.04),light:C(e.foreground,.04),hcDark:null,hcLight:null},T.localize(159,null)),e.listDeemphasizedForeground=s("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},T.localize(160,null)),e.checkboxBackground=s("checkbox.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},T.localize(161,null)),e.checkboxSelectBackground=s("checkbox.selectBackground",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},T.localize(162,null)),e.checkboxForeground=s("checkbox.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},T.localize(163,null)),e.checkboxBorder=s("checkbox.border",{dark:e.selectBorder,light:e.selectBorder,hcDark:e.selectBorder,hcLight:e.selectBorder},T.localize(164,null)),e.checkboxSelectBorder=s("checkbox.selectBorder",{dark:e.iconForeground,light:e.iconForeground,hcDark:e.iconForeground,hcLight:e.iconForeground},T.localize(165,null)),e._deprecatedQuickInputListFocusBackground=s("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,T.localize(166,null)),e.quickInputListFocusForeground=s("quickInputList.focusForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},T.localize(167,null)),e.quickInputListFocusIconForeground=s("quickInputList.focusIconForeground",{dark:e.listActiveSelectionIconForeground,light:e.listActiveSelectionIconForeground,hcDark:e.listActiveSelectionIconForeground,hcLight:e.listActiveSelectionIconForeground},T.localize(168,null)),e.quickInputListFocusBackground=s("quickInputList.focusBackground",{dark:_(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),light:_(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),hcDark:null,hcLight:null},T.localize(169,null)),e.menuBorder=s("menu.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},T.localize(170,null)),e.menuForeground=s("menu.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},T.localize(171,null)),e.menuBackground=s("menu.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},T.localize(172,null)),e.menuSelectionForeground=s("menu.selectionForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},T.localize(173,null)),e.menuSelectionBackground=s("menu.selectionBackground",{dark:e.listActiveSelectionBackground,light:e.listActiveSelectionBackground,hcDark:e.listActiveSelectionBackground,hcLight:e.listActiveSelectionBackground},T.localize(174,null)),e.menuSelectionBorder=s("menu.selectionBorder",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},T.localize(175,null)),e.menuSeparatorBackground=s("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:e.contrastBorder,hcLight:e.contrastBorder},T.localize(176,null)),e.toolbarHoverBackground=s("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},T.localize(177,null)),e.toolbarHoverOutline=s("toolbar.hoverOutline",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},T.localize(178,null)),e.toolbarActiveBackground=s("toolbar.activeBackground",{dark:E(e.toolbarHoverBackground,.1),light:w(e.toolbarHoverBackground,.1),hcDark:null,hcLight:null},T.localize(179,null)),e.snippetTabstopHighlightBackground=s("editor.snippetTabstopHighlightBackground",{dark:new y.Color(new y.RGBA(124,124,124,.3)),light:new y.Color(new y.RGBA(10,50,100,.2)),hcDark:new y.Color(new y.RGBA(124,124,124,.3)),hcLight:new y.Color(new y.RGBA(10,50,100,.2))},T.localize(180,null)),e.snippetTabstopHighlightBorder=s("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(181,null)),e.snippetFinalTabstopHighlightBackground=s("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(182,null)),e.snippetFinalTabstopHighlightBorder=s("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new y.Color(new y.RGBA(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},T.localize(183,null)),e.breadcrumbsForeground=s("breadcrumb.foreground",{light:C(e.foreground,.8),dark:C(e.foreground,.8),hcDark:C(e.foreground,.8),hcLight:C(e.foreground,.8)},T.localize(184,null)),e.breadcrumbsBackground=s("breadcrumb.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},T.localize(185,null)),e.breadcrumbsFocusForeground=s("breadcrumb.focusForeground",{light:w(e.foreground,.2),dark:E(e.foreground,.1),hcDark:E(e.foreground,.1),hcLight:E(e.foreground,.1)},T.localize(186,null)),e.breadcrumbsActiveSelectionForeground=s("breadcrumb.activeSelectionForeground",{light:w(e.foreground,.2),dark:E(e.foreground,.1),hcDark:E(e.foreground,.1),hcLight:E(e.foreground,.1)},T.localize(187,null)),e.breadcrumbsPickerBackground=s("breadcrumbPicker.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},T.localize(188,null));const u=.5,d=y.Color.fromHex("#40C8AE").transparent(u),p=y.Color.fromHex("#40A6FF").transparent(u),c=y.Color.fromHex("#606060").transparent(.4),l=.4,n=1;e.mergeCurrentHeaderBackground=s("merge.currentHeaderBackground",{dark:d,light:d,hcDark:null,hcLight:null},T.localize(189,null),!0),e.mergeCurrentContentBackground=s("merge.currentContentBackground",{dark:C(e.mergeCurrentHeaderBackground,l),light:C(e.mergeCurrentHeaderBackground,l),hcDark:C(e.mergeCurrentHeaderBackground,l),hcLight:C(e.mergeCurrentHeaderBackground,l)},T.localize(190,null),!0),e.mergeIncomingHeaderBackground=s("merge.incomingHeaderBackground",{dark:p,light:p,hcDark:null,hcLight:null},T.localize(191,null),!0),e.mergeIncomingContentBackground=s("merge.incomingContentBackground",{dark:C(e.mergeIncomingHeaderBackground,l),light:C(e.mergeIncomingHeaderBackground,l),hcDark:C(e.mergeIncomingHeaderBackground,l),hcLight:C(e.mergeIncomingHeaderBackground,l)},T.localize(192,null),!0),e.mergeCommonHeaderBackground=s("merge.commonHeaderBackground",{dark:c,light:c,hcDark:null,hcLight:null},T.localize(193,null),!0),e.mergeCommonContentBackground=s("merge.commonContentBackground",{dark:C(e.mergeCommonHeaderBackground,l),light:C(e.mergeCommonHeaderBackground,l),hcDark:C(e.mergeCommonHeaderBackground,l),hcLight:C(e.mergeCommonHeaderBackground,l)},T.localize(194,null),!0),e.mergeBorder=s("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},T.localize(195,null)),e.overviewRulerCurrentContentForeground=s("editorOverviewRuler.currentContentForeground",{dark:C(e.mergeCurrentHeaderBackground,n),light:C(e.mergeCurrentHeaderBackground,n),hcDark:e.mergeBorder,hcLight:e.mergeBorder},T.localize(196,null)),e.overviewRulerIncomingContentForeground=s("editorOverviewRuler.incomingContentForeground",{dark:C(e.mergeIncomingHeaderBackground,n),light:C(e.mergeIncomingHeaderBackground,n),hcDark:e.mergeBorder,hcLight:e.mergeBorder},T.localize(197,null)),e.overviewRulerCommonContentForeground=s("editorOverviewRuler.commonContentForeground",{dark:C(e.mergeCommonHeaderBackground,n),light:C(e.mergeCommonHeaderBackground,n),hcDark:e.mergeBorder,hcLight:e.mergeBorder},T.localize(198,null)),e.overviewRulerFindMatchForeground=s("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},T.localize(199,null),!0),e.overviewRulerSelectionHighlightForeground=s("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},T.localize(200,null),!0),e.minimapFindMatch=s("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},T.localize(201,null),!0),e.minimapSelectionOccurrenceHighlight=s("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},T.localize(202,null),!0),e.minimapSelection=s("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},T.localize(203,null),!0),e.minimapError=s("minimap.errorHighlight",{dark:new y.Color(new y.RGBA(255,18,18,.7)),light:new y.Color(new y.RGBA(255,18,18,.7)),hcDark:new y.Color(new y.RGBA(255,50,50,1)),hcLight:"#B5200D"},T.localize(204,null)),e.minimapWarning=s("minimap.warningHighlight",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningBorder,hcLight:e.editorWarningBorder},T.localize(205,null)),e.minimapBackground=s("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},T.localize(206,null)),e.minimapForegroundOpacity=s("minimap.foregroundOpacity",{dark:y.Color.fromHex("#000f"),light:y.Color.fromHex("#000f"),hcDark:y.Color.fromHex("#000f"),hcLight:y.Color.fromHex("#000f")},T.localize(207,null)),e.minimapSliderBackground=s("minimapSlider.background",{light:C(e.scrollbarSliderBackground,.5),dark:C(e.scrollbarSliderBackground,.5),hcDark:C(e.scrollbarSliderBackground,.5),hcLight:C(e.scrollbarSliderBackground,.5)},T.localize(208,null)),e.minimapSliderHoverBackground=s("minimapSlider.hoverBackground",{light:C(e.scrollbarSliderHoverBackground,.5),dark:C(e.scrollbarSliderHoverBackground,.5),hcDark:C(e.scrollbarSliderHoverBackground,.5),hcLight:C(e.scrollbarSliderHoverBackground,.5)},T.localize(209,null)),e.minimapSliderActiveBackground=s("minimapSlider.activeBackground",{light:C(e.scrollbarSliderActiveBackground,.5),dark:C(e.scrollbarSliderActiveBackground,.5),hcDark:C(e.scrollbarSliderActiveBackground,.5),hcLight:C(e.scrollbarSliderActiveBackground,.5)},T.localize(210,null)),e.problemsErrorIconForeground=s("problemsErrorIcon.foreground",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},T.localize(211,null)),e.problemsWarningIconForeground=s("problemsWarningIcon.foreground",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},T.localize(212,null)),e.problemsInfoIconForeground=s("problemsInfoIcon.foreground",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},T.localize(213,null)),e.chartsForeground=s("charts.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},T.localize(214,null)),e.chartsLines=s("charts.lines",{dark:C(e.foreground,.5),light:C(e.foreground,.5),hcDark:C(e.foreground,.5),hcLight:C(e.foreground,.5)},T.localize(215,null)),e.chartsRed=s("charts.red",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},T.localize(216,null)),e.chartsBlue=s("charts.blue",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},T.localize(217,null)),e.chartsYellow=s("charts.yellow",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},T.localize(218,null)),e.chartsOrange=s("charts.orange",{dark:e.minimapFindMatch,light:e.minimapFindMatch,hcDark:e.minimapFindMatch,hcLight:e.minimapFindMatch},T.localize(219,null)),e.chartsGreen=s("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},T.localize(220,null)),e.chartsPurple=s("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},T.localize(221,null));function g(N,P){switch(N.op){case 0:return L(N.value,P)?.darken(N.factor);case 1:return L(N.value,P)?.lighten(N.factor);case 2:return L(N.value,P)?.transparent(N.factor);case 3:{const x=L(N.background,P);return x?L(N.value,P)?.makeOpaque(x):L(N.value,P)}case 4:for(const x of N.values){const F=L(x,P);if(F)return F}return;case 6:return L(P.defines(N.if)?N.then:N.else,P);case 5:{const x=L(N.value,P);if(!x)return;const F=L(N.background,P);return F?x.isDarkerThan(F)?y.Color.getLighterColor(x,F,N.factor).transparent(N.transparency):y.Color.getDarkerColor(x,F,N.factor).transparent(N.transparency):x.transparent(N.factor*N.transparency)}default:throw(0,D.assertNever)(N)}}e.executeTransform=g;function w(N,P){return{op:0,value:N,factor:P}}e.darken=w;function E(N,P){return{op:1,value:N,factor:P}}e.lighten=E;function C(N,P){return{op:2,value:N,factor:P}}e.transparent=C;function I(N,P){return{op:3,value:N,background:P}}e.opaque=I;function _(...N){return{op:4,values:N}}e.oneOf=_;function A(N,P,x){return{op:6,if:N,then:P,else:x}}e.ifDefinedThenElse=A;function k(N,P,x,F){return{op:5,value:N,background:P,factor:x,transparency:F}}function L(N,P){if(N!==null){if(typeof N=="string")return N[0]==="#"?y.Color.fromHex(N):P.getColor(N);if(N instanceof y.Color)return N;if(typeof N=="object")return g(N,P)}}e.resolveColorValue=L,e.workbenchColorsSchemaId="vscode://schemas/workbench-colors";const R=v.Registry.as(f.Extensions.JSONContribution);R.registerSchema(e.workbenchColorsSchemaId,i.getColorSchema());const M=new t.RunOnceScheduler(()=>R.notifySchemaChanged(e.workbenchColorsSchemaId),200);i.onDidChangeSchema(()=>{M.isScheduled()||M.schedule()})}),define(Q[331],Y([1,0,36,80,1947]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.queryEditorNullBackground=e.DesignerPaneSeparator=e.calloutDialogShadowColor=e.calloutDialogBodyBackground=e.calloutDialogHeaderFooterBackground=e.calloutDialogExteriorBorder=e.calloutDialogInteriorBorder=e.calloutDialogForeground=e.infoButtonHoverBackground=e.infoButtonBorder=e.infoButtonBackground=e.infoButtonForeground=e.infoBoxSuccessBackground=e.infoBoxErrorBackground=e.infoBoxWarningBackground=e.infoBoxInformationBackground=e.notebookFindRangeHighlight=e.notebookFindMatchHighlight=e.notebookCellTagForeground=e.notebookCellTagBackground=e.codeEditorToolbarBorder=e.codeEditorToolbarBackground=e.codeEditorToolbarIcon=e.codeEditorLineNumber=e.codeEditorBackgroundActive=e.codeEditorBackground=e.splitBorder=e.markdownEditorBackground=e.cellBorder=e.toolbarBottomBorder=e.toolbarIcon=e.toolbarBackground=e.buttonMenuArrow=e.dropdownArrow=e.notebookToolbarLines=e.notebookToolbarSelectBackground=e.notebookToolbarSelectBorder=e.notebookToolbarIcon=e.gradientBackground=e.gradientTwo=e.gradientOne=e.extensionPackGradientColorTwoColor=e.extensionPackGradientColorOneColor=e.extensionPackHeaderShadow=e.hoverShadow=e.buttonDropdownBackgroundHover=e.tileBoxShadow=e.tileBorder=e.gradientTwoColorTwo=e.gradientTwoColorOne=e.gradientOneColorOne=e.extensionPackGradientTwo=e.extensionPackGradientOne=e.dropdownBoxShadow=e.textShadow=e.tileBoxShadowColor=e.GroupHeaderBackground=void 0,e.GroupHeaderBackground=(0,t.registerColor)("groupHeaderBackground",{dark:"#252526",light:"#F3F3F3",hcDark:"#000000",hcLight:"#ffffff"},b.localize(0,null)),e.tileBoxShadowColor=new y.Color(new y.RGBA(0,1,4,.13)),e.textShadow=new y.Color(new y.RGBA(0,0,0,.25)),e.dropdownBoxShadow=new y.Color(new y.RGBA(0,0,0,.25)),e.extensionPackGradientOne=new y.Color(new y.RGBA(50,49,48,.55)),e.extensionPackGradientTwo=new y.Color(new y.RGBA(50,49,48,0)),e.gradientOneColorOne=new y.Color(new y.RGBA(0,0,0,.2)),e.gradientTwoColorOne=new y.Color(new y.RGBA(156,48,48,0)),e.gradientTwoColorTwo=new y.Color(new y.RGBA(255,255,255,.1)),e.tileBorder=(0,t.registerColor)("tileBorder",{light:"#fff",dark:"#8A8886",hcDark:"#2B56F2",hcLight:t.contrastBorder},b.localize(1,null)),e.tileBoxShadow=(0,t.registerColor)("tileBoxShadow",{light:e.tileBoxShadowColor,dark:e.tileBoxShadowColor,hcDark:e.tileBoxShadowColor,hcLight:e.tileBoxShadowColor},b.localize(2,null)),e.buttonDropdownBackgroundHover=(0,t.registerColor)("buttonDropdownBackgroundHover",{light:"#3062d6",dark:"#3062d6",hcDark:"#3062d6",hcLight:"#3062d6"},b.localize(3,null)),e.hoverShadow=(0,t.registerColor)("buttonDropdownBoxShadow",{light:e.dropdownBoxShadow,dark:e.dropdownBoxShadow,hcDark:e.dropdownBoxShadow,hcLight:e.dropdownBoxShadow},b.localize(4,null)),e.extensionPackHeaderShadow=(0,t.registerColor)("extensionPackHeaderShadow",{light:e.textShadow,dark:e.textShadow,hcDark:e.textShadow,hcLight:e.textShadow},b.localize(5,null)),e.extensionPackGradientColorOneColor=(0,t.registerColor)("extensionPackGradientColorOne",{light:e.extensionPackGradientOne,dark:e.extensionPackGradientOne,hcDark:e.extensionPackGradientOne,hcLight:e.extensionPackGradientOne},b.localize(6,null)),e.extensionPackGradientColorTwoColor=(0,t.registerColor)("extensionPackGradientColorTwo",{light:e.extensionPackGradientTwo,dark:e.extensionPackGradientTwo,hcDark:e.extensionPackGradientTwo,hcLight:e.extensionPackGradientTwo},b.localize(7,null)),e.gradientOne=(0,t.registerColor)("gradientOne",{light:"#f0f0f0",dark:e.gradientOneColorOne,hcDark:e.gradientOneColorOne,hcLight:e.gradientOneColorOne},b.localize(8,null)),e.gradientTwo=(0,t.registerColor)("gradientTwo",{light:e.gradientTwoColorOne,dark:e.gradientTwoColorTwo,hcDark:e.gradientTwoColorTwo,hcLight:e.gradientTwoColorTwo},b.localize(9,null)),e.gradientBackground=(0,t.registerColor)("gradientBackground",{light:"#fff",dark:"transparent",hcDark:"transparent",hcLight:"transparent"},b.localize(10,null)),e.notebookToolbarIcon=(0,t.registerColor)("notebook.notebookToolbarIcon",{light:"#0078D4",dark:"#3AA0F3",hcDark:"#FFFFFF",hcLight:"#000000"},b.localize(11,null)),e.notebookToolbarSelectBorder=(0,t.registerColor)("notebook.notebookToolbarSelectBorder",{light:"#A5A5A5",dark:"#8A8886",hcDark:"#2B56F2",hcLight:t.focusBorder},b.localize(12,null)),e.notebookToolbarSelectBackground=(0,t.registerColor)("notebook.notebookToolbarSelectBackground",{light:"#FFFFFF",dark:"#1B1A19",hcDark:"#000000",hcLight:"#fff"},b.localize(13,null)),e.notebookToolbarLines=(0,t.registerColor)("notebook.notebookToolbarLines",{light:"#D6D6D6",dark:"#323130",hcDark:"#2B56F2",hcLight:t.focusBorder},b.localize(14,null)),e.dropdownArrow=(0,t.registerColor)("notebook.dropdownArrow",{light:"#A5A5A5",dark:"#FFFFFF",hcDark:"#FFFFFF",hcLight:"#000000"},b.localize(15,null)),e.buttonMenuArrow=(0,t.registerColor)("notebook.buttonMenuArrow",{light:"#000000",dark:"#FFFFFF",hcDark:"#FFFFFF",hcLight:"#000000"},b.localize(16,null)),e.toolbarBackground=(0,t.registerColor)("notebook.toolbarBackground",{light:"#F5F5F5",dark:"#252423",hcDark:"#000000",hcLight:"#ffffff"},b.localize(17,null)),e.toolbarIcon=(0,t.registerColor)("notebook.toolbarIcon",{light:"#323130",dark:"#FFFFFF",hcDark:"#FFFFFF",hcLight:"#000000"},b.localize(18,null)),e.toolbarBottomBorder=(0,t.registerColor)("notebook.toolbarBottomBorder",{light:"#D4D4D4",dark:"#323130",hcDark:"#E86E58",hcLight:t.focusBorder},b.localize(19,null)),e.cellBorder=(0,t.registerColor)("notebook.cellBorder",{light:"#0078D4",dark:"#3AA0F3",hcDark:"#E86E58",hcLight:t.focusBorder},b.localize(20,null)),e.markdownEditorBackground=(0,t.registerColor)("notebook.markdownEditorBackground",{light:"#FFFFFF",dark:"#1B1A19",hcDark:"#000000",hcLight:"#ffffff"},b.localize(21,null)),e.splitBorder=(0,t.registerColor)("notebook.splitBorder",{light:"#E6E6E6",dark:"#323130",hcDark:"#872412",hcLight:t.focusBorder},b.localize(22,null)),e.codeEditorBackground=(0,t.registerColor)("notebook.codeEditorBackground",{light:"#F5F5F5",dark:"#333333",hcDark:"#000000",hcLight:"#ffffff"},b.localize(23,null)),e.codeEditorBackgroundActive=(0,t.registerColor)("notebook.codeEditorBackgroundActive",{light:"#FFFFFF",dark:null,hcDark:null,hcLight:"#ffffff"},b.localize(24,null)),e.codeEditorLineNumber=(0,t.registerColor)("notebook.codeEditorLineNumber",{light:"#A19F9D",dark:"#A19F9D",hcDark:"#FFFFFF",hcLight:"#000000"},b.localize(25,null)),e.codeEditorToolbarIcon=(0,t.registerColor)("notebook.codeEditorToolbarIcon",{light:"#999999",dark:"#A19F9D",hcDark:"#FFFFFF",hcLight:"#000000"},b.localize(26,null)),e.codeEditorToolbarBackground=(0,t.registerColor)("notebook.codeEditorToolbarBackground",{light:"#EEEEEE",dark:"#333333",hcDark:"#000000",hcLight:"#ffffff"},b.localize(27,null)),e.codeEditorToolbarBorder=(0,t.registerColor)("notebook.codeEditorToolbarBorder",{light:"#C8C6C4",dark:"#333333",hcDark:"#000000",hcLight:"#6fc3df"},b.localize(28,null)),e.notebookCellTagBackground=(0,t.registerColor)("notebook.notebookCellTagBackground",{light:"#0078D4",dark:"#0078D4",hcDark:"#0078D4",hcLight:"#0078D4"},b.localize(29,null)),e.notebookCellTagForeground=(0,t.registerColor)("notebook.notebookCellTagForeground",{light:"#FFFFFF",dark:"#FFFFFF",hcDark:"#FFFFFF",hcLight:"#FFFFFF"},b.localize(30,null)),e.notebookFindMatchHighlight=(0,t.registerColor)("notebook.findMatchHighlightBackground",{light:"#FFFF00",dark:"#FFFF00",hcDark:null,hcLight:null},b.localize(31,null),!0),e.notebookFindRangeHighlight=(0,t.registerColor)("notebook.findRangeHighlightBackground",{dark:"#FFA500",light:"#FFA500",hcDark:null,hcLight:null},b.localize(32,null),!0),e.infoBoxInformationBackground=(0,t.registerColor)("infoBox.infomationBackground",{light:"#F0F6FF",dark:"#001433",hcDark:"#000000",hcLight:"#ffffff"},b.localize(33,null)),e.infoBoxWarningBackground=(0,t.registerColor)("infoBox.warningBackground",{light:"#FFF8F0",dark:"#331B00",hcDark:"#000000",hcLight:"#ffffff"},b.localize(34,null)),e.infoBoxErrorBackground=(0,t.registerColor)("infoBox.errorBackground",{light:"#FEF0F1",dark:"#300306",hcDark:"#000000",hcLight:"#ffffff"},b.localize(35,null)),e.infoBoxSuccessBackground=(0,t.registerColor)("infoBox.successBackground",{light:"#F8FFF0",dark:"#1B3300",hcDark:"#000000",hcLight:"#ffffff"},b.localize(36,null)),e.infoButtonForeground=(0,t.registerColor)("infoButton.foreground",{dark:"#FFFFFF",light:"#000000",hcDark:"#FFFFFF",hcLight:"#000000"},b.localize(37,null)),e.infoButtonBackground=(0,t.registerColor)("infoButton.background",{dark:"#1B1A19",light:"#FFFFFF",hcDark:"#000000",hcLight:"#ffffff"},b.localize(38,null)),e.infoButtonBorder=(0,t.registerColor)("infoButton.border",{dark:"#1B1A19",light:"#FFFFFF",hcDark:t.contrastBorder,hcLight:t.contrastBorder},b.localize(39,null)),e.infoButtonHoverBackground=(0,t.registerColor)("infoButton.hoverBackground",{dark:"#282625",light:"#F3F2F1",hcDark:"#000000",hcLight:"#ffffff"},b.localize(40,null)),e.calloutDialogForeground=(0,t.registerColor)("calloutDialog.foreground",{light:"#616161",dark:"#CCCCCC",hcDark:"#FFFFFF",hcLight:"#000000"},b.localize(41,null)),e.calloutDialogInteriorBorder=(0,t.registerColor)("calloutDialog.interiorBorder",{light:"#D6D6D6",dark:"#323130",hcDark:"#2B56F2",hcLight:"#2B56F2"},b.localize(42,null)),e.calloutDialogExteriorBorder=(0,t.registerColor)("calloutDialog.exteriorBorder",{light:"#CCCCCC",dark:"#CCCCCC",hcDark:"#2B56F2",hcLight:"#2B56F2"},b.localize(43,null)),e.calloutDialogHeaderFooterBackground=(0,t.registerColor)("calloutDialog.headerFooterBackground",{light:"#FFFFFF",dark:"#1E1E1E",hcDark:y.Color.black,hcLight:y.Color.white},b.localize(44,null)),e.calloutDialogBodyBackground=(0,t.registerColor)("calloutDialog.bodyBackground",{light:"#FFFFFF",dark:"#1E1E1E",hcDark:y.Color.black,hcLight:y.Color.white},b.localize(45,null)),e.calloutDialogShadowColor=(0,t.registerColor)("calloutDialog.shadow",{light:"#000000",dark:"#FFFFFF",hcDark:"#000000",hcLight:"#000000"},b.localize(46,null)),e.DesignerPaneSeparator=(0,t.registerColor)("designer.paneSeparator",{light:"#DDDDDD",dark:"#8A8886",hcDark:t.contrastBorder,hcLight:t.contrastBorder},b.localize(47,null)),e.queryEditorNullBackground=(0,t.registerColor)("queryEditor.nullBackground",{light:"#FFFFE1",dark:"#4B0082",hcDark:"#000000",hcLight:"#FFFFE1"},b.localize(48,null,"#00000000"))}),define(Q[515],Y([1,0,36,80,1948]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resultsErrorColor=e.cellBorderColor=e.jobsHeadingBackground=e.tableHoverBackground=e.cellBackground=e.tableBackground=e.disabledCheckboxForeground=e.buttonFocusOutline=e.disabledInputForeground=e.disabledInputBackground=e.tableCellOutline=e.listFocusAndSelectionForeground=e.listFocusAndSelectionBackground=e.tableHeaderForeground=e.tableHeaderBackground=void 0,e.tableHeaderBackground=(0,t.registerColor)("table.headerBackground",{dark:new y.Color(new y.RGBA(51,51,52)),light:new y.Color(new y.RGBA(245,245,245)),hcDark:"#333334",hcLight:"#fff"},b.localize(0,null)),e.tableHeaderForeground=(0,t.registerColor)("table.headerForeground",{dark:new y.Color(new y.RGBA(229,229,229)),light:new y.Color(new y.RGBA(16,16,16)),hcDark:"#e5e5e5",hcLight:"#000"},b.localize(1,null)),e.listFocusAndSelectionBackground=(0,t.registerColor)("list.focusAndSelectionBackground",{dark:"#2c3295",light:"#2c3295",hcDark:null,hcLight:null},b.localize(2,null)),e.listFocusAndSelectionForeground=(0,t.registerColor)("list.focusAndSelectionForeground",{dark:"#ffffff",light:"#ffffff",hcDark:null,hcLight:null},b.localize(3,null)),e.tableCellOutline=(0,t.registerColor)("table.cell.outline",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#e3e4e229"},b.localize(4,null)),e.disabledInputBackground=(0,t.registerColor)("input.disabled.background",{dark:"#444444",light:"#dcdcdc",hcDark:y.Color.black,hcLight:y.Color.white},b.localize(5,null)),e.disabledInputForeground=(0,t.registerColor)("input.disabled.foreground",{dark:"#888888",light:"#888888",hcDark:t.foreground,hcLight:t.foreground},b.localize(6,null)),e.buttonFocusOutline=(0,t.registerColor)("button.focusOutline",{dark:"#eaeaea",light:"#666666",hcDark:null,hcLight:t.activeContrastBorder},b.localize(7,null)),e.disabledCheckboxForeground=(0,t.registerColor)("checkbox.disabled.foreground",{dark:"#888888",light:"#888888",hcDark:y.Color.black,hcLight:y.Color.white},b.localize(8,null)),e.tableBackground=(0,t.registerColor)("agent.tableBackground",{light:"#fffffe",dark:"#333333",hcDark:y.Color.black,hcLight:y.Color.white},b.localize(9,null)),e.cellBackground=(0,t.registerColor)("agent.cellBackground",{light:"#faf5f8",dark:y.Color.black,hcDark:y.Color.black,hcLight:y.Color.white},b.localize(10,null)),e.tableHoverBackground=(0,t.registerColor)("agent.tableHoverColor",{light:"#dcdcdc",dark:"#444444",hcDark:null,hcLight:null},b.localize(11,null)),e.jobsHeadingBackground=(0,t.registerColor)("agent.jobsHeadingColor",{light:"#f4f4f4",dark:"#444444",hcDark:"#2b56f2",hcLight:"#ffffff"},b.localize(12,null)),e.cellBorderColor=(0,t.registerColor)("agent.cellBorderColor",{light:null,dark:null,hcDark:t.contrastBorder,hcLight:t.contrastBorder},b.localize(13,null)),e.resultsErrorColor=(0,t.registerColor)("results.error.color",{light:"#f44242",dark:"#f44242",hcDark:"#f44242",hcLight:"#f44242"},b.localize(14,null))}),define(Q[3311],Y([1,0,36,331]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.attachDesignerStyler=void 0;function b(D,T){function f(){const v=T.getColorTheme();D.style({paneSeparator:t.resolveColorValue(y.DesignerPaneSeparator,v)})}return f(),T.onDidColorThemeChange(f)}e.attachDesignerStyler=b}),define(Q[278],Y([1,0,36]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.attachDialogStyler=e.defaultDialogStyles=e.attachMenuStyler=e.defaultMenuStyles=e.attachBreadcrumbsStyler=e.defaultBreadcrumbsStyles=e.attachStylerCallback=e.attachProgressBarStyler=e.attachKeybindingLabelStyler=e.defaultListStyles=e.attachListStyler=e.attachStyler=e.computeStyles=void 0;function y(a,r){const i=Object.create(null);for(const s in r){const o=r[s];if(o){let u=(0,t.resolveColorValue)(o,a);u&&(u=u.toString()),i[s]=u}}return i}e.computeStyles=y;function b(a,r,i){function s(){const o=y(a.getColorTheme(),r);typeof i=="function"?i(o):i.style(o)}return s(),a.onDidColorThemeChange(s)}e.attachStyler=b;function D(a,r,i){return b(r,{...e.defaultListStyles,...i||{}},a)}e.attachListStyler=D,e.defaultListStyles={listFocusBackground:t.listFocusBackground,listFocusForeground:t.listFocusForeground,listFocusOutline:t.listFocusOutline,listActiveSelectionBackground:t.listActiveSelectionBackground,listActiveSelectionForeground:t.listActiveSelectionForeground,listActiveSelectionIconForeground:t.listActiveSelectionIconForeground,listFocusAndSelectionOutline:t.listFocusAndSelectionOutline,listFocusAndSelectionBackground:t.listActiveSelectionBackground,listFocusAndSelectionForeground:t.listActiveSelectionForeground,listInactiveSelectionBackground:t.listInactiveSelectionBackground,listInactiveSelectionIconForeground:t.listInactiveSelectionIconForeground,listInactiveSelectionForeground:t.listInactiveSelectionForeground,listInactiveFocusBackground:t.listInactiveFocusBackground,listInactiveFocusOutline:t.listInactiveFocusOutline,listHoverBackground:t.listHoverBackground,listHoverForeground:t.listHoverForeground,listDropBackground:t.listDropBackground,listSelectionOutline:t.activeContrastBorder,listHoverOutline:t.activeContrastBorder,listFilterWidgetBackground:t.listFilterWidgetBackground,listFilterWidgetOutline:t.listFilterWidgetOutline,listFilterWidgetNoMatchesOutline:t.listFilterWidgetNoMatchesOutline,listFilterWidgetShadow:t.listFilterWidgetShadow,treeIndentGuidesStroke:t.treeIndentGuidesStroke,tableColumnsBorder:t.tableColumnsBorder,tableOddRowsBackgroundColor:t.tableOddRowsBackgroundColor,inputActiveOptionBorder:t.inputActiveOptionBorder,inputActiveOptionForeground:t.inputActiveOptionForeground,inputActiveOptionBackground:t.inputActiveOptionBackground,inputBackground:t.inputBackground,inputForeground:t.inputForeground,inputBorder:t.inputBorder,inputValidationInfoBackground:t.inputValidationInfoBackground,inputValidationInfoForeground:t.inputValidationInfoForeground,inputValidationInfoBorder:t.inputValidationInfoBorder,inputValidationWarningBackground:t.inputValidationWarningBackground,inputValidationWarningForeground:t.inputValidationWarningForeground,inputValidationWarningBorder:t.inputValidationWarningBorder,inputValidationErrorBackground:t.inputValidationErrorBackground,inputValidationErrorForeground:t.inputValidationErrorForeground,inputValidationErrorBorder:t.inputValidationErrorBorder};function T(a,r,i){return b(r,{keybindingLabelBackground:i&&i.keybindingLabelBackground||t.keybindingLabelBackground,keybindingLabelForeground:i&&i.keybindingLabelForeground||t.keybindingLabelForeground,keybindingLabelBorder:i&&i.keybindingLabelBorder||t.keybindingLabelBorder,keybindingLabelBottomBorder:i&&i.keybindingLabelBottomBorder||t.keybindingLabelBottomBorder,keybindingLabelShadow:i&&i.keybindingLabelShadow||t.widgetShadow},a)}e.attachKeybindingLabelStyler=T;function f(a,r,i){return b(r,{progressBarBackground:i?.progressBarBackground||t.progressBarBackground},a)}e.attachProgressBarStyler=f;function v(a,r,i){return b(a,r,i)}e.attachStylerCallback=v,e.defaultBreadcrumbsStyles={breadcrumbsBackground:t.breadcrumbsBackground,breadcrumbsForeground:t.breadcrumbsForeground,breadcrumbsHoverForeground:t.breadcrumbsFocusForeground,breadcrumbsFocusForeground:t.breadcrumbsFocusForeground,breadcrumbsFocusAndSelectionForeground:t.breadcrumbsActiveSelectionForeground};function m(a,r,i){return b(r,{...e.defaultBreadcrumbsStyles,...i},a)}e.attachBreadcrumbsStyler=m,e.defaultMenuStyles={shadowColor:t.widgetShadow,borderColor:t.menuBorder,foregroundColor:t.menuForeground,backgroundColor:t.menuBackground,selectionForegroundColor:t.menuSelectionForeground,selectionBackgroundColor:t.menuSelectionBackground,selectionBorderColor:t.menuSelectionBorder,separatorColor:t.menuSeparatorBackground,scrollbarShadow:t.scrollbarShadow,scrollbarSliderBackground:t.scrollbarSliderBackground,scrollbarSliderHoverBackground:t.scrollbarSliderHoverBackground,scrollbarSliderActiveBackground:t.scrollbarSliderActiveBackground};function S(a,r,i){return b(r,{...e.defaultMenuStyles,...i},a)}e.attachMenuStyler=S,e.defaultDialogStyles={dialogBackground:t.editorWidgetBackground,dialogForeground:t.editorWidgetForeground,dialogShadow:t.widgetShadow,dialogBorder:t.contrastBorder,buttonForeground:t.buttonForeground,buttonSeparator:t.buttonSeparator,buttonBackground:t.buttonBackground,buttonSecondaryBackground:t.buttonSecondaryBackground,buttonSecondaryForeground:t.buttonSecondaryForeground,buttonSecondaryHoverBackground:t.buttonSecondaryHoverBackground,buttonHoverBackground:t.buttonHoverBackground,buttonBorder:t.buttonBorder,checkboxBorder:t.checkboxBorder,checkboxBackground:t.checkboxBackground,checkboxForeground:t.checkboxForeground,errorIconForeground:t.problemsErrorIconForeground,warningIconForeground:t.problemsWarningIconForeground,infoIconForeground:t.problemsInfoIconForeground,inputBackground:t.inputBackground,inputForeground:t.inputForeground,inputBorder:t.inputBorder,textLinkForeground:t.textLinkForeground};function h(a,r,i){return b(r,{...e.defaultDialogStyles,...i},a)}e.attachDialogStyler=h}),define(Q[595],Y([1,0,7,574,129,14,4,36]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicCssRules=e.GlobalEditorPointerMoveMonitor=e.EditorPointerEventFactory=e.EditorMouseEventFactory=e.EditorMouseEvent=e.createCoordinatesRelativeToEditor=e.createEditorPagePosition=e.CoordinatesRelativeToEditor=e.EditorPagePosition=e.ClientCoordinates=e.PageCoordinates=void 0;class v{constructor(n,g){this.x=n,this.y=g,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new m(this.x-window.scrollX,this.y-window.scrollY)}}e.PageCoordinates=v;class m{constructor(n,g){this.clientX=n,this.clientY=g,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new v(this.clientX+window.scrollX,this.clientY+window.scrollY)}}e.ClientCoordinates=m;class S{constructor(n,g,w,E){this.x=n,this.y=g,this.width=w,this.height=E,this._editorPagePositionBrand=void 0}}e.EditorPagePosition=S;class h{constructor(n,g){this.x=n,this.y=g,this._positionRelativeToEditorBrand=void 0}}e.CoordinatesRelativeToEditor=h;function a(l){const n=t.getDomNodePagePosition(l);return new S(n.left,n.top,n.width,n.height)}e.createEditorPagePosition=a;function r(l,n,g){const w=n.width/l.offsetWidth,E=n.height/l.offsetHeight,C=(g.x-n.x)/w,I=(g.y-n.y)/E;return new h(C,I)}e.createCoordinatesRelativeToEditor=r;class i extends b.StandardMouseEvent{constructor(n,g,w){super(n),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=g,this.pos=new v(this.posx,this.posy),this.editorPos=a(w),this.relativePos=r(w,this.editorPos,this.pos)}}e.EditorMouseEvent=i;class s{constructor(n){this._editorViewDomNode=n}_create(n){return new i(n,!1,this._editorViewDomNode)}onContextMenu(n,g){return t.addDisposableListener(n,"contextmenu",w=>{g(this._create(w))})}onMouseUp(n,g){return t.addDisposableListener(n,"mouseup",w=>{g(this._create(w))})}onMouseDown(n,g){return t.addDisposableListener(n,t.EventType.MOUSE_DOWN,w=>{g(this._create(w))})}onPointerDown(n,g){return t.addDisposableListener(n,t.EventType.POINTER_DOWN,w=>{g(this._create(w),w.pointerId)})}onMouseLeave(n,g){return t.addDisposableListener(n,t.EventType.MOUSE_LEAVE,w=>{g(this._create(w))})}onMouseMove(n,g){return t.addDisposableListener(n,"mousemove",w=>g(this._create(w)))}}e.EditorMouseEventFactory=s;class o{constructor(n){this._editorViewDomNode=n}_create(n){return new i(n,!1,this._editorViewDomNode)}onPointerUp(n,g){return t.addDisposableListener(n,"pointerup",w=>{g(this._create(w))})}onPointerDown(n,g){return t.addDisposableListener(n,t.EventType.POINTER_DOWN,w=>{g(this._create(w),w.pointerId)})}onPointerLeave(n,g){return t.addDisposableListener(n,t.EventType.POINTER_LEAVE,w=>{g(this._create(w))})}onPointerMove(n,g){return t.addDisposableListener(n,"pointermove",w=>g(this._create(w)))}}e.EditorPointerEventFactory=o;class u extends T.Disposable{constructor(n){super(),this._editorViewDomNode=n,this._globalPointerMoveMonitor=this._register(new y.GlobalPointerMoveMonitor),this._keydownListener=null}startMonitoring(n,g,w,E,C){this._keydownListener=t.addStandardDisposableListener(document,"keydown",I=>{I.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,I.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(n,g,w,I=>{E(new i(I,!0,this._editorViewDomNode))},I=>{this._keydownListener.dispose(),C(I)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}e.GlobalEditorPointerMoveMonitor=u;class d{static{this._idPool=0}constructor(n){this._editor=n,this._instanceId=++d._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new D.RunOnceScheduler(()=>this.garbageCollect(),1e3)}createClassNameRef(n){const g=this.getOrCreateRule(n);return g.increaseRefCount(),{className:g.className,dispose:()=>{g.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(n){const g=this.computeUniqueKey(n);let w=this._rules.get(g);if(!w){const E=this._counter++;w=new p(g,`dyn-rule-${this._instanceId}-${E}`,t.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,n),this._rules.set(g,w)}return w}computeUniqueKey(n){return JSON.stringify(n)}garbageCollect(){for(const n of this._rules.values())n.hasReferences()||(this._rules.delete(n.key),n.dispose())}}e.DynamicCssRules=d;class p{constructor(n,g,w,E){this.key=n,this.className=g,this.properties=E,this._referenceCount=0,this._styleElement=t.createStyleSheet(w),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(n,g){let w=`.${n} {`;for(const E in g){const C=g[E];let I;typeof C=="object"?I=(0,f.asCssVariable)(C.id):I=C;const _=c(E);w+=` ${_}: ${I};`}return w+=` }`,w}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function c(l){return l.replace(/(^[A-Z])/,([n])=>n.toLowerCase()).replace(/([A-Z])/g,([n])=>`-${n.toLowerCase()}`)}}),define(Q[3312],Y([1,0,7,140,574,4,18,33,837,239,133,27,1070,1135,303,36,96,151,1855,137,202,1709]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Minimap=void 0;const l=140,n=2;class g{constructor(M,N,P){const x=M.options,F=x.get(140),V=x.get(142),W=V.minimap,z=x.get(49),B=x.get(71);this.renderMinimap=W.renderMinimap,this.size=B.size,this.minimapHeightIsEditorHeight=W.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=x.get(103),this.paddingTop=x.get(82).top,this.paddingBottom=x.get(82).bottom,this.showSlider=B.showSlider,this.autohide=B.autohide,this.pixelRatio=F,this.typicalHalfwidthCharacterWidth=z.typicalHalfwidthCharacterWidth,this.lineHeight=x.get(65),this.minimapLeft=W.minimapLeft,this.minimapWidth=W.minimapWidth,this.minimapHeight=V.height,this.canvasInnerWidth=W.minimapCanvasInnerWidth,this.canvasInnerHeight=W.minimapCanvasInnerHeight,this.canvasOuterWidth=W.minimapCanvasOuterWidth,this.canvasOuterHeight=W.minimapCanvasOuterHeight,this.isSampling=W.minimapIsSampling,this.editorHeight=V.height,this.fontScale=W.minimapScale,this.minimapLineHeight=W.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=(0,c.once)(()=>d.MinimapCharRendererFactory.create(this.fontScale,z.fontFamily)),this.defaultBackgroundColor=P.getColor(2),this.backgroundColor=g._getMinimapBackground(N,this.defaultBackgroundColor),this.foregroundAlpha=g._getMinimapForegroundOpacity(N)}static _getMinimapBackground(M,N){const P=M.getColor(s.minimapBackground);return P?new a.RGBA8(P.rgba.r,P.rgba.g,P.rgba.b,Math.round(255*P.rgba.a)):N}static _getMinimapForegroundOpacity(M){const N=M.getColor(s.minimapForegroundOpacity);return N?a.RGBA8._clamp(Math.round(255*N.rgba.a)):255}equals(M){return this.renderMinimap===M.renderMinimap&&this.size===M.size&&this.minimapHeightIsEditorHeight===M.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===M.scrollBeyondLastLine&&this.paddingTop===M.paddingTop&&this.paddingBottom===M.paddingBottom&&this.showSlider===M.showSlider&&this.autohide===M.autohide&&this.pixelRatio===M.pixelRatio&&this.typicalHalfwidthCharacterWidth===M.typicalHalfwidthCharacterWidth&&this.lineHeight===M.lineHeight&&this.minimapLeft===M.minimapLeft&&this.minimapWidth===M.minimapWidth&&this.minimapHeight===M.minimapHeight&&this.canvasInnerWidth===M.canvasInnerWidth&&this.canvasInnerHeight===M.canvasInnerHeight&&this.canvasOuterWidth===M.canvasOuterWidth&&this.canvasOuterHeight===M.canvasOuterHeight&&this.isSampling===M.isSampling&&this.editorHeight===M.editorHeight&&this.fontScale===M.fontScale&&this.minimapLineHeight===M.minimapLineHeight&&this.minimapCharWidth===M.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(M.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(M.backgroundColor)&&this.foregroundAlpha===M.foregroundAlpha}}class w{constructor(M,N,P,x,F,V,W,z,B){this.scrollTop=M,this.scrollHeight=N,this.sliderNeeded=P,this._computedSliderRatio=x,this.sliderTop=F,this.sliderHeight=V,this.topPaddingLineCount=W,this.startLineNumber=z,this.endLineNumber=B}getDesiredScrollTopFromDelta(M){return Math.round(this.scrollTop+M/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(M){return Math.round((M-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(M){const N=Math.max(this.startLineNumber,M.startLineNumber),P=Math.min(this.endLineNumber,M.endLineNumber);return N>P?null:[N,P]}getYForLineNumber(M,N){return+(M-this.startLineNumber+this.topPaddingLineCount)*N}static create(M,N,P,x,F,V,W,z,B,K,H){const U=M.pixelRatio,G=M.minimapLineHeight,$=Math.floor(M.canvasInnerHeight/G),ie=M.lineHeight;if(M.minimapHeightIsEditorHeight){let se=z*M.lineHeight+M.paddingTop+M.paddingBottom;M.scrollBeyondLastLine&&(se+=Math.max(0,F-M.lineHeight-M.paddingBottom));const re=Math.max(1,Math.floor(F*F/se)),oe=Math.max(0,M.minimapHeight-re),le=oe/(K-F),ne=B*le,ce=oe>0,ae=Math.floor(M.canvasInnerHeight/M.minimapLineHeight),ue=Math.floor(M.paddingTop/M.lineHeight);return new w(B,K,ce,le,ne,re,ue,1,Math.min(W,ae))}let J;if(V&&P!==W){const se=P-N+1;J=Math.floor(se*G/U)}else{const se=F/ie;J=Math.floor(se*G/U)}const j=Math.floor(M.paddingTop/ie);let ee=Math.floor(M.paddingBottom/ie);if(M.scrollBeyondLastLine){const se=F/ie;ee=Math.max(ee,se-1)}let X;if(ee>0){const se=F/ie;X=(j+W+ee-se-1)*G/U}else X=Math.max(0,(j+W)*G/U-J);X=Math.min(M.minimapHeight-J,X);const te=X/(K-F),Z=B*te;if($>=j+W+ee){const se=X>0;return new w(B,K,se,te,Z,J,j,1,W)}else{let se;N>1?se=N+j:se=Math.max(1,B/ie);let re,oe=Math.max(1,Math.floor(se-Z*U/G));oe<j?(re=j-oe+1,oe=1):(re=0,oe=Math.max(1,oe-j)),H&&H.scrollHeight===K&&(H.scrollTop>B&&(oe=Math.min(oe,H.startLineNumber),re=Math.max(re,H.topPaddingLineCount)),H.scrollTop<B&&(oe=Math.max(oe,H.startLineNumber),re=Math.min(re,H.topPaddingLineCount)));const le=Math.min(W,oe-re+$-1),ne=(B-x)/ie;let ce;return B>=M.paddingTop?ce=(N-oe+re+ne)*G/U:ce=B/M.paddingTop*(re+ne)*G/U,new w(B,K,!0,te,ce,J,re,oe,le)}}}class E{static{this.INVALID=new E(-1)}constructor(M){this.dy=M}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}class C{constructor(M,N,P){this.renderedLayout=M,this._imageData=N,this._renderedLines=new v.RenderedLinesCollection(()=>E.INVALID),this._renderedLines._set(M.startLineNumber,P)}linesEquals(M){if(!this.scrollEquals(M))return!1;const P=this._renderedLines._get().lines;for(let x=0,F=P.length;x<F;x++)if(P[x].dy===-1)return!1;return!0}scrollEquals(M){return this.renderedLayout.startLineNumber===M.startLineNumber&&this.renderedLayout.endLineNumber===M.endLineNumber}_get(){const M=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:M.rendLineNumberStart,lines:M.lines}}onLinesChanged(M,N){return this._renderedLines.onLinesChanged(M,N)}onLinesDeleted(M,N){this._renderedLines.onLinesDeleted(M,N)}onLinesInserted(M,N){this._renderedLines.onLinesInserted(M,N)}onTokensChanged(M){return this._renderedLines.onTokensChanged(M)}}class I{constructor(M,N,P,x){this._backgroundFillData=I._createBackgroundFillData(N,P,x),this._buffers=[M.createImageData(N,P),M.createImageData(N,P)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const M=this._buffers[this._lastUsedBuffer];return M.data.set(this._backgroundFillData),M}static _createBackgroundFillData(M,N,P){const x=P.r,F=P.g,V=P.b,W=P.a,z=new Uint8ClampedArray(M*N*4);let B=0;for(let K=0;K<N;K++)for(let H=0;H<M;H++)z[B]=x,z[B+1]=F,z[B+2]=V,z[B+3]=W,B+=4;return z}}class _{static compute(M,N,P){if(M.renderMinimap===0||!M.isSampling)return[null,[]];const{minimapLineCount:x}=S.EditorLayoutInfoComputer.computeContainedMinimapLineCount({viewLineCount:N,scrollBeyondLastLine:M.scrollBeyondLastLine,paddingTop:M.paddingTop,paddingBottom:M.paddingBottom,height:M.editorHeight,lineHeight:M.lineHeight,pixelRatio:M.pixelRatio}),F=N/x,V=F/2;if(!P||P.minimapLines.length===0){const J=[];if(J[0]=1,x>1){for(let j=0,ee=x-1;j<ee;j++)J[j]=Math.round(j*F+V);J[x-1]=N}return[new _(F,J),[]]}const W=P.minimapLines,z=W.length,B=[];let K=0,H=0,U=1;const G=10;let $=[],ie=null;for(let J=0;J<x;J++){const j=Math.max(U,Math.round(J*F)),ee=Math.max(j,Math.round((J+1)*F));for(;K<z&&W[K]<j;){if($.length<G){const te=K+1+H;ie&&ie.type==="deleted"&&ie._oldIndex===K-1?ie.deleteToLineNumber++:(ie={type:"deleted",_oldIndex:K,deleteFromLineNumber:te,deleteToLineNumber:te},$.push(ie)),H--}K++}let X;if(K<z&&W[K]<=ee)X=W[K],K++;else if(J===0?X=1:J+1===x?X=N:X=Math.round(J*F+V),$.length<G){const te=K+1+H;ie&&ie.type==="inserted"&&ie._i===J-1?ie.insertToLineNumber++:(ie={type:"inserted",_i:J,insertFromLineNumber:te,insertToLineNumber:te},$.push(ie)),H++}B[J]=X,U=X}if($.length<G)for(;K<z;){const J=K+1+H;ie&&ie.type==="deleted"&&ie._oldIndex===K-1?ie.deleteToLineNumber++:(ie={type:"deleted",_oldIndex:K,deleteFromLineNumber:J,deleteToLineNumber:J},$.push(ie)),H--,K++}else $=[{type:"flush"}];return[new _(F,B),$]}constructor(M,N){this.samplingRatio=M,this.minimapLines=N}modelLineToMinimapLine(M){return Math.min(this.minimapLines.length,Math.max(1,Math.round(M/this.samplingRatio)))}modelLineRangeToMinimapLineRange(M,N){let P=this.modelLineToMinimapLine(M)-1;for(;P>0&&this.minimapLines[P-1]>=M;)P--;let x=this.modelLineToMinimapLine(N)-1;for(;x+1<this.minimapLines.length&&this.minimapLines[x+1]<=N;)x++;if(P===x){const F=this.minimapLines[P];if(F<M||F>N)return null}return[P+1,x+1]}decorationLineRangeToMinimapLineRange(M,N){let P=this.modelLineToMinimapLine(M),x=this.modelLineToMinimapLine(N);return M!==N&&x===P&&(x===this.minimapLines.length?P>1&&P--:x++),[P,x]}onLinesDeleted(M){const N=M.toLineNumber-M.fromLineNumber+1;let P=this.minimapLines.length,x=0;for(let F=this.minimapLines.length-1;F>=0&&!(this.minimapLines[F]<M.fromLineNumber);F--)this.minimapLines[F]<=M.toLineNumber?(this.minimapLines[F]=Math.max(1,M.fromLineNumber-1),P=Math.min(P,F),x=Math.max(x,F)):this.minimapLines[F]-=N;return[P,x]}onLinesInserted(M){const N=M.toLineNumber-M.fromLineNumber+1;for(let P=this.minimapLines.length-1;P>=0&&!(this.minimapLines[P]<M.fromLineNumber);P--)this.minimapLines[P]+=N}}class A extends m.ViewPart{constructor(M){super(M),this.tokensColorTracker=r.MinimapTokensColorTracker.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new g(this._context.configuration,this._context.theme,this.tokensColorTracker);const[N]=_.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=N,this._shouldCheckSampling=!1,this._actual=new k(M.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const M=new g(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(M)?!1:(this.options=M,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(M){return this._onOptionsMaybeChanged()}onCursorStateChanged(M){return this._selections=M.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(M){return M.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(M){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(M){if(this._samplingState){const N=this._samplingState.modelLineRangeToMinimapLineRange(M.fromLineNumber,M.fromLineNumber+M.count-1);return N?this._actual.onLinesChanged(N[0],N[1]-N[0]+1):!1}else return this._actual.onLinesChanged(M.fromLineNumber,M.count)}onLinesDeleted(M){if(this._samplingState){const[N,P]=this._samplingState.onLinesDeleted(M);return N<=P&&this._actual.onLinesChanged(N+1,P-N+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(M.fromLineNumber,M.toLineNumber)}onLinesInserted(M){return this._samplingState?(this._samplingState.onLinesInserted(M),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(M.fromLineNumber,M.toLineNumber)}onScrollChanged(M){return this._actual.onScrollChanged()}onThemeChanged(M){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(M){if(this._samplingState){const N=[];for(const P of M.ranges){const x=this._samplingState.modelLineRangeToMinimapLineRange(P.fromLineNumber,P.toLineNumber);x&&N.push({fromLineNumber:x[0],toLineNumber:x[1]})}return N.length?this._actual.onTokensChanged(N):!1}else return this._actual.onTokensChanged(M.ranges)}onTokensColorsChanged(M){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(M){return this._actual.onZonesChanged()}prepareRender(M){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(M){let N=M.visibleRange.startLineNumber,P=M.visibleRange.endLineNumber;this._samplingState&&(N=this._samplingState.modelLineToMinimapLine(N),P=this._samplingState.modelLineToMinimapLine(P));const x={viewportContainsWhitespaceGaps:M.viewportData.whitespaceViewportData.length>0,scrollWidth:M.scrollWidth,scrollHeight:M.scrollHeight,viewportStartLineNumber:N,viewportEndLineNumber:P,viewportStartLineNumberVerticalOffset:M.getVerticalOffsetForLineNumber(N),scrollTop:M.scrollTop,scrollLeft:M.scrollLeft,viewportWidth:M.viewportWidth,viewportHeight:M.viewportHeight};this._actual.render(x)}_recreateLineSampling(){this._minimapSelections=null;const M=!!this._samplingState,[N,P]=_.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=N,M&&this._samplingState)for(const x of P)switch(x.type){case"deleted":this._actual.onLinesDeleted(x.deleteFromLineNumber,x.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(x.insertFromLineNumber,x.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(M){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[M-1]):this._context.viewModel.getLineContent(M)}getLineMaxColumn(M){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[M-1]):this._context.viewModel.getLineMaxColumn(M)}getMinimapLinesRenderingData(M,N,P){if(this._samplingState){const x=[];for(let F=0,V=N-M+1;F<V;F++)P[F]?x[F]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[M+F-1]):x[F]=null;return x}return this._context.viewModel.getMinimapLinesRenderingData(M,N,P).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const M of this._selections){const[N,P]=this._samplingState.decorationLineRangeToMinimapLineRange(M.startLineNumber,M.endLineNumber);this._minimapSelections.push(new o.Selection(N,M.startColumn,P,M.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(M,N){let P;if(this._samplingState){const F=this._samplingState.minimapLines[M-1],V=this._samplingState.minimapLines[N-1];P=new h.Range(F,1,V,this._context.viewModel.getLineMaxColumn(V))}else P=new h.Range(M,1,N,this._context.viewModel.getLineMaxColumn(N));const x=this._context.viewModel.getMinimapDecorationsInRange(P);if(this._samplingState){const F=[];for(const V of x){if(!V.options.minimap)continue;const W=V.range,z=this._samplingState.modelLineToMinimapLine(W.startLineNumber),B=this._samplingState.modelLineToMinimapLine(W.endLineNumber);F.push(new i.ViewModelDecoration(new h.Range(z,W.startColumn,B,W.endColumn),V.options))}return F}return x}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(M){this._samplingState&&(M=this._samplingState.minimapLines[M-1]),this._context.viewModel.revealRange("mouse",!1,new h.Range(M,1,M,1),1,0)}setScrollTop(M){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:M},1)}}e.Minimap=A;class k extends D.Disposable{constructor(M,N){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=M,this._model=N,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(s.minimapSelection),this._domNode=(0,y.createFastDomNode)(document.createElement("div")),m.PartFingerprints.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,y.createFastDomNode)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,y.createFastDomNode)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,y.createFastDomNode)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,y.createFastDomNode)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,y.createFastDomNode)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=t.addStandardDisposableListener(this._domNode.domNode,t.EventType.POINTER_DOWN,P=>{if(P.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(P.button===0&&this._lastRenderData){const B=t.getDomNodePagePosition(this._slider.domNode),K=B.top+B.height/2;this._startSliderDragging(P,K,this._lastRenderData.renderedLayout)}return}const F=this._model.options.minimapLineHeight,V=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*P.offsetY;let z=Math.floor(V/F)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;z=Math.min(z,this._model.getLineCount()),this._model.revealLineNumber(z)}),this._sliderPointerMoveMonitor=new b.GlobalPointerMoveMonitor,this._sliderPointerDownListener=t.addStandardDisposableListener(this._slider.domNode,t.EventType.POINTER_DOWN,P=>{P.preventDefault(),P.stopPropagation(),P.button===0&&this._lastRenderData&&this._startSliderDragging(P,P.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=u.Gesture.addTarget(this._domNode.domNode),this._sliderTouchStartListener=t.addDisposableListener(this._domNode.domNode,u.EventType.Start,P=>{P.preventDefault(),P.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(P))},{passive:!1}),this._sliderTouchMoveListener=t.addDisposableListener(this._domNode.domNode,u.EventType.Change,P=>{P.preventDefault(),P.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(P)},{passive:!1}),this._sliderTouchEndListener=t.addStandardDisposableListener(this._domNode.domNode,u.EventType.End,P=>{P.preventDefault(),P.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(M,N,P){if(!M.target||!(M.target instanceof Element))return;const x=M.pageX;this._slider.toggleClassName("active",!0);const F=(V,W)=>{const z=t.getDomNodePagePosition(this._domNode.domNode),B=Math.min(Math.abs(W-x),Math.abs(W-z.left),Math.abs(W-z.left-z.width));if(T.isWindows&&B>l){this._model.setScrollTop(P.scrollTop);return}const K=V-N;this._model.setScrollTop(P.getDesiredScrollTopFromDelta(K))};M.pageY!==N&&F(M.pageY,x),this._sliderPointerMoveMonitor.startMonitoring(M.target,M.pointerId,M.buttons,V=>F(V.pageY,V.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(M){const N=this._domNode.domNode.getBoundingClientRect().top,P=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(M.pageY-N);this._model.setScrollTop(P)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const M=["minimap"];return this._model.options.showSlider==="always"?M.push("slider-always"):M.push("slider-mouseover"),this._model.options.autohide&&M.push("autohide"),M.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new I(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(M,N){return this._lastRenderData?this._lastRenderData.onLinesChanged(M,N):!1}onLinesDeleted(M,N){return this._lastRenderData?.onLinesDeleted(M,N),!0}onLinesInserted(M,N){return this._lastRenderData?.onLinesInserted(M,N),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(s.minimapSelection),this._renderDecorations=!0,!0}onTokensChanged(M){return this._lastRenderData?this._lastRenderData.onTokensChanged(M):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(M){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}M.scrollLeft+M.viewportWidth>=M.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const P=w.create(this._model.options,M.viewportStartLineNumber,M.viewportEndLineNumber,M.viewportStartLineNumberVerticalOffset,M.viewportHeight,M.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),M.scrollTop,M.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(P.sliderNeeded?"block":"none"),this._slider.setTop(P.sliderTop),this._slider.setHeight(P.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(P.sliderHeight),this.renderDecorations(P),this._lastRenderData=this.renderLines(P)}renderDecorations(M){if(this._renderDecorations){this._renderDecorations=!1;const N=this._model.getSelections();N.sort(h.Range.compareRangesUsingStarts);const P=this._model.getMinimapDecorationsInViewport(M.startLineNumber,M.endLineNumber);P.sort((U,G)=>(U.options.zIndex||0)-(G.options.zIndex||0));const{canvasInnerWidth:x,canvasInnerHeight:F}=this._model.options,V=this._model.options.minimapLineHeight,W=this._model.options.minimapCharWidth,z=this._model.getOptions().tabSize,B=this._decorationsCanvas.domNode.getContext("2d");B.clearRect(0,0,x,F);const K=new L(M.startLineNumber,M.endLineNumber,!1);this._renderSelectionLineHighlights(B,N,K,M,V),this._renderDecorationsLineHighlights(B,P,K,M,V);const H=new L(M.startLineNumber,M.endLineNumber,null);this._renderSelectionsHighlights(B,N,H,M,V,z,W,x),this._renderDecorationsHighlights(B,P,H,M,V,z,W,x)}}_renderSelectionLineHighlights(M,N,P,x,F){if(!this._selectionColor||this._selectionColor.isTransparent())return;M.fillStyle=this._selectionColor.transparent(.5).toString();let V=0,W=0;for(const z of N){const B=x.intersectWithViewport(z);if(!B)continue;const[K,H]=B;for(let $=K;$<=H;$++)P.set($,!0);const U=x.getYForLineNumber(K,F),G=x.getYForLineNumber(H,F);W>=U||(W>V&&M.fillRect(S.MINIMAP_GUTTER_WIDTH,V,M.canvas.width,W-V),V=U),W=G}W>V&&M.fillRect(S.MINIMAP_GUTTER_WIDTH,V,M.canvas.width,W-V)}_renderDecorationsLineHighlights(M,N,P,x,F){const V=new Map;for(let W=N.length-1;W>=0;W--){const z=N[W],B=z.options.minimap;if(!B||B.position!==p.MinimapPosition.Inline)continue;const K=x.intersectWithViewport(z.range);if(!K)continue;const[H,U]=K,G=B.getColor(this._theme.value);if(!G||G.isTransparent())continue;let $=V.get(G.toString());$||($=G.transparent(.5).toString(),V.set(G.toString(),$)),M.fillStyle=$;for(let ie=H;ie<=U;ie++){if(P.has(ie))continue;P.set(ie,!0);const J=x.getYForLineNumber(H,F);M.fillRect(S.MINIMAP_GUTTER_WIDTH,J,M.canvas.width,F)}}}_renderSelectionsHighlights(M,N,P,x,F,V,W,z){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const B of N){const K=x.intersectWithViewport(B);if(!K)continue;const[H,U]=K;for(let G=H;G<=U;G++)this.renderDecorationOnLine(M,P,B,this._selectionColor,x,G,F,F,V,W,z)}}_renderDecorationsHighlights(M,N,P,x,F,V,W,z){for(const B of N){const K=B.options.minimap;if(!K)continue;const H=x.intersectWithViewport(B.range);if(!H)continue;const[U,G]=H,$=K.getColor(this._theme.value);if(!(!$||$.isTransparent()))for(let ie=U;ie<=G;ie++)switch(K.position){case p.MinimapPosition.Inline:this.renderDecorationOnLine(M,P,B.range,$,x,ie,F,F,V,W,z);continue;case p.MinimapPosition.Gutter:{const J=x.getYForLineNumber(ie,F),j=2;this.renderDecoration(M,$,j,J,n,F);continue}}}}renderDecorationOnLine(M,N,P,x,F,V,W,z,B,K,H){const U=F.getYForLineNumber(V,z);if(U+W<0||U>this._model.options.canvasInnerHeight)return;const{startLineNumber:G,endLineNumber:$}=P,ie=G===V?P.startColumn:1,J=$===V?P.endColumn:this._model.getLineMaxColumn(V),j=this.getXOffsetForPosition(N,V,ie,B,K,H),ee=this.getXOffsetForPosition(N,V,J,B,K,H);this.renderDecoration(M,x,j,U,ee-j,W)}getXOffsetForPosition(M,N,P,x,F,V){if(P===1)return S.MINIMAP_GUTTER_WIDTH;if((P-1)*F>=V)return V;let z=M.get(N);if(!z){const B=this._model.getLineContent(N);z=[S.MINIMAP_GUTTER_WIDTH];let K=S.MINIMAP_GUTTER_WIDTH;for(let H=1;H<B.length+1;H++){const U=B.charCodeAt(H-1),G=U===9?x*F:f.isFullWidthCharacter(U)?2*F:F,$=K+G;if($>=V){z[H]=V;break}z[H]=$,K=$}M.set(N,z)}return P-1<z.length?z[P-1]:V}renderDecoration(M,N,P,x,F,V){M.fillStyle=N&&N.toString()||"",M.fillRect(P,x,F,V)}renderLines(M){const N=M.startLineNumber,P=M.endLineNumber,x=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(M)){const ge=this._lastRenderData._get();return new C(M,ge.imageData,ge.lines)}const F=this._getBuffer();if(!F)return null;const[V,W,z]=k._renderUntouchedLines(F,M.topPaddingLineCount,N,P,x,this._lastRenderData),B=this._model.getMinimapLinesRenderingData(N,P,z),K=this._model.getOptions().tabSize,H=this._model.options.defaultBackgroundColor,U=this._model.options.backgroundColor,G=this._model.options.foregroundAlpha,$=this._model.tokensColorTracker,ie=$.backgroundIsLight(),J=this._model.options.renderMinimap,j=this._model.options.charRenderer(),ee=this._model.options.fontScale,X=this._model.options.minimapCharWidth,Z=(J===1?2:2+1)*ee,se=x>Z?Math.floor((x-Z)/2):0,re=U.a/255,oe=new a.RGBA8(Math.round((U.r-H.r)*re+H.r),Math.round((U.g-H.g)*re+H.g),Math.round((U.b-H.b)*re+H.b),255);let le=M.topPaddingLineCount*x;const ne=[];for(let ge=0,he=P-N+1;ge<he;ge++)z[ge]&&k._renderLine(F,oe,U.a,ie,J,X,$,G,j,le,se,K,B[ge],ee,x),ne[ge]=new E(le),le+=x;const ce=V===-1?0:V,ue=(W===-1?F.height:W)-ce;return this._canvas.domNode.getContext("2d").putImageData(F,0,0,0,ce,F.width,ue),new C(M,F,ne)}static _renderUntouchedLines(M,N,P,x,F,V){const W=[];if(!V){for(let le=0,ne=x-P+1;le<ne;le++)W[le]=!0;return[-1,-1,W]}const z=V._get(),B=z.imageData.data,K=z.rendLineNumberStart,H=z.lines,U=H.length,G=M.width,$=M.data,ie=(x-P+1)*F*G*4;let J=-1,j=-1,ee=-1,X=-1,te=-1,Z=-1,se=N*F;for(let le=P;le<=x;le++){const ne=le-P,ce=le-K,ae=ce>=0&&ce<U?H[ce].dy:-1;if(ae===-1){W[ne]=!0,se+=F;continue}const ue=ae*G*4,de=(ae+F)*G*4,ge=se*G*4,he=(se+F)*G*4;X===ue&&Z===ge?(X=de,Z=he):(ee!==-1&&($.set(B.subarray(ee,X),te),J===-1&&ee===0&&ee===te&&(J=X),j===-1&&X===ie&&ee===te&&(j=ee)),ee=ue,X=de,te=ge,Z=he),W[ne]=!1,se+=F}ee!==-1&&($.set(B.subarray(ee,X),te),J===-1&&ee===0&&ee===te&&(J=X),j===-1&&X===ie&&ee===te&&(j=ee));const re=J===-1?-1:J/(G*4),oe=j===-1?-1:j/(G*4);return[re,oe,W]}static _renderLine(M,N,P,x,F,V,W,z,B,K,H,U,G,$,ie){const J=G.content,j=G.tokens,ee=M.width-V,X=ie===1;let te=S.MINIMAP_GUTTER_WIDTH,Z=0,se=0;for(let re=0,oe=j.getCount();re<oe;re++){const le=j.getEndOffset(re),ne=j.getForeground(re),ce=W.getColor(ne);for(;Z<le;Z++){if(te>ee)return;const ae=J.charCodeAt(Z);if(ae===9){const ue=U-(Z+se)%U;se+=ue-1,te+=ue*V}else if(ae===32)te+=V;else{const ue=f.isFullWidthCharacter(ae)?2:1;for(let de=0;de<ue;de++)if(F===2?B.blockRenderChar(M,te,K+H,ce,z,N,P,X):B.renderChar(M,te,K+H,ae,ce,z,N,P,$,x,X),te+=V,te>ee)return}}}}}class L{constructor(M,N,P){this._startLineNumber=M,this._endLineNumber=N,this._defaultValue=P,this._values=[];for(let x=0,F=this._endLineNumber-this._startLineNumber+1;x<F;x++)this._values[x]=P}has(M){return this.get(M)!==this._defaultValue}set(M,N){M<this._startLineNumber||M>this._endLineNumber||(this._values[M-this._startLineNumber]=N)}get(M){return M<this._startLineNumber||M>this._endLineNumber?this._defaultValue:this._values[M-this._startLineNumber]}}}),define(Q[3313],Y([1,0,2335,36]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.diffMoveBorderActive=e.diffMoveBorder=void 0,e.diffMoveBorder=(0,y.registerColor)("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},(0,t.localize)(0,null)),e.diffMoveBorderActive=(0,y.registerColor)("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},(0,t.localize)(1,null))}),define(Q[886],Y([1,0,2434,36,1747]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SYMBOL_ICON_VARIABLE_FOREGROUND=e.SYMBOL_ICON_UNIT_FOREGROUND=e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=e.SYMBOL_ICON_TEXT_FOREGROUND=e.SYMBOL_ICON_STRUCT_FOREGROUND=e.SYMBOL_ICON_STRING_FOREGROUND=e.SYMBOL_ICON_SNIPPET_FOREGROUND=e.SYMBOL_ICON_REFERENCE_FOREGROUND=e.SYMBOL_ICON_PROPERTY_FOREGROUND=e.SYMBOL_ICON_PACKAGE_FOREGROUND=e.SYMBOL_ICON_OPERATOR_FOREGROUND=e.SYMBOL_ICON_OBJECT_FOREGROUND=e.SYMBOL_ICON_NUMBER_FOREGROUND=e.SYMBOL_ICON_NULL_FOREGROUND=e.SYMBOL_ICON_NAMESPACE_FOREGROUND=e.SYMBOL_ICON_MODULE_FOREGROUND=e.SYMBOL_ICON_METHOD_FOREGROUND=e.SYMBOL_ICON_KEYWORD_FOREGROUND=e.SYMBOL_ICON_KEY_FOREGROUND=e.SYMBOL_ICON_INTERFACE_FOREGROUND=e.SYMBOL_ICON_FUNCTION_FOREGROUND=e.SYMBOL_ICON_FOLDER_FOREGROUND=e.SYMBOL_ICON_FILE_FOREGROUND=e.SYMBOL_ICON_FIELD_FOREGROUND=e.SYMBOL_ICON_EVENT_FOREGROUND=e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=e.SYMBOL_ICON_CONSTANT_FOREGROUND=e.SYMBOL_ICON_COLOR_FOREGROUND=e.SYMBOL_ICON_CLASS_FOREGROUND=e.SYMBOL_ICON_BOOLEAN_FOREGROUND=e.SYMBOL_ICON_ARRAY_FOREGROUND=void 0,e.SYMBOL_ICON_ARRAY_FOREGROUND=(0,y.registerColor)("symbolIcon.arrayForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(0,null)),e.SYMBOL_ICON_BOOLEAN_FOREGROUND=(0,y.registerColor)("symbolIcon.booleanForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(1,null)),e.SYMBOL_ICON_CLASS_FOREGROUND=(0,y.registerColor)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,t.localize)(2,null)),e.SYMBOL_ICON_COLOR_FOREGROUND=(0,y.registerColor)("symbolIcon.colorForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(3,null)),e.SYMBOL_ICON_CONSTANT_FOREGROUND=(0,y.registerColor)("symbolIcon.constantForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(4,null)),e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=(0,y.registerColor)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,t.localize)(5,null)),e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=(0,y.registerColor)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,t.localize)(6,null)),e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=(0,y.registerColor)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,t.localize)(7,null)),e.SYMBOL_ICON_EVENT_FOREGROUND=(0,y.registerColor)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,t.localize)(8,null)),e.SYMBOL_ICON_FIELD_FOREGROUND=(0,y.registerColor)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,t.localize)(9,null)),e.SYMBOL_ICON_FILE_FOREGROUND=(0,y.registerColor)("symbolIcon.fileForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(10,null)),e.SYMBOL_ICON_FOLDER_FOREGROUND=(0,y.registerColor)("symbolIcon.folderForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(11,null)),e.SYMBOL_ICON_FUNCTION_FOREGROUND=(0,y.registerColor)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,t.localize)(12,null)),e.SYMBOL_ICON_INTERFACE_FOREGROUND=(0,y.registerColor)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,t.localize)(13,null)),e.SYMBOL_ICON_KEY_FOREGROUND=(0,y.registerColor)("symbolIcon.keyForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(14,null)),e.SYMBOL_ICON_KEYWORD_FOREGROUND=(0,y.registerColor)("symbolIcon.keywordForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(15,null)),e.SYMBOL_ICON_METHOD_FOREGROUND=(0,y.registerColor)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,t.localize)(16,null)),e.SYMBOL_ICON_MODULE_FOREGROUND=(0,y.registerColor)("symbolIcon.moduleForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(17,null)),e.SYMBOL_ICON_NAMESPACE_FOREGROUND=(0,y.registerColor)("symbolIcon.namespaceForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(18,null)),e.SYMBOL_ICON_NULL_FOREGROUND=(0,y.registerColor)("symbolIcon.nullForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(19,null)),e.SYMBOL_ICON_NUMBER_FOREGROUND=(0,y.registerColor)("symbolIcon.numberForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(20,null)),e.SYMBOL_ICON_OBJECT_FOREGROUND=(0,y.registerColor)("symbolIcon.objectForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(21,null)),e.SYMBOL_ICON_OPERATOR_FOREGROUND=(0,y.registerColor)("symbolIcon.operatorForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(22,null)),e.SYMBOL_ICON_PACKAGE_FOREGROUND=(0,y.registerColor)("symbolIcon.packageForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(23,null)),e.SYMBOL_ICON_PROPERTY_FOREGROUND=(0,y.registerColor)("symbolIcon.propertyForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(24,null)),e.SYMBOL_ICON_REFERENCE_FOREGROUND=(0,y.registerColor)("symbolIcon.referenceForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(25,null)),e.SYMBOL_ICON_SNIPPET_FOREGROUND=(0,y.registerColor)("symbolIcon.snippetForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(26,null)),e.SYMBOL_ICON_STRING_FOREGROUND=(0,y.registerColor)("symbolIcon.stringForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(27,null)),e.SYMBOL_ICON_STRUCT_FOREGROUND=(0,y.registerColor)("symbolIcon.structForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(28,null)),e.SYMBOL_ICON_TEXT_FOREGROUND=(0,y.registerColor)("symbolIcon.textForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(29,null)),e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=(0,y.registerColor)("symbolIcon.typeParameterForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(30,null)),e.SYMBOL_ICON_UNIT_FOREGROUND=(0,y.registerColor)("symbolIcon.unitForeground",{dark:y.foreground,light:y.foreground,hcDark:y.foreground,hcLight:y.foreground},(0,t.localize)(31,null)),e.SYMBOL_ICON_VARIABLE_FOREGROUND=(0,y.registerColor)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,t.localize)(32,null))}),define(Q[3314],Y([1,0,32,259,2369,791,886]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMenuItems=void 0;const D=Object.freeze({kind:y.CodeActionKind.Empty,title:(0,b.localize)(0,null)}),T=Object.freeze([{kind:y.CodeActionKind.QuickFix,title:(0,b.localize)(1,null)},{kind:y.CodeActionKind.RefactorExtract,title:(0,b.localize)(2,null),icon:t.Codicon.wrench},{kind:y.CodeActionKind.RefactorInline,title:(0,b.localize)(3,null),icon:t.Codicon.wrench},{kind:y.CodeActionKind.RefactorRewrite,title:(0,b.localize)(4,null),icon:t.Codicon.wrench},{kind:y.CodeActionKind.RefactorMove,title:(0,b.localize)(5,null),icon:t.Codicon.wrench},{kind:y.CodeActionKind.SurroundWith,title:(0,b.localize)(6,null),icon:t.Codicon.symbolSnippet},{kind:y.CodeActionKind.Source,title:(0,b.localize)(7,null),icon:t.Codicon.symbolFile},D]);function f(v,m,S){if(!m)return v.map(r=>({kind:"action",item:r,group:D,disabled:!!r.action.disabled,label:r.action.disabled||r.action.title}));const h=T.map(r=>({group:r,actions:[]}));for(const r of v){const i=r.action.kind?new y.CodeActionKind(r.action.kind):y.CodeActionKind.None;for(const s of h)if(s.group.kind.contains(i)){s.actions.push(r);break}}const a=[];for(const r of h)if(r.actions.length){a.push({kind:"header",group:r.group});for(const i of r.actions)a.push({kind:"action",item:i,group:r.group,label:i.action.title,disabled:!!i.action.disabled,keybinding:S(i.action)})}return a}e.toMenuItems=f}),define(Q[54],Y([1,0,36,80,515]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMenuStyles=e.defaultMenuStyles=e.getSelectBoxStyles=e.defaultSelectBoxStyles=e.getListStyles=e.defaultListStyles=e.getBreadcrumbsWidgetStyles=e.defaultBreadcrumbsWidgetStyles=e.getCountBadgeStyle=e.defaultCountBadgeStyles=e.defaultFindWidgetStyles=e.getInputBoxStyle=e.defaultInputBoxStyles=e.getDialogStyle=e.defaultDialogStyles=e.getCheckboxStyles=e.defaultCheckboxStyles=e.getToggleStyles=e.defaultToggleStyles=e.getProgressBarStyles=e.defaultProgressBarStyles=e.getButtonStyles=e.defaultButtonStyles=e.getKeybindingLabelStyles=e.defaultKeybindingLabelStyles=e.overrideStyles=void 0;function D(d,p){const c={...p};for(const l in d){const n=d[l];c[l]=n!==void 0?(0,t.asCssVariable)(n):void 0}return c}e.overrideStyles=D,e.defaultKeybindingLabelStyles={keybindingLabelBackground:(0,t.asCssVariable)(t.keybindingLabelBackground),keybindingLabelForeground:(0,t.asCssVariable)(t.keybindingLabelForeground),keybindingLabelBorder:(0,t.asCssVariable)(t.keybindingLabelBorder),keybindingLabelBottomBorder:(0,t.asCssVariable)(t.keybindingLabelBottomBorder),keybindingLabelShadow:(0,t.asCssVariable)(t.widgetShadow)};function T(d){return D(d,e.defaultKeybindingLabelStyles)}e.getKeybindingLabelStyles=T,e.defaultButtonStyles={buttonForeground:(0,t.asCssVariable)(t.buttonForeground),buttonSeparator:(0,t.asCssVariable)(t.buttonSeparator),buttonBackground:(0,t.asCssVariable)(t.buttonBackground),buttonHoverBackground:(0,t.asCssVariable)(t.buttonHoverBackground),buttonSecondaryForeground:(0,t.asCssVariable)(t.buttonSecondaryForeground),buttonSecondaryBackground:(0,t.asCssVariable)(t.buttonSecondaryBackground),buttonSecondaryHoverBackground:(0,t.asCssVariable)(t.buttonSecondaryHoverBackground),buttonBorder:(0,t.asCssVariable)(t.buttonBorder),buttonSecondaryBorder:(0,t.asCssVariable)(t.buttonSecondaryBorder),buttonDisabledBackground:(0,t.asCssVariable)(t.buttonDisabledBackground),buttonDisabledForeground:(0,t.asCssVariable)(t.buttonDisabledForeground),buttonDisabledBorder:(0,t.asCssVariable)(t.buttonDisabledBorder)};function f(d){return D(d,e.defaultButtonStyles)}e.getButtonStyles=f,e.defaultProgressBarStyles={progressBarBackground:(0,t.asCssVariable)(t.progressBarBackground)};function v(d){return D(d,e.defaultProgressBarStyles)}e.getProgressBarStyles=v,e.defaultToggleStyles={inputActiveOptionBorder:(0,t.asCssVariable)(t.inputActiveOptionBorder),inputActiveOptionForeground:(0,t.asCssVariable)(t.inputActiveOptionForeground),inputActiveOptionBackground:(0,t.asCssVariable)(t.inputActiveOptionBackground)};function m(d){return D(d,e.defaultToggleStyles)}e.getToggleStyles=m,e.defaultCheckboxStyles={checkboxBackground:(0,t.asCssVariable)(t.checkboxBackground),checkboxBorder:(0,t.asCssVariable)(t.checkboxBorder),checkboxForeground:(0,t.asCssVariable)(t.checkboxForeground)};function S(d){return D(d,e.defaultCheckboxStyles)}e.getCheckboxStyles=S,e.defaultDialogStyles={dialogBackground:(0,t.asCssVariable)(t.editorWidgetBackground),dialogForeground:(0,t.asCssVariable)(t.editorWidgetForeground),dialogShadow:(0,t.asCssVariable)(t.widgetShadow),dialogBorder:(0,t.asCssVariable)(t.contrastBorder),errorIconForeground:(0,t.asCssVariable)(t.problemsErrorIconForeground),warningIconForeground:(0,t.asCssVariable)(t.problemsWarningIconForeground),infoIconForeground:(0,t.asCssVariable)(t.problemsInfoIconForeground),textLinkForeground:(0,t.asCssVariable)(t.textLinkForeground)};function h(d){return D(d,e.defaultDialogStyles)}e.getDialogStyle=h,e.defaultInputBoxStyles={inputBackground:(0,t.asCssVariable)(t.inputBackground),inputForeground:(0,t.asCssVariable)(t.inputForeground),inputBorder:(0,t.asCssVariable)(t.inputBorder),inputValidationInfoBorder:(0,t.asCssVariable)(t.inputValidationInfoBorder),inputValidationInfoBackground:(0,t.asCssVariable)(t.inputValidationInfoBackground),inputValidationInfoForeground:(0,t.asCssVariable)(t.inputValidationInfoForeground),inputValidationWarningBorder:(0,t.asCssVariable)(t.inputValidationWarningBorder),inputValidationWarningBackground:(0,t.asCssVariable)(t.inputValidationWarningBackground),inputValidationWarningForeground:(0,t.asCssVariable)(t.inputValidationWarningForeground),inputValidationErrorBorder:(0,t.asCssVariable)(t.inputValidationErrorBorder),inputValidationErrorBackground:(0,t.asCssVariable)(t.inputValidationErrorBackground),inputValidationErrorForeground:(0,t.asCssVariable)(t.inputValidationErrorForeground),disabledInputBackground:(0,t.asCssVariable)(b.disabledInputBackground),disabledInputForeground:(0,t.asCssVariable)(b.disabledInputForeground),disabledInputBorder:"transparent"};function a(d){return D(d,e.defaultInputBoxStyles)}e.getInputBoxStyle=a,e.defaultFindWidgetStyles={listFilterWidgetBackground:(0,t.asCssVariable)(t.listFilterWidgetBackground),listFilterWidgetOutline:(0,t.asCssVariable)(t.listFilterWidgetOutline),listFilterWidgetNoMatchesOutline:(0,t.asCssVariable)(t.listFilterWidgetNoMatchesOutline),listFilterWidgetShadow:(0,t.asCssVariable)(t.listFilterWidgetShadow),inputBoxStyles:e.defaultInputBoxStyles,toggleStyles:e.defaultToggleStyles},e.defaultCountBadgeStyles={badgeBackground:(0,t.asCssVariable)(t.badgeBackground),badgeForeground:(0,t.asCssVariable)(t.badgeForeground),badgeBorder:(0,t.asCssVariable)(t.contrastBorder)};function r(d){return D(d,e.defaultCountBadgeStyles)}e.getCountBadgeStyle=r,e.defaultBreadcrumbsWidgetStyles={breadcrumbsBackground:(0,t.asCssVariable)(t.breadcrumbsBackground),breadcrumbsForeground:(0,t.asCssVariable)(t.breadcrumbsForeground),breadcrumbsHoverForeground:(0,t.asCssVariable)(t.breadcrumbsFocusForeground),breadcrumbsFocusForeground:(0,t.asCssVariable)(t.breadcrumbsFocusForeground),breadcrumbsFocusAndSelectionForeground:(0,t.asCssVariable)(t.breadcrumbsActiveSelectionForeground)};function i(d){return D(d,e.defaultBreadcrumbsWidgetStyles)}e.getBreadcrumbsWidgetStyles=i,e.defaultListStyles={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:(0,t.asCssVariable)(t.listFocusBackground),listFocusForeground:(0,t.asCssVariable)(t.listFocusForeground),listFocusOutline:(0,t.asCssVariable)(t.listFocusOutline),listActiveSelectionBackground:(0,t.asCssVariable)(t.listActiveSelectionBackground),listActiveSelectionForeground:(0,t.asCssVariable)(t.listActiveSelectionForeground),listActiveSelectionIconForeground:(0,t.asCssVariable)(t.listActiveSelectionIconForeground),listFocusAndSelectionOutline:(0,t.asCssVariable)(t.listFocusAndSelectionOutline),listFocusAndSelectionBackground:(0,t.asCssVariable)(t.listActiveSelectionBackground),listFocusAndSelectionForeground:(0,t.asCssVariable)(t.listActiveSelectionForeground),listInactiveSelectionBackground:(0,t.asCssVariable)(t.listInactiveSelectionBackground),listInactiveSelectionIconForeground:(0,t.asCssVariable)(t.listInactiveSelectionIconForeground),listInactiveSelectionForeground:(0,t.asCssVariable)(t.listInactiveSelectionForeground),listInactiveFocusBackground:(0,t.asCssVariable)(t.listInactiveFocusBackground),listInactiveFocusOutline:(0,t.asCssVariable)(t.listInactiveFocusOutline),listHoverBackground:(0,t.asCssVariable)(t.listHoverBackground),listHoverForeground:(0,t.asCssVariable)(t.listHoverForeground),listDropBackground:(0,t.asCssVariable)(t.listDropBackground),listSelectionOutline:(0,t.asCssVariable)(t.activeContrastBorder),listHoverOutline:(0,t.asCssVariable)(t.activeContrastBorder),treeIndentGuidesStroke:(0,t.asCssVariable)(t.treeIndentGuidesStroke),treeInactiveIndentGuidesStroke:(0,t.asCssVariable)(t.treeInactiveIndentGuidesStroke),tableColumnsBorder:(0,t.asCssVariable)(t.tableColumnsBorder),tableOddRowsBackgroundColor:(0,t.asCssVariable)(t.tableOddRowsBackgroundColor)};function s(d){return D(d,e.defaultListStyles)}e.getListStyles=s,e.defaultSelectBoxStyles={selectBackground:(0,t.asCssVariable)(t.selectBackground),selectListBackground:(0,t.asCssVariable)(t.selectListBackground),selectForeground:(0,t.asCssVariable)(t.selectForeground),decoratorRightForeground:(0,t.asCssVariable)(t.pickerGroupForeground),selectBorder:(0,t.asCssVariable)(t.selectBorder),focusBorder:(0,t.asCssVariable)(t.focusBorder),listFocusBackground:(0,t.asCssVariable)(t.quickInputListFocusBackground),listInactiveSelectionIconForeground:(0,t.asCssVariable)(t.quickInputListFocusIconForeground),listFocusForeground:(0,t.asCssVariable)(t.quickInputListFocusForeground),listFocusOutline:(0,t.asCssVariableWithDefault)(t.activeContrastBorder,y.Color.transparent.toString()),listHoverBackground:(0,t.asCssVariable)(t.listHoverBackground),listHoverForeground:(0,t.asCssVariable)(t.listHoverForeground),listHoverOutline:(0,t.asCssVariable)(t.activeContrastBorder),selectListBorder:(0,t.asCssVariable)(t.editorWidgetBorder),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0};function o(d){return D(d,e.defaultSelectBoxStyles)}e.getSelectBoxStyles=o,e.defaultMenuStyles={shadowColor:(0,t.asCssVariable)(t.widgetShadow),borderColor:(0,t.asCssVariable)(t.menuBorder),foregroundColor:(0,t.asCssVariable)(t.menuForeground),backgroundColor:(0,t.asCssVariable)(t.menuBackground),selectionForegroundColor:(0,t.asCssVariable)(t.menuSelectionForeground),selectionBackgroundColor:(0,t.asCssVariable)(t.menuSelectionBackground),selectionBorderColor:(0,t.asCssVariable)(t.menuSelectionBorder),separatorColor:(0,t.asCssVariable)(t.menuSeparatorBackground),scrollbarShadow:(0,t.asCssVariable)(t.scrollbarShadow),scrollbarSliderBackground:(0,t.asCssVariable)(t.scrollbarSliderBackground),scrollbarSliderHoverBackground:(0,t.asCssVariable)(t.scrollbarSliderHoverBackground),scrollbarSliderActiveBackground:(0,t.asCssVariable)(t.scrollbarSliderActiveBackground)};function u(d){return D(d,e.defaultMenuStyles)}e.getMenuStyles=u}),define(Q[1199],Y([1,0,166,199,105,7,448,4,54]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TableCellEditorFactory=void 0;const m=Object.fromEntries(Object.entries(b.EVENT_KEY_CODE_MAP).map(([h,a])=>[a,Number(h)]));class S{constructor(a,r){this._contextViewProvider=r,this._options={valueGetter:a.valueGetter??function(i,s){return i[s.field]},valueSetter:a.valueSetter??async function(i,s,o,u,d){o[u.field]=d},optionsGetter:a.optionsGetter??function(i,s){return[]},inputBoxStyles:a.inputBoxStyles,editableDropdownStyles:a.editableDropdownStyles,selectBoxStyles:a.selectBoxStyles}}getTextEditorClass(a,r="text",i){const s=this;class o extends f.Disposable{constructor(d){super(),this._args=d,this.init();const p=[14,13,16,18,15,17];this._keyCaptureList=p.map(c=>m[c])}get keyCaptureList(){return this._keyCaptureList}init(){this._input=this._register(new t.InputBox(this._args.container,s._contextViewProvider,{type:r,inputBoxStyles:v.defaultInputBoxStyles})),this._input.element.style.height="100%",this._input.focus(),this._register(this._input.onLoseFocus(async()=>{await this.commitEdit()})),this._register(this._input),this._input.value=i??""}async commitEdit(){if(this.isValueChanged()){const d=this._args.grid.getDataItem(this._args.grid.getActiveCell().row);await this.applyValue(d,this._input.value),this._originalValue=this._input.value}}destroy(){this.dispose()}focus(){this._input.focus()}loadValue(d){this._originalValue=s._options.valueGetter(d,this._args.column)??"",r==="date"?this._input.inputElement.valueAsDate=new Date(this._originalValue):this._input.value=this._originalValue}applyValue(d,p){const c=this._args.grid.getActiveCell();r==="date"&&(p=new Date(p).toLocaleDateString(window.navigator.language,{timeZone:"UTC"})),s._options.valueSetter(a,c.row,d,this._args.column,p)}isValueChanged(){return this._input.value!==this._originalValue}serializeValue(){return this._input.value}validate(){return{valid:!0,msg:void 0}}}return o}getDropdownEditorClass(a,r,i){const s=this;class o extends f.Disposable{constructor(d){super(),this._args=d,this.init();const p=[14,13,16,18,15,17];this._keyCaptureList=p.map(c=>m[c])}get keyCaptureList(){return this._keyCaptureList}init(){const d=D.$("");this._args.container.appendChild(d),d.style.height="100%",d.style.width="100%",i?(this._component=new T.Dropdown(d,s._contextViewProvider,s._options.editableDropdownStyles),this._register(this._component.onValueChange(async()=>{await this.commitEdit()})),this._register(this._component.onBlur(async()=>{await this.commitEdit()}))):(this._component=new y.SelectBox([],void 0,s._options.selectBoxStyles,s._contextViewProvider),this._component.render(d),this._component.selectElem.style.height="100%",this._register(this._component.onDidSelect(async()=>{await this.commitEdit()}))),this._component.focus(),this._register(this._component)}async commitEdit(){if(this.isValueChanged()){const d=this._args.grid.getDataItem(this._args.grid.getActiveCell().row);await this.applyValue(d,this._component.value),this._originalValue=this._component.value}}destroy(){this.dispose()}focus(){this._component.focus()}loadValue(d){this._originalValue=s._options.valueGetter(d,this._args.column)??"";const p=s._options.optionsGetter(d,this._args.column)??r,c=p?.indexOf(this._originalValue);c>-1&&(this._component instanceof T.Dropdown?(this._component.values=p,this._component.value=p[c]):(this._component.setOptions(p),this._component.select(c)))}async applyValue(d,p){const c=this._args.grid.getActiveCell();await s._options.valueSetter(a,c.row,d,this._args.column,p)}isValueChanged(){return this._component.value!==this._originalValue}serializeValue(){return this._component.value}validate(){return{valid:!0,msg:void 0}}}return o}}e.TableCellEditorFactory=S}),define(Q[705],Y([1,0,40,166,136,29,54]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputBox=void 0;let f=class extends b.AngularDisposable{constructor(m,S){super(),this._el=m,this.contextViewService=S,this.onDidChange=new t.EventEmitter}ngOnInit(){this._inputbox=this._register(new y.InputBox(this._el.nativeElement,this.contextViewService,{min:this.min,max:this.max,type:this.type,placeholder:this.placeholder,ariaLabel:this.ariaLabel,inputBoxStyles:T.defaultInputBoxStyles})),this.value&&(this._inputbox.value=this.value),this._register(this._inputbox.onDidChange(m=>{switch(this.type){case"number":if(m){this.onDidChange.emit(Number(m));break}default:this.onDidChange.emit(m)}}))}ngOnChanges(m){this._inputbox&&(m.min&&(this._inputbox.inputElement.min=this.min),m.max&&(this._inputbox.inputElement.max=this.max),m.type&&(this._inputbox.inputElement.type=this.type),m.placeholder&&(this._inputbox.inputElement.placeholder=this.placeholder))}};e.InputBox=f,fe([(0,t.Input)()],f.prototype,"min",void 0),fe([(0,t.Input)()],f.prototype,"max",void 0),fe([(0,t.Input)()],f.prototype,"type",void 0),fe([(0,t.Input)()],f.prototype,"placeholder",void 0),fe([(0,t.Input)("aria-label")],f.prototype,"ariaLabel",void 0),fe([(0,t.Input)()],f.prototype,"value",void 0),fe([(0,t.Output)()],f.prototype,"onDidChange",void 0),e.InputBox=f=fe([(0,t.Component)({selector:"input-box",template:""}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(1,(0,t.Inject)(D.IContextViewService))],f)}),define(Q[101],Y([1,0,331,515,54,36]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTableStyles=e.defaultTableStyles=e.defaultInfoBoxStyles=e.defaultSelectBoxStyles=e.defaultListBoxStyles=e.defaultDropdownStyles=e.defaultTableFilterStyles=e.defaultEditableDropdownStyles=e.defaultInfoButtonStyles=e.getCheckboxStyles=e.defaultCheckboxStyles=void 0,e.defaultCheckboxStyles={disabledCheckboxForeground:D.asCssVariable(y.disabledCheckboxForeground)};function T(v){return(0,b.overrideStyles)(v,e.defaultCheckboxStyles)}e.getCheckboxStyles=T,e.defaultInfoButtonStyles={buttonBackground:D.asCssVariable(t.infoButtonBackground),buttonForeground:D.asCssVariable(t.infoButtonForeground),buttonBorder:D.asCssVariable(t.infoButtonBorder),buttonHoverBackground:D.asCssVariable(t.infoButtonHoverBackground),buttonSeparator:void 0,buttonSecondaryBackground:void 0,buttonSecondaryForeground:void 0,buttonSecondaryHoverBackground:void 0,buttonSecondaryBorder:void 0,buttonDisabledBackground:void 0,buttonDisabledForeground:void 0,buttonDisabledBorder:void 0},e.defaultEditableDropdownStyles={contextBackground:D.asCssVariable(D.editorBackground),contextBorder:D.asCssVariable(D.inputBorder),...b.defaultInputBoxStyles,...b.defaultListStyles},e.defaultTableFilterStyles={...b.defaultInputBoxStyles,...b.defaultButtonStyles,...b.defaultCountBadgeStyles,...b.defaultListStyles},e.defaultDropdownStyles={foregroundColor:D.asCssVariable(D.inputForeground),borderColor:D.asCssVariable(D.inputBorder),backgroundColor:D.asCssVariable(D.editorBackground)},e.defaultListBoxStyles={inputValidationInfoBorder:D.asCssVariable(D.inputValidationInfoBorder),inputValidationInfoBackground:D.asCssVariable(D.inputValidationInfoBackground),inputValidationWarningBorder:D.asCssVariable(D.inputValidationWarningBorder),inputValidationWarningBackground:D.asCssVariable(D.inputValidationWarningBackground),inputValidationErrorBorder:D.asCssVariable(D.inputValidationErrorBorder),inputValidationErrorBackground:D.asCssVariable(D.inputValidationErrorBackground),...b.defaultSelectBoxStyles},e.defaultSelectBoxStyles={inputValidationInfoBorder:D.asCssVariable(D.inputValidationInfoBorder),inputValidationInfoBackground:D.asCssVariable(D.inputValidationInfoBackground),inputValidationWarningBorder:D.asCssVariable(D.inputValidationWarningBorder),inputValidationWarningBackground:D.asCssVariable(D.inputValidationWarningBackground),inputValidationErrorBorder:D.asCssVariable(D.inputValidationErrorBorder),inputValidationErrorBackground:D.asCssVariable(D.inputValidationErrorBackground),...b.defaultSelectBoxStyles},e.defaultInfoBoxStyles={informationBackground:D.asCssVariable(t.infoBoxInformationBackground),warningBackground:D.asCssVariable(t.infoBoxWarningBackground),errorBackground:D.asCssVariable(t.infoBoxErrorBackground),successBackground:D.asCssVariable(t.infoBoxSuccessBackground)},e.defaultTableStyles={listFocusBackground:D.asCssVariable(D.listFocusBackground),listFocusForeground:D.asCssVariable(D.listFocusForeground),listActiveSelectionBackground:D.asCssVariable(D.listActiveSelectionBackground),listActiveSelectionForeground:D.asCssVariable(D.listActiveSelectionForeground),listFocusAndSelectionBackground:D.asCssVariable(y.listFocusAndSelectionBackground),listFocusAndSelectionForeground:D.asCssVariable(y.listFocusAndSelectionForeground),listInactiveFocusBackground:void 0,listInactiveSelectionBackground:D.asCssVariable(D.listInactiveSelectionBackground),listInactiveSelectionForeground:void 0,listHoverBackground:D.asCssVariable(D.listHoverBackground),listHoverForeground:D.asCssVariable(D.listHoverForeground),listDropBackground:D.asCssVariable(D.listDropBackground),listFocusOutline:D.asCssVariable(D.activeContrastBorder),listSelectionOutline:D.asCssVariable(D.activeContrastBorder),listHoverOutline:D.asCssVariable(D.activeContrastBorder),listInactiveFocusOutline:D.asCssVariable(D.listInactiveFocusOutline),tableHeaderBackground:D.asCssVariable(y.tableHeaderBackground),tableHeaderForeground:D.asCssVariable(y.tableHeaderForeground)};function f(v){return(0,b.overrideStyles)(v,e.defaultTableStyles)}e.getTableStyles=f}),define(Q[706],Y([1,0,40,136,448,101,29]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditableDropDown=void 0;let f=class extends y.AngularDisposable{constructor(m,S){super(),this._el=m,this.contextViewService=S,this.onlyEmitOnChange=!1,this.onDidSelect=new t.EventEmitter}ngOnInit(){let m={values:[],strictSelection:!1,placeholder:"",maxHeight:125,ariaLabel:"",...D.defaultEditableDropdownStyles};this._selectbox=new b.Dropdown(this._el.nativeElement,this.contextViewService,m),this._register(this._selectbox),this._selectbox.values=this.options,this._selectbox.value=this.selectedOption,this._selectbox.fireOnTextChange=!0,this._register(this._selectbox.onValueChange(S=>{this.onlyEmitOnChange?this._previousVal!==S&&(this.onDidSelect.emit(S),this._previousVal=S):this.onDidSelect.emit(S)}))}ngOnChanges(m){}get value(){return this._selectbox.value}};e.EditableDropDown=f,fe([(0,t.Input)()],f.prototype,"options",void 0),fe([(0,t.Input)()],f.prototype,"selectedOption",void 0),fe([(0,t.Input)()],f.prototype,"onlyEmitOnChange",void 0),fe([(0,t.Output)()],f.prototype,"onDidSelect",void 0),e.EditableDropDown=f=fe([(0,t.Component)({selector:"editable-select-box",template:""}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(1,(0,t.Inject)(T.IContextViewService))],f)}),define(Q[707],Y([1,0,40,199,136,29,101]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBox=void 0;let f=class extends b.AngularDisposable{constructor(m,S){super(),this._el=m,this.contextViewService=S,this.onlyEmitOnChange=!1,this.onDidSelect=new t.EventEmitter}ngOnInit(){this._selectbox=this._register(new y.SelectBox(this.options,this.selectedOption,T.defaultSelectBoxStyles,this.contextViewService,void 0,{ariaLabel:this.ariaLabel})),this._selectbox.render(this._el.nativeElement),this._register(this._selectbox.onDidSelect(m=>{this.onlyEmitOnChange?this._previousVal!==m.selected&&(this.onDidSelect.emit(m),this._previousVal=m.selected):this.onDidSelect.emit(m)}))}ngOnChanges(m){}get value(){return this._selectbox.value}};e.SelectBox=f,fe([(0,t.Input)()],f.prototype,"options",void 0),fe([(0,t.Input)()],f.prototype,"selectedOption",void 0),fe([(0,t.Input)()],f.prototype,"onlyEmitOnChange",void 0),fe([(0,t.Input)("aria-label")],f.prototype,"ariaLabel",void 0),fe([(0,t.Output)()],f.prototype,"onDidSelect",void 0),e.SelectBox=f=fe([(0,t.Component)({selector:"select-box",template:""}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(1,(0,t.Inject)(D.IContextViewService))],f)}),define(Q[350],Y([1,0,198,7,17,553,559,54]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOptionContainerByName=e.getCategoryName=e.getCategoryDisplayName=e.getBooleanValueFromStringOrBoolean=e.appendInputSelectBox=e.appendRowLink=e.appendRow=void 0;function v(s,o,u,d,p,c=!1,l,n){let g=(0,y.append)(s,(0,y.$)("tr"));p&&(b.isString(p)?g.classList.add(p):g.classList.add(...p));const w=(0,y.append)((0,y.append)(g,(0,y.$)(`td.${u}`)),(0,y.$)("div.dialog-label-container"));return w.style.display="flex",l&&(w.classList.add("info-icon"),w.title=n?(0,D.wrapStringWithNewLine)(l,n):l),(0,y.append)(w,(0,y.$)("div")).innerText=o,c&&w.classList.add(T.RequiredIndicatorClassName),(0,y.append)(g,(0,y.$)(`td.${d}`))}e.appendRow=v;function m(s,o,u,d){let p=(0,y.append)(s,(0,y.$)("tr"));(0,y.append)((0,y.append)(p,(0,y.$)(`td.${u}`)),(0,y.$)("div")).innerText=o;let c=(0,y.append)((0,y.append)(p,(0,y.$)(`td.${d}`)),(0,y.$)("div"));return new t.Button(c,f.defaultButtonStyles).element}e.appendRowLink=m;function S(s,o){return o.render(s),o}e.appendInputSelectBox=S;function h(s){return b.isBoolean(s)?s:b.isString(s)?s.toLowerCase()==="true":!1}e.getBooleanValueFromStringOrBoolean=h;function a(s,o){let u;return s.forEach(d=>{d.name===o&&(u=d.displayName)}),u}e.getCategoryDisplayName=a;function r(s,o){let u;return s.forEach(d=>{d.displayName===o&&(u=d.name)}),u}e.getCategoryName=r;function i(s,o){for(let u=0;u<s.childElementCount;u++)if(s.children.item(u).classList.contains(`option-${o}`))return s.children.item(u).children.item(0).children.item(0)}e.getOptionContainerByName=i}),define(Q[3315],Y([1,0,350,199,166,17,1964,432,54,101]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.groupOptionsByCategory=e.findElement=e.falseInputValue=e.trueInputValue=e.updateOptions=e.validateInputs=e.getOptionValueAndCategoryValues=e.createOptionElement=void 0;function S(o,u,d,p,c,l){let n=[],g=h(o,d,n),w,E,C=(0,T.localize)(0,null),I=(0,T.localize)(1,null);o.valueType===f.ServiceOptionType.number?(w=new b.InputBox(u,c,{validationOptions:{validation:A=>!A&&o.isRequired?{type:3,content:o.displayName+C}:D.isNumber(Number(A))?null:{type:3,content:I}},ariaLabel:o.displayName,placeholder:o.placeholder,inputBoxStyles:v.defaultInputBoxStyles},o.name),w.value=g,E=i(u,"input")):o.valueType===f.ServiceOptionType.category||o.valueType===f.ServiceOptionType.boolean?(w=new y.SelectBox(n,g.toString(),m.defaultSelectBoxStyles,c,void 0,{ariaLabel:o.displayName},o.name),t.appendInputSelectBox(u,w),E=i(u,"monaco-select-box")):(o.valueType===f.ServiceOptionType.string||o.valueType===f.ServiceOptionType.password)&&(w=new b.InputBox(u,c,{validationOptions:{validation:A=>!A&&o.isRequired?{type:3,content:o.displayName+C}:null},ariaLabel:o.displayName,placeholder:o.placeholder,inputBoxStyles:v.defaultInputBoxStyles},o.name),w.value=g,o.valueType===f.ServiceOptionType.password&&(w.inputElement.type="password"),E=i(u,"input"));const _={optionWidget:w,option:o,optionValue:g};return p[o.name]=_,E&&(E.onfocus=()=>l(o.name)),_}e.createOptionElement=S;function h(o,u,d){let p=o.defaultValue;return u[o.name]!==void 0&&(o.valueType===f.ServiceOptionType.boolean?u[o.name]===!0||u[o.name]===e.trueInputValue?p=e.trueInputValue:p=e.falseInputValue:p=u[o.name]),(o.valueType===f.ServiceOptionType.boolean||o.valueType===f.ServiceOptionType.category)&&(o.isRequired||d.push({text:"",value:""}),o.valueType===f.ServiceOptionType.boolean?d.push({text:e.trueInputValue,value:e.trueInputValue},{text:e.falseInputValue,value:e.falseInputValue}):o.categoryValues.forEach(c=>d.push({text:c.displayName,value:c.name})),p==null&&(p=d[0].text)),p}e.getOptionValueAndCategoryValues=h;function a(o){let u=!0,d=!1;for(let p in o){let c=o[p],l=c.optionWidget;(c.option.valueType===f.ServiceOptionType.string||c.option.valueType===f.ServiceOptionType.password||c.option.valueType===f.ServiceOptionType.number)&&l.validate()!==void 0&&(u=!1,d||(d=!0,l.focus()))}return u}e.validateInputs=a;function r(o,u){for(let d in u){let p=u[d];p.optionWidget.value!==o[d]&&(!p.optionWidget.value&&o[d]&&delete o[d],p.optionWidget.value&&(p.option.valueType===f.ServiceOptionType.boolean?o[d]=p.optionWidget.value===e.trueInputValue:o[d]=p.optionWidget.value),p.optionValue=o[d])}}e.updateOptions=r,e.trueInputValue=(0,T.localize)(2,null),e.falseInputValue=(0,T.localize)(3,null);function i(o,u){let d=o;for(;d&&!d.className.startsWith(u);)d=d.firstChild;return d}e.findElement=i;function s(o){let u={};return o.forEach(d=>{let p=d.groupName;p==null&&(p=(0,T.localize)(4,null)),u[p]?u[p].push(d):u[p]=[d]}),u}e.groupOptionsByCategory=s}),define(Q[3316],Y([1,0,40,156,198,2313,168,871,494,11,54,101,1578]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a;(function(i){i.File="File",i.Normal="Normal",i.Informational="Informational"})(a||(a={}));let r=class extends f.ComponentWithIconBase{constructor(s,o,u){super(s,o,u),this.fileType=".sql",this._currentButtonType=void 0}ngAfterViewInit(){this.baseInit()}ngOnDestroy(){this.baseDestroy()}setLayout(s){this.layout()}initButton(){this._currentButtonType=this.buttonType;const s=this._button?.element;this._inputContainer?this._button=new b.Button(this._inputContainer.nativeElement,{secondary:this.secondary,...S.defaultButtonStyles}):this._infoButtonContainer&&(this._button=new D.InfoButton(this._infoButtonContainer.nativeElement,h.defaultInfoButtonStyles)),s&&(this._inputContainer||this._infoButtonContainer).nativeElement?.removeChild(s),this._register(this._button),this._register(this._button.onDidClick(o=>{if(this._fileInputContainer){const u=this;this._fileInputContainer.nativeElement.onchange=()=>{let d=u._fileInputContainer.nativeElement.files[0],p=new FileReader;p.onload=c=>{let l=c.target.result;u.fileContent=l.toString(),u.fireEvent({eventType:T.ComponentEventType.onDidClick,args:{filePath:d.path,fileContent:u.fileContent}})},p.readAsText(d)}}else this.fireEvent({eventType:T.ComponentEventType.onDidClick,args:o})}))}setProperties(s){super.setProperties(s),this._currentButtonType!==this.buttonType&&this.initButton(),this._button instanceof D.InfoButton?(this._button.buttonMaxHeight=this.properties.height,this._button.buttonMaxWidth=this.properties.width,this._button.description=this.properties.description,this._button.iconClass=(0,v.createIconCssClass)(this.properties.iconPath),this._button.iconHeight=this.properties.iconHeight,this._button.iconWidth=this.properties.iconWidth,this._button.title=this.properties.title):(this._button.enabled=this.enabled,this._button.label=this.label,this.properties.fileType&&(this.fileType=s.fileType),this._button.title=this.title,this.ariaLabel&&(this._button.ariaLabel=this.ariaLabel),this.width&&this._button.setWidth((0,y.convertSize)(this.width.toString())),this.height&&this._button.setHeight((0,y.convertSize)(this.height.toString())),this.iconPath&&(this._button.element.style.backgroundSize=`${this.getIconWidth()} ${this.getIconHeight()}`,this._button.element.style.paddingLeft=this.getIconWidth(),this.height===void 0&&this._button.setHeight((0,y.convertSize)(this.getIconHeight().toString())))),this.updateIcon(),this._changeRef.detectChanges()}focus(){this._button.focus()}updateIcon(){this.iconPath&&(this._iconClass?super.updateIcon():(super.updateIcon(),this._button.icon=this._iconClass+" icon"))}get defaultIconHeight(){return 15}get defaultIconWidth(){return 15}get label(){return this.getPropertyOrDefault(s=>s.label,"")}set label(s){this.setPropertyFromUI(this.setValueProperties,s)}get buttonType(){return this.isFile===!0?a.File:this.getPropertyOrDefault(s=>s.buttonType,a.Normal)}get description(){return this.getPropertyOrDefault(s=>s.description,"")}get isFile(){return this.getPropertyOrDefault(s=>s.isFile,!1)}set isFile(s){this.setPropertyFromUI(this.setFileProperties,s)}get fileContent(){return this.getPropertyOrDefault(s=>s.fileContent,"")}set fileContent(s){this.setPropertyFromUI(this.setFileContentProperties,s)}setFileContentProperties(s,o){s.fileContent=o}setValueProperties(s,o){s.label=o}setFileProperties(s,o){s.isFile=o}get secondary(){return this.getPropertyOrDefault(s=>s.secondary,!1)}};fe([(0,t.Input)()],r.prototype,"descriptor",void 0),fe([(0,t.Input)()],r.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("input",{read:t.ElementRef})],r.prototype,"_inputContainer",void 0),fe([(0,t.ViewChild)("fileInput",{read:t.ElementRef})],r.prototype,"_fileInputContainer",void 0),fe([(0,t.ViewChild)("infoButton",{read:t.ElementRef})],r.prototype,"_infoButtonContainer",void 0),r=fe([(0,t.Component)({selector:"modelview-button",template:` <div *ngIf="this.buttonType !== 'Informational'; then thenBlock else elseBlock"></div> <ng-template #thenBlock> <label for={{this.label}}> <div #input [ngStyle]="CSSStyles"> <input #fileInput *ngIf="this.isFile === true" id={{this.label}} type="file" accept="{{ this.fileType }}" style="display: none"> </div> </label> </ng-template> <ng-template #elseBlock> <div #infoButton [ngStyle]="CSSStyles"></div> </ng-template> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(m.ILogService))],r),e.default=r}),define(Q[3317],Y([1,0,40,155,343,168,17,156,15,11,101]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let h=class extends y.ComponentBase{constructor(r,i,s){super(r,s,i)}ngAfterViewInit(){if(this._inputContainer){let r={...S.defaultCheckboxStyles,label:""};this._input=new b.Checkbox(this._inputContainer.nativeElement,r),this._register(this._input),this._register(this._input.onChange(async i=>{this.checked=this._input.checked,await this.validate(),this.fireEvent({eventType:D.ComponentEventType.onDidChange,args:i})})),this._validations.push(()=>!this.required||this.checked)}this.baseInit()}ngOnDestroy(){this.baseDestroy()}setLayout(r){this.layout()}setProperties(r){super.setProperties(r),this._input.checked=this.checked,this._input.label=this.label,this.enabled?this._input.enable():this._input.disable(),(this.width||(0,T.isNumber)(this.width))&&this._input.setWidth((0,f.convertSize)(this.width)),(this.height||(0,T.isNumber)(this.height))&&this._input.setHeight((0,f.convertSize)(this.height)),this.ariaLabel&&(this._input.ariaLabel=this.ariaLabel),this.required&&(this._input.required=this.required),this.validate().catch(v.onUnexpectedError)}get checked(){return this.getPropertyOrDefault(r=>r.checked,!1)}set checked(r){this.setPropertyFromUI((i,s)=>{i.checked=s},r)}get label(){return this.getPropertyOrDefault(r=>r.label,"")}set label(r){this.setPropertyFromUI((i,s)=>{i.label=s},r)}get required(){return this.getPropertyOrDefault(r=>r.required,!1)}set required(r){this.setPropertyFromUI((i,s)=>i.required=s,r)}focus(){this._input.focus()}get CSSStyles(){return this.mergeCss(super.CSSStyles,{display:this.display})}};fe([(0,t.Input)()],h.prototype,"descriptor",void 0),fe([(0,t.Input)()],h.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("input",{read:t.ElementRef})],h.prototype,"_inputContainer",void 0),h=fe([(0,t.Component)({selector:"modelview-checkbox",template:` <div #input width="100%" [ngStyle]="CSSStyles"></div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)(m.ILogService)),O(2,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef)))],h),e.default=h}),define(Q[3318],Y([1,0,40,168,11,155,5,1164,101]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let m=class extends D.ComponentBase{constructor(h,a,r,i){super(h,a,i),this._instantiationService=r}ngAfterViewInit(){this.baseInit(),this._container&&(this._infoBox=this._instantiationService.createInstance(f.InfoBox,this._container.nativeElement,v.defaultInfoBoxStyles,void 0),this._infoBox.onDidClick(h=>{this.fireEvent({eventType:y.ComponentEventType.onDidClick,args:h})}),this._infoBox.onLinkClick(h=>{this.fireEvent({eventType:y.ComponentEventType.onChildClick,args:h})}),this.updateInfoBox())}ngOnDestroy(){this.baseDestroy()}setLayout(h){this.layout()}setProperties(h){super.setProperties(h),this.updateInfoBox()}updateInfoBox(){this._infoBox&&(this._container.nativeElement.style.width=this.getWidth(),this._container.nativeElement.style.height=this.getHeight(),this._infoBox.announceText=this.announceText,this._infoBox.infoBoxStyle=this.style,this._infoBox.text=this.text,this._infoBox.links=this.links,this._infoBox.isClickable=this.isClickable,this._infoBox.clickableButtonAriaLabel=this.clickableButtonAriaLabel)}get style(){return this.getPropertyOrDefault(h=>h.style,"information")}get text(){return this.getPropertyOrDefault(h=>h.text,"")}get announceText(){return this.getPropertyOrDefault(h=>h.announceText,!1)}get isClickable(){return this.getPropertyOrDefault(h=>h.isClickable,!1)}get clickableButtonAriaLabel(){return this.getPropertyOrDefault(h=>h.clickableButtonAriaLabel,"")}get links(){return this.getPropertyOrDefault(h=>h.links,[])}};fe([(0,t.Input)()],m.prototype,"descriptor",void 0),fe([(0,t.Input)()],m.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("container",{read:t.ElementRef})],m.prototype,"_container",void 0),m=fe([(0,t.Component)({selector:"modelview-infobox",template:` <div #container [ngStyle]="CSSStyles"> </div>`}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(T.IInstantiationService)),O(3,(0,t.Inject)(b.ILogService))],m),e.default=m}),define(Q[3319],Y([1,0,40,155,166,29,1968,36,7,168,17,156,15,11,54]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let s=class extends y.ComponentBase{constructor(u,d,p,c){super(u,p,c),this.contextViewService=d}ngAfterViewInit(){let u={placeholder:"",ariaLabel:"",validationOptions:{validation:()=>{if(!this.valid)return{content:this.inputElement.inputElement.validationMessage||this.validationErrorMessage||T.localize(0,null),type:3}}},useDefaultValidation:!0,inputBoxStyles:(0,i.getInputBoxStyle)({inputValidationInfoBackground:(0,f.asCssVariable)(f.inputBackground),inputValidationInfoBorder:(0,f.asCssVariable)(f.inputBorder)})};if(this._inputContainer&&(u.requireForceValidations=!0,this._input=new b.InputBox(this._inputContainer.nativeElement,this.contextViewService,u),this.onkeydown(this._input.inputElement,d=>{d.keyCode===3&&(this.fireEvent({eventType:m.ComponentEventType.onEnterKeyPressed,args:this._input.value}),this.stopEnterPropagation&&v.EventHelper.stop(d,!0))}),this.registerInput(this._input,()=>!this.multiline)),this._textareaContainer){let d=Object.assign({},u,{flexibleHeight:!0,type:"textarea"});this._textAreaInput=new b.InputBox(this._textareaContainer.nativeElement,this.contextViewService,d),this.onkeydown(this._textAreaInput.inputElement,p=>{this.tryHandleKeyEvent(p)&&v.EventHelper.stop(p,!0),p.keyCode===3&&(this.fireEvent({eventType:m.ComponentEventType.onEnterKeyPressed,args:this._textAreaInput.value}),this.stopEnterPropagation&&v.EventHelper.stop(p,!0))}),this.registerInput(this._textAreaInput,()=>this.multiline)}this.inputElement.hideErrors=!0,this.baseInit()}tryHandleKeyEvent(u){let d=!1;return this.multiline&&u.keyCode===3&&(d=!0),d}get inputElement(){return this.multiline?this._textAreaInput:this._input}registerInput(u,d){u&&(this._validations.push(()=>!u.inputElement.validationMessage),this._register(u),this._register(u.onDidChange(async p=>{d()&&(this.value=u.value,u.hideErrors=!1,await this.validate(),this.fireEvent({eventType:m.ComponentEventType.onDidChange,args:p}))})))}getInputBoxDisplay(){return this.multiline?"none":""}getTextAreaDisplay(){return this.multiline?"":"none"}async validate(){await super.validate();const u=this.inputElement.validate(!0)===void 0;return u?this.inputElement.setAriaLabel(this.ariaLabel):this.ariaLabel?this.inputElement.setAriaLabel(T.localize(1,null,this.ariaLabel,this.inputElement.inputElement.validationMessage)):this.inputElement.setAriaLabel(this.inputElement.inputElement.validationMessage),u}ngOnDestroy(){this.baseDestroy()}layout(){super.layout(),this.layoutInputBox()}layoutInputBox(){((0,S.isNumber)(this.width)||this.width)&&(this.inputElement.width=(0,h.convertSizeToNumber)(this.width)),((0,S.isNumber)(this.height)||this.height)&&this.inputElement.setHeight((0,h.convertSize)(this.height))}setLayout(u){this.layout()}setProperties(u){super.setProperties(u),this.setInputProperties(this.inputElement),this.validate().catch(a.onUnexpectedError)}setInputProperties(u){this.multiline||(u.inputElement.type=this.inputType,this.inputType==="number"&&(u.inputElement.step="any",(0,S.isNumber)(this.min)&&(u.inputElement.min=this.min.toString()),(0,S.isNumber)(this.max)&&(u.inputElement.max=this.max.toString()))),u.value=this.value,u.setAriaLabel(this.ariaLabel),u.setPlaceHolder(this.placeHolder),u.setEnabled(this.enabled),u.setMaxLength(this.maxLength),this.layoutInputBox(),this.multiline&&((0,S.isNumber)(this.rows)&&(this.inputElement.rows=this.rows),(0,S.isNumber)(this.columns)&&(this.inputElement.columns=this.columns)),this.ariaLive&&(u.ariaLive=this.ariaLive),u.inputElement.required=this.required,u.inputElement.readOnly=this.readOnly,this.title&&(u.inputElement.title=this.title)}get value(){return this.getPropertyOrDefault(u=>u.value,"")}set value(u){this.setPropertyFromUI((d,p)=>d.value=p,u)}get ariaLive(){return this.getPropertyOrDefault(u=>u.ariaLive,"")}get placeHolder(){return this.getPropertyOrDefault(u=>u.placeHolder,"")}set placeHolder(u){this.setPropertyFromUI((d,p)=>d.placeHolder=p,u)}get title(){return this.getPropertyOrDefault(u=>u.title,"")}set title(u){this.setPropertyFromUI((d,p)=>d.title=p,u)}set columns(u){this.setPropertyFromUI((d,p)=>d.columns=p,u)}get rows(){return this.getPropertyOrDefault(u=>u.rows,void 0)}get columns(){return this.getPropertyOrDefault(u=>u.columns,void 0)}set rows(u){this.setPropertyFromUI((d,p)=>d.rows=p,u)}get min(){return this.getPropertyOrDefault(u=>u.min,void 0)}set min(u){this.setPropertyFromUI((d,p)=>d.min=p,u)}get max(){return this.getPropertyOrDefault(u=>u.max,void 0)}set max(u){this.setPropertyFromUI((d,p)=>d.max=p,u)}get inputType(){return this.getPropertyOrDefault(u=>u.inputType,"text")}set inputType(u){this.setPropertyFromUI((d,p)=>d.inputType=p,u)}get multiline(){return this.getPropertyOrDefault(u=>u.multiline,!1)}set multiline(u){this.setPropertyFromUI((d,p)=>d.multiline=p,u)}get readOnly(){return this.getPropertyOrDefault(u=>u.readOnly,!1)}set readOnly(u){this.setPropertyFromUI((d,p)=>d.readOnly=p,u)}get required(){return this.getPropertyOrDefault(u=>u.required,!1)}set required(u){this.setPropertyFromUI((d,p)=>d.required=p,u)}get stopEnterPropagation(){return this.getPropertyOrDefault(u=>u.stopEnterPropagation,!1)}set stopEnterPropagation(u){this.setPropertyFromUI((d,p)=>d.stopEnterPropagation=p,u)}get maxLength(){return this.getPropertyOrDefault(u=>u.maxLength,void 0)}focus(){this.inputElement.focus()}get validationErrorMessage(){return this.getPropertyOrDefault(u=>u.validationErrorMessage,"")}set validationErrorMessage(u){this.setPropertyFromUI((d,p)=>d.validationErrorMessage=p,u)}get inputBoxCSSStyles(){return this.mergeCss(super.CSSStyles,{width:this.getWidth(),display:this.getInputBoxDisplay()})}get textAreaCSSStyles(){return this.mergeCss(super.CSSStyles,{width:this.getWidth(),display:this.getTextAreaDisplay()})}};fe([(0,t.Input)()],s.prototype,"descriptor",void 0),fe([(0,t.Input)()],s.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("input",{read:t.ElementRef})],s.prototype,"_inputContainer",void 0),fe([(0,t.ViewChild)("textarea",{read:t.ElementRef})],s.prototype,"_textareaContainer",void 0),s=fe([(0,t.Component)({selector:"modelview-inputBox",template:` <div #input [ngStyle]="inputBoxCSSStyles"></div> <div #textarea [ngStyle]="textAreaCSSStyles"></div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)(D.IContextViewService)),O(2,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(3,(0,t.Inject)(r.ILogService))],s),e.default=s}),define(Q[3320],Y([1,0,40,155,1122,29,68,168,11,101]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let S=class extends y.ComponentBase{constructor(a,r,i,s,o){super(a,s,o),this.contextViewService=r,this.clipboardService=i}ngAfterViewInit(){this._inputContainer&&(this._input=new b.ListBox({items:[],...m.defaultListBoxStyles},this.contextViewService),this._register(this._input.onKeyDown(a=>{if(this._input.selectedOptions.length>0){const r=a.keyCode;if((a.ctrlKey||a.metaKey)&&r===33){let s=this._input.selectedOptions[0];for(let o=1;o<this._input.selectedOptions.length;o++)s=s+", "+this._input.selectedOptions[o];this.clipboardService.writeText(s),a.stopPropagation()}}})),this._input.render(this._inputContainer.nativeElement),this._register(this._input),this._register(this._input.onDidSelect(a=>{this.selectedRow=a.index,this.fireEvent({eventType:f.ComponentEventType.onSelectedRowChanged,args:a})}))),this.baseInit()}ngOnDestroy(){this.baseDestroy()}setLayout(a){this.layout()}setProperties(a){super.setProperties(a),this._input.setOptions(this.values.map(r=>({text:r})),this.selectedRow)}get values(){return this.getPropertyOrDefault(a=>a.values,void 0)}set values(a){this.setPropertyFromUI((r,i)=>r.values=i,a)}get selectedRow(){return this.getPropertyOrDefault(a=>a.selectedRow,void 0)}set selectedRow(a){this.setPropertyFromUI((r,i)=>r.selectedRow=i,a)}get CSSStyles(){return this.mergeCss(super.CSSStyles,{width:"100%"})}};fe([(0,t.Input)()],S.prototype,"descriptor",void 0),fe([(0,t.Input)()],S.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("input",{read:t.ElementRef})],S.prototype,"_inputContainer",void 0),S=fe([(0,t.Component)({selector:"modelview-listBox",template:` <div #input [ngStyle]="CSSStyles"></div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)(D.IContextViewService)),O(2,(0,t.Inject)(T.IClipboardService)),O(3,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(4,(0,t.Inject)(v.ILogService))],S),e.default=S}),define(Q[3321],Y([1,0,40,155,187,256,7,399,1105,6,272,17,168,156,573,494,403,15,11,2289,29,2288,34,13,5,66,43,170,42,101,1594]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A){"use strict";var k;Object.defineProperty(e,"__esModule",{value:!0}),e.ColumnSizingMode=void 0;var L;(function(N){N[N.ForceFit=0]="ForceFit",N[N.AutoFit=1]="AutoFit",N[N.DataFit=2]="DataFit"})(L||(e.ColumnSizingMode=L={}));var R;(function(N){N[N.text=0]="text",N[N.checkBox=1]="checkBox",N[N.button=2]="button",N[N.icon=3]="icon",N[N.hyperlink=4]="hyperlink",N[N.contextMenu=5]="contextMenu"})(R||(R={}));let M=k=class extends y.ComponentBase{constructor(P,x,F,V,W,z,B,K,H){super(P,x,F),this.contextViewService=V,this.contextMenuService=W,this.instantiationService=z,this.accessibilityService=B,this.quickInputService=K,this.componentContextService=H,this._checkboxColumns=new Map,this._buttonColumns=[],this._hyperlinkColumns=[],this._contextMenuColumns=[],this._pluginsRegisterStatus=[],this._onCheckBoxChanged=this._register(new m.Emitter),this._onButtonClicked=this._register(new m.Emitter),this.onCheckBoxChanged=this._onCheckBoxChanged.event,this.onButtonClicked=this._onButtonClicked.event,this._iconCssMap={}}transformColumns(P){if(P){const F=[];let V=0;return P.map(W=>{W.type===R.checkBox?this.createCheckBoxPlugin(W,V):W.type===R.button?this.createButtonPlugin(W):W.type===R.icon?F.push(k.createIconColumn(W)):W.type===R.hyperlink?this.createHyperlinkPlugin(W):W.type===R.contextMenu?this.createContextMenuButtonPlugin(W):W.value?F.push(k.createTextColumn(W)):F.push({name:W,id:W,field:W,formatter:S.textFormatter}),V++}),F}else return P.map(F=>({name:F,id:F,field:F}))}static createIconColumn(P){return{name:P.name??P.value,id:P.value,field:P.value,width:P.width,cssClass:P.cssClass,headerCssClass:P.headerCssClass,toolTip:P.toolTip,formatter:S.iconCssFormatter,filterable:!1,resizable:P.resizable}}static createTextColumn(P){return{name:P.name??P.value,id:P.value,field:P.value,width:P.width,cssClass:P.cssClass,headerCssClass:P.headerCssClass,toolTip:P.toolTip,formatter:S.textFormatter,resizable:P.resizable}}transformData(P,x){return P&&x?P.map(F=>{const V={};return Array.isArray(F)&&F.forEach((W,z)=>{const B=x[z];if(typeof B=="string")V[B]=W;else{const K=B.type;let H;switch(K){case R.icon:const U=W;H={iconCssClass:this.createIconCssClassInternal(U.icon),title:U.title};break;case R.button:if(W){const G=W;H={iconCssClass:G.icon?this.createIconCssClassInternal(G.icon):void 0,title:G.title}}break;case R.hyperlink:if(W){const G=W;H={iconCssClass:G.icon?this.createIconCssClassInternal(G.icon):void 0,title:G.title,url:G.url,role:G.role};break}break;case R.contextMenu:if(W){const G=W;H={title:G.title,commands:G.commands,context:G.context}}break;default:H=W}V[B.value]=H}}),V}):[]}createIconCssClassInternal(P){const x=(0,s.getIconKey)(P),F=this._iconCssMap[x]??(0,s.createIconCssClass)(P);return this._iconCssMap[x]||(this._iconCssMap[x]=F),F}ngAfterViewInit(){if(this._inputContainer){this._tableData=new D.TableDataView(null,null,null,x=>{let F=this._table.grid.getColumns();for(let V=0;V<F.length;V++){let W=F[V],z=W.filterValues;if(z&&z.length>0)return x.filter(B=>{let K=B[W.field];return K instanceof Array?z.find(H=>K.indexOf(H)>=0):z.find(H=>H===K)})}return x});let P={syncColumnCellResize:!0,enableColumnReorder:!1,enableCellNavigation:!0,forceFitColumns:!0,dataItemColumnValueExtractor:S.slickGridDataItemColumnValueWithNoData,enableInGridTabNavigation:this.moveFocusOutWithTab};this._table=new b.Table(this._inputContainer.nativeElement,this.accessibilityService,this.quickInputService,A.defaultTableStyles,{dataProvider:this._tableData,columns:this._tableColumns},P),this._table.setData(this._tableData),this._table.setSelectionModel(new f.RowSelectionModel({selectActiveRow:!0})),this._register(this._table),this._register(this._table.onSelectedRowsChanged((x,F)=>{this.isCheckboxColumnsUsedForSelection()||(this.selectedRows=F.rows,this.fireEvent({eventType:a.ComponentEventType.onSelectedRowChanged,args:x}))})),this._register(this.componentContextService.registerTable(this._table))}this.baseInit()}ngOnDestroy(){this.baseDestroy()}layout(){this.layoutTable(),super.layout()}layoutTable(){let P=(0,r.convertSizeToNumber)(this.width),x=(0,r.convertSizeToNumber)(this.height),F=!0;switch(this.forceFitColumns){case L.DataFit:{F=!1;break}case L.AutoFit:{F=this._table.columns.length<=3;break}case L.ForceFit:default:{F=!0;break}}let V={forceFitColumns:F};this._table.setOptions(V),this._table.layout(new T.Dimension(P&&P>0?P:(0,T.getContentWidth)(this._inputContainer.nativeElement),x&&x>0?x:(0,T.getContentHeight)(this._inputContainer.nativeElement))),this._table.resizeCanvas()}setLayout(){this.layout()}setProperties(P){const x=(0,_.deepClone)(this.columns);super.setProperties(P),this._tableData.clear(),this._tableData.push(this.transformData(this.data,this.columns)),(0,_.equals)(x,this.columns)||(this._tableColumns=this.transformColumns(this.columns),this._table.columns=this._tableColumns,this._checkboxColumns.forEach((F,V)=>{this.registerPlugins(V,F)}),Object.keys(this._buttonColumns).forEach(F=>this.registerPlugins(F,this._buttonColumns[F])),Object.keys(this._hyperlinkColumns).forEach(F=>this.registerPlugins(F,this._hyperlinkColumns[F])),Object.keys(this._contextMenuColumns).forEach(F=>this.registerPlugins(F,this._contextMenuColumns[F])),this._table.columns=this._tableColumns,this._table.autosizeColumns()),this._table.setData(this._tableData),this._table.setTableTitle(this.title),this.selectedRows&&this._table.setSelectedRows(this.selectedRows),this.headerFilter===!0&&(this.registerFilterPlugin(),this._tableData.clearFilter()),this.ariaRowCount===-1?this._table.removeAriaRowCount():this._table.ariaRowCount=this.ariaRowCount,this.ariaColumnCount===-1?this._table.removeAriaColumnCount():this._table.ariaColumnCount=this.ariaColumnCount,this.ariaRole&&(this._table.ariaRole=this.ariaRole),this.ariaLabel&&(this._table.ariaLabel=this.ariaLabel),this.updateCells!==void 0&&this.updateTableCells(this.updateCells),this.layoutTable(),this.validate().catch(u.onUnexpectedError)}updateTableCells(P){P.forEach(x=>{if((0,h.isUndefinedOrNull)(x.column)||(0,h.isUndefinedOrNull)(x.row)||x.row<0||x.row>this.data.length)return;const F=x;F&&this._checkboxColumns.get(F.columnName).reactiveCheckboxCheck(F.row,F.checked)})}createCheckBoxPlugin(P,x){let F=P.value;if(!this._checkboxColumns.has(P.value)){const V=P.options?P.options.actionOnCheckbox:P.action;this._checkboxColumns.set(P.value,new v.CheckboxSelectColumn({title:P.value,toolTip:P.toolTip,width:P.width,cssClass:P.cssClass,headerCssClass:P.headerCssClass,actionOnCheck:V,columnId:`checkbox-column-${x}`},x)),this._register(this._checkboxColumns.get(P.value).onChange(W=>{if(this.data[W.row][W.column]=W.checked,this.setPropertyFromUI((z,B)=>z.data=B,this.data),this.fireEvent({eventType:a.ComponentEventType.onCellAction,args:{row:W.row,column:W.column,checked:W.checked,name:F}}),V===v.ActionOnCheck.selectRow){const z=[];this.data.forEach((B,K)=>{B[W.column]&&z.push(K)}),this.selectedRows=z,this.fireEvent({eventType:a.ComponentEventType.onSelectedRowChanged,args:z})}})),this._register(this._checkboxColumns.get(P.value).onCheckAllChange(W=>{this.data.forEach((z,B)=>{z[W.column]=W.checked}),this.setPropertyFromUI((z,B)=>z.data=B,this.data),V===v.ActionOnCheck.selectRow&&(this.selectedRows=W.checked?this.data.map((z,B)=>B):[],this.fireEvent({eventType:a.ComponentEventType.onSelectedRowChanged,args:this.selectedRows}))}))}}createButtonPlugin(P){let x=P.value;if(!this._buttonColumns[P.value]){const F=P.options?P.options.icon:P.icon;this._buttonColumns[P.value]=new i.ButtonColumn({title:P.value,iconCssClass:F?this.createIconCssClassInternal(F):void 0,field:P.value,showText:P.showText,name:P.name,resizable:P.resizable}),this._register(this._buttonColumns[P.value].onClick(V=>{this.fireEvent({eventType:a.ComponentEventType.onCellAction,args:{row:V.row,column:V.column,name:x}})}))}}createHyperlinkPlugin(P){const x=P.value;if(!this._hyperlinkColumns[P.value]){const F=new p.HyperlinkColumn({title:P.value,width:P.width,iconCssClass:P.icon?this.createIconCssClassInternal(P.icon):void 0,field:P.value,name:P.name,resizable:P.resizable});this._hyperlinkColumns[P.value]=F,this._register(F.onClick(V=>{this.fireEvent({eventType:a.ComponentEventType.onCellAction,args:{row:V.row,column:V.column,name:x}})}))}}createContextMenuButtonPlugin(P){this._contextMenuColumns[P.value]||(this._contextMenuColumns[P.value]=new l.ContextMenuColumn({title:P.value,width:P.width,field:P.value,name:P.name,resizable:P.resizable})),this._register(this._contextMenuColumns[P.value].onClick(x=>{const F=x.item[P.value],V=[];F.commands.forEach((W,z)=>{typeof W=="string"?V.push(this.createMenuItem(W)):(V.length!==0&&V.push(new n.Separator),V.push(...W.map(B=>this.createMenuItem(B))),z!==F.commands.length-1&&V.push(new n.Separator))}),this.contextMenuService.showContextMenu({getAnchor:()=>({x:x.position.x,y:x.position.y}),getActions:()=>V,getActionsContext:()=>F.context,onHide:()=>{this.focus()}})}))}createMenuItem(P){const x=g.MenuRegistry.getCommand(P);return this.instantiationService.createInstance(g.MenuItemAction,x,void 0,{shouldForwardArgs:!0},void 0)}registerPlugins(P,x){const F="index"in x?x.index:this.columns?.findIndex(V=>V===P||"value"in V&&V.value===P);F>=0&&(this._tableColumns.splice(F,0,x.definition),(!(P in this._pluginsRegisterStatus)||!this._pluginsRegisterStatus[P])&&(this._table.registerPlugin(x),this._pluginsRegisterStatus[P]=!0))}registerFilterPlugin(){const P=new o.HeaderFilter(A.defaultTableFilterStyles,this.contextViewService);this._filterPlugin=P,this._filterPlugin.onFilterApplied.subscribe((x,F)=>{F.column.filterValues?(this._tableData.filter(),this._table.grid.resetActiveCell(),this.data=this._tableData.getItems().map(W=>Object.values(W)),this.layoutTable()):this._tableData.clearFilter()}),this._filterPlugin.onCommand.subscribe((x,F)=>{this._tableData.sort({sortAsc:F.command==="sort-asc",sortCol:F.column,multiColumnSort:!1,grid:this._table.grid}),this.layoutTable()}),this._table.registerPlugin(P)}focus(){this._table.grid.getDataLength()>0&&(this._table.grid.getActiveCell()||this._table.grid.setActiveCell(0,0),this._table.grid.getActiveCellNode().focus())}isCheckboxColumnsUsedForSelection(){return this.columns.some(P=>(P.options?P.options.actionOnCheckbox:P.action)===v.ActionOnCheck.selectRow)}get data(){return this.getPropertyOrDefault(P=>P.data,[])}set data(P){this.setPropertyFromUI((x,F)=>x.data=F,P)}get columns(){return this.getPropertyOrDefault(P=>P.columns,[])}get fontSize(){return this.getPropertyOrDefault(P=>P.fontSize,"")}set columns(P){this.setPropertyFromUI((x,F)=>x.columns=F,P)}get selectedRows(){return this.getPropertyOrDefault(P=>P.selectedRows,[])}set selectedRows(P){this.setPropertyFromUI((x,F)=>x.selectedRows=F,P)}get forceFitColumns(){return this.getPropertyOrDefault(P=>P.forceFitColumns,L.ForceFit)}get title(){return this.getPropertyOrDefault(P=>P.title,"")}get ariaRowCount(){return this.getPropertyOrDefault(P=>P.ariaRowCount,-1)}get ariaColumnCount(){return this.getPropertyOrDefault(P=>P.ariaColumnCount,-1)}set moveFocusOutWithTab(P){this.setPropertyFromUI((x,F)=>x.moveFocusOutWithTab=F,P)}get moveFocusOutWithTab(){return this.getPropertyOrDefault(P=>P.moveFocusOutWithTab,!1)}get updateCells(){return this.getPropertyOrDefault(P=>P.updateCells,void 0)}set updateCells(P){this.setPropertyFromUI((x,F)=>{x.updateCells=F},P)}get headerFilter(){return this.getPropertyOrDefault(P=>P.headerFilter,!1)}doAction(P,...x){switch(P){case a.ModelViewAction.AppendData:this.appendData(x[0]);break;case a.ModelViewAction.SetActiveCell:this._table.grid.setActiveCell(x[0],x[1]);break}}appendData(P){const x=(0,T.isAncestor)(document.activeElement,this._inputContainer.nativeElement),F=this._table.grid.getActiveCell(),V=x&&this._table.grid.getDataLength()>0&&F;this._tableData.push(this.transformData(P,this.columns)),this.data=this._tableData.getItems().map(W=>Object.values(W)),this.layoutTable(),V&&(this._table.grid.getActiveCell()||this._table.grid.setActiveCell(F.row,F.cell),this._table.grid.getActiveCellNode().focus())}get CSSStyles(){return this.mergeCss(super.CSSStyles,{width:this.getWidth(),height:"100%","font-size":this.fontSize})}};fe([(0,t.Input)()],M.prototype,"descriptor",void 0),fe([(0,t.Input)()],M.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("table",{read:t.ElementRef})],M.prototype,"_inputContainer",void 0),M=k=fe([(0,t.Component)({selector:"modelview-table",template:` <div #table [ngStyle]="CSSStyles"></div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(d.ILogService)),O(3,(0,t.Inject)(c.IContextViewService)),O(4,(0,t.Inject)(c.IContextMenuService)),O(5,(0,t.Inject)(w.IInstantiationService)),O(6,(0,t.Inject)(E.IAccessibilityService)),O(7,(0,t.Inject)(C.IQuickInputService)),O(8,(0,t.Inject)(I.IComponentContextService))],M),e.default=M}),define(Q[3322],Y([1,0,256,187,398,7,4,215,66,43,170,101]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.TableInsight=void 0;let r=class extends T.Disposable{static{a=this}static{this.types=[f.InsightType.Table]}constructor(u,d,p,c,l){super(),this.componentContextService=l,this.types=a.types,this.options={type:f.InsightType.Table};let n=(0,D.$)("div");n.style.width="100%",n.style.height="100%",u.appendChild(n),this.dataView=new t.TableDataView,this.table=new y.Table(n,p,c,h.defaultTableStyles,{dataProvider:this.dataView},{showRowNumber:!0}),this.table.setSelectionModel(new b.CellSelectionModel),this._register(this.componentContextService.registerTable(this.table))}set data(u){this.dataView.clear(),this.dataView.push(i(u.rows,u.columns)),this.columns=s(u.columns),this.table.columns=this.columns}layout(u){this.table.layout(u)}};e.TableInsight=r,e.TableInsight=r=a=fe([O(2,v.IAccessibilityService),O(3,m.IQuickInputService),O(4,S.IComponentContextService)],r);function i(o,u){return o.map(d=>{let p={};return d.forEach((c,l)=>{p[u[l]]=c}),p})}function s(o){return o.map(u=>({name:u,id:u,field:u}))}}),define(Q[3323],Y([1,0,40,7,4,187,256,398,66,43,170,101]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let a=class extends b.Disposable{constructor(o,u,d,p){super(),this._elementRef=o,this.accessibilityService=u,this.quickInputService=d,this.componentContextService=p}ngOnInit(){this.createTable()}set data(o){this.dataView||(this.dataView=new T.TableDataView,this.table&&this.table.setData(this.dataView)),this.dataView.clear(),this.dataView.push(r(o.rows,o.columns)),this.columns=i(o.columns),this.table?this.table.columns=this.columns:this._elementRef&&this._elementRef.nativeElement&&this.createTable()}layout(){this.table&&this.table.layout(new y.Dimension((0,y.getContentWidth)(this._elementRef.nativeElement),(0,y.getContentHeight)(this._elementRef.nativeElement)))}createTable(){this.table||(this.table=new D.Table(this._elementRef.nativeElement,this.accessibilityService,this.quickInputService,h.defaultTableStyles,{dataProvider:this.dataView,columns:this.columns},{showRowNumber:!0}),this.table.setSelectionModel(new f.CellSelectionModel),this._register(this.componentContextService.registerTable(this.table)))}};fe([(0,t.Input)()],a.prototype,"data",null),a=fe([(0,t.Component)({template:""}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(1,(0,t.Inject)(v.IAccessibilityService)),O(2,(0,t.Inject)(m.IQuickInputService)),O(3,(0,t.Inject)(S.IComponentContextService))],a),e.default=a;function r(s,o){return s.map(u=>{const d={};return u.forEach((p,c)=>{d[o[c]]=p}),d})}function i(s){return s.map(o=>({name:o,id:o,field:o}))}}),define(Q[3324],Y([1,0,230,3323,2040]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const D={type:"null",description:b.localize(0,null)};(0,t.registerInsight)("table","",D,y.default)}),define(Q[1200],Y([1,0,34,4,241,199,58,76,2047,7,29,23,63,101]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";var i,s,o,u;Object.defineProperty(e,"__esModule",{value:!0}),e.ShowQueryPaneAction=e.ChangeMaxRowsActionItem=e.ChangeMaxRowsAction=e.StopRefreshTableAction=e.RefreshTableAction=e.EditDataAction=void 0;const d=m.$;let p=class extends t.Action{constructor(C,I,_,A){super(I),this.editor=C,this._connectionManagementService=A,this.enabled=!0,this.setClass(_)}setClass(C){this._classes=[],C&&this._classes.push(C),this.class=this._classes.join(" ")}isConnected(C){return!C||!C.uri?!1:this._connectionManagementService.isConnected(C.uri)}};e.EditDataAction=p,e.EditDataAction=p=fe([O(3,T.IConnectionManagementService)],p);let c=class extends p{static{i=this}static{this.EnabledClass="start"}static{this.ID="refreshTableAction"}constructor(C,I,_,A){super(C,i.ID,i.EnabledClass,_),this._queryModelService=I,this._notificationService=A,this.label=v.localize(0,null)}run(){if(this.isConnected(this.editor)){let C=this.editor.editDataInput,I,_;C.queryPaneEnabled?_=C.queryString=this.editor.getEditorText():I=C.rowLimit,this._queryModelService.disposeEdit(C.uri).then(A=>{this._queryModelService.initializeEdit(C.uri,C.schemaName,C.tableName,C.objectType,I,_),C.showResultsEditor()},A=>{this._notificationService.notify({severity:a.default.Error,message:v.localize(1,null)+A})})}return Promise.resolve(null)}};e.RefreshTableAction=c,e.RefreshTableAction=c=i=fe([O(1,b.IQueryModelService),O(2,T.IConnectionManagementService),O(3,h.INotificationService)],c);let l=class extends p{static{s=this}static{this.EnabledClass="stop"}static{this.ID="stopRefreshAction"}constructor(C,I,_){super(C,s.ID,s.EnabledClass,_),this._queryModelService=I,this.enabled=!1,this.label=v.localize(2,null)}run(){let C=this.editor.editDataInput;return this._queryModelService.disposeEdit(C.uri),Promise.resolve(null)}};e.StopRefreshTableAction=l,e.StopRefreshTableAction=l=s=fe([O(1,b.IQueryModelService),O(2,T.IConnectionManagementService)],l);let n=class extends p{static{o=this}static{this.EnabledClass=""}static{this.ID="changeMaxRowsAction"}constructor(C,I){super(C,o.ID,void 0,I),this.enabled=!1,this.class=o.EnabledClass}run(){return Promise.resolve(null)}};e.ChangeMaxRowsAction=n,e.ChangeMaxRowsAction=n=o=fe([O(1,T.IConnectionManagementService)],n);let g=class extends y.Disposable{constructor(C,I,_){super(),this._editor=C,this.action=I,this._options=["200","1000","10000"],this._currentOptionsIndex=0,this.selectBox=this._register(new D.SelectBox(this._options,this._options[this._currentOptionsIndex],r.defaultSelectBoxStyles,_)),this._registerListeners(),this._refreshOptions(),this.defaultRowCount=Number(this._options[this._currentOptionsIndex])}render(C){this.container=C,this.selectBox.render(m.append(C,d(".configuration.listDatabasesSelectBox")))}setActionContext(C){}isEnabled(){return!0}enable(){this.selectBox.enable()}disable(){this.selectBox.disable()}set setCurrentOptionIndex(C){this._currentOptionsIndex=this._options.findIndex(I=>I===C.toString()),this._refreshOptions()}focus(){this.start.focus()}blur(){this.container.blur()}_refreshOptions(){this.selectBox.setOptions(this._options,this._currentOptionsIndex)}_registerListeners(){this._register(this.selectBox.onDidSelect(C=>{this._currentOptionsIndex=this._options.findIndex(I=>I===C.selected),this._editor.editDataInput.onRowDropDownSet(Number(C.selected))}))}};e.ChangeMaxRowsActionItem=g,e.ChangeMaxRowsActionItem=g=fe([O(2,S.IContextViewService)],g);let w=class extends p{static{u=this}static{this.EnabledClass="filterLabel"}static{this.ID="showQueryPaneAction"}constructor(C,I,_){super(C,u.ID,u.EnabledClass,I),this._telemetryService=_,this.showSqlLabel=v.localize(3,null),this.closeSqlLabel=v.localize(4,null),this.label=this.showSqlLabel}set queryPaneEnabled(C){this.updateLabel(C)}updateLabel(C){C?this.label=this.closeSqlLabel:this.label=this.showSqlLabel}run(){return this.editor.toggleQueryPane(),this._telemetryService.createActionEvent("EditDataEditor","ShowQueryPaneAction").withAdditionalProperties({queryPaneEnabled:this.queryPaneEnabled}).send(),this.updateLabel(this.editor.queryPaneEnabled()),Promise.resolve(null)}};e.ShowQueryPaneAction=w,e.ShowQueryPaneAction=w=u=fe([O(1,T.IConnectionManagementService),O(2,f.IAdsTelemetryService)],w)}),define(Q[3325],Y([1,0,7,2078,40,185,187,407,307,409,410,144,28,29,38,5,284,408,492,66,43,170,101,483]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlertsViewComponent=e.ROW_HEIGHT=e.VIEW_SELECTOR=void 0,e.VIEW_SELECTOR="jobalertsview-component",e.ROW_HEIGHT=45;let g=class extends S.JobManagementView{constructor(E,C,I,_,A,k,L,R,M,N,P,x){super(k,M,L,R,A,C),this._cd=E,this._jobManagementService=I,this._commandService=_,this._accessibilityService=N,this._quickInputService=P,this._componentContextService=x,this.columns=[{name:y.localize(0,null),field:"name",formatter:(W,z,B,K,H)=>this.renderName(W,z,B,K,H),width:500,id:"name"},{name:y.localize(1,null),field:"lastOccurrenceDate",width:150,id:"lastOccurrenceDate"},{name:y.localize(2,null),field:"enabled",width:80,id:"enabled"},{name:y.localize(3,null),field:"delayBetweenResponses",width:200,id:"delayBetweenResponses"},{name:y.localize(4,null),field:"categoryName",width:250,id:"categoryName"}],this.options={syncColumnCellResize:!0,enableColumnReorder:!1,rowHeight:e.ROW_HEIGHT,enableCellNavigation:!0,editable:!1},this.contextAction=m.NewAlertAction,this._didTabChange=!1,this._isCloud=k.connectionManagementService.connectionInfo.serverInfo.isCloud;let V=this._jobManagementService.alertsCacheObjectMap[this._serverName];V?this._alertsCacheObject=V:(this._alertsCacheObject=new u.AlertsCacheObject,this._alertsCacheObject.serverName=this._serverName,this._jobManagementService.addToCache(this._serverName,this._alertsCacheObject))}ngOnInit(){this._visibilityElement=this._gridEl,this._parentComponent=this._agentViewComponent}ngOnDestroy(){this._didTabChange=!0}layout(){let E=t.getContentHeight(this._gridEl.nativeElement)-10;E<0&&(E=0),this._table&&this._table.layout(new t.Dimension(t.getContentWidth(this._gridEl.nativeElement),E))}onFirstVisible(){let E=this,C=!1;this._alertsCacheObject.serverName===this._serverName&&this._alertsCacheObject.alerts&&this._alertsCacheObject.alerts.length>0&&(C=!0,this.alerts=this._alertsCacheObject.alerts);let I=this.columns.map(A=>(A.rerenderOnResize=!0,A));this.dataView=new Slick.Data.DataView({inlineFilters:!1});let _=new d.RowDetailView({cssClass:"_detail_selector",useRowClick:!1,panelRows:1,postTemplate:()=>"",preTemplate:()=>"",process:()=>{}});if(I.unshift(_.getColumnDefinition()),jQuery(this._gridEl.nativeElement).empty(),jQuery(this.actionBarContainer.nativeElement).empty(),this.initActionBar(),this._table=new T.Table(this._gridEl.nativeElement,this._accessibilityService,this._quickInputService,n.defaultTableStyles,{columns:I},this.options),this._register(this._componentContextService.registerTable(this._table)),this._table.grid.setData(this.dataView,!0),this._register(this._table.onContextMenu(A=>{E.openContextMenu(A)})),C&&this._agentViewComponent.refresh!==!0)E.onAlertsAvailable(this.alerts),this._showProgressWheel=!1,this.isVisible&&this._cd.detectChanges();else{let A=this._commonService.connectionManagementService.connectionInfo.ownerUri;this._jobManagementService.getAlerts(A).then(k=>{if(k&&k.alerts&&(E.alerts=k.alerts,E._alertsCacheObject.alerts=k.alerts,E.onAlertsAvailable(k.alerts)),this._showProgressWheel=!1,this.isVisible&&!this._didTabChange)this._cd.detectChanges();else if(this._didTabChange)return})}}onAlertsAvailable(E){let C=E.map(I=>({id:I.id,name:I.name,lastOccurrenceDate:I.lastOccurrenceDate,enabled:I.isEnabled,delayBetweenResponses:I.delayBetweenResponses,categoryName:I.categoryName}));this.dataView.beginUpdate(),this.dataView.setItems(C),this.dataView.endUpdate(),this._alertsCacheObject.dataview=this.dataView,this._table.autosizeColumns(),this._table.resizeCanvas()}getTableActions(){return[this._instantiationService.createInstance(m.EditAlertAction),this._instantiationService.createInstance(m.DeleteAlertAction)]}getCurrentTableObject(E){return{alertInfo:this.alerts&&this.alerts.length>=E?this.alerts[E]:void 0}}renderName(E,C,I,_,A){return'<table class="alertview-alertnametable"><tr class="alertview-alertnamerow"><td nowrap class='+(A.enabled?"alertview-alertnameindicatorenabled":"alertview-alertnameindicatordisabled")+'></td><td nowrap class="alertview-alertnametext">'+A.name+"</td></tr></table>"}async openCreateAlertDialog(){let E=this._commonService.connectionManagementService.connectionInfo.ownerUri;await this._commandService.executeCommand("agent.openAlertDialog",E,null,null)}};e.AlertsViewComponent=g,fe([(0,b.ViewChild)("jobalertsgrid")],g.prototype,"_gridEl",void 0),e.AlertsViewComponent=g=fe([(0,b.Component)({selector:e.VIEW_SELECTOR,templateUrl:decodeURI(q.toUrl("./alertsView.component.html")),providers:[{provide:D.TabChild,useExisting:(0,b.forwardRef)(()=>g)}]}),O(0,(0,b.Inject)((0,b.forwardRef)(()=>b.ChangeDetectorRef))),O(1,(0,b.Inject)((0,b.forwardRef)(()=>f.AgentViewComponent))),O(2,(0,b.Inject)(v.IJobManagementService)),O(3,(0,b.Inject)(a.ICommandService)),O(4,(0,b.Inject)(s.IInstantiationService)),O(5,(0,b.Inject)((0,b.forwardRef)(()=>h.CommonServiceInterface))),O(6,(0,b.Inject)(r.IContextMenuService)),O(7,(0,b.Inject)(i.IKeybindingService)),O(8,(0,b.Inject)(o.IDashboardService)),O(9,(0,b.Inject)(p.IAccessibilityService)),O(10,(0,b.Inject)(c.IQuickInputService)),O(11,(0,b.Inject)(l.IComponentContextService))],g)}),define(Q[3326],Y([1,0,7,2085,40,187,407,307,409,410,144,185,28,29,38,5,284,408,492,66,43,170,101,483]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OperatorsViewComponent=e.ROW_HEIGHT=e.VIEW_SELECTOR=void 0,e.VIEW_SELECTOR="joboperatorsview-component",e.ROW_HEIGHT=45;let g=class extends m.JobManagementView{constructor(E,C,I,_,A,k,L,R,M,N,P,x){super(k,M,L,R,A,C),this._cd=E,this._jobManagementService=I,this._commandService=_,this._accessibilityService=N,this._quickInputService=P,this._componentContextService=x,this.columns=[{name:y.localize(0,null),field:"name",formatter:(W,z,B,K,H)=>this.renderName(W,z,B,K,H),width:200,id:"name"},{name:y.localize(1,null),field:"emailAddress",width:200,id:"emailAddress"},{name:y.localize(2,null),field:"enabled",width:200,id:"enabled"}],this.options={syncColumnCellResize:!0,enableColumnReorder:!1,rowHeight:e.ROW_HEIGHT,enableCellNavigation:!0,editable:!1},this.contextAction=v.NewOperatorAction,this._isCloud=k.connectionManagementService.connectionInfo.serverInfo.isCloud;let V=this._jobManagementService.operatorsCacheObjectMap[this._serverName];V?this._operatorsCacheObject=V:(this._operatorsCacheObject=new u.OperatorsCacheObject,this._operatorsCacheObject.serverName=this._serverName,this._jobManagementService.addToCache(this._serverName,this._operatorsCacheObject))}ngOnInit(){this._visibilityElement=this._gridEl,this._parentComponent=this._agentViewComponent}ngOnDestroy(){this._didTabChange=!0}layout(){let E=t.getContentHeight(this._gridEl.nativeElement)-10;E<0&&(E=0),this._table&&this._table.layout(new t.Dimension(t.getContentWidth(this._gridEl.nativeElement),E))}onFirstVisible(){let E=this,C=!1;this._operatorsCacheObject.serverName===this._serverName&&this._operatorsCacheObject.operators&&this._operatorsCacheObject.operators.length>0&&(C=!0,this.operators=this._operatorsCacheObject.operators);let I=this.columns.map(A=>(A.rerenderOnResize=!0,A));this.dataView=new Slick.Data.DataView({inlineFilters:!1});let _=new d.RowDetailView({cssClass:"_detail_selector",useRowClick:!1,panelRows:1,postTemplate:()=>"",preTemplate:()=>"",process:()=>{}});if(I.unshift(_.getColumnDefinition()),jQuery(this._gridEl.nativeElement).empty(),jQuery(this.actionBarContainer.nativeElement).empty(),this.initActionBar(),this._table=new D.Table(this._gridEl.nativeElement,this._accessibilityService,this._quickInputService,n.defaultTableStyles,{columns:I},this.options),this._table.grid.setData(this.dataView,!0),this._register(this._componentContextService.registerTable(this._table)),this._register(this._table.onContextMenu(A=>{E.openContextMenu(A)})),C&&this._agentViewComponent.refresh!==!0)this.onOperatorsAvailable(this.operators),this._showProgressWheel=!1,this.isVisible&&this._cd.detectChanges();else{let A=this._commonService.connectionManagementService.connectionInfo.ownerUri;this._jobManagementService.getOperators(A).then(k=>{if(k&&k.operators&&(E.operators=k.operators,E._operatorsCacheObject.operators=k.operators,E.onOperatorsAvailable(k.operators)),this._showProgressWheel=!1,this.isVisible&&!this._didTabChange)this._cd.detectChanges();else if(this._didTabChange)return})}}onOperatorsAvailable(E){let C=E.map(I=>({id:I.id,name:I.name,emailAddress:I.emailAddress,enabled:I.enabled}));this.dataView.beginUpdate(),this.dataView.setItems(C),this.dataView.endUpdate(),this._operatorsCacheObject.dataview=this.dataView,this._table.autosizeColumns(),this._table.resizeCanvas()}getTableActions(){return[this._instantiationService.createInstance(v.EditOperatorAction),this._instantiationService.createInstance(v.DeleteOperatorAction)]}getCurrentTableObject(E){return this.operators&&this.operators.length>=E?this.operators[E]:void 0}renderName(E,C,I,_,A){return'<table class="operatorview-operatornametable"><tr class="operatorview-operatornamerow"><td nowrap class='+(A.enabled?"operatorview-operatornameindicatorenabled":"operatorview-operatornameindicatordisabled")+'></td><td nowrap class="operatorview-operatornametext">'+A.name+"</td></tr></table>"}async openCreateOperatorDialog(){let E=this._commonService.connectionManagementService.connectionInfo.ownerUri;await this._commandService.executeCommand("agent.openOperatorDialog",E)}};e.OperatorsViewComponent=g,fe([(0,b.ViewChild)("operatorsgrid")],g.prototype,"_gridEl",void 0),e.OperatorsViewComponent=g=fe([(0,b.Component)({selector:e.VIEW_SELECTOR,templateUrl:decodeURI(q.toUrl("./operatorsView.component.html")),providers:[{provide:h.TabChild,useExisting:(0,b.forwardRef)(()=>g)}]}),O(0,(0,b.Inject)((0,b.forwardRef)(()=>b.ChangeDetectorRef))),O(1,(0,b.Inject)((0,b.forwardRef)(()=>T.AgentViewComponent))),O(2,(0,b.Inject)(f.IJobManagementService)),O(3,(0,b.Inject)(a.ICommandService)),O(4,(0,b.Inject)(s.IInstantiationService)),O(5,(0,b.Inject)((0,b.forwardRef)(()=>S.CommonServiceInterface))),O(6,(0,b.Inject)(r.IContextMenuService)),O(7,(0,b.Inject)(i.IKeybindingService)),O(8,(0,b.Inject)(o.IDashboardService)),O(9,(0,b.Inject)(p.IAccessibilityService)),O(10,(0,b.Inject)(c.IQuickInputService)),O(11,(0,b.Inject)(l.IComponentContextService))],g)}),define(Q[3327],Y([1,0,7,2086,40,187,407,307,409,144,185,410,29,38,28,5,284,408,492,66,43,170,101,483]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxiesViewComponent=e.ROW_HEIGHT=e.VIEW_SELECTOR=void 0,e.VIEW_SELECTOR="jobproxiesview-component",e.ROW_HEIGHT=45;let g=class extends h.JobManagementView{constructor(E,C,I,_,A,k,L,R,M,N,P,x){super(k,M,L,R,A,C),this._cd=E,this._jobManagementService=I,this._commandService=_,this._accessibilityService=N,this._quickInputService=P,this._componentContextService=x,this.columns=[{name:y.localize(0,null),field:"accountName",formatter:(W,z,B,K,H)=>this.renderName(W,z,B,K,H),width:200,id:"accountName"},{name:y.localize(1,null),field:"credentialName",width:200,id:"credentialName"},{name:y.localize(2,null),field:"description",width:200,id:"description"},{name:y.localize(3,null),field:"isEnabled",width:200,id:"isEnabled"}],this.options={syncColumnCellResize:!0,enableColumnReorder:!1,rowHeight:e.ROW_HEIGHT,enableCellNavigation:!0,editable:!1},this.contextAction=v.NewProxyAction,this._isCloud=k.connectionManagementService.connectionInfo.serverInfo.isCloud;let V=this._jobManagementService.proxiesCacheObjectMap[this._serverName];V?this._proxiesCacheObject=V:(this._proxiesCacheObject=new u.ProxiesCacheObject,this._proxiesCacheObject.serverName=this._serverName,this._jobManagementService.addToCache(this._serverName,this._proxiesCacheObject))}ngOnInit(){this._visibilityElement=this._gridEl,this._parentComponent=this._agentViewComponent}ngOnDestroy(){this._didTabChange=!0}layout(){let E=t.getContentHeight(this._gridEl.nativeElement)-10;E<0&&(E=0),this._table&&this._table.layout(new t.Dimension(t.getContentWidth(this._gridEl.nativeElement),E))}onFirstVisible(){let E=this,C=!1;this._proxiesCacheObject.serverName===this._serverName&&this._proxiesCacheObject.proxies&&this._proxiesCacheObject.proxies.length>0&&(C=!0,this.proxies=this._proxiesCacheObject.proxies);let I=this.columns.map(A=>(A.rerenderOnResize=!0,A));this.dataView=new Slick.Data.DataView({inlineFilters:!1});let _=new d.RowDetailView({cssClass:"_detail_selector",useRowClick:!1,panelRows:1,postTemplate:()=>"",preTemplate:()=>"",process:()=>{}});if(I.unshift(_.getColumnDefinition()),jQuery(this._gridEl.nativeElement).empty(),jQuery(this.actionBarContainer.nativeElement).empty(),this.initActionBar(),this._table=new D.Table(this._gridEl.nativeElement,this._accessibilityService,this._quickInputService,n.defaultTableStyles,{columns:I},this.options),this._register(this._componentContextService.registerTable(this._table)),this._table.grid.setData(this.dataView,!0),this._register(this._table.onContextMenu(A=>{E.openContextMenu(A)})),C&&this._agentViewComponent.refresh!==!0)E.onProxiesAvailable(this.proxies),this._showProgressWheel=!1,this.isVisible&&this._cd.detectChanges();else{let A=this._commonService.connectionManagementService.connectionInfo.ownerUri;this._jobManagementService.getProxies(A).then(k=>{if(k&&k.proxies&&(E.proxies=k.proxies,E._proxiesCacheObject.proxies=k.proxies,E.onProxiesAvailable(k.proxies)),this._showProgressWheel=!1,this.isVisible&&!this._didTabChange)this._cd.detectChanges();else if(this._didTabChange)return})}}onProxiesAvailable(E){let C=E.map(I=>({id:I.accountName,accountName:I.accountName,credentialName:I.credentialName,description:I.description,isEnabled:I.isEnabled}));this.dataView.beginUpdate(),this.dataView.setItems(C),this.dataView.endUpdate(),this._proxiesCacheObject.dataview=this.dataView,this._table.autosizeColumns(),this._table.resizeCanvas()}getTableActions(){return[this._instantiationService.createInstance(v.EditProxyAction),this._instantiationService.createInstance(v.DeleteProxyAction)]}getCurrentTableObject(E){return this.proxies&&this.proxies.length>=E?this.proxies[E]:void 0}renderName(E,C,I,_,A){return'<table class="proxyview-proxynametable"><tr class="proxyview-proxynamerow"><td nowrap class='+(A.isEnabled?"proxyview-proxynameindicatorenabled":"proxyview-proxynameindicatordisabled")+'></td><td nowrap class="proxyview-proxynametext">'+A.accountName+"</td></tr></table>"}openCreateProxyDialog(){let E=this._commonService.connectionManagementService.connectionInfo.ownerUri;this._jobManagementService.getCredentials(E).then(async C=>{C&&C.credentials&&await this._commandService.executeCommand("agent.openProxyDialog",E,void 0,C.credentials)})}};e.ProxiesViewComponent=g,fe([(0,b.ViewChild)("proxiesgrid")],g.prototype,"_gridEl",void 0),e.ProxiesViewComponent=g=fe([(0,b.Component)({selector:e.VIEW_SELECTOR,templateUrl:decodeURI(q.toUrl("./proxiesView.component.html")),providers:[{provide:S.TabChild,useExisting:(0,b.forwardRef)(()=>g)}]}),O(0,(0,b.Inject)((0,b.forwardRef)(()=>b.ChangeDetectorRef))),O(1,(0,b.Inject)((0,b.forwardRef)(()=>T.AgentViewComponent))),O(2,(0,b.Inject)(f.IJobManagementService)),O(3,(0,b.Inject)(i.ICommandService)),O(4,(0,b.Inject)(s.IInstantiationService)),O(5,(0,b.Inject)((0,b.forwardRef)(()=>m.CommonServiceInterface))),O(6,(0,b.Inject)(a.IContextMenuService)),O(7,(0,b.Inject)(r.IKeybindingService)),O(8,(0,b.Inject)(o.IDashboardService)),O(9,(0,b.Inject)(p.IAccessibilityService)),O(10,(0,b.Inject)(c.IQuickInputService)),O(11,(0,b.Inject)(l.IComponentContextService))],g)}),define(Q[3328],Y([1,0,40,2098,29,36,67,166,136,271,54,1634]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StdInComponent=e.STDIN_SELECTOR=void 0,e.STDIN_SELECTOR="stdin-component";let h=class extends v.AngularDisposable{constructor(r){super(),this.contextViewService=r}ngAfterViewInit(){let r={placeholder:"",ariaLabel:this.prompt,inputBoxStyles:(0,S.getInputBoxStyle)({inputValidationInfoBackground:(0,D.asCssVariable)(D.inputBackground),inputValidationInfoBorder:(0,D.asCssVariable)(D.inputBorder)})};this._input=new f.InputBox(this._inputContainer.nativeElement,this.contextViewService,r),this.password&&(this._input.inputElement.type="password"),this._register(this._input),this.cellModel&&this._register(this.cellModel.onExecutionStateChange(i=>this.handleExecutionChange(i))),this._input.focus()}handleKeyboardInput(r){let i=new T.StandardKeyboardEvent(r);switch(i.keyCode){case 3:this.onSendInput&&this.onSendInput.resolve(this._input.value),i.stopPropagation();break;case 9:this.onSendInput&&this.onSendInput.reject(""),i.stopPropagation();break;default:break}}handleExecutionChange(r){r!==m.CellExecutionState.Running&&this.onSendInput&&this.onSendInput.reject("")}get prompt(){return this.stdIn&&this.stdIn.content&&this.stdIn.content.prompt?this.stdIn.content.prompt:(0,y.localize)(0,null)}get password(){return this.stdIn&&this.stdIn.content&&this.stdIn.content.password}};e.StdInComponent=h,fe([(0,t.ViewChild)("input",{read:t.ElementRef})],h.prototype,"_inputContainer",void 0),fe([(0,t.Input)()],h.prototype,"stdIn",void 0),fe([(0,t.Input)()],h.prototype,"onSendInput",void 0),fe([(0,t.Input)()],h.prototype,"cellModel",void 0),fe([(0,t.HostListener)("document:keydown",["$event"])],h.prototype,"handleKeyboardInput",null),e.StdInComponent=h=fe([(0,t.Component)({selector:e.STDIN_SELECTOR,template:` <div class="prompt">{{prompt}}</div> <div #input class="input"></div> `}),O(0,(0,t.Inject)(b.IContextViewService))],h)}),define(Q[3329],Y([1,0,187,399,272,403,4,256,41,17,28,2144,23,6,2287,29,66,43,170,101,1648]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceViewerTable=void 0;let c=class extends T.Disposable{constructor(g,w,E,C,I,_,A,k){super(),this._openerService=w,this._commandService=E,this._notificationService=C,this._contextViewService=I,this._accessibilityService=_,this._quickInputService=A,this._componentContextService=k,this._loadingSpinnerPlugin=new i.LoadingSpinnerPlugin,this._onContextMenu=new r.Emitter,this.onContextMenu=this._onContextMenu.event;let L=M=>M.filter(N=>this.filter(N));this._dataView=new f.TableDataView(void 0,void 0,void 0,L),this._resourceViewerTable=this._register(new t.Table(g,this._accessibilityService,this._quickInputService,p.defaultTableStyles,{sorter:M=>{this._dataView.sort(M)}},{dataItemColumnValueExtractor:l})),this._resourceViewerTable.setSelectionModel(new y.RowSelectionModel);let R=new D.HeaderFilter(p.defaultTableFilterStyles,this._contextViewService);this._register(this._resourceViewerTable.onClick(this.onTableClick,this)),this._register(this._resourceViewerTable.onContextMenu(M=>{this._onContextMenu.fire({anchor:M.anchor,item:this._dataView.getItem(M.cell.row)})})),R.onFilterApplied.subscribe(()=>{this._dataView.filter(),this._resourceViewerTable.grid.invalidate(),this._resourceViewerTable.grid.render(),this._resourceViewerTable.grid.resetActiveCell(),this._resourceViewerTable.grid.resizeCanvas()}),R.onCommand.subscribe((M,N)=>{this._dataView.sort({grid:N.grid,multiColumnSort:!1,sortCol:N.column,sortAsc:N.command==="sort-asc"}),this._resourceViewerTable.grid.invalidate(),this._resourceViewerTable.grid.render()}),this._resourceViewerTable.registerPlugin(R),this._resourceViewerTable.registerPlugin(this._loadingSpinnerPlugin),this._register(this._componentContextService.registerTable(this._resourceViewerTable))}set data(g){this._dataView.clear(),this._dataView.push(g),this._resourceViewerTable.grid.setData(this._dataView,!0),this._resourceViewerTable.grid.render()}set columns(g){this._resourceViewerTable.columns=g,this._resourceViewerTable.autosizeColumns()}set loading(g){this._loadingSpinnerPlugin.loading=g}set title(g){this._resourceViewerTable.setTableTitle(g)}registerPlugin(g){this._resourceViewerTable.registerPlugin(g)}unregisterPlugin(g){this._resourceViewerTable.unregisterPlugin(g)}layout(){this._resourceViewerTable.resizeCanvas(),this._resourceViewerTable.autosizeColumns()}focus(){this._resourceViewerTable.focus()}filter(g){const w=this._resourceViewerTable.grid.getColumns();let E=!0;for(let C=0;C<w.length;C++){const I=w[C];if(!I.field)continue;let _=I.filterValues;_&&_.length>0&&(g._parent?E=E&&!!_.find(A=>A===g._parent[I.field]):E=E&&!!_.find(A=>A===g[I.field]))}return E}async onTableClick(g){const w=this._resourceViewerTable.columns[g.cell.cell];if(w){const C=this._dataView.getItem(g.cell.row)[w.field];if((0,b.isHyperlinkCellValue)(C))if((0,m.isString)(C.linkOrCommand))try{await this._openerService.open(C.linkOrCommand)}catch(I){this._notificationService.error((0,h.localize)(0,null,I.message??I))}else try{await this._commandService.executeCommand(C.linkOrCommand.id,...C.linkOrCommand.args??[])}catch(I){this._notificationService.error((0,h.localize)(1,null,C.linkOrCommand.id,I.message??I))}}}};e.ResourceViewerTable=c,e.ResourceViewerTable=c=fe([O(1,v.IOpenerService),O(2,S.ICommandService),O(3,a.INotificationService),O(4,s.IContextViewService),O(5,o.IAccessibilityService),O(6,u.IQuickInputService),O(7,d.IComponentContextService)],c);function l(n,g){const w=n[g.field];return g.type==="hyperlink"?w:{text:w,ariaLabel:w&&escape(w)}}}),define(Q[3330],Y([1,0,7,369,444,306,128,4,26,75,2395,5,38,61,54,579]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityProvider=e.OneReferenceRenderer=e.FileReferencesRenderer=e.IdentityProvider=e.StringRepresentationProvider=e.Delegate=e.DataSource=void 0;let u=class{constructor(I){this._resolverService=I}hasChildren(I){return I instanceof s.ReferencesModel||I instanceof s.FileReferences}getChildren(I){if(I instanceof s.ReferencesModel)return I.groups;if(I instanceof s.FileReferences)return I.resolve(this._resolverService).then(_=>_.children);throw new Error("bad tree")}};e.DataSource=u,e.DataSource=u=fe([O(0,m.ITextModelService)],u);class d{getHeight(){return 23}getTemplateId(I){return I instanceof s.FileReferences?n.id:w.id}}e.Delegate=d;let p=class{constructor(I){this._keybindingService=I}getKeyboardNavigationLabel(I){if(I instanceof s.OneReference){const _=I.parent.getPreview(I)?.preview(I.range);if(_)return _.value}return(0,v.basename)(I.uri)}mightProducePrintableCharacter(I){return this._keybindingService.mightProducePrintableCharacter(I)}};e.StringRepresentationProvider=p,e.StringRepresentationProvider=p=fe([O(0,a.IKeybindingService)],p);class c{getId(I){return I instanceof s.OneReference?I.id:I.uri}}e.IdentityProvider=c;let l=class extends f.Disposable{constructor(I,_){super(),this._labelService=_;const A=document.createElement("div");A.classList.add("reference-file"),this.file=this._register(new D.IconLabel(A,{supportHighlights:!0})),this.badge=new y.CountBadge(t.append(A,t.$(".count")),{},i.defaultCountBadgeStyles),I.appendChild(A)}set(I,_){const A=(0,v.dirname)(I.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(I.uri),this._labelService.getUriLabel(A,{relative:!0}),{title:this._labelService.getUriLabel(I.uri),matches:_});const k=I.children.length;this.badge.setCount(k),k>1?this.badge.setTitleFormat((0,S.localize)(0,null,k)):this.badge.setTitleFormat((0,S.localize)(1,null,k))}};l=fe([O(1,r.ILabelService)],l);let n=class{static{o=this}static{this.id="FileReferencesRenderer"}constructor(I){this._instantiationService=I,this.templateId=o.id}renderTemplate(I){return this._instantiationService.createInstance(l,I)}renderElement(I,_,A){A.set(I.element,(0,T.createMatches)(I.filterData))}disposeTemplate(I){I.dispose()}};e.FileReferencesRenderer=n,e.FileReferencesRenderer=n=o=fe([O(0,h.IInstantiationService)],n);class g{constructor(I){this.label=new b.HighlightedLabel(I)}set(I,_){const A=I.parent.getPreview(I)?.preview(I.range);if(!A||!A.value)this.label.set(`${(0,v.basename)(I.uri)}:${I.range.startLineNumber+1}:${I.range.startColumn+1}`);else{const{value:k,highlight:L}=A;_&&!T.FuzzyScore.isDefault(_)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(k,(0,T.createMatches)(_))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(k,[L]))}}}class w{constructor(){this.templateId=w.id}static{this.id="OneReferenceRenderer"}renderTemplate(I){return new g(I)}renderElement(I,_,A){A.set(I.element,I.filterData)}disposeTemplate(){}}e.OneReferenceRenderer=w;class E{getWidgetAriaLabel(){return(0,S.localize)(2,null)}getAriaLabel(I){return I.ariaMessage}}e.AccessibilityProvider=E}),define(Q[3331],Y([1,0,7,400,179,32,4,18,37,2443,29,38,54,36,1058]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionList=e.ActionListItemKind=e.previewSelectedActionCommand=e.acceptSelectedActionCommand=void 0,e.acceptSelectedActionCommand="acceptSelectedCodeAction",e.previewSelectedActionCommand="previewSelectedCodeAction";var i;(function(n){n.Action="action",n.Header="header"})(i||(e.ActionListItemKind=i={}));class s{get templateId(){return"header"}renderTemplate(g){g.classList.add("group-header");const w=document.createElement("span");return g.append(w),{container:g,text:w}}renderElement(g,w,E){E.text.textContent=g.group?.title??""}disposeTemplate(g){}}let o=class{get templateId(){return"action"}constructor(g,w){this._supportsPreview=g,this._keybindingService=w}renderTemplate(g){g.classList.add(this.templateId);const w=document.createElement("div");w.className="icon",g.append(w);const E=document.createElement("span");E.className="title",g.append(E);const C=new y.KeybindingLabel(g,f.OS);return{container:g,icon:w,text:E,keybinding:C}}renderElement(g,w,E){if(g.group?.icon?(E.icon.className=v.ThemeIcon.asClassName(g.group.icon),g.group.icon.color&&(E.icon.style.color=(0,r.asCssVariable)(g.group.icon.color.id))):(E.icon.className=v.ThemeIcon.asClassName(D.Codicon.lightBulb),E.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!g.item||!g.label)return;E.text.textContent=l(g.label),E.keybinding.set(g.keybinding),t.setVisibility(!!g.keybinding,E.keybinding.element);const C=this._keybindingService.lookupKeybinding(e.acceptSelectedActionCommand)?.getLabel(),I=this._keybindingService.lookupKeybinding(e.previewSelectedActionCommand)?.getLabel();E.container.classList.toggle("option-disabled",g.disabled),g.disabled?E.container.title=g.label:C&&I?this._supportsPreview?E.container.title=(0,m.localize)(0,null,C,I):E.container.title=(0,m.localize)(1,null,C):E.container.title=""}disposeTemplate(g){}};o=fe([O(1,h.IKeybindingService)],o);class u extends UIEvent{constructor(){super("acceptSelectedAction")}}class d extends UIEvent{constructor(){super("previewSelectedAction")}}function p(n){if(n.kind==="action")return n.label}let c=class extends T.Disposable{constructor(g,w,E,C,I,_){super(),this._delegate=C,this._contextViewService=I,this._keybindingService=_,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const A={getHeight:k=>k.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:k=>k.kind};this._list=this._register(new b.List(g,this.domNode,A,[new o(w,this._keybindingService),new s],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:p},accessibilityProvider:{getAriaLabel:k=>{if(k.kind==="action"){let L=k.label?l(k?.label):"";return k.disabled&&(L=(0,m.localize)(2,null,L,k.disabled)),L}return null},getWidgetAriaLabel:()=>(0,m.localize)(3,null),getRole:k=>k.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(a.defaultListStyles),this._register(this._list.onMouseClick(k=>this.onListClick(k))),this._register(this._list.onMouseOver(k=>this.onListHover(k))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(k=>this.onListSelection(k))),this._allMenuItems=E,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(g){return!g.disabled&&g.kind==="action"}hide(g){this._delegate.onHide(g),this._contextViewService.hideContextView()}layout(g){const w=this._allMenuItems.filter(L=>L.kind==="header").length,C=this._allMenuItems.length*this._actionLineHeight+w*this._headerLineHeight-w*this._actionLineHeight;this._list.layout(C);const I=this._allMenuItems.map((L,R)=>{const M=document.getElementById(this._list.getElementID(R));if(M){M.style.width="auto";const N=M.getBoundingClientRect().width;return M.style.width="",N}return 0}),_=Math.max(...I,g),A=.7,k=Math.min(C,document.body.clientHeight*A);return this._list.layout(k,_),this.domNode.style.height=`${k}px`,this._list.domFocus(),_}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(g){const w=this._list.getFocus();if(w.length===0)return;const E=w[0],C=this._list.element(E);if(!this.focusCondition(C))return;const I=g?new d:new u;this._list.setSelection([E],I)}onListSelection(g){if(!g.elements.length)return;const w=g.elements[0];w.item&&this.focusCondition(w)?this._delegate.onSelect(w.item,g.browserEvent instanceof d):this._list.setSelection([])}onListHover(g){this._list.setFocus(typeof g.index=="number"?[g.index]:[])}onListClick(g){g.element&&this.focusCondition(g.element)&&this._list.setFocus([])}};e.ActionList=c,e.ActionList=c=fe([O(4,S.IContextViewService),O(5,h.IKeybindingService)],c);function l(n){return n.replace(/\r\n|\r|\n/g," ")}}),define(Q[1201],Y([1,0,7,85,4,2444,3331,13,8,29,35,5,36,1058]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IActionWidgetService=void 0,(0,a.registerColor)("actionBar.toggledBackground",{dark:a.inputActiveOptionBackground,light:a.inputActiveOptionBackground,hcDark:a.inputActiveOptionBackground,hcLight:a.inputActiveOptionBackground},(0,D.localize)(0,null));const r={Visible:new v.RawContextKey("codeActionMenuVisible",!1,(0,D.localize)(1,null))};e.IActionWidgetService=(0,h.createDecorator)("actionWidgetService");let i=class extends b.Disposable{get isVisible(){return r.Visible.getValue(this._contextKeyService)||!1}constructor(u,d,p){super(),this._contextViewService=u,this._contextKeyService=d,this._instantiationService=p,this._list=this._register(new b.MutableDisposable)}show(u,d,p,c,l,n,g){const w=r.Visible.bindTo(this._contextKeyService),E=this._instantiationService.createInstance(T.ActionList,u,d,p,c);this._contextViewService.showContextView({getAnchor:()=>l,render:C=>(w.set(!0),this._renderWidget(C,E,g??[])),onHide:C=>{w.reset(),this._onWidgetClosed(C)}},n,!1)}acceptSelected(u){this._list.value?.acceptSelected(u)}focusPrevious(){this._list?.value?.focusPrevious()}focusNext(){this._list?.value?.focusNext()}hide(){this._list.value?.hide(),this._list.clear()}clear(){this._list.clear()}_renderWidget(u,d,p){const c=document.createElement("div");if(c.classList.add("action-widget"),u.appendChild(c),this._list.value=d,this._list.value)c.appendChild(this._list.value.domNode);else throw new Error("List has no value");const l=new b.DisposableStore,n=document.createElement("div"),g=u.appendChild(n);g.classList.add("context-view-block"),l.add(t.addDisposableListener(g,t.EventType.MOUSE_DOWN,A=>A.stopPropagation()));const w=document.createElement("div"),E=u.appendChild(w);E.classList.add("context-view-pointerBlock"),l.add(t.addDisposableListener(E,t.EventType.POINTER_MOVE,()=>E.remove())),l.add(t.addDisposableListener(E,t.EventType.MOUSE_DOWN,()=>E.remove()));let C=0;if(p.length){const A=this._createActionBar(".action-widget-action-bar",p);A&&(c.appendChild(A.getContainer().parentElement),l.add(A),C=A.getContainer().offsetWidth)}const I=this._list.value?.layout(C);c.style.width=`${I}px`;const _=l.add(t.trackFocus(u));return l.add(_.onDidBlur(()=>this.hide())),l}_createActionBar(u,d){if(!d.length)return;const p=t.$(u),c=new y.ActionBar(p);return c.push(d,{icon:!1,label:!0}),c}_onWidgetClosed(u){this._list.value?.hide(u)}};i=fe([O(0,m.IContextViewService),O(1,v.IContextKeyService),O(2,h.IInstantiationService)],i),(0,S.registerSingleton)(e.IActionWidgetService,i,1);const s=100+1e3;(0,f.registerAction2)(class extends f.Action2{constructor(){super({id:"hideCodeActionWidget",title:{value:(0,D.localize)(2,null),original:"Hide action widget"},precondition:r.Visible,keybinding:{weight:s,primary:9,secondary:[1033]}})}run(o){o.get(e.IActionWidgetService).hide()}}),(0,f.registerAction2)(class extends f.Action2{constructor(){super({id:"selectPrevCodeAction",title:{value:(0,D.localize)(3,null),original:"Select previous action"},precondition:r.Visible,keybinding:{weight:s,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(o){const u=o.get(e.IActionWidgetService);u instanceof i&&u.focusPrevious()}}),(0,f.registerAction2)(class extends f.Action2{constructor(){super({id:"selectNextCodeAction",title:{value:(0,D.localize)(4,null),original:"Select next action"},precondition:r.Visible,keybinding:{weight:s,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(o){const u=o.get(e.IActionWidgetService);u instanceof i&&u.focusNext()}}),(0,f.registerAction2)(class extends f.Action2{constructor(){super({id:T.acceptSelectedActionCommand,title:{value:(0,D.localize)(5,null),original:"Accept selected action"},precondition:r.Visible,keybinding:{weight:s,primary:3,secondary:[2137]}})}run(o){const u=o.get(e.IActionWidgetService);u instanceof i&&u.acceptSelected()}}),(0,f.registerAction2)(class extends f.Action2{constructor(){super({id:T.previewSelectedActionCommand,title:{value:(0,D.localize)(6,null),original:"Preview selected action"},precondition:r.Visible,keybinding:{weight:s,primary:2051}})}run(o){const u=o.get(e.IActionWidgetService);u instanceof i&&u.acceptSelected(!0)}})}),define(Q[457],Y([1,0,7,15,203,4,51,74,349,3286,3314,1187,513,2368,1201,28,9,8,5,154,72,259,1186]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionController=void 0;let w=class extends D.Disposable{static{g=this}static{this.ID="editor.contrib.codeActionController"}static get(C){return C.getContribution(g.ID)}constructor(C,I,_,A,k,L,R,M,N,P){super(),this._commandService=R,this._configurationService=M,this._actionWidgetService=N,this._instantiationService=P,this._activeCodeActions=this._register(new D.MutableDisposable),this._showDisabled=!1,this._disposed=!1,this._editor=C,this._model=this._register(new n.CodeActionModel(this._editor,k.codeActionProvider,I,_,L)),this._register(this._model.onDidChangeState(x=>this.update(x))),this._lightBulbWidget=new b.Lazy(()=>{const x=this._editor.getContribution(h.LightBulbWidget.ID);return x&&this._register(x.onClick(F=>this.showCodeActionList(F.actions,F,{includeDisabledActions:!1,fromLightbulb:!0}))),x}),this._resolver=A.createInstance(m.CodeActionKeybindingResolver),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(C,I,_){return this.showCodeActionList(I,_,{includeDisabledActions:!1,fromLightbulb:!1})}hideCodeActions(){this._actionWidgetService.hide()}manualTriggerAtCurrentPosition(C,I,_,A){if(!this._editor.hasModel())return;a.MessageController.get(this._editor)?.closeMessage();const k=this._editor.getPosition();this._trigger({type:1,triggerAction:I,filter:_,autoApply:A,context:{notAvailableMessage:C,position:k}})}_trigger(C){return this._model.trigger(C)}async _applyCodeAction(C,I,_){try{await this._instantiationService.invokeFunction(v.applyCodeAction,C,v.ApplyCodeActionReason.FromCodeActions,{preview:_,editor:this._editor})}finally{I&&this._trigger({type:2,triggerAction:l.CodeActionTriggerSource.QuickFix,filter:{}})}}hideLightBulbWidget(){this._lightBulbWidget.rawValue?.hide()}async update(C){if(C.type!==1){this._lightBulbWidget.rawValue?.hide();return}let I;try{I=await C.actions}catch(_){(0,y.onUnexpectedError)(_);return}if(!this._disposed)if(this._lightBulbWidget.value?.update(I,C.trigger,C.position),C.trigger.type===1){if(C.trigger.filter?.include){const A=this.tryGetValidActionToApply(C.trigger,I);if(A){try{this._lightBulbWidget.value?.hide(),await this._applyCodeAction(A,!1,!1)}finally{I.dispose()}return}if(C.trigger.context){const k=this.getInvalidActionThatWouldHaveBeenApplied(C.trigger,I);if(k&&k.action.disabled){a.MessageController.get(this._editor)?.showMessage(k.action.disabled,C.trigger.context.position),I.dispose();return}}}const _=!!C.trigger.filter?.include;if(C.trigger.context&&(!I.allActions.length||!_&&!I.validActions.length)){a.MessageController.get(this._editor)?.showMessage(C.trigger.context.notAvailableMessage,C.trigger.context.position),this._activeCodeActions.value=I,I.dispose();return}this._activeCodeActions.value=I,this.showCodeActionList(I,this.toCoords(C.position),{includeDisabledActions:_,fromLightbulb:!1})}else this._actionWidgetService.isVisible?I.dispose():this._activeCodeActions.value=I}getInvalidActionThatWouldHaveBeenApplied(C,I){if(I.allActions.length&&(C.autoApply==="first"&&I.validActions.length===0||C.autoApply==="ifSingle"&&I.allActions.length===1))return I.allActions.find(({action:_})=>_.disabled)}tryGetValidActionToApply(C,I){if(I.validActions.length&&(C.autoApply==="first"&&I.validActions.length>0||C.autoApply==="ifSingle"&&I.validActions.length===1))return I.validActions[0]}async showCodeActionList(C,I,_){const A=this._editor.getDomNode();if(!A)return;const k=_.includeDisabledActions&&(this._showDisabled||C.validActions.length===0)?C.allActions:C.validActions;if(!k.length)return;const L=T.Position.isIPosition(I)?this.toCoords(I):I,R={onSelect:async(M,N)=>{this._applyCodeAction(M,!0,!!N),this._actionWidgetService.hide()},onHide:()=>{this._editor?.focus()}};this._actionWidgetService.show("codeActionWidget",!0,(0,S.toMenuItems)(k,this._shouldShowHeaders(),this._resolver.getResolver()),R,L,A,this._getActionBarActions(C,I,_))}toCoords(C){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(C,1),this._editor.render();const I=this._editor.getScrolledVisiblePosition(C),_=(0,t.getDomNodePagePosition)(this._editor.getDomNode()),A=_.left+I.left,k=_.top+I.top+I.height;return{x:A,y:k}}_shouldShowHeaders(){const C=this._editor?.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:C?.uri})}_getActionBarActions(C,I,_){if(_.fromLightbulb)return[];const A=C.documentation.map(k=>({id:k.id,label:k.title,tooltip:k.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(k.id,...k.arguments??[])}));return _.includeDisabledActions&&C.validActions.length>0&&C.allActions.length!==C.validActions.length&&A.push(this._showDisabled?{id:"hideMoreActions",label:(0,r.localize)(0,null),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(C,I,_))}:{id:"showMoreActions",label:(0,r.localize)(1,null),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(C,I,_))}),A}};e.CodeActionController=w,e.CodeActionController=w=g=fe([O(1,p.IMarkerService),O(2,u.IContextKeyService),O(3,d.IInstantiationService),O(4,f.ILanguageFeaturesService),O(5,c.IEditorProgressService),O(6,s.ICommandService),O(7,o.IConfigurationService),O(8,i.IActionWidgetService),O(9,d.IInstantiationService)],w)}),define(Q[3332],Y([1,0,33,48,73,349,2366,8,259,457,1186]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoFixAction=e.FixAllAction=e.OrganizeImportsAction=e.SourceAction=e.RefactorAction=e.CodeActionCommand=e.QuickFixAction=void 0;function h(l){return f.ContextKeyExpr.regex(S.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\s|^)"+(0,t.escapeRegExpCharacters)(l.value)+"\\b"))}const a={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:T.localize(0,null)},apply:{type:"string",description:T.localize(1,null),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[T.localize(2,null),T.localize(3,null),T.localize(4,null)]},preferred:{type:"boolean",default:!1,description:T.localize(5,null)}}};function r(l,n,g,w,E=v.CodeActionTriggerSource.Default){l.hasModel()&&m.CodeActionController.get(l)?.manualTriggerAtCurrentPosition(n,E,g,w)}class i extends y.EditorAction{constructor(){super({id:D.quickFixCommandId,label:T.localize(6,null),alias:"Quick Fix...",precondition:f.ContextKeyExpr.and(b.EditorContextKeys.writable,b.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:b.EditorContextKeys.textInputFocus,primary:2137,weight:100}})}run(n,g){return r(g,T.localize(7,null),void 0,void 0,v.CodeActionTriggerSource.QuickFix)}}e.QuickFixAction=i;class s extends y.EditorCommand{constructor(){super({id:D.codeActionCommandId,precondition:f.ContextKeyExpr.and(b.EditorContextKeys.writable,b.EditorContextKeys.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:a}]}})}runEditorCommand(n,g,w){const E=v.CodeActionCommandArgs.fromUser(w,{kind:v.CodeActionKind.Empty,apply:"ifSingle"});return r(g,typeof w?.kind=="string"?E.preferred?T.localize(8,null,w.kind):T.localize(9,null,w.kind):E.preferred?T.localize(10,null):T.localize(11,null),{include:E.kind,includeSourceActions:!0,onlyIncludePreferredActions:E.preferred},E.apply)}}e.CodeActionCommand=s;class o extends y.EditorAction{constructor(){super({id:D.refactorCommandId,label:T.localize(12,null),alias:"Refactor...",precondition:f.ContextKeyExpr.and(b.EditorContextKeys.writable,b.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:b.EditorContextKeys.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:f.ContextKeyExpr.and(b.EditorContextKeys.writable,h(v.CodeActionKind.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:a}]}})}run(n,g,w){const E=v.CodeActionCommandArgs.fromUser(w,{kind:v.CodeActionKind.Refactor,apply:"never"});return r(g,typeof w?.kind=="string"?E.preferred?T.localize(13,null,w.kind):T.localize(14,null,w.kind):E.preferred?T.localize(15,null):T.localize(16,null),{include:v.CodeActionKind.Refactor.contains(E.kind)?E.kind:v.CodeActionKind.None,onlyIncludePreferredActions:E.preferred},E.apply,v.CodeActionTriggerSource.Refactor)}}e.RefactorAction=o;class u extends y.EditorAction{constructor(){super({id:D.sourceActionCommandId,label:T.localize(17,null),alias:"Source Action...",precondition:f.ContextKeyExpr.and(b.EditorContextKeys.writable,b.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:f.ContextKeyExpr.and(b.EditorContextKeys.writable,h(v.CodeActionKind.Source))},description:{description:"Source Action...",args:[{name:"args",schema:a}]}})}run(n,g,w){const E=v.CodeActionCommandArgs.fromUser(w,{kind:v.CodeActionKind.Source,apply:"never"});return r(g,typeof w?.kind=="string"?E.preferred?T.localize(18,null,w.kind):T.localize(19,null,w.kind):E.preferred?T.localize(20,null):T.localize(21,null),{include:v.CodeActionKind.Source.contains(E.kind)?E.kind:v.CodeActionKind.None,includeSourceActions:!0,onlyIncludePreferredActions:E.preferred},E.apply,v.CodeActionTriggerSource.SourceAction)}}e.SourceAction=u;class d extends y.EditorAction{constructor(){super({id:D.organizeImportsCommandId,label:T.localize(22,null),alias:"Organize Imports",precondition:f.ContextKeyExpr.and(b.EditorContextKeys.writable,h(v.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:b.EditorContextKeys.textInputFocus,primary:1581,weight:100}})}run(n,g){return r(g,T.localize(23,null),{include:v.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",v.CodeActionTriggerSource.OrganizeImports)}}e.OrganizeImportsAction=d;class p extends y.EditorAction{constructor(){super({id:D.fixAllCommandId,label:T.localize(24,null),alias:"Fix All",precondition:f.ContextKeyExpr.and(b.EditorContextKeys.writable,h(v.CodeActionKind.SourceFixAll))})}run(n,g){return r(g,T.localize(25,null),{include:v.CodeActionKind.SourceFixAll,includeSourceActions:!0},"ifSingle",v.CodeActionTriggerSource.FixAll)}}e.FixAllAction=p;class c extends y.EditorAction{constructor(){super({id:D.autoFixCommandId,label:T.localize(26,null),alias:"Auto Fix...",precondition:f.ContextKeyExpr.and(b.EditorContextKeys.writable,h(v.CodeActionKind.QuickFix)),kbOpts:{kbExpr:b.EditorContextKeys.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(n,g){return r(g,T.localize(27,null),{include:v.CodeActionKind.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",v.CodeActionTriggerSource.AutoFix)}}e.AutoFixAction=c}),define(Q[3333],Y([1,0,48,456,3332,457,1187,2367,56,16]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerEditorContribution)(D.CodeActionController.ID,D.CodeActionController,3),(0,t.registerEditorContribution)(T.LightBulbWidget.ID,T.LightBulbWidget,4),(0,t.registerEditorAction)(b.QuickFixAction),(0,t.registerEditorAction)(b.RefactorAction),(0,t.registerEditorAction)(b.SourceAction),(0,t.registerEditorAction)(b.OrganizeImportsAction),(0,t.registerEditorAction)(b.AutoFixAction),(0,t.registerEditorAction)(b.FixAllAction),(0,t.registerEditorCommand)(new b.CodeActionCommand),m.Registry.as(v.Extensions.Configuration).registerConfiguration({...y.editorConfigurationBaseNode,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:f.localize(0,null),default:!0}}})}),define(Q[3334],Y([1,0,7,129,832,34,15,4,54]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuHandler=void 0;class m{constructor(h,a,r,i){this.contextViewService=h,this.telemetryService=a,this.notificationService=r,this.keybindingService=i,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(h){this.options=h}showContextMenu(h){const a=h.getActions();if(!a.length)return;this.focusToReturn=document.activeElement;let r;const i=(0,t.isHTMLElement)(h.domForShadowRoot)?h.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>h.getAnchor(),canRelayout:!1,anchorAlignment:h.anchorAlignment,anchorAxisAlignment:h.anchorAxisAlignment,render:s=>{this.lastContainer=s;const o=h.getMenuClassName?h.getMenuClassName():"";o&&(s.className+=" "+o),this.options.blockMouse&&(this.block=s.appendChild((0,t.$)(".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",this.blockDisposable?.dispose(),this.blockDisposable=(0,t.addDisposableListener)(this.block,t.EventType.MOUSE_DOWN,p=>p.stopPropagation()));const u=new f.DisposableStore,d=h.actionRunner||new D.ActionRunner;return d.onWillRun(p=>this.onActionRun(p,!h.skipTelemetry),this,u),d.onDidRun(this.onDidActionRun,this,u),r=new b.Menu(s,a,{actionViewItemProvider:h.getActionViewItem,context:h.getActionsContext?h.getActionsContext():null,actionRunner:d,getKeyBinding:h.getKeyBinding?h.getKeyBinding:p=>this.keybindingService.lookupKeybinding(p.id)},v.defaultMenuStyles),r.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,u),r.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,u),u.add((0,t.addDisposableListener)(window,t.EventType.BLUR,()=>this.contextViewService.hideContextView(!0))),u.add((0,t.addDisposableListener)(window,t.EventType.MOUSE_DOWN,p=>{if(p.defaultPrevented)return;const c=new y.StandardMouseEvent(p);let l=c.target;if(!c.rightButton){for(;l;){if(l===s)return;l=l.parentElement}this.contextViewService.hideContextView(!0)}})),(0,f.combinedDisposable)(u,r)},focus:()=>{r?.focus(!!h.autoSelectFirstItem)},onHide:s=>{h.onHide?.(!!s),this.block&&(this.block.remove(),this.block=null),this.blockDisposable?.dispose(),this.blockDisposable=null,this.lastContainer&&((0,t.getActiveElement)()===this.lastContainer||(0,t.isAncestor)((0,t.getActiveElement)(),this.lastContainer))&&this.focusToReturn?.focus(),this.lastContainer=null}},i,!!i)}onActionRun(h,a){a&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:h.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(h){h.error&&!(0,T.isCancellationError)(h.error)&&this.notificationService.error(h.error)}}e.ContextMenuHandler=m}),define(Q[90],Y([1,0,7,1117,179,1120,404,671,1126,833,6,4,2472,9,56,8,171,29,5,38,16,54]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.workbenchTreeDataPreamble=e.WorkbenchCompressibleAsyncDataTree=e.WorkbenchAsyncDataTree=e.WorkbenchDataTree=e.WorkbenchCompressibleObjectTree=e.WorkbenchObjectTree=e.getSelectionKeyboardEvent=e.WorkbenchTable=e.WorkbenchPagedList=e.WorkbenchList=e.horizontalScrollingKey=e.WorkbenchTreeFindOpen=e.WorkbenchTreeElementHasChild=e.WorkbenchTreeElementCanExpand=e.WorkbenchTreeElementHasParent=e.WorkbenchTreeElementCanCollapse=e.WorkbenchListSupportsFind=e.WorkbenchListSelectionNavigation=e.WorkbenchListMultiSelection=e.WorkbenchListDoubleSelection=e.WorkbenchListHasSelectionOrFocus=e.WorkbenchListFocusContextKey=e.WorkbenchListSupportsMultiSelectContextKey=e.RawWorkbenchListFocusContextKey=e.WorkbenchListScrollAtBottomContextKey=e.WorkbenchListScrollAtTopContextKey=e.RawWorkbenchListScrollAtBoundaryContextKey=e.ListService=e.IListService=void 0,e.IListService=(0,d.createDecorator)("listService");class n{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new h.DisposableStore,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(ge){ge!==this._lastFocusedWidget&&(this._lastFocusedWidget?.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=ge,this._lastFocusedWidget?.getHTMLElement().classList.add("last-focused"))}register(ge,he){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new b.DefaultStyleController((0,t.createStyleSheet)(),"").style(l.defaultListStyles)),this.lists.some(ve=>ve.widget===ge))throw new Error("Cannot register the same widget multiple times");const be={widget:ge,extraContextKeys:he};return this.lists.push(be),ge.getHTMLElement()===document.activeElement&&this.setLastFocusedList(ge),(0,h.combinedDisposable)(ge.onDidFocus(()=>this.setLastFocusedList(ge)),(0,h.toDisposable)(()=>this.lists.splice(this.lists.indexOf(be),1)),ge.onDidDispose(()=>{this.lists=this.lists.filter(ve=>ve!==be),this._lastFocusedWidget===ge&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}}e.ListService=n,e.RawWorkbenchListScrollAtBoundaryContextKey=new s.RawContextKey("listScrollAtBoundary","none"),e.WorkbenchListScrollAtTopContextKey=s.ContextKeyExpr.or(e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("top"),e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("both")),e.WorkbenchListScrollAtBottomContextKey=s.ContextKeyExpr.or(e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("bottom"),e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("both")),e.RawWorkbenchListFocusContextKey=new s.RawContextKey("listFocus",!0),e.WorkbenchListSupportsMultiSelectContextKey=new s.RawContextKey("listSupportsMultiselect",!0),e.WorkbenchListFocusContextKey=s.ContextKeyExpr.and(e.RawWorkbenchListFocusContextKey,s.ContextKeyExpr.not(o.InputFocusedContextKey)),e.WorkbenchListHasSelectionOrFocus=new s.RawContextKey("listHasSelectionOrFocus",!1),e.WorkbenchListDoubleSelection=new s.RawContextKey("listDoubleSelection",!1),e.WorkbenchListMultiSelection=new s.RawContextKey("listMultiSelection",!1),e.WorkbenchListSelectionNavigation=new s.RawContextKey("listSelectionNavigation",!1),e.WorkbenchListSupportsFind=new s.RawContextKey("listSupportsFind",!0),e.WorkbenchTreeElementCanCollapse=new s.RawContextKey("treeElementCanCollapse",!1),e.WorkbenchTreeElementHasParent=new s.RawContextKey("treeElementHasParent",!1),e.WorkbenchTreeElementCanExpand=new s.RawContextKey("treeElementCanExpand",!1),e.WorkbenchTreeElementHasChild=new s.RawContextKey("treeElementHasChild",!1),e.WorkbenchTreeFindOpen=new s.RawContextKey("treeFindOpen",!1);const g="listTypeNavigationMode",w="listAutomaticKeyboardNavigation";function E(de,ge){const he=de.createScoped(ge.getHTMLElement());return e.RawWorkbenchListFocusContextKey.bindTo(he),he}function C(de,ge){const he=e.RawWorkbenchListScrollAtBoundaryContextKey.bindTo(de),be=()=>{const ve=ge.scrollTop===0,Ie=ge.scrollHeight-ge.renderHeight-ge.scrollTop<1;ve&&Ie?he.set("both"):ve?he.set("top"):Ie?he.set("bottom"):he.set("none")};return be(),ge.onDidScroll(be)}const I="workbench.list.multiSelectModifier",_="workbench.list.openMode";e.horizontalScrollingKey="workbench.list.horizontalScrolling";const A="workbench.list.defaultFindMode",k="workbench.list.typeNavigationMode",L="workbench.list.keyboardNavigation",R="workbench.list.scrollByPage",M="workbench.list.defaultFindMatchType",N="workbench.tree.indent",P="workbench.tree.renderIndentGuides",x="workbench.list.smoothScrolling",F="workbench.list.mouseWheelScrollSensitivity",V="workbench.list.fastScrollSensitivity",W="workbench.tree.expandMode";function z(de){return de.getValue(I)==="alt"}class B extends h.Disposable{constructor(ge){super(),this.configurationService=ge,this.useAltAsMultipleSelectionModifier=z(ge),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(ge=>{ge.affectsConfiguration(I)&&(this.useAltAsMultipleSelectionModifier=z(this.configurationService))}))}isSelectionSingleChangeEvent(ge){return this.useAltAsMultipleSelectionModifier?ge.browserEvent.altKey:(0,b.isSelectionSingleChangeEvent)(ge)}isSelectionRangeChangeEvent(ge){return(0,b.isSelectionRangeChangeEvent)(ge)}}function K(de,ge){const he=de.get(r.IConfigurationService),be=de.get(p.IKeybindingService),ve=new h.DisposableStore;return[{...ge,keyboardNavigationDelegate:{mightProducePrintableCharacter(Se){return be.mightProducePrintableCharacter(Se)}},smoothScrolling:!!he.getValue(x),mouseWheelScrollSensitivity:he.getValue(F),fastScrollSensitivity:he.getValue(V),multipleSelectionController:ge.multipleSelectionController??ve.add(new B(he)),keyboardNavigationEventFilter:X(be),scrollByPage:!!he.getValue(R)},ve]}let H=class extends b.List{get onDidOpen(){return this.navigator.onDidOpen}constructor(ge,he,be,ve,Ie,Se,we,ye,Re){const Le=typeof Ie.horizontalScrolling<"u"?Ie.horizontalScrolling:!!ye.getValue(e.horizontalScrollingKey),[Pe,Ae]=Re.invokeFunction(K,Ie);super(ge,he,be,ve,{keyboardSupport:!1,...Pe,horizontalScrolling:Le}),this.disposables.add(Ae),this.contextKeyService=E(Se,this),this.disposables.add(C(this.contextKeyService,this)),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Ie.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!Ie.selectionNavigation),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=Ie.horizontalScrolling,this._useAltAsMultipleSelectionModifier=z(ye),this.disposables.add(this.contextKeyService),this.disposables.add(we.register(this)),this.updateStyles(Ie.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Oe=this.getSelection(),De=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Oe.length>0||De.length>0),this.listMultiSelection.set(Oe.length>1),this.listDoubleSelection.set(Oe.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Oe=this.getSelection(),De=this.getFocus();this.listHasSelectionOrFocus.set(Oe.length>0||De.length>0)})),this.disposables.add(ye.onDidChangeConfiguration(Oe=>{Oe.affectsConfiguration(I)&&(this._useAltAsMultipleSelectionModifier=z(ye));let De={};if(Oe.affectsConfiguration(e.horizontalScrollingKey)&&this.horizontalScrolling===void 0){const Ce=!!ye.getValue(e.horizontalScrollingKey);De={...De,horizontalScrolling:Ce}}if(Oe.affectsConfiguration(R)){const Ce=!!ye.getValue(R);De={...De,scrollByPage:Ce}}if(Oe.affectsConfiguration(x)){const Ce=!!ye.getValue(x);De={...De,smoothScrolling:Ce}}if(Oe.affectsConfiguration(F)){const Ce=ye.getValue(F);De={...De,mouseWheelScrollSensitivity:Ce}}if(Oe.affectsConfiguration(V)){const Ce=ye.getValue(V);De={...De,fastScrollSensitivity:Ce}}Object.keys(De).length>0&&this.updateOptions(De)})),this.navigator=new J(this,{configurationService:ye,...Ie}),this.disposables.add(this.navigator)}updateOptions(ge){super.updateOptions(ge),ge.overrideStyles!==void 0&&this.updateStyles(ge.overrideStyles),ge.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!ge.multipleSelectionSupport)}updateStyles(ge){this.style(ge?(0,l.getListStyles)(ge):l.defaultListStyles)}get useAltAsMultipleSelectionModifier(){return this._useAltAsMultipleSelectionModifier}};e.WorkbenchList=H,e.WorkbenchList=H=fe([O(5,s.IContextKeyService),O(6,e.IListService),O(7,r.IConfigurationService),O(8,d.IInstantiationService)],H);let U=class extends y.PagedList{get onDidOpen(){return this.navigator.onDidOpen}constructor(ge,he,be,ve,Ie,Se,we,ye,Re){const Le=typeof Ie.horizontalScrolling<"u"?Ie.horizontalScrolling:!!ye.getValue(e.horizontalScrollingKey),[Pe,Ae]=Re.invokeFunction(K,Ie);super(ge,he,be,ve,{keyboardSupport:!1,...Pe,horizontalScrolling:Le}),this.disposables=new h.DisposableStore,this.disposables.add(Ae),this.contextKeyService=E(Se,this),this.disposables.add(C(this.contextKeyService,this.widget)),this.horizontalScrolling=Ie.horizontalScrolling,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Ie.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!Ie.selectionNavigation),this._useAltAsMultipleSelectionModifier=z(ye),this.disposables.add(this.contextKeyService),this.disposables.add(we.register(this)),this.updateStyles(Ie.overrideStyles),this.disposables.add(ye.onDidChangeConfiguration(Oe=>{Oe.affectsConfiguration(I)&&(this._useAltAsMultipleSelectionModifier=z(ye));let De={};if(Oe.affectsConfiguration(e.horizontalScrollingKey)&&this.horizontalScrolling===void 0){const Ce=!!ye.getValue(e.horizontalScrollingKey);De={...De,horizontalScrolling:Ce}}if(Oe.affectsConfiguration(R)){const Ce=!!ye.getValue(R);De={...De,scrollByPage:Ce}}if(Oe.affectsConfiguration(x)){const Ce=!!ye.getValue(x);De={...De,smoothScrolling:Ce}}if(Oe.affectsConfiguration(F)){const Ce=ye.getValue(F);De={...De,mouseWheelScrollSensitivity:Ce}}if(Oe.affectsConfiguration(V)){const Ce=ye.getValue(V);De={...De,fastScrollSensitivity:Ce}}Object.keys(De).length>0&&this.updateOptions(De)})),this.navigator=new J(this,{configurationService:ye,...Ie}),this.disposables.add(this.navigator)}updateOptions(ge){super.updateOptions(ge),ge.overrideStyles!==void 0&&this.updateStyles(ge.overrideStyles),ge.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!ge.multipleSelectionSupport)}updateStyles(ge){this.style(ge?(0,l.getListStyles)(ge):l.defaultListStyles)}get useAltAsMultipleSelectionModifier(){return this._useAltAsMultipleSelectionModifier}dispose(){this.disposables.dispose(),super.dispose()}};e.WorkbenchPagedList=U,e.WorkbenchPagedList=U=fe([O(5,s.IContextKeyService),O(6,e.IListService),O(7,r.IConfigurationService),O(8,d.IInstantiationService)],U);let G=class extends D.Table{get onDidOpen(){return this.navigator.onDidOpen}constructor(ge,he,be,ve,Ie,Se,we,ye,Re,Le){const Pe=typeof Se.horizontalScrolling<"u"?Se.horizontalScrolling:!!Re.getValue(e.horizontalScrollingKey),[Ae,Me]=Le.invokeFunction(K,Se);super(ge,he,be,ve,Ie,{keyboardSupport:!1,...Ae,horizontalScrolling:Pe}),this.disposables.add(Me),this.contextKeyService=E(we,this),this.disposables.add(C(this.contextKeyService,this)),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Se.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!Se.selectionNavigation),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=Se.horizontalScrolling,this._useAltAsMultipleSelectionModifier=z(Re),this.disposables.add(this.contextKeyService),this.disposables.add(ye.register(this)),this.updateStyles(Se.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const De=this.getSelection(),Ce=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(De.length>0||Ce.length>0),this.listMultiSelection.set(De.length>1),this.listDoubleSelection.set(De.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const De=this.getSelection(),Ce=this.getFocus();this.listHasSelectionOrFocus.set(De.length>0||Ce.length>0)})),this.disposables.add(Re.onDidChangeConfiguration(De=>{De.affectsConfiguration(I)&&(this._useAltAsMultipleSelectionModifier=z(Re));let Ce={};if(De.affectsConfiguration(e.horizontalScrollingKey)&&this.horizontalScrolling===void 0){const _e=!!Re.getValue(e.horizontalScrollingKey);Ce={...Ce,horizontalScrolling:_e}}if(De.affectsConfiguration(R)){const _e=!!Re.getValue(R);Ce={...Ce,scrollByPage:_e}}if(De.affectsConfiguration(x)){const _e=!!Re.getValue(x);Ce={...Ce,smoothScrolling:_e}}if(De.affectsConfiguration(F)){const _e=Re.getValue(F);Ce={...Ce,mouseWheelScrollSensitivity:_e}}if(De.affectsConfiguration(V)){const _e=Re.getValue(V);Ce={...Ce,fastScrollSensitivity:_e}}Object.keys(Ce).length>0&&this.updateOptions(Ce)})),this.navigator=new j(this,{configurationService:Re,...Se}),this.disposables.add(this.navigator)}updateOptions(ge){super.updateOptions(ge),ge.overrideStyles!==void 0&&this.updateStyles(ge.overrideStyles),ge.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!ge.multipleSelectionSupport)}updateStyles(ge){this.style(ge?(0,l.getListStyles)(ge):l.defaultListStyles)}get useAltAsMultipleSelectionModifier(){return this._useAltAsMultipleSelectionModifier}dispose(){this.disposables.dispose(),super.dispose()}};e.WorkbenchTable=G,e.WorkbenchTable=G=fe([O(6,s.IContextKeyService),O(7,e.IListService),O(8,r.IConfigurationService),O(9,d.IInstantiationService)],G);function $(de="keydown",ge,he){const be=new KeyboardEvent(de);return be.preserveFocus=ge,be.pinned=he,be.__forceEvent=!0,be}e.getSelectionKeyboardEvent=$;class ie extends h.Disposable{constructor(ge,he){super(),this.widget=ge,this._onDidOpen=this._register(new S.Emitter),this.onDidOpen=this._onDidOpen.event,this._register(S.Event.filter(this.widget.onDidChangeSelection,be=>be.browserEvent instanceof KeyboardEvent)(be=>this.onSelectionFromKeyboard(be))),this._register(this.widget.onPointer(be=>this.onPointer(be.element,be.browserEvent))),this._register(this.widget.onMouseDblClick(be=>this.onMouseDblClick(be.element,be.browserEvent))),typeof he?.openOnSingleClick!="boolean"&&he?.configurationService?(this.openOnSingleClick=he?.configurationService.getValue(_)!=="doubleClick",this._register(he?.configurationService.onDidChangeConfiguration(be=>{be.affectsConfiguration(_)&&(this.openOnSingleClick=he?.configurationService.getValue(_)!=="doubleClick")}))):this.openOnSingleClick=he?.openOnSingleClick??!0}onSelectionFromKeyboard(ge){if(ge.elements.length!==1)return;const he=ge.browserEvent,be=typeof he.preserveFocus=="boolean"?he.preserveFocus:!0,ve=typeof he.pinned=="boolean"?he.pinned:!be,Ie=!1;this._open(this.getSelectedElement(),be,ve,Ie,ge.browserEvent)}onPointer(ge,he){if(!this.openOnSingleClick||he.detail===2)return;const ve=he.button===1,Ie=!0,Se=ve,we=he.ctrlKey||he.metaKey||he.altKey;this._open(ge,Ie,Se,we,he)}onMouseDblClick(ge,he){if(!he)return;const be=he.target;if(be.classList.contains("monaco-tl-twistie")||be.classList.contains("monaco-icon-label")&&be.classList.contains("folder-icon")&&he.offsetX<16)return;const Ie=!1,Se=!0,we=he.ctrlKey||he.metaKey||he.altKey;this._open(ge,Ie,Se,we,he)}_open(ge,he,be,ve,Ie){ge&&this._onDidOpen.fire({editorOptions:{preserveFocus:he,pinned:be,revealIfVisible:!0},sideBySide:ve,element:ge,browserEvent:Ie})}}class J extends ie{constructor(ge,he){super(ge,he),this.widget=ge}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class j extends ie{constructor(ge,he){super(ge,he)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class ee extends ie{constructor(ge,he){super(ge,he)}getSelectedElement(){return this.widget.getSelection()[0]??void 0}}function X(de){let ge=!1;return he=>{if(he.toKeyCodeChord().isModifierKey())return!1;if(ge)return ge=!1,!1;const be=de.softDispatch(he,he.target);return be.kind===1?(ge=!0,!1):(ge=!1,be.kind===0)}}let te=class extends m.ObjectTree{get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}constructor(ge,he,be,ve,Ie,Se,we,ye,Re){const{options:Le,getTypeNavigationMode:Pe,disposable:Ae}=Se.invokeFunction(ce,Ie);super(ge,he,be,ve,Le),this.disposables.add(Ae),this.internals=new ae(this,Ie,Pe,Ie.overrideStyles,we,ye,Re),this.disposables.add(this.internals)}updateOptions(ge){super.updateOptions(ge),this.internals.updateOptions(ge)}};e.WorkbenchObjectTree=te,e.WorkbenchObjectTree=te=fe([O(5,d.IInstantiationService),O(6,s.IContextKeyService),O(7,e.IListService),O(8,r.IConfigurationService)],te);let Z=class extends m.CompressibleObjectTree{get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}constructor(ge,he,be,ve,Ie,Se,we,ye,Re){const{options:Le,getTypeNavigationMode:Pe,disposable:Ae}=Se.invokeFunction(ce,Ie);super(ge,he,be,ve,Le),this.disposables.add(Ae),this.internals=new ae(this,Ie,Pe,Ie.overrideStyles,we,ye,Re),this.disposables.add(this.internals)}updateOptions(ge={}){super.updateOptions(ge),ge.overrideStyles&&this.internals.updateStyleOverrides(ge.overrideStyles),this.internals.updateOptions(ge)}};e.WorkbenchCompressibleObjectTree=Z,e.WorkbenchCompressibleObjectTree=Z=fe([O(5,d.IInstantiationService),O(6,s.IContextKeyService),O(7,e.IListService),O(8,r.IConfigurationService)],Z);let se=class extends v.DataTree{get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}constructor(ge,he,be,ve,Ie,Se,we,ye,Re,Le){const{options:Pe,getTypeNavigationMode:Ae,disposable:Me}=we.invokeFunction(ce,Se);super(ge,he,be,ve,Ie,Pe),this.disposables.add(Me),this.internals=new ae(this,Se,Ae,Se.overrideStyles,ye,Re,Le),this.disposables.add(this.internals)}updateOptions(ge={}){super.updateOptions(ge),ge.overrideStyles!==void 0&&this.internals.updateStyleOverrides(ge.overrideStyles),this.internals.updateOptions(ge)}};e.WorkbenchDataTree=se,e.WorkbenchDataTree=se=fe([O(6,d.IInstantiationService),O(7,s.IContextKeyService),O(8,e.IListService),O(9,r.IConfigurationService)],se);let re=class extends f.AsyncDataTree{get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}constructor(ge,he,be,ve,Ie,Se,we,ye,Re,Le){const{options:Pe,getTypeNavigationMode:Ae,disposable:Me}=we.invokeFunction(ce,Se);super(ge,he,be,ve,Ie,Pe),this.disposables.add(Me),this.internals=new ae(this,Se,Ae,Se.overrideStyles,ye,Re,Le),this.disposables.add(this.internals)}updateOptions(ge={}){super.updateOptions(ge),ge.overrideStyles&&this.internals.updateStyleOverrides(ge.overrideStyles),this.internals.updateOptions(ge)}};e.WorkbenchAsyncDataTree=re,e.WorkbenchAsyncDataTree=re=fe([O(6,d.IInstantiationService),O(7,s.IContextKeyService),O(8,e.IListService),O(9,r.IConfigurationService)],re);let oe=class extends f.CompressibleAsyncDataTree{get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}constructor(ge,he,be,ve,Ie,Se,we,ye,Re,Le,Pe){const{options:Ae,getTypeNavigationMode:Me,disposable:Oe}=ye.invokeFunction(ce,we);super(ge,he,be,ve,Ie,Se,Ae),this.disposables.add(Oe),this.internals=new ae(this,we,Me,we.overrideStyles,Re,Le,Pe),this.disposables.add(this.internals)}updateOptions(ge){super.updateOptions(ge),this.internals.updateOptions(ge)}};e.WorkbenchCompressibleAsyncDataTree=oe,e.WorkbenchCompressibleAsyncDataTree=oe=fe([O(7,d.IInstantiationService),O(8,s.IContextKeyService),O(9,e.IListService),O(10,r.IConfigurationService)],oe);function le(de){const ge=de.getValue(A);if(ge==="highlight")return T.TreeFindMode.Highlight;if(ge==="filter")return T.TreeFindMode.Filter;const he=de.getValue(L);if(he==="simple"||he==="highlight")return T.TreeFindMode.Highlight;if(he==="filter")return T.TreeFindMode.Filter}function ne(de){const ge=de.getValue(M);if(ge==="fuzzy")return T.TreeFindMatchType.Fuzzy;if(ge==="contiguous")return T.TreeFindMatchType.Contiguous}function ce(de,ge){const he=de.get(r.IConfigurationService),be=de.get(u.IContextViewService),ve=de.get(s.IContextKeyService),Ie=de.get(d.IInstantiationService),Se=()=>{const Ae=ve.getContextKeyValue(g);if(Ae==="automatic")return b.TypeNavigationMode.Automatic;if(Ae==="trigger"||ve.getContextKeyValue(w)===!1)return b.TypeNavigationMode.Trigger;const Oe=he.getValue(k);if(Oe==="automatic")return b.TypeNavigationMode.Automatic;if(Oe==="trigger")return b.TypeNavigationMode.Trigger},we=ge.horizontalScrolling!==void 0?ge.horizontalScrolling:!!he.getValue(e.horizontalScrollingKey),[ye,Re]=Ie.invokeFunction(K,ge),Le=ge.paddingBottom,Pe=ge.renderIndentGuides!==void 0?ge.renderIndentGuides:he.getValue(P);return{getTypeNavigationMode:Se,disposable:Re,options:{keyboardSupport:!1,...ye,indent:typeof he.getValue(N)=="number"?he.getValue(N):void 0,renderIndentGuides:Pe,smoothScrolling:!!he.getValue(x),defaultFindMode:le(he),defaultFindMatchType:ne(he),horizontalScrolling:we,scrollByPage:!!he.getValue(R),paddingBottom:Le,hideTwistiesOfChildlessElements:ge.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:ge.expandOnlyOnTwistieClick??he.getValue(W)==="doubleClick",contextViewProvider:be,findWidgetStyles:l.defaultFindWidgetStyles}}}e.workbenchTreeDataPreamble=ce;let ae=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(ge,he,be,ve,Ie,Se,we){this.tree=ge,this.disposables=[],this.contextKeyService=E(Ie,ge),this.disposables.push(C(this.contextKeyService,ge)),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(he.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!he.selectionNavigation),this.listSupportFindWidget=e.WorkbenchListSupportsFind.bindTo(this.contextKeyService),this.listSupportFindWidget.set(he.findWidgetEnabled??!0),this.hasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.hasDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.hasMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.treeElementCanCollapse=e.WorkbenchTreeElementCanCollapse.bindTo(this.contextKeyService),this.treeElementHasParent=e.WorkbenchTreeElementHasParent.bindTo(this.contextKeyService),this.treeElementCanExpand=e.WorkbenchTreeElementCanExpand.bindTo(this.contextKeyService),this.treeElementHasChild=e.WorkbenchTreeElementHasChild.bindTo(this.contextKeyService),this.treeFindOpen=e.WorkbenchTreeFindOpen.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=z(we),this.updateStyleOverrides(ve);const Re=()=>{const Pe=ge.getFocus()[0];if(!Pe)return;const Ae=ge.getNode(Pe);this.treeElementCanCollapse.set(Ae.collapsible&&!Ae.collapsed),this.treeElementHasParent.set(!!ge.getParentElement(Pe)),this.treeElementCanExpand.set(Ae.collapsible&&Ae.collapsed),this.treeElementHasChild.set(!!ge.getFirstElementChild(Pe))},Le=new Set;Le.add(g),Le.add(w),this.disposables.push(this.contextKeyService,Se.register(ge),ge.onDidChangeSelection(()=>{const Pe=ge.getSelection(),Ae=ge.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(Pe.length>0||Ae.length>0),this.hasMultiSelection.set(Pe.length>1),this.hasDoubleSelection.set(Pe.length===2)})}),ge.onDidChangeFocus(()=>{const Pe=ge.getSelection(),Ae=ge.getFocus();this.hasSelectionOrFocus.set(Pe.length>0||Ae.length>0),Re()}),ge.onDidChangeCollapseState(Re),ge.onDidChangeModel(Re),ge.onDidChangeFindOpenState(Pe=>this.treeFindOpen.set(Pe)),we.onDidChangeConfiguration(Pe=>{let Ae={};if(Pe.affectsConfiguration(I)&&(this._useAltAsMultipleSelectionModifier=z(we)),Pe.affectsConfiguration(N)){const Me=we.getValue(N);Ae={...Ae,indent:Me}}if(Pe.affectsConfiguration(P)&&he.renderIndentGuides===void 0){const Me=we.getValue(P);Ae={...Ae,renderIndentGuides:Me}}if(Pe.affectsConfiguration(x)){const Me=!!we.getValue(x);Ae={...Ae,smoothScrolling:Me}}if(Pe.affectsConfiguration(A)||Pe.affectsConfiguration(L)){const Me=le(we);Ae={...Ae,defaultFindMode:Me}}if(Pe.affectsConfiguration(k)||Pe.affectsConfiguration(L)){const Me=be();Ae={...Ae,typeNavigationMode:Me}}if(Pe.affectsConfiguration(M)){const Me=ne(we);Ae={...Ae,defaultFindMatchType:Me}}if(Pe.affectsConfiguration(e.horizontalScrollingKey)&&he.horizontalScrolling===void 0){const Me=!!we.getValue(e.horizontalScrollingKey);Ae={...Ae,horizontalScrolling:Me}}if(Pe.affectsConfiguration(R)){const Me=!!we.getValue(R);Ae={...Ae,scrollByPage:Me}}if(Pe.affectsConfiguration(W)&&he.expandOnlyOnTwistieClick===void 0&&(Ae={...Ae,expandOnlyOnTwistieClick:we.getValue(W)==="doubleClick"}),Pe.affectsConfiguration(F)){const Me=we.getValue(F);Ae={...Ae,mouseWheelScrollSensitivity:Me}}if(Pe.affectsConfiguration(V)){const Me=we.getValue(V);Ae={...Ae,fastScrollSensitivity:Me}}Object.keys(Ae).length>0&&ge.updateOptions(Ae)}),this.contextKeyService.onDidChangeContext(Pe=>{Pe.affectsSome(Le)&&ge.updateOptions({typeNavigationMode:be()})})),this.navigator=new ee(ge,{configurationService:we,...he}),this.disposables.push(this.navigator)}get useAltAsMultipleSelectionModifier(){return this._useAltAsMultipleSelectionModifier}updateOptions(ge){ge.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!ge.multipleSelectionSupport)}updateStyleOverrides(ge){this.tree.style(ge?(0,l.getListStyles)(ge):l.defaultListStyles)}dispose(){this.disposables=(0,h.dispose)(this.disposables)}};ae=fe([O(4,s.IContextKeyService),O(5,e.IListService),O(6,r.IConfigurationService)],ae),c.Registry.as(i.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,a.localize)(0,null),type:"object",properties:{[I]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,a.localize)(1,null),(0,a.localize)(2,null)],default:"ctrlCmd",description:(0,a.localize)(3,null)},[_]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,a.localize)(4,null)},[e.horizontalScrollingKey]:{type:"boolean",default:!1,description:(0,a.localize)(5,null)},[R]:{type:"boolean",default:!1,description:(0,a.localize)(6,null)},[N]:{type:"number",default:8,minimum:4,maximum:40,description:(0,a.localize)(7,null)},[P]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,a.localize)(8,null)},[x]:{type:"boolean",default:!1,description:(0,a.localize)(9,null)},[F]:{type:"number",default:1,markdownDescription:(0,a.localize)(10,null)},[V]:{type:"number",default:5,markdownDescription:(0,a.localize)(11,null)},[A]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,a.localize)(12,null),(0,a.localize)(13,null)],default:"highlight",description:(0,a.localize)(14,null)},[L]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,a.localize)(15,null),(0,a.localize)(16,null),(0,a.localize)(17,null)],default:"highlight",description:(0,a.localize)(18,null),deprecated:!0,deprecationMessage:(0,a.localize)(19,null)},[M]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[(0,a.localize)(20,null),(0,a.localize)(21,null)],default:"fuzzy",description:(0,a.localize)(22,null)},[W]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,a.localize)(23,null)},[k]:{type:"string",enum:["automatic","trigger"],default:"automatic",description:(0,a.localize)(24,null)}}})}),define(Q[77],Y([1,0,14,32,37,6,17,10,2488,219,16]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.spinningLoading=e.syncing=e.gotoNextLocation=e.gotoPreviousLocation=e.widgetClose=e.iconsSchemaId=e.getIconRegistry=e.registerIcon=e.IconFontDefinition=e.IconContribution=e.Extensions=void 0,e.Extensions={IconContribution:"base.contributions.icons"};var h;(function(c){function l(n,g){let w=n.defaults;for(;b.ThemeIcon.isThemeIcon(w);){const E=i.getIcon(w.id);if(!E)return;w=E.defaults}return w}c.getDefinition=l})(h||(e.IconContribution=h={}));var a;(function(c){function l(g){return{weight:g.weight,style:g.style,src:g.src.map(w=>({format:w.format,location:w.location.toString()}))}}c.toJSONObject=l;function n(g){const w=E=>(0,T.isString)(E)?E:void 0;if(g&&Array.isArray(g.src)&&g.src.every(E=>(0,T.isString)(E.format)&&(0,T.isString)(E.location)))return{weight:w(g.weight),style:w(g.style),src:g.src.map(E=>({format:E.format,location:f.URI.parse(E.location)}))}}c.fromJSONObject=n})(a||(e.IconFontDefinition=a={}));class r{constructor(){this._onDidChange=new D.Emitter,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,v.localize)(0,null)},fontCharacter:{type:"string",description:(0,v.localize)(1,null)}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${b.ThemeIcon.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(l,n,g,w){const E=this.iconsById[l];if(E){if(g&&!E.description){E.description=g,this.iconSchema.properties[l].markdownDescription=`${g} $(${l})`;const _=this.iconReferenceSchema.enum.indexOf(l);_!==-1&&(this.iconReferenceSchema.enumDescriptions[_]=g),this._onDidChange.fire()}return E}const C={id:l,description:g,defaults:n,deprecationMessage:w};this.iconsById[l]=C;const I={$ref:"#/definitions/icons"};return w&&(I.deprecationMessage=w),g&&(I.markdownDescription=`${g}: $(${l})`),this.iconSchema.properties[l]=I,this.iconReferenceSchema.enum.push(l),this.iconReferenceSchema.enumDescriptions.push(g||""),this._onDidChange.fire(),{id:l}}deregisterIcon(l){delete this.iconsById[l],delete this.iconSchema.properties[l];const n=this.iconReferenceSchema.enum.indexOf(l);n!==-1&&(this.iconReferenceSchema.enum.splice(n,1),this.iconReferenceSchema.enumDescriptions.splice(n,1)),this._onDidChange.fire()}getIcons(){return Object.keys(this.iconsById).map(l=>this.iconsById[l])}getIcon(l){return this.iconsById[l]}getIconSchema(){return this.iconSchema}getIconReferenceSchema(){return this.iconReferenceSchema}registerIconFont(l,n){const g=this.iconFontsById[l];return g||(this.iconFontsById[l]=n,this._onDidChange.fire(),n)}deregisterIconFont(l){delete this.iconFontsById[l]}getIconFont(l){return this.iconFontsById[l]}toString(){const l=(E,C)=>E.id.localeCompare(C.id),n=E=>{for(;b.ThemeIcon.isThemeIcon(E.defaults);)E=this.iconsById[E.defaults.id];return`codicon codicon-${E?E.id:""}`},g=[];g.push("| preview | identifier | default codicon ID | description"),g.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const w=Object.keys(this.iconsById).map(E=>this.iconsById[E]);for(const E of w.filter(C=>!!C.description).sort(l))g.push(`|<i class="${n(E)}"></i>|${E.id}|${b.ThemeIcon.isThemeIcon(E.defaults)?E.defaults.id:E.id}|${E.description||""}|`);g.push("| preview | identifier "),g.push("| ----------- | --------------------------------- |");for(const E of w.filter(C=>!b.ThemeIcon.isThemeIcon(C.defaults)).sort(l))g.push(`|<i class="${n(E)}"></i>|${E.id}|`);return g.join(` `)}}const i=new r;S.Registry.add(e.Extensions.IconContribution,i);function s(c,l,n,g){return i.registerIcon(c,l,n,g)}e.registerIcon=s;function o(){return i}e.getIconRegistry=o;function u(){const c=(0,y.getCodiconFontCharacters)();for(const l in c){const n="\\"+c[l].toString(16);i.registerIcon(l,{fontCharacter:n})}}u(),e.iconsSchemaId="vscode://schemas/icons";const d=S.Registry.as(m.Extensions.JSONContribution);d.registerSchema(e.iconsSchemaId,i.getIconSchema());const p=new t.RunOnceScheduler(()=>d.notifySchemaChanged(e.iconsSchemaId),200);i.onDidChange(()=>{p.isScheduled()||p.schedule()}),e.widgetClose=s("widget-close",y.Codicon.close,(0,v.localize)(2,null)),e.gotoPreviousLocation=s("goto-previous-location",y.Codicon.arrowUp,(0,v.localize)(3,null)),e.gotoNextLocation=s("goto-next-location",y.Codicon.arrowDown,(0,v.localize)(4,null)),e.syncing=b.ThemeIcon.modify(y.Codicon.sync,"spin"),e.spinningLoading=b.ThemeIcon.modify(y.Codicon.loading,"spin")}),define(Q[1202],Y([1,0,7,140,364,85,162,34,32,4,37,258,133,51,50,368,405,303,2343,220,9,77,1718]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DiffReview=void 0;const g=3;var w;(function(R){R[R.Equal=0]="Equal",R[R.Insert=1]="Insert",R[R.Delete=2]="Delete"})(w||(w={}));class E{constructor(M,N,P,x){this.originalLineStart=M,this.originalLineEnd=N,this.modifiedLineStart=P,this.modifiedLineEnd=x}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}var C;(function(R){R.Insert="line-insert",R.Delete="line-delete"})(C||(C={}));class I{constructor(M){this.entries=M}}const _=(0,l.registerIcon)("diff-review-insert",v.Codicon.add,d.localize(0,null)),A=(0,l.registerIcon)("diff-review-remove",v.Codicon.remove,d.localize(1,null)),k=(0,l.registerIcon)("diff-review-close",v.Codicon.close,d.localize(2,null));let L=class extends m.Disposable{static{n=this}static{this._ttPolicy=(0,b.createTrustedTypesPolicy)("diffReview",{createHTML:M=>M})}constructor(M,N,P,x){super(),this._languageService=N,this._audioCueService=P,this._configurationService=x,this._width=0,this._diffEditor=M,this._isVisible=!1,this.shadow=(0,y.createFastDomNode)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,y.createFastDomNode)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new D.ActionBar(this.actionBarContainer.domNode)),this._actionBar.push(new f.Action("diffreview.close",d.localize(3,null),"close-diff-review "+S.ThemeIcon.asClassName(k),!0,async()=>this.hide()),{label:!1,icon:!0}),this.domNode=(0,y.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,y.createFastDomNode)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new T.DomScrollableElement(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(M.onDidUpdateDiff(()=>{this._isVisible&&(this._diffs=this._compute(),this._render())})),this._register(M.getModifiedEditor().onDidChangeCursorPosition(()=>{this._isVisible&&this._render()})),this._register(t.addStandardDisposableListener(this.domNode.domNode,"click",F=>{F.preventDefault();const V=t.findParentWithClass(F.target,"diff-review-row");V&&this._goToRow(V)})),this._register(t.addStandardDisposableListener(this.domNode.domNode,"keydown",F=>{(F.equals(18)||F.equals(2066)||F.equals(530))&&(F.preventDefault(),this._goToRow(this._getNextRow(),"next")),(F.equals(16)||F.equals(2064)||F.equals(528))&&(F.preventDefault(),this._goToRow(this._getPrevRow(),"previous")),(F.equals(9)||F.equals(2057)||F.equals(521)||F.equals(1033)||F.equals(10)||F.equals(3))&&(F.preventDefault(),this.accept())})),this._register(this._configurationService.onDidChangeConfiguration(F=>{F.affectsConfiguration("accessibility.verbosity.diffEditor")&&this._diffEditor.updateOptions({accessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.diffEditor")})})),this._diffs=[],this._currentDiff=null}prev(){let M=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let P=-1;for(let x=0,F=this._diffs.length;x<F;x++)if(this._diffs[x]===this._currentDiff){P=x;break}M=this._diffs.length+P-1}else M=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;M=M%this._diffs.length;const N=this._diffs[M].entries;this._diffEditor.setPosition(new r.Position(N[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:N[0].modifiedLineStart,endColumn:1073741824,endLineNumber:N[N.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getPrevRow(),"previous")}next(){let M=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let P=-1;for(let x=0,F=this._diffs.length;x<F;x++)if(this._diffs[x]===this._currentDiff){P=x;break}M=P+1}else M=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;M=M%this._diffs.length;const N=this._diffs[M].entries;this._diffEditor.setPosition(new r.Position(N[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:N[0].modifiedLineStart,endColumn:1073741824,endLineNumber:N[N.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow(),"next")}accept(){let M=-1;const N=this._getCurrentFocusedRow();if(N){const P=parseInt(N.getAttribute("data-line"),10);isNaN(P)||(M=P)}this.hide(),M!==-1&&(this._diffEditor.setPosition(new r.Position(M,1)),this._diffEditor.revealPosition(new r.Position(M,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){const M=this._getCurrentFocusedRow();return M?M.previousElementSibling?M.previousElementSibling:M:this._getFirstRow()}_getNextRow(){const M=this._getCurrentFocusedRow();return M?M.nextElementSibling?M.nextElementSibling:M:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){const M=document.activeElement;return M&&/diff-review-row/.test(M.className)?M:null}_goToRow(M,N){const P=this._getCurrentFocusedRow();M.tabIndex=0,M.focus(),P&&P!==M&&(P.tabIndex=-1);const x=N?N==="next"?P?.nextElementSibling:P?.previousElementSibling:P;x?.classList.contains("line-insert")?this._audioCueService.playAudioCue(p.AudioCue.diffLineInserted,{allowManyInParallel:!0}):x?.classList.contains("line-delete")&&this._audioCueService.playAudioCue(p.AudioCue.diffLineDeleted,{allowManyInParallel:!0}),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(M,N,P){this._width=N,this.shadow.setTop(M-6),this.shadow.setWidth(N),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(M),this.domNode.setWidth(N),this.domNode.setHeight(P),this._content.setHeight(P),this._content.setWidth(N),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const M=this._diffEditor.getLineChanges();if(!M||M.length===0)return[];const N=this._diffEditor.getOriginalEditor().getModel(),P=this._diffEditor.getModifiedEditor().getModel();return!N||!P?[]:n._mergeAdjacent(M,N.getLineCount(),P.getLineCount())}static _mergeAdjacent(M,N,P){if(!M||M.length===0)return[];const x=[];let F=0;for(let B=0,K=M.length;B<K;B++){const H=M[B],U=H.originalStartLineNumber,G=H.originalEndLineNumber,$=H.modifiedStartLineNumber,ie=H.modifiedEndLineNumber,J=[];let j=0;{const ee=G===0?U:U-1,X=ie===0?$:$-1;let te=1,Z=1;if(B>0){const oe=M[B-1];oe.originalEndLineNumber===0?te=oe.originalStartLineNumber+1:te=oe.originalEndLineNumber+1,oe.modifiedEndLineNumber===0?Z=oe.modifiedStartLineNumber+1:Z=oe.modifiedEndLineNumber+1}let se=ee-g+1,re=X-g+1;if(se<te){const oe=te-se;se=se+oe,re=re+oe}if(re<Z){const oe=Z-re;se=se+oe,re=re+oe}J[j++]=new E(se,ee,re,X)}G!==0&&(J[j++]=new E(U,G,0,0)),ie!==0&&(J[j++]=new E(0,0,$,ie));{const ee=G===0?U+1:G+1,X=ie===0?$+1:ie+1;let te=N,Z=P;if(B+1<K){const oe=M[B+1];oe.originalEndLineNumber===0?te=oe.originalStartLineNumber:te=oe.originalStartLineNumber-1,oe.modifiedEndLineNumber===0?Z=oe.modifiedStartLineNumber:Z=oe.modifiedStartLineNumber-1}let se=ee+g-1,re=X+g-1;if(se>te){const oe=te-se;se=se+oe,re=re+oe}if(re>Z){const oe=Z-re;se=se+oe,re=re+oe}J[j++]=new E(ee,se,X,re)}x[F++]=new I(J)}let V=x[0].entries;const W=[];let z=0;for(let B=1,K=x.length;B<K;B++){const H=x[B].entries,U=V[V.length-1],G=H[0];if(U.getType()===0&&G.getType()===0&&G.originalLineStart<=U.originalLineEnd){V[V.length-1]=new E(U.originalLineStart,G.originalLineEnd,U.modifiedLineStart,G.modifiedLineEnd),V=V.concat(H.slice(1));continue}W[z++]=new I(V),V=H}return W[z++]=new I(V),W}_findDiffIndex(M){const N=M.lineNumber;for(let P=0,x=this._diffs.length;P<x;P++){const F=this._diffs[P].entries,V=F[F.length-1].modifiedLineEnd;if(N<=V)return P}return 0}_render(){const M=this._diffEditor.getOriginalEditor().getOptions(),N=this._diffEditor.getModifiedEditor().getOptions(),P=this._diffEditor.getOriginalEditor().getModel(),x=this._diffEditor.getModifiedEditor().getModel(),F=P.getOptions(),V=x.getOptions();if(!this._isVisible||!P||!x){t.clearNode(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const W=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[W]===this._currentDiff)return;this._currentDiff=this._diffs[W];const z=this._diffs[W].entries,B=document.createElement("div");B.className="diff-review-table",B.setAttribute("role","list"),B.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),(0,h.applyFontInfo)(B,N.get(49));let K=0,H=0,U=0,G=0;for(let re=0,oe=z.length;re<oe;re++){const le=z[re],ne=le.originalLineStart,ce=le.originalLineEnd,ae=le.modifiedLineStart,ue=le.modifiedLineEnd;ne!==0&&(K===0||ne<K)&&(K=ne),ce!==0&&(H===0||ce>H)&&(H=ce),ae!==0&&(U===0||ae<U)&&(U=ae),ue!==0&&(G===0||ue>G)&&(G=ue)}const $=document.createElement("div");$.className="diff-review-row";const ie=document.createElement("div");ie.className="diff-review-cell diff-review-summary";const J=H-K+1,j=G-U+1;ie.appendChild(document.createTextNode(`${W+1}/${this._diffs.length}: @@ -${K},${J} +${U},${j} @@`)),$.setAttribute("data-line",String(U));const ee=re=>re===0?d.localize(4,null):re===1?d.localize(5,null):d.localize(6,null,re),X=ee(J),te=ee(j);$.setAttribute("aria-label",d.localize(7,null,W+1,this._diffs.length,K,X,U,te)),$.appendChild(ie),$.setAttribute("role","listitem"),B.appendChild($);const Z=N.get(65);let se=U;for(let re=0,oe=z.length;re<oe;re++){const le=z[re];n._renderSection(B,le,se,Z,this._width,M,P,F,N,x,V,this._languageService.languageIdCodec),le.modifiedLineStart!==0&&(se=le.modifiedLineEnd)}t.clearNode(this._content.domNode),this._content.domNode.appendChild(B),this.scrollbar.scanDomNode()}static _renderSection(M,N,P,x,F,V,W,z,B,K,H,U){const G=N.getType();let $="diff-review-row",ie="";const J="diff-review-spacer";let j=null;switch(G){case 1:$="diff-review-row line-insert",ie=" char-insert",j=_;break;case 2:$="diff-review-row line-delete",ie=" char-delete",j=A;break}const ee=N.originalLineStart,X=N.originalLineEnd,te=N.modifiedLineStart,Z=N.modifiedLineEnd,se=Math.max(Z-te,X-ee),re=V.get(142),oe=re.glyphMarginWidth+re.lineNumbersWidth,le=B.get(142),ne=10+le.glyphMarginWidth+le.lineNumbersWidth;for(let ce=0;ce<=se;ce++){const ae=ee===0?0:ee+ce,ue=te===0?0:te+ce,de=document.createElement("div");de.style.minWidth=F+"px",de.className=$,de.setAttribute("role","listitem"),ue!==0&&(P=ue),de.setAttribute("data-line",String(P));const ge=document.createElement("div");ge.className="diff-review-cell",ge.style.height=`${x}px`,de.appendChild(ge);const he=document.createElement("span");he.style.width=oe+"px",he.style.minWidth=oe+"px",he.className="diff-review-line-number"+ie,ae!==0?he.appendChild(document.createTextNode(String(ae))):he.innerText="\xA0",ge.appendChild(he);const be=document.createElement("span");be.style.width=ne+"px",be.style.minWidth=ne+"px",be.style.paddingRight="10px",be.className="diff-review-line-number"+ie,ue!==0?be.appendChild(document.createTextNode(String(ue))):be.innerText="\xA0",ge.appendChild(be);const ve=document.createElement("span");if(ve.className=J,j){const we=document.createElement("span");we.className=S.ThemeIcon.asClassName(j),we.innerText="\xA0\xA0",ve.appendChild(we)}else ve.innerText="\xA0\xA0";ge.appendChild(ve);let Ie;if(ue!==0){let we=this._renderLine(K,B,H.tabSize,ue,U);n._ttPolicy&&(we=n._ttPolicy.createHTML(we)),ge.insertAdjacentHTML("beforeend",we),Ie=K.getLineContent(ue)}else{let we=this._renderLine(W,V,z.tabSize,ae,U);n._ttPolicy&&(we=n._ttPolicy.createHTML(we)),ge.insertAdjacentHTML("beforeend",we),Ie=W.getLineContent(ae)}Ie.length===0&&(Ie=d.localize(8,null));let Se="";switch(G){case 0:ae===ue?Se=d.localize(9,null,Ie,ae):Se=d.localize(10,null,Ie,ae,ue);break;case 1:Se=d.localize(11,null,Ie,ue);break;case 2:Se=d.localize(12,null,Ie,ae);break}de.setAttribute("aria-label",Se),M.appendChild(de)}}static _renderLine(M,N,P,x,F){const V=M.getLineContent(x),W=N.get(49),z=s.LineTokens.createEmpty(V,F),B=u.ViewLineRenderingData.isBasicASCII(V,M.mightContainNonBasicASCII()),K=u.ViewLineRenderingData.containsRTL(V,B,M.mightContainRTL());return(0,o.renderViewLine2)(new o.RenderLineInput(W.isMonospace&&!N.get(32),W.canUseHalfwidthRightwardsArrow,V,!1,B,K,0,z,[],P,0,W.spaceWidth,W.middotWidth,W.wsmiddotWidth,N.get(115),N.get(97),N.get(92),N.get(50)!==a.EditorFontLigatures.OFF,null)).html}};e.DiffReview=L,e.DiffReview=L=n=fe([O(1,i.ILanguageService),O(2,p.IAudioCueService),O(3,c.IConfigurationService)],L)}),define(Q[3335],Y([1,0,7,85,162,34,32,4,109,37,258,391,1202,133,238,366,51,27,438,50,368,405,303,2334,220,5,77]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibleDiffViewer=void 0;const I=(0,C.registerIcon)("diff-review-insert",T.Codicon.add,(0,g.localize)(0,null)),_=(0,C.registerIcon)("diff-review-remove",T.Codicon.remove,(0,g.localize)(1,null)),A=(0,C.registerIcon)("diff-review-close",T.Codicon.close,(0,g.localize)(2,null));let k=class extends f.Disposable{constructor(U,G,$,ie,J,j,ee,X,te){super(),this._parentNode=U,this._visible=G,this._setVisible=$,this._canClose=ie,this._width=J,this._height=j,this._diffs=ee,this._editors=X,this._instantiationService=te,this.model=(0,v.derivedWithStore)("model",(Z,se)=>{const re=this._visible.read(Z);if(this._parentNode.style.visibility=re?"visible":"hidden",!re)return null;const oe=se.add(this._instantiationService.createInstance(L,this._diffs,this._editors,this._setVisible,this._canClose)),le=se.add(this._instantiationService.createInstance(z,this._parentNode,oe,this._width,this._height,this._editors));return{model:oe,view:le}}),this._register((0,v.keepAlive)(this.model,!0))}next(){(0,v.transaction)(U=>{const G=this._visible.get();this._setVisible(!0,U),G&&this.model.get().model.nextGroup(U)})}prev(){(0,v.transaction)(U=>{this._setVisible(!0,U),this.model.get().model.previousGroup(U)})}close(){(0,v.transaction)(U=>{this._setVisible(!1,U)})}};e.AccessibleDiffViewer=k,e.AccessibleDiffViewer=k=fe([O(8,E.IInstantiationService)],k);let L=class extends f.Disposable{constructor(U,G,$,ie,J){super(),this._diffs=U,this._editors=G,this._setVisible=$,this.canClose=ie,this._audioCueService=J,this._groups=(0,v.observableValue)("groups",[]),this._currentGroupIdx=(0,v.observableValue)("currentGroupIdx",0),this._currentElementIdx=(0,v.observableValue)("currentElementIdx",0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((j,ee)=>this._groups.read(ee)[j]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((j,ee)=>this.currentGroup.read(ee)?.lines[j]),this._register((0,v.autorun)(j=>{const ee=this._diffs.read(j);if(!ee){this._groups.set([],void 0);return}const X=M(ee,this._editors.original.getModel().getLineCount(),this._editors.modified.getModel().getLineCount());(0,v.transaction)(te=>{const Z=this._editors.modified.getPosition();if(Z){const se=X.findIndex(re=>Z?.lineNumber<re.range.modified.endLineNumberExclusive);se!==-1&&this._currentGroupIdx.set(se,te)}this._groups.set(X,te)})})),this._register((0,v.autorun)(j=>{const ee=this.currentElement.read(j);ee?.type===N.Deleted?this._audioCueService.playAudioCue(w.AudioCue.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):ee?.type===N.Added&&this._audioCueService.playAudioCue(w.AudioCue.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register((0,v.autorun)(j=>{const ee=this.currentElement.read(j);if(ee&&ee.type!==N.Header){const X=ee.modifiedLineNumber??ee.diff.modifiedRange.startLineNumber;this._editors.modified.setSelection(u.Range.fromPositions(new o.Position(X,1)))}}))}_goToGroupDelta(U,G){const $=this.groups.get();!$||$.length<=1||(0,v.subtransaction)(G,ie=>{this._currentGroupIdx.set(s.OffsetRange.ofLength($.length).clipCyclic(this._currentGroupIdx.get()+U),ie),this._currentElementIdx.set(0,ie)})}nextGroup(U){this._goToGroupDelta(1,U)}previousGroup(U){this._goToGroupDelta(-1,U)}_goToLineDelta(U){const G=this.currentGroup.get();!G||G.lines.length<=1||(0,v.transaction)($=>{this._currentElementIdx.set(s.OffsetRange.ofLength(G.lines.length).clip(this._currentElementIdx.get()+U),$)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(U){const G=this.currentGroup.get();if(!G)return;const $=G.lines.indexOf(U);$!==-1&&(0,v.transaction)(ie=>{this._currentElementIdx.set($,ie)})}revealCurrentElementInEditor(){this._setVisible(!1,void 0);const U=this.currentElement.get();U&&(U.type===N.Deleted?(this._editors.original.setSelection(u.Range.fromPositions(new o.Position(U.originalLineNumber,1))),this._editors.original.revealLine(U.originalLineNumber),this._editors.original.focus()):(U.type!==N.Header&&(this._editors.modified.setSelection(u.Range.fromPositions(new o.Position(U.modifiedLineNumber,1))),this._editors.modified.revealLine(U.modifiedLineNumber)),this._editors.modified.focus()))}close(){this._setVisible(!1,void 0),this._editors.modified.focus()}};L=fe([O(4,w.IAudioCueService)],L);const R=3;function M(H,U,G){const $=[];for(const ie of K(H,(J,j)=>j.modifiedRange.startLineNumber-J.modifiedRange.endLineNumberExclusive<2*R)){const J=[];J.push(new x);const j=new i.LineRange(Math.max(1,ie[0].originalRange.startLineNumber-R),Math.min(ie[ie.length-1].originalRange.endLineNumberExclusive+R,U+1)),ee=new i.LineRange(Math.max(1,ie[0].modifiedRange.startLineNumber-R),Math.min(ie[ie.length-1].modifiedRange.endLineNumberExclusive+R,G+1));B(ie,(Z,se)=>{const re=new i.LineRange(Z?Z.originalRange.endLineNumberExclusive:j.startLineNumber,se?se.originalRange.startLineNumber:j.endLineNumberExclusive),oe=new i.LineRange(Z?Z.modifiedRange.endLineNumberExclusive:ee.startLineNumber,se?se.modifiedRange.startLineNumber:ee.endLineNumberExclusive);re.forEach(le=>{J.push(new W(le,oe.startLineNumber+(le-re.startLineNumber)))}),se&&(se.originalRange.forEach(le=>{J.push(new F(se,le))}),se.modifiedRange.forEach(le=>{J.push(new V(se,le))}))});const X=ie[0].modifiedRange.join(ie[ie.length-1].modifiedRange),te=ie[0].originalRange.join(ie[ie.length-1].originalRange);$.push(new P(new d.SimpleLineRangeMapping(X,te),J))}return $}var N;(function(H){H[H.Header=0]="Header",H[H.Unchanged=1]="Unchanged",H[H.Deleted=2]="Deleted",H[H.Added=3]="Added"})(N||(N={}));class P{constructor(U,G){this.range=U,this.lines=G}}class x{constructor(){this.type=N.Header}}class F{constructor(U,G){this.diff=U,this.originalLineNumber=G,this.type=N.Deleted,this.modifiedLineNumber=void 0}}class V{constructor(U,G){this.diff=U,this.modifiedLineNumber=G,this.type=N.Added,this.originalLineNumber=void 0}}class W{constructor(U,G){this.originalLineNumber=U,this.modifiedLineNumber=G,this.type=N.Unchanged}}let z=class extends f.Disposable{constructor(U,G,$,ie,J,j){super(),this._element=U,this._model=G,this._width=$,this._height=ie,this._editors=J,this._languageService=j,this.domNode=this._element,this.domNode.className="diff-review monaco-editor-background";const ee=document.createElement("div");ee.className="diff-review-actions",this._actionBar=this._register(new y.ActionBar(ee)),this._register((0,v.autorun)(X=>{this._actionBar.clear(),this._model.canClose.read(X)&&this._actionBar.push(new D.Action("diffreview.close",(0,g.localize)(3,null),"close-diff-review "+m.ThemeIcon.asClassName(A),!0,async()=>G.close()),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new b.DomScrollableElement(this._content,{})),(0,t.reset)(this.domNode,this._scrollbar.getDomNode(),ee),this._register((0,f.toDisposable)(()=>{(0,t.reset)(this.domNode)})),this._register((0,h.applyStyle)(this.domNode,{width:this._width,height:this._height})),this._register((0,h.applyStyle)(this._content,{width:this._width,height:this._height})),this._register((0,v.autorunWithStore)((X,te)=>{this._model.currentGroup.read(X),this._render(te)})),this._register((0,t.addStandardDisposableListener)(this.domNode,"keydown",X=>{(X.equals(18)||X.equals(2066)||X.equals(530))&&(X.preventDefault(),this._model.goToNextLine()),(X.equals(16)||X.equals(2064)||X.equals(528))&&(X.preventDefault(),this._model.goToPreviousLine()),(X.equals(9)||X.equals(2057)||X.equals(521)||X.equals(1033))&&(X.preventDefault(),this._model.close()),(X.equals(10)||X.equals(3))&&(X.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(U){const G=this._editors.original.getOptions(),$=this._editors.modified.getOptions(),ie=document.createElement("div");ie.className="diff-review-table",ie.setAttribute("role","list"),ie.setAttribute("aria-label",(0,g.localize)(4,null)),(0,S.applyFontInfo)(ie,$.get(49)),(0,t.reset)(this._content,ie);const J=this._editors.original.getModel(),j=this._editors.modified.getModel();if(!J||!j)return;const ee=J.getOptions(),X=j.getOptions(),te=$.get(65),Z=this._model.currentGroup.get();for(const se of Z?.lines||[]){if(!Z)break;let re;if(se.type===N.Header){const le=document.createElement("div");le.className="diff-review-row",le.setAttribute("role","listitem");const ne=Z.range,ce=this._model.currentGroupIndex.get(),ae=this._model.groups.get().length,ue=be=>be===0?(0,g.localize)(5,null):be===1?(0,g.localize)(6,null):(0,g.localize)(7,null,be),de=ue(ne.original.length),ge=ue(ne.modified.length);le.setAttribute("aria-label",(0,g.localize)(8,null,ce+1,ae,ne.original.startLineNumber,de,ne.modified.startLineNumber,ge));const he=document.createElement("div");he.className="diff-review-cell diff-review-summary",he.appendChild(document.createTextNode(`${ce+1}/${ae}: @@ -${ne.original.startLineNumber},${ne.original.length} +${ne.modified.startLineNumber},${ne.modified.length} @@`)),le.appendChild(he),re=le}else re=this._createRow(se,te,this._width.get(),G,J,ee,$,j,X);ie.appendChild(re);const oe=(0,v.derived)(le=>this._model.currentElement.read(le)===se);U.add((0,v.autorun)(le=>{const ne=oe.read(le);re.tabIndex=ne?0:-1,ne&&re.focus()})),U.add((0,t.addDisposableListener)(re,"focus",()=>{this._model.goToLine(se)}))}this._scrollbar.scanDomNode()}_createRow(U,G,$,ie,J,j,ee,X,te){const Z=ie.get(142),se=Z.glyphMarginWidth+Z.lineNumbersWidth,re=ee.get(142),oe=10+re.glyphMarginWidth+re.lineNumbersWidth;let le="diff-review-row",ne="";const ce="diff-review-spacer";let ae=null;switch(U.type){case N.Added:le="diff-review-row line-insert",ne=" char-insert",ae=I;break;case N.Deleted:le="diff-review-row line-delete",ne=" char-delete",ae=_;break}const ue=document.createElement("div");ue.style.minWidth=$+"px",ue.className=le,ue.setAttribute("role","listitem"),ue.ariaLevel="";const de=document.createElement("div");de.className="diff-review-cell",de.style.height=`${G}px`,ue.appendChild(de);const ge=document.createElement("span");ge.style.width=se+"px",ge.style.minWidth=se+"px",ge.className="diff-review-line-number"+ne,U.originalLineNumber!==void 0?ge.appendChild(document.createTextNode(String(U.originalLineNumber))):ge.innerText="\xA0",de.appendChild(ge);const he=document.createElement("span");he.style.width=oe+"px",he.style.minWidth=oe+"px",he.style.paddingRight="10px",he.className="diff-review-line-number"+ne,U.modifiedLineNumber!==void 0?he.appendChild(document.createTextNode(String(U.modifiedLineNumber))):he.innerText="\xA0",de.appendChild(he);const be=document.createElement("span");if(be.className=ce,ae){const Se=document.createElement("span");Se.className=m.ThemeIcon.asClassName(ae),Se.innerText="\xA0\xA0",be.appendChild(Se)}else be.innerText="\xA0\xA0";de.appendChild(be);let ve;if(U.modifiedLineNumber!==void 0){let Se=this._getLineHtml(X,ee,te.tabSize,U.modifiedLineNumber,this._languageService.languageIdCodec);a.DiffReview._ttPolicy&&(Se=a.DiffReview._ttPolicy.createHTML(Se)),de.insertAdjacentHTML("beforeend",Se),ve=X.getLineContent(U.modifiedLineNumber)}else{let Se=this._getLineHtml(J,ie,j.tabSize,U.originalLineNumber,this._languageService.languageIdCodec);a.DiffReview._ttPolicy&&(Se=a.DiffReview._ttPolicy.createHTML(Se)),de.insertAdjacentHTML("beforeend",Se),ve=J.getLineContent(U.originalLineNumber)}ve.length===0&&(ve=(0,g.localize)(9,null));let Ie="";switch(U.type){case N.Unchanged:U.originalLineNumber===U.modifiedLineNumber?Ie=(0,g.localize)(10,null,ve,U.originalLineNumber):Ie=(0,g.localize)(11,null,ve,U.originalLineNumber,U.modifiedLineNumber);break;case N.Added:Ie=(0,g.localize)(12,null,ve,U.modifiedLineNumber);break;case N.Deleted:Ie=(0,g.localize)(13,null,ve,U.originalLineNumber);break}return ue.setAttribute("aria-label",Ie),ue}_getLineHtml(U,G,$,ie,J){const j=U.getLineContent(ie),ee=G.get(49),X=c.LineTokens.createEmpty(j,J),te=n.ViewLineRenderingData.isBasicASCII(j,U.mightContainNonBasicASCII()),Z=n.ViewLineRenderingData.containsRTL(j,te,U.mightContainRTL());return(0,l.renderViewLine2)(new l.RenderLineInput(ee.isMonospace&&!G.get(32),ee.canUseHalfwidthRightwardsArrow,j,!1,te,Z,0,X,[],$,0,ee.spaceWidth,ee.middotWidth,ee.wsmiddotWidth,G.get(115),G.get(97),G.get(92),G.get(50)!==r.EditorFontLigatures.OFF,null)).html}};z=fe([O(5,p.ILanguageService)],z);function B(H,U){let G;for(const $ of H)U(G,$),G=$;U(G,void 0)}function*K(H,U){let G,$;for(const ie of H)$!==void 0&&U($,ie)?G.push(ie):(G&&(yield G),G=[ie]),$=ie;G&&(yield G)}}),define(Q[3336],Y([1,0,97,7,574,142,32,80,6,4,37,2372,36,77,792]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerWidget=e.InsertButton=e.ColorPickerBody=e.ColorPickerHeader=void 0;const i=y.$;class s extends m.Disposable{constructor(E,C,I,_=!1){super(),this.model=C,this.showingStandaloneColorPicker=_,this._closeButton=null,this._domNode=i(".colorpicker-header"),y.append(E,this._domNode),this._pickedColorNode=y.append(this._domNode,i(".picked-color")),y.append(this._pickedColorNode,i("span.codicon.codicon-color-mode")),this._pickedColorPresentation=y.append(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const A=(0,h.localize)(0,null);this._pickedColorNode.setAttribute("title",A),this._originalColorNode=y.append(this._domNode,i(".original-color")),this._originalColorNode.style.backgroundColor=f.Color.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=I.getColorTheme().getColor(a.editorHoverBackground)||f.Color.white,this._register(I.onDidColorThemeChange(k=>{this.backgroundColor=k.getColor(a.editorHoverBackground)||f.Color.white})),this._register(y.addDisposableListener(this._pickedColorNode,y.EventType.CLICK,()=>this.model.selectNextColorPresentation())),this._register(y.addDisposableListener(this._originalColorNode,y.EventType.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(C.onDidChangeColor(this.onDidChangeColor,this)),this._register(C.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=f.Color.Format.CSS.format(C.color)||"",this._pickedColorNode.classList.toggle("light",C.color.rgba.a<.5?this.backgroundColor.isLighter():C.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new o(this._domNode)))}get domNode(){return this._domNode}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(E){this._pickedColorNode.style.backgroundColor=f.Color.Format.CSS.format(E)||"",this._pickedColorNode.classList.toggle("light",E.rgba.a<.5?this.backgroundColor.isLighter():E.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}e.ColorPickerHeader=s;class o extends m.Disposable{constructor(E){super(),this._onClicked=this._register(new v.Emitter),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),y.append(E,this._button);const C=document.createElement("div");C.classList.add("close-button-inner-div"),y.append(this._button,C),y.append(C,i(".button"+S.ThemeIcon.asCSSSelector((0,r.registerIcon)("color-picker-close",T.Codicon.close,(0,h.localize)(1,null))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}}class u extends m.Disposable{constructor(E,C,I,_=!1){super(),this.model=C,this.pixelRatio=I,this._insertButton=null,this._domNode=i(".colorpicker-body"),y.append(E,this._domNode),this._saturationBox=new d(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new c(this._domNode,this.model,_),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new l(this._domNode,this.model,_),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),_&&(this._insertButton=this._register(new n(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:E,v:C}){const I=this.model.color.hsva;this.model.color=new f.Color(new f.HSVA(I.h,E,C,I.a))}onDidOpacityChange(E){const C=this.model.color.hsva;this.model.color=new f.Color(new f.HSVA(C.h,C.s,C.v,E))}onDidHueChange(E){const C=this.model.color.hsva,I=(1-E)*360;this.model.color=new f.Color(new f.HSVA(I===360?0:I,C.s,C.v,C.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get opacityStrip(){return this._opacityStrip}get hueStrip(){return this._hueStrip}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}e.ColorPickerBody=u;class d extends m.Disposable{constructor(E,C,I){super(),this.model=C,this.pixelRatio=I,this._onDidChange=new v.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new v.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._domNode=i(".saturation-wrap"),y.append(E,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",y.append(this._domNode,this._canvas),this.selection=i(".saturation-selection"),y.append(this._domNode,this.selection),this.layout(),this._register(y.addDisposableListener(this._domNode,y.EventType.POINTER_DOWN,_=>this.onPointerDown(_))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}get canvas(){return this._canvas}onPointerDown(E){if(!E.target||!(E.target instanceof Element))return;this.monitor=this._register(new b.GlobalPointerMoveMonitor);const C=y.getDomNodePagePosition(this._domNode);E.target!==this.selection&&this.onDidChangePosition(E.offsetX,E.offsetY),this.monitor.startMonitoring(E.target,E.pointerId,E.buttons,_=>this.onDidChangePosition(_.pageX-C.left,_.pageY-C.top),()=>null);const I=y.addDisposableListener(document,y.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),I.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(E,C){const I=Math.max(0,Math.min(1,E/this.width)),_=Math.max(0,Math.min(1,1-C/this.height));this.paintSelection(I,_),this._onDidChange.fire({s:I,v:_})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const E=this.model.color.hsva;this.paintSelection(E.s,E.v)}paint(){const E=this.model.color.hsva,C=new f.Color(new f.HSVA(E.h,1,1,1)),I=this._canvas.getContext("2d"),_=I.createLinearGradient(0,0,this._canvas.width,0);_.addColorStop(0,"rgba(255, 255, 255, 1)"),_.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),_.addColorStop(1,"rgba(255, 255, 255, 0)");const A=I.createLinearGradient(0,0,0,this._canvas.height);A.addColorStop(0,"rgba(0, 0, 0, 0)"),A.addColorStop(1,"rgba(0, 0, 0, 1)"),I.rect(0,0,this._canvas.width,this._canvas.height),I.fillStyle=f.Color.Format.CSS.format(C),I.fill(),I.fillStyle=_,I.fill(),I.fillStyle=A,I.fill()}paintSelection(E,C){this.selection.style.left=`${E*this.width}px`,this.selection.style.top=`${this.height-C*this.height}px`}onDidChangeColor(E){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const C=E.hsva;this.paintSelection(C.s,C.v)}}class p extends m.Disposable{constructor(E,C,I=!1){super(),this.model=C,this._onDidChange=new v.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new v.Emitter,this.onColorFlushed=this._onColorFlushed.event,I?(this.domNode=y.append(E,i(".standalone-strip")),this.overlay=y.append(this.domNode,i(".standalone-overlay"))):(this.domNode=y.append(E,i(".strip")),this.overlay=y.append(this.domNode,i(".overlay"))),this.slider=y.append(this.domNode,i(".slider")),this.slider.style.top="0px",this._register(y.addDisposableListener(this.domNode,y.EventType.POINTER_DOWN,_=>this.onPointerDown(_))),this._register(C.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const E=this.getValue(this.model.color);this.updateSliderPosition(E)}onDidChangeColor(E){const C=this.getValue(E);this.updateSliderPosition(C)}onPointerDown(E){if(!E.target||!(E.target instanceof Element))return;const C=this._register(new b.GlobalPointerMoveMonitor),I=y.getDomNodePagePosition(this.domNode);this.domNode.classList.add("grabbing"),E.target!==this.slider&&this.onDidChangeTop(E.offsetY),C.startMonitoring(E.target,E.pointerId,E.buttons,A=>this.onDidChangeTop(A.pageY-I.top),()=>null);const _=y.addDisposableListener(document,y.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),_.dispose(),C.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(E){const C=Math.max(0,Math.min(1,1-E/this.height));this.updateSliderPosition(C),this._onDidChange.fire(C)}updateSliderPosition(E){this.slider.style.top=`${(1-E)*this.height}px`}}class c extends p{constructor(E,C,I=!1){super(E,C,I),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(E){super.onDidChangeColor(E);const{r:C,g:I,b:_}=E.rgba,A=new f.Color(new f.RGBA(C,I,_,1)),k=new f.Color(new f.RGBA(C,I,_,0));this.overlay.style.background=`linear-gradient(to bottom, ${A} 0%, ${k} 100%)`}getValue(E){return E.hsva.a}}class l extends p{constructor(E,C,I=!1){super(E,C,I),this.domNode.classList.add("hue-strip")}getValue(E){return 1-E.hsva.h/360}}class n extends m.Disposable{constructor(E){super(),this._onClicked=this._register(new v.Emitter),this.onClicked=this._onClicked.event,this._button=y.append(E,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=C=>{this._onClicked.fire()}}get button(){return this._button}}e.InsertButton=n;class g extends D.Widget{static{this.ID="editor.contrib.colorPickerWidget"}constructor(E,C,I,_,A=!1){super(),this.model=C,this.pixelRatio=I,this._register(t.PixelRatio.onDidChange(()=>this.layout()));const k=i(".colorpicker-widget");E.appendChild(k),this.header=this._register(new s(k,this.model,_,A)),this.body=this._register(new u(k,this.model,this.pixelRatio,A))}getId(){return g.ID}layout(){this.body.layout()}}e.ColorPickerWidget=g}),define(Q[3337],Y([1,0,7,87,162,32,6,4,33,17,50,209,860,2417,8,41,36,77,37,1741]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsWidget=void 0;const c=t.$,l=(0,u.registerIcon)("parameter-hints-next",D.Codicon.chevronDown,r.localize(0,null)),n=(0,u.registerIcon)("parameter-hints-previous",D.Codicon.chevronUp,r.localize(1,null));let g=class extends f.Disposable{static{p=this}static{this.ID="editor.widget.parameterHintsWidget"}constructor(E,C,I,_,A){super(),this.editor=E,this.model=C,this.renderDisposeables=this._register(new f.DisposableStore),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new h.MarkdownRenderer({editor:E},A,_)),this.keyVisible=a.Context.Visible.bindTo(I),this.keyMultipleSignatures=a.Context.MultipleSignatures.bindTo(I)}createParameterHintDOMNodes(){const E=c(".editor-widget.parameter-hints-widget"),C=t.append(E,c(".phwrapper"));C.tabIndex=-1;const I=t.append(C,c(".controls")),_=t.append(I,c(".button"+d.ThemeIcon.asCSSSelector(n))),A=t.append(I,c(".overloads")),k=t.append(I,c(".button"+d.ThemeIcon.asCSSSelector(l)));this._register(t.addDisposableListener(_,"click",x=>{t.EventHelper.stop(x),this.previous()})),this._register(t.addDisposableListener(k,"click",x=>{t.EventHelper.stop(x),this.next()}));const L=c(".body"),R=new b.DomScrollableElement(L,{alwaysConsumeMouseWheel:!0});this._register(R),C.appendChild(R.getDomNode());const M=t.append(L,c(".signature")),N=t.append(L,c(".docs"));E.style.userSelect="text",this.domNodes={element:E,signature:M,overloads:A,docs:N,scrollbar:R},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(x=>{this.visible&&this.editor.layoutContentWidget(this)}));const P=()=>{if(!this.domNodes)return;const x=this.editor.getOption(49);this.domNodes.element.style.fontSize=`${x.fontSize}px`,this.domNodes.element.style.lineHeight=`${x.lineHeight/x.fontSize}`};P(),this._register(T.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(x=>x.hasChanged(49)).on(P,null)),this._register(this.editor.onDidLayoutChange(x=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{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?.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(E){if(this.renderDisposeables.clear(),!this.domNodes)return;const C=E.signatures.length>1;this.domNodes.element.classList.toggle("multiple",C),this.keyMultipleSignatures.set(C),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const I=E.signatures[E.activeSignature];if(!I)return;const _=t.append(this.domNodes.signature,c(".code")),A=this.editor.getOption(49);_.style.fontSize=`${A.fontSize}px`,_.style.fontFamily=A.fontFamily;const k=I.parameters.length>0,L=I.activeParameter??E.activeParameter;if(k)this.renderParameters(_,I,L);else{const N=t.append(_,c("span"));N.textContent=I.label}const R=I.parameters[L];if(R?.documentation){const N=c("span.documentation");if(typeof R.documentation=="string")N.textContent=R.documentation;else{const P=this.renderMarkdownDocs(R.documentation);N.appendChild(P.element)}t.append(this.domNodes.docs,c("p",{},N))}if(I.documentation!==void 0)if(typeof I.documentation=="string")t.append(this.domNodes.docs,c("p",{},I.documentation));else{const N=this.renderMarkdownDocs(I.documentation);t.append(this.domNodes.docs,N.element)}const M=this.hasDocs(I,R);if(this.domNodes.signature.classList.toggle("has-docs",M),this.domNodes.docs.classList.toggle("empty",!M),this.domNodes.overloads.textContent=String(E.activeSignature+1).padStart(E.signatures.length.toString().length,"0")+"/"+E.signatures.length,R){let N="";const P=I.parameters[L];Array.isArray(P.label)?N=I.label.substring(P.label[0],P.label[1]):N=P.label,P.documentation&&(N+=typeof P.documentation=="string"?`, ${P.documentation}`:`, ${P.documentation.value}`),I.documentation&&(N+=typeof I.documentation=="string"?`, ${I.documentation}`:`, ${I.documentation.value}`),this.announcedLabel!==N&&(y.alert(r.localize(2,null,N)),this.announcedLabel=N)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(E){const C=this.renderDisposeables.add(this.markdownRenderer.render(E,{asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));return C.element.classList.add("markdown-docs"),C}hasDocs(E,C){return!!(C&&typeof C.documentation=="string"&&(0,m.assertIsDefined)(C.documentation).length>0||C&&typeof C.documentation=="object"&&(0,m.assertIsDefined)(C.documentation).value.length>0||E.documentation&&typeof E.documentation=="string"&&(0,m.assertIsDefined)(E.documentation).length>0||E.documentation&&typeof E.documentation=="object"&&(0,m.assertIsDefined)(E.documentation.value).length>0)}renderParameters(E,C,I){const[_,A]=this.getParameterLabelOffsets(C,I),k=document.createElement("span");k.textContent=C.label.substring(0,_);const L=document.createElement("span");L.textContent=C.label.substring(_,A),L.className="parameter active";const R=document.createElement("span");R.textContent=C.label.substring(A),t.append(E,k,L,R)}getParameterLabelOffsets(E,C){const I=E.parameters[C];if(I){if(Array.isArray(I.label))return I.label;if(I.label.length){const _=new RegExp(`(\\W|^)${(0,v.escapeRegExpCharacters)(I.label)}(?=\\W|$)`,"g");_.test(E.label);const A=_.lastIndex-I.label.length;return A>=0?[A,_.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return p.ID}updateMaxHeight(){if(!this.domNodes)return;const C=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=C;const I=this.domNodes.element.getElementsByClassName("phwrapper");I.length&&(I[0].style.maxHeight=C)}};e.ParameterHintsWidget=g,e.ParameterHintsWidget=g=p=fe([O(2,i.IContextKeyService),O(3,s.IOpenerService),O(4,S.ILanguageService)],g),(0,o.registerColor)("editorHoverWidget.highlightForeground",{dark:o.listHighlightForeground,light:o.listHighlightForeground,hcDark:o.listHighlightForeground,hcLight:o.listHighlightForeground},r.localize(3,null))}),define(Q[1203],Y([1,0,203,4,48,73,99,74,3176,860,2416,8,5,3337]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerParameterHintsAction=e.ParameterHintsController=void 0;let s=class extends y.Disposable{static{i=this}static{this.ID="editor.controller.parameterHints"}static get(c){return c.getContribution(i.ID)}constructor(c,l,n){super(),this.editor=c,this.model=this._register(new v.ParameterHintsModel(c,n.signatureHelpProvider)),this._register(this.model.onChangedHints(g=>{g?(this.widget.value.show(),this.widget.value.render(g)):this.widget.rawValue?.hide()})),this.widget=new t.Lazy(()=>this._register(l.createInstance(r.ParameterHintsWidget,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){this.widget.rawValue?.previous()}next(){this.widget.rawValue?.next()}trigger(c){this.model.trigger(c,0)}};e.ParameterHintsController=s,e.ParameterHintsController=s=i=fe([O(1,a.IInstantiationService),O(2,f.ILanguageFeaturesService)],s);class o extends b.EditorAction{constructor(){super({id:"editor.action.triggerParameterHints",label:S.localize(0,null),alias:"Trigger Parameter Hints",precondition:D.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:3082,weight:100}})}run(c,l){s.get(l)?.trigger({triggerKind:T.SignatureHelpTriggerKind.Invoke})}}e.TriggerParameterHintsAction=o,(0,b.registerEditorContribution)(s.ID,s,2),(0,b.registerEditorAction)(o);const u=100+75,d=b.EditorCommand.bindToContribution(s.get);(0,b.registerEditorCommand)(new d({id:"closeParameterHints",precondition:m.Context.Visible,handler:p=>p.cancel(),kbOpts:{weight:u,kbExpr:D.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,b.registerEditorCommand)(new d({id:"showPrevParameterHint",precondition:h.ContextKeyExpr.and(m.Context.Visible,m.Context.MultipleSignatures),handler:p=>p.previous(),kbOpts:{weight:u,kbExpr:D.EditorContextKeys.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,b.registerEditorCommand)(new d({id:"showNextParameterHint",precondition:h.ContextKeyExpr.and(m.Context.Visible,m.Context.MultipleSignatures),handler:p=>p.next(),kbOpts:{weight:u,kbExpr:D.EditorContextKeys.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))}),define(Q[3338],Y([1,0,7,85,34,4,209,5,276,77,37,1748]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerController=void 0;const h=26;let a=class extends D.Disposable{constructor(s,o){super(),this._editor=s,this.instantiationService=o,this.banner=this._register(this.instantiationService.createInstance(r))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(s){this.banner.show({...s,onClose:()=>{this.hide(),s.onClose?.()}}),this._editor.setBanner(this.banner.element,h)}};e.BannerController=a,e.BannerController=a=fe([O(1,f.IInstantiationService)],a);let r=class extends D.Disposable{constructor(s){super(),this.instantiationService=s,this.markdownRenderer=this.instantiationService.createInstance(T.MarkdownRenderer,{}),this.element=(0,t.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(s){if(s.ariaLabel)return s.ariaLabel;if(typeof s.message=="string")return s.message}getBannerMessage(s){if(typeof s=="string"){const o=(0,t.$)("span");return o.innerText=s,o}return this.markdownRenderer.render(s).element}clear(){(0,t.clearNode)(this.element)}show(s){(0,t.clearNode)(this.element);const o=this.getAriaLabel(s);o&&this.element.setAttribute("aria-label",o);const u=(0,t.append)(this.element,(0,t.$)("div.icon-container"));u.setAttribute("aria-hidden","true"),s.icon&&u.appendChild((0,t.$)(`div${S.ThemeIcon.asCSSSelector(s.icon)}`));const d=(0,t.append)(this.element,(0,t.$)("div.message-container"));if(d.setAttribute("aria-hidden","true"),d.appendChild(this.getBannerMessage(s.message)),this.messageActionsContainer=(0,t.append)(this.element,(0,t.$)("div.message-actions-container")),s.actions)for(const c of s.actions)this._register(this.instantiationService.createInstance(v.Link,this.messageActionsContainer,{...c,tabIndex:-1},{}));const p=(0,t.append)(this.element,(0,t.$)("div.action-container"));this.actionBar=this._register(new y.ActionBar(p)),this.actionBar.push(this._register(new b.Action("banner.close","Close Banner",S.ThemeIcon.asClassName(m.widgetClose),!0,()=>{typeof s.onClose=="function"&&s.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};r=fe([O(0,f.IInstantiationService)],r)}),define(Q[3339],Y([1,0,7,6,37,77]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnthemedProductIconTheme=e.getIconsStyleSheet=void 0;function T(v){const m=new y.Emitter,S=(0,D.getIconRegistry)();return S.onDidChange(()=>m.fire()),v?.onDidProductIconThemeChange(()=>m.fire()),{onDidChange:m.event,getCSS(){const h=v?v.getProductIconTheme():new f,a={},r=s=>{const o=h.getIcon(s);if(!o)return;const u=o.font;return u?(a[u.id]=u.definition,`.codicon-${s.id}:before { content: '${o.fontCharacter}'; font-family: ${(0,t.asCSSPropertyValue)(u.id)}; }`):`.codicon-${s.id}:before { content: '${o.fontCharacter}'; }`},i=[];for(const s of S.getIcons()){const o=r(s);o&&i.push(o)}for(const s in a){const o=a[s],u=o.weight?`font-weight: ${o.weight};`:"",d=o.style?`font-style: ${o.style};`:"",p=o.src.map(c=>`${(0,t.asCSSUrl)(c.location)} format('${c.format}')`).join(", ");i.push(`@font-face { src: ${p}; font-family: ${(0,t.asCSSPropertyValue)(s)};${u}${d} font-display: block; }`)}return i.join(` `)}}}e.getIconsStyleSheet=T;class f{getIcon(m){const S=(0,D.getIconRegistry)();let h=m.defaults;for(;b.ThemeIcon.isThemeIcon(h);){const a=S.getIcon(h.id);if(!a)return;h=a.defaults}return h}}e.UnthemedProductIconTheme=f}),define(Q[167],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDark=e.isHighContrast=e.ColorScheme=void 0;var t;(function(D){D.DARK="dark",D.LIGHT="light",D.HIGH_CONTRAST_DARK="hcDark",D.HIGH_CONTRAST_LIGHT="hcLight"})(t||(e.ColorScheme=t={}));function y(D){return D===t.HIGH_CONTRAST_DARK||D===t.HIGH_CONTRAST_LIGHT}e.isHighContrast=y;function b(D){return D===t.DARK||D===t.HIGH_CONTRAST_DARK}e.isDark=b}),define(Q[3340],Y([1,0,7,4,6,10,167]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeComponentRenderer=e.TreeDataTemplate=e.TreeCheckboxState=void 0;var f;(function(S){S[S.Intermediate=0]="Intermediate",S[S.Checked=1]="Checked",S[S.Unchecked=2]="Unchecked"})(f||(e.TreeCheckboxState=f={}));class v extends y.Disposable{constructor(){super(...arguments),this._onChange=this._register(new b.Emitter),this.onChange=this._onChange.event}set checkbox(h){this._checkbox=h,this.handleOnChange(this._checkbox,()=>{this._onChange.fire(this._checkbox.checked),this.model&&this.model.onCheckedChanged&&this.model.onCheckedChanged(this._checkbox.checked)})}get checkboxState(){return this._checkbox.indeterminate?f.Intermediate:this.checkbox.checked?f.Checked:f.Unchecked}dispose(){super.dispose(),this._checkbox.remove(),this.root.remove(),this.label.remove(),this.icon.remove()}set checkboxState(h){if(this.checkboxState!==h)switch(h){case f.Checked:this._checkbox.indeterminate=!1,this._checkbox.checked=!0;break;case f.Unchecked:this._checkbox.indeterminate=!1,this._checkbox.checked=!1;break;case f.Intermediate:this._checkbox.indeterminate=!0;break;default:break}}set checkboxLabel(h){this._checkbox.setAttribute("aria-label",h)}set enableCheckbox(h){h===void 0&&(h=!0),this._checkbox.disabled=!h}get checkbox(){return this._checkbox}handleOnChange(h,a){this._register(t.addDisposableListener(h,t.EventType.CHANGE,a))}}e.TreeDataTemplate=v;class m extends y.Disposable{static{this.DEFAULT_TEMPLATE="DEFAULT_TEMPLATE"}static{this.DEFAULT_HEIGHT=20}constructor(h,a,r){super(),this._dataProvider=h,this.themeService=a,this.options=r}getHeight(h,a){return m.DEFAULT_HEIGHT}getTemplateId(h,a){return m.DEFAULT_TEMPLATE}renderTemplate(h,a,r){if(a===m.DEFAULT_TEMPLATE){const i=new v;if(i.root=t.append(r,t.$(".tree-component-node-tile")),i.icon=t.append(i.root,t.$("div.model-view-tree-node-item-icon")),this.options&&this.options.withCheckbox){let s=t.append(i.root,t.$("div.checkboxWrapper"));i.checkbox=t.append(s,t.$("input.checkbox",{type:"checkbox"}))}return i.label=t.append(i.root,t.$("div.model-view-tree-node-item-label")),i}}renderElement(h,a,r,i){const s=this.themeService.getColorTheme().type===T.ColorScheme.LIGHT?a.icon:a.iconDark,o=s?D.URI.revive(s):void 0;i.icon.style.backgroundImage=t.asCSSUrl(o),i.icon.style.backgroundRepeat="no-repeat",i.icon.style.backgroundPosition="center",i.icon.classList.toggle("model-view-tree-node-item-icon",!!s),a&&(a.onCheckedChanged=u=>{this._dataProvider.onNodeCheckedChanged(a.handle,u)},i.model=a),r===m.DEFAULT_TEMPLATE&&this.renderNode(a,i)}renderNode(h,a){let r=h.label;a.label.textContent=r.label,a.root.title=r.label,a.checkbox&&(a.checkboxState=this.getCheckboxState(h),a.enableCheckbox=h.enabled,a.checkboxLabel=r.label)}getCheckboxState(h){return h.checked===void 0?f.Intermediate:h.checked?f.Checked:f.Unchecked}disposeTemplate(h,a,r){this.dispose()}}e.TreeComponentRenderer=m}),define(Q[887],Y([1,0,97,140,18,1852,562,491,405,167,133]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColumnOfNodeOffset=e.ViewLine=e.ViewLineOptions=void 0;const h=function(){return b.isNative?!0:!(b.isLinux||t.isFirefox||t.isSafari)}();let a=!0;class r{constructor(w,E){this.themeType=E;const C=w.options,I=C.get(49);C.get(37)==="off"?this.renderWhitespace=C.get(97):this.renderWhitespace="none",this.renderControlCharacters=C.get(92),this.spaceWidth=I.spaceWidth,this.middotWidth=I.middotWidth,this.wsmiddotWidth=I.wsmiddotWidth,this.useMonospaceOptimizations=I.isMonospace&&!C.get(32),this.canUseHalfwidthRightwardsArrow=I.canUseHalfwidthRightwardsArrow,this.lineHeight=C.get(65),this.stopRenderingLineAfter=C.get(115),this.fontLigatures=C.get(50)}equals(w){return this.themeType===w.themeType&&this.renderWhitespace===w.renderWhitespace&&this.renderControlCharacters===w.renderControlCharacters&&this.spaceWidth===w.spaceWidth&&this.middotWidth===w.middotWidth&&this.wsmiddotWidth===w.wsmiddotWidth&&this.useMonospaceOptimizations===w.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===w.canUseHalfwidthRightwardsArrow&&this.lineHeight===w.lineHeight&&this.stopRenderingLineAfter===w.stopRenderingLineAfter&&this.fontLigatures===w.fontLigatures}}e.ViewLineOptions=r;class i{static{this.CLASS_NAME="view-line"}constructor(w){this._options=w,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(w){if(this._renderedViewLine)this._renderedViewLine.domNode=(0,y.createFastDomNode)(w);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(w){this._isMaybeInvalid=!0,this._options=w}onSelectionChanged(){return(0,m.isHighContrast)(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(w,E,C,I){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const _=C.getViewLineRenderingData(w),A=this._options,k=f.LineDecoration.filter(_.inlineDecorations,w,_.minColumn,_.maxColumn);let L=null;if((0,m.isHighContrast)(A.themeType)||this._options.renderWhitespace==="selection"){const P=C.selections;for(const x of P){if(x.endLineNumber<w||x.startLineNumber>w)continue;const F=x.startLineNumber===w?x.startColumn:_.minColumn,V=x.endLineNumber===w?x.endColumn:_.maxColumn;F<V&&((0,m.isHighContrast)(A.themeType)&&k.push(new f.LineDecoration(F,V,"inline-selected-text",0)),this._options.renderWhitespace==="selection"&&(L||(L=[]),L.push(new v.LineRange(F-1,V-1))))}}const R=new v.RenderLineInput(A.useMonospaceOptimizations,A.canUseHalfwidthRightwardsArrow,_.content,_.continuesWithWrappedLine,_.isBasicASCII,_.containsRTL,_.minColumn-1,_.tokens,k,_.tabSize,_.startVisibleColumn,A.spaceWidth,A.middotWidth,A.wsmiddotWidth,A.stopRenderingLineAfter,A.renderWhitespace,A.renderControlCharacters,A.fontLigatures!==S.EditorFontLigatures.OFF,L);if(this._renderedViewLine&&this._renderedViewLine.input.equals(R))return!1;I.appendString('<div style="top:'),I.appendString(String(E)),I.appendString("px;height:"),I.appendString(String(this._options.lineHeight)),I.appendString('px;" class="'),I.appendString(i.CLASS_NAME),I.appendString('">');const M=(0,v.renderViewLine)(R,I);I.appendString("</div>");let N=null;return a&&h&&_.isBasicASCII&&A.useMonospaceOptimizations&&M.containsForeignElements===0&&(N=new o(this._renderedViewLine?this._renderedViewLine.domNode:null,R,M.characterMapping)),N||(N=p(this._renderedViewLine?this._renderedViewLine.domNode:null,R,M.characterMapping,M.containsRTL,M.containsForeignElements)),this._renderedViewLine=N,!0}layoutLine(w,E){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(E),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(w){return this._renderedViewLine?this._renderedViewLine.getWidth(w):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof o:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof o?this._renderedViewLine.monospaceAssumptionsAreValid():a}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof o&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(w,E,C,I){if(!this._renderedViewLine)return null;E=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,E)),C=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,C));const _=this._renderedViewLine.input.stopRenderingLineAfter;if(_!==-1&&E>_+1&&C>_+1)return new T.VisibleRanges(!0,[new T.FloatHorizontalRange(this.getWidth(I),0)]);_!==-1&&E>_+1&&(E=_+1),_!==-1&&C>_+1&&(C=_+1);const A=this._renderedViewLine.getVisibleRangesForRange(w,E,C,I);return A&&A.length>0?new T.VisibleRanges(!1,A):null}getColumnOfNodeOffset(w,E){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(w,E):1}}e.ViewLine=i;var s;(function(g){g[g.MaxMonospaceDistance=300]="MaxMonospaceDistance"})(s||(s={}));class o{constructor(w,E,C){this._cachedWidth=-1,this.domNode=w,this.input=E;const I=Math.floor(E.lineContent.length/300);if(I>0){this._keyColumnPixelOffsetCache=new Float32Array(I);for(let _=0;_<I;_++)this._keyColumnPixelOffsetCache[_]=-1}else this._keyColumnPixelOffsetCache=null;this._characterMapping=C,this._charWidth=E.spaceWidth}getWidth(w){if(!this.domNode||this.input.lineContent.length<300){const E=this._characterMapping.getHorizontalOffset(this._characterMapping.length);return Math.round(this._charWidth*E)}return this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,w?.markDidDomLayout()),this._cachedWidth}getWidthIsFast(){return this.input.lineContent.length<300||this._cachedWidth!==-1}monospaceAssumptionsAreValid(){if(!this.domNode)return a;if(this.input.lineContent.length<300){const w=this.getWidth(null),E=this.domNode.domNode.firstChild.offsetWidth;Math.abs(w-E)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),a=!1)}return a}toSlowRenderedLine(){return p(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(w,E,C,I){const _=this._getColumnPixelOffset(w,E,I),A=this._getColumnPixelOffset(w,C,I);return[new T.FloatHorizontalRange(_,A-_)]}_getColumnPixelOffset(w,E,C){if(E<=300){const R=this._characterMapping.getHorizontalOffset(E);return this._charWidth*R}const I=Math.floor((E-1)/300)-1,_=(I+1)*300+1;let A=-1;if(this._keyColumnPixelOffsetCache&&(A=this._keyColumnPixelOffsetCache[I],A===-1&&(A=this._actualReadPixelOffset(w,_,C),this._keyColumnPixelOffsetCache[I]=A)),A===-1){const R=this._characterMapping.getHorizontalOffset(E);return this._charWidth*R}const k=this._characterMapping.getHorizontalOffset(_),L=this._characterMapping.getHorizontalOffset(E);return A+this._charWidth*(L-k)}_getReadingTarget(w){return w.domNode.firstChild}_actualReadPixelOffset(w,E,C){if(!this.domNode)return-1;const I=this._characterMapping.getDomPosition(E),_=D.RangeUtil.readHorizontalRanges(this._getReadingTarget(this.domNode),I.partIndex,I.charIndex,I.partIndex,I.charIndex,C);return!_||_.length===0?-1:_[0].left}getColumnOfNodeOffset(w,E){return n(this._characterMapping,w,E)}}class u{constructor(w,E,C,I,_){if(this.domNode=w,this.input=E,this._characterMapping=C,this._isWhitespaceOnly=/^\s*$/.test(E.lineContent),this._containsForeignElements=_,this._cachedWidth=-1,this._pixelOffsetCache=null,!I||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let A=0,k=this._characterMapping.length;A<=k;A++)this._pixelOffsetCache[A]=-1}}_getReadingTarget(w){return w.domNode.firstChild}getWidth(w){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,w?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(w,E,C,I){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const _=this._readPixelOffset(this.domNode,w,E,I);if(_===-1)return null;const A=this._readPixelOffset(this.domNode,w,C,I);return A===-1?null:[new T.FloatHorizontalRange(_,A-_)]}return this._readVisibleRangesForRange(this.domNode,w,E,C,I)}_readVisibleRangesForRange(w,E,C,I,_){if(C===I){const A=this._readPixelOffset(w,E,C,_);return A===-1?null:[new T.FloatHorizontalRange(A,0)]}else return this._readRawVisibleRangesForRange(w,C,I,_)}_readPixelOffset(w,E,C,I){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(I);const _=this._getReadingTarget(w);return _.firstChild?(I.markDidDomLayout(),_.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){const _=this._pixelOffsetCache[C];if(_!==-1)return _;const A=this._actualReadPixelOffset(w,E,C,I);return this._pixelOffsetCache[C]=A,A}return this._actualReadPixelOffset(w,E,C,I)}_actualReadPixelOffset(w,E,C,I){if(this._characterMapping.length===0){const L=D.RangeUtil.readHorizontalRanges(this._getReadingTarget(w),0,0,0,0,I);return!L||L.length===0?-1:L[0].left}if(C===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(I);const _=this._characterMapping.getDomPosition(C),A=D.RangeUtil.readHorizontalRanges(this._getReadingTarget(w),_.partIndex,_.charIndex,_.partIndex,_.charIndex,I);if(!A||A.length===0)return-1;const k=A[0].left;if(this.input.isBasicASCII){const L=this._characterMapping.getHorizontalOffset(C),R=Math.round(this.input.spaceWidth*L);if(Math.abs(R-k)<=1)return R}return k}_readRawVisibleRangesForRange(w,E,C,I){if(E===1&&C===this._characterMapping.length)return[new T.FloatHorizontalRange(0,this.getWidth(I))];const _=this._characterMapping.getDomPosition(E),A=this._characterMapping.getDomPosition(C);return D.RangeUtil.readHorizontalRanges(this._getReadingTarget(w),_.partIndex,_.charIndex,A.partIndex,A.charIndex,I)}getColumnOfNodeOffset(w,E){return n(this._characterMapping,w,E)}}class d extends u{_readVisibleRangesForRange(w,E,C,I,_){const A=super._readVisibleRangesForRange(w,E,C,I,_);if(!A||A.length===0||C===I||C===1&&I===this._characterMapping.length)return A;if(!this.input.containsRTL){const k=this._readPixelOffset(w,E,I,_);if(k!==-1){const L=A[A.length-1];L.left<k&&(L.width=k-L.left)}}return A}}const p=function(){return t.isWebKit?c:l}();function c(g,w,E,C,I){return new d(g,w,E,C,I)}function l(g,w,E,C,I){return new u(g,w,E,C,I)}function n(g,w,E){const C=w.textContent.length;let I=-1;for(;w;)w=w.previousSibling,I++;return g.getColumn(new v.DomPosition(I,E),C)}e.getColumnOfNodeOffset=n}),define(Q[1204],Y([1,0,595,239,887,51,27,323,7,1071]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseTargetFactory=e.HitTestContext=e.MouseTarget=e.PointerHandlerLastRenderData=void 0;var S;(function(E){E[E.Unknown=0]="Unknown",E[E.Content=1]="Content"})(S||(S={}));class h{constructor(C=null){this.hitTarget=C,this.type=0}}class a{constructor(C,I,_){this.position=C,this.spanNode=I,this.injectedText=_,this.type=1}}var r;(function(E){function C(I,_,A){const k=I.getPositionFromDOMInfo(_,A);return k?new a(k,_,null):new h(_)}E.createFromDOMInfo=C})(r||(r={}));class i{constructor(C,I){this.lastViewCursorsRenderData=C,this.lastTextareaPosition=I}}e.PointerHandlerLastRenderData=i;class s{static _deduceRage(C,I=null){return!I&&C?new T.Range(C.lineNumber,C.column,C.lineNumber,C.column):I??null}static createUnknown(C,I,_){return{type:0,element:C,mouseColumn:I,position:_,range:this._deduceRage(_)}}static createTextarea(C,I){return{type:1,element:C,mouseColumn:I,position:null,range:null}}static createMargin(C,I,_,A,k,L){return{type:C,element:I,mouseColumn:_,position:A,range:k,detail:L}}static createViewZone(C,I,_,A,k){return{type:C,element:I,mouseColumn:_,position:A,range:this._deduceRage(A),detail:k}}static createContentText(C,I,_,A,k){return{type:6,element:C,mouseColumn:I,position:_,range:this._deduceRage(_,A),detail:k}}static createContentEmpty(C,I,_,A){return{type:7,element:C,mouseColumn:I,position:_,range:this._deduceRage(_),detail:A}}static createContentWidget(C,I,_){return{type:9,element:C,mouseColumn:I,position:null,range:null,detail:_}}static createScrollbar(C,I,_){return{type:11,element:C,mouseColumn:I,position:_,range:this._deduceRage(_)}}static createOverlayWidget(C,I,_){return{type:12,element:C,mouseColumn:I,position:null,range:null,detail:_}}static createOutsideEditor(C,I,_,A){return{type:13,element:null,mouseColumn:C,position:I,range:this._deduceRage(I),outsidePosition:_,outsideDistance:A}}static _typeToString(C){return C===1?"TEXTAREA":C===2?"GUTTER_GLYPH_MARGIN":C===3?"GUTTER_LINE_NUMBERS":C===4?"GUTTER_LINE_DECORATIONS":C===5?"GUTTER_VIEW_ZONE":C===6?"CONTENT_TEXT":C===7?"CONTENT_EMPTY":C===8?"CONTENT_VIEW_ZONE":C===9?"CONTENT_WIDGET":C===10?"OVERVIEW_RULER":C===11?"SCROLLBAR":C===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(C){return this._typeToString(C.type)+": "+C.position+" - "+C.range+" - "+JSON.stringify(C.detail)}}e.MouseTarget=s;class o{static isTextArea(C){return C.length===2&&C[0]===3&&C[1]===6}static isChildOfViewLines(C){return C.length>=4&&C[0]===3&&C[3]===7}static isStrictChildOfViewLines(C){return C.length>4&&C[0]===3&&C[3]===7}static isChildOfScrollableElement(C){return C.length>=2&&C[0]===3&&C[1]===5}static isChildOfMinimap(C){return C.length>=2&&C[0]===3&&C[1]===8}static isChildOfContentWidgets(C){return C.length>=4&&C[0]===3&&C[3]===1}static isChildOfOverflowGuard(C){return C.length>=1&&C[0]===3}static isChildOfOverflowingContentWidgets(C){return C.length>=1&&C[0]===2}static isChildOfOverlayWidgets(C){return C.length>=2&&C[0]===3&&C[1]===4}}class u{constructor(C,I,_){this.viewModel=C.viewModel;const A=C.configuration.options;this.layoutInfo=A.get(142),this.viewDomNode=I.viewDomNode,this.lineHeight=A.get(65),this.stickyTabStops=A.get(114),this.typicalHalfwidthCharacterWidth=A.get(49).typicalHalfwidthCharacterWidth,this.lastRenderData=_,this._context=C,this._viewHelper=I}getZoneAtCoord(C){return u.getZoneAtCoord(this._context,C)}static getZoneAtCoord(C,I){const _=C.viewLayout.getWhitespaceAtVerticalOffset(I);if(_){const A=_.verticalOffset+_.height/2,k=C.viewModel.getLineCount();let L=null,R,M=null;return _.afterLineNumber!==k&&(M=new D.Position(_.afterLineNumber+1,1)),_.afterLineNumber>0&&(L=new D.Position(_.afterLineNumber,C.viewModel.getLineMaxColumn(_.afterLineNumber))),M===null?R=L:L===null?R=M:I<A?R=L:R=M,{viewZoneId:_.id,afterLineNumber:_.afterLineNumber,positionBefore:L,positionAfter:M,position:R}}return null}getFullLineRangeAtCoord(C){if(this._context.viewLayout.isAfterLines(C)){const A=this._context.viewModel.getLineCount(),k=this._context.viewModel.getLineMaxColumn(A);return{range:new T.Range(A,k,A,k),isAfterLines:!0}}const I=this._context.viewLayout.getLineNumberAtVerticalOffset(C),_=this._context.viewModel.getLineMaxColumn(I);return{range:new T.Range(I,1,I,_),isAfterLines:!1}}getLineNumberAtVerticalOffset(C){return this._context.viewLayout.getLineNumberAtVerticalOffset(C)}isAfterLines(C){return this._context.viewLayout.isAfterLines(C)}isInTopPadding(C){return this._context.viewLayout.isInTopPadding(C)}isInBottomPadding(C){return this._context.viewLayout.isInBottomPadding(C)}getVerticalOffsetForLineNumber(C){return this._context.viewLayout.getVerticalOffsetForLineNumber(C)}findAttribute(C,I){return u._findAttribute(C,I,this._viewHelper.viewDomNode)}static _findAttribute(C,I,_){for(;C&&C!==document.body;){if(C.hasAttribute&&C.hasAttribute(I))return C.getAttribute(I);if(C===_)return null;C=C.parentNode}return null}getLineWidth(C){return this._viewHelper.getLineWidth(C)}visibleRangeForPosition(C,I){return this._viewHelper.visibleRangeForPosition(C,I)}getPositionFromDOMInfo(C,I){return this._viewHelper.getPositionFromDOMInfo(C,I)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}e.HitTestContext=u;class d{constructor(C,I,_,A){this.editorPos=I,this.pos=_,this.relativePos=A,this.mouseVerticalOffset=Math.max(0,C.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=C.getCurrentScrollLeft()+this.relativePos.x-C.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<C.layoutInfo.contentLeft&&this.relativePos.x>=C.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,n._getMouseColumn(this.mouseContentHorizontalOffset,C.typicalHalfwidthCharacterWidth))}}class p extends d{constructor(C,I,_,A,k){super(C,I,_,A),this._ctx=C,k?(this.target=k,this.targetPath=y.PartFingerprints.collect(k,C.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(C=null){return C&&C.column<this._ctx.viewModel.getLineMaxColumn(C.lineNumber)?f.CursorColumns.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(C.lineNumber),C.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(C=null){return s.createUnknown(this.target,this._getMouseColumn(C),C)}fulfillTextarea(){return s.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(C,I,_,A){return s.createMargin(C,this.target,this._getMouseColumn(I),I,_,A)}fulfillViewZone(C,I,_){return s.createViewZone(C,this.target,this._getMouseColumn(I),I,_)}fulfillContentText(C,I,_){return s.createContentText(this.target,this._getMouseColumn(C),C,I,_)}fulfillContentEmpty(C,I){return s.createContentEmpty(this.target,this._getMouseColumn(C),C,I)}fulfillContentWidget(C){return s.createContentWidget(this.target,this._getMouseColumn(),C)}fulfillScrollbar(C){return s.createScrollbar(this.target,this._getMouseColumn(C),C)}fulfillOverlayWidget(C){return s.createOverlayWidget(this.target,this._getMouseColumn(),C)}withTarget(C){return new p(this._ctx,this.editorPos,this.pos,this.relativePos,C)}}const c={isAfterLines:!0};function l(E){return{isAfterLines:!1,horizontalDistanceToText:E}}class n{constructor(C,I){this._context=C,this._viewHelper=I}mouseTargetIsWidget(C){const I=C.target,_=y.PartFingerprints.collect(I,this._viewHelper.viewDomNode);return!!(o.isChildOfContentWidgets(_)||o.isChildOfOverflowingContentWidgets(_)||o.isChildOfOverlayWidgets(_))}createMouseTarget(C,I,_,A,k){const L=new u(this._context,this._viewHelper,C),R=new p(L,I,_,A,k);try{const M=n._createMouseTarget(L,R,!1);if(M.type===6&&L.stickyTabStops&&M.position!==null){const N=n._snapToSoftTabBoundary(M.position,L.viewModel),P=T.Range.fromPositions(N,N).plusRange(M.range);return R.fulfillContentText(N,P,M.detail)}return M}catch{return R.fulfillUnknown()}}static _createMouseTarget(C,I,_){if(I.target===null){if(_)return I.fulfillUnknown();const L=n._doHitTest(C,I);return L.type===1?n.createMouseTargetFromHitTestPosition(C,I,L.spanNode,L.position,L.injectedText):this._createMouseTarget(C,I.withTarget(L.hitTarget),!0)}const A=I;let k=null;return!o.isChildOfOverflowGuard(I.targetPath)&&!o.isChildOfOverflowingContentWidgets(I.targetPath)&&(k=k||I.fulfillUnknown()),k=k||n._hitTestContentWidget(C,A),k=k||n._hitTestOverlayWidget(C,A),k=k||n._hitTestMinimap(C,A),k=k||n._hitTestScrollbarSlider(C,A),k=k||n._hitTestViewZone(C,A),k=k||n._hitTestMargin(C,A),k=k||n._hitTestViewCursor(C,A),k=k||n._hitTestTextArea(C,A),k=k||n._hitTestViewLines(C,A,_),k=k||n._hitTestScrollbar(C,A),k||I.fulfillUnknown()}static _hitTestContentWidget(C,I){if(o.isChildOfContentWidgets(I.targetPath)||o.isChildOfOverflowingContentWidgets(I.targetPath)){const _=C.findAttribute(I.target,"widgetId");return _?I.fulfillContentWidget(_):I.fulfillUnknown()}return null}static _hitTestOverlayWidget(C,I){if(o.isChildOfOverlayWidgets(I.targetPath)){const _=C.findAttribute(I.target,"widgetId");return _?I.fulfillOverlayWidget(_):I.fulfillUnknown()}return null}static _hitTestViewCursor(C,I){if(I.target){const _=C.lastRenderData.lastViewCursorsRenderData;for(const A of _)if(I.target===A.domNode)return I.fulfillContentText(A.position,null,{mightBeForeignElement:!1,injectedText:null})}if(I.isInContentArea){const _=C.lastRenderData.lastViewCursorsRenderData,A=I.mouseContentHorizontalOffset,k=I.mouseVerticalOffset;for(const L of _){if(A<L.contentLeft||A>L.contentLeft+L.width)continue;const R=C.getVerticalOffsetForLineNumber(L.position.lineNumber);if(R<=k&&k<=R+L.height)return I.fulfillContentText(L.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(C,I){const _=C.getZoneAtCoord(I.mouseVerticalOffset);if(_){const A=I.isInContentArea?8:5;return I.fulfillViewZone(A,_.position,_)}return null}static _hitTestTextArea(C,I){return o.isTextArea(I.targetPath)?C.lastRenderData.lastTextareaPosition?I.fulfillContentText(C.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):I.fulfillTextarea():null}static _hitTestMargin(C,I){if(I.isInMarginArea){const _=C.getFullLineRangeAtCoord(I.mouseVerticalOffset),A=_.range.getStartPosition();let k=Math.abs(I.relativePos.x);const L={isAfterLines:_.isAfterLines,glyphMarginLeft:C.layoutInfo.glyphMarginLeft,glyphMarginWidth:C.layoutInfo.glyphMarginWidth,lineNumbersWidth:C.layoutInfo.lineNumbersWidth,offsetX:k};return k-=C.layoutInfo.glyphMarginLeft,k<=C.layoutInfo.glyphMarginWidth?I.fulfillMargin(2,A,_.range,L):(k-=C.layoutInfo.glyphMarginWidth,k<=C.layoutInfo.lineNumbersWidth?I.fulfillMargin(3,A,_.range,L):(k-=C.layoutInfo.lineNumbersWidth,I.fulfillMargin(4,A,_.range,L)))}return null}static _hitTestViewLines(C,I,_){if(!o.isChildOfViewLines(I.targetPath))return null;if(C.isInTopPadding(I.mouseVerticalOffset))return I.fulfillContentEmpty(new D.Position(1,1),c);if(C.isAfterLines(I.mouseVerticalOffset)||C.isInBottomPadding(I.mouseVerticalOffset)){const k=C.viewModel.getLineCount(),L=C.viewModel.getLineMaxColumn(k);return I.fulfillContentEmpty(new D.Position(k,L),c)}if(_){if(o.isStrictChildOfViewLines(I.targetPath)){const k=C.getLineNumberAtVerticalOffset(I.mouseVerticalOffset);if(C.viewModel.getLineLength(k)===0){const R=C.getLineWidth(k),M=l(I.mouseContentHorizontalOffset-R);return I.fulfillContentEmpty(new D.Position(k,1),M)}const L=C.getLineWidth(k);if(I.mouseContentHorizontalOffset>=L){const R=l(I.mouseContentHorizontalOffset-L),M=new D.Position(k,C.viewModel.getLineMaxColumn(k));return I.fulfillContentEmpty(M,R)}}return I.fulfillUnknown()}const A=n._doHitTest(C,I);return A.type===1?n.createMouseTargetFromHitTestPosition(C,I,A.spanNode,A.position,A.injectedText):this._createMouseTarget(C,I.withTarget(A.hitTarget),!0)}static _hitTestMinimap(C,I){if(o.isChildOfMinimap(I.targetPath)){const _=C.getLineNumberAtVerticalOffset(I.mouseVerticalOffset),A=C.viewModel.getLineMaxColumn(_);return I.fulfillScrollbar(new D.Position(_,A))}return null}static _hitTestScrollbarSlider(C,I){if(o.isChildOfScrollableElement(I.targetPath)&&I.target&&I.target.nodeType===1){const _=I.target.className;if(_&&/\b(slider|scrollbar)\b/.test(_)){const A=C.getLineNumberAtVerticalOffset(I.mouseVerticalOffset),k=C.viewModel.getLineMaxColumn(A);return I.fulfillScrollbar(new D.Position(A,k))}}return null}static _hitTestScrollbar(C,I){if(o.isChildOfScrollableElement(I.targetPath)){const _=C.getLineNumberAtVerticalOffset(I.mouseVerticalOffset),A=C.viewModel.getLineMaxColumn(_);return I.fulfillScrollbar(new D.Position(_,A))}return null}getMouseColumn(C){const I=this._context.configuration.options,_=I.get(142),A=this._context.viewLayout.getCurrentScrollLeft()+C.x-_.contentLeft;return n._getMouseColumn(A,I.get(49).typicalHalfwidthCharacterWidth)}static _getMouseColumn(C,I){return C<0?1:Math.round(C/I)+1}static createMouseTargetFromHitTestPosition(C,I,_,A,k){const L=A.lineNumber,R=A.column,M=C.getLineWidth(L);if(I.mouseContentHorizontalOffset>M){const K=l(I.mouseContentHorizontalOffset-M);return I.fulfillContentEmpty(A,K)}const N=C.visibleRangeForPosition(L,R);if(!N)return I.fulfillUnknown(A);const P=N.left;if(Math.abs(I.mouseContentHorizontalOffset-P)<1)return I.fulfillContentText(A,null,{mightBeForeignElement:!!k,injectedText:k});const x=[];if(x.push({offset:N.left,column:R}),R>1){const K=C.visibleRangeForPosition(L,R-1);K&&x.push({offset:K.left,column:R-1})}const F=C.viewModel.getLineMaxColumn(L);if(R<F){const K=C.visibleRangeForPosition(L,R+1);K&&x.push({offset:K.left,column:R+1})}x.sort((K,H)=>K.offset-H.offset);const V=I.pos.toClientCoordinates(),W=_.getBoundingClientRect(),z=W.left<=V.clientX&&V.clientX<=W.right;let B=null;for(let K=1;K<x.length;K++){const H=x[K-1],U=x[K];if(H.offset<=I.mouseContentHorizontalOffset&&I.mouseContentHorizontalOffset<=U.offset){B=new T.Range(L,H.column,L,U.column);const G=Math.abs(H.offset-I.mouseContentHorizontalOffset),$=Math.abs(U.offset-I.mouseContentHorizontalOffset);A=G<$?new D.Position(L,H.column):new D.Position(L,U.column);break}}return I.fulfillContentText(A,B,{mightBeForeignElement:!z||!!k,injectedText:k})}static _doHitTestWithCaretRangeFromPoint(C,I){const _=C.getLineNumberAtVerticalOffset(I.mouseVerticalOffset),A=C.getVerticalOffsetForLineNumber(_),k=A+C.lineHeight;if(!(_===C.viewModel.getLineCount()&&I.mouseVerticalOffset>k)){const R=Math.floor((A+k)/2);let M=I.pos.y+(R-I.mouseVerticalOffset);M<=I.editorPos.y&&(M=I.editorPos.y+1),M>=I.editorPos.y+I.editorPos.height&&(M=I.editorPos.y+I.editorPos.height-1);const N=new t.PageCoordinates(I.pos.x,M),P=this._actualDoHitTestWithCaretRangeFromPoint(C,N.toClientCoordinates());if(P.type===1)return P}return this._actualDoHitTestWithCaretRangeFromPoint(C,I.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(C,I){const _=v.getShadowRoot(C.viewDomNode);let A;if(_?typeof _.caretRangeFromPoint>"u"?A=g(_,I.clientX,I.clientY):A=_.caretRangeFromPoint(I.clientX,I.clientY):A=document.caretRangeFromPoint(I.clientX,I.clientY),!A||!A.startContainer)return new h;const k=A.startContainer;if(k.nodeType===k.TEXT_NODE){const L=k.parentNode,R=L?L.parentNode:null,M=R?R.parentNode:null;return(M&&M.nodeType===M.ELEMENT_NODE?M.className:null)===b.ViewLine.CLASS_NAME?r.createFromDOMInfo(C,L,A.startOffset):new h(k.parentNode)}else if(k.nodeType===k.ELEMENT_NODE){const L=k.parentNode,R=L?L.parentNode:null;return(R&&R.nodeType===R.ELEMENT_NODE?R.className:null)===b.ViewLine.CLASS_NAME?r.createFromDOMInfo(C,k,k.textContent.length):new h(k)}return new h}static _doHitTestWithCaretPositionFromPoint(C,I){const _=document.caretPositionFromPoint(I.clientX,I.clientY);if(_.offsetNode.nodeType===_.offsetNode.TEXT_NODE){const A=_.offsetNode.parentNode,k=A?A.parentNode:null,L=k?k.parentNode:null;return(L&&L.nodeType===L.ELEMENT_NODE?L.className:null)===b.ViewLine.CLASS_NAME?r.createFromDOMInfo(C,_.offsetNode.parentNode,_.offset):new h(_.offsetNode.parentNode)}if(_.offsetNode.nodeType===_.offsetNode.ELEMENT_NODE){const A=_.offsetNode.parentNode,k=A&&A.nodeType===A.ELEMENT_NODE?A.className:null,L=A?A.parentNode:null,R=L&&L.nodeType===L.ELEMENT_NODE?L.className:null;if(k===b.ViewLine.CLASS_NAME){const M=_.offsetNode.childNodes[Math.min(_.offset,_.offsetNode.childNodes.length-1)];if(M)return r.createFromDOMInfo(C,M,0)}else if(R===b.ViewLine.CLASS_NAME)return r.createFromDOMInfo(C,_.offsetNode,0)}return new h(_.offsetNode)}static _snapToSoftTabBoundary(C,I){const _=I.getLineContent(C.lineNumber),{tabSize:A}=I.model.getOptions(),k=m.AtomicTabMoveOperations.atomicPosition(_,C.column-1,A,2);return k!==-1?new D.Position(C.lineNumber,k+1):C}static _doHitTest(C,I){let _=new h;if(typeof document.caretRangeFromPoint=="function"?_=this._doHitTestWithCaretRangeFromPoint(C,I):document.caretPositionFromPoint&&(_=this._doHitTestWithCaretPositionFromPoint(C,I.pos.toClientCoordinates())),_.type===1){const A=C.viewModel.getInjectedTextAt(_.position),k=C.viewModel.normalizePosition(_.position,2);(A||!k.equals(_.position))&&(_=new a(k,_.spanNode,A))}return _}}e.MouseTargetFactory=n;function g(E,C,I){const _=document.createRange();let A=E.elementFromPoint(C,I);if(A!==null){for(;A&&A.firstChild&&A.firstChild.nodeType!==A.firstChild.TEXT_NODE&&A.lastChild&&A.lastChild.firstChild;)A=A.lastChild;const k=A.getBoundingClientRect(),L=window.getComputedStyle(A,null).getPropertyValue("font-style"),R=window.getComputedStyle(A,null).getPropertyValue("font-variant"),M=window.getComputedStyle(A,null).getPropertyValue("font-weight"),N=window.getComputedStyle(A,null).getPropertyValue("font-size"),P=window.getComputedStyle(A,null).getPropertyValue("line-height"),x=window.getComputedStyle(A,null).getPropertyValue("font-family"),F=`${L} ${R} ${M} ${N}/${P} ${x}`,V=A.innerText;let W=k.left,z=0,B;if(C>k.left+k.width)z=V.length;else{const K=w.getInstance();for(let H=0;H<V.length+1;H++){if(B=K.getCharWidth(V.charAt(H),F)/2,W+=B,C<W){z=H;break}W+=B}}_.setStart(A.firstChild,z),_.setEnd(A.firstChild,z)}return _}class w{static{this._INSTANCE=null}static getInstance(){return w._INSTANCE||(w._INSTANCE=new w),w._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(C,I){const _=C+I;if(this._cache[_])return this._cache[_];const A=this._canvas.getContext("2d");A.font=I;const L=A.measureText(C).width;return this._cache[_]=L,L}}}),define(Q[3341],Y([1,0,7,129,4,18,1204,595,659,51,96,566,162]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseHandler=void 0;class r extends h.ViewEventHandler{constructor(p,c,l){super(),this._mouseLeaveMonitor=null,this._context=p,this.viewController=c,this.viewHelper=l,this.mouseTargetFactory=new T.MouseTargetFactory(this._context,l),this._mouseDownOperation=this._register(new i(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(w,E)=>this._createMouseTarget(w,E),w=>this._getMouseColumn(w))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(142).height;const n=new f.EditorMouseEventFactory(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,w=>this._onContextMenu(w,!0))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,w=>{this._onMouseMove(w),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=t.addDisposableListener(document,"mousemove",E=>{this.viewHelper.viewDomNode.contains(E.target)||this._onMouseLeave(new f.EditorMouseEvent(E,!1,this.viewHelper.viewDomNode))}))})),this._register(n.onMouseUp(this.viewHelper.viewDomNode,w=>this._onMouseUp(w))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,w=>this._onMouseLeave(w)));let g=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,(w,E)=>{g=E})),this._register(t.addDisposableListener(this.viewHelper.viewDomNode,t.EventType.POINTER_UP,w=>{this._mouseDownOperation.onPointerUp()})),this._register(n.onMouseDown(this.viewHelper.viewDomNode,w=>this._onMouseDown(w,g))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const p=a.MouseWheelClassifier.INSTANCE;let c=0,l=v.EditorZoom.getZoomLevel(),n=!1,g=0;const w=C=>{if(this.viewController.emitMouseWheel(C),!this._context.configuration.options.get(74))return;const I=new y.StandardWheelEvent(C);if(p.acceptStandardWheelEvent(I),p.isPhysicalMouseWheel()){if(E(C)){const _=v.EditorZoom.getZoomLevel(),A=I.deltaY>0?1:-1;v.EditorZoom.setZoomLevel(_+A),I.preventDefault(),I.stopPropagation()}}else Date.now()-c>50&&(l=v.EditorZoom.getZoomLevel(),n=E(C),g=0),c=Date.now(),g+=I.deltaY,n&&(v.EditorZoom.setZoomLevel(l+g/5),I.preventDefault(),I.stopPropagation())};this._register(t.addDisposableListener(this.viewHelper.viewDomNode,t.EventType.MOUSE_WHEEL,w,{capture:!0,passive:!1}));function E(C){return D.isMacintosh?(C.metaKey||C.ctrlKey)&&!C.shiftKey&&!C.altKey:C.ctrlKey&&!C.metaKey&&!C.shiftKey&&!C.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(p){if(p.hasChanged(142)){const c=this._context.configuration.options.get(142).height;this._height!==c&&(this._height=c,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(p){return this._mouseDownOperation.onCursorStateChanged(p),!1}onFocusChanged(p){return!1}getTargetAtClientPoint(p,c){const n=new f.ClientCoordinates(p,c).toPageCoordinates(),g=(0,f.createEditorPagePosition)(this.viewHelper.viewDomNode);if(n.y<g.y||n.y>g.y+g.height||n.x<g.x||n.x>g.x+g.width)return null;const w=(0,f.createCoordinatesRelativeToEditor)(this.viewHelper.viewDomNode,g,n);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),g,n,w,null)}_createMouseTarget(p,c){let l=p.target;if(!this.viewHelper.viewDomNode.contains(l)){const n=t.getShadowRoot(this.viewHelper.viewDomNode);n&&(l=n.elementsFromPoint(p.posx,p.posy).find(g=>this.viewHelper.viewDomNode.contains(g)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),p.editorPos,p.pos,p.relativePos,c?l:null)}_getMouseColumn(p){return this.mouseTargetFactory.getMouseColumn(p.relativePos)}_onContextMenu(p,c){this.viewController.emitContextMenu({event:p,target:this._createMouseTarget(p,c)})}_onMouseMove(p){this.mouseTargetFactory.mouseTargetIsWidget(p)||p.preventDefault(),!(this._mouseDownOperation.isActive()||p.timestamp<this.lastMouseLeaveTime)&&this.viewController.emitMouseMove({event:p,target:this._createMouseTarget(p,!0)})}_onMouseLeave(p){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:p,target:null})}_onMouseUp(p){this.viewController.emitMouseUp({event:p,target:this._createMouseTarget(p,!0)})}_onMouseDown(p,c){const l=this._createMouseTarget(p,!0),n=l.type===6||l.type===7,g=l.type===2||l.type===3||l.type===4,w=l.type===3,E=this._context.configuration.options.get(107),C=l.type===8||l.type===5,I=l.type===9;let _=p.leftButton||p.middleButton;D.isMacintosh&&p.leftButton&&p.ctrlKey&&(_=!1);const A=()=>{p.preventDefault(),this.viewHelper.focusTextArea()};if(_&&(n||w&&E))A(),this._mouseDownOperation.start(l.type,p,c);else if(g)p.preventDefault();else if(C){const k=l.detail;_&&this.viewHelper.shouldSuppressMouseDownOnViewZone(k.viewZoneId)&&(A(),this._mouseDownOperation.start(l.type,p,c),p.preventDefault())}else I&&this.viewHelper.shouldSuppressMouseDownOnWidget(l.detail)&&(A(),p.preventDefault());this.viewController.emitMouseDown({event:p,target:l})}_onMouseWheel(p){this.viewController.emitMouseWheel(p)}}e.MouseHandler=r;class i extends b.Disposable{constructor(p,c,l,n,g,w){super(),this._context=p,this._viewController=c,this._viewHelper=l,this._mouseTargetFactory=n,this._createMouseTarget=g,this._getMouseColumn=w,this._mouseMoveMonitor=this._register(new f.GlobalEditorPointerMoveMonitor(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new s(this._context,this._viewHelper,this._mouseTargetFactory,(E,C,I)=>this._dispatchMouse(E,C,I))),this._mouseState=new u,this._currentSelection=new S.Selection(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(p){this._lastMouseEvent=p,this._mouseState.setModifiers(p);const c=this._findMousePosition(p,!1);c&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:p,target:c}):c.type===13&&(c.outsidePosition==="above"||c.outsidePosition==="below")?this._topBottomDragScrolling.start(c,p):(this._topBottomDragScrolling.stop(),this._dispatchMouse(c,!0,1)))}start(p,c,l){this._lastMouseEvent=c,this._mouseState.setStartedOnLineNumbers(p===3),this._mouseState.setStartButtons(c),this._mouseState.setModifiers(c);const n=this._findMousePosition(c,!0);if(!n||!n.position)return;this._mouseState.trySetCount(c.detail,n.position),c.detail=this._mouseState.count;const g=this._context.configuration.options;if(!g.get(89)&&g.get(34)&&!g.get(21)&&!this._mouseState.altKey&&c.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&n.type===6&&n.position&&this._currentSelection.containsPosition(n.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,l,c.buttons,w=>this._onMouseDownThenMove(w),w=>{const E=this._findMousePosition(this._lastMouseEvent,!1);w&&w instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:E?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,c.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,l,c.buttons,w=>this._onMouseDownThenMove(w),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(p){this._currentSelection=p.selections[0]}_getPositionOutsideEditor(p){const c=p.editorPos,l=this._context.viewModel,n=this._context.viewLayout,g=this._getMouseColumn(p);if(p.posy<c.y){const E=c.y-p.posy,C=Math.max(n.getCurrentScrollTop()-E,0),I=T.HitTestContext.getZoneAtCoord(this._context,C);if(I){const A=this._helpPositionJumpOverViewZone(I);if(A)return T.MouseTarget.createOutsideEditor(g,A,"above",E)}const _=n.getLineNumberAtVerticalOffset(C);return T.MouseTarget.createOutsideEditor(g,new m.Position(_,1),"above",E)}if(p.posy>c.y+c.height){const E=p.posy-c.y-c.height,C=n.getCurrentScrollTop()+p.relativePos.y,I=T.HitTestContext.getZoneAtCoord(this._context,C);if(I){const A=this._helpPositionJumpOverViewZone(I);if(A)return T.MouseTarget.createOutsideEditor(g,A,"below",E)}const _=n.getLineNumberAtVerticalOffset(C);return T.MouseTarget.createOutsideEditor(g,new m.Position(_,l.getLineMaxColumn(_)),"below",E)}const w=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+p.relativePos.y);if(p.posx<c.x){const E=c.x-p.posx;return T.MouseTarget.createOutsideEditor(g,new m.Position(w,1),"left",E)}if(p.posx>c.x+c.width){const E=p.posx-c.x-c.width;return T.MouseTarget.createOutsideEditor(g,new m.Position(w,l.getLineMaxColumn(w)),"right",E)}return null}_findMousePosition(p,c){const l=this._getPositionOutsideEditor(p);if(l)return l;const n=this._createMouseTarget(p,c);if(!n.position)return null;if(n.type===8||n.type===5){const w=this._helpPositionJumpOverViewZone(n.detail);if(w)return T.MouseTarget.createViewZone(n.type,n.element,n.mouseColumn,w,n.detail)}return n}_helpPositionJumpOverViewZone(p){const c=new m.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),l=p.positionBefore,n=p.positionAfter;return l&&n?l.isBefore(c)?l:n:null}_dispatchMouse(p,c,l){p.position&&this._viewController.dispatchMouse({position:p.position,mouseColumn:p.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:l,inSelectionMode:c,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:p.type===6&&p.detail.injectedText!==null})}}class s extends b.Disposable{constructor(p,c,l,n){super(),this._context=p,this._viewHelper=c,this._mouseTargetFactory=l,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(p,c){this._operation?this._operation.setPosition(p,c):this._operation=new o(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,p,c)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class o extends b.Disposable{constructor(p,c,l,n,g,w){super(),this._context=p,this._viewHelper=c,this._mouseTargetFactory=l,this._dispatchMouse=n,this._position=g,this._mouseEvent=w,this._lastTime=Date.now(),this._animationFrameDisposable=t.scheduleAtNextAnimationFrame(()=>this._execute())}dispose(){this._animationFrameDisposable.dispose()}setPosition(p,c){this._position=p,this._mouseEvent=c}_tick(){const p=Date.now(),c=p-this._lastTime;return this._lastTime=p,c}_getScrollSpeed(){const p=this._context.configuration.options.get(65),c=this._context.configuration.options.get(142).height/p,l=this._position.outsideDistance/p;return l<=1.5?Math.max(30,c*(1+l)):l<=3?Math.max(60,c*(2+l)):Math.max(200,c*(7+l))}_execute(){const p=this._context.configuration.options.get(65),c=this._getScrollSpeed(),l=this._tick(),n=c*(l/1e3)*p,g=this._position.outsidePosition==="above"?-n:n;this._context.viewModel.viewLayout.deltaScrollNow(0,g),this._viewHelper.renderNow();const w=this._context.viewLayout.getLinesViewportData(),E=this._position.outsidePosition==="above"?w.startLineNumber:w.endLineNumber;let C;{const I=(0,f.createEditorPagePosition)(this._viewHelper.viewDomNode),_=this._context.configuration.options.get(142).horizontalScrollbarHeight,A=new f.PageCoordinates(this._mouseEvent.pos.x,I.y+I.height-_-.1),k=(0,f.createCoordinatesRelativeToEditor)(this._viewHelper.viewDomNode,I,A);C=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),I,A,k,null)}(!C.position||C.position.lineNumber!==E)&&(this._position.outsidePosition==="above"?C=T.MouseTarget.createOutsideEditor(this._position.mouseColumn,new m.Position(E,1),"above",this._position.outsideDistance):C=T.MouseTarget.createOutsideEditor(this._position.mouseColumn,new m.Position(E,this._context.viewModel.getLineMaxColumn(E)),"below",this._position.outsideDistance)),this._dispatchMouse(C,!0,2),this._animationFrameDisposable=t.scheduleAtNextAnimationFrame(()=>this._execute())}}class u{static{this.CLEAR_MOUSE_DOWN_COUNT_TIME=400}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(p){this._altKey=p.altKey,this._ctrlKey=p.ctrlKey,this._metaKey=p.metaKey,this._shiftKey=p.shiftKey}setStartButtons(p){this._leftButton=p.leftButton,this._middleButton=p.middleButton}setStartedOnLineNumbers(p){this._startedOnLineNumbers=p}trySetCount(p,c){const l=new Date().getTime();l-this._lastSetMouseDownCountTime>u.CLEAR_MOUSE_DOWN_COUNT_TIME&&(p=1),this._lastSetMouseDownCountTime=l,p>this._lastMouseDownCount+1&&(p=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(c)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=c,this._lastMouseDownCount=Math.min(p,this._lastMouseDownPositionEqualCount)}}}),define(Q[3342],Y([1,0,7,18,151,4,3341,595,324,675]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PointerHandler=e.PointerEventHandler=void 0;class S extends T.MouseHandler{constructor(i,s,o){super(i,s,o),this._register(b.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,b.EventType.Tap,d=>this.onTap(d))),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,b.EventType.Change,d=>this.onChange(d))),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,b.EventType.Contextmenu,d=>this._onContextMenu(new f.EditorMouseEvent(d,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,"pointerdown",d=>{const p=d.pointerType;if(p==="mouse"){this._lastPointerType="mouse";return}else p==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const u=new f.EditorPointerEventFactory(this.viewHelper.viewDomNode);this._register(u.onPointerMove(this.viewHelper.viewDomNode,d=>this._onMouseMove(d))),this._register(u.onPointerUp(this.viewHelper.viewDomNode,d=>this._onMouseUp(d))),this._register(u.onPointerLeave(this.viewHelper.viewDomNode,d=>this._onMouseLeave(d))),this._register(u.onPointerDown(this.viewHelper.viewDomNode,(d,p)=>this._onMouseDown(d,p)))}onTap(i){if(!i.initialTarget||!this.viewHelper.linesContentDomNode.contains(i.initialTarget))return;i.preventDefault(),this.viewHelper.focusTextArea();const s=this._createMouseTarget(new f.EditorMouseEvent(i,!1,this.viewHelper.viewDomNode),!1);s.position&&this.viewController.dispatchMouse({position:s.position,mouseColumn:s.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:i.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:s.type===6&&s.detail.injectedText!==null})}onChange(i){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-i.translationX,-i.translationY)}_onMouseDown(i,s){i.browserEvent.pointerType!=="touch"&&super._onMouseDown(i,s)}}e.PointerEventHandler=S;class h extends T.MouseHandler{constructor(i,s,o){super(i,s,o),this._register(b.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,b.EventType.Tap,u=>this.onTap(u))),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,b.EventType.Change,u=>this.onChange(u))),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,b.EventType.Contextmenu,u=>this._onContextMenu(new f.EditorMouseEvent(u,!1,this.viewHelper.viewDomNode),!1)))}onTap(i){i.preventDefault(),this.viewHelper.focusTextArea();const s=this._createMouseTarget(new f.EditorMouseEvent(i,!1,this.viewHelper.viewDomNode),!1);if(s.position){const o=document.createEvent("CustomEvent");o.initEvent(m.TextAreaSyntethicEvents.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(o),this.viewController.moveTo(s.position,1)}}onChange(i){this._context.viewModel.viewLayout.deltaScrollNow(-i.translationX,-i.translationY)}}class a extends D.Disposable{constructor(i,s,o){super(),y.isIOS&&v.BrowserFeatures.pointerEvents?this.handler=this._register(new S(i,s,o)):window.TouchEvent?this.handler=this._register(new h(i,s,o)):this.handler=this._register(new T.MouseHandler(i,s,o))}getTargetAtClientPoint(i,s){return this.handler.getTargetAtClientPoint(i,s)}}e.PointerHandler=a}),define(Q[3343],Y([1,0,484,14,18,258,562,837,239,1851,887,51,27,1705]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLines=void 0;class r{constructor(){this._currentVisibleRange=new a.Range(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(d){this._currentVisibleRange=d}}class i{constructor(d,p,c,l,n,g,w){this.minimalReveal=d,this.lineNumber=p,this.startColumn=c,this.endColumn=l,this.startScrollTop=n,this.stopScrollTop=g,this.scrollType=w,this.type="range",this.minLineNumber=p,this.maxLineNumber=p}}class s{constructor(d,p,c,l,n){this.minimalReveal=d,this.selections=p,this.startScrollTop=c,this.stopScrollTop=l,this.scrollType=n,this.type="selections";let g=p[0].startLineNumber,w=p[0].endLineNumber;for(let E=1,C=p.length;E<C;E++){const I=p[E];g=Math.min(g,I.startLineNumber),w=Math.max(w,I.endLineNumber)}this.minLineNumber=g,this.maxLineNumber=w}}class o extends v.ViewPart{static{this.HORIZONTAL_EXTRA_PX=30}constructor(d,p){super(d),this._linesContent=p,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new f.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const c=this._context.configuration,l=this._context.configuration.options,n=l.get(49),g=l.get(143);this._lineHeight=l.get(65),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=g.isViewportWrapping,this._revealHorizontalRightPadding=l.get(98),this._cursorSurroundingLines=l.get(28),this._cursorSurroundingLinesStyle=l.get(29),this._canUseLayerHinting=!l.get(31),this._viewLineOptions=new S.ViewLineOptions(c,this._context.theme.type),v.PartFingerprints.write(this.domNode,7),this.domNode.setClassName(`view-lines ${t.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),(0,D.applyFontInfo)(this.domNode,n),this._maxLineWidth=0,this._asyncUpdateLineWidths=new y.RunOnceScheduler(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new y.RunOnceScheduler(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new r,this._horizontalRevealRequest=null,this._stickyScrollEnabled=l.get(113).enabled,this._maxNumberStickyLines=l.get(113).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new S.ViewLine(this._viewLineOptions)}onConfigurationChanged(d){this._visibleLines.onConfigurationChanged(d),d.hasChanged(143)&&(this._maxLineWidth=0);const p=this._context.configuration.options,c=p.get(49),l=p.get(143);return this._lineHeight=p.get(65),this._typicalHalfwidthCharacterWidth=c.typicalHalfwidthCharacterWidth,this._isViewportWrapping=l.isViewportWrapping,this._revealHorizontalRightPadding=p.get(98),this._cursorSurroundingLines=p.get(28),this._cursorSurroundingLinesStyle=p.get(29),this._canUseLayerHinting=!p.get(31),this._stickyScrollEnabled=p.get(113).enabled,this._maxNumberStickyLines=p.get(113).maxLineCount,(0,D.applyFontInfo)(this.domNode,c),this._onOptionsMaybeChanged(),d.hasChanged(142)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const d=this._context.configuration,p=new S.ViewLineOptions(d,this._context.theme.type);if(!this._viewLineOptions.equals(p)){this._viewLineOptions=p;const c=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let n=c;n<=l;n++)this._visibleLines.getVisibleLine(n).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(d){const p=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();let l=!1;for(let n=p;n<=c;n++)l=this._visibleLines.getVisibleLine(n).onSelectionChanged()||l;return l}onDecorationsChanged(d){{const p=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let l=p;l<=c;l++)this._visibleLines.getVisibleLine(l).onDecorationsChanged()}return!0}onFlushed(d){const p=this._visibleLines.onFlushed(d);return this._maxLineWidth=0,p}onLinesChanged(d){return this._visibleLines.onLinesChanged(d)}onLinesDeleted(d){return this._visibleLines.onLinesDeleted(d)}onLinesInserted(d){return this._visibleLines.onLinesInserted(d)}onRevealRangeRequest(d){const p=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),d.source,d.minimalReveal,d.range,d.selections,d.verticalType);if(p===-1)return!1;let c=this._context.viewLayout.validateScrollPosition({scrollTop:p});d.revealHorizontal?d.range&&d.range.startLineNumber!==d.range.endLineNumber?c={scrollTop:c.scrollTop,scrollLeft:0}:d.range?this._horizontalRevealRequest=new i(d.minimalReveal,d.range.startLineNumber,d.range.startColumn,d.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),c.scrollTop,d.scrollType):d.selections&&d.selections.length>0&&(this._horizontalRevealRequest=new s(d.minimalReveal,d.selections,this._context.viewLayout.getCurrentScrollTop(),c.scrollTop,d.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-c.scrollTop)<=this._lineHeight?1:d.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(c,n),!0}onScrollChanged(d){if(this._horizontalRevealRequest&&d.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&d.scrollTopChanged){const p=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),c=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(d.scrollTop<p||d.scrollTop>c)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(d.scrollWidth),this._visibleLines.onScrollChanged(d)||!0}onTokensChanged(d){return this._visibleLines.onTokensChanged(d)}onZonesChanged(d){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(d)}onThemeChanged(d){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(d,p){const c=this._getViewLineDomNode(d);if(c===null)return null;const l=this._getLineNumberFor(c);if(l===-1||l<1||l>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(l)===1)return new h.Position(l,1);const n=this._visibleLines.getStartLineNumber(),g=this._visibleLines.getEndLineNumber();if(l<n||l>g)return null;let w=this._visibleLines.getVisibleLine(l).getColumnOfNodeOffset(d,p);const E=this._context.viewModel.getLineMinColumn(l);return w<E&&(w=E),new h.Position(l,w)}_getViewLineDomNode(d){for(;d&&d.nodeType===1;){if(d.className===S.ViewLine.CLASS_NAME)return d;d=d.parentElement}return null}_getLineNumberFor(d){const p=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let l=p;l<=c;l++){const n=this._visibleLines.getVisibleLine(l);if(d===n.getDomNode())return l}return-1}getLineWidth(d){const p=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();if(d<p||d>c)return-1;const l=new m.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),n=this._visibleLines.getVisibleLine(d).getWidth(l);return this._updateLineWidthsSlowIfDomDidLayout(l),n}linesVisibleRangesForRange(d,p){if(this.shouldRender())return null;const c=d.endLineNumber,l=a.Range.intersectRanges(d,this._lastRenderedData.getCurrentVisibleRange());if(!l)return null;const n=[];let g=0;const w=new m.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);let E=0;p&&(E=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new h.Position(l.startLineNumber,1)).lineNumber);const C=this._visibleLines.getStartLineNumber(),I=this._visibleLines.getEndLineNumber();for(let _=l.startLineNumber;_<=l.endLineNumber;_++){if(_<C||_>I)continue;const A=_===l.startLineNumber?l.startColumn:1,k=_!==l.endLineNumber,L=k?this._context.viewModel.getLineMaxColumn(_):l.endColumn,R=this._visibleLines.getVisibleLine(_).getVisibleRangesForRange(_,A,L,w);if(R){if(p&&_<c){const M=E;E=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new h.Position(_+1,1)).lineNumber,M!==E&&(R.ranges[R.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}n[g++]=new T.LineVisibleRanges(R.outsideRenderedLine,_,T.HorizontalRange.from(R.ranges),k)}}return this._updateLineWidthsSlowIfDomDidLayout(w),g===0?null:n}_visibleRangesForLineRange(d,p,c){if(this.shouldRender()||d<this._visibleLines.getStartLineNumber()||d>this._visibleLines.getEndLineNumber())return null;const l=new m.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),n=this._visibleLines.getVisibleLine(d).getVisibleRangesForRange(d,p,c,l);return this._updateLineWidthsSlowIfDomDidLayout(l),n}visibleRangeForPosition(d){const p=this._visibleRangesForLineRange(d.lineNumber,d.column,d.column);return p?new T.HorizontalPosition(p.outsideRenderedLine,p.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(d){d.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(d){const p=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();let l=1,n=!0;for(let g=p;g<=c;g++){const w=this._visibleLines.getVisibleLine(g);if(d&&!w.getWidthIsFast()){n=!1;continue}l=Math.max(l,w.getWidth(null))}return n&&p===1&&c===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(l),n}_checkMonospaceFontAssumptions(){let d=-1,p=-1;const c=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let n=c;n<=l;n++){const g=this._visibleLines.getVisibleLine(n);if(g.needsMonospaceFontCheck()){const w=g.getWidth(null);w>p&&(p=w,d=n)}}if(d!==-1&&!this._visibleLines.getVisibleLine(d).monospaceAssumptionsAreValid())for(let n=c;n<=l;n++)this._visibleLines.getVisibleLine(n).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(d){if(this._visibleLines.renderLines(d),this._lastRenderedData.setCurrentVisibleRange(d.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const c=this._horizontalRevealRequest;if(d.startLineNumber<=c.minLineNumber&&c.maxLineNumber<=d.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const l=this._computeScrollLeftToReveal(c);l&&(this._isViewportWrapping||this._ensureMaxLineWidth(l.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:l.scrollLeft},c.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),b.isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const c=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let n=c;n<=l;n++)if(this._visibleLines.getVisibleLine(n).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const p=this._context.viewLayout.getCurrentScrollTop()-d.bigNumbersDelta;this._linesContent.setTop(-p),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(d){const p=Math.ceil(d);this._maxLineWidth<p&&(this._maxLineWidth=p,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(d,p,c,l,n,g){const w=d.top,E=d.height,C=w+E;let I,_,A;if(n&&n.length>0){let N=n[0].startLineNumber,P=n[0].endLineNumber;for(let x=1,F=n.length;x<F;x++){const V=n[x];N=Math.min(N,V.startLineNumber),P=Math.max(P,V.endLineNumber)}I=!1,_=this._context.viewLayout.getVerticalOffsetForLineNumber(N),A=this._context.viewLayout.getVerticalOffsetForLineNumber(P)+this._lineHeight}else if(l)I=!0,_=this._context.viewLayout.getVerticalOffsetForLineNumber(l.startLineNumber),A=this._context.viewLayout.getVerticalOffsetForLineNumber(l.endLineNumber)+this._lineHeight;else return-1;const k=(p==="mouse"||c)&&this._cursorSurroundingLinesStyle==="default";let L=0,R=0;if(k)c||(L=this._lineHeight);else{const N=Math.min(E/this._lineHeight/2,this._cursorSurroundingLines);this._stickyScrollEnabled?L=Math.max(N,this._maxNumberStickyLines)*this._lineHeight:L=N*this._lineHeight,R=Math.max(0,N-1)*this._lineHeight}c||(g===0||g===4)&&(R+=this._lineHeight),_-=L,A+=R;let M;if(A-_>E){if(!I)return-1;M=_}else if(g===5||g===6)if(g===6&&w<=_&&A<=C)M=w;else{const N=Math.max(5*this._lineHeight,E*.2),P=_-N,x=A-E;M=Math.max(x,P)}else if(g===1||g===2)if(g===2&&w<=_&&A<=C)M=w;else{const N=(_+A)/2;M=Math.max(0,N-E/2)}else M=this._computeMinimumScrolling(w,C,_,A,g===3,g===4);return M}_computeScrollLeftToReveal(d){const p=this._context.viewLayout.getCurrentViewport(),c=this._context.configuration.options.get(142),l=p.left,n=l+p.width-c.verticalScrollbarWidth;let g=1073741824,w=0;if(d.type==="range"){const C=this._visibleRangesForLineRange(d.lineNumber,d.startColumn,d.endColumn);if(!C)return null;for(const I of C.ranges)g=Math.min(g,Math.round(I.left)),w=Math.max(w,Math.round(I.left+I.width))}else for(const C of d.selections){if(C.startLineNumber!==C.endLineNumber)return null;const I=this._visibleRangesForLineRange(C.startLineNumber,C.startColumn,C.endColumn);if(!I)return null;for(const _ of I.ranges)g=Math.min(g,Math.round(_.left)),w=Math.max(w,Math.round(_.left+_.width))}return d.minimalReveal||(g=Math.max(0,g-o.HORIZONTAL_EXTRA_PX),w+=this._revealHorizontalRightPadding),d.type==="selections"&&w-g>p.width?null:{scrollLeft:this._computeMinimumScrolling(l,n,g,w),maxHorizontalOffset:w}}_computeMinimumScrolling(d,p,c,l,n,g){d=d|0,p=p|0,c=c|0,l=l|0,n=!!n,g=!!g;const w=p-d;if(l-c<w){if(n)return c;if(g)return Math.max(0,l-w);if(c<d)return c;if(l>p)return Math.max(0,l-w)}else return c;return d}}e.ViewLines=o}),define(Q[1205],Y([1,0,7,67,85,306,400,20,14,397,102,15,6,257,4,18,33,2478,1165,203,10,167,656]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputList=e.QuickInputListFocus=void 0;const n=t.$;class g{constructor(M,N,P,x,F,V,W){this._checked=!1,this._hidden=!1,this.hasCheckbox=x,this.index=P,this.fireButtonTriggered=F,this.fireSeparatorButtonTriggered=V,this._onChecked=W,this.onChecked=x?a.Event.map(a.Event.filter(this._onChecked.event,z=>z.listElement===this),z=>z.checked):a.Event.None,M.type==="separator"?this._separator=M:(this.item=M,N&&N.type==="separator"&&!N.buttons&&(this._separator=N),this.saneDescription=this.item.description,this.saneDetail=this.item.detail,this._labelHighlights=this.item.highlights?.label,this._descriptionHighlights=this.item.highlights?.description,this._detailHighlights=this.item.highlights?.detail,this.saneTooltip=this.item.tooltip),this._init=new p.Lazy(()=>{const z=M.label??"",B=(0,r.parseLabelWithIcons)(z).text.trim(),K=M.ariaLabel||[z,this.saneDescription,this.saneDetail].map(H=>(0,r.getCodiconAriaLabel)(H)).filter(H=>!!H).join(", ");return{saneLabel:z,saneSortLabel:B,saneAriaLabel:K}})}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(M){this._element=M}get hidden(){return this._hidden}set hidden(M){this._hidden=M}get checked(){return this._checked}set checked(M){M!==this._checked&&(this._checked=M,this._onChecked.fire({listElement:this,checked:M}))}get separator(){return this._separator}set separator(M){this._separator=M}get labelHighlights(){return this._labelHighlights}set labelHighlights(M){this._labelHighlights=M}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(M){this._descriptionHighlights=M}get detailHighlights(){return this._detailHighlights}set detailHighlights(M){this._detailHighlights=M}}class w{static{this.ID="listelement"}constructor(M){this.themeService=M}get templateId(){return w.ID}renderTemplate(M){const N=Object.create(null);N.toDisposeElement=[],N.toDisposeTemplate=[],N.entry=t.append(M,n(".quick-input-list-entry"));const P=t.append(N.entry,n("label.quick-input-list-label"));N.toDisposeTemplate.push(t.addStandardDisposableListener(P,t.EventType.CLICK,B=>{N.checkbox.offsetParent||B.preventDefault()})),N.checkbox=t.append(P,n("input.quick-input-list-checkbox")),N.checkbox.type="checkbox",N.toDisposeTemplate.push(t.addStandardDisposableListener(N.checkbox,t.EventType.CHANGE,B=>{N.element.checked=N.checkbox.checked}));const x=t.append(P,n(".quick-input-list-rows")),F=t.append(x,n(".quick-input-list-row")),V=t.append(x,n(".quick-input-list-row"));N.label=new D.IconLabel(F,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0}),N.icon=t.prepend(N.label.element,n(".quick-input-list-icon"));const W=t.append(F,n(".quick-input-list-entry-keybinding"));N.keybinding=new T.KeybindingLabel(W,s.OS);const z=t.append(V,n(".quick-input-list-label-meta"));return N.detail=new D.IconLabel(z,{supportHighlights:!0,supportIcons:!0}),N.separator=t.append(N.entry,n(".quick-input-list-separator")),N.actionBar=new b.ActionBar(N.entry),N.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),N.toDisposeTemplate.push(N.actionBar),N}renderElement(M,N,P){P.element=M,M.element=P.entry??void 0;const x=M.item?M.item:M.separator;P.checkbox.checked=M.checked,P.toDisposeElement.push(M.onChecked(K=>P.checkbox.checked=K));const{labelHighlights:F,descriptionHighlights:V,detailHighlights:W}=M;if(M.item?.iconPath){const K=(0,l.isDark)(this.themeService.getColorTheme().type)?M.item.iconPath.dark:M.item.iconPath.light??M.item.iconPath.dark,H=c.URI.revive(K);P.icon.className="quick-input-list-icon",P.icon.style.backgroundImage=t.asCSSUrl(H)}else P.icon.style.backgroundImage="",P.icon.className=M.item?.iconClass?`quick-input-list-icon ${M.item.iconClass}`:"";const z={matches:F||[],descriptionTitle:M.saneDescription,descriptionMatches:V||[],labelEscapeNewLines:!0};x.type!=="separator"?(z.extraClasses=x.iconClasses,z.italic=x.italic,z.strikethrough=x.strikethrough,P.entry.classList.remove("quick-input-list-separator-as-item")):P.entry.classList.add("quick-input-list-separator-as-item"),P.label.setLabel(M.saneLabel,M.saneDescription,z),P.keybinding.set(x.type==="separator"?void 0:x.keybinding),M.saneDetail?(P.detail.element.style.display="",P.detail.setLabel(M.saneDetail,void 0,{matches:W,title:M.saneDetail,labelEscapeNewLines:!0})):P.detail.element.style.display="none",M.item&&M.separator&&M.separator.label?(P.separator.textContent=M.separator.label,P.separator.style.display=""):P.separator.style.display="none",P.entry.classList.toggle("quick-input-list-separator-border",!!M.separator);const B=x.buttons;B&&B.length?(P.actionBar.push(B.map((K,H)=>{let U=K.iconClass||(K.iconPath?(0,d.getIconClass)(K.iconPath):void 0);return K.alwaysVisible&&(U=U?`${U} always-visible`:"always-visible"),{id:`id-${H}`,class:U,enabled:!0,label:"",tooltip:K.tooltip||"",run:()=>{x.type!=="separator"?M.fireButtonTriggered({button:K,item:x}):M.fireSeparatorButtonTriggered({button:K,separator:x})}}}),{icon:!0,label:!1}),P.entry.classList.add("has-actions")):P.entry.classList.remove("has-actions")}disposeElement(M,N,P){P.toDisposeElement=(0,i.dispose)(P.toDisposeElement),P.actionBar.clear()}disposeTemplate(M){M.toDisposeElement=(0,i.dispose)(M.toDisposeElement),M.toDisposeTemplate=(0,i.dispose)(M.toDisposeTemplate)}}class E{getHeight(M){return M.item?M.saneDetail?44:22:24}getTemplateId(M){return w.ID}}var C;(function(R){R[R.First=1]="First",R[R.Second=2]="Second",R[R.Last=3]="Last",R[R.Next=4]="Next",R[R.Previous=5]="Previous",R[R.NextPage=6]="NextPage",R[R.PreviousPage=7]="PreviousPage"})(C||(e.QuickInputListFocus=C={}));class I{constructor(M,N,P,x){this.parent=M,this.options=P,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new 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._onSeparatorButtonTriggered=new a.Emitter,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new a.Emitter,this.onKeyDown=this._onKeyDown.event,this._onLeave=new a.Emitter,this.onLeave=this._onLeave.event,this._listElementChecked=new a.Emitter,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=N,this.container=t.append(this.parent,n(".quick-input-list"));const F=new E,V=new L;if(this.list=P.createList("QuickInput",this.container,F,[new w(x)],{identityProvider:{getId:W=>W.item?.id??W.item?.label??W.separator?.id??W.separator?.label??""},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:V}),this.list.getHTMLElement().id=N,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(W=>{const z=new y.StandardKeyboardEvent(W);switch(z.keyCode){case 10:this.toggleCheckbox();break;case 31:(s.isMacintosh?W.metaKey:W.ctrlKey)&&this.list.setFocus((0,f.range)(this.list.length));break;case 16:{const B=this.list.getFocus();B.length===1&&B[0]===0&&this._onLeave.fire();break}case 18:{const B=this.list.getFocus();B.length===1&&B[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(z)})),this.disposables.push(this.list.onMouseDown(W=>{W.browserEvent.button!==2&&W.browserEvent.preventDefault()})),this.disposables.push(t.addDisposableListener(this.container,t.EventType.CLICK,W=>{(W.x||W.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(W=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(W=>{typeof W.index=="number"&&(W.browserEvent.preventDefault(),this.list.setSelection([W.index]))})),P.hoverDelegate){const W=new v.ThrottledDelayer(P.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver(async z=>{if(z.browserEvent.target instanceof HTMLAnchorElement){W.cancel();return}if(!(!(z.browserEvent.relatedTarget instanceof HTMLAnchorElement)&&t.isAncestor(z.browserEvent.relatedTarget,z.element?.element)))try{await W.trigger(async()=>{z.element&&this.showHover(z.element)})}catch(B){if(!(0,h.isCancellationError)(B))throw B}})),this.disposables.push(this.list.onMouseOut(z=>{t.isAncestor(z.browserEvent.relatedTarget,z.element?.element)||W.cancel()})),this.disposables.push(W)}this.disposables.push(this._listElementChecked.event(W=>this.fireCheckedEvents())),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return a.Event.map(this.list.onDidChangeFocus,M=>M.elements.map(N=>N.item))}get onDidChangeSelection(){return a.Event.map(this.list.onDidChangeSelection,M=>({items:M.elements.map(N=>N.item),event:M.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(M){this.list.scrollTop=M}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(M){this.list.getHTMLElement().ariaLabel=M}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(M,N=!0){for(let P=0,x=M.length;P<x;P++){const F=M[P];if(!F.hidden)if(F.checked)N=!0;else return!1}return N}getCheckedCount(){let M=0;const N=this.elements;for(let P=0,x=N.length;P<x;P++)N[P].checked&&M++;return M}getVisibleCount(){let M=0;const N=this.elements;for(let P=0,x=N.length;P<x;P++)N[P].hidden||M++;return M}setAllVisibleChecked(M){try{this._fireCheckedEvents=!1,this.elements.forEach(N=>{N.hidden||(N.checked=M)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(M){this.elementDisposables=(0,i.dispose)(this.elementDisposables);const N=V=>this.fireButtonTriggered(V),P=V=>this.fireSeparatorButtonTriggered(V);this.inputElements=M;const x=new Map,F=this.parent.classList.contains("show-checkboxes");this.elements=M.reduce((V,W,z)=>{const B=z>0?M[z-1]:void 0;if(W.type==="separator"&&!W.buttons)return V;const K=new g(W,B,z,F,N,P,this._listElementChecked),H=V.length;return V.push(K),x.set(K.item??K.separator,H),V},[]),this.elementsToIndexes=x,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(M=>M.item)}setFocusedElements(M){if(this.list.setFocus(M.filter(N=>this.elementsToIndexes.has(N)).map(N=>this.elementsToIndexes.get(N))),M.length>0){const N=this.list.getFocus()[0];typeof N=="number"&&this.list.reveal(N)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}getSelectedElements(){return this.list.getSelectedElements().map(M=>M.item)}setSelectedElements(M){this.list.setSelection(M.filter(N=>this.elementsToIndexes.has(N)).map(N=>this.elementsToIndexes.get(N)))}getCheckedElements(){return this.elements.filter(M=>M.checked).map(M=>M.item).filter(M=>!!M)}setCheckedElements(M){try{this._fireCheckedEvents=!1;const N=new Set;for(const P of M)N.add(P);for(const P of this.elements)P.checked=N.has(P.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(M){this.list.getHTMLElement().style.pointerEvents=M?"":"none"}focus(M){if(!this.list.length)return;switch(M===C.Second&&this.list.length<2&&(M=C.First),M){case C.First:this.list.scrollTop=0,this.list.focusFirst(void 0,P=>!!P.item);break;case C.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,P=>!!P.item);break;case C.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,P=>!!P.item);break;case C.Next:{this.list.focusNext(void 0,!0,void 0,x=>!!x.item);const P=this.list.getFocus()[0];P!==0&&!this.elements[P-1].item&&this.list.firstVisibleIndex>P-1&&this.list.reveal(P-1);break}case C.Previous:{this.list.focusPrevious(void 0,!0,void 0,x=>!!x.item);const P=this.list.getFocus()[0];P!==0&&!this.elements[P-1].item&&this.list.firstVisibleIndex>P-1&&this.list.reveal(P-1);break}case C.NextPage:this.list.focusNextPage(void 0,P=>!!P.item);break;case C.PreviousPage:this.list.focusPreviousPage(void 0,P=>!!P.item);break}const N=this.list.getFocus()[0];typeof N=="number"&&this.list.reveal(N)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(M){this.options.hoverDelegate!==void 0&&(this._lastHover&&!this._lastHover.isDisposed&&(this.options.hoverDelegate.onDidHideHover?.(),this._lastHover?.dispose()),!(!M.element||!M.saneTooltip)&&(this._lastHover=this.options.hoverDelegate.showHover({content:M.saneTooltip,target:M.element,linkHandler:N=>{this.options.linkOpenerDelegate(N)},showPointer:!0,container:this.container,hoverPosition:1},!1)))}layout(M){this.list.getHTMLElement().style.maxHeight=M?`${Math.floor(M/44)*44+6}px`:"",this.list.layout()}filter(M){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const N=M;if(M=M.trim(),!M||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(x=>{x.labelHighlights=void 0,x.descriptionHighlights=void 0,x.detailHighlights=void 0,x.hidden=!1;const F=x.index&&this.inputElements[x.index-1];x.item&&(x.separator=F&&F.type==="separator"&&!F.buttons?F:void 0)});else{let x;this.elements.forEach(F=>{let V;this.matchOnLabelMode==="fuzzy"?V=this.matchOnLabel?(0,r.matchesFuzzyIconAware)(M,(0,r.parseLabelWithIcons)(F.saneLabel))??void 0:void 0:V=this.matchOnLabel?_(N,(0,r.parseLabelWithIcons)(F.saneLabel))??void 0:void 0;const W=this.matchOnDescription?(0,r.matchesFuzzyIconAware)(M,(0,r.parseLabelWithIcons)(F.saneDescription||""))??void 0:void 0,z=this.matchOnDetail?(0,r.matchesFuzzyIconAware)(M,(0,r.parseLabelWithIcons)(F.saneDetail||""))??void 0:void 0;if(V||W||z?(F.labelHighlights=V,F.descriptionHighlights=W,F.detailHighlights=z,F.hidden=!1):(F.labelHighlights=void 0,F.descriptionHighlights=void 0,F.detailHighlights=void 0,F.hidden=F.item?!F.item.alwaysShow:!0),F.item?F.separator=void 0:F.separator&&(F.hidden=!0),!this.sortByLabel){const B=F.index&&this.inputElements[F.index-1];x=B&&B.type==="separator"?B:x,x&&!F.hidden&&(F.separator=x,x=void 0)}})}const P=this.elements.filter(x=>!x.hidden);if(this.sortByLabel&&M){const x=M.toLowerCase();P.sort((F,V)=>k(F,V,x))}return this.elementsToIndexes=P.reduce((x,F,V)=>(x.set(F.item??F.separator,V),x),new Map),this.list.splice(0,this.list.length,P),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(P.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const M=this.list.getFocusedElements(),N=this.allVisibleChecked(M);for(const P of M)P.checked=!N}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(M){this.container.style.display=M?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=(0,i.dispose)(this.elementDisposables),this.disposables=(0,i.dispose)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(M){this._onButtonTriggered.fire(M)}fireSeparatorButtonTriggered(M){this._onSeparatorButtonTriggered.fire(M)}style(M){this.list.style(M)}toggleHover(){if(!this.list.getFocusedElements()[0]?.saneTooltip)return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}const N=this.list.getFocusedElements()[0];if(!N)return;this.showHover(N);const P=new i.DisposableStore;P.add(this.list.onDidChangeFocus(x=>{x.indexes.length&&this.showHover(x.elements[0])})),this._lastHover&&P.add(this._lastHover),this._toggleHover=P,this.elementDisposables.push(this._toggleHover)}}e.QuickInputList=I,fe([S.memoize],I.prototype,"onDidChangeFocus",null),fe([S.memoize],I.prototype,"onDidChangeSelection",null);function _(R,M){const{text:N,iconOffsets:P}=M;if(!P||P.length===0)return A(R,N);const x=(0,o.ltrim)(N," "),F=N.length-x.length,V=A(R,x);if(V)for(const W of V){const z=P[W.start+F]+F;W.start+=z,W.end+=z}return V}function A(R,M){const N=M.toLowerCase().indexOf(R.toLowerCase());return N!==-1?[{start:N,end:N+R.length}]:null}function k(R,M,N){const P=R.labelHighlights||[],x=M.labelHighlights||[];return P.length&&!x.length?-1:!P.length&&x.length?1:P.length===0&&x.length===0?0:(0,m.compareAnything)(R.saneSortLabel,M.saneSortLabel,N)}class L{getWidgetAriaLabel(){return(0,u.localize)(0,null)}getAriaLabel(M){return M.separator?.label?`${M.saneAriaLabel}, ${M.separator.label}`:M.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(M){return M.hasCheckbox?"checkbox":"option"}isChecked(M){if(M.hasCheckbox)return{value:M.checked,onDidChange:M.onChecked}}}}),define(Q[3344],Y([1,0,7,67,273,34,20,14,32,6,4,18,63,37,2476,43,1205,1165,656]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickWidget=e.InputBox=e.QuickPick=e.backButton=void 0,e.backButton={iconClass:r.ThemeIcon.asClassName(v.Codicon.quickInputBack),tooltip:(0,i.localize)(0,null),handle:-1};class d extends S.Disposable{static{this.noPromptMessage=(0,i.localize)(1,null)}constructor(g){super(),this.ui=g,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=d.noPromptMessage,this._severity=a.default.Ignore,this.onDidTriggerButtonEmitter=this._register(new m.Emitter),this.onDidHideEmitter=this._register(new m.Emitter),this.onDisposeEmitter=this._register(new m.Emitter),this.visibleDisposables=this._register(new S.DisposableStore),this.onDidTriggerButton=this.onDidTriggerButtonEmitter.event,this.onDidHide=this.onDidHideEmitter.event,this.onDispose=this.onDisposeEmitter.event}get title(){return this._title}set title(g){this._title=g,this.update()}get description(){return this._description}set description(g){this._description=g,this.update()}get widget(){return this._widget}set widget(g){g instanceof HTMLElement&&this._widget!==g&&(this._widget=g,this._widgetUpdated=!0,this.update())}get step(){return this._steps}set step(g){this._steps=g,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(g){this._totalSteps=g,this.update()}get enabled(){return this._enabled}set enabled(g){this._enabled=g,this.update()}get contextKey(){return this._contextKey}set contextKey(g){this._contextKey=g,this.update()}get busy(){return this._busy}set busy(g){this._busy=g,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(g){const w=this._ignoreFocusOut!==g&&!h.isIOS;this._ignoreFocusOut=g&&!h.isIOS,w&&this.update()}get buttons(){return this._buttons}set buttons(g){this._buttons=g,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(g){this._toggles=g??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(g){this._validationMessage=g,this.update()}get severity(){return this._severity}set severity(g){this._severity=g,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(g=>{this.buttons.indexOf(g)!==-1&&this.onDidTriggerButtonEmitter.fire(g)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(g=s.QuickInputHideReason.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:g})}update(){if(!this.visible)return;const g=this.getTitle();g&&this.ui.title.textContent!==g?this.ui.title.textContent=g:!g&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");const w=this.getDescription();if(this.ui.description1.textContent!==w&&(this.ui.description1.textContent=w),this.ui.description2.textContent!==w&&(this.ui.description2.textContent=w),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?t.reset(this.ui.widget,this._widget):t.reset(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new f.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 C=this.buttons.filter(_=>_===e.backButton);this.ui.leftActionBar.push(C.map((_,A)=>{const k=new D.Action(`id-${A}`,"",_.iconClass||(0,u.getIconClass)(_.iconPath),!0,async()=>{this.onDidTriggerButtonEmitter.fire(_)});return k.tooltip=_.tooltip||"",k}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const I=this.buttons.filter(_=>_!==e.backButton);this.ui.rightActionBar.push(I.map((_,A)=>{const k=new D.Action(`id-${A}`,"",_.iconClass||(0,u.getIconClass)(_.iconPath),!0,async()=>{this.onDidTriggerButtonEmitter.fire(_)});return k.tooltip=_.tooltip||"",k}),{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const C=this.toggles?.filter(I=>I instanceof b.Toggle)??[];this.ui.inputBox.toggles=C}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const E=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==E&&(this._lastValidationMessage=E,t.reset(this.ui.message),(0,u.renderQuickInputDescription)(E,this.ui.message,{callback:C=>{this.ui.linkOpenerDelegate(C)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,i.localize)(2,null,this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(g){if(this.ui.inputBox.showDecoration(g),g!==a.default.Ignore){const w=this.ui.inputBox.stylesForType(g);this.ui.message.style.color=w.foreground?`${w.foreground}`:"",this.ui.message.style.backgroundColor=w.background?`${w.background}`:"",this.ui.message.style.border=w.border?`1px solid ${w.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}class p extends d{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new m.Emitter),this.onWillAcceptEmitter=this._register(new m.Emitter),this.onDidAcceptEmitter=this._register(new m.Emitter),this.onDidCustomEmitter=this._register(new m.Emitter),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=s.ItemActivation.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new m.Emitter),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new m.Emitter),this.onDidTriggerItemButtonEmitter=this._register(new m.Emitter),this.onDidTriggerSeparatorButtonEmitter=this._register(new m.Emitter),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=g=>g,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.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,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}static{this.DEFAULT_ARIA_LABEL=(0,i.localize)(3,null)}get quickNavigate(){return this._quickNavigate}set quickNavigate(g){this._quickNavigate=g,this.update()}get value(){return this._value}set value(g){this.doSetValue(g)}doSetValue(g,w){this._value!==g&&(this._value=g,w||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(g){this._ariaLabel=g,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(g){this._placeholder=g,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(g){this.ui.list.scrollTop=g}set items(g){this._items=g,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(g){this._canSelectMany=g,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(g){this._canAcceptInBackground=g}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(g){this._matchOnDescription=g,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(g){this._matchOnDetail=g,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(g){this._matchOnLabel=g,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(g){this._matchOnLabelMode=g,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(g){this._sortByLabel=g,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(g){this._autoFocusOnList=g,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(g){this._keepScrollPosition=g}get itemActivation(){return this._itemActivation}set itemActivation(g){this._itemActivation=g}get activeItems(){return this._activeItems}set activeItems(g){this._activeItems=g,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(g){this._selectedItems=g,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?s.NO_KEY_MODS:this.ui.keyMods}set valueSelection(g){this._valueSelection=g,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(g){this._customButton=g,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(g){this._customButtonLabel=g,this.update()}get customHover(){return this._customButtonHover}set customHover(g){this._customButtonHover=g,this.update()}get ok(){return this._ok}set ok(g){this._ok=g,this.update()}inputHasFocus(){return this.visible?this.ui.inputBox.hasFocus():!1}focusOnInput(){this.ui.inputBox.setFocus()}get hideInput(){return!!this._hideInput}set hideInput(g){this._hideInput=g,this.update()}get hideCountBadge(){return!!this._hideCountBadge}set hideCountBadge(g){this._hideCountBadge=g,this.update()}get hideCheckAll(){return!!this._hideCheckAll}set hideCheckAll(g){this._hideCheckAll=g,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(o.QuickInputListFocus.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(g=>{this.doSetValue(g,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(g=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(g=>{switch(g.keyCode){case 18:this.ui.list.focus(o.QuickInputListFocus.Next),this.canSelectMany&&this.ui.list.domFocus(),t.EventHelper.stop(g,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(o.QuickInputListFocus.Previous):this.ui.list.focus(o.QuickInputListFocus.Last),this.canSelectMany&&this.ui.list.domFocus(),t.EventHelper.stop(g,!0);break;case 12:this.ui.list.focus(o.QuickInputListFocus.NextPage),this.canSelectMany&&this.ui.list.domFocus(),t.EventHelper.stop(g,!0);break;case 11:this.ui.list.focus(o.QuickInputListFocus.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),t.EventHelper.stop(g,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(g.ctrlKey||g.metaKey)&&!g.shiftKey&&!g.altKey&&(this.ui.list.focus(o.QuickInputListFocus.First),t.EventHelper.stop(g,!0));break;case 13:(g.ctrlKey||g.metaKey)&&!g.shiftKey&&!g.altKey&&(this.ui.list.focus(o.QuickInputListFocus.Last),t.EventHelper.stop(g,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(g=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,T.equals)(g,this._activeItems,(w,E)=>w===E)||(this._activeItems=g,this.onDidChangeActiveEmitter.fire(g))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:g,event:w})=>{if(this.canSelectMany){g.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&(0,T.equals)(g,this._selectedItems,(E,C)=>E===C)||(this._selectedItems=g,this.onDidChangeSelectionEmitter.fire(g),g.length&&this.handleAccept(w instanceof MouseEvent&&w.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(g=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,T.equals)(g,this._selectedItems,(w,E)=>w===E)||(this._selectedItems=g,this.onDidChangeSelectionEmitter.fire(g)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(g=>this.onDidTriggerItemButtonEmitter.fire(g))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(g=>this.onDidTriggerSeparatorButtonEmitter.fire(g))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(g){let w=!1;this.onWillAcceptEmitter.fire({veto:()=>w=!0}),w||this.onDidAcceptEmitter.fire({inBackground:g})}registerQuickNavigation(){return t.addDisposableListener(this.ui.container,t.EventType.KEY_UP,g=>{if(this.canSelectMany||!this._quickNavigate)return;const w=new y.StandardKeyboardEvent(g),E=w.keyCode;this._quickNavigate.keybindings.some(_=>{const A=_.getChords();return A.length>1?!1:A[0].shiftKey&&E===4?!(w.ctrlKey||w.altKey||w.metaKey):!!(A[0].altKey&&E===6||A[0].ctrlKey&&E===5||A[0].metaKey&&E===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const g=this.keepScrollPosition?this.scrollTop:0,w=!!this.description,E={title:!!this.title||!!this.step||!!this.buttons.length,description:w,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||w,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};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||"");let C=this.ariaLabel;if(!C&&E.inputBox&&(C=this.placeholder||p.DEFAULT_ARIA_LABEL,this.title&&(C+=` - ${this.title}`)),this.ui.list.ariaLabel!==C&&(this.ui.list.ariaLabel=C??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case s.ItemActivation.NONE:this._itemActivation=s.ItemActivation.FIRST;break;case s.ItemActivation.SECOND:this.ui.list.focus(o.QuickInputListFocus.Second),this._itemActivation=s.ItemActivation.FIRST;break;case s.ItemActivation.LAST:this.ui.list.focus(o.QuickInputListFocus.Last),this._itemActivation=s.ItemActivation.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",E.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(o.QuickInputListFocus.First)),this.keepScrollPosition&&(this.scrollTop=g)}}e.QuickPick=p;class c extends d{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new m.Emitter),this.onDidAcceptEmitter=this._register(new m.Emitter),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(g){this._value=g||"",this.update()}set valueSelection(g){this._valueSelection=g,this.valueSelectionUpdated=!0,this.update()}get placeholder(){return this._placeholder}set placeholder(g){this._placeholder=g,this.update()}get password(){return this._password}set password(g){this._password=g,this.update()}get prompt(){return this._prompt}set prompt(g){this._prompt=g,this.noValidationMessage=g?(0,i.localize)(4,null,g):d.noPromptMessage,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(g=>{g!==this.value&&(this._value=g,this.onDidValueChangeEmitter.fire(g))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const g={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(g),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)}}e.InputBox=c;class l extends d{update(){if(!this.visible)return;const g={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step};this.ui.setVisibilities(g),super.update()}}e.QuickWidget=l}),define(Q[3345],Y([1,0,7,85,207,369,342,31,6,4,63,17,2477,43,3223,1205,3344]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputController=void 0;const u=t.$;class d extends m.Disposable{static{this.MAX_WIDTH=600}constructor(c,l){super(),this.options=c,this.themeService=l,this.enabled=!0,this.onDidAcceptEmitter=this._register(new v.Emitter),this.onDidCustomEmitter=this._register(new v.Emitter),this.onDidTriggerButtonEmitter=this._register(new v.Emitter),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new v.Emitter),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new v.Emitter),this.onHide=this.onHideEmitter.event,this.backButton=o.backButton,this.idPrefix=c.idPrefix,this.parentElement=c.container,this.styles=c.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const c=l=>{this.keyMods.ctrlCmd=l.ctrlKey||l.metaKey,this.keyMods.alt=l.altKey};this._register(t.addDisposableListener(window,t.EventType.KEY_DOWN,c,!0)),this._register(t.addDisposableListener(window,t.EventType.KEY_UP,c,!0)),this._register(t.addDisposableListener(window,t.EventType.MOUSE_DOWN,c,!0))}getUI(){if(this.ui)return this.ui;const c=t.append(this.parentElement,u(".quick-input-widget.show-file-icons"));c.tabIndex=-1,c.style.display="none";const l=t.createStyleSheet(c),n=t.append(c,u(".quick-input-titlebar")),g=this.options.hoverDelegate?{hoverDelegate:this.options.hoverDelegate}:void 0,w=this._register(new y.ActionBar(n,g));w.domNode.classList.add("quick-input-left-action-bar");const E=t.append(n,u(".quick-input-title")),C=this._register(new y.ActionBar(n,g));C.domNode.classList.add("quick-input-right-action-bar");const I=t.append(c,u(".quick-input-header")),_=t.append(I,u("input.quick-input-check-all"));_.type="checkbox",_.setAttribute("aria-label",(0,a.localize)(0,null)),this._register(t.addStandardDisposableListener(_,t.EventType.CHANGE,J=>{const j=_.checked;$.setAllVisibleChecked(j)})),this._register(t.addDisposableListener(_,t.EventType.CLICK,J=>{(J.x||J.y)&&R.setFocus()}));const A=t.append(I,u(".quick-input-description")),k=t.append(I,u(".quick-input-and-message")),L=t.append(k,u(".quick-input-filter")),R=this._register(new i.QuickInputBox(L,this.styles.inputBox,this.styles.toggle));R.setAttribute("aria-describedby",`${this.idPrefix}message`);const M=t.append(L,u(".quick-input-visible-count"));M.setAttribute("aria-live","polite"),M.setAttribute("aria-atomic","true");const N=new D.CountBadge(M,{countFormat:(0,a.localize)(1,null)},this.styles.countBadge),P=t.append(L,u(".quick-input-count"));P.setAttribute("aria-live","polite");const x=new D.CountBadge(P,{countFormat:(0,a.localize)(2,null)},this.styles.countBadge),F=t.append(I,u(".quick-input-action")),V=new b.Button(F,this.styles.button);V.label=(0,a.localize)(3,null),this._register(V.onDidClick(J=>{this.onDidAcceptEmitter.fire()}));const W=t.append(I,u(".quick-input-action")),z=new b.Button(W,this.styles.button);z.label=(0,a.localize)(4,null),this._register(z.onDidClick(J=>{this.onDidCustomEmitter.fire()}));const B=t.append(k,u(`#${this.idPrefix}message.quick-input-message`)),K=new T.ProgressBar(c,this.styles.progressBar);K.getContainer().classList.add("quick-input-progress");const H=t.append(c,u(".quick-input-html-widget"));H.tabIndex=-1;const U=t.append(c,u(".quick-input-description")),G=this.idPrefix+"list",$=this._register(new s.QuickInputList(c,G,this.options,this.themeService));R.setAttribute("aria-controls",G),this._register($.onDidChangeFocus(()=>{R.setAttribute("aria-activedescendant",$.getActiveDescendant()??"")})),this._register($.onChangedAllVisibleChecked(J=>{_.checked=J})),this._register($.onChangedVisibleCount(J=>{N.setCount(J)})),this._register($.onChangedCheckedCount(J=>{x.setCount(J)})),this._register($.onLeave(()=>{setTimeout(()=>{R.setFocus(),this.controller instanceof o.QuickPick&&this.controller.canSelectMany&&$.clearFocus()},0)}));const ie=t.trackFocus(c);return this._register(ie),this._register(t.addDisposableListener(c,t.EventType.FOCUS,J=>{t.isAncestor(J.relatedTarget,c)||(this.previousFocusElement=J.relatedTarget instanceof HTMLElement?J.relatedTarget:void 0)},!0)),this._register(ie.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(r.QuickInputHideReason.Blur),this.previousFocusElement=void 0})),this._register(t.addDisposableListener(c,t.EventType.FOCUS,J=>{R.setFocus()})),this._register(t.addStandardDisposableListener(c,t.EventType.KEY_DOWN,J=>{if(!t.isAncestor(J.target,H))switch(J.keyCode){case 3:t.EventHelper.stop(J,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:t.EventHelper.stop(J,!0),this.hide(r.QuickInputHideReason.Gesture);break;case 2:if(!J.altKey&&!J.ctrlKey&&!J.metaKey){const j=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(c.classList.contains("show-checkboxes")?j.push("input"):j.push("input[type=text]"),this.getUI().list.isDisplayed()&&j.push(".monaco-list"),this.getUI().message&&j.push(".quick-input-message a"),this.getUI().widget){if(t.isAncestor(J.target,this.getUI().widget))break;j.push(".quick-input-html-widget")}const ee=c.querySelectorAll(j.join(", "));J.shiftKey&&J.target===ee[0]?(t.EventHelper.stop(J,!0),$.clearFocus()):!J.shiftKey&&t.isAncestor(J.target,ee[ee.length-1])&&(t.EventHelper.stop(J,!0),ee[0].focus())}break;case 10:J.ctrlKey&&(t.EventHelper.stop(J,!0),this.getUI().list.toggleHover());break}})),this.ui={container:c,styleSheet:l,leftActionBar:w,titleBar:n,title:E,description1:U,description2:A,widget:H,rightActionBar:C,checkAll:_,inputContainer:k,filterContainer:L,inputBox:R,visibleCountContainer:M,visibleCount:N,countContainer:P,count:x,okContainer:F,ok:V,message:B,customButtonContainer:W,customButton:z,list:$,progressBar:K,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:J=>this.show(J),hide:()=>this.hide(),setVisibilities:J=>this.setVisibilities(J),setEnabled:J=>this.setEnabled(J),setContextKey:J=>this.options.setContextKey(J),linkOpenerDelegate:J=>this.options.linkOpenerDelegate(J)},this.updateStyles(),this.ui}pick(c,l={},n=f.CancellationToken.None){return new Promise((g,w)=>{let E=A=>{E=g,l.onKeyMods?.(C.keyMods),g(A)};if(n.isCancellationRequested){E(void 0);return}const C=this.createQuickPick();let I;const _=[C,C.onDidAccept(()=>{if(C.canSelectMany)E(C.selectedItems.slice()),C.hide();else{const A=C.activeItems[0];A&&(E(A),C.hide())}}),C.onDidChangeActive(A=>{const k=A[0];k&&l.onDidFocus&&l.onDidFocus(k)}),C.onDidChangeSelection(A=>{if(!C.canSelectMany){const k=A[0];k&&(E(k),C.hide())}}),C.onDidTriggerItemButton(A=>l.onDidTriggerItemButton&&l.onDidTriggerItemButton({...A,removeItem:()=>{const k=C.items.indexOf(A.item);if(k!==-1){const L=C.items.slice(),R=L.splice(k,1),M=C.activeItems.filter(P=>P!==R[0]),N=C.keepScrollPosition;C.keepScrollPosition=!0,C.items=L,M&&(C.activeItems=M),C.keepScrollPosition=N}}})),C.onDidTriggerSeparatorButton(A=>l.onDidTriggerSeparatorButton?.(A)),C.onDidChangeValue(A=>{I&&!A&&(C.activeItems.length!==1||C.activeItems[0]!==I)&&(C.activeItems=[I])}),n.onCancellationRequested(()=>{C.hide()}),C.onDidHide(()=>{(0,m.dispose)(_),E(void 0)})];C.title=l.title,C.canSelectMany=!!l.canPickMany,C.placeholder=l.placeHolder,C.ignoreFocusOut=!!l.ignoreFocusLost,C.matchOnDescription=!!l.matchOnDescription,C.matchOnDetail=!!l.matchOnDetail,C.matchOnLabel=l.matchOnLabel===void 0||l.matchOnLabel,C.autoFocusOnList=l.autoFocusOnList===void 0||l.autoFocusOnList,C.quickNavigate=l.quickNavigate,C.hideInput=!!l.hideInput,C.contextKey=l.contextKey,C.busy=!0,Promise.all([c,l.activeItem]).then(([A,k])=>{I=k,C.busy=!1,C.items=A,C.canSelectMany&&(C.selectedItems=A.filter(L=>L.type!=="separator"&&L.picked)),I&&(C.activeItems=[I])}),C.show(),Promise.resolve(c).then(void 0,A=>{w(A),C.hide()})})}setValidationOnInput(c,l){l&&(0,h.isString)(l)?(c.severity=S.default.Error,c.validationMessage=l):l&&!(0,h.isString)(l)?(c.severity=l.severity,c.validationMessage=l.content):(c.severity=S.default.Ignore,c.validationMessage=void 0)}input(c={},l=f.CancellationToken.None){return new Promise(n=>{if(l.isCancellationRequested){n(void 0);return}const g=this.createInputBox(),w=c.validateInput||(()=>Promise.resolve(void 0)),E=v.Event.debounce(g.onDidChangeValue,(A,k)=>k,100);let C=c.value||"",I=Promise.resolve(w(C));const _=[g,E(A=>{A!==C&&(I=Promise.resolve(w(A)),C=A),I.then(k=>{A===C&&this.setValidationOnInput(g,k)})}),g.onDidAccept(()=>{const A=g.value;A!==C&&(I=Promise.resolve(w(A)),C=A),I.then(k=>{!k||!(0,h.isString)(k)&&k.severity!==S.default.Error?(n(A),g.hide()):A===C&&this.setValidationOnInput(g,k)})}),l.onCancellationRequested(()=>{g.hide()}),g.onDidHide(()=>{(0,m.dispose)(_),n(void 0)})];g.title=c.title,g.value=c.value||"",g.valueSelection=c.valueSelection,g.prompt=c.prompt,g.placeholder=c.placeHolder,g.password=!!c.password,g.ignoreFocusOut=!!c.ignoreFocusLost,g.show()})}createQuickPick(){const c=this.getUI();return new o.QuickPick(c)}createInputBox(){const c=this.getUI();return new o.InputBox(c)}createQuickWidget(){const c=this.getUI();return new o.QuickWidget(c)}show(c){const l=this.getUI();this.onShowEmitter.fire();const n=this.controller;this.controller=c,n?.didHide(),this.setEnabled(!0),l.leftActionBar.clear(),l.title.textContent="",l.description1.textContent="",l.description2.textContent="",t.reset(l.widget),l.rightActionBar.clear(),l.checkAll.checked=!1,l.inputBox.placeholder="",l.inputBox.password=!1,l.inputBox.showDecoration(S.default.Ignore),l.visibleCount.setCount(0),l.count.setCount(0),t.reset(l.message),l.progressBar.stop(),l.list.setElements([]),l.list.matchOnDescription=!1,l.list.matchOnDetail=!1,l.list.matchOnLabel=!0,l.list.sortByLabel=!0,l.ignoreFocusOut=!1,l.inputBox.toggles=void 0;const g=this.options.backKeybindingLabel();o.backButton.tooltip=g?(0,a.localize)(5,null,g):(0,a.localize)(6,null),l.container.style.display="",this.updateLayout(),l.inputBox.setFocus()}setVisibilities(c){const l=this.getUI();l.title.style.display=c.title?"":"none",l.description1.style.display=c.description&&(c.inputBox||c.checkAll)?"":"none",l.description2.style.display=c.description&&!(c.inputBox||c.checkAll)?"":"none",l.checkAll.style.display=c.checkAll?"":"none",l.inputContainer.style.display=c.inputBox?"":"none",l.filterContainer.style.display=c.inputBox?"":"none",l.visibleCountContainer.style.display=c.visibleCount?"":"none",l.countContainer.style.display=c.count?"":"none",l.okContainer.style.display=c.ok?"":"none",l.customButtonContainer.style.display=c.customButton?"":"none",l.message.style.display=c.message?"":"none",l.progressBar.getContainer().style.display=c.progressBar?"":"none",l.list.display(!!c.list),l.container.classList.toggle("show-checkboxes",!!c.checkBox),l.container.classList.toggle("hidden-input",!c.inputBox&&!c.description),this.updateLayout()}setEnabled(c){if(c!==this.enabled){this.enabled=c;for(const l of this.getUI().leftActionBar.viewItems)l.action.enabled=c;for(const l of this.getUI().rightActionBar.viewItems)l.action.enabled=c;this.getUI().checkAll.disabled=!c,this.getUI().inputBox.enabled=c,this.getUI().ok.enabled=c,this.getUI().list.enabled=c}}hide(c){const l=this.controller;if(!l)return;const n=!t.isAncestor(document.activeElement,this.ui?.container??null);if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!n){let g=this.previousFocusElement;for(;g&&!g.offsetParent;)g=g.parentElement??void 0;g?.offsetParent?(g.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}l.didHide(c)}focus(){if(this.isDisplayed()){const c=this.getUI();c.inputBox.enabled?c.inputBox.setFocus():c.list.domFocus()}}toggle(){this.isDisplayed()&&this.controller instanceof o.QuickPick&&this.controller.canSelectMany&&this.getUI().list.toggleCheckbox()}navigate(c,l){this.isDisplayed()&&this.getUI().list.isDisplayed()&&(this.getUI().list.focus(c?s.QuickInputListFocus.Next:s.QuickInputListFocus.Previous),l&&this.controller instanceof o.QuickPick&&(this.controller.quickNavigate=l))}async accept(c={alt:!1,ctrlCmd:!1}){this.keyMods.alt=c.alt,this.keyMods.ctrlCmd=c.ctrlCmd,this.onDidAcceptEmitter.fire()}async back(){this.onDidTriggerButtonEmitter.fire(this.backButton)}async cancel(){this.hide()}layout(c,l){this.dimension=c,this.titleBarOffset=l,this.updateLayout()}updateLayout(){if(this.ui&&this.isDisplayed()){this.ui.container.style.top=`${this.titleBarOffset}px`;const c=this.ui.container.style,l=Math.min(this.dimension.width*.62,d.MAX_WIDTH);c.width=l+"px",c.marginLeft="-"+l/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(c){this.styles=c,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:c,quickInputBackground:l,quickInputForeground:n,widgetBorder:g,widgetShadow:w}=this.styles.widget;this.ui.titleBar.style.backgroundColor=c??"",this.ui.container.style.backgroundColor=l??"",this.ui.container.style.color=n??"",this.ui.container.style.border=g?`1px solid ${g}`:"",this.ui.container.style.boxShadow=w?`0 0 8px 2px ${w}`:"",this.ui.list.style(this.styles.list);const E=[];this.styles.pickerGroup.pickerGroupBorder&&E.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&E.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&E.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(E.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&E.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&E.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&E.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&E.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&E.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),E.push("}"));const C=E.join(` `);C!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=C)}}isDisplayed(){return this.ui&&this.ui.container.style.display!=="none"}}e.QuickInputController=d}),define(Q[19],Y([1,0,32,6,4,5,16,167]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Themable=e.registerThemingParticipant=e.Extensions=e.getThemeTypeSelector=e.FolderThemeIcon=e.FileThemeIcon=e.themeColorFromId=e.IThemeService=void 0,e.IThemeService=(0,D.createDecorator)("themeService");function v(i){return{id:i}}e.themeColorFromId=v,e.FileThemeIcon=t.Codicon.file,e.FolderThemeIcon=t.Codicon.folder;function m(i){switch(i){case f.ColorScheme.DARK:return"vs-dark";case f.ColorScheme.HIGH_CONTRAST_DARK:return"hc-black";case f.ColorScheme.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}e.getThemeTypeSelector=m,e.Extensions={ThemingContribution:"base.contributions.theming"};class S{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new y.Emitter}onColorThemeChange(s){return this.themingParticipants.push(s),this.onThemingParticipantAddedEmitter.fire(s),(0,b.toDisposable)(()=>{const o=this.themingParticipants.indexOf(s);this.themingParticipants.splice(o,1)})}get onThemingParticipantAdded(){return this.onThemingParticipantAddedEmitter.event}getThemingParticipants(){return this.themingParticipants}}const h=new S;T.Registry.add(e.Extensions.ThemingContribution,h);function a(i){return h.onColorThemeChange(i)}e.registerThemingParticipant=a;class r extends b.Disposable{constructor(s){super(),this.themeService=s,this.theme=s.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(o=>this.onThemeChange(o)))}onThemeChange(s){this.theme=s,this.updateStyles()}updateStyles(){}getColor(s,o){let u=this.theme.getColor(s);return u&&o&&(u=o(u,this.theme)),u?u.toString():null}}e.Themable=r}),define(Q[3346],Y([1,0,4,7,6,179,1954,19,36,32,5,276,37,54]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignerIssuesTabPanelView=void 0;let i=class extends t.Disposable{constructor(c){super(),this._instantiationService=c,this._onIssueSelected=new b.Emitter,this.onIssueSelected=this._onIssueSelected.event}render(c){this._container=c.appendChild(y.$(".issues-container")),this._issueList=new D.List("designerIssueList",this._container,new o,[this._instantiationService.createInstance(u)],{multipleSelectionSupport:!1,keyboardSupport:!0,mouseSupport:!0,accessibilityProvider:new d}),this._issueList.style((0,r.getListStyles)({listInactiveSelectionIconForeground:void 0,listActiveSelectionIconForeground:void 0})),this._register(this._issueList.onDidChangeSelection(l=>{l.elements&&l.elements.length===1&&this._onIssueSelected.fire(l.elements[0].propertyPath)}))}layout(c){this._issueList.layout(c.height,c.width)}updateIssues(c){this._issueList&&this._issueList.splice(0,this._issueList.length,c)}};e.DesignerIssuesTabPanelView=i,e.DesignerIssuesTabPanelView=i=fe([O(0,S.IInstantiationService)],i),(0,f.registerThemingParticipant)((p,c)=>{const l=p.getColor(v.problemsErrorIconForeground),n=p.getColor(v.problemsWarningIconForeground),g=p.getColor(v.problemsInfoIconForeground);l&&c.addRule(` .designer-component .issues-container .issue-item .issue-icon.codicon-error { color: ${l}; } .designer-component .issues-container .issue-item .issue-icon.codicon-warning { color: ${n}; } .designer-component .issues-container .issue-item .issue-icon.codicon-info { color: ${g}; } `)});const s="DesignerIssueListTemplate";class o{getHeight(c){return 25}getTemplateId(c){return s}}let u=class{constructor(c){this._instantiationService=c}renderTemplate(c){const l=Object.create(null),n=c.appendChild(y.$(".issue-item"));return l.issueIcon=n.appendChild(y.$("")),l.issueText=n.appendChild(y.$(".issue-text")),l.issueMoreInfoLink=n.appendChild(y.$(".issue-more-info")),l}renderElement(c,l,n,g){n.issueText.innerText=c.description,n.issueText.title=c.description;let w;switch(c.severity){case"warning":w=a.ThemeIcon.asClassName(m.Codicon.warning);break;case"information":w=a.ThemeIcon.asClassName(m.Codicon.info);break;default:w=a.ThemeIcon.asClassName(m.Codicon.error);break}n.issueIcon.className=`issue-icon ${w}`,c.moreInfoLink?this._instantiationService.createInstance(h.Link,n.issueMoreInfoLink,{label:(0,T.localize)(0,null),href:c.moreInfoLink},void 0):y.clearNode(n.issueMoreInfoLink)}disposeTemplate(c){}get templateId(){return s}};u=fe([O(0,S.IInstantiationService)],u);class d{getAriaLabel(c){return c.description}getWidgetAriaLabel(){return(0,T.localize)(1,null)}getWidgetRole(){return"listbox"}getRole(c){return"option"}}}),define(Q[3347],Y([1,0,40,156,168,155,7,67,20,1966,11,36,19,42,29,5,13,34,1580]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarativeDataType=void 0;var p;(function(l){l.string="string",l.category="category",l.boolean="boolean",l.editableCategory="editableCategory",l.component="component",l.menu="menu"})(p||(e.DeclarativeDataType=p={}));let c=class extends D.ContainerBase{static{d=this}constructor(n,g,w,E,C,I){super(n,g,w),this.contextMenuService=C,this.instantiationService=I,this._data=[],this._filteredRowIndexes=void 0,this.columns=[],this._rowSelectionFocusFlag=!1,this._colorTheme=E.getColorTheme(),this._register(E.onDidColorThemeChange(_=>{this._colorTheme=_}))}ngAfterViewInit(){this.baseInit()}ngOnDestroy(){this.baseDestroy()}headerCheckboxVisible(n){return this.columns[n].showCheckAll&&this.isCheckBox(n)}isHeaderChecked(n){for(const g of this.data){const w=g[n];if(w.value===!1&&w.enabled!==!1)return!1}return!0}isCheckBox(n){return this.columns[n].valueType===p.boolean}isContextMenuColumn(n){return this.columns[n].valueType===p.menu}isControlEnabled(n,g){const w=this.data[n][g];return!this.columns[g].isReadOnly&&w.enabled!==!1}isLabel(n){let g=this.columns[n];return g.isReadOnly&&g.valueType===p.string}isChecked(n,g){let w=this.data[n][g];return w?.value===!1?!1:w!=null}onInputBoxChanged(n,g,w){this.onCellDataChanged(n,g,w)}onCheckBoxChanged(n,g,w){this.onCellDataChanged(n,g,w),this.columns[w].showCheckAll&&this._changeRef.detectChanges()}onHeaderCheckBoxChanged(n,g){this.data.forEach((w,E)=>{const C=w[g];C.value!==n&&C.enabled!==!1&&this.onCellDataChanged(n,E,g)}),this._changeRef.detectChanges()}trackByFnCols(n,g){return n}onSelectBoxChanged(n,g,w){let E=this.columns[w];if(E.categoryValues)if(typeof n=="string"){let C=E.categoryValues.find(I=>I.displayName===n);C?this.onCellDataChanged(C.name,g,w):this.onCellDataChanged(n,g,w)}else this.onCellDataChanged(E.categoryValues[n.index].name,g,w)}onCellDataChanged(n,g,w){this.data[g][w].value=n,this.properties.data?this.setPropertyFromUI((C,I)=>C.data=I,this.data):this.setPropertyFromUI((C,I)=>C.dataValues=I,this.data);let E={row:g,column:w,value:n};this.fireEvent({eventType:b.ComponentEventType.onDidChange,args:E})}isSelectBox(n){return this.columns[n].valueType===p.category}isEditableSelectBox(n){return this.columns[n].valueType===p.editableCategory}isInputBox(n){let g=this.columns[n];return g.valueType===p.string&&!g.isReadOnly}isComponent(n){return this.columns[n].valueType===p.component}getColumnWidth(n){let g=typeof n=="number"?this.columns[n]:n;return(0,y.convertSize)(g.width,"30px")}getOptions(n){let g=this.columns[n];return g.categoryValues?g.categoryValues.map(w=>w.displayName):[]}getSelectedOptionDisplayName(n,g){let w=this.columns[g],E=this.data[n][g];if(E&&w.categoryValues){let C=w.categoryValues.find(I=>I.name===E.value);return C?C.displayName:this.isEditableSelectBox(g)?String(E.value):void 0}else return""}getAriaLabel(n,g){const w=this.data[n][g];if(this.isLabel(g))if(w){if(w.ariaLabel)return w.ariaLabel;if(w.value)return String(w.value)}else return(0,m.localize)(0,null);else if(w?.ariaLabel)return w.ariaLabel;return""}getCheckAllColumnAriaLabel(n){return(0,m.localize)(1,null,this.columns[n].displayName)}getHeaderAriaLabel(n){const g=this.columns[n];return g.ariaLabel?g.ariaLabel:g.displayName}getItemDescriptor(n){return this.modelStore.getComponentDescriptor(n)}setLayout(n){this.layout()}static{this.ACCEPTABLE_VALUES=new Set(["number","string","boolean"])}setProperties(n){let g=n;const w=g.data??[],E=g.dataValues??[];let C;C=w.map(A=>A.map(k=>d.ACCEPTABLE_VALUES.has(typeof k)?{value:k}:{value:JSON.stringify(k)})),C.length<=0&&(C=E),this.columns=g.columns??[],!(0,v.equals)(this.data,C??[],(A,k)=>(0,v.equals)(A,k,(L,R)=>(0,r.equals)(L,R)))&&(this.clearContainer(),this._data=C);const _=this.selectedRow;super.setProperties(n),this.selectedRow!==_&&this.enableRowSelection&&this.fireEvent({eventType:b.ComponentEventType.onSelectedRowChanged,args:{row:this.selectedRow}})}clearContainer(){super.clearContainer(),this.selectedRow=-1}get data(){return this._data}isRowSelected(n){return this.enableRowSelection?this.selectedRow===n:!1}onRowSelected(n){this.enableRowSelection&&(this._rowSelectionFocusFlag||!this.isRowSelected(n))&&(this.selectedRow=n,this._rowSelectionFocusFlag=!1,this._changeRef.detectChanges(),this.fireEvent({eventType:b.ComponentEventType.onSelectedRowChanged,args:{row:n}}))}get contextMenuButtonTitle(){return(0,m.localize)(2,null)}onContextMenuButtonKeyDown(n,g,w){const E=new f.StandardKeyboardEvent(n);(E.keyCode===10||E.keyCode===3)&&this.showContextMenu(n,g,w)}onContextMenuButtonClick(n,g,w){this.showContextMenu(n,g,w)}showContextMenu(n,g,w){T.EventHelper.stop(n,!0);const E=this.data[g][w].value,C=[];let I=!1;for(const[_,A]of E.commands.entries())(I||!(typeof A=="string")&&_!==0)&&C.push(new u.Separator),typeof A=="string"?(I=!1,C.push(this.createMenuItem(A))):(I=!0,C.push(...A.map(L=>this.createMenuItem(L))));this.contextMenuService.showContextMenu({getAnchor:()=>n.currentTarget,getActions:()=>C,getActionsContext:()=>E.context})}createMenuItem(n){const g=o.MenuRegistry.getCommand(n);return this.instantiationService.createInstance(o.MenuItemAction,g,void 0,{shouldForwardArgs:!0},void 0)}onKey(n,g){if(n.target!==n.currentTarget)return;const w=new f.StandardKeyboardEvent(n);(w.equals(3)||w.equals(10))&&(this.onRowSelected(g),T.EventHelper.stop(n,!0))}doAction(n,...g){n===b.ModelViewAction.Filter&&(this._filteredRowIndexes=g[0]),this._changeRef.detectChanges()}isFiltered(n){return this._filteredRowIndexes===void 0?!1:!this._filteredRowIndexes.includes(n)}get CSSStyles(){return this.mergeCss(super.CSSStyles,{width:this.getWidth(),height:this.getHeight()})}getRowStyle(n){if(this.isRowSelected(n)){const g=this._hasFocus?h.listActiveSelectionBackground:h.listInactiveSelectionBackground,w=this._hasFocus?h.listActiveSelectionForeground:h.listInactiveSelectionForeground;return{"background-color":this._colorTheme.getColor(g)?.toString(),color:this._colorTheme.getColor(w)?.toString()}}else return{}}onFocusIn(){this._hasFocus=!0,this._rowSelectionFocusFlag=!0,this._changeRef.detectChanges()}onFocusOut(){this._hasFocus=!1,this._changeRef.detectChanges()}get enableRowSelection(){return this.getPropertyOrDefault(n=>n.enableRowSelection,!1)}get selectedRow(){return this.getPropertyOrDefault(n=>n.selectedRow,-1)}set selectedRow(n){n!==this.selectedRow&&this.setPropertyFromUI((g,w)=>{g.selectedRow=w},n)}showColumn(n){return n.hidden===void 0||!n.hidden}};fe([(0,t.Input)()],c.prototype,"descriptor",void 0),fe([(0,t.Input)()],c.prototype,"modelStore",void 0),c=d=fe([(0,t.Component)({selector:"modelview-declarativeTable",templateUrl:decodeURI(q.toUrl("./declarativeTable.component.html"))}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(S.ILogService)),O(3,(0,t.Inject)(a.IThemeService)),O(4,(0,t.Inject)(i.IContextMenuService)),O(5,(0,t.Inject)(s.IInstantiationService))],c),e.default=c}),define(Q[1206],Y([1,0,40,155,67,168,156,11,19,36,1581]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class S{constructor(r,i){this.descriptor=r,this.config=i}}let h=class extends y.ContainerBase{constructor(r,i,s,o,u){super(r,i,o),this.renderer=s,this._overflowY="",(0,v.registerThemingParticipant)((d,p)=>{const c=d.getColor(m.editorHoverBackground).toString();c&&p.addRule(` .clickable-divContainer:hover { background-color: ${c}; } `)})}ngAfterViewInit(){this.viewInitialized=!0,this.updateClickListener(),this.baseInit()}ngOnDestroy(){this.baseDestroy()}setLayout(r){this._height=(0,T.convertSize)(r.height),this._width=(0,T.convertSize)(r.width),this.layout()}setProperties(r){super.setProperties(r),this.overflowY!==this._overflowY&&this.updateOverflowY(),this.updateScroll(),this.updateClickable()}updateOverflowY(){if(this._overflowY=this.overflowY,this._overflowY){let r=this.divContainer.nativeElement;r.style.overflowY=this._overflowY}}updateScroll(){let r=this.divContainer.nativeElement;r.scrollTop=r.scrollTop-this.yOffsetChange,r.dispatchEvent(new Event("scroll"))}updateClickable(){const r=this.divContainer.nativeElement;this.clickable?(r.tabIndex=0,r.style.cursor="pointer"):(r.removeAttribute("tabIndex"),r.style.cursor="default"),this.updateClickListener()}onClick(){this.fireEvent({eventType:D.ComponentEventType.onDidClick,args:void 0})}get height(){return this._height}get width(){return this._width}get overflowY(){return this.getPropertyOrDefault(r=>r.overflowY,"")}set overflowY(r){this.setPropertyFromUI((i,s)=>{i.overflowY=s},r)}get yOffsetChange(){return this.getPropertyOrDefault(r=>r.yOffsetChange,0)}set yOffsetChange(r){this.setPropertyFromUI((i,s)=>{i.yOffsetChange=s},r)}get clickable(){return this.getPropertyOrDefault(r=>r.clickable,!1)}onKey(r){let i=new b.StandardKeyboardEvent(r);(i.equals(3)||i.equals(10))&&(this.onClick(),r.stopPropagation())}getItemOrder(r){return r.config?r.config.order:0}getItemStyles(r){return r.config&&r.config.CSSStyles?r.config.CSSStyles:{}}updateClickListener(){this.viewInitialized&&(this.clickable&&!this.cancelClick?this.cancelClick=this.renderer.listen(this.divContainer.nativeElement,"click",()=>this.onClick()):!this.clickable&&this.cancelClick&&(this.cancelClick(),this.cancelClick=void 0))}};fe([(0,t.Input)()],h.prototype,"descriptor",void 0),fe([(0,t.Input)()],h.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("divContainer",{read:t.ElementRef})],h.prototype,"divContainer",void 0),h=fe([(0,t.Component)({template:` <div #divContainer *ngIf="items" [ngClass] = "{'divContainer': true, 'clickable-divContainer': clickable}" [ngStyle]="CSSStyles" [style.height]="height" [style.width]="width" [style.display]="display" (keydown)="onKey($event)" [attr.role]="ariaRole" [attr.aria-selected]="ariaSelected" [attr.aria-live]="ariaLive" [attr.aria-label]="ariaLabel"> <div *ngFor="let item of items" [style.order]="getItemOrder(item)" [ngStyle]="getItemStyles(item)"> <model-component-wrapper [descriptor]="item.descriptor" [modelStore]="modelStore"> </model-component-wrapper> </div> </div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)((0,t.forwardRef)(()=>t.Renderer2))),O(3,(0,t.Inject)(f.ILogService)),O(4,(0,t.Inject)(v.IThemeService))],h),e.default=h}),define(Q[3348],Y([1,0,40,155,199,29,9,168,1967,15,11,19,36,448,101,1582]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let s=class extends y.ComponentBase{constructor(u,d,p,c,l){super(u,p,l),this.contextViewService=d,this.configurationService=c,this.isInitState=!0,this.configurationService&&(this._isInAccessibilityMode=this.configurationService.getValue("editor.accessibilitySupport")==="on")}ngAfterViewInit(){if(this._editableDropDownContainer){let u={values:[],strictSelection:this.strictSelection??!1,placeholder:this.placeholder,maxHeight:125,ariaLabel:"",...i.defaultEditableDropdownStyles};this._editableDropdown=new r.Dropdown(this._editableDropDownContainer.nativeElement,this.contextViewService,u),this._register(this._editableDropdown),this._register(this._editableDropdown.onValueChange(async d=>{this.editable&&(this.setSelectedValue(d),await this.validate(),this.fireEvent({eventType:f.ComponentEventType.onDidChange,args:d})),this.isInitState=!1})),this._validations.push(()=>!this.required||!this.editable||!!this._editableDropdown.value)}this._dropDownContainer&&(this._selectBox=new b.SelectBox(this.getValues(),this.getSelectedValue(),i.defaultSelectBoxStyles,this.contextViewService,this._dropDownContainer.nativeElement),this._selectBox.render(this._dropDownContainer.nativeElement),this._register(this._selectBox),this._register(this._selectBox.onDidSelect(async u=>{(!this.editable||this._isInAccessibilityMode&&!this.loading)&&(this.setSelectedValue(u.selected),await this.validate()),this.editable||this.fireEvent({eventType:f.ComponentEventType.onDidChange,args:u}),this.isInitState=!1})),this._validations.push(()=>!this.required||this.editable||!!this._selectBox.value)),this._validations.push(()=>!this.loading),this.baseInit()}ngOnDestroy(){this.baseDestroy()}async validate(){const u=await super.validate();this._changeRef.detectChanges();const d=this.editable?this._editableDropdown.input.inputElement:this._selectBox.selectElem,p=this.editable?this._editableDropdown.input.element:d;return u?(d.removeAttribute("aria-describedby"),d.removeAttribute("aria-errormessage"),d.removeAttribute("aria-invalid"),p.classList.remove("error-dropdown")):(d.setAttribute("aria-describedby",this.errorId),d.setAttribute("aria-errormessage",this.errorId),d.setAttribute("aria-invalid","true"),p.classList.add("error-dropdown")),u}setLayout(u){this.layout()}setProperties(u){super.setProperties(u),this.ariaLabel!==""&&(this._selectBox?.setAriaLabel(this.ariaLabel),this._editableDropdown&&(this._editableDropdown.ariaLabel=this.ariaLabel)),this.editable&&!this._isInAccessibilityMode?(this._editableDropdown.values=this.getValues(),this.value&&(this._editableDropdown.value=this.getSelectedValue()),this._editableDropdown.enabled=this.enabled,this._editableDropdown.fireOnTextChange=this.fireOnTextChange,this._editableDropdown.strictSelection=this.strictSelection,this.placeholder&&this._editableDropdown.input.setPlaceHolder(this.placeholder),this._editableDropdown.input.setTooltip(this.enabled?"":this._editableDropdown.input.value)):(this._selectBox.setOptions(this.getValues()),this._selectBox.selectWithOptionName(this.getSelectedValue()),this.enabled?this._selectBox.enable():this._selectBox.disable()),this.loading&&(this._loadingBox||(this._loadingBox=new b.SelectBox([this.getStatusText()],this.getStatusText(),i.defaultSelectBoxStyles,this.contextViewService,this._loadingBoxContainer.nativeElement),this._loadingBox.render(this._loadingBoxContainer.nativeElement),this._register(this._loadingBox),this._loadingBoxContainer.nativeElement.className=""),this.ariaLabel!==""&&this._loadingBox.setAriaLabel(this.ariaLabel),this._loadingBox.setOptions([this.getStatusText()]),this._loadingBox.selectWithOptionName(this.getStatusText()),this._loadingBox.enable()),this._selectBox.selectElem.required=this.required,this._editableDropdown.inputElement.required=this.required,this.validate().catch(m.onUnexpectedError)}getValues(){return this.values&&this.values.length>0?this.valuesHaveDisplayName()?this.values.map(u=>u.displayName):this.values:[]}valuesHaveDisplayName(){return typeof this.values[0]!="string"}getSelectedValue(){if(this.values&&this.values.length>0&&this.valuesHaveDisplayName()){let u=this.value||this.values[0],d=this.values.find(p=>p.name===u.name);return d&&d.displayName}else return!this.value&&this.values&&this.values.length>0?this.values[0]:this.value}setSelectedValue(u){if(this.values&&this.valuesHaveDisplayName()){let d=this.values.find(p=>p.displayName===u);this.value=d}else this.value=u}get value(){return this.getPropertyOrDefault(u=>u.value,"")}get editable(){return this.getPropertyOrDefault(u=>u.editable,!1)}get fireOnTextChange(){return this.getPropertyOrDefault(u=>u.fireOnTextChange,!1)}getEditableDisplay(){return this.editable&&!this._isInAccessibilityMode&&!this.loading?"":"none"}getNotEditableDisplay(){return(!this.editable||this._isInAccessibilityMode)&&!this.loading?"":"none"}set value(u){this.setPropertyFromUI(this.setValueProperties,u)}get values(){return this.getPropertyOrDefault(u=>u.values,[])}set values(u){this.setPropertyFromUI(this.setValuesProperties,u)}setValueProperties(u,d){u.value=d}setValuesProperties(u,d){u.values=d}get required(){return this.getPropertyOrDefault(u=>u.required,!1)}set required(u){this.setPropertyFromUI((d,p)=>d.required=p,u)}focus(){this.editable&&!this._isInAccessibilityMode?this._editableDropdown.focus():this._selectBox.focus()}get showText(){return this.getPropertyOrDefault(u=>u.showText,!1)}get loading(){return this.getPropertyOrDefault(u=>u.loading,!1)}get loadingText(){return this.getPropertyOrDefault(u=>u.loadingText,(0,v.localize)(0,null))}get loadingCompletedText(){return this.getPropertyOrDefault(u=>u.loadingCompletedText,(0,v.localize)(1,null))}getStatusText(){return this.loading?this.loadingText:this.loadingCompletedText}get CSSStyles(){return this.mergeCss(super.CSSStyles,{width:this.getWidth()})}get placeholder(){return this.getPropertyOrDefault(u=>u.placeholder,void 0)}get strictSelection(){return this.getPropertyOrDefault(u=>u.strictSelection,void 0)}get validationErrorMessages(){let u=this.getPropertyOrDefault(d=>d.validationErrorMessages,void 0);return this.required&&this.editable&&u&&(!this._editableDropdown.input.value||this._editableDropdown.input.value==="")?[(0,v.localize)(2,null)]:u}get errorId(){return this.descriptor.id+"-err"}};fe([(0,t.Input)()],s.prototype,"descriptor",void 0),fe([(0,t.Input)()],s.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("editableDropDown",{read:t.ElementRef})],s.prototype,"_editableDropDownContainer",void 0),fe([(0,t.ViewChild)("dropDown",{read:t.ElementRef})],s.prototype,"_dropDownContainer",void 0),fe([(0,t.ViewChild)("loadingBox",{read:t.ElementRef})],s.prototype,"_loadingBoxContainer",void 0),s=fe([(0,t.Component)({selector:"modelview-dropdown",template:` <div [ngStyle]="CSSStyles"> <div *ngIf="loading" style="width: 100%; position: relative"> <div class="modelview-loadingComponent-spinner" style="position:absolute; right: 0px; margin-right: 5px; height:15px; z-index:1" #spinnerElement></div> <div #loadingBox style="width: 100%;"></div> </div> <div [style.display]="getEditableDisplay()" #editableDropDown style="width: 100%;"></div> <div [style.display]="getNotEditableDisplay()" #dropDown style="width: 100%;"></div> <label #errorMessage tabindex="-1" aria-live="polite" [attr.id]="errorId" aria-atomic="true" *ngIf="!_valid && validationErrorMessages && validationErrorMessages.length!==0 && !isInitState"> <ng-container *ngFor="let error of validationErrorMessages"> <div class="dropdown-error-container"> <div class="sql codicon error dropdown-error-icon"></div> <span class="dropdown-error-text">{{error}}</span> </div> </ng-container> </label> </div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)(D.IContextViewService)),O(2,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(3,(0,t.Inject)(T.IConfigurationService)),O(4,(0,t.Inject)(S.ILogService))],s),e.default=s,(0,h.registerThemingParticipant)((o,u)=>{const d=o.getColor(a.errorForeground);d&&u.addRule(` modelview-dropdown .dropdown-error-text { color: ${d}; } `);const p=o.getColor(a.inputValidationErrorBorder);p&&u.addRule(` modelview-dropdown .error-dropdown { border-color: ${p} !important; outline-offset: 2px !important } `)})}),define(Q[3349],Y([1,0,40,1169,168,19,36,41,7,11,6,67,227,1585]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let r=class extends y.TitledComponent{constructor(s,o,u,d){super(s,o,d),this.openerService=u}ngAfterViewInit(){const s=this._register(new a.DomEmitter(this._el.nativeElement,"click")),o=this._register(new a.DomEmitter(this._el.nativeElement,"keydown")),u=S.Event.chain(o.event).map(p=>new h.StandardKeyboardEvent(p)).filter(p=>p.keyCode===3).event,d=S.Event.any(s.event,u);this._register(d(p=>{this.open(p)})),this.baseInit()}ngOnDestroy(){this.baseDestroy()}get cssClass(){return this.showLinkIcon?"link-with-icon":""}setLayout(s){this.layout()}set label(s){this.setPropertyFromUI((o,u)=>{o.label=u},s)}get label(){return this.getPropertyOrDefault(s=>s.label,"")}set url(s){this.setPropertyFromUI((o,u)=>{o.url=u},s)}get url(){return this.getPropertyOrDefault(s=>s.url,"")}get showLinkIcon(){return this.getPropertyOrDefault(s=>s.showLinkIcon,!1)}getDisplayedTitle(){return this.title||this.url||""}open(s){this.fireEvent({eventType:b.ComponentEventType.onDidClick,args:void 0}),this.url&&this.openerService.open(this.url),v.EventHelper.stop(s,!0)}};fe([(0,t.Input)()],r.prototype,"descriptor",void 0),fe([(0,t.Input)()],r.prototype,"modelStore",void 0),r=fe([(0,t.Component)({selector:"modelview-hyperlink",template:'<a [href]="url" [title]="getDisplayedTitle()" [attr.aria-label]="ariaLabel" [attr.role]="ariaRole" target="blank" [ngStyle]="CSSStyles" [class]="cssClass">{{label}}</a>'}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(f.IOpenerService)),O(3,(0,t.Inject)(m.ILogService))],r),e.default=r,(0,D.registerThemingParticipant)((i,s)=>{const o=i.getColor(T.textLinkForeground);o&&s.addRule(` modelview-hyperlink a:link, modelview-hyperlink a:visited { color: ${o}; } `);const u=i.getColor(T.textLinkActiveForeground);u&&s.addRule(` modelview-hyperlink a:hover { color: ${u}; } `);const d=i.getColor(T.focusBorder);d&&s.addRule(` modelview-hyperlink a { outline-color: ${d}; } `)})}),define(Q[3350],Y([1,0,40,168,155,494,7,67,42,11,36,19,1579,1598]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let a=class extends b.ComponentBase{constructor(i,s,o){super(i,s,o),this.iconClasses={}}ngAfterViewInit(){this.baseInit()}setLayout(i){this.layout()}ngOnDestroy(){Object.keys(this.iconClasses).forEach(i=>{T.removeCSSRulesContainingSelector(this.iconClasses[i])}),this.baseDestroy()}onKeyDown(i){if(!this.enabled||this.cards.length===0)return;let s=new f.StandardKeyboardEvent(i);s.keyCode===3||s.keyCode===10?(this.focusedCardId&&!this.selectedCardId&&this.selectCard(this.focusedCardId),T.EventHelper.stop(s,!0)):s.keyCode===15||s.keyCode===16?(this.focusedCardId&&this.selectCard(this.findPreviousCard(this.focusedCardId)),T.EventHelper.stop(s,!0)):(s.keyCode===17||s.keyCode===18)&&(this.focusedCardId&&this.selectCard(this.findNextCard(this.focusedCardId)),T.EventHelper.stop(s,!0))}getCardById(i){const s=this.cards.filter(o=>o.id===i);if(s.length===1)return s[0];throw new Error(`There should be one and only one matching card for the giving card id, actual number: ${s.length}, card id: ${i}.`)}findPreviousCard(i){const s=this.cards.indexOf(this.getCardById(i)),o=s===0?this.cards.length-1:s-1;return this.cards[o].id}findNextCard(i){const s=this.cards.indexOf(this.getCardById(i)),o=s===this.cards.length-1?0:s+1;return this.cards[o].id}get cards(){return this.getProperties().cards??[]}get cardWidth(){return this.getProperties().cardWidth??void 0}get cardHeight(){return this.getProperties().cardHeight??void 0}get iconWidth(){return this.getProperties().iconWidth??void 0}get iconHeight(){return this.getProperties().iconHeight??void 0}get textHeight(){return this.calculateTextContainerHeight()}calculateTextContainerHeight(){if(this.cardHeight.endsWith("px")&&this.iconHeight.endsWith("px")){let s=Number.parseInt(this.cardHeight.substr(0,this.cardHeight.length-2))-Number.parseInt(this.iconHeight.substr(0,this.cardHeight.length-2));return s=s-30,s.toString()+"px"}else return}get selectedCardId(){return this.getProperties().selectedCardId??void 0}get iconPosition(){return this.getProperties().iconPosition??"top"}isIconPositionTop(){return this.iconPosition==="top"}isIconPositionLeft(){return this.iconPosition==="left"}get orientation(){return this.getProperties().orientation??"horizontal"}getIconClass(i){return this.iconClasses[i]||(this.iconClasses[i]=`cardIcon icon ${(0,D.createIconCssClass)(this.getCardById(i).icon)}`),this.iconClasses[i]}setProperties(i){super.setProperties(i),this.selectedCardId&&this.selectCard(this.selectedCardId)}selectCard(i){if(!this.enabled||this.cards.length===0)return;this.getCardElement(i).nativeElement.focus(),this.setPropertyFromUI((o,u)=>o.selectedCardId=u,i),this._changeRef.detectChanges(),this.fireEvent({eventType:y.ComponentEventType.onDidChange,args:{cardId:i,card:(0,v.deepClone)(this.getCardById(i))}})}onLinkClick(i,s,o){i.stopPropagation(),this.fireEvent({eventType:y.ComponentEventType.onDidClick,args:{cardId:s,description:(0,v.deepClone)(o),card:(0,v.deepClone)(this.getCardById(s))}})}getCardElement(i){const s=this.getCardById(i);return this.cardElements.toArray()[this.cards.indexOf(s)]}getTabIndex(i){return this.enabled?this.selectedCardId?i===this.selectedCardId?0:-1:this.cards.indexOf(this.getCardById(i))===0?0:-1:-1}isCardSelected(i){return i===this.selectedCardId}onCardFocus(i){this.focusedCardId=i}onCardBlur(i){this.focusedCardId=void 0}get CSSStyles(){return this.mergeCss(super.CSSStyles,{width:this.getWidth(),height:this.getHeight()})}};fe([(0,t.Input)()],a.prototype,"descriptor",void 0),fe([(0,t.Input)()],a.prototype,"modelStore",void 0),fe([(0,t.ViewChildren)("cardDiv")],a.prototype,"cardElements",void 0),a=fe([(0,t.Component)({templateUrl:decodeURI(q.toUrl("./radioCardGroup.component.html"))}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(m.ILogService))],a),e.default=a,(0,h.registerThemingParticipant)((r,i)=>{const s=r.getColor(S.textLinkForeground),o=r.getColor(S.focusBorder);o&&s&&i.addRule(` .card-group .link-value { color: ${s}; } .card-group .link-value:focus { outline-color: ${o}; }`)})}),define(Q[3351],Y([1,0,40,1169,276,5,7,11,19,36,67,559,1595]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextType=void 0;var a;(function(s){s.Normal="Normal",s.Error="Error",s.UnorderedList="UnorderedList",s.OrderedList="OrderedList"})(a||(e.TextType=a={}));const r="error-text";let i=class extends y.TitledComponent{constructor(o,u,d,p){super(o,u,p),this.instantiationService=d}ngAfterViewInit(){this.updateText(),this.baseInit()}ngOnDestroy(){this.baseDestroy()}setLayout(o){this.layout()}set value(o){this.setPropertyFromUI((u,d)=>{u.value=d},o)}get value(){return this.getPropertyOrDefault(o=>o.value,void 0)}set description(o){this.setPropertyFromUI((u,d)=>{u.description=d},o)}get description(){return this.getPropertyOrDefault(o=>o.description,"")}set requiredIndicator(o){this.setPropertyFromUI((u,d)=>{u.requiredIndicator=d},o)}get requiredIndicator(){return this.getPropertyOrDefault(o=>o.requiredIndicator,!1)}get headingLevel(){return this.getPropertyOrDefault(o=>o.headingLevel,void 0)}set headingLevel(o){this.setPropertyFromUI((u,d)=>{u.headingLevel=d},o)}get textType(){let o=this.getPropertyOrDefault(u=>u.textType,void 0);if(!o&&typeof this.value!="string"&&(o=this.value?a.UnorderedList:void 0),(o===a.OrderedList||o===a.UnorderedList)&&typeof this.value=="string")throw new Error(`Invalid type of value provided for the textType ${o}`);return o}set textType(o){this.setPropertyFromUI((u,d)=>{u.textType=d},o)}get isUnOrderedList(){return this.textType===a.UnorderedList}get showList(){return this.textType===a.UnorderedList||this.textType===a.OrderedList}setProperties(o){super.setProperties(o),this.updateText(),this.textType===a.Error?this._el.nativeElement.classList.add(r):this._el.nativeElement.classList.remove(r),this._changeRef.detectChanges()}updateText(){if(typeof this.value!="string")return;const o=this.textContainer.nativeElement;T.clearNode(o),this.requiredIndicator?o.classList.add(h.RequiredIndicatorClassName):o.classList.remove(h.RequiredIndicatorClassName);const u=this.getPropertyOrDefault(p=>p.links,[]);let d=this.value;for(let p=0;p<u.length;p++){const c=d.indexOf(`{${p}}`);if(c<0){this.logService.warn(`Could not find placeholder text {${p}} in text '${this.value}'. Link: ${JSON.stringify(u[p])}`);continue}if(d.slice(0,c)&&typeof d=="string"){const w=this.createTextElement();w.innerText=d.slice(0,c),o.appendChild(w)}const n=u[p],g=this._register(this.instantiationService.createInstance(b.Link,o,{label:n.text,href:n.url},void 0));n.accessibilityInformation&&(g.el.setAttribute("aria-label",n.accessibilityInformation.label),n.accessibilityInformation.role&&g.el.setAttribute("role",n.accessibilityInformation.role)),o.appendChild(g.el),d=d.slice(c+3)}if(d&&typeof d=="string"){const p=this.createTextElement();p.innerText=d,o.appendChild(p)}}get showDiv(){return this.requiredIndicator||!!this.description}get ariaLive(){return this.getPropertyOrDefault(o=>o.ariaLive,void 0)}createTextElement(){let o=this.headingLevel,u;return o?u=T.$(`h${o}`):u=T.$("span"),u.style.fontSize=this.CSSStyles["font-size"]?.toString(),u.style.fontWeight=this.CSSStyles["font-weight"]?.toString(),u}showTooltip(o){const d=o.target.querySelector(".modelview-text-tooltip-content");d.style.display=""}onDescriptionKeyDown(o){if(o instanceof KeyboardEvent){let u=new S.StandardKeyboardEvent(o);const p=o.target.querySelector(".modelview-text-tooltip-content");u.equals(9)?(p.style.display="none",u.stopPropagation(),u.preventDefault()):u.equals(3)&&(p.style.display="",u.stopPropagation(),u.preventDefault())}}};fe([(0,t.Input)()],i.prototype,"descriptor",void 0),fe([(0,t.Input)()],i.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("textContainer",{read:t.ElementRef})],i.prototype,"textContainer",void 0),i=fe([(0,t.Component)({selector:"modelview-text",template:` <div *ngIf="showList;else noList" [style.display]="display" [style.width]="getWidth()" [style.height]="getHeight()" [title]="title" [attr.role]="ariaRole" [attr.aria-hidden]="ariaHidden" [ngStyle]="this.CSSStyles" [attr.aria-live]="ariaLive"> <div *ngIf="isUnOrderedList;else orderedlist"> <ul style="padding-left:0px"> <li *ngFor="let v of value">{{v}}</li> </ul> </div> <ng-template #orderedlist> <ol style="padding-left:0px"> <li *ngFor="let v of value">{{v}}</li> </ol> </ng-template> </div> <ng-template #noList> <div *ngIf="showDiv;else noDiv" style="display:flex;flex-flow:row;align-items:center;" [style.width]="getWidth()" [style.height]="getHeight()"> <p [title]="title" [ngStyle]="this.CSSStyles" [attr.role]="ariaRole" [attr.aria-hidden]="ariaHidden" [attr.aria-live]="ariaLive"></p> <div #textContainer id="textContainer"></div> <div *ngIf="description" tabindex="0" class="modelview-text-tooltip" [attr.aria-label]="description" role="tooltip" (mouseenter)="showTooltip($event)" (focus)="showTooltip($event)" (keydown)="onDescriptionKeyDown($event)"> <div class="modelview-text-tooltip-content" [innerHTML]="description"></div> </div> </div> <ng-template #noDiv> <div #textContainer id="textContainer" [style.display]="display" [style.width]="getWidth()" [style.height]="getHeight()" [title]="title" [attr.role]="ariaRole" [attr.aria-hidden]="ariaHidden" [attr.aria-live]="ariaLive" [ngStyle]="this.CSSStyles" tabindex="0"></div> </ng-template> </ng-template>`}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(D.IInstantiationService)),O(3,(0,t.Inject)(f.ILogService))],i),e.default=i,(0,v.registerThemingParticipant)((s,o)=>{const u=s.getColor(m.errorForeground);u&&o.addRule(` modelview-text.${r} { color: ${u}; } `)})}),define(Q[1207],Y([1,0,40,1039,389,652,36,17,4,2034,19,215,76]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChartInsight=void 0;let r=class extends v.Disposable{constructor(o,u,d){super(),this._changeRef=o,this.themeService=u,this._telemetryService=d,this._isDataAvailable=!1,this._hasInit=!1,this._hasError=!1,this._options={},this._defaultConfig=D.defaultChartConfig,this.CHART_ERROR_MESSAGE=m.localize(0,null),y.Chart.register(...y.registerables),y.Chart.register(y.Colors)}init(){this._register(this.themeService.onDidColorThemeChange(o=>this.updateTheme(o))),this.updateTheme(this.themeService.getColorTheme()),this.options=(0,b.mixin)(this.options,{maintainAspectRatio:!1}),this._hasInit=!0,this._hasError=!1;try{this._changeRef.detectChanges()}catch{this._hasInit=!1,this._hasError=!0,this._changeRef.detectChanges()}this._chartCanvas=document.createElement("canvas"),this._chartContainer.nativeElement.appendChild(this._chartCanvas),this._chartCanvas.style.width="100%",this._chartCanvas.style.height="100%",this._chart=new y.Chart(this._chartCanvas,{type:h.ChartTypeToChartJsType[this.chartType],data:{labels:this.labels,datasets:this.chartData},options:this.options}),this.refresh(),this._telemetryService.createActionEvent("Shell","ChartCreated").withAdditionalProperties({type:this.chartType}).send()}set options(o){this._options=o,this._isDataAvailable&&(this._options=(0,b.mixin)({},(0,b.mixin)(this._options,{animation:{duration:0}})),this.refresh())}get options(){return this._options}updateTheme(o){const u=o.getColor(T.editorForeground),p={plugins:{legend:{labels:{color:u?u.toString():null}}}};this.options=(0,b.mixin)({},(0,b.mixin)(this.options,p))}refresh(){this._chart&&(this._chart.options=this.options,this._chart.data.datasets=this.chartData,this._chart.data.labels=this.labels,this._chart.config.type=h.ChartTypeToChartJsType[this.chartType],this._chart.update())}refreshChartOptions(){this._chart&&(this._chart.options=this.options,this._chart.update())}getCanvasData(){if(this._chart)return this._chart.toBase64Image()}set data(o){this.clearMemoize(),this._data=this.filterToTopNData(o),i(o)&&(this._isDataAvailable=!0),this._changeRef.detectChanges()}filterToTopNData(o){return this._config.dataDirection==="horizontal"?{columns:this.getTopNData(o.columns),rows:o.rows.map(u=>this.getTopNData(u))}:{columns:o.columns,rows:o.rows.slice(0,this._config.showTopNData)}}getTopNData(o){return this._config.showTopNData?this._config.dataDirection==="horizontal"&&this._config.labelFirstColumn?o.slice(0,this._config.showTopNData+1):o.slice(0,this._config.showTopNData):o}clearMemoize(){this._cachedChartData=void 0,this._cachedColors=void 0,this._cachedLabels=void 0}setConfig(o){this.clearMemoize(),this._config=(0,b.mixin)(o,this._defaultConfig,!1),this.legendPosition=this._config.legendPosition,this._isDataAvailable&&(this._options=(0,b.mixin)({},(0,b.mixin)(this._options,{animation:!1})),this.refresh())}getChartData(){return this._cachedChartData||(this._config.dataDirection==="horizontal"?this._config.labelFirstColumn?this._cachedChartData=this._data.rows.map(o=>({data:o.map(u=>Number(u)).slice(1),label:o[0]})):this._cachedChartData=this._data.rows.map((o,u)=>({data:o.map(d=>Number(d)),label:"Series"+u})):this._config.columnsAsLabels?this._cachedChartData=this._data.rows[0].slice(1).map((o,u)=>({data:this._data.rows.map(d=>Number(d[u+1])),label:this._data.columns[u+1]})):this._cachedChartData=this._data.rows[0].slice(1).map((o,u)=>({data:this._data.rows.map(d=>Number(d[u+1])),label:"Series"+(u+1)}))),this._cachedChartData}get chartData(){return this.getChartData()}getLabels(){return this._cachedLabels||(this._config.dataDirection==="horizontal"?this._config.labelFirstColumn?this._cachedLabels=this._data.columns.slice(1):this._cachedLabels=this._data.columns:this._cachedLabels=this._data.rows.map(o=>o[0])),this._cachedLabels}get labels(){return this.getLabels()}get colors(){if(!this._cachedColors)if(this._config&&this._config.colorMap){const u={backgroundColor:this.labels.map(d=>this._config.colorMap[d])};this._cachedColors=[u]}else this._cachedColors=void 0;return this._cachedColors}set legendPosition(o){const u={plugins:{legend:{position:"top",display:!0}}};o==="none"?u.plugins.legend.display=!1:u.plugins.legend.position=o,this.options=(0,b.mixin)(this.options,u)}};e.ChartInsight=r,fe([(0,t.ViewChild)("chartContainer")],r.prototype,"_chartContainer",void 0),fe([(0,t.Input)()],r.prototype,"data",null),e.ChartInsight=r=fe([(0,t.Component)({templateUrl:decodeURI(q.toUrl("./chartInsight.component.html"))}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)(S.IThemeService)),O(2,(0,t.Inject)(a.IAdsTelemetryService))],r);function i(s){return!(f.isUndefinedOrNull(s)||f.isUndefinedOrNull(s.columns)||f.isUndefinedOrNull(s.rows))}}),define(Q[1208],Y([1,0,1207,40,19,76,215]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let f=class extends t.ChartInsight{constructor(m,S,h){super(m,S,h),this.chartType=T.ChartType.Pie}};f=fe([O(0,(0,y.Inject)((0,y.forwardRef)(()=>y.ChangeDetectorRef))),O(1,(0,y.Inject)(b.IThemeService)),O(2,(0,y.Inject)(D.IAdsTelemetryService))],f),e.default=f}),define(Q[3352],Y([1,0,1208,40,19,215,76]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let f=class extends t.default{constructor(m,S,h){super(m,S,h),this.chartType=D.ChartType.Doughnut}};f=fe([O(0,(0,y.Inject)((0,y.forwardRef)(()=>y.ChangeDetectorRef))),O(1,(0,y.Inject)(b.IThemeService)),O(2,(0,y.Inject)(T.IAdsTelemetryService))],f),e.default=f}),define(Q[3353],Y([1,0,42,230,815,3352]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const T={},f=(0,t.mixin)((0,t.deepClone)(b.chartInsightSchema),T);(0,y.registerInsight)("doughnut","",f,D.default)}),define(Q[3354],Y([1,0,42,230,815,1208]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const T={},f=(0,t.mixin)((0,t.deepClone)(b.chartInsightSchema),T);(0,y.registerInsight)("pie","",f,D.default)}),define(Q[1209],Y([1,0,7,402,19,2063,34,32,396,143,36,1114,229,398,29,5,68,17,571,166,42,4,66,43,170,54,37,101]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I){"use strict";var _;Object.defineProperty(e,"__esModule",{value:!0}),e.CopyTableData=e.CollapseAllPropertiesAction=e.ExpandAllPropertiesAction=e.PropertiesSortType=e.SortPropertiesByDisplayOrderAction=e.SortPropertiesReverseAlphabeticallyAction=e.SortPropertiesAlphabeticallyAction=e.ClosePropertyViewAction=e.ExecutionPlanPropertiesViewBase=void 0;let A=class extends l.Disposable{constructor(W,z,B,K,H,U,G){super(),this._parentContainer=W,this._instantiationService=z,this._contextMenuService=B,this._contextViewService=K,this._componentContextService=G,this.sortType=N.DisplayOrder;const $=t.$(".properties-sash");this._parentContainer.appendChild($),this.resizeSash=this._register(new a.Sash($,this,{orientation:0,size:3}));let ie=0;this._register(this.resizeSash.onDidStart(te=>{ie=this._parentContainer.clientWidth})),this._register(this.resizeSash.onDidChange(te=>{const Z=te.startX-te.currentX,se=ie+Z;se<200||(this._parentContainer.style.flex=`0 0 ${se}px`,J.style.width=`${se}px`)}));const J=t.$(".properties-content");this._parentContainer.appendChild(J),this._titleBarContainer=t.$(".title"),J.appendChild(this._titleBarContainer),this._titleBarTextContainer=t.$("h3"),this._titleBarTextContainer.classList.add("text"),this._titleBarTextContainer.innerText=(0,D.localize)(0,null),this._titleBarContainer.appendChild(this._titleBarTextContainer),this._titleBarActionsContainer=t.$(".action-bar"),this._titleBarContainer.appendChild(this._titleBarActionsContainer),this._titleActions=this._register(new y.ActionBar(this._titleBarActionsContainer,{orientation:0,context:this})),this._titleActions.pushAction([this._register(new k)],{icon:!0,label:!1}),this._headerContainer=t.$(".header"),J.appendChild(this._headerContainer),this._searchAndActionBarContainer=t.$(".search-action-bar-container"),J.appendChild(this._searchAndActionBarContainer),this._headerActionsContainer=t.$(".table-action-bar"),this._searchAndActionBarContainer.appendChild(this._headerActionsContainer),this._headerActions=this._register(new y.ActionBar(this._headerActionsContainer,{orientation:0,context:this})),this._headerActions.pushAction([this._register(new M),this._register(new L),this._register(new R),this._register(new P),this._register(new x)],{icon:!0,label:!1}),this._propertiesSearchInputContainer=t.$(".table-search"),this._propertiesSearchInputContainer.classList.add("codicon",v.filterIconClassNames),this._propertiesSearchInput=this._register(new p.InputBox(this._propertiesSearchInputContainer,this._contextViewService,{ariaDescription:v.propertiesSearchDescription,placeholder:v.searchPlaceholder,inputBoxStyles:E.defaultInputBoxStyles})),this._propertiesSearchInput.element.classList.add("codicon",v.filterIconClassNames),this._searchAndActionBarContainer.appendChild(this._propertiesSearchInputContainer),this._register(this._propertiesSearchInput.onDidChange(te=>{this.searchTable(te)})),this._tableContainer=t.$(".table-container"),J.appendChild(this._tableContainer);const j=t.$(".table");this._tableContainer.appendChild(j),this._selectionModel=new r.CellSelectionModel,this._tableComponent=this._register(new h.TreeGrid(j,H,U,I.defaultTableStyles,{columns:[]},{rowHeight:m.RESULTS_GRID_DEFAULTS.rowHeight,forceFitColumns:!0,defaultColumnWidth:120,editable:!0,autoEdit:!1})),this._tableComponent.setSelectionModel(this._selectionModel);const ee=[this._register(this._instantiationService.createInstance(F))];this._register(this._tableComponent.onContextMenu(te=>{this._contextMenuService.showContextMenu({getAnchor:()=>te.anchor,getActions:()=>ee,getActionsContext:()=>this.getCopyString()})}));let X=new d.CopyKeybind;this._tableComponent.registerPlugin(X),this._register(X.onCopy(te=>{this._instantiationService.createInstance(F).run(this.getCopyString())})),this._register(this._componentContextService.registerTable(this._tableComponent)),new ResizeObserver(te=>{this.resizeSash.layout(),this.resizeTable()}).observe(W)}getCopyString(){let W="";const z=this._selectionModel.getSelectedRanges()[0];if(z){const B=[];for(let K=z.fromRow;K<=z.toRow;K++){const H=this._tableComponent.getData().getItem(K),U=[];for(let G=z.fromCell;G<=z.toCell;G++){const $=H[this._tableComponent.grid.getColumns()[G].field];$?U.push((0,u.isString)($)?$:$.displayText??$.text??$.title):U.push("")}B.push(U)}W=B.map(K=>K.map(H=>`${H}`).join(" ")).join(` `)}return W}getVerticalSashLeft(W){return 0}getVerticalSashTop(W){return 0}getVerticalSashHeight(W){return this._parentContainer.clientHeight}setTitle(W){this._titleBarTextContainer.innerText=W}setHeader(W){this._headerContainer.appendChild(W)}set tableHeight(W){this.tableHeight!==W&&(this._tableHeight=W)}set tableWidth(W){this._tableWidth!==W&&(this._tableWidth=W)}get tableWidth(){return this._tableWidth}get tableHeight(){return this._tableHeight}toggleVisibility(){this._parentContainer.style.display=this._parentContainer.style.display==="none"?"flex":"none"}populateTable(W,z){this._tableComponent.columns=W,this._tableContainer.scrollTo(0,0),this._tableData=z,this._propertiesSearchInput.value="",this._tableComponent.setData(this.flattenTableData(z,-1)),this.resizeTable()}repopulateTable(){this._tableComponent.setData(this.flattenTableData(this._tableData,-1)),this.resizeTable()}updateTableColumns(W){this._tableComponent.columns=W}setPropertyRowsExpanded(W){this.setPropertyRowsExpandedHelper(this._tableComponent.getData().getItems(),W),this.repopulateTable()}setPropertyRowsExpandedHelper(W,z){W.forEach(B=>{B.treeGridChildren&&B.treeGridChildren.length>0&&(B.expanded=z,this.setPropertyRowsExpandedHelper(B.treeGridChildren,z))})}resizeTable(){const W=this._titleBarContainer.getBoundingClientRect().height+this._headerContainer.getBoundingClientRect().height+this._headerActionsContainer.getBoundingClientRect().height;this.tableHeight=this._parentContainer.getBoundingClientRect().height-W-15,this.tableWidth=this._parentContainer.getBoundingClientRect().width-15,this._tableComponent.layout(new t.Dimension(this._tableWidth,this._tableHeight)),this._tableComponent.resizeCanvas()}searchTable(W){W===""?this._tableComponent.setData(this.flattenTableData(this._tableData,-1)):this._tableComponent.setData(this.flattenTableData(this.searchNestedTableData(W,this._tableData).data,-1)),this._tableComponent.rerenderGrid()}searchNestedTableData(W,z){let B=[];return z.forEach(K=>{let H=!1;const U=this._tableComponent.grid.getColumns();for(let $=0;$<U.length;$++){let ie="",J=K[U[$].field];if((0,u.isString)(J)?ie=J:J!==void 0&&(ie=J.text??J.title),ie?.toLowerCase().includes(W.toLowerCase())){H=!0;break}}const G=(0,c.deepClone)(K);if(G.treeGridChildren!==void 0){const $=this.searchNestedTableData(W,G.treeGridChildren);G.treeGridChildren=$.data,H=H||$.include}H&&(G.treeGridChildren!==void 0&&(G.expanded=!0),B.push(G))}),{include:B.length>0,data:B}}flattenTableData(W,z,B=[]){return W===void 0||W.length===0||W.forEach(K=>{B.push(K),K.parent=z,K.treeGridChildren&&this.flattenTableData(K.treeGridChildren,B.length-1,B)}),B}};e.ExecutionPlanPropertiesViewBase=A,e.ExecutionPlanPropertiesViewBase=A=fe([O(1,s.IInstantiationService),O(2,i.IContextMenuService),O(3,i.IContextViewService),O(4,n.IAccessibilityService),O(5,g.IQuickInputService),O(6,w.IComponentContextService)],A);class k extends T.Action{static{this.ID="ep.propertiesView.close"}static{this.LABEL=(0,D.localize)(1,null)}constructor(){super(k.ID,k.LABEL,C.ThemeIcon.asClassName(f.Codicon.close))}async run(W){W.toggleVisibility()}}e.ClosePropertyViewAction=k;class L extends T.Action{static{this.ID="ep.propertiesView.sortByAlphabet"}static{this.LABEL=(0,D.localize)(2,null)}constructor(){super(L.ID,L.LABEL,v.sortAlphabeticallyIconClassNames)}async run(W){W.sortType=N.Alphabetical,W.refreshPropertiesTable()}}e.SortPropertiesAlphabeticallyAction=L;class R extends T.Action{static{this.ID="ep.propertiesView.sortByAlphabet"}static{this.LABEL=(0,D.localize)(3,null)}constructor(){super(R.ID,R.LABEL,v.sortReverseAlphabeticallyIconClassNames)}async run(W){W.sortType=N.ReverseAlphabetical,W.refreshPropertiesTable()}}e.SortPropertiesReverseAlphabeticallyAction=R;class M extends T.Action{static{this.ID="ep.propertiesView.sortByDisplayOrder"}static{this.LABEL=(0,D.localize)(4,null)}constructor(){super(M.ID,M.LABEL,v.sortByDisplayOrderIconClassNames)}async run(W){W.sortType=N.DisplayOrder,W.refreshPropertiesTable()}}e.SortPropertiesByDisplayOrderAction=M;var N;(function(V){V[V.DisplayOrder=0]="DisplayOrder",V[V.Alphabetical=1]="Alphabetical",V[V.ReverseAlphabetical=2]="ReverseAlphabetical"})(N||(e.PropertiesSortType=N={}));class P extends T.Action{static{this.ID="ep.propertiesView.expandAllProperties"}static{this.LABEL=(0,D.localize)(5,null)}constructor(){super(P.ID,P.LABEL,C.ThemeIcon.asClassName(f.Codicon.expandAll))}async run(W){W.setPropertyRowsExpanded(!0)}}e.ExpandAllPropertiesAction=P;class x extends T.Action{static{this.ID="ep.propertiesView.collapseAllProperties"}static{this.LABEL=(0,D.localize)(6,null)}constructor(){super(x.ID,x.LABEL,C.ThemeIcon.asClassName(f.Codicon.collapseAll))}async run(W){W.setPropertyRowsExpanded(!1)}}e.CollapseAllPropertiesAction=x,(0,b.registerThemingParticipant)((V,W)=>{const z=V.getColor(S.listHoverBackground);z&&W.addRule(` .properties .title, .properties .table-action-bar { background-color: ${z}; } `);const B=V.getColor(S.contrastBorder);B&&W.addRule(` .properties .title, .properties .table-action-bar, .mxTooltip { border: 1px solid ${B}; } `);const K=V.getColor(S.listInactiveSelectionBackground);K&&W.addRule(` .eps-container .ui-widget-content.slick-row[aria-expanded="true"], .eps-container .ui-widget-content.slick-row[aria-expanded="false"] { background-color: ${K}; } `);const H=V.getColor(S.inputBackground);S.inputBackground&&W.addRule(` .eps-container .properties .search-action-bar-container .table-search { background-color: ${H}; } `)});let F=class extends T.Action{static{_=this}static{this.ID="ep.CopyTableData"}static{this.LABEL=(0,D.localize)(7,null)}constructor(W){super(_.ID,_.LABEL,""),this._clipboardService=W}async run(W){this._clipboardService.writeText(W)}};e.CopyTableData=F,e.CopyTableData=F=_=fe([O(0,o.IClipboardService)],F)}),define(Q[3355],Y([1,0,7,2062,201,17,272,1209,29,5,66,43,170]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionPlanPropertiesView=void 0;let r=class extends f.ExecutionPlanPropertiesViewBase{constructor(s,o,u,d,p,c,l){super(s,o,u,d,p,c,l),this._model={},this._operationName=t.$("h3"),this._operationName.classList.add("operation-name"),this._parentContainer.appendChild(this._operationName),this.setHeader(this._operationName),this._parentContainer.style.display="none"}set graphElement(s){this._model.graphElement=s,this.refreshPropertiesTable()}sortPropertiesAlphabetically(s){return s.sort((o,u)=>!o?.name&&!u?.name?0:o?.name?u?.name?o.name.localeCompare(u.name):1:-1)}sortPropertiesReverseAlphabetically(s){return s.sort((o,u)=>!o?.name&&!u?.name?0:o?.name?u?.name?u.name.localeCompare(o.name):1:-1)}sortPropertiesByImportance(s){return s.sort((o,u)=>!o?.displayOrder&&!u?.displayOrder?0:o?.displayOrder?u?.displayOrder?o.displayOrder-u.displayOrder:1:-1)}refreshPropertiesTable(){if(this._model.graphElement){const o=this._model.graphElement.name;this._operationName.innerText=o?(0,b.removeLineBreaks)(o):(0,y.localize)(0,null)}const s=[{id:"name",name:(0,y.localize)(1,null),field:"name",width:250,headerCssClass:"prop-table-header",formatter:T.textFormatter},{id:"value",name:(0,y.localize)(2,null),field:"value",width:250,headerCssClass:"prop-table-header",formatter:T.textFormatter}];this.populateTable(s,this.convertPropertiesToTableRows(this._model.graphElement?.properties))}convertPropertiesToTableRows(s){if(!s)return[];const o=this.sortProperties(s),u=[];return o.forEach((d,p)=>{let c={};c.name=d.name,(0,D.isString)(d.value)?(c.value=(0,b.removeLineBreaks)(d.displayValue," "),c.tooltip=d.displayValue):(c.name={text:c.name},c.value={text:(0,b.removeLineBreaks)(d.displayValue," ")},c.tootltip=d.displayValue,c.treeGridChildren=this.convertPropertiesToTableRows(d.value)),u.push(c)}),u}sortProperties(s){switch(this.sortType){case f.PropertiesSortType.DisplayOrder:s=this.sortPropertiesByImportance(s);break;case f.PropertiesSortType.Alphabetical:s=this.sortPropertiesAlphabetically(s);break;case f.PropertiesSortType.ReverseAlphabetical:s=this.sortPropertiesReverseAlphabetically(s);break}return s}convertModelToTableRows(s,o,u=[]){return s&&s.forEach((d,p)=>{let c={};u.push(c),c.name=d.name,c.parent=o,(0,D.isString)(d.value)?(c.value={text:(0,b.removeLineBreaks)(d.displayValue," ")},c.tooltip=d.displayValue):(c.name={text:c.name},c.value={text:(0,b.removeLineBreaks)(d.displayValue," ")},c.tootltip=d.displayValue,this.convertModelToTableRows(d.value,u.length-1,u))}),u}};e.ExecutionPlanPropertiesView=r,e.ExecutionPlanPropertiesView=r=fe([O(1,m.IInstantiationService),O(2,v.IContextMenuService),O(3,v.IContextViewService),O(4,S.IAccessibilityService),O(5,h.IQuickInputService),O(6,a.IComponentContextService)],r)}),define(Q[3356],Y([1,0,166,402,783,7,34,32,2069,29,23,19,396,198,54,37]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancelZoom=e.CustomZoomAction=e.CustomZoomWidget=void 0;let o=class extends b.ExecutionPlanWidgetBase{constructor(c,l,n,g,w){super(D.$(".custom-zoom-view"),"customZoom"),this.widgetController=c,this.executionPlanDiagram=l,this.contextViewService=n,this.themeService=g,this.notificationService=w;const E=(0,v.localize)(0,null);this.customZoomInputBox=this._register(new t.InputBox(this.container,this.contextViewService,{type:"number",ariaLabel:E,flexibleWidth:!1,inputBoxStyles:i.defaultInputBoxStyles}));const C=this.executionPlanDiagram.getZoomLevel();this.customZoomInputBox.value=Math.round(C).toString();const I=this;this._register(D.addDisposableListener(this.customZoomInputBox.element,D.EventType.KEY_DOWN,async A=>{A.key==="Enter"?await this._register(new u).run(I):A.key==="Escape"&&this.widgetController.removeWidget(I)}));const _=this._register(new r.Button(this.container,{title:(0,v.localize)(1,null),...i.defaultButtonStyles}));_.setWidth("60px"),_.label=(0,v.localize)(2,null),this._register(_.onDidClick(async A=>{await this._register(new u).run(I)})),this._actionBar=this._register(new y.ActionBar(this.container)),this._actionBar.context=this,this._actionBar.pushAction(this._register(new d),{label:!1,icon:!0})}focus(){this.customZoomInputBox.focus()}};e.CustomZoomWidget=o,e.CustomZoomWidget=o=fe([O(2,m.IContextViewService),O(3,h.IThemeService),O(4,S.INotificationService)],o);class u extends T.Action{static{this.ID="qp.customZoomAction"}static{this.LABEL=(0,v.localize)(3,null)}constructor(){super(u.ID,u.LABEL,a.zoomIconClassNames)}async run(c){const l=parseInt(c.customZoomInputBox.value);l<=200&&l>=1?(c.executionPlanDiagram.setZoomLevel(l),c.widgetController.removeWidget(c)):c.notificationService.error((0,v.localize)(4,null))}}e.CustomZoomAction=u;class d extends T.Action{static{this.ID="qp.cancelCustomZoomAction"}static{this.LABEL=(0,v.localize)(5,null)}constructor(){super(d.ID,d.LABEL,s.ThemeIcon.asClassName(f.Codicon.chromeClose))}async run(c){c.widgetController.removeWidget(c)}}e.CancelZoom=d}),define(Q[3357],Y([1,0,40,331,19,1641]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookViewsModalComponent=void 0;let D=class{};e.NotebookViewsModalComponent=D,fe([(0,t.Input)()],D.prototype,"title",void 0),e.NotebookViewsModalComponent=D=fe([(0,t.Component)({selector:"notebook-views-modal-component",template:` <div [class.modal]="displayInputModal"> <div class="content"> <div class="title">{{title}}</div> <ng-content></ng-content> </div> </div> `})],D),(0,b.registerThemingParticipant)((T,f)=>{const v=T.getColor(y.calloutDialogForeground);v&&f.addRule(`notebook-views-grid-component .modal { position: absolute; background: ${v};}`);const m=T.getColor(y.calloutDialogInteriorBorder);m&&(f.addRule(`notebook-views-grid-component .modal .content { border-color: ${m}; }`),f.addRule(`notebook-views-grid-component .modal .content .title { border-color: ${m}; }`));const S=T.getColor(y.calloutDialogBodyBackground);S&&f.addRule(`notebook-views-grid-component .modal .content { background: ${S}; }`)})}),define(Q[351],Y([1,0,90,8,19,9,67,5]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionError=e.AsyncServerTree=void 0;let v=class extends t.WorkbenchAsyncDataTree{constructor(h,a,r,i,s,o,u,d,p,c,l){super(h,a,r,i,s,o,l,u,d,c),this.onKeyDown(n=>{const g=new T.StandardKeyboardEvent(n);if(g.keyCode===3||g.keyCode===10){const w=this.getSelection()[0];w&&(this.isCollapsed(w)?this.expand(w):this.collapse(w))}})}getDataNode(h,a=!0){try{return super.getDataNode(h)}catch(r){let i=this.getDataNodeById(h?.id);if(i)return i;if(a)throw r;return}}getElementById(h){return this.getInput().id===h?this.getInput():this.getDataNodeById(h)?.element}getExpandedState(h){const r=[this.getDataNode(h)],i=[];for(;r.length>0;){const s=r.pop();s&&(s===this.root||!this.isCollapsed(s.element))&&(i.push(s.element),s.children&&s.children.forEach(o=>r.push(o)))}return i}getDataNodeById(h){let a;return this.nodes.forEach((r,i)=>{h===r?.id&&(a=r)}),a}async updateChildren(h,a=!1,r=!1,i={diffDepth:0}){await super.updateChildren(h,a,r,i)}async makeElementDirty(h){this.getDataNode(h).stale=!0}revealSelectFocusElement(h){const a=this.getDataNode(h);a===this.root&&(h=a.children[0].element),this.reveal(h),this.setSelection([h]),this.setFocus([h])}};e.AsyncServerTree=v,e.AsyncServerTree=v=fe([O(6,y.IContextKeyService),O(7,t.IListService),O(8,b.IThemeService),O(9,D.IConfigurationService),O(10,f.IInstantiationService)],v);class m extends Error{constructor(h,a){super(h),this.connection=a}}e.ConnectionError=m}),define(Q[708],Y([1,0,2228,34,106,58,194,172,322,63,188,117,682,11,351,49,32,76,87,37,13,22]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteRecentConnectionsAction=e.RemoveFilterAction=e.FilterChildrenAction=e.DeleteConnectionAction=e.ActiveConnectionsFilterAction=e.EditServerGroupAction=e.AddServerGroupAction=e.AddServerAction=e.AddServerAction1=e.DisconnectConnectionAction=e.EditConnectionAction=e.RefreshAction=void 0;let n=class extends y.Action{static{this.ID="objectExplorer.refresh"}static{this.LABEL=(0,t.localize)(0,null)}constructor(x,F,V,W,z,B,K,H){super(x,F,p.ThemeIcon.asClassName(o.Codicon.refresh)),this._tree=V,this.element=W,this._connectionManagementService=z,this._objectExplorerService=B,this._errorMessageService=K,this._logService=H}async run(){let x;if(this.element instanceof b.ConnectionProfile){let F=this.element;this._connectionManagementService.isConnected(void 0,F)&&(x=this._objectExplorerService.getObjectExplorerNode(F),x===void 0&&(await this._objectExplorerService.updateObjectExplorerNodes(F.toIConnectionProfile()),x=this._objectExplorerService.getObjectExplorerNode(F)))}else this.element instanceof v.TreeNode&&(x=this.element);if(x)try{if(this._tree instanceof i.AsyncServerTree){try{const F=x.getSession();F&&await this._objectExplorerService.refreshTreeNode(F,x)}catch(F){this.showError(F);return}await this._tree.updateChildren(this.element)}else await this._tree.refresh(this.element)}catch(F){this._logService.error(F);return}}showError(x){this._logService.error(x),this._errorMessageService&&this._errorMessageService.showDialog(m.default.Error,"",x)}};e.RefreshAction=n,e.RefreshAction=n=fe([O(4,D.IConnectionManagementService),O(5,f.IObjectExplorerService),O(6,S.IErrorMessageService),O(7,r.ILogService)],n);let g=class extends y.Action{static{this.ID="registeredServers.editConnection"}static{this.LABEL=(0,t.localize)(1,null)}constructor(x,F,V,W){super(x,F,p.ThemeIcon.asClassName(o.Codicon.edit)),this._connectionProfile=V,this._connectionManagementService=W}async run(){this._connectionProfile&&await this._connectionManagementService.showEditConnectionDialog(this._connectionProfile)}};e.EditConnectionAction=g,e.EditConnectionAction=g=fe([O(3,D.IConnectionManagementService)],g);let w=class extends y.Action{static{this.ID="objectExplorer.disconnect"}static{this.LABEL=(0,t.localize)(2,null)}constructor(x,F,V,W){super(x,F,p.ThemeIcon.asClassName(o.Codicon.debugDisconnect)),this._connectionProfile=V,this._connectionManagementService=W}async run(x){if(!this._connectionProfile)return!0;if(this._connectionManagementService.isProfileConnected(this._connectionProfile)){let F=this._connectionProfile;return F&&(F.isDisconnecting=!0),await this._connectionManagementService.disconnect(this._connectionProfile),F&&(F.isDisconnecting=!1),!0}else return!0}};e.DisconnectConnectionAction=w,e.DisconnectConnectionAction=w=fe([O(3,D.IConnectionManagementService)],w);let E=class extends y.Action{static{this.ID="registeredServers.addConnection"}static{this.LABEL=(0,t.localize)(3,null)}constructor(x,F,V){super(x,F,"add-server-action"),this._connectionManagementService=V}async run(x){let F=x===void 0?void 0:{connectionName:void 0,serverName:void 0,databaseName:void 0,userName:void 0,password:void 0,authenticationType:void 0,groupId:void 0,groupFullName:x.fullName,savePassword:void 0,getOptionsKey:void 0,matches:void 0,providerName:"",options:{},saveProfile:!0,id:x.id};await this._connectionManagementService.showConnectionDialog(void 0,{showDashboard:!0,saveTheConnection:!0,showConnectionDialogOnError:!0,showFirewallRuleOnError:!0},F)}};e.AddServerAction1=E,e.AddServerAction1=E=fe([O(2,D.IConnectionManagementService)],E);class C extends c.Action2{static{this.ID="registeredServers.addConnection"}static{this.LABEL_ORG="New Connection"}static{this.LABEL=(0,t.localize)(4,null)}constructor(){super({id:C.ID,icon:{light:l.FileAccess.asBrowserUri("sql/workbench/services/connection/browser/media/add_server.svg"),dark:l.FileAccess.asBrowserUri("sql/workbench/services/connection/browser/media/add_server_inverse.svg")},title:{value:C.LABEL,original:C.LABEL_ORG},f1:!0})}async run(x,F){const V=x.get(D.IConnectionManagementService);let W=F===void 0?void 0:{connectionName:void 0,serverName:void 0,databaseName:void 0,userName:void 0,password:void 0,authenticationType:void 0,groupId:void 0,groupFullName:F.fullName,savePassword:void 0,getOptionsKey:void 0,matches:void 0,providerName:"",options:{},saveProfile:!0,id:F.id};await V.showConnectionDialog(void 0,{showDashboard:!0,saveTheConnection:!0,showConnectionDialogOnError:!0,showFirewallRuleOnError:!0},W)}}e.AddServerAction=C;class I extends c.Action2{static{this.ID="registeredServers.addServerGroup"}static{this.LABEL_ORG="New Server Group"}static{this.LABEL=(0,t.localize)(5,null)}constructor(){super({id:I.ID,icon:{light:l.FileAccess.asBrowserUri("sql/workbench/contrib/objectExplorer/browser/media/new_servergroup.svg"),dark:l.FileAccess.asBrowserUri("sql/workbench/contrib/objectExplorer/browser/media/new_servergroup_inverse.svg")},title:{value:I.LABEL,original:I.LABEL_ORG},f1:!0})}async run(x){return x.get(a.IServerGroupController).showCreateGroupDialog()}}e.AddServerGroupAction=I;let _=class extends y.Action{static{this.ID="registeredServers.editServerGroup"}static{this.LABEL=(0,t.localize)(6,null)}constructor(x,F,V,W){super(x,F,p.ThemeIcon.asClassName(o.Codicon.edit)),this._group=V,this.serverGroupController=W}run(){return this.serverGroupController.showEditGroupDialog(this._group)}};e.EditServerGroupAction=_,e.EditServerGroupAction=_=fe([O(3,a.IServerGroupController)],_);class A extends c.Action2{static{this.ID="registeredServers.recentConnections"}static{this.SHOW_ACTIVE_CONNECTIONS_LABEL_ORG="Show Active Connections"}static{this.SHOW_ACTIVE_CONNECTIONS_LABEL=(0,t.localize)(7,null)}static{this.SHOW_ALL_CONNECTIONS_LABEL_ORG="Show All Connections"}static{this.SHOW_ALL_CONNECTIONS_LABEL=(0,t.localize)(8,null)}static{this.ACTIVE="active"}constructor(){super({id:A.ID,icon:{light:l.FileAccess.asBrowserUri("sql/workbench/contrib/objectExplorer/browser/media/connected_active_server.svg"),dark:l.FileAccess.asBrowserUri("sql/workbench/contrib/objectExplorer/browser/media/connected_active_server_inverse.svg")},title:{value:A.SHOW_ACTIVE_CONNECTIONS_LABEL_ORG,original:A.SHOW_ACTIVE_CONNECTIONS_LABEL_ORG},f1:!0})}async run(x){const V=x.get(f.IObjectExplorerService).getServerTreeView();V.view!=="active"?V.showFilteredTree("active"):await V.refreshTree()}}e.ActiveConnectionsFilterAction=A;let k=class extends y.Action{static{this.ID="registeredServers.deleteConnection"}static{this.DELETE_CONNECTION_LABEL=(0,t.localize)(9,null)}static{this.DELETE_CONNECTION_GROUP_LABEL=(0,t.localize)(10,null)}constructor(x,F,V,W,z){if(super(x,F,p.ThemeIcon.asClassName(o.Codicon.trash)),this.element=V,this._connectionManagementService=W,this._dialogService=z,V instanceof T.ConnectionProfileGroup&&V.id===h.UNSAVED_GROUP_ID&&(this.enabled=!1),V instanceof b.ConnectionProfile){let B=V.parent;B&&B.id===h.UNSAVED_GROUP_ID&&(this.enabled=!1)}}async run(){if(this.element instanceof b.ConnectionProfile){const x=this.element.connectionName||this.element.serverName;(await this._dialogService.confirm({type:m.default.Warning,message:(0,t.localize)(11,null,x)})).confirmed&&(await this._connectionManagementService.deleteConnection(this.element),(0,d.status)((0,t.localize)(12,null,x)))}else this.element instanceof T.ConnectionProfileGroup&&(await this._dialogService.confirm({type:m.default.Warning,message:(0,t.localize)(13,null,this.element.name)})).confirmed&&(await this._connectionManagementService.deleteConnectionGroup(this.element),(0,d.status)((0,t.localize)(14,null,this.element.name)))}};e.DeleteConnectionAction=k,e.DeleteConnectionAction=k=fe([O(3,D.IConnectionManagementService),O(4,s.IDialogService)],k);let L=class extends y.Action{static{this.ID="objectExplorer.filterChildren"}static{this.LABEL=(0,t.localize)(15,null)}constructor(x,F,V,W){super(x,F,R(V)),this._node=V,this._objectExplorerService=W}async run(){await this._objectExplorerService.getServerTreeView().filterElementChildren(this._node),this.class=R(this._node)}};e.FilterChildrenAction=L,e.FilterChildrenAction=L=fe([O(3,f.IObjectExplorerService)],L);function R(P){return P.filters.length>0?p.ThemeIcon.asClassName(o.Codicon.filterFilled):p.ThemeIcon.asClassName(o.Codicon.filter)}let M=class extends y.Action{static{this.ID="objectExplorer.removeFilter"}static{this.LABEL=(0,t.localize)(16,null)}constructor(x,F,V,W,z,B,K){super(x,F,"remove-filter-action"),this._node=V,this._tree=W,this._profile=z,this._objectExplorerService=B,this._telemetryService=K}async run(){let x=this._node,F=this._node;this._profile&&(x=this._objectExplorerService.getObjectExplorerNode(this._profile),F=this._profile),x.filters=[],F instanceof v.TreeNode&&(F.forceRefresh=!0),this._tree instanceof i.AsyncServerTree?(await this._tree.rerender(F),await this._tree.updateChildren(F),await this._tree.expand(F)):(await this._tree.refresh(F),await this._tree.expand(F)),this._telemetryService.createActionEvent("ObjectExplorer","ObjectExplorerRemoveFilter").withAdditionalProperties({objectType:x.objectType}).send()}};e.RemoveFilterAction=M,e.RemoveFilterAction=M=fe([O(5,f.IObjectExplorerService),O(6,u.IAdsTelemetryService)],M);let N=class extends y.Action{static{this.ID="registeredServers.clearRecentConnections"}static{this.LABEL=(0,t.localize)(17,null)}constructor(x,F,V,W){super(x,F,p.ThemeIcon.asClassName(o.Codicon.trash)),this._connectionProfile=V,this._connectionManagementService=W}async run(){this._connectionProfile&&this._connectionManagementService.clearRecentConnection(this._connectionProfile)}};e.DeleteRecentConnectionsAction=N,e.DeleteRecentConnectionsAction=N=fe([O(3,D.IConnectionManagementService)],N)}),define(Q[3358],Y([1,0,708,33,2162]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=()=>` <div class="welcomePageContainer"> <div class="welcomePage"> <div class="ads-homepage splash"> <div class="gradient"> <div class="content-container"> <div class="ads-homepage-section section header hero"> <div class="row start"> <div class="header-top-nav"> <div class="flex"> <div class="caption-container" style="display: flex;"> <div class="icon"></div> <div class="flex flex-d-column title"> <h1 class="caption flex flex-w-wrap"></h1> <div> <div id="welcome-page-button-container" class="flex btn-container"></div> </div> </div> </div> </div> </div> </div> <div class="row" id="retirement-announcement-container"> <div class="retirement-banner"> <p> ${(0,y.escape)((0,b.localize)(0,null))} <a class="link" href="https://aka.ms/ads-retirement"> ${(0,y.escape)((0,b.localize)(1,null))} <span class="icon-link themed-icon-alt"></span> </a> </p> </div> </div> <div class="row header-bottom-nav-tiles ads-grid"> <div class="col"> <a role="button" class="header-bottom-nav-tile-link ads-welcome-page-link" href="command:${t.AddServerAction.ID}"> <div class="header-bottom-nav-tile tile tile-connection"> <h3>${(0,y.escape)((0,b.localize)(2,null))}</h3> <p>${(0,y.escape)((0,b.localize)(3,null))}</p> <div class="icon connection"></div> </div> </a> </div> <div class="col"> <a role="button" class="header-bottom-nav-tile-link ads-welcome-page-link" href="command:workbench.action.files.newUntitledFile"> <div class="header-bottom-nav-tile tile tile-query"> <h3>${(0,y.escape)((0,b.localize)(4,null))}</h3> <p>${(0,y.escape)((0,b.localize)(5,null))}</p> <div class="icon query"></div> </div> </a> </div> <div class="col"> <a role="button" class="header-bottom-nav-tile-link ads-welcome-page-link" href="command:notebook.command.new"> <div class="header-bottom-nav-tile tile tile-notebook"> <h3>${(0,y.escape)((0,b.localize)(6,null))}</h3> <p>${(0,y.escape)((0,b.localize)(7,null))}</p> <div class="icon notebook"></div> </div> </a> </div> <div class="col"> <a role="button" class="header-bottom-nav-tile-link ads-welcome-page-link" href="command:azdata.resource.deploy"> <div class="header-bottom-nav-tile tile tile-server"> <h3>${(0,y.escape)((0,b.localize)(8,null))}</h3> <p>${(0,y.escape)((0,b.localize)(9,null))}</p> <div class="icon server"></div> </div> </a> </div> </div> </div> </div> </div> <div class="ads-homepage-section middle-section content row content-container"> <div class="resources-container"> <h2>${(0,y.escape)((0,b.localize)(10,null))}</h2> <div class="tabs"> <!-- Radio button is not accessible to user yet, this feature is still in development --> <input tabindex="-1" aria-hidden="true" class="input" name="tabs" type="radio" id="tab-1" checked="checked" /> <span id="historyLabel" class="label" for="tab-1" tabIndex="0" role="tab">${(0,y.escape)((0,b.localize)(11,null))}</span> <div class="panel"> <div class="recent history"> <div class="flex list-header-container"> <i class="icon-document themed-icon"></i> <span class="list-header">${(0,y.escape)((0,b.localize)(12,null))}</span> <span class="list-header-last-opened">${(0,y.escape)((0,b.localize)(13,null))}</span> </div> <ul class="list"> <!-- Filled programmatically --> </ul> <p class="none detail">No recent folders</p> <div class="moreRecent"> <a role="button" class="ads-welcome-page-link" href="command:workbench.action.openRecent">${(0,y.escape)((0,b.localize)(14,null))} <i class="icon-arrow-down-dark"></i> </a> </div> </div> </div> </div> <p class="showOnStartup"><input type="checkbox" id="showOnStartup" class="checkbox"> <label for="showOnStartup">${(0,y.escape)((0,b.localize)(15,null))}</label> </p> </div> <div class="getting-started-container"> <div class="links"> <h2>${(0,y.escape)((0,b.localize)(16,null))}</h2> <div class="link-header"> <a class="link ads-welcome-page-link" href="https://aka.ms/get-started-azdata"> ${(0,y.escape)((0,b.localize)(17,null))}<span class="icon-link themed-icon-alt"></span> </a> </div> <p> ${(0,y.escape)((0,b.localize)(18,null))} </p> <div class="link-header"> <a class="link ads-welcome-page-link" href="command:workbench.action.openDocumentationUrl"> ${(0,y.escape)((0,b.localize)(19,null))}<span class="icon-link themed-icon-alt"></span> </a> </div> <p> ${(0,y.escape)((0,b.localize)(20,null))} </p> <div class="videos-container row"> <h2>${(0,y.escape)((0,b.localize)(21,null))}</h2> <div class="flex flex-container-video"> <div class="videos-container-video"> <a href="https://www.youtube.com/watch?v=Orv7fptVoUA" class="video overview ads-welcome-page-link"> <img src="${q.toUrl("./../media/video_overview.png")}" class="video-overview" id="video-overview" /> <h4>${(0,y.escape)((0,b.localize)(22,null))}</h4> </a> </div> <div class="videos-container-video"> <a href="https://www.youtube.com/watch?v=Nt4kIHQ0IOc" class="video overview ads-welcome-page-link"> <img src="${q.toUrl("./../media/video_introduction.png")}" class="video-introduction" id="video-introduction" /> <h4>${(0,y.escape)((0,b.localize)(23,null))}</h4> </a> </div> </div> </div> </div> </div> </div> <div class="ads-homepage-section content extensions content-container"> <div class="flex flex-j-between"> <h2>${(0,y.escape)((0,b.localize)(24,null))}</h2> <a role="button" class="link-show-all flex ads-welcome-page-link" href="command:workbench.view.extensions"> ${(0,y.escape)((0,b.localize)(25,null))}<span class="icon-arrow-right"></span> </a> </div> <div class="row ads-grid grip-gap-50"> <div class="ads-grid tile no-hover extension-pack"> <div class="extension-pack-description"> <h3 class="extension-pack-header"></h3> <p class="extension-pack-body"></p> </div> <div class="extension-pack-extensions flex flex-d-column flex-j-evenly flex-a-start"> <div class="extension-pack-extension-list flex flex-d-column flex-j-evenly flex-a-start"></div> <div class="flex flex-j-end extension-pack-btn-container flex flex-j-between flex-a-center"> <div class="extensionPack"></div> <a role="button" class="a-self-end link-learn-more flex flex-a-center ads-welcome-page-link" href="command:azdata.extension.open?%7B%22id%22%3A%22microsoft.admin-pack%22%7D"> ${(0,y.escape)((0,b.localize)(26,null))}<span class="icon-arrow-right"></span> </a> </div> </div> </div> <div class="extension-list flex flex-d-column"> <!-- Dynamically populated --> </div> </div> <br /><br /><br /> </div> </div> </div> </div> `}),define(Q[289],Y([1,0,194,298,4,15,351,2235]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeUpdateUtils=void 0;class v{static{this.isInDragAndDrop=!1}static async structuralTreeUpdate(S,h,a,r){let i=S,s,o=[];if(S&&!(S instanceof T.AsyncServerTree)){let c=S.getSelection();c&&c.length===1&&(s=c[0]),o=i.getExpandedElements()}let u,d=new t.ConnectionProfileGroup("root",void 0,void 0);h==="recent"?(u=a.getRecentConnections(r),d.addConnections(u)):h==="active"?(u=a.getActiveConnections(r),d.addConnections(u)):h==="saved"&&(d=v.getTreeInput(a,r));const p=S.getInput();d&&await S.setInput(d),p instanceof b.Disposable&&p.dispose(),S&&!(S instanceof T.AsyncServerTree)&&(o&&await S.expandAll(o),s&&S.select(s))}static async registeredServerUpdate(S,h,a){if(S instanceof T.AsyncServerTree){const r=v.getTreeInput(h);r&&await S.setInput(r),S.rerender()}else{let r=S,i=a,s;if(S){S.domFocus();let o=S.getSelection();i||o&&o.length===1&&(i=o[0]),s=r.getExpandedElements(),i&&s.indexOf(i)===-1&&s.push(i);let u=v.getTreeInput(h);if(u){const d=S.getInput();if(u!==d)return S.setInput(u).then(async()=>{d&&(0,b.isDisposable)(d)&&d.dispose(),s&&await S.expandAll(s),i&&S.setFocus(i),S.getFocus()},D.onUnexpectedError)}}}}static getTreeInput(S,h){return S.getConnectionGroups(h).find(r=>r.isRoot)}static hasObjectExplorerNode(S,h){return h.isConnected(void 0,S)}static async connectIfNotConnected(S,h,a,r){try{if(a.isProfileConnected(S)){let i=a.findExistingConnection(S);return h&&h.showDashboard&&await a.showDashboard(S),i}else{if(a.isProfileConnecting(S))return;{let i;if(r instanceof T.AsyncServerTree)i={onConnectStart:()=>{},onConnectReject:()=>{},onConnectSuccess:()=>{},onDisconnect:()=>{},onConnectCanceled:()=>{}};else if(r){r.addTraits("loading",[S]);let o=()=>{r.collapse(S),r.removeTraits("loading",[S])};i={onConnectStart:()=>{},onConnectReject:o,onConnectSuccess:()=>r.removeTraits("loading",[S]),onDisconnect:()=>{},onConnectCanceled:o}}const s=await a.connect(S,void 0,h,i);if(s?.connected)return a.findExistingConnection(S);throw new Error(s?s.errorMessage:(0,f.localize)(0,null))}}}catch(i){throw new T.ConnectionError((0,D.getErrorMessage)(i),S)}}static async connectAndCreateOeSession(S,h,a,r,i,s){const o=await v.connectIfNotConnected(S,h,a,i);return o?(o.options.groupId=S.groupId,o.options.databaseDisplayName=S.databaseName,r.getObjectExplorerNode(o)?!1:(await r.updateObjectExplorerNodes(o,s),!0)):!1}static async getConnectionNodeChildren(S,h){if(S.isDisconnecting)return[];{let a=h.getObjectExplorerNode(S);const r=a?.getSession();if(a&&r)try{return await h.resolveTreeNodeChildren(r,a),a.children??[]}catch(i){return(0,D.onUnexpectedError)(i),[]}else return[]}}static async getAsyncConnectionNodeChildren(S,h,a,r){if(S.isDisconnecting)return[];{let i=a.getObjectExplorerNode(S);const s=i?.getSession();if(i&&s)return await a.resolveTreeNodeChildren(s,i),i.children??[];{const o={params:void 0,saveTheConnection:!0,showConnectionDialogOnError:!0,showFirewallRuleOnError:!0,showDashboard:!1},u=new Promise((c,l)=>{const n=()=>{g.dispose()},g=a.onUpdateObjectExplorerNodes(w=>{w.connection&&w.connection.id===S.id&&(w.errorMessage?l(new Error(w.errorMessage)):c(),n())})});await v.connectAndCreateOeSession(S,o,h,a,void 0),await u;let d=a.getObjectExplorerNode(S);const p=d?.getSession();return d&&p&&await a.resolveTreeNodeChildren(p,d),d?.children??[]}}}static getObjectExplorerParent(S,h){if(S&&S.parent){if(S.parent.parent)return S.parent;{const a=S.getConnectionProfile()?.id,r=v.getTreeInput(h);if(r)return t.ConnectionProfileGroup.getConnectionsInGroup(r).find(i=>a===i.id)}}}static isDatabaseNode(S){return S&&S.nodeTypeId===y.NodeType.Database}static isAvailableDatabaseNode(S){return S&&S.nodeTypeId===y.NodeType.Database&&S.nodeStatus!=="Unavailable"}static getConnectionProfile(S){let h=S.getConnectionProfile(),a=S.getDatabaseName();return a!==void 0&&h?.databaseName!==a&&(h=h?.cloneWithDatabase(a)),h}}e.TreeUpdateUtils=v}),define(Q[413],Y([1,0,55,34,2105,23,199,58,107,106,502,205,15,271,172,289,130,9,505,10,6,5,76,43,777,22,143,28,372,13,101]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k){"use strict";var L,R,M,N;Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookFindPreviousAction=e.NotebookFindNextAction=e.NewNotebookAction=e.NewNotebookTask=e.AttachToDropdown=e.KernelsDropdown=e.noKernelName=e.RunParametersAction=e.CollapseCellsAction=e.RunAllCellsAction=e.TrustedAction=e.CreateNotebookViewAction=e.NotebookViewAction=e.DashboardViewAction=e.NotebookViewsActionProvider=e.ToggleableAction=e.ClearAllOutputsAction=e.TooltipFromLabelAction=e.AddCodeCellAction=e.AddTextCellAction=e.AddCellAction=e.untitledNotSupported=e.noParametersInCell=e.noParameterCell=e.kernelNotSupported=e.noKernel=e.msgChanging=void 0;const P=(0,b.localize)(0,null);e.msgChanging=(0,b.localize)(1,null);const x=(0,b.localize)(2,null),F=(0,b.localize)(3,null),V=(0,b.localize)(4,null),W=(0,b.localize)(5,null),z=(0,b.localize)(6,null),B=(0,b.localize)(7,null);e.noKernel=(0,b.localize)(8,null);const K="codicon",H="masked-icon";e.kernelNotSupported=(0,b.localize)(9,null),e.noParameterCell=(0,b.localize)(10,null),e.noParametersInCell=(0,b.localize)(11,null),e.untitledNotSupported=(0,b.localize)(12,null);let U=class extends y.Action{constructor(Re,Le,Pe,Ae){super(Re,Le,Pe),this._notebookService=Ae}async run(Re){let Le=0;if(Re instanceof d.CellContext){if(Re?.model?.cells){let Pe=Re.model.activeCell.id;Pe&&(Le=Re.model.cells.findIndex(Ae=>Ae.id===Pe)+1)}Re?.model&&(Re.model.addCell(this.cellType,Le,Re.cell.metadata?.language),Re.model.sendNotebookTelemetryActionEvent("AddCell",{cell_type:this.cellType}))}else{const Pe=this._notebookService.findNotebookEditor(Re);if(Pe.cells){let Ae=Pe.cells.findIndex(Me=>Me.active);Le=Ae!==-1?Ae+1:Pe.cells.length}Pe.addCell(this.cellType,Le),Pe.model.sendNotebookTelemetryActionEvent("AddCell",{cell_type:this.cellType})}}};e.AddCellAction=U,e.AddCellAction=U=fe([O(3,o.INotebookService)],U);let G=class extends U{constructor(Re){super("notebook.AddTextCell",(0,b.localize)(13,null),"masked-pseudo markdown",Re),this.cellType="markdown"}};e.AddTextCellAction=G,e.AddTextCellAction=G=fe([O(0,o.INotebookService)],G);let $=class extends U{constructor(Re){super("notebook.AddCodeCell",(0,b.localize)(14,null),"masked-pseudo code",Re),this.cellType="code"}};e.AddCodeCellAction=$,e.AddCodeCellAction=$=fe([O(0,o.INotebookService)],$);class ie extends y.Action{constructor(Re,Le){super(Re,""),this.state=Le,this.updateLabelAndIcon()}updateLabelAndIcon(){this.state.shouldToggleTooltip?this.tooltip=this.state.label:this.label=this.state.label;let Re=this.state.baseClass?`${this.state.baseClass} ${this.state.iconClass} `:"";this.state.shouldToggleTooltip&&(Re+=this.state.maskedIconClass),this.class=Re}}e.TooltipFromLabelAction=ie;let J=class extends ie{static{L=this}static{this.label=(0,b.localize)(15,null)}static{this.iconClass="icon-clear-results"}constructor(Re,Le,Pe){super(Re,{label:L.label,baseClass:K,iconClass:L.iconClass,maskedIconClass:H,shouldToggleTooltip:Le}),this._notebookService=Pe}async run(Re){await this._notebookService.findNotebookEditor(Re).clearAllOutputs()}};e.ClearAllOutputsAction=J,e.ClearAllOutputsAction=J=L=fe([O(2,o.INotebookService)],J);class j extends y.Action{constructor(Re,Le){super(Re,""),this.state=Le,this.updateLabelAndIcon()}updateLabelAndIcon(){this.state.shouldToggleTooltip?this.tooltip=this.state.isOn?this.state.toggleOnLabel:this.state.toggleOffLabel:this.label=this.state.isOn?this.state.toggleOnLabel:this.state.toggleOffLabel;let Re="";this.state.shouldToggleTooltip&&this.state.maskedIconClass?Re=this.state.baseClass?`${this.state.baseClass} ${this.state.maskedIconClass} `:"":Re=this.state.baseClass?`${this.state.baseClass} `:"",Re+=this.state.isOn?this.state.toggleOnClass:this.state.toggleOffClass,this.class=Re}toggle(Re){this.state.isOn=Re,this.updateLabelAndIcon()}}e.ToggleableAction=j;let ee=class{constructor(Re,Le,Pe,Ae,Me,Oe){this._notebookService=Ae,this._notificationService=Me,this.instantiationService=Oe,this._options=[],this._optionsUpdated=new c.Emitter,Pe?.then(De=>{this.views=Le,this.viewMode=De.viewMode,this.updateView()}).catch(De=>{this._notificationService.error((0,a.getErrorMessage)(De))})}getActions(){return this._options}get options(){return this._options}updateView(){const Re=this.instantiationService.createInstance(te,"notebookView.backToNotebook",(0,b.localize)(16,null),"notebook-button"),Le=this.instantiationService.createInstance(Z,"notebookView.newView",(0,b.localize)(17,null),"notebook-button notebook-button-newview"),Pe=this.views.getViews();this._options=[],this._options.push(Re),this._options.push(Le),Pe.length&&this._options.push(this.instantiationService.createInstance(y.Separator)),Pe.forEach(Ae=>{const Me=new X(Ae.guid,Ae.name,"button",this._notebookService,this._notificationService);this._options.push(Me),this.viewMode===r.ViewMode.Views&&this.views.getActiveView()===Ae&&(Me.checked=!0,Me.enabled=!1)}),this.viewMode===r.ViewMode.Notebook&&(Re.checked=!0,Re.enabled=!1),this._optionsUpdated.fire(!0)}get onUpdated(){return this._optionsUpdated.event}optionSelected(Re){const Le=this.views.getViews().find(Pe=>Pe.name===Re);this.views.setActiveView(Le)}};e.NotebookViewsActionProvider=ee,e.NotebookViewsActionProvider=ee=fe([O(3,o.INotebookService),O(4,D.INotificationService),O(5,l.IInstantiationService)],ee);let X=class extends y.Action{constructor(Re,Le,Pe,Ae,Me){super(Re,Le,Pe),this._notebookService=Ae,this._notificationService=Me}async run(Re){if(Re){const Le=this._notebookService.findNotebookEditor(Re);let Pe=Le.views;const Ae=Pe.getViews().find(Me=>Me.guid===this.id);Ae?(Pe.setActiveView(Ae),Le.model.viewMode=r.ViewMode.Views):this._notificationService.error((0,b.localize)(18,null,this.id))}}};e.DashboardViewAction=X,e.DashboardViewAction=X=fe([O(3,o.INotebookService),O(4,D.INotificationService)],X);let te=class extends y.Action{constructor(Re,Le,Pe,Ae){super(Re,Le,Pe),this._notebookService=Ae}async run(Re){const Le=this._notebookService.findNotebookEditor(Re);Le.model.viewMode=r.ViewMode.Notebook}};e.NotebookViewAction=te,e.NotebookViewAction=te=fe([O(3,o.INotebookService)],te);let Z=class extends y.Action{constructor(Re,Le,Pe,Ae){super(Re,Le,Pe),this._notebookService=Ae}async run(Re){if(Re){const Le=this._notebookService.findNotebookEditor(Re),Pe=Le.views,Ae=Pe.createNewView();Pe.setActiveView(Ae),Le.model.viewMode=r.ViewMode.Views,Le.model.serializationStateChanged(h.NotebookChangeType.MetadataChanged)}}};e.CreateNotebookViewAction=Z,e.CreateNotebookViewAction=Z=fe([O(3,o.INotebookService)],Z);let se=class extends j{static{R=this}static{this.trustedLabel=(0,b.localize)(19,null)}static{this.notTrustedLabel=(0,b.localize)(20,null)}static{this.previewTrustedCssClass="icon-shield"}static{this.trustedCssClass="icon-trusted"}static{this.previewNotTrustedCssClass="icon-shield-x"}static{this.notTrustedCssClass="icon-notTrusted"}constructor(Re,Le,Pe){super(Re,{baseClass:K,toggleOnLabel:R.trustedLabel,toggleOnClass:Le===!0?R.previewTrustedCssClass:R.trustedCssClass,toggleOffLabel:R.notTrustedLabel,toggleOffClass:Le===!0?R.previewNotTrustedCssClass:R.notTrustedCssClass,maskedIconClass:H,shouldToggleTooltip:Le,isOn:!1}),this._notebookService=Pe}get trusted(){return this.state.isOn}set trusted(Re){this.toggle(Re)}async run(Re){const Le=this._notebookService.findNotebookEditor(Re);this.trusted=!this.trusted,Le.model.sendNotebookTelemetryActionEvent("TrustChanged",{trust:this.trusted}),Le.model.trustedMode=this.trusted}};e.TrustedAction=se,e.TrustedAction=se=R=fe([O(2,o.INotebookService)],se);let re=class extends y.Action{constructor(Re,Le,Pe,Ae,Me){super(Re,Le,Pe),this.notificationService=Ae,this._notebookService=Me}async run(Re){try{const Le=this._notebookService.findNotebookEditor(Re);Le.model.sendNotebookTelemetryActionEvent("RunNotebook"),await Le.runAllCells()}catch(Le){this.notificationService.error((0,a.getErrorMessage)(Le))}}};e.RunAllCellsAction=re,e.RunAllCellsAction=re=fe([O(3,D.INotificationService),O(4,o.INotebookService)],re);let oe=class extends j{static{M=this}static{this.collapseCells=(0,b.localize)(21,null)}static{this.expandCells=(0,b.localize)(22,null)}static{this.previewCollapseCssClass="icon-collapse-cells"}static{this.collapseCssClass="icon-hide-cells"}static{this.previewExpandCssClass="icon-expand-cells"}static{this.expandCssClass="icon-show-cells"}constructor(Re,Le,Pe){super(Re,{baseClass:K,toggleOnLabel:M.expandCells,toggleOnClass:Le===!0?M.previewExpandCssClass:M.expandCssClass,toggleOffLabel:M.collapseCells,toggleOffClass:Le===!0?M.previewCollapseCssClass:M.collapseCssClass,maskedIconClass:H,shouldToggleTooltip:Le,isOn:!1}),this._notebookService=Pe,this.expanded=!0}get isCollapsed(){return this.state.isOn}setCollapsed(Re){this.toggle(Re),this.expanded=!Re}async run(Re){const Le=this._notebookService.findNotebookEditor(Re);this.setCollapsed(!this.isCollapsed),Le.cells.forEach(Pe=>{Pe.isCollapsed=this.isCollapsed})}};e.CollapseCellsAction=oe,e.CollapseCellsAction=oe=M=fe([O(2,o.INotebookService)],oe);let le=class extends ie{static{N=this}static{this.label=(0,b.localize)(23,null)}static{this.iconClass="icon-run-with-parameters"}constructor(Re,Le,Pe,Ae,Me,Oe){super(Re,{label:N.label,baseClass:K,iconClass:N.iconClass,maskedIconClass:H,shouldToggleTooltip:Le}),this.quickInputService=Ae,this._notebookService=Me,this.notificationService=Oe}async run(Re){if(Re.scheme===E.Schemas.untitled){this.notificationService.notify({severity:D.Severity.Info,message:e.untitledNotSupported});return}const Le=this._notebookService.findNotebookEditor(Re);if(![w.KernelsLanguage.Python,w.KernelsLanguage.PowerShell].includes(Le.model.languageInfo.name)){this.notificationService.notify({severity:D.Severity.Info,message:e.kernelNotSupported});return}Le.model.sendNotebookTelemetryActionEvent("RunWithParameters",{kernel:Le.model.languageInfo.name});let Ae=new Map;for(let De of Le?.cells)if(De.isParameter){if((typeof De.source=="string"?[De.source]:De.source).every(me=>/^\s*$/.test(me))){this.notificationService.notify({severity:D.Severity.Info,message:e.noParametersInCell});return}for(let me of De.source)if(me.includes("=")){let ke=me.split("=",2);Ae.set(ke[0].trim(),ke[1].trim())}}let Me=new Map,Oe=new URLSearchParams;if(Ae.size===0){this.notificationService.notify({severity:D.Severity.Info,message:e.noParameterCell});return}else{for(let Ce of Ae.keys()){let _e=await this.quickInputService.input({prompt:Ce,value:Ae.get(Ce),ignoreFocusLost:!0});if(_e===void 0)return;Me.set(Ce,_e)}for(let Ce of Me.keys())Me.get(Ce)!==Ae.get(Ce)&&(Me.get(Ce)===""?Oe.append(Ce,"''"):Oe.append(Ce,Me.get(Ce)));let De=unescape(Oe.toString());return Re=Re.with({query:De}),this.openParameterizedNotebook(Re)}}async openParameterizedNotebook(Re){let Pe=this._notebookService.findNotebookEditor(Re).model.toJSON();Pe.cells.forEach(Oe=>{Oe.outputs=[]});let Ae=this._notebookService.getUntitledUriPath(t.basename(Re.fsPath)),Me=Re.with({authority:"",scheme:"untitled",path:Ae});this._notebookService.openNotebook(Me,{initialContent:JSON.stringify(Pe),preserveFocus:!0})}};e.RunParametersAction=le,e.RunParametersAction=le=N=fe([O(3,g.IQuickInputService),O(4,o.INotebookService),O(5,D.INotificationService)],le);const ne="notebook.showAllKernels",ce="workbench.enablePreviewFeatures";e.noKernelName=(0,b.localize)(24,null);const ae="kernel-dropdown";let ue=class extends T.SelectBox{constructor(Re,Le,Pe,Ae){super([P],P,k.defaultSelectBoxStyles,Le,Re,{labelText:F,labelOnTop:!1,ariaLabel:F,id:ae}),this._configurationService=Ae,this._showAllKernels=!1,Pe&&Pe.then(Me=>this.updateModel(Me)).catch(Me=>{}),this.onDidSelect(Me=>this.doChangeKernel(Me.selected)),this.getAllKernelConfigValue(),this._register(this._configurationService.onDidChangeConfiguration(Me=>{(Me.affectsConfiguration(ne)||Me.affectsConfiguration(ce))&&this.getAllKernelConfigValue()}))}updateModel(Re){this.model=Re,this._register(this.model.kernelChanged(Pe=>{this.updateKernel(Pe.newValue,Pe.nbKernelAlias)})),this._register(this.model.kernelsAdded(Pe=>{this.updateKernel(Pe)}));let Le=this.model.clientSession&&this.model.clientSession.kernel;this.updateKernel(Le)}updateKernel(Re,Le){let Pe=this._showAllKernels?[...new Set(this.model.specs.kernels.map(Ae=>Ae.display_name).concat(this.model.standardKernelsDisplayName()))]:this.model.standardKernelsDisplayName();if(this.model.kernelAliases?.length)for(let Ae in this.model.kernelAliases)Pe.splice(1,0,this.model.kernelAliases[Ae]);if(Re&&Re.isReady){let Ae=this.model.getStandardKernelFromName(Re.name);if(Pe){let Me;if(Ae)Me=Pe.findIndex(Oe=>Oe===Ae.displayName);else{let Oe=this.model.specs.kernels.find(De=>De.name===Re.name);Me=Pe.findIndex(De=>De===Oe?.display_name)}Le&&(Me=Pe.indexOf(Le)),Me<0&&(Me=0),this.setOptions(Pe,Me),this.model.selectedKernelDisplayName=Pe[Me]}}else this.model.clientSession?.isInErrorState&&(Pe.unshift(e.noKernelName),this.setOptions(Pe,0))}doChangeKernel(Re){this.setOptions([e.msgChanging],0),this.model.changeKernel(Re)}getAllKernelConfigValue(){this._showAllKernels=!!this._configurationService.getValue(ne)&&!!this._configurationService.getValue(ce)}};e.KernelsDropdown=ue,e.KernelsDropdown=ue=fe([O(3,u.IConfigurationService)],ue);const de="attach-to-dropdown",ge="notebook.saveConnectionName";let he=class extends T.SelectBox{constructor(Re,Le,Pe,Ae,Me,Oe,De,Ce){super([V],V,k.defaultSelectBoxStyles,Le,Re,{labelText:x,labelOnTop:!1,ariaLabel:x,id:de}),this._connectionManagementService=Ae,this._connectionDialogService=Me,this._notificationService=Oe,this._capabilitiesService=De,this._configurationService=Ce,Pe&&Pe.then(_e=>{this.updateModel(_e),this._register(_e.onValidConnectionSelected(me=>{this.handleContextsChanged(!me)}))}).catch(_e=>{}),this.onDidSelect(_e=>{this.doChangeContext()})}updateModel(Re){this.model=Re,this._register(Re.contextsChanged(()=>{this.handleContextsChanged()})),this._register(this.model.contextsLoading(()=>{this.setOptions([V],0)})),this.model.requestConnectionHandler=()=>this.openConnectionDialog(!0),this.handleContextsChanged()}handleContextsChanged(Re){let Le=this.getKernelDisplayName();Le?this.loadAttachToDropdown(this.model,Le,Re):this.model.clientSession?.isInErrorState&&this.setOptions([(0,b.localize)(25,null)],0)}getKernelDisplayName(){let Re;if(this.model.clientSession&&this.model.clientSession.kernel&&this.model.clientSession.kernel.name){let Le=this.model.clientSession.kernel.name.toLowerCase(),Pe=this.model.specs.kernels.find(Ae=>Ae.name&&Ae.name.toLowerCase()===Le);Pe&&(this.model.context?.serverCapabilities.notebookKernelAlias&&this.model.currentKernelAlias===this.model.context?.serverCapabilities.notebookKernelAlias||this.model.kernelAliases.includes(this.model.selectedKernelDisplayName)&&this.model.selectedKernelDisplayName?Re=this.model.context?.serverCapabilities.notebookKernelAlias||this.model.selectedKernelDisplayName:Re=Pe.display_name)}return Re}loadAttachToDropdown(Re,Le,Pe){let Ae=this.model.getApplicableConnectionProviderIds(Le);if(Ae&&Ae.length===0||Le===e.noKernel)this.setOptions([B]);else{let Me=[];Re.context&&Re.context.title&&Ae.includes(this.model.context.providerName)?Me.push(Re.context.title):this._configurationService.getValue(ge)&&Re.savedConnectionName?Me.push(Re.savedConnectionName):Me.push(z),Me.find(Oe=>Oe===W)||Me.push(W),this.setOptions(Me,0),this.enable(),this.model.kernelAliases.includes(Le)&&this.model.selectedKernelDisplayName!==Le&&this.model.changeKernel(Le)}}doChangeContext(Re,Le){this.value===W?this.openConnectionDialog().catch(Pe=>this._notificationService.error((0,a.getErrorMessage)(Pe))):this.value===z||this.model.changeContext(this.value,Re,Le).catch(Pe=>this._notificationService.error((0,a.getErrorMessage)(Pe)))}async openConnectionDialog(Re=!1){try{let Le=this.model.getApplicableConnectionProviderIds(this.model.clientSession.kernel.name);if(!this.model.kernelAliases.includes(this.model.selectedKernelDisplayName)&&this.model.clientSession.kernel.name!=="SQL")Le=Le.concat(this.model.getApplicableConnectionProviderIds(this.model.selectedKernelDisplayName));else for(let _e of this.model.kernelAliases)Le=Le.concat(this.model.getApplicableConnectionProviderIds(_e));let Pe=await this._connectionDialogService.openDialogAndWait(this._connectionManagementService,{connectionType:f.ConnectionType.editor,providers:Le},Re?this.model.connectionProfile:void 0),Ae=this.values;if(!Pe)return this.select(0),!1;let Me=this._connectionManagementService.getConnectionUri(Pe),Oe=new m.ConnectionProfile(this._capabilitiesService,Pe),De=Oe.title?Oe.title:Oe.serverName;if(Ae.some(_e=>_e===De))return this.loadAttachToDropdown(this.model,this.getKernelDisplayName()),this.doChangeContext(),!0;Ae.unshift(De),Ae=Ae.filter(_e=>_e!==z);let Ce=Ae.findIndex(_e=>_e===De);return this.setOptions([]),this.setOptions(Ae),(!Ce||Ce<0||Ce>=Ae.length)&&(Ce=0),this.select(Ce),this.model.addAttachToConnectionsToBeDisposed(Me),this.doChangeContext(Oe),this.model.kernelAliases.includes(Oe.serverCapabilities.notebookKernelAlias)?this.model.changeKernel(Oe.serverCapabilities.notebookKernelAlias):this.model.clientSession.kernel.name==="SQL"&&this.model.changeKernel("SQL"),!0}catch(Le){const Pe={primary:[]};return this._notificationService.notify({severity:D.Severity.Error,message:(0,a.getErrorMessage)(Le),actions:Pe}),!1}}};e.AttachToDropdown=he,e.AttachToDropdown=he=fe([O(3,f.IConnectionManagementService),O(4,S.IConnectionDialogService),O(5,D.INotificationService),O(6,v.ICapabilitiesService),O(7,u.IConfigurationService)],he);async function be(ye,Re,Le,Pe,Ae){ye.createActionEvent("Notebook","NewNotebookWithConnectionProfile").withConnectionInfo(Ae).send();const Me=Le.getValue(C.CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES),Oe=Le.getValue(C.CONFIG_WORKBENCH_USEVSCODENOTEBOOKS);Me&&Oe?await Pe.executeCommand("ipynb.newUntitledIpynb"):await Re.openNotebook(p.URI.from({scheme:"untitled"}),{connectionProfile:Ae})}class ve extends _.Task{static{this.ID="newNotebook"}static{this.LABEL=(0,b.localize)(26,null)}static{this.ICON="notebook"}constructor(){super({id:ve.ID,title:ve.LABEL,iconPath:void 0,iconClass:ve.ICON})}runTask(Re,Le){const Pe=Re.get(n.IAdsTelemetryService),Ae=Re.get(o.INotebookService),Me=Re.get(u.IConfigurationService),Oe=Re.get(I.ICommandService);return be(Pe,Ae,Me,Oe,Le)}}e.NewNotebookTask=ve;class Ie extends A.Action2{static{this.ID="notebook.command.new"}static{this.LABEL_ORG="New Notebook"}static{this.LABEL=(0,b.localize)(27,null)}constructor(){super({id:Ie.ID,icon:{light:E.FileAccess.asBrowserUri("sql/workbench/services/connection/browser/media/light/new_notebook.svg"),dark:E.FileAccess.asBrowserUri("sql/workbench/services/connection/browser/media/dark/new_notebook_inverse.svg")},title:{value:Ie.LABEL,original:Ie.LABEL_ORG},keybinding:{weight:200,primary:812},f1:!0})}async run(Re,Le){const Pe=Re.get(i.IObjectExplorerService),Ae=Re.get(n.IAdsTelemetryService),Me=Re.get(o.INotebookService),Oe=Re.get(u.IConfigurationService),De=Re.get(I.ICommandService);let Ce;if(Le&&Le.nodeInfo){let _e=await Pe.getTreeNode(Le.connectionProfile.id,Le.nodeInfo.nodePath);Ce=s.TreeUpdateUtils.getConnectionProfile(_e).toIConnectionProfile()}else Le&&Le.connectionProfile&&(Ce=Le.connectionProfile);await be(Ae,Me,Oe,De,Ce)}}e.NewNotebookAction=Ie;class Se{constructor(Re){this.notebook=Re,this.id="notebook.findNext",this.label=(0,b.localize)(28,null),this.alias=""}async run(){await this.notebook.findNext()}isSupported(){return!0}}e.NotebookFindNextAction=Se;class we{constructor(Re){this.notebook=Re,this.id="notebook.findPrevious",this.label=(0,b.localize)(29,null),this.alias=""}async run(){await this.notebook.findPrevious()}isSupported(){return!0}}e.NotebookFindPreviousAction=we}),define(Q[1210],Y([1,0,2088,5,23,34,505,205,413,15,63,130,29,271,325,1097]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParametersCellAction=e.CellToggleMoreActionViewItem=e.CellToggleMoreAction=e.ToggleAddCellActionViewItem=e.ToggleAddCellDropdownAction=e.CollapseCellAction=e.RunCellsAction=e.ClearCellOutputAction=e.AddCellFromContextAction=e.ConvertCellAction=e.removeDuplicatedAndStartingSeparators=e.DeleteCellAction=e.MoveCellAction=e.SplitCellAction=e.EditCellAction=void 0;const o=(0,t.localize)(0,null);class u extends v.ToggleableAction{static{this.editLabel=(0,t.localize)(1,null)}static{this.closeLabel=(0,t.localize)(2,null)}static{this.baseClass="codicon"}static{this.editCssClass="edit"}static{this.closeCssClass="close"}static{this.maskedIconClass="masked-icon"}constructor(M,N,P){super(M,{baseClass:u.baseClass,toggleOnLabel:u.closeLabel,toggleOnClass:u.closeCssClass,toggleOffLabel:u.editLabel,toggleOffClass:u.editCssClass,maskedIconClass:u.maskedIconClass,shouldToggleTooltip:N,isOn:P})}get editMode(){return this.state.isOn}set editMode(M){this.toggle(M)}async run(M){this.editMode=!this.editMode,M.cell.isEditMode=this.editMode}}e.EditCellAction=u;let d=class extends T.CellActionBase{constructor(M,N,P,x,F){super(M,N,P,x),this.notebookService=F,this._cssClass=P,this._tooltip=N,this._label=""}doRun(M){let P=M.model.cells.findIndex(x=>x.id===M.cell.id);return M.model?.splitCell(M.cell.cellType,this.notebookService,P,M.cell.metadata?.language),Promise.resolve()}setListener(M){this._register(M.cell.onCurrentEditModeChanged(N=>{this.enabled=N!==r.CellEditModes.WYSIWYG})),this._register(M.cell.notebookModel.onCellTypeChanged(N=>{this.enabled=M.cell.currentMode!==r.CellEditModes.WYSIWYG}))}};e.SplitCellAction=d,e.SplitCellAction=d=fe([O(3,b.INotificationService),O(4,h.INotebookService)],d);let p=class extends T.CellActionBase{constructor(M,N,P,x){super(M,P,void 0,x),this._cssClass=N,this._tooltip=P,this._label=""}doRun(M){let N=this._cssClass.includes("move-down")?r.MoveDirection.Down:r.MoveDirection.Up;try{M.model.moveCell(M.cell,N),M.model.sendNotebookTelemetryActionEvent("MoveCell",{moveDirection:N})}catch(P){let x=(0,m.getErrorMessage)(P);this.notificationService.notify({severity:S.default.Error,message:x})}return Promise.resolve()}};e.MoveCellAction=p,e.MoveCellAction=p=fe([O(3,b.INotificationService)],p);let c=class extends T.CellActionBase{constructor(M,N,P,x){super(M,P,void 0,x),this._cssClass=N,this._tooltip=P,this._label=""}doRun(M){try{M.model.deleteCell(M.cell)}catch(N){let P=(0,m.getErrorMessage)(N);this.notificationService.notify({severity:S.default.Error,message:P})}return Promise.resolve()}};e.DeleteCellAction=c,e.DeleteCellAction=c=fe([O(3,b.INotificationService)],c);function l(R){let M=[];for(let N=0;N<R.length;N++)N>0&&R[N]instanceof D.Separator&&R[N-1]instanceof D.Separator&&M.push(N);if(M.length>0)for(let N=M.length-1;N>=0;N--)R.splice(M[N],1);R[0]instanceof D.Separator&&R.splice(0,1),R[R.length-1]instanceof D.Separator&&R.splice(R.length-1,1)}e.removeDuplicatedAndStartingSeparators=l;let n=class extends T.CellActionBase{constructor(M,N,P){super(M,N,void 0,P)}doRun(M){try{M?.model?.convertCellType(M?.cell)}catch(N){let P=(0,m.getErrorMessage)(N);this.notificationService.notify({severity:S.default.Error,message:P})}return Promise.resolve()}};e.ConvertCellAction=n,e.ConvertCellAction=n=fe([O(2,b.INotificationService)],n);let g=class extends T.CellActionBase{constructor(M,N,P,x,F){super(M,N,void 0,F),this.cellType=P,this.isAfter=x}doRun(M){try{let N=M.model,P=N.cells.findIndex(x=>x.id===M.cell.id);P!==void 0&&this.isAfter&&(P+=1),N.addCell(this.cellType,P,M.cell.metadata?.language)}catch(N){let P=(0,m.getErrorMessage)(N);this.notificationService.notify({severity:S.default.Error,message:P})}return Promise.resolve()}};e.AddCellFromContextAction=g,e.AddCellFromContextAction=g=fe([O(4,b.INotificationService)],g);let w=class extends T.CellActionBase{constructor(M,N,P){super(M,N,void 0,P)}canRun(M){return M.cell&&M.cell.cellType===f.CellTypes.Code}doRun(M){try{let N=M.cell||M.model.activeCell;N&&N.clearOutputs()}catch(N){let P=(0,m.getErrorMessage)(N);this.notificationService.notify({severity:S.default.Error,message:P})}return Promise.resolve()}};e.ClearCellOutputAction=w,e.ClearCellOutputAction=w=fe([O(2,b.INotificationService)],w);let E=class extends T.CellActionBase{constructor(M,N,P,x,F){super(M,N,void 0,x),this.isAfter=P,this.notebookService=F}canRun(M){return M.cell&&M.cell.cellType===f.CellTypes.Code}async doRun(M){try{let N=M.cell||M.model.activeCell;if(N){let P=this.notebookService.findNotebookEditor(N.notebookModel.notebookUri);P&&(this.isAfter?await P.runAllCells(N,void 0):await P.runAllCells(void 0,N))}}catch(N){let P=(0,m.getErrorMessage)(N);this.notificationService.notify({severity:S.default.Error,message:P})}return Promise.resolve()}};e.RunCellsAction=E,e.RunCellsAction=E=fe([O(3,b.INotificationService),O(4,h.INotebookService)],E);let C=class extends T.CellActionBase{constructor(M,N,P,x){super(M,N,void 0,x),this.collapseCell=P}canRun(M){return M.cell&&M.cell.cellType===f.CellTypes.Code}async doRun(M){try{let N=M.cell||M.model.activeCell;N&&(this.collapseCell?N.isCollapsed||(N.isCollapsed=!0):N.isCollapsed&&(N.isCollapsed=!1))}catch(N){let P=(0,m.getErrorMessage)(N);this.notificationService.notify({severity:S.default.Error,message:P})}return Promise.resolve()}};e.CollapseCellAction=C,e.CollapseCellAction=C=fe([O(3,b.INotificationService)],C);class I extends D.Action{static{this.ID="notebook.toggleAddCell"}static{this.LABEL=o}static{this.ICON="codicon masked-icon new"}constructor(){super(I.ID),this.tooltip=I.LABEL}}e.ToggleAddCellDropdownAction=I;let _=class extends i.DropdownMenuActionViewItem{constructor(M,N,P,x,F){super(M,[F.createInstance(v.AddCodeCellAction),F.createInstance(v.AddTextCellAction)],x,{actionRunner:N,classNames:I.ICON,anchorAlignmentProvider:()=>0}),this.setActionContext(P)}};e.ToggleAddCellActionViewItem=_,e.ToggleAddCellActionViewItem=_=fe([O(3,a.IContextMenuService),O(4,y.IInstantiationService)],_);class A extends D.Action{static{this.ID="notebook.toggleMore"}static{this.LABEL=s.moreActionsLabel}static{this.ICON="codicon masked-icon more"}constructor(){super(A.ID),this.tooltip=A.LABEL}}e.CellToggleMoreAction=A;let k=class extends i.DropdownMenuActionViewItem{constructor(M,N,P,x,F){super(M,{getActions:()=>this.getValidActions()},x,{actionRunner:N,classNames:A.ICON,anchorAlignmentProvider:()=>0}),this._cellContext=P,this.setActionContext(this._cellContext),this._actions=[F.createInstance(n,"convertCell",(0,t.localize)(3,null)),new D.Separator,F.createInstance(E,"runAllAbove",(0,t.localize)(4,null),!1),F.createInstance(E,"runAllBelow",(0,t.localize)(5,null),!0),new D.Separator,F.createInstance(g,"codeAbove",(0,t.localize)(6,null),f.CellTypes.Code,!1),F.createInstance(g,"codeBelow",(0,t.localize)(7,null),f.CellTypes.Code,!0),new D.Separator,F.createInstance(g,"markdownAbove",(0,t.localize)(8,null),f.CellTypes.Markdown,!1),F.createInstance(g,"markdownBelow",(0,t.localize)(9,null),f.CellTypes.Markdown,!0),new D.Separator,F.createInstance(C,"collapseCell",(0,t.localize)(10,null),!0),F.createInstance(C,"expandCell",(0,t.localize)(11,null),!1),new D.Separator,F.createInstance(L,"makeParameterCell",(0,t.localize)(12,null),!0),F.createInstance(L,"removeParameterCell",(0,t.localize)(13,null),!1),new D.Separator,F.createInstance(w,"clear",(0,t.localize)(14,null))]}getValidActions(){const M=this._actions.filter(N=>N instanceof D.Separator||N instanceof T.CellActionBase&&N.canRun(this._cellContext));return l(M),M}};e.CellToggleMoreActionViewItem=k,e.CellToggleMoreActionViewItem=k=fe([O(3,a.IContextMenuService),O(4,y.IInstantiationService)],k);let L=class extends T.CellActionBase{constructor(M,N,P,x){super(M,N,void 0,x),this.parametersCell=P}canRun(M){return M.cell?.cellType===f.CellTypes.Code}async doRun(M){try{let N=M.cell||M.model.activeCell;N&&(this.parametersCell?N.isParameter||(N.isParameter=!0):N.isParameter&&(N.isParameter=!1))}catch(N){let P=(0,m.getErrorMessage)(N);this.notificationService.notify({severity:S.default.Error,message:P})}}};e.ParametersCellAction=L,e.ParametersCellAction=L=fe([O(3,b.INotificationService)],L)}),define(Q[1211],Y([1,0,40,2089,218,5,1210,205,505,4,1627]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellToolbarComponent=e.CELL_TOOLBAR_SELECTOR=void 0,e.CELL_TOOLBAR_SELECTOR="cell-toolbar-component";let S=class{constructor(a){this.instantiationService=a,this.buttonAdd=(0,y.localize)(0,null),this.optionCodeCell=(0,y.localize)(1,null),this.optionTextCell=(0,y.localize)(2,null),this.buttonMoveDown=(0,y.localize)(3,null),this.buttonMoveUp=(0,y.localize)(4,null),this.buttonDelete=(0,y.localize)(5,null),this.buttonSplitCell=(0,y.localize)(6,null),this._disposableActions=new m.DisposableStore}ngOnInit(){this.initActionBar(),this._typeChangedListener=this.model.onCellTypeChanged(a=>{a===this.cellModel&&this.setupActions()})}ngOnDestroy(){this._typeChangedListener.dispose()}initActionBar(){this._cellContext=new v.CellContext(this.model,this.cellModel);let a=this.celltoolbar.nativeElement;this._actionBar=new b.Taskbar(a,{actionViewItemProvider:r=>{if(r.id===T.ToggleAddCellDropdownAction.ID)return this.instantiationService.createInstance(T.ToggleAddCellActionViewItem,r,this._actionBar.actionRunner,this._cellContext);if(r.id===T.CellToggleMoreAction.ID)return this.instantiationService.createInstance(T.CellToggleMoreActionViewItem,r,this._actionBar.actionRunner,this._cellContext)}}),this._actionBar.context=this._cellContext,this.setupActions()}setupActions(){this._disposableActions.clear();const a=this._disposableActions.add(this.instantiationService.createInstance(T.ToggleAddCellDropdownAction)),r=this._disposableActions.add(this.instantiationService.createInstance(T.MoveCellAction,"notebook.MoveCellDown","masked-icon move-down",this.buttonMoveDown)),i=this._disposableActions.add(this.instantiationService.createInstance(T.MoveCellAction,"notebook.MoveCellUp","masked-icon move-up",this.buttonMoveUp)),s=this._disposableActions.add(this.instantiationService.createInstance(T.SplitCellAction,"notebook.SplitCellAtCursor",this.buttonSplitCell,"masked-icon icon-split-cell"));s.setListener(this._cellContext),s.enabled=this.cellModel.cellType!=="markdown";const o=this._disposableActions.add(this.instantiationService.createInstance(T.DeleteCellAction,"notebook.DeleteCell","masked-icon delete",this.buttonDelete));this._editCellAction=this._disposableActions.add(this.instantiationService.createInstance(T.EditCellAction,"notebook.EditCell",!0,this.cellModel.isEditMode)),this._editCellAction.enabled=!0;const u=this._disposableActions.add(this.instantiationService.createInstance(T.CellToggleMoreAction)),d=[];this.cellModel.cellType===f.CellTypes.Markdown&&d.push({action:this._editCellAction}),d.push({action:a},{action:r},{action:i},{action:s},{action:o},{action:u}),this._actionBar.setContent(d)}getEditCellAction(){return this._editCellAction}};e.CellToolbarComponent=S,fe([(0,t.ViewChild)("celltoolbar",{read:t.ElementRef})],S.prototype,"celltoolbar",void 0),fe([(0,t.Input)()],S.prototype,"cellModel",void 0),fe([(0,t.Input)()],S.prototype,"model",void 0),e.CellToolbarComponent=S=fe([(0,t.Component)({selector:e.CELL_TOOLBAR_SELECTOR,template:"<div #celltoolbar></div>"}),O(0,(0,t.Inject)(D.IInstantiationService))],S)}),define(Q[3359],Y([1,0,194,106,322,172,289,58,63,188,351,9,15]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncServerTreeDataSource=void 0;let r=class{constructor(s,o,u,d){this._objectExplorerService=s,this._connectionManagementService=o,this._configurationService=u,this._errorMessageService=d}hasChildren(s){return s instanceof y.ConnectionProfile?!0:s instanceof t.ConnectionProfileGroup?s.hasChildren():s instanceof b.TreeNode?!s.isAlwaysLeaf:!1}async getChildren(s){try{if(s instanceof y.ConnectionProfile)return await T.TreeUpdateUtils.getAsyncConnectionNodeChildren(s,this._connectionManagementService,this._objectExplorerService,this._configurationService);if(s instanceof t.ConnectionProfileGroup)return s.getChildren();if(s instanceof b.TreeNode)return await this._objectExplorerService.resolveTreeNodeChildren(s.getSession(),s)}catch(o){const u=(0,a.getErrorMessage)(o);throw s instanceof b.TreeNode&&(s.errorStateMessage=u),u&&!(o instanceof S.ConnectionError)&&this.showError(u),o}return[]}showError(s){this._errorMessageService&&this._errorMessageService.showDialog(v.default.Error,"",s)}};e.AsyncServerTreeDataSource=r,e.AsyncServerTreeDataSource=r=fe([O(0,D.IObjectExplorerService),O(1,f.IConnectionManagementService),O(2,h.IConfigurationService),O(3,m.IErrorMessageService)],r)}),define(Q[888],Y([1,0,194,106,58,1009,289,117,240,322,351,23,2229]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RecentConnectionsDragAndDrop=e.ServerTreeDragAndDrop=e.supportsFolderNodeNameDrop=e.supportsNodeNameDrop=void 0;function r(p){return p==="Table"||p==="Column"||p==="View"||p==="Function"}e.supportsNodeNameDrop=r;function i(p){return p.nodeTypeId!=="Column"}function s(p,c){return p==="Folder"&&c==="Columns"}e.supportsFolderNodeNameDrop=s;function o(p){return p?.replace(/]/g,"]]")}let u=class{constructor(c,l){this._connectionManagementService=c,this._notificationService=l,this.rejectDueToDupe=!1}getDragURI(c,l){return l?l instanceof y.ConnectionProfile?l.id:l instanceof t.ConnectionProfileGroup?l.id??null:r(l.nodeTypeId)||s(l.nodeTypeId,l.label)&&l.children?l.id:null:null}getDragLabel(c,l){return l?l[0]instanceof y.ConnectionProfile?l[0].serverName:l[0]instanceof t.ConnectionProfileGroup?l[0].name:l[0].label?l[0].label:"":""}onDragStart(c,l,n){let g,w,E;T.TreeUpdateUtils.isInDragAndDrop=!0;const I=l.getData()[0];if(r(I.nodeTypeId)){g=i(I)?o(I.metadata.schema):void 0,w=o(I.metadata.name);let _=this.getProviderNameFromElement(I);_==="KUSTO"?E=I.nodeTypeId!=="Function"&&w.indexOf(" ")>0?`[@"${w}"]`:w:_===f.mssqlProviderName?E=g?`[${g}].[${w}]`:`[${w}]`:_===f.pgsqlProviderName?E=I.metadata.schema?`"${I.metadata.schema}"."${I.metadata.name}"`:`"${I.metadata.name}"`:E=I.metadata.schema?`${I.metadata.schema}.${I.metadata.name}`:`${I.metadata.name}`,n.dataTransfer.setData(v.DataTransfers.RESOURCES,JSON.stringify([`${I.nodeTypeId}:${I.id}?${E}`]))}if(s(I.nodeTypeId,I.label)){let _="",A=this.getProviderNameFromElement(I);for(let k of I.children)g=i(k)?o(k.metadata.schema):void 0,w=o(k.metadata.name),A===f.mssqlProviderName?E=g?`[${g}].[${w}]`:`[${w}]`:A===f.pgsqlProviderName?E=k.metadata.schema?`"${k.metadata.schema}"."${k.metadata.name}"`:`"${k.metadata.name}"`:E=k.metadata.schema?`${k.metadata.schema}.${k.metadata.name}`:`${k.metadata.name}`,_=_?`${_},${E}`:`${E}`;n.dataTransfer.setData(v.DataTransfers.RESOURCES,JSON.stringify([`${I.nodeTypeId}:${I.id}?${_}`]))}}getProviderNameFromElement(c){return c.connection?c.connection.providerName:this.getProviderNameFromElement(c.parent)}canDragToConnectionProfileGroup(c,l){let n=!0;return c instanceof y.ConnectionProfile?this._connectionManagementService.canChangeConnectionConfig(c,l.id)||(n=!1):c instanceof t.ConnectionProfileGroup&&(n=c.id!==l.id&&!c.isAncestorOf(l)),n}onDragOver(c,l,n,g){let w=!0;const E=l.getData()[0];if(E instanceof t.ConnectionProfileGroup){if(n instanceof t.ConnectionProfileGroup)w=this.canDragToConnectionProfileGroup(E,n);else if(n instanceof y.ConnectionProfile)w=E.parentId!==n.groupId;else if(n instanceof m.TreeNode){const C=this.getTreeNodeParentGroup(n).id;w=E.parentId!==C&&E.id!==C}}else E instanceof y.ConnectionProfile?n instanceof t.ConnectionProfileGroup?w=this.canDragToConnectionProfileGroup(E,n):n instanceof y.ConnectionProfile?(w=E.groupId!==n.groupId&&this._connectionManagementService.canChangeConnectionConfig(E,n.groupId),this.rejectDueToDupe=!w):n instanceof m.TreeNode&&(w=E.groupId!==this.getTreeNodeParentGroup(n).id):E instanceof m.TreeNode&&(w=!1);if(w)if(n instanceof y.ConnectionProfile){const C=this._connectionManagementService.isProfileConnected(n);return(0,D.DRAG_OVER_ACCEPT_BUBBLE_DOWN)(C)}else return n instanceof t.ConnectionProfileGroup?(0,D.DRAG_OVER_ACCEPT_BUBBLE_DOWN)(!0):(0,D.DRAG_OVER_ACCEPT_BUBBLE_DOWN)(!1);else return D.DRAG_OVER_REJECT}drop(c,l,n,g){T.TreeUpdateUtils.isInDragAndDrop=!1;let w=this.getTargetGroup(n);const E=l.getData()[0];if(E&&E.getParent){let C=E.getParent();const I=this;this.isDropAllowed(w,C,E)&&(c instanceof S.AsyncServerTree?C&&E&&w&&(E instanceof t.ConnectionProfileGroup?this._connectionManagementService.changeGroupIdForConnectionGroup(E,w):E instanceof y.ConnectionProfile&&this._connectionManagementService.changeGroupIdForConnection(E,w.id)):E instanceof y.ConnectionProfile?this._connectionManagementService.changeGroupIdForConnection(E,w.id).then(async()=>{c&&T.TreeUpdateUtils.registeredServerUpdate(c,I._connectionManagementService,w)}):E instanceof t.ConnectionProfileGroup&&this._connectionManagementService.changeGroupIdForConnectionGroup(E,w).then(async()=>{c&&T.TreeUpdateUtils.registeredServerUpdate(c,I._connectionManagementService)}))}}dropAbort(c,l){this.rejectDueToDupe&&(this.rejectDueToDupe=!1,this._notificationService.info((0,a.localize)(0,null))),T.TreeUpdateUtils.isInDragAndDrop=!1}getTargetGroup(c){let l;if(c instanceof y.ConnectionProfile)l=c.getParent();else if(c instanceof t.ConnectionProfileGroup)l=c;else if(c instanceof m.TreeNode&&(l=this.getTreeNodeParentGroup(c),!l))throw new Error("Cannot find parent for the node");return l}isDropAllowed(c,l,n){let g=n&&c&&n instanceof t.ConnectionProfileGroup&&n.name===c.name,w=l&&l.equals(c),E=n&&n instanceof t.ConnectionProfileGroup&&n.id===f.UNSAVED_GROUP_ID;return!w&&!g&&!E}getTreeNodeParentGroup(c){let l=c;for(;!l?.connection;)l=l.parent;if(l){const n=l.connection.groupId;if(n)return this._connectionManagementService.getConnectionGroupById(n)}}};e.ServerTreeDragAndDrop=u,e.ServerTreeDragAndDrop=u=fe([O(0,b.IConnectionManagementService),O(1,h.INotificationService)],u);class d{getDragURI(c,l){return l instanceof y.ConnectionProfile?l.id:l instanceof t.ConnectionProfileGroup?l.id??null:null}getDragLabel(c,l){return l[0]instanceof y.ConnectionProfile?l[0].serverName:l[0]instanceof t.ConnectionProfileGroup?l[0].name:""}onDragStart(c,l,n){}onDragOver(c,l,n,g){return D.DRAG_OVER_REJECT}drop(c,l,n,g){}dropAbort(c,l){}}e.RecentConnectionsDragAndDrop=d}),define(Q[3360],Y([1,0,194,106,58,289,299,888,23]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncRecentConnectionsDragAndDrop=e.AsyncServerTreeDragAndDrop=void 0;let m=class{constructor(a,r){this._dragAndDrop=new f.ServerTreeDragAndDrop(a,r)}set tree(a){this._tree=a}getDragURI(a){return this._dragAndDrop.getDragURI(this._tree,a)}getDragLabel(a){return this._dragAndDrop.getDragLabel(this._tree,a)}onDragStart(a,r){return this._dragAndDrop.onDragStart(this._tree,a,r)}onDragOver(a,r,i,s){r||(r=this._tree?.getInput());const o=this._dragAndDrop.onDragOver(this._tree,a,r,s);return o.accept?T.TreeDragOverReactions.acceptBubbleDown(o.autoExpand):{accept:!1}}drop(a,r,i,s){r||(r=this._tree?.getInput()),this._dragAndDrop.drop(this._tree,a,r,s)}onDragEnd(a){D.TreeUpdateUtils.isInDragAndDrop=!1}};e.AsyncServerTreeDragAndDrop=m,e.AsyncServerTreeDragAndDrop=m=fe([O(0,b.IConnectionManagementService),O(1,v.INotificationService)],m);class S{getDragURI(a){return a instanceof y.ConnectionProfile?a.id:a instanceof t.ConnectionProfileGroup?a.id??null:null}getDragLabel(a){return a[0]instanceof y.ConnectionProfile?a[0].serverName:a[0]instanceof t.ConnectionProfileGroup?a[0].name:""}onDragOver(a,r,i,s){return{accept:!1}}drop(a,r,i,s){}}e.AsyncRecentConnectionsDragAndDrop=S}),define(Q[3361],Y([1,0,194,106,322,172,289,58,63,188]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServerTreeDataSource=void 0;let S=class{constructor(a,r,i){this._objectExplorerService=a,this._connectionManagementService=r,this._errorMessageService=i}getId(a,r){return r?.id||""}hasChildren(a,r){return r instanceof y.ConnectionProfile?!0:r instanceof t.ConnectionProfileGroup?r.hasChildren():r instanceof b.TreeNode?!r.isAlwaysLeaf:!1}async getChildren(a,r){if(r instanceof y.ConnectionProfile)return T.TreeUpdateUtils.getConnectionNodeChildren(r,this._objectExplorerService);if(r instanceof t.ConnectionProfileGroup)return r.getChildren();if(r instanceof b.TreeNode){let i=r;try{return await this._objectExplorerService.refreshTreeNode(i.getSession(),i),i.children}catch(s){return await i.setExpandedState(b.TreeItemCollapsibleState.Collapsed),i.errorStateMessage=s,this.showError(s),setTimeout(()=>{a.collapse(r).then(()=>a.refresh(r))}),[]}}return[]}getParent(a,r){return r instanceof y.ConnectionProfile||r instanceof t.ConnectionProfileGroup?Promise.resolve(r.getParent()):r instanceof b.TreeNode?Promise.resolve(T.TreeUpdateUtils.getObjectExplorerParent(r,this._connectionManagementService)):Promise.resolve(null)}showError(a){this._errorMessageService&&this._errorMessageService.showDialog(v.default.Error,"",a)}};e.ServerTreeDataSource=S,e.ServerTreeDataSource=S=fe([O(0,D.IObjectExplorerService),O(1,f.IConnectionManagementService),O(2,m.IErrorMessageService)],S)}),define(Q[709],Y([1,0,106,322,289,351,15,194]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeSelectionHandler=void 0;class v{constructor(){this._clickTimer=void 0,this._otherTimer=void 0,this._requestStatus=void 0}onTreeActionStateChange(S){}isMouseEvent(S){return S&&S.payload&&S.payload.origin==="mouse"}isKeyboardEvent(S){return S&&S.payload&&S.payload.origin==="keyboard"}onTreeSelect(S,h,a,r,i,s,o){let u=(c,l,n,g,w=void 0)=>{g===!0&&this._lastClicked&&this._lastClicked[0]===l[0]&&(this._lastClicked=void 0),b.TreeUpdateUtils.isInDragAndDrop||this.handleTreeItemSelected(a,r,i,n,this.isKeyboardEvent(c),l,h,s,w,o).catch(T.onUnexpectedError)},d=h.getSelection();if(!d||d.length===0)return;let p=d[0];if(this.isMouseEvent(S)||this.isKeyboardEvent(S)){if(this._lastClicked!==void 0)if(clearTimeout(this._clickTimer),this._lastClicked[0]===p){u(S,d,!0,!0);return}else u(S,this._lastClicked,!1,!0);this._lastClicked=d,this._clickTimer=setTimeout(()=>{this._requestStatus={inProgress:!0},u(S,d,!1,!0)},400)}else clearTimeout(this._otherTimer),this._otherTimer=setTimeout(()=>{u(S,d,!1,!1,this._requestStatus)},400)}async handleTreeItemSelected(S,h,a,r,i,s,o,u,d,p){if(!s||s.length===0)return;const c=s[0];if(c instanceof t.ConnectionProfile&&!a.getCapabilities(c.providerName)){o instanceof D.AsyncServerTree||S.handleUnsupportedProvider(c.providerName).catch(T.onUnexpectedError);return}if(o instanceof D.AsyncServerTree)c instanceof t.ConnectionProfile&&this.onTreeActionStateChange(!0);else{if(c instanceof y.TreeNode||c instanceof t.ConnectionProfile||c instanceof f.ConnectionProfileGroup){if(r)p(c);else if(c instanceof t.ConnectionProfile){let l={saveTheConnection:!0,showConnectionDialogOnError:!0,showFirewallRuleOnError:!0,showDashboard:!1};this.onTreeActionStateChange(!0);try{const n=await b.TreeUpdateUtils.connectAndCreateOeSession(c,l,S,h,o,d);this._requestStatus&&(this._requestStatus=void 0),n||this.onTreeActionStateChange(!1),u&&u()}catch{this.onTreeActionStateChange(!1)}}}i&&o.toggleExpansion(c)}}}e.TreeSelectionHandler=v}),define(Q[516],Y([1,0,13,28,289,709,5,172,107,106]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OEAction=e.getTreeNode=e.ObjectExplorerActionsContext=void 0;class S{constructor(){this.isConnectionNode=!1}}e.ObjectExplorerActionsContext=S;async function h(r,i){return r.isConnectionNode?Promise.resolve(void 0):await i.getTreeNode(r?.connectionProfile?.id,r?.nodeInfo?.nodePath)}e.getTreeNode=h;let a=class extends t.ExecuteCommandAction{constructor(i,s,o,u,d,p){super(i,s,u),this._instantiationService=o,this._objectExplorerService=d,this._capabilitiesService=p}async run(i){const s=this._instantiationService.createInstance(D.TreeSelectionHandler);let o;if(i instanceof S)if(i.isConnectionNode)o=new m.ConnectionProfile(this._capabilitiesService,i.connectionProfile);else{let u=await h(i,this._objectExplorerService);u&&(o=b.TreeUpdateUtils.getConnectionProfile(u))}if(s.onTreeActionStateChange(!0),o)return super.run(o).then(()=>{s.onTreeActionStateChange(!1)})}};e.OEAction=a,e.OEAction=a=fe([O(2,T.IInstantiationService),O(3,y.ICommandService),O(4,f.IObjectExplorerService),O(5,v.ICapabilitiesService)],a)}),define(Q[3362],Y([1,0,305,29,38,106,516,322]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServerTreeController=void 0;let v=class extends t.DefaultController{constructor(S,h,a){super({clickBehavior:0,openMode:0}),this.actionProvider=S,this.contextMenuService=h,this.keybindingService=a}onClick(S,h,a){return super.onClick(S,h,a)}onLeftClick(S,h,a,r="mouse"){return super.onLeftClick(S,h,a,r)}onLeft(S,h){return!0}onRight(S,h){return!0}onEnter(S,h){return super.onEnter(S,h)}onContextMenu(S,h,a){if(a.target&&a.target.tagName&&a.target.tagName.toLowerCase()==="input"||h===S.getInput())return!1;a.preventDefault(),a.stopPropagation(),S.setFocus(h);let r;if(h instanceof f.TreeNode){let s=new T.ObjectExplorerActionsContext;s.nodeInfo=h.toNodeInfo(),s.connectionProfile=h.getConnectionProfile().toIConnectionProfile(),s.connectionProfile.databaseName=h.getDatabaseName(),r=s}else if(h instanceof D.ConnectionProfile){let s=new T.ObjectExplorerActionsContext;s.connectionProfile=h.toIConnectionProfile(),s.isConnectionNode=!0,r=s}else r=h;let i={x:a.posx+1,y:a.posy};return this.contextMenuService.showContextMenu({getAnchor:()=>i,getActions:()=>this.actionProvider.getActions(S,h),getKeyBinding:s=>this.keybindingService.lookupKeybinding(s.id),onHide:s=>{s&&S.domFocus()},getActionsContext:()=>r}),!0}};e.ServerTreeController=v,e.ServerTreeController=v=fe([O(1,y.IContextMenuService),O(2,b.IKeybindingService)],v)}),define(Q[3363],Y([1,0,7,6,4,204,33,10,393,137,19]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._CSS_MAP=e.GlobalStyleSheet=e.ModelTransientSettingWatcher=e.AbstractCodeEditorService=void 0;let h=class extends b.Disposable{constructor(l){super(),this._themeService=l,this._onWillCreateCodeEditor=this._register(new y.Emitter),this.onWillCreateCodeEditor=this._onWillCreateCodeEditor.event,this._onCodeEditorAdd=this._register(new y.Emitter),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new y.Emitter),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new y.Emitter),this.onWillCreateDiffEditor=this._onWillCreateDiffEditor.event,this._onDiffEditorAdd=this._register(new y.Emitter),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new y.Emitter),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._onDidChangeTransientModelProperty=this._register(new y.Emitter),this.onDidChangeTransientModelProperty=this._onDidChangeTransientModelProperty.event,this._onDecorationTypeRegistered=this._register(new y.Emitter),this.onDecorationTypeRegistered=this._onDecorationTypeRegistered.event,this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._codeEditorOpenHandlers=new D.LinkedList,this._transientWatchers={},this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(l){this._codeEditors[l.getId()]=l,this._onCodeEditorAdd.fire(l)}removeCodeEditor(l){delete this._codeEditors[l.getId()]&&this._onCodeEditorRemove.fire(l)}listCodeEditors(){return Object.keys(this._codeEditors).map(l=>this._codeEditors[l])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(l){this._diffEditors[l.getId()]=l,this._onDiffEditorAdd.fire(l)}removeDiffEditor(l){delete this._diffEditors[l.getId()]&&this._onDiffEditorRemove.fire(l)}listDiffEditors(){return Object.keys(this._diffEditors).map(l=>this._diffEditors[l])}getFocusedCodeEditor(){let l=null;const n=this.listCodeEditors();for(const g of n){if(g.hasTextFocus())return g;g.hasWidgetFocus()&&(l=g)}return l}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=this._createGlobalStyleSheet()),this._globalStyleSheet}_createGlobalStyleSheet(){return new i(t.createStyleSheet())}_getOrCreateStyleSheet(l){if(!l)return this._getOrCreateGlobalStyleSheet();const n=l.getContainerDomNode();if(!t.isInShadowDOM(n))return this._getOrCreateGlobalStyleSheet();const g=l.getId();if(!this._editorStyleSheets.has(g)){const w=new r(this,g,t.createStyleSheet(n));this._editorStyleSheets.set(g,w)}return this._editorStyleSheets.get(g)}_removeEditorStyleSheets(l){this._editorStyleSheets.delete(l)}registerDecorationType(l,n,g,w,E){let C=this._decorationOptionProviders.get(n);if(!C){const I=this._getOrCreateStyleSheet(E),_={styleSheet:I,key:n,parentTypeKey:w,options:g||Object.create(null)};w?C=new s(this._themeService,I,_):C=new o(l,this._themeService,I,_),this._decorationOptionProviders.set(n,C),this._onDecorationTypeRegistered.fire(n)}C.refCount++}listDecorationTypes(){return Array.from(this._decorationOptionProviders.keys())}removeDecorationType(l){const n=this._decorationOptionProviders.get(l);n&&(n.refCount--,n.refCount<=0&&(this._decorationOptionProviders.delete(l),n.dispose(),this.listCodeEditors().forEach(g=>g.removeDecorationsByType(l))))}resolveDecorationOptions(l,n){const g=this._decorationOptionProviders.get(l);if(!g)throw new Error("Unknown decoration type key: "+l);return g.getOptions(this,n)}resolveDecorationCSSRules(l){const n=this._decorationOptionProviders.get(l);return n?n.resolveDecorationCSSRules():null}setModelProperty(l,n,g){const w=l.toString();let E;this._modelProperties.has(w)?E=this._modelProperties.get(w):(E=new Map,this._modelProperties.set(w,E)),E.set(n,g)}getModelProperty(l,n){const g=l.toString();if(this._modelProperties.has(g))return this._modelProperties.get(g).get(n)}setTransientModelProperty(l,n,g){const w=l.uri.toString();let E;this._transientWatchers.hasOwnProperty(w)?E=this._transientWatchers[w]:(E=new a(w,l,this),this._transientWatchers[w]=E),E.get(n)!==g&&(E.set(n,g),this._onDidChangeTransientModelProperty.fire(l))}getTransientModelProperty(l,n){const g=l.uri.toString();if(this._transientWatchers.hasOwnProperty(g))return this._transientWatchers[g].get(n)}getTransientModelProperties(l){const n=l.uri.toString();if(this._transientWatchers.hasOwnProperty(n))return this._transientWatchers[n].keys().map(g=>[g,this._transientWatchers[n].get(g)])}_removeWatcher(l){delete this._transientWatchers[l.uri]}async openCodeEditor(l,n,g){for(const w of this._codeEditorOpenHandlers){const E=await w(l,n,g);if(E!==null)return E}return null}registerCodeEditorOpenHandler(l){const n=this._codeEditorOpenHandlers.unshift(l);return(0,b.toDisposable)(n)}};e.AbstractCodeEditorService=h,e.AbstractCodeEditorService=h=fe([O(0,S.IThemeService)],h);class a{constructor(l,n,g){this.uri=l,this._values={},n.onWillDispose(()=>g._removeWatcher(this))}set(l,n){this._values[l]=n}get(l){return this._values[l]}keys(){return Object.keys(this._values)}}e.ModelTransientSettingWatcher=a;class r{get sheet(){return this._styleSheet.sheet}constructor(l,n,g){this._parent=l,this._editorId=n,this._styleSheet=g,this._refCount=0}ref(){this._refCount++}unref(){this._refCount--,this._refCount===0&&(this._styleSheet.parentNode?.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(l,n){this._styleSheet.sheet.insertRule(l,n)}removeRulesContainingSelector(l){t.removeCSSRulesContainingSelector(l,this._styleSheet)}}class i{get sheet(){return this._styleSheet.sheet}constructor(l){this._styleSheet=l}ref(){}unref(){}insertRule(l,n){this._styleSheet.sheet.insertRule(l,n)}removeRulesContainingSelector(l){t.removeCSSRulesContainingSelector(l,this._styleSheet)}}e.GlobalStyleSheet=i;class s{constructor(l,n,g){this._styleSheet=n,this._styleSheet.ref(),this._parentTypeKey=g.parentTypeKey,this.refCount=0,this._beforeContentRules=new u(3,g,l),this._afterContentRules=new u(4,g,l)}getOptions(l,n){const g=l.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(g.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(g.afterContentClassName=this._afterContentRules.className),g}resolveDecorationCSSRules(){return this._styleSheet.sheet.cssRules}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}class o{constructor(l,n,g,w){this._disposables=new b.DisposableStore,this.description=l,this._styleSheet=g,this._styleSheet.ref(),this.refCount=0;const E=L=>{const R=new u(L,w,n);if(this._disposables.add(R),R.hasContent)return R.className},C=L=>{const R=new u(L,w,n);return this._disposables.add(R),R.hasContent?{className:R.className,hasLetterSpacing:R.hasLetterSpacing}:null};this.className=E(0);const I=C(1);if(I&&(this.inlineClassName=I.className,this.inlineClassNameAffectsLetterSpacing=I.hasLetterSpacing),this.beforeContentClassName=E(3),this.afterContentClassName=E(4),w.options.beforeInjectedText&&w.options.beforeInjectedText.contentText){const L=C(5);this.beforeInjectedText={content:w.options.beforeInjectedText.contentText,inlineClassName:L?.className,inlineClassNameAffectsLetterSpacing:L?.hasLetterSpacing||w.options.beforeInjectedText.affectsLetterSpacing}}if(w.options.afterInjectedText&&w.options.afterInjectedText.contentText){const L=C(6);this.afterInjectedText={content:w.options.afterInjectedText.contentText,inlineClassName:L?.className,inlineClassNameAffectsLetterSpacing:L?.hasLetterSpacing||w.options.afterInjectedText.affectsLetterSpacing}}this.glyphMarginClassName=E(2);const _=w.options;this.isWholeLine=!!_.isWholeLine,this.stickiness=_.rangeBehavior;const A=_.light&&_.light.overviewRulerColor||_.overviewRulerColor,k=_.dark&&_.dark.overviewRulerColor||_.overviewRulerColor;(typeof A<"u"||typeof k<"u")&&(this.overviewRuler={color:A||k,darkColor:k||A,position:_.overviewRulerLane||m.OverviewRulerLane.Center})}getOptions(l,n){return n?{description:this.description,inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness,before:this.beforeInjectedText,after:this.afterInjectedText}:this}resolveDecorationCSSRules(){return this._styleSheet.sheet.rules}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}e._CSS_MAP={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",fontSize:"font-size:{0};",fontFamily:"font-family:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",padding:"padding:{0};",width:"width:{0};",height:"height:{0};",verticalAlign:"vertical-align:{0};"};class u{constructor(l,n,g){this._theme=g.getColorTheme(),this._ruleType=l,this._providerArgs=n,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let w=p.getClassName(this._providerArgs.key,l);this._providerArgs.parentTypeKey&&(w=w+" "+p.getClassName(this._providerArgs.parentTypeKey,l)),this._className=w,this._unThemedSelector=p.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,l),this._buildCSS(),this._usesThemeColors?this._themeListener=g.onDidColorThemeChange(E=>{this._theme=g.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 l=this._providerArgs.options;let n,g,w;switch(this._ruleType){case 0:n=this.getCSSTextForModelDecorationClassName(l),g=this.getCSSTextForModelDecorationClassName(l.light),w=this.getCSSTextForModelDecorationClassName(l.dark);break;case 1:n=this.getCSSTextForModelDecorationInlineClassName(l),g=this.getCSSTextForModelDecorationInlineClassName(l.light),w=this.getCSSTextForModelDecorationInlineClassName(l.dark);break;case 2:n=this.getCSSTextForModelDecorationGlyphMarginClassName(l),g=this.getCSSTextForModelDecorationGlyphMarginClassName(l.light),w=this.getCSSTextForModelDecorationGlyphMarginClassName(l.dark);break;case 3:n=this.getCSSTextForModelDecorationContentClassName(l.before),g=this.getCSSTextForModelDecorationContentClassName(l.light&&l.light.before),w=this.getCSSTextForModelDecorationContentClassName(l.dark&&l.dark.before);break;case 4:n=this.getCSSTextForModelDecorationContentClassName(l.after),g=this.getCSSTextForModelDecorationContentClassName(l.light&&l.light.after),w=this.getCSSTextForModelDecorationContentClassName(l.dark&&l.dark.after);break;case 5:n=this.getCSSTextForModelDecorationContentClassName(l.beforeInjectedText),g=this.getCSSTextForModelDecorationContentClassName(l.light&&l.light.beforeInjectedText),w=this.getCSSTextForModelDecorationContentClassName(l.dark&&l.dark.beforeInjectedText);break;case 6:n=this.getCSSTextForModelDecorationContentClassName(l.afterInjectedText),g=this.getCSSTextForModelDecorationContentClassName(l.light&&l.light.afterInjectedText),w=this.getCSSTextForModelDecorationContentClassName(l.dark&&l.dark.afterInjectedText);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const E=this._providerArgs.styleSheet;let C=!1;n.length>0&&(E.insertRule(`${this._unThemedSelector} {${n}}`,0),C=!0),g.length>0&&(E.insertRule(`.vs${this._unThemedSelector}, .hc-light${this._unThemedSelector} {${g}}`,0),C=!0),w.length>0&&(E.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${w}}`,0),C=!0),this._hasContent=C}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(l){if(!l)return"";const n=[];return this.collectCSSText(l,["backgroundColor"],n),this.collectCSSText(l,["outline","outlineColor","outlineStyle","outlineWidth"],n),this.collectBorderSettingsCSSText(l,n),n.join("")}getCSSTextForModelDecorationInlineClassName(l){if(!l)return"";const n=[];return this.collectCSSText(l,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],n),l.letterSpacing&&(this._hasLetterSpacing=!0),n.join("")}getCSSTextForModelDecorationContentClassName(l){if(!l)return"";const n=[];if(typeof l<"u"){if(this.collectBorderSettingsCSSText(l,n),typeof l.contentIconPath<"u"&&n.push(T.format(e._CSS_MAP.contentIconPath,t.asCSSUrl(f.URI.revive(l.contentIconPath)))),typeof l.contentText=="string"){const w=l.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");n.push(T.format(e._CSS_MAP.contentText,w))}this.collectCSSText(l,["verticalAlign","fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],n),this.collectCSSText(l,["width","height"],n)&&n.push("display:inline-block;")}return n.join("")}getCSSTextForModelDecorationGlyphMarginClassName(l){if(!l)return"";const n=[];return typeof l.gutterIconPath<"u"&&(n.push(T.format(e._CSS_MAP.gutterIconPath,t.asCSSUrl(f.URI.revive(l.gutterIconPath)))),typeof l.gutterIconSize<"u"&&n.push(T.format(e._CSS_MAP.gutterIconSize,l.gutterIconSize))),n.join("")}collectBorderSettingsCSSText(l,n){return this.collectCSSText(l,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],n)?(n.push(T.format("box-sizing: border-box;")),!0):!1}collectCSSText(l,n,g){const w=g.length;for(const E of n){const C=this.resolveValue(l[E]);typeof C=="string"&&g.push(T.format(e._CSS_MAP[E],C))}return g.length!==w}resolveValue(l){if((0,v.isThemeColor)(l)){this._usesThemeColors=!0;const n=this._theme.getColor(l.id);return n?n.toString():"transparent"}return l}}var d;(function(c){c[c.ClassName=0]="ClassName",c[c.InlineClassName=1]="InlineClassName",c[c.GlyphMarginClassName=2]="GlyphMarginClassName",c[c.BeforeContentClassName=3]="BeforeContentClassName",c[c.AfterContentClassName=4]="AfterContentClassName",c[c.BeforeInjectedTextClassName=5]="BeforeInjectedTextClassName",c[c.AfterInjectedTextClassName=6]="AfterInjectedTextClassName"})(d||(d={}));class p{static getClassName(l,n){return"ced-"+l+"-"+n}static getSelector(l,n,g){let w=".monaco-editor ."+this.getClassName(l,g);return n&&(w=w+"."+this.getClassName(n,g)),g===3?w+="::before":g===4&&(w+="::after"),w}}}),define(Q[3364],Y([1,0,7,140,162,239,19]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScrollbar=void 0;class f extends D.ViewPart{constructor(m,S,h,a){super(m);const r=this._context.configuration.options,i=r.get(101),s=r.get(73),o=r.get(39),u=r.get(104),d={listenOnDomNode:h.domNode,className:"editor-scrollable "+(0,T.getThemeTypeSelector)(m.theme.type),useShadows:!1,lazyRender:!0,vertical:i.vertical,horizontal:i.horizontal,verticalHasArrows:i.verticalHasArrows,horizontalHasArrows:i.horizontalHasArrows,verticalScrollbarSize:i.verticalScrollbarSize,verticalSliderSize:i.verticalSliderSize,horizontalScrollbarSize:i.horizontalScrollbarSize,horizontalSliderSize:i.horizontalSliderSize,handleMouseWheel:i.handleMouseWheel,alwaysConsumeMouseWheel:i.alwaysConsumeMouseWheel,arrowSize:i.arrowSize,mouseWheelScrollSensitivity:s,fastScrollSensitivity:o,scrollPredominantAxis:u,scrollByPage:i.scrollByPage};this.scrollbar=this._register(new b.SmoothScrollableElement(S.domNode,d,this._context.viewLayout.getScrollable())),D.PartFingerprints.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,y.createFastDomNode)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const p=(c,l,n)=>{const g={};if(l){const w=c.scrollTop;w&&(g.scrollTop=this._context.viewLayout.getCurrentScrollTop()+w,c.scrollTop=0)}if(n){const w=c.scrollLeft;w&&(g.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+w,c.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(g,1)};this._register(t.addDisposableListener(h.domNode,"scroll",c=>p(h.domNode,!0,!0))),this._register(t.addDisposableListener(S.domNode,"scroll",c=>p(S.domNode,!0,!1))),this._register(t.addDisposableListener(a.domNode,"scroll",c=>p(a.domNode,!0,!1))),this._register(t.addDisposableListener(this.scrollbarDomNode.domNode,"scroll",c=>p(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const m=this._context.configuration.options,S=m.get(142);this.scrollbarDomNode.setLeft(S.contentLeft),m.get(71).side==="right"?this.scrollbarDomNode.setWidth(S.contentWidth+S.minimap.minimapWidth):this.scrollbarDomNode.setWidth(S.contentWidth),this.scrollbarDomNode.setHeight(S.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(m){this.scrollbar.delegateVerticalScrollbarPointerDown(m)}delegateScrollFromMouseWheelEvent(m){this.scrollbar.delegateScrollFromMouseWheelEvent(m)}onConfigurationChanged(m){if(m.hasChanged(101)||m.hasChanged(73)||m.hasChanged(39)){const S=this._context.configuration.options,h=S.get(101),a=S.get(73),r=S.get(39),i=S.get(104),s={vertical:h.vertical,horizontal:h.horizontal,verticalScrollbarSize:h.verticalScrollbarSize,horizontalScrollbarSize:h.horizontalScrollbarSize,scrollByPage:h.scrollByPage,handleMouseWheel:h.handleMouseWheel,mouseWheelScrollSensitivity:a,fastScrollSensitivity:r,scrollPredominantAxis:i};this.scrollbar.updateOptions(s)}return m.hasChanged(142)&&this._setLayout(),!0}onScrollChanged(m){return!0}onThemeChanged(m){return this.scrollbar.updateClassName("editor-scrollable "+(0,T.getThemeTypeSelector)(this._context.theme.type)),!0}prepareRender(m){}render(m){this.scrollbar.renderNow()}}e.EditorScrollbar=f}),define(Q[3365],Y([1,0,442,36,19,1713]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionsOverlay=void 0;var D;(function(a){a[a.EXTERN=0]="EXTERN",a[a.INTERN=1]="INTERN",a[a.FLAT=2]="FLAT"})(D||(D={}));class T{constructor(r){this.left=r.left,this.width=r.width,this.startStyle=null,this.endStyle=null}}class f{constructor(r,i){this.lineNumber=r,this.ranges=i}}function v(a){return new T(a)}function m(a){return new f(a.lineNumber,a.ranges.map(v))}class S extends t.DynamicViewOverlay{static{this.SELECTION_CLASS_NAME="selected-text"}static{this.SELECTION_TOP_LEFT="top-left-radius"}static{this.SELECTION_BOTTOM_LEFT="bottom-left-radius"}static{this.SELECTION_TOP_RIGHT="top-right-radius"}static{this.SELECTION_BOTTOM_RIGHT="bottom-right-radius"}static{this.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background"}static{this.ROUNDED_PIECE_WIDTH=10}constructor(r){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=r;const i=this._context.configuration.options;this._lineHeight=i.get(65),this._roundedSelection=i.get(99),this._typicalHalfwidthCharacterWidth=i.get(49).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(r){const i=this._context.configuration.options;return this._lineHeight=i.get(65),this._roundedSelection=i.get(99),this._typicalHalfwidthCharacterWidth=i.get(49).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(r){return this._selections=r.selections.slice(0),!0}onDecorationsChanged(r){return!0}onFlushed(r){return!0}onLinesChanged(r){return!0}onLinesDeleted(r){return!0}onLinesInserted(r){return!0}onScrollChanged(r){return r.scrollTopChanged}onZonesChanged(r){return!0}_visibleRangesHaveGaps(r){for(let i=0,s=r.length;i<s;i++)if(r[i].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(r,i,s){const o=this._typicalHalfwidthCharacterWidth/4;let u=null,d=null;if(s&&s.length>0&&i.length>0){const p=i[0].lineNumber;if(p===r.startLineNumber)for(let l=0;!u&&l<s.length;l++)s[l].lineNumber===p&&(u=s[l].ranges[0]);const c=i[i.length-1].lineNumber;if(c===r.endLineNumber)for(let l=s.length-1;!d&&l>=0;l--)s[l].lineNumber===c&&(d=s[l].ranges[0]);u&&!u.startStyle&&(u=null),d&&!d.startStyle&&(d=null)}for(let p=0,c=i.length;p<c;p++){const l=i[p].ranges[0],n=l.left,g=l.left+l.width,w={top:0,bottom:0},E={top:0,bottom:0};if(p>0){const C=i[p-1].ranges[0].left,I=i[p-1].ranges[0].left+i[p-1].ranges[0].width;h(n-C)<o?w.top=2:n>C&&(w.top=1),h(g-I)<o?E.top=2:C<g&&g<I&&(E.top=1)}else u&&(w.top=u.startStyle.top,E.top=u.endStyle.top);if(p+1<c){const C=i[p+1].ranges[0].left,I=i[p+1].ranges[0].left+i[p+1].ranges[0].width;h(n-C)<o?w.bottom=2:C<n&&n<I&&(w.bottom=1),h(g-I)<o?E.bottom=2:g<I&&(E.bottom=1)}else d&&(w.bottom=d.startStyle.bottom,E.bottom=d.endStyle.bottom);l.startStyle=w,l.endStyle=E}}_getVisibleRangesWithStyle(r,i,s){const u=(i.linesVisibleRangesForRange(r,!0)||[]).map(m);return!this._visibleRangesHaveGaps(u)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(i.visibleRange,u,s),u}_createSelectionPiece(r,i,s,o,u){return'<div class="cslr '+s+'" style="top:'+r.toString()+"px;left:"+o.toString()+"px;width:"+u.toString()+"px;height:"+i+'px;"></div>'}_actualRenderOneSelection(r,i,s,o){if(o.length===0)return;const u=!!o[0].ranges[0].startStyle,d=this._lineHeight.toString(),p=(this._lineHeight-1).toString(),c=o[0].lineNumber,l=o[o.length-1].lineNumber;for(let n=0,g=o.length;n<g;n++){const w=o[n],E=w.lineNumber,C=E-i,I=s&&(E===l||E===c)?p:d,_=s&&E===c?1:0;let A="",k="";for(let L=0,R=w.ranges.length;L<R;L++){const M=w.ranges[L];if(u){const P=M.startStyle,x=M.endStyle;if(P.top===1||P.bottom===1){A+=this._createSelectionPiece(_,I,S.SELECTION_CLASS_NAME,M.left-S.ROUNDED_PIECE_WIDTH,S.ROUNDED_PIECE_WIDTH);let F=S.EDITOR_BACKGROUND_CLASS_NAME;P.top===1&&(F+=" "+S.SELECTION_TOP_RIGHT),P.bottom===1&&(F+=" "+S.SELECTION_BOTTOM_RIGHT),A+=this._createSelectionPiece(_,I,F,M.left-S.ROUNDED_PIECE_WIDTH,S.ROUNDED_PIECE_WIDTH)}if(x.top===1||x.bottom===1){A+=this._createSelectionPiece(_,I,S.SELECTION_CLASS_NAME,M.left+M.width,S.ROUNDED_PIECE_WIDTH);let F=S.EDITOR_BACKGROUND_CLASS_NAME;x.top===1&&(F+=" "+S.SELECTION_TOP_LEFT),x.bottom===1&&(F+=" "+S.SELECTION_BOTTOM_LEFT),A+=this._createSelectionPiece(_,I,F,M.left+M.width,S.ROUNDED_PIECE_WIDTH)}}let N=S.SELECTION_CLASS_NAME;if(u){const P=M.startStyle,x=M.endStyle;P.top===0&&(N+=" "+S.SELECTION_TOP_LEFT),P.bottom===0&&(N+=" "+S.SELECTION_BOTTOM_LEFT),x.top===0&&(N+=" "+S.SELECTION_TOP_RIGHT),x.bottom===0&&(N+=" "+S.SELECTION_BOTTOM_RIGHT)}k+=this._createSelectionPiece(_,I,N,M.left,M.width)}r[C][0]+=A,r[C][1]+=k}}prepareRender(r){const i=[],s=r.visibleRange.startLineNumber,o=r.visibleRange.endLineNumber;for(let d=s;d<=o;d++){const p=d-s;i[p]=["",""]}const u=[];for(let d=0,p=this._selections.length;d<p;d++){const c=this._selections[d];if(c.isEmpty()){u[d]=null;continue}const l=this._getVisibleRangesWithStyle(c,r,this._previousFrameVisibleRangesWithStyle[d]);u[d]=l,this._actualRenderOneSelection(i,s,this._selections.length>1,l)}this._previousFrameVisibleRangesWithStyle=u,this._renderResult=i.map(([d,p])=>d+p)}render(r,i){if(!this._renderResult)return"";const s=i-r;return s<0||s>=this._renderResult.length?"":this._renderResult[s]}}e.SelectionsOverlay=S,(0,b.registerThemingParticipant)((a,r)=>{const i=a.getColor(y.editorSelectionForeground);i&&!i.isTransparent()&&r.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)});function h(a){return a<0?-a:a}}),define(Q[1212],Y([1,0,7,140,781,4,109,391,51,806,36,19]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRulerPart=void 0;let r=class extends D.Disposable{static{a=this}static{this.ONE_OVERVIEW_WIDTH=15}static{this.ENTIRE_DIFF_OVERVIEW_WIDTH=a.ONE_OVERVIEW_WIDTH*2}constructor(s,o,u,d,p,c,l,n){super(),this._editors=s,this._rootElement=o,this._diffModel=u,this._rootWidth=d,this._rootHeight=p,this._modifiedEditorLayoutInfo=c,this._options=l,this._themeService=n;const g=(0,T.observableFromEvent)(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),w=(0,T.derived)(I=>{const _=g.read(I),A=_.getColor(S.diffOverviewRulerInserted)||(_.getColor(S.diffInserted)||S.defaultInsertColor).transparent(2),k=_.getColor(S.diffOverviewRulerRemoved)||(_.getColor(S.diffRemoved)||S.defaultRemoveColor).transparent(2);return{insertColor:A,removeColor:k}}),E=(0,T.observableFromEvent)(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),C=(0,T.observableFromEvent)(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollHeight());this._register((0,T.autorunWithStore)((I,_)=>{if(!this._options.renderOverviewRuler.read(I))return;const A=(0,y.createFastDomNode)(document.createElement("div"));A.setClassName("diffViewport"),A.setPosition("absolute");const k=(0,t.h)("div.diffOverview",{style:{position:"absolute",top:"0px",width:a.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;_.add((0,f.appendRemoveOnDispose)(k,A.domNode)),_.add((0,t.addStandardDisposableListener)(k,t.EventType.POINTER_DOWN,L=>{this._editors.modified.delegateVerticalScrollbarPointerDown(L)})),_.add((0,t.addDisposableListener)(k,t.EventType.MOUSE_WHEEL,L=>{this._editors.modified.delegateScrollFromMouseWheelEvent(L)},{passive:!1})),_.add((0,f.appendRemoveOnDispose)(this._rootElement,k)),_.add((0,T.autorunWithStore)((L,R)=>{const M=this._diffModel.read(L),N=this._editors.original.createOverviewRuler("original diffOverviewRuler");N&&(R.add(N),R.add((0,f.appendRemoveOnDispose)(k,N.getDomNode())));const P=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(P&&(R.add(P),R.add((0,f.appendRemoveOnDispose)(k,P.getDomNode()))),!N||!P)return;const x=(0,T.observableSignalFromEvent)("viewZoneChanged",this._editors.original.onDidChangeViewZones),F=(0,T.observableSignalFromEvent)("viewZoneChanged",this._editors.modified.onDidChangeViewZones),V=(0,T.observableSignalFromEvent)("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),W=(0,T.observableSignalFromEvent)("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);R.add((0,T.autorun)(z=>{x.read(z),F.read(z),V.read(z),W.read(z);const B=w.read(z),K=M?.diff.read(z)?.mappings;function H($,ie,J){const j=J._getViewModel();return j?$.filter(ee=>ee.length>0).map(ee=>{const X=j.coordinatesConverter.convertModelPositionToViewPosition(new v.Position(ee.startLineNumber,1)),te=j.coordinatesConverter.convertModelPositionToViewPosition(new v.Position(ee.endLineNumberExclusive,1)),Z=te.lineNumber-X.lineNumber;return new m.OverviewRulerZone(X.lineNumber,te.lineNumber,Z,ie.toString())}):[]}const U=H((K||[]).map($=>$.lineRangeMapping.originalRange),B.removeColor,this._editors.original),G=H((K||[]).map($=>$.lineRangeMapping.modifiedRange),B.insertColor,this._editors.modified);N?.setZones(U),P?.setZones(G)})),R.add((0,T.autorun)(z=>{const B=this._rootHeight.read(z),K=this._rootWidth.read(z),H=this._modifiedEditorLayoutInfo.read(z);if(H){const U=a.ENTIRE_DIFF_OVERVIEW_WIDTH-2*a.ONE_OVERVIEW_WIDTH;N.setLayout({top:0,height:B,right:U+a.ONE_OVERVIEW_WIDTH,width:a.ONE_OVERVIEW_WIDTH}),P.setLayout({top:0,height:B,right:0,width:a.ONE_OVERVIEW_WIDTH});const G=E.read(z),$=C.read(z),ie=this._editors.modified.getOption(101),J=new b.ScrollbarState(ie.verticalHasArrows?ie.arrowSize:0,ie.verticalScrollbarSize,0,H.height,$,G);A.setTop(J.getSliderPosition()),A.setHeight(J.getSliderSize())}else A.setTop(0),A.setHeight(0);k.style.height=B+"px",k.style.left=K-a.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",A.setWidth(a.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}))}};e.OverviewRulerPart=r,e.OverviewRulerPart=r=a=fe([O(7,h.IThemeService)],r)}),define(Q[3366],Y([1,0,6,4,109,1212,133,2337,5,38]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorEditors=void 0;let S=class extends y.Disposable{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(a,r,i,s,o,u,d){super(),this.originalEditorElement=a,this.modifiedEditorElement=r,this._options=i,this._createInnerEditor=o,this._instantiationService=u,this._keybindingService=d,this._onDidContentSizeChange=this._register(new t.Emitter),this.original=this._register(this._createLeftHandSideEditor(i.editorOptions.get(),s.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(i.editorOptions.get(),s.modifiedEditor||{})),this._register((0,b.autorunHandleChanges)({createEmptyChangeSummary:()=>({}),handleChange:(p,c)=>(p.didChange(i.editorOptions)&&Object.assign(c,p.change.changedOptions),!0)},(p,c)=>{i.editorOptions.read(p),this._options.renderSideBySide.read(p),this.modified.updateOptions(this._adjustOptionsForRightHandSide(p,c)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(p,c))}))}_createLeftHandSideEditor(a,r){const i=this._adjustOptionsForLeftHandSide(void 0,a),s=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,r);return s.setContextValue("isInDiffLeftEditor",!0),s}_createRightHandSideEditor(a,r){const i=this._adjustOptionsForRightHandSide(void 0,a),s=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,r);return s.setContextValue("isInDiffRightEditor",!0),s}_constructInnerEditor(a,r,i,s){const o=this._createInnerEditor(a,r,i,s);return this._register(o.onDidContentSizeChange(u=>{const d=this.original.getContentWidth()+this.modified.getContentWidth()+D.OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH,p=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:p,contentWidth:d,contentHeightChanged:u.contentHeightChanged,contentWidthChanged:u.contentWidthChanged})})),o}_adjustOptionsForLeftHandSide(a,r){const i=this._adjustOptionsForSubEditor(r);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),r.originalAriaLabel&&(i.ariaLabel=r.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(a,r){const i=this._adjustOptionsForSubEditor(r);return r.modifiedAriaLabel&&(i.ariaLabel=r.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=T.EditorOptions.revealHorizontalRightPadding.defaultValue+D.OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(a){const r={...a,dimension:{height:0,width:0}};return r.inDiffEditor=!0,r.automaticLayout=!1,r.scrollbar={...r.scrollbar||{}},r.scrollbar.vertical="visible",r.folding=!1,r.codeLens=this._options.diffCodeLens.get(),r.fixedOverflowWidgets=!0,r.minimap={...r.minimap||{}},r.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?r.stickyScroll={enabled:!1}:r.stickyScroll=this._options.editorOptions.get().stickyScroll,r}_updateAriaLabel(a){a||(a="");const r=(0,f.localize)(0,null,this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp")?.getAriaLabel());return this._options.accessibilityVerbose.get()?a+r:a?a.replaceAll(r,""):""}};e.DiffEditorEditors=S,e.DiffEditorEditors=S=fe([O(5,v.IInstantiationService),O(6,m.IKeybindingService)],S)}),define(Q[232],Y([1,0,2350,80,36,19]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorUnicodeHighlightBackground=e.editorUnicodeHighlightBorder=e.editorBracketPairGuideActiveBackground6=e.editorBracketPairGuideActiveBackground5=e.editorBracketPairGuideActiveBackground4=e.editorBracketPairGuideActiveBackground3=e.editorBracketPairGuideActiveBackground2=e.editorBracketPairGuideActiveBackground1=e.editorBracketPairGuideBackground6=e.editorBracketPairGuideBackground5=e.editorBracketPairGuideBackground4=e.editorBracketPairGuideBackground3=e.editorBracketPairGuideBackground2=e.editorBracketPairGuideBackground1=e.editorBracketHighlightingUnexpectedBracketForeground=e.editorBracketHighlightingForeground6=e.editorBracketHighlightingForeground5=e.editorBracketHighlightingForeground4=e.editorBracketHighlightingForeground3=e.editorBracketHighlightingForeground2=e.editorBracketHighlightingForeground1=e.overviewRulerInfo=e.overviewRulerWarning=e.overviewRulerError=e.overviewRulerRangeHighlight=e.ghostTextBackground=e.ghostTextForeground=e.ghostTextBorder=e.editorUnnecessaryCodeOpacity=e.editorUnnecessaryCodeBorder=e.editorGutter=e.editorOverviewRulerBackground=e.editorOverviewRulerBorder=e.editorBracketMatchBorder=e.editorBracketMatchBackground=e.editorCodeLensForeground=e.editorRuler=e.editorDimmedLineNumber=e.editorActiveLineNumber=e.editorActiveIndentGuide6=e.editorActiveIndentGuide5=e.editorActiveIndentGuide4=e.editorActiveIndentGuide3=e.editorActiveIndentGuide2=e.editorActiveIndentGuide1=e.editorIndentGuide6=e.editorIndentGuide5=e.editorIndentGuide4=e.editorIndentGuide3=e.editorIndentGuide2=e.editorIndentGuide1=e.deprecatedEditorActiveIndentGuides=e.deprecatedEditorIndentGuides=e.editorLineNumbers=e.editorWhitespaces=e.editorCursorBackground=e.editorCursorForeground=e.editorSymbolHighlightBorder=e.editorSymbolHighlight=e.editorRangeHighlightBorder=e.editorRangeHighlight=e.editorLineHighlightBorder=e.editorLineHighlight=void 0,e.editorLineHighlight=(0,b.registerColor)("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},t.localize(0,null)),e.editorLineHighlightBorder=(0,b.registerColor)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:b.contrastBorder},t.localize(1,null)),e.editorRangeHighlight=(0,b.registerColor)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},t.localize(2,null),!0),e.editorRangeHighlightBorder=(0,b.registerColor)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:b.activeContrastBorder,hcLight:b.activeContrastBorder},t.localize(3,null),!0),e.editorSymbolHighlight=(0,b.registerColor)("editor.symbolHighlightBackground",{dark:b.editorFindMatchHighlight,light:b.editorFindMatchHighlight,hcDark:null,hcLight:null},t.localize(4,null),!0),e.editorSymbolHighlightBorder=(0,b.registerColor)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:b.activeContrastBorder,hcLight:b.activeContrastBorder},t.localize(5,null),!0),e.editorCursorForeground=(0,b.registerColor)("editorCursor.foreground",{dark:"#AEAFAD",light:y.Color.black,hcDark:y.Color.white,hcLight:"#0F4A85"},t.localize(6,null)),e.editorCursorBackground=(0,b.registerColor)("editorCursor.background",null,t.localize(7,null)),e.editorWhitespaces=(0,b.registerColor)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},t.localize(8,null)),e.editorLineNumbers=(0,b.registerColor)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:y.Color.white,hcLight:"#292929"},t.localize(9,null)),e.deprecatedEditorIndentGuides=(0,b.registerColor)("editorIndentGuide.background",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},t.localize(10,null),!1,t.localize(11,null)),e.deprecatedEditorActiveIndentGuides=(0,b.registerColor)("editorIndentGuide.activeBackground",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},t.localize(12,null),!1,t.localize(13,null)),e.editorIndentGuide1=(0,b.registerColor)("editorIndentGuide.background1",{dark:e.deprecatedEditorIndentGuides,light:e.deprecatedEditorIndentGuides,hcDark:e.deprecatedEditorIndentGuides,hcLight:e.deprecatedEditorIndentGuides},t.localize(14,null)),e.editorIndentGuide2=(0,b.registerColor)("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(15,null)),e.editorIndentGuide3=(0,b.registerColor)("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(16,null)),e.editorIndentGuide4=(0,b.registerColor)("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(17,null)),e.editorIndentGuide5=(0,b.registerColor)("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(18,null)),e.editorIndentGuide6=(0,b.registerColor)("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(19,null)),e.editorActiveIndentGuide1=(0,b.registerColor)("editorIndentGuide.activeBackground1",{dark:e.deprecatedEditorActiveIndentGuides,light:e.deprecatedEditorActiveIndentGuides,hcDark:e.deprecatedEditorActiveIndentGuides,hcLight:e.deprecatedEditorActiveIndentGuides},t.localize(20,null)),e.editorActiveIndentGuide2=(0,b.registerColor)("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(21,null)),e.editorActiveIndentGuide3=(0,b.registerColor)("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(22,null)),e.editorActiveIndentGuide4=(0,b.registerColor)("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(23,null)),e.editorActiveIndentGuide5=(0,b.registerColor)("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(24,null)),e.editorActiveIndentGuide6=(0,b.registerColor)("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(25,null));const T=(0,b.registerColor)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:b.activeContrastBorder,hcLight:b.activeContrastBorder},t.localize(26,null),!1,t.localize(27,null));e.editorActiveLineNumber=(0,b.registerColor)("editorLineNumber.activeForeground",{dark:T,light:T,hcDark:T,hcLight:T},t.localize(28,null)),e.editorDimmedLineNumber=(0,b.registerColor)("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},t.localize(29,null)),e.editorRuler=(0,b.registerColor)("editorRuler.foreground",{dark:"#5A5A5A",light:y.Color.lightgrey,hcDark:y.Color.white,hcLight:"#292929"},t.localize(30,null)),e.editorCodeLensForeground=(0,b.registerColor)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},t.localize(31,null)),e.editorBracketMatchBackground=(0,b.registerColor)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},t.localize(32,null)),e.editorBracketMatchBorder=(0,b.registerColor)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:b.contrastBorder,hcLight:b.contrastBorder},t.localize(33,null)),e.editorOverviewRulerBorder=(0,b.registerColor)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},t.localize(34,null)),e.editorOverviewRulerBackground=(0,b.registerColor)("editorOverviewRuler.background",null,t.localize(35,null)),e.editorGutter=(0,b.registerColor)("editorGutter.background",{dark:b.editorBackground,light:b.editorBackground,hcDark:b.editorBackground,hcLight:b.editorBackground},t.localize(36,null)),e.editorUnnecessaryCodeBorder=(0,b.registerColor)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:y.Color.fromHex("#fff").transparent(.8),hcLight:b.contrastBorder},t.localize(37,null)),e.editorUnnecessaryCodeOpacity=(0,b.registerColor)("editorUnnecessaryCode.opacity",{dark:y.Color.fromHex("#000a"),light:y.Color.fromHex("#0007"),hcDark:null,hcLight:null},t.localize(38,null)),e.ghostTextBorder=(0,b.registerColor)("editorGhostText.border",{dark:null,light:null,hcDark:y.Color.fromHex("#fff").transparent(.8),hcLight:y.Color.fromHex("#292929").transparent(.8)},t.localize(39,null)),e.ghostTextForeground=(0,b.registerColor)("editorGhostText.foreground",{dark:y.Color.fromHex("#ffffff56"),light:y.Color.fromHex("#0007"),hcDark:null,hcLight:null},t.localize(40,null)),e.ghostTextBackground=(0,b.registerColor)("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},t.localize(41,null));const f=new y.Color(new y.RGBA(0,122,204,.6));e.overviewRulerRangeHighlight=(0,b.registerColor)("editorOverviewRuler.rangeHighlightForeground",{dark:f,light:f,hcDark:f,hcLight:f},t.localize(42,null),!0),e.overviewRulerError=(0,b.registerColor)("editorOverviewRuler.errorForeground",{dark:new y.Color(new y.RGBA(255,18,18,.7)),light:new y.Color(new y.RGBA(255,18,18,.7)),hcDark:new y.Color(new y.RGBA(255,50,50,1)),hcLight:"#B5200D"},t.localize(43,null)),e.overviewRulerWarning=(0,b.registerColor)("editorOverviewRuler.warningForeground",{dark:b.editorWarningForeground,light:b.editorWarningForeground,hcDark:b.editorWarningBorder,hcLight:b.editorWarningBorder},t.localize(44,null)),e.overviewRulerInfo=(0,b.registerColor)("editorOverviewRuler.infoForeground",{dark:b.editorInfoForeground,light:b.editorInfoForeground,hcDark:b.editorInfoBorder,hcLight:b.editorInfoBorder},t.localize(45,null)),e.editorBracketHighlightingForeground1=(0,b.registerColor)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},t.localize(46,null)),e.editorBracketHighlightingForeground2=(0,b.registerColor)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},t.localize(47,null)),e.editorBracketHighlightingForeground3=(0,b.registerColor)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},t.localize(48,null)),e.editorBracketHighlightingForeground4=(0,b.registerColor)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(49,null)),e.editorBracketHighlightingForeground5=(0,b.registerColor)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(50,null)),e.editorBracketHighlightingForeground6=(0,b.registerColor)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(51,null)),e.editorBracketHighlightingUnexpectedBracketForeground=(0,b.registerColor)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new y.Color(new y.RGBA(255,18,18,.8)),light:new y.Color(new y.RGBA(255,18,18,.8)),hcDark:new y.Color(new y.RGBA(255,50,50,1)),hcLight:""},t.localize(52,null)),e.editorBracketPairGuideBackground1=(0,b.registerColor)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(53,null)),e.editorBracketPairGuideBackground2=(0,b.registerColor)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(54,null)),e.editorBracketPairGuideBackground3=(0,b.registerColor)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(55,null)),e.editorBracketPairGuideBackground4=(0,b.registerColor)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(56,null)),e.editorBracketPairGuideBackground5=(0,b.registerColor)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(57,null)),e.editorBracketPairGuideBackground6=(0,b.registerColor)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(58,null)),e.editorBracketPairGuideActiveBackground1=(0,b.registerColor)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(59,null)),e.editorBracketPairGuideActiveBackground2=(0,b.registerColor)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(60,null)),e.editorBracketPairGuideActiveBackground3=(0,b.registerColor)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(61,null)),e.editorBracketPairGuideActiveBackground4=(0,b.registerColor)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(62,null)),e.editorBracketPairGuideActiveBackground5=(0,b.registerColor)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(63,null)),e.editorBracketPairGuideActiveBackground6=(0,b.registerColor)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(64,null)),e.editorUnicodeHighlightBorder=(0,b.registerColor)("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},t.localize(65,null)),e.editorUnicodeHighlightBackground=(0,b.registerColor)("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},t.localize(66,null)),(0,D.registerThemingParticipant)((v,m)=>{const S=v.getColor(b.editorBackground),h=v.getColor(e.editorLineHighlight),a=h&&!h.isTransparent()?h:S;a&&m.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${a}; }`)})}),define(Q[1213],Y([1,0,1039,389,1995,36,232,19,215,215,141,4518]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=void 0;const a=[m.ChartType.Doughnut,m.ChartType.Pie],r={scales:{x:{type:"time",display:!0,ticks:{autoSkip:!1,maxRotation:45,minRotation:45}},y:{display:!0}}},i={type:m.ChartType.Bar,dataDirection:m.DataDirection.Horizontal};let s=class{static{h=this}static{this.types=[m.ChartType.Bar,m.ChartType.Doughnut,m.ChartType.HorizontalBar,m.ChartType.Line,m.ChartType.Pie,m.ChartType.Scatter,m.ChartType.TimeSeries]}constructor(_,A=i,k){this._options={type:m.ChartType.Bar},this.types=h.types,t.Chart.register(...t.registerables),this._theme=k.getColorTheme(),k.onDidColorThemeChange(R=>{this._theme=R,this._data&&(this.data=this._data)}),this.options=(0,y.mixin)(A,i,!1);let L=document.createElement("div");L.style.width="100%",L.style.height="100%",this.canvas=document.createElement("canvas"),L.appendChild(this.canvas),_.appendChild(L)}dispose(){}layout(){}getCanvasData(){return this.chartjs&&this.chartjs.toBase64Image()}set data(_){if(!_)return;this._data=_;let A,k;if(this.options.dataDirection===m.DataDirection.Horizontal?this.options.labelFirstColumn?A=_.columns.slice(1):A=_.columns:A=_.rows.map(L=>L[0]),this.originalType===m.ChartType.TimeSeries){let L={};this._data.rows.map(R=>{if(R&&R.length>=3){let M=R[0];const N={x:R[1],y:Number(R[2])};L[M]?L[M].data.push(N):L[M]={label:M,data:[N]}}}),k=(0,S.values)(L)}else this.options.dataDirection===m.DataDirection.Horizontal?this.options.labelFirstColumn?k=_.rows.map(L=>({data:L.map(R=>Number(R)).slice(1),label:L[0]})):k=_.rows.map((L,R)=>({data:L.map(M=>Number(M)),label:(0,b.localize)(0,null,R)})):this.options.columnsAsLabels?k=_.rows[0].slice(1).map((L,R)=>({data:_.rows.map(M=>Number(M[R+1])),label:_.columns[R+1]})):k=_.rows[0].slice(1).map((L,R)=>({data:_.rows.map(M=>Number(M[R+1])),label:(0,b.localize)(1,null,R+1)}));k=k.map((L,R)=>(0,y.mixin)(L,C(this.options.type,R,L.data.length),!1)),this.options.type==="horizontalBar"&&(this.options.type=m.ChartType.Bar,this.options.indexAxis="y"),this.chartjs?(this.chartjs.data.datasets=k,this.chartjs.config.type=m.ChartTypeToChartJsType[this.options.type],this.chartjs.data.labels=this.originalType==="timeSeries"?[]:A,this.chartjs.options=this.transformOptions(this.options),this.chartjs.update()):this.chartjs=new t.Chart(this.canvas.getContext("2d"),{data:{labels:this.originalType==="timeSeries"?[]:A,datasets:k},type:m.ChartTypeToChartJsType[this.options.type],options:this.transformOptions(this.options)})}transformOptions(_){let A={};A.maintainAspectRatio=!1;let k=this._theme.getColor(D.editorForeground),L=k?k.toString():void 0,R=this._theme.getColor(T.editorLineNumbers),M=R?R.toString():void 0,N=this._theme.getColor(D.editorBackground),P=N?N.toString():void 0;return _&&(A.scales={},a.find(x=>x===_.type)||(A.scales.x={ticks:{color:L},grid:{color:M},title:{color:L,text:_.xAxisLabel,display:!!_.xAxisLabel}},_.xAxisMax!==void 0&&(A.scales=(0,y.mixin)(A.scales,{x:{max:_.xAxisMax}},!0,v.customMixin)),_.xAxisMin!==void 0&&(A.scales=(0,y.mixin)(A.scales,{x:{min:_.xAxisMin}},!0,v.customMixin)),A.scales.y={ticks:{color:L},grid:{color:M},title:{color:L,text:_.yAxisLabel,display:!!_.yAxisLabel}},_.yAxisMax!==void 0&&(A.scales=(0,y.mixin)(A.scales,{y:{max:_.yAxisMax}},!0,v.customMixin)),_.yAxisMin!==void 0&&(A.scales=(0,y.mixin)(A.scales,{y:{min:_.yAxisMin}},!0,v.customMixin)),this.originalType===m.ChartType.TimeSeries&&(A=(0,y.mixin)(A,r,!0,v.customMixin),_.xAxisMax!==void 0&&(A=(0,y.mixin)(A,{scales:{x:{max:_.xAxisMax}}},!0,v.customMixin)),_.xAxisMin!==void 0&&(A=(0,y.mixin)(A,{scales:{x:{min:_.xAxisMin}}},!0,v.customMixin)))),A.plugins={legend:{position:m.LegendPositionToChartJsPosition[_.legendPosition],display:_.legendPosition!==m.LegendPosition.None,labels:{color:L}}},_.indexAxis==="y"&&(A.indexAxis="y")),A.viewArea={backgroundColor:P},A}set options(_){this._options=_,this.originalType=_.type,this.options.type===m.ChartType.TimeSeries&&(this.options.type=m.ChartType.Line,this.options.dataType=m.DataType.Point,this.options.dataDirection=m.DataDirection.Horizontal),this._data&&(this.data=this._data)}get options(){return this._options}};e.Graph=s,e.Graph=s=h=fe([O(2,f.IThemeService)],s);const o=[[255,99,132],[54,162,235],[255,206,86],[231,233,237],[75,192,192],[151,187,205],[220,220,220],[247,70,74],[70,191,189],[253,180,92],[148,159,177],[77,83,96]];function u(I,_){return"rgba("+I.concat(_).join(",")+")"}function d(I,_){return Math.floor(Math.random()*(_-I+1))+I}function p(){return[d(0,255),d(0,255),d(0,255)]}function c(I){return o[I]||p()}function l(I){const _=new Array(I);for(let A=0;A<I;A++)_[A]=o[A]||p();return _}function n(I){return{backgroundColor:u(I,.4),borderColor:u(I,1),pointBackgroundColor:u(I,1),pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:u(I,.8)}}function g(I){return{backgroundColor:u(I,.6),borderColor:u(I,1),hoverBackgroundColor:u(I,.8),hoverBorderColor:u(I,1)}}function w(I){return{backgroundColor:I.map(_=>u(_,.6)),borderColor:I.map(()=>"#fff"),pointBackgroundColor:I.map(_=>u(_,1)),pointBorderColor:I.map(()=>"#fff"),pointHoverBackgroundColor:I.map(_=>u(_,1)),pointHoverBorderColor:I.map(_=>u(_,1))}}function E(I){return{backgroundColor:I.map(_=>u(_,.6)),borderColor:I.map(_=>u(_,1)),hoverBackgroundColor:I.map(_=>u(_,.8)),hoverBorderColor:I.map(_=>u(_,1))}}function C(I,_,A){return I==="pie"||I==="doughnut"?w(l(A)):I==="polarArea"?E(l(A)):I==="line"||I==="radar"?n(c(_)):I==="bar"||I==="horizontalBar"?g(c(_)):c(_)}}),define(Q[3367],Y([1,0,1213,3214,3322,2292,5,7,42,215]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Insight=void 0;const S={type:m.ChartType.Bar,dataDirection:m.DataDirection.Horizontal};let h=class{get insight(){return this._insight}constructor(r,i=S,s){this.container=r,this._instantiationService=s,this.options=i,this.buildInsight()}layout(r){this.dim=r,this.insight&&this.insight.layout(r)}set options(r){this._options=(0,v.deepClone)(r),this.insight&&this.options&&(this.insight.types.find(i=>i===this.options.type)?this.insight.options=this.options:this.buildInsight())}get options(){return this._options}set data(r){this._data=r,this.insight&&(this.insight.data=r)}buildInsight(){if(this.insight&&this.insight.dispose(),(0,f.clearNode)(this.container),this.options){const r=this.findctor(this.options.type);r&&(this._insight=this._instantiationService.createInstance(r,this.container,this.options),this.dim&&this.insight.layout(this.dim),this._data&&(this.insight.data=this._data))}}get isCopyable(){return!!this.options&&!!t.Graph.types.find(r=>r===this.options.type)}findctor(r){if(t.Graph.types.find(i=>i===r))return t.Graph;if(y.ImageInsight.types.find(i=>i===r))return y.ImageInsight;if(b.TableInsight.types.find(i=>i===r))return b.TableInsight;if(D.CountInsight.types.find(i=>i===r))return D.CountInsight}};e.Insight=h,e.Insight=h=fe([O(2,T.IInstantiationService)],h)}),define(Q[889],Y([1,0,1207,389,36,232,40,19,76,215,215]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let h=class extends t.ChartInsight{constructor(r,i,s){super(r,i,s),this.chartType=S.ChartType.Bar}setConfig(r){let i={};if(r.xAxisMax){const s={scales:{x:{display:!0,max:r.xAxisMax}}};i=(0,y.mixin)({},(0,y.mixin)(i,s,!0,m.customMixin))}if(r.xAxisMin){const s={scales:{x:{display:!0,min:r.xAxisMin}}};i=(0,y.mixin)({},(0,y.mixin)(i,s,!0,m.customMixin))}if(r.xAxisLabel){const s={scales:{x:{display:!0,title:{display:!0,text:r.xAxisLabel}}}};i=(0,y.mixin)({},(0,y.mixin)(i,s,!0,m.customMixin))}if(r.yAxisMax){const s={scales:{y:{display:!0,max:r.yAxisMax}}};i=(0,y.mixin)({},(0,y.mixin)(i,s,!0,m.customMixin))}if(r.yAxisMin){const s={scales:{y:{display:!0,min:r.yAxisMin}}};i=(0,y.mixin)({},(0,y.mixin)(i,s,!0,m.customMixin))}if(r.yAxisLabel){const s={scales:{y:{display:!0,title:{display:!0,text:r.yAxisLabel}}}};i=(0,y.mixin)({},(0,y.mixin)(i,s,!0,m.customMixin))}this.options=(0,y.mixin)({},(0,y.mixin)(this.options,i,!0,m.customMixin)),super.setConfig(r)}updateTheme(r){super.updateTheme(r);const i=r.getColor(b.editorForeground),s=i?i.toString():null,o=r.getColor(D.editorLineNumbers),u=o?o.toString():null,d={scales:{x:{title:{color:s},ticks:{color:s},grid:{color:u}},y:{title:{color:s},ticks:{color:s},grid:{color:u}}}};this.options=(0,y.mixin)({},(0,y.mixin)(this.options,d,!0,m.customMixin))}};h=fe([O(0,(0,T.Inject)((0,T.forwardRef)(()=>T.ChangeDetectorRef))),O(1,(0,T.Inject)(f.IThemeService)),O(2,(0,T.Inject)(v.IAdsTelemetryService))],h),e.default=h}),define(Q[596],Y([1,0,42,2036,230,815,889]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.barChartSchema=void 0;const f={properties:{yAxisMin:{type:"number",description:y.localize(0,null)},yAxisMax:{type:"number",description:y.localize(1,null)},yAxisLabel:{type:"string",description:y.localize(2,null)},xAxisMin:{type:"number",description:y.localize(3,null)},xAxisMax:{type:"number",description:y.localize(4,null)},xAxisLabel:{type:"string",description:y.localize(5,null)}}};e.barChartSchema=(0,t.mixin)((0,t.deepClone)(D.chartInsightSchema),f),(0,b.registerInsight)("bar","",e.barChartSchema,T.default)}),define(Q[3368],Y([1,0,889,40,19,76,215,389,215]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let m=class extends t.default{constructor(h,a,r){super(h,a,r),this.chartType=T.ChartType.Bar}setConfig(h){let a={indexAxis:"y"};this.options=(0,f.mixin)({},(0,f.mixin)(this.options,a,!0,v.customMixin)),super.setConfig(h)}};m=fe([O(0,(0,y.Inject)((0,y.forwardRef)(()=>y.ChangeDetectorRef))),O(1,(0,y.Inject)(b.IThemeService)),O(2,(0,y.Inject)(D.IAdsTelemetryService))],m),e.default=m}),define(Q[3369],Y([1,0,42,230,596,3368]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const T={},f=(0,t.mixin)((0,t.deepClone)(b.barChartSchema),T);(0,y.registerInsight)("horizontalBar","",f,D.default)}),define(Q[890],Y([1,0,42,889,652,40,19,215,141,76]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const S=(0,t.mixin)((0,t.deepClone)(b.defaultChartConfig),{dataType:"number"});let h=class extends y.default{constructor(r,i,s){super(r,i,s),this.chartType=f.ChartType.Line,this._defaultConfig=S}init(){this._config.dataType===f.DataType.Point&&this.addAxisLabels(),super.init()}get chartData(){return this._config.dataType===f.DataType.Number?super.getChartData():this.getDataAsPoint()}clearMemoize(){super.clearMemoize(),this._cachedPointData=void 0}getDataAsPoint(){if(!this._cachedPointData){const r={};this._data.rows.map(i=>{if(i&&i.length>=3){const s=i[0];r[s]||(r[s]={label:s,data:[],fill:!1}),r[s].data.push({x:Number(i[1]),y:Number(i[2])})}}),this._cachedPointData=(0,v.values)(r)}return this._cachedPointData}get labels(){return this._config.dataType===f.DataType.Number?super.getLabels():[]}addAxisLabels(){const r=this._config.xAxisLabel||this._data.columns[1]||"x",i=this._config.yAxisLabel||this._data.columns[2]||"y",s={scales:{x:{type:"linear",position:"bottom",display:!0,title:{display:!0,text:r}},y:{display:!0,title:{display:!0,text:i}}}};this.options=(0,t.mixin)(this.options,s,!0)}};h=fe([O(0,(0,D.Inject)((0,D.forwardRef)(()=>D.ChangeDetectorRef))),O(1,(0,D.Inject)(T.IThemeService)),O(2,(0,D.Inject)(m.IAdsTelemetryService))],h),e.default=h}),define(Q[3370],Y([1,0,42,2037,230,596,890]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lineSchema=void 0;const f={properties:{dataType:{type:"string",description:y.localize(0,null),default:"number",enum:["number","point"],enumDescriptions:['Set "number" if the data values are contained in 1 column.','Set "point" if the data is an {x,y} combination requiring 2 columns for each value.']}}};e.lineSchema=(0,t.mixin)((0,t.deepClone)(D.barChartSchema),f),(0,b.registerInsight)("line","",e.lineSchema,T.default)}),define(Q[3371],Y([1,0,890,652,42,40,19,76,215]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const m=(0,b.mixin)((0,b.deepClone)(y.defaultChartConfig),{dataType:"point",dataDirection:"horizontal"});let S=class extends t.default{constructor(a,r,i){super(a,r,i),this.chartType=v.ChartType.Scatter,this._defaultConfig=m}};S=fe([O(0,(0,D.Inject)((0,D.forwardRef)(()=>D.ChangeDetectorRef))),O(1,(0,D.Inject)(T.IThemeService)),O(2,(0,D.Inject)(f.IAdsTelemetryService))],S),e.default=S}),define(Q[3372],Y([1,0,42,230,596,3371]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const T={},f=(0,t.mixin)((0,t.deepClone)(b.barChartSchema),T);(0,y.registerInsight)("scatter","",f,D.default)}),define(Q[3373],Y([1,0,890,652,42,80,40,19,215,141,76]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const h=(0,b.mixin)((0,b.deepClone)(y.defaultChartConfig),{dataType:"point",dataDirection:"horizontal"});let a=class extends t.default{constructor(i,s,o){super(i,s,o),this._defaultConfig=h}addAxisLabels(){const i=this._config.xAxisLabel||this.getLabels()[1]||"x",s=this._config.yAxisLabel||this.getLabels()[2]||"y",o={scales:{x:{type:"time",display:!0,title:{display:!0,text:i},ticks:{autoSkip:!1,maxRotation:45,minRotation:45}},y:{display:!0,title:{display:!0,text:s}}}};this.options=Object.assign({},(0,b.mixin)(this.options,o))}getDataAsPoint(){const i={};return this._data.rows.map(s=>{if(s&&s.length>=3){const o=s[0];i[o]||(i[o]={label:o,data:[]}),i[o].data.push({x:s[1],y:Number(s[2])}),this.chartType===v.ChartType.Scatter&&(i[o].backgroundColor=D.Color.cyan.toString())}}),(0,m.values)(i)}};a=fe([O(0,(0,T.Inject)((0,T.forwardRef)(()=>T.ChangeDetectorRef))),O(1,(0,T.Inject)(f.IThemeService)),O(2,(0,T.Inject)(S.IAdsTelemetryService))],a),e.default=a}),define(Q[3374],Y([1,0,42,230,596,3373]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const T={},f=(0,t.mixin)((0,t.deepClone)(b.barChartSchema),T);(0,y.registerInsight)("timeSeries","",f,D.default)}),define(Q[3375],Y([1,0,442,232,20,19,96,167,1700]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CurrentLineMarginHighlightOverlay=e.CurrentLineHighlightOverlay=e.AbstractLineHighlightOverlay=void 0;class v extends t.DynamicViewOverlay{constructor(a){super(),this._context=a;const r=this._context.configuration.options,i=r.get(142);this._lineHeight=r.get(65),this._renderLineHighlight=r.get(94),this._renderLineHighlightOnlyWhenFocus=r.get(95),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new T.Selection(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let a=!1;const r=this._selections.map(s=>s.positionLineNumber);r.sort((s,o)=>s-o),b.equals(this._cursorLineNumbers,r)||(this._cursorLineNumbers=r,a=!0);const i=this._selections.every(s=>s.isEmpty());return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,a=!0),a}onThemeChanged(a){return this._readFromSelections()}onConfigurationChanged(a){const r=this._context.configuration.options,i=r.get(142);return this._lineHeight=r.get(65),this._renderLineHighlight=r.get(94),this._renderLineHighlightOnlyWhenFocus=r.get(95),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(a){return this._selections=a.selections,this._readFromSelections()}onFlushed(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollWidthChanged||a.scrollTopChanged}onZonesChanged(a){return!0}onFocusChanged(a){return this._renderLineHighlightOnlyWhenFocus?(this._focused=a.isFocused,!0):!1}prepareRender(a){if(!this._shouldRenderThis()){this._renderData=null;return}const r=this._renderOne(a),i=a.visibleRange.startLineNumber,s=a.visibleRange.endLineNumber,o=this._cursorLineNumbers.length;let u=0;const d=[];for(let p=i;p<=s;p++){const c=p-i;for(;u<o&&this._cursorLineNumbers[u]<p;)u++;u<o&&this._cursorLineNumbers[u]===p?d[c]=r:d[c]=""}this._renderData=d}render(a,r){if(!this._renderData)return"";const i=r-a;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}e.AbstractLineHighlightOverlay=v;class m extends v{_renderOne(a){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(a.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}e.CurrentLineHighlightOverlay=m;class S extends v{_renderOne(a){return`<div class="${"current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}e.CurrentLineMarginHighlightOverlay=S,(0,D.registerThemingParticipant)((h,a)=>{const r=h.getColor(y.editorLineHighlight);if(r&&(a.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${r}; }`),a.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${r}; border: none; }`)),!r||r.isTransparent()||h.defines(y.editorLineHighlightBorder)){const i=h.getColor(y.editorLineHighlightBorder);i&&(a.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),a.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),(0,f.isHighContrast)(h.type)&&(a.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),a.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}})}),define(Q[3376],Y([1,0,442,232,19,51,20,17,1082,802,1703]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuidesOverlay=void 0;class S extends t.DynamicViewOverlay{constructor(r){super(),this._context=r,this._primaryPosition=null;const i=this._context.configuration.options,s=i.get(143),o=i.get(49);this._lineHeight=i.get(65),this._spaceWidth=o.spaceWidth,this._maxIndentLeft=s.wrappingColumn===-1?-1:s.wrappingColumn*o.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=i.get(15),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(r){const i=this._context.configuration.options,s=i.get(143),o=i.get(49);return this._lineHeight=i.get(65),this._spaceWidth=o.spaceWidth,this._maxIndentLeft=s.wrappingColumn===-1?-1:s.wrappingColumn*o.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=i.get(15),!0}onCursorStateChanged(r){const s=r.selections[0].getPosition();return this._primaryPosition?.equals(s)?!1:(this._primaryPosition=s,!0)}onDecorationsChanged(r){return!0}onFlushed(r){return!0}onLinesChanged(r){return!0}onLinesDeleted(r){return!0}onLinesInserted(r){return!0}onScrollChanged(r){return r.scrollTopChanged}onZonesChanged(r){return!0}onLanguageConfigurationChanged(r){return!0}prepareRender(r){if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const i=r.visibleRange.startLineNumber,s=r.visibleRange.endLineNumber,o=r.scrollWidth,u=this._lineHeight,d=this._primaryPosition,p=this.getGuidesByLine(i,Math.min(s+1,this._context.viewModel.getLineCount()),d),c=[];for(let l=i;l<=s;l++){const n=l-i,g=p[n];let w="";const E=r.visibleRangeForPosition(new D.Position(l,1))?.left??0;for(const C of g){const I=C.column===-1?E+(C.visibleColumn-1)*this._spaceWidth:r.visibleRangeForPosition(new D.Position(l,C.column)).left;if(I>o||this._maxIndentLeft>0&&I>this._maxIndentLeft)break;const _=C.horizontalLine?C.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",A=C.horizontalLine?(r.visibleRangeForPosition(new D.Position(l,C.horizontalLine.endColumn))?.left??I+this._spaceWidth)-I:this._spaceWidth;w+=`<div class="core-guide ${C.className} ${_}" style="left:${I}px;height:${u}px;width:${A}px"></div>`}c[n]=w}this._renderResult=c}getGuidesByLine(r,i,s){const o=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(r,i,s,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?m.HorizontalGuidesState.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?m.HorizontalGuidesState.EnabledForActive:m.HorizontalGuidesState.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,u=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(r,i):null;let d=0,p=0,c=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&s){const g=this._context.viewModel.getActiveIndentGuide(s.lineNumber,r,i);d=g.startLineNumber,p=g.endLineNumber,c=g.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),n=[];for(let g=r;g<=i;g++){const w=new Array;n.push(w);const E=o?o[g-r]:[],C=new T.ArrayQueue(E),I=u?u[g-r]:0;for(let _=1;_<=I;_++){const A=(_-1)*l+1,k=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||E.length===0)&&d<=g&&g<=p&&_===c;w.push(...C.takeWhile(R=>R.visibleColumn<A)||[]);const L=C.peek();(!L||L.visibleColumn!==A||L.horizontalLine)&&w.push(new m.IndentGuide(A,-1,`core-guide-indent lvl-${(_-1)%30}`+(k?" indent-active":""),null,-1,-1))}w.push(...C.takeWhile(_=>!0)||[])}return n}render(r,i){if(!this._renderResult)return"";const s=i-r;return s<0||s>=this._renderResult.length?"":this._renderResult[s]}}e.IndentGuidesOverlay=S;function h(a){if(!(a&&a.isTransparent()))return a}(0,b.registerThemingParticipant)((a,r)=>{const i=[{bracketColor:y.editorBracketHighlightingForeground1,guideColor:y.editorBracketPairGuideBackground1,guideColorActive:y.editorBracketPairGuideActiveBackground1},{bracketColor:y.editorBracketHighlightingForeground2,guideColor:y.editorBracketPairGuideBackground2,guideColorActive:y.editorBracketPairGuideActiveBackground2},{bracketColor:y.editorBracketHighlightingForeground3,guideColor:y.editorBracketPairGuideBackground3,guideColorActive:y.editorBracketPairGuideActiveBackground3},{bracketColor:y.editorBracketHighlightingForeground4,guideColor:y.editorBracketPairGuideBackground4,guideColorActive:y.editorBracketPairGuideActiveBackground4},{bracketColor:y.editorBracketHighlightingForeground5,guideColor:y.editorBracketPairGuideBackground5,guideColorActive:y.editorBracketPairGuideActiveBackground5},{bracketColor:y.editorBracketHighlightingForeground6,guideColor:y.editorBracketPairGuideBackground6,guideColorActive:y.editorBracketPairGuideActiveBackground6}],s=new v.BracketPairGuidesClassNames,o=[{indentColor:y.editorIndentGuide1,indentColorActive:y.editorActiveIndentGuide1},{indentColor:y.editorIndentGuide2,indentColorActive:y.editorActiveIndentGuide2},{indentColor:y.editorIndentGuide3,indentColorActive:y.editorActiveIndentGuide3},{indentColor:y.editorIndentGuide4,indentColorActive:y.editorActiveIndentGuide4},{indentColor:y.editorIndentGuide5,indentColorActive:y.editorActiveIndentGuide5},{indentColor:y.editorIndentGuide6,indentColorActive:y.editorActiveIndentGuide6}],u=i.map(p=>{const c=a.getColor(p.bracketColor),l=a.getColor(p.guideColor),n=a.getColor(p.guideColorActive),g=h(h(l)??c?.transparent(.3)),w=h(h(n)??c);if(!(!g||!w))return{guideColor:g,guideColorActive:w}}).filter(f.isDefined),d=o.map(p=>{const c=a.getColor(p.indentColor),l=a.getColor(p.indentColorActive),n=h(c),g=h(l);if(!(!n||!g))return{indentColor:n,indentColorActive:g}}).filter(f.isDefined);if(u.length>0){for(let p=0;p<30;p++){const c=u[p%u.length];r.addRule(`.monaco-editor .${s.getInlineClassNameOfLevel(p).replace(/ /g,".")} { --guide-color: ${c.guideColor}; --guide-color-active: ${c.guideColorActive}; }`)}r.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),r.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),r.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),r.addRule(`.monaco-editor .vertical.${s.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),r.addRule(`.monaco-editor .horizontal-top.${s.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),r.addRule(`.monaco-editor .horizontal-bottom.${s.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(d.length>0){for(let p=0;p<30;p++){const c=d[p%d.length];r.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${p} { --indent-color: ${c.indentColor}; --indent-color-active: ${c.indentColorActive}; }`)}r.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),r.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}})}),define(Q[1214],Y([1,0,18,442,51,19,232,1704]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineNumbersOverlay=void 0;class f extends y.DynamicViewOverlay{static{this.CLASS_NAME="line-numbers"}constructor(m){super(),this._context=m,this._readConfig(),this._lastCursorModelPosition=new b.Position(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const m=this._context.configuration.options;this._lineHeight=m.get(65);const S=m.get(66);this._renderLineNumbers=S.renderType,this._renderCustomLineNumbers=S.renderFn,this._renderFinalNewline=m.get(93);const h=m.get(142);this._lineNumbersLeft=h.lineNumbersLeft,this._lineNumbersWidth=h.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(m){return this._readConfig(),!0}onCursorStateChanged(m){const S=m.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(S);let h=!1;return this._activeLineNumber!==S.lineNumber&&(this._activeLineNumber=S.lineNumber,h=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(h=!0),h}onFlushed(m){return!0}onLinesChanged(m){return!0}onLinesDeleted(m){return!0}onLinesInserted(m){return!0}onScrollChanged(m){return m.scrollTopChanged}onZonesChanged(m){return!0}_getLineRenderLineNumber(m){const S=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new b.Position(m,1));if(S.column!==1)return"";const h=S.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(h);if(this._renderLineNumbers===2){const a=Math.abs(this._lastCursorModelPosition.lineNumber-h);return a===0?'<span class="relative-current-line-number">'+h+"</span>":String(a)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===h||h%10===0?String(h):"":String(h)}prepareRender(m){if(this._renderLineNumbers===0){this._renderResult=null;return}const S=t.isLinux?this._lineHeight%2===0?" lh-even":" lh-odd":"",h=m.visibleRange.startLineNumber,a=m.visibleRange.endLineNumber,r=this._context.viewModel.getLineCount(),i=[];for(let s=h;s<=a;s++){const o=s-h,u=this._getLineRenderLineNumber(s);if(!u){i[o]="";continue}let d="";if(s===r&&this._context.viewModel.getLineLength(s)===0){if(this._renderFinalNewline==="off"){i[o]="";continue}this._renderFinalNewline==="dimmed"&&(d=" dimmed-line-number")}s===this._activeLineNumber&&(d=" active-line-number"),i[o]=`<div class="${f.CLASS_NAME}${S}${d}" style="left:${this._lineNumbersLeft}px;width:${this._lineNumbersWidth}px;">${u}</div>`}this._renderResult=i}render(m,S){if(!this._renderResult)return"";const h=S-m;return h<0||h>=this._renderResult.length?"":this._renderResult[h]}}e.LineNumbersOverlay=f,(0,D.registerThemingParticipant)((v,m)=>{const S=v.getColor(T.editorLineNumbers),h=v.getColor(T.editorDimmedLineNumber);h?m.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${h}; }`):S&&m.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${S.transparent(.4)}; }`)})}),define(Q[3377],Y([1,0,2328,97,140,18,33,258,675,1068,239,1214,1084,133,563,51,27,96,484,99,80,1032,38,1698]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaHandler=void 0;class g{constructor(_,A,k,L,R){this._context=_,this.modelLineNumber=A,this.distanceToModelLineStart=k,this.widthOfHiddenLineTextBefore=L,this.distanceToModelLineEnd=R,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(_){const A=new s.Position(this.modelLineNumber,this.distanceToModelLineStart+1),k=new s.Position(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(A),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(k),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=_.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=_.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(_){return this._previousPresentation||(_?this._previousPresentation=_:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const w=y.isFirefox;let E=class extends S.ViewPart{constructor(_,A,k,L){super(_),this._keybindingService=L,this._primaryCursorPosition=new s.Position(1,1),this._primaryCursorVisibleRange=null,this._viewController=A,this._visibleRangeProvider=k,this._scrollLeft=0,this._scrollTop=0;const R=this._context.configuration.options,M=R.get(142);this._setAccessibilityOptions(R),this._contentLeft=M.contentLeft,this._contentWidth=M.contentWidth,this._contentHeight=M.height,this._fontInfo=R.get(49),this._lineHeight=R.get(65),this._emptySelectionClipboard=R.get(36),this._copyWithSyntaxHighlighting=R.get(24),this._visibleTextArea=null,this._selections=[new u.Selection(1,1,1,1)],this._modelSelections=[new u.Selection(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,b.createFastDomNode)(document.createElement("textarea")),S.PartFingerprints.write(this.textArea,6),this.textArea.setClassName(`inputarea ${d.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:N}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${N*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(R)),this.textArea.setAttribute("aria-required",R.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(R.get(122))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",t.localize(0,null)),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",R.get(89)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=(0,b.createFastDomNode)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const P={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:V=>this._context.viewModel.getLineMaxColumn(V),getValueInRange:(V,W)=>this._context.viewModel.getValueInRange(V,W),getValueLengthInRange:(V,W)=>this._context.viewModel.getValueLengthInRange(V,W),modifyPosition:(V,W)=>this._context.viewModel.modifyPosition(V,W)},x={getDataToCopy:()=>{const V=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,D.isWindows),W=this._context.viewModel.model.getEOL(),z=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),B=Array.isArray(V)?V:null,K=Array.isArray(V)?V.join(W):V;let H,U=null;if(v.CopyOptions.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&K.length<65536){const G=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);G&&(H=G.html,U=G.mode)}return{isFromEmptySelection:z,multicursorText:B,text:K,html:H,mode:U}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const V=this._selections[0];if(D.isMacintosh&&V.isEmpty()){const z=V.getStartPosition();let B=this._getWordBeforePosition(z);if(B.length===0&&(B=this._getCharacterBeforePosition(z)),B.length>0)return new m.TextAreaState(B,B.length,B.length,o.Range.fromPositions(z),0)}const W=500;if(D.isMacintosh&&!V.isEmpty()&&P.getValueLengthInRange(V,0)<W){const z=P.getValueInRange(V,0);return new m.TextAreaState(z,0,z.length,V,0)}if(y.isSafari&&!V.isEmpty()){const z="vscode-placeholder";return new m.TextAreaState(z,0,z.length,null,void 0)}return m.TextAreaState.EMPTY}if(y.isAndroid){const V=this._selections[0];if(V.isEmpty()){const W=V.getStartPosition(),[z,B]=this._getAndroidWordAtPosition(W);if(z.length>0)return new m.TextAreaState(z,B,B,o.Range.fromPositions(W),0)}return m.TextAreaState.EMPTY}return m.PagedScreenReaderStrategy.fromEditorSelection(P,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(V,W,z)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(V,W,z)},F=this._register(new v.TextAreaWrapper(this.textArea.domNode));this._textAreaInput=this._register(new v.TextAreaInput(x,F,D.OS,{isAndroid:y.isAndroid,isChrome:y.isChrome,isFirefox:y.isFirefox,isSafari:y.isSafari})),this._register(this._textAreaInput.onKeyDown(V=>{this._viewController.emitKeyDown(V)})),this._register(this._textAreaInput.onKeyUp(V=>{this._viewController.emitKeyUp(V)})),this._register(this._textAreaInput.onPaste(V=>{let W=!1,z=null,B=null;V.metadata&&(W=this._emptySelectionClipboard&&!!V.metadata.isFromEmptySelection,z=typeof V.metadata.multicursorText<"u"?V.metadata.multicursorText:null,B=V.metadata.mode),this._viewController.paste(V.text,W,z,B)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(V=>{V.replacePrevCharCnt||V.replaceNextCharCnt||V.positionDelta?(m._debugComposition&&console.log(` => compositionType: <<${V.text}>>, ${V.replacePrevCharCnt}, ${V.replaceNextCharCnt}, ${V.positionDelta}`),this._viewController.compositionType(V.text,V.replacePrevCharCnt,V.replaceNextCharCnt,V.positionDelta)):(m._debugComposition&&console.log(` => type: <<${V.text}>>`),this._viewController.type(V.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(V=>{this._viewController.setSelection(V)})),this._register(this._textAreaInput.onCompositionStart(V=>{const W=this.textArea.domNode,z=this._modelSelections[0],{distanceToModelLineStart:B,widthOfHiddenTextBefore:K}=(()=>{const U=W.value.substring(0,Math.min(W.selectionStart,W.selectionEnd)),G=U.lastIndexOf(` `),$=U.substring(G+1),ie=$.lastIndexOf(" "),J=$.length-ie-1,j=z.getStartPosition(),ee=Math.min(j.column-1,J),X=j.column-1-ee,te=$.substring(0,$.length-ee),{tabSize:Z}=this._context.viewModel.model.getOptions(),se=C(te,this._fontInfo,Z);return{distanceToModelLineStart:X,widthOfHiddenTextBefore:se}})(),{distanceToModelLineEnd:H}=(()=>{const U=W.value.substring(Math.max(W.selectionStart,W.selectionEnd)),G=U.indexOf(` `),$=G===-1?U:U.substring(0,G),ie=$.indexOf(" "),J=ie===-1?$.length:$.length-ie-1,j=z.getEndPosition(),ee=Math.min(this._context.viewModel.model.getLineMaxColumn(j.lineNumber)-j.column,J);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(j.lineNumber)-j.column-ee}})();this._context.viewModel.revealRange("keyboard",!0,o.Range.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new g(this._context,z.startLineNumber,B,K,H),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${d.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(V=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${d.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(l.IME.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(_){this._textAreaInput.writeScreenReaderContent(_)}dispose(){super.dispose()}_getAndroidWordAtPosition(_){const A='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',k=this._context.viewModel.getLineContent(_.lineNumber),L=(0,i.getMapForWordSeparators)(A);let R=!0,M=_.column,N=!0,P=_.column,x=0;for(;x<50&&(R||N);){if(R&&M<=1&&(R=!1),R){const F=k.charCodeAt(M-2);L.get(F)!==0?R=!1:M--}if(N&&P>k.length&&(N=!1),N){const F=k.charCodeAt(P-1);L.get(F)!==0?N=!1:P++}x++}return[k.substring(M-1,P-1),_.column-M]}_getWordBeforePosition(_){const A=this._context.viewModel.getLineContent(_.lineNumber),k=(0,i.getMapForWordSeparators)(this._context.configuration.options.get(128));let L=_.column,R=0;for(;L>1;){const M=A.charCodeAt(L-2);if(k.get(M)!==0||R>50)return A.substring(L-1,_.column-1);R++,L--}return A.substring(0,_.column-1)}_getCharacterBeforePosition(_){if(_.column>1){const k=this._context.viewModel.getLineContent(_.lineNumber).charAt(_.column-2);if(!T.isHighSurrogate(k.charCodeAt(0)))return k}return""}_getAriaLabel(_){if(_.get(2)===1){const k=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode")?.getAriaLabel(),L=this._keybindingService.lookupKeybinding("workbench.action.showCommands")?.getAriaLabel(),R=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings")?.getAriaLabel(),M=t.localize(1,null);return k?t.localize(2,null,M,k):L?t.localize(3,null,M,L):R?t.localize(4,null,M,R):M}return _.get(4)}_setAccessibilityOptions(_){this._accessibilitySupport=_.get(2);const A=_.get(3);this._accessibilitySupport===2&&A===r.EditorOptions.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=A;const L=_.get(142).wrappingColumn;if(L!==-1&&this._accessibilitySupport!==1){const R=_.get(49);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(L*R.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=w?0:1}onConfigurationChanged(_){const A=this._context.configuration.options,k=A.get(142);this._setAccessibilityOptions(A),this._contentLeft=k.contentLeft,this._contentWidth=k.contentWidth,this._contentHeight=k.height,this._fontInfo=A.get(49),this._lineHeight=A.get(65),this._emptySelectionClipboard=A.get(36),this._copyWithSyntaxHighlighting=A.get(24),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:L}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${L*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(A)),this.textArea.setAttribute("aria-required",A.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(A.get(122))),(_.hasChanged(33)||_.hasChanged(89))&&this._ensureReadOnlyAttribute(),_.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(_){return this._selections=_.selections.slice(0),this._modelSelections=_.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(_){return!0}onFlushed(_){return!0}onLinesChanged(_){return!0}onLinesDeleted(_){return!0}onLinesInserted(_){return!0}onScrollChanged(_){return this._scrollLeft=_.scrollLeft,this._scrollTop=_.scrollTop,!0}onZonesChanged(_){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}refreshFocusState(){this._textAreaInput.refreshFocusState()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(_){_.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",_.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),_.role&&this.textArea.setAttribute("role",_.role)}_ensureReadOnlyAttribute(){const _=this._context.configuration.options;!l.IME.enabled||_.get(33)&&_.get(89)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(_){this._primaryCursorPosition=new s.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=_.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea?.prepareRender(_)}render(_){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){const k=this._visibleTextArea.visibleTextareaStart,L=this._visibleTextArea.visibleTextareaEnd,R=this._visibleTextArea.startPosition,M=this._visibleTextArea.endPosition;if(R&&M&&k&&L&&L.left>=this._scrollLeft&&k.left<=this._scrollLeft+this._contentWidth){const N=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,P=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let x=this._visibleTextArea.widthOfHiddenLineTextBefore,F=this._contentLeft+k.left-this._scrollLeft,V=L.left-k.left+1;if(F<this._contentLeft){const U=this._contentLeft-F;F+=U,x+=U,V-=U}V>this._contentWidth&&(V=this._contentWidth);const W=this._context.viewModel.getViewLineData(R.lineNumber),z=W.tokens.findTokenIndexAtOffset(R.column-1),B=W.tokens.findTokenIndexAtOffset(M.column-1),K=z===B,H=this._visibleTextArea.definePresentation(K?W.tokens.getPresentation(z):null);this.textArea.domNode.scrollTop=P*this._lineHeight,this.textArea.domNode.scrollLeft=x,this._doRender({lastRenderPosition:null,top:N,left:F,width:V,height:this._lineHeight,useCover:!1,color:(p.TokenizationRegistry.getColorMap()||[])[H.foreground],italic:H.italic,bold:H.bold,underline:H.underline,strikethrough:H.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const _=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(_<this._contentLeft||_>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const A=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(A<0||A>this._contentHeight){this._renderAtTopLeft();return}if(D.isMacintosh){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:A,left:this._textAreaWrapping?this._contentLeft:_,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const k=this._textAreaInput.textAreaState.newlineCountBeforeSelection??this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=k*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:A,left:this._textAreaWrapping?this._contentLeft:_,width:this._textAreaWidth,height:w?0:1,useCover:!1})}_newlinecount(_){let A=0,k=-1;do{if(k=_.indexOf(` `,k+1),k===-1)break;A++}while(!0);return A}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:w?0:1,useCover:!0})}_doRender(_){this._lastRenderPosition=_.lastRenderPosition;const A=this.textArea,k=this.textAreaCover;(0,f.applyFontInfo)(A,this._fontInfo),A.setTop(_.top),A.setLeft(_.left),A.setWidth(_.width),A.setHeight(_.height),A.setColor(_.color?c.Color.Format.CSS.formatHex(_.color):""),A.setFontStyle(_.italic?"italic":""),_.bold&&A.setFontWeight("bold"),A.setTextDecoration(`${_.underline?" underline":""}${_.strikethrough?" line-through":""}`),k.setTop(_.useCover?_.top:0),k.setLeft(_.useCover?_.left:0),k.setWidth(_.useCover?_.width:0),k.setHeight(_.useCover?_.height:0);const L=this._context.configuration.options;L.get(56)?k.setClassName("monaco-editor-background textAreaCover "+a.Margin.OUTER_CLASS_NAME):L.get(66).renderType!==0?k.setClassName("monaco-editor-background textAreaCover "+h.LineNumbersOverlay.CLASS_NAME):k.setClassName("monaco-editor-background textAreaCover")}};e.TextAreaHandler=E,e.TextAreaHandler=E=fe([O(3,n.IKeybindingService)],E);function C(I,_,A){if(I.length===0)return 0;const k=document.createElement("div");k.style.position="absolute",k.style.top="-50000px",k.style.width="50000px";const L=document.createElement("span");(0,f.applyFontInfo)(L,_),L.style.whiteSpace="pre",L.style.tabSize=`${A*_.spaceWidth}px`,L.append(I),k.appendChild(L),document.body.appendChild(k);const R=L.offsetWidth;return document.body.removeChild(k),R}}),define(Q[3378],Y([1,0,140,80,239,51,99,232,303]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverviewRuler=void 0;class m{constructor(i,s){const o=i.options;this.lineHeight=o.get(65),this.pixelRatio=o.get(140),this.overviewRulerLanes=o.get(81),this.renderBorder=o.get(80);const u=s.getColor(f.editorOverviewRulerBorder);this.borderColor=u?u.toString():null,this.hideCursor=o.get(58);const d=s.getColor(f.editorCursorForeground);this.cursorColor=d?d.transparent(.7).toString():null,this.themeType=s.type;const p=o.get(71),c=p.enabled,l=p.side,n=s.getColor(f.editorOverviewRulerBackground),g=T.TokenizationRegistry.getDefaultBackground();n?this.backgroundColor=n:c&&l==="right"?this.backgroundColor=g:this.backgroundColor=null;const E=o.get(142).overviewRuler;this.top=E.top,this.right=E.right,this.domWidth=E.width,this.domHeight=E.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[C,I]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=C,this.w=I}_initLanes(i,s,o){const u=s-i;if(o>=3){const d=Math.floor(u/3),p=Math.floor(u/3),c=u-d-p,l=i,n=l+d,g=l+d+c;return[[0,l,n,l,g,l,n,l],[0,d,c,d+c,p,d+c+p,c+p,d+c+p]]}else if(o===2){const d=Math.floor(u/2),p=u-d,c=i,l=c+d;return[[0,c,c,c,l,c,c,c],[0,d,d,d,p,d+p,d+p,d+p]]}else{const d=i,p=u;return[[0,d,d,d,d,d,d,d],[0,p,p,p,p,p,p,p]]}}equals(i){return this.lineHeight===i.lineHeight&&this.pixelRatio===i.pixelRatio&&this.overviewRulerLanes===i.overviewRulerLanes&&this.renderBorder===i.renderBorder&&this.borderColor===i.borderColor&&this.hideCursor===i.hideCursor&&this.cursorColor===i.cursorColor&&this.themeType===i.themeType&&y.Color.equals(this.backgroundColor,i.backgroundColor)&&this.top===i.top&&this.right===i.right&&this.domWidth===i.domWidth&&this.domHeight===i.domHeight&&this.canvasWidth===i.canvasWidth&&this.canvasHeight===i.canvasHeight}}var S;(function(r){r[r.MIN_DECORATION_HEIGHT=6]="MIN_DECORATION_HEIGHT"})(S||(S={}));var h;(function(r){r[r.Left=1]="Left",r[r.Center=2]="Center",r[r.Right=4]="Right",r[r.Full=7]="Full"})(h||(h={}));class a extends b.ViewPart{constructor(i){super(i),this._domNode=(0,t.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=T.TokenizationRegistry.onDidChange(s=>{s.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(i){const s=new m(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(s)?!1:(this._settings=s,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,i&&this._render(),!0)}onConfigurationChanged(i){return this._updateSettings(!1)}onCursorStateChanged(i){this._cursorPositions=[];for(let s=0,o=i.selections.length;s<o;s++)this._cursorPositions[s]=i.selections[s].getPosition();return this._cursorPositions.sort(D.Position.compare),!0}onDecorationsChanged(i){return!!i.affectsOverviewRuler}onFlushed(i){return!0}onScrollChanged(i){return i.scrollHeightChanged}onZonesChanged(i){return!0}onThemeChanged(i){return this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(i){}render(i){this._render()}_render(){const i=this._settings.backgroundColor;if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(i?y.Color.Format.CSS.formatHexA(i):""),this._domNode.setDisplay("none");return}this._domNode.setDisplay("block");const s=this._settings.canvasWidth,o=this._settings.canvasHeight,u=this._settings.lineHeight,d=this._context.viewLayout,p=this._context.viewLayout.getScrollHeight(),c=o/p,l=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme),n=6*this._settings.pixelRatio|0,g=n/2|0,w=this._domNode.domNode.getContext("2d");i?i.isOpaque()?(w.fillStyle=y.Color.Format.CSS.formatHexA(i),w.fillRect(0,0,s,o)):(w.clearRect(0,0,s,o),w.fillStyle=y.Color.Format.CSS.formatHexA(i),w.fillRect(0,0,s,o)):w.clearRect(0,0,s,o);const E=this._settings.x,C=this._settings.w;l.sort(v.OverviewRulerDecorationsGroup.cmp);for(const I of l){const _=I.color,A=I.data;w.fillStyle=_;let k=0,L=0,R=0;for(let M=0,N=A.length/3;M<N;M++){const P=A[3*M],x=A[3*M+1],F=A[3*M+2];let V=d.getVerticalOffsetForLineNumber(x)*c|0,W=(d.getVerticalOffsetForLineNumber(F)+u)*c|0;if(W-V<n){let B=(V+W)/2|0;B<g?B=g:B+g>o&&(B=o-g),V=B-g,W=B+g}V>R+1||P!==k?(M!==0&&w.fillRect(E[k],L,C[k],R-L),k=P,L=V,R=W):W>R&&(R=W)}w.fillRect(E[k],L,C[k],R-L)}if(!this._settings.hideCursor&&this._settings.cursorColor){const I=2*this._settings.pixelRatio|0,_=I/2|0,A=this._settings.x[7],k=this._settings.w[7];w.fillStyle=this._settings.cursorColor;let L=-100,R=-100;for(let M=0,N=this._cursorPositions.length;M<N;M++){const P=this._cursorPositions[M];let x=d.getVerticalOffsetForLineNumber(P.lineNumber)*c|0;x<_?x=_:x+_>o&&(x=o-_);const F=x-_,V=F+I;F>R+1?(M!==0&&w.fillRect(A,L,k,R-L),L=F,R=V):V>R&&(R=V)}w.fillRect(A,L,k,R-L)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(w.beginPath(),w.lineWidth=1,w.strokeStyle=this._settings.borderColor,w.moveTo(0,0),w.lineTo(0,o),w.stroke(),w.moveTo(0,0),w.lineTo(s,0),w.stroke())}}e.DecorationsOverviewRuler=a}),define(Q[3379],Y([1,0,140,14,239,2348,133,232,19,167,1714]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursors=void 0;class S extends b.ViewPart{static{this.BLINK_INTERVAL=500}constructor(a){super(a);const r=this._context.configuration.options;this._readOnly=r.get(89),this._cursorBlinking=r.get(25),this._cursorStyle=r.get(27),this._cursorSmoothCaretAnimation=r.get(26),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new D.ViewCursor(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,t.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 y.TimeoutTimer,this._cursorFlatBlinkInterval=new y.IntervalTimer,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(a){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(a){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(a){const r=this._context.configuration.options;this._readOnly=r.get(89),this._cursorBlinking=r.get(25),this._cursorStyle=r.get(27),this._cursorSmoothCaretAnimation=r.get(26),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(a);for(let i=0,s=this._secondaryCursors.length;i<s;i++)this._secondaryCursors[i].onConfigurationChanged(a);return!0}_onCursorPositionChanged(a,r,i){const s=this._secondaryCursors.length!==r.length||this._cursorSmoothCaretAnimation==="explicit"&&i!==3;if(this._primaryCursor.onCursorPositionChanged(a,s),this._updateBlinking(),this._secondaryCursors.length<r.length){const o=r.length-this._secondaryCursors.length;for(let u=0;u<o;u++){const d=new D.ViewCursor(this._context);this._domNode.domNode.insertBefore(d.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(d)}}else if(this._secondaryCursors.length>r.length){const o=this._secondaryCursors.length-r.length;for(let u=0;u<o;u++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let o=0;o<r.length;o++)this._secondaryCursors[o].onCursorPositionChanged(r[o],s)}onCursorStateChanged(a){const r=[];for(let s=0,o=a.selections.length;s<o;s++)r[s]=a.selections[s].getPosition();this._onCursorPositionChanged(r[0],r.slice(1),a.reason);const i=a.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onFocusChanged(a){return this._editorHasFocus=a.isFocused,this._updateBlinking(),!1}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return!0}onTokensChanged(a){const r=i=>{for(let s=0,o=a.ranges.length;s<o;s++)if(a.ranges[s].fromLineNumber<=i.lineNumber&&i.lineNumber<=a.ranges[s].toLineNumber)return!0;return!1};if(r(this._primaryCursor.getPosition()))return!0;for(const i of this._secondaryCursors)if(r(i.getPosition()))return!0;return!1}onZonesChanged(a){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const a=this._getCursorBlinking(),r=a===0,i=a===5;r?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!r&&!i&&(a===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},S.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},S.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let a="cursors-layer";switch(this._selectionIsEmpty||(a+=" has-selection"),this._cursorStyle){case T.TextEditorCursorStyle.Line:a+=" cursor-line-style";break;case T.TextEditorCursorStyle.Block:a+=" cursor-block-style";break;case T.TextEditorCursorStyle.Underline:a+=" cursor-underline-style";break;case T.TextEditorCursorStyle.LineThin:a+=" cursor-line-thin-style";break;case T.TextEditorCursorStyle.BlockOutline:a+=" cursor-block-outline-style";break;case T.TextEditorCursorStyle.UnderlineThin:a+=" cursor-underline-thin-style";break;default:a+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:a+=" cursor-blink";break;case 2:a+=" cursor-smooth";break;case 3:a+=" cursor-phase";break;case 4:a+=" cursor-expand";break;case 5:a+=" cursor-solid";break;default:a+=" cursor-solid"}else a+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(a+=" cursor-smooth-caret-animation"),a}_show(){this._primaryCursor.show();for(let a=0,r=this._secondaryCursors.length;a<r;a++)this._secondaryCursors[a].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let a=0,r=this._secondaryCursors.length;a<r;a++)this._secondaryCursors[a].hide();this._isVisible=!1}prepareRender(a){this._primaryCursor.prepareRender(a);for(let r=0,i=this._secondaryCursors.length;r<i;r++)this._secondaryCursors[r].prepareRender(a)}render(a){const r=[];let i=0;const s=this._primaryCursor.render(a);s&&(r[i++]=s);for(let o=0,u=this._secondaryCursors.length;o<u;o++){const d=this._secondaryCursors[o].render(a);d&&(r[i++]=d)}this._renderData=r}getLastRenderData(){return this._renderData}}e.ViewCursors=S,(0,v.registerThemingParticipant)((h,a)=>{const r=h.getColor(f.editorCursorForeground);if(r){let i=h.getColor(f.editorCursorBackground);i||(i=r.opposite()),a.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${r}; border-color: ${r}; color: ${i}; }`),(0,m.isHighContrast)(h.type)&&a.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${i}; border-right: 1px solid ${i}; }`)}})}),define(Q[3380],Y([1,0,442,33,405,51,232,1715]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WhitespaceOverlay=void 0;class f extends t.DynamicViewOverlay{constructor(S){super(),this._context=S,this._options=new v(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(S){const h=new v(this._context.configuration);return this._options.equals(h)?S.hasChanged(142):(this._options=h,!0)}onCursorStateChanged(S){return this._selection=S.selections,this._options.renderWhitespace==="selection"}onDecorationsChanged(S){return!0}onFlushed(S){return!0}onLinesChanged(S){return!0}onLinesDeleted(S){return!0}onLinesInserted(S){return!0}onScrollChanged(S){return S.scrollTopChanged}onZonesChanged(S){return!0}prepareRender(S){if(this._options.renderWhitespace==="none"){this._renderResult=null;return}const h=S.visibleRange.startLineNumber,r=S.visibleRange.endLineNumber-h+1,i=new Array(r);for(let o=0;o<r;o++)i[o]=!0;const s=this._context.viewModel.getMinimapLinesRenderingData(S.viewportData.startLineNumber,S.viewportData.endLineNumber,i);this._renderResult=[];for(let o=S.viewportData.startLineNumber;o<=S.viewportData.endLineNumber;o++){const u=o-S.viewportData.startLineNumber,d=s.data[u];let p=null;if(this._options.renderWhitespace==="selection"){const c=this._selection;for(const l of c){if(l.endLineNumber<o||l.startLineNumber>o)continue;const n=l.startLineNumber===o?l.startColumn:d.minColumn,g=l.endLineNumber===o?l.endColumn:d.maxColumn;n<g&&(p||(p=[]),p.push(new b.LineRange(n-1,g-1)))}}this._renderResult[u]=this._applyRenderWhitespace(S,o,p,d)}}_applyRenderWhitespace(S,h,a,r){if(this._options.renderWhitespace==="selection"&&!a||this._options.renderWhitespace==="trailing"&&r.continuesWithWrappedLine)return"";const i=this._context.theme.getColor(T.editorWhitespaces),s=this._options.renderWithSVG,o=r.content,u=this._options.stopRenderingLineAfter===-1?o.length:Math.min(this._options.stopRenderingLineAfter,o.length),d=r.continuesWithWrappedLine,p=r.minColumn-1,c=this._options.renderWhitespace==="boundary",l=this._options.renderWhitespace==="trailing",n=this._options.lineHeight,g=this._options.middotWidth,w=this._options.wsmiddotWidth,E=this._options.spaceWidth,C=Math.abs(w-E),I=Math.abs(g-E),_=C<I?11825:183,A=this._options.canUseHalfwidthRightwardsArrow;let k="",L=!1,R=y.firstNonWhitespaceIndex(o),M;R===-1?(L=!0,R=u,M=u):M=y.lastNonWhitespaceIndex(o);let N=0,P=a&&a[N],x=0;for(let F=p;F<u;F++){const V=o.charCodeAt(F);if(P&&F>=P.endOffset&&(N++,P=a&&a[N]),V!==9&&V!==32||l&&!L&&F<=M)continue;if(c&&F>=R&&F<=M&&V===32){const z=F-1>=0?o.charCodeAt(F-1):0,B=F+1<u?o.charCodeAt(F+1):0;if(z!==32&&B!==32)continue}if(c&&d&&F===u-1){const z=F-1>=0?o.charCodeAt(F-1):0;if(V===32&&z!==32&&z!==9)continue}if(a&&(!P||P.startOffset>F||P.endOffset<=F))continue;const W=S.visibleRangeForPosition(new D.Position(h,F+1));W&&(s?(x=Math.max(x,W.left),V===9?k+=this._renderArrow(n,E,W.left):k+=`<circle cx="${(W.left+E/2).toFixed(2)}" cy="${(n/2).toFixed(2)}" r="${(E/7).toFixed(2)}" />`):V===9?k+=`<div class="mwh" style="left:${W.left}px;height:${n}px;">${A?String.fromCharCode(65515):String.fromCharCode(8594)}</div>`:k+=`<div class="mwh" style="left:${W.left}px;height:${n}px;">${String.fromCharCode(_)}</div>`)}return s?(x=Math.round(x+E),`<svg style="position:absolute;width:${x}px;height:${n}px" viewBox="0 0 ${x} ${n}" xmlns="http://www.w3.org/2000/svg" fill="${i}">`+k+"</svg>"):k}_renderArrow(S,h,a){const r=h/7,i=h,s=S/2,o=a,u={x:0,y:r/2},d={x:100/125*i,y:u.y},p={x:d.x-.2*d.x,y:d.y+.2*d.x},c={x:p.x+.1*d.x,y:p.y+.1*d.x},l={x:c.x+.35*d.x,y:c.y-.35*d.x},n={x:l.x,y:-l.y},g={x:c.x,y:-c.y},w={x:p.x,y:-p.y},E={x:d.x,y:-d.y},C={x:u.x,y:-u.y};return`<path d="M ${[u,d,p,c,l,n,g,w,E,C].map(A=>`${(o+A.x).toFixed(2)} ${(s+A.y).toFixed(2)}`).join(" L ")}" />`}render(S,h){if(!this._renderResult)return"";const a=h-S;return a<0||a>=this._renderResult.length?"":this._renderResult[a]}}e.WhitespaceOverlay=f;class v{constructor(S){const h=S.options,a=h.get(49),r=h.get(37);r==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):r==="svg"?(this.renderWhitespace=h.get(97),this.renderWithSVG=!0):(this.renderWhitespace=h.get(97),this.renderWithSVG=!1),this.spaceWidth=a.spaceWidth,this.middotWidth=a.middotWidth,this.wsmiddotWidth=a.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=a.canUseHalfwidthRightwardsArrow,this.lineHeight=h.get(65),this.stopRenderingLineAfter=h.get(115)}equals(S){return this.renderWhitespace===S.renderWhitespace&&this.renderWithSVG===S.renderWithSVG&&this.spaceWidth===S.spaceWidth&&this.middotWidth===S.middotWidth&&this.wsmiddotWidth===S.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===S.canUseHalfwidthRightwardsArrow&&this.lineHeight===S.lineHeight&&this.stopRenderingLineAfter===S.stopRenderingLineAfter}}}),define(Q[3381],Y([1,0,7,96,27,140,15,3342,3377,3279,1067,2323,239,2320,3375,1893,3364,3376,1214,3343,1894,1084,1895,3312,1896,3378,1905,1897,1898,3365,3379,1899,51,562,1906,1902,566,19,1204,1892,780,3380,804,137,5]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P,x,F,V,W,z,B,K,H,U){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;let G=class extends x.ViewEventHandler{constructor(J,j,ee,X,te,Z,se){super(),this._instantiationService=se,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new y.Selection(1,1,1,1)],this._renderAnimationFrame=null;const re=new m.ViewController(j,X,te,J);this._context=new N.ViewContext(j,ee,X),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(v.TextAreaHandler,this._context,re,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,D.createFastDomNode)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,D.createFastDomNode)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,D.createFastDomNode)(document.createElement("div")),a.PartFingerprints.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new o.EditorScrollbar(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new p.ViewLines(this._context,this._linesContent),this._viewZones=new L.ViewZones(this._context),this._viewParts.push(this._viewZones);const oe=new E.DecorationsOverviewRuler(this._context);this._viewParts.push(oe);const le=new _.ScrollDecorationViewPart(this._context);this._viewParts.push(le);const ne=new h.ContentViewOverlays(this._context);this._viewParts.push(ne),ne.addDynamicOverlay(new i.CurrentLineHighlightOverlay(this._context)),ne.addDynamicOverlay(new A.SelectionsOverlay(this._context)),ne.addDynamicOverlay(new u.IndentGuidesOverlay(this._context)),ne.addDynamicOverlay(new s.DecorationsOverlay(this._context)),ne.addDynamicOverlay(new B.WhitespaceOverlay(this._context));const ce=new h.MarginViewOverlays(this._context);this._viewParts.push(ce),ce.addDynamicOverlay(new i.CurrentLineMarginHighlightOverlay(this._context)),ce.addDynamicOverlay(new n.MarginViewLineDecorationsOverlay(this._context)),ce.addDynamicOverlay(new c.LinesDecorationsOverlay(this._context)),ce.addDynamicOverlay(new d.LineNumbersOverlay(this._context)),this._glyphMarginWidgets=new K.GlyphMarginWidgets(this._context),this._viewParts.push(this._glyphMarginWidgets);const ae=new l.Margin(this._context);ae.getDomNode().appendChild(this._viewZones.marginDomNode),ae.getDomNode().appendChild(ce.getDomNode()),ae.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(ae),this._contentWidgets=new r.ViewContentWidgets(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new k.ViewCursors(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new w.ViewOverlayWidgets(this._context),this._viewParts.push(this._overlayWidgets);const ue=new I.Rulers(this._context);this._viewParts.push(ue);const de=new W.BlockDecorations(this._context);this._viewParts.push(de);const ge=new g.Minimap(this._context);if(this._viewParts.push(ge),oe){const he=this._scrollbar.getOverviewRulerLayoutInfo();he.parent.insertBefore(oe.getDomNode(),he.insertBefore)}this._linesContent.appendChild(ne.getDomNode()),this._linesContent.appendChild(ue.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(ae.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(le.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(ge.getDomNode()),this._overflowGuardContainer.appendChild(de.domNode),this.domNode.appendChild(this._overflowGuardContainer),Z?Z.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new f.PointerHandler(this._context,re,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._shouldRecomputeGlyphMarginLanes&&(this._shouldRecomputeGlyphMarginLanes=!1,this._context.configuration.setGlyphMarginDecorationLaneCount(this._computeGlyphMarginLaneCount())),z.inputLatency.onRenderStart(),this._renderNow()}_computeGlyphMarginLaneCount(){const J=this._context.viewModel.model;let j=[];j=j.concat(J.getAllMarginDecorations().map(te=>{const Z=te.options.glyphMargin?.position??H.GlyphMarginLane.Left;return{range:te.range,lane:Z}})),j=j.concat(this._glyphMarginWidgets.getWidgets().map(te=>({range:J.validateRange(te.preference.range),lane:te.preference.lane}))),j.sort((te,Z)=>b.Range.compareRangesUsingStarts(te.range,Z.range));let ee=null,X=null;for(const te of j)if(te.lane===H.GlyphMarginLane.Left&&(!ee||b.Range.compareRangesUsingEnds(ee,te.range)<0)&&(ee=te.range),te.lane===H.GlyphMarginLane.Right&&(!X||b.Range.compareRangesUsingEnds(X,te.range)<0)&&(X=te.range),ee&&X){if(ee.endLineNumber<X.startLineNumber){ee=null;continue}if(X.endLineNumber<ee.startLineNumber){X=null;continue}return 2}return 1}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:J=>{this._textAreaHandler.textArea.domNode.dispatchEvent(J)},getLastRenderData:()=>{const J=this._viewCursors.getLastRenderData()||[],j=this._textAreaHandler.getLastRenderData();return new V.PointerHandlerLastRenderData(J,j)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:J=>this._viewZones.shouldSuppressMouseDownOnViewZone(J),shouldSuppressMouseDownOnWidget:J=>this._contentWidgets.shouldSuppressMouseDownOnWidget(J),getPositionFromDOMInfo:(J,j)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(J,j)),visibleRangeForPosition:(J,j)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new R.Position(J,j))),getLineWidth:J=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(J))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:J=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(J))}}_applyLayout(){const j=this._context.configuration.options.get(142);this.domNode.setWidth(j.width),this.domNode.setHeight(j.height),this._overflowGuardContainer.setWidth(j.width),this._overflowGuardContainer.setHeight(j.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const J=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(139)+" "+(0,F.getThemeTypeSelector)(this._context.theme.type)+J}handleEvents(J){super.handleEvents(J),this._scheduleRender()}onConfigurationChanged(J){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(J){return this._selections=J.selections,!1}onDecorationsChanged(J){return J.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(J){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(J){return this._context.theme.update(J.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const J of this._viewParts)J.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=t.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){$(()=>this._actualRender())}_getViewPartsToRender(){const J=[];let j=0;for(const ee of this._viewParts)ee.shouldRender()&&(J[j++]=ee);return J}_actualRender(){if(!t.isInDOM(this.domNode.domNode))return;let J=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&J.length===0)return;const j=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(j.startLineNumber,j.endLineNumber,j.centeredLineNumber);const ee=new P.ViewportData(this._selections,j,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(ee),this._viewLines.shouldRender()&&(this._viewLines.renderText(ee),this._viewLines.onDidRender(),J=this._getViewPartsToRender());const X=new M.RenderingContext(this._context.viewLayout,ee,this._viewLines);for(const te of J)te.prepareRender(X);for(const te of J)te.render(X),te.onDidRender()}delegateVerticalScrollbarPointerDown(J){this._scrollbar.delegateVerticalScrollbarPointerDown(J)}delegateScrollFromMouseWheelEvent(J){this._scrollbar.delegateScrollFromMouseWheelEvent(J)}restoreState(J){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:J.scrollTop,scrollLeft:J.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(J,j){const ee=this._context.viewModel.model.validatePosition({lineNumber:J,column:j}),X=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(ee);this._flushAccumulatedAndRenderNow();const te=this._viewLines.visibleRangeForPosition(new R.Position(X.lineNumber,X.column));return te?te.left:-1}getTargetAtClientPoint(J,j){const ee=this._pointerHandler.getTargetAtClientPoint(J,j);return ee?S.ViewUserInputEvents.convertViewToModelMouseTarget(ee,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(J){return new C.OverviewRuler(this._context,J)}change(J){this._viewZones.changeViewZones(J),this._scheduleRender()}render(J,j){if(j){this._viewLines.forceShouldRender();for(const ee of this._viewParts)ee.forceShouldRender()}J?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(J){this._textAreaHandler.writeScreenReaderContent(J)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}refreshFocusState(){this._textAreaHandler.refreshFocusState()}setAriaOptions(J){this._textAreaHandler.setAriaOptions(J)}addContentWidget(J){this._contentWidgets.addWidget(J.widget),this.layoutContentWidget(J),this._scheduleRender()}layoutContentWidget(J){this._contentWidgets.setWidgetPosition(J.widget,J.position?.position??null,J.position?.secondaryPosition??null,J.position?.preference??null,J.position?.positionAffinity??null),this._scheduleRender()}removeContentWidget(J){this._contentWidgets.removeWidget(J.widget),this._scheduleRender()}addOverlayWidget(J){this._overlayWidgets.addWidget(J.widget),this.layoutOverlayWidget(J),this._scheduleRender()}layoutOverlayWidget(J){const j=J.position?J.position.preference:null;this._overlayWidgets.setWidgetPosition(J.widget,j)&&this._scheduleRender()}removeOverlayWidget(J){this._overlayWidgets.removeWidget(J.widget),this._scheduleRender()}addGlyphMarginWidget(J){this._glyphMarginWidgets.addWidget(J.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(J){const j=J.position;this._glyphMarginWidgets.setWidgetPosition(J.widget,j)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(J){this._glyphMarginWidgets.removeWidget(J.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};e.View=G,e.View=G=fe([O(6,U.IInstantiationService)],G);function $(ie){try{return ie()}catch(J){(0,T.onUnexpectedError)(J)}}}),define(Q[3382],Y([1,0,6,4,27,232,19]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorizedBracketPairsDecorationProvider=void 0;class f extends y.Disposable{constructor(S){super(),this.textModel=S,this.colorProvider=new v,this.onDidChangeEmitter=new t.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=S.getOptions().bracketPairColorizationOptions,this._register(S.bracketPairs.onDidChange(h=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(S){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(S,h,a,r){return r?[]:h===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(S,!0).map(s=>({id:`bracket${s.range.toString()}-${s.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(s,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:s.range})).toArray():[]}getAllDecorations(S,h){return S===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new b.Range(1,1,this.textModel.getLineCount(),1),S,h):[]}}e.ColorizedBracketPairsDecorationProvider=f;class v{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(S,h){return S.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(h?S.nestingLevelOfEqualBracketType:S.nestingLevel)}getInlineClassNameOfLevel(S){return`bracket-highlighting-${S%30}`}}(0,T.registerThemingParticipant)((m,S)=>{const h=[D.editorBracketHighlightingForeground1,D.editorBracketHighlightingForeground2,D.editorBracketHighlightingForeground3,D.editorBracketHighlightingForeground4,D.editorBracketHighlightingForeground5,D.editorBracketHighlightingForeground6],a=new v;S.addRule(`.monaco-editor .${a.unexpectedClosingBracketClassName} { color: ${m.getColor(D.editorBracketHighlightingUnexpectedBracketForeground)}; }`);const r=h.map(i=>m.getColor(i)).filter(i=>!!i).filter(i=>!i.isTransparent());for(let i=0;i<30;i++){const s=r[i%r.length];S.addRule(`.monaco-editor .${a.getInlineClassNameOfLevel(i)} { color: ${s}; }`)}})}),define(Q[3383],Y([1,0,154,4,137,19,232,57,27,22,6,36,69]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsService=void 0;class r extends y.Disposable{constructor(o){super(),this.model=o,this._markersData=new Map,this._register((0,y.toDisposable)(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(o,u){const d=[...this._markersData.keys()];this._markersData.clear();const p=this.model.deltaDecorations(d,u);for(let c=0;c<p.length;c++)this._markersData.set(p[c],o[c]);return d.length!==0||p.length!==0}getMarker(o){return this._markersData.get(o.id)}getMarkers(){const o=[];return this._markersData.forEach((u,d)=>{const p=this.model.getDecorationRange(d);p&&o.push([p,u])}),o}}let i=class extends y.Disposable{constructor(o,u){super(),this._markerService=u,this._onDidChangeMarker=this._register(new S.Emitter),this.onDidChangeMarker=this._onDidChangeMarker.event,this._markerDecorations=new a.ResourceMap,o.getModels().forEach(d=>this._onModelAdded(d)),this._register(o.onModelAdded(this._onModelAdded,this)),this._register(o.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(o=>o.dispose()),this._markerDecorations.clear()}getMarker(o,u){const d=this._markerDecorations.get(o);return d&&d.getMarker(u)||null}getLiveMarkers(o){const u=this._markerDecorations.get(o);return u?u.getMarkers():[]}_handleMarkerChange(o){o.forEach(u=>{const d=this._markerDecorations.get(u);d&&this._updateDecorations(d)})}_onModelAdded(o){const u=new r(o);this._markerDecorations.set(o.uri,u),this._updateDecorations(u)}_onModelRemoved(o){const u=this._markerDecorations.get(o.uri);u&&(u.dispose(),this._markerDecorations.delete(o.uri)),(o.uri.scheme===m.Schemas.inMemory||o.uri.scheme===m.Schemas.internal||o.uri.scheme===m.Schemas.vscode)&&this._markerService?.read({resource:o.uri}).map(d=>d.owner).forEach(d=>this._markerService.remove(d,[o.uri]))}_updateDecorations(o){const u=this._markerService.read({resource:o.model.uri,take:500}),d=u.map(p=>({range:this._createDecorationRange(o.model,p),options:this._createDecorationOption(p)}));o.update(u,d)&&this._onDidChangeMarker.fire(o.model)}_createDecorationRange(o,u){let d=v.Range.lift(u);if(u.severity===t.MarkerSeverity.Hint&&!this._hasMarkerTag(u,1)&&!this._hasMarkerTag(u,2)&&(d=d.setEndPosition(d.startLineNumber,d.startColumn+2)),d=o.validateRange(d),d.isEmpty()){const p=o.getLineLastNonWhitespaceColumn(d.startLineNumber)||o.getLineMaxColumn(d.startLineNumber);if(p===1||d.endColumn>=p)return d;const c=o.getWordAtPosition(d.getStartPosition());c&&(d=new v.Range(d.startLineNumber,c.startColumn,d.endLineNumber,c.endColumn))}else if(u.endColumn===Number.MAX_VALUE&&u.startColumn===1&&d.startLineNumber===d.endLineNumber){const p=o.getLineFirstNonWhitespaceColumn(u.startLineNumber);p<d.endColumn&&(d=new v.Range(d.startLineNumber,p,d.endLineNumber,d.endColumn),u.startColumn=p)}return d}_createDecorationOption(o){let u,d,p,c,l;switch(o.severity){case t.MarkerSeverity.Hint:this._hasMarkerTag(o,2)?u=void 0:this._hasMarkerTag(o,1)?u="squiggly-unnecessary":u="squiggly-hint",p=0;break;case t.MarkerSeverity.Warning:u="squiggly-warning",d=(0,D.themeColorFromId)(T.overviewRulerWarning),p=20,l={color:(0,D.themeColorFromId)(h.minimapWarning),position:b.MinimapPosition.Inline};break;case t.MarkerSeverity.Info:u="squiggly-info",d=(0,D.themeColorFromId)(T.overviewRulerInfo),p=10;break;case t.MarkerSeverity.Error:default:u="squiggly-error",d=(0,D.themeColorFromId)(T.overviewRulerError),p=30,l={color:(0,D.themeColorFromId)(h.minimapError),position:b.MinimapPosition.Inline};break}return o.tags&&(o.tags.indexOf(1)!==-1&&(c="squiggly-inline-unnecessary"),o.tags.indexOf(2)!==-1&&(c="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:u,showIfCollapsed:!0,overviewRuler:{color:d,position:b.OverviewRulerLane.Right},minimap:l,zIndex:p,inlineClassName:c}}_hasMarkerTag(o,u){return o.tags?o.tags.indexOf(u)>=0:!1}};e.MarkerDecorationsService=i,e.MarkerDecorationsService=i=fe([O(0,f.IModelService),O(1,t.IMarkerService)],i)}),define(Q[891],Y([1,0,439,19,11,1890,50]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMultilineTokens2=e.SemanticTokensProviderStyling=void 0;var f;(function(r){r[r.NO_STYLING=2147483647]="NO_STYLING"})(f||(f={}));let v=class{constructor(i,s,o,u){this._legend=i,this._themeService=s,this._languageService=o,this._logService=u,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new a}getMetadata(i,s,o){const u=this._languageService.languageIdCodec.encodeLanguageId(o),d=this._hashTable.get(i,s,u);let p;if(d)p=d.metadata,this._logService.getLevel()===b.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${i} / ${s}: foreground ${t.TokenMetadata.getForeground(p)}, fontStyle ${t.TokenMetadata.getFontStyle(p).toString(2)}`);else{let c=this._legend.tokenTypes[i];const l=[];if(c){let n=s;for(let w=0;n>0&&w<this._legend.tokenModifiers.length;w++)n&1&&l.push(this._legend.tokenModifiers[w]),n=n>>1;n>0&&this._logService.getLevel()===b.LogLevel.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${s.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const g=this._themeService.getColorTheme().getTokenStyleMetadata(c,l,o);if(typeof g>"u")p=2147483647;else{if(p=0,typeof g.italic<"u"){const w=(g.italic?1:0)<<11;p|=w|1}if(typeof g.bold<"u"){const w=(g.bold?2:0)<<11;p|=w|2}if(typeof g.underline<"u"){const w=(g.underline?4:0)<<11;p|=w|4}if(typeof g.strikethrough<"u"){const w=(g.strikethrough?8:0)<<11;p|=w|8}if(g.foreground){const w=g.foreground<<15;p|=w|16}p===0&&(p=2147483647)}}else this._logService.getLevel()===b.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${i} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),p=2147483647,c="not-in-legend";this._hashTable.add(i,s,u,p),this._logService.getLevel()===b.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${i} (${c}) / ${s} (${l.join(" ")}): foreground ${t.TokenMetadata.getForeground(p)}, fontStyle ${t.TokenMetadata.getFontStyle(p).toString(2)}`)}return p}warnOverlappingSemanticTokens(i,s){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${i}, column ${s}`))}warnInvalidLengthSemanticTokens(i,s){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${i}, column ${s}`))}warnInvalidEditStart(i,s,o,u,d){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${i}, resultId: ${s}) at edit #${o}: The provided start offset ${u} is outside the previous data (length ${d}).`))}};e.SemanticTokensProviderStyling=v,e.SemanticTokensProviderStyling=v=fe([O(1,y.IThemeService),O(2,T.ILanguageService),O(3,b.ILogService)],v);var m;(function(r){r[r.DesiredTokensPerArea=400]="DesiredTokensPerArea",r[r.DesiredMaxAreas=1024]="DesiredMaxAreas"})(m||(m={}));function S(r,i,s){const o=r.data,u=r.data.length/5|0,d=Math.max(Math.ceil(u/1024),400),p=[];let c=0,l=1,n=0;for(;c<u;){const g=c;let w=Math.min(g+d,u);if(w<u){let L=w;for(;L-1>g&&o[5*L]===0;)L--;if(L-1===g){let R=w;for(;R+1<u&&o[5*R]===0;)R++;w=R}else w=L}let E=new Uint32Array((w-g)*4),C=0,I=0,_=0,A=0;for(;c<w;){const L=5*c,R=o[L],M=o[L+1],N=l+R|0,P=R===0?n+M|0:M,x=o[L+2],F=P+x|0,V=o[L+3],W=o[L+4];if(F<=P)i.warnInvalidLengthSemanticTokens(N,P+1);else if(_===N&&A>P)i.warnOverlappingSemanticTokens(N,P+1);else{const z=i.getMetadata(V,W,s);z!==2147483647&&(I===0&&(I=N),E[C]=N-I,E[C+1]=P,E[C+2]=F,E[C+3]=z,C+=4,_=N,A=F)}l=N,n=P,c++}C!==E.length&&(E=E.subarray(0,C));const k=D.SparseMultilineTokens.create(I,E);p.push(k)}return p}e.toMultilineTokens2=S;class h{constructor(i,s,o,u){this.tokenTypeIndex=i,this.tokenModifierSet=s,this.languageId=o,this.metadata=u,this.next=null}}class a{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=a._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<a._SIZES.length?2/3*this._currentLength:0),this._elements=[],a._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(i,s){for(let o=0;o<s;o++)i[o]=null}_hash2(i,s){return(i<<5)-i+s|0}_hashFunc(i,s,o){return this._hash2(this._hash2(i,s),o)%this._currentLength}get(i,s,o){const u=this._hashFunc(i,s,o);let d=this._elements[u];for(;d;){if(d.tokenTypeIndex===i&&d.tokenModifierSet===s&&d.languageId===o)return d;d=d.next}return null}add(i,s,o,u){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const d=this._elements;this._currentLengthIndex++,this._currentLength=a._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<a._SIZES.length?2/3*this._currentLength:0),this._elements=[],a._nullOutEntries(this._elements,this._currentLength);for(const p of d){let c=p;for(;c;){const l=c.next;c.next=null,this._add(c),c=l}}}this._add(new h(i,s,o,u))}_add(i){const s=this._hashFunc(i.tokenTypeIndex,i.tokenModifierSet,i.languageId);i.next=this._elements[s],this._elements[s]=i}}}),define(Q[3384],Y([1,0,4,50,19,11,891,857,35]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensStylingService=void 0;let m=class extends t.Disposable{constructor(h,a,r){super(),this._themeService=h,this._logService=a,this._languageService=r,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(h){return this._caches.has(h)||this._caches.set(h,new T.SemanticTokensProviderStyling(h.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(h)}};e.SemanticTokensStylingService=m,e.SemanticTokensStylingService=m=fe([O(0,b.IThemeService),O(1,D.ILogService),O(2,y.ILanguageService)],m),(0,v.registerSingleton)(f.ISemanticTokensStylingService,m,1)}),define(Q[1215],Y([1,0,202,4,123,137,232,19,87]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorNavigationQuickAccessProvider=void 0;class m{constructor(h){this.options=h,this.rangeHighlightDecorationId=void 0}provide(h,a){const r=new y.DisposableStore;h.canAcceptInBackground=!!this.options?.canAcceptInBackground,h.matchOnLabel=h.matchOnDescription=h.matchOnDetail=h.sortByLabel=!1;const i=r.add(new y.MutableDisposable);return i.value=this.doProvide(h,a),r.add(this.onDidActiveTextEditorControlChange(()=>{i.value=void 0,i.value=this.doProvide(h,a)})),r}doProvide(h,a){const r=new y.DisposableStore,i=this.activeTextEditorControl;if(i&&this.canProvideWithTextEditor(i)){const s={editor:i},o=(0,b.getCodeEditor)(i);if(o){let u=i.saveViewState()??void 0;r.add(o.onDidChangeCursorPosition(()=>{u=i.saveViewState()??void 0})),s.restoreViewState=()=>{u&&i===this.activeTextEditorControl&&i.restoreViewState(u)},r.add((0,t.once)(a.onCancellationRequested)(()=>s.restoreViewState?.()))}r.add((0,y.toDisposable)(()=>this.clearDecorations(i))),r.add(this.provideWithTextEditor(s,h,a))}else r.add(this.provideWithoutTextEditor(h,a));return r}canProvideWithTextEditor(h){return!0}gotoLocation({editor:h},a){h.setSelection(a.range),h.revealRangeInCenter(a.range,0),a.preserveFocus||h.focus();const r=h.getModel();r&&"getLineContent"in r&&(0,v.status)(`${r.getLineContent(a.range.startLineNumber)}`)}getModel(h){return(0,b.isDiffEditor)(h)?h.getModel()?.modified:h.getModel()}addDecorations(h,a){h.changeDecorations(r=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:a,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:a,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,f.themeColorFromId)(T.overviewRulerRangeHighlight),position:D.OverviewRulerLane.Full}}}],[o,u]=r.deltaDecorations(i,s);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:u}})}clearDecorations(h){const a=this.rangeHighlightDecorationId;a&&(h.changeDecorations(r=>{r.deltaDecorations([a.overviewRulerDecorationId,a.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}e.AbstractEditorNavigationQuickAccessProvider=m}),define(Q[1216],Y([1,0,4,123,1215,2419]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoLineQuickAccessProvider=void 0;class T extends b.AbstractEditorNavigationQuickAccessProvider{static{this.PREFIX=":"}constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(v){const m=(0,D.localize)(0,null);return v.items=[{label:m}],v.ariaLabel=m,t.Disposable.None}provideWithTextEditor(v,m,S){const h=v.editor,a=new t.DisposableStore;a.add(m.onDidAccept(s=>{const[o]=m.selectedItems;if(o){if(!this.isValidLineNumber(h,o.lineNumber))return;this.gotoLocation(v,{range:this.toRange(o.lineNumber,o.column),keyMods:m.keyMods,preserveFocus:s.inBackground}),s.inBackground||m.hide()}}));const r=()=>{const s=this.parsePosition(h,m.value.trim().substr(T.PREFIX.length)),o=this.getPickLabel(h,s.lineNumber,s.column);if(m.items=[{lineNumber:s.lineNumber,column:s.column,label:o}],m.ariaLabel=o,!this.isValidLineNumber(h,s.lineNumber)){this.clearDecorations(h);return}const u=this.toRange(s.lineNumber,s.column);h.revealRangeInCenter(u,0),this.addDecorations(h,u)};r(),a.add(m.onDidChangeValue(()=>r()));const i=(0,y.getCodeEditor)(h);return i&&i.getOptions().get(66).renderType===2&&(i.updateOptions({lineNumbers:"on"}),a.add((0,t.toDisposable)(()=>i.updateOptions({lineNumbers:"relative"})))),a}toRange(v=1,m=1){return{startLineNumber:v,startColumn:m,endLineNumber:v,endColumn:m}}parsePosition(v,m){const S=m.split(/,|:|#/).map(a=>parseInt(a,10)).filter(a=>!isNaN(a)),h=this.lineCount(v)+1;return{lineNumber:S[0]>0?S[0]:h+S[0],column:S[1]}}getPickLabel(v,m,S){if(this.isValidLineNumber(v,m))return this.isValidColumn(v,m,S)?(0,D.localize)(1,null,m,S):(0,D.localize)(2,null,m);const h=v.getPosition()||{lineNumber:1,column:1},a=this.lineCount(v);return a>1?(0,D.localize)(3,null,h.lineNumber,h.column,a):(0,D.localize)(4,null,h.lineNumber,h.column)}isValidLineNumber(v,m){return!m||typeof m!="number"?!1:m>0&&m<=this.lineCount(v)}isValidColumn(v,m,S){if(!S||typeof S!="number")return!1;const h=this.getModel(v);if(!h)return!1;const a={lineNumber:m,column:S};return h.validatePosition(a).equals(a)}lineCount(v){return this.getModel(v)?.getLineCount()??0}}e.AbstractGotoLineQuickAccessProvider=T}),define(Q[3385],Y([1,0,14,31,32,37,570,4,33,27,99,506,1215,2420,74,20]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoSymbolQuickAccessProvider=void 0;let u=class extends a.AbstractEditorNavigationQuickAccessProvider{static{o=this}static{this.PREFIX="@"}static{this.SCOPE_PREFIX=":"}static{this.PREFIX_BY_CATEGORY=`${o.PREFIX}${o.SCOPE_PREFIX}`}constructor(l,n,g=Object.create(null)){super(g),this._languageFeaturesService=l,this._outlineModelService=n,this.options=g,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(l){return this.provideLabelPick(l,(0,r.localize)(0,null)),f.Disposable.None}provideWithTextEditor(l,n,g){const w=l.editor,E=this.getModel(w);return E?this._languageFeaturesService.documentSymbolProvider.has(E)?this.doProvideWithEditorSymbols(l,E,n,g):this.doProvideWithoutEditorSymbols(l,E,n,g):f.Disposable.None}doProvideWithoutEditorSymbols(l,n,g,w){const E=new f.DisposableStore;return this.provideLabelPick(g,(0,r.localize)(1,null)),(async()=>!await this.waitForLanguageSymbolRegistry(n,E)||w.isCancellationRequested||E.add(this.doProvideWithEditorSymbols(l,n,g,w)))(),E}provideLabelPick(l,n){l.items=[{label:n,index:0,kind:14}],l.ariaLabel=n}async waitForLanguageSymbolRegistry(l,n){if(this._languageFeaturesService.documentSymbolProvider.has(l))return!0;const g=new t.DeferredPromise,w=n.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(l)&&(w.dispose(),g.complete(!0))}));return n.add((0,f.toDisposable)(()=>g.complete(!1))),g.p}doProvideWithEditorSymbols(l,n,g,w){const E=l.editor,C=new f.DisposableStore;C.add(g.onDidAccept(k=>{const[L]=g.selectedItems;L&&L.range&&(this.gotoLocation(l,{range:L.range.selection,keyMods:g.keyMods,preserveFocus:k.inBackground}),k.inBackground||g.hide())})),C.add(g.onDidTriggerItemButton(({item:k})=>{k&&k.range&&(this.gotoLocation(l,{range:k.range.selection,keyMods:g.keyMods,forceSideBySide:!0}),g.hide())}));const I=this.getDocumentSymbols(n,w);let _;const A=async k=>{_?.dispose(!0),g.busy=!1,_=new y.CancellationTokenSource(w),g.busy=!0;try{const L=(0,T.prepareQuery)(g.value.substr(o.PREFIX.length).trim()),R=await this.doGetSymbolPicks(I,L,void 0,_.token);if(w.isCancellationRequested)return;if(R.length>0){if(g.items=R,k&&L.original.length===0){const M=(0,s.findLast)(R,N=>!!(N.type!=="separator"&&N.range&&m.Range.containsPosition(N.range.decoration,k)));M&&(g.activeItems=[M])}}else L.original.length>0?this.provideLabelPick(g,(0,r.localize)(2,null)):this.provideLabelPick(g,(0,r.localize)(3,null))}finally{w.isCancellationRequested||(g.busy=!1)}};return C.add(g.onDidChangeValue(()=>A(void 0))),A(E.getSelection()?.getPosition()),C.add(g.onDidChangeActive(()=>{const[k]=g.activeItems;k&&k.range&&(E.revealRangeInCenter(k.range.selection,0),this.addDecorations(E,k.range.decoration))})),C}async doGetSymbolPicks(l,n,g,w){const E=await l;if(w.isCancellationRequested)return[];const C=n.original.indexOf(o.SCOPE_PREFIX)===0,I=C?1:0;let _,A;n.values&&n.values.length>1?(_=(0,T.pieceToQuery)(n.values[0]),A=(0,T.pieceToQuery)(n.values.slice(1))):_=n;let k;const L=this.options?.openSideBySideDirection?.();L&&(k=[{iconClass:L==="right"?D.ThemeIcon.asClassName(b.Codicon.splitHorizontal):D.ThemeIcon.asClassName(b.Codicon.splitVertical),tooltip:L==="right"?(0,r.localize)(4,null):(0,r.localize)(5,null)}]);const R=[];for(let P=0;P<E.length;P++){const x=E[P],F=(0,v.trim)(x.name),V=`$(${S.SymbolKinds.toIcon(x.kind).id}) ${F}`,W=V.length-F.length;let z=x.containerName;g?.extraContainerLabel&&(z?z=`${g.extraContainerLabel} \u2022 ${z}`:z=g.extraContainerLabel);let B,K,H,U;if(n.original.length>I){let $=!1;if(_!==n&&([B,K]=(0,T.scoreFuzzy2)(V,{...n,values:void 0},I,W),typeof B=="number"&&($=!0)),typeof B!="number"&&([B,K]=(0,T.scoreFuzzy2)(V,_,I,W),typeof B!="number"))continue;if(!$&&A){if(z&&A.original.length>0&&([H,U]=(0,T.scoreFuzzy2)(z,A)),typeof H!="number")continue;typeof B=="number"&&(B+=H)}}const G=x.tags&&x.tags.indexOf(1)>=0;R.push({index:P,kind:x.kind,score:B,label:V,ariaLabel:(0,S.getAriaLabelForSymbol)(x.name,x.kind),description:z,highlights:G?void 0:{label:K,description:U},range:{selection:m.Range.collapseToStart(x.selectionRange),decoration:x.range},strikethrough:G,buttons:k})}const M=R.sort((P,x)=>C?this.compareByKindAndScore(P,x):this.compareByScore(P,x));let N=[];if(C){let V=function(){x&&typeof P=="number"&&F>0&&(x.label=(0,v.format)(p[P]||d,F))},P,x,F=0;for(const W of M)P!==W.kind?(V(),P=W.kind,F=1,x={type:"separator"},N.push(x)):F++,N.push(W);V()}else M.length>0&&(N=[{label:(0,r.localize)(6,null,R.length),type:"separator"},...M]);return N}compareByScore(l,n){if(typeof l.score!="number"&&typeof n.score=="number")return 1;if(typeof l.score=="number"&&typeof n.score!="number")return-1;if(typeof l.score=="number"&&typeof n.score=="number"){if(l.score>n.score)return-1;if(l.score<n.score)return 1}return l.index<n.index?-1:l.index>n.index?1:0}compareByKindAndScore(l,n){const g=p[l.kind]||d,w=p[n.kind]||d,E=g.localeCompare(w);return E===0?this.compareByScore(l,n):E}async getDocumentSymbols(l,n){const g=await this._outlineModelService.getOrCreate(l,n);return n.isCancellationRequested?[]:g.asListOfDocumentSymbols()}};e.AbstractGotoSymbolQuickAccessProvider=u,e.AbstractGotoSymbolQuickAccessProvider=u=o=fe([O(0,i.ILanguageFeaturesService),O(1,h.IOutlineModelService)],u);const d=(0,r.localize)(7,null),p={[5]:(0,r.localize)(8,null),[11]:(0,r.localize)(9,null),[8]:(0,r.localize)(10,null),[12]:(0,r.localize)(11,null),[4]:(0,r.localize)(12,null),[22]:(0,r.localize)(13,null),[23]:(0,r.localize)(14,null),[24]:(0,r.localize)(15,null),[10]:(0,r.localize)(16,null),[2]:(0,r.localize)(17,null),[3]:(0,r.localize)(18,null),[25]:(0,r.localize)(19,null),[1]:(0,r.localize)(20,null),[6]:(0,r.localize)(21,null),[9]:(0,r.localize)(22,null),[21]:(0,r.localize)(23,null),[14]:(0,r.localize)(24,null),[0]:(0,r.localize)(25,null),[17]:(0,r.localize)(26,null),[15]:(0,r.localize)(27,null),[16]:(0,r.localize)(28,null),[18]:(0,r.localize)(29,null),[19]:(0,r.localize)(30,null),[7]:(0,r.localize)(31,null),[13]:(0,r.localize)(32,null)}}),define(Q[3386],Y([1,0,4,51,2423,8,38,36,19,1743]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameInputField=e.CONTEXT_RENAME_INPUT_VISIBLE=void 0,e.CONTEXT_RENAME_INPUT_VISIBLE=new D.RawContextKey("renameInputVisible",!1,(0,b.localize)(0,null));let m=class{constructor(h,a,r,i,s){this._editor=h,this._acceptKeybindings=a,this._themeService=r,this._keybindingService=i,this._disposables=new t.DisposableStore,this.allowEditorOverflow=!0,this._visibleContextKey=e.CONTEXT_RENAME_INPUT_VISIBLE.bindTo(s),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(49)&&this._updateFont()})),this._disposables.add(r.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",(0,b.localize)(1,null)),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(h){if(!this._input||!this._domNode)return;const a=h.getColor(f.widgetShadow),r=h.getColor(f.widgetBorder);this._domNode.style.backgroundColor=String(h.getColor(f.editorWidgetBackground)??""),this._domNode.style.boxShadow=a?` 0 0 8px 2px ${a}`:"",this._domNode.style.border=r?`1px solid ${r}`:"",this._domNode.style.color=String(h.getColor(f.inputForeground)??""),this._input.style.backgroundColor=String(h.getColor(f.inputBackground)??"");const i=h.getColor(f.inputBorder);this._input.style.borderWidth=i?"1px":"0px",this._input.style.borderStyle=i?"solid":"none",this._input.style.borderColor=i?.toString()??"none"}_updateFont(){if(!this._input||!this._label)return;const h=this._editor.getOption(49);this._input.style.fontFamily=h.fontFamily,this._input.style.fontWeight=h.fontWeight,this._input.style.fontSize=`${h.fontSize}px`,this._label.style.fontSize=`${h.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){const[h,a]=this._acceptKeybindings;return this._label.innerText=(0,b.localize)(2,null,this._keybindingService.lookupKeybinding(h)?.getLabel(),this._keybindingService.lookupKeybinding(a)?.getLabel()),null}afterRender(h){h||this.cancelInput(!0)}acceptInput(h){this._currentAcceptInput?.(h)}cancelInput(h){this._currentCancelInput?.(h)}getInput(h,a,r,i,s,o){this._domNode.classList.toggle("preview",s),this._position=new y.Position(h.startLineNumber,h.startColumn),this._input.value=a,this._input.setAttribute("selectionStart",r.toString()),this._input.setAttribute("selectionEnd",i.toString()),this._input.size=Math.max((h.endColumn-h.startColumn)*1.1,20);const u=new t.DisposableStore;return new Promise(d=>{this._currentCancelInput=p=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,d(p),!0),this._currentAcceptInput=p=>{if(this._input.value.trim().length===0||this._input.value===a){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,d({newName:this._input.value,wantsPreview:s&&p})},u.add(o.onCancellationRequested(()=>this.cancelInput(!0))),u.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!document.hasFocus()))),this._show()}).finally(()=>{u.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};e.RenameInputField=m,e.RenameInputField=m=fe([O(2,v.IThemeService),O(3,T.IKeybindingService),O(4,D.IContextKeyService)],m)}),define(Q[3387],Y([1,0,87,14,31,15,4,17,10,348,48,152,79,51,27,73,78,513,2422,56,8,5,11,23,72,16,3386,74]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I){"use strict";var _;Object.defineProperty(e,"__esModule",{value:!0}),e.RenameAction=e.rename=void 0;class A{constructor(P,x,F){this.model=P,this.position=x,this._providerRenameIdx=0,this._providers=F.ordered(P)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(P){const x=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const V=this._providers[this._providerRenameIdx];if(!V.resolveRenameLocation)break;const W=await V.resolveRenameLocation(this.model,this.position,P);if(W){if(W.rejectReason){x.push(W.rejectReason);continue}return W}}const F=this.model.getWordAtPosition(this.position);return F?{range:new i.Range(this.position.lineNumber,F.startColumn,this.position.lineNumber,F.endColumn),text:F.word,rejectReason:x.length>0?x.join(` `):void 0}:{range:i.Range.fromPositions(this.position),text:"",rejectReason:x.length>0?x.join(` `):void 0}}async provideRenameEdits(P,x){return this._provideRenameEdits(P,this._providerRenameIdx,[],x)}async _provideRenameEdits(P,x,F,V){const W=this._providers[x];if(!W)return{edits:[],rejectReason:F.join(` `)};const z=await W.provideRenameEdits(this.model,this.position,P,V);if(z){if(z.rejectReason)return this._provideRenameEdits(P,x+1,F.concat(z.rejectReason),V)}else return this._provideRenameEdits(P,x+1,F.concat(d.localize(0,null)),V);return z}}async function k(N,P,x,F){const V=new A(P,x,N),W=await V.resolveRenameLocation(b.CancellationToken.None);return W?.rejectReason?{edits:[],rejectReason:W.rejectReason}:V.provideRenameEdits(F,b.CancellationToken.None)}e.rename=k;let L=class{static{_=this}static{this.ID="editor.contrib.renameController"}static get(P){return P.getContribution(_.ID)}constructor(P,x,F,V,W,z,B,K){this.editor=P,this._instaService=x,this._notificationService=F,this._bulkEditService=V,this._progressService=W,this._logService=z,this._configService=B,this._languageFeaturesService=K,this._disposableStore=new T.DisposableStore,this._cts=new b.CancellationTokenSource,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(C.RenameInputField,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){if(this._cts.dispose(!0),this._cts=new b.CancellationTokenSource,!this.editor.hasModel())return;const P=this.editor.getPosition(),x=new A(this.editor.getModel(),P,this._languageFeaturesService.renameProvider);if(!x.hasProvider())return;const F=new m.EditorStateCancellationTokenSource(this.editor,5,void 0,this._cts.token);let V;try{const $=x.resolveRenameLocation(F.token);this._progressService.showWhile($,250),V=await $}catch($){u.MessageController.get(this.editor)?.showMessage($||d.localize(1,null),P);return}finally{F.dispose()}if(!V)return;if(V.rejectReason){u.MessageController.get(this.editor)?.showMessage(V.rejectReason,P);return}if(F.token.isCancellationRequested)return;const W=new m.EditorStateCancellationTokenSource(this.editor,5,V.range,this._cts.token),z=this.editor.getSelection();let B=0,K=V.text.length;!i.Range.isEmpty(z)&&!i.Range.spansMultipleLines(z)&&i.Range.containsRange(V.range,z)&&(B=Math.max(0,z.startColumn-V.range.startColumn),K=Math.min(V.range.endColumn,z.endColumn)-V.range.startColumn);const H=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),U=await this._renameInputField.getInput(V.range,V.text,B,K,H,W.token);if(typeof U=="boolean"){U&&this.editor.focus(),W.dispose();return}this.editor.focus();const G=(0,y.raceCancellation)(x.provideRenameEdits(U.newName,W.token),W.token).then(async $=>{if(!(!$||!this.editor.hasModel())){if($.rejectReason){this._notificationService.info($.rejectReason);return}this.editor.setSelection(i.Range.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply($,{editor:this.editor,showPreview:U.wantsPreview,label:d.localize(2,null,V?.text,U.newName),code:"undoredo.rename",quotableLabel:d.localize(3,null,V?.text,U.newName),respectAutoSaveConfig:!0}).then(ie=>{ie.ariaSummary&&(0,t.alert)(d.localize(4,null,V.text,U.newName,ie.ariaSummary))}).catch(ie=>{this._notificationService.error(d.localize(5,null)),this._logService.error(ie)})}},$=>{this._notificationService.error(d.localize(6,null)),this._logService.error($)}).finally(()=>{W.dispose()});return this._progressService.showWhile(G,250),G}acceptRenameInput(P){this._renameInputField.acceptInput(P)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};L=_=fe([O(1,l.IInstantiationService),O(2,g.INotificationService),O(3,h.IBulkEditService),O(4,w.IEditorProgressService),O(5,n.ILogService),O(6,o.ITextResourceConfigurationService),O(7,I.ILanguageFeaturesService)],L);class R extends S.EditorAction{constructor(){super({id:"editor.action.rename",label:d.localize(7,null),alias:"Rename Symbol",precondition:c.ContextKeyExpr.and(s.EditorContextKeys.writable,s.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(P,x){const F=P.get(a.ICodeEditorService),[V,W]=Array.isArray(x)&&x||[void 0,void 0];return v.URI.isUri(V)&&r.Position.isIPosition(W)?F.openCodeEditor({resource:V},F.getActiveCodeEditor()).then(z=>{z&&(z.setPosition(W),z.invokeWithinContext(B=>(this.reportTelemetry(B,z),this.run(B,z))))},D.onUnexpectedError):super.runCommand(P,x)}run(P,x){const F=L.get(x);return F?F.run():Promise.resolve()}}e.RenameAction=R,(0,S.registerEditorContribution)(L.ID,L,4),(0,S.registerEditorAction)(R);const M=S.EditorCommand.bindToContribution(L.get);(0,S.registerEditorCommand)(new M({id:"acceptRenameInput",precondition:C.CONTEXT_RENAME_INPUT_VISIBLE,handler:N=>N.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:c.ContextKeyExpr.and(s.EditorContextKeys.focus,c.ContextKeyExpr.not("isComposing")),primary:3}})),(0,S.registerEditorCommand)(new M({id:"acceptRenameInputWithPreview",precondition:c.ContextKeyExpr.and(C.CONTEXT_RENAME_INPUT_VISIBLE,c.ContextKeyExpr.has("config.editor.rename.enablePreview")),handler:N=>N.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:c.ContextKeyExpr.and(s.EditorContextKeys.focus,c.ContextKeyExpr.not("isComposing")),primary:1024+3}})),(0,S.registerEditorCommand)(new M({id:"cancelRenameInput",precondition:C.CONTEXT_RENAME_INPUT_VISIBLE,handler:N=>N.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:s.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,S.registerModelAndPositionCommand)("_executeDocumentRenameProvider",function(N,P,x,...F){const[V]=F;(0,f.assertType)(typeof V=="string");const{renameProvider:W}=N.get(I.ILanguageFeaturesService);return k(W,P,x,V)}),(0,S.registerModelAndPositionCommand)("_executePrepareRename",async function(N,P,x){const{renameProvider:F}=N.get(I.ILanguageFeaturesService),W=await new A(P,x,F).resolveRenameLocation(b.CancellationToken.None);if(W?.rejectReason)throw new Error(W.rejectReason);return W}),E.Registry.as(p.Extensions.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:d.localize(8,null),default:!0,type:"boolean"}}})}),define(Q[3388],Y([1,0,4,15,57,9,14,31,19,891,1146,328,145,74,857,564,812]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentSemanticTokensFeature=void 0;let d=class extends t.Disposable{constructor(n,g,w,E,C,I){super(),this._watchers=Object.create(null);const _=L=>{this._watchers[L.uri.toString()]=new p(L,n,w,C,I)},A=(L,R)=>{R.dispose(),delete this._watchers[L.uri.toString()]},k=()=>{for(const L of g.getModels()){const R=this._watchers[L.uri.toString()];(0,o.isSemanticColoringEnabled)(L,w,E)?R||_(L):R&&A(L,R)}};this._register(g.onModelAdded(L=>{(0,o.isSemanticColoringEnabled)(L,w,E)&&_(L)})),this._register(g.onModelRemoved(L=>{const R=this._watchers[L.uri.toString()];R&&A(L,R)})),this._register(E.onDidChangeConfiguration(L=>{L.affectsConfiguration(o.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&k()})),this._register(w.onDidColorThemeChange(k))}dispose(){for(const n of Object.values(this._watchers))n.dispose();super.dispose()}};e.DocumentSemanticTokensFeature=d,e.DocumentSemanticTokensFeature=d=fe([O(0,i.ISemanticTokensStylingService),O(1,b.IModelService),O(2,v.IThemeService),O(3,D.IConfigurationService),O(4,h.ILanguageFeatureDebounceService),O(5,r.ILanguageFeaturesService)],d);let p=class extends t.Disposable{static{u=this}static{this.REQUEST_MIN_DELAY=300}static{this.REQUEST_MAX_DELAY=2e3}constructor(n,g,w,E,C){super(),this._semanticTokensStylingService=g,this._isDisposed=!1,this._model=n,this._provider=C.documentSemanticTokensProvider,this._debounceInformation=E.for(this._provider,"DocumentSemanticTokens",{min:u.REQUEST_MIN_DELAY,max:u.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new T.RunOnceScheduler(()=>this._fetchDocumentSemanticTokensNow(),u.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const I=()=>{(0,t.dispose)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const _ of this._provider.all(n))typeof _.onDidChange=="function"&&this._documentProvidersChangeListeners.push(_.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};I(),this._register(this._provider.onDidChange(()=>{I(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(w.onDidColorThemeChange(_=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),(0,t.dispose)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,S.hasDocumentSemanticTokensProvider)(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const n=new f.CancellationTokenSource,g=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,w=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,E=(0,S.getDocumentSemanticTokens)(this._provider,this._model,g,w,n.token);this._currentDocumentRequestCancellationTokenSource=n,this._providersChangedDuringRequest=!1;const C=[],I=this._model.onDidChangeContent(A=>{C.push(A)}),_=new a.StopWatch(!1);E.then(A=>{if(this._debounceInformation.update(this._model,_.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,I.dispose(),!A)this._setDocumentSemanticTokens(null,null,null,C);else{const{provider:k,tokens:L}=A,R=this._semanticTokensStylingService.getStyling(k);this._setDocumentSemanticTokens(k,L||null,R,C)}},A=>{A&&(y.isCancellationError(A)||typeof A.message=="string"&&A.message.indexOf("busy")!==-1)||y.onUnexpectedError(A),this._currentDocumentRequestCancellationTokenSource=null,I.dispose(),(C.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(n,g,w,E,C){C=Math.min(C,w.length-E,n.length-g);for(let I=0;I<C;I++)w[E+I]=n[g+I]}_setDocumentSemanticTokens(n,g,w,E){const C=this._currentDocumentResponse,I=()=>{(E.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){n&&g&&n.releaseDocumentSemanticTokens(g.resultId);return}if(!n||!w){this._model.tokenization.setSemanticTokens(null,!1);return}if(!g){this._model.tokenization.setSemanticTokens(null,!0),I();return}if((0,S.isSemanticTokensEdits)(g)){if(!C){this._model.tokenization.setSemanticTokens(null,!0);return}if(g.edits.length===0)g={resultId:g.resultId,data:C.data};else{let _=0;for(const M of g.edits)_+=(M.data?M.data.length:0)-M.deleteCount;const A=C.data,k=new Uint32Array(A.length+_);let L=A.length,R=k.length;for(let M=g.edits.length-1;M>=0;M--){const N=g.edits[M];if(N.start>A.length){w.warnInvalidEditStart(C.resultId,g.resultId,M,N.start,A.length),this._model.tokenization.setSemanticTokens(null,!0);return}const P=L-(N.start+N.deleteCount);P>0&&(u._copy(A,L-P,k,R-P,P),R-=P),N.data&&(u._copy(N.data,0,k,R-N.data.length,N.data.length),R-=N.data.length),L=N.start}L>0&&u._copy(A,0,k,0,L),g={resultId:g.resultId,data:k}}}if((0,S.isSemanticTokens)(g)){this._currentDocumentResponse=new c(n,g.resultId,g.data);const _=(0,m.toMultilineTokens2)(g,w,this._model.getLanguageId());if(E.length>0)for(const A of E)for(const k of _)for(const L of A.changes)k.applyEdit(L.range,L.text);this._model.tokenization.setSemanticTokens(_,!0)}else this._model.tokenization.setSemanticTokens(null,!0);I()}};p=u=fe([O(1,i.ISemanticTokensStylingService),O(2,v.IThemeService),O(3,h.ILanguageFeatureDebounceService),O(4,r.ILanguageFeaturesService)],p);class c{constructor(n,g,w){this.provider=n,this.resultId=g,this.data=w}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,s.registerEditorFeature)(d)}),define(Q[1217],Y([1,0,14,4,48,1146,812,891,9,19,328,145,74,857]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportSemanticTokensContribution=void 0;let s=class extends y.Disposable{static{i=this}static{this.ID="editor.contrib.viewportSemanticTokens"}static get(u){return u.getContribution(i.ID)}constructor(u,d,p,c,l,n){super(),this._semanticTokensStylingService=d,this._themeService=p,this._configurationService=c,this._editor=u,this._provider=n.documentRangeSemanticTokensProvider,this._debounceInformation=l.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new t.RunOnceScheduler(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const g=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{g()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),g()})),this._register(this._editor.onDidChangeModelContent(w=>{this._cancelAll(),g()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),g()})),this._register(this._configurationService.onDidChangeConfiguration(w=>{w.affectsConfiguration(T.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&(this._cancelAll(),g())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),g()})),g()}_cancelAll(){for(const u of this._outstandingRequests)u.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(u){for(let d=0,p=this._outstandingRequests.length;d<p;d++)if(this._outstandingRequests[d]===u){this._outstandingRequests.splice(d,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const u=this._editor.getModel();if(u.tokenization.hasCompleteSemanticTokens())return;if(!(0,T.isSemanticColoringEnabled)(u,this._themeService,this._configurationService)){u.tokenization.hasSomeSemanticTokens()&&u.tokenization.setSemanticTokens(null,!1);return}if(!(0,D.hasDocumentRangeSemanticTokensProvider)(this._provider,u)){u.tokenization.hasSomeSemanticTokens()&&u.tokenization.setSemanticTokens(null,!1);return}const d=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(d.map(p=>this._requestRange(u,p)))}_requestRange(u,d){const p=u.getVersionId(),c=(0,t.createCancelablePromise)(n=>Promise.resolve((0,D.getDocumentRangeSemanticTokens)(this._provider,u,d,n))),l=new h.StopWatch(!1);return c.then(n=>{if(this._debounceInformation.update(u,l.elapsed()),!n||!n.tokens||u.isDisposed()||u.getVersionId()!==p)return;const{provider:g,tokens:w}=n,E=this._semanticTokensStylingService.getStyling(g);u.tokenization.setPartialSemanticTokens(d,(0,f.toMultilineTokens2)(w,E,u.getLanguageId()))}).then(()=>this._removeOutstandingRequest(c),()=>this._removeOutstandingRequest(c)),c}};e.ViewportSemanticTokensContribution=s,e.ViewportSemanticTokensContribution=s=i=fe([O(1,r.ISemanticTokensStylingService),O(2,m.IThemeService),O(3,v.IConfigurationService),O(4,S.ILanguageFeatureDebounceService),O(5,a.ILanguageFeaturesService)],s),(0,b.registerEditorContribution)(s.ID,s,1)}),define(Q[3389],Y([1,0,7,306,32,37,6,128,4,10,99,252,57,50,2432,25,77,19,1178]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ItemRenderer=e.getAriaId=void 0;function p(w){return`suggest-aria-id:${w}`}e.getAriaId=p;const c=(0,o.registerIcon)("suggest-more-info",b.Codicon.chevronRight,i.localize(0,null)),l=new class Fi{static{this._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/}static{this._regexStrict=new RegExp(`^${Fi._regexRelaxed.source}$`,"i")}extract(E,C){if(E.textLabel.match(Fi._regexStrict))return C[0]=E.textLabel,!0;if(E.completion.detail&&E.completion.detail.match(Fi._regexStrict))return C[0]=E.completion.detail,!0;if(typeof E.completion.documentation=="string"){const I=Fi._regexRelaxed.exec(E.completion.documentation);if(I&&(I.index===0||I.index+I[0].length===E.completion.documentation.length))return C[0]=I[0],!0}return!1}};let n=class{constructor(E,C,I,_){this._editor=E,this._modelService=C,this._languageService=I,this._themeService=_,this._onDidToggleDetails=new T.Emitter,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(E){const C=new v.DisposableStore,I=E;I.classList.add("show-file-icons");const _=(0,t.append)(E,(0,t.$)(".icon")),A=(0,t.append)(_,(0,t.$)("span.colorspan")),k=(0,t.append)(E,(0,t.$)(".contents")),L=(0,t.append)(k,(0,t.$)(".main")),R=(0,t.append)(L,(0,t.$)(".icon-label.codicon")),M=(0,t.append)(L,(0,t.$)("span.left")),N=(0,t.append)(L,(0,t.$)("span.right")),P=new y.IconLabel(M,{supportHighlights:!0,supportIcons:!0});C.add(P);const x=(0,t.append)(M,(0,t.$)("span.signature-label")),F=(0,t.append)(M,(0,t.$)("span.qualifier-label")),V=(0,t.append)(N,(0,t.$)("span.details-label")),W=(0,t.append)(N,(0,t.$)("span.readMore"+D.ThemeIcon.asCSSSelector(c)));W.title=i.localize(1,null);const z=()=>{const B=this._editor.getOptions(),K=B.get(49),H=K.getMassagedFontFamily(),U=K.fontFeatureSettings,G=B.get(117)||K.fontSize,$=B.get(118)||K.lineHeight,ie=K.fontWeight,J=K.letterSpacing,j=`${G}px`,ee=`${$}px`,X=`${J}px`;I.style.fontSize=j,I.style.fontWeight=ie,I.style.letterSpacing=X,L.style.fontFamily=H,L.style.fontFeatureSettings=U,L.style.lineHeight=ee,_.style.height=ee,_.style.width=ee,W.style.height=ee,W.style.width=ee};return z(),C.add(this._editor.onDidChangeConfiguration(B=>{(B.hasChanged(49)||B.hasChanged(117)||B.hasChanged(118))&&z()})),{root:I,left:M,right:N,icon:_,colorspan:A,iconLabel:P,iconContainer:R,parametersLabel:x,qualifierLabel:F,detailsLabel:V,readMore:W,disposables:C}}renderElement(E,C,I){const{completion:_}=E;I.root.id=p(C),I.colorspan.style.backgroundColor="";const A={labelEscapeNewLines:!0,matches:(0,f.createMatches)(E.score)},k=[];if(_.kind===19&&l.extract(E,k))I.icon.className="icon customcolor",I.iconContainer.className="icon hide",I.colorspan.style.backgroundColor=k[0];else if(_.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){I.icon.className="icon hide",I.iconContainer.className="icon hide";const L=(0,h.getIconClasses)(this._modelService,this._languageService,m.URI.from({scheme:"fake",path:E.textLabel}),s.FileKind.FILE),R=(0,h.getIconClasses)(this._modelService,this._languageService,m.URI.from({scheme:"fake",path:_.detail}),s.FileKind.FILE);A.extraClasses=L.length>R.length?L:R}else _.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(I.icon.className="icon hide",I.iconContainer.className="icon hide",A.extraClasses=[(0,h.getIconClasses)(this._modelService,this._languageService,m.URI.from({scheme:"fake",path:E.textLabel}),s.FileKind.FOLDER),(0,h.getIconClasses)(this._modelService,this._languageService,m.URI.from({scheme:"fake",path:_.detail}),s.FileKind.FOLDER)].flat()):(I.icon.className="icon hide",I.iconContainer.className="",I.iconContainer.classList.add("suggest-icon",...D.ThemeIcon.asClassNameArray(S.CompletionItemKinds.toIcon(_.kind))));_.tags&&_.tags.indexOf(1)>=0&&(A.extraClasses=(A.extraClasses||[]).concat(["deprecated"]),A.matches=[]),I.iconLabel.setLabel(E.textLabel,void 0,A),typeof _.label=="string"?(I.parametersLabel.textContent="",I.detailsLabel.textContent=g(_.detail||""),I.root.classList.add("string-label")):(I.parametersLabel.textContent=g(_.label.detail||""),I.detailsLabel.textContent=g(_.label.description||""),I.root.classList.remove("string-label")),this._editor.getOption(116).showInlineDetails?(0,t.show)(I.detailsLabel):(0,t.hide)(I.detailsLabel),(0,d.canExpandCompletionItem)(E)?(I.right.classList.add("can-expand-details"),(0,t.show)(I.readMore),I.readMore.onmousedown=L=>{L.stopPropagation(),L.preventDefault()},I.readMore.onclick=L=>{L.stopPropagation(),L.preventDefault(),this._onDidToggleDetails.fire()}):(I.right.classList.remove("can-expand-details"),(0,t.hide)(I.readMore),I.readMore.onmousedown=null,I.readMore.onclick=null)}disposeTemplate(E){E.disposables.dispose()}};e.ItemRenderer=n,e.ItemRenderer=n=fe([O(1,a.IModelService),O(2,r.ILanguageService),O(3,u.IThemeService)],n);function g(w){return w.replace(/\r\n|\r|\n/g,"")}}),define(Q[3390],Y([1,0,31,6,8,5,111,90,41,3264,54,36,19,3345]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let i=class extends a.Themable{get backButton(){return this.controller.backButton}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(m.QuickAccessController))),this._quickAccess}constructor(o,u,d,p){super(d),this.instantiationService=o,this.contextKeyService=u,this.layoutService=p,this._onShow=this._register(new y.Emitter),this.onShow=this._onShow.event,this._onHide=this._register(new y.Emitter),this.onHide=this._onHide.event,this.contexts=new Map}createController(o=this.layoutService,u){const d={idPrefix:"quickInput_",container:o.container,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:c=>this.setContextKey(c),linkOpenerDelegate:c=>{this.instantiationService.invokeFunction(l=>{l.get(v.IOpenerService).open(c,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>o.focus(),createList:(c,l,n,g,w)=>this.instantiationService.createInstance(f.WorkbenchList,c,l,n,g,w),styles:this.computeStyles()},p=this._register(new r.QuickInputController({...d,...u},this.themeService));return p.layout(o.dimension,o.offset.quickPickTop),this._register(o.onDidLayout(c=>p.layout(c,o.offset.quickPickTop))),this._register(p.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(p.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),p}setContextKey(o){let u;o&&(u=this.contexts.get(o),u||(u=new b.RawContextKey(o,!1).bindTo(this.contextKeyService),this.contexts.set(o,u))),!(u&&u.get())&&(this.resetContextKeys(),u?.set(!0))}resetContextKeys(){this.contexts.forEach(o=>{o.get()&&o.reset()})}pick(o,u={},d=t.CancellationToken.None){return this.controller.pick(o,u,d)}input(o={},u=t.CancellationToken.None){return this.controller.input(o,u)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}createQuickWidget(){return this.controller.createQuickWidget()}focus(){this.controller.focus()}toggle(){this.controller.toggle()}navigate(o,u){this.controller.navigate(o,u)}accept(o){return this.controller.accept(o)}back(){return this.controller.back()}cancel(){return this.controller.cancel()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:(0,h.asCssVariable)(h.quickInputBackground),quickInputForeground:(0,h.asCssVariable)(h.quickInputForeground),quickInputTitleBackground:(0,h.asCssVariable)(h.quickInputTitleBackground),widgetBorder:(0,h.asCssVariable)(h.widgetBorder),widgetShadow:(0,h.asCssVariable)(h.widgetShadow)},inputBox:S.defaultInputBoxStyles,toggle:S.defaultToggleStyles,countBadge:S.defaultCountBadgeStyles,button:S.defaultButtonStyles,progressBar:S.defaultProgressBarStyles,keybindingLabel:S.defaultKeybindingLabelStyles,list:(0,S.getListStyles)({listBackground:h.quickInputBackground,listFocusBackground:h.quickInputListFocusBackground,listFocusForeground:h.quickInputListFocusForeground,listInactiveFocusForeground:h.quickInputListFocusForeground,listInactiveSelectionIconForeground:h.quickInputListFocusIconForeground,listInactiveFocusBackground:h.quickInputListFocusBackground,listFocusOutline:h.activeContrastBorder,listInactiveFocusOutline:h.activeContrastBorder}),pickerGroup:{pickerGroupBorder:(0,h.asCssVariable)(h.pickerGroupBorder),pickerGroupForeground:(0,h.asCssVariable)(h.pickerGroupForeground)}}}};e.QuickInputService=i,e.QuickInputService=i=fe([O(0,D.IInstantiationService),O(1,b.IContextKeyService),O(2,a.IThemeService),O(3,T.ILayoutService)],i)}),define(Q[597],Y([1,0,14,80,6,2489,219,16]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tokenStylingSchemaId=e.getTokenClassificationRegistry=e.parseClassifierString=e.SemanticTokenRule=e.TokenStyle=e.typeAndModifierIdPattern=void 0;const v="*",m=":",S=".",h="\\w+[-_\\w+]*";e.typeAndModifierIdPattern=`^${h}$`;const a=`^(${h}|\\*)(\\${S}${h})*(${m}${h})?$`,r="^(\\s*(italic|bold|underline|strikethrough))*\\s*$";class i{constructor(_,A,k,L,R){this.foreground=_,this.bold=A,this.underline=k,this.strikethrough=L,this.italic=R}}e.TokenStyle=i,function(I){function _(N){return{_foreground:N.foreground===void 0?null:y.Color.Format.CSS.formatHexA(N.foreground,!0),_bold:N.bold===void 0?null:N.bold,_underline:N.underline===void 0?null:N.underline,_italic:N.italic===void 0?null:N.italic,_strikethrough:N.strikethrough===void 0?null:N.strikethrough}}I.toJSONObject=_;function A(N){if(N){const P=F=>typeof F=="boolean"?F:void 0,x=F=>typeof F=="string"?y.Color.fromHex(F):void 0;return new I(x(N._foreground),P(N._bold),P(N._underline),P(N._strikethrough),P(N._italic))}}I.fromJSONObject=A;function k(N,P){return N===P?!0:N!==void 0&&P!==void 0&&(N.foreground instanceof y.Color?N.foreground.equals(P.foreground):P.foreground===void 0)&&N.bold===P.bold&&N.underline===P.underline&&N.strikethrough===P.strikethrough&&N.italic===P.italic}I.equals=k;function L(N){return N instanceof I}I.is=L;function R(N){return new I(N.foreground,N.bold,N.underline,N.strikethrough,N.italic)}I.fromData=R;function M(N,P,x,F,V,W){let z;if(N!==void 0&&(z=y.Color.fromHex(N)),P!==void 0){x=W=F=V=!1;const B=/italic|bold|underline|strikethrough/g;let K;for(;K=B.exec(P);)switch(K[0]){case"bold":x=!0;break;case"italic":W=!0;break;case"underline":F=!0;break;case"strikethrough":V=!0;break}}return new I(z,x,F,V,W)}I.fromSettings=M}(i||(e.TokenStyle=i={}));var s;(function(I){function _(R,M){if(M&&typeof M._selector=="string"&&M._style){const N=i.fromJSONObject(M._style);if(N)try{return{selector:R.parseTokenSelector(M._selector),style:N}}catch{}}}I.fromJSONObject=_;function A(R){return{_selector:R.selector.id,_style:i.toJSONObject(R.style)}}I.toJSONObject=A;function k(R,M){return R===M?!0:R!==void 0&&M!==void 0&&R.selector&&M.selector&&R.selector.id===M.selector.id&&i.equals(R.style,M.style)}I.equals=k;function L(R){return R&&R.selector&&typeof R.selector.id=="string"&&i.is(R.style)}I.is=L})(s||(e.SemanticTokenRule=s={}));const o={TokenClassificationContribution:"base.contributions.tokenClassification"};class u{constructor(){this._onDidChangeSchema=new b.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.currentTypeNumber=0,this.currentModifierBit=1,this.tokenStylingDefaultRules=[],this.tokenStylingSchema={type:"object",properties:{},patternProperties:{[a]:w()},additionalProperties:!1,definitions:{style:{type:"object",description:D.localize(0,null),properties:{foreground:{type:"string",description:D.localize(1,null),format:"color-hex",default:"#ff0000"},background:{type:"string",deprecationMessage:D.localize(2,null)},fontStyle:{type:"string",description:D.localize(3,null),pattern:r,patternErrorMessage:D.localize(4,null),defaultSnippets:[{label:D.localize(5,null),bodyText:'""'},{body:"italic"},{body:"bold"},{body:"underline"},{body:"strikethrough"},{body:"italic bold"},{body:"italic underline"},{body:"italic strikethrough"},{body:"bold underline"},{body:"bold strikethrough"},{body:"underline strikethrough"},{body:"italic bold underline"},{body:"italic bold strikethrough"},{body:"italic underline strikethrough"},{body:"bold underline strikethrough"},{body:"italic bold underline strikethrough"}]},bold:{type:"boolean",description:D.localize(6,null)},italic:{type:"boolean",description:D.localize(7,null)},underline:{type:"boolean",description:D.localize(8,null)},strikethrough:{type:"boolean",description:D.localize(9,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(_,A,k,L){if(!_.match(e.typeAndModifierIdPattern))throw new Error("Invalid token type id.");if(k&&!k.match(e.typeAndModifierIdPattern))throw new Error("Invalid token super type id.");const M={num:this.currentTypeNumber++,id:_,superType:k,description:A,deprecationMessage:L};this.tokenTypeById[_]=M;const N=w(A,L);this.tokenStylingSchema.properties[_]=N,this.typeHierarchy=Object.create(null)}registerTokenModifier(_,A,k){if(!_.match(e.typeAndModifierIdPattern))throw new Error("Invalid token modifier id.");const L=this.currentModifierBit;this.currentModifierBit=this.currentModifierBit*2;const R={num:L,id:_,description:A,deprecationMessage:k};this.tokenModifierById[_]=R,this.tokenStylingSchema.properties[`*.${_}`]=w(A,k)}parseTokenSelector(_,A){const k=c(_,A);return k.type?{match:(L,R,M)=>{let N=0;if(k.language!==void 0){if(k.language!==M)return-1;N+=10}if(k.type!==v){const x=this.getTypeHierarchy(L).indexOf(k.type);if(x===-1)return-1;N+=100-x}for(const P of k.modifiers)if(R.indexOf(P)===-1)return-1;return N+k.modifiers.length*100},id:`${[k.type,...k.modifiers.sort()].join(".")}${k.language!==void 0?":"+k.language:""}`}:{match:()=>-1,id:"$invalid"}}registerTokenStyleDefault(_,A){this.tokenStylingDefaultRules.push({selector:_,defaults:A})}deregisterTokenStyleDefault(_){const A=_.id;this.tokenStylingDefaultRules=this.tokenStylingDefaultRules.filter(k=>k.selector.id!==A)}deregisterTokenType(_){delete this.tokenTypeById[_],delete this.tokenStylingSchema.properties[_],this.typeHierarchy=Object.create(null)}deregisterTokenModifier(_){delete this.tokenModifierById[_],delete this.tokenStylingSchema.properties[`*.${_}`]}getTokenTypes(){return Object.keys(this.tokenTypeById).map(_=>this.tokenTypeById[_])}getTokenModifiers(){return Object.keys(this.tokenModifierById).map(_=>this.tokenModifierById[_])}getTokenStylingSchema(){return this.tokenStylingSchema}getTokenStylingDefaultRules(){return this.tokenStylingDefaultRules}getTypeHierarchy(_){let A=this.typeHierarchy[_];if(!A){this.typeHierarchy[_]=A=[_];let k=this.tokenTypeById[_];for(;k&&k.superType;)A.push(k.superType),k=this.tokenTypeById[k.superType]}return A}toString(){const _=(A,k)=>{const L=A.indexOf(".")===-1?0:1,R=k.indexOf(".")===-1?0:1;return L!==R?L-R:A.localeCompare(k)};return Object.keys(this.tokenTypeById).sort(_).map(A=>`- \`${A}\`: ${this.tokenTypeById[A].description}`).join(` `)}}const d=m.charCodeAt(0),p=S.charCodeAt(0);function c(I,_){let A=I.length,k=_;const L=[];for(let M=A-1;M>=0;M--){const N=I.charCodeAt(M);if(N===d||N===p){const P=I.substring(M+1,A);A=M,N===d?k=P:L.push(P)}}return{type:I.substring(0,A),modifiers:L,language:k}}e.parseClassifierString=c;const l=n();f.Registry.add(o.TokenClassificationContribution,l);function n(){const I=new u;function _(k,L,R=[],M,N){return I.registerTokenType(k,L,M,N),R&&A(k,R),k}function A(k,L){try{const R=I.parseTokenSelector(k);I.registerTokenStyleDefault(R,{scopesToProbe:L})}catch(R){console.log(R)}}return _("comment",D.localize(10,null),[["comment"]]),_("string",D.localize(11,null),[["string"]]),_("keyword",D.localize(12,null),[["keyword.control"]]),_("number",D.localize(13,null),[["constant.numeric"]]),_("regexp",D.localize(14,null),[["constant.regexp"]]),_("operator",D.localize(15,null),[["keyword.operator"]]),_("namespace",D.localize(16,null),[["entity.name.namespace"]]),_("type",D.localize(17,null),[["entity.name.type"],["support.type"]]),_("struct",D.localize(18,null),[["entity.name.type.struct"]]),_("class",D.localize(19,null),[["entity.name.type.class"],["support.class"]]),_("interface",D.localize(20,null),[["entity.name.type.interface"]]),_("enum",D.localize(21,null),[["entity.name.type.enum"]]),_("typeParameter",D.localize(22,null),[["entity.name.type.parameter"]]),_("function",D.localize(23,null),[["entity.name.function"],["support.function"]]),_("member",D.localize(24,null),[],"method","Deprecated use `method` instead"),_("method",D.localize(25,null),[["entity.name.function.member"],["support.function"]]),_("macro",D.localize(26,null),[["entity.name.function.preprocessor"]]),_("variable",D.localize(27,null),[["variable.other.readwrite"],["entity.name.variable"]]),_("parameter",D.localize(28,null),[["variable.parameter"]]),_("property",D.localize(29,null),[["variable.other.property"]]),_("enumMember",D.localize(30,null),[["variable.other.enummember"]]),_("event",D.localize(31,null),[["variable.other.event"]]),_("decorator",D.localize(32,null),[["entity.name.decorator"],["entity.name.function"]]),_("label",D.localize(33,null),void 0),I.registerTokenModifier("declaration",D.localize(34,null),void 0),I.registerTokenModifier("documentation",D.localize(35,null),void 0),I.registerTokenModifier("static",D.localize(36,null),void 0),I.registerTokenModifier("abstract",D.localize(37,null),void 0),I.registerTokenModifier("deprecated",D.localize(38,null),void 0),I.registerTokenModifier("modification",D.localize(39,null),void 0),I.registerTokenModifier("async",D.localize(40,null),void 0),I.registerTokenModifier("readonly",D.localize(41,null),void 0),A("variable.readonly",[["variable.other.constant"]]),A("property.readonly",[["variable.other.constant.property"]]),A("type.defaultLibrary",[["support.type"]]),A("class.defaultLibrary",[["support.class"]]),A("interface.defaultLibrary",[["support.class"]]),A("variable.defaultLibrary",[["support.variable"],["support.other.variable"]]),A("variable.defaultLibrary.readonly",[["support.constant"]]),A("property.defaultLibrary",[["support.variable.property"]]),A("property.defaultLibrary.readonly",[["support.constant.property"]]),A("function.defaultLibrary",[["support.function"]]),A("member.defaultLibrary",[["support.function"]]),I}function g(){return l}e.getTokenClassificationRegistry=g;function w(I,_){return{description:I,deprecationMessage:_,defaultSnippets:[{body:"${1:#ff0000}"}],anyOf:[{type:"string",format:"color-hex"},{$ref:"#/definitions/style"}]}}e.tokenStylingSchemaId="vscode://schemas/token-styling";const E=f.Registry.as(T.Extensions.JSONContribution);E.registerSchema(e.tokenStylingSchemaId,l.getTokenStylingSchema());const C=new t.RunOnceScheduler(()=>E.notifySchemaChanged(e.tokenStylingSchemaId),200);l.onDidChangeSchema(()=>{C.isScheduled()||C.schedule()})}),define(Q[309],Y([1,0,6,9,5,11]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTunnelService=e.DisposableTunnel=e.isPortPrivileged=e.isAllInterfaces=e.ALL_INTERFACES_ADDRESSES=e.isLocalhost=e.LOCALHOST_ADDRESSES=e.extractLocalHostUriMetaDataForPortMapping=e.ProvidedOnAutoForward=e.isTunnelProvider=e.TunnelPrivacyId=e.TunnelProtocol=e.ISharedTunnelsService=e.ITunnelService=void 0,e.ITunnelService=(0,b.createDecorator)("tunnelService"),e.ISharedTunnelsService=(0,b.createDecorator)("sharedTunnelsService");var T;(function(o){o.Http="http",o.Https="https"})(T||(e.TunnelProtocol=T={}));var f;(function(o){o.ConstantPrivate="constantPrivate",o.Private="private",o.Public="public"})(f||(e.TunnelPrivacyId=f={}));function v(o){return!!o.forwardPort}e.isTunnelProvider=v;var m;(function(o){o[o.Notify=1]="Notify",o[o.OpenBrowser=2]="OpenBrowser",o[o.OpenPreview=3]="OpenPreview",o[o.Silent=4]="Silent",o[o.Ignore=5]="Ignore",o[o.OpenBrowserOnce=6]="OpenBrowserOnce"})(m||(e.ProvidedOnAutoForward=m={}));function S(o){if(o.scheme!=="http"&&o.scheme!=="https")return;const u=/^(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)$/.exec(o.authority);if(u)return{address:u[1],port:+u[2]}}e.extractLocalHostUriMetaDataForPortMapping=S,e.LOCALHOST_ADDRESSES=["localhost","127.0.0.1","0:0:0:0:0:0:0:1","::1"];function h(o){return e.LOCALHOST_ADDRESSES.indexOf(o)>=0}e.isLocalhost=h,e.ALL_INTERFACES_ADDRESSES=["0.0.0.0","0:0:0:0:0:0:0:0","::"];function a(o){return e.ALL_INTERFACES_ADDRESSES.indexOf(o)>=0}e.isAllInterfaces=a;function r(o,u,d,p){if(d===1)return!1;if(d===2&&a(u)){const c=/(\d+)\.(\d+)\.(\d+)/g.exec(p);if(c?.length===4&&parseInt(c[1])>=18)return!1}return o<1024}e.isPortPrivileged=r;class i{constructor(u,d,p){this.remoteAddress=u,this.localAddress=d,this._dispose=p,this._onDispose=new t.Emitter,this.onDidDispose=this._onDispose.event}dispose(){return this._onDispose.fire(),this._dispose()}}e.DisposableTunnel=i;let s=class{constructor(u,d){this.logService=u,this.configurationService=d,this._onTunnelOpened=new t.Emitter,this.onTunnelOpened=this._onTunnelOpened.event,this._onTunnelClosed=new t.Emitter,this.onTunnelClosed=this._onTunnelClosed.event,this._onAddedTunnelProvider=new t.Emitter,this.onAddedTunnelProvider=this._onAddedTunnelProvider.event,this._tunnels=new Map,this._canElevate=!1,this._privacyOptions=[],this._factoryInProgress=new Set}get hasTunnelProvider(){return!!this._tunnelProvider}get defaultTunnelHost(){const u=this.configurationService.getValue("remote.localPortHost");return!u||u==="localhost"?"127.0.0.1":"0.0.0.0"}setTunnelProvider(u){return this._tunnelProvider=u,u?(this._onAddedTunnelProvider.fire(),{dispose:()=>{this._tunnelProvider=void 0,this._canElevate=!1,this._privacyOptions=[]}}):(this._canElevate=!1,this._privacyOptions=[],this._onAddedTunnelProvider.fire(),{dispose:()=>{}})}setTunnelFeatures(u){this._canElevate=u.elevation,this._privacyOptions=u.privacyOptions}get canElevate(){return this._canElevate}get canChangePrivacy(){return this._privacyOptions.length>0}get privacyOptions(){return this._privacyOptions}get tunnels(){return this.getTunnels()}async getTunnels(){const u=[],d=Array.from(this._tunnels.values());for(const p of d){const c=Array.from(p.values());for(const l of c){const n=await l.value;n&&typeof n!="string"&&u.push(n)}}return u}async dispose(){for(const u of this._tunnels.values()){for(const{value:d}of u.values())await d.then(p=>typeof p!="string"?p?.dispose():void 0);u.clear()}this._tunnels.clear()}setEnvironmentTunnel(u,d,p,c,l){this.addTunnelToMap(u,d,Promise.resolve({tunnelRemoteHost:u,tunnelRemotePort:d,localAddress:p,privacy:c,protocol:l,dispose:()=>Promise.resolve()}))}async getExistingTunnel(u,d){(a(u)||h(u))&&(u=e.LOCALHOST_ADDRESSES[0]);const p=this.getTunnelFromMap(u,d);if(p)return++p.refcount,p.value}openTunnel(u,d,p,c,l,n=!1,g,w){this.logService.trace(`ForwardedPorts: (TunnelService) openTunnel request for ${d}:${p} on local port ${l}.`);const E=this._tunnelProvider??u;if(!E)return;if(d||(d="localhost"),c||(c=this.defaultTunnelHost),this._tunnelProvider&&this._factoryInProgress.has(p)){this.logService.debug("ForwardedPorts: (TunnelService) Another call to create a tunnel with the same address has occurred before the last one completed. This call will be ignored.");return}const C=this.retainOrCreateTunnel(E,d,p,c,l,n,g,w);return C?C.then(I=>{if(I){if(typeof I=="string")return this.logService.trace("ForwardedPorts: (TunnelService) The tunnel provider returned an error when creating the tunnel."),this.removeEmptyOrErrorTunnelFromMap(d,p),I}else{this.logService.trace("ForwardedPorts: (TunnelService) New tunnel is undefined."),this.removeEmptyOrErrorTunnelFromMap(d,p);return}this.logService.trace("ForwardedPorts: (TunnelService) New tunnel established.");const _=this.makeTunnel(I);return(I.tunnelRemoteHost!==d||I.tunnelRemotePort!==p)&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Host or port mismatch."),g&&I.privacy!==g&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Privacy mismatch."),this._onTunnelOpened.fire(_),_}):(this.logService.trace("ForwardedPorts: (TunnelService) Tunnel was not created."),C)}makeTunnel(u){return{tunnelRemotePort:u.tunnelRemotePort,tunnelRemoteHost:u.tunnelRemoteHost,tunnelLocalPort:u.tunnelLocalPort,localAddress:u.localAddress,privacy:u.privacy,protocol:u.protocol,dispose:async()=>{this.logService.trace(`ForwardedPorts: (TunnelService) dispose request for ${u.tunnelRemoteHost}:${u.tunnelRemotePort} `);const d=this._tunnels.get(u.tunnelRemoteHost);if(d){const p=d.get(u.tunnelRemotePort);p&&(p.refcount--,await this.tryDisposeTunnel(u.tunnelRemoteHost,u.tunnelRemotePort,p))}}}}async tryDisposeTunnel(u,d,p){if(p.refcount<=0){this.logService.trace(`ForwardedPorts: (TunnelService) Tunnel is being disposed ${u}:${d}.`);const c=p.value.then(async l=>{l&&typeof l!="string"&&(await l.dispose(!0),this._onTunnelClosed.fire({host:l.tunnelRemoteHost,port:l.tunnelRemotePort}))});return this._tunnels.has(u)&&this._tunnels.get(u).delete(d),c}}async closeTunnel(u,d){this.logService.trace(`ForwardedPorts: (TunnelService) close request for ${u}:${d} `);const p=this._tunnels.get(u);if(p&&p.has(d)){const c=p.get(d);c.refcount=0,await this.tryDisposeTunnel(u,d,c)}}addTunnelToMap(u,d,p){this._tunnels.has(u)||this._tunnels.set(u,new Map),this._tunnels.get(u).set(d,{refcount:1,value:p})}async removeEmptyOrErrorTunnelFromMap(u,d){const p=this._tunnels.get(u);if(p){const c=p.get(d),l=c?await c.value:void 0;(!l||typeof l=="string")&&p.delete(d),p.size===0&&this._tunnels.delete(u)}}getTunnelFromMap(u,d){const p=[u];h(u)?(p.push(...e.LOCALHOST_ADDRESSES),p.push(...e.ALL_INTERFACES_ADDRESSES)):a(u)&&p.push(...e.ALL_INTERFACES_ADDRESSES);const c=p.map(l=>this._tunnels.get(l));for(const l of c){const n=l?.get(d);if(n)return n}}canTunnel(u){return!!S(u)}createWithProvider(u,d,p,c,l,n,g){this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel with provider ${d}:${p} on local port ${c}.`);const w=p;this._factoryInProgress.add(w);const E=c===void 0?p:c,C={elevationRequired:l?this.isPortPrivileged(E):!1},I={remoteAddress:{host:d,port:p},localAddressPort:c,privacy:n,public:n?n!==f.Private:void 0,protocol:g},_=u.forwardPort(I,C);return _?(this.addTunnelToMap(d,p,_),_.finally(()=>{this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created by provider."),this._factoryInProgress.delete(w)})):this._factoryInProgress.delete(w),_}};e.AbstractTunnelService=s,e.AbstractTunnelService=s=fe([O(0,D.ILogService),O(1,y.IConfigurationService)],s)}),define(Q[189],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoSource=e.UndoRedoGroup=e.ResourceEditStackSnapshot=e.UndoRedoElementType=e.IUndoRedoService=void 0,e.IUndoRedoService=(0,t.createDecorator)("undoRedoService");var y;(function(f){f[f.Resource=0]="Resource",f[f.Workspace=1]="Workspace"})(y||(e.UndoRedoElementType=y={}));class b{constructor(v,m){this.resource=v,this.elements=m}}e.ResourceEditStackSnapshot=b;class D{static{this._ID=0}constructor(){this.id=D._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}static{this.None=new D}}e.UndoRedoGroup=D;class T{static{this._ID=0}constructor(){this.id=T._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}static{this.None=new T}}e.UndoRedoSource=T}),define(Q[3391],Y([1,0,2218,6,4,271,205,777,586,130,2217,23,106,184,11,15,666,76,183,107,58,141,9,59,2213,189,42,143,55,50]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookModel=e.ErrorInfo=e.MessageLevel=void 0;var k;(function(x){x[x.Error=0]="Error",x[x.Warning=1]="Warning",x[x.Information=2]="Information"})(k||(e.MessageLevel=k={}));class L{constructor(F,V){this.message=F,this.severity=V}}e.ErrorInfo=L;const R={kernelspec:void 0,language_info:void 0,tags:void 0,connection_name:void 0,multi_connection_mode:void 0},M="notebook.saveConnectionName",N=(0,t.localize)(0,null);let P=class extends b.Disposable{constructor(F,V,W,z,B,K,H,U,G,$,ie){if(super(),this._notebookOptions=F,this.connectionProfile=V,this.logService=W,this.notificationService=z,this.adstelemetryService=B,this.connectionManagementService=K,this.configurationService=H,this.undoService=U,this._notebookService=G,this._capabilitiesService=$,this._languageService=ie,this._contextsChangedEmitter=new y.Emitter,this._contextsLoadingEmitter=new y.Emitter,this._contentChangedEmitter=new y.Emitter,this._kernelsAddedEmitter=new y.Emitter,this._kernelChangedEmitter=new y.Emitter,this._viewModeChangedEmitter=new y.Emitter,this._layoutChanged=new y.Emitter,this._inErrorState=!1,this._sessionLoadFinished=new d.Deferred,this._onClientSessionReady=new y.Emitter,this._onProviderIdChanged=new y.Emitter,this._onActiveCellChanged=new y.Emitter,this._onCellTypeChanged=new y.Emitter,this._onScrollEmitter=new y.Emitter,this._existingMetadata={},this._language="",this._viewMode=D.ViewMode.Notebook,this._onErrorEmitter=new y.Emitter,this._nbformat=f.nbversion.MAJOR_VERSION,this._nbformatMinor=f.nbversion.MINOR_VERSION,this._kernelDisplayNameToConnectionProviderIds=new Map,this._kernelDisplayNameToNotebookProviderIds=new Map,this._onValidConnectionSelected=new y.Emitter,this._connectionUrisToDispose=[],this._textCellsLoading=0,this._standardKernels=[],this._kernelAliases=[],this._multiConnectionMode=!1,this._isLoading=!1,!F||!F.notebookUri||!F.executeManagers)throw new Error("path or notebook service not defined");this._trustedMode=!1,this._providerId=F.providerId,this._onProviderIdChanged.fire(this._providerId),this._notebookOptions.layoutChanged&&this._notebookOptions.layoutChanged(()=>this._layoutChanged.fire()),this._defaultKernel=F.defaultKernel,this._register(this._notebookService.onNotebookKernelsAdded(async J=>this.handleNewKernelsAdded(J).catch(j=>(0,s.onUnexpectedError)(j))))}async handleNewKernelsAdded(F){let V,W=_.extname(this._notebookOptions.notebookUri.path);if(W)V=[W];else{let z=this._notebookOptions.getInputLanguageMode();if(z){let B=this._languageService.getExtensions(z);B?.length>0?V=B:this.logService.warn(`Could not retrieve file extensions for language mode '${z}' in notebook '${this._notebookOptions.notebookUri.toString()}'`)}else this.logService.warn(`Could not determine language mode for notebook '${this._notebookOptions.notebookUri.toString()}'`)}if(V?.some(z=>F[0]?.supportedFileExtensions?.includes(z))){this._standardKernels.push(...F),this.setDisplayNameMapsForKernels(F);let z=await this._notebookService.getOrCreateExecuteManager(F[0].notebookProvider,this.notebookUri);this._notebookOptions.executeManagers.push(z),this._kernelsAddedEmitter.fire(this._activeClientSession?.kernel)}}get serializationManagers(){let F=this._notebookOptions.serializationManagers.filter(V=>V.providerId!==m.DEFAULT_NOTEBOOK_PROVIDER);return F.length?F:this._notebookOptions.serializationManagers}get serializationManager(){let F=this.serializationManagers.find(V=>V.providerId===this._providerId);return F||(F=this.serializationManagers.find(V=>V.providerId===m.SQL_NOTEBOOK_PROVIDER)),F}get executeManagers(){let F=this._notebookOptions.executeManagers.filter(V=>V.providerId!==m.DEFAULT_NOTEBOOK_PROVIDER);return F.length?F:this._notebookOptions.executeManagers}get executeManager(){let F=this.executeManagers.find(V=>V.providerId===this._providerId);return F||(F=this.executeManagers.find(V=>V.providerId===m.SQL_NOTEBOOK_PROVIDER)),F}get notebookOptions(){return this._notebookOptions}get notebookUri(){return this._notebookOptions.notebookUri}set notebookUri(F){this._notebookOptions.notebookUri=F}get hasServerManager(){return!!this.executeManager?.serverManager}get contentChanged(){return this._contentChangedEmitter.event}get isSessionReady(){return!!this._activeClientSession}get clientSession(){return this._activeClientSession}get kernelChanged(){return this._kernelChangedEmitter.event}get kernelsAdded(){return this._kernelsAddedEmitter.event}get layoutChanged(){return this._layoutChanged.event}get defaultKernel(){return this._defaultKernel}get contextsChanged(){return this._contextsChangedEmitter.event}get onScroll(){return this._onScrollEmitter}get contextsLoading(){return this._contextsLoadingEmitter.event}get cells(){return this._cells}get context(){return this._activeConnection}get savedConnectionName(){return this._savedConnectionName}get multiConnectionMode(){return this._multiConnectionMode}set multiConnectionMode(F){this._multiConnectionMode=F}get specs(){let F={defaultKernel:"",kernels:[]};return this.executeManagers.forEach(V=>{V.sessionManager&&V.sessionManager.specs&&V.sessionManager.specs.kernels&&(V.sessionManager.specs.kernels.forEach(W=>{F.kernels.push(W)}),F.defaultKernel||(F.defaultKernel=V.sessionManager.specs.defaultKernel))}),F}standardKernelsDisplayName(){return Array.from(this._kernelDisplayNameToNotebookProviderIds.keys())}get inErrorState(){return this._inErrorState}get onError(){return this._onErrorEmitter.event}get trustedMode(){return this._trustedMode}get providerId(){return this._providerId}get kernelAliases(){return this._kernelAliases}get currentKernelAlias(){return this._currentKernelAlias}get selectedKernelDisplayName(){return this._selectedKernelDisplayName}set selectedKernelDisplayName(F){this._selectedKernelDisplayName=F}set trustedMode(F){this._trustedMode=F,this._cells&&this._cells.forEach(V=>{V.trustedMode=this._trustedMode}),this._contentChangedEmitter.fire({changeType:T.NotebookChangeType.TrustChanged})}get viewModeChanged(){return this._viewModeChangedEmitter.event}get viewMode(){return this._viewMode}setMetaValue(F,V){this._existingMetadata[F]=V;let W={changeType:T.NotebookChangeType.MetadataChanged,isDirty:!0,cells:[]};this._contentChangedEmitter.fire(W)}getMetaValue(F){return this._existingMetadata[F]}set viewMode(F){F!==this._viewMode&&(this._viewMode=F,this._viewModeChangedEmitter.fire(F))}get sessionLoadFinished(){return this._sessionLoadFinished}get onClientSessionReady(){return this._onClientSessionReady.event}get onProviderIdChange(){return this._onProviderIdChanged.event}get onValidConnectionSelected(){return this._onValidConnectionSelected.event}get onActiveCellChanged(){return this._onActiveCellChanged.event}get onCellTypeChanged(){return this._onCellTypeChanged.event}get standardKernels(){return this._standardKernels}set standardKernels(F){this._standardKernels=F,this.setDisplayNameMapsForKernels(F)}getApplicableConnectionProviderIds(F){let V;return F&&(V=this._kernelDisplayNameToConnectionProviderIds.get(F)),V||[]}async loadContents(F=!1,V=!1){try{this._isLoading=!0,this._trustedMode=F;let W;this._notebookOptions&&this._notebookOptions.contentLoader&&(W=await this._notebookOptions.contentLoader.loadContent());let z=this._notebookOptions.factory;if(this._cells=[],W){W.metadata&&this.loadContentMetadata(W.metadata);let B=this.notebookUri.query;B=B.replace(/&/g,` `).replace(/=/g," = ");let K=0,H=!1,U=!1;W.cells&&W.cells.length>0&&(this._cells=W.cells.map(G=>{let $=z.createCell(G,{notebook:this,isTrusted:F});return $.isParameter&&(K=W.cells.indexOf(G),H=!0),$.isInjectedParameter&&(U=!0,$.source=[N].concat($.source.slice(1))),this.trackMarkdownTelemetry(G,$),$})),B&&this.notebookUri?.scheme!=="git"&&this.addUriParameterCell(B,H,K,U)}(this._cells.length===0||this._cells.every(B=>B.cellType===T.CellTypes.Markdown))&&(this.trustedMode=!0),V&&this._layoutChanged.fire()}catch(W){throw this._inErrorState=!0,W}finally{this._isLoading=!1}}sendNotebookTelemetryActionEvent(F,V={},W){let z=(0,C.deepClone)(V);z.azdata_notebook_guid=this.getMetaValue("azdata_notebook_guid");let B=this.adstelemetryService.createActionEvent("Notebook",F).withAdditionalProperties(z);W&&B.withConnectionInfo(W),B.send()}loadContentMetadata(F){this._savedKernelInfo=F.kernelspec,this._defaultLanguageInfo=F.language_info,this._defaultLanguageInfo&&this.updateLanguageInfo(this._defaultLanguageInfo),this._savedConnectionName=F.connection_name,this._multiConnectionMode=!!F.multi_connection_mode,F.azdata_notebook_guid&&F.azdata_notebook_guid.length===36&&(0,g.isUUID)(F.azdata_notebook_guid)&&this.sendNotebookTelemetryActionEvent("Open"),Object.keys(F).forEach(V=>{Object.keys(R).includes(V)||(this._existingMetadata[V]=F[V])})}async requestModelLoad(){try{await this.setDefaultKernelAndProviderId(),this.trySetLanguageFromLangInfo()}catch(F){throw this._inErrorState=!0,F}}async requestConnection(){if(this.configurationService.getValue(M)&&this._savedConnectionName){let F=this.getConnectionProfileFromName(this._savedConnectionName);if(F)return await this.changeContext(this._savedConnectionName,F),!0}return this.requestConnectionHandler?this.requestConnectionHandler():(this.notificationService&&this.notificationService.notify({severity:h.Severity.Error,message:(0,t.localize)(1,null)}),!1)}findCellIndex(F){return this._cells.findIndex(V=>V.equals(F))}addCell(F,V,W){if(this.inErrorState)return;let z=this.createCell(F,W);return this.insertCell(z,V,!0)}splitCell(F,V,W,z,B=!0){if(this.inErrorState)return;let H=V.findNotebookEditor(this.notebookUri).cellEditors.find(U=>U.cellGuid()===this.cells[W].cellGuid);if(H){let U=H.getEditor();if(U){let G=U.getControl(),$=G.getModel(),ie=$.getFullModelRange(),J=G.getSelection(),j=this.cells[W].source,ee,X,te,Z=W,se=W,re=[],oe={},le=this.cells[W].showMarkdown,ne=this.cells[W].showPreview,ce=$.getValueInRange(J),ae=J.getStartPosition();if(ce.length===0&&ae.lineNumber===1&&ae.column===1)return;let ue=ie.setStartPosition(J.endLineNumber,J.endColumn),de=$.getValueInRange(ue),ge=ie.setEndPosition(J.startLineNumber,J.startColumn),he=$.getValueInRange(ge);if(he.length===0&&de.length===0)return;if(he.length){let Ie=j.slice(ie.startLineNumber-1,J.startLineNumber-1);J.startColumn>1&&(te=j.slice(J.startLineNumber-1,J.startLineNumber)[0].slice(0,J.startColumn-1),Ie=Ie.concat(te.toString())),oe=this.cells[W].attachments,this.cells[W].source=Ie,re.push({cell:this.cells[W],prefix:void 0})}if(ce.length){let Ie=j.slice(J.startLineNumber-1,J.endLineNumber);if(J.startColumn>1&&(te=j.slice(J.startLineNumber-1)[0].slice(J.startColumn-1),Ie.splice(0,1,te)),J.endColumn!==j[J.endLineNumber-1].length){let Se=0;J.startLineNumber===J.endLineNumber&&(Se=J.startColumn-1);let we=j.slice(J.endLineNumber-1,J.endLineNumber)[0].slice(Se,J.endColumn-1);Ie.splice(Ie.length-1,1,we)}he.length?(ee=this.createCell(F,z),ee.updateAttachmentsFromSource(Ie.join(),oe),ee.source=Ie,Z++,this.insertCell(ee,Z,!1),re.push({cell:this.cells[Z],prefix:void 0})):this.cells[W].source=Ie}if(de.length){X=this.createCell(this._cells[W].cellType,z);let Ie=j.slice(ue.startLineNumber-1);J.endColumn>1&&(te=j.slice(ue.startLineNumber-1,ue.startLineNumber)[0].slice(ue.startColumn-1),Ie.splice(0,1,te));let Se;(Ie[0]===`\r `||Ie[0]===` `)&&(Se=Ie.splice(0,1)[0]),X.updateAttachmentsFromSource(Ie.join(),oe),X.source=Ie,se=Z+1,this.insertCell(X,se,!1),re.push({cell:this.cells[se],prefix:Se})}let be=ee||(he.length?X:this.cells[W]),ve=ee?Z:he.length?se:W;return B&&this.undoService.pushElement(new w.SplitCellEdit(this,re)),this.updateActiveCell(be,!0),this._contentChangedEmitter.fire({changeType:T.NotebookChangeType.CellsModified,cells:[be],cellIndex:ve}),be.showMarkdown=le,be.showPreview=ne,be}}}mergeCells(F){let V=F[0].cell;for(let W=1;W<F.length;W++)V.attachments={...V.attachments,...F[W].cell.attachments},V.source=F[W].prefix?[...V.source,...F[W].prefix,...F[W].cell.source]:[...V.source,...F[W].cell.source];this.updateActiveCell(V,!0),this._contentChangedEmitter.fire({changeType:T.NotebookChangeType.CellsModified,cells:[V],cellIndex:0});for(let W=1;W<F.length;W++)this.deleteCell(F[W].cell,!1)}splitCells(F,V){F[0].cell.source=V,this.updateActiveCell(F[0].cell,!0),this._contentChangedEmitter.fire({changeType:T.NotebookChangeType.CellsModified,cells:[F[0].cell],cellIndex:0});for(let W=1;W<F.length;W++)this.insertCell(F[W].cell,void 0,!1)}insertCell(F,V,W=!0){if(!this.inErrorState)return V!=null&&V>=0&&V<this._cells.length?this._cells.splice(V,0,F):(this._cells.push(F),V=void 0),W&&(this.updateActiveCell(F,!0),this.undoService.pushElement(new w.AddCellEdit(this,F,V))),this._contentChangedEmitter.fire({changeType:T.NotebookChangeType.CellsModified,cells:[F],cellIndex:V}),F}addUriParameterCell(F,V,W,z){let B=W;V?(B=W+1,z&&(B=B+1),this.addCell("code",B),this.cells[B].isInjectedParameter=!0,this.cells[B].source=[N].concat(F)):(this.addCell("code",B),this.cells[B].isParameter=!0,this.cells[B].source=[F])}moveCell(F,V,W=!0){if(this.inErrorState)return;let z=this.findCellIndex(F);z===0&&V===D.MoveDirection.Up||z===this._cells.length-1&&V===D.MoveDirection.Down||(V===D.MoveDirection.Down?(this._cells.splice(z,1),z+1<this._cells.length?this._cells.splice(z+1,0,F):this._cells.push(F)):(this._cells.splice(z,1),this._cells.splice(z-1,0,F)),W&&(this.undoService.pushElement(new w.MoveCellEdit(this,F,V)),this.updateActiveCell(F)),z=this.findCellIndex(F),this._contentChangedEmitter.fire({changeType:T.NotebookChangeType.CellsModified,cells:[F],cellIndex:z}))}updateActiveCell(F,V=!1){this._activeCell!==F&&(this._activeCell&&(this._activeCell.active=!1,this._activeCell.isEditMode=!1),this._activeCell=F,this._activeCell&&(this._activeCell.active=!0,this._activeCell.isEditMode=V),this._onActiveCellChanged.fire(F))}convertCellType(F,V=!0){if(F){let W=this.findCellIndex(F);W>-1&&(V&&this.undoService.pushElement(new w.ConvertCellTypeEdit(this,F)),F.setOverrideLanguage(""),F.cellType=F.cellType===T.CellTypes.Markdown?T.CellTypes.Code:T.CellTypes.Markdown,this._onCellTypeChanged.fire(F),this._contentChangedEmitter.fire({changeType:T.NotebookChangeType.CellsModified,cells:[F],cellIndex:W}))}}createCell(F,V){let W={cell_type:F,source:"",metadata:{},execution_count:void 0};return V&&(W.metadata.language=V),this._notebookOptions.factory.createCell(W,{notebook:this,isTrusted:!0})}deleteCell(F,V=!0){if(this.inErrorState||!this._cells)return;let W=this._cells.findIndex(z=>z.equals(F));W>-1?(V&&this.undoService.pushElement(new w.DeleteCellEdit(this,F,W)),this._cells.splice(W,1),this._activeCell===F&&this.updateActiveCell(),this._contentChangedEmitter.fire({changeType:T.NotebookChangeType.CellsModified,cells:[F],cellIndex:W,isDirty:!0})):this.notifyError((0,t.localize)(2,null))}pushEditOperations(F){if(!(this.inErrorState||!this._cells))for(const V of F){const W=this.cells[V.range.start];switch(V.type){case 3:if(!W){this.logService.warn(`Did not receive a valid starting cell when processing edit type ${V.type}`);continue}W.processEdits([new w.CellOutputEdit(V.cell.outputs??[],!!V.append)]);break;case 4:if(!W){this.logService.warn(`Did not receive a valid starting cell when processing edit type ${V.type}`);continue}const z=[];V.cell.outputs?.forEach(K=>{const H=W.outputs.find(U=>K.id===U.id);if(!H){this.logService.warn(`Could not find target output with ID ${K.id} when updating cell output`);return}z.push(new w.CellOutputDataEdit(H.id,K.data,!!V.append))}),W.processEdits(z);break;case 0:case 2:case 1:let B=[];if(V.cell){let K=V.cell;B.push(this._notebookOptions.factory.createCell(K,{notebook:this,isTrusted:this._trustedMode})),this.undoService.pushElement(new w.AddCellEdit(this,B[0],V.range.start))}this._cells.splice(V.range.start,V.range.end-V.range.start,...B),B.length>0&&this.updateActiveCell(B[0]),this._contentChangedEmitter.fire({changeType:T.NotebookChangeType.CellsModified,isDirty:!0});break}}}get activeCell(){return this._activeCell}notifyError(F){this._onErrorEmitter.fire({message:F,severity:h.Severity.Error})}async startSession(F,V,W,z){if(V){let B=this._standardKernels.find(K=>K.displayName===V);B&&(this._defaultKernel={name:B.name,display_name:B.displayName})}if(this._defaultKernel){let B=this._notebookOptions.factory.createClientSession({notebookUri:this._notebookOptions.notebookUri,executeManager:F,notificationService:this._notebookOptions.notificationService,kernelSpec:this._defaultKernel});this._activeClientSession||this.updateActiveClientSession(B);let K=this._activeConnection?this._activeConnection:new a.ConnectionProfile(this._notebookOptions.capabilitiesService,this.connectionProfile);if(this.isValidConnection(K)&&(this._activeConnection=K,this._savedConnectionName=K.connectionName,z=this._currentKernelAlias),B.onKernelChanging(async H=>{await this.loadActiveContexts(H)}),await B.initialize().then(()=>{this._sessionLoadFinished.resolve()}),await B.ready,B.kernel&&(await B.kernel.ready,await this.updateKernelInfoOnKernelChange(B.kernel,z)),B.isInErrorState)if(W)this.setErrorState(B.errorMessage);else throw new Error(B.errorMessage);this._onClientSessionReady.fire(B)}}async restartSession(){this._activeClientSession&&(this._activeClientSession=void 0,await this.startSession(this.executeManager,this._selectedKernelDisplayName,!0))}updateActiveClientSession(F){this._activeClientSession=F}async setDefaultKernelAndProviderId(){if(!this._defaultKernel&&(await this.executeManager.sessionManager.ready,this.executeManager.sessionManager.specs)){let F=this.executeManager.sessionManager.specs.defaultKernel;this._defaultKernel=this.executeManager.sessionManager.specs.kernels.find(V=>V.name===F)}if(this._capabilitiesService?.providers&&this.executeManager.providerId===m.SQL_NOTEBOOK_PROVIDER){let F=this._capabilitiesService.providers;for(const V in F){let W=F[V].connection.notebookKernelAlias;W&&this._kernelAliases.indexOf(W)===-1&&(this._kernelAliases.push(F[V].connection.notebookKernelAlias),this._kernelDisplayNameToConnectionProviderIds.set(W,[F[V].connection.providerId]))}}if(this._savedKernelInfo){this.sanitizeSavedKernelInfo();let F=this._kernelDisplayNameToNotebookProviderIds.get(this._savedKernelInfo.display_name);F&&F!==this._providerId?this._providerId=F:F||(this._providerId=m.SQL_NOTEBOOK_PROVIDER,this._notebookOptions.notificationService.notify({severity:h.Severity.Info,message:(0,t.localize)(3,null,this._savedKernelInfo.display_name??this._savedKernelInfo.name)})),this._defaultKernel=this._savedKernelInfo}else if(this._defaultKernel){let F=this._kernelDisplayNameToNotebookProviderIds.get(this._defaultKernel.display_name);F?this._providerId!==F&&(this._providerId=F):(this._defaultKernel=o.notebookConstants.sqlKernelSpec,this._providerId=m.SQL_NOTEBOOK_PROVIDER)}else this._defaultKernel=o.notebookConstants.sqlKernelSpec,this._providerId=m.SQL_NOTEBOOK_PROVIDER;this._defaultLanguageInfo?.name||(this._defaultLanguageInfo={name:this._providerId===m.SQL_NOTEBOOK_PROVIDER?"sql":"python",version:""})}isValidConnection(F){let V=this._standardKernels.find(B=>this._defaultKernel&&B.displayName===this._defaultKernel.display_name),W=V?V.connectionProviderIds:void 0,z=this._capabilitiesService?.getCapabilities(F.providerName);return W?.length&&(this._currentKernelAlias=z?.connection.notebookKernelAlias,this._selectedKernelDisplayName!==this._currentKernelAlias&&this._selectedKernelDisplayName?this._currentKernelAlias=void 0:this._currentKernelAlias&&this._kernelDisplayNameToConnectionProviderIds.set(this._currentKernelAlias,[F.providerName])),this._currentKernelAlias||F&&W&&W.find(B=>B===F.providerName)!==void 0}getStandardKernelFromName(F){if(F)return this._standardKernels.find(W=>W.name.toLowerCase()===F.toLowerCase())}getStandardKernelFromDisplayName(F){if(F)return this._standardKernels.find(W=>W.displayName.toLowerCase()===F.toLowerCase())}get tags(){return this._tags}get languageInfo(){return this._defaultLanguageInfo}get language(){return this._language}updateLanguageInfo(F){F&&(this._defaultLanguageInfo=F,this.trySetLanguageFromLangInfo())}trySetLanguageFromLangInfo(){let F=this.languageInfo,V="";if(F){if(F.codemirror_mode){let z=F.codemirror_mode;z&&z.name&&(V=z.name)}!V&&F.name&&(V=F.name),!V&&F.mimetype&&(V=F.mimetype)}if(V){let z="x-";V.indexOf(z)>-1?V=V.replace(z,""):V.toLowerCase()==="ipython"?V=f.KernelsLanguage.Python:V.toLowerCase()==="c#"?V=f.KernelsLanguage.CSharp:V.toLowerCase()==="f#"&&(V=f.KernelsLanguage.FSharp)}else V=f.KernelsLanguage.Python;let W=this._language;this._language=V.toLowerCase(),this._cells?.forEach(z=>{(!z.language||z.language===W)&&z.setOverrideLanguage(this._language)})}changeKernel(F){this._selectedKernelDisplayName=F,this._currentKernelAlias=this.context?.serverCapabilities?.notebookKernelAlias,this._currentKernelAlias&&this.kernelAliases.includes(this._currentKernelAlias)&&F===this._currentKernelAlias?this.doChangeKernel(F,!0).catch(V=>this.logService.error(V)):(this._currentKernelAlias=void 0,this._contextsLoadingEmitter.fire(),this.doChangeKernel(F,!0).catch(V=>this.logService.error(V)))}async doChangeKernel(F,V=!0,W=!0){if(!F)return;let z=this._activeClientSession&&this._activeClientSession.kernel?this._activeClientSession.kernel.name:void 0,B;this.kernelAliases.includes(F)&&(this._currentKernelAlias=F,F="SQL",B=this._currentKernelAlias,this._kernelDisplayNameToConnectionProviderIds.set(this.currentKernelAlias,[this.currentKernelAlias.toUpperCase()]));try{let K=!0;if(V&&(K=!await this.tryStartSessionByChangingProviders(F,B)),K){let H=this.findSpec(F);if(this._activeClientSession&&this._activeClientSession.isReady){let U=await this._activeClientSession.changeKernel(H,this._oldKernel);try{await U?.ready,await this.updateKernelInfoOnKernelChange(U,B)}catch(G){this.logService.error(`doChangeKernel: ignoring error ${(0,s.getErrorMessage)(G)}`)}}}}catch(K){if(z&&W){this.notifyError((0,t.localize)(4,null,z,(0,s.getErrorMessage)(K)));let H=this.tryFindProviderForKernel(F,!0),U=this.tryFindProviderForKernel(z,!0);return H!==U&&(this._oldKernel=void 0),this.doChangeKernel(z,V,!1)}else this.notifyError((0,t.localize)(5,null,(0,s.getErrorMessage)(K))),this._kernelChangedEmitter.fire({newValue:void 0,oldValue:void 0})}}async updateKernelInfoOnKernelChange(F,V){if(await this.updateKernelInfo(F),V||(V=this.kernelAliases.find(W=>this._defaultLanguageInfo?.name===W.toLowerCase())),this._selectedKernelDisplayName!==V&&this._selectedKernelDisplayName&&(V=void 0),V){let W={name:V.toLowerCase(),version:""};this.updateLanguageInfo(W)}else F.info&&this.updateLanguageInfo(F.info.language_info);this.sendNotebookTelemetryActionEvent("KernelChanged",{name:F.name,alias:V||""}),this._kernelChangedEmitter.fire({newValue:F,oldValue:void 0,nbKernelAlias:V})}findSpec(F){let V=this.getKernelSpecFromDisplayName(F);if(V){let W=this.getKernelSpecs();W&&W.length>0&&W.findIndex(z=>z.display_name===V.display_name)<0&&(V=W.find(z=>z.name===this.executeManager?.sessionManager.specs.defaultKernel))}else V=o.notebookConstants.sqlKernelSpec,this.logService.info(`Could not find kernel spec from display name ${F}. Defaulting to SQL kernel.`);return V}async changeContext(F,V,W){try{if(!V&&this._activeConnection&&this._activeConnection.title===F&&(V=this._activeConnection),V){if(V.serverCapabilities?.notebookKernelAlias){this._currentKernelAlias=V.serverCapabilities.notebookKernelAlias;let z=this._kernelDisplayNameToConnectionProviderIds.get("SQL");if(z){let B=z.indexOf(V.serverCapabilities.notebookKernelAlias.toUpperCase());B>-1&&z.splice(B,1),this._kernelDisplayNameToConnectionProviderIds.set("SQL",z)}this._kernelDisplayNameToConnectionProviderIds.set(V.serverCapabilities.notebookKernelAlias,[V.providerName])}this._activeConnection=V,this._savedConnectionName=V.connectionName,this.setActiveConnectionIfDifferent(V),this._activeClientSession.updateConnection(V.toIConnectionProfile()).then(z=>{this._onValidConnectionSelected.fire(!0)},z=>{z&&(W||this.notifyError((0,s.getErrorMessage)(z)),this._onValidConnectionSelected.fire(!1))}),this.sendNotebookTelemetryActionEvent("ConnectionChanged",void 0,V.toIConnectionProfile())}else this._onValidConnectionSelected.fire(!1)}catch(z){let B=(0,s.getErrorMessage)(z);this.notifyError((0,t.localize)(6,null,B))}}setActiveConnectionIfDifferent(F){this.isValidConnection(F)&&this._activeConnection&&this._activeConnection.id!=="-1"&&this._activeConnection.id!==F.id&&(this._activeConnection=F,this._savedConnectionName=F.connectionName)}getConnectionProfileFromName(F){let V=this.connectionManagementService.getConnections();return(0,l.values)(V).find(W=>W.connectionName===F)}getKernelSpecFromDisplayName(F){let V=this.specs.kernels.find(W=>W.display_name.toLowerCase()===F.toLowerCase());if(V)V.name||(V.name=this.specs.defaultKernel);else return;return V}sanitizeSavedKernelInfo(){if(this._savedKernelInfo){let F=this._savedKernelInfo.display_name,V=this._standardKernels.find(W=>W.displayName===F||F.startsWith(W.displayName));V&&(this._savedKernelInfo.name&&this._savedKernelInfo.name!==V.name?(this._savedKernelInfo.name=V.name,this._savedKernelInfo.display_name=V.displayName):F===I.IPYKERNEL_DISPLAY_NAME&&this._savedKernelInfo.name===V.name&&(this._savedKernelInfo.display_name=V.displayName))}}getDisplayNameFromSpecName(F){let V=this.executeManager?.sessionManager.specs;if(!V||!V.kernels)return F.name;let W=this.executeManager.sessionManager.specs.kernels.find(B=>B.name===F.name),z;return W&&(z=W.display_name),z}addAttachToConnectionsToBeDisposed(F){this._connectionUrisToDispose.push(F)}setErrorState(F){this._inErrorState=!0;let V=(0,t.localize)(7,null,F);this.notifyError(V)}dispose(){super.dispose(),this.disconnectAttachToConnections().catch(F=>this.logService.error(F)),this.handleClosed().catch(F=>this.logService.error(F))}async handleClosed(){try{this.notebookOptions&&this.notebookOptions.connectionService&&this._activeConnection&&(await this.disconnectNotebookConnection(this._activeConnection),this._activeConnection=void 0),await this.shutdownActiveSession()}catch(F){this.logService.error("An error occurred when closing the notebook: ",(0,s.getErrorMessage)(F))}}async shutdownActiveSession(){if(this._activeClientSession){try{await this._activeClientSession.ready}catch(F){this.notifyError((0,t.localize)(8,null,(0,s.getErrorMessage)(F)))}await this._activeClientSession.shutdown(),this._activeClientSession=void 0}}async loadActiveContexts(F){if(F&&F.newValue&&F.newValue.name){let V=this.getDisplayNameFromSpecName(F.newValue);this.context?.serverCapabilities?.notebookKernelAlias&&this.selectedKernelDisplayName===this.context?.serverCapabilities?.notebookKernelAlias&&(V=this.context.serverCapabilities?.notebookKernelAlias);let W;this._activeConnection&&(W=S.NotebookContexts.getContextForKernel(this._activeConnection,this.getApplicableConnectionProviderIds(V))),W!==void 0&&W.serverName!==void 0&&W.title!==void 0&&await this.changeContext(W.title,W),this._contextsChangedEmitter.fire()}}async updateKernelInfo(F){if(F)try{let V=await F.getSpec();this._savedKernelInfo={name:F.name,display_name:V.display_name,language:V.language,supportedLanguages:V.supportedLanguages},this.clientSession?.configureKernel(this._savedKernelInfo)}catch{}}async tryStartSessionByChangingProviders(F,V){if(F){this._activeClientSession&&this._activeClientSession.isReady&&(this._oldKernel=this._activeClientSession.kernel);let W=this.tryFindProviderForKernel(F);if(W&&W!==this._providerId){this._providerId=W,this._onProviderIdChanged.fire(this._providerId),await this.shutdownActiveSession();let z=this.executeManager;if(z)await this.startSession(z,F,!1,V);else throw new Error((0,t.localize)(9,null,W));return!0}}return!1}tryFindProviderForKernel(F,V=!1){if(!F)return;let W=this.getStandardKernelFromDisplayName(F);if(W){let z=this._kernelDisplayNameToNotebookProviderIds.get(F);if(V||!this._oldKernel||this._oldKernel.name!==W.name)return z}else if(this.executeManagers?.length)return this.executeManagers.map(z=>z.providerId).find(z=>z!==m.DEFAULT_NOTEBOOK_PROVIDER&&z!==m.SQL_NOTEBOOK_PROVIDER)}getKernelSpecs(){return this.executeManager&&this.executeManager.sessionManager&&this.executeManager.sessionManager.specs&&this.executeManager.sessionManager.specs.kernels?this.executeManager.sessionManager.specs.kernels:[]}async disconnectNotebookConnection(F){if(this.notebookOptions.connectionService.getConnectionUri(F).indexOf(r.uriPrefixes.notebook)>-1){let V=this._notebookOptions.connectionService.getConnectionUri(F);await this.notebookOptions.connectionService.disconnect(V).catch(W=>this.logService.error(W))}}async disconnectAttachToConnections(){v.asyncForEach(this._connectionUrisToDispose,async F=>{await this.notebookOptions.connectionService.disconnect(F).catch(V=>this.logService.error(V))}),this._connectionUrisToDispose=[]}trackMarkdownTelemetry(F,V){F&&F.cell_type===T.CellTypes.Markdown&&this._textCellsLoading++,this._register(V.onLoaded(W=>{if(W===T.CellTypes.Markdown&&(this._textCellsLoading--,this._textCellsLoading<=0&&this._notebookOptions.editorLoadedTimestamp)){let z=Date.now()-this._notebookOptions.editorLoadedTimestamp;this.adstelemetryService.sendMetricsEvent({markdownRenderingElapsedMs:z},"Notebook")}}))}setDisplayNameMapsForKernels(F){F.forEach(V=>{let W=V.displayName;W||(W=V.name),this._kernelDisplayNameToConnectionProviderIds.set(W,V.connectionProviderIds),this._kernelDisplayNameToNotebookProviderIds.set(W,V.notebookProvider)})}toJSON(){let F=this.cells?.map(W=>W.toJSON()),V=Object.create(null);return V.kernelspec=this._savedKernelInfo,delete V.kernelspec?.supportedLanguages,V.language_info=this.languageInfo,V.tags=this._tags,V.multi_connection_mode=this._multiConnectionMode?this._multiConnectionMode:void 0,this.configurationService.getValue(M)&&(V.connection_name=this._savedConnectionName),Object.keys(this._existingMetadata).forEach(W=>{V[W]=this._existingMetadata[W]}),{metadata:V,nbformat_minor:this._nbformatMinor,nbformat:this._nbformat,cells:F}}onCellChange(F,V){let W={changeType:V,cells:[F]};switch(V){case T.NotebookChangeType.CellOutputUpdated:case T.NotebookChangeType.CellSourceUpdated:case T.NotebookChangeType.CellInputVisibilityChanged:case T.NotebookChangeType.CellMetadataUpdated:W.isDirty=!this._isLoading,W.modelContentChangedEvent=F.modelContentChangedEvent;break;default:}this._contentChangedEmitter.fire(W)}serializationStateChanged(F,V){let W={changeType:F,cells:V?[V]:[]};this._contentChangedEmitter.fire(W)}undo(){this.undoService.canUndo(this.notebookUri)&&this.undoService.undo(this.notebookUri)}redo(){this.undoService.canRedo(this.notebookUri)&&this.undoService.redo(this.notebookUri)}};e.NotebookModel=P,e.NotebookModel=P=fe([O(2,i.ILogService),O(3,h.INotificationService),O(4,u.IAdsTelemetryService),O(5,c.IConnectionManagementService),O(6,n.IConfigurationService),O(7,E.IUndoRedoService),O(8,m.INotebookService),O(9,p.ICapabilitiesService),O(10,A.ILanguageService)],P)}),define(Q[98],Y([1,0,20,80,15,6,4,300,33,10,392,794,238,51,27,96,660,50,125,137,2325,3382,578,1082,1881,800,840,841,440,2353,441,189]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L){"use strict";var R;Object.defineProperty(e,"__esModule",{value:!0}),e.AttachedViews=e.DidChangeDecorationsEmitter=e.ModelDecorationOptions=e.ModelDecorationInjectedTextOptions=e.ModelDecorationMinimapOptions=e.ModelDecorationGlyphMarginOptions=e.ModelDecorationOverviewRulerOptions=e.TextModel=e.createTextBuffer=e.createTextBufferFactoryFromSnapshot=e.createTextBufferFactoryFromStream=e.createTextBufferFactory=void 0;function M(ue){const de=new I.PieceTreeTextBufferBuilder;return de.acceptChunk(ue),de.finish()}e.createTextBufferFactory=M;function N(ue){return new Promise((de,ge)=>{const he=new I.PieceTreeTextBufferBuilder;let be=!1;(0,f.listenStream)(ue,{onData:ve=>{he.acceptChunk(typeof ve=="string"?ve:ve.toString())},onError:ve=>{be||(be=!0,ge(ve))},onEnd:()=>{be||(be=!0,de(he.finish()))}})})}e.createTextBufferFactoryFromStream=N;function P(ue){const de=new I.PieceTreeTextBufferBuilder;let ge;for(;typeof(ge=ue.read())=="string";)de.acceptChunk(ge);return de.finish()}e.createTextBufferFactoryFromSnapshot=P;function x(ue,de){let ge;return typeof ue=="string"?ge=M(ue):p.isITextSnapshot(ue)?ge=P(ue):ge=ue,ge.create(de)}e.createTextBuffer=x;let F=0;const V=999,W=1e4;class z{constructor(de){this._source=de,this._eos=!1}read(){if(this._eos)return null;const de=[];let ge=0,he=0;do{const be=this._source.read();if(be===null)return this._eos=!0,ge===0?null:de.join("");if(be.length>0&&(de[ge++]=be,he+=be.length),he>=64*1024)return de.join("")}while(!0)}}const B=()=>{throw new Error("Invalid change accessor")};var K;(function(ue){ue[ue.Relaxed=0]="Relaxed",ue[ue.SurrogatePairs=1]="SurrogatePairs"})(K||(K={}));let H=class extends T.Disposable{static{R=this}static{this._MODEL_SYNC_LIMIT=50*1024*1024}static{this.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024}static{this.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3}static{this.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:o.EDITOR_MODEL_DEFAULTS.tabSize,indentSize:o.EDITOR_MODEL_DEFAULTS.indentSize,insertSpaces:o.EDITOR_MODEL_DEFAULTS.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:o.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,largeFileOptimizations:o.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,bracketPairColorizationOptions:o.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions}}static resolveOptions(de,ge){if(ge.detectIndentation){const he=(0,w.guessIndentation)(de,ge.tabSize,ge.insertSpaces);return new p.TextModelResolvedOptions({tabSize:he.tabSize,indentSize:"tabSize",insertSpaces:he.insertSpaces,trimAutoWhitespace:ge.trimAutoWhitespace,defaultEOL:ge.defaultEOL,bracketPairColorizationOptions:ge.bracketPairColorizationOptions})}return new p.TextModelResolvedOptions(ge)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(de){return this._eventEmitter.slowEvent(ge=>de(ge.contentChangedEvent))}onDidChangeContentOrInjectedText(de){return(0,T.combinedDisposable)(this._eventEmitter.fastEvent(ge=>de(ge)),this._onDidChangeInjectedText.event(ge=>de(ge)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(de,ge,he,be=null,ve,Ie,Se){super(),this._undoRedoService=ve,this._languageService=Ie,this._languageConfigurationService=Se,this._onWillDispose=this._register(new D.Emitter),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new le(Ae=>this.handleBeforeFireDecorationsChangedEvent(Ae))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new D.Emitter),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new D.Emitter),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new D.Emitter),this._eventEmitter=this._register(new ne),this._languageSelectionListener=this._register(new T.MutableDisposable),this._deltaDecorationCallCnt=0,this._attachedViews=new ce,F++,this.id="$model"+F,this.isForSimpleWidget=he.isForSimpleWidget,typeof be>"u"||be===null?this._associatedResource=m.URI.parse("inmemory://model/"+F):this._associatedResource=be,this._attachedEditorCount=0;const{textBuffer:we,disposable:ye}=x(de,he.defaultEOL);this._buffer=we,this._bufferDisposable=ye,this._options=R.resolveOptions(this._buffer,he);const Re=typeof ge=="string"?ge:ge.languageId;typeof ge!="string"&&(this._languageSelectionListener.value=ge.onDidChange(()=>this._setLanguage(ge.languageId))),this._bracketPairs=this._register(new c.BracketPairsTextModelPart(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new g.GuidesTextModelPart(this,this._languageConfigurationService)),this._decorationProvider=this._register(new l.ColorizedBracketPairsDecorationProvider(this)),this._tokenizationTextModelPart=new A.TokenizationTextModelPart(this._languageService,this._languageConfigurationService,this,this._bracketPairs,Re,this._attachedViews);const Le=this._buffer.getLineCount(),Pe=this._buffer.getValueLengthInRange(new i.Range(1,1,Le,this._buffer.getLineLength(Le)+1),0);he.largeFileOptimizations?this._isTooLargeForTokenization=Pe>R.LARGE_FILE_SIZE_THRESHOLD||Le>R.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=Pe>R._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=v.singleLetterHash(F),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new ie,this._commandManager=new n.EditStack(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(Re)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const de=new C.PieceTreeTextBuffer([],"",` `,!1,!1,!0,!0);de.dispose(),this._buffer=de,this._bufferDisposable=T.Disposable.None}_hasListeners(){return this._onWillDispose.hasListeners()||this._onDidChangeDecorations.hasListeners()||this._tokenizationTextModelPart._hasListeners()||this._onDidChangeOptions.hasListeners()||this._onDidChangeAttached.hasListeners()||this._onDidChangeInjectedText.hasListeners()||this._eventEmitter.hasListeners()}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}equalsTextBuffer(de){return this._assertNotDisposed(),this._buffer.equals(de)}getTextBuffer(){return this._assertNotDisposed(),this._buffer}_emitContentChangedEvent(de,ge){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(ge),this._bracketPairs.handleDidChangeContent(ge),this._eventEmitter.fire(new k.InternalModelContentChangeEvent(de,ge)))}setValue(de){if(this._assertNotDisposed(),de==null)throw(0,b.illegalArgument)();const{textBuffer:ge,disposable:he}=x(de,this._options.defaultEOL);this._setValueFromTextBuffer(ge,he)}_createContentChanged2(de,ge,he,be,ve,Ie,Se,we){return{changes:[{range:de,rangeOffset:ge,rangeLength:he,text:be}],eol:this._buffer.getEOL(),isEolChange:we,versionId:this.getVersionId(),isUndoing:ve,isRedoing:Ie,isFlush:Se}}_setValueFromTextBuffer(de,ge){this._assertNotDisposed();const he=this.getFullModelRange(),be=this.getValueLengthInRange(he),ve=this.getLineCount(),Ie=this.getLineMaxColumn(ve);this._buffer=de,this._bufferDisposable.dispose(),this._bufferDisposable=ge,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new ie,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new k.ModelRawContentChangedEvent([new k.ModelRawFlush],this._versionId,!1,!1),this._createContentChanged2(new i.Range(1,1,ve,Ie),0,be,this.getValue(),!1,!1,!0,!1))}setEOL(de){this._assertNotDisposed();const ge=de===1?`\r `:` `;if(this._buffer.getEOL()===ge)return;const he=this.getFullModelRange(),be=this.getValueLengthInRange(he),ve=this.getLineCount(),Ie=this.getLineMaxColumn(ve);this._onBeforeEOLChange(),this._buffer.setEOL(ge),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new k.ModelRawContentChangedEvent([new k.ModelRawEOLChanged],this._versionId,!1,!1),this._createContentChanged2(new i.Range(1,1,ve,Ie),0,be,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const de=this.getVersionId(),ge=this._decorationsTree.collectNodesPostOrder();for(let he=0,be=ge.length;he<be;he++){const ve=ge[he],Ie=ve.range,Se=ve.cachedAbsoluteStart-ve.start,we=this._buffer.getOffsetAt(Ie.startLineNumber,Ie.startColumn),ye=this._buffer.getOffsetAt(Ie.endLineNumber,Ie.endColumn);ve.cachedAbsoluteStart=we,ve.cachedAbsoluteEnd=ye,ve.cachedVersionId=de,ve.start=we-Se,ve.end=ye-Se,(0,E.recomputeMaxEnd)(ve)}}onBeforeAttached(){return this._attachedEditorCount++,this._attachedEditorCount===1&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.attachView()}onBeforeDetached(de){this._attachedEditorCount--,this._attachedEditorCount===0&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.detachView(de)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let de=0,ge=0;const he=this._buffer.getLineCount();for(let be=1;be<=he;be++){const ve=this._buffer.getLineLength(be);ve>=W?ge+=ve:de+=ve}return ge>de}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(de){this._assertNotDisposed();const ge=typeof de.tabSize<"u"?de.tabSize:this._options.tabSize,he=typeof de.indentSize<"u"?de.indentSize:this._options.originalIndentSize,be=typeof de.insertSpaces<"u"?de.insertSpaces:this._options.insertSpaces,ve=typeof de.trimAutoWhitespace<"u"?de.trimAutoWhitespace:this._options.trimAutoWhitespace,Ie=typeof de.bracketColorizationOptions<"u"?de.bracketColorizationOptions:this._options.bracketPairColorizationOptions,Se=new p.TextModelResolvedOptions({tabSize:ge,indentSize:he,insertSpaces:be,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:ve,bracketPairColorizationOptions:Ie});if(this._options.equals(Se))return;const we=this._options.createChangeEvent(Se);this._options=Se,this._bracketPairs.handleDidChangeOptions(we),this._decorationProvider.handleDidChangeOptions(we),this._onDidChangeOptions.fire(we)}detectIndentation(de,ge){this._assertNotDisposed();const he=(0,w.guessIndentation)(this._buffer,ge,de);this.updateOptions({insertSpaces:he.insertSpaces,tabSize:he.tabSize,indentSize:he.tabSize})}normalizeIndentation(de){return this._assertNotDisposed(),(0,h.normalizeIndentation)(de,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(de=null){const ge=this.findMatches(v.UNUSUAL_LINE_TERMINATORS.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(de,ge.map(he=>({range:he.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(de){this._assertNotDisposed();const ge=this._validatePosition(de.lineNumber,de.column,0);return this._buffer.getOffsetAt(ge.lineNumber,ge.column)}getPositionAt(de){this._assertNotDisposed();const ge=Math.min(this._buffer.getLength(),Math.max(0,de));return this._buffer.getPositionAt(ge)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(de){this._versionId=de}_overwriteAlternativeVersionId(de){this._alternativeVersionId=de}_overwriteInitialUndoRedoSnapshot(de){this._initialUndoRedoSnapshot=de}getValue(de,ge=!1){this._assertNotDisposed();const he=this.getFullModelRange(),be=this.getValueInRange(he,de);return ge?this._buffer.getBOM()+be:be}createSnapshot(de=!1){return new z(this._buffer.createSnapshot(de))}getValueLength(de,ge=!1){this._assertNotDisposed();const he=this.getFullModelRange(),be=this.getValueLengthInRange(he,de);return ge?this._buffer.getBOM().length+be:be}getValueInRange(de,ge=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(de),ge)}getValueLengthInRange(de,ge=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(de),ge)}getCharacterCountInRange(de,ge=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(de),ge)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(de){if(this._assertNotDisposed(),de<1||de>this.getLineCount())throw new b.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineContent(de)}getLineLength(de){if(this._assertNotDisposed(),de<1||de>this.getLineCount())throw new b.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLength(de)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` `?0:1}getLineMinColumn(de){return this._assertNotDisposed(),1}getLineMaxColumn(de){if(this._assertNotDisposed(),de<1||de>this.getLineCount())throw new b.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLength(de)+1}getLineFirstNonWhitespaceColumn(de){if(this._assertNotDisposed(),de<1||de>this.getLineCount())throw new b.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(de)}getLineLastNonWhitespaceColumn(de){if(this._assertNotDisposed(),de<1||de>this.getLineCount())throw new b.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(de)}_validateRangeRelaxedNoAllocations(de){const ge=this._buffer.getLineCount(),he=de.startLineNumber,be=de.startColumn;let ve=Math.floor(typeof he=="number"&&!isNaN(he)?he:1),Ie=Math.floor(typeof be=="number"&&!isNaN(be)?be:1);if(ve<1)ve=1,Ie=1;else if(ve>ge)ve=ge,Ie=this.getLineMaxColumn(ve);else if(Ie<=1)Ie=1;else{const Le=this.getLineMaxColumn(ve);Ie>=Le&&(Ie=Le)}const Se=de.endLineNumber,we=de.endColumn;let ye=Math.floor(typeof Se=="number"&&!isNaN(Se)?Se:1),Re=Math.floor(typeof we=="number"&&!isNaN(we)?we:1);if(ye<1)ye=1,Re=1;else if(ye>ge)ye=ge,Re=this.getLineMaxColumn(ye);else if(Re<=1)Re=1;else{const Le=this.getLineMaxColumn(ye);Re>=Le&&(Re=Le)}return he===ve&&be===Ie&&Se===ye&&we===Re&&de instanceof i.Range&&!(de instanceof s.Selection)?de:new i.Range(ve,Ie,ye,Re)}_isValidPosition(de,ge,he){if(typeof de!="number"||typeof ge!="number"||isNaN(de)||isNaN(ge)||de<1||ge<1||(de|0)!==de||(ge|0)!==ge)return!1;const be=this._buffer.getLineCount();if(de>be)return!1;if(ge===1)return!0;const ve=this.getLineMaxColumn(de);if(ge>ve)return!1;if(he===1){const Ie=this._buffer.getLineCharCode(de,ge-2);if(v.isHighSurrogate(Ie))return!1}return!0}_validatePosition(de,ge,he){const be=Math.floor(typeof de=="number"&&!isNaN(de)?de:1),ve=Math.floor(typeof ge=="number"&&!isNaN(ge)?ge:1),Ie=this._buffer.getLineCount();if(be<1)return new r.Position(1,1);if(be>Ie)return new r.Position(Ie,this.getLineMaxColumn(Ie));if(ve<=1)return new r.Position(be,1);const Se=this.getLineMaxColumn(be);if(ve>=Se)return new r.Position(be,Se);if(he===1){const we=this._buffer.getLineCharCode(be,ve-2);if(v.isHighSurrogate(we))return new r.Position(be,ve-1)}return new r.Position(be,ve)}validatePosition(de){return this._assertNotDisposed(),de instanceof r.Position&&this._isValidPosition(de.lineNumber,de.column,1)?de:this._validatePosition(de.lineNumber,de.column,1)}_isValidRange(de,ge){const he=de.startLineNumber,be=de.startColumn,ve=de.endLineNumber,Ie=de.endColumn;if(!this._isValidPosition(he,be,0)||!this._isValidPosition(ve,Ie,0))return!1;if(ge===1){const Se=be>1?this._buffer.getLineCharCode(he,be-2):0,we=Ie>1&&Ie<=this._buffer.getLineLength(ve)?this._buffer.getLineCharCode(ve,Ie-2):0,ye=v.isHighSurrogate(Se),Re=v.isHighSurrogate(we);return!ye&&!Re}return!0}validateRange(de){if(this._assertNotDisposed(),de instanceof i.Range&&!(de instanceof s.Selection)&&this._isValidRange(de,1))return de;const he=this._validatePosition(de.startLineNumber,de.startColumn,0),be=this._validatePosition(de.endLineNumber,de.endColumn,0),ve=he.lineNumber,Ie=he.column,Se=be.lineNumber,we=be.column;{const ye=Ie>1?this._buffer.getLineCharCode(ve,Ie-2):0,Re=we>1&&we<=this._buffer.getLineLength(Se)?this._buffer.getLineCharCode(Se,we-2):0,Le=v.isHighSurrogate(ye),Pe=v.isHighSurrogate(Re);return!Le&&!Pe?new i.Range(ve,Ie,Se,we):ve===Se&&Ie===we?new i.Range(ve,Ie-1,Se,we-1):Le&&Pe?new i.Range(ve,Ie-1,Se,we+1):Le?new i.Range(ve,Ie-1,Se,we):new i.Range(ve,Ie,Se,we+1)}return new i.Range(ve,Ie,Se,we)}modifyPosition(de,ge){this._assertNotDisposed();const he=this.getOffsetAt(de)+ge;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,he)))}getFullModelRange(){this._assertNotDisposed();const de=this.getLineCount();return new i.Range(1,1,de,this.getLineMaxColumn(de))}findMatchesLineByLine(de,ge,he,be){return this._buffer.findMatchesLineByLine(de,ge,he,be)}findMatches(de,ge,he,be,ve,Ie,Se=V){this._assertNotDisposed();let we=null;ge!==null&&(Array.isArray(ge)||(ge=[ge]),ge.every(Le=>i.Range.isIRange(Le))&&(we=ge.map(Le=>this.validateRange(Le)))),we===null&&(we=[this.getFullModelRange()]),we=we.sort((Le,Pe)=>Le.startLineNumber-Pe.startLineNumber||Le.startColumn-Pe.startColumn);const ye=[];ye.push(we.reduce((Le,Pe)=>i.Range.areIntersecting(Le,Pe)?Le.plusRange(Pe):(ye.push(Le),Pe)));let Re;if(!he&&de.indexOf(` `)<0){const Pe=new _.SearchParams(de,he,be,ve).parseSearchRequest();if(!Pe)return[];Re=Ae=>this.findMatchesLineByLine(Ae,Pe,Ie,Se)}else Re=Le=>_.TextModelSearch.findMatches(this,new _.SearchParams(de,he,be,ve),Le,Ie,Se);return ye.map(Re).reduce((Le,Pe)=>Le.concat(Pe),[])}findNextMatch(de,ge,he,be,ve,Ie){this._assertNotDisposed();const Se=this.validatePosition(ge);if(!he&&de.indexOf(` `)<0){const ye=new _.SearchParams(de,he,be,ve).parseSearchRequest();if(!ye)return null;const Re=this.getLineCount();let Le=new i.Range(Se.lineNumber,Se.column,Re,this.getLineMaxColumn(Re)),Pe=this.findMatchesLineByLine(Le,ye,Ie,1);return _.TextModelSearch.findNextMatch(this,new _.SearchParams(de,he,be,ve),Se,Ie),Pe.length>0||(Le=new i.Range(1,1,Se.lineNumber,this.getLineMaxColumn(Se.lineNumber)),Pe=this.findMatchesLineByLine(Le,ye,Ie,1),Pe.length>0)?Pe[0]:null}return _.TextModelSearch.findNextMatch(this,new _.SearchParams(de,he,be,ve),Se,Ie)}findPreviousMatch(de,ge,he,be,ve,Ie){this._assertNotDisposed();const Se=this.validatePosition(ge);return _.TextModelSearch.findPreviousMatch(this,new _.SearchParams(de,he,be,ve),Se,Ie)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(de){if((this.getEOL()===` `?0:1)!==de)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(de)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(de){return de instanceof p.ValidAnnotatedEditOperation?de:new p.ValidAnnotatedEditOperation(de.identifier||null,this.validateRange(de.range),de.text,de.forceMoveMarkers||!1,de.isAutoWhitespaceEdit||!1,de._isTracked||!1)}_validateEditOperations(de){const ge=[];for(let he=0,be=de.length;he<be;he++)ge[he]=this._validateEditOperation(de[he]);return ge}pushEditOperations(de,ge,he,be){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(de,this._validateEditOperations(ge),he,be)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(de,ge,he,be){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const ve=ge.map(Se=>({range:this.validateRange(Se.range),text:Se.text}));let Ie=!0;if(de)for(let Se=0,we=de.length;Se<we;Se++){const ye=de[Se];let Re=!1;for(let Le=0,Pe=ve.length;Le<Pe;Le++){const Ae=ve[Le].range,Me=Ae.startLineNumber>ye.endLineNumber,Oe=ye.startLineNumber>Ae.endLineNumber;if(!Me&&!Oe){Re=!0;break}}if(!Re){Ie=!1;break}}if(Ie)for(let Se=0,we=this._trimAutoWhitespaceLines.length;Se<we;Se++){const ye=this._trimAutoWhitespaceLines[Se],Re=this.getLineMaxColumn(ye);let Le=!0;for(let Pe=0,Ae=ve.length;Pe<Ae;Pe++){const Me=ve[Pe].range,Oe=ve[Pe].text;if(!(ye<Me.startLineNumber||ye>Me.endLineNumber)&&!(ye===Me.startLineNumber&&Me.startColumn===Re&&Me.isEmpty()&&Oe&&Oe.length>0&&Oe.charAt(0)===` `)&&!(ye===Me.startLineNumber&&Me.startColumn===1&&Me.isEmpty()&&Oe&&Oe.length>0&&Oe.charAt(Oe.length-1)===` `)){Le=!1;break}}if(Le){const Pe=new i.Range(ye,1,ye,Re);ge.push(new p.ValidAnnotatedEditOperation(null,Pe,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(de,ge,he,be)}_applyUndo(de,ge,he,be){const ve=de.map(Ie=>{const Se=this.getPositionAt(Ie.newPosition),we=this.getPositionAt(Ie.newEnd);return{range:new i.Range(Se.lineNumber,Se.column,we.lineNumber,we.column),text:Ie.oldText}});this._applyUndoRedoEdits(ve,ge,!0,!1,he,be)}_applyRedo(de,ge,he,be){const ve=de.map(Ie=>{const Se=this.getPositionAt(Ie.oldPosition),we=this.getPositionAt(Ie.oldEnd);return{range:new i.Range(Se.lineNumber,Se.column,we.lineNumber,we.column),text:Ie.newText}});this._applyUndoRedoEdits(ve,ge,!1,!0,he,be)}_applyUndoRedoEdits(de,ge,he,be,ve,Ie){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=he,this._isRedoing=be,this.applyEdits(de,!1),this.setEOL(ge),this._overwriteAlternativeVersionId(ve)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(Ie),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(de,ge=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const he=this._validateEditOperations(de);return this._doApplyEdits(he,ge)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(de,ge){const he=this._buffer.getLineCount(),be=this._buffer.applyEdits(de,this._options.trimAutoWhitespace,ge),ve=this._buffer.getLineCount(),Ie=be.changes;if(this._trimAutoWhitespaceLines=be.trimAutoWhitespaceLineNumbers,Ie.length!==0){for(let ye=0,Re=Ie.length;ye<Re;ye++){const Le=Ie[ye];this._decorationsTree.acceptReplace(Le.rangeOffset,Le.rangeLength,Le.text.length,Le.forceMoveMarkers)}const Se=[];this._increaseVersionId();let we=he;for(let ye=0,Re=Ie.length;ye<Re;ye++){const Le=Ie[ye],[Pe]=(0,S.countEOL)(Le.text);this._onDidChangeDecorations.fire();const Ae=Le.range.startLineNumber,Me=Le.range.endLineNumber,Oe=Me-Ae,De=Pe,Ce=Math.min(Oe,De),_e=De-Oe,me=ve-we-_e+Ae,ke=me,Ee=me+De,pe=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new r.Position(ke,1)),this.getOffsetAt(new r.Position(Ee,this.getLineMaxColumn(Ee))),0),Te=k.LineInjectedText.fromDecorations(pe),Ne=new t.ArrayQueue(Te);for(let xe=Ce;xe>=0;xe--){const Ve=Ae+xe,Fe=me+xe;Ne.takeFromEndWhile(He=>He.lineNumber>Fe);const Be=Ne.takeFromEndWhile(He=>He.lineNumber===Fe);Se.push(new k.ModelRawLineChanged(Ve,this.getLineContent(Fe),Be))}if(Ce<Oe){const xe=Ae+Ce;Se.push(new k.ModelRawLinesDeleted(xe+1,Me))}if(Ce<De){const xe=new t.ArrayQueue(Te),Ve=Ae+Ce,Fe=De-Ce,Be=ve-we-Fe+Ve+1,He=[],et=[];for(let Je=0;Je<Fe;Je++){const st=Be+Je;et[Je]=this.getLineContent(st),xe.takeWhile(ze=>ze.lineNumber<st),He[Je]=xe.takeWhile(ze=>ze.lineNumber===st)}Se.push(new k.ModelRawLinesInserted(Ve+1,Ae+De,et,He))}we+=_e}this._emitContentChangedEvent(new k.ModelRawContentChangedEvent(Se,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:Ie,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return be.reverseEdits===null?void 0:be.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(de){if(de===null||de.size===0)return;const he=Array.from(de).map(be=>new k.ModelRawLineChanged(be,this.getLineContent(be),this._getInjectedTextInLine(be)));this._onDidChangeInjectedText.fire(new k.ModelInjectedTextChangedEvent(he))}changeDecorations(de,ge=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(ge,de)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(de,ge){const he={addDecoration:(ve,Ie)=>this._deltaDecorationsImpl(de,[],[{range:ve,options:Ie}])[0],changeDecoration:(ve,Ie)=>{this._changeDecorationImpl(ve,Ie)},changeDecorationOptions:(ve,Ie)=>{this._changeDecorationOptionsImpl(ve,oe(Ie))},removeDecoration:ve=>{this._deltaDecorationsImpl(de,[ve],[])},deltaDecorations:(ve,Ie)=>ve.length===0&&Ie.length===0?[]:this._deltaDecorationsImpl(de,ve,Ie)};let be=null;try{be=ge(he)}catch(ve){(0,b.onUnexpectedError)(ve)}return he.addDecoration=B,he.changeDecoration=B,he.changeDecorationOptions=B,he.removeDecoration=B,he.deltaDecorations=B,be}deltaDecorations(de,ge,he=0){if(this._assertNotDisposed(),de||(de=[]),de.length===0&&ge.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,b.onUnexpectedError)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(he,de,ge)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(de){return this.getDecorationRange(de)}_setTrackedRange(de,ge,he){const be=de?this._decorations[de]:null;if(!be)return ge?this._deltaDecorationsImpl(0,[],[{range:ge,options:re[he]}],!0)[0]:null;if(!ge)return this._decorationsTree.delete(be),delete this._decorations[be.id],null;const ve=this._validateRangeRelaxedNoAllocations(ge),Ie=this._buffer.getOffsetAt(ve.startLineNumber,ve.startColumn),Se=this._buffer.getOffsetAt(ve.endLineNumber,ve.endColumn);return this._decorationsTree.delete(be),be.reset(this.getVersionId(),Ie,Se,ve),be.setOptions(re[he]),this._decorationsTree.insert(be),be.id}removeAllDecorationsWithOwnerId(de){if(this._isDisposed)return;const ge=this._decorationsTree.collectNodesFromOwner(de);for(let he=0,be=ge.length;he<be;he++){const ve=ge[he];this._decorationsTree.delete(ve),delete this._decorations[ve.id]}}getDecorationOptions(de){const ge=this._decorations[de];return ge?ge.options:null}getDecorationRange(de){const ge=this._decorations[de];return ge?this._decorationsTree.getNodeRange(this,ge):null}getLineDecorations(de,ge=0,he=!1){return de<1||de>this.getLineCount()?[]:this.getLinesDecorations(de,de,ge,he)}getLinesDecorations(de,ge,he=0,be=!1,ve=!1){const Ie=this.getLineCount(),Se=Math.min(Ie,Math.max(1,de)),we=Math.min(Ie,Math.max(1,ge)),ye=this.getLineMaxColumn(we),Re=new i.Range(Se,1,we,ye),Le=this._getDecorationsInRange(Re,he,be,ve);return(0,t.pushMany)(Le,this._decorationProvider.getDecorationsInRange(Re,he,be)),Le}getDecorationsInRange(de,ge=0,he=!1,be=!1,ve=!1){const Ie=this.validateRange(de),Se=this._getDecorationsInRange(Ie,ge,he,ve);return(0,t.pushMany)(Se,this._decorationProvider.getDecorationsInRange(Ie,ge,he,be)),Se}getOverviewRulerDecorations(de=0,ge=!1){return this._decorationsTree.getAll(this,de,ge,!0,!1)}getInjectedTextDecorations(de=0){return this._decorationsTree.getAllInjectedText(this,de)}_getInjectedTextInLine(de){const ge=this._buffer.getOffsetAt(de,1),he=ge+this._buffer.getLineLength(de),be=this._decorationsTree.getInjectedTextInInterval(this,ge,he,0);return k.LineInjectedText.fromDecorations(be).filter(ve=>ve.lineNumber===de)}getAllDecorations(de=0,ge=!1){let he=this._decorationsTree.getAll(this,de,ge,!1,!1);return he=he.concat(this._decorationProvider.getAllDecorations(de,ge)),he}getAllMarginDecorations(de=0){return this._decorationsTree.getAll(this,de,!1,!1,!0)}_getDecorationsInRange(de,ge,he,be){const ve=this._buffer.getOffsetAt(de.startLineNumber,de.startColumn),Ie=this._buffer.getOffsetAt(de.endLineNumber,de.endColumn);return this._decorationsTree.getAllInInterval(this,ve,Ie,ge,he,be)}getRangeAt(de,ge){return this._buffer.getRangeAt(de,ge-de)}_changeDecorationImpl(de,ge){const he=this._decorations[de];if(!he)return;if(he.options.after){const Se=this.getDecorationRange(de);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Se.endLineNumber)}if(he.options.before){const Se=this.getDecorationRange(de);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Se.startLineNumber)}const be=this._validateRangeRelaxedNoAllocations(ge),ve=this._buffer.getOffsetAt(be.startLineNumber,be.startColumn),Ie=this._buffer.getOffsetAt(be.endLineNumber,be.endColumn);this._decorationsTree.delete(he),he.reset(this.getVersionId(),ve,Ie,be),this._decorationsTree.insert(he),this._onDidChangeDecorations.checkAffectedAndFire(he.options),he.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(be.endLineNumber),he.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(be.startLineNumber)}_changeDecorationOptionsImpl(de,ge){const he=this._decorations[de];if(!he)return;const be=!!(he.options.overviewRuler&&he.options.overviewRuler.color),ve=!!(ge.overviewRuler&&ge.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(he.options),this._onDidChangeDecorations.checkAffectedAndFire(ge),he.options.after||ge.after){const Ie=this._decorationsTree.getNodeRange(this,he);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ie.endLineNumber)}if(he.options.before||ge.before){const Ie=this._decorationsTree.getNodeRange(this,he);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ie.startLineNumber)}be!==ve?(this._decorationsTree.delete(he),he.setOptions(ge),this._decorationsTree.insert(he)):he.setOptions(ge)}_deltaDecorationsImpl(de,ge,he,be=!1){const ve=this.getVersionId(),Ie=ge.length;let Se=0;const we=he.length;let ye=0;this._onDidChangeDecorations.beginDeferredEmit();try{const Re=new Array(we);for(;Se<Ie||ye<we;){let Le=null;if(Se<Ie){do Le=this._decorations[ge[Se++]];while(!Le&&Se<Ie);if(Le){if(Le.options.after){const Pe=this._decorationsTree.getNodeRange(this,Le);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Pe.endLineNumber)}if(Le.options.before){const Pe=this._decorationsTree.getNodeRange(this,Le);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Pe.startLineNumber)}this._decorationsTree.delete(Le),be||this._onDidChangeDecorations.checkAffectedAndFire(Le.options)}}if(ye<we){if(!Le){const Ce=++this._lastDecorationId,_e=`${this._instanceId};${Ce}`;Le=new E.IntervalNode(_e,0,0),this._decorations[_e]=Le}const Pe=he[ye],Ae=this._validateRangeRelaxedNoAllocations(Pe.range),Me=oe(Pe.options),Oe=this._buffer.getOffsetAt(Ae.startLineNumber,Ae.startColumn),De=this._buffer.getOffsetAt(Ae.endLineNumber,Ae.endColumn);Le.ownerId=de,Le.reset(ve,Oe,De,Ae),Le.setOptions(Me),Le.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ae.endLineNumber),Le.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ae.startLineNumber),be||this._onDidChangeDecorations.checkAffectedAndFire(Me),this._decorationsTree.insert(Le),Re[ye]=Le.id,ye++}else Le&&delete this._decorations[Le.id]}return Re}finally{this._onDidChangeDecorations.endDeferredEmit()}}getLanguageId(){return this.tokenization.getLanguageId()}setLanguage(de,ge){typeof de=="string"?(this._languageSelectionListener.clear(),this._setLanguage(de,ge)):(this._languageSelectionListener.value=de.onDidChange(()=>this._setLanguage(de.languageId,ge)),this._setLanguage(de.languageId,ge))}_setLanguage(de,ge){this.tokenization.setLanguageId(de,ge),this._languageService.requestRichLanguageFeatures(de)}getLanguageIdAtPosition(de,ge){return this.tokenization.getLanguageIdAtPosition(de,ge)}getWordAtPosition(de){return this._tokenizationTextModelPart.getWordAtPosition(de)}getWordUntilPosition(de){return this._tokenizationTextModelPart.getWordUntilPosition(de)}normalizePosition(de,ge){return de}getLineIndentColumn(de){return U(this.getLineContent(de))+1}};e.TextModel=H,e.TextModel=H=R=fe([O(4,L.IUndoRedoService),O(5,u.ILanguageService),O(6,d.ILanguageConfigurationService)],H);function U(ue){let de=0;for(const ge of ue)if(ge===" "||ge===" ")de++;else break;return de}function G(ue){return!!(ue.options.overviewRuler&&ue.options.overviewRuler.color)}function $(ue){return!!ue.options.after||!!ue.options.before}class ie{constructor(){this._decorationsTree0=new E.IntervalTree,this._decorationsTree1=new E.IntervalTree,this._injectedTextDecorationsTree=new E.IntervalTree}ensureAllNodesHaveRanges(de){this.getAll(de,0,!1,!1,!1)}_ensureNodesHaveRanges(de,ge){for(const he of ge)he.range===null&&(he.range=de.getRangeAt(he.cachedAbsoluteStart,he.cachedAbsoluteEnd));return ge}getAllInInterval(de,ge,he,be,ve,Ie){const Se=de.getVersionId(),we=this._intervalSearch(ge,he,be,ve,Se,Ie);return this._ensureNodesHaveRanges(de,we)}_intervalSearch(de,ge,he,be,ve,Ie){const Se=this._decorationsTree0.intervalSearch(de,ge,he,be,ve,Ie),we=this._decorationsTree1.intervalSearch(de,ge,he,be,ve,Ie),ye=this._injectedTextDecorationsTree.intervalSearch(de,ge,he,be,ve,Ie);return Se.concat(we).concat(ye)}getInjectedTextInInterval(de,ge,he,be){const ve=de.getVersionId(),Ie=this._injectedTextDecorationsTree.intervalSearch(ge,he,be,!1,ve,!1);return this._ensureNodesHaveRanges(de,Ie).filter(Se=>Se.options.showIfCollapsed||!Se.range.isEmpty())}getAllInjectedText(de,ge){const he=de.getVersionId(),be=this._injectedTextDecorationsTree.search(ge,!1,he,!1);return this._ensureNodesHaveRanges(de,be).filter(ve=>ve.options.showIfCollapsed||!ve.range.isEmpty())}getAll(de,ge,he,be,ve){const Ie=de.getVersionId(),Se=this._search(ge,he,be,Ie,ve);return this._ensureNodesHaveRanges(de,Se)}_search(de,ge,he,be,ve){if(he)return this._decorationsTree1.search(de,ge,be,ve);{const Ie=this._decorationsTree0.search(de,ge,be,ve),Se=this._decorationsTree1.search(de,ge,be,ve),we=this._injectedTextDecorationsTree.search(de,ge,be,ve);return Ie.concat(Se).concat(we)}}collectNodesFromOwner(de){const ge=this._decorationsTree0.collectNodesFromOwner(de),he=this._decorationsTree1.collectNodesFromOwner(de),be=this._injectedTextDecorationsTree.collectNodesFromOwner(de);return ge.concat(he).concat(be)}collectNodesPostOrder(){const de=this._decorationsTree0.collectNodesPostOrder(),ge=this._decorationsTree1.collectNodesPostOrder(),he=this._injectedTextDecorationsTree.collectNodesPostOrder();return de.concat(ge).concat(he)}insert(de){$(de)?this._injectedTextDecorationsTree.insert(de):G(de)?this._decorationsTree1.insert(de):this._decorationsTree0.insert(de)}delete(de){$(de)?this._injectedTextDecorationsTree.delete(de):G(de)?this._decorationsTree1.delete(de):this._decorationsTree0.delete(de)}getNodeRange(de,ge){const he=de.getVersionId();return ge.cachedVersionId!==he&&this._resolveNode(ge,he),ge.range===null&&(ge.range=de.getRangeAt(ge.cachedAbsoluteStart,ge.cachedAbsoluteEnd)),ge.range}_resolveNode(de,ge){$(de)?this._injectedTextDecorationsTree.resolveNode(de,ge):G(de)?this._decorationsTree1.resolveNode(de,ge):this._decorationsTree0.resolveNode(de,ge)}acceptReplace(de,ge,he,be){this._decorationsTree0.acceptReplace(de,ge,he,be),this._decorationsTree1.acceptReplace(de,ge,he,be),this._injectedTextDecorationsTree.acceptReplace(de,ge,he,be)}}function J(ue){return ue.replace(/[^a-z0-9\-_]/gi," ")}class j{constructor(de){this.color=de.color||"",this.darkColor=de.darkColor||""}}class ee extends j{constructor(de){super(de),this._resolvedColor=null,this.position=typeof de.position=="number"?de.position:p.OverviewRulerLane.Center}getColor(de){return this._resolvedColor||(de.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,de):this._resolvedColor=this._resolveColor(this.color,de)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(de,ge){if(typeof de=="string")return de;const he=de?ge.getColor(de.id):null;return he?he.toString():""}}e.ModelDecorationOverviewRulerOptions=ee;class X{constructor(de){this.position=de?.position??p.GlyphMarginLane.Left}}e.ModelDecorationGlyphMarginOptions=X;class te extends j{constructor(de){super(de),this.position=de.position}getColor(de){return this._resolvedColor||(de.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,de):this._resolvedColor=this._resolveColor(this.color,de)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(de,ge){return typeof de=="string"?y.Color.fromHex(de):ge.getColor(de.id)}}e.ModelDecorationMinimapOptions=te;class Z{static from(de){return de instanceof Z?de:new Z(de)}constructor(de){this.content=de.content||"",this.inlineClassName=de.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=de.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=de.attachedData||null,this.cursorStops=de.cursorStops||null}}e.ModelDecorationInjectedTextOptions=Z;class se{static register(de){return new se(de)}static createDynamic(de){return new se(de)}constructor(de){this.description=de.description,this.blockClassName=de.blockClassName?J(de.blockClassName):null,this.blockDoesNotCollapse=de.blockDoesNotCollapse??null,this.blockIsAfterEnd=de.blockIsAfterEnd??null,this.blockPadding=de.blockPadding??null,this.stickiness=de.stickiness||0,this.zIndex=de.zIndex||0,this.className=de.className?J(de.className):null,this.shouldFillLineOnLineBreak=de.shouldFillLineOnLineBreak??null,this.hoverMessage=de.hoverMessage||null,this.glyphMarginHoverMessage=de.glyphMarginHoverMessage||null,this.isWholeLine=de.isWholeLine||!1,this.showIfCollapsed=de.showIfCollapsed||!1,this.collapseOnReplaceEdit=de.collapseOnReplaceEdit||!1,this.overviewRuler=de.overviewRuler?new ee(de.overviewRuler):null,this.minimap=de.minimap?new te(de.minimap):null,this.glyphMargin=de.glyphMarginClassName?new X(de.glyphMargin):null,this.glyphMarginClassName=de.glyphMarginClassName?J(de.glyphMarginClassName):null,this.linesDecorationsClassName=de.linesDecorationsClassName?J(de.linesDecorationsClassName):null,this.firstLineDecorationClassName=de.firstLineDecorationClassName?J(de.firstLineDecorationClassName):null,this.marginClassName=de.marginClassName?J(de.marginClassName):null,this.inlineClassName=de.inlineClassName?J(de.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=de.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=de.beforeContentClassName?J(de.beforeContentClassName):null,this.afterContentClassName=de.afterContentClassName?J(de.afterContentClassName):null,this.after=de.after?Z.from(de.after):null,this.before=de.before?Z.from(de.before):null,this.hideInCommentTokens=de.hideInCommentTokens??!1,this.hideInStringTokens=de.hideInStringTokens??!1}}e.ModelDecorationOptions=se,se.EMPTY=se.register({description:"empty"});const re=[se.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),se.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),se.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),se.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function oe(ue){return ue instanceof se?ue:se.createDynamic(ue)}class le extends T.Disposable{constructor(de){super(),this.handleBeforeFire=de,this._actual=this._register(new D.Emitter),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1}hasListeners(){return this._actual.hasListeners()}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(de){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(de)}checkAffectedAndFire(de){this._affectsMinimap||(this._affectsMinimap=!!(de.minimap&&de.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(de.overviewRuler&&de.overviewRuler.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!de.glyphMarginClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const de={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(de)}}e.DidChangeDecorationsEmitter=le;class ne extends T.Disposable{constructor(){super(),this._fastEmitter=this._register(new D.Emitter),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new D.Emitter),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}hasListeners(){return this._fastEmitter.hasListeners()||this._slowEmitter.hasListeners()}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(de=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=de;const ge=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(ge),this._slowEmitter.fire(ge)}}fire(de){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(de):this._deferredEvent=de;return}this._fastEmitter.fire(de),this._slowEmitter.fire(de)}}class ce{constructor(){this._onDidChangeVisibleRanges=new D.Emitter,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const de=new ae(ge=>{this._onDidChangeVisibleRanges.fire({view:de,state:ge})});return this._views.add(de),de}detachView(de){this._views.delete(de),this._onDidChangeVisibleRanges.fire({view:de,state:void 0})}}e.AttachedViews=ce;class ae{constructor(de){this.handleStateChange=de}setVisibleLines(de,ge){const he=de.map(be=>new a.LineRange(be.startLineNumber,be.endLineNumber+1));this.handleStateChange({visibleLineRanges:he,stabilized:ge})}}}),define(Q[3392],Y([1,0,137,98,36,19,27,130]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookFindMatch=e.NotebookFindDecorations=void 0;class v{constructor(h){this._editor=h,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._codeCellFindScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._codeCellDecorations=new Map,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._codeCellDecorations=new Map,this._codeCellFindScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._codeCellDecorations=new Map,this._codeCellFindScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._findScopeDecorationIds.length}getFindScope(){return this._currentMatch?this._currentMatch:null}getFindScopes(){if(this._findScopeDecorationIds.length){const h=this._findScopeDecorationIds.map(a=>this._editor.notebookFindModel.getDecorationRange(a)).filter(a=>!!a);if(h.length)return h}return null}getStartPosition(){return this._startPosition}setStartPosition(h){h&&(this._startPosition=h,this.setCurrentFindMatch(this._startPosition))}clearDecorations(){let h=this.getFindScopes();h&&this._editor.updateDecorations(void 0,h);for(let a of this._codeCellDecorations.keys())this._editor.getCellEditor(a).getControl().changeDecorations(r=>{this._codeCellDecorations.get(a).forEach(i=>r.removeDecoration(i)),r.deltaDecorations(this._codeCellFindScopeDecorationIds,[])});this.removeLastDecoration()}addDecorations(){let h=this.getFindScopes();h&&(this._editor.updateDecorations(h,void 0),this.setCodeCellDecorations(this._editor.notebookFindModel.findMatches,h))}setCurrentFindMatch(h){let a=null,r=0;if(h){for(let i=0,s=this._decorations.length;i<s;i++){let o=this._editor.notebookFindModel.getDecorationRange(this._decorations[i]);if(h.equalsRange(o)){a=this._decorations[i],r=i+1;break}}if(r===0)for(let i=0,s=this._findScopeDecorationIds.length;i<s;i++){let o=this._editor.notebookFindModel.getDecorationRange(this._findScopeDecorationIds[i]);if(h.equalsRange(o)){a=this._findScopeDecorationIds[i],r=i+1;break}}}return(this._highlightedDecorationId!==null||a!==null)&&(this.removeLastDecoration(),this.checkValidEditor(h)?this._editor.getCellEditor(h.cell.cellGuid).getControl().changeDecorations(i=>{if(this._highlightedDecorationId!==null&&(i.changeDecorationOptions(this._highlightedDecorationId,v._RANGE_HIGHLIGHT_DECORATION),this._highlightedDecorationId=null),a!==null&&(this._highlightedDecorationId=a,i.changeDecorationOptions(this._highlightedDecorationId,v._CURRENT_FIND_MATCH_DECORATION)),a!==null){let s=this._editor.notebookFindModel.getDecorationRange(a);if(s.startLineNumber!==s.endLineNumber&&s.endColumn===1){let o=s.endLineNumber-1,u=this._editor.notebookFindModel.getLineMaxColumn(o);s=new f.NotebookRange(s.cell,s.startLineNumber,s.startColumn,o,u)}this._rangeHighlightDecorationId=i.addDecoration(s,v._FIND_MATCH_DECORATION),this._revealRangeInCenterIfOutsideViewport(h),this._currentMatch=h}}):(this._editor.updateDecorations(h,void 0),this._currentMatch=h)),r}removeLastDecoration(){if(this._currentMatch&&this._currentMatch.cell){let h=this._currentMatch.cell.cellType==="markdown"&&!this._currentMatch.isMarkdownSourceCell||this._currentMatch.outputComponentIndex>=0?void 0:this._editor.getCellEditor(this._currentMatch.cell.cellGuid);h?h.getControl().changeDecorations(a=>{a.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null}):(this._currentMatch.cell.cellType==="markdown"||this._currentMatch.outputComponentIndex>=0)&&this._editor.updateDecorations(void 0,this._currentMatch)}}_revealRangeInCenterIfOutsideViewport(h){let a=this._editor.getCellEditor(h.cell.cellGuid);h.cell.isCollapsed=!1,a&&(a.getContainer().scrollIntoView({block:"nearest"}),a.getControl().revealRangeInCenterIfOutsideViewport(h,0))}checkValidEditor(h){return h&&h.cell&&h.outputComponentIndex===-1&&!!this._editor.getCellEditor(h.cell.cellGuid)&&(h.cell.cellType==="code"||h.isMarkdownSourceCell)}set(h,a){if(a){let r=a.filter((s,o,u)=>u.indexOf(u.find(d=>d.cell.cellGuid===s.cell.cellGuid&&(d.cell.cellType==="markdown"||d.outputComponentIndex>=0)))===o);this._editor.updateDecorations(r,void 0);let i=a.filter((s,o,u)=>u.indexOf(u.find(d=>d.cell.cellGuid===s.cell.cellGuid&&d.cell.cellType==="code"&&d.outputComponentIndex===-1))===o);i&&(this._editor.changeDecorations(s=>{let o=v._FIND_MATCH_NO_OVERVIEW_DECORATION;h=h.filter(d=>d.range.cell.cellType==="code"&&d.range.outputComponentIndex===-1);let u=new Array(h.length);for(let d=0,p=h.length;d<p;d++)u[d]={range:h[d].range,options:o};this._decorations=s.deltaDecorations(this._decorations,u),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(d=>s.removeDecoration(d)),this._findScopeDecorationIds=[]),a.length&&(this._findScopeDecorationIds=a.map(d=>s.addDecoration(d,v._FIND_SCOPE_DECORATION)))}),this.setCodeCellDecorations(h,i))}}setCodeCellDecorations(h,a){a.filter((i,s,o)=>o.indexOf(o.find(u=>u.cell.cellGuid===i.cell.cellGuid&&u.cell.cellType==="code"&&u.outputComponentIndex===-1))===s).forEach(i=>{this._editor.getCellEditor(i.cell.cellGuid)?.getControl().changeDecorations(s=>{let o=v._RANGE_HIGHLIGHT_DECORATION,u=[],d=a.filter(g=>g.cell.cellGuid===i.cell.cellGuid&&g.outputComponentIndex===-1),p=h?.filter(g=>g.range.cell.cellGuid===i.cell.cellGuid)||[],c=[];if(p.length>1e3){o=v._FIND_MATCH_NO_OVERVIEW_DECORATION;const g=this._editor.notebookFindModel.getLineCount(),E=this._editor.getConfiguration().layoutInfo.height/g,C=Math.max(2,Math.ceil(3/E));let I=p[0].range.startLineNumber,_=p[0].range.endLineNumber;for(let A=1,k=p.length;A<k;A++){const L=p[A].range;_+C>=L.startLineNumber?L.endLineNumber>_&&(_=L.endLineNumber):(u.push({range:new T.Range(I,1,_,1),options:v._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),I=L.startLineNumber,_=L.endLineNumber)}u.push({range:new T.Range(I,1,_,1),options:v._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let l=new Array(p.length);for(let g=0,w=p.length;g<w;g++)l[g]={range:p[g].range,options:o};let n=s.deltaDecorations(this._decorations,l);this._codeCellDecorations.set(i.cell.cellGuid,n),this._overviewRulerApproximateDecorations=s.deltaDecorations(this._overviewRulerApproximateDecorations,u),this._rangeHighlightDecorationId&&(s.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),c.length&&(c.forEach(g=>s.removeDecoration(g)),c=[]),d.length&&(c=d.map(g=>s.addDecoration(g,v._FIND_SCOPE_DECORATION)),this._codeCellFindScopeDecorationIds.push(...c))})})}_allDecorations(){let h=[];return h=h.concat(this._decorations),h=h.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&h.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&h.push(this._rangeHighlightDecorationId),h}static{this._CURRENT_FIND_MATCH_DECORATION=y.ModelDecorationOptions.register({description:"CURRENT_FIND_MATCH_DECORATION",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:(0,D.themeColorFromId)(b.overviewRulerFindMatchForeground),position:t.OverviewRulerLane.Center},minimap:{color:(0,D.themeColorFromId)(b.minimapFindMatch),position:t.MinimapPosition.Inline}})}static{this._FIND_MATCH_DECORATION=y.ModelDecorationOptions.register({description:"FIND_MATCH_DECORATION",stickiness:1,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:(0,D.themeColorFromId)(b.overviewRulerFindMatchForeground),position:t.OverviewRulerLane.Center},minimap:{color:(0,D.themeColorFromId)(b.minimapFindMatch),position:t.MinimapPosition.Inline}})}static{this._FIND_MATCH_NO_OVERVIEW_DECORATION=y.ModelDecorationOptions.register({description:"FIND_MATCH_NO_OVERVIEW_DECORATION",stickiness:1,className:"findMatch",showIfCollapsed:!0})}static{this._FIND_MATCH_ONLY_OVERVIEW_DECORATION=y.ModelDecorationOptions.register({description:"FIND_MATCH_ONLY_OVERVIEW_DECORATION",stickiness:1,overviewRuler:{color:(0,D.themeColorFromId)(b.overviewRulerFindMatchForeground),position:t.OverviewRulerLane.Center}})}static{this._RANGE_HIGHLIGHT_DECORATION=y.ModelDecorationOptions.register({description:"RANGE_HIGHLIGHT_DECORATION",stickiness:1,className:"rangeHighlight",isWholeLine:!1})}static{this._FIND_SCOPE_DECORATION=y.ModelDecorationOptions.register({description:"FIND_SCOPE_DECORATION",className:"findScope",isWholeLine:!0})}}e.NotebookFindDecorations=v;class m extends t.FindMatch{constructor(h,a){super(new T.Range(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn),a),this.range=h}}e.NotebookFindMatch=m}),define(Q[1218],Y([1,0,32,110,37,98,2336,77]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.arrowRevertChange=e.diffDeleteDecorationEmpty=e.diffWholeLineDeleteDecoration=e.diffDeleteDecoration=e.diffAddDecorationEmpty=e.diffWholeLineAddDecoration=e.diffAddDecoration=e.diffLineDeleteDecorationBackground=e.diffLineAddDecorationBackground=e.diffLineDeleteDecorationBackgroundWithIndicator=e.diffLineAddDecorationBackgroundWithIndicator=e.diffRemoveIcon=e.diffInsertIcon=void 0,e.diffInsertIcon=(0,f.registerIcon)("diff-insert",t.Codicon.add,(0,T.localize)(0,null)),e.diffRemoveIcon=(0,f.registerIcon)("diff-remove",t.Codicon.remove,(0,T.localize)(1,null)),e.diffLineAddDecorationBackgroundWithIndicator=D.ModelDecorationOptions.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+b.ThemeIcon.asClassName(e.diffInsertIcon),marginClassName:"gutter-insert"}),e.diffLineDeleteDecorationBackgroundWithIndicator=D.ModelDecorationOptions.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+b.ThemeIcon.asClassName(e.diffRemoveIcon),marginClassName:"gutter-delete"}),e.diffLineAddDecorationBackground=D.ModelDecorationOptions.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),e.diffLineDeleteDecorationBackground=D.ModelDecorationOptions.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),e.diffAddDecoration=D.ModelDecorationOptions.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),e.diffWholeLineAddDecoration=D.ModelDecorationOptions.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),e.diffAddDecorationEmpty=D.ModelDecorationOptions.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),e.diffDeleteDecoration=D.ModelDecorationOptions.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),e.diffWholeLineDeleteDecoration=D.ModelDecorationOptions.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),e.diffDeleteDecorationEmpty=D.ModelDecorationOptions.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"}),e.arrowRevertChange=D.ModelDecorationOptions.register({description:"diff-editor-arrow-revert-change",glyphMarginHoverMessage:new y.MarkdownString(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,T.localize)(2,null)),glyphMarginClassName:"arrow-revert-change "+b.ThemeIcon.asClassName(t.Codicon.arrowRight),zIndex:10001})}),define(Q[3393],Y([1,0,4,109,1218,1132,391,51,27]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorDecorations=void 0;class m extends t.Disposable{constructor(h,a,r){super(),this._editors=h,this._diffModel=a,this._options=r,this._decorations=(0,y.derived)(i=>{const s=this._diffModel.read(i)?.diff.read(i);if(!s)return null;const o=this._diffModel.read(i).movedTextToCompare.read(i),u=this._options.renderIndicators.read(i),d=this._options.showEmptyDecorations.read(i),p=[],c=[];if(!o)for(const n of s.mappings){if(n.lineRangeMapping.originalRange.isEmpty||p.push({range:n.lineRangeMapping.originalRange.toInclusiveRange(),options:u?b.diffLineDeleteDecorationBackgroundWithIndicator:b.diffLineDeleteDecorationBackground}),n.lineRangeMapping.modifiedRange.isEmpty||c.push({range:n.lineRangeMapping.modifiedRange.toInclusiveRange(),options:u?b.diffLineAddDecorationBackgroundWithIndicator:b.diffLineAddDecorationBackground}),n.lineRangeMapping.modifiedRange.isEmpty||n.lineRangeMapping.originalRange.isEmpty)n.lineRangeMapping.originalRange.isEmpty||p.push({range:n.lineRangeMapping.originalRange.toInclusiveRange(),options:b.diffWholeLineDeleteDecoration}),n.lineRangeMapping.modifiedRange.isEmpty||c.push({range:n.lineRangeMapping.modifiedRange.toInclusiveRange(),options:b.diffWholeLineAddDecoration});else for(const g of n.lineRangeMapping.innerChanges||[])n.lineRangeMapping.originalRange.contains(g.originalRange.startLineNumber)&&p.push({range:g.originalRange,options:g.originalRange.isEmpty()&&d?b.diffDeleteDecorationEmpty:b.diffDeleteDecoration}),n.lineRangeMapping.modifiedRange.contains(g.modifiedRange.startLineNumber)&&c.push({range:g.modifiedRange,options:g.modifiedRange.isEmpty()&&d?b.diffAddDecorationEmpty:b.diffAddDecoration});!n.lineRangeMapping.modifiedRange.isEmpty&&this._options.shouldRenderRevertArrows.read(i)&&!o&&c.push({range:v.Range.fromPositions(new f.Position(n.lineRangeMapping.modifiedRange.startLineNumber,1)),options:b.arrowRevertChange})}if(o)for(const n of o.changes){const g=n.originalRange.toInclusiveRange();g&&p.push({range:g,options:u?b.diffLineDeleteDecorationBackgroundWithIndicator:b.diffLineDeleteDecorationBackground});const w=n.modifiedRange.toInclusiveRange();w&&c.push({range:w,options:u?b.diffLineAddDecorationBackgroundWithIndicator:b.diffLineAddDecorationBackground});for(const E of n.innerChanges||[])p.push({range:E.originalRange,options:b.diffDeleteDecoration}),c.push({range:E.modifiedRange,options:b.diffAddDecoration})}const l=this._diffModel.read(i).activeMovedText.read(i);for(const n of s.movedTexts)p.push({range:n.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(n===l?" currentMove":""),blockPadding:[D.MovedBlocksLinesPart.movedCodeBlockPadding,0,D.MovedBlocksLinesPart.movedCodeBlockPadding,D.MovedBlocksLinesPart.movedCodeBlockPadding]}}),c.push({range:n.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(n===l?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:p,modifiedDecorations:c}}),this._register((0,T.applyObservableDecorations)(this._editors.original,this._decorations.map(i=>i?.originalDecorations||[]))),this._register((0,T.applyObservableDecorations)(this._editors.modified,this._decorations.map(i=>i?.modifiedDecorations||[])))}}e.DiffEditorDecorations=m}),define(Q[3394],Y([1,0,6,4,18,165,27,98,660,146,50,78,9,189,122,578,22,42,125]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.ModelService=void 0;function c(C){return C.toString()}function l(C){const I=new i.StringSHA1,_=C.createSnapshot();let A;for(;A=_.read();)I.update(A);return I.digest()}class n{constructor(I,_,A){this.model=I,this._modelEventListeners=new y.DisposableStore,this.model=I,this._modelEventListeners.add(I.onWillDispose(()=>_(I))),this._modelEventListeners.add(I.onDidChangeLanguage(k=>A(I,k)))}dispose(){this._modelEventListeners.dispose()}}const g=b.isLinux||b.isMacintosh?1:2;class w{constructor(I,_,A,k,L,R,M,N){this.uri=I,this.initialUndoRedoSnapshot=_,this.time=A,this.sharesUndoRedoStack=k,this.heapSize=L,this.sha1=R,this.versionId=M,this.alternativeVersionId=N}}let E=class extends y.Disposable{static{p=this}static{this.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024}constructor(I,_,A,k,L){super(),this._configurationService=I,this._resourcePropertiesService=_,this._undoRedoService=A,this._languageService=k,this._languageConfigurationService=L,this._onModelAdded=this._register(new t.Emitter),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new t.Emitter),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new t.Emitter),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(R=>this._updateModelOptions(R))),this._updateModelOptions(void 0)}static _readModelOptions(I,_){let A=v.EDITOR_MODEL_DEFAULTS.tabSize;if(I.editor&&typeof I.editor.tabSize<"u"){const V=parseInt(I.editor.tabSize,10);isNaN(V)||(A=V),A<1&&(A=1)}let k="tabSize";if(I.editor&&typeof I.editor.indentSize<"u"&&I.editor.indentSize!=="tabSize"){const V=parseInt(I.editor.indentSize,10);isNaN(V)||(k=Math.max(V,1))}let L=v.EDITOR_MODEL_DEFAULTS.insertSpaces;I.editor&&typeof I.editor.insertSpaces<"u"&&(L=I.editor.insertSpaces==="false"?!1:!!I.editor.insertSpaces);let R=g;const M=I.eol;M===`\r `?R=2:M===` `&&(R=1);let N=v.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;I.editor&&typeof I.editor.trimAutoWhitespace<"u"&&(N=I.editor.trimAutoWhitespace==="false"?!1:!!I.editor.trimAutoWhitespace);let P=v.EDITOR_MODEL_DEFAULTS.detectIndentation;I.editor&&typeof I.editor.detectIndentation<"u"&&(P=I.editor.detectIndentation==="false"?!1:!!I.editor.detectIndentation);let x=v.EDITOR_MODEL_DEFAULTS.largeFileOptimizations;I.editor&&typeof I.editor.largeFileOptimizations<"u"&&(x=I.editor.largeFileOptimizations==="false"?!1:!!I.editor.largeFileOptimizations);let F=v.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions;return I.editor?.bracketPairColorization&&typeof I.editor.bracketPairColorization=="object"&&(F={enabled:!!I.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!I.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:_,tabSize:A,indentSize:k,insertSpaces:L,detectIndentation:P,defaultEOL:R,trimAutoWhitespace:N,largeFileOptimizations:x,bracketPairColorizationOptions:F}}_getEOL(I,_){if(I)return this._resourcePropertiesService.getEOL(I,_);const A=this._configurationService.getValue("files.eol",{overrideIdentifier:_});return A&&typeof A=="string"&&A!=="auto"?A:b.OS===3||b.OS===2?` `:`\r `}_shouldRestoreUndoStack(){const I=this._configurationService.getValue("files.restoreUndoStack");return typeof I=="boolean"?I:!0}getCreationOptions(I,_,A){const k=typeof I=="string"?I:I.languageId;let L=this._modelCreationOptionsByLanguageAndResource[k+_];if(!L){const R=this._configurationService.getValue("editor",{overrideIdentifier:k,resource:_}),M=this._getEOL(_,k);L=p._readModelOptions({editor:R,eol:M},A),this._modelCreationOptionsByLanguageAndResource[k+_]=L}return L}_updateModelOptions(I){const _=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const A=Object.keys(this._models);for(let k=0,L=A.length;k<L;k++){const R=A[k],M=this._models[R],N=M.model.getLanguageId(),P=M.model.uri;if(I&&!I.affectsConfiguration("editor",{overrideIdentifier:N,resource:P})&&!I.affectsConfiguration("files.eol",{overrideIdentifier:N,resource:P}))continue;const x=_[N+P],F=this.getCreationOptions(N,P,M.model.isForSimpleWidget);p._setModelOptionsForModel(M.model,F,x)}}static _setModelOptionsForModel(I,_,A){A&&A.defaultEOL!==_.defaultEOL&&I.getLineCount()===1&&I.setEOL(_.defaultEOL===1?0:1),!(A&&A.detectIndentation===_.detectIndentation&&A.insertSpaces===_.insertSpaces&&A.tabSize===_.tabSize&&A.indentSize===_.indentSize&&A.trimAutoWhitespace===_.trimAutoWhitespace&&(0,u.equals)(A.bracketPairColorizationOptions,_.bracketPairColorizationOptions))&&(_.detectIndentation?(I.detectIndentation(_.insertSpaces,_.tabSize),I.updateOptions({trimAutoWhitespace:_.trimAutoWhitespace,bracketColorizationOptions:_.bracketPairColorizationOptions})):I.updateOptions({insertSpaces:_.insertSpaces,tabSize:_.tabSize,indentSize:_.indentSize,trimAutoWhitespace:_.trimAutoWhitespace,bracketColorizationOptions:_.bracketPairColorizationOptions}))}_insertDisposedModel(I){this._disposedModels.set(c(I.uri),I),this._disposedModelsHeapSize+=I.heapSize}_removeDisposedModel(I){const _=this._disposedModels.get(c(I));return _&&(this._disposedModelsHeapSize-=_.heapSize),this._disposedModels.delete(c(I)),_}_ensureDisposedModelsHeapSize(I){if(this._disposedModelsHeapSize>I){const _=[];for(this._disposedModels.forEach(A=>{A.sharesUndoRedoStack||_.push(A)}),_.sort((A,k)=>A.time-k.time);_.length>0&&this._disposedModelsHeapSize>I;){const A=_.shift();this._removeDisposedModel(A.uri),A.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(A.initialUndoRedoSnapshot)}}}_createModelData(I,_,A,k){const L=this.getCreationOptions(_,A,k),R=new f.TextModel(I,_,L,A,this._undoRedoService,this._languageService,this._languageConfigurationService);if(A&&this._disposedModels.has(c(A))){const P=this._removeDisposedModel(A),x=this._undoRedoService.getElements(A),F=l(R)===P.sha1;if(F||P.sharesUndoRedoStack){for(const V of x.past)(0,s.isEditStackElement)(V)&&V.matchesResource(A)&&V.setModel(R);for(const V of x.future)(0,s.isEditStackElement)(V)&&V.matchesResource(A)&&V.setModel(R);this._undoRedoService.setElementsValidFlag(A,!0,V=>(0,s.isEditStackElement)(V)&&V.matchesResource(A)),F&&(R._overwriteVersionId(P.versionId),R._overwriteAlternativeVersionId(P.alternativeVersionId),R._overwriteInitialUndoRedoSnapshot(P.initialUndoRedoSnapshot))}else P.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(P.initialUndoRedoSnapshot)}const M=c(R.uri);if(this._models[M])throw new Error("ModelService: Cannot add model because it already exists!");const N=new n(R,P=>this._onWillDispose(P),(P,x)=>this._onDidChangeLanguage(P,x));return this._models[M]=N,N}updateModel(I,_){const A=this.getCreationOptions(I.getLanguageId(),I.uri,I.isForSimpleWidget),{textBuffer:k,disposable:L}=(0,f.createTextBuffer)(_,A.defaultEOL);if(I.equalsTextBuffer(k)){L.dispose();return}I.pushStackElement(),I.pushEOL(k.getEOL()===`\r `?1:0),I.pushEditOperations([],p._computeEdits(I,k),()=>[]),I.pushStackElement(),L.dispose()}static _commonPrefix(I,_,A,k,L,R){const M=Math.min(_,L);let N=0;for(let P=0;P<M&&I.getLineContent(A+P)===k.getLineContent(R+P);P++)N++;return N}static _commonSuffix(I,_,A,k,L,R){const M=Math.min(_,L);let N=0;for(let P=0;P<M&&I.getLineContent(A+_-P)===k.getLineContent(R+L-P);P++)N++;return N}static _computeEdits(I,_){const A=I.getLineCount(),k=_.getLineCount(),L=this._commonPrefix(I,A,1,_,k,1);if(A===k&&L===A)return[];const R=this._commonSuffix(I,A-L,L,_,k-L,L);let M,N;return R>0?(M=new T.Range(L+1,1,A-R+1,1),N=new T.Range(L+1,1,k-R+1,1)):L>0?(M=new T.Range(L,I.getLineMaxColumn(L),A,I.getLineMaxColumn(A)),N=new T.Range(L,1+_.getLineLength(L),k,1+_.getLineLength(k))):(M=new T.Range(1,1,A,I.getLineMaxColumn(A)),N=new T.Range(1,1,k,1+_.getLineLength(k))),[D.EditOperation.replaceMove(M,_.getValueInRange(N,0))]}createModel(I,_,A,k=!1){let L;return _?L=this._createModelData(I,_,A,k):L=this._createModelData(I,m.PLAINTEXT_LANGUAGE_ID,A,k),this._onModelAdded.fire(L.model),L.model}destroyModel(I){const _=this._models[c(I)];_&&_.model.dispose()}getModels(){const I=[],_=Object.keys(this._models);for(let A=0,k=_.length;A<k;A++){const L=_[A];I.push(this._models[L].model)}return I}getModel(I){const _=c(I),A=this._models[_];return A?A.model:null}_schemaShouldMaintainUndoRedoElements(I){return I.scheme===o.Schemas.file||I.scheme===o.Schemas.vscodeRemote||I.scheme===o.Schemas.vscodeUserData||I.scheme===o.Schemas.vscodeNotebookCell||I.scheme==="fake-fs"}_onWillDispose(I){const _=c(I.uri),A=this._models[_],k=this._undoRedoService.getUriComparisonKey(I.uri)!==I.uri.toString();let L=!1,R=0;if(k||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(I.uri)){const N=this._undoRedoService.getElements(I.uri);if(N.past.length>0||N.future.length>0){for(const P of N.past)(0,s.isEditStackElement)(P)&&P.matchesResource(I.uri)&&(L=!0,R+=P.heapSize(I.uri),P.setModel(I.uri));for(const P of N.future)(0,s.isEditStackElement)(P)&&P.matchesResource(I.uri)&&(L=!0,R+=P.heapSize(I.uri),P.setModel(I.uri))}}const M=p.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(L)if(!k&&R>M){const N=A.model.getInitialUndoRedoSnapshot();N!==null&&this._undoRedoService.restoreSnapshot(N)}else this._ensureDisposedModelsHeapSize(M-R),this._undoRedoService.setElementsValidFlag(I.uri,!1,N=>(0,s.isEditStackElement)(N)&&N.matchesResource(I.uri)),this._insertDisposedModel(new w(I.uri,A.model.getInitialUndoRedoSnapshot(),Date.now(),k,R,l(I),I.getVersionId(),I.getAlternativeVersionId()));else if(!k){const N=A.model.getInitialUndoRedoSnapshot();N!==null&&this._undoRedoService.restoreSnapshot(N)}delete this._models[_],A.dispose(),delete this._modelCreationOptionsByLanguageAndResource[I.getLanguageId()+I.uri],this._onModelRemoved.fire(I)}_onDidChangeLanguage(I,_){const A=_.oldLanguage,k=I.getLanguageId(),L=this.getCreationOptions(A,I.uri,I.isForSimpleWidget),R=this.getCreationOptions(k,I.uri,I.isForSimpleWidget);p._setModelOptionsForModel(I,R,L),this._onModelModeChanged.fire({model:I,oldLanguageId:A})}};e.ModelService=E,e.ModelService=E=p=fe([O(0,a.IConfigurationService),O(1,h.ITextResourcePropertiesService),O(2,r.IUndoRedoService),O(3,S.ILanguageService),O(4,d.ILanguageConfigurationService)],E)}),define(Q[3395],Y([1,0,57,75,4,189,578]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelUndoRedoParticipant=void 0;let f=class extends b.Disposable{constructor(m,S,h){super(),this._modelService=m,this._textModelService=S,this._undoRedoService=h,this._register(this._modelService.onModelRemoved(a=>{const r=this._undoRedoService.getElements(a.uri);if(!(r.past.length===0&&r.future.length===0)){for(const i of r.past)i instanceof T.MultiModelEditStackElement&&i.setDelegate(this);for(const i of r.future)i instanceof T.MultiModelEditStackElement&&i.setDelegate(this)}}))}prepareUndoRedo(m){const S=m.getMissingModels();if(S.length===0)return b.Disposable.None;const h=S.map(async a=>{try{return await this._textModelService.createModelReference(a)}catch{return b.Disposable.None}});return Promise.all(h).then(a=>({dispose:()=>(0,b.dispose)(a)}))}};e.ModelUndoRedoParticipant=f,e.ModelUndoRedoParticipant=f=fe([O(0,t.IModelService),O(1,y.ITextModelService),O(2,D.IUndoRedoService)],f)}),define(Q[3396],Y([1,0,20,51,27,802,98,441,805,1903,490,303]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModelLinesFromModelAsIs=e.ViewModelLinesFromProjectedModel=void 0;class a{constructor(l,n,g,w,E,C,I,_,A,k){this._editorId=l,this.model=n,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=g,this._monospaceLineBreaksComputerFactory=w,this.fontInfo=E,this.tabSize=C,this.wrappingStrategy=I,this.wrappingColumn=_,this.wrappingIndent=A,this.wordBreak=k,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new o(this)}_constructLines(l,n){this.modelLineProjections=[],l&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const g=this.model.getLinesContent(),w=this.model.getInjectedTextDecorations(this._editorId),E=g.length,C=this.createLineBreaksComputer(),I=new t.ArrayQueue(f.LineInjectedText.fromDecorations(w));for(let P=0;P<E;P++){const x=I.takeWhile(F=>F.lineNumber===P+1);C.addRequest(g[P],x,n?n[P]:null)}const _=C.finalize(),A=[],k=this.hiddenAreasDecorationIds.map(P=>this.model.getDecorationRange(P)).sort(b.Range.compareRangesUsingStarts);let L=1,R=0,M=-1,N=M+1<k.length?R+1:E+2;for(let P=0;P<E;P++){const x=P+1;x===N&&(M++,L=k[M].startLineNumber,R=k[M].endLineNumber,N=M+1<k.length?R+1:E+2);const F=x>=L&&x<=R,V=(0,m.createModelLineProjection)(_[P],!F);A[P]=V.getViewLineCount(),this.modelLineProjections[P]=V}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new S.ConstantTimePrefixSumComputer(A)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(l=>this.model.getDecorationRange(l))}setHiddenAreas(l){const n=l.map(R=>this.model.validateRange(R)),g=r(n),w=this.hiddenAreasDecorationIds.map(R=>this.model.getDecorationRange(R)).sort(b.Range.compareRangesUsingStarts);if(g.length===w.length){let R=!1;for(let M=0;M<g.length;M++)if(!g[M].equalsRange(w[M])){R=!0;break}if(!R)return!1}const E=g.map(R=>({range:R,options:T.ModelDecorationOptions.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,E);const C=g;let I=1,_=0,A=-1,k=A+1<C.length?_+1:this.modelLineProjections.length+2,L=!1;for(let R=0;R<this.modelLineProjections.length;R++){const M=R+1;M===k&&(A++,I=C[A].startLineNumber,_=C[A].endLineNumber,k=A+1<C.length?_+1:this.modelLineProjections.length+2);let N=!1;if(M>=I&&M<=_?this.modelLineProjections[R].isVisible()&&(this.modelLineProjections[R]=this.modelLineProjections[R].setVisible(!1),N=!0):(L=!0,this.modelLineProjections[R].isVisible()||(this.modelLineProjections[R]=this.modelLineProjections[R].setVisible(!0),N=!0)),N){const P=this.modelLineProjections[R].getViewLineCount();this.projectedModelLineLineCounts.setValue(R,P)}}return L||this.setHiddenAreas([]),!0}modelPositionIsVisible(l,n){return l<1||l>this.modelLineProjections.length?!1:this.modelLineProjections[l-1].isVisible()}getModelLineViewLineCount(l){return l<1||l>this.modelLineProjections.length?1:this.modelLineProjections[l-1].getViewLineCount()}setTabSize(l){return this.tabSize===l?!1:(this.tabSize=l,this._constructLines(!1,null),!0)}setWrappingSettings(l,n,g,w,E){const C=this.fontInfo.equals(l),I=this.wrappingStrategy===n,_=this.wrappingColumn===g,A=this.wrappingIndent===w,k=this.wordBreak===E;if(C&&I&&_&&A&&k)return!1;const L=C&&I&&!_&&A&&k;this.fontInfo=l,this.wrappingStrategy=n,this.wrappingColumn=g,this.wrappingIndent=w,this.wordBreak=E;let R=null;if(L){R=[];for(let M=0,N=this.modelLineProjections.length;M<N;M++)R[M]=this.modelLineProjections[M].getProjectionData()}return this._constructLines(!1,R),!0}createLineBreaksComputer(){return(this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent,this.wordBreak)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(l,n,g){if(!l||l<=this._validModelVersionId)return null;const w=n===1?1:this.projectedModelLineLineCounts.getPrefixSum(n-1)+1,E=this.projectedModelLineLineCounts.getPrefixSum(g);return this.modelLineProjections.splice(n-1,g-n+1),this.projectedModelLineLineCounts.removeValues(n-1,g-n+1),new v.ViewLinesDeletedEvent(w,E)}onModelLinesInserted(l,n,g,w){if(!l||l<=this._validModelVersionId)return null;const E=n>2&&!this.modelLineProjections[n-2].isVisible(),C=n===1?1:this.projectedModelLineLineCounts.getPrefixSum(n-1)+1;let I=0;const _=[],A=[];for(let k=0,L=w.length;k<L;k++){const R=(0,m.createModelLineProjection)(w[k],!E);_.push(R);const M=R.getViewLineCount();I+=M,A[k]=M}return this.modelLineProjections=this.modelLineProjections.slice(0,n-1).concat(_).concat(this.modelLineProjections.slice(n-1)),this.projectedModelLineLineCounts.insertValues(n-1,A),new v.ViewLinesInsertedEvent(C,C+I-1)}onModelLineChanged(l,n,g){if(l!==null&&l<=this._validModelVersionId)return[!1,null,null,null];const w=n-1,E=this.modelLineProjections[w].getViewLineCount(),C=this.modelLineProjections[w].isVisible(),I=(0,m.createModelLineProjection)(g,C);this.modelLineProjections[w]=I;const _=this.modelLineProjections[w].getViewLineCount();let A=!1,k=0,L=-1,R=0,M=-1,N=0,P=-1;E>_?(k=this.projectedModelLineLineCounts.getPrefixSum(n-1)+1,L=k+_-1,N=L+1,P=N+(E-_)-1,A=!0):E<_?(k=this.projectedModelLineLineCounts.getPrefixSum(n-1)+1,L=k+E-1,R=L+1,M=R+(_-E)-1,A=!0):(k=this.projectedModelLineLineCounts.getPrefixSum(n-1)+1,L=k+_-1),this.projectedModelLineLineCounts.setValue(w,_);const x=k<=L?new v.ViewLinesChangedEvent(k,L-k+1):null,F=R<=M?new v.ViewLinesInsertedEvent(R,M):null,V=N<=P?new v.ViewLinesDeletedEvent(N,P):null;return[A,x,F,V]}acceptVersionId(l){this._validModelVersionId=l,this.modelLineProjections.length===1&&!this.modelLineProjections[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(l){if(l<1)return 1;const n=this.getViewLineCount();return l>n?n:l|0}getActiveIndentGuide(l,n,g){l=this._toValidViewLineNumber(l),n=this._toValidViewLineNumber(n),g=this._toValidViewLineNumber(g);const w=this.convertViewPositionToModelPosition(l,this.getViewLineMinColumn(l)),E=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),C=this.convertViewPositionToModelPosition(g,this.getViewLineMinColumn(g)),I=this.model.guides.getActiveIndentGuide(w.lineNumber,E.lineNumber,C.lineNumber),_=this.convertModelPositionToViewPosition(I.startLineNumber,1),A=this.convertModelPositionToViewPosition(I.endLineNumber,this.model.getLineMaxColumn(I.endLineNumber));return{startLineNumber:_.lineNumber,endLineNumber:A.lineNumber,indent:I.indent}}getViewLineInfo(l){l=this._toValidViewLineNumber(l);const n=this.projectedModelLineLineCounts.getIndexOf(l-1),g=n.index,w=n.remainder;return new i(g+1,w)}getMinColumnOfViewLine(l){return this.modelLineProjections[l.modelLineNumber-1].getViewLineMinColumn(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(l){return this.modelLineProjections[l.modelLineNumber-1].getViewLineMaxColumn(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(l){const n=this.modelLineProjections[l.modelLineNumber-1],g=n.getViewLineMinColumn(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx),w=n.getModelColumnOfViewPosition(l.modelLineWrappedLineIdx,g);return new y.Position(l.modelLineNumber,w)}getModelEndPositionOfViewLine(l){const n=this.modelLineProjections[l.modelLineNumber-1],g=n.getViewLineMaxColumn(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx),w=n.getModelColumnOfViewPosition(l.modelLineWrappedLineIdx,g);return new y.Position(l.modelLineNumber,w)}getViewLineInfosGroupedByModelRanges(l,n){const g=this.getViewLineInfo(l),w=this.getViewLineInfo(n),E=new Array;let C=this.getModelStartPositionOfViewLine(g),I=new Array;for(let _=g.modelLineNumber;_<=w.modelLineNumber;_++){const A=this.modelLineProjections[_-1];if(A.isVisible()){const k=_===g.modelLineNumber?g.modelLineWrappedLineIdx:0,L=_===w.modelLineNumber?w.modelLineWrappedLineIdx+1:A.getViewLineCount();for(let R=k;R<L;R++)I.push(new i(_,R))}if(!A.isVisible()&&C){const k=new y.Position(_-1,this.model.getLineMaxColumn(_-1)+1),L=b.Range.fromPositions(C,k);E.push(new s(L,I)),I=[],C=null}else A.isVisible()&&!C&&(C=new y.Position(_,1))}if(C){const _=b.Range.fromPositions(C,this.getModelEndPositionOfViewLine(w));E.push(new s(_,I))}return E}getViewLinesBracketGuides(l,n,g,w){const E=g?this.convertViewPositionToModelPosition(g.lineNumber,g.column):null,C=[];for(const I of this.getViewLineInfosGroupedByModelRanges(l,n)){const _=I.modelRange.startLineNumber,A=this.model.guides.getLinesBracketGuides(_,I.modelRange.endLineNumber,E,w);for(const k of I.viewLines){const R=A[k.modelLineNumber-_].map(M=>{if(M.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[k.modelLineNumber-1].getViewPositionOfModelPosition(0,M.forWrappedLinesAfterColumn).lineNumber>=k.modelLineWrappedLineIdx||M.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[k.modelLineNumber-1].getViewPositionOfModelPosition(0,M.forWrappedLinesBeforeOrAtColumn).lineNumber<k.modelLineWrappedLineIdx)return;if(!M.horizontalLine)return M;let N=-1;if(M.column!==-1){const F=this.modelLineProjections[k.modelLineNumber-1].getViewPositionOfModelPosition(0,M.column);if(F.lineNumber===k.modelLineWrappedLineIdx)N=F.column;else if(F.lineNumber<k.modelLineWrappedLineIdx)N=this.getMinColumnOfViewLine(k);else if(F.lineNumber>k.modelLineWrappedLineIdx)return}const P=this.convertModelPositionToViewPosition(k.modelLineNumber,M.horizontalLine.endColumn),x=this.modelLineProjections[k.modelLineNumber-1].getViewPositionOfModelPosition(0,M.horizontalLine.endColumn);return x.lineNumber===k.modelLineWrappedLineIdx?new D.IndentGuide(M.visibleColumn,N,M.className,new D.IndentGuideHorizontalLine(M.horizontalLine.top,P.column),-1,-1):x.lineNumber<k.modelLineWrappedLineIdx||M.visibleColumn!==-1?void 0:new D.IndentGuide(M.visibleColumn,N,M.className,new D.IndentGuideHorizontalLine(M.horizontalLine.top,this.getMaxColumnOfViewLine(k)),-1,-1)});C.push(R.filter(M=>!!M))}}return C}getViewLinesIndentGuides(l,n){l=this._toValidViewLineNumber(l),n=this._toValidViewLineNumber(n);const g=this.convertViewPositionToModelPosition(l,this.getViewLineMinColumn(l)),w=this.convertViewPositionToModelPosition(n,this.getViewLineMaxColumn(n));let E=[];const C=[],I=[],_=g.lineNumber-1,A=w.lineNumber-1;let k=null;for(let N=_;N<=A;N++){const P=this.modelLineProjections[N];if(P.isVisible()){const x=P.getViewLineNumberOfModelPosition(0,N===_?g.column:1),F=P.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(N+1)),V=F-x+1;let W=0;V>1&&P.getViewLineMinColumn(this.model,N+1,F)===1&&(W=x===0?1:2),C.push(V),I.push(W),k===null&&(k=new y.Position(N+1,0))}else k!==null&&(E=E.concat(this.model.guides.getLinesIndentGuides(k.lineNumber,N)),k=null)}k!==null&&(E=E.concat(this.model.guides.getLinesIndentGuides(k.lineNumber,w.lineNumber)),k=null);const L=n-l+1,R=new Array(L);let M=0;for(let N=0,P=E.length;N<P;N++){let x=E[N];const F=Math.min(L-M,C[N]),V=I[N];let W;V===2?W=0:V===1?W=1:W=F;for(let z=0;z<F;z++)z===W&&(x=0),R[M++]=x}return R}getViewLineContent(l){const n=this.getViewLineInfo(l);return this.modelLineProjections[n.modelLineNumber-1].getViewLineContent(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLineLength(l){const n=this.getViewLineInfo(l);return this.modelLineProjections[n.modelLineNumber-1].getViewLineLength(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLineMinColumn(l){const n=this.getViewLineInfo(l);return this.modelLineProjections[n.modelLineNumber-1].getViewLineMinColumn(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLineMaxColumn(l){const n=this.getViewLineInfo(l);return this.modelLineProjections[n.modelLineNumber-1].getViewLineMaxColumn(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLineData(l){const n=this.getViewLineInfo(l);return this.modelLineProjections[n.modelLineNumber-1].getViewLineData(this.model,n.modelLineNumber,n.modelLineWrappedLineIdx)}getViewLinesData(l,n,g){l=this._toValidViewLineNumber(l),n=this._toValidViewLineNumber(n);const w=this.projectedModelLineLineCounts.getIndexOf(l-1);let E=l;const C=w.index,I=w.remainder,_=[];for(let A=C,k=this.model.getLineCount();A<k;A++){const L=this.modelLineProjections[A];if(!L.isVisible())continue;const R=A===C?I:0;let M=L.getViewLineCount()-R,N=!1;if(E+M>n&&(N=!0,M=n-E+1),L.getViewLinesData(this.model,A+1,R,M,E-l,g,_),E+=M,N)break}return _}validateViewPosition(l,n,g){l=this._toValidViewLineNumber(l);const w=this.projectedModelLineLineCounts.getIndexOf(l-1),E=w.index,C=w.remainder,I=this.modelLineProjections[E],_=I.getViewLineMinColumn(this.model,E+1,C),A=I.getViewLineMaxColumn(this.model,E+1,C);n<_&&(n=_),n>A&&(n=A);const k=I.getModelColumnOfViewPosition(C,n);return this.model.validatePosition(new y.Position(E+1,k)).equals(g)?new y.Position(l,n):this.convertModelPositionToViewPosition(g.lineNumber,g.column)}validateViewRange(l,n){const g=this.validateViewPosition(l.startLineNumber,l.startColumn,n.getStartPosition()),w=this.validateViewPosition(l.endLineNumber,l.endColumn,n.getEndPosition());return new b.Range(g.lineNumber,g.column,w.lineNumber,w.column)}convertViewPositionToModelPosition(l,n){const g=this.getViewLineInfo(l),w=this.modelLineProjections[g.modelLineNumber-1].getModelColumnOfViewPosition(g.modelLineWrappedLineIdx,n);return this.model.validatePosition(new y.Position(g.modelLineNumber,w))}convertViewRangeToModelRange(l){const n=this.convertViewPositionToModelPosition(l.startLineNumber,l.startColumn),g=this.convertViewPositionToModelPosition(l.endLineNumber,l.endColumn);return new b.Range(n.lineNumber,n.column,g.lineNumber,g.column)}convertModelPositionToViewPosition(l,n,g=2,w=!1,E=!1){const C=this.model.validatePosition(new y.Position(l,n)),I=C.lineNumber,_=C.column;let A=I-1,k=!1;if(E)for(;A<this.modelLineProjections.length&&!this.modelLineProjections[A].isVisible();)A++,k=!0;else for(;A>0&&!this.modelLineProjections[A].isVisible();)A--,k=!0;if(A===0&&!this.modelLineProjections[A].isVisible())return new y.Position(w?0:1,1);const L=1+this.projectedModelLineLineCounts.getPrefixSum(A);let R;return k?E?R=this.modelLineProjections[A].getViewPositionOfModelPosition(L,1,g):R=this.modelLineProjections[A].getViewPositionOfModelPosition(L,this.model.getLineMaxColumn(A+1),g):R=this.modelLineProjections[I-1].getViewPositionOfModelPosition(L,_,g),R}convertModelRangeToViewRange(l,n=0){if(l.isEmpty()){const g=this.convertModelPositionToViewPosition(l.startLineNumber,l.startColumn,n);return b.Range.fromPositions(g)}else{const g=this.convertModelPositionToViewPosition(l.startLineNumber,l.startColumn,1),w=this.convertModelPositionToViewPosition(l.endLineNumber,l.endColumn,0);return new b.Range(g.lineNumber,g.column,w.lineNumber,w.column)}}getViewLineNumberOfModelPosition(l,n){let g=l-1;if(this.modelLineProjections[g].isVisible()){const E=1+this.projectedModelLineLineCounts.getPrefixSum(g);return this.modelLineProjections[g].getViewLineNumberOfModelPosition(E,n)}for(;g>0&&!this.modelLineProjections[g].isVisible();)g--;if(g===0&&!this.modelLineProjections[g].isVisible())return 1;const w=1+this.projectedModelLineLineCounts.getPrefixSum(g);return this.modelLineProjections[g].getViewLineNumberOfModelPosition(w,this.model.getLineMaxColumn(g+1))}getDecorationsInRange(l,n,g,w,E){const C=this.convertViewPositionToModelPosition(l.startLineNumber,l.startColumn),I=this.convertViewPositionToModelPosition(l.endLineNumber,l.endColumn);if(I.lineNumber-C.lineNumber<=l.endLineNumber-l.startLineNumber)return this.model.getDecorationsInRange(new b.Range(C.lineNumber,1,I.lineNumber,I.column),n,g,w,E);let _=[];const A=C.lineNumber-1,k=I.lineNumber-1;let L=null;for(let P=A;P<=k;P++)if(this.modelLineProjections[P].isVisible())L===null&&(L=new y.Position(P+1,P===A?C.column:1));else if(L!==null){const F=this.model.getLineMaxColumn(P);_=_.concat(this.model.getDecorationsInRange(new b.Range(L.lineNumber,L.column,P,F),n,g,w)),L=null}L!==null&&(_=_.concat(this.model.getDecorationsInRange(new b.Range(L.lineNumber,L.column,I.lineNumber,I.column),n,g,w)),L=null),_.sort((P,x)=>{const F=b.Range.compareRangesUsingStarts(P.range,x.range);return F===0?P.id<x.id?-1:P.id>x.id?1:0:F});const R=[];let M=0,N=null;for(const P of _){const x=P.id;N!==x&&(N=x,R[M++]=P)}return R}getInjectedTextAt(l){const n=this.getViewLineInfo(l.lineNumber);return this.modelLineProjections[n.modelLineNumber-1].getInjectedTextAt(n.modelLineWrappedLineIdx,l.column)}normalizePosition(l,n){const g=this.getViewLineInfo(l.lineNumber);return this.modelLineProjections[g.modelLineNumber-1].normalizePosition(g.modelLineWrappedLineIdx,l,n)}getLineIndentColumn(l){const n=this.getViewLineInfo(l);return n.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(n.modelLineNumber):0}}e.ViewModelLinesFromProjectedModel=a;function r(c){if(c.length===0)return[];const l=c.slice();l.sort(b.Range.compareRangesUsingStarts);const n=[];let g=l[0].startLineNumber,w=l[0].endLineNumber;for(let E=1,C=l.length;E<C;E++){const I=l[E];I.startLineNumber>w+1?(n.push(new b.Range(g,1,w,1)),g=I.startLineNumber,w=I.endLineNumber):I.endLineNumber>w&&(w=I.endLineNumber)}return n.push(new b.Range(g,1,w,1)),n}class i{get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}constructor(l,n){this.modelLineNumber=l,this.modelLineWrappedLineIdx=n}}class s{constructor(l,n){this.modelRange=l,this.viewLines=n}}class o{constructor(l){this._lines=l}convertViewPositionToModelPosition(l){return this._lines.convertViewPositionToModelPosition(l.lineNumber,l.column)}convertViewRangeToModelRange(l){return this._lines.convertViewRangeToModelRange(l)}validateViewPosition(l,n){return this._lines.validateViewPosition(l.lineNumber,l.column,n)}validateViewRange(l,n){return this._lines.validateViewRange(l,n)}convertModelPositionToViewPosition(l,n,g,w){return this._lines.convertModelPositionToViewPosition(l.lineNumber,l.column,n,g,w)}convertModelRangeToViewRange(l,n){return this._lines.convertModelRangeToViewRange(l,n)}modelPositionIsVisible(l){return this._lines.modelPositionIsVisible(l.lineNumber,l.column)}getModelLineViewLineCount(l){return this._lines.getModelLineViewLineCount(l)}getViewLineNumberOfModelPosition(l,n){return this._lines.getViewLineNumberOfModelPosition(l,n)}}var u;(function(c){c[c.BlockNone=0]="BlockNone",c[c.BlockSubsequent=1]="BlockSubsequent",c[c.BlockAll=2]="BlockAll"})(u||(u={}));class d{constructor(l){this.model=l}dispose(){}createCoordinatesConverter(){return new p(this)}getHiddenAreas(){return[]}setHiddenAreas(l){return!1}setTabSize(l){return!1}setWrappingSettings(l,n,g,w){return!1}createLineBreaksComputer(){const l=[];return{addRequest:(n,g,w)=>{l.push(null)},finalize:()=>l}}onModelFlushed(){}onModelLinesDeleted(l,n,g){return new v.ViewLinesDeletedEvent(n,g)}onModelLinesInserted(l,n,g,w){return new v.ViewLinesInsertedEvent(n,g)}onModelLineChanged(l,n,g){return[!1,new v.ViewLinesChangedEvent(n,1),null,null]}acceptVersionId(l){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(l,n,g){return{startLineNumber:l,endLineNumber:l,indent:0}}getViewLinesBracketGuides(l,n,g){return new Array(n-l+1).fill([])}getViewLinesIndentGuides(l,n){const g=n-l+1,w=new Array(g);for(let E=0;E<g;E++)w[E]=0;return w}getViewLineContent(l){return this.model.getLineContent(l)}getViewLineLength(l){return this.model.getLineLength(l)}getViewLineMinColumn(l){return this.model.getLineMinColumn(l)}getViewLineMaxColumn(l){return this.model.getLineMaxColumn(l)}getViewLineData(l){const n=this.model.tokenization.getLineTokens(l),g=n.getLineContent();return new h.ViewLineData(g,!1,1,g.length+1,0,n.inflate(),null)}getViewLinesData(l,n,g){const w=this.model.getLineCount();l=Math.min(Math.max(1,l),w),n=Math.min(Math.max(1,n),w);const E=[];for(let C=l;C<=n;C++){const I=C-l;E[I]=g[I]?this.getViewLineData(C):null}return E}getDecorationsInRange(l,n,g,w,E){return this.model.getDecorationsInRange(l,n,g,w,E)}normalizePosition(l,n){return this.model.normalizePosition(l,n)}getLineIndentColumn(l){return this.model.getLineIndentColumn(l)}getInjectedTextAt(l){return null}}e.ViewModelLinesFromModelAsIs=d;class p{constructor(l){this._lines=l}_validPosition(l){return this._lines.model.validatePosition(l)}_validRange(l){return this._lines.model.validateRange(l)}convertViewPositionToModelPosition(l){return this._validPosition(l)}convertViewRangeToModelRange(l){return this._validRange(l)}validateViewPosition(l,n){return this._validPosition(n)}validateViewRange(l,n){return this._validRange(n)}convertModelPositionToViewPosition(l){return this._validPosition(l)}convertModelRangeToViewRange(l){return this._validRange(l)}modelPositionIsVisible(l){const n=this._lines.model.getLineCount();return!(l.lineNumber<1||l.lineNumber>n)}getModelLineViewLineCount(l){return 1}getViewLineNumberOfModelPosition(l,n){return l}}}),define(Q[3397],Y([1,0,20,14,80,4,18,33,133,3248,301,51,27,441,99,146,449,805,1907,1135,303,1133,807,3396]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;const w=!0;class E extends D.Disposable{constructor(M,N,P,x,F,V,W,z,B){if(super(),this.languageConfigurationService=W,this._themeService=z,this._attachedView=B,this.hiddenAreasModel=new _,this.previousHiddenAreas=[],this._editorId=M,this._configuration=N,this.model=P,this._eventDispatcher=new n.ViewModelEventDispatcher,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new S.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new y.RunOnceScheduler(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=C.create(this.model),w&&this.model.isTooLargeForTokenization())this._lines=new g.ViewModelLinesFromModelAsIs(this.model);else{const K=this._configuration.options,H=K.get(49),U=K.get(136),G=K.get(143),$=K.get(135),ie=K.get(127);this._lines=new g.ViewModelLinesFromProjectedModel(this._editorId,this.model,x,F,H,this.model.getOptions().tabSize,U,G.wrappingColumn,$,ie)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new m.CursorsController(P,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new d.ViewLayout(this._configuration,this.getLineCount(),V)),this._register(this.viewLayout.onDidScroll(K=>{K.scrollTopChanged&&this._handleVisibleLinesChanged(),K.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new u.ViewScrollChangedEvent(K)),this._eventDispatcher.emitOutgoingEvent(new n.ScrollChangedEvent(K.oldScrollWidth,K.oldScrollLeft,K.oldScrollHeight,K.oldScrollTop,K.scrollWidth,K.scrollLeft,K.scrollHeight,K.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(K=>{this._eventDispatcher.emitOutgoingEvent(K)})),this._decorations=new l.ViewModelDecorations(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(K=>{try{const H=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(H,K)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(p.MinimapTokensColorTracker.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new u.ViewTokensColorsChangedEvent)})),this._register(this._themeService.onDidColorThemeChange(K=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new u.ViewThemeChangedEvent(K))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(M){this._eventDispatcher.addViewEventHandler(M)}removeViewEventHandler(M){this._eventDispatcher.removeViewEventHandler(M)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const M=this.viewLayout.getLinesViewportData(),N=new a.Range(M.startLineNumber,this.getLineMinColumn(M.startLineNumber),M.endLineNumber,this.getLineMaxColumn(M.endLineNumber));return this._toModelVisibleRanges(N)}visibleLinesStabilized(){const M=this.getModelVisibleRanges();this._attachedView.setVisibleLines(M,!0)}_handleVisibleLinesChanged(){const M=this.getModelVisibleRanges();this._attachedView.setVisibleLines(M,!1)}setHasFocus(M){this._hasFocus=M,this._cursor.setHasFocus(M),this._eventDispatcher.emitSingleViewEvent(new u.ViewFocusChangedEvent(M)),this._eventDispatcher.emitOutgoingEvent(new n.FocusChangedEvent(!M,M))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new u.ViewCompositionStartEvent)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new u.ViewCompositionEndEvent)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const M=new h.Position(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),N=this.coordinatesConverter.convertViewPositionToModelPosition(M);return new L(N,this._viewportStart.startLineDelta)}return new L(null,0)}_onConfigurationChanged(M,N){const P=this._captureStableViewport(),x=this._configuration.options,F=x.get(49),V=x.get(136),W=x.get(143),z=x.get(135),B=x.get(127);this._lines.setWrappingSettings(F,V,W.wrappingColumn,z,B)&&(M.emitViewEvent(new u.ViewFlushedEvent),M.emitViewEvent(new u.ViewLineMappingChangedEvent),M.emitViewEvent(new u.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(M),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),N.hasChanged(89)&&(this._decorations.reset(),M.emitViewEvent(new u.ViewDecorationsChangedEvent(null))),M.emitViewEvent(new u.ViewConfigurationChangedEvent(N)),this.viewLayout.onConfigurationChanged(N),P.recoverViewportStart(this.coordinatesConverter,this.viewLayout),S.CursorConfiguration.shouldRecreate(N)&&(this.cursorConfig=new S.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(M=>{try{const P=this._eventDispatcher.beginEmitViewEvents();let x=!1,F=!1;const V=M instanceof r.InternalModelContentChangeEvent?M.rawContentChangedEvent.changes:M.changes,W=M instanceof r.InternalModelContentChangeEvent?M.rawContentChangedEvent.versionId:null,z=this._lines.createLineBreaksComputer();for(const H of V)switch(H.changeType){case 4:{for(let U=0;U<H.detail.length;U++){const G=H.detail[U];let $=H.injectedTexts[U];$&&($=$.filter(ie=>!ie.ownerId||ie.ownerId===this._editorId)),z.addRequest(G,$,null)}break}case 2:{let U=null;H.injectedText&&(U=H.injectedText.filter(G=>!G.ownerId||G.ownerId===this._editorId)),z.addRequest(H.detail,U,null);break}}const B=z.finalize(),K=new t.ArrayQueue(B);for(const H of V)switch(H.changeType){case 1:{this._lines.onModelFlushed(),P.emitViewEvent(new u.ViewFlushedEvent),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),x=!0;break}case 3:{const U=this._lines.onModelLinesDeleted(W,H.fromLineNumber,H.toLineNumber);U!==null&&(P.emitViewEvent(U),this.viewLayout.onLinesDeleted(U.fromLineNumber,U.toLineNumber)),x=!0;break}case 4:{const U=K.takeCount(H.detail.length),G=this._lines.onModelLinesInserted(W,H.fromLineNumber,H.toLineNumber,U);G!==null&&(P.emitViewEvent(G),this.viewLayout.onLinesInserted(G.fromLineNumber,G.toLineNumber)),x=!0;break}case 2:{const U=K.dequeue(),[G,$,ie,J]=this._lines.onModelLineChanged(W,H.lineNumber,U);F=G,$&&P.emitViewEvent($),ie&&(P.emitViewEvent(ie),this.viewLayout.onLinesInserted(ie.fromLineNumber,ie.toLineNumber)),J&&(P.emitViewEvent(J),this.viewLayout.onLinesDeleted(J.fromLineNumber,J.toLineNumber));break}case 5:break}W!==null&&this._lines.acceptVersionId(W),this.viewLayout.onHeightMaybeChanged(),!x&&F&&(P.emitViewEvent(new u.ViewLineMappingChangedEvent),P.emitViewEvent(new u.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(P),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const N=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&N){const P=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(P){const x=this.coordinatesConverter.convertModelPositionToViewPosition(P.getStartPosition()),F=this.viewLayout.getVerticalOffsetForLineNumber(x.lineNumber);this.viewLayout.setScrollPosition({scrollTop:F+this._viewportStart.startLineDelta},1)}}try{const P=this._eventDispatcher.beginEmitViewEvents();M instanceof r.InternalModelContentChangeEvent&&P.emitOutgoingEvent(new n.ModelContentChangedEvent(M.contentChangedEvent)),this._cursor.onModelContentChanged(P,M)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(M=>{const N=[];for(let P=0,x=M.ranges.length;P<x;P++){const F=M.ranges[P],V=this.coordinatesConverter.convertModelPositionToViewPosition(new h.Position(F.fromLineNumber,1)).lineNumber,W=this.coordinatesConverter.convertModelPositionToViewPosition(new h.Position(F.toLineNumber,this.model.getLineMaxColumn(F.toLineNumber))).lineNumber;N[P]={fromLineNumber:V,toLineNumber:W}}this._eventDispatcher.emitSingleViewEvent(new u.ViewTokensChangedEvent(N)),this._eventDispatcher.emitOutgoingEvent(new n.ModelTokensChangedEvent(M))})),this._register(this.model.onDidChangeLanguageConfiguration(M=>{this._eventDispatcher.emitSingleViewEvent(new u.ViewLanguageConfigurationEvent),this.cursorConfig=new S.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new n.ModelLanguageConfigurationChangedEvent(M))})),this._register(this.model.onDidChangeLanguage(M=>{this.cursorConfig=new S.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new n.ModelLanguageChangedEvent(M))})),this._register(this.model.onDidChangeOptions(M=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const N=this._eventDispatcher.beginEmitViewEvents();N.emitViewEvent(new u.ViewFlushedEvent),N.emitViewEvent(new u.ViewLineMappingChangedEvent),N.emitViewEvent(new u.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(N),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new S.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new n.ModelOptionsChangedEvent(M))})),this._register(this.model.onDidChangeDecorations(M=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new u.ViewDecorationsChangedEvent(M)),this._eventDispatcher.emitOutgoingEvent(new n.ModelDecorationsChangedEvent(M))}))}setHiddenAreas(M,N){this.hiddenAreasModel.setHiddenAreas(N,M);const P=this.hiddenAreasModel.getMergedRanges();if(P===this.previousHiddenAreas)return;this.previousHiddenAreas=P;const x=this._captureStableViewport();let F=!1;try{const V=this._eventDispatcher.beginEmitViewEvents();F=this._lines.setHiddenAreas(P),F&&(V.emitViewEvent(new u.ViewFlushedEvent),V.emitViewEvent(new u.ViewLineMappingChangedEvent),V.emitViewEvent(new u.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(V),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged()),x.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),F&&this._eventDispatcher.emitOutgoingEvent(new n.HiddenAreasChangedEvent)}getVisibleRangesPlusViewportAboveBelow(){const M=this._configuration.options.get(142),N=this._configuration.options.get(65),P=Math.max(20,Math.round(M.height/N)),x=this.viewLayout.getLinesViewportData(),F=Math.max(1,x.completelyVisibleStartLineNumber-P),V=Math.min(this.getLineCount(),x.completelyVisibleEndLineNumber+P);return this._toModelVisibleRanges(new a.Range(F,this.getLineMinColumn(F),V,this.getLineMaxColumn(V)))}getVisibleRanges(){const M=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(M)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(M){const N=this.coordinatesConverter.convertViewRangeToModelRange(M),P=this._lines.getHiddenAreas();if(P.length===0)return[N];const x=[];let F=0,V=N.startLineNumber,W=N.startColumn;const z=N.endLineNumber,B=N.endColumn;for(let K=0,H=P.length;K<H;K++){const U=P[K].startLineNumber,G=P[K].endLineNumber;G<V||U>z||(V<U&&(x[F++]=new a.Range(V,W,U-1,this.model.getLineMaxColumn(U-1))),V=G+1,W=1)}return(V<z||V===z&&W<B)&&(x[F++]=new a.Range(V,W,z,B)),x}getCompletelyVisibleViewRange(){const M=this.viewLayout.getLinesViewportData(),N=M.completelyVisibleStartLineNumber,P=M.completelyVisibleEndLineNumber;return new a.Range(N,this.getLineMinColumn(N),P,this.getLineMaxColumn(P))}getCompletelyVisibleViewRangeAtScrollTop(M){const N=this.viewLayout.getLinesViewportDataAtScrollTop(M),P=N.completelyVisibleStartLineNumber,x=N.completelyVisibleEndLineNumber;return new a.Range(P,this.getLineMinColumn(P),x,this.getLineMaxColumn(x))}saveState(){const M=this.viewLayout.saveState(),N=M.scrollTop,P=this.viewLayout.getLineNumberAtVerticalOffset(N),x=this.coordinatesConverter.convertViewPositionToModelPosition(new h.Position(P,this.getLineMinColumn(P))),F=this.viewLayout.getVerticalOffsetForLineNumber(P)-N;return{scrollLeft:M.scrollLeft,firstPosition:x,firstPositionDeltaTop:F}}reduceRestoreState(M){if(typeof M.firstPosition>"u")return this._reduceRestoreStateCompatibility(M);const N=this.model.validatePosition(M.firstPosition),P=this.coordinatesConverter.convertModelPositionToViewPosition(N),x=this.viewLayout.getVerticalOffsetForLineNumber(P.lineNumber)-M.firstPositionDeltaTop;return{scrollLeft:M.scrollLeft,scrollTop:x}}_reduceRestoreStateCompatibility(M){return{scrollLeft:M.scrollLeft,scrollTop:M.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(M,N,P){this._viewportStart.update(this,M)}getActiveIndentGuide(M,N,P){return this._lines.getActiveIndentGuide(M,N,P)}getLinesIndentGuides(M,N){return this._lines.getViewLinesIndentGuides(M,N)}getBracketGuidesInRangeByLine(M,N,P,x){return this._lines.getViewLinesBracketGuides(M,N,P,x)}getLineContent(M){return this._lines.getViewLineContent(M)}getLineLength(M){return this._lines.getViewLineLength(M)}getLineMinColumn(M){return this._lines.getViewLineMinColumn(M)}getLineMaxColumn(M){return this._lines.getViewLineMaxColumn(M)}getLineFirstNonWhitespaceColumn(M){const N=f.firstNonWhitespaceIndex(this.getLineContent(M));return N===-1?0:N+1}getLineLastNonWhitespaceColumn(M){const N=f.lastNonWhitespaceIndex(this.getLineContent(M));return N===-1?0:N+2}getMinimapDecorationsInRange(M){return this._decorations.getMinimapDecorationsInRange(M)}getDecorationsInViewport(M){return this._decorations.getDecorationsViewportData(M).decorations}getInjectedTextAt(M){return this._lines.getInjectedTextAt(M)}getViewportViewLineRenderingData(M,N){const x=this._decorations.getDecorationsViewportData(M).inlineDecorations[N-M.startLineNumber];return this._getViewLineRenderingData(N,x)}getViewLineRenderingData(M){const N=this._decorations.getInlineDecorationsOnLine(M);return this._getViewLineRenderingData(M,N)}_getViewLineRenderingData(M,N){const P=this.model.mightContainRTL(),x=this.model.mightContainNonBasicASCII(),F=this.getTabSize(),V=this._lines.getViewLineData(M);return V.inlineDecorations&&(N=[...N,...V.inlineDecorations.map(W=>W.toInlineDecoration(M))]),new c.ViewLineRenderingData(V.minColumn,V.maxColumn,V.content,V.continuesWithWrappedLine,P,x,V.tokens,N,F,V.startVisibleColumn)}getViewLineData(M){return this._lines.getViewLineData(M)}getMinimapLinesRenderingData(M,N,P){const x=this._lines.getViewLinesData(M,N,P);return new c.MinimapLinesRenderingData(this.getTabSize(),x)}getAllOverviewRulerDecorations(M){const N=this.model.getOverviewRulerDecorations(this._editorId,(0,v.filterValidationDecorations)(this._configuration.options)),P=new I;for(const x of N){const F=x.options,V=F.overviewRuler;if(!V)continue;const W=V.position;if(W===0)continue;const z=V.getColor(M.value),B=this.coordinatesConverter.getViewLineNumberOfModelPosition(x.range.startLineNumber,x.range.startColumn),K=this.coordinatesConverter.getViewLineNumberOfModelPosition(x.range.endLineNumber,x.range.endColumn);P.accept(z,F.zIndex,B,K,W)}return P.asArray}_invalidateDecorationsColorCache(){const M=this.model.getOverviewRulerDecorations();for(const N of M)N.options.overviewRuler?.invalidateCachedColor(),N.options.minimap?.invalidateCachedColor()}getValueInRange(M,N){const P=this.coordinatesConverter.convertViewRangeToModelRange(M);return this.model.getValueInRange(P,N)}getValueLengthInRange(M,N){const P=this.coordinatesConverter.convertViewRangeToModelRange(M);return this.model.getValueLengthInRange(P,N)}modifyPosition(M,N){const P=this.coordinatesConverter.convertViewPositionToModelPosition(M);return this.model.modifyPosition(P,N)}deduceModelPositionRelativeToViewPosition(M,N,P){const x=this.coordinatesConverter.convertViewPositionToModelPosition(M);this.model.getEOL().length===2&&(N<0?N-=P:N+=P);const V=this.model.getOffsetAt(x)+N;return this.model.getPositionAt(V)}getPlainTextToCopy(M,N,P){const x=P?`\r `:this.model.getEOL();M=M.slice(0),M.sort(a.Range.compareRangesUsingStarts);let F=!1,V=!1;for(const z of M)z.isEmpty()?F=!0:V=!0;if(!V){if(!N)return"";const z=M.map(K=>K.startLineNumber);let B="";for(let K=0;K<z.length;K++)K>0&&z[K-1]===z[K]||(B+=this.model.getLineContent(z[K])+x);return B}if(F&&N){const z=[];let B=0;for(const K of M){const H=K.startLineNumber;K.isEmpty()?H!==B&&z.push(this.model.getLineContent(H)):z.push(this.model.getValueInRange(K,P?2:0)),B=H}return z.length===1?z[0]:z}const W=[];for(const z of M)z.isEmpty()||W.push(this.model.getValueInRange(z,P?2:0));return W.length===1?W[0]:W}getRichTextToCopy(M,N){const P=this.model.getLanguageId();if(P===s.PLAINTEXT_LANGUAGE_ID||M.length!==1)return null;let x=M[0];if(x.isEmpty()){if(!N)return null;const K=x.startLineNumber;x=new a.Range(K,this.model.getLineMinColumn(K),K,this.model.getLineMaxColumn(K))}const F=this._configuration.options.get(49),V=this._getColorMap(),z=/[:;\\\/<>]/.test(F.fontFamily)||F.fontFamily===v.EDITOR_FONT_DEFAULTS.fontFamily;let B;return z?B=v.EDITOR_FONT_DEFAULTS.fontFamily:(B=F.fontFamily,B=B.replace(/"/g,"'"),/[,']/.test(B)||/[+ ]/.test(B)&&(B=`'${B}'`),B=`${B}, ${v.EDITOR_FONT_DEFAULTS.fontFamily}`),{mode:P,html:`<div style="color: ${V[1]};background-color: ${V[2]};font-family: ${B};font-weight: ${F.fontWeight};font-size: ${F.fontSize}px;line-height: ${F.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(x,V)+"</div>"}}_getHTMLToCopy(M,N){const P=M.startLineNumber,x=M.startColumn,F=M.endLineNumber,V=M.endColumn,W=this.getTabSize();let z="";for(let B=P;B<=F;B++){const K=this.model.tokenization.getLineTokens(B),H=K.getLineContent(),U=B===P?x-1:0,G=B===F?V-1:H.length;H===""?z+="<br>":z+=(0,o.tokenizeLineToHTML)(H,K.inflate(),N,U,G,W,T.isWindows)}return z}_getColorMap(){const M=i.TokenizationRegistry.getColorMap(),N=["#000000"];if(M)for(let P=1,x=M.length;P<x;P++)N[P]=b.Color.Format.CSS.formatHex(M[P]);return N}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(M,N,P){return this._withViewEventsCollector(x=>this._cursor.setStates(x,M,N,P))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(M){this._cursor.setCursorColumnSelectData(M)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(M){this._cursor.setPrevEditOperationType(M)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(M,N,P=0){this._withViewEventsCollector(x=>this._cursor.setSelections(x,M,N,P))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(M){this._withViewEventsCollector(N=>this._cursor.restoreState(N,M))}_executeCursorEdit(M){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new n.ReadOnlyEditAttemptEvent);return}this._withViewEventsCollector(M)}executeEdits(M,N,P){this._executeCursorEdit(x=>this._cursor.executeEdits(x,M,N,P))}startComposition(){this._executeCursorEdit(M=>this._cursor.startComposition(M))}endComposition(M){this._executeCursorEdit(N=>this._cursor.endComposition(N,M))}type(M,N){this._executeCursorEdit(P=>this._cursor.type(P,M,N))}compositionType(M,N,P,x,F){this._executeCursorEdit(V=>this._cursor.compositionType(V,M,N,P,x,F))}paste(M,N,P,x){this._executeCursorEdit(F=>this._cursor.paste(F,M,N,P,x))}cut(M){this._executeCursorEdit(N=>this._cursor.cut(N,M))}executeCommand(M,N){this._executeCursorEdit(P=>this._cursor.executeCommand(P,M,N))}executeCommands(M,N){this._executeCursorEdit(P=>this._cursor.executeCommands(P,M,N))}revealPrimaryCursor(M,N,P=!1){this._withViewEventsCollector(x=>this._cursor.revealPrimary(x,M,P,0,N,0))}revealTopMostCursor(M){const N=this._cursor.getTopMostViewPosition(),P=new a.Range(N.lineNumber,N.column,N.lineNumber,N.column);this._withViewEventsCollector(x=>x.emitViewEvent(new u.ViewRevealRangeRequestEvent(M,!1,P,null,0,!0,0)))}revealBottomMostCursor(M){const N=this._cursor.getBottomMostViewPosition(),P=new a.Range(N.lineNumber,N.column,N.lineNumber,N.column);this._withViewEventsCollector(x=>x.emitViewEvent(new u.ViewRevealRangeRequestEvent(M,!1,P,null,0,!0,0)))}revealRange(M,N,P,x,F){this._withViewEventsCollector(V=>V.emitViewEvent(new u.ViewRevealRangeRequestEvent(M,!1,P,null,x,N,F)))}changeWhitespace(M){this.viewLayout.changeWhitespace(M)&&(this._eventDispatcher.emitSingleViewEvent(new u.ViewZonesChangedEvent),this._eventDispatcher.emitOutgoingEvent(new n.ViewZonesChangedEvent))}_withViewEventsCollector(M){try{const N=this._eventDispatcher.beginEmitViewEvents();return M(N)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(M,N){return this._lines.normalizePosition(M,N)}getLineIndentColumn(M){return this._lines.getLineIndentColumn(M)}}e.ViewModel=E;class C{static create(M){const N=M._setTrackedRange(null,new a.Range(1,1,1,1),1);return new C(M,1,!1,N,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(M,N,P,x,F){this._model=M,this._viewLineNumber=N,this._isValid=P,this._modelTrackedRange=x,this._startLineDelta=F}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(M,N){const P=M.coordinatesConverter.convertViewPositionToModelPosition(new h.Position(N,M.getLineMinColumn(N))),x=M.model._setTrackedRange(this._modelTrackedRange,new a.Range(P.lineNumber,P.column,P.lineNumber,P.column),1),F=M.viewLayout.getVerticalOffsetForLineNumber(N),V=M.viewLayout.getCurrentScrollTop();this._viewLineNumber=N,this._isValid=!0,this._modelTrackedRange=x,this._startLineDelta=V-F}invalidate(){this._isValid=!1}}class I{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(M,N,P,x,F){const V=this._asMap[M];if(V){const W=V.data,z=W[W.length-3],B=W[W.length-1];if(z===F&&B+1>=P){x>B&&(W[W.length-1]=x);return}W.push(F,P,x)}else{const W=new c.OverviewRulerDecorationsGroup(M,N,[F,P,x]);this._asMap[M]=W,this.asArray.push(W)}}}class _{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(M,N){const P=this.hiddenAreas.get(M);P&&k(P,N)||(this.hiddenAreas.set(M,N),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const M=Array.from(this.hiddenAreas.values()).reduce((N,P)=>A(N,P),[]);return k(this.ranges,M)?this.ranges:(this.ranges=M,this.ranges)}}function A(R,M){const N=[];let P=0,x=0;for(;P<R.length&&x<M.length;){const F=R[P],V=M[x];if(F.endLineNumber<V.startLineNumber-1)N.push(R[P++]);else if(V.endLineNumber<F.startLineNumber-1)N.push(M[x++]);else{const W=Math.min(F.startLineNumber,V.startLineNumber),z=Math.max(F.endLineNumber,V.endLineNumber);N.push(new a.Range(W,1,z,1)),P++,x++}}for(;P<R.length;)N.push(R[P++]);for(;x<M.length;)N.push(M[x++]);return N}function k(R,M){if(R.length!==M.length)return!1;for(let N=0;N<R.length;N++)if(!R[N].equalsRange(M[N]))return!1;return!0}class L{constructor(M,N){this.viewportStartModelPosition=M,this.startLineDelta=N}recoverViewportStart(M,N){if(!this.viewportStartModelPosition)return;const P=M.convertModelPositionToViewPosition(this.viewportStartModelPosition),x=N.getVerticalOffsetForLineNumber(P.lineNumber);N.setScrollPosition({scrollTop:x+this.startLineDelta},1)}}}),define(Q[190],Y([1,0,2331,7,15,6,122,4,22,3179,48,79,3381,1067,133,323,51,27,96,1866,393,73,98,232,36,3397,28,8,5,134,23,19,66,1904,2322,662,125,258,74,3260,485,3278,1719]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P,x,F,V,W,z){"use strict";var B;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorModeContext=e.BooleanEventEmitter=e.CodeEditorWidget=void 0;let K=0;class H{constructor(ce,ae,ue,de,ge,he){this.model=ce,this.viewModel=ae,this.view=ue,this.hasRealView=de,this.listenersToRemove=ge,this.attachedView=he}dispose(){(0,f.dispose)(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let U=class extends f.Disposable{static{B=this}static{this.dropIntoEditorDecorationOptions=n.ModelDecorationOptions.register({description:"workbench-dnd-target",className:"dnd-target"})}get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(ce,ae,ue,de,ge,he,be,ve,Ie,Se,we,ye){super(),this.languageConfigurationService=we,this._deliveryQueue=(0,D.createEventDeliveryQueue)(),this._contributions=this._register(new W.CodeEditorContributions),this._onDidDispose=this._register(new D.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new ie(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new $({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new $({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new ie(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new ie(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new ie(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new ie(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new ie(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new ie(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new ie(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new ie(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new ie(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new ie(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new ie(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new ie(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new ie(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new ie(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new ie(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new ie(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new ie(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new D.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),ge.willCreateCodeEditor();const Re={...ae};this._domElement=ce,this._overflowWidgetsDomNode=Re.overflowWidgetsDomNode,delete Re.overflowWidgetsDomNode,this._id=++K,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=ue.telemetryData,this._configuration=this._register(this._createConfiguration(ue.isSimpleWidget||!1,Re,Se)),this._register(this._configuration.onDidChange(Ae=>{this._onDidChangeConfiguration.fire(Ae);const Me=this._configuration.options;if(Ae.hasChanged(142)){const Oe=Me.get(142);this._onDidLayoutChange.fire(Oe)}})),this._contextKeyService=this._register(be.createScoped(this._domElement)),this._notificationService=Ie,this._codeEditorService=ge,this._commandService=he,this._themeService=ve,this._register(new J(this,this._contextKeyService)),this._register(new j(this,this._contextKeyService,ye)),this._instantiationService=de.createChild(new A.ServiceCollection([I.IContextKeyService,this._contextKeyService])),this._modelData=null,this._focusTracker=new ee(ce),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let Le;Array.isArray(ue.contributions)?Le=ue.contributions:Le=S.EditorExtensionsRegistry.getEditorContributions(),this._contributions.initialize(this,Le,this._instantiationService);for(const Ae of S.EditorExtensionsRegistry.getEditorActions()){if(this._actions.has(Ae.id)){(0,b.onUnexpectedError)(new Error(`Cannot have two actions with the same id ${Ae.id}`));continue}const Me=new p.InternalEditorAction(Ae.id,Ae.label,Ae.alias,Ae.precondition??void 0,()=>this._instantiationService.invokeFunction(Oe=>Promise.resolve(Ae.runEditorCommand(Oe,this,null))),this._contextKeyService);this._actions.set(Me.id,Me)}const Pe=()=>!this._configuration.options.get(89)&&this._configuration.options.get(35).enabled;this._register(new y.DragAndDropObserver(this._domElement,{onDragEnter:()=>{},onDragOver:Ae=>{if(!Pe())return;const Me=this.getTargetAtClientPoint(Ae.clientX,Ae.clientY);Me?.position&&this.showDropIndicatorAt(Me.position)},onDrop:async Ae=>{if(!Pe()||(this.removeDropIndicator(),!Ae.dataTransfer))return;const Me=this.getTargetAtClientPoint(Ae.clientX,Ae.clientY);Me?.position&&this._onDropIntoEditor.fire({position:Me.position,event:Ae})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(ce){this._modelData?.view.writeScreenReaderContent(ce)}_createConfiguration(ce,ae,ue){return new m.EditorConfiguration(ce,ae,this._domElement,ue)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return c.EditorType.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(ce){return this._instantiationService.invokeFunction(ce)}updateOptions(ce){this._configuration.updateOptions(ce||{})}getOptions(){return this._configuration.options}getOption(ce){return this._configuration.options.get(ce)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(ce){return this._modelData?P.WordOperations.getWordAtPosition(this._modelData.model,this._configuration.options.get(128),ce):null}getValue(ce=null){if(!this._modelData)return"";const ae=!!(ce&&ce.preserveBOM);let ue=0;return ce&&ce.lineEnding&&ce.lineEnding===` `?ue=1:ce&&ce.lineEnding&&ce.lineEnding===`\r `&&(ue=2),this._modelData.model.getValue(ue,ae)}setValue(ce){this._modelData&&this._modelData.model.setValue(ce)}getModel(){return this._modelData?this._modelData.model:null}setModel(ce=null){const ae=ce;if(this._modelData===null&&ae===null||this._modelData&&this._modelData.model===ae)return;const ue=this.hasTextFocus(),de=this._detachModel();this._attachModel(ae),ue&&this.hasModel()&&this.focus();const ge={oldModelUrl:de?de.uri:null,newModelUrl:ae?ae.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(ge),this._postDetachModelCleanup(de),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const ce in this._decorationTypeSubtypes){const ae=this._decorationTypeSubtypes[ce];for(const ue in ae)this._removeDecorationType(ce+"-"+ue)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(ce,ae,ue,de){const ge=ce.model.validatePosition({lineNumber:ae,column:ue}),he=ce.viewModel.coordinatesConverter.convertModelPositionToViewPosition(ge);return ce.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(he.lineNumber,de)}getTopForLineNumber(ce,ae=!1){return this._modelData?B._getVerticalOffsetForPosition(this._modelData,ce,1,ae):-1}getTopForPosition(ce,ae){return this._modelData?B._getVerticalOffsetForPosition(this._modelData,ce,ae,!1):-1}static _getVerticalOffsetForPosition(ce,ae,ue,de=!1){const ge=ce.model.validatePosition({lineNumber:ae,column:ue}),he=ce.viewModel.coordinatesConverter.convertModelPositionToViewPosition(ge);return ce.viewModel.viewLayout.getVerticalOffsetForLineNumber(he.lineNumber,de)}getBottomForLineNumber(ce,ae=!1){return this._modelData?B._getVerticalOffsetAfterPosition(this._modelData,ce,1,ae):-1}setHiddenAreas(ce,ae){this._modelData?.viewModel.setHiddenAreas(ce.map(ue=>u.Range.lift(ue)),ae)}getVisibleColumnFromPosition(ce){if(!this._modelData)return ce.column;const ae=this._modelData.model.validatePosition(ce),ue=this._modelData.model.getOptions().tabSize;return s.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(ae.lineNumber),ae.column,ue)+1}getStatusbarColumn(ce){if(!this._modelData)return ce.column;const ae=this._modelData.model.validatePosition(ce),ue=this._modelData.model.getOptions().tabSize;return s.CursorColumns.toStatusbarColumn(this._modelData.model.getLineContent(ae.lineNumber),ae.column,ue)}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(ce,ae="api"){if(this._modelData){if(!o.Position.isIPosition(ce))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(ae,[{selectionStartLineNumber:ce.lineNumber,selectionStartColumn:ce.column,positionLineNumber:ce.lineNumber,positionColumn:ce.column}])}}_sendRevealRange(ce,ae,ue,de){if(!this._modelData)return;if(!u.Range.isIRange(ce))throw new Error("Invalid arguments");const ge=this._modelData.model.validateRange(ce),he=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(ge);this._modelData.viewModel.revealRange("api",ue,he,ae,de)}revealLine(ce,ae=0){this._revealLine(ce,0,ae)}revealLineInCenter(ce,ae=0){this._revealLine(ce,1,ae)}revealLineInCenterIfOutsideViewport(ce,ae=0){this._revealLine(ce,2,ae)}revealLineNearTop(ce,ae=0){this._revealLine(ce,5,ae)}_revealLine(ce,ae,ue){if(typeof ce!="number")throw new Error("Invalid arguments");this._sendRevealRange(new u.Range(ce,1,ce,1),ae,!1,ue)}revealPosition(ce,ae=0){this._revealPosition(ce,0,!0,ae)}revealPositionInCenter(ce,ae=0){this._revealPosition(ce,1,!0,ae)}revealPositionInCenterIfOutsideViewport(ce,ae=0){this._revealPosition(ce,2,!0,ae)}revealPositionNearTop(ce,ae=0){this._revealPosition(ce,5,!0,ae)}_revealPosition(ce,ae,ue,de){if(!o.Position.isIPosition(ce))throw new Error("Invalid arguments");this._sendRevealRange(new u.Range(ce.lineNumber,ce.column,ce.lineNumber,ce.column),ae,ue,de)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(ce,ae="api"){const ue=d.Selection.isISelection(ce),de=u.Range.isIRange(ce);if(!ue&&!de)throw new Error("Invalid arguments");if(ue)this._setSelectionImpl(ce,ae);else if(de){const ge={selectionStartLineNumber:ce.startLineNumber,selectionStartColumn:ce.startColumn,positionLineNumber:ce.endLineNumber,positionColumn:ce.endColumn};this._setSelectionImpl(ge,ae)}}_setSelectionImpl(ce,ae){if(!this._modelData)return;const ue=new d.Selection(ce.selectionStartLineNumber,ce.selectionStartColumn,ce.positionLineNumber,ce.positionColumn);this._modelData.viewModel.setSelections(ae,[ue])}revealLines(ce,ae,ue=0){this._revealLines(ce,ae,0,ue)}revealLinesInCenter(ce,ae,ue=0){this._revealLines(ce,ae,1,ue)}revealLinesInCenterIfOutsideViewport(ce,ae,ue=0){this._revealLines(ce,ae,2,ue)}revealLinesNearTop(ce,ae,ue=0){this._revealLines(ce,ae,5,ue)}_revealLines(ce,ae,ue,de){if(typeof ce!="number"||typeof ae!="number")throw new Error("Invalid arguments");this._sendRevealRange(new u.Range(ce,1,ae,1),ue,!1,de)}revealRange(ce,ae=0,ue=!1,de=!0){this._revealRange(ce,ue?1:0,de,ae)}revealRangeInCenter(ce,ae=0){this._revealRange(ce,1,!0,ae)}revealRangeInCenterIfOutsideViewport(ce,ae=0){this._revealRange(ce,2,!0,ae)}revealRangeNearTop(ce,ae=0){this._revealRange(ce,5,!0,ae)}revealRangeNearTopIfOutsideViewport(ce,ae=0){this._revealRange(ce,6,!0,ae)}revealRangeAtTop(ce,ae=0){this._revealRange(ce,3,!0,ae)}_revealRange(ce,ae,ue,de){if(!u.Range.isIRange(ce))throw new Error("Invalid arguments");this._sendRevealRange(u.Range.lift(ce),ae,ue,de)}setSelections(ce,ae="api",ue=0){if(this._modelData){if(!ce||ce.length===0)throw new Error("Invalid arguments");for(let de=0,ge=ce.length;de<ge;de++)if(!d.Selection.isISelection(ce[de]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(ae,ce,ue)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(ce,ae=1){if(this._modelData){if(typeof ce!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:ce},ae)}}setScrollTop(ce,ae=1){if(this._modelData){if(typeof ce!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:ce},ae)}}setScrollPosition(ce,ae=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(ce,ae)}hasPendingScrollAnimation(){return this._modelData?this._modelData.viewModel.viewLayout.hasPendingScrollAnimation():!1}saveViewState(){if(!this._modelData)return null;const ce=this._contributions.saveViewState(),ae=this._modelData.viewModel.saveCursorState(),ue=this._modelData.viewModel.saveState();return{cursorState:ae,viewState:ue,contributionsState:ce}}restoreViewState(ce){if(!this._modelData||!this._modelData.hasRealView)return;const ae=ce;if(ae&&ae.cursorState&&ae.viewState){const ue=ae.cursorState;Array.isArray(ue)?ue.length>0&&this._modelData.viewModel.restoreCursorState(ue):this._modelData.viewModel.restoreCursorState([ue]),this._contributions.restoreViewState(ae.contributionsState||{});const de=this._modelData.viewModel.reduceRestoreState(ae.viewState);this._modelData.view.restoreState(de)}}handleInitialized(){this._getViewModel()?.visibleLinesStabilized()}onVisible(){this._modelData?.view.refreshFocusState()}onHide(){this._modelData?.view.refreshFocusState(),this._focusTracker.refreshState()}getContribution(ce){return this._contributions.get(ce)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let ce=this.getActions();return ce=ce.filter(ae=>ae.isSupported()),ce}getAction(ce){return this._actions.get(ce)||null}trigger(ce,ae,ue){switch(ue=ue||{},ae){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(ce);return;case"type":{const ge=ue;this._type(ce,ge.text||"");return}case"replacePreviousChar":{const ge=ue;this._compositionType(ce,ge.text||"",ge.replaceCharCnt||0,0,0);return}case"compositionType":{const ge=ue;this._compositionType(ce,ge.text||"",ge.replacePrevCharCnt||0,ge.replaceNextCharCnt||0,ge.positionDelta||0);return}case"paste":{const ge=ue;this._paste(ce,ge.text||"",ge.pasteOnNewLine||!1,ge.multicursorText||null,ge.mode||null);return}case"cut":this._cut(ce);return}const de=this.getAction(ae);if(de){Promise.resolve(de.run(ue)).then(void 0,b.onUnexpectedError);return}this._modelData&&(this._triggerEditorCommand(ce,ae,ue)||this._triggerCommand(ae,ue))}_triggerCommand(ce,ae){this._commandService.executeCommand(ce,ae)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(ce){this._modelData&&(this._modelData.viewModel.endComposition(ce),this._onDidCompositionEnd.fire())}_type(ce,ae){!this._modelData||ae.length===0||(ce==="keyboard"&&this._onWillType.fire(ae),this._modelData.viewModel.type(ae,ce),ce==="keyboard"&&this._onDidType.fire(ae))}_compositionType(ce,ae,ue,de,ge){this._modelData&&this._modelData.viewModel.compositionType(ae,ue,de,ge,ce)}_paste(ce,ae,ue,de,ge){if(!this._modelData||ae.length===0)return;const he=this._modelData.viewModel,be=he.getSelection().getStartPosition();he.paste(ae,ue,de,ce);const ve=he.getSelection().getStartPosition();ce==="keyboard"&&this._onDidPaste.fire({range:new u.Range(be.lineNumber,be.column,ve.lineNumber,ve.column),languageId:ge})}_cut(ce){this._modelData&&this._modelData.viewModel.cut(ce)}_triggerEditorCommand(ce,ae,ue){const de=S.EditorExtensionsRegistry.getEditorCommand(ae);return de?(ue=ue||{},ue.source=ce,this._instantiationService.invokeFunction(ge=>{Promise.resolve(de.runEditorCommand(ge,this,ue)).then(void 0,b.onUnexpectedError)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(89)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(89)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(ce,ae,ue){if(!this._modelData||this._configuration.options.get(89))return!1;let de;return ue?Array.isArray(ue)?de=()=>ue:de=ue:de=()=>null,this._modelData.viewModel.executeEdits(ce,ae,de),!0}executeCommand(ce,ae){this._modelData&&this._modelData.viewModel.executeCommand(ae,ce)}executeCommands(ce,ae){this._modelData&&this._modelData.viewModel.executeCommands(ae,ce)}createDecorationsCollection(ce){return new X(this,ce)}changeDecorations(ce){return this._modelData?this._modelData.model.changeDecorations(ce,this._id):null}getLineDecorations(ce){return this._modelData?this._modelData.model.getLineDecorations(ce,this._id,(0,i.filterValidationDecorations)(this._configuration.options)):null}getDecorationsInRange(ce){return this._modelData?this._modelData.model.getDecorationsInRange(ce,this._id,(0,i.filterValidationDecorations)(this._configuration.options)):null}deltaDecorations(ce,ae){return this._modelData?ce.length===0&&ae.length===0?ce:this._modelData.model.deltaDecorations(ce,ae,this._id):[]}removeDecorations(ce){!this._modelData||ce.length===0||this._modelData.model.changeDecorations(ae=>{ae.deltaDecorations(ce,[])})}setDecorationsByType(ce,ae,ue){const de={},ge=this._decorationTypeSubtypes[ae]||{};this._decorationTypeSubtypes[ae]=de;const he=[];for(const ve of ue){let Ie=ae;if(ve.renderOptions){const we=(0,T.hash)(ve.renderOptions).toString(16);Ie=ae+"-"+we,!ge[we]&&!de[we]&&this._registerDecorationType(ce,Ie,ve.renderOptions,ae),de[we]=!0}const Se=this._resolveDecorationOptions(Ie,!!ve.hoverMessage);ve.hoverMessage&&(Se.hoverMessage=ve.hoverMessage),he.push({range:ve.range,options:Se})}for(const ve in ge)de[ve]||this._removeDecorationType(ae+"-"+ve);const be=this._decorationTypeKeysToIds[ae]||[];this._decorationTypeKeysToIds[ae]=this.deltaDecorations(be,he)}setDecorationsByTypeFast(ce,ae){const ue=this._decorationTypeSubtypes[ce]||{};for(const be in ue)this._removeDecorationType(ce+"-"+be);this._decorationTypeSubtypes[ce]={};const de=n.ModelDecorationOptions.createDynamic(this._resolveDecorationOptions(ce,!1)),ge=new Array(ae.length);for(let be=0,ve=ae.length;be<ve;be++)ge[be]={range:ae[be],options:de};const he=this._decorationTypeKeysToIds[ce]||[];this._decorationTypeKeysToIds[ce]=this.deltaDecorations(he,ge)}removeDecorationsByType(ce){const ae=this._decorationTypeKeysToIds[ce];ae&&this.deltaDecorations(ae,[]),this._decorationTypeKeysToIds.hasOwnProperty(ce)&&delete this._decorationTypeKeysToIds[ce],this._decorationTypeSubtypes.hasOwnProperty(ce)&&delete this._decorationTypeSubtypes[ce]}getLayoutInfo(){return this._configuration.options.get(142)}createOverviewRuler(ce){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(ce)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(ce){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(ce)}delegateScrollFromMouseWheelEvent(ce){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(ce)}layout(ce){this._configuration.observeContainer(ce),this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(ce){const ae={widget:ce,position:ce.getPosition()};this._contentWidgets.hasOwnProperty(ce.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[ce.getId()]=ae,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(ae)}layoutContentWidget(ce){const ae=ce.getId();if(this._contentWidgets.hasOwnProperty(ae)){const ue=this._contentWidgets[ae];ue.position=ce.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(ue)}}removeContentWidget(ce){const ae=ce.getId();if(this._contentWidgets.hasOwnProperty(ae)){const ue=this._contentWidgets[ae];delete this._contentWidgets[ae],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(ue)}}addOverlayWidget(ce){const ae={widget:ce,position:ce.getPosition()};this._overlayWidgets.hasOwnProperty(ce.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[ce.getId()]=ae,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(ae)}layoutOverlayWidget(ce){const ae=ce.getId();if(this._overlayWidgets.hasOwnProperty(ae)){const ue=this._overlayWidgets[ae];ue.position=ce.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(ue)}}removeOverlayWidget(ce){const ae=ce.getId();if(this._overlayWidgets.hasOwnProperty(ae)){const ue=this._overlayWidgets[ae];delete this._overlayWidgets[ae],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(ue)}}addGlyphMarginWidget(ce){const ae={widget:ce,position:ce.getPosition()};this._glyphMarginWidgets.hasOwnProperty(ce.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[ce.getId()]=ae,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(ae)}layoutGlyphMarginWidget(ce){const ae=ce.getId();if(this._glyphMarginWidgets.hasOwnProperty(ae)){const ue=this._glyphMarginWidgets[ae];ue.position=ce.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(ue)}}removeGlyphMarginWidget(ce){const ae=ce.getId();if(this._glyphMarginWidgets.hasOwnProperty(ae)){const ue=this._glyphMarginWidgets[ae];delete this._glyphMarginWidgets[ae],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(ue)}}changeViewZones(ce){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(ce)}getTargetAtClientPoint(ce,ae){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(ce,ae)}getScrolledVisiblePosition(ce){if(!this._modelData||!this._modelData.hasRealView)return null;const ae=this._modelData.model.validatePosition(ce),ue=this._configuration.options,de=ue.get(142),ge=B._getVerticalOffsetForPosition(this._modelData,ae.lineNumber,ae.column)-this.getScrollTop(),he=this._modelData.view.getOffsetForColumn(ae.lineNumber,ae.column)+de.glyphMarginWidth+de.lineNumbersWidth+de.decorationsWidth-this.getScrollLeft();return{top:ge,left:he,height:ue.get(65)}}getOffsetForColumn(ce,ae){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(ce,ae)}render(ce=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,ce)}setAriaOptions(ce){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(ce)}applyFontInfo(ce){(0,F.applyFontInfo)(ce,this._configuration.options.get(49))}setBanner(ce,ae){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=ce,this._configuration.setReservedHeight(ce?ae:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(ce){if(!ce){this._modelData=null;return}const ae=[];this._domElement.setAttribute("data-mode-id",ce.getLanguageId()),this._configuration.setIsDominatedByLongLines(ce.isDominatedByLongLines()),this._configuration.setModelLineCount(ce.getLineCount());const ue=ce.onBeforeAttached(),de=new E.ViewModel(this._id,this._configuration,ce,N.DOMLineBreaksComputerFactory.create(),M.MonospaceLineBreaksComputerFactory.create(this._configuration.options),be=>y.scheduleAtNextAnimationFrame(be),this.languageConfigurationService,this._themeService,ue);ae.push(ce.onWillDispose(()=>this.setModel(null))),ae.push(de.onEvent(be=>{switch(be.kind){case 0:this._onDidContentSizeChange.fire(be);break;case 1:this._editorTextFocus.setValue(be.hasFocus);break;case 2:this._onDidScrollChange.fire(be);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(be.reachedMaxCursorCount){const we=this.getOption(78),ye=t.localize(0,null,we);this._notificationService.prompt(k.Severity.Warning,ye,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:t.localize(1,null),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const ve=[];for(let we=0,ye=be.selections.length;we<ye;we++)ve[we]=be.selections[we].getPosition();const Ie={position:ve[0],secondaryPositions:ve.slice(1),reason:be.reason,source:be.source};this._onDidChangeCursorPosition.fire(Ie);const Se={selection:be.selections[0],secondarySelections:be.selections.slice(1),modelVersionId:be.modelVersionId,oldSelections:be.oldSelections,oldModelVersionId:be.oldModelVersionId,source:be.source,reason:be.reason};this._onDidChangeCursorSelection.fire(Se);break}case 7:this._onDidChangeModelDecorations.fire(be.event);break;case 8:this._domElement.setAttribute("data-mode-id",ce.getLanguageId()),this._onDidChangeModelLanguage.fire(be.event);break;case 9:this._onDidChangeModelLanguageConfiguration.fire(be.event);break;case 10:this._onDidChangeModelContent.fire(be.event);break;case 11:this._onDidChangeModelOptions.fire(be.event);break;case 12:this._onDidChangeModelTokens.fire(be.event);break}}));const[ge,he]=this._createView(de);if(he){this._domElement.appendChild(ge.domNode.domNode);let be=Object.keys(this._contentWidgets);for(let ve=0,Ie=be.length;ve<Ie;ve++){const Se=be[ve];ge.addContentWidget(this._contentWidgets[Se])}be=Object.keys(this._overlayWidgets);for(let ve=0,Ie=be.length;ve<Ie;ve++){const Se=be[ve];ge.addOverlayWidget(this._overlayWidgets[Se])}be=Object.keys(this._glyphMarginWidgets);for(let ve=0,Ie=be.length;ve<Ie;ve++){const Se=be[ve];ge.addGlyphMarginWidget(this._glyphMarginWidgets[Se])}ge.render(!1,!0),ge.domNode.domNode.setAttribute("data-uri",ce.uri.toString())}this._modelData=new H(ce,de,ge,he,ae,ue)}_createView(ce){let ae;this.isSimpleWidget?ae={paste:(ge,he,be,ve)=>{this._paste("keyboard",ge,he,be,ve)},type:ge=>{this._type("keyboard",ge)},compositionType:(ge,he,be,ve)=>{this._compositionType("keyboard",ge,he,be,ve)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:ae={paste:(ge,he,be,ve)=>{const Ie={text:ge,pasteOnNewLine:he,multicursorText:be,mode:ve};this._commandService.executeCommand("paste",Ie)},type:ge=>{const he={text:ge};this._commandService.executeCommand("type",he)},compositionType:(ge,he,be,ve)=>{if(be||ve){const Ie={text:ge,replacePrevCharCnt:he,replaceNextCharCnt:be,positionDelta:ve};this._commandService.executeCommand("compositionType",Ie)}else{const Ie={text:ge,replaceCharCnt:he};this._commandService.executeCommand("replacePreviousChar",Ie)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const ue=new r.ViewUserInputEvents(ce.coordinatesConverter);return ue.onKeyDown=ge=>this._onKeyDown.fire(ge),ue.onKeyUp=ge=>this._onKeyUp.fire(ge),ue.onContextMenu=ge=>this._onContextMenu.fire(ge),ue.onMouseMove=ge=>this._onMouseMove.fire(ge),ue.onMouseLeave=ge=>this._onMouseLeave.fire(ge),ue.onMouseDown=ge=>this._onMouseDown.fire(ge),ue.onMouseUp=ge=>this._onMouseUp.fire(ge),ue.onMouseDrag=ge=>this._onMouseDrag.fire(ge),ue.onMouseDrop=ge=>this._onMouseDrop.fire(ge),ue.onMouseDropCanceled=ge=>this._onMouseDropCanceled.fire(ge),ue.onMouseWheel=ge=>this._onMouseWheel.fire(ge),[new a.View(ae,this._configuration,this._themeService.getColorTheme(),ce,ue,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(ce){ce?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const ce=this._modelData.model,ae=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),ae&&this._domElement.contains(ae)&&this._domElement.removeChild(ae),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),ce}_registerDecorationType(ce,ae,ue,de){this._codeEditorService.registerDecorationType(ce,ae,ue,de,this)}_removeDecorationType(ce){this._codeEditorService.removeDecorationType(ce)}_resolveDecorationOptions(ce,ae){return this._codeEditorService.resolveDecorationOptions(ce,ae)}getTelemetryData(){return this._telemetryData}hasModel(){return this._modelData!==null}showDropIndicatorAt(ce){const ae=[{range:new u.Range(ce.lineNumber,ce.column,ce.lineNumber,ce.column),options:B.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(ae),this.revealPosition(ce,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(ce,ae){this._contextKeyService.createKey(ce,ae)}};e.CodeEditorWidget=U,e.CodeEditorWidget=U=B=fe([O(3,_.IInstantiationService),O(4,h.ICodeEditorService),O(5,C.ICommandService),O(6,I.IContextKeyService),O(7,L.IThemeService),O(8,k.INotificationService),O(9,R.IAccessibilityService),O(10,x.ILanguageConfigurationService),O(11,V.ILanguageFeaturesService)],U);var G;(function(ne){ne[ne.NotSet=0]="NotSet",ne[ne.False=1]="False",ne[ne.True=2]="True"})(G||(G={}));class $ extends f.Disposable{constructor(ce){super(),this._emitterOptions=ce,this._onDidChangeToTrue=this._register(new D.Emitter(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new D.Emitter(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(ce){const ae=ce?2:1;this._value!==ae&&(this._value=ae,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}e.BooleanEventEmitter=$;class ie extends D.Emitter{constructor(ce,ae){super({deliveryQueue:ae}),this._contributions=ce}fire(ce){this._contributions.onBeforeInteractionEvent(),super.fire(ce)}}class J extends f.Disposable{constructor(ce,ae){super(),this._editor=ce,ae.createKey("editorId",ce.getId()),this._editorSimpleInput=l.EditorContextKeys.editorSimpleInput.bindTo(ae),this._editorFocus=l.EditorContextKeys.focus.bindTo(ae),this._textInputFocus=l.EditorContextKeys.textInputFocus.bindTo(ae),this._editorTextFocus=l.EditorContextKeys.editorTextFocus.bindTo(ae),this._editorTabMovesFocus=l.EditorContextKeys.tabMovesFocus.bindTo(ae),this._editorReadonly=l.EditorContextKeys.readOnly.bindTo(ae),this._inDiffEditor=l.EditorContextKeys.inDiffEditor.bindTo(ae),this._editorColumnSelection=l.EditorContextKeys.columnSelection.bindTo(ae),this._hasMultipleSelections=l.EditorContextKeys.hasMultipleSelections.bindTo(ae),this._hasNonEmptySelection=l.EditorContextKeys.hasNonEmptySelection.bindTo(ae),this._canUndo=l.EditorContextKeys.canUndo.bindTo(ae),this._canRedo=l.EditorContextKeys.canRedo.bindTo(ae),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(z.TabFocus.onDidChangeTabFocus(()=>this._editorTabMovesFocus.set(z.TabFocus.getTabFocusMode("editorFocus")))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const ce=this._editor.getOptions();this._editorTabMovesFocus.set(z.TabFocus.getTabFocusMode("editorFocus")),this._editorReadonly.set(ce.get(89)),this._inDiffEditor.set(ce.get(60)),this._editorColumnSelection.set(ce.get(21))}_updateFromSelection(){const ce=this._editor.getSelections();ce?(this._hasMultipleSelections.set(ce.length>1),this._hasNonEmptySelection.set(ce.some(ae=>!ae.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 ce=this._editor.getModel();this._canUndo.set(!!(ce&&ce.canUndo())),this._canRedo.set(!!(ce&&ce.canRedo()))}}class j extends f.Disposable{constructor(ce,ae,ue){super(),this._editor=ce,this._contextKeyService=ae,this._languageFeaturesService=ue,this._langId=l.EditorContextKeys.languageId.bindTo(ae),this._hasCompletionItemProvider=l.EditorContextKeys.hasCompletionItemProvider.bindTo(ae),this._hasCodeActionsProvider=l.EditorContextKeys.hasCodeActionsProvider.bindTo(ae),this._hasCodeLensProvider=l.EditorContextKeys.hasCodeLensProvider.bindTo(ae),this._hasDefinitionProvider=l.EditorContextKeys.hasDefinitionProvider.bindTo(ae),this._hasDeclarationProvider=l.EditorContextKeys.hasDeclarationProvider.bindTo(ae),this._hasImplementationProvider=l.EditorContextKeys.hasImplementationProvider.bindTo(ae),this._hasTypeDefinitionProvider=l.EditorContextKeys.hasTypeDefinitionProvider.bindTo(ae),this._hasHoverProvider=l.EditorContextKeys.hasHoverProvider.bindTo(ae),this._hasDocumentHighlightProvider=l.EditorContextKeys.hasDocumentHighlightProvider.bindTo(ae),this._hasDocumentSymbolProvider=l.EditorContextKeys.hasDocumentSymbolProvider.bindTo(ae),this._hasReferenceProvider=l.EditorContextKeys.hasReferenceProvider.bindTo(ae),this._hasRenameProvider=l.EditorContextKeys.hasRenameProvider.bindTo(ae),this._hasSignatureHelpProvider=l.EditorContextKeys.hasSignatureHelpProvider.bindTo(ae),this._hasInlayHintsProvider=l.EditorContextKeys.hasInlayHintsProvider.bindTo(ae),this._hasDocumentFormattingProvider=l.EditorContextKeys.hasDocumentFormattingProvider.bindTo(ae),this._hasDocumentSelectionFormattingProvider=l.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(ae),this._hasMultipleDocumentFormattingProvider=l.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(ae),this._hasMultipleDocumentSelectionFormattingProvider=l.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(ae),this._isInWalkThrough=l.EditorContextKeys.isInWalkThroughSnippet.bindTo(ae);const de=()=>this._update();this._register(ce.onDidChangeModel(de)),this._register(ce.onDidChangeModelLanguage(de)),this._register(ue.completionProvider.onDidChange(de)),this._register(ue.codeActionProvider.onDidChange(de)),this._register(ue.codeLensProvider.onDidChange(de)),this._register(ue.definitionProvider.onDidChange(de)),this._register(ue.declarationProvider.onDidChange(de)),this._register(ue.implementationProvider.onDidChange(de)),this._register(ue.typeDefinitionProvider.onDidChange(de)),this._register(ue.hoverProvider.onDidChange(de)),this._register(ue.documentHighlightProvider.onDidChange(de)),this._register(ue.documentSymbolProvider.onDidChange(de)),this._register(ue.referenceProvider.onDidChange(de)),this._register(ue.renameProvider.onDidChange(de)),this._register(ue.documentFormattingEditProvider.onDidChange(de)),this._register(ue.documentRangeFormattingEditProvider.onDidChange(de)),this._register(ue.signatureHelpProvider.onDidChange(de)),this._register(ue.inlayHintsProvider.onDidChange(de)),de()}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 ce=this._editor.getModel();if(!ce){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(ce.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(ce)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(ce)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(ce)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(ce)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(ce)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(ce)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(ce)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(ce)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(ce)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(ce)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(ce)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(ce)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(ce)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(ce)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(ce)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(ce)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(ce)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(ce).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(ce).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(ce).length>1),this._isInWalkThrough.set(ce.uri.scheme===v.Schemas.walkThroughSnippet)})}}e.EditorModeContext=j;class ee extends f.Disposable{constructor(ce){super(),this._onChange=this._register(new D.Emitter),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(y.trackFocus(ce)),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?.()}}class X{get length(){return this._decorationIds.length}constructor(ce,ae){this._editor=ce,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(ae)&&ae.length>0&&this.set(ae)}onDidChange(ce,ae,ue){return this._editor.onDidChangeModelDecorations(de=>{this._isChangingDecorations||ce.call(ae,de)},ue)}getRange(ce){return!this._editor.hasModel()||ce>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[ce])}getRanges(){if(!this._editor.hasModel())return[];const ce=this._editor.getModel(),ae=[];for(const ue of this._decorationIds){const de=ce.getDecorationRange(ue);de&&ae.push(de)}return ae}has(ce){return this._decorationIds.includes(ce.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(ce){try{this._isChangingDecorations=!0,this._editor.changeDecorations(ae=>{this._decorationIds=ae.deltaDecorations(this._decorationIds,ce)})}finally{this._isChangingDecorations=!1}return this._decorationIds}}const te=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),Z=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function se(ne){return te+encodeURIComponent(ne.toString())+Z}const re=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),oe=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function le(ne){return re+encodeURIComponent(ne.toString())+oe}(0,L.registerThemingParticipant)((ne,ce)=>{const ae=ne.getColor(w.editorErrorForeground);ae&&ce.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${se(ae)}") repeat-x bottom left; }`);const ue=ne.getColor(w.editorWarningForeground);ue&&ce.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${se(ue)}") repeat-x bottom left; }`);const de=ne.getColor(w.editorInfoForeground);de&&ce.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${se(de)}") repeat-x bottom left; }`);const ge=ne.getColor(w.editorHintForeground);ge&&ce.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${le(ge)}") no-repeat bottom left; }`);const he=ne.getColor(g.editorUnnecessaryCodeOpacity);he&&ce.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${he.rgba.a}; }`)})}),define(Q[458],Y([1,0,7,140,364,484,229,214,14,31,32,15,6,110,4,37,258,658,48,79,390,190,1194,1202,2345,1185,133,51,27,370,393,73,98,491,405,303,806,2333,68,8,29,5,134,23,72,36,77,19,1717]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P,x,F,V,W,z,B,K,H,U,G,$,ie){"use strict";var J;Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget=e.diffEditorWidgetTtPolicy=void 0;class j{constructor(Ce,_e){this._contextMenuService=Ce,this._clipboardService=_e,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(Ce){return Ce.filter(_e=>!this._zonesMap[String(_e.id)])}clean(Ce){this._zones.length>0&&Ce.changeViewZones(_e=>{for(const me of this._zones)_e.removeZone(me)}),this._zones=[],this._zonesMap={},Ce.changeDecorations(_e=>{this._decorations=_e.deltaDecorations(this._decorations,[])})}apply(Ce,_e,me,ke){const Ee=ke?c.StableEditorScrollState.capture(Ce):null;Ce.changeViewZones(pe=>{for(const Te of this._zones)pe.removeZone(Te);for(const Te of this._inlineDiffMargins)Te.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let Te=0,Ne=me.zones.length;Te<Ne;Te++){const xe=me.zones[Te];xe.suppressMouseDown=!0,xe.showInHiddenAreas=!0;const Ve=pe.addZone(xe);this._zones.push(Ve),this._zonesMap[String(Ve)]=!0,me.zones[Te].diff&&xe.marginDomNode&&(xe.suppressMouseDown=!1,me.zones[Te].diff?.originalModel.getValueLength()!==0&&this._inlineDiffMargins.push(new w.InlineDiffMargin(Ve,xe.marginDomNode,Ce,me.zones[Te].diff,this._contextMenuService,this._clipboardService)))}}),Ee?.restore(Ce),Ce.changeDecorations(pe=>{this._decorations=pe.deltaDecorations(this._decorations,me.decorations)}),_e?.setZones(me.overviewZones)}}let ee=0;const X=(0,$.registerIcon)("diff-insert",S.Codicon.add,F.localize(0,null)),te=(0,$.registerIcon)("diff-remove",S.Codicon.remove,F.localize(1,null));e.diffEditorWidgetTtPolicy=(0,b.createTrustedTypesPolicy)("diffEditorWidget",{createHTML:De=>De});const Z=F.localize(2,null);let se=class extends i.Disposable{static{J=this}static{this.ONE_OVERVIEW_WIDTH=15}static{this.ENTIRE_DIFF_OVERVIEW_WIDTH=30}static{this.UPDATE_DIFF_DECORATIONS_DELAY=200}constructor(Ce,_e,me,ke,Ee,pe,Te,Ne,xe,Ve,Fe){super(),this._editorProgressService=Fe,this._onDidDispose=this._register(new a.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModel=this._register(new a.Emitter),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidUpdateDiff=this._register(new a.Emitter),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new a.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._lastOriginalWarning=null,this._lastModifiedWarning=null,Te.willCreateDiffEditor(),this._documentDiffProvider=this._register(pe.createInstance(E.WorkerBasedDocumentDiffProvider,_e)),this._register(this._documentDiffProvider.onDidChange(He=>this._beginUpdateDecorationsSoon())),this._codeEditorService=Te,this._contextKeyService=this._register(Ee.createScoped(Ce)),this._instantiationService=pe.createChild(new K.ServiceCollection([W.IContextKeyService,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=Ne,this._notificationService=xe,this._id=++ee,this._state=0,this._updatingDiffProgress=null,this._domElement=Ce,_e=_e||{},this._options=Me(_e,{enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showEmptyDecorations:!1,showMoves:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:0,minimumLineCount:0,revealLineCount:0},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:0,useInlineViewWhenSpaceIsLimited:!1,reverse:!1}),this.isEmbeddedDiffEditorKey=L.EditorContextKeys.isEmbeddedDiffEditor.bindTo(this._contextKeyService),this.isEmbeddedDiffEditorKey.set(typeof _e.isInEmbeddedEditor<"u"?_e.isInEmbeddedEditor:!1),this._updateDecorationsRunner=this._register(new v.RunOnceScheduler(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=J._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=(0,y.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(t.addStandardDisposableListener(this._overviewDomElement,t.EventType.POINTER_DOWN,He=>{this._modifiedEditor.delegateVerticalScrollbarPointerDown(He)})),this._register(t.addDisposableListener(this._overviewDomElement,t.EventType.MOUSE_WHEEL,He=>{this._modifiedEditor.delegateScrollFromMouseWheelEvent(He)},{passive:!1})),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new j(Ve,ke),this._modifiedEditorState=new j(Ve,ke),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new u.ElementSizeObserver(this._containerDomElement,_e.dimension)),this._register(this._elementSizeObserver.onDidChange(()=>this._onDidContainerSizeChanged())),_e.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(_e,me.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(_e,me.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=pe.createInstance(g.DiffReview,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new ge(this._createDataSource(),this._options.enableSplitViewResizing,this._options.splitViewDefaultRatio)):this._setStrategy(new be(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(Ne.onDidColorThemeChange(He=>{this._strategy&&this._strategy.applyColors(He)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=J._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const Be=d.EditorExtensionsRegistry.getDiffEditorContributions();for(const He of Be)try{this._register(pe.createInstance(He.ctor,this))}catch(et){(0,h.onUnexpectedError)(et)}this._codeEditorService.addDiffEditor(this)}get ignoreTrimWhitespace(){return this._options.ignoreTrimWhitespace}get maxComputationTime(){return this._options.maxComputationTime}get renderSideBySide(){return this._options.renderSideBySide}getContentHeight(){return this._modifiedEditor.getContentHeight()}getViewWidth(){return this._elementSizeObserver.getWidth()}setBoundarySashes(Ce){this._boundarySashes=Ce,this._strategy.setBoundarySashes(Ce)}_setState(Ce){this._state!==Ce&&(this._state=Ce,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),this._state===1&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}hasWidgetFocus(){return t.isAncestor(document.activeElement,this._domElement)}accessibleDiffViewerNext(){this._reviewPane.next()}accessibleDiffViewerPrev(){this._reviewPane.prev()}static _getClassName(Ce,_e){let me="monaco-diff-editor monaco-editor-background ";return _e&&(me+="side-by-side "),me+=(0,ie.getThemeTypeSelector)(Ce.type),me}_disposeOverviewRulers(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose(),this._originalOverviewRuler=null),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose(),this._modifiedOverviewRuler=null)}_createOverviewRulers(){this._options.renderOverviewRuler&&(f.ok(!this._originalOverviewRuler&&!this._modifiedOverviewRuler),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(Ce,_e){const me=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(Ce),_e);this._register(me.onDidScrollChange(Ee=>{this._isHandlingScrollEvent||!Ee.scrollTopChanged&&!Ee.scrollLeftChanged&&!Ee.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:Ee.scrollLeft,scrollTop:Ee.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(me.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(me.onDidChangeConfiguration(Ee=>{me.getModel()&&(Ee.hasChanged(49)&&this._updateDecorationsRunner.schedule(),Ee.hasChanged(143)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(me.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(me.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const ke=this._contextKeyService.createKey("isInDiffLeftEditor",me.hasWidgetFocus());return this._register(me.onDidFocusEditorWidget(()=>ke.set(!0))),this._register(me.onDidBlurEditorWidget(()=>ke.set(!1))),this._register(me.onDidContentSizeChange(Ee=>{const pe=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+J.ONE_OVERVIEW_WIDTH,Te=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:Te,contentWidth:pe,contentHeightChanged:Ee.contentHeightChanged,contentWidthChanged:Ee.contentWidthChanged})})),me}_createRightHandSideEditor(Ce,_e){const me=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(Ce),_e);this._register(me.onDidScrollChange(Ee=>{this._isHandlingScrollEvent||!Ee.scrollTopChanged&&!Ee.scrollLeftChanged&&!Ee.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:Ee.scrollLeft,scrollTop:Ee.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(me.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(me.onDidChangeConfiguration(Ee=>{me.getModel()&&(Ee.hasChanged(49)&&this._updateDecorationsRunner.schedule(),Ee.hasChanged(143)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(me.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(me.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(me.onDidChangeModelOptions(Ee=>{Ee.tabSize&&this._updateDecorationsRunner.schedule()}));const ke=this._contextKeyService.createKey("isInDiffRightEditor",me.hasWidgetFocus());return this._register(me.onDidFocusEditorWidget(()=>ke.set(!0))),this._register(me.onDidBlurEditorWidget(()=>ke.set(!1))),this._register(me.onDidContentSizeChange(Ee=>{const pe=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+J.ONE_OVERVIEW_WIDTH,Te=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:Te,contentWidth:pe,contentHeightChanged:Ee.contentHeightChanged,contentWidthChanged:Ee.contentWidthChanged})})),this._register(me.onMouseDown(Ee=>{if(!Ee.event.rightButton&&Ee.target.position&&Ee.target.element?.className.includes("arrow-revert-change")){const pe=Ee.target.position.lineNumber,Te=Ee.target,Ne=this._diffComputationResult?.changes.find(xe=>Te?.detail.afterLineNumber===xe.modifiedStartLineNumber||xe.modifiedEndLineNumber>0&&xe.modifiedStartLineNumber===pe);Ne&&this.revertChange(Ne),Ee.event.stopPropagation(),this._updateDecorations();return}})),me}revertChange(Ce){const _e=this._modifiedEditor,me=this._originalEditor.getModel(),ke=this._modifiedEditor.getModel();if(!me||!ke||!_e)return;const Ee=Ce.originalEndLineNumber>0?new _.Range(Ce.originalStartLineNumber,1,Ce.originalEndLineNumber,me.getLineMaxColumn(Ce.originalEndLineNumber)):null,pe=Ee?me.getValueInRange(Ee):null,Te=Ce.modifiedEndLineNumber>0?new _.Range(Ce.modifiedStartLineNumber,1,Ce.modifiedEndLineNumber,ke.getLineMaxColumn(Ce.modifiedEndLineNumber)):null,Ne=ke.getEOL();if(Ce.originalEndLineNumber===0&&Te){let xe=Te;Ce.modifiedStartLineNumber>1?xe=Te.setStartPosition(Ce.modifiedStartLineNumber-1,ke.getLineMaxColumn(Ce.modifiedStartLineNumber-1)):Ce.modifiedEndLineNumber<ke.getLineCount()&&(xe=Te.setEndPosition(Ce.modifiedEndLineNumber+1,1)),_e.executeEdits("diffEditor",[{range:xe,text:""}])}else if(Ce.modifiedEndLineNumber===0&&pe!==null){const xe=Ce.modifiedStartLineNumber<ke.getLineCount()?new I.Position(Ce.modifiedStartLineNumber+1,1):new I.Position(Ce.modifiedStartLineNumber,ke.getLineMaxColumn(Ce.modifiedStartLineNumber));_e.executeEdits("diffEditor",[{range:_.Range.fromPositions(xe,xe),text:Ce.modifiedStartLineNumber<ke.getLineCount()?pe+Ne:Ne+pe}])}else Te&&pe!==null&&_e.executeEdits("diffEditor",[{range:Te,text:pe}])}_createInnerEditor(Ce,_e,me,ke){return Ce.createInstance(l.CodeEditorWidget,_e,me,ke)}dispose(){this._codeEditorService.removeDiffEditor(this),this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return k.EditorType.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getDiffComputationResult(){return this._diffComputationResult}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(Ce){const _e=Me(Ce,this._options),me=Oe(this._options,_e);this._options=_e,this.isEmbeddedDiffEditorKey.set(typeof Ce.isInEmbeddedEditor<"u"?Ce.isInEmbeddedEditor:!1);const ke=me.ignoreTrimWhitespace||me.renderIndicators||me.renderMarginRevertIcon,Ee=this._isVisible&&(me.maxComputationTime||me.maxFileSize);this._documentDiffProvider.setOptions(_e),ke?this._beginUpdateDecorations():Ee&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(Ce)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(Ce)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing,this._options.splitViewDefaultRatio),me.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new ge(this._createDataSource(),this._options.enableSplitViewResizing,this._options.splitViewDefaultRatio)):this._setStrategy(new be(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=J._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),me.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}createViewModel(Ce){return{model:Ce,async waitForDiff(){}}}setModel(Ce){if(Ce&&"model"in Ce&&(Ce=Ce.model),Ce&&(!Ce.original||!Ce.modified))throw new Error(Ce.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._disposeOverviewRulers(),this._originalEditor.setModel(Ce?Ce.original:null),this._modifiedEditor.setModel(Ce?Ce.modified:null),this._updateDecorationsRunner.cancel(),Ce&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),Ce&&(this._createOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport(),this._onDidChangeModel.fire(),this._diffNavigator=this._register(this._instantiationService.createInstance(n.DiffNavigator,this,{alwaysRevealFirst:!1,findResultLoop:this.getModifiedEditor().getOption(40).loop}))}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(Ce){return this._modifiedEditor.getVisibleColumnFromPosition(Ce)}getStatusbarColumn(Ce){return this._modifiedEditor.getStatusbarColumn(Ce)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(Ce,_e="api"){this._modifiedEditor.setPosition(Ce,_e)}revealLine(Ce,_e=0){this._modifiedEditor.revealLine(Ce,_e)}revealLineInCenter(Ce,_e=0){this._modifiedEditor.revealLineInCenter(Ce,_e)}revealLineInCenterIfOutsideViewport(Ce,_e=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(Ce,_e)}revealLineNearTop(Ce,_e=0){this._modifiedEditor.revealLineNearTop(Ce,_e)}revealPosition(Ce,_e=0){this._modifiedEditor.revealPosition(Ce,_e)}revealPositionInCenter(Ce,_e=0){this._modifiedEditor.revealPositionInCenter(Ce,_e)}revealPositionInCenterIfOutsideViewport(Ce,_e=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(Ce,_e)}revealPositionNearTop(Ce,_e=0){this._modifiedEditor.revealPositionNearTop(Ce,_e)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(Ce,_e="api"){this._modifiedEditor.setSelection(Ce,_e)}setSelections(Ce,_e="api"){this._modifiedEditor.setSelections(Ce,_e)}revealLines(Ce,_e,me=0){this._modifiedEditor.revealLines(Ce,_e,me)}revealLinesInCenter(Ce,_e,me=0){this._modifiedEditor.revealLinesInCenter(Ce,_e,me)}revealLinesInCenterIfOutsideViewport(Ce,_e,me=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(Ce,_e,me)}revealLinesNearTop(Ce,_e,me=0){this._modifiedEditor.revealLinesNearTop(Ce,_e,me)}revealRange(Ce,_e=0,me=!1,ke=!0){this._modifiedEditor.revealRange(Ce,_e,me,ke)}revealRangeInCenter(Ce,_e=0){this._modifiedEditor.revealRangeInCenter(Ce,_e)}revealRangeInCenterIfOutsideViewport(Ce,_e=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(Ce,_e)}revealRangeNearTop(Ce,_e=0){this._modifiedEditor.revealRangeNearTop(Ce,_e)}revealRangeNearTopIfOutsideViewport(Ce,_e=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(Ce,_e)}revealRangeAtTop(Ce,_e=0){this._modifiedEditor.revealRangeAtTop(Ce,_e)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}focus(){this._modifiedEditor.focus()}trigger(Ce,_e,me){this._modifiedEditor.trigger(Ce,_e,me)}createDecorationsCollection(Ce){return this._modifiedEditor.createDecorationsCollection(Ce)}changeDecorations(Ce){return this._modifiedEditor.changeDecorations(Ce)}saveViewState(){const Ce=this._originalEditor.saveViewState(),_e=this._modifiedEditor.saveViewState();return{original:Ce,modified:_e}}restoreViewState(Ce){if(Ce&&Ce.original&&Ce.modified){const _e=Ce;this._originalEditor.restoreViewState(_e.original),this._modifiedEditor.restoreViewState(_e.modified)}}layout(Ce){this._elementSizeObserver.observe(Ce)}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()}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler||!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const Ce=this._elementSizeObserver.getHeight(),_e=this._getReviewHeight(),me=J.ENTIRE_DIFF_OVERVIEW_WIDTH-2*J.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:J.ONE_OVERVIEW_WIDTH,right:me+J.ONE_OVERVIEW_WIDTH,height:Ce-_e}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:J.ONE_OVERVIEW_WIDTH,height:Ce-_e}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),J.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(Ce,_e){return!Ce&&!_e?!0:!Ce||!_e?!1:Ce.toString()===_e.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1);const Ce=this._originalEditor.getModel(),_e=this._modifiedEditor.getModel();if(!Ce||!_e)return;this._diffComputationToken++;const me=this._diffComputationToken,ke=this._options.maxFileSize*1024*1024,Ee=pe=>{const Te=pe.getValueLength();return ke===0||Te<=ke};if(!Ee(Ce)||!Ee(_e)){(!J._equals(Ce.uri,this._lastOriginalWarning)||!J._equals(_e.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=Ce.uri,this._lastModifiedWarning=_e.uri,this._notificationService.warn(F.localize(3,null)));return}this._setState(1),this._documentDiffProvider.computeDiff(Ce,_e,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace,maxComputationTimeMs:this._options.maxComputationTime,computeMoves:!1},m.CancellationToken.None).then(pe=>{me===this._diffComputationToken&&Ce===this._originalEditor.getModel()&&_e===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult={identical:pe.identical,quitEarly:pe.quitEarly,changes2:pe.changes,changes:pe.changes.map(Te=>{let Ne,xe,Ve,Fe,Be=Te.innerChanges;return Te.originalRange.isEmpty?(Ne=Te.originalRange.startLineNumber-1,xe=0,Be=void 0):(Ne=Te.originalRange.startLineNumber,xe=Te.originalRange.endLineNumberExclusive-1),Te.modifiedRange.isEmpty?(Ve=Te.modifiedRange.startLineNumber-1,Fe=0,Be=void 0):(Ve=Te.modifiedRange.startLineNumber,Fe=Te.modifiedRange.endLineNumberExclusive-1),{originalStartLineNumber:Ne,originalEndLineNumber:xe,modifiedStartLineNumber:Ve,modifiedEndLineNumber:Fe,charChanges:Be?.map(He=>({originalStartLineNumber:He.originalRange.startLineNumber,originalStartColumn:He.originalRange.startColumn,originalEndLineNumber:He.originalRange.endLineNumber,originalEndColumn:He.originalRange.endColumn,modifiedStartLineNumber:He.modifiedRange.startLineNumber,modifiedStartColumn:He.modifiedRange.startColumn,modifiedEndLineNumber:He.modifiedRange.endLineNumber,modifiedEndColumn:He.modifiedRange.endColumn}))}})},this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},pe=>{me===this._diffComputationToken&&Ce===this._originalEditor.getModel()&&_e===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const Ce=this._diffComputationResult?this._diffComputationResult.changes:[],_e=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),me=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),ke=this._options.renderMarginRevertIcon&&!this._modifiedEditor.getOption(89),Ee=this._strategy.getEditorsDiffDecorations(Ce,this._options.ignoreTrimWhitespace,this._options.renderIndicators,ke,_e,me,this._options.reverse);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,Ee.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,Ee.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(Ce){const _e={...Ce};return _e.inDiffEditor=!0,_e.automaticLayout=!1,_e.scrollbar={..._e.scrollbar||{}},_e.scrollbar.vertical="visible",_e.folding=!1,_e.codeLens=this._options.diffCodeLens,_e.fixedOverflowWidgets=!0,_e.minimap={..._e.minimap||{}},_e.minimap.enabled=!1,_e}_adjustOptionsForLeftHandSide(Ce){const _e=this._adjustOptionsForSubEditor(Ce);return this._options.renderSideBySide?_e.wordWrapOverride1=this._options.diffWordWrap:(_e.wordWrapOverride1="off",_e.wordWrapOverride2="off",_e.stickyScroll={enabled:!1}),Ce.originalAriaLabel&&(_e.ariaLabel=Ce.originalAriaLabel),this._updateAriaLabel(_e),_e.readOnly=!this._options.originalEditable,_e.dropIntoEditor={enabled:!_e.readOnly},_e.extraEditorClassName="original-in-monaco-diff-editor",{..._e,dimension:{height:0,width:0}}}_updateAriaLabel(Ce){let _e=Ce.ariaLabel??"";this._options.accessibilityVerbose?_e+=Z:_e&&(_e=_e.replaceAll(Z,"")),Ce.ariaLabel=_e}_adjustOptionsForRightHandSide(Ce){const _e=this._adjustOptionsForSubEditor(Ce);return Ce.modifiedAriaLabel&&(_e.ariaLabel=Ce.modifiedAriaLabel),this._updateAriaLabel(_e),_e.wordWrapOverride1=this._options.diffWordWrap,_e.revealHorizontalRightPadding=C.EditorOptions.revealHorizontalRightPadding.defaultValue+J.ENTIRE_DIFF_OVERVIEW_WIDTH,_e.scrollbar.verticalHasArrows=!1,_e.extraEditorClassName="modified-in-monaco-diff-editor",{..._e,dimension:{height:0,width:0}}}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const Ce=this._elementSizeObserver.getWidth(),_e=this._elementSizeObserver.getHeight(),me=this._getReviewHeight(),ke=this._strategy.layout();this._originalDomNode.style.width=ke+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=Ce-ke-J.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._modifiedDomNode.style.left=ke+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=_e-me+"px",this._overviewDomElement.style.width=J.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=Ce-J.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(J.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:ke,height:_e-me}),this._modifiedEditor.layout({width:Ce-ke-(this._options.renderOverviewRuler?J.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:_e-me}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(_e-me,Ce,me),this._layoutOverviewViewport()}_layoutOverviewViewport(){const Ce=this._computeOverviewViewport();Ce?(this._overviewViewportDomElement.setTop(Ce.top),this._overviewViewportDomElement.setHeight(Ce.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const Ce=this._modifiedEditor.getLayoutInfo();if(!Ce)return null;const _e=this._modifiedEditor.getScrollTop(),me=this._modifiedEditor.getScrollHeight(),ke=Math.max(0,Ce.height),Ee=Math.max(0,ke-2*0),pe=me>0?Ee/me:0,Te=Math.max(0,Math.floor(Ce.height*pe)),Ne=Math.floor(_e*pe);return{height:Te,top:Ne}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(Ce){this._strategy?.dispose(),this._strategy=Ce,this._boundarySashes&&Ce.setBoundarySashes(this._boundarySashes),Ce.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}goToDiff(Ce){Ce==="next"?this._diffNavigator?.next():this._diffNavigator?.previous()}revealFirstDiff(){this._diffNavigator&&(this._diffNavigator.revealFirst=!0)}};e.DiffEditorWidget=se,e.DiffEditorWidget=se=J=fe([O(3,V.IClipboardService),O(4,W.IContextKeyService),O(5,B.IInstantiationService),O(6,p.ICodeEditorService),O(7,ie.IThemeService),O(8,H.INotificationService),O(9,z.IContextMenuService),O(10,U.IEditorProgressService)],se);class re extends i.Disposable{constructor(Ce){super(),this._dataSource=Ce,this._insertColor=null,this._removeColor=null}applyColors(Ce){const _e=Ce.getColor(G.diffOverviewRulerInserted)||(Ce.getColor(G.diffInserted)||G.defaultInsertColor).transparent(2),me=Ce.getColor(G.diffOverviewRulerRemoved)||(Ce.getColor(G.diffRemoved)||G.defaultRemoveColor).transparent(2),ke=!_e.equals(this._insertColor)||!me.equals(this._removeColor);return this._insertColor=_e,this._removeColor=me,ke}getEditorsDiffDecorations(Ce,_e,me,ke,Ee,pe,Te){pe=pe.sort((Fe,Be)=>Fe.afterLineNumber-Be.afterLineNumber),Ee=Ee.sort((Fe,Be)=>Fe.afterLineNumber-Be.afterLineNumber);const Ne=this._getViewZones(Ce,Ee,pe,me);let xe=this._getOriginalEditorDecorations(Ne,Ce,_e,me);const Ve=this._getModifiedEditorDecorations(Ne,Ce,_e,me,ke);return Te&&(ue(xe.decorations),ue(Ve.decorations),xe.overviewZones=de(xe.overviewZones,String(this._insertColor)),Ve.overviewZones=de(Ve.overviewZones,String(this._removeColor))),{original:{decorations:xe.decorations,overviewZones:xe.overviewZones,zones:Ne.original},modified:{decorations:Ve.decorations,overviewZones:Ve.overviewZones,zones:Ne.modified}}}setBoundarySashes(Ce){}}class oe{constructor(Ce){this._source=Ce,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class le{constructor(Ce,_e,me,ke,Ee){this._lineChanges=Ce,this._originalForeignVZ=_e,this._modifiedForeignVZ=me,this._originalEditor=ke,this._modifiedEditor=Ee}static _getViewLineCount(Ce,_e,me){const ke=Ce.getModel(),Ee=Ce._getViewModel();if(ke&&Ee){const pe=Ae(ke,Ee,_e,me);return pe.endLineNumber-pe.startLineNumber+1}return me-_e+1}getViewZones(){const Ce=this._originalEditor.getOption(65),_e=this._modifiedEditor.getOption(65),me=this._originalEditor.getOption(143).wrappingColumn!==-1,ke=this._modifiedEditor.getOption(143).wrappingColumn!==-1,Ee=me||ke,pe=this._originalEditor.getModel(),Te=this._originalEditor._getViewModel().coordinatesConverter,Ne=this._modifiedEditor._getViewModel().coordinatesConverter,xe={original:[],modified:[]};let Ve=0,Fe=0,Be=0,He=0,et=0,Je=0;const st=(Xe,nt)=>Xe.afterLineNumber-nt.afterLineNumber,ze=(Xe,nt)=>{if(nt.domNode===null&&Xe.length>0){const ft=Xe[Xe.length-1];if(ft.afterLineNumber===nt.afterLineNumber&&ft.domNode===null){ft.heightInLines+=nt.heightInLines;return}}Xe.push(nt)},je=new oe(this._modifiedForeignVZ),Ge=new oe(this._originalForeignVZ);let Ze=1,tt=1;for(let Xe=0,nt=this._lineChanges.length;Xe<=nt;Xe++){const ft=Xe<nt?this._lineChanges[Xe]:null;ft!==null?(Be=ft.originalStartLineNumber+(ft.originalEndLineNumber>0?-1:0),He=ft.modifiedStartLineNumber+(ft.modifiedEndLineNumber>0?-1:0),Fe=ft.originalEndLineNumber>0?le._getViewLineCount(this._originalEditor,ft.originalStartLineNumber,ft.originalEndLineNumber):0,Ve=ft.modifiedEndLineNumber>0?le._getViewLineCount(this._modifiedEditor,ft.modifiedStartLineNumber,ft.modifiedEndLineNumber):0,et=Math.max(ft.originalStartLineNumber,ft.originalEndLineNumber),Je=Math.max(ft.modifiedStartLineNumber,ft.modifiedEndLineNumber)):(Be+=1e7+Fe,He+=1e7+Ve,et=Be,Je=He);let Et=[],It=[];if(Ee){let kt;ft?ft.originalEndLineNumber>0?kt=ft.originalStartLineNumber-Ze:kt=ft.modifiedStartLineNumber-tt:kt=pe.getLineCount()-Ze+1;for(let xt=0;xt<kt;xt++){const Mt=Ze+xt,Ht=tt+xt,Yt=Te.getModelLineViewLineCount(Mt),jt=Ne.getModelLineViewLineCount(Ht);Yt<jt?Et.push({afterLineNumber:Mt,heightInLines:jt-Yt,domNode:null,marginDomNode:null}):Yt>jt&&It.push({afterLineNumber:Ht,heightInLines:Yt-jt,domNode:null,marginDomNode:null})}ft&&(Ze=(ft.originalEndLineNumber>0?ft.originalEndLineNumber:ft.originalStartLineNumber)+1,tt=(ft.modifiedEndLineNumber>0?ft.modifiedEndLineNumber:ft.modifiedStartLineNumber)+1)}for(;je.current&&je.current.afterLineNumber<=Je;){let kt;je.current.afterLineNumber<=He?kt=Be-He+je.current.afterLineNumber:kt=et;let xt=null;ft&&ft.modifiedStartLineNumber<=je.current.afterLineNumber&&je.current.afterLineNumber<=ft.modifiedEndLineNumber&&(xt=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),Et.push({afterLineNumber:kt,heightInLines:je.current.height/_e,domNode:null,marginDomNode:xt}),je.advance()}for(;Ge.current&&Ge.current.afterLineNumber<=et;){let kt;Ge.current.afterLineNumber<=Be?kt=He-Be+Ge.current.afterLineNumber:kt=Je,It.push({afterLineNumber:kt,heightInLines:Ge.current.height/Ce,domNode:null}),Ge.advance()}if(ft!==null&&Se(ft)){const kt=this._produceOriginalFromDiff(ft,Fe,Ve);kt&&Et.push(kt)}if(ft!==null&&we(ft)){const kt=this._produceModifiedFromDiff(ft,Fe,Ve);kt&&It.push(kt)}let Nt=0,Ot=0;for(Et=Et.sort(st),It=It.sort(st);Nt<Et.length&&Ot<It.length;){const kt=Et[Nt],xt=It[Ot],Mt=kt.afterLineNumber-Be,Ht=xt.afterLineNumber-He;Mt<Ht?(ze(xe.original,kt),Nt++):Ht<Mt?(ze(xe.modified,xt),Ot++):kt.shouldNotShrink?(ze(xe.original,kt),Nt++):xt.shouldNotShrink?(ze(xe.modified,xt),Ot++):kt.heightInLines>=xt.heightInLines?(kt.heightInLines-=xt.heightInLines,Ot++):(xt.heightInLines-=kt.heightInLines,Nt++)}for(;Nt<Et.length;)ze(xe.original,Et[Nt]),Nt++;for(;Ot<It.length;)ze(xe.modified,It[Ot]),Ot++}return{original:le._ensureDomNodes(xe.original),modified:le._ensureDomNodes(xe.modified)}}static _ensureDomNodes(Ce){return Ce.map(_e=>(_e.domNode||(_e.domNode=Le()),_e))}}function ne(De,Ce,_e,me,ke){return{range:new _.Range(De,Ce,_e,me),options:ke}}var ce;(function(De){De.Insert="line-insert",De.Delete="line-delete"})(ce||(ce={}));const ae={arrowRevertChange:R.ModelDecorationOptions.register({description:"diff-editor-arrow-revert-change",glyphMarginHoverMessage:new r.MarkdownString(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(F.localize(4,null)),glyphMarginClassName:"arrow-revert-change "+s.ThemeIcon.asClassName(S.Codicon.arrowRight),zIndex:10001}),charDelete:R.ModelDecorationOptions.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:R.ModelDecorationOptions.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:R.ModelDecorationOptions.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:R.ModelDecorationOptions.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:R.ModelDecorationOptions.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:R.ModelDecorationOptions.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+s.ThemeIcon.asClassName(X),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:R.ModelDecorationOptions.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:R.ModelDecorationOptions.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+s.ThemeIcon.asClassName(te),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:R.ModelDecorationOptions.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};function ue(De){for(let Ce of De)switch(Ce.options.description){case"diff-editor-char-delete":{Ce.options=ae.charInsert;break}case"diff-editor-char-delete-whole-line":{Ce.options=ae.charInsertWholeLine;break}case"diff-editor-char-insert":{Ce.options=ae.charDelete;break}case"diff-editor-char-insert-whole-line":{Ce.options=ae.charDeleteWholeLine;break}case"diff-editor-line-insert":{Ce.options=ae.lineDelete;break}case"diff-editor-line-insert-with-sign":{Ce.options=ae.lineDeleteWithSign;break}case"diff-editor-line-delete":{Ce.options=ae.lineInsert;break}case"diff-editor-line-delete-with-sign":{Ce.options=ae.lineInsertWithSign;break}}}function de(De,Ce){let _e=[];for(const me of De)_e.push(new x.OverviewRulerZone(me.startLineNumber,me.endLineNumber,me.heightInLines,Ce));return _e}class ge extends re{static{this.MINIMUM_EDITOR_WIDTH=100}constructor(Ce,_e,me){super(Ce),this._disableSash=_e===!1,this._defaultRatio=me,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new T.Sash(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(ke=>this._onSashDrag(ke)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(Ce,_e){this._defaultRatio=_e;const me=Ce===!1;this._disableSash!==me&&(this._disableSash=me,this._sash.state=this._disableSash?0:3)}layout(Ce=this._sashRatio||this._defaultRatio){const me=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?se.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let ke=Math.floor((Ce||this._defaultRatio)*me);const Ee=Math.floor(this._defaultRatio*me);return ke=this._disableSash?Ee:ke||Ee,me>ge.MINIMUM_EDITOR_WIDTH*2?(ke<ge.MINIMUM_EDITOR_WIDTH&&(ke=ge.MINIMUM_EDITOR_WIDTH),ke>me-ge.MINIMUM_EDITOR_WIDTH&&(ke=me-ge.MINIMUM_EDITOR_WIDTH)):ke=Ee,this._sashPosition!==ke&&(this._sashPosition=ke),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(Ce){const me=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?se.ENTIRE_DIFF_OVERVIEW_WIDTH:0),ke=this.layout((this._startSashPosition+(Ce.currentX-Ce.startX))/me);this._sashRatio=ke/me,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=this._defaultRatio,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(Ce){return 0}getVerticalSashLeft(Ce){return this._sashPosition}getVerticalSashHeight(Ce){return this._dataSource.getHeight()}setBoundarySashes(Ce){this._sash.orthogonalEndSash=Ce.bottom}_getViewZones(Ce,_e,me){const ke=this._dataSource.getOriginalEditor(),Ee=this._dataSource.getModifiedEditor();return new he(Ce,_e,me,ke,Ee).getViewZones()}_getOriginalEditorDecorations(Ce,_e,me,ke){const Ee=this._dataSource.getOriginalEditor(),pe=String(this._removeColor),Te={decorations:[],overviewZones:[]},Ne=Ee.getModel(),xe=Ee._getViewModel();for(const Ve of _e)if(we(Ve)){Te.decorations.push({range:new _.Range(Ve.originalStartLineNumber,1,Ve.originalEndLineNumber,1073741824),options:ke?ae.lineDeleteWithSign:ae.lineDelete}),(!Se(Ve)||!Ve.charChanges)&&Te.decorations.push(ne(Ve.originalStartLineNumber,1,Ve.originalEndLineNumber,1073741824,ae.charDeleteWholeLine));const Fe=Ae(Ne,xe,Ve.originalStartLineNumber,Ve.originalEndLineNumber);if(Te.overviewZones.push(new x.OverviewRulerZone(Fe.startLineNumber,Fe.endLineNumber,0,pe)),Ve.charChanges){for(const Be of Ve.charChanges)if(Re(Be))if(me)for(let He=Be.originalStartLineNumber;He<=Be.originalEndLineNumber;He++){let et,Je;He===Be.originalStartLineNumber?et=Be.originalStartColumn:et=Ne.getLineFirstNonWhitespaceColumn(He),He===Be.originalEndLineNumber?Je=Be.originalEndColumn:Je=Ne.getLineLastNonWhitespaceColumn(He),Te.decorations.push(ne(He,et,He,Je,ae.charDelete))}else Te.decorations.push(ne(Be.originalStartLineNumber,Be.originalStartColumn,Be.originalEndLineNumber,Be.originalEndColumn,ae.charDelete))}}return Te}_getModifiedEditorDecorations(Ce,_e,me,ke,Ee){const pe=this._dataSource.getModifiedEditor(),Te=String(this._insertColor),Ne={decorations:[],overviewZones:[]},xe=pe.getModel(),Ve=pe._getViewModel();for(const Fe of _e){if(Ee)if(Fe.modifiedEndLineNumber>0)Ne.decorations.push({range:new _.Range(Fe.modifiedStartLineNumber,1,Fe.modifiedStartLineNumber,1),options:ae.arrowRevertChange});else{const Be=Ce.modified.find(He=>He.afterLineNumber===Fe.modifiedStartLineNumber);Be&&(Be.marginDomNode=Pe())}if(Se(Fe)){Ne.decorations.push({range:new _.Range(Fe.modifiedStartLineNumber,1,Fe.modifiedEndLineNumber,1073741824),options:ke?ae.lineInsertWithSign:ae.lineInsert}),(!we(Fe)||!Fe.charChanges)&&Ne.decorations.push(ne(Fe.modifiedStartLineNumber,1,Fe.modifiedEndLineNumber,1073741824,ae.charInsertWholeLine));const Be=Ae(xe,Ve,Fe.modifiedStartLineNumber,Fe.modifiedEndLineNumber);if(Ne.overviewZones.push(new x.OverviewRulerZone(Be.startLineNumber,Be.endLineNumber,0,Te)),Fe.charChanges){for(const He of Fe.charChanges)if(ye(He))if(me)for(let et=He.modifiedStartLineNumber;et<=He.modifiedEndLineNumber;et++){let Je,st;et===He.modifiedStartLineNumber?Je=He.modifiedStartColumn:Je=xe.getLineFirstNonWhitespaceColumn(et),et===He.modifiedEndLineNumber?st=He.modifiedEndColumn:st=xe.getLineLastNonWhitespaceColumn(et),Ne.decorations.push(ne(et,Je,et,st,ae.charInsert))}else Ne.decorations.push(ne(He.modifiedStartLineNumber,He.modifiedStartColumn,He.modifiedEndLineNumber,He.modifiedEndColumn,ae.charInsert))}}}return Ne}}class he extends le{constructor(Ce,_e,me,ke,Ee){super(Ce,_e,me,ke,Ee)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(Ce,_e,me){return me>_e?{afterLineNumber:Math.max(Ce.originalStartLineNumber,Ce.originalEndLineNumber),heightInLines:me-_e,domNode:null}:null}_produceModifiedFromDiff(Ce,_e,me){return _e>me?{afterLineNumber:Math.max(Ce.modifiedStartLineNumber,Ce.modifiedEndLineNumber),heightInLines:_e-me,domNode:null}:null}}class be extends re{constructor(Ce,_e){super(Ce),this._decorationsLeft=Ce.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(Ce.getOriginalEditor().onDidLayoutChange(me=>{this._decorationsLeft!==me.decorationsLeft&&(this._decorationsLeft=me.decorationsLeft,Ce.relayoutEditors())}))}setEnableSplitViewResizing(Ce){}_getViewZones(Ce,_e,me,ke){const Ee=this._dataSource.getOriginalEditor(),pe=this._dataSource.getModifiedEditor();return new ve(Ce,_e,me,Ee,pe,ke).getViewZones()}_getOriginalEditorDecorations(Ce,_e,me,ke){const Ee=String(this._removeColor),pe={decorations:[],overviewZones:[]},Te=this._dataSource.getOriginalEditor(),Ne=Te.getModel(),xe=Te._getViewModel();let Ve=0;for(const Fe of _e)if(we(Fe)){for(pe.decorations.push({range:new _.Range(Fe.originalStartLineNumber,1,Fe.originalEndLineNumber,1073741824),options:ae.lineDeleteMargin});Ve<Ce.modified.length;){const et=Ce.modified[Ve];if(et.diff&&et.diff.originalStartLineNumber>=Fe.originalStartLineNumber)break;Ve++}let Be=0;if(Ve<Ce.modified.length){const et=Ce.modified[Ve];et.diff&&et.diff.originalStartLineNumber===Fe.originalStartLineNumber&&et.diff.originalEndLineNumber===Fe.originalEndLineNumber&&et.diff.modifiedStartLineNumber===Fe.modifiedStartLineNumber&&et.diff.modifiedEndLineNumber===Fe.modifiedEndLineNumber&&(Be=et.heightInLines)}const He=Ae(Ne,xe,Fe.originalStartLineNumber,Fe.originalEndLineNumber);pe.overviewZones.push(new x.OverviewRulerZone(He.startLineNumber,He.endLineNumber,Be,Ee))}return pe}_getModifiedEditorDecorations(Ce,_e,me,ke,Ee){const pe=this._dataSource.getModifiedEditor(),Te=String(this._insertColor),Ne={decorations:[],overviewZones:[]},xe=pe.getModel(),Ve=pe._getViewModel();for(const Fe of _e)if(Se(Fe)){Ne.decorations.push({range:new _.Range(Fe.modifiedStartLineNumber,1,Fe.modifiedEndLineNumber,1073741824),options:ke?ae.lineInsertWithSign:ae.lineInsert});const Be=Ae(xe,Ve,Fe.modifiedStartLineNumber,Fe.modifiedEndLineNumber);if(Ne.overviewZones.push(new x.OverviewRulerZone(Be.startLineNumber,Be.endLineNumber,0,Te)),Fe.charChanges){for(const He of Fe.charChanges)if(ye(He))if(me)for(let et=He.modifiedStartLineNumber;et<=He.modifiedEndLineNumber;et++){let Je,st;et===He.modifiedStartLineNumber?Je=He.modifiedStartColumn:Je=xe.getLineFirstNonWhitespaceColumn(et),et===He.modifiedEndLineNumber?st=He.modifiedEndColumn:st=xe.getLineLastNonWhitespaceColumn(et),Ne.decorations.push(ne(et,Je,et,st,ae.charInsert))}else Ne.decorations.push(ne(He.modifiedStartLineNumber,He.modifiedStartColumn,He.modifiedEndLineNumber,He.modifiedEndColumn,ae.charInsert))}else Ne.decorations.push(ne(Fe.modifiedStartLineNumber,1,Fe.modifiedEndLineNumber,1073741824,ae.charInsertWholeLine))}return Ne}layout(){return Math.max(5,this._decorationsLeft)}}class ve extends le{constructor(Ce,_e,me,ke,Ee,pe){super(Ce,_e,me,ke,Ee),this._originalModel=ke.getModel(),this._renderIndicators=pe,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const Ce=super.getViewZones();return this._finalize(Ce),Ce}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const Ce=document.createElement("div");return Ce.className="inline-added-margin-view-zone",Ce}_produceOriginalFromDiff(Ce,_e,me){const ke=document.createElement("div");return ke.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(Ce.originalStartLineNumber,Ce.originalEndLineNumber),heightInLines:me,domNode:document.createElement("div"),marginDomNode:ke}}_produceModifiedFromDiff(Ce,_e,me){const ke=document.createElement("div");ke.className=`view-lines line-delete ${D.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`;const Ee=document.createElement("div");Ee.className="inline-deleted-margin-view-zone";const pe={shouldNotShrink:!0,afterLineNumber:Ce.modifiedEndLineNumber===0?Ce.modifiedStartLineNumber:Ce.modifiedStartLineNumber-1,heightInLines:_e,minWidthInPx:0,domNode:ke,marginDomNode:Ee,diff:{originalStartLineNumber:Ce.originalStartLineNumber,originalEndLineNumber:Ce.originalEndLineNumber,modifiedStartLineNumber:Ce.modifiedStartLineNumber,modifiedEndLineNumber:Ce.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let Te=Ce.originalStartLineNumber;Te<=Ce.originalEndLineNumber;Te++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(Te),null,null);return this._pendingLineChange.push(Ce),this._pendingViewZones.push(pe),pe}_finalize(Ce){const _e=this._modifiedEditor.getOptions(),me=this._modifiedEditor.getModel().getOptions().tabSize,ke=_e.get(49),Ee=_e.get(32),pe=ke.typicalHalfwidthCharacterWidth,Te=_e.get(102),Ne=this._originalModel.mightContainNonBasicASCII(),xe=this._originalModel.mightContainRTL(),Ve=_e.get(65),Be=_e.get(142).decorationsWidth,He=_e.get(115),et=_e.get(97),Je=_e.get(92),st=_e.get(50),ze=this._lineBreaksComputer.finalize();let je=0;for(let Ge=0;Ge<this._pendingLineChange.length;Ge++){const Ze=this._pendingLineChange[Ge],tt=this._pendingViewZones[Ge],Xe=tt.domNode;(0,o.applyFontInfo)(Xe,ke);const nt=tt.marginDomNode;(0,o.applyFontInfo)(nt,ke);const ft=[];if(Ze.charChanges)for(const Ht of Ze.charChanges)Re(Ht)&&ft.push(new P.InlineDecoration(new _.Range(Ht.originalStartLineNumber,Ht.originalStartColumn,Ht.originalEndLineNumber,Ht.originalEndColumn),"char-delete",0));const Et=ft.length>0,It=new A.StringBuilder(1e4);let Nt=0,Ot=0,kt=null;for(let Ht=Ze.originalStartLineNumber;Ht<=Ze.originalEndLineNumber;Ht++){const Yt=Ht-Ze.originalStartLineNumber,jt=this._originalModel.tokenization.getLineTokens(Ht),ii=jt.getLineContent(),ri=ze[je++],$e=M.LineDecoration.filter(ft,Ht,1,ii.length+1);if(ri){let Qe=0;for(const Ke of ri.breakOffsets){const ht=jt.sliceAndInflate(Qe,Ke,0),Tt=ii.substring(Qe,Ke);Nt=Math.max(Nt,this._renderOriginalLine(Ot++,Tt,ht,M.LineDecoration.extractWrapped($e,Qe,Ke),Et,Ne,xe,ke,Ee,Ve,Be,He,et,Je,st,me,It,nt)),Qe=Ke}for(kt||(kt=[]);kt.length<Yt;)kt[kt.length]=1;kt[Yt]=ri.breakOffsets.length,tt.heightInLines+=ri.breakOffsets.length-1;const Ye=document.createElement("div");Ye.className="gutter-delete",Ce.original.push({afterLineNumber:Ht,afterColumn:0,heightInLines:ri.breakOffsets.length-1,domNode:Le(),marginDomNode:Ye})}else Nt=Math.max(Nt,this._renderOriginalLine(Ot++,ii,jt,$e,Et,Ne,xe,ke,Ee,Ve,Be,He,et,Je,st,me,It,nt))}Nt+=Te;const xt=It.build(),Mt=e.diffEditorWidgetTtPolicy?e.diffEditorWidgetTtPolicy.createHTML(xt):xt;if(Xe.innerHTML=Mt,tt.minWidthInPx=Nt*pe,kt){const Ht=Ze.originalEndLineNumber-Ze.originalStartLineNumber;for(;kt.length<=Ht;)kt[kt.length]=1}tt.diff.viewLineCounts=kt}Ce.original.sort((Ge,Ze)=>Ge.afterLineNumber-Ze.afterLineNumber)}_renderOriginalLine(Ce,_e,me,ke,Ee,pe,Te,Ne,xe,Ve,Fe,Be,He,et,Je,st,ze,je){ze.appendString('<div class="view-line'),Ee||ze.appendString(" char-delete"),ze.appendString('" style="top:'),ze.appendString(String(Ce*Ve)),ze.appendString('px;width:1000000px;">');const Ge=P.ViewLineRenderingData.isBasicASCII(_e,pe),Ze=P.ViewLineRenderingData.containsRTL(_e,Ge,Te),tt=(0,N.renderViewLine)(new N.RenderLineInput(Ne.isMonospace&&!xe,Ne.canUseHalfwidthRightwardsArrow,_e,!1,Ge,Ze,0,me,ke,st,0,Ne.spaceWidth,Ne.middotWidth,Ne.wsmiddotWidth,Be,He,et,Je!==C.EditorFontLigatures.OFF,null),ze);if(ze.appendString("</div>"),this._renderIndicators){const Xe=document.createElement("div");Xe.className=`delete-sign ${s.ThemeIcon.asClassName(te)}`,Xe.setAttribute("style",`position:absolute;top:${Ce*Ve}px;width:${Fe}px;height:${Ve}px;right:0;`),je.appendChild(Xe)}return tt.characterMapping.getHorizontalOffset(tt.characterMapping.length)}}function Ie(De,Ce){return(0,C.stringSet)(De,Ce,["off","on","inherit"])}function Se(De){return De.modifiedEndLineNumber>0}function we(De){return De.originalEndLineNumber>0}function ye(De){return De.modifiedStartLineNumber===De.modifiedEndLineNumber?De.modifiedEndColumn-De.modifiedStartColumn>0:De.modifiedEndLineNumber-De.modifiedStartLineNumber>0}function Re(De){return De.originalStartLineNumber===De.originalEndLineNumber?De.originalEndColumn-De.originalStartColumn>0:De.originalEndLineNumber-De.originalStartLineNumber>0}function Le(){const De=document.createElement("div");return De.className="diagonal-fill",De}function Pe(){const De=document.createElement("div");return De.className="arrow-revert-change "+s.ThemeIcon.asClassName(S.Codicon.arrowRight),t.$("div",{},De)}function Ae(De,Ce,_e,me){const ke=De.getLineCount();return _e=Math.min(ke,Math.max(1,_e)),me=Math.min(ke,Math.max(1,me)),Ce.coordinatesConverter.convertModelRangeToViewRange(new _.Range(_e,De.getLineMinColumn(_e),me,De.getLineMaxColumn(me)))}function Me(De,Ce){return{enableSplitViewResizing:(0,C.boolean)(De.enableSplitViewResizing,Ce.enableSplitViewResizing),splitViewDefaultRatio:(0,C.clampedFloat)(De.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,C.boolean)(De.renderSideBySide,Ce.renderSideBySide),renderMarginRevertIcon:(0,C.boolean)(De.renderMarginRevertIcon,Ce.renderMarginRevertIcon),maxComputationTime:(0,C.clampedInt)(De.maxComputationTime,Ce.maxComputationTime,0,1073741824),maxFileSize:(0,C.clampedInt)(De.maxFileSize,Ce.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,C.boolean)(De.ignoreTrimWhitespace,Ce.ignoreTrimWhitespace),renderIndicators:(0,C.boolean)(De.renderIndicators,Ce.renderIndicators),originalEditable:(0,C.boolean)(De.originalEditable,Ce.originalEditable),diffCodeLens:(0,C.boolean)(De.diffCodeLens,Ce.diffCodeLens),renderOverviewRuler:(0,C.boolean)(De.renderOverviewRuler,Ce.renderOverviewRuler),diffWordWrap:Ie(De.diffWordWrap,Ce.diffWordWrap),diffAlgorithm:(0,C.stringSet)(De.diffAlgorithm,Ce.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,C.boolean)(De.accessibilityVerbose,Ce.accessibilityVerbose),hideUnchangedRegions:{enabled:!1,contextLineCount:0,minimumLineCount:0,revealLineCount:0},experimental:{showEmptyDecorations:!1,showMoves:!1},isInEmbeddedEditor:(0,C.boolean)(De.isInEmbeddedEditor,Ce.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:0,useInlineViewWhenSpaceIsLimited:!1,reverse:(0,C.boolean)(De.reverse,Ce.reverse)}}function Oe(De,Ce){return{enableSplitViewResizing:De.enableSplitViewResizing!==Ce.enableSplitViewResizing,renderSideBySide:De.renderSideBySide!==Ce.renderSideBySide,renderMarginRevertIcon:De.renderMarginRevertIcon!==Ce.renderMarginRevertIcon,maxComputationTime:De.maxComputationTime!==Ce.maxComputationTime,maxFileSize:De.maxFileSize!==Ce.maxFileSize,ignoreTrimWhitespace:De.ignoreTrimWhitespace!==Ce.ignoreTrimWhitespace,renderIndicators:De.renderIndicators!==Ce.renderIndicators,originalEditable:De.originalEditable!==Ce.originalEditable,diffCodeLens:De.diffCodeLens!==Ce.diffCodeLens,renderOverviewRuler:De.renderOverviewRuler!==Ce.renderOverviewRuler,diffWordWrap:De.diffWordWrap!==Ce.diffWordWrap,diffAlgorithm:De.diffAlgorithm!==Ce.diffAlgorithm,accessibilityVerbose:De.accessibilityVerbose!==Ce.accessibilityVerbose}}(0,ie.registerThemingParticipant)((De,Ce)=>{const _e=De.getColor(G.diffDiagonalFill);Ce.addRule(` .monaco-editor .diagonal-fill { background-image: linear-gradient( -45deg, ${_e} 12.5%, #0000 12.5%, #0000 50%, ${_e} 50%, ${_e} 62.5%, #0000 62.5%, #0000 100% ); background-size: 8px 8px; } `)})}),define(Q[3398],Y([1,0,258,458,133,370,491,405,303]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenderOptions=e.LineSource=e.renderLines=void 0;const m=y.diffEditorWidgetTtPolicy;function S(i,s,o,u){(0,t.applyFontInfo)(u,s.fontInfo);const d=o.length>0,p=new D.StringBuilder(1e4);let c=0,l=0;const n=[];for(let C=0;C<i.lineTokens.length;C++){const I=C+1,_=i.lineTokens[C],A=i.lineBreakData[C],k=T.LineDecoration.filter(o,I,1,Number.MAX_SAFE_INTEGER);if(A){let L=0;for(const R of A.breakOffsets){const M=_.sliceAndInflate(L,R,0);c=Math.max(c,r(l,M,T.LineDecoration.extractWrapped(k,L,R),d,i.mightContainNonBasicASCII,i.mightContainRTL,s,p)),l++,L=R}n.push(A.breakOffsets.length)}else n.push(1),c=Math.max(c,r(l,_,k,d,i.mightContainNonBasicASCII,i.mightContainRTL,s,p)),l++}c+=s.scrollBeyondLastColumn;const g=p.build(),w=m?m.createHTML(g):g;u.innerHTML=w;const E=c*s.typicalHalfwidthCharacterWidth;return{heightInLines:l,minWidthInPx:E,viewLineCounts:n}}e.renderLines=S;class h{constructor(s,o,u,d){this.lineTokens=s,this.lineBreakData=o,this.mightContainNonBasicASCII=u,this.mightContainRTL=d}}e.LineSource=h;class a{static fromEditor(s){const o=s.getOptions(),u=o.get(49),d=o.get(142);return new a(s.getModel()?.getOptions().tabSize||0,u,o.get(32),u.typicalHalfwidthCharacterWidth,o.get(102),o.get(65),d.decorationsWidth,o.get(115),o.get(97),o.get(92),o.get(50))}constructor(s,o,u,d,p,c,l,n,g,w,E){this.tabSize=s,this.fontInfo=o,this.disableMonospaceOptimizations=u,this.typicalHalfwidthCharacterWidth=d,this.scrollBeyondLastColumn=p,this.lineHeight=c,this.lineDecorationsWidth=l,this.stopRenderingLineAfter=n,this.renderWhitespace=g,this.renderControlCharacters=w,this.fontLigatures=E}}e.RenderOptions=a;function r(i,s,o,u,d,p,c,l){l.appendString('<div class="view-line'),u||l.appendString(" char-delete"),l.appendString('" style="top:'),l.appendString(String(i*c.lineHeight)),l.appendString('px;width:1000000px;">');const n=s.getLineContent(),g=v.ViewLineRenderingData.isBasicASCII(n,d),w=v.ViewLineRenderingData.containsRTL(n,g,p),E=(0,f.renderViewLine)(new f.RenderLineInput(c.fontInfo.isMonospace&&!c.disableMonospaceOptimizations,c.fontInfo.canUseHalfwidthRightwardsArrow,n,!1,g,w,0,s,o,c.tabSize,0,c.fontInfo.spaceWidth,c.fontInfo.middotWidth,c.fontInfo.wsmiddotWidth,c.stopRenderingLineAfter,c.renderWhitespace,c.renderControlCharacters,c.fontLigatures!==b.EditorFontLigatures.OFF,null),l);return l.appendString("</div>"),E.characterMapping.getHorizontalOffset(E.characterMapping.length)}}),define(Q[3399],Y([1,0,7,20,14,32,4,109,37,17,258,390,1218,1128,2340,3398,391,238,51,303,68,29]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZoneManager=void 0;let n=class extends T.Disposable{constructor(C,I,_,A,k,L,R){super(),this._editors=C,this._diffModel=I,this._options=_,this._diffEditorWidget=A,this._canIgnoreViewZoneUpdateEvent=k,this._clipboardService=L,this._contextMenuService=R,this._originalTopPadding=(0,f.observableValue)("originalTopPadding",0),this._originalScrollOffset=(0,f.observableValue)("originalScrollOffset",0),this._originalScrollOffsetAnimated=(0,o.animatedObservable)(this._originalScrollOffset,this._store),this._modifiedTopPadding=(0,f.observableValue)("modifiedTopPadding",0),this._modifiedScrollOffset=(0,f.observableValue)("modifiedScrollOffset",0),this._modifiedScrollOffsetAnimated=(0,o.animatedObservable)(this._modifiedScrollOffset,this._store);let M=!1;const N=(0,f.observableValue)("state",0),P=this._register(new b.RunOnceScheduler(()=>{N.set(N.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(G=>{!M&&!this._canIgnoreViewZoneUpdateEvent()&&P.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(G=>{!M&&!this._canIgnoreViewZoneUpdateEvent()&&P.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(G=>{(G.hasChanged(143)||G.hasChanged(65))&&P.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(G=>{(G.hasChanged(143)||G.hasChanged(65))&&P.schedule()}));const x=this._diffModel.map(G=>G?(0,f.observableFromEvent)(G.model.original.onDidChangeTokens,()=>G.model.original.tokenization.backgroundTokenizationState===2):void 0).map((G,$)=>G?.read($)),F=new Set,V=new Set,W=(0,f.derived)(G=>{const $=this._diffModel.read(G),ie=$?.diff.read(G);if(!$||!ie)return null;N.read(G);const j=this._options.renderSideBySide.read(G);return g(this._editors.original,this._editors.modified,ie.mappings,F,V,j)}),z=(0,f.derived)(G=>{const $=this._diffModel.read(G)?.movedTextToCompare.read(G);if(!$)return null;N.read(G);const ie=$.changes.map(J=>new r.DiffMapping(J));return g(this._editors.original,this._editors.modified,ie,F,V,!0)});function B(){const G=document.createElement("div");return G.className="diagonal-fill",G}const K=this._register(new T.DisposableStore),H=(0,f.derived)(G=>{K.clear();const $=W.read(G)||[],ie=[],J=[],j=this._modifiedTopPadding.read(G);j>0&&J.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:j,showInHiddenAreas:!0});const ee=this._originalTopPadding.read(G);ee>0&&ie.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:ee,showInHiddenAreas:!0});const X=this._options.renderSideBySide.read(G),te=X?void 0:this._editors.modified._getViewModel()?.createLineBreaksComputer();if(te){for(const ae of $)if(ae.diff)for(let ue=ae.originalRange.startLineNumber;ue<ae.originalRange.endLineNumberExclusive;ue++)te?.addRequest(this._editors.original.getModel().getLineContent(ue),null,null)}const Z=te?.finalize()??[];let se=0;const re=this._editors.modified.getOption(65),oe=this._diffModel.read(G)?.movedTextToCompare.read(G),le=this._editors.original.getModel()?.mightContainNonBasicASCII()??!1,ne=this._editors.original.getModel()?.mightContainRTL()??!1,ce=s.RenderOptions.fromEditor(this._editors.modified);for(const ae of $)if(ae.diff&&!X){if(!ae.originalRange.isEmpty){x.read(G);const de=document.createElement("div");de.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const ge=new s.LineSource(ae.originalRange.mapToLineArray(Se=>this._editors.original.getModel().tokenization.getLineTokens(Se)),ae.originalRange.mapToLineArray(Se=>Z[se++]),le,ne),he=[];for(const Se of ae.diff.innerChanges||[])he.push(new p.InlineDecoration(Se.originalRange.delta(-(ae.diff.originalRange.startLineNumber-1)),a.diffDeleteDecoration.className,0));const be=(0,s.renderLines)(ge,ce,he,de),ve=document.createElement("div");if(ve.className="inline-deleted-margin-view-zone",(0,S.applyFontInfo)(ve,ce.fontInfo),this._options.renderIndicators.read(G))for(let Se=0;Se<be.heightInLines;Se++){const we=document.createElement("div");we.className=`delete-sign ${v.ThemeIcon.asClassName(a.diffRemoveIcon)}`,we.setAttribute("style",`position:absolute;top:${Se*re}px;width:${ce.lineDecorationsWidth}px;height:${re}px;right:0;`),ve.appendChild(we)}let Ie;K.add(new i.InlineDiffDeletedCodeMargin(()=>(0,m.assertIsDefined)(Ie),ve,this._editors.modified,ae.diff,this._diffEditorWidget,be.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let Se=0;Se<be.viewLineCounts.length;Se++){const we=be.viewLineCounts[Se];we>1&&ie.push({afterLineNumber:ae.originalRange.startLineNumber+Se,domNode:B(),heightInPx:(we-1)*re,showInHiddenAreas:!0})}J.push({afterLineNumber:ae.modifiedRange.startLineNumber-1,domNode:de,heightInPx:be.heightInLines*re,minWidthInPx:be.minWidthInPx,marginDomNode:ve,setZoneId(Se){Ie=Se},showInHiddenAreas:!0})}const ue=document.createElement("div");ue.className="gutter-delete",ie.push({afterLineNumber:ae.originalRange.endLineNumberExclusive-1,domNode:B(),heightInPx:ae.modifiedHeightInPx,marginDomNode:ue,showInHiddenAreas:!0})}else{const ue=ae.modifiedHeightInPx-ae.originalHeightInPx;if(ue>0){if(oe?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(ae.originalRange.endLineNumberExclusive-1))continue;ie.push({afterLineNumber:ae.originalRange.endLineNumberExclusive-1,domNode:B(),heightInPx:ue,showInHiddenAreas:!0})}else{let de=function(){const he=document.createElement("div");return he.className="arrow-revert-change "+v.ThemeIcon.asClassName(D.Codicon.arrowRight),(0,t.$)("div",{},he)};if(oe?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(ae.modifiedRange.endLineNumberExclusive-1))continue;let ge;ae.diff&&ae.diff.modifiedRange.isEmpty&&this._options.shouldRenderRevertArrows.read(G)&&(ge=de()),J.push({afterLineNumber:ae.modifiedRange.endLineNumberExclusive-1,domNode:B(),heightInPx:-ue,marginDomNode:ge,showInHiddenAreas:!0})}}for(const ae of z.read(G)??[]){if(!oe?.lineRangeMapping.original.intersect(ae.originalRange)||!oe?.lineRangeMapping.modified.intersect(ae.modifiedRange))continue;const ue=ae.modifiedHeightInPx-ae.originalHeightInPx;ue>0?ie.push({afterLineNumber:ae.originalRange.endLineNumberExclusive-1,domNode:B(),heightInPx:ue,showInHiddenAreas:!0}):J.push({afterLineNumber:ae.modifiedRange.endLineNumberExclusive-1,domNode:B(),heightInPx:-ue,showInHiddenAreas:!0})}return{orig:ie,mod:J}});this._register((0,f.autorunWithStore)(G=>{const $=h.StableEditorScrollState.capture(this._editors.modified),ie=H.read(G);M=!0,this._editors.original.changeViewZones(J=>{for(const j of F)J.removeZone(j);F.clear();for(const j of ie.orig){const ee=J.addZone(j);j.setZoneId&&j.setZoneId(ee),F.add(ee)}}),this._editors.modified.changeViewZones(J=>{for(const j of V)J.removeZone(j);V.clear();for(const j of ie.mod){const ee=J.addZone(j);j.setZoneId&&j.setZoneId(ee),V.add(ee)}}),M=!1,$.restore(this._editors.modified)})),this._register((0,T.toDisposable)(()=>{this._editors.original.changeViewZones(G=>{for(const $ of F)G.removeZone($);F.clear()}),this._editors.modified.changeViewZones(G=>{for(const $ of V)G.removeZone($);V.clear()})}));let U=!1;this._register(this._editors.original.onDidScrollChange(G=>{G.scrollLeftChanged&&!U&&(U=!0,this._editors.modified.setScrollLeft(G.scrollLeft),U=!1)})),this._register(this._editors.modified.onDidScrollChange(G=>{G.scrollLeftChanged&&!U&&(U=!0,this._editors.original.setScrollLeft(G.scrollLeft),U=!1)})),this._originalScrollTop=(0,f.observableFromEvent)(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=(0,f.observableFromEvent)(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register((0,f.autorun)(G=>{const $=this._originalScrollTop.read(G)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(G))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(G));$!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop($,1)})),this._register((0,f.autorun)(G=>{const $=this._modifiedScrollTop.read(G)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(G))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(G));$!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop($,1)})),this._register((0,f.autorun)(G=>{const $=this._diffModel.read(G)?.movedTextToCompare.read(G);let ie=0;if($){const J=this._editors.original.getTopForLineNumber($.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();ie=this._editors.modified.getTopForLineNumber($.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-J}ie>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(ie,void 0)):ie<0?(this._modifiedTopPadding.set(-ie,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-ie,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+ie,void 0,!0)}))}};e.ViewZoneManager=n,e.ViewZoneManager=n=fe([O(5,c.IClipboardService),O(6,l.IContextMenuService)],n);function g(E,C,I,_,A,k){const L=new y.ArrayQueue(w(E,_)),R=new y.ArrayQueue(w(C,A)),M=E.getOption(65),N=C.getOption(65),P=[];let x=0,F=0;function V(W,z){for(;;){let B=L.peek(),K=R.peek();if(B&&B.lineNumber>=W&&(B=void 0),K&&K.lineNumber>=z&&(K=void 0),!B&&!K)break;const H=B?B.lineNumber-x:Number.MAX_VALUE,U=K?K.lineNumber-F:Number.MAX_VALUE;H<U?(L.dequeue(),K={lineNumber:B.lineNumber-x+F,heightInPx:0}):H>U?(R.dequeue(),B={lineNumber:K.lineNumber-F+x,heightInPx:0}):(L.dequeue(),R.dequeue()),P.push({originalRange:u.LineRange.ofLength(B.lineNumber,1),modifiedRange:u.LineRange.ofLength(K.lineNumber,1),originalHeightInPx:M+B.heightInPx,modifiedHeightInPx:N+K.heightInPx,diff:void 0})}}for(const W of I){let U=function(G,$){if(G<H||$<K)return;if(B)B=!1;else if(G===H||$===K)return;const ie=new u.LineRange(H,G),J=new u.LineRange(K,$);if(ie.isEmpty&&J.isEmpty)return;const j=L.takeWhile(X=>X.lineNumber<G)?.reduce((X,te)=>X+te.heightInPx,0)??0,ee=R.takeWhile(X=>X.lineNumber<$)?.reduce((X,te)=>X+te.heightInPx,0)??0;P.push({originalRange:ie,modifiedRange:J,originalHeightInPx:ie.length*M+j,modifiedHeightInPx:J.length*N+ee,diff:W.lineRangeMapping}),H=G,K=$};const z=W.lineRangeMapping;V(z.originalRange.startLineNumber,z.modifiedRange.startLineNumber);let B=!0,K=z.modifiedRange.startLineNumber,H=z.originalRange.startLineNumber;if(k)for(const G of z.innerChanges||[])G.originalRange.startColumn>1&&G.modifiedRange.startColumn>1&&U(G.originalRange.startLineNumber,G.modifiedRange.startLineNumber),G.originalRange.endColumn<E.getModel().getLineMaxColumn(G.originalRange.endLineNumber)&&U(G.originalRange.endLineNumber,G.modifiedRange.endLineNumber);U(z.originalRange.endLineNumberExclusive,z.modifiedRange.endLineNumberExclusive),x=z.originalRange.endLineNumberExclusive,F=z.modifiedRange.endLineNumberExclusive}return V(Number.MAX_VALUE,Number.MAX_VALUE),P}function w(E,C){const I=[],_=[],A=E.getOption(143).wrappingColumn!==-1,k=E._getViewModel().coordinatesConverter,L=E.getOption(65);if(A)for(let M=1;M<=E.getModel().getLineCount();M++){const N=k.getModelLineViewLineCount(M);N>1&&_.push({lineNumber:M,heightInPx:L*(N-1)})}for(const M of E.getWhitespaces()){if(C.has(M.id))continue;const N=M.afterLineNumber===0?0:k.convertViewPositionToModelPosition(new d.Position(M.afterLineNumber,1)).lineNumber;I.push({lineNumber:N,heightInPx:M.height})}return(0,o.joinCombine)(I,_,M=>M.lineNumber,(M,N)=>({lineNumber:M.lineNumber,heightInPx:M.heightInPx+N.heightInPx}))}}),define(Q[598],Y([1,0,7,20,15,6,109,48,79,190,3335,3393,2321,3399,1132,1212,3163,391,1185,51,27,393,73,302,220,8,5,134,1856,3366,2349,1128,4,72,1716,3313]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget2=void 0;let N=class extends _.DelegatingEditor{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}get collapseUnchangedRegions(){return this._options.hideUnchangedRegions.get()}constructor(z,B,K,H,U,G,$,ie){super(),this._domElement=z,this._parentContextKeyService=H,this._parentInstantiationService=U,this._audioCueService=$,this._editorProgressService=ie,this.elements=(0,t.h)("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[(0,t.h)("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[(0,t.$)("span",{},"No Changes")]),(0,t.h)("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),(0,t.h)("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),(0,t.h)("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=this._register((0,T.disposableObservableValue)("diffModel",void 0)),this.onDidChangeModel=D.Event.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._parentInstantiationService.createChild(new I.ServiceCollection([E.IContextKeyService,this._contextKeyService])),this._boundarySashes=(0,T.observableValue)("boundarySashes",void 0),this._accessibleDiffViewerShouldBeVisible=(0,T.observableValue)("accessibleDiffViewerShouldBeVisible",!1),this._accessibleDiffViewerVisible=(0,T.derived)(Z=>this._options.onlyShowAccessibleDiffViewer.read(Z)?!0:this._accessibleDiffViewerShouldBeVisible.read(Z)),this.movedBlocksLinesPart=(0,T.observableValue)("MovedBlocksLinesPart",void 0),this._layoutInfo=(0,T.derived)(Z=>{const se=this._rootSizeObserver.width.read(Z),re=this._rootSizeObserver.height.read(Z),le=this._sash.read(Z)?.sashLeft.read(Z)??Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),ne=se-le-(this._options.renderOverviewRuler.read(Z)?s.OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH:0),ce=this.movedBlocksLinesPart.read(Z)?.width.read(Z)??0,ae=le-ce;return this.elements.original.style.width=ae+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=ne+"px",this.elements.modified.style.left=le+"px",this._editors.original.layout({width:ae,height:re}),this._editors.modified.layout({width:ne,height:re}),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((Z,se)=>Z?.diff.read(se)),this.onDidUpdateDiff=D.Event.fromObservableLight(this._diffValue),G.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._contextKeyService.createKey("diffEditorVersion",2),this._domElement.appendChild(this.elements.root),this._register((0,R.toDisposable)(()=>this._domElement.removeChild(this.elements.root))),this._rootSizeObserver=this._register(new u.ObservableElementSizeObserver(this.elements.root,B.dimension)),this._rootSizeObserver.setAutomaticLayout(B.automaticLayout??!1),this._options=new k.DiffEditorOptions(B,this._rootSizeObserver.width),this._contextKeyService.createKey(n.EditorContextKeys.isEmbeddedDiffEditor.key,!1);const J=n.EditorContextKeys.isEmbeddedDiffEditor.bindTo(this._contextKeyService);this._register((0,T.autorun)(Z=>{J.set(this._options.isInEmbeddedEditor.read(Z))}));const j=n.EditorContextKeys.comparingMovedCode.bindTo(this._contextKeyService);this._register((0,T.autorun)(Z=>{j.set(!!this._diffModel.read(Z)?.movedTextToCompare.read(Z))}));const ee=n.EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached.bindTo(this._contextKeyService);this._register((0,T.autorun)(Z=>{ee.set(this._options.couldShowInlineViewBecauseOfSize.read(Z))})),this._editors=this._register(this._instantiationService.createInstance(A.DiffEditorEditors,this.elements.original,this.elements.modified,this._options,K,(Z,se,re,oe)=>this._createInnerEditor(Z,se,re,oe))),this._sash=(0,T.derivedWithStore)("sash",(Z,se)=>{const re=this._options.renderSideBySide.read(Z);if(this.elements.root.classList.toggle("side-by-side",re),!re)return;const oe=se.add(new a.DiffEditorSash(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((le,ne)=>le-(this._options.renderOverviewRuler.read(ne)?s.OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH:0))}));return se.add((0,T.autorun)(le=>{const ne=this._boundarySashes.read(le);ne&&oe.setBoundarySashes(ne)})),oe}),this._register((0,T.keepAlive)(this._sash,!0)),this._register((0,T.autorunWithStore)((Z,se)=>{this.unchangedRangesFeature=se.add(this._instantiationService.createInstance((0,u.readHotReloadableExport)(o.UnchangedRangesFeature,Z),this._editors,this._diffModel,this._options))})),this._register((0,T.autorunWithStore)((Z,se)=>{se.add(new((0,u.readHotReloadableExport)(h.DiffEditorDecorations,Z))(this._editors,this._diffModel,this._options))})),this._register((0,T.autorunWithStore)((Z,se)=>{se.add(this._instantiationService.createInstance((0,u.readHotReloadableExport)(r.ViewZoneManager,Z),this._editors,this._diffModel,this._options,this,()=>this.unchangedRangesFeature.isUpdatingViewZones))})),this._register((0,T.autorunWithStore)((Z,se)=>{se.add(this._instantiationService.createInstance((0,u.readHotReloadableExport)(s.OverviewRulerPart,Z),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(re=>re.modifiedEditor),this._options))})),this._register((0,T.autorunWithStore)((Z,se)=>{this._accessibleDiffViewer=se.add(this._register(this._instantiationService.createInstance((0,u.readHotReloadableExport)(S.AccessibleDiffViewer,Z),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(re,oe)=>this._accessibleDiffViewerShouldBeVisible.set(re,oe),this._options.onlyShowAccessibleDiffViewer.map(re=>!re),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((re,oe)=>re?.diff.read(oe)?.mappings.map(le=>le.lineRangeMapping)),this._editors)))}));const X=this._accessibleDiffViewerVisible.map(Z=>Z?"hidden":"visible");this._register((0,u.applyStyle)(this.elements.modified,{visibility:X})),this._register((0,u.applyStyle)(this.elements.original,{visibility:X})),this._createDiffEditorContributions(),G.addDiffEditor(this),this._register((0,T.keepAlive)(this._layoutInfo,!0)),this._register((0,T.autorunWithStore)((Z,se)=>{this.movedBlocksLinesPart.set(se.add(new((0,u.readHotReloadableExport)(i.MovedBlocksLinesPart,Z))(this.elements.root,this._diffModel,this._layoutInfo.map(re=>re.originalEditor),this._layoutInfo.map(re=>re.modifiedEditor),this._editors)),void 0)})),this._register((0,u.applyStyle)(this.elements.overlay,{width:this._layoutInfo.map((Z,se)=>Z.originalEditor.width+(this._options.renderSideBySide.read(se)?0:Z.modifiedEditor.width)),visibility:(0,T.derived)(Z=>this._options.hideUnchangedRegions.read(Z)&&this._diffModel.read(Z)?.diff.read(Z)?.mappings.length===0?"visible":"hidden")})),this._register(this._editors.modified.onMouseDown(Z=>{if(!Z.event.rightButton&&Z.target.position&&Z.target.element?.className.includes("arrow-revert-change")){const se=Z.target.position.lineNumber,re=Z.target,oe=this._diffModel.get();if(!oe)return;const le=oe.diff.get()?.mappings;if(!le)return;const ne=le.find(ce=>re?.detail.afterLineNumber===ce.lineRangeMapping.modifiedRange.startLineNumber-1||ce.lineRangeMapping.modifiedRange.startLineNumber===se);if(!ne)return;this.revert(ne.lineRangeMapping),Z.event.stopPropagation()}})),this._register(D.Event.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,Z=>{if(Z?.reason===3){const se=this._diffModel.get()?.diff.get()?.mappings.find(re=>re.lineRangeMapping.modifiedRange.contains(Z.position.lineNumber));se?.lineRangeMapping.modifiedRange.isEmpty?this._audioCueService.playAudioCue(w.AudioCue.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):se?.lineRangeMapping.originalRange.isEmpty?this._audioCueService.playAudioCue(w.AudioCue.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):se&&this._audioCueService.playAudioCue(w.AudioCue.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}));const te=this._diffModel.map((Z,se)=>Z?.isDiffUpToDate.read(se));this._register((0,T.autorunWithStore)((Z,se)=>{if(te.read(Z)===!1){const re=this._editorProgressService.show(!0,1e3);se.add((0,R.toDisposable)(()=>re.done()))}}))}getContentHeight(){return this._editors.modified.getContentHeight()}_createInnerEditor(z,B,K,H){return z.createInstance(m.CodeEditorWidget,B,K,H)}_createDiffEditorContributions(){const z=f.EditorExtensionsRegistry.getDiffEditorContributions();for(const B of z)try{this._register(this._instantiationService.createInstance(B.ctor,this))}catch(K){(0,b.onUnexpectedError)(K)}}get _targetEditor(){return this._editors.modified}getEditorType(){return l.EditorType.IDiffEditor}onVisible(){this._editors.original.onVisible(),this._editors.modified.onVisible()}onHide(){this._editors.original.onHide(),this._editors.modified.onHide()}layout(z){this._rootSizeObserver.observe(z)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){const z=this._editors.original.saveViewState(),B=this._editors.modified.saveViewState();return{original:z,modified:B,modelState:this._diffModel.get()?.serializeState()}}restoreViewState(z){if(z&&z.original&&z.modified){const B=z;this._editors.original.restoreViewState(B.original),this._editors.modified.restoreViewState(B.modified),B.modelState&&this._diffModel.get()?.restoreSerializedState(B.modelState)}}createViewModel(z){return new L.DiffEditorViewModel(z,this._options,this._instantiationService.createInstance(d.WorkerBasedDocumentDiffProvider,{diffAlgorithm:this._options.diffAlgorithm.get()}))}getModel(){return this._diffModel.get()?.model??null}setModel(z){!z&&this._diffModel.get()&&this._accessibleDiffViewer.close();const B=z?"model"in z?z:this.createViewModel(z):void 0;this._editors.original.setModel(B?B.model.original:null),this._editors.modified.setModel(B?B.model.modified:null),(0,T.transaction)(K=>{this._diffModel.set(B,K)})}updateOptions(z){this._options.updateOptions(z)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}setBoundarySashes(z){this._boundarySashes.set(z,void 0)}get ignoreTrimWhitespace(){return this._options.ignoreTrimWhitespace.get()}get maxComputationTime(){return this._options.maxComputationTimeMs.get()}get renderSideBySide(){return this._options.renderSideBySide.get()}getLineChanges(){const z=this._diffModel.get()?.diff.get();return z?V(z):null}getDiffComputationResult(){const z=this._diffModel.get()?.diff.get();return z?{changes:this.getLineChanges(),changes2:z.mappings.map(B=>B.lineRangeMapping),identical:z.identical,quitEarly:z.quitEarly}:null}revert(z){const B=this._diffModel.get()?.model;if(!B)return;const K=z.innerChanges?z.innerChanges.map(H=>({range:H.modifiedRange,text:B.original.getValueInRange(H.originalRange)})):[{range:z.modifiedRange.toExclusiveRange(),text:B.original.getValueInRange(z.originalRange.toExclusiveRange())}];this._editors.modified.executeEdits("diffEditor",K)}_goTo(z){this._editors.modified.setPosition(new p.Position(z.lineRangeMapping.modifiedRange.startLineNumber,1)),this._editors.modified.revealRangeInCenter(z.lineRangeMapping.modifiedRange.toExclusiveRange())}goToDiff(z){const B=this._diffModel.get()?.diff.get()?.mappings;if(!B||B.length===0)return;const K=this._editors.modified.getPosition().lineNumber;let H;z==="next"?H=B.find(U=>U.lineRangeMapping.modifiedRange.startLineNumber>K)??B[0]:H=(0,y.findLast)(B,U=>U.lineRangeMapping.modifiedRange.startLineNumber<K)??B[B.length-1],this._goTo(H),H.lineRangeMapping.modifiedRange.isEmpty?this._audioCueService.playAudioCue(w.AudioCue.diffLineDeleted,{source:"diffEditor.goToDiff"}):H.lineRangeMapping.originalRange.isEmpty?this._audioCueService.playAudioCue(w.AudioCue.diffLineInserted,{source:"diffEditor.goToDiff"}):H&&this._audioCueService.playAudioCue(w.AudioCue.diffLineModified,{source:"diffEditor.goToDiff"})}revealFirstDiff(){const z=this._diffModel.get();z&&this.waitForDiff().then(()=>{const B=z.diff.get()?.mappings;!B||B.length===0||this._goTo(B[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.prev()}async waitForDiff(){const z=this._diffModel.get();z&&await z.waitForDiff()}mapToOtherSide(){const z=this._editors.modified.hasWidgetFocus(),B=z?this._editors.modified:this._editors.original,K=z?this._editors.original:this._editors.modified;let H;const U=B.getSelection();if(U){const G=this._diffModel.get()?.diff.get()?.mappings.map($=>z?$.lineRangeMapping.flip():$.lineRangeMapping);if(G){const $=P(U.getStartPosition(),G),ie=P(U.getEndPosition(),G);H=c.Range.plusRange($,ie)}}return{destination:K,destinationSelection:H}}switchSide(){const{destination:z,destinationSelection:B}=this.mapToOtherSide();z.focus(),B&&z.setSelection(B)}exitCompareMove(){const z=this._diffModel.get();z&&z.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){const z=this._diffModel.get()?.unchangedRegions.get();z&&(0,T.transaction)(B=>{for(const K of z)K.collapseAll(B)})}showAllUnchangedRegions(){const z=this._diffModel.get()?.unchangedRegions.get();z&&(0,T.transaction)(B=>{for(const K of z)K.showAll(B)})}};e.DiffEditorWidget2=N,e.DiffEditorWidget2=N=fe([O(3,E.IContextKeyService),O(4,C.IInstantiationService),O(5,v.ICodeEditorService),O(6,w.IAudioCueService),O(7,M.IEditorProgressService)],N);function P(W,z){const B=(0,y.findLast)(z,H=>H.originalRange.startLineNumber<=W.lineNumber);if(!B)return c.Range.fromPositions(W);if(B.originalRange.endLineNumberExclusive<=W.lineNumber){const H=W.lineNumber-B.originalRange.endLineNumberExclusive+B.modifiedRange.endLineNumberExclusive;return c.Range.fromPositions(new p.Position(H,W.column))}if(!B.innerChanges)return c.Range.fromPositions(new p.Position(B.modifiedRange.startLineNumber,1));const K=(0,y.findLast)(B.innerChanges,H=>H.originalRange.getStartPosition().isBeforeOrEqual(W));if(!K){const H=W.lineNumber-B.originalRange.startLineNumber+B.modifiedRange.startLineNumber;return c.Range.fromPositions(new p.Position(H,W.column))}if(K.originalRange.containsPosition(W))return K.modifiedRange;{const H=x(K.originalRange.getEndPosition(),W);return c.Range.fromPositions(F(K.modifiedRange.getEndPosition(),H))}}function x(W,z){return W.lineNumber===z.lineNumber?new g.LengthObj(0,z.column-W.column):new g.LengthObj(z.lineNumber-W.lineNumber,z.column-1)}function F(W,z){return z.lineCount===0?new p.Position(W.lineNumber,W.column+z.columnCount):new p.Position(W.lineNumber+z.lineCount,z.columnCount+1)}function V(W){return W.mappings.map(z=>{const B=z.lineRangeMapping;let K,H,U,G,$=B.innerChanges;return B.originalRange.isEmpty?(K=B.originalRange.startLineNumber-1,H=0,$=void 0):(K=B.originalRange.startLineNumber,H=B.originalRange.endLineNumberExclusive-1),B.modifiedRange.isEmpty?(U=B.modifiedRange.startLineNumber-1,G=0,$=void 0):(U=B.modifiedRange.startLineNumber,G=B.modifiedRange.endLineNumberExclusive-1),{originalStartLineNumber:K,originalEndLineNumber:H,modifiedStartLineNumber:U,modifiedEndLineNumber:G,charChanges:$?.map(ie=>({originalStartLineNumber:ie.originalRange.startLineNumber,originalStartColumn:ie.originalRange.startColumn,originalEndLineNumber:ie.originalRange.endLineNumber,originalEndColumn:ie.originalRange.endColumn,modifiedStartLineNumber:ie.modifiedRange.startLineNumber,modifiedStartColumn:ie.modifiedRange.startColumn,modifiedEndLineNumber:ie.modifiedRange.endLineNumber,modifiedEndColumn:ie.modifiedRange.endColumn}))}})}}),define(Q[3400],Y([1,0,32,48,700,598,73,2338,13,9,8]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowAllUnchangedRegions=e.CollapseAllUnchangedRegions=e.ExitCompareMove=e.SwitchSide=e.ToggleUseInlineViewWhenSpaceIsLimited=e.ToggleShowMovedCodeBlocks=e.ToggleCollapseUnchangedRegions=void 0;class h extends v.Action2{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:{value:(0,f.localize)(0,null),original:"Toggle Collapse Unchanged Regions"},icon:t.Codicon.map,precondition:S.ContextKeyEqualsExpr.create("diffEditorVersion",2),toggled:S.ContextKeyExpr.has("config.diffEditor.hideUnchangedRegions.enabled"),menu:{id:v.MenuId.EditorTitle,order:22,group:"navigation",when:S.ContextKeyEqualsExpr.create("diffEditorVersion",2)}})}run(c,...l){const n=c.get(m.IConfigurationService),g=!n.getValue("diffEditor.hideUnchangedRegions.enabled");n.updateValue("diffEditor.hideUnchangedRegions.enabled",g)}}e.ToggleCollapseUnchangedRegions=h,(0,v.registerAction2)(h);class a extends v.Action2{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:{value:(0,f.localize)(1,null),original:"Toggle Show Moved Code Blocks"},precondition:S.ContextKeyEqualsExpr.create("diffEditorVersion",2)})}run(c,...l){const n=c.get(m.IConfigurationService),g=!n.getValue("diffEditor.experimental.showMoves");n.updateValue("diffEditor.experimental.showMoves",g)}}e.ToggleShowMovedCodeBlocks=a,(0,v.registerAction2)(a);class r extends v.Action2{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:{value:(0,f.localize)(2,null),original:"Toggle Use Inline View When Space Is Limited"},precondition:S.ContextKeyEqualsExpr.create("diffEditorVersion",2)})}run(c,...l){const n=c.get(m.IConfigurationService),g=!n.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");n.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",g)}}e.ToggleUseInlineViewWhenSpaceIsLimited=r,(0,v.registerAction2)(r),v.MenuRegistry.appendMenuItem(v.MenuId.EditorTitle,{command:{id:new r().desc.id,title:(0,f.localize)(3,null),toggled:S.ContextKeyExpr.has("config.diffEditor.useInlineViewWhenSpaceIsLimited")},order:11,group:"1_diff",when:S.ContextKeyExpr.and(T.EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached,S.ContextKeyEqualsExpr.create("diffEditorVersion",2))}),v.MenuRegistry.appendMenuItem(v.MenuId.EditorTitle,{command:{id:new a().desc.id,title:(0,f.localize)(4,null),icon:t.Codicon.move,toggled:S.ContextKeyEqualsExpr.create("config.diffEditor.experimental.showMoves",!0)},order:10,group:"1_diff",when:S.ContextKeyEqualsExpr.create("diffEditorVersion",2)});const i={value:(0,f.localize)(5,null),original:"Diff Editor"};class s extends y.EditorAction2{constructor(){super({id:"diffEditor.switchSide",title:{value:(0,f.localize)(6,null),original:"Switch Side"},icon:t.Codicon.arrowSwap,precondition:S.ContextKeyExpr.and(S.ContextKeyEqualsExpr.create("diffEditorVersion",2),S.ContextKeyExpr.has("isInDiffEditor")),f1:!0,category:i})}runEditorCommand(c,l,n){const g=(0,b.findFocusedDiffEditor)(c);if(g instanceof D.DiffEditorWidget2){if(n&&n.dryRun)return{destinationSelection:g.mapToOtherSide().destinationSelection};g.switchSide()}}}e.SwitchSide=s,(0,v.registerAction2)(s);class o extends y.EditorAction2{constructor(){super({id:"diffEditor.exitCompareMove",title:{value:(0,f.localize)(7,null),original:"Exit Compare Move"},icon:t.Codicon.close,precondition:T.EditorContextKeys.comparingMovedCode,f1:!1,category:i,keybinding:{weight:1e4,primary:9}})}runEditorCommand(c,l,...n){const g=(0,b.findFocusedDiffEditor)(c);g instanceof D.DiffEditorWidget2&&g.exitCompareMove()}}e.ExitCompareMove=o,(0,v.registerAction2)(o);class u extends y.EditorAction2{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:{value:(0,f.localize)(8,null),original:"Collapse All Unchanged Regions"},icon:t.Codicon.fold,precondition:S.ContextKeyExpr.and(S.ContextKeyEqualsExpr.create("diffEditorVersion",2),S.ContextKeyExpr.has("isInDiffEditor")),f1:!0,category:i})}runEditorCommand(c,l,...n){const g=(0,b.findFocusedDiffEditor)(c);g instanceof D.DiffEditorWidget2&&g.collapseAllUnchangedRegions()}}e.CollapseAllUnchangedRegions=u,(0,v.registerAction2)(u);class d extends y.EditorAction2{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:{value:(0,f.localize)(9,null),original:"Show All Unchanged Regions"},icon:t.Codicon.unfold,precondition:S.ContextKeyExpr.and(S.ContextKeyEqualsExpr.create("diffEditorVersion",2),S.ContextKeyExpr.has("isInDiffEditor")),f1:!0,category:i})}runEditorCommand(c,l,...n){const g=(0,b.findFocusedDiffEditor)(c);g instanceof D.DiffEditorWidget2&&g.showAllUnchangedRegions()}}e.ShowAllUnchangedRegions=d,(0,v.registerAction2)(d)}),define(Q[243],Y([1,0,42,79,190,458,28,8,5,23,19,66,29,68,72,125,74,598,220]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmbeddedDiffEditorWidget2=e.EmbeddedDiffEditorWidget=e.EmbeddedCodeEditorWidget=void 0;let p=class extends b.CodeEditorWidget{constructor(g,w,E,C,I,_,A,k,L,R,M,N,P){super(g,{...C.getRawOptions(),overflowWidgetsDomNode:C.getOverflowWidgetsDomNode()},E,I,_,A,k,L,R,M,N,P),this._parentEditor=C,this._overwriteOptions=w,super.updateOptions(this._overwriteOptions),this._register(C.onDidChangeConfiguration(x=>this._onParentConfigurationChanged(x)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(g){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(g){t.mixin(this._overwriteOptions,g,!0),super.updateOptions(this._overwriteOptions)}};e.EmbeddedCodeEditorWidget=p,e.EmbeddedCodeEditorWidget=p=fe([O(4,v.IInstantiationService),O(5,y.ICodeEditorService),O(6,T.ICommandService),O(7,f.IContextKeyService),O(8,S.IThemeService),O(9,m.INotificationService),O(10,h.IAccessibilityService),O(11,s.ILanguageConfigurationService),O(12,o.ILanguageFeaturesService)],p);let c=class extends D.DiffEditorWidget{constructor(g,w,E,C,I,_,A,k,L,R,M,N){super(g,C.getRawOptions(),E,M,I,_,A,k,L,R,N),this._parentEditor=C,this._overwriteOptions=w,super.updateOptions(this._overwriteOptions),this._register(C.onDidChangeConfiguration(P=>this._onParentConfigurationChanged(P)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(g){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(g){t.mixin(this._overwriteOptions,g,!0),super.updateOptions(this._overwriteOptions)}};e.EmbeddedDiffEditorWidget=c,e.EmbeddedDiffEditorWidget=c=fe([O(4,f.IContextKeyService),O(5,v.IInstantiationService),O(6,y.ICodeEditorService),O(7,S.IThemeService),O(8,m.INotificationService),O(9,a.IContextMenuService),O(10,r.IClipboardService),O(11,i.IEditorProgressService)],c);let l=class extends u.DiffEditorWidget2{constructor(g,w,E,C,I,_,A,k,L){super(g,C.getRawOptions(),E,I,_,A,k,L),this._parentEditor=C,this._overwriteOptions=w,super.updateOptions(this._overwriteOptions),this._register(C.onDidChangeConfiguration(R=>this._onParentConfigurationChanged(R)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(g){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(g){t.mixin(this._overwriteOptions,g,!0),super.updateOptions(this._overwriteOptions)}};e.EmbeddedDiffEditorWidget2=l,e.EmbeddedDiffEditorWidget2=l=fe([O(4,f.IContextKeyService),O(5,v.IInstantiationService),O(6,y.ICodeEditorService),O(7,d.IAudioCueService),O(8,i.IEditorProgressService)],l)}),define(Q[1219],Y([1,0,14,4,48,51,27,96,73,137,98,2361,13,36,19,1721]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketMatchingController=void 0;const s=(0,r.registerColor)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},h.localize(0,null));class o extends b.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:h.localize(1,null),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:3165,weight:100}})}run(n,g){c.get(g)?.jumpToBracket()}}class u extends b.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:h.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(n,g,w){let E=!0;w&&w.selectBrackets===!1&&(E=!1),c.get(g)?.selectToBracket(E)}}class d extends b.EditorAction{constructor(){super({id:"editor.action.removeBrackets",label:h.localize(3,null),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:2561,weight:100}})}run(n,g){c.get(g)?.removeBrackets(this.id)}}class p{constructor(n,g,w){this.position=n,this.brackets=g,this.options=w}}class c extends y.Disposable{static{this.ID="editor.contrib.bracketMatchingController"}static get(n){return n.getContribution(c.ID)}constructor(n){super(),this._editor=n,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new t.RunOnceScheduler(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(70),this._updateBracketsSoon.schedule(),this._register(n.onDidChangeCursorPosition(g=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(n.onDidChangeModelContent(g=>{this._updateBracketsSoon.schedule()})),this._register(n.onDidChangeModel(g=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(n.onDidChangeModelLanguageConfiguration(g=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(n.onDidChangeConfiguration(g=>{g.hasChanged(70)&&(this._matchBrackets=this._editor.getOption(70),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(n.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(n.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const n=this._editor.getModel(),g=this._editor.getSelections().map(w=>{const E=w.getStartPosition(),C=n.bracketPairs.matchBracket(E);let I=null;if(C)C[0].containsPosition(E)&&!C[1].containsPosition(E)?I=C[1].getStartPosition():C[1].containsPosition(E)&&(I=C[0].getStartPosition());else{const _=n.bracketPairs.findEnclosingBrackets(E);if(_)I=_[1].getStartPosition();else{const A=n.bracketPairs.findNextBracket(E);A&&A.range&&(I=A.range.getStartPosition())}}return I?new f.Selection(I.lineNumber,I.column,I.lineNumber,I.column):new f.Selection(E.lineNumber,E.column,E.lineNumber,E.column)});this._editor.setSelections(g),this._editor.revealRange(g[0])}selectToBracket(n){if(!this._editor.hasModel())return;const g=this._editor.getModel(),w=[];this._editor.getSelections().forEach(E=>{const C=E.getStartPosition();let I=g.bracketPairs.matchBracket(C);if(!I&&(I=g.bracketPairs.findEnclosingBrackets(C),!I)){const k=g.bracketPairs.findNextBracket(C);k&&k.range&&(I=g.bracketPairs.matchBracket(k.range.getStartPosition()))}let _=null,A=null;if(I){I.sort(T.Range.compareRangesUsingStarts);const[k,L]=I;if(_=n?k.getStartPosition():k.getEndPosition(),A=n?L.getEndPosition():L.getStartPosition(),L.containsPosition(C)){const R=_;_=A,A=R}}_&&A&&w.push(new f.Selection(_.lineNumber,_.column,A.lineNumber,A.column))}),w.length>0&&(this._editor.setSelections(w),this._editor.revealRange(w[0]))}removeBrackets(n){if(!this._editor.hasModel())return;const g=this._editor.getModel();this._editor.getSelections().forEach(w=>{const E=w.getPosition();let C=g.bracketPairs.matchBracket(E);C||(C=g.bracketPairs.findEnclosingBrackets(E)),C&&(this._editor.pushUndoStop(),this._editor.executeEdits(n,[{range:C[0],text:""},{range:C[1],text:""}]),this._editor.pushUndoStop())})}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=S.ModelDecorationOptions.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,i.themeColorFromId)(s),position:m.OverviewRulerLane.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=S.ModelDecorationOptions.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const n=[];let g=0;for(const w of this._lastBracketsData){const E=w.brackets;E&&(n[g++]={range:E[0],options:w.options},n[g++]={range:E[1],options:w.options})}this._decorations.set(n)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const n=this._editor.getSelections();if(n.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const g=this._editor.getModel(),w=g.getVersionId();let E=[];this._lastVersionId===w&&(E=this._lastBracketsData);const C=[];let I=0;for(let R=0,M=n.length;R<M;R++){const N=n[R];N.isEmpty()&&(C[I++]=N.getStartPosition())}C.length>1&&C.sort(D.Position.compare);const _=[];let A=0,k=0;const L=E.length;for(let R=0,M=C.length;R<M;R++){const N=C[R];for(;k<L&&E[k].position.isBefore(N);)k++;if(k<L&&E[k].position.equals(N))_[A++]=E[k];else{let P=g.bracketPairs.matchBracket(N,20),x=c._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!P&&this._matchBrackets==="always"&&(P=g.bracketPairs.findEnclosingBrackets(N,20),x=c._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),_[A++]=new p(N,P,x)}}this._lastBracketsData=_,this._lastVersionId=w}}e.BracketMatchingController=c,(0,b.registerEditorContribution)(c.ID,c,1),(0,b.registerEditorAction)(u),(0,b.registerEditorAction)(o),(0,b.registerEditorAction)(d),a.MenuRegistry.appendMenuItem(a.MenuId.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:h.localize(4,null)},order:2})}),define(Q[3401],Y([1,0,7,169,27,98,1723]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensWidget=e.CodeLensHelper=void 0;class T{constructor(a,r,i){this.afterColumn=1073741824,this.afterLineNumber=a,this.heightInPx=r,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(a){this._lastHeight===void 0?this._lastHeight=a:this._lastHeight!==a&&(this._lastHeight=a,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class f{static{this._idPool=0}constructor(a,r){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=a,this._id=`codelens.widget-${f._idPool++}`,this.updatePosition(r),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(a,r){this._commands.clear();const i=[];let s=!1;for(let o=0;o<a.length;o++){const u=a[o];if(u&&(s=!0,u.command)){const d=(0,y.renderLabelWithIcons)(u.command.title.trim());u.command.id?(i.push(t.$("a",{id:String(o),title:u.command.tooltip,role:"button"},...d)),this._commands.set(String(o),u.command)):i.push(t.$("span",{title:u.command.tooltip},...d)),o+1<a.length&&i.push(t.$("span",void 0,"\xA0|\xA0"))}}s?(t.reset(this._domNode,...i),this._isEmpty&&r&&this._domNode.classList.add("fadein"),this._isEmpty=!1):t.reset(this._domNode,t.$("span",void 0,"no commands"))}getCommand(a){return a.parentElement===this._domNode?this._commands.get(a.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(a){const r=this._editor.getModel().getLineFirstNonWhitespaceColumn(a);this._widgetPosition={position:{lineNumber:a,column:r},preference:[1]}}getPosition(){return this._widgetPosition||null}}class v{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(a,r){this._addDecorations.push(a),this._addDecorationsCallbacks.push(r)}removeDecoration(a){this._removeDecorations.push(a)}commit(a){const r=a.deltaDecorations(this._removeDecorations,this._addDecorations);for(let i=0,s=r.length;i<s;i++)this._addDecorationsCallbacks[i](r[i])}}e.CodeLensHelper=v;const m=D.ModelDecorationOptions.register({collapseOnReplaceEdit:!0,description:"codelens"});class S{constructor(a,r,i,s,o,u){this._isDisposed=!1,this._editor=r,this._data=a,this._decorationIds=[];let d;const p=[];this._data.forEach((c,l)=>{c.symbol.command&&p.push(c.symbol),i.addDecoration({range:c.symbol.range,options:m},n=>this._decorationIds[l]=n),d?d=b.Range.plusRange(d,c.symbol.range):d=b.Range.lift(c.symbol.range)}),this._viewZone=new T(d.startLineNumber-1,o,u),this._viewZoneId=s.addZone(this._viewZone),p.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(p,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new f(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(a,r){this._decorationIds.forEach(a.removeDecoration,a),this._decorationIds=[],r?.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((a,r)=>{const i=this._editor.getModel().getDecorationRange(a),s=this._data[r].symbol;return!!(i&&b.Range.isEmpty(s.range)===i.isEmpty())})}updateCodeLensSymbols(a,r){this._decorationIds.forEach(r.removeDecoration,r),this._decorationIds=[],this._data=a,this._data.forEach((i,s)=>{r.addDecoration({range:i.symbol.range,options:m},o=>this._decorationIds[s]=o)})}updateHeight(a,r){this._viewZone.heightInPx=a,r.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(a){if(!this._viewZone.isVisible())return null;for(let r=0;r<this._decorationIds.length;r++){const i=a.getDecorationRange(this._decorationIds[r]);i&&(this._data[r].symbol.range=i)}return this._data}updateCommands(a){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!0);for(let r=0;r<this._data.length;r++){const i=a[r];if(i){const{symbol:s}=this._data[r];s.command=i.command||s.command}}}getCommand(a){return this._contentWidget?.getCommand(a)}getLineNumber(){const a=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return a?a.startLineNumber:-1}update(a){if(this.isValid()){const r=this._editor.getModel().getDecorationRange(this._decorationIds[0]);r&&(this._viewZone.afterLineNumber=r.startLineNumber-1,a.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(r.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}getItems(){return this._data}}e.CodeLensWidget=S}),define(Q[710],Y([1,0,14,80,15,6,4,145,33,595,48,27,98,328,74,1177,9]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.DecoratorLimitReporter=e.ColorDetector=e.ColorDecorationInjectedTextMarker=void 0,e.ColorDecorationInjectedTextMarker=Object.create({});let d=class extends T.Disposable{static{u=this}static{this.ID="editor.contrib.colorDetector"}static{this.RECOMPUTE_TIME=1e3}constructor(l,n,g,w){super(),this._editor=l,this._configurationService=n,this._languageFeaturesService=g,this._localToDispose=this._register(new T.DisposableStore),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new m.DynamicCssRules(this._editor),this._decoratorLimitReporter=new p,this._colorDecorationClassRefs=this._register(new T.DisposableStore),this._debounceInformation=w.for(g.colorProvider,"Document Colors",{min:u.RECOMPUTE_TIME}),this._register(l.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(l.onDidChangeModelLanguage(()=>this.updateColors())),this._register(g.colorProvider.onDidChange(()=>this.updateColors())),this._register(l.onDidChangeConfiguration(E=>{const C=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(144);const I=C!==this._isColorDecoratorsEnabled||E.hasChanged(20),_=E.hasChanged(144);(I||_)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(144),this.updateColors()}isEnabled(){const l=this._editor.getModel();if(!l)return!1;const n=l.getLanguageId(),g=this._configurationService.getValue(n);if(g&&typeof g=="object"){const w=g.colorDecorators;if(w&&w.enable!==void 0&&!w.enable)return w.enable}return this._editor.getOption(19)}get limitReporter(){return this._decoratorLimitReporter}static get(l){return l.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const l=this._editor.getModel();!l||!this._languageFeaturesService.colorProvider.has(l)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new t.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(l)))})),this.beginCompute())}async beginCompute(){this._computePromise=(0,t.createCancelablePromise)(async l=>{const n=this._editor.getModel();if(!n)return[];const g=new f.StopWatch(!1),w=await(0,s.getColors)(this._languageFeaturesService.colorProvider,n,l,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(n,g.elapsed()),w});try{const l=await this._computePromise;this.updateDecorations(l),this.updateColorDecorators(l),this._computePromise=null}catch(l){(0,b.onUnexpectedError)(l)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(l){const n=l.map(g=>({range:{startLineNumber:g.colorInfo.range.startLineNumber,startColumn:g.colorInfo.range.startColumn,endLineNumber:g.colorInfo.range.endLineNumber,endColumn:g.colorInfo.range.endColumn},options:a.ModelDecorationOptions.EMPTY}));this._editor.changeDecorations(g=>{this._decorationsIds=g.deltaDecorations(this._decorationsIds,n),this._colorDatas=new Map,this._decorationsIds.forEach((w,E)=>this._colorDatas.set(w,l[E]))})}updateColorDecorators(l){this._colorDecorationClassRefs.clear();const n=[],g=this._editor.getOption(20);for(let E=0;E<l.length&&n.length<g;E++){const{red:C,green:I,blue:_,alpha:A}=l[E].colorInfo.color,k=new y.RGBA(Math.round(C*255),Math.round(I*255),Math.round(_*255),A),L=`rgba(${k.r}, ${k.g}, ${k.b}, ${k.a})`,R=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:L}));n.push({range:{startLineNumber:l[E].colorInfo.range.startLineNumber,startColumn:l[E].colorInfo.range.startColumn,endLineNumber:l[E].colorInfo.range.endLineNumber,endColumn:l[E].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:v.noBreakWhitespace,inlineClassName:`${R.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:e.ColorDecorationInjectedTextMarker}}})}const w=g<l.length?g:!1;this._decoratorLimitReporter.update(l.length,w),this._colorDecoratorIds.set(n)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(l){const n=this._editor.getModel();if(!n)return null;const g=n.getDecorationsInRange(h.Range.fromPositions(l,l)).filter(w=>this._colorDatas.has(w.id));return g.length===0?null:this._colorDatas.get(g[0].id)}isColorDecoration(l){return this._colorDecoratorIds.has(l)}};e.ColorDetector=d,e.ColorDetector=d=u=fe([O(1,o.IConfigurationService),O(2,i.ILanguageFeaturesService),O(3,r.ILanguageFeatureDebounceService)],d);class p{constructor(){this._onDidChange=new D.Emitter,this.onDidChange=this._onDidChange.event,this._computed=0,this._limited=!1}get computed(){return this._computed}get limited(){return this._limited}update(l,n){(l!==this._computed||n!==this._limited)&&(this._computed=l,this._limited=n,this._onDidChange.fire())}}e.DecoratorLimitReporter=p,(0,S.registerEditorContribution)(d.ID,d,1)}),define(Q[1220],Y([1,0,14,31,80,4,27,1177,710,1909,3336,19,7]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerParticipant=e.StandaloneColorPickerHover=e.ColorHoverParticipant=e.ColorHover=void 0;class r{constructor(n,g,w,E){this.owner=n,this.range=g,this.model=w,this.provider=E,this.forceShowAtRange=!0}isValidForHoverAnchor(n){return n.type===1&&this.range.startColumn<=n.range.startColumn&&this.range.endColumn>=n.range.endColumn}}e.ColorHover=r;let i=class{constructor(n,g){this._editor=n,this._themeService=g,this.hoverOrdinal=2}computeSync(n,g){return[]}computeAsync(n,g,w){return t.AsyncIterableObject.fromPromise(this._computeAsync(n,g,w))}async _computeAsync(n,g,w){if(!this._editor.hasModel())return[];const E=v.ColorDetector.get(this._editor);if(!E)return[];for(const C of g){if(!E.isColorDecoration(C))continue;const I=E.getColorData(C.range.getStartPosition());if(I)return[await u(this,this._editor.getModel(),I.colorInfo,I.provider)]}return[]}renderHoverParts(n,g){return d(this,this._editor,this._themeService,g,n)}};e.ColorHoverParticipant=i,e.ColorHoverParticipant=i=fe([O(1,h.IThemeService)],i);class s{constructor(n,g,w,E){this.owner=n,this.range=g,this.model=w,this.provider=E}}e.StandaloneColorPickerHover=s;let o=class{constructor(n,g){this._editor=n,this._themeService=g,this.hoverOrdinal=2,this._color=null}async createColorHover(n,g,w){if(!this._editor.hasModel()||!v.ColorDetector.get(this._editor))return null;const C=await(0,f.getColors)(w,this._editor.getModel(),y.CancellationToken.None);let I=null,_=null;for(const R of C){const M=R.colorInfo;T.Range.containsRange(M.range,n.range)&&(I=M,_=R.provider)}const A=I??n,k=_??g,L=!!I;return{colorHover:await u(this,this._editor.getModel(),A,k),foundInEditor:L}}async updateEditorModel(n){if(!this._editor.hasModel())return;const g=n.model;let w=new T.Range(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn);this._color&&(await c(this._editor.getModel(),g,this._color,w,n),w=p(this._editor,w,g))}renderHoverParts(n,g){return d(this,this._editor,this._themeService,g,n)}set color(n){this._color=n}get color(){return this._color}};e.StandaloneColorPickerParticipant=o,e.StandaloneColorPickerParticipant=o=fe([O(1,h.IThemeService)],o);async function u(l,n,g,w){const E=n.getValueInRange(g.range),{red:C,green:I,blue:_,alpha:A}=g.color,k=new b.RGBA(Math.round(C*255),Math.round(I*255),Math.round(_*255),A),L=new b.Color(k),R=await(0,f.getColorPresentations)(n,g,w,y.CancellationToken.None),M=new m.ColorPickerModel(L,[],0);return M.colorPresentations=R||[],M.guessColorPresentation(L,E),l instanceof i?new r(l,T.Range.lift(g.range),M,w):new s(l,T.Range.lift(g.range),M,w)}function d(l,n,g,w,E){if(w.length===0||!n.hasModel())return D.Disposable.None;if(E.setMinimumDimensions){const M=n.getOption(65)+8;E.setMinimumDimensions(new a.Dimension(302,M))}const C=new D.DisposableStore,I=w[0],_=n.getModel(),A=I.model,k=C.add(new S.ColorPickerWidget(E.fragment,A,n.getOption(140),g,l instanceof o));E.setColorPicker(k);let L=!1,R=new T.Range(I.range.startLineNumber,I.range.startColumn,I.range.endLineNumber,I.range.endColumn);if(l instanceof o){const M=w[0].model.color;l.color=M,c(_,A,M,R,I),C.add(A.onColorFlushed(N=>{l.color=N}))}else C.add(A.onColorFlushed(async M=>{await c(_,A,M,R,I),L=!0,R=p(n,R,A,E)}));return C.add(A.onDidChangeColor(M=>{c(_,A,M,R,I)})),C.add(n.onDidChangeModelContent(M=>{L?L=!1:(E.hide(),n.focus())})),C}function p(l,n,g,w){let E,C;if(g.presentation.textEdit){E=[g.presentation.textEdit],C=new T.Range(g.presentation.textEdit.range.startLineNumber,g.presentation.textEdit.range.startColumn,g.presentation.textEdit.range.endLineNumber,g.presentation.textEdit.range.endColumn);const I=l.getModel()._setTrackedRange(null,C,3);l.pushUndoStop(),l.executeEdits("colorpicker",E),C=l.getModel()._getTrackedRange(I)||C}else E=[{range:n,text:g.presentation.label,forceMoveMarkers:!1}],C=n.setEndPosition(n.endLineNumber,n.startColumn+g.presentation.label.length),l.pushUndoStop(),l.executeEdits("colorpicker",E);return g.presentation.additionalTextEdits&&(E=[...g.presentation.additionalTextEdits],l.executeEdits("colorpicker",E),w&&w.hide()),l.pushUndoStop(),C}async function c(l,n,g,w,E){const C=await(0,f.getColorPresentations)(l,{range:w,color:{red:g.rgba.r/255,green:g.rgba.g/255,blue:g.rgba.b/255,alpha:g.rgba.a}},E.provider,y.CancellationToken.None);n.colorPresentations=C||[]}}),define(Q[1221],Y([1,0,4,18,48,51,27,96,98,1911,1724]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropController=void 0;function S(a){return y.isMacintosh?a.altKey:a.ctrlKey}class h extends t.Disposable{static{this.ID="editor.contrib.dragAndDrop"}static{this.TRIGGER_KEY_VALUE=y.isMacintosh?6:5}static get(r){return r.getContribution(h.ID)}constructor(r){super(),this._editor=r,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._register(this._editor.onMouseDrag(i=>this._onEditorMouseDrag(i))),this._register(this._editor.onMouseDrop(i=>this._onEditorMouseDrop(i))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(i=>this.onEditorKeyDown(i))),this._register(this._editor.onKeyUp(i=>this.onEditorKeyUp(i))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(r){!this._editor.getOption(34)||this._editor.getOption(21)||(S(r)&&(this._modifierPressed=!0),this._mouseDown&&S(r)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(r){!this._editor.getOption(34)||this._editor.getOption(21)||(S(r)&&(this._modifierPressed=!1),this._mouseDown&&r.keyCode===h.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(r){this._mouseDown=!0}_onEditorMouseUp(r){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(r){const i=r.target;if(this._dragSelection===null){const o=(this._editor.getSelections()||[]).filter(u=>i.position&&u.containsPosition(i.position));if(o.length===1)this._dragSelection=o[0];else return}S(r.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),i.position&&(this._dragSelection.containsPosition(i.position)?this._removeDecoration():this.showAt(i.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(r){if(r.target&&(this._hitContent(r.target)||this._hitMargin(r.target))&&r.target.position){const i=new D.Position(r.target.position.lineNumber,r.target.position.column);if(this._dragSelection===null){let s=null;if(r.event.shiftKey){const o=this._editor.getSelection();if(o){const{selectionStartLineNumber:u,selectionStartColumn:d}=o;s=[new f.Selection(u,d,i.lineNumber,i.column)]}}else s=(this._editor.getSelections()||[]).map(o=>o.containsPosition(i)?new f.Selection(i.lineNumber,i.column,i.lineNumber,i.column):o);this._editor.setSelections(s||[],"mouse",3)}else(!this._dragSelection.containsPosition(i)||(S(r.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(i)||this._dragSelection.getStartPosition().equals(i)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(h.ID,new m.DragAndDropCommand(this._dragSelection,i,S(r.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}static{this._DECORATION_OPTIONS=v.ModelDecorationOptions.register({description:"dnd-target",className:"dnd-target"})}showAt(r){this._dndDecorationIds.set([{range:new T.Range(r.lineNumber,r.column,r.lineNumber,r.column),options:h._DECORATION_OPTIONS}]),this._editor.revealPosition(r,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(r){return r.type===6||r.type===7}_hitMargin(r){return r.type===2||r.type===3||r.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}e.DragAndDropController=h,(0,b.registerEditorContribution)(h.ID,h,2)}),define(Q[1222],Y([1,0,27,137,98,36,19]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindDecorations=void 0;class f{constructor(m){this._editor=m,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const m=this._findScopeDecorationIds.map(S=>this._editor.getModel().getDecorationRange(S)).filter(S=>!!S);if(m.length)return m}return null}getStartPosition(){return this._startPosition}setStartPosition(m){this._startPosition=m,this.setCurrentFindMatch(null)}_getDecorationIndex(m){const S=this._decorations.indexOf(m);return S>=0?S+1:1}getDecorationRangeAt(m){const S=m<this._decorations.length?this._decorations[m]:null;return S?this._editor.getModel().getDecorationRange(S):null}getCurrentMatchesPosition(m){const S=this._editor.getModel().getDecorationsInRange(m);for(const h of S){const a=h.options;if(a===f._FIND_MATCH_DECORATION||a===f._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(h.id)}return 0}setCurrentFindMatch(m){let S=null,h=0;if(m)for(let a=0,r=this._decorations.length;a<r;a++){const i=this._editor.getModel().getDecorationRange(this._decorations[a]);if(m.equalsRange(i)){S=this._decorations[a],h=a+1;break}}return(this._highlightedDecorationId!==null||S!==null)&&this._editor.changeDecorations(a=>{if(this._highlightedDecorationId!==null&&(a.changeDecorationOptions(this._highlightedDecorationId,f._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),S!==null&&(this._highlightedDecorationId=S,a.changeDecorationOptions(this._highlightedDecorationId,f._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(a.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),S!==null){let r=this._editor.getModel().getDecorationRange(S);if(r.startLineNumber!==r.endLineNumber&&r.endColumn===1){const i=r.endLineNumber-1,s=this._editor.getModel().getLineMaxColumn(i);r=new t.Range(r.startLineNumber,r.startColumn,i,s)}this._rangeHighlightDecorationId=a.addDecoration(r,f._RANGE_HIGHLIGHT_DECORATION)}}),h}set(m,S){this._editor.changeDecorations(h=>{let a=f._FIND_MATCH_DECORATION;const r=[];if(m.length>1e3){a=f._FIND_MATCH_NO_OVERVIEW_DECORATION;const s=this._editor.getModel().getLineCount(),u=this._editor.getLayoutInfo().height/s,d=Math.max(2,Math.ceil(3/u));let p=m[0].range.startLineNumber,c=m[0].range.endLineNumber;for(let l=1,n=m.length;l<n;l++){const g=m[l].range;c+d>=g.startLineNumber?g.endLineNumber>c&&(c=g.endLineNumber):(r.push({range:new t.Range(p,1,c,1),options:f._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),p=g.startLineNumber,c=g.endLineNumber)}r.push({range:new t.Range(p,1,c,1),options:f._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const i=new Array(m.length);for(let s=0,o=m.length;s<o;s++)i[s]={range:m[s].range,options:a};this._decorations=h.deltaDecorations(this._decorations,i),this._overviewRulerApproximateDecorations=h.deltaDecorations(this._overviewRulerApproximateDecorations,r),this._rangeHighlightDecorationId&&(h.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(s=>h.removeDecoration(s)),this._findScopeDecorationIds=[]),S?.length&&(this._findScopeDecorationIds=S.map(s=>h.addDecoration(s,f._FIND_SCOPE_DECORATION)))})}matchBeforePosition(m){if(this._decorations.length===0)return null;for(let S=this._decorations.length-1;S>=0;S--){const h=this._decorations[S],a=this._editor.getModel().getDecorationRange(h);if(!(!a||a.endLineNumber>m.lineNumber)){if(a.endLineNumber<m.lineNumber)return a;if(!(a.endColumn>m.column))return a}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(m){if(this._decorations.length===0)return null;for(let S=0,h=this._decorations.length;S<h;S++){const a=this._decorations[S],r=this._editor.getModel().getDecorationRange(a);if(!(!r||r.startLineNumber<m.lineNumber)){if(r.startLineNumber>m.lineNumber)return r;if(!(r.startColumn<m.column))return r}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let m=[];return m=m.concat(this._decorations),m=m.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&m.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&m.push(this._rangeHighlightDecorationId),m}static{this._CURRENT_FIND_MATCH_DECORATION=b.ModelDecorationOptions.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:(0,T.themeColorFromId)(D.overviewRulerFindMatchForeground),position:y.OverviewRulerLane.Center},minimap:{color:(0,T.themeColorFromId)(D.minimapFindMatch),position:y.MinimapPosition.Inline}})}static{this._FIND_MATCH_DECORATION=b.ModelDecorationOptions.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:(0,T.themeColorFromId)(D.overviewRulerFindMatchForeground),position:y.OverviewRulerLane.Center},minimap:{color:(0,T.themeColorFromId)(D.minimapFindMatch),position:y.MinimapPosition.Inline}})}static{this._FIND_MATCH_NO_OVERVIEW_DECORATION=b.ModelDecorationOptions.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0})}static{this._FIND_MATCH_ONLY_OVERVIEW_DECORATION=b.ModelDecorationOptions.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,T.themeColorFromId)(D.overviewRulerFindMatchForeground),position:y.OverviewRulerLane.Center}})}static{this._RANGE_HIGHLIGHT_DECORATION=b.ModelDecorationOptions.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0})}static{this._FIND_SCOPE_DECORATION=b.ModelDecorationOptions.register({description:"find-scope",className:"findScope",isWholeLine:!0})}}e.FindDecorations=f}),define(Q[352],Y([1,0,20,14,4,487,51,27,96,440,1222,1912,1086,8]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindModelBoundToEditorModel=e.MATCHES_LIMIT=e.FIND_IDS=e.TogglePreserveCaseKeybinding=e.ToggleSearchScopeKeybinding=e.ToggleRegexKeybinding=e.ToggleWholeWordKeybinding=e.ToggleCaseSensitiveKeybinding=e.CONTEXT_REPLACE_INPUT_FOCUSED=e.CONTEXT_FIND_INPUT_FOCUSED=e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE=void 0,e.CONTEXT_FIND_WIDGET_VISIBLE=new r.RawContextKey("findWidgetVisible",!1),e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE.toNegated(),e.CONTEXT_FIND_INPUT_FOCUSED=new r.RawContextKey("findInputFocussed",!1),e.CONTEXT_REPLACE_INPUT_FOCUSED=new r.RawContextKey("replaceInputFocussed",!1),e.ToggleCaseSensitiveKeybinding={primary:545,mac:{primary:2593}},e.ToggleWholeWordKeybinding={primary:565,mac:{primary:2613}},e.ToggleRegexKeybinding={primary:560,mac:{primary:2608}},e.ToggleSearchScopeKeybinding={primary:554,mac:{primary:2602}},e.TogglePreserveCaseKeybinding={primary:558,mac:{primary:2606}},e.FIND_IDS={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},e.MATCHES_LIMIT=19999;const i=240;class s{constructor(u,d){this._toDispose=new b.DisposableStore,this._editor=u,this._state=d,this._isDisposed=!1,this._startSearchingTimer=new y.TimeoutTimer,this._decorations=new S.FindDecorations(u),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new y.RunOnceScheduler(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(p=>{(p.reason===3||p.reason===5||p.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(p=>{this._ignoreModelContentChanged||(p.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(p=>this._onStateChanged(p))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,b.dispose)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(u){this._isDisposed||this._editor.hasModel()&&(u.searchString||u.isReplaceRevealed||u.isRegex||u.wholeWord||u.matchCase||u.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{u.searchScope?this.research(u.moveCursor,this._state.searchScope):this.research(u.moveCursor)},i)):u.searchScope?this.research(u.moveCursor,this._state.searchScope):this.research(u.moveCursor))}static _getSearchRange(u,d){return d||u.getFullModelRange()}research(u,d){let p=null;typeof d<"u"?d!==null&&(Array.isArray(d)?p=d:p=[d]):p=this._decorations.getFindScopes(),p!==null&&(p=p.map(g=>{if(g.startLineNumber!==g.endLineNumber){let w=g.endLineNumber;return g.endColumn===1&&(w=w-1),new f.Range(g.startLineNumber,1,w,this._editor.getModel().getLineMaxColumn(w))}return g}));const c=this._findMatches(p,!1,e.MATCHES_LIMIT);this._decorations.set(c,p);const l=this._editor.getSelection();let n=this._decorations.getCurrentMatchesPosition(l);if(n===0&&c.length>0){const g=(0,t.findFirstInSorted)(c.map(w=>w.range),w=>f.Range.compareRangesUsingStarts(w,l)>=0);n=g>0?g-1+1:n}this._state.changeMatchInfo(n,this._decorations.getCount(),void 0),u&&this._editor.getOption(40).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const u=this._decorations.getFindScope();return u&&this._editor.revealRangeInCenterIfOutsideViewport(u,0),!0}return!1}_setCurrentFindMatch(u){const d=this._decorations.setCurrentFindMatch(u);this._state.changeMatchInfo(d,this._decorations.getCount(),u),this._editor.setSelection(u),this._editor.revealRangeInCenterIfOutsideViewport(u,0)}_prevSearchPosition(u){const d=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:p,column:c}=u;const l=this._editor.getModel();return d||c===1?(p===1?p=l.getLineCount():p--,c=l.getLineMaxColumn(p)):c--,new T.Position(p,c)}_moveToPrevMatch(u,d=!1){if(!this._state.canNavigateBack()){const C=this._decorations.matchAfterPosition(u);C&&this._setCurrentFindMatch(C);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let C=this._decorations.matchBeforePosition(u);C&&C.isEmpty()&&C.getStartPosition().equals(u)&&(u=this._prevSearchPosition(u),C=this._decorations.matchBeforePosition(u)),C&&this._setCurrentFindMatch(C);return}if(this._cannotFind())return;const p=this._decorations.getFindScope(),c=s._getSearchRange(this._editor.getModel(),p);c.getEndPosition().isBefore(u)&&(u=c.getEndPosition()),u.isBefore(c.getStartPosition())&&(u=c.getEndPosition());const{lineNumber:l,column:n}=u,g=this._editor.getModel();let w=new T.Position(l,n),E=g.findPreviousMatch(this._state.searchString,w,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,!1);if(E&&E.range.isEmpty()&&E.range.getStartPosition().equals(w)&&(w=this._prevSearchPosition(w),E=g.findPreviousMatch(this._state.searchString,w,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,!1)),!!E){if(!d&&!c.containsRange(E.range))return this._moveToPrevMatch(E.range.getStartPosition(),!0);this._setCurrentFindMatch(E.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(u){const d=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:p,column:c}=u;const l=this._editor.getModel();return d||c===l.getLineMaxColumn(p)?(p===l.getLineCount()?p=1:p++,c=1):c++,new T.Position(p,c)}_moveToNextMatch(u){if(!this._state.canNavigateForward()){const p=this._decorations.matchBeforePosition(u);p&&this._setCurrentFindMatch(p);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let p=this._decorations.matchAfterPosition(u);p&&p.isEmpty()&&p.getStartPosition().equals(u)&&(u=this._nextSearchPosition(u),p=this._decorations.matchAfterPosition(u)),p&&this._setCurrentFindMatch(p);return}const d=this._getNextMatch(u,!1,!0);d&&this._setCurrentFindMatch(d.range)}_getNextMatch(u,d,p,c=!1){if(this._cannotFind())return null;const l=this._decorations.getFindScope(),n=s._getSearchRange(this._editor.getModel(),l);n.getEndPosition().isBefore(u)&&(u=n.getStartPosition()),u.isBefore(n.getStartPosition())&&(u=n.getStartPosition());const{lineNumber:g,column:w}=u,E=this._editor.getModel();let C=new T.Position(g,w),I=E.findNextMatch(this._state.searchString,C,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,d);return p&&I&&I.range.isEmpty()&&I.range.getStartPosition().equals(C)&&(C=this._nextSearchPosition(C),I=E.findNextMatch(this._state.searchString,C,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,d)),I?!c&&!n.containsRange(I.range)?this._getNextMatch(I.range.getEndPosition(),d,p,!0):I:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_moveToMatch(u){const d=this._decorations.getDecorationRangeAt(u);d&&this._setCurrentFindMatch(d)}moveToMatch(u){this._moveToMatch(u)}_getReplacePattern(){return this._state.isRegex?(0,a.parseReplaceString)(this._state.replaceString):a.ReplacePattern.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const u=this._getReplacePattern(),d=this._editor.getSelection(),p=this._getNextMatch(d.getStartPosition(),!0,!1);if(p)if(d.equalsRange(p.range)){const c=u.buildReplaceString(p.matches,this._state.preserveCase),l=new D.ReplaceCommand(d,c);this._executeEditorCommand("replace",l),this._decorations.setStartPosition(new T.Position(d.startLineNumber,d.startColumn+c.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(p.range)}_findMatches(u,d,p){const c=(u||[null]).map(l=>s._getSearchRange(this._editor.getModel(),l));return this._editor.getModel().findMatches(this._state.searchString,c,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,d,p)}replaceAll(){if(!this._hasMatches())return;const u=this._decorations.getFindScopes();u===null&&this._state.matchesCount>=e.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(u),this.research(!1)}_largeReplaceAll(){const d=new m.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null).parseSearchRequest();if(!d)return;let p=d.regex;if(!p.multiline){let I="mu";p.ignoreCase&&(I+="i"),p.global&&(I+="g"),p=new RegExp(p.source,I)}const c=this._editor.getModel(),l=c.getValue(1),n=c.getFullModelRange(),g=this._getReplacePattern();let w;const E=this._state.preserveCase;g.hasReplacementPatterns||E?w=l.replace(p,function(){return g.buildReplaceString(arguments,E)}):w=l.replace(p,g.buildReplaceString(null,E));const C=new D.ReplaceCommandThatPreservesSelection(n,w,this._editor.getSelection());this._executeEditorCommand("replaceAll",C)}_regularReplaceAll(u){const d=this._getReplacePattern(),p=this._findMatches(u,d.hasReplacementPatterns||this._state.preserveCase,1073741824),c=[];for(let n=0,g=p.length;n<g;n++)c[n]=d.buildReplaceString(p[n].matches,this._state.preserveCase);const l=new h.ReplaceAllCommand(this._editor.getSelection(),p.map(n=>n.range),c);this._executeEditorCommand("replaceAll",l)}selectAllMatches(){if(!this._hasMatches())return;const u=this._decorations.getFindScopes();let p=this._findMatches(u,!1,1073741824).map(l=>new v.Selection(l.range.startLineNumber,l.range.startColumn,l.range.endLineNumber,l.range.endColumn));const c=this._editor.getSelection();for(let l=0,n=p.length;l<n;l++)if(p[l].equalsRange(c)){p=[c].concat(p.slice(0,l)).concat(p.slice(l+1));break}this._editor.setSelections(p)}_executeEditorCommand(u,d){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(u,d),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}e.FindModelBoundToEditorModel=s}),define(Q[3402],Y([1,0,2100,15,18,33,7,498,142,229,352,54]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindWidget=e.ACTION_IDS=e.NOTEBOOK_MAX_MATCHES=void 0;const a=t.localize(0,null),r=t.localize(1,null),i=t.localize(2,null),s=t.localize(3,null),o=t.localize(4,null),u=t.localize(5,null),d=t.localize(6,null),p=t.localize(7,null),c=411,n=275-54;let g=69;e.NOTEBOOK_MAX_MATCHES=999,e.ACTION_IDS={FIND_NEXT:"findNext",FIND_PREVIOUS:"findPrev"};class w extends v.Widget{static{this.ID="editor.contrib.findWidget"}constructor(I,_,A,k,L,R){super(),this._notebookController=I,this._state=_,this._contextViewProvider=A,this._keybindingService=k,this._isVisible=!1,this._register(this._state.onFindReplaceStateChange(N=>this._onStateChanged(N))),this._buildDomNode(),this._updateButtons();let M=()=>{let N=this._notebookController.getConfiguration().layoutInfo.width;const P=this._notebookController.getConfiguration().layoutInfo.minimapWidth;let x=!1,F=!1,V=!1;if(T.getTotalWidth(this._domNode)>c){this._domNode.style.maxWidth=`${N-28-15}px`;return}c+28+P>=N&&(F=!0),c+28+P-g>=N&&(V=!0),c+28+P-g>=N+50&&(x=!0),this._domNode.classList.toggle("collapsed-find-widget",x),this._domNode.classList.toggle("narrow-find-widget",V),this._domNode.classList.toggle("reduced-find-widget",F),!V&&!x&&(this._domNode.style.maxWidth=`${N-28-15}px`)};M(),this._register(this._notebookController.onDidChangeConfiguration(N=>{N.layoutInfo&&M()})),this._findInputFocussed=S.CONTEXT_FIND_INPUT_FOCUSED.bindTo(L),this._focusTracker=this._register(T.trackFocus(this._findInput.inputBox.inputElement)),this._focusTracker.onDidFocus(()=>{this._findInputFocussed.set(!0)}),this._focusTracker.onDidBlur(()=>{this._findInputFocussed.set(!1)}),this._notebookController.addOverlayWidget(this),this.onkeyup(this._domNode,N=>{if(N.equals(9)){this._state.change({isRevealed:!1,searchScope:null},!1),N.preventDefault();return}})}getId(){return w.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(I){if(I.searchString&&(this._findInput.setValue(this._state.searchString),this._updateButtons()),I.isRevealed&&(this._state.isRevealed?this._reveal(!0):this._hide(!0)),I.isRegex&&this._findInput.setRegex(this._state.isRegex),I.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),I.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),I.searchString||I.matchesCount||I.matchesPosition){let _=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",_),this._updateMatchesCount()}}_updateMatchesCount(){this._matchesCount.style.minWidth=g+"px",this._state.matchesCount>=e.NOTEBOOK_MAX_MATCHES?this._matchesCount.title=u:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let I;if(this._state.matchesCount>0){let _=String(this._state.matchesCount);this._state.matchesCount>=e.NOTEBOOK_MAX_MATCHES&&(_=e.NOTEBOOK_MAX_MATCHES+"+");let A=String(this._state.matchesPosition);A==="0"&&(A="?"),I=D.format(d,A,_)}else I=p;this._matchesCount.appendChild(document.createTextNode(I)),g=Math.max(g,this._matchesCount.clientWidth)}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._closeBtn.setEnabled(this._isVisible);let I=this._state.searchString.length>0;this._prevBtn.setEnabled(this._isVisible&&I),this._nextBtn.setEnabled(this._isVisible&&I)}_reveal(I){this._isVisible||(this._isVisible=!0,this._updateButtons(),setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false"),I||(this._domNode.classList.add("noanimation"),setTimeout(()=>{this._domNode.classList.remove("noanimation")},200))},0),this._notebookController.layoutOverlayWidget(this))}_hide(I){this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),I&&this._notebookController.focus(),this._notebookController.layoutOverlayWidget(this))}focusFindInput(){this._findInput.focus()}setFindInput(I){this._findInput.inputBox.value=I}highlightFindOptions(){this._findInput.highlightFindOptions()}_onFindInputMouseDown(I){I.middleButton&&I.stopPropagation()}_onFindInputKeyDown(I){if(I.equals(3)){this._notebookController.getAction(e.ACTION_IDS.FIND_NEXT).run().then(null,y.onUnexpectedError).finally(()=>this._findInput.focus()),I.preventDefault();return}if(I.equals(1027)){this._notebookController.getAction(e.ACTION_IDS.FIND_PREVIOUS).run().then(null,y.onUnexpectedError).finally(()=>this._findInput.focus()),I.preventDefault();return}if(I.equals(2)){this._findInput.focusOnCaseSensitive(),I.preventDefault();return}if(I.equals(2066)){this._notebookController.focus(),I.preventDefault();return}}getVerticalSashLeft(I){return 0}_keybindingLabelFor(I){let _=this._keybindingService.lookupKeybinding(I);return _?` (${_.getLabel()})`:""}_buildFindPart(){this._findInput=this._register(new f.FindInput(null,this._contextViewProvider,{width:n,label:a,placeholder:r,appendCaseSensitiveLabel:this._keybindingLabelFor(S.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(S.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(S.FIND_IDS.ToggleRegexCommand),inputBoxStyles:h.defaultInputBoxStyles,toggleStyles:h.defaultToggleStyles,validation:A=>{if(A.length===0||!this._findInput.getRegex())return null;try{return new RegExp(A),null}catch(k){return{content:k.message}}}})),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(A=>this._onFindInputKeyDown(A))),this._register(this._findInput.onInput(()=>{let A=this;A.searchTimeoutHandle&&window.clearTimeout(A.searchTimeoutHandle),this.searchTimeoutHandle=window.setTimeout(function(){A._state.change({searchString:A._findInput.getValue()},!0)},300)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),b.isLinux&&this._register(this._findInput.onMouseDown(A=>this._onFindInputMouseDown(A))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new E({label:i+this._keybindingLabelFor(S.FIND_IDS.PreviousMatchFindAction),className:"codicon codicon-arrow-up",onTrigger:()=>{this._notebookController.getAction(e.ACTION_IDS.FIND_PREVIOUS).run().then(null,y.onUnexpectedError)},onKeyDown:A=>{}})),this._nextBtn=this._register(new E({label:s+this._keybindingLabelFor(S.FIND_IDS.NextMatchFindAction),className:"codicon codicon-arrow-down",onTrigger:()=>{this._notebookController.getAction(e.ACTION_IDS.FIND_NEXT).run().then(null,y.onUnexpectedError)},onKeyDown:A=>{}}));let I=document.createElement("div");I.className="find-part",I.appendChild(this._findInput.domNode);let _=document.createElement("div");return I.appendChild(_),_.className="find-actions",_.appendChild(this._matchesCount),_.appendChild(this._prevBtn.domNode),_.appendChild(this._nextBtn.domNode),this._closeBtn=this._register(new E({label:o+this._keybindingLabelFor(S.FIND_IDS.CloseFindWidgetCommand),className:"codicon codicon-close",onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:()=>{}})),_.appendChild(this._closeBtn.domNode),I}_buildDomNode(){let I=this._buildFindPart();this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.appendChild(I),this._buildSash()}_buildSash(){this._resizeSash=new m.Sash(this._domNode,this,{orientation:0});let I=c;this._register(this._resizeSash.onDidStart(_=>{I=T.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(_=>{let A=I+_.startX-_.currentX;if(A<c)return;let k=parseFloat(T.getComputedStyle(this._domNode).maxWidth)||0;A>k||(this._domNode.style.width=`${A}px`)}))}}e.FindWidget=w;class E extends v.Widget{constructor(I){super(),this._opts=I,this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className="button "+this._opts.className,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,_=>{this._opts.onTrigger(),_.preventDefault()}),this.onkeydown(this._domNode,_=>{if(_.equals(10)||_.equals(3)){this._opts.onTrigger(),_.preventDefault();return}this._opts.onKeyDown(_)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(I){this._domNode.classList.toggle("disabled",!I),this._domNode.setAttribute("aria-disabled",String(!I)),this._domNode.tabIndex=I?0:-1}setExpanded(I){this._domNode.setAttribute("aria-expanded",String(!!I))}toggleClass(I,_){this._domNode.classList.toggle(I,_)}}}),define(Q[3403],Y([1,0,2127,15,18,33,7,498,142,229,352,54]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindWidget=e.ACTION_IDS=e.PROFILER_MAX_MATCHES=void 0;const a=t.localize(0,null),r=t.localize(1,null),i=t.localize(2,null),s=t.localize(3,null),o=t.localize(4,null),u=t.localize(5,null),d=t.localize(6,null),p=t.localize(7,null),c=411,n=275-54;let g=69;e.PROFILER_MAX_MATCHES=999,e.ACTION_IDS={FIND_NEXT:"findNext",FIND_PREVIOUS:"findPrev"};class w extends v.Widget{static{this.ID="editor.contrib.findWidget"}constructor(I,_,A,k,L,R){super(),this._tableController=I,this._state=_,this._contextViewProvider=A,this._keybindingService=k,this._isVisible=!1,this._register(this._state.onFindReplaceStateChange(N=>this._onStateChanged(N))),this._buildDomNode(),this._updateButtons();let M=()=>{let N=this._tableController.getConfiguration().layoutInfo.width,P=!1,x=!1,F=!1;if(T.getTotalWidth(this._domNode)>c){this._domNode.style.maxWidth=`${N-28-15}px`;return}c+28>=N&&(x=!0),c+28-g>=N&&(F=!0),c+28-g>=N+50&&(P=!0),this._domNode.classList.toggle("collapsed-find-widget",P),this._domNode.classList.toggle("narrow-find-widget",F),this._domNode.classList.toggle("reduced-find-widget",x),!F&&!P&&(this._domNode.style.maxWidth=`${N-28-15}px`)};M(),this._register(this._tableController.onDidChangeConfiguration(N=>{N.layoutInfo&&M()})),this._findInputFocussed=S.CONTEXT_FIND_INPUT_FOCUSED.bindTo(L),this._focusTracker=this._register(T.trackFocus(this._findInput.inputBox.inputElement)),this._focusTracker.onDidFocus(()=>{this._findInputFocussed.set(!0)}),this._focusTracker.onDidBlur(()=>{this._findInputFocussed.set(!1)}),this._tableController.addOverlayWidget(this)}getId(){return w.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(I){if(I.searchString&&(this._findInput.setValue(this._state.searchString),this._updateButtons()),I.isRevealed&&(this._state.isRevealed?this._reveal(!0):this._hide(!0)),I.isRegex&&this._findInput.setRegex(this._state.isRegex),I.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),I.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),I.searchString||I.matchesCount||I.matchesPosition){let _=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",_),this._updateMatchesCount()}}_updateMatchesCount(){this._matchesCount.style.minWidth=g+"px",this._state.matchesCount>=e.PROFILER_MAX_MATCHES?this._matchesCount.title=u:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let I;if(this._state.matchesCount>0){let _=String(this._state.matchesCount);this._state.matchesCount>=e.PROFILER_MAX_MATCHES&&(_=e.PROFILER_MAX_MATCHES+"+");let A=String(this._state.matchesPosition);A==="0"&&(A="?"),I=D.format(d,A,_)}else I=p;this._matchesCount.appendChild(document.createTextNode(I)),g=Math.max(g,this._matchesCount.clientWidth)}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._closeBtn.setEnabled(this._isVisible);let I=this._state.searchString.length>0;this._prevBtn.setEnabled(this._isVisible&&I),this._nextBtn.setEnabled(this._isVisible&&I)}_reveal(I){this._isVisible||(this._isVisible=!0,this._updateButtons(),setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false"),this._domNode.style.display="",I||(this._domNode.classList.add("noanimation"),setTimeout(()=>{this._domNode.classList.remove("noanimation")},200))},0),this._tableController.layoutOverlayWidget(this))}_hide(I){this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.display="none",I&&this._tableController.focus(),this._tableController.layoutOverlayWidget(this))}focusFindInput(){this._findInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_onFindInputMouseDown(I){I.middleButton&&I.stopPropagation()}_onFindInputKeyDown(I){if(I.equals(3)){this._tableController.getAction(e.ACTION_IDS.FIND_NEXT).run().then(null,y.onUnexpectedError),I.preventDefault();return}if(I.equals(1027)){this._tableController.getAction(e.ACTION_IDS.FIND_PREVIOUS).run().then(null,y.onUnexpectedError),I.preventDefault();return}if(I.equals(2)){this._findInput.focusOnCaseSensitive(),I.preventDefault();return}if(I.equals(2066)){this._tableController.focus(),I.preventDefault();return}}getVerticalSashLeft(I){return 0}_keybindingLabelFor(I){let _=this._keybindingService.lookupKeybinding(I);return _?` (${_.getLabel()})`:""}_buildFindPart(){this._findInput=this._register(new f.FindInput(null,this._contextViewProvider,{width:n,label:a,placeholder:r,appendCaseSensitiveLabel:this._keybindingLabelFor(S.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(S.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(S.FIND_IDS.ToggleRegexCommand),validation:A=>{if(A.length===0||!this._findInput.getRegex())return null;try{return new RegExp(A),null}catch(k){return{content:k.message}}},toggleStyles:h.defaultToggleStyles,inputBoxStyles:h.defaultInputBoxStyles})),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(A=>this._onFindInputKeyDown(A))),this._register(this._findInput.onInput(()=>{let A=this;A.searchTimeoutHandle&&clearTimeout(A.searchTimeoutHandle),this.searchTimeoutHandle=setTimeout(function(){A._state.change({searchString:A._findInput.getValue()},!0)},300)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),b.isLinux&&this._register(this._findInput.onMouseDown(A=>this._onFindInputMouseDown(A))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new E({label:i+this._keybindingLabelFor(S.FIND_IDS.PreviousMatchFindAction),className:"codicon codicon-arrow-up",onTrigger:()=>{this._tableController.getAction(e.ACTION_IDS.FIND_PREVIOUS).run().then(null,y.onUnexpectedError)},onKeyDown:A=>{}})),this._nextBtn=this._register(new E({label:s+this._keybindingLabelFor(S.FIND_IDS.NextMatchFindAction),className:"codicon codicon-arrow-down",onTrigger:()=>{this._tableController.getAction(e.ACTION_IDS.FIND_NEXT).run().then(null,y.onUnexpectedError)},onKeyDown:A=>{}}));let I=document.createElement("div");I.className="find-part",I.appendChild(this._findInput.domNode);let _=document.createElement("div");return I.appendChild(_),_.className="find-actions",_.appendChild(this._matchesCount),_.appendChild(this._prevBtn.domNode),_.appendChild(this._nextBtn.domNode),this._closeBtn=this._register(new E({label:o+this._keybindingLabelFor(S.FIND_IDS.CloseFindWidgetCommand),className:"codicon codicon-close",onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:()=>{}})),_.appendChild(this._closeBtn.domNode),I}_buildDomNode(){let I=this._buildFindPart();this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.display="none",this._domNode.appendChild(I),this._buildSash()}_buildSash(){this._resizeSash=new m.Sash(this._domNode,this,{orientation:0});let I=c;this._register(this._resizeSash.onDidStart(_=>{I=T.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(_=>{let A=I+_.startX-_.currentX;if(A<c)return;let k=parseFloat(T.getComputedStyle(this._domNode).maxWidth)||0;A>k||(this._domNode.style.width=`${A}px`)}))}}e.FindWidget=w;class E extends v.Widget{constructor(I){super(),this._opts=I,this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className="button "+this._opts.className,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,_=>{this._opts.onTrigger(),_.preventDefault()}),this.onkeydown(this._domNode,_=>{if(_.equals(10)||_.equals(3)){this._opts.onTrigger(),_.preventDefault();return}this._opts.onKeyDown(_)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(I){this._domNode.classList.toggle("disabled",!I),this._domNode.setAttribute("aria-disabled",String(!I)),this._domNode.tabIndex=I?0:-1}setExpanded(I){this._domNode.setAttribute("aria-expanded",String(!!I))}toggleClass(I,_){this._domNode.classList.toggle(I,_)}}}),define(Q[3404],Y([1,0,7,1125,142,14,352,36,1726]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindOptionsWidget=void 0;class v extends b.Widget{static{this.ID="editor.contrib.findOptionsWidget"}constructor(S,h,a){super(),this._hideSoon=this._register(new D.RunOnceScheduler(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=S,this._state=h,this._keybindingService=a,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const r={inputActiveOptionBorder:(0,f.asCssVariable)(f.inputActiveOptionBorder),inputActiveOptionForeground:(0,f.asCssVariable)(f.inputActiveOptionForeground),inputActiveOptionBackground:(0,f.asCssVariable)(f.inputActiveOptionBackground)};this.caseSensitive=this._register(new y.CaseSensitiveToggle({appendTitle:this._keybindingLabelFor(T.FIND_IDS.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,...r})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new y.WholeWordsToggle({appendTitle:this._keybindingLabelFor(T.FIND_IDS.ToggleWholeWordCommand),isChecked:this._state.wholeWord,...r})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new y.RegexToggle({appendTitle:this._keybindingLabelFor(T.FIND_IDS.ToggleRegexCommand),isChecked:this._state.isRegex,...r})),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(i=>{let s=!1;i.isRegex&&(this.regex.checked=this._state.isRegex,s=!0),i.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,s=!0),i.matchCase&&(this.caseSensitive.checked=this._state.matchCase,s=!0),!this._state.isRevealed&&s&&this._revealTemporarily()})),this._register(t.addDisposableListener(this._domNode,t.EventType.MOUSE_LEAVE,i=>this._onMouseLeave())),this._register(t.addDisposableListener(this._domNode,"mouseover",i=>this._onMouseOver()))}_keybindingLabelFor(S){const h=this._keybindingService.lookupKeybinding(S);return h?` (${h.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return v.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}e.FindOptionsWidget=v}),define(Q[517],Y([1,0,6,4,27,352]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindReplaceState=e.FindOptionOverride=void 0;var T;(function(m){m[m.NotSet=0]="NotSet",m[m.True=1]="True",m[m.False=2]="False"})(T||(e.FindOptionOverride=T={}));function f(m,S){return m===1?!0:m===2?!1:S}class v extends y.Disposable{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return f(this._isRegexOverride,this._isRegex)}get wholeWord(){return f(this._wholeWordOverride,this._wholeWord)}get matchCase(){return f(this._matchCaseOverride,this._matchCase)}get preserveCase(){return f(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}get isSearching(){return this._isSearching}get filters(){return this._filters}constructor(){super(),this._onFindReplaceStateChange=this._register(new t.Emitter),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(S,h,a){const r={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let i=!1;h===0&&(S=0),S>h&&(S=h),this._matchesPosition!==S&&(this._matchesPosition=S,r.matchesPosition=!0,i=!0),this._matchesCount!==h&&(this._matchesCount=h,r.matchesCount=!0,i=!0),typeof a<"u"&&(b.Range.equalsRange(this._currentMatch,a)||(this._currentMatch=a,r.currentMatch=!0,i=!0)),i&&this._onFindReplaceStateChange.fire(r)}change(S,h,a=!0){const r={moveCursor:h,updateHistory:a,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let i=!1;const s=this.isRegex,o=this.wholeWord,u=this.matchCase,d=this.preserveCase;typeof S.searchString<"u"&&this._searchString!==S.searchString&&(this._searchString=S.searchString,r.searchString=!0,i=!0),typeof S.replaceString<"u"&&this._replaceString!==S.replaceString&&(this._replaceString=S.replaceString,r.replaceString=!0,i=!0),typeof S.isRevealed<"u"&&this._isRevealed!==S.isRevealed&&(this._isRevealed=S.isRevealed,r.isRevealed=!0,i=!0),typeof S.isReplaceRevealed<"u"&&this._isReplaceRevealed!==S.isReplaceRevealed&&(this._isReplaceRevealed=S.isReplaceRevealed,r.isReplaceRevealed=!0,i=!0),typeof S.isRegex<"u"&&(this._isRegex=S.isRegex),typeof S.wholeWord<"u"&&(this._wholeWord=S.wholeWord),typeof S.matchCase<"u"&&(this._matchCase=S.matchCase),typeof S.preserveCase<"u"&&(this._preserveCase=S.preserveCase),typeof S.searchScope<"u"&&(S.searchScope?.every(p=>this._searchScope?.some(c=>!b.Range.equalsRange(c,p)))||(this._searchScope=S.searchScope,r.searchScope=!0,i=!0)),typeof S.loop<"u"&&this._loop!==S.loop&&(this._loop=S.loop,r.loop=!0,i=!0),typeof S.isSearching<"u"&&this._isSearching!==S.isSearching&&(this._isSearching=S.isSearching,r.isSearching=!0,i=!0),typeof S.filters<"u"&&(this._filters?this._filters.update(S.filters):this._filters=S.filters,r.filters=!0,i=!0),this._isRegexOverride=typeof S.isRegexOverride<"u"?S.isRegexOverride:0,this._wholeWordOverride=typeof S.wholeWordOverride<"u"?S.wholeWordOverride:0,this._matchCaseOverride=typeof S.matchCaseOverride<"u"?S.matchCaseOverride:0,this._preserveCaseOverride=typeof S.preserveCaseOverride<"u"?S.preserveCaseOverride:0,s!==this.isRegex&&(i=!0,r.isRegex=!0),o!==this.wholeWord&&(i=!0,r.wholeWord=!0),u!==this.matchCase&&(i=!0,r.matchCase=!0),d!==this.preserveCase&&(i=!0,r.preserveCase=!0),i&&this._onFindReplaceStateChange.fire(r)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=D.MATCHES_LIMIT}}e.FindReplaceState=v}),define(Q[711],Y([1,0,7,87,273,229,142,14,32,15,4,18,33,27,352,2384,308,501,36,77,19,37,167,17,54,1727]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleButton=e.FindWidget=e.FindWidgetViewZone=e.NLS_NO_RESULTS=e.NLS_MATCHES_LOCATION=e.findNextMatchIcon=e.findPreviousMatchIcon=e.findReplaceAllIcon=e.findReplaceIcon=void 0;const E=(0,p.registerIcon)("find-selection",v.Codicon.selection,s.localize(0,null)),C=(0,p.registerIcon)("find-collapsed",v.Codicon.chevronRight,s.localize(1,null)),I=(0,p.registerIcon)("find-expanded",v.Codicon.chevronDown,s.localize(2,null));e.findReplaceIcon=(0,p.registerIcon)("find-replace",v.Codicon.replace,s.localize(3,null)),e.findReplaceAllIcon=(0,p.registerIcon)("find-replace-all",v.Codicon.replaceAll,s.localize(4,null)),e.findPreviousMatchIcon=(0,p.registerIcon)("find-previous-match",v.Codicon.arrowUp,s.localize(5,null)),e.findNextMatchIcon=(0,p.registerIcon)("find-next-match",v.Codicon.arrowDown,s.localize(6,null));const _=s.localize(7,null),A=s.localize(8,null),k=s.localize(9,null),L=s.localize(10,null),R=s.localize(11,null),M=s.localize(12,null),N=s.localize(13,null),P=s.localize(14,null),x=s.localize(15,null),F=s.localize(16,null),V=s.localize(17,null),W=s.localize(18,null),z=s.localize(19,null,i.MATCHES_LIMIT);e.NLS_MATCHES_LOCATION=s.localize(20,null),e.NLS_NO_RESULTS=s.localize(21,null);const B=419,H=275-54;let U=69;const G=33,$="ctrlEnterReplaceAll.windows.donotask",ie=h.isMacintosh?256:2048;class J{constructor(se){this.afterLineNumber=se,this.heightInPx=G,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}e.FindWidgetViewZone=J;function j(Z,se,re){const oe=!!se.match(/\n/);if(re&&oe&&re.selectionStart>0){Z.stopPropagation();return}}function ee(Z,se,re){const oe=!!se.match(/\n/);if(re&&oe&&re.selectionEnd<re.value.length){Z.stopPropagation();return}}class X extends T.Widget{static{this.ID="editor.contrib.findWidget"}constructor(se,re,oe,le,ne,ce,ae,ue,de){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=se,this._controller=re,this._state=oe,this._contextViewProvider=le,this._keybindingService=ne,this._contextKeyService=ce,this._storageService=ue,this._notificationService=de,this._ctrlEnterReplaceAllWarningPrompted=!!ue.getBoolean($,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new f.Delayer(500),this._register((0,S.toDisposable)(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(ge=>this._onStateChanged(ge))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(ge=>{if(ge.hasChanged(89)&&(this._codeEditor.getOption(89)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),ge.hasChanged(142)&&this._tryUpdateWidgetWidth(),ge.hasChanged(2)&&this.updateAccessibilitySupport(),ge.hasChanged(40)){const he=this._codeEditor.getOption(40).loop;this._state.change({loop:he},!1);const be=this._codeEditor.getOption(40).addExtraSpaceOnTop;be&&!this._viewZone&&(this._viewZone=new J(0),this._showViewZone()),!be&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){const ge=await this._controller.getGlobalBufferTerm();ge&&ge!==this._state.searchString&&(this._state.change({searchString:ge},!1),this._findInput.select())}})),this._findInputFocused=i.CONTEXT_FIND_INPUT_FOCUSED.bindTo(ce),this._findFocusTracker=this._register(t.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=i.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(ce),this._replaceFocusTracker=this._register(t.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(40).addExtraSpaceOnTop&&(this._viewZone=new J(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(ge=>{if(ge.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return X.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(se){if(se.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(se.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),se.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),se.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(89)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=t.getTotalWidth(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(se.isRevealed||se.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),se.isRegex&&this._findInput.setRegex(this._state.isRegex),se.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),se.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),se.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),se.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),se.searchString||se.matchesCount||se.matchesPosition){const re=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",re),this._updateMatchesCount(),this._updateButtons()}(se.searchString||se.currentMatch)&&this._layoutViewZone(),se.updateHistory&&this._delayedUpdateHistory(),se.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,m.onUnexpectedError)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=U+"px",this._state.matchesCount>=i.MATCHES_LIMIT?this._matchesCount.title=z:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let se;if(this._state.matchesCount>0){let re=String(this._state.matchesCount);this._state.matchesCount>=i.MATCHES_LIMIT&&(re+="+");let oe=String(this._state.matchesPosition);oe==="0"&&(oe="?"),se=a.format(e.NLS_MATCHES_LOCATION,oe,re)}else se=e.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(se)),(0,y.alert)(this._getAriaLabel(se,this._state.currentMatch,this._state.searchString)),U=Math.max(U,this._matchesCount.clientWidth)}_getAriaLabel(se,re,oe){if(se===e.NLS_NO_RESULTS)return oe===""?s.localize(22,null,se):s.localize(23,null,se,oe);if(re){const le=s.localize(24,null,se,oe,re.startLineNumber+":"+re.startColumn),ne=this._codeEditor.getModel();return ne&&re.startLineNumber<=ne.getLineCount()&&re.startLineNumber>=1?`${ne.getLineContent(re.startLineNumber)}, ${le}`:le}return s.localize(25,null,se,oe)}_updateToggleSelectionFindButton(){const se=this._codeEditor.getSelection(),re=se?se.startLineNumber!==se.endLineNumber||se.startColumn!==se.endColumn:!1,oe=this._toggleSelectionFind.checked;this._isVisible&&(oe||re)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const se=this._state.searchString.length>0,re=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&se&&re&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&se&&re&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&se),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&se),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const oe=!this._codeEditor.getOption(89);this._toggleReplaceBtn.setEnabled(this._isVisible&&oe)}_reveal(){if(this._revealTimeouts.forEach(se=>{clearTimeout(se)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const se=this._codeEditor.getSelection();switch(this._codeEditor.getOption(40).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const oe=!!se&&se.startLineNumber!==se.endLineNumber;this._toggleSelectionFind.checked=oe;break}default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let re=!0;if(this._codeEditor.getOption(40).seedSearchStringFromSelection&&se){const oe=this._codeEditor.getDomNode();if(oe){const le=t.getDomNodePagePosition(oe),ne=this._codeEditor.getScrolledVisiblePosition(se.getStartPosition()),ce=le.left+(ne?ne.left:0),ae=ne?ne.top:0;if(this._viewZone&&ae<this._viewZone.heightInPx){se.endLineNumber>se.startLineNumber&&(re=!1);const ue=t.getTopLeftOffset(this._domNode).left;ce>ue&&(re=!1);const de=this._codeEditor.getScrolledVisiblePosition(se.getEndPosition());le.left+(de?de.left:0)>ue&&(re=!1)}}}this._showViewZone(re)}}_hide(se){this._revealTimeouts.forEach(re=>{clearTimeout(re)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),se&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(se){if(!this._codeEditor.getOption(40).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const oe=this._viewZone;this._viewZoneId!==void 0||!oe||this._codeEditor.changeViewZones(le=>{oe.heightInPx=this._getHeight(),this._viewZoneId=le.addZone(oe),this._codeEditor.setScrollTop(se||this._codeEditor.getScrollTop()+oe.heightInPx)})}_showViewZone(se=!0){if(!this._isVisible||!this._codeEditor.getOption(40).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new J(0));const oe=this._viewZone;this._codeEditor.changeViewZones(le=>{if(this._viewZoneId!==void 0){const ne=this._getHeight();if(ne===oe.heightInPx)return;const ce=ne-oe.heightInPx;oe.heightInPx=ne,le.layoutZone(this._viewZoneId),se&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+ce);return}else{let ne=this._getHeight();if(ne-=this._codeEditor.getOption(82).top,ne<=0)return;oe.heightInPx=ne,this._viewZoneId=le.addZone(oe),se&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+ne)}})}_removeViewZone(){this._codeEditor.changeViewZones(se=>{this._viewZoneId!==void 0&&(se.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!t.isInDOM(this._domNode))return;const se=this._codeEditor.getLayoutInfo();if(se.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const oe=se.width,le=se.minimap.minimapWidth;let ne=!1,ce=!1,ae=!1;if(this._resized&&t.getTotalWidth(this._domNode)>B){this._domNode.style.maxWidth=`${oe-28-le-15}px`,this._replaceInput.width=t.getTotalWidth(this._findInput.domNode);return}if(B+28+le>=oe&&(ce=!0),B+28+le-U>=oe&&(ae=!0),B+28+le-U>=oe+50&&(ne=!0),this._domNode.classList.toggle("collapsed-find-widget",ne),this._domNode.classList.toggle("narrow-find-widget",ae),this._domNode.classList.toggle("reduced-find-widget",ce),!ae&&!ne&&(this._domNode.style.maxWidth=`${oe-28-le-15}px`),this._findInput.layout({collapsedFindWidget:ne,narrowFindWidget:ae,reducedFindWidget:ce}),this._resized){const ue=this._findInput.inputBox.element.clientWidth;ue>0&&(this._replaceInput.width=ue)}else this._isReplaceVisible&&(this._replaceInput.width=t.getTotalWidth(this._findInput.domNode))}_getHeight(){let se=0;return se+=4,se+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(se+=4,se+=this._replaceInput.inputBox.height+2),se+=4,se}_tryUpdateHeight(){const se=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===se?!1:(this._cachedHeight=se,this._domNode.style.height=`${se}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const se=this._codeEditor.getSelections();se.map(re=>{re.endColumn===1&&re.endLineNumber>re.startLineNumber&&(re=re.setEndPosition(re.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(re.endLineNumber-1)));const oe=this._state.currentMatch;return re.startLineNumber!==re.endLineNumber&&!r.Range.equalsRange(re,oe)?re:null}).filter(re=>!!re),se.length&&this._state.change({searchScope:se},!0)}}_onFindInputMouseDown(se){se.middleButton&&se.stopPropagation()}_onFindInputKeyDown(se){if(se.equals(ie|3))if(this._keybindingService.dispatchEvent(se,se.target)){se.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` `),se.preventDefault();return}if(se.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),se.preventDefault();return}if(se.equals(2066)){this._codeEditor.focus(),se.preventDefault();return}if(se.equals(16))return j(se,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(se.equals(18))return ee(se,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(se){if(se.equals(ie|3))if(this._keybindingService.dispatchEvent(se,se.target)){se.preventDefault();return}else{h.isWindows&&h.isNative&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(s.localize(26,null)),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store($,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` `),se.preventDefault();return}if(se.equals(2)){this._findInput.focusOnCaseSensitive(),se.preventDefault();return}if(se.equals(1026)){this._findInput.focus(),se.preventDefault();return}if(se.equals(2066)){this._codeEditor.focus(),se.preventDefault();return}if(se.equals(16))return j(se,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(se.equals(18))return ee(se,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(se){return 0}_keybindingLabelFor(se){const re=this._keybindingService.lookupKeybinding(se);return re?` (${re.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new o.ContextScopedFindInput(null,this._contextViewProvider,{width:H,label:A,placeholder:k,appendCaseSensitiveLabel:this._keybindingLabelFor(i.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(i.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(i.FIND_IDS.ToggleRegexCommand),validation:ue=>{if(ue.length===0||!this._findInput.getRegex())return null;try{return new RegExp(ue,"gu"),null}catch(de){return{content:de.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>(0,u.showHistoryKeybindingHint)(this._keybindingService),inputBoxStyles:w.defaultInputBoxStyles,toggleStyles:w.defaultToggleStyles},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(ue=>this._onFindInputKeyDown(ue))),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(ue=>{ue.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),ue.preventDefault())})),this._register(this._findInput.onRegexKeyDown(ue=>{ue.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),ue.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(ue=>{this._tryUpdateHeight()&&this._showViewZone()})),h.isLinux&&this._register(this._findInput.onMouseDown(ue=>this._onFindInputMouseDown(ue))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new te({label:L+this._keybindingLabelFor(i.FIND_IDS.PreviousMatchFindAction),icon:e.findPreviousMatchIcon,onTrigger:()=>{(0,g.assertIsDefined)(this._codeEditor.getAction(i.FIND_IDS.PreviousMatchFindAction)).run().then(void 0,m.onUnexpectedError)}})),this._nextBtn=this._register(new te({label:R+this._keybindingLabelFor(i.FIND_IDS.NextMatchFindAction),icon:e.findNextMatchIcon,onTrigger:()=>{(0,g.assertIsDefined)(this._codeEditor.getAction(i.FIND_IDS.NextMatchFindAction)).run().then(void 0,m.onUnexpectedError)}}));const oe=document.createElement("div");oe.className="find-part",oe.appendChild(this._findInput.domNode);const le=document.createElement("div");le.className="find-actions",oe.appendChild(le),le.appendChild(this._matchesCount),le.appendChild(this._prevBtn.domNode),le.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new b.Toggle({icon:E,title:M+this._keybindingLabelFor(i.FIND_IDS.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:(0,d.asCssVariable)(d.inputActiveOptionBackground),inputActiveOptionBorder:(0,d.asCssVariable)(d.inputActiveOptionBorder),inputActiveOptionForeground:(0,d.asCssVariable)(d.inputActiveOptionForeground)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const ue=this._codeEditor.getSelections();ue.map(de=>(de.endColumn===1&&de.endLineNumber>de.startLineNumber&&(de=de.setEndPosition(de.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(de.endLineNumber-1))),de.isEmpty()?null:de)).filter(de=>!!de),ue.length&&this._state.change({searchScope:ue},!0)}}else this._state.change({searchScope:null},!0)})),le.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new te({label:N+this._keybindingLabelFor(i.FIND_IDS.CloseFindWidgetCommand),icon:p.widgetClose,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:ue=>{ue.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),ue.preventDefault())}})),this._replaceInput=this._register(new o.ContextScopedReplaceInput(null,void 0,{label:P,placeholder:x,appendPreserveCaseLabel:this._keybindingLabelFor(i.FIND_IDS.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>(0,u.showHistoryKeybindingHint)(this._keybindingService),inputBoxStyles:w.defaultInputBoxStyles,toggleStyles:w.defaultToggleStyles},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(ue=>this._onReplaceInputKeyDown(ue))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(ue=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(ue=>{ue.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(),ue.preventDefault())})),this._replaceBtn=this._register(new te({label:F+this._keybindingLabelFor(i.FIND_IDS.ReplaceOneAction),icon:e.findReplaceIcon,onTrigger:()=>{this._controller.replace()},onKeyDown:ue=>{ue.equals(1026)&&(this._closeBtn.focus(),ue.preventDefault())}})),this._replaceAllBtn=this._register(new te({label:V+this._keybindingLabelFor(i.FIND_IDS.ReplaceAllAction),icon:e.findReplaceAllIcon,onTrigger:()=>{this._controller.replaceAll()}}));const ne=document.createElement("div");ne.className="replace-part",ne.appendChild(this._replaceInput.domNode);const ce=document.createElement("div");ce.className="replace-actions",ne.appendChild(ce),ce.appendChild(this._replaceBtn.domNode),ce.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new te({label:W,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=t.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.ariaLabel=_,this._domNode.role="dialog",this._domNode.style.width=`${B}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(oe),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(ne),this._resizeSash=new D.Sash(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let ae=B;this._register(this._resizeSash.onDidStart(()=>{ae=t.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(ue=>{this._resized=!0;const de=ae+ue.startX-ue.currentX;if(de<B)return;const ge=parseFloat(t.getComputedStyle(this._domNode).maxWidth)||0;de>ge||(this._domNode.style.width=`${de}px`,this._isReplaceVisible&&(this._replaceInput.width=t.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const ue=t.getTotalWidth(this._domNode);if(ue<B)return;let de=B;if(!this._resized||ue===B){const ge=this._codeEditor.getLayoutInfo();de=ge.width-28-ge.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${de}px`,this._isReplaceVisible&&(this._replaceInput.width=t.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const se=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(se!==2)}getViewState(){let se=!1;return this._viewZone&&this._viewZoneId&&(se=this._viewZone.heightInPx>this._codeEditor.getScrollTop()),{widgetViewZoneVisible:se,scrollTop:this._codeEditor.getScrollTop()}}setViewState(se){se&&se.widgetViewZoneVisible&&this._layoutViewZone(se.scrollTop)}}e.FindWidget=X;class te extends T.Widget{constructor(se){super(),this._opts=se;let re="button";this._opts.className&&(re=re+" "+this._opts.className),this._opts.icon&&(re=re+" "+l.ThemeIcon.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=re,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,oe=>{this._opts.onTrigger(),oe.preventDefault()}),this.onkeydown(this._domNode,oe=>{if(oe.equals(10)||oe.equals(3)){this._opts.onTrigger(),oe.preventDefault();return}this._opts.onKeyDown?.(oe)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(se){this._domNode.classList.toggle("disabled",!se),this._domNode.setAttribute("aria-disabled",String(!se)),this._domNode.tabIndex=se?0:-1}setExpanded(se){this._domNode.setAttribute("aria-expanded",String(!!se)),se?(this._domNode.classList.remove(...l.ThemeIcon.asClassNameArray(C)),this._domNode.classList.add(...l.ThemeIcon.asClassNameArray(I))):(this._domNode.classList.remove(...l.ThemeIcon.asClassNameArray(I)),this._domNode.classList.add(...l.ThemeIcon.asClassNameArray(C)))}}e.SimpleButton=te,(0,c.registerThemingParticipant)((Z,se)=>{const re=(Se,we)=>{we&&se.addRule(`.monaco-editor ${Se} { background-color: ${we}; }`)};re(".findMatch",Z.getColor(d.editorFindMatchHighlight)),re(".currentFindMatch",Z.getColor(d.editorFindMatch)),re(".findScope",Z.getColor(d.editorFindRangeHighlight));const oe=Z.getColor(d.editorWidgetBackground);re(".find-widget",oe);const le=Z.getColor(d.widgetShadow);le&&se.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${le}; }`);const ne=Z.getColor(d.widgetBorder);ne&&se.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${ne}; border-right: 1px solid ${ne}; border-bottom: 1px solid ${ne}; }`);const ce=Z.getColor(d.editorFindMatchHighlightBorder);ce&&se.addRule(`.monaco-editor .findMatch { border: 1px ${(0,n.isHighContrast)(Z.type)?"dotted":"solid"} ${ce}; box-sizing: border-box; }`);const ae=Z.getColor(d.editorFindMatchBorder);ae&&se.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${ae}; padding: 1px; box-sizing: border-box; }`);const ue=Z.getColor(d.editorFindRangeHighlightBorder);ue&&se.addRule(`.monaco-editor .findScope { border: 1px ${(0,n.isHighContrast)(Z.type)?"dashed":"solid"} ${ue}; }`);const de=Z.getColor(d.contrastBorder);de&&se.addRule(`.monaco-editor .find-widget { border: 1px solid ${de}; }`);const ge=Z.getColor(d.editorWidgetForeground);ge&&se.addRule(`.monaco-editor .find-widget { color: ${ge}; }`);const he=Z.getColor(d.errorForeground);he&&se.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${he}; }`);const be=Z.getColor(d.editorWidgetResizeBorder);if(be)se.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${be}; }`);else{const Se=Z.getColor(d.editorWidgetBorder);Se&&se.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${Se}; }`)}const ve=Z.getColor(d.toolbarHoverBackground);ve&&se.addRule(` .monaco-editor .find-widget .button:not(.disabled):hover, .monaco-editor .find-widget .codicon-find-selection:hover { background-color: ${ve} !important; } `);const Ie=Z.getColor(d.focusBorder);Ie&&se.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${Ie}; }`)})}),define(Q[1223],Y([1,0,32,137,98,2386,36,77,19,37]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingDecorationProvider=e.foldingManualExpandedIcon=e.foldingManualCollapsedIcon=e.foldingCollapsedIcon=e.foldingExpandedIcon=void 0;const S=(0,T.registerColor)("editor.foldBackground",{light:(0,T.transparent)(T.editorSelectionBackground,.3),dark:(0,T.transparent)(T.editorSelectionBackground,.3),hcDark:null,hcLight:null},(0,D.localize)(0,null),!0);(0,T.registerColor)("editorGutter.foldingControlForeground",{dark:T.iconForeground,light:T.iconForeground,hcDark:T.iconForeground,hcLight:T.iconForeground},(0,D.localize)(1,null)),e.foldingExpandedIcon=(0,f.registerIcon)("folding-expanded",t.Codicon.chevronDown,(0,D.localize)(2,null)),e.foldingCollapsedIcon=(0,f.registerIcon)("folding-collapsed",t.Codicon.chevronRight,(0,D.localize)(3,null)),e.foldingManualCollapsedIcon=(0,f.registerIcon)("folding-manual-collapsed",e.foldingCollapsedIcon,(0,D.localize)(4,null)),e.foldingManualExpandedIcon=(0,f.registerIcon)("folding-manual-expanded",e.foldingExpandedIcon,(0,D.localize)(5,null));const h={color:(0,v.themeColorFromId)(S),position:y.MinimapPosition.Inline};class a{static{this.COLLAPSED_VISUAL_DECORATION=b.ModelDecorationOptions.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:m.ThemeIcon.asClassName(e.foldingCollapsedIcon)})}static{this.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=b.ModelDecorationOptions.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:h,isWholeLine:!0,firstLineDecorationClassName:m.ThemeIcon.asClassName(e.foldingCollapsedIcon)})}static{this.MANUALLY_COLLAPSED_VISUAL_DECORATION=b.ModelDecorationOptions.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:m.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)})}static{this.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=b.ModelDecorationOptions.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:h,isWholeLine:!0,firstLineDecorationClassName:m.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)})}static{this.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=b.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0})}static{this.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=b.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:h,isWholeLine:!0})}static{this.EXPANDED_VISUAL_DECORATION=b.ModelDecorationOptions.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+m.ThemeIcon.asClassName(e.foldingExpandedIcon)})}static{this.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=b.ModelDecorationOptions.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:m.ThemeIcon.asClassName(e.foldingExpandedIcon)})}static{this.MANUALLY_EXPANDED_VISUAL_DECORATION=b.ModelDecorationOptions.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+m.ThemeIcon.asClassName(e.foldingManualExpandedIcon)})}static{this.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=b.ModelDecorationOptions.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:m.ThemeIcon.asClassName(e.foldingManualExpandedIcon)})}static{this.NO_CONTROLS_EXPANDED_RANGE_DECORATION=b.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0})}static{this.HIDDEN_RANGE_DECORATION=b.ModelDecorationOptions.register({description:"folding-hidden-range-decoration",stickiness:1})}constructor(i){this.editor=i,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(i,s,o){return s?a.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?i?this.showFoldingHighlights?a.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:a.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:a.NO_CONTROLS_EXPANDED_RANGE_DECORATION:i?o?this.showFoldingHighlights?a.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:a.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?a.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:a.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?o?a.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:a.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:o?a.MANUALLY_EXPANDED_VISUAL_DECORATION:a.EXPANDED_VISUAL_DECORATION}changeDecorations(i){return this.editor.changeDecorations(i)}removeDecorations(i){this.editor.removeDecorations(i)}}e.FoldingDecorationProvider=a}),define(Q[414],Y([1,0,14,31,15,105,4,33,17,390,48,73,99,125,1087,1913,1088,2385,8,1223,567,808,23,328,145,74,6,28,10,57,9,1728]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k){"use strict";var L;Object.defineProperty(e,"__esModule",{value:!0}),e.RangesLimitReporter=e.FoldingController=void 0;const R=new d.RawContextKey("foldingEnabled",!1);let M=class extends T.Disposable{static{L=this}static{this.ID="editor.contrib.folding"}static get(oe){return oe.getContribution(L.ID)}static getFoldingRangeProviders(oe,le){const ne=oe.foldingRangeProvider.ordered(le);return L._foldingRangeSelector?.(ne,le)??ne}static setFoldingRangeProviderSelector(oe){return L._foldingRangeSelector=oe,{dispose:()=>{L._foldingRangeSelector=void 0}}}constructor(oe,le,ne,ce,ae,ue){super(),this.contextKeyService=le,this.languageConfigurationService=ne,this.languageFeaturesService=ue,this.localToDispose=this._register(new T.DisposableStore),this.editor=oe,this._foldingLimitReporter=new N(oe);const de=this.editor.getOptions();this._isEnabled=de.get(42),this._useFoldingProviders=de.get(43)!=="indentation",this._unfoldOnClickAfterEndOfLine=de.get(47),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=de.get(45),this.updateDebounceInfo=ae.for(ue.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new p.FoldingDecorationProvider(oe),this.foldingDecorationProvider.showFoldingControls=de.get(108),this.foldingDecorationProvider.showFoldingHighlights=de.get(44),this.foldingEnabled=R.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(ge=>{if(ge.hasChanged(42)&&(this._isEnabled=this.editor.getOptions().get(42),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),ge.hasChanged(46)&&this.onModelChanged(),ge.hasChanged(108)||ge.hasChanged(44)){const he=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=he.get(108),this.foldingDecorationProvider.showFoldingHighlights=he.get(44),this.triggerFoldingModelChanged()}ge.hasChanged(43)&&(this._useFoldingProviders=this.editor.getOptions().get(43)!=="indentation",this.onFoldingStrategyChanged()),ge.hasChanged(47)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(47)),ge.hasChanged(45)&&(this._foldingImportsByDefault=this.editor.getOptions().get(45))})),this.onModelChanged()}get limitReporter(){return this._foldingLimitReporter}saveViewState(){const oe=this.editor.getModel();if(!oe||!this._isEnabled||oe.isTooLargeForTokenization())return{};if(this.foldingModel){const le=this.foldingModel.getMemento(),ne=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:le,lineCount:oe.getLineCount(),provider:ne,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(oe){const le=this.editor.getModel();if(!(!le||!this._isEnabled||le.isTooLargeForTokenization()||!this.hiddenRangeModel)&&oe&&(this._currentModelHasFoldedImports=!!oe.foldedImports,oe.collapsedRegions&&oe.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(oe.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const oe=this.editor.getModel();!this._isEnabled||!oe||oe.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new i.FoldingModel(oe,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new s.HiddenRangeModel(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(le=>this.onHiddenRangesChanges(le))),this.updateScheduler=new t.Delayer(this.updateDebounceInfo.get(oe)),this.cursorChangedScheduler=new t.RunOnceScheduler(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(le=>this.onDidChangeModelContent(le))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(le=>this.onEditorMouseDown(le))),this.localToDispose.add(this.editor.onMouseUp(le=>this.onEditorMouseUp(le))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler?.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.rangeProvider?.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){this.rangeProvider?.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(oe){if(this.rangeProvider)return this.rangeProvider;const le=new o.IndentRangeProvider(oe,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=le,this._useFoldingProviders&&this.foldingModel){const ne=L.getFoldingRangeProviders(this.languageFeaturesService,oe);ne.length>0&&(this.rangeProvider=new l.SyntaxRangeProvider(oe,ne,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,le))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(oe){this.hiddenRangeModel?.notifyChangeModelContent(oe),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const oe=this.foldingModel;if(!oe)return null;const le=new w.StopWatch,ne=this.getRangeProvider(oe.textModel),ce=this.foldingRegionPromise=(0,t.createCancelablePromise)(ae=>ne.compute(ae));return ce.then(ae=>{if(ae&&ce===this.foldingRegionPromise){let ue;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const be=ae.setCollapsedAllOfType(a.FoldingRangeKind.Imports.value,!0);be&&(ue=m.StableEditorScrollState.capture(this.editor),this._currentModelHasFoldedImports=be)}const de=this.editor.getSelections(),ge=de?de.map(be=>be.startLineNumber):[];oe.update(ae,ge),ue?.restore(this.editor);const he=this.updateDebounceInfo.update(oe.textModel,le.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=he)}return oe})}).then(void 0,oe=>((0,b.onUnexpectedError)(oe),null)))}onHiddenRangesChanges(oe){if(this.hiddenRangeModel&&oe.length&&!this._restoringViewState){const le=this.editor.getSelections();le&&this.hiddenRangeModel.adjustSelections(le)&&this.editor.setSelections(le)}this.editor.setHiddenAreas(oe,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const oe=this.getFoldingModel();oe&&oe.then(le=>{if(le){const ne=this.editor.getSelections();if(ne&&ne.length>0){const ce=[];for(const ae of ne){const ue=ae.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(ue)&&ce.push(...le.getAllRegionsAtLine(ue,de=>de.isCollapsed&&ue>de.startLineNumber))}ce.length&&(le.toggleCollapseState(ce),this.reveal(ne[0].getPosition()))}}}).then(void 0,b.onUnexpectedError)}onEditorMouseDown(oe){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!oe.target||!oe.target.range||!oe.event.leftButton&&!oe.event.middleButton)return;const le=oe.target.range;let ne=!1;switch(oe.target.type){case 4:{const ce=oe.target.detail,ae=oe.target.element.offsetLeft;if(ce.offsetX-ae<4)return;ne=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!oe.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const ce=this.editor.getModel();if(ce&&le.startColumn===ce.getLineMaxColumn(le.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:le.startLineNumber,iconClicked:ne}}onEditorMouseUp(oe){const le=this.foldingModel;if(!le||!this.mouseDownInfo||!oe.target)return;const ne=this.mouseDownInfo.lineNumber,ce=this.mouseDownInfo.iconClicked,ae=oe.target.range;if(!ae||ae.startLineNumber!==ne)return;if(ce){if(oe.target.type!==4)return}else{const de=this.editor.getModel();if(!de||ae.startColumn!==de.getLineMaxColumn(ne))return}const ue=le.getRegionAtLine(ne);if(ue&&ue.startLineNumber===ne){const de=ue.isCollapsed;if(ce||de){const ge=oe.event.altKey;let he=[];if(ge){const be=Ie=>!Ie.containedBy(ue)&&!ue.containedBy(Ie),ve=le.getRegionsInside(null,be);for(const Ie of ve)Ie.isCollapsed&&he.push(Ie);he.length===0&&(he=ve)}else{const be=oe.event.middleButton||oe.event.shiftKey;if(be)for(const ve of le.getRegionsInside(ue))ve.isCollapsed===de&&he.push(ve);(de||!be||he.length===0)&&he.push(ue)}le.toggleCollapseState(he),this.reveal({lineNumber:ne,column:1})}}}reveal(oe){this.editor.revealPositionInCenterIfOutsideViewport(oe,0)}};e.FoldingController=M,e.FoldingController=M=L=fe([O(1,d.IContextKeyService),O(2,r.ILanguageConfigurationService),O(3,n.INotificationService),O(4,g.ILanguageFeatureDebounceService),O(5,E.ILanguageFeaturesService)],M);class N{constructor(oe){this.editor=oe,this._onDidChange=new C.Emitter,this.onDidChange=this._onDidChange.event,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(46)}get computed(){return this._computed}get limited(){return this._limited}update(oe,le){(oe!==this._computed||le!==this._limited)&&(this._computed=oe,this._limited=le,this._onDidChange.fire())}}e.RangesLimitReporter=N;class P extends S.EditorAction{runEditorCommand(oe,le,ne){const ce=oe.get(r.ILanguageConfigurationService),ae=M.get(le);if(!ae)return;const ue=ae.getFoldingModel();if(ue)return this.reportTelemetry(oe,le),ue.then(de=>{if(de){this.invoke(ae,de,le,ne,ce);const ge=le.getSelection();ge&&ae.reveal(ge.getStartPosition())}})}getSelectedLines(oe){const le=oe.getSelections();return le?le.map(ne=>ne.startLineNumber):[]}getLineNumbers(oe,le){return oe&&oe.selectionLines?oe.selectionLines.map(ne=>ne+1):this.getSelectedLines(le)}run(oe,le){}}function x(re){if(!v.isUndefined(re)){if(!v.isObject(re))return!1;const oe=re;if(!v.isUndefined(oe.levels)&&!v.isNumber(oe.levels)||!v.isUndefined(oe.direction)&&!v.isString(oe.direction)||!v.isUndefined(oe.selectionLines)&&(!Array.isArray(oe.selectionLines)||!oe.selectionLines.every(v.isNumber)))return!1}return!0}class F extends P{constructor(){super({id:"editor.unfold",label:u.localize(0,null),alias:"Unfold",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: * 'levels': Number of levels to unfold. If not set, defaults to 1. * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used. `,constraint:x,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(oe,le,ne,ce){const ae=ce&&ce.levels||1,ue=this.getLineNumbers(ce,ne);ce&&ce.direction==="up"?(0,i.setCollapseStateLevelsUp)(le,!1,ae,ue):(0,i.setCollapseStateLevelsDown)(le,!1,ae,ue)}}class V extends P{constructor(){super({id:"editor.unfoldRecursively",label:u.localize(1,null),alias:"Unfold Recursively",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2142),weight:100}})}invoke(oe,le,ne,ce){(0,i.setCollapseStateLevelsDown)(le,!1,Number.MAX_VALUE,this.getSelectedLines(ne))}}class W extends P{constructor(){super({id:"editor.fold",label:u.localize(2,null),alias:"Fold",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument: * 'levels': Number of levels to fold. * 'direction': If 'up', folds given number of levels up otherwise folds down. * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used. If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead. `,constraint:x,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(oe,le,ne,ce){const ae=this.getLineNumbers(ce,ne),ue=ce&&ce.levels,de=ce&&ce.direction;typeof ue!="number"&&typeof de!="string"?(0,i.setCollapseStateUp)(le,!0,ae):de==="up"?(0,i.setCollapseStateLevelsUp)(le,!0,ue||1,ae):(0,i.setCollapseStateLevelsDown)(le,!0,ue||1,ae)}}class z extends P{constructor(){super({id:"editor.toggleFold",label:u.localize(3,null),alias:"Toggle Fold",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2090),weight:100}})}invoke(oe,le,ne){const ce=this.getSelectedLines(ne);(0,i.toggleCollapseState)(le,1,ce)}}class B extends P{constructor(){super({id:"editor.foldRecursively",label:u.localize(4,null),alias:"Fold Recursively",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2140),weight:100}})}invoke(oe,le,ne){const ce=this.getSelectedLines(ne);(0,i.setCollapseStateLevelsDown)(le,!0,Number.MAX_VALUE,ce)}}class K extends P{constructor(){super({id:"editor.foldAllBlockComments",label:u.localize(5,null),alias:"Fold All Block Comments",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2138),weight:100}})}invoke(oe,le,ne,ce,ae){if(le.regions.hasTypes())(0,i.setCollapseStateForType)(le,a.FoldingRangeKind.Comment.value,!0);else{const ue=ne.getModel();if(!ue)return;const de=ae.getLanguageConfiguration(ue.getLanguageId()).comments;if(de&&de.blockCommentStartToken){const ge=new RegExp("^\\s*"+(0,f.escapeRegExpCharacters)(de.blockCommentStartToken));(0,i.setCollapseStateForMatchingLines)(le,ge,!0)}}}}class H extends P{constructor(){super({id:"editor.foldAllMarkerRegions",label:u.localize(6,null),alias:"Fold All Regions",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2077),weight:100}})}invoke(oe,le,ne,ce,ae){if(le.regions.hasTypes())(0,i.setCollapseStateForType)(le,a.FoldingRangeKind.Region.value,!0);else{const ue=ne.getModel();if(!ue)return;const de=ae.getLanguageConfiguration(ue.getLanguageId()).foldingRules;if(de&&de.markers&&de.markers.start){const ge=new RegExp(de.markers.start);(0,i.setCollapseStateForMatchingLines)(le,ge,!0)}}}}class U extends P{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:u.localize(7,null),alias:"Unfold All Regions",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2078),weight:100}})}invoke(oe,le,ne,ce,ae){if(le.regions.hasTypes())(0,i.setCollapseStateForType)(le,a.FoldingRangeKind.Region.value,!1);else{const ue=ne.getModel();if(!ue)return;const de=ae.getLanguageConfiguration(ue.getLanguageId()).foldingRules;if(de&&de.markers&&de.markers.start){const ge=new RegExp(de.markers.start);(0,i.setCollapseStateForMatchingLines)(le,ge,!1)}}}}class G extends P{constructor(){super({id:"editor.foldAllExcept",label:u.localize(8,null),alias:"Fold All Except Selected",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2136),weight:100}})}invoke(oe,le,ne){const ce=this.getSelectedLines(ne);(0,i.setCollapseStateForRest)(le,!0,ce)}}class $ extends P{constructor(){super({id:"editor.unfoldAllExcept",label:u.localize(9,null),alias:"Unfold All Except Selected",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2134),weight:100}})}invoke(oe,le,ne){const ce=this.getSelectedLines(ne);(0,i.setCollapseStateForRest)(le,!1,ce)}}class ie extends P{constructor(){super({id:"editor.foldAll",label:u.localize(10,null),alias:"Fold All",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2069),weight:100}})}invoke(oe,le,ne){(0,i.setCollapseStateLevelsDown)(le,!0)}}class J extends P{constructor(){super({id:"editor.unfoldAll",label:u.localize(11,null),alias:"Unfold All",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2088),weight:100}})}invoke(oe,le,ne){(0,i.setCollapseStateLevelsDown)(le,!1)}}class j extends P{static{this.ID_PREFIX="editor.foldLevel"}static{this.ID=oe=>j.ID_PREFIX+oe}getFoldingLevel(){return parseInt(this.id.substr(j.ID_PREFIX.length))}invoke(oe,le,ne){(0,i.setCollapseStateAtLevel)(le,this.getFoldingLevel(),!0,this.getSelectedLines(ne))}}class ee extends P{constructor(){super({id:"editor.gotoParentFold",label:u.localize(12,null),alias:"Go to Parent Fold",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,weight:100}})}invoke(oe,le,ne){const ce=this.getSelectedLines(ne);if(ce.length>0){const ae=(0,i.getParentFoldLine)(ce[0],le);ae!==null&&ne.setSelection({startLineNumber:ae,startColumn:1,endLineNumber:ae,endColumn:1})}}}class X extends P{constructor(){super({id:"editor.gotoPreviousFold",label:u.localize(13,null),alias:"Go to Previous Folding Range",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,weight:100}})}invoke(oe,le,ne){const ce=this.getSelectedLines(ne);if(ce.length>0){const ae=(0,i.getPreviousFoldLine)(ce[0],le);ae!==null&&ne.setSelection({startLineNumber:ae,startColumn:1,endLineNumber:ae,endColumn:1})}}}class te extends P{constructor(){super({id:"editor.gotoNextFold",label:u.localize(14,null),alias:"Go to Next Folding Range",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,weight:100}})}invoke(oe,le,ne){const ce=this.getSelectedLines(ne);if(ce.length>0){const ae=(0,i.getNextFoldLine)(ce[0],le);ae!==null&&ne.setSelection({startLineNumber:ae,startColumn:1,endLineNumber:ae,endColumn:1})}}}class Z extends P{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:u.localize(15,null),alias:"Create Folding Range from Selection",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2135),weight:100}})}invoke(oe,le,ne){const ce=[],ae=ne.getSelections();if(ae){for(const ue of ae){let de=ue.endLineNumber;ue.endColumn===1&&--de,de>ue.startLineNumber&&(ce.push({startLineNumber:ue.startLineNumber,endLineNumber:de,type:void 0,isCollapsed:!0,source:1}),ne.setSelection({startLineNumber:ue.startLineNumber,startColumn:1,endLineNumber:ue.startLineNumber,endColumn:1}))}if(ce.length>0){ce.sort((de,ge)=>de.startLineNumber-ge.startLineNumber);const ue=c.FoldingRegions.sanitizeAndMerge(le.regions,ce,ne.getModel()?.getLineCount());le.updatePost(c.FoldingRegions.fromFoldRanges(ue))}}}}class se extends P{constructor(){super({id:"editor.removeManualFoldingRanges",label:u.localize(16,null),alias:"Remove Manual Folding Ranges",precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2137),weight:100}})}invoke(oe,le,ne){const ce=ne.getSelections();if(ce){const ae=[];for(const ue of ce){const{startLineNumber:de,endLineNumber:ge}=ue;ae.push(ge>=de?{startLineNumber:de,endLineNumber:ge}:{endLineNumber:ge,startLineNumber:de})}le.removeManualRanges(ae),oe.triggerFoldingModelChanged()}}}(0,S.registerEditorContribution)(M.ID,M,0),(0,S.registerEditorAction)(F),(0,S.registerEditorAction)(V),(0,S.registerEditorAction)(W),(0,S.registerEditorAction)(B),(0,S.registerEditorAction)(ie),(0,S.registerEditorAction)(J),(0,S.registerEditorAction)(K),(0,S.registerEditorAction)(H),(0,S.registerEditorAction)(U),(0,S.registerEditorAction)(G),(0,S.registerEditorAction)($),(0,S.registerEditorAction)(z),(0,S.registerEditorAction)(ee),(0,S.registerEditorAction)(X),(0,S.registerEditorAction)(te),(0,S.registerEditorAction)(Z),(0,S.registerEditorAction)(se);for(let re=1;re<=7;re++)(0,S.registerInstantiatedEditorAction)(new j({id:j.ID(re),label:u.localize(17,null,re),alias:`Fold Level ${re}`,precondition:R,kbOpts:{kbExpr:h.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2048|21+re),weight:100}}));I.CommandsRegistry.registerCommand("_executeFoldingRangeProvider",async function(re,...oe){const[le]=oe;if(!(le instanceof _.URI))throw(0,b.illegalArgument)();const ne=re.get(E.ILanguageFeaturesService),ce=re.get(A.IModelService).getModel(le);if(!ce)throw(0,b.illegalArgument)();const ae=re.get(k.IConfigurationService);if(!ae.getValue("editor.folding",{resource:le}))return[];const ue=re.get(r.ILanguageConfigurationService),de=ae.getValue("editor.foldingStrategy",{resource:le}),ge={get limit(){return ae.getValue("editor.foldingMaximumRegions",{resource:le})},update:(Se,we)=>{}},he=new o.IndentRangeProvider(ce,ue,ge);let be=he;if(de!=="indentation"){const Se=M.getFoldingRangeProviders(ne,ce);Se.length&&(be=new l.SyntaxRangeProvider(ce,Se,()=>{},ge,he))}const ve=await be.compute(y.CancellationToken.None),Ie=[];try{if(ve)for(let Se=0;Se<ve.length;Se++){const we=ve.getType(Se);Ie.push({start:ve.getStartLineNumber(Se),end:ve.getEndLineNumber(Se),kind:we?a.FoldingRangeKind.fromValue(we):void 0})}return Ie}finally{be.dispose()}})}),define(Q[1224],Y([1,0,7,827,20,4,51,27,98,99,1131,395,5,38,14,73,8,2326,9,66]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";var c,l;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorHoverStatusBar=e.ContentHoverWidget=e.ContentHoverController=void 0;const n=t.$;let g=class extends D.Disposable{static{c=this}getWidgetContent(){const P=this._widget.getDomNode();if(P.textContent)return P.textContent}constructor(P,x,F){super(),this._editor=P,this._instantiationService=x,this._keybindingService=F,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(k,this._editor)),this._participants=[];for(const V of h.HoverParticipantRegistry.getAll())this._participants.push(this._instantiationService.createInstance(V,this._editor));this._participants.sort((V,W)=>V.hoverOrdinal-W.hoverOrdinal),this._computer=new R(this._editor,this._participants),this._hoverOperation=this._register(new S.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(V=>{if(!this._computer.anchor)return;const W=V.hasLoadingMessage?this._addLoadingMessage(V.value):V.value;this._withResult(new w(this._computer.anchor,W,V.isComplete))})),this._register(t.addStandardDisposableListener(this._widget.getDomNode(),"keydown",V=>{V.equals(9)&&this.hide()})),this._register(m.TokenizationRegistry.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}get widget(){return this._widget}maybeShowAt(P){if(this._widget.isResizing)return!0;const x=[];for(const V of this._participants)if(V.suggestHoverAnchor){const W=V.suggestHoverAnchor(P);W&&x.push(W)}const F=P.target;if(F.type===6&&x.push(new h.HoverRangeAnchor(0,F.range,P.event.posx,P.event.posy)),F.type===7){const V=this._editor.getOption(49).typicalHalfwidthCharacterWidth/2;!F.detail.isAfterLines&&typeof F.detail.horizontalDistanceToText=="number"&&F.detail.horizontalDistanceToText<V&&x.push(new h.HoverRangeAnchor(0,F.range,P.event.posx,P.event.posy))}return x.length===0?this._startShowingOrUpdateHover(null,0,0,!1,P):(x.sort((V,W)=>W.priority-V.priority),this._startShowingOrUpdateHover(x[0],0,0,!1,P))}startShowingAtRange(P,x,F,V){this._startShowingOrUpdateHover(new h.HoverRangeAnchor(0,P,void 0,void 0),x,F,V,null)}_startShowingOrUpdateHover(P,x,F,V,W){return!this._widget.position||!this._currentResult?P?(this._startHoverOperationIfNecessary(P,x,F,V,!1),!0):!1:this._editor.getOption(59).sticky&&W&&this._widget.isMouseGettingCloser(W.event.posx,W.event.posy)?(P&&this._startHoverOperationIfNecessary(P,x,F,V,!0),!0):P?P&&this._currentResult.anchor.equals(P)?!0:P.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(P)),this._startHoverOperationIfNecessary(P,x,F,V,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(P,x,F,V,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(P,x,F,V,W){this._computer.anchor&&this._computer.anchor.equals(P)||(this._hoverOperation.cancel(),this._computer.anchor=P,this._computer.shouldFocus=V,this._computer.source=F,this._computer.insistOnKeepingHoverVisible=W,this._hoverOperation.start(x))}_setCurrentResult(P){this._currentResult!==P&&(P&&P.messages.length===0&&(P=null),this._currentResult=P,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}containsNode(P){return P?this._widget.getDomNode().contains(P):!1}_addLoadingMessage(P){if(this._computer.anchor){for(const x of this._participants)if(x.createLoadingMessage){const F=x.createLoadingMessage(this._computer.anchor);if(F)return P.slice(0).concat([F])}}return P}_withResult(P){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!P.isComplete||this._computer.insistOnKeepingHoverVisible&&P.messages.length===0)||this._setCurrentResult(P)}_renderMessages(P,x){const{showAtPosition:F,showAtSecondaryPosition:V,highlightRange:W}=c.computeHoverRanges(this._editor,P.range,x),z=new D.DisposableStore,B=z.add(new L(this._keybindingService)),K=document.createDocumentFragment();let H=null;const U={fragment:K,statusBar:B,setColorPicker:$=>H=$,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:$=>this._widget.setMinimumDimensions($),hide:()=>this.hide()};for(const $ of this._participants){const ie=x.filter(J=>J.owner===$);ie.length>0&&z.add($.renderHoverParts(U,ie))}const G=x.some($=>$.isBeforeContent);if(B.hasContent&&K.appendChild(B.hoverElement),K.hasChildNodes()){if(W){const $=this._editor.createDecorationsCollection();$.set([{range:W,options:c._DECORATION_OPTIONS}]),z.add((0,D.toDisposable)(()=>{$.clear()}))}this._widget.showAt(K,new C(H,F,V,this._editor.getOption(59).above,this._computer.shouldFocus,this._computer.source,G,P.initialMousePosX,P.initialMousePosY,z))}else z.dispose()}static{this._DECORATION_OPTIONS=v.ModelDecorationOptions.register({description:"content-hover-highlight",className:"hoverHighlight"})}static computeHoverRanges(P,x,F){let V=1;if(P.hasModel()){const H=P._getViewModel(),U=H.coordinatesConverter,G=U.convertModelRangeToViewRange(x),$=new T.Position(G.startLineNumber,H.getLineMinColumn(G.startLineNumber));V=U.convertViewPositionToModelPosition($).column}const W=x.startLineNumber;let z=x.startColumn,B=F[0].range,K=null;for(const H of F)B=f.Range.plusRange(B,H.range),H.range.startLineNumber===W&&H.range.endLineNumber===W&&(z=Math.max(Math.min(z,H.range.startColumn),V)),H.forceShowAtRange&&(K=H.range);return{showAtPosition:K?K.getStartPosition():new T.Position(W,x.startColumn),showAtSecondaryPosition:K?K.getStartPosition():new T.Position(W,z),highlightRange:B}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}};e.ContentHoverController=g,e.ContentHoverController=g=c=fe([O(1,a.IInstantiationService),O(2,r.IKeybindingService)],g);class w{constructor(P,x,F){this.anchor=P,this.messages=x,this.isComplete=F}filter(P){const x=this.messages.filter(F=>F.isValidForHoverAnchor(P));return x.length===this.messages.length?this:new E(this,this.anchor,x,this.isComplete)}}class E extends w{constructor(P,x,F,V){super(x,F,V),this.original=P}filter(P){return this.original.filter(P)}}class C{constructor(P,x,F,V,W,z,B,K,H,U){this.colorPicker=P,this.showAtPosition=x,this.showAtSecondaryPosition=F,this.preferAbove=V,this.stoleFocus=W,this.source=z,this.isBeforeContent=B,this.initialMousePosX=K,this.initialMousePosY=H,this.disposables=U,this.closestMouseDistance=void 0}}const I=30,_=10,A=6;let k=class extends u.ResizableContentWidget{static{l=this}static{this.ID="editor.contrib.resizableContentHoverWidget"}static{this._lastDimensions=new t.Dimension(0,0)}get isColorPickerVisible(){return!!this._visibleData?.colorPicker}get isVisibleFromKeyboard(){return this._visibleData?.source===1}get isVisible(){return this._hoverVisibleKey.get()??!1}get isFocused(){return this._hoverFocusedKey.get()??!1}constructor(P,x,F,V,W){const z=P.getOption(65)+8,B=150,K=new t.Dimension(B,z);super(P,K),this._configurationService=F,this._accessibilityService=V,this._keybindingService=W,this._hover=this._register(new y.HoverWidget),this._minimumSize=K,this._hoverVisibleKey=s.EditorContextKeys.hoverVisible.bindTo(x),this._hoverFocusedKey=s.EditorContextKeys.hoverFocused.bindTo(x),t.append(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(U=>{U.hasChanged(49)&&this._updateFont()}));const H=this._register(t.trackFocus(this._resizableNode.domNode));this._register(H.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(H.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._layout(),this._editor.addContentWidget(this)}dispose(){super.dispose(),this._visibleData?.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return l.ID}static _applyDimensions(P,x,F){const V=typeof x=="number"?`${x}px`:x,W=typeof F=="number"?`${F}px`:F;P.style.width=V,P.style.height=W}_setContentsDomNodeDimensions(P,x){const F=this._hover.contentsDomNode;return l._applyDimensions(F,P,x)}_setContainerDomNodeDimensions(P,x){const F=this._hover.containerDomNode;return l._applyDimensions(F,P,x)}_setHoverWidgetDimensions(P,x){this._setContentsDomNodeDimensions(P,x),this._setContainerDomNodeDimensions(P,x),this._layoutContentWidget()}static _applyMaxDimensions(P,x,F){const V=typeof x=="number"?`${x}px`:x,W=typeof F=="number"?`${F}px`:F;P.style.maxWidth=V,P.style.maxHeight=W}_setHoverWidgetMaxDimensions(P,x){l._applyMaxDimensions(this._hover.contentsDomNode,P,x),l._applyMaxDimensions(this._hover.containerDomNode,P,x),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof P=="number"?`${P}px`:P),this._layoutContentWidget()}_hasHorizontalScrollbar(){const P=this._hover.scrollbar.getScrollDimensions();return P.scrollWidth>P.width}_adjustContentsBottomPadding(){const P=this._hover.contentsDomNode,x=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;P.style.paddingBottom!==x&&(P.style.paddingBottom=x)}_setAdjustedHoverWidgetDimensions(P){this._setHoverWidgetMaxDimensions("none","none");const x=P.width,F=P.height;this._setHoverWidgetDimensions(x,F),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(x,F-_))}_updateResizableNodeMaxDimensions(){const P=this._findMaximumRenderingWidth()??1/0,x=this._findMaximumRenderingHeight()??1/0;this._resizableNode.maxSize=new t.Dimension(P,x),this._setHoverWidgetMaxDimensions(P,x)}_resize(P){l._lastDimensions=new t.Dimension(P.width,P.height),this._setAdjustedHoverWidgetDimensions(P),this._resizableNode.layout(P.height,P.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),this._visibleData?.colorPicker?.layout()}_findAvailableSpaceVertically(){const P=this._visibleData?.showAtPosition;if(P)return this._positionPreference===1?this._availableVerticalSpaceAbove(P):this._availableVerticalSpaceBelow(P)}_findMaximumRenderingHeight(){const P=this._findAvailableSpaceVertically();if(!P)return;let x=A;return Array.from(this._hover.contentsDomNode.children).forEach(F=>{x+=F.clientHeight}),this._hasHorizontalScrollbar()&&(x+=_),Math.min(P,x)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const P=Array.from(this._hover.contentsDomNode.children).some(x=>x.scrollWidth>x.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),P}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const P=this._isHoverTextOverflowing(),x=typeof this._contentWidth>"u"?0:this._contentWidth-2;return P||this._hover.containerDomNode.clientWidth<x?t.getClientArea(document.body).width-14:this._hover.containerDomNode.clientWidth+2}isMouseGettingCloser(P,x){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=P,this._visibleData.initialMousePosY=x,!1;const F=t.getDomNodePagePosition(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=M(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,F.left,F.top,F.width,F.height));const V=M(P,x,F.left,F.top,F.width,F.height);return V>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,V),!0)}_setHoverData(P){this._visibleData?.disposables.dispose(),this._visibleData=P,this._hoverVisibleKey.set(!!P),this._hover.containerDomNode.classList.toggle("hidden",!P)}_layout(){const{fontSize:P,lineHeight:x}=this._editor.getOption(49),F=this._hover.contentsDomNode;F.style.fontSize=`${P}px`,F.style.lineHeight=`${x/P}`,this._updateMaxDimensions()}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(x=>this._editor.applyFontInfo(x))}_updateContent(P){const x=this._hover.contentsDomNode;x.style.paddingBottom="",x.textContent="",x.appendChild(P)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const P=Math.max(this._editor.getLayoutInfo().height/4,250,l._lastDimensions.height),x=Math.max(this._editor.getLayoutInfo().width*.66,500,l._lastDimensions.width);this._setHoverWidgetMaxDimensions(x,P)}_render(P,x){this._setHoverData(x),this._updateFont(),this._updateContent(P),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[this._positionPreference??1]}:null}showAt(P,x){if(!this._editor||!this._editor.hasModel())return;this._render(P,x);const F=t.getTotalHeight(this._hover.containerDomNode),V=x.showAtPosition;this._positionPreference=this._findPositionPreference(F,V)??1,this.onContentsChanged(),x.stoleFocus&&this._hover.containerDomNode.focus(),x.colorPicker?.layout();const W=(0,y.getHoverAccessibleViewHint)(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel()??"");W&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+W)}hide(){if(!this._visibleData)return;const P=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new t.Dimension(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),P&&this._editor.focus()}_removeConstraintsRenderNormally(){const P=this._editor.getLayoutInfo();this._resizableNode.layout(P.height,P.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(P){const x=this._hover.containerDomNode,F=this._hover.contentsDomNode,V=this._findMaximumRenderingHeight()??1/0;this._setContainerDomNodeDimensions(t.getTotalWidth(x),Math.min(V,P)),this._setContentsDomNodeDimensions(t.getTotalWidth(F),Math.min(V,P-_))}setMinimumDimensions(P){this._minimumSize=new t.Dimension(Math.max(this._minimumSize.width,P.width),Math.max(this._minimumSize.height,P.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const P=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new t.Dimension(P,this._minimumSize.height)}onContentsChanged(){this._removeConstraintsRenderNormally();const P=this._hover.containerDomNode;let x=t.getTotalHeight(P),F=t.getTotalWidth(P);if(this._resizableNode.layout(x,F),this._setHoverWidgetDimensions(F,x),x=t.getTotalHeight(P),F=t.getTotalWidth(P),this._contentWidth=F,this._updateMinimumWidth(),this._resizableNode.layout(x,F),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(x)),this._visibleData?.showAtPosition){const V=t.getTotalHeight(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(V,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const P=this._hover.scrollbar.getScrollPosition().scrollTop,x=this._editor.getOption(49);this._hover.scrollbar.setScrollPosition({scrollTop:P-x.lineHeight})}scrollDown(){const P=this._hover.scrollbar.getScrollPosition().scrollTop,x=this._editor.getOption(49);this._hover.scrollbar.setScrollPosition({scrollTop:P+x.lineHeight})}scrollLeft(){const P=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:P-I})}scrollRight(){const P=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:P+I})}pageUp(){const P=this._hover.scrollbar.getScrollPosition().scrollTop,x=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:P-x})}pageDown(){const P=this._hover.scrollbar.getScrollPosition().scrollTop,x=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:P+x})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};e.ContentHoverWidget=k,e.ContentHoverWidget=k=l=fe([O(1,o.IContextKeyService),O(2,d.IConfigurationService),O(3,p.IAccessibilityService),O(4,r.IKeybindingService)],k);let L=class extends D.Disposable{get hasContent(){return this._hasContent}constructor(P){super(),this._keybindingService=P,this._hasContent=!1,this.hoverElement=n("div.hover-row.status-bar"),this.actionsElement=t.append(this.hoverElement,n("div.actions"))}addAction(P){const x=this._keybindingService.lookupKeybinding(P.commandId),F=x?x.getLabel():null;return this._hasContent=!0,this._register(y.HoverAction.render(this.actionsElement,P,F))}append(P){const x=t.append(this.actionsElement,P);return this._hasContent=!0,x}};e.EditorHoverStatusBar=L,e.EditorHoverStatusBar=L=fe([O(0,r.IKeybindingService)],L);class R{get anchor(){return this._anchor}set anchor(P){this._anchor=P}get shouldFocus(){return this._shouldFocus}set shouldFocus(P){this._shouldFocus=P}get source(){return this._source}set source(P){this._source=P}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(P){this._insistOnKeepingHoverVisible=P}constructor(P,x){this._editor=P,this._participants=x,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(P,x){if(x.type!==1&&!x.supportsMarkerHover)return[];const F=P.getModel(),V=x.range.startLineNumber;if(V>F.getLineCount())return[];const W=F.getLineMaxColumn(V);return P.getLineDecorations(V).filter(z=>{if(z.options.isWholeLine)return!0;const B=z.range.startLineNumber===V?z.range.startColumn:1,K=z.range.endLineNumber===V?z.range.endColumn:W;if(z.options.showIfCollapsed){if(B>x.range.startColumn+1||x.range.endColumn-1>K)return!1}else if(B>x.range.startColumn||x.range.endColumn>K)return!1;return!0})}computeAsync(P){const x=this._anchor;if(!this._editor.hasModel()||!x)return i.AsyncIterableObject.EMPTY;const F=R._getLineDecorations(this._editor,x);return i.AsyncIterableObject.merge(this._participants.map(V=>V.computeAsync?V.computeAsync(x,F,P):i.AsyncIterableObject.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const P=R._getLineDecorations(this._editor,this._anchor);let x=[];for(const F of this._participants)x=x.concat(F.computeSync(this._anchor,P));return(0,b.coalesce)(x)}}function M(N,P,x,F,V,W){const z=x+V/2,B=F+W/2,K=Math.max(Math.abs(N-z)-V/2,0),H=Math.max(Math.abs(P-B)-W/2,0);return Math.sqrt(K*K+H*H)}}),define(Q[3405],Y([1,0,4,1220,5,1224,38,6,74,48,73,8,57,125,1176,7,792]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";var o,u;Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerWidget=e.StandaloneColorPickerController=void 0;let d=class extends t.Disposable{static{o=this}static{this.ID="editor.contrib.standaloneColorPickerController"}constructor(w,E,C,I,_,A,k){super(),this._editor=w,this._modelService=C,this._keybindingService=I,this._instantiationService=_,this._languageFeatureService=A,this._languageConfigurationService=k,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=S.EditorContextKeys.standaloneColorPickerVisible.bindTo(E),this._standaloneColorPickerFocused=S.EditorContextKeys.standaloneColorPickerFocused.bindTo(E)}showOrFocus(){this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||this._standaloneColorPickerWidget?.focus():this._standaloneColorPickerWidget=new l(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerWidget?.hide(),this._editor.focus()}insertColor(){this._standaloneColorPickerWidget?.updateEditor(),this.hide()}static get(w){return w.getContribution(o.ID)}};e.StandaloneColorPickerController=d,e.StandaloneColorPickerController=d=o=fe([O(1,h.IContextKeyService),O(2,a.IModelService),O(3,T.IKeybindingService),O(4,b.IInstantiationService),O(5,v.ILanguageFeaturesService),O(6,r.ILanguageConfigurationService)],d),(0,m.registerEditorContribution)(d.ID,d,1);const p=8,c=22;let l=class extends t.Disposable{static{u=this}static{this.ID="editor.contrib.standaloneColorPickerWidget"}constructor(w,E,C,I,_,A,k,L){super(),this._editor=w,this._standaloneColorPickerVisible=E,this._standaloneColorPickerFocused=C,this._modelService=_,this._keybindingService=A,this._languageFeaturesService=k,this._languageConfigurationService=L,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new f.Emitter),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=I.createInstance(y.StandaloneColorPickerParticipant,this._editor),this._position=this._editor._getViewModel()?.getPrimaryCursorState().modelState.position;const R=this._editor.getSelection(),M=R?{startLineNumber:R.startLineNumber,startColumn:R.startColumn,endLineNumber:R.endLineNumber,endColumn:R.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},N=this._register(s.trackFocus(this._body));this._register(N.onDidBlur(P=>{this.hide()})),this._register(N.onDidFocus(P=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(P=>{const x=P.target.element?.classList;x&&x.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(P=>{this._render(P.value,P.foundInEditor)})),this._start(M),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return u.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const w=this._editor.getOption(59).above;return{position:this._position,secondaryPosition:this._position,preference:w?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(w){const E=await this._computeAsync(w);E&&this._onResult.fire(new n(E.result,E.foundInEditor))}async _computeAsync(w){if(!this._editor.hasModel())return null;const E={range:w,color:{red:0,green:0,blue:0,alpha:1}},C=await this._standaloneColorPickerParticipant.createColorHover(E,new i.DefaultDocumentColorProvider(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return C?{result:C.colorHover,foundInEditor:C.foundInEditor}:null}_render(w,E){const C=document.createDocumentFragment(),I=this._register(new D.EditorHoverStatusBar(this._keybindingService));let _;const A={fragment:C,statusBar:I,setColorPicker:V=>_=V,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=w,this._register(this._standaloneColorPickerParticipant.renderHoverParts(A,[w])),_===void 0)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(C),_.layout();const k=_.body,L=k.saturationBox.domNode.clientWidth,R=k.domNode.clientWidth-L-c-p,M=_.body.enterButton;M?.onClicked(()=>{this.updateEditor(),this.hide()});const N=_.header,P=N.pickedColorNode;P.style.width=L+p+"px";const x=N.originalColorNode;x.style.width=R+"px",_.header.closeButton?.onClicked(()=>{this.hide()}),E&&(M&&(M.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(w.range)),this._editor.layoutContentWidget(this)}};e.StandaloneColorPickerWidget=l,e.StandaloneColorPickerWidget=l=u=fe([O(3,b.IInstantiationService),O(4,a.IModelService),O(5,T.IKeybindingService),O(6,v.ILanguageFeaturesService),O(7,r.ILanguageConfigurationService)],l);class n{constructor(w,E){this.value=w,this.foundInEditor=E}}}),define(Q[3406],Y([1,0,48,2373,3405,73,13,792]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowOrFocusStandaloneColorPicker=void 0;class f extends t.EditorAction2{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:(0,y.localize)(0,null),mnemonicTitle:(0,y.localize)(1,null),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:T.MenuId.CommandPalette}]})}runEditorCommand(h,a){b.StandaloneColorPickerController.get(a)?.showOrFocus()}}e.ShowOrFocusStandaloneColorPicker=f;class v extends t.EditorAction{constructor(){super({id:"editor.action.hideColorPicker",label:(0,y.localize)(2,null),alias:"Hide the Color Picker",precondition:D.EditorContextKeys.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(h,a){b.StandaloneColorPickerController.get(a)?.hide()}}class m extends t.EditorAction{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:(0,y.localize)(3,null),alias:"Insert Color with Standalone Color Picker",precondition:D.EditorContextKeys.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(h,a){b.StandaloneColorPickerController.get(a)?.insertColor()}}(0,t.registerEditorAction)(v),(0,t.registerEditorAction)(m),(0,T.registerAction2)(f)}),define(Q[3407],Y([1,0,14,15,348,48,27,96,73,98,242,2402,1914,1733]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0});let i=class{static{r=this}static{this.ID="editor.contrib.inPlaceReplaceController"}static get(d){return d.getContribution(r.ID)}static{this.DECORATION=m.ModelDecorationOptions.register({description:"in-place-replace",className:"valueSetReplacement"})}constructor(d,p){this.editor=d,this.editorWorkerService=p,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(d,p){this.currentRequest?.cancel();const c=this.editor.getSelection(),l=this.editor.getModel();if(!l||!c)return;let n=c;if(n.startLineNumber!==n.endLineNumber)return;const g=new b.EditorState(this.editor,5),w=l.uri;return this.editorWorkerService.canNavigateValueSet(w)?(this.currentRequest=(0,t.createCancelablePromise)(E=>this.editorWorkerService.navigateValueSet(w,n,p)),this.currentRequest.then(E=>{if(!E||!E.range||!E.value||!g.validate(this.editor))return;const C=T.Range.lift(E.range);let I=E.range;const _=E.value.length-(n.endColumn-n.startColumn);I={startLineNumber:I.startLineNumber,startColumn:I.startColumn,endLineNumber:I.endLineNumber,endColumn:I.startColumn+E.value.length},_>1&&(n=new f.Selection(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn+_-1));const A=new a.InPlaceReplaceCommand(C,n,E.value);this.editor.pushUndoStop(),this.editor.executeCommand(d,A),this.editor.pushUndoStop(),this.decorations.set([{range:I,options:r.DECORATION}]),this.decorationRemover?.cancel(),this.decorationRemover=(0,t.timeout)(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(y.onUnexpectedError)}).catch(y.onUnexpectedError)):Promise.resolve(void 0)}};i=r=fe([O(1,S.IEditorWorkerService)],i);class s extends D.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.up",label:h.localize(0,null),alias:"Replace with Previous Value",precondition:v.EditorContextKeys.writable,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:3159,weight:100}})}run(d,p){const c=i.get(p);return c?c.run(this.id,!1):Promise.resolve(void 0)}}class o extends D.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.down",label:h.localize(1,null),alias:"Replace with Next Value",precondition:v.EditorContextKeys.writable,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:3161,weight:100}})}run(d,p){const c=i.get(p);return c?c.run(this.id,!0):Promise.resolve(void 0)}}(0,D.registerEditorContribution)(i.ID,i,4),(0,D.registerEditorAction)(s),(0,D.registerEditorAction)(o)}),define(Q[892],Y([1,0,7,14,32,4,33,37,27,98,5,1736]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineProgressManager=void 0;const h=m.ModelDecorationOptions.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:T.noBreakWhitespace,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class a extends D.Disposable{static{this.baseId="editor.widget.inlineProgressWidget"}constructor(s,o,u,d,p){super(),this.typeId=s,this.editor=o,this.range=u,this.delegate=p,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(d),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(s){this.domNode=t.$(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=s;const o=t.$("span.icon");this.domNode.append(o),o.classList.add(...f.ThemeIcon.asClassNameArray(b.Codicon.loading),"codicon-modifier-spin");const u=()=>{const d=this.editor.getOption(65);this.domNode.style.height=`${d}px`,this.domNode.style.width=`${Math.ceil(.8*d)}px`};u(),this._register(this.editor.onDidChangeConfiguration(d=>{(d.hasChanged(51)||d.hasChanged(65))&&u()})),this._register(t.addDisposableListener(this.domNode,t.EventType.CLICK,d=>{this.delegate.cancel()}))}getId(){return a.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}let r=class extends D.Disposable{constructor(s,o,u){super(),this.id=s,this._editor=o,this._instantiationService=u,this._showDelay=500,this._showPromise=this._register(new D.MutableDisposable),this._currentWidget=new D.MutableDisposable,this._operationIdPool=0,this._currentDecorations=o.createDecorationsCollection()}async showWhile(s,o,u){const d=this._operationIdPool++;this._currentOperation=d,this.clear(),this._showPromise.value=(0,y.disposableTimeout)(()=>{const p=v.Range.fromPositions(s);this._currentDecorations.set([{range:p,options:h}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(a,this.id,this._editor,p,o,u))},this._showDelay);try{return await u}finally{this._currentOperation===d&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};e.InlineProgressManager=r,e.InlineProgressManager=r=fe([O(2,S.IInstantiationService)],r)}),define(Q[1225],Y([1,0,7,20,14,365,4,197,18,59,675,874,152,27,74,1143,348,892,2378,68,8,5,72,43,1154]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w){"use strict";var E;Object.defineProperty(e,"__esModule",{value:!0}),e.CopyPasteController=e.pasteWidgetVisibleCtx=e.changePasteTypeCommandId=void 0,e.changePasteTypeCommandId="editor.changePasteType",e.pasteWidgetVisibleCtx=new c.RawContextKey("pasteWidgetVisible",!1,(0,d.localize)(0,null));const C="application/vnd.code.copyMetadata";let I=class extends T.Disposable{static{E=this}static{this.ID="editor.contrib.copyPasteActionController"}static get(k){return k.getContribution(E.ID)}constructor(k,L,R,M,N,P,x){super(),this._bulkEditService=R,this._clipboardService=M,this._languageFeaturesService=N,this._quickInputService=P,this._progressService=x,this._editor=k;const F=k.getContainerDomNode();this._register((0,t.addDisposableListener)(F,"copy",V=>this.handleCopy(V))),this._register((0,t.addDisposableListener)(F,"cut",V=>this.handleCopy(V))),this._register((0,t.addDisposableListener)(F,"paste",V=>this.handlePaste(V),!0)),this._pasteProgressManager=this._register(new u.InlineProgressManager("pasteIntoEditor",k,L)),this._postPasteWidgetManager=this._register(L.createInstance(w.PostEditWidgetManager,"pasteIntoEditor",k,e.pasteWidgetVisibleCtx,{id:e.changePasteTypeCommandId,label:(0,d.localize)(1,null)}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(k){this._editor.focus();try{this._pasteAsActionContext={preferredId:k},document.execCommand("paste")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(83).enabled&&!this._editor.getOption(89)}handleCopy(k){if(!this._editor.hasTextFocus()||(v.isWeb&&this._clipboardService.writeResources([]),!k.clipboardData||!this.isPasteAsEnabled()))return;const L=this._editor.getModel(),R=this._editor.getSelections();if(!L||!R?.length)return;const M=this._editor.getOption(36);let N=R;const P=R.length===1&&R[0].isEmpty();if(P){if(!M)return;N=[new r.Range(N[0].startLineNumber,1,N[0].startLineNumber,1+L.getLineLength(N[0].startLineNumber))]}const x=this._editor._getViewModel()?.getPlainTextToCopy(R,M,v.isWindows),V={multicursorText:Array.isArray(x)?x:null,pasteOnNewLine:P,mode:null},W=this._languageFeaturesService.documentPasteEditProvider.ordered(L).filter(U=>!!U.prepareDocumentPaste);if(!W.length){this.setCopyMetadata(k.clipboardData,{defaultPastePayload:V});return}const z=(0,h.toVSDataTransfer)(k.clipboardData),B=W.flatMap(U=>U.copyMimeTypes??[]),K=(0,m.generateUuid)();this.setCopyMetadata(k.clipboardData,{id:K,providerCopyMimeTypes:B,defaultPastePayload:V});const H=(0,b.createCancelablePromise)(async U=>{const G=(0,y.coalesce)(await Promise.all(W.map(async $=>{try{return await $.prepareDocumentPaste(L,N,z,U)}catch(ie){console.error(ie);return}})));G.reverse();for(const $ of G)for(const[ie,J]of $)z.replace(ie,J);return z});this._currentCopyOperation?.dataTransferPromise.cancel(),this._currentCopyOperation={handle:K,dataTransferPromise:H}}async handlePaste(k){if(!k.clipboardData||!this._editor.hasTextFocus())return;this._currentPasteOperation?.cancel(),this._currentPasteOperation=void 0;const L=this._editor.getModel(),R=this._editor.getSelections();if(!R?.length||!L||!this.isPasteAsEnabled())return;const M=this.fetchCopyMetadata(k),N=(0,h.toExternalVSDataTransfer)(k.clipboardData);N.delete(C);const P=[...k.clipboardData.types,...M?.providerCopyMimeTypes??[],f.Mimes.uriList],x=this._languageFeaturesService.documentPasteEditProvider.ordered(L).filter(F=>F.pasteMimeTypes?.some(V=>(0,D.matchesMimeType)(V,P)));x.length&&(k.preventDefault(),k.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,x,R,N,M):this.doPasteInline(x,R,N,M))}doPasteInline(k,L,R,M){const N=(0,b.createCancelablePromise)(async P=>{const x=this._editor;if(!x.hasModel())return;const F=x.getModel(),V=new o.EditorStateCancellationTokenSource(x,3,void 0,P);try{if(await this.mergeInDataFromCopy(R,M,V.token),V.token.isCancellationRequested)return;const W=k.filter(B=>_(B,R));if(!W.length||W.length===1&&W[0].id==="text"){await this.applyDefaultPasteHandler(R,M,V.token);return}const z=await this.getPasteEdits(W,R,F,L,V.token);if(V.token.isCancellationRequested)return;if(z.length===1&&z[0].providerId==="text"){await this.applyDefaultPasteHandler(R,M,V.token);return}if(z.length){const B=x.getOption(83).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(L,{activeEditIndex:0,allEdits:z},B,V.token)}await this.applyDefaultPasteHandler(R,M,V.token)}finally{V.dispose(),this._currentPasteOperation===N&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(L[0].getEndPosition(),(0,d.localize)(2,null),N),this._currentPasteOperation=N}showPasteAsPick(k,L,R,M,N){const P=(0,b.createCancelablePromise)(async x=>{const F=this._editor;if(!F.hasModel())return;const V=F.getModel(),W=new o.EditorStateCancellationTokenSource(F,3,void 0,x);try{if(await this.mergeInDataFromCopy(M,N,W.token),W.token.isCancellationRequested)return;let z=L.filter(U=>_(U,M));k&&(z=z.filter(U=>U.id===k));const B=await this.getPasteEdits(z,M,V,R,W.token);if(W.token.isCancellationRequested||!B.length)return;let K;if(k?K=B.at(0):K=(await this._quickInputService.pick(B.map(G=>({label:G.label,description:G.providerId,detail:G.detail,edit:G})),{placeHolder:(0,d.localize)(3,null)}))?.edit,!K)return;const H=(0,s.createCombinedWorkspaceEdit)(V.uri,R,K);await this._bulkEditService.apply(H,{editor:this._editor})}finally{W.dispose(),this._currentPasteOperation===P&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:(0,d.localize)(4,null)},()=>P)}setCopyMetadata(k,L){k.setData(C,JSON.stringify(L))}fetchCopyMetadata(k){if(!k.clipboardData)return;const L=k.clipboardData.getData(C);if(L)try{return JSON.parse(L)}catch{return}const[R,M]=S.ClipboardEventUtils.getTextData(k.clipboardData);if(M)return{defaultPastePayload:{mode:M.mode,multicursorText:M.multicursorText??null,pasteOnNewLine:!!M.isFromEmptySelection}}}async mergeInDataFromCopy(k,L,R){if(L?.id&&this._currentCopyOperation?.handle===L.id){const M=await this._currentCopyOperation.dataTransferPromise;if(R.isCancellationRequested)return;for(const[N,P]of M)k.replace(N,P)}if(!k.has(f.Mimes.uriList)){const M=await this._clipboardService.readResources();if(R.isCancellationRequested)return;M.length&&k.append(f.Mimes.uriList,(0,D.createStringDataTransferItem)(D.UriList.create(M)))}}async getPasteEdits(k,L,R,M,N){const P=await(0,b.raceCancellation)(Promise.all(k.map(async F=>{try{const V=await F.provideDocumentPasteEdits?.(R,M,L,N);if(V)return{...V,providerId:F.id}}catch(V){console.error(V)}})),N),x=(0,y.coalesce)(P??[]);return(0,s.sortEditsByYieldTo)(x),x}async applyDefaultPasteHandler(k,L,R){const M=k.get(f.Mimes.text)??k.get("text");if(!M)return;const N=await M.asString();if(R.isCancellationRequested)return;const P={text:N,pasteOnNewLine:L?.defaultPastePayload.pasteOnNewLine??!1,multicursorText:L?.defaultPastePayload.multicursorText??null,mode:null};this._editor.trigger("keyboard","paste",P)}};e.CopyPasteController=I,e.CopyPasteController=I=E=fe([O(1,l.IInstantiationService),O(2,a.IBulkEditService),O(3,p.IClipboardService),O(4,i.ILanguageFeaturesService),O(5,g.IQuickInputService),O(6,n.IProgressService)],I);function _(A,k){return!!A.pasteMimeTypes?.some(L=>k.matches(L))}}),define(Q[893],Y([1,0,20,14,365,4,874,27,74,565,584,348,892,2381,9,8,277,5,1143,1154]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.DropIntoEditorController=e.dropWidgetVisibleCtx=e.changeDropTypeCommandId=e.defaultProviderConfig=void 0,e.defaultProviderConfig="editor.experimental.dropIntoEditor.defaultProvider",e.changeDropTypeCommandId="editor.changeDropType",e.dropWidgetVisibleCtx=new s.RawContextKey("dropWidgetVisible",!1,(0,r.localize)(0,null));let l=class extends D.Disposable{static{c=this}static{this.ID="editor.contrib.dropIntoEditorController"}static get(g){return g.getContribution(c.ID)}constructor(g,w,E,C,I){super(),this._configService=E,this._languageFeaturesService=C,this._treeViewsDragAndDropService=I,this.treeItemsTransfer=o.LocalSelectionTransfer.getInstance(),this._dropProgressManager=this._register(w.createInstance(a.InlineProgressManager,"dropIntoEditor",g)),this._postDropWidgetManager=this._register(w.createInstance(p.PostEditWidgetManager,"dropIntoEditor",g,e.dropWidgetVisibleCtx,{id:e.changeDropTypeCommandId,label:(0,r.localize)(1,null)})),this._register(g.onDropIntoEditor(_=>this.onDropIntoEditor(g,_.position,_.event)))}clearWidgets(){this._postDropWidgetManager.clear()}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(g,w,E){if(!E.dataTransfer||!g.hasModel())return;this._currentOperation?.cancel(),g.focus(),g.setPosition(w);const C=(0,y.createCancelablePromise)(async I=>{const _=new h.EditorStateCancellationTokenSource(g,1,void 0,I);try{const A=await this.extractDataTransferData(E);if(A.size===0||_.token.isCancellationRequested)return;const k=g.getModel();if(!k)return;const L=this._languageFeaturesService.documentOnDropEditProvider.ordered(k).filter(M=>M.dropMimeTypes?M.dropMimeTypes.some(N=>A.matches(N)):!0),R=await this.getDropEdits(L,k,w,A,_);if(_.token.isCancellationRequested)return;if(R.length){const M=this.getInitialActiveEditIndex(k,R),N=g.getOption(35).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([f.Range.fromPositions(w)],{activeEditIndex:M,allEdits:R},N,I)}}finally{_.dispose(),this._currentOperation===C&&(this._currentOperation=void 0)}});this._dropProgressManager.showWhile(w,(0,r.localize)(2,null),C),this._currentOperation=C}async getDropEdits(g,w,E,C,I){const _=await(0,y.raceCancellation)(Promise.all(g.map(async k=>{try{const L=await k.provideDocumentOnDropEdits(w,E,C,I.token);if(L)return{...L,providerId:k.id}}catch(L){console.error(L)}})),I.token),A=(0,t.coalesce)(_??[]);return(0,d.sortEditsByYieldTo)(A)}getInitialActiveEditIndex(g,w){const E=this._configService.getValue(e.defaultProviderConfig,{resource:g.uri});for(const[C,I]of Object.entries(E)){const _=w.findIndex(A=>I===A.providerId&&A.handledMimeType&&(0,b.matchesMimeType)(C,[A.handledMimeType]));if(_>=0)return _}return 0}async extractDataTransferData(g){if(!g.dataTransfer)return new b.VSDataTransfer;const w=(0,T.toExternalVSDataTransfer)(g.dataTransfer);if(this.treeItemsTransfer.hasData(m.DraggedTreeItemsIdentifier.prototype)){const E=this.treeItemsTransfer.getData(m.DraggedTreeItemsIdentifier.prototype);if(Array.isArray(E))for(const C of E){const I=await this._treeViewsDragAndDropService.removeDragOperationTransfer(C.identifier);if(I)for(const[_,A]of I)w.replace(_,A)}}return w}};e.DropIntoEditorController=l,e.DropIntoEditorController=l=c=fe([O(1,u.IInstantiationService),O(2,i.IConfigurationService),O(3,v.ILanguageFeaturesService),O(4,S.ITreeViewsDnDService)],l)}),define(Q[3408],Y([1,0,20,14,31,80,15,6,4,33,10,48,79,51,27,73,98,125,2412,8,74,36,328,145,1737]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";var w;Object.defineProperty(e,"__esModule",{value:!0}),e.editorLinkedEditingBackground=e.LinkedEditingAction=e.LinkedEditingContribution=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE=void 0,e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE=new p.RawContextKey("LinkedEditingInputVisible",!1);const E="linked-editing-decoration";let C=class extends v.Disposable{static{w=this}static{this.ID="editor.contrib.linkedEditing"}static{this.DECORATION=o.ModelDecorationOptions.register({description:"linked-editing",stickiness:0,className:E})}static get(L){return L.getContribution(w.ID)}constructor(L,R,M,N,P){super(),this.languageConfigurationService=N,this._syncRangesToken=0,this._localToDispose=this._register(new v.DisposableStore),this._editor=L,this._providers=M.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(R),this._debounceInformation=P.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new v.DisposableStore),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(x=>{(x.hasChanged(68)||x.hasChanged(91))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(L){const R=this._editor.getModel(),M=R!==null&&(this._editor.getOption(68)||this._editor.getOption(91))&&this._providers.has(R);if(M===this._enabled&&!L||(this._enabled=M,this.clearRanges(),this._localToDispose.clear(),!M||R===null))return;this._localToDispose.add(f.Event.runAndSubscribe(R.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(R.getLanguageId()).getWordDefinition()}));const N=new y.Delayer(this._debounceInformation.get(R)),P=()=>{this._rangeUpdateTriggerPromise=N.trigger(()=>this.updateRanges(),this._debounceDuration??this._debounceInformation.get(R))},x=new y.Delayer(0),F=V=>{this._rangeSyncTriggerPromise=x.trigger(()=>this._syncRanges(V))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{P()})),this._localToDispose.add(this._editor.onDidChangeModelContent(V=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const W=this._currentDecorations.getRange(0);if(W&&V.changes.every(z=>W.intersectRanges(z.range))){F(this._syncRangesToken);return}}P()})),this._localToDispose.add({dispose:()=>{N.dispose(),x.dispose()}}),this.updateRanges()}_syncRanges(L){if(!this._editor.hasModel()||L!==this._syncRangesToken||this._currentDecorations.length===0)return;const R=this._editor.getModel(),M=this._currentDecorations.getRange(0);if(!M||M.startLineNumber!==M.endLineNumber)return this.clearRanges();const N=R.getValueInRange(M);if(this._currentWordPattern){const x=N.match(this._currentWordPattern);if((x?x[0].length:0)!==N.length)return this.clearRanges()}const P=[];for(let x=1,F=this._currentDecorations.length;x<F;x++){const V=this._currentDecorations.getRange(x);if(V)if(V.startLineNumber!==V.endLineNumber)P.push({range:V,text:N});else{let W=R.getValueInRange(V),z=N,B=V.startColumn,K=V.endColumn;const H=m.commonPrefixLength(W,z);B+=H,W=W.substr(H),z=z.substr(H);const U=m.commonSuffixLength(W,z);K-=U,W=W.substr(0,W.length-U),z=z.substr(0,z.length-U),(B!==K||z.length!==0)&&P.push({range:new i.Range(V.startLineNumber,B,V.endLineNumber,K),text:z})}}if(P.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const x=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",P),this._editor._getViewModel().setPrevEditOperationType(x)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}get currentUpdateTriggerPromise(){return this._rangeUpdateTriggerPromise||Promise.resolve()}get currentSyncTriggerPromise(){return this._rangeSyncTriggerPromise||Promise.resolve()}async updateRanges(L=!1){if(!this._editor.hasModel()){this.clearRanges();return}const R=this._editor.getPosition();if(!this._enabled&&!L||this._editor.getSelections().length>1){this.clearRanges();return}const M=this._editor.getModel(),N=M.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===N){if(R.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const x=this._currentDecorations.getRange(0);if(x&&x.containsPosition(R))return}}this.clearRanges(),this._currentRequestPosition=R,this._currentRequestModelVersion=N;const P=(0,y.createCancelablePromise)(async x=>{try{const F=new g.StopWatch(!1),V=await A(this._providers,M,R,x);if(this._debounceInformation.update(M,F.elapsed()),P!==this._currentRequest||(this._currentRequest=null,N!==M.getVersionId()))return;let W=[];V?.ranges&&(W=V.ranges),this._currentWordPattern=V?.wordPattern||this._languageWordPattern;let z=!1;for(let K=0,H=W.length;K<H;K++)if(i.Range.containsPosition(W[K],R)){if(z=!0,K!==0){const U=W[K];W.splice(K,1),W.unshift(U)}break}if(!z){this.clearRanges();return}const B=W.map(K=>({range:K,options:w.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(B),this._syncRangesToken++}catch(F){(0,T.isCancellationError)(F)||(0,T.onUnexpectedError)(F),(this._currentRequest===P||!this._currentRequest)&&this.clearRanges()}});return this._currentRequest=P,P}setDebounceDuration(L){this._debounceDuration=L}};e.LinkedEditingContribution=C,e.LinkedEditingContribution=C=w=fe([O(1,p.IContextKeyService),O(2,c.ILanguageFeaturesService),O(3,u.ILanguageConfigurationService),O(4,n.ILanguageFeatureDebounceService)],C);class I extends h.EditorAction{constructor(){super({id:"editor.action.linkedEditing",label:d.localize(0,null),alias:"Start Linked Editing",precondition:p.ContextKeyExpr.and(s.EditorContextKeys.writable,s.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:3132,weight:100}})}runCommand(L,R){const M=L.get(a.ICodeEditorService),[N,P]=Array.isArray(R)&&R||[void 0,void 0];return S.URI.isUri(N)&&r.Position.isIPosition(P)?M.openCodeEditor({resource:N},M.getActiveCodeEditor()).then(x=>{x&&(x.setPosition(P),x.invokeWithinContext(F=>(this.reportTelemetry(F,x),this.run(F,x))))},T.onUnexpectedError):super.runCommand(L,R)}run(L,R){const M=C.get(R);return M?Promise.resolve(M.updateRanges(!0)):Promise.resolve()}}e.LinkedEditingAction=I;const _=h.EditorCommand.bindToContribution(C.get);(0,h.registerEditorCommand)(new _({id:"cancelLinkedEditingInput",precondition:e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE,handler:k=>k.clearRanges(),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));function A(k,L,R,M){const N=k.ordered(L);return(0,y.first)(N.map(P=>async()=>{try{return await P.provideLinkedEditingRanges(L,R,M)}catch(x){(0,T.onUnexpectedExternalError)(x);return}}),P=>!!P&&t.isNonEmptyArray(P?.ranges))}e.editorLinkedEditingBackground=(0,l.registerColor)("editor.linkedEditingBackground",{dark:D.Color.fromHex("#f00").transparent(.3),light:D.Color.fromHex("#f00").transparent(.3),hcDark:D.Color.fromHex("#f00").transparent(.3),hcLight:D.Color.white},d.localize(1,null)),(0,h.registerModelAndPositionCommand)("_executeLinkedEditingProvider",(k,L,R)=>{const{linkedEditingRangeProvider:M}=k.get(c.ILanguageFeaturesService);return A(M,L,R,b.CancellationToken.None)}),(0,h.registerEditorContribution)(C.ID,C,1),(0,h.registerEditorAction)(I)}),define(Q[1226],Y([1,0,14,31,15,110,4,22,18,26,145,10,48,98,328,74,677,3168,2413,23,41,1738]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDetector=void 0;let n=class extends T.Disposable{static{l=this}static{this.ID="editor.linkDetector"}static get(_){return _.getContribution(l.ID)}constructor(_,A,k,L,R){super(),this.editor=_,this.openerService=A,this.notificationService=k,this.languageFeaturesService=L,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=R.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new t.RunOnceScheduler(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const M=this._register(new o.ClickLinkGesture(_));this._register(M.onMouseMoveOrRelevantKeyDown(([N,P])=>{this._onEditorMouseMove(N,P)})),this._register(M.onExecute(N=>{this.onEditorMouseUp(N)})),this._register(M.onCancel(N=>{this.cleanUpActiveLinkDecoration()})),this._register(_.onDidChangeConfiguration(N=>{N.hasChanged(69)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(_.onDidChangeModelContent(N=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(_.onDidChangeModel(N=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(_.onDidChangeModelLanguage(N=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(N=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(69))return;const _=this.editor.getModel();if(this.providers.has(_)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,t.createCancelablePromise)(A=>(0,u.getLinks)(this.providers,_,A));try{const A=new S.StopWatch(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(_,A.elapsed()),_.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(A){(0,b.onUnexpectedError)(A)}finally{this.computePromise=null}}}updateDecorations(_){const A=this.editor.getOption(76)==="altKey",k=[],L=Object.keys(this.currentOccurrences);for(const M of L){const N=this.currentOccurrences[M];k.push(N.decorationId)}const R=[];if(_)for(const M of _)R.push(w.decoration(M,A));this.editor.changeDecorations(M=>{const N=M.deltaDecorations(k,R);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let P=0,x=N.length;P<x;P++){const F=new w(_[P],N[P]);this.currentOccurrences[F.decorationId]=F}})}_onEditorMouseMove(_,A){const k=this.editor.getOption(76)==="altKey";if(this.isEnabled(_,A)){this.cleanUpActiveLinkDecoration();const L=this.getLinkOccurrence(_.target.position);L&&this.editor.changeDecorations(R=>{L.activate(R,k),this.activeLinkDecorationId=L.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const _=this.editor.getOption(76)==="altKey";if(this.activeLinkDecorationId){const A=this.currentOccurrences[this.activeLinkDecorationId];A&&this.editor.changeDecorations(k=>{A.deactivate(k,_)}),this.activeLinkDecorationId=null}}onEditorMouseUp(_){if(!this.isEnabled(_))return;const A=this.getLinkOccurrence(_.target.position);A&&this.openLinkOccurrence(A,_.hasSideBySideModifier,!0)}openLinkOccurrence(_,A,k=!1){if(!this.openerService)return;const{link:L}=_;L.resolve(y.CancellationToken.None).then(R=>{if(typeof R=="string"&&this.editor.hasModel()){const M=this.editor.getModel().uri;if(M.scheme===f.Schemas.file&&R.startsWith(`${f.Schemas.file}:`)){const N=h.URI.parse(R);if(N.scheme===f.Schemas.file){const P=m.originalFSPath(N);let x=null;P.startsWith("/./")?x=`.${P.substr(1)}`:P.startsWith("//./")&&(x=`.${P.substr(2)}`),x&&(R=m.joinPath(M,x))}}}return this.openerService.open(R,{openToSide:A,fromUserGesture:k,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},R=>{const M=R instanceof Error?R.message:R;M==="invalid"?this.notificationService.warn(d.localize(0,null,L.url.toString())):M==="missing"?this.notificationService.warn(d.localize(1,null)):(0,b.onUnexpectedError)(R)})}getLinkOccurrence(_){if(!this.editor.hasModel()||!_)return null;const A=this.editor.getModel().getDecorationsInRange({startLineNumber:_.lineNumber,startColumn:_.column,endLineNumber:_.lineNumber,endColumn:_.column},0,!0);for(const k of A){const L=this.currentOccurrences[k.id];if(L)return L}return null}isEnabled(_,A){return!!(_.target.type===6&&(_.hasTriggerModifier||A&&A.keyCodeIsTriggerKey))}stop(){this.computeLinks.cancel(),this.activeLinksList&&(this.activeLinksList?.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};e.LinkDetector=n,e.LinkDetector=n=l=fe([O(1,c.IOpenerService),O(2,p.INotificationService),O(3,s.ILanguageFeaturesService),O(4,i.ILanguageFeatureDebounceService)],n);const g={general:r.ModelDecorationOptions.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:r.ModelDecorationOptions.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class w{static decoration(_,A){return{range:_.range,options:w._getOptions(_,A,!1)}}static _getOptions(_,A,k){const L={...k?g.active:g.general};return L.hoverMessage=E(_,A),L}constructor(_,A){this.link=_,this.decorationId=A}activate(_,A){_.changeDecorationOptions(this.decorationId,w._getOptions(this.link,A,!0))}deactivate(_,A){_.changeDecorationOptions(this.decorationId,w._getOptions(this.link,A,!1))}}function E(I,_){const A=I.url&&/^command:/i.test(I.url.toString()),k=I.tooltip?I.tooltip:A?d.localize(2,null):d.localize(3,null),L=_?v.isMacintosh?d.localize(4,null):d.localize(5,null):v.isMacintosh?d.localize(6,null):d.localize(7,null);if(I.url){let R="";if(/^command:/i.test(I.url.toString())){const N=I.url.toString().match(/^command:([^?#]+)/);if(N){const P=N[1];R=d.localize(8,null,P)}}return new D.MarkdownString("",!0).appendLink(I.url.toString(!0).replace(/ /g,"%20"),k,R).appendMarkdown(` (${L})`)}else return new D.MarkdownString().appendText(`${k} (${L})`)}class C extends a.EditorAction{constructor(){super({id:"editor.action.openLink",label:d.localize(9,null),alias:"Open Link",precondition:void 0})}run(_,A){const k=n.get(A);if(!k||!A.hasModel())return;const L=A.getSelections();for(const R of L){const M=k.getLinkOccurrence(R.getEndPosition());M&&k.openLinkOccurrence(M,!1)}}}(0,a.registerEditorContribution)(n.ID,n,1),(0,a.registerEditorAction)(C)}),define(Q[3409],Y([1,0,4,74,506,14,414,808,1088,125,15,1092,83]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyModelProvider=void 0;var r;(function(l){l.OUTLINE_MODEL="outlineModel",l.FOLDING_PROVIDER_MODEL="foldingProviderModel",l.INDENTATION_MODEL="indentationModel"})(r||(r={}));var i;(function(l){l[l.VALID=0]="VALID",l[l.INVALID=1]="INVALID",l[l.CANCELED=2]="CANCELED"})(i||(i={}));let s=class extends t.Disposable{constructor(n,g,w,E){super(),this._editor=n,this._languageConfigurationService=g,this._languageFeaturesService=w,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new D.Delayer(300)),this._updateOperation=this._register(new t.DisposableStore);const C=new u(w),I=new c(this._editor,w),_=new p(this._editor,g);switch(E){case r.OUTLINE_MODEL:this._modelProviders.push(C),this._modelProviders.push(I),this._modelProviders.push(_);break;case r.FOLDING_PROVIDER_MODEL:this._modelProviders.push(I),this._modelProviders.push(_);break;case r.INDENTATION_MODEL:this._modelProviders.push(_);break}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(n,g,w){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger(async()=>{for(const E of this._modelProviders){const{statusPromise:C,modelPromise:I}=E.computeStickyModel(n,g,w);this._modelPromise=I;const _=await C;if(this._modelPromise!==I)return null;switch(_){case i.CANCELED:return this._updateOperation.clear(),null;case i.VALID:return E.stickyModel}}return null}).catch(E=>((0,S.onUnexpectedError)(E),null))}};e.StickyModelProvider=s,e.StickyModelProvider=s=fe([O(1,m.ILanguageConfigurationService),O(2,y.ILanguageFeaturesService)],s);class o{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,i.INVALID}computeStickyModel(n,g,w){if(w.isCancellationRequested||!this.isProviderValid(n))return{statusPromise:this._invalid(),modelPromise:null};const E=(0,D.createCancelablePromise)(C=>this.createModelFromProvider(n,g,C));return{statusPromise:E.then(C=>this.isModelValid(C)?w.isCancellationRequested?i.CANCELED:(this._stickyModel=this.createStickyModel(n,g,w,C),i.VALID):this._invalid()).then(void 0,C=>((0,S.onUnexpectedError)(C),i.CANCELED)),modelPromise:E}}isModelValid(n){return!0}isProviderValid(n){return!0}}let u=class extends o{constructor(n){super(),this._languageFeaturesService=n}get provider(){return this._languageFeaturesService.documentSymbolProvider}createModelFromProvider(n,g,w){return b.OutlineModel.create(this._languageFeaturesService.documentSymbolProvider,n,w)}createStickyModel(n,g,w,E){const{stickyOutlineElement:C,providerID:I}=this._stickyModelFromOutlineModel(E,this._stickyModel?.outlineProviderId);return new h.StickyModel(n.uri,g,C,I)}isModelValid(n){return n&&n.children.size>0}_stickyModelFromOutlineModel(n,g){let w;if(a.Iterable.first(n.children.values())instanceof b.OutlineGroup){const _=a.Iterable.find(n.children.values(),A=>A.id===g);if(_)w=_.children;else{let A="",k=-1,L;for(const[R,M]of n.children.entries()){const N=this._findSumOfRangesOfGroup(M);N>k&&(L=M,k=N,A=M.id)}g=A,w=L.children}}else w=n.children;const E=[],C=Array.from(w.values()).sort((_,A)=>{const k=new h.StickyRange(_.symbol.range.startLineNumber,_.symbol.range.endLineNumber),L=new h.StickyRange(A.symbol.range.startLineNumber,A.symbol.range.endLineNumber);return this._comparator(k,L)});for(const _ of C)E.push(this._stickyModelFromOutlineElement(_,_.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new h.StickyElement(void 0,E,void 0),providerID:g}}_stickyModelFromOutlineElement(n,g){const w=[];for(const C of n.children.values())if(C.symbol.selectionRange.startLineNumber!==C.symbol.range.endLineNumber)if(C.symbol.selectionRange.startLineNumber!==g)w.push(this._stickyModelFromOutlineElement(C,C.symbol.selectionRange.startLineNumber));else for(const I of C.children.values())w.push(this._stickyModelFromOutlineElement(I,C.symbol.selectionRange.startLineNumber));w.sort((C,I)=>this._comparator(C.range,I.range));const E=new h.StickyRange(n.symbol.selectionRange.startLineNumber,n.symbol.range.endLineNumber);return new h.StickyElement(E,w,void 0)}_comparator(n,g){return n.startLineNumber!==g.startLineNumber?n.startLineNumber-g.startLineNumber:g.endLineNumber-n.endLineNumber}_findSumOfRangesOfGroup(n){let g=0;for(const w of n.children.values())g+=this._findSumOfRangesOfGroup(w);return n instanceof b.OutlineElement?g+n.symbol.range.endLineNumber-n.symbol.selectionRange.startLineNumber:g}};u=fe([O(0,y.ILanguageFeaturesService)],u);class d extends o{constructor(n){super(),this._foldingLimitReporter=new T.RangesLimitReporter(n)}createStickyModel(n,g,w,E){const C=this._fromFoldingRegions(E);return new h.StickyModel(n.uri,g,C,void 0)}isModelValid(n){return n!==null}_fromFoldingRegions(n){const g=n.length,w=[],E=new h.StickyElement(void 0,[],void 0);for(let C=0;C<g;C++){const I=n.getParentIndex(C);let _;I!==-1?_=w[I]:_=E;const A=new h.StickyElement(new h.StickyRange(n.getStartLineNumber(C),n.getEndLineNumber(C)+1),[],_);_.children.push(A),w.push(A)}return E}}let p=class extends d{constructor(n,g){super(n),this._languageConfigurationService=g}get provider(){return null}createModelFromProvider(n,g,w){return new v.IndentRangeProvider(n,this._languageConfigurationService,this._foldingLimitReporter).compute(w)}};p=fe([O(1,m.ILanguageConfigurationService)],p);let c=class extends d{constructor(n,g){super(n),this._languageFeaturesService=g}get provider(){return this._languageFeaturesService.foldingRangeProvider}isProviderValid(n){return T.FoldingController.getFoldingRangeProviders(this._languageFeaturesService,n).length>0}createModelFromProvider(n,g,w){const E=T.FoldingController.getFoldingRangeProviders(this._languageFeaturesService,n);return new f.SyntaxRangeProvider(n,E,()=>this.createModelFromProvider(n,g,w),this._foldingLimitReporter,void 0).compute(w)}};c=fe([O(1,y.ILanguageFeaturesService)],c)}),define(Q[3410],Y([1,0,4,74,31,14,20,6,125,3409]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyLineCandidateProvider=e.StickyLineCandidate=void 0;class S{constructor(r,i,s){this.startLineNumber=r,this.endLineNumber=i,this.nestingDepth=s}}e.StickyLineCandidate=S;let h=class extends t.Disposable{static{this.ID="store.contrib.stickyScrollController"}constructor(r,i,s){super(),this._languageFeaturesService=i,this._languageConfigurationService=s,this._onDidChangeStickyScroll=this._register(new f.Emitter),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=r,this._sessionStore=this._register(new t.DisposableStore),this._updateSoon=this._register(new D.RunOnceScheduler(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(113)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(113),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new m.StickyModelProvider(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this.update())}getVersionId(){return this._model?.version}async update(){this._cts?.dispose(!0),this._cts=new b.CancellationTokenSource,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(r){if(!this._editor.hasModel()||!this._stickyModelProvider){this._model=null;return}const i=this._editor.getModel(),s=i.getVersionId(),o=await this._stickyModelProvider.update(i,s,r);r.isCancellationRequested||(this._model=o)}updateIndex(r){return r===-1?r=0:r<0&&(r=-r-2),r}getCandidateStickyLinesIntersectingFromStickyModel(r,i,s,o,u){if(i.children.length===0)return;let d=u;const p=[];for(let n=0;n<i.children.length;n++){const g=i.children[n];g.range&&p.push(g.range.startLineNumber)}const c=this.updateIndex((0,T.binarySearch)(p,r.startLineNumber,(n,g)=>n-g)),l=this.updateIndex((0,T.binarySearch)(p,r.startLineNumber+o,(n,g)=>n-g));for(let n=c;n<=l;n++){const g=i.children[n];if(!g)return;if(g.range){const w=g.range.startLineNumber,E=g.range.endLineNumber;r.startLineNumber<=E+1&&w-1<=r.endLineNumber&&w!==d&&(d=w,s.push(new S(w,E-1,o+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(r,g,s,o+1,w))}else this.getCandidateStickyLinesIntersectingFromStickyModel(r,g,s,o,u)}}getCandidateStickyLinesIntersecting(r){if(!this._model?.element)return[];let i=[];this.getCandidateStickyLinesIntersectingFromStickyModel(r,this._model.element,i,0,-1);const s=this._editor._getViewModel()?.getHiddenAreas();if(s)for(const o of s)i=i.filter(u=>!(u.startLineNumber>=o.startLineNumber&&u.endLineNumber<=o.endLineNumber+1));return i}};e.StickyLineCandidateProvider=h,e.StickyLineCandidateProvider=h=fe([O(1,y.ILanguageFeaturesService),O(2,v.ILanguageConfigurationService)],h)}),define(Q[3411],Y([1,0,7,364,4,37,887,243,51,370,491,405,414,1223,1087,1745]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyScrollWidget=e.StickyScrollWidgetState=void 0;class s{constructor(n,g,w,E=null){this.startLineNumbers=n,this.endLineNumbers=g,this.lastLineRelativePosition=w,this.showEndForLine=E}}e.StickyScrollWidgetState=s;const o=(0,y.createTrustedTypesPolicy)("stickyScrollViewLayer",{createHTML:l=>l}),u="data-sticky-line-index";class d extends b.Disposable{constructor(n){super(),this._editor=n,this._foldingIconStore=new b.DisposableStore,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(65),this._stickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",n instanceof f.EmbeddedCodeEditorWidget),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const g=()=>{this._linesDomNode.style.left=this._editor.getOption(113).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(w=>{w.hasChanged(113)&&g(),w.hasChanged(65)&&(this._lineHeight=this._editor.getOption(65))})),this._register(this._editor.onDidScrollChange(w=>{w.scrollLeftChanged&&g(),w.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{g(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),g(),this._register(this._editor.onDidLayoutChange(w=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getCurrentLines(){return this._lineNumbers}setState(n){if(this._clearStickyWidget(),!n||!this._editor._getViewModel())return;if(n.startLineNumbers.length*this._lineHeight+n.lastLineRelativePosition>0){this._lastLineRelativePosition=n.lastLineRelativePosition;const w=[...n.startLineNumbers];n.showEndForLine!==null&&(w[n.showEndForLine]=n.endLineNumbers[n.showEndForLine]),this._lineNumbers=w}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode()}_updateWidgetWidth(){const n=this._editor.getLayoutInfo(),w=this._editor.getOption(71).side==="left"?n.contentLeft-n.minimap.minimapCanvasOuterWidth:n.contentLeft;this._lineNumbersDomNode.style.width=`${w}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-n.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${n.width-n.minimap.minimapCanvasOuterWidth-n.verticalScrollbarWidth}px`}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),t.clearNode(this._lineNumbersDomNode),t.clearNode(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(n){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${n?.5:0}s`)}_setFoldingIconsVisibility(n){for(const g of this._stickyLines){const w=g.foldingIcon;w&&w.setVisible(n?!0:w.isCollapsed)}}async _renderRootNode(){const n=await a.FoldingController.get(this._editor)?.getFoldingModel(),g=this._editor.getLayoutInfo();for(const[C,I]of this._lineNumbers.entries()){const _=this._renderChildNode(C,I,g,n);this._linesDomNode.appendChild(_.lineDomNode),this._lineNumbersDomNode.appendChild(_.lineNumberDomNode),this._stickyLines.push(_)}n&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const w=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;if(w===0){this._clearStickyWidget();return}this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${w}px`,this._linesDomNodeScrollable.style.height=`${w}px`,this._rootDomNode.style.height=`${w}px`,this._editor.getOption(71).side==="left"?this._rootDomNode.style.marginLeft=g.minimap.minimapCanvasOuterWidth+"px":this._rootDomNode.style.marginLeft="0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){this._editor.getOption(108)==="mouseover"&&(this._foldingIconStore.add(t.addDisposableListener(this._lineNumbersDomNode,t.EventType.MOUSE_ENTER,g=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(t.addDisposableListener(this._lineNumbersDomNode,t.EventType.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(n,g,w,E){const C=this._editor._getViewModel(),I=C.coordinatesConverter.convertModelPositionToViewPosition(new v.Position(g,1)).lineNumber,_=C.getViewLineRenderingData(I),A=this._editor.getOption(71).side,k=this._editor.getOption(66);let L;try{L=S.LineDecoration.filter(_.inlineDecorations,I,_.minColumn,_.maxColumn)}catch{L=[]}const R=new h.RenderLineInput(!0,!0,_.content,_.continuesWithWrappedLine,_.isBasicASCII,_.containsRTL,0,_.tokens,L,_.tabSize,_.startVisibleColumn,1,1,1,500,"none",!0,!0,null),M=new m.StringBuilder(2e3),N=(0,h.renderViewLine)(R,M);let P;o?P=o.createHTML(M.build()):P=M.build();const x=document.createElement("span");x.className="sticky-line-content",x.classList.add(`stickyLine${g}`),x.style.lineHeight=`${this._lineHeight}px`,x.innerHTML=P;const F=document.createElement("span");F.className="sticky-line-number",F.style.lineHeight=`${this._lineHeight}px`;const V=A==="left"?w.contentLeft-w.minimap.minimapCanvasOuterWidth:w.contentLeft;F.style.width=`${V}px`;const W=document.createElement("span");k.renderType===1||k.renderType===3&&g%10===0?W.innerText=g.toString():k.renderType===2&&(W.innerText=Math.abs(g-this._editor.getPosition().lineNumber).toString()),W.className="sticky-line-number-inner",W.style.lineHeight=`${this._lineHeight}px`,W.style.width=`${w.lineNumbersWidth}px`,W.style.float="left",A==="left"?W.style.paddingLeft=`${w.lineNumbersLeft-w.minimap.minimapCanvasOuterWidth}px`:A==="right"&&(W.style.paddingLeft=`${w.lineNumbersLeft}px`),F.appendChild(W);const z=this._renderFoldingIconForLine(F,E,n,g);this._editor.applyFontInfo(x),this._editor.applyFontInfo(W),x.setAttribute("role","listitem"),x.setAttribute(u,String(n)),x.tabIndex=0,F.style.lineHeight=`${this._lineHeight}px`,x.style.lineHeight=`${this._lineHeight}px`,F.style.height=`${this._lineHeight}px`,x.style.height=`${this._lineHeight}px`;const B=n===this._lineNumbers.length-1,K="0",H="1";x.style.zIndex=B?K:H,F.style.zIndex=B?K:H;const U=`${n*this._lineHeight+this._lastLineRelativePosition+(z?.isCollapsed?1:0)}px`,G=`${n*this._lineHeight}px`;return x.style.top=B?U:G,F.style.top=B?U:G,new p(g,x,F,z,N.characterMapping)}_renderFoldingIconForLine(n,g,w,E){const C=this._editor.getOption(108);if(!g||C==="never")return;const I=g.regions,_=I.findRange(E),A=I.getStartLineNumber(_);if(!(E===A))return;const L=I.isCollapsed(_),R=new c(L,this._lineHeight);return n.append(R.domNode),R.setVisible(this._isOnGlyphMargin?!0:L||C==="always"),this._foldingIconStore.add(t.addDisposableListener(R.domNode,t.EventType.CLICK,()=>{(0,i.toggleCollapseState)(g,Number.MAX_VALUE,[E]),R.isCollapsed=!L;const M=(L?this._editor.getTopForLineNumber(A):this._editor.getTopForLineNumber(I.getEndLineNumber(_)))-this._lineHeight*w+1;this._editor.setScrollTop(M)})),R}_updateMinContentWidth(){this._minContentWidthInPx=0;for(const n of this._stickyLines)n.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=n.lineDomNode.scrollWidth);this._minContentWidthInPx+=this._editor.getLayoutInfo().verticalScrollbarWidth}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(n){0<=n&&n<this._stickyLines.length&&this._stickyLines[n].lineDomNode.focus()}getEditorPositionFromNode(n){if(!n||n.children.length>0)return null;const g=this._getRenderedStickyLineFromChildDomNode(n);if(!g)return null;const w=(0,T.getColumnOfNodeOffset)(g.characterMapping,n,0);return new v.Position(g.lineNumber,w)}getLineNumberFromChildDomNode(n){return this._getRenderedStickyLineFromChildDomNode(n)?.lineNumber??null}_getRenderedStickyLineFromChildDomNode(n){const g=this.getStickyLineIndexFromChildDomNode(n);return g===null||g<0||g>=this._stickyLines.length?null:this._stickyLines[g]}getStickyLineIndexFromChildDomNode(n){for(;n&&n!==this._rootDomNode;){const g=n.getAttribute(u);if(g)return parseInt(g,10);n=n.parentElement}return null}}e.StickyScrollWidget=d;class p{constructor(n,g,w,E,C){this.lineNumber=n,this.lineDomNode=g,this.lineNumberDomNode=w,this.foldingIcon=E,this.characterMapping=C}}class c{constructor(n,g){this.isCollapsed=n,this.dimension=g,this.domNode=document.createElement("div"),this.domNode.style.width=`${g}px`,this.domNode.style.height=`${g}px`,this.domNode.className=D.ThemeIcon.asClassName(n?r.foldingCollapsedIcon:r.foldingExpandedIcon)}setVisible(n){this.domNode.style.cursor=n?"pointer":"default",this.domNode.style.opacity=n?"1":"0"}}}),define(Q[1227],Y([1,0,137,98,99,2439,36,19,1750]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSelectionHighlightDecorationOptions=e.getHighlightDecorationOptions=void 0;const v=(0,T.registerColor)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},D.localize(0,null),!0);(0,T.registerColor)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},D.localize(1,null),!0),(0,T.registerColor)("editor.wordHighlightTextBackground",{light:v,dark:v,hcDark:v,hcLight:v},D.localize(2,null),!0);const m=(0,T.registerColor)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:T.activeContrastBorder,hcLight:T.activeContrastBorder},D.localize(3,null));(0,T.registerColor)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:T.activeContrastBorder,hcLight:T.activeContrastBorder},D.localize(4,null)),(0,T.registerColor)("editor.wordHighlightTextBorder",{light:m,dark:m,hcDark:m,hcLight:m},D.localize(5,null));const S=(0,T.registerColor)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},D.localize(6,null),!0),h=(0,T.registerColor)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},D.localize(7,null),!0),a=(0,T.registerColor)("editorOverviewRuler.wordHighlightTextForeground",{dark:T.overviewRulerSelectionHighlightForeground,light:T.overviewRulerSelectionHighlightForeground,hcDark:T.overviewRulerSelectionHighlightForeground,hcLight:T.overviewRulerSelectionHighlightForeground},D.localize(8,null),!0),r=y.ModelDecorationOptions.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,f.themeColorFromId)(h),position:t.OverviewRulerLane.Center},minimap:{color:(0,f.themeColorFromId)(T.minimapSelectionOccurrenceHighlight),position:t.MinimapPosition.Inline}}),i=y.ModelDecorationOptions.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,f.themeColorFromId)(a),position:t.OverviewRulerLane.Center},minimap:{color:(0,f.themeColorFromId)(T.minimapSelectionOccurrenceHighlight),position:t.MinimapPosition.Inline}}),s=y.ModelDecorationOptions.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,f.themeColorFromId)(T.overviewRulerSelectionHighlightForeground),position:t.OverviewRulerLane.Center},minimap:{color:(0,f.themeColorFromId)(T.minimapSelectionOccurrenceHighlight),position:t.MinimapPosition.Inline}}),o=y.ModelDecorationOptions.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),u=y.ModelDecorationOptions.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,f.themeColorFromId)(S),position:t.OverviewRulerLane.Center},minimap:{color:(0,f.themeColorFromId)(T.minimapSelectionOccurrenceHighlight),position:t.MinimapPosition.Inline}});function d(c){return c===b.DocumentHighlightKind.Write?r:c===b.DocumentHighlightKind.Text?i:u}e.getHighlightDecorationOptions=d;function p(c){return c?o:s}e.getSelectionHighlightDecorationOptions=p,(0,f.registerThemingParticipant)((c,l)=>{const n=c.getColor(T.editorSelectionHighlight);n&&l.addRule(`.monaco-editor .selectionHighlight { background-color: ${n.transparent(.5)}; }`)})}),define(Q[599],Y([1,0,87,20,14,31,15,4,48,27,73,99,2440,8,74,1227,83]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.WordHighlighterContribution=e.getOccurrencesAtPosition=void 0;const d=new r.RawContextKey("hasWordHighlights",!1);function p(k,L,R,M){const N=k.ordered(L);return(0,b.first)(N.map(P=>()=>Promise.resolve(P.provideDocumentHighlights(L,R,M)).then(void 0,T.onUnexpectedExternalError)),y.isNonEmptyArray)}e.getOccurrencesAtPosition=p;class c{constructor(L,R,M){this._model=L,this._selection=R,this._wordSeparators=M,this._wordRange=this._getCurrentWordRange(L,R),this._result=null}get result(){return this._result||(this._result=(0,b.createCancelablePromise)(L=>this._compute(this._model,this._selection,this._wordSeparators,L))),this._result}_getCurrentWordRange(L,R){const M=L.getWordAtPosition(R.getPosition());return M?new m.Range(R.startLineNumber,M.startColumn,R.startLineNumber,M.endColumn):null}isValid(L,R,M){const N=R.startLineNumber,P=R.startColumn,x=R.endColumn,F=this._getCurrentWordRange(L,R);let V=!!(this._wordRange&&this._wordRange.equalsRange(F));for(let W=0,z=M.length;!V&&W<z;W++){const B=M.getRange(W);B&&B.startLineNumber===N&&B.startColumn<=P&&B.endColumn>=x&&(V=!0)}return V}cancel(){this.result.cancel()}}class l extends c{constructor(L,R,M,N){super(L,R,M),this._providers=N}_compute(L,R,M,N){return p(this._providers,L,R.getPosition(),N).then(P=>P||[])}}class n extends c{constructor(L,R,M){super(L,R,M),this._selectionIsEmpty=R.isEmpty()}_compute(L,R,M,N){return(0,b.timeout)(250,N).then(()=>{if(!R.isEmpty())return[];const P=L.getWordAtPosition(R.getPosition());return!P||P.word.length>1e3?[]:L.findMatches(P.word,!0,!1,!0,M,!1).map(F=>({range:F.range,kind:h.DocumentHighlightKind.Text}))})}isValid(L,R,M){const N=R.isEmpty();return this._selectionIsEmpty!==N?!1:super.isValid(L,R,M)}}function g(k,L,R,M){return k.has(L)?new l(L,R,M,k):new n(L,R,M)}(0,v.registerModelAndPositionCommand)("_executeDocumentHighlights",(k,L,R)=>{const M=k.get(i.ILanguageFeaturesService);return p(M.documentHighlightProvider,L,R,D.CancellationToken.None)});class w{constructor(L,R,M,N){this.toUnhook=new f.DisposableStore,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=L,this.providers=R,this.linkedHighlighters=M,this._hasWordHighlights=d.bindTo(N),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(79),this.model=this.editor.getModel(),this.toUnhook.add(L.onDidChangeCursorPosition(P=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(P)})),this.toUnhook.add(L.onDidChangeModelContent(P=>{this._stopAll()})),this.toUnhook.add(L.onDidChangeConfiguration(P=>{const x=this.editor.getOption(79);this.occurrencesHighlight!==x&&(this.occurrencesHighlight=x,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}stop(){this.occurrencesHighlight&&this._stopAll()}_getSortedHighlights(){return this.decorations.getRanges().sort(m.Range.compareRangesUsingStarts)}moveNext(){const L=this._getSortedHighlights(),M=(L.findIndex(P=>P.containsPosition(this.editor.getPosition()))+1)%L.length,N=L[M];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(N.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(N);const P=this._getWord();if(P){const x=this.editor.getModel().getLineContent(N.startLineNumber);(0,t.alert)(`${x}, ${M+1} of ${L.length} for '${P.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const L=this._getSortedHighlights(),M=(L.findIndex(P=>P.containsPosition(this.editor.getPosition()))-1+L.length)%L.length,N=L[M];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(N.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(N);const P=this._getWord();if(P){const x=this.editor.getModel().getLineContent(N.startLineNumber);(0,t.alert)(`${x}, ${M+1} of ${L.length} for '${P.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(L){if(!this.occurrencesHighlight){this._stopAll();return}if(L.reason!==3){this._stopAll();return}this._run()}_getWord(){const L=this.editor.getSelection(),R=L.startLineNumber,M=L.startColumn;return this.model.getWordAtPosition({lineNumber:R,column:M})}_run(){const L=this.editor.getSelection();if(L.startLineNumber!==L.endLineNumber){this._stopAll();return}const R=L.startColumn,M=L.endColumn,N=this._getWord();if(!N||N.startColumn>R||N.endColumn<M){this._stopAll();return}const P=this.workerRequest&&this.workerRequest.isValid(this.model,L,this.decorations);if(this.lastCursorPositionChangeTime=new Date().getTime(),P)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();const x=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=g(this.providers,this.model,this.editor.getSelection(),this.editor.getOption(128)),this.workerRequest.result.then(F=>{x===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=F||[],this._beginRenderDecorations())},T.onUnexpectedError)}}_beginRenderDecorations(){const L=new Date().getTime(),R=this.lastCursorPositionChangeTime+250;L>=R?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},R-L)}renderDecorations(){this.renderDecorationsTimer=-1;const L=[];for(const R of this.workerRequestValue)R.range&&L.push({range:R.range,options:(0,s.getHighlightDecorationOptions)(R.kind)});this.decorations.set(L),this._hasWordHighlights.set(this.hasDecorations());for(const R of this.linkedHighlighters())R?.editor.getModel()===this.editor.getModel()&&(R._stopAll(),R.decorations.set(L),R._hasWordHighlights.set(R.hasDecorations()))}dispose(){this._stopAll(),this.toUnhook.dispose()}}let E=class extends f.Disposable{static{u=this}static{this.ID="editor.contrib.wordHighlighter"}static get(L){return L.getContribution(u.ID)}constructor(L,R,M){super(),this.wordHighlighter=null,this.linkedContributions=new Set;const N=()=>{L.hasModel()&&(this.wordHighlighter=new w(L,M.documentHighlightProvider,()=>o.Iterable.map(this.linkedContributions,P=>P.wordHighlighter),R))};this._register(L.onDidChangeModel(P=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),N()})),N()}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter?.moveNext()}moveBack(){this.wordHighlighter?.moveBack()}restoreViewState(L){this.wordHighlighter&&L&&this.wordHighlighter.restore()}stopHighlighting(){this.wordHighlighter?.stop()}linkWordHighlighters(L){const R=u.get(L);return R?(this.linkedContributions.add(R),R.linkedContributions.add(this),(0,f.toDisposable)(()=>{this.linkedContributions.delete(R),R.linkedContributions.delete(this)})):f.Disposable.None}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};e.WordHighlighterContribution=E,e.WordHighlighterContribution=E=u=fe([O(1,r.IContextKeyService),O(2,i.ILanguageFeaturesService)],E);class C extends v.EditorAction{constructor(L,R){super(R),this._isNext=L}run(L,R){const M=E.get(R);M&&(this._isNext?M.moveNext():M.moveBack())}}class I extends C{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:a.localize(0,null),alias:"Go to Next Symbol Highlight",precondition:d,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:65,weight:100}})}}class _ extends C{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:a.localize(1,null),alias:"Go to Previous Symbol Highlight",precondition:d,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:1089,weight:100}})}}class A extends v.EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:a.localize(2,null),alias:"Trigger Symbol Highlight",precondition:d.toNegated(),kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:0,weight:100}})}run(L,R,M){const N=E.get(R);N&&N.restoreViewState(!0)}}(0,v.registerEditorContribution)(E.ID,E,0),(0,v.registerEditorAction)(I),(0,v.registerEditorAction)(_),(0,v.registerEditorAction)(A)}),define(Q[712],Y([1,0,7,229,80,320,4,42,27,98,1751]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZoneWidget=e.OverlayWidgetDelegate=void 0;const S=new b.Color(new b.RGBA(0,122,204)),h={showArrow:!0,showFrame:!0,className:"",frameColor:S,arrowColor:S,keepEditorSelection:!1},a="vs.editor.contrib.zoneWidget";class r{constructor(d,p,c,l,n,g,w,E){this.id="",this.domNode=d,this.afterLineNumber=p,this.afterColumn=c,this.heightInLines=l,this.showInHiddenAreas=w,this.ordinal=E,this._onDomNodeTop=n,this._onComputedHeight=g}onDomNodeTop(d){this._onDomNodeTop(d)}onComputedHeight(d){this._onComputedHeight(d)}}class i{constructor(d,p){this._id=d,this._domNode=p}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}e.OverlayWidgetDelegate=i;class s{static{this._IdGenerator=new D.IdGenerator(".arrow-decoration-")}constructor(d){this._editor=d,this._ruleName=s._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),t.removeCSSRulesContainingSelector(this._ruleName)}set color(d){this._color!==d&&(this._color=d,this._updateStyle())}set height(d){this._height!==d&&(this._height=d,this._updateStyle())}_updateStyle(){t.removeCSSRulesContainingSelector(this._ruleName),t.createCSSRule(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(d){d.column===1&&(d={lineNumber:d.lineNumber,column:2}),this._decorations.set([{range:v.Range.fromPositions(d),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}class o{constructor(d,p={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new T.DisposableStore,this.container=null,this._isShowing=!1,this.editor=d,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=f.deepClone(p),f.mixin(this.options,h,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(c=>{const l=this._getWidth(c);this.domNode.style.width=l+"px",this.domNode.style.left=this._getLeft(c)+"px",this._onWidth(l)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(d=>{this._viewZone&&d.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new s(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(d){d.frameColor&&(this.options.frameColor=d.frameColor),d.arrowColor&&(this.options.arrowColor=d.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const d=this.options.frameColor.toString();this.container.style.borderTopColor=d,this.container.style.borderBottomColor=d}if(this._arrow&&this.options.arrowColor){const d=this.options.arrowColor.toString();this._arrow.color=d}}_getWidth(d){return d.width-d.minimap.minimapWidth-d.verticalScrollbarWidth}_getLeft(d){return d.minimap.minimapWidth>0&&d.minimap.minimapLeft===0?d.minimap.minimapWidth:0}_onViewZoneTop(d){this.domNode.style.top=d+"px"}_onViewZoneHeight(d){if(this.domNode.style.height=`${d}px`,this.container){const p=d-this._decoratingElementsHeight();this.container.style.height=`${p}px`;const c=this.editor.getLayoutInfo();this._doLayout(p,this._getWidth(c))}this._resizeSash?.layout()}get position(){const d=this._positionMarkerId.getRange(0);if(d)return d.getStartPosition()}hasFocus(){return this.domNode.contains(t.getActiveElement())}show(d,p){const c=v.Range.isIRange(d)?v.Range.lift(d):v.Range.fromPositions(d);this._isShowing=!0,this._showImpl(c,p),this._isShowing=!1,this._positionMarkerId.set([{range:c,options:m.ModelDecorationOptions.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(d=>{this._viewZone&&d.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow?.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const d=this.editor.getOption(65);let p=0;if(this.options.showArrow){const c=Math.round(d/3);p+=2*c}if(this.options.showFrame){const c=Math.round(d/9);p+=2*c}return p}_showImpl(d,p){const c=d.getStartPosition(),l=this.editor.getLayoutInfo(),n=this._getWidth(l);this.domNode.style.width=`${n}px`,this.domNode.style.left=this._getLeft(l)+"px";const g=document.createElement("div");g.style.overflow="hidden";const w=this.editor.getOption(65);if(!this.options.allowUnlimitedHeight){const A=Math.max(12,this.editor.getLayoutInfo().height/w*.8);p=Math.min(p,A)}let E=0,C=0;if(this._arrow&&this.options.showArrow&&(E=Math.round(w/3),this._arrow.height=E,this._arrow.show(c)),this.options.showFrame&&(C=Math.round(w/9)),this.editor.changeViewZones(A=>{this._viewZone&&A.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new r(g,c.lineNumber,c.column,p,k=>this._onViewZoneTop(k),k=>this._onViewZoneHeight(k),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=A.addZone(this._viewZone),this._overlayWidget=new i(a+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const A=this.options.frameWidth?this.options.frameWidth:C;this.container.style.borderTopWidth=A+"px",this.container.style.borderBottomWidth=A+"px"}const I=p*w-this._decoratingElementsHeight();this.container&&(this.container.style.top=E+"px",this.container.style.height=I+"px",this.container.style.overflow="hidden"),this._doLayout(I,n),this.options.keepEditorSelection||this.editor.setSelection(d);const _=this.editor.getModel();if(_){const A=_.validateRange(new v.Range(d.startLineNumber,1,d.endLineNumber+1,1));this.revealRange(A,A.startLineNumber===_.getLineCount())}}revealRange(d,p){p?this.editor.revealLineNearTop(d.endLineNumber,0):this.editor.revealRange(d,0)}setCssClass(d,p){this.container&&(p&&this.container.classList.remove(p),this.container.classList.add(d))}_onWidth(d){}_doLayout(d,p){}_relayout(d){this._viewZone&&this._viewZone.heightInLines!==d&&this.editor.changeViewZones(p=>{this._viewZone&&(this._viewZone.heightInLines=d,p.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new y.Sash(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let d;this._disposables.add(this._resizeSash.onDidStart(p=>{this._viewZone&&(d={startY:p.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{d=void 0})),this._disposables.add(this._resizeSash.onDidChange(p=>{if(d){const c=(p.currentY-d.startY)/this.editor.getOption(65),l=c<0?Math.ceil(c):Math.floor(c),n=d.heightInLines+l;n>5&&n<35&&this._relayout(n)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const d=this.editor.getLayoutInfo();return d.width-d.minimap.minimapWidth}}e.ZoneWidget=o}),define(Q[3412],Y([1,0,15,4,22,63,2490,49,35,23,189]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoService=void 0;const h=!1;function a(w){return w.scheme===b.Schemas.file?w.fsPath:w.path}let r=0;class i{constructor(E,C,I,_,A,k,L){this.id=++r,this.type=0,this.actual=E,this.label=E.label,this.confirmBeforeUndo=E.confirmBeforeUndo||!1,this.resourceLabel=C,this.strResource=I,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=_,this.groupOrder=A,this.sourceId=k,this.sourceOrder=L,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 s;(function(w){w[w.ExternalRemoval=0]="ExternalRemoval",w[w.NoParallelUniverses=1]="NoParallelUniverses"})(s||(s={}));class o{constructor(E,C){this.resourceLabel=E,this.reason=C}}class u{constructor(){this.elements=new Map}createMessage(){const E=[],C=[];for(const[,_]of this.elements)(_.reason===0?E:C).push(_.resourceLabel);const I=[];return E.length>0&&I.push(T.localize(0,null,E.join(", "))),C.length>0&&I.push(T.localize(1,null,C.join(", "))),I.join(` `)}get size(){return this.elements.size}has(E){return this.elements.has(E)}set(E,C){this.elements.set(E,C)}delete(E){return this.elements.delete(E)}}class d{constructor(E,C,I,_,A,k,L){this.id=++r,this.type=1,this.actual=E,this.label=E.label,this.confirmBeforeUndo=E.confirmBeforeUndo||!1,this.resourceLabels=C,this.strResources=I,this.groupId=_,this.groupOrder=A,this.sourceId=k,this.sourceOrder=L,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(E,C,I){this.removedResources||(this.removedResources=new u),this.removedResources.has(C)||this.removedResources.set(C,new o(E,I))}setValid(E,C,I){I?this.invalidatedResources&&(this.invalidatedResources.delete(C),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new u),this.invalidatedResources.has(C)||this.invalidatedResources.set(C,new o(E,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class p{constructor(E,C){this.resourceLabel=E,this.strResource=C,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const E of this._past)E.type===1&&E.removeResource(this.resourceLabel,this.strResource,0);for(const E of this._future)E.type===1&&E.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const E=[];E.push(`* ${this.strResource}:`);for(let C=0;C<this._past.length;C++)E.push(` * [UNDO] ${this._past[C]}`);for(let C=this._future.length-1;C>=0;C--)E.push(` * [REDO] ${this._future[C]}`);return E.join(` `)}flushAllElements(){this._past=[],this._future=[],this.versionId++}setElementsIsValid(E){for(const C of this._past)C.type===1?C.setValid(this.resourceLabel,this.strResource,E):C.setValid(E);for(const C of this._future)C.type===1?C.setValid(this.resourceLabel,this.strResource,E):C.setValid(E)}_setElementValidFlag(E,C){E.type===1?E.setValid(this.resourceLabel,this.strResource,C):E.setValid(C)}setElementsValidFlag(E,C){for(const I of this._past)C(I.actual)&&this._setElementValidFlag(I,E);for(const I of this._future)C(I.actual)&&this._setElementValidFlag(I,E)}pushElement(E){for(const C of this._future)C.type===1&&C.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(E),this.versionId++}createSnapshot(E){const C=[];for(let I=0,_=this._past.length;I<_;I++)C.push(this._past[I].id);for(let I=this._future.length-1;I>=0;I--)C.push(this._future[I].id);return new S.ResourceEditStackSnapshot(E,C)}restoreSnapshot(E){const C=E.elements.length;let I=!0,_=0,A=-1;for(let L=0,R=this._past.length;L<R;L++,_++){const M=this._past[L];I&&(_>=C||M.id!==E.elements[_])&&(I=!1,A=0),!I&&M.type===1&&M.removeResource(this.resourceLabel,this.strResource,0)}let k=-1;for(let L=this._future.length-1;L>=0;L--,_++){const R=this._future[L];I&&(_>=C||R.id!==E.elements[_])&&(I=!1,k=L),!I&&R.type===1&&R.removeResource(this.resourceLabel,this.strResource,0)}A!==-1&&(this._past=this._past.slice(0,A)),k!==-1&&(this._future=this._future.slice(k+1)),this.versionId++}getElements(){const E=[],C=[];for(const I of this._past)E.push(I.actual);for(const I of this._future)C.push(I.actual);return{past:E,future:C}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(E,C){for(let I=this._past.length-1;I>=0;I--)if(this._past[I]===E){C.has(this.strResource)?this._past[I]=C.get(this.strResource):this._past.splice(I,1);break}this.versionId++}splitFutureWorkspaceElement(E,C){for(let I=this._future.length-1;I>=0;I--)if(this._future[I]===E){C.has(this.strResource)?this._future[I]=C.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 C=0,I=this.editStacks.length;C<I;C++)this._versionIds[C]=this.editStacks[C].versionId}isValid(){for(let E=0,C=this.editStacks.length;E<C;E++)if(this._versionIds[E]!==this.editStacks[E].versionId)return!1;return!0}}const l=new p("","");l.locked=!0;let n=class{constructor(E,C){this._dialogService=E,this._notificationService=C,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}registerUriComparisonKeyComputer(E,C){return this._uriComparisonKeyComputers.push([E,C]),{dispose:()=>{for(let I=0,_=this._uriComparisonKeyComputers.length;I<_;I++)if(this._uriComparisonKeyComputers[I][1]===C){this._uriComparisonKeyComputers.splice(I,1);return}}}}getUriComparisonKey(E){for(const C of this._uriComparisonKeyComputers)if(C[0]===E.scheme)return C[1].getComparisonKey(E);return E.toString()}_print(E){console.log("------------------------------------"),console.log(`AFTER ${E}: `);const C=[];for(const I of this._editStacks)C.push(I[1].toString());console.log(C.join(` `))}pushElement(E,C=S.UndoRedoGroup.None,I=S.UndoRedoSource.None){if(E.type===0){const _=a(E.resource),A=this.getUriComparisonKey(E.resource);this._pushElement(new i(E,_,A,C.id,C.nextOrder(),I.id,I.nextOrder()))}else{const _=new Set,A=[],k=[];for(const L of E.resources){const R=a(L),M=this.getUriComparisonKey(L);_.has(M)||(_.add(M),A.push(R),k.push(M))}A.length===1?this._pushElement(new i(E,A[0],k[0],C.id,C.nextOrder(),I.id,I.nextOrder())):this._pushElement(new d(E,A,k,C.id,C.nextOrder(),I.id,I.nextOrder()))}h&&this._print("pushElement")}_pushElement(E){for(let C=0,I=E.strResources.length;C<I;C++){const _=E.resourceLabels[C],A=E.strResources[C];let k;this._editStacks.has(A)?k=this._editStacks.get(A):(k=new p(_,A),this._editStacks.set(A,k)),k.pushElement(E)}}getLastElement(E){const C=this.getUriComparisonKey(E);if(this._editStacks.has(C)){const I=this._editStacks.get(C);if(I.hasFutureElements())return null;const _=I.getClosestPastElement();return _?_.actual:null}return null}_splitPastWorkspaceElement(E,C){const I=E.actual.split(),_=new Map;for(const A of I){const k=a(A.resource),L=this.getUriComparisonKey(A.resource),R=new i(A,k,L,0,0,0,0);_.set(R.strResource,R)}for(const A of E.strResources){if(C&&C.has(A))continue;this._editStacks.get(A).splitPastWorkspaceElement(E,_)}}_splitFutureWorkspaceElement(E,C){const I=E.actual.split(),_=new Map;for(const A of I){const k=a(A.resource),L=this.getUriComparisonKey(A.resource),R=new i(A,k,L,0,0,0,0);_.set(R.strResource,R)}for(const A of E.strResources){if(C&&C.has(A))continue;this._editStacks.get(A).splitFutureWorkspaceElement(E,_)}}removeElements(E){const C=typeof E=="string"?E:this.getUriComparisonKey(E);this._editStacks.has(C)&&(this._editStacks.get(C).dispose(),this._editStacks.delete(C)),h&&this._print("removeElements")}setElementsValidFlag(E,C,I){const _=this.getUriComparisonKey(E);this._editStacks.has(_)&&this._editStacks.get(_).setElementsValidFlag(C,I),h&&this._print("setElementsValidFlag")}hasElements(E){const C=this.getUriComparisonKey(E);if(this._editStacks.has(C)){const I=this._editStacks.get(C);return I.hasPastElements()||I.hasFutureElements()}return!1}createSnapshot(E){const C=this.getUriComparisonKey(E);return this._editStacks.has(C)?this._editStacks.get(C).createSnapshot(E):new S.ResourceEditStackSnapshot(E,[])}restoreSnapshot(E){const C=this.getUriComparisonKey(E.resource);if(this._editStacks.has(C)){const I=this._editStacks.get(C);I.restoreSnapshot(E),!I.hasPastElements()&&!I.hasFutureElements()&&(I.dispose(),this._editStacks.delete(C))}h&&this._print("restoreSnapshot")}getElements(E){const C=this.getUriComparisonKey(E);return this._editStacks.has(C)?this._editStacks.get(C).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(E){if(!E)return[null,null];let C=null,I=null;for(const[_,A]of this._editStacks){const k=A.getClosestPastElement();k&&k.sourceId===E&&(!C||k.sourceOrder>C.sourceOrder)&&(C=k,I=_)}return[C,I]}canUndo(E){if(E instanceof S.UndoRedoSource){const[,I]=this._findClosestUndoElementWithSource(E.id);return!!I}const C=this.getUriComparisonKey(E);return this._editStacks.has(C)?this._editStacks.get(C).hasPastElements():!1}_onError(E,C){(0,t.onUnexpectedError)(E);for(const I of C.strResources)this.removeElements(I);this._notificationService.error(E)}_acquireLocks(E){for(const C of E.editStacks)if(C.locked)throw new Error("Cannot acquire edit stack lock");for(const C of E.editStacks)C.locked=!0;return()=>{for(const C of E.editStacks)C.locked=!1}}_safeInvokeWithLocks(E,C,I,_,A){const k=this._acquireLocks(I);let L;try{L=C()}catch(R){return k(),_.dispose(),this._onError(R,E)}return L?L.then(()=>(k(),_.dispose(),A()),R=>(k(),_.dispose(),this._onError(R,E))):(k(),_.dispose(),A())}async _invokeWorkspacePrepare(E){if(typeof E.actual.prepareUndoRedo>"u")return y.Disposable.None;const C=E.actual.prepareUndoRedo();return typeof C>"u"?y.Disposable.None:C}_invokeResourcePrepare(E,C){if(E.actual.type!==1||typeof E.actual.prepareUndoRedo>"u")return C(y.Disposable.None);const I=E.actual.prepareUndoRedo();return I?(0,y.isDisposable)(I)?C(I):I.then(_=>C(_)):C(y.Disposable.None)}_getAffectedEditStacks(E){const C=[];for(const I of E.strResources)C.push(this._editStacks.get(I)||l);return new c(C)}_tryToSplitAndUndo(E,C,I,_){if(C.canSplit())return this._splitPastWorkspaceElement(C,I),this._notificationService.warn(_),new g(this._undo(E,0,!0));for(const A of C.strResources)this.removeElements(A);return this._notificationService.warn(_),new g}_checkWorkspaceUndo(E,C,I,_){if(C.removedResources)return this._tryToSplitAndUndo(E,C,C.removedResources,T.localize(2,null,C.label,C.removedResources.createMessage()));if(_&&C.invalidatedResources)return this._tryToSplitAndUndo(E,C,C.invalidatedResources,T.localize(3,null,C.label,C.invalidatedResources.createMessage()));const A=[];for(const L of I.editStacks)L.getClosestPastElement()!==C&&A.push(L.resourceLabel);if(A.length>0)return this._tryToSplitAndUndo(E,C,null,T.localize(4,null,C.label,A.join(", ")));const k=[];for(const L of I.editStacks)L.locked&&k.push(L.resourceLabel);return k.length>0?this._tryToSplitAndUndo(E,C,null,T.localize(5,null,C.label,k.join(", "))):I.isValid()?null:this._tryToSplitAndUndo(E,C,null,T.localize(6,null,C.label))}_workspaceUndo(E,C,I){const _=this._getAffectedEditStacks(C),A=this._checkWorkspaceUndo(E,C,_,!1);return A?A.returnValue:this._confirmAndExecuteWorkspaceUndo(E,C,_,I)}_isPartOfUndoGroup(E){if(!E.groupId)return!1;for(const[,C]of this._editStacks){const I=C.getClosestPastElement();if(I){if(I===E){const _=C.getSecondClosestPastElement();if(_&&_.groupId===E.groupId)return!0}if(I.groupId===E.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(E,C,I,_){if(C.canSplit()&&!this._isPartOfUndoGroup(C)){let L;(function(N){N[N.All=0]="All",N[N.This=1]="This",N[N.Cancel=2]="Cancel"})(L||(L={}));const{result:R}=await this._dialogService.prompt({type:D.default.Info,message:T.localize(7,null,C.label),buttons:[{label:T.localize(8,null,I.editStacks.length),run:()=>L.All},{label:T.localize(9,null),run:()=>L.This}],cancelButton:{run:()=>L.Cancel}});if(R===L.Cancel)return;if(R===L.This)return this._splitPastWorkspaceElement(C,null),this._undo(E,0,!0);const M=this._checkWorkspaceUndo(E,C,I,!1);if(M)return M.returnValue;_=!0}let A;try{A=await this._invokeWorkspacePrepare(C)}catch(L){return this._onError(L,C)}const k=this._checkWorkspaceUndo(E,C,I,!0);if(k)return A.dispose(),k.returnValue;for(const L of I.editStacks)L.moveBackward(C);return this._safeInvokeWithLocks(C,()=>C.actual.undo(),I,A,()=>this._continueUndoInGroup(C.groupId,_))}_resourceUndo(E,C,I){if(!C.isValid){E.flushAllElements();return}if(E.locked){const _=T.localize(10,null,C.label);this._notificationService.warn(_);return}return this._invokeResourcePrepare(C,_=>(E.moveBackward(C),this._safeInvokeWithLocks(C,()=>C.actual.undo(),new c([E]),_,()=>this._continueUndoInGroup(C.groupId,I))))}_findClosestUndoElementInGroup(E){if(!E)return[null,null];let C=null,I=null;for(const[_,A]of this._editStacks){const k=A.getClosestPastElement();k&&k.groupId===E&&(!C||k.groupOrder>C.groupOrder)&&(C=k,I=_)}return[C,I]}_continueUndoInGroup(E,C){if(!E)return;const[,I]=this._findClosestUndoElementInGroup(E);if(I)return this._undo(I,0,C)}undo(E){if(E instanceof S.UndoRedoSource){const[,C]=this._findClosestUndoElementWithSource(E.id);return C?this._undo(C,E.id,!1):void 0}return typeof E=="string"?this._undo(E,0,!1):this._undo(this.getUriComparisonKey(E),0,!1)}_undo(E,C=0,I){if(!this._editStacks.has(E))return;const _=this._editStacks.get(E),A=_.getClosestPastElement();if(!A)return;if(A.groupId){const[L,R]=this._findClosestUndoElementInGroup(A.groupId);if(A!==L&&R)return this._undo(R,C,I)}if((A.sourceId!==C||A.confirmBeforeUndo)&&!I)return this._confirmAndContinueUndo(E,C,A);try{return A.type===1?this._workspaceUndo(E,A,I):this._resourceUndo(_,A,I)}finally{h&&this._print("undo")}}async _confirmAndContinueUndo(E,C,I){if((await this._dialogService.confirm({message:T.localize(11,null,I.label),primaryButton:T.localize(12,null),cancelButton:T.localize(13,null)})).confirmed)return this._undo(E,C,!0)}_findClosestRedoElementWithSource(E){if(!E)return[null,null];let C=null,I=null;for(const[_,A]of this._editStacks){const k=A.getClosestFutureElement();k&&k.sourceId===E&&(!C||k.sourceOrder<C.sourceOrder)&&(C=k,I=_)}return[C,I]}canRedo(E){if(E instanceof S.UndoRedoSource){const[,I]=this._findClosestRedoElementWithSource(E.id);return!!I}const C=this.getUriComparisonKey(E);return this._editStacks.has(C)?this._editStacks.get(C).hasFutureElements():!1}_tryToSplitAndRedo(E,C,I,_){if(C.canSplit())return this._splitFutureWorkspaceElement(C,I),this._notificationService.warn(_),new g(this._redo(E));for(const A of C.strResources)this.removeElements(A);return this._notificationService.warn(_),new g}_checkWorkspaceRedo(E,C,I,_){if(C.removedResources)return this._tryToSplitAndRedo(E,C,C.removedResources,T.localize(14,null,C.label,C.removedResources.createMessage()));if(_&&C.invalidatedResources)return this._tryToSplitAndRedo(E,C,C.invalidatedResources,T.localize(15,null,C.label,C.invalidatedResources.createMessage()));const A=[];for(const L of I.editStacks)L.getClosestFutureElement()!==C&&A.push(L.resourceLabel);if(A.length>0)return this._tryToSplitAndRedo(E,C,null,T.localize(16,null,C.label,A.join(", ")));const k=[];for(const L of I.editStacks)L.locked&&k.push(L.resourceLabel);return k.length>0?this._tryToSplitAndRedo(E,C,null,T.localize(17,null,C.label,k.join(", "))):I.isValid()?null:this._tryToSplitAndRedo(E,C,null,T.localize(18,null,C.label))}_workspaceRedo(E,C){const I=this._getAffectedEditStacks(C),_=this._checkWorkspaceRedo(E,C,I,!1);return _?_.returnValue:this._executeWorkspaceRedo(E,C,I)}async _executeWorkspaceRedo(E,C,I){let _;try{_=await this._invokeWorkspacePrepare(C)}catch(k){return this._onError(k,C)}const A=this._checkWorkspaceRedo(E,C,I,!0);if(A)return _.dispose(),A.returnValue;for(const k of I.editStacks)k.moveForward(C);return this._safeInvokeWithLocks(C,()=>C.actual.redo(),I,_,()=>this._continueRedoInGroup(C.groupId))}_resourceRedo(E,C){if(!C.isValid){E.flushAllElements();return}if(E.locked){const I=T.localize(19,null,C.label);this._notificationService.warn(I);return}return this._invokeResourcePrepare(C,I=>(E.moveForward(C),this._safeInvokeWithLocks(C,()=>C.actual.redo(),new c([E]),I,()=>this._continueRedoInGroup(C.groupId))))}_findClosestRedoElementInGroup(E){if(!E)return[null,null];let C=null,I=null;for(const[_,A]of this._editStacks){const k=A.getClosestFutureElement();k&&k.groupId===E&&(!C||k.groupOrder<C.groupOrder)&&(C=k,I=_)}return[C,I]}_continueRedoInGroup(E){if(!E)return;const[,C]=this._findClosestRedoElementInGroup(E);if(C)return this._redo(C)}redo(E){if(E instanceof S.UndoRedoSource){const[,C]=this._findClosestRedoElementWithSource(E.id);return C?this._redo(C):void 0}return typeof E=="string"?this._redo(E):this._redo(this.getUriComparisonKey(E))}_redo(E){if(!this._editStacks.has(E))return;const C=this._editStacks.get(E),I=C.getClosestFutureElement();if(I){if(I.groupId){const[_,A]=this._findClosestRedoElementInGroup(I.groupId);if(I!==_&&A)return this._redo(A)}try{return I.type===1?this._workspaceRedo(E,I):this._resourceRedo(C,I)}finally{h&&this._print("redo")}}}};e.UndoRedoService=n,e.UndoRedoService=n=fe([O(0,f.IDialogService),O(1,m.INotificationService)],n);class g{constructor(E){this.returnValue=E}}(0,v.registerSingleton)(S.IUndoRedoService,n,1)}),define(Q[353],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IUpdateService=e.State=e.DisablementReason=e.UpdateType=e.StateType=void 0;var y;(function(T){T.Uninitialized="uninitialized",T.Idle="idle",T.Disabled="disabled",T.CheckingForUpdates="checking for updates",T.AvailableForDownload="available for download",T.Downloading="downloading",T.Downloaded="downloaded",T.Updating="updating",T.Ready="ready"})(y||(e.StateType=y={}));var b;(function(T){T[T.Setup=0]="Setup",T[T.Archive=1]="Archive",T[T.Snap=2]="Snap"})(b||(e.UpdateType=b={}));var D;(function(T){T[T.NotBuilt=0]="NotBuilt",T[T.DisabledByEnvironment=1]="DisabledByEnvironment",T[T.ManuallyDisabled=2]="ManuallyDisabled",T[T.MissingConfiguration=3]="MissingConfiguration",T[T.InvalidConfiguration=4]="InvalidConfiguration",T[T.RunningAsAdmin=5]="RunningAsAdmin"})(D||(e.DisablementReason=D={})),e.State={Uninitialized:{type:"uninitialized"},Disabled:T=>({type:"disabled",reason:T}),Idle:(T,f)=>({type:"idle",updateType:T,error:f}),CheckingForUpdates:T=>({type:"checking for updates",explicit:T}),AvailableForDownload:T=>({type:"available for download",update:T}),Downloading:T=>({type:"downloading",update:T}),Downloaded:T=>({type:"downloaded",update:T}),Updating:T=>({type:"updating",update:T}),Ready:T=>({type:"ready",update:T})},e.IUpdateService=(0,t.createDecorator)("updateService")}),define(Q[3413],Y([1,0,18,2491,56,16,228]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),D.Registry.as(b.Extensions.Configuration).registerConfiguration({id:"update",order:15,title:(0,y.localize)(0,null),type:"object",properties:{"update.mode":{type:"string",enum:["none","manual","start","default"],default:"default",scope:1,description:(0,y.localize)(1,null),tags:["usesOnlineServices"],enumDescriptions:[(0,y.localize)(2,null),(0,y.localize)(3,null),(0,y.localize)(4,null),T.updateConfigContributionDefault],policy:{name:"UpdateMode",minimumVersion:"1.67"}},"update.channel":{type:"string",default:"default",scope:1,description:(0,y.localize)(5,null),deprecationMessage:(0,y.localize)(6,null,"update.mode")},"update.enableWindowsBackgroundUpdates":{type:"boolean",default:!0,scope:1,title:(0,y.localize)(7,null),description:T.updateConfigContributionEnableWindowsBackgroundUpdates,included:t.isWindows&&!t.isWeb},"update.showReleaseNotes":{type:"boolean",default:!0,scope:1,description:T.updateConfigContributionShowReleaseNotes,tags:["usesOnlineServices"]}}})}),define(Q[3414],Y([1,0,6,353]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UpdateChannelClient=e.UpdateChannel=void 0;class b{constructor(f){this.service=f}listen(f,v){switch(v){case"onStateChange":return this.service.onStateChange}throw new Error(`Event not found: ${v}`)}call(f,v,m){switch(v){case"checkForUpdates":return this.service.checkForUpdates(m);case"downloadUpdate":return this.service.downloadUpdate();case"applyUpdate":return this.service.applyUpdate();case"quitAndInstall":return this.service.quitAndInstall();case"_getInitialState":return Promise.resolve(this.service.state);case"isLatestVersion":return this.service.isLatestVersion();case"_applySpecificUpdate":return this.service._applySpecificUpdate(m)}throw new Error(`Call not found: ${v}`)}}e.UpdateChannel=b;class D{get state(){return this._state}set state(f){this._state=f,this._onStateChange.fire(f)}constructor(f){this.channel=f,this._onStateChange=new t.Emitter,this.onStateChange=this._onStateChange.event,this._state=y.State.Uninitialized,this.channel.listen("onStateChange")(v=>this.state=v),this.channel.call("_getInitialState").then(v=>this.state=v)}checkForUpdates(f){return this.channel.call("checkForUpdates",f)}downloadUpdate(){return this.channel.call("downloadUpdate")}applyUpdate(){return this.channel.call("applyUpdate")}quitAndInstall(){return this.channel.call("quitAndInstall")}isLatestVersion(){return this.channel.call("isLatestVersion")}_applySpecificUpdate(f){return this.channel.call("_applySpecificUpdate",f)}}e.UpdateChannelClient=D}),define(Q[64],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IUriIdentityService=void 0,e.IUriIdentityService=(0,t.createDecorator)("IUriIdentityService")}),define(Q[3415],Y([1,0,64,35,25,26,1530,6,4]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UriIdentityService=void 0;class m{static{this._clock=0}constructor(a){this.uri=a,this.time=m._clock++}touch(){return this.time=m._clock++,this}}let S=class{constructor(a){this._fileService=a,this._dispooables=new v.DisposableStore,this._limit=2**16;const r=new Map,i=s=>{let o=r.get(s.scheme);return o===void 0&&(o=a.hasProvider(s)&&!this._fileService.hasCapability(s,1024),r.set(s.scheme,o)),o};this._dispooables.add(f.Event.any(a.onDidChangeFileSystemProviderRegistrations,a.onDidChangeFileSystemProviderCapabilities)(s=>{r.delete(s.scheme)})),this.extUri=new D.ExtUri(i),this._canonicalUris=new T.SkipList((s,o)=>this.extUri.compare(s,o,!0),this._limit)}dispose(){this._dispooables.dispose(),this._canonicalUris.clear()}asCanonicalUri(a){this._fileService.hasProvider(a)&&(a=(0,D.normalizePath)(a));const r=this._canonicalUris.get(a);return r?r.touch().uri.with({fragment:a.fragment}):(this._canonicalUris.set(a,new m(a)),this._checkTrim(),a)}_checkTrim(){if(this._canonicalUris.size<this._limit)return;const a=[...this._canonicalUris.entries()].sort((i,s)=>i[1].time<s[1].time?1:i[1].time>s[1].time?-1:0);m._clock=0,this._canonicalUris.clear();const r=this._limit*.5;for(let i=0;i<r;i++)this._canonicalUris.set(a[i][0],a[i][1].touch())}};e.UriIdentityService=S,e.UriIdentityService=S=fe([O(0,b.IFileService)],S),(0,y.registerSingleton)(t.IUriIdentityService,S,1)}),define(Q[459],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IURLService=void 0,e.IURLService=(0,t.createDecorator)("urlService")}),define(Q[3416],Y([1,0,10]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URLHandlerRouter=e.URLHandlerChannelClient=e.URLHandlerChannel=void 0;class y{constructor(f){this.handler=f}listen(f,v){throw new Error(`Event not found: ${v}`)}call(f,v,m){switch(v){case"handleURL":return this.handler.handleURL(t.URI.revive(m[0]),m[1])}throw new Error(`Call not found: ${v}`)}}e.URLHandlerChannel=y;class b{constructor(f){this.channel=f}handleURL(f,v){return this.channel.call("handleURL",[f.toJSON(),v])}}e.URLHandlerChannelClient=b;class D{constructor(f,v){this.next=f,this.logService=v}async routeCall(f,v,m,S){if(v!=="handleURL")throw new Error(`Call not found: ${v}`);if(Array.isArray(m)&&m.length>0){const h=t.URI.revive(m[0]);if(this.logService.trace("URLHandlerRouter#routeCall() with URI argument",h.toString(!0)),h.query){const a=/\bwindowId=(\d+)/.exec(h.query);if(a){const r=a[1];this.logService.trace(`URLHandlerRouter#routeCall(): found windowId query parameter with value "${r}"`,h.toString(!0));const i=new RegExp(`window:${r}`),s=f.connections.find(o=>(this.logService.trace("URLHandlerRouter#routeCall(): testing connection",o.ctx),i.test(o.ctx)));if(s)return this.logService.trace("URLHandlerRouter#routeCall(): found a connection to route",h.toString(!0)),s;this.logService.trace("URLHandlerRouter#routeCall(): did not find a connection to route",h.toString(!0))}else this.logService.trace("URLHandlerRouter#routeCall(): did not find windowId query parameter",h.toString(!0))}}else this.logService.trace("URLHandlerRouter#routeCall() without URI argument");return this.next.routeCall(f,v,m,S)}routeEvent(f,v){throw new Error(`Event not found: ${v}`)}}e.URLHandlerRouter=D}),define(Q[3417],Y([1,0,14,4,10,52]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeURLService=e.AbstractURLService=void 0;class T extends y.Disposable{constructor(){super(...arguments),this.handlers=new Set}open(m,S){const h=[...this.handlers.values()];return(0,t.first)(h.map(a=>()=>a.handleURL(m,S)),void 0,!1).then(a=>a||!1)}registerHandler(m){return this.handlers.add(m),(0,y.toDisposable)(()=>this.handlers.delete(m))}}e.AbstractURLService=T;let f=class extends T{constructor(m){super(),this.productService=m}create(m){let{authority:S,path:h,query:a,fragment:r}=m||{authority:void 0,path:void 0,query:void 0,fragment:void 0};return S&&h&&h.indexOf("/")!==0&&(h=`/${h}`),b.URI.from({scheme:this.productService.urlProtocol,authority:S,path:h,query:a,fragment:r})}};e.NativeURLService=f,e.NativeURLService=f=fe([O(0,D.IProductService)],f)}),define(Q[3418],Y([1,0,6,4,25,300,283,62]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileUserDataProvider=void 0;class v extends y.Disposable{get capabilities(){return this.fileSystemProvider.capabilities&-5}constructor(S,h,a,r){super(),this.fileSystemScheme=S,this.fileSystemProvider=h,this.userDataScheme=a,this.logService=r,this.onDidChangeCapabilities=this.fileSystemProvider.onDidChangeCapabilities,this._onDidChangeFile=this._register(new t.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this.watchResources=T.TernarySearchTree.forUris(()=>!(this.capabilities&1024)),this._register(this.fileSystemProvider.onDidChangeFile(i=>this.handleFileChanges(i)))}watch(S,h){this.watchResources.set(S,S);const a=this.fileSystemProvider.watch(this.toFileSystemResource(S),h);return(0,y.toDisposable)(()=>{this.watchResources.delete(S),a.dispose()})}stat(S){return this.fileSystemProvider.stat(this.toFileSystemResource(S))}mkdir(S){return this.fileSystemProvider.mkdir(this.toFileSystemResource(S))}rename(S,h,a){return this.fileSystemProvider.rename(this.toFileSystemResource(S),this.toFileSystemResource(h),a)}readFile(S){return this.fileSystemProvider.readFile(this.toFileSystemResource(S),{atomic:!0})}readFileStream(S,h,a){const r=(0,D.newWriteableStream)(i=>f.VSBuffer.concat(i.map(s=>f.VSBuffer.wrap(s))).buffer);return(async()=>{try{const i=await this.readFile(S);r.end(i)}catch(i){r.error(i),r.end()}})(),r}readdir(S){return this.fileSystemProvider.readdir(this.toFileSystemResource(S))}writeFile(S,h,a){return this.fileSystemProvider.writeFile(this.toFileSystemResource(S),h,a)}delete(S,h){return this.fileSystemProvider.delete(this.toFileSystemResource(S),h)}copy(S,h,a){if((0,b.hasFileFolderCopyCapability)(this.fileSystemProvider))return this.fileSystemProvider.copy(this.toFileSystemResource(S),this.toFileSystemResource(h),a);throw new Error("copy not supported")}handleFileChanges(S){const h=[];for(const a of S){if(a.resource.scheme!==this.fileSystemScheme)continue;const r=this.toUserDataResource(a.resource);this.watchResources.findSubstr(r)&&h.push({resource:r,type:a.type})}h.length&&(this.logService.debug("User data changed"),this._onDidChangeFile.fire(h))}toFileSystemResource(S){return S.with({scheme:this.fileSystemScheme})}toUserDataResource(S){return S.with({scheme:this.userDataScheme})}}e.FileUserDataProvider=v}),define(Q[1228],Y([1,0,480]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLineEndOffset=e.getLineStartOffset=e.edit=void 0;function y(T,f,v,m){const S=(0,t.setProperty)(T,f,v,m)[0];return S&&(T=T.substring(0,S.offset)+S.content+T.substring(S.offset+S.length)),T}e.edit=y;function b(T,f,v){let m=v;for(;m>=0;){if(T.charAt(m)===f.charAt(f.length-1)&&f.length===1)return m+1;if(m--,f.length===2&&m>=0&&T.charAt(m)===f.charAt(0))return m+2}return 0}e.getLineStartOffset=b;function D(T,f,v){let m=v;for(;m>=0;)if(T.charAt(m)===f.charAt(f.length-1)&&f.length===1||(m++,f.length===2&&m>=0&&T.charAt(m)===f.charAt(1)))return m;return T.length-1}e.getLineEndOffset=D}),define(Q[3419],Y([1,0,42,406,17]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;function D(r,i,s,o,u,d){const p=[],c=[],l=[];if(!i){const F=r.filter(({identifier:V})=>u.every(W=>W.toLowerCase()!==V.id.toLowerCase()));return{local:{added:p,removed:c,updated:l},remote:F.length>0?{added:F,updated:[],removed:[],all:F}:null}}r=r.map(h),i=i.map(h),s=s?s.map(h):null;const n=new Map,g=F=>{F.uuid&&n.set(F.id.toLowerCase(),F.uuid)};r.forEach(({identifier:F})=>g(F)),i.forEach(({identifier:F})=>g(F)),s?.forEach(({identifier:F})=>g(F));const w=F=>{const V=F.identifier.uuid||n.get(F.identifier.id.toLowerCase());return V?`uuid:${V}`:`id:${F.identifier.id.toLowerCase()}`},E=(F,V)=>(F.set(w(V),V),F),C=r.reduce(E,new Map),I=i.reduce(E,new Map),_=i.reduce((F,V)=>E(F,(0,t.deepClone)(V)),new Map),A=s?s.reduce(E,new Map):null,k=o.reduce(E,new Map),L=u.reduce((F,V)=>{const W=n.get(V.toLowerCase());return F.add(W?`uuid:${W}`:`id:${V.toLowerCase()}`)},new Set),R=d?d.reduce((F,{id:V,uuid:W})=>(W=W??n.get(V.toLowerCase()),F.add(W?`uuid:${W}`:`id:${V.toLowerCase()}`)),new Set):null,M=T(C,I,L,!1);if(M.added.size>0||M.removed.size>0||M.updated.size>0){const F=T(A,C,L,!1),V=T(A,I,L,!0),W=(z,B,K,H)=>{let U,G,$;return B.installed?(U=H.pinned,$=H.preRelease,U&&(G=H.version)):(U=K.pinned,$=K.preRelease,U&&(G=K.version)),U===void 0&&(U=B.pinned,U&&(G=B.version)),$===void 0&&($=B.preRelease),{...H,installed:B.installed||K.installed,pinned:U,preRelease:$,version:G??(K.version&&(!B.installed||y.gt(K.version,B.version))?K.version:B.version),state:v(B,K,A?.get(z))}};for(const z of V.removed.values()){const B=C.get(z);if(!B)continue;const K=(0,b.assertIsDefined)(A?.get(z)),H=R&&!R.has(z)&&K.installed;B.installed&&H?c.push(B.identifier):_.set(z,B)}for(const z of V.added.values()){const B=(0,b.assertIsDefined)(I.get(z)),K=C.get(z);if(K){if(M.updated.has(z)){const H=W(z,K,B,B);f(K,B,!1,!1)||l.push(a(H,z)),_.set(z,H)}}else B.installed&&p.push(a(B,z))}for(const z of V.updated.values()){const B=(0,b.assertIsDefined)(I.get(z)),K=(0,b.assertIsDefined)(A?.get(z)),H=C.get(z);if(H)if(R&&!R.has(z)&&K.installed&&H.installed&&!B.installed)c.push(H.identifier);else{const G=W(z,H,B,B);l.push(a(G,z)),_.set(z,G)}else B.installed&&p.push(a(B,z))}for(const z of F.added.values())V.added.has(z)||_.set(z,(0,b.assertIsDefined)(C.get(z)));for(const z of F.updated.values()){if(V.removed.has(z)||V.updated.has(z))continue;const B=(0,b.assertIsDefined)(C.get(z)),K=(0,b.assertIsDefined)(I.get(z));_.set(z,W(z,B,K,B))}for(const z of F.removed.values())V.updated.has(z)||V.removed.has(z)||k.has(z)||(0,b.assertIsDefined)(I.get(z)).installed&&R&&(R.has(z)||!(0,b.assertIsDefined)(A?.get(z)).installed||_.delete(z))}const N=[],P=T(I,_,new Set,!0),x=P.added.size>0||P.updated.size>0||P.removed.size>0;return x&&_.forEach((F,V)=>N.push(a(F,V))),{local:{added:p,removed:c,updated:l},remote:x?{added:[...P.added].map(F=>_.get(F)),updated:[...P.updated].map(F=>_.get(F)),removed:[...P.removed].map(F=>I.get(F)),all:N}:null}}e.merge=D;function T(r,i,s,o){const u=r?[...r.keys()].filter(n=>!s.has(n)):[],d=[...i.keys()].filter(n=>!s.has(n)),p=d.filter(n=>!u.includes(n)).reduce((n,g)=>(n.add(g),n),new Set),c=u.filter(n=>!d.includes(n)).reduce((n,g)=>(n.add(g),n),new Set),l=new Set;for(const n of u){if(c.has(n))continue;const g=r.get(n),w=i.get(n);(!w||!f(g,w,o,!0))&&l.add(n)}return{added:p,removed:c,updated:l}}function f(r,i,s,o){return!(r.disabled!==i.disabled||!!r.isApplicationScoped!=!!i.isApplicationScoped||o&&r.installed!==i.installed||r.installed&&i.installed&&(r.preRelease!==i.preRelease||r.pinned!==i.pinned||i.pinned&&r.version!==i.version)||!S(r.state,i.state)||s&&r.version!==i.version)}function v(r,i,s){const o=r.state,u=i.state,d=s?.state;if(!i.version||o&&y.gt(r.version,i.version))return o;if(u&&y.gt(i.version,r.version)||!o)return u;if(!u)return o;const p=(0,t.deepClone)(o),c=d?m(d,u):{added:Object.keys(u).reduce((n,g)=>(n.add(g),n),new Set),removed:new Set,updated:new Set},l=d?m(d,o):{added:Object.keys(o).reduce((n,g)=>(n.add(g),n),new Set),removed:new Set,updated:new Set};for(const n of[...c.added.values(),...c.updated.values()])p[n]=u[n];for(const n of c.removed.values())l.updated.has(n)||delete p[n];return p}function m(r,i){const s=Object.keys(r),o=Object.keys(i),u=o.filter(c=>!s.includes(c)).reduce((c,l)=>(c.add(l),c),new Set),d=s.filter(c=>!o.includes(c)).reduce((c,l)=>(c.add(l),c),new Set),p=new Set;for(const c of s){if(d.has(c))continue;const l=r[c],n=i[c];(0,t.equals)(l,n)||p.add(c)}return{added:u,removed:d,updated:p}}function S(r={},i={}){const{added:s,removed:o,updated:u}=m(r,i);return s.size===0&&o.size===0&&u.size===0}function h(r){return{...r,disabled:!!r.disabled,installed:!!r.installed}}function a(r,i){const s={...r,identifier:{id:r.identifier.id,uuid:i.startsWith("uuid:")?i.substring(5):void 0},preRelease:!!r.preRelease,pinned:!!r.pinned};return r.disabled||delete s.disabled,r.installed||delete s.installed,r.state||delete s.state,r.isApplicationScoped||delete s.isApplicationScoped,s}}),define(Q[713],Y([1,0,20,9,5]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IgnoredExtensionsManagementService=e.IIgnoredExtensionsManagementService=void 0,e.IIgnoredExtensionsManagementService=(0,b.createDecorator)("IIgnoredExtensionsManagementService");let D=class{constructor(f){this.configurationService=f}hasToNeverSyncExtension(f){return this.getConfiguredIgnoredExtensions().includes(f.toLowerCase())}hasToAlwaysSyncExtension(f){return this.getConfiguredIgnoredExtensions().includes(`-${f.toLowerCase()}`)}updateIgnoredExtensions(f,v){let m=[...this.configurationService.getValue("settingsSync.ignoredExtensions")].map(S=>S.toLowerCase());return m=m.filter(S=>S!==f&&S!==`-${f}`),v&&m.push(f.toLowerCase()),this.configurationService.updateValue("settingsSync.ignoredExtensions",m.length?m:void 0,2)}updateSynchronizedExtensions(f,v){let m=[...this.configurationService.getValue("settingsSync.ignoredExtensions")].map(S=>S.toLowerCase());return m=m.filter(S=>S!==f&&S!==`-${f}`),v&&m.push(`-${f.toLowerCase()}`),this.configurationService.updateValue("settingsSync.ignoredExtensions",m.length?m:void 0,2)}getIgnoredExtensions(f){const v=f.filter(a=>a.isMachineScoped).map(a=>a.identifier.id.toLowerCase()),m=this.getConfiguredIgnoredExtensions().map(a=>a.toLowerCase()),S=[],h=[];if(Array.isArray(m))for(const a of m)a.startsWith("-")?h.push(a.substring(1)):S.push(a);return(0,t.distinct)([...v,...S].filter(a=>!h.includes(a)))}getConfiguredIgnoredExtensions(){let f=this.configurationService.inspect("settingsSync.ignoredExtensions").userValue;return f!==void 0||(f=this.configurationService.inspect("sync.ignoredExtensions").userValue,f!==void 0)?f:(this.configurationService.getValue("settingsSync.ignoredExtensions")||[]).map(v=>v.toLowerCase())}};e.IgnoredExtensionsManagementService=D,e.IgnoredExtensionsManagementService=D=fe([O(0,y.IConfigurationService)],D)}),define(Q[120],Y([1,0,20,17,2494,56,95,5,219,16]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PREVIEW_DIR_NAME=e.USER_DATA_SYNC_SCHEME=e.USER_DATA_SYNC_LOG_ID=e.IUserDataSyncLogService=e.IUserDataSyncUtilService=e.IUserDataAutoSyncService=e.IUserDataSyncResourceProviderService=e.IUserDataSyncService=e.IUserDataSyncEnablementService=e.getEnablementKey=e.SYNC_SERVICE_URL_TYPE=e.MergeState=e.Change=e.SyncStatus=e.UserDataAutoSyncError=e.UserDataSyncStoreError=e.UserDataSyncError=e.UserDataSyncErrorCode=e.createSyncHeaders=e.HEADER_EXECUTION_ID=e.HEADER_OPERATION_ID=e.IUserDataSyncBackupStoreService=e.IUserDataSyncStoreService=e.IUserDataSyncStoreManagementService=e.getLastSyncResourceUri=e.getPathSegments=e.ALL_SYNC_RESOURCES=e.SyncResource=e.isAuthenticationProvider=e.registerConfiguration=e.CONFIG_SYNC_KEYBINDINGS_PER_PLATFORM=e.USER_DATA_SYNC_CONFIGURATION_SCOPE=e.getDefaultIgnoredSettings=e.getDisallowedIgnoredSettings=void 0;function S(){const C=m.Registry.as(D.Extensions.Configuration).getConfigurationProperties();return Object.keys(C).filter(I=>!!C[I].disallowSyncIgnore)}e.getDisallowedIgnoredSettings=S;function h(){const C=m.Registry.as(D.Extensions.Configuration).getConfigurationProperties(),I=Object.keys(C).filter(k=>!!C[k].ignoreSync),_=Object.keys(C).filter(k=>C[k].scope===2||C[k].scope===6),A=S();return(0,t.distinct)([...I,..._,...A])}e.getDefaultIgnoredSettings=h,e.USER_DATA_SYNC_CONFIGURATION_SCOPE="settingsSync",e.CONFIG_SYNC_KEYBINDINGS_PER_PLATFORM="settingsSync.keybindingsPerPlatform";function a(){const C="vscode://schemas/ignoredSettings",I=m.Registry.as(D.Extensions.Configuration);I.registerConfiguration({id:"settingsSync",order:30,title:(0,b.localize)(0,null),type:"object",properties:{[e.CONFIG_SYNC_KEYBINDINGS_PER_PLATFORM]:{type:"boolean",description:(0,b.localize)(1,null),default:!0,scope:1,tags:["sync","usesOnlineServices"]},"settingsSync.ignoredExtensions":{type:"array",markdownDescription:(0,b.localize)(2,null),items:[{type:"string",pattern:T.EXTENSION_IDENTIFIER_PATTERN,errorMessage:(0,b.localize)(3,null)}],default:[],scope:1,uniqueItems:!0,disallowSyncIgnore:!0,tags:["sync","usesOnlineServices"]},"settingsSync.ignoredSettings":{type:"array",description:(0,b.localize)(4,null),default:[],scope:1,$ref:C,additionalProperties:!0,uniqueItems:!0,disallowSyncIgnore:!0,tags:["sync","usesOnlineServices"]}}});const _=m.Registry.as(v.Extensions.JSONContribution),A=()=>{const k=S(),L=h(),R=Object.keys(D.allSettings.properties).filter(P=>!L.includes(P)),M=L.filter(P=>!k.includes(P)),N={items:{type:"string",enum:[...R,...M.map(P=>`-${P}`)]}};_.registerSchema(C,N)};return I.onDidUpdateConfiguration(()=>A())}e.registerConfiguration=a;function r(C){return C&&(0,y.isObject)(C)&&(0,y.isString)(C.id)&&Array.isArray(C.scopes)}e.isAuthenticationProvider=r;var i;(function(C){C.Settings="settings",C.Keybindings="keybindings",C.Snippets="snippets",C.Tasks="tasks",C.Extensions="extensions",C.GlobalState="globalState",C.Profiles="profiles",C.WorkspaceState="workspaceState"})(i||(e.SyncResource=i={})),e.ALL_SYNC_RESOURCES=["settings","keybindings","snippets","tasks","extensions","globalState","profiles"];function s(C,...I){return C?[C,...I]:I}e.getPathSegments=s;function o(C,I,_,A){return A.joinPath(_.userDataSyncHome,...s(C,I,`lastSync${I}.json`))}e.getLastSyncResourceUri=o,e.IUserDataSyncStoreManagementService=(0,f.createDecorator)("IUserDataSyncStoreManagementService"),e.IUserDataSyncStoreService=(0,f.createDecorator)("IUserDataSyncStoreService"),e.IUserDataSyncBackupStoreService=(0,f.createDecorator)("IUserDataSyncBackupStoreService"),e.HEADER_OPERATION_ID="x-operation-id",e.HEADER_EXECUTION_ID="X-Execution-Id";function u(C){const I={};return I[e.HEADER_EXECUTION_ID]=C,I}e.createSyncHeaders=u;var d;(function(C){C.Unauthorized="Unauthorized",C.Forbidden="Forbidden",C.NotFound="NotFound",C.MethodNotFound="MethodNotFound",C.Conflict="Conflict",C.Gone="Gone",C.PreconditionFailed="PreconditionFailed",C.TooLarge="TooLarge",C.UpgradeRequired="UpgradeRequired",C.PreconditionRequired="PreconditionRequired",C.TooManyRequests="RemoteTooManyRequests",C.TooManyRequestsAndRetryAfter="TooManyRequestsAndRetryAfter",C.RequestFailed="RequestFailed",C.RequestCanceled="RequestCanceled",C.RequestTimeout="RequestTimeout",C.RequestProtocolNotSupported="RequestProtocolNotSupported",C.RequestPathNotEscaped="RequestPathNotEscaped",C.RequestHeadersNotObject="RequestHeadersNotObject",C.NoCollection="NoCollection",C.NoRef="NoRef",C.EmptyResponse="EmptyResponse",C.TurnedOff="TurnedOff",C.SessionExpired="SessionExpired",C.ServiceChanged="ServiceChanged",C.DefaultServiceChanged="DefaultServiceChanged",C.LocalTooManyProfiles="LocalTooManyProfiles",C.LocalTooManyRequests="LocalTooManyRequests",C.LocalPreconditionFailed="LocalPreconditionFailed",C.LocalInvalidContent="LocalInvalidContent",C.LocalError="LocalError",C.IncompatibleLocalContent="IncompatibleLocalContent",C.IncompatibleRemoteContent="IncompatibleRemoteContent",C.Unknown="Unknown"})(d||(e.UserDataSyncErrorCode=d={}));class p extends Error{constructor(I,_,A,k){super(I),this.code=_,this.resource=A,this.operationId=k,this.name=`${this.code} (UserDataSyncError) syncResource:${this.resource||"unknown"} operationId:${this.operationId||"unknown"}`}}e.UserDataSyncError=p;class c extends p{constructor(I,_,A,k,L){super(I,A,void 0,L),this.url=_,this.serverCode=k}}e.UserDataSyncStoreError=c;class l extends p{constructor(I,_){super(I,_)}}e.UserDataAutoSyncError=l,function(C){function I(_){if(_ instanceof C)return _;const A=/^(.+) \(UserDataSyncError\) syncResource:(.+) operationId:(.+)$/.exec(_.name);if(A&&A[1]){const k=A[2]==="unknown"?void 0:A[2],L=A[3]==="unknown"?void 0:A[3];return new C(_.message,A[1],k,L)}return new C(_.message,"Unknown")}C.toUserDataSyncError=I}(p||(e.UserDataSyncError=p={}));var n;(function(C){C.Uninitialized="uninitialized",C.Idle="idle",C.Syncing="syncing",C.HasConflicts="hasConflicts"})(n||(e.SyncStatus=n={}));var g;(function(C){C[C.None=0]="None",C[C.Added=1]="Added",C[C.Modified=2]="Modified",C[C.Deleted=3]="Deleted"})(g||(e.Change=g={}));var w;(function(C){C.Preview="preview",C.Conflict="conflict",C.Accepted="accepted"})(w||(e.MergeState=w={})),e.SYNC_SERVICE_URL_TYPE="sync.store.url.type";function E(C){return`sync.enable.${C}`}e.getEnablementKey=E,e.IUserDataSyncEnablementService=(0,f.createDecorator)("IUserDataSyncEnablementService"),e.IUserDataSyncService=(0,f.createDecorator)("IUserDataSyncService"),e.IUserDataSyncResourceProviderService=(0,f.createDecorator)("IUserDataSyncResourceProviderService"),e.IUserDataAutoSyncService=(0,f.createDecorator)("IUserDataAutoSyncService"),e.IUserDataSyncUtilService=(0,f.createDecorator)("IUserDataSyncUtilService"),e.IUserDataSyncLogService=(0,f.createDecorator)("IUserDataSyncLogService"),e.USER_DATA_SYNC_LOG_ID="userDataSync",e.USER_DATA_SYNC_SCHEME="vscode-userdata-sync",e.PREVIEW_DIR_NAME="preview"}),define(Q[3420],Y([1,0,42,120]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;function b(T,f,v,m,S){if(!f)return{remote:{added:Object.keys(T),removed:[],updated:[],all:Object.keys(T).length>0?T:null},local:{added:{},removed:[],updated:{}}};const h=D(T,f);if(h.added.size===0&&h.removed.size===0&&h.updated.size===0)return{remote:{added:[],removed:[],updated:[],all:null},local:{added:{},removed:[],updated:{}}};const a=v?D(v,f):{added:Object.keys(f).reduce((d,p)=>(d.add(p),d),new Set),removed:new Set,updated:new Set},r=v?D(v,T):{added:Object.keys(T).reduce((d,p)=>(d.add(p),d),new Set),removed:new Set,updated:new Set},i={added:{},removed:[],updated:{}},s=t.deepClone(f),o=!v;for(const d of r.added.values())d!==y.SYNC_SERVICE_URL_TYPE&&o&&a.added.has(d)||(s[d]=T[d]);for(const d of r.updated.values())s[d]=T[d];for(const d of r.removed.values())m.unregistered.includes(d)||delete s[d];for(const d of a.added.values()){const p=f[d];if(m.machine.includes(d)){S.info(`GlobalState: Skipped adding ${d} in local storage because it is declared as machine scoped.`);continue}if(v&&r.added.has(d))continue;const c=T[d];c&&c.value===p.value||d===y.SYNC_SERVICE_URL_TYPE&&o&&r.added.has(d)||(c?i.updated[d]=p:i.added[d]=p)}for(const d of a.updated.values()){const p=f[d];if(m.machine.includes(d)){S.info(`GlobalState: Skipped updating ${d} in local storage because it is declared as machine scoped.`);continue}if(r.updated.has(d)||r.removed.has(d))continue;const c=T[d];c&&c.value===p.value||(i.updated[d]=p)}for(const d of a.removed.values()){if(m.machine.includes(d)){S.trace(`GlobalState: Skipped removing ${d} in local storage because it is declared as machine scoped.`);continue}r.updated.has(d)||r.removed.has(d)||i.removed.push(d)}const u=D(f,s);return{local:i,remote:{added:[...u.added],updated:[...u.updated],removed:[...u.removed],all:u.added.size===0&&u.removed.size===0&&u.updated.size===0?null:s}}}e.merge=b;function D(T,f){const v=Object.keys(T),m=Object.keys(f),S=m.filter(r=>!v.includes(r)).reduce((r,i)=>(r.add(i),r),new Set),h=v.filter(r=>!m.includes(r)).reduce((r,i)=>(r.add(i),r),new Set),a=new Set;for(const r of v){if(h.has(r))continue;const i=T[r],s=f[r];t.equals(i,s)||a.add(r)}return{added:S,removed:h,updated:a}}}),define(Q[1229],Y([1,0,20,161,480,433,42,1228,120]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addSetting=e.isEmpty=e.merge=e.updateIgnoredSettings=e.removeComments=e.getIgnoredSettings=void 0;function m(_,A,k){let L=[];k?L=h(k):L=S(A);const R=[],M=[...(0,v.getDisallowedIgnoredSettings)()];if(Array.isArray(L))for(const N of L)N.startsWith("-")?M.push(N.substring(1)):R.push(N);return(0,t.distinct)([..._,...R].filter(N=>!M.includes(N)))}e.getIgnoredSettings=m;function S(_){let A=_.inspect("settingsSync.ignoredSettings").userValue;return A!==void 0||(A=_.inspect("sync.ignoredSettings").userValue,A!==void 0)?A:_.getValue("settingsSync.ignoredSettings")||[]}function h(_){const A=(0,y.parse)(_);return A?A["settingsSync.ignoredSettings"]||A["sync.ignoredSettings"]||[]:[]}function a(_,A){const k=(0,y.parse)(_)||{};let L="{}";for(const R of Object.keys(k)){const M=(0,b.setProperty)(L,[R],k[R],A);L=(0,b.applyEdits)(L,M)}return L}e.removeComments=a;function r(_,A,k,L){if(k.length){const R=I(A),M=(0,y.parse)(A)||{},N=(0,y.parse)(_);if(!N)return _;const P=[];for(const x of k){const F=M[x],V=N[x];F===void 0?_=f.edit(_,[x],void 0,L):V!==void 0?_=f.edit(_,[x],F,L):P.push(n(x,R))}P.sort((x,F)=>x.startOffset-F.startOffset),P.forEach(x=>_=d(x.setting.key,A,_,L))}return _}e.updateIgnoredSettings=r;function i(_,A,k,L,R,M){const N=r(_,A,L,M),P=k!==N,x=k!==A;if(!P&&!x)return{conflictsSettings:[],localContent:null,remoteContent:null,hasConflicts:!1};if(P&&!x)return{conflictsSettings:[],localContent:null,remoteContent:N,hasConflicts:!1};if(x&&!P)return{conflictsSettings:[],localContent:r(A,_,L,M),remoteContent:null,hasConflicts:!1};if(k===null&&o(_)){const te=s(_,A,L)?null:r(A,_,L,M);return{conflictsSettings:[],localContent:te,remoteContent:null,hasConflicts:!1}}let F=_,V=A;const W=(0,y.parse)(_),z=(0,y.parse)(A),B=k?(0,y.parse)(k):null,K=L.reduce((te,Z)=>(te.add(Z),te),new Set),H=u(W,z,K),U=u(B,W,K),G=u(B,z,K),$=new Map,ie=new Set,J=te=>{ie.add(te);const Z=R.filter(({key:se})=>se===te)[0];Z?(F=f.edit(F,[te],Z.value,M),V=f.edit(V,[te],Z.value,M)):$.set(te,{key:te,localValue:W[te],remoteValue:z[te]})};for(const te of U.removed.values())G.updated.has(te)?J(te):V=f.edit(V,[te],void 0,M);for(const te of G.removed.values())ie.has(te)||(U.updated.has(te)?J(te):F=f.edit(F,[te],void 0,M));for(const te of U.updated.values())ie.has(te)||(G.updated.has(te)?H.updated.has(te)&&J(te):V=f.edit(V,[te],W[te],M));for(const te of G.updated.values())ie.has(te)||(U.updated.has(te)?H.updated.has(te)&&J(te):F=f.edit(F,[te],z[te],M));for(const te of U.added.values())ie.has(te)||(G.added.has(te)?H.updated.has(te)&&J(te):V=d(te,F,V,M));for(const te of G.added.values())ie.has(te)||(U.added.has(te)?H.updated.has(te)&&J(te):F=d(te,V,F,M));const j=$.size>0||!s(F,V,L),ee=j||!s(F,_,[]),X=j||!s(V,A,[]);return{localContent:ee?F:null,remoteContent:X?V:null,conflictsSettings:[...$.values()],hasConflicts:j}}e.merge=i;function s(_,A,k){if(_===A)return!0;const L=(0,y.parse)(_),R=(0,y.parse)(A),M=k.reduce((x,F)=>(x.add(F),x),new Set),N=I(_).filter(x=>!(x.setting&&M.has(x.setting.key))),P=I(A).filter(x=>!(x.setting&&M.has(x.setting.key)));if(N.length!==P.length)return!1;for(let x=0;x<N.length;x++){const F=N[x],V=P[x];if(F.setting&&V.setting){if(F.setting.key!==V.setting.key||!T.equals(L[F.setting.key],R[F.setting.key]))return!1}else if(!F.setting&&!V.setting){if(F.value!==V.value)return!1}else return!1}return!0}function o(_){return _?I(_).length===0:!0}e.isEmpty=o;function u(_,A,k){const L=_?Object.keys(_).filter(x=>!k.has(x)):[],R=Object.keys(A).filter(x=>!k.has(x)),M=R.filter(x=>!L.includes(x)).reduce((x,F)=>(x.add(F),x),new Set),N=L.filter(x=>!R.includes(x)).reduce((x,F)=>(x.add(F),x),new Set),P=new Set;if(_)for(const x of L){if(N.has(x))continue;const F=_[x],V=A[x];T.equals(F,V)||P.add(x)}return{added:M,removed:N,updated:P}}function d(_,A,k,L){const R=(0,y.parse)(A),M=I(A),N=I(k),P=p(_,M,N);return c(k,_,R[_],P,N,L)}e.addSetting=d;function p(_,A,k){const L=A.findIndex(M=>M.setting?.key===_),R=A[L-1];if(R){if(R.setting){const N=n(R.setting.key,k);if(N)return{index:k.indexOf(N),insertAfter:!0}}else{const N=g(L,A);if(N){const P=n(N.setting.key,k);if(P){const x=w(k.indexOf(P),k),F=E(A,N,A[L]);if(x){const V=E(k,P,x),W=C(F,V);return W?{index:k.indexOf(W),insertAfter:!0}:{index:k.indexOf(x),insertAfter:!1}}else{const V=E(k,P,k[k.length-1]),W=C(F,V);return W?{index:k.indexOf(W),insertAfter:!0}:{index:k.length-1,insertAfter:!0}}}}}const M=A[L+1];if(M)if(M.setting){const N=n(M.setting.key,k);if(N)return{index:k.indexOf(N),insertAfter:!1}}else{const N=w(L,A);if(N){const P=n(N.setting.key,k);if(P){const x=g(k.indexOf(P),k),F=E(A,A[L],N);if(x){const V=E(k,x,P),W=C(F.reverse(),V.reverse());return W?{index:k.indexOf(W),insertAfter:!1}:{index:k.indexOf(x),insertAfter:!0}}else{const V=E(k,k[0],P),W=C(F.reverse(),V.reverse());return W?{index:k.indexOf(W),insertAfter:!1}:{index:0,insertAfter:!1}}}}}}return{index:k.length-1,insertAfter:!0}}function c(_,A,k,L,R,M){let N;return L.index===-1?N=(0,b.setProperty)(_,[A],k,M):N=l(_,A,k,L,R,M).map(P=>(0,b.withFormatting)(_,P,M)[0]),(0,b.applyEdits)(_,N)}function l(_,A,k,L,R,M){const N=`${JSON.stringify(A)}: ${JSON.stringify(k)}`,P=(0,D.getEOL)(M,_),x=R[L.index];if(L.insertAfter){const F=[];if(x.setting)F.push({offset:x.endOffset,length:0,content:","+N});else{const V=w(L.index,R),W=g(L.index,R),z=W?.setting?.commaOffset;W&&z===void 0&&F.push({offset:W.endOffset,length:0,content:","});const B=z!==void 0&&z>x.endOffset;F.push({offset:B?z+1:x.endOffset,length:0,content:V?P+N+",":P+N})}return F}else{if(x.setting)return[{offset:x.startOffset,length:0,content:N+","}];const F=(R[L.index-1]&&!R[L.index-1].setting?P:"")+N+(w(L.index,R)?",":"")+P;return[{offset:x.startOffset,length:0,content:F}]}}function n(_,A){return A.filter(k=>k.setting?.key===_)[0]}function g(_,A){for(let k=_-1;k>=0;k--)if(A[k].setting)return A[k]}function w(_,A){for(let k=_+1;k<A.length;k++)if(A[k].setting)return A[k]}function E(_,A,k){const L=_.indexOf(A),R=_.indexOf(k);return _.filter((M,N)=>L<N&&N<R)}function C(_,A){if(_.length&&A.length){let k=0;for(;k<A.length&&k<_.length;k++)if(_[k].value!==A[k].value)return A[k-1];return A[k-1]}}function I(_){const A=[];let k=-1,L,R;const M={onObjectBegin:N=>{k++},onObjectProperty:(N,P,x)=>{k===0&&(L=P,R=N)},onObjectEnd:(N,P)=>{k--,k===0&&A.push({startOffset:L,endOffset:N+P,value:_.substring(L,N+P),setting:{key:R,commaOffset:void 0}})},onArrayBegin:(N,P)=>{k++},onArrayEnd:(N,P)=>{k--,k===0&&A.push({startOffset:L,endOffset:N+P,value:_.substring(L,N+P),setting:{key:R,commaOffset:void 0}})},onLiteralValue:(N,P,x)=>{k===0&&A.push({startOffset:L,endOffset:P+x,value:_.substring(L,P+x),setting:{key:R,commaOffset:void 0}})},onSeparator:(N,P,x)=>{if(k===0&&N===","){let F=A.length-1;for(;F>=0&&!A[F].setting;F--);const V=A[F];V&&A.splice(F,1,{startOffset:V.startOffset,endOffset:V.endOffset,value:V.value,setting:{key:V.setting.key,commaOffset:P}})}},onComment:(N,P)=>{k===0&&A.push({startOffset:N,endOffset:N+P,value:_.substring(N,N+P)})}};return(0,y.visit)(_,M),A}}),define(Q[894],Y([1,0,6,4,5,120]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncAccountService=e.IUserDataSyncAccountService=void 0,e.IUserDataSyncAccountService=(0,b.createDecorator)("IUserDataSyncAccountService");let T=class extends y.Disposable{get account(){return this._account}constructor(v,m){super(),this.userDataSyncStoreService=v,this.logService=m,this._onDidChangeAccount=this._register(new t.Emitter),this.onDidChangeAccount=this._onDidChangeAccount.event,this._onTokenFailed=this._register(new t.Emitter),this.onTokenFailed=this._onTokenFailed.event,this.wasTokenFailed=!1,this._register(v.onTokenFailed(S=>{this.logService.info("Settings Sync auth token failed",this.account?.authenticationProviderId,this.wasTokenFailed,S),this.updateAccount(void 0),S==="Forbidden"?this._onTokenFailed.fire(!0):this._onTokenFailed.fire(this.wasTokenFailed),this.wasTokenFailed=!0})),this._register(v.onTokenSucceed(()=>this.wasTokenFailed=!1))}async updateAccount(v){(v&&this._account?v.token!==this._account.token||v.authenticationProviderId!==this._account.authenticationProviderId:v!==this._account)&&(this._account=v,this._account&&this.userDataSyncStoreService.setAuthToken(this._account.token,this._account.authenticationProviderId),this._onDidChangeAccount.fire(v))}};e.UserDataSyncAccountService=T,e.UserDataSyncAccountService=T=fe([O(0,D.IUserDataSyncStoreService),O(1,D.IUserDataSyncLogService)],T)}),define(Q[1230],Y([1,0,4,10]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncStoreManagementServiceChannelClient=e.UserDataSyncStoreManagementServiceChannel=e.UserDataSyncAccountServiceChannel=e.UserDataSyncMachinesServiceChannel=e.UserDataSyncUtilServiceClient=e.UserDataSycnUtilServiceChannel=e.UserDataAutoSyncChannel=void 0;class b{constructor(a){this.service=a}listen(a,r){switch(r){case"onError":return this.service.onError}throw new Error(`Event not found: ${r}`)}call(a,r,i){switch(r){case"triggerSync":return this.service.triggerSync(i[0],i[1],i[2]);case"turnOn":return this.service.turnOn();case"turnOff":return this.service.turnOff(i[0])}throw new Error("Invalid call")}}e.UserDataAutoSyncChannel=b;class D{constructor(a){this.service=a}listen(a,r){throw new Error(`Event not found: ${r}`)}call(a,r,i){switch(r){case"resolveDefaultIgnoredSettings":return this.service.resolveDefaultIgnoredSettings();case"resolveUserKeybindings":return this.service.resolveUserBindings(i[0]);case"resolveFormattingOptions":return this.service.resolveFormattingOptions(y.URI.revive(i[0]))}throw new Error("Invalid call")}}e.UserDataSycnUtilServiceChannel=D;class T{constructor(a){this.channel=a}async resolveDefaultIgnoredSettings(){return this.channel.call("resolveDefaultIgnoredSettings")}async resolveUserBindings(a){return this.channel.call("resolveUserKeybindings",[a])}async resolveFormattingOptions(a){return this.channel.call("resolveFormattingOptions",[a])}}e.UserDataSyncUtilServiceClient=T;class f{constructor(a){this.service=a}listen(a,r){switch(r){case"onDidChange":return this.service.onDidChange}throw new Error(`Event not found: ${r}`)}async call(a,r,i){switch(r){case"getMachines":return this.service.getMachines();case"addCurrentMachine":return this.service.addCurrentMachine();case"removeCurrentMachine":return this.service.removeCurrentMachine();case"renameMachine":return this.service.renameMachine(i[0],i[1]);case"setEnablements":return this.service.setEnablements(i)}throw new Error("Invalid call")}}e.UserDataSyncMachinesServiceChannel=f;class v{constructor(a){this.service=a}listen(a,r){switch(r){case"onDidChangeAccount":return this.service.onDidChangeAccount;case"onTokenFailed":return this.service.onTokenFailed}throw new Error(`Event not found: ${r}`)}call(a,r,i){switch(r){case"_getInitialData":return Promise.resolve(this.service.account);case"updateAccount":return this.service.updateAccount(i)}throw new Error("Invalid call")}}e.UserDataSyncAccountServiceChannel=v;class m{constructor(a){this.service=a}listen(a,r){switch(r){case"onDidChangeUserDataSyncStore":return this.service.onDidChangeUserDataSyncStore}throw new Error(`Event not found: ${r}`)}call(a,r,i){switch(r){case"switch":return this.service.switch(i[0]);case"getPreviousUserDataSyncStore":return this.service.getPreviousUserDataSyncStore()}throw new Error("Invalid call")}}e.UserDataSyncStoreManagementServiceChannel=m;class S extends t.Disposable{constructor(a){super(),this.channel=a,this.onDidChangeUserDataSyncStore=this.channel.listen("onDidChangeUserDataSyncStore")}async switch(a){return this.channel.call("switch",[a])}async getPreviousUserDataSyncStore(){const a=await this.channel.call("getPreviousUserDataSyncStore");return this.revive(a)}revive(a){return{url:y.URI.revive(a.url),type:a.type,defaultUrl:y.URI.revive(a.defaultUrl),insidersUrl:y.URI.revive(a.insidersUrl),stableUrl:y.URI.revive(a.stableUrl),canSwitch:a.canSwitch,authenticationProviders:a.authenticationProviders}}}e.UserDataSyncStoreManagementServiceChannelClient=S}),define(Q[3421],Y([1,0,2495,11,120]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncLogService=void 0;let D=class extends y.AbstractLogger{constructor(f){super(),this.logger=this._register(f.createLogger(b.USER_DATA_SYNC_LOG_ID,{name:(0,t.localize)(0,null)}))}trace(f,...v){this.logger.trace(f,...v)}debug(f,...v){this.logger.debug(f,...v)}info(f,...v){this.logger.info(f,...v)}warn(f,...v){this.logger.warn(f,...v)}error(f,...v){this.logger.error(f,...v)}flush(){this.logger.flush()}};e.UserDataSyncLogService=D,e.UserDataSyncLogService=D=fe([O(0,y.ILoggerService)],D)}),define(Q[3422],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ipcUtilityProcessWorkerChannelName=void 0,e.ipcUtilityProcessWorkerChannelName="utilityProcessWorker"}),define(Q[3423],Y([1,0,197,55]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWebviewContentMimeType=void 0;const b=new Map([[".svg","image/svg+xml"],[".txt",t.Mimes.text],[".css","text/css"],[".js","application/javascript"],[".cjs","application/javascript"],[".mjs","application/javascript"],[".json","application/json"],[".html","text/html"],[".htm","text/html"],[".xhtml","application/xhtml+xml"],[".oft","font/otf"],[".xml","application/xml"],[".wasm","application/wasm"]]);function D(T){const f=(0,y.extname)(T.fsPath).toLowerCase();return b.get(f)||(0,t.getMediaMime)(T.fsPath)||t.Mimes.unknown}e.getWebviewContentMimeType=D}),define(Q[3424],Y([1,0,22,10,309]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewPortMappingManager=void 0;class D{constructor(f,v,m){this._getExtensionLocation=f,this._getMappings=v,this.tunnelService=m,this._tunnels=new Map}async getRedirect(f,v){const m=y.URI.parse(v),S=(0,b.extractLocalHostUriMetaDataForPortMapping)(m);if(S){for(const h of this._getMappings())if(h.webviewPort===S.port){const a=this._getExtensionLocation();if(a&&a.scheme===t.Schemas.vscodeRemote){const r=f&&await this.getOrCreateTunnel(f,h.extensionHostPort);if(r)return r.tunnelLocalPort===h.webviewPort?void 0:encodeURI(m.with({authority:`127.0.0.1:${r.tunnelLocalPort}`}).toString(!0))}if(h.webviewPort!==h.extensionHostPort)return encodeURI(m.with({authority:`${S.address}:${h.extensionHostPort}`}).toString(!0))}}}async dispose(){for(const f of this._tunnels.values())await f.dispose();this._tunnels.clear()}async getOrCreateTunnel(f,v){const m=this._tunnels.get(v);if(m)return m;const S=await this.tunnelService.openTunnel({getAddress:async()=>f},void 0,v);let h;return typeof S=="string"&&(h=void 0),h&&this._tunnels.set(v,h),h}}e.WebviewPortMappingManager=D}),define(Q[332],Y([1,0,18]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.zoomLevelToZoomFactor=e.useWindowControlsOverlay=e.getTitleBarStyle=e.getMenuBarVisibility=e.isFileToOpen=e.isFolderToOpen=e.isWorkspaceToOpen=e.WindowMinimumSize=void 0,e.WindowMinimumSize={WIDTH:400,WIDTH_WITH_VERTICAL_PANEL:600,HEIGHT:270};function y(S){return!!S.workspaceUri}e.isWorkspaceToOpen=y;function b(S){return!!S.folderUri}e.isFolderToOpen=b;function D(S){return!!S.fileUri}e.isFileToOpen=D;function T(S){const h=f(S),a=S.getValue("window.menuBarVisibility");return a==="default"||h==="native"&&a==="compact"||t.isMacintosh&&t.isNative?"classic":a}e.getMenuBarVisibility=T;function f(S){if(t.isWeb)return"custom";const h=S.getValue("window");if(h){if(t.isMacintosh&&h.nativeTabs===!0||t.isMacintosh&&h.nativeFullScreen===!1)return"native";const i=h.titleBarStyle;if(i==="native"||i==="custom")return i}return t.isLinux?"native":"custom"}e.getTitleBarStyle=f;function v(S){return!(!t.isWindows||t.isWeb||f(S)==="native")}e.useWindowControlsOverlay=v;function m(S=0){return Math.pow(1.2,S)}e.zoomLevelToZoomFactor=m}),define(Q[895],Y([1,0,97,274,332]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.zoomOut=e.zoomIn=e.applyZoom=void 0;function D(v){y.webFrame.setZoomLevel(v),(0,t.setZoomFactor)((0,b.zoomLevelToZoomFactor)(v)),(0,t.setZoomLevel)(v)}e.applyZoom=D;function T(){D((0,t.getZoomLevel)()+1)}e.zoomIn=T;function f(){D((0,t.getZoomLevel)()-1)}e.zoomOut=f}),define(Q[1231],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICanonicalUriService=void 0,e.ICanonicalUriService=(0,t.createDecorator)("canonicalUriIdentityService")}),define(Q[600],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditSessionIdentityMatch=e.IEditSessionIdentityService=void 0,e.IEditSessionIdentityService=(0,t.createDecorator)("editSessionIdentityService");var y;(function(b){b[b.Complete=100]="Complete",b[b.Partial=50]="Partial",b[b.None=0]="None"})(y||(e.EditSessionIdentityMatch=y={}))}),define(Q[310],Y([1,0,22]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isVirtualWorkspace=e.getVirtualWorkspaceAuthority=e.getVirtualWorkspaceScheme=e.getVirtualWorkspaceLocation=e.isVirtualResource=void 0;function y(v){return v.scheme!==t.Schemas.file&&v.scheme!==t.Schemas.vscodeRemote}e.isVirtualResource=y;function b(v){if(v.folders.length)return v.folders.every(m=>y(m.uri))?v.folders[0].uri:void 0;if(v.configuration&&y(v.configuration))return v.configuration}e.getVirtualWorkspaceLocation=b;function D(v){return b(v)?.scheme}e.getVirtualWorkspaceScheme=D;function T(v){return b(v)?.authority}e.getVirtualWorkspaceAuthority=T;function f(v){return b(v)!==void 0}e.isVirtualWorkspace=f}),define(Q[39],Y([1,0,2497,55,283,26,10,5,22]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasWorkspaceFileExtension=e.isSavedWorkspace=e.isStandaloneEditorWorkspace=e.STANDALONE_EDITOR_WORKSPACE_ID=e.isTemporaryWorkspace=e.isUntitledWorkspace=e.UNTITLED_WORKSPACE_NAME=e.WORKSPACE_FILTER=e.WORKSPACE_SUFFIX=e.WORKSPACE_EXTENSION=e.toWorkspaceFolder=e.WorkspaceFolder=e.Workspace=e.isWorkspaceFolder=e.isWorkspace=e.WorkbenchState=e.reviveIdentifier=e.isWorkspaceIdentifier=e.toWorkspaceIdentifier=e.UNKNOWN_EMPTY_WINDOW_WORKSPACE=e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE=e.isEmptyWorkspaceIdentifier=e.isSingleFolderWorkspaceIdentifier=e.IWorkspaceContextService=void 0,e.IWorkspaceContextService=(0,f.createDecorator)("contextService");function m(E){const C=E;return typeof C?.id=="string"&&T.URI.isUri(C.uri)}e.isSingleFolderWorkspaceIdentifier=m;function S(E){return typeof E?.id=="string"&&!m(E)&&!a(E)}e.isEmptyWorkspaceIdentifier=S,e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE={id:"ext-dev"},e.UNKNOWN_EMPTY_WINDOW_WORKSPACE={id:"empty-window"};function h(E,C){if(typeof E=="string"||typeof E>"u")return typeof E=="string"?{id:(0,y.basename)(E)}:C?e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE:e.UNKNOWN_EMPTY_WINDOW_WORKSPACE;const I=E;return I.configuration?{id:I.id,configPath:I.configuration}:I.folders.length===1?{id:I.id,uri:I.folders[0].uri}:{id:I.id}}e.toWorkspaceIdentifier=h;function a(E){const C=E;return typeof C?.id=="string"&&T.URI.isUri(C.configPath)}e.isWorkspaceIdentifier=a;function r(E){const C=E;if(C?.uri)return{id:C.id,uri:T.URI.revive(C.uri)};const I=E;if(I?.configPath)return{id:I.id,configPath:T.URI.revive(I.configPath)};if(E?.id)return{id:E.id}}e.reviveIdentifier=r;var i;(function(E){E[E.EMPTY=1]="EMPTY",E[E.FOLDER=2]="FOLDER",E[E.WORKSPACE=3]="WORKSPACE"})(i||(e.WorkbenchState=i={}));function s(E){const C=E;return!!(C&&typeof C=="object"&&typeof C.id=="string"&&Array.isArray(C.folders))}e.isWorkspace=s;function o(E){const C=E;return!!(C&&typeof C=="object"&&T.URI.isUri(C.uri)&&typeof C.name=="string"&&typeof C.toResource=="function")}e.isWorkspaceFolder=o;class u{constructor(C,I,_,A,k){this._id=C,this._transient=_,this._configuration=A,this._ignorePathCasing=k,this._foldersMap=b.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0),this.folders=I}update(C){this._id=C.id,this._configuration=C.configuration,this._transient=C.transient,this._ignorePathCasing=C._ignorePathCasing,this.folders=C.folders}get folders(){return this._folders}set folders(C){this._folders=C,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(C){this._configuration=C}getFolder(C){return C&&this._foldersMap.findSubstr(C)||null}updateFoldersMap(){this._foldersMap=b.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0);for(const C of this.folders)this._foldersMap.set(C.uri,C)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=u;class d{constructor(C,I){this.raw=I,this.uri=C.uri,this.index=C.index,this.name=C.name}toResource(C){return(0,D.joinPath)(this.uri,C)}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=d;function p(E){return new d({uri:E,index:0,name:(0,D.basenameOrAuthority)(E)},{uri:E.toString()})}e.toWorkspaceFolder=p,e.WORKSPACE_EXTENSION="code-workspace",e.WORKSPACE_SUFFIX=`.${e.WORKSPACE_EXTENSION}`,e.WORKSPACE_FILTER=[{name:(0,t.localize)(0,null),extensions:[e.WORKSPACE_EXTENSION]}],e.UNTITLED_WORKSPACE_NAME="workspace.json";function c(E,C){return D.extUriBiasedIgnorePathCase.isEqualOrParent(E,C.untitledWorkspacesHome)}e.isUntitledWorkspace=c;function l(E){let C;return T.URI.isUri(E)?C=E:C=E.configuration,C?.scheme===v.Schemas.tmp}e.isTemporaryWorkspace=l,e.STANDALONE_EDITOR_WORKSPACE_ID="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function n(E){return E.id===e.STANDALONE_EDITOR_WORKSPACE_ID}e.isStandaloneEditorWorkspace=n;function g(E,C){return!c(E,C)&&!l(E)}e.isSavedWorkspace=g;function w(E){return(typeof E=="string"?(0,y.extname)(E):(0,D.extname)(E))===e.WORKSPACE_SUFFIX}e.hasWorkspaceFileExtension=w}),define(Q[415],Y([1,0,7,157,34,4,18,48,73,2375,13,8,29,38,9,39]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuController=void 0;let u=class{static{o=this}static{this.ID="editor.contrib.contextmenu"}static get(c){return c.getContribution(o.ID)}constructor(c,l,n,g,w,E,C,I){this._contextMenuService=l,this._contextViewService=n,this._contextKeyService=g,this._keybindingService=w,this._menuService=E,this._configurationService=C,this._workspaceContextService=I,this._toDispose=new D.DisposableStore,this._contextMenuIsBeingShownCount=0,this._editor=c,this._toDispose.add(this._editor.onContextMenu(_=>this._onContextMenu(_))),this._toDispose.add(this._editor.onMouseWheel(_=>{if(this._contextMenuIsBeingShownCount>0){const A=this._contextViewService.getContextViewElement(),k=_.srcElement;k.shadowRoot&&t.getShadowRoot(A)===k.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(_=>{this._editor.getOption(23)&&_.keyCode===58&&(_.preventDefault(),_.stopPropagation(),this.showContextMenu())}))}_onContextMenu(c){if(!this._editor.hasModel())return;if(!this._editor.getOption(23)){this._editor.focus(),c.target.position&&!this._editor.getSelection().containsPosition(c.target.position)&&this._editor.setPosition(c.target.position);return}if(c.target.type===12||c.target.type===6&&c.target.detail.injectedText)return;if(c.event.preventDefault(),c.event.stopPropagation(),c.target.type===11)return this._showScrollbarContextMenu(c.event);if(c.target.type!==6&&c.target.type!==7&&c.target.type!==1)return;if(this._editor.focus(),c.target.position){let n=!1;for(const g of this._editor.getSelections())if(g.containsPosition(c.target.position)){n=!0;break}n||this._editor.setPosition(c.target.position)}let l=null;c.target.type!==1&&(l=c.event),this.showContextMenu(l)}showContextMenu(c){if(!this._editor.getOption(23)||!this._editor.hasModel())return;const l=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?S.MenuId.SimpleEditorContext:S.MenuId.EditorContext);l.length>0&&this._doShowContextMenu(l,c)}_getMenuActions(c,l){const n=[],g=this._menuService.createMenu(l,this._contextKeyService),w=g.getActions({arg:c.uri});g.dispose();for(const E of w){const[,C]=E;let I=0;for(const _ of C)if(_ instanceof S.SubmenuItemAction){const A=this._getMenuActions(c,_.item.submenu);A.length>0&&(n.push(new b.SubmenuAction(_.id,_.label,A)),I++)}else n.push(_),I++;I&&n.push(new b.Separator)}return n.length&&n.pop(),n}_doShowContextMenu(c,l=null){if(!this._editor.hasModel())return;const n=this._editor.getOption(59);this._editor.updateOptions({hover:{enabled:!1}});let g=l;if(!g){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const E=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),C=t.getDomNodePagePosition(this._editor.getDomNode()),I=C.left+E.left,_=C.top+E.top+E.height;g={x:I,y:_}}const w=this._editor.getOption(125)&&!T.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:w?this._editor.getDomNode():void 0,getAnchor:()=>g,getActions:()=>c,getActionViewItem:E=>{const C=this._keybindingFor(E);if(C)return new y.ActionViewItem(E,E,{label:!0,keybinding:C.getLabel(),isMenu:!0});const I=E;return typeof I.getActionViewItem=="function"?I.getActionViewItem():new y.ActionViewItem(E,E,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:E=>this._keybindingFor(E),onHide:E=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(c){if(!this._editor.hasModel()||(0,s.isStandaloneEditorWorkspace)(this._workspaceContextService.getWorkspace()))return;const l=this._editor.getOption(71);let n=0;const g=_=>({id:`menu-action-${++n}`,label:_.label,tooltip:"",class:void 0,enabled:typeof _.enabled>"u"?!0:_.enabled,checked:_.checked,run:_.run}),w=(_,A)=>new b.SubmenuAction(`menu-action-${++n}`,_,A,void 0),E=(_,A,k,L,R)=>{if(!A)return g({label:_,enabled:A,run:()=>{}});const M=P=>()=>{this._configurationService.updateValue(k,P)},N=[];for(const P of R)N.push(g({label:P.label,checked:L===P.value,run:M(P.value)}));return w(_,N)},C=[];C.push(g({label:m.localize(0,null),checked:l.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!l.enabled)}})),C.push(new b.Separator),C.push(g({label:m.localize(1,null),enabled:l.enabled,checked:l.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!l.renderCharacters)}})),C.push(E(m.localize(2,null),l.enabled,"editor.minimap.size",l.size,[{label:m.localize(3,null),value:"proportional"},{label:m.localize(4,null),value:"fill"},{label:m.localize(5,null),value:"fit"}])),C.push(E(m.localize(6,null),l.enabled,"editor.minimap.showSlider",l.showSlider,[{label:m.localize(7,null),value:"mouseover"},{label:m.localize(8,null),value:"always"}]));const I=this._editor.getOption(125)&&!T.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:I?this._editor.getDomNode():void 0,getAnchor:()=>c,getActions:()=>C,onHide:_=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(c){return this._keybindingService.lookupKeybinding(c.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};e.ContextMenuController=u,e.ContextMenuController=u=o=fe([O(1,a.IContextMenuService),O(2,a.IContextViewService),O(3,h.IContextKeyService),O(4,r.IKeybindingService),O(5,S.IMenuService),O(6,i.IConfigurationService),O(7,s.IWorkspaceContextService)],u);class d extends f.EditorAction{constructor(){super({id:"editor.action.showContextMenu",label:m.localize(9,null),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.textInputFocus,primary:1092,weight:100}})}run(c,l){u.get(l)?.showContextMenu()}}(0,f.registerEditorContribution)(u.ID,u,2),(0,f.registerEditorAction)(d)}),define(Q[1232],Y([1,0,20,365,4,197,22,26,10,74,2379,39]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultPasteProvidersFeature=e.DefaultDropProvidersFeature=void 0;const a=(0,S.localize)(0,null);class r{async provideDocumentPasteEdits(l,n,g,w){const E=await this.getEdit(g,w);return E?{insertText:E.insertText,label:E.label,detail:E.detail,handledMimeType:E.handledMimeType,yieldTo:E.yieldTo}:void 0}async provideDocumentOnDropEdits(l,n,g,w){const E=await this.getEdit(g,w);return E?{insertText:E.insertText,label:E.label,handledMimeType:E.handledMimeType,yieldTo:E.yieldTo}:void 0}}class i extends r{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[D.Mimes.text],this.pasteMimeTypes=[D.Mimes.text]}async getEdit(l,n){const g=l.get(D.Mimes.text);if(!g||l.has(D.Mimes.uriList))return;const w=await g.asString();return{handledMimeType:D.Mimes.text,label:(0,S.localize)(1,null),detail:a,insertText:w}}}class s extends r{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[D.Mimes.uriList],this.pasteMimeTypes=[D.Mimes.uriList]}async getEdit(l,n){const g=await u(l);if(!g.length||n.isCancellationRequested)return;let w=0;const E=g.map(({uri:I,originalText:_})=>I.scheme===T.Schemas.file?I.fsPath:(w++,_)).join(" ");let C;return w>0?C=g.length>1?(0,S.localize)(2,null):(0,S.localize)(3,null):C=g.length>1?(0,S.localize)(4,null):(0,S.localize)(5,null),{handledMimeType:D.Mimes.uriList,insertText:E,label:C,detail:a}}}let o=class extends r{constructor(l){super(),this._workspaceContextService=l,this.id="relativePath",this.dropMimeTypes=[D.Mimes.uriList],this.pasteMimeTypes=[D.Mimes.uriList]}async getEdit(l,n){const g=await u(l);if(!g.length||n.isCancellationRequested)return;const w=(0,t.coalesce)(g.map(({uri:E})=>{const C=this._workspaceContextService.getWorkspaceFolder(E);return C?(0,f.relativePath)(C.uri,E):void 0}));if(w.length)return{handledMimeType:D.Mimes.uriList,insertText:w.join(" "),label:g.length>1?(0,S.localize)(6,null):(0,S.localize)(7,null),detail:a}}};o=fe([O(0,h.IWorkspaceContextService)],o);async function u(c){const l=c.get(D.Mimes.uriList);if(!l)return[];const n=await l.asString(),g=[];for(const w of y.UriList.parse(n))try{g.push({uri:v.URI.parse(w),originalText:w})}catch{}return g}let d=class extends b.Disposable{constructor(l,n){super(),this._register(l.documentOnDropEditProvider.register("*",new i)),this._register(l.documentOnDropEditProvider.register("*",new s)),this._register(l.documentOnDropEditProvider.register("*",new o(n)))}};e.DefaultDropProvidersFeature=d,e.DefaultDropProvidersFeature=d=fe([O(0,m.ILanguageFeaturesService),O(1,h.IWorkspaceContextService)],d);let p=class extends b.Disposable{constructor(l,n){super(),this._register(l.documentPasteEditProvider.register("*",new i)),this._register(l.documentPasteEditProvider.register("*",new s)),this._register(l.documentPasteEditProvider.register("*",new o(n)))}};e.DefaultPasteProvidersFeature=p,e.DefaultPasteProvidersFeature=p=fe([O(0,m.ILanguageFeaturesService),O(1,h.IWorkspaceContextService)],p)}),define(Q[3425],Y([1,0,48,564,1225,1232,2377]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerEditorContribution)(b.CopyPasteController.ID,b.CopyPasteController,0),(0,y.registerEditorFeature)(D.DefaultPasteProvidersFeature),(0,t.registerEditorCommand)(new class extends t.EditorCommand{constructor(){super({id:b.changePasteTypeCommandId,precondition:b.pasteWidgetVisibleCtx,kbOpts:{weight:100,primary:2137}})}runEditorCommand(f,v,m){return b.CopyPasteController.get(v)?.changePasteType()}}),(0,t.registerEditorAction)(class extends t.EditorAction{constructor(){super({id:"editor.action.pasteAs",label:T.localize(0,null),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:T.localize(1,null)}}}}]}})}run(f,v,m){const S=typeof m?.id=="string"?m.id:void 0;return b.CopyPasteController.get(v)?.pasteAs(S)}})}),define(Q[3426],Y([1,0,48,456,564,1232,2380,56,16,893]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerEditorContribution)(m.DropIntoEditorController.ID,m.DropIntoEditorController,2),(0,t.registerEditorCommand)(new class extends t.EditorCommand{constructor(){super({id:m.changeDropTypeCommandId,precondition:m.dropWidgetVisibleCtx,kbOpts:{weight:100,primary:2137}})}runEditorCommand(S,h,a){m.DropIntoEditorController.get(h)?.changeDropType()}}),(0,b.registerEditorFeature)(D.DefaultDropProvidersFeature),v.Registry.as(f.Extensions.Configuration).registerConfiguration({...y.editorConfigurationBaseNode,properties:{[m.defaultProviderConfig]:{type:"object",scope:5,description:T.localize(0,null),default:{},additionalProperties:{type:"string"}}}})}),define(Q[1233],Y([1,0,180,55,26,33,59,125,304,2426,39]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RandomBasedVariableResolver=e.WorkspaceBasedVariableResolver=e.TimeBasedVariableResolver=e.CommentBasedVariableResolver=e.ClipboardBasedVariableResolver=e.ModelBasedVariableResolver=e.SelectionBasedVariableResolver=e.CompositeSnippetVariableResolver=e.KnownSnippetVariableNames=void 0,e.KnownSnippetVariableNames=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class h{constructor(c){this._delegates=c}resolve(c){for(const l of this._delegates){const n=l.resolve(c);if(n!==void 0)return n}}}e.CompositeSnippetVariableResolver=h;class a{constructor(c,l,n,g){this._model=c,this._selection=l,this._selectionIdx=n,this._overtypingCapturer=g}resolve(c){const{name:l}=c;if(l==="SELECTION"||l==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,g=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){const w=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);w&&(n=w.value,g=w.multiline)}if(n&&g&&c.snippet){const w=this._model.getLineContent(this._selection.startLineNumber),E=(0,D.getLeadingWhitespace)(w,0,this._selection.startColumn-1);let C=E;c.snippet.walk(_=>_===c?!1:(_ instanceof v.Text&&(C=(0,D.getLeadingWhitespace)((0,D.splitLines)(_.value).pop())),!0));const I=(0,D.commonPrefixLength)(C,E);n=n.replace(/(\r\n|\r|\n)(.*)/g,(_,A,k)=>`${A}${C.substr(I)}${k}`)}return n}else{if(l==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(l==="TM_CURRENT_WORD"){const n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(l==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(l==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(l==="CURSOR_INDEX")return String(this._selectionIdx);if(l==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}e.SelectionBasedVariableResolver=a;class r{constructor(c,l){this._labelService=c,this._model=l}resolve(c){const{name:l}=c;if(l==="TM_FILENAME")return y.basename(this._model.uri.fsPath);if(l==="TM_FILENAME_BASE"){const n=y.basename(this._model.uri.fsPath),g=n.lastIndexOf(".");return g<=0?n:n.slice(0,g)}else{if(l==="TM_DIRECTORY")return y.dirname(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel((0,b.dirname)(this._model.uri));if(l==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(l==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}e.ModelBasedVariableResolver=r;class i{constructor(c,l,n,g){this._readClipboardText=c,this._selectionIdx=l,this._selectionCount=n,this._spread=g}resolve(c){if(c.name!=="CLIPBOARD")return;const l=this._readClipboardText();if(l){if(this._spread){const n=l.split(/\r\n|\n|\r/).filter(g=>!(0,D.isFalsyOrWhitespace)(g));if(n.length===this._selectionCount)return n[this._selectionIdx]}return l}}}e.ClipboardBasedVariableResolver=i;let s=class{constructor(c,l,n){this._model=c,this._selection=l,this._languageConfigurationService=n}resolve(c){const{name:l}=c,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),g=this._languageConfigurationService.getLanguageConfiguration(n).comments;if(g){if(l==="LINE_COMMENT")return g.lineCommentToken||void 0;if(l==="BLOCK_COMMENT_START")return g.blockCommentStartToken||void 0;if(l==="BLOCK_COMMENT_END")return g.blockCommentEndToken||void 0}}};e.CommentBasedVariableResolver=s,e.CommentBasedVariableResolver=s=fe([O(2,f.ILanguageConfigurationService)],s);class o{constructor(){this._date=new Date}static{this.dayNames=[m.localize(0,null),m.localize(1,null),m.localize(2,null),m.localize(3,null),m.localize(4,null),m.localize(5,null),m.localize(6,null)]}static{this.dayNamesShort=[m.localize(7,null),m.localize(8,null),m.localize(9,null),m.localize(10,null),m.localize(11,null),m.localize(12,null),m.localize(13,null)]}static{this.monthNames=[m.localize(14,null),m.localize(15,null),m.localize(16,null),m.localize(17,null),m.localize(18,null),m.localize(19,null),m.localize(20,null),m.localize(21,null),m.localize(22,null),m.localize(23,null),m.localize(24,null),m.localize(25,null)]}static{this.monthNamesShort=[m.localize(26,null),m.localize(27,null),m.localize(28,null),m.localize(29,null),m.localize(30,null),m.localize(31,null),m.localize(32,null),m.localize(33,null),m.localize(34,null),m.localize(35,null),m.localize(36,null),m.localize(37,null)]}resolve(c){const{name:l}=c;if(l==="CURRENT_YEAR")return String(this._date.getFullYear());if(l==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(l==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(l==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(l==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(l==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(l==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(l==="CURRENT_DAY_NAME")return o.dayNames[this._date.getDay()];if(l==="CURRENT_DAY_NAME_SHORT")return o.dayNamesShort[this._date.getDay()];if(l==="CURRENT_MONTH_NAME")return o.monthNames[this._date.getMonth()];if(l==="CURRENT_MONTH_NAME_SHORT")return o.monthNamesShort[this._date.getMonth()];if(l==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(l==="CURRENT_TIMEZONE_OFFSET"){const n=this._date.getTimezoneOffset(),g=n>0?"-":"+",w=Math.trunc(Math.abs(n/60)),E=w<10?"0"+w:w,C=Math.abs(n)-w*60,I=C<10?"0"+C:C;return g+E+":"+I}}}e.TimeBasedVariableResolver=o;class u{constructor(c){this._workspaceService=c}resolve(c){if(!this._workspaceService)return;const l=(0,S.toWorkspaceIdentifier)(this._workspaceService.getWorkspace());if(!(0,S.isEmptyWorkspaceIdentifier)(l)){if(c.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(l);if(c.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(l)}}_resolveWorkspaceName(c){if((0,S.isSingleFolderWorkspaceIdentifier)(c))return y.basename(c.uri.path);let l=y.basename(c.configPath.path);return l.endsWith(S.WORKSPACE_EXTENSION)&&(l=l.substr(0,l.length-S.WORKSPACE_EXTENSION.length-1)),l}_resoveWorkspacePath(c){if((0,S.isSingleFolderWorkspaceIdentifier)(c))return(0,t.normalizeDriveLetter)(c.uri.fsPath);const l=y.basename(c.configPath.path);let n=c.configPath.fsPath;return n.endsWith(l)&&(n=n.substr(0,n.length-l.length-1)),n?(0,t.normalizeDriveLetter)(n):"/"}}e.WorkspaceBasedVariableResolver=u;class d{resolve(c){const{name:l}=c;if(l==="RANDOM")return Math.random().toString().slice(-6);if(l==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(l==="UUID")return(0,T.generateUuid)()}}e.RandomBasedVariableResolver=d}),define(Q[1234],Y([1,0,20,4,33,165,27,96,125,98,61,39,304,1233,1744]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetSession=e.OneSnippet=void 0;class s{static{this._decor={active:m.ModelDecorationOptions.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:m.ModelDecorationOptions.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:m.ModelDecorationOptions.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:m.ModelDecorationOptions.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})}}constructor(p,c,l){this._editor=p,this._snippet=c,this._snippetLineLeadingWhitespace=l,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,t.groupBy)(c.placeholders,a.Placeholder.compareByIndex),this._placeholderGroupsIdx=-1}initialize(p){this._offset=p.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const p=this._editor.getModel();this._editor.changeDecorations(c=>{for(const l of this._snippet.placeholders){const n=this._snippet.offset(l),g=this._snippet.fullLen(l),w=T.Range.fromPositions(p.getPositionAt(this._offset+n),p.getPositionAt(this._offset+n+g)),E=l.isFinalTabstop?s._decor.inactiveFinal:s._decor.inactive,C=c.addDecoration(w,E);this._placeholderDecorations.set(l,C)}})}move(p){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const n=[];for(const g of this._placeholderGroups[this._placeholderGroupsIdx])if(g.transform){const w=this._placeholderDecorations.get(g),E=this._editor.getModel().getDecorationRange(w),C=this._editor.getModel().getValueInRange(E),I=g.transform.resolve(C).split(/\r\n|\r|\n/);for(let _=1;_<I.length;_++)I[_]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+I[_]);n.push(D.EditOperation.replace(E,I.join(this._editor.getModel().getEOL())))}n.length>0&&this._editor.executeEdits("snippet.placeholderTransform",n)}let c=!1;p===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,c=!0):p===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,c=!0);const l=this._editor.getModel().changeDecorations(n=>{const g=new Set,w=[];for(const E of this._placeholderGroups[this._placeholderGroupsIdx]){const C=this._placeholderDecorations.get(E),I=this._editor.getModel().getDecorationRange(C);w.push(new f.Selection(I.startLineNumber,I.startColumn,I.endLineNumber,I.endColumn)),c=c&&this._hasPlaceholderBeenCollapsed(E),n.changeDecorationOptions(C,E.isFinalTabstop?s._decor.activeFinal:s._decor.active),g.add(E);for(const _ of this._snippet.enclosingPlaceholders(E)){const A=this._placeholderDecorations.get(_);n.changeDecorationOptions(A,_.isFinalTabstop?s._decor.activeFinal:s._decor.active),g.add(_)}}for(const[E,C]of this._placeholderDecorations)g.has(E)||n.changeDecorationOptions(C,E.isFinalTabstop?s._decor.inactiveFinal:s._decor.inactive);return w});return c?this.move(p):l??[]}_hasPlaceholderBeenCollapsed(p){let c=p;for(;c;){if(c instanceof a.Placeholder){const l=this._placeholderDecorations.get(c);if(this._editor.getModel().getDecorationRange(l).isEmpty()&&c.toString().length>0)return!0}c=c.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){const[p]=this._snippet.placeholders;if(p.isFinalTabstop&&this._snippet.rightMostDescendant===p)return!0}return!1}computePossibleSelections(){const p=new Map;for(const c of this._placeholderGroups){let l;for(const n of c){if(n.isFinalTabstop)break;l||(l=[],p.set(n.index,l));const g=this._placeholderDecorations.get(n),w=this._editor.getModel().getDecorationRange(g);if(!w){p.delete(n.index);break}l.push(w)}}return p}get activeChoice(){if(!this._placeholderDecorations)return;const p=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!p?.choice)return;const c=this._placeholderDecorations.get(p);if(!c)return;const l=this._editor.getModel().getDecorationRange(c);if(l)return{range:l,choice:p.choice}}get hasChoice(){let p=!1;return this._snippet.walk(c=>(p=c instanceof a.Choice,!p)),p}merge(p){const c=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(l=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const g=p.shift();console.assert(g._offset!==-1),console.assert(!g._placeholderDecorations);const w=g._snippet.placeholderInfo.last.index;for(const C of g._snippet.placeholderInfo.all)C.isFinalTabstop?C.index=n.index+(w+1)/this._nestingLevel:C.index=n.index+C.index/this._nestingLevel;this._snippet.replace(n,g._snippet.children);const E=this._placeholderDecorations.get(n);l.removeDecoration(E),this._placeholderDecorations.delete(n);for(const C of g._snippet.placeholders){const I=g._snippet.offset(C),_=g._snippet.fullLen(C),A=T.Range.fromPositions(c.getPositionAt(g._offset+I),c.getPositionAt(g._offset+I+_)),k=l.addDecoration(A,s._decor.inactive);this._placeholderDecorations.set(C,k)}}this._placeholderGroups=(0,t.groupBy)(this._snippet.placeholders,a.Placeholder.compareByIndex)})}getEnclosingRange(){let p;const c=this._editor.getModel();for(const l of this._placeholderDecorations.values()){const n=c.getDecorationRange(l)??void 0;p?p=p.plusRange(n):p=n}return p}}e.OneSnippet=s;const o={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let u=i=class{static adjustWhitespace(p,c,l,n,g){const w=p.getLineContent(c.lineNumber),E=(0,b.getLeadingWhitespace)(w,0,c.column-1);let C;return n.walk(I=>{if(!(I instanceof a.Text)||I.parent instanceof a.Choice||g&&!g.has(I))return!0;const _=I.value.split(/\r\n|\r|\n/);if(l){const k=n.offset(I);if(k===0)_[0]=p.normalizeIndentation(_[0]);else{C=C??n.toString();const L=C.charCodeAt(k-1);(L===10||L===13)&&(_[0]=p.normalizeIndentation(E+_[0]))}for(let L=1;L<_.length;L++)_[L]=p.normalizeIndentation(E+_[L])}const A=_.join(p.getEOL());return A!==I.value&&(I.parent.replace(I,[new a.Text(A)]),C=void 0),!0}),E}static adjustSelection(p,c,l,n){if(l!==0||n!==0){const{positionLineNumber:g,positionColumn:w}=c,E=w-l,C=w+n,I=p.validateRange({startLineNumber:g,startColumn:E,endLineNumber:g,endColumn:C});c=f.Selection.createWithDirection(I.startLineNumber,I.startColumn,I.endLineNumber,I.endColumn,c.getDirection())}return c}static createEditsAndSnippetsFromSelections(p,c,l,n,g,w,E,C,I){const _=[],A=[];if(!p.hasModel())return{edits:_,snippets:A};const k=p.getModel(),L=p.invokeWithinContext(V=>V.get(h.IWorkspaceContextService)),R=p.invokeWithinContext(V=>new r.ModelBasedVariableResolver(V.get(S.ILabelService),k)),M=()=>E,N=k.getValueInRange(i.adjustSelection(k,p.getSelection(),l,0)),P=k.getValueInRange(i.adjustSelection(k,p.getSelection(),0,n)),x=k.getLineFirstNonWhitespaceColumn(p.getSelection().positionLineNumber),F=p.getSelections().map((V,W)=>({selection:V,idx:W})).sort((V,W)=>T.Range.compareRangesUsingStarts(V.selection,W.selection));for(const{selection:V,idx:W}of F){let z=i.adjustSelection(k,V,l,0),B=i.adjustSelection(k,V,0,n);N!==k.getValueInRange(z)&&(z=V),P!==k.getValueInRange(B)&&(B=V);const K=V.setStartPosition(z.startLineNumber,z.startColumn).setEndPosition(B.endLineNumber,B.endColumn),H=new a.SnippetParser().parse(c,!0,g),U=K.getStartPosition(),G=i.adjustWhitespace(k,U,w||W>0&&x!==k.getLineFirstNonWhitespaceColumn(V.positionLineNumber),H);H.resolveVariables(new r.CompositeSnippetVariableResolver([R,new r.ClipboardBasedVariableResolver(M,W,F.length,p.getOption(77)==="spread"),new r.SelectionBasedVariableResolver(k,V,W,C),new r.CommentBasedVariableResolver(k,V,I),new r.TimeBasedVariableResolver,new r.WorkspaceBasedVariableResolver(L),new r.RandomBasedVariableResolver])),_[W]=D.EditOperation.replace(K,H.toString()),_[W].identifier={major:W,minor:0},_[W]._isTracked=!0,A[W]=new s(p,H,G)}return{edits:_,snippets:A}}static createEditsAndSnippetsFromEdits(p,c,l,n,g,w,E){if(!p.hasModel()||c.length===0)return{edits:[],snippets:[]};const C=[],I=p.getModel(),_=new a.SnippetParser,A=new a.TextmateSnippet,k=new r.CompositeSnippetVariableResolver([p.invokeWithinContext(R=>new r.ModelBasedVariableResolver(R.get(S.ILabelService),I)),new r.ClipboardBasedVariableResolver(()=>g,0,p.getSelections().length,p.getOption(77)==="spread"),new r.SelectionBasedVariableResolver(I,p.getSelection(),0,w),new r.CommentBasedVariableResolver(I,p.getSelection(),E),new r.TimeBasedVariableResolver,new r.WorkspaceBasedVariableResolver(p.invokeWithinContext(R=>R.get(h.IWorkspaceContextService))),new r.RandomBasedVariableResolver]);c=c.sort((R,M)=>T.Range.compareRangesUsingStarts(R.range,M.range));let L=0;for(let R=0;R<c.length;R++){const{range:M,template:N}=c[R];if(R>0){const W=c[R-1].range,z=T.Range.fromPositions(W.getEndPosition(),M.getStartPosition()),B=new a.Text(I.getValueInRange(z));A.appendChild(B),L+=B.value.length}const P=_.parseFragment(N,A);i.adjustWhitespace(I,M.getStartPosition(),!0,A,new Set(P)),A.resolveVariables(k);const x=A.toString(),F=x.slice(L);L=x.length;const V=D.EditOperation.replace(M,F);V.identifier={major:R,minor:0},V._isTracked=!0,C.push(V)}return _.ensureFinalTabstop(A,l,!0),{edits:C,snippets:[new s(p,A,"")]}}constructor(p,c,l=o,n){this._editor=p,this._template=c,this._options=l,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){(0,y.dispose)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:p,snippets:c}=typeof this._template=="string"?i.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):i.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=c,this._editor.executeEdits("snippet",p,l=>{const n=l.filter(g=>!!g.identifier);for(let g=0;g<c.length;g++)c[g].initialize(n[g].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):n.map(g=>f.Selection.fromPositions(g.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(p,c=o){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,p]);const{edits:l,snippets:n}=i.createEditsAndSnippetsFromSelections(this._editor,p,c.overwriteBefore,c.overwriteAfter,!0,c.adjustWhitespace,c.clipboardText,c.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",l,g=>{const w=g.filter(C=>!!C.identifier);for(let C=0;C<n.length;C++)n[C].initialize(w[C].textChange);const E=n[0].isTrivialSnippet;if(!E){for(const C of this._snippets)C.merge(n);console.assert(n.length===0)}return this._snippets[0].hasPlaceholder&&!E?this._move(void 0):w.map(C=>f.Selection.fromPositions(C.range.getEndPosition()))})}next(){const p=this._move(!0);this._editor.setSelections(p),this._editor.revealPositionInCenterIfOutsideViewport(p[0].getPosition())}prev(){const p=this._move(!1);this._editor.setSelections(p),this._editor.revealPositionInCenterIfOutsideViewport(p[0].getPosition())}_move(p){const c=[];for(const l of this._snippets){const n=l.move(p);c.push(...n)}return c}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const p=this._editor.getSelections();if(p.length<this._snippets.length)return!1;const c=new Map;for(const l of this._snippets){const n=l.computePossibleSelections();if(c.size===0)for(const[g,w]of n){w.sort(T.Range.compareRangesUsingStarts);for(const E of p)if(w[0].containsRange(E)){c.set(g,[]);break}}if(c.size===0)return!1;c.forEach((g,w)=>{g.push(...n.get(w))})}p.sort(T.Range.compareRangesUsingStarts);for(const[l,n]of c){if(n.length!==p.length){c.delete(l);continue}n.sort(T.Range.compareRangesUsingStarts);for(let g=0;g<n.length;g++)if(!n[g].containsRange(p[g])){c.delete(l);continue}}return c.size>0}getEnclosingRange(){let p;for(const c of this._snippets){const l=c.getEnclosingRange();p?p=p.plusRange(l):p=l}return p}};e.SnippetSession=u,e.SnippetSession=u=i=fe([O(3,v.ILanguageConfigurationService)],u)}),define(Q[210],Y([1,0,4,17,48,51,73,125,74,329,2425,8,11,1234]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetController2=void 0;const s={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let o=class{static{i=this}static{this.ID="snippetController2"}static get(p){return p.getContribution(i.ID)}static{this.InSnippetMode=new h.RawContextKey("inSnippetMode",!1,(0,S.localize)(0,null))}static{this.HasNextTabstop=new h.RawContextKey("hasNextTabstop",!1,(0,S.localize)(1,null))}static{this.HasPrevTabstop=new h.RawContextKey("hasPrevTabstop",!1,(0,S.localize)(2,null))}constructor(p,c,l,n,g){this._editor=p,this._logService=c,this._languageFeaturesService=l,this._languageConfigurationService=g,this._snippetListener=new t.DisposableStore,this._modelVersionId=-1,this._inSnippet=i.InSnippetMode.bindTo(n),this._hasNextTabstop=i.HasNextTabstop.bindTo(n),this._hasPrevTabstop=i.HasPrevTabstop.bindTo(n)}dispose(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._session?.dispose(),this._snippetListener.dispose()}apply(p,c){try{this._doInsert(p,typeof c>"u"?s:{...s,...c})}catch(l){this.cancel(),this._logService.error(l),this._logService.error("snippet_error"),this._logService.error("insert_edits=",p),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}insert(p,c){try{this._doInsert(p,typeof c>"u"?s:{...s,...c})}catch(l){this.cancel(),this._logService.error(l),this._logService.error("snippet_error"),this._logService.error("insert_template=",p),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(p,c){if(this._editor.hasModel()){if(this._snippetListener.clear(),c.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof p!="string"&&this.cancel(),this._session?((0,y.assertType)(typeof p=="string"),this._session.merge(p,c)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new r.SnippetSession(this._editor,p,c,this._languageConfigurationService),this._session.insert()),c.undoStopAfter&&this._editor.getModel().pushStackElement(),this._session?.hasChoice){const l={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(I,_)=>{if(!this._session||I!==this._editor.getModel()||!D.Position.equals(this._editor.getPosition(),_))return;const{activeChoice:A}=this._session;if(!A||A.choice.options.length===0)return;const k=I.getValueInRange(A.range),L=!!A.choice.options.find(M=>M.value===k),R=[];for(let M=0;M<A.choice.options.length;M++){const N=A.choice.options[M];R.push({kind:13,label:N.value,insertText:N.value,sortText:"a".repeat(M+1),range:A.range,filterText:L?`${k}_${N.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:(0,S.localize)(3,null)}})}return{suggestions:R}}},n=this._editor.getModel();let g,w=!1;const E=()=>{g?.dispose(),w=!1},C=()=>{w||(g=this._languageFeaturesService.completionProvider.register({language:n.getLanguageId(),pattern:n.uri.fsPath,scheme:n.uri.scheme,exclusive:!0},l),this._snippetListener.add(g),w=!0)};this._choiceCompletions={provider:l,enable:C,disable:E}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(l=>l.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{activeChoice:p}=this._session;if(!p||!this._choiceCompletions){this._choiceCompletions?.disable(),this._currentChoice=void 0;return}this._currentChoice!==p.choice&&(this._currentChoice=p.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{(0,m.showSimpleSuggestions)(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(p=!1){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,this._session?.dispose(),this._session=void 0,this._modelVersionId=-1,p&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session?.prev(),this._updateState()}next(){this._session?.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}getSessionEnclosingRange(){if(this._session)return this._session.getEnclosingRange()}};e.SnippetController2=o,e.SnippetController2=o=i=fe([O(1,a.ILogService),O(2,v.ILanguageFeaturesService),O(3,h.IContextKeyService),O(4,f.ILanguageConfigurationService)],o),(0,b.registerEditorContribution)(o.ID,o,4);const u=b.EditorCommand.bindToContribution(o.get);(0,b.registerEditorCommand)(new u({id:"jumpToNextSnippetPlaceholder",precondition:h.ContextKeyExpr.and(o.InSnippetMode,o.HasNextTabstop),handler:d=>d.next(),kbOpts:{weight:100+30,kbExpr:T.EditorContextKeys.editorTextFocus,primary:2}})),(0,b.registerEditorCommand)(new u({id:"jumpToPrevSnippetPlaceholder",precondition:h.ContextKeyExpr.and(o.InSnippetMode,o.HasPrevTabstop),handler:d=>d.prev(),kbOpts:{weight:100+30,kbExpr:T.EditorContextKeys.editorTextFocus,primary:1026}})),(0,b.registerEditorCommand)(new u({id:"leaveSnippet",precondition:o.InSnippetMode,handler:d=>d.cancel(!0),kbOpts:{weight:100+30,kbExpr:T.EditorContextKeys.editorTextFocus,primary:9,secondary:[1033]}})),(0,b.registerEditorCommand)(new u({id:"acceptSnippet",precondition:o.InSnippetMode,handler:d=>d.finish()}))}),define(Q[3427],Y([1,0,20,15,4,109,17,165,51,27,99,125,810,3251,568,210,28,5]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsModel=e.VersionIdChangeReason=void 0;var d;(function(c){c[c.Undo=0]="Undo",c[c.Redo=1]="Redo",c[c.AcceptWord=2]="AcceptWord",c[c.Other=3]="Other"})(d||(e.VersionIdChangeReason=d={}));let p=class extends b.Disposable{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(l,n,g,w,E,C,I,_,A,k,L,R){super(),this.textModel=l,this.selectedSuggestItem=n,this.cursorPosition=g,this.textModelVersionId=w,this._debounceValue=E,this._suggestPreviewEnabled=C,this._suggestPreviewMode=I,this._inlineSuggestMode=_,this._enabled=A,this._instantiationService=k,this._commandService=L,this._languageConfigurationService=R,this._source=this._register(this._instantiationService.createInstance(r.InlineCompletionsSource,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=(0,D.observableValue)("isActive",!1),this._forceUpdate=(0,D.observableSignal)("forceUpdate"),this._selectedInlineCompletionId=(0,D.observableValue)("selectedInlineCompletionId",void 0),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([d.Redo,d.Undo,d.AcceptWord]),this._fetchInlineCompletions=(0,D.derivedHandleChanges)("fetch inline completions",{createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:S.InlineCompletionTriggerKind.Automatic}),handleChange:(N,P)=>(N.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(N.change)?P.preserveCurrentCompletion=!0:N.didChange(this._forceUpdate)&&(P.inlineCompletionTriggerKind=N.change),!0)},(N,P)=>{if(this._forceUpdate.read(N),!(this._enabled.read(N)&&this.selectedSuggestItem.read(N)||this._isActive.read(N))){this._source.cancelUpdate();return}this.textModelVersionId.read(N);const F=this.selectedInlineCompletion.get(),V=P.preserveCurrentCompletion||F?.forwardStable?F:void 0,W=this._source.suggestWidgetInlineCompletions.get(),z=this.selectedSuggestItem.read(N);if(W&&!z){const H=this._source.inlineCompletions.get();(0,D.transaction)(U=>{H&&W.request.versionId>H.request.versionId&&this._source.inlineCompletions.set(W.clone(),U),this._source.clearSuggestWidgetInlineCompletions(U)})}const B=this.cursorPosition.read(N),K={triggerKind:P.inlineCompletionTriggerKind,selectedSuggestionInfo:z?.toSelectedSuggestionInfo()};return this._source.fetch(B,K,V)}),this._filteredInlineCompletionItems=(0,D.derived)(N=>{const P=this._source.inlineCompletions.read(N);if(!P)return[];const x=this.cursorPosition.read(N);return P.inlineCompletions.filter(V=>V.isVisible(this.textModel,x,N))}),this.selectedInlineCompletionIndex=(0,D.derived)(N=>{const P=this._selectedInlineCompletionId.read(N),x=this._filteredInlineCompletionItems.read(N),F=this._selectedInlineCompletionId===void 0?-1:x.findIndex(V=>V.semanticId===P);return F===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):F}),this.selectedInlineCompletion=(0,D.derived)(N=>{const P=this._filteredInlineCompletionItems.read(N),x=this.selectedInlineCompletionIndex.read(N);return P[x]}),this.lastTriggerKind=this._source.inlineCompletions.map(N=>N?.request.context.triggerKind),this.inlineCompletionsCount=(0,D.derived)(N=>{if(this.lastTriggerKind.read(N)===S.InlineCompletionTriggerKind.Explicit)return this._filteredInlineCompletionItems.read(N).length}),this.state=(0,D.derivedOpts)({equalityComparer:(N,P)=>!N||!P?N===P:(0,a.ghostTextOrReplacementEquals)(N.ghostText,P.ghostText)&&N.inlineCompletion===P.inlineCompletion&&N.suggestItem===P.suggestItem},N=>{const P=this.textModel,x=this.selectedSuggestItem.read(N);if(x){const F=x.toSingleTextEdit().removeCommonPrefix(P),V=this._computeAugmentedCompletion(F,N);if(!this._suggestPreviewEnabled.read(N)&&!V)return;const z=V?.edit??F,B=V?V.edit.text.length-F.text.length:0,K=this._suggestPreviewMode.read(N),H=this.cursorPosition.read(N);return{ghostText:z.computeGhostText(P,K,H,B)??new a.GhostText(z.range.endLineNumber,[]),inlineCompletion:V?.completion,suggestItem:x}}else{if(!this._isActive.read(N))return;const F=this.selectedInlineCompletion.read(N);if(!F)return;const V=F.toSingleTextEdit(N),W=this._inlineSuggestMode.read(N),z=this.cursorPosition.read(N),B=V.computeGhostText(P,W,z);return B?{ghostText:B,inlineCompletion:F,suggestItem:void 0}:void 0}}),this.ghostText=(0,D.derivedOpts)({equalityComparer:a.ghostTextOrReplacementEquals},N=>{const P=this.state.read(N);if(P)return P.ghostText}),this._register((0,D.keepAlive)(this._fetchInlineCompletions,!0));let M;this._register((0,D.autorun)(N=>{const x=this.state.read(N)?.inlineCompletion;if(x?.semanticId!==M?.semanticId&&(M=x,x)){const F=x.inlineCompletion,V=F.source;V.provider.handleItemDidShow?.(V.inlineCompletions,F.sourceInlineCompletion,F.insertText)}}))}async trigger(l){this._isActive.set(!0,l),await this._fetchInlineCompletions.get()}async triggerExplicitly(l){(0,D.subtransaction)(l,n=>{this._isActive.set(!0,n),this._forceUpdate.trigger(n,S.InlineCompletionTriggerKind.Explicit)}),await this._fetchInlineCompletions.get()}stop(l){(0,D.subtransaction)(l,n=>{this._isActive.set(!1,n),this._source.clear(n)})}_computeAugmentedCompletion(l,n){const g=this.textModel,w=this._source.suggestWidgetInlineCompletions.read(n),E=w?w.inlineCompletions:[this.selectedInlineCompletion.read(n)].filter(T.isDefined);return(0,t.mapFind)(E,I=>{let _=I.toSingleTextEdit(n);return _=_.removeCommonPrefix(g,m.Range.fromPositions(_.range.getStartPosition(),l.range.getEndPosition())),_.augments(l)?{edit:_,completion:I}:void 0})}async _deltaSelectedInlineCompletionIndex(l){await this.triggerExplicitly();const n=this._filteredInlineCompletionItems.get()||[];if(n.length>0){const g=(this.selectedInlineCompletionIndex.get()+l+n.length)%n.length;this._selectedInlineCompletionId.set(n[g].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(l){if(l.getModel()!==this.textModel)throw new y.BugIndicatingError;const n=this.state.get();if(!n||n.ghostText.isEmpty()||!n.inlineCompletion)return;const g=n.inlineCompletion.toInlineCompletion(void 0);l.pushUndoStop(),g.snippetInfo?(l.executeEdits("inlineSuggestion.accept",[f.EditOperation.replaceMove(g.range,""),...g.additionalTextEdits]),l.setPosition(g.snippetInfo.range.getStartPosition()),s.SnippetController2.get(l)?.insert(g.snippetInfo.snippet,{undoStopBefore:!1})):l.executeEdits("inlineSuggestion.accept",[f.EditOperation.replaceMove(g.range,g.insertText),...g.additionalTextEdits]),g.command&&g.source.addRef(),(0,D.transaction)(w=>{this._source.clear(w),this._isActive.set(!1,w)}),g.command&&(await this._commandService.executeCommand(g.command.id,...g.command.arguments||[]).then(void 0,y.onUnexpectedExternalError),g.source.removeRef())}async acceptNextWord(l){await this._acceptNext(l,(n,g)=>{const w=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column),E=this._languageConfigurationService.getLanguageConfiguration(w),C=new RegExp(E.wordDefinition.source,E.wordDefinition.flags.replace("g","")),I=g.match(C);let _=0;I&&I.index!==void 0?I.index===0?_=I[0].length:_=I.index:_=g.length;const k=/\s+/g.exec(g);return k&&k.index!==void 0&&k.index+k[0].length<_&&(_=k.index+k[0].length),_})}async acceptNextLine(l){await this._acceptNext(l,(n,g)=>{const w=g.match(/\n/);return w&&w.index!==void 0?w.index+1:g.length})}async _acceptNext(l,n){if(l.getModel()!==this.textModel)throw new y.BugIndicatingError;const g=this.state.get();if(!g||g.ghostText.isEmpty()||!g.inlineCompletion)return;const w=g.ghostText,E=g.inlineCompletion.toInlineCompletion(void 0);if(E.snippetInfo||E.filterText!==E.insertText){await this.accept(l);return}const C=w.parts[0],I=new v.Position(w.lineNumber,C.column),_=C.lines.join(` `),A=n(I,_);if(A===_.length&&w.parts.length===1){this.accept(l);return}const k=_.substring(0,A);this._isAcceptingPartially=!0;try{l.pushUndoStop(),l.executeEdits("inlineSuggestion.accept",[f.EditOperation.replace(m.Range.fromPositions(I),k)]);const L=(0,i.lengthOfText)(k);l.setPosition((0,i.addPositions)(I,L))}finally{this._isAcceptingPartially=!1}if(E.source.provider.handlePartialAccept){const L=m.Range.fromPositions(E.range.getStartPosition(),(0,i.addPositions)(I,(0,i.lengthOfText)(k))),R=l.getModel().getValueInRange(L,1);E.source.provider.handlePartialAccept(E.source.inlineCompletions,E.sourceInlineCompletion,R.length)}}handleSuggestAccepted(l){const n=l.toSingleTextEdit().removeCommonPrefix(this.textModel),g=this._computeAugmentedCompletion(n,void 0);if(!g)return;const w=g.completion.inlineCompletion;w.source.provider.handlePartialAccept?.(w.source.inlineCompletions,w.sourceInlineCompletion,n.text.length)}};e.InlineCompletionsModel=p,e.InlineCompletionsModel=p=fe([O(9,u.IInstantiationService),O(10,o.ICommandService),O(11,h.ILanguageConfigurationService)],p)}),define(Q[3428],Y([1,0,14,31,15,6,4,33,96,242,1094,68,9,8,11,30,1093,329,74,128,17,689,210,91]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";var w;Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestModel=e.State=e.LineContext=void 0;class E{static shouldAutoTrigger(L){if(!L.hasModel())return!1;const R=L.getModel(),M=L.getPosition();R.tokenization.tokenizeIfCheap(M.lineNumber);const N=R.getWordAtPosition(M);return!(!N||N.endColumn!==M.column&&N.startColumn+1!==M.column||!isNaN(Number(N.word)))}constructor(L,R,M){this.leadingLineContent=L.getLineContent(R.lineNumber).substr(0,R.column-1),this.leadingWord=L.getWordUntilPosition(R),this.lineNumber=R.lineNumber,this.column=R.column,this.triggerOptions=M}}e.LineContext=E;var C;(function(k){k[k.Idle=0]="Idle",k[k.Manual=1]="Manual",k[k.Auto=2]="Auto"})(C||(e.State=C={}));function I(k,L,R){if(!L.getContextKeyValue(l.InlineCompletionContextKeys.inlineSuggestionVisible.key))return!0;const M=L.getContextKeyValue(l.InlineCompletionContextKeys.suppressSuggestions.key);return M!==void 0?!M:!k.getOption(61).suppressSuggestions}function _(k,L,R){if(!L.getContextKeyValue("inlineSuggestionVisible"))return!0;const M=L.getContextKeyValue(l.InlineCompletionContextKeys.suppressSuggestions.key);return M!==void 0?!M:!k.getOption(61).suppressSuggestions}let A=w=class{constructor(L,R,M,N,P,x,F,V,W){this._editor=L,this._editorWorkerService=R,this._clipboardService=M,this._telemetryService=N,this._logService=P,this._contextKeyService=x,this._configurationService=F,this._languageFeaturesService=V,this._envService=W,this._toDispose=new T.DisposableStore,this._triggerCharacterListener=new T.DisposableStore,this._triggerQuickSuggest=new t.TimeoutTimer,this._triggerState=void 0,this._completionDisposables=new T.DisposableStore,this._onDidCancel=new D.Emitter,this._onDidTrigger=new D.Emitter,this._onDidSuggest=new D.Emitter,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new v.Selection(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let z=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{z=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{z=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(B=>{z||this._onCursorChange(B)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!z&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){(0,T.dispose)(this._triggerCharacterListener),(0,T.dispose)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(89)||!this._editor.hasModel()||!this._editor.getOption(119))return;const L=new Map;for(const M of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const N of M.triggerCharacters||[]){let P=L.get(N);P||(P=new Set,P.add((0,u.getSnippetSuggestSupport)()),L.set(N,P)),P.add(M)}const R=M=>{if(!_(this._editor,this._contextKeyService,this._configurationService))return;if(!M){const x=this._editor.getPosition();M=this._editor.getModel().getLineContent(x.lineNumber).substr(0,x.column-1)}let N="";(0,f.isLowSurrogate)(M.charCodeAt(M.length-1))?(0,f.isHighSurrogate)(M.charCodeAt(M.length-2))&&(N=M.substr(M.length-2)):N=M.charAt(M.length-1);const P=L.get(N);if(P){const x=new Map;if(this._completionModel)for(const[F,V]of this._completionModel.getItemsByProvider())P.has(F)||x.set(F,V);this.trigger({auto:!0,triggerKind:1,triggerCharacter:N,retrigger:!!this._completionModel,clipboardText:this._completionModel?.clipboardText,completionOptions:{providerFilter:P,providerItemsToReuse:x}})}};this._triggerCharacterListener.add(this._editor.onDidType(R)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>R()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(L=!1){this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),this._requestToken?.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:L}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(L){if(!this._editor.hasModel())return;const R=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!L.selection.isEmpty()||L.reason!==0&&L.reason!==3||L.source!=="keyboard"&&L.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&L.reason===0?(R.containsRange(this._currentSelection)||R.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&L.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){u.QuickSuggestionsOptions.isAllOff(this._editor.getOption(87))||this._editor.getOption(116).snippetsPreventQuickSuggestions&&n.SnippetController2.get(this._editor)?.isInSnippet()||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!E.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const L=this._editor.getModel(),R=this._editor.getPosition(),M=this._editor.getOption(87);if(!u.QuickSuggestionsOptions.isAllOff(M)){if(!u.QuickSuggestionsOptions.isAllOn(M)){L.tokenization.tokenizeIfCheap(R.lineNumber);const N=L.tokenization.getLineTokens(R.lineNumber),P=N.getStandardTokenType(N.findTokenIndexAtOffset(Math.max(R.column-1-1,0)));if(u.QuickSuggestionsOptions.valueFor(M,P)!=="on")return}I(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(L)&&this.trigger({auto:!0})}},this._editor.getOption(88)))}_refilterCompletionItems(){(0,c.assertType)(this._editor.hasModel()),(0,c.assertType)(this._triggerState!==void 0);const L=this._editor.getModel(),R=this._editor.getPosition(),M=new E(L,R,{...this._triggerState,refilter:!0});this._onNewContext(M)}trigger(L){if(!this._editor.hasModel())return;const R=this._editor.getModel(),M=new E(R,this._editor.getPosition(),L);this.cancel(L.retrigger),this._triggerState=L,this._onDidTrigger.fire({auto:L.auto,shy:L.shy??!1,position:this._editor.getPosition()}),this._context=M;let N={triggerKind:L.triggerKind??0};L.triggerCharacter&&(N={triggerKind:1,triggerCharacter:L.triggerCharacter}),this._requestToken=new y.CancellationTokenSource;const P=this._editor.getOption(110);let x=1;switch(P){case"top":x=0;break;case"bottom":x=2;break}const{itemKind:F,showDeprecated:V}=w._createSuggestFilter(this._editor),W=new u.CompletionOptions(x,L.completionOptions?.kindFilter??F,L.completionOptions?.providerFilter,L.completionOptions?.providerItemsToReuse,V),z=S.WordDistance.create(this._editorWorkerService,this._editor),B=(0,u.provideSuggestionItems)(this._languageFeaturesService.completionProvider,R,this._editor.getPosition(),W,N,this._requestToken.token);Promise.all([B,z]).then(async([K,H])=>{if(this._requestToken?.dispose(),!this._editor.hasModel())return;let U=L?.clipboardText;if(!U&&K.needsClipboard&&(U=await this._clipboardService.readText()),this._triggerState===void 0)return;const G=this._editor.getModel(),$=new E(G,this._editor.getPosition(),L),ie={...p.FuzzyScoreOptions.default,firstMatchCanBeWeak:!this._editor.getOption(116).matchOnWordStartOnly};if(this._completionModel=new o.CompletionModel(K.items,this._context.column,{leadingLineContent:$.leadingLineContent,characterCountDelta:$.column-this._context.column},H,this._editor.getOption(116),this._editor.getOption(110),ie,U),this._completionDisposables.add(K.disposable),this._onNewContext($),this._reportDurationsTelemetry(K.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const J of K.items)J.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${J.provider._debugDisplayName}`,J.completion)}).catch(b.onUnexpectedError)}_reportDurationsTelemetry(L){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(L)}),this._logService.debug("suggest.durations.json",L)})}static _createSuggestFilter(L){const R=new Set;L.getOption(110)==="none"&&R.add(27);const N=L.getOption(116);return N.showMethods||R.add(0),N.showFunctions||R.add(1),N.showConstructors||R.add(2),N.showFields||R.add(3),N.showVariables||R.add(4),N.showClasses||R.add(5),N.showStructs||R.add(6),N.showInterfaces||R.add(7),N.showModules||R.add(8),N.showProperties||R.add(9),N.showEvents||R.add(10),N.showOperators||R.add(11),N.showUnits||R.add(12),N.showValues||R.add(13),N.showConstants||R.add(14),N.showEnums||R.add(15),N.showEnumMembers||R.add(16),N.showKeywords||R.add(17),N.showWords||R.add(18),N.showColors||R.add(19),N.showFiles||R.add(20),N.showReferences||R.add(21),N.showColors||R.add(22),N.showFolders||R.add(23),N.showTypeParameters||R.add(24),N.showSnippets||R.add(27),N.showUsers||R.add(25),N.showIssues||R.add(26),{itemKind:R,showDeprecated:N.showDeprecated}}_onNewContext(L){if(this._context){if(L.lineNumber!==this._context.lineNumber){this.cancel();return}if((0,f.getLeadingWhitespace)(L.leadingLineContent)!==(0,f.getLeadingWhitespace)(this._context.leadingLineContent)){this.cancel();return}if(L.column<this._context.column){L.leadingWord.word?this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0}):this.cancel();return}if(this._completionModel){if(L.leadingWord.word.length!==0&&L.leadingWord.startColumn>this._context.leadingWord.startColumn){if(E.shouldAutoTrigger(this._editor)&&this._context){const M=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:M}})}return}if(L.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&L.leadingWord.word.length!==0){const R=new Map,M=new Set;for(const[N,P]of this._completionModel.getItemsByProvider())P.length>0&&P[0].container.incomplete?M.add(N):R.set(N,P);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:M,providerItemsToReuse:R}})}else{const R=this._completionModel.lineContext;let M=!1;if(this._completionModel.lineContext={leadingLineContent:L.leadingLineContent,characterCountDelta:L.column-this._context.column},this._completionModel.items.length===0){const N=E.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(N&&this._context.leadingWord.endColumn<L.leadingWord.startColumn){this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0});return}if(this._context.triggerOptions.auto){this.cancel();return}else if(this._completionModel.lineContext=R,M=this._completionModel.items.length>0,M&&L.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:L.triggerOptions,isFrozen:M})}}}}};e.SuggestModel=A,e.SuggestModel=A=w=fe([O(1,m.IEditorWorkerService),O(2,h.IClipboardService),O(3,s.ITelemetryService),O(4,i.ILogService),O(5,r.IContextKeyService),O(6,a.IConfigurationService),O(7,d.ILanguageFeaturesService),O(8,g.IEnvironmentService)],A)}),define(Q[3429],Y([1,0,4,6,2484,11,39]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLogService=void 0;let f=class extends t.Disposable{get onDidChangeLogLevel(){return this._logger.onDidChangeLogLevel}constructor(m,S){super(),this._loggerService=m,this._logger=this._loggerService.createLogger("terminal",{name:(0,b.localize)(0,null)}),this._register(y.Event.runAndSubscribe(S.onDidChangeWorkspaceFolders,()=>{this._workspaceId=S.getWorkspace().id.substring(0,7)}))}getLevel(){return this._logger.getLevel()}setLevel(m){this._logger.setLevel(m)}flush(){this._logger.flush()}trace(m,...S){this._logger.trace(this._formatMessage(m),S)}debug(m,...S){this._logger.debug(this._formatMessage(m),S)}info(m,...S){this._logger.info(this._formatMessage(m),S)}warn(m,...S){this._logger.warn(this._formatMessage(m),S)}error(m,...S){if(m instanceof Error){this._logger.error(this._formatMessage(""),m,S);return}this._logger.error(this._formatMessage(m),S)}_formatMessage(m){return this._logger.getLevel()===D.LogLevel.Trace?`[${this._workspaceId}] ${m}`:m}};e.TerminalLogService=f,e.TerminalLogService=f=fe([O(0,D.ILoggerService),O(1,T.IWorkspaceContextService)],f)}),define(Q[116],Y([1,0,122,6,4,26,10,2492,91,25,5,11,39,69,64,14,59,33,17]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryUserDataProfilesService=e.UserDataProfilesService=e.toUserDataProfile=e.reviveProfile=e.IUserDataProfilesService=e.isUserDataProfile=e.ProfileResourceType=void 0;var p;(function(E){E.Settings="settings",E.Keybindings="keybindings",E.Snippets="snippets",E.Tasks="tasks",E.Extensions="extensions",E.GlobalState="globalState"})(p||(e.ProfileResourceType=p={}));function c(E){const C=E;return!!(C&&typeof C=="object"&&typeof C.id=="string"&&typeof C.isDefault=="boolean"&&typeof C.name=="string"&&T.URI.isUri(C.location)&&T.URI.isUri(C.globalStorageHome)&&T.URI.isUri(C.settingsResource)&&T.URI.isUri(C.keybindingsResource)&&T.URI.isUri(C.tasksResource)&&T.URI.isUri(C.snippetsHome)&&T.URI.isUri(C.extensionsResource))}e.isUserDataProfile=c,e.IUserDataProfilesService=(0,S.createDecorator)("IUserDataProfilesService");function l(E,C){return{id:E.id,isDefault:E.isDefault,name:E.name,shortName:E.shortName,location:T.URI.revive(E.location).with({scheme:C}),globalStorageHome:T.URI.revive(E.globalStorageHome).with({scheme:C}),settingsResource:T.URI.revive(E.settingsResource).with({scheme:C}),keybindingsResource:T.URI.revive(E.keybindingsResource).with({scheme:C}),tasksResource:T.URI.revive(E.tasksResource).with({scheme:C}),snippetsHome:T.URI.revive(E.snippetsHome).with({scheme:C}),extensionsResource:T.URI.revive(E.extensionsResource).with({scheme:C}),cacheHome:T.URI.revive(E.cacheHome).with({scheme:C}),useDefaultFlags:E.useDefaultFlags,isTransient:E.isTransient}}e.reviveProfile=l;function n(E,C,I,_,A,k){return{id:E,name:C,location:I,isDefault:!1,shortName:A?.shortName,globalStorageHome:k&&A?.useDefaultFlags?.globalState?k.globalStorageHome:(0,D.joinPath)(I,"globalStorage"),settingsResource:k&&A?.useDefaultFlags?.settings?k.settingsResource:(0,D.joinPath)(I,"settings.json"),keybindingsResource:k&&A?.useDefaultFlags?.keybindings?k.keybindingsResource:(0,D.joinPath)(I,"keybindings.json"),tasksResource:k&&A?.useDefaultFlags?.tasks?k.tasksResource:(0,D.joinPath)(I,"tasks.json"),snippetsHome:k&&A?.useDefaultFlags?.snippets?k.snippetsHome:(0,D.joinPath)(I,"snippets"),extensionsResource:k&&A?.useDefaultFlags?.extensions?k.extensionsResource:(0,D.joinPath)(I,"extensions.json"),cacheHome:(0,D.joinPath)(_,E),useDefaultFlags:A?.useDefaultFlags,isTransient:A?.transient}}e.toUserDataProfile=n;let g=class extends b.Disposable{static{this.PROFILES_KEY="userDataProfiles"}static{this.PROFILE_ASSOCIATIONS_KEY="profileAssociations"}get defaultProfile(){return this.profiles[0]}get profiles(){return[...this.profilesObject.profiles,...this.transientProfilesObject.profiles]}constructor(C,I,_,A){super(),this.environmentService=C,this.fileService=I,this.uriIdentityService=_,this.logService=A,this.enabled=!0,this._onDidChangeProfiles=this._register(new y.Emitter),this.onDidChangeProfiles=this._onDidChangeProfiles.event,this._onWillCreateProfile=this._register(new y.Emitter),this.onWillCreateProfile=this._onWillCreateProfile.event,this._onWillRemoveProfile=this._register(new y.Emitter),this.onWillRemoveProfile=this._onWillRemoveProfile.event,this._onDidResetWorkspaces=this._register(new y.Emitter),this.onDidResetWorkspaces=this._onDidResetWorkspaces.event,this.profileCreationPromises=new Map,this.transientProfilesObject={profiles:[],workspaces:new r.ResourceMap,emptyWindows:new Map},this.profilesHome=(0,D.joinPath)(this.environmentService.userRoamingDataHome,"profiles"),this.profilesCacheHome=(0,D.joinPath)(this.environmentService.cacheHome,"CachedProfilesData")}init(){this._profilesObject=void 0}setEnablement(C){this.enabled!==C&&(this._profilesObject=void 0,this.enabled=C)}isEnabled(){return this.enabled}get profilesObject(){if(!this._profilesObject){const C=this.createDefaultProfile(),I=[C];if(this.enabled)try{for(const k of this.getStoredProfiles()){if(!k.name||!(0,d.isString)(k.name)||!k.location){this.logService.warn("Skipping the invalid stored profile",k.location||k.name);continue}I.push(n((0,D.basename)(k.location),k.name,k.location,this.profilesCacheHome,{shortName:k.shortName,useDefaultFlags:k.useDefaultFlags},C))}}catch(k){this.logService.error(k)}const _=new r.ResourceMap,A=new Map;if(I.length)try{const k=this.getStoredProfileAssociations();if(k.workspaces)for(const[L,R]of Object.entries(k.workspaces)){const M=T.URI.parse(L),N=I.find(P=>P.id===R);N&&_.set(M,N)}if(k.emptyWindows)for(const[L,R]of Object.entries(k.emptyWindows)){const M=I.find(N=>N.id===R);M&&A.set(L,M)}}catch(k){this.logService.error(k)}this._profilesObject={profiles:I,workspaces:_,emptyWindows:A}}return this._profilesObject}createDefaultProfile(){const C=n("__default__profile__",(0,f.localize)(0,null),this.environmentService.userRoamingDataHome,this.profilesCacheHome);return{...C,extensionsResource:this.getDefaultProfileExtensionsLocation()??C.extensionsResource,isDefault:!0}}async createTransientProfile(C){const I="Temp",_=new RegExp(`${(0,u.escapeRegExpCharacters)(I)}\\s(\\d+)`);let A=0;for(const L of this.profiles){const R=_.exec(L.name),M=R?parseInt(R[1]):0;A=M>A?M:A}const k=`${I} ${A+1}`;return this.createProfile((0,t.hash)((0,o.generateUuid)()).toString(16),k,{transient:!0},C)}async createNamedProfile(C,I,_){return this.createProfile((0,t.hash)((0,o.generateUuid)()).toString(16),C,I,_)}async createProfile(C,I,_,A){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");const k=await this.doCreateProfile(C,I,_);return A&&await this.setProfileForWorkspace(A,k),k}async doCreateProfile(C,I,_){if(!(0,d.isString)(I)||!I)throw new Error("Name of the profile is mandatory and must be of type `string`");let A=this.profileCreationPromises.get(I);return A||(A=(async()=>{try{const k=this.profiles.find(M=>M.name===I||M.id===C);if(k)return k;const L=n(C,I,(0,D.joinPath)(this.profilesHome,C),this.profilesCacheHome,_,this.defaultProfile);await this.fileService.createFolder(L.location);const R=[];return this._onWillCreateProfile.fire({profile:L,join(M){R.push(M)}}),await s.Promises.settled(R),this.updateProfiles([L],[],[]),L}finally{this.profileCreationPromises.delete(I)}})(),this.profileCreationPromises.set(I,A)),A}async updateProfile(C,I){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");let _=this.profiles.find(A=>A.id===C.id);if(!_)throw new Error(`Profile '${C.name}' does not exist`);return _=n(_.id,I.name??_.name,_.location,this.profilesCacheHome,{shortName:I.shortName??_.shortName,transient:I.transient??_.isTransient,useDefaultFlags:I.useDefaultFlags??_.useDefaultFlags},this.defaultProfile),this.updateProfiles([],[],[_]),_}async removeProfile(C){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");if(C.isDefault)throw new Error("Cannot remove default profile");const I=this.profiles.find(A=>A.id===C.id);if(!I)throw new Error(`Profile '${C.name}' does not exist`);const _=[];this._onWillRemoveProfile.fire({profile:I,join(A){_.push(A)}});try{await Promise.allSettled(_)}catch(A){this.logService.error(A)}for(const A of[...this.profilesObject.emptyWindows.keys()])I.id===this.profilesObject.emptyWindows.get(A)?.id&&this.profilesObject.emptyWindows.delete(A);for(const A of[...this.profilesObject.workspaces.keys()])I.id===this.profilesObject.workspaces.get(A)?.id&&this.profilesObject.workspaces.delete(A);this.updateStoredProfileAssociations(),this.updateProfiles([],[I],[]);try{await this.fileService.del(I.cacheHome,{recursive:!0})}catch(A){(0,m.toFileOperationResult)(A)!==1&&this.logService.error(A)}}async setProfileForWorkspace(C,I){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");const _=this.profiles.find(A=>A.id===I.id);if(!_)throw new Error(`Profile '${I.name}' does not exist`);this.updateWorkspaceAssociation(C,_)}unsetWorkspace(C,I){if(!this.enabled)throw new Error("Profiles are disabled in the current environment.");this.updateWorkspaceAssociation(C,void 0,I)}async resetWorkspaces(){this.transientProfilesObject.workspaces.clear(),this.transientProfilesObject.emptyWindows.clear(),this.profilesObject.workspaces.clear(),this.profilesObject.emptyWindows.clear(),this.updateStoredProfileAssociations(),this._onDidResetWorkspaces.fire()}async cleanUp(){if(this.enabled&&await this.fileService.exists(this.profilesHome)){const C=await this.fileService.resolve(this.profilesHome);await Promise.all((C.children||[]).filter(I=>I.isDirectory&&this.profiles.every(_=>!this.uriIdentityService.extUri.isEqual(_.location,I.resource))).map(I=>this.fileService.del(I.resource,{recursive:!0})))}}async cleanUpTransientProfiles(){if(!this.enabled)return;const C=this.transientProfilesObject.profiles.filter(I=>!this.isProfileAssociatedToWorkspace(I));await Promise.allSettled(C.map(I=>this.removeProfile(I)))}getProfileForWorkspace(C){const I=this.getWorkspace(C);return T.URI.isUri(I)?this.transientProfilesObject.workspaces.get(I)??this.profilesObject.workspaces.get(I):this.transientProfilesObject.emptyWindows.get(I)??this.profilesObject.emptyWindows.get(I)}getWorkspace(C){return(0,a.isSingleFolderWorkspaceIdentifier)(C)?C.uri:(0,a.isWorkspaceIdentifier)(C)?C.configPath:C.id}isProfileAssociatedToWorkspace(C){return!!([...this.transientProfilesObject.emptyWindows.values()].some(I=>this.uriIdentityService.extUri.isEqual(I.location,C.location))||[...this.transientProfilesObject.workspaces.values()].some(I=>this.uriIdentityService.extUri.isEqual(I.location,C.location))||[...this.profilesObject.emptyWindows.values()].some(I=>this.uriIdentityService.extUri.isEqual(I.location,C.location))||[...this.profilesObject.workspaces.values()].some(I=>this.uriIdentityService.extUri.isEqual(I.location,C.location)))}updateProfiles(C,I,_){const A=[...this.profiles,...C],k=[];this.transientProfilesObject.profiles=[];for(let L of A)L.isDefault||I.some(R=>L.id===R.id)||(L=_.find(R=>L.id===R.id)??L,L.isTransient?this.transientProfilesObject.profiles.push(L):k.push({location:L.location,name:L.name,shortName:L.shortName,useDefaultFlags:L.useDefaultFlags}));this.saveStoredProfiles(k),this._profilesObject=void 0,this.triggerProfilesChanges(C,I,_)}triggerProfilesChanges(C,I,_){this._onDidChangeProfiles.fire({added:C,removed:I,updated:_,all:this.profiles})}updateWorkspaceAssociation(C,I,_){_=I?.isTransient?!0:_,_||this.updateWorkspaceAssociation(C,void 0,!0);const A=this.getWorkspace(C),k=_?this.transientProfilesObject:this.profilesObject;T.URI.isUri(A)?(k.workspaces.delete(A),I&&k.workspaces.set(A,I)):(k.emptyWindows.delete(A),I&&k.emptyWindows.set(A,I)),_||this.updateStoredProfileAssociations()}updateStoredProfileAssociations(){const C={};for(const[_,A]of this.profilesObject.workspaces.entries())C[_.toString()]=A.id;const I={};for(const[_,A]of this.profilesObject.emptyWindows.entries())I[_.toString()]=A.id;this.saveStoredProfileAssociations({workspaces:C,emptyWindows:I}),this._profilesObject=void 0}migrateStoredProfileAssociations(C){const I={},_=this.createDefaultProfile();if(C.workspaces)for(const[k,L]of Object.entries(C.workspaces)){const R=T.URI.parse(L);I[k]=this.uriIdentityService.extUri.isEqual(R,_.location)?_.id:this.uriIdentityService.extUri.basename(R)}const A={};if(C.emptyWindows)for(const[k,L]of Object.entries(C.emptyWindows)){const R=T.URI.parse(L);A[k]=this.uriIdentityService.extUri.isEqual(R,_.location)?_.id:this.uriIdentityService.extUri.basename(R)}return{workspaces:I,emptyWindows:A}}getStoredProfiles(){return[]}saveStoredProfiles(C){throw new Error("not implemented")}getStoredProfileAssociations(){return{}}saveStoredProfileAssociations(C){throw new Error("not implemented")}getDefaultProfileExtensionsLocation(){}};e.UserDataProfilesService=g,e.UserDataProfilesService=g=fe([O(0,v.IEnvironmentService),O(1,m.IFileService),O(2,i.IUriIdentityService),O(3,h.ILogService)],g);class w extends g{constructor(){super(...arguments),this.storedProfiles=[],this.storedProfileAssociations={}}getStoredProfiles(){return this.storedProfiles}saveStoredProfiles(C){this.storedProfiles=C}getStoredProfileAssociations(){return this.storedProfileAssociations}saveStoredProfileAssociations(C){this.storedProfileAssociations=C}}e.InMemoryUserDataProfilesService=w}),define(Q[714],Y([1,0,14,62,4,6,69,10,95,115,25,5,11,116,64,17,15,30]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractExtensionsProfileScannerService=e.IExtensionsProfileScannerService=e.ExtensionsProfileScanningError=e.ExtensionsProfileScanningErrorCode=void 0;var d;(function(g){g.ERROR_PROFILE_NOT_FOUND="ERROR_PROFILE_NOT_FOUND",g.ERROR_INVALID_CONTENT="ERROR_INVALID_CONTENT"})(d||(e.ExtensionsProfileScanningErrorCode=d={}));class p extends Error{constructor(w,E){super(w),this.code=E}}e.ExtensionsProfileScanningError=p,e.IExtensionsProfileScannerService=(0,h.createDecorator)("IExtensionsProfileScannerService");let c=class extends b.Disposable{constructor(w,E,C,I,_,A){super(),this.extensionsLocation=w,this.fileService=E,this.userDataProfilesService=C,this.uriIdentityService=I,this.telemetryService=_,this.logService=A,this._onAddExtensions=this._register(new D.Emitter),this.onAddExtensions=this._onAddExtensions.event,this._onDidAddExtensions=this._register(new D.Emitter),this.onDidAddExtensions=this._onDidAddExtensions.event,this._onRemoveExtensions=this._register(new D.Emitter),this.onRemoveExtensions=this._onRemoveExtensions.event,this._onDidRemoveExtensions=this._register(new D.Emitter),this.onDidRemoveExtensions=this._onDidRemoveExtensions.event,this.resourcesAccessQueueMap=new T.ResourceMap}scanProfileExtensions(w,E){return this.withProfileExtensions(w,void 0,E)}async addExtensionsToProfile(w,E){const C=[],I=[];try{return await this.withProfileExtensions(E,_=>{const A=[];for(const k of _)w.some(([L])=>(0,m.areSameExtensions)(L.identifier,k.identifier)&&L.manifest.version!==k.version)?C.push(k):A.push(k);for(const[k,L]of w){const R=A.findIndex(N=>(0,m.areSameExtensions)(N.identifier,k.identifier)&&N.version===k.manifest.version),M={identifier:k.identifier,version:k.manifest.version,location:k.location,metadata:L};R===-1?(I.push(M),A.push(M)):A.splice(R,1,M)}return I.length&&this._onAddExtensions.fire({extensions:I,profileLocation:E}),C.length&&this._onRemoveExtensions.fire({extensions:C,profileLocation:E}),A}),I.length&&this._onDidAddExtensions.fire({extensions:I,profileLocation:E}),C.length&&this._onDidRemoveExtensions.fire({extensions:C,profileLocation:E}),I}catch(_){throw I.length&&this._onDidAddExtensions.fire({extensions:I,error:_,profileLocation:E}),C.length&&this._onDidRemoveExtensions.fire({extensions:C,error:_,profileLocation:E}),_}}async updateMetadata(w,E){const C=[];return await this.withProfileExtensions(E,I=>{const _=[];for(const A of I){const k=w.find(([L])=>(0,m.areSameExtensions)(L.identifier,A.identifier)&&L.manifest.version===A.version);k&&(A.metadata={...A.metadata,...k[1]},C.push(A)),_.push(A)}return _}),C}async removeExtensionFromProfile(w,E){const C=[];try{await this.withProfileExtensions(E,I=>{const _=[];for(const A of I)(0,m.areSameExtensions)(A.identifier,w.identifier)?C.push(A):_.push(A);return C.length&&this._onRemoveExtensions.fire({extensions:C,profileLocation:E}),_}),C.length&&this._onDidRemoveExtensions.fire({extensions:C,profileLocation:E})}catch(I){throw C.length&&this._onDidRemoveExtensions.fire({extensions:C,error:I,profileLocation:E}),I}}async withProfileExtensions(w,E,C){return this.getResourceAccessQueue(w).queue(async()=>{let I=[],_;try{const A=await this.fileService.readFile(w);_=JSON.parse(A.value.toString().trim()||"[]")}catch(A){if((0,S.toFileOperationResult)(A)!==1)throw A;if(this.uriIdentityService.extUri.isEqual(w,this.userDataProfilesService.defaultProfile.extensionsResource)&&(_=await this.migrateFromOldDefaultProfileExtensionsLocation()),!_&&C?.bailOutWhenFileNotFound)throw new p((0,o.getErrorMessage)(A),"ERROR_PROFILE_NOT_FOUND")}if(_){Array.isArray(_)||this.reportAndThrowInvalidConentError(w);let A=!1;for(const k of _){l(k)||this.reportAndThrowInvalidConentError(w);let L;if((0,s.isString)(k.relativeLocation)&&k.relativeLocation)L=this.resolveExtensionLocation(k.relativeLocation);else if((0,s.isString)(k.location))L=this.resolveExtensionLocation(k.location),A=!0,k.relativeLocation=k.location,k.location=L.toJSON();else{L=f.URI.revive(k.location);const R=this.toRelativePath(L);R&&(A=!0,k.relativeLocation=R)}I.push({identifier:k.identifier,location:L,version:k.version,metadata:k.metadata})}A&&await this.fileService.writeFile(w,y.VSBuffer.fromString(JSON.stringify(_)))}if(E){I=E(I);const A=I.map(k=>({identifier:k.identifier,version:k.version,location:k.location.toJSON(),relativeLocation:this.toRelativePath(k.location),metadata:k.metadata}));await this.fileService.writeFile(w,y.VSBuffer.fromString(JSON.stringify(A)))}return I})}reportAndThrowInvalidConentError(w){const E=new p(`Invalid extensions content in ${w.toString()}`,"ERROR_INVALID_CONTENT");throw this.telemetryService.publicLogError2("extensionsProfileScanningError",{code:E.code}),E}toRelativePath(w){return this.uriIdentityService.extUri.isEqual(this.uriIdentityService.extUri.dirname(w),this.extensionsLocation)?this.uriIdentityService.extUri.basename(w):void 0}resolveExtensionLocation(w){return this.uriIdentityService.extUri.joinPath(this.extensionsLocation,w)}async migrateFromOldDefaultProfileExtensionsLocation(){return this._migrationPromise||(this._migrationPromise=(async()=>{const w=this.uriIdentityService.extUri.joinPath(this.userDataProfilesService.defaultProfile.location,"extensions.json"),E=this.uriIdentityService.extUri.joinPath(this.extensionsLocation,".init-default-profile-extensions");let C;try{C=(await this.fileService.readFile(w)).value.toString()}catch(_){if((0,S.toFileOperationResult)(_)===1)return;throw _}this.logService.info("Migrating extensions from old default profile location",w.toString());let I;try{const _=JSON.parse(C);Array.isArray(_)&&_.every(A=>l(A))?I=_:this.logService.warn("Skipping migrating from old default profile locaiton: Found invalid data",_)}catch(_){this.logService.error(_)}if(I)try{await this.fileService.createFile(this.userDataProfilesService.defaultProfile.extensionsResource,y.VSBuffer.fromString(JSON.stringify(I)),{overwrite:!1}),this.logService.info("Migrated extensions from old default profile location to new location",w.toString(),this.userDataProfilesService.defaultProfile.extensionsResource.toString())}catch(_){if((0,S.toFileOperationResult)(_)===3)this.logService.info("Migration from old default profile location to new location is done by another window",w.toString(),this.userDataProfilesService.defaultProfile.extensionsResource.toString());else throw _}try{await this.fileService.del(w)}catch(_){(0,S.toFileOperationResult)(_)!==1&&this.logService.error(_)}try{await this.fileService.del(E)}catch(_){(0,S.toFileOperationResult)(_)!==1&&this.logService.error(_)}return I})()),this._migrationPromise}getResourceAccessQueue(w){let E=this.resourcesAccessQueueMap.get(w);return E||(E=new t.Queue,this.resourcesAccessQueueMap.set(w,E)),E}};e.AbstractExtensionsProfileScannerService=c,e.AbstractExtensionsProfileScannerService=c=fe([O(1,S.IFileService),O(2,r.IUserDataProfilesService),O(3,i.IUriIdentityService),O(4,u.ITelemetryService),O(5,a.ILogService)],c);function l(g){return(0,s.isObject)(g)&&(0,v.isIExtensionIdentifier)(g.identifier)&&(n(g.location)||(0,s.isString)(g.location)&&g.location)&&((0,s.isUndefined)(g.relativeLocation)||(0,s.isString)(g.relativeLocation))&&g.version&&(0,s.isString)(g.version)}function n(g){return g?(0,s.isString)(g.path)&&(0,s.isString)(g.scheme):!1}}),define(Q[1235],Y([1,0,20,14,42,62,15,161,569,4,22,55,18,26,406,63,17,10,2461,91,115,112,846,25,5,11,52,6,186,714,116,64,1137]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeExtensionsScannerService=e.toExtensionDescription=e.ExtensionScannerInput=e.AbstractExtensionsScannerService=e.IExtensionsScannerService=e.Translations=void 0;var M;(function(z){function B(K,H){if(K===H)return!0;const U=Object.keys(K),G=new Set;for(const $ of Object.keys(H))G.add($);if(U.length!==G.size)return!1;for(const $ of U){if(K[$]!==H[$])return!1;G.delete($)}return G.size===0}z.equals=B})(M||(e.Translations=M={})),e.IExtensionsScannerService=(0,w.createDecorator)("IExtensionsScannerService");let N=class extends m.Disposable{constructor(B,K,H,U,G,$,ie,J,j,ee,X,te){super(),this.systemExtensionsLocation=B,this.userExtensionsLocation=K,this.extensionsControlLocation=H,this.currentProfile=U,this.userDataProfilesService=G,this.extensionsProfileScannerService=$,this.fileService=ie,this.logService=J,this.environmentService=j,this.productService=ee,this.uriIdentityService=X,this.instantiationService=te,this._onDidChangeCache=this._register(new I.Emitter),this.onDidChangeCache=this._onDidChangeCache.event,this.obsoleteFile=(0,r.joinPath)(this.userExtensionsLocation,".obsolete"),this.systemExtensionsCachedScanner=this._register(this.instantiationService.createInstance(F,this.currentProfile,this.obsoleteFile)),this.userExtensionsCachedScanner=this._register(this.instantiationService.createInstance(F,this.currentProfile,this.obsoleteFile)),this.extensionsScanner=this._register(this.instantiationService.createInstance(x,this.obsoleteFile)),this.initializeDefaultProfileExtensionsPromise=void 0,this._register(this.systemExtensionsCachedScanner.onDidChangeCache(()=>this._onDidChangeCache.fire(0))),this._register(this.userExtensionsCachedScanner.onDidChangeCache(()=>this._onDidChangeCache.fire(1)))}getTargetPlatform(){return this._targetPlatformPromise||(this._targetPlatformPromise=(0,c.computeTargetPlatform)(this.fileService,this.logService)),this._targetPlatformPromise}async scanAllExtensions(B,K,H){const[U,G]=await Promise.all([this.scanSystemExtensions(B),this.scanUserExtensions(K)]),$=H?await this.scanExtensionsUnderDevelopment(B,[...U,...G]):[];return this.dedupExtensions(U,G,$,await this.getTargetPlatform(),!0)}async scanSystemExtensions(B){const K=[];K.push(this.scanDefaultSystemExtensions(!!B.useCache,B.language)),K.push(this.scanDevSystemExtensions(B.language,!!B.checkControlFile));const[H,U]=await Promise.all(K);return this.applyScanOptions([...H,...U],0,B,!1)}async scanUserExtensions(B){const K=B.profileLocation??this.userExtensionsLocation;this.logService.trace("Started scanning user extensions",K);const H=this.uriIdentityService.extUri.isEqual(B.profileLocation,this.userDataProfilesService.defaultProfile.extensionsResource)?{bailOutWhenFileNotFound:!0}:void 0,U=await this.createExtensionScannerInput(K,!!B.profileLocation,1,!B.includeUninstalled,B.language,!0,H),G=B.useCache&&!U.devMode&&U.excludeObsolete?this.userExtensionsCachedScanner:this.extensionsScanner;let $;try{$=await G.scanExtensions(U)}catch(ie){if(ie instanceof A.ExtensionsProfileScanningError&&ie.code==="ERROR_PROFILE_NOT_FOUND")await this.doInitializeDefaultProfileExtensions(),$=await G.scanExtensions(U);else throw ie}return $=await this.applyScanOptions($,1,B,!0),this.logService.trace("Scanned user extensions:",$.length),$}async scanExtensionsUnderDevelopment(B,K){if(this.environmentService.isExtensionDevelopment&&this.environmentService.extensionDevelopmentLocationURI){const H=(await Promise.all(this.environmentService.extensionDevelopmentLocationURI.filter(U=>U.scheme===S.Schemas.file).map(async U=>{const G=await this.createExtensionScannerInput(U,!1,1,!0,B.language,!1,void 0);return(await this.extensionsScanner.scanOneOrMultipleExtensions(G)).map(ie=>(ie.type=K.find(J=>(0,c.areSameExtensions)(J.identifier,ie.identifier))?.type??ie.type,this.extensionsScanner.validate(ie,G)))}))).flat();return this.applyScanOptions(H,"development",B,!0)}return[]}async scanExistingExtension(B,K,H){const U=await this.createExtensionScannerInput(B,!1,K,!0,H.language,!0,void 0),G=await this.extensionsScanner.scanExtension(U);return!G||!H.includeInvalid&&!G.isValid?null:G}async scanOneOrMultipleExtensions(B,K,H){const U=await this.createExtensionScannerInput(B,!1,K,!0,H.language,!0,void 0),G=await this.extensionsScanner.scanOneOrMultipleExtensions(U);return this.applyScanOptions(G,K,H,!0)}async scanMetadata(B){const K=(0,r.joinPath)(B,"package.json"),H=(await this.fileService.readFile(K)).value.toString();return JSON.parse(H).__metadata}async updateMetadata(B,K){const H=(0,r.joinPath)(B,"package.json"),U=(await this.fileService.readFile(H)).value.toString(),G=JSON.parse(U);K.isMachineScoped=K.isMachineScoped||void 0,K.isBuiltin=K.isBuiltin||void 0,G.__metadata={...G.__metadata,...K},await this.fileService.writeFile((0,r.joinPath)(B,"package.json"),D.VSBuffer.fromString(JSON.stringify(G,null," ")))}async initializeDefaultProfileExtensions(){try{await this.extensionsProfileScannerService.scanProfileExtensions(this.userDataProfilesService.defaultProfile.extensionsResource,{bailOutWhenFileNotFound:!0})}catch(B){if(B instanceof A.ExtensionsProfileScanningError&&B.code==="ERROR_PROFILE_NOT_FOUND")await this.doInitializeDefaultProfileExtensions();else throw B}}async doInitializeDefaultProfileExtensions(){return this.initializeDefaultProfileExtensionsPromise||(this.initializeDefaultProfileExtensionsPromise=(async()=>{try{this.logService.info("Started initializing default profile extensions in extensions installation folder.",this.userExtensionsLocation.toString());const B=await this.scanUserExtensions({includeInvalid:!0});if(B.length)await this.extensionsProfileScannerService.addExtensionsToProfile(B.map(K=>[K,K.metadata]),this.userDataProfilesService.defaultProfile.extensionsResource);else try{await this.fileService.createFile(this.userDataProfilesService.defaultProfile.extensionsResource,D.VSBuffer.fromString(JSON.stringify([])))}catch(K){(0,g.toFileOperationResult)(K)!==1&&this.logService.warn("Failed to create default profile extensions manifest in extensions installation folder.",this.userExtensionsLocation.toString(),(0,T.getErrorMessage)(K))}this.logService.info("Completed initializing default profile extensions in extensions installation folder.",this.userExtensionsLocation.toString())}catch(B){this.logService.error(B)}finally{this.initializeDefaultProfileExtensionsPromise=void 0}})()),this.initializeDefaultProfileExtensionsPromise}async applyScanOptions(B,K,H,U){return H.includeAllVersions||(B=this.dedupExtensions(K===0?B:void 0,K===1?B:void 0,K==="development"?B:void 0,await this.getTargetPlatform(),U)),H.includeInvalid||(B=B.filter(G=>G.isValid)),B.sort((G,$)=>{const ie=h.basename(G.location.fsPath),J=h.basename($.location.fsPath);return ie<J?-1:ie>J?1:0})}dedupExtensions(B,K,H,U,G){const $=(J,j,ee)=>{if(J.isValid&&!j.isValid)return!1;if(J.isValid===j.isValid){if(G&&i.gt(J.manifest.version,j.manifest.version))return this.logService.debug(`Skipping extension ${j.location.path} with lower version ${j.manifest.version} in favour of ${J.location.path} with version ${J.manifest.version}`),!1;if(i.eq(J.manifest.version,j.manifest.version)){if(J.type===0)return this.logService.debug(`Skipping extension ${j.location.path} in favour of system extension ${J.location.path} with same version`),!1;if(J.targetPlatform===U)return this.logService.debug(`Skipping extension ${j.location.path} from different target platform ${j.targetPlatform}`),!1}}return ee?this.logService.warn(`Overwriting user extension ${J.location.path} with ${j.location.path}.`):this.logService.debug(`Overwriting user extension ${J.location.path} with ${j.location.path}.`),!0},ie=new l.ExtensionIdentifierMap;return B?.forEach(J=>{const j=ie.get(J.identifier.id);(!j||$(j,J,!1))&&ie.set(J.identifier.id,J)}),K?.forEach(J=>{const j=ie.get(J.identifier.id);if(!j&&B&&J.type===0){this.logService.debug(`Skipping obsolete system extension ${J.location.path}.`);return}(!j||$(j,J,!1))&&ie.set(J.identifier.id,J)}),H?.forEach(J=>{const j=ie.get(J.identifier.id);(!j||$(j,J,!0))&&ie.set(J.identifier.id,J),ie.set(J.identifier.id,J)}),[...ie.values()]}async scanDefaultSystemExtensions(B,K){this.logService.trace("Started scanning system extensions");const H=await this.createExtensionScannerInput(this.systemExtensionsLocation,!1,0,!0,K,!0,void 0),G=await(B&&!H.devMode?this.systemExtensionsCachedScanner:this.extensionsScanner).scanExtensions(H);return this.logService.trace("Scanned system extensions:",G.length),G}async scanDevSystemExtensions(B,K){const H=this.environmentService.isBuilt?[]:this.productService.builtInExtensions;if(!H?.length)return[];this.logService.trace("Started scanning dev system extensions");const U=K?await this.getBuiltInExtensionControl():{},G=[],$=u.URI.file(h.normalize(h.join(S.FileAccess.asFileUri("").fsPath,"..",".build","builtInExtensions")));for(const J of H){const j=U[J.name]||"marketplace";switch(j){case"disabled":break;case"marketplace":G.push((0,r.joinPath)($,J.name));break;default:G.push(u.URI.file(j));break}}const ie=await Promise.all(G.map(async J=>this.extensionsScanner.scanExtension(await this.createExtensionScannerInput(J,!1,0,!0,B,!0,void 0))));return this.logService.trace("Scanned dev system extensions:",ie.length),(0,t.coalesce)(ie)}async getBuiltInExtensionControl(){try{const B=await this.fileService.readFile(this.extensionsControlLocation);return JSON.parse(B.value.toString())}catch{return{}}}async createExtensionScannerInput(B,K,H,U,G,$,ie){const J=await this.getTranslations(G??a.language),j=await this.getMtime(B),ee=K&&!this.uriIdentityService.extUri.isEqual(B,this.userDataProfilesService.defaultProfile.extensionsResource)?this.userDataProfilesService.defaultProfile.extensionsResource:void 0,X=ee?await this.getMtime(ee):void 0;return new P(B,j,ee,X,K,ie,H,U,$,this.productService.version,this.productService.vscodeVersion,this.productService.date,this.productService.commit,!this.environmentService.isBuilt,G,J)}async getMtime(B){try{const K=await this.fileService.stat(B);if(typeof K.mtime=="number")return K.mtime}catch{}}};e.AbstractExtensionsScannerService=N,e.AbstractExtensionsScannerService=N=fe([O(4,k.IUserDataProfilesService),O(5,A.IExtensionsProfileScannerService),O(6,g.IFileService),O(7,E.ILogService),O(8,p.IEnvironmentService),O(9,C.IProductService),O(10,L.IUriIdentityService),O(11,w.IInstantiationService)],N);class P{constructor(B,K,H,U,G,$,ie,J,j,ee,X,te,Z,se,re,oe){this.location=B,this.mtime=K,this.applicationExtensionslocation=H,this.applicationExtensionslocationMtime=U,this.profile=G,this.profileScanOptions=$,this.type=ie,this.excludeObsolete=J,this.validate=j,this.productVersion=ee,this.vsCodeProductVersion=X,this.productDate=te,this.productCommit=Z,this.devMode=se,this.language=re,this.translations=oe}static createNlsConfiguration(B){return{language:B.language,pseudo:B.language==="pseudo",devMode:B.devMode,translations:B.translations}}static equals(B,K){return(0,r.isEqual)(B.location,K.location)&&B.mtime===K.mtime&&(0,r.isEqual)(B.applicationExtensionslocation,K.applicationExtensionslocation)&&B.applicationExtensionslocationMtime===K.applicationExtensionslocationMtime&&B.profile===K.profile&&b.equals(B.profileScanOptions,K.profileScanOptions)&&B.type===K.type&&B.excludeObsolete===K.excludeObsolete&&B.validate===K.validate&&B.productVersion===K.productVersion&&B.productDate===K.productDate&&B.productCommit===K.productCommit&&B.devMode===K.devMode&&B.language===K.language&&M.equals(B.translations,K.translations)}}e.ExtensionScannerInput=P;let x=class extends m.Disposable{constructor(B,K,H,U,G){super(),this.obsoleteFile=B,this.extensionsProfileScannerService=K,this.uriIdentityService=H,this.fileService=U,this.logService=G}async scanExtensions(B){const K=B.profile?await this.scanExtensionsFromProfile(B):await this.scanExtensionsFromLocation(B);let H={};if(B.excludeObsolete&&B.type===1)try{const U=(await this.fileService.readFile(this.obsoleteFile)).value.toString();H=JSON.parse(U)}catch{}return(0,o.isEmptyObject)(H)?K:K.filter(U=>!H[c.ExtensionKey.create(U).toString()])}async scanExtensionsFromLocation(B){const K=await this.fileService.resolve(B.location);if(!K.children?.length)return[];const H=await Promise.all(K.children.map(async U=>{if(!U.isDirectory||B.type===1&&(0,r.basename)(U.resource).indexOf(".")===0)return null;const G=new P(U.resource,B.mtime,B.applicationExtensionslocation,B.applicationExtensionslocationMtime,B.profile,B.profileScanOptions,B.type,B.excludeObsolete,B.validate,B.productVersion,B.vsCodeProductVersion,B.productDate,B.productCommit,B.devMode,B.language,B.translations);return this.scanExtension(G)}));return(0,t.coalesce)(H).sort((U,G)=>U.location.path<G.location.path?-1:1)}async scanExtensionsFromProfile(B){let K=await this.scanExtensionsFromProfileResource(B.location,()=>!0,B);if(B.applicationExtensionslocation&&!this.uriIdentityService.extUri.isEqual(B.location,B.applicationExtensionslocation)){K=K.filter(U=>!U.metadata?.isApplicationScoped);const H=await this.scanExtensionsFromProfileResource(B.applicationExtensionslocation,U=>!!U.metadata?.isBuiltin||!!U.metadata?.isApplicationScoped,B);K.push(...H)}return K}async scanExtensionsFromProfileResource(B,K,H){const U=await this.extensionsProfileScannerService.scanProfileExtensions(B,H.profileScanOptions);if(!U.length)return[];const G=await Promise.all(U.map(async $=>{if(K($)){const ie=new P($.location,H.mtime,H.applicationExtensionslocation,H.applicationExtensionslocationMtime,H.profile,H.profileScanOptions,H.type,H.excludeObsolete,H.validate,H.productVersion,H.vsCodeProductVersion,H.productDate,H.productCommit,H.devMode,H.language,H.translations);return this.scanExtension(ie,$.metadata)}return null}));return(0,t.coalesce)(G)}async scanOneOrMultipleExtensions(B){try{if(await this.fileService.exists((0,r.joinPath)(B.location,"package.json"))){const K=await this.scanExtension(B);return K?[K]:[]}else return await this.scanExtensions(B)}catch(K){return this.logService.error(`Error scanning extensions at ${B.location.path}:`,(0,T.getErrorMessage)(K)),[]}}async scanExtension(B,K){try{let H=await this.scanExtensionManifest(B.location);if(H){H.publisher||(H.publisher=l.UNDEFINED_PUBLISHER),K=K??H.__metadata,delete H.__metadata;const U=(0,c.getGalleryExtensionId)(H.publisher,H.name),G=K?.id?{id:U,uuid:K.id}:{id:U},$=K?.isSystem?0:B.type,ie=$===0||!!K?.isBuiltin;H=await this.translateManifest(B.location,H,P.createNlsConfiguration(B));const J={type:$,identifier:G,manifest:H,location:B.location,isBuiltin:ie,targetPlatform:K?.targetPlatform??"undefined",metadata:K,isValid:!0,validations:[]};return B.validate?this.validate(J,B):J}}catch(H){B.type!==0&&this.logService.error(H)}return null}validate(B,K){let H=!0;const U=(0,n.validateExtensionManifest)(K.productVersion,K.vsCodeProductVersion,K.productDate,K.location,B.manifest,B.isBuiltin);for(const[G,$]of U)G===s.default.Error&&(H=!1,this.logService.error(this.formatMessage(K.location,$)));return B.isValid=H,B.validations=U,B}async scanExtensionManifest(B){const K=(0,r.joinPath)(B,"package.json");let H;try{H=(await this.fileService.readFile(K)).value.toString()}catch(G){return(0,g.toFileOperationResult)(G)!==1&&this.logService.error(this.formatMessage(B,(0,d.localize)(0,null,K.path,G.message))),null}let U;try{U=JSON.parse(H)}catch{const $=[];(0,f.parse)(H,$);for(const ie of $)this.logService.error(this.formatMessage(B,(0,d.localize)(1,null,K.path,ie.offset,ie.length,(0,v.getParseErrorMessage)(ie.error))));return null}return(0,f.getNodeType)(U)!=="object"?(this.logService.error(this.formatMessage(B,(0,d.localize)(2,null,K.path))),null):U}async translateManifest(B,K,H){const U=await this.getLocalizedMessages(B,K,H);if(U)try{const G=[],$=await this.resolveOriginalMessageBundle(U.default,G);if(G.length>0)return G.forEach(J=>{this.logService.error(this.formatMessage(B,(0,d.localize)(3,null,U.default?.path,(0,v.getParseErrorMessage)(J.error))))}),K;if((0,f.getNodeType)(U)!=="object")return this.logService.error(this.formatMessage(B,(0,d.localize)(4,null,U.default?.path))),K;const ie=U.values||Object.create(null);return(0,R.localizeManifest)(K,ie,$)}catch{}return K}async getLocalizedMessages(B,K,H){const U=(0,r.joinPath)(B,"package.nls.json"),G=(j,ee)=>{ee.forEach(X=>{this.logService.error(this.formatMessage(B,(0,d.localize)(5,null,j?.path,(0,v.getParseErrorMessage)(X.error))))})},$=j=>{this.logService.error(this.formatMessage(B,(0,d.localize)(6,null,j?.path)))},ie=`${K.publisher}.${K.name}`,J=H.translations[ie];if(J)try{const j=u.URI.file(J),ee=(await this.fileService.readFile(j)).value.toString(),X=[],te=(0,f.parse)(ee,X);return X.length>0?(G(j,X),{values:void 0,default:U}):(0,f.getNodeType)(te)!=="object"?($(j),{values:void 0,default:U}):{values:te.contents?te.contents.package:void 0,default:U}}catch{return{values:void 0,default:U}}else{if(!await this.fileService.exists(U))return;let ee;try{ee=await this.findMessageBundles(B,H)}catch{return}if(!ee.localized)return{values:void 0,default:ee.original};try{const X=(await this.fileService.readFile(ee.localized)).value.toString(),te=[],Z=(0,f.parse)(X,te);return te.length>0?(G(ee.localized,te),{values:void 0,default:ee.original}):(0,f.getNodeType)(Z)!=="object"?($(ee.localized),{values:void 0,default:ee.original}):{values:Z,default:ee.original}}catch{return{values:void 0,default:ee.original}}}}async resolveOriginalMessageBundle(B,K){if(B)try{const H=(await this.fileService.readFile(B)).value.toString();return(0,f.parse)(H,K)}catch{}}findMessageBundles(B,K){return new Promise((H,U)=>{const G=$=>{const ie=(0,r.joinPath)(B,`package.nls.${$}.json`);this.fileService.exists(ie).then(J=>{J&&H({localized:ie,original:(0,r.joinPath)(B,"package.nls.json")});const j=$.lastIndexOf("-");j===-1?H({localized:(0,r.joinPath)(B,"package.nls.json"),original:null}):($=$.substring(0,j),G($))})};if(K.devMode||K.pseudo||!K.language)return H({localized:(0,r.joinPath)(B,"package.nls.json"),original:null});G(K.language)})}formatMessage(B,K){return`[${B.path}]: ${K}`}};x=fe([O(1,A.IExtensionsProfileScannerService),O(2,L.IUriIdentityService),O(3,g.IFileService),O(4,E.ILogService)],x);let F=class extends x{constructor(B,K,H,U,G,$,ie){super(K,U,G,$,ie),this.currentProfile=B,this.userDataProfilesService=H,this.cacheValidatorThrottler=this._register(new y.ThrottledDelayer(3e3)),this._onDidChangeCache=this._register(new I.Emitter),this.onDidChangeCache=this._onDidChangeCache.event}async scanExtensions(B){const K=this.getCacheFile(B),H=await this.readExtensionCache(K);if(this.input=B,H&&H.input&&P.equals(H.input,this.input))return this.logService.debug("Using cached extensions scan result",B.location.toString()),this.cacheValidatorThrottler.trigger(()=>this.validateCache()),H.result.map(G=>(G.location=u.URI.revive(G.location),G));const U=await super.scanExtensions(B);return await this.writeExtensionCache(K,{input:B,result:U}),U}async readExtensionCache(B){try{const K=await this.fileService.readFile(B),H=JSON.parse(K.value.toString());return{result:H.result,input:(0,_.revive)(H.input)}}catch(K){this.logService.debug("Error while reading the extension cache file:",B.path,(0,T.getErrorMessage)(K))}return null}async writeExtensionCache(B,K){try{await this.fileService.writeFile(B,D.VSBuffer.fromString(JSON.stringify(K)))}catch(H){this.logService.debug("Error while writing the extension cache file:",B.path,(0,T.getErrorMessage)(H))}}async validateCache(){if(!this.input)return;const B=this.getCacheFile(this.input),K=await this.readExtensionCache(B);if(!K)return;const H=K.result,U=JSON.parse(JSON.stringify(await super.scanExtensions(this.input)));if(!b.equals(U,H))try{this.logService.info("Invalidating Cache",H,U),await this.fileService.del(B),this._onDidChangeCache.fire()}catch(G){this.logService.error(G)}}getCacheFile(B){const K=this.getProfile(B);return this.uriIdentityService.extUri.joinPath(K.cacheHome,B.type===0?l.BUILTIN_MANIFEST_CACHE_FILE:l.USER_MANIFEST_CACHE_FILE)}getProfile(B){return B.type===0?this.userDataProfilesService.defaultProfile:B.profile?this.uriIdentityService.extUri.isEqual(B.location,this.currentProfile.extensionsResource)?this.currentProfile:this.userDataProfilesService.profiles.find(K=>this.uriIdentityService.extUri.isEqual(B.location,K.extensionsResource))??this.currentProfile:this.userDataProfilesService.defaultProfile}};F=fe([O(2,k.IUserDataProfilesService),O(3,A.IExtensionsProfileScannerService),O(4,L.IUriIdentityService),O(5,g.IFileService),O(6,E.ILogService)],F);function V(z,B){const K=(0,c.getExtensionId)(z.manifest.publisher,z.manifest.name);return{id:K,identifier:new l.ExtensionIdentifier(K),isBuiltin:z.type===0,isUserBuiltin:z.type===1&&z.isBuiltin,isUnderDevelopment:B,extensionLocation:z.location,uuid:z.identifier.uuid,targetPlatform:z.targetPlatform,...z.manifest}}e.toExtensionDescription=V;class W extends N{constructor(B,K,H,U,G,$,ie,J,j,ee,X,te){super(B,K,(0,r.joinPath)(H,".vscode-oss-dev","extensions","control.json"),U,G,$,ie,J,j,ee,X,te),this.translationsPromise=(async()=>{if(a.translationsConfigFile)try{const Z=await this.fileService.readFile(u.URI.file(a.translationsConfigFile));return JSON.parse(Z.value.toString())}catch{}return Object.create(null)})()}getTranslations(B){return this.translationsPromise}}e.NativeExtensionsScannerService=W}),define(Q[3430],Y([1,0,11,116,64,30,714,25,91,10]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsProfileScannerService=void 0;let S=class extends T.AbstractExtensionsProfileScannerService{constructor(a,r,i,s,o,u){super(m.URI.file(a.extensionsPath),r,i,s,o,u)}};e.ExtensionsProfileScannerService=S,e.ExtensionsProfileScannerService=S=fe([O(0,v.INativeEnvironmentService),O(1,f.IFileService),O(2,y.IUserDataProfilesService),O(3,b.IUriIdentityService),O(4,D.ITelemetryService),O(5,t.ILogService)],S)}),define(Q[24],Y([1,0,14,6,4,173,17,836,5,116]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.logStorage=e.InMemoryStorageService=e.isProfileUsingDefaultStorage=e.AbstractStorageService=e.loadKeyTargets=e.StorageTarget=e.StorageScope=e.WillSaveStateReason=e.IStorageService=e.TARGET_KEY=e.IS_NEW_KEY=void 0,e.IS_NEW_KEY="__$__isNewStorageMarker",e.TARGET_KEY="__$__targetStorageMarker",e.IStorageService=(0,v.createDecorator)("storageService");var S;(function(d){d[d.NONE=0]="NONE",d[d.SHUTDOWN=1]="SHUTDOWN"})(S||(e.WillSaveStateReason=S={}));var h;(function(d){d[d.APPLICATION=-1]="APPLICATION",d[d.PROFILE=0]="PROFILE",d[d.WORKSPACE=1]="WORKSPACE"})(h||(e.StorageScope=h={}));var a;(function(d){d[d.USER=0]="USER",d[d.MACHINE=1]="MACHINE"})(a||(e.StorageTarget=a={}));function r(d){const p=d.get(e.TARGET_KEY);if(p)try{return JSON.parse(p)}catch{}return Object.create(null)}e.loadKeyTargets=r;class i extends b.Disposable{static{this.DEFAULT_FLUSH_INTERVAL=60*1e3}constructor(p={flushInterval:i.DEFAULT_FLUSH_INTERVAL}){super(),this.options=p,this._onDidChangeValue=this._register(new y.PauseableEmitter),this._onDidChangeTarget=this._register(new y.PauseableEmitter),this.onDidChangeTarget=this._onDidChangeTarget.event,this._onWillSaveState=this._register(new y.Emitter),this.onWillSaveState=this._onWillSaveState.event,this.flushWhenIdleScheduler=this._register(new t.RunOnceScheduler(()=>this.doFlushWhenIdle(),this.options.flushInterval)),this.runFlushWhenIdle=this._register(new b.MutableDisposable),this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(p,c,l){return y.Event.filter(this._onDidChangeValue.event,n=>n.scope===p&&(c===void 0||n.key===c),l)}doFlushWhenIdle(){this.runFlushWhenIdle.value=(0,t.runWhenIdle)(()=>{this.shouldFlushWhenIdle()&&this.flush(),this.flushWhenIdleScheduler.schedule()})}shouldFlushWhenIdle(){return!0}stopFlushWhenIdle(){(0,b.dispose)([this.runFlushWhenIdle,this.flushWhenIdleScheduler])}initialize(){return this.initializationPromise||(this.initializationPromise=(async()=>{(0,D.mark)("code/willInitStorage");try{await this.doInitialize()}finally{(0,D.mark)("code/didInitStorage")}this.flushWhenIdleScheduler.schedule()})()),this.initializationPromise}emitDidChangeValue(p,c){const{key:l,external:n}=c;if(l===e.TARGET_KEY){switch(p){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:p})}else this._onDidChangeValue.fire({scope:p,key:l,target:this.getKeyTargets(p)[l],external:n})}emitWillSaveState(p){this._onWillSaveState.fire({reason:p})}get(p,c,l){return this.getStorage(c)?.get(p,l)}getBoolean(p,c,l){return this.getStorage(c)?.getBoolean(p,l)}getNumber(p,c,l){return this.getStorage(c)?.getNumber(p,l)}getObject(p,c,l){return this.getStorage(c)?.getObject(p,l)}storeAll(p,c){this.withPausedEmitters(()=>{for(const l of p)this.store(l.key,l.value,l.scope,l.target,c)})}store(p,c,l,n,g=!1){if((0,T.isUndefinedOrNull)(c)){this.remove(p,l,g);return}this.withPausedEmitters(()=>{this.updateKeyTarget(p,l,n),this.getStorage(l)?.set(p,c,g)})}remove(p,c,l=!1){this.withPausedEmitters(()=>{this.updateKeyTarget(p,c,void 0),this.getStorage(c)?.delete(p,l)})}withPausedEmitters(p){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{p()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}keys(p,c){const l=[],n=this.getKeyTargets(p);for(const g of Object.keys(n))n[g]===c&&l.push(g);return l}updateKeyTarget(p,c,l,n=!1){const g=this.getKeyTargets(c);typeof l=="number"?g[p]!==l&&(g[p]=l,this.getStorage(c)?.set(e.TARGET_KEY,JSON.stringify(g),n)):typeof g[p]=="number"&&(delete g[p],this.getStorage(c)?.set(e.TARGET_KEY,JSON.stringify(g),n))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(p){switch(p){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(p){const c=this.getStorage(p);return c?r(c):Object.create(null)}isNew(p){return this.getBoolean(e.IS_NEW_KEY,p)===!0}async flush(p=S.NONE){this._onWillSaveState.fire({reason:p});const c=this.getStorage(-1),l=this.getStorage(0),n=this.getStorage(1);switch(p){case S.NONE:await t.Promises.settled([c?.whenFlushed()??Promise.resolve(),l?.whenFlushed()??Promise.resolve(),n?.whenFlushed()??Promise.resolve()]);break;case S.SHUTDOWN:await t.Promises.settled([c?.flush(0)??Promise.resolve(),l?.flush(0)??Promise.resolve(),n?.flush(0)??Promise.resolve()]);break}}async log(){const p=this.getStorage(-1)?.items??new Map,c=this.getStorage(0)?.items??new Map,l=this.getStorage(1)?.items??new Map;return u(p,c,l,this.getLogDetails(-1)??"",this.getLogDetails(0)??"",this.getLogDetails(1)??"")}async switch(p,c){return this.emitWillSaveState(S.NONE),(0,m.isUserDataProfile)(p)?this.switchToProfile(p,c):this.switchToWorkspace(p,c)}canSwitchProfile(p,c){return!(p.id===c.id||s(c)&&s(p))}switchData(p,c,l){this.withPausedEmitters(()=>{const n=new Set;for(const[g,w]of p)n.add(g),c.get(g)!==w&&this.emitDidChangeValue(l,{key:g,external:!0});for(const[g]of c.items)n.has(g)||this.emitDidChangeValue(l,{key:g,external:!0})})}}e.AbstractStorageService=i;function s(d){return d.isDefault||!!d.useDefaultFlags?.globalState}e.isProfileUsingDefaultStorage=s;class o extends i{constructor(){super(),this.applicationStorage=this._register(new f.Storage(new f.InMemoryStorageDatabase,{hint:f.StorageHint.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new f.Storage(new f.InMemoryStorageDatabase,{hint:f.StorageHint.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new f.Storage(new f.InMemoryStorageDatabase,{hint:f.StorageHint.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(p=>this.emitDidChangeValue(1,p))),this._register(this.profileStorage.onDidChangeStorage(p=>this.emitDidChangeValue(0,p))),this._register(this.applicationStorage.onDidChangeStorage(p=>this.emitDidChangeValue(-1,p)))}getStorage(p){switch(p){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}getLogDetails(p){switch(p){case-1:return"inMemory (application)";case 0:return"inMemory (profile)";default:return"inMemory (workspace)"}}async doInitialize(){}async switchToProfile(){}async switchToWorkspace(){}hasScope(p){return!1}}e.InMemoryStorageService=o;async function u(d,p,c,l,n,g){const w=M=>{try{return JSON.parse(M)}catch{return M}},E=new Map,C=new Map;d.forEach((M,N)=>{E.set(N,M),C.set(N,w(M))});const I=new Map,_=new Map;p.forEach((M,N)=>{I.set(N,M),_.set(N,w(M))});const A=new Map,k=new Map;c.forEach((M,N)=>{A.set(N,M),k.set(N,w(M))}),console.group(l!==n?`Storage: Application (path: ${l})`:`Storage: Application & Profile (path: ${l}, default profile)`);const L=[];if(E.forEach((M,N)=>{L.push({key:N,value:M})}),console.table(L),console.groupEnd(),console.log(C),l!==n){console.group(`Storage: Profile (path: ${n}, profile specific)`);const M=[];I.forEach((N,P)=>{M.push({key:P,value:N})}),console.table(M),console.groupEnd(),console.log(_)}console.group(`Storage: Workspace (path: ${g})`);const R=[];A.forEach((M,N)=>{R.push({key:N,value:M})}),console.table(R),console.groupEnd(),console.log(k)}e.logStorage=u}),define(Q[3431],Y([1,0,773,107,665,1499,106,194,117,848,4,9,24]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionStore=void 0;const r=25,i="recentConnections",s="Microsoft.SqlTools",o="|",u="id:",d="itemtype:",p="Profile";let c=class{constructor(n,g,w,E){this.storageService=n,this.configurationService=g,this.credentialService=w,this.capabilitiesService=E,this.groupIdMap=new t.ReverseLookUpMap,this.connectionConfig=new b.ConnectionConfig(this.configurationService,this.capabilitiesService);try{const C=this.storageService.get(i,-1,"[]");this.mru=JSON.parse(C)}catch{this.mru=[]}this.storageService.onWillSaveState(()=>this.storageService.store(i,JSON.stringify(this.mru),-1,1))}formatCredentialId(n,g){const w=T.ConnectionProfile.fromIConnectionProfile(this.capabilitiesService,n),E=[s];return g||(g=p),E.push(d.concat(g)),E.push(u.concat(w.getConnectionInfoId())),E.join(o)}isPasswordRequired(n){return T.ConnectionProfile.fromIConnectionProfile(this.capabilitiesService,n).isPasswordRequired()}addSavedPassword(n){if(n.savePassword&&this.isPasswordRequired(n)&&!n.password){const g=this.formatCredentialId(n,p);return this.credentialService.readCredential(g).then(async w=>{if(w?.password)n.password=w.password,n.options.password=w.password;else if(n.providerName===v.mssqlProviderName){let E=g.split("|");E.splice(3,0,"applicationName:azdata");const C=E.join("|"),I=await this.credentialService.readCredential(C);I?.password&&(n.password=I.password,n.options.password=I.password,await this.credentialService.deleteCredential(C),await this.credentialService.saveCredential(g,I.password),w.password=I.password)}return{profile:n,savedCred:!!w}})}else return n.authenticationType===v.AuthenticationType.AzureMFA||n.authenticationType===v.AuthenticationType.DSTSAuth&&n.azureAccount?Promise.resolve({profile:n,savedCred:!0}):n.authenticationType===v.AuthenticationType.None?Promise.resolve({profile:n,savedCred:!0}):Promise.resolve({profile:n,savedCred:n.savePassword})}async saveProfile(n,g,w){const E=g?n:this.getProfileWithoutPassword(n),C=await this.saveProfileToConfig(E,w);return E&&(0,S.isDisposable)(E)&&E.dispose(),n.groupId=C.groupId,n.id=C.id,await this.saveProfilePasswordIfNeeded(n),(0,D.fixupConnectionCredentials)(n),n}savePassword(n){return this.saveProfilePasswordIfNeeded(n)}saveProfileGroup(n){return this.connectionConfig.addGroup(n)}async saveProfileToConfig(n,g){return n.saveProfile?await this.connectionConfig.addConnection(n,g):Promise.resolve(n)}async isDuplicateEdit(n,g){return await this.connectionConfig.isDuplicateEdit(n,g)}getRecentlyUsedConnections(n){let g=this.mru.slice();return n&&n.length>0&&(g=g.filter(w=>n.find(E=>E===w.providerName))),this.convertConfigValuesToConnectionProfiles(g)}convertConfigValuesToConnectionProfiles(n){return n.map(g=>{const w=new T.ConnectionProfile(this.capabilitiesService,g);return w.saveProfile&&(!w.groupFullName&&w.groupId&&(w.groupFullName=this.getGroupFullName(w.groupId)),!w.groupId&&w.groupFullName?w.groupId=this.getGroupId(w.groupFullName):!w.groupId&&!w.groupFullName&&(w.groupId=this.getGroupId(""))),w})}getProfileWithoutPassword(n){return T.ConnectionProfile.fromIConnectionProfile(this.capabilitiesService,n).withoutPassword()}addRecentConnection(n){const g=this.getMaxRecentConnectionsCount();return this.addConnectionToState(n,g,n.savePassword)}addConnectionToState(n,g,w){const E=this.convertConfigValuesToConnectionProfiles(this.mru.slice());let C=this.addToConnectionList(n,E);return g&&C.length>g&&(C=C.slice(0,g)),this.mru=C,w?this.doSavePassword(n).then():Promise.resolve()}addToConnectionList(n,g){const w=this.getProfileWithoutPassword(n);return g=g.filter(E=>{let C=E&&E.connectionName===w.connectionName;return C=C&&E.getConnectionInfoId(!1)===w.getConnectionInfoId(!1),C&&w.saveProfile&&(C=E.groupId===w.groupId||f.ConnectionProfileGroup.sameGroupName(E.groupFullName,w.groupFullName)),!C}),g.unshift(w),g.filter(E=>E!==void 0).map(E=>E.toIConnectionProfile())}removeFromConnectionList(n,g){const w=this.getProfileWithoutPassword(n);return g=g.filter(E=>{let C=E&&E.connectionName===w.connectionName;return C=C&&E.getConnectionInfoId(!1)===w.getConnectionInfoId(!1),C&&w.saveProfile&&(C=E.groupId===w.groupId||f.ConnectionProfileGroup.sameGroupName(E.groupFullName,w.groupFullName)),!C}),g.filter(E=>E!==void 0).map(E=>E.toIConnectionProfile())}clearRecentlyUsed(){this.mru=new Array}removeRecentConnection(n){const g=this.convertConfigValuesToConnectionProfiles(this.mru.slice()),w=this.removeFromConnectionList(n,g);this.mru=w}saveProfilePasswordIfNeeded(n){return n.savePassword?this.doSavePassword(n):Promise.resolve(!0)}doSavePassword(n){if(n.password){const g=this.formatCredentialId(n);return this.credentialService.saveCredential(g,n.password)}else return Promise.resolve(!0)}getConnectionProfileGroups(n,g){let w;n||(w=this.connectionConfig.getConnections(!0),g&&g.length>0&&(w=w.filter(C=>g.find(I=>I===C.providerName))));const E=this.connectionConfig.getAllGroups();return this.convertToConnectionGroup(E,w)}convertToConnectionGroup(n,g,w){const E=[],C=n.filter(I=>I.parentId===(w?w.id:void 0));return C&&(C.map(I=>{let _=new f.ConnectionProfileGroup(I.name,w,I.id,I.color,I.description);if(this.addGroupFullNameToMap(I.id,_.fullName),g){let k=g.filter(R=>R.groupId===_.id),L=[];k.forEach(R=>{R.groupFullName=_.fullName,L.push(R)}),_.addConnections(L)}let A=this.convertToConnectionGroup(n,g,_);_.addGroups(A),E.push(_)}),w&&w.addGroups(E)),E}getGroupFromId(n){return this.connectionConfig.getAllGroups().find(w=>w.id===n)}getMaxRecentConnectionsCount(){return this.configurationService.getValue("sql.maxRecentConnections")||r}editGroup(n){return this.connectionConfig.editGroup(n).then()}deleteConnectionFromConfiguration(n){return this.connectionConfig.deleteConnection(n)}deleteGroupFromConfiguration(n){return this.connectionConfig.deleteGroup(n)}changeGroupIdForConnectionGroup(n,g){return this.connectionConfig.changeGroupIdForConnectionGroup(n,g)}canChangeConnectionConfig(n,g){return this.connectionConfig.canChangeConnectionConfig(n,g)}changeGroupIdForConnection(n,g){return this.connectionConfig.changeGroupIdForConnection(n,g).then()}addGroupFullNameToMap(n,g){n&&this.groupIdMap.set(n,g),g!==void 0&&this.groupIdMap.set(g.toUpperCase(),n)}getGroupFullName(n){return this.groupIdMap.has(n)||this.getConnectionProfileGroups(!0),this.groupIdMap.get(n)}getGroupId(n){n===f.ConnectionProfileGroup.GroupNameSeparator&&(n="");const g=n.toUpperCase();return this.groupIdMap.reverseHas(g)||this.getConnectionProfileGroups(!0),this.groupIdMap.reverseGet(g)}};e.ConnectionStore=c,e.ConnectionStore=c=fe([O(0,a.IStorageService),O(1,h.IConfigurationService),O(2,m.ICredentialsService),O(3,y.ICapabilitiesService)],c)}),define(Q[3432],Y([1,0,42,9,24,23,1999]),function(q,e,t,y,b,D,T){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationUpgraderContribution=void 0;const v=(0,t.deepFreeze)({"sql.saveAsCsv.includeHeaders":"queryEditor.results.saveAsCsv.includeHeaders","sql.saveAsCsv.delimiter":"queryEditor.results.saveAsCsv.delimiter","sql.saveAsCsv.lineSeperator":"queryEditor.results.saveAsCsv.lineSeperator","sql.saveAsCsv.textIdentifier":"queryEditor.results.saveAsCsv.textIdentifier","sql.saveAsCsv.encoding":"queryEditor.results.saveAsCsv.encoding","sql.results.streaming":"queryEditor.results.streaming","sql.saveAsXml.formatted":"queryEditor.results.saveAsXml.formatted","sql.saveAsXml.encoding":"queryEditor.results.saveAsXml.encoding","sql.copyIncludeHeaders":"queryEditor.results.copyIncludeHeaders","sql.copyRemoveNewLine":"queryEditor.results.copyRemoveNewLine","sql.showBatchTime":"queryEditor.messages.showBatchTime","sql.chart.defaultChartType":"queryEditor.chart.defaultChartType","sql.tabColorMode":"queryEditor.tabColorMode","sql.showConnectionInfoInTitle":"queryEditor.showConnectionInfoInTitle","sql.promptToSaveGeneratedFiles":"queryEditor.promptToSaveGeneratedFiles"});let m=class{static{f=this}static{this.STORAGE_KEY="configurationUpgrader"}constructor(h,a,r){this.storageService=h,this.configurationService=a,this.notificationService=r,this.globalStorage=JSON.parse(this.storageService.get(f.STORAGE_KEY,-1,"{}")),this.workspaceStorage=JSON.parse(this.storageService.get(f.STORAGE_KEY,1,"{}")),this.processingPromise=(async()=>{await this.processSettings(),this.storageService.store(f.STORAGE_KEY,JSON.stringify(this.globalStorage),-1,1),this.storageService.store(f.STORAGE_KEY,JSON.stringify(this.workspaceStorage),1,1)})()}async processSettings(){for(const h in v){const a=v[h],r=this.configurationService.inspect(h);this.globalStorage[h]!==!0&&r.userValue&&(await this.configurationService.updateValue(a,r.userValue,2),this.globalStorage[h]=!0,this.notificationService.info((0,T.localize)(0,null,h,a))),this.workspaceStorage[h]!==!0&&r.workspaceValue&&(await this.configurationService.updateValue(a,r.workspaceValue,5),this.workspaceStorage[h]=!0,this.notificationService.info((0,T.localize)(1,null,h,a)))}}};e.ConfigurationUpgraderContribution=m,e.ConfigurationUpgraderContribution=m=f=fe([O(0,b.IStorageService),O(1,y.IConfigurationService),O(2,D.INotificationService)],m)}),define(Q[3433],Y([1,0,14,202,69,27,1145,35,5,24]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensCache=e.ICodeLensCache=void 0,e.ICodeLensCache=(0,v.createDecorator)("ICodeLensCache");class S{constructor(r,i){this.lineCount=r,this.data=i}}let h=class{constructor(r){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new b.LRUCache(20,.75);const i="codelens/cache";(0,t.runWhenIdle)(()=>r.remove(i,1));const s="codelens/cache2",o=r.get(s,1,"{}");this._deserialize(o),(0,y.once)(r.onWillSaveState)(u=>{u.reason===m.WillSaveStateReason.SHUTDOWN&&r.store(s,this._serialize(),1,1)})}put(r,i){const s=i.lenses.map(d=>({range:d.symbol.range,command:d.symbol.command&&{id:"",title:d.symbol.command?.title}})),o=new T.CodeLensModel;o.add({lenses:s,dispose:()=>{}},this._fakeProvider);const u=new S(r.getLineCount(),o);this._cache.set(r.uri.toString(),u)}get(r){const i=this._cache.get(r.uri.toString());return i&&i.lineCount===r.getLineCount()?i.data:void 0}delete(r){this._cache.delete(r.uri.toString())}_serialize(){const r=Object.create(null);for(const[i,s]of this._cache){const o=new Set;for(const u of s.data.lenses)o.add(u.symbol.range.startLineNumber);r[i]={lineCount:s.lineCount,lines:[...o.values()]}}return JSON.stringify(r)}_deserialize(r){try{const i=JSON.parse(r);for(const s in i){const o=i[s],u=[];for(const p of o.lines)u.push({range:new D.Range(p,1,p,11)});const d=new T.CodeLensModel;d.add({lenses:u,dispose(){}},this._fakeProvider),this._cache.set(s,new S(o.lineCount,d))}}catch{}}};e.CodeLensCache=h,e.CodeLensCache=h=fe([O(0,m.IStorageService)],h),(0,f.registerSingleton)(e.ICodeLensCache,h,1)}),define(Q[1236],Y([1,0,14,15,4,390,48,133,73,1145,3433,3401,2371,28,23,43,328,74]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensContribution=void 0;let d=class{static{this.ID="css.editor.codeLens"}constructor(c,l,n,g,w,E){this._editor=c,this._languageFeaturesService=l,this._commandService=g,this._notificationService=w,this._codeLensCache=E,this._disposables=new b.DisposableStore,this._localToDispose=new b.DisposableStore,this._lenses=[],this._oldCodeLensModels=new b.DisposableStore,this._provideCodeLensDebounce=n.for(l.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(l.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new t.RunOnceScheduler(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(C=>{(C.hasChanged(49)||C.hasChanged(18)||C.hasChanged(17))&&this._updateLensStyle(),C.hasChanged(16)&&this._onModelChange()})),this._disposables.add(l.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),this._currentCodeLensModel?.dispose()}_getLayoutInfo(){const c=Math.max(1.3,this._editor.getOption(65)/this._editor.getOption(51));let l=this._editor.getOption(18);return(!l||l<5)&&(l=this._editor.getOption(51)*.9|0),{fontSize:l,codeLensHeight:l*c|0}}_updateLensStyle(){const{codeLensHeight:c,fontSize:l}=this._getLayoutInfo(),n=this._editor.getOption(17),g=this._editor.getOption(49),{style:w}=this._editor.getContainerDomNode();w.setProperty("--vscode-editorCodeLens-lineHeight",`${c}px`),w.setProperty("--vscode-editorCodeLens-fontSize",`${l}px`),w.setProperty("--vscode-editorCodeLens-fontFeatureSettings",g.fontFeatureSettings),n&&(w.setProperty("--vscode-editorCodeLens-fontFamily",n),w.setProperty("--vscode-editorCodeLens-fontFamilyDefault",f.EDITOR_FONT_DEFAULTS.fontFamily)),this._editor.changeViewZones(E=>{for(const C of this._lenses)C.updateHeight(c,E)})}_localDispose(){this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=void 0,this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),this._currentCodeLensModel?.dispose()}_onModelChange(){this._localDispose();const c=this._editor.getModel();if(!c||!this._editor.getOption(16))return;const l=this._codeLensCache.get(c);if(l&&this._renderCodeLensSymbols(l),!this._languageFeaturesService.codeLensProvider.has(c)){l&&this._localToDispose.add((0,t.disposableTimeout)(()=>{const g=this._codeLensCache.get(c);l===g&&(this._codeLensCache.delete(c),this._onModelChange())},30*1e3));return}for(const g of this._languageFeaturesService.codeLensProvider.all(c))if(typeof g.onDidChange=="function"){const w=g.onDidChange(()=>n.schedule());this._localToDispose.add(w)}const n=new t.RunOnceScheduler(()=>{const g=Date.now();this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=(0,t.createCancelablePromise)(w=>(0,m.getCodeLensModel)(this._languageFeaturesService.codeLensProvider,c,w)),this._getCodeLensModelPromise.then(w=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=w,this._codeLensCache.put(c,w);const E=this._provideCodeLensDebounce.update(c,Date.now()-g);n.delay=E,this._renderCodeLensSymbols(w),this._resolveCodeLensesInViewportSoon()},y.onUnexpectedError)},this._provideCodeLensDebounce.get(c));this._localToDispose.add(n),this._localToDispose.add((0,b.toDisposable)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(g=>{this._editor.changeViewZones(w=>{const E=[];let C=-1;this._lenses.forEach(_=>{!_.isValid()||C===_.getLineNumber()?E.push(_):(_.update(w),C=_.getLineNumber())});const I=new h.CodeLensHelper;E.forEach(_=>{_.dispose(I,w),this._lenses.splice(this._lenses.indexOf(_),1)}),I.commit(g)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(g=>{g.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add((0,b.toDisposable)(()=>{if(this._editor.getModel()){const g=D.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(w=>{this._editor.changeViewZones(E=>{this._disposeAllLenses(w,E)})}),g.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(g=>{if(g.target.type!==9)return;let w=g.target.element;if(w?.tagName==="SPAN"&&(w=w.parentElement),w?.tagName==="A")for(const E of this._lenses){const C=E.getCommand(w);if(C){this._commandService.executeCommand(C.id,...C.arguments||[]).catch(I=>this._notificationService.error(I));break}}})),n.schedule()}_disposeAllLenses(c,l){const n=new h.CodeLensHelper;for(const g of this._lenses)g.dispose(n,l);c&&n.commit(c),this._lenses.length=0}_renderCodeLensSymbols(c){if(!this._editor.hasModel())return;const l=this._editor.getModel().getLineCount(),n=[];let g;for(const C of c.lenses){const I=C.symbol.range.startLineNumber;I<1||I>l||(g&&g[g.length-1].symbol.range.startLineNumber===I?g.push(C):(g=[C],n.push(g)))}if(!n.length&&!this._lenses.length)return;const w=D.StableEditorScrollState.capture(this._editor),E=this._getLayoutInfo();this._editor.changeDecorations(C=>{this._editor.changeViewZones(I=>{const _=new h.CodeLensHelper;let A=0,k=0;for(;k<n.length&&A<this._lenses.length;){const L=n[k][0].symbol.range.startLineNumber,R=this._lenses[A].getLineNumber();R<L?(this._lenses[A].dispose(_,I),this._lenses.splice(A,1)):R===L?(this._lenses[A].updateCodeLensSymbols(n[k],_),k++,A++):(this._lenses.splice(A,0,new h.CodeLensWidget(n[k],this._editor,_,I,E.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),A++,k++)}for(;A<this._lenses.length;)this._lenses[A].dispose(_,I),this._lenses.splice(A,1);for(;k<n.length;)this._lenses.push(new h.CodeLensWidget(n[k],this._editor,_,I,E.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),k++;_.commit(C)})}),w.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0;const c=this._editor.getModel();if(!c)return;const l=[],n=[];if(this._lenses.forEach(E=>{const C=E.computeIfNecessary(c);C&&(l.push(C),n.push(E))}),l.length===0)return;const g=Date.now(),w=(0,t.createCancelablePromise)(E=>{const C=l.map((I,_)=>{const A=new Array(I.length),k=I.map((L,R)=>!L.symbol.command&&typeof L.provider.resolveCodeLens=="function"?Promise.resolve(L.provider.resolveCodeLens(c,L.symbol,E)).then(M=>{A[R]=M},y.onUnexpectedExternalError):(A[R]=L.symbol,Promise.resolve(void 0)));return Promise.all(k).then(()=>{!E.isCancellationRequested&&!n[_].isDisposed()&&n[_].updateCommands(A)})});return Promise.all(C)});this._resolveCodeLensesPromise=w,this._resolveCodeLensesPromise.then(()=>{const E=this._resolveCodeLensesDebounce.update(c,Date.now()-g);this._resolveCodeLensesScheduler.delay=E,this._currentCodeLensModel&&this._codeLensCache.put(c,this._currentCodeLensModel),this._oldCodeLensModels.clear(),w===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},E=>{(0,y.onUnexpectedError)(E),w===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};e.CodeLensContribution=d,e.CodeLensContribution=d=fe([O(1,u.ILanguageFeaturesService),O(2,o.ILanguageFeatureDebounceService),O(3,r.ICommandService),O(4,i.INotificationService),O(5,S.ICodeLensCache)],d),(0,T.registerEditorContribution)(d.ID,d,1),(0,T.registerEditorAction)(class extends T.EditorAction{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:v.EditorContextKeys.hasCodeLensProvider,label:(0,a.localize)(0,null),alias:"Show CodeLens Commands For Current Line"})}async run(c,l){if(!l.hasModel())return;const n=c.get(s.IQuickInputService),g=c.get(r.ICommandService),w=c.get(i.INotificationService),E=l.getSelection().positionLineNumber,C=l.getContribution(d.ID);if(!C)return;const I=C.getModel();if(!I)return;const _=[];for(const k of I.lenses)k.symbol.command&&k.symbol.range.startLineNumber===E&&_.push({label:k.symbol.command.title,command:k.symbol.command});if(_.length===0)return;const A=await n.pick(_,{canPickMany:!1});if(A){if(I.isDisposed)return await g.executeCommand(this.id);try{await g.executeCommand(A.command.id,...A.command.arguments||[])}catch(k){w.error(k)}}}})}),define(Q[518],Y([1,0,14,4,33,48,232,73,137,352,3404,517,711,2383,13,68,8,29,38,23,43,24,19]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.StartFindReplaceAction=e.PreviousSelectionMatchFindAction=e.NextSelectionMatchFindAction=e.SelectionMatchFindAction=e.MoveToMatchFindAction=e.PreviousMatchFindAction=e.NextMatchFindAction=e.MatchFindAction=e.StartFindWithSelectionAction=e.StartFindWithArgsAction=e.StartFindAction=e.FindController=e.CommonFindController=e.FindStartFocusAction=e.getSelectionSearchString=void 0;const w=524288;function E(z,B="single",K=!1){if(!z.hasModel())return null;const H=z.getSelection();if(B==="single"&&H.startLineNumber===H.endLineNumber||B==="multiple"){if(H.isEmpty()){const U=z.getConfiguredWordAtPosition(H.getStartPosition());if(U&&K===!1)return U.word}else if(z.getModel().getValueLengthInRange(H)<w)return z.getModel().getValueInRange(H)}return null}e.getSelectionSearchString=E;var C;(function(z){z[z.NoFocusChange=0]="NoFocusChange",z[z.FocusFindInput=1]="FocusFindInput",z[z.FocusReplaceInput=2]="FocusReplaceInput"})(C||(e.FindStartFocusAction=C={}));let I=class extends y.Disposable{static{g=this}static{this.ID="editor.contrib.findController"}get editor(){return this._editor}static get(B){return B.getContribution(g.ID)}constructor(B,K,H,U){super(),this._editor=B,this._findWidgetVisible=m.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(K),this._contextKeyService=K,this._storageService=H,this._clipboardService=U,this._updateHistoryDelayer=new t.Delayer(500),this._state=this._register(new h.FindReplaceState),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(G=>this._onStateChanged(G))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const G=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),G&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(40).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(B){this.saveQueryState(B),B.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),B.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(B){B.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),B.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),B.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),B.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!m.CONTEXT_FIND_INPUT_FOCUSED.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){const B=this._editor.getSelections();B.map(K=>(K.endColumn===1&&K.endLineNumber>K.startLineNumber&&(K=K.setEndPosition(K.endLineNumber-1,this._editor.getModel().getLineMaxColumn(K.endLineNumber-1))),K.isEmpty()?null:K)).filter(K=>!!K),B.length&&this._state.change({searchScope:B},!0)}}setSearchString(B){this._state.isRegex&&(B=b.escapeRegExpCharacters(B)),this._state.change({searchString:B},!1)}highlightFindOptions(B=!1){}async _start(B,K){if(this.disposeModel(),!this._editor.hasModel())return;const H={...K,isRevealed:!0};if(B.seedSearchStringFromSelection==="single"){const U=E(this._editor,B.seedSearchStringFromSelection,B.seedSearchStringFromNonEmptySelection);U&&(this._state.isRegex?H.searchString=b.escapeRegExpCharacters(U):H.searchString=U)}else if(B.seedSearchStringFromSelection==="multiple"&&!B.updateSearchScope){const U=E(this._editor,B.seedSearchStringFromSelection);U&&(H.searchString=U)}if(!H.searchString&&B.seedSearchStringFromGlobalClipboard){const U=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;U&&(H.searchString=U)}if(B.forceRevealReplace||H.isReplaceRevealed?H.isReplaceRevealed=!0:this._findWidgetVisible.get()||(H.isReplaceRevealed=!1),B.updateSearchScope){const U=this._editor.getSelections();U.some(G=>!G.isEmpty())&&(H.searchScope=U)}H.loop=B.loop,this._state.change(H,!1),this._model||(this._model=new m.FindModelBoundToEditorModel(this._editor,this._state))}start(B,K){return this._start(B,K)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(B){return this._model?(this._model.moveToMatch(B),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}async getGlobalBufferTerm(){return this._editor.getOption(40).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(B){this._editor.getOption(40).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(B)}};e.CommonFindController=I,e.CommonFindController=I=g=fe([O(1,o.IContextKeyService),O(2,l.IStorageService),O(3,s.IClipboardService)],I);let _=class extends I{constructor(B,K,H,U,G,$,ie,J){super(B,H,ie,J),this._contextViewService=K,this._keybindingService=U,this._themeService=G,this._notificationService=$,this._widget=null,this._findOptionsWidget=null}async _start(B,K){this._widget||this._createFindWidget();const H=this._editor.getSelection();let U=!1;switch(this._editor.getOption(40).autoFindInSelection){case"always":U=!0;break;case"never":U=!1;break;case"multiline":{U=!!H&&H.startLineNumber!==H.endLineNumber;break}default:break}B.updateSearchScope=B.updateSearchScope||U,await super._start(B,K),this._widget&&(B.shouldFocus===2?this._widget.focusReplaceInput():B.shouldFocus===1&&this._widget.focusFindInput())}highlightFindOptions(B=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!B?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new a.FindWidget(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new S.FindOptionsWidget(this._editor,this._state,this._keybindingService))}saveViewState(){return this._widget?.getViewState()}restoreViewState(B){this._widget?.setViewState(B)}};e.FindController=_,e.FindController=_=fe([O(1,u.IContextViewService),O(2,o.IContextKeyService),O(3,d.IKeybindingService),O(4,n.IThemeService),O(5,p.INotificationService),O(6,l.IStorageService),O(7,s.IClipboardService)],_),e.StartFindAction=(0,D.registerMultiEditorAction)(new D.MultiEditorAction({id:m.FIND_IDS.StartFindAction,label:r.localize(0,null),alias:"Find",precondition:o.ContextKeyExpr.or(f.EditorContextKeys.focus,o.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:i.MenuId.MenubarEditMenu,group:"3_find",title:r.localize(1,null),order:1}})),e.StartFindAction.addImplementation(0,(z,B,K)=>{const H=I.get(B);return H?H.start({forceRevealReplace:!1,seedSearchStringFromSelection:B.getOption(40).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:B.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:B.getOption(40).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:B.getOption(40).loop}):!1});const A={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:r.localize(2,null)},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:r.localize(3,null)},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:r.localize(4,null)},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:r.localize(5,null)},findInSelection:{type:"boolean"}}}}]};class k extends D.EditorAction{constructor(){super({id:m.FIND_IDS.StartFindWithArgs,label:r.localize(6,null),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:A})}async run(B,K,H){const U=I.get(K);if(U){const G=H?{searchString:H.searchString,replaceString:H.replaceString,isReplaceRevealed:H.replaceString!==void 0,isRegex:H.isRegex,wholeWord:H.matchWholeWord,matchCase:H.isCaseSensitive,preserveCase:H.preserveCase}:{};await U.start({forceRevealReplace:!1,seedSearchStringFromSelection:U.getState().searchString.length===0&&K.getOption(40).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:K.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:H?.findInSelection||!1,loop:K.getOption(40).loop},G),U.setGlobalBufferTerm(U.getState().searchString)}}}e.StartFindWithArgsAction=k;class L extends D.EditorAction{constructor(){super({id:m.FIND_IDS.StartFindWithSelection,label:r.localize(7,null),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(B,K){const H=I.get(K);H&&(await H.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:K.getOption(40).loop}),H.setGlobalBufferTerm(H.getState().searchString))}}e.StartFindWithSelectionAction=L;class R extends D.EditorAction{async run(B,K){const H=I.get(K);H&&!this._run(H)&&(await H.start({forceRevealReplace:!1,seedSearchStringFromSelection:H.getState().searchString.length===0&&K.getOption(40).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:K.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:K.getOption(40).loop}),this._run(H))}}e.MatchFindAction=R;class M extends R{constructor(){super({id:m.FIND_IDS.NextMatchFindAction,label:r.localize(8,null),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:f.EditorContextKeys.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:o.ContextKeyExpr.and(f.EditorContextKeys.focus,m.CONTEXT_FIND_INPUT_FOCUSED),primary:3,weight:100}]})}_run(B){return B.moveToNextMatch()?(B.editor.pushUndoStop(),!0):!1}}e.NextMatchFindAction=M;class N extends R{constructor(){super({id:m.FIND_IDS.PreviousMatchFindAction,label:r.localize(9,null),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:f.EditorContextKeys.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:o.ContextKeyExpr.and(f.EditorContextKeys.focus,m.CONTEXT_FIND_INPUT_FOCUSED),primary:1027,weight:100}]})}_run(B){return B.moveToPrevMatch()}}e.PreviousMatchFindAction=N;class P extends D.EditorAction{constructor(){super({id:m.FIND_IDS.GoToMatchFindAction,label:r.localize(10,null),alias:"Go to Match...",precondition:m.CONTEXT_FIND_WIDGET_VISIBLE}),this._highlightDecorations=[]}run(B,K,H){const U=I.get(K);if(!U)return;const G=U.getState().matchesCount;if(G<1){B.get(p.INotificationService).notify({severity:p.Severity.Warning,message:r.localize(11,null)});return}const ie=B.get(c.IQuickInputService).createInputBox();ie.placeholder=r.localize(12,null,G);const J=ee=>{const X=parseInt(ee);if(isNaN(X))return;const te=U.getState().matchesCount;if(X>0&&X<=te)return X-1;if(X<0&&X>=-te)return te+X},j=ee=>{const X=J(ee);if(typeof X=="number"){ie.validationMessage=void 0,U.goToMatch(X);const te=U.getState().currentMatch;te&&this.addDecorations(K,te)}else ie.validationMessage=r.localize(13,null,U.getState().matchesCount),this.clearDecorations(K)};ie.onDidChangeValue(ee=>{j(ee)}),ie.onDidAccept(()=>{const ee=J(ie.value);typeof ee=="number"?(U.goToMatch(ee),ie.hide()):ie.validationMessage=r.localize(14,null,U.getState().matchesCount)}),ie.onDidHide(()=>{this.clearDecorations(K),ie.dispose()}),ie.show()}clearDecorations(B){B.changeDecorations(K=>{this._highlightDecorations=K.deltaDecorations(this._highlightDecorations,[])})}addDecorations(B,K){B.changeDecorations(H=>{this._highlightDecorations=H.deltaDecorations(this._highlightDecorations,[{range:K,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:K,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:(0,n.themeColorFromId)(T.overviewRulerRangeHighlight),position:v.OverviewRulerLane.Full}}}])})}}e.MoveToMatchFindAction=P;class x extends D.EditorAction{async run(B,K){const H=I.get(K);if(!H)return;const U=E(K,"single",!1);U&&H.setSearchString(U),this._run(H)||(await H.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:K.getOption(40).loop}),this._run(H))}}e.SelectionMatchFindAction=x;class F extends x{constructor(){super({id:m.FIND_IDS.NextSelectionMatchFindAction,label:r.localize(15,null),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:f.EditorContextKeys.focus,primary:2109,weight:100}})}_run(B){return B.moveToNextMatch()}}e.NextSelectionMatchFindAction=F;class V extends x{constructor(){super({id:m.FIND_IDS.PreviousSelectionMatchFindAction,label:r.localize(16,null),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:f.EditorContextKeys.focus,primary:3133,weight:100}})}_run(B){return B.moveToPrevMatch()}}e.PreviousSelectionMatchFindAction=V,e.StartFindReplaceAction=(0,D.registerMultiEditorAction)(new D.MultiEditorAction({id:m.FIND_IDS.StartFindReplaceAction,label:r.localize(17,null),alias:"Replace",precondition:o.ContextKeyExpr.or(f.EditorContextKeys.focus,o.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:i.MenuId.MenubarEditMenu,group:"3_find",title:r.localize(18,null),order:2}})),e.StartFindReplaceAction.addImplementation(0,(z,B,K)=>{if(!B.hasModel()||B.getOption(89))return!1;const H=I.get(B);if(!H)return!1;const U=B.getSelection(),G=H.isFindInputFocused(),$=!U.isEmpty()&&U.startLineNumber===U.endLineNumber&&B.getOption(40).seedSearchStringFromSelection!=="never"&&!G,ie=G||$?2:1;return H.start({forceRevealReplace:!0,seedSearchStringFromSelection:$?"single":"none",seedSearchStringFromNonEmptySelection:B.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:B.getOption(40).seedSearchStringFromSelection!=="never",shouldFocus:ie,shouldAnimate:!0,updateSearchScope:!1,loop:B.getOption(40).loop})}),(0,D.registerEditorContribution)(I.ID,_,0),(0,D.registerEditorAction)(k),(0,D.registerEditorAction)(L),(0,D.registerEditorAction)(M),(0,D.registerEditorAction)(N),(0,D.registerEditorAction)(P),(0,D.registerEditorAction)(F),(0,D.registerEditorAction)(V);const W=D.EditorCommand.bindToContribution(I.get);(0,D.registerEditorCommand)(new W({id:m.FIND_IDS.CloseFindWidgetCommand,precondition:m.CONTEXT_FIND_WIDGET_VISIBLE,handler:z=>z.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:o.ContextKeyExpr.and(f.EditorContextKeys.focus,o.ContextKeyExpr.not("isComposing")),primary:9,secondary:[1033]}})),(0,D.registerEditorCommand)(new W({id:m.FIND_IDS.ToggleCaseSensitiveCommand,precondition:void 0,handler:z=>z.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:f.EditorContextKeys.focus,primary:m.ToggleCaseSensitiveKeybinding.primary,mac:m.ToggleCaseSensitiveKeybinding.mac,win:m.ToggleCaseSensitiveKeybinding.win,linux:m.ToggleCaseSensitiveKeybinding.linux}})),(0,D.registerEditorCommand)(new W({id:m.FIND_IDS.ToggleWholeWordCommand,precondition:void 0,handler:z=>z.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:f.EditorContextKeys.focus,primary:m.ToggleWholeWordKeybinding.primary,mac:m.ToggleWholeWordKeybinding.mac,win:m.ToggleWholeWordKeybinding.win,linux:m.ToggleWholeWordKeybinding.linux}})),(0,D.registerEditorCommand)(new W({id:m.FIND_IDS.ToggleRegexCommand,precondition:void 0,handler:z=>z.toggleRegex(),kbOpts:{weight:100+5,kbExpr:f.EditorContextKeys.focus,primary:m.ToggleRegexKeybinding.primary,mac:m.ToggleRegexKeybinding.mac,win:m.ToggleRegexKeybinding.win,linux:m.ToggleRegexKeybinding.linux}})),(0,D.registerEditorCommand)(new W({id:m.FIND_IDS.ToggleSearchScopeCommand,precondition:void 0,handler:z=>z.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:f.EditorContextKeys.focus,primary:m.ToggleSearchScopeKeybinding.primary,mac:m.ToggleSearchScopeKeybinding.mac,win:m.ToggleSearchScopeKeybinding.win,linux:m.ToggleSearchScopeKeybinding.linux}})),(0,D.registerEditorCommand)(new W({id:m.FIND_IDS.TogglePreserveCaseCommand,precondition:void 0,handler:z=>z.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:f.EditorContextKeys.focus,primary:m.TogglePreserveCaseKeybinding.primary,mac:m.TogglePreserveCaseKeybinding.mac,win:m.TogglePreserveCaseKeybinding.win,linux:m.TogglePreserveCaseKeybinding.linux}})),(0,D.registerEditorCommand)(new W({id:m.FIND_IDS.ReplaceOneAction,precondition:m.CONTEXT_FIND_WIDGET_VISIBLE,handler:z=>z.replace(),kbOpts:{weight:100+5,kbExpr:f.EditorContextKeys.focus,primary:3094}})),(0,D.registerEditorCommand)(new W({id:m.FIND_IDS.ReplaceOneAction,precondition:m.CONTEXT_FIND_WIDGET_VISIBLE,handler:z=>z.replace(),kbOpts:{weight:100+5,kbExpr:o.ContextKeyExpr.and(f.EditorContextKeys.focus,m.CONTEXT_REPLACE_INPUT_FOCUSED),primary:3}})),(0,D.registerEditorCommand)(new W({id:m.FIND_IDS.ReplaceAllAction,precondition:m.CONTEXT_FIND_WIDGET_VISIBLE,handler:z=>z.replaceAll(),kbOpts:{weight:100+5,kbExpr:f.EditorContextKeys.focus,primary:2563}})),(0,D.registerEditorCommand)(new W({id:m.FIND_IDS.ReplaceAllAction,precondition:m.CONTEXT_FIND_WIDGET_VISIBLE,handler:z=>z.replaceAll(),kbOpts:{weight:100+5,kbExpr:o.ContextKeyExpr.and(f.EditorContextKeys.focus,m.CONTEXT_REPLACE_INPUT_FOCUSED),primary:void 0,mac:{primary:2051}}})),(0,D.registerEditorCommand)(new W({id:m.FIND_IDS.SelectAllMatchesAction,precondition:m.CONTEXT_FIND_WIDGET_VISIBLE,handler:z=>z.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:f.EditorContextKeys.focus,primary:515}}))}),define(Q[1237],Y([1,0,87,14,105,4,48,797,27,96,73,518,2415,13,8,74,1227,5]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.FocusPreviousCursor=e.FocusNextCursor=e.SelectionHighlighter=e.CompatChangeAll=e.SelectHighlightsAction=e.MoveSelectionToPreviousFindMatchAction=e.MoveSelectionToNextFindMatchAction=e.AddSelectionToPreviousFindMatchAction=e.AddSelectionToNextFindMatchAction=e.MultiCursorSelectionControllerAction=e.MultiCursorSelectionController=e.MultiCursorSession=e.MultiCursorSessionResult=e.InsertCursorBelow=e.InsertCursorAbove=void 0;function p(B,K){const H=K.filter(U=>!B.find(G=>G.equals(U)));if(H.length>=1){const U=H.map($=>`line ${$.viewState.position.lineNumber} column ${$.viewState.position.column}`).join(", "),G=H.length===1?a.localize(0,null,U):a.localize(1,null,U);(0,t.status)(G)}}class c extends T.EditorAction{constructor(){super({id:"editor.action.insertCursorAbove",label:a.localize(2,null),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"3_multi",title:a.localize(3,null),order:2}})}run(K,H,U){if(!H.hasModel())return;let G=!0;U&&U.logicalLine===!1&&(G=!1);const $=H._getViewModel();if($.cursorConfig.readOnly)return;$.model.pushStackElement();const ie=$.getCursorStates();$.setCursorStates(U.source,3,f.CursorMoveCommands.addCursorUp($,ie,G)),$.revealTopMostCursor(U.source),p(ie,$.getCursorStates())}}e.InsertCursorAbove=c;class l extends T.EditorAction{constructor(){super({id:"editor.action.insertCursorBelow",label:a.localize(4,null),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"3_multi",title:a.localize(5,null),order:3}})}run(K,H,U){if(!H.hasModel())return;let G=!0;U&&U.logicalLine===!1&&(G=!1);const $=H._getViewModel();if($.cursorConfig.readOnly)return;$.model.pushStackElement();const ie=$.getCursorStates();$.setCursorStates(U.source,3,f.CursorMoveCommands.addCursorDown($,ie,G)),$.revealBottomMostCursor(U.source),p(ie,$.getCursorStates())}}e.InsertCursorBelow=l;class n extends T.EditorAction{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:a.localize(6,null),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"3_multi",title:a.localize(7,null),order:4}})}getCursorsForSelection(K,H,U){if(!K.isEmpty()){for(let G=K.startLineNumber;G<K.endLineNumber;G++){const $=H.getLineMaxColumn(G);U.push(new m.Selection(G,$,G,$))}K.endColumn>1&&U.push(new m.Selection(K.endLineNumber,K.endColumn,K.endLineNumber,K.endColumn))}}run(K,H){if(!H.hasModel())return;const U=H.getModel(),G=H.getSelections(),$=H._getViewModel(),ie=$.getCursorStates(),J=[];G.forEach(j=>this.getCursorsForSelection(j,U,J)),J.length>0&&H.setSelections(J),p(ie,$.getCursorStates())}}class g extends T.EditorAction{constructor(){super({id:"editor.action.addCursorsToBottom",label:a.localize(8,null),alias:"Add Cursors To Bottom",precondition:void 0})}run(K,H){if(!H.hasModel())return;const U=H.getSelections(),G=H.getModel().getLineCount(),$=[];for(let j=U[0].startLineNumber;j<=G;j++)$.push(new m.Selection(j,U[0].startColumn,j,U[0].endColumn));const ie=H._getViewModel(),J=ie.getCursorStates();$.length>0&&H.setSelections($),p(J,ie.getCursorStates())}}class w extends T.EditorAction{constructor(){super({id:"editor.action.addCursorsToTop",label:a.localize(9,null),alias:"Add Cursors To Top",precondition:void 0})}run(K,H){if(!H.hasModel())return;const U=H.getSelections(),G=[];for(let J=U[0].startLineNumber;J>=1;J--)G.push(new m.Selection(J,U[0].startColumn,J,U[0].endColumn));const $=H._getViewModel(),ie=$.getCursorStates();G.length>0&&H.setSelections(G),p(ie,$.getCursorStates())}}class E{constructor(K,H,U){this.selections=K,this.revealRange=H,this.revealScrollType=U}}e.MultiCursorSessionResult=E;class C{static create(K,H){if(!K.hasModel())return null;const U=H.getState();if(!K.hasTextFocus()&&U.isRevealed&&U.searchString.length>0)return new C(K,H,!1,U.searchString,U.wholeWord,U.matchCase,null);let G=!1,$,ie;const J=K.getSelections();J.length===1&&J[0].isEmpty()?(G=!0,$=!0,ie=!0):($=U.wholeWord,ie=U.matchCase);const j=K.getSelection();let ee,X=null;if(j.isEmpty()){const te=K.getConfiguredWordAtPosition(j.getStartPosition());if(!te)return null;ee=te.word,X=new m.Selection(j.startLineNumber,te.startColumn,j.startLineNumber,te.endColumn)}else ee=K.getModel().getValueInRange(j).replace(/\r\n/g,` `);return new C(K,H,G,ee,$,ie,X)}constructor(K,H,U,G,$,ie,J){this._editor=K,this.findController=H,this.isDisconnectedFromFindController=U,this.searchText=G,this.wholeWord=$,this.matchCase=ie,this.currentMatch=J}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const K=this._getNextMatch();if(!K)return null;const H=this._editor.getSelections();return new E(H.concat(K),K,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const K=this._getNextMatch();if(!K)return null;const H=this._editor.getSelections();return new E(H.slice(0,H.length-1).concat(K),K,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const G=this.currentMatch;return this.currentMatch=null,G}this.findController.highlightFindOptions();const K=this._editor.getSelections(),H=K[K.length-1],U=this._editor.getModel().findNextMatch(this.searchText,H.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1);return U?new m.Selection(U.range.startLineNumber,U.range.startColumn,U.range.endLineNumber,U.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const K=this._getPreviousMatch();if(!K)return null;const H=this._editor.getSelections();return new E(H.concat(K),K,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const K=this._getPreviousMatch();if(!K)return null;const H=this._editor.getSelections();return new E(H.slice(0,H.length-1).concat(K),K,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const G=this.currentMatch;return this.currentMatch=null,G}this.findController.highlightFindOptions();const K=this._editor.getSelections(),H=K[K.length-1],U=this._editor.getModel().findPreviousMatch(this.searchText,H.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1);return U?new m.Selection(U.range.startLineNumber,U.range.startColumn,U.range.endLineNumber,U.range.endColumn):null}selectAll(K){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const H=this._editor.getModel();return K?H.findMatches(this.searchText,K,!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1,1073741824):H.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1,1073741824)}}e.MultiCursorSession=C;class I extends D.Disposable{static{this.ID="editor.contrib.multiCursorController"}static get(K){return K.getContribution(I.ID)}constructor(K){super(),this._sessionDispose=this._register(new D.DisposableStore),this._editor=K,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(K){if(!this._session){const H=C.create(this._editor,K);if(!H)return;this._session=H;const U={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(U.wholeWordOverride=1,U.matchCaseOverride=1,U.isRegexOverride=2),K.getState().change(U,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(G=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(K.getState().onFindReplaceStateChange(G=>{(G.matchCase||G.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const K={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(K,!1)}this._session=null}_setSelections(K){this._ignoreSelectionChange=!0,this._editor.setSelections(K),this._ignoreSelectionChange=!1}_expandEmptyToWord(K,H){if(!H.isEmpty())return H;const U=this._editor.getConfiguredWordAtPosition(H.getStartPosition());return U?new m.Selection(H.startLineNumber,U.startColumn,H.startLineNumber,U.endColumn):H}_applySessionResult(K){K&&(this._setSelections(K.selections),K.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(K.revealRange,K.revealScrollType))}getSession(K){return this._session}addSelectionToNextFindMatch(K){if(this._editor.hasModel()){if(!this._session){const H=this._editor.getSelections();if(H.length>1){const G=K.getState().matchCase;if(!F(this._editor.getModel(),H,G)){const ie=this._editor.getModel(),J=[];for(let j=0,ee=H.length;j<ee;j++)J[j]=this._expandEmptyToWord(ie,H[j]);this._editor.setSelections(J);return}}}this._beginSessionIfNeeded(K),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(K){this._beginSessionIfNeeded(K),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(K){this._beginSessionIfNeeded(K),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(K){this._beginSessionIfNeeded(K),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(K){if(!this._editor.hasModel())return;let H=null;const U=K.getState();if(U.isRevealed&&U.searchString.length>0&&U.isRegex){const G=this._editor.getModel();U.searchScope?H=G.findMatches(U.searchString,U.searchScope,U.isRegex,U.matchCase,U.wholeWord?this._editor.getOption(128):null,!1,1073741824):H=G.findMatches(U.searchString,!0,U.isRegex,U.matchCase,U.wholeWord?this._editor.getOption(128):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(K),!this._session)return;H=this._session.selectAll(U.searchScope)}if(H.length>0){const G=this._editor.getSelection();for(let $=0,ie=H.length;$<ie;$++){const J=H[$];if(J.range.intersectRanges(G)){H[$]=H[0],H[0]=J;break}}this._setSelections(H.map($=>new m.Selection($.range.startLineNumber,$.range.startColumn,$.range.endLineNumber,$.range.endColumn)))}}selectAllUsingSelections(K){K.length>0&&this._setSelections(K)}}e.MultiCursorSelectionController=I;class _ extends T.EditorAction{run(K,H){const U=I.get(H);if(!U)return;const G=H._getViewModel();if(G){const $=G.getCursorStates(),ie=h.CommonFindController.get(H);if(ie)this._run(U,ie);else{const J=K.get(u.IInstantiationService).createInstance(h.CommonFindController,H);this._run(U,J),J.dispose()}p($,G.getCursorStates())}}}e.MultiCursorSelectionControllerAction=_;class A extends _{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:a.localize(10,null),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.focus,primary:2082,weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"3_multi",title:a.localize(11,null),order:5}})}_run(K,H){K.addSelectionToNextFindMatch(H)}}e.AddSelectionToNextFindMatchAction=A;class k extends _{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:a.localize(12,null),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"3_multi",title:a.localize(13,null),order:6}})}_run(K,H){K.addSelectionToPreviousFindMatch(H)}}e.AddSelectionToPreviousFindMatchAction=k;class L extends _{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:a.localize(14,null),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.focus,primary:(0,b.KeyChord)(2089,2082),weight:100}})}_run(K,H){K.moveSelectionToNextFindMatch(H)}}e.MoveSelectionToNextFindMatchAction=L;class R extends _{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:a.localize(15,null),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(K,H){K.moveSelectionToPreviousFindMatch(H)}}e.MoveSelectionToPreviousFindMatchAction=R;class M extends _{constructor(){super({id:"editor.action.selectHighlights",label:a.localize(16,null),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.focus,primary:3114,weight:100},menuOpts:{menuId:r.MenuId.MenubarSelectionMenu,group:"3_multi",title:a.localize(17,null),order:7}})}_run(K,H){K.selectAll(H)}}e.SelectHighlightsAction=M;class N extends _{constructor(){super({id:"editor.action.changeAll",label:a.localize(18,null),alias:"Change All Occurrences",precondition:i.ContextKeyExpr.and(S.EditorContextKeys.writable,S.EditorContextKeys.editorTextFocus),kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(K,H){K.selectAll(H)}}e.CompatChangeAll=N;class P{constructor(K,H,U,G,$){this._model=K,this._searchText=H,this._matchCase=U,this._wordSeparators=G,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,$&&this._model===$._model&&this._searchText===$._searchText&&this._matchCase===$._matchCase&&this._wordSeparators===$._wordSeparators&&this._modelVersionId===$._modelVersionId&&(this._cachedFindMatches=$._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(K=>K.range),this._cachedFindMatches.sort(v.Range.compareRangesUsingStarts)),this._cachedFindMatches}}let x=class extends D.Disposable{static{d=this}static{this.ID="editor.contrib.selectionHighlighter"}constructor(K,H){super(),this._languageFeaturesService=H,this.editor=K,this._isEnabled=K.getOption(106),this._decorations=K.createDecorationsCollection(),this.updateSoon=this._register(new y.RunOnceScheduler(()=>this._update(),300)),this.state=null,this._register(K.onDidChangeConfiguration(G=>{this._isEnabled=K.getOption(106)})),this._register(K.onDidChangeCursorSelection(G=>{this._isEnabled&&(G.selection.isEmpty()?G.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(K.onDidChangeModel(G=>{this._setState(null)})),this._register(K.onDidChangeModelContent(G=>{this._isEnabled&&this.updateSoon.schedule()}));const U=h.CommonFindController.get(K);U&&this._register(U.getState().onFindReplaceStateChange(G=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(d._createState(this.state,this._isEnabled,this.editor))}static _createState(K,H,U){if(!H||!U.hasModel())return null;const G=U.getSelection();if(G.startLineNumber!==G.endLineNumber)return null;const $=I.get(U);if(!$)return null;const ie=h.CommonFindController.get(U);if(!ie)return null;let J=$.getSession(ie);if(!J){const X=U.getSelections();if(X.length>1){const Z=ie.getState().matchCase;if(!F(U.getModel(),X,Z))return null}J=C.create(U,ie)}if(!J||J.currentMatch||/^[ \t]+$/.test(J.searchText)||J.searchText.length>200)return null;const j=ie.getState(),ee=j.matchCase;if(j.isRevealed){let X=j.searchString;ee||(X=X.toLowerCase());let te=J.searchText;if(ee||(te=te.toLowerCase()),X===te&&J.matchCase===j.matchCase&&J.wholeWord===j.wholeWord&&!j.isRegex)return null}return new P(U.getModel(),J.searchText,J.matchCase,J.wholeWord?U.getOption(128):null,K)}_setState(K){if(this.state=K,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const H=this.editor.getModel();if(H.isTooLargeForTokenization())return;const U=this.state.findMatches(),G=this.editor.getSelections();G.sort(v.Range.compareRangesUsingStarts);const $=[];for(let j=0,ee=0,X=U.length,te=G.length;j<X;){const Z=U[j];if(ee>=te)$.push(Z),j++;else{const se=v.Range.compareRangesUsingStarts(Z,G[ee]);se<0?((G[ee].isEmpty()||!v.Range.areIntersecting(Z,G[ee]))&&$.push(Z),j++):(se>0||j++,ee++)}}const ie=this._languageFeaturesService.documentHighlightProvider.has(H)&&this.editor.getOption(79),J=$.map(j=>({range:j,options:(0,o.getSelectionHighlightDecorationOptions)(ie)}));this._decorations.set(J)}dispose(){this._setState(null),super.dispose()}};e.SelectionHighlighter=x,e.SelectionHighlighter=x=d=fe([O(1,s.ILanguageFeaturesService)],x);function F(B,K,H){const U=V(B,K[0],!H);for(let G=1,$=K.length;G<$;G++){const ie=K[G];if(ie.isEmpty())return!1;const J=V(B,ie,!H);if(U!==J)return!1}return!0}function V(B,K,H){const U=B.getValueInRange(K);return H?U.toLowerCase():U}class W extends T.EditorAction{constructor(){super({id:"editor.action.focusNextCursor",label:a.localize(19,null),description:{description:a.localize(20,null),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(K,H,U){if(!H.hasModel())return;const G=H._getViewModel();if(G.cursorConfig.readOnly)return;G.model.pushStackElement();const $=Array.from(G.getCursorStates()),ie=$.shift();ie&&($.push(ie),G.setCursorStates(U.source,3,$),G.revealPrimaryCursor(U.source,!0),p($,G.getCursorStates()))}}e.FocusNextCursor=W;class z extends T.EditorAction{constructor(){super({id:"editor.action.focusPreviousCursor",label:a.localize(21,null),description:{description:a.localize(22,null),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(K,H,U){if(!H.hasModel())return;const G=H._getViewModel();if(G.cursorConfig.readOnly)return;G.model.pushStackElement();const $=Array.from(G.getCursorStates()),ie=$.pop();ie&&($.unshift(ie),G.setCursorStates(U.source,3,$),G.revealPrimaryCursor(U.source,!0),p($,G.getCursorStates()))}}e.FocusPreviousCursor=z,(0,T.registerEditorContribution)(I.ID,I,4),(0,T.registerEditorContribution)(x.ID,x,1),(0,T.registerEditorAction)(c),(0,T.registerEditorAction)(l),(0,T.registerEditorAction)(n),(0,T.registerEditorAction)(A),(0,T.registerEditorAction)(k),(0,T.registerEditorAction)(L),(0,T.registerEditorAction)(R),(0,T.registerEditorAction)(M),(0,T.registerEditorAction)(N),(0,T.registerEditorAction)(g),(0,T.registerEditorAction)(w),(0,T.registerEditorAction)(W),(0,T.registerEditorAction)(z)}),define(Q[1238],Y([1,0,14,4,69,283,99,9,35,5,24]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.ISuggestMemoryService=e.SuggestMemoryService=e.PrefixMemory=e.LRUMemory=e.NoMemory=e.Memory=void 0;class a{constructor(d){this.name=d}select(d,p,c){if(c.length===0)return 0;const l=c[0].score[0];for(let n=0;n<c.length;n++){const{score:g,completion:w}=c[n];if(g[0]!==l)break;if(w.preselect)return n}return 0}}e.Memory=a;class r extends a{constructor(){super("first")}memorize(d,p,c){}toJSON(){}fromJSON(){}}e.NoMemory=r;class i extends a{constructor(){super("recentlyUsed"),this._cache=new b.LRUCache(300,.66),this._seq=0}memorize(d,p,c){const l=`${d.getLanguageId()}/${c.textLabel}`;this._cache.set(l,{touch:this._seq++,type:c.completion.kind,insertText:c.completion.insertText})}select(d,p,c){if(c.length===0)return 0;const l=d.getLineContent(p.lineNumber).substr(p.column-10,p.column-1);if(/\s$/.test(l))return super.select(d,p,c);const n=c[0].score[0];let g=-1,w=-1,E=-1;for(let C=0;C<c.length&&c[C].score[0]===n;C++){const I=`${d.getLanguageId()}/${c[C].textLabel}`,_=this._cache.peek(I);if(_&&_.touch>E&&_.type===c[C].completion.kind&&_.insertText===c[C].completion.insertText&&(E=_.touch,w=C),c[C].completion.preselect&&g===-1)return g=C}return w!==-1?w:g!==-1?g:0}toJSON(){return this._cache.toJSON()}fromJSON(d){this._cache.clear();const p=0;for(const[c,l]of d)l.touch=p,l.type=typeof l.type=="number"?l.type:T.CompletionItemKinds.fromString(l.type),this._cache.set(c,l);this._seq=this._cache.size}}e.LRUMemory=i;class s extends a{constructor(){super("recentlyUsedByPrefix"),this._trie=D.TernarySearchTree.forStrings(),this._seq=0}memorize(d,p,c){const{word:l}=d.getWordUntilPosition(p),n=`${d.getLanguageId()}/${l}`;this._trie.set(n,{type:c.completion.kind,insertText:c.completion.insertText,touch:this._seq++})}select(d,p,c){const{word:l}=d.getWordUntilPosition(p);if(!l)return super.select(d,p,c);const n=`${d.getLanguageId()}/${l}`;let g=this._trie.get(n);if(g||(g=this._trie.findSubstr(n)),g)for(let w=0;w<c.length;w++){const{kind:E,insertText:C}=c[w].completion;if(E===g.type&&C===g.insertText)return w}return super.select(d,p,c)}toJSON(){const d=[];return this._trie.forEach((p,c)=>d.push([c,p])),d.sort((p,c)=>-(p[1].touch-c[1].touch)).forEach((p,c)=>p[1].touch=c),d.slice(0,200)}fromJSON(d){if(this._trie.clear(),d.length>0){this._seq=d[0][1].touch+1;for(const[p,c]of d)c.type=typeof c.type=="number"?c.type:T.CompletionItemKinds.fromString(c.type),this._trie.set(p,c)}}}e.PrefixMemory=s;let o=class{static{h=this}static{this._strategyCtors=new Map([["recentlyUsedByPrefix",s],["recentlyUsed",i],["first",r]])}static{this._storagePrefix="suggest/memories"}constructor(d,p){this._storageService=d,this._configService=p,this._disposables=new y.DisposableStore,this._persistSoon=new t.RunOnceScheduler(()=>this._saveState(),500),this._disposables.add(d.onWillSaveState(c=>{c.reason===S.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(d,p,c){this._withStrategy(d,p).memorize(d,p,c),this._persistSoon.schedule()}select(d,p,c){return this._withStrategy(d,p).select(d,p,c)}_withStrategy(d,p){const c=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:d.getLanguageIdAtPosition(p.lineNumber,p.column),resource:d.uri});if(this._strategy?.name!==c){this._saveState();const l=h._strategyCtors.get(c)||r;this._strategy=new l;try{const g=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,w=this._storageService.get(`${h._storagePrefix}/${c}`,g);w&&this._strategy.fromJSON(JSON.parse(w))}catch{}}return this._strategy}_saveState(){if(this._strategy){const p=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,c=JSON.stringify(this._strategy);this._storageService.store(`${h._storagePrefix}/${this._strategy.name}`,c,p,1)}}};e.SuggestMemoryService=o,e.SuggestMemoryService=o=h=fe([O(0,S.IStorageService),O(1,f.IConfigurationService)],o),e.ISuggestMemoryService=(0,m.createDecorator)("ISuggestMemories"),(0,v.registerSingleton)(e.ISuggestMemoryService,o,1)}),define(Q[3434],Y([1,0,31,128,83,4,48,79,27,74,1093,329,1238,1094,68,5]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestInlineCompletions=void 0;class u{constructor(n,g,w,E,C,I){this.range=n,this.insertText=g,this.filterText=w,this.additionalTextEdits=E,this.command=C,this.completion=I}}let d=class extends D.RefCountedDisposable{constructor(n,g,w,E,C,I){super(C.disposable),this.model=n,this.line=g,this.word=w,this.completionModel=E,this._suggestMemoryService=I}canBeReused(n,g,w){return this.model===n&&this.line===g&&this.word.word.length>0&&this.word.startColumn===w.startColumn&&this.word.endColumn<w.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){const n=[],{items:g}=this.completionModel,w=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},g),E=b.Iterable.slice(g,w),C=b.Iterable.slice(g,0,w);let I=5;for(const _ of b.Iterable.concat(E,C)){if(_.score===y.FuzzyScore.Default)continue;const A=new v.Range(_.editStart.lineNumber,_.editStart.column,_.editInsertEnd.lineNumber,_.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),k=_.completion.insertTextRules&&_.completion.insertTextRules&4?{snippet:_.completion.insertText}:_.completion.insertText;n.push(new u(A,k,_.filterTextLow??_.labelLow,_.completion.additionalTextEdits,_.completion.command,_)),I-->=0&&_.resolve(t.CancellationToken.None)}return n}};d=fe([O(5,a.ISuggestMemoryService)],d);let p=class{constructor(n,g,w,E){this._getEditorOption=n,this._languageFeatureService=g,this._clipboardService=w,this._suggestMemoryService=E}async provideInlineCompletions(n,g,w,E){if(w.selectedSuggestionInfo)return;const C=this._getEditorOption(87,n);if(h.QuickSuggestionsOptions.isAllOff(C))return;n.tokenization.tokenizeIfCheap(g.lineNumber);const I=n.tokenization.getLineTokens(g.lineNumber),_=I.getStandardTokenType(I.findTokenIndexAtOffset(Math.max(g.column-1-1,0)));if(h.QuickSuggestionsOptions.valueFor(C,_)!=="inline")return;let A=n.getWordAtPosition(g),k;if(A?.word||(k=this._getTriggerCharacterInfo(n,g)),!A?.word&&!k||(A||(A=n.getWordUntilPosition(g)),A.endColumn!==g.column))return;let L;const R=n.getValueInRange(new v.Range(g.lineNumber,1,g.lineNumber,g.column));if(!k&&this._lastResult?.canBeReused(n,g.lineNumber,A)){const M=new S.LineContext(R,g.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=M,this._lastResult.acquire(),L=this._lastResult}else{const M=await(0,h.provideSuggestionItems)(this._languageFeatureService.completionProvider,n,g,new h.CompletionOptions(void 0,void 0,k?.providers),k&&{triggerKind:1,triggerCharacter:k.ch},E);let N;M.needsClipboard&&(N=await this._clipboardService.readText());const P=new S.CompletionModel(M.items,g.column,new S.LineContext(R,0),r.WordDistance.None,this._getEditorOption(116,n),this._getEditorOption(110,n),{boostFullMatch:!1,firstMatchCanBeWeak:!1},N);L=new d(n,g.lineNumber,A,P,M,this._suggestMemoryService)}return this._lastResult=L,L}handleItemDidShow(n,g){g.completion.resolve(t.CancellationToken.None)}freeInlineCompletions(n){n.release()}_getTriggerCharacterInfo(n,g){const w=n.getValueInRange(v.Range.fromPositions({lineNumber:g.lineNumber,column:g.column-1},g)),E=new Set;for(const C of this._languageFeatureService.completionProvider.all(n))C.triggerCharacters?.includes(w)&&E.add(C);if(E.size!==0)return{providers:E,ch:w}}};e.SuggestInlineCompletions=p,e.SuggestInlineCompletions=p=fe([O(1,m.ILanguageFeaturesService),O(2,i.IClipboardService),O(3,a.ISuggestMemoryService)],p);let c=class{static{o=this}static{this._counter=0}constructor(n,g,w,E){if(++o._counter===1){const C=E.createInstance(p,(I,_)=>(w.listCodeEditors().find(k=>k.getModel()===_)??n).getOption(I));o._disposable=g.inlineCompletionsProvider.register("*",C)}}dispose(){--o._counter===0&&(o._disposable?.dispose(),o._disposable=void 0)}};c=o=fe([O(1,m.ILanguageFeaturesService),O(2,f.ICodeEditorService),O(3,s.IInstantiationService)],c),(0,T.registerEditorContribution)("suggest.inlineCompletionsProvider",c,0)}),define(Q[88],Y([1,0,7,67,157,325,34,443,4,18,2446,13,844,8,29,5,38,23,24,19,37,167,17,36,54,66,1752]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createActionViewItem=e.DropdownWithDefaultActionViewItem=e.SubmenuEntryActionViewItem=e.MenuEntryActionViewItem=e.fillInActions=e.createAndFillInActionBarActions=e.createAndFillInContextMenuActions=void 0;function C(N,P,x,F){const V=N.getActions(P),W=t.ModifierKeyEmitter.getInstance(),z=W.keyStatus.altKey||(m.isWindows||m.isLinux)&&W.keyStatus.shiftKey;_(V,x,z,F?B=>B===F:B=>B==="navigation")}e.createAndFillInContextMenuActions=C;function I(N,P,x,F,V,W){const z=N.getActions(P);_(z,x,!1,typeof F=="string"?K=>K===F:F,V,W)}e.createAndFillInActionBarActions=I;function _(N,P,x,F=z=>z==="navigation",V=()=>!1,W=!1){let z,B;Array.isArray(P)?(z=P,B=P):(z=P.primary,B=P.secondary);const K=new Set;for(const[H,U]of N){let G;F(H)?(G=z,G.length>0&&W&&G.push(new T.Separator)):(G=B,G.length>0&&G.push(new T.Separator));for(let $ of U){x&&($=$ instanceof h.MenuItemAction&&$.alt?$.alt:$);const ie=G.push($);$ instanceof T.SubmenuAction&&K.add({group:H,action:$,index:ie-1})}}for(const{group:H,action:U,index:G}of K){const $=F(H)?z:B,ie=U.actions;ie.length<=1&&V(U,H,$.length)&&$.splice(G,1,...ie)}}e.fillInActions=_;let A=class extends b.ActionViewItem{constructor(P,x,F,V,W,z,B,K){super(void 0,P,{icon:!!(P.class||P.item.icon),label:!P.class&&!P.item.icon,draggable:x?.draggable,keybinding:x?.keybinding,hoverDelegate:x?.hoverDelegate}),this._keybindingService=F,this._notificationService=V,this._contextKeyService=W,this._themeService=z,this._contextMenuService=B,this._accessibilityService=K,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new v.MutableDisposable),this._altKey=t.ModifierKeyEmitter.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(P){P.preventDefault(),P.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(x){this._notificationService.error(x)}}render(P){if(super.render(P),P.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let x=!1;const F=()=>{const V=!!this._menuItemAction.alt?.enabled&&(!this._accessibilityService.isMotionReduced()||x)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&x);V!==this._wantsAltCommand&&(this._wantsAltCommand=V,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(F)),this._register((0,t.addDisposableListener)(P,"mouseleave",V=>{x=!1,F()})),this._register((0,t.addDisposableListener)(P,"mouseenter",V=>{x=!0,F()})),F()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){const P=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),x=P&&P.getLabel(),F=this._commandAction.tooltip||this._commandAction.label;let V=x?(0,S.localize)(0,null,F,x):F;if(!this._wantsAltCommand&&this._menuItemAction.alt?.enabled){const W=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,z=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),B=z&&z.getLabel(),K=B?(0,S.localize)(1,null,W,B):W;V=(0,S.localize)(2,null,V,f.UILabelProvider.modifierLabels[m.OS].altKey,K)}return V}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(P){this._itemClassDispose.value=void 0;const{element:x,label:F}=this;if(!x||!F)return;const V=this._commandAction.checked&&(0,a.isICommandActionToggleInfo)(P.toggled)&&P.toggled.icon?P.toggled.icon:P.icon;if(V)if(c.ThemeIcon.isThemeIcon(V)){const W=c.ThemeIcon.asClassNameArray(V);F.classList.add(...W),this._itemClassDispose.value=(0,v.toDisposable)(()=>{F.classList.remove(...W)})}else F.style.backgroundImage=(0,l.isDark)(this._themeService.getColorTheme().type)?(0,t.asCSSUrl)(V.dark):(0,t.asCSSUrl)(V.light),F.classList.add("icon"),this._itemClassDispose.value=(0,v.combinedDisposable)((0,v.toDisposable)(()=>{F.style.backgroundImage="",F.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};e.MenuEntryActionViewItem=A,e.MenuEntryActionViewItem=A=fe([O(2,o.IKeybindingService),O(3,u.INotificationService),O(4,r.IContextKeyService),O(5,p.IThemeService),O(6,i.IContextMenuService),O(7,E.IAccessibilityService)],A);let k=class extends D.DropdownMenuActionViewItem{constructor(P,x,F,V,W){const z={...x,menuAsChild:x?.menuAsChild??!1,classNames:x?.classNames??(c.ThemeIcon.isThemeIcon(P.item.icon)?c.ThemeIcon.asClassName(P.item.icon):void 0),keybindingProvider:x?.keybindingProvider??(B=>F.lookupKeybinding(B.id))};super(P,{getActions:()=>P.actions},V,z),this._keybindingService=F,this._contextMenuService=V,this._themeService=W}render(P){super.render(P),(0,n.assertType)(this.element),P.classList.add("menu-entry");const x=this._action,{icon:F}=x.item;if(F&&!c.ThemeIcon.isThemeIcon(F)){this.element.classList.add("icon");const V=()=>{this.element&&(this.element.style.backgroundImage=(0,l.isDark)(this._themeService.getColorTheme().type)?(0,t.asCSSUrl)(F.dark):(0,t.asCSSUrl)(F.light))};V(),this._register(this._themeService.onDidColorThemeChange(()=>{V()}))}}};e.SubmenuEntryActionViewItem=k,e.SubmenuEntryActionViewItem=k=fe([O(2,o.IKeybindingService),O(3,i.IContextMenuService),O(4,p.IThemeService)],k);let L=class extends b.BaseActionViewItem{get onDidChangeDropdownVisibility(){return this._dropdown.onDidChangeVisibility}constructor(P,x,F,V,W,z,B,K){super(null,P),this._keybindingService=F,this._notificationService=V,this._contextMenuService=W,this._menuService=z,this._instaService=B,this._storageService=K,this._container=null,this._options=x,this._storageKey=`${P.item.submenu.id}_lastActionId`;let H;const U=x?.persistLastActionId?K.get(this._storageKey,1):void 0;U&&(H=P.actions.find($=>U===$.id)),H||(H=P.actions[0]),this._defaultAction=this._instaService.createInstance(A,H,{keybinding:this._getDefaultActionKeybindingLabel(H)});const G={keybindingProvider:$=>this._keybindingService.lookupKeybinding($.id),...x,menuAsChild:x?.menuAsChild??!0,classNames:x?.classNames??["codicon","codicon-chevron-down"],actionRunner:x?.actionRunner??new T.ActionRunner};this._dropdown=new D.DropdownMenuActionViewItem(P,P.actions,this._contextMenuService,G),this._dropdown.actionRunner.onDidRun($=>{$.action instanceof h.MenuItemAction&&this.update($.action)})}update(P){this._options?.persistLastActionId&&this._storageService.store(this._storageKey,P.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(A,P,{keybinding:this._getDefaultActionKeybindingLabel(P)}),this._defaultAction.actionRunner=new class extends T.ActionRunner{async runAction(x,F){await x.run(void 0)}},this._container&&this._defaultAction.render((0,t.prepend)(this._container,(0,t.$)(".action-container")))}_getDefaultActionKeybindingLabel(P){let x;if(this._options?.renderKeybindingWithDefaultActionLabel){const F=this._keybindingService.lookupKeybinding(P.id);F&&(x=`(${F.getLabel()})`)}return x}setActionContext(P){super.setActionContext(P),this._defaultAction.setActionContext(P),this._dropdown.setActionContext(P)}render(P){this._container=P,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const x=(0,t.$)(".action-container");this._defaultAction.render((0,t.append)(this._container,x)),this._register((0,t.addDisposableListener)(x,t.EventType.KEY_DOWN,V=>{const W=new y.StandardKeyboardEvent(V);W.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),W.stopPropagation())}));const F=(0,t.$)(".dropdown-action-container");this._dropdown.render((0,t.append)(this._container,F)),this._register((0,t.addDisposableListener)(F,t.EventType.KEY_DOWN,V=>{const W=new y.StandardKeyboardEvent(V);W.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._defaultAction.element?.focus(),W.stopPropagation())}))}focus(P){P?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(P){P?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};e.DropdownWithDefaultActionViewItem=L,e.DropdownWithDefaultActionViewItem=L=fe([O(2,o.IKeybindingService),O(3,u.INotificationService),O(4,i.IContextMenuService),O(5,h.IMenuService),O(6,s.IInstantiationService),O(7,d.IStorageService)],L);let R=class extends b.SelectActionViewItem{constructor(P,x){super(null,P,P.actions.map(F=>({text:F.id===T.Separator.ID?"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500":F.label,isDisabled:!F.enabled})),0,x,w.defaultSelectBoxStyles,{ariaLabel:P.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,P.actions.findIndex(F=>F.checked)))}render(P){super.render(P),P.style.borderColor=(0,g.asCssVariable)(g.selectBorder)}runAction(P,x){const F=this.action.actions[x];F&&this.actionRunner.run(F)}};R=fe([O(1,i.IContextViewService)],R);function M(N,P,x){return P instanceof h.MenuItemAction?N.createInstance(A,P,x):P instanceof h.SubmenuItemAction?P.item.isSelection?N.createInstance(R,P):P.item.rememberDefaultAction?N.createInstance(L,P,{...x,persistLastActionId:!0}):N.createInstance(k,P,x):void 0}e.createActionViewItem=M}),define(Q[896],Y([1,0,7,320,4,38,23,19,88,8,29,37,66]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MaskedLabeledMenuItemActionItem=e.LabeledMenuItemActionItem=void 0;const r=new y.IdGenerator("menu-item-action-item-icon-"),i=new Map;let s=class extends v.MenuEntryActionViewItem{constructor(d,p,c,l,n,g,w,E){super(d,void 0,c,l,n,g,w,E),this._defaultCSSClassToAdd=p}updateLabel(){this.label&&(this.label.innerText=this._commandAction.label)}_updateItemClass(d){if((0,b.dispose)(this._labeledItemClassDispose),this._labeledItemClassDispose=void 0,!h.ThemeIcon.isThemeIcon(d.icon)){if(d.icon){let p;if(d.icon?.dark?.scheme){const c=d.icon.dark.toString();if(i.has(c)?p=i.get(c):(p=r.nextId(),(0,t.createCSSRule)(`.codicon.${p}, .hc-light .codicon.${p}`,`background-image: ${(0,t.asCSSUrl)(d.icon.light||d.icon.dark)} !important`),(0,t.createCSSRule)(`.vs-dark .codicon.${p}, .hc-black .codicon.${p}`,`background-image: ${(0,t.asCSSUrl)(d.icon.dark)} !important`),i.set(c,p)),this.label){const l=p.split(" ");this._defaultCSSClassToAdd&&l.push(this._defaultCSSClassToAdd),this.label.classList.add("codicon",...l),this._labeledItemClassDispose=(0,b.toDisposable)(()=>{this.label&&this.label.classList.remove("codicon",...l)})}}}}}dispose(){this._labeledItemClassDispose&&((0,b.dispose)(this._labeledItemClassDispose),this._labeledItemClassDispose=void 0),super.dispose()}};e.LabeledMenuItemActionItem=s,e.LabeledMenuItemActionItem=s=fe([O(2,D.IKeybindingService),O(3,T.INotificationService),O(4,m.IContextKeyService),O(5,f.IThemeService),O(6,S.IContextMenuService),O(7,a.IAccessibilityService)],s);let o=class extends v.MenuEntryActionViewItem{constructor(d,p,c,l,n,g,w){super(d,void 0,p,c,l,n,g,w)}updateLabel(){this.label&&(this.label.innerText=this._commandAction.label)}_updateItemClass(d){if((0,b.dispose)(this._labeledItemClassDispose),this._labeledItemClassDispose=void 0,!h.ThemeIcon.isThemeIcon(d.icon)){if(d.icon){let p;if(d.icon?.dark?.scheme){const c=d.icon.dark.toString();if(i.has(c)?p=i.get(c):(p=r.nextId(),(0,t.createCSSRule)(`.codicon.masked-icon.${p}::before`,`-webkit-mask-image: ${(0,t.asCSSUrl)(d.icon.light||d.icon.dark)}`),(0,t.createCSSRule)(`.codicon.masked-icon.${p}::before`,`mask-image: ${(0,t.asCSSUrl)(d.icon.light||d.icon.dark)}`),i.set(c,p)),this.label){const l=p.split(" ");this.label.classList.add("codicon",...l),this.label.classList.add("masked-icon",...l),this._labeledItemClassDispose=(0,b.toDisposable)(()=>{this.label&&this.label.classList.remove("codicon",...l)})}}}}}dispose(){this._labeledItemClassDispose&&((0,b.dispose)(this._labeledItemClassDispose),this._labeledItemClassDispose=void 0),super.dispose()}};e.MaskedLabeledMenuItemActionItem=o,e.MaskedLabeledMenuItemActionItem=o=fe([O(1,D.IKeybindingService),O(2,T.INotificationService),O(3,m.IContextKeyService),O(4,f.IThemeService),O(5,S.IContextMenuService),O(6,a.IAccessibilityService)],o)}),define(Q[1239],Y([1,0,40,3391,586,136,248,130,58,1509,23,107,271,5,3245,15,8,13,88,2225,183,205,2107,55]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEditorComponent=e.NOTEBOOKEDITOR_SELECTOR=void 0,e.NOTEBOOKEDITOR_SELECTOR="notebookeditor-component";let w=class extends D.AngularDisposable{constructor(C,I,_,A,k,L,R,M,N){super(),this._notebookParams=C,this.notebookService=I,this.capabilitiesService=_,this.contextKeyService=A,this.menuService=k,this.notificationService=L,this.instantiationService=R,this._changeRef=M,this.connectionManagementService=N,this.defaultViewMode=a.ViewMode.Notebook,this.serializationManagers=[],this.executeManagers=[],this._modelReadyDeferred=new c.Deferred,this._isLoading=!0,this.ViewMode=a.ViewMode,this.updateProfile()}ngOnInit(){this.doLoad().catch(C=>(0,s.onUnexpectedError)(C))}updateProfile(){this.profile=this._notebookParams?this._notebookParams.profile:void 0}detectChanges(){this._changeRef.destroyed||this._changeRef.detectChanges()}get loadingMessage(){return(0,n.localize)(0,null,g.basename(this._notebookParams.notebookUri.path))}get loadingCompletedMessage(){return(0,n.localize)(1,null,g.basename(this._notebookParams.notebookUri.path))}get isLoading(){return this._isLoading}setLoading(C){this._isLoading=C,this.detectChanges()}async doLoad(){try{await this.createModelAndLoadContents()}finally{this.setLoading(!1)}await this.setSerializationManager(),await this.setExecuteManager(),await this.loadModel(),this.setActiveView(),this._modelReadyDeferred.resolve(this.model)}async loadModel(){await this.awaitNonDefaultProvider(),await this.model.requestModelLoad(),this.detectChanges(),this.setContextKeyServiceWithProviderId(this.model.providerId),await this.model.startSession(this.model.executeManager,void 0,!0),this.fillInActionsForCurrentContext(),this.detectChanges()}async createModelAndLoadContents(){let C=await this._notebookParams.providerInfo,I=this.instantiationService.createInstance(y.NotebookModel,{factory:this.modelFactory,notebookUri:this._notebookParams.notebookUri,connectionService:this.connectionManagementService,notificationService:this.notificationService,serializationManagers:this.serializationManagers,executeManagers:this.executeManagers,contentLoader:this._notebookParams.input.contentLoader,cellMagicMapper:new m.CellMagicMapper(this.notebookService.languageMagics),providerId:C.providerId,defaultKernel:this._notebookParams.input.defaultKernel,layoutChanged:this._notebookParams.input.layoutChanged,capabilitiesService:this.capabilitiesService,editorLoadedTimestamp:this._notebookParams.input.editorOpenedTimestamp,getInputLanguageMode:()=>this._notebookParams.input.languageMode},this.profile),_=await this.notebookService.isNotebookTrustCached(this._notebookParams.notebookUri,this.isDirty());this.model=this._register(I),await this.model.loadContents(_),this.views=new p.NotebookViewsExtension(this.model),this.viewMode=this.viewMode??this.defaultViewMode,this._register(I.viewModeChanged(A=>this.onViewModeChanged())),this._register(I.contentChanged(A=>this.handleContentChanged(A))),this._register(I.onCellTypeChanged(()=>this.detectChanges())),this._register(I.layoutChanged(()=>this.detectChanges())),this.views.onViewDeleted(()=>this.handleViewDeleted()),this.views.onActiveViewChanged(()=>this.handleActiveViewChanged()),this.detectChanges()}async setSerializationManager(){let C=await this._notebookParams.providerInfo;for(let I of C.providers){let _=await this.notebookService.getOrCreateSerializationManager(I,this._notebookParams.notebookUri);this.serializationManagers.push(_)}}async setExecuteManager(){let C=await this._notebookParams.providerInfo;for(let I of C.providers){let _=await this.notebookService.getOrCreateExecuteManager(I,this._notebookParams.notebookUri);this.executeManagers.push(_)}}setContextKeyServiceWithProviderId(C){new o.RawContextKey("providerId",C).bindTo(this.contextKeyService)}async awaitNonDefaultProvider(){await this.notebookService.registrationComplete,this.model.standardKernels=this._notebookParams.input.standardKernels;let C=await this._notebookParams.providerInfo;if(f.DEFAULT_NOTEBOOK_PROVIDER===C.providerId){let I=b.getProvidersForFileName(this._notebookParams.notebookUri.fsPath,this.notebookService),_=I.find(A=>A===f.SQL_NOTEBOOK_PROVIDER);C.providerId=_?f.SQL_NOTEBOOK_PROVIDER:I[0]}}fillInActionsForCurrentContext(){let C=[],I=[],A=this.menuService.createMenu(u.MenuId.NotebookToolbar,this.contextKeyService).getActions({arg:null,shouldForwardArgs:!0});(0,d.fillInActions)(A,{primary:C,secondary:I},!1,k=>k==="",(k,L,R)=>L===void 0||L==="")}get modelFactory(){return this._notebookParams.modelFactory||(this._notebookParams.modelFactory=new i.ModelFactory(this.instantiationService)),this._notebookParams.modelFactory}isDirty(){return this._notebookParams.input.isDirty()}get modelReady(){return this._modelReadyDeferred.promise}handleContentChanged(C){C.changeType===l.NotebookChangeType.MetadataChanged&&this.handleActiveViewChanged(),this.detectChanges()}handleViewDeleted(){this.viewMode=this.model?.viewMode,this.detectChanges()}handleActiveViewChanged(){this.setActiveView(),this.detectChanges()}onViewModeChanged(){this.viewMode=this.model?.viewMode,this.setActiveView(),this.detectChanges()}setActiveView(){const C=this.views.getViews();let I=this.views.getActiveView()??C[0];this.activeView=I}};e.NotebookEditorComponent=w,e.NotebookEditorComponent=w=fe([(0,t.Component)({selector:e.NOTEBOOKEDITOR_SELECTOR,templateUrl:decodeURI(q.toUrl("./notebookEditor.component.html"))}),O(0,(0,t.Inject)(T.IBootstrapParams)),O(1,(0,t.Inject)(f.INotebookService)),O(2,(0,t.Inject)(h.ICapabilitiesService)),O(3,(0,t.Inject)(o.IContextKeyService)),O(4,(0,t.Inject)(u.IMenuService)),O(5,(0,t.Inject)(S.INotificationService)),O(6,(0,t.Inject)(r.IInstantiationService)),O(7,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(8,(0,t.Inject)(v.IConnectionManagementService))],w)}),define(Q[264],Y([1,0,7,85,34,32,37,80,6,42,48,79,243,712,2418,88,8,35,5,36,1742]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.peekViewEditorMatchHighlightBorder=e.peekViewEditorMatchHighlight=e.peekViewResultsMatchHighlight=e.peekViewEditorStickyScrollBackground=e.peekViewEditorGutterBackground=e.peekViewEditorBackground=e.peekViewResultsSelectionForeground=e.peekViewResultsSelectionBackground=e.peekViewResultsFileForeground=e.peekViewResultsMatchForeground=e.peekViewResultsBackground=e.peekViewBorder=e.peekViewTitleInfoForeground=e.peekViewTitleForeground=e.peekViewTitleBackground=e.PeekViewWidget=e.getOuterEditor=e.PeekContext=e.IPeekViewService=void 0,e.IPeekViewService=(0,d.createDecorator)("IPeekViewService"),(0,u.registerSingleton)(e.IPeekViewService,class{constructor(){this._widgets=new Map}addExclusiveWidget(E,C){const I=this._widgets.get(E);I&&(I.listener.dispose(),I.widget.dispose());const _=()=>{const A=this._widgets.get(E);A&&A.widget===C&&(A.listener.dispose(),this._widgets.delete(E))};this._widgets.set(E,{widget:C,listener:C.onDidClose(_)})}},1);var c;(function(E){E.inPeekEditor=new o.RawContextKey("inReferenceSearchEditor",!0,i.localize(0,null)),E.notInPeekEditor=E.inPeekEditor.toNegated()})(c||(e.PeekContext=c={}));let l=class{static{this.ID="editor.contrib.referenceController"}constructor(C,I){C instanceof a.EmbeddedCodeEditorWidget&&c.inPeekEditor.bindTo(I)}dispose(){}};l=fe([O(1,o.IContextKeyService)],l),(0,S.registerEditorContribution)(l.ID,l,0);function n(E){const C=E.get(h.ICodeEditorService).getFocusedCodeEditor();return C instanceof a.EmbeddedCodeEditorWidget?C.getParentEditor():C}e.getOuterEditor=n;const g={headerBackgroundColor:f.Color.white,primaryHeadingColor:f.Color.fromHex("#333333"),secondaryHeadingColor:f.Color.fromHex("#6c6c6cb3")};let w=class extends r.ZoneWidget{constructor(C,I,_){super(C,I),this.instantiationService=_,this._onDidClose=new v.Emitter,this.onDidClose=this._onDidClose.event,m.mixin(this.options,g,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(C){const I=this.options;C.headerBackgroundColor&&(I.headerBackgroundColor=C.headerBackgroundColor),C.primaryHeadingColor&&(I.primaryHeadingColor=C.primaryHeadingColor),C.secondaryHeadingColor&&(I.secondaryHeadingColor=C.secondaryHeadingColor),super.style(C)}_applyStyles(){super._applyStyles();const C=this.options;this._headElement&&C.headerBackgroundColor&&(this._headElement.style.backgroundColor=C.headerBackgroundColor.toString()),this._primaryHeading&&C.primaryHeadingColor&&(this._primaryHeading.style.color=C.primaryHeadingColor.toString()),this._secondaryHeading&&C.secondaryHeadingColor&&(this._secondaryHeading.style.color=C.secondaryHeadingColor.toString()),this._bodyElement&&C.frameColor&&(this._bodyElement.style.borderColor=C.frameColor.toString())}_fillContainer(C){this.setCssClass("peekview-widget"),this._headElement=t.$(".head"),this._bodyElement=t.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),C.appendChild(this._headElement),C.appendChild(this._bodyElement)}_fillHead(C,I){this._titleElement=t.$(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),t.addStandardDisposableListener(this._titleElement,"click",k=>this._onTitleClick(k))),t.append(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=t.$("span.filename"),this._secondaryHeading=t.$("span.dirname"),this._metaHeading=t.$("span.meta"),t.append(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const _=t.$(".peekview-actions");t.append(this._headElement,_);const A=this._getActionBarOptions();this._actionbarWidget=new y.ActionBar(_,A),this._disposables.add(this._actionbarWidget),I||this._actionbarWidget.push(new b.Action("peekview.close",i.localize(1,null),T.ThemeIcon.asClassName(D.Codicon.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(C){}_getActionBarOptions(){return{actionViewItemProvider:s.createActionViewItem.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(C){}setTitle(C,I){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=C,this._primaryHeading.setAttribute("title",C),I?this._secondaryHeading.innerText=I:t.clearNode(this._secondaryHeading))}setMetaTitle(C){this._metaHeading&&(C?(this._metaHeading.innerText=C,t.show(this._metaHeading)):t.hide(this._metaHeading))}_doLayout(C,I){if(!this._isShowing&&C<0){this.dispose();return}const _=Math.ceil(this.editor.getOption(65)*1.2),A=Math.round(C-(_+2));this._doLayoutHead(_,I),this._doLayoutBody(A,I)}_doLayoutHead(C,I){this._headElement&&(this._headElement.style.height=`${C}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(C,I){this._bodyElement&&(this._bodyElement.style.height=`${C}px`)}};e.PeekViewWidget=w,e.PeekViewWidget=w=fe([O(2,d.IInstantiationService)],w),e.peekViewTitleBackground=(0,p.registerColor)("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:f.Color.black,hcLight:f.Color.white},i.localize(2,null)),e.peekViewTitleForeground=(0,p.registerColor)("peekViewTitleLabel.foreground",{dark:f.Color.white,light:f.Color.black,hcDark:f.Color.white,hcLight:p.editorForeground},i.localize(3,null)),e.peekViewTitleInfoForeground=(0,p.registerColor)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},i.localize(4,null)),e.peekViewBorder=(0,p.registerColor)("peekView.border",{dark:p.editorInfoForeground,light:p.editorInfoForeground,hcDark:p.contrastBorder,hcLight:p.contrastBorder},i.localize(5,null)),e.peekViewResultsBackground=(0,p.registerColor)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:f.Color.black,hcLight:f.Color.white},i.localize(6,null)),e.peekViewResultsMatchForeground=(0,p.registerColor)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:f.Color.white,hcLight:p.editorForeground},i.localize(7,null)),e.peekViewResultsFileForeground=(0,p.registerColor)("peekViewResult.fileForeground",{dark:f.Color.white,light:"#1E1E1E",hcDark:f.Color.white,hcLight:p.editorForeground},i.localize(8,null)),e.peekViewResultsSelectionBackground=(0,p.registerColor)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},i.localize(9,null)),e.peekViewResultsSelectionForeground=(0,p.registerColor)("peekViewResult.selectionForeground",{dark:f.Color.white,light:"#6C6C6C",hcDark:f.Color.white,hcLight:p.editorForeground},i.localize(10,null)),e.peekViewEditorBackground=(0,p.registerColor)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:f.Color.black,hcLight:f.Color.white},i.localize(11,null)),e.peekViewEditorGutterBackground=(0,p.registerColor)("peekViewEditorGutter.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hcDark:e.peekViewEditorBackground,hcLight:e.peekViewEditorBackground},i.localize(12,null)),e.peekViewEditorStickyScrollBackground=(0,p.registerColor)("peekViewEditorStickyScroll.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hcDark:e.peekViewEditorBackground,hcLight:e.peekViewEditorBackground},i.localize(13,null)),e.peekViewResultsMatchHighlight=(0,p.registerColor)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},i.localize(14,null)),e.peekViewEditorMatchHighlight=(0,p.registerColor)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},i.localize(15,null)),e.peekViewEditorMatchHighlightBorder=(0,p.registerColor)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:p.activeContrastBorder,hcLight:p.activeContrastBorder},i.localize(16,null))}),define(Q[3435],Y([1,0,7,162,20,80,6,4,26,33,27,264,2391,88,13,8,5,61,154,41,593,36,19,1729]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerNavigationWidget=void 0;class w{constructor(F,V,W,z,B){this._openerService=z,this._labelService=B,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new f.DisposableStore,this._editor=V;const K=document.createElement("div");K.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),K.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),K.appendChild(this._relatedBlock),this._disposables.add(t.addStandardDisposableListener(this._relatedBlock,"click",H=>{H.preventDefault();const U=this._relatedDiagnostics.get(H.target);U&&W(U)})),this._scrollable=new y.ScrollableElement(K,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),F.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(H=>{K.style.left=`-${H.scrollLeft}px`,K.style.top=`-${H.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,f.dispose)(this._disposables)}update(F){const{source:V,message:W,relatedInformation:z,code:B}=F;let K=(V?.length||0)+2;B&&(typeof B=="string"?K+=B.length:K+=B.value.length);const H=(0,m.splitLines)(W);this._lines=H.length,this._longestLineLength=0;for(const J of H)this._longestLineLength=Math.max(J.length+K,this._longestLineLength);t.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(F)),this._editor.applyFontInfo(this._messageBlock);let U=this._messageBlock;for(const J of H)U=document.createElement("div"),U.innerText=J,J===""&&(U.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(U);if(V||B){const J=document.createElement("span");if(J.classList.add("details"),U.appendChild(J),V){const j=document.createElement("span");j.innerText=V,j.classList.add("source"),J.appendChild(j)}if(B)if(typeof B=="string"){const j=document.createElement("span");j.innerText=`(${B})`,j.classList.add("code"),J.appendChild(j)}else{this._codeLink=t.$("a.code-link"),this._codeLink.setAttribute("href",`${B.target.toString()}`),this._codeLink.onclick=ee=>{this._openerService.open(B.target,{allowCommands:!0}),ee.preventDefault(),ee.stopPropagation()};const j=t.append(this._codeLink,t.$("span"));j.innerText=B.value,J.appendChild(this._codeLink)}}if(t.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,b.isNonEmptyArray)(z)){const J=this._relatedBlock.appendChild(document.createElement("div"));J.style.paddingTop=`${Math.floor(this._editor.getOption(65)*.66)}px`,this._lines+=1;for(const j of z){const ee=document.createElement("div"),X=document.createElement("a");X.classList.add("filename"),X.innerText=`${this._labelService.getUriBasenameLabel(j.resource)}(${j.startLineNumber}, ${j.startColumn}): `,X.title=this._labelService.getUriLabel(j.resource),this._relatedDiagnostics.set(X,j);const te=document.createElement("span");te.innerText=j.message,ee.appendChild(X),ee.appendChild(te),this._lines+=1,J.appendChild(ee)}}const G=this._editor.getOption(49),$=Math.ceil(G.typicalFullwidthCharacterWidth*this._longestLineLength*.75),ie=G.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:$,scrollHeight:ie})}layout(F,V){this._scrollable.getDomNode().style.height=`${F}px`,this._scrollable.getDomNode().style.width=`${V}px`,this._scrollable.setScrollDimensions({width:V,height:F})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(F){let V="";switch(F.severity){case d.MarkerSeverity.Error:V=a.localize(0,null);break;case d.MarkerSeverity.Warning:V=a.localize(1,null);break;case d.MarkerSeverity.Info:V=a.localize(2,null);break;case d.MarkerSeverity.Hint:V=a.localize(3,null);break}let W=a.localize(4,null,V,F.startLineNumber+":"+F.startColumn);const z=this._editor.getModel();return z&&F.startLineNumber<=z.getLineCount()&&F.startLineNumber>=1&&(W=`${z.getLineContent(F.startLineNumber)}, ${W}`),W}}let E=class extends h.PeekViewWidget{static{g=this}static{this.TitleMenu=new i.MenuId("gotoErrorTitleMenu")}constructor(F,V,W,z,B,K,H){super(F,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},B),this._themeService=V,this._openerService=W,this._menuService=z,this._contextKeyService=K,this._labelService=H,this._callOnDispose=new f.DisposableStore,this._onDidSelectRelatedInformation=new T.Emitter,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=d.MarkerSeverity.Warning,this._backgroundColor=D.Color.white,this._applyTheme(V.getColorTheme()),this._callOnDispose.add(V.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(F){this._backgroundColor=F.getColor(P);let V=A,W=k;this._severity===d.MarkerSeverity.Warning?(V=L,W=R):this._severity===d.MarkerSeverity.Info&&(V=M,W=N);const z=F.getColor(V),B=F.getColor(W);this.style({arrowColor:z,frameColor:z,headerBackgroundColor:B,primaryHeadingColor:F.getColor(h.peekViewTitleForeground),secondaryHeadingColor:F.getColor(h.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(F){super._fillHead(F),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(z=>this.editor.focus()));const V=[],W=this._menuService.createMenu(g.TitleMenu,this._contextKeyService);(0,r.createAndFillInActionBarActions)(W,void 0,V),this._actionbarWidget.push(V,{label:!1,icon:!0,index:0}),W.dispose()}_fillTitleIcon(F){this._icon=t.append(F,t.$(""))}_fillBody(F){this._parentContainer=F,F.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),F.appendChild(this._container),this._message=new w(this._container,this.editor,V=>this._onDidSelectRelatedInformation.fire(V),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(F,V,W){this._container.classList.remove("stale"),this._message.update(F),this._severity=F.severity,this._applyTheme(this._themeService.getColorTheme());const z=S.Range.lift(F),B=this.editor.getPosition(),K=B&&z.containsPosition(B)?B:z.getStartPosition();super.show(K,this.computeRequiredHeight());const H=this.editor.getModel();if(H){const U=W>1?a.localize(5,null,V,W):a.localize(6,null,V,W);this.setTitle((0,v.basename)(H.uri),U)}this._icon.className=`codicon ${c.SeverityIcon.className(d.MarkerSeverity.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(K,0),this.editor.focus()}updateMarker(F){this._container.classList.remove("stale"),this._message.update(F)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(F,V){super._doLayoutBody(F,V),this._heightInPixel=F,this._message.layout(F,V),this._container.style.height=`${F}px`}_onWidth(F){this._message.layout(this._heightInPixel,F)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};e.MarkerNavigationWidget=E,e.MarkerNavigationWidget=E=g=fe([O(1,n.IThemeService),O(2,p.IOpenerService),O(3,i.IMenuService),O(4,o.IInstantiationService),O(5,s.IContextKeyService),O(6,u.ILabelService)],E);const C=(0,l.oneOf)(l.editorErrorForeground,l.editorErrorBorder),I=(0,l.oneOf)(l.editorWarningForeground,l.editorWarningBorder),_=(0,l.oneOf)(l.editorInfoForeground,l.editorInfoBorder),A=(0,l.registerColor)("editorMarkerNavigationError.background",{dark:C,light:C,hcDark:l.contrastBorder,hcLight:l.contrastBorder},a.localize(7,null)),k=(0,l.registerColor)("editorMarkerNavigationError.headerBackground",{dark:(0,l.transparent)(A,.1),light:(0,l.transparent)(A,.1),hcDark:null,hcLight:null},a.localize(8,null)),L=(0,l.registerColor)("editorMarkerNavigationWarning.background",{dark:I,light:I,hcDark:l.contrastBorder,hcLight:l.contrastBorder},a.localize(9,null)),R=(0,l.registerColor)("editorMarkerNavigationWarning.headerBackground",{dark:(0,l.transparent)(L,.1),light:(0,l.transparent)(L,.1),hcDark:"#0C141F",hcLight:(0,l.transparent)(L,.2)},a.localize(10,null)),M=(0,l.registerColor)("editorMarkerNavigationInfo.background",{dark:_,light:_,hcDark:l.contrastBorder,hcLight:l.contrastBorder},a.localize(11,null)),N=(0,l.registerColor)("editorMarkerNavigationInfo.headerBackground",{dark:(0,l.transparent)(M,.1),light:(0,l.transparent)(M,.1),hcDark:null,hcLight:null},a.localize(12,null)),P=(0,l.registerColor)("editorMarkerNavigation.background",{dark:l.editorBackground,light:l.editorBackground,hcDark:l.editorBackground,hcLight:l.editorBackground},a.localize(13,null))}),define(Q[897],Y([1,0,32,4,48,79,51,27,73,1161,2390,13,8,5,77,3435]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.NextMarkerAction=e.MarkerController=void 0;let u=class{static{o=this}static{this.ID="editor.contrib.markerController"}static get(C){return C.getContribution(o.ID)}constructor(C,I,_,A,k){this._markerNavigationService=I,this._contextKeyService=_,this._editorService=A,this._instantiationService=k,this._sessionDispoables=new y.DisposableStore,this._editor=C,this._widgetVisible=g.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(C){if(this._model&&this._model.matches(C))return this._model;let I=!1;return this._model&&(I=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(C),I&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(s.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(_=>{(!this._model?.selected||!f.Range.containsPosition(this._model?.selected.marker,_.position))&&this._model?.resetIndex()})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const _=this._model.find(this._editor.getModel().uri,this._widget.position);_?this._widget.updateMarker(_.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(_=>{this._editorService.openCodeEditor({resource:_.resource,options:{pinned:!0,revealIfOpened:!0,selection:f.Range.lift(_).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(C=!0){this._cleanUp(),C&&this._editor.focus()}showAtMarker(C){if(this._editor.hasModel()){const I=this._getOrCreateModel(this._editor.getModel().uri);I.resetIndex(),I.move(!0,this._editor.getModel(),new T.Position(C.startLineNumber,C.startColumn)),I.selected&&this._widget.showAtMarker(I.selected.marker,I.selected.index,I.selected.total)}}async nagivate(C,I){if(this._editor.hasModel()){const _=this._getOrCreateModel(I?void 0:this._editor.getModel().uri);if(_.move(C,this._editor.getModel(),this._editor.getPosition()),!_.selected)return;if(_.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const A=await this._editorService.openCodeEditor({resource:_.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:_.selected.marker}},this._editor);A&&(o.get(A)?.close(),o.get(A)?.nagivate(C,I))}else this._widget.showAtMarker(_.selected.marker,_.selected.index,_.selected.total)}}};e.MarkerController=u,e.MarkerController=u=o=fe([O(1,m.IMarkerNavigationService),O(2,a.IContextKeyService),O(3,D.ICodeEditorService),O(4,r.IInstantiationService)],u);class d extends b.EditorAction{constructor(C,I,_){super(_),this._next=C,this._multiFile=I}async run(C,I){I.hasModel()&&u.get(I)?.nagivate(this._next,this._multiFile)}}class p extends d{static{this.ID="editor.action.marker.next"}static{this.LABEL=S.localize(0,null)}constructor(){super(!0,!1,{id:p.ID,label:p.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.focus,primary:578,weight:100},menuOpts:{menuId:s.MarkerNavigationWidget.TitleMenu,title:p.LABEL,icon:(0,i.registerIcon)("marker-navigation-next",t.Codicon.arrowDown,S.localize(1,null)),group:"navigation",order:1}})}}e.NextMarkerAction=p;class c extends d{static{this.ID="editor.action.marker.prev"}static{this.LABEL=S.localize(2,null)}constructor(){super(!1,!1,{id:c.ID,label:c.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.focus,primary:1602,weight:100},menuOpts:{menuId:s.MarkerNavigationWidget.TitleMenu,title:c.LABEL,icon:(0,i.registerIcon)("marker-navigation-previous",t.Codicon.arrowUp,S.localize(3,null)),group:"navigation",order:2}})}}class l extends d{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:S.localize(4,null),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.focus,primary:66,weight:100},menuOpts:{menuId:h.MenuId.MenubarGoMenu,title:S.localize(5,null),group:"6_problem_nav",order:1}})}}class n extends d{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:S.localize(6,null),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.focus,primary:1090,weight:100},menuOpts:{menuId:h.MenuId.MenubarGoMenu,title:S.localize(7,null),group:"6_problem_nav",order:2}})}}(0,b.registerEditorContribution)(u.ID,u,4),(0,b.registerEditorAction)(p),(0,b.registerEditorAction)(c),(0,b.registerEditorAction)(l),(0,b.registerEditorAction)(n);const g=new a.RawContextKey("markersNavigationVisible",!1),w=b.EditorCommand.bindToContribution(u.get);(0,b.registerEditorCommand)(new w({id:"closeMarkersNavigation",precondition:g,handler:E=>E.close(),kbOpts:{weight:100+50,kbExpr:v.EditorContextKeys.focus,primary:9,secondary:[1033]}}))}),define(Q[3436],Y([1,0,7,216,80,6,4,22,26,243,27,98,125,146,50,75,3330,264,2396,5,38,61,90,19,189,579,1731]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferenceWidget=e.LayoutData=void 0;class C{static{this.DecorationOptions=h.ModelDecorationOptions.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"})}constructor(L,R){this._editor=L,this._model=R,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new T.DisposableStore,this._callOnModelChange=new T.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 L=this._editor.getModel();if(L){for(const R of this._model.references)if(R.uri.toString()===L.uri.toString()){this._addDecorations(R.parent);return}}}_addDecorations(L){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const R=[],M=[];for(let N=0,P=L.children.length;N<P;N++){const x=L.children[N];this._decorationIgnoreSet.has(x.id)||x.uri.toString()===this._editor.getModel().uri.toString()&&(R.push({range:x.range,options:C.DecorationOptions}),M.push(N))}this._editor.changeDecorations(N=>{const P=N.deltaDecorations([],R);for(let x=0;x<P.length;x++)this._decorations.set(P[x],L.children[M[x]])})}_onDecorationChanged(){const L=[],R=this._editor.getModel();if(R){for(const[M,N]of this._decorations){const P=R.getDecorationRange(M);if(!P)continue;let x=!1;if(!S.Range.equalsRange(P,N.range)){if(S.Range.spansMultipleLines(P))x=!0;else{const F=N.range.endColumn-N.range.startColumn,V=P.endColumn-P.startColumn;F!==V&&(x=!0)}x?(this._decorationIgnoreSet.add(N.id),L.push(M)):N.range=P}}for(let M=0,N=L.length;M<N;M++)this._decorations.delete(L[M]);this._editor.removeDecorations(L)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}}class I{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(L){let R,M;try{const N=JSON.parse(L);R=N.ratio,M=N.heightInLines}catch{}return{ratio:R||.7,heightInLines:M||18}}}e.LayoutData=I;class _ extends n.WorkbenchAsyncDataTree{}let A=class extends u.PeekViewWidget{constructor(L,R,M,N,P,x,F,V,W,z,B,K){super(L,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},x),this._defaultTreeKeyboardSupport=R,this.layoutData=M,this._textModelResolverService=P,this._instantiationService=x,this._peekViewService=F,this._uriLabel=V,this._undoRedoService=W,this._keybindingService=z,this._languageService=B,this._languageConfigurationService=K,this._disposeOnNewModel=new T.DisposableStore,this._callOnDispose=new T.DisposableStore,this._onDidSelectReference=new D.Emitter,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new t.Dimension(0,0),this._applyTheme(N.getColorTheme()),this._callOnDispose.add(N.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(L,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),(0,T.dispose)(this._preview),(0,T.dispose)(this._previewNotAvailableMessage),(0,T.dispose)(this._tree),(0,T.dispose)(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(L){const R=L.getColor(u.peekViewBorder)||b.Color.transparent;this.style({arrowColor:R,frameColor:R,headerBackgroundColor:L.getColor(u.peekViewTitleBackground)||b.Color.transparent,primaryHeadingColor:L.getColor(u.peekViewTitleForeground),secondaryHeadingColor:L.getColor(u.peekViewTitleInfoForeground)})}show(L){super.show(L,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(L){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:L.ctrlKey||L.metaKey||L.altKey?"side":"open",source:"title"})}_fillBody(L){this.setCssClass("reference-zone-widget"),this._messageContainer=t.append(L,t.$("div.messages")),t.hide(this._messageContainer),this._splitView=new y.SplitView(L,{orientation:1}),this._previewContainer=t.append(L,t.$("div.preview.inline"));const R={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(m.EmbeddedCodeEditorWidget,this._previewContainer,R,{},this.editor),t.hide(this._previewContainer),this._previewNotAvailableMessage=new h.TextModel(d.localize(0,null),r.PLAINTEXT_LANGUAGE_ID,h.TextModel.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=t.append(L,t.$("div.ref-tree.inline"));const M={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new o.AccessibilityProvider,keyboardNavigationLabelProvider:this._instantiationService.createInstance(o.StringRepresentationProvider),identityProvider:new o.IdentityProvider,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:u.peekViewResultsBackground}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(t.addStandardDisposableListener(this._treeContainer,"keydown",P=>{P.equals(9)&&(this._keybindingService.dispatchEvent(P,P.target),P.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(_,"ReferencesWidget",this._treeContainer,new o.Delegate,[this._instantiationService.createInstance(o.FileReferencesRenderer),this._instantiationService.createInstance(o.OneReferenceRenderer)],this._instantiationService.createInstance(o.DataSource),M),this._splitView.addView({onDidChange:D.Event.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:P=>{this._preview.layout({height:this._dim.height,width:P})}},y.Sizing.Distribute),this._splitView.addView({onDidChange:D.Event.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:P=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${P}px`,this._tree.layout(this._dim.height,P)}},y.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const N=(P,x)=>{P instanceof E.OneReference&&(x==="show"&&this._revealReference(P,!1),this._onDidSelectReference.fire({element:P,kind:x,source:"tree"}))};this._tree.onDidOpen(P=>{P.sideBySide?N(P.element,"side"):P.editorOptions.pinned?N(P.element,"goto"):N(P.element,"show")}),t.hide(this._treeContainer)}_onWidth(L){this._dim&&this._doLayoutBody(this._dim.height,L)}_doLayoutBody(L,R){super._doLayoutBody(L,R),this._dim=new t.Dimension(R,L),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(R),this._splitView.resizeView(0,R*this.layoutData.ratio)}setSelection(L){return this._revealReference(L,!0).then(()=>{this._model&&(this._tree.setSelection([L]),this._tree.setFocus([L]))})}setModel(L){return this._disposeOnNewModel.clear(),this._model=L,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=d.localize(1,null),t.show(this._messageContainer),Promise.resolve(void 0)):(t.hide(this._messageContainer),this._decorationsManager=new C(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(L=>this._tree.rerender(L))),this._disposeOnNewModel.add(this._preview.onMouseDown(L=>{const{event:R,target:M}=L;if(R.detail!==2)return;const N=this._getFocusedReference();N&&this._onDidSelectReference.fire({element:{uri:N.uri,range:M.range},kind:R.ctrlKey||R.metaKey||R.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),t.show(this._treeContainer),t.show(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[L]=this._tree.getFocus();if(L instanceof E.OneReference)return L;if(L instanceof E.FileReferences&&L.children.length>0)return L.children[0]}async revealReference(L){await this._revealReference(L,!1),this._onDidSelectReference.fire({element:L,kind:"goto",source:"tree"})}async _revealReference(L,R){if(this._revealedReference===L)return;this._revealedReference=L,L.uri.scheme!==f.Schemas.inMemory?this.setTitle((0,v.basenameOrAuthority)(L.uri),this._uriLabel.getUriLabel((0,v.dirname)(L.uri))):this.setTitle(d.localize(2,null));const M=this._textModelResolverService.createModelReference(L.uri);this._tree.getInput()===L.parent?this._tree.reveal(L):(R&&this._tree.reveal(L.parent),await this._tree.expand(L.parent),this._tree.reveal(L));const N=await M;if(!this._model){N.dispose();return}(0,T.dispose)(this._previewModelReference);const P=N.object;if(P){const x=this._preview.getModel()===P.textEditorModel?0:1,F=S.Range.lift(L.range).collapseToStart();this._previewModelReference=N,this._preview.setModel(P.textEditorModel),this._preview.setSelection(F),this._preview.revealRangeInCenter(F,x)}else this._preview.setModel(this._previewNotAvailableMessage),N.dispose()}};e.ReferenceWidget=A,e.ReferenceWidget=A=fe([O(3,g.IThemeService),O(4,s.ITextModelService),O(5,p.IInstantiationService),O(6,u.IPeekViewService),O(7,l.ILabelService),O(8,w.IUndoRedoService),O(9,c.IKeybindingService),O(10,i.ILanguageService),O(11,a.ILanguageConfigurationService)],A)}),define(Q[898],Y([1,0,14,15,105,4,79,51,27,264,2394,28,9,8,5,113,90,23,24,579,3436]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesController=e.ctxReferenceSearchVisible=void 0,e.ctxReferenceSearchVisible=new r.RawContextKey("referenceSearchVisible",!1,S.localize(0,null));let n=class{static{l=this}static{this.ID="editor.contrib.referencesController"}static get(E){return E.getContribution(l.ID)}constructor(E,C,I,_,A,k,L,R){this._defaultTreeKeyboardSupport=E,this._editor=C,this._editorService=_,this._notificationService=A,this._instantiationService=k,this._storageService=L,this._configurationService=R,this._disposables=new D.DisposableStore,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=e.ctxReferenceSearchVisible.bindTo(I)}dispose(){this._referenceSearchVisible.reset(),this._disposables.dispose(),this._widget?.dispose(),this._model?.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(E,C,I){let _;if(this._widget&&(_=this._widget.position),this.closeWidget(),_&&E.containsPosition(_))return;this._peekMode=I,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const A="peekViewLayout",k=c.LayoutData.fromJSON(this._storageService.get(A,0,"{}"));this._widget=this._instantiationService.createInstance(c.ReferenceWidget,this._editor,this._defaultTreeKeyboardSupport,k),this._widget.setTitle(S.localize(1,null)),this._widget.show(E),this._disposables.add(this._widget.onDidClose(()=>{C.cancel(),this._widget&&(this._storageService.store(A,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(R=>{const{element:M,kind:N}=R;if(M)switch(N){case"open":(R.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(M,!1,!1);break;case"side":this.openReference(M,!0,!1);break;case"goto":I?this._gotoReference(M,!0):this.openReference(M,!1,!0);break}}));const L=++this._requestIdPool;C.then(R=>{if(L!==this._requestIdPool||!this._widget){R.dispose();return}return this._model?.dispose(),this._model=R,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(S.localize(2,null,this._model.title,this._model.references.length));const M=this._editor.getModel().uri,N=new f.Position(E.startLineNumber,E.startColumn),P=this._model.nearestReference(M,N);if(P)return this._widget.setSelection(P).then(()=>{this._widget&&this._editor.getOption(85)==="editor"&&this._widget.focusOnPreviewEditor()})}})},R=>{this._notificationService.error(R)})}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 C=this._widget.position;if(!C)return;const I=this._model.nearestReference(this._editor.getModel().uri,C);if(!I)return;const _=this._model.nextOrPreviousReference(I,E),A=this._editor.hasTextFocus(),k=this._widget.isPreviewEditorFocused();await this._widget.setSelection(_),await this._gotoReference(_,!1),A?this._editor.focus():this._widget&&k&&this._widget.focusOnPreviewEditor()}async revealReference(E){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(E)}closeWidget(E=!0){this._widget?.dispose(),this._model?.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,E&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(E,C){this._widget?.hide(),this._ignoreModelChangeEvent=!0;const I=v.Range.lift(E.range).collapseToStart();return this._editorService.openCodeEditor({resource:E.uri,options:{selection:I,selectionSource:"code.jump",pinned:C}},this._editor).then(_=>{if(this._ignoreModelChangeEvent=!1,!_||!this._widget){this.closeWidget();return}if(this._editor===_)this._widget.show(I),this._widget.focusOnReferenceTree();else{const A=l.get(_),k=this._model.clone();this.closeWidget(),_.focus(),A?.toggleWidget(I,(0,t.createCancelablePromise)(L=>Promise.resolve(k)),this._peekMode??!1)}},_=>{this._ignoreModelChangeEvent=!1,(0,y.onUnexpectedError)(_)})}openReference(E,C,I){C||this.closeWidget();const{uri:_,range:A}=E;this._editorService.openCodeEditor({resource:_,options:{selection:A,selectionSource:"code.jump",pinned:I}},this._editor,C)}};e.ReferencesController=n,e.ReferencesController=n=l=fe([O(2,r.IContextKeyService),O(3,T.ICodeEditorService),O(4,u.INotificationService),O(5,i.IInstantiationService),O(6,d.IStorageService),O(7,a.IConfigurationService)],n);function g(w,E){const C=(0,m.getOuterEditor)(w);if(!C)return;const I=n.get(C);I&&E(I)}s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,b.KeyChord)(2089,60),when:r.ContextKeyExpr.or(e.ctxReferenceSearchVisible,m.PeekContext.inPeekEditor),handler(w){g(w,E=>{E.changeFocusBetweenPreviewAndReferences()})}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:r.ContextKeyExpr.or(e.ctxReferenceSearchVisible,m.PeekContext.inPeekEditor),handler(w){g(w,E=>{E.goToNextOrPreviousReference(!0)})}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:r.ContextKeyExpr.or(e.ctxReferenceSearchVisible,m.PeekContext.inPeekEditor),handler(w){g(w,E=>{E.goToNextOrPreviousReference(!1)})}}),h.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),h.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),h.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),h.CommandsRegistry.registerCommand("closeReferenceSearch",w=>g(w,E=>E.closeWidget())),s.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:r.ContextKeyExpr.and(m.PeekContext.inPeekEditor,r.ContextKeyExpr.not("config.editor.stablePeek"))}),s.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:r.ContextKeyExpr.and(e.ctxReferenceSearchVisible,r.ContextKeyExpr.not("config.editor.stablePeek"))}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:r.ContextKeyExpr.and(e.ctxReferenceSearchVisible,o.WorkbenchListFocusContextKey,o.WorkbenchTreeElementCanCollapse.negate(),o.WorkbenchTreeElementCanExpand.negate()),handler(w){const C=w.get(o.IListService).lastFocusedList?.getFocus();Array.isArray(C)&&C[0]instanceof p.OneReference&&g(w,I=>I.revealReference(C[0]))}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:r.ContextKeyExpr.and(e.ctxReferenceSearchVisible,o.WorkbenchListFocusContextKey,o.WorkbenchTreeElementCanCollapse.negate(),o.WorkbenchTreeElementCanExpand.negate()),handler(w){const C=w.get(o.IListService).lastFocusedList?.getFocus();Array.isArray(C)&&C[0]instanceof p.OneReference&&g(w,I=>I.openReference(C[0],!0,!0))}}),h.CommandsRegistry.registerCommand("openReference",w=>{const C=w.get(o.IListService).lastFocusedList?.getFocus();Array.isArray(C)&&C[0]instanceof p.OneReference&&g(w,I=>I.openReference(C[0],!1,!0))})}),define(Q[899],Y([1,0,87,14,105,17,10,348,123,48,79,243,51,27,73,99,898,579,3289,513,264,2392,13,28,8,5,23,72,882,74,83,171]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefinitionAction=e.SymbolNavigationAction=e.SymbolNavigationAnchor=void 0,n.MenuRegistry.appendMenuItem(n.MenuId.EditorContext,{submenu:n.MenuId.EditorContextPeek,title:l.localize(0,null),group:"navigation",order:100});class R{static is(B){return!B||typeof B!="object"?!1:!!(B instanceof R||a.Position.isIPosition(B.position)&&B.model)}constructor(B,K){this.model=B,this.position=K}}e.SymbolNavigationAnchor=R;class M extends m.EditorAction2{static{this._allSymbolNavigationCommands=new Map}static{this._activeAlternativeCommands=new Set}static all(){return M._allSymbolNavigationCommands.values()}static _patchConfig(B){const K={...B,f1:!0};if(K.menu)for(const H of k.Iterable.wrap(K.menu))(H.id===n.MenuId.EditorContext||H.id===n.MenuId.EditorContextPeek)&&(H.when=w.ContextKeyExpr.and(B.precondition,H.when));return K}constructor(B,K){super(M._patchConfig(K)),this.configuration=B,M._allSymbolNavigationCommands.set(K.id,this)}runEditorCommand(B,K,H,U){if(!K.hasModel())return Promise.resolve(void 0);const G=B.get(C.INotificationService),$=B.get(S.ICodeEditorService),ie=B.get(I.IEditorProgressService),J=B.get(d.ISymbolNavigationService),j=B.get(A.ILanguageFeaturesService),ee=B.get(E.IInstantiationService),X=K.getModel(),te=K.getPosition(),Z=R.is(H)?H:new R(X,te),se=new f.EditorStateCancellationTokenSource(K,5),re=(0,y.raceCancellation)(this._getLocationModel(j,Z.model,Z.position,se.token),se.token).then(async oe=>{if(!oe||se.token.isCancellationRequested)return;(0,t.alert)(oe.ariaMessage);let le;if(oe.referenceAt(X.uri,te)){const ce=this._getAlternativeCommand(K);!M._activeAlternativeCommands.has(ce)&&M._allSymbolNavigationCommands.has(ce)&&(le=M._allSymbolNavigationCommands.get(ce))}const ne=oe.references.length;if(ne===0){if(!this.configuration.muteMessage){const ce=X.getWordAtPosition(te);p.MessageController.get(K)?.showMessage(this._getNoResultFoundMessage(ce),te)}}else if(ne===1&&le)M._activeAlternativeCommands.add(this.desc.id),ee.invokeFunction(ce=>le.runEditorCommand(ce,K,H,U).finally(()=>{M._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult($,J,K,oe,U)},oe=>{G.error(oe)}).finally(()=>{se.dispose()});return ie.showWhile(re,250),re}async _onResult(B,K,H,U,G){const $=this._getGoToPreference(H);if(!(H instanceof h.EmbeddedCodeEditorWidget)&&(this.configuration.openInPeek||$==="peek"&&U.references.length>1))this._openInPeek(H,U,G);else{const ie=U.firstReference(),J=U.references.length>1&&$==="gotoAndPeek",j=await this._openReference(H,B,ie,this.configuration.openToSide,!J);J&&j?this._openInPeek(j,U,G):U.dispose(),$==="goto"&&K.put(ie)}}async _openReference(B,K,H,U,G){let $;if((0,s.isLocationLink)(H)&&($=H.targetSelectionRange),$||($=H.range),!$)return;const ie=await K.openCodeEditor({resource:H.uri,options:{selection:r.Range.collapseToStart($),selectionRevealType:3,selectionSource:"code.jump"}},B,U);if(ie){if(G){const J=ie.getModel(),j=ie.createDecorationsCollection([{range:$,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{ie.getModel()===J&&j.clear()},350)}return ie}}_openInPeek(B,K,H){const U=o.ReferencesController.get(B);U&&B.hasModel()?U.toggleWidget(H??B.getSelection(),(0,y.createCancelablePromise)(G=>Promise.resolve(K)),this.configuration.openInPeek):K.dispose()}}e.SymbolNavigationAction=M;class N extends M{async _getLocationModel(B,K,H,U){return new u.ReferencesModel(await(0,_.getDefinitionsAtPosition)(B.definitionProvider,K,H,U),l.localize(1,null))}_getNoResultFoundMessage(B){return B&&B.word?l.localize(2,null,B.word):l.localize(3,null)}_getAlternativeCommand(B){return B.getOption(57).alternativeDefinitionCommand}_getGoToPreference(B){return B.getOption(57).multipleDefinitions}}e.DefinitionAction=N,(0,n.registerAction2)(class ln extends N{static{this.id="editor.action.revealDefinition"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:ln.id,title:{value:l.localize(4,null),original:"Go to Definition",mnemonicTitle:l.localize(5,null)},precondition:w.ContextKeyExpr.and(i.EditorContextKeys.hasDefinitionProvider,i.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:[{when:i.EditorContextKeys.editorTextFocus,primary:70,weight:100},{when:w.ContextKeyExpr.and(i.EditorContextKeys.editorTextFocus,L.IsWebContext),primary:2118,weight:100}],menu:[{id:n.MenuId.EditorContext,group:"navigation",order:1.1},{id:n.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),g.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration",ln.id)}}),(0,n.registerAction2)(class cn extends N{static{this.id="editor.action.revealDefinitionAside"}constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:cn.id,title:{value:l.localize(6,null),original:"Open Definition to the Side"},precondition:w.ContextKeyExpr.and(i.EditorContextKeys.hasDefinitionProvider,i.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:[{when:i.EditorContextKeys.editorTextFocus,primary:(0,b.KeyChord)(2089,70),weight:100},{when:w.ContextKeyExpr.and(i.EditorContextKeys.editorTextFocus,L.IsWebContext),primary:(0,b.KeyChord)(2089,2118),weight:100}]}),g.CommandsRegistry.registerCommandAlias("editor.action.openDeclarationToTheSide",cn.id)}}),(0,n.registerAction2)(class dn extends N{static{this.id="editor.action.peekDefinition"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:dn.id,title:{value:l.localize(7,null),original:"Peek Definition"},precondition:w.ContextKeyExpr.and(i.EditorContextKeys.hasDefinitionProvider,c.PeekContext.notInPeekEditor,i.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:i.EditorContextKeys.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:n.MenuId.EditorContextPeek,group:"peek",order:2}}),g.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration",dn.id)}});class P extends M{async _getLocationModel(B,K,H,U){return new u.ReferencesModel(await(0,_.getDeclarationsAtPosition)(B.declarationProvider,K,H,U),l.localize(8,null))}_getNoResultFoundMessage(B){return B&&B.word?l.localize(9,null,B.word):l.localize(10,null)}_getAlternativeCommand(B){return B.getOption(57).alternativeDeclarationCommand}_getGoToPreference(B){return B.getOption(57).multipleDeclarations}}(0,n.registerAction2)(class Xn extends P{static{this.id="editor.action.revealDeclaration"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Xn.id,title:{value:l.localize(11,null),original:"Go to Declaration",mnemonicTitle:l.localize(12,null)},precondition:w.ContextKeyExpr.and(i.EditorContextKeys.hasDeclarationProvider,i.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:[{id:n.MenuId.EditorContext,group:"navigation",order:1.3},{id:n.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(B){return B&&B.word?l.localize(13,null,B.word):l.localize(14,null)}}),(0,n.registerAction2)(class extends P{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:l.localize(15,null),original:"Peek Declaration"},precondition:w.ContextKeyExpr.and(i.EditorContextKeys.hasDeclarationProvider,c.PeekContext.notInPeekEditor,i.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:n.MenuId.EditorContextPeek,group:"peek",order:3}})}});class x extends M{async _getLocationModel(B,K,H,U){return new u.ReferencesModel(await(0,_.getTypeDefinitionsAtPosition)(B.typeDefinitionProvider,K,H,U),l.localize(16,null))}_getNoResultFoundMessage(B){return B&&B.word?l.localize(17,null,B.word):l.localize(18,null)}_getAlternativeCommand(B){return B.getOption(57).alternativeTypeDefinitionCommand}_getGoToPreference(B){return B.getOption(57).multipleTypeDefinitions}}(0,n.registerAction2)(class Jn extends x{static{this.ID="editor.action.goToTypeDefinition"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Jn.ID,title:{value:l.localize(19,null),original:"Go to Type Definition",mnemonicTitle:l.localize(20,null)},precondition:w.ContextKeyExpr.and(i.EditorContextKeys.hasTypeDefinitionProvider,i.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:i.EditorContextKeys.editorTextFocus,primary:0,weight:100},menu:[{id:n.MenuId.EditorContext,group:"navigation",order:1.4},{id:n.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}}),(0,n.registerAction2)(class Zn extends x{static{this.ID="editor.action.peekTypeDefinition"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Zn.ID,title:{value:l.localize(21,null),original:"Peek Type Definition"},precondition:w.ContextKeyExpr.and(i.EditorContextKeys.hasTypeDefinitionProvider,c.PeekContext.notInPeekEditor,i.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:n.MenuId.EditorContextPeek,group:"peek",order:4}})}});class F extends M{async _getLocationModel(B,K,H,U){return new u.ReferencesModel(await(0,_.getImplementationsAtPosition)(B.implementationProvider,K,H,U),l.localize(22,null))}_getNoResultFoundMessage(B){return B&&B.word?l.localize(23,null,B.word):l.localize(24,null)}_getAlternativeCommand(B){return B.getOption(57).alternativeImplementationCommand}_getGoToPreference(B){return B.getOption(57).multipleImplementations}}(0,n.registerAction2)(class er extends F{static{this.ID="editor.action.goToImplementation"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:er.ID,title:{value:l.localize(25,null),original:"Go to Implementations",mnemonicTitle:l.localize(26,null)},precondition:w.ContextKeyExpr.and(i.EditorContextKeys.hasImplementationProvider,i.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:i.EditorContextKeys.editorTextFocus,primary:2118,weight:100},menu:[{id:n.MenuId.EditorContext,group:"navigation",order:1.45},{id:n.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}}),(0,n.registerAction2)(class tr extends F{static{this.ID="editor.action.peekImplementation"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:tr.ID,title:{value:l.localize(27,null),original:"Peek Implementations"},precondition:w.ContextKeyExpr.and(i.EditorContextKeys.hasImplementationProvider,c.PeekContext.notInPeekEditor,i.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:i.EditorContextKeys.editorTextFocus,primary:3142,weight:100},menu:{id:n.MenuId.EditorContextPeek,group:"peek",order:5}})}});class V extends M{_getNoResultFoundMessage(B){return B?l.localize(28,null,B.word):l.localize(29,null)}_getAlternativeCommand(B){return B.getOption(57).alternativeReferenceCommand}_getGoToPreference(B){return B.getOption(57).multipleReferences}}(0,n.registerAction2)(class extends V{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:l.localize(30,null),original:"Go to References",mnemonicTitle:l.localize(31,null)},precondition:w.ContextKeyExpr.and(i.EditorContextKeys.hasReferenceProvider,c.PeekContext.notInPeekEditor,i.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:i.EditorContextKeys.editorTextFocus,primary:1094,weight:100},menu:[{id:n.MenuId.EditorContext,group:"navigation",order:1.45},{id:n.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(B,K,H,U){return new u.ReferencesModel(await(0,_.getReferencesAtPosition)(B.referenceProvider,K,H,!0,U),l.localize(32,null))}}),(0,n.registerAction2)(class extends V{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:l.localize(33,null),original:"Peek References"},precondition:w.ContextKeyExpr.and(i.EditorContextKeys.hasReferenceProvider,c.PeekContext.notInPeekEditor,i.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:n.MenuId.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(B,K,H,U){return new u.ReferencesModel(await(0,_.getReferencesAtPosition)(B.referenceProvider,K,H,!1,U),l.localize(34,null))}});class W extends M{constructor(B,K,H){super(B,{id:"editor.action.goToLocation",title:{value:l.localize(35,null),original:"Go to Any Symbol"},precondition:w.ContextKeyExpr.and(c.PeekContext.notInPeekEditor,i.EditorContextKeys.isInWalkThroughSnippet.toNegated())}),this._references=K,this._gotoMultipleBehaviour=H}async _getLocationModel(B,K,H,U){return new u.ReferencesModel(this._references,l.localize(36,null))}_getNoResultFoundMessage(B){return B&&l.localize(37,null,B.word)||""}_getGoToPreference(B){return this._gotoMultipleBehaviour??B.getOption(57).multipleReferences}_getAlternativeCommand(){return""}}g.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:T.URI},{name:"position",description:"The position at which to start",constraint:a.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(z,B,K,H,U,G,$)=>{(0,D.assertType)(T.URI.isUri(B)),(0,D.assertType)(a.Position.isIPosition(K)),(0,D.assertType)(Array.isArray(H)),(0,D.assertType)(typeof U>"u"||typeof U=="string"),(0,D.assertType)(typeof $>"u"||typeof $=="boolean");const ie=z.get(S.ICodeEditorService),J=await ie.openCodeEditor({resource:B},ie.getFocusedCodeEditor());if((0,v.isCodeEditor)(J))return J.setPosition(K),J.revealPositionInCenterIfOutsideViewport(K,0),J.invokeWithinContext(j=>{const ee=new class extends W{_getNoResultFoundMessage(X){return G||super._getNoResultFoundMessage(X)}}({muteMessage:!G,openInPeek:!!$,openToSide:!1},H,U);j.get(E.IInstantiationService).invokeFunction(ee.run.bind(ee),J)})}}),g.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:T.URI},{name:"position",description:"The position at which to start",constraint:a.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(z,B,K,H,U)=>{z.get(g.ICommandService).executeCommand("editor.action.goToLocations",B,K,H,U,void 0,!0)}}),g.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:(z,B,K)=>{(0,D.assertType)(T.URI.isUri(B)),(0,D.assertType)(a.Position.isIPosition(K));const H=z.get(A.ILanguageFeaturesService),U=z.get(S.ICodeEditorService);return U.openCodeEditor({resource:B},U.getFocusedCodeEditor()).then(G=>{if(!(0,v.isCodeEditor)(G)||!G.hasModel())return;const $=o.ReferencesController.get(G);if(!$)return;const ie=(0,y.createCancelablePromise)(j=>(0,_.getReferencesAtPosition)(H.referenceProvider,G.getModel(),a.Position.lift(K),!1,j).then(ee=>new u.ReferencesModel(ee,l.localize(38,null)))),J=new r.Range(K.lineNumber,K.column,K.lineNumber,K.column);return Promise.resolve($.toggleWidget(J,ie,!1))})}}),g.CommandsRegistry.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")}),define(Q[1240],Y([1,0,14,15,110,4,348,48,27,50,75,677,264,2393,8,899,882,74,98,1730]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.GotoDefinitionAtPositionEditorContribution=void 0;let c=class{static{p=this}static{this.ID="editor.contrib.gotodefinitionatposition"}static{this.MAX_SOURCE_PREVIEW_LINES=8}constructor(n,g,w,E){this.textModelResolverService=g,this.languageService=w,this.languageFeaturesService=E,this.toUnhook=new D.DisposableStore,this.toUnhookForKeyboard=new D.DisposableStore,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=n,this.linkDecorations=this.editor.createDecorationsCollection();const C=new h.ClickLinkGesture(n);this.toUnhook.add(C),this.toUnhook.add(C.onMouseMoveOrRelevantKeyDown(([I,_])=>{this.startFindDefinitionFromMouse(I,_??void 0)})),this.toUnhook.add(C.onExecute(I=>{this.isEnabled(I)&&this.gotoDefinition(I.target.position,I.hasSideBySideModifier).catch(_=>{(0,y.onUnexpectedError)(_)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(C.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(n){return n.getContribution(p.ID)}async startFindDefinitionFromCursor(n){await this.startFindDefinition(n),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(g=>{g&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(n,g){if(n.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(n,g)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const w=n.target.position;this.startFindDefinition(w)}async startFindDefinition(n){this.toUnhookForKeyboard.clear();const g=n?this.editor.getModel()?.getWordAtPosition(n):null;if(!g){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===g.startColumn&&this.currentWordAtPosition.endColumn===g.endColumn&&this.currentWordAtPosition.word===g.word)return;this.currentWordAtPosition=g;const w=new T.EditorState(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,t.createCancelablePromise)(I=>this.findDefinition(n,I));let E;try{E=await this.previousPromise}catch(I){(0,y.onUnexpectedError)(I);return}if(!E||!E.length||!w.validate(this.editor)){this.removeLinkDecorations();return}const C=E[0].originSelectionRange?v.Range.lift(E[0].originSelectionRange):new v.Range(n.lineNumber,g.startColumn,n.lineNumber,g.endColumn);if(E.length>1){let I=C;for(const{originSelectionRange:_}of E)_&&(I=v.Range.plusRange(I,_));this.addDecoration(I,new b.MarkdownString().appendText(r.localize(0,null,E.length)))}else{const I=E[0];if(!I.uri)return;this.textModelResolverService.createModelReference(I.uri).then(_=>{if(!_.object||!_.object.textEditorModel){_.dispose();return}const{object:{textEditorModel:A}}=_,{startLineNumber:k}=I.range;if(k<1||k>A.getLineCount()){_.dispose();return}const L=this.getPreviewValue(A,k,I),R=this.languageService.guessLanguageIdByFilepathOrFirstLine(A.uri);this.addDecoration(C,L?new b.MarkdownString().appendCodeblock(R||"",L):void 0),_.dispose()})}}getPreviewValue(n,g,w){let E=w.range;return E.endLineNumber-E.startLineNumber>=p.MAX_SOURCE_PREVIEW_LINES&&(E=this.getPreviewRangeBasedOnIndentation(n,g)),this.stripIndentationFromPreviewRange(n,g,E)}stripIndentationFromPreviewRange(n,g,w){let C=n.getLineFirstNonWhitespaceColumn(g);for(let _=g+1;_<w.endLineNumber;_++){const A=n.getLineFirstNonWhitespaceColumn(_);C=Math.min(C,A)}return n.getValueInRange(w).replace(new RegExp(`^\\s{${C-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(n,g){const w=n.getLineFirstNonWhitespaceColumn(g),E=Math.min(n.getLineCount(),g+p.MAX_SOURCE_PREVIEW_LINES);let C=g+1;for(;C<E;C++){const I=n.getLineFirstNonWhitespaceColumn(C);if(w===I)break}return new v.Range(g,1,C+1,1)}addDecoration(n,g){const w={range:n,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:g}};this.linkDecorations.set([w])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(n,g){return this.editor.hasModel()&&n.isLeftClick&&n.isNoneOrSingleMouseDown&&n.target.type===6&&!(n.target.detail.injectedText?.options instanceof d.ModelDecorationInjectedTextOptions)&&(n.hasTriggerModifier||(g?g.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(n,g){const w=this.editor.getModel();return w?(0,o.getDefinitionsAtPosition)(this.languageFeaturesService.definitionProvider,w,n,g):Promise.resolve(null)}gotoDefinition(n,g){return this.editor.setPosition(n),this.editor.invokeWithinContext(w=>{const E=!g&&this.editor.getOption(86)&&!this.isInPeekEditor(w);return new s.DefinitionAction({openToSide:g,openInPeek:E,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(w)})}isInPeekEditor(n){const g=n.get(i.IContextKeyService);return a.PeekContext.inPeekEditor.getValue(g)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};e.GotoDefinitionAtPositionEditorContribution=c,e.GotoDefinitionAtPositionEditorContribution=c=p=fe([O(1,S.ITextModelService),O(2,m.ILanguageService),O(3,u.ILanguageFeaturesService)],c),(0,f.registerEditorContribution)(c.ID,c,2)}),define(Q[3437],Y([1,0,7,20,14,15,4,26,27,74,688,349,457,259,897,2401,154,41,72]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerHoverParticipant=e.MarkerHover=void 0;const p=t.$;class c{constructor(w,E,C){this.owner=w,this.range=E,this.marker=C}isValidForHoverAnchor(w){return w.type===1&&this.range.startColumn<=w.range.startColumn&&this.range.endColumn>=w.range.endColumn}}e.MarkerHover=c;const l={type:1,filter:{include:r.CodeActionKind.QuickFix},triggerAction:r.CodeActionTriggerSource.QuickFixHover};let n=class{constructor(w,E,C,I){this._editor=w,this._markerDecorationsService=E,this._openerService=C,this._languageFeaturesService=I,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(w,E){if(!this._editor.hasModel()||w.type!==1&&!w.supportsMarkerHover)return[];const C=this._editor.getModel(),I=w.range.startLineNumber,_=C.getLineMaxColumn(I),A=[];for(const k of E){const L=k.range.startLineNumber===I?k.range.startColumn:1,R=k.range.endLineNumber===I?k.range.endColumn:_,M=this._markerDecorationsService.getMarker(C.uri,k);if(!M)continue;const N=new v.Range(w.range.startLineNumber,L,w.range.startLineNumber,R);A.push(new c(this,N,M))}return A}renderHoverParts(w,E){if(!E.length)return T.Disposable.None;const C=new T.DisposableStore;E.forEach(_=>w.fragment.appendChild(this.renderMarkerHover(_,C)));const I=E.length===1?E[0]:E.sort((_,A)=>o.MarkerSeverity.compare(_.marker.severity,A.marker.severity))[0];return this.renderMarkerStatusbar(w,I,C),C}renderMarkerHover(w,E){const C=p("div.hover-row"),I=t.append(C,p("div.marker.hover-contents")),{source:_,message:A,code:k,relatedInformation:L}=w.marker;this._editor.applyFontInfo(I);const R=t.append(I,p("span"));if(R.style.whiteSpace="pre-wrap",R.innerText=A,_||k)if(k&&typeof k!="string"){const M=p("span");if(_){const F=t.append(M,p("span"));F.innerText=_}const N=t.append(M,p("a.code-link"));N.setAttribute("href",k.target.toString()),E.add(t.addDisposableListener(N,"click",F=>{this._openerService.open(k.target,{allowCommands:!0}),F.preventDefault(),F.stopPropagation()}));const P=t.append(N,p("span"));P.innerText=k.value;const x=t.append(I,M);x.style.opacity="0.6",x.style.paddingLeft="6px"}else{const M=t.append(I,p("span"));M.style.opacity="0.6",M.style.paddingLeft="6px",M.innerText=_&&k?`${_}(${k})`:_||`(${k})`}if((0,y.isNonEmptyArray)(L))for(const{message:M,resource:N,startLineNumber:P,startColumn:x}of L){const F=t.append(I,p("div"));F.style.marginTop="8px";const V=t.append(F,p("a"));V.innerText=`${(0,f.basename)(N)}(${P}, ${x}): `,V.style.cursor="pointer",E.add(t.addDisposableListener(V,"click",z=>{z.stopPropagation(),z.preventDefault(),this._openerService&&this._openerService.open(N,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:P,startColumn:x}}}).catch(D.onUnexpectedError)}));const W=t.append(F,p("span"));W.innerText=M,this._editor.applyFontInfo(W)}return C}renderMarkerStatusbar(w,E,C){if((E.marker.severity===o.MarkerSeverity.Error||E.marker.severity===o.MarkerSeverity.Warning||E.marker.severity===o.MarkerSeverity.Info)&&w.statusBar.addAction({label:s.localize(0,null),commandId:i.NextMarkerAction.ID,run:()=>{w.hide(),i.MarkerController.get(this._editor)?.showAtMarker(E.marker),this._editor.focus()}}),!this._editor.getOption(89)){const I=w.statusBar.append(p("div"));this.recentMarkerCodeActionsInfo&&(o.IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker)===o.IMarkerData.makeKey(E.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(I.textContent=s.localize(1,null)):this.recentMarkerCodeActionsInfo=void 0);const _=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?T.Disposable.None:C.add((0,b.disposableTimeout)(()=>I.textContent=s.localize(2,null),200));I.textContent||(I.textContent=String.fromCharCode(160));const A=this.getCodeActions(E.marker);C.add((0,T.toDisposable)(()=>A.cancel())),A.then(k=>{if(_.dispose(),this.recentMarkerCodeActionsInfo={marker:E.marker,hasCodeActions:k.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){k.dispose(),I.textContent=s.localize(3,null);return}I.style.display="none";let L=!1;C.add((0,T.toDisposable)(()=>{L||k.dispose()})),w.statusBar.addAction({label:s.localize(4,null),commandId:h.quickFixCommandId,run:R=>{L=!0;const M=a.CodeActionController.get(this._editor),N=t.getDomNodePagePosition(R);w.hide(),M?.showCodeActions(l,k,{x:N.left,y:N.top,width:N.width,height:N.height})}})},D.onUnexpectedError)}}getCodeActions(w){return(0,b.createCancelablePromise)(E=>(0,h.getCodeActions)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new v.Range(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn),l,d.Progress.None,E))}};e.MarkerHoverParticipant=n,e.MarkerHoverParticipant=n=fe([O(1,S.IMarkerDecorationsService),O(2,u.IOpenerService),O(3,m.ILanguageFeaturesService)],n)}),define(Q[1241],Y([1,0,7,34,31,59,27,75,899,264,13,28,8,29,5,23]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.goToDefinitionWithLocation=e.showGoToContextMenu=void 0;async function o(d,p,c,l){const n=d.get(f.ITextModelService),g=d.get(r.IContextMenuService),w=d.get(h.ICommandService),E=d.get(i.IInstantiationService),C=d.get(s.INotificationService);if(await l.item.resolve(b.CancellationToken.None),!l.part.location)return;const I=l.part.location,_=[],A=new Set(S.MenuRegistry.getMenuItems(S.MenuId.EditorContext).map(L=>(0,S.isIMenuItem)(L)?L.command.id:(0,D.generateUuid)()));for(const L of v.SymbolNavigationAction.all())A.has(L.desc.id)&&_.push(new y.Action(L.desc.id,S.MenuItemAction.label(L.desc,{renderShortTitle:!0}),void 0,!0,async()=>{const R=await n.createModelReference(I.uri);try{const M=new v.SymbolNavigationAnchor(R.object.textEditorModel,T.Range.getStartPosition(I.range)),N=l.item.anchor.range;await E.invokeFunction(L.runEditorCommand.bind(L),p,M,N)}finally{R.dispose()}}));if(l.part.command){const{command:L}=l.part;_.push(new y.Separator),_.push(new y.Action(L.id,L.title,void 0,!0,async()=>{try{await w.executeCommand(L.id,...L.arguments??[])}catch(R){C.notify({severity:s.Severity.Error,source:l.item.provider.displayName,message:R})}}))}const k=p.getOption(125);g.showContextMenu({domForShadowRoot:k?p.getDomNode()??void 0:void 0,getAnchor:()=>{const L=t.getDomNodePagePosition(c);return{x:L.left,y:L.top+L.height+8}},getActions:()=>_,onHide:()=>{p.focus()},autoSelectFirstItem:!0})}e.showGoToContextMenu=o;async function u(d,p,c,l){const g=await d.get(f.ITextModelService).createModelReference(l.uri);await c.invokeWithinContext(async w=>{const E=p.hasSideBySideModifier,C=w.get(a.IContextKeyService),I=m.PeekContext.inPeekEditor.getValue(C),_=!E&&c.getOption(86)&&!I;return new v.DefinitionAction({openToSide:E,openInPeek:_,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(w,new v.SymbolNavigationAnchor(g.object.textEditorModel,T.Range.getStartPosition(l.range)),T.Range.lift(l.range))}),g.dispose()}e.goToDefinitionWithLocation=u}),define(Q[900],Y([1,0,7,20,14,31,15,4,69,17,10,595,390,133,165,27,99,137,98,328,74,75,677,842,1241,28,35,5,23,36,19]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k){"use strict";var L;Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsController=e.RenderedInlayHintLabelPart=void 0;class R{constructor(){this._entries=new v.LRUCache(50)}get(z){const B=R._key(z);return this._entries.get(B)}set(z,B){const K=R._key(z);this._entries.set(K,B)}static _key(z){return`${z.uri.toString()}/${z.getVersionId()}`}}const M=(0,I.createDecorator)("IInlayHintsCache");(0,C.registerSingleton)(M,R,1);class N{constructor(z,B){this.item=z,this.index=B}get part(){const z=this.item.hint.label;return typeof z=="string"?{label:z}:z[this.index]}}e.RenderedInlayHintLabelPart=N;class P{constructor(z,B){this.part=z,this.hasTriggerModifier=B}}var x;(function(W){W[W.Normal=0]="Normal",W[W.Invisible=1]="Invisible"})(x||(x={}));let F=class{static{L=this}static{this.ID="editor.contrib.InlayHints"}static{this._MAX_DECORATORS=1500}static get(z){return z.getContribution(L.ID)??void 0}constructor(z,B,K,H,U,G,$){this._editor=z,this._languageFeaturesService=B,this._inlayHintsCache=H,this._commandService=U,this._notificationService=G,this._instaService=$,this._disposables=new f.DisposableStore,this._sessionDisposables=new f.DisposableStore,this._decorationsMetadata=new Map,this._ruleFactory=new h.DynamicCssRules(this._editor),this._activeRenderMode=0,this._debounceInfo=K.for(B.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(B.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(z.onDidChangeModel(()=>this._update())),this._disposables.add(z.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(z.onDidChangeConfiguration(ie=>{ie.hasChanged(138)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const z=this._editor.getOption(138);if(z.enabled==="off")return;const B=this._editor.getModel();if(!B||!this._languageFeaturesService.inlayHintsProvider.has(B))return;const K=this._inlayHintsCache.get(B);K&&this._updateHintsDecorators([B.getFullModelRange()],K),this._sessionDisposables.add((0,f.toDisposable)(()=>{B.isDisposed()||this._cacheHintsForFastRestore(B)}));let H;const U=new Set,G=new b.RunOnceScheduler(async()=>{const $=Date.now();H?.dispose(!0),H=new D.CancellationTokenSource;const ie=B.onWillDispose(()=>H?.cancel());try{const J=H.token,j=await g.InlayHintsFragments.create(this._languageFeaturesService.inlayHintsProvider,B,this._getHintsRanges(),J);if(G.delay=this._debounceInfo.update(B,Date.now()-$),J.isCancellationRequested){j.dispose();return}for(const ee of j.provider)typeof ee.onDidChangeInlayHints=="function"&&!U.has(ee)&&(U.add(ee),this._sessionDisposables.add(ee.onDidChangeInlayHints(()=>{G.isScheduled()||G.schedule()})));this._sessionDisposables.add(j),this._updateHintsDecorators(j.ranges,j.items),this._cacheHintsForFastRestore(B)}catch(J){(0,T.onUnexpectedError)(J)}finally{H.dispose(),ie.dispose()}},this._debounceInfo.get(B));if(this._sessionDisposables.add(G),this._sessionDisposables.add((0,f.toDisposable)(()=>H?.dispose(!0))),G.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange($=>{($.scrollTopChanged||!G.isScheduled())&&G.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent($=>{const ie=Math.max(G.delay,1250);G.schedule(ie)})),z.enabled==="on")this._activeRenderMode=0;else{let $,ie;z.enabled==="onUnlessPressed"?($=0,ie=1):($=1,ie=0),this._activeRenderMode=$,this._sessionDisposables.add(t.ModifierKeyEmitter.getInstance().event(J=>{if(!this._editor.hasModel())return;const j=J.altKey&&J.ctrlKey&&!(J.shiftKey||J.metaKey)?ie:$;if(j!==this._activeRenderMode){this._activeRenderMode=j;const ee=this._editor.getModel(),X=this._copyInlayHintsWithCurrentAnchor(ee);this._updateHintsDecorators([ee.getFullModelRange()],X),G.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>G.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const z=new f.DisposableStore,B=z.add(new n.ClickLinkGesture(this._editor)),K=new f.DisposableStore;return z.add(K),z.add(B.onMouseMoveOrRelevantKeyDown(H=>{const[U]=H,G=this._getInlayHintLabelPart(U),$=this._editor.getModel();if(!G||!$){K.clear();return}const ie=new D.CancellationTokenSource;K.add((0,f.toDisposable)(()=>ie.dispose(!0))),G.item.resolve(ie.token),this._activeInlayHintPart=G.part.command||G.part.location?new P(G,U.hasTriggerModifier):void 0;const J=$.validatePosition(G.item.hint.position).lineNumber,j=new s.Range(J,1,J,$.getLineMaxColumn(J)),ee=this._getInlineHintsForRange(j);this._updateHintsDecorators([j],ee),K.add((0,f.toDisposable)(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([j],ee)}))})),z.add(B.onCancel(()=>K.clear())),z.add(B.onExecute(async H=>{const U=this._getInlayHintLabelPart(H);if(U){const G=U.part;G.location?this._instaService.invokeFunction(w.goToDefinitionWithLocation,H,this._editor,G.location):o.Command.is(G.command)&&await this._invokeCommand(G.command,U.item)}})),z}_getInlineHintsForRange(z){const B=new Set;for(const K of this._decorationsMetadata.values())z.containsRange(K.item.anchor.range)&&B.add(K.item);return Array.from(B)}_installDblClickGesture(z){return this._editor.onMouseUp(async B=>{if(B.event.detail!==2)return;const K=this._getInlayHintLabelPart(B);if(K&&(B.event.preventDefault(),await K.item.resolve(D.CancellationToken.None),(0,y.isNonEmptyArray)(K.item.hint.textEdits))){const H=K.item.hint.textEdits.map(U=>i.EditOperation.replace(s.Range.lift(U.range),U.text));this._editor.executeEdits("inlayHint.default",H),z()}})}_installContextMenu(){return this._editor.onContextMenu(async z=>{if(!(z.event.target instanceof HTMLElement))return;const B=this._getInlayHintLabelPart(z);B&&await this._instaService.invokeFunction(w.showGoToContextMenu,this._editor,z.event.target,B)})}_getInlayHintLabelPart(z){if(z.target.type!==6)return;const B=z.target.detail.injectedText?.options;if(B instanceof d.ModelDecorationInjectedTextOptions&&B?.attachedData instanceof N)return B.attachedData}async _invokeCommand(z,B){try{await this._commandService.executeCommand(z.id,...z.arguments??[])}catch(K){this._notificationService.notify({severity:_.Severity.Error,source:B.provider.displayName,message:K})}}_cacheHintsForFastRestore(z){const B=this._copyInlayHintsWithCurrentAnchor(z);this._inlayHintsCache.set(z,B)}_copyInlayHintsWithCurrentAnchor(z){const B=new Map;for(const[K,H]of this._decorationsMetadata){if(B.has(H.item))continue;const U=z.getDecorationRange(K);if(U){const G=new g.InlayHintAnchor(U,H.item.anchor.direction),$=H.item.with({anchor:G});B.set(H.item,$)}}return Array.from(B.values())}_getHintsRanges(){const B=this._editor.getModel(),K=this._editor.getVisibleRangesPlusViewportAboveBelow(),H=[];for(const U of K.sort(s.Range.compareRangesUsingStarts)){const G=B.validateRange(new s.Range(U.startLineNumber-30,U.startColumn,U.endLineNumber+30,U.endColumn));H.length===0||!s.Range.areIntersectingOrTouching(H[H.length-1],G)?H.push(G):H[H.length-1]=s.Range.plusRange(H[H.length-1],G)}return H}_updateHintsDecorators(z,B){const K=[],H=(te,Z,se,re,oe)=>{const le={content:se,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:Z.className,cursorStops:re,attachedData:oe};K.push({item:te,classNameRef:Z,decoration:{range:te.anchor.range,options:{description:"InlayHint",showIfCollapsed:te.anchor.range.isEmpty(),collapseOnReplaceEdit:!te.anchor.range.isEmpty(),stickiness:0,[te.anchor.direction]:this._activeRenderMode===0?le:void 0}}})},U=(te,Z)=>{const se=this._ruleFactory.createClassNameRef({width:`${G/3|0}px`,display:"inline-block"});H(te,se,"\u200A",Z?u.InjectedTextCursorStops.Right:u.InjectedTextCursorStops.None)},{fontSize:G,fontFamily:$,padding:ie,isUniform:J}=this._getLayoutInfo(),j="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(j,$);for(const te of B){te.hint.paddingLeft&&U(te,!1);const Z=typeof te.hint.label=="string"?[{label:te.hint.label}]:te.hint.label;for(let se=0;se<Z.length;se++){const re=Z[se],oe=se===0,le=se===Z.length-1,ne={fontSize:`${G}px`,fontFamily:`var(${j}), ${r.EDITOR_FONT_DEFAULTS.fontFamily}`,verticalAlign:J?"baseline":"middle",unicodeBidi:"isolate"};(0,y.isNonEmptyArray)(te.hint.textEdits)&&(ne.cursor="default"),this._fillInColors(ne,te.hint),(re.command||re.location)&&this._activeInlayHintPart?.part.item===te&&this._activeInlayHintPart.part.index===se&&(ne.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(ne.color=(0,k.themeColorFromId)(A.editorActiveLinkForeground),ne.cursor="pointer")),ie&&(oe&&le?(ne.padding=`1px ${Math.max(1,G/4)|0}px`,ne.borderRadius=`${G/4|0}px`):oe?(ne.padding=`1px 0 1px ${Math.max(1,G/4)|0}px`,ne.borderRadius=`${G/4|0}px 0 0 ${G/4|0}px`):le?(ne.padding=`1px ${Math.max(1,G/4)|0}px 1px 0`,ne.borderRadius=`0 ${G/4|0}px ${G/4|0}px 0`):ne.padding="1px 0 1px 0"),H(te,this._ruleFactory.createClassNameRef(ne),V(re.label),le&&!te.hint.paddingRight?u.InjectedTextCursorStops.Right:u.InjectedTextCursorStops.None,new N(te,se))}if(te.hint.paddingRight&&U(te,!0),K.length>L._MAX_DECORATORS)break}const ee=[];for(const te of z)for(const{id:Z}of this._editor.getDecorationsInRange(te)??[]){const se=this._decorationsMetadata.get(Z);se&&(ee.push(Z),se.classNameRef.dispose(),this._decorationsMetadata.delete(Z))}const X=a.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(te=>{const Z=te.deltaDecorations(ee,K.map(se=>se.decoration));for(let se=0;se<Z.length;se++){const re=K[se];this._decorationsMetadata.set(Z[se],re)}}),X.restore(this._editor)}_fillInColors(z,B){B.kind===o.InlayHintKind.Parameter?(z.backgroundColor=(0,k.themeColorFromId)(A.editorInlayHintParameterBackground),z.color=(0,k.themeColorFromId)(A.editorInlayHintParameterForeground)):B.kind===o.InlayHintKind.Type?(z.backgroundColor=(0,k.themeColorFromId)(A.editorInlayHintTypeBackground),z.color=(0,k.themeColorFromId)(A.editorInlayHintTypeForeground)):(z.backgroundColor=(0,k.themeColorFromId)(A.editorInlayHintBackground),z.color=(0,k.themeColorFromId)(A.editorInlayHintForeground))}_getLayoutInfo(){const z=this._editor.getOption(138),B=z.padding,K=this._editor.getOption(51),H=this._editor.getOption(48);let U=z.fontSize;(!U||U<5||U>K)&&(U=K);const G=z.fontFamily||H;return{fontSize:U,fontFamily:G,padding:B,isUniform:!B&&G===H&&U===K}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const z of this._decorationsMetadata.values())z.classNameRef.dispose();this._decorationsMetadata.clear()}getInlayHintsForLine(z){if(!this._editor.hasModel())return[];const B=new Set,K=[];for(const H of this._editor.getLineDecorations(z)){const U=this._decorationsMetadata.get(H.id);U&&!B.has(U.item.hint)&&(B.add(U.item.hint),K.push(U.item))}return K}};e.InlayHintsController=F,e.InlayHintsController=F=L=fe([O(1,c.ILanguageFeaturesService),O(2,p.ILanguageFeatureDebounceService),O(3,M),O(4,E.ICommandService),O(5,_.INotificationService),O(6,I.IInstantiationService)],F);function V(W){const z="\xA0";return W.replace(/[ \t]/g,z)}E.CommandsRegistry.registerCommand("_executeInlayHintProvider",async(W,...z)=>{const[B,K]=z;(0,m.assertType)(S.URI.isUri(B)),(0,m.assertType)(s.Range.isIRange(K));const{inlayHintsProvider:H}=W.get(c.ILanguageFeaturesService),U=await W.get(l.ITextModelService).createModelReference(B);try{const G=await g.InlayHintsFragments.create(H,U.object.textEditorModel,[s.Range.lift(K)],D.CancellationToken.None),$=G.items.map(ie=>ie.hint);return setTimeout(()=>G.dispose(),0),$}finally{U.dispose()}})}),define(Q[3438],Y([1,0,14,110,51,98,395,50,75,1188,883,900,9,41,74,2404,18,842,20]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsHover=void 0;class p extends T.HoverForeignElementAnchor{constructor(n,g,w,E){super(10,g,n.item.anchor.range,w,E,!0),this.part=n}}let c=class extends S.MarkdownHoverParticipant{constructor(n,g,w,E,C,I){super(n,g,w,E,I),this._resolverService=C,this.hoverOrdinal=6}suggestHoverAnchor(n){if(!h.InlayHintsController.get(this._editor)||n.target.type!==6)return null;const w=n.target.detail.injectedText?.options;return w instanceof D.ModelDecorationInjectedTextOptions&&w.attachedData instanceof h.RenderedInlayHintLabelPart?new p(w.attachedData,this,n.event.posx,n.event.posy):null}computeSync(){return[]}computeAsync(n,g,w){return n instanceof p?new t.AsyncIterableObject(async E=>{const{part:C}=n;if(await C.item.resolve(w),w.isCancellationRequested)return;let I;typeof C.item.hint.tooltip=="string"?I=new y.MarkdownString().appendText(C.item.hint.tooltip):C.item.hint.tooltip&&(I=C.item.hint.tooltip),I&&E.emitOne(new S.MarkdownHover(this,n.range,[I],!1,0)),(0,d.isNonEmptyArray)(C.item.hint.textEdits)&&E.emitOne(new S.MarkdownHover(this,n.range,[new y.MarkdownString().appendText((0,s.localize)(0,null))],!1,10001));let _;if(typeof C.part.tooltip=="string"?_=new y.MarkdownString().appendText(C.part.tooltip):C.part.tooltip&&(_=C.part.tooltip),_&&E.emitOne(new S.MarkdownHover(this,n.range,[_],!1,1)),C.part.location||C.part.command){let k;const R=this._editor.getOption(76)==="altKey"?o.isMacintosh?(0,s.localize)(1,null):(0,s.localize)(2,null):o.isMacintosh?(0,s.localize)(3,null):(0,s.localize)(4,null);C.part.location&&C.part.command?k=new y.MarkdownString().appendText((0,s.localize)(5,null,R)):C.part.location?k=new y.MarkdownString().appendText((0,s.localize)(6,null,R)):C.part.command&&(k=new y.MarkdownString(`[${(0,s.localize)(7,null)}](${(0,u.asCommandLink)(C.part.command)} "${C.part.command.title}") (${R})`,{isTrusted:!0})),k&&E.emitOne(new S.MarkdownHover(this,n.range,[k],!1,1e4))}const A=await this._resolveInlayHintLabelPartHover(C,w);for await(const k of A)E.emitOne(k)}):t.AsyncIterableObject.EMPTY}async _resolveInlayHintLabelPartHover(n,g){if(!n.part.location)return t.AsyncIterableObject.EMPTY;const{uri:w,range:E}=n.part.location,C=await this._resolverService.createModelReference(w);try{const I=C.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(I)?(0,m.getHover)(this._languageFeaturesService.hoverProvider,I,new b.Position(E.startLineNumber,E.startColumn),g).filter(_=>!(0,y.isEmptyMarkdownString)(_.hover.contents)).map(_=>new S.MarkdownHover(this,n.item.anchor.range,_.hover.contents,!1,2+_.ordinal)):t.AsyncIterableObject.EMPTY}finally{C.dispose()}}};e.InlayHintsHover=c,e.InlayHintsHover=c=fe([O(1,f.ILanguageService),O(2,r.IOpenerService),O(3,a.IConfigurationService),O(4,v.ITextModelService),O(5,i.ILanguageFeaturesService)],c)}),define(Q[3439],Y([1,0,48,395,900,3438]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerEditorContribution)(b.InlayHintsController.ID,b.InlayHintsController,1),y.HoverParticipantRegistry.register(D.InlayHintsHover)}),define(Q[1242],Y([1,0,4,74,3411,3410,5,29,13,8,73,677,27,882,1241,51,31,125,328,7,1092,129]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.StickyScrollController=void 0;let g=class extends t.Disposable{static{n=this}static{this.ID="store.contrib.stickyScrollController"}constructor(E,C,I,_,A,k,L){super(),this._editor=E,this._contextMenuService=C,this._languageFeaturesService=I,this._instaService=_,this._contextKeyService=L,this._sessionStore=new t.DisposableStore,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new b.StickyScrollWidget(this._editor),this._stickyLineCandidateProvider=new D.StickyLineCandidateProvider(this._editor,I,A),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new b.StickyScrollWidgetState([],[],0),this._readConfiguration();const R=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(N=>{(N.hasChanged(113)||N.hasChanged(71)||N.hasChanged(65)||N.hasChanged(108))&&this._readConfiguration()})),this._register(p.addDisposableListener(R,p.EventType.CONTEXT_MENU,async N=>{this._onContextMenu(N)})),this._stickyScrollFocusedContextKey=S.EditorContextKeys.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=S.EditorContextKeys.stickyScrollVisible.bindTo(this._contextKeyService);const M=this._register(p.trackFocus(R));this._register(M.onDidBlur(N=>{this._positionRevealed===!1&&R.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(M.onDidFocus(N=>{this.focus()})),this._registerMouseListeners(),this._register(p.addDisposableListener(R,p.EventType.MOUSE_DOWN,N=>{this._onMouseDown=!0}))}get stickyScrollCandidateProvider(){return this._stickyLineCandidateProvider}get stickyScrollWidgetState(){return this._widgetState}static get(E){return E.getContribution(n.ID)}_disposeFocusStickyScrollStore(){this._stickyScrollFocusedContextKey.set(!1),this._focusDisposableStore?.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new t.DisposableStore,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex<this._stickyScrollWidget.lineNumberCount-1&&this._focusNav(!0)}focusPrevious(){this._focusedStickyElementIndex>0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(E){this._focusedStickyElementIndex=E?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const E=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:E[this._focusedStickyElementIndex],column:1})}_revealPosition(E){this._reveaInEditor(E,()=>this._editor.revealPosition(E))}_revealLineInCenterIfOutsideViewport(E){this._reveaInEditor(E,()=>this._editor.revealLineInCenterIfOutsideViewport(E.lineNumber,0))}_reveaInEditor(E,C){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,C(),this._editor.setSelection(a.Range.fromPositions(E)),this._editor.focus()}_registerMouseListeners(){const E=this._register(new t.DisposableStore),C=this._register(new h.ClickLinkGesture(this._editor,{extractLineNumberFromMouseEvent:A=>{const k=this._stickyScrollWidget.getEditorPositionFromNode(A.target.element);return k?k.lineNumber:0}})),I=A=>{if(!this._editor.hasModel()||A.target.type!==12||A.target.detail!==this._stickyScrollWidget.getId())return null;const k=A.target.element;if(!k||k.innerText!==k.innerHTML)return null;const L=this._stickyScrollWidget.getEditorPositionFromNode(k);return L?{range:new a.Range(L.lineNumber,L.column,L.lineNumber,L.column+k.innerText.length),textElement:k}:null},_=this._stickyScrollWidget.getDomNode();this._register(p.addStandardDisposableListener(_,p.EventType.CLICK,A=>{if(A.ctrlKey||A.altKey||A.metaKey||!A.leftButton)return;if(A.shiftKey){const L=this._stickyScrollWidget.getStickyLineIndexFromChildDomNode(A.target);if(L===null)return;const R=new s.Position(this._endLineNumbers[L],1);this._revealLineInCenterIfOutsideViewport(R);return}let k=this._stickyScrollWidget.getEditorPositionFromNode(A.target);if(!k){const L=this._stickyScrollWidget.getLineNumberFromChildDomNode(A.target);if(L===null)return;k=new s.Position(L,1)}this._revealPosition(k)})),this._register(p.addStandardDisposableListener(_,p.EventType.MOUSE_MOVE,A=>{if(A.shiftKey){const k=this._stickyScrollWidget.getStickyLineIndexFromChildDomNode(A.target);if(k===null||this._showEndForLine!==null&&this._showEndForLine===k)return;this._showEndForLine=k,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(p.addDisposableListener(_,p.EventType.MOUSE_LEAVE,A=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(C.onMouseMoveOrRelevantKeyDown(([A,k])=>{const L=I(A);if(!L||!A.hasTriggerModifier||!this._editor.hasModel()){E.clear();return}const{range:R,textElement:M}=L;if(!R.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=R,E.clear();else if(M.style.textDecoration==="underline")return;const N=new o.CancellationTokenSource;E.add((0,t.toDisposable)(()=>N.dispose(!0)));let P;(0,r.getDefinitionsAtPosition)(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new s.Position(R.startLineNumber,R.startColumn+1),N.token).then(x=>{if(!N.token.isCancellationRequested)if(x.length!==0){this._candidateDefinitionsLength=x.length;const F=M;P!==F?(E.clear(),P=F,P.style.textDecoration="underline",E.add((0,t.toDisposable)(()=>{P.style.textDecoration="none"}))):P||(P=F,P.style.textDecoration="underline",E.add((0,t.toDisposable)(()=>{P.style.textDecoration="none"})))}else E.clear()})})),this._register(C.onCancel(()=>{E.clear()})),this._register(C.onExecute(async A=>{if(A.target.type!==12||A.target.detail!==this._stickyScrollWidget.getId())return;const k=this._stickyScrollWidget.getEditorPositionFromNode(A.target.element);k&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:k.lineNumber,column:1})),this._instaService.invokeFunction(i.goToDefinitionWithLocation,A,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))}))}_onContextMenu(E){const C=new l.StandardMouseEvent(E);this._contextMenuService.showContextMenu({menuId:v.MenuId.StickyScrollContext,getAnchor:()=>C})}_readConfiguration(){const E=this._editor.getOption(113);if(E.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else E.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(I=>{I.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(I=>this._onTokensChange(I))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=null,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(66).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=null,this._renderStickyScroll()}))}_needsUpdate(E){const C=this._stickyScrollWidget.getCurrentLines();for(const I of C)for(const _ of E.ranges)if(I>=_.fromLineNumber&&I<=_.toLineNumber)return!0;return!1}_onTokensChange(E){this._needsUpdate(E)&&this._renderStickyScroll()}_onDidResize(){const C=this._editor.getLayoutInfo().height/this._editor.getOption(65);this._maxStickyLines=Math.round(C*.25)}_renderStickyScroll(){const E=this._editor.getModel();if(!E||E.isTooLargeForTokenization()){this._stickyScrollWidget.setState(void 0);return}const C=this._stickyLineCandidateProvider.getVersionId();if(C===void 0||C===E.getVersionId())if(this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.startLineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState);else if(this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const I=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(I)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}findScrollWidgetState(){const E=this._editor.getOption(65),C=Math.min(this._maxStickyLines,this._editor.getOption(113).maxLineCount),I=this._editor.getScrollTop();let _=0;const A=[],k=[],L=this._editor.getVisibleRanges();if(L.length!==0){const R=new c.StickyRange(L[0].startLineNumber,L[L.length-1].endLineNumber),M=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(R);for(const N of M){const P=N.startLineNumber,x=N.endLineNumber,F=N.nestingDepth;if(x-P>0){const V=(F-1)*E,W=F*E,z=this._editor.getBottomForLineNumber(P)-I,B=this._editor.getTopForLineNumber(x)-I,K=this._editor.getBottomForLineNumber(x)-I;if(V>B&&V<=K){A.push(P),k.push(x+1),_=K-W;break}else W>z&&W<=K&&(A.push(P),k.push(x+1));if(A.length===C)break}}}return this._endLineNumbers=k,new b.StickyScrollWidgetState(A,k,_,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};e.StickyScrollController=g,e.StickyScrollController=g=n=fe([O(1,f.IContextMenuService),O(2,y.ILanguageFeaturesService),O(3,T.IInstantiationService),O(4,u.ILanguageConfigurationService),O(5,d.ILanguageFeatureDebounceService),O(6,m.IContextKeyService)],g)}),define(Q[3440],Y([1,0,48,2427,81,13,9,8,73,1242]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectEditor=e.GoToStickyScrollLine=e.SelectPreviousStickyScrollLine=e.SelectNextStickyScrollLine=e.FocusStickyScroll=e.ToggleStickyScroll=void 0;class S extends D.Action2{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:(0,y.localize)(0,null),mnemonicTitle:(0,y.localize)(1,null),original:"Toggle Sticky Scroll"},category:b.Categories.View,toggled:{condition:f.ContextKeyExpr.equals("config.editor.stickyScroll.enabled",!0),title:(0,y.localize)(2,null),mnemonicTitle:(0,y.localize)(3,null)},menu:[{id:D.MenuId.CommandPalette},{id:D.MenuId.MenubarAppearanceMenu,group:"4_editor",order:3},{id:D.MenuId.StickyScrollContext}]})}async run(d){const p=d.get(T.IConfigurationService),c=!p.getValue("editor.stickyScroll.enabled");return p.updateValue("editor.stickyScroll.enabled",c)}}e.ToggleStickyScroll=S;const h=100;class a extends t.EditorAction2{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:(0,y.localize)(4,null),mnemonicTitle:(0,y.localize)(5,null),original:"Focus Sticky Scroll"},precondition:f.ContextKeyExpr.and(f.ContextKeyExpr.has("config.editor.stickyScroll.enabled"),v.EditorContextKeys.stickyScrollVisible),menu:[{id:D.MenuId.CommandPalette}]})}runEditorCommand(d,p){m.StickyScrollController.get(p)?.focus()}}e.FocusStickyScroll=a;class r extends t.EditorAction2{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:(0,y.localize)(6,null),original:"Select next sticky scroll line"},precondition:v.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:h,primary:18}})}runEditorCommand(d,p){m.StickyScrollController.get(p)?.focusNext()}}e.SelectNextStickyScrollLine=r;class i extends t.EditorAction2{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:(0,y.localize)(7,null),original:"Select previous sticky scroll line"},precondition:v.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:h,primary:16}})}runEditorCommand(d,p){m.StickyScrollController.get(p)?.focusPrevious()}}e.SelectPreviousStickyScrollLine=i;class s extends t.EditorAction2{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:(0,y.localize)(8,null),original:"Go to focused sticky scroll line"},precondition:v.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:h,primary:3}})}runEditorCommand(d,p){m.StickyScrollController.get(p)?.goToFocused()}}e.GoToStickyScrollLine=s;class o extends t.EditorAction2{constructor(){super({id:"editor.action.selectEditor",title:{value:(0,y.localize)(9,null),original:"Select Editor"},precondition:v.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:h,primary:9}})}runEditorCommand(d,p){m.StickyScrollController.get(p)?.selectEditor()}}e.SelectEditor=o}),define(Q[3441],Y([1,0,48,3440,1242,13]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerEditorContribution)(b.StickyScrollController.ID,b.StickyScrollController,1),(0,D.registerAction2)(y.ToggleStickyScroll),(0,D.registerAction2)(y.FocusStickyScroll),(0,D.registerAction2)(y.SelectPreviousStickyScrollLine),(0,D.registerAction2)(y.SelectNextStickyScrollLine),(0,D.registerAction2)(y.GoToStickyScrollLine),(0,D.registerAction2)(y.SelectEditor)}),define(Q[1243],Y([1,0,7,85,4,2433,88,13,8,5]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetStatus=void 0;class S extends T.MenuEntryActionViewItem{updateLabel(){const r=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!r)return super.updateLabel();this.label&&(this.label.textContent=(0,D.localize)(0,null,this._action.label,S.symbolPrintEnter(r)))}static symbolPrintEnter(r){return r.getLabel()?.replace(/\benter\b/gi,"\u23CE")}}let h=class{constructor(r,i,s,o,u){this._menuId=i,this._menuService=o,this._contextKeyService=u,this._menuDisposables=new b.DisposableStore,this.element=t.append(r,t.$(".suggest-status-bar"));const d=p=>p instanceof f.MenuItemAction?s.createInstance(S,p,void 0):void 0;this._leftActions=new y.ActionBar(this.element,{actionViewItemProvider:d}),this._rightActions=new y.ActionBar(this.element,{actionViewItemProvider:d}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const r=this._menuService.createMenu(this._menuId,this._contextKeyService),i=()=>{const s=[],o=[];for(const[u,d]of r.getActions())u==="left"?s.push(...d):o.push(...d);this._leftActions.clear(),this._leftActions.push(s),this._rightActions.clear(),this._rightActions.push(o)};this._menuDisposables.add(r.onDidChange(()=>i())),this._menuDisposables.add(r)}hide(){this._menuDisposables.clear()}};e.SuggestWidgetStatus=h,e.SuggestWidgetStatus=h=fe([O(2,m.IInstantiationService),O(3,f.IMenuService),O(4,v.IContextKeyService)],h)}),define(Q[1244],Y([1,0,7,179,14,15,6,4,226,33,243,1243,2430,8,5,24,36,167,19,668,329,1178,3389,54,87,791,1746,886]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w){"use strict";var E;Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestContentWidget=e.SuggestWidget=e.editorSuggestWidgetSelectedBackground=void 0,(0,o.registerColor)("editorSuggestWidget.background",{dark:o.editorWidgetBackground,light:o.editorWidgetBackground,hcDark:o.editorWidgetBackground,hcLight:o.editorWidgetBackground},a.localize(0,null)),(0,o.registerColor)("editorSuggestWidget.border",{dark:o.editorWidgetBorder,light:o.editorWidgetBorder,hcDark:o.editorWidgetBorder,hcLight:o.editorWidgetBorder},a.localize(1,null));const C=(0,o.registerColor)("editorSuggestWidget.foreground",{dark:o.editorForeground,light:o.editorForeground,hcDark:o.editorForeground,hcLight:o.editorForeground},a.localize(2,null));(0,o.registerColor)("editorSuggestWidget.selectedForeground",{dark:o.quickInputListFocusForeground,light:o.quickInputListFocusForeground,hcDark:o.quickInputListFocusForeground,hcLight:o.quickInputListFocusForeground},a.localize(3,null)),(0,o.registerColor)("editorSuggestWidget.selectedIconForeground",{dark:o.quickInputListFocusIconForeground,light:o.quickInputListFocusIconForeground,hcDark:o.quickInputListFocusIconForeground,hcLight:o.quickInputListFocusIconForeground},a.localize(4,null)),e.editorSuggestWidgetSelectedBackground=(0,o.registerColor)("editorSuggestWidget.selectedBackground",{dark:o.quickInputListFocusBackground,light:o.quickInputListFocusBackground,hcDark:o.quickInputListFocusBackground,hcLight:o.quickInputListFocusBackground},a.localize(5,null)),(0,o.registerColor)("editorSuggestWidget.highlightForeground",{dark:o.listHighlightForeground,light:o.listHighlightForeground,hcDark:o.listHighlightForeground,hcLight:o.listHighlightForeground},a.localize(6,null)),(0,o.registerColor)("editorSuggestWidget.focusHighlightForeground",{dark:o.listFocusHighlightForeground,light:o.listFocusHighlightForeground,hcDark:o.listFocusHighlightForeground,hcLight:o.listFocusHighlightForeground},a.localize(7,null)),(0,o.registerColor)("editorSuggestWidgetStatus.foreground",{dark:(0,o.transparent)(C,.5),light:(0,o.transparent)(C,.5),hcDark:(0,o.transparent)(C,.5),hcLight:(0,o.transparent)(C,.5)},a.localize(8,null));var I;(function(L){L[L.Hidden=0]="Hidden",L[L.Loading=1]="Loading",L[L.Empty=2]="Empty",L[L.Open=3]="Open",L[L.Frozen=4]="Frozen",L[L.Details=5]="Details"})(I||(I={}));class _{constructor(R,M){this._service=R,this._key=`suggestWidget.size/${M.getEditorType()}/${M instanceof S.EmbeddedCodeEditorWidget}`}restore(){const R=this._service.get(this._key,0)??"";try{const M=JSON.parse(R);if(t.Dimension.is(M))return t.Dimension.lift(M)}catch{}}store(R){this._service.store(this._key,JSON.stringify(R),0,1)}reset(){this._service.remove(this._key,0)}}let A=class{static{E=this}static{this.LOADING_MESSAGE=a.localize(9,null)}static{this.NO_SUGGESTIONS_MESSAGE=a.localize(10,null)}constructor(R,M,N,P,x){this.editor=R,this._storageService=M,this._state=0,this._isAuto=!1,this._pendingLayout=new f.MutableDisposable,this._pendingShowDetails=new f.MutableDisposable,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new b.TimeoutTimer,this._disposables=new f.DisposableStore,this._onDidSelect=new T.PauseableEmitter,this._onDidFocus=new T.PauseableEmitter,this._onDidHide=new T.Emitter,this._onDidShow=new T.Emitter,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new T.Emitter,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new p.ResizableHTMLElement,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new k(this,R),this._persistedSize=new _(M,R);class F{constructor(U,G,$=!1,ie=!1){this.persistedSize=U,this.currentSize=G,this.persistHeight=$,this.persistWidth=ie}}let V;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),V=new F(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(H=>{if(this._resize(H.dimension.width,H.dimension.height),V&&(V.persistHeight=V.persistHeight||!!H.north||!!H.south,V.persistWidth=V.persistWidth||!!H.east||!!H.west),!!H.done){if(V){const{itemHeight:U,defaultSize:G}=this.getLayoutInfo(),$=Math.round(U/2);let{width:ie,height:J}=this.element.size;(!V.persistHeight||Math.abs(V.currentSize.height-J)<=$)&&(J=V.persistedSize?.height??G.height),(!V.persistWidth||Math.abs(V.currentSize.width-ie)<=$)&&(ie=V.persistedSize?.width??G.width),this._persistedSize.store(new t.Dimension(ie,J))}this._contentWidget.unlockPreference(),V=void 0}})),this._messageElement=t.append(this.element.domNode,t.$(".message")),this._listElement=t.append(this.element.domNode,t.$(".tree"));const W=x.createInstance(l.SuggestDetailsWidget,this.editor);W.onDidClose(this.toggleDetails,this,this._disposables),this._details=new l.SuggestDetailsOverlay(W,this.editor);const z=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(116).showIcons);z();const B=x.createInstance(n.ItemRenderer,this.editor);this._disposables.add(B),this._disposables.add(B.onDidToggleDetails(()=>this.toggleDetails())),this._list=new y.List("SuggestWidget",this._listElement,{getHeight:H=>this.getLayoutInfo().itemHeight,getTemplateId:H=>"suggestion"},[B],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>a.localize(11,null),getWidgetRole:()=>"listbox",getAriaLabel:H=>{let U=H.textLabel;if(typeof H.completion.label!="string"){const{detail:J,description:j}=H.completion.label;J&&j?U=a.localize(12,null,U,J,j):J?U=a.localize(13,null,U,J):j&&(U=a.localize(14,null,U,j))}if(!H.isResolved||!this._isDetailsVisible())return U;const{documentation:G,detail:$}=H.completion,ie=m.format("{0}{1}",$||"",G?typeof G=="string"?G:G.value:"");return a.localize(15,null,U,ie)}}}),this._list.style((0,g.getListStyles)({listInactiveFocusBackground:e.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:o.activeContrastBorder})),this._status=x.createInstance(h.SuggestWidgetStatus,this.element.domNode,c.suggestWidgetStatusbarMenu);const K=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(116).showStatusBar);K(),this._disposables.add(P.onDidColorThemeChange(H=>this._onThemeChange(H))),this._onThemeChange(P.getColorTheme()),this._disposables.add(this._list.onMouseDown(H=>this._onListMouseDownOrTap(H))),this._disposables.add(this._list.onTap(H=>this._onListMouseDownOrTap(H))),this._disposables.add(this._list.onDidChangeSelection(H=>this._onListSelection(H))),this._disposables.add(this._list.onDidChangeFocus(H=>this._onListFocus(H))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(H=>{H.hasChanged(116)&&(K(),z())})),this._ctxSuggestWidgetVisible=c.Context.Visible.bindTo(N),this._ctxSuggestWidgetDetailsVisible=c.Context.DetailsVisible.bindTo(N),this._ctxSuggestWidgetMultipleSuggestions=c.Context.MultipleSuggestions.bindTo(N),this._ctxSuggestWidgetHasFocusedSuggestion=c.Context.HasFocusedSuggestion.bindTo(N),this._disposables.add(t.addStandardDisposableListener(this._details.widget.domNode,"keydown",H=>{this._onDetailsKeydown.fire(H)})),this._disposables.add(this.editor.onMouseDown(H=>this._onEditorMouseDown(H)))}dispose(){this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),this._loadingTimeout?.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(R){this._details.widget.domNode.contains(R.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(R.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(R){typeof R.element>"u"||typeof R.index>"u"||(R.browserEvent.preventDefault(),R.browserEvent.stopPropagation(),this._select(R.element,R.index))}_onListSelection(R){R.elements.length&&this._select(R.elements[0],R.indexes[0])}_select(R,M){const N=this._completionModel;N&&(this._onDidSelect.fire({item:R,index:M,model:N}),this.editor.focus())}_onThemeChange(R){this._details.widget.borderWidth=(0,u.isHighContrast)(R.type)?2:1}_onListFocus(R){if(this._ignoreFocusEvents)return;if(!R.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const M=R.elements[0],N=R.indexes[0];M!==this._focusedItem&&(this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=M,this._list.reveal(N),this._currentSuggestionDetails=(0,b.createCancelablePromise)(async P=>{const x=(0,b.disposableTimeout)(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),F=P.onCancellationRequested(()=>x.dispose()),V=await M.resolve(P);return x.dispose(),F.dispose(),V}),this._currentSuggestionDetails.then(()=>{N>=this._list.length||M!==this._list.element(N)||(this._ignoreFocusEvents=!0,this._list.splice(N,1,[M]),this._list.setFocus([N]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:(0,n.getAriaId)(N)}))}).catch(D.onUnexpectedError)),this._onDidFocus.fire({item:M,index:N,model:this._completionModel})}_setState(R){if(this._state!==R)switch(this._state=R,this.element.domNode.classList.toggle("frozen",R===4),this.element.domNode.classList.remove("message"),R){case 0:t.hide(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=E.LOADING_MESSAGE,t.hide(this._listElement,this._status.element),t.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,w.status)(E.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=E.NO_SUGGESTIONS_MESSAGE,t.hide(this._listElement,this._status.element),t.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,w.status)(E.NO_SUGGESTIONS_MESSAGE);break;case 3:t.hide(this._messageElement),t.show(this._listElement,this._status.element),this._show();break;case 4:t.hide(this._messageElement),t.show(this._listElement,this._status.element),this._show();break;case 5:t.hide(this._messageElement),t.show(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(R,M){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!R,this._isAuto||(this._loadingTimeout=(0,b.disposableTimeout)(()=>this._setState(1),M)))}showSuggestions(R,M,N,P,x){if(this._contentWidget.setPosition(this.editor.getPosition()),this._loadingTimeout?.dispose(),this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==R&&(this._completionModel=R),N&&this._state!==2&&this._state!==0){this._setState(4);return}const F=this._completionModel.items.length,V=F===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(F>1),V){this._setState(P?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(N?4:3),this._list.reveal(M,0),this._list.setFocus(x?[]:[M])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=t.runAtThisOrScheduleAtNextAnimationFrame(()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):((0,l.canExpandCompletionItem)(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(R){this._pendingShowDetails.value=t.runAtThisOrScheduleAtNextAnimationFrame(()=>{this._pendingShowDetails.clear(),this._details.show(),R?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){this._pendingLayout.clear(),this._pendingShowDetails.clear(),this._loadingTimeout?.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const R=this._persistedSize.restore(),M=Math.ceil(this.getLayoutInfo().itemHeight*4.3);R&&R.height<M&&this._persistedSize.store(R.with(void 0,M))}isFrozen(){return this._state===4}_afterRender(R){if(R===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&this._details.show(),this._positionDetails())}_layout(R){if(!this.editor.hasModel()||!this.editor.getDomNode())return;const M=t.getClientArea(document.body),N=this.getLayoutInfo();R||(R=N.defaultSize);let P=R.height,x=R.width;if(this._status.element.style.height=`${N.itemHeight}px`,this._state===2||this._state===1)P=N.itemHeight+N.borderHeight,x=N.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new t.Dimension(x,P),this._contentWidget.setPreference(2);else{const F=M.width-N.borderHeight-2*N.horizontalPadding;x>F&&(x=F);const V=this._completionModel?this._completionModel.stats.pLabelLen*N.typicalHalfwidthCharacterWidth:x,W=N.statusBarHeight+this._list.contentHeight+N.borderHeight,z=N.itemHeight+N.statusBarHeight,B=t.getDomNodePagePosition(this.editor.getDomNode()),K=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),H=B.top+K.top+K.height,U=Math.min(M.height-H-N.verticalPadding,W),G=B.top+K.top-N.verticalPadding,$=Math.min(G,W);let ie=Math.min(Math.max($,U)+N.borderHeight,W);P===this._cappedHeight?.capped&&(P=this._cappedHeight.wanted),P<z&&(P=z),P>ie&&(P=ie);const J=150;P>U||this._forceRenderingAbove&&G>J?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),ie=$):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),ie=U),this.element.preferredSize=new t.Dimension(V,N.defaultSize.height),this.element.maxSize=new t.Dimension(F,ie),this.element.minSize=new t.Dimension(220,z),this._cappedHeight=P===W?{wanted:this._cappedHeight?.wanted??R.height,capped:P}:void 0}this._resize(x,P)}_resize(R,M){const{width:N,height:P}=this.element.maxSize;R=Math.min(N,R),M=Math.min(P,M);const{statusBarHeight:x}=this.getLayoutInfo();this._list.layout(M-x,R),this._listElement.style.height=`${M-x}px`,this.element.layout(M,R),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,this._contentWidget.getPosition()?.preference[0]===2)}getLayoutInfo(){const R=this.editor.getOption(49),M=(0,v.clamp)(this.editor.getOption(118)||R.lineHeight,8,1e3),N=!this.editor.getOption(116).showStatusBar||this._state===2||this._state===1?0:M,P=this._details.widget.borderWidth,x=2*P;return{itemHeight:M,statusBarHeight:N,borderWidth:P,borderHeight:x,typicalHalfwidthCharacterWidth:R.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new t.Dimension(430,N+12*M+x)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(R){this._storageService.store("expandSuggestionDocs",R,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};e.SuggestWidget=A,e.SuggestWidget=A=E=fe([O(1,s.IStorageService),O(2,r.IContextKeyService),O(3,d.IThemeService),O(4,i.IInstantiationService)],A);class k{constructor(R,M){this._widget=R,this._editor=M,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:R,width:M}=this._widget.element.size,{borderWidth:N,horizontalPadding:P}=this._widget.getLayoutInfo();return new t.Dimension(M+2*N+P,R+2*N)}afterRender(R){this._widget._afterRender(R)}setPreference(R){this._preferenceLocked||(this._preference=R)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(R){this._position=R}}e.SuggestContentWidget=k}),define(Q[311],Y([1,0,87,20,14,31,15,6,321,4,18,145,17,390,48,165,51,27,73,210,304,1238,3178,2429,28,8,5,11,329,3177,1918,3428,1919,1244,30,26,122]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P,x){"use strict";var F;Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerSuggestAction=e.SuggestController=void 0;const V=!1;class W{constructor(ie,J){if(this._model=ie,this._position=J,ie.getLineMaxColumn(J.lineNumber)!==J.column){const ee=ie.getOffsetAt(J),X=ie.getPositionAt(ee+1);this._marker=ie.deltaDecorations([],[{range:u.Range.fromPositions(J,X),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(ie){if(this._model.isDisposed()||this._position.lineNumber!==ie.lineNumber)return 0;if(this._marker){const J=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(J.getStartPosition())-this._model.getOffsetAt(ie)}else return this._model.getLineMaxColumn(ie.lineNumber)-ie.column}}var z;(function($){$[$.None=0]="None",$[$.NoBeforeUndoStop=1]="NoBeforeUndoStop",$[$.NoAfterUndoStop=2]="NoAfterUndoStop",$[$.KeepAlternativeSuggestions=4]="KeepAlternativeSuggestions",$[$.AlternativeOverwriteConfig=8]="AlternativeOverwriteConfig"})(z||(z={}));let B=class{static{F=this}static{this.ID="editor.contrib.suggestController"}static get(ie){return ie.getContribution(F.ID)}constructor(ie,J,j,ee,X,te,Z){this._memoryService=J,this._commandService=j,this._contextKeyService=ee,this._instantiationService=X,this._logService=te,this._telemetryService=Z,this._lineSuffix=new m.MutableDisposable,this._toDispose=new m.DisposableStore,this._selectors=new K(le=>le.priority),this._onWillInsertSuggestItem=new f.Emitter,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=ie,this.model=X.createInstance(L.SuggestModel,this.editor),this._selectors.register({priority:0,select:(le,ne,ce)=>this._memoryService.select(le,ne,ce)});const se=_.Context.InsertMode.bindTo(ee);se.set(ie.getOption(116).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>se.set(ie.getOption(116).insertMode))),this.widget=this._toDispose.add(new b.IdleValue(()=>{const le=this._instantiationService.createInstance(M.SuggestWidget,this.editor);this._toDispose.add(le),this._toDispose.add(le.onDidSelect(de=>this._insertSuggestion(de,0),this));const ne=new k.CommitCharacterController(this.editor,le,this.model,de=>this._insertSuggestion(de,2));this._toDispose.add(ne);const ce=_.Context.MakesTextEdit.bindTo(this._contextKeyService),ae=_.Context.HasInsertAndReplaceRange.bindTo(this._contextKeyService),ue=_.Context.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,m.toDisposable)(()=>{ce.reset(),ae.reset(),ue.reset()})),this._toDispose.add(le.onDidFocus(({item:de})=>{const ge=this.editor.getPosition(),he=de.editStart.column,be=ge.column;let ve=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!de.completion.additionalTextEdits&&!(de.completion.insertTextRules&4)&&be-he===de.completion.insertText.length&&(ve=this.editor.getModel().getValueInRange({startLineNumber:ge.lineNumber,startColumn:he,endLineNumber:ge.lineNumber,endColumn:be})!==de.completion.insertText),ce.set(ve),ae.set(!o.Position.equals(de.editInsertEnd,de.editReplaceEnd)),ue.set(!!de.provider.resolveCompletionItem||!!de.completion.documentation||de.completion.detail!==de.completion.label)})),this._toDispose.add(le.onDetailsKeyDown(de=>{if(de.toKeyCodeChord().equals(new v.KeyCodeChord(!0,!1,!1,!1,33))||S.isMacintosh&&de.toKeyCodeChord().equals(new v.KeyCodeChord(!1,!1,!1,!0,33))){de.stopPropagation();return}de.toKeyCodeChord().isModifierKey()||this.editor.focus()})),le})),this._overtypingCapturer=this._toDispose.add(new b.IdleValue(()=>this._toDispose.add(new R.OvertypingCapturer(this.editor,this.model)))),this._alternatives=this._toDispose.add(new b.IdleValue(()=>this._toDispose.add(new A.SuggestAlternatives(this.editor,this._contextKeyService)))),this._toDispose.add(X.createInstance(n.WordContextKey,ie)),this._toDispose.add(this.model.onDidTrigger(le=>{this.widget.value.showTriggered(le.auto,le.shy?250:50),this._lineSuffix.value=new W(this.editor.getModel(),le.position)})),this._toDispose.add(this.model.onDidSuggest(le=>{if(le.triggerOptions.shy)return;let ne=-1;for(const ae of this._selectors.itemsOrderedByPriorityDesc)if(ne=ae.select(this.editor.getModel(),this.editor.getPosition(),le.completionModel.items),ne!==-1)break;ne===-1&&(ne=0);let ce=!1;if(le.triggerOptions.auto){const ae=this.editor.getOption(116);ae.selectionMode==="never"||ae.selectionMode==="always"?ce=ae.selectionMode==="never":ae.selectionMode==="whenTriggerCharacter"?ce=le.triggerOptions.triggerKind!==1:ae.selectionMode==="whenQuickSuggestion"&&(ce=le.triggerOptions.triggerKind===1&&!le.triggerOptions.refilter)}this.widget.value.showSuggestions(le.completionModel,ne,le.isFrozen,le.triggerOptions.auto,ce)})),this._toDispose.add(this.model.onDidCancel(le=>{le.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{V||(this.model.cancel(),this.model.clear())}));const re=_.Context.AcceptSuggestionsOnEnter.bindTo(ee),oe=()=>{const le=this.editor.getOption(1);re.set(le==="on"||le==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>oe())),oe()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(ie,J){if(!ie||!ie.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const j=p.SnippetController2.get(this.editor);if(!j)return;this._onWillInsertSuggestItem.fire({item:ie.item});const ee=this.editor.getModel(),X=ee.getAlternativeVersionId(),{item:te}=ie,Z=[],se=new D.CancellationTokenSource;J&1||this.editor.pushUndoStop();const re=this.getOverwriteInfo(te,!!(J&8));this._memoryService.memorize(ee,this.editor.getPosition(),te);const oe=te.isResolved;let le=-1,ne=-1;if(Array.isArray(te.completion.additionalTextEdits)){this.model.cancel();const ae=r.StableEditorScrollState.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",te.completion.additionalTextEdits.map(ue=>s.EditOperation.replaceMove(u.Range.lift(ue.range),ue.text))),ae.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!oe){const ae=new h.StopWatch;let ue;const de=ee.onDidChangeContent(ve=>{if(ve.isFlush){se.cancel(),de.dispose();return}for(const Ie of ve.changes){const Se=u.Range.getEndPosition(Ie.range);(!ue||o.Position.isBefore(Se,ue))&&(ue=Se)}}),ge=J;J|=2;let he=!1;const be=this.editor.onWillType(()=>{be.dispose(),he=!0,ge&2||this.editor.pushUndoStop()});Z.push(te.resolve(se.token).then(()=>{if(!te.completion.additionalTextEdits||se.token.isCancellationRequested)return;if(ue&&te.completion.additionalTextEdits.some(Ie=>o.Position.isBefore(ue,u.Range.getStartPosition(Ie.range))))return!1;he&&this.editor.pushUndoStop();const ve=r.StableEditorScrollState.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",te.completion.additionalTextEdits.map(Ie=>s.EditOperation.replaceMove(u.Range.lift(Ie.range),Ie.text))),ve.restoreRelativeVerticalPositionOfCursor(this.editor),(he||!(ge&2))&&this.editor.pushUndoStop(),!0}).then(ve=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",ae.elapsed(),ve),ne=ve===!0?1:ve===!1?0:-2}).finally(()=>{de.dispose(),be.dispose()}))}let{insertText:ce}=te.completion;if(te.completion.insertTextRules&4||(ce=c.SnippetParser.escape(ce)),this.model.cancel(),j.insert(ce,{overwriteBefore:re.overwriteBefore,overwriteAfter:re.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(te.completion.insertTextRules&1),clipboardText:ie.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),J&2||this.editor.pushUndoStop(),te.completion.command)if(te.completion.command.id===H.id)this.model.trigger({auto:!0,retrigger:!0});else{const ae=new h.StopWatch;Z.push(this._commandService.executeCommand(te.completion.command.id,...te.completion.command.arguments?[...te.completion.command.arguments]:[]).catch(ue=>{te.completion.extensionId?(0,T.onUnexpectedExternalError)(ue):(0,T.onUnexpectedError)(ue)}).finally(()=>{le=ae.elapsed()}))}J&4&&this._alternatives.value.set(ie,ae=>{for(se.cancel();ee.canUndo();){X!==ee.getAlternativeVersionId()&&ee.undo(),this._insertSuggestion(ae,3|(J&8?8:0));break}}),this._alertCompletionItem(te),Promise.all(Z).finally(()=>{this._reportSuggestionAcceptedTelemetry(te,ee,oe,le,ne),this.model.clear(),se.dispose()})}_reportSuggestionAcceptedTelemetry(ie,J,j,ee,X){Math.floor(Math.random()*100)!==0&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:ie.extensionId?.value??"unknown",providerId:ie.provider._debugDisplayName??"unknown",kind:ie.completion.kind,basenameHash:(0,x.hash)((0,P.basename)(J.uri)).toString(16),languageId:J.getLanguageId(),fileExtension:(0,P.extname)(J.uri),resolveInfo:ie.provider.resolveCompletionItem?j?1:0:-1,resolveDuration:ie.resolveDuration,commandDuration:ee,additionalEditsAsync:X})}getOverwriteInfo(ie,J){(0,a.assertType)(this.editor.hasModel());let j=this.editor.getOption(116).insertMode==="replace";J&&(j=!j);const ee=ie.position.column-ie.editStart.column,X=(j?ie.editReplaceEnd.column:ie.editInsertEnd.column)-ie.position.column,te=this.editor.getPosition().column-ie.position.column,Z=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:ee+te,overwriteAfter:X+Z}}_alertCompletionItem(ie){if((0,y.isNonEmptyArray)(ie.completion.additionalTextEdits)){const J=g.localize(0,null,ie.textLabel,ie.completion.additionalTextEdits.length);(0,t.alert)(J)}}triggerSuggest(ie,J,j){this.editor.hasModel()&&(this.model.trigger({auto:J??!1,completionOptions:{providerFilter:ie,kindFilter:j?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(ie){if(!this.editor.hasModel())return;const J=this.editor.getPosition(),j=()=>{J.equals(this.editor.getPosition())&&this._commandService.executeCommand(ie.fallback)},ee=X=>{if(X.completion.insertTextRules&4||X.completion.additionalTextEdits)return!0;const te=this.editor.getPosition(),Z=X.editStart.column,se=te.column;return se-Z!==X.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:te.lineNumber,startColumn:Z,endLineNumber:te.lineNumber,endColumn:se})!==X.completion.insertText};f.Event.once(this.model.onDidTrigger)(X=>{const te=[];f.Event.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{(0,m.dispose)(te),j()},void 0,te),this.model.onDidSuggest(({completionModel:Z})=>{if((0,m.dispose)(te),Z.items.length===0){j();return}const se=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),Z.items),re=Z.items[se];if(!ee(re)){j();return}this.editor.pushUndoStop(),this._insertSuggestion({index:se,item:re,model:Z},7)},void 0,te)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(J,0),this.editor.focus()}acceptSelectedSuggestion(ie,J){const j=this.widget.value.getFocusedItem();let ee=0;ie&&(ee|=4),J&&(ee|=8),this._insertSuggestion(j,ee)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(ie){return this._selectors.register(ie)}};e.SuggestController=B,e.SuggestController=B=F=fe([O(1,l.ISuggestMemoryService),O(2,w.ICommandService),O(3,E.IContextKeyService),O(4,C.IInstantiationService),O(5,I.ILogService),O(6,N.ITelemetryService)],B);class K{constructor(ie){this.prioritySelector=ie,this._items=new Array}register(ie){if(this._items.indexOf(ie)!==-1)throw new Error("Value is already registered");return this._items.push(ie),this._items.sort((J,j)=>this.prioritySelector(j)-this.prioritySelector(J)),{dispose:()=>{const J=this._items.indexOf(ie);J>=0&&this._items.splice(J,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class H extends i.EditorAction{static{this.id="editor.action.triggerSuggest"}constructor(){super({id:H.id,label:g.localize(1,null),alias:"Trigger Suggest",precondition:E.ContextKeyExpr.and(d.EditorContextKeys.writable,d.EditorContextKeys.hasCompletionItemProvider,_.Context.Visible.toNegated()),kbOpts:{kbExpr:d.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(ie,J,j){const ee=B.get(J);if(!ee)return;let X;j&&typeof j=="object"&&j.auto===!0&&(X=!0),ee.triggerSuggest(void 0,X,void 0)}}e.TriggerSuggestAction=H,(0,i.registerEditorContribution)(B.ID,B,2),(0,i.registerEditorAction)(H);const U=100+90,G=i.EditorCommand.bindToContribution(B.get);(0,i.registerEditorCommand)(new G({id:"acceptSelectedSuggestion",precondition:E.ContextKeyExpr.and(_.Context.Visible,_.Context.HasFocusedSuggestion),handler($){$.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:E.ContextKeyExpr.and(_.Context.Visible,d.EditorContextKeys.textInputFocus),weight:U},{primary:3,kbExpr:E.ContextKeyExpr.and(_.Context.Visible,d.EditorContextKeys.textInputFocus,_.Context.AcceptSuggestionsOnEnter,_.Context.MakesTextEdit),weight:U}],menuOpts:[{menuId:_.suggestWidgetStatusbarMenu,title:g.localize(2,null),group:"left",order:1,when:_.Context.HasInsertAndReplaceRange.toNegated()},{menuId:_.suggestWidgetStatusbarMenu,title:g.localize(3,null),group:"left",order:1,when:E.ContextKeyExpr.and(_.Context.HasInsertAndReplaceRange,_.Context.InsertMode.isEqualTo("insert"))},{menuId:_.suggestWidgetStatusbarMenu,title:g.localize(4,null),group:"left",order:1,when:E.ContextKeyExpr.and(_.Context.HasInsertAndReplaceRange,_.Context.InsertMode.isEqualTo("replace"))}]})),(0,i.registerEditorCommand)(new G({id:"acceptAlternativeSelectedSuggestion",precondition:E.ContextKeyExpr.and(_.Context.Visible,d.EditorContextKeys.textInputFocus,_.Context.HasFocusedSuggestion),kbOpts:{weight:U,kbExpr:d.EditorContextKeys.textInputFocus,primary:1027,secondary:[1026]},handler($){$.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:_.suggestWidgetStatusbarMenu,group:"left",order:2,when:E.ContextKeyExpr.and(_.Context.HasInsertAndReplaceRange,_.Context.InsertMode.isEqualTo("insert")),title:g.localize(5,null)},{menuId:_.suggestWidgetStatusbarMenu,group:"left",order:2,when:E.ContextKeyExpr.and(_.Context.HasInsertAndReplaceRange,_.Context.InsertMode.isEqualTo("replace")),title:g.localize(6,null)}]})),w.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,i.registerEditorCommand)(new G({id:"hideSuggestWidget",precondition:_.Context.Visible,handler:$=>$.cancelSuggestWidget(),kbOpts:{weight:U,kbExpr:d.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})),(0,i.registerEditorCommand)(new G({id:"selectNextSuggestion",precondition:E.ContextKeyExpr.and(_.Context.Visible,E.ContextKeyExpr.or(_.Context.MultipleSuggestions,_.Context.HasFocusedSuggestion.negate())),handler:$=>$.selectNextSuggestion(),kbOpts:{weight:U,kbExpr:d.EditorContextKeys.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,i.registerEditorCommand)(new G({id:"selectNextPageSuggestion",precondition:E.ContextKeyExpr.and(_.Context.Visible,E.ContextKeyExpr.or(_.Context.MultipleSuggestions,_.Context.HasFocusedSuggestion.negate())),handler:$=>$.selectNextPageSuggestion(),kbOpts:{weight:U,kbExpr:d.EditorContextKeys.textInputFocus,primary:12,secondary:[2060]}})),(0,i.registerEditorCommand)(new G({id:"selectLastSuggestion",precondition:E.ContextKeyExpr.and(_.Context.Visible,E.ContextKeyExpr.or(_.Context.MultipleSuggestions,_.Context.HasFocusedSuggestion.negate())),handler:$=>$.selectLastSuggestion()})),(0,i.registerEditorCommand)(new G({id:"selectPrevSuggestion",precondition:E.ContextKeyExpr.and(_.Context.Visible,E.ContextKeyExpr.or(_.Context.MultipleSuggestions,_.Context.HasFocusedSuggestion.negate())),handler:$=>$.selectPrevSuggestion(),kbOpts:{weight:U,kbExpr:d.EditorContextKeys.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,i.registerEditorCommand)(new G({id:"selectPrevPageSuggestion",precondition:E.ContextKeyExpr.and(_.Context.Visible,E.ContextKeyExpr.or(_.Context.MultipleSuggestions,_.Context.HasFocusedSuggestion.negate())),handler:$=>$.selectPrevPageSuggestion(),kbOpts:{weight:U,kbExpr:d.EditorContextKeys.textInputFocus,primary:11,secondary:[2059]}})),(0,i.registerEditorCommand)(new G({id:"selectFirstSuggestion",precondition:E.ContextKeyExpr.and(_.Context.Visible,E.ContextKeyExpr.or(_.Context.MultipleSuggestions,_.Context.HasFocusedSuggestion.negate())),handler:$=>$.selectFirstSuggestion()})),(0,i.registerEditorCommand)(new G({id:"focusSuggestion",precondition:E.ContextKeyExpr.and(_.Context.Visible,_.Context.HasFocusedSuggestion.negate()),handler:$=>$.focusSuggestion(),kbOpts:{weight:U,kbExpr:d.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),(0,i.registerEditorCommand)(new G({id:"focusAndAcceptSuggestion",precondition:E.ContextKeyExpr.and(_.Context.Visible,_.Context.HasFocusedSuggestion.negate()),handler:$=>{$.focusSuggestion(),$.acceptSelectedSuggestion(!0,!1)}})),(0,i.registerEditorCommand)(new G({id:"toggleSuggestionDetails",precondition:E.ContextKeyExpr.and(_.Context.Visible,_.Context.HasFocusedSuggestion),handler:$=>$.toggleSuggestionDetails(),kbOpts:{weight:U,kbExpr:d.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:_.suggestWidgetStatusbarMenu,group:"right",order:1,when:E.ContextKeyExpr.and(_.Context.DetailsVisible,_.Context.CanResolve),title:g.localize(7,null)},{menuId:_.suggestWidgetStatusbarMenu,group:"right",order:1,when:E.ContextKeyExpr.and(_.Context.DetailsVisible.toNegated(),_.Context.CanResolve),title:g.localize(8,null)}]})),(0,i.registerEditorCommand)(new G({id:"toggleExplainMode",precondition:_.Context.Visible,handler:$=>$.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),(0,i.registerEditorCommand)(new G({id:"toggleSuggestionFocus",precondition:_.Context.Visible,handler:$=>$.toggleSuggestionFocus(),kbOpts:{weight:U,kbExpr:d.EditorContextKeys.textInputFocus,primary:2570,mac:{primary:778}}})),(0,i.registerEditorCommand)(new G({id:"insertBestCompletion",precondition:E.ContextKeyExpr.and(d.EditorContextKeys.textInputFocus,E.ContextKeyExpr.equals("config.editor.tabCompletion","on"),n.WordContextKey.AtEnd,_.Context.Visible.toNegated(),A.SuggestAlternatives.OtherSuggestions.toNegated(),p.SnippetController2.InSnippetMode.toNegated()),handler:($,ie)=>{$.triggerSuggestAndAcceptBest((0,a.isObject)(ie)?{fallback:"tab",...ie}:{fallback:"tab"})},kbOpts:{weight:U,primary:2}})),(0,i.registerEditorCommand)(new G({id:"insertNextSuggestion",precondition:E.ContextKeyExpr.and(d.EditorContextKeys.textInputFocus,E.ContextKeyExpr.equals("config.editor.tabCompletion","on"),A.SuggestAlternatives.OtherSuggestions,_.Context.Visible.toNegated(),p.SnippetController2.InSnippetMode.toNegated()),handler:$=>$.acceptNextSuggestion(),kbOpts:{weight:U,kbExpr:d.EditorContextKeys.textInputFocus,primary:2}})),(0,i.registerEditorCommand)(new G({id:"insertPrevSuggestion",precondition:E.ContextKeyExpr.and(d.EditorContextKeys.textInputFocus,E.ContextKeyExpr.equals("config.editor.tabCompletion","on"),A.SuggestAlternatives.OtherSuggestions,_.Context.Visible.toNegated(),p.SnippetController2.InSnippetMode.toNegated()),handler:$=>$.acceptPrevSuggestion(),kbOpts:{weight:U,kbExpr:d.EditorContextKeys.textInputFocus,primary:1026}})),(0,i.registerEditorAction)(class extends i.EditorAction{constructor(){super({id:"editor.action.resetSuggestSize",label:g.localize(9,null),alias:"Reset Suggest Widget Size",precondition:void 0})}run($,ie){B.get(ie)?.resetWidgetSize()}})}),define(Q[3442],Y([1,0,6,4,51,27,99,304,1234,311,109,811,20]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestItemInfo=e.SuggestWidgetAdaptor=void 0;class r extends y.Disposable{get selectedItem(){return this._selectedItem}constructor(u,d,p,c){super(),this.editor=u,this.suggestControllerPreselector=d,this.checkModelVersion=p,this.onWillAccept=c,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=(0,S.observableValue)("suggestWidgetInlineCompletionProvider.selectedItem",void 0),this._register(u.onKeyDown(n=>{n.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(u.onKeyUp(n=>{n.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const l=m.SuggestController.get(this.editor);if(l){this._register(l.registerSelector({priority:100,select:(w,E,C)=>{(0,S.transaction)(R=>this.checkModelVersion(R));const I=this.editor.getModel();if(!I)return-1;const _=this.suggestControllerPreselector()?.removeCommonPrefix(I);if(!_)return-1;const A=b.Position.lift(E),k=C.map((R,M)=>{const P=i.fromSuggestion(l,I,A,R,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(I),x=_.augments(P);return{index:M,valid:x,prefixLength:P.text.length,suggestItem:R}}).filter(R=>R&&R.valid&&R.prefixLength>0),L=(0,a.findMaxBy)(k,(0,a.compareBy)(R=>R.prefixLength,a.numberComparator));return L?L.index:-1}}));let n=!1;const g=()=>{n||(n=!0,this._register(l.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(l.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(l.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(t.Event.once(l.model.onDidTrigger)(w=>{g()})),this._register(l.onWillInsertSuggestItem(w=>{const E=this.editor.getPosition(),C=this.editor.getModel();if(!E||!C)return;const I=i.fromSuggestion(l,C,E,w.item,this.isShiftKeyPressed);this.onWillAccept(I)}))}this.update(this._isActive)}update(u){const d=this.getSuggestItemInfo();(this._isActive!==u||!s(this._currentSuggestItemInfo,d))&&(this._isActive=u,this._currentSuggestItemInfo=d,(0,S.transaction)(p=>{this.checkModelVersion(p),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,p)}))}getSuggestItemInfo(){const u=m.SuggestController.get(this.editor);if(!u||!this.isSuggestWidgetVisible)return;const d=u.widget.value.getFocusedItem(),p=this.editor.getPosition(),c=this.editor.getModel();if(!(!d||!p||!c))return i.fromSuggestion(u,c,p,d.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){m.SuggestController.get(this.editor)?.stopForceRenderingAbove()}forceRenderingAbove(){m.SuggestController.get(this.editor)?.forceRenderingAbove()}}e.SuggestWidgetAdaptor=r;class i{static fromSuggestion(u,d,p,c,l){let{insertText:n}=c.completion,g=!1;if(c.completion.insertTextRules&4){const E=new f.SnippetParser().parse(n);E.children.length<100&&v.SnippetSession.adjustWhitespace(d,p,!0,E),n=E.toString(),g=!0}const w=u.getOverwriteInfo(c,l);return new i(D.Range.fromPositions(p.delta(0,-w.overwriteBefore),p.delta(0,Math.max(w.overwriteAfter,0))),n,c.completion.kind,g)}constructor(u,d,p,c){this.range=u,this.insertText=d,this.completionItemKind=p,this.isSnippetText=c}equals(u){return this.range.equalsRange(u.range)&&this.insertText===u.insertText&&this.completionItemKind===u.completionItemKind&&this.isSnippetText===u.isSnippetText}toSelectedSuggestionInfo(){return new T.SelectedSuggestionInfo(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new h.SingleTextEdit(this.range,this.insertText)}}e.SuggestItemInfo=i;function s(o,u){return o===u?!0:!o||!u?!1:o.equals(u)}}),define(Q[715],Y([1,0,7,67,157,325,88,8,38,23,19,66]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownWithPrimaryActionViewItem=void 0;let a=class extends b.BaseActionViewItem{get onDidChangeDropdownVisibility(){return this._dropdown.onDidChangeVisibility}constructor(i,s,o,u,d,p,c,l,n,g,w){super(null,i),this._contextMenuProvider=d,this._options=p,this._container=null,this._dropdownContainer=null,this._primaryAction=new T.MenuEntryActionViewItem(i,void 0,c,l,n,g,d,w),this._dropdown=new D.DropdownMenuActionViewItem(s,o,this._contextMenuProvider,{menuAsChild:!0,classNames:u?["codicon","codicon-chevron-down",u]:["codicon","codicon-chevron-down"],keybindingProvider:this._options?.getKeyBinding})}setActionContext(i){super.setActionContext(i),this._primaryAction.setActionContext(i),this._dropdown.setActionContext(i)}render(i){this._container=i,super.render(this._container),this._container.classList.add("monaco-dropdown-with-primary");const s=t.$(".action-container");this._primaryAction.render(t.append(this._container,s)),this._dropdownContainer=t.$(".dropdown-action-container"),this._dropdown.render(t.append(this._container,this._dropdownContainer)),this._register(t.addDisposableListener(s,t.EventType.KEY_DOWN,o=>{const u=new y.StandardKeyboardEvent(o);u.equals(17)&&(this._primaryAction.element.tabIndex=-1,this._dropdown.focus(),u.stopPropagation())})),this._register(t.addDisposableListener(this._dropdownContainer,t.EventType.KEY_DOWN,o=>{const u=new y.StandardKeyboardEvent(o);u.equals(15)&&(this._primaryAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._primaryAction.element?.focus(),u.stopPropagation())}))}focus(i){i?this._dropdown.focus():(this._primaryAction.element.tabIndex=0,this._primaryAction.element.focus())}blur(){this._primaryAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(i){i?this._primaryAction.element.tabIndex=0:(this._primaryAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}update(i,s,o){this._dropdown.dispose(),this._dropdown=new D.DropdownMenuActionViewItem(i,s,this._contextMenuProvider,{menuAsChild:!0,classNames:["codicon",o||"codicon-chevron-down"]}),this._dropdownContainer&&this._dropdown.render(this._dropdownContainer)}dispose(){this._primaryAction.dispose(),this._dropdown.dispose(),super.dispose()}};e.DropdownWithPrimaryActionViewItem=a,e.DropdownWithPrimaryActionViewItem=a=fe([O(6,v.IKeybindingService),O(7,m.INotificationService),O(8,f.IContextKeyService),O(9,S.IThemeService),O(10,h.IAccessibilityService)],a)}),define(Q[1245],Y([1,0,7,142,6,4,88,13,8,5,36]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FloatingClickMenu=e.AbstractFloatingClickMenu=e.FloatingClickWidget=void 0;class h extends y.Widget{constructor(s){super(),this.label=s,this._onClick=this._register(new b.Emitter),this.onClick=this._onClick.event,this._domNode=(0,t.$)(".floating-click-widget"),this._domNode.style.padding="6px 11px",this._domNode.style.borderRadius="2px",this._domNode.style.cursor="pointer",this._domNode.style.zIndex="1"}getDomNode(){return this._domNode}render(){(0,t.clearNode)(this._domNode),this._domNode.style.backgroundColor=(0,S.asCssVariableWithDefault)(S.buttonBackground,(0,S.asCssVariable)(S.editorBackground)),this._domNode.style.color=(0,S.asCssVariableWithDefault)(S.buttonForeground,(0,S.asCssVariable)(S.editorForeground)),this._domNode.style.border=`1px solid ${(0,S.asCssVariable)(S.contrastBorder)}`,(0,t.append)(this._domNode,(0,t.$)("")).textContent=this.label,this.onclick(this._domNode,()=>this._onClick.fire())}}e.FloatingClickWidget=h;let a=class extends D.Disposable{constructor(s,o,u){super(),this.renderEmitter=new b.Emitter,this.onDidRender=this.renderEmitter.event,this.menu=this._register(o.createMenu(s,u))}render(){const s=this._register(new D.DisposableStore),o=()=>{if(s.clear(),!this.isVisible())return;const u=[];if((0,T.createAndFillInActionBarActions)(this.menu,{renderShortTitle:!0,shouldForwardArgs:!0},u),u.length===0)return;const[d]=u,p=this.createWidget(d,s);s.add(p),s.add(p.onClick(()=>d.run(this.getActionArg()))),p.render()};this._register(this.menu.onDidChange(o)),o()}getActionArg(){}isVisible(){return!0}};e.AbstractFloatingClickMenu=a,e.AbstractFloatingClickMenu=a=fe([O(1,f.IMenuService),O(2,v.IContextKeyService)],a);let r=class extends a{constructor(s,o,u,d){super(s.menuId,u,d),this.options=s,this.instantiationService=o,this.render()}createWidget(s,o){const u=this.instantiationService.createInstance(h,s.label),d=u.getDomNode();return this.options.container.appendChild(d),o.add((0,D.toDisposable)(()=>this.options.container.removeChild(d))),u}getActionArg(){return this.options.getActionArg()}};e.FloatingClickMenu=r,e.FloatingClickMenu=r=fe([O(1,m.IInstantiationService),O(2,f.IMenuService),O(3,v.IContextKeyService)],r)}),define(Q[221],Y([1,0,7,129,344,34,20,15,6,4,2447,88,13,8,29,38,30]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuWorkbenchToolBar=e.WorkbenchToolBar=e.HiddenItemStrategy=void 0;var u;(function(c){c[c.NoHide=-1]="NoHide",c[c.Ignore=0]="Ignore",c[c.RenderInSecondaryGroup=1]="RenderInSecondaryGroup"})(u||(e.HiddenItemStrategy=u={}));let d=class extends b.ToolBar{constructor(l,n,g,w,E,C,I){super(l,E,{getKeyBinding:A=>C.lookupKeybinding(A.id)??void 0,...n,allowContextMenu:!0,skipTelemetry:typeof n?.telemetrySource=="string"}),this._options=n,this._menuService=g,this._contextKeyService=w,this._contextMenuService=E,this._sessionDisposables=this._store.add(new m.DisposableStore);const _=n?.telemetrySource;_&&this._store.add(this.actionBar.onDidRun(A=>I.publicLog2("workbenchActionExecuted",{id:A.action.id,from:_})))}setActions(l,n=[],g){this._sessionDisposables.clear();const w=l.slice(),E=n.slice(),C=[];let I=0;const _=[];let A=!1;if(this._options?.hiddenItemStrategy!==-1)for(let k=0;k<w.length;k++){const L=w[k];!(L instanceof a.MenuItemAction)&&!(L instanceof a.SubmenuItemAction)||L.hideActions&&(C.push(L.hideActions.toggle),L.hideActions.toggle.checked&&I++,L.hideActions.isHidden&&(A=!0,w[k]=void 0,this._options?.hiddenItemStrategy!==0&&(_[k]=L)))}if(this._options?.maxNumberOfItems!==void 0){let k=0;for(let L=0;L<w.length;L++){const R=w[L];R&&++k>=this._options.maxNumberOfItems&&(w[L]=void 0,_[L]=R)}}(0,T.coalesceInPlace)(w),(0,T.coalesceInPlace)(_),super.setActions(w,D.Separator.join(_,E)),C.length>0&&this._sessionDisposables.add((0,t.addDisposableListener)(this.getElement(),"contextmenu",k=>{const L=new y.StandardMouseEvent(k),R=this.getItemAction(L.target);if(!R)return;L.preventDefault(),L.stopPropagation();let M=!1;if(I===1&&this._options?.hiddenItemStrategy===0){M=!0;for(let x=0;x<C.length;x++)if(C[x].checked){C[x]=(0,D.toAction)({id:R.id,label:R.label,checked:!0,enabled:!1,run(){}});break}}let N;if(!M&&(R instanceof a.MenuItemAction||R instanceof a.SubmenuItemAction)){if(!R.hideActions)return;N=R.hideActions.hide}else N=(0,D.toAction)({id:"label",label:(0,S.localize)(0,null),enabled:!1,run(){}});const P=D.Separator.join([N],C);this._options?.resetMenu&&!g&&(g=[this._options.resetMenu]),A&&g&&(P.push(new D.Separator),P.push((0,D.toAction)({id:"resetThisMenu",label:(0,S.localize)(1,null),run:()=>this._menuService.resetHiddenStates(g)}))),this._contextMenuService.showContextMenu({getAnchor:()=>L,getActions:()=>P,menuId:this._options?.contextMenu,menuActionOptions:{renderShortTitle:!0,...this._options?.menuOptions},skipTelemetry:typeof this._options?.telemetrySource=="string",contextKeyService:this._contextKeyService})}))}};e.WorkbenchToolBar=d,e.WorkbenchToolBar=d=fe([O(2,a.IMenuService),O(3,r.IContextKeyService),O(4,i.IContextMenuService),O(5,s.IKeybindingService),O(6,o.ITelemetryService)],d);let p=class extends d{constructor(l,n,g,w,E,C,I,_){super(l,{resetMenu:n,...g},w,E,C,I,_),this._onDidChangeMenuItems=this._store.add(new v.Emitter),this.onDidChangeMenuItems=this._onDidChangeMenuItems.event;const A=this._store.add(w.createMenu(n,E,{emitEventsForSubmenuChanges:!0})),k=()=>{const L=[],R=[];(0,h.createAndFillInActionBarActions)(A,g?.menuOptions,{primary:L,secondary:R},g?.toolbarOptions?.primaryGroup,g?.toolbarOptions?.shouldInlineSubmenu,g?.toolbarOptions?.useSeparatorsInPrimaryActions),super.setActions(L,R)};this._store.add(A.onDidChange(()=>{k(),this._onDidChangeMenuItems.fire(this)})),k()}setActions(){throw new f.BugIndicatingError("This toolbar is populated from a menu.")}};e.MenuWorkbenchToolBar=p,e.MenuWorkbenchToolBar=p=fe([O(3,a.IMenuService),O(4,r.IContextKeyService),O(5,i.IContextMenuService),O(6,s.IKeybindingService),O(7,o.ITelemetryService)],p)}),define(Q[901],Y([1,0,7,157,400,34,20,14,32,4,109,18,37,51,99,809,2409,88,221,13,28,8,29,5,38,30,77,1735]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C){"use strict";var I;Object.defineProperty(e,"__esModule",{value:!0}),e.CustomizedMenuWorkbenchToolBar=e.InlineSuggestionHintsContentWidget=e.InlineCompletionsHintsWidget=void 0;let _=class extends m.Disposable{constructor(x,F,V){super(),this.editor=x,this.model=F,this.instantiationService=V,this.alwaysShowToolbar=(0,S.observableFromEvent)(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(61).showToolbar==="always"),this.sessionPosition=void 0,this.position=(0,S.derived)(W=>{const z=this.model.read(W)?.ghostText.read(W);if(!this.alwaysShowToolbar.read(W)||!z||z.parts.length===0)return this.sessionPosition=void 0,null;const B=z.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==z.lineNumber&&(this.sessionPosition=void 0);const K=new r.Position(z.lineNumber,Math.min(B,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=K,K}),this._register((0,S.autorunWithStore)((W,z)=>{const B=this.model.read(W);if(!B||!this.alwaysShowToolbar.read(W))return;const K=z.add(this.instantiationService.createInstance(L,this.editor,!0,this.position,B.selectedInlineCompletionIndex,B.inlineCompletionsCount,B.selectedInlineCompletion.map(H=>H?.inlineCompletion.source.inlineCompletions.commands??[])));x.addContentWidget(K),z.add((0,m.toDisposable)(()=>x.removeContentWidget(K))),z.add((0,S.autorun)(H=>{this.position.read(H)&&B.lastTriggerKind.read(H)!==i.InlineCompletionTriggerKind.Explicit&&B.triggerExplicitly()}))}))}};e.InlineCompletionsHintsWidget=_,e.InlineCompletionsHintsWidget=_=fe([O(2,g.IInstantiationService)],_);const A=(0,C.registerIcon)("inline-suggestion-hints-next",v.Codicon.chevronRight,(0,o.localize)(0,null)),k=(0,C.registerIcon)("inline-suggestion-hints-previous",v.Codicon.chevronLeft,(0,o.localize)(1,null));let L=class extends m.Disposable{static{I=this}static{this._dropDownVisible=!1}static get dropDownVisible(){return this._dropDownVisible}static{this.id=0}createCommandAction(x,F,V){const W=new D.Action(x,F,V,!0,()=>this._commandService.executeCommand(x)),z=this.keybindingService.lookupKeybinding(x,this._contextKeyService);let B=F;return z&&(B=(0,o.localize)(2,null,F,z.getLabel())),W.tooltip=B,W}constructor(x,F,V,W,z,B,K,H,U,G,$){super(),this.editor=x,this.withBorder=F,this._position=V,this._currentSuggestionIdx=W,this._suggestionCount=z,this._extraCommands=B,this._commandService=K,this.keybindingService=U,this._contextKeyService=G,this._menuService=$,this.id=`InlineSuggestionHintsContentWidget${I.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,t.h)("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[(0,t.h)("div@toolBar")]),this.previousAction=this.createCommandAction(s.showPreviousInlineSuggestionActionId,(0,o.localize)(3,null),a.ThemeIcon.asClassName(k)),this.availableSuggestionCountAction=new D.Action("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(s.showNextInlineSuggestionActionId,(0,o.localize)(4,null),a.ThemeIcon.asClassName(A)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(p.MenuId.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new f.RunOnceScheduler(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new f.RunOnceScheduler(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(H.createInstance(N,this.nodes.toolBar,p.MenuId.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:ie=>ie.startsWith("primary")},actionViewItemProvider:(ie,J)=>{if(ie instanceof p.MenuItemAction)return H.createInstance(M,ie,void 0);if(ie===this.availableSuggestionCountAction){const j=new R(void 0,ie,{label:!0,icon:!1});return j.setClass("availableSuggestionCount"),j}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(ie=>{I._dropDownVisible=ie})),this._register((0,S.autorun)(ie=>{this._position.read(ie),this.editor.layoutContentWidget(this)})),this._register((0,S.autorun)(ie=>{const J=this._suggestionCount.read(ie),j=this._currentSuggestionIdx.read(ie);J!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${j+1}/${J}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),J!==void 0&&J>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register((0,S.autorun)(ie=>{const J=this._extraCommands.read(ie);if((0,T.equals)(this.lastCommands,J))return;this.lastCommands=J;const j=J.map(ee=>({class:void 0,id:ee.id,enabled:!0,tooltip:ee.tooltip||"",label:ee.title,run:X=>this._commandService.executeCommand(ee.id)}));for(const[ee,X]of this.inlineCompletionsActionsMenus.getActions())for(const te of X)te instanceof p.MenuItemAction&&j.push(te);j.length>0&&j.unshift(new D.Separator),this.toolBar.setAdditionalSecondaryActions(j)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};e.InlineSuggestionHintsContentWidget=L,e.InlineSuggestionHintsContentWidget=L=I=fe([O(6,c.ICommandService),O(7,g.IInstantiationService),O(8,w.IKeybindingService),O(9,l.IContextKeyService),O(10,p.IMenuService)],L);class R extends y.ActionViewItem{constructor(){super(...arguments),this._className=void 0}setClass(x){this._className=x}render(x){super.render(x),this._className&&x.classList.add(this._className)}}class M extends u.MenuEntryActionViewItem{updateLabel(){const x=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!x)return super.updateLabel();if(this.label){const F=(0,t.h)("div.keybinding").root;new b.KeybindingLabel(F,h.OS,{disableTitle:!0,...b.unthemedKeybindingLabelOptions}).set(x),this.label.textContent=this._action.label,this.label.appendChild(F),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}}let N=class extends d.WorkbenchToolBar{constructor(x,F,V,W,z,B,K,H){super(x,{resetMenu:F,...V},W,z,B,K,H),this.menuId=F,this.options2=V,this.menuService=W,this.contextKeyService=z,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){const x=[],F=[];(0,u.createAndFillInActionBarActions)(this.menu,this.options2?.menuOptions,{primary:x,secondary:F},this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions),F.push(...this.additionalActions),x.unshift(...this.prependedPrimaryActions),this.setActions(x,F)}setPrependedPrimaryActions(x){(0,T.equals)(this.prependedPrimaryActions,x,(F,V)=>F===V)||(this.prependedPrimaryActions=x,this.updateToolbar())}setAdditionalSecondaryActions(x){(0,T.equals)(this.additionalActions,x,(F,V)=>F===V)||(this.additionalActions=x,this.updateToolbar())}};e.CustomizedMenuWorkbenchToolBar=N,e.CustomizedMenuWorkbenchToolBar=N=fe([O(3,p.IMenuService),O(4,l.IContextKeyService),O(5,n.IContextMenuService),O(6,w.IKeybindingService),O(7,E.ITelemetryService)],N)}),define(Q[601],Y([1,0,105,4,48,27,73,50,1240,1224,3254,5,41,36,19,395,883,3437,901,38,2399,1732]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.ModesHoverController=void 0;const n=!1;let g=class{static{l=this}static{this.ID="editor.contrib.hover"}getWidgetContent(){return this._contentWidget?.getWidgetContent()}static get(P){return P.getContribution(l.ID)}constructor(P,x,F,V,W){this._editor=P,this._instantiationService=x,this._openerService=F,this._languageService=V,this._keybindingService=W,this._toUnhook=new y.DisposableStore,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(z=>{z.hasChanged(59)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){const P=()=>this._hideWidgets(),x=this._editor.getOption(59);this._isHoverEnabled=x.enabled,this._isHoverSticky=x.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(F=>this._onEditorMouseDown(F))),this._toUnhook.add(this._editor.onMouseUp(F=>this._onEditorMouseUp(F))),this._toUnhook.add(this._editor.onMouseMove(F=>this._onEditorMouseMove(F))),this._toUnhook.add(this._editor.onKeyDown(F=>this._onKeyDown(F)))):(this._toUnhook.add(this._editor.onMouseMove(F=>this._onEditorMouseMove(F))),this._toUnhook.add(this._editor.onKeyDown(F=>this._onKeyDown(F)))),this._toUnhook.add(this._editor.onMouseLeave(F=>this._onEditorMouseLeave(F))),this._toUnhook.add(this._editor.onDidChangeModel(P)),this._toUnhook.add(this._editor.onDidScrollChange(F=>this._onEditorScrollChanged(F)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(P){(P.scrollTopChanged||P.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(P){this._isMouseDown=!0;const x=P.target;if(x.type===9&&x.detail===m.ContentHoverWidget.ID){this._hoverClicked=!0;return}x.type===12&&x.detail===S.MarginHoverWidget.ID||(x.type!==12&&(this._hoverClicked=!1),this._contentWidget?.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(P){this._isMouseDown=!1}_onEditorMouseLeave(P){const x=P.event.browserEvent.relatedTarget;this._contentWidget?.widget.isResizing||this._contentWidget?.containsNode(x)||n||this._hideWidgets()}_onEditorMouseMove(P){const x=P.target;if(this._contentWidget?.isFocused||this._contentWidget?.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&x.type===9&&x.detail===m.ContentHoverWidget.ID||this._isHoverSticky&&this._contentWidget?.containsNode(P.event.browserEvent.view?.document.activeElement)&&!P.event.browserEvent.view?.getSelection()?.isCollapsed||!this._isHoverSticky&&x.type===9&&x.detail===m.ContentHoverWidget.ID&&this._contentWidget?.isColorPickerVisible||this._isHoverSticky&&x.type===12&&x.detail===S.MarginHoverWidget.ID||this._isHoverSticky&&this._contentWidget?.isVisibleFromKeyboard)return;const F=x.element?.classList.contains("colorpicker-color-decoration"),V=this._editor.getOption(145);if(F&&(V==="click"&&!this._hoverActivatedByColorDecoratorClick||V==="hover"&&!this._isHoverEnabled&&!n||V==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!F&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(P)){this._glyphWidget?.hide();return}if(x.type===2&&x.position){this._contentWidget?.hide(),this._glyphWidget||(this._glyphWidget=new S.MarginHoverWidget(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(x.position.lineNumber);return}n||this._hideWidgets()}_onKeyDown(P){if(!this._editor.hasModel())return;const x=this._keybindingService.softDispatch(P,this._editor.getDomNode()),F=x.kind===1||x.kind===2&&x.commandId==="editor.action.showHover"&&this._contentWidget?.isVisible;P.keyCode!==5&&P.keyCode!==6&&P.keyCode!==57&&P.keyCode!==4&&!F&&this._hideWidgets()}_hideWidgets(){n||this._isMouseDown&&this._hoverClicked&&this._contentWidget?.isColorPickerVisible||d.InlineSuggestionHintsContentWidget.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,this._glyphWidget?.hide(),this._contentWidget?.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(m.ContentHoverController,this._editor)),this._contentWidget}showContentHover(P,x,F,V,W=!1){this._hoverActivatedByColorDecoratorClick=W,this._getOrCreateContentWidget().startShowingAtRange(P,x,F,V)}focus(){this._contentWidget?.focus()}scrollUp(){this._contentWidget?.scrollUp()}scrollDown(){this._contentWidget?.scrollDown()}scrollLeft(){this._contentWidget?.scrollLeft()}scrollRight(){this._contentWidget?.scrollRight()}pageUp(){this._contentWidget?.pageUp()}pageDown(){this._contentWidget?.pageDown()}goToTop(){this._contentWidget?.goToTop()}goToBottom(){this._contentWidget?.goToBottom()}get isColorPickerVisible(){return this._contentWidget?.isColorPickerVisible}get isHoverVisible(){return this._contentWidget?.isVisible}dispose(){this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),this._glyphWidget?.dispose(),this._contentWidget?.dispose()}};e.ModesHoverController=g,e.ModesHoverController=g=l=fe([O(1,h.IInstantiationService),O(2,a.IOpenerService),O(3,f.ILanguageService),O(4,p.IKeybindingService)],g);class w extends b.EditorAction{constructor(){super({id:"editor.action.showHover",label:c.localize(0,null),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:T.EditorContextKeys.editorTextFocus,primary:(0,t.KeyChord)(2089,2087),weight:100}})}run(P,x,F){if(!x.hasModel())return;const V=g.get(x);if(!V)return;const W=x.getPosition(),z=new D.Range(W.lineNumber,W.column,W.lineNumber,W.column),B=x.getOption(2)===2||!!F?.focus;V.isHoverVisible?V.focus():V.showContentHover(z,1,1,B)}}class E extends b.EditorAction{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:c.localize(1,null),alias:"Show Definition Preview Hover",precondition:void 0})}run(P,x){const F=g.get(x);if(!F)return;const V=x.getPosition();if(!V)return;const W=new D.Range(V.lineNumber,V.column,V.lineNumber,V.column),z=v.GotoDefinitionAtPositionEditorContribution.get(x);if(!z)return;z.startFindDefinitionFromCursor(V).then(()=>{F.showContentHover(W,1,1,!0)})}}class C extends b.EditorAction{constructor(){super({id:"editor.action.scrollUpHover",label:c.localize(2,null),alias:"Scroll Up Hover",precondition:T.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:T.EditorContextKeys.hoverFocused,primary:16,weight:100}})}run(P,x){const F=g.get(x);F&&F.scrollUp()}}class I extends b.EditorAction{constructor(){super({id:"editor.action.scrollDownHover",label:c.localize(3,null),alias:"Scroll Down Hover",precondition:T.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:T.EditorContextKeys.hoverFocused,primary:18,weight:100}})}run(P,x){const F=g.get(x);F&&F.scrollDown()}}class _ extends b.EditorAction{constructor(){super({id:"editor.action.scrollLeftHover",label:c.localize(4,null),alias:"Scroll Left Hover",precondition:T.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:T.EditorContextKeys.hoverFocused,primary:15,weight:100}})}run(P,x){const F=g.get(x);F&&F.scrollLeft()}}class A extends b.EditorAction{constructor(){super({id:"editor.action.scrollRightHover",label:c.localize(5,null),alias:"Scroll Right Hover",precondition:T.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:T.EditorContextKeys.hoverFocused,primary:17,weight:100}})}run(P,x){const F=g.get(x);F&&F.scrollRight()}}class k extends b.EditorAction{constructor(){super({id:"editor.action.pageUpHover",label:c.localize(6,null),alias:"Page Up Hover",precondition:T.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:T.EditorContextKeys.hoverFocused,primary:11,secondary:[528],weight:100}})}run(P,x){const F=g.get(x);F&&F.pageUp()}}class L extends b.EditorAction{constructor(){super({id:"editor.action.pageDownHover",label:c.localize(7,null),alias:"Page Down Hover",precondition:T.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:T.EditorContextKeys.hoverFocused,primary:12,secondary:[530],weight:100}})}run(P,x){const F=g.get(x);F&&F.pageDown()}}class R extends b.EditorAction{constructor(){super({id:"editor.action.goToTopHover",label:c.localize(8,null),alias:"Go To Bottom Hover",precondition:T.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:T.EditorContextKeys.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(P,x){const F=g.get(x);F&&F.goToTop()}}class M extends b.EditorAction{constructor(){super({id:"editor.action.goToBottomHover",label:c.localize(9,null),alias:"Go To Bottom Hover",precondition:T.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:T.EditorContextKeys.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(P,x){const F=g.get(x);F&&F.goToBottom()}}(0,b.registerEditorContribution)(g.ID,g,2),(0,b.registerEditorAction)(w),(0,b.registerEditorAction)(E),(0,b.registerEditorAction)(C),(0,b.registerEditorAction)(I),(0,b.registerEditorAction)(_),(0,b.registerEditorAction)(A),(0,b.registerEditorAction)(k),(0,b.registerEditorAction)(L),(0,b.registerEditorAction)(R),(0,b.registerEditorAction)(M),s.HoverParticipantRegistry.register(o.MarkdownHoverParticipant),s.HoverParticipantRegistry.register(u.MarkerHoverParticipant),(0,i.registerThemingParticipant)((N,P)=>{const x=N.getColor(r.editorHoverBorder);x&&(P.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${x.transparent(.5)}; }`),P.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${x.transparent(.5)}; }`),P.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${x.transparent(.5)}; }`))})}),define(Q[3443],Y([1,0,4,48,27,710,1220,601,395]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContribution=void 0;class m extends t.Disposable{static{this.ID="editor.contrib.colorContribution"}static{this.RECOMPUTE_TIME=1e3}constructor(h){super(),this._editor=h,this._register(h.onMouseDown(a=>this.onMouseDown(a)))}dispose(){super.dispose()}onMouseDown(h){const a=this._editor.getOption(145);if(a!=="click"&&a!=="clickAndHover")return;const r=h.target;if(r.type!==6||!r.detail.injectedText||r.detail.injectedText.options.attachedData!==D.ColorDecorationInjectedTextMarker||!r.range)return;const i=this._editor.getContribution(f.ModesHoverController.ID);if(i&&!i.isColorPickerVisible){const s=new b.Range(r.range.startLineNumber,r.range.startColumn+1,r.range.endLineNumber,r.range.endColumn+1);i.showContentHover(s,1,0,!1,!0)}}}e.ColorContribution=m,(0,y.registerEditorContribution)(m.ID,m,2),v.HoverParticipantRegistry.register(T.ColorHoverParticipant)}),define(Q[460],Y([1,0,87,6,4,109,511,51,328,74,809,3165,689,901,3427,3442,2408,220,28,9,8,5,38]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsController=void 0;let w=class extends b.Disposable{static{g=this}static{this.ID="editor.contrib.inlineCompletionsController"}static get(C){return C.getContribution(g.ID)}constructor(C,I,_,A,k,L,R,M,N){super(),this.editor=C,this.instantiationService=I,this.contextKeyService=_,this.configurationService=A,this.commandService=k,this.debounceService=L,this.languageFeaturesService=R,this.audioCueService=M,this._keybindingService=N,this.model=(0,D.disposableObservableValue)("inlineCompletionModel",void 0),this.textModelVersionId=(0,D.observableValue)("textModelVersionId",-1),this.cursorPosition=(0,D.observableValue)("cursorPosition",new f.Position(1,1)),this.suggestWidgetAdaptor=this._register(new s.SuggestWidgetAdaptor(this.editor,()=>this.model.get()?.selectedInlineCompletion.get()?.toSingleTextEdit(void 0),F=>this.updateObservables(F,i.VersionIdChangeReason.Other),F=>{(0,D.transaction)(V=>{this.updateObservables(V,i.VersionIdChangeReason.Other),this.model.get()?.handleSuggestAccepted(F)})})),this._enabled=(0,D.observableFromEvent)(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(61).enabled),this.ghostTextWidget=this._register(this.instantiationService.createInstance(h.GhostTextWidget,this.editor,{ghostText:this.model.map((F,V)=>F?.ghostText.read(V)),minReservedLineCount:(0,D.constObservable)(0),targetTextModel:this.model.map(F=>F?.textModel)})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new a.InlineCompletionContextKeys(this.contextKeyService,this.model)),this._register(y.Event.runAndSubscribe(C.onDidChangeModel,()=>(0,D.transaction)(F=>{this.model.set(void 0,F),this.updateObservables(F,i.VersionIdChangeReason.Other);const V=C.getModel();if(V){const W=I.createInstance(i.InlineCompletionsModel,V,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,(0,D.observableFromEvent)(C.onDidChangeConfiguration,()=>C.getOption(116).preview),(0,D.observableFromEvent)(C.onDidChangeConfiguration,()=>C.getOption(116).previewMode),(0,D.observableFromEvent)(C.onDidChangeConfiguration,()=>C.getOption(61).mode),this._enabled);this.model.set(W,F)}})));const P=F=>F.isUndoing?i.VersionIdChangeReason.Undo:F.isRedoing?i.VersionIdChangeReason.Redo:this.model.get()?.isAcceptingPartially?i.VersionIdChangeReason.AcceptWord:i.VersionIdChangeReason.Other;this._register(C.onDidChangeModelContent(F=>(0,D.transaction)(V=>this.updateObservables(V,P(F))))),this._register(C.onDidChangeCursorPosition(F=>(0,D.transaction)(V=>{this.updateObservables(V,i.VersionIdChangeReason.Other),(F.reason===3||F.source==="api")&&this.model.get()?.stop(V)}))),this._register(C.onDidType(()=>(0,D.transaction)(F=>{this.updateObservables(F,i.VersionIdChangeReason.Other),this._enabled.get()&&this.model.get()?.trigger(F)}))),this._register(this.commandService.onDidExecuteCommand(F=>{new Set([T.CoreEditingCommands.Tab.id,T.CoreEditingCommands.DeleteLeft.id,T.CoreEditingCommands.DeleteRight.id,S.inlineSuggestCommitId,"acceptSelectedSuggestion"]).has(F.commandId)&&C.hasTextFocus()&&this._enabled.get()&&(0,D.transaction)(W=>{this.model.get()?.trigger(W)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.contextKeyService.getContextKeyValue("accessibleViewIsShown")||this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||C.getOption(61).keepOnBlur||r.InlineSuggestionHintsContentWidget.dropDownVisible||(0,D.transaction)(F=>{this.model.get()?.stop(F)})})),this._register((0,D.autorun)(F=>{const V=this.model.read(F)?.state.read(F);V?.suggestItem?V.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register((0,b.toDisposable)(()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}));let x;this._register((0,D.autorun)(F=>{const V=this.model.read(F),W=V?.state.read(F);if(!V||!W||!W.inlineCompletion){x=void 0;return}if(W.inlineCompletion.semanticId!==x){x=W.inlineCompletion.semanticId;const z=V.textModel.getLineContent(W.ghostText.lineNumber);this.audioCueService.playAudioCue(u.AudioCue.inlineSuggestion).then(()=>{this.editor.getOption(7)&&this.provideScreenReaderUpdate(W.ghostText.renderForScreenReader(z))})}})),this._register(new r.InlineCompletionsHintsWidget(this.editor,this.model,this.instantiationService)),this._register(this.configurationService.onDidChangeConfiguration(F=>{F.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})}provideScreenReaderUpdate(C){const I=this.contextKeyService.getContextKeyValue("accessibleViewIsShown"),_=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let A;!I&&_&&this.editor.getOption(146)&&(A=(0,o.localize)(0,null,_.getAriaLabel())),A?(0,t.alert)(C+", "+A):(0,t.alert)(C)}updateObservables(C,I){const _=this.editor.getModel();this.textModelVersionId.set(_?.getVersionId()??-1,C,I),this.cursorPosition.set(this.editor.getPosition()??new f.Position(1,1),C)}shouldShowHoverAt(C){const I=this.model.get()?.ghostText.get();return I?I.parts.some(_=>C.containsPosition(new f.Position(I.lineNumber,_.column))):!1}shouldShowHoverAtViewZone(C){return this.ghostTextWidget.ownsViewZone(C)}hide(){(0,D.transaction)(C=>{this.model.get()?.stop(C)})}};e.InlineCompletionsController=w,e.InlineCompletionsController=w=g=fe([O(1,l.IInstantiationService),O(2,c.IContextKeyService),O(3,p.IConfigurationService),O(4,d.ICommandService),O(5,v.ILanguageFeatureDebounceService),O(6,m.ILanguageFeaturesService),O(7,u.IAudioCueService),O(8,n.IKeybindingService)],w)}),define(Q[3444],Y([1,0,109,48,73,809,689,460,329,2405,13,9,8]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleAlwaysShowInlineSuggestionToolbar=e.HideInlineCompletion=e.AcceptInlineCompletion=e.AcceptNextLineOfInlineCompletion=e.AcceptNextWordOfInlineCompletion=e.TriggerInlineSuggestionAction=e.ShowPreviousInlineSuggestionAction=e.ShowNextInlineSuggestionAction=void 0;class r extends y.EditorAction{static{this.ID=D.showNextInlineSuggestionActionId}constructor(){super({id:r.ID,label:m.localize(0,null),alias:"Show Next Inline Suggestion",precondition:a.ContextKeyExpr.and(b.EditorContextKeys.writable,T.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(n,g){f.InlineCompletionsController.get(g)?.model.get()?.next()}}e.ShowNextInlineSuggestionAction=r;class i extends y.EditorAction{static{this.ID=D.showPreviousInlineSuggestionActionId}constructor(){super({id:i.ID,label:m.localize(1,null),alias:"Show Previous Inline Suggestion",precondition:a.ContextKeyExpr.and(b.EditorContextKeys.writable,T.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(n,g){f.InlineCompletionsController.get(g)?.model.get()?.previous()}}e.ShowPreviousInlineSuggestionAction=i;class s extends y.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:m.localize(2,null),alias:"Trigger Inline Suggestion",precondition:b.EditorContextKeys.writable})}async run(n,g){f.InlineCompletionsController.get(g)?.model.get()?.triggerExplicitly()}}e.TriggerInlineSuggestionAction=s;class o extends y.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:m.localize(3,null),alias:"Accept Next Word Of Inline Suggestion",precondition:a.ContextKeyExpr.and(b.EditorContextKeys.writable,T.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100+1,primary:2065,kbExpr:a.ContextKeyExpr.and(b.EditorContextKeys.writable,T.InlineCompletionContextKeys.inlineSuggestionVisible)},menuOpts:[{menuId:S.MenuId.InlineSuggestionToolbar,title:m.localize(4,null),group:"primary",order:2}]})}async run(n,g){const w=f.InlineCompletionsController.get(g);await w?.model.get()?.acceptNextWord(w.editor)}}e.AcceptNextWordOfInlineCompletion=o;class u extends y.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:m.localize(5,null),alias:"Accept Next Line Of Inline Suggestion",precondition:a.ContextKeyExpr.and(b.EditorContextKeys.writable,T.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100+1},menuOpts:[{menuId:S.MenuId.InlineSuggestionToolbar,title:m.localize(6,null),group:"secondary",order:2}]})}async run(n,g){const w=f.InlineCompletionsController.get(g);await w?.model.get()?.acceptNextLine(w.editor)}}e.AcceptNextLineOfInlineCompletion=u;class d extends y.EditorAction{constructor(){super({id:D.inlineSuggestCommitId,label:m.localize(7,null),alias:"Accept Inline Suggestion",precondition:T.InlineCompletionContextKeys.inlineSuggestionVisible,menuOpts:[{menuId:S.MenuId.InlineSuggestionToolbar,title:m.localize(8,null),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:a.ContextKeyExpr.and(T.InlineCompletionContextKeys.inlineSuggestionVisible,b.EditorContextKeys.tabMovesFocus.toNegated(),T.InlineCompletionContextKeys.inlineSuggestionHasIndentationLessThanTabSize,v.Context.Visible.toNegated(),b.EditorContextKeys.hoverFocused.toNegated())}})}async run(n,g){const w=f.InlineCompletionsController.get(g);w&&(w.model.get()?.accept(w.editor),w.editor.focus())}}e.AcceptInlineCompletion=d;class p extends y.EditorAction{static{this.ID="editor.action.inlineSuggest.hide"}constructor(){super({id:p.ID,label:m.localize(9,null),alias:"Hide Inline Suggestion",precondition:T.InlineCompletionContextKeys.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(n,g){const w=f.InlineCompletionsController.get(g);(0,t.transaction)(E=>{w?.model.get()?.stop(E)})}}e.HideInlineCompletion=p;class c extends S.Action2{static{this.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"}constructor(){super({id:c.ID,title:m.localize(10,null),f1:!1,precondition:void 0,menu:[{id:S.MenuId.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:a.ContextKeyExpr.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(n,g){const w=n.get(h.IConfigurationService),C=w.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";w.updateValue("editor.inlineSuggest.showToolbar",C)}}e.ToggleAlwaysShowInlineSuggestionToolbar=c}),define(Q[3445],Y([1,0,7,110,4,109,27,50,395,460,901,209,2406,66,5,41,30]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsHoverParticipant=e.InlineCompletionsHover=void 0;class u{constructor(c,l,n){this.owner=c,this.range=l,this.controller=n}isValidForHoverAnchor(c){return c.type===1&&this.range.startColumn<=c.range.startColumn&&this.range.endColumn>=c.range.endColumn}}e.InlineCompletionsHover=u;let d=class{constructor(c,l,n,g,w,E){this._editor=c,this._languageService=l,this._openerService=n,this.accessibilityService=g,this._instantiationService=w,this._telemetryService=E,this.hoverOrdinal=4}suggestHoverAnchor(c){const l=m.InlineCompletionsController.get(this._editor);if(!l)return null;const n=c.target;if(n.type===8){const g=n.detail;if(l.shouldShowHoverAtViewZone(g.viewZoneId))return new v.HoverForeignElementAnchor(1e3,this,T.Range.fromPositions(this._editor.getModel().validatePosition(g.positionBefore||g.position)),c.event.posx,c.event.posy,!1)}return n.type===7&&l.shouldShowHoverAt(n.range)?new v.HoverForeignElementAnchor(1e3,this,n.range,c.event.posx,c.event.posy,!1):n.type===6&&n.detail.mightBeForeignElement&&l.shouldShowHoverAt(n.range)?new v.HoverForeignElementAnchor(1e3,this,n.range,c.event.posx,c.event.posy,!1):null}computeSync(c,l){if(this._editor.getOption(61).showToolbar==="always")return[];const n=m.InlineCompletionsController.get(this._editor);return n&&n.shouldShowHoverAt(c.range)?[new u(this,c.range,n)]:[]}renderHoverParts(c,l){const n=new b.DisposableStore,g=l[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(7)&&this.renderScreenReaderText(c,g,n);const w=g.controller.model.get(),E=this._instantiationService.createInstance(S.InlineSuggestionHintsContentWidget,this._editor,!1,(0,D.constObservable)(null),w.selectedInlineCompletionIndex,w.inlineCompletionsCount,w.selectedInlineCompletion.map(C=>C?.inlineCompletion.source.inlineCompletions.commands??[]));return c.fragment.appendChild(E.getDomNode()),w.triggerExplicitly(),n.add(E),n}renderScreenReaderText(c,l,n){const g=t.$,w=g("div.hover-row.markdown-hover"),E=t.append(w,g("div.hover-contents",{["aria-live"]:"assertive"})),C=n.add(new h.MarkdownRenderer({editor:this._editor},this._languageService,this._openerService)),I=_=>{n.add(C.onDidRenderAsync(()=>{E.className="hover-contents code-hover-contents",c.onContentsChanged()}));const A=a.localize(0,null),k=n.add(C.render(new y.MarkdownString().appendText(A).appendCodeblock("text",_)));E.replaceChildren(k.element)};n.add((0,D.autorun)(_=>{const A=l.controller.model.read(_)?.ghostText.read(_);if(A){const k=this._editor.getModel().getLineContent(A.lineNumber);I(A.renderForScreenReader(k))}else t.reset(E)})),c.fragment.appendChild(w)}};e.InlineCompletionsHoverParticipant=d,e.InlineCompletionsHoverParticipant=d=fe([O(1,f.ILanguageService),O(2,s.IOpenerService),O(3,r.IAccessibilityService),O(4,i.IInstantiationService),O(5,o.ITelemetryService)],d)}),define(Q[3446],Y([1,0,48,395,3444,3445,460,13]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerEditorContribution)(T.InlineCompletionsController.ID,T.InlineCompletionsController,3),(0,t.registerEditorAction)(b.TriggerInlineSuggestionAction),(0,t.registerEditorAction)(b.ShowNextInlineSuggestionAction),(0,t.registerEditorAction)(b.ShowPreviousInlineSuggestionAction),(0,t.registerEditorAction)(b.AcceptNextWordOfInlineCompletion),(0,t.registerEditorAction)(b.AcceptNextLineOfInlineCompletion),(0,t.registerEditorAction)(b.AcceptInlineCompletion),(0,t.registerEditorAction)(b.HideInlineCompletion),(0,f.registerAction2)(b.ToggleAlwaysShowInlineSuggestionToolbar),y.HoverParticipantRegistry.register(D.InlineCompletionsHoverParticipant)}),define(Q[3447],Y([1,0,14,6,4,13,28,8,34,24,20,2449]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";var a,r;Object.defineProperty(e,"__esModule",{value:!0}),e.MenuService=void 0;let i=class{constructor(c,l){this._commandService=c,this._hiddenStates=new s(l)}createMenu(c,l,n){return new u(c,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...n},this._commandService,l)}resetHiddenStates(c){this._hiddenStates.reset(c)}};e.MenuService=i,e.MenuService=i=fe([O(0,T.ICommandService),O(1,m.IStorageService)],i);let s=class{static{a=this}static{this._key="menu.hiddenCommands"}constructor(c){this._storageService=c,this._disposables=new b.DisposableStore,this._onDidChange=new y.Emitter,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const l=c.get(a._key,0,"{}");this._data=JSON.parse(l)}catch{this._data=Object.create(null)}this._disposables.add(c.onDidChangeValue(0,a._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const l=c.get(a._key,0,"{}");this._data=JSON.parse(l)}catch(l){console.log("FAILED to read storage after UPDATE",l)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(c,l){return this._hiddenByDefaultCache.get(`${c.id}/${l}`)??!1}setDefaultState(c,l,n){this._hiddenByDefaultCache.set(`${c.id}/${l}`,n)}isHidden(c,l){const n=this._isHiddenByDefault(c,l),g=this._data[c.id]?.includes(l)??!1;return n?!g:g}updateHidden(c,l,n){this._isHiddenByDefault(c,l)&&(n=!n);const w=this._data[c.id];if(n)w?w.indexOf(l)<0&&w.push(l):this._data[c.id]=[l];else if(w){const E=w.indexOf(l);E>=0&&(0,S.removeFastWithoutKeepingOrder)(w,E),w.length===0&&delete this._data[c.id]}this._persist()}reset(c){if(c===void 0)this._data=Object.create(null),this._persist();else{for(const{id:l}of c)this._data[l]&&delete this._data[l];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const c=JSON.stringify(this._data);this._storageService.store(a._key,c,0,0)}finally{this._ignoreChangeEvent=!1}}};s=a=fe([O(0,m.IStorageService)],s);let o=r=class{constructor(c,l,n,g,w){this._id=c,this._hiddenStates=l,this._collectContextKeysForSubmenus=n,this._commandService=g,this._contextKeyService=w,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const c=D.MenuRegistry.getMenuItems(this._id);let l;c.sort(r._compareMenuItems);for(const n of c){const g=n.group||"";(!l||l[0]!==g)&&(l=[g,[]],this._menuGroups.push(l)),l[1].push(n),this._collectContextKeys(n)}}_collectContextKeys(c){if(r._fillInKbExprKeys(c.when,this._structureContextKeys),(0,D.isIMenuItem)(c)){if(c.command.precondition&&r._fillInKbExprKeys(c.command.precondition,this._preconditionContextKeys),c.command.toggled){const l=c.command.toggled.condition||c.command.toggled;r._fillInKbExprKeys(l,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&D.MenuRegistry.getMenuItems(c.submenu).forEach(this._collectContextKeys,this)}createActionGroups(c){const l=[];for(const n of this._menuGroups){const[g,w]=n,E=[];for(const C of w)if(this._contextKeyService.contextMatchesRules(C.when)){let I;const _=(0,D.isIMenuItem)(C);_&&this._hiddenStates.setDefaultState(this._id,C.command.id,!!C.isHiddenByDefault);const A=d(this._id,_?C.command:C,this._hiddenStates);if(_)I=new D.MenuItemAction(C.command,C.alt,c,A,this._contextKeyService,this._commandService);else{const k=new r(C.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(c),L=v.Separator.join(...k.map(R=>R[1]));L.length>0&&(I=new D.SubmenuItemAction(C,A,L))}I&&((0,D.isIMenuItem)(C)&&(I.isDefault=C.isDefault),E.push(I))}E.length>0&&l.push([g,E])}return l}static _fillInKbExprKeys(c,l){if(c)for(const n of c.keys())l.add(n)}static _compareMenuItems(c,l){const n=c.group,g=l.group;if(n!==g){if(n){if(!g)return-1}else return 1;if(n==="navigation")return-1;if(g==="navigation")return 1;const C=n.localeCompare(g);if(C!==0)return C}const w=c.order||0,E=l.order||0;return w<E?-1:w>E?1:r._compareTitles((0,D.isIMenuItem)(c)?c.command.title:c.title,(0,D.isIMenuItem)(l)?l.command.title:l.title)}static _compareTitles(c,l){const n=typeof c=="string"?c:c.original,g=typeof l=="string"?l:l.original;return n.localeCompare(g)}};o=r=fe([O(3,T.ICommandService),O(4,f.IContextKeyService)],o);let u=class{constructor(c,l,n,g,w){this._disposables=new b.DisposableStore,this._menuInfo=new o(c,l,n.emitEventsForSubmenuChanges,g,w);const E=new t.RunOnceScheduler(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},n.eventDebounceDelay);this._disposables.add(E),this._disposables.add(D.MenuRegistry.onDidChangeMenu(A=>{A.has(c)&&E.schedule()}));const C=this._disposables.add(new b.DisposableStore),I=A=>{let k=!1,L=!1,R=!1;for(const M of A)if(k=k||M.isStructuralChange,L=L||M.isEnablementChange,R=R||M.isToggleChange,k&&L&&R)break;return{menu:this,isStructuralChange:k,isEnablementChange:L,isToggleChange:R}},_=()=>{C.add(w.onDidChangeContext(A=>{const k=A.affectsSome(this._menuInfo.structureContextKeys),L=A.affectsSome(this._menuInfo.preconditionContextKeys),R=A.affectsSome(this._menuInfo.toggledContextKeys);(k||L||R)&&this._onDidChange.fire({menu:this,isStructuralChange:k,isEnablementChange:L,isToggleChange:R})})),C.add(l.onDidChange(A=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new y.DebounceEmitter({onWillAddFirstListener:_,onDidRemoveLastListener:C.clear.bind(C),delay:n.eventDebounceDelay,merge:I}),this.onDidChange=this._onDidChange.event}getActions(c){return this._menuInfo.createActionGroups(c)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};u=fe([O(3,T.ICommandService),O(4,f.IContextKeyService)],u);function d(p,c,l){const n=(0,D.isISubmenuItem)(c)?c.submenu.id:c.id,g=typeof c.title=="string"?c.title:c.title.value,w=(0,v.toAction)({id:`hide/${p.id}/${n}`,label:(0,h.localize)(0,null,g),run(){l.updateHidden(p,n,!0)}}),E=(0,v.toAction)({id:`toggle/${p.id}/${n}`,label:g,get checked(){return!l.isHidden(p,n)},run(){l.updateHidden(p,n,!!this.checked)}});return{hide:w,toggle:E,get isHidden(){return!E.checked}}}}),define(Q[3448],Y([1,0,13,3261,3447,35]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,D.registerSingleton)(t.IMenuService,b.MenuService,1),(0,t.registerAction2)(y.MenuHiddenStatesReset)}),define(Q[3449],Y([1,0,7,34,6,4,88,13,8,38,23,30,3334,29]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuMenuDelegate=e.ContextMenuService=void 0;let i=class extends D.Disposable{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new a.ContextMenuHandler(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(u,d,p,c,l,n){super(),this.telemetryService=u,this.notificationService=d,this.contextViewService=p,this.keybindingService=c,this.menuService=l,this.contextKeyService=n,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new b.Emitter),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new b.Emitter),this.onDidHideContextMenu=this._onDidHideContextMenu.event}configure(u){this.contextMenuHandler.configure(u)}showContextMenu(u){u=s.transform(u,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...u,onHide:d=>{u.onHide?.(d),this._onDidHideContextMenu.fire()}}),t.ModifierKeyEmitter.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};e.ContextMenuService=i,e.ContextMenuService=i=fe([O(0,h.ITelemetryService),O(1,S.INotificationService),O(2,r.IContextViewService),O(3,m.IKeybindingService),O(4,f.IMenuService),O(5,v.IContextKeyService)],i);var s;(function(o){function u(p){return p&&p.menuId instanceof f.MenuId}function d(p,c,l){if(!u(p))return p;const{menuId:n,menuActionOptions:g,contextKeyService:w}=p;return{...p,getActions:()=>{const E=[];if(n){const C=c.createMenu(n,w??l);(0,T.createAndFillInContextMenuActions)(C,g,E),C.dispose()}return p.getActions?y.Separator.join(p.getActions(),E):E}}}o.transform=d})(s||(e.ContextMenuMenuDelegate=s={}))}),define(Q[716],Y([1,0,6,4,17,95,115,24]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageManager=e.GlobalExtensionEnablementService=void 0;let v=class extends y.Disposable{constructor(h,a){super(),this._onDidChangeEnablement=new t.Emitter,this.onDidChangeEnablement=this._onDidChangeEnablement.event,this.storageManger=this._register(new m(h)),this._register(this.storageManger.onDidChange(r=>this._onDidChangeEnablement.fire({extensions:r,source:"storage"}))),this._register(a.onDidInstallExtensions(r=>r.forEach(({local:i,operation:s})=>{i&&s===4&&this._removeFromDisabledExtensions(i.identifier)})))}async enableExtension(h,a){return this._removeFromDisabledExtensions(h)?(this._onDidChangeEnablement.fire({extensions:[h],source:a}),!0):!1}async disableExtension(h,a){return this._addToDisabledExtensions(h)?(this._onDidChangeEnablement.fire({extensions:[h],source:a}),!0):!1}getDisabledExtensions(){return this._getExtensions(D.DISABLED_EXTENSIONS_STORAGE_PATH)}async getDisabledExtensionsAsync(){return this.getDisabledExtensions()}_addToDisabledExtensions(h){const a=this.getDisabledExtensions();return a.every(r=>!(0,T.areSameExtensions)(r,h))?(a.push(h),this._setDisabledExtensions(a),!0):!1}_removeFromDisabledExtensions(h){const a=this.getDisabledExtensions();for(let r=0;r<a.length;r++){const i=a[r];if((0,T.areSameExtensions)(i,h))return a.splice(r,1),this._setDisabledExtensions(a),!0}return!1}_setDisabledExtensions(h){this._setExtensions(D.DISABLED_EXTENSIONS_STORAGE_PATH,h)}_getExtensions(h){return this.storageManger.get(h,0)}_setExtensions(h,a){this.storageManger.set(h,a,0)}};e.GlobalExtensionEnablementService=v,e.GlobalExtensionEnablementService=v=fe([O(0,f.IStorageService),O(1,D.IExtensionManagementService)],v);class m extends y.Disposable{constructor(h){super(),this.storageService=h,this.storage=Object.create(null),this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._register(h.onDidChangeValue(0,void 0,this._register(new y.DisposableStore))(a=>this.onDidStorageChange(a)))}get(h,a){let r;return a===0?((0,b.isUndefinedOrNull)(this.storage[h])&&(this.storage[h]=this._get(h,a)),r=this.storage[h]):r=this._get(h,a),JSON.parse(r)}set(h,a,r){const i=JSON.stringify(a.map(({id:o,uuid:u})=>({id:o,uuid:u})));this._get(h,r)!==i&&(r===0&&(a.length?this.storage[h]=i:delete this.storage[h]),this._set(h,a.length?i:void 0,r))}onDidStorageChange(h){if(!(0,b.isUndefinedOrNull)(this.storage[h.key])&&this._get(h.key,h.scope)!==this.storage[h.key]){const r=this.get(h.key,h.scope);delete this.storage[h.key];const i=this.get(h.key,h.scope),s=r.filter(u=>!i.some(d=>(0,T.areSameExtensions)(u,d))),o=i.filter(u=>!r.some(d=>(0,T.areSameExtensions)(d,u)));(s.length||o.length)&&this._onDidChange.fire([...s,...o])}}_get(h,a){return this.storageService.get(h,a,"[]")}_set(h,a,r){a?this.storageService.store(h,a,r,1):this.storageService.remove(h,r)}}e.StorageManager=m}),define(Q[3450],Y([1,0,20,31,15,18,261,17,10,9,91,95,115,112,846,25,11,52,288,3301,24,30]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionGalleryServiceWithNoStorageService=e.ExtensionGalleryService=e.sortExtensionVersions=void 0;const n=D.isWeb?"web":(0,h.getTargetPlatform)(D.platform,T.arch),g="X-Market-Search-Activity-Id";var w;(function(te){te[te.None=0]="None",te[te.IncludeVersions=1]="IncludeVersions",te[te.IncludeFiles=2]="IncludeFiles",te[te.IncludeCategoryAndTags=4]="IncludeCategoryAndTags",te[te.IncludeSharedAccounts=8]="IncludeSharedAccounts",te[te.IncludeVersionProperties=16]="IncludeVersionProperties",te[te.ExcludeNonValidated=32]="ExcludeNonValidated",te[te.IncludeInstallationTargets=64]="IncludeInstallationTargets",te[te.IncludeAssetUri=128]="IncludeAssetUri",te[te.IncludeStatistics=256]="IncludeStatistics",te[te.IncludeLatestVersionOnly=512]="IncludeLatestVersionOnly",te[te.Unpublished=4096]="Unpublished",te[te.IncludeNameConflictInfo=32768]="IncludeNameConflictInfo"})(w||(w={}));function E(...te){return String(te.reduce((Z,se)=>Z|se,0))}var C;(function(te){te[te.Tag=1]="Tag",te[te.ExtensionId=4]="ExtensionId",te[te.Category=5]="Category",te[te.ExtensionName=7]="ExtensionName",te[te.Target=8]="Target",te[te.Featured=9]="Featured",te[te.SearchText=10]="SearchText",te[te.ExcludeWithFlags=12]="ExcludeWithFlags"})(C||(C={}));const I={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",Signature:"Microsoft.VisualStudio.Services.VsixSignature",DownloadPage:"Microsoft.SQLOps.DownloadPage"},_={Dependency:"Microsoft.VisualStudio.Code.ExtensionDependencies",ExtensionPack:"Microsoft.VisualStudio.Code.ExtensionPack",Engine:"Microsoft.VisualStudio.Code.Engine",PreRelease:"Microsoft.VisualStudio.Code.PreRelease",AzDataEngine:"Microsoft.AzDataEngine",LocalizedLanguages:"Microsoft.VisualStudio.Code.LocalizedLanguages",WebExtension:"Microsoft.VisualStudio.Code.WebExtension",SponsorLink:"Microsoft.VisualStudio.Code.SponsorLink"},k={pageNumber:1,pageSize:10,sortBy:0,sortOrder:0,flags:w.None,criteria:[],assetTypes:[]};class L{constructor(Z=k){this.state=Z}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}get criteria(){return this.state.criteria?this.state.criteria:[]}withPage(Z,se=this.state.pageSize){return new L({...this.state,pageNumber:Z,pageSize:se})}withFilter(Z,...se){const re=[...this.state.criteria,...se.length?se.map(oe=>({filterType:Z,value:oe})):[{filterType:Z}]];return new L({...this.state,criteria:re})}withSortBy(Z){return new L({...this.state,sortBy:Z})}withSortOrder(Z){return new L({...this.state,sortOrder:Z})}withFlags(...Z){return new L({...this.state,flags:Z.reduce((se,re)=>se|re,0)})}withAssetTypes(...Z){return new L({...this.state,assetTypes:Z})}withSource(Z){return new L({...this.state,source:Z})}get raw(){const{criteria:Z,pageNumber:se,pageSize:re,sortBy:oe,sortOrder:le,flags:ne,assetTypes:ce}=this.state;return{filters:[{criteria:Z,pageNumber:se,pageSize:re,sortBy:oe,sortOrder:le}],assetTypes:ce,flags:ne}}get searchText(){const Z=this.state.criteria.filter(se=>se.filterType===C.SearchText)[0];return Z&&Z.value?Z.value:""}get telemetryData(){return{filterTypes:this.state.criteria.map(Z=>String(Z.filterType)),flags:this.state.flags,sortBy:String(this.sortBy),sortOrder:String(this.sortOrder),pageNumber:String(this.pageNumber),source:this.state.source,searchTextLength:this.searchText.length}}}function R(te,Z){const se=(te||[]).filter(re=>re.statisticName===Z)[0];return se?se.value:0}function M(te){const Z="Microsoft.VisualStudio.Code.Translation.";return te.files.filter(re=>re.assetType.indexOf(Z)===0).reduce((re,oe)=>{const le=x(te,oe.assetType);return le&&re.push([oe.assetType.substring(Z.length),le]),re},[])}function N(te){if(te.properties){const Z=te.properties.filter(oe=>oe.key===I.Repository),se=new RegExp("((git|ssh|http(s)?)|(git@[\\w.]+))(:(//)?)([\\w.@:/\\-~]+)(.git)(/)?"),re=Z.filter(oe=>se.test(oe.value))[0];return re?{uri:re.value,fallbackUri:re.value}:null}return x(te,I.Repository)}function P(te){const Z=x(te,I.VSIX);return Z||{uri:`${te.fallbackAssetUri}/${I.VSIX}?redirect=true${te.targetPlatform?`&targetPlatform=${te.targetPlatform}`:""}`,fallbackUri:`${te.fallbackAssetUri}/${I.VSIX}${te.targetPlatform?`?targetPlatform=${te.targetPlatform}`:""}`}}function x(te,Z){const se=te.files.filter(oe=>oe.assetType===Z)[0];let re;return se&&(re=se.source),Z===I.VSIX?{uri:re||`${te.fallbackAssetUri}/${Z}?redirect=true`,fallbackUri:`${te.fallbackAssetUri}/${Z}`}:te.assetUri?{uri:`${te.assetUri}/${Z}`,fallbackUri:`${te.fallbackAssetUri}/${Z}`}:se?{uri:re,fallbackUri:`${te.fallbackAssetUri}/${Z}`}:null}function F(te,Z){const se=te.properties?te.properties.filter(oe=>oe.key===Z):[],re=se.length>0&&se[0].value;return re?re.split(",").map(oe=>(0,a.adoptToGalleryExtensionId)(oe)):[]}function V(te){const Z=te.properties?te.properties.filter(se=>se.key===_.Engine):[];return Z.length>0&&Z[0].value||""}function W(te){const Z=te.properties?te.properties.filter(se=>se.key===_.AzDataEngine):[];return Z.length>0&&Z[0].value||""}function z(te){const Z=te.properties?te.properties.filter(se=>se.key===_.PreRelease):[];return Z.length>0&&Z[0].value==="true"}function B(te){const Z=te.properties?te.properties.filter(re=>re.key===_.LocalizedLanguages):[],se=Z.length>0&&Z[0].value||"";return se?se.split(","):[]}function K(te){return te.properties?.find(Z=>Z.key===_.SponsorLink)?.value}function H(te){return te.indexOf("preview")!==-1}function U(te){return te.targetPlatform?(0,h.toTargetPlatform)(te.targetPlatform):"undefined"}function G(te){const Z=(0,t.distinct)(te.versions.map(U)),se=!!te.tags?.includes(h.WEB_EXTENSION_TAG),re=Z.indexOf("web");return se?re===-1&&Z.push("web"):re!==-1&&Z.splice(re,1),Z}function $(te,Z){const se=(0,h.getFallbackTargetPlarforms)(Z);for(let re=0;re<te.length;re++){const oe=te[re];if(oe.version===te[re-1]?.version){let le=re;const ne=U(oe);if(ne===Z)for(;le>0&&te[le-1].version===oe.version;)le--;else if(se.includes(ne))for(;le>0&&te[le-1].version===oe.version&&U(te[le-1])!==Z;)le--;le!==re&&(te.splice(re,1),te.splice(le,0,oe))}}return te}e.sortExtensionVersions=$;function ie(te,Z,se){te.telemetryData={index:Z,querySource:se,queryActivityId:te.queryContext?.[g]}}function J(te,Z,se,re){const oe=te.versions[0],le={manifest:x(Z,I.Manifest),readme:x(Z,I.Details),changelog:x(Z,I.Changelog),license:x(Z,I.License),repository:N(Z),download:P(Z),downloadPage:x(Z,I.DownloadPage),icon:x(Z,I.Icon),signature:x(Z,I.Signature),coreTranslations:M(Z)};return{identifier:{id:(0,a.getGalleryExtensionId)(te.publisher.publisherName,te.extensionName),uuid:te.extensionId},name:te.extensionName,version:Z.version,displayName:te.displayName,publisherId:te.publisher.publisherId,publisher:te.publisher.publisherName,publisherDisplayName:te.publisher.displayName,publisherDomain:te.publisher.domain?{link:te.publisher.domain,verified:!!te.publisher.isDomainVerified}:void 0,publisherSponsorLink:K(oe),description:te.shortDescription||"",installCount:R(te.statistics,"install"),rating:R(te.statistics,"averagerating"),ratingCount:R(te.statistics,"ratingcount"),categories:te.categories||[],tags:te.tags||[],releaseDate:Date.parse(te.releaseDate),lastUpdated:Date.parse(Z.lastUpdated),allTargetPlatforms:se,assets:le,properties:{dependencies:F(Z,_.Dependency),extensionPack:F(Z,_.ExtensionPack),engine:V(Z),azDataEngine:W(Z),localizedLanguages:B(Z),targetPlatform:U(Z),isPreReleaseVersion:z(Z)},hasPreReleaseVersion:z(oe),hasReleaseVersion:!0,preview:H(te.flags),isSigned:!!le.signature,queryContext:re}}let j=class{constructor(Z,se,re,oe,le,ne,ce,ae){this.requestService=se,this.logService=re,this.environmentService=oe,this.telemetryService=le,this.fileService=ne,this.productService=ce,this.configurationService=ae;const ue=ce.extensionsGallery,de=ue?.servicePPEUrl&&ae.getValue("_extensionsGallery.enablePPE");this.extensionsGalleryUrl=de?ue.servicePPEUrl:ue?.serviceUrl,this.extensionsControlUrl=ue?.controlUrl,this.commonHeadersPromise=(0,p.resolveMarketplaceHeaders)(ce.version,ce,this.environmentService,this.configurationService,this.fileService,Z,this.telemetryService)}api(Z=""){return`${this.extensionsGalleryUrl}`}isEnabled(){return!!this.extensionsGalleryUrl}async getExtensions(Z,se,re){const oe=y.CancellationToken.isCancellationToken(se)?{}:se,le=y.CancellationToken.isCancellationToken(se)?se:re,ne=[],ce=[],ae=[],ue=[];let de=!0;for(const be of Z){be.uuid?ce.push(be.uuid):ne.push(be.id);const ve=!!(be.version||be.preRelease);ae.push({id:be.id,uuid:be.uuid,includePreRelease:ve}),be.version&&ue.push({id:be.id,uuid:be.uuid,version:be.version}),de=de&&!!be.hasPreRelease&&!ve}if(!ce.length&&!ne.length)return[];let ge=new L().withPage(1,Z.length);ce.length&&(ge=ge.withFilter(C.ExtensionId,...ce)),ne.length&&(ge=ge.withFilter(C.ExtensionName,...ne)),(oe.queryAllVersions||de)&&(ge=ge.withFlags(ge.flags,w.IncludeVersions)),oe.source&&(ge=ge.withSource(oe.source));const{extensions:he}=await this.queryGalleryExtensions(ge,{targetPlatform:oe.targetPlatform??n,includePreRelease:ae,versions:ue,compatible:!!oe.compatible},le);return oe.source&&he.forEach((be,ve)=>ie(be,ve,oe.source)),he}async getCompatibleExtension(Z,se,re){return Z?Promise.resolve(Z):null}async isExtensionCompatible(Z,se,re){if(!(0,h.isTargetPlatformCompatible)(Z.properties.targetPlatform,Z.allTargetPlatforms,re)||!se&&Z.properties.isPreReleaseVersion)return!1;let oe=Z.properties.engine;if(!oe){const le=await this.getManifest(Z,y.CancellationToken.None);if(!le)throw new Error("Manifest was not found");oe=le.engines.vscode}return(0,i.isEngineValid)(oe,this.productService.version,this.productService.date)}async isValidVersion(Z,se,re,oe,le){if(!(0,h.isTargetPlatformCompatible)(U(Z),oe,le)||se!=="any"&&z(Z)!==(se==="prerelease"))return!1;if(re)try{const ne=await this.getEngine(Z);if(!(0,i.isEngineValid)(ne,this.productService.vscodeVersion,this.productService.date))return!1;const ce=await this.getAzureDataStudioEngine(Z);if(!(0,i.isEngineValid)(ce,this.productService.version,this.productService.date))return!1}catch(ne){return this.logService.error(`Error while getting the engine for the version ${Z.version}.`,(0,b.getErrorMessage)(ne)),!1}return!0}async query(Z,se){let re=Z.text||"";const oe=Z.pageSize??50;let le=new L().withPage(1,oe);Z.excludeFlags&&(le=le.withFilter(C.ExcludeWithFlags,Z.excludeFlags)),re?(re=re.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(de,ge,he)=>(le=le.withFilter(C.Category,he||ge),"")),re=re.replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(de,ge,he)=>(le=le.withFilter(C.Tag,he||ge),"")),re=re.replace(/\bfeatured(\s+|\b|$)/g,()=>(le=le.withFilter(C.Featured),"")),re=re.trim(),re&&(re=re.length<200?re:re.substring(0,200),le=le.withFilter(C.SearchText,re)),le=le.withSortBy(0)):Z.ids?le=le.withFilter(C.ExtensionId,...Z.ids):Z.names?le=le.withFilter(C.ExtensionName,...Z.names):le=le.withSortBy(4),typeof Z.sortBy=="number"&&(le=le.withSortBy(Z.sortBy)),typeof Z.sortOrder=="number"&&(le=le.withSortOrder(Z.sortOrder)),Z.source&&(le=le.withSource(Z.source));const ne=async(de,ge)=>{const{extensions:he,total:be}=await this.queryGalleryExtensions(de,{targetPlatform:n,compatible:!1,includePreRelease:!!Z.includePreRelease},ge);return he.forEach((ve,Ie)=>ie(ve,(de.pageNumber-1)*de.pageSize+Ie,Z.source)),{extensions:he,total:be}},{extensions:ce,total:ae}=await ne(le,se),ue=async(de,ge)=>{if(ge.isCancellationRequested)throw new b.CancellationError;const{extensions:he}=await ne(le.withPage(de+1),ge);return he};return{firstPage:ce,total:ae,pageSize:ce.length,getPage:ue}}async queryGalleryExtensions(Z,se,re){const oe=Z.flags;Z.flags&w.IncludeLatestVersionOnly&&Z.flags&w.IncludeVersions&&(Z=Z.withFlags(Z.flags&~w.IncludeVersions,w.IncludeLatestVersionOnly)),!(Z.flags&w.IncludeLatestVersionOnly)&&!(Z.flags&w.IncludeVersions)&&(Z=Z.withFlags(Z.flags,w.IncludeLatestVersionOnly)),se.versions?.length&&(Z=Z.withFlags(Z.flags&~w.IncludeLatestVersionOnly,w.IncludeVersions)),Z=Z.withFlags(Z.flags,w.IncludeAssetUri,w.IncludeCategoryAndTags,w.IncludeFiles,w.IncludeStatistics,w.IncludeVersionProperties);const{galleryExtensions:le,total:ne,context:ce}=await this.queryRawGalleryExtensions(Z,re);if(!(Z.flags&w.IncludeLatestVersionOnly)){const ge=[];for(const he of le){const be=await this.toGalleryExtensionWithCriteria(he,se,ce);be&&ge.push(be)}return{extensions:ge,total:ne}}const ue=[],de=new Map;for(let ge=0;ge<le.length;ge++){const he=le[ge],be={id:(0,a.getGalleryExtensionId)(he.publisher.publisherName,he.extensionName),uuid:he.extensionId},ve=(0,f.isBoolean)(se.includePreRelease)?se.includePreRelease:!!se.includePreRelease.find(Se=>(0,a.areSameExtensions)(Se,be))?.includePreRelease;if(se.compatible&&(0,h.isNotWebExtensionInWebTargetPlatform)(G(he),se.targetPlatform))continue;const Ie=await this.toGalleryExtensionWithCriteria(he,se,ce);!Ie||Ie.properties.isPreReleaseVersion&&(!ve||!Ie.hasReleaseVersion)||!Ie.properties.isPreReleaseVersion&&Ie.properties.targetPlatform!==se.targetPlatform&&Ie.hasPreReleaseVersion?de.set(he.extensionId,ge):ue.push([ge,Ie])}if(de.size){const ge=new L().withFlags(oe&~w.IncludeLatestVersionOnly,w.IncludeVersions).withPage(1,de.size).withFilter(C.ExtensionId,...de.keys()),{extensions:he}=await this.queryGalleryExtensions(ge,se,re);for(const be of he){const ve=de.get(be.identifier.uuid);ue.push([ve,be])}}return{extensions:ue.sort((ge,he)=>ge[0]-he[0]).map(([,ge])=>ge),total:ne}}async toGalleryExtensionWithCriteria(Z,se,re){const oe={id:(0,a.getGalleryExtensionId)(Z.publisher.publisherName,Z.extensionName),uuid:Z.extensionId},le=se.versions?.find(ue=>(0,a.areSameExtensions)(ue,oe))?.version,ne=(0,f.isBoolean)(se.includePreRelease)?se.includePreRelease:!!se.includePreRelease.find(ue=>(0,a.areSameExtensions)(ue,oe))?.includePreRelease,ce=G(Z),ae=$(Z.versions,se.targetPlatform);if(se.compatible&&(0,h.isNotWebExtensionInWebTargetPlatform)(ce,se.targetPlatform))return null;for(let ue=0;ue<ae.length;ue++){const de=ae[ue];if(!(le&&de.version!==le)){if(await this.isValidVersion(de,ne?"any":"release",se.compatible,ce,se.targetPlatform))return J(Z,de,ce,re);if(le&&de.version===le)return null}}return le||se.compatible?null:J(Z,Z.versions[0],ce)}createQueryResult(Z,se){let re=se;if(Z.criteria){const ne=Z.criteria.filter(he=>he.filterType===C.ExtensionId).map(he=>he.value?he.value.toLocaleLowerCase():void 0);ne&&ne.length>0&&(re=re.filter(he=>he.extensionId&&ne.find(be=>be===he.extensionId.toLocaleLowerCase())));const ce=Z.criteria.filter(he=>he.filterType===C.ExtensionName).map(he=>he.value?he.value.toLocaleLowerCase():void 0);ce&&ce.length>0&&(re=re.filter(he=>he.extensionName&&he.publisher.publisherName&&ce.find(be=>be===`${he.publisher.publisherName.toLocaleLowerCase()}.${he.extensionName.toLocaleLowerCase()}`)));const ae=Z.criteria.filter(he=>he.filterType===C.Category).map(he=>he.value?he.value.toLowerCase():void 0);ae&&ae.length>0&&ae.find(he=>he==="language packs")&&(re=re.filter(he=>{if(he.versions.length===1){const be=G(he),ve=J(he,he.versions[0],be);return ve.properties.localizedLanguages&&ve.properties.localizedLanguages.length>0}return!1})),Z.criteria.filter(he=>he.filterType===C.Tag)?.length>0&&(re=[]);const de=Z.criteria.filter(he=>he.filterType===C.SearchText).map(he=>he.value?he.value.toLocaleLowerCase():void 0);de&&de.length>0&&de.forEach(he=>{he!=="@allmarketplace"&&(re=re.filter(be=>ee.isMatchingExtension(be,he)))});const ge=Z.criteria.filter(he=>he.filterType===C.ExcludeWithFlags).map(he=>he.value?he.value.toLocaleLowerCase():void 0);ge&&ge.length>0&&(re=re.filter(he=>!he.flags||ge.find(be=>be===he.flags.toLocaleLowerCase())===void 0))}switch(Z.sortBy){case 3:re.sort((ne,ce)=>ee.compareByField(ne.publisher,ce.publisher,"publisherName"));break;case 2:default:re.sort((ne,ce)=>ee.compareByField(ne,ce,"displayName"));break}let oe=re.length;return this.configurationService.getValue(r.ExtensionsPolicyKey)===r.ExtensionsPolicy.allowMicrosoft&&(re=re.filter(ne=>ne.publisher&&ne.publisher.displayName==="Microsoft")),{galleryExtensions:re,total:oe}}static isMatchingExtension(Z,se){if(!se)return!0;let re=se.toLocaleLowerCase();return!!Z&&!!(Z.extensionName&&Z.extensionName.toLocaleLowerCase().indexOf(re)>-1||Z.publisher&&Z.publisher.publisherName&&Z.publisher.publisherName.toLocaleLowerCase().indexOf(re)>-1||Z.publisher&&Z.publisher.displayName&&Z.publisher.displayName.toLocaleLowerCase().indexOf(re)>-1||Z.displayName&&Z.displayName.toLocaleLowerCase().indexOf(re)>-1||Z.shortDescription&&Z.shortDescription.toLocaleLowerCase().indexOf(re)>-1||Z.extensionId&&Z.extensionId.toLocaleLowerCase().indexOf(re)>-1)}static compareByField(Z,se,re){return Z&&!se?1:se&&!Z?-1:Z&&Z[re]&&(!se||!se[re])?1:se&&se[re]&&(!Z||!Z[re])?-1:!se||!se[re]&&(!Z||!Z[re])||Z[re]===se[re]?0:Z[re]<se[re]?-1:1}async queryRawGalleryExtensions(Z,se){if(!this.isEnabled())throw new Error("No extension gallery service configured.");Z=Z.withFlags(Z.flags,w.ExcludeNonValidated).withFilter(C.Target,"Microsoft.VisualStudio.Code").withFilter(C.ExcludeWithFlags,E(w.Unpublished));const re=await this.commonHeadersPromise,oe=JSON.stringify(Z.raw),le={...re,"Content-Type":"application/json",Accept:"application/json;api-version=3.0-preview.1","Accept-Encoding":"gzip","Content-Length":String(oe.length)},ne=await this.requestService.request({type:"GET",url:this.api("/extensionquery"),data:oe,headers:le},se);let ce=this.configurationService.getValue(r.ExtensionsPolicyKey);if(ne.res.statusCode&&ne.res.statusCode>=400&&ne.res.statusCode<500||ce===r.ExtensionsPolicy.allowNone)return{galleryExtensions:[],total:0};const ae=await(0,d.asJson)(ne);if(ae){const de=ae.results[0].extensions;de.forEach(he=>$(he.versions,"universal"));let ge=this.createQueryResult(Z,de);return{galleryExtensions:ge.galleryExtensions,total:ge.total}}return{galleryExtensions:[],total:0}}async reportStatistic(Z,se,re,oe){if(!this.isEnabled())return;const le=D.isWeb?this.api(`/itemName/${Z}.${se}/version/${re}/statType/${oe==="install"?"1":"3"}/vscodewebextension`):this.api(`/publishers/${Z}/extensions/${se}/${re}/stats?statType=${oe}`),ne=D.isWeb?"api-version=6.1-preview.1":"*/*;api-version=4.0-preview.1",ae={...await this.commonHeadersPromise,Accept:ne};try{await this.requestService.request({type:"POST",url:le,headers:ae},y.CancellationToken.None)}catch{}}async download(Z,se,re){this.logService.trace("ExtensionGalleryService#download",Z.identifier.id);const oe=(0,a.getGalleryExtensionTelemetryData)(Z),le=new Date().getTime(),ne=ge=>this.telemetryService.publicLog("galleryService:downloadVSIX",{...oe,duration:ge}),ce=void 0,ae=ce?{uri:`${Z.assets.download.uri}${v.URI.parse(Z.assets.download.uri).query?"&":"?"}${ce}=true`,fallbackUri:`${Z.assets.download.fallbackUri}${v.URI.parse(Z.assets.download.fallbackUri).query?"&":"?"}${ce}=true`}:Z.assets.download,ue=Z.queryContext?.[g]?{[g]:Z.queryContext[g]}:void 0,de=await this.getAsset(ae,ue?{headers:ue}:void 0);await this.fileService.writeFile(se,de.stream),ne(new Date().getTime()-le)}async downloadSignatureArchive(Z,se){if(!Z.assets.signature)throw new Error("No signature asset found");this.logService.trace("ExtensionGalleryService#downloadSignatureArchive",Z.identifier.id);const re=await this.getAsset(Z.assets.signature);await this.fileService.writeFile(se,re.stream)}async getReadme(Z,se){if(Z.assets.readme){const re=await this.getAsset(Z.assets.readme,{},se);return await(0,d.asTextOrError)(re)||""}return""}async getManifest(Z,se){if(Z.assets.manifest){const re=await this.getAsset(Z.assets.manifest,{},se),oe=await(0,d.asTextOrError)(re);return oe?JSON.parse(oe):null}return null}async getManifestFromRawExtensionVersion(Z,se){const re=x(Z,I.Manifest);if(!re)throw new Error("Manifest was not found");const oe={"Accept-Encoding":"gzip"},le=await this.getAsset(re,{headers:oe});return await(0,d.asJson)(le)}async getCoreTranslation(Z,se){const re=Z.assets.coreTranslations.filter(oe=>oe[0]===se.toUpperCase())[0];if(re){const oe=await this.getAsset(re[1]),le=await(0,d.asTextOrError)(oe);return le?JSON.parse(le):null}return null}async getChangelog(Z,se){if(Z.assets.changelog){const re=await this.getAsset(Z.assets.changelog,{},se);return await(0,d.asTextOrError)(re)||""}return""}async getAllCompatibleVersions(Z,se,re){let oe=new L().withFlags(w.IncludeVersions,w.IncludeCategoryAndTags,w.IncludeFiles,w.IncludeVersionProperties).withPage(1,1);Z.identifier.uuid?oe=oe.withFilter(C.ExtensionId,Z.identifier.uuid):oe=oe.withFilter(C.ExtensionName,Z.identifier.id);const{galleryExtensions:le}=await this.queryRawGalleryExtensions(oe,y.CancellationToken.None);if(!le.length)return[];const ne=G(le[0]);if((0,h.isNotWebExtensionInWebTargetPlatform)(ne,re))return[];const ce=[];await Promise.all(le[0].versions.map(async de=>{try{await this.isValidVersion(de,se?"any":"release",!0,ne,re)&&ce.push(de)}catch{}}));const ae=[],ue=new Set;for(const de of $(ce,re))ue.has(de.version)||(ue.add(de.version),ae.push({version:de.version,date:de.lastUpdated,isPreReleaseVersion:z(de)}));return ae}async getAsset(Z,se={},re=y.CancellationToken.None){const oe={},le={type:"GET"},ne={...oe,...se.headers||{}};se={...se,...le,headers:ne};const ce=Z.uri,ae=Z.fallbackUri,ue={...se,url:ce};try{const de=await this.requestService.request(ue,re);if(de.res.statusCode===200)return de;const ge=await(0,d.asTextOrError)(de);throw new Error(`Expected 200, got back ${de.res.statusCode} instead. ${ge}`)}catch(de){if((0,b.isCancellationError)(de))throw de;const ge=(0,b.getErrorMessage)(de);this.telemetryService.publicLog2("galleryService:cdnFallback",{url:ce,message:ge});const he={...se,url:ae};return this.requestService.request(he,re)}}async getEngine(Z){let se=V(Z);if(!se){const re=await this.getManifestFromRawExtensionVersion(Z,y.CancellationToken.None);if(!re)throw new Error("Manifest was not found");se=re.engines.vscode}return se}async getAzureDataStudioEngine(Z){let se=W(Z);if(!se){const re=await this.getManifestFromRawExtensionVersion(Z,y.CancellationToken.None);if(!re)throw new Error("Manifest was not found");se=re.engines.azdata}return se}async getExtensionsControlManifest(){if(!this.isEnabled())throw new Error("No extension gallery service configured.");if(!this.extensionsControlUrl)return{malicious:[],deprecated:{},search:[]};const Z=await this.requestService.request({type:"GET",url:this.extensionsControlUrl},y.CancellationToken.None);if(Z.res.statusCode!==200)throw new Error("Could not get extensions report.");const se=await(0,d.asJson)(Z),re=[],oe={},le=[];if(se){for(const ne of se.malicious)re.push({id:ne});if(se.migrateToPreRelease)for(const[ne,ce]of Object.entries(se.migrateToPreRelease))(!ce.engine||(0,i.isEngineValid)(ce.engine,this.productService.version,this.productService.date))&&(oe[ne.toLowerCase()]={disallowInstall:!0,extension:{id:ce.id,displayName:ce.displayName,autoMigrate:{storage:!!ce.migrateStorage},preRelease:!0}});if(se.deprecated)for(const[ne,ce]of Object.entries(se.deprecated))ce&&(oe[ne.toLowerCase()]=(0,f.isBoolean)(ce)?{}:ce);if(se.search)for(const ne of se.search)le.push(ne)}return{malicious:re,deprecated:oe,search:le}}};j=fe([O(1,d.IRequestService),O(2,o.ILogService),O(3,S.IEnvironmentService),O(4,l.ITelemetryService),O(5,s.IFileService),O(6,u.IProductService),O(7,m.IConfigurationService)],j);let ee=class extends j{constructor(Z,se,re,oe,le,ne,ce,ae){super(Z,se,re,oe,le,ne,ce,ae)}};e.ExtensionGalleryService=ee,e.ExtensionGalleryService=ee=fe([O(0,c.IStorageService),O(1,d.IRequestService),O(2,o.ILogService),O(3,S.IEnvironmentService),O(4,l.ITelemetryService),O(5,s.IFileService),O(6,u.IProductService),O(7,m.IConfigurationService)],ee);let X=class extends j{constructor(Z,se,re,oe,le,ne,ce){super(void 0,Z,se,re,oe,le,ne,ce)}};e.ExtensionGalleryServiceWithNoStorageService=X,e.ExtensionGalleryServiceWithNoStorageService=X=fe([O(0,d.IRequestService),O(1,o.ILogService),O(2,S.IEnvironmentService),O(3,l.ITelemetryService),O(4,s.IFileService),O(5,u.IProductService),O(6,m.IConfigurationService)],X)}),define(Q[519],Y([1,0,5,6,4,24,115,52,20,11,17]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionStorageService=e.IExtensionStorageService=void 0,e.IExtensionStorageService=(0,t.createDecorator)("IExtensionStorageService");const a=/^extensionKeys\/([^.]+\..+)@(\d+\.\d+\.\d+(-.*)?)$/;let r=class extends b.Disposable{static{h=this}static{this.LARGE_STATE_WARNING_THRESHOLD=512*1024}static toKey(s){return`extensionKeys/${(0,T.adoptToGalleryExtensionId)(s.id)}@${s.version}`}static fromKey(s){const o=a.exec(s);if(o&&o[1])return{id:o[1],version:o[2]}}static async removeOutdatedExtensionVersions(s,o){const u=await s.getInstalled(),d=[];for(const[p,c]of h.readAllExtensionsWithKeysForSync(o)){const l=u.find(n=>(0,T.areSameExtensions)(n.identifier,{id:p}))?.manifest.version;for(const n of c)l!==n&&d.push(h.toKey({id:p,version:n}))}for(const p of d)o.remove(p,0)}static readAllExtensionsWithKeysForSync(s){const o=new Map,u=s.keys(0,1);for(const d of u){const p=h.fromKey(d);if(p){let c=o.get(p.id.toLowerCase());c||o.set(p.id.toLowerCase(),c=[]),c.push(p.version)}}return o}constructor(s,o,u){super(),this.storageService=s,this.productService=o,this.logService=u,this._onDidChangeExtensionStorageToSync=this._register(new y.Emitter),this.onDidChangeExtensionStorageToSync=this._onDidChangeExtensionStorageToSync.event,this.extensionsWithKeysForSync=h.readAllExtensionsWithKeysForSync(s),this._register(this.storageService.onDidChangeValue(0,void 0,this._register(new b.DisposableStore))(d=>this.onDidChangeStorageValue(d)))}onDidChangeStorageValue(s){if(this.extensionsWithKeysForSync.has(s.key.toLowerCase())){this._onDidChangeExtensionStorageToSync.fire();return}const o=h.fromKey(s.key);if(o){if(this.storageService.get(s.key,0)===void 0)this.extensionsWithKeysForSync.delete(o.id.toLowerCase());else{let u=this.extensionsWithKeysForSync.get(o.id.toLowerCase());u||this.extensionsWithKeysForSync.set(o.id.toLowerCase(),u=[]),u.push(o.version),this._onDidChangeExtensionStorageToSync.fire()}return}}getExtensionId(s){if((0,S.isString)(s))return s;const o=s.manifest?s.manifest.publisher:s.publisher,u=s.manifest?s.manifest.name:s.name;return(0,T.getExtensionId)(o,u)}getExtensionState(s,o){const u=this.getExtensionId(s),d=this.getExtensionStateRaw(s,o);if(d)try{return JSON.parse(d)}catch(p){this.logService.error(`[mainThreadStorage] unexpected error parsing storage contents (extensionId: ${u}, global: ${o}): ${p}`)}}getExtensionStateRaw(s,o){const u=this.getExtensionId(s),d=this.storageService.get(u,o?0:1);return d&&d?.length>h.LARGE_STATE_WARNING_THRESHOLD&&this.logService.warn(`[mainThreadStorage] large extension state detected (extensionId: ${u}, global: ${o}): ${d.length/1024}kb. Consider to use 'storageUri' or 'globalStorageUri' to store this data on disk instead.`),d}setExtensionState(s,o,u){const d=this.getExtensionId(s);o===void 0?this.storageService.remove(d,u?0:1):this.storageService.store(d,JSON.stringify(o),u?0:1,1)}setKeysForSync(s,o){this.storageService.store(h.toKey(s),JSON.stringify(o),0,1)}getKeysForSync(s){const o=this.productService.extensionSyncedKeys?.[s.id.toLowerCase()],u=this.storageService.get(h.toKey(s),0),d=u?JSON.parse(u):void 0;return d&&o?(0,v.distinct)([...d,...o]):d||o}addToMigrationList(s,o){if(s!==o){const u=this.migrationList.filter(d=>!d.includes(s)&&!d.includes(o));u.push([s,o]),this.migrationList=u}}getSourceExtensionToMigrate(s){const o=this.migrationList.find(([,u])=>s===u);return o?o[0]:void 0}get migrationList(){const s=this.storageService.get("extensionStorage.migrationList",-1,"[]");try{const o=JSON.parse(s);if(Array.isArray(o))return o}catch{}return[]}set migrationList(s){s.length?this.storageService.store("extensionStorage.migrationList",JSON.stringify(s),-1,1):this.storageService.remove("extensionStorage.migrationList",-1)}};e.ExtensionStorageService=r,e.ExtensionStorageService=r=h=fe([O(0,D.IStorageService),O(1,f.IProductService),O(2,m.ILogService)],r)}),define(Q[3451],Y([1,0,35,25,52,288,24,91,9,31,412]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionResourceLoaderService=void 0;let h=class extends S.AbstractExtensionResourceLoaderService{constructor(r,i,s,o,u,d){super(r,i,s,o,u),this._requestService=d}async readExtensionResource(r){if(this.isExtensionGalleryResource(r)){const s=await this.getExtensionGalleryRequestHeaders(),o=await this._requestService.request({url:r.toString(),headers:s},m.CancellationToken.None);return await(0,D.asTextOrError)(o)||""}return(await this._fileService.readFile(r)).value.toString()}};e.ExtensionResourceLoaderService=h,e.ExtensionResourceLoaderService=h=fe([O(0,y.IFileService),O(1,T.IStorageService),O(2,b.IProductService),O(3,f.IEnvironmentService),O(4,v.IConfigurationService),O(5,D.IRequestService)],h),(0,t.registerSingleton)(S.IExtensionResourceLoaderService,h,1)}),define(Q[1246],Y([1,0,132,15,128,4,69,2474,28,9,49,5,38,347,24,30]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";var o,u;Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsHistory=e.AbstractCommandsQuickAccessProvider=void 0;let d=class extends r.PickerQuickAccessProvider{static{o=this}static{this.PREFIX=">"}static{this.WORD_FILTER=(0,b.or)(b.matchesPrefix,b.matchesWords,b.matchesContiguousSubString)}constructor(l,n,g,w,E,C){super(o.PREFIX,l),this.instantiationService=n,this.keybindingService=g,this.commandService=w,this.telemetryService=E,this.dialogService=C,this.commandsHistory=this._register(this.instantiationService.createInstance(p)),this.options=l}async _getPicks(l,n,g,w){const E=await this.getCommandPicks(g);if(g.isCancellationRequested)return[];const C=[];for(const L of E){const R=o.WORD_FILTER(l,L.label)??void 0,M=L.commandAlias?o.WORD_FILTER(l,L.commandAlias)??void 0:void 0;R||M?(L.highlights={label:R,detail:this.options.showAlias?M:void 0},C.push(L)):l===L.commandId&&C.push(L)}const I=new Map;for(const L of C){const R=I.get(L.label);R?(L.description=L.commandId,R.description=R.commandId):I.set(L.label,L)}C.sort((L,R)=>{const M=this.commandsHistory.peek(L.commandId),N=this.commandsHistory.peek(R.commandId);if(M&&N)return M>N?-1:1;if(M)return-1;if(N)return 1;if(this.options.suggestedCommandIds){const P=this.options.suggestedCommandIds.has(L.commandId),x=this.options.suggestedCommandIds.has(R.commandId);if(P&&x)return 0;if(P)return-1;if(x)return 1}return L.label.localeCompare(R.label)});const _=[];let A=!1,k=!!this.options.suggestedCommandIds;for(let L=0;L<C.length;L++){const R=C[L];L===0&&this.commandsHistory.peek(R.commandId)&&(_.push({type:"separator",label:(0,f.localize)(0,null)}),A=!0),k&&!this.commandsHistory.peek(R.commandId)&&this.options.suggestedCommandIds?.has(R.commandId)&&(_.push({type:"separator",label:(0,f.localize)(1,null)}),A=!0,k=!1),A&&!this.commandsHistory.peek(R.commandId)&&!this.options.suggestedCommandIds?.has(R.commandId)&&(_.push({type:"separator",label:(0,f.localize)(2,null)}),A=!1),_.push(this.toCommandPick(R,w))}return this.hasAdditionalCommandPicks(l,g)?{picks:_,additionalPicks:(async()=>{const L=await this.getAdditionalCommandPicks(E,C,l,g);return g.isCancellationRequested?[]:L.map(R=>this.toCommandPick(R,w))})()}:_}toCommandPick(l,n){if(l.type==="separator")return l;const g=this.keybindingService.lookupKeybinding(l.commandId),w=g?(0,f.localize)(3,null,l.label,g.getAriaLabel()):l.label;return{...l,ariaLabel:w,detail:this.options.showAlias&&l.commandAlias!==l.label?l.commandAlias:void 0,keybinding:g,accept:async()=>{this.commandsHistory.push(l.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:n?.from??"quick open"});try{l.args?.length?await this.commandService.executeCommand(l.commandId,...l.args):await this.commandService.executeCommand(l.commandId)}catch(E){(0,y.isCancellationError)(E)||this.dialogService.error((0,f.localize)(4,null,l.label),(0,t.toErrorMessage)(E))}}}}};e.AbstractCommandsQuickAccessProvider=d,e.AbstractCommandsQuickAccessProvider=d=o=fe([O(1,h.IInstantiationService),O(2,a.IKeybindingService),O(3,v.ICommandService),O(4,s.ITelemetryService),O(5,S.IDialogService)],d);let p=class extends D.Disposable{static{u=this}static{this.DEFAULT_COMMANDS_HISTORY_LENGTH=50}static{this.PREF_KEY_CACHE="commandPalette.mru.cache"}static{this.PREF_KEY_COUNTER="commandPalette.mru.counter"}static{this.counter=1}constructor(l,n){super(),this.storageService=l,this.configurationService=n,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(l=>this.updateConfiguration(l)))}updateConfiguration(l){l&&!l.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=u.getConfiguredCommandHistoryLength(this.configurationService),u.cache&&u.cache.limit!==this.configuredCommandsHistoryLength&&(u.cache.limit=this.configuredCommandsHistoryLength,u.saveState(this.storageService)))}load(){const l=this.storageService.get(u.PREF_KEY_CACHE,0);let n;if(l)try{n=JSON.parse(l)}catch{}const g=u.cache=new T.LRUCache(this.configuredCommandsHistoryLength,1);if(n){let w;n.usesLRU?w=n.entries:w=n.entries.sort((E,C)=>E.value-C.value),w.forEach(E=>g.set(E.key,E.value))}u.counter=this.storageService.getNumber(u.PREF_KEY_COUNTER,0,u.counter)}push(l){u.cache&&(u.cache.set(l,u.counter++),u.saveState(this.storageService))}peek(l){return u.cache?.peek(l)}static saveState(l){if(!u.cache)return;const n={usesLRU:!0,entries:[]};u.cache.forEach((g,w)=>n.entries.push({key:w,value:g})),l.store(u.PREF_KEY_CACHE,JSON.stringify(n),0,0),l.store(u.PREF_KEY_COUNTER,u.counter,0,0)}static getConfiguredCommandHistoryLength(l){const g=l.getValue().workbench?.commandPalette?.history;return typeof g=="number"?g:u.DEFAULT_COMMANDS_HISTORY_LENGTH}static clearHistory(l,n){const g=u.getConfiguredCommandHistoryLength(l);u.cache=new T.LRUCache(g),u.counter=1,u.saveState(n)}};e.CommandsHistory=p,e.CommandsHistory=p=u=fe([O(0,i.IStorageService),O(1,m.IConfigurationService)],p)}),define(Q[3452],Y([1,0,257,1246]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorCommandsQuickAccessProvider=void 0;class b extends y.AbstractCommandsQuickAccessProvider{constructor(T,f,v,m,S,h){super(T,f,v,m,S,h)}getCodeEditorCommandPicks(){const T=this.activeTextEditorControl;if(!T)return[];const f=[];for(const v of T.getSupportedActions())f.push({commandId:v.id,commandAlias:v.alias,label:(0,t.stripIcons)(v.label)||v.id});return f}}e.AbstractEditorCommandsQuickAccessProvider=b}),define(Q[602],Y([1,0,14,690,5,24,6,11,4,203]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseSecretStorageService=e.ISecretStorageService=void 0,e.ISecretStorageService=(0,b.createDecorator)("secretStorageService");let S=class{constructor(a,r,i,s){this._useInMemoryStorage=a,this._storageService=r,this._encryptionService=i,this._logService=s,this._storagePrefix="secret://",this.onDidChangeSecretEmitter=new T.Emitter,this.onDidChangeSecret=this.onDidChangeSecretEmitter.event,this._sequencer=new t.SequencerByKey,this._type="unknown",this._onDidChangeValueDisposable=new v.DisposableStore,this._lazyStorageService=new m.Lazy(()=>this.initialize())}get type(){return this._type}get resolvedStorageService(){return this._lazyStorageService.value}get(a){return this._sequencer.queue(a,async()=>{const r=await this.resolvedStorageService,i=this.getKey(a);this._logService.trace("[secrets] getting secret for key:",i);const s=r.get(i,-1);if(!s){this._logService.trace("[secrets] no secret found for key:",i);return}try{this._logService.trace("[secrets] decrypting gotten secret for key:",i);const o=this._type==="in-memory"?s:await this._encryptionService.decrypt(s);return this._logService.trace("[secrets] decrypted secret for key:",i),o}catch(o){this._logService.error(o),this.delete(a);return}})}set(a,r){return this._sequencer.queue(a,async()=>{const i=await this.resolvedStorageService;this._logService.trace("[secrets] encrypting secret for key:",a);let s;try{s=this._type==="in-memory"?r:await this._encryptionService.encrypt(r)}catch(u){throw this._logService.error(u),u}const o=this.getKey(a);this._logService.trace("[secrets] storing encrypted secret for key:",o),i.store(o,s,-1,1),this._logService.trace("[secrets] stored encrypted secret for key:",o)})}delete(a){return this._sequencer.queue(a,async()=>{const r=await this.resolvedStorageService,i=this.getKey(a);this._logService.trace("[secrets] deleting secret for key:",i),r.remove(i,-1),this._logService.trace("[secrets] deleted secret for key:",i)})}async initialize(){let a;if(!this._useInMemoryStorage&&await this._encryptionService.isEncryptionAvailable())this._logService.trace("[SecretStorageService] Encryption is available, using persisted storage"),this._type="persisted",a=this._storageService;else{if(this._type==="in-memory")return this._storageService;this._logService.trace("[SecretStorageService] Encryption is not available, falling back to in-memory storage"),this._type="in-memory",a=new D.InMemoryStorageService}return this._onDidChangeValueDisposable.clear(),this._onDidChangeValueDisposable.add(a.onDidChangeValue(-1,void 0,this._onDidChangeValueDisposable)(r=>{this.onDidChangeValue(r.key)})),a}reinitialize(){this._lazyStorageService=new m.Lazy(()=>this.initialize())}onDidChangeValue(a){if(!a.startsWith(this._storagePrefix))return;const r=a.slice(this._storagePrefix.length);this._logService.trace(`[SecretStorageService] Notifying change in value for secret: ${r}`),this.onDidChangeSecretEmitter.fire(r)}getKey(a){return`${this._storagePrefix}${a}`}};e.BaseSecretStorageService=S,e.BaseSecretStorageService=S=fe([O(1,D.IStorageService),O(2,y.IEncryptionService),O(3,f.ILogService)],S)}),define(Q[3453],Y([1,0,14,4,26,836,24,1183,116]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteStorageService=void 0;class m extends T.AbstractStorageService{constructor(h,a,r,i){super(),this.initialWorkspace=h,this.initialProfiles=a,this.remoteService=r,this.environmentService=i,this.applicationStorageProfile=this.initialProfiles.defaultProfile,this.applicationStorage=this.createApplicationStorage(),this.profileStorageProfile=this.initialProfiles.currentProfile,this.profileStorageDisposables=this._register(new y.DisposableStore),this.profileStorage=this.createProfileStorage(this.profileStorageProfile),this.workspaceStorageId=this.initialWorkspace?.id,this.workspaceStorageDisposables=this._register(new y.DisposableStore),this.workspaceStorage=this.createWorkspaceStorage(this.initialWorkspace)}createApplicationStorage(){const h=this._register(new f.ApplicationStorageDatabaseClient(this.remoteService.getChannel("storage"))),a=this._register(new D.Storage(h));return this._register(a.onDidChangeStorage(r=>this.emitDidChangeValue(-1,r))),a}createProfileStorage(h){this.profileStorageDisposables.clear(),this.profileStorageProfile=h;let a;if((0,T.isProfileUsingDefaultStorage)(h))a=this.applicationStorage;else{const r=this.profileStorageDisposables.add(new f.ProfileStorageDatabaseClient(this.remoteService.getChannel("storage"),h));a=this.profileStorageDisposables.add(new D.Storage(r))}return this.profileStorageDisposables.add(a.onDidChangeStorage(r=>this.emitDidChangeValue(0,r))),a}createWorkspaceStorage(h){this.workspaceStorageDisposables.clear(),this.workspaceStorageId=h?.id;let a;if(h){const r=this.workspaceStorageDisposables.add(new f.WorkspaceStorageDatabaseClient(this.remoteService.getChannel("storage"),h));a=this.workspaceStorageDisposables.add(new D.Storage(r)),this.workspaceStorageDisposables.add(a.onDidChangeStorage(i=>this.emitDidChangeValue(1,i)))}return a}async doInitialize(){await t.Promises.settled([this.applicationStorage.init(),this.profileStorage.init(),this.workspaceStorage?.init()??Promise.resolve()])}getStorage(h){switch(h){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}getLogDetails(h){switch(h){case-1:return this.applicationStorageProfile.globalStorageHome.fsPath;case 0:return this.profileStorageProfile?.globalStorageHome.fsPath;default:return this.workspaceStorageId?`${(0,b.joinPath)(this.environmentService.workspaceStorageHome,this.workspaceStorageId,"state.vscdb").fsPath}`:void 0}}async close(){this.stopFlushWhenIdle(),this.emitWillSaveState(T.WillSaveStateReason.SHUTDOWN),await t.Promises.settled([this.applicationStorage.close(),this.profileStorage.close(),this.workspaceStorage?.close()??Promise.resolve()])}async switchToProfile(h){if(!this.canSwitchProfile(this.profileStorageProfile,h))return;const a=this.profileStorage,r=a.items;a!==this.applicationStorage&&await a.close(),this.profileStorage=this.createProfileStorage(h),await this.profileStorage.init(),this.switchData(r,this.profileStorage,0)}async switchToWorkspace(h,a){const r=this.workspaceStorage,i=r?.items??new Map;await r?.close(),this.workspaceStorage=this.createWorkspaceStorage(h),await this.workspaceStorage.init(),this.switchData(i,this.workspaceStorage,1)}hasScope(h){return(0,v.isUserDataProfile)(h)?this.profileStorageProfile.id===h.id:this.workspaceStorageId===h.id}}e.RemoteStorageService=m}),define(Q[1247],Y([1,0,6,4,116,834]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataProfilesService=e.RemoteUserDataProfilesServiceChannel=void 0;class T{constructor(m,S){this.service=m,this.getUriTransformer=S}listen(m,S){const h=this.getUriTransformer(m);switch(S){case"onDidChangeProfiles":return t.Event.map(this.service.onDidChangeProfiles,a=>({all:a.all.map(r=>(0,D.transformOutgoingURIs)({...r},h)),added:a.added.map(r=>(0,D.transformOutgoingURIs)({...r},h)),removed:a.removed.map(r=>(0,D.transformOutgoingURIs)({...r},h)),updated:a.updated.map(r=>(0,D.transformOutgoingURIs)({...r},h))}))}throw new Error(`Invalid listen ${S}`)}async call(m,S,h){const a=this.getUriTransformer(m);switch(S){case"createProfile":{const r=await this.service.createProfile(h[0],h[1],h[2]);return(0,D.transformOutgoingURIs)({...r},a)}case"updateProfile":{let r=(0,b.reviveProfile)((0,D.transformIncomingURIs)(h[0],a),this.service.profilesHome.scheme);return r=await this.service.updateProfile(r,h[1]),(0,D.transformOutgoingURIs)({...r},a)}case"removeProfile":{const r=(0,b.reviveProfile)((0,D.transformIncomingURIs)(h[0],a),this.service.profilesHome.scheme);return this.service.removeProfile(r)}}throw new Error(`Invalid call ${S}`)}}e.RemoteUserDataProfilesServiceChannel=T;class f extends y.Disposable{get defaultProfile(){return this.profiles[0]}get profiles(){return this._profiles}constructor(m,S,h){super(),this.profilesHome=S,this.channel=h,this._profiles=[],this._onDidChangeProfiles=this._register(new t.Emitter),this.onDidChangeProfiles=this._onDidChangeProfiles.event,this.enabled=!0,this._profiles=m.map(a=>(0,b.reviveProfile)(a,this.profilesHome.scheme)),this._register(this.channel.listen("onDidChangeProfiles")(a=>{const r=a.added.map(o=>(0,b.reviveProfile)(o,this.profilesHome.scheme)),i=a.removed.map(o=>(0,b.reviveProfile)(o,this.profilesHome.scheme)),s=a.updated.map(o=>(0,b.reviveProfile)(o,this.profilesHome.scheme));this._profiles=a.all.map(o=>(0,b.reviveProfile)(o,this.profilesHome.scheme)),this._onDidChangeProfiles.fire({added:r,removed:i,updated:s,all:this.profiles})})),this.onDidResetWorkspaces=this.channel.listen("onDidResetWorkspaces")}setEnablement(m){this.enabled=m}isEnabled(){return this.enabled}async createNamedProfile(m,S,h){const a=await this.channel.call("createNamedProfile",[m,S,h]);return(0,b.reviveProfile)(a,this.profilesHome.scheme)}async createProfile(m,S,h,a){const r=await this.channel.call("createProfile",[m,S,h,a]);return(0,b.reviveProfile)(r,this.profilesHome.scheme)}async createTransientProfile(m){const S=await this.channel.call("createTransientProfile",[m]);return(0,b.reviveProfile)(S,this.profilesHome.scheme)}async setProfileForWorkspace(m,S){await this.channel.call("setProfileForWorkspace",[m,S])}removeProfile(m){return this.channel.call("removeProfile",[m])}async updateProfile(m,S){const h=await this.channel.call("updateProfile",[m,S]);return(0,b.reviveProfile)(h,this.profilesHome.scheme)}resetWorkspaces(){return this.channel.call("resetWorkspaces")}cleanUp(){return this.channel.call("cleanUp")}cleanUpTransientProfiles(){return this.channel.call("cleanUpTransientProfiles")}}e.UserDataProfilesService=f}),define(Q[603],Y([1,0,4,836,5,24,6,1183,116]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteUserDataProfileStorageService=e.AbstractUserDataProfileStorageService=e.IUserDataProfileStorageService=void 0,e.IUserDataProfileStorageService=(0,b.createDecorator)("IUserDataProfileStorageService");let m=class extends t.Disposable{constructor(r){super(),this.storageService=r}async readStorageData(r){return this.withProfileScopedStorageService(r,async i=>this.getItems(i))}async updateStorageData(r,i,s){return this.withProfileScopedStorageService(r,async o=>this.writeItems(o,i,s))}async withProfileScopedStorageService(r,i){if(this.storageService.hasScope(r))return i(this.storageService);const s=await this.createStorageDatabase(r),o=new h(s);try{await o.initialize();const u=await i(o);return await o.flush(),u}finally{o.dispose(),await this.closeAndDispose(s)}}getItems(r){const i=new Map,s=o=>{for(const u of r.keys(0,o))i.set(u,{value:r.get(u,0),target:o})};return s(0),s(1),i}writeItems(r,i,s){r.storeAll(Array.from(i.entries()).map(([o,u])=>({key:o,value:u,scope:0,target:s})),!0)}async closeAndDispose(r){try{await r.close()}finally{(0,t.isDisposable)(r)&&r.dispose()}}};e.AbstractUserDataProfileStorageService=m,e.AbstractUserDataProfileStorageService=m=fe([O(0,D.IStorageService)],m);class S extends m{constructor(r,i,s,o){super(s),this.remoteService=r;const u=r.getChannel("profileStorageListener"),d=this._register(new t.MutableDisposable);this._onDidChange=this._register(new T.Emitter({onWillAddFirstListener:()=>{d.value=u.listen("onDidChange")(p=>{o.trace("profile storage changes",p),this._onDidChange.fire({targetChanges:p.targetChanges.map(c=>(0,v.reviveProfile)(c,i.profilesHome.scheme)),valueChanges:p.valueChanges.map(c=>({...c,profile:(0,v.reviveProfile)(c.profile,i.profilesHome.scheme)}))})})},onDidRemoveLastListener:()=>d.value=void 0})),this.onDidChange=this._onDidChange.event}async createStorageDatabase(r){const i=this.remoteService.getChannel("storage");return(0,D.isProfileUsingDefaultStorage)(r)?new f.ApplicationStorageDatabaseClient(i):new f.ProfileStorageDatabaseClient(i,r)}}e.RemoteUserDataProfileStorageService=S;class h extends D.AbstractStorageService{constructor(r){super({flushInterval:100}),this.profileStorage=this._register(new y.Storage(r))}doInitialize(){return this.profileStorage.init()}getStorage(r){return r===0?this.profileStorage:void 0}getLogDetails(){}async switchToProfile(){}async switchToWorkspace(){}hasScope(){return!1}}}),define(Q[3454],Y([1,0,603,35,24,11,116,327]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeUserDataProfileStorageService=void 0;let v=class extends t.RemoteUserDataProfileStorageService{constructor(S,h,a,r){super(S,h,a,r)}};e.NativeUserDataProfileStorageService=v,e.NativeUserDataProfileStorageService=v=fe([O(0,f.IMainProcessService),O(1,T.IUserDataProfilesService),O(2,b.IStorageService),O(3,D.ILogService)],v),(0,y.registerSingleton)(t.IUserDataProfileStorageService,v,1)}),define(Q[902],Y([1,0,20,14,62,31,6,161,4,33,17,2493,9,91,25,11,500,24,30,64,120,116]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractInitializer=e.AbstractJsonFileSynchroniser=e.AbstractFileSynchroniser=e.AbstractSynchroniser=e.getSyncResourceLogLabel=e.isSyncData=e.isRemoteUserData=void 0;function n(A){return!!(A&&A.ref!==void 0&&typeof A.ref=="string"&&A.ref!==""&&A.syncData!==void 0&&(A.syncData===null||g(A.syncData)))}e.isRemoteUserData=n;function g(A){return!!(A&&A.version!==void 0&&typeof A.version=="number"&&A.content!==void 0&&typeof A.content=="string"&&(Object.keys(A).length===2||Object.keys(A).length===3&&A.machineId!==void 0&&typeof A.machineId=="string"))}e.isSyncData=g;function w(A,k){return`${(0,m.uppercaseFirstLetter)(A)}${k.isDefault?"":` (${k.name})`}`}e.getSyncResourceLogLabel=w;let E=class extends v.Disposable{get status(){return this._status}get conflicts(){return{...this.syncResource,conflicts:this._conflicts}}constructor(k,L,R,M,N,P,x,F,V,W,z,B){super(),this.syncResource=k,this.collection=L,this.fileService=R,this.environmentService=M,this.storageService=N,this.userDataSyncStoreService=P,this.userDataSyncBackupStoreService=x,this.userDataSyncEnablementService=F,this.telemetryService=V,this.logService=W,this.configurationService=z,this.syncPreviewPromise=null,this._status="idle",this._onDidChangStatus=this._register(new T.Emitter),this.onDidChangeStatus=this._onDidChangStatus.event,this._conflicts=[],this._onDidChangeConflicts=this._register(new T.Emitter),this.onDidChangeConflicts=this._onDidChangeConflicts.event,this.localChangeTriggerThrottler=new y.ThrottledDelayer(50),this._onDidChangeLocal=this._register(new T.Emitter),this.onDidChangeLocal=this._onDidChangeLocal.event,this.lastSyncUserDataStateKey=`${this.collection?`${this.collection}.`:""}${this.syncResource.syncResource}.lastSyncUserData`,this.hasSyncResourceStateVersionChanged=!1,this.syncHeaders={},this.resource=this.syncResource.syncResource,this.syncResourceLogLabel=w(k.syncResource,k.profile),this.extUri=B.extUri,this.syncFolder=this.extUri.joinPath(M.userDataSyncHome,...(0,c.getPathSegments)(k.profile.isDefault?void 0:k.profile.id,k.syncResource)),this.syncPreviewFolder=this.extUri.joinPath(this.syncFolder,c.PREVIEW_DIR_NAME),this.lastSyncResource=(0,c.getLastSyncResourceUri)(k.profile.isDefault?void 0:k.profile.id,k.syncResource,M,this.extUri),this.currentMachineIdPromise=(0,o.getServiceMachineId)(M,R,N)}triggerLocalChange(){this.localChangeTriggerThrottler.trigger(()=>this.doTriggerLocalChange())}async doTriggerLocalChange(){if(this.status==="hasConflicts"){this.logService.info(`${this.syncResourceLogLabel}: In conflicts state and local change detected. Syncing again...`);const k=await this.syncPreviewPromise;this.syncPreviewPromise=null;const L=await this.performSync(k.remoteUserData,k.lastSyncUserData,!0,this.getUserDataSyncConfiguration());this.setStatus(L)}else{this.logService.trace(`${this.syncResourceLogLabel}: Checking for local changes...`);const k=await this.getLastSyncUserData();(k?await this.hasRemoteChanged(k):!0)&&this._onDidChangeLocal.fire()}}setStatus(k){this._status!==k&&(this._status=k,this._onDidChangStatus.fire(k))}async sync(k,L={}){await this._sync(k,!0,this.getUserDataSyncConfiguration(),L)}async preview(k,L,R={}){return this._sync(k,!1,L,R)}async apply(k,L={}){try{this.syncHeaders={...L};const R=await this.doApply(k);return this.setStatus(R),this.syncPreviewPromise}finally{this.syncHeaders={}}}async _sync(k,L,R,M){try{if(this.syncHeaders={...M},this.status==="hasConflicts")return this.logService.info(`${this.syncResourceLogLabel}: Skipped synchronizing ${this.resource.toLowerCase()} as there are conflicts.`),this.syncPreviewPromise;if(this.status==="syncing")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 P=await this.getLastSyncUserData(),x=await this.getLatestRemoteUserData(k,P);return N=await this.performSync(x,P,L,R),N==="hasConflicts"?this.logService.info(`${this.syncResourceLogLabel}: Detected conflicts while synchronizing ${this.resource.toLowerCase()}.`):N==="idle"&&this.logService.trace(`${this.syncResourceLogLabel}: Finished synchronizing ${this.resource.toLowerCase()}.`),this.syncPreviewPromise||null}finally{this.setStatus(N)}}finally{this.syncHeaders={}}}async replace(k){const L=this.parseSyncData(k);if(!L)return!1;await this.stop();try{this.logService.trace(`${this.syncResourceLogLabel}: Started resetting ${this.resource.toLowerCase()}...`),this.setStatus("syncing");const R=await this.getLastSyncUserData(),M=await this.getLatestRemoteUserData(null,R),N=await this.isRemoteDataFromCurrentMachine(M),P=await this.generateSyncPreview({ref:M.ref,syncData:L},R,N,this.getUserDataSyncConfiguration(),D.CancellationToken.None),x=[];for(const F of P){const V=await this.getAcceptResult(F,F.remoteResource,void 0,D.CancellationToken.None),{remoteChange:W}=await this.getAcceptResult(F,F.previewResource,F.remoteContent,D.CancellationToken.None);x.push([F,{...V,remoteChange:W!==0?W:2}])}await this.applyResult(M,R,x,!1),this.logService.info(`${this.syncResourceLogLabel}: Finished resetting ${this.resource.toLowerCase()}.`)}finally{this.setStatus("idle")}return!0}async isRemoteDataFromCurrentMachine(k){const L=await this.currentMachineIdPromise;return!!k.syncData?.machineId&&k.syncData.machineId===L}async getLatestRemoteUserData(k,L){if(L){const R=k?k[this.resource]:void 0;if(L.ref===R||R===void 0&&L.syncData===null)return L}return this.getRemoteUserData(L)}async performSync(k,L,R,M){if(k.syncData&&k.syncData.version>this.version)throw this.telemetryService.publicLog2("sync/incompatible",{source:this.resource}),new c.UserDataSyncError((0,h.localize)(0,null,this.resource,this.version,k.syncData.version),"IncompatibleLocalContent",this.resource);try{return await this.doSync(k,L,R,M)}catch(N){if(N instanceof c.UserDataSyncError)switch(N.code){case"LocalPreconditionFailed":return this.logService.info(`${this.syncResourceLogLabel}: Failed to synchronize ${this.syncResourceLogLabel} as there is a new local version available. Synchronizing again...`),this.performSync(k,L,R,M);case"Conflict":case"PreconditionFailed":return this.logService.info(`${this.syncResourceLogLabel}: Failed to synchronize as there is a new remote version available. Synchronizing again...`),k=await this.getRemoteUserData(null),L=await this.getLastSyncUserData(),this.performSync(k,L,R,M)}throw N}}async doSync(k,L,R,M){try{const N=await this.isRemoteDataFromCurrentMachine(k),P=!N&&L===null&&this.getStoredLastSyncUserDataStateContent()!==void 0,x=R&&!P;this.syncPreviewPromise||(this.syncPreviewPromise=(0,y.createCancelablePromise)(V=>this.doGenerateSyncResourcePreview(k,L,N,x,M,V)));let F=await this.syncPreviewPromise;if(R&&P){this.logService.info(`${this.syncResourceLogLabel}: Accepting remote because it was synced before and the last sync data is not available.`);for(const V of F.resourcePreviews)F=await this.accept(V.remoteResource)||F}return this.updateConflicts(F.resourcePreviews),F.resourcePreviews.some(({mergeState:V})=>V==="conflict")?"hasConflicts":R?await this.doApply(!1):"syncing"}catch(N){throw this.syncPreviewPromise=null,N}}async merge(k){return await this.updateSyncResourcePreview(k,async L=>{const R=await this.getMergeResult(L,D.CancellationToken.None);await this.fileService.writeFile(L.previewResource,b.VSBuffer.fromString(R?.content||""));const M=R&&!R.hasConflicts?await this.getAcceptResult(L,L.previewResource,void 0,D.CancellationToken.None):void 0;return L.acceptResult=M,L.mergeState=R.hasConflicts?"conflict":M?"accepted":"preview",L.localChange=M?M.localChange:R.localChange,L.remoteChange=M?M.remoteChange:R.remoteChange,L}),this.syncPreviewPromise}async accept(k,L){return await this.updateSyncResourcePreview(k,async R=>{const M=await this.getAcceptResult(R,k,L,D.CancellationToken.None);return R.acceptResult=M,R.mergeState="accepted",R.localChange=M.localChange,R.remoteChange=M.remoteChange,R}),this.syncPreviewPromise}async discard(k){return await this.updateSyncResourcePreview(k,async L=>{const R=await this.getMergeResult(L,D.CancellationToken.None);return await this.fileService.writeFile(L.previewResource,b.VSBuffer.fromString(R.content||"")),L.acceptResult=void 0,L.mergeState="preview",L.localChange=R.localChange,L.remoteChange=R.remoteChange,L}),this.syncPreviewPromise}async updateSyncResourcePreview(k,L){if(!this.syncPreviewPromise)return;let R=await this.syncPreviewPromise;const M=R.resourcePreviews.findIndex(({localResource:N,remoteResource:P,previewResource:x})=>this.extUri.isEqual(N,k)||this.extUri.isEqual(P,k)||this.extUri.isEqual(x,k));M!==-1&&(this.syncPreviewPromise=(0,y.createCancelablePromise)(async N=>{const P=[...R.resourcePreviews];return P[M]=await L(P[M]),{...R,resourcePreviews:P}}),R=await this.syncPreviewPromise,this.updateConflicts(R.resourcePreviews),R.resourcePreviews.some(({mergeState:N})=>N==="conflict")?this.setStatus("hasConflicts"):this.setStatus("syncing"))}async doApply(k){if(!this.syncPreviewPromise)return"idle";const L=await this.syncPreviewPromise;return L.resourcePreviews.some(({mergeState:R})=>R==="conflict")?"hasConflicts":L.resourcePreviews.some(({mergeState:R})=>R!=="accepted")?"syncing":(await this.applyResult(L.remoteUserData,L.lastSyncUserData,L.resourcePreviews.map(R=>[R,R.acceptResult]),k),this.syncPreviewPromise=null,await this.clearPreviewFolder(),"idle")}async clearPreviewFolder(){try{await this.fileService.del(this.syncPreviewFolder,{recursive:!0})}catch{}}updateConflicts(k){const L=k.filter(({mergeState:R})=>R==="conflict");(0,t.equals)(this._conflicts,L,(R,M)=>this.extUri.isEqual(R.previewResource,M.previewResource))||(this._conflicts=L,this._onDidChangeConflicts.fire(this.conflicts))}async hasPreviouslySynced(){const k=await this.getLastSyncUserData();return!!k&&k.syncData!==null}async resolvePreviewContent(k){const L=this.syncPreviewPromise?await this.syncPreviewPromise:null;if(L)for(const R of L.resourcePreviews){if(this.extUri.isEqual(R.acceptedResource,k))return R.acceptResult?R.acceptResult.content:null;if(this.extUri.isEqual(R.remoteResource,k))return R.remoteContent;if(this.extUri.isEqual(R.localResource,k))return R.localContent;if(this.extUri.isEqual(R.baseResource,k))return R.baseContent}return null}async resetLocal(){this.storageService.remove(this.lastSyncUserDataStateKey,-1);try{await this.fileService.del(this.lastSyncResource)}catch(k){(0,i.toFileOperationResult)(k)!==1&&this.logService.error(k)}}async doGenerateSyncResourcePreview(k,L,R,M,N,P){const x=await this.generateSyncPreview(k,L,R,N,P),F=[];for(const V of x){const W=V.previewResource.with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"accepted"});if(V.localChange===0&&V.remoteChange===0)F.push({...V,acceptedResource:W,acceptResult:{content:null,localChange:0,remoteChange:0},mergeState:"accepted"});else{const z=M?await this.getMergeResult(V,P):void 0;if(P.isCancellationRequested)break;await this.fileService.writeFile(V.previewResource,b.VSBuffer.fromString(z?.content||""));const B=z&&!z.hasConflicts?await this.getAcceptResult(V,V.previewResource,void 0,P):void 0;F.push({...V,acceptResult:B,mergeState:z?.hasConflicts?"conflict":B?"accepted":"preview",localChange:B?B.localChange:z?z.localChange:V.localChange,remoteChange:B?B.remoteChange:z?z.remoteChange:V.remoteChange})}}return{syncResource:this.resource,profile:this.syncResource.profile,remoteUserData:k,lastSyncUserData:L,resourcePreviews:F,isLastSyncFromCurrentMachine:R}}async getLastSyncUserData(){let k=this.getStoredLastSyncUserDataStateContent();if(k||(k=await this.migrateLastSyncUserData()),!k)return this.logService.info(`${this.syncResourceLogLabel}: Last sync data state does not exist.`),null;const L=JSON.parse(k),R=this.userDataSyncEnablementService.getResourceSyncStateVersion(this.resource);if(this.hasSyncResourceStateVersionChanged=!!L.version&&!!R&&L.version!==R,this.hasSyncResourceStateVersionChanged)return this.logService.info(`${this.syncResourceLogLabel}: Reset last sync state because last sync state version ${L.version} is not compatible with current sync state version ${R}.`),await this.resetLocal(),null;let M,N=1;for(;M===void 0&&N++<6;)try{const P=await this.readLastSyncStoredRemoteUserData();P&&(P.ref===L.ref?M=P.syncData:this.logService.info(`${this.syncResourceLogLabel}: Last sync data stored locally is not same as the last sync state.`));break}catch(P){if(P instanceof i.FileOperationError&&P.fileOperationResult===1){this.logService.info(`${this.syncResourceLogLabel}: Last sync resource does not exist locally.`);break}else{if(P instanceof c.UserDataSyncError)throw P;this.logService.error(P,N)}}if(M===void 0)try{const P=await this.userDataSyncStoreService.resolveResourceContent(this.resource,L.ref,this.collection,this.syncHeaders);M=P===null?null:this.parseSyncData(P),await this.writeLastSyncStoredRemoteUserData({ref:L.ref,syncData:M})}catch(P){if(P instanceof c.UserDataSyncError&&P.code==="NotFound")this.logService.info(`${this.syncResourceLogLabel}: Last sync resource does not exist remotely.`);else throw P}return M===void 0?null:{...L,syncData:M}}async updateLastSyncUserData(k,L={}){if(L.ref||L.version)throw new Error("Cannot have core properties as additional");const R=this.userDataSyncEnablementService.getResourceSyncStateVersion(this.resource),M={ref:k.ref,version:R,...L};this.storageService.store(this.lastSyncUserDataStateKey,JSON.stringify(M),-1,1),await this.writeLastSyncStoredRemoteUserData(k)}getStoredLastSyncUserDataStateContent(){return this.storageService.get(this.lastSyncUserDataStateKey,-1)}async readLastSyncStoredRemoteUserData(){const k=(await this.fileService.readFile(this.lastSyncResource)).value.toString();try{const L=k?JSON.parse(k):void 0;if(n(L))return L}catch(L){this.logService.error(L)}}async writeLastSyncStoredRemoteUserData(k){await this.fileService.writeFile(this.lastSyncResource,b.VSBuffer.fromString(JSON.stringify(k)))}async migrateLastSyncUserData(){try{const k=await this.fileService.readFile(this.lastSyncResource),L=JSON.parse(k.value.toString());await this.fileService.del(this.lastSyncResource),L.ref&&L.content!==void 0?(this.storageService.store(this.lastSyncUserDataStateKey,JSON.stringify({...L,content:void 0}),-1,1),await this.writeLastSyncStoredRemoteUserData({ref:L.ref,syncData:L.content===null?null:JSON.parse(L.content)})):this.logService.info(`${this.syncResourceLogLabel}: Migrating last sync user data. Invalid data.`,L)}catch(k){k instanceof i.FileOperationError&&k.fileOperationResult===1?this.logService.info(`${this.syncResourceLogLabel}: Migrating last sync user data. Resource does not exist.`):this.logService.error(k)}return this.storageService.get(this.lastSyncUserDataStateKey,-1)}async getRemoteUserData(k){const{ref:L,content:R}=await this.getUserData(k);let M=null;return R!==null&&(M=this.parseSyncData(R)),{ref:L,syncData:M}}parseSyncData(k){try{const L=JSON.parse(k);if(g(L))return L}catch(L){this.logService.error(L)}throw new c.UserDataSyncError((0,h.localize)(1,null),"IncompatibleRemoteContent",this.resource)}async getUserData(k){const L=k?{ref:k.ref,content:k.syncData?JSON.stringify(k.syncData):null}:null;return this.userDataSyncStoreService.readResource(this.resource,L,this.collection,this.syncHeaders)}async updateRemoteUserData(k,L){const R=await this.currentMachineIdPromise,M={version:this.version,machineId:R,content:k};try{return L=await this.userDataSyncStoreService.writeResource(this.resource,JSON.stringify(M),L,this.collection,this.syncHeaders),{ref:L,syncData:M}}catch(N){throw N instanceof c.UserDataSyncError&&N.code==="TooLarge"&&(N=new c.UserDataSyncError(N.message,N.code,this.resource)),N}}async backupLocal(k){const L={version:this.version,content:k};return this.userDataSyncBackupStoreService.backup(this.syncResource.profile,this.resource,JSON.stringify(L))}async stop(){this.status!=="idle"&&(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()}.`))}getUserDataSyncConfiguration(){return this.configurationService.getValue(c.USER_DATA_SYNC_CONFIGURATION_SCOPE)}};e.AbstractSynchroniser=E,e.AbstractSynchroniser=E=fe([O(2,i.IFileService),O(3,r.IEnvironmentService),O(4,u.IStorageService),O(5,c.IUserDataSyncStoreService),O(6,c.IUserDataSyncBackupStoreService),O(7,c.IUserDataSyncEnablementService),O(8,d.ITelemetryService),O(9,c.IUserDataSyncLogService),O(10,a.IConfigurationService),O(11,p.IUriIdentityService)],E);let C=class extends E{constructor(k,L,R,M,N,P,x,F,V,W,z,B,K){super(L,R,M,N,P,x,F,V,W,z,B,K),this.file=k,this._register(this.fileService.watch(this.extUri.dirname(k))),this._register(this.fileService.onDidFilesChange(H=>this.onFileChanges(H)))}async getLocalFileContent(){try{return await this.fileService.readFile(this.file)}catch{return null}}async updateLocalFileContent(k,L,R){try{L?await this.fileService.writeFile(this.file,b.VSBuffer.fromString(k),R?void 0:L):await this.fileService.createFile(this.file,b.VSBuffer.fromString(k),{overwrite:R})}catch(M){throw M instanceof i.FileOperationError&&M.fileOperationResult===1||M instanceof i.FileOperationError&&M.fileOperationResult===3?new c.UserDataSyncError(M.message,"LocalPreconditionFailed"):M}}async deleteLocalFile(){try{await this.fileService.del(this.file)}catch(k){if(!(k instanceof i.FileOperationError&&k.fileOperationResult===1))throw k}}onFileChanges(k){k.contains(this.file)&&this.triggerLocalChange()}};e.AbstractFileSynchroniser=C,e.AbstractFileSynchroniser=C=fe([O(3,i.IFileService),O(4,r.IEnvironmentService),O(5,u.IStorageService),O(6,c.IUserDataSyncStoreService),O(7,c.IUserDataSyncBackupStoreService),O(8,c.IUserDataSyncEnablementService),O(9,d.ITelemetryService),O(10,c.IUserDataSyncLogService),O(11,a.IConfigurationService),O(12,p.IUriIdentityService)],C);let I=class extends C{constructor(k,L,R,M,N,P,x,F,V,W,z,B,K,H){super(k,L,R,M,N,P,x,F,V,W,z,K,H),this.userDataSyncUtilService=B,this._formattingOptions=void 0}hasErrors(k,L){const R=[],M=(0,f.parse)(k,R,{allowEmptyContent:!0,allowTrailingComma:!0});return R.length>0||!(0,S.isUndefined)(M)&&L!==Array.isArray(M)}getFormattingOptions(){return this._formattingOptions||(this._formattingOptions=this.userDataSyncUtilService.resolveFormattingOptions(this.file)),this._formattingOptions}};e.AbstractJsonFileSynchroniser=I,e.AbstractJsonFileSynchroniser=I=fe([O(3,i.IFileService),O(4,r.IEnvironmentService),O(5,u.IStorageService),O(6,c.IUserDataSyncStoreService),O(7,c.IUserDataSyncBackupStoreService),O(8,c.IUserDataSyncEnablementService),O(9,d.ITelemetryService),O(10,c.IUserDataSyncLogService),O(11,c.IUserDataSyncUtilService),O(12,a.IConfigurationService),O(13,p.IUriIdentityService)],I);let _=class{constructor(k,L,R,M,N,P,x){this.resource=k,this.userDataProfilesService=L,this.environmentService=R,this.logService=M,this.fileService=N,this.storageService=P,this.extUri=x.extUri,this.lastSyncResource=(0,c.getLastSyncResourceUri)(void 0,this.resource,R,this.extUri)}async initialize({ref:k,content:L}){if(!L){this.logService.info("Remote content does not exist.",this.resource);return}const R=this.parseSyncData(L);if(R)try{await this.doInitialize({ref:k,syncData:R})}catch(M){this.logService.error(M)}}parseSyncData(k){try{const L=JSON.parse(k);if(g(L))return L}catch(L){this.logService.error(L)}this.logService.info("Cannot parse sync data as it is not compatible with the current version.",this.resource)}async updateLastSyncUserData(k,L={}){if(L.ref||L.version)throw new Error("Cannot have core properties as additional");const R={ref:k.ref,version:void 0,...L};this.storageService.store(`${this.resource}.lastSyncUserData`,JSON.stringify(R),-1,1),await this.fileService.writeFile(this.lastSyncResource,b.VSBuffer.fromString(JSON.stringify(k)))}};e.AbstractInitializer=_,e.AbstractInitializer=_=fe([O(1,l.IUserDataProfilesService),O(2,r.IEnvironmentService),O(3,s.ILogService),O(4,i.IFileService),O(5,u.IStorageService),O(6,p.IUriIdentityService)],_)}),define(Q[3455],Y([1,0,14,31,15,6,433,4,33,9,91,716,95,115,519,112,25,5,134,11,24,30,64,116,902,3419,713,120,603]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractExtensionsInitializer=e.LocalExtensionsProvider=e.ExtensionsSynchroniser=e.stringify=e.parseExtensions=void 0;async function A(P,x){const F=JSON.parse(P.content);if(P.version===1||P.version===2){const V=(await x.getInstalled(0)).filter(W=>W.isBuiltin);for(const W of F)P.version===1&&(W.enabled===!1&&(W.disabled=!0),delete W.enabled),P.version===2&&V.every(z=>!(0,r.areSameExtensions)(z.identifier,W.identifier))&&(W.installed=!0)}return F}function k(P){return JSON.parse(P.content)}e.parseExtensions=k;function L(P,x){return P.sort((F,V)=>!F.identifier.uuid&&V.identifier.uuid?-1:F.identifier.uuid&&!V.identifier.uuid?1:(0,v.compare)(F.identifier.id,V.identifier.id)),x?(0,T.toFormattedString)(P,{}):JSON.stringify(P)}e.stringify=L;let R=class extends w.AbstractSynchroniser{constructor(x,F,V,W,z,B,K,H,U,G,$,ie,J,j,ee,X,te){super({syncResource:"extensions",profile:x},F,W,V,z,B,K,ie,J,G,$,ee),this.extensionManagementService=H,this.ignoredExtensionsManagementService=U,this.instantiationService=te,this.version=6,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"extensions.json"),this.baseResource=this.previewResource.with({scheme:I.USER_DATA_SYNC_SCHEME,authority:"base"}),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.localExtensionsProvider=this.instantiationService.createInstance(M),this._register(D.Event.any(D.Event.filter(this.extensionManagementService.onDidInstallExtensions,Z=>Z.some(({local:se})=>!!se)),D.Event.filter(this.extensionManagementService.onDidUninstallExtension,Z=>!Z.error),D.Event.filter(X.onDidChange,Z=>Z.valueChanges.some(({profile:se,changes:re})=>this.syncResource.profile.id===se.id&&re.some(oe=>oe.key===a.DISABLED_EXTENSIONS_STORAGE_PATH))),j.onDidChangeExtensionStorageToSync)(()=>this.triggerLocalChange()))}async generateSyncPreview(x,F){const V=x.syncData?await A(x.syncData,this.extensionManagementService):null,W=F?.skippedExtensions??[],z=F?.builtinExtensions??null,B=F?.syncData?await A(F.syncData,this.extensionManagementService):null,{localExtensions:K,ignoredExtensions:H}=await this.localExtensionsProvider.getLocalExtensions(this.syncResource.profile);V?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{local:U,remote:G}=(0,E.merge)(K,V,B,W,H,z),$={local:U,remote:G,content:this.getPreviewContent(K,U.added,U.updated,U.removed),localChange:U.added.length>0||U.removed.length>0||U.updated.length>0?2:0,remoteChange:G!==null?2:0},ie=this.stringify(K,!1);return[{skippedExtensions:W,builtinExtensions:z,baseResource:this.baseResource,baseContent:B?this.stringify(B,!1):ie,localResource:this.localResource,localContent:ie,localExtensions:K,remoteResource:this.remoteResource,remoteExtensions:V,remoteContent:V?this.stringify(V,!1):null,previewResource:this.previewResource,previewResult:$,localChange:$.localChange,remoteChange:$.remoteChange,acceptedResource:this.acceptedResource}]}async hasRemoteChanged(x){const F=x.syncData?await A(x.syncData,this.extensionManagementService):null,{localExtensions:V,ignoredExtensions:W}=await this.localExtensionsProvider.getLocalExtensions(this.syncResource.profile),{remote:z}=(0,E.merge)(V,F,F,x.skippedExtensions||[],W,x.builtinExtensions||[]);return z!==null}getPreviewContent(x,F,V,W){const z=[...F,...V],B=new Set,K=H=>{B.add(H.id.toLowerCase()),H.uuid&&B.add(H.uuid)};z.forEach(({identifier:H})=>K(H)),W.forEach(K);for(const H of x)B.has(H.identifier.id.toLowerCase())||H.identifier.uuid&&B.has(H.identifier.uuid)||z.push(H);return this.stringify(z,!1)}async getMergeResult(x,F){return{...x.previewResult,hasConflicts:!1}}async getAcceptResult(x,F,V,W){if(this.extUri.isEqual(F,this.localResource))return this.acceptLocal(x);if(this.extUri.isEqual(F,this.remoteResource))return this.acceptRemote(x);if(this.extUri.isEqual(F,this.previewResource))return x.previewResult;throw new Error(`Invalid Resource: ${F.toString()}`)}async acceptLocal(x){const F=await this.extensionManagementService.getInstalled(void 0,this.syncResource.profile.extensionsResource),V=this.ignoredExtensionsManagementService.getIgnoredExtensions(F),W=(0,E.merge)(x.localExtensions,null,null,x.skippedExtensions,V,x.builtinExtensions),{local:z,remote:B}=W;return{content:x.localContent,local:z,remote:B,localChange:z.added.length>0||z.removed.length>0||z.updated.length>0?2:0,remoteChange:B!==null?2:0}}async acceptRemote(x){const F=await this.extensionManagementService.getInstalled(void 0,this.syncResource.profile.extensionsResource),V=this.ignoredExtensionsManagementService.getIgnoredExtensions(F),W=x.remoteContent?JSON.parse(x.remoteContent):null;if(W!==null){const z=(0,E.merge)(x.localExtensions,W,x.localExtensions,[],V,x.builtinExtensions),{local:B,remote:K}=z;return{content:x.remoteContent,local:B,remote:K,localChange:B.added.length>0||B.removed.length>0||B.updated.length>0?2:0,remoteChange:K!==null?2:0}}else return{content:x.remoteContent,local:{added:[],removed:[],updated:[]},remote:null,localChange:0,remoteChange:0}}async applyResult(x,F,V,W){let{skippedExtensions:z,builtinExtensions:B,localExtensions:K}=V[0][0];const{local:H,remote:U,localChange:G,remoteChange:$}=V[0][1];if(G===0&&$===0&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing extensions.`),G!==0&&(await this.backupLocal(JSON.stringify(K)),z=await this.localExtensionsProvider.updateLocalExtensions(H.added,H.removed,H.updated,z,this.syncResource.profile)),U){this.logService.trace(`${this.syncResourceLogLabel}: Updating remote extensions...`);const ie=JSON.stringify(U.all);x=await this.updateRemoteUserData(ie,W?null:x.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote extensions.${U.added.length?` Added: ${JSON.stringify(U.added.map(J=>J.identifier.id))}.`:""}${U.updated.length?` Updated: ${JSON.stringify(U.updated.map(J=>J.identifier.id))}.`:""}${U.removed.length?` Removed: ${JSON.stringify(U.removed.map(J=>J.identifier.id))}.`:""}`)}F?.ref!==x.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized extensions...`),B=this.computeBuiltinExtensions(K,B),await this.updateLastSyncUserData(x,{skippedExtensions:z,builtinExtensions:B}),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized extensions.${z.length?` Skipped: ${JSON.stringify(z.map(ie=>ie.identifier.id))}.`:""}`))}computeBuiltinExtensions(x,F){const V=new Set,W=[];for(const z of x)V.add(z.identifier.id.toLowerCase()),z.installed||W.push(z.identifier);if(F)for(const z of F)V.has(z.id.toLowerCase())||W.push(z);return W}async resolveContent(x){if(this.extUri.isEqual(this.remoteResource,x)||this.extUri.isEqual(this.baseResource,x)||this.extUri.isEqual(this.localResource,x)||this.extUri.isEqual(this.acceptedResource,x)){const F=await this.resolvePreviewContent(x);return F&&this.stringify(JSON.parse(F),!0)}return null}stringify(x,F){return L(x,F)}async hasLocalData(){try{const{localExtensions:x}=await this.localExtensionsProvider.getLocalExtensions(this.syncResource.profile);if(x.some(F=>F.installed||F.disabled))return!0}catch{}return!1}};e.ExtensionsSynchroniser=R,e.ExtensionsSynchroniser=R=fe([O(2,S.IEnvironmentService),O(3,o.IFileService),O(4,c.IStorageService),O(5,I.IUserDataSyncStoreService),O(6,I.IUserDataSyncBackupStoreService),O(7,a.IExtensionManagementService),O(8,C.IIgnoredExtensionsManagementService),O(9,I.IUserDataSyncLogService),O(10,m.IConfigurationService),O(11,I.IUserDataSyncEnablementService),O(12,l.ITelemetryService),O(13,i.IExtensionStorageService),O(14,n.IUriIdentityService),O(15,_.IUserDataProfileStorageService),O(16,u.IInstantiationService)],R);let M=class{constructor(x,F,V,W,z,B){this.extensionManagementService=x,this.userDataProfileStorageService=F,this.extensionGalleryService=V,this.ignoredExtensionsManagementService=W,this.instantiationService=z,this.logService=B}async getLocalExtensions(x){const F=await this.extensionManagementService.getInstalled(void 0,x.extensionsResource),V=this.ignoredExtensionsManagementService.getIgnoredExtensions(F);return{localExtensions:await this.withProfileScopedServices(x,async(z,B)=>{const K=z.getDisabledExtensions();return F.map(H=>{const{identifier:U,isBuiltin:G,manifest:$,preRelease:ie,pinned:J,isApplicationScoped:j}=H,ee={identifier:U,preRelease:ie,version:$.version,pinned:!!J};j&&!(0,s.isApplicationScopedExtension)($)&&(ee.isApplicationScoped=j),K.some(X=>(0,r.areSameExtensions)(X,U))&&(ee.disabled=!0),G||(ee.installed=!0);try{const X=B.getKeysForSync({id:U.id,version:$.version});if(X){const te=B.getExtensionState(H,!0)||{};ee.state=Object.keys(te).reduce((Z,se)=>(X.includes(se)&&(Z[se]=te[se]),Z),{})}}catch(X){this.logService.info(`${(0,w.getSyncResourceLogLabel)("extensions",x)}: Error while parsing extension state`,(0,b.getErrorMessage)(X))}return ee})}),ignoredExtensions:V}}async updateLocalExtensions(x,F,V,W,z){const B=(0,w.getSyncResourceLogLabel)("extensions",z),K=[],H=new Map,U=[],G=[],$=await this.extensionManagementService.getInstalled(void 0,z.extensionsResource);if((x.length||V.length)&&await this.withProfileScopedServices(z,async(j,ee)=>{await t.Promises.settled([...x,...V].map(async X=>{const te=$.find(re=>(0,r.areSameExtensions)(re.identifier,X.identifier));if(te&&te.isBuiltin){X.state&&te.manifest.version===X.version&&this.updateExtensionState(X.state,te,te.manifest.version,ee),j.getDisabledExtensions().some(oe=>(0,r.areSameExtensions)(oe,X.identifier))!==!!X.disabled&&(X.disabled?(this.logService.trace(`${B}: Disabling extension...`,X.identifier.id),await j.disableExtension(X.identifier),this.logService.info(`${B}: Disabled extension`,X.identifier.id)):(this.logService.trace(`${B}: Enabling extension...`,X.identifier.id),await j.enableExtension(X.identifier),this.logService.info(`${B}: Enabled extension`,X.identifier.id))),U.push(X.identifier);return}const Z=X.pinned?X.version:void 0,se=(await this.extensionGalleryService.getExtensions([{...X.identifier,version:Z,preRelease:Z?void 0:X.preRelease}],y.CancellationToken.None))[0];if(X.state&&(te?te.manifest.version===X.version:se)&&this.updateExtensionState(X.state,te||se,te?.manifest.version,ee),se)try{j.getDisabledExtensions().some(oe=>(0,r.areSameExtensions)(oe,X.identifier))!==!!X.disabled&&(X.disabled?(this.logService.trace(`${B}: Disabling extension...`,X.identifier.id,se.version),await j.disableExtension(se.identifier),this.logService.info(`${B}: Disabled extension`,X.identifier.id,se.version)):(this.logService.trace(`${B}: Enabling extension...`,X.identifier.id,se.version),await j.enableExtension(se.identifier),this.logService.info(`${B}: Enabled extension`,X.identifier.id,se.version))),(!te||te.preRelease!==X.preRelease||te.pinned!==X.pinned||Z&&te.manifest.version!==Z)&&(await this.extensionManagementService.canInstall(se)?(K.push({extension:se,options:{isMachineScoped:!1,donotIncludePackAndDependencies:!0,installGivenVersion:X.pinned&&!!X.version,installPreReleaseVersion:X.preRelease,profileLocation:z.extensionsResource,isApplicationScoped:X.isApplicationScoped,context:{[a.EXTENSION_INSTALL_SKIP_WALKTHROUGH_CONTEXT]:!0,[a.EXTENSION_INSTALL_SYNC_CONTEXT]:!0}}}),H.set(se.identifier.id.toLowerCase(),X)):(this.logService.info(`${B}: Skipped synchronizing extension because it cannot be installed.`,se.displayName||se.identifier.id),G.push(X)))}catch(re){G.push(X),this.logService.error(re),this.logService.info(`${B}: Skipped synchronizing extension`,se.displayName||se.identifier.id)}else G.push(X),this.logService.info(`${B}: Skipped synchronizing extension because the extension is not found.`,X.identifier.id)}))}),F.length){const j=$.filter(({identifier:ee,isBuiltin:X})=>!X&&F.some(te=>(0,r.areSameExtensions)(ee,te)));await t.Promises.settled(j.map(async ee=>{this.logService.trace(`${B}: Uninstalling local extension...`,ee.identifier.id),await this.extensionManagementService.uninstall(ee,{donotIncludePack:!0,donotCheckDependents:!0,profileLocation:z.extensionsResource}),this.logService.info(`${B}: Uninstalled local extension.`,ee.identifier.id),U.push(ee.identifier)}))}const ie=await this.extensionManagementService.installGalleryExtensions(K);for(const{identifier:j,local:ee,error:X,source:te}of ie){const Z=te;if(ee)this.logService.info(`${B}: Installed extension.`,j.id,Z.version),U.push(j);else{const se=H.get(j.id.toLowerCase());se&&(G.push(se),this.logService.info(`${B}: Skipped synchronizing extension`,Z.displayName||Z.identifier.id)),X instanceof a.ExtensionManagementError&&[a.ExtensionManagementErrorCode.Incompatible,a.ExtensionManagementErrorCode.IncompatibleTargetPlatform].includes(X.code)?this.logService.info(`${B}: Skipped synchronizing extension because the compatible extension is not found.`,Z.displayName||Z.identifier.id):X&&this.logService.error(X)}}const J=[];for(const j of W)U.some(ee=>(0,r.areSameExtensions)(ee,j.identifier))||J.push(j);for(const j of G)J.some(ee=>(0,r.areSameExtensions)(ee.identifier,j.identifier))||J.push(j);return J}updateExtensionState(x,F,V,W){const z=W.getExtensionState(F,!0)||{},B=V?W.getKeysForSync({id:F.identifier.id,version:V}):void 0;B?B.forEach(K=>{z[K]=x[K]}):Object.keys(x).forEach(K=>z[K]=x[K]),W.setExtensionState(F,z,!0)}async withProfileScopedServices(x,F){return this.userDataProfileStorageService.withProfileScopedStorageService(x,async V=>{const W=new f.DisposableStore,z=this.instantiationService.createChild(new d.ServiceCollection([c.IStorageService,V])),B=W.add(z.createInstance(h.GlobalExtensionEnablementService)),K=W.add(z.createInstance(i.ExtensionStorageService));try{return await F(B,K)}finally{W.dispose()}})}};e.LocalExtensionsProvider=M,e.LocalExtensionsProvider=M=fe([O(0,a.IExtensionManagementService),O(1,_.IUserDataProfileStorageService),O(2,a.IExtensionGalleryService),O(3,C.IIgnoredExtensionsManagementService),O(4,u.IInstantiationService),O(5,I.IUserDataSyncLogService)],M);let N=class extends w.AbstractInitializer{constructor(x,F,V,W,z,B,K,H){super("extensions",W,z,B,V,K,H),this.extensionManagementService=x,this.ignoredExtensionsManagementService=F}async parseExtensions(x){return x.syncData?await A(x.syncData,this.extensionManagementService):null}generatePreview(x,F){const V=[],W=[],z=[];for(const B of x){if(this.ignoredExtensionsManagementService.hasToNeverSyncExtension(B.identifier.id))continue;const K=F.find(H=>(0,r.areSameExtensions)(H.identifier,B.identifier));K?(V.push(K),B.disabled&&z.push(B.identifier)):B.installed&&(W.push({...B.identifier,preRelease:!!B.preRelease}),B.disabled&&z.push(B.identifier))}return{installedExtensions:V,newExtensions:W,disabledExtensions:z,remoteExtensions:x}}};e.AbstractExtensionsInitializer=N,e.AbstractExtensionsInitializer=N=fe([O(0,a.IExtensionManagementService),O(1,C.IIgnoredExtensionsManagementService),O(2,o.IFileService),O(3,g.IUserDataProfilesService),O(4,S.IEnvironmentService),O(5,p.ILogService),O(6,c.IStorageService),O(7,n.IUriIdentityService)],N)}),define(Q[3456],Y([1,0,62,15,6,161,433,18,59,9,91,25,11,500,24,30,64,902,1228,3420,120,116,603,5]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncStoreTypeSynchronizer=e.GlobalStateInitializer=e.LocalGlobalStateProvider=e.GlobalStateSynchroniser=e.stringify=void 0;const w="globalState.argv.",E=["locale"];function C(R,M){const N=R.storage?Object.keys(R.storage).sort():[],P={};return N.forEach(x=>P[x]=R.storage[x]),R.storage=P,M?(0,T.toFormattedString)(R,{}):JSON.stringify(R)}e.stringify=C;const I=1;let _=class extends u.AbstractSynchroniser{constructor(M,N,P,x,F,V,W,z,B,K,H,U,G,$){super({syncResource:"globalState",profile:M},N,x,z,U,F,V,B,K,W,H,G),this.userDataProfileStorageService=P,this.version=I,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"globalState.json"),this.baseResource=this.previewResource.with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"base"}),this.localResource=this.previewResource.with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"local"}),this.remoteResource=this.previewResource.with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"remote"}),this.acceptedResource=this.previewResource.with({scheme:c.USER_DATA_SYNC_SCHEME,authority:"accepted"}),this.localGlobalStateProvider=$.createInstance(A),this._register(x.watch(this.extUri.dirname(this.environmentService.argvResource))),this._register(b.Event.any(b.Event.filter(x.onDidFilesChange,ie=>ie.contains(this.environmentService.argvResource)),b.Event.filter(P.onDidChange,ie=>!!(ie.targetChanges.some(J=>this.syncResource.profile.id===J.id)||ie.valueChanges.some(({profile:J,changes:j})=>this.syncResource.profile.id===J.id&&j.some(ee=>ee.target===0)))))(()=>this.triggerLocalChange()))}async generateSyncPreview(M,N,P){const x=M.syncData?JSON.parse(M.syncData.content):null;N=N===null&&P?M:N;const F=N&&N.syncData?JSON.parse(N.syncData.content):null,V=await this.localGlobalStateProvider.getLocalGlobalState(this.syncResource.profile);x?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 W=await this.getStorageKeys(F),{local:z,remote:B}=(0,p.merge)(V.storage,x?x.storage:null,F?F.storage:null,W,this.logService),K={content:null,local:z,remote:B,localChange:Object.keys(z.added).length>0||Object.keys(z.updated).length>0||z.removed.length>0?2:0,remoteChange:B.all!==null?2:0},H=C(V,!1);return[{baseResource:this.baseResource,baseContent:F?C(F,!1):H,localResource:this.localResource,localContent:H,localUserData:V,remoteResource:this.remoteResource,remoteContent:x?C(x,!1):null,previewResource:this.previewResource,previewResult:K,localChange:K.localChange,remoteChange:K.remoteChange,acceptedResource:this.acceptedResource,storageKeys:W}]}async hasRemoteChanged(M){const N=M.syncData?JSON.parse(M.syncData.content):null;if(N===null)return!0;const P=await this.localGlobalStateProvider.getLocalGlobalState(this.syncResource.profile),x=await this.getStorageKeys(N),{remote:F}=(0,p.merge)(P.storage,N.storage,N.storage,x,this.logService);return F.all!==null}async getMergeResult(M,N){return{...M.previewResult,hasConflicts:!1}}async getAcceptResult(M,N,P,x){if(this.extUri.isEqual(N,this.localResource))return this.acceptLocal(M);if(this.extUri.isEqual(N,this.remoteResource))return this.acceptRemote(M);if(this.extUri.isEqual(N,this.previewResource))return M.previewResult;throw new Error(`Invalid Resource: ${N.toString()}`)}async acceptLocal(M){return{content:M.localContent,local:{added:{},removed:[],updated:{}},remote:{added:Object.keys(M.localUserData.storage),removed:[],updated:[],all:M.localUserData.storage},localChange:0,remoteChange:2}}async acceptRemote(M){if(M.remoteContent!==null){const N=JSON.parse(M.remoteContent),{local:P,remote:x}=(0,p.merge)(M.localUserData.storage,N.storage,null,M.storageKeys,this.logService);return{content:M.remoteContent,local:P,remote:x,localChange:Object.keys(P.added).length>0||Object.keys(P.updated).length>0||P.removed.length>0?2:0,remoteChange:x!==null?2:0}}else return{content:M.remoteContent,local:{added:{},removed:[],updated:{}},remote:{added:[],removed:[],updated:[],all:null},localChange:0,remoteChange:0}}async applyResult(M,N,P,x){const{localUserData:F}=P[0][0],{local:V,remote:W,localChange:z,remoteChange:B}=P[0][1];if(z===0&&B===0&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing ui state.`),z!==0&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating local ui state...`),await this.backupLocal(JSON.stringify(F)),await this.localGlobalStateProvider.writeLocalGlobalState(V,this.syncResource.profile),this.logService.info(`${this.syncResourceLogLabel}: Updated local ui state`)),B!==0){this.logService.trace(`${this.syncResourceLogLabel}: Updating remote ui state...`);const K=JSON.stringify({storage:W.all});M=await this.updateRemoteUserData(K,x?null:M.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote ui state.${W.added.length?` Added: ${W.added}.`:""}${W.updated.length?` Updated: ${W.updated}.`:""}${W.removed.length?` Removed: ${W.removed}.`:""}`)}N?.ref!==M.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized ui state...`),await this.updateLastSyncUserData(M),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized ui state`))}async resolveContent(M){if(this.extUri.isEqual(this.remoteResource,M)||this.extUri.isEqual(this.baseResource,M)||this.extUri.isEqual(this.localResource,M)||this.extUri.isEqual(this.acceptedResource,M)){const N=await this.resolvePreviewContent(M);return N&&C(JSON.parse(N),!0)}return null}async hasLocalData(){try{const{storage:M}=await this.localGlobalStateProvider.getLocalGlobalState(this.syncResource.profile);if(Object.keys(M).length>1||M[`${w}.locale`]?.value!=="en")return!0}catch{}return!1}async getStorageKeys(M){const N=await this.userDataProfileStorageService.readStorageData(this.syncResource.profile),P=[],x=[];for(const[W,z]of N)z.target===0?P.push(W):z.target===1&&x.push(W);const F=[...P,...x],V=M?.storage?Object.keys(M.storage).filter(W=>!W.startsWith(w)&&!F.includes(W)&&N.get(W)!==void 0):[];if(!f.isWeb){const W=[...c.ALL_SYNC_RESOURCES.map(z=>(0,c.getEnablementKey)(z)),c.SYNC_SERVICE_URL_TYPE];V.push(...W),x.push(...W)}return{user:P,machine:x,unregistered:V}}};e.GlobalStateSynchroniser=_,e.GlobalStateSynchroniser=_=fe([O(2,n.IUserDataProfileStorageService),O(3,h.IFileService),O(4,c.IUserDataSyncStoreService),O(5,c.IUserDataSyncBackupStoreService),O(6,c.IUserDataSyncLogService),O(7,S.IEnvironmentService),O(8,c.IUserDataSyncEnablementService),O(9,s.ITelemetryService),O(10,m.IConfigurationService),O(11,i.IStorageService),O(12,o.IUriIdentityService),O(13,g.IInstantiationService)],_);let A=class{constructor(M,N,P,x){this.fileService=M,this.environmentService=N,this.userDataProfileStorageService=P,this.logService=x}async getLocalGlobalState(M){const N={};if(M.isDefault){const x=await this.getLocalArgvContent(),F=(0,D.parse)(x);for(const V of E)F[V]!==void 0&&(N[`${w}${V}`]={version:1,value:F[V]})}const P=await this.userDataProfileStorageService.readStorageData(M);for(const[x,F]of P)F.value&&F.target===0&&(N[x]={version:1,value:F.value});return{storage:N}}async getLocalArgvContent(){try{this.logService.debug("GlobalStateSync#getLocalArgvContent",this.environmentService.argvResource);const M=await this.fileService.readFile(this.environmentService.argvResource);return this.logService.debug("GlobalStateSync#getLocalArgvContent - Resolved",this.environmentService.argvResource),M.value.toString()}catch(M){this.logService.debug((0,y.getErrorMessage)(M))}return"{}"}async writeLocalGlobalState({added:M,removed:N,updated:P},x){const F=(0,u.getSyncResourceLogLabel)("globalState",x),V={},W=new Map,z=await this.userDataProfileStorageService.readStorageData(x),B=(K,H)=>{for(const U of K){if(U.startsWith(w)){V[U.substring(w.length)]=H?H[U].value:void 0;continue}if(H){const G=H[U];G.value!==z.get(U)?.value&&W.set(U,G.value)}else z.get(U)!==void 0&&W.set(U,void 0)}};if(B(Object.keys(M),M),B(Object.keys(P),P),B(N),Object.keys(V).length){this.logService.trace(`${F}: Updating locale...`);const K=await this.getLocalArgvContent();let H=K;for(const U of Object.keys(V))H=(0,d.edit)(H,[U],V[U],{});K!==H&&(this.logService.trace(`${F}: Updating locale...`),await this.fileService.writeFile(this.environmentService.argvResource,t.VSBuffer.fromString(H)),this.logService.info(`${F}: Updated locale.`)),this.logService.info(`${F}: Updated locale`)}W.size&&(this.logService.trace(`${F}: Updating global state...`),await this.userDataProfileStorageService.updateStorageData(x,W,0),this.logService.info(`${F}: Updated global state`,[...W.keys()]))}};e.LocalGlobalStateProvider=A,e.LocalGlobalStateProvider=A=fe([O(0,h.IFileService),O(1,S.IEnvironmentService),O(2,n.IUserDataProfileStorageService),O(3,c.IUserDataSyncLogService)],A);let k=class extends u.AbstractInitializer{constructor(M,N,P,x,F,V){super("globalState",P,x,F,N,M,V)}async doInitialize(M){const N=M.syncData?JSON.parse(M.syncData.content):null;if(!N){this.logService.info("Skipping initializing global state because remote global state does not exist.");return}const P={},x={};for(const F of Object.keys(N.storage))F.startsWith(w)?P[F.substring(w.length)]=N.storage[F].value:this.storageService.get(F,0)===void 0&&(x[F]=N.storage[F].value);if(Object.keys(P).length){let F="{}";try{F=(await this.fileService.readFile(this.environmentService.argvResource)).value.toString()}catch{}for(const V of Object.keys(P))F=(0,d.edit)(F,[V],P[V],{});await this.fileService.writeFile(this.environmentService.argvResource,t.VSBuffer.fromString(F))}if(Object.keys(x).length){const F=[];for(const V of Object.keys(x))F.push({key:V,value:x[V],scope:0,target:0});this.storageService.storeAll(F,!0)}}};e.GlobalStateInitializer=k,e.GlobalStateInitializer=k=fe([O(0,i.IStorageService),O(1,h.IFileService),O(2,l.IUserDataProfilesService),O(3,S.IEnvironmentService),O(4,c.IUserDataSyncLogService),O(5,o.IUriIdentityService)],k);let L=class{constructor(M,N,P,x,F){this.userDataSyncStoreClient=M,this.storageService=N,this.environmentService=P,this.fileService=x,this.logService=F}getSyncStoreType(M){return this.parseGlobalState(M)?.storage[c.SYNC_SERVICE_URL_TYPE]?.value}async sync(M){const N=(0,c.createSyncHeaders)((0,v.generateUuid)());try{return await this.doSync(M,N)}catch(P){if(P instanceof c.UserDataSyncError)switch(P.code){case"PreconditionFailed":return this.logService.info("Failed to synchronize UserDataSyncStoreType as there is a new remote version available. Synchronizing again..."),this.doSync(M,N)}throw P}}async doSync(M,N){const P=await this.userDataSyncStoreClient.readResource("globalState",null,void 0,N),x=this.parseGlobalState(P)||{storage:{}};x.storage[c.SYNC_SERVICE_URL_TYPE]={value:M,version:I};const F=await(0,r.getServiceMachineId)(this.environmentService,this.fileService,this.storageService),V={version:I,machineId:F,content:C(x,!1)};await this.userDataSyncStoreClient.writeResource("globalState",JSON.stringify(V),P.ref,void 0,N)}parseGlobalState({content:M}){if(!M)return null;const N=JSON.parse(M);if((0,u.isSyncData)(N))return N?JSON.parse(N.content):null;throw new Error("Invalid remote data")}};e.UserDataSyncStoreTypeSynchronizer=L,e.UserDataSyncStoreTypeSynchronizer=L=fe([O(1,i.IStorageService),O(2,S.IEnvironmentService),O(3,h.IFileService),O(4,a.ILogService)],L)}),define(Q[3457],Y([1,0,6,4,18,91,24,30,120]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncEnablementService=void 0;const m="sync.enable";let S=class extends y.Disposable{constructor(a,r,i,s){super(),this.storageService=a,this.telemetryService=r,this.environmentService=i,this.userDataSyncStoreManagementService=s,this._onDidChangeEnablement=new t.Emitter,this.onDidChangeEnablement=this._onDidChangeEnablement.event,this._onDidChangeResourceEnablement=new t.Emitter,this.onDidChangeResourceEnablement=this._onDidChangeResourceEnablement.event,this._register(a.onDidChangeValue(-1,void 0,this._register(new y.DisposableStore))(o=>this.onDidStorageChange(o)))}isEnabled(){switch(this.environmentService.sync){case"on":return!0;case"off":return!1}}canToggleEnablement(){return this.userDataSyncStoreManagementService.userDataSyncStore!==void 0&&this.environmentService.sync===void 0}setEnablement(a){a&&!this.canToggleEnablement()||(this.telemetryService.publicLog2(m,{enabled:a}),this.storageService.store(m,a,-1,1))}isResourceEnabled(a){return this.storageService.getBoolean((0,v.getEnablementKey)(a),-1,!0)}setResourceEnablement(a,r){if(this.isResourceEnabled(a)!==r){const i=(0,v.getEnablementKey)(a);this.storeResourceEnablement(i,r)}}getResourceSyncStateVersion(a){}storeResourceEnablement(a,r){this.storageService.store(a,r,-1,b.isWeb?0:1)}onDidStorageChange(a){if(m===a.key){this._onDidChangeEnablement.fire(this.isEnabled());return}const r=v.ALL_SYNC_RESOURCES.filter(i=>(0,v.getEnablementKey)(i)===a.key)[0];if(r){this._onDidChangeResourceEnablement.fire([r,this.isResourceEnabled(r)]);return}}};e.UserDataSyncEnablementService=S,e.UserDataSyncEnablementService=S=fe([O(0,T.IStorageService),O(1,f.ITelemetryService),O(2,D.IEnvironmentService),O(3,v.IUserDataSyncStoreManagementService)],S)}),define(Q[903],Y([1,0,6,4,18,33,2496,91,25,5,52,500,24,120]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncMachinesService=e.isWebPlatform=e.IUserDataSyncMachinesService=void 0,e.IUserDataSyncMachinesService=(0,m.createDecorator)("IUserDataSyncMachinesService");const s="sync.currentMachineName",o="Safari",u="Chrome",d="Edge",p="Firefox",c="Android";function l(w){switch(w){case o:case u:case d:case p:case c:case(0,b.PlatformToString)(0):return!0}return!1}e.isWebPlatform=l;function n(){return b.isSafari?o:b.isChrome?u:b.isEdge?d:b.isFirefox?p:b.isAndroid?c:(0,b.PlatformToString)(b.isWeb?0:b.platform)}let g=class extends y.Disposable{static{i=this}static{this.VERSION=1}static{this.RESOURCE="machines"}constructor(E,C,I,_,A,k){super(),this.storageService=I,this.userDataSyncStoreService=_,this.logService=A,this.productService=k,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.userData=null,this.currentMachineIdPromise=(0,h.getServiceMachineId)(E,C,I)}async getMachines(E){const C=await this.currentMachineIdPromise;return(await this.readMachinesData(E)).machines.map(_=>({..._,isCurrent:_.id===C}))}async addCurrentMachine(E){const C=await this.currentMachineIdPromise,I=await this.readMachinesData(E);I.machines.some(({id:_})=>_===C)||(I.machines.push({id:C,name:this.computeCurrentMachineName(I.machines),platform:n()}),await this.writeMachinesData(I))}async removeCurrentMachine(E){const C=await this.currentMachineIdPromise,I=await this.readMachinesData(E),_=I.machines.filter(({id:A})=>A!==C);_.length!==I.machines.length&&(I.machines=_,await this.writeMachinesData(I))}async renameMachine(E,C,I){const _=await this.readMachinesData(I),A=_.machines.find(({id:k})=>k===E);if(A){A.name=C,await this.writeMachinesData(_);const k=await this.currentMachineIdPromise;E===k&&this.storageService.store(s,C,-1,1)}}async setEnablements(E){const C=await this.readMachinesData();for(const[I,_]of E){const A=C.machines.find(k=>k.id===I);A&&(A.disabled=_?void 0:!0)}await this.writeMachinesData(C)}computeCurrentMachineName(E){const C=this.storageService.get(s,-1);if(C)return C;const I=`${this.productService.embedderIdentifier?`${this.productService.embedderIdentifier} - `:""}${n()} (${this.productService.nameShort})`,_=new RegExp(`${(0,D.escapeRegExpCharacters)(I)}\\s#(\\d+)`);let A=0;for(const k of E){const L=_.exec(k.name),R=L?parseInt(L[1]):0;A=R>A?R:A}return`${I} #${A+1}`}async readMachinesData(E){this.userData=await this.readUserData(E);const C=this.parse(this.userData);if(C.version!==i.VERSION)throw new Error((0,T.localize)(0,null,this.productService.nameLong));return C}async writeMachinesData(E){const C=JSON.stringify(E),I=await this.userDataSyncStoreService.writeResource(i.RESOURCE,C,this.userData?.ref||null);this.userData={ref:I,content:C},this._onDidChange.fire()}async readUserData(E){if(this.userData){const C=E&&E.latest?E.latest[i.RESOURCE]:void 0;if(this.userData.ref===C)return this.userData;if(C===void 0&&this.userData.content===null)return this.userData}return this.userDataSyncStoreService.readResource(i.RESOURCE,this.userData)}parse(E){if(E.content!==null)try{return JSON.parse(E.content)}catch(C){this.logService.error(C)}return{version:i.VERSION,machines:[]}}};e.UserDataSyncMachinesService=g,e.UserDataSyncMachinesService=g=i=fe([O(0,f.IEnvironmentService),O(1,v.IFileService),O(2,a.IStorageService),O(3,r.IUserDataSyncStoreService),O(4,r.IUserDataSyncLogService),O(5,S.IProductService)],g)}),define(Q[3458],Y([1,0,6,4,10,116,120]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncChannelClient=e.UserDataSyncChannel=void 0;function f(a,r){return{...a,profile:(0,D.reviveProfile)(a.profile,r.profilesHome.scheme)}}function v(a){return{created:a.created,uri:b.URI.revive(a.uri)}}class m{constructor(r,i,s){this.service=r,this.userDataProfilesService=i,this.logService=s,this.manualSyncTasks=new Map,this.onManualSynchronizeResources=new t.Emitter}listen(r,i){switch(i){case"onDidChangeStatus":return this.service.onDidChangeStatus;case"onDidChangeConflicts":return this.service.onDidChangeConflicts;case"onDidChangeLocal":return this.service.onDidChangeLocal;case"onDidChangeLastSyncTime":return this.service.onDidChangeLastSyncTime;case"onSyncErrors":return this.service.onSyncErrors;case"onDidResetLocal":return this.service.onDidResetLocal;case"onDidResetRemote":return this.service.onDidResetRemote;case"manualSync/onSynchronizeResources":return this.onManualSynchronizeResources.event}throw new Error(`Event not found: ${i}`)}async call(r,i,s){try{return await this._call(r,i,s)}catch(o){throw this.logService.error(o),o}}async _call(r,i,s){switch(i){case"_getInitialData":return Promise.resolve([this.service.status,this.service.conflicts,this.service.lastSyncTime]);case"reset":return this.service.reset();case"resetRemote":return this.service.resetRemote();case"resetLocal":return this.service.resetLocal();case"hasPreviouslySynced":return this.service.hasPreviouslySynced();case"hasLocalData":return this.service.hasLocalData();case"resolveContent":return this.service.resolveContent(b.URI.revive(s[0]));case"accept":return this.service.accept(f(s[0],this.userDataProfilesService),b.URI.revive(s[1]),s[2],s[3]);case"getRemoteProfiles":return this.service.getRemoteProfiles();case"getLocalSyncResourceHandles":return this.service.getLocalSyncResourceHandles(s[0],s[1]?(0,D.reviveProfile)(s[1],this.userDataProfilesService.profilesHome.scheme):void 0);case"getRemoteSyncResourceHandles":return this.service.getRemoteSyncResourceHandles(s[0],s[1]);case"replace":return this.service.replace(v(s[0]));case"getAssociatedResources":return this.service.getAssociatedResources(v(s[0]));case"getMachineId":return this.service.getMachineId(v(s[0]));case"cleanUpRemoteData":return this.service.cleanUpRemoteData();case"createManualSyncTask":return this.createManualSyncTask()}if(i.startsWith("manualSync/")){const o=i.substring(11),u=s[0],d=this.getManualSyncTask(u);switch(s=s.slice(1),o){case"merge":return d.merge();case"apply":return d.apply().then(()=>this.manualSyncTasks.delete(this.createKey(d.id)));case"stop":return d.stop().finally(()=>this.manualSyncTasks.delete(this.createKey(d.id)))}}throw new Error("Invalid call")}getManualSyncTask(r){const i=this.manualSyncTasks.get(this.createKey(r));if(!i)throw new Error(`Manual sync taks not found: ${r}`);return i}async createManualSyncTask(){const r=await this.service.createManualSyncTask();return this.manualSyncTasks.set(this.createKey(r.id),r),r.id}createKey(r){return`manualSyncTask-${r}`}}e.UserDataSyncChannel=m;let S=class extends y.Disposable{get status(){return this._status}get onDidChangeLocal(){return this.channel.listen("onDidChangeLocal")}get conflicts(){return this._conflicts}get lastSyncTime(){return this._lastSyncTime}get onDidResetLocal(){return this.channel.listen("onDidResetLocal")}get onDidResetRemote(){return this.channel.listen("onDidResetRemote")}constructor(r,i){super(),this.userDataProfilesService=i,this._status="uninitialized",this._onDidChangeStatus=this._register(new t.Emitter),this.onDidChangeStatus=this._onDidChangeStatus.event,this._conflicts=[],this._onDidChangeConflicts=this._register(new t.Emitter),this.onDidChangeConflicts=this._onDidChangeConflicts.event,this._lastSyncTime=void 0,this._onDidChangeLastSyncTime=this._register(new t.Emitter),this.onDidChangeLastSyncTime=this._onDidChangeLastSyncTime.event,this._onSyncErrors=this._register(new t.Emitter),this.onSyncErrors=this._onSyncErrors.event,this.channel={call(s,o,u){return r.call(s,o,u).then(null,d=>{throw T.UserDataSyncError.toUserDataSyncError(d)})},listen(s,o){return r.listen(s,o)}},this.channel.call("_getInitialData").then(([s,o,u])=>{this.updateStatus(s),this.updateConflicts(o),u&&this.updateLastSyncTime(u),this._register(this.channel.listen("onDidChangeStatus")(d=>this.updateStatus(d))),this._register(this.channel.listen("onDidChangeLastSyncTime")(d=>this.updateLastSyncTime(d)))}),this._register(this.channel.listen("onDidChangeConflicts")(s=>this.updateConflicts(s))),this._register(this.channel.listen("onSyncErrors")(s=>this._onSyncErrors.fire(s.map(o=>({...o,error:T.UserDataSyncError.toUserDataSyncError(o.error)})))))}createSyncTask(){throw new Error("not supported")}async createManualSyncTask(){const r=await this.channel.call("createManualSyncTask"),i=this;return new h(r,{async call(o,u,d){return i.channel.call(`manualSync/${o}`,[r,...Array.isArray(u)?u:[u]],d)},listen(){throw new Error("not supported")}})}reset(){return this.channel.call("reset")}resetRemote(){return this.channel.call("resetRemote")}resetLocal(){return this.channel.call("resetLocal")}hasPreviouslySynced(){return this.channel.call("hasPreviouslySynced")}hasLocalData(){return this.channel.call("hasLocalData")}accept(r,i,s,o){return this.channel.call("accept",[r,i,s,o])}resolveContent(r){return this.channel.call("resolveContent",[r])}getRemoteProfiles(){return this.channel.call("getRemoteProfiles")}async getLocalSyncResourceHandles(r,i){return(await this.channel.call("getLocalSyncResourceHandles",[r,i])).map(({created:o,uri:u})=>({created:o,uri:b.URI.revive(u)}))}async getRemoteSyncResourceHandles(r,i){return(await this.channel.call("getRemoteSyncResourceHandles",[r,i])).map(({created:o,uri:u})=>({created:o,uri:b.URI.revive(u)}))}async getAssociatedResources(r){return(await this.channel.call("getAssociatedResources",[r])).map(({resource:s,comparableResource:o})=>({resource:b.URI.revive(s),comparableResource:b.URI.revive(o)}))}getMachineId(r){return this.channel.call("getMachineId",[r])}cleanUpRemoteData(){return this.channel.call("cleanUpRemoteData")}replace(r){return this.channel.call("replace",[r])}async updateStatus(r){this._status=r,this._onDidChangeStatus.fire(r)}async updateConflicts(r){this._conflicts=r.map(i=>({syncResource:i.syncResource,profile:(0,D.reviveProfile)(i.profile,this.userDataProfilesService.profilesHome.scheme),conflicts:i.conflicts.map(s=>({...s,baseResource:b.URI.revive(s.baseResource),localResource:b.URI.revive(s.localResource),remoteResource:b.URI.revive(s.remoteResource),previewResource:b.URI.revive(s.previewResource)}))})),this._onDidChangeConflicts.fire(this._conflicts)}updateLastSyncTime(r){this._lastSyncTime!==r&&(this._lastSyncTime=r,this._onDidChangeLastSyncTime.fire(r))}};e.UserDataSyncChannelClient=S,e.UserDataSyncChannelClient=S=fe([O(1,D.IUserDataProfilesService)],S);class h extends y.Disposable{constructor(r,i){super(),this.id=r,this.channel=i}async merge(){return this.channel.call("merge")}async apply(){return this.channel.call("apply")}stop(){return this.channel.call("stop")}dispose(){this.channel.call("dispose")}}}),define(Q[717],Y([1,0,14,31,15,6,4,197,18,26,17,10,59,9,91,25,52,288,500,24,120]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestsSession=e.UserDataSyncStoreService=e.UserDataSyncStoreClient=e.UserDataSyncStoreManagementService=e.AbstractUserDataSyncStoreManagementService=void 0;const l="configurationSync.store",n="sync.previous.store",g="sync.donot-make-requests-until",w="sync.user-session-id",E="sync.machine-session-id",C=100,I=1e3*60*5;let _=class extends T.Disposable{get userDataSyncStore(){return this._userDataSyncStore}get userDataSyncStoreType(){return this.storageService.get(c.SYNC_SERVICE_URL_TYPE,-1)}set userDataSyncStoreType(N){this.storageService.store(c.SYNC_SERVICE_URL_TYPE,N,-1,v.isWeb?0:1)}constructor(N,P,x){super(),this.productService=N,this.configurationService=P,this.storageService=x,this._onDidChangeUserDataSyncStore=this._register(new D.Emitter),this.onDidChangeUserDataSyncStore=this._onDidChangeUserDataSyncStore.event,this.updateUserDataSyncStore();const F=this._register(new T.DisposableStore);this._register(D.Event.filter(x.onDidChangeValue(-1,c.SYNC_SERVICE_URL_TYPE,F),()=>this.userDataSyncStoreType!==this.userDataSyncStore?.type,F)(()=>this.updateUserDataSyncStore()))}updateUserDataSyncStore(){this._userDataSyncStore=this.toUserDataSyncStore(this.productService[l]),this._onDidChangeUserDataSyncStore.fire()}toUserDataSyncStore(N){if(N&&(N=v.isWeb&&N.web?{...N,...N.web}:N,(0,S.isString)(N.url)&&(0,S.isObject)(N.authenticationProviders)&&Object.keys(N.authenticationProviders).every(P=>Array.isArray(N.authenticationProviders[P].scopes)))){const P=N,x=!!P.canSwitch,F=P.url===P.insidersUrl?"insiders":"stable",V=(x?this.userDataSyncStoreType:void 0)||F,W=V==="insiders"?P.insidersUrl:V==="stable"?P.stableUrl:P.url;return{url:h.URI.parse(W),type:V,defaultType:F,defaultUrl:h.URI.parse(P.url),stableUrl:h.URI.parse(P.stableUrl),insidersUrl:h.URI.parse(P.insidersUrl),canSwitch:x,authenticationProviders:Object.keys(P.authenticationProviders).reduce((z,B)=>(z.push({id:B,scopes:P.authenticationProviders[B].scopes}),z),[])}}}};e.AbstractUserDataSyncStoreManagementService=_,e.AbstractUserDataSyncStoreManagementService=_=fe([O(0,o.IProductService),O(1,r.IConfigurationService),O(2,p.IStorageService)],_);let A=class extends _{constructor(N,P,x){super(N,P,x);const F=this.storageService.get(n,-1);F&&(this.previousConfigurationSyncStore=JSON.parse(F));const V=this.productService[l];V?this.storageService.store(n,JSON.stringify(V),-1,1):this.storageService.remove(n,-1)}async switch(N){N!==this.userDataSyncStoreType&&(this.userDataSyncStoreType=N,this.updateUserDataSyncStore())}async getPreviousUserDataSyncStore(){return this.toUserDataSyncStore(this.previousConfigurationSyncStore)}};e.UserDataSyncStoreManagementService=A,e.UserDataSyncStoreManagementService=A=fe([O(0,o.IProductService),O(1,r.IConfigurationService),O(2,p.IStorageService)],A);let k=class extends T.Disposable{get donotMakeRequestsUntil(){return this._donotMakeRequestsUntil}constructor(N,P,x,F,V,W,z){super(),this.requestService=x,this.logService=F,this.storageService=z,this._onTokenFailed=this._register(new D.Emitter),this.onTokenFailed=this._onTokenFailed.event,this._onTokenSucceed=this._register(new D.Emitter),this.onTokenSucceed=this._onTokenSucceed.event,this._donotMakeRequestsUntil=void 0,this._onDidChangeDonotMakeRequestsUntil=this._register(new D.Emitter),this.onDidChangeDonotMakeRequestsUntil=this._onDidChangeDonotMakeRequestsUntil.event,this.resetDonotMakeRequestsUntilPromise=void 0,this.updateUserDataSyncStoreUrl(N),this.commonHeadersPromise=(0,d.getServiceMachineId)(V,W,z).then(B=>{const K={"X-Client-Name":`${P.applicationName}${v.isWeb?"-web":""}`,"X-Client-Version":P.version};return P.commit&&(K["X-Client-Commit"]=P.commit),K}),this.session=new R(C,I,this.requestService,this.logService),this.initDonotMakeRequestsUntil(),this._register((0,T.toDisposable)(()=>{this.resetDonotMakeRequestsUntilPromise&&(this.resetDonotMakeRequestsUntilPromise.cancel(),this.resetDonotMakeRequestsUntilPromise=void 0)}))}setAuthToken(N,P){this.authToken={token:N,type:P}}updateUserDataSyncStoreUrl(N){this.userDataSyncStoreUrl=N?(0,m.joinPath)(N,"v1"):void 0}initDonotMakeRequestsUntil(){const N=this.storageService.getNumber(g,-1);N&&Date.now()<N&&this.setDonotMakeRequestsUntil(new Date(N))}setDonotMakeRequestsUntil(N){this._donotMakeRequestsUntil?.getTime()!==N?.getTime()&&(this._donotMakeRequestsUntil=N,this.resetDonotMakeRequestsUntilPromise&&(this.resetDonotMakeRequestsUntilPromise.cancel(),this.resetDonotMakeRequestsUntilPromise=void 0),this._donotMakeRequestsUntil?(this.storageService.store(g,this._donotMakeRequestsUntil.getTime(),-1,1),this.resetDonotMakeRequestsUntilPromise=(0,t.createCancelablePromise)(P=>(0,t.timeout)(this._donotMakeRequestsUntil.getTime()-Date.now(),P).then(()=>this.setDonotMakeRequestsUntil(void 0))),this.resetDonotMakeRequestsUntilPromise.then(null,P=>null)):this.storageService.remove(g,-1),this._onDidChangeDonotMakeRequestsUntil.fire())}async getAllCollections(N={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const P=(0,m.joinPath)(this.userDataSyncStoreUrl,"collection").toString();N={...N},N["Content-Type"]="application/json";const x=await this.request(P,{type:"GET",headers:N},[],y.CancellationToken.None);return(await(0,u.asJson)(x))?.map(({id:F})=>F)||[]}async createCollection(N={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const P=(0,m.joinPath)(this.userDataSyncStoreUrl,"collection").toString();N={...N},N["Content-Type"]=f.Mimes.text;const x=await this.request(P,{type:"POST",headers:N},[],y.CancellationToken.None),F=await(0,u.asTextOrError)(x);if(!F)throw new c.UserDataSyncStoreError("Server did not return the collection id",P,"NoCollection",x.res.statusCode,x.res.headers[c.HEADER_OPERATION_ID]);return F}async deleteCollection(N,P={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const x=N?(0,m.joinPath)(this.userDataSyncStoreUrl,"collection",N).toString():(0,m.joinPath)(this.userDataSyncStoreUrl,"collection").toString();P={...P},await this.request(x,{type:"DELETE",headers:P},[],y.CancellationToken.None)}async getAllResourceRefs(N,P){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const x=this.getResourceUrl(this.userDataSyncStoreUrl,P,N),F={},V=await this.request(x.toString(),{type:"GET",headers:F},[],y.CancellationToken.None);return(await(0,u.asJson)(V)||[]).map(({url:z,created:B})=>({ref:(0,m.relativePath)(x,x.with({path:z})),created:B*1e3}))}async resolveResourceContent(N,P,x,F={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const V=(0,m.joinPath)(this.getResourceUrl(this.userDataSyncStoreUrl,x,N),P).toString();F={...F},F["Cache-Control"]="no-cache";const W=await this.request(V,{type:"GET",headers:F},[],y.CancellationToken.None);return await(0,u.asTextOrError)(W)}async deleteResource(N,P,x){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const F=P!==null?(0,m.joinPath)(this.getResourceUrl(this.userDataSyncStoreUrl,x,N),P).toString():this.getResourceUrl(this.userDataSyncStoreUrl,x,N).toString(),V={};await this.request(F,{type:"DELETE",headers:V},[],y.CancellationToken.None)}async deleteResources(){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const N=(0,m.joinPath)(this.userDataSyncStoreUrl,"resource").toString(),P={"Content-Type":f.Mimes.text};await this.request(N,{type:"DELETE",headers:P},[],y.CancellationToken.None)}async readResource(N,P,x,F={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const V=(0,m.joinPath)(this.getResourceUrl(this.userDataSyncStoreUrl,x,N),"latest").toString();F={...F},F["Cache-Control"]="no-cache",P&&(F["If-None-Match"]=P.ref);const W=await this.request(V,{type:"GET",headers:F},[304],y.CancellationToken.None);let z=null;if(W.res.statusCode===304&&(z=P),z===null){const B=W.res.headers.etag;if(!B)throw new c.UserDataSyncStoreError("Server did not return the ref",V,"NoRef",W.res.statusCode,W.res.headers[c.HEADER_OPERATION_ID]);const K=await(0,u.asTextOrError)(W);if(!K&&W.res.statusCode===304)throw new c.UserDataSyncStoreError("Empty response",V,"EmptyResponse",W.res.statusCode,W.res.headers[c.HEADER_OPERATION_ID]);z={ref:B,content:K}}return z}async writeResource(N,P,x,F,V={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const W=this.getResourceUrl(this.userDataSyncStoreUrl,F,N).toString();V={...V},V["Content-Type"]=f.Mimes.text,x&&(V["If-Match"]=x);const z=await this.request(W,{type:"POST",data:P,headers:V},[],y.CancellationToken.None),B=z.res.headers.etag;if(!B)throw new c.UserDataSyncStoreError("Server did not return the ref",W,"NoRef",z.res.statusCode,z.res.headers[c.HEADER_OPERATION_ID]);return B}async manifest(N,P={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const x=(0,m.joinPath)(this.userDataSyncStoreUrl,"manifest").toString();P={...P},P["Content-Type"]="application/json",N&&(P["If-None-Match"]=N.ref);const F=await this.request(x,{type:"GET",headers:P},[304],y.CancellationToken.None);let V=null;if(F.res.statusCode===304&&(V=N),!V){const z=F.res.headers.etag;if(!z)throw new c.UserDataSyncStoreError("Server did not return the ref",x,"NoRef",F.res.statusCode,F.res.headers[c.HEADER_OPERATION_ID]);const B=await(0,u.asTextOrError)(F);if(!B&&F.res.statusCode===304)throw new c.UserDataSyncStoreError("Empty response",x,"EmptyResponse",F.res.statusCode,F.res.headers[c.HEADER_OPERATION_ID]);B&&(V={...JSON.parse(B),ref:z})}const W=this.storageService.get(w,-1);return W&&V&&W!==V.session&&this.clearSession(),V===null&&W&&this.clearSession(),V&&this.storageService.store(w,V.session,-1,1),V}async clear(){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");await this.deleteCollection(),await this.deleteResources(),this.clearSession()}getResourceUrl(N,P,x){return P?(0,m.joinPath)(N,"collection",P,"resource",x):(0,m.joinPath)(N,"resource",x)}clearSession(){this.storageService.remove(w,-1),this.storageService.remove(E,-1)}async request(N,P,x,F){if(!this.authToken)throw new c.UserDataSyncStoreError("No Auth Token Available",N,"Unauthorized",void 0,void 0);if(this._donotMakeRequestsUntil&&Date.now()<this._donotMakeRequestsUntil.getTime())throw new c.UserDataSyncStoreError(`${P.type} request '${N}' failed because of too many requests (429).`,N,"TooManyRequestsAndRetryAfter",void 0,void 0);this.setDonotMakeRequestsUntil(void 0);const V=await this.commonHeadersPromise;P.headers={...P.headers||{},...V,"X-Account-Type":this.authToken.type,authorization:`Bearer ${this.authToken.token}`},this.addSessionHeaders(P.headers),this.logService.trace("Sending request to server",{url:N,type:P.type,headers:{...P.headers,authorization:void 0}});let W;try{W=await this.session.request(N,P,F)}catch(U){if(!(U instanceof c.UserDataSyncStoreError)){let G="RequestFailed";const $=(0,b.getErrorMessage)(U).toLowerCase();$.includes("xhr timeout")?G="RequestTimeout":$.includes("protocol")&&$.includes("not supported")?G="RequestProtocolNotSupported":$.includes("request path contains unescaped characters")?G="RequestPathNotEscaped":$.includes("headers must be an object")?G="RequestHeadersNotObject":(0,b.isCancellationError)(U)&&(G="RequestCanceled"),U=new c.UserDataSyncStoreError(`Connection refused for the request '${N}'.`,N,G,void 0,void 0)}throw this.logService.info("Request failed",N),U}const z=W.res.headers[c.HEADER_OPERATION_ID],B={url:N,status:W.res.statusCode,"execution-id":P.headers[c.HEADER_EXECUTION_ID],"operation-id":z},K=(0,u.isSuccess)(W)||W.res.statusCode&&x.includes(W.res.statusCode);let H="";if(K?this.logService.trace("Request succeeded",B):(H=await(0,u.asText)(W)||"",this.logService.info("Request failed",B,H)),W.res.statusCode===401||W.res.statusCode===403){if(this.authToken=void 0,W.res.statusCode===401)throw this._onTokenFailed.fire("Unauthorized"),new c.UserDataSyncStoreError(`${P.type} request '${N}' failed because of Unauthorized (401).`,N,"Unauthorized",W.res.statusCode,z);if(W.res.statusCode===403)throw this._onTokenFailed.fire("Forbidden"),new c.UserDataSyncStoreError(`${P.type} request '${N}' failed because the access is forbidden (403).`,N,"Forbidden",W.res.statusCode,z)}if(this._onTokenSucceed.fire(),W.res.statusCode===404)throw new c.UserDataSyncStoreError(`${P.type} request '${N}' failed because the requested resource is not found (404).`,N,"NotFound",W.res.statusCode,z);if(W.res.statusCode===405)throw new c.UserDataSyncStoreError(`${P.type} request '${N}' failed because the requested endpoint is not found (405). ${H}`,N,"MethodNotFound",W.res.statusCode,z);if(W.res.statusCode===409)throw new c.UserDataSyncStoreError(`${P.type} request '${N}' failed because of Conflict (409). There is new data for this resource. Make the request again with latest data.`,N,"Conflict",W.res.statusCode,z);if(W.res.statusCode===410)throw new c.UserDataSyncStoreError(`${P.type} request '${N}' failed because the requested resource is not longer available (410).`,N,"Gone",W.res.statusCode,z);if(W.res.statusCode===412)throw new c.UserDataSyncStoreError(`${P.type} request '${N}' failed because of Precondition Failed (412). There is new data for this resource. Make the request again with latest data.`,N,"PreconditionFailed",W.res.statusCode,z);if(W.res.statusCode===413)throw new c.UserDataSyncStoreError(`${P.type} request '${N}' failed because of too large payload (413).`,N,"TooLarge",W.res.statusCode,z);if(W.res.statusCode===426)throw new c.UserDataSyncStoreError(`${P.type} request '${N}' failed with status Upgrade Required (426). Please upgrade the client and try again.`,N,"UpgradeRequired",W.res.statusCode,z);if(W.res.statusCode===429){const U=W.res.headers["retry-after"];throw U?(this.setDonotMakeRequestsUntil(new Date(Date.now()+parseInt(U)*1e3)),new c.UserDataSyncStoreError(`${P.type} request '${N}' failed because of too many requests (429).`,N,"TooManyRequestsAndRetryAfter",W.res.statusCode,z)):new c.UserDataSyncStoreError(`${P.type} request '${N}' failed because of too many requests (429).`,N,"RemoteTooManyRequests",W.res.statusCode,z)}if(!K)throw new c.UserDataSyncStoreError("Server returned "+W.res.statusCode,N,"Unknown",W.res.statusCode,z);return W}addSessionHeaders(N){let P=this.storageService.get(E,-1);P===void 0&&(P=(0,a.generateUuid)(),this.storageService.store(E,P,-1,1)),N["X-Machine-Session-Id"]=P;const x=this.storageService.get(w,-1);x!==void 0&&(N["X-User-Session-Id"]=x)}};e.UserDataSyncStoreClient=k,e.UserDataSyncStoreClient=k=fe([O(1,o.IProductService),O(2,u.IRequestService),O(3,c.IUserDataSyncLogService),O(4,i.IEnvironmentService),O(5,s.IFileService),O(6,p.IStorageService)],k);let L=class extends k{constructor(N,P,x,F,V,W,z){super(N.userDataSyncStore?.url,P,x,F,V,W,z),this._register(N.onDidChangeUserDataSyncStore(()=>this.updateUserDataSyncStoreUrl(N.userDataSyncStore?.url)))}};e.UserDataSyncStoreService=L,e.UserDataSyncStoreService=L=fe([O(0,c.IUserDataSyncStoreManagementService),O(1,o.IProductService),O(2,u.IRequestService),O(3,c.IUserDataSyncLogService),O(4,i.IEnvironmentService),O(5,s.IFileService),O(6,p.IStorageService)],L);class R{constructor(N,P,x,F){this.limit=N,this.interval=P,this.requestService=x,this.logService=F,this.requests=[],this.startTime=void 0}request(N,P,x){if(this.isExpired()&&this.reset(),P.url=N,this.requests.length>=this.limit)throw this.logService.info("Too many requests",...this.requests),new c.UserDataSyncStoreError(`Too many requests. Only ${this.limit} requests allowed in ${this.interval/(1e3*60)} minutes.`,N,"LocalTooManyRequests",void 0,void 0);return this.startTime=this.startTime||new Date,this.requests.push(N),this.requestService.request(P,x)}isExpired(){return this.startTime!==void 0&&new Date().getTime()-this.startTime.getTime()>this.interval}reset(){this.requests=[],this.startTime=void 0}}e.RequestsSession=R}),define(Q[138],Y([1,0,2498,5]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkspaceTrustRequestService=e.WorkspaceTrustUriResponse=e.IWorkspaceTrustManagementService=e.IWorkspaceTrustEnablementService=e.workspaceTrustToString=e.WorkspaceTrustScope=void 0;var b;(function(f){f[f.Local=0]="Local",f[f.Remote=1]="Remote"})(b||(e.WorkspaceTrustScope=b={}));function D(f){return f?(0,t.localize)(0,null):(0,t.localize)(1,null)}e.workspaceTrustToString=D,e.IWorkspaceTrustEnablementService=(0,y.createDecorator)("workspaceTrustEnablementService"),e.IWorkspaceTrustManagementService=(0,y.createDecorator)("workspaceTrustManagementService");var T;(function(f){f[f.Open=1]="Open",f[f.OpenInNewWindow=2]="OpenInNewWindow",f[f.Cancel=3]="Cancel"})(T||(e.WorkspaceTrustUriResponse=T={})),e.IWorkspaceTrustRequestService=(0,y.createDecorator)("workspaceTrustRequestService")}),define(Q[3459],Y([1,0,14,32,110,4,18,33,48,133,98,1081,242,50,1133,395,883,3338,2437,9,5,41,43,77,138,1749]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowExcludeOptions=e.DisableHighlightingOfNonBasicAsciiCharactersAction=e.DisableHighlightingOfInvisibleCharactersAction=e.DisableHighlightingOfAmbiguousCharactersAction=e.DisableHighlightingInStringsAction=e.DisableHighlightingInCommentsAction=e.UnicodeHighlighterHoverParticipant=e.UnicodeHighlighterHover=e.UnicodeHighlighter=e.warningIcon=void 0,e.warningIcon=(0,g.registerIcon)("extensions-warning-message",y.Codicon.warning,d.localize(0,null));let E=class extends D.Disposable{static{this.ID="editor.contrib.unicodeHighlighter"}constructor($,ie,J,j){super(),this._editor=$,this._editorWorkerService=ie,this._workspaceTrustService=J,this._highlighter=null,this._bannerClosed=!1,this._updateState=ee=>{if(ee&&ee.hasMore){if(this._bannerClosed)return;const X=Math.max(ee.ambiguousCharacterCount,ee.nonBasicAsciiCharacterCount,ee.invisibleCharacterCount);let te;if(ee.nonBasicAsciiCharacterCount>=X)te={message:d.localize(1,null),command:new z};else if(ee.ambiguousCharacterCount>=X)te={message:d.localize(2,null),command:new V};else if(ee.invisibleCharacterCount>=X)te={message:d.localize(3,null),command:new W};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:te.message,icon:e.warningIcon,actions:[{label:te.command.shortLabel,href:`command:${te.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(j.createInstance(u.BannerController,$)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=$.getOption(123),this._register(J.onDidChangeTrust(ee=>{this._updateHighlighter()})),this._register($.onDidChangeConfiguration(ee=>{ee.hasChanged(123)&&(this._options=$.getOption(123),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const $=C(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([$.nonBasicASCII,$.ambiguousCharacters,$.invisibleCharacters].every(J=>J===!1))return;const ie={nonBasicASCII:$.nonBasicASCII,ambiguousCharacters:$.ambiguousCharacters,invisibleCharacters:$.invisibleCharacters,includeComments:$.includeComments,includeStrings:$.includeStrings,allowedCodePoints:Object.keys($.allowedCharacters).map(J=>J.codePointAt(0)),allowedLocales:Object.keys($.allowedLocales).map(J=>J==="_os"?new Intl.NumberFormat().resolvedOptions().locale:J==="_vscode"?T.language:J)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new I(this._editor,ie,this._updateState,this._editorWorkerService):this._highlighter=new _(this._editor,ie,this._updateState)}getDecorationInfo($){return this._highlighter?this._highlighter.getDecorationInfo($):null}};e.UnicodeHighlighter=E,e.UnicodeHighlighter=E=fe([O(1,a.IEditorWorkerService),O(2,w.IWorkspaceTrustManagementService),O(3,c.IInstantiationService)],E);function C(G,$){return{nonBasicASCII:$.nonBasicASCII===m.inUntrustedWorkspace?!G:$.nonBasicASCII,ambiguousCharacters:$.ambiguousCharacters,invisibleCharacters:$.invisibleCharacters,includeComments:$.includeComments===m.inUntrustedWorkspace?!G:$.includeComments,includeStrings:$.includeStrings===m.inUntrustedWorkspace?!G:$.includeStrings,allowedCharacters:$.allowedCharacters,allowedLocales:$.allowedLocales}}let I=class extends D.Disposable{constructor($,ie,J,j){super(),this._editor=$,this._options=ie,this._updateState=J,this._editorWorkerService=j,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new t.RunOnceScheduler(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const $=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(ie=>{if(this._model.isDisposed()||this._model.getVersionId()!==$)return;this._updateState(ie);const J=[];if(!ie.hasMore)for(const j of ie.ranges)J.push({range:j,options:P.instance.getDecorationFromOptions(this._options)});this._decorations.set(J)})}getDecorationInfo($){if(!this._decorations.has($))return null;const ie=this._editor.getModel();if(!(0,i.isModelDecorationVisible)(ie,$))return null;const J=ie.getValueInRange($.range);return{reason:N(J,this._options),inComment:(0,i.isModelDecorationInComment)(ie,$),inString:(0,i.isModelDecorationInString)(ie,$)}}};I=fe([O(3,a.IEditorWorkerService)],I);class _ extends D.Disposable{constructor($,ie,J){super(),this._editor=$,this._options=ie,this._updateState=J,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new t.RunOnceScheduler(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const $=this._editor.getVisibleRanges(),ie=[],J={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const j of $){const ee=h.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,j);for(const X of ee.ranges)J.ranges.push(X);J.ambiguousCharacterCount+=J.ambiguousCharacterCount,J.invisibleCharacterCount+=J.invisibleCharacterCount,J.nonBasicAsciiCharacterCount+=J.nonBasicAsciiCharacterCount,J.hasMore=J.hasMore||ee.hasMore}if(!J.hasMore)for(const j of J.ranges)ie.push({range:j,options:P.instance.getDecorationFromOptions(this._options)});this._updateState(J),this._decorations.set(ie)}getDecorationInfo($){if(!this._decorations.has($))return null;const ie=this._editor.getModel(),J=ie.getValueInRange($.range);return(0,i.isModelDecorationVisible)(ie,$)?{reason:N(J,this._options),inComment:(0,i.isModelDecorationInComment)(ie,$),inString:(0,i.isModelDecorationInString)(ie,$)}:null}}class A{constructor($,ie,J){this.owner=$,this.range=ie,this.decoration=J}isValidForHoverAnchor($){return $.type===1&&this.range.startColumn<=$.range.startColumn&&this.range.endColumn>=$.range.endColumn}}e.UnicodeHighlighterHover=A;let k=class{constructor($,ie,J){this._editor=$,this._languageService=ie,this._openerService=J,this.hoverOrdinal=5}computeSync($,ie){if(!this._editor.hasModel()||$.type!==1)return[];const J=this._editor.getModel(),j=this._editor.getContribution(E.ID);if(!j)return[];const ee=[],X=new Set;let te=300;for(const Z of ie){const se=j.getDecorationInfo(Z);if(!se)continue;const oe=J.getValueInRange(Z.range).codePointAt(0),le=R(oe);let ne;switch(se.reason.kind){case 0:{(0,f.isBasicASCII)(se.reason.confusableWith)?ne=d.localize(4,null,le,R(se.reason.confusableWith.codePointAt(0))):ne=d.localize(5,null,le,R(se.reason.confusableWith.codePointAt(0)));break}case 1:ne=d.localize(6,null,le);break;case 2:ne=d.localize(7,null,le);break}if(X.has(ne))continue;X.add(ne);const ce={codePoint:oe,reason:se.reason,inComment:se.inComment,inString:se.inString},ae=d.localize(8,null),ue=`command:${B.ID}?${encodeURIComponent(JSON.stringify(ce))}`,de=new b.MarkdownString("",!0).appendMarkdown(ne).appendText(" ").appendLink(ue,ae);ee.push(new o.MarkdownHover(this,Z.range,[de],!1,te++))}return ee}renderHoverParts($,ie){return(0,o.renderMarkdownHovers)($,ie,this._editor,this._languageService,this._openerService)}};e.UnicodeHighlighterHoverParticipant=k,e.UnicodeHighlighterHoverParticipant=k=fe([O(1,r.ILanguageService),O(2,l.IOpenerService)],k);function L(G){return`U+${G.toString(16).padStart(4,"0")}`}function R(G){let $=`\`${L(G)}\``;return f.InvisibleCharacters.isInvisibleCharacter(G)||($+=` "${`${M(G)}`}"`),$}function M(G){return G===96?"`` ` ``":"`"+String.fromCodePoint(G)+"`"}function N(G,$){return h.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(G,$)}class P{constructor(){this.map=new Map}static{this.instance=new P}getDecorationFromOptions($){return this.getDecoration(!$.includeComments,!$.includeStrings)}getDecoration($,ie){const J=`${$}${ie}`;let j=this.map.get(J);return j||(j=S.ModelDecorationOptions.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:$,hideInStringTokens:ie}),this.map.set(J,j)),j}}class x extends v.EditorAction{static{this.ID="editor.action.unicodeHighlight.disableHighlightingInComments"}constructor(){super({id:V.ID,label:d.localize(10,null),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=d.localize(9,null)}async run($,ie,J){const j=$?.get(p.IConfigurationService);j&&this.runAction(j)}async runAction($){await $.updateValue(m.unicodeHighlightConfigKeys.includeComments,!1,2)}}e.DisableHighlightingInCommentsAction=x;class F extends v.EditorAction{static{this.ID="editor.action.unicodeHighlight.disableHighlightingInStrings"}constructor(){super({id:V.ID,label:d.localize(12,null),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=d.localize(11,null)}async run($,ie,J){const j=$?.get(p.IConfigurationService);j&&this.runAction(j)}async runAction($){await $.updateValue(m.unicodeHighlightConfigKeys.includeStrings,!1,2)}}e.DisableHighlightingInStringsAction=F;class V extends v.EditorAction{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters"}constructor(){super({id:V.ID,label:d.localize(14,null),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=d.localize(13,null)}async run($,ie,J){const j=$?.get(p.IConfigurationService);j&&this.runAction(j)}async runAction($){await $.updateValue(m.unicodeHighlightConfigKeys.ambiguousCharacters,!1,2)}}e.DisableHighlightingOfAmbiguousCharactersAction=V;class W extends v.EditorAction{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters"}constructor(){super({id:W.ID,label:d.localize(16,null),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=d.localize(15,null)}async run($,ie,J){const j=$?.get(p.IConfigurationService);j&&this.runAction(j)}async runAction($){await $.updateValue(m.unicodeHighlightConfigKeys.invisibleCharacters,!1,2)}}e.DisableHighlightingOfInvisibleCharactersAction=W;class z extends v.EditorAction{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters"}constructor(){super({id:z.ID,label:d.localize(18,null),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=d.localize(17,null)}async run($,ie,J){const j=$?.get(p.IConfigurationService);j&&this.runAction(j)}async runAction($){await $.updateValue(m.unicodeHighlightConfigKeys.nonBasicASCII,!1,2)}}e.DisableHighlightingOfNonBasicAsciiCharactersAction=z;class B extends v.EditorAction{static{this.ID="editor.action.unicodeHighlight.showExcludeOptions"}constructor(){super({id:B.ID,label:d.localize(19,null),alias:"Show Exclude Options",precondition:void 0})}async run($,ie,J){const{codePoint:j,reason:ee,inString:X,inComment:te}=J,Z=String.fromCodePoint(j),se=$.get(n.IQuickInputService),re=$.get(p.IConfigurationService);function oe(ce){return f.InvisibleCharacters.isInvisibleCharacter(ce)?d.localize(20,null,L(ce)):d.localize(21,null,`${L(ce)} "${Z}"`)}const le=[];if(ee.kind===0)for(const ce of ee.notAmbiguousInLocales)le.push({label:d.localize(22,null,ce),run:async()=>{H(re,[ce])}});if(le.push({label:oe(j),run:()=>K(re,[j])}),te){const ce=new x;le.push({label:ce.label,run:async()=>ce.runAction(re)})}else if(X){const ce=new F;le.push({label:ce.label,run:async()=>ce.runAction(re)})}if(ee.kind===0){const ce=new V;le.push({label:ce.label,run:async()=>ce.runAction(re)})}else if(ee.kind===1){const ce=new W;le.push({label:ce.label,run:async()=>ce.runAction(re)})}else if(ee.kind===2){const ce=new z;le.push({label:ce.label,run:async()=>ce.runAction(re)})}else U(ee);const ne=await se.pick(le,{title:d.localize(23,null)});ne&&await ne.run()}}e.ShowExcludeOptions=B;async function K(G,$){const ie=G.getValue(m.unicodeHighlightConfigKeys.allowedCharacters);let J;typeof ie=="object"&&ie?J=ie:J={};for(const j of $)J[String.fromCodePoint(j)]=!0;await G.updateValue(m.unicodeHighlightConfigKeys.allowedCharacters,J,2)}async function H(G,$){const ie=G.inspect(m.unicodeHighlightConfigKeys.allowedLocales).user?.value;let J;typeof ie=="object"&&ie?J=Object.assign({},ie):J={};for(const j of $)J[j]=!0;await G.updateValue(m.unicodeHighlightConfigKeys.allowedLocales,J,2)}function U(G){throw new Error(`Unexpected value: ${G}`)}(0,v.registerEditorAction)(V),(0,v.registerEditorAction)(W),(0,v.registerEditorAction)(z),(0,v.registerEditorAction)(B),(0,v.registerEditorContribution)(E.ID,E,1),s.HoverParticipantRegistry.register(k)}),define(Q[3460],Y([1,0,511,190,458,1194,3280,1219,3281,3282,512,3333,1236,3443,3406,3283,415,3284,1221,3425,3426,518,414,3287,3288,3219,3446,892,899,1240,897,601,1189,3439,3407,3290,1190,3408,1226,3291,1237,1203,3387,3388,1217,1191,210,3441,311,3434,3293,880,3459,1192,599,1193,3294,3292,678,791]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(Q[265],Y([1,0,206,161,480,180,22,55,18,26,10,5,330,39]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toStoreData=e.restoreRecentlyOpened=e.rewriteWorkspaceFileForNewLocation=e.toWorkspaceFolders=e.getStoredWorkspaceFolder=e.isStoredWorkspaceFolder=e.isRecentFile=e.isRecentFolder=e.isRecentWorkspace=e.IWorkspacesService=void 0,e.IWorkspacesService=(0,h.createDecorator)("workspacesService");function i(k){return k.hasOwnProperty("workspace")}e.isRecentWorkspace=i;function s(k){return k.hasOwnProperty("folderUri")}e.isRecentFolder=s;function o(k){return k.hasOwnProperty("fileUri")}e.isRecentFile=o;function u(k){return d(k)||p(k)}e.isStoredWorkspaceFolder=u;function d(k){const L=k;return typeof L?.path=="string"&&(!L.name||typeof L.name=="string")}function p(k){const L=k;return typeof L?.uri=="string"&&(!L.name||typeof L.name=="string")}function c(k,L,R,M,N){if(k.scheme!==M.scheme)return{name:R,uri:k.toString(!0)};let P=L?void 0:N.relativePath(M,k);if(P!==void 0)P.length===0?P=".":v.isWindows&&(P=l(P));else if(k.scheme===T.Schemas.file)P=k.fsPath,v.isWindows&&(P=l(P));else if(N.isEqualAuthority(k.authority,M.authority))P=k.path;else return{name:R,uri:k.toString(!0)};return{name:R,path:P}}e.getStoredWorkspaceFolder=c;function l(k){return k=(0,D.normalizeDriveLetter)(k),(0,t.isUNC)(k)||(k=(0,t.toSlashes)(k)),k}function n(k,L,R){const M=[],N=new Set,P=R.dirname(L);for(const x of k){let F;if(d(x))x.path&&(F=R.resolvePath(P,x.path));else if(p(x))try{F=S.URI.parse(x.uri),F.path[0]!==f.posix.sep&&(F=F.with({path:f.posix.sep+F.path}))}catch(V){console.warn(V)}if(F){const V=R.getComparisonKey(F);if(!N.has(V)){N.add(V);const W=x.name||R.basenameOrAuthority(F);M.push(new r.WorkspaceFolder({uri:F,name:W,index:M.length},x))}}}return M}e.toWorkspaceFolders=n;function g(k,L,R,M,N){const P=w(L,k),x=N.dirname(L),F=N.dirname(M),V=[];for(const K of P.folders){const H=d(K)?N.resolvePath(x,K.path):S.URI.parse(K.uri);let U;R?U=!1:U=!d(K)||(0,f.isAbsolute)(K.path),V.push(c(H,U,K.name,F,N))}const W={insertSpaces:!1,tabSize:4,eol:v.isLinux||v.isMacintosh?` `:`\r `},z=b.setProperty(k,["folders"],V,W);let B=b.applyEdits(k,z);return(0,m.isEqualAuthority)(P.remoteAuthority,(0,a.getRemoteAuthority)(M))&&(B=b.applyEdits(B,b.removeProperty(B,["remoteAuthority"],W))),B}e.rewriteWorkspaceFileForNewLocation=g;function w(k,L){const R=y.parse(L);if(R&&Array.isArray(R.folders))R.folders=R.folders.filter(M=>u(M));else throw new Error(`${k} looks like an invalid workspace file.`);return R}function E(k){return k.workspace&&typeof k.workspace=="object"&&typeof k.workspace.id=="string"&&typeof k.workspace.configPath=="string"}function C(k){return typeof k.folderUri=="string"}function I(k){return typeof k.fileUri=="string"}function _(k,L){const R={workspaces:[],files:[]};if(k){const M=function(P,x){for(let F=0;F<P.length;F++)try{x(P[F],F)}catch(V){L.warn(`Error restoring recent entry ${JSON.stringify(P[F])}: ${V.toString()}. Skip entry.`)}},N=k;Array.isArray(N.entries)&&M(N.entries,P=>{const x=P.label,F=P.remoteAuthority;E(P)?R.workspaces.push({label:x,remoteAuthority:F,workspace:{id:P.workspace.id,configPath:S.URI.parse(P.workspace.configPath)}}):C(P)?R.workspaces.push({label:x,remoteAuthority:F,folderUri:S.URI.parse(P.folderUri)}):I(P)&&R.files.push({label:x,remoteAuthority:F,fileUri:S.URI.parse(P.fileUri)})})}return R}e.restoreRecentlyOpened=_;function A(k){const L={entries:[]};for(const R of k.workspaces)s(R)?L.entries.push({folderUri:R.folderUri.toString(),label:R.label,remoteAuthority:R.remoteAuthority}):L.entries.push({workspace:{id:R.workspace.id,configPath:R.workspace.configPath.toString()},label:R.label,remoteAuthority:R.remoteAuthority});for(const R of k.files)L.entries.push({fileUri:R.fileUri.toString(),label:R.label,remoteAuthority:R.remoteAuthority});return L}e.toStoreData=A}),define(Q[3461],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtHostInitDataService=void 0,e.IExtHostInitDataService=(0,t.createDecorator)("IExtHostInitDataService")}),define(Q[3462],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostRpcService=e.IExtHostRpcService=void 0,e.IExtHostRpcService=(0,t.createDecorator)("IExtHostRpcService");class y{constructor(D){this.getProxy=D.getProxy.bind(D),this.set=D.set.bind(D),this.dispose=D.dispose.bind(D),this.assertRegistered=D.assertRegistered.bind(D),this.drain=D.drain.bind(D)}}e.ExtHostRpcService=y}),define(Q[3463],Y([1,0,62]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeWebviewMessage=e.serializeWebviewMessage=void 0;class y{constructor(){this.buffers=[]}add(v){let m=this.buffers.indexOf(v);return m<0&&(m=this.buffers.length,this.buffers.push(v)),m}}function b(f,v){if(v.serializeBuffersForPostMessage){const m=new y,h=JSON.stringify(f,(r,i)=>{if(i instanceof ArrayBuffer)return{$$vscode_array_buffer_reference$$:!0,index:m.add(i)};if(ArrayBuffer.isView(i)){const s=D(i);if(s)return{$$vscode_array_buffer_reference$$:!0,index:m.add(i.buffer),view:{type:s,byteLength:i.byteLength,byteOffset:i.byteOffset}}}return i}),a=m.buffers.map(r=>{const i=new Uint8Array(r);return t.VSBuffer.wrap(i)});return{message:h,buffers:a}}else return{message:JSON.stringify(f),buffers:[]}}e.serializeWebviewMessage=b;function D(f){switch(f.constructor.name){case"Int8Array":return 1;case"Uint8Array":return 2;case"Uint8ClampedArray":return 3;case"Int16Array":return 4;case"Uint16Array":return 5;case"Int32Array":return 6;case"Uint32Array":return 7;case"Float32Array":return 8;case"Float64Array":return 9;case"BigInt64Array":return 10;case"BigUint64Array":return 11}}function T(f,v){const m=v.map(a=>{const r=new ArrayBuffer(a.byteLength);return new Uint8Array(r).set(a.buffer),r}),S=v.length?(a,r)=>{if(r&&typeof r=="object"&&r.$$vscode_array_buffer_reference$$){const i=r,{index:s}=i,o=m[s];if(i.view)switch(i.view.type){case 1:return new Int8Array(o,i.view.byteOffset,i.view.byteLength/Int8Array.BYTES_PER_ELEMENT);case 2:return new Uint8Array(o,i.view.byteOffset,i.view.byteLength/Uint8Array.BYTES_PER_ELEMENT);case 3:return new Uint8ClampedArray(o,i.view.byteOffset,i.view.byteLength/Uint8ClampedArray.BYTES_PER_ELEMENT);case 4:return new Int16Array(o,i.view.byteOffset,i.view.byteLength/Int16Array.BYTES_PER_ELEMENT);case 5:return new Uint16Array(o,i.view.byteOffset,i.view.byteLength/Uint16Array.BYTES_PER_ELEMENT);case 6:return new Int32Array(o,i.view.byteOffset,i.view.byteLength/Int32Array.BYTES_PER_ELEMENT);case 7:return new Uint32Array(o,i.view.byteOffset,i.view.byteLength/Uint32Array.BYTES_PER_ELEMENT);case 8:return new Float32Array(o,i.view.byteOffset,i.view.byteLength/Float32Array.BYTES_PER_ELEMENT);case 9:return new Float64Array(o,i.view.byteOffset,i.view.byteLength/Float64Array.BYTES_PER_ELEMENT);case 10:return new BigInt64Array(o,i.view.byteOffset,i.view.byteLength/BigInt64Array.BYTES_PER_ELEMENT);case 11:return new BigUint64Array(o,i.view.byteOffset,i.view.byteLength/BigUint64Array.BYTES_PER_ELEMENT);default:throw new Error("Unknown array buffer view type")}return o}return r}:void 0;return{message:JSON.parse(f,S),arrayBuffers:m}}e.deserializeWebviewMessage=T}),define(Q[1248],Y([1,0,20,62]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTransferFileCache=void 0;class b{constructor(){this.requestIdPool=0,this.dataTransferFiles=new Map}add(T){const f=this.requestIdPool++;return this.dataTransferFiles.set(f,(0,t.coalesce)(Array.from(T,([,v])=>v.asFile()))),{id:f,dispose:()=>{this.dataTransferFiles.delete(f)}}}async resolveFileData(T,f){const v=this.dataTransferFiles.get(T);if(!v)throw new Error("No data transfer found");const m=v.find(S=>S.id===f);if(!m)throw new Error("No matching file found in data transfer");return y.VSBuffer.wrap(await m.data())}dispose(){this.dataTransferFiles.clear()}}e.DataTransferFileCache=b}),define(Q[904],Y([1,0,4,6,13,8,88]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeMenuActions=void 0;class f extends t.Disposable{get primaryActions(){return this._primaryActions}get secondaryActions(){return this._secondaryActions}constructor(S,h,a,r){super(),this.options=h,this.menuService=a,this.contextKeyService=r,this._primaryActions=[],this._secondaryActions=[],this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this.disposables=this._register(new t.DisposableStore),this.menu=this._register(a.createMenu(S,r)),this._register(this.menu.onDidChange(()=>this.updateActions())),this.updateActions()}updateActions(){this.disposables.clear(),this._primaryActions=[],this._secondaryActions=[],(0,T.createAndFillInActionBarActions)(this.menu,this.options,{primary:this._primaryActions,secondary:this._secondaryActions}),this.disposables.add(this.updateSubmenus([...this._primaryActions,...this._secondaryActions],{})),this._onDidChange.fire()}updateSubmenus(S,h){const a=new t.DisposableStore;for(const r of S)if(r instanceof b.SubmenuItemAction&&!h[r.item.submenu.id]){const i=h[r.item.submenu.id]=a.add(this.menuService.createMenu(r.item.submenu,this.contextKeyService));a.add(i.onDidChange(()=>this.updateActions())),a.add(this.updateSubmenus(r.actions,h))}return a}}let v=class extends t.Disposable{constructor(S,h,a,r,i){super(),this.menuId=S,this.contextMenuId=h,this.options=a,this.contextKeyService=r,this.menuService=i,this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this.menuActions=this._register(new f(S,this.options,i,r)),this._register(this.menuActions.onDidChange(()=>this._onDidChange.fire()))}getPrimaryActions(){return this.menuActions.primaryActions}getSecondaryActions(){return this.menuActions.secondaryActions}getContextMenuActions(){const S=[];if(this.contextMenuId){const h=this.menuService.createMenu(this.contextMenuId,this.contextKeyService);(0,T.createAndFillInActionBarActions)(h,this.options,{primary:[],secondary:S}),h.dispose()}return S}};e.CompositeMenuActions=v,e.CompositeMenuActions=v=fe([O(3,D.IContextKeyService),O(4,b.IMenuService)],v)}),define(Q[3464],Y([1,0,2521,286,18,30,41,10,13,105,52,81]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class a extends v.Action2{static{this.ID="workbench.action.keybindingsReference"}static{this.AVAILABLE=!!(b.isLinux?y.default.keyboardShortcutsUrlLinux:b.isMacintosh?y.default.keyboardShortcutsUrlMac:y.default.keyboardShortcutsUrlWin)}constructor(){super({id:a.ID,title:{value:(0,t.localize)(0,null),mnemonicTitle:(0,t.localize)(1,null),original:"Keyboard Shortcuts Reference"},category:h.Categories.Help,f1:!0,keybinding:{weight:200,when:null,primary:(0,m.KeyChord)(2089,2096)},menu:{id:v.MenuId.MenubarHelpMenu,group:"2_reference",order:1}})}run(n){const g=n.get(S.IProductService),w=n.get(T.IOpenerService),E=b.isLinux?g.keyboardShortcutsUrlLinux:b.isMacintosh?g.keyboardShortcutsUrlMac:g.keyboardShortcutsUrlWin;E&&w.open(f.URI.parse(E))}}class r extends v.Action2{static{this.ID="workbench.action.openVideoTutorialsUrl"}static{this.AVAILABLE=!!y.default.introductoryVideosUrl}constructor(){super({id:r.ID,title:{value:(0,t.localize)(2,null),mnemonicTitle:(0,t.localize)(3,null),original:"Video Tutorials"},category:h.Categories.Help,f1:!0,menu:{id:v.MenuId.MenubarHelpMenu,group:"2_reference",order:2}})}run(n){const g=n.get(S.IProductService),w=n.get(T.IOpenerService);g.introductoryVideosUrl&&w.open(f.URI.parse(g.introductoryVideosUrl))}}class i extends v.Action2{static{this.ID="workbench.action.openTipsAndTricksUrl"}static{this.AVAILABLE=!!y.default.tipsAndTricksUrl}constructor(){super({id:i.ID,title:{value:(0,t.localize)(4,null),mnemonicTitle:(0,t.localize)(5,null),original:"Tips and Tricks"},category:h.Categories.Help,f1:!0,menu:{id:v.MenuId.MenubarHelpMenu,group:"2_reference",order:3}})}run(n){const g=n.get(S.IProductService),w=n.get(T.IOpenerService);g.tipsAndTricksUrl&&w.open(f.URI.parse(g.tipsAndTricksUrl))}}class s extends v.Action2{static{this.ID="workbench.action.openDocumentationUrl"}static{this.AVAILABLE=!!(b.isWeb?y.default.serverDocumentationUrl:y.default.documentationUrl)}constructor(){super({id:s.ID,title:{value:(0,t.localize)(6,null),mnemonicTitle:(0,t.localize)(7,null),original:"Documentation"},category:h.Categories.Help,f1:!0,menu:{id:v.MenuId.MenubarHelpMenu,group:"1_welcome",order:3}})}run(n){const g=n.get(S.IProductService),w=n.get(T.IOpenerService),E=b.isWeb?g.serverDocumentationUrl:g.documentationUrl;E&&w.open(f.URI.parse(E))}}class o extends v.Action2{static{this.ID="workbench.action.openNewsletterSignupUrl"}static{this.AVAILABLE=!!y.default.newsletterSignupUrl}constructor(){super({id:o.ID,title:{value:(0,t.localize)(8,null),original:"Signup for the VS Code Newsletter"},category:h.Categories.Help,f1:!0})}run(n){const g=n.get(S.IProductService),w=n.get(T.IOpenerService),E=n.get(D.ITelemetryService);w.open(f.URI.parse(`${g.newsletterSignupUrl}?machineId=${encodeURIComponent(E.machineId)}`))}}class u extends v.Action2{static{this.ID="workbench.action.openYouTubeUrl"}static{this.AVAILABLE=!!y.default.youTubeUrl}constructor(){super({id:u.ID,title:{value:(0,t.localize)(9,null),mnemonicTitle:(0,t.localize)(10,null),original:"Join Us on YouTube"},category:h.Categories.Help,f1:!0,menu:{id:v.MenuId.MenubarHelpMenu,group:"3_feedback",order:1}})}run(n){const g=n.get(S.IProductService),w=n.get(T.IOpenerService);g.youTubeUrl&&w.open(f.URI.parse(g.youTubeUrl))}}class d extends v.Action2{static{this.ID="workbench.action.openRequestFeatureUrl"}static{this.AVAILABLE=!!y.default.requestFeatureUrl}constructor(){super({id:d.ID,title:{value:(0,t.localize)(11,null),mnemonicTitle:(0,t.localize)(12,null),original:"Search Feature Requests"},category:h.Categories.Help,f1:!0,menu:{id:v.MenuId.MenubarHelpMenu,group:"3_feedback",order:2}})}run(n){const g=n.get(S.IProductService),w=n.get(T.IOpenerService);g.requestFeatureUrl&&w.open(f.URI.parse(g.requestFeatureUrl))}}class p extends v.Action2{static{this.ID="workbench.action.openLicenseUrl"}static{this.AVAILABLE=!!(b.isWeb?y.default.serverLicense:y.default.licenseUrl)}constructor(){super({id:p.ID,title:{value:(0,t.localize)(13,null),mnemonicTitle:(0,t.localize)(14,null),original:"View License"},category:h.Categories.Help,f1:!0,menu:{id:v.MenuId.MenubarHelpMenu,group:"4_legal",order:1}})}run(n){const g=n.get(S.IProductService),w=n.get(T.IOpenerService),E=b.isWeb?g.serverLicenseUrl:g.licenseUrl;if(E)if(b.language){const C=E.indexOf("?")>0?"&":"?";w.open(f.URI.parse(`${E}${C}lang=${b.language}`))}else w.open(f.URI.parse(E))}}class c extends v.Action2{static{this.ID="workbench.action.openPrivacyStatementUrl"}static{this.AVAILABE=!!y.default.privacyStatementUrl}constructor(){super({id:c.ID,title:{value:(0,t.localize)(15,null),mnemonicTitle:(0,t.localize)(16,null),original:"Privacy Statement"},category:h.Categories.Help,f1:!0,menu:{id:v.MenuId.MenubarHelpMenu,group:"4_legal",order:2}})}run(n){const g=n.get(S.IProductService),w=n.get(T.IOpenerService);g.privacyStatementUrl&&w.open(f.URI.parse(g.privacyStatementUrl))}}a.AVAILABLE&&(0,v.registerAction2)(a),r.AVAILABLE&&(0,v.registerAction2)(r),i.AVAILABLE&&(0,v.registerAction2)(i),s.AVAILABLE&&(0,v.registerAction2)(s),o.AVAILABLE&&(0,v.registerAction2)(o),u.AVAILABLE&&(0,v.registerAction2)(u),d.AVAILABLE&&(0,v.registerAction2)(d),p.AVAILABLE&&(0,v.registerAction2)(p),c.AVAILABE&&(0,v.registerAction2)(c)}),define(Q[3465],Y([1,0,113,179,90,1117,20,8,833,671,1126,28,1120,404]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function i(p){p&&p.getHTMLElement()!==document.activeElement&&p.domFocus()}async function s(p,c){if(!b.WorkbenchListSelectionNavigation.getValue(p.contextKeyService))return c(p);const l=p.getFocus(),n=p.getSelection();await c(p);const g=p.getFocus();if(n.length>1||!(0,T.equals)(l,n)||(0,T.equals)(l,g))return;const w=new KeyboardEvent("keydown");p.setSelection(g,w)}async function o(p,c){if(!p)return;await s(p,c);const l=p.getFocus();l.length&&p.reveal(l[0]),p.setAnchor(l[0]),i(p)}t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusDown",weight:200,when:b.WorkbenchListFocusContextKey,primary:18,mac:{primary:18,secondary:[300]},handler:(p,c)=>{o(p.get(b.IListService).lastFocusedList,async l=>{const n=new KeyboardEvent("keydown");await l.focusNext(typeof c=="number"?c:1,!1,n)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusUp",weight:200,when:b.WorkbenchListFocusContextKey,primary:16,mac:{primary:16,secondary:[302]},handler:(p,c)=>{o(p.get(b.IListService).lastFocusedList,async l=>{const n=new KeyboardEvent("keydown");await l.focusPrevious(typeof c=="number"?c:1,!1,n)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusPageDown",weight:200,when:b.WorkbenchListFocusContextKey,primary:12,handler:p=>{o(p.get(b.IListService).lastFocusedList,async c=>{const l=new KeyboardEvent("keydown");await c.focusNextPage(l)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusPageUp",weight:200,when:b.WorkbenchListFocusContextKey,primary:11,handler:p=>{o(p.get(b.IListService).lastFocusedList,async c=>{const l=new KeyboardEvent("keydown");await c.focusPreviousPage(l)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusFirst",weight:200,when:b.WorkbenchListFocusContextKey,primary:14,handler:p=>{o(p.get(b.IListService).lastFocusedList,async c=>{const l=new KeyboardEvent("keydown");await c.focusFirst(l)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusLast",weight:200,when:b.WorkbenchListFocusContextKey,primary:13,handler:p=>{o(p.get(b.IListService).lastFocusedList,async c=>{const l=new KeyboardEvent("keydown");await c.focusLast(l)})}});function u(p,c){if(p instanceof y.List||p instanceof D.PagedList||p instanceof a.Table){const l=p,n=l.getFocus()?l.getFocus()[0]:void 0,g=l.getSelection();g&&typeof n=="number"&&g.indexOf(n)>=0?l.setSelection(g.filter(w=>w!==c)):typeof n=="number"&&l.setSelection(g.concat(n))}else if(p instanceof v.ObjectTree||p instanceof S.DataTree||p instanceof m.AsyncDataTree){const l=p,n=l.getFocus()?l.getFocus()[0]:void 0;if(c===n)return;const g=l.getSelection(),w=new KeyboardEvent("keydown",{shiftKey:!0});g&&g.indexOf(n)>=0?l.setSelection(g.filter(E=>E!==c),w):l.setSelection(g.concat(n),w)}}t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expandSelectionDown",weight:200,when:f.ContextKeyExpr.and(b.WorkbenchListFocusContextKey,b.WorkbenchListSupportsMultiSelectContextKey),primary:1042,handler:(p,c)=>{const l=p.get(b.IListService).lastFocusedList;if(!l)return;const n=l.getFocus()?l.getFocus()[0]:void 0,g=new KeyboardEvent("keydown");l.focusNext(typeof c=="number"?c:1,!1,g),u(l,n);const w=l.getFocus();w.length&&l.reveal(w[0]),i(l)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expandSelectionUp",weight:200,when:f.ContextKeyExpr.and(b.WorkbenchListFocusContextKey,b.WorkbenchListSupportsMultiSelectContextKey),primary:1040,handler:(p,c)=>{const l=p.get(b.IListService).lastFocusedList;if(!l)return;const n=l.getFocus()?l.getFocus()[0]:void 0,g=new KeyboardEvent("keydown");l.focusPrevious(typeof c=="number"?c:1,!1,g),u(l,n);const w=l.getFocus();w.length&&l.reveal(w[0]),i(l)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.collapse",weight:200,when:f.ContextKeyExpr.and(b.WorkbenchListFocusContextKey,f.ContextKeyExpr.or(b.WorkbenchTreeElementCanCollapse,b.WorkbenchTreeElementHasParent)),primary:15,mac:{primary:15,secondary:[2064]},handler:p=>{const c=p.get(b.IListService).lastFocusedList;if(!c||!(c instanceof v.ObjectTree||c instanceof S.DataTree||c instanceof m.AsyncDataTree))return;const l=c,n=l.getFocus();if(n.length===0)return;const g=n[0];if(!l.collapse(g)){const w=l.getParentElement(g);w&&o(c,E=>{const C=new KeyboardEvent("keydown");E.setFocus([w],C)})}}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.collapseAll",weight:200,when:b.WorkbenchListFocusContextKey,primary:2063,mac:{primary:2063,secondary:[3088]},handler:p=>{const c=p.get(b.IListService).lastFocusedList;c&&!(c instanceof y.List||c instanceof D.PagedList||c instanceof a.Table)&&c.collapseAll()}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.collapseAllToFocus",weight:200,when:b.WorkbenchListFocusContextKey,handler:p=>{const c=p.get(b.IListService).lastFocusedList,l=(0,b.getSelectionKeyboardEvent)("keydown",!0);if(c instanceof v.ObjectTree||c instanceof S.DataTree||c instanceof m.AsyncDataTree){const n=c,g=n.getFocus();g.length>0&&n.collapse(g[0],!0),n.setSelection(g,l),n.setAnchor(g[0])}}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusParent",weight:200,when:b.WorkbenchListFocusContextKey,handler:p=>{const c=p.get(b.IListService).lastFocusedList;if(!c||!(c instanceof v.ObjectTree||c instanceof S.DataTree||c instanceof m.AsyncDataTree))return;const l=c,n=l.getFocus();if(n.length===0)return;const g=n[0],w=l.getParentElement(g);w&&o(c,E=>{const C=new KeyboardEvent("keydown");E.setFocus([w],C)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expand",weight:200,when:f.ContextKeyExpr.and(b.WorkbenchListFocusContextKey,f.ContextKeyExpr.or(b.WorkbenchTreeElementCanExpand,b.WorkbenchTreeElementHasChild)),primary:17,handler:p=>{const c=p.get(b.IListService).lastFocusedList;if(c){if(c instanceof v.ObjectTree||c instanceof S.DataTree){const l=c.getFocus();if(l.length===0)return;const n=l[0];if(!c.expand(n)){const g=c.getFirstElementChild(n);g&&c.getNode(g).visible&&o(c,E=>{const C=new KeyboardEvent("keydown");E.setFocus([g],C)})}}else if(c instanceof m.AsyncDataTree){const l=c.getFocus();if(l.length===0)return;const n=l[0];c.expand(n).then(g=>{if(n&&!g){const w=c.getFirstElementChild(n);w&&c.getNode(w).visible&&o(c,C=>{const I=new KeyboardEvent("keydown");C.setFocus([w],I)})}})}}}});function d(p,c){const l=p.get(b.IListService).lastFocusedList,n=(0,b.getSelectionKeyboardEvent)("keydown",c);if(l instanceof y.List||l instanceof D.PagedList||l instanceof a.Table){const g=l;g.setSelection(g.getFocus(),n),g.setAnchor(g.getFocus()[0])}else if(l instanceof v.ObjectTree||l instanceof S.DataTree||l instanceof m.AsyncDataTree){const g=l,w=g.getFocus();if(w.length>0){let E=!0;(g.expandOnlyOnTwistieClick===!0||typeof g.expandOnlyOnTwistieClick!="boolean"&&g.expandOnlyOnTwistieClick(w[0]))&&(E=!1),E&&g.toggleCollapsed(w[0])}g.setSelection(w,n),g.setAnchor(w[0])}}t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.select",weight:200,when:b.WorkbenchListFocusContextKey,primary:3,mac:{primary:3,secondary:[2066]},handler:p=>{d(p,!1)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.selectAndPreserveFocus",weight:200,when:b.WorkbenchListFocusContextKey,handler:p=>{d(p,!0)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.selectAll",weight:200,when:f.ContextKeyExpr.and(b.WorkbenchListFocusContextKey,b.WorkbenchListSupportsMultiSelectContextKey),primary:2079,handler:p=>{const c=p.get(b.IListService).lastFocusedList;if(c instanceof y.List||c instanceof D.PagedList||c instanceof a.Table){const l=c,n=new KeyboardEvent("keydown");l.setSelection((0,T.range)(l.length),n)}else if(c instanceof v.ObjectTree||c instanceof S.DataTree||c instanceof m.AsyncDataTree){const l=c,n=l.getFocus(),g=l.getSelection();let w;n.length>0&&(g.length===0||!g.includes(n[0]))&&(w=n[0]),!w&&g.length>0&&(w=g[0]);let E;w?E=l.getParentElement(w):E=void 0;const C=[],I=A=>{for(const k of A.children)k.visible&&(C.push(k.element),k.collapsed||I(k))};I(l.getNode(E)),E&&g.length===C.length&&C.unshift(E);const _=new KeyboardEvent("keydown");l.setSelection(C,_)}}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.toggleSelection",weight:200,when:b.WorkbenchListFocusContextKey,primary:3075,handler:p=>{const c=p.get(b.IListService).lastFocusedList;if(!c)return;const l=c.getFocus();if(l.length===0)return;const n=c.getSelection(),g=n.indexOf(l[0]);g>-1?c.setSelection([...n.slice(0,g),...n.slice(g+1)]):c.setSelection([...n,l[0]])}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.toggleExpand",weight:200,when:b.WorkbenchListFocusContextKey,primary:10,handler:p=>{const c=p.get(b.IListService).lastFocusedList;if(c instanceof v.ObjectTree||c instanceof S.DataTree||c instanceof m.AsyncDataTree){const l=c,n=l.getFocus();if(n.length>0&&l.isCollapsible(n[0])){l.toggleCollapsed(n[0]);return}}d(p,!0)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.clear",weight:200,when:f.ContextKeyExpr.and(b.WorkbenchListFocusContextKey,b.WorkbenchListHasSelectionOrFocus),primary:9,handler:p=>{const c=p.get(b.IListService).lastFocusedList;if(!c)return;const l=c.getSelection(),n=new KeyboardEvent("keydown");if(l.length>1)if(b.WorkbenchListSelectionNavigation.getValue(c.contextKeyService)){const w=c.getFocus();c.setSelection([w[0]],n)}else c.setSelection([],n);else c.setSelection([],n),c.setFocus([],n);c.setAnchor(void 0)}}),h.CommandsRegistry.registerCommand({id:"list.triggerTypeNavigation",handler:p=>{p.get(b.IListService).lastFocusedList?.triggerTypeNavigation()}}),h.CommandsRegistry.registerCommand({id:"list.toggleFindMode",handler:p=>{const c=p.get(b.IListService).lastFocusedList;if(c instanceof r.AbstractTree||c instanceof m.AsyncDataTree){const l=c;l.findMode=l.findMode===r.TreeFindMode.Filter?r.TreeFindMode.Highlight:r.TreeFindMode.Filter}}}),h.CommandsRegistry.registerCommandAlias("list.toggleKeyboardNavigation","list.triggerTypeNavigation"),h.CommandsRegistry.registerCommandAlias("list.toggleFilterOnType","list.toggleFindMode"),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.find",weight:200,when:f.ContextKeyExpr.and(b.RawWorkbenchListFocusContextKey,b.WorkbenchListSupportsFind),primary:2084,secondary:[61],handler:p=>{const c=p.get(b.IListService).lastFocusedList;c instanceof y.List||c instanceof D.PagedList||c instanceof a.Table||(c instanceof r.AbstractTree||c instanceof m.AsyncDataTree)&&c.openFind()}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.closeFind",weight:200,when:f.ContextKeyExpr.and(b.RawWorkbenchListFocusContextKey,b.WorkbenchTreeFindOpen),primary:9,handler:p=>{const c=p.get(b.IListService).lastFocusedList;(c instanceof r.AbstractTree||c instanceof m.AsyncDataTree)&&c.closeFind()}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollUp",weight:200,when:f.ContextKeyExpr.and(b.WorkbenchListFocusContextKey,b.WorkbenchListScrollAtTopContextKey?.negate()),primary:2064,handler:p=>{const c=p.get(b.IListService).lastFocusedList;c&&(c.scrollTop-=10)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollDown",weight:200,when:f.ContextKeyExpr.and(b.WorkbenchListFocusContextKey,b.WorkbenchListScrollAtBottomContextKey?.negate()),primary:2066,handler:p=>{const c=p.get(b.IListService).lastFocusedList;c&&(c.scrollTop+=10)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollLeft",weight:200,when:b.WorkbenchListFocusContextKey,handler:p=>{const c=p.get(b.IListService).lastFocusedList;c&&(c.scrollLeft-=10)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollRight",weight:200,when:b.WorkbenchListFocusContextKey,handler:p=>{const c=p.get(b.IListService).lastFocusedList;c&&(c.scrollLeft+=10)}})}),define(Q[1249],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parentOriginHash=void 0;async function t(b,D){if(!crypto.subtle)throw new Error("'crypto.subtle' is not available so webviews will not work. This is likely because the editor is not running in a secure context (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");const T=JSON.stringify({parentOrigin:b,salt:D}),v=new TextEncoder().encode(T),m=await crypto.subtle.digest("sha-256",v);return y(m)}e.parentOriginHash=t;function y(b){const T=Array.from(new Uint8Array(b)).map(f=>f.toString(16).padStart(2,"0")).join("");return BigInt(`0x${T}`).toString(32).padStart(52,"0")}}),define(Q[3466],Y([1,0,2538,49,111,11,63,1127,4,7,38,52,68,260,5,209,54]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserDialogHandler=void 0;let d=class extends y.AbstractDialogHandler{static{u=this}static{this.ALLOWABLE_COMMANDS=["copy","cut","editor.action.selectAll","editor.action.clipboardCopyAction","editor.action.clipboardCutAction","editor.action.clipboardPasteAction"]}constructor(c,l,n,g,w,E){super(),this.logService=c,this.layoutService=l,this.keybindingService=n,this.instantiationService=g,this.productService=w,this.clipboardService=E,this.markdownRenderer=this.instantiationService.createInstance(s.MarkdownRenderer,{})}async prompt(c){this.logService.trace("DialogService#prompt",c.message);const l=this.getPromptButtons(c),{button:n,checkboxChecked:g}=await this.doShow(c.type,c.message,l,c.detail,c.cancelButton?l.length-1:-1,c.checkbox,void 0,typeof c?.custom=="object"?c.custom:void 0);return this.getPromptResult(c,n,g)}async confirm(c){this.logService.trace("DialogService#confirm",c.message);const l=this.getConfirmationButtons(c),{button:n,checkboxChecked:g}=await this.doShow(c.type??"question",c.message,l,c.detail,l.length-1,c.checkbox,void 0,typeof c?.custom=="object"?c.custom:void 0);return{confirmed:n===0,checkboxChecked:g}}async input(c){this.logService.trace("DialogService#input",c.message);const l=this.getInputButtons(c),{button:n,checkboxChecked:g,values:w}=await this.doShow(c.type??"question",c.message,l,c.detail,l.length-1,c?.checkbox,c.inputs,typeof c.custom=="object"?c.custom:void 0);return{confirmed:n===0,checkboxChecked:g,values:w}}async about(){const c=w=>(0,t.localize)(0,null,this.productService.version||"Unknown",this.productService.commit||"Unknown",this.productService.date?`${this.productService.date}${w?" ("+(0,r.fromNow)(new Date(this.productService.date),!0)+")":""}`:"Unknown",navigator.userAgent),l=c(!0),n=c(!1),{button:g}=await this.doShow(T.default.Info,this.productService.nameLong,[(0,t.localize)(1,null),(0,t.localize)(2,null)],l,1);g===0&&this.clipboardService.writeText(n)}async doShow(c,l,n,g,w,E,C,I){const _=new v.DisposableStore,A=I?R=>{R.classList.add(...I.classes||[]),I.markdownDetails?.forEach(M=>{const N=this.markdownRenderer.render(M.markdown);R.appendChild(N.element),N.element.classList.add(...M.classes||[]),_.add(N)})}:void 0,k=new f.Dialog(this.layoutService.container,l,n,{detail:g,cancelId:w,type:this.getDialogType(c),keyEventProcessor:R=>{const M=this.keybindingService.softDispatch(R,this.layoutService.container);M.kind===2&&M.commandId&&u.ALLOWABLE_COMMANDS.indexOf(M.commandId)===-1&&m.EventHelper.stop(R,!0)},renderBody:A,icon:I?.icon,disableCloseAction:I?.disableCloseAction,buttonDetails:I?.buttonDetails,checkboxLabel:E?.label,checkboxChecked:E?.checked,inputs:C,buttonStyles:o.defaultButtonStyles,checkboxStyles:o.defaultCheckboxStyles,inputBoxStyles:o.defaultInputBoxStyles,dialogStyles:o.defaultDialogStyles});_.add(k);const L=await k.show();return _.dispose(),L}};e.BrowserDialogHandler=d,e.BrowserDialogHandler=d=u=fe([O(0,D.ILogService),O(1,b.ILayoutService),O(2,S.IKeybindingService),O(3,i.IInstantiationService),O(4,h.IProductService),O(5,a.IClipboardService)],d)}),define(Q[718],Y([1,0,6,2542,56,35,5,16]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbsConfig=e.BreadcrumbsService=e.IBreadcrumbsService=void 0,e.IBreadcrumbsService=(0,T.createDecorator)("IEditorBreadcrumbsService");class v{constructor(){this._map=new Map}register(h,a){if(this._map.has(h))throw new Error(`group (${h}) has already a widget`);return this._map.set(h,a),{dispose:()=>this._map.delete(h)}}getWidget(h){return this._map.get(h)}}e.BreadcrumbsService=v,(0,D.registerSingleton)(e.IBreadcrumbsService,v,1);class m{constructor(){}static{this.IsEnabled=m._stub("breadcrumbs.enabled")}static{this.UseQuickPick=m._stub("breadcrumbs.useQuickPick")}static{this.FilePath=m._stub("breadcrumbs.filePath")}static{this.SymbolPath=m._stub("breadcrumbs.symbolPath")}static{this.SymbolSortOrder=m._stub("breadcrumbs.symbolSortOrder")}static{this.Icons=m._stub("breadcrumbs.icons")}static{this.TitleScrollbarSizing=m._stub("workbench.editor.titleScrollbarSizing")}static{this.FileExcludes=m._stub("files.exclude")}static _stub(h){return{bindTo(a){const r=new t.Emitter,i=a.onDidChangeConfiguration(s=>{s.affectsConfiguration(h)&&r.fire(void 0)});return new class{constructor(){this.name=h,this.onDidChange=r.event}getValue(s){return s?a.getValue(h,s):a.getValue(h)}updateValue(s,o){return o?a.updateValue(h,s,o):a.updateValue(h,s)}dispose(){i.dispose(),r.dispose()}}}}}}e.BreadcrumbsConfig=m,f.Registry.as(b.Extensions.Configuration).registerConfiguration({id:"breadcrumbs",title:(0,y.localize)(0,null),order:101,type:"object",properties:{"breadcrumbs.enabled":{description:(0,y.localize)(1,null),type:"boolean",default:!0},"breadcrumbs.filePath":{description:(0,y.localize)(2,null),type:"string",default:"on",enum:["on","off","last"],enumDescriptions:[(0,y.localize)(3,null),(0,y.localize)(4,null),(0,y.localize)(5,null)]},"breadcrumbs.symbolPath":{description:(0,y.localize)(6,null),type:"string",default:"on",enum:["on","off","last"],enumDescriptions:[(0,y.localize)(7,null),(0,y.localize)(8,null),(0,y.localize)(9,null)]},"breadcrumbs.symbolSortOrder":{description:(0,y.localize)(10,null),type:"string",default:"position",scope:5,enum:["position","name","type"],enumDescriptions:[(0,y.localize)(11,null),(0,y.localize)(12,null),(0,y.localize)(13,null)]},"breadcrumbs.icons":{description:(0,y.localize)(14,null),type:"boolean",default:!0},"breadcrumbs.showFiles":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(15,null)},"breadcrumbs.showModules":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(16,null)},"breadcrumbs.showNamespaces":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(17,null)},"breadcrumbs.showPackages":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(18,null)},"breadcrumbs.showClasses":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(19,null)},"breadcrumbs.showMethods":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(20,null)},"breadcrumbs.showProperties":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(21,null)},"breadcrumbs.showFields":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(22,null)},"breadcrumbs.showConstructors":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(23,null)},"breadcrumbs.showEnums":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(24,null)},"breadcrumbs.showInterfaces":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(25,null)},"breadcrumbs.showFunctions":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(26,null)},"breadcrumbs.showVariables":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(27,null)},"breadcrumbs.showConstants":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(28,null)},"breadcrumbs.showStrings":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(29,null)},"breadcrumbs.showNumbers":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(30,null)},"breadcrumbs.showBooleans":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(31,null)},"breadcrumbs.showArrays":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(32,null)},"breadcrumbs.showObjects":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(33,null)},"breadcrumbs.showKeys":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(34,null)},"breadcrumbs.showNull":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(35,null)},"breadcrumbs.showEnumMembers":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(36,null)},"breadcrumbs.showStructs":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(37,null)},"breadcrumbs.showEvents":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(38,null)},"breadcrumbs.showOperators":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(39,null)},"breadcrumbs.showTypeParameters":{type:"boolean",default:!0,scope:5,markdownDescription:(0,y.localize)(40,null)}}})}),define(Q[416],Y([1,0,7,17]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fillActiveEditorViewState=e.getEditorPartOptions=e.impactsEditorPartOptions=e.DEFAULT_EDITOR_PART_OPTIONS=e.DEFAULT_EDITOR_MAX_DIMENSIONS=e.DEFAULT_EDITOR_MIN_DIMENSIONS=void 0,e.DEFAULT_EDITOR_MIN_DIMENSIONS=new t.Dimension(220,70),e.DEFAULT_EDITOR_MAX_DIMENSIONS=new t.Dimension(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),e.DEFAULT_EDITOR_PART_OPTIONS={showTabs:!0,highlightModifiedTabs:!1,tabCloseButton:"right",tabSizing:"fit",tabSizingFixedMinWidth:50,tabSizingFixedMaxWidth:160,pinnedTabSizing:"normal",preventPinnedEditorClose:"keyboardAndMouse",titleScrollbarSizing:"default",focusRecentEditorAfterClose:!0,showIcons:!0,hasIcons:!0,enablePreview:!0,openPositioning:"right",openSideBySideDirection:"right",closeEmptyGroups:!0,labelFormat:"default",splitSizing:"auto",splitOnDragAndDrop:!0,centeredLayoutFixedWidth:!1,doubleClickTabToToggleEditorGroupSizes:!0};function b(f){return f.affectsConfiguration("workbench.editor")||f.affectsConfiguration("workbench.iconTheme")}e.impactsEditorPartOptions=b;function D(f,v){const m={...e.DEFAULT_EDITOR_PART_OPTIONS,hasIcons:v.getFileIconTheme().hasFileIcons},S=f.getValue();if(S?.workbench?.editor)if(Object.assign(m,S.workbench.editor),(0,y.isObject)(S.workbench.editor.autoLockGroups)){m.autoLockGroups=new Set;for(const[h,a]of Object.entries(S.workbench.editor.autoLockGroups))a===!0&&m.autoLockGroups.add(h)}else m.autoLockGroups=void 0;return m}e.getEditorPartOptions=D;function T(f,v,m){return!v||!f.activeEditor||v.matches(f.activeEditor)?{...m,viewState:f.activeEditorPane?.getViewState()}:m||Object.create(null)}e.fillActiveEditorViewState=T}),define(Q[3467],Y([1,0,6,4,485,9,8,126]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabFocusMode=e.editorTabFocusContextKey=void 0,e.editorTabFocusContextKey=new T.RawContextKey("editorTabFocusMode",!1,!0);let v=class extends y.Disposable{constructor(S,h){super(),this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._editorContext=e.editorTabFocusContextKey.bindTo(S),this._terminalContext=f.terminalTabFocusModeContextKey.bindTo(S);const a=h.getValue("editor.tabFocusMode"),r=h.getValue("terminal.integrated.tabFocusMode")??a;this._editorContext.set(a),this._terminalContext.set(r),b.TabFocus.setTabFocusMode(a,"editorFocus"),b.TabFocus.setTabFocusMode(r,"terminalFocus");const i=new Set;i.add("focusedView"),this._register(S.onDidChangeContext(s=>{if(s.affectsSome(i)){const o=S.getContextKeyValue("focusedView")==="terminal",u=o?"terminalFocus":"editorFocus";if(this._previousViewContext===u)return;o?this._editorContext.reset():this._terminalContext.reset(),this._previousViewContext=u,this._onDidChange.fire()}})),this._register(h.onDidChangeConfiguration(s=>{if(s.affectsConfiguration("editor.tabFocusMode")){const o=h.getValue("editor.tabFocusMode");b.TabFocus.setTabFocusMode(o,"editorFocus"),this._editorContext.set(o),h.getValue("terminal.integrated.tabFocusMode")===null&&(h.updateValue("terminal.integrated.tabFocusMode",o),b.TabFocus.setTabFocusMode(o,"terminalFocus"),this._terminalContext.set(o)),this._onDidChange.fire()}else if(s.affectsConfiguration("terminal.integrated.tabFocusMode")){const o=h.getValue("terminal.integrated.tabFocusMode")??h.getValue("editor.tabFocusMode");h.updateValue("terminal.integrated.tabFocusMode",o),b.TabFocus.setTabFocusMode(o,"terminalFocus"),this._terminalContext.set(o),this._onDidChange.fire()}})),b.TabFocus.onDidChangeTabFocus(()=>{const s=S.getContextKeyValue("focusedView")==="terminal"?"terminalFocus":"editorFocus";s==="terminalFocus"?this._terminalContext.set(b.TabFocus.getTabFocusMode(s)):this._editorContext.set(b.TabFocus.getTabFocusMode(s))})}};e.TabFocusMode=v,e.TabFocusMode=v=fe([O(0,T.IContextKeyService),O(1,D.IConfigurationService)],v)}),define(Q[3468],Y([1,0,87,2563,4,132,23,6]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsAlerts=void 0;class v extends b.Disposable{constructor(S){super(),this.model=S;for(const h of S.notifications)this.triggerAriaAlert(h);this.registerListeners()}registerListeners(){this._register(this.model.onDidChangeNotification(S=>this.onDidChangeNotification(S)))}onDidChangeNotification(S){S.kind===0&&(this.triggerAriaAlert(S.item),S.item.severity===T.Severity.Error&&(S.item.message.original instanceof Error?console.error(S.item.message.original):console.error((0,D.toErrorMessage)(S.item.message.linkedText.toString(),!0))))}triggerAriaAlert(S){if(S.priority===T.NotificationPriority.SILENT)return;const h=S.onDidChangeContent(a=>{a.kind===1&&this.doTriggerAriaAlert(S)});f.Event.once(S.onDidClose)(()=>h.dispose()),this.doTriggerAriaAlert(S)}doTriggerAriaAlert(S){let h;S.severity===T.Severity.Error?h=(0,y.localize)(0,null,S.message.linkedText.toString()):S.severity===T.Severity.Warning?h=(0,y.localize)(1,null,S.message.linkedText.toString()):h=(0,y.localize)(2,null,S.message.linkedText.toString()),(0,t.alert)(h)}}e.NotificationsAlerts=v}),define(Q[1250],Y([1,0,4,23,30,122]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsTelemetry=e.notificationToMetrics=void 0;function T(v,m,S){return{id:(0,D.hash)(v.toString()).toString(),silent:S,source:m||"core"}}e.notificationToMetrics=T;let f=class extends t.Disposable{constructor(m,S){super(),this.telemetryService=m,this.notificationService=S,this.registerListeners()}registerListeners(){this._register(this.notificationService.onDidAddNotification(m=>{const S=m.source&&typeof m.source!="string"?m.source.id:m.source;this.telemetryService.publicLog2("notification:show",T(m.message,S,m.priority===y.NotificationPriority.SILENT))})),this._register(this.notificationService.onDidRemoveNotification(m=>{const S=m.source&&typeof m.source!="string"?m.source.id:m.source;this.telemetryService.publicLog2("notification:close",T(m.message,S,m.priority===y.NotificationPriority.SILENT))}))}};e.NotificationsTelemetry=f,e.NotificationsTelemetry=f=fe([O(0,b.ITelemetryService),O(1,y.INotificationService)],f)}),define(Q[1251],Y([1,0,7,446,273,32,6,4,2579,54]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeItemCheckbox=e.CheckboxStateHandler=void 0;class S extends f.Disposable{constructor(){super(...arguments),this._onDidChangeCheckboxState=this._register(new T.Emitter),this.onDidChangeCheckboxState=this._onDidChangeCheckboxState.event}setCheckboxState(r){this._onDidChangeCheckboxState.fire([r])}}e.CheckboxStateHandler=S;class h extends f.Disposable{static{this.checkboxClass="custom-view-tree-node-item-checkbox"}constructor(r,i,s){super(),this.checkboxStateHandler=i,this.hoverDelegate=s,this.isDisposed=!1,this._onDidChangeState=new T.Emitter,this.onDidChangeState=this._onDidChangeState.event,this.checkboxContainer=r}render(r){r.checkbox&&(this.toggle?(this.toggle.checked=r.checkbox.isChecked,this.toggle.setIcon(this.toggle.checked?D.Codicon.check:void 0)):this.createCheckbox(r))}createCheckbox(r){r.checkbox&&(this.toggle=new b.Toggle({isChecked:r.checkbox.isChecked,title:"",icon:r.checkbox.isChecked?D.Codicon.check:void 0,...m.defaultToggleStyles}),this.setHover(r.checkbox),this.setAccessibilityInformation(r.checkbox),this.toggle.domNode.classList.add(h.checkboxClass),t.append(this.checkboxContainer,this.toggle.domNode),this.registerListener(r))}registerListener(r){this.toggle&&(this._register({dispose:()=>this.removeCheckbox()}),this._register(this.toggle),this._register(this.toggle.onChange(()=>{this.setCheckbox(r)})))}setHover(r){this.toggle&&(this.hover?this.hover.update(r.tooltip):(this.hover=(0,y.setupCustomHover)(this.hoverDelegate,this.toggle.domNode,this.checkboxHoverContent(r)),this._register(this.hover)))}setCheckbox(r){this.toggle&&r.checkbox&&(r.checkbox.isChecked=this.toggle.checked,this.toggle.setIcon(this.toggle.checked?D.Codicon.check:void 0),this.setHover(r.checkbox),this.setAccessibilityInformation(r.checkbox),this.checkboxStateHandler.setCheckboxState(r))}checkboxHoverContent(r){return r.tooltip?r.tooltip:r.isChecked?(0,v.localize)(0,null):(0,v.localize)(1,null)}setAccessibilityInformation(r){this.toggle&&r.accessibilityInformation&&(this.toggle.domNode.ariaLabel=r.accessibilityInformation.label,r.accessibilityInformation.role&&(this.toggle.domNode.role=r.accessibilityInformation.role))}removeCheckbox(){const r=this.checkboxContainer.children;for(const i of r)this.checkboxContainer.removeChild(i)}}e.TreeItemCheckbox=h}),define(Q[905],Y([1,0,14,7,29,4,36,2581,5,308,8,32,38,501,13,221,88,142,6,54]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilterWidget=e.viewFilterSubmenu=void 0;const c=new i.MenuId("menu.view.filter");e.viewFilterSubmenu=new i.MenuId("submenu.view.filter"),i.MenuRegistry.appendMenuItem(c,{submenu:e.viewFilterSubmenu,title:(0,f.localize)(0,null),group:"navigation",icon:h.Codicon.filter});class l extends o.SubmenuEntryActionViewItem{constructor(){super(...arguments),this._checked=!1}set checked(w){this._checked!==w&&(this._checked=w,this.updateChecked())}updateChecked(){this.element&&this.element.classList.toggle("checked",this._checked)}render(w){super.render(w),this.updateChecked()}}let n=class extends u.Widget{get onDidFocus(){return this.focusTracker.onDidFocus}get onDidBlur(){return this.focusTracker.onDidBlur}constructor(w,E,C,I,_){super(),this.options=w,this.instantiationService=E,this.contextViewService=C,this.keybindingService=_,this._onDidChangeFilterText=this._register(new d.Emitter),this.onDidChangeFilterText=this._onDidChangeFilterText.event,this.isMoreFiltersChecked=!1,this.delayedFilterUpdate=new t.Delayer(400),this._register((0,D.toDisposable)(()=>this.delayedFilterUpdate.cancel())),w.focusContextKey&&(this.focusContextKey=new S.RawContextKey(w.focusContextKey,!1).bindTo(I)),this.element=y.$(".viewpane-filter"),[this.filterInputBox,this.focusTracker]=this.createInput(this.element);const A=y.append(this.element,y.$(".viewpane-filter-controls"));this.filterBadge=this.createBadge(A),this.toolbar=this._register(this.createToolBar(A)),this.adjustInputBox()}hasFocus(){return this.filterInputBox.hasFocus()}focus(){this.filterInputBox.focus()}blur(){this.filterInputBox.blur()}updateBadge(w){this.filterBadge.classList.toggle("hidden",!w),this.filterBadge.textContent=w||"",this.adjustInputBox()}setFilterText(w){this.filterInputBox.value=w}getFilterText(){return this.filterInputBox.value}getHistory(){return this.filterInputBox.getHistory()}layout(w){this.element.parentElement?.classList.toggle("grow",w>700),this.element.classList.toggle("small",w<400),this.adjustInputBox()}checkMoreFilters(w){this.isMoreFiltersChecked=w,this.moreFiltersActionViewItem&&(this.moreFiltersActionViewItem.checked=w)}createInput(w){const E=this._register(this.instantiationService.createInstance(m.ContextScopedHistoryInputBox,w,this.contextViewService,{placeholder:this.options.placeholder,ariaLabel:this.options.ariaLabel,history:this.options.history||[],showHistoryHint:()=>(0,r.showHistoryKeybindingHint)(this.keybindingService),inputBoxStyles:p.defaultInputBoxStyles}));this.options.text&&(E.value=this.options.text),this._register(E.onDidChange(I=>this.delayedFilterUpdate.trigger(()=>this.onDidInputChange(E)))),this._register(y.addStandardDisposableListener(E.inputElement,y.EventType.KEY_DOWN,I=>this.onInputKeyDown(I,E))),this._register(y.addStandardDisposableListener(w,y.EventType.KEY_DOWN,this.handleKeyboardEvent)),this._register(y.addStandardDisposableListener(w,y.EventType.KEY_UP,this.handleKeyboardEvent)),this._register(y.addStandardDisposableListener(E.inputElement,y.EventType.CLICK,I=>{I.stopPropagation(),I.preventDefault()}));const C=this._register(y.trackFocus(E.inputElement));return this.focusContextKey&&(this._register(C.onDidFocus(()=>this.focusContextKey.set(!0))),this._register(C.onDidBlur(()=>this.focusContextKey.set(!1))),this._register((0,D.toDisposable)(()=>this.focusContextKey.reset()))),[E,C]}createBadge(w){const E=y.append(w,y.$(".viewpane-filter-badge.hidden"));return E.style.backgroundColor=(0,T.asCssVariable)(T.badgeBackground),E.style.color=(0,T.asCssVariable)(T.badgeForeground),E.style.border=`1px solid ${(0,T.asCssVariable)(T.contrastBorder)}`,E}createToolBar(w){return this.instantiationService.createInstance(s.MenuWorkbenchToolBar,w,c,{hiddenItemStrategy:-1,actionViewItemProvider:E=>{if(E instanceof i.SubmenuItemAction&&E.item.submenu.id===e.viewFilterSubmenu.id)return this.moreFiltersActionViewItem=this.instantiationService.createInstance(l,E,void 0),this.moreFiltersActionViewItem.checked=this.isMoreFiltersChecked,this.moreFiltersActionViewItem}})}onDidInputChange(w){w.addToHistory(),this._onDidChangeFilterText.fire(w.value)}adjustInputBox(){this.filterInputBox.inputElement.style.paddingRight=this.element.classList.contains("small")||this.filterBadge.classList.contains("hidden")?"25px":"150px"}handleKeyboardEvent(w){(w.equals(10)||w.equals(15)||w.equals(17))&&w.stopPropagation()}onInputKeyDown(w,E){let C=!1;w.equals(2)&&!this.toolbar.isEmpty()&&(this.toolbar.focus(),C=!0),C&&(w.stopPropagation(),w.preventDefault())}};e.FilterWidget=n,e.FilterWidget=n=fe([O(1,v.IInstantiationService),O(2,b.IContextViewService),O(3,S.IContextKeyService),O(4,a.IKeybindingService)],n)}),define(Q[461],Y([1,0,2585,8,38,43]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getQuickNavigateHandler=e.defaultQuickAccessContext=e.defaultQuickAccessContextKeyValue=e.inQuickPickContext=e.InQuickPickContextKey=e.inQuickPickContextKeyValue=void 0,e.inQuickPickContextKeyValue="inQuickOpen",e.InQuickPickContextKey=new y.RawContextKey(e.inQuickPickContextKeyValue,!1,(0,t.localize)(0,null)),e.inQuickPickContext=y.ContextKeyExpr.has(e.inQuickPickContextKeyValue),e.defaultQuickAccessContextKeyValue="inFilesPicker",e.defaultQuickAccessContext=y.ContextKeyExpr.and(e.inQuickPickContext,y.ContextKeyExpr.has(e.defaultQuickAccessContextKeyValue));function T(f,v){return m=>{const S=m.get(b.IKeybindingService),h=m.get(D.IQuickInputService),r={keybindings:S.lookupKeybindings(f)};h.navigate(!!v,r)}}e.getQuickNavigateHandler=T}),define(Q[3469],Y([1,0,2524,13,113,43,38,28,461]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const m={primary:2094,secondary:[2083],mac:{primary:2094,secondary:void 0}};b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.closeQuickOpen",weight:200,when:v.inQuickPickContext,primary:9,secondary:[1033],handler:u=>u.get(D.IQuickInputService).cancel()}),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.acceptSelectedQuickOpenItem",weight:200,when:v.inQuickPickContext,primary:0,handler:u=>u.get(D.IQuickInputService).accept()}),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.alternativeAcceptSelectedQuickOpenItem",weight:200,when:v.inQuickPickContext,primary:0,handler:u=>u.get(D.IQuickInputService).accept({ctrlCmd:!0,alt:!1})}),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.focusQuickOpen",weight:200,when:v.inQuickPickContext,primary:0,handler:u=>{u.get(D.IQuickInputService).focus()}});const S="workbench.action.quickOpenNavigateNextInFilePicker";b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:S,weight:200+50,handler:(0,v.getQuickNavigateHandler)(S,!0),when:v.defaultQuickAccessContext,primary:m.primary,secondary:m.secondary,mac:m.mac});const h="workbench.action.quickOpenNavigatePreviousInFilePicker";b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:h,weight:200+50,handler:(0,v.getQuickNavigateHandler)(h,!1),when:v.defaultQuickAccessContext,primary:m.primary|1024,secondary:[m.secondary[0]|1024],mac:{primary:m.mac.primary|1024,secondary:void 0}}),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickPickManyToggle",weight:200,when:v.inQuickPickContext,primary:0,handler:u=>{u.get(D.IQuickInputService).toggle()}}),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickInputBack",weight:200+50,when:v.inQuickPickContext,primary:0,win:{primary:527},mac:{primary:344},linux:{primary:2648},handler:u=>{u.get(D.IQuickInputService).back()}}),(0,y.registerAction2)(class extends y.Action2{constructor(){super({id:"workbench.action.quickOpen",title:{value:(0,t.localize)(0,null),original:"Go to File..."},description:{description:"Quick access",args:[{name:"prefix",schema:{type:"string"}}]},keybinding:{weight:200,primary:m.primary,secondary:m.secondary,mac:m.mac},f1:!0})}run(d,p){d.get(D.IQuickInputService).quickAccess.show(typeof p=="string"?p:void 0,{preserveValue:typeof p=="string"})}}),(0,y.registerAction2)(class extends y.Action2{constructor(){super({id:"workbench.action.quickOpenWithModes",title:(0,t.localize)(1,null),menu:{id:y.MenuId.CommandCenter,order:100}})}run(d){d.get(D.IQuickInputService).quickAccess.show(void 0,{preserveValue:!0,providerOptions:{includeHelp:!0,from:"commandCenter"}})}}),f.CommandsRegistry.registerCommand("workbench.action.quickOpenPreviousEditor",async u=>{u.get(D.IQuickInputService).quickAccess.show("",{itemActivation:D.ItemActivation.SECOND})});class a extends y.Action2{constructor(d,p,c,l,n){super({id:d,title:p,f1:!0,keybinding:n}),this.id=d,this.next=c,this.quickNavigate=l}async run(d){const p=d.get(T.IKeybindingService),c=d.get(D.IQuickInputService),l=p.lookupKeybindings(this.id),n=this.quickNavigate?{keybindings:l}:void 0;c.navigate(this.next,n)}}class r extends a{constructor(){super("workbench.action.quickOpenNavigateNext",{value:(0,t.localize)(2,null),original:"Navigate Next in Quick Open"},!0,!0)}}class i extends a{constructor(){super("workbench.action.quickOpenNavigatePrevious",{value:(0,t.localize)(3,null),original:"Navigate Previous in Quick Open"},!1,!0)}}class s extends a{constructor(){super("workbench.action.quickOpenSelectNext",{value:(0,t.localize)(4,null),original:"Select Next in Quick Open"},!0,!1,{weight:200+50,when:v.inQuickPickContext,primary:0,mac:{primary:300}})}}class o extends a{constructor(){super("workbench.action.quickOpenSelectPrevious",{value:(0,t.localize)(5,null),original:"Select Previous in Quick Open"},!1,!1,{weight:200+50,when:v.inQuickPickContext,primary:0,mac:{primary:302}})}}(0,y.registerAction2)(s),(0,y.registerAction2)(o),(0,y.registerAction2)(r),(0,y.registerAction2)(i)}),define(Q[1252],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ACCOUNTS_ACTIVITY_ID=e.GLOBAL_ACTIVITY_ID=void 0,e.GLOBAL_ACTIVITY_ID="workbench.action.globalActivity",e.ACCOUNTS_ACTIVITY_ID="workbench.action.accountsActivity"}),define(Q[3470],Y([1,0,14,6,4]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogsModel=void 0;class D extends b.Disposable{constructor(){super(...arguments),this.dialogs=[],this._onWillShowDialog=this._register(new y.Emitter),this.onWillShowDialog=this._onWillShowDialog.event,this._onDidShowDialog=this._register(new y.Emitter),this.onDidShowDialog=this._onDidShowDialog.event}show(f){const v=new t.DeferredPromise,m={args:f,close:S=>{this.dialogs.splice(0,1),v.complete(S),this._onDidShowDialog.fire()}};return this.dialogs.push(m),this._onWillShowDialog.fire(),{item:m,result:v.p}}}e.DialogsModel=D}),define(Q[47],Y([1,0,2590,17,10,4,5,16,25,22,132,34,63]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createEditorOpenError=e.isEditorOpenError=e.isTextEditorViewState=e.EditorsOrder=e.pathsToEditors=e.CloseDirection=e.EditorResourceAccessor=e.preventEditorClose=e.EditorCloseMethod=e.SideBySideEditor=e.GroupModelChangeKind=e.EditorCloseContext=e.isEditorIdentifier=e.isEditorInputWithOptionsAndGroup=e.isEditorInputWithOptions=e.createTooLargeFileError=e.isDiffEditorInput=e.isSideBySideEditorInput=e.isEditorInput=e.AbstractEditorInput=e.EditorInputCapabilities=e.SaveSourceRegistry=e.SaveReason=e.Verbosity=e.isResourceMergeEditorInput=e.isUntitledResourceEditorInput=e.isResourceSideBySideEditorInput=e.isResourceDiffEditorInput=e.isResourceEditorInput=e.findViewStateForEditor=e.isEditorPaneWithSelection=e.EditorPaneSelectionCompareResult=e.EditorPaneSelectionChangeReason=e.BINARY_DIFF_EDITOR_ID=e.TEXT_DIFF_EDITOR_ID=e.SIDE_BY_SIDE_EDITOR_ID=e.DEFAULT_EDITOR_ASSOCIATION=e.EditorExtensions=void 0,e.EditorExtensions={EditorPane:"workbench.contributions.editors",EditorFactory:"workbench.contributions.editor.inputFactories"},e.DEFAULT_EDITOR_ASSOCIATION={id:"default",displayName:(0,t.localize)(0,null),providerDisplayName:(0,t.localize)(1,null)},e.SIDE_BY_SIDE_EDITOR_ID="workbench.editor.sidebysideEditor",e.TEXT_DIFF_EDITOR_ID="workbench.editors.textDiffEditor",e.BINARY_DIFF_EDITOR_ID="workbench.editors.binaryResourceDiffEditor";var r;(function(J){J[J.PROGRAMMATIC=1]="PROGRAMMATIC",J[J.USER=2]="USER",J[J.EDIT=3]="EDIT",J[J.NAVIGATION=4]="NAVIGATION",J[J.JUMP=5]="JUMP"})(r||(e.EditorPaneSelectionChangeReason=r={}));var i;(function(J){J[J.IDENTICAL=1]="IDENTICAL",J[J.SIMILAR=2]="SIMILAR",J[J.DIFFERENT=3]="DIFFERENT"})(i||(e.EditorPaneSelectionCompareResult=i={}));function s(J){const j=J;return!!j&&typeof j.getSelection=="function"&&!!j.onDidChangeSelection}e.isEditorPaneWithSelection=s;function o(J,j,ee){for(const X of ee.visibleEditorPanes)if(X.group.id===j&&J.matches(X.input))return X.getViewState()}e.findViewStateForEditor=o;function u(J){if(I(J))return!1;const j=J;return b.URI.isUri(j?.resource)}e.isResourceEditorInput=u;function d(J){if(I(J))return!1;const j=J;return j?.original!==void 0&&j.modified!==void 0}e.isResourceDiffEditorInput=d;function p(J){if(I(J)||d(J))return!1;const j=J;return j?.primary!==void 0&&j.secondary!==void 0}e.isResourceSideBySideEditorInput=p;function c(J){if(I(J))return!1;const j=J;return j?j.resource===void 0||j.resource.scheme===m.Schemas.untitled||j.forceUntitled===!0:!1}e.isUntitledResourceEditorInput=c;function l(J){if(I(J))return!1;const j=J;return b.URI.isUri(j?.base?.resource)&&b.URI.isUri(j?.input1?.resource)&&b.URI.isUri(j?.input2?.resource)&&b.URI.isUri(j?.result?.resource)}e.isResourceMergeEditorInput=l;var n;(function(J){J[J.SHORT=0]="SHORT",J[J.MEDIUM=1]="MEDIUM",J[J.LONG=2]="LONG"})(n||(e.Verbosity=n={}));var g;(function(J){J[J.EXPLICIT=1]="EXPLICIT",J[J.AUTO=2]="AUTO",J[J.FOCUS_CHANGE=3]="FOCUS_CHANGE",J[J.WINDOW_CHANGE=4]="WINDOW_CHANGE"})(g||(e.SaveReason=g={}));class w{constructor(){this.mapIdToSaveSource=new Map}registerSource(j,ee){let X=this.mapIdToSaveSource.get(j);return X||(X={source:j,label:ee},this.mapIdToSaveSource.set(j,X)),X.source}getSourceLabel(j){return this.mapIdToSaveSource.get(j)?.label??j}}e.SaveSourceRegistry=new w;var E;(function(J){J[J.None=0]="None",J[J.Readonly=2]="Readonly",J[J.Untitled=4]="Untitled",J[J.Singleton=8]="Singleton",J[J.RequiresTrust=16]="RequiresTrust",J[J.CanSplitInGroup=32]="CanSplitInGroup",J[J.ForceDescription=64]="ForceDescription",J[J.CanDropIntoEditor=128]="CanDropIntoEditor",J[J.MultipleEditors=256]="MultipleEditors",J[J.Scratchpad=512]="Scratchpad"})(E||(e.EditorInputCapabilities=E={}));class C extends D.Disposable{}e.AbstractEditorInput=C;function I(J){return J instanceof C}e.isEditorInput=I;function _(J){const j=J;return b.URI.isUri(j?.preferredResource)}function A(J){const j=J;return I(j?.primary)&&I(j?.secondary)}e.isSideBySideEditorInput=A;function k(J){const j=J;return I(j?.modified)&&I(j?.original)}e.isDiffEditorInput=k;function L(J,j,ee,X,te){return ie(X,[(0,h.toAction)({id:"workbench.action.openLargeFile",label:(0,t.localize)(2,null),run:()=>{const Z={...ee,limits:{size:Number.MAX_VALUE}};J.openEditor(j,Z)}}),(0,h.toAction)({id:"workbench.action.configureEditorLargeFileConfirmation",label:(0,t.localize)(3,null),run:()=>te.openUserSettings({query:"workbench.editorLargeFileConfirmation"})})],{forceMessage:!0,forceSeverity:a.default.Warning})}e.createTooLargeFileError=L;function R(J){return I(J?.editor)}e.isEditorInputWithOptions=R;function M(J){const j=J;return R(J)&&j?.group!==void 0}e.isEditorInputWithOptionsAndGroup=M;function N(J){const j=J;return typeof j?.groupId=="number"&&I(j.editor)}e.isEditorIdentifier=N;var P;(function(J){J[J.UNKNOWN=0]="UNKNOWN",J[J.REPLACE=1]="REPLACE",J[J.MOVE=2]="MOVE",J[J.UNPIN=3]="UNPIN"})(P||(e.EditorCloseContext=P={}));var x;(function(J){J[J.GROUP_ACTIVE=0]="GROUP_ACTIVE",J[J.GROUP_INDEX=1]="GROUP_INDEX",J[J.GROUP_LOCKED=2]="GROUP_LOCKED",J[J.EDITOR_OPEN=3]="EDITOR_OPEN",J[J.EDITOR_CLOSE=4]="EDITOR_CLOSE",J[J.EDITOR_MOVE=5]="EDITOR_MOVE",J[J.EDITOR_ACTIVE=6]="EDITOR_ACTIVE",J[J.EDITOR_LABEL=7]="EDITOR_LABEL",J[J.EDITOR_CAPABILITIES=8]="EDITOR_CAPABILITIES",J[J.EDITOR_PIN=9]="EDITOR_PIN",J[J.EDITOR_STICKY=10]="EDITOR_STICKY",J[J.EDITOR_DIRTY=11]="EDITOR_DIRTY",J[J.EDITOR_WILL_DISPOSE=12]="EDITOR_WILL_DISPOSE"})(x||(e.GroupModelChangeKind=x={}));var F;(function(J){J[J.PRIMARY=1]="PRIMARY",J[J.SECONDARY=2]="SECONDARY",J[J.BOTH=3]="BOTH",J[J.ANY=4]="ANY"})(F||(e.SideBySideEditor=F={}));class V{getOriginalUri(j,ee){if(!j)return;if(l(j))return e.EditorResourceAccessor.getOriginalUri(j.result,ee);if(ee?.supportSideBySide){const{primary:te,secondary:Z}=this.getSideEditors(j);if(te&&Z){if(ee?.supportSideBySide===F.BOTH)return{primary:this.getOriginalUri(te,{filterByScheme:ee.filterByScheme}),secondary:this.getOriginalUri(Z,{filterByScheme:ee.filterByScheme})};if(ee?.supportSideBySide===F.ANY)return this.getOriginalUri(te,{filterByScheme:ee.filterByScheme})??this.getOriginalUri(Z,{filterByScheme:ee.filterByScheme});j=ee.supportSideBySide===F.PRIMARY?te:Z}}if(d(j)||p(j)||l(j))return;const X=_(j)?j.preferredResource:j.resource;return!X||!ee||!ee.filterByScheme?X:this.filterUri(X,ee.filterByScheme)}getSideEditors(j){return A(j)||p(j)?{primary:j.primary,secondary:j.secondary}:k(j)||d(j)?{primary:j.modified,secondary:j.original}:{primary:void 0,secondary:void 0}}getCanonicalUri(j,ee){if(!j)return;if(l(j))return e.EditorResourceAccessor.getCanonicalUri(j.result,ee);if(ee?.supportSideBySide){const{primary:te,secondary:Z}=this.getSideEditors(j);if(te&&Z){if(ee?.supportSideBySide===F.BOTH)return{primary:this.getCanonicalUri(te,{filterByScheme:ee.filterByScheme}),secondary:this.getCanonicalUri(Z,{filterByScheme:ee.filterByScheme})};if(ee?.supportSideBySide===F.ANY)return this.getCanonicalUri(te,{filterByScheme:ee.filterByScheme})??this.getCanonicalUri(Z,{filterByScheme:ee.filterByScheme});j=ee.supportSideBySide===F.PRIMARY?te:Z}}if(d(j)||p(j)||l(j))return;const X=j.resource;return!X||!ee||!ee.filterByScheme?X:this.filterUri(X,ee.filterByScheme)}filterUri(j,ee){if(Array.isArray(ee)){if(ee.some(X=>j.scheme===X))return j}else if(ee===j.scheme)return j}}var W;(function(J){J[J.UNKNOWN=0]="UNKNOWN",J[J.KEYBOARD=1]="KEYBOARD",J[J.MOUSE=2]="MOUSE"})(W||(e.EditorCloseMethod=W={}));function z(J,j,ee,X){if(!J.isSticky(j))return!1;switch(X.preventPinnedEditorClose){case"keyboardAndMouse":return ee===W.MOUSE||ee===W.KEYBOARD;case"mouse":return ee===W.MOUSE;case"keyboard":return ee===W.KEYBOARD}return!1}e.preventEditorClose=z,e.EditorResourceAccessor=new V;var B;(function(J){J[J.LEFT=0]="LEFT",J[J.RIGHT=1]="RIGHT"})(B||(e.CloseDirection=B={}));class K{constructor(){this.editorSerializerConstructors=new Map,this.editorSerializerInstances=new Map}start(j){const ee=this.instantiationService=j.get(T.IInstantiationService);for(const[X,te]of this.editorSerializerConstructors)this.createEditorSerializer(X,te,ee);this.editorSerializerConstructors.clear()}createEditorSerializer(j,ee,X){const te=X.createInstance(ee);this.editorSerializerInstances.set(j,te)}registerFileEditorFactory(j){if(this.fileEditorFactory)throw new Error("Can only register one file editor factory.");this.fileEditorFactory=j}getFileEditorFactory(){return(0,y.assertIsDefined)(this.fileEditorFactory)}registerEditorSerializer(j,ee){if(this.editorSerializerConstructors.has(j)||this.editorSerializerInstances.has(j))throw new Error(`A editor serializer with type ID '${j}' was already registered.`);return this.instantiationService?this.createEditorSerializer(j,ee,this.instantiationService):this.editorSerializerConstructors.set(j,ee),(0,D.toDisposable)(()=>{this.editorSerializerConstructors.delete(j),this.editorSerializerInstances.delete(j)})}getEditorSerializer(j){return this.editorSerializerInstances.get(typeof j=="string"?j:j.typeId)}}f.Registry.add(e.EditorExtensions.EditorFactory,new K);async function H(J,j,ee){return!J||!J.length?[]:await Promise.all(J.map(async X=>{const te=b.URI.revive(X.fileUri);if(!te){ee.info("Cannot resolve the path because it is not valid.",X);return}if(!await j.canHandleResource(te)){ee.info("Cannot resolve the path because it cannot be handled",X);return}let se=X.exists,re=X.type;if(typeof se!="boolean"||typeof re!="number")try{re=(await j.stat(te)).isDirectory?v.FileType.Directory:v.FileType.Unknown,se=!0}catch(le){ee.error(le),se=!1}if(!se&&X.openOnlyIfExists){ee.info("Cannot resolve the path because it does not exist",X);return}if(re===v.FileType.Directory){ee.info("Cannot resolve the path because it is a directory",X);return}const oe={...X.options,pinned:!0};return se?{resource:te,options:oe}:{resource:te,options:oe,forceUntitled:!0}}))}e.pathsToEditors=H;var U;(function(J){J[J.MOST_RECENTLY_ACTIVE=0]="MOST_RECENTLY_ACTIVE",J[J.SEQUENTIAL=1]="SEQUENTIAL"})(U||(e.EditorsOrder=U={}));function G(J){const j=J;if(!j)return!1;const ee=j;if(ee.modified)return G(ee.modified);const X=j;return!!(X.contributionsState&&X.viewState&&Array.isArray(X.cursorState))}e.isTextEditorViewState=G;function $(J){return(0,S.isErrorWithActions)(J)}e.isEditorOpenError=$;function ie(J,j,ee){const X=(0,S.createErrorWithActions)(J,j);return X.forceMessage=ee?.forceMessage,X.forceSeverity=ee?.forceSeverity,X.allowDialog=ee?.allowDialog,X}e.createEditorOpenError=ie}),define(Q[1253],Y([1,0,47,16,5]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorDescriptorService=e.SERVICE_ID=e.EditorDescriptorService=void 0;class D{constructor(){}getEditor(f){return y.Registry.as(t.EditorExtensions.EditorPane).getEditorPane(f)}}e.EditorDescriptorService=D,e.SERVICE_ID="editorDescriptorService",e.IEditorDescriptorService=(0,b.createDecorator)(e.SERVICE_ID)}),define(Q[82],Y([1,0,4,2589,8,26,50,25,57,22,47]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.applyAvailableEditorIds=e.ResourceContextKey=e.getEnabledViewContainerContextKey=e.getVisbileViewContextKey=e.FocusedViewContext=e.PanelMaximizedContext=e.PanelVisibleContext=e.PanelAlignmentContext=e.PanelPositionContext=e.PanelFocusContext=e.ActivePanelContext=e.AuxiliaryBarVisibleContext=e.AuxiliaryBarFocusContext=e.ActiveAuxiliaryContext=e.NotificationsToastsVisibleContext=e.NotificationsCenterVisibleContext=e.NotificationFocusedContext=e.BannerFocused=e.StatusBarFocused=e.ActiveViewletContext=e.SidebarFocusContext=e.SideBarVisibleContext=e.EditorTabsVisibleContext=e.EditorAreaVisibleContext=e.SplitEditorsVertically=e.IsCenteredLayoutContext=e.InEditorZenModeContext=e.EditorsVisibleContext=e.SingleEditorGroupsContext=e.MultipleEditorGroupsContext=e.ActiveEditorGroupLockedContext=e.ActiveEditorGroupLastContext=e.ActiveEditorGroupIndexContext=e.ActiveEditorGroupEmptyContext=e.EditorGroupEditorsCountContext=e.SideBySideEditorActiveContext=e.TextCompareEditorActiveContext=e.TextCompareEditorVisibleContext=e.ActiveEditorAvailableEditorIdsContext=e.ActiveEditorContext=e.ActiveEditorCanSplitInGroupContext=e.ActiveEditorCanRevertContext=e.ActiveEditorCanToggleReadonlyContext=e.ActiveEditorReadonlyContext=e.ActiveEditorStickyContext=e.ActiveEditorLastInGroupContext=e.ActiveEditorFirstInGroupContext=e.ActiveEditorPinnedContext=e.ActiveEditorDirtyContext=e.EmbedderIdentifierContext=e.HasWebFileSystemAccess=e.IsFullscreenContext=e.TemporaryWorkspaceContext=e.VirtualWorkspaceContext=e.RemoteNameContext=e.DirtyWorkingCopiesContext=e.EmptyWorkspaceSupportContext=e.EnterMultiRootWorkspaceSupportContext=e.OpenFolderWorkspaceSupportContext=e.WorkspaceFolderCountContext=e.WorkbenchStateContext=void 0,e.WorkbenchStateContext=new b.RawContextKey("workbenchState",void 0,{type:"string",description:(0,y.localize)(0,null)}),e.WorkspaceFolderCountContext=new b.RawContextKey("workspaceFolderCount",0,(0,y.localize)(1,null)),e.OpenFolderWorkspaceSupportContext=new b.RawContextKey("openFolderWorkspaceSupport",!0,!0),e.EnterMultiRootWorkspaceSupportContext=new b.RawContextKey("enterMultiRootWorkspaceSupport",!0,!0),e.EmptyWorkspaceSupportContext=new b.RawContextKey("emptyWorkspaceSupport",!0,!0),e.DirtyWorkingCopiesContext=new b.RawContextKey("dirtyWorkingCopies",!1,(0,y.localize)(2,null)),e.RemoteNameContext=new b.RawContextKey("remoteName","",(0,y.localize)(3,null)),e.VirtualWorkspaceContext=new b.RawContextKey("virtualWorkspace","",(0,y.localize)(4,null)),e.TemporaryWorkspaceContext=new b.RawContextKey("temporaryWorkspace",!1,(0,y.localize)(5,null)),e.IsFullscreenContext=new b.RawContextKey("isFullscreen",!1,(0,y.localize)(6,null)),e.HasWebFileSystemAccess=new b.RawContextKey("hasWebFileSystemAccess",!1,!0),e.EmbedderIdentifierContext=new b.RawContextKey("embedderIdentifier",void 0,(0,y.localize)(7,null)),e.ActiveEditorDirtyContext=new b.RawContextKey("activeEditorIsDirty",!1,(0,y.localize)(8,null)),e.ActiveEditorPinnedContext=new b.RawContextKey("activeEditorIsNotPreview",!1,(0,y.localize)(9,null)),e.ActiveEditorFirstInGroupContext=new b.RawContextKey("activeEditorIsFirstInGroup",!1,(0,y.localize)(10,null)),e.ActiveEditorLastInGroupContext=new b.RawContextKey("activeEditorIsLastInGroup",!1,(0,y.localize)(11,null)),e.ActiveEditorStickyContext=new b.RawContextKey("activeEditorIsPinned",!1,(0,y.localize)(12,null)),e.ActiveEditorReadonlyContext=new b.RawContextKey("activeEditorIsReadonly",!1,(0,y.localize)(13,null)),e.ActiveEditorCanToggleReadonlyContext=new b.RawContextKey("activeEditorCanToggleReadonly",!0,(0,y.localize)(14,null)),e.ActiveEditorCanRevertContext=new b.RawContextKey("activeEditorCanRevert",!1,(0,y.localize)(15,null)),e.ActiveEditorCanSplitInGroupContext=new b.RawContextKey("activeEditorCanSplitInGroup",!0),e.ActiveEditorContext=new b.RawContextKey("activeEditor",null,{type:"string",description:(0,y.localize)(16,null)}),e.ActiveEditorAvailableEditorIdsContext=new b.RawContextKey("activeEditorAvailableEditorIds","",(0,y.localize)(17,null)),e.TextCompareEditorVisibleContext=new b.RawContextKey("textCompareEditorVisible",!1,(0,y.localize)(18,null)),e.TextCompareEditorActiveContext=new b.RawContextKey("textCompareEditorActive",!1,(0,y.localize)(19,null)),e.SideBySideEditorActiveContext=new b.RawContextKey("sideBySideEditorActive",!1,(0,y.localize)(20,null)),e.EditorGroupEditorsCountContext=new b.RawContextKey("groupEditorsCount",0,(0,y.localize)(21,null)),e.ActiveEditorGroupEmptyContext=new b.RawContextKey("activeEditorGroupEmpty",!1,(0,y.localize)(22,null)),e.ActiveEditorGroupIndexContext=new b.RawContextKey("activeEditorGroupIndex",0,(0,y.localize)(23,null)),e.ActiveEditorGroupLastContext=new b.RawContextKey("activeEditorGroupLast",!1,(0,y.localize)(24,null)),e.ActiveEditorGroupLockedContext=new b.RawContextKey("activeEditorGroupLocked",!1,(0,y.localize)(25,null)),e.MultipleEditorGroupsContext=new b.RawContextKey("multipleEditorGroups",!1,(0,y.localize)(26,null)),e.SingleEditorGroupsContext=e.MultipleEditorGroupsContext.toNegated(),e.EditorsVisibleContext=new b.RawContextKey("editorIsOpen",!1,(0,y.localize)(27,null)),e.InEditorZenModeContext=new b.RawContextKey("inZenMode",!1,(0,y.localize)(28,null)),e.IsCenteredLayoutContext=new b.RawContextKey("isCenteredLayout",!1,(0,y.localize)(29,null)),e.SplitEditorsVertically=new b.RawContextKey("splitEditorsVertically",!1,(0,y.localize)(30,null)),e.EditorAreaVisibleContext=new b.RawContextKey("editorAreaVisible",!0,(0,y.localize)(31,null)),e.EditorTabsVisibleContext=new b.RawContextKey("editorTabsVisible",!0,(0,y.localize)(32,null)),e.SideBarVisibleContext=new b.RawContextKey("sideBarVisible",!1,(0,y.localize)(33,null)),e.SidebarFocusContext=new b.RawContextKey("sideBarFocus",!1,(0,y.localize)(34,null)),e.ActiveViewletContext=new b.RawContextKey("activeViewlet","",(0,y.localize)(35,null)),e.StatusBarFocused=new b.RawContextKey("statusBarFocused",!1,(0,y.localize)(36,null)),e.BannerFocused=new b.RawContextKey("bannerFocused",!1,(0,y.localize)(37,null)),e.NotificationFocusedContext=new b.RawContextKey("notificationFocus",!0,(0,y.localize)(38,null)),e.NotificationsCenterVisibleContext=new b.RawContextKey("notificationCenterVisible",!1,(0,y.localize)(39,null)),e.NotificationsToastsVisibleContext=new b.RawContextKey("notificationToastsVisible",!1,(0,y.localize)(40,null)),e.ActiveAuxiliaryContext=new b.RawContextKey("activeAuxiliary","",(0,y.localize)(41,null)),e.AuxiliaryBarFocusContext=new b.RawContextKey("auxiliaryBarFocus",!1,(0,y.localize)(42,null)),e.AuxiliaryBarVisibleContext=new b.RawContextKey("auxiliaryBarVisible",!1,(0,y.localize)(43,null)),e.ActivePanelContext=new b.RawContextKey("activePanel","",(0,y.localize)(44,null)),e.PanelFocusContext=new b.RawContextKey("panelFocus",!1,(0,y.localize)(45,null)),e.PanelPositionContext=new b.RawContextKey("panelPosition","bottom",(0,y.localize)(46,null)),e.PanelAlignmentContext=new b.RawContextKey("panelAlignment","center",(0,y.localize)(47,null)),e.PanelVisibleContext=new b.RawContextKey("panelVisible",!1,(0,y.localize)(48,null)),e.PanelMaximizedContext=new b.RawContextKey("panelMaximized",!1,(0,y.localize)(49,null)),e.FocusedViewContext=new b.RawContextKey("focusedView","",(0,y.localize)(50,null));function a(o){return`view.${o}.visible`}e.getVisbileViewContextKey=a;function r(o){return`viewContainer.${o}.enabled`}e.getEnabledViewContainerContextKey=r;let i=class{static{h=this}static{this.Scheme=new b.RawContextKey("resourceScheme",void 0,{type:"string",description:(0,y.localize)(51,null)})}static{this.Filename=new b.RawContextKey("resourceFilename",void 0,{type:"string",description:(0,y.localize)(52,null)})}static{this.Dirname=new b.RawContextKey("resourceDirname",void 0,{type:"string",description:(0,y.localize)(53,null)})}static{this.Path=new b.RawContextKey("resourcePath",void 0,{type:"string",description:(0,y.localize)(54,null)})}static{this.LangId=new b.RawContextKey("resourceLangId",void 0,{type:"string",description:(0,y.localize)(55,null)})}static{this.Resource=new b.RawContextKey("resource",void 0,{type:"URI",description:(0,y.localize)(56,null)})}static{this.Extension=new b.RawContextKey("resourceExtname",void 0,{type:"string",description:(0,y.localize)(57,null)})}static{this.HasResource=new b.RawContextKey("resourceSet",void 0,{type:"boolean",description:(0,y.localize)(58,null)})}static{this.IsFileSystemResource=new b.RawContextKey("isFileSystemResource",void 0,{type:"boolean",description:(0,y.localize)(59,null)})}constructor(u,d,p,c){this._contextKeyService=u,this._fileService=d,this._languageService=p,this._modelService=c,this._disposables=new t.DisposableStore,this._schemeKey=h.Scheme.bindTo(this._contextKeyService),this._filenameKey=h.Filename.bindTo(this._contextKeyService),this._dirnameKey=h.Dirname.bindTo(this._contextKeyService),this._pathKey=h.Path.bindTo(this._contextKeyService),this._langIdKey=h.LangId.bindTo(this._contextKeyService),this._resourceKey=h.Resource.bindTo(this._contextKeyService),this._extensionKey=h.Extension.bindTo(this._contextKeyService),this._hasResource=h.HasResource.bindTo(this._contextKeyService),this._isFileSystemResource=h.IsFileSystemResource.bindTo(this._contextKeyService),this._disposables.add(d.onDidChangeFileSystemProviderRegistrations(()=>{const l=this.get();this._isFileSystemResource.set(!!(l&&d.hasProvider(l)))})),this._disposables.add(c.onModelAdded(l=>{(0,D.isEqual)(l.uri,this.get())&&this._setLangId()})),this._disposables.add(c.onModelLanguageChanged(l=>{(0,D.isEqual)(l.model.uri,this.get())&&this._setLangId()}))}dispose(){this._disposables.dispose()}_setLangId(){const u=this.get();if(!u){this._langIdKey.set(null);return}const d=this._modelService.getModel(u)?.getLanguageId()??this._languageService.guessLanguageIdByFilepathOrFirstLine(u);this._langIdKey.set(d)}set(u){u=u??void 0,!(0,D.isEqual)(this._value,u)&&(this._value=u,this._contextKeyService.bufferChangeEvents(()=>{this._resourceKey.set(u?u.toString():null),this._schemeKey.set(u?u.scheme:null),this._filenameKey.set(u?(0,D.basename)(u):null),this._dirnameKey.set(u?this.uriToPath((0,D.dirname)(u)):null),this._pathKey.set(u?this.uriToPath(u):null),this._setLangId(),this._extensionKey.set(u?(0,D.extname)(u):null),this._hasResource.set(!!u),this._isFileSystemResource.set(u?this._fileService.hasProvider(u):!1)}))}uriToPath(u){return u.scheme===m.Schemas.file?u.fsPath:u.path}reset(){this._value=void 0,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 this._value}};e.ResourceContextKey=i,e.ResourceContextKey=i=h=fe([O(0,b.IContextKeyService),O(1,f.IFileService),O(2,T.ILanguageService),O(3,v.IModelService)],i);function s(o,u,d){if(!u){o.set("");return}const p=u.resource,c=p?d.getEditors(p).map(l=>l.id):[];p?.scheme===m.Schemas.untitled&&u.editorId!==S.DEFAULT_EDITOR_ASSOCIATION.id?o.set(""):o.set(c.join(","))}e.applyAvailableEditorIds=s}),define(Q[163],Y([1,0,6,20,47,26]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorInput=void 0;class T extends b.AbstractEditorInput{constructor(){super(...arguments),this._onDidChangeDirty=this._register(new t.Emitter),this._onDidChangeLabel=this._register(new t.Emitter),this._onDidChangeCapabilities=this._register(new t.Emitter),this._onWillDispose=this._register(new t.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this.onDidChangeLabel=this._onDidChangeLabel.event,this.onDidChangeCapabilities=this._onDidChangeCapabilities.event,this.onWillDispose=this._onWillDispose.event,this.disposed=!1}get editorId(){}get capabilities(){return 2}hasCapability(v){return v===0?this.capabilities===0:(this.capabilities&v)!==0}isReadonly(){return this.hasCapability(2)}getName(){return`Editor ${this.typeId}`}getDescription(v){}getTitle(v){return this.getName()}getLabelExtraClasses(){return[]}getAriaLabel(){return this.getTitle(0)}getTelemetryDescriptor(){return{typeId:this.typeId}}isDirty(){return!1}isModified(){return this.isDirty()}isSaving(){return!1}async resolve(v){return null}async save(v,m){return this}async saveAs(v,m){return this}async revert(v,m){}async rename(v,m){}copy(){return this}matches(v){if((0,b.isEditorInput)(v))return this===v;const m=v.options?.override;return this.editorId!==m&&m!==void 0&&this.editorId!==void 0?!1:(0,D.isEqual)(this.resource,b.EditorResourceAccessor.getCanonicalUri(v))}prefersEditorPane(v){return(0,y.firstOrDefault)(v)}toUntyped(v){}isDisposed(){return this.disposed}dispose(){this.disposed||(this.disposed=!0,this._onWillDispose.fire()),super.dispose()}}e.EditorInput=T}),define(Q[1254],Y([1,0,163,6]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditDataResultsInput=void 0;class b extends t.EditorInput{constructor(T){super(),this._uri=T,this.onRestoreViewStateEmitter=new y.Emitter,this.onSaveViewStateEmitter=new y.Emitter,this._visible=!1,this._hasBootstrapped=!1}get editDataGridPanel(){return this._editDataGridPanel}set editDataGridPanel(T){this._editDataGridPanel=T}get typeId(){return b.ID}matches(T){return T instanceof b?T._uri===this._uri:!1}async resolve(T){return Promise.resolve(null)}supportsSplitEditor(){return!1}setBootstrappedTrue(){this._hasBootstrapped=!0}dispose(){this._disposeContainer(),super.dispose()}_disposeContainer(){if(!this._editorContainer)return;let T=this._editorContainer.parentNode;T&&(T.removeChild(this._editorContainer),this._editorContainer=void 0)}static get ID(){return"workbench.editorinputs.editDataResultsInput"}setContainer(T){this._disposeContainer(),this._editorContainer=T}get container(){return this._editorContainer}get hasBootstrapped(){return this._hasBootstrapped}get visible(){return this._visible}set visible(T){this._visible=T}get uri(){return unescape(this._uri)}get resource(){}}e.EditDataResultsInput=b}),define(Q[719],Y([1,0,163,10,58,117,57,50]),function(q,e,t,y,b,D,T,f){"use strict";var v;Object.defineProperty(e,"__esModule",{value:!0}),e.DashboardInput=void 0;let m=class extends t.EditorInput{static{v=this}static{this.ID="workbench.editorinputs.connectiondashboardinputs"}static{this.SCHEMA="sqldashboard"}get initializedPromise(){return this._initializedPromise}constructor(h,a,r,i){super(),this._connectionService=a,this.hasBootstrapped=!1,i.getModel(this.resource)||i.createModel("",r.createById("dashboard"),this.resource),this._initializedPromise=a.connectIfNotConnected(h,"dashboard").then(s=>{this._uri=s,this._connectionService.getConnectionInfo(s)&&(this._onConnectionChanged=this._connectionService.onConnectionChanged(u=>{u.connectionUri===s&&this._onDidChangeLabel.fire()}))})}setUniqueSelector(h){this._uniqueSelector=h}get typeId(){return v.ID}get resource(){return y.URI.from({scheme:"dashboard",path:"dashboard"})}getName(){if(!this.connectionProfile)return"";let h=this.connectionProfile.connectionName?this.connectionProfile.connectionName:this.connectionProfile.serverName;return!this.connectionProfile.connectionName&&this.connectionProfile.databaseName&&!this.isMasterMssql()&&(h=h+":"+this.connectionProfile.databaseName),h}getTitle(h){let a=this.connectionProfile.serverName;this.connectionProfile.databaseName&&!this.isMasterMssql()&&(a=a+":"+this.connectionProfile.databaseName);let r=this._connectionService.getNonDefaultOptions(this.connectionProfile),i=a+r;switch(h){case 2:return i;default:case 0:case 1:return this.getName()}}isMasterMssql(){return this.connectionProfile.providerName===D.mssqlProviderName&&this.connectionProfile.databaseName?.toLowerCase()==="master"}get uri(){return this._uri}dispose(){this._disposeContainer(),this._onConnectionChanged&&this._onConnectionChanged.dispose(),this._connectionService.disconnect(this._uri),super.dispose()}_disposeContainer(){if(!this._parentContainer)return;const h=this._parentContainer.parentNode;h&&h.removeChild(this._parentContainer)}set container(h){this._disposeContainer(),this._parentContainer=h}get container(){return this._parentContainer}supportsSplitEditor(){return!1}get connectionProfile(){return this._connectionService.getConnectionProfile(this._uri)}get hasInitialized(){return!!this._uniqueSelector}get uniqueSelector(){return this._uniqueSelector}matches(h){return h instanceof v&&v.profileMatches(this.connectionProfile,h.connectionProfile)}static profileMatches(h,a){return h&&a&&h.providerName===a.providerName&&h.serverName===a.serverName&&h.userName===a.userName&&h.authenticationType===a.authenticationType&&h.groupFullName===a.groupFullName}get tabColor(){return this._connectionService.getTabColorForUri(this.uri)}};e.DashboardInput=m,e.DashboardInput=m=v=fe([O(1,b.IConnectionManagementService),O(2,f.ILanguageService),O(3,T.IModelService)],m)}),define(Q[604],Y([1,0,256,346,1535,58,1959,163,23,6,59,17,10,55,3162,184]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.ProfilerInput=void 0;let u=class extends f.EditorInput{static{o=this}static{this.PROFILERNAME=T.localize(0,null)}static{this.ID="workbench.editorinputs.profilerinputs"}static{this.SCHEMA="profiler"}constructor(p,c,l,n,g){super(),this.connection=p,this.fileURI=c,this._connectionService=l,this._profilerService=n,this._notificationService=g,this._columns=[],this._columnMapping={},this._onColumnsChanged=new m.Emitter,this.onColumnsChanged=this._onColumnsChanged.event,this._initializerSetup=!0,this._filter={clauses:[]},this._state=new b.ProfilerState,this.state.change({isConnected:!1,isStopped:!0,isPaused:!1,isRunning:!1,autoscroll:!0}),this._profilerService.registerSession(s.uriPrefixes.connection+(0,S.generateUuid)(),p,this).then(C=>{this._id=C,this.state.change({isConnected:!0})});let w=(C,I)=>{let _=new Array;for(let A=0;A<this._columns.length;A++){let k=C[this._columns[A]];k&&k.toLocaleLowerCase().indexOf(I.toLocaleLowerCase())>-1&&_.push(A)}return _},E=C=>(0,i.FilterData)(this._filter,C);this._data=new t.TableDataView(void 0,w,void 0,E)}get providerType(){return this.connection?this.connection.providerName:void 0}setViewTemplate(p){this._data.clear(),this._viewTemplate=p;let c=this._viewTemplate.columns.reduce((n,g)=>(n.push(g.name),n),[]),l={};this._viewTemplate.columns.forEach(n=>{n.eventsMapped.forEach(g=>{l[g]=n.name})}),this.setColumnMapping(c,l)}get viewTemplate(){return this._viewTemplate}setSessionName(p){(!this.state.isRunning||!this.state.isPaused)&&(this._sessionName=p,this._onDidChangeLabel.fire())}get sessionName(){return this._sessionName}get typeId(){return o.ID}getName(){let p=o.PROFILERNAME;return this.connection?(this.connection.connectionName?p+=": "+this.connection.connectionName.substring(0,20):p+=": "+this.connection.serverName.substring(0,20),p):(this.isFileSession&&(p+=": "+r.basename(this.fileURI.fsPath)),p)}getTitle(p){let c=o.PROFILERNAME;if(this.connection){this.sessionName&&(c+=T.localize(1,null,this.sessionName));let l=this.connection.serverName+":"+this.connection.databaseName,n=this._connectionService.getNonDefaultOptions(this.connection);c=c+T.localize(2,null)+l+n}else this.isFileSession&&(c+=": "+r.basename(this.fileURI.fsPath));switch(p){case 2:return c;default:case 0:case 1:return this.getName()}}getResource(){return a.URI.from({scheme:o.SCHEMA,path:"profiler"})}get data(){return this._data}get columns(){return this._columns?this._columns.map(p=>({id:p,field:p,name:p,sortable:!0})):[]}get isFileSession(){return!!this.fileURI}get isSetupPhase(){return this._initializerSetup}setInitializerPhase(p){this._initializerSetup=p}setConnectionState(p){this.state.change({isConnected:p})}setColumns(p){this._columns=p,this._onColumnsChanged.fire(this.columns)}setColumnMapping(p,c){this._columns=p,this._columnMapping=c,this._onColumnsChanged.fire(this.columns)}get connectionName(){return h.isUndefinedOrNull(this.connection)?T.localize(3,null):this.connection.databaseName?`${this.connection.serverName} ${this.connection.databaseName}`:`${this.connection.serverName}`}get id(){return this._id}get state(){return this._state}get filter(){return this._filter}onSessionStopped(p){this.isFileSession||this._notificationService.error(T.localize(4,null,this.connection.serverName)),this.state.change({isStopped:!0,isPaused:!1,isRunning:!1})}onProfilerSessionCreated(p){if(h.isUndefinedOrNull(p.sessionName)||h.isUndefinedOrNull(p.templateName))this._notificationService.error(T.localize(5,null));else{this._sessionName=p.sessionName;let c=this._profilerService.getSessionTemplates().find(l=>l.name===p.templateName);if(!h.isUndefinedOrNull(c)){let l=this._profilerService.getViewTemplates().find(n=>n.name===c.defaultView);h.isUndefinedOrNull(l)||this.setViewTemplate(l)}this.data.clear(),this.state.change({isStopped:!1,isPaused:!1,isRunning:!0})}}onSessionStateChanged(p){this.state.change(p)}onMoreRows(p){p.eventsLost&&this._notificationService.warn(T.localize(6,null,this.connection.serverName));let c=[];for(let l=0;l<p.events.length&&l<500;++l){let n=p.events[l],g={};g.EventClass=n.name,g.StartTime=n.timestamp,g.TextData=" ";for(let w in n.values){let E=this._columnMapping[w],C=n.values[w];E?g[E]=C:g[w]=C}c.push(g)}c.length>0&&this._data.push(c)}filterSession(p){this._filter=p,this._filter.clauses.length!==0?this.data.filter():this.data.clearFilter()}clearFilter(){this._filter={clauses:[]},this.data.clearFilter()}dispose(){super.dispose(),this._profilerService.disconnectSession(this.id)}get resource(){}};e.ProfilerInput=u,e.ProfilerInput=u=o=fe([O(2,D.IConnectionManagementService),O(3,y.IProfilerService),O(4,v.INotificationService)],u)}),define(Q[3471],Y([1,0,1960,163,6,854,15,573,1928,143]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceViewerInput=void 0;let h=class extends y.EditorInput{static{S=this}static{this.ID=m.RESOURCE_VIEWER_TYPEID}constructor(r,i){super(),this._providerId=r,this._data=[],this._columns=[],this._loading=!0,this._onLoadingChanged=new b.Emitter,this.onLoadingChanged=this._onLoadingChanged.event,this._onColumnsChanged=new b.Emitter,this.onColumnsChanged=this._onColumnsChanged.event,this._onDataChanged=new b.Emitter,this.onDataChanged=this._onDataChanged.event,this._dataGridProvider=i.getDataGridProvider(this._providerId),this.actionsColumn=new f.ButtonColumn({id:"actions",iconCssClass:"toggle-more",title:t.localize(0,null)}),this.refresh().catch(s=>(0,T.onUnexpectedError)(s))}get typeId(){return S.ID}getName(){return this._dataGridProvider.title||t.localize(1,null)}get data(){return this._data}set columns(r){this._columns=r,this._onColumnsChanged.fire(this._columns)}get columns(){return this._columns}isDirty(){return!1}get resource(){}async refresh(){this._loading=!0,this._onLoadingChanged.fire(this._loading),await Promise.all([this.fetchColumns(),this.fetchItems()]),this._loading=!1,this._onLoadingChanged.fire(this._loading)}get plugins(){return[this.actionsColumn]}get loading(){return this._loading}get title(){return this._dataGridProvider.title}async fetchColumns(){const i=(await this._dataGridProvider.getDataGridColumns()).map(o=>({name:o.name,field:o.field,id:o.id,formatter:(0,v.getDataGridFormatter)(o.type),sortable:o.sortable??!0,filterable:o.filterable??!0,resizable:o.resizable??!0,tooltip:o.tooltip,width:o.width,minWidth:o.width,type:o.type})),s=Object.assign({},this.actionsColumn.definition,{type:"actions",filterable:!1});i.push(s),this.columns=i}async fetchItems(){const r=await this._dataGridProvider.getDataGridItems();this._data=r,this._onDataChanged.fire()}};e.ResourceViewerInput=h,e.ResourceViewerInput=h=S=fe([O(1,D.IDataGridProviderService)],h)}),define(Q[373],Y([1,0,719]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCurrentGlobalConnection=void 0;function y(b,D,T,f,v=!1){let m,S=b.getSelectedProfileAndDatabase();if(S){if(S.profile&&D.isProfileConnected(S.profile)&&(S.databaseName&&!v?m=S.profile.cloneWithDatabase(S.databaseName):m=S.profile),b.isFocused())return m}else f.trace("getCurrentGlobalConnection: Object Explorer selection is undefined, finding connection from active editor.");let h=T.activeEditor;return h?h instanceof t.DashboardInput&&h.uri?m=D.getConnectionProfile(h.uri):h.resource&&(m=D.getConnectionProfile(h.resource.toString(!0))):f.warn("getCurrentGlobalConnection: No active editor found."),m}e.getCurrentGlobalConnection=y}),define(Q[374],Y([1,0,1977,4,6,9,58,241,163,5,582]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.QueryEditorInput=e.QueryEditorState=e.trimTitle=void 0;const a=13;function r(o){const u=o.length,d=u-a;if(d<=0)return o;{const p=u/2-d/2;return o.slice(0,p)+"..."+o.slice(p+d,u)}}e.trimTitle=r;class i extends y.Disposable{constructor(){super(...arguments),this._connected=!1,this._isSqlCmdMode=!1,this._resultsVisible=!1,this._executing=!1,this._connecting=!1,this._isActualExecutionPlanMode=!1,this._onChange=this._register(new b.Emitter),this.onChange=this._onChange.event}set connected(u){u!==this._connected&&(this._connected=u,this._onChange.fire({connectedChange:!0}))}get connected(){return this._connected}set connecting(u){u!==this._connecting&&(this._connecting=u,this._onChange.fire({connectingChange:!0}))}get connecting(){return this._connecting}set resultsVisible(u){u!==this._resultsVisible&&(this._resultsVisible=u,this._onChange.fire({resultsVisibleChange:!0}))}get resultsVisible(){return this._resultsVisible}set executing(u){u!==this._executing&&(this._executing=u,this._onChange.fire({executingChange:!0}))}get executing(){return this._executing}set isSqlCmdMode(u){u!==this._isSqlCmdMode&&(this._isSqlCmdMode=u,this._onChange.fire({sqlCmdModeChanged:!0}))}get isSqlCmdMode(){return this._isSqlCmdMode}set isActualExecutionPlanMode(u){u!==this._isActualExecutionPlanMode&&(this._isActualExecutionPlanMode=u,this._onChange.fire({actualExecutionPlanModeChanged:!0}))}get isActualExecutionPlanMode(){return this._isActualExecutionPlanMode}setState(u){this.connected=u.connected,this.connecting=u.connecting,this.resultsVisible=u.resultsVisible,this.executing=u.executing,this.isSqlCmdMode=u.isSqlCmdMode,this.isActualExecutionPlanMode=u.isActualExecutionPlanMode}}e.QueryEditorState=i;let s=class extends v.EditorInput{static{h=this}static{this.SCHEMA="sql"}get state(){return this._state}constructor(u,d,p,c,l,n,g,w){super(),this._description=u,this._text=d,this._results=p,this.connectionManagementService=c,this.queryModelService=l,this.configurationService=n,this.instantiationService=g,this.serverContextualizationService=w,this._state=this._register(new i),this._register(this._text),this._register(this._results),this._text.onDidChangeDirty(()=>this._onDidChangeDirty.fire()),this._register(this.queryModelService.onRunQueryStart(E=>{this.uri===E&&this.onRunQuery()})),this._register(this.queryModelService.onRunQueryComplete(E=>{this.uri===E&&this.onQueryComplete()})),this._register(this.connectionManagementService.onDisconnect(E=>{E.connectionUri===this.uri&&this.onDisconnect()})),this._register(this.connectionManagementService.onConnectionChanged(E=>{this._onDidChangeLabel.fire()})),this._register(this.configurationService.onDidChangeConfiguration(E=>{E.affectedKeys.has("queryEditor")&&this._onDidChangeLabel.fire()})),this.connectionManagementService.ensureDefaultLanguageFlavor(this.uri),this.onDisconnect(),this.onQueryComplete()}get uri(){return this.resource.toString(!0)}get text(){return this._text}get results(){return this._results}getDescription(){return this._description}supportsSplitEditor(){return!1}revert(u,d){return this._text.revert(u,d)}get capabilities(){return 0}matches(u){return u instanceof h?this._text.matches(u._text):this._text.matches(u)}async changeConnectionUri(u){this.connectionManagementService.changeConnectionUri(u,this.uri);try{await this.queryModelService.changeConnectionUri(u,this.uri)}catch(d){throw this.connectionManagementService.changeConnectionUri(this.uri,u),d}}isDirty(){return this._text.isDirty()}get resource(){return this._text.resource}getName(u){if(this.configurationService.getValue("queryEditor").showConnectionInfoInTitle){let d=this.connectionManagementService.getConnectionProfile(this.uri),p=this.connectionManagementService.getConnectionInfo(this.uri),c="";return p?.serverConnectionId&&(c+=`(${p.serverConnectionId}) `),this._description&&this._description!==""&&(c+=this._description+" "),d?d.connectionName?c+=`${d.connectionName}`:(c+=`${d.serverName}`,d.databaseName&&(c+=`.${d.databaseName}`),c+=` (${d.userName||d.authenticationType})`):c+=(0,t.localize)(0,null),this.text.getName()+(u?" - "+c:` - ${r(c)}`)}else return this.text.getName()}save(u,d){return this.text.save(u,d)}getTitle(u){let d=this.connectionManagementService.getConnectionProfile(this.uri),p=this.connectionManagementService.getConnectionInfo(this.uri),c="";if(p?.serverConnectionId&&(c+=`(${p.serverConnectionId}) `),this._description&&this._description!==""&&(c+=this._description+" "),d){let l=this.connectionManagementService.getNonDefaultOptions(d);c+=`${d.serverName}`,d.databaseName&&(c+=`.${d.databaseName}`),c+=` (${d.userName||d.authenticationType})`,c+=l}else c=this.getName(!0);switch(u){case 2:return c;default:case 0:case 1:return this.getName(!0)}}runQuery(u,d){this.queryModelService.runQuery(this.uri,u,d),this.state.executing=!0}runQueryStatement(u){this.queryModelService.runQueryStatement(this.uri,u),this.state.executing=!0}runQueryString(u){this.queryModelService.runQueryString(this.uri,u),this.state.executing=!0}onConnectStart(){this.state.connecting=!0,this.state.connected=!1}onConnectReject(){this.state.connecting=!1,this.state.connected=!1}onConnectCanceled(){this.state.connecting&&(this.state.connected=!1),this.state.connecting=!1}onConnectSuccess(u){if(this.state.connected=!0,this.state.connecting=!1,!this.queryModelService.isRunningQuery(this.uri)&&u&&u.runQueryOnCompletion){let p=u?u.queryRange:void 0;u.runQueryOnCompletion===T.RunQueryOnConnectionMode.executeCurrentQuery?this.runQueryStatement(p):u.runQueryOnCompletion===T.RunQueryOnConnectionMode.executeQuery?this.runQuery(p):u.runQueryOnCompletion===T.RunQueryOnConnectionMode.estimatedQueryPlan?this.runQuery(p,{displayEstimatedQueryPlan:!0}):u.runQueryOnCompletion===T.RunQueryOnConnectionMode.actualQueryPlan&&this.runQuery(p,{displayActualQueryPlan:!0})}this._onDidChangeLabel.fire(),this.serverContextualizationService?.contextualizeUriForCopilot(this.uri)}onDisconnect(){this.state.connected=!1,this.isDisposed()||this._onDidChangeLabel.fire()}onRunQuery(){this.state.executing=!0,this.state.resultsVisible=!0}onQueryComplete(){this.state.executing=!1}get tabColor(){return this.connectionManagementService.getTabColorForUri(this.uri)}dispose(){super.dispose(),this.queryModelService.disposeQuery(this.uri),this.connectionManagementService.disconnectEditor(this,!0)}get isSharedSession(){return!!(this.uri&&this.uri.startsWith("vsls:"))}};e.QueryEditorInput=s,e.QueryEditorInput=s=h=fe([O(3,T.IConnectionManagementService),O(4,f.IQueryModelService),O(5,D.IConfigurationService),O(6,m.IInstantiationService),O(7,S.IServerContextualizationService)],s)}),define(Q[906],Y([1,0,58,241,6,1958,23,63,163,374]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.EditDataInput=void 0;let h=class extends v.EditorInput{static{S=this}static{this.ID="workbench.editorinputs.editDataInput"}constructor(r,i,s,o,u,d,p,c,l){if(super(),this._uri=r,this._schemaName=i,this._tableName=s,this._sql=o,this._queryString=u,this._results=d,this._connectionManagementService=p,this._queryModelService=c,this.notificationService=l,this._hasBootstrapped=!1,this._updateTaskbar=new b.Emitter,this._showResultsEditor=new b.Emitter,this._editorInitializing=new b.Emitter,this._setup=!1,this._stopButtonEnabled=!1,this._refreshButtonEnabled=!1,this._useQueryFilter=!1,this._sql&&this._register(this._sql.onDidChangeDirty(async()=>{(await this._sql.resolve()).setDirty(!1),this._onDidChangeDirty.fire()})),this._objectType="TABLE",this._queryModelService){let n=this;this._register(this._queryModelService.onRunQueryStart(g=>{n.uri===g&&n.initEditStart()})),this._register(this._queryModelService.onEditSessionReady(g=>{this.uri===g.ownerUri&&this._results.editDataGridPanel.onRefreshComplete.then(()=>{this.initEditEnd(g)})}))}}get tableName(){return this._tableName}get schemaName(){return this._schemaName}get uri(){return unescape(this._uri.toString())}get sql(){return this._sql}get results(){return this._results}getResultsInputResource(){return this._results.uri}get updateTaskbarEvent(){return this._updateTaskbar.event}get editorInitializingEvent(){return this._editorInitializing.event}get showResultsEditorEvent(){return this._showResultsEditor.event}get stopButtonEnabled(){return this._stopButtonEnabled}get refreshButtonEnabled(){return this._refreshButtonEnabled}get hasBootstrapped(){return this._hasBootstrapped}get setup(){return this._setup}get rowLimit(){return this._rowLimit}get objectType(){return this._objectType}showResultsEditor(){this._showResultsEditor.fire(void 0)}isDirty(){return!1}save(){return Promise.resolve(void 0)}get typeId(){return S.ID}setBootstrappedTrue(){this._hasBootstrapped=!0}get resource(){return this._uri}supportsSplitEditor(){return!1}setupComplete(){this._setup=!0}get queryString(){return this._queryString}set queryString(r){this._queryString=r}get queryPaneEnabled(){return this._useQueryFilter}set queryPaneEnabled(r){this._useQueryFilter=r}initEditStart(){this._editorInitializing.fire(!0),this._refreshButtonEnabled=!1,this._stopButtonEnabled=!0,this._updateTaskbar.fire(this)}initEditEnd(r){this._refreshButtonEnabled=!0,this._stopButtonEnabled=!1,r.success||this.notificationService.notify({severity:f.default.Error,message:r.message}),this._editorInitializing.fire(!1),this._updateTaskbar.fire(this)}onConnectStart(){}onConnectReject(r){r&&this.notificationService.notify({severity:f.default.Error,message:D.localize(0,null)})}onConnectCanceled(){}onConnectSuccess(r,i){let s,o;this._useQueryFilter?o=this._queryString:s=this._rowLimit,this._queryModelService.initializeEdit(this.uri,this.schemaName,this.tableName,this._objectType,s,o),this.showResultsEditor(),this._onDidChangeLabel.fire()}onDisconnect(){}onRowDropDownSet(r){this._rowLimit=r}matches(r){return r instanceof S?this._sql.matches(r.sql):this._sql.matches(r)}dispose(){this._queryModelService.disposeEdit(this.uri).then(()=>this._connectionManagementService.disconnectEditor(this,!0)),this._queryModelService.disposeQuery(this.uri),this._sql.dispose(),this._results.dispose(),super.dispose()}get tabColor(){return this._connectionManagementService.getTabColorForUri(this.uri)}async resolve(r){return this._sql.resolve()}getEncoding(){return this._sql.getEncoding()}getName(r){let i=this._connectionManagementService.getConnectionProfile(this.uri),s=this._sql.getName();if(i){let o="";return i.connectionName?o+=`${i.connectionName}`:(o+=`${i.serverName}`,i.databaseName&&(o+=`.${i.databaseName}`),o+=` (${i.userName||i.authenticationType})`),s+(r?" - "+o:` - ${(0,m.trimTitle)(o)}`)}else return s}getTitle(r){let i=this._sql.getName(),s=this._connectionManagementService.getConnectionProfile(this.uri);if(s){i+=` - ${s.serverName}`,s.databaseName&&(i+=`.${s.databaseName}`),i+=` (${s.userName||s.authenticationType})`;let o=this._connectionManagementService.getNonDefaultOptions(s);i+=o}else i=this.getName(!0);switch(r){case 2:return i;default:case 0:case 1:return this.getName(!0)}}get hasAssociatedFilePath(){return this._sql.model.hasAssociatedFilePath}setEncoding(r,i){this._sql.setEncoding(r,i)}};e.EditDataInput=h,e.EditDataInput=h=S=fe([O(6,t.IConnectionManagementService),O(7,y.IQueryModelService),O(8,T.INotificationService)],h)}),define(Q[720],Y([1,0,374,58,241,9,143,5,582]),function(q,e,t,y,b,D,T,f,v){"use strict";var m;Object.defineProperty(e,"__esModule",{value:!0}),e.FileQueryEditorInput=void 0;let S=class extends t.QueryEditorInput{static{m=this}static{this.ID=T.FILE_QUERY_EDITOR_TYPEID}constructor(a,r,i,s,o,u,d,p){super(a,r,i,s,o,u,d,p)}resolve(){return this.text.resolve()}get text(){return this._text}get typeId(){return m.ID}getEncoding(){return this.text.getEncoding()}setEncoding(a,r){this.text.setEncoding(a,r)}getPreferredEncoding(){return this.text.getPreferredEncoding()}setPreferredEncoding(a){this.text.setPreferredEncoding(a)}getPreferredLanguageId(){return this.text.getPreferredLanguageId()}setLanguageId(a){this.text.setLanguageId(a)}setPreferredLanguageId(a){this.text.setPreferredLanguageId(a)}setForceOpenAsText(){this.text.setForceOpenAsText()}setForceOpenAsBinary(){this.text.setForceOpenAsBinary()}isResolved(){return this.text.isResolved()}async rename(a,r){return this.text.rename(a,r)}async saveAs(a,r){let i=await this.text.saveAs(a,r),s=i.resource.toString(!0);if(s===this.uri)return i;try{await this.changeConnectionUri(s),this._results.uri=s;let o=this.instantiationService.createInstance(m,"",i,this.results);return o.state.setState(this.state),o}catch{return i}}toUntyped(){return{resource:this.resource}}};e.FileQueryEditorInput=S,e.FileQueryEditorInput=S=m=fe([O(3,y.IConnectionManagementService),O(4,b.IQueryModelService),O(5,D.IConfigurationService),O(6,f.IInstantiationService),O(7,v.IServerContextualizationService)],S)}),define(Q[907],Y([1,0,1978,163,1507,1503,1506,787,1504]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QueryResultsInput=e.ResultsViewState=void 0;class m{constructor(){this.gridPanelState=new f.GridPanelState,this.chartState=new D.ChartState,this.queryPlanState=new T.QueryPlanState,this.topOperationsState=new b.TopOperationsState,this.dynamicModelViewTabsState=new Map,this.executionPlanState=new v.ExecutionPlanState,this.visibleTabs=new Set}dispose(){this.gridPanelState.dispose(),this.chartState.dispose(),this.queryPlanState.dispose(),this.dynamicModelViewTabsState.forEach((a,r)=>{a.dispose()}),this.dynamicModelViewTabsState.clear()}}e.ResultsViewState=m;class S extends y.EditorInput{get state(){return this._state}constructor(a){super(),this.uri=a,this._state=new m}get typeId(){return S.ID}getName(){return(0,t.localize)(0,null)}matches(a){return a instanceof S?a.uri===this.uri:!1}async resolve(a){return Promise.resolve(null)}supportsSplitEditor(){return!1}dispose(){super.dispose()}static get ID(){return"workbench.query.queryResultsInput"}get resource(){}}e.QueryResultsInput=S}),define(Q[3472],Y([1,0,163]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isINotebookInput=e.INotebookInput=void 0;class y extends t.EditorInput{setNotebookContents(T){}setDirty(T){}updateModel(){}}e.INotebookInput=y;function b(D){return(typeof D.defaultKernel=="object"||D.defaultKernel===void 0)&&(typeof D.connectionProfile=="object"||D.connectionProfile===void 0)&&typeof D.notebookUri=="object"&&typeof D.isDirty=="function"&&typeof D.layoutChanged=="function"&&typeof D.editorOpenedTimestamp=="number"&&typeof D.contentLoader=="object"&&typeof D.standardKernels=="object"}e.isINotebookInput=b}),define(Q[290],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorModel=void 0;class b extends y.Disposable{constructor(){super(...arguments),this._onWillDispose=this._register(new t.Emitter),this.onWillDispose=this._onWillDispose.event,this.disposed=!1,this.resolved=!1}async resolve(){this.resolved=!0}isResolved(){return this.resolved}isDisposed(){return this.disposed}dispose(){this.disposed=!0,this._onWillDispose.fire(),super.dispose()}}e.EditorModel=b}),define(Q[721],Y([1,0,290,25,197]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BinaryEditorModel=void 0;let D=class extends t.EditorModel{constructor(f,v,m){super(),this.resource=f,this.name=v,this.fileService=m,this.mime=b.Mimes.binary}getName(){return this.name}getSize(){return this.size}getMime(){return this.mime}getETag(){return this.etag}async resolve(){if(this.fileService.hasProvider(this.resource)){const f=await this.fileService.stat(this.resource);this.etag=f.etag,typeof f.size=="number"&&(this.size=f.size)}return super.resolve()}};e.BinaryEditorModel=D,e.BinaryEditorModel=D=fe([O(2,y.IFileService)],D)}),define(Q[1255],Y([1,0,290]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorModel=void 0;class y extends t.EditorModel{get originalModel(){return this._originalModel}get modifiedModel(){return this._modifiedModel}constructor(D,T){super(),this._originalModel=D,this._modifiedModel=T}async resolve(){await Promise.all([this._originalModel?.resolve(),this._modifiedModel?.resolve()])}isResolved(){return!!(this.originalModel?.isResolved()&&this.modifiedModel?.isResolved())}dispose(){super.dispose()}}e.DiffEditorModel=y}),define(Q[520],Y([1,0,47]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyTextEditorOptions=void 0;function y(D,T,f){let v=!1;const m=b(D);if((0,t.isTextEditorViewState)(m)&&(T.restoreViewState(m),v=!0),D.selection){const S={startLineNumber:D.selection.startLineNumber,startColumn:D.selection.startColumn,endLineNumber:D.selection.endLineNumber??D.selection.startLineNumber,endColumn:D.selection.endColumn??D.selection.startColumn};T.setSelection(S,D.selectionSource??"code.navigation"),D.selectionRevealType===2?T.revealRangeNearTop(S,f):D.selectionRevealType===3?T.revealRangeNearTopIfOutsideViewport(S,f):D.selectionRevealType===1?T.revealRangeInCenterIfOutsideViewport(S,f):T.revealRangeInCenter(S,f),v=!0}return v}e.applyTextEditorOptions=y;function b(D){if(!D.selection||!D.viewState)return D.viewState;const T=D.viewState;if(T.modified)return T.modified.cursorState=[],T;const f=D.viewState;return f.cursorState&&(f.cursorState=[]),f}}),define(Q[1256],Y([1,0,1255]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextDiffEditorModel=void 0;class y extends t.DiffEditorModel{get originalModel(){return this._originalModel}get modifiedModel(){return this._modifiedModel}get textDiffEditorModel(){return this._textDiffEditorModel}constructor(D,T){super(D,T),this._textDiffEditorModel=void 0,this._originalModel=D,this._modifiedModel=T,this.updateTextDiffEditorModel()}async resolve(){await super.resolve(),this.updateTextDiffEditorModel()}updateTextDiffEditorModel(){this.originalModel?.isResolved()&&this.modifiedModel?.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=void 0,super.dispose()}}e.TextDiffEditorModel=y}),define(Q[191],Y([1,0,17,15]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Memento=void 0;class b{static{this.applicationMementos=new Map}static{this.profileMementos=new Map}static{this.workspaceMementos=new Map}static{this.COMMON_PREFIX="memento/"}constructor(f,v){this.storageService=v,this.id=b.COMMON_PREFIX+f}getMemento(f,v){switch(f){case 1:{let m=b.workspaceMementos.get(this.id);return m||(m=new D(this.id,f,v,this.storageService),b.workspaceMementos.set(this.id,m)),m.getMemento()}case 0:{let m=b.profileMementos.get(this.id);return m||(m=new D(this.id,f,v,this.storageService),b.profileMementos.set(this.id,m)),m.getMemento()}case-1:{let m=b.applicationMementos.get(this.id);return m||(m=new D(this.id,f,v,this.storageService),b.applicationMementos.set(this.id,m)),m.getMemento()}}}saveMemento(){b.workspaceMementos.get(this.id)?.save(),b.profileMementos.get(this.id)?.save(),b.applicationMementos.get(this.id)?.save()}static clear(f){switch(f){case 1:b.workspaceMementos.clear();break;case 0:b.profileMementos.clear();break;case-1:b.applicationMementos.clear();break}}}e.Memento=b;class D{constructor(f,v,m,S){this.id=f,this.scope=v,this.target=m,this.storageService=S,this.mementoObj=this.load()}getMemento(){return this.mementoObj}load(){const f=this.storageService.get(this.id,this.scope);if(f)try{return JSON.parse(f)}catch(v){(0,y.onUnexpectedError)(`[memento]: failed to parse contents: ${v} (id: ${this.id}, scope: ${this.scope}, contents: ${f})`)}return{}}save(){(0,t.isEmptyObject)(this.mementoObj)?this.storageService.remove(this.id,this.scope):this.storageService.store(this.id,JSON.stringify(this.mementoObj),this.scope,this.target)}}}),define(Q[908],Y([1,0,191,19]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;class b extends y.Themable{constructor(T,f,v){super(f),this.id=T,this.id=T,this.memento=new t.Memento(this.id,v),this._register(v.onWillSaveState(()=>{this.saveState(),this.memento.saveMemento()}))}getId(){return this.id}getMemento(T,f){return this.memento.getMemento(T,f)}saveState(){}}e.Component=b}),define(Q[1257],Y([1,0,34,908,6,7,4,17]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeRegistry=e.CompositeDescriptor=e.Composite=void 0;class v extends y.Component{get onDidFocus(){return this._onDidFocus||(this._onDidFocus=this.registerFocusTrackEvents().onDidFocus),this._onDidFocus.event}fireOnDidFocus(){this._onDidFocus?.fire()}get onDidBlur(){return this._onDidBlur||(this._onDidBlur=this.registerFocusTrackEvents().onDidBlur),this._onDidBlur.event}hasFocus(){return this._hasFocus}registerFocusTrackEvents(){const a=(0,f.assertIsDefined)(this.getContainer()),r=this._register((0,D.trackFocus)(a)),i=this._onDidFocus=this._register(new b.Emitter);this._register(r.onDidFocus(()=>{this._hasFocus=!0,i.fire()}));const s=this._onDidBlur=this._register(new b.Emitter);return this._register(r.onDidBlur(()=>{this._hasFocus=!1,s.fire()})),{onDidFocus:i,onDidBlur:s}}get telemetryService(){return this._telemetryService}constructor(a,r,i,s){super(a,i,s),this._onTitleAreaUpdate=this._register(new b.Emitter),this.onTitleAreaUpdate=this._onTitleAreaUpdate.event,this._hasFocus=!1,this._telemetryService=r,this.visible=!1}getTitle(){}create(a){this.parent=a}getContainer(){return this.parent}setVisible(a){this.visible!==!!a&&(this.visible=a)}focus(){}updateStyles(){super.updateStyles()}getMenuIds(){return[]}getActions(){return[]}getSecondaryActions(){return[]}getContextMenuActions(){return[]}getActionViewItem(a){}getActionsContext(){return null}getActionRunner(){return this.actionRunner||(this.actionRunner=this._register(new t.ActionRunner)),this.actionRunner}updateTitleArea(){this._onTitleAreaUpdate.fire()}isVisible(){return this.visible}getControl(){}}e.Composite=v;class m{constructor(a,r,i,s,o,u){this.ctor=a,this.id=r,this.name=i,this.cssClass=s,this.order=o,this.requestedIndex=u}instantiate(a){return a.createInstance(this.ctor)}}e.CompositeDescriptor=m;class S extends T.Disposable{constructor(){super(...arguments),this._onDidRegister=this._register(new b.Emitter),this.onDidRegister=this._onDidRegister.event,this._onDidDeregister=this._register(new b.Emitter),this.onDidDeregister=this._onDidDeregister.event,this.composites=[]}registerComposite(a){this.compositeById(a.id)||(this.composites.push(a),this._onDidRegister.fire(a))}deregisterComposite(a){const r=this.compositeById(a);r&&(this.composites.splice(this.composites.indexOf(r),1),this._onDidDeregister.fire(r))}getComposite(a){return this.compositeById(a)}getComposites(){return this.composites.slice(0)}compositeById(a){return this.composites.find(r=>r.id===a)}}e.CompositeRegistry=S}),define(Q[521],Y([1,0,908,7,6,17,1756]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Part=void 0;class T extends t.Component{get dimension(){return this._dimension}constructor(m,S,h,a,r){super(m,h,a),this.options=S,this.layoutService=r,this._onDidVisibilityChange=this._register(new b.Emitter),this.onDidVisibilityChange=this._onDidVisibilityChange.event,this._onDidChange=this._register(new b.Emitter),r.registerPart(this)}onThemeChange(m){this.parent&&super.onThemeChange(m)}updateStyles(){super.updateStyles()}create(m,S){this.parent=m,this.titleArea=this.createTitleArea(m,S),this.contentArea=this.createContentArea(m,S),this.partLayout=new f(this.options,this.contentArea),this.updateStyles()}getContainer(){return this.parent}createTitleArea(m,S){}getTitleArea(){return this.titleArea}createContentArea(m,S){}getContentArea(){return this.contentArea}layoutContents(m,S){return(0,D.assertIsDefined)(this.partLayout).layout(m,S)}get onDidChange(){return this._onDidChange.event}layout(m,S,h,a){this._dimension=new y.Dimension(m,S)}setVisible(m){this._onDidVisibilityChange.fire(m)}}e.Part=T;class f{static{this.TITLE_HEIGHT=35}constructor(m,S){this.options=m,this.contentArea=S}layout(m,S){let h;this.options.hasTitle?h=new y.Dimension(m,Math.min(S,f.TITLE_HEIGHT)):h=y.Dimension.None;let a=m;this.options&&typeof this.options.borderWidth=="function"&&(a-=this.options.borderWidth());const r=new y.Dimension(a,S-h.height);return this.contentArea&&(0,y.size)(this.contentArea,r.width,r.height),{titleSize:h,contentSize:r}}}}),define(Q[164],Y([1,0,1257,47,69,10,6,17,416,26,206,4]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorMemento=e.EditorPane=void 0;class a extends t.Composite{static{this.EDITOR_MEMENTOS=new Map}get minimumWidth(){return v.DEFAULT_EDITOR_MIN_DIMENSIONS.width}get maximumWidth(){return v.DEFAULT_EDITOR_MAX_DIMENSIONS.width}get minimumHeight(){return v.DEFAULT_EDITOR_MIN_DIMENSIONS.height}get maximumHeight(){return v.DEFAULT_EDITOR_MAX_DIMENSIONS.height}get input(){return this._input}get options(){return this._options}get group(){return this._group}get scopedContextKeyService(){}constructor(s,o,u,d){super(s,o,u,d),this.onDidChangeSizeConstraints=T.Event.None,this._onDidChangeControl=this._register(new T.Emitter),this.onDidChangeControl=this._onDidChangeControl.event}create(s){super.create(s),this.createEditor(s)}async setInput(s,o,u,d){this._input=s,this._options=o}clearInput(){this._input=void 0,this._options=void 0}setOptions(s){this._options=s}setVisible(s,o){super.setVisible(s),this.setEditorVisible(s,o)}setEditorVisible(s,o){this._group=o}setBoundarySashes(s){}getEditorMemento(s,o,u,d=10){const p=`${this.getId()}${u}`;let c=a.EDITOR_MEMENTOS.get(p);return c||(c=this._register(new r(this.getId(),u,this.getMemento(1,1),d,s,o)),a.EDITOR_MEMENTOS.set(p,c)),c}getViewState(){}saveState(){for(const[,s]of a.EDITOR_MEMENTOS)s.id===this.getId()&&s.saveState();super.saveState()}dispose(){this._input=void 0,this._options=void 0,super.dispose()}}e.EditorPane=a;class r extends h.Disposable{static{this.SHARED_EDITOR_STATE=-1}constructor(s,o,u,d,p,c){super(),this.id=s,this.key=o,this.memento=u,this.limit=d,this.editorGroupService=p,this.configurationService=c,this.cleanedUp=!1,this.shareEditorState=!1,this.updateConfiguration(void 0),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(s=>this.updateConfiguration(s)))}updateConfiguration(s){(!s||s.affectsConfiguration(void 0,"workbench.editor.sharedViewState"))&&(this.shareEditorState=this.configurationService.getValue(void 0,"workbench.editor.sharedViewState")===!0)}saveEditorState(s,o,u){const d=this.doGetResource(o);if(!d||!s)return;const p=this.doLoad();let c=p.get(d.toString());c||(c=Object.create(null),p.set(d.toString(),c)),c[s.id]=u,this.shareEditorState&&(c[r.SHARED_EDITOR_STATE]=u),(0,y.isEditorInput)(o)&&this.clearEditorStateOnDispose(d,o)}loadEditorState(s,o){const u=this.doGetResource(o);if(!u||!s)return;const p=this.doLoad().get(u.toString());if(p){const c=p[s.id];if(c)return c;if(this.shareEditorState)return p[r.SHARED_EDITOR_STATE]}}clearEditorState(s,o){(0,y.isEditorInput)(s)&&this.editorDisposables?.delete(s);const u=this.doGetResource(s);if(u){const d=this.doLoad();if(o){const p=d.get(u.toString());p&&(delete p[o.id],(0,f.isEmptyObject)(p)&&d.delete(u.toString()))}else d.delete(u.toString())}}clearEditorStateOnDispose(s,o){this.editorDisposables||(this.editorDisposables=new Map),this.editorDisposables.has(o)||this.editorDisposables.set(o,T.Event.once(o.onWillDispose)(()=>{this.clearEditorState(s),this.editorDisposables?.delete(o)}))}moveEditorState(s,o,u){const d=this.doLoad(),p=[...d.keys()];for(const c of p){const l=D.URI.parse(c);if(!u.isEqualOrParent(l,s))continue;let n;if((0,m.isEqual)(s,l))n=o;else{const w=(0,S.indexOfPath)(l.path,s.path);n=(0,m.joinPath)(o,l.path.substr(w+s.path.length+1))}const g=d.get(c,0);g&&(d.delete(c),d.set(n.toString(),g))}}doGetResource(s){return(0,y.isEditorInput)(s)?s.resource:s}doLoad(){if(!this.cache){this.cache=new b.LRUCache(this.limit);const s=this.memento[this.key];Array.isArray(s)&&this.cache.fromJSON(s)}return this.cache}saveState(){const s=this.doLoad();this.cleanedUp||(this.cleanUp(),this.cleanedUp=!0),this.memento[this.key]=s.toJSON()}cleanUp(){const s=this.doLoad(),o=[...s.entries()];for(const[u,d]of o)for(const p of Object.keys(d)){const c=Number(p);c===r.SHARED_EDITOR_STATE&&this.shareEditorState||this.editorGroupService.getGroup(c)||(delete d[c],(0,f.isEmptyObject)(d)&&s.delete(u))}}}e.EditorMemento=r}),define(Q[909],Y([1,0,23,132,6,4,15,34,20,436]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChoiceAction=e.NotificationViewItem=e.NotificationViewItemProgress=e.NotificationViewItemContentChangeKind=e.isNotificationViewItem=e.NotificationsModel=e.NotificationHandle=e.StatusMessageChangeType=e.NotificationChangeType=void 0;var S;(function(c){c[c.ADD=0]="ADD",c[c.CHANGE=1]="CHANGE",c[c.EXPAND_COLLAPSE=2]="EXPAND_COLLAPSE",c[c.REMOVE=3]="REMOVE"})(S||(e.NotificationChangeType=S={}));var h;(function(c){c[c.ADD=0]="ADD",c[c.REMOVE=1]="REMOVE"})(h||(e.StatusMessageChangeType=h={}));class a extends D.Disposable{constructor(l,n){super(),this.item=l,this.onClose=n,this._onDidClose=this._register(new b.Emitter),this.onDidClose=this._onDidClose.event,this._onDidChangeVisibility=this._register(new b.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.registerListeners()}registerListeners(){this._register(this.item.onDidChangeVisibility(l=>this._onDidChangeVisibility.fire(l))),b.Event.once(this.item.onDidClose)(()=>{this._onDidClose.fire(),this.dispose()})}get progress(){return this.item.progress}updateSeverity(l){this.item.updateSeverity(l)}updateMessage(l){this.item.updateMessage(l)}updateActions(l){this.item.updateActions(l)}close(){this.onClose(this.item),this.dispose()}}e.NotificationHandle=a;class r extends D.Disposable{constructor(){super(...arguments),this._onDidChangeNotification=this._register(new b.Emitter),this.onDidChangeNotification=this._onDidChangeNotification.event,this._onDidChangeStatusMessage=this._register(new b.Emitter),this.onDidChangeStatusMessage=this._onDidChangeStatusMessage.event,this._onDidChangeFilter=this._register(new b.Emitter),this.onDidChangeFilter=this._onDidChangeFilter.event,this._notifications=[],this.filter=t.NotificationsFilter.OFF}static{this.NO_OP_NOTIFICATION=new t.NoOpNotification}get notifications(){return this._notifications}get statusMessage(){return this._statusMessage}setFilter(l){this.filter=l,this._onDidChangeFilter.fire(l)}addNotification(l){const n=this.createViewItem(l);return n?(this.findNotification(n)?.close(),this._notifications.splice(0,0,n),this._onDidChangeNotification.fire({item:n,index:0,kind:0}),new a(n,w=>this.onClose(w))):r.NO_OP_NOTIFICATION}onClose(l){const n=this.findNotification(l);n&&n!==l?n.close():l.close()}findNotification(l){return this._notifications.find(n=>n.equals(l))}createViewItem(l){const n=u.create(l,this.filter);if(!n)return;const g=(C,I)=>{const _=this._notifications.indexOf(n);_>=0&&this._onDidChangeNotification.fire({item:n,index:_,kind:C,detail:I})},w=n.onDidChangeExpansion(()=>g(2)),E=n.onDidChangeContent(C=>g(1,C.kind));return b.Event.once(n.onDidClose)(()=>{w.dispose(),E.dispose();const C=this._notifications.indexOf(n);C>=0&&(this._notifications.splice(C,1),this._onDidChangeNotification.fire({item:n,index:C,kind:3}))}),n}showStatusMessage(l,n){const g=p.create(l,n);return g?(this._statusMessage=g,this._onDidChangeStatusMessage.fire({kind:0,item:g}),(0,D.toDisposable)(()=>{this._statusMessage===g&&(this._statusMessage=void 0,this._onDidChangeStatusMessage.fire({kind:1,item:g}))})):D.Disposable.None}}e.NotificationsModel=r;function i(c){return c instanceof u}e.isNotificationViewItem=i;var s;(function(c){c[c.SEVERITY=0]="SEVERITY",c[c.MESSAGE=1]="MESSAGE",c[c.ACTIONS=2]="ACTIONS",c[c.PROGRESS=3]="PROGRESS"})(s||(e.NotificationViewItemContentChangeKind=s={}));class o extends D.Disposable{constructor(){super(),this._onDidChange=this._register(new b.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(l){this._state.total!==l&&(this._state.total=l,this._state.infinite=void 0,this._state.done=void 0,this._onDidChange.fire())}worked(l){typeof this._state.worked=="number"?this._state.worked+=l:this._state.worked=l,this._state.infinite=void 0,this._state.done=void 0,this._onDidChange.fire()}}e.NotificationViewItemProgress=o;class u extends D.Disposable{static{this.MAX_MESSAGE_LENGTH=1e3}static create(l,n=t.NotificationsFilter.OFF){if(!l||!l.message||(0,T.isCancellationError)(l.message))return;let g;typeof l.severity=="number"?g=l.severity:g=t.Severity.Info;const w=u.parseNotificationMessage(l.message);if(!w)return;let E;l.actions?E=l.actions:(0,y.isErrorWithActions)(l.message)&&(E={primary:l.message.actions});let C=l.priority??t.NotificationPriority.DEFAULT;return C===t.NotificationPriority.DEFAULT&&(n===t.NotificationsFilter.SILENT||n===t.NotificationsFilter.ERROR&&l.severity!==t.Severity.Error)&&(C=t.NotificationPriority.SILENT),new u(l.id,g,l.sticky,C,w,l.source,l.progress,E)}static parseNotificationMessage(l){let n;if(l instanceof Error?n=(0,y.toErrorMessage)(l,!1):typeof l=="string"&&(n=l),!n)return;const g=n;n.length>u.MAX_MESSAGE_LENGTH&&(n=`${n.substr(0,u.MAX_MESSAGE_LENGTH)}...`),n=n.replace(/(\r\n|\n|\r)/gm," ").trim();const w=(0,m.parseLinkedText)(n);return{raw:g,linkedText:w,original:l}}constructor(l,n,g,w,E,C,I,_){super(),this.id=l,this._severity=n,this._sticky=g,this._priority=w,this._message=E,this._source=C,this._visible=!1,this._onDidChangeExpansion=this._register(new b.Emitter),this.onDidChangeExpansion=this._onDidChangeExpansion.event,this._onDidClose=this._register(new b.Emitter),this.onDidClose=this._onDidClose.event,this._onDidChangeContent=this._register(new b.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidChangeVisibility=this._register(new b.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,I&&this.setProgress(I),this.setActions(_)}setProgress(l){l.infinite?this.progress.infinite():l.total&&(this.progress.total(l.total),l.worked&&this.progress.worked(l.worked))}setActions(l={primary:[],secondary:[]}){this._actions={primary:Array.isArray(l.primary)?l.primary:[],secondary:Array.isArray(l.secondary)?l.secondary:[]},this._expanded=l.primary&&l.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 l=this.hasActions;return!!(l&&this._severity===t.Severity.Error||!l&&this._expanded||this._progress&&!this._progress.state.done)}get priority(){return this._priority}get hasActions(){return!this._actions||!this._actions.primary?!1:this._actions.primary.length>0}get hasProgress(){return!!this._progress}get progress(){return this._progress||(this._progress=this._register(new o),this._register(this._progress.onDidChange(()=>this._onDidChangeContent.fire({kind:3})))),this._progress}get message(){return this._message}get source(){return typeof this._source=="string"?this._source:this._source?this._source.label:void 0}get sourceId(){return this._source&&typeof this._source!="string"&&"id"in this._source?this._source.id:void 0}get actions(){return this._actions}get visible(){return this._visible}updateSeverity(l){l!==this._severity&&(this._severity=l,this._onDidChangeContent.fire({kind:0}))}updateMessage(l){const n=u.parseNotificationMessage(l);!n||n.raw===this._message.raw||(this._message=n,this._onDidChangeContent.fire({kind:1}))}updateActions(l){this.setActions(l),this._onDidChangeContent.fire({kind:2})}updateVisibility(l){this._visible!==l&&(this._visible=l,this._onDidChangeVisibility.fire(l))}expand(){this._expanded||!this.canCollapse||(this._expanded=!0,this._onDidChangeExpansion.fire())}collapse(l){!this._expanded||!this.canCollapse||(this._expanded=!1,l||this._onDidChangeExpansion.fire())}toggle(){this._expanded?this.collapse():this.expand()}close(){this._onDidClose.fire(),this.dispose()}equals(l){if(this.hasProgress||l.hasProgress)return!1;if(typeof this.id=="string"||typeof l.id=="string")return this.id===l.id;if(typeof this._source=="object"){if(this._source.label!==l.source||this._source.id!==l.sourceId)return!1}else if(this._source!==l.source)return!1;if(this._message.raw!==l.message.raw)return!1;const n=this._actions&&this._actions.primary||[],g=l.actions&&l.actions.primary||[];return(0,v.equals)(n,g,(w,E)=>w.id+w.label===E.id+E.label)}}e.NotificationViewItem=u;class d extends f.Action{constructor(l,n){super(l,n.label,void 0,!0,async()=>{n.run(),this._onDidRun.fire()}),this._onDidRun=this._register(new b.Emitter),this.onDidRun=this._onDidRun.event,this._keepOpen=!!n.keepOpen,this._menu=!n.isSecondary&&n.menu?n.menu.map((g,w)=>new d(`${l}.${w}`,g)):void 0}get menu(){return this._menu}get keepOpen(){return this._keepOpen}}e.ChoiceAction=d;class p{static create(l,n){if(!l||(0,T.isCancellationError)(l))return;let g;if(l instanceof Error?g=(0,y.toErrorMessage)(l,!1):typeof l=="string"&&(g=l),!!g)return{message:g,options:n}}}}),define(Q[522],Y([1,0,28,8,113,909,13,2565,90,30,1250,82,23,5,34,122,20]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationActionRunner=e.registerNotificationCommands=e.getNotificationFromContext=e.TOGGLE_DO_NOT_DISTURB_MODE=e.CLEAR_ALL_NOTIFICATIONS=e.CLEAR_NOTIFICATION=e.ACCEPT_PRIMARY_ACTION_NOTIFICATION=e.EXPAND_NOTIFICATION=e.COLLAPSE_NOTIFICATION=e.HIDE_NOTIFICATION_TOAST=e.HIDE_NOTIFICATIONS_CENTER=e.SHOW_NOTIFICATIONS_CENTER=void 0,e.SHOW_NOTIFICATIONS_CENTER="notifications.showList",e.HIDE_NOTIFICATIONS_CENTER="notifications.hideList";const u="notifications.toggleList";e.HIDE_NOTIFICATION_TOAST="notifications.hideToasts";const d="notifications.focusToasts",p="notifications.focusNextToast",c="notifications.focusPreviousToast",l="notifications.focusFirstToast",n="notifications.focusLastToast";e.COLLAPSE_NOTIFICATION="notification.collapse",e.EXPAND_NOTIFICATION="notification.expand",e.ACCEPT_PRIMARY_ACTION_NOTIFICATION="notification.acceptPrimaryAction";const g="notification.toggle";e.CLEAR_NOTIFICATION="notification.clear",e.CLEAR_ALL_NOTIFICATIONS="notifications.clearAll",e.TOGGLE_DO_NOT_DISTURB_MODE="notifications.toggleDoNotDisturbMode";function w(I,_){if((0,D.isNotificationViewItem)(_))return _;const A=I.lastFocusedList;if(A instanceof v.WorkbenchList){let k=A.getFocusedElements()[0];if((0,D.isNotificationViewItem)(k)||A.isDOMFocused()&&(k=A.element(0)),(0,D.isNotificationViewItem)(k))return k}}e.getNotificationFromContext=w;function E(I,_,A){t.CommandsRegistry.registerCommand(e.SHOW_NOTIFICATIONS_CENTER,()=>{_.hide(),I.show()}),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.HIDE_NOTIFICATIONS_CENTER,weight:200+50,when:h.NotificationsCenterVisibleContext,primary:9,handler:L=>{const R=L.get(m.ITelemetryService);for(const M of A.notifications)M.visible&&R.publicLog2("notification:hide",(0,S.notificationToMetrics)(M.message.original,M.sourceId,M.priority===a.NotificationPriority.SILENT));I.hide()}}),t.CommandsRegistry.registerCommand(u,()=>{I.isVisible?I.hide():(_.hide(),I.show())}),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLEAR_NOTIFICATION,weight:200,when:h.NotificationFocusedContext,primary:20,mac:{primary:2049},handler:(L,R)=>{const M=w(L.get(v.IListService),R);M&&!M.hasProgress&&M.close()}}),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.EXPAND_NOTIFICATION,weight:200,when:h.NotificationFocusedContext,primary:17,handler:(L,R)=>{w(L.get(v.IListService),R)?.expand()}}),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.ACCEPT_PRIMARY_ACTION_NOTIFICATION,weight:200,when:y.ContextKeyExpr.and(h.NotificationsToastsVisibleContext),primary:3103,handler:L=>{const R=L.get(r.IInstantiationService).createInstance(C),M=(0,o.firstOrDefault)(A.notifications);if(!M)return;const N=M.actions?.primary?(0,o.firstOrDefault)(M.actions.primary):void 0;N&&(R.run(N,M),M.close())}}),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.COLLAPSE_NOTIFICATION,weight:200,when:h.NotificationFocusedContext,primary:15,handler:(L,R)=>{w(L.get(v.IListService),R)?.collapse()}}),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:g,weight:200,when:h.NotificationFocusedContext,primary:10,secondary:[3],handler:L=>{w(L.get(v.IListService))?.toggle()}}),t.CommandsRegistry.registerCommand(e.HIDE_NOTIFICATION_TOAST,L=>{const R=L.get(m.ITelemetryService);for(const M of A.notifications)M.visible&&R.publicLog2("notification:hide",(0,S.notificationToMetrics)(M.message.original,M.sourceId,M.priority===a.NotificationPriority.SILENT));_.hide()}),b.KeybindingsRegistry.registerKeybindingRule({id:e.HIDE_NOTIFICATION_TOAST,weight:200-50,when:h.NotificationsToastsVisibleContext,primary:9}),b.KeybindingsRegistry.registerKeybindingRule({id:e.HIDE_NOTIFICATION_TOAST,weight:200+100,when:y.ContextKeyExpr.and(h.NotificationsToastsVisibleContext,h.NotificationFocusedContext),primary:9}),t.CommandsRegistry.registerCommand(d,()=>_.focus()),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:p,weight:200,when:y.ContextKeyExpr.and(h.NotificationFocusedContext,h.NotificationsToastsVisibleContext),primary:18,handler:()=>{_.focusNext()}}),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:c,weight:200,when:y.ContextKeyExpr.and(h.NotificationFocusedContext,h.NotificationsToastsVisibleContext),primary:16,handler:()=>{_.focusPrevious()}}),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:l,weight:200,when:y.ContextKeyExpr.and(h.NotificationFocusedContext,h.NotificationsToastsVisibleContext),primary:11,secondary:[14],handler:()=>{_.focusFirst()}}),b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:n,weight:200,when:y.ContextKeyExpr.and(h.NotificationFocusedContext,h.NotificationsToastsVisibleContext),primary:12,secondary:[13],handler:()=>{_.focusLast()}}),t.CommandsRegistry.registerCommand(e.CLEAR_ALL_NOTIFICATIONS,()=>I.clearAll()),t.CommandsRegistry.registerCommand(e.TOGGLE_DO_NOT_DISTURB_MODE,L=>{const R=L.get(a.INotificationService);R.doNotDisturbMode=!R.doNotDisturbMode});const k={value:(0,f.localize)(0,null),original:"Notifications"};T.MenuRegistry.appendMenuItem(T.MenuId.CommandPalette,{command:{id:e.SHOW_NOTIFICATIONS_CENTER,title:{value:(0,f.localize)(1,null),original:"Show Notifications"},category:k}}),T.MenuRegistry.appendMenuItem(T.MenuId.CommandPalette,{command:{id:e.HIDE_NOTIFICATIONS_CENTER,title:{value:(0,f.localize)(2,null),original:"Hide Notifications"},category:k},when:h.NotificationsCenterVisibleContext}),T.MenuRegistry.appendMenuItem(T.MenuId.CommandPalette,{command:{id:e.CLEAR_ALL_NOTIFICATIONS,title:{value:(0,f.localize)(3,null),original:"Clear All Notifications"},category:k}}),T.MenuRegistry.appendMenuItem(T.MenuId.CommandPalette,{command:{id:e.ACCEPT_PRIMARY_ACTION_NOTIFICATION,title:{value:(0,f.localize)(4,null),original:"Accept Notification Primary Action"},category:k}}),T.MenuRegistry.appendMenuItem(T.MenuId.CommandPalette,{command:{id:e.TOGGLE_DO_NOT_DISTURB_MODE,title:{value:(0,f.localize)(5,null),original:"Toggle Do Not Disturb Mode"},category:k}}),T.MenuRegistry.appendMenuItem(T.MenuId.CommandPalette,{command:{id:d,title:{value:(0,f.localize)(6,null),original:"Focus Notification Toast"},category:k},when:h.NotificationsToastsVisibleContext})}e.registerNotificationCommands=E;let C=class extends i.ActionRunner{constructor(_,A){super(),this.telemetryService=_,this.notificationService=A}async runAction(_,A){this.telemetryService.publicLog2("workbenchActionExecuted",{id:_.id,from:"message"}),(0,D.isNotificationViewItem)(A)&&this.telemetryService.publicLog2("notification:actionExecuted",{id:(0,s.hash)(A.message.original.toString()).toString(),actionLabel:_.label,source:A.sourceId||"core",silent:A.priority===a.NotificationPriority.SILENT});try{await super.runAction(_,A)}catch(k){this.notificationService.error(k)}}};e.NotificationActionRunner=C,e.NotificationActionRunner=C=fe([O(0,m.ITelemetryService),O(1,a.INotificationService)],C)}),define(Q[910],Y([1,0,2562,34,522,28,68,32,77,37,1060]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyNotificationMessageAction=e.ConfigureNotificationAction=e.CollapseNotificationAction=e.ExpandNotificationAction=e.HideNotificationsCenterAction=e.ToggleDoNotDisturbAction=e.ClearAllNotificationsAction=e.ClearNotificationAction=void 0;const S=(0,v.registerIcon)("notifications-clear",f.Codicon.close,(0,t.localize)(0,null)),h=(0,v.registerIcon)("notifications-clear-all",f.Codicon.clearAll,(0,t.localize)(1,null)),a=(0,v.registerIcon)("notifications-hide",f.Codicon.chevronDown,(0,t.localize)(2,null)),r=(0,v.registerIcon)("notifications-expand",f.Codicon.chevronUp,(0,t.localize)(3,null)),i=(0,v.registerIcon)("notifications-collapse",f.Codicon.chevronDown,(0,t.localize)(4,null)),s=(0,v.registerIcon)("notifications-configure",f.Codicon.gear,(0,t.localize)(5,null)),o=(0,v.registerIcon)("notifications-do-not-disturb",f.Codicon.bellSlash,(0,t.localize)(6,null));let u=class extends y.Action{static{this.ID=b.CLEAR_NOTIFICATION}static{this.LABEL=(0,t.localize)(7,null)}constructor(C,I,_){super(C,I,m.ThemeIcon.asClassName(S)),this.commandService=_}async run(C){this.commandService.executeCommand(b.CLEAR_NOTIFICATION,C)}};e.ClearNotificationAction=u,e.ClearNotificationAction=u=fe([O(2,D.ICommandService)],u);let d=class extends y.Action{static{this.ID=b.CLEAR_ALL_NOTIFICATIONS}static{this.LABEL=(0,t.localize)(8,null)}constructor(C,I,_){super(C,I,m.ThemeIcon.asClassName(h)),this.commandService=_}async run(){this.commandService.executeCommand(b.CLEAR_ALL_NOTIFICATIONS)}};e.ClearAllNotificationsAction=d,e.ClearAllNotificationsAction=d=fe([O(2,D.ICommandService)],d);let p=class extends y.Action{static{this.ID=b.TOGGLE_DO_NOT_DISTURB_MODE}static{this.LABEL=(0,t.localize)(9,null)}constructor(C,I,_){super(C,I,m.ThemeIcon.asClassName(o)),this.commandService=_}async run(){this.commandService.executeCommand(b.TOGGLE_DO_NOT_DISTURB_MODE)}};e.ToggleDoNotDisturbAction=p,e.ToggleDoNotDisturbAction=p=fe([O(2,D.ICommandService)],p);let c=class extends y.Action{static{this.ID=b.HIDE_NOTIFICATIONS_CENTER}static{this.LABEL=(0,t.localize)(10,null)}constructor(C,I,_){super(C,I,m.ThemeIcon.asClassName(a)),this.commandService=_}async run(){this.commandService.executeCommand(b.HIDE_NOTIFICATIONS_CENTER)}};e.HideNotificationsCenterAction=c,e.HideNotificationsCenterAction=c=fe([O(2,D.ICommandService)],c);let l=class extends y.Action{static{this.ID=b.EXPAND_NOTIFICATION}static{this.LABEL=(0,t.localize)(11,null)}constructor(C,I,_){super(C,I,m.ThemeIcon.asClassName(r)),this.commandService=_}async run(C){this.commandService.executeCommand(b.EXPAND_NOTIFICATION,C)}};e.ExpandNotificationAction=l,e.ExpandNotificationAction=l=fe([O(2,D.ICommandService)],l);let n=class extends y.Action{static{this.ID=b.COLLAPSE_NOTIFICATION}static{this.LABEL=(0,t.localize)(12,null)}constructor(C,I,_){super(C,I,m.ThemeIcon.asClassName(i)),this.commandService=_}async run(C){this.commandService.executeCommand(b.COLLAPSE_NOTIFICATION,C)}};e.CollapseNotificationAction=n,e.CollapseNotificationAction=n=fe([O(2,D.ICommandService)],n);class g extends y.Action{static{this.ID="workbench.action.configureNotification"}static{this.LABEL=(0,t.localize)(13,null)}constructor(C,I,_){super(C,I,m.ThemeIcon.asClassName(s)),this.configurationActions=_}}e.ConfigureNotificationAction=g;let w=class extends y.Action{static{this.ID="workbench.action.copyNotificationMessage"}static{this.LABEL=(0,t.localize)(14,null)}constructor(C,I,_){super(C,I),this.clipboardService=_}run(C){return this.clipboardService.writeText(C.message.raw)}};e.CopyNotificationMessageAction=w,e.CopyNotificationMessageAction=w=fe([O(2,T.IClipboardService)],w)}),define(Q[3473],Y([1,0,7,41,10,2569,207,85,34,5,4,29,909,910,38,342,23,20,32,37,325,227,151,6,54,67]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E){"use strict";var C,I;Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationTemplateRenderer=e.NotificationRenderer=e.NotificationsListDelegate=void 0;class _{static{this.ROW_HEIGHT=42}static{this.LINE_HEIGHT=22}constructor(M){this.offsetHelper=this.createOffsetHelper(M)}createOffsetHelper(M){const N=document.createElement("div");return N.classList.add("notification-offset-helper"),M.appendChild(N),N}getHeight(M){if(!M.expanded)return _.ROW_HEIGHT;let N=_.ROW_HEIGHT;const P=this.computePreferredHeight(M);if(_.LINE_HEIGHT<P){const F=P-_.LINE_HEIGHT;N+=F}return(M.source||(0,u.isNonEmptyArray)(M.actions&&M.actions.primary))&&(N+=_.ROW_HEIGHT),N===_.ROW_HEIGHT&&M.collapse(!0),N}computePreferredHeight(M){let N=0;M.hasProgress||N++,M.canCollapse&&N++,(0,u.isNonEmptyArray)(M.actions&&M.actions.secondary)&&N++,this.offsetHelper.style.width=`${450-(10+30+N*30-Math.max(N-1,0)*4)}px`;const P=A.render(M.message);this.offsetHelper.appendChild(P);const x=Math.max(this.offsetHelper.offsetHeight,this.offsetHelper.scrollHeight);return(0,t.clearNode)(this.offsetHelper),x}getTemplateId(M){if(M instanceof a.NotificationViewItem)return k.TEMPLATE_ID;throw new Error("unknown element type: "+M)}}e.NotificationsListDelegate=_;class A{static render(M,N){const P=document.createElement("span");for(const x of M.linkedText.nodes)if(typeof x=="string")P.appendChild(document.createTextNode(x));else{let F=x.title;!F&&x.href.startsWith("command:")?F=(0,D.localize)(0,null,x.href.substr(8)):F||(F=x.href);const V=(0,t.$)("a",{href:x.href,title:F,tabIndex:0},x.label);if(N){const W=U=>{(0,t.isEventLike)(U)&&t.EventHelper.stop(U,!0),N.callback(x.href)},z=N.toDispose.add(new l.DomEmitter(V,t.EventType.CLICK)).event,B=N.toDispose.add(new l.DomEmitter(V,t.EventType.KEY_DOWN)).event,K=N.toDispose.add(g.Event.chain(B)).filter(U=>{const G=new E.StandardKeyboardEvent(U);return G.equals(10)||G.equals(3)}).event;N.toDispose.add(n.Gesture.addTarget(V));const H=N.toDispose.add(new l.DomEmitter(V,n.EventType.Tap)).event;g.Event.any(z,H,K)(W,null,N.toDispose)}P.appendChild(V)}return P}}let k=class{static{C=this}static{this.TEMPLATE_ID="notification"}constructor(M,N,P){this.actionRunner=M,this.contextMenuService=N,this.instantiationService=P}get templateId(){return C.TEMPLATE_ID}renderTemplate(M){const N=Object.create(null);N.toDispose=new S.DisposableStore,N.container=document.createElement("div"),N.container.classList.add("notification-list-item"),N.mainRow=document.createElement("div"),N.mainRow.classList.add("notification-list-item-main-row"),N.icon=document.createElement("div"),N.icon.classList.add("notification-list-item-icon","codicon"),N.message=document.createElement("div"),N.message.classList.add("notification-list-item-message");const P=document.createElement("div");return P.classList.add("notification-list-item-toolbar-container"),N.toolbar=new f.ActionBar(P,{ariaLabel:(0,D.localize)(1,null),actionViewItemProvider:x=>{if(x&&x instanceof r.ConfigureNotificationAction){const F=new c.DropdownMenuActionViewItem(x,x.configurationActions,this.contextMenuService,{actionRunner:this.actionRunner,classNames:x.class});return N.toDispose.add(F),F}},actionRunner:this.actionRunner}),N.toDispose.add(N.toolbar),N.detailsRow=document.createElement("div"),N.detailsRow.classList.add("notification-list-item-details-row"),N.source=document.createElement("div"),N.source.classList.add("notification-list-item-source"),N.buttonsContainer=document.createElement("div"),N.buttonsContainer.classList.add("notification-list-item-buttons-container"),M.appendChild(N.container),N.container.appendChild(N.detailsRow),N.detailsRow.appendChild(N.source),N.detailsRow.appendChild(N.buttonsContainer),N.container.appendChild(N.mainRow),N.mainRow.appendChild(N.icon),N.mainRow.appendChild(N.message),N.mainRow.appendChild(P),N.progress=new s.ProgressBar(M,w.defaultProgressBarStyles),N.toDispose.add(N.progress),N.renderer=this.instantiationService.createInstance(L,N,this.actionRunner),N.toDispose.add(N.renderer),N}renderElement(M,N,P){P.renderer.setInput(M)}disposeTemplate(M){(0,S.dispose)(M.toDispose)}};e.NotificationRenderer=k,e.NotificationRenderer=k=C=fe([O(1,h.IContextMenuService),O(2,m.IInstantiationService)],k);let L=class extends S.Disposable{static{I=this}static{this.SEVERITIES=[o.Severity.Info,o.Severity.Warning,o.Severity.Error]}constructor(M,N,P,x,F,V){super(),this.template=M,this.actionRunner=N,this.openerService=P,this.instantiationService=x,this.keybindingService=F,this.contextMenuService=V,this.inputDisposables=this._register(new S.DisposableStore),I.closeNotificationAction||(I.closeNotificationAction=x.createInstance(r.ClearNotificationAction,r.ClearNotificationAction.ID,r.ClearNotificationAction.LABEL),I.expandNotificationAction=x.createInstance(r.ExpandNotificationAction,r.ExpandNotificationAction.ID,r.ExpandNotificationAction.LABEL),I.collapseNotificationAction=x.createInstance(r.CollapseNotificationAction,r.CollapseNotificationAction.ID,r.CollapseNotificationAction.LABEL))}setInput(M){this.inputDisposables.clear(),this.render(M)}render(M){this.template.container.classList.toggle("expanded",M.expanded),this.inputDisposables.add((0,t.addDisposableListener)(this.template.container,t.EventType.MOUSE_UP,P=>{P.button===1&&t.EventHelper.stop(P,!0)})),this.inputDisposables.add((0,t.addDisposableListener)(this.template.container,t.EventType.AUXCLICK,P=>{!M.hasProgress&&P.button===1&&(t.EventHelper.stop(P,!0),M.close())})),this.renderSeverity(M);const N=this.renderMessage(M);this.renderSecondaryActions(M,N),this.renderSource(M),this.renderButtons(M),this.renderProgress(M),this.inputDisposables.add(M.onDidChangeContent(P=>{switch(P.kind){case 0:this.renderSeverity(M);break;case 3:this.renderProgress(M);break;case 1:this.renderMessage(M);break}}))}renderSeverity(M){I.SEVERITIES.forEach(N=>{M.severity!==N&&this.template.icon.classList.remove(...p.ThemeIcon.asClassNameArray(this.toSeverityIcon(N)))}),this.template.icon.classList.add(...p.ThemeIcon.asClassNameArray(this.toSeverityIcon(M.severity)))}renderMessage(M){(0,t.clearNode)(this.template.message),this.template.message.appendChild(A.render(M.message,{callback:P=>this.openerService.open(b.URI.parse(P),{allowCommands:!0}),toDispose:this.inputDisposables}));const N=M.canCollapse&&!M.expanded&&this.template.message.scrollWidth>this.template.message.clientWidth;return N?this.template.message.title=this.template.message.textContent+"":this.template.message.removeAttribute("title"),N}renderSecondaryActions(M,N){const P=[],x=M.actions?M.actions.secondary:void 0;if((0,u.isNonEmptyArray)(x)){const V=this.instantiationService.createInstance(r.ConfigureNotificationAction,r.ConfigureNotificationAction.ID,r.ConfigureNotificationAction.LABEL,x);P.push(V),this.inputDisposables.add(V)}let F=!1;M.canCollapse&&(M.expanded||M.source||N)&&(F=!0),F&&P.push(M.expanded?I.collapseNotificationAction:I.expandNotificationAction),M.hasProgress||P.push(I.closeNotificationAction),this.template.toolbar.clear(),this.template.toolbar.context=M,P.forEach(V=>this.template.toolbar.push(V,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(V)}))}renderSource(M){M.expanded&&M.source?(this.template.source.textContent=(0,D.localize)(2,null,M.source),this.template.source.title=M.source):(this.template.source.textContent="",this.template.source.removeAttribute("title"))}renderButtons(M){(0,t.clearNode)(this.template.buttonsContainer);const N=M.actions?M.actions.primary:void 0;if(M.expanded&&(0,u.isNonEmptyArray)(N)){const P=this,x=new class extends v.ActionRunner{async runAction(V){P.actionRunner.run(V,M),(!(V instanceof a.ChoiceAction)||!V.keepOpen)&&M.close()}},F=this.inputDisposables.add(new T.ButtonBar(this.template.buttonsContainer));for(let V=0;V<N.length;V++){const W=N[V],z={title:!0,secondary:V>0,...w.defaultButtonStyles},B=W instanceof a.ChoiceAction?W.menu:void 0,K=this.inputDisposables.add(B?F.addButtonWithDropdown({...z,contextMenuProvider:this.contextMenuService,actions:B,actionRunner:x}):F.addButton(z));K.label=W.label,this.inputDisposables.add(K.onDidClick(H=>{H&&t.EventHelper.stop(H,!0),x.run(W)}))}}}renderProgress(M){if(!M.hasProgress){this.template.progress.stop().hide();return}const N=M.progress.state;N.infinite?this.template.progress.infinite().show():typeof N.total=="number"||typeof N.worked=="number"?(typeof N.total=="number"&&!this.template.progress.hasTotal()&&this.template.progress.total(N.total),typeof N.worked=="number"&&this.template.progress.setWorked(N.worked).show()):this.template.progress.done().hide()}toSeverityIcon(M){switch(M){case o.Severity.Warning:return d.Codicon.warning;case o.Severity.Error:return d.Codicon.error}return d.Codicon.info}getKeybindingLabel(M){const N=this.keybindingService.lookupKeybinding(M.id);return N?N.getLabel():null}};e.NotificationTemplateRenderer=L,e.NotificationTemplateRenderer=L=I=fe([O(2,y.IOpenerService),O(3,m.IInstantiationService),O(4,i.IKeybindingService),O(5,h.IContextMenuService)],L)}),define(Q[722],Y([1,0,10,42,55,6,26,4,195,39,9,22,69,206]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceGlobMatcher=void 0;let s=class extends f.Disposable{static{i=this}static{this.NO_FOLDER=null}constructor(u,d,p,c){super(),this.getExpression=u,this.shouldUpdate=d,this.contextService=p,this.configurationService=c,this._onExpressionChange=this._register(new D.Emitter),this.onExpressionChange=this._onExpressionChange.event,this.mapFolderToParsedExpression=new Map,this.mapFolderToConfiguredExpression=new Map,this.updateExpressions(!1),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(u=>{this.shouldUpdate(u)&&this.updateExpressions(!0)})),this._register(this.contextService.onDidChangeWorkspaceFolders(()=>this.updateExpressions(!0)))}updateExpressions(u){let d=!1;for(const n of this.contextService.getWorkspace().folders){const g=n.uri.toString(),w=this.doGetExpression(n.uri),E=this.mapFolderToConfiguredExpression.get(g);w?(!E||!(0,y.equals)(E.expression,w.expression))&&(d=!0,this.mapFolderToParsedExpression.set(g,(0,v.parse)(w.expression)),this.mapFolderToConfiguredExpression.set(g,w)):E&&(d=!0,this.mapFolderToParsedExpression.delete(g),this.mapFolderToConfiguredExpression.delete(g))}const p=new a.ResourceSet(this.contextService.getWorkspace().folders.map(n=>n.uri));for(const[n]of this.mapFolderToConfiguredExpression)n!==i.NO_FOLDER&&(p.has(t.URI.parse(n))||(this.mapFolderToParsedExpression.delete(n),this.mapFolderToConfiguredExpression.delete(n),d=!0));const c=this.doGetExpression(void 0),l=this.mapFolderToConfiguredExpression.get(i.NO_FOLDER);c?(!l||!(0,y.equals)(l.expression,c.expression))&&(d=!0,this.mapFolderToParsedExpression.set(i.NO_FOLDER,(0,v.parse)(c.expression)),this.mapFolderToConfiguredExpression.set(i.NO_FOLDER,c)):l&&(d=!0,this.mapFolderToParsedExpression.delete(i.NO_FOLDER),this.mapFolderToConfiguredExpression.delete(i.NO_FOLDER)),u&&d&&this._onExpressionChange.fire()}doGetExpression(u){const d=this.getExpression(u);if(!d)return;const p=Object.keys(d);if(p.length===0)return;let c=!1;const l=Object.create(null);for(const n of p){c||(c=(0,b.isAbsolute)(n));let g=n;const w=(0,r.getDriveLetter)(g,!0);if(w){const E=w.toLowerCase();w!==w.toLowerCase()&&(g=`${E}${g.substring(1)}`)}l[g]=d[n]}return{expression:l,hasAbsolutePath:c}}matches(u,d){if(this.mapFolderToParsedExpression.size===0)return!1;const p=this.contextService.getWorkspaceFolder(u);let c,l;if(p&&this.mapFolderToParsedExpression.has(p.uri.toString())?(c=this.mapFolderToParsedExpression.get(p.uri.toString()),l=this.mapFolderToConfiguredExpression.get(p.uri.toString())):(c=this.mapFolderToParsedExpression.get(i.NO_FOLDER),l=this.mapFolderToConfiguredExpression.get(i.NO_FOLDER)),!c)return!1;let n;return p?n=(0,T.relativePath)(p.uri,u):n=this.uriToPath(u),typeof n=="string"&&c(n,void 0,d)?!0:n!==this.uriToPath(u)&&l?.hasAbsolutePath?!!c(this.uriToPath(u),void 0,d):!1}uriToPath(u){return u.scheme===h.Schemas.file?u.fsPath:u.path}};e.ResourceGlobMatcher=s,e.ResourceGlobMatcher=s=i=fe([O(2,m.IWorkspaceContextService),O(3,S.IConfigurationService)],s)}),define(Q[84],Y([1,0,2594,36,80,167]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CARD_OVERLAY_BACKGROUND=e.CARD_OVERLAY_FOREGROUND=e.WINDOW_INACTIVE_BORDER=e.WINDOW_ACTIVE_BORDER=e.NOTIFICATIONS_INFO_ICON_FOREGROUND=e.NOTIFICATIONS_WARNING_ICON_FOREGROUND=e.NOTIFICATIONS_ERROR_ICON_FOREGROUND=e.NOTIFICATIONS_BORDER=e.NOTIFICATIONS_CENTER_HEADER_BACKGROUND=e.NOTIFICATIONS_CENTER_HEADER_FOREGROUND=e.NOTIFICATIONS_LINKS=e.NOTIFICATIONS_BACKGROUND=e.NOTIFICATIONS_FOREGROUND=e.NOTIFICATIONS_TOAST_BORDER=e.NOTIFICATIONS_CENTER_BORDER=e.MENUBAR_SELECTION_BORDER=e.MENUBAR_SELECTION_BACKGROUND=e.MENUBAR_SELECTION_FOREGROUND=e.TITLE_BAR_BORDER=e.TITLE_BAR_INACTIVE_BACKGROUND=e.TITLE_BAR_ACTIVE_BACKGROUND=e.TITLE_BAR_INACTIVE_FOREGROUND=e.TITLE_BAR_ACTIVE_FOREGROUND=e.SIDE_BAR_SECTION_HEADER_BORDER=e.SIDE_BAR_SECTION_HEADER_FOREGROUND=e.SIDE_BAR_SECTION_HEADER_BACKGROUND=e.SIDE_BAR_DRAG_AND_DROP_BACKGROUND=e.SIDE_BAR_TITLE_FOREGROUND=e.SIDE_BAR_BORDER=e.SIDE_BAR_FOREGROUND=e.SIDE_BAR_BACKGROUND=e.EXTENSION_BADGE_REMOTE_FOREGROUND=e.EXTENSION_BADGE_REMOTE_BACKGROUND=e.STATUS_BAR_OFFLINE_ITEM_HOVER_BACKGROUND=e.STATUS_BAR_OFFLINE_ITEM_HOVER_FOREGROUND=e.STATUS_BAR_OFFLINE_ITEM_FOREGROUND=e.STATUS_BAR_OFFLINE_ITEM_BACKGROUND=e.STATUS_BAR_REMOTE_ITEM_HOVER_BACKGROUND=e.STATUS_BAR_REMOTE_ITEM_HOVER_FOREGROUND=e.STATUS_BAR_REMOTE_ITEM_FOREGROUND=e.STATUS_BAR_REMOTE_ITEM_BACKGROUND=e.PROFILE_BADGE_FOREGROUND=e.PROFILE_BADGE_BACKGROUND=e.ACTIVITY_BAR_BADGE_FOREGROUND=e.ACTIVITY_BAR_BADGE_BACKGROUND=e.ACTIVITY_BAR_DRAG_AND_DROP_BORDER=e.ACTIVITY_BAR_ACTIVE_BACKGROUND=e.ACTIVITY_BAR_ACTIVE_FOCUS_BORDER=e.ACTIVITY_BAR_ACTIVE_BORDER=e.ACTIVITY_BAR_BORDER=e.ACTIVITY_BAR_INACTIVE_FOREGROUND=e.ACTIVITY_BAR_FOREGROUND=e.ACTIVITY_BAR_BACKGROUND=e.STATUS_BAR_WARNING_ITEM_HOVER_BACKGROUND=e.STATUS_BAR_WARNING_ITEM_HOVER_FOREGROUND=e.STATUS_BAR_WARNING_ITEM_FOREGROUND=e.STATUS_BAR_WARNING_ITEM_BACKGROUND=e.STATUS_BAR_ERROR_ITEM_HOVER_BACKGROUND=e.STATUS_BAR_ERROR_ITEM_HOVER_FOREGROUND=e.STATUS_BAR_ERROR_ITEM_FOREGROUND=e.STATUS_BAR_ERROR_ITEM_BACKGROUND=e.STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND=e.STATUS_BAR_PROMINENT_ITEM_HOVER_FOREGROUND=e.STATUS_BAR_PROMINENT_ITEM_BACKGROUND=e.STATUS_BAR_PROMINENT_ITEM_FOREGROUND=e.STATUS_BAR_ITEM_COMPACT_HOVER_BACKGROUND=e.STATUS_BAR_ITEM_HOVER_FOREGROUND=e.STATUS_BAR_ITEM_HOVER_BACKGROUND=e.STATUS_BAR_ITEM_FOCUS_BORDER=e.STATUS_BAR_ITEM_ACTIVE_BACKGROUND=e.STATUS_BAR_NO_FOLDER_BORDER=e.STATUS_BAR_FOCUS_BORDER=e.STATUS_BAR_BORDER=e.STATUS_BAR_NO_FOLDER_BACKGROUND=e.STATUS_BAR_BACKGROUND=e.STATUS_BAR_NO_FOLDER_FOREGROUND=e.STATUS_BAR_FOREGROUND=e.BANNER_ICON_FOREGROUND=e.BANNER_FOREGROUND=e.BANNER_BACKGROUND=e.PANEL_SECTION_BORDER=e.PANEL_SECTION_HEADER_BORDER=e.PANEL_SECTION_HEADER_FOREGROUND=e.PANEL_SECTION_HEADER_BACKGROUND=e.PANEL_SECTION_DRAG_AND_DROP_BACKGROUND=e.PANEL_DRAG_AND_DROP_BORDER=e.PANEL_INPUT_BORDER=e.PANEL_ACTIVE_TITLE_BORDER=e.PANEL_INACTIVE_TITLE_FOREGROUND=e.PANEL_ACTIVE_TITLE_FOREGROUND=e.PANEL_BORDER=e.PANEL_BACKGROUND=e.SIDE_BY_SIDE_EDITOR_VERTICAL_BORDER=e.SIDE_BY_SIDE_EDITOR_HORIZONTAL_BORDER=e.EDITOR_DROP_INTO_PROMPT_BORDER=e.EDITOR_DROP_INTO_PROMPT_BACKGROUND=e.EDITOR_DROP_INTO_PROMPT_FOREGROUND=e.EDITOR_DRAG_AND_DROP_BACKGROUND=e.EDITOR_GROUP_BORDER=e.EDITOR_GROUP_HEADER_BORDER=e.EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND=e.EDITOR_GROUP_HEADER_TABS_BORDER=e.EDITOR_GROUP_HEADER_TABS_BACKGROUND=e.EDITOR_GROUP_FOCUSED_EMPTY_BORDER=e.EDITOR_GROUP_EMPTY_BACKGROUND=e.EDITOR_PANE_BACKGROUND=e.TAB_UNFOCUSED_INACTIVE_MODIFIED_BORDER=e.TAB_UNFOCUSED_ACTIVE_MODIFIED_BORDER=e.TAB_INACTIVE_MODIFIED_BORDER=e.TAB_ACTIVE_MODIFIED_BORDER=e.TAB_UNFOCUSED_HOVER_BORDER=e.TAB_HOVER_BORDER=e.TAB_UNFOCUSED_ACTIVE_BORDER_TOP=e.TAB_ACTIVE_BORDER_TOP=e.TAB_UNFOCUSED_ACTIVE_BORDER=e.TAB_ACTIVE_BORDER=e.TAB_LAST_PINNED_BORDER=e.TAB_BORDER=e.TAB_UNFOCUSED_HOVER_FOREGROUND=e.TAB_HOVER_FOREGROUND=e.TAB_UNFOCUSED_HOVER_BACKGROUND=e.TAB_HOVER_BACKGROUND=e.TAB_UNFOCUSED_INACTIVE_FOREGROUND=e.TAB_UNFOCUSED_ACTIVE_FOREGROUND=e.TAB_INACTIVE_FOREGROUND=e.TAB_ACTIVE_FOREGROUND=e.TAB_UNFOCUSED_INACTIVE_BACKGROUND=e.TAB_INACTIVE_BACKGROUND=e.TAB_UNFOCUSED_ACTIVE_BACKGROUND=e.TAB_ACTIVE_BACKGROUND=e.WORKBENCH_BACKGROUND=void 0;function T(f){switch(f.type){case D.ColorScheme.LIGHT:return b.Color.fromHex("#F3F3F3");case D.ColorScheme.HIGH_CONTRAST_LIGHT:return b.Color.fromHex("#FFFFFF");case D.ColorScheme.HIGH_CONTRAST_DARK:return b.Color.fromHex("#000000");default:return b.Color.fromHex("#252526")}}e.WORKBENCH_BACKGROUND=T,e.TAB_ACTIVE_BACKGROUND=(0,y.registerColor)("tab.activeBackground",{dark:y.editorBackground,light:y.editorBackground,hcDark:y.editorBackground,hcLight:y.editorBackground},(0,t.localize)(0,null)),e.TAB_UNFOCUSED_ACTIVE_BACKGROUND=(0,y.registerColor)("tab.unfocusedActiveBackground",{dark:e.TAB_ACTIVE_BACKGROUND,light:e.TAB_ACTIVE_BACKGROUND,hcDark:e.TAB_ACTIVE_BACKGROUND,hcLight:e.TAB_ACTIVE_BACKGROUND},(0,t.localize)(1,null)),e.TAB_INACTIVE_BACKGROUND=(0,y.registerColor)("tab.inactiveBackground",{dark:"#2D2D2D",light:"#ECECEC",hcDark:null,hcLight:null},(0,t.localize)(2,null)),e.TAB_UNFOCUSED_INACTIVE_BACKGROUND=(0,y.registerColor)("tab.unfocusedInactiveBackground",{dark:e.TAB_INACTIVE_BACKGROUND,light:e.TAB_INACTIVE_BACKGROUND,hcDark:e.TAB_INACTIVE_BACKGROUND,hcLight:e.TAB_INACTIVE_BACKGROUND},(0,t.localize)(3,null)),e.TAB_ACTIVE_FOREGROUND=(0,y.registerColor)("tab.activeForeground",{dark:b.Color.white,light:"#333333",hcDark:b.Color.white,hcLight:"#292929"},(0,t.localize)(4,null)),e.TAB_INACTIVE_FOREGROUND=(0,y.registerColor)("tab.inactiveForeground",{dark:(0,y.transparent)(e.TAB_ACTIVE_FOREGROUND,.5),light:(0,y.transparent)(e.TAB_ACTIVE_FOREGROUND,.7),hcDark:b.Color.white,hcLight:"#292929"},(0,t.localize)(5,null)),e.TAB_UNFOCUSED_ACTIVE_FOREGROUND=(0,y.registerColor)("tab.unfocusedActiveForeground",{dark:(0,y.transparent)(e.TAB_ACTIVE_FOREGROUND,.5),light:(0,y.transparent)(e.TAB_ACTIVE_FOREGROUND,.7),hcDark:b.Color.white,hcLight:"#292929"},(0,t.localize)(6,null)),e.TAB_UNFOCUSED_INACTIVE_FOREGROUND=(0,y.registerColor)("tab.unfocusedInactiveForeground",{dark:(0,y.transparent)(e.TAB_INACTIVE_FOREGROUND,.5),light:(0,y.transparent)(e.TAB_INACTIVE_FOREGROUND,.5),hcDark:b.Color.white,hcLight:"#292929"},(0,t.localize)(7,null)),e.TAB_HOVER_BACKGROUND=(0,y.registerColor)("tab.hoverBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(8,null)),e.TAB_UNFOCUSED_HOVER_BACKGROUND=(0,y.registerColor)("tab.unfocusedHoverBackground",{dark:(0,y.transparent)(e.TAB_HOVER_BACKGROUND,.5),light:(0,y.transparent)(e.TAB_HOVER_BACKGROUND,.7),hcDark:null,hcLight:null},(0,t.localize)(9,null)),e.TAB_HOVER_FOREGROUND=(0,y.registerColor)("tab.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(10,null)),e.TAB_UNFOCUSED_HOVER_FOREGROUND=(0,y.registerColor)("tab.unfocusedHoverForeground",{dark:(0,y.transparent)(e.TAB_HOVER_FOREGROUND,.5),light:(0,y.transparent)(e.TAB_HOVER_FOREGROUND,.5),hcDark:null,hcLight:null},(0,t.localize)(11,null)),e.TAB_BORDER=(0,y.registerColor)("tab.border",{dark:"#252526",light:"#F3F3F3",hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(12,null)),e.TAB_LAST_PINNED_BORDER=(0,y.registerColor)("tab.lastPinnedBorder",{dark:y.treeIndentGuidesStroke,light:y.treeIndentGuidesStroke,hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(13,null)),e.TAB_ACTIVE_BORDER=(0,y.registerColor)("tab.activeBorder",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(14,null)),e.TAB_UNFOCUSED_ACTIVE_BORDER=(0,y.registerColor)("tab.unfocusedActiveBorder",{dark:(0,y.transparent)(e.TAB_ACTIVE_BORDER,.5),light:(0,y.transparent)(e.TAB_ACTIVE_BORDER,.7),hcDark:null,hcLight:null},(0,t.localize)(15,null)),e.TAB_ACTIVE_BORDER_TOP=(0,y.registerColor)("tab.activeBorderTop",{dark:null,light:null,hcDark:null,hcLight:"#B5200D"},(0,t.localize)(16,null)),e.TAB_UNFOCUSED_ACTIVE_BORDER_TOP=(0,y.registerColor)("tab.unfocusedActiveBorderTop",{dark:(0,y.transparent)(e.TAB_ACTIVE_BORDER_TOP,.5),light:(0,y.transparent)(e.TAB_ACTIVE_BORDER_TOP,.7),hcDark:null,hcLight:"#B5200D"},(0,t.localize)(17,null)),e.TAB_HOVER_BORDER=(0,y.registerColor)("tab.hoverBorder",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(18,null)),e.TAB_UNFOCUSED_HOVER_BORDER=(0,y.registerColor)("tab.unfocusedHoverBorder",{dark:(0,y.transparent)(e.TAB_HOVER_BORDER,.5),light:(0,y.transparent)(e.TAB_HOVER_BORDER,.7),hcDark:null,hcLight:y.contrastBorder},(0,t.localize)(19,null)),e.TAB_ACTIVE_MODIFIED_BORDER=(0,y.registerColor)("tab.activeModifiedBorder",{dark:"#3399CC",light:"#33AAEE",hcDark:null,hcLight:y.contrastBorder},(0,t.localize)(20,null)),e.TAB_INACTIVE_MODIFIED_BORDER=(0,y.registerColor)("tab.inactiveModifiedBorder",{dark:(0,y.transparent)(e.TAB_ACTIVE_MODIFIED_BORDER,.5),light:(0,y.transparent)(e.TAB_ACTIVE_MODIFIED_BORDER,.5),hcDark:b.Color.white,hcLight:y.contrastBorder},(0,t.localize)(21,null)),e.TAB_UNFOCUSED_ACTIVE_MODIFIED_BORDER=(0,y.registerColor)("tab.unfocusedActiveModifiedBorder",{dark:(0,y.transparent)(e.TAB_ACTIVE_MODIFIED_BORDER,.5),light:(0,y.transparent)(e.TAB_ACTIVE_MODIFIED_BORDER,.7),hcDark:b.Color.white,hcLight:y.contrastBorder},(0,t.localize)(22,null)),e.TAB_UNFOCUSED_INACTIVE_MODIFIED_BORDER=(0,y.registerColor)("tab.unfocusedInactiveModifiedBorder",{dark:(0,y.transparent)(e.TAB_INACTIVE_MODIFIED_BORDER,.5),light:(0,y.transparent)(e.TAB_INACTIVE_MODIFIED_BORDER,.5),hcDark:b.Color.white,hcLight:y.contrastBorder},(0,t.localize)(23,null)),e.EDITOR_PANE_BACKGROUND=(0,y.registerColor)("editorPane.background",{dark:y.editorBackground,light:y.editorBackground,hcDark:y.editorBackground,hcLight:y.editorBackground},(0,t.localize)(24,null)),e.EDITOR_GROUP_EMPTY_BACKGROUND=(0,y.registerColor)("editorGroup.emptyBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(25,null)),e.EDITOR_GROUP_FOCUSED_EMPTY_BORDER=(0,y.registerColor)("editorGroup.focusedEmptyBorder",{dark:null,light:null,hcDark:y.focusBorder,hcLight:y.focusBorder},(0,t.localize)(26,null)),e.EDITOR_GROUP_HEADER_TABS_BACKGROUND=(0,y.registerColor)("editorGroupHeader.tabsBackground",{dark:"#252526",light:"#F3F3F3",hcDark:null,hcLight:null},(0,t.localize)(27,null)),e.EDITOR_GROUP_HEADER_TABS_BORDER=(0,y.registerColor)("editorGroupHeader.tabsBorder",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(28,null)),e.EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND=(0,y.registerColor)("editorGroupHeader.noTabsBackground",{dark:y.editorBackground,light:y.editorBackground,hcDark:y.editorBackground,hcLight:y.editorBackground},(0,t.localize)(29,null)),e.EDITOR_GROUP_HEADER_BORDER=(0,y.registerColor)("editorGroupHeader.border",{dark:null,light:null,hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(30,null)),e.EDITOR_GROUP_BORDER=(0,y.registerColor)("editorGroup.border",{dark:"#444444",light:"#E7E7E7",hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(31,null)),e.EDITOR_DRAG_AND_DROP_BACKGROUND=(0,y.registerColor)("editorGroup.dropBackground",{dark:b.Color.fromHex("#53595D").transparent(.5),light:b.Color.fromHex("#2677CB").transparent(.18),hcDark:null,hcLight:b.Color.fromHex("#0F4A85").transparent(.5)},(0,t.localize)(32,null)),e.EDITOR_DROP_INTO_PROMPT_FOREGROUND=(0,y.registerColor)("editorGroup.dropIntoPromptForeground",{dark:y.editorWidgetForeground,light:y.editorWidgetForeground,hcDark:y.editorWidgetForeground,hcLight:y.editorWidgetForeground},(0,t.localize)(33,null)),e.EDITOR_DROP_INTO_PROMPT_BACKGROUND=(0,y.registerColor)("editorGroup.dropIntoPromptBackground",{dark:y.editorWidgetBackground,light:y.editorWidgetBackground,hcDark:y.editorWidgetBackground,hcLight:y.editorWidgetBackground},(0,t.localize)(34,null)),e.EDITOR_DROP_INTO_PROMPT_BORDER=(0,y.registerColor)("editorGroup.dropIntoPromptBorder",{dark:null,light:null,hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(35,null)),e.SIDE_BY_SIDE_EDITOR_HORIZONTAL_BORDER=(0,y.registerColor)("sideBySideEditor.horizontalBorder",{dark:e.EDITOR_GROUP_BORDER,light:e.EDITOR_GROUP_BORDER,hcDark:e.EDITOR_GROUP_BORDER,hcLight:e.EDITOR_GROUP_BORDER},(0,t.localize)(36,null)),e.SIDE_BY_SIDE_EDITOR_VERTICAL_BORDER=(0,y.registerColor)("sideBySideEditor.verticalBorder",{dark:e.EDITOR_GROUP_BORDER,light:e.EDITOR_GROUP_BORDER,hcDark:e.EDITOR_GROUP_BORDER,hcLight:e.EDITOR_GROUP_BORDER},(0,t.localize)(37,null)),e.PANEL_BACKGROUND=(0,y.registerColor)("panel.background",{dark:y.editorBackground,light:y.editorBackground,hcDark:y.editorBackground,hcLight:y.editorBackground},(0,t.localize)(38,null)),e.PANEL_BORDER=(0,y.registerColor)("panel.border",{dark:b.Color.fromHex("#808080").transparent(.35),light:b.Color.fromHex("#808080").transparent(.35),hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(39,null)),e.PANEL_ACTIVE_TITLE_FOREGROUND=(0,y.registerColor)("panelTitle.activeForeground",{dark:"#E7E7E7",light:"#424242",hcDark:b.Color.white,hcLight:y.editorForeground},(0,t.localize)(40,null)),e.PANEL_INACTIVE_TITLE_FOREGROUND=(0,y.registerColor)("panelTitle.inactiveForeground",{dark:(0,y.transparent)(e.PANEL_ACTIVE_TITLE_FOREGROUND,.6),light:(0,y.transparent)(e.PANEL_ACTIVE_TITLE_FOREGROUND,.75),hcDark:b.Color.white,hcLight:y.editorForeground},(0,t.localize)(41,null)),e.PANEL_ACTIVE_TITLE_BORDER=(0,y.registerColor)("panelTitle.activeBorder",{dark:e.PANEL_ACTIVE_TITLE_FOREGROUND,light:e.PANEL_ACTIVE_TITLE_FOREGROUND,hcDark:y.contrastBorder,hcLight:"#B5200D"},(0,t.localize)(42,null)),e.PANEL_INPUT_BORDER=(0,y.registerColor)("panelInput.border",{dark:y.inputBorder,light:b.Color.fromHex("#ddd"),hcDark:y.inputBorder,hcLight:y.inputBorder},(0,t.localize)(43,null)),e.PANEL_DRAG_AND_DROP_BORDER=(0,y.registerColor)("panel.dropBorder",{dark:e.PANEL_ACTIVE_TITLE_FOREGROUND,light:e.PANEL_ACTIVE_TITLE_FOREGROUND,hcDark:e.PANEL_ACTIVE_TITLE_FOREGROUND,hcLight:e.PANEL_ACTIVE_TITLE_FOREGROUND},(0,t.localize)(44,null)),e.PANEL_SECTION_DRAG_AND_DROP_BACKGROUND=(0,y.registerColor)("panelSection.dropBackground",{dark:e.EDITOR_DRAG_AND_DROP_BACKGROUND,light:e.EDITOR_DRAG_AND_DROP_BACKGROUND,hcDark:e.EDITOR_DRAG_AND_DROP_BACKGROUND,hcLight:e.EDITOR_DRAG_AND_DROP_BACKGROUND},(0,t.localize)(45,null)),e.PANEL_SECTION_HEADER_BACKGROUND=(0,y.registerColor)("panelSectionHeader.background",{dark:b.Color.fromHex("#808080").transparent(.2),light:b.Color.fromHex("#808080").transparent(.2),hcDark:null,hcLight:null},(0,t.localize)(46,null)),e.PANEL_SECTION_HEADER_FOREGROUND=(0,y.registerColor)("panelSectionHeader.foreground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(47,null)),e.PANEL_SECTION_HEADER_BORDER=(0,y.registerColor)("panelSectionHeader.border",{dark:y.contrastBorder,light:y.contrastBorder,hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(48,null)),e.PANEL_SECTION_BORDER=(0,y.registerColor)("panelSection.border",{dark:e.PANEL_BORDER,light:e.PANEL_BORDER,hcDark:e.PANEL_BORDER,hcLight:e.PANEL_BORDER},(0,t.localize)(49,null)),e.BANNER_BACKGROUND=(0,y.registerColor)("banner.background",{dark:y.listActiveSelectionBackground,light:(0,y.darken)(y.listActiveSelectionBackground,.3),hcDark:y.listActiveSelectionBackground,hcLight:y.listActiveSelectionBackground},(0,t.localize)(50,null)),e.BANNER_FOREGROUND=(0,y.registerColor)("banner.foreground",{dark:y.listActiveSelectionForeground,light:y.listActiveSelectionForeground,hcDark:y.listActiveSelectionForeground,hcLight:y.listActiveSelectionForeground},(0,t.localize)(51,null)),e.BANNER_ICON_FOREGROUND=(0,y.registerColor)("banner.iconForeground",{dark:y.editorInfoForeground,light:y.editorInfoForeground,hcDark:y.editorInfoForeground,hcLight:y.editorInfoForeground},(0,t.localize)(52,null)),e.STATUS_BAR_FOREGROUND=(0,y.registerColor)("statusBar.foreground",{dark:"#FFFFFF",light:"#FFFFFF",hcDark:"#FFFFFF",hcLight:y.editorForeground},(0,t.localize)(53,null)),e.STATUS_BAR_NO_FOLDER_FOREGROUND=(0,y.registerColor)("statusBar.noFolderForeground",{dark:e.STATUS_BAR_FOREGROUND,light:e.STATUS_BAR_FOREGROUND,hcDark:e.STATUS_BAR_FOREGROUND,hcLight:e.STATUS_BAR_FOREGROUND},(0,t.localize)(54,null)),e.STATUS_BAR_BACKGROUND=(0,y.registerColor)("statusBar.background",{dark:"#007ACC",light:"#007ACC",hcDark:null,hcLight:null},(0,t.localize)(55,null)),e.STATUS_BAR_NO_FOLDER_BACKGROUND=(0,y.registerColor)("statusBar.noFolderBackground",{dark:"#68217A",light:"#68217A",hcDark:null,hcLight:null},(0,t.localize)(56,null)),e.STATUS_BAR_BORDER=(0,y.registerColor)("statusBar.border",{dark:null,light:null,hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(57,null)),e.STATUS_BAR_FOCUS_BORDER=(0,y.registerColor)("statusBar.focusBorder",{dark:e.STATUS_BAR_FOREGROUND,light:e.STATUS_BAR_FOREGROUND,hcDark:null,hcLight:e.STATUS_BAR_FOREGROUND},(0,t.localize)(58,null)),e.STATUS_BAR_NO_FOLDER_BORDER=(0,y.registerColor)("statusBar.noFolderBorder",{dark:e.STATUS_BAR_BORDER,light:e.STATUS_BAR_BORDER,hcDark:e.STATUS_BAR_BORDER,hcLight:e.STATUS_BAR_BORDER},(0,t.localize)(59,null)),e.STATUS_BAR_ITEM_ACTIVE_BACKGROUND=(0,y.registerColor)("statusBarItem.activeBackground",{dark:b.Color.white.transparent(.18),light:b.Color.white.transparent(.18),hcDark:b.Color.white.transparent(.18),hcLight:b.Color.black.transparent(.18)},(0,t.localize)(60,null)),e.STATUS_BAR_ITEM_FOCUS_BORDER=(0,y.registerColor)("statusBarItem.focusBorder",{dark:e.STATUS_BAR_FOREGROUND,light:e.STATUS_BAR_FOREGROUND,hcDark:null,hcLight:y.activeContrastBorder},(0,t.localize)(61,null)),e.STATUS_BAR_ITEM_HOVER_BACKGROUND=(0,y.registerColor)("statusBarItem.hoverBackground",{dark:b.Color.white.transparent(.12),light:b.Color.white.transparent(.12),hcDark:b.Color.white.transparent(.12),hcLight:b.Color.black.transparent(.12)},(0,t.localize)(62,null)),e.STATUS_BAR_ITEM_HOVER_FOREGROUND=(0,y.registerColor)("statusBarItem.hoverForeground",{dark:e.STATUS_BAR_FOREGROUND,light:e.STATUS_BAR_FOREGROUND,hcDark:e.STATUS_BAR_FOREGROUND,hcLight:e.STATUS_BAR_FOREGROUND},(0,t.localize)(63,null)),e.STATUS_BAR_ITEM_COMPACT_HOVER_BACKGROUND=(0,y.registerColor)("statusBarItem.compactHoverBackground",{dark:b.Color.white.transparent(.2),light:b.Color.white.transparent(.2),hcDark:b.Color.white.transparent(.2),hcLight:b.Color.black.transparent(.2)},(0,t.localize)(64,null)),e.STATUS_BAR_PROMINENT_ITEM_FOREGROUND=(0,y.registerColor)("statusBarItem.prominentForeground",{dark:e.STATUS_BAR_FOREGROUND,light:e.STATUS_BAR_FOREGROUND,hcDark:e.STATUS_BAR_FOREGROUND,hcLight:e.STATUS_BAR_FOREGROUND},(0,t.localize)(65,null)),e.STATUS_BAR_PROMINENT_ITEM_BACKGROUND=(0,y.registerColor)("statusBarItem.prominentBackground",{dark:b.Color.black.transparent(.5),light:b.Color.black.transparent(.5),hcDark:b.Color.black.transparent(.5),hcLight:b.Color.black.transparent(.5)},(0,t.localize)(66,null)),e.STATUS_BAR_PROMINENT_ITEM_HOVER_FOREGROUND=(0,y.registerColor)("statusBarItem.prominentHoverForeground",{dark:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,light:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,hcDark:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,hcLight:e.STATUS_BAR_ITEM_HOVER_FOREGROUND},(0,t.localize)(67,null)),e.STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND=(0,y.registerColor)("statusBarItem.prominentHoverBackground",{dark:b.Color.black.transparent(.3),light:b.Color.black.transparent(.3),hcDark:b.Color.black.transparent(.3),hcLight:null},(0,t.localize)(68,null)),e.STATUS_BAR_ERROR_ITEM_BACKGROUND=(0,y.registerColor)("statusBarItem.errorBackground",{dark:(0,y.darken)(y.errorForeground,.4),light:(0,y.darken)(y.errorForeground,.4),hcDark:null,hcLight:"#B5200D"},(0,t.localize)(69,null)),e.STATUS_BAR_ERROR_ITEM_FOREGROUND=(0,y.registerColor)("statusBarItem.errorForeground",{dark:b.Color.white,light:b.Color.white,hcDark:b.Color.white,hcLight:b.Color.white},(0,t.localize)(70,null)),e.STATUS_BAR_ERROR_ITEM_HOVER_FOREGROUND=(0,y.registerColor)("statusBarItem.errorHoverForeground",{dark:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,light:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,hcDark:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,hcLight:e.STATUS_BAR_ITEM_HOVER_FOREGROUND},(0,t.localize)(71,null)),e.STATUS_BAR_ERROR_ITEM_HOVER_BACKGROUND=(0,y.registerColor)("statusBarItem.errorHoverBackground",{dark:e.STATUS_BAR_ITEM_HOVER_BACKGROUND,light:e.STATUS_BAR_ITEM_HOVER_BACKGROUND,hcDark:e.STATUS_BAR_ITEM_HOVER_BACKGROUND,hcLight:e.STATUS_BAR_ITEM_HOVER_BACKGROUND},(0,t.localize)(72,null)),e.STATUS_BAR_WARNING_ITEM_BACKGROUND=(0,y.registerColor)("statusBarItem.warningBackground",{dark:(0,y.darken)(y.editorWarningForeground,.4),light:(0,y.darken)(y.editorWarningForeground,.4),hcDark:null,hcLight:"#895503"},(0,t.localize)(73,null)),e.STATUS_BAR_WARNING_ITEM_FOREGROUND=(0,y.registerColor)("statusBarItem.warningForeground",{dark:b.Color.white,light:b.Color.white,hcDark:b.Color.white,hcLight:b.Color.white},(0,t.localize)(74,null)),e.STATUS_BAR_WARNING_ITEM_HOVER_FOREGROUND=(0,y.registerColor)("statusBarItem.warningHoverForeground",{dark:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,light:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,hcDark:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,hcLight:e.STATUS_BAR_ITEM_HOVER_FOREGROUND},(0,t.localize)(75,null)),e.STATUS_BAR_WARNING_ITEM_HOVER_BACKGROUND=(0,y.registerColor)("statusBarItem.warningHoverBackground",{dark:e.STATUS_BAR_ITEM_HOVER_BACKGROUND,light:e.STATUS_BAR_ITEM_HOVER_BACKGROUND,hcDark:e.STATUS_BAR_ITEM_HOVER_BACKGROUND,hcLight:e.STATUS_BAR_ITEM_HOVER_BACKGROUND},(0,t.localize)(76,null)),e.ACTIVITY_BAR_BACKGROUND=(0,y.registerColor)("activityBar.background",{dark:"#333333",light:"#2C2C2C",hcDark:"#000000",hcLight:"#FFFFFF"},(0,t.localize)(77,null)),e.ACTIVITY_BAR_FOREGROUND=(0,y.registerColor)("activityBar.foreground",{dark:b.Color.white,light:b.Color.white,hcDark:b.Color.white,hcLight:y.editorForeground},(0,t.localize)(78,null)),e.ACTIVITY_BAR_INACTIVE_FOREGROUND=(0,y.registerColor)("activityBar.inactiveForeground",{dark:(0,y.transparent)(e.ACTIVITY_BAR_FOREGROUND,.4),light:(0,y.transparent)(e.ACTIVITY_BAR_FOREGROUND,.4),hcDark:b.Color.white,hcLight:y.editorForeground},(0,t.localize)(79,null)),e.ACTIVITY_BAR_BORDER=(0,y.registerColor)("activityBar.border",{dark:null,light:null,hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(80,null)),e.ACTIVITY_BAR_ACTIVE_BORDER=(0,y.registerColor)("activityBar.activeBorder",{dark:e.ACTIVITY_BAR_FOREGROUND,light:e.ACTIVITY_BAR_FOREGROUND,hcDark:null,hcLight:y.contrastBorder},(0,t.localize)(81,null)),e.ACTIVITY_BAR_ACTIVE_FOCUS_BORDER=(0,y.registerColor)("activityBar.activeFocusBorder",{dark:null,light:null,hcDark:null,hcLight:"#B5200D"},(0,t.localize)(82,null)),e.ACTIVITY_BAR_ACTIVE_BACKGROUND=(0,y.registerColor)("activityBar.activeBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(83,null)),e.ACTIVITY_BAR_DRAG_AND_DROP_BORDER=(0,y.registerColor)("activityBar.dropBorder",{dark:e.ACTIVITY_BAR_FOREGROUND,light:e.ACTIVITY_BAR_FOREGROUND,hcDark:null,hcLight:null},(0,t.localize)(84,null)),e.ACTIVITY_BAR_BADGE_BACKGROUND=(0,y.registerColor)("activityBarBadge.background",{dark:"#007ACC",light:"#007ACC",hcDark:"#000000",hcLight:"#0F4A85"},(0,t.localize)(85,null)),e.ACTIVITY_BAR_BADGE_FOREGROUND=(0,y.registerColor)("activityBarBadge.foreground",{dark:b.Color.white,light:b.Color.white,hcDark:b.Color.white,hcLight:b.Color.white},(0,t.localize)(86,null)),e.PROFILE_BADGE_BACKGROUND=(0,y.registerColor)("profileBadge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:b.Color.white,hcLight:b.Color.black},(0,t.localize)(87,null)),e.PROFILE_BADGE_FOREGROUND=(0,y.registerColor)("profileBadge.foreground",{dark:b.Color.white,light:"#333333",hcDark:b.Color.black,hcLight:b.Color.white},(0,t.localize)(88,null)),e.STATUS_BAR_REMOTE_ITEM_BACKGROUND=(0,y.registerColor)("statusBarItem.remoteBackground",{dark:e.ACTIVITY_BAR_BADGE_BACKGROUND,light:e.ACTIVITY_BAR_BADGE_BACKGROUND,hcDark:e.ACTIVITY_BAR_BADGE_BACKGROUND,hcLight:e.ACTIVITY_BAR_BADGE_BACKGROUND},(0,t.localize)(89,null)),e.STATUS_BAR_REMOTE_ITEM_FOREGROUND=(0,y.registerColor)("statusBarItem.remoteForeground",{dark:e.ACTIVITY_BAR_BADGE_FOREGROUND,light:e.ACTIVITY_BAR_BADGE_FOREGROUND,hcDark:e.ACTIVITY_BAR_BADGE_FOREGROUND,hcLight:e.ACTIVITY_BAR_BADGE_FOREGROUND},(0,t.localize)(90,null)),e.STATUS_BAR_REMOTE_ITEM_HOVER_FOREGROUND=(0,y.registerColor)("statusBarItem.remoteHoverForeground",{dark:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,light:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,hcDark:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,hcLight:e.STATUS_BAR_ITEM_HOVER_FOREGROUND},(0,t.localize)(91,null)),e.STATUS_BAR_REMOTE_ITEM_HOVER_BACKGROUND=(0,y.registerColor)("statusBarItem.remoteHoverBackground",{dark:e.STATUS_BAR_ITEM_HOVER_BACKGROUND,light:e.STATUS_BAR_ITEM_HOVER_BACKGROUND,hcDark:e.STATUS_BAR_ITEM_HOVER_BACKGROUND,hcLight:null},(0,t.localize)(92,null)),e.STATUS_BAR_OFFLINE_ITEM_BACKGROUND=(0,y.registerColor)("statusBarItem.offlineBackground",{dark:"#6c1717",light:"#6c1717",hcDark:"#6c1717",hcLight:"#6c1717"},(0,t.localize)(93,null)),e.STATUS_BAR_OFFLINE_ITEM_FOREGROUND=(0,y.registerColor)("statusBarItem.offlineForeground",{dark:e.STATUS_BAR_REMOTE_ITEM_FOREGROUND,light:e.STATUS_BAR_REMOTE_ITEM_FOREGROUND,hcDark:e.STATUS_BAR_REMOTE_ITEM_FOREGROUND,hcLight:e.STATUS_BAR_REMOTE_ITEM_FOREGROUND},(0,t.localize)(94,null)),e.STATUS_BAR_OFFLINE_ITEM_HOVER_FOREGROUND=(0,y.registerColor)("statusBarItem.offlineHoverForeground",{dark:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,light:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,hcDark:e.STATUS_BAR_ITEM_HOVER_FOREGROUND,hcLight:e.STATUS_BAR_ITEM_HOVER_FOREGROUND},(0,t.localize)(95,null)),e.STATUS_BAR_OFFLINE_ITEM_HOVER_BACKGROUND=(0,y.registerColor)("statusBarItem.offlineHoverBackground",{dark:e.STATUS_BAR_ITEM_HOVER_BACKGROUND,light:e.STATUS_BAR_ITEM_HOVER_BACKGROUND,hcDark:e.STATUS_BAR_ITEM_HOVER_BACKGROUND,hcLight:null},(0,t.localize)(96,null)),e.EXTENSION_BADGE_REMOTE_BACKGROUND=(0,y.registerColor)("extensionBadge.remoteBackground",{dark:e.ACTIVITY_BAR_BADGE_BACKGROUND,light:e.ACTIVITY_BAR_BADGE_BACKGROUND,hcDark:e.ACTIVITY_BAR_BADGE_BACKGROUND,hcLight:e.ACTIVITY_BAR_BADGE_BACKGROUND},(0,t.localize)(97,null)),e.EXTENSION_BADGE_REMOTE_FOREGROUND=(0,y.registerColor)("extensionBadge.remoteForeground",{dark:e.ACTIVITY_BAR_BADGE_FOREGROUND,light:e.ACTIVITY_BAR_BADGE_FOREGROUND,hcDark:e.ACTIVITY_BAR_BADGE_FOREGROUND,hcLight:e.ACTIVITY_BAR_BADGE_FOREGROUND},(0,t.localize)(98,null)),e.SIDE_BAR_BACKGROUND=(0,y.registerColor)("sideBar.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#000000",hcLight:"#FFFFFF"},(0,t.localize)(99,null)),e.SIDE_BAR_FOREGROUND=(0,y.registerColor)("sideBar.foreground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(100,null)),e.SIDE_BAR_BORDER=(0,y.registerColor)("sideBar.border",{dark:null,light:null,hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(101,null)),e.SIDE_BAR_TITLE_FOREGROUND=(0,y.registerColor)("sideBarTitle.foreground",{dark:e.SIDE_BAR_FOREGROUND,light:e.SIDE_BAR_FOREGROUND,hcDark:e.SIDE_BAR_FOREGROUND,hcLight:e.SIDE_BAR_FOREGROUND},(0,t.localize)(102,null)),e.SIDE_BAR_DRAG_AND_DROP_BACKGROUND=(0,y.registerColor)("sideBar.dropBackground",{dark:e.EDITOR_DRAG_AND_DROP_BACKGROUND,light:e.EDITOR_DRAG_AND_DROP_BACKGROUND,hcDark:e.EDITOR_DRAG_AND_DROP_BACKGROUND,hcLight:e.EDITOR_DRAG_AND_DROP_BACKGROUND},(0,t.localize)(103,null)),e.SIDE_BAR_SECTION_HEADER_BACKGROUND=(0,y.registerColor)("sideBarSectionHeader.background",{dark:b.Color.fromHex("#808080").transparent(.2),light:b.Color.fromHex("#808080").transparent(.2),hcDark:null,hcLight:null},(0,t.localize)(104,null)),e.SIDE_BAR_SECTION_HEADER_FOREGROUND=(0,y.registerColor)("sideBarSectionHeader.foreground",{dark:e.SIDE_BAR_FOREGROUND,light:e.SIDE_BAR_FOREGROUND,hcDark:e.SIDE_BAR_FOREGROUND,hcLight:e.SIDE_BAR_FOREGROUND},(0,t.localize)(105,null)),e.SIDE_BAR_SECTION_HEADER_BORDER=(0,y.registerColor)("sideBarSectionHeader.border",{dark:y.contrastBorder,light:y.contrastBorder,hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(106,null)),e.TITLE_BAR_ACTIVE_FOREGROUND=(0,y.registerColor)("titleBar.activeForeground",{dark:"#CCCCCC",light:"#333333",hcDark:"#FFFFFF",hcLight:"#292929"},(0,t.localize)(107,null)),e.TITLE_BAR_INACTIVE_FOREGROUND=(0,y.registerColor)("titleBar.inactiveForeground",{dark:(0,y.transparent)(e.TITLE_BAR_ACTIVE_FOREGROUND,.6),light:(0,y.transparent)(e.TITLE_BAR_ACTIVE_FOREGROUND,.6),hcDark:null,hcLight:"#292929"},(0,t.localize)(108,null)),e.TITLE_BAR_ACTIVE_BACKGROUND=(0,y.registerColor)("titleBar.activeBackground",{dark:"#3C3C3C",light:"#DDDDDD",hcDark:"#000000",hcLight:"#FFFFFF"},(0,t.localize)(109,null)),e.TITLE_BAR_INACTIVE_BACKGROUND=(0,y.registerColor)("titleBar.inactiveBackground",{dark:(0,y.transparent)(e.TITLE_BAR_ACTIVE_BACKGROUND,.6),light:(0,y.transparent)(e.TITLE_BAR_ACTIVE_BACKGROUND,.6),hcDark:null,hcLight:null},(0,t.localize)(110,null)),e.TITLE_BAR_BORDER=(0,y.registerColor)("titleBar.border",{dark:null,light:null,hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(111,null)),e.MENUBAR_SELECTION_FOREGROUND=(0,y.registerColor)("menubar.selectionForeground",{dark:e.TITLE_BAR_ACTIVE_FOREGROUND,light:e.TITLE_BAR_ACTIVE_FOREGROUND,hcDark:e.TITLE_BAR_ACTIVE_FOREGROUND,hcLight:e.TITLE_BAR_ACTIVE_FOREGROUND},(0,t.localize)(112,null)),e.MENUBAR_SELECTION_BACKGROUND=(0,y.registerColor)("menubar.selectionBackground",{dark:y.toolbarHoverBackground,light:y.toolbarHoverBackground,hcDark:null,hcLight:null},(0,t.localize)(113,null)),e.MENUBAR_SELECTION_BORDER=(0,y.registerColor)("menubar.selectionBorder",{dark:null,light:null,hcDark:y.activeContrastBorder,hcLight:y.activeContrastBorder},(0,t.localize)(114,null)),e.NOTIFICATIONS_CENTER_BORDER=(0,y.registerColor)("notificationCenter.border",{dark:y.widgetBorder,light:y.widgetBorder,hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(115,null)),e.NOTIFICATIONS_TOAST_BORDER=(0,y.registerColor)("notificationToast.border",{dark:y.widgetBorder,light:y.widgetBorder,hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(116,null)),e.NOTIFICATIONS_FOREGROUND=(0,y.registerColor)("notifications.foreground",{dark:y.editorWidgetForeground,light:y.editorWidgetForeground,hcDark:y.editorWidgetForeground,hcLight:y.editorWidgetForeground},(0,t.localize)(117,null)),e.NOTIFICATIONS_BACKGROUND=(0,y.registerColor)("notifications.background",{dark:y.editorWidgetBackground,light:y.editorWidgetBackground,hcDark:y.editorWidgetBackground,hcLight:y.editorWidgetBackground},(0,t.localize)(118,null)),e.NOTIFICATIONS_LINKS=(0,y.registerColor)("notificationLink.foreground",{dark:y.textLinkForeground,light:y.textLinkForeground,hcDark:y.textLinkForeground,hcLight:y.textLinkForeground},(0,t.localize)(119,null)),e.NOTIFICATIONS_CENTER_HEADER_FOREGROUND=(0,y.registerColor)("notificationCenterHeader.foreground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(120,null)),e.NOTIFICATIONS_CENTER_HEADER_BACKGROUND=(0,y.registerColor)("notificationCenterHeader.background",{dark:(0,y.lighten)(e.NOTIFICATIONS_BACKGROUND,.3),light:(0,y.darken)(e.NOTIFICATIONS_BACKGROUND,.05),hcDark:e.NOTIFICATIONS_BACKGROUND,hcLight:e.NOTIFICATIONS_BACKGROUND},(0,t.localize)(121,null)),e.NOTIFICATIONS_BORDER=(0,y.registerColor)("notifications.border",{dark:e.NOTIFICATIONS_CENTER_HEADER_BACKGROUND,light:e.NOTIFICATIONS_CENTER_HEADER_BACKGROUND,hcDark:e.NOTIFICATIONS_CENTER_HEADER_BACKGROUND,hcLight:e.NOTIFICATIONS_CENTER_HEADER_BACKGROUND},(0,t.localize)(122,null)),e.NOTIFICATIONS_ERROR_ICON_FOREGROUND=(0,y.registerColor)("notificationsErrorIcon.foreground",{dark:y.editorErrorForeground,light:y.editorErrorForeground,hcDark:y.editorErrorForeground,hcLight:y.editorErrorForeground},(0,t.localize)(123,null)),e.NOTIFICATIONS_WARNING_ICON_FOREGROUND=(0,y.registerColor)("notificationsWarningIcon.foreground",{dark:y.editorWarningForeground,light:y.editorWarningForeground,hcDark:y.editorWarningForeground,hcLight:y.editorWarningForeground},(0,t.localize)(124,null)),e.NOTIFICATIONS_INFO_ICON_FOREGROUND=(0,y.registerColor)("notificationsInfoIcon.foreground",{dark:y.editorInfoForeground,light:y.editorInfoForeground,hcDark:y.editorInfoForeground,hcLight:y.editorInfoForeground},(0,t.localize)(125,null)),e.WINDOW_ACTIVE_BORDER=(0,y.registerColor)("window.activeBorder",{dark:null,light:null,hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(126,null)),e.WINDOW_INACTIVE_BORDER=(0,y.registerColor)("window.inactiveBorder",{dark:null,light:null,hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(127,null)),e.CARD_OVERLAY_FOREGROUND=(0,y.registerColor)("card.overlayForeground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(128,null)),e.CARD_OVERLAY_BACKGROUND=(0,y.registerColor)("card.overlayBackground",{dark:"#252526",light:"#F3F3F3",hcDark:"#000000",hcLight:"#FFFFFF"},(0,t.localize)(129,null))}),define(Q[174],Y([1,0,156,198,7,67,87,80,4,22,42,17,10,59,1962,8,6,54,84,1575,1576]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Modal=e.MODAL_SHOWING_CONTEXT=e.MODAL_SHOWING_KEY=e.MessageLevel=void 0;var p;(function(A){A[A.Error=0]="Error",A[A.Warning=1]="Warning",A[A.Information=2]="Information"})(p||(e.MessageLevel=p={})),e.MODAL_SHOWING_KEY="modalShowing",e.MODAL_SHOWING_CONTEXT=new s.RawContextKey(e.MODAL_SHOWING_KEY,[]);const c=(0,i.localize)(0,null),l=(0,i.localize)(1,null),n=(0,i.localize)(2,null),g=(0,i.localize)(3,null),w=(0,i.localize)(4,null),E=(0,i.localize)(5,null),C="expanded",I={dialogStyle:"flyout",dialogPosition:void 0,width:"narrow",isAngular:!1,hasBackButton:!1,hasTitleIcon:!1,hasErrors:!1,hasSpinner:!0,renderHeader:!0,renderFooter:!0,dialogProperties:void 0,height:480};class _ extends v.Disposable{get backButton(){return this._backButton}setWide(k){this._bodyContainer.classList.toggle("wide",k)}constructor(k,L,R,M,N,P,x,F,V,W){super(),this._title=k,this._name=L,this._telemetryService=R,this.layoutService=M,this._clipboardService=N,this._themeService=P,this.logService=x,this.textResourcePropertiesService=F,this._useDefaultMessageBoxLocation=!0,this.disposableStore=this._register(new v.DisposableStore),this._footerButtons=[],this._onClosed=new o.Emitter,this.onClosed=this._onClosed.event,this._modalOptions=W||Object.create(null),(0,S.mixin)(this._modalOptions,I,!1),this._staticKey=(0,r.generateUuid)(),this._modalShowingContext=e.MODAL_SHOWING_CONTEXT.bindTo(V)}render(){this._styleElement=b.createStyleSheet(this._bodyContainer);let k,L=".modal.fade";switch(this._modalOptions.dialogStyle){case"flyout":L+=".flyout-dialog";break;case"callout":L+=".callout-dialog";break;default:L+=".normal-dialog"}this._bodyContainer=b.$(`${L}`,{role:"dialog","aria-label":this._title}),this._modalOptions.dialogStyle==="callout"?k=0:k=this.layoutService.offset?.top??0,this._bodyContainer.style.top=`${k}px`,this._modalDialog=b.append(this._bodyContainer,b.$(".modal-dialog")),this._modalDialogContainer=b.append(this._modalDialog,b.$(".modal-dialog-container"));const R=b.append(this._modalDialogContainer,b.$("form"));if(this._modalOptions.dialogStyle==="normal"&&(this._modalDialog.style.height=`min(100%, ${this._modalOptions.height}px)`),this._modalOptions.dialogStyle==="callout"){let N=`.callout-arrow.from-${this._modalOptions.dialogPosition}`;this._modalContent=b.append(R,b.$(`.modal-content${N}`))}else this._modalContent=b.append(R,b.$(".modal-content"));if(typeof this._modalOptions.width=="number"?this._modalDialog.style.width=`${this._modalOptions.width}px`:this._modalOptions.width==="narrow"||this._modalOptions.width==="medium"||this._modalOptions.width==="wide"?this._modalDialog.classList.add(`${this._modalOptions.width}-dialog`):this._modalDialog.style.width=this._modalOptions.width,this._modalOptions.dialogStyle==="callout"&&this._register(b.addDisposableListener(this._bodyContainer,b.EventType.CLICK,N=>this.handleClickOffModal(N))),!(0,h.isUndefinedOrNull)(this._title)&&(this._modalOptions.renderHeader||this._modalOptions.renderHeader===void 0)){if(this._modalHeaderSection=b.append(this._modalContent,b.$(".modal-header")),this._modalOptions.hasBackButton){const N=b.append(this._modalHeaderSection,b.$(".modal-go-back"));this._backButton=new y.Button(N,(0,u.getButtonStyles)({buttonBackground:d.SIDE_BAR_BACKGROUND,buttonHoverBackground:d.SIDE_BAR_BACKGROUND})),this._backButton.icon="backButtonIcon",this._backButton.title=(0,i.localize)(6,null)}this._modalOptions.hasTitleIcon&&(this._modalTitleIcon=b.append(this._modalHeaderSection,b.$(".modal-title-icon"))),this._modalTitle=b.append(this._modalHeaderSection,b.$("h1.modal-title")),this._modalTitle.innerText=this._title}if(!this._modalOptions.isAngular&&this._modalOptions.hasErrors){this._messageElement=b.$(".dialog-message.error",{role:"alert"});const N=b.append(this._messageElement,b.$(".dialog-message-header"));this._messageIcon=b.append(N,b.$(".dialog-message-icon")),this._messageSeverity=b.append(N,b.$(".dialog-message-severity")),this._detailsButtonContainer=b.append(N,b.$(".dialog-message-button")),this._toggleMessageDetailButton=new y.Button(this._detailsButtonContainer,u.defaultButtonStyles),this._toggleMessageDetailButton.icon="message-details-icon",this._toggleMessageDetailButton.label=g,this._register(this._toggleMessageDetailButton.onDidClick(()=>this.toggleMessageDetail()));const P=b.append(N,b.$(".dialog-message-button"));this._copyMessageButton=new y.Button(P,u.defaultButtonStyles),this._copyMessageButton.icon="copy-message-icon",this._copyMessageButton.label=w,this._register(this._copyMessageButton.onDidClick(()=>this._clipboardService.writeText(this.getTextForClipboard())));const x=b.append(N,b.$(".dialog-message-button"));this._closeMessageButton=new y.Button(x,u.defaultButtonStyles),this._closeMessageButton.icon="close-message-icon",this._closeMessageButton.label=E,this._register(this._closeMessageButton.onDidClick(()=>this.setError(void 0))),this._messageBody=b.append(this._messageElement,b.$(".dialog-message-body")),this._messageSummary=b.append(this._messageBody,b.$(".dialog-message-summary")),this._register(b.addDisposableListener(this._messageSummary,b.EventType.CLICK,()=>this.toggleMessageDetail())),this._messageDetail=b.$(".dialog-message-detail")}const M=this._modalOptions.isAngular===!1?"modal-body":"modal-body-and-footer";this._modalBodySection=b.append(this._modalContent,b.$(`.${M}`)),this.renderBody(this._modalBodySection),this._modalOptions.renderFooter!==!1&&(this._modalOptions.isAngular||(this._modalFooterSection=b.append(this._modalContent,b.$(".modal-footer")),this._modalOptions.hasSpinner&&(this._spinnerElement=b.append(this._modalFooterSection,b.$(".codicon.in-progress")),this._spinnerElement.setAttribute("title",this._modalOptions.spinnerTitle??""),b.hide(this._spinnerElement)),this._leftFooter=b.append(this._modalFooterSection,b.$(".left-footer")),this._rightFooter=b.append(this._modalFooterSection,b.$(".right-footer"))))}onClose(k){this.hide("close")}handleClickOffModal(k){k.target.closest(".modal-content")||this.hide("close")}onAccept(k){this.hide("ok")}getTextForClipboard(){const k=this.textResourcePropertiesService.getEOL(a.URI.from({scheme:m.Schemas.untitled}));return this._messageDetailText===""?this._messageSummaryText:`${this._messageSummaryText}${k}========================${k}${this._messageDetailText}`}updateExpandMessageState(){this._messageSummary.style.cursor=this.shouldShowExpandMessageButton?"pointer":"default",this._messageSummary.classList.remove(C),this.shouldShowExpandMessageButton?b.append(this._detailsButtonContainer,this._toggleMessageDetailButton.element):this._toggleMessageDetailButton.element.remove()}toggleMessageDetail(){const k=this._messageSummary.classList.contains(C);this._messageSummary.classList.toggle(C,!k),this._toggleMessageDetailButton.label=k?g:(0,i.localize)(7,null),this._messageDetailText&&(k?this._messageDetail.remove():b.append(this._messageBody,this._messageDetail))}get shouldShowExpandMessageButton(){return this._messageDetailText!==""||this._messageSummary.scrollWidth>this._messageSummary.offsetWidth}setInitialFocusedElement(){const k=(0,t.getFocusableElements)(this._modalDialog);k?.length>0&&k[0].focus()}positionCalloutDialog(){let k;typeof this._modalOptions.width=="number"&&(k=this._modalOptions.width),this._modalOptions.dialogPosition==="above"?this._modalOptions.dialogProperties?(this._modalDialog.style.left=`${this._modalOptions.dialogProperties.xPos-this._modalOptions.dialogProperties.width}px`,this._modalDialog.style.top=`${this._modalOptions.dialogProperties.yPos-235}px`):(this._modalDialog.style.left=`${this._modalOptions.dialogProperties.xPos}px`,this._modalDialog.style.top=`${this._modalOptions.dialogProperties.yPos-235}px`):this._modalOptions.dialogPosition==="below"?this._modalOptions.dialogProperties?(this._modalDialog.style.left=`${this._modalOptions.dialogProperties.xPos-this._modalOptions.dialogProperties.width}px`,this._modalDialog.style.top=`${this._modalOptions.dialogProperties.yPos+this._modalOptions.dialogProperties.height}px`):(this._modalDialog.style.left=`${this._modalOptions.dialogProperties.xPos}px`,this._modalDialog.style.top=`${this._modalOptions.dialogProperties.yPos}px`):this._modalOptions.dialogPosition==="left"&&(this._modalOptions.dialogProperties?(this._modalDialog.style.left=`${this._modalOptions.dialogProperties.xPos-(k+this._modalOptions.dialogProperties.width)}px`,this._modalDialog.style.top=`${this._modalOptions.dialogProperties.yPos-this._modalOptions.dialogProperties.height*2}px`):(this._modalDialog.style.left=`${this._modalOptions.dialogProperties.xPos-k}px`,this._modalDialog.style.top=`${this._modalOptions.dialogProperties.yPos}px`)),this._modalDialog.style.width=`${k}px`}show(k){this._modalOptions.dialogStyle==="callout"&&this.positionCalloutDialog(),this._focusedElementBeforeOpen=document.activeElement,this._modalShowingContext.get().push(this._staticKey),b.append(this.layoutService.container,this._bodyContainer),this.setInitialFocusedElement(),this.disposableStore.add(b.addDisposableListener(document,b.EventType.KEY_DOWN,L=>{let R=this._modalShowingContext.get();if(R[R.length-1]===this._staticKey){let M=new D.StandardKeyboardEvent(L);M.equals(3)?(b.EventHelper.stop(L,!0),this.onAccept(M)):M.equals(9)&&(b.EventHelper.stop(L,!0),this.onClose(M))}})),this.disposableStore.add((0,t.trapKeyboardNavigation)(this._modalDialog)),this.disposableStore.add(b.addDisposableListener(window,b.EventType.RESIZE,L=>{this.layout(b.getTotalHeight(this._modalBodySection))})),this.layout(b.getTotalHeight(this._modalBodySection)),this._telemetryService.createActionEvent("Shell","ModalDialogOpened",void 0,k).withAdditionalProperties({name:this._name}).send()}hide(k="close",L){this._modalShowingContext.get().pop(),this._bodyContainer.remove(),this.disposableStore.clear(),this._telemetryService.createActionEvent("Shell","ModalDialogClosed").withAdditionalProperties({name:this._name,reason:k,currentPageName:L}).send(),this.restoreKeyboardFocus(),this._onClosed.fire(k)}restoreKeyboardFocus(){this._focusedElementBeforeOpen&&this._focusedElementBeforeOpen.focus()}addFooterButton(k,L,R="right",M=!1,N){let P=b.$(".footer-button"),x=this._register(new y.Button(P,{secondary:M,...u.defaultButtonStyles}));x.label=k,x.onDidClick(()=>L());const F=R==="left"?this._leftFooter:this._rightFooter,V=N!==void 0&&N<=F.childElementCount?N:F.childElementCount;if(V<F.childElementCount){const W=F.children.item(V);F.insertBefore(P,W)}else b.append(F,P);return this._footerButtons.push(x),x}findFooterButton(k){return this._footerButtons.find(L=>{try{return L&&L.element.innerText===k}catch{return!1}})}removeFooterButton(k){let L=this._footerButtons.findIndex(R=>R&&R.element&&R.element.innerText===k);if(L>-1&&L<this._footerButtons.length){let R=this._footerButtons[L];R.element.parentElement.remove(),R.dispose(),this._footerButtons.splice(L,1)}}setError(k,L=p.Error,R=""){if(this._modalOptions.hasErrors){if(this._messageSummaryText=k||"",this._messageDetailText=R||"",this._messageSummaryText!==""){const M=["info","warning","error"];let N=M[2],P=n;L===p.Information?(N=M[0],P=c):L===p.Warning&&(N=M[1],P=l),M.forEach(x=>{this._messageIcon.classList.toggle(x,N===x),this._messageElement.classList.toggle(x,N===x)}),this._messageIcon.title=P,this._messageSeverity.innerText=P,this._messageSummary.innerText=k,this._messageSummary.title=k,this._messageDetail.innerText=R}this._messageDetail.remove(),this.messagesElementVisible=!!this._messageSummaryText,R&&(0,T.alert)(R),this.updateExpandMessageState()}}set messagesElementVisible(k){if(k)this._useDefaultMessageBoxLocation&&(this._messageElement.parentNode||(b.prepend(this._modalContent,this._messageElement),this.setInitialFocusedElement()));else if(this._messageElement.parentElement){const L=b.isAncestor(document.activeElement,this._messageElement);this._messageElement.remove(),L&&this.setInitialFocusedElement()}}set spinner(k){this._modalOptions.hasSpinner&&(k?(b.show(this._spinnerElement),this._modalOptions.spinnerTitle&&(0,T.alert)(this._modalOptions.spinnerTitle)):(b.hide(this._spinnerElement),this._modalOptions.onSpinnerHideText&&(0,T.alert)(this._modalOptions.onSpinnerHideText)))}get headerAndFooterBackground(){return this._dialogHeaderAndFooterBackground?this._dialogHeaderAndFooterBackground.toString():void 0}set title(k){this._title=k,this._modalTitle&&(this._modalTitle.innerText=k),this._bodyContainer&&this._bodyContainer.setAttribute("aria-label",k)}get title(){return this._title}set titleIconClassName(k){this._modalTitleIcon&&(this._modalTitleIcon.className="modal-title-icon "+k)}style(k){this._dialogForeground=k.dialogForeground,this._dialogBorder=k.dialogBorder,this._dialogHeaderAndFooterBackground=k.dialogHeaderAndFooterBackground,this._dialogBodyBackground=k.dialogBodyBackground,this._dialogInteriorBorder=k.dialogInteriorBorder,this._dialogExteriorBorder=k.dialogExteriorBorder,this._dialogShadowColor=k.dialogShadowColor,this.applyStyles()}applyStyles(){const k=this._dialogForeground?this._dialogForeground.toString():"",L=this._dialogBorder?this._dialogBorder.toString():"",R=this._dialogHeaderAndFooterBackground?this._dialogHeaderAndFooterBackground.toString():"",M=this._dialogBodyBackground?this._dialogBodyBackground.toString():"",N=L?"1px":"",P=L?"solid":"";if(this._closeButtonInHeader&&(this._closeButtonInHeader.style.color=k),this._modalDialog&&(this._modalDialog.style.color=k,this._modalDialog.style.borderWidth=L?"1px":"",this._modalDialog.style.borderStyle=L?"solid":"",this._modalDialog.style.borderColor=L),this._modalHeaderSection&&(this._modalHeaderSection.style.backgroundColor=R,this._modalOptions.dialogStyle!=="callout"&&(this._modalHeaderSection.style.borderBottomWidth=L?"1px":"",this._modalHeaderSection.style.borderBottomStyle=L?"solid":""),this._modalHeaderSection.style.borderBottomColor=L),this._messageElement&&(this._messageElement.style.backgroundColor=R,this._messageElement.style.borderBottomWidth=L?"1px":"",this._messageElement.style.borderBottomStyle=L?"solid":"",this._messageElement.style.borderBottomColor=L),this._modalBodySection&&(this._modalBodySection.style.backgroundColor=M),this._modalFooterSection&&(this._modalFooterSection.style.backgroundColor=R,this._modalFooterSection.style.borderTopWidth=N,this._modalFooterSection.style.borderTopStyle=P,this._modalOptions.dialogStyle!=="callout"&&(this._modalFooterSection.style.borderTopColor=L)),this._modalOptions.dialogStyle==="callout"){const x=[],F=this._dialogExteriorBorder?this._dialogExteriorBorder.toString():"",V=f.Color.Format.CSS.parseHex(F),W=this._dialogShadowColor?this._dialogShadowColor.toString():"",z=f.Color.Format.CSS.parseHex(W);V&&z&&x.push(` .modal.callout-dialog .modal-dialog { border-color: rgba(${V.rgba.r}, ${V.rgba.g}, ${V.rgba.b},0.5); box-shadow: 0px 3.2px 7.2px rgba(${z.rgba.r}, ${z.rgba.g}, ${z.rgba.b}, 0.132), 0px 0.6px 1.8px rgba(${z.rgba.r}, ${z.rgba.g}, ${z.rgba.b}, 0.108); } .hc-light .modal.callout-dialog .modal-dialog, .hc-black .modal.callout-dialog .modal-dialog { border-color: rgba(${V.rgba.r}, ${V.rgba.g}, ${V.rgba.b}, 1); } .modal.callout-dialog .modal-footer { border-top-color: ${this._dialogInteriorBorder}; } .callout-arrow:before { background-color: ${this._dialogBodyBackground}; border-color: transparent transparent rgba(${V.rgba.r}, ${V.rgba.g}, ${V.rgba.b}, 0.5) rgba(${V.rgba.r}, ${V.rgba.g}, ${V.rgba.b}, 0.5); } .hc-light .callout-arrow:before, .hc-black .callout-arrow:before { border-color: transparent transparent rgba(${V.rgba.r}, ${V.rgba.g}, ${V.rgba.b}, 1) rgba(${V.rgba.r}, ${V.rgba.g}, ${V.rgba.b}, 1); } .callout-arrow.from-left:before { background-color: ${this._dialogBodyBackground}; box-shadow: -4px 4px 4px rgba(${z.rgba.r}, ${z.rgba.g}, ${z.rgba.b}, 0.05); }`);const B=x.join(` `);B!==this._styleElement.innerHTML&&(this._styleElement.innerHTML=B)}}dispose(){super.dispose(),this._footerButtons=[]}}e.Modal=_}),define(Q[417],Y([1,0,1979,36,80,84]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TOOLBAR_OVERFLOW_SHADOW=e.PROPERTIES_CONTAINER_PROPERTY_NAME=e.PROPERTIES_CONTAINER_PROPERTY_VALUE=e.DASHBOARD_WIDGET_SUBTEXT=e.DASHBOARD_WIDGET_TITLE=e.DASHBOARD_BORDER=e.VERTICAL_TAB_ACTIVE_BACKGROUND=void 0,e.VERTICAL_TAB_ACTIVE_BACKGROUND=(0,y.registerColor)("tab.verticalTabActiveBackground",{dark:"#444444",light:"#e1f0fe",hcDark:D.TAB_ACTIVE_BACKGROUND,hcLight:D.TAB_ACTIVE_BACKGROUND},(0,t.localize)(0,null)),e.DASHBOARD_BORDER=(0,y.registerColor)("dashboard.border",{dark:"#8A8886",light:"#DDDDDD",hcDark:y.contrastBorder,hcLight:y.contrastBorder},(0,t.localize)(1,null)),e.DASHBOARD_WIDGET_TITLE=(0,y.registerColor)("dashboardWidget.title",{light:"#323130",dark:"#FFFFFF",hcDark:"#FFFFFF",hcLight:"#000000"},(0,t.localize)(2,null)),e.DASHBOARD_WIDGET_SUBTEXT=(0,y.registerColor)("dashboardWidget.subText",{light:"#484644",dark:"#8A8886",hcDark:"#FFFFFF",hcLight:"#000000"},(0,t.localize)(3,null)),e.PROPERTIES_CONTAINER_PROPERTY_VALUE=(0,y.registerColor)("propertiesContainer.propertyValue",{light:"#000000",dark:"FFFFFF",hcDark:"FFFFFF",hcLight:"000000"},(0,t.localize)(4,null)),e.PROPERTIES_CONTAINER_PROPERTY_NAME=(0,y.registerColor)("propertiesContainer.propertyName",{light:"#161616",dark:"#8A8886",hcDark:"#FFFFFF",hcLight:"#000000"},(0,t.localize)(5,null)),e.TOOLBAR_OVERFLOW_SHADOW=(0,y.registerColor)("toolbar.overflowShadow",{light:new b.Color(new b.RGBA(0,0,0,.132)),dark:new b.Color(new b.RGBA(0,0,0,.25)),hcDark:null,hcLight:null},(0,t.localize)(6,null))}),define(Q[3474],Y([1,0,40,155,831,19,11,417,1591]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let v=class extends y.ComponentBase{constructor(S,h,a){super(S,h,a)}ngAfterViewInit(){this.baseInit()}setLayout(S){this.layout()}setProperties(S){super.setProperties(S),this._propertiesContainer.propertyItems=this.propertyItems,this._propertiesContainer.showToggleButton=this.showToggleButton}get propertyItems(){return this.getPropertyOrDefault(S=>S.propertyItems,[])}set propertyItems(S){this.setPropertyFromUI((h,a)=>h.propertyItems=a,S),this._propertiesContainer.propertyItems=S}get showToggleButton(){return this.getPropertyOrDefault(S=>S.showToggleButton,!1)}};fe([(0,t.Input)()],v.prototype,"descriptor",void 0),fe([(0,t.Input)()],v.prototype,"modelStore",void 0),fe([(0,t.ViewChild)(b.PropertiesContainer)],v.prototype,"_propertiesContainer",void 0),v=fe([(0,t.Component)({selector:"modelview-properties-container",template:` <properties-container> </properties-container> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(T.ILogService))],v),e.default=v,(0,D.registerThemingParticipant)((m,S)=>{const h=m.getColor(f.PROPERTIES_CONTAINER_PROPERTY_NAME);h&&S.addRule(` modelview-properties-container .propertyName, modelview-properties-container .splitter { color: ${h} }`);const a=m.getColor(f.PROPERTIES_CONTAINER_PROPERTY_VALUE);a&&S.addRule(`modelview-properties-container .propertyValue { color: ${a} }`)})}),define(Q[147],Y([1,0,36,331,278,84,417]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.attachCustomDialogStyler=e.attachCalloutDialogStyler=e.attachTabbedPanelStyler=e.attachPanelStyler=e.attachModalDialogStyler=void 0;function f(a,r,i){return(0,b.attachStyler)(r,{dialogForeground:i&&i.dialogForeground||t.foreground,dialogBorder:t.contrastBorder,dialogHeaderAndFooterBackground:i&&i.dialogHeaderAndFooterBackground||D.SIDE_BAR_BACKGROUND,dialogBodyBackground:i&&i.dialogBodyBackground||t.editorBackground},a)}e.attachModalDialogStyler=f;function v(a,r){return(0,b.attachStyler)(r,{headerForeground:D.SIDE_BAR_SECTION_HEADER_FOREGROUND,headerBackground:D.SIDE_BAR_SECTION_HEADER_BACKGROUND,dropBackground:D.SIDE_BAR_DRAG_AND_DROP_BACKGROUND},a)}e.attachPanelStyler=v;function m(a,r){return(0,b.attachStyler)(r,{titleSelectedForeground:D.PANEL_ACTIVE_TITLE_FOREGROUND,titleSelectedBorder:D.PANEL_ACTIVE_TITLE_BORDER,titleUnSelectedForeground:D.PANEL_INACTIVE_TITLE_FOREGROUND,focusBorder:t.focusBorder,outline:t.activeContrastBorder,selectedBackgroundForVerticalLayout:T.VERTICAL_TAB_ACTIVE_BACKGROUND,border:T.DASHBOARD_BORDER,selectedTabContrastBorder:t.activeContrastBorder},a)}e.attachTabbedPanelStyler=m;function S(a,r,i){return(0,b.attachStyler)(r,{dialogForeground:i&&i.dialogForeground||y.calloutDialogForeground,dialogHeaderAndFooterBackground:i&&i.dialogHeaderAndFooterBackground||y.calloutDialogHeaderFooterBackground,dialogBodyBackground:i&&i.dialogBodyBackground||y.calloutDialogBodyBackground,dialogInteriorBorder:i&&i.dialogInteriorBorder||y.calloutDialogInteriorBorder,dialogExteriorBorder:i&&i.dialogExteriorBorder||y.calloutDialogExteriorBorder,dialogShadowColor:i&&i.dialogShadowColor||y.calloutDialogShadowColor},a)}e.attachCalloutDialogStyler=S;function h(a,r,i,s){return i==="callout"?(0,b.attachStyler)(r,{dialogForeground:s&&s.dialogForeground||y.calloutDialogForeground,dialogHeaderAndFooterBackground:s&&s.dialogHeaderAndFooterBackground||y.calloutDialogHeaderFooterBackground,dialogBodyBackground:s&&s.dialogBodyBackground||y.calloutDialogBodyBackground,dialogInteriorBorder:s&&s.dialogInteriorBorder||y.calloutDialogInteriorBorder,dialogExteriorBorder:s&&s.dialogExteriorBorder||y.calloutDialogExteriorBorder,dialogShadowColor:s&&s.dialogShadowColor||y.calloutDialogShadowColor},a):(0,b.attachStyler)(r,{dialogForeground:s&&s.dialogForeground||t.foreground,dialogBorder:t.contrastBorder,dialogHeaderAndFooterBackground:s&&s.dialogHeaderAndFooterBackground||D.SIDE_BAR_BACKGROUND,dialogBodyBackground:s&&s.dialogBodyBackground||t.editorBackground},a)}e.attachCustomDialogStyler=h}),define(Q[911],Y([1,0,350,199,174,3315,6,29,1963,8,36,249,68,7,19,11,76,147,111,331,78,117,559,1577]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OptionsDialog=void 0;let g=class extends b.Modal{constructor(E,C,I,_,A,k,L,R,M,N,P){super(E,C,L,_,M,A,N,P,R,I),this._contextViewService=k,this._categoryTitles=[],this._optionElements={},this._optionValues={},this._onOk=new T.Emitter,this.onOk=this._onOk.event,this._onCloseEvent=new T.Emitter,this.onCloseEvent=this._onCloseEvent.event}render(){super.render(),(0,u.attachModalDialogStyler)(this,this._themeService),this.backButton&&this.backButton.onDidClick(()=>this.cancel()),this.addFooterButton((0,v.localize)(0,null),()=>this.ok()),this.addFooterButton(this.options.cancelLabel||(0,v.localize)(1,null),()=>this.cancel(),"right",!0),this._register(this._themeService.onDidColorThemeChange(E=>this.updateTheme(E))),this.updateTheme(this._themeService.getColorTheme())}renderBody(E){this._body=(0,r.append)(E,(0,r.$)("div.optionsDialog-options")),this._dividerBuilder=(0,r.append)(this._body,(0,r.$)("div")),this._optionGroupsContainer=(0,r.append)(this._body,(0,r.$)("div.optionsDialog-options-groups.monaco-pane-view"));const C=(0,r.append)(this._body,(0,r.$)("div.optionsDialog-description"));this._optionTitle=(0,r.append)(C,(0,r.$)("div.modal-title")),this._optionDescription=(0,r.append)(C,(0,r.$)("div.optionsDialog-description-content"))}updateTheme(E){const C=E.getColor(S.contrastBorder),I=C?C.toString():"",_=E.getColor(p.GroupHeaderBackground);this._dividerBuilder&&(this._dividerBuilder.style.borderTopWidth=I?"1px":"",this._dividerBuilder.style.borderTopStyle=I?"solid":"",this._dividerBuilder.style.borderTopColor=I),this._categoryTitles.forEach(A=>{A.style.borderWidth=I?"1px 0px":"",A.style.borderStyle=I?"solid none":"",A.style.borderColor=I,A.style.backgroundColor=_?_.toString():""})}onOptionLinkClicked(E){let C=this._optionElements[E].option;this._optionTitle.innerText=C.displayName,this._optionDescription.innerText=C.description}fillInOptions(E,C){for(let I=0;I<C.length;I++){let _=C[I],A=t.appendRow(E,_.displayName,"optionsDialog-label","optionsDialog-input",`option-${_.name}`,_.isRequired);const k=D.createOptionElement(_,A,this._optionValues,this._optionElements,this._contextViewService,L=>this.onOptionLinkClicked(L));this._register(k.optionWidget)}}get options(){return this._modalOptions}get optionValues(){return this._optionValues}hideError(){this.setError("")}showError(E){this.setError(E)}onClose(){this.close()}onAccept(){this.ok()}ok(){D.validateInputs(this._optionElements)&&(D.updateOptions(this._optionValues,this._optionElements),this._onOk.fire(),this.close("ok"))}cancel(){this.close("cancel")}close(E="close"){this.hide(E),this._optionElements={},this._onCloseEvent.fire()}open(E,C){this._optionValues=C;let I=D.groupOptionsByCategory(E);(0,r.clearNode)(this._optionGroupsContainer);for(let _ in I){const A=(0,r.append)(this._optionGroupsContainer,(0,r.$)("h2.option-category-title"));A.innerText=_,this._categoryTitles.push(A);let k=I[_],L=(0,r.$)("table.optionsDialog-table");L.setAttribute("role","presentation"),this.fillInOptions(L,k),this.registerOnSelectionChangeEvents(C,L),(0,r.append)(this._optionGroupsContainer,L)}this.updateTheme(this._themeService.getColorTheme()),this.show()}registerOnSelectionChangeEvents(E,C){for(let I in this._optionElements){let _=this._optionElements[I].optionWidget;_ instanceof y.SelectBox&&this._registerSelectionChangeEvents([this._optionElements],this._optionElements[I].option,_,C)}}_registerSelectionChangeEvents(E,C,I,_){C?.onSelectionChange&&(C.onSelectionChange.forEach(A=>{this._register(I.onDidSelect(k=>{let L=k.selected;A?.dependentOptionActions?.forEach(R=>{let M=E[R.optionName]?.option.defaultValue??"",N=this._findWidget(E,R.optionName);N&&((0,r.createCSSRule)(`.hide-${N.id} .option-${N.id}`,"display: none;"),this._onValueChangeEvent(_,L,A.values,N,M,R))})})),A?.dependentOptionActions?.forEach(k=>{if(this._optionValues[k.optionName]&&k.required){let L=t.getOptionContainerByName(_,k.optionName);L&&L.childElementCount===1&&L.classList.add(n.RequiredIndicatorClassName)}this.optionValues[C.name]&&I.selectWithOptionName(this.optionValues[C.name],!1,!0)})}),C.onSelectionChange=void 0,this.optionValues[C.name]?I.selectWithOptionName(this.optionValues[C.name],!0):I.select(0,!0))}_onValueChangeEvent(E,C,I,_,A,k){if(I.includes(C.toLocaleLowerCase())&&k.action===l.Actions.Show||!I.includes(C.toLocaleLowerCase())&&k.action===l.Actions.Hide){if(E.classList.remove(`hide-${_.id}`),k.required){let L=t.getOptionContainerByName(E,k.optionName);L&&L.childElementCount===1&&L.classList.add(n.RequiredIndicatorClassName)}}else{_ instanceof y.SelectBox?_.select(_.values.indexOf(A)):_ instanceof h.InputBox&&(_.value=A);let L=t.getOptionContainerByName(E,k.optionName);L&&L.hasChildNodes&&L.childElementCount>1&&L.children.item(1).remove(),E.classList.add(`hide-${_.id}`),_.hideMessage()}}_findWidget(E,C){return E.find(I=>!!I[C].optionWidget)[C]?.optionWidget}layout(E){}dispose(){super.dispose(),this._optionElements={}}};e.OptionsDialog=g,e.OptionsDialog=g=fe([O(3,d.ILayoutService),O(4,i.IThemeService),O(5,f.IContextViewService),O(6,o.IAdsTelemetryService),O(7,m.IContextKeyService),O(8,a.IClipboardService),O(9,s.ILogService),O(10,c.ITextResourcePropertiesService)],g)}),define(Q[3475],Y([1,0,417,19,1616]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,y.registerThemingParticipant)((b,D)=>{const T=b.getColor(t.DASHBOARD_WIDGET_TITLE);T&&D.addRule(`dashboard-widget-wrapper .header { color: ${T}; }`);const f=b.getColor(t.DASHBOARD_WIDGET_SUBTEXT);f&&D.addRule(`.subText { color: ${f}; }`)})}),define(Q[3476],Y([1,0,7,1096,174,29,8,68,19,11,76,111,183,166,147,1033,78,54,1626]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkCalloutDialog=void 0;const d=452;let p=class extends b.Modal{constructor(l,n,g,w="",E="",C,I,_,A,k,L,R,M){super(l,"CalloutDialog",A,_,L,I,R,M,k,{dialogStyle:"callout",dialogPosition:n,dialogProperties:g,width:d}),this._defaultLabel=w,this._defaultLinkUrl=E,this._contextViewService=C,this._selectionComplete=new a.Deferred;let N=window.getSelection();N.rangeCount>0&&(this._previouslySelectedRange=N?.getRangeAt(0))}layout(l){}open(){return this._selectionComplete=new a.Deferred,this.show(),this._selectionComplete.promise}render(){super.render(),(0,i.attachCalloutDialogStyler)(this,this._themeService),this.addFooterButton(y.insertButtonText,()=>this.insert()),this.addFooterButton(y.cancelButtonText,()=>this.cancel(),void 0,!0)}renderBody(l){let n=t.$(".column.insert-link");t.append(l,n);let g=t.$(".row");t.append(n,g),this._linkTextLabel=t.$("p"),this._linkTextLabel.innerText=y.linkTextLabel,t.append(g,this._linkTextLabel);const w=t.$(".input-field");this._linkTextInputBox=new r.InputBox(w,this._contextViewService,{placeholder:y.linkTextPlaceholder,ariaLabel:y.linkTextLabel,inputBoxStyles:u.defaultInputBoxStyles}),this._linkTextInputBox.value=this._defaultLabel,t.append(g,w);let E=t.$(".row");t.append(n,E),this._linkAddressLabel=t.$("p"),this._linkAddressLabel.innerText=y.linkAddressLabel,t.append(E,this._linkAddressLabel);const C=t.$(".input-field");this._linkUrlInputBox=new r.InputBox(C,this._contextViewService,{placeholder:y.linkAddressPlaceholder,ariaLabel:y.linkAddressLabel,inputBoxStyles:u.defaultInputBoxStyles}),this._linkUrlInputBox.value=this._defaultLinkUrl,t.append(E,C)}onAccept(l){t.EventHelper.stop(l,!0),this.insert()}onClose(l){t.EventHelper.stop(l,!0),this.cancel()}insert(){this.hide("ok");let l=(0,s.escapeLabel)(this._linkTextInputBox.value),n=(0,s.unquoteText)(this._linkUrlInputBox.value),g=(0,s.escapeUrl)(n);if(this._previouslySelectedRange){let w=window.getSelection();w.removeAllRanges(),w.addRange(this._previouslySelectedRange),this._selectionComplete.resolve({insertEscapedMarkdown:`[${l}](${g})`,insertUnescapedLinkLabel:this._linkTextInputBox.value,insertUnescapedLinkUrl:n})}}cancel(){this.hide("cancel"),this._selectionComplete.resolve({insertEscapedMarkdown:"",insertUnescapedLinkLabel:(0,s.escapeLabel)(this._linkTextInputBox.value)})}set url(l){this._linkUrlInputBox.value=l}};e.LinkCalloutDialog=p,e.LinkCalloutDialog=p=fe([O(5,D.IContextViewService),O(6,v.IThemeService),O(7,h.ILayoutService),O(8,S.IAdsTelemetryService),O(9,T.IContextKeyService),O(10,f.IClipboardService),O(11,m.ILogService),O(12,o.ITextResourcePropertiesService)],p)}),define(Q[1258],Y([1,0,40,1527,6,2102,19,388,873,36,84,16,2095,17,15,435,130,655,1631]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputComponent=e.OUTPUT_SELECTOR=void 0,e.OUTPUT_SELECTOR="output-component";const u="actionselect",d='[class="grid-canvas"]',p=h.Registry.as(v.Extensions.MimeComponentContribution);let c=class extends s.CellView{constructor(n,g,w,E,C){super(),this._themeService=n,this._changeref=g,this._ref=w,this._componentFactoryResolver=E,this.notebookService=C,this._initialized=!1,this.isCellOutput=!0}ngOnInit(){this._register(this._themeService.onDidColorThemeChange(n=>this.updateTheme(n))),this.loadComponent(),this._initialized=!0,this._register(b.Event.debounce(this.cellModel.notebookModel.layoutChanged,(n,g)=>g,50,!1)(()=>this.layout()))}ngAfterViewInit(){this.updateTheme(this._themeService.getColorTheme())}ngOnChanges(n){for(let g in n)if(g==="activeCellId"){this.toggleUserSelect(this.isActive());break}}toggleUserSelect(n){this.nativeOutputElement&&(n?this.nativeOutputElement.classList.add(u):this.nativeOutputElement.classList.remove(u))}get nativeOutputElement(){return this.output?this.output.nativeElement:void 0}layout(){this.componentInstance&&this.componentInstance.layout&&this.componentInstance.layout()}get componentInstance(){return this._componentInstance||this.loadComponent(),this._componentInstance}get trustedMode(){return this._trusted}set trustedMode(n){this._trusted=n,this._initialized&&this.layout()}set activeCellId(n){this._activeCellId=n}get activeCellId(){return this._activeCellId}isActive(){return this.cellModel&&this.cellModel.id===this.activeCellId}hasError(){return!r.isUndefinedOrNull(this.errorText)}updateTheme(n){let g=this._ref.nativeElement,w=n.getColor(m.editorBackground,!0),E=n.getColor(S.SIDE_BAR_FOREGROUND,!0);w&&(g.style.backgroundColor=w.toString()),E&&(g.style.color=E.toString())}loadComponent(){let n=D.getBundleOptions({value:this.cellOutput,trusted:this.trustedMode});n.themeService=this._themeService;let g=p.getPreferredMimeType(n.data,n.trusted?"any":"ensure");if(this.errorText=void 0,!g){const _=Object.keys(n.data);this.errorText=n.trusted?(0,a.localize)(0,null,_.join(", ")):(0,a.localize)(1,null,_.join(", ")),this.cellModel?.notebookModel?.sendNotebookTelemetryActionEvent("MIMETypeRendererNotFound",{mime_types:_});return}let w=p.getCtorFromMimeType(g);if(!w){this.errorText=(0,a.localize)(2,null,g);return}let E=this._componentFactoryResolver.resolveComponentFactory(w),C=this.componentHost.viewContainerRef;C.clear();let I;try{I=C.createComponent(E,0),this._componentInstance=I.instance,this._componentInstance.mimeType=g,this._componentInstance.cellModel=this.cellModel,this._componentInstance.cellOutput=this.cellOutput,this._componentInstance.bundleOptions=n,this._changeref.detectChanges();let _=I.location.nativeElement;_.style.overflow="hidden",_.style.position="relative"}catch(_){this.errorText=(0,a.localize)(3,null,(0,i.getErrorMessage)(_));return}}cellGuid(){return this.cellModel.cellGuid}getCellModel(){return this.cellModel}addDecoration(n){if(n=n??this.highlightRange,this.output&&this.output.nativeElement&&(this.highlightAllMatches(),n)){let g=this.getHtmlElements();if(g.length===1&&g[0].nodeName==="MIME-OUTPUT")new y(g[0]).markRanges([{start:n.startColumn-1,length:n.endColumn-n.startColumn}],{className:s.findRangeSpecificClass,each:function(E,C){E.scrollIntoView({block:"center"})}});else if(g?.length>=n.startLineNumber){let w=g[n.startLineNumber-1],E=new y(w);w.children.length>0&&(E=new y(w.children[n.startColumn]),E?.mark(this.searchTerm,{className:s.findRangeSpecificClass,each:function(C){C.scrollIntoView({block:"center"})}}))}}}highlightAllMatches(){if(this.output&&this.output.nativeElement){let n=new y(this.output.nativeElement);this._model||(this._model=this.getCellModel().notebookModel);let g=this.notebookService.findNotebookEditor(this._model?.notebookUri);if(g){let w=g.notebookParams.input.notebookFindModel;w?.findMatches?.length>0&&(this.searchTerm=w.findExpression,n.mark(this.searchTerm,{className:s.findHighlightClass,separateWordSearch:!0}),document.querySelectorAll(d)?.forEach(C=>{n=new y(C),n.mark(this.searchTerm,{className:s.findHighlightClass})}))}}}removeDecoration(n){if(this.output&&this.output.nativeElement)if(n){let g=this.getHtmlElements(),w=g[n.startLineNumber-1];g.length===1&&g[0].nodeName==="MIME-OUTPUT"&&(w=g[0]),new y(w).unmark({acrossElements:!0,className:s.findRangeSpecificClass})}else{let g=new y(this.output.nativeElement);g.unmark({acrossElements:!0,className:s.findHighlightClass}),g.unmark({acrossElements:!0,className:s.findRangeSpecificClass}),this.highlightRange=void 0,document.querySelectorAll(d)?.forEach(E=>{g=new y(E),g.unmark({acrossElements:!0,className:s.findHighlightClass}),g.unmark({acrossElements:!0,className:s.findRangeSpecificClass})})}}getHtmlElements(){let n=[],g=this.output.nativeElement.querySelectorAll(d);if(g.length>0)g.forEach(w=>{n.push(...w.children)});else{let w=this.output.nativeElement.querySelectorAll("mime-output");n.push(...w)}return n}};e.OutputComponent=c,fe([(0,t.ViewChild)("output",{read:t.ElementRef})],c.prototype,"output",void 0),fe([(0,t.ViewChild)(f.ComponentHostDirective)],c.prototype,"componentHost",void 0),fe([(0,t.Input)()],c.prototype,"cellOutput",void 0),fe([(0,t.Input)()],c.prototype,"cellModel",void 0),fe([(0,t.Input)()],c.prototype,"trustedMode",null),fe([(0,t.Input)()],c.prototype,"activeCellId",null),e.OutputComponent=c=fe([(0,t.Component)({selector:e.OUTPUT_SELECTOR,templateUrl:decodeURI(q.toUrl("./output.component.html"))}),O(0,(0,t.Inject)(T.IThemeService)),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(2,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(3,(0,t.Inject)((0,t.forwardRef)(()=>t.ComponentFactoryResolver))),O(4,(0,t.Inject)(o.INotebookService))],c)}),define(Q[3477],Y([1,0,263,76,174,147,8,111,11,19,7,2116,166,29,78,54]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOptionsModal=void 0;let o=class extends b.Modal{constructor(d,p,c,l,n,g,w,E,C){super((0,h.localize)(0,null),"ViewOptionsModal",w,l,n,c,p,C,g,{hasErrors:!0,hasSpinner:!0}),this._view=d,this._contextViewService=E,this._optionsMap={}}renderBody(d){const p=S.$("div#view-options-form");p.style.padding="10px",S.append(d,p),this._viewNameInput=this.createNameInput(p)}layout(d){}createNameInput(d){return this.createInputBoxHelper(d,(0,h.localize)(1,null),this._view.name,{validationOptions:{validation:p=>{if(!p)return{type:3,content:(0,h.localize)(2,null)};if(this._view.name!==p&&!this._view.nameAvailable(p))return{type:3,content:(0,h.localize)(3,null)}}},ariaLabel:(0,h.localize)(4,null),inputBoxStyles:s.defaultInputBoxStyles})}createInputBoxHelper(d,p,c="",l){const n=S.append(d,S.$(".dialog-input-section"));S.append(n,S.$(".dialog-label")).innerText=p;const g=new a.InputBox(S.append(n,S.$(".dialog-input")),this._contextViewService,l);return g.value=c,g}render(){super.render(),this._submitButton=this.addFooterButton((0,h.localize)(5,null),()=>this.onSubmitHandler()),this.addFooterButton((0,h.localize)(6,null),()=>this.onCancelHandler(),"right",!0),this._register(this._viewNameInput.onDidChange(d=>this.validate())),(0,D.attachModalDialogStyler)(this,this._themeService),this.validate()}validate(){let d=!0;this._viewNameInput.validate()&&(d=!1),this._submitButton.enabled=d}onSubmitHandler(){this._view.name=this._viewNameInput.value,this._view.save(),this.close()}onCancelHandler(){this.close()}close(){return this.hide()}open(){this.show()}dispose(){super.dispose();for(let d in this._optionsMap)this._optionsMap[d].dispose(),delete this._optionsMap[d]}};e.ViewOptionsModal=o,e.ViewOptionsModal=o=fe([O(1,v.ILogService),O(2,m.IThemeService),O(3,f.ILayoutService),O(4,t.IClipboardService),O(5,T.IContextKeyService),O(6,y.IAdsTelemetryService),O(7,r.IContextViewService),O(8,i.ITextResourcePropertiesService)],o)}),define(Q[3478],Y([1,0,19,6,29,2173,8,7,174,166,68,11,78,76,147,111,54,1656]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoOAuthDialog=void 0;let u=class extends v.Modal{get onHandleAddAccount(){return this._onHandleAddAccount.event}get onCancel(){return this._onCancel.event}hideCopyButton(){this._copyAndOpenButton.element.hidden=!0}updateSelfHelpMessage(p){this._selfHelpElement.innerText=p}get onCloseEvent(){return this._onCloseEvent.event}constructor(p,c,l,n,g,w,E,C){super((0,D.localize)(0,null),"AutoOAuth",n,p,w,c,E,C,g,{dialogStyle:"normal",height:340,hasSpinner:!0}),this._contextViewService=l,this._onHandleAddAccount=new y.Emitter,this._onCancel=new y.Emitter,this._onCloseEvent=new y.Emitter}render(){super.render(),(0,i.attachModalDialogStyler)(this,this._themeService),this._copyAndOpenButton=this.addFooterButton((0,D.localize)(1,null),()=>this.addAccount()),this._closeButton=this.addFooterButton((0,D.localize)(2,null),()=>this.cancel(),"right",!0),this.registerListeners(),this._userCodeInputBox.disable(),this._websiteInputBox.disable()}layout(p){}renderBody(p){const c=(0,f.append)(p,(0,f.$)(".auto-oauth-dialog"));this._descriptionElement=(0,f.append)(c,(0,f.$)(".auto-oauth-description-section.new-section"));const l=(0,f.append)(c,(0,f.$)(".auto-oauth-info-section.new-section"));this._userCodeInputBox=this.createInputBoxHelper(l,(0,D.localize)(3,null)),this._websiteInputBox=this.createInputBoxHelper(l,(0,D.localize)(4,null)),this._selfHelpElement=(0,f.append)(c,(0,f.$)(".auto-oauth-selfhelp-section.new-section"))}createInputBoxHelper(p,c){const l=(0,f.append)(p,(0,f.$)(".dialog-input-section"));(0,f.append)(l,(0,f.$)(".dialog-label")).innerText=c;const n=(0,f.append)(l,(0,f.$)(".dialog-input"));return new m.InputBox(n,this._contextViewService,{ariaLabel:c,inputBoxStyles:o.defaultInputBoxStyles})}registerListeners(){this._register(this._copyAndOpenButton),this._register(this._closeButton)}onClose(){this.cancel()}onAccept(){this.addAccount()}addAccount(){this._copyAndOpenButton.enabled&&(this._copyAndOpenButton.enabled=!1,this.spinner=!0,this._onHandleAddAccount.fire())}cancel(){this._onCancel.fire()}close(){this._copyAndOpenButton.enabled=!0,this._onCloseEvent.fire(),this.spinner=!1,this.hide("close")}open(p,c,l,n){this.title=p,this._descriptionElement.innerText=c,this._userCodeInputBox.value=l,this._websiteInputBox.value=n,this.show(),this._copyAndOpenButton.focus()}};e.AutoOAuthDialog=u,e.AutoOAuthDialog=u=fe([O(0,s.ILayoutService),O(1,t.IThemeService),O(2,b.IContextViewService),O(3,r.IAdsTelemetryService),O(4,T.IContextKeyService),O(5,S.IClipboardService),O(6,h.ILogService),O(7,a.ITextResourcePropertiesService)],u)}),define(Q[3479],Y([1,0,5,63,2174,3478,262,188]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoOAuthDialogController=void 0;let v=class{constructor(S,h,a){this._instantiationService=S,this._accountManagementService=h,this._errorMessageService=a}openAutoOAuthDialog(S,h,a,r,i){if(this._providerId!==void 0){const s=(0,b.localize)(0,null);return this._errorMessageService.showDialog(y.default.Error,"",s),Promise.reject(new Error("Auto OAuth dialog already open"))}return this._autoOAuthDialog||(this._autoOAuthDialog=this._instantiationService.createInstance(D.AutoOAuthDialog),this._autoOAuthDialog.onHandleAddAccount(this.handleOnAddAccount,this),this._autoOAuthDialog.onCancel(this.handleOnCancel,this),this._autoOAuthDialog.onCloseEvent(this.handleOnClose,this),this._autoOAuthDialog.render()),this._userCode=r,this._uri=i,this._autoOAuthDialog.open(h,a,r,i),this._providerId=S,Promise.resolve()}closeAutoOAuthDialog(){this._autoOAuthDialog&&this._autoOAuthDialog.close(),this._providerId=void 0}handleOnCancel(){this._accountManagementService.cancelAutoOAuthDeviceCode(this._providerId)}handleOnClose(){this._providerId=void 0}async handleOnAddAccount(){if(this._userCode&&this._uri){if(!this._accountManagementService.copyUserCodeAndOpenBrowser(this._userCode,this._uri)){const S=(0,b.localize)(1,null);this._autoOAuthDialog.hideCopyButton(),this._autoOAuthDialog.updateSelfHelpMessage(S)}}else throw new Error("Missing user code and uri")}};e.AutoOAuthDialogController=v,e.AutoOAuthDialogController=v=fe([O(0,t.IInstantiationService),O(1,T.IAccountManagementService),O(2,f.IErrorMessageService)],v)}),define(Q[3480],Y([1,0,198,166,199,350,174,8,2177,29,7,33,263,19,11,78,76,147,111,262,847,679,276,5,15,183,54,101,1657]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackupRestoreUrlBrowserDialog=void 0;function _(){const k=new Date;return new Date(k.getFullYear()+1,k.getMonth(),k.getDate()).toUTCString()}let A=class extends T.Modal{constructor(L,R,M,N,P,x,F,V,W,z,B,K,H,U,G){super(L,"UrlBrowser",F,N,W,P,z,B,V,{dialogStyle:"flyout",hasTitleIcon:!1,hasBackButton:!0,hasSpinner:!0}),this._restoreDialog=R,this._defaultBackupName=M,this._contextViewService=x,this._accountManagementService=K,this._azureAccountService=H,this._blobService=U,this._instantiationService=G,this.onOk=new E.Deferred}layout(L){}renderBody(L){this._body=S.append(L,S.$(".url-browser-dialog"))}render(){super.render(),(0,u.attachModalDialogStyler)(this,this._themeService),this.backButton&&(this._register(this.backButton.onDidClick(()=>{this.close()})),this._register(this.backButton));let L=S.append(S.append(this._body,S.$(".option-section")),S.$("table.url-table-content"));L.setAttribute("role","presentation");let R=(0,v.localize)(0,null);this._accountSelectorBox=this._register(new b.SelectBox([""],"",I.defaultSelectBoxStyles,this._contextViewService,null,{ariaLabel:R})),this._accountSelectorBox.disable();let M=D.appendRow(L,R,"url-input-label","url-input-box",null,!0);D.appendInputSelectBox(M,this._accountSelectorBox),this._accountManagementService.getAccounts().then(ee=>this.setAccountSelectorBoxOptions(ee)).catch(ee=>{this.setAccountSelectorBoxOptions([]),(0,w.onUnexpectedError)(ee)});let N=(0,v.localize)(1,null),P=D.appendRow(L,"","url-input-label","url-input-box");const x=this._register(this._instantiationService.createInstance(n.Link,P,{label:N,title:N,href:""},{opener:async ee=>{await this._accountManagementService.openAccountListDialog(),this._accountManagementService.getAccounts().then(X=>this.setAccountSelectorBoxOptions(X)).catch(X=>{this.setAccountSelectorBoxOptions([]),(0,w.onUnexpectedError)(X)})}}));P.appendChild(x.el);let F=(0,v.localize)(2,null);this._tenantSelectorBox=this._register(new b.SelectBox([],"",I.defaultSelectBoxStyles,this._contextViewService,null,{ariaLabel:F})),this._tenantSelectorBox.disable();let V=D.appendRow(L,F,"url-input-label","url-input-box",null,!0);D.appendInputSelectBox(V,this._tenantSelectorBox);let W=(0,v.localize)(3,null);this._subscriptionSelectorBox=this._register(new b.SelectBox([],"",I.defaultSelectBoxStyles,this._contextViewService,null,{ariaLabel:W})),this._subscriptionSelectorBox.disable();let z=D.appendRow(L,W,"url-input-label","url-input-box",null,!0);D.appendInputSelectBox(z,this._subscriptionSelectorBox);let B=(0,v.localize)(4,null);this._storageAccountSelectorBox=this._register(new b.SelectBox([],"",I.defaultSelectBoxStyles,this._contextViewService,null,{ariaLabel:B})),this._storageAccountSelectorBox.disable();let K=D.appendRow(L,B,"url-input-label","url-input-box",null,!0);D.appendInputSelectBox(K,this._storageAccountSelectorBox);let H=(0,v.localize)(5,null);this._blobContainerSelectorBox=this._register(new b.SelectBox([],"",I.defaultSelectBoxStyles,this._contextViewService,null,{ariaLabel:H})),this._blobContainerSelectorBox.disable();let U=D.appendRow(L,H,"url-input-label","url-input-box",null,!0);D.appendInputSelectBox(U,this._blobContainerSelectorBox);let G=(0,v.localize)(6,null),$=D.appendRow(L,G,"url-input-label","url-input-box",null,!0);this._sasInputBox=this._register(new y.InputBox($,this._contextViewService,{flexibleHeight:!0,inputBoxStyles:C.defaultInputBoxStyles})),this._sasInputBox.disable(),this._register(this._sasInputBox.onDidChange(()=>this.enableOkButton()));let ie=D.appendRow(L,"","url-input-label","url-input-box"),J=(0,v.localize)(7,null);this._sasButton=this._register(new t.Button(ie,{title:J,...C.defaultButtonStyles})),this._sasButton.label=J,this._sasButton.title=J,this._register(this._sasButton.onDidClick(ee=>this.generateSharedAccessSignature()));let j=(0,v.localize)(8,null);if(this._restoreDialog){this._backupFileSelectorBox=this._register(new b.SelectBox([],"",I.defaultSelectBoxStyles,this._contextViewService,null,{ariaLabel:j}));let ee=D.appendRow(L,j,"url-input-label","url-input-box",null,!0);D.appendInputSelectBox(ee,this._backupFileSelectorBox),this._backupFileSelectorBox.setOptions([]),this._backupFileSelectorBox.disable()}else{let ee=D.appendRow(L,j,"url-input-label","url-input-box",null,!0);this._backupFileInputBox=this._register(new y.InputBox(ee,this._contextViewService,{flexibleHeight:!0,inputBoxStyles:C.defaultInputBoxStyles})),this._backupFileInputBox.value=this._defaultBackupName}this._okButton=this.addFooterButton((0,v.localize)(9,null),()=>this.ok()),this._okButton.enabled=!1,this._cancelButton=this.addFooterButton((0,v.localize)(10,null),()=>this.close(),"right",!0),this.registerListeners(),this.registerThemeStylers()}setAccountSelectorBoxOptions(L){this._accounts=L.filter(M=>!M.isStale).sort((M,N)=>M.displayInfo.displayName.localeCompare(N.displayInfo.displayName));const R=this._accounts.map(M=>M.displayInfo.displayName);this._accountSelectorBox.setOptions(R),this._accountSelectorBox.select(0),this._accounts.length===0?(this._accountSelectorBox.disable(),this.onTenantSelectorBoxChanged(0)):this._accountSelectorBox.enable()}onAccountSelectorBoxChanged(L){if(this._accounts.length!==0){this._selectedAccount=this._accounts[L];const M=this._selectedAccount.properties.tenants.map(N=>N.displayName);this._tenantSelectorBox.setOptions(M),this._tenantSelectorBox.select(0),M.length===0?this._tenantSelectorBox.disable():this._tenantSelectorBox.enable()}else this._tenantSelectorBox.setOptions([]),this._tenantSelectorBox.select(0),this._tenantSelectorBox.disable()}onTenantSelectorBoxChanged(L){this._accounts.length!==0?this._azureAccountService.getSubscriptions(this._selectedAccount).then(R=>this.setSubscriptionsSelectorBoxOptions(R.subscriptions)).catch(R=>{this.setSubscriptionsSelectorBoxOptions([]),(0,w.onUnexpectedError)(R.errors)}):(this._tenantSelectorBox.setOptions([]),this._tenantSelectorBox.disable(),this.setSubscriptionsSelectorBoxOptions([]))}setSubscriptionsSelectorBoxOptions(L){this._subscriptions=L.sort((M,N)=>M.name.localeCompare(N.name));const R=this._subscriptions.map(M=>M.name);this._subscriptionSelectorBox.setOptions(R),this._subscriptionSelectorBox.select(0),this._subscriptions.length===0?this._subscriptionSelectorBox.disable():this._subscriptionSelectorBox.enable()}onSubscriptionSelectorBoxChanged(L){this._subscriptions.length!==0?(this._selectedSubscription=this._subscriptions[L],this._azureAccountService.getStorageAccounts(this._selectedAccount,[this._selectedSubscription]).then(R=>this.setStorageAccountSelectorBoxOptions(R.resources)).catch(R=>{this.setStorageAccountSelectorBoxOptions([]),(0,w.onUnexpectedError)(R.errors)})):this.setStorageAccountSelectorBoxOptions([])}setStorageAccountSelectorBoxOptions(L){this._storageAccounts=L.sort((M,N)=>M.name.localeCompare(N.name));const R=this._storageAccounts.map(M=>M.name);this._storageAccountSelectorBox.setOptions(R),this._storageAccountSelectorBox.select(0),L.length===0?this._storageAccountSelectorBox.disable():this._storageAccountSelectorBox.enable()}onStorageAccountSelectorBoxChanged(L){this._storageAccounts.length!==0?(this._selectedStorageAccount=this._storageAccounts[L],this._azureAccountService.getBlobContainers(this._selectedAccount,this._selectedSubscription,this._selectedStorageAccount).then(R=>this.setBlobContainersSelectorBoxOptions(R.blobContainers)).catch(R=>{this.setBlobContainersSelectorBoxOptions([]),(0,w.onUnexpectedError)(R.errors)})):this.setBlobContainersSelectorBoxOptions([])}setBlobContainersSelectorBoxOptions(L){this._blobContainers=L.sort((M,N)=>M.name.localeCompare(N.name));const R=this._blobContainers.map(M=>M.name);this._blobContainerSelectorBox.setOptions(R),this._blobContainerSelectorBox.select(0),this._blobContainers.length===0?this._blobContainerSelectorBox.disable():this._blobContainerSelectorBox.enable()}onBlobContainersSelectorBoxChanged(L){this._sasInputBox.value="",this._restoreDialog&&(this._blobContainers.length!==0?(this._selectedBlobContainer=this._blobContainers[L],this._azureAccountService.getBlobs(this._selectedAccount,this._selectedSubscription,this._selectedStorageAccount,this._selectedBlobContainer.name,!0).then(R=>this.setBackupFilesOptions(R.blobs)).catch(R=>{this.setBackupFilesOptions([]),(0,w.onUnexpectedError)(R.errors)})):this.setBackupFilesOptions([])),this.enableCreateCredentialsButton()}setBackupFilesOptions(L){this._backupFiles=L.sort((M,N)=>M.name.localeCompare(N.name));const R=this._backupFiles.map(M=>M.name);this._backupFileSelectorBox.setOptions(R),this._backupFileSelectorBox.select(0),this._backupFiles.length===0?this._backupFileSelectorBox.disable():this._backupFileSelectorBox.enable()}open(L){this._ownerUri=L,this.enableOkButton(),this.enableCreateCredentialsButton(),this.show()}onAccept(){let L=this._sasInputBox.value;this._okButton.enabled===!0&&L!==""&&this.ok()}enableOkButton(){h.isFalsyOrWhitespace(this._blobContainerSelectorBox.value)||h.isFalsyOrWhitespace(this._sasInputBox.value)||this._restoreDialog&&h.isFalsyOrWhitespace(this._blobContainerSelectorBox.value)||!this._restoreDialog&&h.isFalsyOrWhitespace(this._backupFileInputBox.value)?this._okButton.enabled=!1:this._okButton.enabled=!0}enableCreateCredentialsButton(){h.isFalsyOrWhitespace(this._blobContainerSelectorBox.label)?this._sasButton.enabled=!1:this._sasButton.enabled=!0}ok(){let L="";this._restoreDialog?L=`https://${this._storageAccountSelectorBox.value}.blob${this._selectedAccount.properties.providerSettings.settings.azureStorageResource.endpointSuffix}${this._blobContainerSelectorBox.value}/${this._backupFileSelectorBox.value}`:L=`https://${this._storageAccountSelectorBox.value}.blob${this._selectedAccount.properties.providerSettings.settings.azureStorageResource.endpointSuffix}${this._blobContainerSelectorBox.value}/${this._backupFileInputBox.value}`,this.onOk.resolve(L),this.close("ok")}close(L="close"){this.hide(L)}async generateSharedAccessSignature(){this.spinner=!0;const L=`https://${this._storageAccountSelectorBox.value}.blob${this._selectedAccount.properties.providerSettings.settings.azureStorageResource.endpointSuffix}/${this._blobContainerSelectorBox.value}`,M=(await this._azureAccountService.getStorageAccountAccessKey(this._selectedAccount,this._selectedSubscription,this._selectedStorageAccount)).keyName1,P=(await this._blobService.createSas(this._ownerUri,L,M,this._selectedStorageAccount.name,_())).sharedAccessSignature;this._sasInputBox.value=P,this.spinner=!1}registerListeners(){this._register(this._accountSelectorBox.onDidSelect(L=>this.onAccountSelectorBoxChanged(L.index))),this._register(this._tenantSelectorBox.onDidSelect(L=>this.onTenantSelectorBoxChanged(L.index))),this._register(this._subscriptionSelectorBox.onDidSelect(L=>this.onSubscriptionSelectorBoxChanged(L.index))),this._register(this._storageAccountSelectorBox.onDidSelect(L=>this.onStorageAccountSelectorBoxChanged(L.index))),this._register(this._blobContainerSelectorBox.onDidSelect(L=>{this.onBlobContainersSelectorBoxChanged(L.index),this.enableOkButton()})),this._backupFileInputBox&&this._register(this._backupFileInputBox.onDidChange(L=>this.enableOkButton())),this._backupFileSelectorBox&&this._register(this._backupFileSelectorBox.onDidSelect(L=>this.enableOkButton()))}registerThemeStylers(){this._register(this._sasButton),this._register(this._okButton),this._register(this._cancelButton)}};e.BackupRestoreUrlBrowserDialog=A,e.BackupRestoreUrlBrowserDialog=A=fe([O(3,d.ILayoutService),O(4,r.IThemeService),O(5,m.IContextViewService),O(6,o.IAdsTelemetryService),O(7,f.IContextKeyService),O(8,a.IClipboardService),O(9,i.ILogService),O(10,s.ITextResourcePropertiesService),O(11,p.IAccountManagementService),O(12,c.IAzureAccountService),O(13,l.IAzureBlobService),O(14,g.IInstantiationService)],A)}),define(Q[3481],Y([1,0,3480,2178,5]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackupRestoreUrlBrowserDialogService=void 0;let D=class{constructor(f){this._instantiationService=f}showDialog(f,v,m,S){const h=this._instantiationService.createInstance(t.BackupRestoreUrlBrowserDialog,(0,y.localize)(0,null),m,S);return h.render(),h.setWide(v),h.open(f),h.onOk}};e.BackupRestoreUrlBrowserDialogService=D,e.BackupRestoreUrlBrowserDialogService=D=fe([O(0,b.IInstantiationService)],D)}),define(Q[3482],Y([1,0,911,5,2179]),function(q,e,t,y,b){"use strict";var D;Object.defineProperty(e,"__esModule",{value:!0}),e.AdvancedPropertiesController=void 0;let T=D=class{constructor(v,m){this._onCloseAdvancedProperties=v,this._instantiationService=m}handleOnOk(){this._options=this._advancedDialog.optionValues}showDialog(v,m){this._options=m;let S=v.map(h=>D.connectionOptionToServiceOption(h));this.advancedDialog.open(S,this._options)}get advancedDialog(){return this._advancedDialog||(this._advancedDialog=this._instantiationService.createInstance(t.OptionsDialog,(0,b.localize)(0,null),"ConnectionAdvancedProperties",{hasBackButton:!0,cancelLabel:(0,b.localize)(1,null)}),this._advancedDialog.onCloseEvent(()=>this._onCloseAdvancedProperties()),this._advancedDialog.onOk(()=>this.handleOnOk()),this._advancedDialog.render()),this._advancedDialog}set advancedDialog(v){this._advancedDialog=v}static connectionOptionToServiceOption(v){return{name:v.name,displayName:v.displayName,description:v.description,groupName:v.groupName,valueType:v.valueType,defaultValue:v.defaultValue,objectType:void 0,categoryValues:v.categoryValues,isRequired:v.isRequired,isArray:void 0,onSelectionChange:v.onSelectionChange}}};e.AdvancedPropertiesController=T,e.AdvancedPropertiesController=T=D=fe([O(1,y.IInstantiationService)],T)}),define(Q[3483],Y([1,0,174,19,8,68,2189,166,29,7,11,76,58,63,188,147,111,78,54,1660]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PasswordChangeDialog=void 0;const p="500px",c=(0,T.localize)(0,null),l=(0,T.localize)(1,null),n=(0,T.localize)(2,null),g=(0,T.localize)(3,null),w=(0,T.localize)(4,null),E=(0,T.localize)(5,null),C=(0,T.localize)(6,null),I=(0,T.localize)(7,null);let _=class extends t.Modal{constructor(k,L,R,M,N,P,x,F,V,W){super("","",P,N,L,k,F,W,x,{hasSpinner:!0,spinnerTitle:w,dialogStyle:"normal",width:p,dialogPosition:"left",height:350}),this.connectionManagementService=R,this.errorMessageService=M,this.contextViewService=V}open(k){if(this._profile){let R=(0,T.localize)(8,null);return this.errorMessageService.showDialog(r.default.Error,E,R),Promise.reject(new Error(R))}return this._profile=k,this._uri=this.connectionManagementService.getConnectionUri(k),this.render(),this.show(),this._okButton.focus(),new Promise(R=>{this._promiseResolver=R})}dispose(){}render(){super.render(),this.title=(0,T.localize)(9,null),this._register((0,s.attachModalDialogStyler)(this,this._themeService)),this._okButton=this.addFooterButton(c,async()=>{await this.handleOkButtonClick()}),this._cancelButton=this.addFooterButton(l,()=>{this.handleCancelButtonClick()},"right",!0)}renderBody(k){const L=k.appendChild(m.$(".change-password-dialog"));L.appendChild(m.$("span.component-label-bold")).innerText=(0,T.localize)(10,null,this._profile?.userName,this._profile?.serverName),L.appendChild(m.$("span.component-label")).innerText=(0,T.localize)(11,null);const R=L.appendChild(m.$(".properties-content.components-grid"));R.appendChild(m.$("")).appendChild(m.$("span.component-label")).innerText=n;const M=R.appendChild(m.$(""));this._passwordValueText=new f.InputBox(M,this.contextViewService,{type:"password",inputBoxStyles:d.defaultInputBoxStyles}),R.appendChild(m.$("")).appendChild(m.$("span.component-label")).innerText=g;const N=R.appendChild(m.$(""));this._confirmValueText=new f.InputBox(N,this.contextViewService,{type:"password",inputBoxStyles:d.defaultInputBoxStyles})}layout(k){}onClose(){this.handleCancelButtonClick()}async onAccept(){await this.handleOkButtonClick()}async handleOkButtonClick(){this._okButton.enabled=!1,this._cancelButton.enabled=!1,this.spinner=!0;try{let k=await this.changePasswordFunction(this._profile,this._uri,this._passwordValueText.value,this._confirmValueText.value);this.hide("ok"),this._promiseResolver(k)}catch{this._okButton.enabled=!0,this._cancelButton.enabled=!0,this.spinner=!1}}handleCancelButtonClick(){this.hide("cancel"),this._promiseResolver(void 0)}async changePasswordFunction(k,L,R,M){if(R!==M)return this.errorMessageService.showDialog(r.default.Error,E,C+` `+I),Promise.reject(new Error(C));let N=await this.connectionManagementService.changePassword(k,L,M);return N.result?M:(this.errorMessageService.showDialog(r.default.Error,E,N.errorMessage),Promise.reject(new Error(N.errorMessage)))}};e.PasswordChangeDialog=_,e.PasswordChangeDialog=_=fe([O(0,y.IThemeService),O(1,D.IClipboardService),O(2,a.IConnectionManagementService),O(3,i.IErrorMessageService),O(4,o.ILayoutService),O(5,h.IAdsTelemetryService),O(6,b.IContextKeyService),O(7,S.ILogService),O(8,v.IContextViewService),O(9,u.ITextResourcePropertiesService)],_)}),define(Q[3484],Y([1,0,7,179,6,2190,19,278,8,67,174,1536,263,11,76,147,111,78,1661]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NewDashboardTabDialog=void 0;class d{static{this.HEIGHT=101}getHeight(n){return d.HEIGHT}getTemplateId(n){return"extensionListRenderer"}}class p{static{this.TEMPLATE_ID="extensionListRenderer"}static{this.OPENED_TAB_CLASS="success"}static{this.ICON_CLASS="extension-status-icon codicon"}get templateId(){return p.TEMPLATE_ID}renderTemplate(n){const g=Object.create(null);g.root=t.append(n,t.$("div.list-row.extensionTab-list")),g.icon=t.append(g.root,t.$("div.codicon"));let w=t.append(g.root,t.$("div.extension-details"));return g.title=t.append(w,t.$("div.title")),g.description=t.append(w,t.$("div.description")),g.publisher=t.append(w,t.$("div.publisher")),g}renderElement(n,g,w){w.icon.className=p.ICON_CLASS,n.isOpened&&w.icon.classList.add(p.OPENED_TAB_CLASS),w.title.innerText=n.tabConfig.title,w.description.innerText=n.tabConfig.description??"",w.publisher.innerText=n.tabConfig.publisher}disposeTemplate(n){}disposeElement(n,g,w){}}let c=class extends S.Modal{get onAddTabs(){return this._onAddTabs.event}get onCancel(){return this._onCancel.event}constructor(n,g,w,E,C,I,_){super((0,D.localize)(0,null),"AddNewDashboardTab",w,n,C,g,I,_,E,{hasSpinner:!0}),this._onAddTabs=new b.Emitter,this._onCancel=new b.Emitter,this._viewModel=new h.NewDashboardTabViewModel,this._register(this._viewModel.updateTabListEvent(A=>this.onUpdateTabList(A)))}layout(n){this._extensionList.layout(n)}render(){super.render(),(0,s.attachModalDialogStyler)(this,this._themeService),this._addNewTabButton=this.addFooterButton((0,D.localize)(1,null),()=>this.addNewTabs()),this._cancelButton=this.addFooterButton((0,D.localize)(2,null),()=>this.cancel(),"right",!0)}renderBody(n){this._extensionViewContainer=t.$("div.extension-view"),t.append(n,this._extensionViewContainer),this.createExtensionList(this._extensionViewContainer),this._noExtensionViewContainer=t.$(".no-extension-view");let g=t.append(this._noExtensionViewContainer,t.$(".no-extensionTab-label")),w=(0,D.localize)(3,null);g.textContent=w,t.append(n,this._noExtensionViewContainer)}createExtensionList(n){let g=t.$(".extensionTab-view"),w=new d,E=new p;this._extensionList=new y.List("NewDashboardTabExtentionList",g,w,[E]),this._extensionList.onMouseDblClick(C=>this.onAccept()),this._extensionList.onKeyDown(C=>{let I=new m.StandardKeyboardEvent(C);I.equals(3)?this.onAccept():I.equals(9)&&this.onClose()}),t.append(n,g),this._register((0,f.attachListStyler)(this._extensionList,this._themeService))}onClose(){this.cancel()}onAccept(){this.addNewTabs()}close(){this.hide("close")}addNewTabs(){if(this._addNewTabButton.enabled){let n=this._extensionList.getSelectedElements();this._onAddTabs.fire(n)}}cancel(){this.hide("cancel")}open(n,g){this.show(),this._viewModel.updateDashboardTabs(n,g)}onUpdateTabList(n){this._extensionList.splice(0,this._extensionList.length,n),this.layout(),this._extensionList.length>0?(this._extensionViewContainer.hidden=!1,this._noExtensionViewContainer.hidden=!0,this._extensionList.setSelection([0]),this._extensionList.domFocus(),this._addNewTabButton.enabled=!0):(this._extensionViewContainer.hidden=!0,this._noExtensionViewContainer.hidden=!1,this._addNewTabButton.enabled=!1,this._cancelButton.focus())}dispose(){super.dispose()}};e.NewDashboardTabDialog=c,e.NewDashboardTabDialog=c=fe([O(0,o.ILayoutService),O(1,T.IThemeService),O(2,i.IAdsTelemetryService),O(3,v.IContextKeyService),O(4,a.IClipboardService),O(5,r.ILogService),O(6,u.ITextResourcePropertiesService)],c)}),define(Q[3485],Y([1,0,3484,326,5]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NewDashboardTabDialogService=void 0;let D=class{constructor(f,v){this._angularEventService=f,this._instantiationService=v}showDialog(f,v,m){this._uri=m;let S=this;this._addNewTabDialog||(this._addNewTabDialog=this._instantiationService.createInstance(t.NewDashboardTabDialog),this._addNewTabDialog.onCancel(()=>{S.handleOnCancel()}),this._addNewTabDialog.onAddTabs(h=>{S.handleOnAddTabs(h)}),this._addNewTabDialog.render()),this._addNewTabDialog.open(f,v)}handleOnAddTabs(f){let v=f.map(m=>m.tabConfig);this._angularEventService.sendAngularEvent(this._uri,y.AngularEventType.NEW_TABS,{dashboardTabs:v}),this._addNewTabDialog.close()}handleOnCancel(){}};e.NewDashboardTabDialogService=D,e.NewDashboardTabDialogService=D=fe([O(0,y.IAngularEventingService),O(1,b.IInstantiationService)],D)}),define(Q[3486],Y([1,0,174,263,4,2236,19,447,445,7,278,6,8,29,11,76,147,111,78,54,1667]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProfilerColumnEditorDialog=void 0;class c{constructor(_,A,k=new Array){this._name=_,this._parent=A,this._columns=k}hasChildren(){return this._columns&&this._columns.length>0}getChildren(){return this._columns}get id(){return this._name}addColumn(..._){this._columns=this._columns.concat(_)}get parent(){return this._parent}get selected(){return this._columns.every(_=>_.selected)}set selected(_){this._columns.forEach(A=>A.selected=_)}get indeterminate(){return this._columns.some(_=>_.selected)&&!this.selected}}class l{constructor(_,A){this._name=_,this._parent=A,this.indeterminate=!1}get id(){return this._name}get parent(){return this._parent}}class n{constructor(_,A){this._name=_,this._parent=A}get id(){return this._name}get parent(){return this._parent}get selected(){return this._parent.getUnsortedChildren().every(_=>_.getChildren().filter(A=>A.id===this.id).every(A=>A.selected))}set selected(_){this._parent.getUnsortedChildren().forEach(A=>A.getChildren().filter(k=>k.id===this.id).forEach(k=>k.selected=_))}get indeterminate(){return this._parent.getUnsortedChildren().some(_=>_.getChildren().filter(A=>A.id===this.id).some(A=>A.selected))&&!this.selected}}class g{constructor(_,A,k=new Array){this._name=_,this._sort=A,this._events=k,this._sortedColumnItems=[],this._events.forEach(L=>{L.getChildren().forEach(R=>{this._sortedColumnItems.some(M=>M.id===R.id)||this._sortedColumnItems.push(new n(R.id,this))})})}get id(){return this._name}hasChildren(){return this._sort==="event"?!!this._events&&this._events.length>0:!!this._events&&this._events.some(_=>_.hasChildren())}getUnsortedChildren(){return this._events}getChildren(){return this._sort==="event"?this._events:this._sortedColumnItems}addEvents(..._){this._events=this._events.concat(_),_.forEach(A=>{A.getChildren().forEach(k=>{this._sortedColumnItems.some(L=>L.id===k.id)||this._sortedColumnItems.push(new n(k.id,this))})})}changeSort(_){this._sort=_}}class w{constructor(){this._onSelectedChange=new h.Emitter,this.onSelectedChange=this._onSelectedChange.event}getHeight(_,A){return 22}getTemplateId(_,A){return A instanceof g?"session":A instanceof c?"event":A instanceof l?"column":"columnSorted"}renderTemplate(_,A,k){const L=Object.create(null),R=document.createElement("div");return R.className="tree-row",m.append(k,R),L.toDispose=[],L.checkbox=document.createElement("input"),m.append(R,L.checkbox),L.checkbox.type="checkbox",L.toDispose.push(m.addStandardDisposableListener(L.checkbox,"change",()=>{L.context.selected=!L.context.selected,this._onSelectedChange.fire(L.context)})),L.label=document.createElement("div"),m.append(R,L.label),L}renderElement(_,A,k,L){L.context=A,L.label.innerText=A.id,L.checkbox.checked=A.selected,L.checkbox.indeterminate=A.indeterminate}disposeTemplate(_,A,k){(0,b.dispose)(k.toDispose)}}class E{getId(_,A){return A instanceof c?A.parent.id+A.id:A instanceof l?A.parent.parent.id+A.parent.id+A.id:A.id}hasChildren(_,A){return A instanceof g||A instanceof c?A.hasChildren():!1}getChildren(_,A){return A instanceof c||A instanceof g?Promise.resolve(A.getChildren()):Promise.resolve([])}getParent(_,A){return A instanceof l||A instanceof c||A instanceof n?Promise.resolve(A.parent):Promise.resolve(null)}shouldAutoexpand(_,A){return!1}}let C=class extends t.Modal{constructor(_,A,k,L,R,M,N,P){super(D.localize(2,null),"Profiler",k,_,M,A,N,P,L),this._contextViewService=R,this._options=[{text:D.localize(0,null)},{text:D.localize(1,null)}]}render(){super.render(),this._register((0,o.attachModalDialogStyler)(this,this._themeService)),this.addFooterButton(D.localize(3,null),()=>this.onAccept(void 0)),this.addFooterButton(D.localize(4,null),()=>this.onClose(void 0))}renderBody(_){const A=m.append(_,m.$(""));this._selectBox=new f.SelectBox(this._options,0,this._contextViewService,p.defaultSelectBoxStyles),this._selectBox.render(A),this._register(this._selectBox.onDidSelect(L=>{this._element.changeSort(L.index===0?"event":"column"),this._tree.refresh(this._element,!0)})),this._treeContainer=m.append(A,m.$(".profiler-column-tree"));const k=new w;this._tree=new v.Tree(this._treeContainer,{dataSource:new E,renderer:k}),this._register(k.onSelectedChange(L=>this._tree.refresh(L,!0))),this._register((0,S.attachListStyler)(this._tree,this._themeService))}open(_){super.show(),this._updateList()}onAccept(_){this._updateInput(),super.onAccept(_)}_updateInput(){}_updateList(){}layout(_){this._tree&&this._tree.layout(m.getContentHeight(this._treeContainer))}};e.ProfilerColumnEditorDialog=C,e.ProfilerColumnEditorDialog=C=fe([O(0,u.ILayoutService),O(1,T.IThemeService),O(2,s.IAdsTelemetryService),O(3,a.IContextKeyService),O(4,r.IContextViewService),O(5,y.IClipboardService),O(6,i.ILogService),O(7,d.ITextResourcePropertiesService)],C)}),define(Q[3487],Y([1,0,174,19,8,68,2237,166,199,29,59,7,346,11,76,15,147,111,78,87,54,101,1668]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProfilerFilterDialog=void 0;const n=(0,T.localize)(0,null),g=(0,T.localize)(1,null),w=(0,T.localize)(2,null),E=(0,T.localize)(3,null),C=(0,T.localize)(4,null),I=(0,T.localize)(5,null),_=(0,T.localize)(6,null),A=(0,T.localize)(7,null),k=(0,T.localize)(8,null),L=(0,T.localize)(9,null),R=(0,T.localize)(10,null),M="icon filterLabel",N=(0,T.localize)(11,null),P=(0,T.localize)(12,null),x=(0,T.localize)(13,null),F="=",V="<>",W="<",z="<=",B=">",K=">=",H=(0,T.localize)(14,null),U=(0,T.localize)(15,null),G=(0,T.localize)(16,null),$=(0,T.localize)(17,null),ie=(0,T.localize)(18,null),J=(0,T.localize)(19,null),j=[F,V,W,z,B,K,B,K,H,U,G,$,ie,J];let ee=class extends t.Modal{constructor(te,Z,se,re,oe,le,ne,ce,ae){super("","ProfilerFilter",re,se,Z,te,le,ae,oe,{dialogStyle:"normal",hasTitleIcon:!0}),this.contextViewService=ne,this.profilerService=ce,this._clauseRows=[]}open(te){this._input=te,this.render(),this.show(),this._okButton.focus()}dispose(){}render(){super.render(),this.title=C,this.titleIconClassName=M,this._register((0,o.attachModalDialogStyler)(this,this._themeService)),this._saveFilterButton=this.addFooterButton(_,()=>this.saveFilter(),"left",!0),this._loadFilterButton=this.addFooterButton(A,()=>this.loadSavedFilter(),"left",!0),this._applyButton=this.addFooterButton(g,()=>this.filterSession(),"right",!0),this._okButton=this.addFooterButton(w,()=>this.handleOkButtonClick()),this._cancelButton=this.addFooterButton(E,()=>this.hide("cancel"),"right",!0),this._register(this._okButton),this._register(this._cancelButton),this._register(this._applyButton),this._register(this._saveFilterButton),this._register(this._loadFilterButton)}renderBody(te){const Z=h.append(te,h.$(".profiler-filter-dialog")),se=h.append(Z,h.$(".clause-table-container")),re=h.append(Z,h.$(".actions-container"));this._clauseBuilder=h.append(se,h.$("table.profiler-filter-clause-table"));const oe=h.append(this._clauseBuilder,h.$("tr"));h.append(oe,h.$("th")).innerText=N,h.append(oe,h.$("th")).innerText=P,h.append(oe,h.$("th")).innerText=x,h.append(oe,h.$("th")).innerText="",this._input.filter.clauses.forEach(le=>{this.addClauseRow(!0,le.field,this.convertToOperatorString(le.operator),le.value)}),this.createClauseTableActionLink(k,re,()=>{this.addClauseRow(!1),this._clauseRows[this._clauseRows.length-1]?.field?.focus(),p.status(L)}),this.createClauseTableActionLink(n,re,()=>{this.handleClearButtonClick()})}layout(te){}onClose(){this.hide("close")}onAccept(){this.handleOkButtonClick()}handleOkButtonClick(){this.filterSession(),this.hide("ok")}handleClearButtonClick(){this._clauseRows.forEach(te=>{te.row.remove()}),this._clauseRows=[],p.status(R)}createClauseTableActionLink(te,Z,se){const re=h.append(Z,h.$(".profiler-filter-clause-table-action",{tabIndex:"0",role:"button","aria-label":te}));re.innerText=te,h.addDisposableListener(re,h.EventType.CLICK,se),h.addStandardDisposableListener(re,h.EventType.KEY_DOWN,oe=>{(oe.equals(10)||oe.equals(3))&&(se(),oe.preventDefault(),oe.stopPropagation())})}createSelectBox(te,Z,se,re){const oe=this._register(new v.SelectBox(Z,se,l.defaultSelectBoxStyles,this.contextViewService,void 0,{ariaLabel:re}));return oe.render(te),oe}filterSession(){this._input.filterSession(this.getFilter())}saveFilter(){this.profilerService.saveFilter(this.getFilter()).catch(te=>(0,s.onUnexpectedError)(te))}loadSavedFilter(){const te=this.profilerService.getFilters();if(te&&te.length>0){const Z=te[0];this._clauseRows.forEach(se=>{se.row.remove()}),this._clauseRows=[],Z.clauses.forEach(se=>{this.addClauseRow(!0,se.field,this.convertToOperatorString(se.operator),se.value)})}}getFilter(){const te=[];return this._clauseRows.forEach(Z=>{te.push({field:Z.field.value,operator:this.convertToOperatorEnum(Z.operator.value),value:Z.value.value})}),{name:"default",clauses:te}}addClauseRow(te,Z,se,re){const oe=this._input.columns.map(he=>he.name);if(Z&&!oe.find(he=>he===Z))return;const le=h.append(this._clauseBuilder,h.$("tr")),ne=(0,S.generateUuid)(),ce=this.createSelectBox(h.append(le,h.$("td")),oe,oe[0],N),ae=this.createSelectBox(h.append(le,h.$("td")),j,j[0],P),ue=new f.InputBox(h.append(le,h.$("td")),this.contextViewService,{ariaLabel:x,inputBoxStyles:c.defaultInputBoxStyles}),de=h.append(le,h.$("td")),ge=h.append(de,h.$(".profiler-filter-remove-condition.codicon.remove",{tabIndex:"0","aria-label":I,title:I,role:"button"}));h.addStandardDisposableListener(ge,h.EventType.KEY_DOWN,he=>{(he.equals(10)||he.equals(3))&&(this.removeRow(ne),he.stopPropagation())}),h.addDisposableListener(ge,h.EventType.CLICK,he=>{this.removeRow(ne)}),te&&(ce.selectWithOptionName(Z),ae.selectWithOptionName(se),ue.value=re??""),this._clauseRows.push({id:ne,row:le,field:ce,operator:ae,value:ue})}removeRow(te){const Z=this._clauseRows.findIndex(se=>se.id===te);Z!==-1&&(this._clauseRows[Z].row.remove(),this._clauseRows.splice(Z,1))}convertToOperatorEnum(te){switch(te){case F:return a.ProfilerFilterClauseOperator.Equals;case V:return a.ProfilerFilterClauseOperator.NotEquals;case W:return a.ProfilerFilterClauseOperator.LessThan;case z:return a.ProfilerFilterClauseOperator.LessThanOrEquals;case B:return a.ProfilerFilterClauseOperator.GreaterThan;case K:return a.ProfilerFilterClauseOperator.GreaterThanOrEquals;case H:return a.ProfilerFilterClauseOperator.IsNull;case U:return a.ProfilerFilterClauseOperator.IsNotNull;case G:return a.ProfilerFilterClauseOperator.Contains;case $:return a.ProfilerFilterClauseOperator.NotContains;case ie:return a.ProfilerFilterClauseOperator.StartsWith;case J:return a.ProfilerFilterClauseOperator.NotStartsWith;default:throw new Error(`Not a valid operator: ${te}`)}}convertToOperatorString(te){switch(te){case a.ProfilerFilterClauseOperator.Equals:return F;case a.ProfilerFilterClauseOperator.NotEquals:return V;case a.ProfilerFilterClauseOperator.LessThan:return W;case a.ProfilerFilterClauseOperator.LessThanOrEquals:return z;case a.ProfilerFilterClauseOperator.GreaterThan:return B;case a.ProfilerFilterClauseOperator.GreaterThanOrEquals:return K;case a.ProfilerFilterClauseOperator.IsNull:return H;case a.ProfilerFilterClauseOperator.IsNotNull:return U;case a.ProfilerFilterClauseOperator.Contains:return G;case a.ProfilerFilterClauseOperator.NotContains:return $;case a.ProfilerFilterClauseOperator.StartsWith:return ie;case a.ProfilerFilterClauseOperator.NotStartsWith:return J;default:throw new Error(`Not a valid operator: ${te}`)}}};e.ProfilerFilterDialog=ee,e.ProfilerFilterDialog=ee=fe([O(0,y.IThemeService),O(1,D.IClipboardService),O(2,u.ILayoutService),O(3,i.IAdsTelemetryService),O(4,b.IContextKeyService),O(5,r.ILogService),O(6,m.IContextViewService),O(7,a.IProfilerService),O(8,d.ITextResourcePropertiesService)],ee)}),define(Q[3488],Y([1,0,7,6,29,2244,36,5,8,68,19,10,174,1498,166,1139,11,41,76,147,111,78,54,1669]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FirewallRuleDialog=void 0;const g="https://aka.ms/sqlopsfirewallhelp",w={FROM:(0,D.localize)(0,null),TO:(0,D.localize)(1,null),OK:(0,D.localize)(2,null),Cancel:(0,D.localize)(3,null),RuleName:(0,D.localize)(4,null),CreateNewFirewallRule:(0,D.localize)(5,null),FirewallRuleLabel:(0,D.localize)(6,null),FirewallRuleDescription:(0,D.localize)(7,null),FirewallRuleHelpLink:(0,D.localize)(8,null),AddClientIPLabel:(0,D.localize)(9,null),AddIPRangeLabel:(0,D.localize)(10,null)};let E=class extends a.Modal{get onAddAccountErrorEvent(){return this._onAddAccountErrorEmitter.event}get onCancel(){return this._onCancel.event}get onCreateFirewallRule(){return this._onCreateFirewallRule.event}constructor(I,_,A,k,L,R,M,N,P,x,F){super(w.CreateNewFirewallRule,"FirewallRule",R,_,N,A,P,x,M,{dialogStyle:"flyout",hasBackButton:!0,hasSpinner:!0}),this._accountPickerService=I,this._instantiationService=k,this._contextViewService=L,this.openerService=F,this._onAddAccountErrorEmitter=new y.Emitter,this._onCancel=new y.Emitter,this._onCreateFirewallRule=new y.Emitter,this.viewModel=this._instantiationService.createInstance(r.FirewallRuleViewModel)}render(){super.render(),(0,p.attachModalDialogStyler)(this,this._themeService),this.backButton.onDidClick(()=>this.cancel()),this._register(this.backButton),this._createButton=this.addFooterButton(w.OK,()=>this.createFirewallRule()),this._closeButton=this.addFooterButton(w.Cancel,()=>this.cancel(),"right",!0),this.registerListeners()}renderBody(I){const _=t.append(I,t.$(".firewall-rule-dialog"));this.createFirewallRuleHeader(_),this.createAccountPicker(_);const A=t.append(_,t.$(".firewall-rule-section.new-section"));this.createLabelElement(A,w.FirewallRuleLabel,!0);const k=t.append(A,t.$(".radio-section")),L=t.append(k,t.$("form.firewall-rule")),R=t.append(L,t.$("div.firewall-rulename dialog-input")),M=t.append(R,t.$(".dialog-input-section"));t.append(M,t.$(".dialog-label")).innerText=w.RuleName,this._ruleNameInpuBox=new i.InputBox(t.append(M,t.$(".dialog-input")),this._contextViewService,{ariaLabel:w.RuleName,inputBoxStyles:n.defaultInputBoxStyles});const N=t.append(L,t.$("div.firewall-ip-address dialog-input")),P=t.append(L,t.$("div.firewall-subnet-ip-range dialog-input")),x=t.append(N,t.$("div.option-container"));this._IPAddressInput=t.append(x,t.$("input.option-input")),this._IPAddressInput.setAttribute("type","radio"),this._IPAddressInput.setAttribute("name","firewallRuleChoice"),this._IPAddressInput.setAttribute("value","ipAddress");const F=t.append(x,t.$("div.option-description"));F.innerText=w.AddClientIPLabel,this._IPAddressElement=t.append(x,t.$("div.option-ip-address"));const V=t.append(P,t.$("div.option-container"));this._subnetIPRangeInput=t.append(V,t.$("input.option-input")),this._subnetIPRangeInput.setAttribute("type","radio"),this._subnetIPRangeInput.setAttribute("name","firewallRuleChoice"),this._subnetIPRangeInput.setAttribute("value","ipRange");const W=t.append(V,t.$("div.option-description"));W.innerText=w.AddIPRangeLabel;const z=t.append(P,t.$(".subnet-ip-range-input")),B=t.append(z,t.$(".dialog-input-section"));t.append(B,t.$(".dialog-label")).innerText=w.FROM,this._fromRangeinputBox=new i.InputBox(t.append(B,t.$(".dialog-input")),this._contextViewService,{ariaLabel:w.FROM,inputBoxStyles:n.defaultInputBoxStyles}),t.append(B,t.$(".dialog-label")).innerText=w.TO,this._toRangeinputBox=new i.InputBox(t.append(B,t.$(".dialog-input")),this._contextViewService,{ariaLabel:w.TO,inputBoxStyles:n.defaultInputBoxStyles}),this._register(this._themeService.onDidColorThemeChange(K=>this.updateTheme(K))),this.updateTheme(this._themeService.getColorTheme()),this._register(t.addDisposableListener(this._IPAddressInput,t.EventType.CLICK,()=>{this.onFirewallRuleOptionSelected(!0)})),this._register(t.addDisposableListener(this._subnetIPRangeInput,t.EventType.CLICK,()=>{this.onFirewallRuleOptionSelected(!1)}))}createFirewallRuleHeader(I){const _=t.append(I,t.$(".firewall-rule-description-section.new-section"));t.append(_,t.$("div.firewall-rule-icon"));const A=t.append(_,t.$("div.firewall-rule-description"));this.createLabelElement(A,w.FirewallRuleDescription,!1),this._helpLink=t.append(A,t.$("a.help-link")),this._helpLink.setAttribute("href",g),this._helpLink.innerHTML+=w.FirewallRuleHelpLink,this._helpLink.onclick=()=>{this.openerService.open(h.URI.parse(g))}}createAccountPicker(I){this._accountPickerService.addAccountCompleteEvent(()=>this.spinner=!1),this._accountPickerService.addAccountErrorEvent(A=>{this.spinner=!1,this._onAddAccountErrorEmitter.fire(A)}),this._accountPickerService.addAccountStartEvent(()=>this.spinner=!0),this._accountPickerService.onAccountSelectionChangeEvent(A=>this.onAccountSelectionChange(A)),this._accountPickerService.onTenantSelectionChangeEvent(A=>!!A&&this.onTenantSelectionChange(A));const _=t.append(I,t.$(".azure-account-section.new-section"));this._accountPickerService.renderAccountPicker(_)}onFirewallRuleOptionSelected(I){this.viewModel.isIPAddressSelected=I,I?(this._fromRangeinputBox.disable(),this._fromRangeinputBox.value="",this._toRangeinputBox.disable(),this._toRangeinputBox.value=""):(this._fromRangeinputBox.enable(),this._fromRangeinputBox.value=this.viewModel.defaultFromSubnetIPRange??"",this._toRangeinputBox.enable(),this._toRangeinputBox.value=this.viewModel.defaultToSubnetIPRange??"")}layout(I){}createLabelElement(I,_,A){let k="dialog-label";A&&(k+=".header");const L=t.append(I,t.$(`.${k}`));return L.innerText=_,L}updateTheme(I){const _=I.getColor(T.buttonBackground),A=_?_.toString():"";this._helpLink&&(this._helpLink.style.color=A)}registerListeners(){this._register(this._createButton),this._register(this._closeButton),this._register(this._ruleNameInpuBox.onDidChange(I=>{this.firewallRuleNameChanged(I)})),this._register(this._fromRangeinputBox.onDidChange(I=>{this.fromRangeInputChanged(I)})),this._register(this._toRangeinputBox.onDidChange(I=>{this.toRangeInputChanged(I)}))}firewallRuleNameChanged(I){this.viewModel.firewallRuleName=I}fromRangeInputChanged(I){this.viewModel.fromSubnetIPRange=I}toRangeInputChanged(I){this.viewModel.toSubnetIPRange=I}onClose(){this.cancel()}onAccept(){this.createFirewallRule()}cancel(){this._onCancel.fire(),this.hide("cancel")}close(){this.hide("close")}createFirewallRule(){this._createButton.enabled&&(this._createButton.enabled=!1,this.spinner=!0,this._onCreateFirewallRule.fire())}setInitialAccountTenant(I,_){this._accountPickerService.setInitialAccountTenant(I,_)}onAccountSelectionChange(I){this.viewModel.selectedAccount=I,I&&!I.isStale?this._createButton.enabled=!0:this._createButton.enabled=!1}onTenantSelectionChange(I){this.viewModel.selectedTenantId=I}onServiceComplete(){this._createButton.enabled=!0,this.spinner=!1}open(){this._IPAddressInput.click(),this.onAccountSelectionChange(this._accountPickerService.selectedAccount),this._ruleNameInpuBox.value=this.viewModel.defaultFirewallRuleName??"",this._fromRangeinputBox.setPlaceHolder(this.viewModel.defaultFromSubnetIPRange??""),this._toRangeinputBox.setPlaceHolder(this.viewModel.defaultToSubnetIPRange??""),this._IPAddressElement.innerText=`(${this.viewModel.defaultIPAddress??""})`,this.show()}};e.FirewallRuleDialog=E,e.FirewallRuleDialog=E=fe([O(0,s.IAccountPickerService),O(1,c.ILayoutService),O(2,S.IThemeService),O(3,f.IInstantiationService),O(4,b.IContextViewService),O(5,d.IAdsTelemetryService),O(6,v.IContextKeyService),O(7,m.IClipboardService),O(8,o.ILogService),O(9,l.ITextResourcePropertiesService),O(10,u.IOpenerService)],E)}),define(Q[3489],Y([1,0,2303,7,19,6,29,2249,8,174,166,263,11,76,147,17,111,78,559,54,1671]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServerGroupDialog=void 0;let c=class extends m.Modal{constructor(n,g,w,E,C,I,_,A){super((0,f.localize)(0,null),"ServerGroups",E,n,I,g,_,A,C),this._contextViewService=w,this._colorColorBoxesMap=[],this._skipGroupNameValidation=!1,this._onAddServerGroup=new D.Emitter,this.onAddServerGroup=this._onAddServerGroup.event,this._onCancel=new D.Emitter,this.onCancel=this._onCancel.event,this._onCloseEvent=new D.Emitter,this.onCloseEvent=this._onCloseEvent.event,this.isRendered=!1}render(){super.render(),(0,i.attachModalDialogStyler)(this,this._themeService);const n=(0,f.localize)(1,null),g=(0,f.localize)(2,null);this._addServerButton=this.addFooterButton(n,()=>this.addGroup()),this._closeButton=this.addFooterButton(g,()=>this.cancel(),"right",!0),this.isRendered=!0,this.registerListeners()}layout(n){}renderBody(n){const g=y.append(n,y.$(".server-group-dialog")),w=(0,f.localize)(3,null);y.append(g,y.$(`.dialog-label.${d.RequiredIndicatorClassName}`)).innerText=w,this._groupNameInputBox=new S.InputBox(y.append(g,y.$(".input-divider")),this._contextViewService,{validationOptions:{validation:I=>!I&&!this._skipGroupNameValidation?{type:3,content:(0,f.localize)(4,null)}:null},ariaLabel:w,required:!0,inputBoxStyles:p.defaultInputBoxStyles});const E=(0,f.localize)(5,null);y.append(g,y.$(".dialog-label")).innerText=E,this._groupDescriptionInputBox=new S.InputBox(y.append(g,y.$(".input-divider")),this._contextViewService,{ariaLabel:E,inputBoxStyles:p.defaultInputBoxStyles});const C=(0,f.localize)(6,null);y.append(g,y.$(".dialog-label")).innerText=C,this._serverGroupContainer=y.append(g,y.$(".group-color-options")),this._serverGroupContainer.setAttribute("role","radiogroup"),this._serverGroupContainer.setAttribute("aria-label",C),this.fillGroupColors(this._serverGroupContainer),y.addStandardDisposableListener(this._serverGroupContainer,y.EventType.KEY_DOWN,I=>{(I.equals(17)||I.equals(15))&&(this.preventDefaultKeyboardEvent(I),this.focusNextColor(I.equals(17)))})}preventDefaultKeyboardEvent(n){n.preventDefault(),n.stopPropagation()}focusNextColor(n){let g=-1;for(let w=0;w<this._colorColorBoxesMap.length;w++)if(document.activeElement===this._colorColorBoxesMap[w].colorbox.radioButton){g=w;break}g>=0&&(n?g++:g--,g<0?g=this._colorColorBoxesMap.length-1:g>=this._colorColorBoxesMap.length&&(g=0),this._colorColorBoxesMap[g].colorbox.focus())}onSelectGroupColor(n){this.withViewModel.groupColor=n,this._selectedColorOption=this.withViewModel.colors.indexOf(n),this.updateView()}registerListeners(){const n=this.withRenderedDialog;this._register(n.addServerButton),this._register(n.closeButton),this._register(n.groupNameInputBox.onDidChange(g=>{this.groupNameChanged(g)})),this._register(n.groupDescriptionInputBox.onDidChange(g=>{this.groupDescriptionChanged(g)}))}fillGroupColors(n){for(let g=0;g<this.withViewModel.colors.length;g++){const w=this.withViewModel.colors[g],E=this._register(new t.Colorbox(n,{name:"server-group-color",color:w}));this._register(E.onSelect(C=>{this.onSelectGroupColor(w)})),this._colorColorBoxesMap[g]={color:w,colorbox:E}}}groupNameChanged(n){this.withViewModel.groupName=n,this.updateView()}groupDescriptionChanged(n){this.withViewModel.groupDescription=n,this.updateView()}get groupName(){return this.withRenderedDialog.groupNameInputBox.value}get groupDescription(){return this.withRenderedDialog.groupDescriptionInputBox.value}get selectedColor(){return(0,s.isUndefinedOrNull)(this._selectedColorOption)?void 0:this._colorColorBoxesMap[this._selectedColorOption].color}get viewModel(){return this._viewModel}setViewModel(n){this._viewModel=n,this._serverGroupContainer&&(y.clearNode(this._serverGroupContainer),this.fillGroupColors(this._serverGroupContainer))}addGroup(){this.withRenderedDialog.addServerButton.enabled&&this.validateInputs()&&this._onAddServerGroup.fire()}hideError(){this.setError("")}validateInputs(){const n=this.withRenderedDialog,g=n.groupNameInputBox.validate()===void 0;return g||n.groupNameInputBox.focus(),g}initializeView(){const n=this.withRenderedDialog;this.title=this.withViewModel.getDialogTitle(),this._skipGroupNameValidation=!0,n.groupNameInputBox.value=this.withViewModel.groupName,this._skipGroupNameValidation=!1,n.groupDescriptionInputBox.value=this.withViewModel.groupDescription??"",this.updateView()}updateView(){for(let n=0;n<this._colorColorBoxesMap.length;n++){let{colorbox:g,color:w}=this._colorColorBoxesMap[n];this.withViewModel.groupColor===w&&g.checked===!1?(g.checked=!0,this._selectedColorOption=n):this.withViewModel.groupColor!==w&&g.checked===!0&&(g.checked=!1)}this.withRenderedDialog.addServerButton.enabled=this.withViewModel.hasPendingChanges()}get withViewModel(){return(0,s.assertIsDefined)(this._viewModel)}onClose(){this.cancel()}onAccept(){this.addGroup()}cancel(){this._onCancel.fire(),this.close("cancel")}close(n="close"){this.hide(n),this.withRenderedDialog.groupNameInputBox.hideMessage(),this._onCloseEvent.fire()}get withRenderedDialog(){if(this.isRendered)return{groupNameInputBox:this._groupNameInputBox,groupDescriptionInputBox:this._groupDescriptionInputBox,serverGroupContainer:this._serverGroupContainer,addServerButton:this._addServerButton,closeButton:this._closeButton};throw new Error("Server Group Dialog Not Rendered")}open(){this.hideError(),this.initializeView(),this.show(),this.withRenderedDialog.groupNameInputBox.focus()}};e.ServerGroupDialog=c,e.ServerGroupDialog=c=fe([O(0,o.ILayoutService),O(1,b.IThemeService),O(2,T.IContextViewService),O(3,r.IAdsTelemetryService),O(4,v.IContextKeyService),O(5,h.IClipboardService),O(6,a.ILogService),O(7,u.ITextResourcePropertiesService)],c)}),define(Q[3490],Y([1,0,63,5,9,188,58,3489,667,194,779]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServerGroupController=void 0;let h=class{constructor(r,i,s,o){this._errorMessageService=r,this._instantiationService=i,this._configurationService=s,this.connectionManagementService=o}handleOnAddServerGroup(){const r=this._viewModel;if(this._group){let i=this.copyConnectionProfileGroup(this._group);this._group.name=r.groupName,this._group.color=r.groupColor,this._group.description=r.groupDescription,this.connectionManagementService.editGroup(this._group).then(()=>{this._serverGroupDialog.close()}).catch(s=>{this._group=i,this._errorMessageService.showDialog(t.default.Error,"",s)})}else{let i={name:r.groupName,parentId:void 0,color:r.groupColor,description:r.groupDescription};this.connectionManagementService.saveProfileGroup(i).then(s=>{this._callbacks&&this._callbacks.onAddGroup(this._serverGroupDialog.groupName),this._serverGroupDialog.close()}).catch(s=>{this._errorMessageService.showDialog(t.default.Error,"",s)})}}copyConnectionProfileGroup(r){return new m.ConnectionProfileGroup(r.name,r.parent,r.id,r.color,r.description)}handleOnClose(){this._callbacks&&this._callbacks.onClose()}showCreateGroupDialog(r){return this._group=void 0,this._viewModel=new v.ServerGroupViewModel(void 0,this._configurationService.getValue(S.SERVER_GROUP_CONFIG)[S.SERVER_GROUP_COLORS_CONFIG]),this._callbacks=r||void 0,this.openServerGroupDialog()}showEditGroupDialog(r){return this._group=r,this._viewModel=new v.ServerGroupViewModel(r,this._configurationService.getValue(S.SERVER_GROUP_CONFIG)[S.SERVER_GROUP_COLORS_CONFIG]),this.openServerGroupDialog()}openServerGroupDialog(){return this._serverGroupDialog?this._serverGroupDialog.setViewModel(this._viewModel):(this._serverGroupDialog=this._instantiationService.createInstance(f.ServerGroupDialog),this._serverGroupDialog.setViewModel(this._viewModel),this._serverGroupDialog.onCancel(()=>{}),this._serverGroupDialog.onAddServerGroup(()=>this.handleOnAddServerGroup()),this._serverGroupDialog.onCloseEvent(()=>this.handleOnClose()),this._serverGroupDialog.render()),Promise.resolve(this._serverGroupDialog.open())}};e.ServerGroupController=h,e.ServerGroupController=h=fe([O(0,D.IErrorMessageService),O(1,y.IInstantiationService),O(2,b.IConfigurationService),O(3,T.IConnectionManagementService)],h)}),define(Q[3491],Y([1,0,174,19,8,68,2252,7,11,76,147,111,5,197,343,78,209,101,1672]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TableDesignerPublishDialog=e.TableDesignerPublishDialogResult=void 0;const d=(0,T.localize)(0,null),p=(0,T.localize)(1,null),c=(0,T.localize)(2,null);var l;(function(g){g[g.UpdateDatabase=0]="UpdateDatabase",g[g.GenerateScript=1]="GenerateScript",g[g.Cancel=2]="Cancel"})(l||(e.TableDesignerPublishDialogResult=l={}));let n=class extends t.Modal{constructor(w,E,C,I,_,A,k,L){super("","TableDesignerPublishDialog",I,C,E,w,A,k,_,{dialogStyle:"normal",hasTitleIcon:!1}),this._markdownRenderer=L.createInstance(o.MarkdownRenderer,{})}open(w){return this._report=w,this.render(),this.show(),new Promise(C=>{this._promiseResolver=C})}render(){super.render(),this.title=(0,T.localize)(3,null),this._register((0,S.attachModalDialogStyler)(this,this._themeService)),this._okButton=this.addFooterButton(d,()=>this.handleOkButtonClick()),this._generateScriptButton=this.addFooterButton(c,()=>this.handleGenerateScriptButtonClick(),"right",!0),this._cancelButton=this.addFooterButton(p,()=>this.handleCancelButtonClick(),"right",!0);const w=this._report.requireConfirmation===!0;this._okButton.enabled=!w,this._generateScriptButton.enabled=!w,this._register(this._okButton),this._register(this._generateScriptButton),this._register(this._cancelButton)}renderBody(w){const E=f.append(w,f.$(".table-designer-publish-dialog")),C=f.append(E,f.$(".report-container"));if(this._report.mimeType===r.Mimes.markdown){const I=this._markdownRenderer.render({value:this._report.report}).element;f.append(C,I)}else C.innerText=this._report.report;if(this._report.requireConfirmation&&this._report.confirmationText){const I=f.append(E,f.$("div")),_=new i.Checkbox(I,{...u.defaultCheckboxStyles,label:this._report.confirmationText,checked:!1});this._register(_.onChange(A=>{this._okButton.enabled=A,this._generateScriptButton.enabled=A}))}}layout(w){}onClose(){this.handleCancelButtonClick()}onAccept(){this.handleOkButtonClick()}handleOkButtonClick(){this.hide("ok"),this._promiseResolver(l.UpdateDatabase)}handleGenerateScriptButtonClick(){this.hide("ok"),this._promiseResolver(l.GenerateScript)}handleCancelButtonClick(){this.hide("cancel"),this._promiseResolver(l.Cancel)}};e.TableDesignerPublishDialog=n,e.TableDesignerPublishDialog=n=fe([O(0,y.IThemeService),O(1,D.IClipboardService),O(2,h.ILayoutService),O(3,m.IAdsTelemetryService),O(4,b.IContextKeyService),O(5,v.ILogService),O(6,s.ITextResourcePropertiesService),O(7,a.IInstantiationService)],n)}),define(Q[1259],Y([1,0,2566,7,90,5,84,3473,910,29,17,82,4,522,38,9,1773]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsList=void 0;let o=class extends a.Disposable{constructor(p,c,l,n){super(),this.container=p,this.options=c,this.instantiationService=l,this.contextMenuService=n,this.viewModel=[]}show(){this.isVisible||(this.list||this.createNotificationsList(),this.isVisible=!0)}createNotificationsList(){this.listContainer=document.createElement("div"),this.listContainer.classList.add("notifications-list-container");const p=this._register(this.instantiationService.createInstance(r.NotificationActionRunner)),c=this.instantiationService.createInstance(f.NotificationRenderer,p),l=this.listDelegate=new f.NotificationsListDelegate(this.listContainer),n=this.options,g=this.list=this._register(this.instantiationService.createInstance(b.WorkbenchList,"NotificationsList",this.listContainer,l,[c],{...n,setRowLineHeight:!1,horizontalScrolling:!1,overrideStyles:{listBackground:T.NOTIFICATIONS_BACKGROUND},accessibilityProvider:this.instantiationService.createInstance(u,n)})),w=this._register(this.instantiationService.createInstance(v.CopyNotificationMessageAction,v.CopyNotificationMessageAction.ID,v.CopyNotificationMessageAction.LABEL));this._register(g.onContextMenu(C=>{C.element&&this.contextMenuService.showContextMenu({getAnchor:()=>C.anchor,getActions:()=>[w],getActionsContext:()=>C.element,actionRunner:p})})),this._register(g.onMouseDblClick(C=>C.element.toggle()));const E=this._register((0,y.trackFocus)(g.getHTMLElement()));this._register(E.onDidBlur(()=>{document.hasFocus()&&g.setFocus([])})),h.NotificationFocusedContext.bindTo(g.contextKeyService),this._register(g.onDidChangeSelection(C=>{C.indexes.length>0&&g.setSelection([])})),this.container.appendChild(this.listContainer)}updateNotificationsList(p,c,l=[]){const[n,g]=(0,S.assertAllDefined)(this.list,this.listContainer),w=(0,y.isAncestor)(document.activeElement,g),E=n.getFocus()[0],C=this.viewModel[E];let I=null;if(typeof E=="number"&&(I=n.getRelativeTop(E)),this.viewModel.splice(p,c,...l),n.splice(p,c,l),n.layout(),this.viewModel.length===0)this.hide();else if(typeof E=="number"){let _=0;if(C){let A=this.viewModel.indexOf(C);A===-1&&(A=E-1),A<this.viewModel.length&&A>=0&&(_=A)}typeof I=="number"&&n.reveal(_,I),n.setFocus([_])}this.isVisible&&w&&n.domFocus()}updateNotificationHeight(p){const c=this.viewModel.indexOf(p);if(c===-1)return;const[l,n]=(0,S.assertAllDefined)(this.list,this.listDelegate);l.updateElementHeight(c,n.getHeight(p)),l.layout()}hide(){!this.isVisible||!this.list||(this.isVisible=!1,this.list.splice(0,this.viewModel.length),this.viewModel=[])}focusFirst(){this.list&&(this.list.focusFirst(),this.list.domFocus())}hasFocus(){return this.listContainer?(0,y.isAncestor)(document.activeElement,this.listContainer):!1}layout(p,c){this.listContainer&&this.list&&(this.listContainer.style.width=`${p}px`,typeof c=="number"&&(this.list.getHTMLElement().style.maxHeight=`${c}px`),this.list.layout())}dispose(){this.hide(),super.dispose()}};e.NotificationsList=o,e.NotificationsList=o=fe([O(2,D.IInstantiationService),O(3,m.IContextMenuService)],o);let u=class{constructor(p,c,l){this._options=p,this._keybindingService=c,this._configurationService=l}getAriaLabel(p){let c;const l=this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel();return this._configurationService.getValue("accessibility.verbosity.notification")&&(c=l?(0,t.localize)(0,null,l):(0,t.localize)(1,null)),p.source?c?(0,t.localize)(4,null,p.message.raw,p.source,c):(0,t.localize)(5,null,p.message.raw,p.source):c?(0,t.localize)(2,null,p.message.raw,c):(0,t.localize)(3,null,p.message.raw)}getWidgetAriaLabel(){return this._options.widgetAriaLabel??(0,t.localize)(6,null)}getRole(){return"dialog"}};u=fe([O(1,i.IKeybindingService),O(2,s.IConfigurationService)],u)}),define(Q[3492],Y([1,0,7,157,446,169,32,80,6,4,2575,88,221,13,5,38,43,36,84]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandCenterControl=void 0;let p=class{constructor(l,n,g,w,E){this._disposables=new m.DisposableStore,this._onDidChangeVisibility=new v.Emitter,this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.element=document.createElement("div"),this.element.classList.add("command-center");const C=g.createInstance(a.MenuWorkbenchToolBar,this.element,r.MenuId.CommandCenter,{contextMenu:r.MenuId.TitleBarContext,hiddenItemStrategy:0,toolbarOptions:{primaryGroup:()=>!0},telemetrySource:"commandCenter",actionViewItemProvider:I=>{if(I instanceof r.MenuItemAction&&I.id==="workbench.action.quickOpenWithModes"){class _ extends y.BaseActionViewItem{constructor(k,L){super(void 0,k,L)}render(k){super.render(k),k.classList.add("command-center");const L=(0,D.renderIcon)(T.Codicon.search);L.classList.add("search-icon");const R=this._getLabel(),M=document.createElement("span");M.classList.add("search-label"),M.innerText=R,(0,t.reset)(k,L,M);const N=this._store.add((0,b.setupCustomHover)(n,k,this.getTooltip()));this._store.add(l.onDidChange(()=>{N.update(this.getTooltip()),M.innerText=this._getLabel()}))}_getLabel(){const{prefix:k,suffix:L}=l.getTitleDecorations();let R=l.isCustomTitleFormat()?l.getWindowTitle():l.workspaceName;return R||(R=(0,S.localize)(0,null)),k&&(R=(0,S.localize)(1,null,k,R)),L&&(R=(0,S.localize)(2,null,R,L)),R}getTooltip(){const k=E.lookupKeybinding(I.id)?.getLabel();return k?(0,S.localize)(3,null,l.workspaceName,k,l.value):(0,S.localize)(4,null,l.workspaceName,l.value)}}return g.createInstance(_,I,{})}else return(0,h.createActionViewItem)(g,I,{hoverDelegate:n})}});this._disposables.add(w.onShow(this._setVisibility.bind(this,!1))),this._disposables.add(w.onHide(this._setVisibility.bind(this,!0))),this._disposables.add(C)}_setVisibility(l){this.element.classList.toggle("hide",!l),this._onDidChangeVisibility.fire()}dispose(){this._disposables.dispose()}};e.CommandCenterControl=p,e.CommandCenterControl=p=fe([O(2,i.IInstantiationService),O(3,o.IQuickInputService),O(4,s.IKeybindingService)],p),u.registerColor("commandCenter.foreground",{dark:d.TITLE_BAR_ACTIVE_FOREGROUND,hcDark:d.TITLE_BAR_ACTIVE_FOREGROUND,light:d.TITLE_BAR_ACTIVE_FOREGROUND,hcLight:d.TITLE_BAR_ACTIVE_FOREGROUND},(0,S.localize)(5,null),!1),u.registerColor("commandCenter.activeForeground",{dark:d.MENUBAR_SELECTION_FOREGROUND,hcDark:d.MENUBAR_SELECTION_FOREGROUND,light:d.MENUBAR_SELECTION_FOREGROUND,hcLight:d.MENUBAR_SELECTION_FOREGROUND},(0,S.localize)(6,null),!1),u.registerColor("commandCenter.inactiveForeground",{dark:d.TITLE_BAR_INACTIVE_FOREGROUND,hcDark:d.TITLE_BAR_INACTIVE_FOREGROUND,light:d.TITLE_BAR_INACTIVE_FOREGROUND,hcLight:d.TITLE_BAR_INACTIVE_FOREGROUND},(0,S.localize)(7,null),!1),u.registerColor("commandCenter.background",{dark:f.Color.white.transparent(.05),hcDark:null,light:f.Color.black.transparent(.05),hcLight:null},(0,S.localize)(8,null),!1),u.registerColor("commandCenter.activeBackground",{dark:f.Color.white.transparent(.08),hcDark:d.MENUBAR_SELECTION_BACKGROUND,light:f.Color.black.transparent(.08),hcLight:d.MENUBAR_SELECTION_BACKGROUND},(0,S.localize)(9,null),!1),u.registerColor("commandCenter.border",{dark:u.transparent(d.TITLE_BAR_ACTIVE_FOREGROUND,.2),hcDark:u.transparent(d.TITLE_BAR_ACTIVE_FOREGROUND,.6),light:u.transparent(d.TITLE_BAR_ACTIVE_FOREGROUND,.2),hcLight:u.transparent(d.TITLE_BAR_ACTIVE_FOREGROUND,.6)},(0,S.localize)(10,null),!1),u.registerColor("commandCenter.activeBorder",{dark:u.transparent(d.TITLE_BAR_ACTIVE_FOREGROUND,.3),hcDark:d.TITLE_BAR_ACTIVE_FOREGROUND,light:u.transparent(d.TITLE_BAR_ACTIVE_FOREGROUND,.3),hcLight:d.TITLE_BAR_ACTIVE_FOREGROUND},(0,S.localize)(11,null),!1),u.registerColor("commandCenter.inactiveBorder",{dark:u.transparent(d.TITLE_BAR_INACTIVE_FOREGROUND,.25),hcDark:u.transparent(d.TITLE_BAR_INACTIVE_FOREGROUND,.25),light:u.transparent(d.TITLE_BAR_INACTIVE_FOREGROUND,.25),hcLight:u.transparent(d.TITLE_BAR_INACTIVE_FOREGROUND,.25)},(0,S.localize)(12,null),!1)}),define(Q[523],Y([1,0,19,84,18,7,97,36,1757]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FONT_FAMILY=void 0,(0,t.registerThemingParticipant)((v,m)=>{const S=(0,y.WORKBENCH_BACKGROUND)(v);m.addRule(`.monaco-workbench { background-color: ${S}; }`);const h=v.getColor(f.selectionBackground);if(h&&m.addRule(`.monaco-workbench ::selection { background-color: ${h}; }`),b.isWeb){const a=v.getColor(y.TITLE_BAR_ACTIVE_BACKGROUND);if(a){const r="monaco-workbench-meta-theme-color";let i=document.getElementById(r);i||(i=(0,D.createMetaElement)(),i.name="theme-color",i.id=r),i.content=a.toString()}}T.isSafari&&m.addRule(` body.web { touch-action: none; } .monaco-workbench .monaco-editor .view-lines { user-select: text; -webkit-user-select: text; } `),b.isIOS&&(0,T.isStandalone)()&&m.addRule(`body { background-color: ${S}; }`)}),e.DEFAULT_FONT_FAMILY=b.isWindows?'"Segoe WPC", "Segoe UI", sans-serif':b.isMacintosh?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif'}),define(Q[46],Y([1,0,6,2595,5,4,69,16,20,141,42,32,77]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoTreeViewError=e.ResolvableTreeItem=e.TreeItemCollapsibleState=e.ViewVisibilityState=e.IViewDescriptorService=e.IViewsService=e.ViewContentGroups=e.ViewContainerLocationToString=e.ViewContainerLocations=e.ViewContainerLocation=e.Extensions=e.defaultViewIcon=void 0,e.defaultViewIcon=(0,a.registerIcon)("default-view-icon",h.Codicon.window,(0,y.localize)(0,null));var r;(function(w){w.ViewContainersRegistry="workbench.registry.view.containers",w.ViewsRegistry="workbench.registry.view"})(r||(e.Extensions=r={}));var i;(function(w){w[w.Sidebar=0]="Sidebar",w[w.Panel=1]="Panel",w[w.AuxiliaryBar=2]="AuxiliaryBar",w[w.Dialog=3]="Dialog"})(i||(e.ViewContainerLocation=i={})),e.ViewContainerLocations=[0,1,2];function s(w){switch(w){case 0:return"sidebar";case 1:return"panel";case 2:return"auxiliarybar"}return""}e.ViewContainerLocationToString=s;class o extends D.Disposable{constructor(){super(...arguments),this._onDidRegister=this._register(new t.Emitter),this.onDidRegister=this._onDidRegister.event,this._onDidDeregister=this._register(new t.Emitter),this.onDidDeregister=this._onDidDeregister.event,this.viewContainers=new Map,this.defaultViewContainers=[]}get all(){return(0,v.flatten)([...this.viewContainers.values()])}registerViewContainer(E,C,I){const _=this.get(E.id);if(_)return _;const A=E;return A.openCommandActionDescriptor=I?.doNotRegisterOpenCommand?void 0:A.openCommandActionDescriptor??{id:A.id},(0,T.getOrSet)(this.viewContainers,C,[]).push(A),I?.isDefault&&this.defaultViewContainers.push(A),this._onDidRegister.fire({viewContainer:A,viewContainerLocation:C}),A}deregisterViewContainer(E){for(const C of this.viewContainers.keys()){const I=this.viewContainers.get(C),_=I?.indexOf(E);if(_!==-1){I?.splice(_,1),I.length===0&&this.viewContainers.delete(C),this._onDidDeregister.fire({viewContainer:E,viewContainerLocation:C});return}}}get(E){return this.all.filter(C=>C.id===E)[0]}getViewContainers(E){return[...this.viewContainers.get(E)||[]]}getViewContainerLocation(E){return[...this.viewContainers.keys()].filter(C=>this.getViewContainers(C).filter(I=>I?.id===E.id).length>0)[0]}getDefaultViewContainer(E){return this.defaultViewContainers.find(C=>this.getViewContainerLocation(C)===E)}}f.Registry.add(r.ViewContainersRegistry,new o);var u;(function(w){w.Open="2_open",w.Debug="4_debug",w.SCM="5_scm",w.More="9_more"})(u||(e.ViewContentGroups=u={}));function d(w,E){const C=w.group??u.More,I=E.group??u.More;return C!==I?C.localeCompare(I):(w.order??5)-(E.order??5)}class p extends D.Disposable{constructor(){super(...arguments),this._onViewsRegistered=this._register(new t.Emitter),this.onViewsRegistered=this._onViewsRegistered.event,this._onViewsDeregistered=this._register(new t.Emitter),this.onViewsDeregistered=this._onViewsDeregistered.event,this._onDidChangeContainer=this._register(new t.Emitter),this.onDidChangeContainer=this._onDidChangeContainer.event,this._onDidChangeViewWelcomeContent=this._register(new t.Emitter),this.onDidChangeViewWelcomeContent=this._onDidChangeViewWelcomeContent.event,this._viewContainers=[],this._views=new Map,this._viewWelcomeContents=new m.SetMap}registerViews(E,C){this.registerViews2([{views:E,viewContainer:C}])}registerViews2(E){E.forEach(({views:C,viewContainer:I})=>this.addViews(C,I)),this._onViewsRegistered.fire(E)}deregisterViews(E,C){const I=this.removeViews(E,C);I.length&&this._onViewsDeregistered.fire({views:I,viewContainer:C})}moveViews(E,C){for(const I of this._views.keys())if(I!==C){const _=this.removeViews(E,I);_.length&&(this.addViews(_,C),this._onDidChangeContainer.fire({views:_,from:I,to:C}))}}getViews(E){return this._views.get(E)||[]}getView(E){for(const C of this._viewContainers){const I=(this._views.get(C)||[]).filter(_=>_.id===E)[0];if(I)return I}return null}getViewContainer(E){for(const C of this._viewContainers)if((this._views.get(C)||[]).filter(_=>_.id===E)[0])return C;return null}registerViewWelcomeContent(E,C){return this._viewWelcomeContents.add(E,C),this._onDidChangeViewWelcomeContent.fire(E),(0,D.toDisposable)(()=>{this._viewWelcomeContents.delete(E,C),this._onDidChangeViewWelcomeContent.fire(E)})}registerViewWelcomeContent2(E,C){const I=new Map;for(const[_,A]of C)this._viewWelcomeContents.add(E,A),I.set(_,(0,D.toDisposable)(()=>{this._viewWelcomeContents.delete(E,A),this._onDidChangeViewWelcomeContent.fire(E)}));return this._onDidChangeViewWelcomeContent.fire(E),I}getViewWelcomeContent(E){const C=[];return this._viewWelcomeContents.forEach(E,I=>C.push(I)),C.sort(d)}addViews(E,C){let I=this._views.get(C);I||(I=[],this._views.set(C,I),this._viewContainers.push(C));for(const _ of E){if(this.getView(_.id)!==null)throw new Error((0,y.localize)(1,null,_.id));I.push(_)}}removeViews(E,C){const I=this._views.get(C);if(!I)return[];const _=[],A=[];for(const k of I)E.includes(k)?_.push(k):A.push(k);return _.length&&(A.length?this._views.set(C,A):(this._views.delete(C),this._viewContainers.splice(this._viewContainers.indexOf(C),1))),_}}f.Registry.add(r.ViewsRegistry,new p),e.IViewsService=(0,b.createDecorator)("viewsService"),e.IViewDescriptorService=(0,b.createDecorator)("viewDescriptorService");var c;(function(w){w[w.Default=0]="Default",w[w.Expand=1]="Expand"})(c||(e.ViewVisibilityState=c={}));var l;(function(w){w[w.None=0]="None",w[w.Collapsed=1]="Collapsed",w[w.Expanded=2]="Expanded"})(l||(e.TreeItemCollapsibleState=l={}));class n{constructor(E,C){this.resolved=!1,this._hasResolve=!1,(0,S.mixin)(this,E),this._hasResolve=!!C,this.resolve=async I=>{if(C&&!this.resolved){const _=await C(I);_&&(this.tooltip=this.tooltip??_.tooltip,this.command=this.command??_.command)}I.isCancellationRequested||(this.resolved=!0)}}get hasResolve(){return this._hasResolve}resetResolve(){this.resolved=!1}asTreeItem(){return{handle:this.handle,parentHandle:this.parentHandle,collapsibleState:this.collapsibleState,label:this.label,description:this.description,icon:this.icon,iconDark:this.iconDark,themeIcon:this.themeIcon,resourceUri:this.resourceUri,tooltip:this.tooltip,contextValue:this.contextValue,command:this.command,children:this.children,accessibilityInformation:this.accessibilityInformation}}}e.ResolvableTreeItem=n;class g extends Error{constructor(E){super((0,y.localize)(2,null,E)),this.name="NoTreeViewError"}static is(E){return E.name==="NoTreeViewError"}}e.NoTreeViewError=g}),define(Q[3493],Y([1,0,46]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeComponentDataSource=void 0;class y{constructor(D){this._dataProvider=D}getId(D,T){return T.handle}hasChildren(D,T){return this._dataProvider!==void 0&&T.collapsibleState!==t.TreeItemCollapsibleState.None}getChildren(D,T){return this._dataProvider?T&&T.handle==="0"?this._dataProvider.getChildren(void 0):this._dataProvider.getChildren(T):Promise.resolve([])}getParent(D,T){return Promise.resolve(null)}shouldAutoexpand(D,T){return T.collapsibleState===t.TreeItemCollapsibleState.Expanded}}e.TreeComponentDataSource=y}),define(Q[605],Y([1,0,553,322,107,58,106,172,122,4,59,5,46,2232,298,363]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OEShimService=e.IOEShimService=e.SERVICE_ID=void 0,e.SERVICE_ID="oeShimService",e.IOEShimService=(0,h.createDecorator)(e.SERVICE_ID);let o=class extends m.Disposable{constructor(p,c,l){super(),this.oe=p,this.cm=c,this.capabilities=l,this.nodeHandleMap=new Map,this.nodeInfoMap=new Map}async createSession(p,c,l){let n=await this.cm.fixProfile(l.payload),g=new T.ConnectionProfile(this.capabilities,n);if(g.saveProfile=!1,this.cm.providerRegistered(c))g=await this.connectOrPrompt(g);else throw new Error((0,r.localize)(0,null,c));let w=await this.oe.createNewSession(c,g),E=w.sessionId;return await new Promise((C,I)=>{let _=this.oe.onUpdateObjectExplorerNodes(A=>{if(A.connection.id===g.id){if(A.errorMessage){_.dispose(),I(new Error(A.errorMessage));return}let k=this.oe.getSession(w.sessionId);if(!k){I(new Error(`Could not have session for ${w.sessionId}`));return}k.rootNode.nodePath&&this.nodeHandleMap.set(u(p,l),k.rootNode.nodePath)}_.dispose(),C(w.sessionId)})}),E}async connectOrPrompt(p){return p=await new Promise(async(c,l)=>{await this.cm.connect(p,void 0,{showConnectionDialogOnError:!0,showFirewallRuleOnError:!0,saveTheConnection:!1,showDashboard:!1},{onConnectSuccess:async(g,w)=>{let E=this.cm.findExistingConnection(w);p=new T.ConnectionProfile(this.capabilities,E),p=await this.cm.addSavedPassword(p),c(p)},onConnectCanceled:()=>{l(new s.UserCancelledConnectionError((0,r.localize)(1,null)))},onConnectReject:()=>{},onConnectStart:()=>{},onDisconnect:()=>{}})||l(new s.UserCancelledConnectionError((0,r.localize)(2,null)))}),p}async disconnectNode(p){return p.sessionId!==void 0?(await this.oe.closeSession(p.childProvider,this.oe.getSession(p.sessionId))).success:!1}async getChildren(p,c){if(p.payload){p.payload=await this.cm.fixProfile(p.payload),p.sessionId===void 0&&(p.sessionId=await this.createSession(c,p.childProvider,p));const l=this.nodeHandleMap.get(u(c,p))||p.handle,n=new y.TreeNode(void 0,void 0,void 0,void 0,l,void 0,void 0);return n.connection=new T.ConnectionProfile(this.capabilities,p.payload),(await this.oe.refreshTreeNode({success:!0,sessionId:p.sessionId,rootNode:void 0,errorMessage:void 0},n)).map(w=>this.treeNodeToITreeItem(c,w,p))}return[]}treeNodeToITreeItem(p,c,l){let n=(0,S.generateUuid)(),g="",w=c.nodePath;c.iconType?g=typeof c.iconType=="string"?c.iconType:c.iconType.id:(g=c.nodeTypeId,c.nodeStatus&&(g=c.nodeTypeId+"_"+c.nodeStatus),c.nodeSubType&&(g=c.nodeTypeId+"_"+c.nodeSubType)),g=g.toLowerCase();let E=!1,C={};c.nodeTypeId===i.NodeType.Database&&c.getDatabaseName()&&(E=!0,C=Object.assign(C,l.payload),C.databaseName=c.getDatabaseName());const I={nodePath:w,parentNodePath:c.parentNodePath,nodeType:c.nodeTypeId,objectType:c.objectType,nodeSubType:c.nodeSubType,nodeStatus:c.nodeStatus,label:c.label,isLeaf:c.isAlwaysLeaf,metadata:c.metadata,errorMessage:c.errorStateMessage,iconType:g,childProvider:c.childProvider||l.childProvider,payload:c.payload||(E?C:l.payload)};let _={parentHandle:c.parent.id,handle:n,collapsibleState:c.isAlwaysLeaf?a.TreeItemCollapsibleState.None:a.TreeItemCollapsibleState.Collapsed,label:{label:c.label},childProvider:c.childProvider||l.childProvider,providerHandle:l.childProvider,payload:c.payload||(E?C:l.payload),contextValue:c.nodeTypeId,sqlIcon:g,nodeInfo:I,sessionId:l.sessionId};return this.nodeHandleMap.set(u(p,_),w),this.nodeInfoMap.set(_,I),_}providerExists(p){return this.oe.providerRegistered(p)}isNodeConnected(p,c){return c.sessionId!==void 0}getNodeInfoForTreeItem(p){if(this.nodeInfoMap.has(p))return this.nodeInfoMap.get(p)}getDefaultAuthenticationType(p){return t.getSqlConfigValue(p,"defaultAuthenticationType")}};e.OEShimService=o,e.OEShimService=o=fe([O(0,f.IObjectExplorerService),O(1,D.IConnectionManagementService),O(2,b.ICapabilitiesService)],o);function u(d,p){return(0,v.hash)([d,p.handle])}}),define(Q[3494],Y([1,0,605,28,46,72,16]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.REFRESH_COMMAND_ID=e.DISCONNECT_COMMAND_ID=void 0,e.DISCONNECT_COMMAND_ID="dataExplorer.disconnect",e.REFRESH_COMMAND_ID="dataExplorer.refresh",y.CommandsRegistry.registerCommand({id:e.DISCONNECT_COMMAND_ID,handler:(f,v)=>v.$treeItem?f.get(t.IOEShimService).disconnectNode(v.$treeItem).then(()=>{const{treeView:S}=T.Registry.as(b.Extensions.ViewsRegistry).getView(v.$treeViewId);S.collapse(v.$treeItem),S.refresh([v.$treeItem]).then(()=>!0)}):Promise.resolve(!0)}),y.CommandsRegistry.registerCommand({id:e.REFRESH_COMMAND_ID,handler:(f,v)=>{const m=f.get(D.IProgressService);if(v.$treeItem){const{treeView:S}=T.Registry.as(b.Extensions.ViewsRegistry).getView(v.$treeViewId);return v.$treeContainerId?m.withProgress({location:v.$treeContainerId},()=>S.refresh([v.$treeItem]).then(()=>!0)):S.refresh([v.$treeItem]).then(()=>!0)}return Promise.resolve(!0)}})}),define(Q[3495],Y([1,0,6,4,226,9]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnfocusedViewDimmingContribution=void 0;let T=class extends y.Disposable{constructor(S){super(),this._register((0,y.toDisposable)(()=>this._removeStyleElement())),this._register(t.Event.runAndSubscribe(S.onDidChangeConfiguration,h=>{if(h&&!h.affectsConfiguration("accessibility.dimUnfocused.enabled")&&!h.affectsConfiguration("accessibility.dimUnfocused.opacity"))return;let a="";if(f(S.getValue("accessibility.dimUnfocused.enabled"),!1)){const i=(0,b.clamp)(v(S.getValue("accessibility.dimUnfocused.opacity"),.75),.2,1);if(i!==1){const s=new Set,o=`filter: opacity(${i});`;s.add(`.monaco-workbench .pane-body.integrated-terminal:not(:focus-within) .tabs-container { ${o} }`),s.add(`.monaco-workbench .pane-body.integrated-terminal .terminal-wrapper:not(:focus-within) { ${o} }`),s.add(`.monaco-workbench .editor-instance:not(:focus-within) .monaco-editor { ${o} }`),s.add(`.monaco-workbench .editor-instance:not(:focus-within) .tabs-breadcrumbs { ${o} }`),s.add(`.monaco-workbench .editor-instance:not(:focus-within) .terminal-wrapper { ${o} }`),s.add(`.monaco-workbench .editor-instance:not(:focus-within) .settings-editor { ${o} }`),s.add(`.monaco-workbench .editor-instance:not(:focus-within) .keybindings-editor { ${o} }`),s.add(`.monaco-workbench .editor-instance:not(:focus-within) .monaco-editor-pane-placeholder { ${o} }`),s.add(`.monaco-workbench .editor-instance:not(:focus-within) .gettingStartedContainer { ${o} }`),a=[...s].join(` `)}}a.length===0?this._removeStyleElement():this._getStyleElement().textContent=a}))}_getStyleElement(){return this._styleElement||(this._styleElement=document.createElement("style"),this._styleElement.className="accessibilityUnfocusedViewOpacity",document.head.appendChild(this._styleElement)),this._styleElement}_removeStyleElement(){this._styleElement?.remove(),this._styleElement=void 0}};e.UnfocusedViewDimmingContribution=T,e.UnfocusedViewDimmingContribution=T=fe([O(0,D.IConfigurationService)],T);function f(m,S){return typeof m=="boolean"?m:S}function v(m,S){return typeof m=="number"?m:S}}),define(Q[3496],Y([1,0,4,165,27,75,242,189,578,69,57,152,210,304]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkTextEdits=void 0;class i{constructor(d){this._modelReference=d,this.model=this._modelReference.object.textEditorModel,this._edits=[]}dispose(){this._modelReference.dispose()}isNoOp(){return!(this._edits.length>0||this._newEol!==void 0&&this._newEol!==this.model.getEndOfLineSequence())}addEdit(d){this._expectedModelVersionId=d.versionId;const{textEdit:p}=d;if(typeof p.eol=="number"&&(this._newEol=p.eol),!p.range&&!p.text||b.Range.isEmpty(p.range)&&!p.text)return;let c;p.range?c=b.Range.lift(p.range):c=this.model.getFullModelRange(),this._edits.push({...y.EditOperation.replaceMove(c,p.text),insertAsSnippet:p.insertAsSnippet})}validate(){return typeof this._expectedModelVersionId>"u"||this.model.getVersionId()===this._expectedModelVersionId?{canApply:!0}:{canApply:!1,reason:this.model.uri}}getBeforeCursorState(){return null}apply(){this._edits.length>0&&(this._edits=this._edits.map(this._transformSnippetStringToInsertText,this).sort((d,p)=>b.Range.compareRangesUsingStarts(d.range,p.range)),this.model.pushEditOperations(null,this._edits,()=>null)),this._newEol!==void 0&&this.model.pushEOL(this._newEol)}_transformSnippetStringToInsertText(d){if(!d.insertAsSnippet||!d.text)return d;const p=r.SnippetParser.asInsertText(d.text);return{...d,insertAsSnippet:!1,text:p}}}class s extends i{constructor(d,p){super(d),this._editor=p}getBeforeCursorState(){return this._canUseEditor()?this._editor.getSelections():null}apply(){if(!this._canUseEditor()){super.apply();return}if(this._edits.length>0){const d=a.SnippetController2.get(this._editor);if(d&&this._edits.some(p=>p.insertAsSnippet)){const p=[];for(const c of this._edits)c.range&&c.text!==null&&p.push({range:b.Range.lift(c.range),template:c.insertAsSnippet?c.text:r.SnippetParser.escape(c.text)});d.apply(p,{undoStopBefore:!1,undoStopAfter:!1})}else this._edits=this._edits.map(this._transformSnippetStringToInsertText,this).sort((p,c)=>b.Range.compareRangesUsingStarts(p.range,c.range)),this._editor.executeEdits("",this._edits)}this._newEol!==void 0&&this._editor.hasModel()&&this._editor.getModel().pushEOL(this._newEol)}_canUseEditor(){return this._editor?.getModel()?.uri.toString()===this.model.uri.toString()}}let o=class{constructor(d,p,c,l,n,g,w,E,C,I,_,A){this._label=d,this._code=p,this._editor=c,this._undoRedoGroup=l,this._undoRedoSource=n,this._progress=g,this._token=w,this._editorWorker=C,this._modelService=I,this._textModelResolverService=_,this._undoRedoService=A,this._edits=new m.ResourceMap;for(const k of E){let L=this._edits.get(k.resource);L||(L=[],this._edits.set(k.resource,L)),L.push(k)}}_validateBeforePrepare(){for(const d of this._edits.values())for(const p of d)if(typeof p.versionId=="number"){const c=this._modelService.getModel(p.resource);if(c&&c.getVersionId()!==p.versionId)throw new Error(`${c.uri.toString()} has changed in the meantime`)}}async _createEditsTasks(){const d=[],p=[];for(const[c,l]of this._edits){const n=this._textModelResolverService.createModelReference(c).then(async g=>{let w,E=!1;this._editor?.getModel()?.uri.toString()===g.object.textEditorModel.uri.toString()?(w=new s(g,this._editor),E=!0):w=new i(g);for(const C of l)if(E&&!C.textEdit.insertAsSnippet){const I=await this._editorWorker.computeMoreMinimalEdits(C.resource,[C.textEdit]);if(!I)w.addEdit(C);else for(const _ of I)w.addEdit(new h.ResourceTextEdit(C.resource,_,C.versionId,C.metadata))}else w.addEdit(C);d.push(w)});p.push(n)}return await Promise.all(p),d}_validateTasks(d){for(const p of d){const c=p.validate();if(!c.canApply)return c}return{canApply:!0}}async apply(){this._validateBeforePrepare();const d=await this._createEditsTasks();try{if(this._token.isCancellationRequested)return[];const p=[],c=this._validateTasks(d);if(!c.canApply)throw new Error(`${c.reason.toString()} has changed in the meantime`);if(d.length===1){const l=d[0];if(!l.isNoOp()){const n=new v.SingleModelEditStackElement(this._label,this._code,l.model,l.getBeforeCursorState());this._undoRedoService.pushElement(n,this._undoRedoGroup,this._undoRedoSource),l.apply(),n.close(),p.push(l.model.uri)}this._progress.report(void 0)}else{const l=new v.MultiModelEditStackElement(this._label,this._code,d.map(n=>new v.SingleModelEditStackElement(this._label,this._code,n.model,n.getBeforeCursorState())));this._undoRedoService.pushElement(l,this._undoRedoGroup,this._undoRedoSource);for(const n of d)n.apply(),this._progress.report(void 0),p.push(n.model.uri);l.close()}return p}finally{(0,t.dispose)(d)}}};e.BulkTextEdits=o,e.BulkTextEdits=o=fe([O(8,T.IEditorWorkerService),O(9,S.IModelService),O(10,D.ITextModelService),O(11,f.IUndoRedoService)],o)}),define(Q[912],Y([1,0,31,676,10,51,20,15,4,28,17,57,75]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyModel=e.CallHierarchyProviderRegistry=e.CallHierarchyDirection=void 0;var r;(function(u){u.CallsTo="incomingCalls",u.CallsFrom="outgoingCalls"})(r||(e.CallHierarchyDirection=r={})),e.CallHierarchyProviderRegistry=new y.LanguageFeatureRegistry;class i{static async create(d,p,c){const[l]=e.CallHierarchyProviderRegistry.ordered(d);if(!l)return;const n=await l.prepareCallHierarchy(d,p,c);if(n)return new i(n.roots.reduce((g,w)=>g+w._sessionId,""),l,n.roots,new v.RefCountedDisposable(n))}constructor(d,p,c,l){this.id=d,this.provider=p,this.roots=c,this.ref=l,this.root=c[0]}dispose(){this.ref.release()}fork(d){const p=this;return new class extends i{constructor(){super(p.id,p.provider,[d],p.ref.acquire())}}}async resolveIncomingCalls(d,p){try{const c=await this.provider.provideIncomingCalls(d,p);if((0,T.isNonEmptyArray)(c))return c}catch(c){(0,f.onUnexpectedExternalError)(c)}return[]}async resolveOutgoingCalls(d,p){try{const c=await this.provider.provideOutgoingCalls(d,p);if((0,T.isNonEmptyArray)(c))return c}catch(c){(0,f.onUnexpectedExternalError)(c)}return[]}}e.CallHierarchyModel=i;const s=new Map;m.CommandsRegistry.registerCommand("_executePrepareCallHierarchy",async(u,...d)=>{const[p,c]=d;(0,S.assertType)(b.URI.isUri(p)),(0,S.assertType)(D.Position.isIPosition(c));let n=u.get(h.IModelService).getModel(p),g;if(!n){const E=await u.get(a.ITextModelService).createModelReference(p);n=E.object.textEditorModel,g=E}try{const w=await i.create(n,c,t.CancellationToken.None);return w?(s.set(w.id,w),s.forEach((E,C,I)=>{I.size>10&&(E.dispose(),s.delete(C))}),[w.root]):[]}finally{g?.dispose()}});function o(u){return!0}m.CommandsRegistry.registerCommand("_executeProvideIncomingCalls",async(u,...d)=>{const[p]=d;(0,S.assertType)(o(p));const c=s.get(p._sessionId);if(c)return c.resolveIncomingCalls(p,t.CancellationToken.None)}),m.CommandsRegistry.registerCommand("_executeProvideOutgoingCalls",async(u,...d)=>{const[p]=d;(0,S.assertType)(o(p));const c=s.get(p._sessionId);if(c)return c.resolveOutgoingCalls(p,t.CancellationToken.None)})}),define(Q[3497],Y([1,0,912,31,128,306,99,33,27,2609,37]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityProvider=e.VirtualDelegate=e.CallRenderer=e.IdentityProvider=e.Sorter=e.DataSource=e.Call=void 0;class h{constructor(c,l,n,g){this.item=c,this.locations=l,this.model=n,this.parent=g}static compare(c,l){let n=(0,f.compare)(c.item.uri.toString(),l.item.uri.toString());return n===0&&(n=v.Range.compareRangesUsingStarts(c.item.range,l.item.range)),n}}e.Call=h;class a{constructor(c){this.getDirection=c}hasChildren(){return!0}async getChildren(c){if(c instanceof t.CallHierarchyModel)return c.roots.map(g=>new h(g,void 0,c,void 0));const{model:l,item:n}=c;return this.getDirection()==="outgoingCalls"?(await l.resolveOutgoingCalls(n,y.CancellationToken.None)).map(g=>new h(g.to,g.fromRanges.map(w=>({range:w,uri:n.uri})),l,c)):(await l.resolveIncomingCalls(n,y.CancellationToken.None)).map(g=>new h(g.from,g.fromRanges.map(w=>({range:w,uri:g.from.uri})),l,c))}}e.DataSource=a;class r{compare(c,l){return h.compare(c,l)}}e.Sorter=r;class i{constructor(c){this.getDirection=c}getId(c){let l=this.getDirection()+JSON.stringify(c.item.uri)+JSON.stringify(c.item.range);return c.parent&&(l+=this.getId(c.parent)),l}}e.IdentityProvider=i;class s{constructor(c,l){this.icon=c,this.label=l}}class o{constructor(){this.templateId=o.id}static{this.id="CallRenderer"}renderTemplate(c){c.classList.add("callhierarchy-element");const l=document.createElement("div");c.appendChild(l);const n=new D.IconLabel(c,{supportHighlights:!0});return new s(l,n)}renderElement(c,l,n){const{element:g,filterData:w}=c,E=g.item.tags?.includes(1);n.icon.className="",n.icon.classList.add("inline",...S.ThemeIcon.asClassNameArray(T.SymbolKinds.toIcon(g.item.kind))),n.label.setLabel(g.item.name,g.item.detail,{labelEscapeNewLines:!0,matches:(0,b.createMatches)(w),strikethrough:E})}disposeTemplate(c){c.label.dispose()}}e.CallRenderer=o;class u{getHeight(c){return 22}getTemplateId(c){return o.id}}e.VirtualDelegate=u;class d{constructor(c){this.getDirection=c}getWidgetAriaLabel(){return(0,m.localize)(0,null)}getAriaLabel(c){return this.getDirection()==="outgoingCalls"?(0,m.localize)(1,null,c.item.name):(0,m.localize)(2,null,c.item.name)}}e.AccessibilityProvider=d}),define(Q[233],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IChatAccessibilityService=e.IQuickChatService=e.IChatWidgetService=void 0,e.IChatWidgetService=(0,t.createDecorator)("chatWidgetService"),e.IQuickChatService=(0,t.createDecorator)("quickChatService"),e.IChatAccessibilityService=(0,t.createDecorator)("chatAccessibilityService")}),define(Q[3498],Y([1,0,87,14,4,220]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChatAccessibilityService=void 0;const T=5e3,f=4e3;let v=class extends b.Disposable{constructor(S){super(),this._audioCueService=S,this._hasReceivedRequest=!1,this._register(this._runOnceScheduler=new y.RunOnceScheduler(()=>{this._hasReceivedRequest||(this._responsePendingAudioCue=this._audioCueService.playAudioCueLoop(D.AudioCue.chatResponsePending,T))},f))}acceptRequest(){this._audioCueService.playAudioCue(D.AudioCue.chatRequestSent,{allowManyInParallel:!0}),this._runOnceScheduler.schedule()}acceptResponse(S){this._hasReceivedRequest=!0;const h=typeof S!="string";this._responsePendingAudioCue?.dispose(),this._runOnceScheduler?.cancel();const a=typeof S=="string"?S:S?.response.asString();if(this._lastResponse===a||(this._audioCueService.playAudioCue(D.AudioCue.chatResponseReceived,{allowManyInParallel:!0}),this._hasReceivedRequest=!1,!S))return;const r=h&&S.errorDetails?` ${S.errorDetails.message}`:"";this._lastResponse=a,(0,t.status)(a+r)}};e.ChatAccessibilityService=v,e.ChatAccessibilityService=v=fe([O(0,D.IAudioCueService)],v)}),define(Q[1260],Y([1,0,7,207,110,4,8]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChatFollowups=void 0;const f=t.$;class v extends D.Disposable{constructor(S,h,a,r,i){super(),this.options=a,this.clickHandler=r,this.contextService=i;const s=t.append(S,f(".interactive-session-followups"));h.forEach(o=>this.renderFollowup(s,o))}renderFollowup(S,h){if(h.kind==="command"&&h.when&&!this.contextService.contextMatchesRules(T.ContextKeyExpr.deserialize(h.when)))return;const a="tooltip"in h?h.tooltip:void 0,r=this._register(new y.Button(S,{...this.options,supportIcons:!0,title:a}));h.kind==="reply"?r.element.classList.add("interactive-followup-reply"):h.kind==="command"&&r.element.classList.add("interactive-followup-command");const i=h.kind==="reply"?"$(sparkle) "+(h.title||h.message):h.title;r.label=new b.MarkdownString(i,{supportThemeIcons:!0}),this._register(r.onDidClick(()=>this.clickHandler(h)))}}e.ChatFollowups=v}),define(Q[3499],Y([1,0,6,4,9,19,46]),function(q,e,t,y,b,D,T){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.ChatEditorOptions=void 0;let v=class extends y.Disposable{static{f=this}static{this.lineHeightEm=1.4}get configuration(){return this._config}static{this.relevantSettingIds=["chat.editor.lineHeight","chat.editor.fontSize","chat.editor.fontFamily","chat.editor.fontWeight","chat.editor.wordWrap","editor.cursorBlinking","editor.fontLigatures","editor.accessibilitySupport","editor.bracketPairColorization.enabled","editor.bracketPairColorization.independentColorPoolPerBracketType"]}constructor(S,h,a,r,i,s,o){super(),this.foreground=h,this.inputEditorBackgroundColor=a,this.resultEditorBackgroundColor=r,this.configurationService=i,this.themeService=s,this.viewDescriptorService=o,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._register(this.themeService.onDidColorThemeChange(u=>this.update())),this._register(this.viewDescriptorService.onDidChangeLocation(u=>{u.views.some(d=>d.id===S)&&this.update()})),this._register(this.configurationService.onDidChangeConfiguration(u=>{f.relevantSettingIds.some(d=>u.affectsConfiguration(d))&&this.update()})),this.update()}update(){const S=this.configurationService.getValue("editor"),h=this.configurationService.getValue("chat")?.editor,a=this.configurationService.getValue("editor.accessibilitySupport");this._config={foreground:this.themeService.getColorTheme().getColor(this.foreground),inputEditor:{backgroundColor:this.themeService.getColorTheme().getColor(this.inputEditorBackgroundColor),accessibilitySupport:a},resultEditor:{backgroundColor:this.themeService.getColorTheme().getColor(this.resultEditorBackgroundColor),fontSize:h.fontSize,fontFamily:h.fontFamily==="default"?S.fontFamily:h.fontFamily,fontWeight:h.fontWeight,lineHeight:h.lineHeight?h.lineHeight:f.lineHeightEm*h.fontSize,bracketPairColorization:{enabled:this.configurationService.getValue("editor.bracketPairColorization.enabled"),independentColorPoolPerBracketType:this.configurationService.getValue("editor.bracketPairColorization.independentColorPoolPerBracketType")},wordWrap:h.wordWrap,fontLigatures:S.fontLigatures}},this._onDidChange.fire()}};e.ChatEditorOptions=v,e.ChatEditorOptions=v=f=fe([O(4,b.IConfigurationService),O(5,D.IThemeService),O(6,T.IViewDescriptorService)],v)}),define(Q[1261],Y([1,0,27,4,2626,87,1782]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlashCommandContentWidget=void 0;class T extends y.Disposable{constructor(v){super(),this._editor=v,this._domNode=document.createElement("div"),this._isVisible=!1,this._domNode.toggleAttribute("hidden",!0),this._domNode.classList.add("chat-slash-command-content-widget"),this._register(this._editor.onKeyDown(m=>this._handleKeyDown(m)))}dispose(){this._editor.removeContentWidget(this),super.dispose()}show(){this._isVisible||(this._isVisible=!0,this._domNode.toggleAttribute("hidden",!1),this._editor.addContentWidget(this))}hide(){this._isVisible=!1,this._domNode.toggleAttribute("hidden",!0),this._editor.removeContentWidget(this)}setCommandText(v){this._domNode.innerText=`/${v} `,this._lastSlashCommandText=v}getId(){return"chat-slash-command-content-widget"}getDomNode(){return this._domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[0]}}_handleKeyDown(v){if(v.keyCode!==1)return;const m=this._editor.getModel()?.getLineContent(1),S=this._editor.getSelection(),h=`/${this._lastSlashCommandText} `;!m?.startsWith(h)||!S?.isEmpty()||S?.startLineNumber!==1||S?.startColumn!==h.length+1||(this._editor.executeEdits("chat-slash-command",[{range:new t.Range(1,1,1,S.startColumn),text:null}]),D.alert((0,b.localize)(0,null,this._lastSlashCommandText)))}}e.SlashCommandContentWidget=T}),define(Q[1262],Y([1,0,80,2628,36]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.chatSlashCommandForeground=e.chatSlashCommandBackground=e.chatRequestBorder=void 0,e.chatRequestBorder=(0,b.registerColor)("chat.requestBorder",{dark:new t.Color(new t.RGBA(255,255,255,.1)),light:new t.Color(new t.RGBA(0,0,0,.1)),hcDark:null,hcLight:null},(0,y.localize)(0,null)),e.chatSlashCommandBackground=(0,b.registerColor)("chat.slashCommandBackground",{dark:b.badgeBackground,light:b.badgeBackground,hcDark:t.Color.white,hcLight:b.badgeBackground},(0,y.localize)(1,null)),e.chatSlashCommandForeground=(0,b.registerColor)("chat.slashCommandForeground",{dark:b.badgeForeground,light:b.badgeForeground,hcDark:t.Color.black,hcLight:b.badgeForeground},(0,y.localize)(2,null))}),define(Q[266],Y([1,0,2629,8]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_PROVIDER_EXISTS=e.CONTEXT_IN_CHAT_SESSION=e.CONTEXT_IN_CHAT_INPUT=e.CONTEXT_CHAT_INPUT_HAS_TEXT=e.CONTEXT_REQUEST=e.CONTEXT_RESPONSE=e.CONTEXT_CHAT_REQUEST_IN_PROGRESS=e.CONTEXT_RESPONSE_FILTERED=e.CONTEXT_RESPONSE_VOTE=e.CONTEXT_RESPONSE_HAS_PROVIDER_ID=void 0,e.CONTEXT_RESPONSE_HAS_PROVIDER_ID=new y.RawContextKey("chatSessionResponseHasProviderId",!1,{type:"boolean",description:(0,t.localize)(0,null)}),e.CONTEXT_RESPONSE_VOTE=new y.RawContextKey("chatSessionResponseVote","",{type:"string",description:(0,t.localize)(1,null)}),e.CONTEXT_RESPONSE_FILTERED=new y.RawContextKey("chatSessionResponseFiltered",!1,{type:"boolean",description:(0,t.localize)(2,null)}),e.CONTEXT_CHAT_REQUEST_IN_PROGRESS=new y.RawContextKey("chatSessionRequestInProgress",!1,{type:"boolean",description:(0,t.localize)(3,null)}),e.CONTEXT_RESPONSE=new y.RawContextKey("chatResponse",!1,{type:"boolean",description:(0,t.localize)(4,null)}),e.CONTEXT_REQUEST=new y.RawContextKey("chatRequest",!1,{type:"boolean",description:(0,t.localize)(5,null)}),e.CONTEXT_CHAT_INPUT_HAS_TEXT=new y.RawContextKey("chatInputHasText",!1,{type:"boolean",description:(0,t.localize)(6,null)}),e.CONTEXT_IN_CHAT_INPUT=new y.RawContextKey("inChatInput",!1,{type:"boolean",description:(0,t.localize)(7,null)}),e.CONTEXT_IN_CHAT_SESSION=new y.RawContextKey("inChat",!1,{type:"boolean",description:(0,t.localize)(8,null)}),e.CONTEXT_PROVIDER_EXISTS=new y.RawContextKey("hasChatProvider",!1,{type:"boolean",description:(0,t.localize)(9,null)})}),define(Q[606],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IChatContributionService=void 0,e.IChatContributionService=(0,t.createDecorator)("IChatContributionService")}),define(Q[607],Y([1,0,14,6,110,4,10,59,11]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isCompleteInteractiveProgressTreeData=e.ChatWelcomeMessageModel=e.ChatModel=e.isSerializableSessionData=e.isExportableSessionData=e.ChatResponseModel=e.Response=e.ChatRequestModel=e.isResponse=e.isRequest=void 0;function m(p){return!!p&&typeof p.message<"u"}e.isRequest=m;function S(p){return!m(p)}e.isResponse=S;class h{static{this.nextId=0}get id(){return this._id}get providerRequestId(){return this._providerRequestId}get username(){return this.session.requesterUsername}get avatarIconUri(){return this.session.requesterAvatarIconUri}constructor(c,l,n){this.session=c,this.message=l,this._providerRequestId=n,this._id="request_"+h.nextId++}setProviderRequestId(c){this._providerRequestId=c}}e.ChatRequestModel=h;class a{get onDidChangeValue(){return this._onDidChangeValue.event}get value(){return this._responseData}constructor(c){this._onDidChangeValue=new y.Emitter,this._responseData=Array.isArray(c)?c:[c],this._responseParts=Array.isArray(c)?c.map(l=>"value"in l?{string:l}:{treeData:l}):[{string:c}],this._responseRepr=this._responseParts.map(l=>d(l)?"":l.string.value).join(` `)}asString(){return this._responseRepr}updateContent(c,l){if(typeof c=="string"||(0,b.isMarkdownString)(c)){const n=this._responseParts.length-1,g=this._responseParts[n];g.isPlaceholder===!0||d(g)?this._responseParts.push({string:typeof c=="string"?new b.MarkdownString(c):c}):(0,b.isMarkdownString)(c)?this._responseParts[n]={string:new b.MarkdownString(g.string.value+c.value,c)}:this._responseParts[n]={string:new b.MarkdownString(g.string.value+c,g.string)},this._updateRepr(l)}else if("placeholder"in c){const n=this._responseParts.push({string:new b.MarkdownString(c.placeholder),isPlaceholder:!0})-1;this._updateRepr(l),c.resolvedContent?.then(g=>{typeof g=="string"?(this._responseParts[n]={string:new b.MarkdownString(g),isPlaceholder:!0},this._updateRepr(l)):g.treeData&&(this._responseParts[n]={treeData:g.treeData},this._updateRepr(l))})}else d(c)&&(this._responseParts.push(c),this._updateRepr(l))}_updateRepr(c){this._responseData=this._responseParts.map(l=>d(l)?l.treeData:l.isPlaceholder?{...l.string,isPlaceholder:!0}:l.string),this._responseRepr=this._responseParts.map(l=>d(l)?"":l.string.value).join(` `),c||this._onDidChangeValue.fire()}}e.Response=a;class r extends D.Disposable{static{this.nextId=0}get id(){return this._id}get providerResponseId(){return this._providerResponseId}get isComplete(){return this._isComplete}get isCanceled(){return this._isCanceled}get vote(){return this._vote}get followups(){return this._followups}get response(){return this._response}get errorDetails(){return this._errorDetails}get providerId(){return this.session.providerId}get username(){return this.session.responderUsername}get avatarIconUri(){return this.session.responderAvatarIconUri}constructor(c,l,n=!1,g=!1,w,E,C,I){super(),this.session=l,this._isComplete=n,this._isCanceled=g,this._vote=w,this._providerResponseId=E,this._errorDetails=C,this._followups=I,this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this._response=new a(c),this._register(this._response.onDidChangeValue(()=>this._onDidChange.fire())),this._id="response_"+r.nextId++}updateContent(c,l){this._response.updateContent(c,l)}setProviderResponseId(c){this._providerResponseId=c}setErrorDetails(c){this._errorDetails=c,this._onDidChange.fire()}complete(){this._isComplete=!0,this._onDidChange.fire()}cancel(){this._isComplete=!0,this._isCanceled=!0,this._onDidChange.fire()}setFollowups(c){this._followups=c,this._onDidChange.fire()}setVote(c){this._vote=c,this._onDidChange.fire()}}e.ChatResponseModel=r;function i(p){const c=p;return typeof c=="object"&&typeof c.providerId=="string"&&typeof c.requesterUsername=="string"&&typeof c.responderUsername=="string"}e.isExportableSessionData=i;function s(p){const c=p;return i(p)&&typeof c.creationDate=="number"&&typeof c.sessionId=="string"}e.isSerializableSessionData=s;let o=class extends D.Disposable{get session(){return this._session}get welcomeMessage(){return this._welcomeMessage}get providerState(){return this._providerState}get sessionId(){return this._sessionId}get inputPlaceholder(){return this._session?.inputPlaceholder}get requestInProgress(){const c=this._requests[this._requests.length-1];return!!c&&!!c.response&&!c.response.isComplete}get creationDate(){return this._creationDate}get requesterUsername(){return this._session?.requesterUsername??this.initialData?.requesterUsername??""}get responderUsername(){return this._session?.responderUsername??this.initialData?.responderUsername??""}get requesterAvatarIconUri(){return this._session?.requesterAvatarIconUri??this._initialRequesterAvatarIconUri}get responderAvatarIconUri(){return this._session?.responderAvatarIconUri??this._initialResponderAvatarIconUri}get isInitialized(){return this._isInitializedDeferred.isSettled}get isImported(){return this._isImported}get title(){const c=this._requests[0]?.message;return(typeof c=="string"?c:c?.message??"").split(` `)[0].substring(0,50)}constructor(c,l,n){super(),this.providerId=c,this.initialData=l,this.logService=n,this._onDidDispose=this._register(new y.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this._isInitializedDeferred=new t.DeferredPromise,this._isImported=!1,this._isImported=!!l&&!s(l)||(l?.isImported??!1),this._sessionId=s(l)&&l.sessionId||(0,f.generateUuid)(),this._requests=l?this._deserialize(l):[],this._providerState=l?l.providerState:void 0,this._creationDate=s(l)&&l.creationDate||Date.now(),this._initialRequesterAvatarIconUri=l?.requesterAvatarIconUri&&T.URI.revive(l.requesterAvatarIconUri),this._initialResponderAvatarIconUri=l?.responderAvatarIconUri&&T.URI.revive(l.responderAvatarIconUri)}_deserialize(c){const l=c.requests;if(!Array.isArray(l))return this.logService.error(`Ignoring malformed session data: ${c}`),[];if(c.welcomeMessage){const n=c.welcomeMessage.map(g=>typeof g=="string"?new b.MarkdownString(g):g);this._welcomeMessage=new u(this,n)}return l.map(n=>{const g=new h(this,n.message,n.providerRequestId);return(n.response||n.responseErrorDetails)&&(g.response=new r(n.response??[new b.MarkdownString],this,!0,n.isCanceled,n.vote,n.providerRequestId,n.responseErrorDetails,n.followups)),g})}startReinitialize(){this._session=void 0,this._isInitializedDeferred=new t.DeferredPromise}initialize(c,l){if(this._session||this._isInitializedDeferred.isSettled)throw new Error("ChatModel is already initialized");this._session=c,this._welcomeMessage||(this._welcomeMessage=l),this._isInitializedDeferred.complete(),c.onDidChangeState&&this._register(c.onDidChangeState(n=>{this._providerState=n,this.logService.trace("ChatModel#acceptNewSessionState")})),this._onDidChange.fire({kind:"initialize"})}setInitializationError(c){this._isInitializedDeferred.isSettled||this._isInitializedDeferred.error(c)}waitForInitialization(){return this._isInitializedDeferred.p}getRequests(){return this._requests}addRequest(c){if(!this._session)throw new Error("addRequest: No session");const l=new h(this,c);return l.response=new r(new b.MarkdownString(""),this),this._requests.push(l),this._onDidChange.fire({kind:"addRequest",request:l}),l}acceptResponseProgress(c,l,n){if(!this._session)throw new Error("acceptResponseProgress: No session");if(c.response||(c.response=new r(new b.MarkdownString(""),this)),c.response.isComplete)throw new Error("acceptResponseProgress: Adding progress to a completed response");"content"in l?c.response.updateContent(l.content,n):"placeholder"in l||d(l)?c.response.updateContent(l,n):(c.setProviderRequestId(l.requestId),c.response.setProviderResponseId(l.requestId))}removeRequest(c){const l=this._requests.findIndex(g=>g.providerRequestId===c),n=this._requests[l];n.providerRequestId&&l!==-1&&(this._onDidChange.fire({kind:"removeRequest",requestId:n.providerRequestId,responseId:n.response?.providerResponseId}),this._requests.splice(l,1),n.response?.dispose())}cancelRequest(c){c.response&&c.response.cancel()}setResponse(c,l){if(!this._session)throw new Error("completeResponse: No session");c.response||(c.response=new r(new b.MarkdownString(""),this)),c.response.setErrorDetails(l.errorDetails)}completeResponse(c){if(!c.response)throw new Error("Call setResponse before completeResponse");c.response.complete()}setFollowups(c,l){c.response&&c.response.setFollowups(l)}setResponseModel(c,l){c.response=l,this._onDidChange.fire({kind:"addResponse",response:l})}toExport(){return{requesterUsername:this.requesterUsername,requesterAvatarIconUri:this.requesterAvatarIconUri,responderUsername:this.responderUsername,responderAvatarIconUri:this.responderAvatarIconUri,welcomeMessage:this._welcomeMessage?.content.map(c=>Array.isArray(c)?c:c.value),requests:this._requests.map(c=>({providerRequestId:c.providerRequestId,message:typeof c.message=="string"?c.message:c.message.message,response:c.response?c.response.response.value:void 0,responseErrorDetails:c.response?.errorDetails,followups:c.response?.followups,isCanceled:c.response?.isCanceled,vote:c.response?.vote})),providerId:this.providerId,providerState:this._providerState}}toJSON(){return{...this.toExport(),sessionId:this.sessionId,creationDate:this._creationDate,isImported:this._isImported}}dispose(){this._session?.dispose?.(),this._requests.forEach(c=>c.response?.dispose()),this._onDidDispose.fire(),this._isInitializedDeferred.isSettled||this._isInitializedDeferred.error(new Error("model disposed before initialization")),super.dispose()}};e.ChatModel=o,e.ChatModel=o=fe([O(2,v.ILogService)],o);class u{static{this.nextId=0}get id(){return this._id}constructor(c,l){this.session=c,this.content=l,this._id="welcome_"+u.nextId++}get username(){return this.session.responderUsername}get avatarIconUri(){return this.session.responderAvatarIconUri}}e.ChatWelcomeMessageModel=u;function d(p){return typeof p=="object"&&!!p&&"treeData"in p}e.isCompleteInteractiveProgressTreeData=d}),define(Q[1263],Y([1,0,4,5]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChatProviderService=e.IChatProviderService=e.ChatMessageRole=void 0;var b;(function(T){T[T.System=0]="System",T[T.User=1]="User",T[T.Assistant=2]="Assistant",T[T.Function=3]="Function"})(b||(e.ChatMessageRole=b={})),e.IChatProviderService=(0,y.createDecorator)("chatProviderService");class D{constructor(){this._providers=new Map}registerChatResponseProvider(f,v){if(this._providers.has(f))throw new Error(`Chat response provider with identifier ${f} is already registered.`);return this._providers.set(f,v),(0,t.toDisposable)(()=>this._providers.delete(f))}fetchChatResponse(f,v,m,S,h){const a=this._providers.get(f);if(!a)throw new Error(`Chat response provider with identifier ${f} is not registered.`);return a.provideChatResponse(v,m,S,h)}}e.ChatProviderService=D}),define(Q[234],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IChatService=e.InteractiveSessionCopyKind=e.InteractiveSessionVoteDirection=void 0;var y;(function(D){D[D.Up=1]="Up",D[D.Down=2]="Down"})(y||(e.InteractiveSessionVoteDirection=y={}));var b;(function(D){D[D.Action=1]="Action",D[D.Toolbar=2]="Toolbar"})(b||(e.InteractiveSessionCopyKind=b={})),e.IChatService=(0,t.createDecorator)("IChatService")}),define(Q[462],Y([1,0,31,6,4,22,10,2623,163,234]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.ChatEditorInputSerializer=e.ChatUri=e.ChatEditorModel=e.ChatEditorInput=void 0;let h=class extends v.EditorInput{static{S=this}static{this.countsInUse=new Set}static{this.TypeID="workbench.input.chatSession"}static{this.EditorID="workbench.editor.chatSession"}static getNewEditorUri(){const o=Math.floor(Math.random()*1e9);return r.generate(o)}static getNextCount(){let o=0;for(;S.countsInUse.has(o);)o++;return o}constructor(o,u,d){if(super(),this.resource=o,this.options=u,this.chatService=d,typeof r.parse(o)?.handle!="number")throw new Error("Invalid chat URI");this.sessionId="sessionId"in u.target?u.target.sessionId:void 0,this.providerId="providerId"in u.target?u.target.providerId:void 0,this.inputCount=S.getNextCount(),S.countsInUse.add(this.inputCount),this._register((0,b.toDisposable)(()=>S.countsInUse.delete(this.inputCount)))}get editorId(){return S.EditorID}get capabilities(){return super.capabilities|8}matches(o){return o instanceof S&&o.resource.toString()===this.resource.toString()}get typeId(){return S.TypeID}getName(){return this.model?.title||f.localize(0,null)+(this.inputCount>0?` ${this.inputCount+1}`:"")}getLabelExtraClasses(){return["chat-editor-label"]}async resolve(){return typeof this.sessionId=="string"?this.model=this.chatService.getOrRestoreSession(this.sessionId):typeof this.providerId=="string"?this.model=this.chatService.startSession(this.providerId,t.CancellationToken.None):"data"in this.options.target&&(this.model=this.chatService.loadSessionFromContent(this.options.target.data)),this.model?(this.sessionId=this.model.sessionId,this.providerId=this.model.providerId,this._register(this.model.onDidChange(()=>this._onDidChangeLabel.fire())),this._register(new a(this.model))):null}dispose(){super.dispose(),this.sessionId&&this.chatService.clearSession(this.sessionId)}};e.ChatEditorInput=h,e.ChatEditorInput=h=S=fe([O(2,m.IChatService)],h);class a extends b.Disposable{constructor(o){super(),this.model=o,this._onWillDispose=this._register(new y.Emitter),this.onWillDispose=this._onWillDispose.event,this._isDisposed=!1,this._isResolved=!1}async resolve(){this._isResolved=!0}isResolved(){return this._isResolved}isDisposed(){return this._isDisposed}dispose(){super.dispose(),this._isDisposed=!0}}e.ChatEditorModel=a;var r;(function(s){s.scheme=D.Schemas.vscodeChatSesssion;function o(d){return T.URI.from({scheme:s.scheme,path:`chat-${d}`})}s.generate=o;function u(d){if(d.scheme!==s.scheme)return;const c=d.path.match(/chat-(\d+)/)?.[1];if(typeof c!="string")return;const l=parseInt(c);if(!isNaN(l))return{handle:l}}s.parse=u})(r||(e.ChatUri=r={}));class i{canSerialize(o){return o instanceof h}serialize(o){if(!(o instanceof h)||typeof o.sessionId!="string")return;const u={options:o.options,sessionId:o.sessionId,resource:o.resource};return JSON.stringify(u)}deserialize(o,u){try{const d=JSON.parse(u),p=T.URI.revive(d.resource);return o.createInstance(h,p,{...d.options,target:{sessionId:d.sessionId}})}catch{return}}}e.ChatEditorInputSerializer=i}),define(Q[608],Y([1,0,15,83,4,5]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChatVariablesService=e.IChatVariablesService=void 0,e.IChatVariablesService=(0,D.createDecorator)("IChatVariablesService");class T{constructor(){this._resolver=new Map}async resolveVariables(v,m,S){const h={},a=[],r=/(^|\s)@(\w+)(:\w+)?(?=\s|$|\b)/ig;let i=0;const s=[];let o;for(;o=r.exec(v);){const[u,d,p,c]=o,l=this._resolver.get(p.toLowerCase());if(l&&(!c||l.data.canTakeArgument)){s.push(v.substring(i,o.index)),s.push(""),i=o.index+u.length;const n=s.length-1,g=c?.slice(1),w=p+(c??"");a.push(l.resolver(v,g,m,S).then(E=>{E?(h[w]=E,s[n]=`${d}[@${w}](values:${w})`):s[n]=u}).catch(t.onUnexpectedExternalError))}}return s.push(v.substring(i)),await Promise.allSettled(a),{variables:h,prompt:s.join("")}}getVariables(){const v=y.Iterable.map(this._resolver.values(),m=>m.data);return y.Iterable.filter(v,m=>!m.hidden)}registerVariable(v,m){const S=v.name.toLowerCase();if(this._resolver.has(S))throw new Error(`A chat variable with the name '${v.name}' already exists.`);return this._resolver.set(S,{data:v,resolver:m}),(0,b.toDisposable)(()=>{this._resolver.delete(S)})}}e.ChatVariablesService=T}),define(Q[913],Y([1,0,6,5,24,191]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChatWidgetHistoryService=e.IChatWidgetHistoryService=void 0,e.IChatWidgetHistoryService=(0,y.createDecorator)("IChatWidgetHistoryService");let T=class{constructor(v){this._onDidClearHistory=new t.Emitter,this.onDidClearHistory=this._onDidClearHistory.event,this.memento=new D.Memento("interactive-session",v),this.viewState=this.memento.getMemento(1,1)}getHistory(v){return this.viewState.history?.[v]??[]}saveHistory(v,m){this.viewState.history||(this.viewState.history={}),this.viewState.history[v]=m,this.memento.saveMemento()}clearHistory(){this.viewState.history={},this.memento.saveMemento(),this._onDidClearHistory.fire()}};e.ChatWidgetHistoryService=T,e.ChatWidgetHistoryService=T=fe([O(0,b.IStorageService)],T)}),define(Q[1264],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.countWords=e.getNWords=void 0;const t=/[\s\|\-]/;function y(D,T){let f=T,v=0;for(;v<D.length&&f>0;){for(;v<D.length&&D[v].match(t);)v++;for(;v<D.length&&!D[v].match(t);)v++;f--}return{value:D.substring(0,v),actualWordCount:T-f,isFullString:v>=D.length}}e.getNWords=y;function b(D){return y(D,Number.MAX_SAFE_INTEGER).actualWordCount}e.countWords=b}),define(Q[418],Y([1,0,6,110,4,2632,5,11,607,1264]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChatResponseViewModel=e.ChatRequestViewModel=e.ChatViewModel=e.isWelcomeVM=e.isResponseVM=e.isRequestVM=void 0;function S(o){return!!o&&typeof o=="object"&&"message"in o}e.isRequestVM=S;function h(o){return!!o&&typeof o.setVote<"u"}e.isResponseVM=h;function a(o){return!!o&&typeof o=="object"&&"content"in o}e.isWelcomeVM=a;let r=class extends b.Disposable{get inputPlaceholder(){return this._model.inputPlaceholder}get sessionId(){return this._model.sessionId}get requestInProgress(){return this._model.requestInProgress}get providerId(){return this._model.providerId}get isInitialized(){return this._model.isInitialized}constructor(u,d){super(),this._model=u,this.instantiationService=d,this._onDidDisposeModel=this._register(new t.Emitter),this.onDidDisposeModel=this._onDidDisposeModel.event,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._items=[],u.getRequests().forEach((p,c)=>{this._items.push(new i(p)),p.response&&this.onAddResponse(p.response)}),this._register(u.onDidDispose(()=>this._onDidDisposeModel.fire())),this._register(u.onDidChange(p=>{if(p.kind==="addRequest")this._items.push(new i(p.request)),p.request.response&&this.onAddResponse(p.request.response);else if(p.kind==="addResponse")this.onAddResponse(p.response);else if(p.kind==="removeRequest"){const c=this._items.findIndex(n=>S(n)&&n.providerRequestId===p.requestId);c>=0&&this._items.splice(c,1);const l=p.responseId&&this._items.findIndex(n=>h(n)&&n.providerResponseId===p.responseId);if(typeof l=="number"&&l>=0){const g=this._items.splice(l,1)[0];h(g)&&g.dispose()}}this._onDidChange.fire(p.kind==="addRequest"?{kind:"addRequest"}:null)}))}onAddResponse(u){const d=this.instantiationService.createInstance(s,u);this._register(d.onDidChange(()=>this._onDidChange.fire(null))),this._items.push(d)}getItems(){return[...this._model.welcomeMessage?[this._model.welcomeMessage]:[],...this._items]}dispose(){super.dispose(),this._items.filter(u=>u instanceof s).forEach(u=>u.dispose())}};e.ChatViewModel=r,e.ChatViewModel=r=fe([O(1,T.IInstantiationService)],r);class i{get id(){return this._model.id}get providerRequestId(){return this._model.providerRequestId}get dataId(){return this.id+(this._model.session.isInitialized?"":"_initializing")}get sessionId(){return this._model.session.sessionId}get username(){return this._model.username}get avatarIconUri(){return this._model.avatarIconUri}get message(){return this._model.message}get messageText(){return typeof this.message=="string"?this.message:this.message.message}constructor(u){this._model=u}}e.ChatRequestViewModel=i;let s=class extends b.Disposable{get id(){return this._model.id}get dataId(){return this._model.id+`_${this._modelChangeCount}`+(this._model.session.isInitialized?"":"_initializing")}get providerId(){return this._model.providerId}get providerResponseId(){return this._model.providerResponseId}get sessionId(){return this._model.session.sessionId}get username(){return this._model.username}get avatarIconUri(){return this._model.avatarIconUri}get response(){return this._isPlaceholder?new v.Response(new y.MarkdownString((0,D.localize)(0,null)+"\u2026")):this._model.response}get isComplete(){return this._model.isComplete}get isCanceled(){return this._model.isCanceled}get isPlaceholder(){return this._isPlaceholder}get replyFollowups(){return this._model.followups?.filter(u=>u.kind==="reply")}get commandFollowups(){return this._model.followups?.filter(u=>u.kind==="command")}get errorDetails(){return this._model.errorDetails}get vote(){return this._model.vote}get contentUpdateTimings(){return this._contentUpdateTimings}constructor(u,d){super(),this._model=u,this.logService=d,this._modelChangeCount=0,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._isPlaceholder=!1,this.renderData=void 0,this._contentUpdateTimings=void 0,this._isPlaceholder=!u.response.asString()&&!u.isComplete,u.isComplete||(this._contentUpdateTimings={loadingStartTime:Date.now(),lastUpdateTime:Date.now(),wordCountAfterLastUpdate:this._isPlaceholder?0:(0,m.countWords)(u.response.asString()),impliedWordLoadRate:0}),this._register(u.onDidChange(()=>{if(this._isPlaceholder&&(u.response.value||this.isComplete)&&(this._isPlaceholder=!1),this._contentUpdateTimings){const p=Date.now(),c=(0,m.countWords)(u.response.asString()),l=p-this._contentUpdateTimings.loadingStartTime,n=c/(l/1e3),g=this.renderData?.renderedParts.reduce((w,E)=>w+="label"in E?0:E.renderedWordCount,0);this.isComplete?this.trace("onDidChange",`Done- got ${c} words over ${l}ms = ${n} words/s. ${g} words are rendered.`):(this.trace("onDidChange",`Update- got ${c} words over ${l}ms = ${n} words/s. ${g} words are rendered.`),this._contentUpdateTimings={loadingStartTime:this._contentUpdateTimings.loadingStartTime,lastUpdateTime:p,wordCountAfterLastUpdate:c,impliedWordLoadRate:n})}else this.logService.warn("ChatResponseViewModel#onDidChange: got model update but contentUpdateTimings is not initialized");this._modelChangeCount++,this._onDidChange.fire()}))}trace(u,d){this.logService.trace(`ChatResponseViewModel#${u}: ${d}`)}setVote(u){this._modelChangeCount++,this._model.setVote(u)}};e.ChatResponseViewModel=s,e.ChatResponseViewModel=s=fe([O(1,f.ILogService)],s)}),define(Q[3500],Y([1,0,6,4,456,349,259,2634,56,38,16]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionsContribution=e.editorConfiguration=void 0;const h=Object.freeze({"source.fixAll":{type:"boolean",description:f.localize(0,null)}}),a={oneOf:[{type:"object",properties:h,additionalProperties:{type:"boolean"}},{type:"array",items:{type:"string"}}],default:{},description:f.localize(1,null),scope:5};e.editorConfiguration=Object.freeze({...b.editorConfigurationBaseNode,properties:{"editor.codeActionsOnSave":a}});let r=class extends y.Disposable{constructor(s,o){super(),this._contributedCodeActions=[],this._onDidChangeContributions=this._register(new t.Emitter),s.setHandler(u=>{this._contributedCodeActions=u.map(d=>d.value).flat(),this.updateConfigurationSchema(this._contributedCodeActions),this._onDidChangeContributions.fire()}),o.registerSchemaContribution({getSchemaAdditions:()=>this.getSchemaAdditions(),onDidChange:this._onDidChangeContributions.event})}updateConfigurationSchema(s){const o={...h};for(const[u,d]of this.getSourceActions(s))o[u]={type:"boolean",description:f.localize(2,null,d.title)};a.properties=o,S.Registry.as(v.Extensions.Configuration).notifyConfigurationSchemaUpdated(e.editorConfiguration)}getSourceActions(s){const o=Object.keys(h).map(d=>new T.CodeActionKind(d)),u=new Map;for(const d of s)for(const p of d.actions){const c=new T.CodeActionKind(p.kind);T.CodeActionKind.Source.contains(c)&&!o.some(l=>l.contains(c))&&u.set(c.value,p)}return u}getSchemaAdditions(){const s=(u,d)=>({if:{required:["command"],properties:{command:{const:u}}},then:{properties:{args:{required:["kind"],properties:{kind:{anyOf:[{enum:d.map(p=>p.kind),enumDescriptions:d.map(p=>p.description??p.title)},{type:"string"}]}}}}}}),o=u=>{const d=this._contributedCodeActions.map(c=>c.actions).flat(),p=new Map;for(const c of d)!p.has(c.kind)&&u.contains(new T.CodeActionKind(c.kind))&&p.set(c.kind,c);return Array.from(p.values())};return[s(D.codeActionCommandId,o(T.CodeActionKind.Empty)),s(D.refactorCommandId,o(T.CodeActionKind.Refactor)),s(D.sourceActionCommandId,o(T.CodeActionKind.Source))]}};e.CodeActionsContribution=r,e.CodeActionsContribution=r=fe([O(1,m.IKeybindingService)],r)}),define(Q[3501],Y([1,0,4,74,259,8]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionDocumentationContribution=void 0;let T=class extends t.Disposable{constructor(v,m,S){super(),this.contextKeyService=m,this.contributions=[],this.emptyCodeActionsList={actions:[],dispose:()=>{}},this._register(S.codeActionProvider.register("*",this)),v.setHandler(h=>{this.contributions=[];for(const a of h)if(a.value.refactoring)for(const r of a.value.refactoring){const i=D.ContextKeyExpr.deserialize(r.when);i&&this.contributions.push({title:r.title,when:i,command:r.command})}})}async provideCodeActions(v,m,S,h){return this.emptyCodeActionsList}_getAdditionalMenuItems(v,m){return v.only!==b.CodeActionKind.Refactor.value&&!m.some(S=>S.kind&&b.CodeActionKind.Refactor.contains(new b.CodeActionKind(S.kind)))?[]:this.contributions.filter(S=>this.contextKeyService.contextMatchesRules(S.when)).map(S=>({id:S.command,title:S.title}))}};e.CodeActionDocumentationContribution=T,e.CodeActionDocumentationContribution=T=fe([O(1,D.IContextKeyService),O(2,y.ILanguageFeaturesService)],T)}),define(Q[1265],Y([1,0,34,4,18,48,13,8,29,5,16]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorLineNumberContextMenu=e.GutterActionsRegistry=e.GutterActionsRegistryImpl=void 0;class h{constructor(){this._registeredGutterActionsGenerators=new Set}registerGutterActionsGenerator(i){return this._registeredGutterActionsGenerators.add(i),{dispose:()=>{this._registeredGutterActionsGenerators.delete(i)}}}getGutterActionsGenerators(){return Array.from(this._registeredGutterActionsGenerators.values())}}e.GutterActionsRegistryImpl=h,S.Registry.add("gutterActionsRegistry",new h),e.GutterActionsRegistry=S.Registry.as("gutterActionsRegistry");let a=class extends y.Disposable{static{this.ID="workbench.contrib.editorLineNumberContextMenu"}constructor(i,s,o,u,d){super(),this.editor=i,this.contextMenuService=s,this.menuService=o,this.contextKeyService=u,this.instantiationService=d,this._register(this.editor.onMouseDown(p=>this.doShow(p,!1)))}show(i){this.doShow(i,!0)}doShow(i,s){const o=this.editor.getModel();if(!i.event.rightButton&&!(b.isMacintosh&&i.event.leftButton&&i.event.ctrlKey)&&!s||i.target.type!==3&&i.target.type!==2||!i.target.position||!o)return;const u=i.target.position.lineNumber,d=this.contextKeyService.createOverlay([["editorLineNumber",u]]),p=this.menuService.createMenu(T.MenuId.EditorLineNumberContext,d),c=[];this.instantiationService.invokeFunction(l=>{for(const g of e.GutterActionsRegistry.getGutterActionsGenerators()){const w=new Map;g({lineNumber:u,editor:this.editor,accessor:l},{push:(E,C="navigation")=>{const I=w.get(C)??[];I.push(E),w.set(C,I)}});for(const[E,C]of w.entries())c.push([E,C])}c.sort((g,w)=>g[0].localeCompare(w[0]));const n=p.getActions({arg:{lineNumber:u,uri:o.uri},shouldForwardArgs:!0});if(c.push(...n),i.target.type===3){const g=this.editor.getSelections(),w={startLineNumber:u,endLineNumber:u,startColumn:1,endColumn:o.getLineLength(u)+1};g?.some(C=>!C.isEmpty()&&C.intersectRanges(w)!==null)||this.editor.setSelection(w,"api")}this.contextMenuService.showContextMenu({getAnchor:()=>i.event,getActions:()=>t.Separator.join(...c.map(g=>g[1])),onHide:()=>p.dispose()})})}};e.EditorLineNumberContextMenu=a,e.EditorLineNumberContextMenu=a=fe([O(1,v.IContextMenuService),O(2,T.IMenuService),O(3,f.IContextKeyService),O(4,m.IInstantiationService)],a),(0,D.registerEditorContribution)(a.ID,a,1)}),define(Q[1266],Y([1,0,2639,7,142,14,517,711,308,77,19,33,501,87,54,229,36,1787]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.simpleFindWidgetSashBorder=e.SimpleFindWidget=void 0;const u=t.localize(0,null),d=t.localize(1,null),p=t.localize(2,null),c=t.localize(3,null),l=t.localize(4,null),n=310,g=73;class w extends b.Widget{constructor(C,I,_,A){super(),this._keybindingService=A,this._isVisible=!1,this._foundMatch=!1,this._width=0,this.state=new T.FindReplaceState,this._matchesLimit=C.matchesLimit??Number.MAX_SAFE_INTEGER,this._findInput=this._register(new v.ContextScopedFindInput(null,I,{label:u,placeholder:d,validation:R=>{if(R.length===0||!this._findInput.getRegex())return null;try{return new RegExp(R),null}catch(M){return this._foundMatch=!1,this.updateButtons(this._foundMatch),{content:M.message}}},showCommonFindToggles:C.showCommonFindToggles,appendCaseSensitiveLabel:C.appendCaseSensitiveActionId?this._getKeybinding(C.appendCaseSensitiveActionId):void 0,appendRegexLabel:C.appendRegexActionId?this._getKeybinding(C.appendRegexActionId):void 0,appendWholeWordsLabel:C.appendWholeWordsActionId?this._getKeybinding(C.appendWholeWordsActionId):void 0,showHistoryHint:()=>(0,a.showHistoryKeybindingHint)(A),inputBoxStyles:i.defaultInputBoxStyles,toggleStyles:i.defaultToggleStyles},_)),this._updateHistoryDelayer=new D.Delayer(500),this._register(this._findInput.onInput(async R=>{(!C.checkImeCompletionState||!this._findInput.isImeSessionInProgress)&&(this._foundMatch=this._onInputChanged(),C.showResultCount&&await this.updateResultCount(),this.updateButtons(this._foundMatch),this.focusFindBox(),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 f.SimpleButton({label:p+(C.previousMatchActionId?this._getKeybinding(C.previousMatchActionId):""),icon:f.findPreviousMatchIcon,onTrigger:()=>{this.find(!0)}})),this.nextBtn=this._register(new f.SimpleButton({label:c+(C.nextMatchActionId?this._getKeybinding(C.nextMatchActionId):""),icon:f.findNextMatchIcon,onTrigger:()=>{this.find(!1)}}));const k=this._register(new f.SimpleButton({label:l+(C.closeWidgetActionId?this._getKeybinding(C.closeWidgetActionId):""),icon:m.widgetClose,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(k.domNode),this._domNode=document.createElement("div"),this._domNode.classList.add("simple-find-part-wrapper"),this._domNode.appendChild(this._innerDomNode),this.onkeyup(this._innerDomNode,R=>{if(R.equals(9)){this.hide(),R.preventDefault();return}}),this._focusTracker=this._register(y.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(y.trackFocus(this._findInput.domNode)),this._register(this._findInputFocusTracker.onDidFocus(this._onFindInputFocusTrackerFocus.bind(this))),this._register(this._findInputFocusTracker.onDidBlur(this._onFindInputFocusTrackerBlur.bind(this))),this._register(y.addDisposableListener(this._innerDomNode,"click",R=>{R.stopPropagation()})),C?.showResultCount&&(this._domNode.classList.add("result-count"),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._findInput.domNode.insertAdjacentElement("afterend",this._matchesCount),this._register(this._findInput.onDidChange(async()=>{await this.updateResultCount()})),this._register(this._findInput.onDidOptionChange(async()=>{this._foundMatch=this._onInputChanged(),await this.updateResultCount(),this.focusFindBox(),this._delayedUpdateHistory()})));let L=C?.initialWidth;if(L&&(L=L<n?n:L,this._domNode.style.width=`${L}px`),C?.enableSash){const R=L??n;let M=R;const N=new s.Sash(this._innerDomNode,this,{orientation:0,size:1});this._register(N.onDidStart(()=>{M=parseFloat(y.getComputedStyle(this._domNode).width)})),this._register(N.onDidChange(P=>{const x=M+P.startX-P.currentX;x<R||(this._domNode.style.width=`${x}px`)})),this._register(N.onDidReset(P=>{parseFloat(y.getComputedStyle(this._domNode).width)===R?this._domNode.style.width="100%":this._domNode.style.width=`${R}px`}))}}getVerticalSashLeft(C){return 0}get inputValue(){return this._findInput.getValue()}get focusTracker(){return this._focusTracker}_getKeybinding(C){const I=this._keybindingService?.lookupKeybinding(C);return I?` (${I.getLabel()})`:""}dispose(){super.dispose(),this._domNode&&this._domNode.parentElement&&this._domNode.parentElement.removeChild(this._domNode)}isVisible(){return this._isVisible}getDomNode(){return this._domNode}reveal(C,I=!0){if(C&&this._findInput.setValue(C),this._isVisible){this._findInput.select();return}this._isVisible=!0,this.updateResultCount(),this.layout(),setTimeout(()=>{this._innerDomNode.classList.toggle("suppress-transition",!I),this._innerDomNode.classList.add("visible","visible-transition"),this._innerDomNode.setAttribute("aria-hidden","false"),this._findInput.select(),I||setTimeout(()=>{this._innerDomNode.classList.remove("suppress-transition")},0)},0)}show(C){C&&!this._isVisible&&this._findInput.setValue(C),this._isVisible=!0,this.layout(),setTimeout(()=>{this._innerDomNode.classList.add("visible","visible-transition"),this._innerDomNode.setAttribute("aria-hidden","false")},0)}hide(C=!0){this._isVisible&&(this._innerDomNode.classList.toggle("suppress-transition",!C),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","suppress-transition")},C?200:0))}layout(C=this._width){if(this._width=C,!!this._isVisible&&this._matchesCount){let I=!1;n+g+28>=C&&(I=!0),this._innerDomNode.classList.toggle("reduced-find-widget",I)}}_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(C){const I=this.inputValue.length>0;this.prevBtn.setEnabled(this._isVisible&&I&&C),this.nextBtn.setEnabled(this._isVisible&&I&&C)}focusFindBox(){this.nextBtn.focus(),this._findInput.inputBox.focus()}async updateResultCount(){if(!this._matchesCount){this.updateButtons(this._foundMatch);return}const C=await this._getResultCount();this._matchesCount.innerText="";const I=this.inputValue.length>0&&C?.resultCount===0;this._matchesCount.classList.toggle("no-results",I);let _="";if(C?.resultCount){let A=String(C.resultCount);C.resultCount>=this._matchesLimit&&(A+="+");let k=String(C.resultIndex+1);k==="0"&&(k="?"),_=h.format(f.NLS_MATCHES_LOCATION,k,A)}else _=f.NLS_NO_RESULTS;(0,r.status)(this._announceSearchResults(_,this.inputValue)),this._matchesCount.appendChild(document.createTextNode(_)),this._foundMatch=!!C&&C.resultCount>0,this.updateButtons(this._foundMatch)}changeState(C){this.state.change(C,!1)}_announceSearchResults(C,I){return I?C===f.NLS_NO_RESULTS?I===""?t.localize(6,null,C):t.localize(7,null,C,I):t.localize(8,null,C,I):t.localize(5,null)}}e.SimpleFindWidget=w,e.simpleFindWidgetSashBorder=(0,o.registerColor)("simpleFindWidget.sashBorder",{dark:"#454545",light:"#C8C8C8",hcDark:"#6FC3DF",hcLight:"#0F4A85"},t.localize(9,null)),(0,S.registerThemingParticipant)((E,C)=>{const I=E.getColor(e.simpleFindWidgetSashBorder);C.addRule(`.monaco-workbench .simple-find-part .monaco-sash { background-color: ${I}; border-color: ${I} }`)})}),define(Q[3502],Y([1,0,2643,55,4,48,9,23]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LargeFileOptimizationsWarner=void 0;let v=class extends b.Disposable{static{this.ID="editor.contrib.largeFileOptimizationsWarner"}constructor(S,h,a){super(),this._editor=S,this._notificationService=h,this._configurationService=a,this._register(this._editor.onDidChangeModel(r=>this._update())),this._update()}_update(){const S=this._editor.getModel();if(S&&S.isTooLargeForTokenization()){const h=t.localize(0,null,y.basename(S.uri.path));this._notificationService.prompt(f.Severity.Info,h,[{label:t.localize(1,null),run:()=>{this._configurationService.updateValue("editor.largeFileOptimizations",!1).then(()=>{this._notificationService.info(t.localize(2,null))},a=>{this._notificationService.error(a)})}}],{neverShowAgain:{id:"editor.contrib.largeFileOptimizationsWarner"}})}}};e.LargeFileOptimizationsWarner=v,e.LargeFileOptimizationsWarner=v=fe([O(1,f.INotificationService),O(2,T.IConfigurationService)],v),(0,D.registerEditorContribution)(v.ID,v,1)}),define(Q[419],Y([1,0,4,48]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuPreventer=void 0;class b extends t.Disposable{static{this.ID="editor.contrib.menuPreventer"}constructor(T){super(),this._editor=T,this._altListeningMouse=!1,this._altMouseTriggered=!1,this._register(this._editor.onMouseDown(f=>{this._altListeningMouse&&(this._altMouseTriggered=!0)})),this._register(this._editor.onKeyDown(f=>{f.equals(512)&&(this._altListeningMouse||(this._altMouseTriggered=!1),this._altListeningMouse=!0)})),this._register(this._editor.onKeyUp(f=>{f.equals(512)&&(this._altMouseTriggered&&f.preventDefault(),this._altListeningMouse=!1,this._altMouseTriggered=!1)}))}}e.MenuPreventer=b,(0,y.registerEditorContribution)(b.ID,b,2)}),define(Q[3503],Y([1,0,7,444,128,27,99,506,2645,306,9,154,19,36,14,78,37,1789,886]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentSymbolComparator=e.DocumentSymbolFilter=e.DocumentSymbolRenderer=e.DocumentSymbolGroupRenderer=e.DocumentSymbolVirtualDelegate=e.DocumentSymbolIdentityProvider=e.DocumentSymbolAccessibilityProvider=e.DocumentSymbolNavigationLabelProvider=void 0;class d{getKeyboardNavigationLabel(A){return A instanceof f.OutlineGroup?A.label:A.symbol.name}}e.DocumentSymbolNavigationLabelProvider=d;class p{constructor(A){this._ariaLabel=A}getWidgetAriaLabel(){return this._ariaLabel}getAriaLabel(A){return A instanceof f.OutlineGroup?A.label:(0,T.getAriaLabelForSymbol)(A.symbol.name,A.symbol.kind)}}e.DocumentSymbolAccessibilityProvider=p;class c{getId(A){return A.id}}e.DocumentSymbolIdentityProvider=c;class l{static{this.id="DocumentSymbolGroupTemplate"}constructor(A,k){this.labelContainer=A,this.label=k}}class n{static{this.id="DocumentSymbolTemplate"}constructor(A,k,L,R){this.container=A,this.iconLabel=k,this.iconClass=L,this.decoration=R}}class g{getHeight(A){return 22}getTemplateId(A){return A instanceof f.OutlineGroup?l.id:n.id}}e.DocumentSymbolVirtualDelegate=g;class w{constructor(){this.templateId=l.id}renderTemplate(A){const k=t.$(".outline-element-label");return A.classList.add("outline-element"),t.append(A,k),new l(k,new y.HighlightedLabel(k))}renderElement(A,k,L){L.label.set(A.element.label,(0,b.createMatches)(A.filterData))}disposeTemplate(A){}}e.DocumentSymbolGroupRenderer=w;let E=class{constructor(A,k,L){this._renderMarker=A,this._configurationService=k,this._themeService=L,this.templateId=n.id}renderTemplate(A){A.classList.add("outline-element");const k=new m.IconLabel(A,{supportHighlights:!0}),L=t.$(".outline-element-icon"),R=t.$(".outline-element-decoration");return A.prepend(L),A.appendChild(R),new n(A,k,L,R)}renderElement(A,k,L){const{element:R}=A,M=["nowrap"],N={matches:(0,b.createMatches)(A.filterData),labelEscapeNewLines:!0,extraClasses:M,title:(0,v.localize)(0,null,R.symbol.name,T.symbolKindNames[R.symbol.kind])};this._configurationService.getValue("outline.icons")&&(L.iconClass.className="",L.iconClass.classList.add("outline-element-icon","inline",...o.ThemeIcon.asClassNameArray(T.SymbolKinds.toIcon(R.symbol.kind)))),R.symbol.tags.indexOf(1)>=0&&(M.push("deprecated"),N.matches=[]),L.iconLabel.setLabel(R.symbol.name,R.symbol.detail,N),this._renderMarker&&this._renderMarkerInfo(R,L)}_renderMarkerInfo(A,k){if(!A.marker){t.hide(k.decoration),k.container.style.removeProperty("--outline-element-color");return}const{count:L,topSev:R}=A.marker,M=this._themeService.getColorTheme().getColor(R===h.MarkerSeverity.Error?r.listErrorForeground:r.listWarningForeground),N=M?M.toString():"inherit";this._configurationService.getValue("outline.problems.colors")?k.container.style.setProperty("--outline-element-color",N):k.container.style.removeProperty("--outline-element-color"),this._configurationService.getValue("outline.problems.badges")?L>0?(t.show(k.decoration),k.decoration.classList.remove("bubble"),k.decoration.innerText=L<10?L.toString():"+9",k.decoration.title=L===1?(0,v.localize)(1,null):(0,v.localize)(2,null,L),k.decoration.style.setProperty("--outline-element-color",N)):(t.show(k.decoration),k.decoration.classList.add("bubble"),k.decoration.innerText="\uEA71",k.decoration.title=(0,v.localize)(3,null),k.decoration.style.setProperty("--outline-element-color",N)):t.hide(k.decoration)}disposeTemplate(A){A.iconLabel.dispose()}};e.DocumentSymbolRenderer=E,e.DocumentSymbolRenderer=E=fe([O(1,S.IConfigurationService),O(2,a.IThemeService)],E);let C=class{static{u=this}static{this.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"})}constructor(A,k){this._prefix=A,this._textResourceConfigService=k}filter(A){const k=f.OutlineModel.get(A);if(!(A instanceof f.OutlineElement))return!0;const L=u.kindToConfigName[A.symbol.kind],R=`${this._prefix}.${L}`;return this._textResourceConfigService.getValue(k?.uri,R)}};e.DocumentSymbolFilter=C,e.DocumentSymbolFilter=C=u=fe([O(1,s.ITextResourceConfigurationService)],C);class I{constructor(){this._collator=new i.IdleValue(()=>new Intl.Collator(void 0,{numeric:!0}))}compareByPosition(A,k){return A instanceof f.OutlineGroup&&k instanceof f.OutlineGroup?A.order-k.order:A instanceof f.OutlineElement&&k instanceof f.OutlineElement?D.Range.compareRangesUsingStarts(A.symbol.range,k.symbol.range)||this._collator.value.compare(A.symbol.name,k.symbol.name):0}compareByType(A,k){return A instanceof f.OutlineGroup&&k instanceof f.OutlineGroup?A.order-k.order:A instanceof f.OutlineElement&&k instanceof f.OutlineElement?A.symbol.kind-k.symbol.kind||this._collator.value.compare(A.symbol.name,k.symbol.name):0}compareByName(A,k){return A instanceof f.OutlineGroup&&k instanceof f.OutlineGroup?A.order-k.order:A instanceof f.OutlineElement&&k instanceof f.OutlineElement?this._collator.value.compare(A.symbol.name,k.symbol.name)||D.Range.compareRangesUsingStarts(A.symbol.range,k.symbol.range):0}}e.DocumentSymbolComparator=I}),define(Q[463],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionClipboardContributionID=void 0,e.SelectionClipboardContributionID="editor.contrib.selectionClipboard"}),define(Q[3504],Y([1,0,2649,13,9,8,79,511,51,96]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleColumnSelectionAction=void 0;class S extends y.Action2{static{this.ID="editor.action.toggleColumnSelection"}constructor(){super({id:S.ID,title:{value:(0,t.localize)(0,null),mnemonicTitle:(0,t.localize)(1,null),original:"Toggle Column Selection Mode"},f1:!0,toggled:D.ContextKeyExpr.equals("config.editor.columnSelection",!0),menu:{id:y.MenuId.MenubarSelectionMenu,group:"4_config",order:2}})}async run(a){const r=a.get(b.IConfigurationService),i=a.get(T.ICodeEditorService),s=r.getValue("editor.columnSelection"),o=this._getCodeEditor(i);await r.updateValue("editor.columnSelection",!s);const u=r.getValue("editor.columnSelection");if(!o||o!==this._getCodeEditor(i)||s===u||!o.hasModel()||typeof s!="boolean"||typeof u!="boolean")return;const d=o._getViewModel();if(o.getOption(21)){const p=o.getSelection(),c=new v.Position(p.selectionStartLineNumber,p.selectionStartColumn),l=d.coordinatesConverter.convertModelPositionToViewPosition(c),n=new v.Position(p.positionLineNumber,p.positionColumn),g=d.coordinatesConverter.convertModelPositionToViewPosition(n);f.CoreNavigationCommands.MoveTo.runCoreEditorCommand(d,{position:c,viewPosition:l});const w=d.cursorConfig.visibleColumnFromColumn(d,g);f.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(d,{position:n,viewPosition:g,doColumnSelect:!0,mouseColumn:w+1})}else{const p=d.getCursorColumnSelectData(),c=d.cursorConfig.columnFromVisibleColumn(d,p.fromViewLineNumber,p.fromViewVisualColumn),l=d.coordinatesConverter.convertViewPositionToModelPosition(new v.Position(p.fromViewLineNumber,c)),n=d.cursorConfig.columnFromVisibleColumn(d,p.toViewLineNumber,p.toViewVisualColumn),g=d.coordinatesConverter.convertViewPositionToModelPosition(new v.Position(p.toViewLineNumber,n));o.setSelection(new m.Selection(l.lineNumber,l.column,g.lineNumber,g.column))}}_getCodeEditor(a){const r=a.getFocusedCodeEditor();return r||a.getActiveCodeEditor()}}e.ToggleColumnSelectionAction=S,(0,y.registerAction2)(S)}),define(Q[3505],Y([1,0,2650,13,9,8,81]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMinimapAction=void 0;class f extends y.Action2{static{this.ID="editor.action.toggleMinimap"}constructor(){super({id:f.ID,title:{value:(0,t.localize)(0,null),original:"Toggle Minimap",mnemonicTitle:(0,t.localize)(1,null)},category:T.Categories.View,f1:!0,toggled:D.ContextKeyExpr.equals("config.editor.minimap.enabled",!0),menu:{id:y.MenuId.MenubarAppearanceMenu,group:"4_editor",order:1}})}async run(m){const S=m.get(b.IConfigurationService),h=!S.getValue("editor.minimap.enabled");return S.updateValue("editor.minimap.enabled",h)}}e.ToggleMinimapAction=f,(0,y.registerAction2)(f)}),define(Q[3506],Y([1,0,2652,13,9,8,81]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleRenderControlCharacterAction=void 0;class f extends y.Action2{static{this.ID="editor.action.toggleRenderControlCharacter"}constructor(){super({id:f.ID,title:{value:(0,t.localize)(0,null),mnemonicTitle:(0,t.localize)(1,null),original:"Toggle Control Characters"},category:T.Categories.View,f1:!0,toggled:D.ContextKeyExpr.equals("config.editor.renderControlCharacters",!0),menu:{id:y.MenuId.MenubarAppearanceMenu,group:"4_editor",order:5}})}run(m){const S=m.get(b.IConfigurationService),h=!S.getValue("editor.renderControlCharacters");return S.updateValue("editor.renderControlCharacters",h)}}e.ToggleRenderControlCharacterAction=f,(0,y.registerAction2)(f)}),define(Q[3507],Y([1,0,2653,13,9,8,81]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class f extends y.Action2{static{this.ID="editor.action.toggleRenderWhitespace"}constructor(){super({id:f.ID,title:{value:(0,t.localize)(0,null),mnemonicTitle:(0,t.localize)(1,null),original:"Toggle Render Whitespace"},category:T.Categories.View,f1:!0,toggled:D.ContextKeyExpr.notEquals("config.editor.renderWhitespace","none"),menu:{id:y.MenuId.MenubarAppearanceMenu,group:"4_editor",order:4}})}run(m){const S=m.get(b.IConfigurationService),h=S.getValue("editor.renderWhitespace");let a;return h==="none"?a="all":a="none",S.updateValue("editor.renderWhitespace",a)}}(0,y.registerAction2)(f)}),define(Q[3508],Y([1,0,48,79,898,9,8,5,23,24]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchReferencesController=void 0;let S=class extends b.ReferencesController{constructor(a,r,i,s,o,u,d){super(!1,a,r,i,s,o,u,d)}};e.WorkbenchReferencesController=S,e.WorkbenchReferencesController=S=fe([O(1,T.IContextKeyService),O(2,y.ICodeEditorService),O(3,v.INotificationService),O(4,f.IInstantiationService),O(5,m.IStorageService),O(6,D.IConfigurationService)],S),(0,t.registerEditorContribution)(b.ReferencesController.ID,S,4)}),define(Q[3509],Y([1,0,113,18]),function(q,e,t,y){"use strict";if(Object.defineProperty(e,"__esModule",{value:!0}),y.isMacintosh){let b=function(D){return()=>{document.execCommand(D)}};t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"execCut",primary:2102,handler:b("cut"),weight:0,when:void 0}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"execCopy",primary:2081,handler:b("copy"),weight:0,when:void 0}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"execPaste",primary:2100,handler:b("paste"),weight:0,when:void 0})}}),define(Q[3510],Y([1,0,2658,13,28,11,23]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class f extends y.Action2{constructor(){super({id:"runCommands",title:{value:t.localize(0,null),original:"Run Commands"},f1:!1,description:{description:t.localize(1,null),args:[{name:"args",schema:{type:"object",required:["commands"],properties:{commands:{type:"array",description:t.localize(2,null),items:{anyOf:[{$ref:"vscode://schemas/keybindings#/definitions/commandNames"},{type:"string"},{type:"object",required:["command"],properties:{command:{anyOf:[{$ref:"vscode://schemas/keybindings#/definitions/commandNames"},{type:"string"}]}},$ref:"vscode://schemas/keybindings#/definitions/commandsSchemas"}]}}}}}]}})}async run(m,S){const h=m.get(T.INotificationService);if(!this._isCommandArgs(S)){h.error(t.localize(3,null));return}if(S.commands.length===0){h.warn(t.localize(4,null));return}const a=m.get(b.ICommandService),r=m.get(D.ILogService);let i=0;try{for(;i<S.commands.length;++i){const s=S.commands[i];r.debug(`runCommands: executing ${i}-th command: ${JSON.stringify(s)}`);const o=await this._runCommand(a,s);r.debug(`runCommands: executed ${i}-th command with return value: ${JSON.stringify(o)}`)}}catch(s){r.debug(`runCommands: executing ${i}-th command resulted in an error: ${s instanceof Error?s.message:JSON.stringify(s)}`),h.error(s)}}_isCommandArgs(m){if(!m||typeof m!="object"||!("commands"in m)||!Array.isArray(m.commands))return!1;for(const S of m.commands)if(typeof S!="string"&&!(typeof S=="object"&&typeof S.command=="string"))return!1;return!0}_runCommand(m,S){let h,a;return typeof S=="string"?h=S:(h=S.command,a=S.args),a===void 0?m.executeCommand(h):Array.isArray(a)?m.executeCommand(h,...a):m.executeCommand(h,a)}}(0,y.registerAction2)(f)}),define(Q[914],Y([1,0,99,2659,36]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCommentThreadStateIconColor=e.getCommentThreadStateBorderColor=e.commentThreadStateBackgroundColorVar=e.commentViewThreadStateColorVar=e.commentThreadStateColorVar=e.commentThreadRangeActiveBackground=e.commentThreadRangeBackground=void 0;const D=(0,b.registerColor)("commentsView.resolvedIcon",{dark:b.disabledForeground,light:b.disabledForeground,hcDark:b.contrastBorder,hcLight:b.contrastBorder},y.localize(0,null)),T=(0,b.registerColor)("commentsView.unresolvedIcon",{dark:b.listFocusOutline,light:b.listFocusOutline,hcDark:b.contrastBorder,hcLight:b.contrastBorder},y.localize(1,null)),f=(0,b.registerColor)("editorCommentsWidget.resolvedBorder",{dark:D,light:D,hcDark:b.contrastBorder,hcLight:b.contrastBorder},y.localize(2,null)),v=(0,b.registerColor)("editorCommentsWidget.unresolvedBorder",{dark:T,light:T,hcDark:b.contrastBorder,hcLight:b.contrastBorder},y.localize(3,null));e.commentThreadRangeBackground=(0,b.registerColor)("editorCommentsWidget.rangeBackground",{dark:(0,b.transparent)(v,.1),light:(0,b.transparent)(v,.1),hcDark:(0,b.transparent)(v,.1),hcLight:(0,b.transparent)(v,.1)},y.localize(4,null)),e.commentThreadRangeActiveBackground=(0,b.registerColor)("editorCommentsWidget.rangeActiveBackground",{dark:(0,b.transparent)(v,.1),light:(0,b.transparent)(v,.1),hcDark:(0,b.transparent)(v,.1),hcLight:(0,b.transparent)(v,.1)},y.localize(5,null));const m=new Map([[t.CommentThreadState.Unresolved,v],[t.CommentThreadState.Resolved,f]]),S=new Map([[t.CommentThreadState.Unresolved,T],[t.CommentThreadState.Resolved,D]]);e.commentThreadStateColorVar="--comment-thread-state-color",e.commentViewThreadStateColorVar="--comment-view-thread-state-color",e.commentThreadStateBackgroundColorVar="--comment-thread-state-background-color";function h(i,s,o){const u=i!==void 0?o.get(i):void 0;return u!==void 0?s.getColor(u):void 0}function a(i,s){return h(i,s,m)}e.getCommentThreadStateBorderColor=a;function r(i,s){return h(i,s,S)}e.getCommentThreadStateIconColor=r}),define(Q[915],Y([1,0,207,4,54]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentFormActions=void 0;class D{constructor(f,v,m){this.container=f,this.actionHandler=v,this.maxActions=m,this._buttonElements=[],this._toDispose=new y.DisposableStore,this._actions=[]}setActions(f,v=!1){this._toDispose.clear(),this._buttonElements.forEach(h=>h.remove()),this._buttonElements=[];const m=f.getActions({shouldForwardArgs:!0});let S=!v;for(const h of m){const[,a]=h;this._actions=a;for(const r of a){const i=new t.Button(this.container,{secondary:!S,...b.defaultButtonStyles});if(S=!1,this._buttonElements.push(i.element),this._toDispose.add(i),this._toDispose.add(i.onDidClick(()=>this.actionHandler(r))),i.enabled=r.enabled,i.label=r.label,this.maxActions!==void 0&&this._buttonElements.length>=this.maxActions){console.warn("An extension has contributed more than the allowable number of actions to a comments menu.");return}}}}triggerDefaultAction(){if(this._actions.length){const f=this._actions[0];if(f.enabled)return this.actionHandler(f)}}dispose(){this._toDispose.dispose()}}e.CommentFormActions=D}),define(Q[1267],Y([1,0,2660,80,137,98,36,19,99]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentGlyphWidget=e.overviewRulerCommentingRangeForeground=void 0,e.overviewRulerCommentingRangeForeground=(0,T.registerColor)("editorGutter.commentRangeForeground",{dark:(0,T.opaque)(T.listInactiveSelectionBackground,T.editorBackground),light:(0,T.darken)((0,T.opaque)(T.listInactiveSelectionBackground,T.editorBackground),.05),hcDark:y.Color.white,hcLight:y.Color.black},t.localize(0,null));const m=(0,T.registerColor)("editorOverviewRuler.commentForeground",{dark:e.overviewRulerCommentingRangeForeground,light:e.overviewRulerCommentingRangeForeground,hcDark:e.overviewRulerCommentingRangeForeground,hcLight:e.overviewRulerCommentingRangeForeground},t.localize(1,null)),S=(0,T.registerColor)("editorOverviewRuler.commentUnresolvedForeground",{dark:m,light:m,hcDark:m,hcLight:m},t.localize(2,null)),h=(0,T.registerColor)("editorGutter.commentGlyphForeground",{dark:T.editorForeground,light:T.editorForeground,hcDark:y.Color.black,hcLight:y.Color.white},t.localize(3,null));(0,T.registerColor)("editorGutter.commentUnresolvedGlyphForeground",{dark:h,light:h,hcDark:h,hcLight:h},t.localize(4,null));class a{static{this.description="comment-glyph-widget"}constructor(i,s){this._commentsOptions=this.createDecorationOptions(),this._editor=i,this._commentsDecorations=this._editor.createDecorationsCollection(),this.setLineNumber(s)}createDecorationOptions(){const i=this._threadState===v.CommentThreadState.Unresolved,s={description:a.description,isWholeLine:!0,overviewRuler:{color:(0,f.themeColorFromId)(i?S:m),position:b.OverviewRulerLane.Center},collapseOnReplaceEdit:!0,linesDecorationsClassName:`comment-range-glyph comment-thread${i?"-unresolved":""}`};return D.ModelDecorationOptions.createDynamic(s)}setThreadState(i){this._threadState!==i&&(this._threadState=i,this._commentsOptions=this.createDecorationOptions(),this._updateDecorations())}_updateDecorations(){const i=[{range:{startLineNumber:this._lineNumber,startColumn:1,endLineNumber:this._lineNumber,endColumn:1},options:this._commentsOptions}];this._commentsDecorations.set(i)}setLineNumber(i){this._lineNumber=i,this._updateDecorations()}getPosition(){const i=this._commentsDecorations.length>0?this._commentsDecorations.getRange(0):null;return{position:{lineNumber:i?i.endLineNumber:this._lineNumber,column:1},preference:[0]}}dispose(){this._commentsDecorations.clear()}}e.CommentGlyphWidget=a}),define(Q[3511],Y([1,0,13,88]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentMenus=void 0;let b=class{constructor(T){this.menuService=T}getCommentThreadTitleActions(T){return this.getMenu(t.MenuId.CommentThreadTitle,T)}getCommentThreadActions(T){return this.getMenu(t.MenuId.CommentThreadActions,T)}getCommentEditorActions(T){return this.getMenu(t.MenuId.CommentEditorActions,T)}getCommentThreadAdditionalActions(T){return this.getMenu(t.MenuId.CommentThreadAdditionalActions,T)}getCommentTitleActions(T,f){return this.getMenu(t.MenuId.CommentTitle,f)}getCommentActions(T,f){return this.getMenu(t.MenuId.CommentActions,f)}getCommentThreadTitleContextActions(T){return this.getMenu(t.MenuId.CommentThreadTitleContext,T)}getMenu(T,f){const v=this.menuService.createMenu(T,f),h={primary:[],secondary:[]};return(0,y.createAndFillInContextMenuActions)(v,{shouldForwardArgs:!0},h,"inline"),v}dispose(){}};e.CommentMenus=b,e.CommentMenus=b=fe([O(0,t.IMenuService)],b)}),define(Q[3512],Y([1,0,7,4,915]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentThreadAdditionalActions=void 0;class D extends y.Disposable{constructor(f,v,m,S,h){super(),this._commentThread=v,this._contextKeyService=m,this._commentMenus=S,this._actionRunDelegate=h,this._container=t.append(f,t.$(".comment-additional-actions")),t.append(this._container,t.$(".section-separator")),this._buttonBar=t.append(this._container,t.$(".button-bar")),this._createAdditionalActions(this._buttonBar)}_showMenu(){this._container?.classList.remove("hidden")}_hideMenu(){this._container?.classList.add("hidden")}_enableDisableMenu(f){const v=f.getActions({shouldForwardArgs:!0});for(const m of v){const[,S]=m;for(const h of S){if(h.enabled){this._showMenu();return}for(const a of h.actions??[])if(a.enabled){this._showMenu();return}}}this._hideMenu()}_createAdditionalActions(f){const v=this._commentMenus.getCommentThreadAdditionalActions(this._contextKeyService);this._register(v),this._register(v.onDidChange(()=>{this._commentFormActions.setActions(v,!0),this._enableDisableMenu(v)})),this._commentFormActions=new b.CommentFormActions(f,async m=>{this._actionRunDelegate?.(),m.run({thread:this._commentThread,$mid:8})},4),this._register(this._commentFormActions),this._commentFormActions.setActions(v,!0),this._enableDisableMenu(v)}}e.CommentThreadAdditionalActions=D}),define(Q[3513],Y([1,0,7,85,34,32,4,33,2665,88,77,37,129]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentThreadHeader=void 0;const r=(0,S.registerIcon)("review-comment-collapse",D.Codicon.chevronUp,v.localize(0,null)),i="expand-review-action "+h.ThemeIcon.asClassName(r);class s extends T.Disposable{constructor(u,d,p,c,l,n,g){super(),this._delegate=d,this._commentMenus=p,this._commentThread=c,this._contextKeyService=l,this.instantiationService=n,this._contextMenuService=g,this._headElement=t.$(".head"),u.appendChild(this._headElement),this._fillHead()}_fillHead(){const u=t.append(this._headElement,t.$(".review-title"));this._headingLabel=t.append(u,t.$("span.filename")),this.createThreadLabel();const d=t.append(this._headElement,t.$(".review-actions"));this._actionbarWidget=new y.ActionBar(d,{actionViewItemProvider:m.createActionViewItem.bind(void 0,this.instantiationService)}),this._register(this._actionbarWidget),this._collapseAction=new b.Action("review.expand",v.localize(1,null),i,!0,()=>this._delegate.collapse());const p=this._commentMenus.getCommentThreadTitleActions(this._contextKeyService);this.setActionBarActions(p),this._register(p),this._register(p.onDidChange(c=>{this.setActionBarActions(p)})),this._register(t.addDisposableListener(this._headElement,t.EventType.CONTEXT_MENU,c=>this.onContextMenu(c))),this._actionbarWidget.context=this._commentThread}setActionBarActions(u){const d=u.getActions({shouldForwardArgs:!0}).reduce((p,[,c])=>[...p,...c],[]);this._actionbarWidget.clear(),this._actionbarWidget.push([...d,this._collapseAction],{label:!1,icon:!0})}updateCommentThread(u){this._commentThread=u,this._actionbarWidget.context=this._commentThread,this.createThreadLabel()}createThreadLabel(){let u;u=this._commentThread.label,u===void 0&&(this._commentThread.comments&&this._commentThread.comments.length||(u=v.localize(2,null))),u&&(this._headingLabel.textContent=f.escape(u),this._headingLabel.setAttribute("aria-label",u))}updateHeight(u){this._headElement.style.height=`${u}px`,this._headElement.style.lineHeight=this._headElement.style.height}onContextMenu(u){const d=this._commentMenus.getCommentThreadTitleContextActions(this._contextKeyService).getActions({shouldForwardArgs:!0}).map(c=>c[1]).flat();if(!d.length)return;const p=new a.StandardMouseEvent(u);this._contextMenuService.showContextMenu({getAnchor:()=>p,getActions:()=>d,actionRunner:new b.ActionRunner,getActionsContext:()=>({commentControlHandle:this._commentThread.controllerHandle,commentThreadHandle:this._commentThread.commentThreadHandle,$mid:7})})}}e.CommentThreadHeader=s}),define(Q[3514],Y([1,0,4,99,98]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentThreadRangeDecorator=void 0;class D{get id(){return this._decorationId}set id(v){this._decorationId=v}constructor(v,m){this.range=v,this.options=m}}class T extends t.Disposable{static{this.description="comment-thread-range-decorator"}constructor(v){super(),this.decorationIds=[],this.activeDecorationIds=[],this.threadCollapseStateListeners=[];const m={description:T.description,isWholeLine:!1,zIndex:20,className:"comment-thread-range",shouldFillLineOnLineBreak:!0};this.decorationOptions=b.ModelDecorationOptions.createDynamic(m);const S={description:T.description,isWholeLine:!1,zIndex:20,className:"comment-thread-range-current",shouldFillLineOnLineBreak:!0};this.activeDecorationOptions=b.ModelDecorationOptions.createDynamic(S),this._register(v.onDidChangeCurrentCommentThread(h=>{this.updateCurrent(h)})),this._register(v.onDidUpdateCommentThreads(()=>{this.updateCurrent(void 0)}))}updateCurrent(v){if(!this.editor||v?.resource&&v.resource?.toString()!==this.editor.getModel()?.uri.toString())return;this.currentThreadCollapseStateListener?.dispose();const m=[];if(v){const S=v.range;S&&!(S.startLineNumber===S.endLineNumber&&S.startColumn===S.endColumn)&&v.collapsibleState===y.CommentThreadCollapsibleState.Expanded&&(this.currentThreadCollapseStateListener=v.onDidChangeCollapsibleState(h=>{h===y.CommentThreadCollapsibleState.Collapsed&&this.updateCurrent(void 0)}),m.push(new D(S,this.activeDecorationOptions)))}this.editor.changeDecorations(S=>{this.activeDecorationIds=S.deltaDecorations(this.activeDecorationIds,m),m.forEach((h,a)=>h.id=this.decorationIds[a])})}update(v,m){const S=v?.getModel();if(!v||!S)return;(0,t.dispose)(this.threadCollapseStateListeners),this.editor=v;const h=[];for(const a of m)a.threads.forEach(r=>{if(r.isDisposed)return;const i=r.range;!i||i.startLineNumber===i.endLineNumber&&i.startColumn===i.endColumn||(this.threadCollapseStateListeners.push(r.onDidChangeCollapsibleState(()=>{this.update(v,m)})),r.collapsibleState!==y.CommentThreadCollapsibleState.Collapsed&&h.push(new D(i,this.decorationOptions)))});v.changeDecorations(a=>{this.decorationIds=a.deltaDecorations(this.decorationIds,h),h.forEach((r,i)=>r.id=this.decorationIds[i])})}dispose(){(0,t.dispose)(this.threadCollapseStateListeners),this.currentThreadCollapseStateListener?.dispose(),super.dispose()}}e.CommentThreadRangeDecorator=T}),define(Q[1268],Y([1,0,8]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentsViewFilterFocusContextKey=void 0,e.CommentsViewFilterFocusContextKey=new t.RawContextKey("commentsFilterFocus",!1)}),define(Q[1269],Y([1,0,128,33]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilterOptions=void 0;class b{static{this._filter=t.matchesFuzzy2}static{this._messageFilter=t.matchesFuzzy}constructor(T,f,v){this.filter=T,this.showResolved=!0,this.showUnresolved=!0,T=T.trim(),this.showResolved=f,this.showUnresolved=v;const m=T.startsWith("!");this.textFilter={text:(m?y.ltrim(T,"!"):T).trim(),negate:m}}}e.FilterOptions=b}),define(Q[3515],Y([1,0,2672,7,34,10,157]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReactionAction=e.ReactionActionViewItem=e.ToggleReactionsAction=void 0;class f extends b.Action{static{this.ID="toolbar.toggle.pickReactions"}constructor(h,a){super(f.ID,a||t.localize(0,null),"toggle-reactions",!0),this._menuActions=[],this.toggleDropdownMenu=h}run(){return this.toggleDropdownMenu(),Promise.resolve(!0)}get menuActions(){return this._menuActions}set menuActions(h){this._menuActions=h}}e.ToggleReactionsAction=f;class v extends T.ActionViewItem{constructor(h){super(null,h,{})}updateLabel(){if(!this.label)return;const h=this.action;if(h.class&&this.label.classList.add(h.class),h.icon){const a=y.append(this.label,y.$(".reaction-icon")),r=D.URI.revive(h.icon);a.style.backgroundImage=y.asCSSUrl(r),a.title=h.label}else{const a=y.append(this.label,y.$("span.reaction-label"));a.innerText=h.label}if(h.count){const a=y.append(this.label,y.$("span.reaction-count"));a.innerText=`${h.count}`}}getTooltip(){const h=this.action,a=h.enabled?t.localize(1,null):"";if(h.count===void 0)return t.localize(2,null,a,h.label);if(h.count===1)return t.localize(3,null,a,h.label);if(h.count>1)return t.localize(4,null,a,h.count,h.label)}}e.ReactionActionViewItem=v;class m extends b.Action{static{this.ID="toolbar.toggle.reaction"}constructor(h,a="",r="",i=!0,s,o,u){super(m.ID,a,r,i,s),this.icon=o,this.count=u}}e.ReactionAction=m}),define(Q[723],Y([1,0,2673,8]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentContextKeys=void 0;var b;(function(D){D.commentThreadIsEmpty=new y.RawContextKey("commentThreadIsEmpty",!1,{type:"boolean",description:t.localize(0,null)}),D.commentIsEmpty=new y.RawContextKey("commentIsEmpty",!1,{type:"boolean",description:t.localize(1,null)}),D.commentContext=new y.RawContextKey("comment",void 0,{type:"string",description:t.localize(2,null)}),D.commentThreadContext=new y.RawContextKey("commentThread",void 0,{type:"string",description:t.localize(3,null)}),D.commentControllerContext=new y.RawContextKey("commentController",void 0,{type:"string",description:t.localize(4,null)})})(b||(e.CommentContextKeys=b={}))}),define(Q[1270],Y([1,0,10,20,2674]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentsModel=e.ResourceWithCommentThreads=e.CommentNode=void 0;class D{constructor(m,S,h,a,r,i){this.replies=[],this.owner=m,this.threadId=S,this.comment=a,this.resource=h,this.range=r,this.isRoot=!1,this.threadState=i}hasReply(){return this.replies&&this.replies.length!==0}}e.CommentNode=D;class T{constructor(m,S,h){this.owner=m,this.id=S.toString(),this.resource=S,this.commentThreads=h.filter(a=>a.comments&&a.comments.length).map(a=>T.createCommentNode(m,S,a))}static createCommentNode(m,S,h){const{threadId:a,comments:r,range:i}=h,s=r.map(o=>new D(m,a,S,o,i,h.state));return s.length>1&&(s[0].replies=s.slice(1,s.length)),s[0].isRoot=!0,s[0]}}e.ResourceWithCommentThreads=T;class f{constructor(){this.resourceCommentThreads=[],this.commentThreadsMap=new Map}updateResourceCommentThreads(){this.resourceCommentThreads=[...this.commentThreadsMap.values()].flat(),this.resourceCommentThreads.sort((m,S)=>m.resource.toString()>S.resource.toString()?1:-1)}setCommentThreads(m,S){this.commentThreadsMap.set(m,this.groupByResource(m,S)),this.updateResourceCommentThreads()}deleteCommentsByOwner(m){m?this.commentThreadsMap.set(m,[]):this.commentThreadsMap.clear(),this.updateResourceCommentThreads()}updateCommentThreads(m){const{owner:S,removed:h,changed:a,added:r}=m,i=this.commentThreadsMap.get(S)||[];return h.forEach(s=>{const o=i.findIndex(p=>p.id===s.resource),u=o>=0?i[o]:void 0,d=u?.commentThreads.findIndex(p=>p.threadId===s.threadId)??0;d>=0&&u?.commentThreads.splice(d,1),u?.commentThreads.length===0&&i.splice(o,1)}),a.forEach(s=>{const o=i.findIndex(p=>p.id===s.resource),u=i[o],d=u.commentThreads.findIndex(p=>p.threadId===s.threadId);d>=0?u.commentThreads[d]=T.createCommentNode(S,t.URI.parse(u.id),s):s.comments&&s.comments.length&&u.commentThreads.push(T.createCommentNode(S,t.URI.parse(u.id),s))}),r.forEach(s=>{const o=i.filter(u=>u.resource.toString()===s.resource);if(o.length){const u=o[0];s.comments&&s.comments.length&&u.commentThreads.push(T.createCommentNode(S,u.resource,s))}else i.push(new T(S,t.URI.parse(s.resource),[s]))}),this.commentThreadsMap.set(S,i),this.updateResourceCommentThreads(),h.length>0||a.length>0||r.length>0}hasCommentThreads(){return!!this.resourceCommentThreads.length}getMessage(){return this.resourceCommentThreads.length?"":(0,b.localize)(0,null)}groupByResource(m,S){const h=[],a=new Map;for(const r of(0,y.groupBy)(S,f._compareURIs))a.set(r[0].resource,new T(m,t.URI.parse(r[0].resource),r));return a.forEach((r,i,s)=>{h.push(r)}),h}static _compareURIs(m,S){const h=m.resource.toString(),a=S.resource.toString();return h<a?-1:h>a?1:0}}e.CommentsModel=f}),define(Q[724],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COMMENTS_SECTION=void 0,e.COMMENTS_SECTION="comments"}),define(Q[1271],Y([1,0,7,260,4,18,724]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampWidget=void 0;class f extends b.Disposable{constructor(m,S,h){super(),this.configurationService=m,this._date=t.append(S,t.$("span.timestamp")),this._date.style.display="none",this._useRelativeTime=this.useRelativeTimeSetting,this.setTimestamp(h)}get useRelativeTimeSetting(){return this.configurationService.getValue(T.COMMENTS_SECTION).useRelativeTime}async setTimestamp(m){(m!==this._timestamp||this.useRelativeTimeSetting!==this._useRelativeTime)&&this.updateDate(m),this._timestamp=m,this._useRelativeTime=this.useRelativeTimeSetting}updateDate(m){if(!m)this._date.textContent="",this._date.style.display="none";else if(m!==this._timestamp||this.useRelativeTimeSetting!==this._useRelativeTime){this._date.style.display="";let S,h;this.useRelativeTimeSetting?(S=this.getRelative(m),h=this.getDateString(m)):S=this.getDateString(m),this._date.textContent=S,h&&(this._date.title=h)}}getRelative(m){return(0,y.fromNow)(m,!0,!0)}getDateString(m){return m.toLocaleString(D.language)}}e.TimestampWidget=f}),define(Q[725],Y([1,0,7,2669,217,4,41,1270,9,8,90,19,5,1271,32,37,914,99,1269,26,209]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentsList=e.Filter=e.CommentNodeRenderer=e.ResourceWithCommentsRenderer=e.COMMENTS_VIEW_TITLE=e.COMMENTS_VIEW_STORAGE_ID=e.COMMENTS_VIEW_ID=void 0,e.COMMENTS_VIEW_ID="workbench.panel.comments",e.COMMENTS_VIEW_STORAGE_ID="Comments",e.COMMENTS_VIEW_TITLE=y.localize(0,null);class l{static{this.RESOURCE_ID="resource-with-comments"}static{this.COMMENT_ID="comment-node"}getHeight(_){return _ instanceof f.CommentNode&&_.hasReply()?44:22}getTemplateId(_){return _ instanceof f.ResourceWithCommentThreads?l.RESOURCE_ID:_ instanceof f.CommentNode?l.COMMENT_ID:""}}class n{constructor(_){this.labels=_,this.templateId="resource-with-comments"}renderTemplate(_){const A=t.append(_,t.$(".resource-container"));return{resourceLabel:this.labels.create(A)}}renderElement(_,A,k,L){k.resourceLabel.setFile(_.element.resource)}disposeTemplate(_){_.resourceLabel.dispose()}}e.ResourceWithCommentsRenderer=n;let g=class{constructor(_,A,k){this.openerService=_,this.configurationService=A,this.themeService=k,this.templateId="comment-node"}renderTemplate(_){const A=t.append(_,t.$(".comment-thread-container")),k=t.append(A,t.$(".comment-metadata-container")),L={icon:t.append(k,t.$(".icon")),userNames:t.append(k,t.$(".user")),timestamp:new r.TimestampWidget(this.configurationService,t.append(k,t.$(".timestamp-container"))),separator:t.append(k,t.$(".separator")),commentPreview:t.append(k,t.$(".text")),range:t.append(k,t.$(".range"))};L.separator.innerText="\xB7";const R=t.append(A,t.$(".comment-snippet-container")),M={container:R,icon:t.append(R,t.$(".icon")),count:t.append(R,t.$(".count")),lastReplyDetail:t.append(R,t.$(".reply-detail")),separator:t.append(R,t.$(".separator")),timestamp:new r.TimestampWidget(this.configurationService,t.append(R,t.$(".timestamp-container")))};M.separator.innerText="\xB7",M.icon.classList.add(...s.ThemeIcon.asClassNameArray(i.Codicon.indent));const N=[L.timestamp,M.timestamp];return{threadMetadata:L,repliesMetadata:M,disposables:N}}getCountString(_){return _>1?y.localize(1,null,_):y.localize(2,null)}getRenderedComment(_,A){const k=(0,b.renderMarkdown)(_,{inline:!0,actionHandler:{callback:R=>(0,c.openLinkFromMarkdown)(this.openerService,R,_.isTrusted),disposables:A}}),L=k.element.getElementsByTagName("img");for(let R=0;R<L.length;R++){const M=L[R],N=t.$("");N.textContent=M.alt?y.localize(3,null,M.alt):y.localize(4,null),M.parentNode.replaceChild(N,M)}return k}getIcon(_){return _===u.CommentThreadState.Unresolved?i.Codicon.commentUnresolved:i.Codicon.comment}renderElement(_,A,k,L){const R=_.element.replies.length+1;if(k.threadMetadata.icon.classList.remove(...Array.from(k.threadMetadata.icon.classList.values()).filter(P=>P.startsWith("codicon"))),k.threadMetadata.icon.classList.add(...s.ThemeIcon.asClassNameArray(this.getIcon(_.element.threadState))),_.element.threadState!==void 0){const P=this.getCommentThreadWidgetStateColor(_.element.threadState,this.themeService.getColorTheme());k.threadMetadata.icon.style.setProperty(o.commentViewThreadStateColorVar,`${P}`),k.threadMetadata.icon.style.color=`var(${o.commentViewThreadStateColorVar})`}k.threadMetadata.userNames.textContent=_.element.comment.userName,k.threadMetadata.timestamp.setTimestamp(_.element.comment.timestamp?new Date(_.element.comment.timestamp):void 0);const M=_.element;if(k.threadMetadata.commentPreview.innerText="",k.threadMetadata.commentPreview.style.height="22px",typeof M.comment.body=="string")k.threadMetadata.commentPreview.innerText=M.comment.body;else{const P=new D.DisposableStore;k.disposables.push(P);const x=this.getRenderedComment(M.comment.body,P);k.disposables.push(x),k.threadMetadata.commentPreview.appendChild(x.element.firstElementChild??x.element),k.threadMetadata.commentPreview.title=x.element.textContent??""}if(_.element.range&&(_.element.range.startLineNumber===_.element.range.endLineNumber?k.threadMetadata.range.textContent=y.localize(5,null,_.element.range.startLineNumber):k.threadMetadata.range.textContent=y.localize(6,null,_.element.range.startLineNumber,_.element.range.endLineNumber)),!_.element.hasReply()){k.repliesMetadata.container.style.display="none";return}k.repliesMetadata.container.style.display="",k.repliesMetadata.count.textContent=this.getCountString(R);const N=_.element.replies[_.element.replies.length-1].comment;k.repliesMetadata.lastReplyDetail.textContent=y.localize(7,null,N.userName),k.repliesMetadata.timestamp.setTimestamp(N.timestamp?new Date(N.timestamp):void 0)}getCommentThreadWidgetStateColor(_,A){return _!==void 0?(0,o.getCommentThreadStateIconColor)(_,A):void 0}disposeTemplate(_){_.disposables.forEach(A=>A.dispose())}};e.CommentNodeRenderer=g,e.CommentNodeRenderer=g=fe([O(0,T.IOpenerService),O(1,v.IConfigurationService),O(2,h.IThemeService)],g);var w;(function(I){I[I.Resource=0]="Resource",I[I.Comment=1]="Comment"})(w||(w={}));class E{constructor(_){this.options=_}filter(_,A){return this.options.filter===""&&this.options.showResolved&&this.options.showUnresolved?1:_ instanceof f.ResourceWithCommentThreads?this.filterResourceMarkers(_):this.filterCommentNode(_,A)}filterResourceMarkers(_){if(this.options.textFilter.text&&!this.options.textFilter.negate){const A=d.FilterOptions._filter(this.options.textFilter.text,(0,p.basename)(_.resource));if(A)return{visibility:!0,data:{type:0,uriMatches:A||[]}}}return 2}filterCommentNode(_,A){if(!(_.threadState===void 0||this.options.showResolved&&u.CommentThreadState.Resolved===_.threadState||this.options.showUnresolved&&u.CommentThreadState.Unresolved===_.threadState))return!1;if(!this.options.textFilter.text)return!0;const L=d.FilterOptions._messageFilter(this.options.textFilter.text,typeof _.comment.body=="string"?_.comment.body:_.comment.body.value)||d.FilterOptions._messageFilter(this.options.textFilter.text,_.comment.userName)||_.replies.map(R=>d.FilterOptions._messageFilter(this.options.textFilter.text,R.comment.userName)||d.FilterOptions._messageFilter(this.options.textFilter.text,typeof R.comment.body=="string"?R.comment.body:R.comment.body.value)).filter(R=>!!R).flat();return L.length&&!this.options.textFilter.negate?{visibility:!0,data:{type:1,textMatches:L}}:L.length&&this.options.textFilter.negate&&A===2?!1:L.length===0&&this.options.textFilter.negate&&A===2?!0:A}}e.Filter=E;let C=class extends S.WorkbenchObjectTree{constructor(_,A,k,L,R,M,N,P){const x=new l,F=[N.createInstance(n,_),N.createInstance(g)];super("CommentsTree",A,x,F,{accessibilityProvider:k.accessibilityProvider,identityProvider:{getId:V=>V instanceof f.CommentsModel?"root":V instanceof f.ResourceWithCommentThreads?`${V.owner}-${V.id}`:V instanceof f.CommentNode?`${V.owner}-${V.resource.toString()}-${V.threadId}-${V.comment.uniqueIdInThread}`+(V.isRoot?"-root":""):""},expandOnlyOnTwistieClick:V=>!(V instanceof f.CommentsModel||V instanceof f.ResourceWithCommentThreads),collapseByDefault:!1,overrideStyles:k.overrideStyles,filter:k.filter,findWidgetEnabled:!1},N,L,R,P)}filterComments(){this.refilter()}getVisibleItemCount(){let _=0;const A=this.getNode();for(const k of A.children)for(const L of k.children)L.visible&&k.visible&&_++;return _}};e.CommentsList=C,e.CommentsList=C=fe([O(3,m.IContextKeyService),O(4,S.IListService),O(5,h.IThemeService),O(6,a.IInstantiationService),O(7,v.IConfigurationService)],C)}),define(Q[3516],Y([1,0,202]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomEditorModelManager=void 0;class y{constructor(){this._references=new Map}async getAllModels(D){const T=`${D.toString()}@@@`,f=[];for(const[v,m]of this._references)v.startsWith(T)&&m.model&&f.push(await m.model);return f}async get(D,T){const f=this.key(D,T);return this._references.get(f)?.model}tryRetain(D,T){const f=this.key(D,T),v=this._references.get(f);if(v)return v.counter++,v.model.then(m=>({object:m,dispose:(0,t.once)(()=>{--v.counter<=0&&(v.model.then(S=>S.dispose()),this._references.delete(f))})}))}add(D,T,f){const v=this.key(D,T);if(this._references.get(v))throw new Error("Model already exists");return this._references.set(v,{viewType:T,model:f,counter:0}),this.tryRetain(D,T)}disposeAllModelsForView(D){for(const[T,f]of this._references)f.viewType===D&&(f.model.then(v=>v.dispose()),this._references.delete(T))}key(D,T){return`${D.toString()}@@@${T}`}}e.CustomEditorModelManager=y}),define(Q[3517],Y([1,0,32,2679,77]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.debugInspectMemory=e.debugConsoleEvaluationPrompt=e.debugConsoleEvaluationInput=e.breakpointsActivate=e.breakpointsRemoveAll=e.watchExpressionsAddFuncBreakpoint=e.watchExpressionsAdd=e.watchExpressionRemove=e.watchExpressionsRemoveAll=e.debugConsoleClearAll=e.callstackViewSession=e.debugCollapseAll=e.debugRemoveConfig=e.debugConsole=e.debugConfigure=e.debugStart=e.debugRun=e.debugReverseContinue=e.debugContinue=e.debugPause=e.debugStepBack=e.debugStepOut=e.debugStepInto=e.debugStepOver=e.debugRestart=e.debugDisconnect=e.debugStop=e.debugRestartFrame=e.debugGripper=e.debugStackframeFocused=e.debugStackframe=e.allBreakpoints=e.debugBreakpointUnsupported=e.debugBreakpointHint=e.logBreakpoint=e.dataBreakpoint=e.conditionalBreakpoint=e.functionBreakpoint=e.breakpoint=e.loadedScriptsViewIcon=e.breakpointsViewIcon=e.callStackViewIcon=e.watchViewIcon=e.variablesViewIcon=e.runViewIcon=e.debugConsoleViewIcon=void 0,e.debugConsoleViewIcon=(0,b.registerIcon)("debug-console-view-icon",t.Codicon.debugConsole,(0,y.localize)(0,null)),e.runViewIcon=(0,b.registerIcon)("run-view-icon",t.Codicon.debugAlt,(0,y.localize)(1,null)),e.variablesViewIcon=(0,b.registerIcon)("variables-view-icon",t.Codicon.debugAlt,(0,y.localize)(2,null)),e.watchViewIcon=(0,b.registerIcon)("watch-view-icon",t.Codicon.debugAlt,(0,y.localize)(3,null)),e.callStackViewIcon=(0,b.registerIcon)("callstack-view-icon",t.Codicon.debugAlt,(0,y.localize)(4,null)),e.breakpointsViewIcon=(0,b.registerIcon)("breakpoints-view-icon",t.Codicon.debugAlt,(0,y.localize)(5,null)),e.loadedScriptsViewIcon=(0,b.registerIcon)("loaded-scripts-view-icon",t.Codicon.debugAlt,(0,y.localize)(6,null)),e.breakpoint={regular:(0,b.registerIcon)("debug-breakpoint",t.Codicon.debugBreakpoint,(0,y.localize)(7,null)),disabled:(0,b.registerIcon)("debug-breakpoint-disabled",t.Codicon.debugBreakpointDisabled,(0,y.localize)(8,null)),unverified:(0,b.registerIcon)("debug-breakpoint-unverified",t.Codicon.debugBreakpointUnverified,(0,y.localize)(9,null))},e.functionBreakpoint={regular:(0,b.registerIcon)("debug-breakpoint-function",t.Codicon.debugBreakpointFunction,(0,y.localize)(10,null)),disabled:(0,b.registerIcon)("debug-breakpoint-function-disabled",t.Codicon.debugBreakpointFunctionDisabled,(0,y.localize)(11,null)),unverified:(0,b.registerIcon)("debug-breakpoint-function-unverified",t.Codicon.debugBreakpointFunctionUnverified,(0,y.localize)(12,null))},e.conditionalBreakpoint={regular:(0,b.registerIcon)("debug-breakpoint-conditional",t.Codicon.debugBreakpointConditional,(0,y.localize)(13,null)),disabled:(0,b.registerIcon)("debug-breakpoint-conditional-disabled",t.Codicon.debugBreakpointConditionalDisabled,(0,y.localize)(14,null)),unverified:(0,b.registerIcon)("debug-breakpoint-conditional-unverified",t.Codicon.debugBreakpointConditionalUnverified,(0,y.localize)(15,null))},e.dataBreakpoint={regular:(0,b.registerIcon)("debug-breakpoint-data",t.Codicon.debugBreakpointData,(0,y.localize)(16,null)),disabled:(0,b.registerIcon)("debug-breakpoint-data-disabled",t.Codicon.debugBreakpointDataDisabled,(0,y.localize)(17,null)),unverified:(0,b.registerIcon)("debug-breakpoint-data-unverified",t.Codicon.debugBreakpointDataUnverified,(0,y.localize)(18,null))},e.logBreakpoint={regular:(0,b.registerIcon)("debug-breakpoint-log",t.Codicon.debugBreakpointLog,(0,y.localize)(19,null)),disabled:(0,b.registerIcon)("debug-breakpoint-log-disabled",t.Codicon.debugBreakpointLogDisabled,(0,y.localize)(20,null)),unverified:(0,b.registerIcon)("debug-breakpoint-log-unverified",t.Codicon.debugBreakpointLogUnverified,(0,y.localize)(21,null))},e.debugBreakpointHint=(0,b.registerIcon)("debug-hint",t.Codicon.debugHint,(0,y.localize)(22,null)),e.debugBreakpointUnsupported=(0,b.registerIcon)("debug-breakpoint-unsupported",t.Codicon.debugBreakpointUnsupported,(0,y.localize)(23,null)),e.allBreakpoints=[e.breakpoint,e.functionBreakpoint,e.conditionalBreakpoint,e.dataBreakpoint,e.logBreakpoint],e.debugStackframe=(0,b.registerIcon)("debug-stackframe",t.Codicon.debugStackframe,(0,y.localize)(24,null)),e.debugStackframeFocused=(0,b.registerIcon)("debug-stackframe-focused",t.Codicon.debugStackframeFocused,(0,y.localize)(25,null)),e.debugGripper=(0,b.registerIcon)("debug-gripper",t.Codicon.gripper,(0,y.localize)(26,null)),e.debugRestartFrame=(0,b.registerIcon)("debug-restart-frame",t.Codicon.debugRestartFrame,(0,y.localize)(27,null)),e.debugStop=(0,b.registerIcon)("debug-stop",t.Codicon.debugStop,(0,y.localize)(28,null)),e.debugDisconnect=(0,b.registerIcon)("debug-disconnect",t.Codicon.debugDisconnect,(0,y.localize)(29,null)),e.debugRestart=(0,b.registerIcon)("debug-restart",t.Codicon.debugRestart,(0,y.localize)(30,null)),e.debugStepOver=(0,b.registerIcon)("debug-step-over",t.Codicon.debugStepOver,(0,y.localize)(31,null)),e.debugStepInto=(0,b.registerIcon)("debug-step-into",t.Codicon.debugStepInto,(0,y.localize)(32,null)),e.debugStepOut=(0,b.registerIcon)("debug-step-out",t.Codicon.debugStepOut,(0,y.localize)(33,null)),e.debugStepBack=(0,b.registerIcon)("debug-step-back",t.Codicon.debugStepBack,(0,y.localize)(34,null)),e.debugPause=(0,b.registerIcon)("debug-pause",t.Codicon.debugPause,(0,y.localize)(35,null)),e.debugContinue=(0,b.registerIcon)("debug-continue",t.Codicon.debugContinue,(0,y.localize)(36,null)),e.debugReverseContinue=(0,b.registerIcon)("debug-reverse-continue",t.Codicon.debugReverseContinue,(0,y.localize)(37,null)),e.debugRun=(0,b.registerIcon)("debug-run",t.Codicon.run,(0,y.localize)(38,null)),e.debugStart=(0,b.registerIcon)("debug-start",t.Codicon.debugStart,(0,y.localize)(39,null)),e.debugConfigure=(0,b.registerIcon)("debug-configure",t.Codicon.gear,(0,y.localize)(40,null)),e.debugConsole=(0,b.registerIcon)("debug-console",t.Codicon.gear,(0,y.localize)(41,null)),e.debugRemoveConfig=(0,b.registerIcon)("debug-remove-config",t.Codicon.trash,(0,y.localize)(42,null)),e.debugCollapseAll=(0,b.registerIcon)("debug-collapse-all",t.Codicon.collapseAll,(0,y.localize)(43,null)),e.callstackViewSession=(0,b.registerIcon)("callstack-view-session",t.Codicon.bug,(0,y.localize)(44,null)),e.debugConsoleClearAll=(0,b.registerIcon)("debug-console-clear-all",t.Codicon.clearAll,(0,y.localize)(45,null)),e.watchExpressionsRemoveAll=(0,b.registerIcon)("watch-expressions-remove-all",t.Codicon.closeAll,(0,y.localize)(46,null)),e.watchExpressionRemove=(0,b.registerIcon)("watch-expression-remove",t.Codicon.removeClose,(0,y.localize)(47,null)),e.watchExpressionsAdd=(0,b.registerIcon)("watch-expressions-add",t.Codicon.add,(0,y.localize)(48,null)),e.watchExpressionsAddFuncBreakpoint=(0,b.registerIcon)("watch-expressions-add-function-breakpoint",t.Codicon.add,(0,y.localize)(49,null)),e.breakpointsRemoveAll=(0,b.registerIcon)("breakpoints-remove-all",t.Codicon.closeAll,(0,y.localize)(50,null)),e.breakpointsActivate=(0,b.registerIcon)("breakpoints-activate",t.Codicon.activateBreakpoints,(0,y.localize)(51,null)),e.debugConsoleEvaluationInput=(0,b.registerIcon)("debug-console-evaluation-input",t.Codicon.arrowSmallRight,(0,y.localize)(52,null)),e.debugConsoleEvaluationPrompt=(0,b.registerIcon)("debug-console-evaluation-prompt",t.Codicon.chevronRight,(0,y.localize)(53,null)),e.debugInspectMemory=(0,b.registerIcon)("debug-inspect-memory",t.Codicon.fileBinary,(0,y.localize)(54,null))}),define(Q[1272],Y([1,0,36,19,37,80,2678,3517,167]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerColors=e.debugIconStartForeground=e.debugToolBarBorder=e.debugToolBarBackground=void 0,e.debugToolBarBackground=(0,t.registerColor)("debugToolBar.background",{dark:"#333333",light:"#F3F3F3",hcDark:"#000000",hcLight:"#FFFFFF"},(0,T.localize)(0,null)),e.debugToolBarBorder=(0,t.registerColor)("debugToolBar.border",{dark:null,light:null,hcDark:null,hcLight:null},(0,T.localize)(1,null)),e.debugIconStartForeground=(0,t.registerColor)("debugIcon.startForeground",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#388A34"},(0,T.localize)(2,null));function m(){const S=(0,t.registerColor)("debugTokenExpression.name",{dark:"#c586c0",light:"#9b46b0",hcDark:t.foreground,hcLight:t.foreground},"Foreground color for the token names shown in the debug views (ie. the Variables or Watch view)."),h=(0,t.registerColor)("debugTokenExpression.value",{dark:"#cccccc99",light:"#6c6c6ccc",hcDark:t.foreground,hcLight:t.foreground},"Foreground color for the token values shown in the debug views (ie. the Variables or Watch view)."),a=(0,t.registerColor)("debugTokenExpression.string",{dark:"#ce9178",light:"#a31515",hcDark:"#f48771",hcLight:"#a31515"},"Foreground color for strings in the debug views (ie. the Variables or Watch view)."),r=(0,t.registerColor)("debugTokenExpression.boolean",{dark:"#4e94ce",light:"#0000ff",hcDark:"#75bdfe",hcLight:"#0000ff"},"Foreground color for booleans in the debug views (ie. the Variables or Watch view)."),i=(0,t.registerColor)("debugTokenExpression.number",{dark:"#b5cea8",light:"#098658",hcDark:"#89d185",hcLight:"#098658"},"Foreground color for numbers in the debug views (ie. the Variables or Watch view)."),s=(0,t.registerColor)("debugTokenExpression.error",{dark:"#f48771",light:"#e51400",hcDark:"#f48771",hcLight:"#e51400"},"Foreground color for expression errors in the debug views (ie. the Variables or Watch view) and for error logs shown in the debug console."),o=(0,t.registerColor)("debugView.exceptionLabelForeground",{dark:t.foreground,light:"#FFF",hcDark:t.foreground,hcLight:t.foreground},"Foreground color for a label shown in the CALL STACK view when the debugger breaks on an exception."),u=(0,t.registerColor)("debugView.exceptionLabelBackground",{dark:"#6C2022",light:"#A31515",hcDark:"#6C2022",hcLight:"#A31515"},"Background color for a label shown in the CALL STACK view when the debugger breaks on an exception."),d=(0,t.registerColor)("debugView.stateLabelForeground",{dark:t.foreground,light:t.foreground,hcDark:t.foreground,hcLight:t.foreground},"Foreground color for a label in the CALL STACK view showing the current session's or thread's state."),p=(0,t.registerColor)("debugView.stateLabelBackground",{dark:"#88888844",light:"#88888844",hcDark:"#88888844",hcLight:"#88888844"},"Background color for a label in the CALL STACK view showing the current session's or thread's state."),c=(0,t.registerColor)("debugView.valueChangedHighlight",{dark:"#569CD6",light:"#569CD6",hcDark:"#569CD6",hcLight:"#569CD6"},"Color used to highlight value changes in the debug views (ie. in the Variables view)."),l=(0,t.registerColor)("debugConsole.infoForeground",{dark:t.editorInfoForeground,light:t.editorInfoForeground,hcDark:t.foreground,hcLight:t.foreground},"Foreground color for info messages in debug REPL console."),n=(0,t.registerColor)("debugConsole.warningForeground",{dark:t.editorWarningForeground,light:t.editorWarningForeground,hcDark:"#008000",hcLight:t.editorWarningForeground},"Foreground color for warning messages in debug REPL console."),g=(0,t.registerColor)("debugConsole.errorForeground",{dark:t.errorForeground,light:t.errorForeground,hcDark:t.errorForeground,hcLight:t.errorForeground},"Foreground color for error messages in debug REPL console."),w=(0,t.registerColor)("debugConsole.sourceForeground",{dark:t.foreground,light:t.foreground,hcDark:t.foreground,hcLight:t.foreground},"Foreground color for source filenames in debug REPL console."),E=(0,t.registerColor)("debugConsoleInputIcon.foreground",{dark:t.foreground,light:t.foreground,hcDark:t.foreground,hcLight:t.foreground},"Foreground color for debug console input marker icon."),C=(0,t.registerColor)("debugIcon.pauseForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,T.localize)(3,null)),I=(0,t.registerColor)("debugIcon.stopForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#A1260D"},(0,T.localize)(4,null)),_=(0,t.registerColor)("debugIcon.disconnectForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#A1260D"},(0,T.localize)(5,null)),A=(0,t.registerColor)("debugIcon.restartForeground",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#388A34"},(0,T.localize)(6,null)),k=(0,t.registerColor)("debugIcon.stepOverForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,T.localize)(7,null)),L=(0,t.registerColor)("debugIcon.stepIntoForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,T.localize)(8,null)),R=(0,t.registerColor)("debugIcon.stepOutForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,T.localize)(9,null)),M=(0,t.registerColor)("debugIcon.continueForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,T.localize)(10,null)),N=(0,t.registerColor)("debugIcon.stepBackForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,T.localize)(11,null));(0,y.registerThemingParticipant)((P,x)=>{const F=P.getColor(t.badgeBackground),V=P.getColor(t.badgeForeground),W=P.getColor(t.listDeemphasizedForeground),z=P.getColor(o),B=P.getColor(u),K=P.getColor(d),H=P.getColor(p),U=P.getColor(c),G=P.getColor(t.toolbarHoverBackground);x.addRule(` /* Text colour of the call stack row's filename */ .debug-pane .debug-call-stack .monaco-list-row:not(.selected) .stack-frame > .file .file-name { color: ${W} } /* Line & column number "badge" for selected call stack row */ .debug-pane .monaco-list-row.selected .line-number { background-color: ${F}; color: ${V}; } /* Line & column number "badge" for unselected call stack row (basically all other rows) */ .debug-pane .line-number { background-color: ${F.transparent(.6)}; color: ${V.transparent(.6)}; } /* State "badge" displaying the active session's current state. * Only visible when there are more active debug sessions/threads running. */ .debug-pane .debug-call-stack .thread > .state.label, .debug-pane .debug-call-stack .session > .state.label { background-color: ${H}; color: ${K}; } /* State "badge" displaying the active session's current state. * Only visible when there are more active debug sessions/threads running * and thread paused due to a thrown exception. */ .debug-pane .debug-call-stack .thread > .state.label.exception, .debug-pane .debug-call-stack .session > .state.label.exception { background-color: ${B}; color: ${z}; } /* Info "badge" shown when the debugger pauses due to a thrown exception. */ .debug-pane .call-stack-state-message > .label.exception { background-color: ${B}; color: ${z}; } /* Animation of changed values in Debug viewlet */ @keyframes debugViewletValueChanged { 0% { background-color: ${U.transparent(0)} } 5% { background-color: ${U.transparent(.9)} } 100% { background-color: ${U.transparent(.3)} } } .debug-pane .monaco-list-row .expression .value.changed { background-color: ${U.transparent(.3)}; animation-name: debugViewletValueChanged; animation-duration: 1s; animation-fill-mode: forwards; } .monaco-list-row .expression .lazy-button:hover { background-color: ${G} } `);const $=P.getColor(t.contrastBorder);$&&x.addRule(` .debug-pane .line-number { border: 1px solid ${$}; } `),(0,v.isHighContrast)(P.type)&&x.addRule(` .debug-pane .line-number { background-color: ${F}; color: ${V}; }`);const ie=P.getColor(S),J=P.getColor(h),j=P.getColor(a),ee=P.getColor(r),X=P.getColor(s),te=P.getColor(i);x.addRule(` .monaco-workbench .monaco-list-row .expression .name { color: ${ie}; } .monaco-workbench .monaco-list-row .expression .value, .monaco-workbench .debug-hover-widget .value { color: ${J}; } .monaco-workbench .monaco-list-row .expression .value.string, .monaco-workbench .debug-hover-widget .value.string { color: ${j}; } .monaco-workbench .monaco-list-row .expression .value.boolean, .monaco-workbench .debug-hover-widget .value.boolean { color: ${ee}; } .monaco-workbench .monaco-list-row .expression .error, .monaco-workbench .debug-hover-widget .error, .monaco-workbench .debug-pane .debug-variables .scope .error { color: ${X}; } .monaco-workbench .monaco-list-row .expression .value.number, .monaco-workbench .debug-hover-widget .value.number { color: ${te}; } `);const Z=P.getColor(t.inputBorder)||D.Color.fromHex("#80808060"),se=P.getColor(l),re=P.getColor(n),oe=P.getColor(g),le=P.getColor(w),ne=P.getColor(E);x.addRule(` .repl .repl-input-wrapper { border-top: 1px solid ${Z}; } .monaco-workbench .repl .repl-tree .output .expression .value.info { color: ${se}; } .monaco-workbench .repl .repl-tree .output .expression .value.warn { color: ${re}; } .monaco-workbench .repl .repl-tree .output .expression .value.error { color: ${oe}; } .monaco-workbench .repl .repl-tree .output .expression .source { color: ${le}; } .monaco-workbench .repl .repl-tree .monaco-tl-contents .arrow { color: ${ne}; } `),P.defines(E)||x.addRule(` .monaco-workbench.vs .repl .repl-tree .monaco-tl-contents .arrow { opacity: 0.25; } .monaco-workbench.vs-dark .repl .repl-tree .monaco-tl-contents .arrow { opacity: 0.4; } .monaco-workbench.hc-black .repl .repl-tree .monaco-tl-contents .arrow, .monaco-workbench.hc-light .repl .repl-tree .monaco-tl-contents .arrow { opacity: 1; } `);const ce=P.getColor(e.debugIconStartForeground);ce&&x.addRule(`.monaco-workbench ${b.ThemeIcon.asCSSSelector(f.debugStart)} { color: ${ce}; }`);const ae=P.getColor(C);ae&&x.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${b.ThemeIcon.asCSSSelector(f.debugPause)}, .monaco-workbench ${b.ThemeIcon.asCSSSelector(f.debugPause)} { color: ${ae}; }`);const ue=P.getColor(I);ue&&x.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${b.ThemeIcon.asCSSSelector(f.debugStop)},.monaco-workbench ${b.ThemeIcon.asCSSSelector(f.debugStop)} { color: ${ue}; }`);const de=P.getColor(_);de&&x.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${b.ThemeIcon.asCSSSelector(f.debugDisconnect)},.monaco-workbench .debug-view-content ${b.ThemeIcon.asCSSSelector(f.debugDisconnect)}, .monaco-workbench .debug-toolbar ${b.ThemeIcon.asCSSSelector(f.debugDisconnect)} { color: ${de}; }`);const ge=P.getColor(A);ge&&x.addRule(`.monaco-workbench ${b.ThemeIcon.asCSSSelector(f.debugRestart)}, .monaco-workbench ${b.ThemeIcon.asCSSSelector(f.debugRestartFrame)}, .monaco-workbench .part > .title > .title-actions .action-label${b.ThemeIcon.asCSSSelector(f.debugRestart)}, .monaco-workbench .part > .title > .title-actions .action-label${b.ThemeIcon.asCSSSelector(f.debugRestartFrame)} { color: ${ge}; }`);const he=P.getColor(k);he&&x.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${b.ThemeIcon.asCSSSelector(f.debugStepOver)}, .monaco-workbench ${b.ThemeIcon.asCSSSelector(f.debugStepOver)} { color: ${he}; }`);const be=P.getColor(L);be&&x.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${b.ThemeIcon.asCSSSelector(f.debugStepInto)}, .monaco-workbench .part > .title > .title-actions .action-label${b.ThemeIcon.asCSSSelector(f.debugStepInto)}, .monaco-workbench ${b.ThemeIcon.asCSSSelector(f.debugStepInto)} { color: ${be}; }`);const ve=P.getColor(R);ve&&x.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${b.ThemeIcon.asCSSSelector(f.debugStepOut)}, .monaco-workbench .part > .title > .title-actions .action-label${b.ThemeIcon.asCSSSelector(f.debugStepOut)}, .monaco-workbench ${b.ThemeIcon.asCSSSelector(f.debugStepOut)} { color: ${ve}; }`);const Ie=P.getColor(M);Ie&&x.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${b.ThemeIcon.asCSSSelector(f.debugContinue)}, .monaco-workbench ${b.ThemeIcon.asCSSSelector(f.debugContinue)}, .monaco-workbench .part > .title > .title-actions .action-label${b.ThemeIcon.asCSSSelector(f.debugReverseContinue)}, .monaco-workbench ${b.ThemeIcon.asCSSSelector(f.debugReverseContinue)} { color: ${Ie}; }`);const Se=P.getColor(N);Se&&x.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${b.ThemeIcon.asCSSSelector(f.debugStepBack)}, .monaco-workbench ${b.ThemeIcon.asCSSSelector(f.debugStepBack)} { color: ${Se}; }`)})}e.registerColors=m}),define(Q[726],Y([1,0,2680,8,5]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreakpointWidgetContext=e.IDebugService=e.DebuggerString=e.DebugConfigurationProviderTriggerKind=e.DEBUG_MEMORY_SCHEME=e.MemoryRangeType=e.getStateLabel=e.State=e.INTERNAL_CONSOLE_OPTIONS_SCHEMA=e.DEBUG_SCHEME=e.BREAKPOINT_EDITOR_CONTRIBUTION_ID=e.EDITOR_CONTRIBUTION_ID=e.debuggerDisabledMessage=e.CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE=e.CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST=e.CONTEXT_DISASSEMBLY_VIEW_FOCUS=e.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED=e.CONTEXT_MULTI_SESSION_DEBUG=e.CONTEXT_MULTI_SESSION_REPL=e.CONTEXT_EXCEPTION_WIDGET_VISIBLE=e.CONTEXT_VARIABLE_IS_READONLY=e.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=e.CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED=e.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=e.CONTEXT_SET_EXPRESSION_SUPPORTED=e.CONTEXT_SET_VARIABLE_SUPPORTED=e.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=e.CONTEXT_DEBUG_EXTENSION_AVAILABLE=e.CONTEXT_DEBUGGERS_AVAILABLE=e.CONTEXT_BREAKPOINTS_EXIST=e.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=e.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=e.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=e.CONTEXT_RESTART_FRAME_SUPPORTED=e.CONTEXT_STEP_BACK_SUPPORTED=e.CONTEXT_FOCUSED_SESSION_IS_ATTACH=e.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=e.CONTEXT_LOADED_SCRIPTS_SUPPORTED=e.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=e.CONTEXT_BREAKPOINT_ITEM_TYPE=e.CONTEXT_CAN_VIEW_MEMORY=e.CONTEXT_WATCH_ITEM_TYPE=e.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=e.CONTEXT_CALLSTACK_ITEM_STOPPED=e.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=e.CONTEXT_CALLSTACK_ITEM_TYPE=e.CONTEXT_BREAKPOINT_INPUT_FOCUSED=e.CONTEXT_EXPRESSION_SELECTED=e.CONTEXT_VARIABLES_FOCUSED=e.CONTEXT_WATCH_EXPRESSIONS_EXIST=e.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=e.CONTEXT_BREAKPOINTS_FOCUSED=e.CONTEXT_IN_BREAKPOINT_WIDGET=e.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=e.CONTEXT_IN_DEBUG_REPL=e.CONTEXT_IN_DEBUG_MODE=e.CONTEXT_HAS_DEBUGGED=e.CONTEXT_DEBUG_UX=e.CONTEXT_DEBUG_UX_KEY=e.CONTEXT_DEBUG_STATE=e.CONTEXT_DEBUG_CONFIGURATION_TYPE=e.CONTEXT_DEBUG_TYPE=e.REPL_VIEW_ID=e.DEBUG_PANEL_ID=e.DISASSEMBLY_VIEW_ID=e.BREAKPOINTS_VIEW_ID=e.LOADED_SCRIPTS_VIEW_ID=e.CALLSTACK_VIEW_ID=e.WATCH_VIEW_ID=e.VARIABLES_VIEW_ID=e.VIEWLET_ID=void 0,e.VIEWLET_ID="workbench.view.debug",e.VARIABLES_VIEW_ID="workbench.debug.variablesView",e.WATCH_VIEW_ID="workbench.debug.watchExpressionsView",e.CALLSTACK_VIEW_ID="workbench.debug.callStackView",e.LOADED_SCRIPTS_VIEW_ID="workbench.debug.loadedScriptsView",e.BREAKPOINTS_VIEW_ID="workbench.debug.breakPointsView",e.DISASSEMBLY_VIEW_ID="workbench.debug.disassemblyView",e.DEBUG_PANEL_ID="workbench.panel.repl",e.REPL_VIEW_ID="workbench.panel.repl.view",e.CONTEXT_DEBUG_TYPE=new y.RawContextKey("debugType",void 0,{type:"string",description:t.localize(0,null)}),e.CONTEXT_DEBUG_CONFIGURATION_TYPE=new y.RawContextKey("debugConfigurationType",void 0,{type:"string",description:t.localize(1,null)}),e.CONTEXT_DEBUG_STATE=new y.RawContextKey("debugState","inactive",{type:"string",description:t.localize(2,null)}),e.CONTEXT_DEBUG_UX_KEY="debugUx",e.CONTEXT_DEBUG_UX=new y.RawContextKey(e.CONTEXT_DEBUG_UX_KEY,"default",{type:"string",description:t.localize(3,null)}),e.CONTEXT_HAS_DEBUGGED=new y.RawContextKey("hasDebugged",!1,{type:"boolean",description:t.localize(4,null)}),e.CONTEXT_IN_DEBUG_MODE=new y.RawContextKey("inDebugMode",!1,{type:"boolean",description:t.localize(5,null)}),e.CONTEXT_IN_DEBUG_REPL=new y.RawContextKey("inDebugRepl",!1,{type:"boolean",description:t.localize(6,null)}),e.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new y.RawContextKey("breakpointWidgetVisible",!1,{type:"boolean",description:t.localize(7,null)}),e.CONTEXT_IN_BREAKPOINT_WIDGET=new y.RawContextKey("inBreakpointWidget",!1,{type:"boolean",description:t.localize(8,null)}),e.CONTEXT_BREAKPOINTS_FOCUSED=new y.RawContextKey("breakpointsFocused",!0,{type:"boolean",description:t.localize(9,null)}),e.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new y.RawContextKey("watchExpressionsFocused",!0,{type:"boolean",description:t.localize(10,null)}),e.CONTEXT_WATCH_EXPRESSIONS_EXIST=new y.RawContextKey("watchExpressionsExist",!1,{type:"boolean",description:t.localize(11,null)}),e.CONTEXT_VARIABLES_FOCUSED=new y.RawContextKey("variablesFocused",!0,{type:"boolean",description:t.localize(12,null)}),e.CONTEXT_EXPRESSION_SELECTED=new y.RawContextKey("expressionSelected",!1,{type:"boolean",description:t.localize(13,null)}),e.CONTEXT_BREAKPOINT_INPUT_FOCUSED=new y.RawContextKey("breakpointInputFocused",!1,{type:"boolean",description:t.localize(14,null)}),e.CONTEXT_CALLSTACK_ITEM_TYPE=new y.RawContextKey("callStackItemType",void 0,{type:"string",description:t.localize(15,null)}),e.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=new y.RawContextKey("callStackSessionIsAttach",!1,{type:"boolean",description:t.localize(16,null)}),e.CONTEXT_CALLSTACK_ITEM_STOPPED=new y.RawContextKey("callStackItemStopped",!1,{type:"boolean",description:t.localize(17,null)}),e.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=new y.RawContextKey("callStackSessionHasOneThread",!1,{type:"boolean",description:t.localize(18,null)}),e.CONTEXT_WATCH_ITEM_TYPE=new y.RawContextKey("watchItemType",void 0,{type:"string",description:t.localize(19,null)}),e.CONTEXT_CAN_VIEW_MEMORY=new y.RawContextKey("canViewMemory",void 0,{type:"boolean",description:t.localize(20,null)}),e.CONTEXT_BREAKPOINT_ITEM_TYPE=new y.RawContextKey("breakpointItemType",void 0,{type:"string",description:t.localize(21,null)}),e.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=new y.RawContextKey("breakpointSupportsCondition",!1,{type:"boolean",description:t.localize(22,null)}),e.CONTEXT_LOADED_SCRIPTS_SUPPORTED=new y.RawContextKey("loadedScriptsSupported",!1,{type:"boolean",description:t.localize(23,null)}),e.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=new y.RawContextKey("loadedScriptsItemType",void 0,{type:"string",description:t.localize(24,null)}),e.CONTEXT_FOCUSED_SESSION_IS_ATTACH=new y.RawContextKey("focusedSessionIsAttach",!1,{type:"boolean",description:t.localize(25,null)}),e.CONTEXT_STEP_BACK_SUPPORTED=new y.RawContextKey("stepBackSupported",!1,{type:"boolean",description:t.localize(26,null)}),e.CONTEXT_RESTART_FRAME_SUPPORTED=new y.RawContextKey("restartFrameSupported",!1,{type:"boolean",description:t.localize(27,null)}),e.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=new y.RawContextKey("stackFrameSupportsRestart",!1,{type:"boolean",description:t.localize(28,null)}),e.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=new y.RawContextKey("jumpToCursorSupported",!1,{type:"boolean",description:t.localize(29,null)}),e.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=new y.RawContextKey("stepIntoTargetsSupported",!1,{type:"boolean",description:t.localize(30,null)}),e.CONTEXT_BREAKPOINTS_EXIST=new y.RawContextKey("breakpointsExist",!1,{type:"boolean",description:t.localize(31,null)}),e.CONTEXT_DEBUGGERS_AVAILABLE=new y.RawContextKey("debuggersAvailable",!1,{type:"boolean",description:t.localize(32,null)}),e.CONTEXT_DEBUG_EXTENSION_AVAILABLE=new y.RawContextKey("debugExtensionAvailable",!0,{type:"boolean",description:t.localize(33,null)}),e.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=new y.RawContextKey("debugProtocolVariableMenuContext",void 0,{type:"string",description:t.localize(34,null)}),e.CONTEXT_SET_VARIABLE_SUPPORTED=new y.RawContextKey("debugSetVariableSupported",!1,{type:"boolean",description:t.localize(35,null)}),e.CONTEXT_SET_EXPRESSION_SUPPORTED=new y.RawContextKey("debugSetExpressionSupported",!1,{type:"boolean",description:t.localize(36,null)}),e.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=new y.RawContextKey("breakWhenValueChangesSupported",!1,{type:"boolean",description:t.localize(37,null)}),e.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=new y.RawContextKey("breakWhenValueIsAccessedSupported",!1,{type:"boolean",description:t.localize(38,null)}),e.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=new y.RawContextKey("breakWhenValueIsReadSupported",!1,{type:"boolean",description:t.localize(39,null)}),e.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED=new y.RawContextKey("terminateDebuggeeSupported",!1,{type:"boolean",description:t.localize(40,null)}),e.CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED=new y.RawContextKey("suspendDebuggeeSupported",!1,{type:"boolean",description:t.localize(41,null)}),e.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=new y.RawContextKey("variableEvaluateNamePresent",!1,{type:"boolean",description:t.localize(42,null)}),e.CONTEXT_VARIABLE_IS_READONLY=new y.RawContextKey("variableIsReadonly",!1,{type:"boolean",description:t.localize(43,null)}),e.CONTEXT_EXCEPTION_WIDGET_VISIBLE=new y.RawContextKey("exceptionWidgetVisible",!1,{type:"boolean",description:t.localize(44,null)}),e.CONTEXT_MULTI_SESSION_REPL=new y.RawContextKey("multiSessionRepl",!1,{type:"boolean",description:t.localize(45,null)}),e.CONTEXT_MULTI_SESSION_DEBUG=new y.RawContextKey("multiSessionDebug",!1,{type:"boolean",description:t.localize(46,null)}),e.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED=new y.RawContextKey("disassembleRequestSupported",!1,{type:"boolean",description:t.localize(47,null)}),e.CONTEXT_DISASSEMBLY_VIEW_FOCUS=new y.RawContextKey("disassemblyViewFocus",!1,{type:"boolean",description:t.localize(48,null)}),e.CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST=new y.RawContextKey("languageSupportsDisassembleRequest",!1,{type:"boolean",description:t.localize(49,null)}),e.CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE=new y.RawContextKey("focusedStackFrameHasInstructionReference",!1,{type:"boolean",description:t.localize(50,null)});const D=a=>t.localize(51,null,a);e.debuggerDisabledMessage=D,e.EDITOR_CONTRIBUTION_ID="editor.contrib.debug",e.BREAKPOINT_EDITOR_CONTRIBUTION_ID="editor.contrib.breakpoint",e.DEBUG_SCHEME="debug",e.INTERNAL_CONSOLE_OPTIONS_SCHEMA={enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart"],default:"openOnFirstSessionStart",description:t.localize(52,null)};var T;(function(a){a[a.Inactive=0]="Inactive",a[a.Initializing=1]="Initializing",a[a.Stopped=2]="Stopped",a[a.Running=3]="Running"})(T||(e.State=T={}));function f(a){switch(a){case 1:return"initializing";case 2:return"stopped";case 3:return"running";default:return"inactive"}}e.getStateLabel=f;var v;(function(a){a[a.Valid=0]="Valid",a[a.Unreadable=1]="Unreadable",a[a.Error=2]="Error"})(v||(e.MemoryRangeType=v={})),e.DEBUG_MEMORY_SCHEME="vscode-debug-memory";var m;(function(a){a[a.Initial=1]="Initial",a[a.Dynamic=2]="Dynamic"})(m||(e.DebugConfigurationProviderTriggerKind=m={}));var S;(function(a){a.UnverifiedBreakpoints="unverifiedBreakpoints"})(S||(e.DebuggerString=S={})),e.IDebugService=(0,b.createDecorator)("debugService");var h;(function(a){a[a.CONDITION=0]="CONDITION",a[a.HIT_COUNT=1]="HIT_COUNT",a[a.LOG_MESSAGE=2]="LOG_MESSAGE"})(h||(e.BreakpointWidgetContext=h={}))}),define(Q[3518],Y([1,0,861,153,3151]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,y.registerMainProcessRemoteService)(t.IExtensionHostDebugService,b.ExtensionHostDebugBroadcastChannel.ChannelName,{channelClientCtor:b.ExtensionHostDebugChannelClient})}),define(Q[524],Y([1,0,62,32,2685,8,5,77,122]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editSessionsLogId=e.hashedEditSessionId=e.decodeEditSessionFileContent=e.EDIT_SESSIONS_SCHEME=e.EDIT_SESSIONS_SHOW_VIEW=e.EDIT_SESSIONS_VIEW_ICON=e.EDIT_SESSIONS_TITLE=e.EDIT_SESSIONS_DATA_VIEW_ID=e.EDIT_SESSIONS_CONTAINER_ID=e.EDIT_SESSIONS_PENDING=e.EDIT_SESSIONS_PENDING_KEY=e.EDIT_SESSIONS_SIGNED_IN=e.EDIT_SESSIONS_SIGNED_IN_KEY=e.EditSessionSchemaVersion=e.FileType=e.ChangeType=e.IEditSessionsLogService=e.IEditSessionsStorageService=e.EDIT_SESSION_SYNC_CATEGORY=void 0,e.EDIT_SESSION_SYNC_CATEGORY={original:"Cloud Changes",value:(0,b.localize)(0,null)},e.IEditSessionsStorageService=(0,T.createDecorator)("IEditSessionsStorageService"),e.IEditSessionsLogService=(0,T.createDecorator)("IEditSessionsLogService");var m;(function(r){r[r.Addition=1]="Addition",r[r.Deletion=2]="Deletion"})(m||(e.ChangeType=m={}));var S;(function(r){r[r.File=1]="File"})(S||(e.FileType=S={})),e.EditSessionSchemaVersion=3,e.EDIT_SESSIONS_SIGNED_IN_KEY="editSessionsSignedIn",e.EDIT_SESSIONS_SIGNED_IN=new D.RawContextKey(e.EDIT_SESSIONS_SIGNED_IN_KEY,!1),e.EDIT_SESSIONS_PENDING_KEY="editSessionsPending",e.EDIT_SESSIONS_PENDING=new D.RawContextKey(e.EDIT_SESSIONS_PENDING_KEY,!1),e.EDIT_SESSIONS_CONTAINER_ID="workbench.view.editSessions",e.EDIT_SESSIONS_DATA_VIEW_ID="workbench.views.editSessions.data",e.EDIT_SESSIONS_TITLE=(0,b.localize)(1,null),e.EDIT_SESSIONS_VIEW_ICON=(0,f.registerIcon)("edit-sessions-view-icon",y.Codicon.cloudDownload,(0,b.localize)(2,null)),e.EDIT_SESSIONS_SHOW_VIEW=new D.RawContextKey("editSessionsShowView",!1),e.EDIT_SESSIONS_SCHEME="vscode-edit-sessions";function h(r,i){switch(r){case 1:return t.VSBuffer.fromString(i);case 2:return(0,t.decodeBase64)(i);default:throw new Error("Upgrade to a newer version to decode this content.")}}e.decodeEditSessionFileContent=h;function a(r){const i=new v.StringSHA1;return i.update(r),i.digest()}e.hashedEditSessionId=a,e.editSessionsLogId="editSessions"}),define(Q[3519],Y([1,0,4,6,25,524,15]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditSessionsFileSystemProvider=void 0;let f=class{static{this.SCHEMA=D.EDIT_SESSIONS_SCHEME}constructor(m){this.editSessionsStorageService=m,this.capabilities=2048+2,this.onDidChangeCapabilities=y.Event.None,this.onDidChangeFile=y.Event.None}async readFile(m){const S=/(?<ref>[^/]+)\/(?<folderName>[^/]+)\/(?<filePath>.*)/.exec(m.path.substring(1));if(!S?.groups)throw b.FileSystemProviderErrorCode.FileNotFound;const{ref:h,folderName:a,filePath:r}=S.groups,i=await this.editSessionsStorageService.read("editSessions",h);if(!i)throw b.FileSystemProviderErrorCode.FileNotFound;const s=JSON.parse(i.content),o=s.folders.find(u=>u.name===a)?.workingChanges.find(u=>u.relativeFilePath===r);if(!o||o.type===D.ChangeType.Deletion)throw b.FileSystemProviderErrorCode.FileNotFound;return(0,D.decodeEditSessionFileContent)(s.version,o.contents).buffer}async stat(m){const S=await this.readFile(m),h=Date.now();return{type:b.FileType.File,permissions:b.FilePermission.Readonly,mtime:h,ctime:h,size:S.byteLength}}watch(m,S){return t.Disposable.None}async mkdir(m){}async readdir(m){return[]}async rename(m,S,h){}async delete(m,S){}async writeFile(){throw new T.NotSupportedError}};e.EditSessionsFileSystemProvider=f,e.EditSessionsFileSystemProvider=f=fe([O(0,D.IEditSessionsStorageService)],f)}),define(Q[3520],Y([1,0,2686,91,11,524]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditSessionsLogService=void 0;let T=class extends b.AbstractLogger{constructor(v,m){super(),this.logger=this._register(v.createLogger(D.editSessionsLogId,{name:(0,t.localize)(0,null)}))}trace(v,...m){this.logger.trace(v,...m)}debug(v,...m){this.logger.debug(v,...m)}info(v,...m){this.logger.info(v,...m)}warn(v,...m){this.logger.warn(v,...m)}error(v,...m){this.logger.error(v,...m)}flush(){this.logger.flush()}};e.EditSessionsLogService=T,e.EditSessionsLogService=T=fe([O(0,b.ILoggerService),O(1,y.IEnvironmentService)],T)}),define(Q[3521],Y([1,0,717]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditSessionsStoreClient=void 0;class y extends t.UserDataSyncStoreClient{}e.EditSessionsStoreClient=y}),define(Q[354],Y([1,0,4]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionRecommendations=void 0;class y extends t.Disposable{constructor(){super(...arguments),this._activationPromise=null}get activated(){return this._activationPromise!==null}activate(){return this._activationPromise||(this._activationPromise=this.doActivate()),this._activationPromise}}e.ExtensionRecommendations=y}),define(Q[3522],Y([1,0,354,52,2076]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StaticRecommendations=void 0;let D=class extends t.ExtensionRecommendations{get recommendations(){return this._recommendations}constructor(f){super(),this._recommendations=[],this._recommendations=f.recommendedExtensions.map(v=>({extensionId:v,reason:{reasonId:6,reasonText:(0,b.localize)(0,null)},source:"application"}))}async doActivate(){}};e.StaticRecommendations=D,e.StaticRecommendations=D=fe([O(0,y.IProductService)],D)}),define(Q[3523],Y([1,0,95,354,2688,39,6]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigBasedRecommendations=void 0;let f=class extends y.ExtensionRecommendations{get otherRecommendations(){return this._otherRecommendations}get importantRecommendations(){return this._importantRecommendations}get recommendations(){return[...this.importantRecommendations,...this.otherRecommendations]}constructor(m,S){super(),this.extensionTipsService=m,this.workspaceContextService=S,this.importantTips=[],this.otherTips=[],this._onDidChangeRecommendations=this._register(new T.Emitter),this.onDidChangeRecommendations=this._onDidChangeRecommendations.event,this._otherRecommendations=[],this._importantRecommendations=[]}async doActivate(){await this.fetch(),this._register(this.workspaceContextService.onDidChangeWorkspaceFolders(m=>this.onWorkspaceFoldersChanged(m)))}async fetch(){const m=this.workspaceContextService.getWorkspace(),S=new Map,h=new Map;for(const a of m.folders){const r=await this.extensionTipsService.getConfigBasedTips(a.uri);for(const i of r)i.important?S.set(i.extensionId,i):h.set(i.extensionId,i)}this.importantTips=[...S.values()],this.otherTips=[...h.values()].filter(a=>!S.has(a.extensionId)),this._otherRecommendations=this.otherTips.map(a=>this.toExtensionRecommendation(a)),this._importantRecommendations=this.importantTips.map(a=>this.toExtensionRecommendation(a))}async onWorkspaceFoldersChanged(m){if(m.added.length){const S=this.importantTips;await this.fetch(),this.importantTips.some(h=>S.every(a=>h.extensionId!==a.extensionId))&&this._onDidChangeRecommendations.fire()}}toExtensionRecommendation(m){return{extensionId:m.extensionId,reason:{reasonId:3,reasonText:(0,b.localize)(0,null)},whenNotInstalled:m.whenNotInstalled}}};e.ConfigBasedRecommendations=f,e.ConfigBasedRecommendations=f=fe([O(0,t.IExtensionTipsService),O(1,D.IWorkspaceContextService)],f)}),define(Q[3524],Y([1,0,95,354,2690]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExeBasedRecommendations=void 0;let D=class extends y.ExtensionRecommendations{get otherRecommendations(){return this._otherTips.map(f=>this.toExtensionRecommendation(f))}get importantRecommendations(){return this._importantTips.map(f=>this.toExtensionRecommendation(f))}get recommendations(){return[...this.importantRecommendations,...this.otherRecommendations]}constructor(f){super(),this.extensionTipsService=f,this._otherTips=[],this._importantTips=[]}getRecommendations(f){const v=this._importantTips.filter(S=>S.exeName.toLowerCase()===f.toLowerCase()).map(S=>this.toExtensionRecommendation(S)),m=this._otherTips.filter(S=>S.exeName.toLowerCase()===f.toLowerCase()).map(S=>this.toExtensionRecommendation(S));return{important:v,others:m}}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 f=new Map;return this._importantTips=await this.extensionTipsService.getImportantExecutableBasedTips(),this._importantTips.forEach(v=>f.set(v.extensionId.toLowerCase(),v)),f}toExtensionRecommendation(f){return{extensionId:f.extensionId.toLowerCase(),reason:{reasonId:2,reasonText:(0,b.localize)(0,null,f.exeFriendlyName)}}}};e.ExeBasedRecommendations=D,e.ExeBasedRecommendations=D=fe([O(0,t.IExtensionTipsService)],D)}),define(Q[3525],Y([1,0,2697,161,4,95,27,74]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsCompletionItemsProvider=void 0;let v=class extends b.Disposable{constructor(S,h){super(),this.extensionManagementService=S,this._register(h.completionProvider.register({language:"jsonc",pattern:"**/settings.json"},{_debugDisplayName:"extensionsCompletionProvider",provideCompletionItems:async(a,r,i,s)=>{const o=(p,c)=>{const l=p.getWordAtPosition(c);return l?new T.Range(c.lineNumber,l.startColumn,c.lineNumber,l.endColumn):null},u=(0,y.getLocation)(a.getValue(),a.getOffsetAt(r)),d=o(a,r)??T.Range.fromPositions(r,r);if(u.path[0]==="extensions.supportUntrustedWorkspaces"&&u.path.length===2&&u.isAtPropertyKey){let p=[];try{p=Object.keys((0,y.parse)(a.getValue())["extensions.supportUntrustedWorkspaces"])}catch{}return{suggestions:await this.provideSupportUntrustedWorkspacesExtensionProposals(p,d)}}return{suggestions:[]}}}))}async provideSupportUntrustedWorkspacesExtensionProposals(S,h){const a=[],i=(await this.extensionManagementService.getInstalled()).filter(s=>s.manifest.main).filter(s=>S.indexOf(s.identifier.id)===-1);if(i.length)a.push(...i.map(s=>{const o=`"${s.identifier.id}": { "supported": true, "version": "${s.manifest.version}" },`;return{label:s.identifier.id,kind:13,insertText:o,filterText:o,range:h}}));else{const s=`"vscode.csharp": { "supported": true, "version": "0.0.0" },`;a.push({label:(0,t.localize)(0,null),kind:13,insertText:s,filterText:s,range:h})}return a}};e.ExtensionsCompletionItemsProvider=v,e.ExtensionsCompletionItemsProvider=v=fe([O(0,D.IExtensionManagementService),O(1,f.ILanguageFeaturesService)],v)}),define(Q[420],Y([1,0,32,2699,77]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.activationTimeIcon=e.trustIcon=e.infoIcon=e.warningIcon=e.errorIcon=e.starEmptyIcon=e.starHalfIcon=e.starFullIcon=e.sponsorIcon=e.preReleaseIcon=e.verifiedPublisherIcon=e.ratingIcon=e.installCountIcon=e.remoteIcon=e.syncIgnoredIcon=e.syncEnabledIcon=e.configureRecommendedIcon=e.installWorkspaceRecommendedIcon=e.installLocalInRemoteIcon=e.filterIcon=e.refreshIcon=e.clearSearchResultsIcon=e.manageExtensionIcon=e.extensionsViewIcon=void 0,e.extensionsViewIcon=(0,b.registerIcon)("extensions-view-icon",t.Codicon.extensions,(0,y.localize)(0,null)),e.manageExtensionIcon=(0,b.registerIcon)("extensions-manage",t.Codicon.gear,(0,y.localize)(1,null)),e.clearSearchResultsIcon=(0,b.registerIcon)("extensions-clear-search-results",t.Codicon.clearAll,(0,y.localize)(2,null)),e.refreshIcon=(0,b.registerIcon)("extensions-refresh",t.Codicon.refresh,(0,y.localize)(3,null)),e.filterIcon=(0,b.registerIcon)("extensions-filter",t.Codicon.filter,(0,y.localize)(4,null)),e.installLocalInRemoteIcon=(0,b.registerIcon)("extensions-install-local-in-remote",t.Codicon.cloudDownload,(0,y.localize)(5,null)),e.installWorkspaceRecommendedIcon=(0,b.registerIcon)("extensions-install-workspace-recommended",t.Codicon.cloudDownload,(0,y.localize)(6,null)),e.configureRecommendedIcon=(0,b.registerIcon)("extensions-configure-recommended",t.Codicon.pencil,(0,y.localize)(7,null)),e.syncEnabledIcon=(0,b.registerIcon)("extensions-sync-enabled",t.Codicon.sync,(0,y.localize)(8,null)),e.syncIgnoredIcon=(0,b.registerIcon)("extensions-sync-ignored",t.Codicon.syncIgnored,(0,y.localize)(9,null)),e.remoteIcon=(0,b.registerIcon)("extensions-remote",t.Codicon.remote,(0,y.localize)(10,null)),e.installCountIcon=(0,b.registerIcon)("extensions-install-count",t.Codicon.cloudDownload,(0,y.localize)(11,null)),e.ratingIcon=(0,b.registerIcon)("extensions-rating",t.Codicon.star,(0,y.localize)(12,null)),e.verifiedPublisherIcon=(0,b.registerIcon)("extensions-verified-publisher",t.Codicon.verifiedFilled,(0,y.localize)(13,null)),e.preReleaseIcon=(0,b.registerIcon)("extensions-pre-release",t.Codicon.versions,(0,y.localize)(14,null)),e.sponsorIcon=(0,b.registerIcon)("extensions-sponsor",t.Codicon.heartFilled,(0,y.localize)(15,null)),e.starFullIcon=(0,b.registerIcon)("extensions-star-full",t.Codicon.starFull,(0,y.localize)(16,null)),e.starHalfIcon=(0,b.registerIcon)("extensions-star-half",t.Codicon.starHalf,(0,y.localize)(17,null)),e.starEmptyIcon=(0,b.registerIcon)("extensions-star-empty",t.Codicon.starEmpty,(0,y.localize)(18,null)),e.errorIcon=(0,b.registerIcon)("extensions-error-message",t.Codicon.error,(0,y.localize)(19,null)),e.warningIcon=(0,b.registerIcon)("extensions-warning-message",t.Codicon.warning,(0,y.localize)(20,null)),e.infoIcon=(0,b.registerIcon)("extensions-info-message",t.Codicon.info,(0,y.localize)(21,null)),e.trustIcon=(0,b.registerIcon)("extension-workspace-trust",t.Codicon.shield,(0,y.localize)(22,null)),e.activationTimeIcon=(0,b.registerIcon)("extension-activation-time",t.Codicon.history,(0,y.localize)(23,null))}),define(Q[3526],Y([1,0,354,52]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeymapRecommendations=void 0;let b=class extends t.ExtensionRecommendations{get recommendations(){return this._recommendations}constructor(T){super(),this.productService=T,this._recommendations=[]}async doActivate(){this.productService.keymapExtensionTips&&(this._recommendations=this.productService.keymapExtensionTips.map(T=>({extensionId:T.toLowerCase(),reason:{reasonId:6,reasonText:""}})))}};e.KeymapRecommendations=b,e.KeymapRecommendations=b=fe([O(0,y.IProductService)],b)}),define(Q[3527],Y([1,0,354,52]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageRecommendations=void 0;let b=class extends t.ExtensionRecommendations{get recommendations(){return this._recommendations}constructor(T){super(),this.productService=T,this._recommendations=[]}async doActivate(){this.productService.languageExtensionTips&&(this._recommendations=this.productService.languageExtensionTips.map(T=>({extensionId:T.toLowerCase(),reason:{reasonId:6,reasonText:""}})))}};e.LanguageRecommendations=b,e.LanguageRecommendations=b=fe([O(0,y.IProductService)],b)}),define(Q[3528],Y([1,0,354,52,18]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteRecommendations=void 0;let D=class extends t.ExtensionRecommendations{get recommendations(){return this._recommendations}constructor(f){super(),this.productService=f,this._recommendations=[]}async doActivate(){const f={...this.productService.remoteExtensionTips,...this.productService.virtualWorkspaceExtensionTips},v=(0,b.PlatformToString)(b.platform);this._recommendations=Object.values(f).filter(({supportedPlatforms:m})=>!m||m.includes(v)).map(m=>({extensionId:m.extensionId.toLowerCase(),reason:{reasonId:6,reasonText:""}}))}};e.RemoteRecommendations=D,e.RemoteRecommendations=D=fe([O(0,y.IProductService)],D)}),define(Q[1273],Y([1,0,20,112]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Query=void 0;class b{constructor(T,f,v){this.value=T,this.sortBy=f,this.groupBy=v,this.value=T.trim()}static suggestions(T){const f=["installed","updates","enabled","disabled","builtin","featured","popular","recommended","recentlyPublished","workspaceUnsupported","deprecated","sort","category","tag","ext","id"],v={sort:["installs","rating","name","publishedDate","updateDate"],category:y.EXTENSION_CATEGORIES.map(a=>`"${a.toLowerCase()}"`),tag:[""],ext:[""],id:[""]},m=a=>T.indexOf(a)>-1,S=v.sort.some(a=>m(`@sort:${a}`)),h=v.category.some(a=>m(`@category:${a}`));return(0,t.flatten)(f.map(a=>S&&a==="sort"||h&&a==="category"?[]:a in v?v[a].map(r=>`@${a}:${r}${r===""?"":" "}`):m(`@${a}`)?[]:[`@${a} `]))}static parse(T){let f="";T=T.replace(/@sort:(\w+)(-\w*)?/g,(m,S,h)=>(f=S,""));let v="";return T=T.replace(/@group:(\w+)(-\w*)?/g,(m,S,h)=>(v=S,"")),new b(T,f,v)}toString(){let T=this.value;return this.sortBy&&(T=`${T}${T?" ":""}@sort:${this.sortBy}`),this.groupBy&&(T=`${T}${T?" ":""}@group:${this.groupBy}`),T}isValid(){return!/@outdated/.test(this.value)}equals(T){return this.value===T.value&&this.sortBy===T.sortBy}}e.Query=b}),define(Q[118],Y([1,0,5,4,115,8]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INSTALL_ACTIONS_GROUP=e.THEME_ACTIONS_GROUP=e.CONTEXT_HAS_GALLERY=e.HasOutdatedExtensionsContext=e.LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID=e.INSTALL_EXTENSION_FROM_VSIX_COMMAND_ID=e.SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID=e.TOGGLE_IGNORE_EXTENSION_ACTION_ID=e.OUTDATED_EXTENSIONS_VIEW_ID=e.WORKSPACE_RECOMMENDATIONS_VIEW_ID=e.ExtensionContainers=e.CloseExtensionDetailsOnViewChangeKey=e.AutoCheckUpdatesConfigurationKey=e.AutoUpdateConfigurationKey=e.ConfigurationKey=e.ExtensionEditorTab=e.IExtensionsWorkbenchService=e.ExtensionState=e.EXTENSIONS_CONFIG=e.VIEWLET_ID=void 0,e.VIEWLET_ID="workbench.view.extensions",e.EXTENSIONS_CONFIG=".azuredatastudio/extensions.json";var T;(function(m){m[m.Installing=0]="Installing",m[m.Installed=1]="Installed",m[m.Uninstalling=2]="Uninstalling",m[m.Uninstalled=3]="Uninstalled"})(T||(e.ExtensionState=T={})),e.IExtensionsWorkbenchService=(0,t.createDecorator)("extensionsWorkbenchService");var f;(function(m){m.Readme="readme",m.Contributions="contributions",m.Changelog="changelog",m.Dependencies="dependencies",m.ExtensionPack="extensionPack",m.RuntimeStatus="runtimeStatus"})(f||(e.ExtensionEditorTab=f={})),e.ConfigurationKey="extensions",e.AutoUpdateConfigurationKey="extensions.autoUpdate",e.AutoCheckUpdatesConfigurationKey="extensions.autoCheckUpdates",e.CloseExtensionDetailsOnViewChangeKey="extensions.closeExtensionDetailsOnViewChange";let v=class extends y.Disposable{constructor(S,h){super(),this.containers=S,this._register(h.onChange(this.update,this))}set extension(S){this.containers.forEach(h=>h.extension=S)}update(S){for(const h of this.containers)S&&h.extension?(0,b.areSameExtensions)(h.extension.identifier,S.identifier)&&(h.extension.server&&S.server&&h.extension.server!==S.server?h.updateWhenCounterExtensionChanges&&h.update():h.extension=S):h.update()}};e.ExtensionContainers=v,e.ExtensionContainers=v=fe([O(1,e.IExtensionsWorkbenchService)],v),e.WORKSPACE_RECOMMENDATIONS_VIEW_ID="workbench.views.extensions.workspaceRecommendations",e.OUTDATED_EXTENSIONS_VIEW_ID="workbench.views.extensions.searchOutdated",e.TOGGLE_IGNORE_EXTENSION_ACTION_ID="workbench.extensions.action.toggleIgnoreExtension",e.SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID="workbench.extensions.action.installVSIX",e.INSTALL_EXTENSION_FROM_VSIX_COMMAND_ID="workbench.extensions.command.installFromVSIX",e.LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID="workbench.extensions.action.listWorkspaceUnsupportedExtensions",e.HasOutdatedExtensionsContext=new D.RawContextKey("hasOutdatedExtensions",!1),e.CONTEXT_HAS_GALLERY=new D.RawContextKey("hasGallery",!1),e.THEME_ACTIONS_GROUP="_theme_",e.INSTALL_ACTIONS_GROUP="0_install"}),define(Q[1274],Y([1,0,2709,95]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsConfigurationInitialContent=e.ExtensionsConfigurationSchema=e.ExtensionsConfigurationSchemaId=void 0,e.ExtensionsConfigurationSchemaId="vscode://schemas/extensions",e.ExtensionsConfigurationSchema={id:e.ExtensionsConfigurationSchemaId,allowComments:!0,allowTrailingCommas:!0,type:"object",title:(0,t.localize)(0,null),additionalProperties:!1,properties:{recommendations:{type:"array",description:(0,t.localize)(1,null),items:{type:"string",pattern:y.EXTENSION_IDENTIFIER_PATTERN,errorMessage:(0,t.localize)(2,null)}},unwantedRecommendations:{type:"array",description:(0,t.localize)(3,null),items:{type:"string",pattern:y.EXTENSION_IDENTIFIER_PATTERN,errorMessage:(0,t.localize)(4,null)}}}},e.ExtensionsConfigurationInitialContent=["{"," // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations."," // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp",""," // List of extensions which should be recommended for users of this workspace.",' "recommendations": ['," "," ],"," // List of extensions recommended by VS Code that should not be recommended for users of this workspace.",' "unwantedRecommendations": ['," "," ]","}"].join(` `)}),define(Q[916],Y([1,0,22,10,2710,163,115,55]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsInput=void 0;class v extends D.EditorInput{static{this.ID="workbench.extensions.input2"}get typeId(){return v.ID}get capabilities(){return 10}get resource(){return y.URI.from({scheme:t.Schemas.extension,path:(0,f.join)(this._extension.identifier.id,"extension")})}constructor(S){super(),this._extension=S}get extension(){return this._extension}getName(){return(0,b.localize)(0,null,this._extension.displayName)}matches(S){return super.matches(S)?!0:S instanceof v&&(0,T.areSameExtensions)(this._extension.identifier,S._extension.identifier)}}e.ExtensionsInput=v}),define(Q[727],Y([1,0,2713,10,163]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RuntimeExtensionsInput=void 0;class D extends b.EditorInput{constructor(){super(...arguments),this.resource=y.URI.from({scheme:"runtime-extensions",path:"default"})}static{this.ID="workbench.runtimeExtensions.input"}get typeId(){return D.ID}get capabilities(){return 10}static get instance(){return(!D._instance||D._instance.isDisposed())&&(D._instance=new D),D._instance}getName(){return t.localize(0,null)}matches(f){return super.matches(f)?!0:f instanceof D}}e.RuntimeExtensionsInput=D}),define(Q[464],Y([1,0,2732,8]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NEW_FILE_COMMAND_ID=e.NEW_UNTITLED_FILE_LABEL=e.NEW_UNTITLED_FILE_COMMAND_ID=e.LAST_COMPRESSED_FOLDER=e.FIRST_COMPRESSED_FOLDER=e.NEXT_COMPRESSED_FOLDER=e.PREVIOUS_COMPRESSED_FOLDER=e.REMOVE_ROOT_FOLDER_LABEL=e.REMOVE_ROOT_FOLDER_COMMAND_ID=e.ResourceSelectedForCompareContext=e.OpenEditorsReadonlyEditorContext=e.OpenEditorsDirtyEditorContext=e.OpenEditorsGroupContext=e.SAVE_FILES_COMMAND_ID=e.SAVE_ALL_IN_GROUP_COMMAND_ID=e.SAVE_ALL_LABEL=e.SAVE_ALL_COMMAND_ID=e.SAVE_FILE_WITHOUT_FORMATTING_LABEL=e.SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID=e.SAVE_FILE_LABEL=e.SAVE_FILE_COMMAND_ID=e.SAVE_FILE_AS_LABEL=e.SAVE_FILE_AS_COMMAND_ID=e.COPY_RELATIVE_PATH_COMMAND_ID=e.COPY_PATH_COMMAND_ID=e.COMPARE_WITH_SAVED_COMMAND_ID=e.COMPARE_RESOURCE_COMMAND_ID=e.COMPARE_SELECTED_COMMAND_ID=e.SELECT_FOR_COMPARE_COMMAND_ID=e.OPEN_WITH_EXPLORER_COMMAND_ID=e.OPEN_TO_SIDE_COMMAND_ID=e.REVERT_FILE_COMMAND_ID=e.REVEAL_IN_EXPLORER_COMMAND_ID=void 0,e.REVEAL_IN_EXPLORER_COMMAND_ID="revealInExplorer",e.REVERT_FILE_COMMAND_ID="workbench.action.files.revert",e.OPEN_TO_SIDE_COMMAND_ID="explorer.openToSide",e.OPEN_WITH_EXPLORER_COMMAND_ID="explorer.openWith",e.SELECT_FOR_COMPARE_COMMAND_ID="selectForCompare",e.COMPARE_SELECTED_COMMAND_ID="compareSelected",e.COMPARE_RESOURCE_COMMAND_ID="compareFiles",e.COMPARE_WITH_SAVED_COMMAND_ID="workbench.files.action.compareWithSaved",e.COPY_PATH_COMMAND_ID="copyFilePath",e.COPY_RELATIVE_PATH_COMMAND_ID="copyRelativeFilePath",e.SAVE_FILE_AS_COMMAND_ID="workbench.action.files.saveAs",e.SAVE_FILE_AS_LABEL=t.localize(0,null),e.SAVE_FILE_COMMAND_ID="workbench.action.files.save",e.SAVE_FILE_LABEL=t.localize(1,null),e.SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID="workbench.action.files.saveWithoutFormatting",e.SAVE_FILE_WITHOUT_FORMATTING_LABEL=t.localize(2,null),e.SAVE_ALL_COMMAND_ID="saveAll",e.SAVE_ALL_LABEL=t.localize(3,null),e.SAVE_ALL_IN_GROUP_COMMAND_ID="workbench.files.action.saveAllInGroup",e.SAVE_FILES_COMMAND_ID="workbench.action.files.saveFiles",e.OpenEditorsGroupContext=new y.RawContextKey("groupFocusedInOpenEditors",!1),e.OpenEditorsDirtyEditorContext=new y.RawContextKey("dirtyEditorFocusedInOpenEditors",!1),e.OpenEditorsReadonlyEditorContext=new y.RawContextKey("readonlyEditorFocusedInOpenEditors",!1),e.ResourceSelectedForCompareContext=new y.RawContextKey("resourceSelectedForCompare",!1),e.REMOVE_ROOT_FOLDER_COMMAND_ID="removeRootFolder",e.REMOVE_ROOT_FOLDER_LABEL=t.localize(4,null),e.PREVIOUS_COMPRESSED_FOLDER="previousCompressedFolder",e.NEXT_COMPRESSED_FOLDER="nextCompressedFolder",e.FIRST_COMPRESSED_FOLDER="firstCompressedFolder",e.LAST_COMPRESSED_FOLDER="lastCompressedFolder",e.NEW_UNTITLED_FILE_COMMAND_ID="workbench.action.files.newUntitledFile",e.NEW_UNTITLED_FILE_LABEL=t.localize(5,null),e.NEW_FILE_COMMAND_ID="workbench.action.files.newFile"}),define(Q[3529],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SufTrie=e.PreTrie=e.ExplorerFileNestingTrie=void 0;class t{constructor(m){this.root=new y;for(const[S,h]of m)for(const a of h)this.root.add(S,a)}toString(){return this.root.toString()}getAttributes(m,S){const h=m.lastIndexOf(".");return h<1?{dirname:S,basename:m,extname:""}:{dirname:S,basename:m.substring(0,h),extname:m.substring(h+1)}}nest(m,S){const h=new y;for(const i of m){const s=this.getAttributes(i,S),o=this.root.get(i,s);for(const u of o)h.add(u,i)}const a=(i,s=new Set)=>{if(s.has(i))return[];s.add(i);const o=this.getAttributes(i,S),u=h.get(i,o);return u.length===0?[i]:u.length===1&&u[0]===i?[i]:u.flatMap(d=>a(d,s))},r=new Map;for(const i of m){let s=a(i);s.length===0&&(s=[i]);for(const o of s){let u=r.get(o);u||r.set(o,u=new Set),i!==o&&u.add(i)}}return r}}e.ExplorerFileNestingTrie=t;class y{constructor(){this.value=new b,this.map=new Map}add(m,S){if(m==="")this.value.add(m,S);else if(m[0]==="*")this.value.add(m,S);else{const h=m[0],a=m.slice(1);let r=this.map.get(h);r||this.map.set(h,r=new y),r.add(a,S)}}get(m,S){const h=[];h.push(...this.value.get(m,S));const a=m[0],r=m.slice(1),i=this.map.get(a);return i&&h.push(...i.get(r,S)),h}toString(m=""){const S=[];return this.value.hasItems&&S.push(`* => `+this.value.toString(m+" ")),[...this.map.entries()].map(([h,a])=>S.push("^"+h+` => `+a.toString(m+" "))),S.map(h=>m+h).join(` `)}}e.PreTrie=y;class b{constructor(){this.star=[],this.epsilon=[],this.map=new Map,this.hasItems=!1}add(m,S){if(this.hasItems=!0,m==="*")this.star.push(new f(S));else if(m==="")this.epsilon.push(new f(S));else{const h=m[m.length-1],a=m.slice(0,m.length-1);if(h==="*")throw Error("Unexpected star in SufTrie key: "+m);{let r=this.map.get(h);r||this.map.set(h,r=new b),r.add(a,S)}}}get(m,S){const h=[];m===""&&h.push(...this.epsilon.map(s=>s.substitute(S))),this.star.length&&h.push(...this.star.map(s=>s.substitute(S,m)));const a=m[m.length-1],r=m.slice(0,m.length-1),i=this.map.get(a);return i&&h.push(...i.get(r,S)),h}toString(m=""){const S=[];return this.star.length&&S.push("* => "+this.star.join("; ")),this.epsilon.length&&S.push("\u03B5 => "+this.epsilon.join("; ")),[...this.map.entries()].map(([h,a])=>S.push(h+`$ => `+a.toString(m+" "))),S.map(h=>m+h).join(` `)}}e.SufTrie=b;var D;(function(v){v.capture="capture",v.basename="basename",v.dirname="dirname",v.extname="extname"})(D||(D={}));const T=/\$[({](capture|basename|dirname|extname)[)}]/g;class f{constructor(m){this.tokens=[],T.lastIndex=0;let S,h=0;for(;S=T.exec(m);){const a=m.slice(h,S.index);this.tokens.push(a);const r=S[1];switch(r){case"basename":case"dirname":case"extname":case"capture":this.tokens.push({capture:r});break;default:throw Error("unknown substitution type: "+r)}h=S.index+S[0].length}if(h!==m.length){const a=m.slice(h,m.length);this.tokens.push(a)}}substitute(m,S){return this.tokens.map(h=>{if(typeof h=="string")return h;switch(h.capture){case"basename":return m.basename;case"dirname":return m.dirname;case"extname":return m.extname;case"capture":return S||""}}).join("")}}}),define(Q[525],Y([1,0,10,206,55,69,33,20,4,102,6,26,3529,17]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NewExplorerItem=e.ExplorerItem=e.ExplorerModel=void 0;class i{constructor(d,p,c,l,n){this.contextService=d,this.uriIdentityService=p,this._onDidChangeRoots=new S.Emitter;const g=()=>this._roots=this.contextService.getWorkspace().folders.map(w=>new s(w.uri,c,l,n,void 0,!0,!1,!1,!1,w.name));g(),this._listener=this.contextService.onDidChangeWorkspaceFolders(()=>{g(),this._onDidChangeRoots.fire()})}get roots(){return this._roots}get onDidChangeRoots(){return this._onDidChangeRoots.event}findAll(d){return(0,f.coalesce)(this.roots.map(p=>p.find(d)))}findClosest(d){const p=this.contextService.getWorkspaceFolder(d);if(p){const c=this.roots.find(l=>this.uriIdentityService.extUri.isEqual(l.resource,p.uri));if(c)return c.find(d)}return null}dispose(){(0,v.dispose)(this._listener)}}e.ExplorerModel=i;class s{constructor(d,p,c,l,n,g,w,E,C,I=(0,h.basenameOrAuthority)(d),_,A=!1){this.resource=d,this.fileService=p,this.configService=c,this.filesConfigService=l,this._parent=n,this._isDirectory=g,this._isSymbolicLink=w,this._readonly=E,this._locked=C,this._name=I,this._mtime=_,this._unknown=A,this.error=void 0,this._isExcluded=!1,this._isDirectoryResolved=!1}get isExcluded(){return this._isExcluded?!0:this._parent?this._parent.isExcluded:!1}set isExcluded(d){this._isExcluded=d}hasChildren(d){return this.hasNests?this.nestedChildren?.some(p=>d(p))??!1:this.isDirectory}get hasNests(){return!!this.nestedChildren?.length}get isDirectoryResolved(){return this._isDirectoryResolved}get isSymbolicLink(){return!!this._isSymbolicLink}get isDirectory(){return!!this._isDirectory}get isReadonly(){return this.filesConfigService.isReadonly(this.resource,{resource:this.resource,name:this.name,readonly:this._readonly,locked:this._locked})}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(d){this._parent?.removeChild(this),this._name=d,this._parent?.addChild(this)}getId(){return this.root.resource.toString()+"::"+this.resource.toString()}toString(){return`ExplorerItem: ${this.name}`}get isRoot(){return this===this.root}static create(d,p,c,l,n,g){const w=new s(l.resource,d,p,c,n,l.isDirectory,l.isSymbolicLink,l.readonly,l.locked,l.name,l.mtime,!l.isFile&&!l.isDirectory);if(w.isDirectory&&(w._isDirectoryResolved=!!l.children||!!g&&g.some(E=>(0,h.isEqualOrParent)(E,w.resource)),l.children))for(let E=0,C=l.children.length;E<C;E++){const I=s.create(d,p,c,l.children[E],w,g);w.addChild(I)}return w}static mergeLocalWithDisk(d,p){if(d.resource.toString()!==p.resource.toString())return;const c=d.isDirectory||p.isDirectory;if(!(c&&p._isDirectoryResolved&&!d._isDirectoryResolved)&&(p.resource=d.resource,p.isRoot||p.updateName(d.name),p._isDirectory=d.isDirectory,p._mtime=d.mtime,p._isDirectoryResolved=d._isDirectoryResolved,p._isSymbolicLink=d.isSymbolicLink,p.error=d.error,c&&d._isDirectoryResolved)){const l=new D.ResourceMap;p.children.forEach(n=>{l.set(n.resource,n)}),p.children.clear(),d.children.forEach(n=>{const g=l.get(n.resource);g?(s.mergeLocalWithDisk(n,g),p.addChild(g),l.delete(n.resource)):p.addChild(n)}),l.forEach(n=>{n instanceof o&&p.addChild(n)})}}addChild(d){d._parent=this,d.updateResource(!1),this.children.set(this.getPlatformAwareName(d.name),d)}getChild(d){return this.children.get(this.getPlatformAwareName(d))}fetchChildren(d){const p=this.configService.getValue({resource:this.root.resource}).explorer.fileNesting;return p.enabled&&this.nestedChildren?this.nestedChildren:(async()=>{if(!this._isDirectoryResolved){const l=d==="modified";this.error=void 0;try{const n=await this.fileService.resolve(this.resource,{resolveSingleChildDescendants:!0,resolveMetadata:l}),g=s.create(this.fileService,this.configService,this.filesConfigService,n,this);s.mergeLocalWithDisk(g,this)}catch(n){throw this.error=n,n}this._isDirectoryResolved=!0}const c=[];if(p.enabled){const l=[],n=[];for(const w of this.children.entries())w[1].nestedParent=void 0,w[1].isDirectory?n.push(w):l.push(w);const g=this.fileNester.nest(l.map(([w])=>w),this.getPlatformAwareName(this.name));for(const[w,E]of l){const C=g.get(w);if(C!==void 0){E.nestedChildren=[];for(const I of C.keys()){const _=(0,r.assertIsDefined)(this.children.get(I));E.nestedChildren.push(_),_.nestedParent=E}c.push(E)}else E.nestedChildren=void 0}for(const[w,E]of n.values())c.push(E)}else this.children.forEach(l=>{c.push(l)});return c})()}get fileNester(){if(!this.root._fileNester){const d=this.configService.getValue({resource:this.root.resource}).explorer.fileNesting,p=Object.entries(d.patterns).filter(c=>typeof c[0]=="string"&&typeof c[1]=="string"&&c[0]&&c[1]).map(([c,l])=>[this.getPlatformAwareName(c.trim()),l.split(",").map(n=>this.getPlatformAwareName(n.trim().replace(/\u200b/g,"").trim())).filter(n=>n!=="")]);this.root._fileNester=new a.ExplorerFileNestingTrie(p)}return this.root._fileNester}removeChild(d){this.nestedChildren=void 0,this.children.delete(this.getPlatformAwareName(d.name))}forgetChildren(){this.children.clear(),this.nestedChildren=void 0,this._isDirectoryResolved=!1,this._fileNester=void 0}getPlatformAwareName(d){return this.fileService.hasCapability(this.resource,1024)?d:d.toLowerCase()}move(d){this.nestedParent?.removeChild(this),this._parent?.removeChild(this),d.removeChild(this),d.addChild(this),this.updateResource(!0)}updateResource(d){this._parent&&(this.resource=(0,h.joinPath)(this._parent.resource,this.name)),d&&this.isDirectory&&this.children.forEach(p=>{p.updateResource(!0)})}rename(d){this.updateName(d.name),this._mtime=d.mtime,this.updateResource(!0)}find(d){const p=!this.fileService.hasCapability(d,1024);return d&&this.resource.scheme===d.scheme&&(0,T.equalsIgnoreCase)(this.resource.authority,d.authority)&&(p?(0,T.startsWithIgnoreCase)(d.path,this.resource.path):d.path.startsWith(this.resource.path))?this.findByPath((0,T.rtrim)(d.path,b.posix.sep),this.resource.path.length,p):null}findByPath(d,p,c){if((0,y.isEqual)((0,T.rtrim)(this.resource.path,b.posix.sep),d,c))return this;if(this.isDirectory){for(;p<d.length&&d[p]===b.posix.sep;)p++;let l=d.indexOf(b.posix.sep,p);l===-1&&(l=d.length);const n=d.substring(p,l),g=this.children.get(this.getPlatformAwareName(n));if(g)return g.findByPath(d,l,c)}return null}}e.ExplorerItem=s,fe([m.memoize],s.prototype,"children",null);class o extends s{constructor(d,p,c,l,n){super(t.URI.file(""),d,p,c,l,n),this._isDirectoryResolved=!0}}e.NewExplorerItem=o}),define(Q[3530],Y([1,0,14,22]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revealResourcesInOS=void 0;function b(D,T,f){if(D.length)(0,t.sequence)(D.map(v=>async()=>{(v.scheme===y.Schemas.file||v.scheme===y.Schemas.vscodeUserData)&&T.showItemInFolder(v.fsPath)}));else if(f.getWorkspace().folders.length){const v=f.getWorkspace().folders[0].uri;v.scheme===y.Schemas.file&&T.showItemInFolder(v.fsPath)}}e.revealResourcesInOS=b}),define(Q[3531],Y([1,0,7,31,4,48,73,842,900,2748,13,220,8,5,276]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";var s;Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsAccessibility=void 0;let o=class{static{s=this}static{this.IsReading=new a.RawContextKey("isReadingLineWithInlayHints",!1,{type:"boolean",description:(0,m.localize)(0,null)})}static{this.ID="editor.contrib.InlayHintsAccessibility"}static get(d){return d.getContribution(s.ID)??void 0}constructor(d,p,c,l){this._editor=d,this._audioCueService=c,this._instaService=l,this._sessionDispoosables=new b.DisposableStore,this._ariaElement=document.createElement("span"),this._ariaElement.style.position="fixed",this._ariaElement.className="inlayhint-accessibility-element",this._ariaElement.tabIndex=0,this._ariaElement.setAttribute("aria-description",(0,m.localize)(1,null)),this._ctxIsReading=s.IsReading.bindTo(p)}dispose(){this._sessionDispoosables.dispose(),this._ctxIsReading.reset(),this._ariaElement.remove()}_reset(){t.clearNode(this._ariaElement),this._sessionDispoosables.clear(),this._ctxIsReading.reset()}async _read(d,p){if(this._sessionDispoosables.clear(),this._ariaElement.isConnected||this._editor.getDomNode()?.appendChild(this._ariaElement),!this._editor.hasModel()||!this._ariaElement.isConnected){this._ctxIsReading.set(!1);return}const c=new y.CancellationTokenSource;this._sessionDispoosables.add(c);for(const E of p)await E.resolve(c.token);if(c.token.isCancellationRequested)return;const l=this._editor.getModel(),n=[];let g=0,w=!1;for(const E of p){const C=l.getValueInRange({startLineNumber:d,startColumn:g+1,endLineNumber:d,endColumn:E.hint.position.column});if(C.length>0&&(n.push(C),g=E.hint.position.column-1),g>750){n.push("\u2026"),w=!0;break}const I=document.createElement("em"),{label:_}=E.hint;if(typeof _=="string")I.innerText=_;else for(const A of _)if(A.command){const k=this._instaService.createInstance(i.Link,I,{href:(0,f.asCommandLink)(A.command),label:A.label,title:A.command.title},void 0);this._sessionDispoosables.add(k)}else I.innerText+=A.label;n.push(I)}w||n.push(l.getValueInRange({startLineNumber:d,startColumn:g+1,endLineNumber:d,endColumn:Number.MAX_SAFE_INTEGER})),t.reset(this._ariaElement,...n),this._ariaElement.focus(),this._ctxIsReading.set(!0),this._sessionDispoosables.add(t.addDisposableListener(this._ariaElement,"focusout",()=>{this._reset()}))}startInlayHintsReading(){if(!this._editor.hasModel())return;const d=this._editor.getPosition().lineNumber,p=v.InlayHintsController.get(this._editor)?.getInlayHintsForLine(d);!p||p.length===0?this._audioCueService.playAudioCue(h.AudioCue.noInlayHints):this._read(d,p)}stopInlayHintsReading(){this._reset(),this._editor.focus()}};e.InlayHintsAccessibility=o,e.InlayHintsAccessibility=o=s=fe([O(1,a.IContextKeyService),O(2,h.IAudioCueService),O(3,r.IInstantiationService)],o),(0,S.registerAction2)(class extends D.EditorAction2{constructor(){super({id:"inlayHints.startReadingLineWithHint",title:{value:(0,m.localize)(2,null),original:"Read Line With Inline Hints"},precondition:T.EditorContextKeys.hasInlayHintsProvider,f1:!0})}runEditorCommand(d,p){o.get(p)?.startInlayHintsReading()}}),(0,S.registerAction2)(class extends D.EditorAction2{constructor(){super({id:"inlayHints.stopReadingLineWithHint",title:{value:(0,m.localize)(3,null),original:"Stop Inlay Hints Reading"},precondition:o.IsReading,f1:!0,keybinding:{weight:100,primary:9}})}runEditorCommand(d,p){o.get(p)?.stopInlayHintsReading()}}),(0,D.registerEditorContribution)(o.ID,o,4)}),define(Q[1275],Y([1,0,238,27]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lineRangeAsRange=e.invertLineRange=void 0;function b(T,f){if(T.isEmpty)return[];const v=[];return v.push(new t.LineRange(1,T.startLineNumber)),v.push(new t.LineRange(T.endLineNumberExclusive,f.getLineCount()+1)),v.filter(m=>!m.isEmpty)}e.invertLineRange=b;function D(T){return new y.Range(T.startLineNumber,1,T.endLineNumberExclusive-1,1)}e.lineRangeAsRange=D}),define(Q[1276],Y([1,0,8]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveWindowSetting=e.INTERACTIVE_INPUT_CURSOR_BOUNDARY=void 0,e.INTERACTIVE_INPUT_CURSOR_BOUNDARY=new t.RawContextKey("interactiveInputCursorAtBoundary","none"),e.InteractiveWindowSetting={interactiveWindowAlwaysScrollOnNewCell:"interactiveWindow.alwaysScrollOnNewCell"}}),define(Q[917],Y([1,0,6,4,5]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveDocumentService=e.IInteractiveDocumentService=void 0,e.IInteractiveDocumentService=(0,b.createDecorator)("IInteractiveDocumentService");class D extends y.Disposable{constructor(){super(),this._onWillAddInteractiveDocument=this._register(new t.Emitter),this.onWillAddInteractiveDocument=this._onWillAddInteractiveDocument.event,this._onWillRemoveInteractiveDocument=this._register(new t.Emitter),this.onWillRemoveInteractiveDocument=this._onWillRemoveInteractiveDocument.event}willCreateInteractiveDocument(f,v,m){this._onWillAddInteractiveDocument.fire({notebookUri:f,inputUri:v,languageId:m})}willRemoveInteractiveDocument(f,v){this._onWillRemoveInteractiveDocument.fire({notebookUri:f,inputUri:v})}}e.InteractiveDocumentService=D}),define(Q[1277],Y([1,0,555,4,69,5]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveHistoryService=e.IInteractiveHistoryService=void 0,e.IInteractiveHistoryService=(0,D.createDecorator)("IInteractiveHistoryService");class T extends y.Disposable{constructor(){super(),this._history=new b.ResourceMap}addToHistory(v,m){if(!this._history.has(v)){this._history.set(v,new t.HistoryNavigator2([m],50));return}const S=this._history.get(v);S.resetCursor(),S?.current()!==m&&S?.add(m)}getPreviousValue(v){return this._history.get(v)?.previous()??null}getNextValue(v){return this._history.get(v)?.next()??null}replaceLast(v,m){if(this._history.has(v)){const S=this._history.get(v);S?.current()!==m&&S?.replaceLast(m)}else{this._history.set(v,new t.HistoryNavigator2([m],50));return}}clearHistory(v){this._history.delete(v)}has(v){return!!this._history.has(v)}}e.InteractiveHistoryService=T}),define(Q[918],Y([1,0,2762,32,18,8,77]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LOCAL_HISTORY_ICON_RESTORE=e.LOCAL_HISTORY_ICON_ENTRY=e.LOCAL_HISTORY_MENU_CONTEXT_KEY=e.LOCAL_HISTORY_MENU_CONTEXT_VALUE=e.getLocalHistoryDateFormatter=void 0;let f;function v(){if(!f){const m={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"};let S;try{S=new Intl.DateTimeFormat(b.language,m)}catch{S=new Intl.DateTimeFormat(void 0,m)}f={format:h=>S.format(h)}}return f}e.getLocalHistoryDateFormatter=v,e.LOCAL_HISTORY_MENU_CONTEXT_VALUE="localHistory:item",e.LOCAL_HISTORY_MENU_CONTEXT_KEY=D.ContextKeyExpr.equals("timelineItem",e.LOCAL_HISTORY_MENU_CONTEXT_VALUE),e.LOCAL_HISTORY_ICON_ENTRY=(0,T.registerIcon)("localHistory-icon",y.Codicon.circleOutline,(0,t.localize)(0,null)),e.LOCAL_HISTORY_ICON_RESTORE=(0,T.registerIcon)("localHistory-restore",y.Codicon.check,(0,t.localize)(1,null))}),define(Q[1278],Y([1,0,6,4,10,25,26,62]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalHistoryFileSystemProvider=void 0;class v{static{this.SCHEMA="vscode-local-history"}static toLocalHistoryFileSystem(S){const h={location:S.location.toString(!0),associatedResource:S.associatedResource.toString(!0)};return S.associatedResource.with({scheme:v.SCHEMA,query:JSON.stringify(h)})}static fromLocalHistoryFileSystem(S){const h=JSON.parse(S.query);return{location:b.URI.parse(h.location),associatedResource:b.URI.parse(h.associatedResource)}}static{this.EMPTY_RESOURCE=b.URI.from({scheme:v.SCHEMA,path:"/empty"})}static{this.EMPTY={location:v.EMPTY_RESOURCE,associatedResource:v.EMPTY_RESOURCE}}get capabilities(){return 2050}constructor(S){this.fileService=S,this.mapSchemeToProvider=new Map,this.onDidChangeCapabilities=t.Event.None,this.onDidChangeFile=t.Event.None}async withProvider(S){const h=S.scheme;let a=this.mapSchemeToProvider.get(h);if(!a){const r=this.fileService.getProvider(h);r?a=Promise.resolve(r):a=new Promise(i=>{const s=this.fileService.onDidChangeFileSystemProviderRegistrations(o=>{o.added&&o.provider&&o.scheme===h&&(s.dispose(),i(o.provider))})}),this.mapSchemeToProvider.set(h,a)}return a}async stat(S){const h=v.fromLocalHistoryFileSystem(S).location;return(0,T.isEqual)(v.EMPTY_RESOURCE,h)?{type:D.FileType.File,ctime:0,mtime:0,size:0}:(await this.withProvider(h)).stat(h)}async readFile(S){const h=v.fromLocalHistoryFileSystem(S).location;if((0,T.isEqual)(v.EMPTY_RESOURCE,h))return f.VSBuffer.fromString("").buffer;const a=await this.withProvider(h);if((0,D.hasReadWriteCapability)(a))return a.readFile(h);throw new Error("Unsupported")}async writeFile(S,h,a){}async mkdir(S){}async readdir(S){return[]}async rename(S,h,a){}async delete(S,h){}watch(S,h){return y.Disposable.None}}e.LocalHistoryFileSystemProvider=v}),define(Q[3532],Y([1,0,2769]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.minimumTranslatedStrings=void 0,e.minimumTranslatedStrings={showLanguagePackExtensions:(0,t.localize)(0,null),searchMarketplace:(0,t.localize)(1,null),installAndRestartMessage:(0,t.localize)(2,null),installAndRestart:(0,t.localize)(3,null)}}),define(Q[3533],Y([1,0,31,74,75,28]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),D.CommandsRegistry.registerCommand("_executeMappedEditsProvider",async(T,f,v,m)=>{const S=T.get(b.ITextModelService),h=T.get(y.ILanguageFeaturesService),a=await S.createModelReference(f);let r=null;try{const i=h.mappedEditsProvider.ordered(a.object.textEditorModel);if(i.length>0){const s=i[0],o=new t.CancellationTokenSource;r=await s.provideMappedEdits(a.object.textEditorModel,v,m,o.token)}}finally{a.dispose()}return r})}),define(Q[3534],Y([1,0,7,817,217,340,22,449,33]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdownDocument=e.DEFAULT_MARKDOWN_STYLES=void 0,e.DEFAULT_MARKDOWN_STYLES=` body { padding: 10px 20px; line-height: 22px; max-width: 882px; margin: 0 auto; } body *:last-child { margin-bottom: 0; } img { max-width: 100%; max-height: 100%; } a { text-decoration: none; } a:hover { text-decoration: underline; } a:focus, input:focus, select:focus, textarea:focus { outline: 1px solid -webkit-focus-ring-color; outline-offset: -1px; } hr { border: 0; height: 2px; border-bottom: 2px solid; } h1 { padding-bottom: 0.3em; line-height: 1.2; border-bottom-width: 1px; border-bottom-style: solid; } h1, h2, h3 { font-weight: normal; } table { border-collapse: collapse; } th { text-align: left; border-bottom: 1px solid; } th, td { padding: 5px 10px; } table > tbody > tr + tr > td { border-top-width: 1px; border-top-style: solid; } blockquote { margin: 0 7px 0 5px; padding: 0 16px 0 10px; border-left-width: 5px; border-left-style: solid; } code { font-family: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace; } pre { padding: 16px; border-radius: 3px; overflow: auto; } pre code { font-family: var(--vscode-editor-font-family); font-weight: var(--vscode-editor-font-weight); font-size: var(--vscode-editor-font-size); line-height: 1.5; color: var(--vscode-editor-foreground); tab-size: 4; } .monaco-tokenized-source { white-space: pre; } /** Theming */ .pre { background-color: var(--vscode-textCodeBlock-background); } .vscode-high-contrast h1 { border-color: rgb(0, 0, 0); } .vscode-light th { border-color: rgba(0, 0, 0, 0.69); } .vscode-dark th { border-color: rgba(255, 255, 255, 0.69); } .vscode-light h1, .vscode-light hr, .vscode-light td { border-color: rgba(0, 0, 0, 0.18); } .vscode-dark h1, .vscode-dark hr, .vscode-dark td { border-color: rgba(255, 255, 255, 0.18); } @media (forced-colors: active) and (prefers-color-scheme: light){ body { forced-color-adjust: none; } } @media (forced-colors: active) and (prefers-color-scheme: dark){ body { forced-color-adjust: none; } } `;const m=[T.Schemas.http,T.Schemas.https,T.Schemas.command];function S(a,r){const i=(0,t.hookDomPurifyHrefAndSrcSanitizer)(m,!0);try{return y.sanitize(a,{ALLOWED_TAGS:[...t.basicMarkupHtmlTags,"checkbox","checklist"],ALLOWED_ATTR:[...b.allowedMarkdownAttr,"data-command","name","id","role","tabindex","x-dispatch","required","checked","placeholder","when-checked","checked-on"],...r?{ALLOW_UNKNOWN_PROTOCOLS:!0}:{}})}finally{i.dispose()}}async function h(a,r,i,s=!0,o=!1,u){const d=(p,c,l)=>l?typeof c!="string"?(l(null,`<code>${(0,v.escape)(p)}</code>`),""):(r.whenInstalledExtensionsRegistered().then(async()=>{if(u?.isCancellationRequested){l(null,"");return}const n=i.getLanguageIdByLanguageName(c),g=await(0,f.tokenizeToString)(i,p,n);l(null,`<code>${g}</code>`)}),""):p;return new Promise((p,c)=>{(0,D.marked)(a,{highlight:d},(l,n)=>l?c(l):p(n))}).then(p=>s?S(p,o):p)}e.renderMarkdownDocument=h}),define(Q[919],Y([1,0,128,195,33,26,283]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilterOptions=e.ResourceGlobMatcher=void 0;class f{constructor(S,h,a){this.globalExpression=(0,y.parse)(S),this.expressionsByRoot=T.TernarySearchTree.forUris(r=>a.extUri.ignorePathCasing(r));for(const r of h)this.expressionsByRoot.set(r.root,{root:r.root,expression:(0,y.parse)(r.expression)})}matches(S){const h=this.expressionsByRoot.findSubstr(S);if(h){const a=(0,D.relativePath)(h.root,S);if(a&&h.expression(a))return!0}return!!this.globalExpression(S.path)}}e.ResourceGlobMatcher=f;class v{static{this._filter=t.matchesFuzzy2}static{this._messageFilter=t.matchesFuzzy}static EMPTY(S){return new v("",[],!1,!1,!1,S)}constructor(S,h,a,r,i,s){this.filter=S,this.showWarnings=!1,this.showErrors=!1,this.showInfos=!1,S=S.trim(),this.showWarnings=a,this.showErrors=r,this.showInfos=i;const o=Array.isArray(h)?h:[],u=Array.isArray(h)?(0,y.getEmptyExpression)():h;for(const{expression:c}of o)for(const l of Object.keys(c))l.endsWith("/**")||(c[`${b.rtrim(l,"/")}/**`]=c[l]);const d=S.startsWith("!");this.textFilter={text:(d?b.ltrim(S,"!"):S).trim(),negate:d};const p=(0,y.getEmptyExpression)();if(S){const c=(0,y.splitGlobAware)(S,",").map(l=>l.trim()).filter(l=>!!l.length);for(const l of c)if(l.startsWith("!")){const n=b.ltrim(l,"!");n&&this.setPattern(u,n)}else this.setPattern(p,l)}this.excludesMatcher=new f(u,o,s),this.includesMatcher=new f(p,[],s)}setPattern(S,h){h[0]==="."&&(h="*"+h),S[`**/${h}/**`]=!0,S[`**/${h}`]=!0}}e.FilterOptions=v}),define(Q[728],Y([1,0,26,27,154,20,69,6,122,33,693]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersModel=e.RelatedInformation=e.MarkerTableItem=e.Marker=e.ResourceMarkers=e.compareMarkersByUri=void 0;function h(d,p){return t.extUri.compare(d.resource,p.resource)}e.compareMarkersByUri=h;function a(d,p){const[c]=d.markers,[l]=p.markers;let n=0;return c&&l&&(n=b.MarkerSeverity.compare(c.marker.severity,l.marker.severity)),n===0&&(n=d.path.localeCompare(p.path)||d.name.localeCompare(p.name)),n}class r{constructor(p,c){this.id=p,this.resource=c,this._markersMap=new T.ResourceMap,this._total=0,this.path=this.resource.fsPath,this.name=(0,t.basename)(this.resource)}get markers(){return this._cachedMarkers||(this._cachedMarkers=(0,D.flatten)([...this._markersMap.values()]).sort(r._compareMarkers)),this._cachedMarkers}has(p){return this._markersMap.has(p)}set(p,c){this.delete(p),(0,D.isNonEmptyArray)(c)&&(this._markersMap.set(p,c),this._total+=c.length,this._cachedMarkers=void 0)}delete(p){const c=this._markersMap.get(p);c&&(this._total-=c.length,this._cachedMarkers=void 0,this._markersMap.delete(p))}get total(){return this._total}static _compareMarkers(p,c){return b.MarkerSeverity.compare(p.marker.severity,c.marker.severity)||t.extUri.compare(p.resource,c.resource)||y.Range.compareRangesUsingStarts(p.marker,c.marker)}}e.ResourceMarkers=r;class i{get resource(){return this.marker.resource}get range(){return this.marker}get lines(){return this._lines||(this._lines=(0,m.splitLines)(this.marker.message)),this._lines}constructor(p,c,l=[]){this.id=p,this.marker=c,this.relatedInformation=l}toString(){return JSON.stringify({...this.marker,resource:this.marker.resource.path,relatedInformation:this.relatedInformation.length?this.relatedInformation.map(p=>({...p.raw,resource:p.raw.resource.path})):void 0},null," ")}}e.Marker=i;class s extends i{constructor(p,c,l,n,g,w){super(p.id,p.marker,p.relatedInformation),this.sourceMatches=c,this.codeMatches=l,this.messageMatches=n,this.fileMatches=g,this.ownerMatches=w}}e.MarkerTableItem=s;class o{constructor(p,c,l){this.id=p,this.marker=c,this.raw=l}}e.RelatedInformation=o;class u{get resourceMarkers(){return this.cachedSortedResources||(this.cachedSortedResources=[...this.resourcesByUri.values()].sort(a)),this.cachedSortedResources}constructor(){this.cachedSortedResources=void 0,this._onDidChange=new f.Emitter,this.onDidChange=this._onDidChange.event,this._total=0,this.resourcesByUri=new Map}reset(){const p=new Set;for(const c of this.resourcesByUri.values())p.add(c);this.resourcesByUri.clear(),this._total=0,this._onDidChange.fire({removed:p,added:new Set,updated:new Set})}get total(){return this._total}getResourceMarkers(p){return this.resourcesByUri.get(t.extUri.getComparisonKey(p,!0))??null}setResourceMarkers(p){const c={added:new Set,removed:new Set,updated:new Set};for(const[l,n]of p){if(S.unsupportedSchemas.has(l.scheme))continue;const g=t.extUri.getComparisonKey(l,!0);let w=this.resourcesByUri.get(g);if((0,D.isNonEmptyArray)(n)){if(w)c.updated.add(w);else{const I=this.id(l.toString());w=new r(I,l.with({fragment:null})),this.resourcesByUri.set(g,w),c.added.add(w)}const E=new Map,C=n.map(I=>{const _=b.IMarkerData.makeKey(I),A=E.get(_)||0;E.set(_,A+1);const k=this.id(w.id,_,A,I.resource.toString());let L;return I.relatedInformation&&(L=I.relatedInformation.map((R,M)=>new o(this.id(k,R.resource.toString(),R.startLineNumber,R.startColumn,R.endLineNumber,R.endColumn,M),I,R))),new i(k,I,L)});this._total-=w.total,w.set(l,C),this._total+=w.total}else w&&(this._total-=w.total,w.delete(l),this._total+=w.total,w.total===0?(this.resourcesByUri.delete(g),c.removed.add(w)):c.updated.add(w))}this.cachedSortedResources=void 0,(c.added.size||c.removed.size||c.updated.size)&&this._onDidChange.fire(c)}id(...p){const c=new v.Hasher;for(const l of p)c.hash(l);return`${c.value}`}dispose(){this._onDidChange.dispose(),this.resourcesByUri.clear()}}e.MarkersModel=u}),define(Q[609],Y([1,0,2778,26,154]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D{static{this.MARKERS_PANEL_TOGGLE_LABEL=t.localize(0,null)}static{this.MARKERS_PANEL_SHOW_LABEL=t.localize(1,null)}static{this.PROBLEMS_PANEL_CONFIGURATION_TITLE=t.localize(2,null)}static{this.PROBLEMS_PANEL_CONFIGURATION_AUTO_REVEAL=t.localize(3,null)}static{this.PROBLEMS_PANEL_CONFIGURATION_VIEW_MODE=t.localize(4,null)}static{this.PROBLEMS_PANEL_CONFIGURATION_SHOW_CURRENT_STATUS=t.localize(5,null)}static{this.PROBLEMS_PANEL_CONFIGURATION_COMPARE_ORDER=t.localize(6,null)}static{this.PROBLEMS_PANEL_CONFIGURATION_COMPARE_ORDER_SEVERITY=t.localize(7,null)}static{this.PROBLEMS_PANEL_CONFIGURATION_COMPARE_ORDER_POSITION=t.localize(8,null)}static{this.MARKERS_PANEL_TITLE_PROBLEMS=t.localize(9,null)}static{this.MARKERS_PANEL_NO_PROBLEMS_BUILT=t.localize(10,null)}static{this.MARKERS_PANEL_NO_PROBLEMS_ACTIVE_FILE_BUILT=t.localize(11,null)}static{this.MARKERS_PANEL_NO_PROBLEMS_FILTERS=t.localize(12,null)}static{this.MARKERS_PANEL_ACTION_TOOLTIP_MORE_FILTERS=t.localize(13,null)}static{this.MARKERS_PANEL_FILTER_LABEL_SHOW_ERRORS=t.localize(14,null)}static{this.MARKERS_PANEL_FILTER_LABEL_SHOW_WARNINGS=t.localize(15,null)}static{this.MARKERS_PANEL_FILTER_LABEL_SHOW_INFOS=t.localize(16,null)}static{this.MARKERS_PANEL_FILTER_LABEL_EXCLUDED_FILES=t.localize(17,null)}static{this.MARKERS_PANEL_FILTER_LABEL_ACTIVE_FILE=t.localize(18,null)}static{this.MARKERS_PANEL_ACTION_TOOLTIP_FILTER=t.localize(19,null)}static{this.MARKERS_PANEL_ACTION_TOOLTIP_QUICKFIX=t.localize(20,null)}static{this.MARKERS_PANEL_FILTER_ARIA_LABEL=t.localize(21,null)}static{this.MARKERS_PANEL_FILTER_PLACEHOLDER=t.localize(22,null)}static{this.MARKERS_PANEL_FILTER_ERRORS=t.localize(23,null)}static{this.MARKERS_PANEL_FILTER_WARNINGS=t.localize(24,null)}static{this.MARKERS_PANEL_FILTER_INFOS=t.localize(25,null)}static{this.MARKERS_PANEL_SINGLE_ERROR_LABEL=t.localize(26,null)}static{this.MARKERS_PANEL_MULTIPLE_ERRORS_LABEL=f=>t.localize(27,null,""+f)}static{this.MARKERS_PANEL_SINGLE_WARNING_LABEL=t.localize(28,null)}static{this.MARKERS_PANEL_MULTIPLE_WARNINGS_LABEL=f=>t.localize(29,null,""+f)}static{this.MARKERS_PANEL_SINGLE_INFO_LABEL=t.localize(30,null)}static{this.MARKERS_PANEL_MULTIPLE_INFOS_LABEL=f=>t.localize(31,null,""+f)}static{this.MARKERS_PANEL_SINGLE_UNKNOWN_LABEL=t.localize(32,null)}static{this.MARKERS_PANEL_MULTIPLE_UNKNOWNS_LABEL=f=>t.localize(33,null,""+f)}static{this.MARKERS_PANEL_AT_LINE_COL_NUMBER=(f,v)=>t.localize(34,null,""+f,""+v)}static{this.MARKERS_TREE_ARIA_LABEL_RESOURCE=(f,v,m)=>t.localize(35,null,f,v,m)}static{this.MARKERS_TREE_ARIA_LABEL_MARKER=f=>{const v=f.relatedInformation.length?t.localize(36,null,f.relatedInformation.length):"";switch(f.marker.severity){case b.MarkerSeverity.Error:return f.marker.source?t.localize(37,null,f.marker.message,f.marker.startLineNumber,f.marker.startColumn,v,f.marker.source):t.localize(38,null,f.marker.message,f.marker.startLineNumber,f.marker.startColumn,v);case b.MarkerSeverity.Warning:return f.marker.source?t.localize(39,null,f.marker.message,f.marker.startLineNumber,f.marker.startColumn,v,f.marker.source):t.localize(40,null,f.marker.message,f.marker.startLineNumber,f.marker.startColumn,v,v);case b.MarkerSeverity.Info:return f.marker.source?t.localize(41,null,f.marker.message,f.marker.startLineNumber,f.marker.startColumn,v,f.marker.source):t.localize(42,null,f.marker.message,f.marker.startLineNumber,f.marker.startColumn,v);default:return f.marker.source?t.localize(43,null,f.marker.source,f.marker.message,f.marker.startLineNumber,f.marker.startColumn,v,f.marker.source):t.localize(44,null,f.marker.message,f.marker.startLineNumber,f.marker.startColumn,v)}}}static{this.MARKERS_TREE_ARIA_LABEL_RELATED_INFORMATION=f=>t.localize(45,null,f.message,f.startLineNumber,f.startColumn,(0,y.basename)(f.resource))}static{this.SHOW_ERRORS_WARNINGS_ACTION_LABEL=t.localize(46,null)}}e.default=D}),define(Q[526],Y([1,0,8]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersContextKeys=e.Markers=e.MarkersViewMode=void 0;var y;(function(T){T.Table="table",T.Tree="tree"})(y||(e.MarkersViewMode=y={}));var b;(function(T){T.MARKERS_CONTAINER_ID="workbench.panel.markers",T.MARKERS_VIEW_ID="workbench.panel.markers.view",T.MARKERS_VIEW_STORAGE_ID="workbench.panel.markers",T.MARKER_COPY_ACTION_ID="problems.action.copy",T.MARKER_COPY_MESSAGE_ACTION_ID="problems.action.copyMessage",T.RELATED_INFORMATION_COPY_MESSAGE_ACTION_ID="problems.action.copyRelatedInformationMessage",T.FOCUS_PROBLEMS_FROM_FILTER="problems.action.focusProblemsFromFilter",T.MARKERS_VIEW_FOCUS_FILTER="problems.action.focusFilter",T.MARKERS_VIEW_CLEAR_FILTER_TEXT="problems.action.clearFilterText",T.MARKERS_VIEW_SHOW_MULTILINE_MESSAGE="problems.action.showMultilineMessage",T.MARKERS_VIEW_SHOW_SINGLELINE_MESSAGE="problems.action.showSinglelineMessage",T.MARKER_OPEN_ACTION_ID="problems.action.open",T.MARKER_OPEN_SIDE_ACTION_ID="problems.action.openToSide",T.MARKER_SHOW_PANEL_ID="workbench.action.showErrorsWarnings",T.MARKER_SHOW_QUICK_FIX="problems.action.showQuickFixes",T.TOGGLE_MARKERS_VIEW_ACTION_ID="workbench.actions.view.toggleProblems"})(b||(e.Markers=b={}));var D;(function(T){T.MarkersViewModeContextKey=new t.RawContextKey("problemsViewMode","tree"),T.MarkersTreeVisibilityContextKey=new t.RawContextKey("problemsVisibility",!1),T.MarkerFocusContextKey=new t.RawContextKey("problemFocus",!1),T.MarkerViewFilterFocusContextKey=new t.RawContextKey("problemsFilterFocus",!1),T.RelatedInformationFocusContextKey=new t.RawContextKey("relatedInformationFocus",!1),T.ShowErrorsFilterContextKey=new t.RawContextKey("problems.filter.errors",!0),T.ShowWarningsFilterContextKey=new t.RawContextKey("problems.filter.warnings",!0),T.ShowInfoFilterContextKey=new t.RawContextKey("problems.filter.info",!0),T.ShowActiveFileFilterContextKey=new t.RawContextKey("problems.filter.activeFile",!1),T.ShowExcludedFilesFilterContextKey=new t.RawContextKey("problems.filter.excludedFiles",!0)})(D||(e.MarkersContextKeys=D={}))}),define(Q[920],Y([1,0,7,34,29,609,4,6,32,37,157,526,1806]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickFixActionViewItem=e.QuickFixAction=e.MarkersFilters=void 0;class a extends T.Disposable{constructor(o,u){super(),this.contextKeyService=u,this._onDidChange=this._register(new f.Emitter),this.onDidChange=this._onDidChange.event,this._excludedFiles=h.MarkersContextKeys.ShowExcludedFilesFilterContextKey.bindTo(this.contextKeyService),this._activeFile=h.MarkersContextKeys.ShowActiveFileFilterContextKey.bindTo(this.contextKeyService),this._showWarnings=h.MarkersContextKeys.ShowWarningsFilterContextKey.bindTo(this.contextKeyService),this._showErrors=h.MarkersContextKeys.ShowErrorsFilterContextKey.bindTo(this.contextKeyService),this._showInfos=h.MarkersContextKeys.ShowInfoFilterContextKey.bindTo(this.contextKeyService),this._showErrors.set(o.showErrors),this._showWarnings.set(o.showWarnings),this._showInfos.set(o.showInfos),this._excludedFiles.set(o.excludedFiles),this._activeFile.set(o.activeFile),this.filterHistory=o.filterHistory}get excludedFiles(){return!!this._excludedFiles.get()}set excludedFiles(o){this._excludedFiles.get()!==o&&(this._excludedFiles.set(o),this._onDidChange.fire({excludedFiles:!0}))}get activeFile(){return!!this._activeFile.get()}set activeFile(o){this._activeFile.get()!==o&&(this._activeFile.set(o),this._onDidChange.fire({activeFile:!0}))}get showWarnings(){return!!this._showWarnings.get()}set showWarnings(o){this._showWarnings.get()!==o&&(this._showWarnings.set(o),this._onDidChange.fire({showWarnings:!0}))}get showErrors(){return!!this._showErrors.get()}set showErrors(o){this._showErrors.get()!==o&&(this._showErrors.set(o),this._onDidChange.fire({showErrors:!0}))}get showInfos(){return!!this._showInfos.get()}set showInfos(o){this._showInfos.get()!==o&&(this._showInfos.set(o),this._onDidChange.fire({showInfos:!0}))}}e.MarkersFilters=a;class r extends y.Action{static{this.ID="workbench.actions.problems.quickfix"}static{this.CLASS="markers-panel-action-quickfix "+m.ThemeIcon.asClassName(v.Codicon.lightBulb)}static{this.AUTO_FIX_CLASS=r.CLASS+" autofixable"}get quickFixes(){return this._quickFixes}set quickFixes(o){this._quickFixes=o,this.enabled=this._quickFixes.length>0}autoFixable(o){this.class=o?r.AUTO_FIX_CLASS:r.CLASS}constructor(o){super(r.ID,D.default.MARKERS_PANEL_ACTION_TOOLTIP_QUICKFIX,r.CLASS,!1),this.marker=o,this._onShowQuickFixes=this._register(new f.Emitter),this.onShowQuickFixes=this._onShowQuickFixes.event,this._quickFixes=[]}run(){return this._onShowQuickFixes.fire(),Promise.resolve()}}e.QuickFixAction=r;let i=class extends S.ActionViewItem{constructor(o,u){super(null,o,{icon:!0,label:!1}),this.contextMenuService=u}onClick(o){t.EventHelper.stop(o,!0),this.showQuickFixes()}showQuickFixes(){if(!this.element||!this.isEnabled())return;const o=t.getDomNodePagePosition(this.element),u=this.action.quickFixes;u.length&&this.contextMenuService.showContextMenu({getAnchor:()=>({x:o.left+10,y:o.top+o.height+4}),getActions:()=>u})}};e.QuickFixActionViewItem=i,e.QuickFixActionViewItem=i=fe([O(1,b.IContextMenuService)],i)}),define(Q[3535],Y([1,0,2775,7,6,4,5,90,444,728,154,593,85,61,919,276,41,920,227,609,17,27,693,63]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";var w,E,C;Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersTable=void 0;const I=y.$;let _=class{static{w=this}static{this.TEMPLATE_ID="severity"}constructor(x,F){this.markersViewModel=x,this.instantiationService=F,this.templateId=w.TEMPLATE_ID}renderTemplate(x){const F=y.append(x,I(".severity")),V=y.append(F,I("")),W=y.append(x,I(".actions"));return{actionBar:new a.ActionBar(W,{actionViewItemProvider:B=>B.id===u.QuickFixAction.ID?this.instantiationService.createInstance(u.QuickFixActionViewItem,B):void 0,animated:!1}),icon:V}}renderElement(x,F,V,W){const z=K=>{(0,c.isUndefinedOrNull)(K)||y.findParentWithClass(V.icon,"monaco-table-td").classList.toggle("quickFix",K)};V.icon.title=S.MarkerSeverity.toString(x.marker.severity),V.icon.className=`marker-icon ${g.default.toString(S.MarkerSeverity.toSeverity(x.marker.severity))} codicon ${h.SeverityIcon.className(S.MarkerSeverity.toSeverity(x.marker.severity))}`,V.actionBar.clear();const B=this.markersViewModel.getViewModel(x);if(B){const K=B.quickFixAction;V.actionBar.push([K],{icon:!0,label:!1}),z(B.quickFixAction.enabled),K.onDidChange(({enabled:H})=>z(H)),K.onShowQuickFixes(()=>{const H=V.actionBar.viewItems[0];H&&H.showQuickFixes()})}}disposeTemplate(x){}};_=w=fe([O(1,T.IInstantiationService)],_);let A=class{static{E=this}static{this.TEMPLATE_ID="code"}constructor(x){this.openerService=x,this.templateId=E.TEMPLATE_ID}renderTemplate(x){const F=y.append(x,I(".code")),V=new v.HighlightedLabel(F);V.element.classList.add("source-label");const W=new v.HighlightedLabel(F);W.element.classList.add("code-label");const z=new s.Link(F,{href:"",label:""},{},this.openerService);return{codeColumn:F,sourceLabel:V,codeLabel:W,codeLink:z}}renderElement(x,F,V,W){if(V.codeColumn.classList.remove("code-label"),V.codeColumn.classList.remove("code-link"),x.marker.source&&x.marker.code)if(typeof x.marker.code=="string")V.codeColumn.classList.add("code-label"),V.codeColumn.title=`${x.marker.source} (${x.marker.code})`,V.sourceLabel.set(x.marker.source,x.sourceMatches),V.codeLabel.set(x.marker.code,x.codeMatches);else{V.codeColumn.classList.add("code-link"),V.codeColumn.title=`${x.marker.source} (${x.marker.code.value})`,V.sourceLabel.set(x.marker.source,x.sourceMatches);const z=new v.HighlightedLabel(I(".code-link-label"));z.set(x.marker.code.value,x.codeMatches),V.codeLink.link={href:x.marker.code.target.toString(),title:x.marker.code.target.toString(),label:z.element}}else V.codeColumn.title="",V.sourceLabel.set("-")}disposeTemplate(x){}};A=E=fe([O(0,o.IOpenerService)],A);class k{constructor(){this.templateId=k.TEMPLATE_ID}static{this.TEMPLATE_ID="message"}renderTemplate(x){const F=y.append(x,I(".message")),V=new v.HighlightedLabel(F);return{columnElement:F,highlightedLabel:V}}renderElement(x,F,V,W){V.columnElement.title=x.marker.message,V.highlightedLabel.set(x.marker.message,x.messageMatches)}disposeTemplate(x){}}let L=class{static{C=this}static{this.TEMPLATE_ID="file"}constructor(x){this.labelService=x,this.templateId=C.TEMPLATE_ID}renderTemplate(x){const F=y.append(x,I(".file")),V=new v.HighlightedLabel(F);V.element.classList.add("file-label");const W=new v.HighlightedLabel(F);return W.element.classList.add("file-position"),{columnElement:F,fileLabel:V,positionLabel:W}}renderElement(x,F,V,W){const z=p.default.MARKERS_PANEL_AT_LINE_COL_NUMBER(x.marker.startLineNumber,x.marker.startColumn);V.columnElement.title=`${this.labelService.getUriLabel(x.marker.resource,{relative:!1})} ${z}`,V.fileLabel.set(this.labelService.getUriLabel(x.marker.resource,{relative:!0}),x.fileMatches),V.positionLabel.set(z,void 0)}disposeTemplate(x){}};L=C=fe([O(0,r.ILabelService)],L);class R{constructor(){this.templateId=R.TEMPLATE_ID}static{this.TEMPLATE_ID="owner"}renderTemplate(x){const F=y.append(x,I(".owner")),V=new v.HighlightedLabel(F);return{columnElement:F,highlightedLabel:V}}renderElement(x,F,V,W){V.columnElement.title=x.marker.owner,V.highlightedLabel.set(x.marker.owner,x.ownerMatches)}disposeTemplate(x){}}class M{constructor(){this.headerRowHeight=M.HEADER_ROW_HEIGHT}static{this.HEADER_ROW_HEIGHT=24}static{this.ROW_HEIGHT=24}getHeight(x){return M.ROW_HEIGHT}}let N=class extends D.Disposable{constructor(x,F,V,W,z,B,K){super(),this.container=x,this.markersViewModel=F,this.resourceMarkers=V,this.filterOptions=W,this.instantiationService=B,this.labelService=K,this._itemCount=0,this.table=this.instantiationService.createInstance(f.WorkbenchTable,"Markers",this.container,new M,[{label:"",tooltip:"",weight:0,minimumWidth:36,maximumWidth:36,templateId:_.TEMPLATE_ID,project(J){return J}},{label:(0,t.localize)(0,null),tooltip:"",weight:1,minimumWidth:100,maximumWidth:300,templateId:A.TEMPLATE_ID,project(J){return J}},{label:(0,t.localize)(1,null),tooltip:"",weight:4,templateId:k.TEMPLATE_ID,project(J){return J}},{label:(0,t.localize)(2,null),tooltip:"",weight:2,templateId:L.TEMPLATE_ID,project(J){return J}},{label:(0,t.localize)(3,null),tooltip:"",weight:1,minimumWidth:100,maximumWidth:300,templateId:R.TEMPLATE_ID,project(J){return J}}],[this.instantiationService.createInstance(_,this.markersViewModel),this.instantiationService.createInstance(A),this.instantiationService.createInstance(k),this.instantiationService.createInstance(L),this.instantiationService.createInstance(R)],z);const H=this.table.domNode.querySelector(".monaco-list-rows"),U=b.Event.chain(this._register(new d.DomEmitter(H,"mouseover")).event).map(J=>y.findParentWithClass(J.target,"monaco-list-row","monaco-list-rows")).filter(J=>!!J).map(J=>parseInt(J.getAttribute("data-index"))).event,G=b.Event.map(this._register(new d.DomEmitter(H,"mouseleave")).event,()=>-1),$=b.Event.latch(b.Event.any(U,G)),ie=b.Event.debounce($,(J,j)=>j,500);this._register(ie(J=>{J!==-1&&this.table.row(J)&&this.markersViewModel.onMarkerMouseHover(this.table.row(J))}))}get contextKeyService(){return this.table.contextKeyService}get onContextMenu(){return this.table.onContextMenu}get onDidOpen(){return this.table.onDidOpen}get onDidChangeFocus(){return this.table.onDidChangeFocus}get onDidChangeSelection(){return this.table.onDidChangeSelection}collapseMarkers(){}domFocus(){this.table.domFocus()}filterMarkers(x,F){this.filterOptions=F,this.reset(x)}getFocus(){const x=this.table.getFocus();return x.length>0?[...x.map(F=>this.table.row(F))]:[]}getHTMLElement(){return this.table.getHTMLElement()}getRelativeTop(x){return x?this.table.getRelativeTop(this.table.indexOf(x)):null}getSelection(){const x=this.table.getSelection();return x.length>0?[...x.map(F=>this.table.row(F))]:[]}getVisibleItemCount(){return this._itemCount}isVisible(){return!this.container.classList.contains("hidden")}layout(x,F){this.container.style.height=`${x}px`,this.table.layout(x,F)}reset(x){this.resourceMarkers=x;const F=[];for(const V of this.resourceMarkers)for(const W of V.markers){if(n.unsupportedSchemas.has(W.resource.scheme)||this.filterOptions.excludesMatcher.matches(W.resource))continue;if(this.filterOptions.includesMatcher.matches(W.resource)){F.push(new m.MarkerTableItem(W));continue}if(this.filterOptions.showErrors&&S.MarkerSeverity.Error===W.marker.severity||this.filterOptions.showWarnings&&S.MarkerSeverity.Warning===W.marker.severity||this.filterOptions.showInfos&&S.MarkerSeverity.Info===W.marker.severity){if(this.filterOptions.textFilter.text){const B=W.marker.source?i.FilterOptions._filter(this.filterOptions.textFilter.text,W.marker.source)??void 0:void 0,K=W.marker.code?i.FilterOptions._filter(this.filterOptions.textFilter.text,typeof W.marker.code=="string"?W.marker.code:W.marker.code.value)??void 0:void 0,H=i.FilterOptions._messageFilter(this.filterOptions.textFilter.text,W.marker.message)??void 0,U=i.FilterOptions._messageFilter(this.filterOptions.textFilter.text,this.labelService.getUriLabel(W.resource,{relative:!0}))??void 0,G=i.FilterOptions._messageFilter(this.filterOptions.textFilter.text,W.marker.owner)??void 0,$=B||K||H||U||G;($&&!this.filterOptions.textFilter.negate||!$&&this.filterOptions.textFilter.negate)&&F.push(new m.MarkerTableItem(W,B,K,H,U,G));continue}F.push(new m.MarkerTableItem(W))}}this._itemCount=F.length,this.table.splice(0,Number.POSITIVE_INFINITY,F.sort((V,W)=>{let z=S.MarkerSeverity.compare(V.marker.severity,W.marker.severity);return z===0&&(z=(0,m.compareMarkersByUri)(V.marker,W.marker)),z===0&&(z=l.Range.compareRangesUsingStarts(V.marker,W.marker)),z}))}revealMarkers(x,F,V){if(x){const W=this.resourceMarkers.indexOf(x);if(W!==-1)if(this.hasSelectedMarkerFor(x)){const z=this.table.getSelection();this.table.reveal(z[0],V),F&&this.table.setFocus(z)}else this.table.reveal(W,0),F&&(this.table.setFocus([W]),this.table.setSelection([W]))}else F&&(this.table.setSelection([]),this.table.focusFirst())}setAriaLabel(x){this.table.domNode.ariaLabel=x}setMarkerSelection(x,F){this.isVisible()&&(x&&x.length>0?(this.table.setSelection(x.map(V=>this.findMarkerIndex(V))),F&&F.length>0?this.table.setFocus(F.map(V=>this.findMarkerIndex(V))):this.table.setFocus([this.findMarkerIndex(x[0])]),this.table.reveal(this.findMarkerIndex(x[0]))):this.getSelection().length===0&&this.getVisibleItemCount()>0&&(this.table.setSelection([0]),this.table.setFocus([0]),this.table.reveal(0)))}toggleVisibility(x){this.container.classList.toggle("hidden",x)}update(x){for(const F of x){const V=this.resourceMarkers.indexOf(F);this.resourceMarkers.splice(V,1,F)}this.reset(this.resourceMarkers)}updateMarker(x){this.table.rerender()}findMarkerIndex(x){for(let F=0;F<this.table.length;F++)if(this.table.row(F).marker===x.marker)return F;return-1}hasSelectedMarkerFor(x){const F=this.getSelection();return!!(F&&F.length>0&&F[0]instanceof m.Marker&&x.has(F[0].marker.resource))}};e.MarkersTable=N,e.MarkersTable=N=fe([O(5,T.IInstantiationService),O(6,r.ILabelService)],N)}),define(Q[921],Y([1,0,20,27]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineEdits=e.RangeEdit=e.LineRangeEdit=void 0;class b{constructor(v,m){this.range=v,this.newLines=m}equals(v){return this.range.equals(v.range)&&(0,t.equals)(this.newLines,v.newLines)}toEdits(v){return new T([this]).toEdits(v)}}e.LineRangeEdit=b;class D{constructor(v,m){this.range=v,this.newText=m}equals(v){return y.Range.equalsRange(this.range,v.range)&&this.newText===v.newText}}e.RangeEdit=D;class T{constructor(v){this.edits=v}toEdits(v){return this.edits.map(m=>m.range.endLineNumberExclusive<=v?{range:new y.Range(m.range.startLineNumber,1,m.range.endLineNumberExclusive,1),text:m.newLines.map(S=>S+` `).join("")}:m.range.startLineNumber===1?{range:new y.Range(1,1,v,Number.MAX_SAFE_INTEGER),text:m.newLines.join(` `)}:{range:new y.Range(m.range.startLineNumber-1,Number.MAX_SAFE_INTEGER,v,Number.MAX_SAFE_INTEGER),text:m.newLines.map(S=>` `+S).join("")})}}e.LineEdits=T}),define(Q[375],Y([1,0,20,15,27]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineRange=void 0;class D{static{this.compareByStart=(0,t.compareBy)(f=>f.startLineNumber,t.numberComparator)}static join(f){if(f.length===0)return;let v=Number.MAX_SAFE_INTEGER,m=0;for(const S of f)v=Math.min(v,S.startLineNumber),m=Math.max(m,S.startLineNumber+S.lineCount);return new D(v,m-v)}static fromLineNumbers(f,v){return new D(f,v-f)}constructor(f,v){if(this.startLineNumber=f,this.lineCount=v,v<0)throw new y.BugIndicatingError}join(f){return new D(Math.min(this.startLineNumber,f.startLineNumber),Math.max(this.endLineNumberExclusive,f.endLineNumberExclusive)-this.startLineNumber)}get endLineNumberExclusive(){return this.startLineNumber+this.lineCount}get isEmpty(){return this.lineCount===0}touches(f){return this.endLineNumberExclusive>=f.startLineNumber&&f.endLineNumberExclusive>=this.startLineNumber}isAfter(f){return this.startLineNumber>=f.endLineNumberExclusive}isBefore(f){return f.startLineNumber>=this.endLineNumberExclusive}delta(f){return new D(this.startLineNumber+f,this.lineCount)}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}equals(f){return this.startLineNumber===f.startLineNumber&&this.lineCount===f.lineCount}contains(f){return this.startLineNumber<=f&&f<this.endLineNumberExclusive}deltaEnd(f){return new D(this.startLineNumber,this.lineCount+f)}deltaStart(f){return new D(this.startLineNumber+f,this.lineCount-f)}getLines(f){const v=new Array(this.lineCount);for(let m=0;m<this.lineCount;m++)v[m]=f.getLineContent(this.startLineNumber+m);return v}containsRange(f){return this.startLineNumber<=f.startLineNumber&&f.endLineNumberExclusive<=this.endLineNumberExclusive}toRange(){return new b.Range(this.startLineNumber,1,this.endLineNumberExclusive,1)}toInclusiveRange(){if(!this.isEmpty)return new b.Range(this.startLineNumber,1,this.endLineNumberExclusive-1,1073741824)}toInclusiveRangeOrEmpty(){return this.isEmpty?new b.Range(this.startLineNumber,1,this.startLineNumber,1):new b.Range(this.startLineNumber,1,this.endLineNumberExclusive-1,1073741824)}intersects(f){return this.startLineNumber<=f.endLineNumberExclusive&&f.startLineNumber<=this.endLineNumberExclusive}}e.LineRange=D}),define(Q[3536],Y([1,0,7,4,109,375,2784]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeMarkersController=e.conflictMarkers=void 0,e.conflictMarkers={start:"<<<<<<<",end:">>>>>>>"};class f extends y.Disposable{constructor(h,a){super(),this.editor=h,this.mergeEditorViewModel=a,this.viewZoneIds=[],this.disposableStore=new y.DisposableStore,this._register(h.onDidChangeModelContent(r=>{this.updateDecorations()})),this._register(h.onDidChangeModel(r=>{this.updateDecorations()})),this.updateDecorations()}updateDecorations(){const h=this.editor.getModel(),a=h?v(h,{blockToRemoveStartLinePrefix:e.conflictMarkers.start,blockToRemoveEndLinePrefix:e.conflictMarkers.end}):{blocks:[]};this.editor.setHiddenAreas(a.blocks.map(r=>r.lineRange.deltaEnd(-1).toRange()),this),this.editor.changeViewZones(r=>{this.disposableStore.clear();for(const i of this.viewZoneIds)r.removeZone(i);this.viewZoneIds.length=0;for(const i of a.blocks){const s=h.getLineContent(i.lineRange.startLineNumber).substring(0,20),o=h.getLineContent(i.lineRange.endLineNumberExclusive-1).substring(0,20),u=i.lineRange.lineCount-2,d=(0,t.h)("div",[(0,t.h)("div.conflict-zone-root",[(0,t.h)("pre",[s]),(0,t.h)("span.dots",["..."]),(0,t.h)("pre",[o]),(0,t.h)("span.text",[u===1?T.localize(0,null):T.localize(1,null,u)])])]).root;this.viewZoneIds.push(r.addZone({afterLineNumber:i.lineRange.endLineNumberExclusive-1,domNode:d,heightInLines:1.5}));const p=()=>{const c=this.editor.getLayoutInfo();d.style.width=`${c.contentWidth-c.verticalScrollbarWidth}px`};this.disposableStore.add(this.editor.onDidLayoutChange(()=>{p()})),p(),this.disposableStore.add((0,b.autorun)(c=>{const l=this.mergeEditorViewModel.read(c);if(!l)return;const n=l.activeModifiedBaseRange.read(c),g=[];g.push("conflict-zone"),n&&l.model.getLineRangeInResult(n.baseRange,c).intersects(i.lineRange)&&g.push("focused"),d.className=g.join(" ")}))}})}}e.MergeMarkersController=f;function v(S,h){const a=[],r=[];let i=!1,s=-1,o=0;for(const u of S.getLinesContent())o++,i?u.startsWith(h.blockToRemoveEndLinePrefix)&&(i=!1,a.push(new m(new D.LineRange(s,o-s+1))),r.push("")):u.startsWith(h.blockToRemoveStartLinePrefix)?(i=!0,s=o):r.push(u);return{blocks:a,transformedContent:r.join(` `)}}class m{constructor(h){this.lineRange=h}}}),define(Q[1279],Y([1,0,51,302]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rangeIsBeforeOrTouching=e.addLength=e.lengthBetweenPositions=e.lengthOfRange=e.rangeContainsPosition=void 0;function b(m,S){return!(S.lineNumber<m.startLineNumber||S.lineNumber>m.endLineNumber||S.lineNumber===m.startLineNumber&&S.column<m.startColumn||S.lineNumber===m.endLineNumber&&S.column>=m.endColumn)}e.rangeContainsPosition=b;function D(m){return m.startLineNumber===m.endLineNumber?new y.LengthObj(0,m.endColumn-m.startColumn):new y.LengthObj(m.endLineNumber-m.startLineNumber,m.endColumn-1)}e.lengthOfRange=D;function T(m,S){return m.lineNumber===S.lineNumber?new y.LengthObj(0,S.column-m.column):new y.LengthObj(S.lineNumber-m.lineNumber,S.column-1)}e.lengthBetweenPositions=T;function f(m,S){return S.lineCount===0?new t.Position(m.lineNumber,m.column+S.columnCount):new t.Position(m.lineNumber+S.lineCount,S.columnCount+1)}e.addLength=f;function v(m,S){return m.endLineNumber<S.startLineNumber||m.endLineNumber===S.startLineNumber&&m.endColumn<=S.startColumn}e.rangeIsBeforeOrTouching=v}),define(Q[3537],Y([1,0,30]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorTelemetry=void 0;let y=class{constructor(D){this.telemetryService=D}reportMergeEditorOpened(D){this.telemetryService.publicLog2("mergeEditor.opened",{conflictCount:D.conflictCount,combinableConflictCount:D.combinableConflictCount,baseVisible:D.baseVisible,isColumnView:D.isColumnView,baseTop:D.baseTop})}reportLayoutChange(D){this.telemetryService.publicLog2("mergeEditor.layoutChanged",{baseVisible:D.baseVisible,isColumnView:D.isColumnView,baseTop:D.baseTop})}reportMergeEditorClosed(D){this.telemetryService.publicLog2("mergeEditor.closed",{conflictCount:D.conflictCount,combinableConflictCount:D.combinableConflictCount,durationOpenedSecs:D.durationOpenedSecs,remainingConflictCount:D.remainingConflictCount,accepted:D.accepted,conflictsResolvedWithBase:D.conflictsResolvedWithBase,conflictsResolvedWithInput1:D.conflictsResolvedWithInput1,conflictsResolvedWithInput2:D.conflictsResolvedWithInput2,conflictsResolvedWithSmartCombination:D.conflictsResolvedWithSmartCombination,manuallySolvedConflictCountThatEqualNone:D.manuallySolvedConflictCountThatEqualNone,manuallySolvedConflictCountThatEqualSmartCombine:D.manuallySolvedConflictCountThatEqualSmartCombine,manuallySolvedConflictCountThatEqualInput1:D.manuallySolvedConflictCountThatEqualInput1,manuallySolvedConflictCountThatEqualInput2:D.manuallySolvedConflictCountThatEqualInput2,manuallySolvedConflictCountThatEqualNoneAndStartedWithBase:D.manuallySolvedConflictCountThatEqualNoneAndStartedWithBase,manuallySolvedConflictCountThatEqualNoneAndStartedWithInput1:D.manuallySolvedConflictCountThatEqualNoneAndStartedWithInput1,manuallySolvedConflictCountThatEqualNoneAndStartedWithInput2:D.manuallySolvedConflictCountThatEqualNoneAndStartedWithInput2,manuallySolvedConflictCountThatEqualNoneAndStartedWithBothNonSmart:D.manuallySolvedConflictCountThatEqualNoneAndStartedWithBothNonSmart,manuallySolvedConflictCountThatEqualNoneAndStartedWithBothSmart:D.manuallySolvedConflictCountThatEqualNoneAndStartedWithBothSmart})}reportAcceptInvoked(D,T){this.telemetryService.publicLog2("mergeEditor.action.accept",{otherAccepted:T,isInput1:D===1})}reportSmartCombinationInvoked(D){this.telemetryService.publicLog2("mergeEditor.action.smartCombination",{otherAccepted:D})}reportRemoveInvoked(D,T){this.telemetryService.publicLog2("mergeEditor.action.remove",{otherAccepted:T,isInput1:D===1})}reportResetToBaseInvoked(){this.telemetryService.publicLog2("mergeEditor.action.resetToBase",{})}reportNavigationToNextConflict(){this.telemetryService.publicLog2("mergeEditor.action.goToNextConflict",{})}reportNavigationToPreviousConflict(){this.telemetryService.publicLog2("mergeEditor.action.goToPreviousConflict",{})}reportConflictCounterClicked(){this.telemetryService.publicLog2("mergeEditor.action.conflictCounterClicked",{})}};e.MergeEditorTelemetry=y,e.MergeEditorTelemetry=y=fe([O(0,t.ITelemetryService)],y)}),define(Q[291],Y([1,0,20,15,4,109,24]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.observableConfigValue=e.PersistentStore=e.deepMerge=e.setFields=e.thenIfNotDisposed=e.elementAtOrUndefined=e.concatArrays=e.join=e.leftJoin=e.applyObservableDecorations=e.setStyle=e.ReentrancyBarrier=void 0;class f{constructor(){this._isActive=!1}get isActive(){return this._isActive}makeExclusive(l){return(...n)=>{if(!this._isActive){this._isActive=!0;try{return l(...n)}finally{this._isActive=!1}}}}runExclusively(l){if(!this._isActive){this._isActive=!0;try{l()}finally{this._isActive=!1}}}runExclusivelyOrThrow(l){if(this._isActive)throw new y.BugIndicatingError;this._isActive=!0;try{l()}finally{this._isActive=!1}}}e.ReentrancyBarrier=f;function v(c,l){Object.entries(l).forEach(([n,g])=>{c.style.setProperty(n,m(g))})}e.setStyle=v;function m(c){return typeof c=="number"?`${c}px`:c}function S(c,l){const n=new b.DisposableStore;let g=[];return n.add((0,D.autorunOpts)({debugName:()=>`Apply decorations from ${l.debugName}`},w=>{const E=l.read(w);c.changeDecorations(C=>{g=C.deltaDecorations(g,E)})})),n.add({dispose:()=>{c.changeDecorations(w=>{g=w.deltaDecorations(g,[])})}}),n}e.applyObservableDecorations=S;function*h(c,l,n){const g=new t.ArrayQueue(l);for(const w of c){g.takeWhile(C=>t.CompareResult.isGreaterThan(n(w,C)));const E=g.takeWhile(C=>t.CompareResult.isNeitherLessOrGreaterThan(n(w,C)));yield{left:w,rights:E||[]}}}e.leftJoin=h;function*a(c,l,n){const g=new t.ArrayQueue(l);for(const w of c){const E=g.takeWhile(I=>t.CompareResult.isGreaterThan(n(w,I)));E&&(yield{rights:E});const C=g.takeWhile(I=>t.CompareResult.isNeitherLessOrGreaterThan(n(w,I)));yield{left:w,rights:C||[]}}}e.join=a;function r(...c){return[].concat(...c)}e.concatArrays=r;function i(c,l){return c[l]}e.elementAtOrUndefined=i;function s(c,l){let n=!1;return c.then(()=>{n||l()}),(0,b.toDisposable)(()=>{n=!0})}e.thenIfNotDisposed=s;function o(c,l){return Object.assign(c,l)}e.setFields=o;function u(c,l){const n={};for(const g in c)n[g]=c[g];for(const g in l){const w=l[g];typeof n[g]=="object"&&w&&typeof w=="object"?n[g]=u(n[g],w):n[g]=w}return n}e.deepMerge=u;let d=class{constructor(l,n){this.key=l,this.storageService=n,this.hasValue=!1,this.value=void 0}get(){if(!this.hasValue){const l=this.storageService.get(this.key,0);if(l!==void 0)try{this.value=JSON.parse(l)}catch(n){(0,y.onUnexpectedError)(n)}this.hasValue=!0}return this.value}set(l){this.value=l,this.storageService.store(this.key,JSON.stringify(this.value),0,0)}};e.PersistentStore=d,e.PersistentStore=d=fe([O(1,T.IStorageService)],d);function p(c,l,n){return(0,D.observableFromEvent)(g=>n.onDidChangeConfiguration(w=>{w.affectsConfiguration(c)&&g(w)}),()=>n.getValue(c)??l)}e.observableConfigValue=p}),define(Q[527],Y([1,0,20,214,15,27,291,921,375,1279]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentRangeMap=e.RangeMapping=e.DetailedLineRangeMapping=e.MappingAlignment=e.DocumentLineRangeMap=e.LineRangeMapping=void 0;class S{static join(u){return u.reduce((d,p)=>d?d.join(p):p,void 0)}constructor(u,d){this.inputRange=u,this.outputRange=d}extendInputRange(u){if(!u.containsRange(this.inputRange))throw new b.BugIndicatingError;const d=u.startLineNumber-this.inputRange.startLineNumber,p=u.endLineNumberExclusive-this.inputRange.endLineNumberExclusive;return new S(u,new v.LineRange(this.outputRange.startLineNumber+d,this.outputRange.lineCount-d+p))}join(u){return new S(this.inputRange.join(u.inputRange),this.outputRange.join(u.outputRange))}get resultingDeltaFromOriginalToModified(){return this.outputRange.endLineNumberExclusive-this.inputRange.endLineNumberExclusive}toString(){return`${this.inputRange.toString()} -> ${this.outputRange.toString()}`}addOutputLineDelta(u){return new S(this.inputRange,this.outputRange.delta(u))}addInputLineDelta(u){return new S(this.inputRange.delta(u),this.outputRange)}reverse(){return new S(this.outputRange,this.inputRange)}}e.LineRangeMapping=S;class h{static betweenOutputs(u,d,p){const l=a.compute(u,d).map(n=>new S(n.output1Range,n.output2Range));return new h(l,p)}constructor(u,d){this.lineRangeMappings=u,this.inputLineCount=d,(0,y.assertFn)(()=>(0,y.checkAdjacentItems)(u,(p,c)=>p.inputRange.isBefore(c.inputRange)&&p.outputRange.isBefore(c.outputRange)&&c.inputRange.startLineNumber-p.inputRange.endLineNumberExclusive===c.outputRange.startLineNumber-p.outputRange.endLineNumberExclusive))}project(u){const d=(0,t.findLast)(this.lineRangeMappings,l=>l.inputRange.startLineNumber<=u);if(!d)return new S(new v.LineRange(u,1),new v.LineRange(u,1));if(d.inputRange.contains(u))return d;const p=new v.LineRange(u,1),c=new v.LineRange(u+d.outputRange.endLineNumberExclusive-d.inputRange.endLineNumberExclusive,1);return new S(p,c)}get outputLineCount(){const u=(0,t.lastOrDefault)(this.lineRangeMappings),d=u?u.outputRange.endLineNumberExclusive-u.inputRange.endLineNumberExclusive:0;return this.inputLineCount+d}reverse(){return new h(this.lineRangeMappings.map(u=>u.reverse()),this.outputLineCount)}}e.DocumentLineRangeMap=h;class a{static compute(u,d){const p=(0,t.compareBy)(C=>C.inputRange.startLineNumber,t.numberComparator),c=(0,T.concatArrays)(u.map(C=>({source:0,diff:C})),d.map(C=>({source:1,diff:C}))).sort((0,t.compareBy)(C=>C.diff,p)),l=[new Array,new Array],n=[0,0],g=new Array;function w(C){const I=S.join(l[0])||new S(C,C.delta(n[0])),_=S.join(l[1])||new S(C,C.delta(n[1]));g.push(new a(E,I.extendInputRange(E).outputRange,l[0],_.extendInputRange(E).outputRange,l[1])),l[0]=[],l[1]=[]}let E;for(const C of c){const I=C.diff.inputRange;E&&!E.touches(I)&&(w(E),E=void 0),n[C.source]=C.diff.resultingDeltaFromOriginalToModified,E=E?E.join(I):I,l[C.source].push(C.diff)}return E&&w(E),g}constructor(u,d,p,c,l){this.inputRange=u,this.output1Range=d,this.output1LineMappings=p,this.output2Range=c,this.output2LineMappings=l}toString(){return`${this.output1Range} <- ${this.inputRange} -> ${this.output2Range}`}}e.MappingAlignment=a;class r extends S{static join(u){return u.reduce((d,p)=>d?d.join(p):p,void 0)}constructor(u,d,p,c,l){super(u,p),this.inputTextModel=d,this.outputTextModel=c,this.rangeMappings=l||[new i(this.inputRange.toRange(),this.outputRange.toRange())]}addOutputLineDelta(u){return new r(this.inputRange,this.inputTextModel,this.outputRange.delta(u),this.outputTextModel,this.rangeMappings.map(d=>d.addOutputLineDelta(u)))}addInputLineDelta(u){return new r(this.inputRange.delta(u),this.inputTextModel,this.outputRange,this.outputTextModel,this.rangeMappings.map(d=>d.addInputLineDelta(u)))}join(u){return new r(this.inputRange.join(u.inputRange),this.inputTextModel,this.outputRange.join(u.outputRange),this.outputTextModel)}getLineEdit(){return new f.LineRangeEdit(this.inputRange,this.getOutputLines())}getReverseLineEdit(){return new f.LineRangeEdit(this.outputRange,this.getInputLines())}getOutputLines(){return this.outputRange.getLines(this.outputTextModel)}getInputLines(){return this.inputRange.getLines(this.inputTextModel)}}e.DetailedLineRangeMapping=r;class i{constructor(u,d){this.inputRange=u,this.outputRange=d}toString(){function u(d){return`[${d.startLineNumber}:${d.startColumn}, ${d.endLineNumber}:${d.endColumn})`}return`${u(this.inputRange)} -> ${u(this.outputRange)}`}addOutputLineDelta(u){return new i(this.inputRange,new D.Range(this.outputRange.startLineNumber+u,this.outputRange.startColumn,this.outputRange.endLineNumber+u,this.outputRange.endColumn))}addInputLineDelta(u){return new i(new D.Range(this.inputRange.startLineNumber+u,this.inputRange.startColumn,this.inputRange.endLineNumber+u,this.inputRange.endColumn),this.outputRange)}reverse(){return new i(this.outputRange,this.inputRange)}}e.RangeMapping=i;class s{constructor(u,d){this.rangeMappings=u,this.inputLineCount=d,(0,y.assertFn)(()=>(0,y.checkAdjacentItems)(u,(p,c)=>(0,m.rangeIsBeforeOrTouching)(p.inputRange,c.inputRange)&&(0,m.rangeIsBeforeOrTouching)(p.outputRange,c.outputRange)))}project(u){const d=(0,t.findLast)(this.rangeMappings,l=>l.inputRange.getStartPosition().isBeforeOrEqual(u));if(!d)return new i(D.Range.fromPositions(u,u),D.Range.fromPositions(u,u));if((0,m.rangeContainsPosition)(d.inputRange,u))return d;const p=(0,m.lengthBetweenPositions)(d.inputRange.getEndPosition(),u),c=(0,m.addLength)(d.outputRange.getEndPosition(),p);return new i(D.Range.fromPositions(u),D.Range.fromPositions(c))}projectRange(u){const d=this.project(u.getStartPosition()),p=this.project(u.getEndPosition());return new i(d.inputRange.plusRange(p.inputRange),d.outputRange.plusRange(p.outputRange))}get outputLineCount(){const u=(0,t.lastOrDefault)(this.rangeMappings),d=u?u.outputRange.endLineNumber-u.inputRange.endLineNumber:0;return this.inputLineCount+d}reverse(){return new s(this.rangeMappings.map(u=>u.reverse()),this.outputLineCount)}}e.DocumentRangeMap=s}),define(Q[3538],Y([1,0,214,242,9,375,527,291]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toRangeMapping=e.toLineRange=e.MergeDiffComputer=void 0;let v=class{constructor(a,r){this.editorWorkerService=a,this.configurationService=r,this.mergeAlgorithm=(0,f.observableConfigValue)("mergeEditor.diffAlgorithm","advanced",this.configurationService).map(i=>i==="smart"?"legacy":i==="experimental"?"advanced":i)}async computeDiff(a,r,i){const s=this.mergeAlgorithm.read(i),o=await this.editorWorkerService.computeDiff(a.uri,r.uri,{ignoreTrimWhitespace:!1,maxComputationTimeMs:0,computeMoves:!1},s);if(!o)throw new Error("Diff computation failed");if(a.isDisposed()||r.isDisposed())return{diffs:null};const u=o.changes.map(d=>new T.DetailedLineRangeMapping(m(d.originalRange),a,m(d.modifiedRange),r,d.innerChanges?.map(p=>S(p))));return(0,t.assertFn)(()=>{for(const d of u){const p=d.inputRange,c=d.outputRange,l=d.inputTextModel,n=d.outputTextModel;for(const g of d.rangeMappings){let w=p.startLineNumber-1<=g.inputRange.startLineNumber&&g.inputRange.endLineNumber<=p.endLineNumberExclusive;w&&g.inputRange.startLineNumber===p.startLineNumber-1&&(w=g.inputRange.endColumn>=l.getLineMaxColumn(g.inputRange.startLineNumber)),w&&g.inputRange.endLineNumber===p.endLineNumberExclusive&&(w=g.inputRange.endColumn===1);let E=c.startLineNumber-1<=g.outputRange.startLineNumber&&g.outputRange.endLineNumber<=c.endLineNumberExclusive;if(E&&g.outputRange.startLineNumber===c.startLineNumber-1&&(E=g.outputRange.endColumn>=n.getLineMaxColumn(g.outputRange.endLineNumber)),E&&g.outputRange.endLineNumber===c.endLineNumberExclusive&&(E=g.outputRange.endColumn===1),!w||!E)return!1}}return u.length===0||u[0].inputRange.startLineNumber===u[0].outputRange.startLineNumber&&(0,t.checkAdjacentItems)(u,(d,p)=>p.inputRange.startLineNumber-d.inputRange.endLineNumberExclusive===p.outputRange.startLineNumber-d.outputRange.endLineNumberExclusive&&d.inputRange.endLineNumberExclusive<p.inputRange.startLineNumber&&d.outputRange.endLineNumberExclusive<p.outputRange.startLineNumber)}),{diffs:u}}};e.MergeDiffComputer=v,e.MergeDiffComputer=v=fe([O(0,y.IEditorWorkerService),O(1,b.IConfigurationService)],v);function m(h){return new D.LineRange(h.startLineNumber,h.length)}e.toLineRange=m;function S(h){return new T.RangeMapping(h.originalRange,h.modifiedRange)}e.toRangeMapping=S}),define(Q[1280],Y([1,0,20,15,33,51,27,921,527,291]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputState=e.ModifiedBaseRangeState=e.ModifiedBaseRangeStateUnrecognized=e.ModifiedBaseRangeStateBoth=e.ModifiedBaseRangeStateInput2=e.ModifiedBaseRangeStateInput1=e.ModifiedBaseRangeStateBase=e.AbstractModifiedBaseRangeState=e.getOtherInputNumber=e.ModifiedBaseRangeStateKind=e.ModifiedBaseRange=void 0;class S{static fromDiffs(g,w,E,C,I){return v.MappingAlignment.compute(g,w).map(A=>new S(A.inputRange,E,A.output1Range,C,A.output1LineMappings,A.output2Range,I,A.output2LineMappings))}constructor(g,w,E,C,I,_,A,k){if(this.baseRange=g,this.baseTextModel=w,this.input1Range=E,this.input1TextModel=C,this.input1Diffs=I,this.input2Range=_,this.input2TextModel=A,this.input2Diffs=k,this.input1CombinedDiff=v.DetailedLineRangeMapping.join(this.input1Diffs),this.input2CombinedDiff=v.DetailedLineRangeMapping.join(this.input2Diffs),this.isEqualChange=(0,t.equals)(this.input1Diffs,this.input2Diffs,(L,R)=>L.getLineEdit().equals(R.getLineEdit())),this.smartInput1LineRangeEdit=null,this.smartInput2LineRangeEdit=null,this.dumbInput1LineRangeEdit=null,this.dumbInput2LineRangeEdit=null,this.input1Diffs.length===0&&this.input2Diffs.length===0)throw new y.BugIndicatingError("must have at least one diff")}getInputRange(g){return g===1?this.input1Range:this.input2Range}getInputCombinedDiff(g){return g===1?this.input1CombinedDiff:this.input2CombinedDiff}getInputDiffs(g){return g===1?this.input1Diffs:this.input2Diffs}get isConflicting(){return this.input1Diffs.length>0&&this.input2Diffs.length>0}get canBeCombined(){return this.smartCombineInputs(1)!==void 0}get isOrderRelevant(){const g=this.smartCombineInputs(1),w=this.smartCombineInputs(2);return!g||!w?!1:!g.equals(w)}getEditForBase(g){const w=[];if(g.includesInput1&&this.input1CombinedDiff&&w.push({diff:this.input1CombinedDiff,inputNumber:1}),g.includesInput2&&this.input2CombinedDiff&&w.push({diff:this.input2CombinedDiff,inputNumber:2}),w.length===0)return{edit:void 0,effectiveState:c.base};if(w.length===1)return{edit:w[0].diff.getLineEdit(),effectiveState:c.base.withInputValue(w[0].inputNumber,!0,!1)};if(g.kind!==a.both)throw new y.BugIndicatingError;const E=g.smartCombination?this.smartCombineInputs(g.firstInput):this.dumbCombineInputs(g.firstInput);return E?{edit:E,effectiveState:g}:{edit:w[r(g.firstInput)-1].diff.getLineEdit(),effectiveState:c.base.withInputValue(r(g.firstInput),!0,!1)}}smartCombineInputs(g){if(g===1&&this.smartInput1LineRangeEdit!==null)return this.smartInput1LineRangeEdit;if(g===2&&this.smartInput2LineRangeEdit!==null)return this.smartInput2LineRangeEdit;const E=(0,m.concatArrays)(this.input1Diffs.flatMap(I=>I.rangeMappings.map(_=>({diff:_,input:1}))),this.input2Diffs.flatMap(I=>I.rangeMappings.map(_=>({diff:_,input:2})))).sort((0,t.tieBreakComparators)((0,t.compareBy)(I=>I.diff.inputRange,T.Range.compareRangesUsingStarts),(0,t.compareBy)(I=>I.input===g?1:2,t.numberComparator))).map(I=>{const _=I.input===1?this.input1TextModel:this.input2TextModel;return new f.RangeEdit(I.diff.inputRange,_.getValueInRange(I.diff.outputRange))}),C=h(this.baseRange,E,this.baseTextModel);return g===1?this.smartInput1LineRangeEdit=C:this.smartInput2LineRangeEdit=C,C}dumbCombineInputs(g){if(g===1&&this.dumbInput1LineRangeEdit!==null)return this.dumbInput1LineRangeEdit;if(g===2&&this.dumbInput2LineRangeEdit!==null)return this.dumbInput2LineRangeEdit;let w=this.input1Range.getLines(this.input1TextModel),E=this.input2Range.getLines(this.input2TextModel);g===2&&([w,E]=[E,w]);const C=new f.LineRangeEdit(this.baseRange,w.concat(E));return g===1?this.dumbInput1LineRangeEdit=C:this.dumbInput2LineRangeEdit=C,C}}e.ModifiedBaseRange=S;function h(n,g,w){let E="";const C=n.startLineNumber>1;let I=C?new D.Position(n.startLineNumber-1,w.getLineMaxColumn(n.startLineNumber-1)):new D.Position(n.startLineNumber,1);for(const R of g){const M=R.range.getStartPosition();if(!I.isBeforeOrEqual(M))return;let N=w.getValueInRange(T.Range.fromPositions(I,M));M.lineNumber>w.getLineCount()&&(N+=` `),E+=N,E+=R.newText,I=R.range.getEndPosition()}const _=n.endLineNumberExclusive<=w.getLineCount(),A=_?new D.Position(n.endLineNumberExclusive,1):new D.Position(n.endLineNumberExclusive-1,1073741824),k=w.getValueInRange(T.Range.fromPositions(I,A));E+=k;const L=(0,b.splitLines)(E);if(C){if(L[0]!=="")return;L.shift()}if(_){if(L[L.length-1]!=="")return;L.pop()}return new f.LineRangeEdit(n,L)}var a;(function(n){n[n.base=0]="base",n[n.input1=1]="input1",n[n.input2=2]="input2",n[n.both=3]="both",n[n.unrecognized=4]="unrecognized"})(a||(e.ModifiedBaseRangeStateKind=a={}));function r(n){return n===1?2:1}e.getOtherInputNumber=r;class i{constructor(){}get includesInput1(){return!1}get includesInput2(){return!1}includesInput(g){return g===1?this.includesInput1:this.includesInput2}isInputIncluded(g){return g===1?this.includesInput1:this.includesInput2}toggle(g){return this.withInputValue(g,!this.includesInput(g),!0)}getInput(g){return this.isInputIncluded(g)?1:0}}e.AbstractModifiedBaseRangeState=i;class s extends i{get kind(){return a.base}toString(){return"base"}swap(){return this}withInputValue(g,w,E=!1){return g===1?w?new o:this:w?new u:this}equals(g){return g.kind===a.base}}e.ModifiedBaseRangeStateBase=s;class o extends i{get kind(){return a.input1}get includesInput1(){return!0}toString(){return"1\u2713"}swap(){return new u}withInputValue(g,w,E=!1){return g===1?w?this:new s:w?new d(1,E):new u}equals(g){return g.kind===a.input1}}e.ModifiedBaseRangeStateInput1=o;class u extends i{get kind(){return a.input2}get includesInput2(){return!0}toString(){return"2\u2713"}swap(){return new o}withInputValue(g,w,E=!1){return g===2?w?this:new s:w?new d(2,E):new u}equals(g){return g.kind===a.input2}}e.ModifiedBaseRangeStateInput2=u;class d extends i{constructor(g,w){super(),this.firstInput=g,this.smartCombination=w}get kind(){return a.both}get includesInput1(){return!0}get includesInput2(){return!0}toString(){return"2\u2713"}swap(){return new d(r(this.firstInput),this.smartCombination)}withInputValue(g,w,E=!1){return w?this:g===1?new u:new o}equals(g){return g.kind===a.both&&this.firstInput===g.firstInput&&this.smartCombination===g.smartCombination}getInput(g){return g===this.firstInput?1:2}}e.ModifiedBaseRangeStateBoth=d;class p extends i{get kind(){return a.unrecognized}toString(){return"unrecognized"}swap(){return this}withInputValue(g,w,E=!1){return w?g===1?new o:new u:this}equals(g){return g.kind===a.unrecognized}}e.ModifiedBaseRangeStateUnrecognized=p;var c;(function(n){n.base=new s,n.unrecognized=new p})(c||(e.ModifiedBaseRangeState=c={}));var l;(function(n){n[n.excluded=0]="excluded",n[n.first=1]="first",n[n.second=2]="second",n[n.unrecognized=3]="unrecognized"})(l||(e.InputState=l={}))}),define(Q[3539],Y([1,0,20,15,4,527,921,375,291,109]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelDiffState=e.TextModelDiffChangeReason=e.TextModelDiffs=void 0;class S extends b.Disposable{get isApplyingChange(){return this.barrier.isActive}constructor(i,s,o){super(),this.baseTextModel=i,this.textModel=s,this.diffComputer=o,this.recomputeCount=0,this._state=(0,m.observableValue)("LiveDiffState",1),this._diffs=(0,m.observableValue)("LiveDiffs",[]),this.barrier=new v.ReentrancyBarrier,this.isDisposed=!1,this.isInitializing=!0;const u=(0,m.observableSignal)("recompute");this._register((0,m.autorun)(d=>{u.read(d),this.recompute(d)})),this._register(i.onDidChangeContent(this.barrier.makeExclusive(()=>{u.trigger(void 0)}))),this._register(s.onDidChangeContent(this.barrier.makeExclusive(()=>{u.trigger(void 0)}))),this._register((0,b.toDisposable)(()=>{this.isDisposed=!0}))}get state(){return this._state}get diffs(){return this._diffs}recompute(i){this.recomputeCount++;const s=this.recomputeCount;this._state.get()===1&&(this.isInitializing=!0),(0,m.transaction)(u=>{this._state.set(this.isInitializing?1:3,u,0)}),this.diffComputer.computeDiff(this.baseTextModel,this.textModel,i).then(u=>{this.isDisposed||s===this.recomputeCount&&(0,m.transaction)(d=>{u.diffs?(this._state.set(2,d,1),this._diffs.set(u.diffs,d,1)):this._state.set(4,d,1),this.isInitializing=!1})})}ensureUpToDate(){if(this.state.get()!==2)throw new y.BugIndicatingError("Cannot remove diffs when the model is not up to date")}removeDiffs(i,s,o){this.ensureUpToDate(),i.sort((0,t.compareBy)(d=>d.inputRange.startLineNumber,t.numberComparator)),i.reverse();let u=this._diffs.get();for(const d of i){const p=u.length;if(u=u.filter(c=>c!==d),p===u.length)throw new y.BugIndicatingError;this.barrier.runExclusivelyOrThrow(()=>{const c=d.getReverseLineEdit().toEdits(this.textModel.getLineCount());this.textModel.pushEditOperations(null,c,()=>null,o)}),u=u.map(c=>c.outputRange.isAfter(d.outputRange)?c.addOutputLineDelta(d.inputRange.lineCount-d.outputRange.lineCount):c)}this._diffs.set(u,s,0)}applyEditRelativeToOriginal(i,s,o){this.ensureUpToDate();const u=new D.DetailedLineRangeMapping(i.range,this.baseTextModel,new f.LineRange(i.range.startLineNumber,i.newLines.length),this.textModel);let d=!1,p=0;const c=new Array;for(const l of this.diffs.get()){if(l.inputRange.touches(i.range))throw new y.BugIndicatingError("Edit must be conflict free.");l.inputRange.isAfter(i.range)?(d||(d=!0,c.push(u.addOutputLineDelta(p))),c.push(l.addOutputLineDelta(i.newLines.length-i.range.lineCount))):c.push(l),d||(p+=l.outputRange.lineCount-l.inputRange.lineCount)}d||(d=!0,c.push(u.addOutputLineDelta(p))),this.barrier.runExclusivelyOrThrow(()=>{const l=new T.LineRangeEdit(i.range.delta(p),i.newLines).toEdits(this.textModel.getLineCount());this.textModel.pushEditOperations(null,l,()=>null,o)}),this._diffs.set(c,s,0)}findTouchingDiffs(i){return this.diffs.get().filter(s=>s.inputRange.touches(i))}getResultLine(i,s){let o=0;const u=s?this.diffs.read(s):this.diffs.get();for(const d of u){if(d.inputRange.contains(i)||d.inputRange.endLineNumberExclusive===i)return d;if(d.inputRange.endLineNumberExclusive<i)o=d.resultingDeltaFromOriginalToModified;else break}return i+o}getResultLineRange(i,s){let o=this.getResultLine(i.startLineNumber,s);typeof o!="number"&&(o=o.outputRange.startLineNumber);let u=this.getResultLine(i.endLineNumberExclusive,s);return typeof u!="number"&&(u=u.outputRange.endLineNumberExclusive),f.LineRange.fromLineNumbers(o,u)}}e.TextModelDiffs=S;var h;(function(r){r[r.other=0]="other",r[r.textChange=1]="textChange"})(h||(e.TextModelDiffChangeReason=h={}));var a;(function(r){r[r.initializing=1]="initializing",r[r.upToDate=2]="upToDate",r[r.updating=3]="updating",r[r.error=4]="error"})(a||(e.TextModelDiffState=a={}))}),define(Q[3540],Y([1,0,20,15,109,27,50,2785,189,290,375,527,3539,291,1280]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorModelState=e.MergeEditorModel=void 0;let s=class extends m.EditorModel{constructor(l,n,g,w,E,C,I,_,A){super(),this.base=l,this.input1=n,this.input2=g,this.resultTextModel=w,this.diffComputer=E,this.options=C,this.telemetry=I,this.languageService=_,this.undoRedoService=A,this.input1TextModelDiffs=this._register(new a.TextModelDiffs(this.base,this.input1.textModel,this.diffComputer)),this.input2TextModelDiffs=this._register(new a.TextModelDiffs(this.base,this.input2.textModel,this.diffComputer)),this.resultTextModelDiffs=this._register(new a.TextModelDiffs(this.base,this.resultTextModel,this.diffComputer)),this.modifiedBaseRanges=(0,b.derived)(L=>{const R=this.input1TextModelDiffs.diffs.read(L),M=this.input2TextModelDiffs.diffs.read(L);return i.ModifiedBaseRange.fromDiffs(R,M,this.base,this.input1.textModel,this.input2.textModel)}),this.modifiedBaseRangeResultStates=(0,b.derived)(L=>new Map(this.modifiedBaseRanges.read(L).map(M=>[M,new u(M)]))),this.resultSnapshot=this.resultTextModel.createSnapshot(),this.baseInput1Diffs=this.input1TextModelDiffs.diffs,this.baseInput2Diffs=this.input2TextModelDiffs.diffs,this.baseResultDiffs=this.resultTextModelDiffs.diffs,this.input1ResultMapping=(0,b.derived)(L=>this.getInputResultMapping(this.baseInput1Diffs.read(L),this.baseResultDiffs.read(L),this.input1.textModel.getLineCount())),this.resultInput1Mapping=(0,b.derived)(L=>this.input1ResultMapping.read(L).reverse()),this.input2ResultMapping=(0,b.derived)(L=>this.getInputResultMapping(this.baseInput2Diffs.read(L),this.baseResultDiffs.read(L),this.input2.textModel.getLineCount())),this.resultInput2Mapping=(0,b.derived)(L=>this.input2ResultMapping.read(L).reverse()),this.baseResultMapping=(0,b.derived)(L=>{const R=new h.DocumentLineRangeMap(this.baseResultDiffs.read(L),-1);return new h.DocumentLineRangeMap(R.lineRangeMappings.map(M=>M.inputRange.isEmpty||M.outputRange.isEmpty?new h.LineRangeMapping(M.inputRange.deltaStart(-1),M.outputRange.deltaStart(-1)):M),R.inputLineCount)}),this.resultBaseMapping=(0,b.derived)(L=>this.baseResultMapping.read(L).reverse()),this.diffComputingState=(0,b.derived)(L=>{const R=[this.input1TextModelDiffs,this.input2TextModelDiffs,this.resultTextModelDiffs].map(M=>M.state.read(L));return R.some(M=>M===1)?1:R.some(M=>M===3)?3:2}),this.inputDiffComputingState=(0,b.derived)(L=>{const R=[this.input1TextModelDiffs,this.input2TextModelDiffs].map(M=>M.state.read(L));return R.some(M=>M===1)?1:R.some(M=>M===3)?3:2}),this.isUpToDate=(0,b.derived)(L=>this.diffComputingState.read(L)===2),this.onInitialized=(0,b.waitForState)(this.diffComputingState,L=>L===2).then(()=>{}),this.firstRun=!0,this.unhandledConflictsCount=(0,b.derived)(L=>{const R=this.modifiedBaseRangeResultStates.read(L);let M=0;for(const[N,P]of R)P.handled.read(L)||M++;return M}),this.hasUnhandledConflicts=this.unhandledConflictsCount.map(L=>L>0),this._register((0,b.keepAlive)(this.modifiedBaseRangeResultStates)),this._register((0,b.keepAlive)(this.input1ResultMapping)),this._register((0,b.keepAlive)(this.input2ResultMapping));const k=this.initialize();this.onInitialized=this.onInitialized.then(async()=>{await k}),k.then(()=>{let L=!0;this._register((0,b.autorunHandleChanges)({handleChange:R=>(R.didChange(this.modifiedBaseRangeResultStates)&&(L=!0),R.didChange(this.resultTextModelDiffs.diffs)?R.change===1:!0)},R=>{const M=this.modifiedBaseRangeResultStates.read(R);if(!this.isUpToDate.read(R))return;const N=this.resultTextModelDiffs.diffs.read(R);(0,b.transaction)(P=>{if(this.updateBaseRangeAcceptedState(N,M,P),L){L=!1;for(const[x,F]of M){const V=F.accepted.get(),W=!(V.kind===i.ModifiedBaseRangeStateKind.base||V.kind===i.ModifiedBaseRangeStateKind.unrecognized);F.handledInput1.set(W,P),F.handledInput2.set(W,P)}}})}))})}async initialize(){this.options.resetResult&&await this.reset()}async reset(){await(0,b.waitForState)(this.inputDiffComputingState,n=>n===2);const l=this.modifiedBaseRangeResultStates.get();(0,b.transaction)(n=>{for(const[g,w]of l){let E,C=!1;g.input1Diffs.length===0?(E=i.ModifiedBaseRangeState.base.withInputValue(2,!0),C=!0):g.input2Diffs.length===0||g.isEqualChange?(E=i.ModifiedBaseRangeState.base.withInputValue(1,!0),C=!0):(E=i.ModifiedBaseRangeState.base,C=!1),w.accepted.set(E,n),w.computedFromDiffing=!1,w.previousNonDiffingState=void 0,w.handledInput1.set(C,n),w.handledInput2.set(C,n)}this.resultTextModel.pushEditOperations(null,[{range:new D.Range(1,1,Number.MAX_SAFE_INTEGER,1),text:this.computeAutoMergedResult()}],()=>null)})}computeAutoMergedResult(){const l=this.modifiedBaseRanges.get(),n=this.base.getLinesContent(),g=this.input1.textModel.getLinesContent(),w=this.input2.textModel.getLinesContent(),E=[];function C(_,A){for(let k=A.startLineNumber;k<A.endLineNumberExclusive;k++)E.push(_[k-1])}let I=1;for(const _ of l)C(n,S.LineRange.fromLineNumbers(I,_.baseRange.startLineNumber)),I=_.baseRange.endLineNumberExclusive,_.input1Diffs.length===0?C(w,_.input2Range):_.input2Diffs.length===0||_.isEqualChange?C(g,_.input1Range):C(n,_.baseRange);return C(n,S.LineRange.fromLineNumbers(I,n.length+1)),E.join(this.resultTextModel.getEOL())}hasBaseRange(l){return this.modifiedBaseRangeResultStates.get().has(l)}get isApplyingEditInResult(){return this.resultTextModelDiffs.isApplyingChange}getInputResultMapping(l,n,g){const w=h.DocumentLineRangeMap.betweenOutputs(l,n,g);return new h.DocumentLineRangeMap(w.lineRangeMappings.map(E=>E.inputRange.isEmpty||E.outputRange.isEmpty?new h.LineRangeMapping(E.inputRange.deltaStart(-1),E.outputRange.deltaStart(-1)):E),w.inputLineCount)}translateInputRangeToBase(l,n){const g=l===1?this.baseInput1Diffs.get():this.baseInput2Diffs.get();return new h.DocumentRangeMap(g.flatMap(E=>E.rangeMappings),0).reverse().projectRange(n).outputRange}translateBaseRangeToInput(l,n){const g=l===1?this.baseInput1Diffs.get():this.baseInput2Diffs.get();return new h.DocumentRangeMap(g.flatMap(E=>E.rangeMappings),0).projectRange(n).outputRange}getLineRangeInResult(l,n){return this.resultTextModelDiffs.getResultLineRange(l,n)}translateResultRangeToBase(l){return new h.DocumentRangeMap(this.baseResultDiffs.get().flatMap(g=>g.rangeMappings),0).reverse().projectRange(l).outputRange}translateBaseRangeToResult(l){return new h.DocumentRangeMap(this.baseResultDiffs.get().flatMap(g=>g.rangeMappings),0).projectRange(l).outputRange}findModifiedBaseRangesInRange(l){return this.modifiedBaseRanges.get().filter(n=>n.baseRange.intersects(l))}updateBaseRangeAcceptedState(l,n,g){const w=(0,r.leftJoin)(n,l,(E,C)=>E[0].baseRange.touches(C.inputRange)?t.CompareResult.neitherLessOrGreaterThan:S.LineRange.compareByStart(E[0].baseRange,C.inputRange));for(const E of w){const C=this.computeState(E.left[0],E.rights),I=E.left[1],_=I.accepted.get();_.equals(C)||(!this.firstRun&&!I.computedFromDiffing&&(I.computedFromDiffing=!0,I.previousNonDiffingState=_),I.accepted.set(C,g))}this.firstRun&&(this.firstRun=!1)}computeState(l,n){if(n.length===0)return i.ModifiedBaseRangeState.base;const g=n.map(C=>C.getLineEdit());function w(C){return(0,t.equals)(g,C.map(I=>I.getLineEdit()),(I,_)=>I.equals(_))}if(w(l.input1Diffs))return i.ModifiedBaseRangeState.base.withInputValue(1,!0);if(w(l.input2Diffs))return i.ModifiedBaseRangeState.base.withInputValue(2,!0);const E=[i.ModifiedBaseRangeState.base.withInputValue(1,!0).withInputValue(2,!0,!0),i.ModifiedBaseRangeState.base.withInputValue(2,!0).withInputValue(1,!0,!0),i.ModifiedBaseRangeState.base.withInputValue(1,!0).withInputValue(2,!0,!1),i.ModifiedBaseRangeState.base.withInputValue(2,!0).withInputValue(1,!0,!1)];for(const C of E){const{edit:I}=l.getEditForBase(C);if(I){const A=this.resultTextModelDiffs.getResultLineRange(l.baseRange).getLines(this.resultTextModel);if((0,t.equals)(I.newLines,A,(k,L)=>k===L))return C}}return i.ModifiedBaseRangeState.unrecognized}getState(l){const n=this.modifiedBaseRangeResultStates.get().get(l);if(!n)throw new y.BugIndicatingError("object must be from this instance");return n.accepted}setState(l,n,g,w,E=!1){if(!this.isUpToDate.get())throw new y.BugIndicatingError("Cannot set state while updating");const C=this.modifiedBaseRangeResultStates.get().get(l);if(!C)throw new y.BugIndicatingError("object must be from this instance");const I=this.resultTextModelDiffs.findTouchingDiffs(l.baseRange),_=new v.UndoRedoGroup;I&&this.resultTextModelDiffs.removeDiffs(I,w,_);const{edit:A,effectiveState:k}=l.getEditForBase(n);C.accepted.set(k,w),C.previousNonDiffingState=void 0,C.computedFromDiffing=!1;const L=C.handledInput1.get(),R=C.handledInput2.get();(!L||!R)&&this.undoRedoService.pushElement(new p(this.resultTextModel.uri,new WeakRef(this),new WeakRef(C),L,R),_),A&&(this.resultTextModel.pushStackElement(),this.resultTextModelDiffs.applyEditRelativeToOriginal(A,w,_),this.resultTextModel.pushStackElement()),C.handledInput1.set(!0,w),C.handledInput2.set(!0,w)}resetDirtyConflictsToBase(){(0,b.transaction)(l=>{this.resultTextModel.pushStackElement();for(const n of this.modifiedBaseRanges.get())this.getState(n).get().kind===i.ModifiedBaseRangeStateKind.unrecognized&&this.setState(n,i.ModifiedBaseRangeState.base,!1,l,!1);this.resultTextModel.pushStackElement()})}isHandled(l){return this.modifiedBaseRangeResultStates.get().get(l).handled}isInputHandled(l,n){const g=this.modifiedBaseRangeResultStates.get().get(l);return n===1?g.handledInput1:g.handledInput2}setInputHandled(l,n,g,w){const E=this.modifiedBaseRangeResultStates.get().get(l);if(E.handled.get()===g)return;const C=new WeakRef(u),I=new WeakRef(this);this.undoRedoService.pushElement({type:0,resource:this.resultTextModel.uri,code:"setInputHandled",label:(0,f.localize)(0,null),redo(){const _=I.deref(),A=C.deref();_&&!_.isDisposed()&&A&&(0,b.transaction)(k=>{n===1?E.handledInput1.set(g,k):E.handledInput2.set(g,k)})},undo(){const _=I.deref(),A=C.deref();_&&!_.isDisposed()&&A&&(0,b.transaction)(k=>{n===1?E.handledInput1.set(!g,k):E.handledInput2.set(!g,k)})}}),n===1?E.handledInput1.set(g,w):E.handledInput2.set(g,w)}setHandled(l,n,g){const w=this.modifiedBaseRangeResultStates.get().get(l);w.handled.get()!==n&&(w.handledInput1.set(n,g),w.handledInput2.set(n,g))}setLanguageId(l,n){const g=this.languageService.createById(l);this.base.setLanguage(g,n),this.input1.textModel.setLanguage(g,n),this.input2.textModel.setLanguage(g,n),this.resultTextModel.setLanguage(g,n)}getInitialResultValue(){const l=[];for(;;){const n=this.resultSnapshot.read();if(n===null)break;l.push(n)}return l.join()}async getResultValueWithConflictMarkers(){if(await(0,b.waitForState)(this.diffComputingState,_=>_===2),this.unhandledConflictsCount.get()===0)return this.resultTextModel.getValue();const l=this.resultTextModel.getLinesContent(),n=this.input1.textModel.getLinesContent(),g=this.input2.textModel.getLinesContent(),w=this.modifiedBaseRangeResultStates.get(),E=[];function C(_,A){for(let k=A.startLineNumber;k<A.endLineNumberExclusive;k++)E.push(_[k-1])}let I=1;for(const[_,A]of w){if(A.handled.get())continue;const k=this.resultTextModelDiffs.getResultLineRange(_.baseRange);C(l,S.LineRange.fromLineNumbers(I,Math.max(I,k.startLineNumber))),I=k.endLineNumberExclusive,E.push("<<<<<<<"),A.accepted.get().kind===i.ModifiedBaseRangeStateKind.unrecognized?C(l,k):C(n,_.input1Range),E.push("======="),C(g,_.input2Range),E.push(">>>>>>>")}return C(l,S.LineRange.fromLineNumbers(I,l.length+1)),E.join(` `)}get conflictCount(){return o(this.modifiedBaseRanges.get(),l=>l.isConflicting)}get combinableConflictCount(){return o(this.modifiedBaseRanges.get(),l=>l.isConflicting&&l.canBeCombined)}get conflictsResolvedWithBase(){return o(this.modifiedBaseRangeResultStates.get().entries(),([l,n])=>l.isConflicting&&n.accepted.get().kind===i.ModifiedBaseRangeStateKind.base)}get conflictsResolvedWithInput1(){return o(this.modifiedBaseRangeResultStates.get().entries(),([l,n])=>l.isConflicting&&n.accepted.get().kind===i.ModifiedBaseRangeStateKind.input1)}get conflictsResolvedWithInput2(){return o(this.modifiedBaseRangeResultStates.get().entries(),([l,n])=>l.isConflicting&&n.accepted.get().kind===i.ModifiedBaseRangeStateKind.input2)}get conflictsResolvedWithSmartCombination(){return o(this.modifiedBaseRangeResultStates.get().entries(),([l,n])=>{const g=n.accepted.get();return l.isConflicting&&g.kind===i.ModifiedBaseRangeStateKind.both&&g.smartCombination})}get manuallySolvedConflictCountThatEqualNone(){return o(this.modifiedBaseRangeResultStates.get().entries(),([l,n])=>l.isConflicting&&n.accepted.get().kind===i.ModifiedBaseRangeStateKind.unrecognized)}get manuallySolvedConflictCountThatEqualSmartCombine(){return o(this.modifiedBaseRangeResultStates.get().entries(),([l,n])=>{const g=n.accepted.get();return l.isConflicting&&n.computedFromDiffing&&g.kind===i.ModifiedBaseRangeStateKind.both&&g.smartCombination})}get manuallySolvedConflictCountThatEqualInput1(){return o(this.modifiedBaseRangeResultStates.get().entries(),([l,n])=>{const g=n.accepted.get();return l.isConflicting&&n.computedFromDiffing&&g.kind===i.ModifiedBaseRangeStateKind.input1})}get manuallySolvedConflictCountThatEqualInput2(){return o(this.modifiedBaseRangeResultStates.get().entries(),([l,n])=>{const g=n.accepted.get();return l.isConflicting&&n.computedFromDiffing&&g.kind===i.ModifiedBaseRangeStateKind.input2})}get manuallySolvedConflictCountThatEqualNoneAndStartedWithBase(){return o(this.modifiedBaseRangeResultStates.get().entries(),([l,n])=>{const g=n.accepted.get();return l.isConflicting&&g.kind===i.ModifiedBaseRangeStateKind.unrecognized&&n.previousNonDiffingState?.kind===i.ModifiedBaseRangeStateKind.base})}get manuallySolvedConflictCountThatEqualNoneAndStartedWithInput1(){return o(this.modifiedBaseRangeResultStates.get().entries(),([l,n])=>{const g=n.accepted.get();return l.isConflicting&&g.kind===i.ModifiedBaseRangeStateKind.unrecognized&&n.previousNonDiffingState?.kind===i.ModifiedBaseRangeStateKind.input1})}get manuallySolvedConflictCountThatEqualNoneAndStartedWithInput2(){return o(this.modifiedBaseRangeResultStates.get().entries(),([l,n])=>{const g=n.accepted.get();return l.isConflicting&&g.kind===i.ModifiedBaseRangeStateKind.unrecognized&&n.previousNonDiffingState?.kind===i.ModifiedBaseRangeStateKind.input2})}get manuallySolvedConflictCountThatEqualNoneAndStartedWithBothNonSmart(){return o(this.modifiedBaseRangeResultStates.get().entries(),([l,n])=>{const g=n.accepted.get();return l.isConflicting&&g.kind===i.ModifiedBaseRangeStateKind.unrecognized&&n.previousNonDiffingState?.kind===i.ModifiedBaseRangeStateKind.both&&!n.previousNonDiffingState?.smartCombination})}get manuallySolvedConflictCountThatEqualNoneAndStartedWithBothSmart(){return o(this.modifiedBaseRangeResultStates.get().entries(),([l,n])=>{const g=n.accepted.get();return l.isConflicting&&g.kind===i.ModifiedBaseRangeStateKind.unrecognized&&n.previousNonDiffingState?.kind===i.ModifiedBaseRangeStateKind.both&&n.previousNonDiffingState?.smartCombination})}};e.MergeEditorModel=s,e.MergeEditorModel=s=fe([O(7,T.ILanguageService),O(8,v.IUndoRedoService)],s);function o(c,l){let n=0;for(const g of c)l(g)&&n++;return n}class u{constructor(l){this.baseRange=l,this.accepted=(0,b.observableValue)(`BaseRangeState${this.baseRange.baseRange}`,i.ModifiedBaseRangeState.base),this.handledInput1=(0,b.observableValue)(`BaseRangeHandledState${this.baseRange.baseRange}.Input1`,!1),this.handledInput2=(0,b.observableValue)(`BaseRangeHandledState${this.baseRange.baseRange}.Input2`,!1),this.computedFromDiffing=!1,this.previousNonDiffingState=void 0,this.handled=(0,b.derived)(n=>this.handledInput1.read(n)&&this.handledInput2.read(n))}}var d;(function(c){c[c.initializing=1]="initializing",c[c.upToDate=2]="upToDate",c[c.updating=3]="updating"})(d||(e.MergeEditorModelState=d={}));class p{constructor(l,n,g,w,E){this.resource=l,this.mergeEditorModelRef=n,this.stateRef=g,this.input1Handled=w,this.input2Handled=E,this.code="undoMarkAsHandled",this.label=(0,f.localize)(1,null),this.type=0}redo(){const l=this.mergeEditorModelRef.deref();if(!l||l.isDisposed())return;const n=this.stateRef.deref();n&&(0,b.transaction)(g=>{n.handledInput1.set(!0,g),n.handledInput2.set(!0,g)})}undo(){const l=this.mergeEditorModelRef.deref();if(!l||l.isDisposed())return;const n=this.stateRef.deref();n&&(0,b.transaction)(g=>{n.handledInput1.set(this.input1Handled,g),n.handledInput2.set(this.input2Handled,g)})}}}),define(Q[729],Y([1,0,2786,36]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.conflictInput2Background=e.conflictInput1Background=e.conflictingLinesBackground=e.unhandledConflictMinimapOverViewRulerColor=e.handledConflictMinimapOverViewRulerColor=e.conflictBorderHandledFocused=e.conflictBorderHandledUnfocused=e.conflictBorderUnhandledFocused=e.conflictBorderUnhandledUnfocused=e.diffWordBase=e.diffBase=e.diffWord=e.diff=void 0,e.diff=(0,y.registerColor)("mergeEditor.change.background",{dark:"#9bb95533",light:"#9bb95533",hcDark:"#9bb95533",hcLight:"#9bb95533"},(0,t.localize)(0,null)),e.diffWord=(0,y.registerColor)("mergeEditor.change.word.background",{dark:"#9ccc2c33",light:"#9ccc2c66",hcDark:"#9ccc2c33",hcLight:"#9ccc2c66"},(0,t.localize)(1,null)),e.diffBase=(0,y.registerColor)("mergeEditor.changeBase.background",{dark:"#4B1818FF",light:"#FFCCCCFF",hcDark:"#4B1818FF",hcLight:"#FFCCCCFF"},(0,t.localize)(2,null)),e.diffWordBase=(0,y.registerColor)("mergeEditor.changeBase.word.background",{dark:"#6F1313FF",light:"#FFA3A3FF",hcDark:"#6F1313FF",hcLight:"#FFA3A3FF"},(0,t.localize)(3,null)),e.conflictBorderUnhandledUnfocused=(0,y.registerColor)("mergeEditor.conflict.unhandledUnfocused.border",{dark:"#ffa6007a",light:"#ffa600FF",hcDark:"#ffa6007a",hcLight:"#ffa6007a"},(0,t.localize)(4,null)),e.conflictBorderUnhandledFocused=(0,y.registerColor)("mergeEditor.conflict.unhandledFocused.border",{dark:"#ffa600",light:"#ffa600",hcDark:"#ffa600",hcLight:"#ffa600"},(0,t.localize)(5,null)),e.conflictBorderHandledUnfocused=(0,y.registerColor)("mergeEditor.conflict.handledUnfocused.border",{dark:"#86868649",light:"#86868649",hcDark:"#86868649",hcLight:"#86868649"},(0,t.localize)(6,null)),e.conflictBorderHandledFocused=(0,y.registerColor)("mergeEditor.conflict.handledFocused.border",{dark:"#c1c1c1cc",light:"#c1c1c1cc",hcDark:"#c1c1c1cc",hcLight:"#c1c1c1cc"},(0,t.localize)(7,null)),e.handledConflictMinimapOverViewRulerColor=(0,y.registerColor)("mergeEditor.conflict.handled.minimapOverViewRuler",{dark:"#adaca8ee",light:"#adaca8ee",hcDark:"#adaca8ee",hcLight:"#adaca8ee"},(0,t.localize)(8,null)),e.unhandledConflictMinimapOverViewRulerColor=(0,y.registerColor)("mergeEditor.conflict.unhandled.minimapOverViewRuler",{dark:"#fcba03FF",light:"#fcba03FF",hcDark:"#fcba03FF",hcLight:"#fcba03FF"},(0,t.localize)(9,null)),e.conflictingLinesBackground=(0,y.registerColor)("mergeEditor.conflictingLines.background",{dark:"#ffea0047",light:"#ffea0047",hcDark:"#ffea0047",hcLight:"#ffea0047"},(0,t.localize)(10,null));const b=.4;e.conflictInput1Background=(0,y.registerColor)("mergeEditor.conflict.input1.background",{dark:(0,y.transparent)(y.mergeCurrentHeaderBackground,b),light:(0,y.transparent)(y.mergeCurrentHeaderBackground,b),hcDark:(0,y.transparent)(y.mergeCurrentHeaderBackground,b),hcLight:(0,y.transparent)(y.mergeCurrentHeaderBackground,b)},(0,t.localize)(11,null)),e.conflictInput2Background=(0,y.registerColor)("mergeEditor.conflict.input2.background",{dark:(0,y.transparent)(y.mergeIncomingHeaderBackground,b),light:(0,y.transparent)(y.mergeIncomingHeaderBackground,b),hcDark:(0,y.transparent)(y.mergeIncomingHeaderBackground,b),hcLight:(0,y.transparent)(y.mergeIncomingHeaderBackground,b)},(0,t.localize)(12,null))}),define(Q[922],Y([1,0,7,4,109,375]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorGutter=void 0;class T extends y.Disposable{constructor(m,S,h){super(),this._editor=m,this._domNode=S,this.itemProvider=h,this.scrollTop=(0,b.observableFromEvent)(this._editor.onDidScrollChange,i=>this._editor.getScrollTop()),this.isScrollTopZero=this.scrollTop.map(i=>i===0),this.modelAttached=(0,b.observableFromEvent)(this._editor.onDidChangeModel,i=>this._editor.hasModel()),this.editorOnDidChangeViewZones=(0,b.observableSignalFromEvent)("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=(0,b.observableSignalFromEvent)("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=(0,b.observableSignal)("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";const a=this._domNode.appendChild((0,t.h)("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),r=new ResizeObserver(()=>{(0,b.transaction)(i=>{this.domNodeSizeChanged.trigger(i)})});r.observe(this._domNode),this._register((0,y.toDisposable)(()=>r.disconnect())),this._register((0,b.autorun)(i=>{a.className=this.isScrollTopZero.read(i)?"":"scroll-decoration"})),this._register((0,b.autorun)(i=>this.render(i)))}dispose(){super.dispose(),(0,t.reset)(this._domNode)}render(m){if(!this.modelAttached.read(m))return;this.domNodeSizeChanged.read(m),this.editorOnDidChangeViewZones.read(m),this.editorOnDidContentSizeChange.read(m);const S=this.scrollTop.read(m),h=this._editor.getVisibleRanges(),a=new Set(this.views.keys());if(h.length>0){const r=h[0],i=new D.LineRange(r.startLineNumber,r.endLineNumber-r.startLineNumber).deltaEnd(1),s=this.itemProvider.getIntersectingGutterItems(i,m);for(const o of s){if(!o.range.touches(i))continue;a.delete(o.id);let u=this.views.get(o.id);if(u)u.gutterItemView.update(o);else{const l=document.createElement("div");this._domNode.appendChild(l);const n=this.itemProvider.createView(o,l);u=new f(n,l),this.views.set(o.id,u)}const d=o.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(o.range.startLineNumber,!0)-S:this._editor.getBottomForLineNumber(o.range.startLineNumber-1,!1)-S,c=this._editor.getBottomForLineNumber(o.range.endLineNumberExclusive-1,!0)-S-d;u.domNode.style.top=`${d}px`,u.domNode.style.height=`${c}px`,u.gutterItemView.layout(d,c,0,this._domNode.clientHeight)}}for(const r of a){const i=this.views.get(r);i.gutterItemView.dispose(),this._domNode.removeChild(i.domNode),this.views.delete(r)}}}e.EditorGutter=T;class f{constructor(m,S){this.gutterItemView=m,this.domNode=S}}}),define(Q[923],Y([1,0,7,6,4,109,48,190,96,1236,414,221,5,416,291]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TitleMenu=e.createSelectionsAutorun=e.CodeEditorView=void 0;class s extends b.Disposable{updateOptions(p){this.editor.updateOptions(p)}constructor(p,c,l){super(),this.instantiationService=p,this.viewModel=c,this.configurationService=l,this.model=this.viewModel.map(n=>n?.model),this.htmlElements=(0,t.h)("div.code-view",[(0,t.h)("div.header@header",[(0,t.h)("span.title@title"),(0,t.h)("span.description@description"),(0,t.h)("span.detail@detail"),(0,t.h)("span.toolbar@toolbar")]),(0,t.h)("div.container",[(0,t.h)("div.gutter@gutterDiv"),(0,t.h)("div@editor")])]),this._onDidViewChange=new y.Emitter,this.view={element:this.htmlElements.root,minimumWidth:r.DEFAULT_EDITOR_MIN_DIMENSIONS.width,maximumWidth:r.DEFAULT_EDITOR_MAX_DIMENSIONS.width,minimumHeight:r.DEFAULT_EDITOR_MIN_DIMENSIONS.height,maximumHeight:r.DEFAULT_EDITOR_MAX_DIMENSIONS.height,onDidChange:this._onDidViewChange.event,layout:(n,g,w,E)=>{(0,i.setStyle)(this.htmlElements.root,{width:n,height:g,top:w,left:E}),this.editor.layout({width:n-this.htmlElements.gutterDiv.clientWidth,height:g-this.htmlElements.header.clientHeight})}},this.checkboxesVisible=(0,i.observableConfigValue)("mergeEditor.showCheckboxes",!1,this.configurationService),this.showDeletionMarkers=(0,i.observableConfigValue)("mergeEditor.showDeletionMarkers",!0,this.configurationService),this.useSimplifiedDecorations=(0,i.observableConfigValue)("mergeEditor.useSimplifiedDecorations",!1,this.configurationService),this.editor=this.instantiationService.createInstance(f.CodeEditorWidget,this.htmlElements.editor,{},{contributions:this.getEditorContributions()}),this.isFocused=(0,D.observableFromEvent)(y.Event.any(this.editor.onDidBlurEditorWidget,this.editor.onDidFocusEditorWidget),()=>this.editor.hasWidgetFocus()),this.cursorPosition=(0,D.observableFromEvent)(this.editor.onDidChangeCursorPosition,()=>this.editor.getPosition()),this.selection=(0,D.observableFromEvent)(this.editor.onDidChangeCursorSelection,()=>this.editor.getSelections()),this.cursorLineNumber=this.cursorPosition.map(n=>n?.lineNumber)}getEditorContributions(){return T.EditorExtensionsRegistry.getEditorContributions().filter(p=>p.id!==S.FoldingController.ID&&p.id!==m.CodeLensContribution.ID)}}e.CodeEditorView=s;function o(d,p){const c=(0,D.derived)(l=>{const n=d.viewModel.read(l);if(!n)return[];const g=n.selectionInBase.read(l);return!g||g.sourceEditor===d?[]:g.rangesInBase.map(w=>p(w,n))});return(0,D.autorun)(l=>{const n=c.read(l);n.length!==0&&d.editor.setSelections(n.map(g=>new v.Selection(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn)))})}e.createSelectionsAutorun=o;let u=class extends b.Disposable{constructor(p,c,l){super();const n=l.createInstance(h.MenuWorkbenchToolBar,c,p,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:()=>!1}});this._store.add(n)}};e.TitleMenu=u,e.TitleMenu=u=fe([O(2,a.IInstantiationService)],u)}),define(Q[3541],Y([1,0,7,169,15,109,137,2788,13,9,5,291,729,922,923]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseCodeEditorView=void 0;let s=class extends i.CodeEditorView{constructor(u,d,p){super(d,u,p),this.decorations=(0,D.derived)(c=>{const l=this.viewModel.read(c);if(!l)return[];const n=l.model,g=n.base,w=l.activeModifiedBaseRange.read(c),E=l.showNonConflictingChanges.read(c),C=this.showDeletionMarkers.read(c),I=[];for(const _ of n.modifiedBaseRanges.read(c)){const A=_.baseRange;if(!A)continue;const k=n.isHandled(_).read(c);if(!_.isConflicting&&k&&!E)continue;const L=["merge-editor-block"];let R=[0,0,0,0];k&&L.push("handled"),_===w&&(L.push("focused"),R=[0,2,0,2]),L.push("base");const M=l.baseShowDiffAgainst.read(c);if(M)for(const N of _.getInputDiffs(M)){const P=N.inputRange.toInclusiveRange();P&&I.push({range:P,options:{className:"merge-editor-diff base",description:"Merge Editor",isWholeLine:!0}});for(const x of N.rangeMappings)(C||!x.inputRange.isEmpty())&&I.push({range:x.inputRange,options:{className:x.inputRange.isEmpty()?"merge-editor-diff-empty-word base":"merge-editor-diff-word base",description:"Merge Editor",showIfCollapsed:!0}})}I.push({range:A.toInclusiveRangeOrEmpty(),options:{showIfCollapsed:!0,blockClassName:L.join(" "),blockPadding:R,blockIsAfterEnd:A.startLineNumber>g.getLineCount(),description:"Merge Editor",minimap:{position:T.MinimapPosition.Gutter,color:{id:k?a.handledConflictMinimapOverViewRulerColor:a.unhandledConflictMinimapOverViewRulerColor}},overviewRuler:_.isConflicting?{position:T.OverviewRulerLane.Center,color:{id:k?a.handledConflictMinimapOverViewRulerColor:a.unhandledConflictMinimapOverViewRulerColor}}:void 0}})}return I}),this._register((0,i.createSelectionsAutorun)(this,(c,l)=>c)),this._register(d.createInstance(i.TitleMenu,v.MenuId.MergeBaseToolbar,this.htmlElements.title)),this._register((0,D.autorunWithStore)((c,l)=>{this.checkboxesVisible.read(c)&&l.add(new r.EditorGutter(this.editor,this.htmlElements.gutterDiv,{getIntersectingGutterItems:(n,g)=>[],createView:(n,g)=>{throw new b.BugIndicatingError}}))})),this._register((0,D.autorun)(c=>{const l=this.viewModel.read(c);if(!l)return;this.editor.setModel(l.model.base),(0,t.reset)(this.htmlElements.title,...(0,y.renderLabelWithIcons)((0,f.localize)(0,null)));const n=l.baseShowDiffAgainst.read(c);let g;if(n){const w=(0,f.localize)(1,null,n===1?l.model.input1.title:l.model.input2.title),E=(0,f.localize)(2,null);g=(0,t.h)("span",{title:E},[w]).root}(0,t.reset)(this.htmlElements.description,...g?[g]:[])})),this._register((0,h.applyObservableDecorations)(this.editor,this.decorations))}};e.BaseCodeEditorView=s,e.BaseCodeEditorView=s=fe([O(1,S.IInstantiationService),O(2,m.IConfigurationService)],s)}),define(Q[3542],Y([1,0,7,169,273,34,32,4,226,109,33,17,137,2789,13,9,29,5,54,291,729,922,923]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeConflictGutterItemView=e.ModifiedBaseRangeGutterItemModel=e.InputCodeEditorView=void 0;let g=class extends n.CodeEditorView{constructor(I,_,A,k,L){super(A,_,L),this.inputNumber=I,this.otherInputNumber=this.inputNumber===1?2:1,this.modifiedBaseRangeGutterItemInfos=(0,m.derivedOpts)({debugName:`input${this.inputNumber}.modifiedBaseRangeGutterItemInfos`},R=>{const M=this.viewModel.read(R);if(!M)return[];const N=M.model,P=this.inputNumber,x=M.showNonConflictingChanges.read(R);return N.modifiedBaseRanges.read(R).filter(F=>F.getInputDiffs(this.inputNumber).length>0&&(x||F.isConflicting||!N.isHandled(F).read(R))).map((F,V)=>new w(V.toString(),F,P,M))}),this.decorations=(0,m.derivedOpts)({debugName:`input${this.inputNumber}.decorations`},R=>{const M=this.viewModel.read(R);if(!M)return[];const N=M.model,P=(this.inputNumber===1?N.input1:N.input2).textModel,x=M.activeModifiedBaseRange.read(R),F=new Array,V=M.showNonConflictingChanges.read(R),W=this.showDeletionMarkers.read(R),B=!(M.baseCodeEditorView.read(R)!==void 0&&M.baseShowDiffAgainst.read(R)===this.inputNumber)&&this.useSimplifiedDecorations.read(R);for(const K of N.modifiedBaseRanges.read(R)){const H=K.getInputRange(this.inputNumber);if(!H)continue;const U=["merge-editor-block"];let G=[0,0,0,0];const $=N.isInputHandled(K,this.inputNumber).read(R);$&&U.push("handled"),K===x&&(U.push("focused"),G=[0,2,0,2]),K.isConflicting&&U.push("conflicting");const ie=this.inputNumber===1?"input i1":"input i2";if(U.push(ie),!(!K.isConflicting&&!V&&$)&&(B&&!$&&U.push("use-simplified-decorations"),F.push({range:H.toInclusiveRangeOrEmpty(),options:{showIfCollapsed:!0,blockClassName:U.join(" "),blockPadding:G,blockIsAfterEnd:H.startLineNumber>P.getLineCount(),description:"Merge Editor",minimap:{position:a.MinimapPosition.Gutter,color:{id:$?c.handledConflictMinimapOverViewRulerColor:c.unhandledConflictMinimapOverViewRulerColor}},overviewRuler:K.isConflicting?{position:a.OverviewRulerLane.Center,color:{id:$?c.handledConflictMinimapOverViewRulerColor:c.unhandledConflictMinimapOverViewRulerColor}}:void 0}}),!B&&(K.isConflicting||!N.isHandled(K).read(R)))){const J=K.getInputDiffs(this.inputNumber);for(const j of J){const ee=j.outputRange.toInclusiveRange();if(ee&&F.push({range:ee,options:{className:`merge-editor-diff ${ie}`,description:"Merge Editor",isWholeLine:!0}}),j.rangeMappings)for(const X of j.rangeMappings)(W||!X.outputRange.isEmpty())&&F.push({range:X.outputRange,options:{className:X.outputRange.isEmpty()?`merge-editor-diff-empty-word ${ie}`:`merge-editor-diff-word ${ie}`,description:"Merge Editor",showIfCollapsed:!0}})}}}return F}),this.htmlElements.root.classList.add("input"),this._register(new l.EditorGutter(this.editor,this.htmlElements.gutterDiv,{getIntersectingGutterItems:(R,M)=>this.checkboxesVisible.read(M)?this.modifiedBaseRangeGutterItemInfos.read(M):[],createView:(R,M)=>new E(R,M,k)})),this._register((0,n.createSelectionsAutorun)(this,(R,M)=>M.model.translateBaseRangeToInput(this.inputNumber,R))),this._register(A.createInstance(n.TitleMenu,I===1?i.MenuId.MergeInput1Toolbar:i.MenuId.MergeInput2Toolbar,this.htmlElements.toolbar)),this._register((0,m.autorunOpts)({debugName:`input${this.inputNumber}: update labels & text model`},R=>{const M=this.viewModel.read(R);if(!M)return;this.editor.setModel(this.inputNumber===1?M.model.input1.textModel:M.model.input2.textModel);const N=this.inputNumber===1?M.model.input1.title||(0,r.localize)(0,null):M.model.input2.title||(0,r.localize)(1,null),P=this.inputNumber===1?M.model.input1.description:M.model.input2.description,x=this.inputNumber===1?M.model.input1.detail:M.model.input2.detail;(0,t.reset)(this.htmlElements.title,...(0,y.renderLabelWithIcons)(N)),(0,t.reset)(this.htmlElements.description,...P?(0,y.renderLabelWithIcons)(P):[]),(0,t.reset)(this.htmlElements.detail,...x?(0,y.renderLabelWithIcons)(x):[])})),this._register((0,p.applyObservableDecorations)(this.editor,this.decorations))}};e.InputCodeEditorView=g,e.InputCodeEditorView=g=fe([O(2,u.IInstantiationService),O(3,o.IContextMenuService),O(4,s.IConfigurationService)],g);class w{constructor(I,_,A,k){this.id=I,this.baseRange=_,this.inputNumber=A,this.viewModel=k,this.model=this.viewModel.model,this.range=this.baseRange.getInputRange(this.inputNumber),this.enabled=this.model.isUpToDate,this.toggleState=(0,m.derived)(L=>{const R=this.model.getState(this.baseRange).read(L).getInput(this.inputNumber);return R===2&&!this.baseRange.isOrderRelevant?1:R}),this.state=(0,m.derived)(L=>{const R=this.viewModel.activeModifiedBaseRange.read(L);return this.model.hasBaseRange(this.baseRange)?{handled:this.model.isHandled(this.baseRange).read(L),focused:this.baseRange===R}:{handled:!1,focused:!1}})}setState(I,_){this.viewModel.setState(this.baseRange,this.model.getState(this.baseRange).get().withInputValue(this.inputNumber,I),_,this.inputNumber)}toggleBothSides(){(0,m.transaction)(I=>{const _=this.model.getState(this.baseRange).get();this.model.setState(this.baseRange,_.toggle(this.inputNumber).toggle(this.inputNumber===1?2:1),!0,I)})}getContextMenuActions(){const I=this.model.getState(this.baseRange).get(),_=this.model.isHandled(this.baseRange).get(),A=R=>{(0,m.transaction)(M=>this.viewModel.setState(this.baseRange,R,M,this.inputNumber))};function k(R,M,N,P){const x=new D.Action(R,M,void 0,!0,()=>{A(N)});return x.checked=P,x}const L=I.includesInput1&&I.includesInput2;return[this.baseRange.input1Diffs.length>0?k("mergeEditor.acceptInput1",(0,r.localize)(2,null,this.model.input1.title),I.toggle(1),I.includesInput1):void 0,this.baseRange.input2Diffs.length>0?k("mergeEditor.acceptInput2",(0,r.localize)(3,null,this.model.input2.title),I.toggle(2),I.includesInput2):void 0,this.baseRange.isConflicting?(0,p.setFields)(k("mergeEditor.acceptBoth",(0,r.localize)(4,null),I.withInputValue(1,!L).withInputValue(2,!L),L),{enabled:this.baseRange.canBeCombined}):void 0,new D.Separator,this.baseRange.isConflicting?(0,p.setFields)(k("mergeEditor.swap",(0,r.localize)(5,null),I.swap(),!1),{enabled:!I.kind&&(!L||this.baseRange.isOrderRelevant)}):void 0,(0,p.setFields)(new D.Action("mergeEditor.markAsHandled",(0,r.localize)(6,null),void 0,!0,()=>{(0,m.transaction)(R=>{this.model.setHandled(this.baseRange,!_,R)})}),{checked:_})].filter(h.isDefined)}}e.ModifiedBaseRangeGutterItemModel=w;class E extends f.Disposable{constructor(I,_,A){super(),this.isMultiLine=(0,m.observableValue)("isMultiLine",!1),this.item=(0,m.observableValue)("item",I);const k=new b.Toggle({isChecked:!1,title:"",icon:T.Codicon.check,...d.defaultToggleStyles});k.domNode.classList.add("accept-conflict-group"),this._register((0,t.addDisposableListener)(k.domNode,t.EventType.MOUSE_DOWN,L=>{const R=this.item.get();R&&(L.button===2?(L.stopPropagation(),L.preventDefault(),A.showContextMenu({getAnchor:()=>k.domNode,getActions:()=>R.getContextMenuActions()})):L.button===1&&(L.stopPropagation(),L.preventDefault(),R.toggleBothSides()))})),this._register((0,m.autorun)(L=>{const R=this.item.read(L),M=R.toggleState.read(L),P={[0]:{icon:void 0,checked:!1,title:(0,r.localize)(7,null)},[3]:{icon:T.Codicon.circleFilled,checked:!1,title:(0,r.localize)(8,null)},[1]:{icon:T.Codicon.check,checked:!0,title:(0,r.localize)(9,null)},[2]:{icon:T.Codicon.checkAll,checked:!0,title:(0,r.localize)(10,null)}}[M];k.setIcon(P.icon),k.checked=P.checked,k.setTitle(P.title),R.enabled.read(L)?k.enable():k.disable()})),this._register((0,m.autorun)(L=>{const R=this.item.read(L).state.read(L),M=["merge-accept-gutter-marker",R.handled&&"handled",R.focused&&"focused",this.isMultiLine.read(L)?"multi-line":"single-line"];_.className=M.filter(N=>typeof N=="string").join(" ")})),this._register(k.onChange(()=>{(0,m.transaction)(L=>{this.item.get().setState(k.checked,L)})})),_.appendChild((0,t.h)("div.background",[S.noBreakWhitespace]).root),_.appendChild(this.checkboxDiv=(0,t.h)("div.checkbox",[(0,t.h)("div.checkbox-background",[k.domNode])]).root)}layout(I,_,A,k){const L=this.checkboxDiv.clientHeight,R=_/2-L/2,M=L;let N=I+R;const P=[M,A+k-M-L],x=[I+M,I+_-L-M];x[0]<x[1]&&(N=(0,v.clamp)(N,P[0],P[1]),N=(0,v.clamp)(N,x[0],x[1])),this.checkboxDiv.style.top=`${N-I}px`,(0,m.transaction)(F=>{this.isMultiLine.set(_>30,F)})}update(I){(0,m.transaction)(_=>{this.item.set(I,_)})}}e.MergeConflictGutterItemView=E}),define(Q[3543],Y([1,0,7,4,6]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FixedZoneWidget=void 0;class D extends y.Disposable{static{this.counter=0}constructor(f,v,m,S,h){super(),this.editor=f,this.overlayWidgetId=`fixedZoneWidget-${D.counter++}`,this.widgetDomNode=(0,t.h)("div.fixed-zone-widget").root,this.overlayWidget={getId:()=>this.overlayWidgetId,getDomNode:()=>this.widgetDomNode,getPosition:()=>null},this.viewZoneId=v.addZone({domNode:document.createElement("div"),afterLineNumber:m,heightInPx:S,onComputedHeight:a=>{this.widgetDomNode.style.height=`${a}px`},onDomNodeTop:a=>{this.widgetDomNode.style.top=`${a}px`}}),h.push(this.viewZoneId),this._register(b.Event.runAndSubscribe(this.editor.onDidLayoutChange,()=>{this.widgetDomNode.style.left=this.editor.getLayoutInfo().contentLeft+"px"})),this.editor.addOverlayWidget(this.overlayWidget),this._register({dispose:()=>{this.editor.removeOverlayWidget(this.overlayWidget)}})}}e.FixedZoneWidget=D}),define(Q[3544],Y([1,0,7,169,122,4,109,133,2787,1280,3543]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionsSource=e.ConflictActionsFactory=void 0;class h extends D.Disposable{constructor(o){super(),this._editor=o,this._register(this._editor.onDidChangeConfiguration(u=>{(u.hasChanged(49)||u.hasChanged(18)||u.hasChanged(17))&&this._updateLensStyle()})),this._styleClassName="_conflictActionsFactory_"+(0,b.hash)(this._editor.getId()).toString(16),this._styleElement=(0,t.createStyleSheet)((0,t.isInShadowDOM)(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._register((0,D.toDisposable)(()=>{this._styleElement.remove()})),this._updateLensStyle()}_updateLensStyle(){const{codeLensHeight:o,fontSize:u}=this._getLayoutInfo(),d=this._editor.getOption(17),p=this._editor.getOption(49),c=`--codelens-font-family${this._styleClassName}`,l=`--codelens-font-features${this._styleClassName}`;let n=` .${this._styleClassName} { line-height: ${o}px; font-size: ${u}px; padding-right: ${Math.round(u*.5)}px; font-feature-settings: var(${l}) } .monaco-workbench .${this._styleClassName} span.codicon { line-height: ${o}px; font-size: ${u}px; } `;d&&(n+=`${this._styleClassName} { font-family: var(${c}), ${f.EDITOR_FONT_DEFAULTS.fontFamily}}`),this._styleElement.textContent=n,this._editor.getContainerDomNode().style.setProperty(c,d??"inherit"),this._editor.getContainerDomNode().style.setProperty(l,p.fontFeatureSettings)}_getLayoutInfo(){const o=Math.max(1.3,this._editor.getOption(65)/this._editor.getOption(51));let u=this._editor.getOption(18);return(!u||u<5)&&(u=this._editor.getOption(51)*.9|0),{fontSize:u,codeLensHeight:u*o|0}}createWidget(o,u,d,p){const c=this._getLayoutInfo();return new i(this._editor,o,u,c.codeLensHeight+2,this._styleClassName,d,p)}}e.ConflictActionsFactory=h;class a{constructor(o,u){this.viewModel=o,this.modifiedBaseRange=u,this.itemsInput1=this.getItemsInput(1),this.itemsInput2=this.getItemsInput(2),this.resultItems=(0,T.derived)(d=>{const p=this.viewModel,c=this.modifiedBaseRange,l=p.model.getState(c).read(d),n=p.model,g=[];if(l.kind===m.ModifiedBaseRangeStateKind.unrecognized)g.push({text:(0,v.localize)(11,null),tooltip:(0,v.localize)(12,null)});else if(l.kind===m.ModifiedBaseRangeStateKind.base)g.push({text:(0,v.localize)(13,null),tooltip:(0,v.localize)(14,null)});else{const E=[];l.includesInput1&&E.push(n.input1.title),l.includesInput2&&E.push(n.input2.title),l.kind===m.ModifiedBaseRangeStateKind.both&&l.firstInput===2&&E.reverse(),g.push({text:`${E.join(" + ")}`})}const w=[];return l.includesInput1&&w.push(r((0,v.localize)(15,null,n.input1.title),async()=>{(0,T.transaction)(E=>{n.setState(c,l.withInputValue(1,!1),!0,E),n.telemetry.reportRemoveInvoked(1,l.includesInput(2))})},(0,v.localize)(16,null,n.input1.title))),l.includesInput2&&w.push(r((0,v.localize)(17,null,n.input2.title),async()=>{(0,T.transaction)(E=>{n.setState(c,l.withInputValue(2,!1),!0,E),n.telemetry.reportRemoveInvoked(2,l.includesInput(1))})},(0,v.localize)(18,null,n.input2.title))),l.kind===m.ModifiedBaseRangeStateKind.both&&l.firstInput===2&&w.reverse(),g.push(...w),l.kind===m.ModifiedBaseRangeStateKind.unrecognized&&g.push(r((0,v.localize)(19,null),async()=>{(0,T.transaction)(E=>{n.setState(c,m.ModifiedBaseRangeState.base,!0,E),n.telemetry.reportResetToBaseInvoked()})},(0,v.localize)(20,null))),g}),this.isEmpty=(0,T.derived)(d=>this.itemsInput1.read(d).length+this.itemsInput2.read(d).length+this.resultItems.read(d).length===0),this.inputIsEmpty=(0,T.derived)(d=>this.itemsInput1.read(d).length+this.itemsInput2.read(d).length===0)}getItemsInput(o){return(0,T.derived)(u=>{const d=this.viewModel,p=this.modifiedBaseRange;if(!d.model.hasBaseRange(p))return[];const c=d.model.getState(p).read(u),l=d.model.isHandled(p).read(u),n=d.model,g=[],w=o===1?d.model.input1:d.model.input2,E=d.showNonConflictingChanges.read(u);if(!p.isConflicting&&l&&!E)return[];const C=o===1?2:1;if(c.kind!==m.ModifiedBaseRangeStateKind.unrecognized&&!c.isInputIncluded(o)){if(!c.isInputIncluded(C)||!this.viewModel.shouldUseAppendInsteadOfAccept.read(u)){if(g.push(r((0,v.localize)(0,null,w.title),async()=>{(0,T.transaction)(I=>{n.setState(p,c.withInputValue(o,!0,!1),o,I),n.telemetry.reportAcceptInvoked(o,c.includesInput(C))})},(0,v.localize)(1,null,w.title))),p.canBeCombined){const I=p.isOrderRelevant?(0,v.localize)(2,null,w.title):(0,v.localize)(3,null);g.push(r(I,async()=>{(0,T.transaction)(_=>{n.setState(p,m.ModifiedBaseRangeState.base.withInputValue(o,!0).withInputValue(C,!0,!0),!0,_),n.telemetry.reportSmartCombinationInvoked(c.includesInput(C))})},(0,v.localize)(4,null)))}}else g.push(r((0,v.localize)(5,null,w.title),async()=>{(0,T.transaction)(I=>{n.setState(p,c.withInputValue(o,!0,!1),o,I),n.telemetry.reportAcceptInvoked(o,c.includesInput(C))})},(0,v.localize)(6,null,w.title))),p.canBeCombined&&g.push(r((0,v.localize)(7,null,w.title),async()=>{(0,T.transaction)(I=>{n.setState(p,c.withInputValue(o,!0,!0),o,I),n.telemetry.reportSmartCombinationInvoked(c.includesInput(C))})},(0,v.localize)(8,null)));n.isInputHandled(p,o).read(u)||g.push(r((0,v.localize)(9,null),async()=>{(0,T.transaction)(I=>{n.setInputHandled(p,o,!0,I)})},(0,v.localize)(10,null)))}return g})}}e.ActionsSource=a;function r(s,o,u){return{text:s,action:o,tooltip:u}}class i extends S.FixedZoneWidget{constructor(o,u,d,p,c,l,n){super(o,u,d,p,n),this._domNode=(0,t.h)("div.merge-editor-conflict-actions").root,this.widgetDomNode.appendChild(this._domNode),this._domNode.classList.add(c),this._register((0,T.autorun)(g=>{const w=l.read(g);this.setState(w)}))}setState(o){const u=[];let d=!0;for(const p of o){d?d=!1:u.push((0,t.$)("span",void 0,"\xA0|\xA0"));const c=(0,y.renderLabelWithIcons)(p.text);p.action?u.push((0,t.$)("a",{title:p.tooltip,role:"button",onclick:()=>p.action()},...c)):u.push((0,t.$)("span",{title:p.tooltip},...c))}(0,t.reset)(this._domNode,...u)}}}),define(Q[3545],Y([1,0,20,214,17,51,27,302,527,1279]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAlignments=void 0;function S(r){const i=h(r.input1Diffs.flatMap(c=>c.rangeMappings),r.baseRange.toRange(),r.input1Range.toRange()),s=h(r.input2Diffs.flatMap(c=>c.rangeMappings),r.baseRange.toRange(),r.input2Range.toRange()),o=a(i,s);let u=[];u.push([r.input1Range.startLineNumber-1,r.baseRange.startLineNumber-1,r.input2Range.startLineNumber-1]);function d(c){return c.every(l=>l!==void 0)}for(const c of o){const l=[c.output1Pos?.lineNumber,c.inputPos.lineNumber,c.output2Pos?.lineNumber],n=d(l);let g=!0;if(n){const w=!u.some(E=>d(E)&&E.some((C,I)=>C!==void 0&&C===l[I]));w&&(u=u.filter(E=>!E.some((C,I)=>C!==void 0&&C===l[I]))),g=w}else g=!u.some(E=>E.some((C,I)=>C!==void 0&&C===l[I]));g?u.push(l):c.length.isGreaterThan(new f.LengthObj(1,0))&&u.push([c.output1Pos?c.output1Pos.lineNumber+1:void 0,c.inputPos.lineNumber+1,c.output2Pos?c.output2Pos.lineNumber+1:void 0])}const p=[r.input1Range.endLineNumberExclusive,r.baseRange.endLineNumberExclusive,r.input2Range.endLineNumberExclusive];return u=u.filter(c=>c.every((l,n)=>l!==p[n])),u.push(p),(0,y.assertFn)(()=>(0,y.checkAdjacentItems)(u.map(c=>c[0]).filter(b.isDefined),(c,l)=>c<l)&&(0,y.checkAdjacentItems)(u.map(c=>c[1]).filter(b.isDefined),(c,l)=>c<=l)&&(0,y.checkAdjacentItems)(u.map(c=>c[2]).filter(b.isDefined),(c,l)=>c<l)&&u.every(c=>c.filter(b.isDefined).length>=2)),u}e.getAlignments=S;function h(r,i,s){const o=[];let u=i.getStartPosition(),d=s.getStartPosition();for(const c of r){const l=new v.RangeMapping(T.Range.fromPositions(u,c.inputRange.getStartPosition()),T.Range.fromPositions(d,c.outputRange.getStartPosition()));(0,y.assertFn)(()=>(0,m.lengthOfRange)(l.inputRange).equals((0,m.lengthOfRange)(l.outputRange))),l.inputRange.isEmpty()||o.push(l),u=c.inputRange.getEndPosition(),d=c.outputRange.getEndPosition()}const p=new v.RangeMapping(T.Range.fromPositions(u,i.getEndPosition()),T.Range.fromPositions(d,s.getEndPosition()));return(0,y.assertFn)(()=>(0,m.lengthOfRange)(p.inputRange).equals((0,m.lengthOfRange)(p.outputRange))),p.inputRange.isEmpty()||o.push(p),o}function a(r,i){const s=[],o=[];for(const[p,c]of[[0,r],[1,i]])for(const l of c)o.push({input:p,start:!0,inputPos:l.inputRange.getStartPosition(),outputPos:l.outputRange.getStartPosition()}),o.push({input:p,start:!1,inputPos:l.inputRange.getEndPosition(),outputPos:l.outputRange.getEndPosition()});o.sort((0,t.compareBy)(p=>p.inputPos,D.Position.compare));const u=[void 0,void 0];let d;for(const p of o){if(d&&u.some(c=>!!c)){const c=(0,m.lengthBetweenPositions)(d,p.inputPos);c.isZero()||(s.push({inputPos:d,length:c,output1Pos:u[0],output2Pos:u[1]}),u[0]&&(u[0]=(0,m.addLength)(u[0],c)),u[1]&&(u[1]=(0,m.addLength)(u[1],c)))}u[p.input]=p.start?p.outputPos:void 0,d=p.inputPos}return s}}),define(Q[3546],Y([1,0,4,109,527,291]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollSynchronizer=void 0;class T extends t.Disposable{get model(){return this.viewModel.get()?.model}get shouldAlignResult(){return this.layout.get().kind==="columns"}get shouldAlignBase(){return this.layout.get().kind==="mixed"&&!this.layout.get().showBaseAtTop}constructor(v,m,S,h,a,r){super(),this.viewModel=v,this.input1View=m,this.input2View=S,this.baseView=h,this.inputResultView=a,this.layout=r,this.reentrancyBarrier=new D.ReentrancyBarrier;const i=this.updateScrolling=()=>{if(!this.model)return;if(this.input2View.editor.setScrollTop(this.input1View.editor.getScrollTop(),1),this.shouldAlignResult)this.inputResultView.editor.setScrollTop(this.input1View.editor.getScrollTop(),1);else{const o=this.model.input1ResultMapping.get();this.synchronizeScrolling(this.input1View.editor,this.inputResultView.editor,o)}const s=this.baseView.get();if(s)if(this.shouldAlignBase)this.baseView.get()?.editor.setScrollTop(this.input1View.editor.getScrollTop(),1);else{const o=new b.DocumentLineRangeMap(this.model.baseInput1Diffs.get(),-1).reverse();this.synchronizeScrolling(this.input1View.editor,s.editor,o)}};this._store.add(this.input1View.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusive(s=>{s.scrollTopChanged&&i(),s.scrollLeftChanged&&(this.baseView.get()?.editor.setScrollLeft(s.scrollLeft,1),this.input2View.editor.setScrollLeft(s.scrollLeft,1),this.inputResultView.editor.setScrollLeft(s.scrollLeft,1))}))),this._store.add(this.input2View.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusive(s=>{if(this.model){if(s.scrollTopChanged){if(this.input1View.editor.setScrollTop(s.scrollTop,1),this.shouldAlignResult)this.inputResultView.editor.setScrollTop(this.input2View.editor.getScrollTop(),1);else{const u=this.model.input2ResultMapping.get();this.synchronizeScrolling(this.input2View.editor,this.inputResultView.editor,u)}const o=this.baseView.get();if(o&&this.model)if(this.shouldAlignBase)this.baseView.get()?.editor.setScrollTop(s.scrollTop,1);else{const u=new b.DocumentLineRangeMap(this.model.baseInput2Diffs.get(),-1).reverse();this.synchronizeScrolling(this.input2View.editor,o.editor,u)}}s.scrollLeftChanged&&(this.baseView.get()?.editor.setScrollLeft(s.scrollLeft,1),this.input1View.editor.setScrollLeft(s.scrollLeft,1),this.inputResultView.editor.setScrollLeft(s.scrollLeft,1))}}))),this._store.add(this.inputResultView.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusive(s=>{if(s.scrollTopChanged){if(this.shouldAlignResult)this.input1View.editor.setScrollTop(s.scrollTop,1),this.input2View.editor.setScrollTop(s.scrollTop,1);else{const d=this.model?.resultInput1Mapping.get();this.synchronizeScrolling(this.inputResultView.editor,this.input1View.editor,d);const p=this.model?.resultInput2Mapping.get();this.synchronizeScrolling(this.inputResultView.editor,this.input2View.editor,p)}const o=this.model?.resultBaseMapping.get(),u=this.baseView.get();u&&this.model&&this.synchronizeScrolling(this.inputResultView.editor,u.editor,o)}s.scrollLeftChanged&&(this.baseView.get()?.editor?.setScrollLeft(s.scrollLeft,1),this.input1View.editor.setScrollLeft(s.scrollLeft,1),this.input2View.editor.setScrollLeft(s.scrollLeft,1))}))),this._store.add((0,y.autorunWithStore)((s,o)=>{const u=this.baseView.read(s);u&&o.add(u.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusive(d=>{if(d.scrollTopChanged){if(!this.model)return;if(this.shouldAlignBase)this.input1View.editor.setScrollTop(d.scrollTop,1),this.input2View.editor.setScrollTop(d.scrollTop,1);else{const c=new b.DocumentLineRangeMap(this.model.baseInput1Diffs.get(),-1);this.synchronizeScrolling(u.editor,this.input1View.editor,c);const l=new b.DocumentLineRangeMap(this.model.baseInput2Diffs.get(),-1);this.synchronizeScrolling(u.editor,this.input2View.editor,l)}const p=this.model?.baseResultMapping.get();this.synchronizeScrolling(u.editor,this.inputResultView.editor,p)}d.scrollLeftChanged&&(this.inputResultView.editor.setScrollLeft(d.scrollLeft,1),this.input1View.editor.setScrollLeft(d.scrollLeft,1),this.input2View.editor.setScrollLeft(d.scrollLeft,1))})))}))}synchronizeScrolling(v,m,S){if(!S)return;const h=v.getVisibleRanges();if(h.length===0)return;const a=h[0].startLineNumber-1,r=S.project(a),i=r.inputRange,s=r.outputRange,o=m.getTopForLineNumber(s.startLineNumber),u=m.getTopForLineNumber(s.endLineNumberExclusive),d=v.getTopForLineNumber(i.startLineNumber),p=v.getTopForLineNumber(i.endLineNumberExclusive),c=Math.min((v.getScrollTop()-d)/(p-d),1),l=o+(u-o)*c;m.setScrollTop(l,1)}}e.ScrollSynchronizer=T}),define(Q[3547],Y([1,0,20,4,109,27,2792,9,23,375,291]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorViewModel=void 0;let h=class extends y.Disposable{constructor(i,s,o,u,d,p,c,l){super(),this.model=i,this.inputCodeEditorView1=s,this.inputCodeEditorView2=o,this.resultCodeEditorView=u,this.baseCodeEditorView=d,this.showNonConflictingChanges=p,this.configurationService=c,this.notificationService=l,this.manuallySetActiveModifiedBaseRange=(0,b.observableValue)("manuallySetActiveModifiedBaseRange",{range:void 0,counter:0}),this.attachedHistory=this._register(new a(this.model.resultTextModel)),this.shouldUseAppendInsteadOfAccept=(0,S.observableConfigValue)("mergeEditor.shouldUseAppendInsteadOfAccept",!1,this.configurationService),this.counter=0,this.lastFocusedEditor=(0,b.derivedObservableWithWritableCache)("lastFocusedEditor",(n,g)=>{const E=[this.inputCodeEditorView1,this.inputCodeEditorView2,this.resultCodeEditorView,this.baseCodeEditorView.read(n)].find(C=>C&&C.isFocused.read(n));return E?{view:E,counter:this.counter++}:g||{view:void 0,counter:this.counter++}}),this.baseShowDiffAgainst=(0,b.derived)(n=>{const g=this.lastFocusedEditor.read(n);if(g.view===this.inputCodeEditorView1)return 1;if(g.view===this.inputCodeEditorView2)return 2}),this.selectionInBase=(0,b.derived)(n=>{const g=this.lastFocusedEditor.read(n).view;return g?{rangesInBase:(g.selection.read(n)||[]).map(C=>g===this.inputCodeEditorView1?this.model.translateInputRangeToBase(1,C):g===this.inputCodeEditorView2?this.model.translateInputRangeToBase(2,C):g===this.resultCodeEditorView?this.model.translateResultRangeToBase(C):(g===this.baseCodeEditorView.read(n),C)),sourceEditor:g}:void 0}),this.activeModifiedBaseRange=(0,b.derived)(n=>{const g=this.lastFocusedEditor.read(n),w=this.manuallySetActiveModifiedBaseRange.read(n);if(w.counter>g.counter)return w.range;if(!g.view)return;const E=g.view.cursorLineNumber.read(n);return E?this.model.modifiedBaseRanges.read(n).find(I=>{const _=this.getRangeOfModifiedBaseRange(g.view,I,n);return _.isEmpty?_.startLineNumber===E:_.contains(E)}):void 0}),this._register(u.editor.onDidChangeModelContent(n=>{if(this.model.isApplyingEditInResult||n.isRedoing||n.isUndoing)return;const g=[];for(const E of n.changes){const C=this.model.translateResultRangeToBase(D.Range.lift(E.range)),I=this.model.findModifiedBaseRangesInRange(new m.LineRange(C.startLineNumber,C.endLineNumber-C.startLineNumber));I.length===1&&(this.model.isHandled(I[0]).get()||g.push(I[0]))}if(g.length===0)return;const w={model:this.model,redo(){(0,b.transaction)(E=>{for(const C of g)this.model.setHandled(C,!0,E)})},undo(){(0,b.transaction)(E=>{for(const C of g)this.model.setHandled(C,!1,E)})}};this.attachedHistory.pushAttachedHistoryElement(w),w.redo()}))}getRangeOfModifiedBaseRange(i,s,o){if(i===this.resultCodeEditorView)return this.model.getLineRangeInResult(s.baseRange,o);if(i===this.baseCodeEditorView.get())return s.baseRange;{const u=i===this.inputCodeEditorView1?1:2;return s.getInputRange(u)}}setActiveModifiedBaseRange(i,s){this.manuallySetActiveModifiedBaseRange.set({range:i,counter:this.counter++},s)}setState(i,s,o,u){this.manuallySetActiveModifiedBaseRange.set({range:i,counter:this.counter++},o),this.model.setState(i,s,u,o)}goToConflict(i){let s=this.lastFocusedEditor.get().view;s||(s=this.resultCodeEditorView);const o=s.editor.getPosition()?.lineNumber;if(o===void 0)return;const u=i(s,o);if(u){const d=this.getRangeOfModifiedBaseRange(s,u,void 0);s.editor.focus();let p=d.startLineNumber,c=d.endLineNumberExclusive;d.startLineNumber>s.editor.getModel().getLineCount()&&((0,b.transaction)(l=>{this.setActiveModifiedBaseRange(u,l)}),p=c=s.editor.getModel().getLineCount()),s.editor.setPosition({lineNumber:p,column:s.editor.getModel().getLineFirstNonWhitespaceColumn(p)}),s.editor.revealLinesNearTop(p,c,0)}}goToNextModifiedBaseRange(i){this.goToConflict((s,o)=>this.model.modifiedBaseRanges.get().find(u=>i(u)&&this.getRangeOfModifiedBaseRange(s,u,void 0).startLineNumber>o)||this.model.modifiedBaseRanges.get().find(u=>i(u)))}goToPreviousModifiedBaseRange(i){this.goToConflict((s,o)=>(0,t.findLast)(this.model.modifiedBaseRanges.get(),u=>i(u)&&this.getRangeOfModifiedBaseRange(s,u,void 0).endLineNumberExclusive<o)||(0,t.findLast)(this.model.modifiedBaseRanges.get(),u=>i(u)))}toggleActiveConflict(i){const s=this.activeModifiedBaseRange.get();if(!s){this.notificationService.error((0,T.localize)(0,null));return}(0,b.transaction)(o=>{this.setState(s,this.model.getState(s).get().toggle(i),o,i)})}acceptAll(i){(0,b.transaction)(s=>{for(const o of this.model.modifiedBaseRanges.get())this.setState(o,this.model.getState(o).get().withInputValue(i,!0),s,i)})}};e.MergeEditorViewModel=h,e.MergeEditorViewModel=h=fe([O(6,f.IConfigurationService),O(7,v.INotificationService)],h);class a extends y.Disposable{constructor(i){super(),this.model=i,this.attachedHistory=[],this.previousAltId=this.model.getAlternativeVersionId(),this._register(i.onDidChangeContent(s=>{const o=i.getAlternativeVersionId();if(s.isRedoing)for(const u of this.attachedHistory)this.previousAltId<u.altId&&u.altId<=o&&u.element.redo();else if(s.isUndoing)for(let u=this.attachedHistory.length-1;u>=0;u--){const d=this.attachedHistory[u];o<d.altId&&d.altId<=this.previousAltId&&d.element.undo()}else for(;this.attachedHistory.length>0&&this.attachedHistory[this.attachedHistory.length-1].altId>this.previousAltId;)this.attachedHistory.pop();this.previousAltId=o}))}pushAttachedHistoryElement(i){this.attachedHistory.push({altId:this.model.getAlternativeVersionId(),element:i})}}}),define(Q[3548],Y([1,0,7,20,375,291,3544,3545]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorViewZone=e.MergeEditorViewZones=e.ViewZoneComputer=void 0;class v{constructor(s,o,u){this.input1Editor=s,this.input2Editor=o,this.resultEditor=u,this.conflictActionsFactoryInput1=new T.ConflictActionsFactory(this.input1Editor),this.conflictActionsFactoryInput2=new T.ConflictActionsFactory(this.input2Editor),this.conflictActionsFactoryResult=new T.ConflictActionsFactory(this.resultEditor)}computeViewZones(s,o,u){let d=0,p=0,c=0,l=0;const n=[],g=[],w=[],E=[],C=o.model,I=C.baseResultDiffs.read(s),_=(0,D.join)(C.modifiedBaseRanges.read(s),I,(M,N)=>M.baseRange.touches(N.inputRange)?y.CompareResult.neitherLessOrGreaterThan:b.LineRange.compareByStart(M.baseRange,N.inputRange)),A=u.codeLensesVisible,k=u.showNonConflictingChanges;let L,R;for(const M of _){if(A&&M.left&&(M.left.isConflicting||k||!C.isHandled(M.left).read(s))){const x=new T.ActionsSource(o,M.left);(u.shouldAlignResult||!x.inputIsEmpty.read(s))&&(n.push(new r(this.conflictActionsFactoryInput1,M.left.input1Range.startLineNumber-1,x.itemsInput1)),g.push(new r(this.conflictActionsFactoryInput2,M.left.input2Range.startLineNumber-1,x.itemsInput2)),u.shouldAlignBase&&w.push(new a(M.left.baseRange.startLineNumber-1,16)));const F=M.left.baseRange.startLineNumber+(R?.resultingDeltaFromOriginalToModified??0)-1;E.push(new r(this.conflictActionsFactoryResult,F,x.resultItems))}const N=(0,y.lastOrDefault)(M.rights);N&&(R=N);let P;M.left?(P=(0,f.getAlignments)(M.left).map(x=>({input1Line:x[0],baseLine:x[1],input2Line:x[2],resultLine:void 0})),L=M.left,P[P.length-1].resultLine=M.left.baseRange.endLineNumberExclusive+(R?R.resultingDeltaFromOriginalToModified:0)):P=[{baseLine:N.inputRange.endLineNumberExclusive,input1Line:N.inputRange.endLineNumberExclusive+(L?L.input1Range.endLineNumberExclusive-L.baseRange.endLineNumberExclusive:0),input2Line:N.inputRange.endLineNumberExclusive+(L?L.input2Range.endLineNumberExclusive-L.baseRange.endLineNumberExclusive:0),resultLine:N.outputRange.endLineNumberExclusive}];for(const{input1Line:x,baseLine:F,input2Line:V,resultLine:W}of P){if(!u.shouldAlignBase&&(x===void 0||V===void 0))continue;const z=x!==void 0?x+d:-1,B=V!==void 0?V+p:-1,K=F+c,H=W!==void 0?W+l:-1,U=Math.max(u.shouldAlignBase?K:0,z,B,u.shouldAlignResult?H:0);if(x!==void 0){const G=U-z;G>0&&(n.push(new h(x-1,G)),d+=G)}if(V!==void 0){const G=U-B;G>0&&(g.push(new h(V-1,G)),p+=G)}if(u.shouldAlignBase){const G=U-K;G>0&&(w.push(new h(F-1,G)),c+=G)}if(u.shouldAlignResult&&W!==void 0){const G=U-H;G>0&&(E.push(new h(W-1,G)),l+=G)}}}return new m(n,g,w,E)}}e.ViewZoneComputer=v;class m{constructor(s,o,u,d){this.input1ViewZones=s,this.input2ViewZones=o,this.baseViewZones=u,this.resultViewZones=d}}e.MergeEditorViewZones=m;class S{}e.MergeEditorViewZone=S;class h extends S{constructor(s,o){super(),this.afterLineNumber=s,this.heightInLines=o}create(s,o,u){o.push(s.addZone({afterLineNumber:this.afterLineNumber,heightInLines:this.heightInLines,domNode:(0,t.$)("div.diagonal-fill")}))}}class a extends S{constructor(s,o){super(),this.afterLineNumber=s,this.heightPx=o}create(s,o,u){o.push(s.addZone({afterLineNumber:this.afterLineNumber,heightInPx:this.heightPx,domNode:(0,t.$)("div.conflict-actions-placeholder")}))}}class r extends S{constructor(s,o,u){super(),this.conflictActionsFactory=s,this.lineNumber=o,this.items=u}create(s,o,u){u.add(this.conflictActionsFactory.createWidget(s,this.lineNumber,this.items,o))}}}),define(Q[528],Y([1,0,2793,8]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageCloseWithConflicts=e.ctxMergeResultUri=e.ctxMergeBaseUri=e.ctxMergeEditorShowNonConflictingChanges=e.ctxMergeEditorShowBaseAtTop=e.ctxMergeEditorShowBase=e.ctxMergeEditorLayout=e.ctxIsMergeResultEditor=e.ctxIsMergeEditor=void 0,e.ctxIsMergeEditor=new y.RawContextKey("isMergeEditor",!1,{type:"boolean",description:(0,t.localize)(0,null)}),e.ctxIsMergeResultEditor=new y.RawContextKey("isMergeResultEditor",!1,{type:"boolean",description:(0,t.localize)(1,null)}),e.ctxMergeEditorLayout=new y.RawContextKey("mergeEditorLayout","mixed",{type:"string",description:(0,t.localize)(2,null)}),e.ctxMergeEditorShowBase=new y.RawContextKey("mergeEditorShowBase",!1,{type:"boolean",description:(0,t.localize)(3,null)}),e.ctxMergeEditorShowBaseAtTop=new y.RawContextKey("mergeEditorShowBaseAtTop",!1,{type:"boolean",description:(0,t.localize)(4,null)}),e.ctxMergeEditorShowNonConflictingChanges=new y.RawContextKey("mergeEditorShowNonConflictingChanges",!1,{type:"boolean",description:(0,t.localize)(5,null)}),e.ctxMergeBaseUri=new y.RawContextKey("mergeEditorBaseUri","",{type:"string",description:(0,t.localize)(6,null)}),e.ctxMergeResultUri=new y.RawContextKey("mergeEditorResultUri","",{type:"string",description:(0,t.localize)(7,null)}),e.StorageCloseWithConflicts="mergeEditorCloseWithConflicts"}),define(Q[3549],Y([1,0,7,85,169,20,15,4,109,137,2790,13,9,8,5,61,375,291,729,922,528,923]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResultCodeEditorView=void 0;let n=class extends l.CodeEditorView{constructor(w,E,C,I){super(E,w,I),this._labelService=C,this.decorations=(0,v.derived)(A=>{const k=this.viewModel.read(A);if(!k)return[];const L=k.model,R=L.resultTextModel,M=new Array,N=(0,u.join)(L.modifiedBaseRanges.read(A),L.baseResultDiffs.read(A),(F,V)=>F.baseRange.touches(V.inputRange)?D.CompareResult.neitherLessOrGreaterThan:o.LineRange.compareByStart(F.baseRange,V.inputRange)),P=k.activeModifiedBaseRange.read(A),x=k.showNonConflictingChanges.read(A);for(const F of N){const V=F.left;if(V){const W=["merge-editor-block"];let z=[0,0,0,0];const B=L.isHandled(V).read(A);if(B&&W.push("handled"),V===P&&(W.push("focused"),z=[0,2,0,2]),V.isConflicting&&W.push("conflicting"),W.push("result"),!V.isConflicting&&!x&&B)continue;const K=L.getLineRangeInResult(V.baseRange,A);M.push({range:K.toInclusiveRangeOrEmpty(),options:{showIfCollapsed:!0,blockClassName:W.join(" "),blockPadding:z,blockIsAfterEnd:K.startLineNumber>R.getLineCount(),description:"Result Diff",minimap:{position:m.MinimapPosition.Gutter,color:{id:B?d.handledConflictMinimapOverViewRulerColor:d.unhandledConflictMinimapOverViewRulerColor}},overviewRuler:V.isConflicting?{position:m.OverviewRulerLane.Center,color:{id:B?d.handledConflictMinimapOverViewRulerColor:d.unhandledConflictMinimapOverViewRulerColor}}:void 0}})}if(!V||V.isConflicting)for(const W of F.rights){const z=W.outputRange.toInclusiveRange();if(z&&M.push({range:z,options:{className:"merge-editor-diff result",description:"Merge Editor",isWholeLine:!0}}),W.rangeMappings)for(const B of W.rangeMappings)M.push({range:B.outputRange,options:{className:"merge-editor-diff-word result",description:"Merge Editor"}})}}return M}),this.editor.invokeWithinContext(A=>{const k=A.get(r.IContextKeyService),L=c.ctxIsMergeResultEditor.bindTo(k);L.set(!0),this._register((0,f.toDisposable)(()=>L.reset()))}),this.htmlElements.gutterDiv.style.width="5px",this.htmlElements.root.classList.add("result"),this._register((0,v.autorunWithStore)((A,k)=>{this.checkboxesVisible.read(A)&&k.add(new p.EditorGutter(this.editor,this.htmlElements.gutterDiv,{getIntersectingGutterItems:(L,R)=>[],createView:(L,R)=>{throw new T.BugIndicatingError}}))})),this._register((0,v.autorun)(A=>{const k=this.viewModel.read(A);k&&(this.editor.setModel(k.model.resultTextModel),(0,t.reset)(this.htmlElements.title,...(0,b.renderLabelWithIcons)((0,S.localize)(0,null))),(0,t.reset)(this.htmlElements.description,...(0,b.renderLabelWithIcons)(this._labelService.getUriLabel(k.model.resultTextModel.uri,{relative:!0}))))}));const _=this._register(new y.ActionBar(this.htmlElements.detail));this._register((0,v.autorun)(A=>{const k=this.viewModel.read(A);if(!k)return;const L=k.model;if(!L)return;const R=L.unhandledConflictsCount.read(A),M=R===1?(0,S.localize)(1,null,R):(0,S.localize)(2,null,R);_.clear(),_.push({class:void 0,enabled:R>0,id:"nextConflict",label:M,run(){k.model.telemetry.reportConflictCounterClicked(),k.goToNextModifiedBaseRange(N=>!L.isHandled(N).get())},tooltip:R>0?(0,S.localize)(3,null):(0,S.localize)(4,null)})})),this._register((0,u.applyObservableDecorations)(this.editor,this.decorations)),this._register((0,l.createSelectionsAutorun)(this,(A,k)=>k.model.translateBaseRangeToResult(A))),this._register(E.createInstance(l.TitleMenu,h.MenuId.MergeInputResultToolbar,this.htmlElements.toolbar))}};e.ResultCodeEditorView=n,e.ResultCodeEditorView=n=fe([O(1,i.IInstantiationService),O(2,s.ILabelService),O(3,a.IConfigurationService)],n)}),define(Q[1281],Y([1,0,4,6]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookFindFilters=void 0;class b extends t.Disposable{get markupInput(){return this._markupInput}set markupInput(T){this._markupInput!==T&&(this._markupInput=T,this._onDidChange.fire({markupInput:T}))}get markupPreview(){return this._markupPreview}set markupPreview(T){this._markupPreview!==T&&(this._markupPreview=T,this._onDidChange.fire({markupPreview:T}))}get codeInput(){return this._codeInput}set codeInput(T){this._codeInput!==T&&(this._codeInput=T,this._onDidChange.fire({codeInput:T}))}get codeOutput(){return this._codeOutput}set codeOutput(T){this._codeOutput!==T&&(this._codeOutput=T,this._onDidChange.fire({codeOutput:T}))}constructor(T,f,v,m){super(),this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this._markupInput=!0,this._markupPreview=!0,this._codeInput=!0,this._codeOutput=!0,this._markupInput=T,this._markupPreview=f,this._codeInput=v,this._codeOutput=m,this._initialMarkupInput=T,this._initialMarkupPreview=f,this._initialCodeInput=v,this._initialCodeOutput=m}isModified(){return this._markupInput!==this._initialMarkupInput||this._markupPreview!==this._initialMarkupPreview||this._codeInput!==this._initialCodeInput||this._codeOutput!==this._initialCodeOutput}update(T){this._markupInput=T.markupInput,this._markupPreview=T.markupPreview,this._codeInput=T.codeInput,this._codeOutput=T.codeOutput}}e.NotebookFindFilters=b}),define(Q[924],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fixedDiffEditorOptions=e.fixedEditorOptions=e.fixedEditorPadding=void 0,e.fixedEditorPadding={top:12,bottom:12},e.fixedEditorOptions={padding:e.fixedEditorPadding,scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",vertical:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},renderLineHighlightOnlyWhenFocus:!0,overviewRulerLanes:0,overviewRulerBorder:!1,selectOnLineNumbers:!1,wordWrap:"off",lineNumbers:"off",lineDecorationsWidth:0,glyphMargin:!1,fixedOverflowWidgets:!0,minimap:{enabled:!1},renderValidationDecorations:"on",renderLineHighlight:"none",readOnly:!0},e.fixedDiffEditorOptions={...e.fixedEditorOptions,glyphMargin:!0,enableSplitViewResizing:!1,renderIndicators:!0,renderMarginRevertIcon:!1,readOnly:!1,isInEmbeddedEditor:!0,renderOverviewRuler:!1,wordWrap:"off",diffWordWrap:"off",diffAlgorithm:"advanced"}}),define(Q[1282],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookDiffEditorEventDispatcher=e.NotebookCellLayoutChangedEvent=e.NotebookDiffLayoutChangedEvent=e.NotebookDiffViewEventType=void 0;var b;(function(v){v[v.LayoutChanged=1]="LayoutChanged",v[v.CellLayoutChanged=2]="CellLayoutChanged"})(b||(e.NotebookDiffViewEventType=b={}));class D{constructor(m,S){this.source=m,this.value=S,this.type=b.LayoutChanged}}e.NotebookDiffLayoutChangedEvent=D;class T{constructor(m){this.source=m,this.type=b.CellLayoutChanged}}e.NotebookCellLayoutChangedEvent=T;class f extends y.Disposable{constructor(){super(...arguments),this._onDidChangeLayout=this._register(new t.Emitter),this.onDidChangeLayout=this._onDidChangeLayout.event,this._onDidChangeCellLayout=this._register(new t.Emitter),this.onDidChangeCellLayout=this._onDidChangeCellLayout.event}emit(m){for(let S=0,h=m.length;S<h;S++){const a=m[S];switch(a.type){case b.LayoutChanged:this._onDidChangeLayout.fire(a);break;case b.CellLayoutChanged:this._onDidChangeCellLayout.fire(a);break}}}}e.NotebookDiffEditorEventDispatcher=f}),define(Q[529],Y([1,0,8]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NOTEBOOK_DIFF_CELL_PROPERTY_EXPANDED=e.NOTEBOOK_DIFF_CELL_PROPERTY=e.NOTEBOOK_DIFF_CELL_INPUT=e.DIFF_CELL_MARGIN=e.DiffSide=void 0;var y;(function(b){b[b.Original=0]="Original",b[b.Modified=1]="Modified"})(y||(e.DiffSide=y={})),e.DIFF_CELL_MARGIN=16,e.NOTEBOOK_DIFF_CELL_INPUT=new t.RawContextKey("notebookDiffCellInputChanged",!1),e.NOTEBOOK_DIFF_CELL_PROPERTY=new t.RawContextKey("notebookDiffCellPropertyChanged",!1),e.NOTEBOOK_DIFF_CELL_PROPERTY_EXPANDED=new t.RawContextKey("notebookDiffCellPropertyExpanded",!1)}),define(Q[3550],Y([1,0,97,7,140,80,4,36,19]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookDiffOverviewRuler=void 0;const m=20;let S=class extends v.Themable{constructor(a,r,i,s){super(s),this.notebookEditor=a,this.width=r,this._diffElementViewModels=[],this._lanes=2,this._insertColor=null,this._removeColor=null,this._insertColorHex=null,this._removeColorHex=null,this._disposables=this._register(new T.DisposableStore),this._renderAnimationFrame=null,this._domNode=(0,b.createFastDomNode)(document.createElement("canvas")),this._domNode.setPosition("relative"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),i.appendChild(this._domNode.domNode),this._overviewViewportDomElement=(0,b.createFastDomNode)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewViewportDomElement.setWidth(r),i.appendChild(this._overviewViewportDomElement.domNode),this._register(t.PixelRatio.onDidChange(()=>{this._scheduleRender()})),this._register(this.themeService.onDidColorThemeChange(o=>{this.applyColors(o)&&this._scheduleRender()})),this.applyColors(this.themeService.getColorTheme()),this._register(this.notebookEditor.onDidScroll(()=>{this._renderOverviewViewport()})),this._register(y.addStandardDisposableListener(i,y.EventType.POINTER_DOWN,o=>{this.notebookEditor.delegateVerticalScrollbarPointerDown(o)}))}applyColors(a){const r=a.getColor(f.diffOverviewRulerInserted)||(a.getColor(f.diffInserted)||f.defaultInsertColor).transparent(2),i=a.getColor(f.diffOverviewRulerRemoved)||(a.getColor(f.diffRemoved)||f.defaultRemoveColor).transparent(2),s=!r.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=r,this._removeColor=i,this._insertColor&&(this._insertColorHex=D.Color.Format.CSS.formatHexA(this._insertColor)),this._removeColor&&(this._removeColorHex=D.Color.Format.CSS.formatHexA(this._removeColor)),s}layout(){this._layoutNow()}updateViewModels(a,r){this._disposables.clear(),this._diffElementViewModels=a,r&&(this._disposables.add(r.onDidChangeLayout(()=>{this._scheduleRender()})),this._disposables.add(r.onDidChangeCellLayout(()=>{this._scheduleRender()}))),this._scheduleRender()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=y.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),16))}_onRenderScheduled(){this._renderAnimationFrame=null,this._layoutNow()}_layoutNow(){const r=this.notebookEditor.getLayoutInfo().height,i=this._diffElementViewModels.map(u=>u.layoutInfo.totalHeight).reduce((u,d)=>u+d,0),s=t.PixelRatio.value;this._domNode.setWidth(this.width),this._domNode.setHeight(r),this._domNode.domNode.width=this.width*s,this._domNode.domNode.height=r*s;const o=this._domNode.domNode.getContext("2d");o.clearRect(0,0,this.width*s,r*s),this._renderCanvas(o,this.width*s,r*s,i*s,s),this._renderOverviewViewport()}_renderOverviewViewport(){const a=this._computeOverviewViewport();a?(this._overviewViewportDomElement.setTop(a.top),this._overviewViewportDomElement.setHeight(a.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const a=this.notebookEditor.getLayoutInfo();if(!a)return null;const r=this.notebookEditor.getScrollTop(),i=this.notebookEditor.getScrollHeight(),s=Math.max(0,a.height),o=Math.max(0,s-2*0),u=a.height,d=Math.round(Math.max(m,Math.floor(u*o/i))),p=(o-d)/(i-u),c=Math.round(r*p);return{height:d,top:c}}_renderCanvas(a,r,i,s,o){if(!this._insertColorHex||!this._removeColorHex)return;const u=r/this._lanes;let d=0;for(let p=0;p<this._diffElementViewModels.length;p++){const c=this._diffElementViewModels[p],l=Math.round(c.layoutInfo.totalHeight/s*o*i);switch(c.type){case"insert":a.fillStyle=this._insertColorHex,a.fillRect(u,d,u,l);break;case"delete":a.fillStyle=this._removeColorHex,a.fillRect(0,d,u,l);break;case"unchanged":break;case"modified":a.fillStyle=this._removeColorHex,a.fillRect(0,d,u,l),a.fillStyle=this._insertColorHex,a.fillRect(u,d,u,l);break}d+=l}}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),super.dispose()}};e.NotebookDiffOverviewRuler=S,e.NotebookDiffOverviewRuler=S=fe([O(3,v.IThemeService)],S)}),define(Q[355],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEditorExtensionsRegistry=e.registerNotebookContribution=void 0;class t{static{this.INSTANCE=new t}constructor(){this.editorContributions=[]}registerEditorContribution(T,f){this.editorContributions.push({id:T,ctor:f})}getEditorContributions(){return this.editorContributions.slice(0)}}function y(D,T){t.INSTANCE.registerEditorContribution(D,T)}e.registerNotebookContribution=y;var b;(function(D){function T(){return t.INSTANCE.getEditorContributions()}D.getEditorContributions=T;function f(v){return t.INSTANCE.getEditorContributions().filter(m=>v.indexOf(m.id)>=0)}D.getSomeEditorContributions=f})(b||(e.NotebookEditorExtensionsRegistry=b={}))}),define(Q[267],Y([1,0,32,2827,77]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nextChangeIcon=e.previousChangeIcon=e.copyIcon=e.mimetypeIcon=e.renderOutputIcon=e.revertIcon=e.openAsTextIcon=e.expandedIcon=e.collapsedIcon=e.executingStateIcon=e.pendingStateIcon=e.errorStateIcon=e.successStateIcon=e.splitCellIcon=e.clearIcon=e.moveDownIcon=e.moveUpIcon=e.stopEditIcon=e.editIcon=e.executeAllIcon=e.deleteCellIcon=e.stopIcon=e.executeBelowIcon=e.executeAboveIcon=e.executeIcon=e.selectKernelIcon=void 0,e.selectKernelIcon=(0,b.registerIcon)("notebook-kernel-select",t.Codicon.serverEnvironment,(0,y.localize)(0,null)),e.executeIcon=(0,b.registerIcon)("notebook-execute",t.Codicon.play,(0,y.localize)(1,null)),e.executeAboveIcon=(0,b.registerIcon)("notebook-execute-above",t.Codicon.runAbove,(0,y.localize)(2,null)),e.executeBelowIcon=(0,b.registerIcon)("notebook-execute-below",t.Codicon.runBelow,(0,y.localize)(3,null)),e.stopIcon=(0,b.registerIcon)("notebook-stop",t.Codicon.primitiveSquare,(0,y.localize)(4,null)),e.deleteCellIcon=(0,b.registerIcon)("notebook-delete-cell",t.Codicon.trash,(0,y.localize)(5,null)),e.executeAllIcon=(0,b.registerIcon)("notebook-execute-all",t.Codicon.runAll,(0,y.localize)(6,null)),e.editIcon=(0,b.registerIcon)("notebook-edit",t.Codicon.pencil,(0,y.localize)(7,null)),e.stopEditIcon=(0,b.registerIcon)("notebook-stop-edit",t.Codicon.check,(0,y.localize)(8,null)),e.moveUpIcon=(0,b.registerIcon)("notebook-move-up",t.Codicon.arrowUp,(0,y.localize)(9,null)),e.moveDownIcon=(0,b.registerIcon)("notebook-move-down",t.Codicon.arrowDown,(0,y.localize)(10,null)),e.clearIcon=(0,b.registerIcon)("notebook-clear",t.Codicon.clearAll,(0,y.localize)(11,null)),e.splitCellIcon=(0,b.registerIcon)("notebook-split-cell",t.Codicon.splitVertical,(0,y.localize)(12,null)),e.successStateIcon=(0,b.registerIcon)("notebook-state-success",t.Codicon.check,(0,y.localize)(13,null)),e.errorStateIcon=(0,b.registerIcon)("notebook-state-error",t.Codicon.error,(0,y.localize)(14,null)),e.pendingStateIcon=(0,b.registerIcon)("notebook-state-pending",t.Codicon.clock,(0,y.localize)(15,null)),e.executingStateIcon=(0,b.registerIcon)("notebook-state-executing",t.Codicon.sync,(0,y.localize)(16,null)),e.collapsedIcon=(0,b.registerIcon)("notebook-collapsed",t.Codicon.chevronRight,(0,y.localize)(17,null)),e.expandedIcon=(0,b.registerIcon)("notebook-expanded",t.Codicon.chevronDown,(0,y.localize)(18,null)),e.openAsTextIcon=(0,b.registerIcon)("notebook-open-as-text",t.Codicon.fileCode,(0,y.localize)(19,null)),e.revertIcon=(0,b.registerIcon)("notebook-revert",t.Codicon.discard,(0,y.localize)(20,null)),e.renderOutputIcon=(0,b.registerIcon)("notebook-render-output",t.Codicon.preview,(0,y.localize)(21,null)),e.mimetypeIcon=(0,b.registerIcon)("notebook-mimetype",t.Codicon.code,(0,y.localize)(22,null)),e.copyIcon=(0,b.registerIcon)("notebook-copy",t.Codicon.copy,(0,y.localize)(23,null)),e.previousChangeIcon=(0,b.registerIcon)("notebook-diff-editor-previous-change",t.Codicon.arrowUp,(0,y.localize)(24,null)),e.nextChangeIcon=(0,b.registerIcon)("notebook-diff-editor-next-change",t.Codicon.arrowDown,(0,y.localize)(25,null))}),define(Q[3551],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notebookDebug=void 0;class t{constructor(){this._frameId=0,this._domFrameLog()}_domFrameLog(){}debug(...T){const f=new Date;console.log(`${f.getSeconds()}:${f.getMilliseconds().toString().padStart(3,"0")}`,`frame #${this._frameId}: `,...T)}}const y=new t;function b(...D){y.debug(...D)}e.notebookDebug=b}),define(Q[730],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellStateChangedEvent=e.NotebookMetadataChangedEvent=e.NotebookLayoutChangedEvent=e.NotebookViewEventType=void 0;var t;(function(T){T[T.LayoutChanged=1]="LayoutChanged",T[T.MetadataChanged=2]="MetadataChanged",T[T.CellStateChanged=3]="CellStateChanged"})(t||(e.NotebookViewEventType=t={}));class y{constructor(f,v){this.source=f,this.value=v,this.type=t.LayoutChanged}}e.NotebookLayoutChangedEvent=y;class b{constructor(f){this.source=f,this.type=t.MetadataChanged}}e.NotebookMetadataChangedEvent=b;class D{constructor(f,v){this.source=f,this.cell=v,this.type=t.CellStateChanged}}e.NotebookCellStateChangedEvent=D}),define(Q[3552],Y([1,0,15,6,4]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellStatusBarService=void 0;class D extends b.Disposable{constructor(){super(...arguments),this._onDidChangeProviders=this._register(new y.Emitter),this.onDidChangeProviders=this._onDidChangeProviders.event,this._onDidChangeItems=this._register(new y.Emitter),this.onDidChangeItems=this._onDidChangeItems.event,this._providers=[]}registerCellStatusBarItemProvider(f){this._providers.push(f);let v;return f.onDidChangeStatusBarItems&&(v=f.onDidChangeStatusBarItems(()=>this._onDidChangeItems.fire())),this._onDidChangeProviders.fire(),(0,b.toDisposable)(()=>{v?.dispose();const m=this._providers.findIndex(S=>S===f);this._providers.splice(m,1)})}async getStatusBarItemsForCell(f,v,m,S){const h=this._providers.filter(a=>a.viewType===m||a.viewType==="*");return await Promise.all(h.map(async a=>{try{return await a.provideCellStatusBarItems(f,v,S)??{items:[]}}catch(r){return(0,t.onUnexpectedExternalError)(r),{items:[]}}}))}}e.NotebookCellStatusBarService=D}),define(Q[292],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookEditorService=void 0,e.INotebookEditorService=(0,t.createDecorator)("INotebookEditorWidgetService")}),define(Q[244],Y([1,0,7,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellPartsCollection=e.CellOverlayPart=e.CellContentPart=void 0;class b extends y.Disposable{constructor(){super(),this.cellDisposables=new y.DisposableStore}prepareRenderCell(v){}renderCell(v){this.currentCell=v,this.didRenderCell(v)}didRenderCell(v){}unrenderCell(v){this.currentCell=void 0,this.cellDisposables.clear()}prepareLayout(){}updateInternalLayoutNow(v){}updateState(v,m){}updateForExecutionState(v,m){}}e.CellContentPart=b;class D extends y.Disposable{constructor(){super(),this.cellDisposables=this._register(new y.DisposableStore)}prepareRenderCell(v){}renderCell(v){this.currentCell=v,this.didRenderCell(v)}didRenderCell(v){}unrenderCell(v){this.currentCell=void 0,this.cellDisposables.clear()}updateInternalLayoutNow(v){}updateState(v,m){}updateForExecutionState(v,m){}}e.CellOverlayPart=D;class T extends y.Disposable{constructor(v,m){super(),this.contentParts=v,this.overlayParts=m,this._scheduledOverlayRendering=this._register(new y.MutableDisposable),this._scheduledOverlayUpdateState=this._register(new y.MutableDisposable),this._scheduledOverlayUpdateExecutionState=this._register(new y.MutableDisposable)}concatContentPart(v){return new T(this.contentParts.concat(v),this.overlayParts)}concatOverlayPart(v){return new T(this.contentParts,this.overlayParts.concat(v))}scheduleRenderCell(v){for(const m of this.contentParts)m.prepareRenderCell(v);for(const m of this.overlayParts)m.prepareRenderCell(v);for(const m of this.contentParts)m.renderCell(v);this._scheduledOverlayRendering.value=t.modify(()=>{for(const m of this.overlayParts)m.renderCell(v)})}unrenderCell(v){for(const m of this.contentParts)m.unrenderCell(v);this._scheduledOverlayRendering.value=void 0,this._scheduledOverlayUpdateState.value=void 0,this._scheduledOverlayUpdateExecutionState.value=void 0;for(const m of this.overlayParts)m.unrenderCell(v)}updateInternalLayoutNow(v){for(const m of this.contentParts)m.updateInternalLayoutNow(v);for(const m of this.overlayParts)m.updateInternalLayoutNow(v)}prepareLayout(){for(const v of this.contentParts)v.prepareLayout()}updateState(v,m){for(const S of this.contentParts)S.updateState(v,m);this._scheduledOverlayUpdateState.value=t.modify(()=>{for(const S of this.overlayParts)S.updateState(v,m)})}updateForExecutionState(v,m){for(const S of this.contentParts)S.updateForExecutionState(v,m);this._scheduledOverlayUpdateExecutionState.value=t.modify(()=>{for(const S of this.overlayParts)S.updateForExecutionState(v,m)})}}e.CellPartsCollection=T}),define(Q[610],Y([1,0,169,7,88]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionViewWithLabel=e.CodiconActionViewItem=void 0;class D extends b.MenuEntryActionViewItem{updateLabel(){this.options.label&&this.label&&y.reset(this.label,...(0,t.renderLabelWithIcons)(this._commandAction.label??""))}}e.CodiconActionViewItem=D;class T extends b.MenuEntryActionViewItem{render(v){super.render(v),v.classList.add("notebook-action-view-item"),this._actionLabel=document.createElement("a"),v.appendChild(this._actionLabel),this.updateLabel()}updateLabel(){this._actionLabel&&(this._actionLabel.classList.add("notebook-label"),this._actionLabel.innerText=this._action.label,this._actionLabel.title=this._action.tooltip.length?this._action.tooltip:this._action.label)}}e.ActionViewWithLabel=T}),define(Q[3553],Y([1,0,7,244]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellDecorations=void 0;class b extends y.CellContentPart{constructor(T,f){super(),this.rootContainer=T,this.decorationContainer=f}didRenderCell(T){const f=[];this.rootContainer.classList.forEach(m=>{/^nb\-.*$/.test(m)&&f.push(m)}),f.forEach(m=>{this.rootContainer.classList.remove(m)}),this.decorationContainer.innerText="";const v=()=>{this.decorationContainer.innerText="",T.getCellDecorations().filter(m=>m.topClassName!==void 0).forEach(m=>{this.decorationContainer.append(t.$(`.${m.topClassName}`))})};this.cellDisposables.add(T.onCellDecorationsChanged(m=>{(m.added.find(h=>h.topClassName)||m.removed.find(h=>h.topClassName))&&v()})),v()}}e.CellDecorations=b}),define(Q[3554],Y([1,0,7,364,80,18,27,99,449]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeCellDragImageRenderer=void 0;class m{static{this._ttPolicy=(0,y.createTrustedTypesPolicy)("cellRendererEditorText",{createHTML(a){return a}})}getRichText(a,r){const i=a.getModel();if(!i)return null;const s=this.getDefaultColorMap(),o=a.getOptions().get(49),u="--notebook-editor-font-family",d="--notebook-editor-font-size",p="--notebook-editor-font-weight",c=`color: ${s[1]};background-color: ${s[2]};font-family: var(${u});font-weight: var(${p});font-size: var(${d});line-height: ${o.lineHeight}px;white-space: pre;`,l=t.$("div",{style:c}),n=o.fontSize,g=o.fontWeight;l.style.setProperty(u,o.fontFamily),l.style.setProperty(d,`${n}px`),l.style.setProperty(p,g);const w=this.getRichTextLinesAsHtml(i,r,s);return l.innerHTML=w,l}getRichTextLinesAsHtml(a,r,i){const s=r.startLineNumber,o=r.startColumn,u=r.endLineNumber,d=r.endColumn,p=a.getOptions().tabSize;let c="";for(let l=s;l<=u;l++){const n=a.tokenization.getLineTokens(l),g=n.getLineContent(),w=l===s?o-1:0,E=l===u?d-1:g.length;g===""?c+="<br>":c+=(0,v.tokenizeLineToHTML)(g,n.inflate(),i,w,E,p,D.isWindows)}return m._ttPolicy?.createHTML(c)??c}getDefaultColorMap(){const a=f.TokenizationRegistry.getColorMap(),r=["#000000"];if(a)for(let i=1,s=a.length;i<s;i++)r[i]=b.Color.Format.CSS.formatHex(a[i]);return r}}class S{getDragImage(a,r,i){let s=this.getDragImageImpl(a,r,i);return s||(s=document.createElement("div"),s.textContent="1 cell"),s}getDragImageImpl(a,r,i){const s=a.container.cloneNode(!0);s.classList.forEach(d=>s.classList.remove(d)),s.classList.add("cell-drag-image","monaco-list-row","focused",`${i}-cell-row`);const o=s.querySelector(".cell-editor-container");if(!o)return null;const u=new m().getRichText(r,new T.Range(1,1,1,1e3));return u?(t.reset(o,u),s):null}}e.CodeCellDragImageRenderer=S}),define(Q[3555],Y([1,0,7,244]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellFocusPart=void 0;class b extends y.CellContentPart{constructor(T,f,v){super(),this._register(t.addDisposableListener(T,t.EventType.FOCUS,()=>{this.currentCell&&v.focusElement(this.currentCell)},!0)),f&&this._register(t.addDisposableListener(f,t.EventType.FOCUS,()=>{this.currentCell&&this.currentCell.outputsViewModels.length&&v.focusNotebookCell(this.currentCell,"output")}))}}e.CellFocusPart=b}),define(Q[1283],Y([1,0,226]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerCellToolbarStickyScroll=void 0;function y(b,D,T,f){const v=f?.extraOffset??0,m=f?.min??0,S=()=>{if(D.isInputCollapsed)T.style.top="";else{const h=b.getLayoutInfo().stickyHeight,a=b.scrollTop,r=b.getAbsoluteTopOfElement(D),i=a-r+v+h,s=D.layoutInfo.editorHeight+D.layoutInfo.statusBarHeight-45,o=s>20?(0,t.clamp)(m,i,s):m;T.style.top=`${o}px`}};return S(),b.onDidScroll(()=>S())}e.registerCellToolbarStickyScroll=y}),define(Q[3556],Y([1,0,7,344,14,6,88,13,8,29,5,38,610,244,1283,221]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellTitleToolbarPart=e.BetweenCellToolbar=void 0;let o=class extends r.CellOverlayPart{constructor(l,n,g,w,E,C,I){super(),this._notebookEditor=l,this._bottomCellToolbarContainer=g,this.instantiationService=w,this.contextMenuService=E,this.contextKeyService=C,this.menuService=I}_initialize(){if(this._betweenCellToolbar)return this._betweenCellToolbar;const l=this._register(new y.ToolBar(this._bottomCellToolbarContainer,this.contextMenuService,{actionViewItemProvider:w=>{if(w instanceof f.MenuItemAction)return this._notebookEditor.notebookOptions.getLayoutConfiguration().insertToolbarAlignment==="center"?this.instantiationService.createInstance(a.CodiconActionViewItem,w,void 0):this.instantiationService.createInstance(T.MenuEntryActionViewItem,w,void 0)}}));this._betweenCellToolbar=l;const n=this._register(this.menuService.createMenu(this._notebookEditor.creationOptions.menuIds.cellInsertToolbar,this.contextKeyService)),g=()=>{const w=d(n);l.setActions(w.primary,w.secondary)};return this._register(n.onDidChange(()=>g())),this._register(this._notebookEditor.notebookOptions.onDidChangeOptions(w=>{w.insertToolbarAlignment&&g()})),g(),l}didRenderCell(l){const n=this._initialize();n.context={ui:!0,cell:l,notebookEditor:this._notebookEditor,$mid:13},this.updateInternalLayoutNow(l)}updateInternalLayoutNow(l){const n=l.layoutInfo.bottomToolbarOffset;this._bottomCellToolbarContainer.style.transform=`translateY(${n}px)`}};e.BetweenCellToolbar=o,e.BetweenCellToolbar=o=fe([O(3,S.IInstantiationService),O(4,m.IContextMenuService),O(5,v.IContextKeyService),O(6,f.IMenuService)],o);let u=class extends r.CellOverlayPart{get hasActions(){return this._model?this._model.actions.primary.length+this._model.actions.secondary.length+this._model.deleteActions.primary.length+this._model.deleteActions.secondary.length>0:!1}constructor(l,n,g,w,E,C,I,_){super(),this.toolbarContainer=l,this._rootClassDelegate=n,this.toolbarId=g,this.deleteToolbarId=w,this._notebookEditor=E,this.contextKeyService=C,this.menuService=I,this.instantiationService=_,this._onDidUpdateActions=this._register(new D.Emitter),this.onDidUpdateActions=this._onDidUpdateActions.event}_initializeModel(){if(this._model)return this._model;const l=this._register(this.menuService.createMenu(this.toolbarId,this.contextKeyService)),n=this._register(this.menuService.createMenu(this.deleteToolbarId,this.contextKeyService)),g=d(l),w=d(n);return this._model={titleMenu:l,actions:g,deleteMenu:n,deleteActions:w},this._model}_initialize(l,n){if(this._view)return this._view;const g=this._register(this.instantiationService.createInstance(s.WorkbenchToolBar,this.toolbarContainer,{actionViewItemProvider:E=>(0,T.createActionViewItem)(this.instantiationService,E),renderDropdownAsChildElement:!0})),w=this._register(this.instantiationService.invokeFunction(E=>p(E,this.toolbarContainer,"cell-delete-toolbar")));return(l.deleteActions.primary.length!==0||l.deleteActions.secondary.length!==0)&&w.setActions(l.deleteActions.primary,l.deleteActions.secondary),this.setupChangeListeners(g,l.titleMenu,l.actions),this.setupChangeListeners(w,l.deleteMenu,l.deleteActions),this._view={toolbar:g,deleteToolbar:w},this._view}prepareRenderCell(l){this._initializeModel()}didRenderCell(l){const n=this._initializeModel(),g=this._initialize(n,l);this.cellDisposables.add((0,i.registerCellToolbarStickyScroll)(this._notebookEditor,l,this.toolbarContainer,{extraOffset:4,min:-14})),this.updateContext(g,{ui:!0,cell:l,notebookEditor:this._notebookEditor,$mid:13})}updateContext(l,n){l.toolbar.context=n,l.deleteToolbar.context=n}setupChangeListeners(l,n,g){let w=!1,E;this.updateActions(l,g),this._register(n.onDidChange(()=>{if(w){const I=d(n);E=()=>this.updateActions(l,I);return}const C=d(n);this.updateActions(l,C)})),this._rootClassDelegate.toggle("cell-toolbar-dropdown-active",!1),this._register(l.onDidChangeDropdownVisibility(C=>{w=C,this._rootClassDelegate.toggle("cell-toolbar-dropdown-active",C),E&&!C&&(this._register((0,b.disposableTimeout)(()=>{E?.()})),E=void 0)}))}updateActions(l,n){const g=t.isAncestor(document.activeElement,l.getElement());l.setActions(n.primary,n.secondary),g&&this._notebookEditor.focus(),n.primary.length||n.secondary.length?(this._rootClassDelegate.toggle("cell-has-toolbar-actions",!0),this._onDidUpdateActions.fire()):(this._rootClassDelegate.toggle("cell-has-toolbar-actions",!1),this._onDidUpdateActions.fire())}};e.CellTitleToolbarPart=u,e.CellTitleToolbarPart=u=fe([O(5,v.IContextKeyService),O(6,f.IMenuService),O(7,S.IInstantiationService)],u);function d(c){const g={primary:[],secondary:[]};return(0,T.createAndFillInActionBarActions)(c,{shouldForwardArgs:!0},g,w=>/^inline/.test(w)),g}function p(c,l,n){const g=c.get(m.IContextMenuService),w=c.get(h.IKeybindingService),E=c.get(S.IInstantiationService),C=new y.ToolBar(l,g,{getKeyBinding:I=>w.lookupKeybinding(I.id),actionViewItemProvider:I=>(0,T.createActionViewItem)(E,I),renderDropdownAsChildElement:!0});return n&&C.getElement().classList.add(n),C}}),define(Q[3557],Y([1,0,7,244]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsedCellInput=void 0;class b extends y.CellContentPart{constructor(T,f){super(),this.notebookEditor=T,this._register(t.addDisposableListener(f,t.EventType.DBLCLICK,v=>{!this.currentCell||!this.notebookEditor.hasModel()||(this.currentCell.isInputCollapsed?this.currentCell.isInputCollapsed=!1:this.currentCell.isOutputCollapsed=!1)})),this._register(t.addDisposableListener(f,t.EventType.CLICK,v=>{if(!this.currentCell||!this.notebookEditor.hasModel())return;const m=v.target;m&&m.classList&&m.classList.contains("expandInputIcon")&&(this.currentCell.isInputCollapsed=!1)}))}}e.CollapsedCellInput=b}),define(Q[3558],Y([1,0,401]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellListView=void 0;class y extends t.ListView{constructor(){super(...arguments),this._renderingStack=0}get inRenderingTransaction(){return this._renderingStack>0}render(D,T,f,v,m,S){this._renderingStack++,super.render(D,T,f,v,m,S),this._renderingStack--}_rerender(D,T,f){this._renderingStack++,super._rerender(D,T,f),this._renderingStack--}}e.NotebookCellListView=y}),define(Q[3559],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preloadsScriptStr=void 0;async function t(b){const D=new TextEncoder,T=new TextDecoder;let f=b.options;const v=b.isWorkspaceTrusted;let m=b.renderOptions;const S=L(),h=globalThis.acquireVsCodeApi,a=h();delete globalThis.acquireVsCodeApi;const r=new CSSStyleSheet;r.replaceSync(b.style.tokenizationCss);const i=typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?ge=>{setTimeout(()=>{if(he)return;const be=Date.now()+15;ge(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,be-Date.now())}}))});let he=!1;return{dispose(){he||(he=!0)}}}:(ge,he)=>{const be=requestIdleCallback(ge,typeof he=="number"?{timeout:he}:void 0);let ve=!1;return{dispose(){ve||(ve=!0,cancelIdleCallback(be))}}},s=()=>{const ge=document.activeElement;ge&&(ge.tagName==="INPUT"||ge.tagName==="TEXTAREA")&&(ae("outputInputFocus",{inputFocused:!0}),ge.addEventListener("blur",()=>{ae("outputInputFocus",{inputFocused:!1})},{once:!0}))},o=ge=>{if(!(!ge||!ge.view||!ge.view.document)){for(const he of ge.composedPath())if(he instanceof HTMLElement&&he.classList.contains("output")){ae("outputFocus",{id:he.id});break}for(const he of ge.composedPath())if(he instanceof HTMLAnchorElement&&he.href){if(he.href.startsWith("blob:"))d(he.href,he.download);else if(he.href.startsWith("data:"))u(he.href,he.download);else if(he.getAttribute("href")?.trim().startsWith("#")){if(!he.hash){ae("scroll-to-reveal",{scrollTop:0});return}const be=he.hash.substring(1);let ve=ge.view.document.getElementById(be);if(!ve){for(const Ie of ge.view.document.querySelectorAll(".preview"))if(ve=Ie.shadowRoot?.getElementById(be),ve)break}if(ve){const Ie=ve.getBoundingClientRect().top+ge.view.scrollY;ae("scroll-to-reveal",{scrollTop:Ie});return}}else{const be=he.getAttribute("href");be&&ae("clicked-link",{href:be})}ge.preventDefault(),ge.stopPropagation();return}}},u=async(ge,he)=>{ae("clicked-data-url",{data:ge,downloadName:he})},d=async(ge,he)=>{try{const ve=await(await fetch(ge)).blob(),Ie=new FileReader;Ie.addEventListener("load",()=>{u(Ie.result,he)}),Ie.readAsDataURL(ve)}catch(be){console.error(be.message)}};document.body.addEventListener("click",o),document.body.addEventListener("focusin",s);function p(){return Object.freeze({onDidReceiveKernelMessage:x.event,postKernelMessage:ge=>ae("customKernelMessage",{message:ge})})}async function c(ge){try{return await l(ge)}catch(he){throw console.error(he),he}}async function l(ge){const he=await __import(ge);if(!he.activate){console.error(`Notebook preload '${ge}' was expected to be a module but it does not export an 'activate' function`);return}return he.activate(p())}const n=new class{constructor(){this.pending=new Map}updateHeight(ge,he,be){this.pending.size||setTimeout(()=>{this.updateImmediately()},0);const ve=this.pending.get(ge);ve&&ve.isOutput?this.pending.set(ge,{id:ge,height:he,init:ve.init,isOutput:ve.isOutput}):this.pending.set(ge,{id:ge,height:he,...be})}updateImmediately(){this.pending.size&&(ae("dimension",{updates:Array.from(this.pending.values())}),this.pending.clear())}},g=new class{constructor(){this._observedElements=new WeakMap,this._observer=new ResizeObserver(ge=>{for(const he of ge){if(!document.body.contains(he.target))continue;const be=this._observedElements.get(he.target);if(!be||(this.postResizeMessage(be.cellId),he.target.id!==be.id)||!he.contentRect)continue;if(!be.output){this.updateHeight(be,he.target.offsetHeight);continue}const ve=he.contentRect.height;ve!==0&&be.lastKnownPadding===0||ve===0&&be.lastKnownPadding!==0?window.requestAnimationFrame(()=>{ve!==0?he.target.style.padding=`${b.style.outputNodePadding}px ${b.style.outputNodePadding}px ${b.style.outputNodePadding}px ${b.style.outputNodeLeftPadding}px`:he.target.style.padding="0px",this.updateHeight(be,he.target.offsetHeight)}):this.updateHeight(be,he.target.offsetHeight)}})}updateHeight(ge,he){ge.lastKnownHeight!==he&&(ge.lastKnownHeight=he,n.updateHeight(ge.id,he,{isOutput:ge.output}))}observe(ge,he,be,ve){this._observedElements.has(ge)||(this._observedElements.set(ge,{id:he,output:be,lastKnownPadding:b.style.outputNodePadding,lastKnownHeight:-1,cellId:ve}),this._observer.observe(ge))}postResizeMessage(ge){clearTimeout(this._outputResizeTimer),this._outputResizeTimer=setTimeout(()=>{ae("outputResized",{cellId:ge})},250)}};function w(ge){for(let he=ge.target;he;he=he.parentNode){if(!(he instanceof Element)||he.id==="container"||he.classList.contains("cell_container")||he.classList.contains("markup")||he.classList.contains("output_container"))return!1;if(ge.deltaY<0&&he.scrollTop>0)return!0;if(ge.deltaY>0&&he.scrollTop+he.clientHeight<he.scrollHeight){if(he.scrollHeight-he.scrollTop-he.clientHeight<2||window.getComputedStyle(he).overflowY==="hidden"||window.getComputedStyle(he).overflowY==="visible")continue;return!0}}return!1}const E=ge=>{ge.defaultPrevented||w(ge)||ae("did-scroll-wheel",{payload:{deltaMode:ge.deltaMode,deltaX:ge.deltaX,deltaY:ge.deltaY,deltaZ:ge.deltaZ,wheelDelta:ge.wheelDelta,wheelDeltaX:ge.wheelDeltaX,wheelDeltaY:ge.wheelDeltaY,detail:ge.detail,shiftKey:ge.shiftKey,type:ge.type}})};function C(ge,he){const be=document.getElementById(ge)??he?document.getElementById(he):void 0;if(be){if(be.contains(document.activeElement))return;let ve=be.querySelector('[tabindex="0"], [href], button, input, option, select, textarea');ve||(ve=be,ve.tabIndex=-1),ve.focus()}}function I(ge,he){const be=document.createElement("div");return be.id=`focus-sink-${ge}`,be.tabIndex=0,be.addEventListener("focus",()=>{ae("focus-editor",{cellId:ge,focusNext:he})}),be}function _(ge,he="mark",be={}){function ve(Ae){if(!Ae.startContainer.ownerDocument)return[];if(Ae.startContainer.nodeType===Node.TEXT_NODE&&Ae.startOffset>0){const De=Ae.startContainer,Ce=Ae.endOffset,_e=De.splitText(Ae.startOffset);Ae.endContainer===De&&Ae.setEnd(_e,Ce-Ae.startOffset),Ae.setStart(_e,0)}Ae.endContainer.nodeType===Node.TEXT_NODE&&Ae.endOffset<Ae.endContainer.length&&Ae.endContainer.splitText(Ae.endOffset);const Me=Ae.startContainer.ownerDocument.createTreeWalker(Ae.commonAncestorContainer,NodeFilter.SHOW_TEXT,De=>Ae.intersectsNode(De)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT);Me.currentNode=Ae.startContainer;const Oe=[];for(Me.currentNode.nodeType===Node.TEXT_NODE&&Oe.push(Me.currentNode);Me.nextNode()&&Ae.comparePoint(Me.currentNode,0)!==1;)Me.currentNode.nodeType===Node.TEXT_NODE&&Oe.push(Me.currentNode);return Oe}function Ie(Ae,Me,Oe){const De=Ae.ownerDocument.createElement(Me);Object.keys(Oe).forEach(_e=>{De.setAttribute(_e,Oe[_e])});const Ce=Ae.ownerDocument.createRange();return Ce.selectNode(Ae),Ce.surroundContents(De),De}if(ge.collapsed)return{remove:()=>{},update:()=>{}};const Se=ve(ge),we=[];for(const Ae in Se){const Me=Ie(Se[Ae],he,be);we.push(Me)}function ye(Ae){if(Ae.childNodes.length===1)Ae.parentNode?.replaceChild(Ae.firstChild,Ae);else{for(;Ae.firstChild;)Ae.parentNode?.insertBefore(Ae.firstChild,Ae);Ae.remove()}}function Re(){for(const Ae in we)ye(we[Ae])}function Le(Ae,Me={}){Object.keys(Me).forEach(Oe=>{Ae.setAttribute(Oe,Me[Oe])})}function Pe(Ae){for(const Me in we)Le(we[Me],Ae)}return{remove:Re,update:Pe}}function A(ge){const he=window.getSelection();if(he)try{he.removeAllRanges();const be=document.createRange();be.setStart(ge.startContainer,ge.startOffset),be.setEnd(ge.endContainer,ge.endOffset),he.addRange(be)}catch(be){console.log(be)}}function k(ge,he,be="mark",ve={}){if(he){const Ie=_(ge,be,ve);return{range:ge,dispose:Ie.remove,update:(Se,we)=>{we===void 0?Ie.update({style:`background-color: ${Se}`}):Ie.update({class:we})}}}else{window.document.execCommand("hiliteColor",!1,V);const Ie=window.getSelection().getRangeAt(0).cloneRange(),Se={collapsed:Ie.collapsed,commonAncestorContainer:Ie.commonAncestorContainer,endContainer:Ie.endContainer,endOffset:Ie.endOffset,startContainer:Ie.startContainer,startOffset:Ie.startOffset};return{range:Se,dispose:()=>{A(Se);try{document.designMode="On",document.execCommand("removeFormat",!1,void 0),document.designMode="Off",window.getSelection()?.removeAllRanges()}catch(we){console.log(we)}},update:(we,ye)=>{A(Se);try{document.designMode="On",document.execCommand("removeFormat",!1,void 0),window.document.execCommand("hiliteColor",!1,we),document.designMode="Off",window.getSelection()?.removeAllRanges()}catch(Re){console.log(Re)}}}}}function L(ge=()=>{}){const he=new Set;return{fire(be){for(const ve of[...he])ve.fn.call(ve.thisArg,be)},event(be,ve,Ie){const Se={fn:be,thisArg:ve},we={dispose:()=>{he.delete(Se),ge(he)}};return he.add(Se),ge(he),Ie instanceof Array?Ie.push(we):Ie&&Ie.add(we),we}}}function R(ge,he,be){he.innerText=ge;const ve=document.createElement("ul");for(const Ie of be){console.error(Ie);const Se=document.createElement("li");Se.innerText=Ie.message,ve.appendChild(Se)}he.appendChild(ve)}const M=new class{constructor(){this._requestPool=0,this._requests=new Map}getOutputItem(ge,he){const be=this._requestPool++;let ve;const Ie=new Promise(Se=>ve=Se);return this._requests.set(be,{resolve:ve}),ae("getOutputItem",{requestId:be,outputId:ge,mime:he}),Ie}resolveOutputItem(ge,he){const be=this._requests.get(ge);be&&(this._requests.delete(ge),be.resolve(he))}};let N=!1;function P(ge,he,be,ve,Ie,Se){function we(Pe,Ae,Me,Oe,De){return Object.freeze({id:Pe,mime:Ae,metadata:Me,appendedText(){if(De)return T.decode(De.valueBytes)},data(){return Oe},text(){return T.decode(Oe)},json(){return JSON.parse(this.text())},blob(){return new Blob([Oe],{type:this.mime})},get _allOutputItems(){return N||(N=!0,console.warn("'_allOutputItems' is proposed API. DO NOT ship an extension that depends on it!")),Re}})}const ye=new Map,Re=Object.freeze(Ie.map(Pe=>{const Ae=Pe.mime;return Object.freeze({mime:Ae,getItem(){const Me=ye.get(Ae);if(Me)return Me;const Oe=M.getOutputItem(ge,Ae).then(De=>De?we(ge,De.mime,be,De.valueBytes):void 0);return ye.set(Ae,Oe),Oe}})})),Le=we(ge,he,be,ve,Se);return ye.set(he,Promise.resolve(Le)),Le}const x=L(),F=window.trustedTypes?.createPolicy("notebookRenderer",{createHTML:ge=>ge,createScript:ge=>ge});window.addEventListener("wheel",E);const V=window.getComputedStyle(document.getElementById("_defaultColorPalatte")).color,W=window.getComputedStyle(document.getElementById("_defaultColorPalatte")).backgroundColor;class z{constructor(){this._activeHighlightInfo=new Map}addHighlights(he,be){for(let Ie=he.length-1;Ie>=0;Ie--){const Se=he[Ie],we=k(Se.originalRange,!0,"mark",Se.isShadow?{style:"background-color: "+V+";"}:{class:"find-match"});Se.highlightResult=we}const ve={matches:he,currentMatchIndex:-1};this._activeHighlightInfo.set(be,ve)}removeHighlights(he){this._activeHighlightInfo.get(he)?.matches.forEach(be=>{be.highlightResult?.dispose()}),this._activeHighlightInfo.delete(he)}highlightCurrentMatch(he,be){const ve=this._activeHighlightInfo.get(be);if(!ve){console.error("Modified current highlight match before adding highlight list.");return}const Ie=ve.matches[ve.currentMatchIndex];Ie?.highlightResult?.update(V,Ie.isShadow?void 0:"find-match");const Se=ve.matches[he];ve.currentMatchIndex=he;const we=window.getSelection();if(Se&&we&&Se.highlightResult){let ye=0;try{const Re=document.getElementById(Se.id).getBoundingClientRect().top,Le=document.createRange();Le.selectNode(Se.highlightResult.range.startContainer),Se.highlightResult.range.startContainer.parentElement?.scrollIntoView({behavior:"auto",block:"end",inline:"nearest"});const Pe=Le.getBoundingClientRect().top;Le.detach(),ye=Pe-Re}catch(Re){console.error(Re)}Se.highlightResult?.update(W,Se.isShadow?void 0:"current-find-match"),document.getSelection()?.removeAllRanges(),ae("didFindHighlightCurrent",{offset:ye})}}unHighlightCurrentMatch(he,be){const ve=this._activeHighlightInfo.get(be);if(!ve)return;const Ie=ve.matches[he];Ie&&Ie.highlightResult&&Ie.highlightResult.update(V,Ie.isShadow?void 0:"find-match")}dispose(){document.getSelection()?.removeAllRanges(),this._activeHighlightInfo.forEach(he=>{he.matches.forEach(be=>{be.highlightResult?.dispose()})})}}class B{constructor(){this._activeHighlightInfo=new Map,this._matchesHighlight=new Highlight,this._matchesHighlight.priority=1,this._currentMatchesHighlight=new Highlight,this._currentMatchesHighlight.priority=2,CSS.highlights?.set("find-highlight",this._matchesHighlight),CSS.highlights?.set("current-find-highlight",this._currentMatchesHighlight)}_refreshRegistry(he=!0){he&&this._matchesHighlight.clear(),this._currentMatchesHighlight.clear(),this._activeHighlightInfo.forEach(be=>{if(he)for(let ve=0;ve<be.matches.length;ve++)this._matchesHighlight.add(be.matches[ve].originalRange);be.currentMatchIndex<be.matches.length&&be.currentMatchIndex>=0&&this._currentMatchesHighlight.add(be.matches[be.currentMatchIndex].originalRange)})}addHighlights(he,be){for(let Ie=0;Ie<he.length;Ie++)this._matchesHighlight.add(he[Ie].originalRange);const ve={matches:he,currentMatchIndex:-1};this._activeHighlightInfo.set(be,ve)}highlightCurrentMatch(he,be){const ve=this._activeHighlightInfo.get(be);if(!ve){console.error("Modified current highlight match before adding highlight list.");return}ve.currentMatchIndex=he;const Ie=ve.matches[he];if(Ie){let Se=0;try{const we=document.getElementById(Ie.id).getBoundingClientRect().top;Ie.originalRange.startContainer.parentElement?.scrollIntoView({behavior:"auto",block:"end",inline:"nearest"}),Se=Ie.originalRange.getBoundingClientRect().top-we,ae("didFindHighlightCurrent",{offset:Se})}catch(we){console.error(we)}}this._refreshRegistry(!1)}unHighlightCurrentMatch(he,be){const ve=this._activeHighlightInfo.get(be);ve&&(ve.currentMatchIndex=-1)}removeHighlights(he){this._activeHighlightInfo.delete(he),this._refreshRegistry()}dispose(){document.getSelection()?.removeAllRanges(),this._currentMatchesHighlight.clear(),this._matchesHighlight.clear()}}const K=CSS.highlights?new B:new z;function H(ge){const be=ge.getRangeAt(0).cloneRange(),ve=ge.toString().length;ge.collapseToStart(),ge.modify("move","backward","lineboundary"),ge.modify("extend","forward","lineboundary");const Ie=ge.toString(),Se=U(ge.getRangeAt(0),be),we={start:Se,end:Se+ve};return ge.removeAllRanges(),ge.addRange(be),{line:Ie,range:we}}function U(ge,he){const be=G(ge.startContainer,he.startContainer),ve=ie(be,ge.startContainer)+ge.startOffset;return ie(be,he.startContainer)+he.startOffset-ve}function G(ge,he){const be=new Range;return be.setStart(ge,0),be.setEnd(he,0),be.commonAncestorContainer}function $(ge){let he=0;if(ge.nodeType===Node.TEXT_NODE)he+=ge.textContent?.length||0;else for(const be of ge.childNodes)he+=$(be);return he}function ie(ge,he){if(!he)return 0;let be=0;if(he===ge||!ge.contains(he))return be;let ve=he.previousSibling;for(;ve;)be+=$(ve),ve=ve.previousSibling;return be+ie(ge,he.parentNode)}const J=(ge,he)=>{let be=!0;const ve=[],Ie=document.createRange();Ie.selectNodeContents(document.getElementById("findStart"));const Se=window.getSelection();Se?.removeAllRanges(),Se?.addRange(Ie),re.toggleDragDropEnabled(!1);try{for(document.designMode="On";be&&ve.length<500;)if(be=window.find(ge,!!he.caseSensitive,!1,!1,!!he.wholeWord,!0,!1),be){const we=window.getSelection();if(!we){console.log("no selection");break}if(he.includeMarkup&&we.rangeCount>0&&we.getRangeAt(0).startContainer.nodeType===1&&we.getRangeAt(0).startContainer.classList.contains("markup")){const Re=we.anchorNode?.firstChild,Le=Re.shadowRoot,Pe=Le?.getSelection?Le?.getSelection():null;Pe&&Pe.anchorNode&&ve.push({type:"preview",id:Re.id,cellId:Re.id,container:Re,isShadow:!0,originalRange:Pe.getRangeAt(0),searchPreviewInfo:he.shouldGetSearchPreviewInfo?H(Pe):void 0})}if(he.includeOutput&&we.rangeCount>0&&we.getRangeAt(0).startContainer.nodeType===1&&we.getRangeAt(0).startContainer.classList.contains("output_container")){const Re=we.getRangeAt(0).startContainer.parentElement.id,Le=we.anchorNode?.firstChild,Pe=Le.shadowRoot,Ae=Pe?.getSelection?Pe?.getSelection():null;Ae&&Ae.anchorNode&&ve.push({type:"output",id:Le.id,cellId:Re,container:Le,isShadow:!0,originalRange:Ae.getRangeAt(0),searchPreviewInfo:he.shouldGetSearchPreviewInfo?H(Ae):void 0})}const ye=we.anchorNode?.parentElement;if(ye){const Re=ve.length?ve[ve.length-1]:null;if(Re&&Re.container.contains(ye)&&he.includeOutput)ve.push({type:Re.type,id:Re.id,cellId:Re.cellId,container:Re.container,isShadow:!1,originalRange:we.getRangeAt(0),searchPreviewInfo:he.shouldGetSearchPreviewInfo?H(we):void 0});else for(let Le=ye;Le&&Le instanceof Element;Le=Le.parentElement){if(Le.classList.contains("output")&&he.includeOutput){const Pe=Le.parentElement?.parentElement?.id;Pe&&ve.push({type:"output",id:Le.id,cellId:Pe,container:Le,isShadow:!1,originalRange:we.getRangeAt(0),searchPreviewInfo:he.shouldGetSearchPreviewInfo?H(we):void 0});break}if(Le.id==="container"||Le===document.body)break}}else break}}catch(we){console.log(we)}K.addHighlights(ve,he.ownerID),document.getSelection()?.removeAllRanges(),re.toggleDragDropEnabled(f.dragAndDropEnabled),document.designMode="Off",ae("didFind",{matches:ve.map((we,ye)=>({type:we.type,id:we.id,cellId:we.cellId,index:ye,searchPreviewInfo:we.searchPreviewInfo}))})},j=async(ge,he,be=5)=>{if(!document.hasFocus()&&be>0){setTimeout(()=>{j(ge,he,be-1)},20);return}try{const ve=document.getElementById(ge)?.querySelector("img")??document.getElementById(he)?.querySelector("img");ve?await navigator.clipboard.write([new ClipboardItem({"image/png":new Promise(Ie=>{const Se=document.createElement("canvas");Se!==null&&(Se.width=ve.naturalWidth,Se.height=ve.naturalHeight,Se.getContext("2d")?.drawImage(ve,0,0)),Se.toBlob(we=>{we&&Ie(we),Se.remove()},"image/png")})})]):console.error("Could not find image element to copy for output with id",ge)}catch(ve){console.error("Could not copy image:",ve)}};window.addEventListener("message",async ge=>{const he=ge;switch(he.data.type){case"initializeMarkup":{try{await Promise.all(he.data.cells.map(be=>re.ensureMarkupCell(be)))}finally{n.updateImmediately(),ae("initializedMarkup",{requestId:he.data.requestId})}break}case"createMarkupCell":re.ensureMarkupCell(he.data.cell);break;case"showMarkupCell":re.showMarkupCell(he.data.id,he.data.top,he.data.content,he.data.metadata);break;case"hideMarkupCells":for(const be of he.data.ids)re.hideMarkupCell(be);break;case"unhideMarkupCells":for(const be of he.data.ids)re.unhideMarkupCell(be);break;case"deleteMarkupCell":for(const be of he.data.ids)re.deleteMarkupCell(be);break;case"updateSelectedMarkupCells":re.updateSelectedCells(he.data.selectedCellIds);break;case"html":{const be=he.data;be.createOnIdle?Z.enqueueIdle(be.outputId,ve=>re.renderOutputCell(be,ve)):Z.enqueue(be.outputId,ve=>re.renderOutputCell(be,ve));break}case"view-scroll":{he.data.widgets.forEach(be=>{Z.enqueue(be.outputId,()=>{re.updateOutputsScroll([be])})}),re.updateMarkupScrolls(he.data.markupCells);break}case"clear":se.clearAll(),re.clearAll(),document.getElementById("container").innerText="";break;case"clearOutput":{const{cellId:be,rendererId:ve,outputId:Ie}=he.data;Z.cancelOutput(Ie),re.clearOutput(be,Ie,ve);break}case"hideOutput":{const{cellId:be,outputId:ve}=he.data;Z.enqueue(ve,()=>{re.hideOutput(be)});break}case"showOutput":{const{outputId:be,cellTop:ve,cellId:Ie,content:Se}=he.data;Z.enqueue(be,()=>{re.showOutput(Ie,be,ve),Se&&re.updateAndRerender(Ie,be,Se)});break}case"copyImage":{await j(he.data.outputId,he.data.altOutputId);break}case"ack-dimension":{for(const{cellId:be,outputId:ve,height:Ie}of he.data.updates)re.updateOutputHeight(be,ve,Ie);break}case"preload":{const be=he.data.resources;for(const{uri:ve}of be)te.load(ve);break}case"updateRenderers":{const{rendererData:be}=he.data;se.updateRendererData(be);break}case"focus-output":C(he.data.cellOrOutputId,he.data.alternateId);break;case"decorations":{let be=document.getElementById(he.data.cellId);be||(re.ensureOutputCell(he.data.cellId,-1e5,!0),be=document.getElementById(he.data.cellId)),be?.classList.add(...he.data.addedClassNames),be?.classList.remove(...he.data.removedClassNames);break}case"customKernelMessage":x.fire(he.data.message);break;case"customRendererMessage":se.getRenderer(he.data.rendererId)?.receiveMessage(he.data.message);break;case"notebookStyles":{const be=document.documentElement.style;for(let ve=be.length-1;ve>=0;ve--){const Ie=be[ve];Ie&&Ie.startsWith("--notebook-")&&be.removeProperty(Ie)}for(const[ve,Ie]of Object.entries(he.data.styles))be.setProperty(`--${ve}`,Ie);break}case"notebookOptions":f=he.data.options,re.toggleDragDropEnabled(f.dragAndDropEnabled),m=he.data.renderOptions,S.fire(m);break;case"tokenizedCodeBlock":{const{codeBlockId:be,html:ve}=he.data;oe.highlightCodeBlock(be,ve);break}case"tokenizedStylesChanged":{r.replaceSync(he.data.css);break}case"find":{K.removeHighlights(he.data.options.ownerID),J(he.data.query,he.data.options);break}case"findHighlightCurrent":{K?.highlightCurrentMatch(he.data.index,he.data.ownerID);break}case"findUnHighlightCurrent":{K?.unHighlightCurrentMatch(he.data.index,he.data.ownerID);break}case"findStop":{K.removeHighlights(he.data.ownerID);break}case"returnOutputItem":M.resolveOutputItem(he.data.requestId,he.data.output)}});const ee="vscode.fallbackToNextRenderer";class X{constructor(he){this.data=he,this._onMessageEvent=L()}receiveMessage(he){this._onMessageEvent.fire(he)}async renderOutputItem(he,be,ve){try{await this.load()}catch(Ie){ve.aborted||R(`Error loading renderer '${this.data.id}'`,be,Ie instanceof Error?[Ie]:[]);return}if(!this._api){ve.aborted||R(`Renderer '${this.data.id}' does not implement renderOutputItem`,be,[]);return}try{const Ie=performance.now();await this._api.renderOutputItem(he,be,ve),this.postDebugMessage("Rendered output item",{id:he.id,duration:`${performance.now()-Ie}ms`})}catch(Ie){if(ve.aborted)return;if(Ie instanceof Error&&Ie.name===ee)throw Ie;R(`Error rendering output item using '${this.data.id}'`,be,Ie instanceof Error?[Ie]:[]),this.postDebugMessage("Rendering output item failed",{id:he.id,error:Ie+""})}}disposeOutputItem(he){this._api?.disposeOutputItem?.(he)}createRendererContext(){const{id:he,messaging:be}=this.data,ve={setState:Ie=>a.setState({...a.getState(),[he]:Ie}),getState:()=>{const Ie=a.getState();return typeof Ie=="object"&&Ie?Ie[he]:void 0},getRenderer:async Ie=>{const Se=se.getRenderer(Ie);if(Se)return Se._api?Se._api:Se.load()},workspace:{get isTrusted(){return v}},settings:{get lineLimit(){return m.lineLimit},get outputScrolling(){return m.outputScrolling},get outputWordWrap(){return m.outputWordWrap}},get onDidChangeSettings(){return S.event}};return be&&(ve.onDidReceiveMessage=this._onMessageEvent.event,ve.postMessage=Ie=>ae("customRendererMessage",{rendererId:he,message:Ie})),Object.freeze(ve)}load(){return this._loadPromise??=this._load(),this._loadPromise}async _load(){this.postDebugMessage("Start loading renderer");try{await te.waitForAllCurrent();const he=performance.now(),be=await __import(this.data.entrypoint.path);if(this.postDebugMessage("Imported renderer",{duration:`${performance.now()-he}ms`}),!be)return;this._api=await be.activate(this.createRendererContext()),this.postDebugMessage("Activated renderer",{duration:`${performance.now()-he}ms`});const ve=b.rendererData.filter(Ie=>Ie.entrypoint.extends===this.data.id);return ve.length&&this.postDebugMessage("Activating dependant renderers",{dependents:ve.map(Ie=>Ie.id).join(", ")}),await Promise.all(ve.map(async Ie=>{const Se=se.getRenderer(Ie.id);if(!Se)throw new Error(`Could not find extending renderer: ${Ie.id}`);try{return await Se.load()}catch(we){console.error(we),this.postDebugMessage("Activating dependant renderer failed",{dependent:Ie.id,error:we+""});return}})),this._api}catch(he){throw this.postDebugMessage("Loading renderer failed"),he}}postDebugMessage(he,be){ae("logRendererDebugMessage",{message:`[renderer ${this.data.id}] - ${he}`,data:be})}}const te=new class{constructor(){this.preloads=new Map}waitFor(ge){return this.preloads.get(ge)||Promise.resolve(new Error(`Preload not ready: ${ge}`))}load(ge){const he=Promise.all([c(ge),this.waitForAllCurrent()]);return this.preloads.set(ge,he),he}waitForAllCurrent(){return Promise.all([...this.preloads.values()].map(ge=>ge.catch(he=>he)))}},Z=new class{constructor(){this.outputs=new Map,this.pendingOutputCreationRequest=new Map}enqueue(ge,he){this.pendingOutputCreationRequest.get(ge)?.dispose(),this.pendingOutputCreationRequest.delete(ge);const be=this.outputs.get(ge);if(be)be.queue=be.queue.then(async ve=>{be.abort.signal.aborted||await he(be.abort.signal)});else{const ve=new AbortController;this.outputs.set(ge,{abort:ve,queue:new Promise(Ie=>Ie(he(ve.signal)))})}}enqueueIdle(ge,he){this.pendingOutputCreationRequest.get(ge)?.dispose(),Z.pendingOutputCreationRequest.set(ge,i(()=>{Z.enqueue(ge,he),Z.pendingOutputCreationRequest.delete(ge)}))}cancelAll(){this.pendingOutputCreationRequest.forEach(ge=>ge.dispose()),this.pendingOutputCreationRequest.clear();for(const{abort:ge}of this.outputs.values())ge.abort();this.outputs.clear()}cancelOutput(ge){this.pendingOutputCreationRequest.get(ge)?.dispose(),this.pendingOutputCreationRequest.delete(ge);const he=this.outputs.get(ge);he&&(he.abort.abort(),this.outputs.delete(ge))}},se=new class{constructor(){this._renderers=new Map;for(const ge of b.rendererData)this.addRenderer(ge)}getRenderer(ge){return this._renderers.get(ge)}rendererEqual(ge,he){if(ge.id!==he.id||ge.entrypoint.path!==he.entrypoint.path||ge.entrypoint.extends!==he.entrypoint.extends||ge.messaging!==he.messaging||ge.mimeTypes.length!==he.mimeTypes.length)return!1;for(let be=0;be<ge.mimeTypes.length;be++)if(ge.mimeTypes[be]!==he.mimeTypes[be])return!1;return!0}updateRendererData(ge){const he=new Set(this._renderers.keys()),be=new Set(ge.map(ve=>ve.id));for(const ve of ge){const Ie=this._renderers.get(ve.id);Ie&&this.rendererEqual(Ie.data,ve)||this.addRenderer(ve)}for(const ve of he)be.has(ve)||this._renderers.delete(ve)}addRenderer(ge){this._renderers.set(ge.id,new X(ge))}clearAll(){Z.cancelAll();for(const ge of this._renderers.values())ge.disposeOutputItem()}clearOutput(ge,he){Z.cancelOutput(he),this._renderers.get(ge)?.disposeOutputItem(he)}async render(ge,he,be,ve){const Ie=this.findRenderer(he,ge);if(!Ie){const we=(document.documentElement.style.getPropertyValue("--notebook-cell-renderer-not-found-error")||"").replace("$0",()=>ge.mime);this.showRenderError(ge,be,we);return}if(!(await this._doRender(ge,be,Ie,ve)).continue)return;for(const we of ge._allOutputItems){if(we.mime===ge.mime)continue;const ye=await we.getItem();if(ve.aborted)return;if(ye){const Re=this.findRenderer(void 0,ye);if(Re&&!(await this._doRender(ye,be,Re,ve)).continue)return}}const Se=(document.documentElement.style.getPropertyValue("--notebook-cell-renderer-fallbacks-exhausted")||"").replace("$0",()=>ge.mime);this.showRenderError(ge,be,Se)}async _doRender(ge,he,be,ve){try{return await be.renderOutputItem(ge,he,ve),{continue:!1}}catch(Ie){if(ve.aborted)return{continue:!1};if(Ie instanceof Error&&Ie.name===ee)return{continue:!0};throw Ie}}findRenderer(ge,he){let be;if(typeof ge=="string")be=Array.from(this._renderers.values()).find(ve=>ve.data.id===ge);else{const ve=Array.from(this._renderers.values()).filter(Ie=>Ie.data.mimeTypes.includes(he.mime)&&!Ie.data.entrypoint.extends);ve.length&&(ve.sort((Ie,Se)=>+Ie.data.isBuiltin-+Se.data.isBuiltin),be=ve[0])}return be}showRenderError(ge,he,be){const ve=document.createElement("div"),Ie=document.createElement("div");Ie.className="no-renderer-error",Ie.innerText=be;const Se=document.createElement("div");Se.innerText=ge.text(),ve.appendChild(Ie),ve.appendChild(Se),he.innerText="",he.appendChild(ve)}},re=new class{constructor(){this._markupCells=new Map,this._outputCells=new Map}clearAll(){for(const he of this._markupCells.values())he.dispose();this._markupCells.clear();for(const he of this._outputCells.values())he.dispose();this._outputCells.clear()}async createMarkupCell(he,be,ve){const Ie=this._markupCells.get(he.cellId);if(Ie)return console.error(`Trying to create markup that already exists: ${he.cellId}`),Ie;const Se=new le(he.cellId,he.mime,he.content,be,he.metadata);return Se.element.style.visibility=ve?"":"hidden",this._markupCells.set(he.cellId,Se),await Se.ready,Se}async ensureMarkupCell(he){let be=this._markupCells.get(he.cellId);be?(be.element.style.visibility=he.visible?"":"hidden",await be.updateContentAndRender(he.content,he.metadata)):be=await this.createMarkupCell(he,he.offset,he.visible)}deleteMarkupCell(he){const be=this.getExpectedMarkupCell(he);be&&(be.remove(),be.dispose(),this._markupCells.delete(he))}async updateMarkupContent(he,be,ve){await this.getExpectedMarkupCell(he)?.updateContentAndRender(be,ve)}showMarkupCell(he,be,ve,Ie){this.getExpectedMarkupCell(he)?.show(be,ve,Ie)}hideMarkupCell(he){this.getExpectedMarkupCell(he)?.hide()}unhideMarkupCell(he){this.getExpectedMarkupCell(he)?.unhide()}getExpectedMarkupCell(he){const be=this._markupCells.get(he);if(!be){console.log(`Could not find markup cell '${he}'`);return}return be}updateSelectedCells(he){const be=new Set(he);for(const ve of this._markupCells.values())ve.setSelected(be.has(ve.id))}toggleDragDropEnabled(he){for(const be of this._markupCells.values())be.toggleDragDropEnabled(he)}updateMarkupScrolls(he){for(const{id:be,top:ve}of he){const Ie=this._markupCells.get(be);Ie&&(Ie.element.style.top=`${ve}px`)}}async renderOutputCell(he,be){const ve=await Promise.all(he.requiredPreloads.map(Se=>te.waitFor(Se.uri).then(()=>{},we=>we)));return be.aborted?void 0:this.ensureOutputCell(he.cellId,he.cellTop,!1).renderOutputElement(he,ve,be)}ensureOutputCell(he,be,ve){let Ie=this._outputCells.get(he);const Se=!!Ie;return Ie||(Ie=new ne(he),this._outputCells.set(he,Ie)),Se&&ve||(Ie.element.style.top=be+"px"),Ie}clearOutput(he,be,ve){this._outputCells.get(he)?.clearOutput(be,ve)}showOutput(he,be,ve){this._outputCells.get(he)?.show(be,ve)}updateAndRerender(he,be,ve){this._outputCells.get(he)?.updateContentAndRerender(be,ve)}hideOutput(he){this._outputCells.get(he)?.hide()}updateOutputHeight(he,be,ve){this._outputCells.get(he)?.updateOutputHeight(be,ve)}updateOutputsScroll(he){for(const be of he)this._outputCells.get(be.cellId)?.updateScroll(be)}};class oe{static{this.pendingCodeBlocksToHighlight=new Map}static highlightCodeBlock(he,be){const ve=oe.pendingCodeBlocksToHighlight.get(he);if(!ve)return;const Ie=F?.createHTML(be)??be;ve.innerHTML=Ie;const Se=ve.getRootNode();Se instanceof ShadowRoot&&(Se.adoptedStyleSheets.includes(r)||Se.adoptedStyleSheets.push(r))}static requestHighlightCodeBlock(he){const be=[];let ve=0;for(const Ie of he.querySelectorAll(".vscode-code-block")){const Se=Ie.getAttribute("data-vscode-code-block-lang");if(Ie.textContent&&Se){const we=`${Date.now()}-${ve++}`;be.push({value:Ie.textContent,lang:Se,id:we}),oe.pendingCodeBlocksToHighlight.set(we,Ie)}}return be}}class le{constructor(he,be,ve,Ie,Se){this._isDisposed=!1;const we=this;this.id=he,this._content={value:ve,version:0,metadata:Se};let ye,Re;this.ready=new Promise((Me,Oe)=>{ye=Me,Re=Oe});let Le;this.outputItem=Object.freeze({id:he,mime:be,get metadata(){return we._content.metadata},text:()=>this._content.value,json:()=>{},data:()=>{if(Le?.version===this._content.version)return Le.value;const Me=D.encode(this._content.value);return Le={version:this._content.version,value:Me},Me},blob(){return new Blob([this.data()],{type:this.mime})},_allOutputItems:[{mime:be,getItem:async()=>this.outputItem}]});const Pe=document.getElementById("container"),Ae=document.createElement("div");Ae.className="markup",Ae.style.position="absolute",Ae.style.width="100%",this.element=document.createElement("div"),this.element.id=this.id,this.element.classList.add("preview"),this.element.style.position="absolute",this.element.style.top=Ie+"px",this.toggleDragDropEnabled(f.dragAndDropEnabled),Ae.appendChild(this.element),Pe.appendChild(Ae),this.addEventListeners(),this.updateContentAndRender(this._content.value,this._content.metadata).then(()=>{this._isDisposed||g.observe(this.element,this.id,!1,this.id),ye()},()=>Re())}dispose(){this._isDisposed=!0,this.renderTaskAbort?.abort(),this.renderTaskAbort=void 0}addEventListeners(){this.element.addEventListener("dblclick",()=>{ae("toggleMarkupPreview",{cellId:this.id})}),this.element.addEventListener("click",he=>{ae("clickMarkupCell",{cellId:this.id,altKey:he.altKey,ctrlKey:he.ctrlKey,metaKey:he.metaKey,shiftKey:he.shiftKey})}),this.element.addEventListener("contextmenu",he=>{ae("contextMenuMarkupCell",{cellId:this.id,clientX:he.clientX,clientY:he.clientY})}),this.element.addEventListener("mouseenter",()=>{ae("mouseEnterMarkupCell",{cellId:this.id})}),this.element.addEventListener("mouseleave",()=>{ae("mouseLeaveMarkupCell",{cellId:this.id})}),this.element.addEventListener("dragstart",he=>{de.startDrag(he,this.id)}),this.element.addEventListener("drag",he=>{de.updateDrag(he,this.id)}),this.element.addEventListener("dragend",he=>{de.endDrag(he,this.id)})}async updateContentAndRender(he,be){this._content={value:he,version:this._content.version+1,metadata:be},this.renderTaskAbort?.abort();const ve=new AbortController;this.renderTaskAbort=ve;try{await se.render(this.outputItem,void 0,this.element,this.renderTaskAbort.signal)}finally{this.renderTaskAbort===ve&&(this.renderTaskAbort=void 0)}const Ie=this.element.shadowRoot??this.element,Se=[];for(const ye of Ie.children)switch(ye.tagName){case"LINK":case"SCRIPT":case"STYLE":break;default:Se.push(ye.outerHTML);break}const we=oe.requestHighlightCodeBlock(Ie);ae("renderedMarkup",{cellId:this.id,html:Se.join(""),codeBlocks:we}),n.updateHeight(this.id,this.element.offsetHeight,{isOutput:!1})}show(he,be,ve){this.element.style.visibility="",this.element.style.top=`${he}px`,typeof be=="string"||ve?this.updateContentAndRender(be??this._content.value,ve??this._content.metadata):this.updateMarkupDimensions()}hide(){this.element.style.visibility="hidden"}unhide(){this.element.style.visibility="",this.updateMarkupDimensions()}remove(){this.element.remove()}async updateMarkupDimensions(){n.updateHeight(this.id,this.element.offsetHeight,{isOutput:!1})}setSelected(he){this.element.classList.toggle("selected",he)}toggleDragDropEnabled(he){he?(this.element.classList.add("draggable"),this.element.setAttribute("draggable","true")):(this.element.classList.remove("draggable"),this.element.removeAttribute("draggable"))}}class ne{constructor(he){this.outputElements=new Map;const be=document.getElementById("container"),ve=I(he);be.appendChild(ve),this.element=document.createElement("div"),this.element.style.position="absolute",this.element.style.outline="0",this.element.id=he,this.element.classList.add("cell_container"),be.appendChild(this.element),this.element=this.element;const Ie=I(he,!0);be.appendChild(Ie)}dispose(){for(const he of this.outputElements.values())he.dispose();this.outputElements.clear()}createOutputElement(he){let be=this.outputElements.get(he.outputId);return be||(be=new ce(he.outputId),this.element.appendChild(be.element),this.outputElements.set(he.outputId,be)),be.createOutputElement(he.outputId,he.outputOffset,he.left,he.cellId)}async renderOutputElement(he,be,ve){const Ie=Date.now(),Se=this.createOutputElement(he);await Se.render(he.content,he.rendererId,be,ve),Se.element.style.visibility=he.initiallyHidden?"hidden":"",he.executionId&&he.rendererId&&ae("notebookPerformanceMessage",{cellId:he.cellId,executionId:he.executionId,duration:Date.now()-Ie,rendererId:he.rendererId})}clearOutput(he,be){const ve=this.outputElements.get(he);ve?.clear(be),ve?.dispose(),this.outputElements.delete(he)}show(he,be){const ve=this.outputElements.get(he);ve&&(this.element.style.visibility="",this.element.style.top=`${be}px`,n.updateHeight(he,ve.element.offsetHeight,{isOutput:!0}))}hide(){this.element.style.visibility="hidden"}updateContentAndRerender(he,be){this.outputElements.get(he)?.updateContentAndRender(be)}updateOutputHeight(he,be){this.outputElements.get(he)?.updateHeight(be)}updateScroll(he){this.element.style.top=`${he.cellTop}px`;const be=this.outputElements.get(he.outputId);be&&(be.updateScroll(he.outputOffset),he.forceDisplay&&be.outputNode&&(be.outputNode.element.style.visibility="")),he.forceDisplay&&(this.element.style.visibility="")}}class ce{get outputNode(){return this._outputNode}constructor(he){this.outputId=he,this.element=document.createElement("div"),this.element.classList.add("output_container"),this.element.setAttribute("data-vscode-context",JSON.stringify({preventDefaultContextMenuItems:!0})),this.element.style.position="absolute",this.element.style.overflow="hidden"}dispose(){this._outputNode?.dispose()}clear(he){he&&se.clearOutput(he,this.outputId),this.element.remove()}updateHeight(he){this.element.style.maxHeight=`${he}px`,this.element.style.height=`${he}px`}updateScroll(he){this.element.style.top=`${he}px`}createOutputElement(he,be,ve,Ie){return this.element.innerText="",this.element.style.maxHeight="0px",this.element.style.top=`${be}px`,this._outputNode?.dispose(),this._outputNode=new ue(he,ve,Ie),this.element.appendChild(this._outputNode.element),this._outputNode}updateContentAndRender(he){this._outputNode?.updateAndRerender(he)}}a.postMessage({__vscode_notebook_message:!0,type:"initialized"});for(const ge of b.staticPreloadsData)te.load(ge.entrypoint);function ae(ge,he){a.postMessage({__vscode_notebook_message:!0,type:ge,...he})}class ue{constructor(he,be,ve){this.outputId=he,this.cellId=ve,this.hasResizeObserver=!1,this.element=document.createElement("div"),this.element.id=he,this.element.classList.add("output"),this.element.style.position="absolute",this.element.style.top="0px",this.element.style.left=be+"px",this.element.style.padding=`${b.style.outputNodePadding}px ${b.style.outputNodePadding}px ${b.style.outputNodePadding}px ${b.style.outputNodeLeftPadding}`,this.element.addEventListener("mouseenter",()=>{ae("mouseenter",{id:he})}),this.element.addEventListener("mouseleave",()=>{ae("mouseleave",{id:he})})}dispose(){this.renderTaskAbort?.abort(),this.renderTaskAbort=void 0}async render(he,be,ve,Ie){if(this.renderTaskAbort?.abort(),this.renderTaskAbort=void 0,this._content={preferredRendererId:be,preloadErrors:ve},he.type===0){const Le=F?.createHTML(he.htmlContent)??he.htmlContent;this.element.innerHTML=Le}else if(ve.some(Le=>Le instanceof Error)){const Le=ve.filter(Pe=>Pe instanceof Error);R("Error loading preloads",this.element,Le)}else{const Le=P(this.outputId,he.output.mime,he.metadata,he.output.valueBytes,he.allOutputs,he.output.appended),Pe=new AbortController;this.renderTaskAbort=Pe,Ie?.addEventListener("abort",()=>Pe.abort());try{await se.render(Le,be,this.element,Pe.signal)}finally{this.renderTaskAbort===Pe&&(this.renderTaskAbort=void 0)}}this.hasResizeObserver||(this.hasResizeObserver=!0,g.observe(this.element,this.outputId,!0,this.cellId));const Se=this.element.offsetHeight,we=document.defaultView.getComputedStyle(this.element);Se!==0&&we.padding==="0px"?(n.updateHeight(this.outputId,Se+b.style.outputNodePadding*2,{isOutput:!0,init:!0}),this.element.style.padding=`${b.style.outputNodePadding}px ${b.style.outputNodePadding}px ${b.style.outputNodePadding}px ${b.style.outputNodeLeftPadding}`):n.updateHeight(this.outputId,this.element.offsetHeight,{isOutput:!0,init:!0});const ye=this.element.shadowRoot??this.element,Re=oe.requestHighlightCodeBlock(ye);Re.length>0&&ae("renderedCellOutput",{codeBlocks:Re})}updateAndRerender(he){this._content&&this.render(he,this._content.preferredRendererId,this._content.preloadErrors)}}const de=new class{constructor(){document.addEventListener("dragover",he=>{he.preventDefault()}),document.addEventListener("drop",he=>{he.preventDefault();const be=this.currentDrag;be&&(this.currentDrag=void 0,ae("cell-drop",{cellId:be.cellId,ctrlKey:he.ctrlKey,altKey:he.altKey,dragOffsetY:he.clientY}))})}startDrag(he,be){if(!he.dataTransfer||!f.dragAndDropEnabled)return;this.currentDrag={cellId:be,clientY:he.clientY};const ve=9999;this.dragOverlay||(this.dragOverlay=document.createElement("div"),this.dragOverlay.style.position="absolute",this.dragOverlay.style.top="0",this.dragOverlay.style.left="0",this.dragOverlay.style.zIndex=`${ve}`,this.dragOverlay.style.width="100%",this.dragOverlay.style.height="100%",this.dragOverlay.style.background="transparent",document.body.appendChild(this.dragOverlay)),he.target.style.zIndex=`${ve+1}`,he.target.classList.add("dragging"),ae("cell-drag-start",{cellId:be,dragOffsetY:he.clientY});const Ie=()=>{this.currentDrag?.cellId===be&&(ae("cell-drag",{cellId:be,dragOffsetY:this.currentDrag.clientY}),requestAnimationFrame(Ie))};requestAnimationFrame(Ie)}updateDrag(he,be){be!==this.currentDrag?.cellId?this.currentDrag=void 0:this.currentDrag={cellId:be,clientY:he.clientY}}endDrag(he,be){this.currentDrag=void 0,he.target.classList.remove("dragging"),ae("cell-drag-end",{cellId:be}),this.dragOverlay&&(document.body.removeChild(this.dragOverlay),this.dragOverlay=void 0),he.target.style.zIndex=""}}}function y(b,D,T,f,v,m,S){return` const __import = (x) => import(x); (${t})( JSON.parse(decodeURIComponent("${encodeURIComponent(JSON.stringify({style:b,options:D,renderOptions:T,rendererData:f,staticPreloadsData:v,isWorkspaceTrusted:m,nonce:S}))}")) ) //# sourceURL=notebookWebviewPreloads.js `}e.preloadsScriptStr=y}),define(Q[3560],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformWebviewThemeVars=void 0;const t=new Map([["theme-font-family","vscode-font-family"],["theme-font-weight","vscode-font-weight"],["theme-font-size","vscode-font-size"],["theme-code-font-family","vscode-editor-font-family"],["theme-code-font-weight","vscode-editor-font-weight"],["theme-code-font-size","vscode-editor-font-size"],["theme-scrollbar-background","vscode-scrollbarSlider-background"],["theme-scrollbar-hover-background","vscode-scrollbarSlider-hoverBackground"],["theme-scrollbar-active-background","vscode-scrollbarSlider-activeBackground"],["theme-quote-background","vscode-textBlockQuote-background"],["theme-quote-border","vscode-textBlockQuote-border"],["theme-code-foreground","vscode-textPreformat-foreground"],["theme-background","vscode-editor-background"],["theme-foreground","vscode-editor-foreground"],["theme-ui-foreground","vscode-foreground"],["theme-link","vscode-textLink-foreground"],["theme-link-active","vscode-textLink-activeForeground"],["theme-button-background","vscode-button-background"],["theme-button-hover-background","vscode-button-hoverBackground"],["theme-button-foreground","vscode-button-foreground"],["theme-button-secondary-background","vscode-button-secondaryBackground"],["theme-button-secondary-hover-background","vscode-button-secondaryHoverBackground"],["theme-button-secondary-foreground","vscode-button-secondaryForeground"],["theme-button-hover-foreground","vscode-button-foreground"],["theme-button-focus-foreground","vscode-button-foreground"],["theme-button-secondary-hover-foreground","vscode-button-secondaryForeground"],["theme-button-secondary-focus-foreground","vscode-button-secondaryForeground"],["theme-input-background","vscode-input-background"],["theme-input-foreground","vscode-input-foreground"],["theme-input-placeholder-foreground","vscode-input-placeholderForeground"],["theme-input-focus-border-color","vscode-focusBorder"],["theme-menu-background","vscode-menu-background"],["theme-menu-foreground","vscode-menu-foreground"],["theme-menu-hover-background","vscode-menu-selectionBackground"],["theme-menu-focus-background","vscode-menu-selectionBackground"],["theme-menu-hover-foreground","vscode-menu-selectionForeground"],["theme-menu-focus-foreground","vscode-menu-selectionForeground"],["theme-error-background","vscode-inputValidation-errorBackground"],["theme-error-foreground","vscode-foreground"],["theme-warning-background","vscode-inputValidation-warningBackground"],["theme-warning-foreground","vscode-foreground"],["theme-info-background","vscode-inputValidation-infoBackground"],["theme-info-foreground","vscode-foreground"],["theme-notebook-output-background","vscode-notebook-outputContainerBackgroundColor"],["theme-notebook-output-border","vscode-notebook-outputContainerBorderColor"],["theme-notebook-cell-selected-background","vscode-notebook-selectedCellBackground"],["theme-notebook-symbol-highlight-background","vscode-notebook-symbolHighlightBackground"],["theme-notebook-diff-removed-background","vscode-diffEditor-removedTextBackground"],["theme-notebook-diff-inserted-background","vscode-diffEditor-insertedTextBackground"]]),y={"theme-input-border-width":"1px","theme-button-primary-hover-shadow":"none","theme-button-secondary-hover-shadow":"none","theme-input-border-color":"transparent"},b=D=>{const T={...D,...y};for(const[f,v]of t)T[f]=D[v];return T};e.transformWebviewThemeVars=b}),define(Q[3561],Y([1,0,6,4,42]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseCellEditorOptions=void 0;class D extends y.Disposable{static{this.fixedEditorOptions={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},renderLineHighlightOnlyWhenFocus:!0,overviewRulerLanes:0,lineDecorationsWidth:0,folding:!0,fixedOverflowWidgets:!0,minimap:{enabled:!1},renderValidationDecorations:"on",lineNumbersMinChars:3}}get value(){return this._value}constructor(f,v,m,S){super(),this.notebookEditor=f,this.notebookOptions=v,this.configurationService=m,this.language=S,this._localDisposableStore=this._register(new y.DisposableStore),this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._register(m.onDidChangeConfiguration(h=>{(h.affectsConfiguration("editor")||h.affectsConfiguration("notebook"))&&this._recomputeOptions()})),this._register(v.onDidChangeOptions(h=>{(h.cellStatusBarVisibility||h.editorTopPadding||h.editorOptionsCustomizations)&&this._recomputeOptions()})),this._register(this.notebookEditor.onDidChangeModel(()=>{this._localDisposableStore.clear(),this.notebookEditor.hasModel()&&(this._localDisposableStore.add(this.notebookEditor.onDidChangeOptions(()=>{this._recomputeOptions()})),this._recomputeOptions())})),this.notebookEditor.hasModel()&&this._localDisposableStore.add(this.notebookEditor.onDidChangeOptions(()=>{this._recomputeOptions()})),this._value=this._computeEditorOptions()}_recomputeOptions(){this._value=this._computeEditorOptions(),this._onDidChange.fire()}_computeEditorOptions(){const f=(0,b.deepClone)(this.configurationService.getValue("editor",{overrideIdentifier:this.language})),m=this.notebookOptions.getLayoutConfiguration().editorOptionsCustomizations??{},S={};for(const a in m)a.indexOf("editor.")===0&&(S[a.substring(7)]=m[a]);return Object.freeze({...f,...D.fixedEditorOptions,...S,padding:{top:12,bottom:12},readOnly:this.notebookEditor.isReadOnly})}}e.BaseCellEditorOptions=D}),define(Q[3562],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellSelectionCollection=void 0;function b(T,f){if(T.length!==f.length)return!1;for(let v=0;v<T.length;v++)if(T[v].start!==f[v].start||T[v].end!==f[v].end)return!1;return!0}class D extends y.Disposable{constructor(){super(...arguments),this._onDidChangeSelection=this._register(new t.Emitter),this._primary=null,this._selections=[]}get onDidChangeSelection(){return this._onDidChangeSelection.event}get selections(){return this._selections}get focus(){return this._primary??{start:0,end:0}}setState(f,v,m,S){const h=f!==this._primary||!b(this._selections,v);this._primary=f,this._selections=v,(h||m)&&this._onDidChangeSelection.fire(S)}setSelections(f,v,m){this.setState(this._primary,f,v,m)}}e.NotebookCellSelectionCollection=D}),define(Q[3563],Y([1,0,6,4,730]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEventDispatcher=void 0;class D extends y.Disposable{constructor(){super(...arguments),this._onDidChangeLayout=this._register(new t.Emitter),this.onDidChangeLayout=this._onDidChangeLayout.event,this._onDidChangeMetadata=this._register(new t.Emitter),this.onDidChangeMetadata=this._onDidChangeMetadata.event,this._onDidChangeCellState=this._register(new t.Emitter),this.onDidChangeCellState=this._onDidChangeCellState.event}emit(f){for(let v=0,m=f.length;v<m;v++){const S=f[v];switch(S.type){case b.NotebookViewEventType.LayoutChanged:this._onDidChangeLayout.fire(S);break;case b.NotebookViewEventType.MetadataChanged:this._onDidChangeMetadata.fire(S);break;case b.NotebookViewEventType.CellStateChanged:this._onDidChangeCellState.fire(S);break}}}}e.NotebookEventDispatcher=D}),define(Q[3564],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=void 0;class t{constructor(b,D,T){this.notebookOptions=b,this.eventDispatcher=D,this.getBaseCellEditorOptions=T}}e.ViewContext=t}),define(Q[3565],Y([1,0,7,4,221,13,29,5,610]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListTopCellToolbar=void 0;let m=class extends y.Disposable{constructor(h,a,r,i,s,o){super(),this.notebookEditor=h,this.instantiationService=i,this.contextMenuService=s,this.menuService=o,this._modelDisposables=this._register(new y.DisposableStore),this.topCellToolbar=t.append(r,t.$(".cell-list-top-cell-toolbar-container")),this.toolbar=this._register(i.createInstance(b.MenuWorkbenchToolBar,this.topCellToolbar,this.notebookEditor.creationOptions.menuIds.cellTopInsertToolbar,{actionViewItemProvider:u=>{if(u instanceof D.MenuItemAction)return this.instantiationService.createInstance(v.CodiconActionViewItem,u,void 0)},menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:u=>/^inline/.test(u)},hiddenItemStrategy:0})),this.toolbar.context={notebookEditor:h},this._register(this.notebookEditor.onDidChangeModel(()=>{this._modelDisposables.clear(),this.notebookEditor.hasModel()&&(this._modelDisposables.add(this.notebookEditor.onDidChangeViewCells(()=>{this.updateClass()})),this.updateClass())})),this.updateClass()}updateClass(){this.notebookEditor.hasModel()&&this.notebookEditor.getLength()===0?this.topCellToolbar.classList.add("emptyNotebook"):this.topCellToolbar.classList.remove("emptyNotebook")}};e.ListTopCellToolbar=m,e.ListTopCellToolbar=m=fe([O(3,f.IInstantiationService),O(4,T.IContextMenuService),O(5,D.IMenuService)],m)}),define(Q[3566],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellMetadataEdit=e.SpliceCellsEdit=e.MoveCellEdit=void 0;class t{constructor(T,f,v,m,S,h,a){this.resource=T,this.fromIndex=f,this.length=v,this.toIndex=m,this.editingDelegate=S,this.beforedSelections=h,this.endSelections=a,this.type=0,this.label="Move Cell",this.code="undoredo.notebooks.moveCell"}undo(){if(!this.editingDelegate.moveCell)throw new Error("Notebook Move Cell not implemented for Undo/Redo");this.editingDelegate.moveCell(this.toIndex,this.length,this.fromIndex,this.endSelections,this.beforedSelections)}redo(){if(!this.editingDelegate.moveCell)throw new Error("Notebook Move Cell not implemented for Undo/Redo");this.editingDelegate.moveCell(this.fromIndex,this.length,this.toIndex,this.beforedSelections,this.endSelections)}}e.MoveCellEdit=t;class y{constructor(T,f,v,m,S){this.resource=T,this.diffs=f,this.editingDelegate=v,this.beforeHandles=m,this.endHandles=S,this.type=0,this.label="Insert Cell",this.code="undoredo.notebooks.insertCell"}undo(){if(!this.editingDelegate.replaceCell)throw new Error("Notebook Replace Cell not implemented for Undo/Redo");this.diffs.forEach(T=>{this.editingDelegate.replaceCell(T[0],T[2].length,T[1],this.beforeHandles)})}redo(){if(!this.editingDelegate.replaceCell)throw new Error("Notebook Replace Cell not implemented for Undo/Redo");this.diffs.reverse().forEach(T=>{this.editingDelegate.replaceCell(T[0],T[1].length,T[2],this.endHandles)})}}e.SpliceCellsEdit=y;class b{constructor(T,f,v,m,S){this.resource=T,this.index=f,this.oldMetadata=v,this.newMetadata=m,this.editingDelegate=S,this.type=0,this.label="Update Cell Metadata",this.code="undoredo.notebooks.updateCellMetadata"}undo(){this.editingDelegate.updateCellMetadata&&this.editingDelegate.updateCellMetadata(this.index,this.oldMetadata)}redo(){this.editingDelegate.updateCellMetadata&&this.editingDelegate.updateCellMetadata(this.index,this.newMetadata)}}e.CellMetadataEdit=b}),define(Q[731],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookCellStatusBarService=void 0,e.INotebookCellStatusBarService=(0,t.createDecorator)("notebookCellStatusBarService")}),define(Q[71],Y([1,0,62,195,83,197,22,55,18,8]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MOVE_CURSOR_1_LINE_COMMAND=e.compressOutputItemStreams=e.isTextStreamMime=e.NotebookWorkingCopyTypeIdentifier=e.CellStatusbarAlignment=e.NotebookSetting=e.notebookDocumentFilterMatch=e.isDocumentExcludePattern=e.NotebookEditorPriority=e.NOTEBOOK_EDITOR_CURSOR_LINE_BOUNDARY=e.NOTEBOOK_EDITOR_CURSOR_BOUNDARY=e.diff=e.MimeTypeDisplayOrder=e.CellUri=e.CellEditType=e.SelectionStateType=e.NotebookCellsChangeType=e.RendererMessagingSpec=e.NotebookRendererMatch=e.NotebookExecutionState=e.NotebookCellExecutionState=e.NotebookRunState=e.RENDERER_NOT_AVAILABLE=e.RENDERER_EQUIVALENT_EXTENSIONS=e.ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER=e.NOTEBOOK_DISPLAY_ORDER=e.CellKind=e.INTERACTIVE_WINDOW_EDITOR_ID=e.NOTEBOOK_DIFF_EDITOR_ID=e.NOTEBOOK_EDITOR_ID=void 0,e.NOTEBOOK_EDITOR_ID="workbench.editor.notebook",e.NOTEBOOK_DIFF_EDITOR_ID="workbench.editor.notebookTextDiffEditor",e.INTERACTIVE_WINDOW_EDITOR_ID="workbench.editor.interactive";var S;(function(W){W[W.Markup=1]="Markup",W[W.Code=2]="Code"})(S||(e.CellKind=S={})),e.NOTEBOOK_DISPLAY_ORDER=["application/json","application/javascript","text/html","image/svg+xml",D.Mimes.latex,D.Mimes.markdown,"image/png","image/jpeg",D.Mimes.text],e.ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER=[D.Mimes.latex,D.Mimes.markdown,"application/json","text/html","image/svg+xml","image/png","image/jpeg",D.Mimes.text],e.RENDERER_EQUIVALENT_EXTENSIONS=new Map([["ms-toolsai.jupyter",new Set(["jupyter-notebook","interactive"])],["ms-toolsai.jupyter-renderers",new Set(["jupyter-notebook","interactive"])]]),e.RENDERER_NOT_AVAILABLE="_notAvailable";var h;(function(W){W[W.Running=1]="Running",W[W.Idle=2]="Idle"})(h||(e.NotebookRunState=h={}));var a;(function(W){W[W.Unconfirmed=1]="Unconfirmed",W[W.Pending=2]="Pending",W[W.Executing=3]="Executing"})(a||(e.NotebookCellExecutionState=a={}));var r;(function(W){W[W.Unconfirmed=1]="Unconfirmed",W[W.Pending=2]="Pending",W[W.Executing=3]="Executing"})(r||(e.NotebookExecutionState=r={}));var i;(function(W){W[W.WithHardKernelDependency=0]="WithHardKernelDependency",W[W.WithOptionalKernelDependency=1]="WithOptionalKernelDependency",W[W.Pure=2]="Pure",W[W.Never=3]="Never"})(i||(e.NotebookRendererMatch=i={}));var s;(function(W){W.Always="always",W.Never="never",W.Optional="optional"})(s||(e.RendererMessagingSpec=s={}));var o;(function(W){W[W.ModelChange=1]="ModelChange",W[W.Move=2]="Move",W[W.ChangeCellLanguage=5]="ChangeCellLanguage",W[W.Initialize=6]="Initialize",W[W.ChangeCellMetadata=7]="ChangeCellMetadata",W[W.Output=8]="Output",W[W.OutputItem=9]="OutputItem",W[W.ChangeCellContent=10]="ChangeCellContent",W[W.ChangeDocumentMetadata=11]="ChangeDocumentMetadata",W[W.ChangeCellInternalMetadata=12]="ChangeCellInternalMetadata",W[W.ChangeCellMime=13]="ChangeCellMime",W[W.Unknown=100]="Unknown"})(o||(e.NotebookCellsChangeType=o={}));var u;(function(W){W[W.Handle=0]="Handle",W[W.Index=1]="Index"})(u||(e.SelectionStateType=u={}));var d;(function(W){W[W.Replace=1]="Replace",W[W.Output=2]="Output",W[W.Metadata=3]="Metadata",W[W.CellLanguage=4]="CellLanguage",W[W.DocumentMetadata=5]="DocumentMetadata",W[W.Move=6]="Move",W[W.OutputItems=7]="OutputItems",W[W.PartialMetadata=8]="PartialMetadata",W[W.PartialInternalMetadata=9]="PartialInternalMetadata"})(d||(e.CellEditType=d={}));var p;(function(W){W.scheme=T.Schemas.vscodeNotebookCell;const z=["W","X","Y","Z","a","b","c","d","e","f"],B=new RegExp(`^[${z.join("")}]+`),K=7;function H(j,ee){const X=ee.toString(K),Z=`${X.length<z.length?z[X.length-1]:"z"}${X}s${(0,t.encodeBase64)(t.VSBuffer.fromString(j.scheme),!0,!0)}`;return j.with({scheme:W.scheme,fragment:Z})}W.generate=H;function U(j){if(j.scheme!==W.scheme)return;const ee=j.fragment.indexOf("s");if(ee<0)return;const X=parseInt(j.fragment.substring(0,ee).replace(B,""),K),te=(0,t.decodeBase64)(j.fragment.substring(ee+1)).toString();if(!isNaN(X))return{handle:X,notebook:j.with({scheme:te,fragment:null})}}W.parse=U;function G(j,ee){return j.with({scheme:T.Schemas.vscodeNotebookCellOutput,fragment:`op${ee??""},${j.scheme!==T.Schemas.file?j.scheme:""}`})}W.generateCellOutputUri=G;function $(j){if(j.scheme!==T.Schemas.vscodeNotebookCellOutput)return;const ee=/^op([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?\,(.*)$/i.exec(j.fragment);if(!ee)return;const X=ee[1]&&ee[1]!==""?ee[1]:void 0,te=ee[2];return{outputId:X,notebook:j.with({scheme:te||T.Schemas.file,fragment:null})}}W.parseCellOutputUri=$;function ie(j,ee,X){return W.generate(j,ee).with({scheme:X})}W.generateCellPropertyUri=ie;function J(j,ee){if(j.scheme===ee)return W.parse(j.with({scheme:W.scheme}))}W.parseCellPropertyUri=J})(p||(e.CellUri=p={}));const c=W=>v.isWindows?W.replace(/\//g,"\\"):W;class l{constructor(z=[],B=e.NOTEBOOK_DISPLAY_ORDER){this.defaultOrder=B,this.order=[...new Set(z)].map(K=>({pattern:K,matches:y.parse(c(K))}))}sort(z){const B=new Map(b.Iterable.map(z,H=>[H,c(H)]));let K=[];for(const{matches:H}of this.order)for(const[U,G]of B)if(H(G)){K.push(U),B.delete(U);break}return B.size&&(K=K.concat([...B.keys()].sort((H,U)=>this.defaultOrder.indexOf(H)-this.defaultOrder.indexOf(U)))),K}prioritize(z,B){const K=this.findIndex(z);if(K===-1){this.order.unshift({pattern:z,matches:y.parse(c(z))});return}const H=new Set(B.map(G=>this.findIndex(G,K)));H.delete(-1);const U=Array.from(H).sort();this.order.splice(K+1,0,...U.map(G=>this.order[G]));for(let G=U.length-1;G>=0;G--)this.order.splice(U[G],1)}toArray(){return this.order.map(z=>z.pattern)}findIndex(z,B=this.order.length){const K=c(z);for(let H=0;H<B;H++)if(this.order[H].matches(K))return H;return-1}}e.MimeTypeDisplayOrder=l;function n(W,z,B,K=(H,U)=>H===U){const H=[];function U(ie,J,j){if(J===0&&j.length===0)return;const ee=H[H.length-1];ee&&ee.start+ee.deleteCount===ie?(ee.deleteCount+=J,ee.toInsert.push(...j)):H.push({start:ie,deleteCount:J,toInsert:j})}let G=0,$=0;for(;;){if(G===W.length){U(G,0,z.slice($));break}if($===z.length){U(G,W.length-G,[]);break}const ie=W[G],J=z[$];if(K(ie,J)){G+=1,$+=1;continue}B(J)?(U(G,1,[]),G+=1):(U(G,0,[J]),$+=1)}return H}e.diff=n,e.NOTEBOOK_EDITOR_CURSOR_BOUNDARY=new m.RawContextKey("notebookEditorCursorAtBoundary","none"),e.NOTEBOOK_EDITOR_CURSOR_LINE_BOUNDARY=new m.RawContextKey("notebookEditorCursorAtLineBoundary","none");var g;(function(W){W.default="default",W.option="option"})(g||(e.NotebookEditorPriority=g={}));function w(W){const z=W;return!!((typeof z.include=="string"||y.isRelativePattern(z.include))&&(typeof z.exclude=="string"||y.isRelativePattern(z.exclude)))}e.isDocumentExcludePattern=w;function E(W,z,B){if(Array.isArray(W.viewType)&&W.viewType.indexOf(z)>=0||W.viewType===z)return!0;if(W.filenamePattern){const K=w(W.filenamePattern)?W.filenamePattern.include:W.filenamePattern,H=w(W.filenamePattern)?W.filenamePattern.exclude:void 0;if(y.match(K,(0,f.basename)(B.fsPath).toLowerCase()))return!(H&&y.match(H,(0,f.basename)(B.fsPath).toLowerCase()))}return!1}e.notebookDocumentFilterMatch=E,e.NotebookSetting={displayOrder:"notebook.displayOrder",cellToolbarLocation:"notebook.cellToolbarLocation",cellToolbarVisibility:"notebook.cellToolbarVisibility",showCellStatusBar:"notebook.showCellStatusBar",textDiffEditorPreview:"notebook.diff.enablePreview",diffOverviewRuler:"notebook.diff.overviewRuler",experimentalInsertToolbarAlignment:"notebook.experimental.insertToolbarAlignment",compactView:"notebook.compactView",focusIndicator:"notebook.cellFocusIndicator",insertToolbarLocation:"notebook.insertToolbarLocation",globalToolbar:"notebook.globalToolbar",stickyScroll:"notebook.stickyScroll.enabled",undoRedoPerCell:"notebook.undoRedoPerCell",consolidatedOutputButton:"notebook.consolidatedOutputButton",showFoldingControls:"notebook.showFoldingControls",dragAndDropEnabled:"notebook.dragAndDropEnabled",cellEditorOptionsCustomizations:"notebook.editorOptionsCustomizations",consolidatedRunButton:"notebook.consolidatedRunButton",openGettingStarted:"notebook.experimental.openGettingStarted",globalToolbarShowLabel:"notebook.globalToolbarShowLabel",markupFontSize:"notebook.markup.fontSize",interactiveWindowCollapseCodeCells:"interactiveWindow.collapseCellInputCode",outputScrollingDeprecated:"notebook.experimental.outputScrolling",outputScrolling:"notebook.output.scrolling",textOutputLineLimit:"notebook.output.textLineLimit",formatOnSave:"notebook.formatOnSave.enabled",formatOnCellExecution:"notebook.formatOnCellExecution",codeActionsOnSave:"notebook.codeActionsOnSave",outputWordWrap:"notebook.output.wordWrap",outputLineHeightDeprecated:"notebook.outputLineHeight",outputLineHeight:"notebook.output.lineHeight",outputFontSizeDeprecated:"notebook.outputFontSize",outputFontSize:"notebook.output.fontSize",outputFontFamilyDeprecated:"notebook.outputFontFamily",outputFontFamily:"notebook.output.fontFamily",findScope:"notebook.find.scope",logging:"notebook.logging",confirmDeleteRunningCell:"notebook.confirmDeleteRunningCell",remoteSaving:"notebook.experimental.remoteSave"};var C;(function(W){W[W.Left=1]="Left",W[W.Right=2]="Right"})(C||(e.CellStatusbarAlignment=C={}));class I{static{this._prefix="notebook/"}static create(z){return`${I._prefix}${z}`}static parse(z){if(z.startsWith(I._prefix))return z.substring(I._prefix.length)}}e.NotebookWorkingCopyTypeIdentifier=I;function _(W){return["application/vnd.code.notebook.stdout","application/vnd.code.notebook.stderr"].includes(W)}e.isTextStreamMime=_;const A=new TextDecoder;function k(W){const z=[];let B=!1;for(const G of W)(z.length===0||B)&&(z.push(G),B=!0);let K=M(z);const H=t.VSBuffer.concat(z.map(G=>t.VSBuffer.wrap(G))),U=V(H);return K=K||U.byteLength!==H.byteLength,{data:U,didCompression:K}}e.compressOutputItemStreams=k,e.MOVE_CURSOR_1_LINE_COMMAND=`${String.fromCharCode(27)}[A`;const L=e.MOVE_CURSOR_1_LINE_COMMAND.split("").map(W=>W.charCodeAt(0)),R=10;function M(W){let z=!1;return W.forEach((B,K)=>{if(K===0||B.length<e.MOVE_CURSOR_1_LINE_COMMAND.length)return;const H=W[K-1],U=B.subarray(0,e.MOVE_CURSOR_1_LINE_COMMAND.length);if(U[0]===L[0]&&U[1]===L[1]&&U[2]===L[2]){const G=H.lastIndexOf(R);if(G===-1)return;z=!0,W[K-1]=H.subarray(0,G),W[K]=B.subarray(e.MOVE_CURSOR_1_LINE_COMMAND.length)}}),z}function N(W){let z=W;do W=z,z=W.replace(/[^\n]\x08/gm,"");while(z.length<W.length);return W}function P(W){for(W=W.replace(/\r+\n/gm,` `);W.search(/\r[^$]/g)>-1;){const z=W.match(/^(.*)\r+/m)[1];let B=W.match(/\r+(.*)$/m)[1];B=B+z.slice(B.length,z.length),W=W.replace(/\r+.*$/m,"\r").replace(/^.*\r/m,B)}return W}const x="\b".charCodeAt(0),F="\r".charCodeAt(0);function V(W){return!W.buffer.includes(x)&&!W.buffer.includes(F)?W:t.VSBuffer.fromString(P(N(A.decode(W.buffer))))}}),define(Q[732],Y([1,0,20,15,110,69,197,33,17,10,59,112,25,181,71]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";var s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R;Object.defineProperty(e,"__esModule",{value:!0}),e.RelatedInformationType=e.ChatMessage=e.ChatVariableLevel=e.ChatMessageRole=e.InteractiveEditorResponseFeedbackKind=e.InteractiveSessionCopyKind=e.InteractiveSessionVoteDirection=e.InteractiveWindowInput=e.TerminalEditorTabInput=e.NotebookDiffEditorTabInput=e.NotebookEditorTabInput=e.WebviewEditorTabInput=e.CustomEditorTabInput=e.TextMergeTabInput=e.TextDiffTabInput=e.TextTabInput=e.TypeHierarchyItem=e.PortAutoForwardAction=e.WorkspaceTrustState=e.ExternalUriOpenerPriority=e.FunctionCoverage=e.BranchCoverage=e.StatementCoverage=e.FileCoverage=e.CoveredCount=e.TestTag=e.TestMessage=e.TestRunRequest=e.TestRunProfileKind=e.TestResultState=e.PortAttributes=e.LinkedEditingRanges=e.StandardTokenType=e.ExtensionRuntime=e.ExtensionMode=e.TimelineItem=e.NotebookKernelSourceAction=e.NotebookRendererScript=e.NotebookControllerAffinity2=e.NotebookControllerAffinity=e.NotebookCellStatusBarItem=e.NotebookEditorRevealType=e.NotebookCellStatusBarAlignment=e.NotebookCellExecutionState=e.NotebookCellKind=e.NotebookCellOutput=e.NotebookCellOutputItem=e.NotebookData=e.NotebookCellData=e.NotebookRange=e.ColorThemeKind=e.ColorTheme=e.FileDecoration=e.ExtensionKind=e.InputBoxValidationSeverity=e.QuickPickItemKind=e.QuickInputButtons=e.DebugConsoleMode=e.SemanticTokensEdits=e.SemanticTokensEdit=e.SemanticTokens=e.SemanticTokensBuilder=e.SemanticTokensLegend=e.CommentThreadState=e.CommentState=e.CommentMode=e.CommentThreadCollapsibleState=e.FoldingRangeKind=e.FoldingRange=e.FileSystemError=e.FileChangeType=e.InlineValueContext=e.InlineValueEvaluatableExpression=e.InlineValueVariableLookup=e.InlineValueText=e.InlineCompletionTriggerKind=e.EvaluatableExpression=e.ThreadFocus=e.StackFrameFocus=e.DebugAdapterInlineImplementation=e.DebugAdapterNamedPipeServer=e.DebugAdapterServer=e.DebugAdapterExecutable=e.DataBreakpoint=e.FunctionBreakpoint=e.SourceBreakpoint=e.Breakpoint=e.setBreakpointId=e.RelativePattern=e.ConfigurationTarget=e.ThemeColor=e.ThemeIcon=e.DocumentPasteEdit=e.DocumentDropEdit=e.DataTransfer=e.DataTransferFile=e.InternalFileDataTransferItem=e.InternalDataTransferItem=e.DataTransferItem=e.TreeItemCheckboxState=e.TreeItemCollapsibleState=e.TreeItem=e.ViewBadge=e.ProgressLocation=e.Task=e.CustomExecution=e.TaskScope=e.ShellQuoting=e.ShellExecution=e.ProcessExecution=e.TaskGroup=e.TaskPanelKind=e.TaskRevealKind=e.TerminalProfile=e.TerminalLocation=e.TerminalQuickFixCommand=e.TerminalQuickFixOpener=e.TerminalLink=e.TerminalExitReason=e.SourceControlInputBoxValidationType=e.ColorFormat=e.ColorPresentation=e.ColorInformation=e.Color=e.DocumentLink=e.DecorationRangeBehavior=e.TextDocumentChangeReason=e.TextEditorSelectionChangeKind=e.TextEditorRevealType=e.TextDocumentSaveReason=e.TextEditorLineNumbersStyle=e.asStatusBarItemIdentifier=e.StatusBarAlignment=e.ViewColumn=e.InlineSuggestionList=e.InlineSuggestion=e.CompletionList=e.CompletionItem=e.CompletionItemTag=e.CompletionItemKind=e.CompletionTriggerKind=e.InlayHint=e.InlayHintLabelPart=e.InlayHintKind=e.SignatureHelpTriggerKind=e.SignatureHelp=e.SignatureInformation=e.ParameterInformation=e.MarkdownString=e.CodeLens=e.LanguageStatusSeverity=e.CallHierarchyOutgoingCall=e.CallHierarchyIncomingCall=e.CallHierarchyItem=e.SelectionRange=e.NotebookCodeActionKind=e.CodeActionKind=e.CodeAction=e.CodeActionTriggerKind=e.DocumentSymbol=e.SymbolInformation=e.SymbolTag=e.SymbolKind=e.DocumentHighlight=e.DocumentHighlightKind=e.Hover=e.Diagnostic=e.DiagnosticRelatedInformation=e.Location=e.DiagnosticSeverity=e.DiagnosticTag=e.SnippetString=e.WorkspaceEdit=e.FileEditType=e.SnippetTextEdit=e.NotebookEdit=e.TextEdit=e.EnvironmentVariableMutatorType=e.EndOfLine=e.RemoteAuthorityResolverError=e.ManagedResolvedAuthority=e.ResolvedAuthority=e.Selection=e.Range=e.Position=e.Disposable=e.TerminalQuickFixType=e.TerminalOutputAnchor=void 0;function M(Ue){return Object.assign(Ue,{apply:function(){const rt=arguments.length===1?[]:arguments[1];return Reflect.construct(Ue,rt,arguments[0].constructor)},call:function(){if(arguments.length===0)return Reflect.construct(Ue,[]);{const[rt,...St]=arguments;return Reflect.construct(Ue,St,rt.constructor)}}})}var N;(function(Ue){Ue[Ue.Top=0]="Top",Ue[Ue.Bottom=1]="Bottom"})(N||(e.TerminalOutputAnchor=N={}));var P;(function(Ue){Ue[Ue.TerminalCommand=0]="TerminalCommand",Ue[Ue.Opener=1]="Opener",Ue[Ue.Command=3]="Command"})(P||(e.TerminalQuickFixType=P={}));let x=s=class{static from(...We){let rt=We;return new s(function(){if(rt){for(const St of rt)St&&typeof St.dispose=="function"&&St.dispose();rt=void 0}})}#e;constructor(We){this.#e=We}dispose(){typeof this.#e=="function"&&(this.#e(),this.#e=void 0)}};e.Disposable=x,e.Disposable=x=s=fe([M],x);let F=o=class{static Min(...We){if(We.length===0)throw new TypeError;let rt=We[0];for(let St=1;St<We.length;St++){const Ut=We[St];Ut.isBefore(rt)&&(rt=Ut)}return rt}static Max(...We){if(We.length===0)throw new TypeError;let rt=We[0];for(let St=1;St<We.length;St++){const Ut=We[St];Ut.isAfter(rt)&&(rt=Ut)}return rt}static isPosition(We){if(!We)return!1;if(We instanceof o)return!0;const{line:rt,character:St}=We;return typeof rt=="number"&&typeof St=="number"}static of(We){if(We instanceof o)return We;if(this.isPosition(We))return new o(We.line,We.character);throw new Error("Invalid argument, is NOT a position-like object")}get line(){return this._line}get character(){return this._character}constructor(We,rt){if(We<0)throw(0,y.illegalArgument)("line must be non-negative");if(rt<0)throw(0,y.illegalArgument)("character must be non-negative");this._line=We,this._character=rt}isBefore(We){return this._line<We._line?!0:We._line<this._line?!1:this._character<We._character}isBeforeOrEqual(We){return this._line<We._line?!0:We._line<this._line?!1:this._character<=We._character}isAfter(We){return!this.isBeforeOrEqual(We)}isAfterOrEqual(We){return!this.isBefore(We)}isEqual(We){return this._line===We._line&&this._character===We._character}compareTo(We){return this._line<We._line?-1:this._line>We.line?1:this._character<We._character?-1:this._character>We._character?1:0}translate(We,rt=0){if(We===null||rt===null)throw(0,y.illegalArgument)();let St;return typeof We>"u"?St=0:typeof We=="number"?St=We:(St=typeof We.lineDelta=="number"?We.lineDelta:0,rt=typeof We.characterDelta=="number"?We.characterDelta:0),St===0&&rt===0?this:new o(this.line+St,this.character+rt)}with(We,rt=this.character){if(We===null||rt===null)throw(0,y.illegalArgument)();let St;return typeof We>"u"?St=this.line:typeof We=="number"?St=We:(St=typeof We.line=="number"?We.line:this.line,rt=typeof We.character=="number"?We.character:this.character),St===this.line&&rt===this.character?this:new o(St,rt)}toJSON(){return{line:this.line,character:this.character}}};e.Position=F,e.Position=F=o=fe([M],F);let V=u=class{static isRange(We){return We instanceof u?!0:We?F.isPosition(We.start)&&F.isPosition(We.end):!1}static of(We){if(We instanceof u)return We;if(this.isRange(We))return new u(We.start,We.end);throw new Error("Invalid argument, is NOT a range-like object")}get start(){return this._start}get end(){return this._end}constructor(We,rt,St,Ut){let Jt,si;if(typeof We=="number"&&typeof rt=="number"&&typeof St=="number"&&typeof Ut=="number"?(Jt=new F(We,rt),si=new F(St,Ut)):F.isPosition(We)&&F.isPosition(rt)&&(Jt=F.of(We),si=F.of(rt)),!Jt||!si)throw new Error("Invalid arguments");Jt.isBefore(si)?(this._start=Jt,this._end=si):(this._start=si,this._end=Jt)}contains(We){return u.isRange(We)?this.contains(We.start)&&this.contains(We.end):F.isPosition(We)?!(F.of(We).isBefore(this._start)||this._end.isBefore(We)):!1}isEqual(We){return this._start.isEqual(We._start)&&this._end.isEqual(We._end)}intersection(We){const rt=F.Max(We.start,this._start),St=F.Min(We.end,this._end);if(!rt.isAfter(St))return new u(rt,St)}union(We){if(this.contains(We))return this;if(We.contains(this))return We;const rt=F.Min(We.start,this._start),St=F.Max(We.end,this.end);return new u(rt,St)}get isEmpty(){return this._start.isEqual(this._end)}get isSingleLine(){return this._start.line===this._end.line}with(We,rt=this.end){if(We===null||rt===null)throw(0,y.illegalArgument)();let St;return We?F.isPosition(We)?St=We:(St=We.start||this.start,rt=We.end||this.end):St=this.start,St.isEqual(this._start)&&rt.isEqual(this.end)?this:new u(St,rt)}toJSON(){return[this.start,this.end]}};e.Range=V,e.Range=V=u=fe([M],V);let W=d=class extends V{static isSelection(We){return We instanceof d?!0:We?V.isRange(We)&&F.isPosition(We.anchor)&&F.isPosition(We.active)&&typeof We.isReversed=="boolean":!1}get anchor(){return this._anchor}get active(){return this._active}constructor(We,rt,St,Ut){let Jt,si;if(typeof We=="number"&&typeof rt=="number"&&typeof St=="number"&&typeof Ut=="number"?(Jt=new F(We,rt),si=new F(St,Ut)):F.isPosition(We)&&F.isPosition(rt)&&(Jt=F.of(We),si=F.of(rt)),!Jt||!si)throw new Error("Invalid arguments");super(Jt,si),this._anchor=Jt,this._active=si}get isReversed(){return this._anchor===this._end}toJSON(){return{start:this.start,end:this.end,active:this.active,anchor:this.anchor}}};e.Selection=W,e.Selection=W=d=fe([M],W);const z=Ue=>{if(typeof Ue!="string"||Ue.length===0||!/^[0-9A-Za-z_\-]+$/.test(Ue))throw(0,y.illegalArgument)("connectionToken")};class B{static isResolvedAuthority(We){return We&&typeof We=="object"&&typeof We.host=="string"&&typeof We.port=="number"&&(We.connectionToken===void 0||typeof We.connectionToken=="string")}constructor(We,rt,St){if(typeof We!="string"||We.length===0)throw(0,y.illegalArgument)("host");if(typeof rt!="number"||rt===0||Math.round(rt)!==rt)throw(0,y.illegalArgument)("port");typeof St<"u"&&z(St),this.host=We,this.port=Math.round(rt),this.connectionToken=St}}e.ResolvedAuthority=B;class K{static isManagedResolvedAuthority(We){return We&&typeof We=="object"&&typeof We.makeConnection=="function"&&(We.connectionToken===void 0||typeof We.connectionToken=="string")}constructor(We,rt){this.makeConnection=We,this.connectionToken=rt,typeof rt<"u"&&z(rt)}}e.ManagedResolvedAuthority=K;class H extends Error{static NotAvailable(We,rt){return new H(We,r.RemoteAuthorityResolverErrorCode.NotAvailable,rt)}static TemporarilyNotAvailable(We){return new H(We,r.RemoteAuthorityResolverErrorCode.TemporarilyNotAvailable)}constructor(We,rt=r.RemoteAuthorityResolverErrorCode.Unknown,St){super(We),this._message=We,this._code=rt,this._detail=St,Object.setPrototypeOf(this,H.prototype)}}e.RemoteAuthorityResolverError=H;var U;(function(Ue){Ue[Ue.LF=1]="LF",Ue[Ue.CRLF=2]="CRLF"})(U||(e.EndOfLine=U={}));var G;(function(Ue){Ue[Ue.Replace=1]="Replace",Ue[Ue.Append=2]="Append",Ue[Ue.Prepend=3]="Prepend"})(G||(e.EnvironmentVariableMutatorType=G={}));let $=p=class{static isTextEdit(We){return We instanceof p?!0:We?V.isRange(We)&&typeof We.newText=="string":!1}static replace(We,rt){return new p(We,rt)}static insert(We,rt){return p.replace(new V(We,We),rt)}static delete(We){return p.replace(We,"")}static setEndOfLine(We){const rt=new p(new V(new F(0,0),new F(0,0)),"");return rt.newEol=We,rt}get range(){return this._range}set range(We){if(We&&!V.isRange(We))throw(0,y.illegalArgument)("range");this._range=We}get newText(){return this._newText||""}set newText(We){if(We&&typeof We!="string")throw(0,y.illegalArgument)("newText");this._newText=We}get newEol(){return this._newEol}set newEol(We){if(We&&typeof We!="number")throw(0,y.illegalArgument)("newEol");this._newEol=We}constructor(We,rt){this._range=We,this._newText=rt}toJSON(){return{range:this.range,newText:this.newText,newEol:this._newEol}}};e.TextEdit=$,e.TextEdit=$=p=fe([M],$);let ie=c=class{static isNotebookCellEdit(We){return We instanceof c?!0:We?_i.isNotebookRange(We)&&Array.isArray(We.newCells):!1}static replaceCells(We,rt){return new c(We,rt)}static insertCells(We,rt){return new c(new _i(We,We),rt)}static deleteCells(We){return new c(We,[])}static updateCellMetadata(We,rt){const St=new c(new _i(We,We),[]);return St.newCellMetadata=rt,St}static updateNotebookMetadata(We){const rt=new c(new _i(0,0),[]);return rt.newNotebookMetadata=We,rt}constructor(We,rt){this.range=We,this.newCells=rt}};e.NotebookEdit=ie,e.NotebookEdit=ie=c=fe([M],ie);class J{static isSnippetTextEdit(We){return We instanceof J?!0:We?V.isRange(We.range)&&X.isSnippetString(We.snippet):!1}static replace(We,rt){return new J(We,rt)}static insert(We,rt){return J.replace(new V(We,We),rt)}constructor(We,rt){this.range=We,this.snippet=rt}}e.SnippetTextEdit=J;var j;(function(Ue){Ue[Ue.File=1]="File",Ue[Ue.Text=2]="Text",Ue[Ue.Cell=3]="Cell",Ue[Ue.CellReplace=5]="CellReplace",Ue[Ue.Snippet=6]="Snippet"})(j||(e.FileEditType=j={}));let ee=class{constructor(){this._edits=[]}_allEntries(){return this._edits}renameFile(We,rt,St,Ut){this._edits.push({_type:1,from:We,to:rt,options:St,metadata:Ut})}createFile(We,rt,St){this._edits.push({_type:1,from:void 0,to:We,options:rt,metadata:St})}deleteFile(We,rt,St){this._edits.push({_type:1,from:We,to:void 0,options:rt,metadata:St})}replaceNotebookMetadata(We,rt,St){this._edits.push({_type:3,metadata:St,uri:We,edit:{editType:5,metadata:rt},notebookMetadata:rt})}replaceNotebookCells(We,rt,St,Ut){const Jt=rt.start,si=rt.end;(Jt!==si||St.length>0)&&this._edits.push({_type:5,uri:We,index:Jt,count:si-Jt,cells:St,metadata:Ut})}replaceNotebookCellMetadata(We,rt,St,Ut){this._edits.push({_type:3,metadata:Ut,uri:We,edit:{editType:3,index:rt,metadata:St}})}replace(We,rt,St,Ut){this._edits.push({_type:2,uri:We,edit:new $(rt,St),metadata:Ut})}insert(We,rt,St,Ut){this.replace(We,new V(rt,rt),St,Ut)}delete(We,rt,St){this.replace(We,rt,"",St)}has(We){return this._edits.some(rt=>rt._type===2&&rt.uri.toString()===We.toString())}set(We,rt){if(rt)for(const St of rt){if(!St)continue;let Ut,Jt;Array.isArray(St)?(Ut=St[0],Jt=St[1]):Ut=St,ie.isNotebookCellEdit(Ut)?Ut.newCellMetadata?this.replaceNotebookCellMetadata(We,Ut.range.start,Ut.newCellMetadata,Jt):Ut.newNotebookMetadata?this.replaceNotebookMetadata(We,Ut.newNotebookMetadata,Jt):this.replaceNotebookCells(We,Ut.range,Ut.newCells,Jt):J.isSnippetTextEdit(Ut)?this._edits.push({_type:6,uri:We,range:Ut.range,edit:Ut.snippet,metadata:Jt}):this._edits.push({_type:2,uri:We,edit:Ut,metadata:Jt})}else{for(let St=0;St<this._edits.length;St++){const Ut=this._edits[St];switch(Ut._type){case 2:case 6:case 3:case 5:Ut.uri.toString()===We.toString()&&(this._edits[St]=void 0);break}}(0,t.coalesceInPlace)(this._edits)}}get(We){const rt=[];for(const St of this._edits)St._type===2&&St.uri.toString()===We.toString()&&rt.push(St.edit);return rt}entries(){const We=new D.ResourceMap;for(const rt of this._edits)if(rt._type===2){let St=We.get(rt.uri);St||(St=[rt.uri,[]],We.set(rt.uri,St)),St[1].push(rt.edit)}return[...We.values()]}get size(){return this.entries().length}toJSON(){return this.entries()}};e.WorkspaceEdit=ee,e.WorkspaceEdit=ee=fe([M],ee);let X=l=class{static isSnippetString(We){return We instanceof l?!0:We?typeof We.value=="string":!1}static _escape(We){return We.replace(/\$|}|\\/g,"\\$&")}constructor(We){this._tabstop=1,this.value=We||""}appendText(We){return this.value+=l._escape(We),this}appendTabstop(We=this._tabstop++){return this.value+="$",this.value+=We,this}appendPlaceholder(We,rt=this._tabstop++){if(typeof We=="function"){const St=new l;St._tabstop=this._tabstop,We(St),this._tabstop=St._tabstop,We=St.value}else We=l._escape(We);return this.value+="${",this.value+=rt,this.value+=":",this.value+=We,this.value+="}",this}appendChoice(We,rt=this._tabstop++){const St=We.map(Ut=>Ut.replace(/\$|}|\\|,/g,"\\$&")).join(",");return this.value+="${",this.value+=rt,this.value+="|",this.value+=St,this.value+="|}",this}appendVariable(We,rt){if(typeof rt=="function"){const St=new l;St._tabstop=this._tabstop,rt(St),this._tabstop=St._tabstop,rt=St.value}else typeof rt=="string"&&(rt=rt.replace(/\$|}/g,"\\$&"));return this.value+="${",this.value+=We,rt&&(this.value+=":",this.value+=rt),this.value+="}",this}};e.SnippetString=X,e.SnippetString=X=l=fe([M],X);var te;(function(Ue){Ue[Ue.Unnecessary=1]="Unnecessary",Ue[Ue.Deprecated=2]="Deprecated"})(te||(e.DiagnosticTag=te={}));var Z;(function(Ue){Ue[Ue.Hint=3]="Hint",Ue[Ue.Information=2]="Information",Ue[Ue.Warning=1]="Warning",Ue[Ue.Error=0]="Error"})(Z||(e.DiagnosticSeverity=Z={}));let se=n=class{static isLocation(We){return We instanceof n?!0:We?V.isRange(We.range)&&m.URI.isUri(We.uri):!1}constructor(We,rt){if(this.uri=We,rt)if(V.isRange(rt))this.range=V.of(rt);else if(F.isPosition(rt))this.range=new V(rt,rt);else throw new Error("Illegal argument")}toJSON(){return{uri:this.uri,range:this.range}}};e.Location=se,e.Location=se=n=fe([M],se);let re=class{static is(We){return We?typeof We.message=="string"&&We.location&&V.isRange(We.location.range)&&m.URI.isUri(We.location.uri):!1}constructor(We,rt){this.location=We,this.message=rt}static isEqual(We,rt){return We===rt?!0:!We||!rt?!1:We.message===rt.message&&We.location.range.isEqual(rt.location.range)&&We.location.uri.toString()===rt.location.uri.toString()}};e.DiagnosticRelatedInformation=re,e.DiagnosticRelatedInformation=re=fe([M],re);let oe=class{constructor(We,rt,St=Z.Error){if(!V.isRange(We))throw new TypeError("range must be set");if(!rt)throw new TypeError("message must be set");this.range=We,this.message=rt,this.severity=St}toJSON(){return{severity:Z[this.severity],message:this.message,range:this.range,source:this.source,code:this.code}}static isEqual(We,rt){return We===rt?!0:!We||!rt?!1:We.message===rt.message&&We.severity===rt.severity&&We.code===rt.code&&We.severity===rt.severity&&We.source===rt.source&&We.range.isEqual(rt.range)&&(0,t.equals)(We.tags,rt.tags)&&(0,t.equals)(We.relatedInformation,rt.relatedInformation,re.isEqual)}};e.Diagnostic=oe,e.Diagnostic=oe=fe([M],oe);let le=class{constructor(We,rt){if(!We)throw new Error("Illegal argument, contents must be defined");Array.isArray(We)?this.contents=We:this.contents=[We],this.range=rt}};e.Hover=le,e.Hover=le=fe([M],le);var ne;(function(Ue){Ue[Ue.Text=0]="Text",Ue[Ue.Read=1]="Read",Ue[Ue.Write=2]="Write"})(ne||(e.DocumentHighlightKind=ne={}));let ce=class{constructor(We,rt=ne.Text){this.range=We,this.kind=rt}toJSON(){return{range:this.range,kind:ne[this.kind]}}};e.DocumentHighlight=ce,e.DocumentHighlight=ce=fe([M],ce);var ae;(function(Ue){Ue[Ue.File=0]="File",Ue[Ue.Module=1]="Module",Ue[Ue.Namespace=2]="Namespace",Ue[Ue.Package=3]="Package",Ue[Ue.Class=4]="Class",Ue[Ue.Method=5]="Method",Ue[Ue.Property=6]="Property",Ue[Ue.Field=7]="Field",Ue[Ue.Constructor=8]="Constructor",Ue[Ue.Enum=9]="Enum",Ue[Ue.Interface=10]="Interface",Ue[Ue.Function=11]="Function",Ue[Ue.Variable=12]="Variable",Ue[Ue.Constant=13]="Constant",Ue[Ue.String=14]="String",Ue[Ue.Number=15]="Number",Ue[Ue.Boolean=16]="Boolean",Ue[Ue.Array=17]="Array",Ue[Ue.Object=18]="Object",Ue[Ue.Key=19]="Key",Ue[Ue.Null=20]="Null",Ue[Ue.EnumMember=21]="EnumMember",Ue[Ue.Struct=22]="Struct",Ue[Ue.Event=23]="Event",Ue[Ue.Operator=24]="Operator",Ue[Ue.TypeParameter=25]="TypeParameter"})(ae||(e.SymbolKind=ae={}));var ue;(function(Ue){Ue[Ue.Deprecated=1]="Deprecated"})(ue||(e.SymbolTag=ue={}));let de=g=class{static validate(We){if(!We.name)throw new Error("name must not be falsy")}constructor(We,rt,St,Ut,Jt){this.name=We,this.kind=rt,this.containerName=Jt,typeof St=="string"&&(this.containerName=St),Ut instanceof se?this.location=Ut:St instanceof V&&(this.location=new se(Ut,St)),g.validate(this)}toJSON(){return{name:this.name,kind:ae[this.kind],location:this.location,containerName:this.containerName}}};e.SymbolInformation=de,e.SymbolInformation=de=g=fe([M],de);let ge=w=class{static validate(We){if(!We.name)throw new Error("name must not be falsy");if(!We.range.contains(We.selectionRange))throw new Error("selectionRange must be contained in fullRange");We.children?.forEach(w.validate)}constructor(We,rt,St,Ut,Jt){this.name=We,this.detail=rt,this.kind=St,this.range=Ut,this.selectionRange=Jt,this.children=[],w.validate(this)}};e.DocumentSymbol=ge,e.DocumentSymbol=ge=w=fe([M],ge);var he;(function(Ue){Ue[Ue.Invoke=1]="Invoke",Ue[Ue.Automatic=2]="Automatic"})(he||(e.CodeActionTriggerKind=he={}));let be=class{constructor(We,rt){this.title=We,this.kind=rt}};e.CodeAction=be,e.CodeAction=be=fe([M],be);let ve=class{static{E=this}static{this.sep="."}constructor(We){this.value=We}append(We){return new E(this.value?this.value+E.sep+We:We)}intersects(We){return this.contains(We)||We.contains(this)}contains(We){return this.value===We.value||We.value.startsWith(this.value+E.sep)}};e.CodeActionKind=ve,e.CodeActionKind=ve=E=fe([M],ve);class Ie extends ve{constructor(We){super(We),this.value=We}}e.NotebookCodeActionKind=Ie,ve.Empty=new ve(""),ve.QuickFix=ve.Empty.append("quickfix"),ve.Refactor=ve.Empty.append("refactor"),ve.RefactorExtract=ve.Refactor.append("extract"),ve.RefactorInline=ve.Refactor.append("inline"),ve.RefactorMove=ve.Refactor.append("move"),ve.RefactorRewrite=ve.Refactor.append("rewrite"),ve.Source=ve.Empty.append("source"),ve.SourceOrganizeImports=ve.Source.append("organizeImports"),ve.SourceFixAll=ve.Source.append("fixAll"),ve.Notebook=ve.Empty.append("notebook");let Se=class{constructor(We,rt){if(this.range=We,this.parent=rt,rt&&!rt.range.contains(this.range))throw new Error("Invalid argument: parent must contain this range")}};e.SelectionRange=Se,e.SelectionRange=Se=fe([M],Se);class we{constructor(We,rt,St,Ut,Jt,si){this.kind=We,this.name=rt,this.detail=St,this.uri=Ut,this.range=Jt,this.selectionRange=si}}e.CallHierarchyItem=we;class ye{constructor(We,rt){this.fromRanges=rt,this.from=We}}e.CallHierarchyIncomingCall=ye;class Re{constructor(We,rt){this.fromRanges=rt,this.to=We}}e.CallHierarchyOutgoingCall=Re;var Le;(function(Ue){Ue[Ue.Information=0]="Information",Ue[Ue.Warning=1]="Warning",Ue[Ue.Error=2]="Error"})(Le||(e.LanguageStatusSeverity=Le={}));let Pe=class{constructor(We,rt){this.range=We,this.command=rt}get isResolved(){return!!this.command}};e.CodeLens=Pe,e.CodeLens=Pe=fe([M],Pe);let Ae=C=class{#e;static isMarkdownString(We){return We instanceof C?!0:We&&We.appendCodeblock&&We.appendMarkdown&&We.appendText&&We.value!==void 0}constructor(We,rt=!1){this.#e=new b.MarkdownString(We,{supportThemeIcons:rt})}get value(){return this.#e.value}set value(We){this.#e.value=We}get isTrusted(){return this.#e.isTrusted}set isTrusted(We){this.#e.isTrusted=We}get supportThemeIcons(){return this.#e.supportThemeIcons}set supportThemeIcons(We){this.#e.supportThemeIcons=We}get supportHtml(){return this.#e.supportHtml}set supportHtml(We){this.#e.supportHtml=We}get baseUri(){return this.#e.baseUri}set baseUri(We){this.#e.baseUri=We}appendText(We){return this.#e.appendText(We),this}appendMarkdown(We){return this.#e.appendMarkdown(We),this}appendCodeblock(We,rt){return this.#e.appendCodeblock(rt??"",We),this}};e.MarkdownString=Ae,e.MarkdownString=Ae=C=fe([M],Ae);let Me=class{constructor(We,rt){this.label=We,this.documentation=rt}};e.ParameterInformation=Me,e.ParameterInformation=Me=fe([M],Me);let Oe=class{constructor(We,rt){this.label=We,this.documentation=rt,this.parameters=[]}};e.SignatureInformation=Oe,e.SignatureInformation=Oe=fe([M],Oe);let De=class{constructor(){this.activeSignature=0,this.activeParameter=0,this.signatures=[]}};e.SignatureHelp=De,e.SignatureHelp=De=fe([M],De);var Ce;(function(Ue){Ue[Ue.Invoke=1]="Invoke",Ue[Ue.TriggerCharacter=2]="TriggerCharacter",Ue[Ue.ContentChange=3]="ContentChange"})(Ce||(e.SignatureHelpTriggerKind=Ce={}));var _e;(function(Ue){Ue[Ue.Type=1]="Type",Ue[Ue.Parameter=2]="Parameter"})(_e||(e.InlayHintKind=_e={}));let me=class{constructor(We){this.value=We}};e.InlayHintLabelPart=me,e.InlayHintLabelPart=me=fe([M],me);let ke=class{constructor(We,rt,St){this.position=We,this.label=rt,this.kind=St}};e.InlayHint=ke,e.InlayHint=ke=fe([M],ke);var Ee;(function(Ue){Ue[Ue.Invoke=0]="Invoke",Ue[Ue.TriggerCharacter=1]="TriggerCharacter",Ue[Ue.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(Ee||(e.CompletionTriggerKind=Ee={}));var pe;(function(Ue){Ue[Ue.Text=0]="Text",Ue[Ue.Method=1]="Method",Ue[Ue.Function=2]="Function",Ue[Ue.Constructor=3]="Constructor",Ue[Ue.Field=4]="Field",Ue[Ue.Variable=5]="Variable",Ue[Ue.Class=6]="Class",Ue[Ue.Interface=7]="Interface",Ue[Ue.Module=8]="Module",Ue[Ue.Property=9]="Property",Ue[Ue.Unit=10]="Unit",Ue[Ue.Value=11]="Value",Ue[Ue.Enum=12]="Enum",Ue[Ue.Keyword=13]="Keyword",Ue[Ue.Snippet=14]="Snippet",Ue[Ue.Color=15]="Color",Ue[Ue.File=16]="File",Ue[Ue.Reference=17]="Reference",Ue[Ue.Folder=18]="Folder",Ue[Ue.EnumMember=19]="EnumMember",Ue[Ue.Constant=20]="Constant",Ue[Ue.Struct=21]="Struct",Ue[Ue.Event=22]="Event",Ue[Ue.Operator=23]="Operator",Ue[Ue.TypeParameter=24]="TypeParameter",Ue[Ue.User=25]="User",Ue[Ue.Issue=26]="Issue"})(pe||(e.CompletionItemKind=pe={}));var Te;(function(Ue){Ue[Ue.Deprecated=1]="Deprecated"})(Te||(e.CompletionItemTag=Te={}));let Ne=class{constructor(We,rt){this.label=We,this.kind=rt}toJSON(){return{label:this.label,kind:this.kind&&pe[this.kind],detail:this.detail,documentation:this.documentation,sortText:this.sortText,filterText:this.filterText,preselect:this.preselect,insertText:this.insertText,textEdit:this.textEdit}}};e.CompletionItem=Ne,e.CompletionItem=Ne=fe([M],Ne);let xe=class{constructor(We=[],rt=!1){this.items=We,this.isIncomplete=rt}};e.CompletionList=xe,e.CompletionList=xe=fe([M],xe);let Ve=class{constructor(We,rt,St){this.insertText=We,this.range=rt,this.command=St}};e.InlineSuggestion=Ve,e.InlineSuggestion=Ve=fe([M],Ve);let Fe=class{constructor(We){this.commands=void 0,this.suppressSuggestions=void 0,this.items=We}};e.InlineSuggestionList=Fe,e.InlineSuggestionList=Fe=fe([M],Fe);var Be;(function(Ue){Ue[Ue.Active=-1]="Active",Ue[Ue.Beside=-2]="Beside",Ue[Ue.One=1]="One",Ue[Ue.Two=2]="Two",Ue[Ue.Three=3]="Three",Ue[Ue.Four=4]="Four",Ue[Ue.Five=5]="Five",Ue[Ue.Six=6]="Six",Ue[Ue.Seven=7]="Seven",Ue[Ue.Eight=8]="Eight",Ue[Ue.Nine=9]="Nine"})(Be||(e.ViewColumn=Be={}));var He;(function(Ue){Ue[Ue.Left=1]="Left",Ue[Ue.Right=2]="Right"})(He||(e.StatusBarAlignment=He={}));function et(Ue,We){return`${h.ExtensionIdentifier.toKey(Ue)}.${We}`}e.asStatusBarItemIdentifier=et;var Je;(function(Ue){Ue[Ue.Off=0]="Off",Ue[Ue.On=1]="On",Ue[Ue.Relative=2]="Relative"})(Je||(e.TextEditorLineNumbersStyle=Je={}));var st;(function(Ue){Ue[Ue.Manual=1]="Manual",Ue[Ue.AfterDelay=2]="AfterDelay",Ue[Ue.FocusOut=3]="FocusOut"})(st||(e.TextDocumentSaveReason=st={}));var ze;(function(Ue){Ue[Ue.Default=0]="Default",Ue[Ue.InCenter=1]="InCenter",Ue[Ue.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",Ue[Ue.AtTop=3]="AtTop"})(ze||(e.TextEditorRevealType=ze={}));var je;(function(Ue){Ue[Ue.Keyboard=1]="Keyboard",Ue[Ue.Mouse=2]="Mouse",Ue[Ue.Command=3]="Command"})(je||(e.TextEditorSelectionChangeKind=je={}));var Ge;(function(Ue){Ue[Ue.Undo=1]="Undo",Ue[Ue.Redo=2]="Redo"})(Ge||(e.TextDocumentChangeReason=Ge={}));var Ze;(function(Ue){Ue[Ue.OpenOpen=0]="OpenOpen",Ue[Ue.ClosedClosed=1]="ClosedClosed",Ue[Ue.OpenClosed=2]="OpenClosed",Ue[Ue.ClosedOpen=3]="ClosedOpen"})(Ze||(e.DecorationRangeBehavior=Ze={})),function(Ue){function We(rt){switch(rt){case"keyboard":return Ue.Keyboard;case"mouse":return Ue.Mouse;case"api":return Ue.Command}}Ue.fromValue=We}(je||(e.TextEditorSelectionChangeKind=je={}));let tt=class{constructor(We,rt){if(rt&&!m.URI.isUri(rt))throw(0,y.illegalArgument)("target");if(!V.isRange(We)||We.isEmpty)throw(0,y.illegalArgument)("range");this.range=We,this.target=rt}};e.DocumentLink=tt,e.DocumentLink=tt=fe([M],tt);let Xe=class{constructor(We,rt,St,Ut){this.red=We,this.green=rt,this.blue=St,this.alpha=Ut}};e.Color=Xe,e.Color=Xe=fe([M],Xe);let nt=class{constructor(We,rt){if(rt&&!(rt instanceof Xe))throw(0,y.illegalArgument)("color");if(!V.isRange(We)||We.isEmpty)throw(0,y.illegalArgument)("range");this.range=We,this.color=rt}};e.ColorInformation=nt,e.ColorInformation=nt=fe([M],nt);let ft=class{constructor(We){if(!We||typeof We!="string")throw(0,y.illegalArgument)("label");this.label=We}};e.ColorPresentation=ft,e.ColorPresentation=ft=fe([M],ft);var Et;(function(Ue){Ue[Ue.RGB=0]="RGB",Ue[Ue.HEX=1]="HEX",Ue[Ue.HSL=2]="HSL"})(Et||(e.ColorFormat=Et={}));var It;(function(Ue){Ue[Ue.Error=0]="Error",Ue[Ue.Warning=1]="Warning",Ue[Ue.Information=2]="Information"})(It||(e.SourceControlInputBoxValidationType=It={}));var Nt;(function(Ue){Ue[Ue.Unknown=0]="Unknown",Ue[Ue.Shutdown=1]="Shutdown",Ue[Ue.Process=2]="Process",Ue[Ue.User=3]="User",Ue[Ue.Extension=4]="Extension"})(Nt||(e.TerminalExitReason=Nt={}));class Ot{constructor(We,rt,St){if(this.startIndex=We,this.length=rt,this.tooltip=St,typeof We!="number"||We<0)throw(0,y.illegalArgument)("startIndex");if(typeof rt!="number"||rt<1)throw(0,y.illegalArgument)("length");if(St!==void 0&&typeof St!="string")throw(0,y.illegalArgument)("tooltip")}}e.TerminalLink=Ot;class kt{constructor(We){this.uri=We}}e.TerminalQuickFixOpener=kt;class xt{constructor(We){this.terminalCommand=We}}e.TerminalQuickFixCommand=xt;var Mt;(function(Ue){Ue[Ue.Panel=1]="Panel",Ue[Ue.Editor=2]="Editor"})(Mt||(e.TerminalLocation=Mt={}));class Ht{constructor(We){if(this.options=We,typeof We!="object")throw(0,y.illegalArgument)("options")}}e.TerminalProfile=Ht;var Yt;(function(Ue){Ue[Ue.Always=1]="Always",Ue[Ue.Silent=2]="Silent",Ue[Ue.Never=3]="Never"})(Yt||(e.TaskRevealKind=Yt={}));var jt;(function(Ue){Ue[Ue.Shared=1]="Shared",Ue[Ue.Dedicated=2]="Dedicated",Ue[Ue.New=3]="New"})(jt||(e.TaskPanelKind=jt={}));let ii=class{static{I=this}static{this.Clean=new I("clean","Clean")}static{this.Build=new I("build","Build")}static{this.Rebuild=new I("rebuild","Rebuild")}static{this.Test=new I("test","Test")}static from(We){switch(We){case"clean":return I.Clean;case"build":return I.Build;case"rebuild":return I.Rebuild;case"test":return I.Test;default:return}}constructor(We,rt){if(this.label=rt,typeof We!="string"||typeof rt!="string")throw(0,y.illegalArgument)("name");this._id=We}get id(){return this._id}};e.TaskGroup=ii,e.TaskGroup=ii=I=fe([M],ii);function ri(Ue){let We="";for(let rt=0;rt<Ue.length;rt++)We+=Ue[rt].replace(/,/g,",,")+",";return We}let $e=class{constructor(We,rt,St){if(typeof We!="string")throw(0,y.illegalArgument)("process");this._args=[],this._process=We,rt!==void 0&&(Array.isArray(rt)?(this._args=rt,this._options=St):this._options=rt)}get process(){return this._process}set process(We){if(typeof We!="string")throw(0,y.illegalArgument)("process");this._process=We}get args(){return this._args}set args(We){Array.isArray(We)||(We=[]),this._args=We}get options(){return this._options}set options(We){this._options=We}computeId(){const We=[];if(We.push("process"),this._process!==void 0&&We.push(this._process),this._args&&this._args.length>0)for(const rt of this._args)We.push(rt);return ri(We)}};e.ProcessExecution=$e,e.ProcessExecution=$e=fe([M],$e);let Qe=class{constructor(We,rt,St){if(this._args=[],Array.isArray(rt)){if(!We)throw(0,y.illegalArgument)("command can't be undefined or null");if(typeof We!="string"&&typeof We.value!="string")throw(0,y.illegalArgument)("command");this._command=We,this._args=rt,this._options=St}else{if(typeof We!="string")throw(0,y.illegalArgument)("commandLine");this._commandLine=We,this._options=rt}}get commandLine(){return this._commandLine}set commandLine(We){if(typeof We!="string")throw(0,y.illegalArgument)("commandLine");this._commandLine=We}get command(){return this._command?this._command:""}set command(We){if(typeof We!="string"&&typeof We.value!="string")throw(0,y.illegalArgument)("command");this._command=We}get args(){return this._args}set args(We){this._args=We||[]}get options(){return this._options}set options(We){this._options=We}computeId(){const We=[];if(We.push("shell"),this._commandLine!==void 0&&We.push(this._commandLine),this._command!==void 0&&We.push(typeof this._command=="string"?this._command:this._command.value),this._args&&this._args.length>0)for(const rt of this._args)We.push(typeof rt=="string"?rt:rt.value);return ri(We)}};e.ShellExecution=Qe,e.ShellExecution=Qe=fe([M],Qe);var Ye;(function(Ue){Ue[Ue.Escape=1]="Escape",Ue[Ue.Strong=2]="Strong",Ue[Ue.Weak=3]="Weak"})(Ye||(e.ShellQuoting=Ye={}));var Ke;(function(Ue){Ue[Ue.Global=1]="Global",Ue[Ue.Workspace=2]="Workspace"})(Ke||(e.TaskScope=Ke={}));class ht{constructor(We){this._callback=We}computeId(){return"customExecution"+(0,S.generateUuid)()}set callback(We){this._callback=We}get callback(){return this._callback}}e.CustomExecution=ht;let Tt=class{static{_=this}static{this.ExtensionCallbackType="customExecution"}static{this.ProcessType="process"}static{this.ShellType="shell"}static{this.EmptyType="$empty"}constructor(We,rt,St,Ut,Jt,si){this.__deprecated=!1,this._definition=this.definition=We;let di;typeof rt=="string"?(this._name=this.name=rt,this._source=this.source=St,this.execution=Ut,di=Jt,this.__deprecated=!0):rt===Ke.Global||rt===Ke.Workspace?(this.target=rt,this._name=this.name=St,this._source=this.source=Ut,this.execution=Jt,di=si):(this.target=rt,this._name=this.name=St,this._source=this.source=Ut,this.execution=Jt,di=si),typeof di=="string"?(this._problemMatchers=[di],this._hasDefinedMatchers=!0):Array.isArray(di)?(this._problemMatchers=di,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(We){this.__id=We}get _deprecated(){return this.__deprecated}clear(){this.__id!==void 0&&(this.__id=void 0,this._scope=void 0,this.computeDefinitionBasedOnExecution())}computeDefinitionBasedOnExecution(){this._execution instanceof $e?this._definition={type:_.ProcessType,id:this._execution.computeId()}:this._execution instanceof Qe?this._definition={type:_.ShellType,id:this._execution.computeId()}:this._execution instanceof ht?this._definition={type:_.ExtensionCallbackType,id:this._execution.computeId()}:this._definition={type:_.EmptyType,id:(0,S.generateUuid)()}}get definition(){return this._definition}set definition(We){if(We==null)throw(0,y.illegalArgument)("Kind can't be undefined or null");this.clear(),this._definition=We}get scope(){return this._scope}set target(We){this.clear(),this._scope=We}get name(){return this._name}set name(We){if(typeof We!="string")throw(0,y.illegalArgument)("name");this.clear(),this._name=We}get execution(){return this._execution}set execution(We){We===null&&(We=void 0),this.clear(),this._execution=We;const rt=this._definition.type;(_.EmptyType===rt||_.ProcessType===rt||_.ShellType===rt||_.ExtensionCallbackType===rt)&&this.computeDefinitionBasedOnExecution()}get problemMatchers(){return this._problemMatchers}set problemMatchers(We){if(Array.isArray(We))this.clear(),this._problemMatchers=We,this._hasDefinedMatchers=!0;else{this.clear(),this._problemMatchers=[],this._hasDefinedMatchers=!1;return}}get hasDefinedMatchers(){return this._hasDefinedMatchers}get isBackground(){return this._isBackground}set isBackground(We){We!==!0&&We!==!1&&(We=!1),this.clear(),this._isBackground=We}get source(){return this._source}set source(We){if(typeof We!="string"||We.length===0)throw(0,y.illegalArgument)("source must be a string of length > 0");this.clear(),this._source=We}get group(){return this._group}set group(We){We===null&&(We=void 0),this.clear(),this._group=We}get detail(){return this._detail}set detail(We){We===null&&(We=void 0),this._detail=We}get presentationOptions(){return this._presentationOptions}set presentationOptions(We){We==null&&(We=Object.create(null)),this.clear(),this._presentationOptions=We}get runOptions(){return this._runOptions}set runOptions(We){We==null&&(We=Object.create(null)),this.clear(),this._runOptions=We}};e.Task=Tt,e.Task=Tt=_=fe([M],Tt);var Ft;(function(Ue){Ue[Ue.SourceControl=1]="SourceControl",Ue[Ue.Window=10]="Window",Ue[Ue.Notification=15]="Notification"})(Ft||(e.ProgressLocation=Ft={}));var Pt;(function(Ue){function We(rt){const St=rt;return(0,v.isNumber)(St.value)?St.tooltip&&!(0,v.isString)(St.tooltip)?(console.log("INVALID view badge, invalid tooltip",St.tooltip),!1):!0:(console.log("INVALID view badge, invalid value",St.value),!1)}Ue.isViewBadge=We})(Pt||(e.ViewBadge=Pt={}));let $t=A=class{static isTreeItem(We,rt){const St=We;if(St.checkboxState!==void 0){const Ut=(0,v.isNumber)(St.checkboxState)?St.checkboxState:(0,v.isObject)(St.checkboxState)&&(0,v.isNumber)(St.checkboxState.state)?St.checkboxState.state:void 0,Jt=!(0,v.isNumber)(St.checkboxState)&&(0,v.isObject)(St.checkboxState)?St.checkboxState.tooltip:void 0;if(Ut===void 0||Ut!==it.Checked&&Ut!==it.Unchecked||Jt!==void 0&&!(0,v.isString)(Jt))return console.log("INVALID tree item, invalid checkboxState",St.checkboxState),!1}if(We instanceof A)return!0;if(St.label!==void 0&&!(0,v.isString)(St.label)&&!St.label?.label)return console.log("INVALID tree item, invalid label",St.label),!1;if(St.id!==void 0&&!(0,v.isString)(St.id))return console.log("INVALID tree item, invalid id",St.id),!1;if(St.iconPath!==void 0&&!(0,v.isString)(St.iconPath)&&!m.URI.isUri(St.iconPath)&&(!St.iconPath||!(0,v.isString)(St.iconPath.id))){const Ut=St.iconPath;if(!Ut||!(0,v.isString)(Ut.light)&&!m.URI.isUri(Ut.light)&&!(0,v.isString)(Ut.dark)&&!m.URI.isUri(Ut.dark))return console.log("INVALID tree item, invalid iconPath",St.iconPath),!1}return St.description!==void 0&&!(0,v.isString)(St.description)&&typeof St.description!="boolean"?(console.log("INVALID tree item, invalid description",St.description),!1):St.resourceUri!==void 0&&!m.URI.isUri(St.resourceUri)?(console.log("INVALID tree item, invalid resourceUri",St.resourceUri),!1):St.tooltip!==void 0&&!(0,v.isString)(St.tooltip)&&!(St.tooltip instanceof Ae)?(console.log("INVALID tree item, invalid tooltip",St.tooltip),!1):St.command!==void 0&&!St.command.command?(console.log("INVALID tree item, invalid command",St.command),!1):St.collapsibleState!==void 0&&St.collapsibleState<Wt.None&&St.collapsibleState>Wt.Expanded?(console.log("INVALID tree item, invalid collapsibleState",St.collapsibleState),!1):St.contextValue!==void 0&&!(0,v.isString)(St.contextValue)?(console.log("INVALID tree item, invalid contextValue",St.contextValue),!1):St.accessibilityInformation!==void 0&&!St.accessibilityInformation?.label?(console.log("INVALID tree item, invalid accessibilityInformation",St.accessibilityInformation),!1):!0}constructor(We,rt=Wt.None){this.collapsibleState=rt,m.URI.isUri(We)?this.resourceUri=We:this.label=We}};e.TreeItem=$t,e.TreeItem=$t=A=fe([M],$t);var Wt;(function(Ue){Ue[Ue.None=0]="None",Ue[Ue.Collapsed=1]="Collapsed",Ue[Ue.Expanded=2]="Expanded"})(Wt||(e.TreeItemCollapsibleState=Wt={}));var it;(function(Ue){Ue[Ue.Unchecked=0]="Unchecked",Ue[Ue.Checked=1]="Checked"})(it||(e.TreeItemCheckboxState=it={}));let ut=class{async asString(){return typeof this.value=="string"?this.value:JSON.stringify(this.value)}asFile(){}constructor(We){this.value=We}};e.DataTransferItem=ut,e.DataTransferItem=ut=fe([M],ut);class qe extends ut{}e.InternalDataTransferItem=qe;class dt extends qe{#e;constructor(We){super(""),this.#e=We}asFile(){return this.#e}}e.InternalFileDataTransferItem=dt;class pt{constructor(We,rt,St,Ut){this.name=We,this.uri=rt,this._itemId=St,this._getData=Ut}data(){return this._getData()}}e.DataTransferFile=pt;let yt=class{#e=new Map;constructor(We){for(const[rt,St]of We??[]){const Ut=this.#e.get(this.#t(rt));Ut?Ut.push(St):this.#e.set(this.#t(rt),[St])}}get(We){return this.#e.get(this.#t(We))?.[0]}set(We,rt){this.#e.set(this.#t(We),[rt])}forEach(We,rt){for(const[St,Ut]of this.#e)for(const Jt of Ut)We.call(rt,Jt,St,this)}*[Symbol.iterator](){for(const[We,rt]of this.#e)for(const St of rt)yield[We,St]}#t(We){return We.toLowerCase()}};e.DataTransfer=yt,e.DataTransfer=yt=fe([M],yt);let At=class{constructor(We){this.insertText=We}};e.DocumentDropEdit=At,e.DocumentDropEdit=At=fe([M],At);let Bt=class{constructor(We,rt){this.label=rt,this.insertText=We}};e.DocumentPasteEdit=Bt,e.DocumentPasteEdit=Bt=fe([M],Bt);let Kt=class{constructor(We,rt){this.id=We,this.color=rt}static isThemeIcon(We){return typeof We.id!="string"?(console.log("INVALID ThemeIcon, invalid id",We.id),!1):!0}};e.ThemeIcon=Kt,e.ThemeIcon=Kt=fe([M],Kt),Kt.File=new Kt("file"),Kt.Folder=new Kt("folder");let Zt=class{constructor(We){this.id=We}};e.ThemeColor=Zt,e.ThemeColor=Zt=fe([M],Zt);var Xt;(function(Ue){Ue[Ue.Global=1]="Global",Ue[Ue.Workspace=2]="Workspace",Ue[Ue.WorkspaceFolder=3]="WorkspaceFolder"})(Xt||(e.ConfigurationTarget=Xt={}));let ni=class{get base(){return this._base}set base(We){this._base=We,this._baseUri=m.URI.file(We)}get baseUri(){return this._baseUri}set baseUri(We){this._baseUri=We,this._base=We.fsPath}constructor(We,rt){if(typeof We!="string"&&(!We||!m.URI.isUri(We)&&!m.URI.isUri(We.uri)))throw(0,y.illegalArgument)("base");if(typeof rt!="string")throw(0,y.illegalArgument)("pattern");typeof We=="string"?this.baseUri=m.URI.file(We):m.URI.isUri(We)?this.baseUri=We:this.baseUri=We.uri,this.pattern=rt}toJSON(){return{pattern:this.pattern,base:this.base,baseUri:this.baseUri.toJSON()}}};e.RelativePattern=ni,e.RelativePattern=ni=fe([M],ni);const ai=new WeakMap;function hi(Ue,We){ai.set(Ue,We)}e.setBreakpointId=hi;let Rt=class{constructor(We,rt,St,Ut){this.enabled=typeof We=="boolean"?We:!0,typeof rt=="string"&&(this.condition=rt),typeof St=="string"&&(this.hitCondition=St),typeof Ut=="string"&&(this.logMessage=Ut)}get id(){return this._id||(this._id=ai.get(this)??(0,S.generateUuid)()),this._id}};e.Breakpoint=Rt,e.Breakpoint=Rt=fe([M],Rt);let ot=class extends Rt{constructor(We,rt,St,Ut,Jt){if(super(rt,St,Ut,Jt),We===null)throw(0,y.illegalArgument)("location");this.location=We}};e.SourceBreakpoint=ot,e.SourceBreakpoint=ot=fe([M],ot);let lt=class extends Rt{constructor(We,rt,St,Ut,Jt){super(rt,St,Ut,Jt),this.functionName=We}};e.FunctionBreakpoint=lt,e.FunctionBreakpoint=lt=fe([M],lt);let ct=class extends Rt{constructor(We,rt,St,Ut,Jt,si,di){if(super(Ut,Jt,si,di),!rt)throw(0,y.illegalArgument)("dataId");this.label=We,this.dataId=rt,this.canPersist=St}};e.DataBreakpoint=ct,e.DataBreakpoint=ct=fe([M],ct);let wt=class{constructor(We,rt,St){this.command=We,this.args=rt||[],this.options=St}};e.DebugAdapterExecutable=wt,e.DebugAdapterExecutable=wt=fe([M],wt);let bt=class{constructor(We,rt){this.port=We,this.host=rt}};e.DebugAdapterServer=bt,e.DebugAdapterServer=bt=fe([M],bt);let gt=class{constructor(We){this.path=We}};e.DebugAdapterNamedPipeServer=gt,e.DebugAdapterNamedPipeServer=gt=fe([M],gt);let Ct=class{constructor(We){this.implementation=We}};e.DebugAdapterInlineImplementation=Ct,e.DebugAdapterInlineImplementation=Ct=fe([M],Ct);let _t=class{constructor(We,rt,St){this.session=We,this.threadId=rt,this.frameId=St}};e.StackFrameFocus=_t,e.StackFrameFocus=_t=fe([M],_t);let Dt=class{constructor(We,rt){this.session=We,this.threadId=rt}};e.ThreadFocus=Dt,e.ThreadFocus=Dt=fe([M],Dt);let qt=class{constructor(We,rt){this.range=We,this.expression=rt}};e.EvaluatableExpression=qt,e.EvaluatableExpression=qt=fe([M],qt);var Qt;(function(Ue){Ue[Ue.Invoke=0]="Invoke",Ue[Ue.Automatic=1]="Automatic"})(Qt||(e.InlineCompletionTriggerKind=Qt={}));let ti=class{constructor(We,rt){this.range=We,this.text=rt}};e.InlineValueText=ti,e.InlineValueText=ti=fe([M],ti);let ci=class{constructor(We,rt,St=!0){this.range=We,this.variableName=rt,this.caseSensitiveLookup=St}};e.InlineValueVariableLookup=ci,e.InlineValueVariableLookup=ci=fe([M],ci);let Vt=class{constructor(We,rt){this.range=We,this.expression=rt}};e.InlineValueEvaluatableExpression=Vt,e.InlineValueEvaluatableExpression=Vt=fe([M],Vt);let at=class{constructor(We,rt){this.frameId=We,this.stoppedLocation=rt}};e.InlineValueContext=at,e.InlineValueContext=at=fe([M],at);var mt;(function(Ue){Ue[Ue.Changed=1]="Changed",Ue[Ue.Created=2]="Created",Ue[Ue.Deleted=3]="Deleted"})(mt||(e.FileChangeType=mt={}));let vt=k=class extends Error{static FileExists(We){return new k(We,a.FileSystemProviderErrorCode.FileExists,k.FileExists)}static FileNotFound(We){return new k(We,a.FileSystemProviderErrorCode.FileNotFound,k.FileNotFound)}static FileNotADirectory(We){return new k(We,a.FileSystemProviderErrorCode.FileNotADirectory,k.FileNotADirectory)}static FileIsADirectory(We){return new k(We,a.FileSystemProviderErrorCode.FileIsADirectory,k.FileIsADirectory)}static NoPermissions(We){return new k(We,a.FileSystemProviderErrorCode.NoPermissions,k.NoPermissions)}static Unavailable(We){return new k(We,a.FileSystemProviderErrorCode.Unavailable,k.Unavailable)}constructor(We,rt=a.FileSystemProviderErrorCode.Unknown,St){super(m.URI.isUri(We)?We.toString(!0):We),this.code=St?.name??"Unknown",(0,a.markAsFileSystemProviderError)(this,rt),Object.setPrototypeOf(this,k.prototype),typeof Error.captureStackTrace=="function"&&typeof St=="function"&&Error.captureStackTrace(this,St)}};e.FileSystemError=vt,e.FileSystemError=vt=k=fe([M],vt);let Lt=class{constructor(We,rt,St){this.start=We,this.end=rt,this.kind=St}};e.FoldingRange=Lt,e.FoldingRange=Lt=fe([M],Lt);var zt;(function(Ue){Ue[Ue.Comment=1]="Comment",Ue[Ue.Imports=2]="Imports",Ue[Ue.Region=3]="Region"})(zt||(e.FoldingRangeKind=zt={}));var Gt;(function(Ue){Ue[Ue.Collapsed=0]="Collapsed",Ue[Ue.Expanded=1]="Expanded"})(Gt||(e.CommentThreadCollapsibleState=Gt={}));var ei;(function(Ue){Ue[Ue.Editing=0]="Editing",Ue[Ue.Preview=1]="Preview"})(ei||(e.CommentMode=ei={}));var ui;(function(Ue){Ue[Ue.Published=0]="Published",Ue[Ue.Draft=1]="Draft"})(ui||(e.CommentState=ui={}));var oi;(function(Ue){Ue[Ue.Unresolved=0]="Unresolved",Ue[Ue.Resolved=1]="Resolved"})(oi||(e.CommentThreadState=oi={}));class fi{constructor(We,rt=[]){this.tokenTypes=We,this.tokenModifiers=rt}}e.SemanticTokensLegend=fi;function Di(Ue){return typeof Ue>"u"||(0,v.isStringArray)(Ue)}class ki{constructor(We){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,We){this._hasLegend=!0;for(let rt=0,St=We.tokenTypes.length;rt<St;rt++)this._tokenTypeStrToInt.set(We.tokenTypes[rt],rt);for(let rt=0,St=We.tokenModifiers.length;rt<St;rt++)this._tokenModifierStrToInt.set(We.tokenModifiers[rt],rt)}}push(We,rt,St,Ut,Jt){if(typeof We=="number"&&typeof rt=="number"&&typeof St=="number"&&typeof Ut=="number"&&(typeof Jt=="number"||typeof Jt>"u"))return typeof Jt>"u"&&(Jt=0),this._pushEncoded(We,rt,St,Ut,Jt);if(V.isRange(We)&&typeof rt=="string"&&Di(St))return this._push(We,rt,St);throw(0,y.illegalArgument)()}_push(We,rt,St){if(!this._hasLegend)throw new Error("Legend must be provided in constructor");if(We.start.line!==We.end.line)throw new Error("`range` cannot span multiple lines");if(!this._tokenTypeStrToInt.has(rt))throw new Error("`tokenType` is not in the provided legend");const Ut=We.start.line,Jt=We.start.character,si=We.end.character-We.start.character,di=this._tokenTypeStrToInt.get(rt);let pi=0;if(St)for(const Si of St){if(!this._tokenModifierStrToInt.has(Si))throw new Error("`tokenModifier` is not in the provided legend");const wi=this._tokenModifierStrToInt.get(Si);pi|=1<<wi>>>0}this._pushEncoded(Ut,Jt,si,di,pi)}_pushEncoded(We,rt,St,Ut,Jt){if(this._dataIsSortedAndDeltaEncoded&&(We<this._prevLine||We===this._prevLine&&rt<this._prevChar)){this._dataIsSortedAndDeltaEncoded=!1;const pi=this._data.length/5|0;let Si=0,wi=0;for(let yi=0;yi<pi;yi++){let Ti=this._data[5*yi],Oi=this._data[5*yi+1];Ti===0?(Ti=Si,Oi+=wi):Ti+=Si,this._data[5*yi]=Ti,this._data[5*yi+1]=Oi,Si=Ti,wi=Oi}}let si=We,di=rt;this._dataIsSortedAndDeltaEncoded&&this._dataLen>0&&(si-=this._prevLine,si===0&&(di-=this._prevChar)),this._data[this._dataLen++]=si,this._data[this._dataLen++]=di,this._data[this._dataLen++]=St,this._data[this._dataLen++]=Ut,this._data[this._dataLen++]=Jt,this._prevLine=We,this._prevChar=rt}static _sortAndDeltaEncode(We){const rt=[],St=We.length/5|0;for(let di=0;di<St;di++)rt[di]=di;rt.sort((di,pi)=>{const Si=We[5*di],wi=We[5*pi];if(Si===wi){const yi=We[5*di+1],Ti=We[5*pi+1];return yi-Ti}return Si-wi});const Ut=new Uint32Array(We.length);let Jt=0,si=0;for(let di=0;di<St;di++){const pi=5*rt[di],Si=We[pi+0],wi=We[pi+1],yi=We[pi+2],Ti=We[pi+3],Oi=We[pi+4],Yn=Si-Jt,Hr=Yn===0?wi-si:wi,xi=5*di;Ut[xi+0]=Yn,Ut[xi+1]=Hr,Ut[xi+2]=yi,Ut[xi+3]=Ti,Ut[xi+4]=Oi,Jt=Si,si=wi}return Ut}build(We){return this._dataIsSortedAndDeltaEncoded?new Ai(new Uint32Array(this._data),We):new Ai(ki._sortAndDeltaEncode(this._data),We)}}e.SemanticTokensBuilder=ki;class Ai{constructor(We,rt){this.resultId=rt,this.data=We}}e.SemanticTokens=Ai;class Ni{constructor(We,rt,St){this.start=We,this.deleteCount=rt,this.data=St}}e.SemanticTokensEdit=Ni;class Ii{constructor(We,rt){this.resultId=rt,this.edits=We}}e.SemanticTokensEdits=Ii;var Tn;(function(Ue){Ue[Ue.Separate=0]="Separate",Ue[Ue.MergeWithParent=1]="MergeWithParent"})(Tn||(e.DebugConsoleMode=Tn={}));let Xi=class{static{this.Back={iconPath:new Kt("arrow-left")}}constructor(){}};e.QuickInputButtons=Xi,e.QuickInputButtons=Xi=fe([M],Xi);var _n;(function(Ue){Ue[Ue.Separator=-1]="Separator",Ue[Ue.Default=0]="Default"})(_n||(e.QuickPickItemKind=_n={}));var Dn;(function(Ue){Ue[Ue.Info=1]="Info",Ue[Ue.Warning=2]="Warning",Ue[Ue.Error=3]="Error"})(Dn||(e.InputBoxValidationSeverity=Dn={}));var kn;(function(Ue){Ue[Ue.UI=1]="UI",Ue[Ue.Workspace=2]="Workspace"})(kn||(e.ExtensionKind=kn={}));class Ir{static validate(We){if(typeof We.badge=="string"){let rt=(0,f.nextCharLength)(We.badge,0);if(rt<We.badge.length&&(rt+=(0,f.nextCharLength)(We.badge,rt)),We.badge.length>rt)throw new Error("The 'badge'-property must be undefined or a short character")}else if(We.badge&&!Kt.isThemeIcon(We.badge))throw new Error("The 'badge'-property is not a valid ThemeIcon");if(!We.color&&!We.badge&&!We.tooltip)throw new Error("The decoration is empty");return!0}constructor(We,rt,St){this.badge=We,this.tooltip=rt,this.color=St}}e.FileDecoration=Ir;let Ji=class{constructor(We){this.kind=We}};e.ColorTheme=Ji,e.ColorTheme=Ji=fe([M],Ji);var An;(function(Ue){Ue[Ue.Light=1]="Light",Ue[Ue.Dark=2]="Dark",Ue[Ue.HighContrast=3]="HighContrast",Ue[Ue.HighContrastLight=4]="HighContrastLight"})(An||(e.ColorThemeKind=An={}));class _i{static isNotebookRange(We){return We instanceof _i?!0:We?typeof We.start=="number"&&typeof We.end=="number":!1}get start(){return this._start}get end(){return this._end}get isEmpty(){return this._start===this._end}constructor(We,rt){if(We<0)throw(0,y.illegalArgument)("start must be positive");if(rt<0)throw(0,y.illegalArgument)("end must be positive");We<=rt?(this._start=We,this._end=rt):(this._start=rt,this._end=We)}with(We){let rt=this._start,St=this._end;return We.start!==void 0&&(rt=We.start),We.end!==void 0&&(St=We.end),rt===this._start&&St===this._end?this:new _i(rt,St)}}e.NotebookRange=_i;class zi{static validate(We){if(typeof We.kind!="number")throw new Error("NotebookCellData MUST have 'kind' property");if(typeof We.value!="string")throw new Error("NotebookCellData MUST have 'value' property");if(typeof We.languageId!="string")throw new Error("NotebookCellData MUST have 'languageId' property")}static isNotebookCellDataArray(We){return Array.isArray(We)&&We.every(rt=>zi.isNotebookCellData(rt))}static isNotebookCellData(We){return!0}constructor(We,rt,St,Ut,Jt,si,di){this.kind=We,this.value=rt,this.languageId=St,this.mime=Ut,this.outputs=Jt??[],this.metadata=si,this.executionSummary=di,zi.validate(this)}}e.NotebookCellData=zi;class Tr{constructor(We){this.cells=We}}e.NotebookData=Tr;class Ei{static isNotebookCellOutputItem(We){return We instanceof Ei?!0:We?typeof We.mime=="string"&&We.data instanceof Uint8Array:!1}static error(We){const rt={name:We.name,message:We.message,stack:We.stack};return Ei.json(rt,"application/vnd.code.notebook.error")}static stdout(We){return Ei.text(We,"application/vnd.code.notebook.stdout")}static stderr(We){return Ei.text(We,"application/vnd.code.notebook.stderr")}static bytes(We,rt="application/octet-stream"){return new Ei(We,rt)}static#e=new TextEncoder;static text(We,rt=T.Mimes.text){const St=Ei.#e.encode(String(We));return new Ei(St,rt)}static json(We,rt="text/x-json"){const St=JSON.stringify(We,void 0," ");return Ei.text(St,rt)}constructor(We,rt){this.data=We,this.mime=rt;const St=(0,T.normalizeMimeType)(rt,!0);if(!St)throw new Error(`INVALID mime type: ${rt}. Must be in the format "type/subtype[;optionalparameter]"`);this.mime=St}}e.NotebookCellOutputItem=Ei;class Hi{static isNotebookCellOutput(We){return We instanceof Hi?!0:!We||typeof We!="object"?!1:typeof We.id=="string"&&Array.isArray(We.items)}static ensureUniqueMimeTypes(We,rt=!1){const St=new Set,Ut=new Set;for(let Jt=0;Jt<We.length;Jt++){const si=We[Jt],di=(0,T.normalizeMimeType)(si.mime);if(!St.has(di)||(0,i.isTextStreamMime)(di)){St.add(di);continue}Ut.add(Jt),rt&&console.warn(`DUPLICATED mime type '${si.mime}' will be dropped`)}return Ut.size===0?We:We.filter((Jt,si)=>!Ut.has(si))}constructor(We,rt,St){this.items=Hi.ensureUniqueMimeTypes(We,!0),typeof rt=="string"?(this.id=rt,this.metadata=St):(this.id=(0,S.generateUuid)(),this.metadata=rt??St)}}e.NotebookCellOutput=Hi;var Rn;(function(Ue){Ue[Ue.Markup=1]="Markup",Ue[Ue.Code=2]="Code"})(Rn||(e.NotebookCellKind=Rn={}));var Ln;(function(Ue){Ue[Ue.Idle=1]="Idle",Ue[Ue.Pending=2]="Pending",Ue[Ue.Executing=3]="Executing"})(Ln||(e.NotebookCellExecutionState=Ln={}));var Mn;(function(Ue){Ue[Ue.Left=1]="Left",Ue[Ue.Right=2]="Right"})(Mn||(e.NotebookCellStatusBarAlignment=Mn={}));var Pn;(function(Ue){Ue[Ue.Default=0]="Default",Ue[Ue.InCenter=1]="InCenter",Ue[Ue.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",Ue[Ue.AtTop=3]="AtTop"})(Pn||(e.NotebookEditorRevealType=Pn={}));class _r{constructor(We,rt){this.text=We,this.alignment=rt}}e.NotebookCellStatusBarItem=_r;var Nn;(function(Ue){Ue[Ue.Default=1]="Default",Ue[Ue.Preferred=2]="Preferred"})(Nn||(e.NotebookControllerAffinity=Nn={}));var On;(function(Ue){Ue[Ue.Default=1]="Default",Ue[Ue.Preferred=2]="Preferred",Ue[Ue.Hidden=-1]="Hidden"})(On||(e.NotebookControllerAffinity2=On={}));class Dr{constructor(We,rt=[]){this.uri=We,this.provides=(0,t.asArray)(rt)}}e.NotebookRendererScript=Dr;class kr{constructor(We){this.label=We}}e.NotebookKernelSourceAction=kr;let Zi=class{constructor(We,rt){this.label=We,this.timestamp=rt}};e.TimelineItem=Zi,e.TimelineItem=Zi=fe([M],Zi);var xn;(function(Ue){Ue[Ue.Production=1]="Production",Ue[Ue.Development=2]="Development",Ue[Ue.Test=3]="Test"})(xn||(e.ExtensionMode=xn={}));var Fn;(function(Ue){Ue[Ue.Node=1]="Node",Ue[Ue.Webworker=2]="Webworker"})(Fn||(e.ExtensionRuntime=Fn={}));var Bn;(function(Ue){Ue[Ue.Other=0]="Other",Ue[Ue.Comment=1]="Comment",Ue[Ue.String=2]="String",Ue[Ue.RegEx=3]="RegEx"})(Bn||(e.StandardTokenType=Bn={}));class Ar{constructor(We,rt){this.ranges=We,this.wordPattern=rt}}e.LinkedEditingRanges=Ar;class Rr{constructor(We){this._autoForwardAction=We}get autoForwardAction(){return this._autoForwardAction}}e.PortAttributes=Rr;var Vn;(function(Ue){Ue[Ue.Queued=1]="Queued",Ue[Ue.Running=2]="Running",Ue[Ue.Passed=3]="Passed",Ue[Ue.Failed=4]="Failed",Ue[Ue.Skipped=5]="Skipped",Ue[Ue.Errored=6]="Errored"})(Vn||(e.TestResultState=Vn={}));var Wn;(function(Ue){Ue[Ue.Run=1]="Run",Ue[Ue.Debug=2]="Debug",Ue[Ue.Coverage=3]="Coverage"})(Wn||(e.TestRunProfileKind=Wn={}));let en=class{constructor(We=void 0,rt=void 0,St=void 0,Ut=!1){this.include=We,this.exclude=rt,this.profile=St,this.continuous=Ut}};e.TestRunRequest=en,e.TestRunRequest=en=fe([M],en);let tn=L=class{static diff(We,rt,St){const Ut=new L(We);return Ut.expectedOutput=rt,Ut.actualOutput=St,Ut}constructor(We){this.message=We}};e.TestMessage=tn,e.TestMessage=tn=L=fe([M],tn);let nn=class{constructor(We){this.id=We}};e.TestTag=nn,e.TestTag=nn=fe([M],nn);let Li=class{constructor(We,rt){this.covered=We,this.total=rt}};e.CoveredCount=Li,e.CoveredCount=Li=fe([M],Li);let rn=R=class{static fromDetails(We,rt){const St=new Li(0,0),Ut=new Li(0,0),Jt=new Li(0,0);for(const di of rt)if("branches"in di){St.total+=1,St.covered+=di.executionCount>0?1:0;for(const pi of di.branches)Ut.total+=1,Ut.covered+=pi.executionCount>0?1:0}else Jt.total+=1,Jt.covered+=di.executionCount>0?1:0;const si=new R(We,St,Ut.total>0?Ut:void 0,Jt.total>0?Jt:void 0);return si.detailedCoverage=rt,si}constructor(We,rt,St,Ut){this.uri=We,this.statementCoverage=rt,this.branchCoverage=St,this.functionCoverage=Ut}};e.FileCoverage=rn,e.FileCoverage=rn=R=fe([M],rn);let sn=class{constructor(We,rt,St=[]){this.executionCount=We,this.location=rt,this.branches=St}};e.StatementCoverage=sn,e.StatementCoverage=sn=fe([M],sn);let on=class{constructor(We,rt){this.executionCount=We,this.location=rt}};e.BranchCoverage=on,e.BranchCoverage=on=fe([M],on);let an=class{constructor(We,rt){this.executionCount=We,this.location=rt}};e.FunctionCoverage=an,e.FunctionCoverage=an=fe([M],an);var zn;(function(Ue){Ue[Ue.None=0]="None",Ue[Ue.Option=1]="Option",Ue[Ue.Default=2]="Default",Ue[Ue.Preferred=3]="Preferred"})(zn||(e.ExternalUriOpenerPriority=zn={}));var Hn;(function(Ue){Ue[Ue.Untrusted=0]="Untrusted",Ue[Ue.Trusted=1]="Trusted",Ue[Ue.Unspecified=2]="Unspecified"})(Hn||(e.WorkspaceTrustState=Hn={}));var Un;(function(Ue){Ue[Ue.Notify=1]="Notify",Ue[Ue.OpenBrowser=2]="OpenBrowser",Ue[Ue.OpenPreview=3]="OpenPreview",Ue[Ue.Silent=4]="Silent",Ue[Ue.Ignore=5]="Ignore",Ue[Ue.OpenBrowserOnce=6]="OpenBrowserOnce"})(Un||(e.PortAutoForwardAction=Un={}));class Lr{constructor(We,rt,St,Ut,Jt,si){this.kind=We,this.name=rt,this.detail=St,this.uri=Ut,this.range=Jt,this.selectionRange=si}}e.TypeHierarchyItem=Lr;class Mr{constructor(We){this.uri=We}}e.TextTabInput=Mr;class Pr{constructor(We,rt){this.original=We,this.modified=rt}}e.TextDiffTabInput=Pr;class Nr{constructor(We,rt,St,Ut){this.base=We,this.input1=rt,this.input2=St,this.result=Ut}}e.TextMergeTabInput=Nr;class Or{constructor(We,rt){this.uri=We,this.viewType=rt}}e.CustomEditorTabInput=Or;class xr{constructor(We){this.viewType=We}}e.WebviewEditorTabInput=xr;class Fr{constructor(We,rt){this.uri=We,this.notebookType=rt}}e.NotebookEditorTabInput=Fr;class Br{constructor(We,rt,St){this.original=We,this.modified=rt,this.notebookType=St}}e.NotebookDiffEditorTabInput=Br;class Vr{constructor(){}}e.TerminalEditorTabInput=Vr;class Wr{constructor(We,rt){this.uri=We,this.inputBoxUri=rt}}e.InteractiveWindowInput=Wr;var Kn;(function(Ue){Ue[Ue.Up=1]="Up",Ue[Ue.Down=2]="Down"})(Kn||(e.InteractiveSessionVoteDirection=Kn={}));var qn;(function(Ue){Ue[Ue.Action=1]="Action",Ue[Ue.Toolbar=2]="Toolbar"})(qn||(e.InteractiveSessionCopyKind=qn={}));var Gn;(function(Ue){Ue[Ue.Unhelpful=0]="Unhelpful",Ue[Ue.Helpful=1]="Helpful",Ue[Ue.Undone=2]="Undone",Ue[Ue.Accepted=3]="Accepted"})(Gn||(e.InteractiveEditorResponseFeedbackKind=Gn={}));var $n;(function(Ue){Ue[Ue.System=0]="System",Ue[Ue.User=1]="User",Ue[Ue.Assistant=2]="Assistant",Ue[Ue.Function=3]="Function"})($n||(e.ChatMessageRole=$n={}));var jn;(function(Ue){Ue[Ue.Short=1]="Short",Ue[Ue.Medium=2]="Medium",Ue[Ue.Full=3]="Full"})(jn||(e.ChatVariableLevel=jn={}));class zr{constructor(We,rt){this.role=We,this.content=rt}}e.ChatMessage=zr;var Qn;(function(Ue){Ue[Ue.SymbolInformation=1]="SymbolInformation",Ue[Ue.CommandInformation=2]="CommandInformation",Ue[Ue.SearchInformation=3]="SearchInformation",Ue[Ue.SettingInformation=4]="SettingInformation"})(Qn||(e.RelatedInformationType=Qn={}))}),define(Q[196],Y([1,0,732]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.env=e.executionPlan=e.designers=e.TextType=e.ButtonType=e.SqlAssessmentResultItemKind=e.SqlAssessmentTargetType=e.TabOrientation=e.NotebookChangeKind=e.ActionOnCellCheckboxCheck=e.ColumnType=e.SchemaObjectType=e.SchemaCompareEndpointType=e.SchemaDifferenceType=e.SchemaUpdateAction=e.ConnectionProfile=e.NotebookEditOperationType=e.CellRange=e.FutureMessageType=e.SqlThemeIcon=e.TreeItem=e.NodeFilterOperator=e.NodeFilterPropertyDataType=e.AzureResource=e.TreeComponentItem=e.DatabaseEngineEdition=e.Orientation=e.CardType=e.DeclarativeDataType=e.DataProviderType=e.StatusIndicator=e.MessageLevel=e.ComponentEventType=e.ProfilingSessionType=e.StepCompletionAction=e.AgentSubSystem=e.ColumnSizingMode=e.ModelViewAction=e.ModelComponentTypes=e.FrequencyRelativeIntervals=e.FrequencySubDayTypes=e.FrequencyTypes=e.AlertType=e.JobExecutionStatus=e.JobCompletionActionCondition=e.NotifyMethods=e.WeekDays=e.ScriptOperation=e.TaskExecutionMode=e.TaskStatus=e.ExtensionNodeType=e.EditRowState=e.MetadataType=e.ConnectionOptionSpecialType=e.ServiceOptionType=void 0;var y;(function(ne){ne.string="string",ne.multistring="multistring",ne.password="password",ne.number="number",ne.category="category",ne.boolean="boolean",ne.object="object"})(y||(e.ServiceOptionType=y={}));var b;(function(ne){ne.connectionName="connectionName",ne.serverName="serverName",ne.databaseName="databaseName",ne.authType="authType",ne.userName="userName",ne.password="password",ne.appName="appName"})(b||(e.ConnectionOptionSpecialType=b={}));var D;(function(ne){ne[ne.Table=0]="Table",ne[ne.View=1]="View",ne[ne.SProc=2]="SProc",ne[ne.Function=3]="Function"})(D||(e.MetadataType=D={}));var T;(function(ne){ne[ne.clean=0]="clean",ne[ne.dirtyInsert=1]="dirtyInsert",ne[ne.dirtyDelete=2]="dirtyDelete",ne[ne.dirtyUpdate=3]="dirtyUpdate"})(T||(e.EditRowState=T={}));var f;(function(ne){ne.Server="Server",ne.Database="Database"})(f||(e.ExtensionNodeType=f={}));var v;(function(ne){ne[ne.NotStarted=0]="NotStarted",ne[ne.InProgress=1]="InProgress",ne[ne.Succeeded=2]="Succeeded",ne[ne.SucceededWithWarning=3]="SucceededWithWarning",ne[ne.Failed=4]="Failed",ne[ne.Canceled=5]="Canceled",ne[ne.Canceling=6]="Canceling"})(v||(e.TaskStatus=v={}));var m;(function(ne){ne[ne.execute=0]="execute",ne[ne.script=1]="script",ne[ne.executeAndScript=2]="executeAndScript"})(m||(e.TaskExecutionMode=m={}));var S;(function(ne){ne[ne.Select=0]="Select",ne[ne.Create=1]="Create",ne[ne.Insert=2]="Insert",ne[ne.Update=3]="Update",ne[ne.Delete=4]="Delete",ne[ne.Execute=5]="Execute",ne[ne.Alter=6]="Alter"})(S||(e.ScriptOperation=S={}));var h;(function(ne){ne[ne.sunday=1]="sunday",ne[ne.monday=2]="monday",ne[ne.tuesday=4]="tuesday",ne[ne.wednesday=8]="wednesday",ne[ne.thursday=16]="thursday",ne[ne.friday=32]="friday",ne[ne.weekDays=62]="weekDays",ne[ne.saturday=64]="saturday",ne[ne.weekEnds=65]="weekEnds",ne[ne.everyDay=127]="everyDay"})(h||(e.WeekDays=h={}));var a;(function(ne){ne[ne.none=0]="none",ne[ne.notifyEmail=1]="notifyEmail",ne[ne.pager=2]="pager",ne[ne.netSend=4]="netSend",ne[ne.notifyAll=7]="notifyAll"})(a||(e.NotifyMethods=a={}));var r;(function(ne){ne[ne.Never=0]="Never",ne[ne.OnSuccess=1]="OnSuccess",ne[ne.OnFailure=2]="OnFailure",ne[ne.Always=3]="Always"})(r||(e.JobCompletionActionCondition=r={}));var i;(function(ne){ne[ne.Executing=1]="Executing",ne[ne.WaitingForWorkerThread=2]="WaitingForWorkerThread",ne[ne.BetweenRetries=3]="BetweenRetries",ne[ne.Idle=4]="Idle",ne[ne.Suspended=5]="Suspended",ne[ne.WaitingForStepToFinish=6]="WaitingForStepToFinish",ne[ne.PerformingCompletionAction=7]="PerformingCompletionAction"})(i||(e.JobExecutionStatus=i={}));var s;(function(ne){ne[ne.sqlServerEvent=1]="sqlServerEvent",ne[ne.sqlServerPerformanceCondition=2]="sqlServerPerformanceCondition",ne[ne.nonSqlServerEvent=3]="nonSqlServerEvent",ne[ne.wmiEvent=4]="wmiEvent"})(s||(e.AlertType=s={}));var o;(function(ne){ne[ne.Unknown=0]="Unknown",ne[ne.OneTime=2]="OneTime",ne[ne.Daily=4]="Daily",ne[ne.Weekly=8]="Weekly",ne[ne.Monthly=16]="Monthly",ne[ne.MonthlyRelative=32]="MonthlyRelative",ne[ne.AutoStart=64]="AutoStart",ne[ne.OnIdle=128]="OnIdle"})(o||(e.FrequencyTypes=o={}));var u;(function(ne){ne[ne.Unknown=0]="Unknown",ne[ne.Once=1]="Once",ne[ne.Second=2]="Second",ne[ne.Minute=4]="Minute",ne[ne.Hour=8]="Hour"})(u||(e.FrequencySubDayTypes=u={}));var d;(function(ne){ne[ne.First=1]="First",ne[ne.Second=2]="Second",ne[ne.Third=4]="Third",ne[ne.Fourth=8]="Fourth",ne[ne.Last=16]="Last"})(d||(e.FrequencyRelativeIntervals=d={}));var p;(function(ne){ne[ne.NavContainer=0]="NavContainer",ne[ne.DivContainer=1]="DivContainer",ne[ne.FlexContainer=2]="FlexContainer",ne[ne.SplitViewContainer=3]="SplitViewContainer",ne[ne.Card=4]="Card",ne[ne.InputBox=5]="InputBox",ne[ne.DropDown=6]="DropDown",ne[ne.DeclarativeTable=7]="DeclarativeTable",ne[ne.ListBox=8]="ListBox",ne[ne.Button=9]="Button",ne[ne.CheckBox=10]="CheckBox",ne[ne.RadioButton=11]="RadioButton",ne[ne.WebView=12]="WebView",ne[ne.Text=13]="Text",ne[ne.Table=14]="Table",ne[ne.DashboardWidget=15]="DashboardWidget",ne[ne.DashboardWebview=16]="DashboardWebview",ne[ne.Form=17]="Form",ne[ne.Group=18]="Group",ne[ne.Toolbar=19]="Toolbar",ne[ne.LoadingComponent=20]="LoadingComponent",ne[ne.TreeComponent=21]="TreeComponent",ne[ne.FileBrowserTree=22]="FileBrowserTree",ne[ne.Editor=23]="Editor",ne[ne.DiffEditor=24]="DiffEditor",ne[ne.Hyperlink=25]="Hyperlink",ne[ne.Image=26]="Image",ne[ne.RadioCardGroup=27]="RadioCardGroup",ne[ne.ListView=28]="ListView",ne[ne.TabbedPanel=29]="TabbedPanel",ne[ne.Separator=30]="Separator",ne[ne.PropertiesContainer=31]="PropertiesContainer",ne[ne.InfoBox=32]="InfoBox",ne[ne.Slider=33]="Slider",ne[ne.ExecutionPlan=34]="ExecutionPlan",ne[ne.Chart=35]="Chart"})(p||(e.ModelComponentTypes=p={}));var c;(function(ne){ne.SelectTab="selectTab",ne.AppendData="appendData",ne.Filter="filter",ne.SetActiveCell="setActiveCell"})(c||(e.ModelViewAction=c={}));var l;(function(ne){ne[ne.ForceFit=0]="ForceFit",ne[ne.AutoFit=1]="AutoFit",ne[ne.DataFit=2]="DataFit"})(l||(e.ColumnSizingMode=l={}));var n;(function(ne){ne[ne.TransactSql=1]="TransactSql",ne[ne.ActiveScripting=2]="ActiveScripting",ne[ne.CmdExec=3]="CmdExec",ne[ne.Snapshot=4]="Snapshot",ne[ne.LogReader=5]="LogReader",ne[ne.Distribution=6]="Distribution",ne[ne.Merge=7]="Merge",ne[ne.QueueReader=8]="QueueReader",ne[ne.AnalysisQuery=9]="AnalysisQuery",ne[ne.AnalysisCommands=10]="AnalysisCommands",ne[ne.Ssis=11]="Ssis",ne[ne.PowerShell=12]="PowerShell"})(n||(e.AgentSubSystem=n={}));var g;(function(ne){ne[ne.QuitWithSuccess=1]="QuitWithSuccess",ne[ne.QuitWithFailure=2]="QuitWithFailure",ne[ne.GoToNextStep=3]="GoToNextStep",ne[ne.GoToStep=4]="GoToStep"})(g||(e.StepCompletionAction=g={}));var w;(function(ne){ne[ne.RemoteSession=0]="RemoteSession",ne[ne.LocalFile=1]="LocalFile"})(w||(e.ProfilingSessionType=w={}));var E;(function(ne){ne[ne.PropertiesChanged=0]="PropertiesChanged",ne[ne.onDidChange=1]="onDidChange",ne[ne.onDidClick=2]="onDidClick",ne[ne.validityChanged=3]="validityChanged",ne[ne.onMessage=4]="onMessage",ne[ne.onSelectedRowChanged=5]="onSelectedRowChanged",ne[ne.onComponentCreated=6]="onComponentCreated",ne[ne.onCellAction=7]="onCellAction",ne[ne.onEnterKeyPressed=8]="onEnterKeyPressed",ne[ne.onInput=9]="onInput",ne[ne.onComponentLoaded=10]="onComponentLoaded",ne[ne.onChildClick=11]="onChildClick"})(E||(e.ComponentEventType=E={}));var C;(function(ne){ne[ne.Error=0]="Error",ne[ne.Warning=1]="Warning",ne[ne.Information=2]="Information"})(C||(e.MessageLevel=C={}));var I;(function(ne){ne[ne.None=0]="None",ne[ne.Ok=1]="Ok",ne[ne.Warning=2]="Warning",ne[ne.Error=3]="Error"})(I||(e.StatusIndicator=I={}));var _;(function(ne){ne.ConnectionProvider="ConnectionProvider",ne.BackupProvider="BackupProvider",ne.RestoreProvider="RestoreProvider",ne.ScriptingProvider="ScriptingProvider",ne.ObjectExplorerProvider="ObjectExplorerProvider",ne.TaskServicesProvider="TaskServicesProvider",ne.FileBrowserProvider="FileBrowserProvider",ne.ProfilerProvider="ProfilerProvider",ne.MetadataProvider="MetadataProvider",ne.QueryProvider="QueryProvider",ne.AdminServicesProvider="AdminServicesProvider",ne.AgentServicesProvider="AgentServicesProvider",ne.CapabilitiesProvider="CapabilitiesProvider",ne.ObjectExplorerNodeProvider="ObjectExplorerNodeProvider",ne.SerializationProvider="SerializationProvider",ne.IconProvider="IconProvider",ne.SqlAssessmentServicesProvider="SqlAssessmentServicesProvider",ne.DataGridProvider="DataGridProvider",ne.TableDesignerProvider="TableDesignerProvider",ne.ExecutionPlanProvider="ExecutionPlanProvider",ne.ServerContextualizationProvider="ServerContextualizationProvider"})(_||(e.DataProviderType=_={}));var A;(function(ne){ne.string="string",ne.category="category",ne.boolean="boolean",ne.editableCategory="editableCategory",ne.component="component",ne.menu="menu"})(A||(e.DeclarativeDataType=A={}));var k;(function(ne){ne.VerticalButton="VerticalButton",ne.Details="Details",ne.ListItem="ListItem",ne.Image="Image"})(k||(e.CardType=k={}));var L;(function(ne){ne.Horizontal="horizontal",ne.Vertical="vertical"})(L||(e.Orientation=L={}));var R;(function(ne){ne[ne.Unknown=0]="Unknown",ne[ne.Personal=1]="Personal",ne[ne.Standard=2]="Standard",ne[ne.Enterprise=3]="Enterprise",ne[ne.Express=4]="Express",ne[ne.SqlDatabase=5]="SqlDatabase",ne[ne.SqlDataWarehouse=6]="SqlDataWarehouse",ne[ne.SqlStretchDatabase=7]="SqlStretchDatabase",ne[ne.SqlManagedInstance=8]="SqlManagedInstance",ne[ne.SqlOnDemand=11]="SqlOnDemand",ne[ne.SqlDbFabric=12]="SqlDbFabric"})(R||(e.DatabaseEngineEdition=R={}));class M extends t.TreeItem{}e.TreeComponentItem=M;var N;(function(ne){ne[ne.ResourceManagement=0]="ResourceManagement",ne[ne.Sql=1]="Sql",ne[ne.OssRdbms=2]="OssRdbms",ne[ne.AzureKeyVault=3]="AzureKeyVault",ne[ne.MicrosoftResourceManagement=5]="MicrosoftResourceManagement",ne[ne.AzureDevOps=6]="AzureDevOps",ne[ne.MsGraph=7]="MsGraph",ne[ne.AzureLogAnalytics=8]="AzureLogAnalytics",ne[ne.AzureStorage=9]="AzureStorage",ne[ne.AzureKusto=10]="AzureKusto",ne[ne.PowerBi=11]="PowerBi",ne[ne.Custom=12]="Custom"})(N||(e.AzureResource=N={}));var P;(function(ne){ne[ne.String=0]="String",ne[ne.Number=1]="Number",ne[ne.Boolean=2]="Boolean",ne[ne.Date=3]="Date",ne[ne.Choice=4]="Choice"})(P||(e.NodeFilterPropertyDataType=P={}));var x;(function(ne){ne[ne.Equals=0]="Equals",ne[ne.NotEquals=1]="NotEquals",ne[ne.LessThan=2]="LessThan",ne[ne.LessThanOrEquals=3]="LessThanOrEquals",ne[ne.GreaterThan=4]="GreaterThan",ne[ne.GreaterThanOrEquals=5]="GreaterThanOrEquals",ne[ne.Between=6]="Between",ne[ne.NotBetween=7]="NotBetween",ne[ne.Contains=8]="Contains",ne[ne.NotContains=9]="NotContains",ne[ne.StartsWith=10]="StartsWith",ne[ne.NotStartsWith=11]="NotStartsWith",ne[ne.EndsWith=12]="EndsWith",ne[ne.NotEndsWith=13]="NotEndsWith"})(x||(e.NodeFilterOperator=x={}));class F extends t.TreeItem{}e.TreeItem=F;class V{static{this.Folder=new V("Folder")}static{this.Root=new V("root")}static{this.Database=new V("Database")}static{this.Server=new V("Server")}static{this.ScalarValuedFunction=new V("ScalarValuedFunction")}static{this.TableValuedFunction=new V("TableValuedFunction")}static{this.AggregateFunction=new V("AggregateFunction")}static{this.FileGroup=new V("FileGroup")}static{this.StoredProcedure=new V("StoredProcedure")}static{this.UserDefinedTableType=new V("UserDefinedTableType")}static{this.View=new V("View")}static{this.Table=new V("Table")}static{this.HistoryTable=new V("HistoryTable")}static{this.ServerLevelLinkedServerLogin=new V("ServerLevelLinkedServerLogin")}static{this.ServerLevelServerAudit=new V("ServerLevelServerAudit")}static{this.ServerLevelCryptographicProvider=new V("ServerLevelCryptographicProvider")}static{this.ServerLevelCredential=new V("ServerLevelCredential")}static{this.ServerLevelServerRole=new V("ServerLevelServerRole")}static{this.ServerLevelLogin=new V("ServerLevelLogin")}static{this.ServerLevelServerAuditSpecification=new V("ServerLevelServerAuditSpecification")}static{this.ServerLevelServerTrigger=new V("ServerLevelServerTrigger")}static{this.ServerLevelLinkedServer=new V("ServerLevelLinkedServer")}static{this.ServerLevelEndpoint=new V("ServerLevelEndpoint")}static{this.Synonym=new V("Synonym")}static{this.DatabaseTrigger=new V("DatabaseTrigger")}static{this.Assembly=new V("Assembly")}static{this.MessageType=new V("MessageType")}static{this.Contract=new V("Contract")}static{this.Queue=new V("Queue")}static{this.Service=new V("Service")}static{this.Route=new V("Route")}static{this.DatabaseAndQueueEventNotification=new V("DatabaseAndQueueEventNotification")}static{this.RemoteServiceBinding=new V("RemoteServiceBinding")}static{this.BrokerPriority=new V("BrokerPriority")}static{this.FullTextCatalog=new V("FullTextCatalog")}static{this.FullTextStopList=new V("FullTextStopList")}static{this.SqlLogFile=new V("SqlLogFile")}static{this.PartitionFunction=new V("PartitionFunction")}static{this.PartitionScheme=new V("PartitionScheme")}static{this.SearchPropertyList=new V("SearchPropertyList")}static{this.User=new V("User")}static{this.Schema=new V("Schema")}static{this.AsymmetricKey=new V("AsymmetricKey")}static{this.Certificate=new V("Certificate")}static{this.SymmetricKey=new V("SymmetricKey")}static{this.DatabaseEncryptionKey=new V("DatabaseEncryptionKey")}static{this.MasterKey=new V("MasterKey")}static{this.DatabaseAuditSpecification=new V("DatabaseAuditSpecification")}static{this.Column=new V("Column")}static{this.Key=new V("Key")}static{this.Constraint=new V("Constraint")}static{this.Trigger=new V("Trigger")}static{this.Index=new V("Index")}static{this.Statistic=new V("Statistic")}static{this.UserDefinedDataType=new V("UserDefinedDataType")}static{this.UserDefinedType=new V("UserDefinedType")}static{this.XmlSchemaCollection=new V("XmlSchemaCollection")}static{this.SystemExactNumeric=new V("SystemExactNumeric")}static{this.SystemApproximateNumeric=new V("SystemApproximateNumeric")}static{this.SystemDateAndTime=new V("SystemDateAndTime")}static{this.SystemCharacterString=new V("SystemCharacterString")}static{this.SystemUnicodeCharacterString=new V("SystemUnicodeCharacterString")}static{this.SystemBinaryString=new V("SystemBinaryString")}static{this.SystemOtherDataType=new V("SystemOtherDataType")}static{this.SystemClrDataType=new V("SystemClrDataType")}static{this.SystemSpatialDataType=new V("SystemSpatialDataType")}static{this.UserDefinedTableTypeColumn=new V("UserDefinedTableTypeColumn")}static{this.UserDefinedTableTypeKey=new V("UserDefinedTableTypeKey")}static{this.UserDefinedTableTypeConstraint=new V("UserDefinedTableTypeConstraint")}static{this.StoredProcedureParameter=new V("StoredProcedureParameter")}static{this.TableValuedFunctionParameter=new V("TableValuedFunctionParameter")}static{this.ScalarValuedFunctionParameter=new V("ScalarValuedFunctionParameter")}static{this.AggregateFunctionParameter=new V("AggregateFunctionParameter")}static{this.DatabaseRole=new V("DatabaseRole")}static{this.ApplicationRole=new V("ApplicationRole")}static{this.FileGroupFile=new V("FileGroupFile")}static{this.SystemMessageType=new V("SystemMessageType")}static{this.SystemContract=new V("SystemContract")}static{this.SystemService=new V("SystemService")}static{this.SystemQueue=new V("SystemQueue")}static{this.Sequence=new V("Sequence")}static{this.SecurityPolicy=new V("SecurityPolicy")}static{this.DatabaseScopedCredential=new V("DatabaseScopedCredential")}static{this.ExternalResource=new V("ExternalResource")}static{this.ExternalDataSource=new V("ExternalDataSource")}static{this.ExternalFileFormat=new V("ExternalFileFormat")}static{this.ExternalTable=new V("ExternalTable")}static{this.ColumnMasterKey=new V("ColumnMasterKey")}static{this.ColumnEncryptionKey=new V("ColumnEncryptionKey")}static{this.GraphEdge=new V("GraphEdge")}static{this.GraphNode=new V("GraphNode")}constructor(ce){this.id=ce}}e.SqlThemeIcon=V;var W;(function(ne){ne[ne.Reply=0]="Reply",ne[ne.StdIn=1]="StdIn",ne[ne.IOPub=2]="IOPub"})(W||(e.FutureMessageType=W={}));class z{get start(){return this._start}get end(){return this._end}constructor(ce,ae){if(typeof ce!="number"||typeof ae!="number"||ce<0||ae<0)throw new Error("Invalid arguments");ce<=ae?(this._start=ce,this._end=ae):(this._start=ae,this._end=ce)}}e.CellRange=z;var B;(function(ne){ne[ne.InsertCell=0]="InsertCell",ne[ne.DeleteCell=1]="DeleteCell",ne[ne.ReplaceCells=2]="ReplaceCells",ne[ne.UpdateCell=3]="UpdateCell",ne[ne.UpdateCellOutput=4]="UpdateCellOutput"})(B||(e.NotebookEditOperationType=B={}));class K{constructor(){this.options={}}get providerId(){return this.options.providerId}set providerId(ce){this.options.providerId=ce}get connectionId(){return this.options.connectionId}set connectionId(ce){this.options.connectionId=ce}get connectionName(){return this.options.connectionName}set connectionName(ce){this.options.connectionName=ce}get serverName(){return this.options.serverName}set serverName(ce){this.options.serverName=ce}get databaseName(){return this.options.databaseName}set databaseName(ce){this.options.databaseName=ce}get userName(){return this.options.userName}set userName(ce){this.options.userName=ce}get password(){return this.options.password}set password(ce){this.options.password=ce}get authenticationType(){return this.options.authenticationType}set authenticationType(ce){this.options.authenticationType=ce}get savePassword(){return this.options.savePassword}set savePassword(ce){this.options.savePassword=ce}get groupFullName(){return this.options.groupFullName}set groupFullName(ce){this.options.groupFullName=ce}get groupId(){return this.options.groupId}set groupId(ce){this.options.groupId=ce}get saveProfile(){return this.options.groupId}set saveProfile(ce){this.options.groupId=ce}get azureTenantId(){return this.options.azureTenantId}set azureTenantId(ce){this.options.azureTenantId=ce}get azureAccount(){return this.options.azureAccount}set azureAccount(ce){this.options.azureAccount=ce}static createFrom(ce){let ae=new K;return ae.options=ce,ae}}e.ConnectionProfile=K;var H;(function(ne){ne[ne.Delete=0]="Delete",ne[ne.Change=1]="Change",ne[ne.Add=2]="Add"})(H||(e.SchemaUpdateAction=H={}));var U;(function(ne){ne[ne.Object=0]="Object",ne[ne.Property=1]="Property"})(U||(e.SchemaDifferenceType=U={}));var G;(function(ne){ne[ne.Database=0]="Database",ne[ne.Dacpac=1]="Dacpac"})(G||(e.SchemaCompareEndpointType=G={}));var $;(function(ne){ne[ne.Aggregates=0]="Aggregates",ne[ne.ApplicationRoles=1]="ApplicationRoles",ne[ne.Assemblies=2]="Assemblies",ne[ne.AssemblyFiles=3]="AssemblyFiles",ne[ne.AsymmetricKeys=4]="AsymmetricKeys",ne[ne.BrokerPriorities=5]="BrokerPriorities",ne[ne.Certificates=6]="Certificates",ne[ne.ColumnEncryptionKeys=7]="ColumnEncryptionKeys",ne[ne.ColumnMasterKeys=8]="ColumnMasterKeys",ne[ne.Contracts=9]="Contracts",ne[ne.DatabaseOptions=10]="DatabaseOptions",ne[ne.DatabaseRoles=11]="DatabaseRoles",ne[ne.DatabaseTriggers=12]="DatabaseTriggers",ne[ne.Defaults=13]="Defaults",ne[ne.ExtendedProperties=14]="ExtendedProperties",ne[ne.ExternalDataSources=15]="ExternalDataSources",ne[ne.ExternalFileFormats=16]="ExternalFileFormats",ne[ne.ExternalTables=17]="ExternalTables",ne[ne.Filegroups=18]="Filegroups",ne[ne.FileTables=19]="FileTables",ne[ne.FullTextCatalogs=20]="FullTextCatalogs",ne[ne.FullTextStoplists=21]="FullTextStoplists",ne[ne.MessageTypes=22]="MessageTypes",ne[ne.PartitionFunctions=23]="PartitionFunctions",ne[ne.PartitionSchemes=24]="PartitionSchemes",ne[ne.Permissions=25]="Permissions",ne[ne.Queues=26]="Queues",ne[ne.RemoteServiceBindings=27]="RemoteServiceBindings",ne[ne.RoleMembership=28]="RoleMembership",ne[ne.Rules=29]="Rules",ne[ne.ScalarValuedFunctions=30]="ScalarValuedFunctions",ne[ne.SearchPropertyLists=31]="SearchPropertyLists",ne[ne.SecurityPolicies=32]="SecurityPolicies",ne[ne.Sequences=33]="Sequences",ne[ne.Services=34]="Services",ne[ne.Signatures=35]="Signatures",ne[ne.StoredProcedures=36]="StoredProcedures",ne[ne.SymmetricKeys=37]="SymmetricKeys",ne[ne.Synonyms=38]="Synonyms",ne[ne.Tables=39]="Tables",ne[ne.TableValuedFunctions=40]="TableValuedFunctions",ne[ne.UserDefinedDataTypes=41]="UserDefinedDataTypes",ne[ne.UserDefinedTableTypes=42]="UserDefinedTableTypes",ne[ne.ClrUserDefinedTypes=43]="ClrUserDefinedTypes",ne[ne.Users=44]="Users",ne[ne.Views=45]="Views",ne[ne.XmlSchemaCollections=46]="XmlSchemaCollections",ne[ne.Audits=47]="Audits",ne[ne.Credentials=48]="Credentials",ne[ne.CryptographicProviders=49]="CryptographicProviders",ne[ne.DatabaseAuditSpecifications=50]="DatabaseAuditSpecifications",ne[ne.DatabaseEncryptionKeys=51]="DatabaseEncryptionKeys",ne[ne.DatabaseScopedCredentials=52]="DatabaseScopedCredentials",ne[ne.Endpoints=53]="Endpoints",ne[ne.ErrorMessages=54]="ErrorMessages",ne[ne.EventNotifications=55]="EventNotifications",ne[ne.EventSessions=56]="EventSessions",ne[ne.LinkedServerLogins=57]="LinkedServerLogins",ne[ne.LinkedServers=58]="LinkedServers",ne[ne.Logins=59]="Logins",ne[ne.MasterKeys=60]="MasterKeys",ne[ne.Routes=61]="Routes",ne[ne.ServerAuditSpecifications=62]="ServerAuditSpecifications",ne[ne.ServerRoleMembership=63]="ServerRoleMembership",ne[ne.ServerRoles=64]="ServerRoles",ne[ne.ServerTriggers=65]="ServerTriggers"})($||(e.SchemaObjectType=$={}));var ie;(function(ne){ne[ne.text=0]="text",ne[ne.checkBox=1]="checkBox",ne[ne.button=2]="button",ne[ne.icon=3]="icon",ne[ne.hyperlink=4]="hyperlink",ne[ne.contextMenu=5]="contextMenu"})(ie||(e.ColumnType=ie={}));var J;(function(ne){ne[ne.selectRow=0]="selectRow",ne[ne.customAction=1]="customAction"})(J||(e.ActionOnCellCheckboxCheck=J={}));var j;(function(ne){ne[ne.ContentUpdated=0]="ContentUpdated",ne[ne.MetadataUpdated=1]="MetadataUpdated",ne[ne.Save=2]="Save",ne[ne.CellExecuted=3]="CellExecuted"})(j||(e.NotebookChangeKind=j={}));var ee;(function(ne){ne.Vertical="vertical",ne.Horizontal="horizontal"})(ee||(e.TabOrientation=ee={}));var X;(function(ne){ne[ne.Server=1]="Server",ne[ne.Database=2]="Database"})(X||(e.SqlAssessmentTargetType=X={}));var te;(function(ne){ne[ne.RealResult=0]="RealResult",ne[ne.Warning=1]="Warning",ne[ne.Error=2]="Error"})(te||(e.SqlAssessmentResultItemKind=te={}));var Z;(function(ne){ne.File="File",ne.Normal="Normal",ne.Informational="Informational"})(Z||(e.ButtonType=Z={}));var se;(function(ne){ne.Normal="Normal",ne.Error="Error",ne.UnorderedList="UnorderedList",ne.OrderedList="OrderedList"})(se||(e.TextType=se={}));var re;(function(ne){let ce;(function(Se){Se.Schema="schema",Se.Name="name",Se.Description="description",Se.Columns="columns",Se.Script="script",Se.ForeignKeys="foreignKeys",Se.CheckConstraints="checkConstraints",Se.Indexes="indexes",Se.PrimaryKey="primaryKey",Se.PrimaryKeyName="primaryKeyName",Se.PrimaryKeyDescription="primaryKeyDescription",Se.PrimaryKeyColumns="primaryKeyColumns"})(ce=ne.TableProperty||(ne.TableProperty={}));let ae;(function(Se){Se.Name="name",Se.Description="description",Se.AdvancedType="advancedType",Se.Type="type",Se.AllowNulls="allowNulls",Se.DefaultValue="defaultValue",Se.Length="length",Se.IsPrimaryKey="isPrimaryKey",Se.Precision="precision",Se.Scale="scale"})(ae=ne.TableColumnProperty||(ne.TableColumnProperty={}));let ue;(function(Se){Se.Name="name",Se.Description="description",Se.ForeignTable="foreignTable",Se.OnDeleteAction="onDeleteAction",Se.OnUpdateAction="onUpdateAction",Se.Columns="columns"})(ue=ne.TableForeignKeyProperty||(ne.TableForeignKeyProperty={}));let de;(function(Se){Se.Column="column",Se.ForeignColumn="foreignColumn"})(de=ne.ForeignKeyColumnMappingProperty||(ne.ForeignKeyColumnMappingProperty={}));let ge;(function(Se){Se.Name="name",Se.Description="description",Se.Expression="expression"})(ge=ne.TableCheckConstraintProperty||(ne.TableCheckConstraintProperty={}));let he;(function(Se){Se.Name="name",Se.Description="description",Se.Columns="columns"})(he=ne.TableIndexProperty||(ne.TableIndexProperty={}));let be;(function(Se){Se.Column="column"})(be=ne.TableIndexColumnSpecificationProperty||(ne.TableIndexColumnSpecificationProperty={}));let ve;(function(Se){Se[Se.Add=0]="Add",Se[Se.Remove=1]="Remove",Se[Se.Update=2]="Update",Se[Se.Move=3]="Move"})(ve=ne.DesignerEditType||(ne.DesignerEditType={}));let Ie;(function(Se){Se.Basic="Basic",Se.Temporal="Temporal",Se.GraphEdge="GraphEdge",Se.GraphNode="GraphNode"})(Ie=ne.TableIcon||(ne.TableIcon={}))})(re||(e.designers=re={}));var oe;(function(ne){let ce;(function(de){de[de.Warning=0]="Warning",de[de.CriticalWarning=1]="CriticalWarning",de[de.Parallelism=2]="Parallelism"})(ce=ne.BadgeType||(ne.BadgeType={}));let ae;(function(de){de[de.Number=0]="Number",de[de.String=1]="String",de[de.Boolean=2]="Boolean",de[de.Nested=3]="Nested"})(ae=ne.ExecutionPlanGraphElementPropertyDataType||(ne.ExecutionPlanGraphElementPropertyDataType={}));let ue;(function(de){de[de.LowerNumber=0]="LowerNumber",de[de.HigherNumber=1]="HigherNumber",de[de.True=2]="True",de[de.False=3]="False",de[de.None=4]="None"})(ue=ne.ExecutionPlanGraphElementPropertyBetterValue||(ne.ExecutionPlanGraphElementPropertyBetterValue={}))})(oe||(e.executionPlan=oe={}));var le;(function(ne){let ce;(function(ae){ae.stable="stable",ae.insider="insider",ae.dev="dev"})(ce=ne.AppQuality||(ne.AppQuality={}))})(le||(e.env=le={}))}),define(Q[3567],Y([1,0,18,33,196,814]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLReportBuilder=void 0;class T{constructor(v,m,S){this._assessmentResult=v,this._dateUpdated=m,this._connectionInfo=S}build(){return` <html> <head> <title>${D.LocalizedStrings.REPORT_TITLE}</title> </head> <body> <div class="header"> <div>${D.LocalizedStrings.REPORT_TITLE}</div> </div> <div style="font-style: italic;">${new Date(this._dateUpdated).toLocaleString(t.locale)}</div> ${this.buildVersionDetails()} <div style="margin-top: 20px;"> ${this.buildResultsSection()} </div> ${this.buildStyleSection()} </body> </html>`}instanceName(){const v=this._connectionInfo.connectionProfile.serverName;return["local","(local)","(local);"].indexOf(v.toLowerCase())>=0&&this._connectionInfo.serverInfo!==void 0?this._connectionInfo.serverInfo.machineName:v}buildVersionDetails(){return` <div class="details"> <div> <span>${D.LocalizedStrings.API_VERSION} ${this._assessmentResult.apiVersion}</span><br /> <span>${D.LocalizedStrings.DEFAULT_RULESET_VERSION} ${this._assessmentResult.items[0].rulesetVersion}</span> </div> <div> <span>${D.LocalizedStrings.SECTION_TITLE_SQL_SERVER}: ${this._connectionInfo.serverInfo?.serverEdition} ${this._connectionInfo.serverInfo?.serverVersion}</span><br> <span>${D.LocalizedStrings.SERVER_INSTANCENAME} ${this.instanceName()}</span> </div> </div> `}buildResultsSection(){let v=[];this._assessmentResult.items.forEach(S=>{v[S.targetType]===void 0&&(v[S.targetType]=[]),v[S.targetType][S.targetName]===void 0&&(v[S.targetType][S.targetName]=[]),v[S.targetType][S.targetName].push(S)});let m="";return v[b.SqlAssessmentTargetType.Server]!==void 0&&Object.keys(v[b.SqlAssessmentTargetType.Server]).forEach(S=>{m+=this.buildTargetAssessmentSection(v[b.SqlAssessmentTargetType.Server][S])}),v[b.SqlAssessmentTargetType.Database]!==void 0&&Object.keys(v[b.SqlAssessmentTargetType.Database]).forEach(S=>{m+=this.buildTargetAssessmentSection(v[b.SqlAssessmentTargetType.Database][S])}),m}buildTargetAssessmentSection(v){return` <div> <div class="target">${v[0].targetType===b.SqlAssessmentTargetType.Server?D.LocalizedStrings.RESULTS_FOR_INSTANCE:D.LocalizedStrings.RESULTS_FOR_DATABASE}: ${v[0].targetName}</div> ${this.buildSeveritySection(D.LocalizedStrings.REPORT_ERROR,v.filter(S=>S.level==="Error"))} ${this.buildSeveritySection(D.LocalizedStrings.REPORT_WARNING,v.filter(S=>S.level==="Warning"))} ${this.buildSeveritySection(D.LocalizedStrings.REPORT_INFO,v.filter(S=>S.level==="Information"))} </div>`}buildSeveritySection(v,m){return m.length===0?"":` <div class="severityBlock"> <div>${D.LocalizedStrings.REPORT_SEVERITY_MESSAGE(v,m.length)}</div> <table> <tr><th>${D.LocalizedStrings.MESSAGE_COLUMN_NAME}</th><th>${D.LocalizedStrings.HELP_LINK_COLUMN_NAME}</th><th>${D.LocalizedStrings.TAGS_COLUMN_NAME}</th><th>${D.LocalizedStrings.CHECKID_COLUMN_NAME}</th></tr> ${this.buildItemsRows(m)} </table> </div>`}buildItemsRows(v){let m="";return v.forEach(S=>{m+=`<tr> <td>${(0,y.escape)(S.message)}</td> <td><a href='${S.helpLink}' target='_blank;'>${D.LocalizedStrings.LEARN_MORE_LINK}</a></td> <td>${this.formatTags(S.tags)}</td> <td>${S.checkId}</td> </tr>`}),m}formatTags(v){return v?.join(", ")}buildStyleSection(){return` <style> * { color: #4a4a4a; font-family: "Segoe WPC", "Segoe UI", sans-serif; font-size: 14px; } body { margin: 20px; } div { margin-bottom: 10px; } .header>* { font-size: 30px; font-weight: bold; margin-top: 10px; } .target { font-size: 1.7em; } table { border-collapse: collapse; width: 100%; border: 1px solid silver; table-layout: fixed; } table th:nth-child(1) { width: 85%; } table th:nth-child(2) { width: 80px; } table th:nth-child(3) { width: 200px; } table th:nth-child(4) { width: 10%; } table td, table th { border-bottom: 1px solid silver; border-right: 1px dotted silver; padding: 3px 5px; white-space: normal; text-overflow: ellipsis; overflow: hidden; } table th { background-color: silver; } div.severityBlock>div { font-size: larger; } @media print { body { margin: 0; } table th:nth-child(2), table td:nth-child(2) { display:none; } table th:nth-child(3) { width: 120px; } table th:nth-child(4) { width: 150px; } } </style> `}}e.HTMLReportBuilder=T}),define(Q[3568],Y([1,0,34,1981,58,11,49,852,41,25,10,76,1012,62,91,55,3567,63,23,106,107]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";var l,n,g,w,E,C,I;Object.defineProperty(e,"__esModule",{value:!0}),e.AsmtGenerateHTMLReportAction=e.AsmtSamplesLinkAction=e.AsmtExportAsScriptAction=e.AsmtDatabaseInvokeItemsAction=e.AsmtServerInvokeItemsAction=e.AsmtDatabaseSelectItemsAction=e.AsmtServerSelectItemsAction=e.IAsmtActionInfo=void 0;class _{}e.IAsmtActionInfo=_;let A=class extends t.Action{constructor(W,z,B,K,H,U,G){super(W,z,a.TARGET_ICON_CLASS[a.AssessmentTargetType.Server]),this.asmtType=B,this._connectionManagement=K,this._capabilitiesService=H,this._logService=U,this._telemetryService=G}async run(W){if(this._telemetryService.sendActionEvent("SqlAssessment",this.id),W&&W.component&&!W.component.isBusy){W.component.showProgress(this.asmtType);let z=this.getServerItems(W.ownerUri),B=this._connectionManagement.getConnectionUriFromId(W.connectionId),K=this._connectionManagement.getConnectionProfile(B),H=this._connectionManagement.listDatabases(B);W.component.showInitialResults(await z,this.asmtType);let U=await H;if(U)for(let G=0;G<U.databaseNames.length&&W.component.isActive;G++){let $=U.databaseNames[G];const ie=p.ConnectionProfile.fromIConnectionProfile(this._capabilitiesService,K);let J=await this._connectionManagement.connectIfNotConnected(ie.cloneWithDatabase($).clone());this._logService.info(`Database ${$} assessment started`);let j=await this.getDatabaseItems(J);this._logService.info(`Database ${$} assessment completed`),W.component.appendResults(j,this.asmtType)}W.component.stopProgress(this.asmtType)}}};A=fe([O(3,b.IConnectionManagementService),O(4,c.ICapabilitiesService),O(5,D.ILogService),O(6,h.IAdsTelemetryService)],A);let k=class extends A{static{l=this}static{this.ID="asmtaction.server.getitems"}static{this.LABEL=y.localize(0,null)}constructor(W,z,B,K,H){super(l.ID,l.LABEL,a.AssessmentType.AvailableRules,W,z,B,H),this._assessmentService=K}getServerItems(W){return this._assessmentService.getAssessmentItems(W,a.AssessmentTargetType.Server)}getDatabaseItems(W){return this._assessmentService.getAssessmentItems(W,a.AssessmentTargetType.Database)}};e.AsmtServerSelectItemsAction=k,e.AsmtServerSelectItemsAction=k=l=fe([O(0,b.IConnectionManagementService),O(1,c.ICapabilitiesService),O(2,D.ILogService),O(3,f.IAssessmentService),O(4,h.IAdsTelemetryService)],k);let L=class extends t.Action{static{n=this}static{this.ID="asmtaction.database.getitems"}constructor(W,z,B){super(n.ID,y.localize(1,null,W),a.TARGET_ICON_CLASS[a.AssessmentTargetType.Database]),this._assessmentService=z,this._telemetryService=B}async run(W){if(this._telemetryService.sendActionEvent("SqlAssessment",this.id),W&&W.component&&!W.component.isBusy){W.component.showProgress(a.AssessmentType.AvailableRules);let z=await this._assessmentService.getAssessmentItems(W.ownerUri,a.AssessmentTargetType.Database);W.component.showInitialResults(z,a.AssessmentType.AvailableRules),W.component.stopProgress(a.AssessmentType.AvailableRules)}}};e.AsmtDatabaseSelectItemsAction=L,e.AsmtDatabaseSelectItemsAction=L=n=fe([O(1,f.IAssessmentService),O(2,h.IAdsTelemetryService)],L);let R=class extends A{static{g=this}static{this.ID="asmtaction.server.invokeitems"}static{this.LABEL=y.localize(2,null)}constructor(W,z,B,K,H){super(g.ID,g.LABEL,a.AssessmentType.InvokeAssessment,W,z,B,H),this._assessmentService=K}getServerItems(W){return this._logService.info("Requesting server items"),this._assessmentService.assessmentInvoke(W,a.AssessmentTargetType.Server)}getDatabaseItems(W){return this._assessmentService.assessmentInvoke(W,a.AssessmentTargetType.Database)}};e.AsmtServerInvokeItemsAction=R,e.AsmtServerInvokeItemsAction=R=g=fe([O(0,b.IConnectionManagementService),O(1,c.ICapabilitiesService),O(2,D.ILogService),O(3,f.IAssessmentService),O(4,h.IAdsTelemetryService)],R);let M=class extends t.Action{static{w=this}static{this.ID="asmtaction.database.invokeitems"}constructor(W,z,B){super(w.ID,y.localize(3,null,W),a.TARGET_ICON_CLASS[a.AssessmentTargetType.Database]),this._assessmentService=z,this._telemetryService=B}async run(W){if(this._telemetryService.sendActionEvent("SqlAssessment",this.id),W&&W.component&&!W.component.isBusy){W.component.showProgress(a.AssessmentType.InvokeAssessment);let z=await this._assessmentService.assessmentInvoke(W.ownerUri,a.AssessmentTargetType.Database);W.component.showInitialResults(z,a.AssessmentType.InvokeAssessment),W.component.stopProgress(a.AssessmentType.InvokeAssessment)}}};e.AsmtDatabaseInvokeItemsAction=M,e.AsmtDatabaseInvokeItemsAction=M=w=fe([O(1,f.IAssessmentService),O(2,h.IAdsTelemetryService)],M);let N=class extends t.Action{static{E=this}static{this.ID="asmtaction.exportasscript"}static{this.LABEL=y.localize(4,null)}constructor(W,z){super(E.ID,E.LABEL,"exportAsScriptIcon"),this._assessmentService=W,this._telemetryService=z}async run(W){this._telemetryService.sendActionEvent("SqlAssessment",E.ID);const z=W?.component?.recentResult?.result.items;z&&await this._assessmentService.generateAssessmentScript(W.ownerUri,z)}};e.AsmtExportAsScriptAction=N,e.AsmtExportAsScriptAction=N=E=fe([O(0,f.IAssessmentService),O(1,h.IAdsTelemetryService)],N);let P=class extends t.Action{static{C=this}static{this.ID="asmtaction.showsamples"}static{this.LABEL=y.localize(5,null)}static{this.ICON="asmt-learnmore"}static{this.configHelpUri="https://aka.ms/sql-assessment-api"}constructor(W,z){super(C.ID,C.LABEL,C.ICON),this._openerService=W,this._telemetryService=z}async run(){this._telemetryService.sendActionEvent("SqlAssessment",C.ID),await this._openerService.open(S.URI.parse(C.configHelpUri))}};e.AsmtSamplesLinkAction=P,e.AsmtSamplesLinkAction=P=C=fe([O(0,v.IOpenerService),O(1,h.IAdsTelemetryService)],P);let x=class extends t.Action{static{I=this}static{this.ID="asmtaction.generatehtmlreport"}static{this.LABEL=y.localize(6,null)}static{this.ICON="bookreport"}constructor(W,z,B,K,H,U){super(I.ID,I.LABEL,I.ICON),this._fileService=W,this._openerService=z,this._environmentService=B,this._telemetryService=K,this._notificationService=H,this._fileDialogService=U}suggestReportFile(W){const z=F(new Date(W)),B=s.join(this._environmentService.userRoamingDataHome.fsPath,"SqlAssessmentReports",z);return S.URI.file(B)}async run(W){W.component.showProgress(a.AssessmentType.ReportGeneration);const z=await this._fileDialogService.pickFileToSave(this.suggestReportFile(W.component.recentResult.dateUpdated));if(W.component.stopProgress(a.AssessmentType.ReportGeneration),!z)return;this._telemetryService.sendActionEvent("SqlAssessment",I.ID);const B=await this._fileService.createFile(z,r.VSBuffer.fromString(new o.HTMLReportBuilder(W.component.recentResult.result,W.component.recentResult.dateUpdated,W.component.recentResult.connectionInfo).build()),{overwrite:!0});B&&this._notificationService.prompt(u.default.Info,y.localize(7,null),[{label:y.localize(8,null),run:()=>this._openerService.open(B.resource.fsPath,{openExternal:!0})},{label:y.localize(9,null),run:()=>{}}])}};e.AsmtGenerateHTMLReportAction=x,e.AsmtGenerateHTMLReportAction=x=I=fe([O(0,m.IFileService),O(1,v.IOpenerService),O(2,i.IEnvironmentService),O(3,h.IAdsTelemetryService),O(4,d.INotificationService),O(5,T.IFileDialogService)],x);function F(V){return`SqlAssessmentReport_${`${V.toISOString().replace(/-/g,"").replace("T","").replace(/:/g,"").split(".")[0]}`}.html`}}),define(Q[733],Y([1,0,4519,196,78,17,396,2052,6,19,36,59,4,9,87]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExpensiveMetricType=e.SearchType=e.AzdataGraphView=void 0;const s=t();let o=class extends a.Disposable{constructor(c,l,n,g,w){super(),this._parentContainer=c,this._executionPlan=l,this.textResourcePropertiesService=g,this.configurationService=w,this.expensiveMetricTypes=new Set,this._graphElementPropertiesSet=new Set,this._onElementSelectedEmitter=new v.Emitter,this._diagramModel=this.populate(this._executionPlan.root);let E={container:this._parentContainer,queryPlanGraph:this._diagramModel,iconPaths:T.executionPlanNodeIconPaths,badgeIconPaths:T.badgeIconPaths,expandCollapsePaths:T.collapseExpandNodeIconPaths,showTooltipOnClick:!w.getValue("executionPlan.tooltips.enableOnHoverTooltips")};this._diagram=new s.azdataQueryPlan(E),this._parentContainer.firstChild.ariaLabel=(0,f.localize)(0,null,n),this.setGraphProperties(),this._cellInFocus=this._diagram.graph.getSelectionCell(),this.initializeGraphEvents(),w.onDidChangeConfiguration(C=>{if(C.affectedKeys.has("executionPlan.tooltips.enableOnHoverTooltips")){const I=w.getValue("executionPlan.tooltips.enableOnHoverTooltips");this._diagram&&(this._diagram.setShowTooltipOnClick(!I),this._diagram.showTooltip(this._diagram.graph.showTooltip))}})}setGraphProperties(){this._diagram.graph.setCellsMovable(!1),this._diagram.graph.setCellsDisconnectable(!1),this._diagram.graph.tooltipHandler.delay=700,this._register((0,m.registerThemingParticipant)((c,l)=>{const n=c.getColor(S.foreground);n&&(this._diagram.setTextFontColor(n),this._diagram.setEdgeColor(n))}))}initializeGraphEvents(){this.onElementSelected=this._onElementSelectedEmitter.event,this._diagram.graph.getSelectionModel().addListener("change",(c,l)=>{if(l.properties?.removed){if(this._cellInFocus?.id===l.properties.removed[0]?.id)return;const n=l.properties.removed[0];if(!n)return;this._onElementSelectedEmitter.fire(this.getElementById(n.id)),this._cellInFocus=l.properties.removed[0]}else if(l.properties?.added){const n=l.properties.added[0];this.selectElement(this.getElementById(n.id))}}),this._diagram.graph.addListener("tooltipShown",(c,l)=>{(0,i.status)(l.properties.tooltip.textContent)})}selectElement(c,l=!1){let n;c?n=this._diagram.graph.model.getCell(c.id):n=this._diagram.graph.model.getCell(this._executionPlan.root.id),this._diagram.graph.getSelectionModel().setCell(n),l&&this.centerElement(c)}getSelectedElement(){const c=this._diagram.graph.getSelectionCell();if(c?.id)return this.getElementById(c.id)}zoomIn(){this._diagram.zoomIn()}zoomOut(){this._diagram.zoomOut()}zoomToFit(){this._diagram.zoomToFit(),this.getZoomLevel()>200&&this.setZoomLevel(200)}getZoomLevel(){return this._diagram.graph.view.getScale()*100}setZoomLevel(c){if(c<1)throw new Error((0,f.localize)(1,null));this._diagram.zoomTo(c)}getElementById(c){const l=[];for(l.push(this._executionPlan.root);l.length!==0;){const n=l.pop();if(n.id===c)return n;if(n.edges){for(let g=0;g<n.edges.length;g++)if(n.edges[g].id===c)return n.edges[g]}l.push(...n.children)}}searchNodes(c){const l=[],n=[];for(n.push(this._executionPlan.root);n.length!==0;){const g=n.pop(),w=g.properties.find(C=>C.name===c.propertyName);let E=!1;if((0,D.isString)(w?.value)){switch(c.searchType){case u.Equals:E=w.value===c.value;break;case u.Contains:E=w.value.includes(c.value);break;case u.GreaterThan:E=w.value>c.value;break;case u.LesserThan:E=w.value<c.value;break;case u.GreaterThanEqualTo:E=w.value>=c.value;break;case u.LesserThanEqualTo:E=w.value<=c.value;break;case u.LesserAndGreaterThan:E=w.value<c.value||w.value>c.value;break}E&&l.push(g)}n.push(...g.children)}return l}clearExpensiveOperatorHighlighting(){this._diagram.clearExpensiveOperatorHighlighting()}highlightExpensiveOperator(c){return this._diagram.highlightExpensiveOperator(c)}centerElement(c){if(!c)return;const l=this._diagram.graph.model.getCell(c.id);if(!l)return;const n=this._diagram.graph.getCellBounds(l),g={x:n.x+n.width/2,y:n.y+n.height/2},w=this._diagram.graph.container,E=w.getBoundingClientRect(),C={x:g.x-E.width/2,y:g.y-E.height/2};C.x=C.x<0?0:C.x,C.y=C.y<0?0:C.y,w.scrollTo({left:C.x,top:C.y,behavior:"smooth"})}populate(c){let l={};l.label=c.subtext.join(this.textResourcePropertiesService.getEOL(void 0)),l.tooltipTitle=c.name,l.rowCountDisplayString=c.rowCountDisplayString,l.costDisplayString=c.costDisplayString,this.expensiveMetricTypes.add(d.Off),c.id.toString().startsWith("element-")||(c.id=`element-${c.id}`),l.id=c.id,l.icon=c.type,l.metrics=this.populateProperties(c.properties),l.badges=[];for(let g=0;c.badges&&g<c.badges.length;g++)l.badges.push(this.getBadgeTypeString(c.badges[g].type));l.edges=this.populateEdges(c.edges),l.children=[];for(let g=0;c.children&&g<c.children.length;++g)l.children.push(this.populate(c.children[g]));l.description=c.description,l.cost=c.cost,c.cost&&this.expensiveMetricTypes.add(d.Cost),l.subTreeCost=c.subTreeCost,c.subTreeCost&&this.expensiveMetricTypes.add(d.SubtreeCost),l.relativeCost=c.relativeCost,l.elapsedTimeInMs=c.elapsedTimeInMs,c.elapsedTimeInMs&&this.expensiveMetricTypes.add(d.ActualElapsedTime);let n=[];for(let g=0;c.costMetrics&&g<c.costMetrics.length;++g)n.push(c.costMetrics[g]),this.loadMetricTypesFromCostMetrics(c.costMetrics[g].name);return l.costMetrics=n,l}loadMetricTypesFromCostMetrics(c){c==="ElapsedCpuTime"?this.expensiveMetricTypes.add(d.ActualElapsedCpuTime):c==="EstimateRowsAllExecs"||c==="ActualRows"?this.expensiveMetricTypes.add(d.ActualNumberOfRowsForAllExecutions):(c==="EstimatedRowsRead"||c==="ActualRowsRead")&&this.expensiveMetricTypes.add(d.NumberOfRowsRead)}getBadgeTypeString(c){switch(c){case y.executionPlan.BadgeType.Warning:return{type:"warning",tooltip:""};case y.executionPlan.BadgeType.CriticalWarning:return{type:"criticalWarning",tooltip:""};case y.executionPlan.BadgeType.Parallelism:return{type:"parallelism",tooltip:""};default:return}}populateProperties(c){return c?(c.forEach(l=>{this._graphElementPropertiesSet.add(l.name)}),c.filter(l=>(0,D.isString)(l.displayValue)&&l.showInTooltip).sort((l,n)=>l.displayOrder-n.displayOrder).map(l=>({name:l.name,value:l.displayValue,isLongString:l.positionAtBottom}))):[]}populateEdges(c){return c?c.map(l=>(l.id=this.createGraphElementId(),{id:l.id,metrics:this.populateProperties(l.properties),weight:Math.max(.5,Math.min(.5+.75*Math.log10(l.rowCount),6)),label:""})):[]}createGraphElementId(){return`element-${(0,h.generateUuid)()}`}getUniqueElementProperties(){return[...this._graphElementPropertiesSet].sort()}toggleTooltip(){return this._diagram.showTooltip(!this._diagram.graph.showTooltip),this._diagram.graph.showTooltip}drawSubtreePolygon(c,l,n){const g=this._diagram.graph.model.getCell(`element-${c}`);this._diagram.drawPolygon(g,l,n)}clearSubtreePolygon(){this._diagram.removeDrawnPolygons()}disableNodeCollapse(c){this._diagram.disableNodeCollapse(c)}dispose(){super.dispose(),this._diagram&&(this._diagram.graph.destroy(),this._diagram=null)}};e.AzdataGraphView=o,e.AzdataGraphView=o=fe([O(3,b.ITextResourcePropertiesService),O(4,r.IConfigurationService)],o);var u;(function(p){p[p.Equals=0]="Equals",p[p.Contains=1]="Contains",p[p.LesserThan=2]="LesserThan",p[p.GreaterThan=3]="GreaterThan",p[p.GreaterThanEqualTo=4]="GreaterThanEqualTo",p[p.LesserThanEqualTo=5]="LesserThanEqualTo",p[p.LesserAndGreaterThan=6]="LesserAndGreaterThan"})(u||(e.SearchType=u={}));var d;(function(p){p.Off="off",p.ActualElapsedTime="actualElapsedTime",p.ActualElapsedCpuTime="actualElapsedCpuTime",p.Cost="cost",p.SubtreeCost="subtreeCost",p.ActualNumberOfRowsForAllExecutions="actualNumberOfRowsForAllExecutions",p.NumberOfRowsRead="numberOfRowsRead"})(d||(e.ExpensiveMetricType=d={}))}),define(Q[3569],Y([1,0,1209,2057,272,17,201,7,396,196,29,5,32,42,66,43,170,37]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionPlanComparisonPropertiesView=e.ExecutionPlanCompareOrientation=void 0;var d;(function(N){N.Horizontal="horizontal",N.Vertical="vertical"})(d||(e.ExecutionPlanCompareOrientation=d={}));function p(N){return(0,y.localize)(0,null,N)}function c(N){return(0,y.localize)(1,null,N)}function l(N){return(0,y.localize)(2,null,N)}function n(N){return(0,y.localize)(3,null,N)}const g=(0,y.localize)(4,null),w=(0,y.localize)(5,null),E=(0,y.localize)(6,null),C=(0,y.localize)(7,null),I=(0,y.localize)(8,null),_=(0,y.localize)(9,null),A=(0,y.localize)(10,null),k=(0,y.localize)(11,null);let L=class extends t.ExecutionPlanPropertiesViewBase{constructor(P,x,F,V,W,z,B){super(P,x,F,V,W,z,B),this._orientation=d.Horizontal,this._model={},this._parentContainer.style.display="none";const K=f.$(".compare-operation-name");this._primaryContainer=f.$(".compare-operation-name-text"),K.appendChild(this._primaryContainer),this._secondaryContainer=f.$(".compare-operation-name-text"),K.appendChild(this._secondaryContainer),this.setHeader(K)}setPrimaryElement(P){this._model.primaryElement=P,P.name?this._primaryTarget=(0,T.removeLineBreaks)(P.name):this._primaryTarget=(0,y.localize)(12,null);const x=this._orientation===d.Horizontal?p(this._primaryTarget):l(this._primaryTarget);this._primaryContainer.innerText=x,this._primaryContainer.title=x,this.refreshPropertiesTable()}setSecondaryElement(P){this._model.secondaryElement=P,P?.name?this._secondaryTarget=(0,T.removeLineBreaks)(P.name):this._secondaryTarget=(0,y.localize)(13,null);const x=this._orientation===d.Horizontal?c(this._secondaryTarget):n(this._secondaryTarget);this._secondaryContainer.innerText=x,this._secondaryContainer.title=x,this.refreshPropertiesTable()}updatePropertyContainerTitles(){const[P,x]=this._orientation===d.Horizontal?[p(this._primaryTarget),c(this._secondaryTarget)]:[l(this._primaryTarget),n(this._secondaryTarget)];this._primaryContainer.innerText=P,this._primaryContainer.title=P,this._secondaryContainer.innerText=x,this._secondaryContainer.title=x,this.updatePropertiesTableColumnHeaders()}updatePropertiesTableColumnHeaders(){const P=this.getPropertyTableColumns();this.updateTableColumns(P)}refreshPropertiesTable(){const P=this.getPropertyTableColumns();let x=[];this._model.primaryElement?.properties&&(x=this._model.primaryElement.properties);let F=[];this._model.secondaryElement?.properties&&(F=this._model.secondaryElement.properties);let V=this.convertPropertiesToTableRows(x,F);V=this.sortPropertiesByDisplayValueEquivalency(V),this.populateTable(P,V)}getPropertyTableColumns(){const P=[];return this._model.primaryElement&&(P.push({id:"name",name:(0,y.localize)(14,null),field:"name",width:200,headerCssClass:"prop-table-header",formatter:b.textFormatter}),P.push({id:"value1",name:R(this._orientation),field:"primary",width:150,headerCssClass:"prop-table-header",formatter:b.textFormatter})),this._model.secondaryElement&&(P.push({id:"comparison",name:"",field:"icon",width:40,headerCssClass:"prop-table-header",formatter:b.iconCssFormatter}),P.push({id:"value2",name:M(this._orientation),field:"secondary",width:150,headerCssClass:"prop-table-header",formatter:b.textFormatter})),P}sortPropertiesAlphabetically(P){return new Map([...P.entries()].sort((x,F)=>!x[1]?.name&&!F[1]?.name?0:x[1]?.name?F[1]?.name?x[1].name.localeCompare(F[1].name):1:-1))}sortPropertiesByImportance(P){return new Map([...P.entries()].sort((x,F)=>!x[1]?.displayOrder&&!F[1]?.displayOrder?0:x[1]?.displayOrder?F[1]?.displayOrder?x[1].displayOrder-F[1].displayOrder:1:-1))}sortPropertiesByDisplayValueEquivalency(P){const[x,F]=this.splitEqualFromUnequalProperties(P),V=[...x];if(F.length>0){const W=new Object;W.name=C,W.expanded=!1,W.treeGridChildren=F,V.push(W)}return V}splitEqualFromUnequalProperties(P){const x=[],F=[];for(let V of P){const W=V.treeGridChildren;if(W?.length>0){const[z,B]=this.splitEqualFromUnequalProperties(W);if(z.length>0){const K=(0,r.deepClone)(V);K.treeGridChildren=z,K.expanded=!0,K.icon={iconCssClass:v.executionPlanComparisonPropertiesDifferent,title:g},x.push(K)}if(B.length>0){const K=(0,r.deepClone)(V);K.treeGridChildren=B,F.push(K)}}else{const z=V.primary,B=V.secondary;z&&B&&z.text===B.title?F.push(V):x.push(V)}}return[x,F]}sortPropertiesReverseAlphabetically(P){return new Map([...P.entries()].sort((x,F)=>!x[1]?.displayOrder&&!F[1]?.displayOrder?0:x[1]?.displayOrder?F[1]?.displayOrder?F[1].displayOrder-x[1].displayOrder:1:-1))}convertPropertiesToTableRows(P,x){const F=[];let V=new Map;switch(P&&P.forEach(W=>{V.set(W.name,{primaryProp:W,secondaryProp:void 0,displayOrder:W.displayOrder,name:W.name})}),x&&x.forEach(W=>{V.has(W.name)?V.get(W.name).secondaryProp=W:V.set(W.name,{primaryProp:void 0,secondaryProp:W,displayOrder:W.displayOrder,name:W.name})}),this.sortType){case t.PropertiesSortType.DisplayOrder:V=this.sortPropertiesByImportance(V);break;case t.PropertiesSortType.Alphabetical:V=this.sortPropertiesAlphabetically(V);break;case t.PropertiesSortType.ReverseAlphabetical:V=this.sortPropertiesReverseAlphabetically(V);break}return V.forEach((W,z)=>{let B=new Object;B.name={text:z};const K=W.primaryProp,H=W.secondaryProp;if(K&&H){B.displayOrder=W.primaryProp.displayOrder;let U=new Object;if(W.primaryProp.displayValue!==W.secondaryProp.displayValue)switch(W.primaryProp.dataType){case m.executionPlan.ExecutionPlanGraphElementPropertyDataType.Boolean:U.iconClass=v.executionPlanComparisonPropertiesDifferent,U.title=g;break;case m.executionPlan.ExecutionPlanGraphElementPropertyDataType.Number:W.primaryProp.betterValue===m.executionPlan.ExecutionPlanGraphElementPropertyBetterValue.None?(U.title=g,U.iconClass=v.executionPlanComparisonPropertiesDifferent):U=parseFloat(W.primaryProp.displayValue)>parseFloat(W.secondaryProp.displayValue)?{iconClass:u.ThemeIcon.asClassName(a.Codicon.chevronRight),title:E}:{iconClass:u.ThemeIcon.asClassName(a.Codicon.chevronLeft),title:w};break;case m.executionPlan.ExecutionPlanGraphElementPropertyDataType.String:U.iconClass=v.executionPlanComparisonPropertiesDifferent,U.title=g;break;default:U.iconClass=v.executionPlanComparisonPropertiesDifferent,U.title=g;break}if(B.primary={text:(0,T.removeLineBreaks)(W.primaryProp.displayValue," ")},B.icon={iconCssClass:U.iconClass??"",title:U.title??""},B.secondary={title:(0,T.removeLineBreaks)(W.secondaryProp.displayValue," ")},K&&!(0,D.isString)(K.value)||H&&!(0,D.isString)(H.value)){const ie=" parent-row-styling";B.name.iconCssClass=B.name.iconCssClass?B.name.iconCssClass+ie:ie,B.primary.iconCssClass=B.primary.iconCssClass?B.primary.iconCssClass+ie:ie,B.icon.iconCssClass=B.icon.iconCssClass?B.icon.iconCssClass+ie:ie,B.secondary.iconCssClass=B.secondary.iconCssClass?B.secondary.iconCssClass+ie:ie}F.push(B);const G=(0,D.isString)(K.value)?void 0:K.value,$=(0,D.isString)(H.value)?void 0:H.value;B.treeGridChildren=this.convertPropertiesToTableRows(G,$)}else K&&!H?(B.displayOrder=W.primaryProp.displayOrder,B.primary={text:W.primaryProp.displayValue},B.icon={iconCssClass:v.executionPlanComparisonPropertiesDifferent,title:g},F.push(B),(0,D.isString)(K.value)||(B.name.iconCssClass+=" parent-row-styling",B.primary.iconCssClass+=" parent-row-styling",B.treeGridChildren=this.convertPropertiesToTableRows(K.value,void 0))):!K&&H&&(B.displayOrder=W.secondaryProp.displayOrder,B.secondary={title:W.secondaryProp.displayValue,iconCssClass:""},B.icon={iconCssClass:v.executionPlanComparisonPropertiesDifferent,title:g},F.push(B),(0,D.isString)(H.value)||(B.name.iconCssClass+=" parent-row-styling",B.secondary.iconCssClass+=" parent-row-styling",B.treeGridChildren=this.convertPropertiesToTableRows(void 0,H.value)))}),F}set orientation(P){this._orientation!==P&&(this._orientation=P,this.updatePropertyContainerTitles())}};e.ExecutionPlanComparisonPropertiesView=L,e.ExecutionPlanComparisonPropertiesView=L=fe([O(1,h.IInstantiationService),O(2,S.IContextMenuService),O(3,S.IContextViewService),O(4,i.IAccessibilityService),O(5,s.IQuickInputService),O(6,o.IComponentContextService)],L);function R(N){return N===d.Horizontal?I:_}function M(N){return N===d.Horizontal?k:A}}),define(Q[3570],Y([1,0,783,402,7,2070,15,32,29,19,34,199,733,23,198,396,9,24,37,54,101]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancelHIghlightExpensiveOperationAction=e.TurnOffExpensiveHighlightingOperationAction=e.HighlightExpensiveOperationAction=e.HighlightExpensiveOperationWidget=void 0;const l=(0,D.localize)(0,null),n=(0,D.localize)(1,null),g=(0,D.localize)(2,null),w=(0,D.localize)(3,null),E=(0,D.localize)(4,null),C=(0,D.localize)(5,null),I=(0,D.localize)(6,null),_=(0,D.localize)(7,null);let A=class extends t.ExecutionPlanWidgetBase{constructor(N,P,x,F,V,W,z){super(b.$(".find-expensive-operation-widget"),"findExpensiveOperation"),this.widgetController=N,this.executionPlanDiagram=P,this.contextViewService=x,this.themeService=F,this.notificationService=V,this._configurationService=W,this._storageService=z,this._selectedExpensiveOperationType=a.ExpensiveMetricType.Cost,this.renderAndStyleWidget()}getDefaultExpensiveOperationMetric(){switch(this._configurationService.getValue("mssql.executionPlan.expensiveOperationMetric")){case"actualElapsedTime":return a.ExpensiveMetricType.ActualElapsedTime;case"actualElapsedCpuTime":return a.ExpensiveMetricType.ActualElapsedCpuTime;case"cost":return a.ExpensiveMetricType.Cost;case"subtreeCost":return a.ExpensiveMetricType.SubtreeCost;case"actualNumberOfRowsForAllExecutions":return a.ExpensiveMetricType.ActualNumberOfRowsForAllExecutions;case"numberOfRowsRead":return a.ExpensiveMetricType.NumberOfRowsRead;default:return a.ExpensiveMetricType.Off}}renderAndStyleWidget(){this._expenseMetricSelectBoxContainer=b.$("expensive-operation-name-select-box .dropdown-container");const N=b.$("expensive-operation-name-select-box-label");N.innerText=(0,D.localize)(8,null),this._expenseMetricSelectBoxContainer.appendChild(N),this.container.appendChild(this._expenseMetricSelectBoxContainer);const P=this.getSelectBoxOptionsFromExecutionPlanDiagram();this.expenseMetricSelectBox=this._register(new h.SelectBox(P,E,c.defaultSelectBoxStyles,this.contextViewService,this._expenseMetricSelectBoxContainer)),this.expenseMetricSelectBox.setAriaLabel(l),this.expenseMetricSelectBox.render(this._expenseMetricSelectBoxContainer),this._expenseMetricSelectBoxContainer.style.width="200px",this._expenseMetricSelectBoxContainer.style.marginRight="5px",this._register(this.expenseMetricSelectBox.onDidSelect(B=>{switch(B.selected){case g:this._selectedExpensiveOperationType=a.ExpensiveMetricType.ActualElapsedTime;break;case w:this._selectedExpensiveOperationType=a.ExpensiveMetricType.ActualElapsedCpuTime;break;case E:this._selectedExpensiveOperationType=a.ExpensiveMetricType.Cost;break;case C:this._selectedExpensiveOperationType=a.ExpensiveMetricType.SubtreeCost;break;case I:this._selectedExpensiveOperationType=a.ExpensiveMetricType.ActualNumberOfRowsForAllExecutions;break;case _:this._selectedExpensiveOperationType=a.ExpensiveMetricType.NumberOfRowsRead;break;default:this._selectedExpensiveOperationType=a.ExpensiveMetricType.Off}}));const x=this._register(new k),F=this._register(new L),V=this._register(new R),W=this,z=this._register(new i.Button(this.container,{title:(0,D.localize)(9,null),...p.defaultButtonStyles}));z.label=(0,D.localize)(10,null),this._register(z.onDidClick(async B=>{this._selectedExpensiveOperationType===a.ExpensiveMetricType.Off?await F.run(W):await x.run(W),this.showStoreDefaultMetricPrompt()})),this._actionBar=this._register(new y.ActionBar(this.container)),this._actionBar.context=this,this._actionBar.pushAction(V,{label:!1,icon:!0})}getSelectBoxOptionsFromExecutionPlanDiagram(){const N=[];for(let P of this.executionPlanDiagram.expensiveMetricTypes)switch(P){case a.ExpensiveMetricType.Off:N.push(n);break;case a.ExpensiveMetricType.ActualElapsedTime:N.push(g);break;case a.ExpensiveMetricType.ActualElapsedCpuTime:N.push(w);break;case a.ExpensiveMetricType.Cost:N.push(E);break;case a.ExpensiveMetricType.SubtreeCost:N.push(C);break;case a.ExpensiveMetricType.ActualNumberOfRowsForAllExecutions:N.push(I);break;case a.ExpensiveMetricType.NumberOfRowsRead:N.push(_);break}return N}showStoreDefaultMetricPrompt(){const N=this.getDefaultExpensiveOperationMetric();if(this._selectedExpensiveOperationType===N||!this._storageService.getBoolean("qp.expensiveOperationMetric.showChangeDefaultExpensiveMetricPrompt",-1,!0))return;const P=(0,D.localize)(11,null),x=[{label:(0,D.localize)(12,null),run:()=>this._configurationService.updateValue("mssql.executionPlan.expensiveOperationMetric",this._selectedExpensiveOperationType.toString()).catch(F=>T.onUnexpectedError(F))},{label:(0,D.localize)(13,null),run:()=>{}},{label:(0,D.localize)(14,null),run:()=>this._storageService.store("qp.expensiveOperationMetric.showChangeDefaultExpensiveMetricPrompt",!1,-1,0)}];this.notificationService.prompt(r.Severity.Info,P,x,{sticky:!0})}focus(){this.expenseMetricSelectBox.focus()}getExpensiveOperationDelegate(){const N=B=>B.elapsedTimeInMs,P=B=>{const K=B.costMetrics.find(H=>H.name==="ElapsedCpuTime");if(K!==void 0)return Number(K.value)},x=B=>B.cost,F=B=>B.subTreeCost,V=B=>{const K=B.costMetrics.find(G=>G.name==="ActualRows"),H=B.costMetrics.find(G=>G.name==="EstimateRowsAllExecs");if(K===void 0&&H===void 0)return;let U=Number(K?.value);if(U||(U=Number(H?.value)),!isNaN(U))return U},W=B=>{const K=B.costMetrics.find(G=>G.name==="ActualRowsRead"),H=B.costMetrics.find(G=>G.name==="EstimatedRowsRead");if(K===void 0&&H===void 0)return;let U=Number(K?.value);if(U||(U=Number(H?.value)),!isNaN(U))return U};let z=x;switch(this._selectedExpensiveOperationType){case a.ExpensiveMetricType.ActualElapsedTime:z=N;break;case a.ExpensiveMetricType.ActualElapsedCpuTime:z=P;break;case a.ExpensiveMetricType.SubtreeCost:z=F;break;case a.ExpensiveMetricType.ActualNumberOfRowsForAllExecutions:z=V;break;case a.ExpensiveMetricType.NumberOfRowsRead:z=W;break}return z}};e.HighlightExpensiveOperationWidget=A,e.HighlightExpensiveOperationWidget=A=fe([O(2,v.IContextViewService),O(3,m.IThemeService),O(4,r.INotificationService),O(5,o.IConfigurationService),O(6,u.IStorageService)],A);class k extends S.Action{static{this.ID="qp.highlightExpensiveOperationAction"}static{this.LABEL=(0,D.localize)(15,null)}constructor(){super(k.ID,k.LABEL,s.searchIconClassNames)}async run(N){const P=N.getExpensiveOperationDelegate();N.executionPlanDiagram.clearExpensiveOperatorHighlighting();const x=N.executionPlanDiagram.highlightExpensiveOperator(P);x&&N.executionPlanDiagram.centerElement(N.executionPlanDiagram.getElementById(x))}}e.HighlightExpensiveOperationAction=k;class L extends S.Action{static{this.ID="qp.turnOffExpensiveHighlightingOperationAction"}static{this.LABEL=(0,D.localize)(16,null)}constructor(){super(L.ID,L.LABEL)}async run(N){N.executionPlanDiagram.clearExpensiveOperatorHighlighting()}}e.TurnOffExpensiveHighlightingOperationAction=L;class R extends S.Action{static{this.ID="qp.cancelExpensiveOperationAction"}static{this.LABEL=(0,D.localize)(17,null)}constructor(){super(R.ID,R.LABEL,d.ThemeIcon.asClassName(f.Codicon.chromeClose))}async run(N){N.widgetController.removeWidget(N)}}e.CancelHIghlightExpensiveOperationAction=R}),define(Q[1284],Y([1,0,783,402,7,2071,32,29,19,34,199,166,733,54,37,101]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancelSearch=e.GoToPreviousMatchAction=e.GoToNextMatchAction=e.NodeSearchWidget=void 0;const o=(0,D.localize)(0,null),u=(0,D.localize)(1,null),d=(0,D.localize)(2,null),p=(0,D.localize)(3,null),c=(0,D.localize)(4,null),l=">",n="<",g=">=",w="<=",E="<>";let C=class extends t.ExecutionPlanWidgetBase{constructor(L,R,M,N){super(b.$(".search-node-widget"),"searchWidget"),this.planActionView=L,this._executionPlanDiagram=R,this.contextViewService=M,this.themeService=N,this._selectedSearchType=a.SearchType.Equals,this._searchResults=[],this._currentSearchResultIndex=0,this._usePreviousSearchResult=!1;const P="search-node-widget-label",x=(0,D.localize)(5,null);this.container.setAttribute("role","dialog"),this.container.setAttribute("aria-labelledby",P);const F=b.$("label.property-name-label");F.innerText=x,F.id=P,this.container.appendChild(F),this._propertyNameSelectBoxContainer=b.$(".search-widget-property-name-select-box .dropdown-container"),this.container.appendChild(this._propertyNameSelectBoxContainer),this._propertyNameSelectBoxContainer.style.width="120px";const V=this._executionPlanDiagram.getUniqueElementProperties();this._propertyNameSelectBox=this._register(new S.SelectBox(V,V[0],s.defaultSelectBoxStyles,this.contextViewService,this._propertyNameSelectBoxContainer)),this._propertyNameSelectBox.setAriaLabel(o),this._propertyNameSelectBox.render(this._propertyNameSelectBoxContainer),this._register(this._propertyNameSelectBox.onDidSelect(H=>{this._usePreviousSearchResult=!1})),this._searchTypeSelectBoxContainer=b.$(".search-widget-search-type-select-box .dropdown-container"),this._searchTypeSelectBoxContainer.style.width="100px",this.container.appendChild(this._searchTypeSelectBoxContainer),this._searchTypeSelectBox=this._register(new S.SelectBox([c,p,l,n,g,w,E],c,s.defaultSelectBoxStyles,this.contextViewService,this._searchTypeSelectBoxContainer)),this._searchTypeSelectBox.setAriaLabel(u),this._searchTypeSelectBox.render(this._searchTypeSelectBoxContainer),this._register(this._searchTypeSelectBox.onDidSelect(H=>{switch(this._usePreviousSearchResult=!1,H.selected){case c:this._selectedSearchType=a.SearchType.Equals;break;case p:this._selectedSearchType=a.SearchType.Contains;break;case l:this._selectedSearchType=a.SearchType.GreaterThan;break;case n:this._selectedSearchType=a.SearchType.LesserThan;break;case g:this._selectedSearchType=a.SearchType.GreaterThanEqualTo;break;case w:this._selectedSearchType=a.SearchType.LesserThanEqualTo;break;case E:this._selectedSearchType=a.SearchType.LesserAndGreaterThan}})),this._searchTextInputBox=this._register(new h.InputBox(this.container,this.contextViewService,{inputBoxStyles:r.defaultInputBoxStyles})),this._searchTextInputBox.setAriaLabel(d),this._searchTextInputBox.element.style.marginLeft="5px",this._register(this._searchTextInputBox.onDidChange(H=>{this._usePreviousSearchResult=!1}));const W=this._register(new _),z=this._register(new I),B=this._register(new A),K=this;this._register(b.addDisposableListener(this._searchTextInputBox.element,b.EventType.KEY_DOWN,async H=>{H.key==="Enter"&&H.shiftKey?await W.run(K):H.key==="Enter"?await z.run(K):H.key==="Escape"&&await B.run(K)})),this._actionBar=this._register(new y.ActionBar(this.container)),this._actionBar.context=this,this._actionBar.pushAction(W,{label:!1,icon:!0}),this._actionBar.pushAction(z,{label:!1,icon:!0}),this._actionBar.pushAction(B,{label:!1,icon:!0})}focus(){this._propertyNameSelectBox.focus()}searchNodes(){this._currentSearchResultIndex=0,this._searchResults=this._executionPlanDiagram.searchNodes({propertyName:this._propertyNameSelectBox.value,value:this._searchTextInputBox.value,searchType:this._selectedSearchType}),this._usePreviousSearchResult=!0}next(){this._usePreviousSearchResult||this.searchNodes(),this._executionPlanDiagram.centerElement(this._searchResults[this._currentSearchResultIndex]),this._executionPlanDiagram.selectElement(this._searchResults[this._currentSearchResultIndex]),this._currentSearchResultIndex=this._currentSearchResultIndex===this._searchResults.length-1?this._currentSearchResultIndex=0:this._currentSearchResultIndex=++this._currentSearchResultIndex}previous(){this._usePreviousSearchResult||this.searchNodes(),this._executionPlanDiagram.centerElement(this._searchResults[this._currentSearchResultIndex]),this._executionPlanDiagram.selectElement(this._searchResults[this._currentSearchResultIndex]),this._currentSearchResultIndex=this._currentSearchResultIndex===0?this._currentSearchResultIndex=this._searchResults.length-1:this._currentSearchResultIndex=--this._currentSearchResultIndex}};e.NodeSearchWidget=C,e.NodeSearchWidget=C=fe([O(2,f.IContextViewService),O(3,v.IThemeService)],C);class I extends m.Action{static{this.ID="qp.NextSearchAction"}static{this.LABEL=(0,D.localize)(6,null)}constructor(){super(I.ID,I.LABEL,i.ThemeIcon.asClassName(T.Codicon.arrowDown))}async run(L){L.next()}}e.GoToNextMatchAction=I;class _ extends m.Action{static{this.ID="qp.PreviousSearchAction"}static{this.LABEL=(0,D.localize)(7,null)}constructor(){super(_.ID,_.LABEL,i.ThemeIcon.asClassName(T.Codicon.arrowUp))}async run(L){L.previous()}}e.GoToPreviousMatchAction=_;class A extends m.Action{static{this.ID="qp.cancelSearchAction"}static{this.LABEL=(0,D.localize)(8,null)}constructor(){super(A.ID,A.LABEL,i.ThemeIcon.asClassName(T.Codicon.chromeClose))}async run(L){L.planActionView.removeWidget(L)}}e.CancelSearch=A}),define(Q[1285],Y([1,0,198,199,343,166,350,432,196,194,58,262,15,4,29,2186,7,19,18,11,448,824,188,63,33,9,117,7,184,1019,559,1113,54,101,1051]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M){"use strict";var N;Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionWidget=void 0;const P=(0,s.localize)(0,null);let x=class extends r.Disposable{static{N=this}static{this._authTypes=[C.AuthenticationType.AzureMFA,C.AuthenticationType.AzureMFAAndUser,C.AuthenticationType.Integrated,C.AuthenticationType.SqlLogin,C.AuthenticationType.DSTSAuth,C.AuthenticationType.None]}static{this._osByName={Windows:1,Macintosh:2,Linux:3}}constructor(V,W,z,B,K,H,U,G,$,ie){super(),this._themeService=B,this._contextViewService=K,this._connectionManagementService=H,this._accountManagementService=U,this._logService=G,this._errorMessageService=$,this._configurationService=ie,this._addAzureAccountMessage=(0,s.localize)(1,null),this._azureProviderId="azure_publicCloud",this._databaseDropdownExpanded=!1,this._defaultDatabaseName=(0,s.localize)(2,null),this._loadingDatabaseName=(0,s.localize)(3,null),this._serverGroupDisplayString=(0,s.localize)(4,null),this._trueInputValue=(0,s.localize)(5,null),this._falseInputValue=(0,s.localize)(6,null),this.DefaultServerGroup={id:"",name:(0,s.localize)(7,null),parentId:void 0,color:void 0,description:void 0},this._addNewServerGroup={id:"",name:(0,s.localize)(8,null),parentId:void 0,color:void 0,description:void 0},this.NoneServerGroup={id:"",name:(0,s.localize)(9,null),parentId:void 0,color:void 0,description:void 0},this._callbacks=W,this._customOptions=V.filter(j=>j.showOnConnectionDialog===!0),this._optionsMaps={};for(let j=0;j<V.length;j++){let ee=V[j];this._optionsMaps[ee.specialValueType]=ee}let J=this._optionsMaps[v.ConnectionOptionSpecialType.authType];if(J){let j=this.getAuthTypeDefault(J,d.OS),ee=this.getAuthTypeDisplayName(j);this._authTypeSelectBox=new y.SelectBox(J.categoryValues.map(X=>X.displayName),ee,M.defaultSelectBoxStyles,this._contextViewService,void 0,{ariaLabel:J.displayName}),this._register(this._authTypeSelectBox)}this._providerName=z,this._mssqlAuthProviderEnabled=(0,A.isMssqlAuthProviderEnabled)(this._providerName,this._configurationService),this._connectionStringOptions=this._connectionManagementService.getProviderProperties(this._providerName).connectionStringOptions}getAuthTypeDefault(V,W){if(V.defaultValueOsOverrides){let z=V.defaultValueOsOverrides.find(B=>N._osByName[B.os]===W);if(z)return z.defaultValueOverride}if(V.defaultValue)return V.defaultValue;if(V.categoryValues.length>0)return V.categoryValues[0].name}createConnectionWidget(V,W=!1){this._serverGroupOptions=[this.DefaultServerGroup],this._serverGroupSelectBox=new y.SelectBox(this._serverGroupOptions.map(z=>z.name),this.DefaultServerGroup.name,M.defaultSelectBoxStyles,this._contextViewService,void 0,{ariaLabel:this._serverGroupDisplayString}),this._register(this._serverGroupSelectBox),this._previousGroupOption=this._serverGroupSelectBox.value,this._container=o.append(V,o.$("div.connection-table")),this._tableContainer=o.append(this._container,o.$("table.connection-table-content")),this._tableContainer.setAttribute("role","presentation"),this.fillInConnectionForm(W),this.registerListeners(),this._authTypeSelectBox&&this.onAuthTypeSelected(this._authTypeSelectBox.value,!1)}fillInConnectionForm(V=!1){this.addInputOptionRadioButtons(),this.addConnectionStringInput(),this.addServerNameOption(),this.addAuthenticationTypeOption(V),this.addLoginOptions(),this.addDatabaseOption(),this.addCustomConnectionOptions(),this.addServerGroupOption(),this.addConnectionNameOptions(),this.addAdvancedOptions(),this.updateRequiredStateForOptions(),this.registerOnSelectionChangeEvents(),this._connectionStringOptions.isEnabled&&this.handleConnectionStringOptionChange()}validateRequiredOptionValue(V,W){return(0,w.isFalsyOrWhitespace)(V)?{type:3,content:(0,s.localize)(10,null,W)}:void 0}addInputOptionRadioButtons(){if(this._connectionStringOptions.isEnabled){const V="input-option-type",W=(0,s.localize)(11,null),z=T.appendRow(this._tableContainer,W,"connection-label","connection-input","connection-input-options"),B=new L.FieldSet(z,{ariaLabel:W});this._defaultInputOptionRadioButton=new l.RadioButton(B.element,{label:(0,s.localize)(12,null),checked:!this._connectionStringOptions.isDefault}),this._connectionStringRadioButton=new l.RadioButton(B.element,{label:(0,s.localize)(13,null),checked:this._connectionStringOptions.isDefault}),this._defaultInputOptionRadioButton.name=V,this._connectionStringRadioButton.name=V,this._register(this._defaultInputOptionRadioButton),this._register(this._connectionStringRadioButton),this._register(this._defaultInputOptionRadioButton.onDidChangeCheckedState(()=>{this.handleConnectionStringOptionChange()}))}}addConnectionStringInput(){if(this._connectionStringOptions.isEnabled){const V=T.appendRow(this._tableContainer,P,"connection-label","connection-input","connection-string-row",!0);this._connectionStringInputBox=new D.InputBox(V,this._contextViewService,{validationOptions:{validation:W=>this.validateRequiredOptionValue(W,P)},ariaLabel:P,flexibleHeight:!0,flexibleMaxHeight:100,inputBoxStyles:R.defaultInputBoxStyles}),this._register(this._connectionStringInputBox),this._register(this._connectionStringInputBox.onDidChange(()=>{this.setConnectButton()}))}}updateRequiredStateForOptions(){this._connectionStringInputBox&&(this._connectionStringInputBox.required=this.useConnectionString);const V=this._optionsMaps[v.ConnectionOptionSpecialType.userName];this._serverNameInputBox.required=!this.useConnectionString,this._userNameInputBox.required=!this.useConnectionString&&V?.isRequired,this._userNameInputBox.value="",this.useConnectionString?this._tableContainer.classList.add("hide-customOptions"):this._tableContainer.classList.remove("hide-customOptions")}addAuthenticationTypeOption(V=!1){if(this._optionsMaps[v.ConnectionOptionSpecialType.authType]){let W=T.appendRow(this._tableContainer,this._optionsMaps[v.ConnectionOptionSpecialType.authType].displayName,"connection-label","connection-input","auth-type-row");T.appendInputSelectBox(W,this._authTypeSelectBox)}}addCustomConnectionOptions(){this._customOptions.length>0&&(this._customOptionWidgets=[],this._customOptions.forEach((V,W)=>{let z=T.appendRow(this._tableContainer,V.displayName,"connection-label","connection-input",["custom-connection-options",`option-${V.name}`],!1,V.description,100);switch(V.valueType){case f.ServiceOptionType.boolean:case f.ServiceOptionType.category:let B=V.defaultValue,K=V.valueType===f.ServiceOptionType.category?V.categoryValues.map(H=>({text:H.displayName,value:H.name})):[{displayName:this._trueInputValue,value:"true"},{displayName:this._falseInputValue,value:"false"}].map(H=>({text:H.displayName,value:H.value}));this._customOptionWidgets[W]=new y.SelectBox(K,B,M.defaultSelectBoxStyles,this._contextViewService,z,{ariaLabel:V.displayName},V.name),T.appendInputSelectBox(z,this._customOptionWidgets[W]);break;default:this._customOptionWidgets[W]=new D.InputBox(z,this._contextViewService,{ariaLabel:V.displayName,placeholder:V.placeholder,inputBoxStyles:R.defaultInputBoxStyles});break}this._register(this._customOptionWidgets[W])}))}registerOnSelectionChangeEvents(){this._customOptionWidgets?.forEach((V,W)=>{V instanceof y.SelectBox&&this._registerSelectionChangeEvents([this._customOptionWidgets],this._customOptions[W],V)})}_registerSelectionChangeEvents(V,W,z){W.onSelectionChange&&W.onSelectionChange.forEach(B=>{this._register(z.onDidSelect(K=>{let H=z.value;B?.dependentOptionActions?.forEach(U=>{let G=this._customOptions.find(ie=>ie.name===U.optionName)?.defaultValue,$=this._findWidget(V,U.optionName);$&&((0,I.createCSSRule)(`.hide-${$.id} .option-${$.id}`,"display: none;"),this._onValueChangeEvent(H,B.values,$,G,U))})}))})}_findWidget(V,W){let z;return V.forEach(B=>{z||(z=B.find(K=>K.id===W))}),z}_onValueChangeEvent(V,W,z,B,K){if(W.includes(V.toLocaleLowerCase())&&K.action===C.Actions.Show||!W.includes(V.toLocaleLowerCase())&&K.action===C.Actions.Hide){if(this._tableContainer.classList.remove(`hide-${z.id}`),K.required){let H=T.getOptionContainerByName(this._tableContainer,K.optionName);H&&H.classList.add(k.RequiredIndicatorClassName)}}else{z instanceof y.SelectBox?z.select(z.values.indexOf(B)):z instanceof D.InputBox&&(z.value=B);let H=T.getOptionContainerByName(this._tableContainer,K.optionName);H&&H.hasChildNodes&&H.childElementCount>1&&H.children.item(1).remove(),this._tableContainer.classList.add(`hide-${z.id}`),z.hideMessage()}}addServerNameOption(){let V=this._optionsMaps[v.ConnectionOptionSpecialType.serverName],W=T.appendRow(this._tableContainer,V.displayName,"connection-label","connection-input","server-name-row",!0);this._serverNameInputBox=new D.InputBox(W,this._contextViewService,{validationOptions:{validation:z=>this.validateRequiredOptionValue(z,V.displayName)},ariaLabel:V.displayName,placeholder:V.placeholder,inputBoxStyles:R.defaultInputBoxStyles}),this._register(this._serverNameInputBox)}addLoginOptions(){let V=this,W=this._optionsMaps[v.ConnectionOptionSpecialType.userName],z=T.appendRow(this._tableContainer,W.displayName,"connection-label","connection-input","username-row",W.isRequired);this._userNameInputBox=new D.InputBox(z,this._contextViewService,{validationOptions:{validation:j=>V.validateUsername(j,W.isRequired)?{type:3,content:(0,s.localize)(14,null,W.displayName)}:null},ariaLabel:W.displayName,placeholder:W.placeholder,inputBoxStyles:R.defaultInputBoxStyles}),this._register(this._userNameInputBox);let B=this._optionsMaps[v.ConnectionOptionSpecialType.password],K=T.appendRow(this._tableContainer,B.displayName,"connection-label","connection-input","password-row");this._passwordInputBox=new D.InputBox(K,this._contextViewService,{ariaLabel:B.displayName,placeholder:B.placeholder,inputBoxStyles:R.defaultInputBoxStyles}),this._passwordInputBox.inputElement.type="password",this._register(this._passwordInputBox);let H=(0,s.localize)(15,null);this._rememberPasswordCheckBox=this.appendCheckbox(this._tableContainer,H,"connection-input","password-row",!1),this._register(this._rememberPasswordCheckBox);let U=(0,s.localize)(16,null),G=T.appendRow(this._tableContainer,U,"connection-label","connection-input","azure-account-row");this._azureAccountDropdown=new y.SelectBox([],void 0,M.defaultSelectBoxStyles,this._contextViewService,G,{ariaLabel:U}),this._register(this._azureAccountDropdown),T.appendInputSelectBox(G,this._azureAccountDropdown);let $=T.appendRow(this._tableContainer,"","connection-label","connection-input",["azure-account-row","refresh-credentials-link"]);this._refreshCredentialsLink=o.append($,o.$("a")),this._refreshCredentialsLink.href="#",this._refreshCredentialsLink.innerText=(0,s.localize)(17,null);let ie=(0,s.localize)(18,null),J=T.appendRow(this._tableContainer,ie,"connection-label","connection-input",["azure-account-row","azure-tenant-row"]);this._azureTenantDropdown=new y.SelectBox([],void 0,M.defaultSelectBoxStyles,this._contextViewService,J,{ariaLabel:ie}),this._register(this._azureTenantDropdown),T.appendInputSelectBox(J,this._azureTenantDropdown)}addDatabaseOption(){let V=this._optionsMaps[v.ConnectionOptionSpecialType.databaseName];if(V){let W=T.appendRow(this._tableContainer,V.displayName,"connection-label","connection-input","database-row");this._databaseNameInputBox=new c.Dropdown(W,this._contextViewService,{values:[this._defaultDatabaseName,this._loadingDatabaseName],strictSelection:!1,placeholder:V.placeholder??this._defaultDatabaseName,maxHeight:125,ariaLabel:V.displayName,...M.defaultEditableDropdownStyles}),this._register(this._databaseNameInputBox)}}addServerGroupOption(){if(this._serverGroupSelectBox){let V=T.appendRow(this._tableContainer,this._serverGroupDisplayString,"connection-label","connection-input");T.appendInputSelectBox(V,this._serverGroupSelectBox)}}addConnectionNameOptions(){let V=this._optionsMaps[v.ConnectionOptionSpecialType.connectionName];V.displayName=(0,s.localize)(19,null);let W=T.appendRow(this._tableContainer,V.displayName,"connection-label","connection-input");this._connectionNameInputBox=new D.InputBox(W,this._contextViewService,{ariaLabel:V.displayName,placeholder:V.placeholder,inputBoxStyles:R.defaultInputBoxStyles}),this._register(this._connectionNameInputBox)}addAdvancedOptions(){const V=o.append(this._tableContainer,o.$("tr.advanced-options-row"));o.append(V,o.$("td"));const W=o.append(V,o.$("td"));W.setAttribute("align","right");const z=o.append(W,o.$("div.advanced-button"));this._advancedButton=new t.Button(z,{secondary:!0,...R.defaultButtonStyles}),this._register(this._advancedButton),this._advancedButton.label=(0,s.localize)(20,null),this._register(this._advancedButton.onDidClick(()=>{this._callbacks.onAdvancedProperties()}))}handleConnectionStringOptionChange(){const V="use-connection-string";this.useConnectionString?(this._tableContainer.classList.add(V),this._connectionStringInputBox.layout()):this._tableContainer.classList.remove(V),this.updateRequiredStateForOptions(),this.setConnectButton()}validateUsername(V,W){let z=this._authTypeSelectBox?this.getMatchingAuthType(this._authTypeSelectBox.value):void 0;return!!((!z||z===C.AuthenticationType.SqlLogin)&&!V&&W)}appendCheckbox(V,W,z,B,K){let H=o.append(V,o.$(`tr.${B}`));o.append(H,o.$("td"));let U=o.append(H,o.$(`td.${z}`));return new b.Checkbox(U,{...M.defaultCheckboxStyles,label:W,checked:K,ariaLabel:W})}registerListeners(){this._serverGroupSelectBox&&this._register(this._serverGroupSelectBox.onDidSelect(V=>{this.onGroupSelected(V.selected)})),this._databaseNameInputBox&&(this._register(this._databaseNameInputBox.onFocus(()=>{this._databaseDropdownExpanded=!0,this.serverName?(this._databaseNameInputBox.values=[this._loadingDatabaseName],this._callbacks.onFetchDatabases(this.serverName,this.authenticationType,this.userName,this.password,this.authToken).then(V=>{V?this._databaseNameInputBox.values=V.sort((W,z)=>W.localeCompare(z)):this._databaseNameInputBox.values=[this._defaultDatabaseName]}).catch(()=>{this._databaseNameInputBox.values=[this._defaultDatabaseName]})):this._databaseNameInputBox.values=[this._defaultDatabaseName]})),this._register(this._databaseNameInputBox.onValueChange(V=>{V===this._defaultDatabaseName||V===this._loadingDatabaseName?this._databaseNameInputBox.value="":this._databaseNameInputBox.value=V}))),this._authTypeSelectBox&&this._register(this._authTypeSelectBox.onDidSelect(V=>{this.onAuthTypeSelected(V.selected,!0),this.setConnectButton()})),this._azureAccountDropdown&&this._register(this._azureAccountDropdown.onDidSelect(()=>{this.onAzureAccountSelected().catch(V=>this._logService.error(`Unexpected error handling Azure Account dropdown click : ${V}`))})),this._azureTenantDropdown&&this._register(this._azureTenantDropdown.onDidSelect(V=>{this.onAzureTenantSelected(V.index)})),this._refreshCredentialsLink&&this._register(o.addDisposableListener(this._refreshCredentialsLink,o.EventType.CLICK,async()=>{let V=this._azureAccountList.find(W=>W.key.accountId===this._azureAccountDropdown.value);V&&(await this._accountManagementService.refreshAccount(V),await this.fillInAzureAccountOptions(),this.updateRefreshCredentialsLink())})),this._register(this._serverNameInputBox.onDidChange(V=>{this.serverNameChanged(V)})),this._register(this._userNameInputBox.onDidChange(V=>{this.setConnectButton()}))}onGroupSelected(V){V===this._addNewServerGroup.name?(this._serverGroupSelectBox.selectWithOptionName(this._previousGroupOption),this._callbacks.onCreateNewServerGroup()):this._previousGroupOption=V}setConnectButton(){let V;this.useConnectionString?V=this._connectionStringInputBox.isInputValid():V=this.authType&&(this.authType===C.AuthenticationType.SqlLogin||this.authType===C.AuthenticationType.AzureMFAAndUser)?this._serverNameInputBox.isInputValid()&&this._userNameInputBox.isInputValid():this._serverNameInputBox.isInputValid(),this._callbacks.onSetConnectButton(V)}onAuthTypeSelected(V,W){let z=this.getMatchingAuthType(V);if(W&&(this._userNameInputBox.value="",this._passwordInputBox.value=""),this._userNameInputBox.hideMessage(),this._passwordInputBox.hideMessage(),this._azureAccountDropdown.hideMessage(),this._azureTenantDropdown.hideMessage(),this._mssqlAuthProviderEnabled&&this._tableContainer.classList.add("hide-azure-tenants"),this._tableContainer.classList.add("hide-username"),this._tableContainer.classList.add("hide-password"),this._tableContainer.classList.add("hide-azure-accounts"),z===C.AuthenticationType.AzureMFA)this.fillInAzureAccountOptions().then(async()=>{this._azureAccountDropdown.enable(),await this.onAzureAccountSelected(!0),this._azureTenantDropdown.enable()}).catch(B=>this._logService.error(`Unexpected error populating Azure Account dropdown : ${B}`)),this._tableContainer.classList.remove("hide-azure-accounts");else if(z===C.AuthenticationType.AzureMFAAndUser)this.fillInAzureAccountOptions().then(async()=>{this._azureAccountDropdown.enable(),await this.onAzureAccountSelected(!0),this._azureTenantDropdown.enable(),this._userNameInputBox.value=this.userName??this._azureAccountList.find(B=>B.displayInfo.displayName===this._azureAccountDropdown.value)?.displayInfo.email??this._azureAccountList[0]?.displayInfo?.email??""}).catch(B=>this._logService.error(`Unexpected error populating Azure Account dropdown : ${B}`)),this._tableContainer.classList.remove("hide-username"),this._tableContainer.classList.remove("hide-azure-accounts");else if(z===C.AuthenticationType.DSTSAuth)this._accountManagementService.getAccountsForProvider("dstsAuth").then(B=>{B&&B.length>0&&(B[0].key.providerArgs={serverName:this.serverName,databaseName:this.databaseName},this._accountManagementService.getAccountSecurityToken(B[0],void 0,void 0).then(K=>{this._token=K.token}))});else if(z===C.AuthenticationType.SqlLogin&&(this._tableContainer.classList.remove("hide-username"),this._tableContainer.classList.remove("hide-password"),this._userNameInputBox.enable(),this._passwordInputBox.enable(),this._rememberPasswordCheckBox.enabled=!0,this._initialConnectionInfo&&(this._initialConnectionInfo.authenticationType=C.AuthenticationType.SqlLogin,this._initialConnectionInfo.userName))){const B=K=>{this._passwordInputBox.value=K.password};this._rememberPasswordCheckBox.checked=this._initialConnectionInfo.savePassword,this._connectionManagementService.addSavedPassword(this._initialConnectionInfo,!0).then(B)}}async fillInAzureAccountOptions(){let V=this._azureAccountDropdown.value;const W=await this._accountManagementService.getAccounts();this._azureAccountList=W.filter(B=>B.key.providerId.startsWith("azure"));let z=this._azureAccountList.map(B=>({text:B.displayInfo.displayName,value:B.key.accountId}));z.length===0&&z.unshift({text:"",value:""}),z.push({text:this._addAzureAccountMessage,value:this._addAzureAccountMessage}),this._azureAccountDropdown.setOptions(z),this._azureAccountDropdown.selectWithOptionName(V,!1)}updateRefreshCredentialsLink(){let V=this._azureAccountList.find(W=>W.key.accountId===this._azureAccountDropdown.value);V&&V.isStale?this._tableContainer.classList.remove("hide-refresh-link"):this._tableContainer.classList.add("hide-refresh-link")}async onAzureAccountSelected(V=!1){if(this.validateAzureAccountSelection(!1),this._azureAccountDropdown.value===this._addAzureAccountMessage){let B=this._azureAccountList.map(H=>H.key.accountId);await this._accountManagementService.addAccount(this._azureProviderId),await this.fillInAzureAccountOptions();let K=this._azureAccountList.find(H=>!B.some(U=>U===H.key.accountId));K?this._azureAccountDropdown.selectWithOptionName(K.key.accountId):this._azureAccountDropdown.select(0)}this.updateRefreshCredentialsLink();const W="hide-azure-tenants";let z=this._azureAccountList.find(B=>B.key.accountId===this._azureAccountDropdown.value);if(!z&&V&&this._azureAccountList.length>0&&(z=this._azureAccountList[0]),this.authenticationType===C.AuthenticationType.AzureMFAAndUser&&this._userNameInputBox.value===""&&(this._userNameInputBox.value=z?.displayInfo?.email??""),z&&z.properties.tenants&&z.properties.tenants.length>1){let B=z.properties.tenants.map(K=>K.displayName);if(this._azureTenantDropdown.setOptions(B),this._mssqlAuthProviderEnabled||this._tableContainer.classList.remove(W),this._azureTenantId){let K=z.properties.tenants.find(H=>H.id===this._azureTenantId);K?this.onAzureTenantSelected(B.indexOf(K.displayName)):(this._logService.error(`onAzureAccountSelected : Could not find tenant with ID ${this._azureTenantId} for account ${z.displayInfo.displayName}`),this.onAzureTenantSelected(0))}else this.onAzureTenantSelected(0)}else{if(z&&z.properties.tenants&&z.properties.tenants.length===1){let B=z.properties.tenants.map(K=>K.displayName);this._azureTenantDropdown.setOptions(B),this._azureTenantId=z.properties.tenants[0].id,this.onAzureTenantSelected(0)}this._mssqlAuthProviderEnabled||this._tableContainer.classList.add(W)}}onAzureTenantSelected(V){let W=this._azureAccountList.find(z=>z.key.accountId===this._azureAccountDropdown.value);if(W&&W.properties.tenants){let z=W.properties.tenants[V];z?this._callbacks.onAzureTenantSelection(z.id):this._logService.error(`onAzureTenantSelected : Tenant list not found as expected, missing tenant on index ${V}`)}}serverNameChanged(V){this.setConnectButton(),V.toLocaleLowerCase().indexOf("database.windows.net")>-1&&this._callbacks.onSetAzureTimeOut()}focusOnAdvancedButton(){this._advancedButton.focus()}focusOnServerGroup(){this._serverGroupSelectBox&&this._serverGroupSelectBox.focus()}updateServerGroup(V,W){this._serverGroupSelectBox&&(this._serverGroupOptions=V,this._serverGroupOptions.push(this._addNewServerGroup),this._serverGroupSelectBox.setOptions(this._serverGroupOptions.map(z=>z instanceof m.ConnectionProfileGroup?z.fullName:z.name)),W&&(this._serverGroupSelectBox.selectWithOptionName(W),this._previousGroupOption=this._serverGroupSelectBox.value))}initDialog(V){this._initialConnectionInfo=V,this.fillInConnectionInputs(V)}focusOnOpen(){this.useConnectionString?this._connectionStringInputBox.focus():(this._serverNameInputBox.focus(),this.focusPasswordIfNeeded()),this.clearValidationMessages()}clearValidationMessages(){this._serverNameInputBox.hideMessage(),this._userNameInputBox.hideMessage(),this._azureAccountDropdown.hideMessage(),this._connectionStringInputBox?.hideMessage()}getModelValue(V){return V!==void 0?V.toString():""}fillInConnectionInputs(V){if(V){V.serverName&&this._connectionStringOptions.isEnabled&&(this._defaultInputOptionRadioButton.checked=!0),this._serverNameInputBox.value=this.getModelValue(V.serverName),this._connectionNameInputBox.value=this.getModelValue(V.connectionName),this._userNameInputBox.value=this.getModelValue(V.userName),this._passwordInputBox.value=this.getModelValue(V.password),this._azureTenantId=V.azureTenantId,this._databaseNameInputBox&&(this._databaseNameInputBox.value=this.getModelValue(V.databaseName));let W;if(V.groupFullName?W=V.groupFullName.replace("root/",""):W=this.DefaultServerGroup.name,this._serverGroupSelectBox&&(this._serverGroupSelectBox.selectWithOptionName(W),this._previousGroupOption=this._serverGroupSelectBox.value),this.getModelValue(V.password)===""?this._rememberPasswordCheckBox.checked=!1:this._rememberPasswordCheckBox.checked=V.savePassword,V.authenticationType!==null&&V.authenticationType!==void 0){let z=this.getAuthTypeDisplayName(V.authenticationType);this._authTypeSelectBox.selectWithOptionName(z)}this._authTypeSelectBox?this.onAuthTypeSelected(this._authTypeSelectBox.value,!1):(this._tableContainer.classList.remove("hide-username"),this._tableContainer.classList.remove("hide-password"),this._tableContainer.classList.add("hide-azure-accounts")),this._customOptionWidgets&&this._customOptionWidgets.forEach((z,B)=>{let K=this.getModelValue(V.options[this._customOptions[B].name]);K!==""&&(z instanceof y.SelectBox?z.selectWithOptionName(K):z instanceof D.InputBox&&(z.value=K))}),(this.authType===C.AuthenticationType.AzureMFA||this.authType===C.AuthenticationType.AzureMFAAndUser||V.azureAccount!==null)&&this.fillInAzureAccountOptions().then(async()=>{let z=this.authType===C.AuthenticationType.AzureMFA||V.azureAccount!==null?V.azureAccount:V.userName,B;z&&(B=this._azureAccountList?.find(H=>H.key.accountId===this.getModelValue(z)),B&&(B.properties.tenants?.find(H=>H.id===this._azureTenantId)||(this._azureTenantId=B.properties.tenants[0].id),this._azureAccountDropdown.selectWithOptionName(B.key.accountId))),B||(this._azureAccountDropdown.select(0),B=this._azureAccountList[0],this._azureAccountList.length>0?z=B?.key?.accountId:this._logService.debug("fillInConnectionInputs: No accounts available")),await this.onAzureAccountSelected();let K=V.azureTenantId;if(B&&B.properties.tenants)if(B.properties.tenants.length>1){if(K){let H=B.properties.tenants.find(U=>U.id===K);H?this._azureTenantDropdown.selectWithOptionName(H.displayName):this._logService.error(`fillInConnectionInputs : Could not find tenant with ID ${this._azureTenantId} for account ${z}`),this._azureTenantDropdown.value&&this.onAzureTenantSelected(this._azureTenantDropdown.values.indexOf(this._azureTenantDropdown.value))}}else B.properties.tenants.length===1&&(this._azureTenantId=B.properties.tenants[0].id,this.onAzureTenantSelected(0));else z&&this._logService.error(`fillInConnectionInputs : Could not find any tenants for account ${z}`)}).catch(z=>this._logService.error(`Unexpected error populating initial Azure Account options : ${z}`)),this.setConnectButton(),this.focusPasswordIfNeeded()}}getAuthTypeDisplayName(V){let W,z=this._optionsMaps[v.ConnectionOptionSpecialType.authType];return z&&z.categoryValues.forEach(B=>{B.name===V&&(W=B.displayName)}),W}getAuthTypeName(V){let W;return this._optionsMaps[v.ConnectionOptionSpecialType.authType].categoryValues.forEach(B=>{B.displayName===V&&(W=B.name)}),W}handleOnConnecting(){this._focusedBeforeHandleOnConnection=document.activeElement,this._advancedButton.enabled=!1,this._serverNameInputBox.disable(),this._userNameInputBox.disable(),this._passwordInputBox.disable(),this._connectionNameInputBox.disable(),this._rememberPasswordCheckBox.enabled=!1,this._serverGroupSelectBox&&this._serverGroupSelectBox.disable(),this._databaseNameInputBox&&(this._databaseNameInputBox.enabled=!1),this._authTypeSelectBox&&this._authTypeSelectBox.disable(),(this.authType===C.AuthenticationType.AzureMFA||this.authType===C.AuthenticationType.AzureMFAAndUser)&&(this._azureAccountDropdown.disable(),this._azureTenantDropdown?.disable(),this._azureAccountDropdown.value||this._azureAccountDropdown.select(0)),this._customOptionWidgets&&this._customOptionWidgets.forEach(V=>{V.disable()}),this._connectionStringOptions.isEnabled&&(this._connectionStringInputBox.disable(),this._defaultInputOptionRadioButton.enabled=!1,this._connectionStringRadioButton.enabled=!1)}handleResetConnection(){this._advancedButton.enabled=!0,this._serverNameInputBox.enable(),this._connectionNameInputBox.enable();let V;this._authTypeSelectBox&&(this._authTypeSelectBox.enable(),V=this.getMatchingAuthType(this._authTypeSelectBox.value)),!V||V===C.AuthenticationType.SqlLogin?(this._userNameInputBox.enable(),this._passwordInputBox.enable(),this._rememberPasswordCheckBox.enabled=!0):V===C.AuthenticationType.AzureMFAAndUser&&this._userNameInputBox.enable(),this._focusedBeforeHandleOnConnection&&this._focusedBeforeHandleOnConnection.focus(),this._serverGroupSelectBox&&this._serverGroupSelectBox.enable(),this._databaseNameInputBox&&(this._databaseNameInputBox.enabled=!0),(this.authType===C.AuthenticationType.AzureMFA||this.authType===C.AuthenticationType.AzureMFAAndUser)&&(this._azureAccountDropdown.enable(),this._azureTenantDropdown?.enable()),this._customOptionWidgets&&this._customOptionWidgets.forEach(W=>{W.enable()}),this._connectionStringOptions.isEnabled&&(this._connectionStringInputBox.enable(),this._defaultInputOptionRadioButton.enabled=!0,this._connectionStringRadioButton.enabled=!0)}get useConnectionString(){return!!this._connectionStringRadioButton?.checked}get connectionString(){return this._connectionStringInputBox?.value}get connectionName(){return this._connectionNameInputBox.value}get serverName(){return this._serverNameInputBox.value}get databaseName(){return this._databaseNameInputBox?this._databaseNameInputBox.value:void 0}get userName(){return this.authenticationType===C.AuthenticationType.AzureMFA?this._azureAccountDropdown.label:this._userNameInputBox.value}get password(){return this._passwordInputBox.value}get authenticationType(){return this._authTypeSelectBox?this.getAuthTypeName(this._authTypeSelectBox.value):void 0}get authToken(){if(this.authenticationType===C.AuthenticationType.AzureMFAAndUser||this.authenticationType===C.AuthenticationType.AzureMFA)return this._azureAccountDropdown.value;if(this.authenticationType===C.AuthenticationType.DSTSAuth)return this._token}validateAzureAccountSelection(V=!0){if(this.authType!==C.AuthenticationType.AzureMFA&&this.authType!==C.AuthenticationType.AzureMFAAndUser)return!0;let W=this._azureAccountDropdown.value;return W===""||W===this._addAzureAccountMessage?(V&&this._azureAccountDropdown.showMessage({content:(0,s.localize)(21,null),type:3}),!1):(this._azureAccountDropdown.hideMessage(),!0)}validateInputs(){if(this.useConnectionString){const V=this._connectionStringInputBox.validate()===void 0;return V||this._connectionStringInputBox.focus(),V}else{let V=!1;const W=this._serverNameInputBox.validate()===void 0;W||(this._serverNameInputBox.focus(),V=!0);const z=this._userNameInputBox.validate()===void 0;!z&&!V&&(this._userNameInputBox.focus(),V=!0);const B=this._passwordInputBox.validate()===void 0;!B&&!V&&(this._passwordInputBox.focus(),V=!0);const K=this.validateAzureAccountSelection();return!K&&!V&&(this._azureAccountDropdown.focus(),V=!0),W&&z&&B&&K}}async connect(V){let W=this.validateInputs();if(W){if(this.useConnectionString)try{const z=await this._connectionManagementService.buildConnectionInfo(this.connectionString,this._providerName);if(!z)throw Error((0,s.localize)(22,null));V.options=z.options,V.savePassword=!0}catch(z){return this._logService.error(`${this._providerName} Failed to parse the connection string : ${z}`),this._errorMessageService.showDialog(g.default.Error,(0,s.localize)(23,null),(0,s.localize)(24,null,a.getErrorMessage(z)),z.stack),!1}else{V.serverName=this.serverName,V.userName=this.userName,V.password=this.password,V.authenticationType=this.authenticationType;const z=this.authToken;z&&(V.azureAccount=z),V.savePassword=this._rememberPasswordCheckBox.checked,V.databaseName=this.databaseName,this._customOptionWidgets&&this._customOptionWidgets.forEach((B,K)=>{V.options[this._customOptions[K].name]=B.value})}(V.providerName===C.mssqlProviderName||V.providerName===C.mssqlCmsProviderName)&&V.options[C.mssqlApplicationNameOption]&&!V.options[C.mssqlApplicationNameOption].endsWith(C.applicationName)&&(V.options[C.mssqlApplicationNameOption]=(0,_.adjustForMssqlAppName)(V.options[C.mssqlApplicationNameOption])),V.connectionName=this.connectionName,this._serverGroupSelectBox&&(this._serverGroupSelectBox.value===this.DefaultServerGroup.name?(V.groupFullName="",V.saveProfile=!0,V.groupId=this.findGroupId(V.groupFullName)):this._serverGroupSelectBox.value===this.NoneServerGroup.name?(V.groupFullName="",V.saveProfile=!1):this._serverGroupSelectBox.value!==this._addNewServerGroup.name&&(V.groupFullName=this._serverGroupSelectBox.value,V.saveProfile=!0,V.groupId=this.findGroupId(V.groupFullName)))}return W}findGroupId(V){let W;return m.ConnectionProfileGroup.isRoot(V)?(W=this._serverGroupOptions.find(z=>m.ConnectionProfileGroup.isRoot(z.name)),W===void 0&&(W=this._serverGroupOptions.find(z=>z.name===this.DefaultServerGroup.name))):W=this._serverGroupOptions.find(z=>z.name===V),W?W.id:void 0}getMatchingAuthType(V){if(V)return N._authTypes.find(W=>this.getAuthTypeDisplayName(W)===V)}closeDatabaseDropdown(){this._databaseNameInputBox.blur()}get databaseDropdownExpanded(){return this._databaseDropdownExpanded}set databaseDropdownExpanded(V){this._databaseDropdownExpanded=V}get authType(){let V=this.getAuthTypeDisplayName(this.authenticationType);return this.getMatchingAuthType(V)}focusPasswordIfNeeded(){this.authType&&this.authType===C.AuthenticationType.SqlLogin&&this.userName&&!this.password&&this._passwordInputBox.focus()}};e.ConnectionWidget=x,e.ConnectionWidget=x=N=fe([O(3,u.IThemeService),O(4,i.IContextViewService),O(5,S.IConnectionManagementService),O(6,h.IAccountManagementService),O(7,p.ILogService),O(8,n.IErrorMessageService),O(9,E.IConfigurationService)],x)}),define(Q[3571],Y([1,0,199,166,350,196,117,58,262,29,2180,7,19,18,111,1285,11,188,9,54,101,1051]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CmsConnectionWidget=void 0;let l=class extends s.ConnectionWidget{constructor(g,w,E,C,I,_,A,k,L,R,M){super(g,w,E,C,I,A,k,L,R,M),this._authTypeMap={[T.cmsProviderName]:[T.AuthenticationType.SqlLogin,T.AuthenticationType.Integrated]};let N=this._optionsMaps[D.ConnectionOptionSpecialType.authType];if(N){let P=this.getAuthTypeDefault(N,r.OS),x=this.getAuthTypeDisplayName(P);this._authTypeSelectBox=this._register(new t.SelectBox(N.categoryValues.map(F=>F.displayName),x,c.defaultSelectBoxStyles,this._contextViewService,void 0,{ariaLabel:N.displayName}))}}fillInConnectionForm(g=!1){this.addServerNameOption(),this.addAuthenticationTypeOption(g),this.addLoginOptions(),this.addCustomConnectionOptions(),this.addConnectionNameOptions(),this.addServerDescriptionOption(),this.addAdvancedOptions()}addAuthenticationTypeOption(g=!1){super.addAuthenticationTypeOption(g);let w=this._optionsMaps[D.ConnectionOptionSpecialType.authType],E=w.categoryValues;g?(E=w.categoryValues.filter(C=>C.name===T.AuthenticationType.Integrated),this._authTypeSelectBox.setOptions(E.map(C=>C.displayName)),w.defaultValue=T.AuthenticationType.Integrated):(E=w.categoryValues,this._authTypeSelectBox.setOptions(E.map(C=>C.displayName)),r.OS===1?w.defaultValue=this.getAuthTypeDisplayName(T.AuthenticationType.Integrated):w.defaultValue=this.getAuthTypeDisplayName(T.AuthenticationType.SqlLogin)),this._authTypeSelectBox.selectWithOptionName(w.defaultValue)}addServerDescriptionOption(){let g=this._optionsMaps.serverDescription;if(g){g.displayName=(0,S.localize)(0,null);let w=b.appendRow(this._tableContainer,g.displayName,"connection-label","connection-input","server-description-input");this._serverDescriptionInputBox=new y.InputBox(w,this._contextViewService,{type:"textarea",flexibleHeight:!0,inputBoxStyles:p.defaultInputBoxStyles}),this._serverDescriptionInputBox.setHeight("75px")}}createConnectionWidget(g,w=!1){this._container=h.append(g,h.$("div.connection-table")),this._tableContainer=h.append(this._container,h.$("table.connection-table-content")),this.fillInConnectionForm(w),this.registerListeners(),this._authTypeSelectBox&&this.onAuthTypeSelected(this._authTypeSelectBox.value,!1)}handleOnConnecting(){super.handleOnConnecting(),this._serverDescriptionInputBox&&this._serverDescriptionInputBox.disable()}handleResetConnection(){super.handleResetConnection(),this._serverDescriptionInputBox&&this._serverDescriptionInputBox.enable()}get registeredServerDescription(){return this._serverDescriptionInputBox.value}async connect(g){let w=await super.connect(g);return this._serverDescriptionInputBox&&(g.options.registeredServerDescription=this._serverDescriptionInputBox.value,g.options.registeredServerName=this._connectionNameInputBox.value),w}fillInConnectionInputs(g){if(super.fillInConnectionInputs(g),g){let w=g.options.registeredServerDescription?g.options.registeredServerDescription:"";this._serverDescriptionInputBox.value=w}}};e.CmsConnectionWidget=l,e.CmsConnectionWidget=l=fe([O(3,a.IThemeService),O(4,m.IContextViewService),O(5,i.ILayoutService),O(6,f.IConnectionManagementService),O(7,v.IAccountManagementService),O(8,o.ILogService),O(9,u.IErrorMessageService),O(10,d.IConfigurationService)],l)}),define(Q[1286],Y([1,0,58,3482,194,117,184,5,196,1285,682,11]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionController=void 0;let a=class{constructor(i,s,o,u,d,p,c){this._connectionManagementService=u,this._instantiationService=d,this._serverGroupController=p,this._logService=c,this._databaseCache=new Map,this._callback=s,this._providerOptions=i.connectionOptions;let l=this._providerOptions.filter(n=>n.specialValueType!==null&&n.specialValueType!==void 0||n.showOnConnectionDialog);this._connectionWidget=this._instantiationService.createInstance(m.ConnectionWidget,l,{onSetConnectButton:n=>this._callback.onSetConnectButton(n),onCreateNewServerGroup:()=>this.onCreateNewServerGroup(),onAdvancedProperties:()=>this.handleOnAdvancedProperties(),onSetAzureTimeOut:()=>this.handleonSetAzureTimeOut(),onFetchDatabases:(n,g,w,E,C)=>this.onFetchDatabases(n,g,w,E,C).then(I=>I),onAzureTenantSelection:n=>this.onAzureTenantSelection(n)},o),this._providerName=o}async onFetchDatabases(i,s,o,u,d){let p=this._model;p.serverName=i,p.authenticationType=s,p.userName=o,p.password=u,p.groupFullName="",p.saveProfile=!1,p.azureAccount=d;let c=this._connectionManagementService.getConnectionUri(p);if(this._databaseCache.has(c)){let l=this._databaseCache.get(c);if(l!==null)return l;throw new Error("database cache didn't have value")}else{const l=await this._connectionManagementService.connect(p,c);if(l&&l.connected){const n=await this._connectionManagementService.listDatabases(c);if(n&&n.databaseNames)return this._databaseCache.set(c,n.databaseNames),n.databaseNames;throw this._databaseCache.set(c,null),new Error("list databases failed")}else throw new Error(l.errorMessage)}}onCreateNewServerGroup(){this._serverGroupController.showCreateGroupDialog({onAddGroup:i=>this._connectionWidget.updateServerGroup(this.getAllServerGroups(),i),onClose:()=>this._connectionWidget.focusOnServerGroup()}).catch(i=>this._logService.error(i))}handleonSetAzureTimeOut(){let i="connectTimeout",s=this._model.options[i];s==null&&(this._model.options[i]=30)}onAzureTenantSelection(i){this._model.options.azureAccountToken!==void 0&&(this._model.options.azureAccountToken=void 0),this._model.azureTenantId!==i&&(this._model.azureTenantId=i)}handleOnAdvancedProperties(){this._advancedController||(this._advancedController=this._instantiationService.createInstance(y.AdvancedPropertiesController,()=>this._connectionWidget.focusOnAdvancedButton()));let i=this._providerOptions.filter(s=>s.specialValueType===void 0||s.specialValueType===null&&!s.showOnConnectionDialog);this._advancedController.showDialog(i,this._model.options)}showUiComponent(i){this._databaseCache=new Map,this._connectionWidget.createConnectionWidget(i)}flattenGroups(i,s){i&&(i.fullName!==""&&s.push(i),i.hasChildren()&&i.children.forEach(o=>this.flattenGroups(o,s)))}getAllServerGroups(i){let s=this._connectionManagementService.getConnectionGroups(i),o=[],u;return s&&s.length>0&&b.ConnectionProfileGroup.isRoot(s[0].name)?u=s[0].id:u=T.defaultGroupId,o.push(Object.assign({},this._connectionWidget.DefaultServerGroup,{id:u})),o.push(this._connectionWidget.NoneServerGroup),s?.length>0&&this.flattenGroups(s[0],o),o}initDialog(i,s){this._connectionWidget.updateServerGroup(this.getAllServerGroups(i)),this._model=s,this._model.providerName=this._providerName;let o=this._providerOptions.find(u=>u.specialValueType===v.ConnectionOptionSpecialType.appName);if(o){let u=o.name;this._model.options[u]=D.applicationName}else o=this._providerOptions.find(u=>u.name===D.mssqlApplicationNameOption),o&&(this._model.providerName===D.mssqlProviderName||this._model.providerName===D.mssqlCmsProviderName)&&(this._model.options[D.mssqlApplicationNameOption]=T.adjustForMssqlAppName(this._model.options[D.mssqlApplicationNameOption]));this._connectionWidget.initDialog(this._model)}focusOnOpen(){this._connectionWidget.focusOnOpen()}async validateConnection(){return{isValid:await this._connectionWidget.connect(this._model),connection:this._model}}fillInConnectionInputs(i){this._model=i,this._connectionWidget.fillInConnectionInputs(i)}handleOnConnecting(){this._connectionWidget.handleOnConnecting()}handleResetConnection(){this._connectionWidget.handleResetConnection()}closeDatabaseDropdown(){this._connectionWidget.closeDatabaseDropdown()}get databaseDropdownExpanded(){return this._connectionWidget.databaseDropdownExpanded}set databaseDropdownExpanded(i){this._connectionWidget.databaseDropdownExpanded=i}};e.ConnectionController=a,e.ConnectionController=a=fe([O(3,t.IConnectionManagementService),O(4,f.IInstantiationService),O(5,S.IServerGroupController),O(6,h.ILogService)],a)}),define(Q[3572],Y([1,0,58,5,1286,3571,682,11]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CmsConnectionController=void 0;let v=class extends b.ConnectionController{constructor(S,h,a,r,i,s,o){super(S,h,a,r,i,s,o);let u=this._providerOptions.filter(d=>d.specialValueType!==null&&d.specialValueType!==void 0||d.showOnConnectionDialog);this._connectionWidget=this._instantiationService.createInstance(D.CmsConnectionWidget,u,{onSetConnectButton:d=>this._callback.onSetConnectButton(d),onCreateNewServerGroup:()=>this.onCreateNewServerGroup(),onAdvancedProperties:()=>this.handleOnAdvancedProperties(),onSetAzureTimeOut:()=>this.handleonSetAzureTimeOut(),onFetchDatabases:(d,p,c,l)=>this.onFetchDatabases(d,p,c,l).then(n=>n)},a)}showUiComponent(S,h=!1){this._databaseCache=new Map,this._connectionWidget.createConnectionWidget(S,h)}};e.CmsConnectionController=v,e.CmsConnectionController=v=fe([O(3,t.IConnectionManagementService),O(4,y.IInstantiationService),O(5,T.IServerGroupController),O(6,f.ILogService)],v)}),define(Q[1287],Y([1,0,8,196]),function(q,e,t,y){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.ServerInfoContextKey=void 0;let D=class{static{b=this}static{this.ServerInfo=new t.RawContextKey("serverInfo",void 0)}static{this.ServerMajorVersion=new t.RawContextKey("serverMajorVersion",void 0)}static{this.IsCloud=new t.RawContextKey("isCloud",void 0)}static{this.EngineEdition=new t.RawContextKey("engineEdition",void 0)}constructor(f){this._serverInfo=b.ServerInfo.bindTo(f),this._serverMajorVersion=b.ServerMajorVersion.bindTo(f),this._isCloud=b.IsCloud.bindTo(f),this._engineEdition=b.EngineEdition.bindTo(f)}set(f){this._serverInfo.set(f);let v=f.serverMajorVersion;v&&this._serverMajorVersion.set(`${v}`),this._isCloud.set(f&&f.isCloud);let m=f&&f.engineEditionId;m?this._engineEdition.set(m):this._engineEdition.set(y.DatabaseEngineEdition.Unknown)}reset(){this._serverMajorVersion.reset(),this._isCloud.reset(),this._engineEdition.reset()}get(){return this._serverInfo.get()}};e.ServerInfoContextKey=D,e.ServerInfoContextKey=D=b=fe([O(0,t.IContextKeyService)],D)}),define(Q[1288],Y([1,0,174,63,19,6,8,68,2196,34,7,11,76,15,147,111,78,276,41,183,196,1663]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorMessageDialog=void 0;const l=1;let n=class extends t.Modal{constructor(w,E,C,I,_,A,k,L){super("","ErrorMessage",I,C,E,w,A,k,_,{dialogStyle:"normal",hasTitleIcon:!0,height:340}),this._openerService=L,this._actionButtons=[],this._actions=[],this._onOk=new D.Emitter,this.onOk=this._onOk.event,this._telemetryView="ErrorMessageDialog",this._okLabel=(0,v.localize)(0,null),this._closeLabel=(0,v.localize)(1,null),this._readMoreLabel=(0,v.localize)(2,null)}renderBody(w){this._body=S.append(w,S.$("div.error-dialog"))}render(){super.render(),this._register((0,i.attachModalDialogStyler)(this,this._themeService)),this.createCopyButton(),this._actionButtons=[];for(let w=0;w<l;w++)this._actionButtons.unshift(this.createStandardButton((0,v.localize)(3,null),()=>this.onActionSelected(w)));this._okButton=this.addFooterButton(this._okLabel,()=>this.ok())}createCopyButton(){let w=(0,v.localize)(4,null);this._copyButton=this.addFooterButton(w,()=>{this._messageDetails&&this._clipboardService.writeText(this._messageDetails).catch(E=>(0,r.onUnexpectedError)(E))},"left",!0),this._copyButton.icon="codicon scriptToClipboard",this._copyButton.element.title=w}createStandardButton(w,E){return this.addFooterButton(w,E,"right",!1)}onActionSelected(w){if(this._actions&&w<this._actions.length){const E=this._actions[w].id;this._telemetryService.sendActionEvent(this._telemetryView,E),this.ok(!1),this._actions[w].run(),this._promise?.resolve(E)}}layout(w){}updateDialogBody(){if(S.clearNode(this._body),S.append(this._body,S.$("div.error-message")).innerText=this._message,this._instructionText){let w=S.$("div.error-instruction-text");w.innerText=this._instructionText,this._readMoreLink&&new u.Link(w,{label:this._readMoreLabel,href:this._readMoreLink},void 0,this._openerService),S.append(this._body,w)}}getBody(){return this._body}updateIconTitle(){switch(this._severity){case y.default.Error:this.titleIconClassName="sql codicon error";break;case y.default.Warning:this.titleIconClassName="sql codicon warning";break;case y.default.Info:this.titleIconClassName="sql codicon info";break}}onClose(){this.ok()}onAccept(){this.ok()}ok(w=!0){this._telemetryService.sendActionEvent(this._telemetryView,"ok"),this._onOk.fire(),this.close("ok",w)}close(w="close",E){this._telemetryService.sendActionEvent(this._telemetryView,w.toString()),this.hide(w),E&&this._promise?.resolve(w.toString())}open(w,E,C,I,_,A,k,L,R=!0){if(this._telemetryView=w,this._severity=E,this._message=I,this._instructionText=k,this._readMoreLink=L,this.title=C,this._messageDetails=_,this._messageDetails?this._copyButton.element.style.visibility="visible":this._copyButton.element.style.visibility="hidden",this._message&&this._bodyContainer.setAttribute("aria-description",this._message),R&&this.resetActions(),A?.length>0){for(let M=0;M<l&&M<A.length;M++){this._actions.push(A[M]);let N=this._actionButtons[M];N.label=A[M].label,N.element.style.visibility="visible"}this.removeFooterButton(this._okLabel),this.removeFooterButton(this._closeLabel),this._okButton=this.addFooterButton(this._closeLabel,()=>this.ok(),void 0,!0)}else this.removeFooterButton(this._okLabel),this.removeFooterButton(this._closeLabel),this._okButton=this.addFooterButton(this._okLabel,()=>this.ok());this.updateIconTitle(),this.updateDialogBody(),this.show(),A?.length>0?this._actionButtons[0].focus():this._okButton.focus()}openCustomAsync(w){if(!w)return;let E=[];this.resetActions(),w.actions?.forEach(I=>{E.push(new m.Action(I.id,I.label,"",!0,()=>{}))}),this.open(w.telemetryView,this.convertToSeverity(w.severity),w.headerTitle,w.message,w.messageDetails,E,w.instructionText,w.readMoreLink,!1);const C=new p.Deferred;return this._promise=C,this._promise.promise}convertToSeverity(w){let E=y.default.Error;switch(w){case c.MessageLevel.Error:E=y.default.Error;break;case c.MessageLevel.Information:E=y.default.Info;break;case c.MessageLevel.Warning:E=y.default.Warning;break}return E}resetActions(){this._actions=[];for(let w of this._actionButtons)w.element.style.visibility="hidden"}dispose(){}};e.ErrorMessageDialog=n,e.ErrorMessageDialog=n=fe([O(0,b.IThemeService),O(1,f.IClipboardService),O(2,s.ILayoutService),O(3,a.IAdsTelemetryService),O(4,T.IContextKeyService),O(5,h.ILogService),O(6,o.ITextResourcePropertiesService),O(7,d.IOpenerService)],n)}),define(Q[3573],Y([1,0,2197,63,5,1288]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorMessageService=void 0;let T=class{handleOnOk(){}constructor(v){this._instantiationService=v}showDialog(v,m,S,h,a="ErrorMessageDialog",r,i,s){this.doShowDialog(a,v,m,S,h,r,i,s)}doShowDialog(v,m,S,h,a,r,i,s){this._errorDialog||(this._errorDialog=this._instantiationService.createInstance(D.ErrorMessageDialog),this._errorDialog.onOk(()=>this.handleOnOk()),this._errorDialog.render());let o=S||this.getDefaultTitle(m);return this._errorDialog.open(v,m,o,h,a,r,i,s)}getDefaultTitle(v){switch(v){case y.default.Error:return(0,t.localize)(0,null);case y.default.Warning:return(0,t.localize)(1,null);case y.default.Info:return(0,t.localize)(2,null);case y.default.Ignore:return(0,t.localize)(3,null)}}};e.ErrorMessageService=T,e.ErrorMessageService=T=fe([O(0,b.IInstantiationService)],T)}),define(Q[3574],Y([1,0,263,76,174,78,8,111,11,19,2230,147,7,29,196,187,1199,6,66,43,256,820,272,573,63,87,188,54,101,1666]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_){"use strict";var A;Object.defineProperty(e,"__esModule",{value:!0}),e.FilterDialog=void 0;const k=(0,S.localize)(0,null),L=(0,S.localize)(1,null),R=(0,S.localize)(2,null),M="icon filterLabel",N=(0,S.localize)(3,null),P=(0,S.localize)(4,null),x=(0,S.localize)(5,null),F=(0,S.localize)(6,null),V=(0,S.localize)(7,null),W=(0,S.localize)(8,null),z=(0,S.localize)(9,null),B=(0,S.localize)(10,null),K=(0,S.localize)(11,null),H=(0,S.localize)(12,null),U=(0,S.localize)(13,null),G=(0,S.localize)(14,null),$=(0,S.localize)(15,null),ie=(0,S.localize)(16,null),J=(0,S.localize)(17,null),j=(0,S.localize)(18,null),ee=(0,S.localize)(19,null),X=(0,S.localize)(20,null),te=(0,S.localize)(21,null),Z=(0,S.localize)(22,null),se=(0,S.localize)(23,null),re=(0,S.localize)(24,null),oe="property",le="operator",ne="value",ce="clear";let ae=A=class extends b.Modal{constructor(de,ge,he,be,ve,Ie,Se,we,ye,Re,Le,Pe,Ae,Me,Oe,De){super("ObjectExplorerServiceDialog","Object Explorer Service Dialog",Se,we,ye,Ie,Re,Le,Pe,{dialogStyle:"normal",hasTitleIcon:!0,hasSpinner:!0}),this._properties=de,this._filterDialogTitle=ge,this._filterDialogSubtitle=he,this._appliedFilters=be,this.applyFilterAction=ve,this._contextViewProvider=Ae,this._accessibilityService=Me,this._quickInputService=Oe,this._errorMessageService=De,this._onFilterApplied=new u.Emitter,this.onFilterApplied=this._onFilterApplied.event,this._onCloseEvent=new u.Emitter,this.onDialogClose=this._onCloseEvent.event}open(){this.render(),this.show(),this.filterTable.focus()}render(){super.render(),this.title=this._filterDialogTitle,this.titleIconClassName=M,this._register((0,h.attachModalDialogStyler)(this,this._themeService)),this.addFooterButton(k,async()=>{await this.onApply()}),this.addFooterButton(L,()=>{this.onClose()}),this.addFooterButton(R,()=>{this.onClearAll()},"left",!0)}renderBody(de){const ge=a.append(de,a.$(".filter-dialog-body")),he=a.append(ge,a.$(".filter-dialog-node-path")),be=a.append(he,a.$(".filter-dialog-node-path-label"));be.innerText=re;const ve=a.append(he,a.$(".filter-dialog-node-path-text")),Ie=this._filterDialogSubtitle;ve.title=Ie,ve.innerText=Ie;const Se=a.append(ge,a.$(".filter-table-container")),we=a.append(Se,a.$(".filter-table"));this._tableCellEditorFactory=new o.TableCellEditorFactory({valueGetter:(Ae,Me)=>{if(Me.field===ne&&Ae[le].value===J){const Oe=Ae.filterPropertyIndex,De=this.filterTable.getData().getItems();if(this._properties[Oe].type===i.NodeFilterPropertyDataType.Date){let Ce="";for(let me=0;me<De.length;me++)if(De[me].filterPropertyIndex===Oe){Ce=De[me].value.value;break}const _e=Ae[Me.field].value;return _e===""?Ce:_e}}return Ae[Me.field].value},valueSetter:(Ae,Me,Oe,De,Ce)=>{if(Oe[De.field].value=Ce,De.field==="operator"){const _e=Oe.filterPropertyIndex,me=this._properties[_e].type;if(me===i.NodeFilterPropertyDataType.Date||me===i.NodeFilterPropertyDataType.Number)if(Ce===z||Ce===B){const ke=this.filterTable.getData().getItems();if(ke.length>Me+1&&ke[Me+1].operator.value===J)return;const Ee={property:{value:""},operator:{value:J,values:[J]},value:{value:"",values:[]},filterPropertyIndex:ke[Me].filterPropertyIndex},pe=this.filterTable.activeCell;ke.splice(Me+1,0,Ee),Pe.clear(),Pe.push(ke),this.filterTable.rerenderGrid(),this.filterTable.layout(new a.Dimension(600,(Pe.getItems().length+2)*l.TableRowHeight)),this.filterTable.setActiveCell(pe.row,pe.cell)}else{const ke=this.filterTable.getData().getItems();if(ke.length>Me+1&&ke[Me+1].operator.value===J){const Ee=this.filterTable.activeCell;ke.splice(Me+1,1),Pe.clear(),Pe.push(ke),this.filterTable.rerenderGrid(),this.filterTable.layout(new a.Dimension(600,(Pe.getItems().length+2)*l.TableRowHeight)),this.filterTable.setActiveCell(Ee.row,Ee.cell)}}}},optionsGetter:(Ae,Me)=>Ae[Me.field].values,inputBoxStyles:I.defaultInputBoxStyles,editableDropdownStyles:_.defaultEditableDropdownStyles,selectBoxStyles:_.defaultSelectBoxStyles},this._contextViewProvider);const ye=[{id:oe,name:j,field:oe,formatter:n.textFormatter,width:180},{id:le,name:ee,editor:this._tableCellEditorFactory.getDropdownEditorClass(this,[],!1),field:le,formatter:n.textFormatter,width:180},{id:ne,name:X,width:180,formatter:n.textFormatter,field:ne}],Re=new g.ButtonColumn({id:ce,iconCssClass:"icon erase",name:te,title:te,width:60,resizable:!0,isFontIcon:!0});this._register(Re.onClick(Ae=>{const Me=Ae.row,Oe=this.filterTable.getData().getItems();Oe[Me][ne].value="",Pe.clear(),Pe.push(Oe),this.filterTable.rerenderGrid()})),ye.push(Re.definition);const Le=[];this._appliedFilters||(this._appliedFilters=[]),this._properties.forEach((Ae,Me)=>{const Oe=this._appliedFilters.find(_e=>_e.name===Ae.name),De=this.getOperatorsForType(Ae.type),Ce={property:{value:Ae.displayName,id:Ae.name},operator:{value:Oe?this.getFilterOperatorString(Oe.operator):De[0],values:De},value:{value:Oe?this.getStringValueForFilter(Ae,Oe.value):"",values:this.getChoiceValuesForFilterProperties(Ae)},filterPropertyIndex:Me};if(Le.push(Ce),Oe?.operator===i.NodeFilterOperator.Between||Oe?.operator===i.NodeFilterOperator.NotBetween){Ce.value.value=this.getStringValueForFilter(Ae,Oe.value[0]);const _e={property:{value:"",id:""},operator:{value:J,values:[J]},value:{value:this.getStringValueForFilter(Ae,Oe.value[1]),values:[]},datatype:Ae.type,filterPropertyIndex:Me};Le.push(_e)}});const Pe=new c.TableDataView;Pe.push(Le),Pe.getItemMetadata=Ae=>{const Me=Pe.getItem(Ae),Oe=this._properties[Me.filterPropertyIndex];let De;return Me.operator.value===J?Oe.type===i.NodeFilterPropertyDataType.Number?De=this._tableCellEditorFactory.getTextEditorClass(this,"number"):Oe.type===i.NodeFilterPropertyDataType.Date&&(De=this._tableCellEditorFactory.getTextEditorClass(this,"date")):Oe.type===i.NodeFilterPropertyDataType.String?De=this._tableCellEditorFactory.getTextEditorClass(this,"text"):Oe.type===i.NodeFilterPropertyDataType.Date?De=this._tableCellEditorFactory.getTextEditorClass(this,"date"):Oe.type===i.NodeFilterPropertyDataType.Boolean?De=this._tableCellEditorFactory.getDropdownEditorClass(this,[Z,se],!1):Oe.type===i.NodeFilterPropertyDataType.Number?De=this._tableCellEditorFactory.getTextEditorClass(this,"number"):Oe.type===i.NodeFilterPropertyDataType.Choice&&(De=this._tableCellEditorFactory.getDropdownEditorClass(this,this.getDropdownOptionsForChoiceProperty(Oe),!1)),{columns:{value:{editor:De}}}},this.filterTable=new s.Table(we,this._accessibilityService,this._quickInputService,_.defaultTableStyles,{dataProvider:Pe,columns:ye},{editable:!0,autoEdit:!0,dataItemColumnValueExtractor:(Ae,Me)=>{if(Me.field)return Ae[Me.field]?.value},rowHeight:l.TableRowHeight,headerRowHeight:l.TableHeaderRowHeight,editorLock:new Slick.EditorLock,autoHeight:!0}),this.filterTable.grid.onActiveCellChanged.subscribe((Ae,Me)=>{if(this.filterTable.grid.getActiveCell()){const Oe=this.filterTable.grid.getActiveCell().row;let Ce=this.filterTable.getData().getItems()[Oe].filterPropertyIndex;const _e=this._properties[Ce].description;this._description.innerText=_e,(0,E.status)(_e)}}),this.filterTable.registerPlugin(Re),this.filterTable.layout(new a.Dimension(600,(Le.length+2)*l.TableRowHeight)),this._description=a.append(ge,a.$(".filter-dialog-description")),this._description.innerText=this._properties[0].description}layout(de){}onClose(){this.hide("close"),this._onCloseEvent.fire()}onClearAll(){this.filterTable.getData().getItems().forEach(ge=>{ge.value.value=""}),this.filterTable.rerenderGrid()}async onApply(){const de=this.filterTable.getData().getItems();this._appliedFilters=[];for(let be=0;be<de.length;be++){const ve=de[be];let Ie=this._properties[ve.filterPropertyIndex],Se={name:ve.property.id,operator:this.getFilterOperatorEnum(ve.operator.value),value:this.getFilterValue(Ie.type,ve.value.value,Ie)};if(Se.operator===i.NodeFilterOperator.Between||Se.operator===i.NodeFilterOperator.NotBetween){be++;const ye=de[be];var ge=this.getFilterValue(Ie.type,ve.value.value,Ie),he=this.getFilterValue(Ie.type,ye.value.value,Ie);if(Se.value=[ge,he],Ie.type===i.NodeFilterPropertyDataType.Date){if(Se.value[0]===""&&Se.value[1]!==""){this._errorMessageService.showDialog(w.default.Error,"",(0,S.localize)(25,null));return}else if(Se.value[0]!==""&&Se.value[1]===""){this._errorMessageService.showDialog(w.default.Error,"",(0,S.localize)(26,null));return}else if(new Date(Se.value[0])>new Date(Se.value[1])){this._errorMessageService.showDialog(w.default.Error,"",(0,S.localize)(27,null));return}}else if(Ie.type===i.NodeFilterPropertyDataType.Number){if(Se.value[0]===""&&Se.value[1]!==""){this._errorMessageService.showDialog(w.default.Error,"",(0,S.localize)(28,null));return}else if(Se.value[0]!==""&&Se.value[1]===""){this._errorMessageService.showDialog(w.default.Error,"",(0,S.localize)(29,null));return}else if(Number(Se.value[0])>Number(Se.value[1])){this._errorMessageService.showDialog(w.default.Error,"",(0,S.localize)(30,null));return}}ge!==""&&he!==""&&this._appliedFilters.push(Se)}else Se.value!==""&&this._appliedFilters.push(Se)}this.spinner=!0;try{this.applyFilterAction&&await this.applyFilterAction(this._appliedFilters),this._onFilterApplied.fire(this._appliedFilters),this.hide("ok")}catch(be){throw this.spinner=!1,be}}async onAccept(){}getFilterValue(de,ge,he){if(ge==="")return"";switch(de){case i.NodeFilterPropertyDataType.Boolean:if(ge===Z)return!0;if(ge===se)return!1;case i.NodeFilterPropertyDataType.Number:return Number(ge);case i.NodeFilterPropertyDataType.Choice:const be=he.choices.find(ve=>ve.displayName===ge);return be?be.value:ge;case i.NodeFilterPropertyDataType.Date:case i.NodeFilterPropertyDataType.String:return ge}}getStringValueForFilter(de,ge){switch(de.type){case i.NodeFilterPropertyDataType.Boolean:if(ge===!0)return Z;if(ge===!1)return se;break;case i.NodeFilterPropertyDataType.Number:return ge.toString();case i.NodeFilterPropertyDataType.Choice:return de.choices.find(he=>he.value===ge).displayName;case i.NodeFilterPropertyDataType.Date:case i.NodeFilterPropertyDataType.String:return ge}return""}getOperatorsForType(de){switch(de){case i.NodeFilterPropertyDataType.String:return[K,H,N,P,U,G,$,ie];case i.NodeFilterPropertyDataType.Number:return[N,P,V,W,x,F,z,B];case i.NodeFilterPropertyDataType.Boolean:return[N,P];case i.NodeFilterPropertyDataType.Choice:return[N,P];case i.NodeFilterPropertyDataType.Date:return[N,P,V,W,x,F,z,B]}}getFilterOperatorString(de){switch(de){case i.NodeFilterOperator.Contains:return K;case i.NodeFilterOperator.NotContains:return H;case i.NodeFilterOperator.StartsWith:return U;case i.NodeFilterOperator.NotStartsWith:return G;case i.NodeFilterOperator.EndsWith:return $;case i.NodeFilterOperator.NotEndsWith:return ie;case i.NodeFilterOperator.Equals:return N;case i.NodeFilterOperator.NotEquals:return P;case i.NodeFilterOperator.GreaterThan:return V;case i.NodeFilterOperator.GreaterThanOrEquals:return W;case i.NodeFilterOperator.LessThan:return x;case i.NodeFilterOperator.LessThanOrEquals:return F;case i.NodeFilterOperator.Between:return z;case i.NodeFilterOperator.NotBetween:return B;default:return""}}getFilterOperatorEnum(de){switch(de){case K:return i.NodeFilterOperator.Contains;case H:return i.NodeFilterOperator.NotContains;case U:return i.NodeFilterOperator.StartsWith;case G:return i.NodeFilterOperator.NotStartsWith;case $:return i.NodeFilterOperator.EndsWith;case ie:return i.NodeFilterOperator.NotEndsWith;case N:return i.NodeFilterOperator.Equals;case P:return i.NodeFilterOperator.NotEquals;case V:return i.NodeFilterOperator.GreaterThan;case W:return i.NodeFilterOperator.GreaterThanOrEquals;case x:return i.NodeFilterOperator.LessThan;case F:return i.NodeFilterOperator.LessThanOrEquals;case z:return i.NodeFilterOperator.Between;case B:return i.NodeFilterOperator.NotBetween;case Z:return i.NodeFilterOperator.Equals;case se:return i.NodeFilterOperator.NotEquals;default:return}}getChoiceValuesForFilterProperties(de){switch(de.type){case i.NodeFilterPropertyDataType.Boolean:return["",Z,se];case i.NodeFilterPropertyDataType.Choice:return["",...this.getDropdownOptionsForChoiceProperty(de)];default:return[]}}getDropdownOptionsForChoiceProperty(de){return de.choices.map(ge=>ge.displayName??ge.value)}static async getFiltersForProperties(de,ge,he,be,ve,Ie){const Se=Ie.createInstance(A,de,ge,he,be,ve);return Se.open(),new Promise((we,ye)=>{Se.onFilterApplied(Re=>{we(Re)}),Se.onDialogClose(()=>{ye()})})}};e.FilterDialog=ae,e.FilterDialog=ae=A=fe([O(5,m.IThemeService),O(6,y.IAdsTelemetryService),O(7,f.ILayoutService),O(8,t.IClipboardService),O(9,v.ILogService),O(10,D.ITextResourcePropertiesService),O(11,T.IContextKeyService),O(12,r.IContextViewService),O(13,d.IAccessibilityService),O(14,p.IQuickInputService),O(15,C.IErrorMessageService)],ae)}),define(Q[376],Y([1,0,8,4,58,106,107,117,298,196,18]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.MssqlNodeContext=void 0;let a=class extends y.Disposable{static{h=this}static{this.canSelect=new Set([v.NodeType.HistoryTable,v.NodeType.Table,v.NodeType.View])}static{this.canEditData=new Set([v.NodeType.Table])}static{this.canCreateOrDelete=new Set([v.NodeType.AggregateFunction,v.NodeType.PartitionFunction,v.NodeType.ScalarValuedFunction,v.NodeType.Schema,v.NodeType.StoredProcedure,v.NodeType.Table,v.NodeType.TableValuedFunction,v.NodeType.User,v.NodeType.UserDefinedTableType,v.NodeType.View,v.NodeType.Trigger,v.NodeType.DatabaseTrigger,v.NodeType.Index,v.NodeType.User,v.NodeType.DatabaseRole,v.NodeType.ApplicationRole,v.NodeType.Key])}static{this.canExecute=new Set([v.NodeType.StoredProcedure,v.NodeType.Function])}static{this.canAlter=new Set([v.NodeType.AggregateFunction,v.NodeType.PartitionFunction,v.NodeType.ScalarValuedFunction,v.NodeType.StoredProcedure,v.NodeType.TableValuedFunction,v.NodeType.View,v.NodeType.Function])}static{this.NodeProvider=new t.RawContextKey("nodeProvider",void 0)}static{this.IsDatabaseOrServer=new t.RawContextKey("isDatabaseOrServer",!1)}static{this.IsWindows=new t.RawContextKey("isWindows",S.isWindows)}static{this.IsCloud=new t.RawContextKey("isCloud",!1)}static{this.NodeType=new t.RawContextKey("nodeType",void 0)}static{this.NodePath=new t.RawContextKey("nodePath",void 0)}static{this.ObjectType=new t.RawContextKey("objectType",void 0)}static{this.NodeLabel=new t.RawContextKey("nodeLabel",void 0)}static{this.EngineEdition=new t.RawContextKey("engineEdition",m.DatabaseEngineEdition.Unknown)}static{this.CanOpenInAzurePortal=new t.RawContextKey("canOpenInAzurePortal",!1)}static{this.CanScriptAsSelect=new t.RawContextKey("canScriptAsSelect",!1)}static{this.CanEditData=new t.RawContextKey("canEditData",!1)}static{this.CanScriptAsCreateOrDelete=new t.RawContextKey("canScriptAsCreateOeDelete",!1)}static{this.CanScriptAsExecute=new t.RawContextKey("canScriptAsExecute",!1)}static{this.CanScriptAsAlter=new t.RawContextKey("canScriptAsAlter",!1)}static{this.IsQueryProvider=new t.RawContextKey("isQueryProvider",!1)}constructor(i,s,o,u){if(super(),this.nodeContextValue=i,this.contextKeyService=s,this.connectionManagementService=o,this.capabilitiesService=u,this.bindContextKeys(),this.nodeContextValue.node){const d=this.nodeContextValue.node;d.payload&&(this.setNodeProvider(),this.setIsCloud(),this.setEngineEdition(),this.setCanOpenInPortal(),d.type?(this.setIsDatabaseOrServer(),this.nodeTypeKey.set(d.type)):d.contextValue&&d.providerHandle===f.mssqlProviderName&&(this.setIsDatabaseOrServer(),this.setScriptingContextKeys(),this.nodeTypeKey.set(d.contextValue)),d.nodeInfo?.nodePath&&this.nodePathKey.set(d.nodeInfo.nodePath),this.setQueryEnabledKey()),d.label&&this.nodeLabelKey.set(d.label.label),this.objectTypeKey.set(d.nodeInfo?.objectType)}}bindContextKeys(){this.isCloudKey=h.IsCloud.bindTo(this.contextKeyService),this.engineEditionKey=h.EngineEdition.bindTo(this.contextKeyService),this.nodeTypeKey=h.NodeType.bindTo(this.contextKeyService),this.nodePathKey=h.NodePath.bindTo(this.contextKeyService),this.objectTypeKey=h.ObjectType.bindTo(this.contextKeyService),this.nodeLabelKey=h.NodeLabel.bindTo(this.contextKeyService),this.isDatabaseOrServerKey=h.IsDatabaseOrServer.bindTo(this.contextKeyService),this.canScriptAsSelectKey=h.CanScriptAsSelect.bindTo(this.contextKeyService),this.canEditDataKey=h.CanEditData.bindTo(this.contextKeyService),this.canScriptAsCreateOrDeleteKey=h.CanScriptAsCreateOrDelete.bindTo(this.contextKeyService),this.canScriptAsExecuteKey=h.CanScriptAsExecute.bindTo(this.contextKeyService),this.canScriptAsAlterKey=h.CanScriptAsAlter.bindTo(this.contextKeyService),this.nodeProviderKey=h.NodeProvider.bindTo(this.contextKeyService),this.canOpenInAzurePortal=h.CanOpenInAzurePortal.bindTo(this.contextKeyService),this.isQueryProviderKey=h.IsQueryProvider.bindTo(this.contextKeyService)}setNodeProvider(){this?.nodeContextValue?.node?.payload?.providerName?this.nodeProviderKey.set(this.nodeContextValue.node.payload.providerName):this.nodeContextValue?.node?.childProvider&&this.nodeProviderKey.set(this.nodeContextValue.node.childProvider)}setIsCloud(){let i=this.getServerInfo();i&&i.isCloud&&this.isCloudKey.set(!0)}setCanOpenInPortal(){const i=this.nodeContextValue.node.payload;i&&i.azureResourceId&&i.azureTenantId&&i.azurePortalEndpoint&&this.canOpenInAzurePortal.set(!0)}setEngineEdition(){let i=this.getServerInfo();i&&i.engineEditionId&&this.engineEditionKey.set(i.engineEditionId)}getServerInfo(){const i=new D.ConnectionProfile(this.capabilitiesService,this.nodeContextValue.node.payload),s=this.connectionManagementService.findExistingConnection(i);if(s)return this.connectionManagementService.getServerInfo(s.id)}setIsDatabaseOrServer(){const i=this.nodeContextValue.node.contextValue===v.NodeType.Server||this.nodeContextValue.node.contextValue===v.NodeType.Database||this.nodeContextValue.node.type===v.NodeType.Server||this.nodeContextValue.node.type===v.NodeType.Database;this.isDatabaseOrServerKey.set(i)}setScriptingContextKeys(){const i=this.nodeContextValue.node.contextValue;i&&(h.canCreateOrDelete.has(i)&&this.canScriptAsCreateOrDeleteKey.set(!0),h.canEditData.has(i)&&this.canEditDataKey.set(!0),h.canAlter.has(i)&&this.canScriptAsAlterKey.set(!0),h.canExecute.has(i)&&this.canScriptAsExecuteKey.set(!0),h.canSelect.has(i)&&this.canScriptAsSelectKey.set(!0))}setQueryEnabledKey(){const i=this.nodeContextValue?.node?.payload?.providerName||this.nodeContextValue.node.childProvider,s=i?this.capabilitiesService.getCapabilities(i):void 0;this.isQueryProviderKey.set(s?.connection.isQueryProvider)}};e.MssqlNodeContext=a,e.MssqlNodeContext=a=h=fe([O(1,t.IContextKeyService),O(2,b.IConnectionManagementService),O(3,T.ICapabilitiesService)],a)}),define(Q[3575],Y([1,0,13,1984,376,453,28]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const f="azure.openInAzureCoreDE";t.MenuRegistry.appendMenuItem(t.MenuId.DataExplorerContext,{group:"z-azurecore",order:1,command:{id:f,title:(0,y.localize)(0,null)},when:b.MssqlNodeContext.CanOpenInAzurePortal}),T.CommandsRegistry.registerCommand({id:f,handler:async(m,S)=>{const h=m.get(T.ICommandService),a=S.$treeItem?.payload;a&&h.executeCommand("azure.resource.openInAzurePortal",a)}});const v="azure.openInAzureCoreOE";t.MenuRegistry.appendMenuItem(t.MenuId.ObjectExplorerItemContext,{group:"z-azurecore",order:1,command:{id:v,title:(0,y.localize)(1,null)},when:D.ConnectionContextKey.CanOpenInAzurePortal}),T.CommandsRegistry.registerCommand({id:v,handler:(m,S)=>m.get(T.ICommandService).executeCommand("azure.resource.openInAzurePortal",S.connectionProfile)})}),define(Q[925],Y([1,0,453,605,4,8,251,376,58,107]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.NodeContextKey=void 0;let h=class extends b.Disposable{static{S=this}static{this.IsConnectable=new D.RawContextKey("isConnectable",!1)}static{this.IsConnected=new D.RawContextKey("isConnected",!1)}static{this.ViewId=new D.RawContextKey("view",void 0)}static{this.ViewItem=new D.RawContextKey("viewItem",void 0)}static{this.Node=new D.RawContextKey("node",void 0)}constructor(r,i,s,o,u){super(),this.contextKeyService=r,this.oeService=i,this.connectionManagementService=o,this.capabilitiesService=u,this._connectableKey=S.IsConnectable.bindTo(r),this._connectedKey=S.IsConnected.bindTo(r),this._viewIdKey=S.ViewId.bindTo(r),this._viewItemKey=S.ViewItem.bindTo(r),this._nodeContextKey=S.Node.bindTo(r),this._connectionContextKey=new t.ConnectionContextKey(r,s)}set(r){r.node?.payload?(this._connectableKey.set(!0),this._connectedKey.set(this.oeService.isNodeConnected(r.viewId,r.node)),this._connectionContextKey.set(r.node.payload)):(this._connectableKey.set(!1),this._connectedKey.set(!1),this._connectionContextKey.reset()),r.node?.contextValue?this._viewItemKey.set(r.node.contextValue):this._viewItemKey.reset(),this._nodeContextKey.set(r),this._viewIdKey.set(r.viewId),this._nodeContextUtils=new f.MssqlNodeContext(this._nodeContextKey.get(),this.contextKeyService,this.connectionManagementService,this.capabilitiesService)}reset(){this._viewIdKey.reset(),this._viewItemKey.reset(),this._connectableKey.reset(),this._connectedKey.reset(),this._connectionContextKey.reset(),this._nodeContextKey.reset(),this._nodeContextUtils?.dispose()}get(){return this._nodeContextKey.get()}};e.NodeContextKey=h,e.NodeContextKey=h=S=fe([O(0,D.IContextKeyService),O(1,y.IOEShimService),O(2,T.IQueryManagementService),O(3,v.IConnectionManagementService),O(4,m.ICapabilitiesService)],h)}),define(Q[3576],Y([1,0,2045,117,13,3494,8,925,376,298]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),b.MenuRegistry.appendMenuItem(b.MenuId.DataExplorerContext,{group:"connection",order:4,command:{id:D.DISCONNECT_COMMAND_ID,title:(0,t.localize)(0,null)},when:T.ContextKeyExpr.and(f.NodeContextKey.IsConnected,T.ContextKeyNotEqualsExpr.create("nodeProvider",y.mssqlProviderName),T.ContextKeyNotEqualsExpr.create("nodeType",m.NodeType.Folder))}),b.MenuRegistry.appendMenuItem(b.MenuId.DataExplorerContext,{group:"connection",order:3,command:{id:D.DISCONNECT_COMMAND_ID,title:(0,t.localize)(1,null)},when:T.ContextKeyExpr.and(f.NodeContextKey.IsConnected,v.MssqlNodeContext.NodeProvider.isEqualTo(y.mssqlProviderName),v.MssqlNodeContext.IsDatabaseOrServer)}),b.MenuRegistry.appendMenuItem(b.MenuId.DataExplorerContext,{group:"connection",order:6,command:{id:D.REFRESH_COMMAND_ID,title:(0,t.localize)(2,null)},when:f.NodeContextKey.IsConnectable})}),define(Q[1289],Y([1,0,34,5,8,708,322,298,194,106,289,58,13,453,452,251,1287,88,351,107,11]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServerTreeActionProvider=void 0;let l=class{constructor(g,w,E,C,I,_,A){this._instantiationService=g,this._connectionManagementService=w,this._queryManagementService=E,this.menuService=C,this._contextKeyService=I,this._capabilitiesService=_,this._logService=A}getActions(g,w,E=!1){if(w instanceof m.ConnectionProfile)return g?this.getConnectionActions(g,w,E):[];if(w instanceof v.ConnectionProfileGroup)return this.getConnectionProfileGroupActions(w);if(w instanceof T.TreeNode){const C=w.getConnectionProfile();if(C)return g?this.getObjectExplorerNodeActions({tree:g,profile:C,treeNode:w},E):[]}return[]}getDefaultAction(g,w){if(g){const E=this.getActions(g,w).filter(C=>C instanceof a.MenuItemAction&&C.isDefault);if(E.length===1)return E[0];if(E.length>1){let C;w instanceof m.ConnectionProfile?C=w.serverName:w instanceof v.ConnectionProfileGroup?C=w.name:C=w.label,this._logService.error(`Multiple default actions defined for node: ${C}, actions: ${E.map(I=>I.id).join(", ")}`)}}}getRecentConnectionActions(g){return[this._instantiationService.createInstance(D.EditConnectionAction,D.EditConnectionAction.ID,D.EditConnectionAction.LABEL,g),this._instantiationService.createInstance(D.DeleteRecentConnectionsAction,D.DeleteRecentConnectionsAction.ID,D.DeleteRecentConnectionsAction.LABEL,g)]}getConnectionActions(g,w,E=!1){let C=new T.TreeNode(f.NodeType.Server,f.NodeType.Server,"",!1,"","","","",void 0,void 0,void 0,void 0);return this._connectionManagementService.addSavedPassword(w,!0),C.connection=w,this.getAllActions({tree:g,profile:w,treeNode:C},I=>this.getBuiltinConnectionActions(I),E)}getAllActions(g,w,E=!1){let C=this.getContextKeyService(g),I=this.menuService.createMenu(a.MenuId.ObjectExplorerItemContext,C);const _=w(g),A=[],k={arg:void 0,shouldForwardArgs:!0};let L=I.getActions(k),R=0;const M=L.findIndex(N=>N[0]==="0_query"?!0:(N[1].length&&(R+=N[1].length),!1));if(R=M>-1?R+L[M][1].length:void 0,E){L=L.filter(P=>P[0].includes("inline")),(0,u.fillInActions)(L,A,!1),A.unshift(..._);const N=A.findIndex(P=>P instanceof D.RefreshAction);N>-1&&A.push(A.splice(N,1)[0])}else L=L.filter(N=>!N[0].includes("inline")),(0,u.fillInActions)(L,A,!1),R?(!(A[R]instanceof t.Separator)&&_.length>0&&!E&&_.unshift(new t.Separator),A?.splice(R,0,..._)):(A.length>0&&_.length>0&&_.push(new t.Separator),A.unshift(..._));return I.dispose(),A}getBuiltinConnectionActions(g){let w=[];const E=this._connectionManagementService.isProfileConnected(g.profile);return E&&w.push(this._instantiationService.createInstance(D.DisconnectConnectionAction,D.DisconnectConnectionAction.ID,D.DisconnectConnectionAction.LABEL,g.profile)),w.push(this._instantiationService.createInstance(D.EditConnectionAction,D.EditConnectionAction.ID,D.EditConnectionAction.LABEL,g.profile)),w.push(this._instantiationService.createInstance(D.DeleteConnectionAction,D.DeleteConnectionAction.ID,D.DeleteConnectionAction.DELETE_CONNECTION_LABEL,g.profile)),E&&!this.isScriptableObject(g)&&w.push(this._instantiationService.createInstance(D.RefreshAction,D.RefreshAction.ID,D.RefreshAction.LABEL,g.tree,g.profile)),w}getContextKeyService(g){this.scopedContextService||(g.tree instanceof d.AsyncServerTree?this.scopedContextService=g.tree.contextKeyService:this.scopedContextService=this._contextKeyService.createScoped(g.tree.getHTMLElement()));let w=new r.ConnectionContextKey(this.scopedContextService,this._queryManagementService),E=g&&g.profile;w.set(E);let C=new o.ServerInfoContextKey(this.scopedContextService);if(E.id){let _=this._connectionManagementService.getServerInfo(E.id);_&&C.set(_)}let I=new i.TreeNodeContextKey(this.scopedContextService,this._capabilitiesService);return g.treeNode&&I.set(g.treeNode),this.scopedContextService}getConnectionProfileGroupActions(g){return[this._instantiationService.createInstance(D.AddServerAction1,D.AddServerAction1.ID,D.AddServerAction1.LABEL),this._instantiationService.createInstance(D.EditServerGroupAction,D.EditServerGroupAction.ID,D.EditServerGroupAction.LABEL,g),this._instantiationService.createInstance(D.DeleteConnectionAction,D.DeleteConnectionAction.ID,D.DeleteConnectionAction.DELETE_CONNECTION_GROUP_LABEL,g)]}getObjectExplorerNodeActions(g,w=!1){return this.getAllActions(g,E=>this.getBuiltInNodeActions(E),w)}getBuiltInNodeActions(g){let w=[],E=g.treeNode;return E&&S.TreeUpdateUtils.isDatabaseNode(E)&&!S.TreeUpdateUtils.isAvailableDatabaseNode(E)||this.isScriptableObject(g)||(E?.filterProperties?.length>0&&w.push(this._instantiationService.createInstance(D.FilterChildrenAction,D.FilterChildrenAction.ID,D.FilterChildrenAction.LABEL,g.treeNode)),E?.filters?.length>0&&w.push(this._instantiationService.createInstance(D.RemoveFilterAction,D.RemoveFilterAction.ID,D.RemoveFilterAction.LABEL,g.treeNode,g.tree,void 0)),w.push(this._instantiationService.createInstance(D.RefreshAction,D.RefreshAction.ID,D.RefreshAction.LABEL,g.tree,g.treeNode||g.profile))),w}isScriptableObject(g){return!!(g.treeNode&&f.NodeType.SCRIPTABLE_OBJECTS.find(w=>w===g?.treeNode?.nodeTypeId))}};e.ServerTreeActionProvider=l,e.ServerTreeActionProvider=l=fe([O(0,y.IInstantiationService),O(1,h.IConnectionManagementService),O(2,s.IQueryManagementService),O(3,a.IMenuService),O(4,b.IContextKeyService),O(5,p.ICapabilitiesService),O(6,c.ILogService)],l)}),define(Q[3577],Y([1,0,5,63,2245,3488,262,686,183,188,196]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FirewallRuleDialogController=void 0;let h=class{constructor(r,i,s,o){this._instantiationService=r,this._resourceProviderService=i,this._accountManagementService=s,this._errorMessageService=o,this._addAccountErrorTitle=(0,b.localize)(0,null),this._firewallRuleErrorTitle=(0,b.localize)(1,null)}openFirewallRuleDialog(r,i,s){return this._firewallRuleDialog||(this._firewallRuleDialog=this._instantiationService.createInstance(D.FirewallRuleDialog),this._firewallRuleDialog.onCancel(this.handleOnCancel,this),this._firewallRuleDialog.onCreateFirewallRule(this.handleOnCreateFirewallRule,this),this._firewallRuleDialog.onAddAccountErrorEvent(this.handleOnAddAccountError,this),this._firewallRuleDialog.render()),this._connection=r,this._resourceProviderId=s,this._firewallRuleDialog.viewModel.updateDefaultValues(i),this._firewallRuleDialog.setInitialAccountTenant(r.azureAccount,r.azureTenantId),this._firewallRuleDialog.open(),this._deferredPromise=new v.Deferred,this._deferredPromise.promise}handleOnAddAccountError(r){this._errorMessageService.showDialog(y.default.Error,this._addAccountErrorTitle,r)}async handleOnCreateFirewallRule(){const r=this._resourceProviderId;try{const i=this._firewallRuleDialog.viewModel.selectedTenantId,s=await this._accountManagementService.getAccountSecurityToken(this._firewallRuleDialog.viewModel.selectedAccount,i,S.AzureResource.ResourceManagement),o={[i]:s},u={firewallRuleName:this._firewallRuleDialog.viewModel.firewallRuleName,startIpAddress:this._firewallRuleDialog.viewModel.isIPAddressSelected?this._firewallRuleDialog.viewModel.defaultIPAddress:this._firewallRuleDialog.viewModel.fromSubnetIPRange,endIpAddress:this._firewallRuleDialog.viewModel.isIPAddressSelected?this._firewallRuleDialog.viewModel.defaultIPAddress:this._firewallRuleDialog.viewModel.toSubnetIPRange,serverName:this._connection.serverName,securityTokenMappings:o},d=await this._resourceProviderService.createFirewallRule(this._firewallRuleDialog.viewModel.selectedAccount,u,r);d.result?(this._firewallRuleDialog.close(),this._deferredPromise.resolve(!0)):this._errorMessageService.showDialog(y.default.Error,this._firewallRuleErrorTitle,d.errorMessage),this._firewallRuleDialog.onServiceComplete()}catch(i){this.showError(i)}}showError(r){this._errorMessageService.showDialog(y.default.Error,this._firewallRuleErrorTitle,r),this._firewallRuleDialog.onServiceComplete()}handleOnCancel(){this._deferredPromise.resolve(!1)}};e.FirewallRuleDialogController=h,e.FirewallRuleDialogController=h=fe([O(0,t.IInstantiationService),O(1,f.IResourceProviderService),O(2,T.IAccountManagementService),O(3,m.IErrorMessageService)],h)}),define(Q[3578],Y([1,0,5,3577,363,76]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceProviderService=void 0;let T=class{constructor(v,m){this._telemetryService=v,this._instantiationService=m,this._providers=Object.create(null)}showFirewallRuleDialog(v,m,S){let h=this;return h._firewallRuleDialogController||(h._firewallRuleDialogController=h._instantiationService.createInstance(y.FirewallRuleDialogController)),h._firewallRuleDialogController.openFirewallRuleDialog(v,m,S)}createFirewallRule(v,m,S){return new Promise((h,a)=>{const r=this._providers[S];r?(this._telemetryService.createActionEvent("Shell","FirewallRuleCreated").withAdditionalProperties({provider:S}).send(),r.createFirewallRule(v,m).then(i=>{h(i)},i=>{a(i)})):a((0,b.invalidProvider)())})}async handleFirewallRule(v,m,S){let h={canHandleFirewallRule:!1,ipAddress:void 0,resourceProviderId:void 0};const a=[];if(this._providers)for(const r in this._providers){const i=this._providers[r];a.push(i.handleFirewallRule(v,m,S).then(s=>{s.result&&(h={canHandleFirewallRule:s.result,ipAddress:s.ipAddress,resourceProviderId:r})},()=>{}))}return await Promise.all(a),h}registerProvider(v,m){this._providers[v]=m}unregisterProvider(v){delete this._providers[v]}};e.ResourceProviderService=T,e.ResourceProviderService=T=fe([O(0,D.IAdsTelemetryService),O(1,t.IInstantiationService)],T)}),define(Q[3579],Y([1,0,350,17,6,196,20]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RestoreViewModel=void 0;class f{constructor(m){this._onSetLastBackupTaken=new b.Emitter,this.onSetLastBackupTaken=this._onSetLastBackupTaken.event,this._onSetfilePath=new b.Emitter,this.onSetfilePath=this._onSetfilePath.event,this._onSetSourceDatabaseNames=new b.Emitter,this.onSetSourceDatabaseNames=this._onSetSourceDatabaseNames.event,this._onSetTargetDatabaseName=new b.Emitter,this.onSetTargetDatabaseName=this._onSetTargetDatabaseName.event,this._onSetRestoreOption=new b.Emitter,this.onSetRestoreOption=this._onSetRestoreOption.event,this._onUpdateBackupSetsToRestore=new b.Emitter,this.onUpdateBackupSetsToRestore=this._onUpdateBackupSetsToRestore.event,this._onUpdateRestoreDatabaseFiles=new b.Emitter,this.onUpdateRestoreDatabaseFiles=this._onUpdateRestoreDatabaseFiles.event,this._optionsMap={},m.forEach(S=>{let h=this.getDisplayValue(S,S.defaultValue);this._optionsMap[S.name]={optionMetadata:S,defaultValue:h,currentValue:h}})}getDisplayValue(m,S){let h;switch(m.valueType){case D.ServiceOptionType.boolean:h=t.getBooleanValueFromStringOrBoolean(S);break;case D.ServiceOptionType.category:let a=S;!a&&m.categoryValues[0]&&(a=m.categoryValues[0].name),h=t.getCategoryDisplayName(m.categoryValues,a);break;case D.ServiceOptionType.string:h=S||""}return h}onRestoreFromChanged(m){this.readHeaderFromMedia=m,m?(this.updateFilePath(""),this.updateSourceDatabaseNames([],void 0)):this.updateSourceDatabaseNames(this.databaseList,this.databaseList[0])}getOptionMetadata(m){return this._optionsMap[m]?this._optionsMap[m].optionMetadata:void 0}setOptionValue(m,S){this._optionsMap[m]&&(this._optionsMap[m].currentValue=S)}getOptionValue(m){if(this._optionsMap[m])return this._optionsMap[m].currentValue}getRestoreAdvancedOptions(m){for(let S in this._optionsMap){let h=this._optionsMap[S];switch(h.optionMetadata.valueType){case D.ServiceOptionType.boolean:h.currentValue!==h.defaultValue&&(m[S]=h.currentValue);break;case D.ServiceOptionType.category:h.currentValue!==h.defaultValue&&(m[S]=t.getCategoryName(h.optionMetadata.categoryValues,h.currentValue));break;case D.ServiceOptionType.string:h.currentValue&&h.currentValue!==h.defaultValue&&(m[S]=h.currentValue)}}}onRestorePlanResponse(m){m.planDetails&&m.planDetails.lastBackupTaken&&this.updateLastBackupTaken(m.planDetails.lastBackupTaken.currentValue),m.planDetails&&m.planDetails.targetDatabaseName&&this.updateTargetDatabaseName(m.planDetails.targetDatabaseName.currentValue),this._onUpdateRestoreDatabaseFiles.fire(m.dbFiles),this.updateSourceDatabaseNames(m.databaseNamesFromBackupSets,m.planDetails.sourceDatabaseName.currentValue),this.updateOptionWithPlanDetail(m.planDetails),this.updateBackupSetsToRestore(m.backupSetsToRestore)}updateOptionWithPlanDetail(m){if(m)for(let S in m){let h=this._optionsMap[S];if(h){let a=m[S];h.defaultValue=this.getDisplayValue(h.optionMetadata,a.defaultValue),h.currentValue=this.getDisplayValue(h.optionMetadata,a.currentValue),this._onSetRestoreOption.fire({optionName:S,value:this._optionsMap[S].currentValue,isReadOnly:a.isReadOnly})}}}updateOptionWithConfigInfo(m){if(m){if(m.sourceDatabaseNamesWithBackupSets){let S=m.sourceDatabaseNamesWithBackupSets;y.isStringArray(S)&&(this.databaseList=S,this.databaseList.unshift(""),this.readHeaderFromMedia=!1,this.updateSourceDatabaseNames(this.databaseList,this.sourceDatabaseName))}m.defaultBackupFolder&&(this.defaultBackupFolder=m.defaultBackupFolder);for(let S in m){let h=this._optionsMap[S];if(h){let a=m[S];h.defaultValue=this.getDisplayValue(h.optionMetadata,a),h.currentValue=h.defaultValue,this._onSetRestoreOption.fire({optionName:S,value:this._optionsMap[S].currentValue,isReadOnly:!0})}}}}updateBackupSetsToRestore(m){this.selectedBackupSets=void 0,m&&(this.selectedBackupSets=(0,T.coalesce)(m.map(S=>S.isSelected?S.id:void 0)),this._onUpdateBackupSetsToRestore.fire(m))}resetRestoreOptions(m,S=[]){this.sourceDatabaseName=m||"",this.updateTargetDatabaseName(m),this.databaseList=S,this.updateSourceDatabaseNames(this.databaseList,this.sourceDatabaseName),this.updateFilePath(""),this.updateLastBackupTaken(""),this.selectedBackupSets=void 0;for(let h in this._optionsMap)this._optionsMap[h].defaultValue=this.getDisplayValue(this._optionsMap[h].optionMetadata,this._optionsMap[h].optionMetadata.defaultValue),this._optionsMap[h].currentValue=this._optionsMap[h].defaultValue,this._onSetRestoreOption.fire({optionName:h,value:this._optionsMap[h].defaultValue,isReadOnly:!1})}updateLastBackupTaken(m){this.lastBackupTaken=m,this._onSetLastBackupTaken.fire(m)}updateFilePath(m){this.filePath=m,this._onSetfilePath.fire(m)}updateSourceDatabaseNames(m,S){this.sourceDatabaseName=S,this._onSetSourceDatabaseNames.fire({databaseNames:m,selectedDatabase:S})}updateTargetDatabaseName(m){this.targetDatabaseName=m,this._onSetTargetDatabaseName.fire(m)}}e.RestoreViewModel=f}),define(Q[3580],Y([1,0,6,29,19,2246,8,42,33,7,198,343,166,199,399,1105,187,256,350,174,3579,1020,496,196,263,685,11,76,147,1099,111,448,684,1095,78,66,43,170,54,101,156,1670]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P,x,F,V,W,z){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RestoreDialog=void 0;const B={BACKURL:(0,D.localize)(0,null),BACKFILEPATH:(0,D.localize)(1,null),TARGETDATABASE:(0,D.localize)(2,null)};let K=class extends p.Modal{constructor(U,G,$,ie,J,j,ee,X,te,Z,se,re,oe,le){super((0,D.localize)(8,null),"Restore",J,G,te,$,Z,se,j,{hasErrors:!0,width:"wide",hasSpinner:!0}),this._contextViewService=ie,this.fileBrowserDialogService=ee,this.backupRestoreUrlBrowserDialogService=X,this._accessibilityService=re,this._quickInputService=oe,this._componentContextService=le,this._optionsMap={},this._restoreLabel=(0,D.localize)(3,null),this._restoreTitle=(0,D.localize)(4,null),this._databaseTitle=(0,D.localize)(5,null),this._backupFileTitle=(0,D.localize)(6,null),this._urlTitle=(0,D.localize)(7,null),this._relocateDatabaseFilesOption="relocateDbFiles",this._relocatedDataFileFolderOption="dataFileFolder",this._relocatedLogFileFolderOption="logFileFolder",this._withReplaceDatabaseOption="replaceDatabase",this._withKeepReplicationOption="keepReplication",this._withRestrictedUserOption="setRestrictedUser",this._recoveryStateOption="recoveryState",this._standbyFileOption="standbyFile",this._takeTaillogBackupOption="backupTailLog",this._tailLogWithNoRecoveryOption="tailLogWithNoRecovery",this._tailLogBackupFileOption="tailLogBackupFile",this._closeExistingConnectionsOption="closeExistingConnections",this._isRenderedRestorePlanTable=!1,this._onRestore=new t.Emitter,this.onRestore=this._onRestore.event,this._onValidate=new t.Emitter,this.onValidate=this._onValidate.event,this._onCancel=new t.Emitter,this.onCancel=this._onCancel.event,this._onCloseEvent=new t.Emitter,this.onCloseEvent=this._onCloseEvent.event,this._onDatabaseListFocused=new t.Emitter,this.onDatabaseListFocused=this._onDatabaseListFocused.event,this.viewModel=new c.RestoreViewModel(U),this.viewModel.onSetLastBackupTaken(ne=>this.updateLastBackupTaken(ne)),this.viewModel.onSetfilePath(ne=>this.updateFilePath(ne)),this.viewModel.onSetSourceDatabaseNames(ne=>this.updateSourceDatabaseName(ne)),this.viewModel.onSetTargetDatabaseName(ne=>this.updateTargetDatabaseName(ne)),this.viewModel.onSetLastBackupTaken(ne=>this.updateLastBackupTaken(ne)),this.viewModel.onSetRestoreOption(ne=>this.updateRestoreOption(ne)),this.viewModel.onUpdateBackupSetsToRestore(ne=>this.updateBackupSetsToRestore(ne)),this.viewModel.onUpdateRestoreDatabaseFiles(ne=>this.updateRestoreDatabaseFiles(ne))}render(){super.render(),(0,_.attachModalDialogStyler)(this,this._themeService);let U=(0,D.localize)(9,null);this._scriptButton=this.addFooterButton((0,D.localize)(10,null),()=>this.restore(!0),"right",!0),this._restoreButton=this.addFooterButton(this._restoreLabel,()=>this.restore(!1)),this._closeButton=this.addFooterButton(U,()=>this.cancel(),"right",!0),this.registerListeners(),this._destinationRestoreToInputBox.disable()}renderBody(U){const G=m.$(".restore-from");this.createLabelElement(G,(0,D.localize)(11,null),!0),this._restoreFromSelectBox=this.createSelectBoxHelper(G,(0,D.localize)(12,null),[this._databaseTitle,this._backupFileTitle,this._urlTitle],this._databaseTitle),this._restoreFromUrlElement=m.$(".backup-url"),m.hide(this._restoreFromUrlElement);const $=(0,D.localize)(13,null),ie={validationOptions:{validation:De=>De?null:{type:3,content:$}},placeholder:(0,D.localize)(14,null),ariaLabel:B.BACKURL,inputBoxStyles:V.defaultInputBoxStyles},J=m.append(this._restoreFromUrlElement,m.$(".dialog-input-section"));m.append(J,m.$(".dialog-label")).innerText=B.BACKURL,this._urlInputBox=this._register(new a.InputBox(m.append(J,m.$(".dialog-input")),this._contextViewService,ie));const j=m.append(this._restoreFromUrlElement,m.$(".dialog-input-section"));m.append(j,m.$(".dialog-label")).innerText="";let ee=(0,D.localize)(15,null);this._browseUrlButton=this._register(new S.Button(m.append(j,m.$(".file-browser")),{secondary:!0,...V.defaultButtonStyles})),this._browseUrlButton.label=ee,this._browseUrlButton.setWidth("50px"),this._restoreFromBackupFileElement=m.$(".backup-file-path"),m.hide(this._restoreFromBackupFileElement);const X=(0,D.localize)(16,null),te={validationOptions:{validation:De=>De?null:{type:3,content:X}},placeholder:(0,D.localize)(17,null),ariaLabel:B.BACKFILEPATH,inputBoxStyles:V.defaultInputBoxStyles},Z=m.append(this._restoreFromBackupFileElement,m.$(".dialog-input-section"));m.append(Z,m.$(".dialog-label")).innerText=B.BACKFILEPATH,this._filePathInputBox=this._register(new a.InputBox(m.append(Z,m.$(".dialog-input")),this._contextViewService,te)),this._browseFileButton=this._register(new S.Button(m.append(Z,m.$(".file-browser")),{secondary:!0,...V.defaultButtonStyles})),this._browseFileButton.label="...",this._sourceDatabasesElement=m.$(".source-database-list"),this._sourceDatabaseSelectBox=this.createSelectBoxHelper(this._sourceDatabasesElement,(0,D.localize)(18,null),[],"");const se=m.$(".source-section.new-section");se.append(G),se.append(this._restoreFromUrlElement),se.append(this._restoreFromBackupFileElement),se.append(this._sourceDatabasesElement);const re=m.$(".destination-section.new-section");this.createLabelElement(re,(0,D.localize)(19,null),!0),this._targetDatabaseElement=m.append(re,m.$(".dialog-input-section")),m.append(this._targetDatabaseElement,m.$(".dialog-label")).innerText=B.TARGETDATABASE;const oe=m.append(this._targetDatabaseElement,m.$(".dialog-input"));oe.style.width="100%",this._databaseDropdown=this._register(new L.Dropdown(oe,this._contextViewService,{strictSelection:!1,ariaLabel:B.TARGETDATABASE,...W.defaultEditableDropdownStyles})),this._register(this._databaseDropdown.onValueChange(De=>{this.databaseSelected(De)})),this._register(this._databaseDropdown.onBlur(()=>{this.databaseSelected(this._databaseDropdown.value)})),this._register(this._databaseDropdown.onFocus(()=>{this._onDatabaseListFocused.fire()})),this._databaseDropdown.value=this.viewModel.targetDatabaseName,this._targetDatabaseInputElement=m.append(re,m.$(".dialog-input-section")),m.append(this._targetDatabaseInputElement,m.$(".dialog-label")).innerText=B.TARGETDATABASE,m.hide(this._targetDatabaseInputElement);const le=m.append(this._targetDatabaseInputElement,m.$(".dialog-input"));le.style.width="100%",this._targetDatabaseInputBox=this._register(new a.InputBox(le,this._contextViewService,{ariaLabel:B.TARGETDATABASE,placeholder:(0,D.localize)(20,null),validationOptions:{validation:De=>this.viewModel.databases?.includes(De)?{type:3,content:(0,D.localize)(21,null)}:null},inputBoxStyles:V.defaultInputBoxStyles}));const ne=(0,D.localize)(22,null),ce={ariaLabel:ne,inputBoxStyles:V.defaultInputBoxStyles};this._destinationRestoreToContainer=m.append(re,m.$(".dialog-input-section")),m.append(this._destinationRestoreToContainer,m.$(".dialog-label")).innerText=ne,this._destinationRestoreToInputBox=this._register(new a.InputBox(m.append(this._destinationRestoreToContainer,m.$(".dialog-input")),this._contextViewService,(0,f.mixin)(ce,null)));const ae=m.$(".restore-plan-section.new-section");this.createLabelElement(ae,(0,D.localize)(23,null),!0),this.createLabelElement(ae,(0,D.localize)(24,null)),this._restorePlanTableContainer=m.append(ae,m.$(".dialog-input-section.restore-list")),m.hide(this._restorePlanTableContainer),this._restorePlanData=new u.TableDataView,this._restorePlanTable=this._register(new o.Table(this._restorePlanTableContainer,this._accessibilityService,this._quickInputService,W.defaultTableStyles,{dataProvider:this._restorePlanData,columns:this._restorePlanColumn},{enableColumnReorder:!1})),this._restorePlanTable.setTableTitle((0,D.localize)(25,null)),this._restorePlanTable.setSelectionModel(new i.RowSelectionModel({selectActiveRow:!1})),this._restorePlanTable.onSelectedRowsChanged((De,Ce)=>this.backupFileCheckboxChanged(De,Ce)),this._register(this._componentContextService.registerTable(this._restorePlanTable));const ue=m.$(".restore-dialog");ue.append(se),ue.append(re),ue.append(ae);const de=m.$(".restore-dialog"),ge=m.append(de,m.$(".new-section"));this.createLabelElement(ge,(0,D.localize)(26,null),!0),this.createOptionControl(ge,this._relocateDatabaseFilesOption);const he=m.append(ge,m.$(".sub-section"));this.createOptionControl(he,this._relocatedDataFileFolderOption),this.createOptionControl(he,this._relocatedLogFileFolderOption);const be=m.append(de,m.$(".new-section"));this.createLabelElement(be,(0,D.localize)(27,null),!0),this._fileListTableContainer=m.append(be,m.$(".dialog-input-section.restore-list")),m.hide(this._fileListTableContainer);const ve=(0,D.localize)(28,null),Ie=(0,D.localize)(29,null),Se=(0,D.localize)(30,null),we=(0,D.localize)(31,null),ye=[{id:"logicalFileName",name:ve,field:"logicalFileName"},{id:"fileType",name:Ie,field:"fileType"},{id:"originalFileName",name:Se,field:"originalFileName"},{id:"restoreAs",name:we,field:"restoreAs"}];this._fileListData=new u.TableDataView,this._fileListTable=this._register(new o.Table(this._fileListTableContainer,this._accessibilityService,this._quickInputService,W.defaultTableStyles,{dataProvider:this._fileListData,columns:ye},{enableColumnReorder:!1})),this._fileListTable.setSelectionModel(new i.RowSelectionModel),this._register(this._componentContextService.registerTable(this._fileListTable));const Re=m.$(".restore-dialog"),Le=m.append(Re,m.$(".new-section"));this.createLabelElement(Le,(0,D.localize)(32,null),!0),this.createOptionControl(Le,this._withReplaceDatabaseOption),this.createOptionControl(Le,this._withKeepReplicationOption),this.createOptionControl(Le,this._withRestrictedUserOption),this.createOptionControl(Le,this._recoveryStateOption),this.createOptionControl(m.append(Le,m.$(".sub-section")),this._standbyFileOption);const Pe=m.append(Re,m.$(".new-section"));this.createLabelElement(Pe,(0,D.localize)(33,null),!0),this.createOptionControl(Pe,this._takeTaillogBackupOption);const Ae=m.append(Pe,m.$(".sub-section"));this.createOptionControl(Ae,this._tailLogWithNoRecoveryOption),this.createOptionControl(Ae,this._tailLogBackupFileOption);const Me=m.append(Re,m.$(".new-section"));this.createLabelElement(Me,(0,D.localize)(34,null),!0),this.createOptionControl(Me,this._closeExistingConnectionsOption);const Oe=m.$(".restore-panel");U.appendChild(Oe),this._panel=this._register(new n.TabbedPanel(Oe)),(0,_.attachTabbedPanelStyler)(this._panel,this._themeService),this._generalTab={identifier:"general",title:(0,D.localize)(35,null),view:{render:De=>{m.append(De,ue)},layout:()=>{}}},this._panel.pushTab(this._generalTab),this._fileTab={identifier:"fileContent",title:(0,D.localize)(36,null),view:{layout:()=>{},render:De=>{De.appendChild(de)}}},this._panel.pushTab(this._fileTab),this._optionsTab={identifier:"options",title:(0,D.localize)(37,null),view:{layout:()=>{},render:De=>{De.appendChild(Re)}}},this._panel.pushTab(this._optionsTab),this._register(this._panel.onTabChange(De=>{De===this._fileTab.identifier&&this._fileListTable&&(this._fileListTable.resizeCanvas(),this._fileListTable.autosizeColumns()),De!==this._generalTab.identifier&&this._restoreFromSelectBox.hideMessage()})),this._restorePlanTable.grid.onKeyDown.subscribe(De=>{const Ce=(0,z.convertJQueryKeyDownEvent)(De);Ce.equals(1026)?(this._destinationRestoreToInputBox.isEnabled()?this._destinationRestoreToInputBox.focus():this._databaseDropdown.focus(),De.stopImmediatePropagation()):Ce.equals(2)&&(this.focusOnFirstEnabledFooterButton(),De.stopImmediatePropagation())}),this._fileListTable.grid.onKeyDown.subscribe(De=>{const Ce=(0,z.convertJQueryKeyDownEvent)(De);Ce.equals(1026)?(this._optionsMap[this._relocatedLogFileFolderOption].isEnabled()?this._optionsMap[this._relocatedLogFileFolderOption].focus():this._optionsMap[this._relocatedDataFileFolderOption].isEnabled()?this._optionsMap[this._relocatedDataFileFolderOption].focus():this._optionsMap[this._relocateDatabaseFilesOption].focus(),De.stopImmediatePropagation()):Ce.equals(2)&&(this.focusOnFirstEnabledFooterButton(),De.stopImmediatePropagation())})}focusOnFirstEnabledFooterButton(){this._scriptButton.enabled?this._scriptButton.focus():this._restoreButton.enabled?this._restoreButton.focus():this._closeButton.focus()}databaseSelected(U){this.viewModel.targetDatabaseName!==U&&(this.viewModel.targetDatabaseName=U,this.validateRestore(!1))}set databaseListOptions(U){this._databaseDropdown.values=U,this.viewModel.databases=U}createLabelElement(U,G,$){let ie="dialog-label";$&&(ie+=" header"),m.append(U,m.$(`.${ie}`)).innerText=G}createOptionControl(U,G){const $=this.viewModel.getOptionMetadata(G);let ie;switch($.valueType){case g.ServiceOptionType.boolean:ie=this.createCheckBoxHelper(U,$.description,d.getBooleanValueFromStringOrBoolean($.defaultValue),()=>this.onBooleanOptionChecked(G));break;case g.ServiceOptionType.category:ie=this.createSelectBoxHelper(U,$.description,$.categoryValues.map(J=>J.displayName),d.getCategoryDisplayName($.categoryValues,$.defaultValue)),this._register(ie.onDidSelect(J=>{this.onCatagoryOptionChanged(G)}));break;case g.ServiceOptionType.string:ie=this.createInputBoxHelper(U,$.description,{inputBoxStyles:V.defaultInputBoxStyles}),this._register(ie.onLoseFocus(J=>{this.onStringOptionChanged(G,J)}))}this._optionsMap[G]=ie}onBooleanOptionChecked(U){this.viewModel.setOptionValue(U,this._optionsMap[U].checked),this.validateRestore(!1)}onCatagoryOptionChanged(U){this.viewModel.setOptionValue(U,this._optionsMap[U].value),this.validateRestore(!1)}onStringOptionChanged(U,G){G.hasChanged&&G.value&&(this.viewModel.setOptionValue(U,G.value),this.validateRestore(!1))}createCheckBoxHelper(U,G,$,ie){return this._register(new h.Checkbox(m.append(U,m.$(".dialog-input-section")),{...W.defaultCheckboxStyles,label:G,checked:$,onChange:ie,ariaLabel:G}))}createSelectBoxHelper(U,G,$,ie){const J=m.append(U,m.$(".dialog-input-section"));m.append(J,m.$(".dialog-label")).innerText=G;const j=m.append(J,m.$(".dialog-input")),ee=this._register(new r.SelectBox($,ie,W.defaultSelectBoxStyles,this._contextViewService,j,{ariaLabel:G}));return ee.render(j),ee}createInputBoxHelper(U,G,$){const ie={ariaLabel:G},J=m.append(U,m.$(".dialog-input-section"));return m.append(J,m.$(".dialog-label")).innerText=G,this._register(new a.InputBox(m.append(J,m.$(".dialog-input")),this._contextViewService,(0,f.mixin)(ie,$)))}clearRestorePlanDataTable(){this._restorePlanData.getLength()>0&&(this._restorePlanData.clear(),m.hide(this._restorePlanTableContainer))}clearFileListTable(){this._fileListData.getLength()>0&&(this._fileListData.clear(),m.hide(this._fileListTableContainer))}resetRestoreContent(){this.clearRestorePlanDataTable(),this.clearFileListTable(),this._restoreButton.enabled=!1,this._scriptButton.enabled=!1}onValidateResponseFail(U){this.resetRestoreContent(),this.isRestoreFromDatabaseSelected?this._sourceDatabaseSelectBox.showMessage({type:3,content:U}):(this._sourceDatabaseSelectBox.setOptions([]),this._filePathInputBox.showMessage({type:3,content:U}))}removeErrorMessage(){this._filePathInputBox.hideMessage(),this._sourceDatabaseSelectBox.hideMessage(),this._destinationRestoreToInputBox.hideMessage()}enableRestoreButton(U){this.spinner=!1,this._engineEdition===g.DatabaseEngineEdition.SqlManagedInstance&&this.viewModel.databases.includes(this._targetDatabaseInputBox.value)?(this._restoreButton.enabled=!1,this._scriptButton.enabled=!1):(this._restoreButton.enabled=U,this._scriptButton.enabled=U)}showError(U){this.setError(U)}backupFileCheckboxChanged(U,G){let $=[],ie=[];G.grid.getSelectedRows().forEach(j=>{$.push(G.grid.getDataItem(j).Id),ie.push(G.grid.getDataItem(j).Database)}),ie.length!==0?this._targetDatabaseInputBox.value===""&&(this._targetDatabaseInputBox.value=ie[0]):this._targetDatabaseInputBox.value="";let J=!1;this.viewModel.selectedBackupSets&&this.viewModel.selectedBackupSets.length===$.length&&(J=this.viewModel.selectedBackupSets.some(j=>$.some(ee=>ee===j))),J||(this.viewModel.selectedBackupSets=$,this.validateRestore(!1,!0))}registerListeners(){this._register(this._browseFileButton),this._register(this._browseUrlButton),this._register(this._scriptButton),this._register(this._restoreButton),this._register(this._closeButton),this._register(this._targetDatabaseInputBox.onDidChange(U=>{this.viewModel.databases?.includes(U)?this.viewModel.targetDatabaseName!==U&&(this.viewModel.targetDatabaseName=U,this.enableRestoreButton(!1)):this.viewModel.targetDatabaseName!==U&&(this.viewModel.targetDatabaseName=U,this.validateRestore())})),this._register(this._filePathInputBox.onLoseFocus(U=>{this.onFilePathLoseFocus(U)})),this._register(this._browseFileButton.onDidClick(()=>{this.onFileBrowserRequested()})),this._register(this._browseUrlButton.onDidClick(()=>{this.onUrlBrowserRequested()})),this._register(this._sourceDatabaseSelectBox.onDidSelect(U=>{this.onSourceDatabaseChanged(U.selected)})),this._register(this._restoreFromSelectBox.onDidSelect(U=>{this.onRestoreFromChanged(U.selected)})),this._register(this._urlInputBox.onDidChange(U=>{this.onUrlPathChanged(U)}))}onFileBrowserRequested(){this.fileBrowserDialogService.showDialog(this._ownerUri,this.viewModel.defaultBackupFolder,A.fileFiltersSet,l.restore,!0,U=>this.onFileBrowsed(U))}onUrlBrowserRequested(){this.backupRestoreUrlBrowserDialogService.showDialog(this._ownerUri,!0,!0,"").then(U=>this._urlInputBox.value=U)}onFileBrowsed(U){if(U){const G=this._filePathInputBox.value;v.isFalsyOrWhitespace(this._filePathInputBox.value)?this._filePathInputBox.value=U:this._filePathInputBox.value=this._filePathInputBox.value+", "+U,G!==this._filePathInputBox.value&&this.onFilePathChanged(this._filePathInputBox.value)}}onFilePathLoseFocus(U){U.value&&(U.hasChanged||this.viewModel.filePath!==U.value)&&this.onFilePathChanged(U.value)}onFilePathChanged(U){this.viewModel.filePath=U,this.viewModel.selectedBackupSets=void 0,this.validateRestore(!0)}onUrlPathChanged(U){this.viewModel.filePath=U,this.viewModel.selectedBackupSets=void 0,this.validateRestore(!0)}onSourceDatabaseChanged(U){this.viewModel.sourceDatabaseName===void 0&&(this.viewModel.sourceDatabaseName=null),U===void 0&&(U=null),this.viewModel.sourceDatabaseName!==U&&(this.viewModel.sourceDatabaseName=U,this.viewModel.selectedBackupSets=void 0,this.validateRestore(!0))}onRestoreFromChanged(U){this.removeErrorMessage(),U===this._backupFileTitle?(this._sourceDatabaseSelectBox.enable(),this.viewModel.onRestoreFromChanged(!0),m.show(this._destinationRestoreToContainer),m.show(this._sourceDatabasesElement),m.show(this._restoreFromBackupFileElement),m.hide(this._restoreFromUrlElement),m.show(this._targetDatabaseElement),m.hide(this._targetDatabaseInputElement),this.viewModel.deviceType=M.MediaDeviceType.File):U===this._databaseTitle?(this._sourceDatabaseSelectBox.enable(),this.viewModel.onRestoreFromChanged(!1),m.show(this._destinationRestoreToContainer),m.show(this._sourceDatabasesElement),m.hide(this._restoreFromBackupFileElement),m.hide(this._restoreFromUrlElement),m.show(this._targetDatabaseElement),m.hide(this._targetDatabaseInputElement),this.viewModel.deviceType=M.MediaDeviceType.File):U===this._urlTitle&&(this.viewModel.onRestoreFromChanged(!0),m.hide(this._destinationRestoreToContainer),m.show(this._sourceDatabasesElement),m.hide(this._restoreFromBackupFileElement),m.show(this._restoreFromUrlElement),m.hide(this._targetDatabaseElement),m.show(this._targetDatabaseInputElement),this._panel.removeTab(this._fileTab.identifier),this._panel.removeTab(this._optionsTab.identifier),this._databaseDropdown.value="",this.viewModel.deviceType=M.MediaDeviceType.Url),this._engineEdition!==g.DatabaseEngineEdition.SqlManagedInstance&&(this._panel.contains(this._fileTab.identifier)||this._panel.pushTab(this._fileTab),this._panel.contains(this._optionsTab.identifier)||this._panel.pushTab(this._optionsTab)),this.resetRestoreContent()}get isRestoreFromDatabaseSelected(){return this._restoreFromSelectBox.value===this._databaseTitle}validateRestore(U=!1,G=!1){this._isBackupFileCheckboxChanged=G,this.spinner=!0,this._restoreButton.enabled=!1,this._scriptButton.enabled=!1,this._onValidate.fire(U)}restore(U){this._restoreButton.enabled&&this._onRestore.fire(U)}hideError(){this.setError("")}onClose(){this.cancel()}onAccept(){this.restore(!1)}cancel(){this._onCancel.fire(),this.close("cancel")}close(U="close"){this.resetDialog(),this.hide(U),this._onCloseEvent.fire()}resetDialog(){this.hideError(),this._engineEdition!==g.DatabaseEngineEdition.SqlManagedInstance&&(this._restoreFromSelectBox.selectWithOptionName(this._databaseTitle),this.onRestoreFromChanged(this._databaseTitle)),this._sourceDatabaseSelectBox.select(0),this._panel.showTab(this._generalTab.identifier),this._isBackupFileCheckboxChanged=!1,this.removeErrorMessage(),this.resetRestoreContent()}open(U,G,$){this._engineEdition=$,this.title=this._restoreTitle+" - "+U,this._ownerUri=G,this._urlInputBox.value="",this._targetDatabaseInputBox.value="";let ie;this._engineEdition===g.DatabaseEngineEdition.SqlManagedInstance?(this._restoreFromSelectBox.setOptions([this._urlTitle]),ie=this._urlTitle,this._onDatabaseListFocused.fire(),this._restoreFromSelectBox.disable()):(this._restoreFromSelectBox.setOptions([this._databaseTitle,this._backupFileTitle,this._urlTitle]),ie=this._databaseTitle,this._restoreFromSelectBox.enable()),this._restoreFromSelectBox.select(0),this.onRestoreFromChanged(ie),this.show(),this._restoreFromSelectBox.focus()}layout(U){}dispose(){super.dispose();for(let U in this._optionsMap)this._optionsMap[U].dispose(),delete this._optionsMap[U]}updateLastBackupTaken(U){this._destinationRestoreToInputBox.value=U}updateFilePath(U){this._filePathInputBox.value=U,U||this._filePathInputBox.hideMessage()}updateSourceDatabaseName(U){let G=[];this.isRestoreFromDatabaseSelected&&U.databaseNames&&U.databaseNames.length>0&&U.databaseNames[0]!==""?G=[""].concat(U.databaseNames):G=U.databaseNames,this._sourceDatabaseSelectBox.setOptions(G),this._sourceDatabaseSelectBox.selectWithOptionName(U.selectedDatabase)}updateTargetDatabaseName(U){this._databaseDropdown.value=U}updateRestoreOption(U){const G=this._optionsMap[U.optionName];G&&(G instanceof h.Checkbox?(G.checked=U.value,this.enableDisableWiget(G,U.isReadOnly)):G instanceof r.SelectBox?(G.selectWithOptionName(U.value),this.enableDisableWiget(G,U.isReadOnly)):G instanceof a.InputBox&&(G.value=U.value,this.enableDisableWiget(G,U.isReadOnly)))}enableDisableWiget(U,G){G?U.disable():U.enable()}updateRestoreDatabaseFiles(U){if(this.clearFileListTable(),U&&U.length>0){const G=[];for(let $=0;$<U.length;$++)G[$]={logicalFileName:U[$].logicalFileName,fileType:U[$].fileType,originalFileName:U[$].originalFileName,restoreAs:U[$].restoreAsFileName};m.show(this._fileListTableContainer),this._fileListData.push(G),this._fileListTable.setData(this._fileListData),this._fileListTable.setSelectedRows([0]),this._fileListTable.setActiveCell(0,0)}}updateBackupSetsToRestore(U){if(this._isBackupFileCheckboxChanged){const G=[];for(let $=0;$<U.length;$++)U[$].isSelected&&G.push($);this._restorePlanTable.setSelectedRows(G)}else if(this.clearRestorePlanDataTable(),U&&U.length>0){if(!this._restorePlanColumn){const ie=U[0];this._restorePlanColumn=ie.properties.map(j=>({id:j.propertyName,name:j.propertyDisplayName,field:j.propertyName}));const J=new s.CheckboxSelectColumn({title:this._restoreLabel,toolTip:this._restoreLabel,width:15});this._restorePlanColumn.unshift(J.definition),this._restorePlanTable.columns=this._restorePlanColumn,this._restorePlanTable.registerPlugin(J),this._restorePlanTable.autosizeColumns()}const G=[],$=[];for(let ie=0;ie<U.length;ie++){const J=U[ie],j={};for(let ee=0;ee<J.properties.length;ee++)j[J.properties[ee].propertyName]=J.properties[ee].propertyValueDisplayName;G.push(j),J.isSelected&&$.push(ie)}m.show(this._restorePlanTableContainer),this._restorePlanData.push(G),this._restorePlanTable.setSelectedRows($),this._restorePlanTable.setActiveCell($[0],0),this._isRenderedRestorePlanTable||(this._isRenderedRestorePlanTable=!0,this._restorePlanTable.resizeCanvas(),this._restorePlanTable.autosizeColumns())}}};e.RestoreDialog=K,e.RestoreDialog=K=fe([O(1,k.ILayoutService),O(2,b.IThemeService),O(3,y.IContextViewService),O(4,I.IAdsTelemetryService),O(5,T.IContextKeyService),O(6,E.IFileBrowserDialogController),O(7,R.IBackupRestoreUrlBrowserDialogService),O(8,w.IClipboardService),O(9,C.ILogService),O(10,N.ITextResourcePropertiesService),O(11,P.IAccessibilityService),O(12,x.IQuickInputService),O(13,F.IComponentContextService)],K)}),define(Q[3581],Y([1,0,647,2251,196,6,23,42,275,5,3491,76,188,1521,14,172]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TableDesignerComponentInput=void 0;const o=(0,y.localize)(0,null);let u=class{constructor(p,c,l,n,g,w,E,C,I,_){this._provider=p,this.tableInfo=c,this._telemetryInfo=l,this._objectExplorerContext=n,this._notificationService=g,this._adsTelemetryService=w,this._queryEditorService=E,this._instantiationService=C,this._errorMessageService=I,this._objectExplorerService=_,this._valid=!0,this._dirty=!1,this._pendingAction=void 0,this._onStateChange=new D.Emitter,this._onInitialized=new D.Emitter,this._onEditProcessed=new D.Emitter,this._onRefreshRequested=new D.Emitter,this._onSubmitPendingEditRequested=new D.Emitter,this._isEditInProgress=!1,this._recentEditAccepted=!0,this._editQueue=new i.Queue,this.onInitialized=this._onInitialized.event,this.onEditProcessed=this._onEditProcessed.event,this.onStateChange=this._onStateChange.event,this.onRefreshRequested=this._onRefreshRequested.event,this.onSubmitPendingEditRequested=this._onSubmitPendingEditRequested.event,this.designerEditTypeDisplayValue={0:"Add",1:"Remove",2:"Update"},this.designerUIState=void 0}get valid(){return this._valid}get dirty(){return this._dirty}get pendingAction(){return this._pendingAction}get objectTypeDisplayName(){return(0,y.localize)(1,null)}get view(){return this._view}get viewModel(){return this._viewModel}get issues(){return this._issues}get tableDesignerView(){return this._tableDesignerView}processEdit(p){const c=this._editQueue.size!==0;this._editQueue.queue(async()=>{this.escapeAllApostrophes(p),await this.doProcessEdit(p,c)})}async generateScript(){const p=this._notificationService.notify({severity:T.Severity.Info,message:(0,y.localize)(2,null),sticky:!0}),c=this.createTelemetryInfo(),l=this._adsTelemetryService.createActionEvent("TableDesigner","GenerateScript").withAdditionalProperties(c),n=new Date().getTime();try{this.updateState(this.valid,this.dirty,"generateScript");const g=await this._provider.generateScript(this.tableInfo);this._queryEditorService.newSqlEditor({initialContent:g}),this.updateState(this.valid,this.dirty),p.updateMessage((0,y.localize)(3,null)),l.withAdditionalMeasurements({elapsedTimeMs:new Date().getTime()-n}).send()}catch(g){this._errorMessageService.showDialog(T.Severity.Error,o,(0,y.localize)(4,null,g?.message??g),g?.data),this.updateState(this.valid,this.dirty),this._adsTelemetryService.createErrorEvent("TableDesigner","GenerateScript").withAdditionalProperties(c).send()}finally{setTimeout(()=>p.close(),2e3)}}async publishChanges(){const p=this.createTelemetryInfo(),c=this._adsTelemetryService.createActionEvent("TableDesigner","PublishChanges").withAdditionalProperties(p),l=this._notificationService.notify({severity:T.Severity.Info,message:(0,y.localize)(5,null),sticky:!0}),n=new Date().getTime();let g=!1;const w=this.tableInfo.isNewTable;try{this.updateState(this.valid,this.dirty,"publish");const E=await this._provider.publishChanges(this.tableInfo);this._viewModel=E.viewModel,this._originalViewModel=E.viewModel,this.setDesignerView(E.view),l.updateMessage((0,y.localize)(6,null)),this.tableInfo=E.newTableInfo,this.updateState(!0,!1),this._onRefreshRequested.fire();const C=r.TableDesignerMetadata.getTelemetryInfo(this._provider.providerId,E.metadata);c.withAdditionalMeasurements({elapsedTimeMs:new Date().getTime()-n}).withAdditionalProperties(C).send(),g=!0}catch(E){this._errorMessageService.showDialog(T.Severity.Error,o,(0,y.localize)(7,null,E?.message??E),E?.data),this.updateState(this.valid,this.dirty),this._adsTelemetryService.createErrorEvent("TableDesigner","PublishChanges").withAdditionalProperties(p).send()}finally{setTimeout(()=>l.close(),2e3)}g&&await this.refreshNodeInOE(w)}async refreshNodeInOE(p){if(this._objectExplorerContext)try{const c=this._objectExplorerContext.connectionProfile?.id,l=this._objectExplorerContext.nodeInfo,n=await this._objectExplorerService.getTreeNode(c,l?.nodePath);let g;p||n?.objectType==="Tables"?g=l?.nodePath:g=l?.parentNodePath,await this._objectExplorerService.refreshNodeInView(c,g)}catch(c){const l=(0,y.localize)(8,null,c);this._notificationService.error(l)}}async save(){this._onSubmitPendingEditRequested.fire(),await(0,i.timeout)(10),this._isEditInProgress&&await this._activeEditPromise,!(!this.valid||!this._recentEditAccepted)&&this.isDirty()&&(this.tableDesignerView?.useAdvancedSaveMode?await this.openPublishDialog():await this.publishChanges())}async openPublishDialog(){const p=this._notificationService.notify({severity:T.Severity.Info,message:(0,y.localize)(9,null),sticky:!0}),c=this.createTelemetryInfo(),l=this._adsTelemetryService.createActionEvent("TableDesigner","GeneratePreviewReport").withAdditionalProperties(c),n=new Date().getTime();let g;try{this.updateState(this.valid,this.dirty,"generateReport"),g=await this._provider.generatePreviewReport(this.tableInfo);const C=r.TableDesignerMetadata.getTelemetryInfo(this._provider.providerId,g.metadata);l.withAdditionalMeasurements({elapsedTimeMs:new Date().getTime()-n}).withAdditionalProperties(C).send(),p.close(),this.updateState(this.valid,this.dirty)}catch(C){this._errorMessageService.showDialog(T.Severity.Error,o,(0,y.localize)(10,null,C?.message??C),C?.data),this.updateState(this.valid,this.dirty),this._adsTelemetryService.createErrorEvent("TableDesigner","GeneratePreviewReport").withAdditionalProperties(c).send();return}if(g.schemaValidationError){this._errorMessageService.showDialog(T.Severity.Error,o,(0,y.localize)(11,null,g.schemaValidationError));return}const E=await this._instantiationService.createInstance(S.TableDesignerPublishDialog).open(g);E===S.TableDesignerPublishDialogResult.GenerateScript?await this.generateScript():E===S.TableDesignerPublishDialogResult.UpdateDatabase&&await this.publishChanges()}async revert(){this.updateState(!0,!1)}async doProcessEdit(p,c){if(c&&!this._recentEditAccepted)return;const l=this.createTelemetryInfo();l.tableObjectType=this.getObjectTypeFromPath(p.path);const n=this._adsTelemetryService.createActionEvent("TableDesigner",this.designerEditTypeDisplayValue[p.type]).withAdditionalProperties(l),g=new Date().getTime();return this.updateState(this.valid,this.dirty,"processEdit"),this._activeEditPromise=new Promise(async w=>{this._isEditInProgress=!0,this._recentEditAccepted=!0;try{const E=await this._provider.processTableEdit(this.tableInfo,p);E.inputValidationError&&(this._recentEditAccepted=!1,this._errorMessageService.showDialog(T.Severity.Error,o,(0,y.localize)(12,null,E.inputValidationError))),this._viewModel=E.viewModel,E.view&&this.setDesignerView(E.view),this._issues=E.issues,this.updateState(E.isValid,this.isDirty(),void 0),this._onEditProcessed.fire({edit:p,result:{isValid:E.isValid,issues:E.issues,refreshView:!!E.view}});const C=r.TableDesignerMetadata.getTelemetryInfo(this._provider.providerId,E.metadata);n.withAdditionalMeasurements({elapsedTimeMs:new Date().getTime()-g}).withAdditionalProperties(C).send()}catch(E){this._errorMessageService.showDialog(T.Severity.Error,o,(0,y.localize)(13,null,E?.message??E),E?.data),this.updateState(this.valid,this.dirty),this._adsTelemetryService.createErrorEvent("TableDesigner",this.designerEditTypeDisplayValue[p.type]).withAdditionalProperties(l).send(),this._recentEditAccepted=!1}finally{this._isEditInProgress=!1,w()}}),this._activeEditPromise}updateState(p,c,l){if(this._dirty!==c||this._valid!==p||this._pendingAction!==l){const n={valid:this._valid,dirty:this._dirty,pendingAction:this._pendingAction};this._dirty=c,this._valid=p,this._pendingAction=l;const g={valid:this._valid,dirty:this._dirty,pendingAction:this._pendingAction};this._onStateChange.fire({currentState:g,previousState:n})}}async initialize(){if(!(this._view!==void 0||this.pendingAction==="initialize")){this.updateState(this.valid,this.dirty,"initialize");try{const p=await this._provider.initializeTableDesigner(this.tableInfo);this.doInitialization(p),this._onInitialized.fire()}catch(p){this._errorMessageService.showDialog(T.Severity.Error,o,(0,y.localize)(14,null,p?.message??p),p?.data)}}}doInitialization(p){this.tableInfo=p.tableInfo,this.updateState(!0,this.tableInfo.isNewTable),this._viewModel=p.viewModel,this._originalViewModel=this.tableInfo.isNewTable?void 0:(0,f.deepClone)(this._viewModel),this._tableDesignerView=p.view,this._issues=p.issues,this.setDesignerView(p.view)}setDesignerView(p){const c=[];p.columnTableOptions?.showTable&&c.push(this.getColumnsTab(p.columnTableOptions,p.additionalComponents)),c.push(this.getPrimaryKeyTab(p,p.additionalComponents)),p.foreignKeyTableOptions?.showTable&&c.push(this.getForeignKeysTab(p.foreignKeyTableOptions,p.foreignKeyColumnMappingTableOptions,p.additionalComponents)),p.checkConstraintTableOptions?.showTable&&c.push(this.getCheckConstraintsTab(p.checkConstraintTableOptions,p.additionalComponents)),p.indexTableOptions?.showTable&&c.push(this.getIndexesTab(p.indexTableOptions,p.indexColumnSpecificationTableOptions,p.additionalComponents)),p.additionalTabs&&c.push(...p.additionalTabs),c.push(this.getGeneralTab(p)),this._view={components:[{componentType:"input",propertyName:b.designers.TableColumnProperty.Name,description:(0,y.localize)(15,null),componentProperties:{title:(0,y.localize)(16,null),width:200}}],tabs:c}}getGeneralTab(p){const c=[{componentType:"dropdown",propertyName:b.designers.TableProperty.Schema,description:(0,y.localize)(17,null),componentProperties:{title:(0,y.localize)(18,null)}},{componentType:"input",propertyName:b.designers.TableProperty.Description,description:(0,y.localize)(19,null),componentProperties:{title:(0,y.localize)(20,null)}}];return p.additionalTableProperties&&c.push(...p.additionalTableProperties),{title:(0,y.localize)(21,null),components:c}}getColumnsTab(p,c){const l=[{componentType:"input",propertyName:b.designers.TableColumnProperty.Name,description:(0,y.localize)(22,null),componentProperties:{title:(0,y.localize)(23,null),width:150}},{componentType:"input",propertyName:b.designers.TableColumnProperty.Description,description:(0,y.localize)(24,null),componentProperties:{title:(0,y.localize)(25,null)}},{componentType:"dropdown",propertyName:b.designers.TableColumnProperty.AdvancedType,showInPropertiesView:!1,description:(0,y.localize)(26,null),componentProperties:{title:(0,y.localize)(27,null),width:120,isEditable:!0}},{componentType:"dropdown",propertyName:b.designers.TableColumnProperty.Type,description:(0,y.localize)(28,null),componentProperties:{title:(0,y.localize)(29,null),width:100}},{componentType:"input",propertyName:b.designers.TableColumnProperty.Length,description:(0,y.localize)(30,null),componentProperties:{title:(0,y.localize)(31,null),width:60}},{componentType:"input",propertyName:b.designers.TableColumnProperty.DefaultValue,description:(0,y.localize)(32,null),componentProperties:{title:(0,y.localize)(33,null),width:150}},{componentType:"checkbox",propertyName:b.designers.TableColumnProperty.AllowNulls,description:(0,y.localize)(34,null),componentProperties:{title:(0,y.localize)(35,null)}},{componentType:"checkbox",propertyName:b.designers.TableColumnProperty.IsPrimaryKey,description:(0,y.localize)(36,null),componentProperties:{title:(0,y.localize)(37,null)}},{componentType:"input",propertyName:b.designers.TableColumnProperty.Precision,description:(0,y.localize)(38,null),componentProperties:{title:(0,y.localize)(39,null),width:60,inputType:"number"}},{componentType:"input",propertyName:b.designers.TableColumnProperty.Scale,description:(0,y.localize)(40,null),componentProperties:{title:(0,y.localize)(41,null),width:60,inputType:"number"}}],n=this.getTableDisplayProperties(p,[b.designers.TableColumnProperty.Name,b.designers.TableColumnProperty.AdvancedType,b.designers.TableColumnProperty.IsPrimaryKey,b.designers.TableColumnProperty.AllowNulls,b.designers.TableColumnProperty.DefaultValue]),g={title:(0,y.localize)(42,null),components:[{componentType:"table",propertyName:b.designers.TableProperty.Columns,showInPropertiesView:!1,componentProperties:{ariaLabel:(0,y.localize)(43,null),columns:n,itemProperties:this.addAdditionalTableProperties(p,l),objectTypeDisplayName:(0,y.localize)(44,null),canAddRows:p.canAddRows,canInsertRows:p.canInsertRows,canMoveRows:p.canMoveRows,canRemoveRows:p.canRemoveRows,removeRowConfirmationMessage:p.removeRowConfirmationMessage,showRemoveRowConfirmation:p.showRemoveRowConfirmation,labelForAddNewButton:p.labelForAddNewButton??(0,y.localize)(45,null)}}]};return this.appendAdditionalComponents(g,c,b.designers.TableProperty.Columns),g}getForeignKeysTab(p,c,l){const n=[{componentType:"dropdown",propertyName:b.designers.ForeignKeyColumnMappingProperty.ForeignColumn,componentProperties:{title:(0,y.localize)(46,null),width:150}},{componentType:"dropdown",propertyName:b.designers.ForeignKeyColumnMappingProperty.Column,componentProperties:{title:(0,y.localize)(47,null),width:150}}],g=[{componentType:"input",propertyName:b.designers.TableForeignKeyProperty.Name,description:(0,y.localize)(48,null),componentProperties:{title:(0,y.localize)(49,null),width:300}},{componentType:"input",propertyName:b.designers.TableForeignKeyProperty.Description,description:(0,y.localize)(50,null),componentProperties:{title:(0,y.localize)(51,null)}},{componentType:"dropdown",propertyName:b.designers.TableForeignKeyProperty.ForeignTable,description:(0,y.localize)(52,null),componentProperties:{title:(0,y.localize)(53,null),width:200}},{componentType:"dropdown",propertyName:b.designers.TableForeignKeyProperty.OnUpdateAction,description:(0,y.localize)(54,null),componentProperties:{title:(0,y.localize)(55,null),width:100}},{componentType:"dropdown",propertyName:b.designers.TableForeignKeyProperty.OnDeleteAction,description:(0,y.localize)(56,null),componentProperties:{title:(0,y.localize)(57,null),width:100}},{componentType:"table",propertyName:b.designers.TableForeignKeyProperty.Columns,description:(0,y.localize)(58,null),group:(0,y.localize)(59,null),componentProperties:{ariaLabel:(0,y.localize)(60,null),columns:this.getTableDisplayProperties(c,[b.designers.ForeignKeyColumnMappingProperty.Column,b.designers.ForeignKeyColumnMappingProperty.ForeignColumn]),itemProperties:this.addAdditionalTableProperties(c,n),canAddRows:c.canAddRows,canRemoveRows:c.canRemoveRows,removeRowConfirmationMessage:c.removeRowConfirmationMessage,labelForAddNewButton:c.labelForAddNewButton??(0,y.localize)(61,null)}}],w={title:(0,y.localize)(62,null),components:[{componentType:"table",propertyName:b.designers.TableProperty.ForeignKeys,showInPropertiesView:!1,componentProperties:{ariaLabel:(0,y.localize)(63,null),columns:this.getTableDisplayProperties(p,[b.designers.TableForeignKeyProperty.Name,b.designers.TableForeignKeyProperty.ForeignTable]),itemProperties:this.addAdditionalTableProperties(p,g),objectTypeDisplayName:(0,y.localize)(64,null),canAddRows:p.canAddRows,canRemoveRows:p.canRemoveRows,removeRowConfirmationMessage:p.removeRowConfirmationMessage,showRemoveRowConfirmation:p.showRemoveRowConfirmation,labelForAddNewButton:p.labelForAddNewButton??(0,y.localize)(65,null)}}]};return this.appendAdditionalComponents(w,l,b.designers.TableProperty.ForeignKeys),w}getPrimaryKeyTab(p,c){const l=p.primaryKeyColumnSpecificationTableOptions,n=[{componentType:"dropdown",propertyName:b.designers.TableIndexColumnSpecificationProperty.Column,description:(0,y.localize)(66,null),componentProperties:{title:(0,y.localize)(67,null),width:100}}],g=[];g.push({componentType:"input",propertyName:b.designers.TableProperty.PrimaryKeyName,showInPropertiesView:!1,description:(0,y.localize)(68,null),componentProperties:{title:(0,y.localize)(69,null)}},{componentType:"input",propertyName:b.designers.TableProperty.PrimaryKeyDescription,showInPropertiesView:!1,description:(0,y.localize)(70,null),componentProperties:{title:(0,y.localize)(71,null)}}),p.additionalPrimaryKeyProperties&&p.additionalPrimaryKeyProperties.forEach(E=>{E.showInPropertiesView=!1,g.push(E)}),g.push({componentType:"table",propertyName:b.designers.TableProperty.PrimaryKeyColumns,showInPropertiesView:!1,description:(0,y.localize)(72,null),componentProperties:{title:(0,y.localize)(73,null),ariaLabel:(0,y.localize)(74,null),columns:this.getTableDisplayProperties(l,[b.designers.TableIndexColumnSpecificationProperty.Column]),itemProperties:this.addAdditionalTableProperties(l,n),objectTypeDisplayName:"",canAddRows:l.canAddRows,canRemoveRows:l.canRemoveRows,removeRowConfirmationMessage:l.removeRowConfirmationMessage,showRemoveRowConfirmation:l.showRemoveRowConfirmation,showItemDetailInPropertiesView:!1,labelForAddNewButton:l.labelForAddNewButton??(0,y.localize)(75,null),canMoveRows:l.canMoveRows}});const w={title:(0,y.localize)(76,null),components:g};return this.appendAdditionalComponents(w,c,b.designers.TableProperty.PrimaryKey),w}getCheckConstraintsTab(p,c){const l=[{componentType:"input",propertyName:b.designers.TableCheckConstraintProperty.Name,description:(0,y.localize)(77,null),componentProperties:{title:(0,y.localize)(78,null),width:200}},{componentType:"input",propertyName:b.designers.TableCheckConstraintProperty.Description,description:(0,y.localize)(79,null),componentProperties:{title:(0,y.localize)(80,null)}},{componentType:"input",propertyName:b.designers.TableCheckConstraintProperty.Expression,description:(0,y.localize)(81,null),componentProperties:{title:(0,y.localize)(82,null),width:300}}],n={title:(0,y.localize)(83,null),components:[{componentType:"table",propertyName:b.designers.TableProperty.CheckConstraints,showInPropertiesView:!1,componentProperties:{ariaLabel:(0,y.localize)(84,null),columns:this.getTableDisplayProperties(p,[b.designers.TableCheckConstraintProperty.Name,b.designers.TableCheckConstraintProperty.Expression]),itemProperties:this.addAdditionalTableProperties(p,l),objectTypeDisplayName:(0,y.localize)(85,null),canAddRows:p.canAddRows,canRemoveRows:p.canRemoveRows,removeRowConfirmationMessage:p.removeRowConfirmationMessage,showRemoveRowConfirmation:p.showRemoveRowConfirmation,labelForAddNewButton:p.labelForAddNewButton??(0,y.localize)(86,null)}}]};return this.appendAdditionalComponents(n,c,b.designers.TableProperty.CheckConstraints),n}getIndexesTab(p,c,l){const n=[{componentType:"dropdown",propertyName:b.designers.TableIndexColumnSpecificationProperty.Column,description:(0,y.localize)(87,null),componentProperties:{title:(0,y.localize)(88,null),width:100}}],g=[{componentType:"input",propertyName:b.designers.TableIndexProperty.Name,description:(0,y.localize)(89,null),componentProperties:{title:(0,y.localize)(90,null),width:200}},{componentType:"input",propertyName:b.designers.TableIndexProperty.Description,description:(0,y.localize)(91,null),componentProperties:{title:(0,y.localize)(92,null),width:200}},{componentType:"table",propertyName:b.designers.TableIndexProperty.Columns,description:(0,y.localize)(93,null),group:(0,y.localize)(94,null),componentProperties:{ariaLabel:(0,y.localize)(95,null),columns:this.getTableDisplayProperties(c,[b.designers.TableIndexColumnSpecificationProperty.Column]),itemProperties:this.addAdditionalTableProperties(c,n),objectTypeDisplayName:"",canAddRows:c.canAddRows,canRemoveRows:c.canRemoveRows,removeRowConfirmationMessage:c.removeRowConfirmationMessage,showRemoveRowConfirmation:c.showRemoveRowConfirmation,labelForAddNewButton:c.labelForAddNewButton??(0,y.localize)(96,null)}}],w={title:(0,y.localize)(97,null),components:[{componentType:"table",propertyName:b.designers.TableProperty.Indexes,showInPropertiesView:!1,componentProperties:{ariaLabel:(0,y.localize)(98,null),columns:this.getTableDisplayProperties(p,[b.designers.TableIndexProperty.Name]),itemProperties:this.addAdditionalTableProperties(p,g),objectTypeDisplayName:(0,y.localize)(99,null),canAddRows:p.canAddRows,canRemoveRows:p.canRemoveRows,removeRowConfirmationMessage:p.removeRowConfirmationMessage,showRemoveRowConfirmation:p.showRemoveRowConfirmation,labelForAddNewButton:p.labelForAddNewButton??(0,y.localize)(100,null)}}]};return this.appendAdditionalComponents(w,l,b.designers.TableProperty.Indexes),w}appendAdditionalComponents(p,c,l){const n=this.getAdditionalComponentsForTab(c,l);n&&p.components.push(...n)}getAdditionalComponentsForTab(p,c){return p?p.filter(l=>l.tab===c):[]}getTableDisplayProperties(p,c){return p.propertiesToDisplay?.length>0?p.propertiesToDisplay:c}addAdditionalTableProperties(p,c){return p.additionalProperties&&c.push(...p.additionalProperties),c}createTelemetryInfo(){let p={provider:this._provider.providerId,isNewTable:this.tableInfo.isNewTable};return Object.assign(p,this._telemetryInfo),p}isDirty(){const p=(0,f.deepClone)(this._viewModel),c=(0,f.deepClone)(this._originalViewModel);return p&&delete p[t.ScriptProperty],c&&delete c[t.ScriptProperty],!(0,f.equals)(p,c)}getObjectTypeFromPath(p){let c=[];for(let l=0;l<p.length;l++)l%2===0&&c.push(p[l]);return c.join("/")}escapeAllApostrophes(p){typeof p.value=="string"&&p.value.includes("'")&&(p.value=p.value.replace(/'/g,"''"))}};e.TableDesignerComponentInput=u,e.TableDesignerComponentInput=u=fe([O(4,T.INotificationService),O(5,h.IAdsTelemetryService),O(6,v.IQueryEditorService),O(7,m.IInstantiationService),O(8,a.IErrorMessageService),O(9,s.IObjectExplorerService)],u)}),define(Q[1290],Y([1,0,1961,10,163,3581,5,15,1496,23]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.TableDesignerInput=void 0;var h;(function(r){r.Basic="Basic",r.Temporal="Temporal",r.GraphEdge="GraphEdge",r.GraphNode="GraphNode"})(h||(h={}));let a=class extends b.EditorInput{static{S=this}static{this.ID="workbench.editorinputs.tableDesignerInput"}constructor(i,s,o,u,d,p){super(),this._provider=i,this._instantiationService=d,this._notificationService=p,this._additionalDetails="",this._tableIconMap=new Map([[h.Basic,"table-basic"],[h.Temporal,"table-temporal"],[h.GraphEdge,"table-graphedge"],[h.GraphNode,"table-graphnode"]]),this._designerComponentInput=this._instantiationService.createInstance(D.TableDesignerComponentInput,this._provider,s,o,u),this._register(this._designerComponentInput.onStateChange(c=>{c.previousState.pendingAction==="publish"&&this.setEditorLabel(),c.currentState.dirty!==c.previousState.dirty&&this._onDidChangeDirty.fire()})),this._register(this._designerComponentInput.onInitialized(()=>{this.setEditorLabel()})),this._tableIcon=s.tableIcon?s.tableIcon:h.Basic,this.setEditorLabel()}get typeId(){return S.ID}get resource(){return y.URI.from({scheme:v.Schemas.tableDesigner,path:this._tableIconMap.get(this._tableIcon)})}getComponentInput(){return this._designerComponentInput}getName(){return this._name}getTitle(i){switch(i){case 2:return this._additionalDetails+this._title.substring(this._title.lastIndexOf(" - "));default:case 0:case 1:return this._title}}isDirty(){return this._designerComponentInput.dirty}isSaving(){return this._designerComponentInput.pendingAction==="publish"}async save(i,s){return this._designerComponentInput.pendingAction?this._notificationService.warn((0,t.localize)(0,null)):await this._designerComponentInput.save(),this}async revert(i,s){await this._designerComponentInput.revert()}matches(i){return i instanceof S&&this._provider.providerId===i._provider.providerId&&this._designerComponentInput.tableInfo.id===i._designerComponentInput.tableInfo.id}dispose(){super.dispose(),this._provider.disposeTableDesigner(this._designerComponentInput.tableInfo).then(void 0,i=>(0,f.onUnexpectedError)(i))}setEditorLabel(){this._name=this._designerComponentInput.tableInfo.title,this._title=this._designerComponentInput.tableInfo.tooltip;let i=this._designerComponentInput.tableInfo.additionalInfo;i&&(this._additionalDetails=i),this._onDidChangeLabel.fire()}};e.TableDesignerInput=a,e.TableDesignerInput=a=S=fe([O(4,T.IInstantiationService),O(5,m.INotificationService)],a)}),define(Q[1291],Y([1,0,71]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TEXT_BASED_MIMETYPES=e.copyCellOutput=void 0;async function y(b,D,T,f){const v=D.model,m=b&&e.TEXT_BASED_MIMETYPES.includes(b)?v.outputs.find(a=>a.mime===b):v.outputs.find(a=>e.TEXT_BASED_MIMETYPES.includes(a.mime));if(b=m?.mime,!b||!m)return;const S=new TextDecoder;let h=S.decode(m.data.buffer);if((0,t.isTextStreamMime)(b)){const a=D.cellViewModel;let r=a.outputsViewModels.indexOf(D)+1;for(;r<a.model.outputs.length;){const s=a.model.outputs[r].outputs.find(o=>(0,t.isTextStreamMime)(o.mime));if(!s)break;h=h+S.decode(s.data.buffer),r=r+1}}b.endsWith("error")&&(h=h.replace(/\\u001b\[[0-9;]*m/gi,"").replaceAll("\\n",` `));try{await T.writeText(h)}catch(a){f.error(`Failed to copy content: ${a}`)}}e.copyCellOutput=y,e.TEXT_BASED_MIMETYPES=["text/latex","text/html","application/vnd.code.notebook.error","application/vnd.code.notebook.stdout","application/x.notebook.stdout","application/x.notebook.stream","application/vnd.code.notebook.stderr","application/x.notebook.stderr","text/plain","text/markdown","application/json"]}),define(Q[1292],Y([1,0,7,498,342,142,14,517,711,2801,308,8,29,77,19,37,1086,32,9,34,5,88,325,85,420,1281,18,229,54,4,71,1810]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleFindReplaceWidget=e.NotebookFindInput=e.NotebookFindInputFilterButton=e.findFilterButton=void 0;const L=m.localize(0,null),R=m.localize(1,null),M=m.localize(2,null),N=m.localize(3,null),P=m.localize(4,null),x=m.localize(5,null),F=m.localize(6,null),V=m.localize(7,null),W=m.localize(8,null),z=m.localize(9,null);e.findFilterButton=(0,r.registerIcon)("find-filter",u.Codicon.filter,m.localize(10,null));const B=m.localize(11,null),K=m.localize(12,null),H=m.localize(13,null),U=m.localize(14,null),G=m.localize(15,null),$=318,ie=4;let J=class extends n.DropdownMenuActionViewItem{constructor(Z,se,re,oe){super(se,{getActions:()=>this.getActions()},oe,{actionRunner:re,classNames:se.class,anchorAlignmentProvider:()=>1}),this.filters=Z}render(Z){super.render(Z),this.updateChecked()}getActions(){const Z={checked:this.filters.markupInput,class:void 0,enabled:!0,id:"findInMarkdownInput",label:K,run:async()=>{this.filters.markupInput=!this.filters.markupInput},tooltip:""},se={checked:this.filters.markupPreview,class:void 0,enabled:!0,id:"findInMarkdownInput",label:H,run:async()=>{this.filters.markupPreview=!this.filters.markupPreview},tooltip:""},re={checked:this.filters.codeInput,class:void 0,enabled:!0,id:"findInCodeInput",label:U,run:async()=>{this.filters.codeInput=!this.filters.codeInput},tooltip:""},oe={checked:this.filters.codeOutput,class:void 0,enabled:!0,id:"findInCodeOutput",label:G,run:async()=>{this.filters.codeOutput=!this.filters.codeOutput},tooltip:"",dispose:()=>null};return C.isSafari?[Z,re]:[Z,se,new p.Separator,re,oe]}updateChecked(){this.element.classList.toggle("checked",this._action.checked)}};J=fe([O(3,a.IContextMenuService)],J);class j extends A.Disposable{constructor(Z,se,re,oe,le=B){super(),this.filters=Z,this.contextMenuService=se,this.instantiationService=re,this._actionbar=null,this._toggleStyles=oe.toggleStyles,this._filtersAction=new p.Action("notebookFindFilterAction",le,"notebook-filters "+s.ThemeIcon.asClassName(w.filterIcon)),this._filtersAction.checked=!1,this._filterButtonContainer=t.$(".find-filter-button"),this._filterButtonContainer.classList.add("monaco-custom-toggle"),this.createFilters(this._filterButtonContainer)}get container(){return this._filterButtonContainer}get width(){return 2+2+2+16}applyStyles(Z){const se=this._toggleStyles;this._filterButtonContainer.style.border="1px solid transparent",this._filterButtonContainer.style.borderRadius="3px",this._filterButtonContainer.style.borderColor=Z&&se.inputActiveOptionBorder||"",this._filterButtonContainer.style.color=Z&&se.inputActiveOptionForeground||"inherit",this._filterButtonContainer.style.backgroundColor=Z&&se.inputActiveOptionBackground||""}createFilters(Z){this._actionbar=this._register(new g.ActionBar(Z,{actionViewItemProvider:se=>{if(se.id===this._filtersAction.id)return this.instantiationService.createInstance(J,this.filters,se,new p.ActionRunner)}})),this._actionbar.push(this._filtersAction,{icon:!0,label:!1})}}e.NotebookFindInputFilterButton=j;class ee extends y.FindInput{constructor(Z,se,re,oe,le,ne,ce){super(le,ne,ce),this.filters=Z,this.contextMenuService=re,this.instantiationService=oe,this._filterChecked=!1,this._register((0,S.registerAndCreateHistoryNavigationContext)(se,this.inputBox)),this._findFilter=this._register(new j(Z,re,oe,ce)),this.inputBox.paddingRight=(this.caseSensitive?.width()??0)+(this.wholeWords?.width()??0)+(this.regex?.width()??0)+this._findFilter.width,this.controls.appendChild(this._findFilter.container)}setEnabled(Z){super.setEnabled(Z),Z&&!this._filterChecked?this.regex?.enable():this.regex?.disable()}updateFilterState(Z){this._filterChecked=Z,this.regex&&(this._filterChecked?(this.regex.disable(),this.regex.domNode.tabIndex=-1,this.regex.domNode.classList.toggle("disabled",!0)):(this.regex.enable(),this.regex.domNode.tabIndex=0,this.regex.domNode.classList.toggle("disabled",!1))),this._findFilter.applyStyles(this._filterChecked)}getCellToolbarActions(Z){const oe={primary:[],secondary:[]};return(0,l.createAndFillInActionBarActions)(Z,{shouldForwardArgs:!0},oe,le=>/^inline/.test(le)),oe}}e.NotebookFindInput=ee;let X=class extends D.Widget{constructor(Z,se,re,oe,le,ne=new f.FindReplaceState,ce){super(),this._contextViewService=Z,this._configurationService=re,this.contextMenuService=oe,this.instantiationService=le,this._state=ne,this._notebookEditor=ce,this._resizeOriginalWidth=$,this._isVisible=!1,this._isReplaceVisible=!1,this.foundMatch=!1;const ae=this._configurationService.getValue(k.NotebookSetting.findScope)??{markupSource:!0,markupPreview:!0,codeSource:!0,codeOutput:!0};this._filters=new E.NotebookFindFilters(ae.markupSource,ae.markupPreview,ae.codeSource,ae.codeOutput),this._state.change({filters:this._filters},!1),this._filters.onDidChange(()=>{this._state.change({filters:this._filters},!1)}),this._domNode=document.createElement("div"),this._domNode.classList.add("simple-fr-find-part-wrapper"),this._register(this._state.onFindReplaceStateChange(he=>this._onStateChanged(he))),this._scopedContextKeyService=se.createScoped(this._domNode);const ue=t.$(".find-replace-progress");this._progressBar=new b.ProgressBar(ue,_.defaultProgressBarStyles),this._domNode.appendChild(ue);const de=se.getContextKeyValue("notebookType")==="interactive";this._toggleReplaceBtn=this._register(new v.SimpleButton({label:x,className:"codicon toggle left",onTrigger:de?()=>{}:()=>{this._isReplaceVisible=!this._isReplaceVisible,this._state.change({isReplaceRevealed:this._isReplaceVisible},!1),this._updateReplaceViewDisplay()}})),this._toggleReplaceBtn.setEnabled(!de),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 ee(this._filters,this._scopedContextKeyService,this.contextMenuService,this.instantiationService,null,this._contextViewService,{label:L,placeholder:R,validation:he=>{if(he.length===0||!this._findInput.getRegex())return null;try{return new RegExp(he),null}catch(be){return this.foundMatch=!1,this.updateButtons(this.foundMatch),{content:be.message}}},flexibleWidth:!0,showCommonFindToggles:!0,inputBoxStyles:_.defaultInputBoxStyles,toggleStyles:_.defaultToggleStyles})),this._updateHistoryDelayer=new T.Delayer(500),this.oninput(this._findInput.domNode,he=>{this.foundMatch=this.onInputChanged(),this.updateButtons(this.foundMatch),this._delayedUpdateHistory()}),this._register(this._findInput.inputBox.onDidChange(()=>{this._state.change({searchString:this._findInput.getValue()},!0)})),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._replaceInput.setPreserveCase(this._state.preserveCase),this.findFirst()})),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this.prevBtn=this._register(new v.SimpleButton({label:M,icon:v.findPreviousMatchIcon,onTrigger:()=>{this.find(!0)}})),this.nextBtn=this._register(new v.SimpleButton({label:N,icon:v.findNextMatchIcon,onTrigger:()=>{this.find(!1)}}));const ge=this._register(new v.SimpleButton({label:P,icon:r.widgetClose,onTrigger:()=>{this.hide()}}));this._innerFindDomNode.appendChild(this._findInput.domNode),this._innerFindDomNode.appendChild(this._matchesCount),this._innerFindDomNode.appendChild(this.prevBtn.domNode),this._innerFindDomNode.appendChild(this.nextBtn.domNode),this._innerFindDomNode.appendChild(ge.domNode),this._domNode.appendChild(this._innerFindDomNode),this.onkeyup(this._innerFindDomNode,he=>{if(he.equals(9)){this.hide(),he.preventDefault();return}}),this._focusTracker=this._register(t.trackFocus(this._domNode)),this._register(this._focusTracker.onDidFocus(this.onFocusTrackerFocus.bind(this))),this._register(this._focusTracker.onDidBlur(this.onFocusTrackerBlur.bind(this))),this._findInputFocusTracker=this._register(t.trackFocus(this._findInput.domNode)),this._register(this._findInputFocusTracker.onDidFocus(this.onFindInputFocusTrackerFocus.bind(this))),this._register(this._findInputFocusTracker.onDidBlur(this.onFindInputFocusTrackerBlur.bind(this))),this._register(t.addDisposableListener(this._innerFindDomNode,"click",he=>{he.stopPropagation()})),this._innerReplaceDomNode=document.createElement("div"),this._innerReplaceDomNode.classList.add("simple-fr-replace-part"),this._replaceInput=this._register(new S.ContextScopedReplaceInput(null,void 0,{label:F,placeholder:V,history:[],inputBoxStyles:_.defaultInputBoxStyles,toggleStyles:_.defaultToggleStyles},se,!1)),this._innerReplaceDomNode.appendChild(this._replaceInput.domNode),this._replaceInputFocusTracker=this._register(t.trackFocus(this._replaceInput.domNode)),this._register(this._replaceInputFocusTracker.onDidFocus(this.onReplaceInputFocusTrackerFocus.bind(this))),this._register(this._replaceInputFocusTracker.onDidBlur(this.onReplaceInputFocusTrackerBlur.bind(this))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.getValue()},!0)})),this._domNode.appendChild(this._innerReplaceDomNode),this._updateReplaceViewDisplay(),this._replaceBtn=this._register(new v.SimpleButton({label:W,icon:v.findReplaceIcon,onTrigger:()=>{this.replaceOne()}})),this._replaceAllBtn=this._register(new v.SimpleButton({label:z,icon:v.findReplaceAllIcon,onTrigger:()=>{this.replaceAll()}})),this._innerReplaceDomNode.appendChild(this._replaceBtn.domNode),this._innerReplaceDomNode.appendChild(this._replaceAllBtn.domNode),this._resizeSash=this._register(new I.Sash(this._domNode,{getVerticalSashLeft:()=>0},{orientation:0,size:2})),this._register(this._resizeSash.onDidStart(()=>{this._resizeOriginalWidth=this._getDomWidth()})),this._register(this._resizeSash.onDidChange(he=>{let be=this._resizeOriginalWidth+he.startX-he.currentX;be<$&&(be=$);const ve=this._getMaxWidth();be>ve&&(be=ve),this._domNode.style.width=`${be}px`,this._isReplaceVisible&&(this._replaceInput.width=t.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout()})),this._register(this._resizeSash.onDidReset(()=>{const he=this._getDomWidth();let be=$;he<=$&&(be=this._getMaxWidth()),this._domNode.style.width=`${be}px`,this._isReplaceVisible&&(this._replaceInput.width=t.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout()}))}_getMaxWidth(){return this._notebookEditor.getLayoutInfo().width-64}_getDomWidth(){return t.getTotalWidth(this._domNode)-ie*2}getCellToolbarActions(Z){const oe={primary:[],secondary:[]};return(0,l.createAndFillInActionBarActions)(Z,{shouldForwardArgs:!0},oe,le=>/^inline/.test(le)),oe}get inputValue(){return this._findInput.getValue()}get replaceValue(){return this._replaceInput.getValue()}get replacePattern(){return this._state.isRegex?(0,o.parseReplaceString)(this.replaceValue):o.ReplacePattern.fromStaticValue(this.replaceValue)}get focusTracker(){return this._focusTracker}_onStateChanged(Z){this._updateButtons(),this._updateMatchesCount()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible);const Z=this._state.searchString.length>0;this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&Z),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&Z),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this.foundMatch=this._state.matchesCount>0,this.updateButtons(this.foundMatch)}_updateMatchesCount(){}dispose(){super.dispose(),this._domNode&&this._domNode.parentElement&&this._domNode.parentElement.removeChild(this._domNode)}getDomNode(){return this._domNode}reveal(Z){if(Z&&this._findInput.setValue(Z),this._isVisible){this._findInput.select();return}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(Z,se){Z&&this._findInput.setValue(Z),this._isVisible=!0,setTimeout(()=>{this._domNode.classList.add("visible","visible-transition"),this._domNode.setAttribute("aria-hidden","false"),(se?.focus??!0)&&this.focus()},0)}showWithReplace(Z,se){Z&&this._findInput.setValue(Z),se&&this._replaceInput.setValue(se),this._isVisible=!0,this._isReplaceVisible=!0,this._state.change({isReplaceRevealed:this._isReplaceVisible},!1),this._updateReplaceViewDisplay(),setTimeout(()=>{this._domNode.classList.add("visible","visible-transition"),this._domNode.setAttribute("aria-hidden","false"),this._updateButtons(),this._replaceInput.focus()},0)}_updateReplaceViewDisplay(){this._isReplaceVisible?this._innerReplaceDomNode.style.display="flex":this._innerReplaceDomNode.style.display="none",this._replaceInput.width=t.getTotalWidth(this._findInput.domNode)}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(Z){const se=this.inputValue.length>0;this.prevBtn.setEnabled(this._isVisible&&se&&Z),this.nextBtn.setEnabled(this._isVisible&&se&&Z)}};e.SimpleFindReplaceWidget=X,e.SimpleFindReplaceWidget=X=fe([O(0,a.IContextViewService),O(1,h.IContextKeyService),O(2,d.IConfigurationService),O(3,a.IContextMenuService),O(4,c.IInstantiationService)],X),(0,i.registerThemingParticipant)((te,Z)=>{Z.addRule(` .notebook-editor { --notebook-find-width: ${$}px; --notebook-find-horizontal-padding: ${ie}px; } `)})}),define(Q[611],Y([1,0,97,6,4,499,345,71]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookOptions=e.OutputInnerContainerTopPadding=e.getEditorTopPadding=e.updateEditorTopPadding=void 0;const v=18;let m=12;const S=new y.Emitter,h=S.event;function a(u){m=u,S.fire()}e.updateEditorTopPadding=a;function r(){return m}e.getEditorTopPadding=r,e.OutputInnerContainerTopPadding=4;const i=Object.freeze({codeCellLeftMargin:28,cellRunGutter:32,markdownCellTopMargin:8,markdownCellBottomMargin:8,markdownCellLeftMargin:0,markdownCellGutter:32,focusIndicatorLeftMargin:4}),s=Object.freeze({codeCellLeftMargin:8,cellRunGutter:36,markdownCellTopMargin:6,markdownCellBottomMargin:6,markdownCellLeftMargin:8,markdownCellGutter:36,focusIndicatorLeftMargin:4});class o extends b.Disposable{constructor(d,p,c,l){super(),this.configurationService=d,this.notebookExecutionStateService=p,this.isReadonly=c,this.overrides=l,this._onDidChangeOptions=this._register(new y.Emitter),this.onDidChangeOptions=this._onDidChangeOptions.event;const n=this.configurationService.getValue(f.NotebookSetting.showCellStatusBar),g=l?.globalToolbar??this.configurationService.getValue(f.NotebookSetting.globalToolbar)??!0,w=l?.stickyScroll??this.configurationService.getValue(f.NotebookSetting.stickyScroll)??!1,E=this.configurationService.getValue(f.NotebookSetting.consolidatedOutputButton)??!0,C=this.configurationService.getValue(f.NotebookSetting.consolidatedRunButton)??!1,I=l?.dragAndDropEnabled??this.configurationService.getValue(f.NotebookSetting.dragAndDropEnabled)??!0,_=this.configurationService.getValue(f.NotebookSetting.cellToolbarLocation)??{default:"right"},A=l?.cellToolbarInteraction??this.configurationService.getValue(f.NotebookSetting.cellToolbarVisibility),k=this.configurationService.getValue(f.NotebookSetting.compactView)??!0,L=this._computeFocusIndicatorOption(),R=this._computeInsertToolbarPositionOption(this.isReadonly),M=this._computeInsertToolbarAlignmentOption(),N=this._computeShowFoldingControlsOption(),P=this.configurationService.getValue("editor.fontSize"),x=this.configurationService.getValue(f.NotebookSetting.markupFontSize),F=this.configurationService.getValue(f.NotebookSetting.cellEditorOptionsCustomizations),V=this.configurationService.getValue(f.NotebookSetting.interactiveWindowCollapseCodeCells);let W;const z=this.configurationService.getValue(f.NotebookSetting.outputLineHeightDeprecated);z!==void 0?(this._migrateDeprecatedSetting(f.NotebookSetting.outputLineHeightDeprecated,f.NotebookSetting.outputLineHeight),W=z):W=this.configurationService.getValue(f.NotebookSetting.outputLineHeight);let B;const K=this.configurationService.getValue(f.NotebookSetting.outputFontSizeDeprecated);K!==void 0?(this._migrateDeprecatedSetting(f.NotebookSetting.outputFontSizeDeprecated,f.NotebookSetting.outputFontSize),B=K):B=this.configurationService.getValue(f.NotebookSetting.outputFontSize)||P;let H;const U=this.configurationService.getValue(f.NotebookSetting.outputFontFamilyDeprecated);U!==void 0?(this._migrateDeprecatedSetting(f.NotebookSetting.outputFontFamilyDeprecated,f.NotebookSetting.outputFontFamily),H=U):H=this.configurationService.getValue(f.NotebookSetting.outputFontFamily);let G;const $=this.configurationService.getValue(f.NotebookSetting.outputScrollingDeprecated);$!==void 0?(this._migrateDeprecatedSetting(f.NotebookSetting.outputScrollingDeprecated,f.NotebookSetting.outputScrolling),G=$):G=this.configurationService.getValue(f.NotebookSetting.outputScrolling);const ie=this._computeOutputLineHeight(W,B),J=this.configurationService.getValue(f.NotebookSetting.outputWordWrap),j=this.configurationService.getValue(f.NotebookSetting.textOutputLineLimit)??30;this._layoutConfiguration={...k?s:i,cellTopMargin:6,cellBottomMargin:6,cellRightMargin:16,cellStatusBarHeight:22,cellOutputPadding:8,markdownPreviewPadding:8,editorToolbarHeight:0,editorTopPadding:m,editorBottomPadding:4,editorBottomPaddingWithoutStatusBar:12,collapsedIndicatorHeight:28,showCellStatusBar:n,globalToolbar:g,stickyScroll:w,consolidatedOutputButton:E,consolidatedRunButton:C,dragAndDropEnabled:I,cellToolbarLocation:_,cellToolbarInteraction:A,compactView:k,focusIndicator:L,insertToolbarPosition:R,insertToolbarAlignment:M,showFoldingControls:N,fontSize:P,outputFontSize:B,outputFontFamily:H,outputLineHeight:ie,markupFontSize:x,editorOptionsCustomizations:F,focusIndicatorGap:3,interactiveWindowCollapseCodeCells:V,markdownFoldHintHeight:22,outputScrolling:G,outputWordWrap:J,outputLineLimit:j},this._register(this.configurationService.onDidChangeConfiguration(ee=>{this._updateConfiguration(ee)})),this._register(h(()=>{const ee=Object.assign({},this._layoutConfiguration);ee.editorTopPadding=r(),this._layoutConfiguration=ee,this._onDidChangeOptions.fire({editorTopPadding:!0})}))}updateOptions(d){this.isReadonly!==d&&(this.isReadonly=d,this._updateConfiguration({affectsConfiguration(p){return p===f.NotebookSetting.insertToolbarLocation},source:7,affectedKeys:new Set([f.NotebookSetting.insertToolbarLocation]),change:{keys:[f.NotebookSetting.insertToolbarLocation],overrides:[]},sourceConfig:void 0}))}_migrateDeprecatedSetting(d,p){const c=this.configurationService.inspect(d);c.application!==void 0&&(this.configurationService.updateValue(d,void 0,1),this.configurationService.updateValue(p,c.application.value,1)),c.user!==void 0&&(this.configurationService.updateValue(d,void 0,2),this.configurationService.updateValue(p,c.user.value,2)),c.userLocal!==void 0&&(this.configurationService.updateValue(d,void 0,3),this.configurationService.updateValue(p,c.userLocal.value,3)),c.userRemote!==void 0&&(this.configurationService.updateValue(d,void 0,4),this.configurationService.updateValue(p,c.userRemote.value,4)),c.workspace!==void 0&&(this.configurationService.updateValue(d,void 0,5),this.configurationService.updateValue(p,c.workspace.value,5)),c.workspaceFolder!==void 0&&(this.configurationService.updateValue(d,void 0,6),this.configurationService.updateValue(p,c.workspaceFolder.value,6))}_computeOutputLineHeight(d,p){if(d===0){const l=this.configurationService.getValue("editor");d=D.FontMeasurements.readFontInfo(T.BareFontInfo.createFromRawSettings(l,t.PixelRatio.value)).lineHeight}else if(d<8){let l=p;l===0&&(l=this.configurationService.getValue("editor.fontSize")),d=d*l}return d=Math.round(d),d<8&&(d=8),d}_updateConfiguration(d){const p=d.affectsConfiguration(f.NotebookSetting.showCellStatusBar),c=d.affectsConfiguration(f.NotebookSetting.cellToolbarLocation),l=d.affectsConfiguration(f.NotebookSetting.cellToolbarVisibility),n=d.affectsConfiguration(f.NotebookSetting.compactView),g=d.affectsConfiguration(f.NotebookSetting.focusIndicator),w=d.affectsConfiguration(f.NotebookSetting.insertToolbarLocation),E=d.affectsConfiguration(f.NotebookSetting.experimentalInsertToolbarAlignment),C=d.affectsConfiguration(f.NotebookSetting.globalToolbar),I=d.affectsConfiguration(f.NotebookSetting.stickyScroll),_=d.affectsConfiguration(f.NotebookSetting.consolidatedOutputButton),A=d.affectsConfiguration(f.NotebookSetting.consolidatedRunButton),k=d.affectsConfiguration(f.NotebookSetting.showFoldingControls),L=d.affectsConfiguration(f.NotebookSetting.dragAndDropEnabled),R=d.affectsConfiguration("editor.fontSize"),M=d.affectsConfiguration(f.NotebookSetting.outputFontSize),N=d.affectsConfiguration(f.NotebookSetting.markupFontSize),P=d.affectsConfiguration("editor.fontFamily"),x=d.affectsConfiguration(f.NotebookSetting.outputFontFamily),F=d.affectsConfiguration(f.NotebookSetting.cellEditorOptionsCustomizations),V=d.affectsConfiguration(f.NotebookSetting.interactiveWindowCollapseCodeCells),W=d.affectsConfiguration(f.NotebookSetting.outputLineHeight),z=d.affectsConfiguration(f.NotebookSetting.outputScrolling),B=d.affectsConfiguration(f.NotebookSetting.outputWordWrap);if(!p&&!c&&!l&&!n&&!g&&!w&&!E&&!C&&!I&&!_&&!A&&!k&&!L&&!R&&!M&&!N&&!P&&!x&&!F&&!V&&!W&&!z&&!B)return;let K=Object.assign({},this._layoutConfiguration);if(p&&(K.showCellStatusBar=this.configurationService.getValue(f.NotebookSetting.showCellStatusBar)),c&&(K.cellToolbarLocation=this.configurationService.getValue(f.NotebookSetting.cellToolbarLocation)??{default:"right"}),l&&!this.overrides?.cellToolbarInteraction&&(K.cellToolbarInteraction=this.configurationService.getValue(f.NotebookSetting.cellToolbarVisibility)),g&&(K.focusIndicator=this._computeFocusIndicatorOption()),n){const H=this.configurationService.getValue(f.NotebookSetting.compactView)??!0;K=Object.assign(K,{...H?s:i}),K.compactView=H}if(E&&(K.insertToolbarAlignment=this._computeInsertToolbarAlignmentOption()),w&&(K.insertToolbarPosition=this._computeInsertToolbarPositionOption(this.isReadonly)),C&&this.overrides?.globalToolbar===void 0&&(K.globalToolbar=this.configurationService.getValue(f.NotebookSetting.globalToolbar)??!0),I&&this.overrides?.stickyScroll===void 0&&(K.stickyScroll=this.configurationService.getValue(f.NotebookSetting.stickyScroll)??!1),_&&(K.consolidatedOutputButton=this.configurationService.getValue(f.NotebookSetting.consolidatedOutputButton)??!0),A&&(K.consolidatedRunButton=this.configurationService.getValue(f.NotebookSetting.consolidatedRunButton)??!0),k&&(K.showFoldingControls=this._computeShowFoldingControlsOption()),L&&(K.dragAndDropEnabled=this.configurationService.getValue(f.NotebookSetting.dragAndDropEnabled)??!0),R&&(K.fontSize=this.configurationService.getValue("editor.fontSize")),M&&(K.outputFontSize=this.configurationService.getValue(f.NotebookSetting.outputFontSize)||K.fontSize),N&&(K.markupFontSize=this.configurationService.getValue(f.NotebookSetting.markupFontSize)),x&&(K.outputFontFamily=this.configurationService.getValue(f.NotebookSetting.outputFontFamily)),F&&(K.editorOptionsCustomizations=this.configurationService.getValue(f.NotebookSetting.cellEditorOptionsCustomizations)),V&&(K.interactiveWindowCollapseCodeCells=this.configurationService.getValue(f.NotebookSetting.interactiveWindowCollapseCodeCells)),W||R||M){const H=this.configurationService.getValue(f.NotebookSetting.outputLineHeight);K.outputLineHeight=this._computeOutputLineHeight(H,K.outputFontSize)}B&&(K.outputWordWrap=this.configurationService.getValue(f.NotebookSetting.outputWordWrap)),z&&(K.outputScrolling=this.configurationService.getValue(f.NotebookSetting.outputScrolling)),this._layoutConfiguration=Object.freeze(K),this._onDidChangeOptions.fire({cellStatusBarVisibility:p,cellToolbarLocation:c,cellToolbarInteraction:l,compactView:n,focusIndicator:g,insertToolbarPosition:w,insertToolbarAlignment:E,globalToolbar:C,stickyScroll:I,showFoldingControls:k,consolidatedOutputButton:_,consolidatedRunButton:A,dragAndDropEnabled:L,fontSize:R,outputFontSize:M,markupFontSize:N,fontFamily:P,outputFontFamily:x,editorOptionsCustomizations:F,interactiveWindowCollapseCodeCells:V,outputLineHeight:W,outputScrolling:z,outputWordWrap:B})}_computeInsertToolbarPositionOption(d){return d?"hidden":this.configurationService.getValue(f.NotebookSetting.insertToolbarLocation)??"both"}_computeInsertToolbarAlignmentOption(){return this.configurationService.getValue(f.NotebookSetting.experimentalInsertToolbarAlignment)??"center"}_computeShowFoldingControlsOption(){return this.configurationService.getValue(f.NotebookSetting.showFoldingControls)??"mouseover"}_computeFocusIndicatorOption(){return this.configurationService.getValue(f.NotebookSetting.focusIndicator)??"gutter"}getCellCollapseDefault(){return this._layoutConfiguration.interactiveWindowCollapseCodeCells==="never"?{codeCell:{inputCollapsed:!1}}:{codeCell:{inputCollapsed:!0}}}getLayoutConfiguration(){return this._layoutConfiguration}computeCollapsedMarkdownCellHeight(d){const{bottomToolbarGap:p}=this.computeBottomToolbarDimensions(d);return this._layoutConfiguration.markdownCellTopMargin+this._layoutConfiguration.collapsedIndicatorHeight+p+this._layoutConfiguration.markdownCellBottomMargin}computeBottomToolbarOffset(d,p){const{bottomToolbarGap:c,bottomToolbarHeight:l}=this.computeBottomToolbarDimensions(p);return d-c-l/2}computeCodeCellEditorWidth(d){return d-(this._layoutConfiguration.codeCellLeftMargin+this._layoutConfiguration.cellRunGutter+this._layoutConfiguration.cellRightMargin)}computeMarkdownCellEditorWidth(d){return d-this._layoutConfiguration.markdownCellGutter-this._layoutConfiguration.markdownCellLeftMargin-this._layoutConfiguration.cellRightMargin}computeStatusBarHeight(){return this._layoutConfiguration.cellStatusBarHeight}_computeBottomToolbarDimensions(d,p,c,l){return c==="left"||l!=="hidden"?{bottomToolbarGap:18,bottomToolbarHeight:18}:p==="betweenCells"||p==="both"?d?{bottomToolbarGap:12,bottomToolbarHeight:20}:{bottomToolbarGap:20,bottomToolbarHeight:20}:{bottomToolbarGap:0,bottomToolbarHeight:0}}computeBottomToolbarDimensions(d){const p=this._layoutConfiguration,c=this.computeCellToolbarLocation(d),{bottomToolbarGap:l,bottomToolbarHeight:n}=this._computeBottomToolbarDimensions(p.compactView,p.insertToolbarPosition,p.insertToolbarAlignment,c);return{bottomToolbarGap:l,bottomToolbarHeight:n}}computeCellToolbarLocation(d){const p=this._layoutConfiguration.cellToolbarLocation;if(typeof p=="string"){if(p==="left"||p==="right"||p==="hidden")return p}else if(d){const c=p[d]??p.default;let l="right";switch(c){case"left":l="left";break;case"right":l="right";break;case"hidden":l="hidden";break;default:l="right";break}return l}return"right"}computeTopInsertToolbarHeight(d){if(this._layoutConfiguration.insertToolbarPosition==="betweenCells"||this._layoutConfiguration.insertToolbarPosition==="both")return v;const p=this.computeCellToolbarLocation(d);return p==="left"||p==="right"?v:0}computeEditorPadding(d,p){return{top:r(),bottom:this.statusBarIsVisible(d,p)?this._layoutConfiguration.editorBottomPadding:this._layoutConfiguration.editorBottomPaddingWithoutStatusBar}}computeEditorStatusbarHeight(d,p){return this.statusBarIsVisible(d,p)?this.computeStatusBarHeight():0}statusBarIsVisible(d,p){const c=this.notebookExecutionStateService.getCellExecution(p);return this._layoutConfiguration.showCellStatusBar==="visible"?!0:this._layoutConfiguration.showCellStatusBar==="visibleAfterExecute"?typeof d.lastRunSuccess=="boolean"||c!==void 0:!1}computeWebviewOptions(){return{outputNodePadding:this._layoutConfiguration.cellOutputPadding,outputNodeLeftPadding:this._layoutConfiguration.cellOutputPadding,previewNodePadding:this._layoutConfiguration.markdownPreviewPadding,markdownLeftMargin:this._layoutConfiguration.markdownCellGutter+this._layoutConfiguration.markdownCellLeftMargin,leftMargin:this._layoutConfiguration.codeCellLeftMargin,rightMargin:this._layoutConfiguration.cellRightMargin,runGutter:this._layoutConfiguration.cellRunGutter,dragAndDropEnabled:this._layoutConfiguration.dragAndDropEnabled,fontSize:this._layoutConfiguration.fontSize,outputFontSize:this._layoutConfiguration.outputFontSize,outputFontFamily:this._layoutConfiguration.outputFontFamily,markupFontSize:this._layoutConfiguration.markupFontSize,outputLineHeight:this._layoutConfiguration.outputLineHeight,outputScrolling:this._layoutConfiguration.outputScrolling,outputWordWrap:this._layoutConfiguration.outputWordWrap,outputLineLimit:this._layoutConfiguration.outputLineLimit}}computeDiffWebviewOptions(){return{outputNodePadding:this._layoutConfiguration.cellOutputPadding,outputNodeLeftPadding:0,previewNodePadding:this._layoutConfiguration.markdownPreviewPadding,markdownLeftMargin:0,leftMargin:32,rightMargin:0,runGutter:0,dragAndDropEnabled:!1,fontSize:this._layoutConfiguration.fontSize,outputFontSize:this._layoutConfiguration.outputFontSize,outputFontFamily:this._layoutConfiguration.outputFontFamily,markupFontSize:this._layoutConfiguration.markupFontSize,outputLineHeight:this._layoutConfiguration.outputLineHeight,outputScrolling:this._layoutConfiguration.outputScrolling,outputWordWrap:this._layoutConfiguration.outputWordWrap,outputLineLimit:this._layoutConfiguration.outputLineLimit}}computeIndicatorPosition(d,p,c){const{bottomToolbarGap:l}=this.computeBottomToolbarDimensions(c);return{bottomIndicatorTop:d-l-this._layoutConfiguration.cellBottomMargin-p,verticalIndicatorHeight:d-l-p}}}e.NotebookOptions=o}),define(Q[3582],Y([1,0,7,140,244,71]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellFocusIndicator=void 0;class T extends b.CellContentPart{constructor(v,m,S,h,a,r){super(),this.notebookEditor=v,this.titleToolbar=m,this.top=S,this.left=h,this.right=a,this.bottom=r,this.codeFocusIndicator=new y.FastDomNode(t.append(this.left.domNode,t.$(".codeOutput-focus-indicator-container",void 0,t.$(".codeOutput-focus-indicator.code-focus-indicator")))),this.outputFocusIndicator=new y.FastDomNode(t.append(this.left.domNode,t.$(".codeOutput-focus-indicator-container",void 0,t.$(".codeOutput-focus-indicator.output-focus-indicator")))),this._register(t.addDisposableListener(this.codeFocusIndicator.domNode,t.EventType.CLICK,()=>{this.currentCell&&(this.currentCell.isInputCollapsed=!this.currentCell.isInputCollapsed)})),this._register(t.addDisposableListener(this.outputFocusIndicator.domNode,t.EventType.CLICK,()=>{this.currentCell&&(this.currentCell.isOutputCollapsed=!this.currentCell.isOutputCollapsed)})),this._register(t.addDisposableListener(this.left.domNode,t.EventType.DBLCLICK,i=>{if(!this.currentCell||!this.notebookEditor.hasModel()||i.target!==this.left.domNode)return;i.offsetY<this.currentCell.layoutInfo.outputContainerOffset?this.currentCell.isInputCollapsed=!this.currentCell.isInputCollapsed:this.currentCell.isOutputCollapsed=!this.currentCell.isOutputCollapsed})),this._register(this.titleToolbar.onDidUpdateActions(()=>{this.updateFocusIndicatorsForTitleMenu()}))}updateInternalLayoutNow(v){if(v.cellKind===D.CellKind.Markup){const m=this.notebookEditor.notebookOptions.computeIndicatorPosition(v.layoutInfo.totalHeight,v.layoutInfo.foldHintHeight,this.notebookEditor.textModel?.viewType);this.bottom.domNode.style.transform=`translateY(${m.bottomIndicatorTop}px)`,this.left.setHeight(m.verticalIndicatorHeight),this.right.setHeight(m.verticalIndicatorHeight),this.codeFocusIndicator.setHeight(m.verticalIndicatorHeight-this.getIndicatorTopMargin()*2)}else{const m=v,S=this.notebookEditor.notebookOptions.getLayoutConfiguration(),h=this.notebookEditor.notebookOptions.computeBottomToolbarDimensions(this.notebookEditor.textModel?.viewType),a=m.layoutInfo.codeIndicatorHeight+m.layoutInfo.outputIndicatorHeight+m.layoutInfo.commentHeight;this.left.setHeight(a),this.right.setHeight(a),this.codeFocusIndicator.setHeight(m.layoutInfo.codeIndicatorHeight),this.outputFocusIndicator.setHeight(Math.max(m.layoutInfo.outputIndicatorHeight-m.viewContext.notebookOptions.getLayoutConfiguration().focusIndicatorGap,0)),this.bottom.domNode.style.transform=`translateY(${m.layoutInfo.totalHeight-h.bottomToolbarGap-S.cellBottomMargin}px)`}this.updateFocusIndicatorsForTitleMenu()}updateFocusIndicatorsForTitleMenu(){this.left.domNode.style.transform=`translateY(${this.getIndicatorTopMargin()}px)`,this.right.domNode.style.transform=`translateY(${this.getIndicatorTopMargin()}px)`}getIndicatorTopMargin(){const v=this.notebookEditor.notebookOptions.getLayoutConfiguration();return this.titleToolbar.hasActions?v.editorToolbarHeight+v.cellTopMargin:v.cellTopMargin}}e.CellFocusIndicator=T}),define(Q[1293],Y([1,0,6,4,71]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellOutputViewModel=void 0;let D=0;class T extends y.Disposable{get model(){return this._outputRawData}get pickedMimeType(){return this._pickedMimeType}set pickedMimeType(v){this._pickedMimeType=v}constructor(v,m,S){super(),this.cellViewModel=v,this._outputRawData=m,this._notebookService=S,this._onDidResetRendererEmitter=this._register(new t.Emitter),this.onDidResetRenderer=this._onDidResetRendererEmitter.event,this.outputHandle=D++}hasMultiMimeType(){if(this._outputRawData.outputs.length<2)return!1;const v=this._outputRawData.outputs[0].mime;return this._outputRawData.outputs.some(m=>m.mime!==v)}resolveMimeTypes(v,m){const S=this._notebookService.getOutputMimeTypeInfo(v,m,this.model),h=S.findIndex(a=>a.rendererId!==b.RENDERER_NOT_AVAILABLE&&a.isTrusted);return[S,Math.max(h,0)]}resetRenderer(){this._pickedMimeType=void 0,this.model.bumpVersion(),this._onDidResetRendererEmitter.fire()}toRawJSON(){return{outputs:this._outputRawData.outputs}}}e.CellOutputViewModel=T}),define(Q[3583],Y([1,0,2844,7,129,4,81,13,9,8,29,71]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.computeContent=e.NotebookStickyScroll=e.NotebookStickyLine=e.ToggleNotebookStickyScroll=void 0;class r extends f.Action2{constructor(){super({id:"notebook.action.toggleNotebookStickyScroll",title:{value:(0,t.localize)(0,null),mnemonicTitle:(0,t.localize)(1,null),original:"Toggle Notebook Sticky Scroll"},category:T.Categories.View,toggled:{condition:m.ContextKeyExpr.equals("config.notebook.stickyScroll.enabled",!0),title:(0,t.localize)(2,null),mnemonicTitle:(0,t.localize)(3,null)},menu:[{id:f.MenuId.CommandPalette},{id:f.MenuId.NotebookStickyScrollContext}]})}async run(d){const p=d.get(v.IConfigurationService),c=!p.getValue("notebook.stickyScroll.enabled");return p.updateValue("notebook.stickyScroll.enabled",c)}}e.ToggleNotebookStickyScroll=r;class i extends D.Disposable{constructor(d,p,c){super(),this.element=d,this.entry=p,this.notebookEditor=c,this._register(y.addDisposableListener(this.element,y.EventType.CLICK,()=>{this.focusCell()}))}focusCell(){this.notebookEditor.focusNotebookCell(this.entry.cell,"container");const d=this.notebookEditor.getAbsoluteTopOfElement(this.entry.cell),p=this.getParentCount();this.notebookEditor.setScrollTop(d-(p+1.1)*22)}getParentCount(){let d=0,p=this.entry;for(;p.parent;)d++,p=p.parent;return d}}e.NotebookStickyLine=i;let s=a=class extends D.Disposable{getDomNode(){return this.domNode}getCurrentStickyHeight(){return this.currentStickyLines.size*22}setCurrentStickyLines(d){this.currentStickyLines=d}constructor(d,p,c,l,n){super(),this.domNode=d,this.notebookEditor=p,this.notebookOutline=c,this.notebookCellList=l,this._contextMenuService=n,this._disposables=new D.DisposableStore,this.currentStickyLines=new Map,this.notebookEditor.notebookOptions.getLayoutConfiguration().stickyScroll&&this.init(),this._register(this.notebookEditor.notebookOptions.onDidChangeOptions(g=>{g.stickyScroll&&this.updateConfig(),g.globalToolbar&&this.setTop()})),this._register(y.addDisposableListener(this.domNode,y.EventType.CONTEXT_MENU,async g=>{this.onContextMenu(g)}))}onContextMenu(d){const p=new b.StandardMouseEvent(d);this._contextMenuService.showContextMenu({menuId:f.MenuId.NotebookStickyScrollContext,getAnchor:()=>p})}updateConfig(){this.notebookEditor.notebookOptions.getLayoutConfiguration().stickyScroll?this.init():(this._disposables.clear(),this.disposeCurrentStickyLines(),y.clearNode(this.domNode),this.updateDisplay())}setTop(){this.notebookEditor.notebookOptions.getLayoutConfiguration().globalToolbar?this.domNode.style.top="26px":this.domNode.style.top="0px"}init(){this.notebookOutline.init(),this.initializeContent(),this._disposables.add(this.notebookOutline.onDidChange(()=>{y.clearNode(this.domNode),this.disposeCurrentStickyLines(),this.updateContent(o(this.domNode,this.notebookEditor,this.notebookCellList,this.notebookOutline.entries))})),this._disposables.add(this.notebookEditor.onDidAttachViewModel(()=>{this.notebookOutline.init(),this.initializeContent()})),this._disposables.add(this.notebookEditor.onDidScroll(()=>{y.clearNode(this.domNode),this.disposeCurrentStickyLines(),this.updateContent(o(this.domNode,this.notebookEditor,this.notebookCellList,this.notebookOutline.entries))}))}static getVisibleOutlineEntry(d,p){let c=0,l=p.length-1,n=-1;for(;c<=l;){const g=Math.floor((c+l)/2);if(p[g].index===d){n=g;break}else p[g].index<d?(n=g,c=g+1):l=g-1}if(n!==-1){const g=p[n],w=[];return g.asFlatList(w),w.find(E=>E.index===d)}}initializeContent(){const d=this.notebookEditor.visibleRanges[0];if(!d)return;y.clearNode(this.domNode);const p=this.notebookEditor.scrollTop;let c,l=0;for(let w=d.start;w<d.end;w++){if(w===0){this.updateDisplay(),this.setCurrentStickyLines(new Map);return}const E=this.notebookEditor.cellAt(w);if(!E)return;const C=this.notebookEditor.cellAt(w+1);if(C&&w+1<d.end){if(C.cellKind===h.CellKind.Markup){l=this.notebookCellList.getCellViewScrollBottom(E);const I=a.getVisibleOutlineEntry(w,this.notebookOutline.entries);if(!I)return;const _=a.computeStickyHeight(I);if(p+_<l){c=I;break}else continue}}else{l=this.notebookEditor.scrollTop+this.notebookEditor.getLayoutInfo().scrollHeight,c=a.getVisibleOutlineEntry(w,this.notebookOutline.entries);break}}const n=Math.floor((l-p)/22);let g=new Map;g=a.renderStickyLines(c?.parent,this.domNode,n,g,this.notebookEditor),this.setCurrentStickyLines(g),this.updateDisplay()}updateContent(d){this.setCurrentStickyLines(d),this.updateDisplay()}updateDisplay(){this.currentStickyLines.size>0?this.domNode.style.display="block":this.domNode.style.display="none",this.setTop()}static computeStickyHeight(d){let p=0;for(d.cell.cellKind===h.CellKind.Markup&&(p+=22);d.parent;)p+=22,d=d.parent;return p}static renderStickyLines(d,p,c,l,n){let g=d;const w=[];for(;g;){if(g.level===7){g=g.parent;continue}const E=a.createStickyElement(g,n);l.set(g,{line:E,rendered:!1}),w.unshift(E),g=g.parent}for(let E=0;E<w.length&&!(E>=c);E++)p.append(w[E].element),l.set(w[E].entry,{line:w[E],rendered:!0});return p.append(y.$("div",{class:"notebook-shadow"})),l}static createStickyElement(d,p){const c=document.createElement("div");return c.classList.add("notebook-sticky-scroll-line"),c.innerText="#".repeat(d.level)+" "+d.label,new i(c,d,p)}disposeCurrentStickyLines(){this.currentStickyLines.forEach(d=>{d.line.dispose()})}dispose(){this._disposables.dispose(),this.disposeCurrentStickyLines(),super.dispose()}};e.NotebookStickyScroll=s,e.NotebookStickyScroll=s=a=fe([O(4,S.IContextMenuService)],s);function o(u,d,p,c){const l=d.scrollTop,n=d.visibleRanges[0];if(!n)return new Map;let g,w=0;for(let E=n.start;E<n.end;E++){const C=d.cellAt(E);if(!C)return new Map;const I=d.cellAt(E+1);if(C.cellKind===h.CellKind.Markup){w=p.getCellViewScrollBottom(C);const _=s.getVisibleOutlineEntry(E,c);if(!_)return new Map;if(!_.parent&&w>l)return new Map}if(I&&E+1<n.end){if(I.cellKind===h.CellKind.Markup){w=p.getCellViewScrollBottom(C);const _=s.getVisibleOutlineEntry(E,c);if(!_)return new Map;const A=s.computeStickyHeight(_);if(l+A<w){const R=Math.floor((w-l)/22);let M=new Map;return M=s.renderStickyLines(_,u,R,M,d),M}let k;for(let R=1;R<n.end-E&&!(d.cellAt(E+R)&&(k=s.getVisibleOutlineEntry(E+R,c),k));R++);const L=s.computeStickyHeight(k);if(w=p.getCellViewScrollTop(k.cell)-10,_?.parent?.parent===k?.parent){const R=Math.floor((w-l)/22)+100;let M=new Map;return M=s.renderStickyLines(k?.parent,u,R,M,d),M}else if(Math.abs(A-L)>22){const R=(w-l)/22;let M=new Map;return M=s.renderStickyLines(_?.parent,u,R,M,d),M}}}else{w=d.getLayoutInfo().scrollHeight,g=s.getVisibleOutlineEntry(E,c);const _=Math.floor((w-l)/22);let A=new Map;return A=s.renderStickyLines(g?.parent,u,_,A,d),A}}return new Map}e.computeContent=o,(0,f.registerAction2)(r)}),define(Q[1294],Y([1,0,6,4,71]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellOutputTextModel=void 0;class D extends y.Disposable{get outputs(){return this._rawOutput.outputs||[]}get metadata(){return this._rawOutput.metadata}get outputId(){return this._rawOutput.outputId}get alternativeOutputId(){return this._alternativeOutputId}get versionId(){return this._versionId}constructor(f){super(),this._rawOutput=f,this._onDidChangeData=this._register(new t.Emitter),this.onDidChangeData=this._onDidChangeData.event,this._versionId=0,this.versionedBufferLengths={},this._alternativeOutputId=this._rawOutput.outputId}replaceData(f){this.versionedBufferLengths={},this._rawOutput=f,this.optimizeOutputItems(),this._versionId=this._versionId+1,this._onDidChangeData.fire()}appendData(f){this.trackBufferLengths(),this._rawOutput.outputs.push(...f),this.optimizeOutputItems(),this._versionId=this._versionId+1,this._onDidChangeData.fire()}trackBufferLengths(){this.outputs.forEach(f=>{(0,b.isTextStreamMime)(f.mime)&&(this.versionedBufferLengths[f.mime]||(this.versionedBufferLengths[f.mime]={}),this.versionedBufferLengths[f.mime][this.versionId]=f.data.byteLength)})}appendedSinceVersion(f,v){const m=this.versionedBufferLengths[v]?.[f],S=this.outputs.find(h=>h.mime===v);if(m&&S)return S.data.slice(m)}optimizeOutputItems(){if(this.outputs.length>1&&this.outputs.every(f=>(0,b.isTextStreamMime)(f.mime))){const f=new Map,v=[];this.outputs.forEach(m=>{let S;f.has(m.mime)?S=f.get(m.mime):(S=[],f.set(m.mime,S),v.push(m.mime)),S.push(m.data.buffer)}),this.outputs.length=0,v.forEach(m=>{const S=(0,b.compressOutputItemStreams)(f.get(m));this.outputs.push({mime:m,data:S.data}),S.didCompression&&(this.versionedBufferLengths={})})}}asDto(){return{metadata:this._rawOutput.metadata,outputs:this._rawOutput.outputs,outputId:this._rawOutput.outputId}}bumpVersion(){this._versionId=this._versionId+1}}e.NotebookCellOutputTextModel=D}),define(Q[612],Y([1,0,6,122,4,59,27,840,841,146,1294]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cloneNotebookCellTextModel=e.NotebookCellTextModel=void 0;class h extends b.Disposable{get outputs(){return this._outputs}get metadata(){return this._metadata}set metadata(s){this._metadata=s,this._hash=null,this._onDidChangeMetadata.fire()}get internalMetadata(){return this._internalMetadata}set internalMetadata(s){const o=this._internalMetadata.lastRunSuccess!==s.lastRunSuccess;s={...s,runStartTimeAdjustment:r(this._internalMetadata,s)},this._internalMetadata=s,this._hash=null,this._onDidChangeInternalMetadata.fire({lastRunSuccessChanged:o})}get language(){return this._language}set language(s){if(this._textModel&&this._textModel.getLanguageId()===this._languageService.getLanguageIdByLanguageName(s)&&this._textModel.getLanguageId()===this._languageService.getLanguageIdByLanguageName(this.language))return;const o=this._languageService.getLanguageIdByLanguageName(s);if(o!==null){if(this._textModel){const u=this._languageService.createById(o);this._textModel.setLanguage(u.languageId)}this._language!==s&&(this._language=s,this._hash=null,this._onDidChangeLanguage.fire(s),this._onDidChangeContent.fire("language"))}}get mime(){return this._mime}set mime(s){this._mime!==s&&(this._mime=s,this._hash=null,this._onDidChangeContent.fire("mime"))}get textBuffer(){if(this._textBuffer)return this._textBuffer;const s=new v.PieceTreeTextBufferBuilder;s.acceptChunk(this._source);const o=s.finish(!0),{textBuffer:u,disposable:d}=o.create(1);return this._textBuffer=u,this._register(d),this._register(this._textBuffer.onDidChangeContent(()=>{this._hash=null,this._textModel||this._onDidChangeContent.fire("content")})),this._textBuffer}get alternativeId(){return this._alternativeId}get textModel(){return this._textModel}set textModel(s){this._textModel!==s&&(this._textModelDisposables.clear(),this._textModel=s,this._textModel&&(this.setRegisteredLanguage(this._languageService,this._textModel.getLanguageId(),this.language),this._textModelDisposables.add(this._textModel.onDidChangeLanguage(o=>this.setRegisteredLanguage(this._languageService,o.newLanguage,this.language))),this._textModelDisposables.add(this._textModel.onWillDispose(()=>this.textModel=void 0)),this._textModelDisposables.add(this._textModel.onDidChangeContent(()=>{this._textModel&&(this._versionId=this._textModel.getVersionId(),this._alternativeId=this._textModel.getAlternativeVersionId()),this._onDidChangeContent.fire("content")})),this._textModel._overwriteVersionId(this._versionId),this._textModel._overwriteAlternativeVersionId(this._versionId)))}setRegisteredLanguage(s,o,u){const d=o===m.PLAINTEXT_LANGUAGE_ID||o==="jupyter";!s.isRegisteredLanguageId(u)&&d?this._onDidChangeLanguage.fire(u):this.language=o}constructor(s,o,u,d,p,c,l,n,g,w,E,C){super(),this.uri=s,this.handle=o,this._source=u,this._language=d,this._mime=p,this.cellKind=c,this.collapseState=w,this.transientOptions=E,this._languageService=C,this._onDidChangeOutputs=this._register(new t.Emitter),this.onDidChangeOutputs=this._onDidChangeOutputs.event,this._onDidChangeOutputItems=this._register(new t.Emitter),this.onDidChangeOutputItems=this._onDidChangeOutputItems.event,this._onDidChangeContent=this._register(new t.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidChangeMetadata=this._register(new t.Emitter),this.onDidChangeMetadata=this._onDidChangeMetadata.event,this._onDidChangeInternalMetadata=this._register(new t.Emitter),this.onDidChangeInternalMetadata=this._onDidChangeInternalMetadata.event,this._onDidChangeLanguage=this._register(new t.Emitter),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._textBufferHash=null,this._hash=null,this._versionId=1,this._alternativeId=1,this._textModelDisposables=this._register(new b.DisposableStore),this._textModel=void 0,this._outputs=l.map(I=>new S.NotebookCellOutputTextModel(I)),this._metadata=n??{},this._internalMetadata=g??{}}resetTextBuffer(s){this._textBuffer=s}getValue(){const s=this.getFullModelRange();return this.textBuffer.getEOL()===` `?this.textBuffer.getValueInRange(s,1):this.textBuffer.getValueInRange(s,2)}getTextBufferHash(){if(this._textBufferHash!==null)return this._textBufferHash;const s=new y.StringSHA1,o=this.textBuffer.createSnapshot(!1);let u;for(;u=o.read();)s.update(u);return this._textBufferHash=s.digest(),this._textBufferHash}getHashValue(){return this._hash!==null?this._hash:(this._hash=(0,y.hash)([(0,y.hash)(this.language),this.getTextBufferHash(),this._getPersisentMetadata(),this.transientOptions.transientOutputs?[]:this._outputs.map(s=>({outputs:s.outputs.map(o=>({mime:o.mime,data:Array.from(o.data.buffer)})),metadata:s.metadata}))]),this._hash)}_getPersisentMetadata(){const s={},o=this.transientOptions.transientCellMetadata,u=new Set([...Object.keys(this.metadata)]);for(const d of u)o[d]||(s[d]=this.metadata[d]);return s}getTextLength(){return this.textBuffer.getLength()}getFullModelRange(){const s=this.textBuffer.getLineCount();return new T.Range(1,1,s,this.textBuffer.getLineLength(s)+1)}spliceNotebookCellOutputs(s){if(s.deleteCount>0&&s.newOutputs.length>0){const o=Math.min(s.deleteCount,s.newOutputs.length);for(let u=0;u<o;u++){const d=this.outputs[s.start+u],p=s.newOutputs[u];this.replaceOutput(d.outputId,p)}this.outputs.splice(s.start+o,s.deleteCount-o,...s.newOutputs.slice(o)),this._onDidChangeOutputs.fire({start:s.start+o,deleteCount:s.deleteCount-o,newOutputs:s.newOutputs.slice(o)})}else this.outputs.splice(s.start,s.deleteCount,...s.newOutputs),this._onDidChangeOutputs.fire(s)}replaceOutput(s,o){const u=this.outputs.findIndex(p=>p.outputId===s);return u<0?!1:(this.outputs[u].replaceData(o),this._onDidChangeOutputItems.fire(),!0)}changeOutputItems(s,o,u){const d=this.outputs.findIndex(c=>c.outputId===s);if(d<0)return!1;const p=this.outputs[d];return o?p.appendData(u):p.replaceData({outputId:s,outputs:u,metadata:p.metadata}),this._onDidChangeOutputItems.fire(),!0}_outputNotEqualFastCheck(s,o){if(s.length!==o.length)return!1;for(let u=0;u<this.outputs.length;u++){const d=s[u],p=o[u];if(d.outputs.length!==p.outputs.length)return!1;for(let c=0;c<d.outputs.length;c++)if(d.outputs[c].mime!==p.outputs[c].mime||d.outputs[c].data.byteLength!==p.outputs[c].data.byteLength)return!1}return!0}equal(s){return this.language!==s.language||this.getTextLength()!==s.getTextLength()||!this.transientOptions.transientOutputs&&!this._outputNotEqualFastCheck(this.outputs,s.outputs)?!1:this.getHashValue()===s.getHashValue()}fastEqual(s){return this.language!==s.language||this.mime!==s.mime||this.cellKind!==s.cellKind||this.internalMetadata?.executionOrder!==s.internalMetadata?.executionOrder||this.internalMetadata?.lastRunSuccess!==s.internalMetadata?.lastRunSuccess||this.internalMetadata?.runStartTime!==s.internalMetadata?.runStartTime||this.internalMetadata?.runStartTimeAdjustment!==s.internalMetadata?.runStartTimeAdjustment||this.internalMetadata?.runEndTime!==s.internalMetadata?.runEndTime||this._textBuffer&&this.getValue()!==s.source?!1:this._source===s.source}dispose(){(0,b.dispose)(this._outputs);const s=new f.PieceTreeTextBuffer([],"",` `,!1,!1,!0,!0);s.dispose(),this._textBuffer=s,super.dispose()}}e.NotebookCellTextModel=h;function a(i){return{source:i.getValue(),language:i.language,mime:i.mime,cellKind:i.cellKind,outputs:i.outputs.map(s=>({outputs:s.outputs,outputId:D.generateUuid()})),metadata:{}}}e.cloneNotebookCellTextModel=a;function r(i,s){if(i.runStartTime!==s.runStartTime&&typeof s.runStartTime=="number"){const o=Date.now()-s.runStartTime;return o<0?Math.abs(o):0}else return s.runStartTimeAdjustment}}),define(Q[3584],Y([1,0,6,4,612,71,189,3566,482,122,1294,57,22,26,50,98,17]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookTextModel=void 0;class d{constructor(w,E,C,I,_,A,k){this.textModel=w,this.label=E,this.undoRedoGroup=C,this._pauseableEmitter=I,this._postUndoRedo=_,this.code="undoredo.notebooks.stackOperation",this._operations=[],this._beginSelectionState=void 0,this._resultSelectionState=void 0,this.type=1,this._beginSelectionState=A,this._beginAlternativeVersionId=k,this._resultAlternativeVersionId=k}get resources(){return[this.textModel.uri]}get isEmpty(){return this._operations.length===0}pushEndState(w,E){this._resultAlternativeVersionId=w,this._resultSelectionState=E}pushEditOperation(w,E,C){this._operations.length===0&&(this._beginSelectionState=this._beginSelectionState??E),this._operations.push(w),this._resultSelectionState=C}async undo(){this._pauseableEmitter.pause();for(let w=this._operations.length-1;w>=0;w--)await this._operations[w].undo();this._postUndoRedo(this._beginAlternativeVersionId),this._pauseableEmitter.fire({rawEvents:[],synchronous:void 0,versionId:this.textModel.versionId,endSelectionState:this._beginSelectionState}),this._pauseableEmitter.resume()}async redo(){this._pauseableEmitter.pause();for(let w=0;w<this._operations.length;w++)await this._operations[w].redo();this._postUndoRedo(this._resultAlternativeVersionId),this._pauseableEmitter.fire({rawEvents:[],synchronous:void 0,versionId:this.textModel.versionId,endSelectionState:this._resultSelectionState}),this._pauseableEmitter.resume()}}class p{constructor(w,E,C,I){this._textModel=w,this._undoService=E,this._pauseableEmitter=C,this._postUndoRedo=I,this._pendingStackOperation=null}isUndoStackEmpty(){return this._pendingStackOperation===null||this._pendingStackOperation.isEmpty}pushStackElement(w,E,C,I){if(this._pendingStackOperation){this._pendingStackOperation.pushEndState(I,E),this._pendingStackOperation.isEmpty||this._undoService.pushElement(this._pendingStackOperation,this._pendingStackOperation.undoRedoGroup),this._pendingStackOperation=null;return}this._pendingStackOperation=new d(this._textModel,w,C,this._pauseableEmitter,this._postUndoRedo,E,I)}pushEditOperation(w,E,C){if(this._pendingStackOperation){this._pendingStackOperation.pushEditOperation(w,E,C);return}this._undoService.pushElement(w)}}class c extends t.PauseableEmitter{isDirtyEvent(){for(const w of this._eventQueue)for(let E=0;E<w.rawEvents.length;E++)if(!w.rawEvents[E].transient)return!0;return!1}}let l=u=class extends y.Disposable{get length(){return this._cells.length}get cells(){return this._cells}get versionId(){return this._versionId}get alternativeVersionId(){return this._alternativeVersionId}constructor(w,E,C,I,_,A,k,L){super(),this.viewType=w,this.uri=E,this._undoService=A,this._modelService=k,this._languageService=L,this._isDisposed=!1,this._onWillDispose=this._register(new t.Emitter),this._onWillAddRemoveCells=this._register(new t.Emitter),this._onDidChangeContent=this._register(new t.Emitter),this.onWillDispose=this._onWillDispose.event,this.onWillAddRemoveCells=this._onWillAddRemoveCells.event,this.onDidChangeContent=this._onDidChangeContent.event,this._cellhandlePool=0,this._cellListeners=new Map,this._cells=[],this.metadata={},this.transientOptions={transientCellMetadata:{},transientDocumentMetadata:{},transientOutputs:!1,cellContentMetadata:{}},this._versionId=0,this._notebookSpecificAlternativeId=0,this._alternativeVersionId="1",this.transientOptions=_,this.metadata=I,this._initialize(C);const R=M=>{if(M.uri.scheme===a.Schemas.vscodeNotebookCell&&M instanceof s.TextModel){const N=D.CellUri.parse(M.uri);if(N&&(0,r.isEqual)(N.notebook,this.uri)){const P=this._getCellIndexByHandle(N.handle);if(P>=0){const x=this.cells[P];x&&(x.textModel=M)}}}};this._register(k.onModelAdded(M=>R(M))),this._pauseableEmitter=new c({merge:M=>{const N=M[0],P=N.rawEvents;let x=N.versionId,F=N.endSelectionState,V=N.synchronous;for(let W=1;W<M.length;W++)P.push(...M[W].rawEvents),x=M[W].versionId,F=M[W].endSelectionState!==void 0?M[W].endSelectionState:F,V=M[W].synchronous!==void 0?M[W].synchronous:V;return{rawEvents:P,versionId:x,endSelectionState:F,synchronous:V}}}),this._register(this._pauseableEmitter.event(M=>{M.rawEvents.length&&this._onDidChangeContent.fire(M)})),this._operationManager=new p(this,this._undoService,this._pauseableEmitter,M=>{this._increaseVersionId(!0),this._overwriteAlternativeVersionId(M)})}setCellCollapseDefault(w){this._defaultCollapseConfig=w}_initialize(w,E){this._cells=[],this._versionId=0,this._notebookSpecificAlternativeId=0;const C=w.map(I=>{const _=this._cellhandlePool++,A=D.CellUri.generate(this.uri,_),k=this._getDefaultCollapseState(I);return new b.NotebookCellTextModel(A,_,I.source,I.language,I.mime,I.cellKind,I.outputs,I.metadata,I.internalMetadata,k,this.transientOptions,this._languageService)});for(let I=0;I<C.length;I++){const _=C[I].onDidChangeContent(A=>{this._bindCellContentHandler(C[I],A)});this._cellListeners.set(C[I].handle,_)}this._cells.splice(0,0,...C),this._alternativeVersionId=this._generateAlternativeId(),E&&this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.Unknown,transient:!1}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_bindCellContentHandler(w,E){switch(this._increaseVersionId(E==="content"),E){case"content":this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.ChangeCellContent,index:this._getCellIndexByHandle(w.handle),transient:!1}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0});break;case"language":this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.ChangeCellLanguage,index:this._getCellIndexByHandle(w.handle),language:w.language,transient:!1}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0});break;case"mime":this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.ChangeCellMime,index:this._getCellIndexByHandle(w.handle),mime:w.mime,transient:!1}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0});break}}_generateAlternativeId(){return`${this._notebookSpecificAlternativeId}_`+this.cells.map(w=>w.handle+","+w.alternativeId).join(";")}dispose(){this._isDisposed||(this._isDisposed=!0,this._onWillDispose.fire(),this._undoService.removeElements(this.uri),(0,y.dispose)(this._cellListeners.values()),this._cellListeners.clear(),(0,y.dispose)(this._cells),this._cells=[],super.dispose())}pushStackElement(w,E,C){this._operationManager.pushStackElement(w,E,C,this.alternativeVersionId)}_getCellIndexByHandle(w){return this.cells.findIndex(E=>E.handle===w)}_getCellIndexWithOutputIdHandleFromEdits(w,E){const C=E.find(I=>"outputs"in I&&I.outputs.some(_=>_.outputId===w));if(C){if("index"in C)return C.index;if("handle"in C){const I=this._getCellIndexByHandle(C.handle);return this._assertIndex(I),I}}return-1}_getCellIndexWithOutputIdHandle(w){return this.cells.findIndex(E=>!!E.outputs.find(C=>C.outputId===w))}reset(w,E,C){this.transientOptions=C;const I=u.computeEdits(this,w);this.applyEdits([...I,{editType:5,metadata:E}],!0,void 0,()=>{},void 0,!1)}static computeEdits(w,E){const C=[],I=this._commonPrefix(w.cells,w.cells.length,0,E,E.length,0);if(I>0)for(let A=0;A<I;A++)C.push({editType:3,index:A,metadata:E[A].metadata??{}},...this._computeOutputEdit(A,w.cells[A].outputs,E[A].outputs));if(w.cells.length===E.length&&I===w.cells.length)return C;const _=this._commonSuffix(w.cells,w.cells.length-I,I,E,E.length-I,I);if(_>0?C.push({editType:1,index:I,count:w.cells.length-I-_,cells:E.slice(I,E.length-_)}):I>0?C.push({editType:1,index:I,count:w.cells.length-I,cells:E.slice(I)}):C.push({editType:1,index:0,count:w.cells.length,cells:E}),_>0)for(let A=_;A>0;A--)C.push({editType:3,index:w.cells.length-A,metadata:E[E.length-A].metadata??{}},...this._computeOutputEdit(w.cells.length-A,w.cells[w.cells.length-A].outputs,E[E.length-A].outputs));return C}static _computeOutputEdit(w,E,C){return E.length!==C.length?[{editType:2,index:w,outputs:C,append:!1}]:E.length===0?[]:C.map((I,_)=>({editType:7,outputId:E[_].outputId,items:I.outputs,append:!1}))}static _commonPrefix(w,E,C,I,_,A){const k=Math.min(E,_);let L=0;for(let R=0;R<k&&w[C+R].fastEqual(I[A+R]);R++)L++;return L}static _commonSuffix(w,E,C,I,_,A){const k=Math.min(E,_);let L=0;for(let R=0;R<k&&w[C+E-R-1].fastEqual(I[A+_-R-1]);R++)L++;return L}applyEdits(w,E,C,I,_,A){this._pauseableEmitter.pause(),this.pushStackElement("edit",C,_);try{return this._doApplyEdits(w,E,A),!0}finally{const k=I();this._increaseVersionId(this._operationManager.isUndoStackEmpty()&&!this._pauseableEmitter.isDirtyEvent()),this.pushStackElement("edit",k,void 0),this._pauseableEmitter.fire({rawEvents:[],versionId:this.versionId,synchronous:E,endSelectionState:k}),this._pauseableEmitter.resume()}}_doApplyEdits(w,E,C){const I=w.map((k,L)=>{let R=-1;if("index"in k)R=k.index;else if("handle"in k)R=this._getCellIndexByHandle(k.handle),this._assertIndex(R);else if("outputId"in k){if(R=this._getCellIndexWithOutputIdHandle(k.outputId),this._indexIsInvalid(R)&&(R=this._getCellIndexWithOutputIdHandleFromEdits(k.outputId,w.slice(0,L))),this._indexIsInvalid(R))return null}else if(k.editType!==5)throw new Error("Invalid cell edit");return{edit:k,cellIndex:R,end:k.editType===5?void 0:k.editType===1?k.index+k.count:R,originalIndex:L}}).filter(o.isDefined),A=this._mergeCellEdits(I).sort((k,L)=>k.end===void 0||L.end===void 0?-1:L.end-k.end||L.originalIndex-k.originalIndex).reduce((k,L)=>{if(!k.length)k.push([L]);else{const R=k[k.length-1],M=R[0].cellIndex;L.cellIndex===M?R.push(L):k.push([L])}return k},[]).map(k=>{const L=[],R=[];return k.forEach(M=>{M.edit.editType===1?L.push(M):R.push(M)}),[...R.reverse(),...L]}).flat();for(const{edit:k,cellIndex:L}of A)switch(k.editType){case 1:this._replaceCells(k.index,k.count,k.cells,E,C);break;case 2:{this._assertIndex(L);const R=this._cells[L];k.append?this._spliceNotebookCellOutputs(R,{start:R.outputs.length,deleteCount:0,newOutputs:k.outputs.map(M=>new S.NotebookCellOutputTextModel(M))},!0,C):this._spliceNotebookCellOutputs2(R,k.outputs.map(M=>new S.NotebookCellOutputTextModel(M)),C);break}case 7:{this._assertIndex(L);const R=this._cells[L];k.append?this._appendNotebookCellOutputItems(R,k.outputId,k.items):this._replaceNotebookCellOutputItems(R,k.outputId,k.items)}break;case 3:this._assertIndex(k.index),this._changeCellMetadata(this._cells[k.index],k.metadata,C);break;case 8:this._assertIndex(L),this._changeCellMetadataPartial(this._cells[L],k.metadata,C);break;case 9:this._assertIndex(L),this._changeCellInternalMetadataPartial(this._cells[L],k.internalMetadata);break;case 4:this._assertIndex(k.index),this._changeCellLanguage(this._cells[k.index],k.language,C);break;case 5:this._updateNotebookMetadata(k.metadata,C);break;case 6:this._moveCellToIdx(k.index,k.length,k.newIdx,E,C,void 0,void 0);break}}_mergeCellEdits(w){const E=[];return w.forEach(C=>{if(E.length){const I=E[E.length-1];I.edit.editType===2&&I.edit.append&&C.edit.editType===2&&C.edit.append&&I.cellIndex===C.cellIndex?I.edit.outputs=[...I.edit.outputs,...C.edit.outputs]:I.edit.editType===2&&!I.edit.append&&I.edit.outputs.length===0&&C.edit.editType===2&&C.edit.append&&I.cellIndex===C.cellIndex?(I.edit.append=!1,I.edit.outputs=C.edit.outputs):E.push(C)}else E.push(C)}),E}_getDefaultCollapseState(w){const E=w.cellKind===D.CellKind.Code?this._defaultCollapseConfig?.codeCell:this._defaultCollapseConfig?.markupCell;return w.collapseState??E??void 0}_replaceCells(w,E,C,I,_){if(E===0&&C.length===0)return;const A=this._cells.slice(0),k=new Set;A.forEach(P=>{k.add(P.handle)});for(let P=w;P<Math.min(w+E,this._cells.length);P++){const x=this._cells[P];this._cellListeners.get(x.handle)?.dispose(),this._cellListeners.delete(x.handle)}const L=C.map(P=>{const x=this._cellhandlePool++,F=D.CellUri.generate(this.uri,x),V=this._getDefaultCollapseState(P),W=new b.NotebookCellTextModel(F,x,P.source,P.language,P.mime,P.cellKind,P.outputs||[],P.metadata,P.internalMetadata,V,this.transientOptions,this._languageService),z=this._modelService.getModel(F);z&&z instanceof s.TextModel&&(W.textModel=z,W.language=P.language,W.textModel.setValue(P.source),W.resetTextBuffer(W.textModel.getTextBuffer()));const B=W.onDidChangeContent(K=>{this._bindCellContentHandler(W,K)});return this._cellListeners.set(W.handle,B),W}),R=this._cells.slice(0);R.splice(w,E,...L);const M=(0,D.diff)(this._cells,R,P=>k.has(P.handle)).map(P=>[P.start,P.deleteCount,P.toInsert]);this._onWillAddRemoveCells.fire({rawEvent:{kind:D.NotebookCellsChangeType.ModelChange,changes:M}}),this._cells=R;const N=M.map(P=>{const x=A.slice(P[0],P[0]+P[1]);return[P[0],x,P[2]]});_&&this._operationManager.pushEditOperation(new f.SpliceCellsEdit(this.uri,N,{insertCell:(P,x,F)=>{this._insertNewCell(P,[x],!0,F)},deleteCell:(P,x)=>{this._removeCell(P,1,!0,x)},replaceCell:(P,x,F,V)=>{this._replaceNewCells(P,x,F,!0,V)}},void 0,void 0),void 0,void 0),this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.ModelChange,changes:M,transient:!1}],versionId:this.versionId,synchronous:I,endSelectionState:void 0})}_increaseVersionId(w){this._versionId=this._versionId+1,w||(this._notebookSpecificAlternativeId=this._versionId),this._alternativeVersionId=this._generateAlternativeId()}_overwriteAlternativeVersionId(w){this._alternativeVersionId=w,this._notebookSpecificAlternativeId=Number(w.substring(0,w.indexOf("_")))}_updateNotebookMetadata(w,E){const C=this.metadata,I=this._isDocumentMetadataChanged(this.metadata,w);if(I&&E){const _=this;this._operationManager.pushEditOperation(new class{constructor(){this.type=0,this.label="Update Notebook Metadata",this.code="undoredo.notebooks.updateCellMetadata"}get resource(){return _.uri}undo(){_._updateNotebookMetadata(C,!1)}redo(){_._updateNotebookMetadata(w,!1)}},void 0,void 0)}this.metadata=w,this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.ChangeDocumentMetadata,metadata:this.metadata,transient:!I}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_insertNewCell(w,E,C,I){for(let A=0;A<E.length;A++){const k=E[A].onDidChangeContent(L=>{this._bindCellContentHandler(E[A],L)});this._cellListeners.set(E[A].handle,k)}const _=[[w,0,E]];this._onWillAddRemoveCells.fire({rawEvent:{kind:D.NotebookCellsChangeType.ModelChange,changes:_}}),this._cells.splice(w,0,...E),this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.ModelChange,changes:_,transient:!1}],versionId:this.versionId,synchronous:C,endSelectionState:I})}_removeCell(w,E,C,I){for(let A=w;A<w+E;A++){const k=this._cells[A];this._cellListeners.get(k.handle)?.dispose(),this._cellListeners.delete(k.handle)}const _=[[w,E,[]]];this._onWillAddRemoveCells.fire({rawEvent:{kind:D.NotebookCellsChangeType.ModelChange,changes:_}}),this._cells.splice(w,E),this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.ModelChange,changes:_,transient:!1}],versionId:this.versionId,synchronous:C,endSelectionState:I})}_replaceNewCells(w,E,C,I,_){for(let k=w;k<w+E;k++){const L=this._cells[k];this._cellListeners.get(L.handle)?.dispose(),this._cellListeners.delete(L.handle)}for(let k=0;k<C.length;k++){const L=C[k].onDidChangeContent(R=>{this._bindCellContentHandler(C[k],R)});this._cellListeners.set(C[k].handle,L)}const A=[[w,E,C]];this._onWillAddRemoveCells.fire({rawEvent:{kind:D.NotebookCellsChangeType.ModelChange,changes:A}}),this._cells.splice(w,E,...C),this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.ModelChange,changes:A,transient:!1}],versionId:this.versionId,synchronous:I,endSelectionState:_})}_isDocumentMetadataChanged(w,E){const C=new Set([...Object.keys(w||{}),...Object.keys(E||{})]);for(const I of C)if(I==="custom"){if(!this._customMetadataEqual(w[I],E[I])&&!this.transientOptions.transientDocumentMetadata[I])return!0}else if(w[I]!==E[I]&&!this.transientOptions.transientDocumentMetadata[I])return!0;return!1}_isCellMetadataChanged(w,E){const C=new Set([...Object.keys(w||{}),...Object.keys(E||{})]);for(const I of C)if(w[I]!==E[I]&&!this.transientOptions.transientCellMetadata[I])return!0;return!1}_customMetadataEqual(w,E){if(!w&&!E)return!0;if(!w||!E)return!1;const C=Object.getOwnPropertyNames(w),I=Object.getOwnPropertyNames(E);if(C.length!==I.length)return!1;for(let _=0;_<C.length;_++){const A=C[_];if(w[A]!==E[A])return!1}return!0}_changeCellMetadataPartial(w,E,C){const I={...w.metadata};let _;for(_ in E){const A=E[_]??void 0;I[_]=A}return this._changeCellMetadata(w,I,C)}_changeCellMetadata(w,E,C){const I=this._isCellMetadataChanged(w.metadata,E);if(I&&C){const _=this._cells.indexOf(w);this._operationManager.pushEditOperation(new f.CellMetadataEdit(this.uri,_,Object.freeze(w.metadata),Object.freeze(E),{updateCellMetadata:(A,k)=>{const L=this._cells[A];L&&this._changeCellMetadata(L,k,!1)}}),void 0,void 0)}w.metadata=E,this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.ChangeCellMetadata,index:this._cells.indexOf(w),metadata:w.metadata,transient:!I}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_changeCellInternalMetadataPartial(w,E){const C={...w.internalMetadata};let I;for(I in E){const _=E[I]??void 0;C[I]=_}w.internalMetadata=C,this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.ChangeCellInternalMetadata,index:this._cells.indexOf(w),internalMetadata:w.internalMetadata,transient:!0}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_changeCellLanguage(w,E,C){if(w.language===E)return;const I=w.language;if(w.language=E,C){const _=this;this._operationManager.pushEditOperation(new class{constructor(){this.type=0,this.label="Update Cell Language",this.code="undoredo.notebooks.updateCellLanguage"}get resource(){return _.uri}undo(){_._changeCellLanguage(w,I,!1)}redo(){_._changeCellLanguage(w,E,!1)}},void 0,void 0)}this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.ChangeCellLanguage,index:this._cells.indexOf(w),language:E,transient:!1}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_spliceNotebookCellOutputs2(w,E,C){if(E.length===0&&w.outputs.length===0)return;if(E.length<=1){this._spliceNotebookCellOutputs(w,{start:0,deleteCount:w.outputs.length,newOutputs:E},!1,C);return}new v.LcsDiff(new n(w.outputs),new n(E)).ComputeDiff(!1).changes.map(k=>({start:k.originalStart,deleteCount:k.originalLength,newOutputs:E.slice(k.modifiedStart,k.modifiedStart+k.modifiedLength)})).reverse().forEach(k=>{this._spliceNotebookCellOutputs(w,k,!1,C)})}_spliceNotebookCellOutputs(w,E,C,I){w.spliceNotebookCellOutputs(E),this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.Output,index:this._cells.indexOf(w),outputs:w.outputs.map(_=>_.asDto())??[],append:C,transient:this.transientOptions.transientOutputs}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_appendNotebookCellOutputItems(w,E,C){w.changeOutputItems(E,!0,C)&&this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.OutputItem,index:this._cells.indexOf(w),outputId:E,outputItems:C,append:!0,transient:this.transientOptions.transientOutputs}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_replaceNotebookCellOutputItems(w,E,C){w.changeOutputItems(E,!1,C)&&this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.OutputItem,index:this._cells.indexOf(w),outputId:E,outputItems:C,append:!1,transient:this.transientOptions.transientOutputs}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_moveCellToIdx(w,E,C,I,_,A,k){_&&this._operationManager.pushEditOperation(new f.MoveCellEdit(this.uri,w,E,C,{moveCell:(R,M,N,P,x)=>{this._moveCellToIdx(R,M,N,!0,!1,P,x)}},A,k),A,k),this._assertIndex(w),this._assertIndex(C);const L=this._cells.splice(w,E);return this._cells.splice(C,0,...L),this._pauseableEmitter.fire({rawEvents:[{kind:D.NotebookCellsChangeType.Move,index:w,length:E,newIdx:C,cells:L,transient:!1}],versionId:this.versionId,synchronous:I,endSelectionState:k}),!0}_assertIndex(w){if(this._indexIsInvalid(w))throw new Error(`model index out of range ${w}`)}_indexIsInvalid(w){return w<0||w>=this._cells.length}};e.NotebookTextModel=l,e.NotebookTextModel=l=u=fe([O(5,T.IUndoRedoService),O(6,h.IModelService),O(7,i.ILanguageService)],l);class n{constructor(w){this.outputs=w}getElements(){return this.outputs.map(w=>(0,m.hash)(w.outputs.map(E=>({mime:E.mime,data:E.data}))))}}}),define(Q[176],Y([1,0,8,71]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NOTEBOOK_HAS_OUTPUTS=e.NOTEBOOK_MISSING_KERNEL_EXTENSION=e.NOTEBOOK_INTERRUPTIBLE_KERNEL=e.NOTEBOOK_KERNEL_SELECTED=e.NOTEBOOK_KERNEL_SOURCE_COUNT=e.NOTEBOOK_KERNEL_COUNT=e.NOTEBOOK_KERNEL=e.NOTEBOOK_CELL_RESOURCE=e.NOTEBOOK_CELL_OUTPUT_COLLAPSED=e.NOTEBOOK_CELL_INPUT_COLLAPSED=e.NOTEBOOK_CELL_HAS_OUTPUTS=e.NOTEBOOK_CELL_EXECUTING=e.NOTEBOOK_CELL_EXECUTION_STATE=e.NOTEBOOK_CELL_LINE_NUMBERS=e.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE=e.NOTEBOOK_CELL_EDITOR_FOCUSED=e.NOTEBOOK_CELL_FOCUSED=e.NOTEBOOK_CELL_EDITABLE=e.NOTEBOOK_CELL_TYPE=e.NOTEBOOK_VIEW_TYPE=e.NOTEBOOK_LAST_CELL_FAILED=e.NOTEBOOK_CURSOR_NAVIGATION_MODE=e.NOTEBOOK_CELL_TOOLBAR_LOCATION=e.NOTEBOOK_BREAKPOINT_MARGIN_ACTIVE=e.NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON=e.NOTEBOOK_HAS_SOMETHING_RUNNING=e.NOTEBOOK_HAS_RUNNING_CELL=e.NOTEBOOK_EDITOR_EDITABLE=e.NOTEBOOK_OUPTUT_INPUT_FOCUSED=e.NOTEBOOK_OUTPUT_FOCUSED=e.NOTEBOOK_CELL_LIST_FOCUSED=e.NOTEBOOK_EDITOR_FOCUSED=e.INTERACTIVE_WINDOW_IS_ACTIVE_EDITOR=e.NOTEBOOK_IS_ACTIVE_EDITOR=e.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED=e.HAS_OPENED_NOTEBOOK=void 0,e.HAS_OPENED_NOTEBOOK=new t.RawContextKey("userHasOpenedNotebook",!1),e.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED=new t.RawContextKey("notebookFindWidgetFocused",!1),e.NOTEBOOK_IS_ACTIVE_EDITOR=t.ContextKeyExpr.equals("activeEditor",y.NOTEBOOK_EDITOR_ID),e.INTERACTIVE_WINDOW_IS_ACTIVE_EDITOR=t.ContextKeyExpr.equals("activeEditor",y.INTERACTIVE_WINDOW_EDITOR_ID),e.NOTEBOOK_EDITOR_FOCUSED=new t.RawContextKey("notebookEditorFocused",!1),e.NOTEBOOK_CELL_LIST_FOCUSED=new t.RawContextKey("notebookCellListFocused",!1),e.NOTEBOOK_OUTPUT_FOCUSED=new t.RawContextKey("notebookOutputFocused",!1),e.NOTEBOOK_OUPTUT_INPUT_FOCUSED=new t.RawContextKey("notebookOutputInputFocused",!1),e.NOTEBOOK_EDITOR_EDITABLE=new t.RawContextKey("notebookEditable",!0),e.NOTEBOOK_HAS_RUNNING_CELL=new t.RawContextKey("notebookHasRunningCell",!1),e.NOTEBOOK_HAS_SOMETHING_RUNNING=new t.RawContextKey("notebookHasSomethingRunning",!1),e.NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON=new t.RawContextKey("notebookUseConsolidatedOutputButton",!1),e.NOTEBOOK_BREAKPOINT_MARGIN_ACTIVE=new t.RawContextKey("notebookBreakpointMargin",!1),e.NOTEBOOK_CELL_TOOLBAR_LOCATION=new t.RawContextKey("notebookCellToolbarLocation","left"),e.NOTEBOOK_CURSOR_NAVIGATION_MODE=new t.RawContextKey("notebookCursorNavigationMode",!1),e.NOTEBOOK_LAST_CELL_FAILED=new t.RawContextKey("notebookLastCellFailed",!1),e.NOTEBOOK_VIEW_TYPE=new t.RawContextKey("notebookType",void 0),e.NOTEBOOK_CELL_TYPE=new t.RawContextKey("notebookCellType",void 0),e.NOTEBOOK_CELL_EDITABLE=new t.RawContextKey("notebookCellEditable",!1),e.NOTEBOOK_CELL_FOCUSED=new t.RawContextKey("notebookCellFocused",!1),e.NOTEBOOK_CELL_EDITOR_FOCUSED=new t.RawContextKey("notebookCellEditorFocused",!1),e.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE=new t.RawContextKey("notebookCellMarkdownEditMode",!1),e.NOTEBOOK_CELL_LINE_NUMBERS=new t.RawContextKey("notebookCellLineNumbers","inherit"),e.NOTEBOOK_CELL_EXECUTION_STATE=new t.RawContextKey("notebookCellExecutionState",void 0),e.NOTEBOOK_CELL_EXECUTING=new t.RawContextKey("notebookCellExecuting",!1),e.NOTEBOOK_CELL_HAS_OUTPUTS=new t.RawContextKey("notebookCellHasOutputs",!1),e.NOTEBOOK_CELL_INPUT_COLLAPSED=new t.RawContextKey("notebookCellInputIsCollapsed",!1),e.NOTEBOOK_CELL_OUTPUT_COLLAPSED=new t.RawContextKey("notebookCellOutputIsCollapsed",!1),e.NOTEBOOK_CELL_RESOURCE=new t.RawContextKey("notebookCellResource",""),e.NOTEBOOK_KERNEL=new t.RawContextKey("notebookKernel",void 0),e.NOTEBOOK_KERNEL_COUNT=new t.RawContextKey("notebookKernelCount",0),e.NOTEBOOK_KERNEL_SOURCE_COUNT=new t.RawContextKey("notebookKernelSourceCount",0),e.NOTEBOOK_KERNEL_SELECTED=new t.RawContextKey("notebookKernelSelected",!1),e.NOTEBOOK_INTERRUPTIBLE_KERNEL=new t.RawContextKey("notebookInterruptibleKernel",!1),e.NOTEBOOK_MISSING_KERNEL_EXTENSION=new t.RawContextKey("notebookMissingKernelExtension",!1),e.NOTEBOOK_HAS_OUTPUTS=new t.RawContextKey("notebookHasOutputs",!1)}),define(Q[3585],Y([1,0,344,34,4,73,2837,715,88,13,171,29,5,38,244,1283,176]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeCellExecutionContextKeyService=e.RunToolbar=void 0;let u=class extends i.CellContentPart{constructor(c,l,n,g,w,E,C,I){super(),this.notebookEditor=c,this.contextKeyService=l,this.cellContainer=n,this.runButtonContainer=g,this.keybindingService=E,this.contextMenuService=C,this.instantiationService=I,this.primaryMenu=this._register(w.createMenu(this.notebookEditor.creationOptions.menuIds.cellExecutePrimary,l)),this.secondaryMenu=this._register(w.createMenu(this.notebookEditor.creationOptions.menuIds.cellExecuteToolbar,l)),this.createRunCellToolbar(g,n,l);const _=()=>{const k=this.getCellToolbarActions(this.primaryMenu).primary[0];this.toolbar.setActions(k?[k]:[])};_(),this._register(this.primaryMenu.onDidChange(_)),this._register(this.secondaryMenu.onDidChange(_)),this._register(this.notebookEditor.notebookOptions.onDidChangeOptions(_))}didRenderCell(c){this.cellDisposables.add((0,s.registerCellToolbarStickyScroll)(this.notebookEditor,c,this.runButtonContainer)),this.toolbar.context={ui:!0,cell:c,notebookEditor:this.notebookEditor,$mid:13}}getCellToolbarActions(c){const g={primary:[],secondary:[]};return(0,v.createAndFillInActionBarActions)(c,{shouldForwardArgs:!0},g,w=>/^inline/.test(w)),g}createRunCellToolbar(c,l,n){const g=this._register(new b.DisposableStore),w=this._register(new y.Action("notebook.moreRunActions",(0,T.localize)(0,null),"codicon-chevron-down",!0)),E=I=>this.keybindingService.lookupKeybinding(I.id,C),C=this._register(d(n));this.toolbar=this._register(new t.ToolBar(c,this.contextMenuService,{getKeyBinding:E,actionViewItemProvider:I=>{g.clear();const _=this.getCellToolbarActions(this.primaryMenu).primary[0];if(!(_ instanceof m.MenuItemAction))return;const A=this.getCellToolbarActions(this.secondaryMenu).secondary;if(!A.length)return;const k=this.instantiationService.createInstance(f.DropdownWithPrimaryActionViewItem,_,w,A,"notebook-cell-run-toolbar",this.contextMenuService,{getKeyBinding:E});return g.add(k.onDidChangeDropdownVisibility(L=>{l.classList.toggle("cell-run-toolbar-dropdown-active",L)})),k},renderDropdownAsChildElement:!0}))}};e.RunToolbar=u,e.RunToolbar=u=fe([O(4,m.IMenuService),O(5,r.IKeybindingService),O(6,h.IContextMenuService),O(7,a.IInstantiationService)],u);function d(p){const c=p.createScoped(document.createElement("div"));return S.InputFocusedContext.bindTo(c).set(!0),D.EditorContextKeys.editorTextFocus.bindTo(c).set(!0),D.EditorContextKeys.focus.bindTo(c).set(!0),D.EditorContextKeys.textInputFocus.bindTo(c).set(!0),o.NOTEBOOK_CELL_EXECUTION_STATE.bindTo(c).set("idle"),o.NOTEBOOK_CELL_LIST_FOCUSED.bindTo(c).set(!0),o.NOTEBOOK_EDITOR_FOCUSED.bindTo(c).set(!0),o.NOTEBOOK_CELL_TYPE.bindTo(c).set("code"),c}e.getCodeCellExecutionContextKeyService=d}),define(Q[530],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookEditorModelResolverService=void 0,e.INotebookEditorModelResolverService=(0,t.createDecorator)("INotebookModelResolverService")}),define(Q[613],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookExecutionService=e.CellExecutionUpdateType=void 0;var y;(function(b){b[b.Output=1]="Output",b[b.OutputItems=2]="OutputItems",b[b.ExecutionState=3]="ExecutionState"})(y||(e.CellExecutionUpdateType=y={})),e.INotebookExecutionService=(0,t.createDecorator)("INotebookExecutionService")}),define(Q[734],Y([1,0,613]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookDto=void 0;var y;(function(b){function D(u){return{mime:u.mime,valueBytes:u.data}}b.toNotebookOutputItemDto=D;function T(u){return{outputId:u.outputId,metadata:u.metadata,items:u.outputs.map(D)}}b.toNotebookOutputDto=T;function f(u){return{cellKind:u.cellKind,language:u.language,mime:u.mime,source:u.source,internalMetadata:u.internalMetadata,metadata:u.metadata,outputs:u.outputs.map(T)}}b.toNotebookCellDataDto=f;function v(u){return{metadata:u.metadata,cells:u.cells.map(f)}}b.toNotebookDataDto=v;function m(u){return{mime:u.mime,data:u.valueBytes}}b.fromNotebookOutputItemDto=m;function S(u){return{outputId:u.outputId,metadata:u.metadata,outputs:u.items.map(m)}}b.fromNotebookOutputDto=S;function h(u){return{cellKind:u.cellKind,language:u.language,mime:u.mime,source:u.source,outputs:u.outputs.map(S),metadata:u.metadata,internalMetadata:u.internalMetadata}}b.fromNotebookCellDataDto=h;function a(u){return{metadata:u.metadata,cells:u.cells.map(h)}}b.fromNotebookDataDto=a;function r(u){return{handle:u.handle,uri:u.uri,source:u.textBuffer.getLinesContent(),eol:u.textBuffer.getEOL(),language:u.language,cellKind:u.cellKind,outputs:u.outputs.map(T),metadata:u.metadata,internalMetadata:u.internalMetadata}}b.toNotebookCellDto=r;function i(u){return u.editType===t.CellExecutionUpdateType.Output?{editType:u.editType,cellHandle:u.cellHandle,append:u.append,outputs:u.outputs.map(S)}:u.editType===t.CellExecutionUpdateType.OutputItems?{editType:u.editType,append:u.append,outputId:u.outputId,items:u.items.map(m)}:u}b.fromCellExecuteUpdateDto=i;function s(u){return u}b.fromCellExecuteCompleteDto=s;function o(u){return u.editType===1?{editType:u.editType,index:u.index,count:u.count,cells:u.cells.map(h)}:u}b.fromCellEditOperationDto=o})(y||(e.NotebookDto=y={}))}),define(Q[211],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookExecutionStateService=e.NotebookExecutionType=void 0;var y;(function(b){b[b.cell=0]="cell",b[b.notebook=1]="notebook"})(y||(e.NotebookExecutionType=y={})),e.INotebookExecutionStateService=(0,t.createDecorator)("INotebookExecutionStateService")}),define(Q[3586],Y([1,0,7,14,4,244,211]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellExecutionPart=void 0;const f=200;let v=class extends D.CellContentPart{constructor(S,h,a){super(),this._notebookEditor=S,this._executionOrderLabel=h,this._notebookExecutionStateService=a,this.kernelDisposables=this._register(new b.DisposableStore),this._register(this._notebookEditor.onDidChangeActiveKernel(()=>{this.currentCell&&(this.kernelDisposables.clear(),this._notebookEditor.activeKernel&&this.kernelDisposables.add(this._notebookEditor.activeKernel.onDidChange(()=>{this.currentCell&&this.updateExecutionOrder(this.currentCell.internalMetadata)})),this.updateExecutionOrder(this.currentCell.internalMetadata))}))}didRenderCell(S){this.updateExecutionOrder(S.internalMetadata,!0)}updateExecutionOrder(S,h=!1){if(this._notebookEditor.activeKernel?.implementsExecutionOrder||!this._notebookEditor.activeKernel&&typeof S.executionOrder=="number"){if(typeof S.executionOrder!="number"&&!h&&this._notebookExecutionStateService.getCellExecution(this.currentCell.uri)){const r=this.currentCell;this.cellDisposables.add((0,y.disposableTimeout)(()=>{this.currentCell===r&&this.updateExecutionOrder(this.currentCell.internalMetadata,!0)},f));return}const a=typeof S.executionOrder=="number"?`[${S.executionOrder}]`:"[ ]";this._executionOrderLabel.innerText=a}else this._executionOrderLabel.innerText=""}updateState(S,h){h.internalMetadataChanged&&this.updateExecutionOrder(S.internalMetadata)}updateInternalLayoutNow(S){if(S.isInputCollapsed)t.hide(this._executionOrderLabel);else{t.show(this._executionOrderLabel);const h=S.layoutInfo.editorHeight-22+S.layoutInfo.statusBarHeight;this._executionOrderLabel.style.top=`${h}px`}}};e.CellExecutionPart=v,e.CellExecutionPart=v=fe([O(2,T.INotebookExecutionStateService)],v)}),define(Q[3587],Y([1,0,342,54,244,71,211]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellProgressBar=void 0;let f=class extends b.CellContentPart{constructor(S,h,a){super(),this._notebookExecutionStateService=a,this._progressBar=this._register(new t.ProgressBar(S,y.defaultProgressBarStyles)),this._progressBar.hide(),this._collapsedProgressBar=this._register(new t.ProgressBar(h,y.defaultProgressBarStyles)),this._collapsedProgressBar.hide()}didRenderCell(S){this._updateForExecutionState(S)}updateForExecutionState(S,h){this._updateForExecutionState(S,h)}updateState(S,h){if((h.metadataChanged||h.internalMetadataChanged)&&this._updateForExecutionState(S),h.inputCollapsedChanged){const a=this._notebookExecutionStateService.getCellExecution(S.uri);S.isInputCollapsed?(this._progressBar.hide(),a?.state===D.NotebookCellExecutionState.Executing&&this._updateForExecutionState(S)):(this._collapsedProgressBar.hide(),a?.state===D.NotebookCellExecutionState.Executing&&this._updateForExecutionState(S))}}_updateForExecutionState(S,h){const a=h?.changed??this._notebookExecutionStateService.getCellExecution(S.uri),r=S.isInputCollapsed?this._collapsedProgressBar:this._progressBar;a?.state===D.NotebookCellExecutionState.Executing&&(!a.didPause||S.isInputCollapsed)?v(r):r.hide()}};e.CellProgressBar=f,e.CellProgressBar=f=fe([O(2,T.INotebookExecutionStateService)],f);function v(m){m.infinite().show(500)}}),define(Q[3588],Y([1,0,7,169,4,2836,37,267,71,211]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsedCodeCellExecutionIcon=void 0;let S=class extends b.Disposable{constructor(a,r,i,s){super(),this._cell=r,this._element=i,this._executionStateService=s,this._visible=!1,this._update(),this._register(this._executionStateService.onDidChangeExecution(o=>{o.type===m.NotebookExecutionType.cell&&o.affectsCell(this._cell.uri)&&this._update()})),this._register(this._cell.model.onDidChangeInternalMetadata(()=>this._update()))}setVisibility(a){this._visible=a,this._update()}_update(){if(!this._visible)return;const a=this._executionStateService.getCellExecution(this._cell.uri),r=this._getItemForState(a,this._cell.model.internalMetadata);r?(this._element.style.display="",t.reset(this._element,...(0,y.renderLabelWithIcons)(r.text)),this._element.title=r.tooltip??""):(this._element.style.display="none",t.reset(this._element))}_getItemForState(a,r){const i=a?.state,{lastRunSuccess:s}=r;if(!i&&s)return{text:`$(${f.successStateIcon.id})`,tooltip:(0,D.localize)(0,null)};if(!i&&s===!1)return{text:`$(${f.errorStateIcon.id})`,tooltip:(0,D.localize)(1,null)};if(i===v.NotebookCellExecutionState.Pending||i===v.NotebookCellExecutionState.Unconfirmed)return{text:`$(${f.pendingStateIcon.id})`,tooltip:(0,D.localize)(2,null)};if(i===v.NotebookCellExecutionState.Executing)return{text:`$(${T.ThemeIcon.modify(f.executingStateIcon,"spin").id})`,tooltip:(0,D.localize)(3,null)}}};e.CollapsedCodeCellExecutionIcon=S,e.CollapsedCodeCellExecutionIcon=S=fe([O(3,m.INotebookExecutionStateService)],S)}),define(Q[253],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookKernelHistoryService=e.INotebookKernelService=e.ProxyKernelState=void 0;var y;(function(b){b[b.Disconnected=1]="Disconnected",b[b.Connected=2]="Connected",b[b.Initializing=3]="Initializing"})(y||(e.ProxyKernelState=y={})),e.INotebookKernelService=(0,t.createDecorator)("INotebookKernelService"),e.INotebookKernelHistoryService=(0,t.createDecorator)("INotebookKernelHistoryService")}),define(Q[3589],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookKeymapService=void 0,e.INotebookKeymapService=(0,t.createDecorator)("notebookKeymapService")}),define(Q[614],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookLoggingService=void 0,e.INotebookLoggingService=(0,t.createDecorator)("INotebookLoggingService")}),define(Q[3590],Y([1,0,4,69,2829,81,13,24,253,614]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookKernelHistoryService=void 0;const h=5;let a=class extends t.Disposable{static{S=this}static{this.STORAGE_KEY="notebook.kernelHistory"}constructor(i,s,o){super(),this._storageService=i,this._notebookKernelService=s,this._notebookLoggingService=o,this._mostRecentKernelsMap={},this._loadState(),this._register(this._storageService.onWillSaveState(()=>this._saveState())),this._register(this._storageService.onDidChangeValue(1,S.STORAGE_KEY,this._register(new t.DisposableStore))(()=>{this._restoreState()}))}getKernels(i){const s=this._notebookKernelService.getMatchingKernel(i),o=s.all,u=s.selected,d=s.all.length===1?s.all[0]:void 0;this._notebookLoggingService.debug("History",`getMatchingKernels: ${s.all.length} kernels available for ${i.uri.path}. Selected: ${s.selected?.label}. Suggested: ${d?.label}`);const p=this._mostRecentKernelsMap[i.viewType]?[...this._mostRecentKernelsMap[i.viewType].values()]:[],c=p.map(l=>o.find(n=>n.id===l)).filter(l=>!!l);return this._notebookLoggingService.debug("History",`mru: ${p.length} kernels in history, ${c.length} registered already.`),{selected:u??d,all:c}}addMostRecentKernel(i){const s=i.id,o=i.viewType,u=this._mostRecentKernelsMap[o]??new y.LinkedMap;if(u.set(s,s,1),u.size>h){const d=[...u.entries()].slice(0,h);u.fromJSON(d)}this._mostRecentKernelsMap[o]=u}_saveState(){let i=!1;for(const[s,o]of Object.entries(this._mostRecentKernelsMap))i=i||o.size>0;if(i){const s=this._serialize();this._storageService.store(S.STORAGE_KEY,JSON.stringify(s),1,0)}else this._storageService.remove(S.STORAGE_KEY,1)}_restoreState(){const i=this._storageService.get(S.STORAGE_KEY,1);if(i)try{for(const[s,o]of JSON.parse(i)){const u=this._mostRecentKernelsMap[s]??new y.LinkedMap;for(const d of o.entries)u.set(d,d,1);this._mostRecentKernelsMap[s]=u}}catch(s){console.error("Deserialize notebook kernel history failed",s)}}_loadState(){const i=this._storageService.get(S.STORAGE_KEY,1);if(i)try{this._deserialize(JSON.parse(i))}catch{this._mostRecentKernelsMap={}}else this._mostRecentKernelsMap={}}_serialize(){const i=Object.create(null);for(const[s,o]of Object.entries(this._mostRecentKernelsMap))i[s]={entries:[...o.values()]};return i}_deserialize(i){this._mostRecentKernelsMap={};for(const[s,o]of Object.entries(i)){const u=new y.LinkedMap,d=[];for(const p of o.entries)d.push([p,p]);u.fromJSON(d),this._mostRecentKernelsMap[s]=u}}_clear(){this._mostRecentKernelsMap={},this._saveState()}};e.NotebookKernelHistoryService=a,e.NotebookKernelHistoryService=a=S=fe([O(0,f.IStorageService),O(1,v.INotebookKernelService),O(2,m.INotebookLoggingService)],a),(0,T.registerAction2)(class extends T.Action2{constructor(){super({id:"notebook.clearNotebookKernelsMRUCache",title:{value:(0,b.localize)(0,null),original:"Clear Notebook Kernels MRU Cache"},category:D.Categories.Developer,f1:!0})}async run(r){r.get(v.INotebookKernelHistoryService)._clear()}})}),define(Q[3591],Y([1,0,195,83,26]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookStaticPreloadInfo=e.NotebookOutputRendererInfo=void 0;class D{constructor(m){this.value=new Set(m),this.defined=this.value.size>0}matches(m){return m.some(S=>this.value.has(S))}}class T{constructor(m){this.id=m.id,this.extensionId=m.extension.identifier,this.extensionLocation=m.extension.extensionLocation,this.isBuiltin=m.extension.isBuiltin,typeof m.entrypoint=="string"?this.entrypoint={extends:void 0,path:(0,b.joinPath)(this.extensionLocation,m.entrypoint)}:this.entrypoint={extends:m.entrypoint.extends,path:(0,b.joinPath)(this.extensionLocation,m.entrypoint.path)},this.displayName=m.displayName,this.mimeTypes=m.mimeTypes,this.mimeTypeGlobs=this.mimeTypes.map(S=>t.parse(S)),this.hardDependencies=new D(m.dependencies??y.Iterable.empty()),this.optionalDependencies=new D(m.optionalDependencies??y.Iterable.empty()),this.messaging=m.requiresMessaging??"never"}matchesWithoutKernel(m){return this.matchesMimeTypeOnly(m)?this.hardDependencies.defined?0:this.optionalDependencies.defined?1:2:3}matches(m,S){return this.matchesMimeTypeOnly(m)?this.hardDependencies.defined?this.hardDependencies.matches(S)?0:3:this.optionalDependencies.matches(S)?1:2:3}matchesMimeTypeOnly(m){return this.entrypoint.extends?!1:this.mimeTypeGlobs.some(S=>S(m))||this.mimeTypes.some(S=>S===m)}}e.NotebookOutputRendererInfo=T;class f{constructor(m){this.type=m.type,this.entrypoint=(0,b.joinPath)(m.extension.extensionLocation,m.entrypoint),this.extensionLocation=m.extension.extensionLocation,this.localResourceRoots=m.localResourceRoots.map(S=>(0,b.joinPath)(m.extension.extensionLocation,S))}}e.NotebookStaticPreloadInfo=f}),define(Q[3592],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookPerfMarks=void 0;class t{constructor(){this._marks={}}get value(){return{...this._marks}}mark(b){if(this._marks[b]){console.error(`Skipping overwrite of notebook perf value: ${b}`);return}this._marks[b]=Date.now()}}e.NotebookPerfMarks=t}),define(Q[1295],Y([1,0,195,55,71]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookProviderInfo=void 0;class D{get selectors(){return this._selectors}get options(){return this._options}constructor(f){this.extension=f.extension,this.id=f.id,this.displayName=f.displayName,this._selectors=f.selectors?.map(v=>({include:v.filenamePattern,exclude:v.excludeFileNamePattern||""}))||[],this.priority=f.priority,this.providerDisplayName=f.providerDisplayName,this.exclusive=f.exclusive,this._options={transientCellMetadata:{},transientDocumentMetadata:{},transientOutputs:!1,cellContentMetadata:{}}}update(f){f.selectors&&(this._selectors=f.selectors),f.options&&(this._options=f.options)}matches(f){return this.selectors?.some(v=>D.selectorMatches(v,f))}static selectorMatches(f,v){if(typeof f=="string"&&t.match(f.toLowerCase(),(0,y.basename)(v.fsPath).toLowerCase())||t.isRelativePattern(f)&&t.match(f,(0,y.basename)(v.fsPath).toLowerCase()))return!0;if(!(0,b.isDocumentExcludePattern)(f))return!1;const m=f.include,S=f.exclude;return t.match(m,(0,y.basename)(v.fsPath).toLowerCase())?!(S&&t.match(S,(0,y.basename)(v.fsPath).toLowerCase())):!1}static possibleFileEnding(f){for(const v of f){const m=D._possibleFileEnding(v);if(m)return m}}static _possibleFileEnding(f){const v=/^.*(\.[a-zA-Z0-9_-]+)$/;let m;if(typeof f=="string")m=f;else if(t.isRelativePattern(f))m=f.pattern;else if(f.include)return D._possibleFileEnding(f.include);if(m){const S=v.exec(m);if(S)return S[1]}}}e.NotebookProviderInfo=D}),define(Q[356],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cellRangeContains=e.cellRangesEqual=e.reduceCellRanges=e.cellRangesToIndexes=e.cellIndexesToRanges=e.isICellRange=void 0;function t(v){return!v||typeof v!="object"?!1:typeof v.start=="number"&&typeof v.end=="number"}e.isICellRange=t;function y(v){v.sort((S,h)=>S-h);const m=v.shift();return m===void 0?[]:v.reduce(function(S,h){return h<=S[0][1]?S[0][1]=h+1:S.unshift([h,h+1]),S},[[m,m+1]]).reverse().map(S=>({start:S[0],end:S[1]}))}e.cellIndexesToRanges=y;function b(v){return v.reduce((S,h)=>{for(let a=h.start;a<h.end;a++)S.push(a);return S},[])}e.cellRangesToIndexes=b;function D(v){const m=v.sort((h,a)=>h.start-a.start),S=m[0];return S?m.reduce((h,a)=>{const r=h[h.length-1];return r.end>=a.start?r.end=Math.max(r.end,a.end):h.push(a),h},[S]):[]}e.reduceCellRanges=D;function T(v,m){if(v=D(v),m=D(m),v.length!==m.length)return!1;for(let S=0;S<v.length;S++)if(v[S].start!==m[S].start||v[S].end!==m[S].end)return!1;return!0}e.cellRangesEqual=T;function f(v,m){return m.start>=v.start&&m.end<=v.end}e.cellRangeContains=f}),define(Q[1296],Y([1,0,141,6,4,17,356]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookVisibleCellObserver=void 0;class f extends b.Disposable{get visibleCells(){return this._visibleCells}constructor(m){super(),this._notebookEditor=m,this._onDidChangeVisibleCells=this._register(new y.Emitter),this.onDidChangeVisibleCells=this._onDidChangeVisibleCells.event,this._viewModelDisposables=this._register(new b.DisposableStore),this._visibleCells=[],this._register(this._notebookEditor.onDidChangeVisibleRanges(this._updateVisibleCells,this)),this._register(this._notebookEditor.onDidChangeModel(this._onModelChange,this)),this._updateVisibleCells()}_onModelChange(){this._viewModelDisposables.clear(),this._notebookEditor.hasModel()&&this._viewModelDisposables.add(this._notebookEditor.onDidChangeViewCells(()=>this.updateEverything())),this.updateEverything()}updateEverything(){this._onDidChangeVisibleCells.fire({added:[],removed:Array.from(this._visibleCells)}),this._visibleCells=[],this._updateVisibleCells()}_updateVisibleCells(){if(!this._notebookEditor.hasModel())return;const m=(0,T.cellRangesToIndexes)(this._notebookEditor.visibleRanges).map(s=>this._notebookEditor.cellAt(s)).filter(D.isDefined),S=new Set(m.map(s=>s.handle)),h=new Set(this._visibleCells.map(s=>s.handle)),a=(0,t.diffSets)(h,S),r=a.added.map(s=>this._notebookEditor.getCellByHandle(s)).filter(D.isDefined),i=a.removed.map(s=>this._notebookEditor.getCellByHandle(s)).filter(D.isDefined);this._visibleCells=m,this._onDidChangeVisibleCells.fire({added:r,removed:i})}}e.NotebookVisibleCellObserver=f}),define(Q[3593],Y([1,0,14,31,4,1296,355,731]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContributedStatusBarItemController=void 0;let v=class extends b.Disposable{static{this.id="workbench.notebook.statusBar.contributed"}constructor(h,a){super(),this._notebookEditor=h,this._notebookCellStatusBarService=a,this._visibleCells=new Map,this._observer=this._register(new D.NotebookVisibleCellObserver(this._notebookEditor)),this._register(this._observer.onDidChangeVisibleCells(this._updateVisibleCells,this)),this._updateEverything(),this._register(this._notebookCellStatusBarService.onDidChangeProviders(this._updateEverything,this)),this._register(this._notebookCellStatusBarService.onDidChangeItems(this._updateEverything,this))}_updateEverything(){const h=this._observer.visibleCells.filter(o=>!this._visibleCells.has(o.handle)),a=new Set(this._observer.visibleCells.map(o=>o.handle)),r=Array.from(this._visibleCells.keys()),i=r.filter(o=>!a.has(o)),s=r.filter(o=>a.has(o));this._updateVisibleCells({added:h,removed:i.map(o=>({handle:o}))}),s.forEach(o=>this._visibleCells.get(o)?.update())}_updateVisibleCells(h){const a=this._notebookEditor.getViewModel();if(a){for(const r of h.added){const i=new m(a,r,this._notebookCellStatusBarService);this._visibleCells.set(r.handle,i)}for(const r of h.removed)this._visibleCells.get(r.handle)?.dispose(),this._visibleCells.delete(r.handle)}}dispose(){super.dispose(),this._visibleCells.forEach(h=>h.dispose()),this._visibleCells.clear()}};e.ContributedStatusBarItemController=v,e.ContributedStatusBarItemController=v=fe([O(1,f.INotebookCellStatusBarService)],v);class m extends b.Disposable{constructor(h,a,r){super(),this._notebookViewModel=h,this._cell=a,this._notebookCellStatusBarService=r,this._currentItemIds=[],this._currentItemLists=[],this._updateThrottler=this._register(new t.Throttler),this._register((0,b.toDisposable)(()=>this._activeToken?.dispose(!0))),this._updateSoon(),this._register(this._cell.model.onDidChangeContent(()=>this._updateSoon())),this._register(this._cell.model.onDidChangeLanguage(()=>this._updateSoon())),this._register(this._cell.model.onDidChangeMetadata(()=>this._updateSoon())),this._register(this._cell.model.onDidChangeInternalMetadata(()=>this._updateSoon())),this._register(this._cell.model.onDidChangeOutputs(()=>this._updateSoon()))}update(){this._updateSoon()}_updateSoon(){this._register((0,t.disposableTimeout)(()=>{this._updateThrottler.queue(()=>this._update())},0))}async _update(){const h=this._notebookViewModel.getCellIndex(this._cell),a=this._notebookViewModel.notebookDocument.uri,r=this._notebookViewModel.notebookDocument.viewType;this._activeToken?.dispose(!0);const i=this._activeToken=new y.CancellationTokenSource,s=await this._notebookCellStatusBarService.getStatusBarItemsForCell(a,h,r,i.token);if(i.token.isCancellationRequested){s.forEach(d=>d.dispose&&d.dispose());return}const o=s.map(d=>d.items).flat(),u=this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:o}]);this._currentItemLists.forEach(d=>d.dispose&&d.dispose()),this._currentItemLists=s,this._currentItemIds=u}dispose(){super.dispose(),this._activeToken?.dispose(!0),this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:[]}]),this._currentItemLists.forEach(h=>h.dispose&&h.dispose())}}(0,T.registerNotebookContribution)(v.id,v)}),define(Q[1297],Y([1,0,217,6,4,340,567,808,71,356]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMarkdownHeadersInCell=e.updateFoldingStateAtIndex=e.FoldingModel=void 0;const S={limit:5e3,update:()=>{}};class h{get regions(){return this._regions}constructor(){this._viewModel=null,this._viewModelStore=new b.DisposableStore,this._onDidFoldingRegionChanges=new y.Emitter,this.onDidFoldingRegionChanged=this._onDidFoldingRegionChanges.event,this._foldingRangeDecorationIds=[],this._regions=new T.FoldingRegions(new Uint32Array(0),new Uint32Array(0))}dispose(){this._onDidFoldingRegionChanges.dispose(),this._viewModelStore.dispose()}detachViewModel(){this._viewModelStore.clear(),this._viewModel=null}attachViewModel(s){this._viewModel=s,this._viewModelStore.add(this._viewModel.onDidChangeViewCells(()=>{this.recompute()})),this._viewModelStore.add(this._viewModel.onDidChangeSelection(()=>{if(!this._viewModel)return;const o=(0,m.cellRangesToIndexes)(this._viewModel.getSelections());let u=!1;o.forEach(d=>{let p=this.regions.findRange(d+1);for(;p!==-1;)this._regions.isCollapsed(p)&&d>this._regions.getStartLineNumber(p)-1&&(this._regions.setCollapsed(p,!1),u=!0),p=this._regions.getParentIndex(p)}),u&&this._onDidFoldingRegionChanges.fire()})),this.recompute()}getRegionAtLine(s){if(this._regions){const o=this._regions.findRange(s);if(o>=0)return this._regions.toRegion(o)}return null}getRegionsInside(s,o){const u=[],d=s?s.regionIndex+1:0,p=s?s.endLineNumber:Number.MAX_VALUE;if(o&&o.length===2){const c=[];for(let l=d,n=this._regions.length;l<n;l++){const g=this._regions.toRegion(l);if(this._regions.getStartLineNumber(l)<p){for(;c.length>0&&!g.containedBy(c[c.length-1]);)c.pop();c.push(g),o(g,c.length)&&u.push(g)}else break}}else for(let c=d,l=this._regions.length;c<l;c++){const n=this._regions.toRegion(c);if(this._regions.getStartLineNumber(c)<p)(!o||o(n))&&u.push(n);else break}return u}getAllRegionsAtLine(s,o){const u=[];if(this._regions){let d=this._regions.findRange(s),p=1;for(;d>=0;){const c=this._regions.toRegion(d);(!o||o(c,p))&&u.push(c),p++,d=c.parentIndex}}return u}setCollapsed(s,o){this._regions.setCollapsed(s,o)}recompute(){if(!this._viewModel)return;const s=this._viewModel,o=s.viewCells,u=[];for(let E=0;E<o.length;E++){const C=o[E];if(C.cellKind!==v.CellKind.Markup||C.language!=="markdown")continue;const I=Math.min(7,...Array.from(r(C.getText()),_=>_.depth));I<7&&u.push({index:E,level:I,endIndex:0})}const d=u.map((E,C)=>{let I;for(let A=C+1;A<u.length;++A)if(u[A].level<=E.level){I=u[A].index-1;break}const _=I!==void 0?I:o.length-1;return{start:E.index+1,end:_+1,rank:1}}).filter(E=>E.start!==E.end),p=(0,f.sanitizeRanges)(d,S);let c=0;const l=()=>{for(;c<this._regions.length;){const E=this._regions.isCollapsed(c);if(c++,E)return c-1}return-1};let n=0,g=l();for(;g!==-1&&n<p.length;){const E=s.getTrackedRange(this._foldingRangeDecorationIds[g]);if(E){const C=E.start;for(;n<p.length;){const I=p.getStartLineNumber(n)-1;if(C>=I)p.setCollapsed(n,C===I),n++;else break}}g=l()}for(;n<p.length;)p.setCollapsed(n,!1),n++;const w=[];for(let E=0;E<p.length;E++){const C=p.toRegion(E);w.push({start:C.startLineNumber-1,end:C.endLineNumber-1})}this._foldingRangeDecorationIds.forEach(E=>s.setTrackedRange(E,null,3)),this._foldingRangeDecorationIds=w.map(E=>s.setTrackedRange(null,E,3)).filter(E=>E!==null),this._regions=p,this._onDidFoldingRegionChanges.fire()}getMemento(){const s=[];let o=0;for(;o<this._regions.length;){if(this._regions.isCollapsed(o)){const d=this._regions.toRegion(o);s.push({start:d.startLineNumber-1,end:d.endLineNumber-1})}o++}return s}applyMemento(s){if(!this._viewModel)return!1;let o=0,u=0;for(;u<s.length&&o<this._regions.length;){if(this._viewModel.getTrackedRange(this._foldingRangeDecorationIds[o])){const p=s[u].start;for(;o<this._regions.length;){const c=this._regions.getStartLineNumber(o)-1;if(p>=c)this._regions.setCollapsed(o,p===c),o++;else break}}u++}for(;o<this._regions.length;)this._regions.setCollapsed(o,!1),o++;return!0}}e.FoldingModel=h;function a(i,s,o){const u=i.regions.findRange(s+1);i.setCollapsed(u,o)}e.updateFoldingStateAtIndex=a;function*r(i){for(const s of D.marked.lexer(i,{gfm:!0}))s.type==="heading"&&(yield{depth:s.depth,text:(0,t.renderMarkdownAsPlaintext)({value:s.text}).trim()})}e.getMarkdownHeadersInCell=r}),define(Q[926],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookRendererMessagingService=void 0,e.INotebookRendererMessagingService=(0,t.createDecorator)("INotebookRendererMessagingService")}),define(Q[148],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleNotebookProviderInfo=e.INotebookService=void 0,e.INotebookService=(0,t.createDecorator)("notebookService");class y{constructor(D,T,f){this.viewType=D,this.serializer=T,this.extensionData=f}}e.SimpleNotebookProviderInfo=y}),define(Q[3594],Y([1,0,195,10,28,71,253,148]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),b.CommandsRegistry.registerCommand("_resolveNotebookContentProvider",v=>v.get(f.INotebookService).getContributedNotebookTypes().map(h=>{const a=h.selectors.map(r=>typeof r=="string"||t.isRelativePattern(r)?r:(0,D.isDocumentExcludePattern)(r)?{include:r.include,exclude:r.exclude}:null).filter(r=>r!==null);return{viewType:h.id,displayName:h.displayName,filenamePattern:a,options:{transientCellMetadata:h.options.transientCellMetadata,transientDocumentMetadata:h.options.transientDocumentMetadata,transientOutputs:h.options.transientOutputs}}})),b.CommandsRegistry.registerCommand("_resolveNotebookKernels",async(v,m)=>{const S=v.get(T.INotebookKernelService),h=y.URI.revive(m.uri);return S.getMatchingKernel({uri:h,viewType:m.viewType}).all.map(r=>({id:r.id,label:r.label,description:r.description,detail:r.detail,isPreferred:!1,preloads:r.preloadUris}))})}),define(Q[3595],Y([1,0,6,4,59,490,1293,148]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffNestedCellViewModel=void 0;let v=class extends y.Disposable{get id(){return this._id}get outputs(){return this.textModel.outputs}get language(){return this.textModel.language}get metadata(){return this.textModel.metadata}get uri(){return this.textModel.uri}get handle(){return this.textModel.handle}get outputIsHovered(){return this._hoveringOutput}set outputIsHovered(S){this._hoveringOutput=S,this._onDidChangeState.fire({outputIsHoveredChanged:!0})}get outputIsFocused(){return this._focusOnOutput}set outputIsFocused(S){this._focusOnOutput=S,this._onDidChangeState.fire({outputIsFocusedChanged:!0})}get outputsViewModels(){return this._outputViewModels}constructor(S,h){super(),this.textModel=S,this._notebookService=h,this._onDidChangeState=this._register(new t.Emitter),this._hoveringOutput=!1,this._focusOnOutput=!1,this._outputCollection=[],this._outputsTop=null,this._onDidChangeOutputLayout=this._register(new t.Emitter),this.onDidChangeOutputLayout=this._onDidChangeOutputLayout.event,this._id=(0,b.generateUuid)(),this._outputViewModels=this.textModel.outputs.map(a=>new T.CellOutputViewModel(this,a,this._notebookService)),this._register(this.textModel.onDidChangeOutputs(a=>{this._outputCollection.splice(a.start,a.deleteCount,...a.newOutputs.map(()=>0)),this._outputViewModels.splice(a.start,a.deleteCount,...a.newOutputs.map(r=>new T.CellOutputViewModel(this,r,this._notebookService))),this._outputsTop=null,this._onDidChangeOutputLayout.fire()})),this._outputCollection=new Array(this.textModel.outputs.length)}_ensureOutputsTop(){if(!this._outputsTop){const S=new Uint32Array(this._outputCollection.length);for(let h=0;h<this._outputCollection.length;h++)S[h]=this._outputCollection[h];this._outputsTop=new D.PrefixSumComputer(S)}}getOutputOffset(S){if(this._ensureOutputsTop(),S>=this._outputCollection.length)throw new Error("Output index out of range!");return this._outputsTop.getPrefixSum(S-1)}updateOutputHeight(S,h){if(S>=this._outputCollection.length)throw new Error("Output index out of range!");this._ensureOutputsTop(),this._outputCollection[S]=h,this._outputsTop.setValue(S,h)&&this._onDidChangeOutputLayout.fire()}getOutputTotalHeight(){return this._ensureOutputsTop(),this._outputsTop?.getTotalSum()??0}};e.DiffNestedCellViewModel=v,e.DiffNestedCellViewModel=v=fe([O(1,f.INotebookService)],v)}),define(Q[3596],Y([1,0,6,4,69,26,59,220,5,11,71,613,211,253,148]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookExecutionStateService=void 0;let s=class extends y.Disposable{constructor(g,w,E,C){super(),this._instantiationService=g,this._logService=w,this._notebookService=E,this._audioCueService=C,this._executions=new b.ResourceMap,this._notebookExecutions=new b.ResourceMap,this._notebookListeners=new b.ResourceMap,this._cellListeners=new b.ResourceMap,this._lastFailedCells=new b.ResourceMap,this._onDidChangeExecution=this._register(new t.Emitter),this.onDidChangeExecution=this._onDidChangeExecution.event,this._onDidChangeLastRunFailState=this._register(new t.Emitter),this.onDidChangeLastRunFailState=this._onDidChangeLastRunFailState.event}getLastFailedCellForNotebook(g){const w=this._lastFailedCells.get(g);return w?.visible?w.cellHandle:void 0}forceCancelNotebookExecutions(g){const w=this._executions.get(g);if(w)for(const E of w.values())this._onCellExecutionDidComplete(g,E.cellHandle,E);this._notebookExecutions.has(g)&&this._onExecutionDidComplete(g)}getCellExecution(g){const w=S.CellUri.parse(g);if(!w)throw new Error(`Not a cell URI: ${g}`);const E=this._executions.get(w.notebook);if(E)return E.get(w.handle)}getExecution(g){return this._notebookExecutions.get(g)?.[0]}getCellExecutionsForNotebook(g){const w=this._executions.get(g);return w?Array.from(w.values()):[]}getCellExecutionsByHandleForNotebook(g){return this._executions.get(g)??void 0}_onCellExecutionDidChange(g,w,E){this._onDidChangeExecution.fire(new o(g,w,E))}_onCellExecutionDidComplete(g,w,E,C){const I=this._executions.get(g);if(!I){this._logService.debug(`NotebookExecutionStateService#_onCellExecutionDidComplete - unknown notebook ${g.toString()}`);return}E.dispose();const _=S.CellUri.generate(g,w);this._cellListeners.get(_)?.dispose(),this._cellListeners.delete(_),I.delete(w),I.size===0&&(this._executions.delete(g),this._notebookListeners.get(g)?.dispose(),this._notebookListeners.delete(g)),C!==void 0&&(C?(this._executions.size===0&&this._audioCueService.playAudioCue(f.AudioCue.notebookCellCompleted),this._clearLastFailedCell(g)):(this._audioCueService.playAudioCue(f.AudioCue.notebookCellFailed),this._setLastFailedCell(g,w))),this._onDidChangeExecution.fire(new o(g,w))}_onExecutionDidChange(g,w){this._onDidChangeExecution.fire(new u(g,w))}_onExecutionDidComplete(g){const w=this._notebookExecutions.get(g);if(!Array.isArray(w)){this._logService.debug(`NotebookExecutionStateService#_onCellExecutionDidComplete - unknown notebook ${g.toString()}`);return}this._notebookExecutions.delete(g),this._onDidChangeExecution.fire(new u(g)),w.forEach(E=>E.dispose())}createCellExecution(g,w){const E=this._notebookService.getNotebookTextModel(g);if(!E)throw new Error(`Notebook not found: ${g.toString()}`);let C=this._executions.get(g);if(!C){const _=this._instantiationService.createInstance(d,g);this._notebookListeners.set(g,_),C=new Map,this._executions.set(g,C)}let I=C.get(w);return I||(I=this._createNotebookCellExecution(E,w),C.set(w,I),I.initialize(),this._onDidChangeExecution.fire(new o(g,w,I))),I}createExecution(g){const w=this._notebookService.getNotebookTextModel(g);if(!w)throw new Error(`Notebook not found: ${g.toString()}`);if(!this._notebookListeners.has(g)){const C=this._instantiationService.createInstance(d,g);this._notebookListeners.set(g,C)}let E=this._notebookExecutions.get(g);return E||(E=this._createNotebookExecution(w),this._notebookExecutions.set(g,E),this._onDidChangeExecution.fire(new u(g,E[0]))),E[0]}_createNotebookCellExecution(g,w){const E=g.uri,C=this._instantiationService.createInstance(c,w,g),I=(0,y.combinedDisposable)(C.onDidUpdate(()=>this._onCellExecutionDidChange(E,w,C)),C.onDidComplete(_=>this._onCellExecutionDidComplete(E,w,C,_)));return this._cellListeners.set(S.CellUri.generate(E,w),I),C}_createNotebookExecution(g){const w=g.uri,E=this._instantiationService.createInstance(l,g),C=(0,y.combinedDisposable)(E.onDidUpdate(()=>this._onExecutionDidChange(w,E)),E.onDidComplete(()=>this._onExecutionDidComplete(w)));return[E,C]}_setLastFailedCell(g,w){const E=this._lastFailedCells.get(g),C=this._notebookService.getNotebookTextModel(g);if(!C)return;const I={cellHandle:w,disposable:E?E.disposable:this._getFailedCellListener(C),visible:!0};this._lastFailedCells.set(g,I),this._onDidChangeLastRunFailState.fire({visible:!0,notebook:g})}_setLastFailedCellVisibility(g,w){const E=this._lastFailedCells.get(g);E&&this._lastFailedCells.set(g,{cellHandle:E.cellHandle,disposable:E.disposable,visible:w}),this._onDidChangeLastRunFailState.fire({visible:w,notebook:g})}_clearLastFailedCell(g){const w=this._lastFailedCells.get(g);w&&(w.disposable?.dispose(),this._lastFailedCells.delete(g)),this._onDidChangeLastRunFailState.fire({visible:!1,notebook:g})}_getFailedCellListener(g){return g.onWillAddRemoveCells(w=>{const E=this._lastFailedCells.get(g.uri)?.cellHandle;if(E!==void 0){const C=g.cells.findIndex(I=>I.handle===E);w.rawEvent.changes.forEach(([I,_,A])=>{_&&C>=I&&C<I+_&&this._setLastFailedCellVisibility(g.uri,!1),A.some(k=>k.handle===E)&&this._setLastFailedCellVisibility(g.uri,!0)})}})}dispose(){super.dispose(),this._executions.forEach(g=>{g.forEach(w=>w.dispose()),g.clear()}),this._executions.clear(),this._notebookExecutions.forEach(g=>{g.forEach(w=>w.dispose())}),this._notebookExecutions.clear(),this._cellListeners.forEach(g=>g.dispose()),this._notebookListeners.forEach(g=>g.dispose()),this._lastFailedCells.forEach(g=>g.disposable.dispose())}};e.NotebookExecutionStateService=s,e.NotebookExecutionStateService=s=fe([O(0,v.IInstantiationService),O(1,m.ILogService),O(2,i.INotebookService),O(3,f.IAudioCueService)],s);class o{constructor(g,w,E){this.notebook=g,this.cellHandle=w,this.changed=E,this.type=a.NotebookExecutionType.cell}affectsCell(g){const w=S.CellUri.parse(g);return!!w&&(0,D.isEqual)(this.notebook,w.notebook)&&this.cellHandle===w.handle}affectsNotebook(g){return(0,D.isEqual)(this.notebook,g)}}class u{constructor(g,w){this.notebook=g,this.changed=w,this.type=a.NotebookExecutionType.notebook}affectsNotebook(g){return(0,D.isEqual)(this.notebook,g)}}let d=class extends y.Disposable{constructor(g,w,E,C,I,_){super(),this._notebookService=w,this._notebookKernelService=E,this._notebookExecutionService=C,this._notebookExecutionStateService=I,this._logService=_,this._logService.debug(`NotebookExecution#ctor ${g.toString()}`);const A=this._notebookService.getNotebookTextModel(g);if(!A)throw new Error("Notebook not found: "+g);this._notebookModel=A,this._register(this._notebookModel.onWillAddRemoveCells(k=>this.onWillAddRemoveCells(k))),this._register(this._notebookModel.onWillDispose(()=>this.onWillDisposeDocument()))}cancelAll(){this._logService.debug("NotebookExecutionListeners#cancelAll");const g=this._notebookExecutionStateService.getCellExecutionsForNotebook(this._notebookModel.uri);this._notebookExecutionService.cancelNotebookCellHandles(this._notebookModel,g.map(w=>w.cellHandle))}onWillDisposeDocument(){this._logService.debug("NotebookExecution#onWillDisposeDocument"),this.cancelAll()}onWillAddRemoveCells(g){const w=this._notebookExecutionStateService.getCellExecutionsByHandleForNotebook(this._notebookModel.uri),E=new Set,C=new Set;if(w&&g.rawEvent.changes.forEach(([I,_])=>{_&&this._notebookModel.cells.slice(I,I+_).map(k=>k.handle).forEach(k=>{const L=w.get(k);L?.state===S.NotebookCellExecutionState.Executing?E.add(k):L&&C.add(k)})}),E.size||C.size){const I=this._notebookKernelService.getSelectedOrSuggestedKernel(this._notebookModel);if(I){const A=I.implementsInterrupt?[...E]:[...E,...C];this._logService.debug(`NotebookExecution#onWillAddRemoveCells, ${JSON.stringify([...A])}`),A.length&&I.cancelNotebookCellExecution(this._notebookModel.uri,A)}}}};d=fe([O(1,i.INotebookService),O(2,r.INotebookKernelService),O(3,h.INotebookExecutionService),O(4,a.INotebookExecutionStateService),O(5,m.ILogService)],d);function p(n,g){if(n.editType===h.CellExecutionUpdateType.Output)return{editType:2,handle:n.cellHandle,append:n.append,outputs:n.outputs};if(n.editType===h.CellExecutionUpdateType.OutputItems)return{editType:7,items:n.items,append:n.append,outputId:n.outputId};if(n.editType===h.CellExecutionUpdateType.ExecutionState){const w={};return typeof n.executionOrder<"u"&&(w.executionOrder=n.executionOrder),typeof n.runStartTime<"u"&&(w.runStartTime=n.runStartTime),{editType:9,handle:g,internalMetadata:w}}throw new Error("Unknown cell update type")}let c=class extends y.Disposable{get state(){return this._state}get notebook(){return this._notebookModel.uri}get didPause(){return this._didPause}get isPaused(){return this._isPaused}constructor(g,w,E){super(),this.cellHandle=g,this._notebookModel=w,this._logService=E,this._onDidUpdate=this._register(new t.Emitter),this.onDidUpdate=this._onDidUpdate.event,this._onDidComplete=this._register(new t.Emitter),this.onDidComplete=this._onDidComplete.event,this._state=S.NotebookCellExecutionState.Unconfirmed,this._didPause=!1,this._isPaused=!1,this._logService.debug(`CellExecution#ctor ${this.getCellLog()}`)}initialize(){const g={editType:9,handle:this.cellHandle,internalMetadata:{executionId:(0,T.generateUuid)(),runStartTime:null,runEndTime:null,lastRunSuccess:null,executionOrder:null,renderDuration:null}};this._applyExecutionEdits([g])}getCellLog(){return`${this._notebookModel.uri.toString()}, ${this.cellHandle}`}logUpdates(g){const w=g.map(E=>h.CellExecutionUpdateType[E.editType]).join(", ");this._logService.debug(`CellExecution#updateExecution ${this.getCellLog()}, [${w}]`)}confirm(){this._logService.debug(`CellExecution#confirm ${this.getCellLog()}`),this._state=S.NotebookCellExecutionState.Pending,this._onDidUpdate.fire()}update(g){this.logUpdates(g),g.some(C=>C.editType===h.CellExecutionUpdateType.ExecutionState)&&(this._state=S.NotebookCellExecutionState.Executing),!this._didPause&&g.some(C=>C.editType===h.CellExecutionUpdateType.ExecutionState&&C.didPause)&&(this._didPause=!0);const w=[...g].reverse().find(C=>C.editType===h.CellExecutionUpdateType.ExecutionState&&typeof C.isPaused=="boolean");if(w&&(this._isPaused=w.isPaused),!this._notebookModel.cells.find(C=>C.handle===this.cellHandle))this._logService.debug(`CellExecution#update, updating cell not in notebook: ${this._notebookModel.uri.toString()}, ${this.cellHandle}`);else{const C=g.map(I=>p(I,this.cellHandle));this._applyExecutionEdits(C)}g.some(C=>C.editType===h.CellExecutionUpdateType.ExecutionState)&&this._onDidUpdate.fire()}complete(g){const w=this._notebookModel.cells.find(E=>E.handle===this.cellHandle);if(!w)this._logService.debug(`CellExecution#complete, completing cell not in notebook: ${this._notebookModel.uri.toString()}, ${this.cellHandle}`);else{const E={editType:9,handle:this.cellHandle,internalMetadata:{lastRunSuccess:g.lastRunSuccess,runStartTime:this._didPause?null:w.internalMetadata.runStartTime,runEndTime:this._didPause?null:g.runEndTime}};this._applyExecutionEdits([E])}this._onDidComplete.fire(g.lastRunSuccess)}_applyExecutionEdits(g){this._notebookModel.applyEdits(g,!0,void 0,()=>{},void 0,!1)}};c=fe([O(2,m.ILogService)],c);let l=class extends y.Disposable{get state(){return this._state}get notebook(){return this._notebookModel.uri}constructor(g,w){super(),this._notebookModel=g,this._logService=w,this._onDidUpdate=this._register(new t.Emitter),this.onDidUpdate=this._onDidUpdate.event,this._onDidComplete=this._register(new t.Emitter),this.onDidComplete=this._onDidComplete.event,this._state=S.NotebookExecutionState.Unconfirmed,this._logService.debug("NotebookExecution#ctor")}debug(g){this._logService.debug(`${g} ${this._notebookModel.uri.toString()}`)}confirm(){this.debug("Execution#confirm"),this._state=S.NotebookExecutionState.Pending,this._onDidUpdate.fire()}begin(){this.debug("Execution#begin"),this._state=S.NotebookExecutionState.Executing,this._onDidUpdate.fire()}complete(){this.debug("Execution#begin"),this._state=S.NotebookExecutionState.Unconfirmed,this._onDidComplete.fire()}};l=fe([O(1,m.ILogService)],l)}),define(Q[3597],Y([1,0,6,4,69,24,10,148,14,13,8,22]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookKernelService=void 0;class r{static{this._logicClock=0}constructor(d){this.notebookPriorities=new b.ResourceMap,this.kernel=d,this.score=-1,this.time=r._logicClock++}}class i{static str(d){return`${d.viewType}/${d.uri.toString()}`}static obj(d){const p=d.indexOf("/");return{viewType:d.substring(0,p),uri:T.URI.parse(d.substring(p+1))}}}class s extends y.Disposable{constructor(d,p,c){super(),this.action=d,this.model=p,this.isPrimary=c,this._onDidChangeState=this._register(new t.Emitter),this.onDidChangeState=this._onDidChangeState.event}async runAction(){if(this.execution)return this.execution;this.execution=this._runAction(),this._onDidChangeState.fire(),await this.execution,this.execution=void 0,this._onDidChangeState.fire()}async _runAction(){try{await this.action.run({uri:this.model.uri,$mid:14})}catch(d){console.warn(`Kernel source command failed: ${d}`)}}}let o=class extends y.Disposable{static{a=this}static{this._storageNotebookBinding="notebook.controller2NotebookBindings"}constructor(d,p,c,l){super(),this._notebookService=d,this._storageService=p,this._menuService=c,this._contextKeyService=l,this._kernels=new Map,this._notebookBindings=new b.LRUCache(1e3,.7),this._onDidChangeNotebookKernelBinding=this._register(new t.Emitter),this._onDidAddKernel=this._register(new t.Emitter),this._onDidRemoveKernel=this._register(new t.Emitter),this._onDidChangeNotebookAffinity=this._register(new t.Emitter),this._onDidChangeSourceActions=this._register(new t.Emitter),this._kernelSources=new Map,this._kernelSourceActionsUpdates=new Map,this._kernelDetectionTasks=new Map,this._onDidChangeKernelDetectionTasks=this._register(new t.Emitter),this._kernelSourceActionProviders=new Map,this.onDidChangeSelectedNotebooks=this._onDidChangeNotebookKernelBinding.event,this.onDidAddKernel=this._onDidAddKernel.event,this.onDidRemoveKernel=this._onDidRemoveKernel.event,this.onDidChangeNotebookAffinity=this._onDidChangeNotebookAffinity.event,this.onDidChangeSourceActions=this._onDidChangeSourceActions.event,this.onDidChangeKernelDetectionTasks=this._onDidChangeKernelDetectionTasks.event,this._register(d.onDidAddNotebookDocument(this._tryAutoBindNotebook,this)),this._register(d.onWillRemoveNotebookDocument(n=>{const g=i.str(n);this._notebookBindings.get(g)&&n.uri.scheme===h.Schemas.untitled&&this.selectKernelForNotebook(void 0,n),this._kernelSourceActionsUpdates.get(g)?.dispose(),this._kernelSourceActionsUpdates.delete(g)}));try{const n=JSON.parse(this._storageService.get(a._storageNotebookBinding,1,"[]"));this._notebookBindings.fromJSON(n)}catch{}}dispose(){this._kernels.clear(),this._kernelSources.forEach(d=>{d.menu.dispose(),d.actions.forEach(p=>p[1].dispose())}),this._kernelSourceActionsUpdates.forEach(d=>{d.dispose()}),this._kernelSourceActionsUpdates.clear(),super.dispose()}_persistMementos(){this._persistSoonHandle?.dispose(),this._persistSoonHandle=(0,v.runWhenIdle)(()=>{this._storageService.store(a._storageNotebookBinding,JSON.stringify(this._notebookBindings),1,1)},100)}static _score(d,p){return d.viewType==="*"?5:d.viewType===p.viewType?10:0}_tryAutoBindNotebook(d,p){const c=this._notebookBindings.get(i.str(d));if(!c)return;const l=this._kernels.get(c);!l||!a._score(l.kernel,d)||(!p||l.kernel===p)&&this._onDidChangeNotebookKernelBinding.fire({notebook:d.uri,oldKernel:void 0,newKernel:l.kernel.id})}registerKernel(d){if(this._kernels.has(d.id))throw new Error(`NOTEBOOK CONTROLLER with id '${d.id}' already exists`);this._kernels.set(d.id,new r(d)),this._onDidAddKernel.fire(d);for(const p of this._notebookService.getNotebookTextModels())this._tryAutoBindNotebook(p,d);return(0,y.toDisposable)(()=>{this._kernels.delete(d.id)&&this._onDidRemoveKernel.fire(d);for(const[p,c]of Array.from(this._notebookBindings))c===d.id&&this._onDidChangeNotebookKernelBinding.fire({notebook:i.obj(p).uri,oldKernel:d.id,newKernel:void 0})})}getMatchingKernel(d){const p=[];for(const E of this._kernels.values()){const C=a._score(E.kernel,d);C&&p.push({score:C,kernel:E.kernel,instanceAffinity:E.notebookPriorities.get(d.uri)??1})}p.sort((E,C)=>C.instanceAffinity-E.instanceAffinity||E.score-C.score||E.kernel.label.localeCompare(C.kernel.label));const c=p.map(E=>E.kernel),l=this._notebookBindings.get(i.str(d)),n=l?this._kernels.get(l)?.kernel:void 0,g=p.filter(E=>E.instanceAffinity>1).map(E=>E.kernel),w=p.filter(E=>E.instanceAffinity<0).map(E=>E.kernel);return{all:c,selected:n,suggestions:g,hidden:w}}getSelectedOrSuggestedKernel(d){const p=this.getMatchingKernel(d);if(p.selected)return p.selected;const c=p.all.filter(l=>this._kernels.get(l.id)?.notebookPriorities.get(d.uri)===2);return c.length===1?c[0]:p.all.length===1?p.all[0]:void 0}selectKernelForNotebook(d,p){const c=i.str(p),l=this._notebookBindings.get(c);l!==d?.id&&(d?this._notebookBindings.set(c,d.id):this._notebookBindings.delete(c),this._onDidChangeNotebookKernelBinding.fire({notebook:p.uri,oldKernel:l,newKernel:d?.id}),this._persistMementos())}preselectKernelForNotebook(d,p){const c=i.str(p);this._notebookBindings.get(c)!==d?.id&&(this._notebookBindings.set(c,d.id),this._persistMementos())}updateKernelNotebookAffinity(d,p,c){const l=this._kernels.get(d.id);if(!l)throw new Error(`UNKNOWN kernel '${d.id}'`);c===void 0?l.notebookPriorities.delete(p):l.notebookPriorities.set(p,c),this._onDidChangeNotebookAffinity.fire()}getRunningSourceActions(d){const p=i.str(d),c=this._kernelSources.get(p);return c?c.actions.filter(l=>l[0].execution).map(l=>l[0]):[]}getSourceActions(d,p){p=p??this._contextKeyService;const c=i.str(d),l=this._kernelSources.get(c);if(l)return l.actions.map(E=>E[0]);const n=this._register(this._menuService.createMenu(m.MenuId.NotebookKernelSource,p)),g={menu:n,actions:[]},w=(E,C)=>{const I=E.getActions({shouldForwardArgs:!0}),_=[];I.forEach(A=>{const k=/^primary/.test(A[0]);A[1].forEach(L=>{const R=new s(L,C,k),M=R.onDidChangeState(()=>{this._onDidChangeSourceActions.fire({notebook:C.uri,viewType:C.viewType})});_.push([R,M])})}),g.actions=_,this._kernelSources.set(c,g),this._onDidChangeSourceActions.fire({notebook:C.uri,viewType:C.viewType})};return this._kernelSourceActionsUpdates.get(c)?.dispose(),this._kernelSourceActionsUpdates.set(c,n.onDidChange(()=>{w(n,d)})),w(n,d),g.actions.map(E=>E[0])}registerNotebookKernelDetectionTask(d){const p=d.notebookType,c=this._kernelDetectionTasks.get(p)??[];return c.push(d),this._kernelDetectionTasks.set(p,c),this._onDidChangeKernelDetectionTasks.fire(p),(0,y.toDisposable)(()=>{const l=this._kernelDetectionTasks.get(p)??[],n=l.indexOf(d);n>=0&&(l.splice(n,1),this._kernelDetectionTasks.set(p,l),this._onDidChangeKernelDetectionTasks.fire(p))})}getKernelDetectionTasks(d){return this._kernelDetectionTasks.get(d.viewType)??[]}registerKernelSourceActionProvider(d,p){const c=this._kernelSourceActionProviders.get(d)??[];c.push(p),this._kernelSourceActionProviders.set(d,c),this._onDidChangeSourceActions.fire({viewType:d});const l=p.onDidChangeSourceActions?.(()=>{this._onDidChangeSourceActions.fire({viewType:d})});return(0,y.toDisposable)(()=>{const n=this._kernelSourceActionProviders.get(d)??[],g=n.indexOf(p);g>=0&&(n.splice(g,1),this._kernelSourceActionProviders.set(d,n)),l?.dispose()})}getKernelSourceActions2(d){const p=d.viewType,l=(this._kernelSourceActionProviders.get(p)??[]).map(n=>n.provideKernelSourceActions());return Promise.all(l).then(n=>n.reduce((g,w)=>g.concat(w),[]))}};e.NotebookKernelService=o,e.NotebookKernelService=o=a=fe([O(0,f.INotebookService),O(1,D.IStorageService),O(2,m.IMenuService),O(3,S.IContextKeyService)],o)}),define(Q[3598],Y([1,0,4,577,672,71,148]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEditorWorkerServiceImpl=void 0;let f=class extends t.Disposable{constructor(r){super(),this._workerManager=this._register(new v(r))}canComputeDiff(r,i){throw new Error("Method not implemented.")}computeDiff(r,i){return this._workerManager.withWorker().then(s=>s.computeDiff(r,i))}canPromptRecommendation(r){return this._workerManager.withWorker().then(i=>i.canPromptRecommendation(r))}};e.NotebookEditorWorkerServiceImpl=f,e.NotebookEditorWorkerServiceImpl=f=fe([O(0,T.INotebookService)],f);class v extends t.Disposable{constructor(r){super(),this._notebookService=r,this._editorWorkerClient=null}withWorker(){return this._editorWorkerClient||(this._editorWorkerClient=new h(this._notebookService,"notebookEditorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class m extends t.Disposable{constructor(r,i){super(),this._proxy=r,this._notebookService=i,this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null)}ensureSyncedResources(r){for(const i of r){const s=i.toString();this._syncedModels[s]||this._beginModelSync(i),this._syncedModels[s]&&(this._syncedModelsLastUsedTime[s]=new Date().getTime())}}_beginModelSync(r){const i=this._notebookService.listNotebookDocuments().find(d=>d.uri.toString()===r.toString());if(!i)return;const s=r.toString();this._proxy.acceptNewModel(i.uri.toString(),{cells:i.cells.map(d=>({handle:d.handle,uri:d.uri,source:d.getValue(),eol:d.textBuffer.getEOL(),language:d.language,mime:d.mime,cellKind:d.cellKind,outputs:d.outputs.map(p=>({outputId:p.outputId,outputs:p.outputs})),metadata:d.metadata,internalMetadata:d.internalMetadata})),metadata:i.metadata});const o=new t.DisposableStore,u=d=>({handle:d.handle,uri:d.uri,source:d.textBuffer.getLinesContent(),eol:d.textBuffer.getEOL(),language:d.language,cellKind:d.cellKind,outputs:d.outputs.map(p=>({outputId:p.outputId,outputs:p.outputs})),metadata:d.metadata,internalMetadata:d.internalMetadata});o.add(i.onDidChangeContent(d=>{const p=d.rawEvents.map(c=>c.kind===D.NotebookCellsChangeType.ModelChange||c.kind===D.NotebookCellsChangeType.Initialize?{kind:c.kind,versionId:d.versionId,changes:c.changes.map(n=>[n[0],n[1],n[2].map(g=>u(g))])}:c.kind===D.NotebookCellsChangeType.Move?{kind:c.kind,index:c.index,length:c.length,newIdx:c.newIdx,versionId:d.versionId,cells:c.cells.map(n=>u(n))}:c);this._proxy.acceptModelChanged(s.toString(),{rawEvents:p,versionId:d.versionId})})),o.add(i.onWillDispose(()=>{this._stopModelSync(s)})),o.add((0,t.toDisposable)(()=>{this._proxy.acceptRemovedModel(s)})),this._syncedModels[s]=o}_stopModelSync(r){const i=this._syncedModels[r];delete this._syncedModels[r],delete this._syncedModelsLastUsedTime[r],(0,t.dispose)(i)}}class S{constructor(r){this._workerClient=r}fhr(r,i){return this._workerClient.fhr(r,i)}}class h extends t.Disposable{constructor(r,i){super(),this._notebookService=r,this._workerFactory=new b.DefaultWorkerFactory(i),this._worker=null,this._modelManager=null}fhr(r,i){throw new Error("Not implemented!")}computeDiff(r,i){return this._withSyncedResources([r,i]).then(s=>s.computeDiff(r.toString(),i.toString()))}canPromptRecommendation(r){return this._withSyncedResources([r]).then(i=>i.canPromptRecommendation(r.toString()))}_getOrCreateModelManager(r){return this._modelManager||(this._modelManager=this._register(new m(r,this._notebookService))),this._modelManager}_withSyncedResources(r){return this._getProxy().then(i=>(this._getOrCreateModelManager(i).ensureSyncedResources(r),i))}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new y.SimpleWorkerClient(this._workerFactory,"vs/workbench/contrib/notebook/common/services/notebookSimpleWorker",new S(this)))}catch(r){throw r}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,r=>{throw r})}}}),define(Q[927],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookEditorWorkerService=e.ID_NOTEBOOK_EDITOR_WORKER_SERVICE=void 0,e.ID_NOTEBOOK_EDITOR_WORKER_SERVICE="notebookEditorWorkerService",e.INotebookEditorWorkerService=(0,t.createDecorator)(e.ID_NOTEBOOK_EDITOR_WORKER_SERVICE)}),define(Q[928],Y([1,0,8]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ctxAllCollapsed=e.ctxSortMode=e.ctxFilterOnType=e.ctxFollowsCursor=e.IOutlinePane=e.OutlineSortOrder=void 0;var y;(function(D){D[D.ByPosition=0]="ByPosition",D[D.ByName=1]="ByName",D[D.ByKind=2]="ByKind"})(y||(e.OutlineSortOrder=y={}));var b;(function(D){D.Id="outline"})(b||(e.IOutlinePane=b={})),e.ctxFollowsCursor=new t.RawContextKey("outlineFollowsCursor",!1),e.ctxFilterOnType=new t.RawContextKey("outlineFiltersOnType",!1),e.ctxSortMode=new t.RawContextKey("outlineSortMode",0),e.ctxAllCollapsed=new t.RawContextKey("outlineAllCollapsed",!1)}),define(Q[3599],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineViewState=void 0;class y{constructor(){this._followCursor=!1,this._filterOnType=!0,this._sortBy=0,this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event}dispose(){this._onDidChange.dispose()}set followCursor(D){D!==this._followCursor&&(this._followCursor=D,this._onDidChange.fire({followCursor:!0}))}get followCursor(){return this._followCursor}get filterOnType(){return this._filterOnType}set filterOnType(D){D!==this._filterOnType&&(this._filterOnType=D,this._onDidChange.fire({filterOnType:!0}))}set sortBy(D){D!==this._sortBy&&(this._sortBy=D,this._onDidChange.fire({sortBy:!0}))}get sortBy(){return this._sortBy}persist(D){D.store("outline/state",JSON.stringify({followCursor:this.followCursor,sortBy:this.sortBy,filterOnType:this.filterOnType}),1,1)}restore(D){const T=D.get("outline/state",1);if(!T)return;let f;try{f=JSON.parse(T)}catch{return}this.followCursor=f.followCursor,this.sortBy=f.sortBy??0,typeof f.filterOnType=="boolean"&&(this.filterOnType=f.filterOnType)}}e.OutlineViewState=y}),define(Q[465],Y([1,0,32,2863,77]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preferencesOpenSettingsIcon=e.preferencesFilterIcon=e.preferencesClearInputIcon=e.settingsDiscardIcon=e.settingsRemoveIcon=e.settingsEditIcon=e.keybindingsAddIcon=e.keybindingsEditIcon=e.keybindingsSortIcon=e.keybindingsRecordKeysIcon=e.settingsMoreActionIcon=e.settingsScopeDropDownIcon=void 0,e.settingsScopeDropDownIcon=(0,b.registerIcon)("settings-folder-dropdown",t.Codicon.triangleDown,(0,y.localize)(0,null)),e.settingsMoreActionIcon=(0,b.registerIcon)("settings-more-action",t.Codicon.gear,(0,y.localize)(1,null)),e.keybindingsRecordKeysIcon=(0,b.registerIcon)("keybindings-record-keys",t.Codicon.recordKeys,(0,y.localize)(2,null)),e.keybindingsSortIcon=(0,b.registerIcon)("keybindings-sort",t.Codicon.sortPrecedence,(0,y.localize)(3,null)),e.keybindingsEditIcon=(0,b.registerIcon)("keybindings-edit",t.Codicon.edit,(0,y.localize)(4,null)),e.keybindingsAddIcon=(0,b.registerIcon)("keybindings-add",t.Codicon.add,(0,y.localize)(5,null)),e.settingsEditIcon=(0,b.registerIcon)("settings-edit",t.Codicon.edit,(0,y.localize)(6,null)),e.settingsRemoveIcon=(0,b.registerIcon)("settings-remove",t.Codicon.close,(0,y.localize)(7,null)),e.settingsDiscardIcon=(0,b.registerIcon)("settings-discard",t.Codicon.discard,(0,y.localize)(8,null)),e.preferencesClearInputIcon=(0,b.registerIcon)("preferences-clear-input",t.Codicon.clearAll,(0,y.localize)(9,null)),e.preferencesFilterIcon=(0,b.registerIcon)("preferences-filter",t.Codicon.filter,(0,y.localize)(10,null)),e.preferencesOpenSettingsIcon=(0,b.registerIcon)("preferences-open-settings",t.Codicon.goToFile,(0,y.localize)(11,null))}),define(Q[333],Y([1,0,8,5]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getExperimentalExtensionToggleData=e.ENABLE_EXTENSION_TOGGLE_SETTINGS=e.ENABLE_LANGUAGE_FILTER=e.KEYBOARD_LAYOUT_OPEN_PICKER=e.REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG=e.WORKSPACE_TRUST_SETTING_TAG=e.POLICY_SETTING_TAG=e.GENERAL_TAG_SETTING_TAG=e.LANGUAGE_SETTING_TAG=e.ID_SETTING_TAG=e.FEATURE_SETTING_TAG=e.EXTENSION_SETTING_TAG=e.MODIFIED_SETTING_TAG=e.KEYBINDINGS_EDITOR_SHOW_EXTENSION_KEYBINDINGS=e.KEYBINDINGS_EDITOR_SHOW_USER_KEYBINDINGS=e.KEYBINDINGS_EDITOR_SHOW_DEFAULT_KEYBINDINGS=e.KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS=e.KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR=e.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_TITLE=e.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND=e.KEYBINDINGS_EDITOR_COMMAND_COPY=e.KEYBINDINGS_EDITOR_COMMAND_RESET=e.KEYBINDINGS_EDITOR_COMMAND_REMOVE=e.KEYBINDINGS_EDITOR_COMMAND_REJECT_WHEN=e.KEYBINDINGS_EDITOR_COMMAND_ACCEPT_WHEN=e.KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN=e.KEYBINDINGS_EDITOR_COMMAND_ADD=e.KEYBINDINGS_EDITOR_COMMAND_DEFINE=e.KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE=e.KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS=e.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_HISTORY=e.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS=e.KEYBINDINGS_EDITOR_COMMAND_SEARCH=e.CONTEXT_WHEN_FOCUS=e.CONTEXT_KEYBINDING_FOCUS=e.CONTEXT_KEYBINDINGS_SEARCH_FOCUS=e.CONTEXT_KEYBINDINGS_EDITOR=e.CONTEXT_SETTINGS_ROW_FOCUS=e.CONTEXT_TOC_ROW_FOCUS=e.CONTEXT_SETTINGS_SEARCH_FOCUS=e.CONTEXT_SETTINGS_JSON_EDITOR=e.CONTEXT_SETTINGS_EDITOR=e.SETTINGS_EDITOR_COMMAND_SUGGEST_FILTERS=e.SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU=e.SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS=e.IPreferencesSearchService=void 0,e.IPreferencesSearchService=(0,y.createDecorator)("preferencesSearchService"),e.SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS="settings.action.clearSearchResults",e.SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU="settings.action.showContextMenu",e.SETTINGS_EDITOR_COMMAND_SUGGEST_FILTERS="settings.action.suggestFilters",e.CONTEXT_SETTINGS_EDITOR=new t.RawContextKey("inSettingsEditor",!1),e.CONTEXT_SETTINGS_JSON_EDITOR=new t.RawContextKey("inSettingsJSONEditor",!1),e.CONTEXT_SETTINGS_SEARCH_FOCUS=new t.RawContextKey("inSettingsSearch",!1),e.CONTEXT_TOC_ROW_FOCUS=new t.RawContextKey("settingsTocRowFocus",!1),e.CONTEXT_SETTINGS_ROW_FOCUS=new t.RawContextKey("settingRowFocus",!1),e.CONTEXT_KEYBINDINGS_EDITOR=new t.RawContextKey("inKeybindings",!1),e.CONTEXT_KEYBINDINGS_SEARCH_FOCUS=new t.RawContextKey("inKeybindingsSearch",!1),e.CONTEXT_KEYBINDING_FOCUS=new t.RawContextKey("keybindingFocus",!1),e.CONTEXT_WHEN_FOCUS=new t.RawContextKey("whenFocus",!1),e.KEYBINDINGS_EDITOR_COMMAND_SEARCH="keybindings.editor.searchKeybindings",e.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS="keybindings.editor.clearSearchResults",e.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_HISTORY="keybindings.editor.clearSearchHistory",e.KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS="keybindings.editor.recordSearchKeys",e.KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE="keybindings.editor.toggleSortByPrecedence",e.KEYBINDINGS_EDITOR_COMMAND_DEFINE="keybindings.editor.defineKeybinding",e.KEYBINDINGS_EDITOR_COMMAND_ADD="keybindings.editor.addKeybinding",e.KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN="keybindings.editor.defineWhenExpression",e.KEYBINDINGS_EDITOR_COMMAND_ACCEPT_WHEN="keybindings.editor.acceptWhenExpression",e.KEYBINDINGS_EDITOR_COMMAND_REJECT_WHEN="keybindings.editor.rejectWhenExpression",e.KEYBINDINGS_EDITOR_COMMAND_REMOVE="keybindings.editor.removeKeybinding",e.KEYBINDINGS_EDITOR_COMMAND_RESET="keybindings.editor.resetKeybinding",e.KEYBINDINGS_EDITOR_COMMAND_COPY="keybindings.editor.copyKeybindingEntry",e.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND="keybindings.editor.copyCommandKeybindingEntry",e.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_TITLE="keybindings.editor.copyCommandTitle",e.KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR="keybindings.editor.showConflicts",e.KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS="keybindings.editor.focusKeybindings",e.KEYBINDINGS_EDITOR_SHOW_DEFAULT_KEYBINDINGS="keybindings.editor.showDefaultKeybindings",e.KEYBINDINGS_EDITOR_SHOW_USER_KEYBINDINGS="keybindings.editor.showUserKeybindings",e.KEYBINDINGS_EDITOR_SHOW_EXTENSION_KEYBINDINGS="keybindings.editor.showExtensionKeybindings",e.MODIFIED_SETTING_TAG="modified",e.EXTENSION_SETTING_TAG="ext:",e.FEATURE_SETTING_TAG="feature:",e.ID_SETTING_TAG="id:",e.LANGUAGE_SETTING_TAG="lang:",e.GENERAL_TAG_SETTING_TAG="tag:",e.POLICY_SETTING_TAG="hasPolicy",e.WORKSPACE_TRUST_SETTING_TAG="workspaceTrust",e.REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG="requireTrustedWorkspace",e.KEYBOARD_LAYOUT_OPEN_PICKER="workbench.action.openKeyboardLayoutPicker",e.ENABLE_LANGUAGE_FILTER=!0,e.ENABLE_EXTENSION_TOGGLE_SETTINGS=!0;let b;async function D(T,f,v){if(!e.ENABLE_EXTENSION_TOGGLE_SETTINGS)return;if(b)return b;if((await T.getTreatment("ExtensionToggleSettings")||!f.isBuilt)&&v.extensionRecommendations&&v.commonlyUsedSettings){const S={};return Object.keys(v.extensionRecommendations).forEach(h=>{const a=v.extensionRecommendations[h];a.onSettingsEditorOpen&&(S[h]=a)}),b={settingsEditorRecommendedExtensions:S,commonlyUsed:v.commonlyUsedSettings},b}}e.getExperimentalExtensionToggleData=D}),define(Q[929],Y([1,0,18,2868,333]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.knownTermMappings=e.knownAcronyms=e.tocData=e.getCommonlyUsedData=void 0;const D=["files.autoSave","editor.fontSize","editor.fontFamily","editor.tabSize","editor.renderWhitespace","editor.cursorStyle","editor.multiCursorModifier","editor.insertSpaces","editor.wordWrap","files.exclude","files.associations","workbench.editor.enablePreview"];async function T(f,v,m){const S=await(0,b.getExperimentalExtensionToggleData)(f,v,m);return{id:"commonlyUsed",label:(0,y.localize)(0,null),settings:S?S.commonlyUsed:D}}e.getCommonlyUsedData=T,e.tocData={id:"root",label:"root",children:[{id:"editor",label:(0,y.localize)(1,null),settings:["editor.*"],children:[{id:"editor/cursor",label:(0,y.localize)(2,null),settings:["editor.cursor*"]},{id:"editor/find",label:(0,y.localize)(3,null),settings:["editor.find.*"]},{id:"editor/font",label:(0,y.localize)(4,null),settings:["editor.font*"]},{id:"editor/format",label:(0,y.localize)(5,null),settings:["editor.format*"]},{id:"editor/diffEditor",label:(0,y.localize)(6,null),settings:["diffEditor.*"]},{id:"editor/minimap",label:(0,y.localize)(7,null),settings:["editor.minimap.*"]},{id:"editor/suggestions",label:(0,y.localize)(8,null),settings:["editor.*suggest*"]},{id:"editor/files",label:(0,y.localize)(9,null),settings:["files.*"]}]},{id:"workbench",label:(0,y.localize)(10,null),settings:["workbench.*"],children:[{id:"workbench/appearance",label:(0,y.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:(0,y.localize)(12,null),settings:["breadcrumbs.*"]},{id:"workbench/editor",label:(0,y.localize)(13,null),settings:["workbench.editor.*"]},{id:"workbench/settings",label:(0,y.localize)(14,null),settings:["workbench.settings.*"]},{id:"workbench/zenmode",label:(0,y.localize)(15,null),settings:["zenmode.*"]},{id:"workbench/screencastmode",label:(0,y.localize)(16,null),settings:["screencastMode.*"]}]},{id:"window",label:(0,y.localize)(17,null),settings:["window.*"],children:[{id:"window/newWindow",label:(0,y.localize)(18,null),settings:["window.*newwindow*"]}]},{id:"features",label:(0,y.localize)(19,null),children:[{id:"features/accessibility",label:(0,y.localize)(20,null),settings:["accessibility.*"]},{id:"features/explorer",label:(0,y.localize)(21,null),settings:["explorer.*","outline.*"]},{id:"features/search",label:(0,y.localize)(22,null),settings:["search.*"]},{id:"features/debug",label:(0,y.localize)(23,null),settings:["debug.*","launch"]},{id:"features/testing",label:(0,y.localize)(24,null),settings:["testing.*"]},{id:"features/scm",label:(0,y.localize)(25,null),settings:["scm.*"]},{id:"features/extensions",label:(0,y.localize)(26,null),settings:["extensions.*"]},{id:"features/terminal",label:(0,y.localize)(27,null),settings:["terminal.*"]},{id:"features/task",label:(0,y.localize)(28,null),settings:["task.*"]},{id:"features/problems",label:(0,y.localize)(29,null),settings:["problems.*"]},{id:"features/output",label:(0,y.localize)(30,null),settings:["output.*"]},{id:"features/comments",label:(0,y.localize)(31,null),settings:["comments.*"]},{id:"features/remote",label:(0,y.localize)(32,null),settings:["remote.*"]},{id:"features/timeline",label:(0,y.localize)(33,null),settings:["timeline.*"]},{id:"features/notebook",label:(0,y.localize)(34,null),settings:["notebook.*","interactiveWindow.*"]},{id:"features/audioCues",label:(0,y.localize)(35,null),settings:["audioCues.*"]},{id:"features/mergeEditor",label:(0,y.localize)(36,null),settings:["mergeEditor.*"]},{id:"features/chat",label:(0,y.localize)(37,null),settings:["chat.*","inlineChat.*"]}]},{id:"application",label:(0,y.localize)(38,null),children:[{id:"application/http",label:(0,y.localize)(39,null),settings:["http.*"]},{id:"application/keyboard",label:(0,y.localize)(40,null),settings:["keyboard.*"]},{id:"application/update",label:(0,y.localize)(41,null),settings:["update.*"]},{id:"application/telemetry",label:(0,y.localize)(42,null),settings:["telemetry.*"]},{id:"application/settingsSync",label:(0,y.localize)(43,null),settings:["settingsSync.*"]},{id:"application/experimental",label:(0,y.localize)(44,null),settings:["application.experimental.*"]},{id:"application/other",label:(0,y.localize)(45,null),settings:["application.*"]}]},{id:"security",label:(0,y.localize)(46,null),settings:t.isWindows?["security.*"]:void 0,children:[{id:"security/workspace",label:(0,y.localize)(47,null),settings:["security.workspace.*"]}]}]},e.knownAcronyms=new Set,["css","html","scss","less","json","js","ts","ie","id","php","scm"].forEach(f=>e.knownAcronyms.add(f)),e.knownTermMappings=new Map,e.knownTermMappings.set("power shell","PowerShell"),e.knownTermMappings.set("powershell","PowerShell"),e.knownTermMappings.set("javascript","JavaScript"),e.knownTermMappings.set("typescript","TypeScript")}),define(Q[3600],Y([1,0,2123,929]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tocData=e.OBJECT_EXPLORER_CONFIG_PREFIX=void 0,e.OBJECT_EXPLORER_CONFIG_PREFIX="objectExplorer",e.tocData=Object.assign({},y.tocData);let b=[{id:"data",label:(0,t.localize)(0,null),children:[{id:"data/connection",label:(0,t.localize)(1,null),settings:["connection.*","datasource.*"]},{id:"data/objectExplorer",label:(0,t.localize)(2,null),settings:["startup.alwaysShowServersView","serverTree.*","serverGroup.*"]},{id:"data/queryEditor",label:(0,t.localize)(3,null),settings:["queryEditor.*"]},{id:"data/notebook",label:(0,t.localize)(4,null),settings:["notebook.*"]},{id:"data/dashboard",label:(0,t.localize)(5,null),settings:["dashboard.*"]},{id:"data/profiler",label:(0,t.localize)(6,null),settings:["profiler.*"]},{id:"data/builtinCharts",label:(0,t.localize)(7,null),settings:["builtinCharts.*"]},{id:"data/tableDesigner",label:(0,t.localize)(8,null),settings:["tableDesigner.*"]},{id:"data/executionPlan",label:(0,t.localize)(9,null),settings:["executionPlan.*"]}]}];e.tocData.children.push(...b)}),define(Q[3601],Y([1,0,325,311,2869,29,333]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsSearchFilterDropdownMenuActionViewItem=void 0;let f=class extends t.DropdownMenuActionViewItem{constructor(m,S,h,a){super(m,{getActions:()=>this.getActions()},a,{actionRunner:S,classNames:m.class,anchorAlignmentProvider:()=>1,menuAsChild:!0}),this.searchWidget=h,this.suggestController=y.SuggestController.get(this.searchWidget.inputWidget)}render(m){super.render(m)}doSearchWidgetAction(m,S){this.searchWidget.setValue(this.searchWidget.getValue().trimEnd()+" "+m),this.searchWidget.focus(),S&&this.suggestController&&this.suggestController.triggerSuggest()}createAction(m,S,h,a,r){return{id:m,label:S,tooltip:h,class:void 0,enabled:!0,checked:!1,run:()=>{this.doSearchWidgetAction(a,r)}}}createToggleAction(m,S,h,a){const i=this.searchWidget.getValue().split(" ").includes(a);return{id:m,label:S,tooltip:h,class:void 0,enabled:!0,checked:i,run:()=>{if(i){const s=this.searchWidget.getValue().split(" ").filter(o=>o!==a).join(" ");this.searchWidget.setValue(s)}else{const s=this.searchWidget.getValue().trimEnd(),o=s?s+" "+a:a;this.searchWidget.setValue(o)}this.searchWidget.focus()}}}getActions(){return[this.createToggleAction("modifiedSettingsSearch",(0,b.localize)(0,null),(0,b.localize)(1,null),`@${T.MODIFIED_SETTING_TAG}`),this.createAction("extSettingsSearch",(0,b.localize)(2,null),(0,b.localize)(3,null),`@${T.EXTENSION_SETTING_TAG}`,!0),this.createAction("featuresSettingsSearch",(0,b.localize)(4,null),(0,b.localize)(5,null),`@${T.FEATURE_SETTING_TAG}`,!0),this.createAction("tagSettingsSearch",(0,b.localize)(6,null),(0,b.localize)(7,null),`@${T.GENERAL_TAG_SETTING_TAG}`,!0),this.createAction("langSettingsSearch",(0,b.localize)(8,null),(0,b.localize)(9,null),`@${T.LANGUAGE_SETTING_TAG}`,!0),this.createToggleAction("onlineSettingsSearch",(0,b.localize)(10,null),(0,b.localize)(11,null),"@tag:usesOnlineServices"),this.createToggleAction("policySettingsSearch",(0,b.localize)(12,null),(0,b.localize)(13,null),`@${T.POLICY_SETTING_TAG}`)]}};e.SettingsSearchFilterDropdownMenuActionViewItem=f,e.SettingsSearchFilterDropdownMenuActionViewItem=f=fe([O(3,D.IContextMenuService)],f)}),define(Q[466],Y([1,0,80,2874,36,84]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.focusedRowBorder=e.rowHoverBackground=e.focusedRowBackground=e.settingsNumberInputBorder=e.settingsNumberInputForeground=e.settingsNumberInputBackground=e.settingsTextInputBorder=e.settingsTextInputForeground=e.settingsTextInputBackground=e.settingsCheckboxBorder=e.settingsCheckboxForeground=e.settingsCheckboxBackground=e.settingsSelectListBorder=e.settingsSelectBorder=e.settingsSelectForeground=e.settingsSelectBackground=e.settingsSashBorder=e.settingsHeaderBorder=e.modifiedItemIndicator=e.settingsHeaderHoverForeground=e.settingsHeaderForeground=void 0,e.settingsHeaderForeground=(0,b.registerColor)("settings.headerForeground",{light:"#444444",dark:"#e7e7e7",hcDark:"#ffffff",hcLight:"#292929"},(0,y.localize)(0,null)),e.settingsHeaderHoverForeground=(0,b.registerColor)("settings.settingsHeaderHoverForeground",{light:(0,b.transparent)(e.settingsHeaderForeground,.7),dark:(0,b.transparent)(e.settingsHeaderForeground,.7),hcDark:(0,b.transparent)(e.settingsHeaderForeground,.7),hcLight:(0,b.transparent)(e.settingsHeaderForeground,.7)},(0,y.localize)(1,null)),e.modifiedItemIndicator=(0,b.registerColor)("settings.modifiedItemIndicator",{light:new t.Color(new t.RGBA(102,175,224)),dark:new t.Color(new t.RGBA(12,125,157)),hcDark:new t.Color(new t.RGBA(0,73,122)),hcLight:new t.Color(new t.RGBA(102,175,224))},(0,y.localize)(2,null)),e.settingsHeaderBorder=(0,b.registerColor)("settings.headerBorder",{dark:D.PANEL_BORDER,light:D.PANEL_BORDER,hcDark:D.PANEL_BORDER,hcLight:D.PANEL_BORDER},(0,y.localize)(3,null)),e.settingsSashBorder=(0,b.registerColor)("settings.sashBorder",{dark:D.PANEL_BORDER,light:D.PANEL_BORDER,hcDark:D.PANEL_BORDER,hcLight:D.PANEL_BORDER},(0,y.localize)(4,null)),e.settingsSelectBackground=(0,b.registerColor)("settings.dropdownBackground",{dark:b.selectBackground,light:b.selectBackground,hcDark:b.selectBackground,hcLight:b.selectBackground},(0,y.localize)(5,null)),e.settingsSelectForeground=(0,b.registerColor)("settings.dropdownForeground",{dark:b.selectForeground,light:b.selectForeground,hcDark:b.selectForeground,hcLight:b.selectForeground},(0,y.localize)(6,null)),e.settingsSelectBorder=(0,b.registerColor)("settings.dropdownBorder",{dark:b.selectBorder,light:b.selectBorder,hcDark:b.selectBorder,hcLight:b.selectBorder},(0,y.localize)(7,null)),e.settingsSelectListBorder=(0,b.registerColor)("settings.dropdownListBorder",{dark:b.editorWidgetBorder,light:b.editorWidgetBorder,hcDark:b.editorWidgetBorder,hcLight:b.editorWidgetBorder},(0,y.localize)(8,null)),e.settingsCheckboxBackground=(0,b.registerColor)("settings.checkboxBackground",{dark:b.checkboxBackground,light:b.checkboxBackground,hcDark:b.checkboxBackground,hcLight:b.checkboxBackground},(0,y.localize)(9,null)),e.settingsCheckboxForeground=(0,b.registerColor)("settings.checkboxForeground",{dark:b.checkboxForeground,light:b.checkboxForeground,hcDark:b.checkboxForeground,hcLight:b.checkboxForeground},(0,y.localize)(10,null)),e.settingsCheckboxBorder=(0,b.registerColor)("settings.checkboxBorder",{dark:b.checkboxBorder,light:b.checkboxBorder,hcDark:b.checkboxBorder,hcLight:b.checkboxBorder},(0,y.localize)(11,null)),e.settingsTextInputBackground=(0,b.registerColor)("settings.textInputBackground",{dark:b.inputBackground,light:b.inputBackground,hcDark:b.inputBackground,hcLight:b.inputBackground},(0,y.localize)(12,null)),e.settingsTextInputForeground=(0,b.registerColor)("settings.textInputForeground",{dark:b.inputForeground,light:b.inputForeground,hcDark:b.inputForeground,hcLight:b.inputForeground},(0,y.localize)(13,null)),e.settingsTextInputBorder=(0,b.registerColor)("settings.textInputBorder",{dark:b.inputBorder,light:b.inputBorder,hcDark:b.inputBorder,hcLight:b.inputBorder},(0,y.localize)(14,null)),e.settingsNumberInputBackground=(0,b.registerColor)("settings.numberInputBackground",{dark:b.inputBackground,light:b.inputBackground,hcDark:b.inputBackground,hcLight:b.inputBackground},(0,y.localize)(15,null)),e.settingsNumberInputForeground=(0,b.registerColor)("settings.numberInputForeground",{dark:b.inputForeground,light:b.inputForeground,hcDark:b.inputForeground,hcLight:b.inputForeground},(0,y.localize)(16,null)),e.settingsNumberInputBorder=(0,b.registerColor)("settings.numberInputBorder",{dark:b.inputBorder,light:b.inputBorder,hcDark:b.inputBorder,hcLight:b.inputBorder},(0,y.localize)(17,null)),e.focusedRowBackground=(0,b.registerColor)("settings.focusedRowBackground",{dark:(0,b.transparent)(b.listHoverBackground,.6),light:(0,b.transparent)(b.listHoverBackground,.6),hcDark:null,hcLight:null},(0,y.localize)(18,null)),e.rowHoverBackground=(0,b.registerColor)("settings.rowHoverBackground",{dark:(0,b.transparent)(b.listHoverBackground,.3),light:(0,b.transparent)(b.listHoverBackground,.3),hcDark:null,hcLight:null},(0,y.localize)(19,null)),e.focusedRowBorder=(0,b.registerColor)("settings.focusedRowBorder",{dark:b.focusBorder,light:b.focusBorder,hcDark:b.focusBorder,hcLight:b.focusBorder},(0,y.localize)(20,null))}),define(Q[3602],Y([1,0,324,7,85,207,273,249,447,14,32,6,4,18,17,2871,29,19,37,465,466,54,1829]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectSettingCheckboxWidget=e.ObjectSettingDropdownWidget=e.IncludeSettingWidget=e.ExcludeSettingWidget=e.ListSettingWidget=e.AbstractListSettingWidget=e.ListSettingListModel=void 0;const n=y.$;class g{get items(){const L=this._dataItems.map((R,M)=>{const N=typeof this._editKey=="number"&&this._editKey===M;return{...R,editing:N,selected:M===this._selectedIdx||N}});return this._editKey==="create"&&L.push({editing:!0,selected:!0,...this._newDataItem}),L}constructor(L){this._dataItems=[],this._editKey=null,this._selectedIdx=null,this._newDataItem=L}setEditKey(L){this._editKey=L}setValue(L){this._dataItems=L}select(L){this._selectedIdx=L}getSelected(){return this._selectedIdx}selectNext(){typeof this._selectedIdx=="number"?this._selectedIdx=Math.min(this._selectedIdx+1,this._dataItems.length-1):this._selectedIdx=0}selectPrevious(){typeof this._selectedIdx=="number"?this._selectedIdx=Math.max(this._selectedIdx-1,0):this._selectedIdx=0}}e.ListSettingListModel=g;let w=class extends a.Disposable{get domNode(){return this.listElement}get items(){return this.model.items}get inReadMode(){return this.model.items.every(L=>!L.editing)}constructor(L,R,M){super(),this.container=L,this.themeService=R,this.contextViewService=M,this.rowElements=[],this._onDidChangeList=this._register(new h.Emitter),this.model=new g(this.getEmptyItem()),this.listDisposables=this._register(new a.DisposableStore),this.onDidChangeList=this._onDidChangeList.event,this.listElement=y.append(L,n("div")),this.listElement.setAttribute("role","list"),this.getContainerClasses().forEach(N=>this.listElement.classList.add(N)),y.append(L,this.renderAddButton()),this.renderList(),this._register(y.addDisposableListener(this.listElement,y.EventType.POINTER_DOWN,N=>this.onListClick(N))),this._register(y.addDisposableListener(this.listElement,y.EventType.DBLCLICK,N=>this.onListDoubleClick(N))),this._register(y.addStandardDisposableListener(this.listElement,"keydown",N=>{if(N.equals(16))this.selectPreviousRow();else if(N.equals(18))this.selectNextRow();else return;N.preventDefault(),N.stopPropagation()}))}setValue(L){this.model.setValue(L),this.renderList()}renderHeader(){}isAddButtonVisible(){return!0}renderList(){const L=y.isAncestor(document.activeElement,this.listElement);y.clearNode(this.listElement),this.listDisposables.clear();const R=this.model.items.some(N=>!!(N.editing&&this.isItemNew(N)));this.container.classList.toggle("setting-list-hide-add-button",!this.isAddButtonVisible()||R),this.model.items.length?this.listElement.tabIndex=0:this.listElement.removeAttribute("tabIndex");const M=this.renderHeader();M&&this.listElement.appendChild(M),this.rowElements=this.model.items.map((N,P)=>this.renderDataOrEditItem(N,P,L)),this.rowElements.forEach(N=>this.listElement.appendChild(N))}createBasicSelectBox(L){const R=L.options.map(({value:x,description:F})=>({text:x,description:F})),M=L.options.findIndex(x=>L.data===x.value),N=(0,l.getSelectBoxStyles)({selectBackground:c.settingsSelectBackground,selectForeground:c.settingsSelectForeground,selectBorder:c.settingsSelectBorder,selectListBorder:c.settingsSelectListBorder});return new v.SelectBox(R,M,this.contextViewService,N,{useCustomDrawn:!(r.isIOS&&t.BrowserFeatures.pointerEvents)})}editSetting(L){this.model.setEditKey(L),this.renderList()}cancelEdit(){this.model.setEditKey("none"),this.renderList()}handleItemChange(L,R,M){this.model.setEditKey("none"),this._onDidChangeList.fire({originalItem:L,item:R,targetIndex:M}),this.renderList()}renderDataOrEditItem(L,R,M){const N=L.editing?this.renderEdit(L,R):this.renderDataItem(L,R,M);return N.setAttribute("role","listitem"),N}renderDataItem(L,R,M){const N=this.renderItem(L,R),P=N.rowElement;P.setAttribute("data-index",R+""),P.setAttribute("tabindex",L.selected?"0":"-1"),P.classList.toggle("selected",L.selected);const x=new b.ActionBar(P);return this.listDisposables.add(x),x.push(this.getActionsForItem(L,R),{icon:!0,label:!0}),this.addTooltipsToRow(N,L),L.selected&&M&&this.listDisposables.add((0,m.disposableTimeout)(()=>P.focus())),this.listDisposables.add(y.addDisposableListener(P,"click",F=>{F.stopPropagation()})),P}renderAddButton(){const L=n(".setting-list-new-row"),R=this._register(new D.Button(L,l.defaultButtonStyles));return R.label=this.getLocalizedStrings().addButtonLabel,R.element.classList.add("setting-list-addButton"),this._register(R.onDidClick(()=>{this.model.setEditKey("create"),this.renderList()})),L}onListClick(L){const R=this.getClickedItemIndex(L);R<0||(L.preventDefault(),L.stopImmediatePropagation(),this.model.getSelected()!==R&&this.selectRow(R))}onListDoubleClick(L){const R=this.getClickedItemIndex(L);if(R<0)return;this.model.items[R]&&(this.editSetting(R),L.preventDefault(),L.stopPropagation())}getClickedItemIndex(L){if(!L.target||y.findParentWithClass(L.target,"monaco-action-bar"))return-1;const M=y.findParentWithClass(L.target,"setting-list-row");if(!M)return-1;const N=M.getAttribute("data-index");return N?parseInt(N):-1}selectRow(L){this.model.select(L),this.rowElements.forEach(M=>M.classList.remove("selected"));const R=this.rowElements[this.model.getSelected()];R.classList.add("selected"),R.focus()}selectNextRow(){this.model.selectNext(),this.selectRow(this.model.getSelected())}selectPreviousRow(){this.model.selectPrevious(),this.selectRow(this.model.getSelected())}};e.AbstractListSettingWidget=w,e.AbstractListSettingWidget=w=fe([O(1,u.IThemeService),O(2,o.IContextViewService)],w);class E extends w{constructor(){super(...arguments),this.showAddButton=!0}setValue(L,R){this.keyValueSuggester=R?.keySuggester,this.showAddButton=R?.showAddButton??!0,super.setValue(L)}getEmptyItem(){return{value:{type:"string",data:""}}}isAddButtonVisible(){return this.showAddButton}getContainerClasses(){return["setting-list-widget"]}getActionsForItem(L,R){return[{class:d.ThemeIcon.asClassName(p.settingsEditIcon),enabled:!0,id:"workbench.action.editListItem",tooltip:this.getLocalizedStrings().editActionTooltip,run:()=>this.editSetting(R)},{class:d.ThemeIcon.asClassName(p.settingsRemoveIcon),enabled:!0,id:"workbench.action.removeListItem",tooltip:this.getLocalizedStrings().deleteActionTooltip,run:()=>this._onDidChangeList.fire({originalItem:L,item:void 0,targetIndex:R})}]}getDragImage(L){const R=n(".monaco-drag-image");return R.textContent=L.value.data,R}renderItem(L,R){const M=n(".setting-list-row"),N=y.append(M,n(".setting-list-value")),P=y.append(M,n(".setting-list-sibling"));return N.textContent=L.value.data.toString(),P.textContent=L.sibling?`when: ${L.sibling}`:null,this.addDragAndDrop(M,L,R),{rowElement:M,keyElement:N,valueElement:P}}addDragAndDrop(L,R,M){this.inReadMode?(L.draggable=!0,L.classList.add("draggable")):(L.draggable=!1,L.classList.remove("draggable")),this.listDisposables.add(y.addDisposableListener(L,y.EventType.DRAG_START,P=>{if(this.dragDetails={element:L,item:R,itemIndex:M},P.dataTransfer){P.dataTransfer.dropEffect="move";const x=this.getDragImage(R);document.body.appendChild(x),P.dataTransfer.setDragImage(x,-10,-10),setTimeout(()=>document.body.removeChild(x),0)}})),this.listDisposables.add(y.addDisposableListener(L,y.EventType.DRAG_OVER,P=>this.dragDetails?(P.preventDefault(),P.dataTransfer&&(P.dataTransfer.dropEffect="move"),!0):!1));let N=0;this.listDisposables.add(y.addDisposableListener(L,y.EventType.DRAG_ENTER,P=>{N++,L.classList.add("drag-hover")})),this.listDisposables.add(y.addDisposableListener(L,y.EventType.DRAG_LEAVE,P=>{N--,N||L.classList.remove("drag-hover")})),this.listDisposables.add(y.addDisposableListener(L,y.EventType.DROP,P=>this.dragDetails?(P.preventDefault(),N=0,this.dragDetails.element!==L&&this._onDidChangeList.fire({originalItem:this.dragDetails.item,sourceIndex:this.dragDetails.itemIndex,item:R,targetIndex:M}),!0):!1)),this.listDisposables.add(y.addDisposableListener(L,y.EventType.DRAG_END,P=>{N=0,L.classList.remove("drag-hover"),P.dataTransfer?.clearData(),this.dragDetails&&(this.dragDetails=void 0)}))}renderEdit(L,R){const M=n(".setting-list-edit-row");let N,P,x;if(this.keyValueSuggester){const H=this.keyValueSuggester(this.model.items.map(({value:{data:U}})=>U),R);L={...L,value:{type:"enum",data:L.value.data,options:H?H.options:[]}}}switch(L.value.type){case"string":N=this.renderInputBox(L.value,M);break;case"enum":N=this.renderDropdown(L.value,M),x=L.value.options,L.value.options.length&&(P=this.isItemNew(L)?x[0].value:L.value.data);break}const F=()=>({value:{type:"string",data:N.value},sibling:z?.value}),V=H=>({value:{type:"enum",data:H,options:x??[]}}),W=H=>{H.equals(3)?this.handleItemChange(L,F(),R):H.equals(9)&&(this.cancelEdit(),H.preventDefault()),M?.focus()};if(L.value.type!=="string"){const H=N;this.listDisposables.add(H.onDidSelect(({selected:U})=>{P=U}))}else{const H=N;this.listDisposables.add(y.addStandardDisposableListener(H.inputElement,y.EventType.KEY_DOWN,W))}let z;(0,i.isUndefinedOrNull)(L.sibling)?N instanceof f.InputBox&&N.element.classList.add("no-sibling"):(z=new f.InputBox(M,this.contextViewService,{placeholder:this.getLocalizedStrings().siblingInputPlaceholder,inputBoxStyles:(0,l.getInputBoxStyle)({inputBackground:c.settingsTextInputBackground,inputForeground:c.settingsTextInputForeground,inputBorder:c.settingsTextInputBorder})}),z.element.classList.add("setting-list-siblingInput"),this.listDisposables.add(z),z.value=L.sibling,this.listDisposables.add(y.addStandardDisposableListener(z.inputElement,y.EventType.KEY_DOWN,W)));const B=this._register(new D.Button(M,l.defaultButtonStyles));B.label=(0,s.localize)(0,null),B.element.classList.add("setting-list-ok-button"),this.listDisposables.add(B.onDidClick(()=>{L.value.type==="string"?this.handleItemChange(L,F(),R):this.handleItemChange(L,V(P),R)}));const K=this._register(new D.Button(M,{secondary:!0,...l.defaultButtonStyles}));return K.label=(0,s.localize)(1,null),K.element.classList.add("setting-list-cancel-button"),this.listDisposables.add(K.onDidClick(()=>this.cancelEdit())),this.listDisposables.add((0,m.disposableTimeout)(()=>{N.focus(),N instanceof f.InputBox&&N.select()})),M}isItemNew(L){return L.value.data===""}addTooltipsToRow(L,{value:R,sibling:M}){const N=(0,i.isUndefinedOrNull)(M)?(0,s.localize)(2,null,R.data):(0,s.localize)(3,null,R.data,M),{rowElement:P}=L;P.title=N,P.setAttribute("aria-label",P.title)}getLocalizedStrings(){return{deleteActionTooltip:(0,s.localize)(4,null),editActionTooltip:(0,s.localize)(5,null),addButtonLabel:(0,s.localize)(6,null),inputPlaceholder:(0,s.localize)(7,null),siblingInputPlaceholder:(0,s.localize)(8,null)}}renderInputBox(L,R){const M=new f.InputBox(R,this.contextViewService,{placeholder:this.getLocalizedStrings().inputPlaceholder,inputBoxStyles:(0,l.getInputBoxStyle)({inputBackground:c.settingsTextInputBackground,inputForeground:c.settingsTextInputForeground,inputBorder:c.settingsTextInputBorder})});return M.element.classList.add("setting-list-valueInput"),this.listDisposables.add(M),M.value=L.data.toString(),M}renderDropdown(L,R){if(L.type!=="enum")throw new Error("Valuetype must be enum.");const M=this.createBasicSelectBox(L),N=n(".setting-list-object-list-row");return M.render(N),R.appendChild(N),M}}e.ListSettingWidget=E;class C extends E{getContainerClasses(){return["setting-list-include-exclude-widget"]}addDragAndDrop(L,R,M){}addTooltipsToRow(L,{value:R,sibling:M}){const N=(0,i.isUndefinedOrNull)(M)?(0,s.localize)(9,null,R.data):(0,s.localize)(10,null,R.data,M),{rowElement:P}=L;P.title=N,P.setAttribute("aria-label",P.title)}getLocalizedStrings(){return{deleteActionTooltip:(0,s.localize)(11,null),editActionTooltip:(0,s.localize)(12,null),addButtonLabel:(0,s.localize)(13,null),inputPlaceholder:(0,s.localize)(14,null),siblingInputPlaceholder:(0,s.localize)(15,null)}}}e.ExcludeSettingWidget=C;class I extends E{getContainerClasses(){return["setting-list-include-exclude-widget"]}addDragAndDrop(L,R,M){}addTooltipsToRow(L,{value:R,sibling:M}){const N=(0,i.isUndefinedOrNull)(M)?(0,s.localize)(16,null,R.data):(0,s.localize)(17,null,R.data,M),{rowElement:P}=L;P.title=N,P.setAttribute("aria-label",P.title)}getLocalizedStrings(){return{deleteActionTooltip:(0,s.localize)(18,null),editActionTooltip:(0,s.localize)(19,null),addButtonLabel:(0,s.localize)(20,null),inputPlaceholder:(0,s.localize)(21,null),siblingInputPlaceholder:(0,s.localize)(22,null)}}}e.IncludeSettingWidget=I;class _ extends w{constructor(){super(...arguments),this.currentSettingKey="",this.showAddButton=!0,this.keySuggester=()=>{},this.valueSuggester=()=>{}}setValue(L,R){this.showAddButton=R?.showAddButton??this.showAddButton,this.keySuggester=R?.keySuggester??this.keySuggester,this.valueSuggester=R?.valueSuggester??this.valueSuggester,(0,i.isDefined)(R)&&R.settingKey!==this.currentSettingKey&&(this.model.setEditKey("none"),this.model.select(null),this.currentSettingKey=R.settingKey),super.setValue(L)}isItemNew(L){return L.key.data===""&&L.value.data===""}isAddButtonVisible(){return this.showAddButton}getEmptyItem(){return{key:{type:"string",data:""},value:{type:"string",data:""},removable:!0}}getContainerClasses(){return["setting-list-object-widget"]}getActionsForItem(L,R){const M=[{class:d.ThemeIcon.asClassName(p.settingsEditIcon),enabled:!0,id:"workbench.action.editListItem",tooltip:this.getLocalizedStrings().editActionTooltip,run:()=>this.editSetting(R)}];return L.removable?M.push({class:d.ThemeIcon.asClassName(p.settingsRemoveIcon),enabled:!0,id:"workbench.action.removeListItem",tooltip:this.getLocalizedStrings().deleteActionTooltip,run:()=>this._onDidChangeList.fire({originalItem:L,item:void 0,targetIndex:R})}):M.push({class:d.ThemeIcon.asClassName(p.settingsDiscardIcon),enabled:!0,id:"workbench.action.resetListItem",tooltip:this.getLocalizedStrings().resetActionTooltip,run:()=>this._onDidChangeList.fire({originalItem:L,item:void 0,targetIndex:R})}),M}renderHeader(){const L=n(".setting-list-row-header"),R=y.append(L,n(".setting-list-object-key")),M=y.append(L,n(".setting-list-object-value")),{keyHeaderText:N,valueHeaderText:P}=this.getLocalizedStrings();return R.textContent=N,M.textContent=P,L}renderItem(L,R){const M=n(".setting-list-row");M.classList.add("setting-list-object-row");const N=y.append(M,n(".setting-list-object-key")),P=y.append(M,n(".setting-list-object-value"));return N.textContent=L.key.data,P.textContent=L.value.data.toString(),{rowElement:M,keyElement:N,valueElement:P}}renderEdit(L,R){const M=n(".setting-list-edit-row.setting-list-object-row"),N={...L},P=U=>{N.key=U,K.enabled=U.data!=="";const G=this.valueSuggester(U.data)??L.value;this.shouldUseSuggestion(L.value,N.value,G)&&(x(G),B())},x=U=>{N.value=U};let F,V;if(this.showAddButton){if(this.isItemNew(L)){const $=this.keySuggester(this.model.items.map(({key:{data:ie}})=>ie));if((0,i.isDefined)($)){N.key=$;const ie=this.valueSuggester(N.key.data);x(ie??N.value)}}const{widget:U,element:G}=this.renderEditWidget(N.key,{idx:R,isKey:!0,originalItem:L,changedItem:N,update:P});F=U,V=G}else V=n(".setting-list-object-key"),V.textContent=L.key.data;let W;const z=n(".setting-list-object-value-container"),B=()=>{const{widget:U,element:G}=this.renderEditWidget(N.value,{idx:R,isKey:!1,originalItem:L,changedItem:N,update:x});W=U,y.clearNode(z),z.append(G)};B(),M.append(V,z);const K=this._register(new D.Button(M,l.defaultButtonStyles));K.enabled=N.key.data!=="",K.label=(0,s.localize)(23,null),K.element.classList.add("setting-list-ok-button"),this.listDisposables.add(K.onDidClick(()=>this.handleItemChange(L,N,R)));const H=this._register(new D.Button(M,{secondary:!0,...l.defaultButtonStyles}));return H.label=(0,s.localize)(24,null),H.element.classList.add("setting-list-cancel-button"),this.listDisposables.add(H.onDidClick(()=>this.cancelEdit())),this.listDisposables.add((0,m.disposableTimeout)(()=>{const U=F??W;U.focus(),U instanceof f.InputBox&&U.select()})),M}renderEditWidget(L,R){switch(L.type){case"string":return this.renderStringEditWidget(L,R);case"enum":return this.renderEnumEditWidget(L,R);case"boolean":return this.renderEnumEditWidget({type:"enum",data:L.data.toString(),options:[{value:"true"},{value:"false"}]},R)}}renderStringEditWidget(L,{idx:R,isKey:M,originalItem:N,changedItem:P,update:x}){const F=n(M?".setting-list-object-input-key":".setting-list-object-input-value"),V=new f.InputBox(F,this.contextViewService,{placeholder:M?(0,s.localize)(25,null):(0,s.localize)(26,null),inputBoxStyles:(0,l.getInputBoxStyle)({inputBackground:c.settingsTextInputBackground,inputForeground:c.settingsTextInputForeground,inputBorder:c.settingsTextInputBorder})});V.element.classList.add("setting-list-object-input"),this.listDisposables.add(V),V.value=L.data,this.listDisposables.add(V.onDidChange(z=>x({...L,data:z})));const W=z=>{z.equals(3)?this.handleItemChange(N,P,R):z.equals(9)&&(this.cancelEdit(),z.preventDefault())};return this.listDisposables.add(y.addStandardDisposableListener(V.inputElement,y.EventType.KEY_DOWN,W)),{widget:V,element:F}}renderEnumEditWidget(L,{isKey:R,changedItem:M,update:N}){const P=this.createBasicSelectBox(L),x=R?M.key:M.value;this.listDisposables.add(P.onDidSelect(({selected:W})=>N(x.type==="boolean"?{...x,data:W==="true"}:{...x,data:W})));const F=n(".setting-list-object-input");return F.classList.add(R?"setting-list-object-input-key":"setting-list-object-input-value"),P.render(F),L.options.findIndex(W=>L.data===W.value)===-1&&L.options.length?N(x.type==="boolean"?{...x,data:!0}:{...x,data:L.options[0].value}):x.type==="boolean"&&N({...x,data:L.data==="true"}),{widget:P,element:F}}shouldUseSuggestion(L,R,M){if(M.type!=="enum"&&M.type===R.type&&M.data===R.data)return!1;if(L.data==="")return!0;if(R.type===M.type&&M.type!=="enum")return!1;if(R.type==="enum"&&M.type==="enum"){const N=new Set(R.options.map(({value:P})=>P));if(M.options.forEach(({value:P})=>N.delete(P)),N.size===0)return!1}return!0}addTooltipsToRow(L,R){const{keyElement:M,valueElement:N,rowElement:P}=L,x=(0,s.localize)(27,null,R.key.data,R.value.data),F=this.getEnumDescription(R.key)??R.keyDescription??x;M.title=F;const V=this.getEnumDescription(R.value)??x;N.title=V,P.setAttribute("aria-label",x)}getEnumDescription(L){return L.type==="enum"?L.options.find(({value:M})=>L.data===M)?.description:void 0}getLocalizedStrings(){return{deleteActionTooltip:(0,s.localize)(28,null),resetActionTooltip:(0,s.localize)(29,null),editActionTooltip:(0,s.localize)(30,null),addButtonLabel:(0,s.localize)(31,null),keyHeaderText:(0,s.localize)(32,null),valueHeaderText:(0,s.localize)(33,null)}}}e.ObjectSettingDropdownWidget=_;class A extends w{constructor(){super(...arguments),this.currentSettingKey=""}setValue(L,R){(0,i.isDefined)(R)&&R.settingKey!==this.currentSettingKey&&(this.model.setEditKey("none"),this.model.select(null),this.currentSettingKey=R.settingKey),super.setValue(L)}isItemNew(L){return!L.key.data&&!L.value.data}getEmptyItem(){return{key:{type:"string",data:""},value:{type:"boolean",data:!1},removable:!1}}getContainerClasses(){return["setting-list-object-widget"]}getActionsForItem(L,R){return[]}isAddButtonVisible(){return!1}renderHeader(){}renderDataOrEditItem(L,R,M){const N=this.renderEdit(L,R);return N.setAttribute("role","listitem"),N}renderItem(L,R){const M=n(".blank-row"),N=n(".blank-row-key");return{rowElement:M,keyElement:N}}renderEdit(L,R){const M=n(".setting-list-edit-row.setting-list-object-row.setting-item-bool"),N={...L},P=B=>{N.value.data=B,this.handleItemChange(L,N,R)},x=L.keyDescription?`${L.keyDescription} (${L.key.data})`:L.key.data,{element:F,widget:V}=this.renderEditWidget(N.value.data,x,P);M.appendChild(F);const W=y.append(M,n(".setting-list-object-value"));W.textContent=x;const z={rowElement:M,keyElement:W,valueElement:V.domNode};return this.addTooltipsToRow(z,L),this._register(y.addDisposableListener(W,y.EventType.MOUSE_DOWN,B=>{B.target.tagName.toLowerCase()!=="a"&&(V.checked=!V.checked,P(V.checked)),y.EventHelper.stop(B)})),M}renderEditWidget(L,R,M){const N=new T.Toggle({icon:S.Codicon.check,actionClassName:"setting-value-checkbox",isChecked:L,title:R,...T.unthemedToggleStyles});this.listDisposables.add(N);const P=n(".setting-list-object-input");return P.classList.add("setting-list-object-input-key-checkbox"),N.domNode.classList.add("setting-value-checkbox"),P.appendChild(N.domNode),this._register(y.addDisposableListener(P,y.EventType.MOUSE_DOWN,x=>{N.checked=!N.checked,M(N.checked),x.stopImmediatePropagation()})),{widget:N,element:P}}addTooltipsToRow(L,R){const M=(0,s.localize)(34,null,R.key.data,R.value.data),N=R.keyDescription??M,{rowElement:P,keyElement:x,valueElement:F}=L;x.title=N,F.setAttribute("aria-label",M),P.setAttribute("aria-label",M)}getLocalizedStrings(){return{deleteActionTooltip:(0,s.localize)(35,null),resetActionTooltip:(0,s.localize)(36,null),editActionTooltip:(0,s.localize)(37,null),addButtonLabel:(0,s.localize)(38,null),keyHeaderText:(0,s.localize)(39,null),valueHeaderText:(0,s.localize)(40,null)}}}e.ObjectSettingCheckboxWidget=A}),define(Q[3603],Y([1,0,161,51,27]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmartSnippetInserter=void 0;class D{static hasOpenBrace(f){for(;f.scan()!==17;)if(f.getToken()===1)return!0;return!1}static offsetToPosition(f,v){let m=0;const S=f.getEOL().length,h=f.getLineCount();for(let a=1;a<=h;a++){const r=f.getLineContent(a).length+S,i=m+r;if(i>v)return new y.Position(a,v-m+1);m=i}return new y.Position(h,f.getLineMaxColumn(h))}static insertSnippet(f,v){const m=f.getValueLengthInRange(new b.Range(1,1,v.lineNumber,v.column));let S;(function(p){p[p.INVALID=0]="INVALID",p[p.AFTER_OBJECT=1]="AFTER_OBJECT",p[p.BEFORE_OBJECT=2]="BEFORE_OBJECT"})(S||(S={}));let h=S.INVALID,a=-1,r=S.INVALID;const i=(0,t.createScanner)(f.getValue());let s=0,o=0;const u=(p,c)=>{c!==S.INVALID&&s===1&&o===0?(h=c,a=p,r=c):h!==S.INVALID&&(h=S.INVALID,a=i.getTokenOffset())};for(;i.scan()!==17;){const p=i.getPosition(),c=i.getToken();let l=!1;switch(c){case 3:l=!0,s++,u(p,S.BEFORE_OBJECT);break;case 4:l=!0,s--,u(p,S.INVALID);break;case 5:l=!0,u(p,S.BEFORE_OBJECT);break;case 1:l=!0,o++,u(p,S.INVALID);break;case 2:l=!0,o--,u(p,S.AFTER_OBJECT);break;case 15:case 14:l=!0}if(p>=m&&(h!==S.INVALID||a!==-1)){let n,g;return h!==S.INVALID?(n=l?p:i.getTokenOffset(),g=h):(n=a,g=r),g===S.AFTER_OBJECT?{position:this.offsetToPosition(f,n),prepend:",",append:""}:(i.setPosition(n),{position:this.offsetToPosition(f,n),prepend:"",append:this.hasOpenBrace(i)?",":""})}}const d=f.getLineCount();return{position:new y.Position(d,f.getLineMaxColumn(d)),prepend:` [`,append:"]"}}}e.SmartSnippetInserter=D}),define(Q[1298],Y([1,0,2880,32,77]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forwardedPortWithProcessIcon=e.forwardedPortWithoutProcessIcon=e.labelPortIcon=e.copyAddressIcon=e.openPreviewIcon=e.openBrowserIcon=e.stopForwardIcon=e.forwardPortIcon=e.privatePortIcon=e.portIcon=e.portsViewIcon=e.remoteExplorerViewIcon=e.reportIssuesIcon=e.reviewIssuesIcon=e.feedbackIcon=e.documentationIcon=e.getStartedIcon=void 0,e.getStartedIcon=(0,b.registerIcon)("remote-explorer-get-started",y.Codicon.star,t.localize(0,null)),e.documentationIcon=(0,b.registerIcon)("remote-explorer-documentation",y.Codicon.book,t.localize(1,null)),e.feedbackIcon=(0,b.registerIcon)("remote-explorer-feedback",y.Codicon.twitter,t.localize(2,null)),e.reviewIssuesIcon=(0,b.registerIcon)("remote-explorer-review-issues",y.Codicon.issues,t.localize(3,null)),e.reportIssuesIcon=(0,b.registerIcon)("remote-explorer-report-issues",y.Codicon.comment,t.localize(4,null)),e.remoteExplorerViewIcon=(0,b.registerIcon)("remote-explorer-view-icon",y.Codicon.remoteExplorer,t.localize(5,null)),e.portsViewIcon=(0,b.registerIcon)("ports-view-icon",y.Codicon.plug,t.localize(6,null)),e.portIcon=(0,b.registerIcon)("ports-view-icon",y.Codicon.plug,t.localize(7,null)),e.privatePortIcon=(0,b.registerIcon)("private-ports-view-icon",y.Codicon.lock,t.localize(8,null)),e.forwardPortIcon=(0,b.registerIcon)("ports-forward-icon",y.Codicon.plus,t.localize(9,null)),e.stopForwardIcon=(0,b.registerIcon)("ports-stop-forward-icon",y.Codicon.x,t.localize(10,null)),e.openBrowserIcon=(0,b.registerIcon)("ports-open-browser-icon",y.Codicon.globe,t.localize(11,null)),e.openPreviewIcon=(0,b.registerIcon)("ports-open-preview-icon",y.Codicon.openPreview,t.localize(12,null)),e.copyAddressIcon=(0,b.registerIcon)("ports-copy-address-icon",y.Codicon.clippy,t.localize(13,null)),e.labelPortIcon=(0,b.registerIcon)("ports-label-icon",y.Codicon.tag,t.localize(14,null)),e.forwardedPortWithoutProcessIcon=(0,b.registerIcon)("ports-forwarded-without-process-icon",y.Codicon.circleOutline,t.localize(15,null)),e.forwardedPortWithProcessIcon=(0,b.registerIcon)("ports-forwarded-with-process-icon",y.Codicon.circleFilled,t.localize(16,null))}),define(Q[3604],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UrlFinder=void 0;class b extends y.Disposable{static{this.terminalCodesRegex=/(?:\u001B|\u009B)[\[\]()#;?]*(?:(?:(?:[a-zA-Z0-9]*(?:;[a-zA-Z0-9]*)*)?\u0007)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-PR-TZcf-ntqry=><~]))/g}static{this.localUrlRegex=/\b\w{2,20}:\/\/(?:localhost|127\.0\.0\.1|0\.0\.0\.0|:\d{2,5})[\w\-\.\~:\/\?\#[\]\@!\$&\(\)\*\+\,\;\=]*/gim}static{this.extractPortRegex=/(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d{1,5})/}static{this.localPythonServerRegex=/HTTP\son\s(127\.0\.0\.1|0\.0\.0\.0)\sport\s(\d+)/}static{this.excludeTerminals=["Dev Containers"]}constructor(T,f){super(),this._onDidMatchLocalUrl=new t.Emitter,this.onDidMatchLocalUrl=this._onDidMatchLocalUrl.event,this.listeners=new Map,this.replPositions=new Map,T.instances.forEach(v=>{this.registerTerminalInstance(v)}),this._register(T.onDidCreateInstance(v=>{this.registerTerminalInstance(v)})),this._register(T.onDidDisposeInstance(v=>{this.listeners.get(v)?.dispose(),this.listeners.delete(v)})),this._register(f.onDidNewSession(v=>{(!v.parentSession||v.parentSession&&v.hasSeparateRepl())&&this.listeners.set(v.getId(),v.onDidChangeReplElements(()=>{this.processNewReplElements(v)}))})),this._register(f.onDidEndSession(v=>{this.listeners.has(v.getId())&&(this.listeners.get(v.getId())?.dispose(),this.listeners.delete(v.getId()))}))}registerTerminalInstance(T){b.excludeTerminals.includes(T.title)||this.listeners.set(T,T.onData(f=>{this.processData(f)}))}processNewReplElements(T){const f=this.replPositions.get(T.getId()),v=T.getReplElements();if(this.replPositions.set(T.getId(),{position:v.length-1,tail:v[v.length-1]}),!f&&v.length>0)v.forEach(m=>this.processData(m.toString()));else if(f&&v.length-1!==f.position)for(let m=v.length-1;m>=0;m--){const S=v[m];if(S===f.tail)break;this.processData(S.toString())}}dispose(){super.dispose();const T=this.listeners.values();for(const f of T)f.dispose()}processData(T){T=T.replace(b.terminalCodesRegex,"");const f=T.match(b.localUrlRegex)||[];if(f&&f.length>0)f.forEach(v=>{let m;try{m=new URL(v)}catch{}if(m){const S=v.match(b.extractPortRegex),h=parseFloat(m.port?m.port:S?S[2]:"NaN");if(!isNaN(h)&&Number.isInteger(h)&&h>0&&h<=65535){let a=m.hostname;if(a!=="0.0.0.0"&&a!=="127.0.0.1"&&(a="localhost"),h!==9229&&T.startsWith("Debugger listening on"))return;this._onDidMatchLocalUrl.fire({port:h,host:a})}}});else{const v=T.match(b.localPythonServerRegex);v&&v.length===3&&this._onDidMatchLocalUrl.fire({host:v[1],port:Number(v[2])})}}}e.UrlFinder=b}),define(Q[3605],Y([1,0,226,229,6,4,9]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SashSettingsController=e.maxSize=e.minSize=void 0,e.minSize=1,e.maxSize=20;let f=class{constructor(m){this.configurationService=m,this.disposables=new D.DisposableStore,b.Event.filter(m.onDidChangeConfiguration,a=>a.affectsConfiguration("workbench.sash.size"))(this.onDidChangeSize,this,this.disposables),this.onDidChangeSize(),b.Event.filter(m.onDidChangeConfiguration,a=>a.affectsConfiguration("workbench.sash.hoverDelay"))(this.onDidChangeHoverDelay,this,this.disposables),this.onDidChangeHoverDelay()}onDidChangeSize(){const m=this.configurationService.getValue("workbench.sash.size"),S=(0,t.clamp)(m,4,20),h=(0,t.clamp)(m,1,8);document.documentElement.style.setProperty("--vscode-sash-size",S+"px"),document.documentElement.style.setProperty("--vscode-sash-hover-size",h+"px"),(0,y.setGlobalSashSize)(S)}onDidChangeHoverDelay(){(0,y.setGlobalHoverDelay)(this.configurationService.getValue("workbench.sash.hoverDelay"))}dispose(){this.disposables.dispose()}};e.SashSettingsController=f,e.SashSettingsController=f=fe([O(0,T.IConfigurationService)],f)}),define(Q[3606],Y([1,0,2886,34,29,157,54,19,264,36]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SwitchQuickDiffBaseAction=e.SwitchQuickDiffViewItem=void 0;let S=class extends D.SelectActionViewItem{constructor(r,i,s,o,u){const d=i.map(E=>({provider:E,text:E}));let p=i.indexOf(s);p===-1&&(p=0);const c={...T.defaultSelectBoxStyles},l=u.getColorTheme(),n=l.getColor(m.editorBackground),w=l.getColor(v.peekViewTitleBackground)?.makeOpaque(n)??n;c.selectBackground=w.lighten(.6).toString(),super(null,r,d,p,o,c,{ariaLabel:t.localize(0,null)}),this.optionsItems=d}setSelection(r){const i=this.optionsItems.findIndex(s=>s.provider===r);this.select(i)}getActionContext(r,i){return this.optionsItems[i]}render(r){super.render(r),this.setFocusable(!0)}};e.SwitchQuickDiffViewItem=S,e.SwitchQuickDiffViewItem=S=fe([O(3,b.IContextViewService),O(4,f.IThemeService)],S);class h extends y.Action{static{this.ID="quickDiff.base.switch"}static{this.LABEL=t.localize(1,null)}constructor(r){super(h.ID,h.LABEL,void 0,void 0),this.callback=r}async run(r){return this.callback(r)}}e.SwitchQuickDiffBaseAction=h}),define(Q[930],Y([1,0,34,88,20,157,169,7]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getActionViewItemProvider=e.StatusBarAction=e.collectContextMenuActions=e.connectPrimaryMenuToInlineActionBar=e.connectPrimaryMenu=e.isSCMResource=e.isSCMResourceGroup=e.isSCMActionButton=e.isSCMInput=e.isSCMRepository=void 0;function v(c){return!!c.provider&&!!c.input}e.isSCMRepository=v;function m(c){return!!c.validateInput&&typeof c.value=="string"}e.isSCMInput=m;function S(c){return c.type==="actionButton"}e.isSCMActionButton=S;function h(c){return!!c.provider&&!!c.elements}e.isSCMResourceGroup=h;function a(c){return!!c.sourceUri&&h(c.resourceGroup)}e.isSCMResource=a;const r=(c,l)=>c.id===l.id&&c.enabled===l.enabled;function i(c,l,n){let g=[],w=[];const E=()=>{const C=[],I=[];(0,y.createAndFillInActionBarActions)(c,{shouldForwardArgs:!0},{primary:C,secondary:I},n),!((0,b.equals)(g,C,r)&&(0,b.equals)(w,I,r))&&(g=C,w=I,l(C,I))};return E(),c.onDidChange(E)}e.connectPrimaryMenu=i;function s(c,l){return i(c,n=>{l.clear(),l.push(n,{icon:!0,label:!1})},"inline")}e.connectPrimaryMenuToInlineActionBar=s;function o(c){const l=[],n=[];return(0,y.createAndFillInContextMenuActions)(c,{shouldForwardArgs:!0},{primary:l,secondary:n},"inline"),n}e.collectContextMenuActions=o;class u extends t.Action{constructor(l,n){super(`statusbaraction{${l.id}}`,l.title,"",!0),this.command=l,this.commandService=n,this.tooltip=l.tooltip||""}run(){return this.commandService.executeCommand(this.command.id,...this.command.arguments||[])}}e.StatusBarAction=u;class d extends D.ActionViewItem{constructor(l){super(null,l,{})}updateLabel(){this.options.label&&this.label&&(0,f.reset)(this.label,...(0,T.renderLabelWithIcons)(this.action.label))}}function p(c){return l=>l instanceof u?new d(l):(0,y.createActionViewItem)(c,l)}e.getActionViewItemProvider=p}),define(Q[615],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IQuickDiffService=void 0,e.IQuickDiffService=(0,t.createDecorator)("quickDiff")}),define(Q[3607],Y([1,0,4,26,838,6,64]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickDiffService=void 0;function f(m){return(S,h)=>{if(S.rootUri&&!h.rootUri)return-1;if(!S.rootUri&&h.rootUri)return 1;if(!S.rootUri&&!h.rootUri)return 0;const a=(0,y.isEqualOrParent)(m,S.rootUri),r=(0,y.isEqualOrParent)(m,h.rootUri);return a&&r?S.rootUri.fsPath.length-h.rootUri.fsPath.length:a?-1:r?1:0}}let v=class extends t.Disposable{constructor(S){super(),this.uriIdentityService=S,this.quickDiffProviders=new Set,this._onDidChangeQuickDiffProviders=this._register(new D.Emitter),this.onDidChangeQuickDiffProviders=this._onDidChangeQuickDiffProviders.event}addQuickDiffProvider(S){return this.quickDiffProviders.add(S),this._onDidChangeQuickDiffProviders.fire(),{dispose:()=>{this.quickDiffProviders.delete(S),this._onDidChangeQuickDiffProviders.fire()}}}isQuickDiff(S){return!!S.originalResource&&typeof S.label=="string"&&typeof S.isSCM=="boolean"}async getQuickDiffs(S,h="",a=!1){const r=Array.from(this.quickDiffProviders).filter(s=>!s.rootUri||this.uriIdentityService.extUri.isEqualOrParent(S,s.rootUri)).sort(f(S));return(await Promise.all(r.map(async s=>({originalResource:(s.selector?(0,b.score)(s.selector,S,h,a,void 0,void 0):10)>0?await s.getOriginalResource(S)??void 0:void 0,label:s.label,isSCM:s.isSCM})))).filter(this.isQuickDiff)}};e.QuickDiffService=v,e.QuickDiffService=v=fe([O(0,T.IUriIdentityService)],v)}),define(Q[293],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISCMViewService=e.ISCMRepositorySortKey=e.SCMInputChangeReason=e.InputValidationType=e.ISCMService=e.REPOSITORIES_VIEW_PANE_ID=e.VIEW_PANE_ID=e.VIEWLET_ID=void 0,e.VIEWLET_ID="workbench.view.scm",e.VIEW_PANE_ID="workbench.scm",e.REPOSITORIES_VIEW_PANE_ID="workbench.scm.repositories",e.ISCMService=(0,t.createDecorator)("scm");var y;(function(T){T[T.Error=0]="Error",T[T.Warning=1]="Warning",T[T.Information=2]="Information"})(y||(e.InputValidationType=y={}));var b;(function(T){T[T.HistoryPrevious=0]="HistoryPrevious",T[T.HistoryNext=1]="HistoryNext"})(b||(e.SCMInputChangeReason=b={}));var D;(function(T){T.DiscoveryTime="discoveryTime",T.Name="name",T.Path="path"})(D||(e.ISCMRepositorySortKey=D={})),e.ISCMViewService=(0,t.createDecorator)("scmView")}),define(Q[3608],Y([1,0,6,4,8,13,88,293,20,5,134,2888,561]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMMenus=e.SCMRepositoryMenus=e.SCMTitleMenu=void 0;function a(u,d){return u.id===d.id}let r=class{get actions(){return this._actions}get secondaryActions(){return this._secondaryActions}constructor(d,p){this._actions=[],this._secondaryActions=[],this._onDidChangeTitle=new t.Emitter,this.onDidChangeTitle=this._onDidChangeTitle.event,this.disposables=new y.DisposableStore,this.menu=d.createMenu(D.MenuId.SCMTitle,p),this.disposables.add(this.menu),this.menu.onDidChange(this.updateTitleActions,this,this.disposables),this.updateTitleActions()}updateTitleActions(){const d=[],p=[];(0,T.createAndFillInActionBarActions)(this.menu,{shouldForwardArgs:!0},{primary:d,secondary:p}),!((0,v.equals)(d,this._actions,a)&&(0,v.equals)(p,this._secondaryActions,a))&&(this._actions=d,this._secondaryActions=p,this._onDidChangeTitle.fire())}dispose(){this.disposables.dispose()}};e.SCMTitleMenu=r,e.SCMTitleMenu=r=fe([O(0,D.IMenuService),O(1,b.IContextKeyService)],r);class i{get resourceGroupMenu(){return this._resourceGroupMenu||(this._resourceGroupMenu=this.menuService.createMenu(D.MenuId.SCMResourceGroupContext,this.contextKeyService)),this._resourceGroupMenu}get resourceFolderMenu(){return this._resourceFolderMenu||(this._resourceFolderMenu=this.menuService.createMenu(D.MenuId.SCMResourceFolderContext,this.contextKeyService)),this._resourceFolderMenu}constructor(d,p){this.contextKeyService=d,this.menuService=p}getResourceMenu(d){if(typeof d.contextValue>"u")return this.genericResourceMenu||(this.genericResourceMenu=this.menuService.createMenu(D.MenuId.SCMResourceContext,this.contextKeyService)),this.genericResourceMenu;this.contextualResourceMenus||(this.contextualResourceMenus=new Map);let p=this.contextualResourceMenus.get(d.contextValue);if(!p){const c=this.contextKeyService.createOverlay([["scmResourceState",d.contextValue]]),l=this.menuService.createMenu(D.MenuId.SCMResourceContext,c);p={menu:l,dispose(){l.dispose()}},this.contextualResourceMenus.set(d.contextValue,p)}return p.menu}dispose(){this._resourceGroupMenu?.dispose(),this._resourceFolderMenu?.dispose(),this.genericResourceMenu?.dispose(),this.contextualResourceMenus&&((0,y.dispose)(this.contextualResourceMenus.values()),this.contextualResourceMenus.clear(),this.contextualResourceMenus=void 0)}}let s=class{get repositoryMenu(){return this._repositoryMenu||(this._repositoryMenu=this.menuService.createMenu(D.MenuId.SCMSourceControl,this.contextKeyService),this.disposables.add(this._repositoryMenu)),this._repositoryMenu}constructor(d,p,c,l){this.menuService=l,this.resourceGroups=[],this.resourceGroupMenusItems=new Map,this.disposables=new y.DisposableStore,this.contextKeyService=p.createOverlay([["scmProvider",d.contextValue],["scmProviderRootUri",d.rootUri?.toString()],["scmProviderHasRootUri",!!d.rootUri]]);const n=new S.ServiceCollection([b.IContextKeyService,this.contextKeyService]);c=c.createChild(n),this.titleMenu=c.createInstance(r),d.groups.onDidSplice(this.onDidSpliceGroups,this,this.disposables),this.onDidSpliceGroups({start:0,deleteCount:0,toInsert:d.groups.elements})}getResourceGroupMenu(d){return this.getOrCreateResourceGroupMenusItem(d).resourceGroupMenu}getResourceMenu(d){return this.getOrCreateResourceGroupMenusItem(d.resourceGroup).getResourceMenu(d)}getResourceFolderMenu(d){return this.getOrCreateResourceGroupMenusItem(d).resourceFolderMenu}getOrCreateResourceGroupMenusItem(d){let p=this.resourceGroupMenusItems.get(d);if(!p){const c=this.contextKeyService.createOverlay([["scmResourceGroup",d.id]]);p=new i(c,this.menuService),this.resourceGroupMenusItems.set(d,p)}return p}onDidSpliceGroups({start:d,deleteCount:p,toInsert:c}){const l=this.resourceGroups.splice(d,p,...c);for(const n of l)this.resourceGroupMenusItems.get(n)?.dispose(),this.resourceGroupMenusItems.delete(n)}dispose(){this.disposables.dispose(),this.resourceGroupMenusItems.forEach(d=>d.dispose())}};e.SCMRepositoryMenus=s,e.SCMRepositoryMenus=s=fe([O(1,b.IContextKeyService),O(2,m.IInstantiationService),O(3,D.IMenuService)],s);let o=class{constructor(d,p){this.instantiationService=p,this.disposables=new y.DisposableStore,this.menus=new Map,this.titleMenu=p.createInstance(r),d.onDidRemoveRepository(this.onDidRemoveRepository,this,this.disposables)}onDidRemoveRepository(d){this.menus.get(d.provider)?.dispose(),this.menus.delete(d.provider)}getRepositoryMenus(d){let p=this.menus.get(d);if(!p){const c=this.instantiationService.createInstance(s,d);p={menus:c,dispose:()=>{c.dispose(),this.menus.delete(d)}},this.menus.set(d,p)}return p.menus}dispose(){this.disposables.dispose()}};e.SCMMenus=o,e.SCMMenus=o=fe([O(0,f.ISCMService),O(1,m.IInstantiationService)],o),D.MenuRegistry.appendMenuItem(D.MenuId.SCMResourceContext,{title:(0,h.localize)(0,null),submenu:D.MenuId.SCMResourceContextShare,group:"45_share",order:3})}),define(Q[1299],Y([1,0,4,7,293,369,29,28,930,344,39,26,54,561]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.RepositoryRenderer=void 0;let i=class{static{r=this}static{this.TEMPLATE_ID="repository"}get templateId(){return r.TEMPLATE_ID}constructor(o,u,d,p,c){this.actionViewItemProvider=o,this.scmViewService=u,this.commandService=d,this.contextMenuService=p,this.workspaceContextService=c}renderTemplate(o){o.classList.contains("monaco-tl-contents")&&o.parentElement.parentElement.querySelector(".monaco-tl-twistie").classList.add("force-twistie");const u=(0,y.append)(o,(0,y.$)(".scm-provider")),d=(0,y.append)(u,(0,y.$)(".label")),p=(0,y.append)(d,(0,y.$)("span.name")),c=(0,y.append)(d,(0,y.$)("span.description")),l=(0,y.append)(u,(0,y.$)(".actions")),n=new m.ToolBar(l,this.contextMenuService,{actionViewItemProvider:this.actionViewItemProvider}),g=(0,y.append)(u,(0,y.$)(".count")),w=new D.CountBadge(g,{},a.defaultCountBadgeStyles),E=n.onDidChangeDropdownVisibility(I=>u.classList.toggle("active",I)),C=(0,t.combinedDisposable)(E,n);return{label:d,name:p,description:c,countContainer:g,count:w,toolBar:n,elementDisposables:new t.DisposableStore,templateDisposable:C}}renderElement(o,u,d,p){const c=(0,v.isSCMRepository)(o)?o:o.element;if(c.provider.rootUri){const _=this.workspaceContextService.getWorkspaceFolder(c.provider.rootUri);_?.uri.toString()===c.provider.rootUri.toString()?d.name.textContent=_.name:d.name.textContent=(0,h.basename)(c.provider.rootUri),d.label.title=`${c.provider.label}: ${c.provider.rootUri.fsPath}`,d.description.textContent=c.provider.label}else d.label.title=c.provider.label,d.name.textContent=c.provider.label,d.description.textContent="";let l=[],n=[],g=[];const w=()=>{d.toolBar.setActions([...l,...n],g)},E=()=>{l=(c.provider.statusBarCommands||[]).map(k=>new v.StatusBarAction(k,this.commandService)),w();const A=c.provider.count||0;d.countContainer.setAttribute("data-count",String(A)),d.count.setCount(A)};let C=!1;d.elementDisposables.add((0,t.toDisposable)(()=>C=!0)),d.elementDisposables.add(c.provider.onDidChange(()=>{C||E()})),E();const I=this.scmViewService.menus.getRepositoryMenus(c.provider);d.elementDisposables.add((0,v.connectPrimaryMenu)(I.titleMenu.menu,(_,A)=>{n=_,g=A,w()})),d.toolBar.context=c.provider}renderCompressedElements(){throw new Error("Should never happen since node is incompressible")}disposeElement(o,u,d){d.elementDisposables.clear()}disposeTemplate(o){o.elementDisposables.dispose(),o.templateDisposable.dispose()}};e.RepositoryRenderer=i,e.RepositoryRenderer=i=r=fe([O(1,b.ISCMViewService),O(2,f.ICommandService),O(3,T.IContextMenuService),O(4,S.IWorkspaceContextService)],i)}),define(Q[1300],Y([1,0,4,6,293,83,5,3608,24,102,39,397,26,20,9,8]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMViewService=e.RepositoryContextKeys=void 0;function o(p){return`${p.contextValue}:${p.label}${p.rootUri?`:${p.rootUri.toString()}`:""}`}function u(p,c){if(!c.provider.rootUri)return c.provider.label;const l=p.getWorkspaceFolder(c.provider.rootUri);return l?.uri.toString()===c.provider.rootUri.toString()?l.name:(0,a.basename)(c.provider.rootUri)}e.RepositoryContextKeys={RepositorySortKey:new s.RawContextKey("scmRepositorySortKey","discoveryTime")};let d=class{get repositories(){return this._repositories.map(c=>c.repository)}get visibleRepositories(){return this._repositoriesSortKey==="discoveryTime"?this._repositories.filter(c=>c.selectionIndex!==-1).sort((c,l)=>c.selectionIndex-l.selectionIndex).map(c=>c.repository):this._repositories.filter(c=>c.selectionIndex!==-1).map(c=>c.repository)}set visibleRepositories(c){const l=new Set(c),n=new Set,g=new Set;for(const w of this._repositories)!l.has(w.repository)&&w.selectionIndex!==-1&&(w.selectionIndex=-1,g.add(w.repository)),l.has(w.repository)&&(w.selectionIndex===-1&&n.add(w.repository),w.selectionIndex=c.indexOf(w.repository));n.size===0&&g.size===0||(this._onDidSetVisibleRepositories.fire({added:n,removed:g}),this._repositories.find(w=>w.focused&&w.selectionIndex===-1)&&this.focus(this._repositories.find(w=>w.selectionIndex!==-1)?.repository))}get focusedRepository(){return this._repositories.find(c=>c.focused)?.repository}constructor(c,l,n,g,w,E){this.configurationService=g,this.storageService=w,this.workspaceContextService=E,this.didFinishLoading=!1,this.didSelectRepository=!1,this.disposables=new t.DisposableStore,this._repositories=[],this._onDidChangeRepositories=new y.Emitter,this.onDidChangeRepositories=this._onDidChangeRepositories.event,this._onDidSetVisibleRepositories=new y.Emitter,this.onDidChangeVisibleRepositories=y.Event.any(this._onDidSetVisibleRepositories.event,y.Event.debounce(this._onDidChangeRepositories.event,(C,I)=>{if(!C)return I;const _=new Set(C.added),A=new Set(C.removed);for(const k of I.added)A.has(k)?A.delete(k):_.add(k);for(const k of I.removed)_.has(k)?_.delete(k):A.add(k);return{added:_,removed:A}},0,void 0,void 0,void 0,this.disposables)),this._onDidFocusRepository=new y.Emitter,this.onDidFocusRepository=this._onDidFocusRepository.event,this.menus=n.createInstance(f.SCMMenus);try{this.previousState=JSON.parse(w.get("scm:view:visibleRepositories",1,""))}catch{}this._repositoriesSortKey=this.previousState?.sortKey??this.getViewSortOrder(),this._sortKeyContextKey=e.RepositoryContextKeys.RepositorySortKey.bindTo(l),this._sortKeyContextKey.set(this._repositoriesSortKey),c.onDidAddRepository(this.onDidAddRepository,this,this.disposables),c.onDidRemoveRepository(this.onDidRemoveRepository,this,this.disposables);for(const C of c.repositories)this.onDidAddRepository(C);w.onWillSaveState(this.onWillSaveState,this,this.disposables)}onDidAddRepository(c){this.didFinishLoading||this.eventuallyFinishLoading();const l={repository:c,discoveryTime:Date.now(),focused:!1,selectionIndex:-1};let n=D.Iterable.empty();if(this.previousState){const w=this.previousState.all.indexOf(o(c.provider));if(w===-1){const E=[];this.insertRepositoryView(this._repositories,l),this._repositories.forEach((C,I)=>{C.selectionIndex===-1&&E.push(C.repository),C.selectionIndex=I}),this._onDidChangeRepositories.fire({added:E,removed:D.Iterable.empty()}),this.didSelectRepository=!1;return}if(this.previousState.visible.indexOf(w)===-1){if(this.didSelectRepository){this.insertRepositoryView(this._repositories,l),this._onDidChangeRepositories.fire({added:D.Iterable.empty(),removed:D.Iterable.empty()});return}}else this.didSelectRepository||(n=[...this.visibleRepositories],this._repositories.forEach(E=>{E.focused=!1,E.selectionIndex=-1}),this.didSelectRepository=!0)}const g=this.getMaxSelectionIndex();this.insertRepositoryView(this._repositories,{...l,selectionIndex:g+1}),this._onDidChangeRepositories.fire({added:[l.repository],removed:n}),this._repositories.find(w=>w.focused)||this.focus(c)}onDidRemoveRepository(c){this.didFinishLoading||this.eventuallyFinishLoading();const l=this._repositories.findIndex(w=>w.repository===c);if(l===-1)return;let n=D.Iterable.empty();const g=this._repositories.splice(l,1);this._repositories.length>0&&this.visibleRepositories.length===0&&(this._repositories[0].selectionIndex=0,n=[this._repositories[0].repository]),this._onDidChangeRepositories.fire({added:n,removed:g.map(w=>w.repository)}),g.length===1&&g[0].focused&&this.visibleRepositories.length>0&&this.focus(this.visibleRepositories[0])}isVisible(c){return this._repositories.find(l=>l.repository===c)?.selectionIndex!==-1}toggleVisibility(c,l){if(typeof l>"u")l=!this.isVisible(c);else if(this.isVisible(c)===l)return;if(l)this.visibleRepositories=[...this.visibleRepositories,c];else{const n=this.visibleRepositories.indexOf(c);n>-1&&(this.visibleRepositories=[...this.visibleRepositories.slice(0,n),...this.visibleRepositories.slice(n+1)])}}toggleSortKey(c){this._repositoriesSortKey=c,this._sortKeyContextKey.set(this._repositoriesSortKey),this._repositories.sort(this.compareRepositories.bind(this)),this._onDidChangeRepositories.fire({added:D.Iterable.empty(),removed:D.Iterable.empty()})}focus(c){c&&!this.isVisible(c)||(this._repositories.forEach(l=>l.focused=l.repository===c),this._repositories.find(l=>l.focused)&&this._onDidFocusRepository.fire(c))}compareRepositories(c,l){if(this._repositoriesSortKey==="discoveryTime")return c.discoveryTime-l.discoveryTime;if(this._repositoriesSortKey==="path"&&c.repository.provider.rootUri&&l.repository.provider.rootUri)return(0,h.comparePaths)(c.repository.provider.rootUri.fsPath,l.repository.provider.rootUri.fsPath);const n=u(this.workspaceContextService,c.repository),g=u(this.workspaceContextService,l.repository),w=(0,h.compareFileNames)(n,g);return w===0&&c.repository.provider.rootUri&&l.repository.provider.rootUri?(0,h.comparePaths)(c.repository.provider.rootUri.fsPath,l.repository.provider.rootUri.fsPath):w}getMaxSelectionIndex(){return this._repositories.length===0?-1:Math.max(...this._repositories.map(c=>c.selectionIndex))}getViewSortOrder(){switch(this.configurationService.getValue("scm.repositories.sortOrder")){case"discovery time":return"discoveryTime";case"name":return"name";case"path":return"path";default:return"discoveryTime"}}insertRepositoryView(c,l){const n=(0,r.binarySearch)(c,l,this.compareRepositories.bind(this));c.splice(n<0?~n:n,0,l)}onWillSaveState(){if(!this.didFinishLoading)return;const c=this.repositories.map(g=>o(g.provider)),l=this.visibleRepositories.map(g=>c.indexOf(o(g.provider))),n=JSON.stringify({all:c,sortKey:this._repositoriesSortKey,visible:l});this.storageService.store("scm:view:visibleRepositories",n,1,1)}eventuallyFinishLoading(){this.finishLoading()}finishLoading(){this.didFinishLoading||(this.didFinishLoading=!0,this.previousState=void 0)}dispose(){this.disposables.dispose(),this._onDidChangeRepositories.dispose(),this._onDidSetVisibleRepositories.dispose()}};e.SCMViewService=d,fe([(0,m.debounce)(5e3)],d.prototype,"eventuallyFinishLoading",null),e.SCMViewService=d=fe([O(0,b.ISCMService),O(1,s.IContextKeyService),O(2,T.IInstantiationService),O(3,i.IConfigurationService),O(4,v.IStorageService),O(5,S.IWorkspaceContextService)],d)}),define(Q[3609],Y([1,0,4,6,293,11,8,24,555,83]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.SCMService=void 0;let h=class{static{S=this}get value(){return this._value}get placeholder(){return this._placeholder}set placeholder(s){this._placeholder=s,this._onDidChangePlaceholder.fire(s)}get enabled(){return this._enabled}set enabled(s){this._enabled=s,this._onDidChangeEnablement.fire(s)}get visible(){return this._visible}set visible(s){this._visible=s,this._onDidChangeVisibility.fire(s)}setFocus(){this._onDidChangeFocus.fire()}showValidationMessage(s,o){this._onDidChangeValidationMessage.fire({message:s,type:o})}get validateInput(){return this._validateInput}set validateInput(s){this._validateInput=s,this._onDidChangeValidateInput.fire()}static{this.didGarbageCollect=!1}static migrateAndGarbageCollectStorage(s){if(S.didGarbageCollect)return;const o=m.Iterable.filter(s.keys(-1,0),d=>d.startsWith("scm/input:"));for(const d of o)try{const p=s.get(d,-1,""),c=JSON.parse(p);Array.isArray(c)?c.length===0||c.length===1&&c[0]===""?s.remove(d,-1):s.store(d,JSON.stringify({timestamp:new Date().getTime(),history:c}),-1,1):s.store(d,p,-1,1)}catch{s.remove(d,-1)}const u=m.Iterable.filter(s.keys(-1,1),d=>d.startsWith("scm/input:"));for(const d of u)try{const p=JSON.parse(s.get(d,-1,""));Array.isArray(p?.history)&&Number.isInteger(p?.timestamp)&&new Date().getTime()-p?.timestamp>2592e6&&s.remove(d,-1)}catch{s.remove(d,-1)}S.didGarbageCollect=!0}constructor(s,o){this.repository=s,this.storageService=o,this._value="",this._onDidChange=new y.Emitter,this.onDidChange=this._onDidChange.event,this._placeholder="",this._onDidChangePlaceholder=new y.Emitter,this.onDidChangePlaceholder=this._onDidChangePlaceholder.event,this._enabled=!0,this._onDidChangeEnablement=new y.Emitter,this.onDidChangeEnablement=this._onDidChangeEnablement.event,this._visible=!0,this._onDidChangeVisibility=new y.Emitter,this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._onDidChangeFocus=new y.Emitter,this.onDidChangeFocus=this._onDidChangeFocus.event,this._onDidChangeValidationMessage=new y.Emitter,this.onDidChangeValidationMessage=this._onDidChangeValidationMessage.event,this._validateInput=()=>Promise.resolve(void 0),this._onDidChangeValidateInput=new y.Emitter,this.onDidChangeValidateInput=this._onDidChangeValidateInput.event,S.migrateAndGarbageCollectStorage(o);const u=this.repository.provider.rootUri?`scm/input:${this.repository.provider.label}:${this.repository.provider.rootUri?.path}`:void 0;let d;if(u)try{d=JSON.parse(this.storageService.get(u,-1,"")).history,d=d?.map(p=>p??"")}catch{}!Array.isArray(d)||d.length===0?d=[this._value]:this._value=d[d.length-1],this.historyNavigator=new v.HistoryNavigator2(d,50),this.didChangeHistory=!1,u&&this.storageService.onWillSaveState(p=>{if(this.historyNavigator.isAtEnd()&&this.saveValue(),!this.didChangeHistory)return;const c=[...this.historyNavigator].map(l=>l??"");c.length===0||c.length===1&&c[0]===""?o.remove(u,-1):o.store(u,JSON.stringify({timestamp:new Date().getTime(),history:c}),-1,1),this.didChangeHistory=!1})}setValue(s,o,u){s!==this._value&&(o||(this.saveValue(),this.historyNavigator.add(s),this.didChangeHistory=!0),this._value=s,this._onDidChange.fire({value:s,reason:u}))}showNextHistoryValue(){if(this.historyNavigator.isAtEnd())return;this.historyNavigator.has(this.value)||(this.saveValue(),this.historyNavigator.resetCursor());const s=this.historyNavigator.next();this.setValue(s,!0,b.SCMInputChangeReason.HistoryNext)}showPreviousHistoryValue(){this.historyNavigator.isAtEnd()?this.saveValue():this.historyNavigator.has(this._value)||(this.saveValue(),this.historyNavigator.resetCursor());const s=this.historyNavigator.previous();this.setValue(s,!0,b.SCMInputChangeReason.HistoryPrevious)}saveValue(){const s=this.historyNavigator.replaceLast(this._value);this.didChangeHistory=this.didChangeHistory||s!==this._value}};h=S=fe([O(1,f.IStorageService)],h);let a=class{get selected(){return this._selected}constructor(s,o,u,d){this.id=s,this.provider=o,this.disposable=u,this.storageService=d,this._selected=!1,this._onDidChangeSelection=new y.Emitter,this.onDidChangeSelection=this._onDidChangeSelection.event,this.input=new h(this,this.storageService)}setSelected(s){this._selected!==s&&(this._selected=s,this._onDidChangeSelection.fire(s))}dispose(){this.disposable.dispose(),this.provider.dispose()}};a=fe([O(3,f.IStorageService)],a);let r=class{get repositories(){return this._repositories.values()}get repositoryCount(){return this._repositories.size}constructor(s,o,u){this.logService=s,this.storageService=u,this._repositories=new Map,this._onDidAddProvider=new y.Emitter,this.onDidAddRepository=this._onDidAddProvider.event,this._onDidRemoveProvider=new y.Emitter,this.onDidRemoveRepository=this._onDidRemoveProvider.event,this.providerCount=o.createKey("scm.providerCount",0)}registerSCMProvider(s){if(this.logService.trace("SCMService#registerSCMProvider"),this._repositories.has(s.id))throw new Error(`SCM Provider ${s.id} already exists.`);const o=(0,t.toDisposable)(()=>{this._repositories.delete(s.id),this._onDidRemoveProvider.fire(u),this.providerCount.set(this._repositories.size)}),u=new a(s.id,s,o,this.storageService);return this._repositories.set(s.id,u),this._onDidAddProvider.fire(u),this.providerCount.set(this._repositories.size),u}getRepository(s){return this._repositories.get(s)}};e.SCMService=r,e.SCMService=r=fe([O(0,D.ILogService),O(1,T.IContextKeyService),O(2,f.IStorageService)],r)}),define(Q[1301],Y([1,0,7,273,142,32,6,2894,308,501,9,8,38,54]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExcludePatternInputWidget=e.IncludePatternInputWidget=e.PatternInputWidget=void 0;let i=class extends b.Widget{static{this.OPTION_CHANGE="optionChange"}constructor(d,p,c,l,n,g){super(),this.contextViewProvider=p,this.contextKeyService=l,this.configurationService=n,this.keybindingService=g,this._onSubmit=this._register(new T.Emitter),this.onSubmit=this._onSubmit.event,this._onCancel=this._register(new T.Emitter),this.onCancel=this._onCancel.event,c={ariaLabel:f.localize(0,null),...c},this.width=c.width??100,this.render(c),d.appendChild(this.domNode)}dispose(){super.dispose(),this.inputFocusTracker?.dispose()}setWidth(d){this.width=d,this.contextViewProvider.layout(),this.setInputWidth()}getValue(){return this.inputBox.value}setValue(d){this.inputBox.value!==d&&(this.inputBox.value=d)}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()}prependHistory(d){this.inputBox.prependHistory(d)}clear(){this.setValue("")}onSearchSubmit(){this.inputBox.addToHistory()}showNextTerm(){this.inputBox.showNextValue()}showPreviousTerm(){this.inputBox.showPreviousValue()}render(d){this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=new v.ContextScopedHistoryInputBox(this.domNode,this.contextViewProvider,{placeholder:d.placeholder,showPlaceholderOnFocus:d.showPlaceholderOnFocus,tooltip:d.tooltip,ariaLabel:d.ariaLabel,validationOptions:{validation:void 0},history:d.history||[],showHistoryHint:()=>(0,m.showHistoryKeybindingHint)(this.keybindingService),inputBoxStyles:d.inputBoxStyles},this.contextKeyService),this._register(this.inputBox.onDidChange(()=>this._onSubmit.fire(!0))),this.inputFocusTracker=t.trackFocus(this.inputBox.inputElement),this.onkeyup(this.inputBox.inputElement,c=>this.onInputKeyUp(c));const p=document.createElement("div");p.className="controls",this.renderSubcontrols(p),this.domNode.appendChild(p),this.setInputWidth()}renderSubcontrols(d){}onInputKeyUp(d){switch(d.keyCode){case 3:this.onSearchSubmit(),this._onSubmit.fire(!1);return;case 9:this._onCancel.fire();return}}};e.PatternInputWidget=i,e.PatternInputWidget=i=fe([O(3,h.IContextKeyService),O(4,S.IConfigurationService),O(5,a.IKeybindingService)],i);let s=class extends i{constructor(d,p,c,l,n,g){super(d,p,c,l,n,g),this._onChangeSearchInEditorsBoxEmitter=this._register(new T.Emitter),this.onChangeSearchInEditorsBox=this._onChangeSearchInEditorsBoxEmitter.event}dispose(){super.dispose(),this.useSearchInEditorsBox.dispose()}onlySearchInOpenEditors(){return this.useSearchInEditorsBox.checked}setOnlySearchInOpenEditors(d){this.useSearchInEditorsBox.checked=d,this._onChangeSearchInEditorsBoxEmitter.fire()}getSubcontrolsWidth(){return super.getSubcontrolsWidth()+this.useSearchInEditorsBox.width()}renderSubcontrols(d){this.useSearchInEditorsBox=this._register(new y.Toggle({icon:D.Codicon.book,title:f.localize(1,null),isChecked:!1,...r.defaultToggleStyles})),this._register(this.useSearchInEditorsBox.onChange(p=>{this._onChangeSearchInEditorsBoxEmitter.fire(),p||this.inputBox.focus()})),d.appendChild(this.useSearchInEditorsBox.domNode),super.renderSubcontrols(d)}};e.IncludePatternInputWidget=s,e.IncludePatternInputWidget=s=fe([O(3,h.IContextKeyService),O(4,S.IConfigurationService),O(5,a.IKeybindingService)],s);let o=class extends i{constructor(d,p,c,l,n,g){super(d,p,c,l,n,g),this._onChangeIgnoreBoxEmitter=this._register(new T.Emitter),this.onChangeIgnoreBox=this._onChangeIgnoreBoxEmitter.event}dispose(){super.dispose(),this.useExcludesAndIgnoreFilesBox.dispose()}useExcludesAndIgnoreFiles(){return this.useExcludesAndIgnoreFilesBox.checked}setUseExcludesAndIgnoreFiles(d){this.useExcludesAndIgnoreFilesBox.checked=d,this._onChangeIgnoreBoxEmitter.fire()}getSubcontrolsWidth(){return super.getSubcontrolsWidth()+this.useExcludesAndIgnoreFilesBox.width()}renderSubcontrols(d){this.useExcludesAndIgnoreFilesBox=this._register(new y.Toggle({icon:D.Codicon.exclude,actionClassName:"useExcludesAndIgnoreFiles",title:f.localize(2,null),isChecked:!0,...r.defaultToggleStyles})),this._register(this.useExcludesAndIgnoreFilesBox.onChange(p=>{this._onChangeIgnoreBoxEmitter.fire(),p||this.inputBox.focus()})),d.appendChild(this.useExcludesAndIgnoreFilesBox.domNode),super.renderSubcontrols(d)}};e.ExcludePatternInputWidget=o,e.ExcludePatternInputWidget=o=fe([O(3,h.IContextKeyService),O(4,S.IConfigurationService),O(5,a.IKeybindingService)],o)}),define(Q[531],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IReplaceService=void 0,e.IReplaceService=(0,t.createDecorator)("replaceService")}),define(Q[3610],Y([1,0,308,1292,2906]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchFindInput=void 0;class D extends t.ContextScopedFindInput{constructor(f,v,m,S,h,a,r,i){super(f,v,m,S),this.contextMenuService=h,this.instantiationService=a,this.filters=r,this._filterChecked=!1,this._visible=!1,this._findFilter=this._register(new y.NotebookFindInputFilterButton(r,h,a,m,b.localize(0,null))),this.inputBox.paddingRight=(this.caseSensitive?.width()??0)+(this.wholeWords?.width()??0)+(this.regex?.width()??0)+this._findFilter.width,this.controls.appendChild(this._findFilter.container),this._findFilter.container.classList.add("monaco-custom-toggle"),this.filterVisible=i}set filterVisible(f){this._findFilter.container.style.display=f?"":"none",this._visible=f,this.updateStyles()}setEnabled(f){super.setEnabled(f),f&&(!this._filterChecked||!this._visible)?this.regex?.enable():this.regex?.disable()}updateStyles(){this._filterChecked=!this.filters.markupInput||!this.filters.markupPreview||!this.filters.codeInput||!this.filters.codeOutput,this._findFilter.applyStyles(this._filterChecked)}}e.SearchFindInput=D}),define(Q[377],Y([1,0,32,2907,77]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.searchOpenInFileIcon=e.searchNewEditorIcon=e.searchViewIcon=e.searchStopIcon=e.searchClearIcon=e.searchShowAsList=e.searchShowAsTree=e.searchExpandAllIcon=e.searchCollapseAllIcon=e.searchRefreshIcon=e.searchRemoveIcon=e.searchReplaceIcon=e.searchReplaceAllIcon=e.searchShowReplaceIcon=e.searchHideReplaceIcon=e.searchShowContextIcon=e.searchDetailsIcon=void 0,e.searchDetailsIcon=(0,b.registerIcon)("search-details",t.Codicon.ellipsis,(0,y.localize)(0,null)),e.searchShowContextIcon=(0,b.registerIcon)("search-show-context",t.Codicon.listSelection,(0,y.localize)(1,null)),e.searchHideReplaceIcon=(0,b.registerIcon)("search-hide-replace",t.Codicon.chevronRight,(0,y.localize)(2,null)),e.searchShowReplaceIcon=(0,b.registerIcon)("search-show-replace",t.Codicon.chevronDown,(0,y.localize)(3,null)),e.searchReplaceAllIcon=(0,b.registerIcon)("search-replace-all",t.Codicon.replaceAll,(0,y.localize)(4,null)),e.searchReplaceIcon=(0,b.registerIcon)("search-replace",t.Codicon.replace,(0,y.localize)(5,null)),e.searchRemoveIcon=(0,b.registerIcon)("search-remove",t.Codicon.close,(0,y.localize)(6,null)),e.searchRefreshIcon=(0,b.registerIcon)("search-refresh",t.Codicon.refresh,(0,y.localize)(7,null)),e.searchCollapseAllIcon=(0,b.registerIcon)("search-collapse-results",t.Codicon.collapseAll,(0,y.localize)(8,null)),e.searchExpandAllIcon=(0,b.registerIcon)("search-expand-results",t.Codicon.expandAll,(0,y.localize)(9,null)),e.searchShowAsTree=(0,b.registerIcon)("search-tree",t.Codicon.listTree,(0,y.localize)(10,null)),e.searchShowAsList=(0,b.registerIcon)("search-list",t.Codicon.listFlat,(0,y.localize)(11,null)),e.searchClearIcon=(0,b.registerIcon)("search-clear-results",t.Codicon.clearAll,(0,y.localize)(12,null)),e.searchStopIcon=(0,b.registerIcon)("search-stop",t.Codicon.searchStop,(0,y.localize)(13,null)),e.searchViewIcon=(0,b.registerIcon)("search-view-icon",t.Codicon.search,(0,y.localize)(14,null)),e.searchNewEditorIcon=(0,b.registerIcon)("search-new-editor",t.Codicon.newFile,(0,y.localize)(15,null)),e.searchOpenInFileIcon=(0,b.registerIcon)("search-open-in-file",t.Codicon.goToFile,(0,y.localize)(16,null))}),define(Q[3611],Y([1,0,320,42]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileQueryCacheState=void 0;var b;(function(T){T[T.Created=1]="Created",T[T.Loading=2]="Loading",T[T.Loaded=3]="Loaded",T[T.Errored=4]="Errored",T[T.Disposed=5]="Disposed"})(b||(b={}));class D{get cacheKey(){return this.loadingPhase===b.Loaded||!this.previousCacheState?this._cacheKey:this.previousCacheState.cacheKey}get isLoaded(){const f=this.loadingPhase===b.Loaded;return f||!this.previousCacheState?f:this.previousCacheState.isLoaded}get isUpdating(){const f=this.loadingPhase===b.Loading;return f||!this.previousCacheState?f:this.previousCacheState.isUpdating}constructor(f,v,m,S){if(this.cacheQuery=f,this.loadFn=v,this.disposeFn=m,this.previousCacheState=S,this._cacheKey=t.defaultGenerator.nextId(),this.query=this.cacheQuery(this._cacheKey),this.loadingPhase=b.Created,this.previousCacheState){const h=Object.assign({},this.query,{cacheKey:null}),a=Object.assign({},this.previousCacheState.query,{cacheKey:null});(0,y.equals)(h,a)||(this.previousCacheState.dispose(),this.previousCacheState=void 0)}}load(){return this.isUpdating?this:(this.loadingPhase=b.Loading,this.loadPromise=(async()=>{try{await this.loadFn(this.query),this.loadingPhase=b.Loaded,this.previousCacheState&&(this.previousCacheState.dispose(),this.previousCacheState=void 0)}catch(f){throw this.loadingPhase=b.Errored,f}})(),this)}dispose(){this.loadPromise?(async()=>{try{await this.loadPromise}catch{}this.loadingPhase=b.Disposed,this.disposeFn(this._cacheKey)})():this.loadingPhase=b.Disposed,this.previousCacheState&&(this.previousCacheState.dispose(),this.previousCacheState=void 0)}}e.FileQueryCacheState=D}),define(Q[294],Y([1,0,8]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InTreeViewKey=e.ViewHasSomeCollapsibleKey=e.ViewHasFilePatternKey=e.ViewHasReplacePatternKey=e.ViewHasSearchPatternKey=e.MatchFocusKey=e.IsEditableItemKey=e.ResourceFolderFocusKey=e.FolderFocusKey=e.FileFocusKey=e.FileMatchOrFolderMatchWithResourceFocusKey=e.FileMatchOrFolderMatchFocusKey=e.FileMatchOrMatchFocusKey=e.FirstMatchFocusKey=e.HasSearchResults=e.ReplaceActiveKey=e.PatternExcludesFocusedKey=e.PatternIncludesFocusedKey=e.ReplaceInputBoxFocusedKey=e.SearchInputBoxFocusedKey=e.InputBoxFocusedKey=e.SearchViewFocusedKey=e.SearchViewVisibleKey=e.FindInWorkspaceId=e.FindInFolderId=e.RestrictSearchToFolderId=e.FocusPreviousInputActionId=e.FocusNextInputActionId=e.ExcludeFolderFromSearchId=e.ToggleQueryDetailsActionId=e.ViewAsListActionId=e.ViewAsTreeActionId=e.ClearSearchResultsActionId=e.ExpandSearchResultsActionId=e.CollapseSearchResultsActionId=e.ToggleSearchOnTypeActionId=e.FocusPreviousSearchResultActionId=e.FocusNextSearchResultActionId=e.RefreshSearchResultsActionId=e.CancelSearchActionId=e.QuickTextSearchActionId=e.ShowAllSymbolsActionId=e.ReplaceInFilesActionId=e.RevealInSideBarForSearchResults=e.AddCursorsAtSearchResults=e.TogglePreserveCaseId=e.ToggleRegexCommandId=e.ToggleWholeWordCommandId=e.ToggleCaseSensitiveCommandId=e.CloseReplaceWidgetActionId=e.ReplaceAllInFolderActionId=e.ReplaceAllInFileActionId=e.ReplaceActionId=e.FocusSearchListCommandID=e.ClearSearchHistoryCommandId=e.OpenInEditorCommandId=e.CopyAllCommandId=e.CopyMatchCommandId=e.CopyPathCommandId=e.RemoveActionId=e.OpenMatchToSide=e.OpenMatch=e.FocusSearchFromResults=e.FocusActiveEditorCommandId=e.FindInFilesActionId=void 0,e.FindInFilesActionId="workbench.action.findInFiles",e.FocusActiveEditorCommandId="search.action.focusActiveEditor",e.FocusSearchFromResults="search.action.focusSearchFromResults",e.OpenMatch="search.action.openResult",e.OpenMatchToSide="search.action.openResultToSide",e.RemoveActionId="search.action.remove",e.CopyPathCommandId="search.action.copyPath",e.CopyMatchCommandId="search.action.copyMatch",e.CopyAllCommandId="search.action.copyAll",e.OpenInEditorCommandId="search.action.openInEditor",e.ClearSearchHistoryCommandId="search.action.clearHistory",e.FocusSearchListCommandID="search.action.focusSearchList",e.ReplaceActionId="search.action.replace",e.ReplaceAllInFileActionId="search.action.replaceAllInFile",e.ReplaceAllInFolderActionId="search.action.replaceAllInFolder",e.CloseReplaceWidgetActionId="closeReplaceInFilesWidget",e.ToggleCaseSensitiveCommandId="toggleSearchCaseSensitive",e.ToggleWholeWordCommandId="toggleSearchWholeWord",e.ToggleRegexCommandId="toggleSearchRegex",e.TogglePreserveCaseId="toggleSearchPreserveCase",e.AddCursorsAtSearchResults="addCursorsAtSearchResults",e.RevealInSideBarForSearchResults="search.action.revealInSideBar",e.ReplaceInFilesActionId="workbench.action.replaceInFiles",e.ShowAllSymbolsActionId="workbench.action.showAllSymbols",e.QuickTextSearchActionId="workbench.action.experimental.quickTextSearch",e.CancelSearchActionId="search.action.cancel",e.RefreshSearchResultsActionId="search.action.refreshSearchResults",e.FocusNextSearchResultActionId="search.action.focusNextSearchResult",e.FocusPreviousSearchResultActionId="search.action.focusPreviousSearchResult",e.ToggleSearchOnTypeActionId="workbench.action.toggleSearchOnType",e.CollapseSearchResultsActionId="search.action.collapseSearchResults",e.ExpandSearchResultsActionId="search.action.expandSearchResults",e.ClearSearchResultsActionId="search.action.clearSearchResults",e.ViewAsTreeActionId="search.action.viewAsTree",e.ViewAsListActionId="search.action.viewAsList",e.ToggleQueryDetailsActionId="workbench.action.search.toggleQueryDetails",e.ExcludeFolderFromSearchId="search.action.excludeFromSearch",e.FocusNextInputActionId="search.focus.nextInputBox",e.FocusPreviousInputActionId="search.focus.previousInputBox",e.RestrictSearchToFolderId="search.action.restrictSearchToFolder",e.FindInFolderId="filesExplorer.findInFolder",e.FindInWorkspaceId="filesExplorer.findInWorkspace",e.SearchViewVisibleKey=new t.RawContextKey("searchViewletVisible",!0),e.SearchViewFocusedKey=new t.RawContextKey("searchViewletFocus",!1),e.InputBoxFocusedKey=new t.RawContextKey("inputBoxFocus",!1),e.SearchInputBoxFocusedKey=new t.RawContextKey("searchInputBoxFocus",!1),e.ReplaceInputBoxFocusedKey=new t.RawContextKey("replaceInputBoxFocus",!1),e.PatternIncludesFocusedKey=new t.RawContextKey("patternIncludesInputBoxFocus",!1),e.PatternExcludesFocusedKey=new t.RawContextKey("patternExcludesInputBoxFocus",!1),e.ReplaceActiveKey=new t.RawContextKey("replaceActive",!1),e.HasSearchResults=new t.RawContextKey("hasSearchResult",!1),e.FirstMatchFocusKey=new t.RawContextKey("firstMatchFocus",!1),e.FileMatchOrMatchFocusKey=new t.RawContextKey("fileMatchOrMatchFocus",!1),e.FileMatchOrFolderMatchFocusKey=new t.RawContextKey("fileMatchOrFolderMatchFocus",!1),e.FileMatchOrFolderMatchWithResourceFocusKey=new t.RawContextKey("fileMatchOrFolderMatchWithResourceFocus",!1),e.FileFocusKey=new t.RawContextKey("fileMatchFocus",!1),e.FolderFocusKey=new t.RawContextKey("folderMatchFocus",!1),e.ResourceFolderFocusKey=new t.RawContextKey("folderMatchWithResourceFocus",!1),e.IsEditableItemKey=new t.RawContextKey("isEditableItem",!0),e.MatchFocusKey=new t.RawContextKey("matchFocus",!1),e.ViewHasSearchPatternKey=new t.RawContextKey("viewHasSearchPattern",!1),e.ViewHasReplacePatternKey=new t.RawContextKey("viewHasReplacePattern",!1),e.ViewHasFilePatternKey=new t.RawContextKey("viewHasFilePattern",!1),e.ViewHasSomeCollapsibleKey=new t.RawContextKey("viewHasSomeCollapsibleResult",!1),e.InTreeViewKey=new t.RawContextKey("inTreeView",!1)}),define(Q[3612],Y([1,0,2903,294,13,43]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,b.registerAction2)(class ir extends b.Action2{static{this.ID="workbench.action.showAllSymbols"}static{this.LABEL=t.localize(0,null)}static{this.ALL_SYMBOLS_PREFIX="#"}constructor(){super({id:y.ShowAllSymbolsActionId,title:{value:t.localize(1,null),original:"Go to Symbol in Workspace...",mnemonicTitle:t.localize(2,null)},f1:!0,keybinding:{weight:200,primary:2098},menu:{id:b.MenuId.MenubarGoMenu,group:"3_global_nav",order:2}})}async run(f){f.get(D.IQuickInputService).quickAccess.show(ir.ALL_SYMBOLS_PREFIX)}})}),define(Q[1302],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookSearchService=void 0,e.INotebookSearchService=(0,t.createDecorator)("notebookSearchService")}),define(Q[735],Y([1,0,6,24,17,5]),function(q,e,t,y,b,D){"use strict";var T;Object.defineProperty(e,"__esModule",{value:!0}),e.SearchHistoryService=e.ISearchHistoryService=void 0,e.ISearchHistoryService=(0,D.createDecorator)("searchHistoryService");let f=class{static{T=this}static{this.SEARCH_HISTORY_KEY="workbench.search.history"}constructor(m){this.storageService=m,this._onDidClearHistory=new t.Emitter,this.onDidClearHistory=this._onDidClearHistory.event}clearHistory(){this.storageService.remove(T.SEARCH_HISTORY_KEY,1),this._onDidClearHistory.fire()}load(){let m;const S=this.storageService.get(T.SEARCH_HISTORY_KEY,1);if(S)try{m=JSON.parse(S)}catch{}return m||{}}save(m){(0,b.isEmptyObject)(m)?this.storageService.remove(T.SEARCH_HISTORY_KEY,1):this.storageService.store(T.SEARCH_HISTORY_KEY,JSON.stringify(m),1,0)}};e.SearchHistoryService=f,e.SearchHistoryService=f=T=fe([O(0,y.IStorageService)],f)}),define(Q[467],Y([1,0,8]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchEditorInputTypeId=e.ToggleSearchEditorContextLinesCommandId=e.OpenEditorCommandId=e.OpenNewEditorCommandId=e.SearchEditorID=e.SearchEditorFindMatchClass=e.SearchEditorWorkingCopyTypeId=e.SearchEditorScheme=e.InSearchEditor=void 0,e.InSearchEditor=new t.RawContextKey("inSearchEditor",!1),e.SearchEditorScheme="search-editor",e.SearchEditorWorkingCopyTypeId="search/editor",e.SearchEditorFindMatchClass="searchEditorFindMatch",e.SearchEditorID="workbench.editor.searchEditor",e.OpenNewEditorCommandId="search.action.openNewEditor",e.OpenEditorCommandId="search.action.openEditor",e.ToggleSearchEditorContextLinesCommandId="toggleSearchEditorContextLines",e.SearchEditorInputTypeId="workbench.editorinputs.searchEditorInput"}),define(Q[3613],Y([1,0,79,838,2918,8,61,43,30]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShareService=e.ShareProviderCountContext=void 0,e.ShareProviderCountContext=new D.RawContextKey("shareProviderCount",0,(0,b.localize)(0,null));let m=class{constructor(h,a,r,i,s){this.contextKeyService=h,this.labelService=a,this.quickInputService=r,this.codeEditorService=i,this.telemetryService=s,this._providers=new Set,this.providerCount=e.ShareProviderCountContext.bindTo(this.contextKeyService)}registerShareProvider(h){return this._providers.add(h),this.providerCount.set(this._providers.size),{dispose:()=>{this._providers.delete(h),this.providerCount.set(this._providers.size)}}}getShareActions(){return[]}async provideShare(h,a){const r=this.codeEditorService.getActiveCodeEditor()?.getModel()?.getLanguageId()??"",i=[...this._providers.values()].filter(u=>(0,y.score)(u.selector,h.resourceUri,r,!0,void 0,void 0)>0).sort((u,d)=>u.priority-d.priority);if(i.length===0)return;if(i.length===1)return this.telemetryService.publicLog2("shareService.share",{providerId:i[0].id}),i[0].provideShare(h,a);const s=i.map(u=>({label:u.label,provider:u})),o=await this.quickInputService.pick(s,{canPickMany:!1,placeHolder:(0,b.localize)(1,null,this.labelService.getUriLabel(h.resourceUri))},a);if(o!==void 0)return this.telemetryService.publicLog2("shareService.share",{providerId:o.provider.id}),o.provider.provideShare(h,a)}};e.ShareService=m,e.ShareService=m=fe([O(0,D.IContextKeyService),O(1,T.ILabelService),O(2,f.IQuickInputService),O(3,t.ICodeEditorService),O(4,v.ITelemetryService)],m)}),define(Q[1303],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IShareService=void 0,e.IShareService=(0,t.createDecorator)("shareService")}),define(Q[736],Y([1,0,48,2919,13]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetEditorAction=e.SnippetsAction=void 0;const D={category:{value:(0,y.localize)(0,null),original:"Snippets"}};class T extends b.Action2{constructor(m){super({...D,...m})}}e.SnippetsAction=T;class f extends t.EditorAction2{constructor(m){super({...D,...m})}}e.SnippetEditorAction=f}),define(Q[378],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISnippetsService=void 0,e.ISnippetsService=(0,t.createDecorator)("snippetService")}),define(Q[1304],Y([1,0,2926,378,43,32,37,6]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pickSnippet=void 0;async function v(m,S){const h=m.get(y.ISnippetsService),a=m.get(b.IQuickInputService);let r;Array.isArray(S)?r=S:r=await h.getSnippets(S,{includeDisabledSnippets:!0,includeNoPrefixSnippets:!0}),r.sort((u,d)=>u.snippetSource-d.snippetSource);const i=()=>{const u=[];let d;for(const p of r){const c={label:p.prefix||p.name,detail:p.description||p.body,snippet:p};if(!d||d.snippetSource!==p.snippetSource||d.source!==p.source){let l="";switch(p.snippetSource){case 1:l=t.localize(0,null);break;case 3:l=p.source;break;case 2:l=t.localize(1,null);break}u.push({type:"separator",label:l})}p.snippetSource===3&&(h.isEnabled(p)?c.buttons=[{iconClass:T.ThemeIcon.asClassName(D.Codicon.eyeClosed),tooltip:t.localize(2,null)}]:(c.description=t.localize(3,null),c.buttons=[{iconClass:T.ThemeIcon.asClassName(D.Codicon.eye),tooltip:t.localize(4,null)}])),u.push(c),d=p}return u},s=a.createQuickPick();s.placeholder=t.localize(5,null),s.matchOnDetail=!0,s.ignoreFocusOut=!1,s.keepScrollPosition=!0,s.onDidTriggerItemButton(u=>{const d=h.isEnabled(u.item.snippet);h.updateEnablement(u.item.snippet,!d),s.items=i()}),s.items=i(),s.items.length||(s.validationMessage=t.localize(6,null)),s.show(),await Promise.race([f.Event.toPromise(s.onDidAccept),f.Event.toPromise(s.onDidHide)]);const o=s.selectedItems[0]?.snippet;return s.dispose(),o}e.pickSnippet=v}),define(Q[1305],Y([1,0,73,210,2923,68,8,5,736,1304,378]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SurroundWithSnippetEditorAction=e.getSurroundableSnippets=void 0;async function h(r,i,s,o){const{lineNumber:u,column:d}=s;i.tokenization.tokenizeIfCheap(u);const p=i.getLanguageIdAtPosition(u,d);return(await r.getSnippets(p,{includeNoPrefixSnippets:!0,includeDisabledSnippets:o})).filter(l=>l.usesSelection)}e.getSurroundableSnippets=h;class a extends v.SnippetEditorAction{static{this.options={id:"editor.action.surroundWithSnippet",title:{value:(0,b.localize)(0,null),original:"Surround With Snippet..."}}}constructor(){super({...a.options,precondition:T.ContextKeyExpr.and(t.EditorContextKeys.writable,t.EditorContextKeys.hasNonEmptySelection),f1:!0})}async runEditorCommand(i,s){if(!s.hasModel())return;const o=i.get(f.IInstantiationService),u=i.get(S.ISnippetsService),d=i.get(D.IClipboardService),p=await h(u,s.getModel(),s.getPosition(),!0);if(!p.length)return;const c=await o.invokeFunction(m.pickSnippet,p);if(!c)return;let l;c.needsClipboard&&(l=await d.readText()),s.focus(),y.SnippetController2.get(s)?.insert(c.codeSnippet,{clipboardText:l}),u.updateUsageTimestamp(c)}}e.SurroundWithSnippetEditorAction=a}),define(Q[931],Y([1,0,161,2928,55,304,1233,14,26,17,20,83]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetFile=e.SnippetSource=e.Snippet=void 0;class a{constructor(d){this.isBogous=!1,this.isTrivial=!1,this.usesClipboardVariable=!1,this.usesSelectionVariable=!1,this.codeSnippet=d;const p=new D.SnippetParser().parse(d,!1),c=new Map;let l=0;for(const g of p.placeholders)l=Math.max(l,g.index);if(p.placeholders.length===0)this.isTrivial=!0;else if(l===0){const g=(0,S.tail)(p.children);this.isTrivial=g instanceof D.Placeholder&&g.isFinalTabstop}const n=[...p.children];for(;n.length>0;){const g=n.shift();if(g instanceof D.Variable){if(g.children.length===0&&!T.KnownSnippetVariableNames[g.name]){const w=c.has(g.name)?c.get(g.name):++l;c.set(g.name,w);const E=new D.Placeholder(w).appendChild(new D.Text(g.name));p.replace(g,[E]),this.isBogous=!0}switch(g.name){case"CLIPBOARD":this.usesClipboardVariable=!0;break;case"SELECTION":case"TM_SELECTED_TEXT":this.usesSelectionVariable=!0;break}}else n.push(...g.children)}this.isBogous&&(this.codeSnippet=p.toTextmateString())}}class r{constructor(d,p,c,l,n,g,w,E,C,I){this.isFileTemplate=d,this.scopes=p,this.name=c,this.prefix=l,this.description=n,this.body=g,this.source=w,this.snippetSource=E,this.snippetIdentifier=C,this.extensionId=I,this.prefixLow=l.toLowerCase(),this._bodyInsights=new f.IdleValue(()=>new a(this.body))}get codeSnippet(){return this._bodyInsights.value.codeSnippet}get isBogous(){return this._bodyInsights.value.isBogous}get isTrivial(){return this._bodyInsights.value.isTrivial}get needsClipboard(){return this._bodyInsights.value.usesClipboardVariable}get usesSelection(){return this._bodyInsights.value.usesSelectionVariable}}e.Snippet=r;function i(u){return(0,m.isObject)(u)&&!!u.body}var s;(function(u){u[u.User=1]="User",u[u.Workspace=2]="Workspace",u[u.Extension=3]="Extension"})(s||(e.SnippetSource=s={}));class o{constructor(d,p,c,l,n,g){this.source=d,this.location=p,this.defaultScopes=c,this._extension=l,this._fileService=n,this._extensionResourceLoaderService=g,this.data=[],this.isGlobalSnippets=(0,b.extname)(p.path)===".code-snippets",this.isUserSnippets=!this._extension}select(d,p){this.isGlobalSnippets||!this.isUserSnippets?this._scopeSelect(d,p):this._filepathSelect(d,p)}_filepathSelect(d,p){d+".json"===(0,b.basename)(this.location.path)&&p.push(...this.data)}_scopeSelect(d,p){for(const l of this.data){const n=l.scopes.length;if(n===0)p.push(l);else for(let g=0;g<n;g++)if(l.scopes[g]===d){p.push(l);break}}const c=d.lastIndexOf(".");c>=0&&this._scopeSelect(d.substring(0,c),p)}async _load(){return this._extension?this._extensionResourceLoaderService.readExtensionResource(this.location):(await this._fileService.readFile(this.location)).value.toString()}load(){return this._loadPromise||(this._loadPromise=Promise.resolve(this._load()).then(d=>{const p=(0,t.parse)(d);if((0,t.getNodeType)(p)==="object")for(const[c,l]of Object.entries(p))if(i(l))this._parseSnippet(c,l,this.data);else for(const[n,g]of Object.entries(l))this._parseSnippet(n,g,this.data);return this})),this._loadPromise}reset(){this._loadPromise=void 0,this.data.length=0}_parseSnippet(d,p,c){let{isFileTemplate:l,prefix:n,body:g,description:w}=p;if(n||(n=""),Array.isArray(g)&&(g=g.join(` `)),typeof g!="string")return;Array.isArray(w)&&(w=w.join(` `));let E;this.defaultScopes?E=this.defaultScopes:typeof p.scope=="string"?E=p.scope.split(",").map(I=>I.trim()).filter(Boolean):E=[];let C;this._extension?C=this._extension.displayName||this._extension.name:this.source===2?C=(0,y.localize)(0,null):this.isGlobalSnippets?C=(0,y.localize)(1,null):C=(0,y.localize)(2,null);for(const I of h.Iterable.wrap(n))c.push(new r(!!l,E,d,I,w,g,C,this.source,this._extension?`${(0,v.relativePath)(this._extension.extensionLocation,this.location)}/${d}`:`${(0,b.basename)(this.location.path)}/${d}`,this._extension?.identifier))}}e.SnippetFile=o}),define(Q[3614],Y([1,0,73,50,210,2922,68,5,736,1304,378,931]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InsertSnippetAction=void 0;class a{static fromUser(s){if(!s||typeof s!="object")return a._empty;let{snippet:o,name:u,langId:d}=s;return typeof o!="string"&&(o=void 0),typeof u!="string"&&(u=void 0),typeof d!="string"&&(d=void 0),new a(o,u,d)}static{this._empty=new a(void 0,void 0,void 0)}constructor(s,o,u){this.snippet=s,this.name=o,this.langId=u}}class r extends v.SnippetEditorAction{constructor(){super({id:"editor.action.insertSnippet",title:{value:D.localize(0,null),original:"Insert Snippet"},f1:!0,precondition:t.EditorContextKeys.writable,description:{description:"Insert Snippet",args:[{name:"args",schema:{type:"object",properties:{snippet:{type:"string"},langId:{type:"string"},name:{type:"string"}}}}]}})}async runEditorCommand(s,o,u){const d=s.get(y.ILanguageService),p=s.get(S.ISnippetsService);if(!o.hasModel())return;const c=s.get(T.IClipboardService),l=s.get(f.IInstantiationService),n=await new Promise((w,E)=>{const{lineNumber:C,column:I}=o.getPosition(),{snippet:_,name:A,langId:k}=a.fromUser(u);if(_)return w(new h.Snippet(!1,[],"","","",_,"",1,`random/${Math.random()}`));let L;if(k){if(!d.isRegisteredLanguageId(k))return w(void 0);L=k}else o.getModel().tokenization.tokenizeIfCheap(C),L=o.getModel().getLanguageIdAtPosition(C,I),d.getLanguageName(L)||(L=o.getModel().getLanguageId());A?p.getSnippets(L,{includeNoPrefixSnippets:!0}).then(R=>R.find(M=>M.name===A)).then(w,E):w(l.invokeFunction(m.pickSnippet,L))});if(!n)return;let g;n.needsClipboard&&(g=await c.readText()),o.focus(),b.SnippetController2.get(o)?.insert(n.codeSnippet,{clipboardText:g}),p.updateUsageTimestamp(n)}}e.InsertSnippetAction=r}),define(Q[1306],Y([1,0,110,33,27,50,304,2925,378,931,128,145,125,367,28]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetCompletionProvider=e.SnippetCompletion=void 0;const s="_snippet.markAsUsed";i.CommandsRegistry.registerCommand(s,(d,...p)=>{const c=d.get(v.ISnippetsService),[l]=p;l instanceof m.Snippet&&c.updateUsageTimestamp(l)});class o{constructor(p,c){this.snippet=p,this.label={label:p.prefix,description:p.name},this.detail=(0,f.localize)(0,null,p.description||p.name,p.source),this.insertText=p.codeSnippet,this.extensionId=p.extensionId,this.range=c,this.sortText=`${p.snippetSource===3?"z":"a"}-${p.prefix}`,this.kind=27,this.insertTextRules=4,this.command={id:s,title:"",arguments:[p]}}resolve(){return this.documentation=new t.MarkdownString().appendCodeblock("",T.SnippetParser.asInsertText(this.snippet.codeSnippet)),this}static compareByLabel(p,c){return(0,y.compare)(p.label.label,c.label.label)}}e.SnippetCompletion=o;let u=class{constructor(p,c,l){this._languageService=p,this._snippets=c,this._languageConfigurationService=l,this._debugDisplayName="snippetCompletions"}async provideCompletionItems(p,c,l){const n=new h.StopWatch,g=this._getLanguageIdAtPosition(p,c),w=this._languageConfigurationService.getLanguageConfiguration(g),E=new Set(await this._snippets.getSnippets(g)),C=p.getLineContent(c.lineNumber).toLowerCase(),I=p.getWordUntilPosition(c).word.toLowerCase(),_=[],A=c.column-1,k=l.triggerCharacter?.toLowerCase()??"";e:for(const L of E){if(l.triggerKind===1&&!L.prefixLow.startsWith(k))continue e;const R=(0,r.getWordAtText)(1,w.getWordDefinition(),L.prefixLow,0);if(I&&R&&!(0,S.isPatternInWord)(I,0,I.length,L.prefixLow,0,L.prefixLow.length))continue e;const M=(0,y.firstNonWhitespaceIndex)(L.prefixLow)===0?Math.max(0,p.getLineFirstNonWhitespaceColumn(c.lineNumber)-1):0;t:for(let N=Math.max(M,A-L.prefixLow.length);N<C.length;N++){if(!(0,S.isPatternInWord)(C,N,A,L.prefixLow,0,L.prefixLow.length))continue t;const P=L.prefixLow.length-(A-N),x=(0,y.compareSubstring)(C,L.prefixLow,A,A+P,A-N),F=c.with(void 0,N+1);if(I&&c.equals(F))continue e;let V=x===0?c.column+P:c.column;A<C.length&&w.getAutoClosingPairs().autoClosingPairsCloseSingleChar.get(C[A])?.some(H=>H.open===C[F.column-1]&&L.prefix.startsWith(H.open)&&L.prefix[L.prefix.length-1]===H.close)&&V++;const W=b.Range.fromPositions(F,{lineNumber:c.lineNumber,column:V}),z=W.setEndPosition(c.lineNumber,c.column);_.push(new o(L,{replace:W,insert:z})),E.delete(L);break}}if(!k&&(/\s/.test(C[c.column-2])||!C))for(const R of E){const M=b.Range.fromPositions(c),N=C.indexOf(R.prefixLow,A)===A?M.setEndPosition(c.lineNumber,c.column+R.prefixLow.length):M;_.push(new o(R,{replace:N,insert:M}))}_.sort(o.compareByLabel);for(let L=0;L<_.length;L++){const R=_[L];let M=L+1;for(;M<_.length&&R.label===_[M].label;M++)_[M].label.label=(0,f.localize)(1,null,_[M].label.label,_[M].snippet.name);M>L+1&&(_[L].label.label=(0,f.localize)(2,null,_[L].label.label,_[L].snippet.name),L=M)}return{suggestions:_,duration:n.elapsed()}}resolveCompletionItem(p){return p instanceof o?p.resolve():p}_getLanguageIdAtPosition(p,c){p.tokenization.tokenizeIfCheap(c.lineNumber);let l=p.getLanguageIdAtPosition(c.lineNumber,c.column);return this._languageService.getLanguageName(l)||(l=p.getLanguageId()),l}};e.SnippetCompletionProvider=u,e.SnippetCompletionProvider=u=fe([O(0,D.ILanguageService),O(1,v.ISnippetsService),O(2,a.ILanguageConfigurationService)],u)}),define(Q[1307],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISplashStorageService=void 0,e.ISplashStorageService=(0,t.createDecorator)("ISplashStorageService")}),define(Q[3615],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JavaLibrariesToLookFor=e.MavenArtifactIdRegex=e.MavenGroupIdRegex=e.MavenDependencyRegex=e.MavenDependenciesRegex=e.GradleDependencyCompactRegex=e.GradleDependencyLooseRegex=void 0,e.GradleDependencyLooseRegex=/group\s*:\s*[\'\"](.*?)[\'\"]\s*,\s*name\s*:\s*[\'\"](.*?)[\'\"]\s*,\s*version\s*:\s*[\'\"](.*?)[\'\"]/g,e.GradleDependencyCompactRegex=/[\'\"]([^\'\"\s]*?)\:([^\'\"\s]*?)\:([^\'\"\s]*?)[\'\"]/g,e.MavenDependenciesRegex=/<dependencies>([\s\S]*?)<\/dependencies>/g,e.MavenDependencyRegex=/<dependency>([\s\S]*?)<\/dependency>/g,e.MavenGroupIdRegex=/<groupId>([\s\S]*?)<\/groupId>/,e.MavenArtifactIdRegex=/<artifactId>([\s\S]*?)<\/artifactId>/,e.JavaLibrariesToLookFor=[{groupId:"com.microsoft.azure",artifactId:"azure",tag:"azure"},{groupId:"com.microsoft.azure",artifactId:"azure-mgmt-.*",tag:"azure"},{groupId:"com\\.microsoft\\.azure\\..*",artifactId:"azure-mgmt-.*",tag:"azure"},{groupId:"javax",artifactId:"javaee-api",tag:"javaee"},{groupId:"javax.xml.bind",artifactId:"jaxb-api",tag:"javaee"},{groupId:"mysql",artifactId:"mysql-connector-java",tag:"jdbc"},{groupId:"com.microsoft.sqlserver",artifactId:"mssql-jdbc",tag:"jdbc"},{groupId:"com.oracle.database.jdbc",artifactId:"ojdbc10",tag:"jdbc"},{groupId:"org.hibernate",artifactId:"hibernate-core",tag:"jpa"},{groupId:"org.eclipse.persistence",artifactId:"eclipselink",tag:"jpa"},{groupId:"org.projectlombok",artifactId:"lombok",tag:"lombok"},{groupId:"org.mockito",artifactId:"mockito-core",tag:"mockito"},{groupId:"org.powermock",artifactId:"powermock-core",tag:"mockito"},{groupId:"org.springframework.data",artifactId:"spring-data-redis",tag:"redis"},{groupId:"redis.clients",artifactId:"jedis",tag:"redis"},{groupId:"org.redisson",artifactId:"redisson",tag:"redis"},{groupId:"io.lettuce",artifactId:"lettuce-core",tag:"redis"},{groupId:"org.springframework.boot",artifactId:".*",tag:"springboot"},{groupId:"org.jooq",artifactId:"jooq",tag:"sql"},{groupId:"org.mybatis",artifactId:"mybatis",tag:"sql"},{groupId:"org.junit.jupiter",artifactId:"junit-jupiter-api",tag:"unitTest"},{groupId:"junit",artifactId:"junit",tag:"unitTest"},{groupId:"org.testng",artifactId:"testng",tag:"unitTest"}]}),define(Q[932],Y([1,0,5,1136]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHashedRemotesFromConfig=e.IWorkspaceTagsService=void 0,e.IWorkspaceTagsService=(0,t.createDecorator)("workspaceTagsService");async function b(D,T=!1,f){return Promise.all((0,y.getRemotes)(D,T).map(v=>f(v)))}e.getHashedRemotesFromConfig=b}),define(Q[357],Y([1,0,2946,5,8]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITaskService=e.TaskExecutionSupportedContext=e.ServerlessWebContext=e.ProcessExecutionSupportedContext=e.TaskCommandsRegistered=e.ShellExecutionSupportedContext=e.CustomExecutionSupportedContext=void 0,e.CustomExecutionSupportedContext=new b.RawContextKey("customExecutionSupported",!1,t.localize(0,null)),e.ShellExecutionSupportedContext=new b.RawContextKey("shellExecutionSupported",!1,t.localize(1,null)),e.TaskCommandsRegistered=new b.RawContextKey("taskCommandsRegistered",!1,t.localize(2,null)),e.ProcessExecutionSupportedContext=new b.RawContextKey("processExecutionSupported",!1,t.localize(3,null)),e.ServerlessWebContext=new b.RawContextKey("serverlessWebContext",!1,t.localize(4,null)),e.TaskExecutionSupportedContext=b.ContextKeyExpr.or(b.ContextKeyExpr.and(e.ShellExecutionSupportedContext,e.ProcessExecutionSupportedContext),e.CustomExecutionSupportedContext),e.ITaskService=(0,y.createDecorator)("taskService")}),define(Q[1308],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskExecuteKind=e.Triggers=e.TaskError=e.TaskErrors=void 0;var t;(function(T){T[T.NotConfigured=0]="NotConfigured",T[T.RunningTask=1]="RunningTask",T[T.NoBuildTask=2]="NoBuildTask",T[T.NoTestTask=3]="NoTestTask",T[T.ConfigValidationError=4]="ConfigValidationError",T[T.TaskNotFound=5]="TaskNotFound",T[T.NoValidTaskRunner=6]="NoValidTaskRunner",T[T.UnknownError=7]="UnknownError"})(t||(e.TaskErrors=t={}));class y{constructor(f,v,m){this.severity=f,this.message=v,this.code=m}}e.TaskError=y;var b;(function(T){T.shortcut="shortcut",T.command="command",T.reconnect="reconnect"})(b||(e.Triggers=b={}));var D;(function(T){T[T.Started=1]="Started",T[T.Active=2]="Active"})(D||(e.TaskExecuteKind=D={}))}),define(Q[3616],Y([1,0,2947]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTemplates=void 0;const y={id:"dotnetCore",label:".NET Core",sort:"NET Core",autoDetect:!1,description:t.localize(0,null),content:["{"," // See https://go.microsoft.com/fwlink/?LinkId=733558"," // for the documentation about the tasks.json format",' "version": "2.0.0",',' "tasks": ['," {",' "label": "build",',' "command": "dotnet",',' "type": "shell",',' "args": [',' "build",'," // Ask dotnet build to generate full paths for file names.",' "/property:GenerateFullPaths=true",'," // Do not generate summary otherwise it leads to duplicate errors in Problems panel",' "/consoleloggerparameters:NoSummary"'," ],",' "group": "build",',' "presentation": {',' "reveal": "silent"'," },",' "problemMatcher": "$msCompile"'," }"," ]","}"].join(` `)},b={id:"msbuild",label:"MSBuild",autoDetect:!1,description:t.localize(1,null),content:["{"," // See https://go.microsoft.com/fwlink/?LinkId=733558"," // for the documentation about the tasks.json format",' "version": "2.0.0",',' "tasks": ['," {",' "label": "build",',' "type": "shell",',' "command": "msbuild",',' "args": ['," // Ask msbuild to generate full paths for file names.",' "/property:GenerateFullPaths=true",',' "/t:build",'," // Do not generate summary otherwise it leads to duplicate errors in Problems panel",' "/consoleloggerparameters:NoSummary"'," ],",' "group": "build",',' "presentation": {'," // Reveal the output only if unrecognized errors occur.",' "reveal": "silent"'," },"," // Use the standard MS compiler pattern to detect errors, warnings and infos",' "problemMatcher": "$msCompile"'," }"," ]","}"].join(` `)},D={id:"externalCommand",label:"Others",autoDetect:!1,description:t.localize(2,null),content:["{"," // See https://go.microsoft.com/fwlink/?LinkId=733558"," // for the documentation about the tasks.json format",' "version": "2.0.0",',' "tasks": ['," {",' "label": "echo",',' "type": "shell",',' "command": "echo Hello"'," }"," ]","}"].join(` `)},T={id:"maven",label:"maven",sort:"MVN",autoDetect:!1,description:t.localize(3,null),content:["{"," // See https://go.microsoft.com/fwlink/?LinkId=733558"," // for the documentation about the tasks.json format",' "version": "2.0.0",',' "tasks": ['," {",' "label": "verify",',' "type": "shell",',' "command": "mvn -B verify",',' "group": "build"'," },"," {",' "label": "test",',' "type": "shell",',' "command": "mvn -B test",',' "group": "test"'," }"," ]","}"].join(` `)};let f=null;function v(){return f||(f=[y,b,T].sort((m,S)=>(m.sort||m.label).localeCompare(S.sort||S.label)),f.push(D)),f}e.getTemplates=v}),define(Q[1309],Y([1,0,6,4,22,2950]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTerminalBackend=void 0;class T extends y.Disposable{get isResponsive(){return!this._isPtyHostUnresponsive}constructor(v,m,S,h,a,r){super(),this._ptyHostController=v,this._logService=m,this._workspaceContextService=r,this._isPtyHostUnresponsive=!1,this._onPtyHostConnected=this._register(new t.Emitter),this.onPtyHostConnected=this._onPtyHostConnected.event,this._onPtyHostRestart=this._register(new t.Emitter),this.onPtyHostRestart=this._onPtyHostRestart.event,this._onPtyHostUnresponsive=this._register(new t.Emitter),this.onPtyHostUnresponsive=this._onPtyHostUnresponsive.event,this._onPtyHostResponsive=this._register(new t.Emitter),this.onPtyHostResponsive=this._onPtyHostResponsive.event;let i,s,o=!1;this._register(this._ptyHostController.onPtyHostExit(()=>{this._logService.error("The terminal's pty host process exited, the connection to all terminal processes was lost")})),this.onPtyHostConnected(()=>o=!0),this._register(this._ptyHostController.onPtyHostStart(()=>{this._logService.debug("The terminal's pty host process is starting"),o&&(this._logService.trace("IPtyHostController#onPtyHostRestart"),this._onPtyHostRestart.fire()),s?.dispose(),this._isPtyHostUnresponsive=!1})),this._register(this._ptyHostController.onPtyHostUnresponsive(()=>{s?.dispose(),i||(i={name:(0,D.localize)(0,null),text:`$(debug-disconnect) ${(0,D.localize)(1,null)}`,tooltip:(0,D.localize)(2,null),ariaLabel:(0,D.localize)(3,null),command:"workbench.action.terminal.restartPtyHost",kind:"warning"}),s=a.addEntry(i,"ptyHostStatus",0),this._isPtyHostUnresponsive=!0,this._onPtyHostUnresponsive.fire()})),this._register(this._ptyHostController.onPtyHostResponsive(()=>{this._isPtyHostUnresponsive&&(this._logService.info("The pty host became responsive again"),s?.dispose(),this._isPtyHostUnresponsive=!1,this._onPtyHostResponsive.fire())})),this._register(this._ptyHostController.onPtyHostRequestResolveVariables(async u=>{if(u.workspaceId!==this._workspaceContextService.getWorkspace().id)return;const d=S.getLastActiveWorkspaceRoot(b.Schemas.file),p=d?this._workspaceContextService.getWorkspaceFolder(d)??void 0:void 0,c=u.originalText.map(n=>h.resolveAsync(p,n)),l=await Promise.all(c);this._ptyHostController.acceptPtyHostResolvedVariables(u.requestId,l)}))}restartPtyHost(){this._ptyHostController.restartPtyHost()}_deserializeTerminalState(v){if(v===void 0)return;const m=JSON.parse(v);if(!("version"in m)||!("state"in m)||!Array.isArray(m.state)){this._logService.warn("Could not revive serialized processes, wrong format",m);return}const S=m;if(S.version!==1){this._logService.warn(`Could not revive serialized processes, wrong version "${S.version}"`,S);return}return S.state}_getWorkspaceId(){return this._workspaceContextService.getWorkspace().id}}e.BaseTerminalBackend=T}),define(Q[119],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalDataTransfers=e.LinuxDistro=e.XtermTerminalConstants=e.terminalEditorId=e.TerminalLinkQuickPickEvent=e.isDetachedTerminalInstance=e.TerminalConnectionState=e.Direction=e.ITerminalInstanceService=e.ITerminalGroupService=e.ITerminalEditorService=e.ITerminalService=void 0,e.ITerminalService=(0,t.createDecorator)("terminalService"),e.ITerminalEditorService=(0,t.createDecorator)("terminalEditorService"),e.ITerminalGroupService=(0,t.createDecorator)("terminalGroupService"),e.ITerminalInstanceService=(0,t.createDecorator)("terminalInstanceService");var y;(function(S){S[S.Left=0]="Left",S[S.Right=1]="Right",S[S.Up=2]="Up",S[S.Down=3]="Down"})(y||(e.Direction=y={}));var b;(function(S){S[S.Connecting=0]="Connecting",S[S.Connected=1]="Connected"})(b||(e.TerminalConnectionState=b={}));const D=S=>typeof S.instanceId!="number";e.isDetachedTerminalInstance=D;class T extends MouseEvent{}e.TerminalLinkQuickPickEvent=T,e.terminalEditorId="terminalEditor";var f;(function(S){S[S.SearchHighlightLimit=1e3]="SearchHighlightLimit"})(f||(e.XtermTerminalConstants=f={}));var v;(function(S){S[S.Unknown=1]="Unknown",S[S.Fedora=2]="Fedora",S[S.Ubuntu=3]="Ubuntu"})(v||(e.LinuxDistro=v={}));var m;(function(S){S.Terminals="Terminals"})(m||(e.TerminalDataTransfers=m={}))}),define(Q[3617],Y([1,0,113,119]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setupTerminalCommands=void 0;function b(){D()}e.setupTerminalCommands=b;function D(){for(let T=0;T<9;T++){const f=T,v=T+1;t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:`workbench.action.terminal.focusAtIndex${v}`,weight:200,when:void 0,primary:0,handler:m=>(m.get(y.ITerminalGroupService).setActiveInstanceByIndex(f),m.get(y.ITerminalGroupService).showPanel(!0))})}}}),define(Q[1310],Y([1,0,129,88]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.openContextMenu=void 0;function b(D,T,f,v,m){const S=new t.StandardMouseEvent(D),h=[];(0,y.createAndFillInContextMenuActions)(f,void 0,h),m&&h.push(...m),v.showContextMenu({getAnchor:()=>S,getActions:()=>h,getActionsContext:()=>T})}e.openContextMenu=b}),define(Q[3618],Y([1,0,119]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalInputSerializer=void 0;let y=class{constructor(D){this._terminalEditorService=D}canSerialize(D){return!!D.terminalInstance?.persistentProcessId}serialize(D){return!D.terminalInstance?.persistentProcessId||!D.terminalInstance.shouldPersist?void 0:JSON.stringify(this._toJson(D.terminalInstance))}deserialize(D,T){const f=JSON.parse(T);return this._terminalEditorService.reviveInput(f)}_toJson(D){return{id:D.persistentProcessId,pid:D.processId||0,title:D.title,titleSource:D.titleSource,cwd:"",icon:D.icon,color:D.color,hasChildProcesses:D.hasChildProcesses,isFeatureTerminal:D.shellLaunchConfig.isFeatureTerminal,hideFromUser:D.shellLaunchConfig.hideFromUser,reconnectionProperties:D.shellLaunchConfig.reconnectionProperties,shellIntegrationNonce:D.shellIntegrationNonce}}};e.TerminalInputSerializer=y,e.TerminalInputSerializer=y=fe([O(0,t.ITerminalEditorService)],y)}),define(Q[3619],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITermSequence=e.VSCodeSequence=e.ITermOscPt=e.VSCodeOscProperty=e.VSCodeOscPt=void 0;var t;(function(m){m[m.FinalTerm=133]="FinalTerm",m[m.VSCode=633]="VSCode",m[m.ITerm=1337]="ITerm"})(t||(t={}));var y;(function(m){m.PromptStart="A",m.CommandStart="B",m.CommandExecuted="C",m.CommandFinished="D",m.CommandLine="E",m.ContinuationStart="F",m.ContinuationEnd="G",m.RightPromptStart="H",m.RightPromptEnd="I",m.Property="P"})(y||(e.VSCodeOscPt=y={}));var b;(function(m){m.Task="Task",m.Cwd="Cwd"})(b||(e.VSCodeOscProperty=b={}));var D;(function(m){m.SetMark="SetMark"})(D||(e.ITermOscPt=D={}));function T(m,S){return v(633,m,S)}e.VSCodeSequence=T;function f(m,S){return v(1337,m,S)}e.ITermSequence=f;function v(m,S,h){let a=`\x1B]${m};${S}`;return h&&(a+=`;${h}`),a+="\x07",a}}),define(Q[3620],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createInstanceCapabilityEventMultiplexer=void 0;function b(D,T,f,v,m){const S=new y.DisposableStore,h=S.add(new t.EventMultiplexer),a=S.add(new y.DisposableMap);function r(o,u){const d=h.add(t.Event.map(m(u),p=>({instance:o,data:p})));a.set(u,d)}for(const o of D){const u=o.capabilities.get(v);u&&r(o,u)}return new t.DynamicListEventMultiplexer(D,T,f,o=>t.Event.map(o.capabilities.onDidAddCapability,u=>({instance:o,changeEvent:u}))).event(o=>{o.changeEvent.id===v&&r(o.instance,o.changeEvent.capability)}),new t.DynamicListEventMultiplexer(D,T,f,o=>o.capabilities.onDidRemoveCapability).event(o=>{o.id===v&&a.deleteAndDispose(o.capability)}),{dispose:()=>S.dispose(),event:h.event}}e.createInstanceCapabilityEventMultiplexer=b}),define(Q[421],Y([1,0,16]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalExtensionsRegistry=e.registerTerminalContribution=void 0;function y(f,v,m=!1){D.INSTANCE.registerTerminalContribution({id:f,ctor:v,canRunInDetachedTerminals:m})}e.registerTerminalContribution=y;var b;(function(f){function v(){return D.INSTANCE.getTerminalContributions()}f.getTerminalContributions=v})(b||(e.TerminalExtensionsRegistry=b={}));class D{static{this.INSTANCE=new D}constructor(){this._terminalContributions=[]}registerTerminalContribution(v){this._terminalContributions.push(v)}getTerminalContributions(){return this._terminalContributions.slice(0)}}var T;(function(f){f.TerminalContributions="terminal.contributions"})(T||(T={})),t.Registry.add("terminal.contributions",D.INSTANCE)}),define(Q[532],Y([1,0,32,2956,77]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.commandHistoryFuzzySearchIcon=e.commandHistoryOutputIcon=e.commandHistoryRemoveIcon=e.terminalDecorationSuccess=e.terminalDecorationError=e.terminalDecorationIncomplete=e.terminalDecorationMark=e.configureTerminalProfileIcon=e.newTerminalIcon=e.killTerminalIcon=e.renameTerminalIcon=e.terminalViewIcon=void 0,e.terminalViewIcon=(0,b.registerIcon)("terminal-view-icon",t.Codicon.terminal,(0,y.localize)(0,null)),e.renameTerminalIcon=(0,b.registerIcon)("terminal-rename",t.Codicon.gear,(0,y.localize)(1,null)),e.killTerminalIcon=(0,b.registerIcon)("terminal-kill",t.Codicon.trash,(0,y.localize)(2,null)),e.newTerminalIcon=(0,b.registerIcon)("terminal-new",t.Codicon.add,(0,y.localize)(3,null)),e.configureTerminalProfileIcon=(0,b.registerIcon)("terminal-configure-profile",t.Codicon.gear,(0,y.localize)(4,null)),e.terminalDecorationMark=(0,b.registerIcon)("terminal-decoration-mark",t.Codicon.circleSmallFilled,(0,y.localize)(5,null)),e.terminalDecorationIncomplete=(0,b.registerIcon)("terminal-decoration-incomplete",t.Codicon.circle,(0,y.localize)(6,null)),e.terminalDecorationError=(0,b.registerIcon)("terminal-decoration-error",t.Codicon.errorSmall,(0,y.localize)(7,null)),e.terminalDecorationSuccess=(0,b.registerIcon)("terminal-decoration-success",t.Codicon.circleFilled,(0,y.localize)(8,null)),e.commandHistoryRemoveIcon=(0,b.registerIcon)("terminal-command-history-remove",t.Codicon.close,(0,y.localize)(9,null)),e.commandHistoryOutputIcon=(0,b.registerIcon)("terminal-command-history-output",t.Codicon.output,(0,y.localize)(10,null)),e.commandHistoryFuzzySearchIcon=(0,b.registerIcon)("terminal-command-history-fuzzy-search",t.Codicon.searchFuzzy,(0,y.localize)(11,null))}),define(Q[1311],Y([1,0,6,4,119]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalProcessExtHostProxy=void 0;let D=class extends y.Disposable{get onProcessReady(){return this._onProcessReady.event}constructor(f,v,m,S){super(),this.instanceId=f,this._cols=v,this._rows=m,this._terminalService=S,this.id=0,this.shouldPersist=!1,this._onProcessData=this._register(new t.Emitter),this.onProcessData=this._onProcessData.event,this._onProcessReady=this._register(new t.Emitter),this._onStart=this._register(new t.Emitter),this.onStart=this._onStart.event,this._onInput=this._register(new t.Emitter),this.onInput=this._onInput.event,this._onBinary=this._register(new t.Emitter),this.onBinary=this._onBinary.event,this._onResize=this._register(new t.Emitter),this.onResize=this._onResize.event,this._onAcknowledgeDataEvent=this._register(new t.Emitter),this.onAcknowledgeDataEvent=this._onAcknowledgeDataEvent.event,this._onShutdown=this._register(new t.Emitter),this.onShutdown=this._onShutdown.event,this._onRequestInitialCwd=this._register(new t.Emitter),this.onRequestInitialCwd=this._onRequestInitialCwd.event,this._onRequestCwd=this._register(new t.Emitter),this.onRequestCwd=this._onRequestCwd.event,this._onDidChangeProperty=this._register(new t.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._onProcessExit=this._register(new t.Emitter),this.onProcessExit=this._onProcessExit.event,this._pendingInitialCwdRequests=[],this._pendingCwdRequests=[]}emitData(f){this._onProcessData.fire(f)}emitTitle(f){this._onDidChangeProperty.fire({type:"title",value:f})}emitReady(f,v){this._onProcessReady.fire({pid:f,cwd:v,windowsPty:void 0})}emitProcessProperty({type:f,value:v}){switch(f){case"cwd":this.emitCwd(v);break;case"initialCwd":this.emitInitialCwd(v);break;case"title":this.emitTitle(v);break;case"overrideDimensions":this.emitOverrideDimensions(v);break;case"resolvedShellLaunchConfig":this.emitResolvedShellLaunchConfig(v);break}}emitExit(f){this._onProcessExit.fire(f),this.dispose()}emitOverrideDimensions(f){this._onDidChangeProperty.fire({type:"overrideDimensions",value:f})}emitResolvedShellLaunchConfig(f){this._onDidChangeProperty.fire({type:"resolvedShellLaunchConfig",value:f})}emitInitialCwd(f){for(;this._pendingInitialCwdRequests.length>0;)this._pendingInitialCwdRequests.pop()(f)}emitCwd(f){for(;this._pendingCwdRequests.length>0;)this._pendingCwdRequests.pop()(f)}async start(){return this._terminalService.requestStartExtensionTerminal(this,this._cols,this._rows)}shutdown(f){this._onShutdown.fire(f)}input(f){this._onInput.fire(f)}resize(f,v){this._onResize.fire({cols:f,rows:v})}clearBuffer(){}acknowledgeDataEvent(){}async setUnicodeVersion(f){}async processBinary(f){this._onBinary.fire(f)}getInitialCwd(){return new Promise(f=>{this._onRequestInitialCwd.fire(),this._pendingInitialCwdRequests.push(f)})}getCwd(){return new Promise(f=>{this._onRequestCwd.fire(),this._pendingCwdRequests.push(f)})}async refreshProperty(f){}async updateProperty(f,v){}};e.TerminalProcessExtHostProxy=D,e.TerminalProcessExtHostProxy=D=fe([O(3,b.ITerminalService)],D)}),define(Q[933],Y([1,0,32,6,4,63,9,36,77,37]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorForSeverity=e.TerminalStatusList=e.TerminalStatus=void 0;var S;(function(r){r.Bell="bell",r.Disconnected="disconnected",r.RelaunchNeeded="relaunch-needed",r.EnvironmentVariableInfoChangesActive="env-var-info-changes-active",r.ShellIntegrationAttentionNeeded="shell-integration-attention-needed"})(S||(e.TerminalStatus=S={}));let h=class extends b.Disposable{get onDidAddStatus(){return this._onDidAddStatus.event}get onDidRemoveStatus(){return this._onDidRemoveStatus.event}get onDidChangePrimaryStatus(){return this._onDidChangePrimaryStatus.event}constructor(i){super(),this._configurationService=i,this._statuses=new Map,this._statusTimeouts=new Map,this._onDidAddStatus=this._register(new y.Emitter),this._onDidRemoveStatus=this._register(new y.Emitter),this._onDidChangePrimaryStatus=this._register(new y.Emitter)}get primary(){let i;for(const s of this._statuses.values())(!i||s.severity>=i.severity)&&(i=s);return i}get statuses(){return Array.from(this._statuses.values())}add(i,s){i=this._applyAnimationSetting(i);const o=this._statusTimeouts.get(i.id);if(o&&(window.clearTimeout(o),this._statusTimeouts.delete(i.id)),s&&s>0){const d=window.setTimeout(()=>this.remove(i),s);this._statusTimeouts.set(i.id,d)}const u=this._statuses.get(i.id);if(u&&u!==i&&(this._onDidRemoveStatus.fire(u),this._statuses.delete(u.id)),!this._statuses.has(i.id)){const d=this.primary;this._statuses.set(i.id,i),this._onDidAddStatus.fire(i);const p=this.primary;d!==p&&this._onDidChangePrimaryStatus.fire(p)}}remove(i){const s=typeof i=="string"?this._statuses.get(i):i;if(s&&this._statuses.get(s.id)){const o=this.primary?.id===s.id;this._statuses.delete(s.id),this._onDidRemoveStatus.fire(s),o&&this._onDidChangePrimaryStatus.fire(this.primary)}}toggle(i,s){s?this.add(i):this.remove(i)}_applyAnimationSetting(i){if(!i.icon||m.ThemeIcon.getModifier(i.icon)!=="spin"||this._configurationService.getValue("terminal.integrated.tabs.enableAnimation"))return i;let s;return i.icon.id===v.spinningLoading.id?s=t.Codicon.play:s=m.ThemeIcon.modify(i.icon,void 0),{...i,icon:s}}};e.TerminalStatusList=h,e.TerminalStatusList=h=fe([O(0,T.IConfigurationService)],h);function a(r){switch(r){case D.default.Error:return f.listErrorForeground;case D.default.Warning:return f.listWarningForeground;default:return""}}e.getColorForSeverity=a}),define(Q[934],Y([1,0,2966,20,110]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShellProcessTooltip=e.getShellIntegrationTooltip=e.getInstanceHoverInfo=void 0;function D(v){let m="";const S=v.statusList.statuses,h=[];for(const s of S)m+=` --- ${s.icon?`$(${s.icon?.id}) `:""}${s.tooltip||s.id}`,s.hoverActions&&h.push(...s.hoverActions);const a=f(v,!0),r=T(v,!0);return{content:new b.MarkdownString(v.title+a+r+m,{supportThemeIcons:!0}),actions:h}}e.getInstanceHoverInfo=D;function T(v,m){const S=[];v.capabilities.has(2)&&S.push(2),v.capabilities.has(0)&&S.push(0);let h="";return S.length>0?h+=`${m?` --- `:` `}${(0,t.localize)(0,null)}`:v.shellLaunchConfig.ignoreShellIntegration?h+=`${m?` --- `:` `}${(0,t.localize)(1,null)}`:v.usedShellIntegrationInjection&&(h+=`${m?` --- `:` `}${(0,t.localize)(2,null)}`),h}e.getShellIntegrationTooltip=T;function f(v,m){const S=[];if(v.processId&&S.push((0,t.localize)(3,null,"PID",v.processId)+` `),v.shellLaunchConfig.executable){let h=v.shellLaunchConfig.executable;const a=(0,y.asArray)(v.injectedArgs||v.shellLaunchConfig.args||[]).map(r=>`'${r}'`).join(" ");a&&(h+=` ${a}`),S.push((0,t.localize)(4,null,h))}return S.length?`${m?` --- `:` `}${S.join(` `)}`:""}e.getShellProcessTooltip=f}),define(Q[533],Y([1,0,22,10]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getInstanceFromResource=e.getTerminalResourcesFromDragEvent=e.getTerminalUri=e.parseTerminalUri=void 0;function b(v){const[,m,S]=v.path.split("/");if(!m||!Number.parseInt(S))throw new Error(`Could not parse terminal uri for resource ${v}`);return{workspaceId:m,instanceId:Number.parseInt(S)}}e.parseTerminalUri=b;function D(v,m,S){return y.URI.from({scheme:t.Schemas.vscodeTerminal,path:`/${v}/${m}`,fragment:S||void 0})}e.getTerminalUri=D;function T(v){const m=v.dataTransfer?.getData("Terminals");if(m){const S=JSON.parse(m),h=[];for(const a of S)h.push(y.URI.parse(a));return h.length===0?void 0:h}}e.getTerminalResourcesFromDragEvent=T;function f(v,m){if(m){for(const S of v)if(S.resource.path===m.path)return S}}e.getInstanceFromResource=f}),define(Q[1312],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalWidgetManager=void 0;class t{constructor(){this._attached=new Map}attachToElement(b){this._container||(this._container=document.createElement("div"),this._container.classList.add("terminal-widget-container"),b.appendChild(this._container))}dispose(){this._container&&this._container.parentElement&&(this._container.parentElement.removeChild(this._container),this._container=void 0)}attachWidget(b){if(this._container)return this._attached.get(b.id)?.dispose(),b.attach(this._container),this._attached.set(b.id,b),{dispose:()=>{this._attached.get(b.id)===b&&(this._attached.delete(b.id),b.dispose())}}}}e.TerminalWidgetManager=t}),define(Q[1313],Y([1,0,14,15,4,651,5,514,421,1312]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DetachedProcessInfo=e.DeatachedTerminal=void 0;let S=class extends b.Disposable{get xterm(){return this._xterm}constructor(r,i,s){super(),this._xterm=r,this._widgets=this._register(new m.TerminalWidgetManager),this.capabilities=new f.TerminalCapabilityStore,this._contributions=new Map,this._register(r);const o=v.TerminalExtensionsRegistry.getTerminalContributions();for(const u of o){if(this._contributions.has(u.id)){(0,y.onUnexpectedError)(new Error(`Cannot have two terminal contributions with the same id ${u.id}`));continue}if(u.canRunInDetachedTerminals===!1)continue;let d;try{d=s.createInstance(u.ctor,this,i.processInfo,this._widgets),this._contributions.set(u.id,d),this._register(d)}catch(p){(0,y.onUnexpectedError)(p)}}this._register(new t.Delayer(D.MicrotaskDelay)).trigger(()=>{for(const u of this._contributions.values())u.xtermReady?.(this._xterm)})}attachToElement(r,i){const s=this._xterm.attachToElement(r,i);this._widgets.attachToElement(s)}};e.DeatachedTerminal=S,e.DeatachedTerminal=S=fe([O(2,T.IInstantiationService)],S);class h{constructor(r){this.processState=3,this.ptyProcessReady=Promise.resolve(),this.initialCwd="",this.shouldPersist=!1,this.hasWrittenData=!1,this.hasChildProcesses=!1,this.capabilities=new f.TerminalCapabilityStore,this.shellIntegrationNonce="",Object.assign(this,r)}}e.DetachedProcessInfo=h}),define(Q[3621],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDataEventAddon=void 0;class b extends y.Disposable{constructor(T){super(),this._initializationPromise=T,this._isOsSet=!1,this._onLineData=this._register(new t.Emitter),this.onLineData=this._onLineData.event}async activate(T){this._xterm=T,await this._initializationPromise,this._register(T.onLineFeed(()=>{const f=T.buffer,v=f.active.getLine(f.active.baseY+f.active.cursorY);v&&!v.isWrapped&&this._sendLineData(f.active,f.active.baseY+f.active.cursorY-1)})),this._register((0,y.toDisposable)(()=>{const f=T.buffer;this._sendLineData(f.active,f.active.baseY+f.active.cursorY)}))}setOperatingSystem(T){if(!(this._isOsSet||!this._xterm)&&(this._isOsSet=!0,T===1)){const f=this._xterm;this._register(f.parser.registerCsiHandler({final:"H"},()=>{const v=f.buffer;return this._sendLineData(v.active,v.active.baseY+v.active.cursorY),!1}))}}_sendLineData(T,f){let v=T.getLine(f);if(!v)return;let m=v.translateToString(!0);for(;f>0&&v.isWrapped&&(v=T.getLine(--f),!!v);)m=v.translateToString(!1)+m;this._onLineData.fire(m)}}e.LineDataEventAddon=b}),define(Q[616],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEnvironmentVariableService=void 0,e.IEnvironmentVariableService=(0,t.createDecorator)("environmentVariableService")}),define(Q[158],Y([1,0,2971,5]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.terminalContributionsDescriptor=e.DEFAULT_COMMANDS_TO_SKIP_SHELL=e.TerminalCommandId=e.QUICK_LAUNCH_PROFILE_CHOICE=e.ProcessState=e.isTerminalProcessManager=e.DEFAULT_LOCAL_ECHO_EXCLUDE=e.ITerminalProfileService=e.ShellIntegrationExitCode=e.ITerminalProfileResolverService=e.SUGGESTIONS_FONT_WEIGHT=e.DEFAULT_BOLD_FONT_WEIGHT=e.DEFAULT_FONT_WEIGHT=e.MAXIMUM_FONT_WEIGHT=e.MINIMUM_FONT_WEIGHT=e.DEFAULT_LINE_HEIGHT=e.MINIMUM_LETTER_SPACING=e.DEFAULT_LETTER_SPACING=e.TERMINAL_CONFIG_SECTION=e.TERMINAL_CREATION_COMMANDS=e.TERMINAL_VIEW_ID=void 0,e.TERMINAL_VIEW_ID="terminal",e.TERMINAL_CREATION_COMMANDS=["workbench.action.terminal.toggleTerminal","workbench.action.terminal.new","workbench.action.togglePanel","workbench.action.terminal.focus"],e.TERMINAL_CONFIG_SECTION="terminal.integrated",e.DEFAULT_LETTER_SPACING=0,e.MINIMUM_LETTER_SPACING=-5,e.DEFAULT_LINE_HEIGHT=1,e.MINIMUM_FONT_WEIGHT=1,e.MAXIMUM_FONT_WEIGHT=1e3,e.DEFAULT_FONT_WEIGHT="normal",e.DEFAULT_BOLD_FONT_WEIGHT="bold",e.SUGGESTIONS_FONT_WEIGHT=["normal","bold","100","200","300","400","500","600","700","800","900"],e.ITerminalProfileResolverService=(0,y.createDecorator)("terminalProfileResolverService"),e.ShellIntegrationExitCode=633,e.ITerminalProfileService=(0,y.createDecorator)("terminalProfileService"),e.DEFAULT_LOCAL_ECHO_EXCLUDE=["vim","vi","nano","tmux"];const b=f=>typeof f.write=="function";e.isTerminalProcessManager=b;var D;(function(f){f[f.Uninitialized=1]="Uninitialized",f[f.Launching=2]="Launching",f[f.Running=3]="Running",f[f.KilledDuringLaunch=4]="KilledDuringLaunch",f[f.KilledByUser=5]="KilledByUser",f[f.KilledByProcess=6]="KilledByProcess"})(D||(e.ProcessState=D={})),e.QUICK_LAUNCH_PROFILE_CHOICE="workbench.action.terminal.profile.choice";var T;(function(f){f.FindNext="workbench.action.terminal.findNext",f.FindPrevious="workbench.action.terminal.findPrevious",f.Toggle="workbench.action.terminal.toggleTerminal",f.Kill="workbench.action.terminal.kill",f.KillViewOrEditor="workbench.action.terminal.killViewOrEditor",f.KillEditor="workbench.action.terminal.killEditor",f.KillActiveTab="workbench.action.terminal.killActiveTab",f.KillAll="workbench.action.terminal.killAll",f.QuickKill="workbench.action.terminal.quickKill",f.ConfigureTerminalSettings="workbench.action.terminal.openSettings",f.OpenDetectedLink="workbench.action.terminal.openDetectedLink",f.OpenWordLink="workbench.action.terminal.openWordLink",f.ShellIntegrationLearnMore="workbench.action.terminal.learnMore",f.OpenFileLink="workbench.action.terminal.openFileLink",f.OpenWebLink="workbench.action.terminal.openUrlLink",f.RunRecentCommand="workbench.action.terminal.runRecentCommand",f.FocusAccessibleBuffer="workbench.action.terminal.focusAccessibleBuffer",f.NavigateAccessibleBuffer="workbench.action.terminal.navigateAccessibleBuffer",f.AccessibleBufferGoToNextCommand="workbench.action.terminal.accessibleBufferGoToNextCommand",f.AccessibleBufferGoToPreviousCommand="workbench.action.terminal.accessibleBufferGoToPreviousCommand",f.CopyLastCommandOutput="workbench.action.terminal.copyLastCommandOutput",f.GoToRecentDirectory="workbench.action.terminal.goToRecentDirectory",f.CopyAndClearSelection="workbench.action.terminal.copyAndClearSelection",f.CopySelection="workbench.action.terminal.copySelection",f.CopySelectionAsHtml="workbench.action.terminal.copySelectionAsHtml",f.SelectAll="workbench.action.terminal.selectAll",f.DeleteWordLeft="workbench.action.terminal.deleteWordLeft",f.DeleteWordRight="workbench.action.terminal.deleteWordRight",f.DeleteToLineStart="workbench.action.terminal.deleteToLineStart",f.MoveToLineStart="workbench.action.terminal.moveToLineStart",f.MoveToLineEnd="workbench.action.terminal.moveToLineEnd",f.New="workbench.action.terminal.new",f.NewWithCwd="workbench.action.terminal.newWithCwd",f.NewLocal="workbench.action.terminal.newLocal",f.NewInActiveWorkspace="workbench.action.terminal.newInActiveWorkspace",f.NewWithProfile="workbench.action.terminal.newWithProfile",f.Split="workbench.action.terminal.split",f.SplitActiveTab="workbench.action.terminal.splitActiveTab",f.SplitInActiveWorkspace="workbench.action.terminal.splitInActiveWorkspace",f.ShowQuickFixes="workbench.action.terminal.showQuickFixes",f.Unsplit="workbench.action.terminal.unsplit",f.UnsplitActiveTab="workbench.action.terminal.unsplitActiveTab",f.JoinActiveTab="workbench.action.terminal.joinActiveTab",f.Join="workbench.action.terminal.join",f.Relaunch="workbench.action.terminal.relaunch",f.FocusPreviousPane="workbench.action.terminal.focusPreviousPane",f.CreateTerminalEditor="workbench.action.createTerminalEditor",f.CreateTerminalEditorSameGroup="workbench.action.createTerminalEditorSameGroup",f.CreateTerminalEditorSide="workbench.action.createTerminalEditorSide",f.FocusTabs="workbench.action.terminal.focusTabs",f.FocusNextPane="workbench.action.terminal.focusNextPane",f.ResizePaneLeft="workbench.action.terminal.resizePaneLeft",f.ResizePaneRight="workbench.action.terminal.resizePaneRight",f.ResizePaneUp="workbench.action.terminal.resizePaneUp",f.SizeToContentWidth="workbench.action.terminal.sizeToContentWidth",f.SizeToContentWidthActiveTab="workbench.action.terminal.sizeToContentWidthActiveTab",f.ResizePaneDown="workbench.action.terminal.resizePaneDown",f.Focus="workbench.action.terminal.focus",f.FocusNext="workbench.action.terminal.focusNext",f.FocusPrevious="workbench.action.terminal.focusPrevious",f.Paste="workbench.action.terminal.paste",f.PasteSelection="workbench.action.terminal.pasteSelection",f.SelectDefaultProfile="workbench.action.terminal.selectDefaultShell",f.RunSelectedText="workbench.action.terminal.runSelectedText",f.RunActiveFile="workbench.action.terminal.runActiveFile",f.SwitchTerminal="workbench.action.terminal.switchTerminal",f.ScrollDownLine="workbench.action.terminal.scrollDown",f.ScrollDownPage="workbench.action.terminal.scrollDownPage",f.ScrollToBottom="workbench.action.terminal.scrollToBottom",f.ScrollUpLine="workbench.action.terminal.scrollUp",f.ScrollUpPage="workbench.action.terminal.scrollUpPage",f.ScrollToTop="workbench.action.terminal.scrollToTop",f.Clear="workbench.action.terminal.clear",f.ClearSelection="workbench.action.terminal.clearSelection",f.ChangeIcon="workbench.action.terminal.changeIcon",f.ChangeIconPanel="workbench.action.terminal.changeIconPanel",f.ChangeIconActiveTab="workbench.action.terminal.changeIconActiveTab",f.ChangeColor="workbench.action.terminal.changeColor",f.ChangeColorPanel="workbench.action.terminal.changeColorPanel",f.ChangeColorActiveTab="workbench.action.terminal.changeColorActiveTab",f.Rename="workbench.action.terminal.rename",f.RenamePanel="workbench.action.terminal.renamePanel",f.RenameActiveTab="workbench.action.terminal.renameActiveTab",f.RenameWithArgs="workbench.action.terminal.renameWithArg",f.FindFocus="workbench.action.terminal.focusFind",f.FindHide="workbench.action.terminal.hideFind",f.QuickOpenTerm="workbench.action.quickOpenTerm",f.ScrollToPreviousCommand="workbench.action.terminal.scrollToPreviousCommand",f.ScrollToNextCommand="workbench.action.terminal.scrollToNextCommand",f.SelectToPreviousCommand="workbench.action.terminal.selectToPreviousCommand",f.SelectToNextCommand="workbench.action.terminal.selectToNextCommand",f.SelectToPreviousLine="workbench.action.terminal.selectToPreviousLine",f.SelectToNextLine="workbench.action.terminal.selectToNextLine",f.SendSequence="workbench.action.terminal.sendSequence",f.ToggleFindRegex="workbench.action.terminal.toggleFindRegex",f.ToggleFindWholeWord="workbench.action.terminal.toggleFindWholeWord",f.ToggleFindCaseSensitive="workbench.action.terminal.toggleFindCaseSensitive",f.SearchWorkspace="workbench.action.terminal.searchWorkspace",f.AttachToSession="workbench.action.terminal.attachToSession",f.DetachSession="workbench.action.terminal.detachSession",f.MoveToEditor="workbench.action.terminal.moveToEditor",f.MoveToEditorActiveTab="workbench.action.terminal.moveToEditorActiveTab",f.MoveToTerminalPanel="workbench.action.terminal.moveToTerminalPanel",f.SetDimensions="workbench.action.terminal.setDimensions",f.ClearPreviousSessionHistory="workbench.action.terminal.clearPreviousSessionHistory",f.SelectPrevSuggestion="workbench.action.terminal.selectPrevSuggestion",f.SelectPrevPageSuggestion="workbench.action.terminal.selectPrevPageSuggestion",f.SelectNextSuggestion="workbench.action.terminal.selectNextSuggestion",f.SelectNextPageSuggestion="workbench.action.terminal.selectNextPageSuggestion",f.AcceptSelectedSuggestion="workbench.action.terminal.acceptSelectedSuggestion",f.HideSuggestWidget="workbench.action.terminal.hideSuggestWidget",f.FocusHover="workbench.action.terminal.focusHover",f.ShowEnvironmentContributions="workbench.action.terminal.showEnvironmentContributions",f.WriteDataToTerminal="workbench.action.terminal.writeDataToTerminal",f.ShowTextureAtlas="workbench.action.terminal.showTextureAtlas",f.RestartPtyHost="workbench.action.terminal.restartPtyHost"})(T||(e.TerminalCommandId=T={})),e.DEFAULT_COMMANDS_TO_SKIP_SHELL=["workbench.action.terminal.clearSelection","workbench.action.terminal.clear","workbench.action.terminal.copyAndClearSelection","workbench.action.terminal.copySelection","workbench.action.terminal.copySelectionAsHtml","workbench.action.terminal.copyLastCommandOutput","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.goToRecentDirectory","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.sizeToContentWidth","workbench.action.terminal.kill","workbench.action.terminal.killEditor","workbench.action.terminal.moveToEditor","workbench.action.terminal.moveToLineEnd","workbench.action.terminal.moveToLineStart","workbench.action.terminal.moveToTerminalPanel","workbench.action.terminal.newInActiveWorkspace","workbench.action.terminal.new","workbench.action.terminal.paste","workbench.action.terminal.pasteSelection","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.runRecentCommand","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.selectPrevSuggestion","workbench.action.terminal.selectPrevPageSuggestion","workbench.action.terminal.selectNextSuggestion","workbench.action.terminal.selectNextPageSuggestion","workbench.action.terminal.acceptSelectedSuggestion","workbench.action.terminal.hideSuggestWidget","workbench.action.terminal.focusHover","workbench.action.terminal.focusAccessibleBuffer","editor.action.accessibilityHelp","editor.action.toggleTabFocusMode","notifications.hideList","notifications.hideToasts","workbench.action.closeQuickOpen","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","notification.acceptPrimaryAction","runCommands"],e.terminalContributionsDescriptor={extensionPoint:"terminal",defaultExtensionKind:["workspace"],activationEventsGenerator:(f,v)=>{for(const m of f)for(const S of m.profiles??[])v.push(`onTerminalProfile:${S.id}`)},jsonSchema:{description:t.localize(0,null),type:"object",properties:{profiles:{type:"array",description:t.localize(1,null),items:{type:"object",required:["id","title"],defaultSnippets:[{body:{id:"$1",title:"$2"}}],properties:{id:{description:t.localize(2,null),type:"string"},title:{description:t.localize(3,null),type:"string"},icon:{description:t.localize(4,null),anyOf:[{type:"string"},{type:"object",properties:{light:{description:t.localize(5,null),type:"string"},dark:{description:t.localize(6,null),type:"string"}}}]}}}}}}}}),define(Q[468],Y([1,0,2972,36,84]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerColors=e.ansiColorMap=e.TERMINAL_TAB_ACTIVE_BORDER=e.TERMINAL_DRAG_AND_DROP_BACKGROUND=e.TERMINAL_OVERVIEW_RULER_FIND_MATCH_FOREGROUND_COLOR=e.TERMINAL_FIND_MATCH_HIGHLIGHT_BORDER_COLOR=e.TERMINAL_FIND_MATCH_HIGHLIGHT_BACKGROUND_COLOR=e.TERMINAL_FIND_MATCH_BORDER_COLOR=e.TERMINAL_HOVER_HIGHLIGHT_BACKGROUND_COLOR=e.TERMINAL_FIND_MATCH_BACKGROUND_COLOR=e.TERMINAL_BORDER_COLOR=e.TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR=e.TERMINAL_COMMAND_DECORATION_ERROR_BACKGROUND_COLOR=e.TERMINAL_COMMAND_DECORATION_SUCCESS_BACKGROUND_COLOR=e.TERMINAL_COMMAND_DECORATION_DEFAULT_BACKGROUND_COLOR=e.TERMINAL_SELECTION_FOREGROUND_COLOR=e.TERMINAL_INACTIVE_SELECTION_BACKGROUND_COLOR=e.TERMINAL_SELECTION_BACKGROUND_COLOR=e.TERMINAL_CURSOR_BACKGROUND_COLOR=e.TERMINAL_CURSOR_FOREGROUND_COLOR=e.TERMINAL_FOREGROUND_COLOR=e.TERMINAL_BACKGROUND_COLOR=e.ansiColorIdentifiers=void 0,e.ansiColorIdentifiers=[],e.TERMINAL_BACKGROUND_COLOR=(0,y.registerColor)("terminal.background",null,t.localize(0,null)),e.TERMINAL_FOREGROUND_COLOR=(0,y.registerColor)("terminal.foreground",{light:"#333333",dark:"#CCCCCC",hcDark:"#FFFFFF",hcLight:"#292929"},t.localize(1,null)),e.TERMINAL_CURSOR_FOREGROUND_COLOR=(0,y.registerColor)("terminalCursor.foreground",null,t.localize(2,null)),e.TERMINAL_CURSOR_BACKGROUND_COLOR=(0,y.registerColor)("terminalCursor.background",null,t.localize(3,null)),e.TERMINAL_SELECTION_BACKGROUND_COLOR=(0,y.registerColor)("terminal.selectionBackground",{light:y.editorSelectionBackground,dark:y.editorSelectionBackground,hcDark:y.editorSelectionBackground,hcLight:y.editorSelectionBackground},t.localize(4,null)),e.TERMINAL_INACTIVE_SELECTION_BACKGROUND_COLOR=(0,y.registerColor)("terminal.inactiveSelectionBackground",{light:(0,y.transparent)(e.TERMINAL_SELECTION_BACKGROUND_COLOR,.5),dark:(0,y.transparent)(e.TERMINAL_SELECTION_BACKGROUND_COLOR,.5),hcDark:(0,y.transparent)(e.TERMINAL_SELECTION_BACKGROUND_COLOR,.7),hcLight:(0,y.transparent)(e.TERMINAL_SELECTION_BACKGROUND_COLOR,.5)},t.localize(5,null)),e.TERMINAL_SELECTION_FOREGROUND_COLOR=(0,y.registerColor)("terminal.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:"#ffffff"},t.localize(6,null)),e.TERMINAL_COMMAND_DECORATION_DEFAULT_BACKGROUND_COLOR=(0,y.registerColor)("terminalCommandDecoration.defaultBackground",{light:"#00000040",dark:"#ffffff40",hcDark:"#ffffff80",hcLight:"#00000040"},t.localize(7,null)),e.TERMINAL_COMMAND_DECORATION_SUCCESS_BACKGROUND_COLOR=(0,y.registerColor)("terminalCommandDecoration.successBackground",{dark:"#1B81A8",light:"#2090D3",hcDark:"#1B81A8",hcLight:"#007100"},t.localize(8,null)),e.TERMINAL_COMMAND_DECORATION_ERROR_BACKGROUND_COLOR=(0,y.registerColor)("terminalCommandDecoration.errorBackground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F14C4C",hcLight:"#B5200D"},t.localize(9,null)),e.TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR=(0,y.registerColor)("terminalOverviewRuler.cursorForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},t.localize(10,null)),e.TERMINAL_BORDER_COLOR=(0,y.registerColor)("terminal.border",{dark:b.PANEL_BORDER,light:b.PANEL_BORDER,hcDark:b.PANEL_BORDER,hcLight:b.PANEL_BORDER},t.localize(11,null)),e.TERMINAL_FIND_MATCH_BACKGROUND_COLOR=(0,y.registerColor)("terminal.findMatchBackground",{dark:y.editorFindMatch,light:y.editorFindMatch,hcDark:null,hcLight:"#0F4A85"},t.localize(12,null)),e.TERMINAL_HOVER_HIGHLIGHT_BACKGROUND_COLOR=(0,y.registerColor)("terminal.hoverHighlightBackground",{dark:(0,y.transparent)(y.editorHoverHighlight,.5),light:(0,y.transparent)(y.editorHoverHighlight,.5),hcDark:(0,y.transparent)(y.editorHoverHighlight,.5),hcLight:(0,y.transparent)(y.editorHoverHighlight,.5)},t.localize(13,null)),e.TERMINAL_FIND_MATCH_BORDER_COLOR=(0,y.registerColor)("terminal.findMatchBorder",{dark:null,light:null,hcDark:"#f38518",hcLight:"#0F4A85"},t.localize(14,null)),e.TERMINAL_FIND_MATCH_HIGHLIGHT_BACKGROUND_COLOR=(0,y.registerColor)("terminal.findMatchHighlightBackground",{dark:y.editorFindMatchHighlight,light:y.editorFindMatchHighlight,hcDark:null,hcLight:null},t.localize(15,null)),e.TERMINAL_FIND_MATCH_HIGHLIGHT_BORDER_COLOR=(0,y.registerColor)("terminal.findMatchHighlightBorder",{dark:null,light:null,hcDark:"#f38518",hcLight:"#0F4A85"},t.localize(16,null)),e.TERMINAL_OVERVIEW_RULER_FIND_MATCH_FOREGROUND_COLOR=(0,y.registerColor)("terminalOverviewRuler.findMatchForeground",{dark:y.overviewRulerFindMatchForeground,light:y.overviewRulerFindMatchForeground,hcDark:"#f38518",hcLight:"#0F4A85"},t.localize(17,null)),e.TERMINAL_DRAG_AND_DROP_BACKGROUND=(0,y.registerColor)("terminal.dropBackground",{dark:b.EDITOR_DRAG_AND_DROP_BACKGROUND,light:b.EDITOR_DRAG_AND_DROP_BACKGROUND,hcDark:b.EDITOR_DRAG_AND_DROP_BACKGROUND,hcLight:b.EDITOR_DRAG_AND_DROP_BACKGROUND},t.localize(18,null)),e.TERMINAL_TAB_ACTIVE_BORDER=(0,y.registerColor)("terminal.tab.activeBorder",{dark:b.TAB_ACTIVE_BORDER,light:b.TAB_ACTIVE_BORDER,hcDark:b.TAB_ACTIVE_BORDER,hcLight:b.TAB_ACTIVE_BORDER},t.localize(19,null)),e.ansiColorMap={"terminal.ansiBlack":{index:0,defaults:{light:"#000000",dark:"#000000",hcDark:"#000000",hcLight:"#292929"}},"terminal.ansiRed":{index:1,defaults:{light:"#cd3131",dark:"#cd3131",hcDark:"#cd0000",hcLight:"#cd3131"}},"terminal.ansiGreen":{index:2,defaults:{light:"#00BC00",dark:"#0DBC79",hcDark:"#00cd00",hcLight:"#00bc00"}},"terminal.ansiYellow":{index:3,defaults:{light:"#949800",dark:"#e5e510",hcDark:"#cdcd00",hcLight:"#949800"}},"terminal.ansiBlue":{index:4,defaults:{light:"#0451a5",dark:"#2472c8",hcDark:"#0000ee",hcLight:"#0451a5"}},"terminal.ansiMagenta":{index:5,defaults:{light:"#bc05bc",dark:"#bc3fbc",hcDark:"#cd00cd",hcLight:"#bc05bc"}},"terminal.ansiCyan":{index:6,defaults:{light:"#0598bc",dark:"#11a8cd",hcDark:"#00cdcd",hcLight:"#0598bc"}},"terminal.ansiWhite":{index:7,defaults:{light:"#555555",dark:"#e5e5e5",hcDark:"#e5e5e5",hcLight:"#555555"}},"terminal.ansiBrightBlack":{index:8,defaults:{light:"#666666",dark:"#666666",hcDark:"#7f7f7f",hcLight:"#666666"}},"terminal.ansiBrightRed":{index:9,defaults:{light:"#cd3131",dark:"#f14c4c",hcDark:"#ff0000",hcLight:"#cd3131"}},"terminal.ansiBrightGreen":{index:10,defaults:{light:"#14CE14",dark:"#23d18b",hcDark:"#00ff00",hcLight:"#00bc00"}},"terminal.ansiBrightYellow":{index:11,defaults:{light:"#b5ba00",dark:"#f5f543",hcDark:"#ffff00",hcLight:"#b5ba00"}},"terminal.ansiBrightBlue":{index:12,defaults:{light:"#0451a5",dark:"#3b8eea",hcDark:"#5c5cff",hcLight:"#0451a5"}},"terminal.ansiBrightMagenta":{index:13,defaults:{light:"#bc05bc",dark:"#d670d6",hcDark:"#ff00ff",hcLight:"#bc05bc"}},"terminal.ansiBrightCyan":{index:14,defaults:{light:"#0598bc",dark:"#29b8db",hcDark:"#00ffff",hcLight:"#0598bc"}},"terminal.ansiBrightWhite":{index:15,defaults:{light:"#a5a5a5",dark:"#e5e5e5",hcDark:"#ffffff",hcLight:"#a5a5a5"}}};function D(){for(const T in e.ansiColorMap){const f=e.ansiColorMap[T],v=T.substring(13);e.ansiColorIdentifiers[f.index]=(0,y.registerColor)(T,f.defaults,t.localize(20,null,v))}}e.registerColors=D}),define(Q[379],Y([1,0,122,10,77,167,37,158,468]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconId=e.getUriClasses=e.getColorStyleContent=e.getColorStyleElement=e.getStandardColors=e.getColorClass=void 0;function m(s){let o;if(typeof s=="string"?o=s:s.color?o=s.color.replace(/\./g,"_"):T.ThemeIcon.isThemeIcon(s.icon)&&s.icon.color&&(o=s.icon.color.id.replace(/\./g,"_")),o)return`terminal-icon-${o.replace(/\./g,"_")}`}e.getColorClass=m;function S(s){const o=[];for(const u in v.ansiColorMap)s.getColor(u)&&!u.toLowerCase().includes("bright")&&o.push(u);return o}e.getStandardColors=S;function h(s){const o=S(s),u=document.createElement("style");let d="";for(const p of o){const c=m(p),l=s.getColor(p);l&&(d+=`.monaco-workbench .${c} .codicon:first-child:not(.codicon-split-horizontal):not(.codicon-trashcan):not(.file-icon){ color: ${l} !important; }`)}return u.textContent=d,u}e.getColorStyleElement=h;function a(s,o){const u=S(s);let d="";for(const p of u){const c=m(p),l=s.getColor(p);l&&(o?d+=`.monaco-workbench .show-file-icons .file-icon.terminal-tab.${c}::before{ color: ${l} !important; }`:d+=`.monaco-workbench .${c} .codicon:first-child:not(.codicon-split-horizontal):not(.codicon-trashcan):not(.file-icon){ color: ${l} !important; }`)}return d}e.getColorStyleContent=a;function r(s,o,u){const d=s.icon;if(!d)return;const p=[];let c;if(u){if(typeof d=="string"&&(d.startsWith("$(")||(0,b.getIconRegistry)().getIcon(d)))return p;typeof d=="string"&&(c=y.URI.parse(d))}if(d instanceof y.URI?c=d:d instanceof Object&&"light"in d&&"dark"in d&&(c=o===D.ColorScheme.LIGHT?d.light:d.dark),c instanceof y.URI){const n=`terminal-uri-icon-${(0,t.hash)(c.path).toString(36)}`;p.push(n),p.push("terminal-uri-icon")}return p}e.getUriClasses=r;function i(s,o){return!o.icon||o.icon instanceof Object&&!("id"in o.icon)?s.get(f.ITerminalProfileResolverService).getDefaultIcon().id:typeof o.icon=="string"?o.icon:o.icon.id}e.getIconId=i}),define(Q[3622],Y([1,0,32,9,43,379,532,2960,19,37,158,77,55,23]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalProfileQuickpick=void 0;let i=class{constructor(o,u,d,p,c,l){this._terminalProfileService=o,this._terminalProfileResolverService=u,this._configurationService=d,this._quickInputService=p,this._themeService=c,this._notificationService=l}async showAndGetResult(o){const u=await this._terminalProfileService.getPlatformKey(),d="terminal.integrated.profiles."+u,p=await this._createAndShow(o),c=`terminal.integrated.defaultProfile.${u}`;if(p){if(o==="setDefault"){if("command"in p.profile)return;if("id"in p.profile)return await this._configurationService.updateValue(c,p.profile.title,2),{config:{extensionIdentifier:p.profile.extensionIdentifier,id:p.profile.id,title:p.profile.title,options:{color:p.profile.color,icon:p.profile.icon}},keyMods:p.keyMods};if("isAutoDetected"in p.profile){const l=await this._configurationService.getValue(d);if(typeof l=="object"){const n={path:p.profile.path};p.profile.args&&(n.args=p.profile.args),l[p.profile.profileName]=n}await this._configurationService.updateValue(d,l,2)}await this._configurationService.updateValue(c,p.profileName,2)}else if(o==="createInstance")return"id"in p.profile?{config:{extensionIdentifier:p.profile.extensionIdentifier,id:p.profile.id,title:p.profile.title,options:{icon:p.profile.icon,color:p.profile.color}},keyMods:p.keyMods}:{config:p.profile,keyMods:p.keyMods};return"profileName"in p.profile?p.profile.profileName:p.profile.title}}async _createAndShow(o){const u=await this._terminalProfileService.getPlatformKey(),d=this._terminalProfileService.availableProfiles,p="terminal.integrated.profiles."+u,c=this._terminalProfileService.getDefaultProfileName();let l;const n={placeHolder:o==="createInstance"?f.localize(0,null):f.localize(1,null),onDidTriggerItemButton:async A=>{if(!await this._isProfileSafe(A.item.profile)||"command"in A.item.profile||"id"in A.item.profile)return;const k=this._configurationService.getValue("terminal.integrated.profiles."+u),L=k?Object.keys(k):[],R=await this._quickInputService.input({prompt:f.localize(2,null),value:A.item.profile.profileName,validateInput:async N=>{if(L.includes(N))return f.localize(3,null)}});if(!R)return;const M={...k};M[R]={path:A.item.profile.path,args:A.item.profile.args},await this._configurationService.updateValue(p,M,2)},onKeyMods:A=>l=A},g=[],w=d.filter(A=>!A.isAutoDetected),E=d.filter(A=>A.isAutoDetected);w.length>0&&(g.push({type:"separator",label:f.localize(4,null)}),g.push(...this._sortProfileQuickPickItems(w.map(A=>this._createProfileQuickPickItem(A)),c))),g.push({type:"separator",label:f.localize(5,null)});const C=[];for(const A of this._terminalProfileService.contributedProfiles){let k;typeof A.icon=="string"&&(A.icon.startsWith("$(")?k=m.ThemeIcon.fromString(A.icon):k=m.ThemeIcon.fromId(A.icon)),(!k||!(0,h.getIconRegistry)().getIcon(k.id))&&(k=this._terminalProfileResolverService.getDefaultIcon());const L=(0,D.getUriClasses)(A,this._themeService.getColorTheme().type,!0),R=(0,D.getColorClass)(A),M=[];L&&M.push(...L),R&&M.push(R),C.push({label:`$(${k.id}) ${A.title}`,profile:{extensionIdentifier:A.extensionIdentifier,title:A.title,icon:A.icon,id:A.id,color:A.color},profileName:A.title,iconClasses:M})}C.length>0&&g.push(...this._sortProfileQuickPickItems(C,c)),E.length>0&&(g.push({type:"separator",label:f.localize(6,null)}),g.push(...this._sortProfileQuickPickItems(E.map(A=>this._createProfileQuickPickItem(A)),c)));const I=(0,D.getColorStyleElement)(this._themeService.getColorTheme());document.body.appendChild(I);const _=await this._quickInputService.pick(g,n);if(document.body.removeChild(I),!!_&&await this._isProfileSafe(_.profile))return l&&(_.keyMods=l),_}async _isProfileSafe(o){const u="isUnsafePath"in o&&o.isUnsafePath,d="requiresUnsafePath"in o&&o.requiresUnsafePath;return!u&&!d?!0:await new Promise(p=>{const c=[];u&&c.push(o.path),d&&c.push(d),this._notificationService.prompt(r.Severity.Warning,f.localize(7,null,`"${c.join(",")}"`),[{label:f.localize(8,null),run:()=>p(!0)},{label:f.localize(9,null),run:()=>p(!1)}]).onDidClose(()=>p(!1))})}_createProfileQuickPickItem(o){const u=[{iconClass:m.ThemeIcon.asClassName(T.configureTerminalProfileIcon),tooltip:f.localize(10,null)}],p=`$(${(o.icon&&m.ThemeIcon.isThemeIcon(o.icon)?o.icon:t.Codicon.terminal).id}) ${o.profileName}`,c=o.isFromPath?(0,a.basename)(o.path):o.path,l=(0,D.getColorClass)(o),n=[];if(l&&n.push(l),o.args){if(typeof o.args=="string")return{label:p,description:`${o.path} ${o.args}`,profile:o,profileName:o.profileName,buttons:u,iconClasses:n};const g=o.args.map(w=>w.includes(" ")?`"${w.replace(/"/g,'\\"')}"`:w).join(" ");return{label:p,description:`${c} ${g}`,profile:o,profileName:o.profileName,buttons:u,iconClasses:n}}return{label:p,description:c,profile:o,profileName:o.profileName,buttons:u,iconClasses:n}}_sortProfileQuickPickItems(o,u){return o.sort((d,p)=>p.profileName===u?1:d.profileName===u?-1:d.profileName.localeCompare(p.profileName))}};e.TerminalProfileQuickpick=i,e.TerminalProfileQuickpick=i=fe([O(0,S.ITerminalProfileService),O(1,S.ITerminalProfileResolverService),O(2,y.IConfigurationService),O(3,b.IQuickInputService),O(4,v.IThemeService),O(5,r.INotificationService)],i)}),define(Q[3623],Y([1,0,20,4,14,19,468]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.selectLines=e.getLine=e.MarkNavigationAddon=e.ScrollPosition=void 0;var f;(function(a){a[a.Top=0]="Top",a[a.Bottom=1]="Bottom"})(f||(f={}));var v;(function(a){a[a.Top=0]="Top",a[a.Middle=1]="Middle"})(v||(e.ScrollPosition=v={}));let m=class extends y.Disposable{activate(r){this._terminal=r,this._register(this._terminal.onData(()=>{this._currentMarker=f.Bottom}))}constructor(r,i){super(),this._capabilities=r,this._themeService=i,this._currentMarker=f.Bottom,this._selectionStart=null,this._isDisposable=!1}_getMarkers(r){const i=this._capabilities.get(2),s=this._capabilities.get(3),o=this._capabilities.get(4);let u=[];if(i?u=(0,t.coalesce)(i.commands.map(d=>d.marker)):s&&u.push(...s.commands),o&&!r){let d=o.markers().next()?.value;const p=[];for(;d;)p.push(d),d=o.markers().next()?.value;u=p}return u}clearMarker(){this._currentMarker=f.Bottom,this._resetNavigationDecorations(),this._selectionStart=null}_resetNavigationDecorations(){this._navigationDecorations&&(0,y.dispose)(this._navigationDecorations),this._navigationDecorations=[]}_isEmptyCommand(r){return r===f.Bottom?!0:r===f.Top?!this._getMarkers(!0).map(i=>i.line).includes(0):!this._getMarkers(!0).includes(r)}scrollToPreviousMark(r=1,i=!1,s=!1){if(!this._terminal)return;i||(this._selectionStart=null);let o;const u=typeof this._currentMarker=="object"?this._getTargetScrollLine(this._terminal,this._currentMarker,r):Math.min(S(this._terminal,this._currentMarker),this._terminal.buffer.active.baseY),d=this._terminal.buffer.active.viewportY;if(typeof this._currentMarker=="object"?!this._isMarkerInViewport(this._terminal,this._currentMarker):u!==d){const p=this._getMarkers(s).filter(c=>c.line>=d).length;o=this._getMarkers(s).length-p-1}else this._currentMarker===f.Bottom?o=this._getMarkers(s).length-1:this._currentMarker===f.Top?o=-1:this._isDisposable?(o=this._findPreviousMarker(this._terminal,s),this._currentMarker.dispose(),this._isDisposable=!1):s&&this._isEmptyCommand(this._currentMarker)?o=this._findPreviousMarker(this._terminal,!0):o=this._getMarkers(s).indexOf(this._currentMarker)-1;if(o<0){this._currentMarker=f.Top,this._terminal.scrollToTop(),this._resetNavigationDecorations();return}this._currentMarker=this._getMarkers(s)[o],this._scrollToMarker(this._currentMarker,r)}scrollToNextMark(r=1,i=!1,s=!0){if(!this._terminal)return;i||(this._selectionStart=null);let o;const u=typeof this._currentMarker=="object"?this._getTargetScrollLine(this._terminal,this._currentMarker,r):Math.min(S(this._terminal,this._currentMarker),this._terminal.buffer.active.baseY),d=this._terminal.buffer.active.viewportY;if((typeof this._currentMarker=="object"?!this._isMarkerInViewport(this._terminal,this._currentMarker):u!==d)?o=this._getMarkers(s).filter(c=>c.line<=d).length:this._currentMarker===f.Bottom?o=this._getMarkers(s).length:this._currentMarker===f.Top?o=0:this._isDisposable?(o=this._findNextMarker(this._terminal,s),this._currentMarker.dispose(),this._isDisposable=!1):s&&this._isEmptyCommand(this._currentMarker)?o=this._findNextMarker(this._terminal,!0):o=this._getMarkers(s).indexOf(this._currentMarker)+1,o>=this._getMarkers(s).length){this._currentMarker=f.Bottom,this._terminal.scrollToBottom(),this._resetNavigationDecorations();return}this._currentMarker=this._getMarkers(s)[o],this._scrollToMarker(this._currentMarker,r)}_scrollToMarker(r,i,s,o){if(this._terminal){if(!this._isMarkerInViewport(this._terminal,r)){const u=this._getTargetScrollLine(this._terminal,r,i);this._terminal.scrollToLine(u)}o||this._registerTemporaryDecoration(r,s)}}_createMarkerForOffset(r,i){if(i===0)return r;{const s=this._terminal?.registerMarker(-this._terminal.buffer.active.cursorY+r.line-this._terminal.buffer.active.baseY+i);if(s)return s;throw new Error(`Could not register marker with offset ${r.line}, ${i}`)}}_registerTemporaryDecoration(r,i){if(!this._terminal)return;this._resetNavigationDecorations();const s=this._themeService.getColorTheme().getColor(T.TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR),o=r.line,u=i?i.line-o+1:1;for(let d=0;d<u;d++){const p=this._terminal.registerDecoration({marker:this._createMarkerForOffset(r,d),width:this._terminal.cols,overviewRulerOptions:{color:s?.toString()||"#a0a0a0cc"}});if(p){this._navigationDecorations?.push(p);let c;p.onRender(l=>{c||(c=l,u>1?l.classList.add("terminal-scroll-highlight"):l.classList.add("terminal-scroll-highlight","terminal-scroll-highlight-outline"),this._terminal?.element&&(l.style.marginLeft=`-${getComputedStyle(this._terminal.element).paddingLeft}`))}),p.onDispose(()=>{this._navigationDecorations=this._navigationDecorations?.filter(l=>l!==p)}),(0,b.timeout)(350).then(()=>{c&&c.classList.remove("terminal-scroll-highlight-outline")})}}}_getTargetScrollLine(r,i,s){return s===1?Math.max(i.line-Math.floor(r.rows/4),0):i.line}_isMarkerInViewport(r,i){const s=r.buffer.active.viewportY;return i.line>=s&&i.line<s+r.rows}scrollToClosestMarker(r,i,s){const o=this._capabilities.get(4);if(!o)return;const u=o.getMark(r);if(!u)return;const d=i?o.getMark(i):u;this._scrollToMarker(u,0,d,!s)}selectToPreviousMark(){this._terminal&&(this._selectionStart===null&&(this._selectionStart=this._currentMarker),this._capabilities.has(2)?this.scrollToPreviousMark(1,!0,!0):this.scrollToPreviousMark(1,!0,!1),h(this._terminal,this._currentMarker,this._selectionStart))}selectToNextMark(){this._terminal&&(this._selectionStart===null&&(this._selectionStart=this._currentMarker),this._capabilities.has(2)?this.scrollToNextMark(1,!0,!0):this.scrollToNextMark(1,!0,!1),h(this._terminal,this._currentMarker,this._selectionStart))}selectToPreviousLine(){this._terminal&&(this._selectionStart===null&&(this._selectionStart=this._currentMarker),this.scrollToPreviousLine(this._terminal,1,!0),h(this._terminal,this._currentMarker,this._selectionStart))}selectToNextLine(){this._terminal&&(this._selectionStart===null&&(this._selectionStart=this._currentMarker),this.scrollToNextLine(this._terminal,1,!0),h(this._terminal,this._currentMarker,this._selectionStart))}scrollToPreviousLine(r,i=1,s=!1){if(s||(this._selectionStart=null),this._currentMarker===f.Top){r.scrollToTop();return}if(this._currentMarker===f.Bottom)this._currentMarker=this._registerMarkerOrThrow(r,this._getOffset(r)-1);else{const o=this._getOffset(r);this._isDisposable&&this._currentMarker.dispose(),this._currentMarker=this._registerMarkerOrThrow(r,o-1)}this._isDisposable=!0,this._scrollToMarker(this._currentMarker,i)}scrollToNextLine(r,i=1,s=!1){if(s||(this._selectionStart=null),this._currentMarker===f.Bottom){r.scrollToBottom();return}if(this._currentMarker===f.Top)this._currentMarker=this._registerMarkerOrThrow(r,this._getOffset(r)+1);else{const o=this._getOffset(r);this._isDisposable&&this._currentMarker.dispose(),this._currentMarker=this._registerMarkerOrThrow(r,o+1)}this._isDisposable=!0,this._scrollToMarker(this._currentMarker,i)}_registerMarkerOrThrow(r,i){const s=r.registerMarker(i);if(!s)throw new Error(`Could not create marker for ${i}`);return s}_getOffset(r){if(this._currentMarker===f.Bottom)return 0;if(this._currentMarker===f.Top)return 0-(r.buffer.active.baseY+r.buffer.active.cursorY);{let i=S(r,this._currentMarker);return i-=r.buffer.active.baseY+r.buffer.active.cursorY,i}}_findPreviousMarker(r,i=!1){if(this._currentMarker===f.Top)return 0;if(this._currentMarker===f.Bottom)return this._getMarkers(i).length-1;let s;for(s=this._getMarkers(i).length-1;s>=0;s--)if(this._getMarkers(i)[s].line<this._currentMarker.line)return s;return-1}_findNextMarker(r,i=!1){if(this._currentMarker===f.Top)return 0;if(this._currentMarker===f.Bottom)return this._getMarkers(i).length-1;let s;for(s=0;s<this._getMarkers(i).length;s++)if(this._getMarkers(i)[s].line>this._currentMarker.line)return s;return this._getMarkers(i).length}};e.MarkNavigationAddon=m,e.MarkNavigationAddon=m=fe([O(1,D.IThemeService)],m);function S(a,r){return r===f.Bottom?a.buffer.active.baseY+a.rows-1:r===f.Top?0:r.line}e.getLine=S;function h(a,r,i){i===null&&(i=f.Bottom);let s=S(a,r),o=S(a,i);if(s>o){const u=s;s=o,o=u}o-=1,a.selectLines(s,o)}e.selectLines=h}),define(Q[3624],Y([1,0,56,2973,158,18,16,228,32,885]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerTerminalConfiguration=void 0;const S=` - `+["`${cwd}`: "+(0,y.localize)(0,null),"`${cwdFolder}`: "+(0,y.localize)(1,null),"`${workspaceFolder}`: "+(0,y.localize)(2,null),"`${local}`: "+(0,y.localize)(3,null),"`${process}`: "+(0,y.localize)(4,null),"`${separator}`: "+(0,y.localize)(5,null,"(` - `)"),"`${sequence}`: "+(0,y.localize)(6,null),"`${task}`: "+(0,y.localize)(7,null)].join(` - `);let h=(0,y.localize)(8,null);h+=S;let a=(0,y.localize)(9,null);a+=S;const r={id:"terminal",order:100,title:(0,y.localize)(10,null),type:"object",properties:{["terminal.integrated.sendKeybindingsToShell"]:{markdownDescription:(0,y.localize)(11,null,"`#terminal.integrated.commandsToSkipShell#`"),type:"boolean",default:!1},["terminal.integrated.tabs.defaultColor"]:{description:(0,y.localize)(12,null),...m.terminalColorSchema,scope:4},["terminal.integrated.tabs.defaultIcon"]:{description:(0,y.localize)(13,null),...m.terminalIconSchema,default:v.Codicon.terminal.id,scope:4},["terminal.integrated.tabs.enabled"]:{description:(0,y.localize)(14,null),type:"boolean",default:!0},["terminal.integrated.tabs.enableAnimation"]:{description:(0,y.localize)(15,null),type:"boolean",default:!0},["terminal.integrated.tabs.hideCondition"]:{description:(0,y.localize)(16,null),type:"string",enum:["never","singleTerminal","singleGroup"],enumDescriptions:[(0,y.localize)(17,null),(0,y.localize)(18,null),(0,y.localize)(19,null)],default:"singleTerminal"},["terminal.integrated.tabs.showActiveTerminal"]:{description:(0,y.localize)(20,null),type:"string",enum:["always","singleTerminal","singleTerminalOrNarrow","never"],enumDescriptions:[(0,y.localize)(21,null),(0,y.localize)(22,null),(0,y.localize)(23,null),(0,y.localize)(24,null)],default:"singleTerminalOrNarrow"},["terminal.integrated.tabs.showActions"]:{description:(0,y.localize)(25,null),type:"string",enum:["always","singleTerminal","singleTerminalOrNarrow","never"],enumDescriptions:[(0,y.localize)(26,null),(0,y.localize)(27,null),(0,y.localize)(28,null),(0,y.localize)(29,null)],default:"singleTerminalOrNarrow"},["terminal.integrated.tabs.location"]:{type:"string",enum:["left","right"],enumDescriptions:[(0,y.localize)(30,null),(0,y.localize)(31,null)],default:"right",description:(0,y.localize)(32,null)},["terminal.integrated.tabFocusMode"]:{markdownDescription:(0,y.localize)(33,null,"`#editor.tabFocusMode#`"),type:["boolean","null"],default:null},["terminal.integrated.defaultLocation"]:{type:"string",enum:["editor","view"],enumDescriptions:[(0,y.localize)(34,null),(0,y.localize)(35,null)],default:"view",description:(0,y.localize)(36,null)},["terminal.integrated.tabs.focusMode"]:{type:"string",enum:["singleClick","doubleClick"],enumDescriptions:[(0,y.localize)(37,null),(0,y.localize)(38,null)],default:"doubleClick",description:(0,y.localize)(39,null)},["terminal.integrated.macOptionIsMeta"]:{description:(0,y.localize)(40,null),type:"boolean",default:!1},["terminal.integrated.macOptionClickForcesSelection"]:{description:(0,y.localize)(41,null),type:"boolean",default:!1},["terminal.integrated.altClickMovesCursor"]:{markdownDescription:(0,y.localize)(42,null,"`#editor.multiCursorModifier#`","`'alt'`"),type:"boolean",default:!0},["terminal.integrated.copyOnSelection"]:{description:(0,y.localize)(43,null),type:"boolean",default:!1},["terminal.integrated.enableMultiLinePasteWarning"]:{markdownDescription:(0,y.localize)(44,null),type:"boolean",default:!0},["terminal.integrated.drawBoldTextInBrightColors"]:{description:(0,y.localize)(45,null),type:"boolean",default:!0},["terminal.integrated.fontFamily"]:{markdownDescription:(0,y.localize)(46,null,"`#editor.fontFamily#`"),type:"string"},["terminal.integrated.fontSize"]:{description:(0,y.localize)(47,null),type:"number",default:D.isMacintosh?12:14,minimum:6,maximum:100},["terminal.integrated.letterSpacing"]:{description:(0,y.localize)(48,null),type:"number",default:b.DEFAULT_LETTER_SPACING},["terminal.integrated.lineHeight"]:{description:(0,y.localize)(49,null),type:"number",default:b.DEFAULT_LINE_HEIGHT},["terminal.integrated.minimumContrastRatio"]:{markdownDescription:(0,y.localize)(50,null),type:"number",default:4.5,tags:["accessibility"]},["terminal.integrated.tabStopWidth"]:{markdownDescription:(0,y.localize)(51,null),type:"number",minimum:1,default:8},["terminal.integrated.fastScrollSensitivity"]:{markdownDescription:(0,y.localize)(52,null),type:"number",default:5},["terminal.integrated.mouseWheelScrollSensitivity"]:{markdownDescription:(0,y.localize)(53,null),type:"number",default:1},["terminal.integrated.bellDuration"]:{markdownDescription:(0,y.localize)(54,null),type:"number",default:1e3},["terminal.integrated.fontWeight"]:{anyOf:[{type:"number",minimum:b.MINIMUM_FONT_WEIGHT,maximum:b.MAXIMUM_FONT_WEIGHT,errorMessage:(0,y.localize)(55,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:b.SUGGESTIONS_FONT_WEIGHT}],description:(0,y.localize)(56,null),default:"normal"},["terminal.integrated.fontWeightBold"]:{anyOf:[{type:"number",minimum:b.MINIMUM_FONT_WEIGHT,maximum:b.MAXIMUM_FONT_WEIGHT,errorMessage:(0,y.localize)(57,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:b.SUGGESTIONS_FONT_WEIGHT}],description:(0,y.localize)(58,null),default:"bold"},["terminal.integrated.cursorBlinking"]:{description:(0,y.localize)(59,null),type:"boolean",default:!1},["terminal.integrated.cursorStyle"]:{description:(0,y.localize)(60,null),enum:["block","line","underline"],default:"block"},["terminal.integrated.cursorStyleInactive"]:{description:(0,y.localize)(61,null),enum:["outline","block","line","underline","none"],default:"outline"},["terminal.integrated.cursorWidth"]:{markdownDescription:(0,y.localize)(62,null,"`#terminal.integrated.cursorStyle#`","`line`"),type:"number",default:1},["terminal.integrated.scrollback"]:{description:(0,y.localize)(63,null),type:"number",default:1e3},["terminal.integrated.detectLocale"]:{markdownDescription:f.terminalIntegratedDetectLocaleDescrption,type:"string",enum:["auto","off","on"],markdownEnumDescriptions:[(0,y.localize)(64,null),(0,y.localize)(65,null),(0,y.localize)(66,null)],default:"auto"},["terminal.integrated.gpuAcceleration"]:{type:"string",enum:["auto","on","off","canvas"],markdownEnumDescriptions:[(0,y.localize)(67,null),(0,y.localize)(68,null),(0,y.localize)(69,null),(0,y.localize)(70,null)],default:"auto",description:(0,y.localize)(71,null)},["terminal.integrated.tabs.separator"]:{type:"string",default:" - ",markdownDescription:(0,y.localize)(72,null,"`terminal.integrated.tabs.title`","`terminal.integrated.tabs.description`")},["terminal.integrated.tabs.title"]:{type:"string",default:"${process}",markdownDescription:h},["terminal.integrated.tabs.description"]:{type:"string",default:"${task}${separator}${local}${separator}${cwdFolder}",markdownDescription:a},["terminal.integrated.rightClickBehavior"]:{type:"string",enum:["default","copyPaste","paste","selectWord","nothing"],enumDescriptions:[(0,y.localize)(73,null),(0,y.localize)(74,null),(0,y.localize)(75,null),(0,y.localize)(76,null),(0,y.localize)(77,null)],default:D.isMacintosh?"selectWord":D.isWindows?"copyPaste":"default",description:(0,y.localize)(78,null)},["terminal.integrated.cwd"]:{restricted:!0,description:(0,y.localize)(79,null),type:"string",default:void 0,scope:4},["terminal.integrated.confirmOnExit"]:{description:(0,y.localize)(80,null),type:"string",enum:["never","always","hasChildProcesses"],enumDescriptions:[(0,y.localize)(81,null),(0,y.localize)(82,null),(0,y.localize)(83,null)],default:"never"},["terminal.integrated.confirmOnKill"]:{description:(0,y.localize)(84,null),type:"string",enum:["never","editor","panel","always"],enumDescriptions:[(0,y.localize)(85,null),(0,y.localize)(86,null),(0,y.localize)(87,null),(0,y.localize)(88,null)],default:"editor"},["terminal.integrated.enableBell"]:{description:(0,y.localize)(89,null),type:"boolean",default:!1},["terminal.integrated.commandsToSkipShell"]:{markdownDescription:f.terminalIntegratedCommandsToSkipShellDescrption(b.DEFAULT_COMMANDS_TO_SKIP_SHELL),type:"array",items:{type:"string"},default:[]},["terminal.integrated.allowChords"]:{markdownDescription:f.terminalIntegratedAllowChordsDescription,type:"boolean",default:!0},["terminal.integrated.allowMnemonics"]:{markdownDescription:(0,y.localize)(90,null),type:"boolean",default:!1},["terminal.integrated.env.osx"]:{restricted:!0,markdownDescription:f.terminalIntegratedEnvOsxDescription,type:"object",additionalProperties:{type:["string","null"]},default:{}},["terminal.integrated.env.linux"]:{restricted:!0,markdownDescription:f.terminalIntegratedEnvLinuxDescription,type:"object",additionalProperties:{type:["string","null"]},default:{}},["terminal.integrated.env.windows"]:{restricted:!0,markdownDescription:f.terminalIntegratedEnvWindowsDescription,type:"object",additionalProperties:{type:["string","null"]},default:{}},["terminal.integrated.environmentChangesIndicator"]:{markdownDescription:(0,y.localize)(91,null),type:"string",enum:["off","on","warnonly"],enumDescriptions:[(0,y.localize)(92,null),(0,y.localize)(93,null),(0,y.localize)(94,null)],default:"warnonly"},["terminal.integrated.environmentChangesRelaunch"]:{markdownDescription:(0,y.localize)(95,null),type:"boolean",default:!0},["terminal.integrated.showExitAlert"]:{description:(0,y.localize)(96,null),type:"boolean",default:!0},["terminal.integrated.splitCwd"]:{description:(0,y.localize)(97,null),type:"string",enum:["workspaceRoot","initial","inherited"],enumDescriptions:[(0,y.localize)(98,null),(0,y.localize)(99,null),(0,y.localize)(100,null)],default:"inherited"},["terminal.integrated.windowsEnableConpty"]:{description:(0,y.localize)(101,null),type:"boolean",default:!0},["terminal.integrated.wordSeparators"]:{markdownDescription:(0,y.localize)(102,null),type:"string",default:" ()[]{}',\"`\u2500\u2018\u2019|"},["terminal.integrated.enableFileLinks"]:{description:(0,y.localize)(103,null),type:"string",enum:["off","on","notRemote"],enumDescriptions:[(0,y.localize)(104,null),(0,y.localize)(105,null),(0,y.localize)(106,null)],default:"on"},["terminal.integrated.unicodeVersion"]:{type:"string",enum:["6","11"],enumDescriptions:[(0,y.localize)(107,null),(0,y.localize)(108,null)],default:"11",description:(0,y.localize)(109,null)},["terminal.integrated.localEchoLatencyThreshold"]:{description:(0,y.localize)(110,null),type:"integer",minimum:-1,default:30},["terminal.integrated.localEchoEnabled"]:{markdownDescription:(0,y.localize)(111,null,"`#terminal.integrated.localEchoLatencyThreshold#`"),type:"string",enum:["on","off","auto"],enumDescriptions:[(0,y.localize)(112,null),(0,y.localize)(113,null),(0,y.localize)(114,null)],default:"auto"},["terminal.integrated.localEchoExcludePrograms"]:{description:(0,y.localize)(115,null),type:"array",items:{type:"string",uniqueItems:!0},default:b.DEFAULT_LOCAL_ECHO_EXCLUDE},["terminal.integrated.localEchoStyle"]:{description:(0,y.localize)(116,null),default:"dim",anyOf:[{enum:["bold","dim","italic","underlined","inverted","#ff0000"]},{type:"string",format:"color-hex"}]},["terminal.integrated.enablePersistentSessions"]:{description:(0,y.localize)(117,null),type:"boolean",default:!0},["terminal.integrated.persistentSessionReviveProcess"]:{markdownDescription:(0,y.localize)(118,null),type:"string",enum:["onExit","onExitAndWindowClose","never"],markdownEnumDescriptions:[(0,y.localize)(119,null),(0,y.localize)(120,null),(0,y.localize)(121,null)],default:"onExit"},["terminal.integrated.hideOnStartup"]:{description:(0,y.localize)(122,null),type:"string",enum:["never","whenEmpty","always"],markdownEnumDescriptions:[(0,y.localize)(123,null),(0,y.localize)(124,null),(0,y.localize)(125,null)],default:"never"},["terminal.integrated.customGlyphs"]:{description:(0,y.localize)(126,null,"`#terminal.integrated.gpuAcceleration#`"),type:"boolean",default:!0},["terminal.integrated.autoReplies"]:{markdownDescription:f.terminalIntegratedAutoRepliesDescription,type:"object",additionalProperties:{oneOf:[{type:"string",description:(0,y.localize)(127,null)},{type:"null"}]},default:{}},["terminal.integrated.shellIntegration.enabled"]:{restricted:!0,markdownDescription:(0,y.localize)(128,null,"`#terminal.integrated.shellIntegrations.decorationsEnabled#`","`#editor.accessibilitySupport#`"),type:"boolean",default:!0},["terminal.integrated.shellIntegration.decorationsEnabled"]:{restricted:!0,markdownDescription:(0,y.localize)(129,null),type:"string",enum:["both","gutter","overviewRuler","never"],enumDescriptions:[(0,y.localize)(130,null),(0,y.localize)(131,null),(0,y.localize)(132,null),(0,y.localize)(133,null)],default:"both"},["terminal.integrated.shellIntegration.history"]:{restricted:!0,markdownDescription:(0,y.localize)(134,null),type:"number",default:100},["terminal.integrated.shellIntegration.suggestEnabled"]:{restricted:!0,markdownDescription:(0,y.localize)(135,null,"`#terminal.integrated.shellIntegration.enabled#`","`true`","`VSCODE_SUGGEST`","`1`"),type:"boolean",default:!1},["terminal.integrated.smoothScrolling"]:{markdownDescription:(0,y.localize)(136,null),type:"boolean",default:!1},["terminal.integrated.ignoreBracketedPasteMode"]:{markdownDescription:(0,y.localize)(137,null,"`\\x1b[200~`","`\\x1b[201~`"),type:"boolean",default:!1},["terminal.integrated.enableImages"]:{restricted:!0,markdownDescription:(0,y.localize)(138,null,"`#terminal.integrated.gpuAcceleration#`"),type:"boolean",default:!1},["terminal.integrated.focusAfterRun"]:{markdownDescription:(0,y.localize)(139,null),enum:["terminal","accessible-buffer","none"],default:"none",tags:["accessibility"],markdownEnumDescriptions:[(0,y.localize)(140,null),(0,y.localize)(141,null),(0,y.localize)(142,null)]}}};function i(){T.Registry.as(t.Extensions.Configuration).registerConfiguration(r)}e.registerTerminalConfiguration=i}),define(Q[192],Y([1,0,2974,8]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalContextKeys=e.TerminalContextKeyStrings=void 0;var b;(function(T){T.IsOpen="terminalIsOpen",T.Count="terminalCount",T.GroupCount="terminalGroupCount",T.TabsNarrow="isTerminalTabsNarrow",T.HasFixedWidth="terminalHasFixedWidth",T.ProcessSupported="terminalProcessSupported",T.Focus="terminalFocus",T.FocusInAny="terminalFocusInAny",T.AccessibleBufferFocus="terminalAccessibleBufferFocus",T.AccessibleBufferOnLastLine="terminalAccessibleBufferOnLastLine",T.EditorFocus="terminalEditorFocus",T.TabsFocus="terminalTabsFocus",T.WebExtensionContributedProfile="terminalWebExtensionContributedProfile",T.TerminalHasBeenCreated="terminalHasBeenCreated",T.TerminalEditorActive="terminalEditorActive",T.TabsMouse="terminalTabsMouse",T.AltBufferActive="terminalAltBufferActive",T.SuggestWidgetVisible="terminalSuggestWidgetVisible",T.A11yTreeFocus="terminalA11yTreeFocus",T.ViewShowing="terminalViewShowing",T.TextSelected="terminalTextSelected",T.TextSelectedInFocused="terminalTextSelectedInFocused",T.FindVisible="terminalFindVisible",T.FindInputFocused="terminalFindInputFocused",T.FindFocused="terminalFindFocused",T.TabsSingularSelection="terminalTabsSingularSelection",T.SplitTerminal="terminalSplitTerminal",T.ShellType="terminalShellType",T.InTerminalRunCommandPicker="inTerminalRunCommandPicker",T.TerminalShellIntegrationEnabled="terminalShellIntegrationEnabled"})(b||(e.TerminalContextKeyStrings=b={}));var D;(function(T){T.isOpen=new y.RawContextKey("terminalIsOpen",!1,!0),T.focus=new y.RawContextKey("terminalFocus",!1,(0,t.localize)(0,null)),T.focusInAny=new y.RawContextKey("terminalFocusInAny",!1,(0,t.localize)(1,null)),T.accessibleBufferFocus=new y.RawContextKey("terminalAccessibleBufferFocus",!1,(0,t.localize)(2,null)),T.accessibleBufferOnLastLine=new y.RawContextKey("terminalAccessibleBufferOnLastLine",!1,(0,t.localize)(3,null)),T.editorFocus=new y.RawContextKey("terminalEditorFocus",!1,(0,t.localize)(4,null)),T.count=new y.RawContextKey("terminalCount",0,(0,t.localize)(5,null)),T.groupCount=new y.RawContextKey("terminalGroupCount",0,!0),T.tabsNarrow=new y.RawContextKey("isTerminalTabsNarrow",!1,!0),T.terminalHasFixedWidth=new y.RawContextKey("terminalHasFixedWidth",!1,!0),T.tabsFocus=new y.RawContextKey("terminalTabsFocus",!1,(0,t.localize)(6,null)),T.webExtensionContributedProfile=new y.RawContextKey("terminalWebExtensionContributedProfile",!1,!0),T.terminalHasBeenCreated=new y.RawContextKey("terminalHasBeenCreated",!1,!0),T.terminalEditorActive=new y.RawContextKey("terminalEditorActive",!1,!0),T.tabsMouse=new y.RawContextKey("terminalTabsMouse",!1,!0),T.shellType=new y.RawContextKey("terminalShellType",void 0,{type:"string",description:(0,t.localize)(7,null)}),T.altBufferActive=new y.RawContextKey("terminalAltBufferActive",!1,(0,t.localize)(8,null)),T.suggestWidgetVisible=new y.RawContextKey("terminalSuggestWidgetVisible",!1,(0,t.localize)(9,null)),T.notFocus=T.focus.toNegated(),T.viewShowing=new y.RawContextKey("terminalViewShowing",!1,(0,t.localize)(10,null)),T.textSelected=new y.RawContextKey("terminalTextSelected",!1,(0,t.localize)(11,null)),T.textSelectedInFocused=new y.RawContextKey("terminalTextSelectedInFocused",!1,(0,t.localize)(12,null)),T.notTextSelected=T.textSelected.toNegated(),T.findVisible=new y.RawContextKey("terminalFindVisible",!1,!0),T.notFindVisible=T.findVisible.toNegated(),T.findInputFocus=new y.RawContextKey("terminalFindInputFocused",!1,!0),T.findFocus=new y.RawContextKey("terminalFindFocused",!1,!0),T.notFindFocus=T.findInputFocus.toNegated(),T.processSupported=new y.RawContextKey("terminalProcessSupported",!1,(0,t.localize)(13,null)),T.tabsSingularSelection=new y.RawContextKey("terminalTabsSingularSelection",!1,(0,t.localize)(14,null)),T.splitTerminal=new y.RawContextKey("terminalSplitTerminal",!1,(0,t.localize)(15,null)),T.inTerminalRunCommandPicker=new y.RawContextKey("inTerminalRunCommandPicker",!1,(0,t.localize)(16,null)),T.terminalShellIntegrationEnabled=new y.RawContextKey("terminalShellIntegrationEnabled",!1,(0,t.localize)(17,null))})(D||(e.TerminalContextKeys=D={}))}),define(Q[935],Y([1,0,55,10,1102,18,884,17]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWorkspaceForTerminal=e.preparePathForShell=e.createTerminalEnvironment=e.createVariableResolver=e.getCwd=e.getLangEnvVariable=e.shouldSetLangEnvVariable=e.addTerminalEnvironmentKeys=e.mergeEnvironments=void 0;function v(l,n){if(n)if(D.isWindows)for(const g in n){let w=g;for(const C in l)if(g.toLowerCase()===C.toLowerCase()){w=C;break}const E=n[g];E!==void 0&&m(l,w,E)}else Object.keys(n).forEach(g=>{const w=n[g];w!==void 0&&m(l,g,w)})}e.mergeEnvironments=v;function m(l,n,g){typeof g=="string"?l[n]=g:delete l[n]}function S(l,n,g,w){l.TERM_PROGRAM="vscode",n&&(l.TERM_PROGRAM_VERSION=n),r(l,w)&&(l.LANG=i(g)),l.COLORTERM="truecolor"}e.addTerminalEnvironmentKeys=S;function h(l,n){if(n)for(const g of Object.keys(n)){const w=n[g];w!=null&&(l[g]=w)}}async function a(l,n){return await Promise.all(Object.entries(n).map(async([g,w])=>{if(typeof w=="string")try{n[g]=await l(w)}catch{n[g]=w}})),n}function r(l,n){if(n==="on")return!0;if(n==="auto"){const g=l.LANG;return!g||g.search(/\.UTF\-8$/)===-1&&g.search(/\.utf8$/)===-1&&g.search(/\.euc.+/)===-1}return!1}e.shouldSetLangEnvVariable=r;function i(l){const n=l?l.split("-"):[],g=n.length;if(g===0)return"en_US.UTF-8";if(g===1){const w={af:"ZA",am:"ET",be:"BY",bg:"BG",ca:"ES",cs:"CZ",da:"DK",de:"DE",el:"GR",en:"US",es:"ES",et:"EE",eu:"ES",fi:"FI",fr:"FR",he:"IL",hr:"HR",hu:"HU",hy:"AM",is:"IS",it:"IT",ja:"JP",kk:"KZ",ko:"KR",lt:"LT",nl:"NL",no:"NO",pl:"PL",pt:"BR",ro:"RO",ru:"RU",sk:"SK",sl:"SI",sr:"YU",sv:"SE",tr:"TR",uk:"UA",zh:"CN"};n[0]in w&&n.push(w[n[0]])}else n[1]=n[1].toUpperCase();return n.join("_")+".UTF-8"}e.getLangEnvVariable=i;async function s(l,n,g,w,E,C){if(l.cwd){const _=typeof l.cwd=="object"?l.cwd.fsPath:l.cwd,A=await o(_,g);return(0,T.sanitizeCwd)(A||_)}let I;return!l.ignoreConfigurationCwd&&E&&(g&&(E=await o(E,g,C)),E&&(t.isAbsolute(E)?I=E:w&&(I=t.join(w.fsPath,E)))),I||(I=w?w.fsPath:n||""),(0,T.sanitizeCwd)(I)}e.getCwd=s;async function o(l,n,g){if(n)try{return await n(l)}catch(w){g?.error("Could not resolve terminal cwd",w);return}return l}function u(l,n,g){if(g)return w=>g.resolveWithEnvironment(n,l,w)}e.createVariableResolver=u;async function d(l,n,g,w,E,C){const I={};if(l.strictEnv)h(I,l.env);else{h(I,C);const _={...n};g&&(_&&await a(g,_),l.env&&await a(g,l.env)),(0,b.sanitizeProcessEnvironment)(I,"VSCODE_IPC_HOOK_CLI"),v(I,_),v(I,l.env),S(I,w,D.language,E)}return I}e.createTerminalEnvironment=d;async function p(l,n,g,w,E,C,I=D.isWindows){let _;if((0,f.isString)(l)?_=l:(_=l.fsPath,I&&C!==1?_=_.replace(/\\/g,"/"):!I&&C===1&&(_=_.replace(/\//g,"\\"))),!n)return _;const A=_.includes(" "),k=_.includes("(")||_.includes(")"),L=t.basename(n,".exe"),R=L==="pwsh"||g==="pwsh"||L==="powershell"||g==="powershell";if(R&&(A||_.includes("'")))return`& '${_.replace(/'/g,"''")}'`;if(k&&R)return`& '${_}'`;if(C===1){if(w!==void 0)return w==="gitbash"?(0,T.escapeNonWindowsPath)(_.replace(/\\/g,"/")):w==="wsl"?E?.getWslPath(_,"win-to-unix")||_:A?`"${_}"`:_;const M=n.toLowerCase();return M.includes("wsl")||M.includes("bash.exe")&&!M.toLowerCase().includes("git")?E?.getWslPath(_,"win-to-unix")||_:A?`"${_}"`:_}return(0,T.escapeNonWindowsPath)(_)}e.preparePathForShell=p;function c(l,n,g){const w=typeof l=="string"?y.URI.parse(l):l;let E=w?n.getWorkspaceFolder(w)??void 0:void 0;if(!E){const C=g.getLastActiveWorkspaceRoot();E=C?n.getWorkspaceFolder(C)??void 0:void 0}return E}e.getWorkspaceForTerminal=c}),define(Q[422],Y([1,0,2975]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.terminalStrings=void 0,e.terminalStrings={terminal:(0,t.localize)(0,null),new:(0,t.localize)(1,null),doNotShowAgain:(0,t.localize)(2,null),currentSessionCategory:(0,t.localize)(3,null),previousSessionCategory:(0,t.localize)(4,null),actionCategory:{value:(0,t.localize)(5,null),original:"Terminal"},focus:{value:(0,t.localize)(6,null),original:"Focus Terminal"},focusAndHideAccessibleBuffer:{value:(0,t.localize)(7,null),original:"Focus Terminal and Hide Accessible Buffer"},kill:{value:(0,t.localize)(8,null),original:"Kill Terminal",short:(0,t.localize)(9,null)},moveToEditor:{value:(0,t.localize)(10,null),original:"Move Terminal into Editor Area"},moveToTerminalPanel:{value:(0,t.localize)(11,null),original:"Move Terminal into Panel"},changeIcon:{value:(0,t.localize)(12,null),original:"Change Icon..."},changeColor:{value:(0,t.localize)(13,null),original:"Change Color..."},split:{value:(0,t.localize)(14,null),original:"Split Terminal",short:(0,t.localize)(15,null)},unsplit:{value:(0,t.localize)(16,null),original:"Unsplit Terminal"},rename:{value:(0,t.localize)(17,null),original:"Rename..."},toggleSizeToContentWidth:{value:(0,t.localize)(18,null),original:"Toggle Size to Content Width"},focusHover:{value:(0,t.localize)(19,null),original:"Focus Hover"},sendSequence:{value:(0,t.localize)(20,null),original:"Send Custom Sequence To Terminal"},newWithCwd:{value:(0,t.localize)(21,null),original:"Create New Terminal Starting in a Custom Working Directory"},renameWithArgs:{value:(0,t.localize)(22,null),original:"Rename the Currently Active Terminal"}}}),define(Q[3625],Y([1,0,6,4,10,173]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalPty=void 0;class T extends y.Disposable{constructor(v,m,S){super(),this.id=v,this.shouldPersist=m,this._proxy=S,this._properties={cwd:"",initialCwd:"",fixedDimensions:{cols:void 0,rows:void 0},title:"",shellType:void 0,hasChildProcesses:!0,resolvedShellLaunchConfig:{},overrideDimensions:void 0,failedShellIntegrationActivation:!1,usedShellIntegrationInjection:void 0},this._lastDimensions={cols:-1,rows:-1},this._inReplay=!1,this._onProcessData=this._register(new t.Emitter),this.onProcessData=this._onProcessData.event,this._onProcessReplayComplete=this._register(new t.Emitter),this.onProcessReplayComplete=this._onProcessReplayComplete.event,this._onProcessReady=this._register(new t.Emitter),this.onProcessReady=this._onProcessReady.event,this._onDidChangeProperty=this._register(new t.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._onProcessExit=this._register(new t.Emitter),this.onProcessExit=this._onProcessExit.event,this._onRestoreCommands=this._register(new t.Emitter),this.onRestoreCommands=this._onRestoreCommands.event}start(){return this._proxy.start(this.id)}detach(v){return this._proxy.detachFromProcess(this.id,v)}shutdown(v){this._proxy.shutdown(this.id,v)}async processBinary(v){if(!this._inReplay)return this._proxy.processBinary(this.id,v)}input(v){this._inReplay||this._proxy.input(this.id,v)}resize(v,m){this._inReplay||this._lastDimensions.cols===v&&this._lastDimensions.rows===m||(this._lastDimensions.cols=v,this._lastDimensions.rows=m,this._proxy.resize(this.id,v,m))}async clearBuffer(){this._proxy.clearBuffer?.(this.id)}freePortKillProcess(v){if(!this._proxy.freePortKillProcess)throw new Error("freePortKillProcess does not exist on the local pty service");return this._proxy.freePortKillProcess(v)}async getInitialCwd(){return this._properties.initialCwd}async getCwd(){return this._properties.cwd||this._properties.initialCwd}async refreshProperty(v){return this._proxy.refreshProperty(this.id,v)}async updateProperty(v,m){return this._proxy.updateProperty(this.id,v,m)}acknowledgeDataEvent(v){this._inReplay||this._proxy.acknowledgeDataEvent(this.id,v)}setUnicodeVersion(v){return this._proxy.setUnicodeVersion(this.id,v)}handleData(v){this._onProcessData.fire(v)}handleExit(v){this._onProcessExit.fire(v)}handleReady(v){this._onProcessReady.fire(v)}handleDidChangeProperty({type:v,value:m}){switch(v){case"cwd":this._properties.cwd=m;break;case"initialCwd":this._properties.initialCwd=m;break;case"resolvedShellLaunchConfig":m.cwd&&typeof m.cwd!="string"&&(m.cwd=b.URI.revive(m.cwd))}this._onDidChangeProperty.fire({type:v,value:m})}async handleReplay(v){(0,D.mark)(`code/terminal/willHandleReplay/${this.id}`);try{this._inReplay=!0;for(const m of v.events){(m.cols!==0||m.rows!==0)&&this._onDidChangeProperty.fire({type:"overrideDimensions",value:{cols:m.cols,rows:m.rows,forceExactSize:!0}});const S={data:m.data,trackCommit:!0};this._onProcessData.fire(S),await S.writePromise}}finally{this._inReplay=!1}v.commands&&this._onRestoreCommands.fire(v.commands),this._onDidChangeProperty.fire({type:"overrideDimensions",value:void 0}),(0,D.mark)(`code/terminal/didHandleReplay/${this.id}`),this._onProcessReplayComplete.fire()}handleOrphanQuestion(){this._proxy.orphanQuestionReply(this.id)}}e.LocalPty=T}),define(Q[3626],Y([1,0,9,126]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BufferContentTracker=void 0;let b=class{get lines(){return this._lines}constructor(T,f,v){this._xterm=T,this._logService=f,this._configurationService=v,this._priorEditorViewportLineCount=0,this._lines=[],this.bufferToEditorLineMapping=new Map}reset(){this._lines=[],this._lastCachedMarker=void 0,this.update()}update(){this._lastCachedMarker?.isDisposed&&(this._lines=[],this._lastCachedMarker=void 0),this._removeViewportContent(),this._updateCachedContent(),this._updateViewportContent(),this._lastCachedMarker=this._xterm.raw.registerMarker(),this._logService.debug("Buffer content tracker: set ",this._lines.length," lines")}_updateCachedContent(){const T=this._xterm.raw.buffer.active,f=this._lastCachedMarker?.line?this._lastCachedMarker.line-this._xterm.raw.rows+1:0,v=T.baseY;if(f<0||f>v)return;const S=this._configurationService.getValue("terminal.integrated.scrollback")+this._xterm.raw.rows-1,h=v-f;if(h+this._lines.length>S){const i=h+this._lines.length-S;for(let s=0;s<i;s++)this._lines.shift();this._logService.debug("Buffer content tracker: removed ",i," lines from top of cached lines, now ",this._lines.length," lines")}const a=[];let r="";for(let i=f;i<v;i++){const s=T.getLine(i);if(!s)continue;this.bufferToEditorLineMapping.set(i,this._lines.length+a.length);const o=T.getLine(i+1)?.isWrapped;r+=s.translateToString(!o),(r&&!o||i===T.baseY+this._xterm.raw.rows-1)&&s.length&&(a.push(r),r="")}this._logService.debug("Buffer content tracker:",a.length," lines cached"),this._lines.push(...a)}_removeViewportContent(){if(!this._lines.length)return;let T=this._priorEditorViewportLineCount,f=1;for(;T;)this.bufferToEditorLineMapping.forEach((v,m)=>{v===this._lines.length-f&&this.bufferToEditorLineMapping.delete(m)}),this._lines.pop(),f++,T--;this._logService.debug("Buffer content tracker: removed lines from viewport, now ",this._lines.length," lines cached")}_updateViewportContent(){const T=this._xterm.raw.buffer.active;this._priorEditorViewportLineCount=0;let f="";for(let v=T.baseY;v<T.baseY+this._xterm.raw.rows;v++){const m=T.getLine(v);if(!m)continue;this.bufferToEditorLineMapping.set(v,this._lines.length);const S=T.getLine(v+1)?.isWrapped;f+=m.translateToString(!S),(f&&!S||v===T.baseY+this._xterm.raw.rows-1)&&f.length&&(this._priorEditorViewportLineCount++,this._lines.push(f),f="")}this._logService.debug("Viewport content update complete, ",this._lines.length," lines in the viewport")}};e.BufferContentTracker=b,e.BufferContentTracker=b=fe([O(1,y.ITerminalLogService),O(2,t.IConfigurationService)],b)}),define(Q[3627],Y([1,0,4,33,2978,66,28,8,5,38,192]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalAccessibleContentProvider=e.ClassName=void 0;var h;(function(r){r.Active="active",r.EditorTextArea="textarea"})(h||(e.ClassName=h={}));let a=class extends t.Disposable{onClose(){this._contextKeyService.getContextKeyValue(S.TerminalContextKeys.accessibleBufferFocus.key)===!0?this._commandService.executeCommand("workbench.action.terminal.focusAccessibleBuffer"):this._instance.focus(),this.dispose()}constructor(i,s,o,u,d,p,c){super(),this._instance=i,this._keybindingService=u,this._contextKeyService=d,this._commandService=p,this._accessibilityService=c,this._hasShellIntegration=!1,this.options={type:"help",readMoreUrl:"https://code.visualstudio.com/docs/editor/accessibility#_terminal-accessibility"},this.verbositySettingKey="accessibility.verbosity.terminal",this._hasShellIntegration=s.shellIntegration.status===2}_descriptionForCommand(i,s,o){if(i==="workbench.action.terminal.runRecentCommand"){const d=this._keybindingService.lookupKeybindings(i);if(this._accessibilityService.isScreenReaderOptimized()&&d[1])(0,y.format)(s,d[1].getAriaLabel());else if(d[0])(0,y.format)(s,d[0].getAriaLabel());else return(0,y.format)(o,i)}const u=this._keybindingService.lookupKeybinding(i,this._contextKeyService)?.getAriaLabel();return u?(0,y.format)(s,u):(0,y.format)(o,i)}provideContent(){const i=[];if(i.push(this._descriptionForCommand("workbench.action.terminal.focusAccessibleBuffer",(0,b.localize)(0,null),(0,b.localize)(1,null))),this._instance.shellType==="cmd"&&i.push((0,b.localize)(2,null)),this._hasShellIntegration){const s=[];s.push((0,b.localize)(3,null)),s.push("- "+this._descriptionForCommand("workbench.action.terminal.accessibleBufferGoToNextCommand",(0,b.localize)(4,null),(0,b.localize)(5,null))),s.push("- "+this._descriptionForCommand("workbench.action.terminal.accessibleBufferGoToPreviousCommand",(0,b.localize)(6,null),(0,b.localize)(7,null))),s.push("- "+this._descriptionForCommand("workbench.action.terminal.navigateAccessibleBuffer",(0,b.localize)(8,null),(0,b.localize)(9,null))),s.push("- "+this._descriptionForCommand("workbench.action.terminal.runRecentCommand",(0,b.localize)(10,null),(0,b.localize)(11,null))),s.push("- "+this._descriptionForCommand("workbench.action.terminal.goToRecentDirectory",(0,b.localize)(12,null),(0,b.localize)(13,null))),i.push(s.join(` `))}else i.push(this._descriptionForCommand("workbench.action.terminal.runRecentCommand",(0,b.localize)(14,null),(0,b.localize)(15,null)));return i.push(this._descriptionForCommand("workbench.action.terminal.openDetectedLink",(0,b.localize)(16,null),(0,b.localize)(17,null))),i.push(this._descriptionForCommand("workbench.action.terminal.newWithProfile",(0,b.localize)(18,null),(0,b.localize)(19,null))),i.push((0,b.localize)(20,null,"terminal.integrated.focusAfterRun")),i.push((0,b.localize)(21,null)),i.join(` `)}};e.TerminalAccessibleContentProvider=a,e.TerminalAccessibleContentProvider=a=fe([O(2,v.IInstantiationService),O(3,m.IKeybindingService),O(4,f.IContextKeyService),O(5,T.ICommandService),O(6,D.IAccessibilityService)],a)}),define(Q[3628],Y([1,0,4,66,126,102,7]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaSyncAddon=void 0;let f=class extends t.Disposable{activate(m){this._terminal=m,this._accessibilityService.isScreenReaderOptimized()&&this._registerSyncListeners()}constructor(m,S,h){super(),this._capabilities=m,this._accessibilityService=S,this._logService=h,this._listeners=this._register(new t.MutableDisposable),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>{this._accessibilityService.isScreenReaderOptimized()?(this._syncTextArea(),this._registerSyncListeners()):this._listeners.clear()}))}_registerSyncListeners(){this._accessibilityService.isScreenReaderOptimized()&&this._terminal?.textarea&&(this._listeners.value=new t.DisposableStore,this._listeners.value.add(this._terminal.onCursorMove(()=>this._syncTextArea())),this._listeners.value.add(this._terminal.onData(()=>this._syncTextArea())),this._listeners.value.add((0,T.addDisposableListener)(this._terminal.textarea,"focus",()=>this._syncTextArea())))}_syncTextArea(){this._logService.debug("TextAreaSyncAddon#syncTextArea");const m=this._terminal?.textarea;if(!m){this._logService.debug("TextAreaSyncAddon#syncTextArea: no textarea");return}this._updateCommandAndCursor(),this._currentCommand!==m.value?(m.value=this._currentCommand||"",this._logService.debug(`TextAreaSyncAddon#syncTextArea: text changed to "${this._currentCommand}"`)):this._currentCommand||(m.value="",this._logService.debug("TextAreaSyncAddon#syncTextArea: text cleared")),this._cursorX!==m.selectionStart&&(m.selectionStart=this._cursorX??0,m.selectionEnd=this._cursorX??0,this._logService.debug(`TextAreaSyncAddon#syncTextArea: selection start/end changed to ${this._cursorX}`))}_updateCommandAndCursor(){if(!this._terminal)return;const S=this._capabilities.get(2)?.currentCommand;if(!S){this._logService.debug("TextAreaSyncAddon#updateCommandAndCursor: no current command");return}const h=this._terminal.buffer.active,a=S.commandStartMarker?.line;if(!a)return;const r=h.getLine(a)?.translateToString(!0);if(!r){this._logService.debug("TextAreaSyncAddon#updateCommandAndCursor: no line");return}S.commandStartX!==void 0?(this._currentCommand=r.substring(S.commandStartX),this._cursorX=h.cursorX-S.commandStartX):(this._currentCommand=void 0,this._cursorX=void 0,this._logService.debug("TextAreaSyncAddon#updateCommandAndCursor: no commandStartX"))}};e.TextAreaSyncAddon=f,fe([(0,D.debounce)(50)],f.prototype,"_syncTextArea",null),e.TextAreaSyncAddon=f=fe([O(1,y.IAccessibilityService),O(2,b.ITerminalLogService)],f)}),define(Q[3629],Y([1,0,1266,29,8,192,19,9,38,6]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalFindWidget=void 0;const S=419;let h=class extends t.SimpleFindWidget{constructor(r,i,s,o,u,d){super({showCommonFindToggles:!0,checkImeCompletionState:!0,showResultCount:!0,initialWidth:S,enableSash:!0,appendCaseSensitiveActionId:"workbench.action.terminal.toggleFindCaseSensitive",appendRegexActionId:"workbench.action.terminal.toggleFindRegex",appendWholeWordsActionId:"workbench.action.terminal.toggleFindWholeWord",previousMatchActionId:"workbench.action.terminal.findPrevious",nextMatchActionId:"workbench.action.terminal.findNext",closeWidgetActionId:"workbench.action.terminal.hideFind",type:"Terminal",matchesLimit:1e3},i,o,s),this._instance=r,this._contextKeyService=o,this._themeService=u,this._configurationService=d,this._register(this.state.onFindReplaceStateChange(()=>{this.show()})),this._findInputFocused=D.TerminalContextKeys.findInputFocus.bindTo(this._contextKeyService),this._findWidgetFocused=D.TerminalContextKeys.findFocus.bindTo(this._contextKeyService),this._findWidgetVisible=D.TerminalContextKeys.findVisible.bindTo(this._contextKeyService),this._register(this._themeService.onDidColorThemeChange(()=>{this.isVisible()&&this.find(!0,!0)})),this._register(this._configurationService.onDidChangeConfiguration(p=>{p.affectsConfiguration("workbench.colorCustomizations")&&this.isVisible()&&this.find(!0,!0)})),this.updateResultCount()}find(r,i){const s=this._instance.xterm;s&&(r?this._findPreviousWithEvent(s,this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue(),incremental:i}):this._findNextWithEvent(s,this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue()}))}reveal(){const i=(this._instance.hasSelection()&&!this._instance.selection.includes(` `)?this._instance.selection:void 0)??this.inputValue,s=this._instance.xterm;s&&i&&i!==""&&this._findPreviousWithEvent(s,i,{incremental:!0,regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue()}).then(o=>{this.updateButtons(o),this._register(m.Event.once(s.onDidChangeSelection)(()=>s.clearActiveSearchDecoration()))}),this.updateButtons(!1),super.reveal(i),this._findWidgetVisible.set(!0)}show(){const r=this._instance.hasSelection()&&!this._instance.selection.includes(` `)?this._instance.selection:void 0;super.show(r),this._findWidgetVisible.set(!0)}hide(){super.hide(),this._findWidgetVisible.reset(),this._instance.focus(!0),this._instance.xterm?.clearSearchDecorations()}async _getResultCount(){return this._instance.xterm?.findResult}_onInputChanged(){const r=this._instance.xterm;return r&&this._findPreviousWithEvent(r,this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue(),incremental:!0}).then(i=>{this.updateButtons(i)}),!1}_onFocusTrackerFocus(){this._findWidgetFocused.set(!0)}_onFocusTrackerBlur(){this._instance.xterm?.clearActiveSearchDecoration(),this._findWidgetFocused.reset()}_onFindInputFocusTrackerFocus(){this._findInputFocused.set(!0)}_onFindInputFocusTrackerBlur(){this._findInputFocused.reset()}findFirst(){const r=this._instance;r.hasSelection()&&r.clearSelection();const i=r.xterm;i&&this._findPreviousWithEvent(i,this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue()})}async _findNextWithEvent(r,i,s){return r.findNext(i,s).then(o=>(this._register(m.Event.once(r.onDidChangeSelection)(()=>r.clearActiveSearchDecoration())),o))}async _findPreviousWithEvent(r,i,s){return r.findPrevious(i,s).then(o=>(this._register(m.Event.once(r.onDidChangeSelection)(()=>r.clearActiveSearchDecoration())),o))}};e.TerminalFindWidget=h,e.TerminalFindWidget=h=fe([O(1,y.IContextViewService),O(2,v.IKeybindingService),O(3,b.IContextKeyService),O(4,T.IThemeService),O(5,f.IConfigurationService)],h)}),define(Q[1314],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalBuiltinLinkType=e.ITerminalLinkProviderService=void 0,e.ITerminalLinkProviderService=(0,t.createDecorator)("terminalLinkProviderService");var y;(function(b){b.LocalFile="LocalFile",b.LocalFolderOutsideWorkspace="LocalFolderOutsideWorkspace",b.LocalFolderInWorkspace="LocalFolderInWorkspace",b.Search="Search",b.Url="Url"})(y||(e.TerminalBuiltinLinkType=y={}))}),define(Q[423],Y([1,0,55]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.osPathModule=e.updateLinkWithRelativeCwd=e.getXtermRangesByAttr=e.getXtermLineContent=e.convertBufferRangeToViewport=e.convertLinkRangeToBuffer=void 0;function y(m,S,h,a){const r={start:{x:h.startColumn,y:h.startLineNumber+a},end:{x:h.endColumn-1,y:h.endLineNumber+a}};let i=0;const s=Math.ceil(h.startColumn/S);for(let d=0;d<Math.min(s);d++){const p=Math.min(S,h.startColumn-1-d*S);let c=0;const l=m[d];if(!l)break;for(let n=0;n<Math.min(S,p+c);n++){const g=l.getCell(n);if(!g)break;g.getWidth()===2&&c++;const E=g.getChars();E.length>1&&(c-=E.length-1)}i+=c}let o=0;const u=Math.ceil(h.endColumn/S);for(let d=Math.max(0,s-1);d<u;d++){const p=d===s-1?(h.startColumn-1+i)%S:0,c=Math.min(S,h.endColumn+i-d*S);let l=0;const n=m[d];if(!n)break;for(let g=p;g<Math.min(S,c+l);g++){const w=n.getCell(g);if(!w)break;const E=w.getWidth(),C=w.getChars();E===2&&l++,g===S-1&&C===""&&l++,C.length>1&&(l-=C.length-1)}o+=l}for(r.start.x+=i,r.end.x+=i+o;r.start.x>S;)r.start.x-=S,r.start.y++;for(;r.end.x>S;)r.end.x-=S,r.end.y++;return r}e.convertLinkRangeToBuffer=y;function b(m,S){return{start:{x:m.start.x-1,y:m.start.y-S-1},end:{x:m.end.x-1,y:m.end.y-S-1}}}e.convertBufferRangeToViewport=b;function D(m,S,h,a){const r=Math.max(2048,a*2);h=Math.min(h,S+r);let i="";for(let s=S;s<=h;s++){const o=m.getLine(s);o&&(i+=o.translateToString(!0,0,a))}return i}e.getXtermLineContent=D;function T(m,S,h,a){let r,i=-1,s=-1;const o=[];for(let u=S;u<=h;u++){const d=m.getLine(u);if(d)for(let p=0;p<a;p++){const c=d.getCell(p);if(!c)break;const l=c.isBold()|c.isInverse()|c.isStrikethrough()|c.isUnderline(),n=c.isDim()|c.isItalic();if(i===-1||s===-1)r={x:p,y:u};else if(i!==l||s!==n){const g={x:p,y:u};o.push({start:r,end:g}),r={x:p,y:u}}i=l,s=n}}return o}e.getXtermRangesByAttr=T;function f(m,S,h,a,r){const i=m.get(2)?.getCwdForLine(S);if(r.trace("terminalLinkHelpers#updateLinkWithRelativeCwd cwd",i),!i)return;const s=[],o=a.sep;if(!h.includes(o))s.push(a.resolve(i+o+h));else{let u=0,d=0;const p=i.split(o).reverse(),c=h.split(o);for(;d<p.length&&(s.push(a.resolve(i+o+c.slice(u).join(o))),p[d]===c[d]);){u++;d++}}return s}e.updateLinkWithRelativeCwd=f;function v(m){return m===1?t.win32:t.posix}e.osPathModule=v}),define(Q[3630],Y([1,0,423]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalExternalLinkDetector=void 0;class y{constructor(D,T,f){this.id=D,this.xterm=T,this._provideLinks=f,this.maxLinkLength=2e3}async detect(D,T,f){const v=(0,t.getXtermLineContent)(this.xterm.buffer.active,T,f,this.xterm.cols);if(v===""||v.length>this.maxLinkLength)return[];const m=await this._provideLinks(v);return m?m.map(h=>{const a=(0,t.convertLinkRangeToBuffer)(D,this.xterm.cols,{startColumn:h.startIndex+1,startLineNumber:1,endColumn:h.startIndex+h.length+1,endLineNumber:1},T);return{text:v.substring(h.startIndex,h.startIndex+h.length)||"",label:h.label,bufferRange:a,type:{id:this.id},activate:h.activate}}):[]}}e.TerminalExternalLinkDetector=y}),define(Q[3631],Y([1,0,4,7,14,423,18,6,9]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLink=void 0;let m=class extends t.DisposableStore{get onInvalidated(){return this._onInvalidated.event}get type(){return this._type}constructor(h,a,r,i,s,o,u,d,p,c,l){super(),this._xterm=h,this.range=a,this.text=r,this.actions=i,this._viewportY=s,this._activateCallback=o,this._tooltipCallback=u,this._isHighConfidenceLink=d,this.label=p,this._type=c,this._configurationService=l,this._onInvalidated=new f.Emitter,this.decorations={pointerCursor:!1,underline:this._isHighConfidenceLink}}dispose(){super.dispose(),this._hoverListeners?.dispose(),this._hoverListeners=void 0,this._tooltipScheduler?.dispose(),this._tooltipScheduler=void 0}activate(h,a){this.asyncActivate=this._activateCallback(h,a)}hover(h,a){this._hoverListeners=new t.DisposableStore,this._hoverListeners.add(y.addDisposableListener(document,"keydown",i=>{!i.repeat&&this._isModifierDown(i)&&this._enableDecorations()})),this._hoverListeners.add(y.addDisposableListener(document,"keyup",i=>{!i.repeat&&!this._isModifierDown(i)&&this._disableDecorations()})),this._hoverListeners.add(this._xterm.onRender(i=>{const s=this.range.start.y-this._viewportY;s>=i.start&&s<=i.end&&this._onInvalidated.fire()})),this._isHighConfidenceLink&&(this._tooltipScheduler=new b.RunOnceScheduler(()=>{this._tooltipCallback(this,(0,D.convertBufferRangeToViewport)(this.range,this._viewportY),this._isHighConfidenceLink?()=>this._enableDecorations():void 0,this._isHighConfidenceLink?()=>this._disableDecorations():void 0),this._tooltipScheduler?.dispose(),this._tooltipScheduler=void 0},this._configurationService.getValue("workbench.hover.delay")),this.add(this._tooltipScheduler),this._tooltipScheduler.schedule());const r={x:h.pageX,y:h.pageY};this._hoverListeners.add(y.addDisposableListener(document,y.EventType.MOUSE_MOVE,i=>{this._isModifierDown(i)?this._enableDecorations():this._disableDecorations(),(Math.abs(i.pageX-r.x)>window.devicePixelRatio*2||Math.abs(i.pageY-r.y)>window.devicePixelRatio*2)&&(r.x=i.pageX,r.y=i.pageY,this._tooltipScheduler?.schedule())}))}leave(){this._hoverListeners?.dispose(),this._hoverListeners=void 0,this._tooltipScheduler?.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(h){return this._configurationService.getValue("editor.multiCursorModifier")==="ctrlCmd"?!!h.altKey:T.isMacintosh?h.metaKey:h.ctrlKey}};e.TerminalLink=m,e.TerminalLink=m=fe([O(10,v.IConfigurationService)],m)}),define(Q[3632],Y([1,0,6,4,2985,5,3631]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLinkDetectorAdapter=void 0;let f=class extends y.Disposable{constructor(m,S){super(),this._detector=m,this._instantiationService=S,this._onDidActivateLink=this._register(new t.Emitter),this.onDidActivateLink=this._onDidActivateLink.event,this._onDidShowHover=this._register(new t.Emitter),this.onDidShowHover=this._onDidShowHover.event,this._activeProvideLinkRequests=new Map}async provideLinks(m,S){let h=this._activeProvideLinkRequests.get(m);if(h){await h,S(this._activeLinks);return}if(this._activeLinks)for(const a of this._activeLinks)a.dispose();h=this._provideLinks(m),this._activeProvideLinkRequests.set(m,h),this._activeLinks=await h,this._activeProvideLinkRequests.delete(m),S(this._activeLinks)}async _provideLinks(m){const S=[];let h=m-1,a=h;const r=[this._detector.xterm.buffer.active.getLine(h)],i=Math.max(this._detector.maxLinkLength/this._detector.xterm.cols),s=Math.max(h-i,0),o=Math.min(a+i,this._detector.xterm.buffer.active.length);for(;h>=s&&this._detector.xterm.buffer.active.getLine(h)?.isWrapped;)r.unshift(this._detector.xterm.buffer.active.getLine(h-1)),h--;for(;a<o&&this._detector.xterm.buffer.active.getLine(a+1)?.isWrapped;)r.push(this._detector.xterm.buffer.active.getLine(a+1)),a++;const u=await this._detector.detect(r,h,a);for(const d of u)S.push(this._createTerminalLink(d,async p=>{this._onDidActivateLink.fire({link:d,event:p})}));return S}_createTerminalLink(m,S){return!m.disableTrimColon&&m.text.length>0&&m.text.charAt(m.text.length-1)===":"&&(m.text=m.text.slice(0,-1),m.bufferRange.end.x--),this._instantiationService.createInstance(T.TerminalLink,this._detector.xterm,m.bufferRange,m.text,m.actions,this._detector.xterm.buffer.active.viewportY,S,(h,a,r,i)=>this._onDidShowHover.fire({link:h,viewportRange:a,modifierDownCallback:r,modifierUpCallback:i}),m.type!=="Search",m.label||this._getLabel(m.type),m.type)}_getLabel(m){switch(m){case"Search":return(0,b.localize)(0,null);case"LocalFile":return(0,b.localize)(1,null);case"LocalFolderInWorkspace":return(0,b.localize)(2,null);case"LocalFolderOutsideWorkspace":return(0,b.localize)(3,null);case"Url":default:return(0,b.localize)(4,null)}}};e.TerminalLinkDetectorAdapter=f,e.TerminalLinkDetectorAdapter=f=fe([O(1,D.IInstantiationService)],f)}),define(Q[936],Y([1,0,203]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.winDrivePrefix=e.detectLinks=e.toLinkSuffix=e.getLinkSuffix=e.detectLinkSuffixes=e.removeLinkQueryString=e.removeLinkSuffix=void 0;const y=new t.Lazy(()=>D(!0)),b=new t.Lazy(()=>D(!1));function D(l){let n=0,g=0,w=0,E=0;function C(){return`(?<row${n++}>\\d+)`}function I(){return`(?<col${g++}>\\d+)`}function _(){return`(?<rowEnd${w++}>\\d+)`}function A(){return`(?<colEnd${E++}>\\d+)`}const k=l?"$":"",R=[`(?::| |['"],)${C()}([:.]${I()}(?:-(?:${_()}.)?${A()})?)?`+k,`['"]?(?:,? |: ?| on )lines? ${C()}(?:-${_()})?(?:,? (?:col(?:umn)?|characters?) ${I()}(?:-${A()})?)?`+k,`:? ?[\\[\\(]${C()}(?:, ?${I()})?[\\]\\)]`+k].join("|").replace(/ /g,"[\xA0 ]");return new RegExp(`(${R})`,l?void 0:"g")}function T(l){const n=m(l)?.suffix;return n?l.substring(0,n.index):l}e.removeLinkSuffix=T;function f(l){const n=l.startsWith("\\\\?\\")?4:0,g=l.indexOf("?",n);return g===-1?l:l.substring(0,g)}e.removeLinkQueryString=f;function v(l){let n;const g=[];for(b.value.lastIndex=0;(n=b.value.exec(l))!==null;){const w=S(n);if(w===null)break;g.push(w)}return g}e.detectLinkSuffixes=v;function m(l){return S(y.value.exec(l))}e.getLinkSuffix=m;function S(l){const n=l?.groups;return!n||l.length<1?null:{row:h(n.row0||n.row1||n.row2),col:h(n.col0||n.col1||n.col2),rowEnd:h(n.rowEnd0||n.rowEnd1||n.rowEnd2),colEnd:h(n.colEnd0||n.colEnd1||n.colEnd2),suffix:{index:l.index,text:l[0]}}}e.toLinkSuffix=S;function h(l){if(l!==void 0)return parseInt(l)}const a=/(?<path>[^\s\|<>\[\({][^\s\|<>]*)$/;function r(l,n){const g=o(l),w=c(l,n);return i(g,w),g}e.detectLinks=r;function i(l,n){l.length===0&&l.push(...n);for(const g of n)s(l,g,0,l.length)}function s(l,n,g,w){if(l.length===0){l.push(n);return}if(g>w)return;const E=Math.floor((g+w)/2);if(E>=l.length||n.path.index<l[E].path.index&&(E===0||n.path.index>l[E-1].path.index)){(E>=l.length||n.path.index+n.path.text.length<l[E].path.index&&(E===0||n.path.index>l[E-1].path.index+l[E-1].path.text.length))&&l.splice(E,0,n);return}n.path.index>l[E].path.index?s(l,n,E+1,w):s(l,n,g,E-1)}function o(l){const n=[],g=v(l);for(const w of g){const C=l.substring(0,w.suffix.index).match(a);if(C&&C.index!==void 0&&C.groups?.path){let I=C.index,_=C.groups.path,A;const k=_.match(/^(?<prefix>['"]+)/);if(k?.groups?.prefix&&(A={index:I,text:k.groups.prefix},_=_.substring(A.text.length),k.groups.prefix.length>1&&w.suffix.text[0].match(/['"]/)&&k.groups.prefix[k.groups.prefix.length-1]===w.suffix.text[0])){const L=k.groups.prefix.length-1;A.index+=L,A.text=k.groups.prefix[k.groups.prefix.length-1],I+=L}n.push({path:{index:I+(A?.text.length||0),text:_},prefix:A,suffix:w})}}return n}var u;(function(l){l.PathPrefix="(?:\\.\\.?|\\~)",l.PathSeparatorClause="\\/",l.ExcludedPathCharactersClause="[^\\0<>\\?\\s!`&*()'\":;\\\\]",l.ExcludedStartPathCharactersClause="[^\\0<>\\s!`&*()\\[\\]'\":;\\\\]",l.WinOtherPathPrefix="\\.\\.?|\\~",l.WinPathSeparatorClause="(?:\\\\|\\/)",l.WinExcludedPathCharactersClause="[^\\0<>\\?\\|\\/\\s!`&*()'\":;]",l.WinExcludedStartPathCharactersClause="[^\\0<>\\?\\|\\/\\s!`&*()\\[\\]'\":;]"})(u||(u={}));const d="(?:(?:"+u.PathPrefix+"|(?:"+u.ExcludedStartPathCharactersClause+u.ExcludedPathCharactersClause+"*))?(?:"+u.PathSeparatorClause+"(?:"+u.ExcludedPathCharactersClause+")+)+)";e.winDrivePrefix="(?:\\\\\\\\\\?\\\\)?[a-zA-Z]:";const p=`(?:(?:(?:${e.winDrivePrefix}|${u.WinOtherPathPrefix})|(?:`+u.WinExcludedStartPathCharactersClause+u.WinExcludedPathCharactersClause+"*))?(?:"+u.WinPathSeparatorClause+"(?:"+u.WinExcludedPathCharactersClause+")+)+)";function c(l,n){const g=[],w=new RegExp(n===1?p:d,"g");let E;for(;(E=w.exec(l))!==null;){let C=E[0],I=E.index;if(!C)break;((l.startsWith("--- a/")||l.startsWith("+++ b/"))&&I===4||l.startsWith("diff --git")&&(C.startsWith("a/")||C.startsWith("b/")))&&(C=C.substring(2),I+=2),g.push({path:{index:I,text:C},prefix:void 0,suffix:void 0})}return g}}),define(Q[3633],Y([1,0,6]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLinkProviderService=void 0;class y{constructor(){this._linkProviders=new Set,this._onDidAddLinkProvider=new t.Emitter,this._onDidRemoveLinkProvider=new t.Emitter}get linkProviders(){return this._linkProviders}get onDidAddLinkProvider(){return this._onDidAddLinkProvider.event}get onDidRemoveLinkProvider(){return this._onDidRemoveLinkProvider.event}registerLinkProvider(D){const T=[];return this._linkProviders.add(D),this._onDidAddLinkProvider.fire(D),{dispose:()=>{for(const f of T)f.dispose();this._linkProviders.delete(D),this._onDidRemoveLinkProvider.fire(D)}}}}e.TerminalLinkProviderService=y}),define(Q[3634],Y([1,0,7,6,2987,43,119,4]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLinkQuickpick=void 0;let v=class extends f.DisposableStore{constructor(S){super(),this._quickInputService=S,this._onDidRequestMoreLinks=this.add(new y.Emitter),this.onDidRequestMoreLinks=this._onDidRequestMoreLinks.event}async show(S){const h=S.viewport.wordLinks?await this._generatePicks(S.viewport.wordLinks):void 0,a=S.viewport.fileLinks?await this._generatePicks(S.viewport.fileLinks):void 0,r=S.viewport.folderLinks?await this._generatePicks(S.viewport.folderLinks):void 0,i=S.viewport.webLinks?await this._generatePicks(S.viewport.webLinks):void 0,s=[];i&&(s.push({type:"separator",label:(0,b.localize)(0,null)}),s.push(...i)),a&&(s.push({type:"separator",label:(0,b.localize)(1,null)}),s.push(...a)),r&&(s.push({type:"separator",label:(0,b.localize)(2,null)}),s.push(...r)),h&&(s.push({type:"separator",label:(0,b.localize)(3,null)}),s.push(...h));const o=this._quickInputService.createQuickPick();o.items=s,o.placeholder=(0,b.localize)(4,null),o.sortByLabel=!1,o.show();let u=!1;const d=new f.DisposableStore;return d.add(y.Event.once(o.onDidChangeValue)(async()=>{const p=await S.all;if(u)return;const c=[...p.fileLinks??[],...p.folderLinks??[],...p.webLinks??[]],l=p.wordLinks?await this._generatePicks(p.wordLinks,c):void 0,n=p.fileLinks?await this._generatePicks(p.fileLinks):void 0,g=p.folderLinks?await this._generatePicks(p.folderLinks):void 0,w=p.webLinks?await this._generatePicks(p.webLinks):void 0,E=[];w&&(E.push({type:"separator",label:(0,b.localize)(5,null)}),E.push(...w)),n&&(E.push({type:"separator",label:(0,b.localize)(6,null)}),E.push(...n)),g&&(E.push({type:"separator",label:(0,b.localize)(7,null)}),E.push(...g)),l&&(E.push({type:"separator",label:(0,b.localize)(8,null)}),E.push(...l)),o.items=E})),new Promise(p=>{d.add(o.onDidHide(()=>{d.dispose(),p()})),d.add(y.Event.once(o.onDidAccept)(()=>{u=!0;const c=new T.TerminalLinkQuickPickEvent(t.EventType.CLICK),l=o.activeItems?.[0];l&&"link"in l&&l.link.activate(c,l.label),d.dispose(),p()}))})}async _generatePicks(S,h){if(!S)return;const a=new Set,r=[];for(const i of S){const s=i.text;!a.has(s)&&(!h||!h.some(o=>o.text===s))&&(a.add(s),r.push({label:s,link:i}))}return r.length>0?r:void 0}};e.TerminalLinkQuickpick=v,e.TerminalLinkQuickpick=v=fe([O(0,D.IQuickInputService)],v)}),define(Q[3635],Y([1,0,936,10,22,18,25,55]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLinkResolver=void 0;let v=class{constructor(a){this._fileService=a,this._resolvedLinkCaches=new Map}async resolveLink(a,r,i){let s=this._resolvedLinkCaches.get(a.remoteAuthority??"");s||(s=new S,this._resolvedLinkCaches.set(a.remoteAuthority??"",s));const o=s.get(i||r);if(o!==void 0)return o;if(i)try{const d=await this._fileService.stat(i),p={uri:i,link:r,isDirectory:d.isDirectory};return s.set(i,p),p}catch{return s.set(i,null),null}let u=(0,t.removeLinkSuffix)(r);if(u=(0,t.removeLinkQueryString)(u),u.length===0)return s.set(r,null),null;if(D.isWindows&&r.match(/^\/mnt\/[a-z]/i)&&a.backend)u=await a.backend.getWslPath(u,"unix-to-win");else if(!(D.isWindows&&r.match(/^(?:\/\/|\\\\)wsl(?:\$|\.localhost)(\/|\\)/))){const d=this._preprocessPath(u,a.initialCwd,a.os,a.userHome);if(!d)return s.set(r,null),null;u=d}try{let d;a.remoteAuthority?d=y.URI.from({scheme:b.Schemas.vscodeRemote,authority:a.remoteAuthority,path:u}):d=y.URI.file(u);try{const p=await this._fileService.stat(d),c={uri:d,link:r,isDirectory:p.isDirectory};return s.set(r,c),c}catch{return s.set(r,null),null}}catch{return s.set(r,null),null}}_preprocessPath(a,r,i,s){const o=this._getOsPath(i);if(a.charAt(0)==="~"){if(!s)return null;a=o.join(s,a.substring(1))}else if(a.charAt(0)!=="/"&&a.charAt(0)!=="~")if(i===1)if(!a.match("^"+t.winDrivePrefix)&&!a.startsWith("\\\\?\\")){if(!r)return null;a=o.join(r,a)}else a=a.replace(/^\\\\\?\\/,"");else{if(!r)return null;a=o.join(r,a)}return a=o.normalize(a),a}_getOsPath(a){return(a??D.OS)===1?f.win32:f.posix}};e.TerminalLinkResolver=v,e.TerminalLinkResolver=v=fe([O(0,T.IFileService)],v);var m;(function(h){h[h.TTL=1e4]="TTL"})(m||(m={}));class S{constructor(){this._cache=new Map,this._cacheTilTimeout=0}set(a,r){this._cacheTilTimeout&&window.clearTimeout(this._cacheTilTimeout),this._cacheTilTimeout=window.setTimeout(()=>this._cache.clear(),1e4),this._cache.set(this._getKey(a),r)}get(a){return this._cache.get(this._getKey(a))}_getKey(a){return y.URI.isUri(a)?a.toString():a}}}),define(Q[3636],Y([1,0,18,64,39,423,936,126]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLocalLinkDetector=void 0;var v;(function(h){h[h.MaxLineLength=2e3]="MaxLineLength",h[h.MaxResolvedLinksInLine=10]="MaxResolvedLinksInLine",h[h.MaxResolvedLinkLength=1024]="MaxResolvedLinkLength"})(v||(v={}));const m=[/^ *File (?<link>"(?<path>.+)"(, line (?<line>\d+))?)/,/^(?<link>(?<path>.+)\((?<line>\d+)(?:, ?(?<col>\d+))?\)) ?:/,/^(?<link>(?<path>.+):(?<line>\d+)(?::(?<col>\d+))?) ?:/,/^(?<link>(?<path>.+))>/,/^ *(?<link>(?<path>.+))/];let S=class{static{this.id="local"}constructor(a,r,i,s,o,u,d){this.xterm=a,this._capabilities=r,this._processManager=i,this._linkResolver=s,this._logService=o,this._uriIdentityService=u,this._workspaceContextService=d,this.maxLinkLength=500}async detect(a,r,i){const s=[],o=(0,D.getXtermLineContent)(this.xterm.buffer.active,r,i,this.xterm.cols);if(o===""||o.length>2e3)return[];let u=-1,d=0;const p=this._processManager.os||t.OS,c=(0,T.detectLinks)(o,p);this._logService.trace("terminalLocalLinkDetector#detect text",o),this._logService.trace("terminalLocalLinkDetector#detect parsedLinks",c);for(const l of c){if(l.path.text.length>1024)continue;const n=(0,D.convertLinkRangeToBuffer)(a,this.xterm.cols,{startColumn:(l.prefix?.index??l.path.index)+1,startLineNumber:1,endColumn:l.path.index+l.path.text.length+(l.suffix?.suffix.text.length??0)+1,endLineNumber:1},r),g=[],w=(0,D.osPathModule)(p);if(w.isAbsolute(l.path.text)||l.path.text.startsWith("~"))g.push(l.path.text);else{if(this._capabilities.has(2)){const A=(0,D.updateLinkWithRelativeCwd)(this._capabilities,n.start.y,l.path.text,w,this._logService);A&&g.push(...A)}g.length===0&&(g.push(l.path.text),l.path.text.match(/^(\.\.[\/\\])+/)&&g.push(l.path.text.replace(/^(\.\.[\/\\])+/,"")))}const E=/[\[\]"'\.]$/,C=new Map,I=[];for(const A of g){let k=A,L=k.replace(E,""),R=0;for(;L!==k;)l.suffix||R++,I.push(L),C.set(L,R),k=L,L=L.replace(E,"")}g.push(...I),this._logService.trace("terminalLocalLinkDetector#detect linkCandidates",g);const _=await this._validateAndGetLink(void 0,n,g,C);if(_&&(_.parsedLink=l,_.text=o.substring(l.prefix?.index??l.path.index,l.suffix?l.suffix.suffix.index+l.suffix.suffix.text.length:l.path.index+l.path.text.length),this._logService.trace("terminalLocalLinkDetector#detect verified link",_),s.push(_)),++d>=10)break}if(s.length===0)for(const l of m){const g=o.match(l)?.groups;if(!g)continue;const w=g?.link,E=g?.path,C=g?.line,I=g?.col;if(!w||!E||w.length>1024)continue;u=o.indexOf(w);const _=(0,D.convertLinkRangeToBuffer)(a,this.xterm.cols,{startColumn:u+1,startLineNumber:1,endColumn:u+w.length+1,endLineNumber:1},r),A=C?`:${C}${I?`:${I}`:""}`:"",k=await this._validateAndGetLink(`${E}${A}`,_,[E]);k&&s.push(k);break}if(s.length===0){const l=(0,D.getXtermRangesByAttr)(this.xterm.buffer.active,r,i,this.xterm.cols);for(const n of l){let g="";for(let E=n.start.y;E<=n.end.y;E++){const C=this.xterm.buffer.active.getLine(E);if(!C)break;const I=E===n.start.y?n.start.x:0,_=E===n.end.y?n.end.x:this.xterm.cols-1;g+=C.translateToString(!1,I,_)}n.start.x++,n.start.y++,n.end.y++;const w=await this._validateAndGetLink(g,n,[g]);if(w&&s.push(w),++d>=10)break}}return s}_isDirectoryInsideWorkspace(a){const r=this._workspaceContextService.getWorkspace().folders;for(let i=0;i<r.length;i++)if(this._uriIdentityService.extUri.isEqualOrParent(a,r[i].uri))return!0;return!1}async _validateLinkCandidates(a){for(const r of a){const i=await this._linkResolver.resolveLink(this._processManager,r);if(i)return i}}async _validateAndGetLink(a,r,i,s){const o=await this._validateLinkCandidates(i);if(o){let u;o.isDirectory?this._isDirectoryInsideWorkspace(o.uri)?u="LocalFolderInWorkspace":u="LocalFolderOutsideWorkspace":u="LocalFile";const d=s?.get(o.link);return d&&(r.end.x-=d,r.end.x<0&&(r.end.y--,r.end.x+=this.xterm.cols)),{text:a??o.link,uri:o.uri,bufferRange:r,type:u}}}};e.TerminalLocalLinkDetector=S,e.TerminalLocalLinkDetector=S=fe([O(4,f.ITerminalLogService),O(5,y.IUriIdentityService),O(6,b.IWorkspaceContextService)],S)}),define(Q[3637],Y([1,0,64,39,423,126]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalMultiLineLinkDetector=void 0;var T;(function(S){S[S.MaxLineLength=2e3]="MaxLineLength",S[S.MaxResolvedLinkLength=1024]="MaxResolvedLinkLength"})(T||(T={}));const f=[/ *(?<link>(?<line>\d+):(?<col>\d+)?)/],v=[/^(?<link>@@ .+ \+(?<toFileLine>\d+),(?<toFileCount>\d+) @@)/];let m=class{static{this.id="multiline"}constructor(h,a,r,i,s,o){this.xterm=h,this._processManager=a,this._linkResolver=r,this._logService=i,this._uriIdentityService=s,this._workspaceContextService=o,this.maxLinkLength=500}async detect(h,a,r){const i=[],s=(0,b.getXtermLineContent)(this.xterm.buffer.active,a,r,this.xterm.cols);if(s===""||s.length>2e3)return[];this._logService.trace("terminalMultiLineLinkDetector#detect text",s);for(const o of f){const d=s.match(o)?.groups;if(!d)continue;const p=d?.link,c=d?.line,l=d?.col;if(!p||c===void 0||p.length>1024)continue;this._logService.trace("terminalMultiLineLinkDetector#detect candidate",p);let n;for(let w=a-1;w>=0;w--){if(this.xterm.buffer.active.getLine(w).isWrapped)continue;const E=(0,b.getXtermLineContent)(this.xterm.buffer.active,w,w,this.xterm.cols);if(!E.match(/^\s*\d/)){n=E;break}}if(!n)continue;const g=await this._linkResolver.resolveLink(this._processManager,n);if(g){let w;g.isDirectory?this._isDirectoryInsideWorkspace(g.uri)?w="LocalFolderInWorkspace":w="LocalFolderOutsideWorkspace":w="LocalFile";const E=(0,b.convertLinkRangeToBuffer)(h,this.xterm.cols,{startColumn:1,startLineNumber:1,endColumn:1+s.length,endLineNumber:1},a),C={text:p,uri:g.uri,selection:{startLineNumber:parseInt(c),startColumn:l?parseInt(l):1},disableTrimColon:!0,bufferRange:E,type:w};this._logService.trace("terminalMultiLineLinkDetector#detect verified link",C),i.push(C);break}}if(i.length===0)for(const o of v){const d=s.match(o)?.groups;if(!d)continue;const p=d?.link,c=d?.toFileLine,l=d?.toFileCount;if(!p||c===void 0||p.length>1024)continue;this._logService.trace("terminalMultiLineLinkDetector#detect candidate",p);let n;for(let w=a-1;w>=0;w--){if(this.xterm.buffer.active.getLine(w).isWrapped)continue;const C=(0,b.getXtermLineContent)(this.xterm.buffer.active,w,w,this.xterm.cols).match(/\+\+\+ b\/(?<path>.+)/);if(C){n=C.groups?.path;break}}if(!n)continue;const g=await this._linkResolver.resolveLink(this._processManager,n);if(g){let w;g.isDirectory?this._isDirectoryInsideWorkspace(g.uri)?w="LocalFolderInWorkspace":w="LocalFolderOutsideWorkspace":w="LocalFile";const E=(0,b.convertLinkRangeToBuffer)(h,this.xterm.cols,{startColumn:1,startLineNumber:1,endColumn:1+p.length,endLineNumber:1},a),C={text:p,uri:g.uri,selection:{startLineNumber:parseInt(c),startColumn:1,endLineNumber:parseInt(c)+parseInt(l)},bufferRange:E,type:w};this._logService.trace("terminalMultiLineLinkDetector#detect verified link",C),i.push(C);break}}return i}_isDirectoryInsideWorkspace(h){const a=this._workspaceContextService.getWorkspace().folders;for(let r=0;r<a.length;r++)if(this._uriIdentityService.extUri.isEqualOrParent(h,a[r].uri))return!0;return!1}};e.TerminalMultiLineLinkDetector=m,e.TerminalMultiLineLinkDetector=m=fe([O(3,D.ITerminalLogService),O(4,t.IUriIdentityService),O(5,y.IWorkspaceContextService)],m)}),define(Q[3638],Y([1,0,22,10,1074,64,39,423]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalUriLinkDetector=void 0;var v;(function(h){h[h.MaxResolvedLinksInLine=10]="MaxResolvedLinksInLine"})(v||(v={}));let m=class{static{this.id="uri"}constructor(a,r,i,s,o){this.xterm=a,this._processManager=r,this._linkResolver=i,this._uriIdentityService=s,this._workspaceContextService=o,this.maxLinkLength=2048}async detect(a,r,i){const s=[],o=new S(this.xterm,r,i),u=b.LinkComputer.computeLinks(o);let d=0;for(const p of u){const c=(0,f.convertLinkRangeToBuffer)(a,this.xterm.cols,p.range,r),l=p.url?typeof p.url=="string"?y.URI.parse(this._excludeLineAndColSuffix(p.url)):p.url:void 0;if(!l)continue;const n=p.url?.toString()||"";if(n.length>this.maxLinkLength)continue;if(l.scheme!==t.Schemas.file){s.push({text:n,uri:l,bufferRange:c,type:"Url"});continue}if(l.authority.length!==2&&l.authority.endsWith(":"))continue;const g=[l];l.authority.length>0&&g.push(y.URI.from({...l,authority:void 0}));for(const w of g){const E=await this._linkResolver.resolveLink(this._processManager,n,w);if(E){let C;E.isDirectory?this._isDirectoryInsideWorkspace(w)?C="LocalFolderInWorkspace":C="LocalFolderOutsideWorkspace":C="LocalFile",s.push({text:typeof p.url=="string"?p.url:E.link,uri:w,bufferRange:c,type:C}),d++;break}}if(++d>=10)break}return s}_isDirectoryInsideWorkspace(a){const r=this._workspaceContextService.getWorkspace().folders;for(let i=0;i<r.length;i++)if(this._uriIdentityService.extUri.isEqualOrParent(a,r[i].uri))return!0;return!1}_excludeLineAndColSuffix(a){return a.replace(/:\d+(:\d+)?$/,"")}};e.TerminalUriLinkDetector=m,e.TerminalUriLinkDetector=m=fe([O(3,D.IUriIdentityService),O(4,T.IWorkspaceContextService)],m);class S{constructor(a,r,i){this._xterm=a,this._lineStart=r,this._lineEnd=i}getLineCount(){return 1}getLineContent(){return(0,f.getXtermLineContent)(this._xterm.buffer.active,this._lineStart,this._lineEnd,this._xterm.cols)}}}),define(Q[3639],Y([1,0,4,33,10,9,41,52,423,158]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalWordLinkDetector=void 0;var S;(function(a){a[a.MaxLineLength=2e3]="MaxLineLength"})(S||(S={}));let h=class extends t.Disposable{static{this.id="word"}constructor(r,i,s){super(),this.xterm=r,this._configurationService=i,this._productService=s,this.maxLinkLength=100,this._refreshSeparatorCodes(),this._register(this._configurationService.onDidChangeConfiguration(o=>{o.affectsConfiguration("terminal.integrated.wordSeparators")&&this._refreshSeparatorCodes()}))}detect(r,i,s){const o=[],u=(0,v.getXtermLineContent)(this.xterm.buffer.active,i,s,this.xterm.cols);if(u===""||u.length>2e3)return[];const d=this._parseWords(u);for(const p of d){if(p.text==="")continue;p.text.length>0&&p.text.charAt(p.text.length-1)===":"&&(p.text=p.text.slice(0,-1),p.endIndex--);const c=(0,v.convertLinkRangeToBuffer)(r,this.xterm.cols,{startColumn:p.startIndex+1,startLineNumber:1,endColumn:p.endIndex+1,endLineNumber:1},i);if((0,T.matchesScheme)(p.text,this._productService.urlProtocol)){const l=b.URI.parse(p.text);l&&o.push({text:p.text,uri:l,bufferRange:c,type:"Url"});continue}o.push({text:p.text,bufferRange:c,type:"Search"})}return o}_parseWords(r){const i=[],s=r.split(this._separatorRegex);let o=0;for(let u=0;u<s.length;u++)i.push({text:s[u],startIndex:o,endIndex:o+s[u].length}),o+=s[u].length+1;return i}_refreshSeparatorCodes(){const r=this._configurationService.getValue(m.TERMINAL_CONFIG_SECTION).wordSeparators;let i="";for(let s=57520;s<=57535;s++)i+=String.fromCharCode(s);this._separatorRegex=new RegExp(`[${(0,y.escapeRegExpCharacters)(r)}${i}]`,"g")}};e.TerminalWordLinkDetector=h,e.TerminalWordLinkDetector=h=fe([O(1,D.IConfigurationService),O(2,f.IProductService)],h)}),define(Q[737],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalQuickFixType=e.ITerminalQuickFixService=void 0,e.ITerminalQuickFixService=(0,t.createDecorator)("terminalQuickFixService");var y;(function(b){b[b.TerminalCommand=0]="TerminalCommand",b[b.Opener=1]="Opener",b[b.Port=2]="Port",b[b.VscodeCommand=3]="VscodeCommand"})(y||(e.TerminalQuickFixType=y={}))}),define(Q[3640],Y([1,0,10,2990,737]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pwshUnixCommandNotFoundError=e.pwshGeneralError=e.gitCreatePr=e.gitPushSetUpstream=e.freePort=e.gitTwoDashes=e.gitSimilar=e.QuickFixSource=e.PwshUnixCommandNotFoundErrorOutputRegex=e.PwshGeneralErrorOutputRegex=e.GitCreatePrOutputRegex=e.GitPushOutputRegex=e.FreePortOutputRegex=e.GitSimilarOutputRegex=e.GitTwoDashesRegex=e.GitPushCommandLineRegex=e.GitCommandLineRegex=void 0,e.GitCommandLineRegex=/git/,e.GitPushCommandLineRegex=/git\s+push/,e.GitTwoDashesRegex=/error: did you mean `--(.+)` \(with two dashes\)\?/,e.GitSimilarOutputRegex=/(?:(most similar commands? (is|are)))/,e.FreePortOutputRegex=/(?:address already in use (?:0\.0\.0\.0|127\.0\.0\.1|localhost|::):|Unable to bind [^ ]*:|can't listen on port |listen EADDRINUSE [^ ]*:)(?<portNumber>\d{4,5})/,e.GitPushOutputRegex=/git push --set-upstream origin (?<branchName>[^\s]+)/,e.GitCreatePrOutputRegex=/remote:\s*(?<link>https:\/\/github\.com\/.+\/.+\/pull\/new\/.+)/,e.PwshGeneralErrorOutputRegex=/Suggestion \[General\]:/,e.PwshUnixCommandNotFoundErrorOutputRegex=/Suggestion \[cmd-not-found\]:/;var D;(function(r){r.Builtin="builtin"})(D||(e.QuickFixSource=D={}));function T(){return{id:"Git Similar",type:"internal",commandLineMatcher:e.GitCommandLineRegex,outputMatcher:{lineMatcher:e.GitSimilarOutputRegex,anchor:"bottom",offset:0,length:10},commandExitResult:"error",getQuickFixes:r=>{const i=r.outputMatch?.regexMatch[0];if(!i||!r.outputMatch)return;const s=[],o=r.outputMatch.outputLines.findIndex(d=>d.includes(i))+1,u=r.outputMatch.outputLines.map(d=>d.trim());for(let d=o;d<u.length;d++){const p=u[d];p&&s.push({id:"Git Similar",type:b.TerminalQuickFixType.TerminalCommand,terminalCommand:r.commandLine.replace(/git\s+[^\s]+/,()=>`git ${p}`),addNewLine:!0,source:"builtin"})}return s}}}e.gitSimilar=T;function f(){return{id:"Git Two Dashes",type:"internal",commandLineMatcher:e.GitCommandLineRegex,outputMatcher:{lineMatcher:e.GitTwoDashesRegex,anchor:"bottom",offset:0,length:2},commandExitResult:"error",getQuickFixes:r=>{const i=r?.outputMatch?.regexMatch?.[1];if(i)return{type:b.TerminalQuickFixType.TerminalCommand,id:"Git Two Dashes",terminalCommand:r.commandLine.replace(` -${i}`,()=>` --${i}`),addNewLine:!0,source:"builtin"}}}}e.gitTwoDashes=f;function v(r){return{id:"Free Port",type:"internal",commandLineMatcher:/.+/,outputMatcher:{lineMatcher:e.FreePortOutputRegex,anchor:"bottom",offset:0,length:30},commandExitResult:"error",getQuickFixes:i=>{const s=i?.outputMatch?.regexMatch?.groups?.portNumber;if(!s)return;const o=(0,y.localize)(0,null,s);return{type:b.TerminalQuickFixType.Port,class:void 0,tooltip:o,id:"Free Port",label:o,enabled:!0,source:"builtin",run:()=>r(s,i.commandLine)}}}}e.freePort=v;function m(){return{id:"Git Push Set Upstream",type:"internal",commandLineMatcher:e.GitPushCommandLineRegex,outputMatcher:{lineMatcher:e.GitPushOutputRegex,anchor:"bottom",offset:0,length:8},commandExitResult:"error",getQuickFixes:r=>{const i=r.outputMatch,s="git push --set-upstream origin ${group:branchName}";if(!i)return;const o=i.regexMatch.groups;if(!o)return;const u=[];let d=s;for(const[p,c]of Object.entries(o)){const l=`\${group:${p}}`;if(!s.includes(l))return[];d=d.replaceAll(l,()=>c)}if(d)return u.push({type:b.TerminalQuickFixType.TerminalCommand,id:"Git Push Set Upstream",terminalCommand:d,addNewLine:!0,source:"builtin"}),u}}}e.gitPushSetUpstream=m;function S(){return{id:"Git Create Pr",type:"internal",commandLineMatcher:e.GitPushCommandLineRegex,outputMatcher:{lineMatcher:e.GitCreatePrOutputRegex,anchor:"bottom",offset:4,length:12},commandExitResult:"success",getQuickFixes:r=>{const i=r?.outputMatch?.regexMatch?.groups?.link;return i?{id:"Git Create Pr",label:(0,y.localize)(1,null,i),enabled:!0,type:b.TerminalQuickFixType.Opener,uri:t.URI.parse(i),source:"builtin"}:void 0}}}e.gitCreatePr=S;function h(){return{id:"Pwsh General Error",type:"internal",commandLineMatcher:/.+/,outputMatcher:{lineMatcher:e.PwshGeneralErrorOutputRegex,anchor:"bottom",offset:0,length:10},commandExitResult:"error",getQuickFixes:r=>{const i=r.outputMatch?.regexMatch.input?.split(` `);if(!i)return;let s=0,o=!1;for(;s<i.length;s++)if(i[s].match(e.PwshGeneralErrorOutputRegex)){o=!0;break}if(!o)return;const u=i[s+1].match(/The most similar commands are: (?<values>.+)./)?.groups?.values?.split(", ");if(!u)return;const d=[];for(const p of u)d.push({id:"Pwsh General Error",type:b.TerminalQuickFixType.TerminalCommand,terminalCommand:p,source:"builtin"});return d}}}e.pwshGeneralError=h;function a(){return{id:"Unix Command Not Found",type:"internal",commandLineMatcher:/.+/,outputMatcher:{lineMatcher:e.PwshUnixCommandNotFoundErrorOutputRegex,anchor:"bottom",offset:0,length:10},commandExitResult:"error",getQuickFixes:r=>{const i=r.outputMatch?.regexMatch.input?.split(` `);if(!i)return;let s=0,o=!1;for(;s<i.length;s++)if(i[s].match(e.PwshUnixCommandNotFoundErrorOutputRegex)){o=!0;break}if(!o)return;const u=[];let d=!1;for(;s<i.length;s++){const p=i[s].trim();if(p.length===0)break;const c=p.match(/You also have .+ installed, you can run '(?<command>.+)' instead./)?.groups?.command;if(c){u.push({id:"Pwsh Unix Command Not Found Error",type:b.TerminalQuickFixType.TerminalCommand,terminalCommand:c,source:"builtin"}),d=!1;continue}if(p.match(/Command '.+' not found, but can be installed with:/)){d=!0;continue}d&&u.push({id:"Pwsh Unix Command Not Found Error",type:b.TerminalQuickFixType.TerminalCommand,terminalCommand:p.trim(),source:"builtin"})}return u}}}e.pwshUnixCommandNotFoundError=a}),define(Q[3641],Y([1,0,14,80,102,6,4,33,9,30,158]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeAheadAddon=e.CharPredictState=e.PredictionTimeline=e.PredictionStats=void 0;var h;(function(K){K.Esc="\x1B",K.Csi="\x1B[",K.ShowCursor="\x1B[?25h",K.HideCursor="\x1B[?25l",K.DeleteChar="\x1B[X",K.DeleteRestOfLine="\x1B[K"})(h||(h={}));const a=/^\x1b\[[0-9;]*m/,r=/^\x1b\[?([0-9]*)(;[35])?O?([DC])/,i=/[^a-z0-9]/i;var s;(function(K){K[K.StatsBufferSize=24]="StatsBufferSize",K[K.StatsSendTelemetryEvery=3e5]="StatsSendTelemetryEvery",K[K.StatsMinSamplesToTurnOn=5]="StatsMinSamplesToTurnOn",K[K.StatsMinAccuracyToTurnOn=.3]="StatsMinAccuracyToTurnOn",K[K.StatsToggleOffThreshold=.5]="StatsToggleOffThreshold"})(s||(s={}));const o=/^(\x1b\[(\??25[hl]|\??[0-9;]+n))+/,u=K=>K._core,d=K=>{};var p;(function(K){K.Back="D",K.Forwards="C"})(p||(p={}));class c{get x(){return this._x}get y(){return this._y}get baseY(){return this._baseY}get coordinate(){return{x:this._x,y:this._y,baseY:this._baseY}}constructor(H,U,G){this.rows=H,this.cols=U,this._buffer=G,this._x=0,this._y=1,this._baseY=1,this._x=G.cursorX,this._y=G.cursorY,this._baseY=G.baseY}getLine(){return this._buffer.getLine(this._y+this._baseY)}getCell(H){return this.getLine()?.getCell(this._x,H)}moveTo(H){return this._x=H.x,this._y=H.y+H.baseY-this._baseY,this.moveInstruction()}clone(){const H=new c(this.rows,this.cols,this._buffer);return H.moveTo(this),H}move(H,U){return this._x=H,this._y=U,this.moveInstruction()}shift(H=0,U=0){return this._x+=H,this._y+=U,this.moveInstruction()}moveInstruction(){return this._y>=this.rows?(this._baseY+=this._y-(this.rows-1),this._y=this.rows-1):this._y<0&&(this._baseY-=this._y,this._y=0),`\x1B[${this._y+1};${this._x+1}H`}}const l=(K,H,U)=>{let G=!1;U<0&&H.shift(-1);let $;for(;H.x>=0;){if($=H.getCell($),!$?.getCode())return;const ie=$.getChars();if(i.test(ie)){if(G)break}else G=!0;H.shift(U)}U<0&&H.shift(1)};var n;(function(K){K[K.Success=0]="Success",K[K.Failure=1]="Failure",K[K.Buffer=2]="Buffer"})(n||(n={}));class g{get remaining(){return this._input.length-this.index}get eof(){return this.index===this._input.length}get rest(){return this._input.slice(this.index)}constructor(H){this._input=H,this.index=0}eatChar(H){if(this._input[this.index]===H)return this.index++,H}eatStr(H){if(this._input.slice(this.index,H.length)===H)return this.index+=H.length,H}eatGradually(H){const U=this.index;for(let G=0;G<H.length;G++){if(G>0&&this.eof)return 2;if(!this.eatChar(H[G]))return this.index=U,1}return 0}eatRe(H){const U=H.exec(this._input.slice(this.index));if(U)return this.index+=U[0].length,U}eatCharCode(H=0,U=H+1){const G=this._input.charCodeAt(this.index);if(!(G<H||G>=U))return this.index++,G}}class w{constructor(){this.clearAfterTimeout=!1}apply(){return""}rollback(){return""}rollForwards(){return""}matches(){return 1}}class E{constructor(H){this.inner=H}apply(H,U){return this._appliedCursor=U.clone(),this.inner.apply(H,this._appliedCursor),""}rollback(H){return this.inner.rollback(H.clone()),""}rollForwards(H,U){return this._appliedCursor&&H.moveTo(this._appliedCursor),U}matches(H){return this.inner.matches(H)}}const C=K=>K instanceof E&&K.inner instanceof I;class I{constructor(H,U){this._style=H,this._char=U,this.affectsStyle=!0}apply(H,U){const G=U.getCell();return this.appliedAt=G?{pos:U.coordinate,oldAttributes:P(G),oldChar:G.getChars()}:{pos:U.coordinate,oldAttributes:"",oldChar:""},U.shift(1),this._style.apply+this._char+this._style.undo}rollback(H){if(!this.appliedAt)return"";const{oldAttributes:U,oldChar:G,pos:$}=this.appliedAt;return H.moveTo($)+(G?`${U}${G}${H.moveTo($)}`:"\x1B[X")}rollForwards(H,U){return this.appliedAt?H.clone().moveTo(this.appliedAt.pos)+U:""}matches(H,U){const G=H.index;for(;H.eatRe(a););if(H.eof)return 2;if(H.eatChar(this._char))return 0;if(U instanceof I){const $=H.eatGradually(`\b${U._char}${this._char}`);if($!==1)return $}return H.index=G,1}}class _{constructor(H){this._terminal=H}apply(H,U){const G=!U.getLine()?.translateToString(void 0,U.x).trim(),$=U.coordinate,ie=U.shift(-1),J=U.getCell();return this._appliedAt=J?{isLastChar:G,pos:$,oldAttributes:P(J),oldChar:J.getChars()}:{isLastChar:G,pos:$,oldAttributes:"",oldChar:""},ie+"\x1B[X"}rollback(H){if(!this._appliedAt)return"";const{oldAttributes:U,oldChar:G,pos:$}=this._appliedAt;return G?U+G+H.moveTo($)+P(u(this._terminal)._inputHandler._curAttrData):H.moveTo($)+"\x1B[X"}rollForwards(){return""}matches(H){if(this._appliedAt?.isLastChar){const U=H.eatGradually("\b\x1B[K");if(U!==1)return U;const G=H.eatGradually("\b \b");if(G!==1)return G}return 1}}class A{apply(H,U){return this._prevPosition=U.coordinate,U.move(0,U.y+1),`\r `}rollback(H){return this._prevPosition?H.moveTo(this._prevPosition):""}rollForwards(){return""}matches(H){return H.eatGradually(`\r `)}}class k extends A{apply(H,U){return this._prevPosition=U.coordinate,U.move(0,U.y+1)," \r"}matches(H){const U=H.eatGradually(" \r");return U!==1?H.eatGradually("\x1B[K")===2?2:U:H.eatGradually(`\r `)}}class L{constructor(H,U,G){this._direction=H,this._moveByWords=U,this._amount=G}apply(H,U){const G=U.x,$=U.getCell(),ie=$?P($):"",{_amount:J,_direction:j,_moveByWords:ee}=this,X=j==="D"?-1:1,te=U.clone();if(ee)for(let Z=0;Z<J;Z++)l(H,te,X);else te.shift(X*J);return this._applied={amount:Math.abs(U.x-te.x),prevPosition:G,prevAttrs:ie,rollForward:U.moveTo(te)},this._applied.rollForward}rollback(H){return this._applied?H.move(this._applied.prevPosition,H.y)+this._applied.prevAttrs:""}rollForwards(){return""}matches(H){if(!this._applied)return 1;const U=this._direction,{amount:G,rollForward:$}=this._applied;if(H.eatStr(`\x1B[${U}`.repeat(G))||U==="D"&&H.eatStr("\b".repeat(G)))return 0;if($){const ie=H.eatGradually($);if(ie!==1)return ie}return H.eatGradually(`\x1B[${G}${U}`)}}class R extends T.Disposable{get accuracy(){let H=0;for(const[,U]of this._stats)U&&H++;return H/(this._stats.length||1)}get sampleSize(){return this._stats.length}get latency(){const H=this._stats.filter(([,U])=>U).map(([U])=>U).sort();return{count:H.length,min:H[0],median:H[Math.floor(H.length/2)],max:H[H.length-1]}}get maxLatency(){let H=-1/0;for(const[U,G]of this._stats)G&&(H=Math.max(U,H));return H}constructor(H){super(),this._stats=[],this._index=0,this._addedAtTime=new WeakMap,this._changeEmitter=new D.Emitter,this.onChange=this._changeEmitter.event,this._register(H.onPredictionAdded(U=>this._addedAtTime.set(U,Date.now()))),this._register(H.onPredictionSucceeded(this._pushStat.bind(this,!0))),this._register(H.onPredictionFailed(this._pushStat.bind(this,!1)))}_pushStat(H,U){const G=this._addedAtTime.get(U);this._stats[this._index]=[Date.now()-G,H],this._index=(this._index+1)%24,this._changeEmitter.fire()}}e.PredictionStats=R;class M{get _currentGenerationPredictions(){return this._expected.filter(({gen:H})=>H===this._expected[0].gen).map(({p:H})=>H)}get isShowingPredictions(){return this._showPredictions}get length(){return this._expected.length}constructor(H,U){this.terminal=H,this._style=U,this._expected=[],this._currentGen=0,this._showPredictions=!1,this._addedEmitter=new D.Emitter,this.onPredictionAdded=this._addedEmitter.event,this._failedEmitter=new D.Emitter,this.onPredictionFailed=this._failedEmitter.event,this._succeededEmitter=new D.Emitter,this.onPredictionSucceeded=this._succeededEmitter.event}setShowPredictions(H){if(H===this._showPredictions)return;this._showPredictions=H;const U=this._getActiveBuffer();if(!U)return;const G=this._currentGenerationPredictions;H?(this.clearCursor(),this._style.expectIncomingStyle(G.reduce(($,ie)=>ie.affectsStyle?$+1:$,0)),this.terminal.write(G.map($=>$.apply(U,this.physicalCursor(U))).join(""))):this.terminal.write(G.reverse().map($=>$.rollback(this.physicalCursor(U))).join(""))}undoAllPredictions(){const H=this._getActiveBuffer();this._showPredictions&&H&&this.terminal.write(this._currentGenerationPredictions.reverse().map(U=>U.rollback(this.physicalCursor(H))).join("")),this._expected=[]}beforeServerInput(H){const U=H;if(this._inputBuffer&&(H=this._inputBuffer+H,this._inputBuffer=void 0),!this._expected.length)return this._clearPredictionState(),H;const G=this._getActiveBuffer();if(!G)return this._clearPredictionState(),H;let $="";const ie=new g(H),J=this._expected[0].gen,j=()=>{const ee=ie.eatRe(o);ee&&($+=ee[0])};e:for(;this._expected.length&&ie.remaining>0;){j();const{p:ee,gen:X}=this._expected[0],te=this.physicalCursor(G),Z=ie.index;switch(ee.matches(ie,this._lookBehind)){case 0:{const se=H.slice(Z,ie.index);X===J?$+=ee.rollForwards?.(te,se):(ee.apply(G,this.physicalCursor(G)),$+=se),this._succeededEmitter.fire(ee),this._lookBehind=ee,this._expected.shift();break}case 2:this._inputBuffer=H.slice(Z),ie.index=H.length;break e;case 1:{const se=this._expected.filter(re=>re.gen===J).reverse();$+=se.map(({p:re})=>re.rollback(this.physicalCursor(G))).join(""),se.some(re=>re.p.affectsStyle)&&($+=P(u(this.terminal)._inputHandler._curAttrData)),this._clearPredictionState(),this._failedEmitter.fire(ee);break e}}}if(j(),ie.eof||($+=ie.rest,this._clearPredictionState()),this._expected.length&&J!==this._expected[0].gen)for(const{p:ee,gen:X}of this._expected){if(X!==this._expected[0].gen)break;ee.affectsStyle&&this._style.expectIncomingStyle(),$+=ee.apply(G,this.physicalCursor(G))}return this._showPredictions?($.length===0||$===H||(this._physicalCursor&&($+=this._physicalCursor.moveInstruction()),$="\x1B[?25l"+$+"\x1B[?25h"),$):U}_clearPredictionState(){this._expected=[],this.clearCursor(),this._lookBehind=void 0}addPrediction(H,U){if(this._expected.push({gen:this._currentGen,p:U}),this._addedEmitter.fire(U),this._currentGen!==this._expected[0].gen)return U.apply(H,this.tentativeCursor(H)),!1;const G=U.apply(H,this.physicalCursor(H));return this._tenativeCursor=void 0,this._showPredictions&&G&&(U.affectsStyle&&this._style.expectIncomingStyle(),this.terminal.write(G)),!0}addBoundary(H,U){let G=!1;return H&&U&&(G=this.addPrediction(H,new E(U)),U.apply(H,this.tentativeCursor(H))),this._currentGen++,G}peekEnd(){return this._expected[this._expected.length-1]?.p}peekStart(){return this._expected[0]?.p}physicalCursor(H){return this._physicalCursor||(this._showPredictions&&d(this.terminal),this._physicalCursor=new c(this.terminal.rows,this.terminal.cols,H)),this._physicalCursor}tentativeCursor(H){return this._tenativeCursor||(this._tenativeCursor=this.physicalCursor(H).clone()),this._tenativeCursor}clearCursor(){this._physicalCursor=void 0,this._tenativeCursor=void 0}_getActiveBuffer(){const H=this.terminal.buffer.active;return H.type==="normal"?H:void 0}}e.PredictionTimeline=M;const N=K=>{if(K.isAttributeDefault())return[0];const H=[];return K.isBold()&&H.push(1),K.isDim()&&H.push(2),K.isItalic()&&H.push(3),K.isUnderline()&&H.push(4),K.isBlink()&&H.push(5),K.isInverse()&&H.push(7),K.isInvisible()&&H.push(8),K.isFgRGB()&&H.push(38,2,K.getFgColor()>>>24,K.getFgColor()>>>16&255,K.getFgColor()&255),K.isFgPalette()&&H.push(38,5,K.getFgColor()),K.isFgDefault()&&H.push(39),K.isBgRGB()&&H.push(48,2,K.getBgColor()>>>24,K.getBgColor()>>>16&255,K.getBgColor()&255),K.isBgPalette()&&H.push(48,5,K.getBgColor()),K.isBgDefault()&&H.push(49),H},P=K=>`\x1B[${N(K).join(";")}m`,x=(K,H,U)=>{if(K.length-H>U.length)return!1;for(let G=0;G<U.length;G++,H++)if(U[H]!==K[H])return!1;return!0},F=(K,H)=>{const U=[0,0,-1,0,0,0];let G=0,$=0;do{const ie=K[H+$];if(U[$+G]=typeof ie=="number"?ie:ie[0],typeof ie!="number"){let J=0;do U[1]===5&&(G=1),U[$+J+1+G]=ie[J];while(++J<ie.length&&J+$+1+G<U.length);break}if(U[1]===5&&$+G>=2||U[1]===2&&$+G>=5)break;U[1]&&(G=1)}while(++$+H<K.length&&$+G<U.length);return $};class V{static _compileArgs(H){return`\x1B[${H.join(";")}m`}constructor(H,U){this._terminal=U,this._expectedIncomingStyles=0,this.onUpdate(H)}expectIncomingStyle(H=1){this._expectedIncomingStyles+=H*2}startTracking(){this._expectedIncomingStyles=0,this._onDidWriteSGR(N(u(this._terminal)._inputHandler._curAttrData)),this._csiHandler=this._terminal.parser.registerCsiHandler({final:"m"},H=>(this._onDidWriteSGR(H),!1))}debounceStopTracking(){this._stopTracking()}dispose(){this._stopTracking()}_stopTracking(){this._csiHandler?.dispose(),this._csiHandler=void 0}_onDidWriteSGR(H){const U=this._undoArgs;for(let G=0;G<H.length;){const $=H[G],ie=typeof $=="number"?$:$[0];if(this._expectedIncomingStyles){if(x(H,G,this._undoArgs)){this._expectedIncomingStyles--,G+=this._undoArgs.length;continue}if(x(H,G,this._applyArgs)){this._expectedIncomingStyles--,G+=this._applyArgs.length;continue}}const J=ie===38||ie===48||ie===58?F(H,G):1;switch(this._applyArgs[0]){case 1:ie===2?this._undoArgs=[22,2]:(ie===22||ie===0)&&(this._undoArgs=[22]);break;case 2:ie===1?this._undoArgs=[22,1]:(ie===22||ie===0)&&(this._undoArgs=[22]);break;case 38:ie===0||ie===39||ie===100?this._undoArgs=[39]:(ie>=30&&ie<=38||ie>=90&&ie<=97)&&(this._undoArgs=H.slice(G,G+J));break;default:ie===this._applyArgs[0]?this._undoArgs=this._applyArgs:ie===0&&(this._undoArgs=this._originalUndoArgs)}G+=J}U!==this._undoArgs&&(this.undo=V._compileArgs(this._undoArgs))}onUpdate(H){const{applyArgs:U,undoArgs:G}=this._getArgs(H);this._applyArgs=U,this._undoArgs=this._originalUndoArgs=G,this.apply=V._compileArgs(this._applyArgs),this.undo=V._compileArgs(this._undoArgs)}_getArgs(H){switch(H){case"bold":return{applyArgs:[1],undoArgs:[22]};case"dim":return{applyArgs:[2],undoArgs:[22]};case"italic":return{applyArgs:[3],undoArgs:[23]};case"underlined":return{applyArgs:[4],undoArgs:[24]};case"inverted":return{applyArgs:[7],undoArgs:[27]};default:{let U;try{U=y.Color.fromHex(H)}catch{U=new y.Color(new y.RGBA(255,0,0,1))}const{r:G,g:$,b:ie}=U.rgba;return{applyArgs:[38,2,G,$,ie],undoArgs:[39]}}}}}fe([(0,b.debounce)(2e3)],V.prototype,"debounceStopTracking",null);const W=(K=S.DEFAULT_LOCAL_ECHO_EXCLUDE)=>new RegExp(`\\b(${K.map(f.escapeRegExpCharacters).join("|")})\\b`,"i");var z;(function(K){K[K.Unknown=0]="Unknown",K[K.HasPendingChar=1]="HasPendingChar",K[K.Validated=2]="Validated"})(z||(e.CharPredictState=z={}));let B=class extends T.Disposable{constructor(H,U,G){super(),this._processManager=H,this._configurationService=U,this._telemetryService=G,this._typeaheadThreshold=this._configurationService.getValue(S.TERMINAL_CONFIG_SECTION).localEchoLatencyThreshold,this._excludeProgramRe=W(this._configurationService.getValue(S.TERMINAL_CONFIG_SECTION).localEchoExcludePrograms),this._terminalTitle="",this._register((0,T.toDisposable)(()=>this._clearPredictionDebounce?.dispose()))}activate(H){const U=this._typeaheadStyle=this._register(new V(this._configurationService.getValue(S.TERMINAL_CONFIG_SECTION).localEchoStyle,H)),G=this._timeline=new M(H,this._typeaheadStyle),$=this.stats=this._register(new R(this._timeline));G.setShowPredictions(this._typeaheadThreshold===0),this._register(H.onData(J=>this._onUserData(J))),this._register(H.onTitleChange(J=>{this._terminalTitle=J,this._reevaluatePredictorState($,G)})),this._register(H.onResize(()=>{G.setShowPredictions(!1),G.clearCursor(),this._reevaluatePredictorState($,G)})),this._register(this._configurationService.onDidChangeConfiguration(J=>{J.affectsConfiguration(S.TERMINAL_CONFIG_SECTION)&&(U.onUpdate(this._configurationService.getValue(S.TERMINAL_CONFIG_SECTION).localEchoStyle),this._typeaheadThreshold=this._configurationService.getValue(S.TERMINAL_CONFIG_SECTION).localEchoLatencyThreshold,this._excludeProgramRe=W(this._configurationService.getValue(S.TERMINAL_CONFIG_SECTION).localEchoExcludePrograms),this._reevaluatePredictorState($,G))})),this._register(this._timeline.onPredictionSucceeded(J=>{this._lastRow?.charState===1&&C(J)&&J.inner.appliedAt&&J.inner.appliedAt.pos.y+J.inner.appliedAt.pos.baseY===this._lastRow.y&&(this._lastRow.charState=2)})),this._register(this._processManager.onBeforeProcessData(J=>this._onBeforeProcessData(J)));let ie;this._register($.onChange(()=>{ie||(ie=setTimeout(()=>{this._sendLatencyStats($),ie=void 0},3e5)),G.length===0&&U.debounceStopTracking(),this._reevaluatePredictorState($,G)}))}reset(){this._lastRow=void 0}_deferClearingPredictions(){if(!(!this.stats||!this._timeline)){if(this._clearPredictionDebounce?.dispose(),this._timeline.length===0||this._timeline.peekStart()?.clearAfterTimeout===!1){this._clearPredictionDebounce=void 0;return}this._clearPredictionDebounce=(0,t.disposableTimeout)(()=>{this._timeline?.undoAllPredictions(),this._lastRow?.charState===1&&(this._lastRow.charState=0)},Math.max(500,this.stats.maxLatency*3/2))}}_reevaluatePredictorState(H,U){this._reevaluatePredictorStateNow(H,U)}_reevaluatePredictorStateNow(H,U){if(this._excludeProgramRe.test(this._terminalTitle))U.setShowPredictions(!1);else if(this._typeaheadThreshold<0)U.setShowPredictions(!1);else if(this._typeaheadThreshold===0)U.setShowPredictions(!0);else if(H.sampleSize>5&&H.accuracy>.3){const G=H.latency.median;G>=this._typeaheadThreshold?U.setShowPredictions(!0):G<this._typeaheadThreshold/.5&&U.setShowPredictions(!1)}}_sendLatencyStats(H){this._telemetryService.publicLog("terminalLatencyStats",{...H.latency,predictionAccuracy:H.accuracy})}_onUserData(H){if(this._timeline?.terminal.buffer.active.type!=="normal")return;const U=this._timeline.terminal,G=U.buffer.active;if(G.cursorX===1&&G.cursorY===U.rows-1&&G.getLine(G.cursorY+G.baseY)?.getCell(0)?.getChars()===":")return;const $=G.baseY+G.cursorY;$!==this._lastRow?.y?this._lastRow={y:$,startingX:G.cursorX,endingX:G.cursorX,charState:0}:(this._lastRow.startingX=Math.min(this._lastRow.startingX,G.cursorX),this._lastRow.endingX=Math.max(this._lastRow.endingX,this._timeline.physicalCursor(G).x));const ie=ee=>this._timeline.tentativeCursor(G).x<=this._lastRow.startingX?this._timeline.addBoundary(G,ee):this._timeline.addPrediction(G,ee),J=ee=>this._timeline.tentativeCursor(G).x>=this._lastRow.endingX-1?this._timeline.addBoundary(G,ee):this._timeline.addPrediction(G,ee),j=new g(H);for(;j.remaining>0;){if(j.eatCharCode(127)){const X=this._timeline.peekEnd();X&&X instanceof I&&this._timeline.addBoundary(),this._timeline.isShowingPredictions&&d(this._timeline.terminal),this._timeline.tentativeCursor(G).x<=this._lastRow.startingX?this._timeline.addBoundary(G,new _(this._timeline.terminal)):(this._lastRow.endingX--,this._timeline.addPrediction(G,new _(this._timeline.terminal)));continue}if(j.eatCharCode(32,126)){const X=H[j.index-1],te=new I(this._typeaheadStyle,X);this._lastRow.charState===0?(this._timeline.addBoundary(G,te),this._lastRow.charState=1):this._timeline.addPrediction(G,te),this._timeline.tentativeCursor(G).x>=U.cols&&this._timeline.addBoundary(G,new k);continue}const ee=j.eatRe(r);if(ee){const X=ee[3],te=new L(X,!!ee[2],Number(ee[1])||1);X==="D"?ie(te):J(te);continue}if(j.eatStr("\x1Bf")){J(new L("C",!0,1));continue}if(j.eatStr("\x1Bb")){ie(new L("D",!0,1));continue}if(j.eatChar("\r")&&G.cursorY<U.rows-1){this._timeline.addPrediction(G,new A);continue}this._timeline.addBoundary(G,new w);break}this._timeline.length===1&&(this._deferClearingPredictions(),this._typeaheadStyle.startTracking())}_onBeforeProcessData(H){this._timeline&&(H.data=this._timeline.beforeServerInput(H.data),this._deferClearingPredictions())}};e.TypeAheadAddon=B,fe([(0,b.debounce)(100)],B.prototype,"_reevaluatePredictorState",null),e.TypeAheadAddon=B=fe([O(1,v.IConfigurationService),O(2,m.ITelemetryService)],B)}),define(Q[3642],Y([1,0,4,9,5,421,3641,158]),function(q,e,t,y,b,D,T,f){"use strict";var v;Object.defineProperty(e,"__esModule",{value:!0});let m=class extends t.DisposableStore{static{v=this}static{this.ID="terminal.typeAhead"}static get(h){return h.getContribution(v.ID)}constructor(h,a,r,i,s){super(),this._processManager=a,this._configurationService=i,this._instantiationService=s,this.add((0,t.toDisposable)(()=>this._addon?.dispose()))}xtermReady(h){this._loadTypeAheadAddon(h.raw),this.add(this._configurationService.onDidChangeConfiguration(a=>{a.affectsConfiguration("terminal.integrated.localEchoEnabled")&&this._loadTypeAheadAddon(h.raw)})),this.add(this._processManager.onProcessReady(()=>{this._addon?.reset()}))}_loadTypeAheadAddon(h){const a=this._configurationService.getValue(f.TERMINAL_CONFIG_SECTION).localEchoEnabled,r=!!this._processManager.remoteAuthority;if(a==="off"||a==="auto"&&!r){this._addon?.dispose(),this._addon=void 0;return}this._addon||(a==="on"||a==="auto"&&r)&&(this._addon=this._instantiationService.createInstance(T.TypeAheadAddon,this._processManager),h.loadAddon(this._addon))}};m=v=fe([O(3,y.IConfigurationService),O(4,b.IInstantiationService)],m),(0,D.registerTerminalContribution)(m.ID,m)}),define(Q[1315],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.flatTestItemDelimiter=void 0,e.flatTestItemDelimiter=" \u203A "}),define(Q[1316],Y([1,0,80,3002,36]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.testStatesToIconColors=e.testMessageSeverityColors=e.testingPeekHeaderBackground=e.testingPeekBorder=e.testingColorIconSkipped=e.testingColorIconUnset=e.testingColorIconQueued=e.testingColorRunAction=e.testingColorIconPassed=e.testingColorIconErrored=e.testingColorIconFailed=void 0,e.testingColorIconFailed=(0,b.registerColor)("testing.iconFailed",{dark:"#f14c4c",light:"#f14c4c",hcDark:"#f14c4c",hcLight:"#B5200D"},(0,y.localize)(0,null)),e.testingColorIconErrored=(0,b.registerColor)("testing.iconErrored",{dark:"#f14c4c",light:"#f14c4c",hcDark:"#f14c4c",hcLight:"#B5200D"},(0,y.localize)(1,null)),e.testingColorIconPassed=(0,b.registerColor)("testing.iconPassed",{dark:"#73c991",light:"#73c991",hcDark:"#73c991",hcLight:"#007100"},(0,y.localize)(2,null)),e.testingColorRunAction=(0,b.registerColor)("testing.runAction",{dark:e.testingColorIconPassed,light:e.testingColorIconPassed,hcDark:e.testingColorIconPassed,hcLight:e.testingColorIconPassed},(0,y.localize)(3,null)),e.testingColorIconQueued=(0,b.registerColor)("testing.iconQueued",{dark:"#cca700",light:"#cca700",hcDark:"#cca700",hcLight:"#cca700"},(0,y.localize)(4,null)),e.testingColorIconUnset=(0,b.registerColor)("testing.iconUnset",{dark:"#848484",light:"#848484",hcDark:"#848484",hcLight:"#848484"},(0,y.localize)(5,null)),e.testingColorIconSkipped=(0,b.registerColor)("testing.iconSkipped",{dark:"#848484",light:"#848484",hcDark:"#848484",hcLight:"#848484"},(0,y.localize)(6,null)),e.testingPeekBorder=(0,b.registerColor)("testing.peekBorder",{dark:b.editorErrorForeground,light:b.editorErrorForeground,hcDark:b.contrastBorder,hcLight:b.contrastBorder},(0,y.localize)(7,null)),e.testingPeekHeaderBackground=(0,b.registerColor)("testing.peekHeaderBackground",{dark:(0,b.transparent)(b.editorErrorForeground,.1),light:(0,b.transparent)(b.editorErrorForeground,.1),hcDark:null,hcLight:null},(0,y.localize)(8,null)),e.testMessageSeverityColors={[0]:{decorationForeground:(0,b.registerColor)("testing.message.error.decorationForeground",{dark:b.editorErrorForeground,light:b.editorErrorForeground,hcDark:b.editorForeground,hcLight:b.editorForeground},(0,y.localize)(9,null)),marginBackground:(0,b.registerColor)("testing.message.error.lineBackground",{dark:new t.Color(new t.RGBA(255,0,0,.2)),light:new t.Color(new t.RGBA(255,0,0,.2)),hcDark:null,hcLight:null},(0,y.localize)(10,null))},[1]:{decorationForeground:(0,b.registerColor)("testing.message.info.decorationForeground",{dark:(0,b.transparent)(b.editorForeground,.5),light:(0,b.transparent)(b.editorForeground,.5),hcDark:(0,b.transparent)(b.editorForeground,.5),hcLight:(0,b.transparent)(b.editorForeground,.5)},(0,y.localize)(11,null)),marginBackground:(0,b.registerColor)("testing.message.info.lineBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,y.localize)(12,null))}},e.testStatesToIconColors={[6]:e.testingColorIconErrored,[4]:e.testingColorIconFailed,[3]:e.testingColorIconPassed,[1]:e.testingColorIconQueued,[0]:e.testingColorIconUnset,[5]:e.testingColorIconSkipped}}),define(Q[469],Y([1,0,32,2992,77,19,37,1316]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.testingStatesToIcons=e.testingCancelRefreshTests=e.testingContinuousIsOn=e.testingTurnContinuousRunOff=e.testingTurnContinuousRunOn=e.testingRefreshTests=e.testingUpdateProfiles=e.testingShowAsTree=e.testingShowAsList=e.testingHiddenIcon=e.testingFilterIcon=e.testingCancelIcon=e.testingDebugIcon=e.testingDebugAllIcon=e.testingRunAllIcon=e.testingRerunIcon=e.testingRunIcon=e.testingResultsIcon=e.testingViewIcon=void 0,e.testingViewIcon=(0,b.registerIcon)("test-view-icon",t.Codicon.beaker,(0,y.localize)(0,null)),e.testingResultsIcon=(0,b.registerIcon)("test-results-icon",t.Codicon.checklist,(0,y.localize)(1,null)),e.testingRunIcon=(0,b.registerIcon)("testing-run-icon",t.Codicon.run,(0,y.localize)(2,null)),e.testingRerunIcon=(0,b.registerIcon)("testing-rerun-icon",t.Codicon.refresh,(0,y.localize)(3,null)),e.testingRunAllIcon=(0,b.registerIcon)("testing-run-all-icon",t.Codicon.runAll,(0,y.localize)(4,null)),e.testingDebugAllIcon=(0,b.registerIcon)("testing-debug-all-icon",t.Codicon.debugAltSmall,(0,y.localize)(5,null)),e.testingDebugIcon=(0,b.registerIcon)("testing-debug-icon",t.Codicon.debugAltSmall,(0,y.localize)(6,null)),e.testingCancelIcon=(0,b.registerIcon)("testing-cancel-icon",t.Codicon.debugStop,(0,y.localize)(7,null)),e.testingFilterIcon=(0,b.registerIcon)("testing-filter",t.Codicon.filter,(0,y.localize)(8,null)),e.testingHiddenIcon=(0,b.registerIcon)("testing-hidden",t.Codicon.eyeClosed,(0,y.localize)(9,null)),e.testingShowAsList=(0,b.registerIcon)("testing-show-as-list-icon",t.Codicon.listTree,(0,y.localize)(10,null)),e.testingShowAsTree=(0,b.registerIcon)("testing-show-as-list-icon",t.Codicon.listFlat,(0,y.localize)(11,null)),e.testingUpdateProfiles=(0,b.registerIcon)("testing-update-profiles",t.Codicon.gear,(0,y.localize)(12,null)),e.testingRefreshTests=(0,b.registerIcon)("testing-refresh-tests",t.Codicon.refresh,(0,y.localize)(13,null)),e.testingTurnContinuousRunOn=(0,b.registerIcon)("testing-turn-continuous-run-on",t.Codicon.eye,(0,y.localize)(14,null)),e.testingTurnContinuousRunOff=(0,b.registerIcon)("testing-turn-continuous-run-off",t.Codicon.eyeClosed,(0,y.localize)(15,null)),e.testingContinuousIsOn=(0,b.registerIcon)("testing-continuous-is-on",t.Codicon.eye,(0,y.localize)(16,null)),e.testingCancelRefreshTests=(0,b.registerIcon)("testing-cancel-refresh-tests",t.Codicon.stop,(0,y.localize)(17,null)),e.testingStatesToIcons=new Map([[6,(0,b.registerIcon)("testing-error-icon",t.Codicon.issues,(0,y.localize)(18,null))],[4,(0,b.registerIcon)("testing-failed-icon",t.Codicon.error,(0,y.localize)(19,null))],[3,(0,b.registerIcon)("testing-passed-icon",t.Codicon.pass,(0,y.localize)(20,null))],[1,(0,b.registerIcon)("testing-queued-icon",t.Codicon.history,(0,y.localize)(21,null))],[2,b.spinningLoading],[5,(0,b.registerIcon)("testing-skipped-icon",t.Codicon.debugStepOver,(0,y.localize)(22,null))],[0,(0,b.registerIcon)("testing-unset-icon",t.Codicon.circleOutline,(0,y.localize)(23,null))]]),(0,D.registerThemingParticipant)((v,m)=>{for(const[S,h]of e.testingStatesToIcons.entries()){const a=f.testStatesToIconColors[S];a&&m.addRule(`.monaco-workbench ${T.ThemeIcon.asCSSSelector(h)} { color: ${v.getColor(a)} !important; }`)}m.addRule(` .monaco-editor ${T.ThemeIcon.asCSSSelector(e.testingRunIcon)}, .monaco-editor ${T.ThemeIcon.asCSSSelector(e.testingRunAllIcon)} { color: ${v.getColor(f.testingColorRunAction)}; } `)})}),define(Q[470],Y([1,0,3003]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTestingConfiguration=e.testingConfiguration=e.TestingCountBadge=e.DefaultGutterClickAction=e.AutoOpenPeekViewWhen=e.AutoOpenTesting=e.TestingConfigKeys=void 0;var y;(function(m){m.AutoRunDelay="testing.autoRun.delay",m.AutoOpenPeekView="testing.automaticallyOpenPeekView",m.AutoOpenPeekViewDuringContinuousRun="testing.automaticallyOpenPeekViewDuringAutoRun",m.OpenTesting="testing.openTesting",m.FollowRunningTest="testing.followRunningTest",m.DefaultGutterClickAction="testing.defaultGutterClickAction",m.GutterEnabled="testing.gutterEnabled",m.SaveBeforeTest="testing.saveBeforeTest",m.AlwaysRevealTestOnStateChange="testing.alwaysRevealTestOnStateChange",m.CountBadge="testing.countBadge",m.ShowAllMessages="testing.showAllMessages"})(y||(e.TestingConfigKeys=y={}));var b;(function(m){m.NeverOpen="neverOpen",m.OpenOnTestStart="openOnTestStart",m.OpenOnTestFailure="openOnTestFailure"})(b||(e.AutoOpenTesting=b={}));var D;(function(m){m.FailureVisible="failureInVisibleDocument",m.FailureAnywhere="failureAnywhere",m.Never="never"})(D||(e.AutoOpenPeekViewWhen=D={}));var T;(function(m){m.Run="run",m.Debug="debug",m.ContextMenu="contextMenu"})(T||(e.DefaultGutterClickAction=T={}));var f;(function(m){m.Failed="failed",m.Off="off",m.Passed="passed",m.Skipped="skipped"})(f||(e.TestingCountBadge=f={})),e.testingConfiguration={id:"testing",order:21,title:(0,t.localize)(0,null),type:"object",properties:{["testing.autoRun.delay"]:{type:"integer",minimum:0,description:(0,t.localize)(1,null),default:1e3},["testing.automaticallyOpenPeekView"]:{description:(0,t.localize)(2,null),enum:["failureAnywhere","failureInVisibleDocument","never"],default:"failureInVisibleDocument",enumDescriptions:[(0,t.localize)(3,null),(0,t.localize)(4,null),(0,t.localize)(5,null)]},["testing.showAllMessages"]:{description:(0,t.localize)(6,null),type:"boolean",default:!1},["testing.automaticallyOpenPeekViewDuringAutoRun"]:{description:(0,t.localize)(7,null),type:"boolean",default:!1},["testing.countBadge"]:{description:(0,t.localize)(8,null),enum:["failed","off","passed","skipped"],enumDescriptions:[(0,t.localize)(9,null),(0,t.localize)(10,null),(0,t.localize)(11,null),(0,t.localize)(12,null)],default:"failed"},["testing.followRunningTest"]:{description:(0,t.localize)(13,null),type:"boolean",default:!0},["testing.defaultGutterClickAction"]:{description:(0,t.localize)(14,null),enum:["run","debug","contextMenu"],enumDescriptions:[(0,t.localize)(15,null),(0,t.localize)(16,null),(0,t.localize)(17,null)],default:"run"},["testing.gutterEnabled"]:{description:(0,t.localize)(18,null),type:"boolean",default:!0},["testing.saveBeforeTest"]:{description:(0,t.localize)(19,null),type:"boolean",default:!0},["testing.openTesting"]:{enum:["neverOpen","openOnTestStart","openOnTestFailure"],enumDescriptions:[(0,t.localize)(20,null),(0,t.localize)(21,null),(0,t.localize)(22,null)],default:"openOnTestStart",description:(0,t.localize)(23,null)},["testing.alwaysRevealTestOnStateChange"]:{markdownDescription:(0,t.localize)(24,null),type:"boolean",default:!1}}};const v=(m,S)=>m.getValue(S);e.getTestingConfiguration=v}),define(Q[738],Y([1,0,257,3004]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestCommandId=e.testConfigurationGroupNames=e.labelForTestInState=e.TestExplorerViewSorting=e.TestExplorerViewMode=e.Testing=void 0;var b;(function(S){S.ViewletId="workbench.view.extension.test",S.ExplorerViewId="workbench.view.testing",S.OutputPeekContributionId="editor.contrib.testingOutputPeek",S.DecorationsContributionId="editor.contrib.testingDecorations",S.ResultsPanelId="workbench.panel.testResults",S.ResultsViewId="workbench.panel.testResults.view"})(b||(e.Testing=b={}));var D;(function(S){S.List="list",S.Tree="true"})(D||(e.TestExplorerViewMode=D={}));var T;(function(S){S.ByLocation="location",S.ByStatus="status",S.ByDuration="duration"})(T||(e.TestExplorerViewSorting=T={}));const f={[6]:(0,y.localize)(0,null),[4]:(0,y.localize)(1,null),[3]:(0,y.localize)(2,null),[1]:(0,y.localize)(3,null),[2]:(0,y.localize)(4,null),[5]:(0,y.localize)(5,null),[0]:(0,y.localize)(6,null)},v=(S,h)=>(0,y.localize)(7,null,(0,t.stripIcons)(S),f[h]);e.labelForTestInState=v,e.testConfigurationGroupNames={[4]:(0,y.localize)(8,null),[2]:(0,y.localize)(9,null),[8]:(0,y.localize)(10,null)};var m;(function(S){S.CancelTestRefreshAction="testing.cancelTestRefresh",S.CancelTestRunAction="testing.cancelRun",S.ClearTestResultsAction="testing.clearTestResults",S.CollapseAllAction="testing.collapseAll",S.ConfigureTestProfilesAction="testing.configureProfile",S.ContinousRunUsingForTest="testing.continuousRunUsingForTest",S.DebugAction="testing.debug",S.DebugAllAction="testing.debugAll",S.DebugAtCursor="testing.debugAtCursor",S.DebugCurrentFile="testing.debugCurrentFile",S.DebugFailedTests="testing.debugFailTests",S.DebugLastRun="testing.debugLastRun",S.DebugSelectedAction="testing.debugSelected",S.FilterAction="workbench.actions.treeView.testExplorer.filter",S.GetExplorerSelection="_testing.getExplorerSelection",S.GetSelectedProfiles="testing.getSelectedProfiles",S.GoToTest="testing.editFocusedTest",S.HideTestAction="testing.hideTest",S.OpenOutputPeek="testing.openOutputPeek",S.RefreshTestsAction="testing.refreshTests",S.ReRunFailedTests="testing.reRunFailTests",S.ReRunLastRun="testing.reRunLastRun",S.RunAction="testing.run",S.RunAllAction="testing.runAll",S.RunAtCursor="testing.runAtCursor",S.RunCurrentFile="testing.runCurrentFile",S.RunSelectedAction="testing.runSelected",S.RunUsingProfileAction="testing.runUsing",S.SearchForTestExtension="testing.searchForTestExtension",S.SelectDefaultTestProfiles="testing.selectDefaultTestProfiles",S.ShowMostRecentOutputAction="testing.showMostRecentOutput",S.StartContinousRun="testing.startContinuousRun",S.StopContinousRun="testing.stopContinuousRun",S.TestingSortByDurationAction="testing.sortByDuration",S.TestingSortByLocationAction="testing.sortByLocation",S.TestingSortByStatusAction="testing.sortByStatus",S.TestingViewAsListAction="testing.viewAsList",S.TestingViewAsTreeAction="testing.viewAsTree",S.ToggleContinousRunForTest="testing.toggleContinuousRunForTest",S.ToggleInlineTestOutput="testing.toggleInlineTestOutput",S.UnhideAllTestsAction="testing.unhideAllTests",S.UnhideTestAction="testing.unhideTest"})(m||(e.TestCommandId=m={}))}),define(Q[534],Y([1,0,6,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MutableObservableValue=e.staticObservableValue=void 0;const b=T=>({onDidChange:t.Event.None,value:T});e.staticObservableValue=b;class D extends y.Disposable{get value(){return this._value}set value(f){f!==this._value&&(this._value=f,this.changeEmitter.fire(f))}static stored(f,v){const m=new D(f.get(v));return m.onDidChange(S=>f.store(S)),m}constructor(f){super(),this._value=f,this.changeEmitter=this._register(new t.Emitter),this.onDidChange=this.changeEmitter.event}}e.MutableObservableValue=D}),define(Q[380],Y([1,0,4,24]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StoredValue=void 0;const b={deserialize:T=>JSON.parse(T),serialize:T=>JSON.stringify(T)};let D=class extends t.Disposable{constructor(f,v){super(),this.storage=v,this.key=f.key,this.scope=f.scope,this.target=f.target,this.serialization=f.serialization??b,this.onDidChange=this.storage.onDidChangeValue(this.scope,this.key,this._register(new t.DisposableStore))}get(f){if(this.value===void 0){const v=this.storage.get(this.key,this.scope);this.value=v===void 0?f:this.serialization.deserialize(v)}return this.value}store(f){this.value=f,this.storage.store(this.key,this.serialization.serialize(f),this.scope,this.target)}delete(){this.storage.remove(this.key,this.scope)}};e.StoredValue=D,e.StoredValue=D=fe([O(1,y.IStorageService)],D)}),define(Q[3643],Y([1,0,31,10]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileCoverage=e.TestCoverage=void 0;class b{constructor(f){this.accessor=f}async getAllFiles(f=t.CancellationToken.None){this.fileCoverage||(this.fileCoverage=this.accessor.provideFileCoverage(f));try{return await this.fileCoverage}catch(v){throw this.fileCoverage=void 0,v}}async getUri(f,v=t.CancellationToken.None){return(await this.getAllFiles(v)).find(S=>S.uri.toString()===f.toString())}}e.TestCoverage=b;class D{get tpc(){let f=this.statement.covered,v=this.statement.total;return this.branch&&(f+=this.branch.covered,v+=this.branch.total),this.function&&(f+=this.function.covered,v+=this.function.total),v===0?1:f/v}constructor(f,v,m){this.index=v,this.accessor=m,this.uri=y.URI.revive(f.uri),this.statement=f.statement,this.branch=f.branch,this.function=f.branch,this._details=f.details}async details(f=t.CancellationToken.None){this._details||(this._details=this.accessor.resolveFileCoverage(this.index,f));try{return await this._details}catch(v){throw this._details=void 0,v}}}e.FileCoverage=D}),define(Q[3644],Y([1,0,83,4,24,534,380]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestExclusions=void 0;let f=class extends y.Disposable{constructor(m){super(),this.storageService=m,this.excluded=this._register(D.MutableObservableValue.stored(this._register(new T.StoredValue({key:"excludedTestItems",scope:1,target:1,serialization:{deserialize:S=>new Set(JSON.parse(S)),serialize:S=>JSON.stringify([...S])}},this.storageService)),new Set)),this.onTestExclusionsChanged=this.excluded.onDidChange}get hasAny(){return this.excluded.value.size>0}get all(){return this.excluded.value}toggle(m,S){S!==!0&&this.excluded.value.has(m.item.extId)?this.excluded.value=new Set(t.Iterable.filter(this.excluded.value,h=>h!==m.item.extId)):S!==!1&&!this.excluded.value.has(m.item.extId)&&(this.excluded.value=new Set([...this.excluded.value,m.item.extId]))}contains(m){return this.excluded.value.has(m.item.extId)}clear(){this.excluded.value=new Set}};e.TestExclusions=f,e.TestExclusions=f=fe([O(0,b.IStorageService)],f)}),define(Q[235],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestId=e.TestPosition=e.TestIdPathParts=void 0;var t;(function(D){D.Delimiter="\0"})(t||(e.TestIdPathParts=t={}));var y;(function(D){D[D.IsSame=0]="IsSame",D[D.Disconnected=1]="Disconnected",D[D.IsChild=2]="IsChild",D[D.IsParent=3]="IsParent"})(y||(e.TestPosition=y={}));class b{static fromExtHostTestItem(T,f,v=T.parent){if(T._isRoot)return new b([f]);const m=[T.id];for(let S=v;S&&S.id!==f;S=S.parent)m.push(S.id);return m.push(f),new b(m.reverse())}static isRoot(T){return!T.includes("\0")}static root(T){const f=T.indexOf("\0");return f===-1?T:T.slice(0,f)}static fromString(T){return new b(T.split("\0"))}static join(T,f){return new b([...T.path,f])}static joinToString(T,f){return T.toString()+"\0"+f}static parentId(T){const f=T.lastIndexOf("\0");return f===-1?void 0:T.slice(0,f)}static localId(T){const f=T.lastIndexOf("\0");return f===-1?T:T.slice(f+1)}static isChild(T,f){return f.startsWith(T)&&f[T.length]==="\0"}static compare(T,f){return T===f?0:b.isChild(T,f)?2:b.isChild(f,T)?3:1}constructor(T,f=T.length){if(this.path=T,this.viewEnd=f,T.length===0||f<1)throw new Error("cannot create test with empty path")}get rootId(){return new b(this.path,1)}get parentId(){return this.viewEnd>1?new b(this.path,this.viewEnd-1):void 0}get localId(){return this.path[this.viewEnd-1]}get controllerId(){return this.path[0]}get isRoot(){return this.viewEnd===1}*idsFromRoot(){for(let T=1;T<=this.viewEnd;T++)yield new b(this.path,T)}*idsToRoot(){for(let T=this.viewEnd;T>0;T--)yield new b(this.path,T)}compare(T){if(typeof T=="string")return b.compare(this.toString(),T);for(let f=0;f<T.viewEnd&&f<this.viewEnd;f++)if(T.path[f]!==this.path[f])return 1;return T.viewEnd>this.viewEnd?2:T.viewEnd<this.viewEnd?3:0}toJSON(){return this.toString()}toString(){if(!this.stringifed){this.stringifed=this.path[0];for(let T=1;T<this.viewEnd;T++)this.stringifed+="\0",this.stringifed+=this.path[T]}return this.stringifed}}e.TestId=b}),define(Q[937],Y([1,0,235]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isCollapsedInSerializedTestTree=void 0;function y(b,D){D instanceof t.TestId||(D=t.TestId.fromString(D));let T=b;for(const f of D.path){if(!T.children?.hasOwnProperty(f))return;T=T.children[f]}return T.collapsed}e.isCollapsedInSerializedTestTree=y}),define(Q[358],Y([1,0,31,83,5,235]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.testsInFile=e.expandAndGetTestById=e.getContextForTestItem=e.testCollectionIsEmpty=e.ITestService=void 0,e.ITestService=(0,b.createDecorator)("testService");const T=h=>!y.Iterable.some(h.rootItems,a=>a.children.size>0);e.testCollectionIsEmpty=T;const f=(h,a)=>{if(typeof a=="string"&&(a=D.TestId.fromString(a)),a.isRoot)return{controller:a.toString()};const r={$mid:15,tests:[]};for(const i of a.idsFromRoot())if(!i.isRoot){const s=h.getNodeById(i.toString());s&&r.tests.push(s)}return r};e.getContextForTestItem=f;const v=async(h,a,r=t.CancellationToken.None)=>{const i=[...D.TestId.fromString(a).idsFromRoot()];let s=0;for(let o=i.length-1;!r.isCancellationRequested&&o>=s;){const u=i[o].toString(),d=h.getNodeById(u);if(!d){o--;continue}if(o===i.length-1)return d;d.children.has(i[o+1].toString())||await h.expand(u,0),s=o+1,o=i.length-1}};e.expandAndGetTestById=v;const m=(h,a)=>{if(a.item.busy)return new Promise(r=>{const i=h.onDidProcessDiff(()=>{h.collection.getNodeById(a.item.extId)?.item.busy!==!0&&(r(),i.dispose())})})},S=async function*(h,a,r,i=!0){for(const s of h.collection.all)s.item.uri&&(a.extUri.isEqual(r,s.item.uri)&&(yield s),a.extUri.isEqualOrParent(r,s.item.uri)&&(s.expand===1&&await h.collection.expand(s.item.extId,1),i&&await m(h,s)))};e.testsInFile=S}),define(Q[312],Y([1,0,10,27,235]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractIncrementalTestCollection=e.TestsDiffOp=e.TestDiffOpType=e.DetailType=e.TestResultItem=e.applyTestItemUpdate=e.ITestItemUpdate=e.InternalTestItem=e.TestItemExpandState=e.ITestItem=e.denamespaceTestTag=e.namespaceTestTag=e.ITestTaskState=e.ITestMessage=e.ITestOutputMessage=e.getMarkId=e.ITestErrorMessage=e.TestMessageType=e.IRichLocation=e.isStartControllerTests=e.testRunProfileBitsetList=e.TestRunProfileBitset=e.ExtTestRunProfileKind=e.TestResultState=void 0;var D;(function(A){A[A.Unset=0]="Unset",A[A.Queued=1]="Queued",A[A.Running=2]="Running",A[A.Passed=3]="Passed",A[A.Failed=4]="Failed",A[A.Skipped=5]="Skipped",A[A.Errored=6]="Errored"})(D||(e.TestResultState=D={}));var T;(function(A){A[A.Run=1]="Run",A[A.Debug=2]="Debug",A[A.Coverage=3]="Coverage"})(T||(e.ExtTestRunProfileKind=T={}));var f;(function(A){A[A.Run=2]="Run",A[A.Debug=4]="Debug",A[A.Coverage=8]="Coverage",A[A.HasNonDefaultProfile=16]="HasNonDefaultProfile",A[A.HasConfigurable=32]="HasConfigurable",A[A.SupportsContinuousRun=64]="SupportsContinuousRun"})(f||(e.TestRunProfileBitset=f={})),e.testRunProfileBitsetList=[2,4,8,16,32,64];const v=A=>"runId"in A;e.isStartControllerTests=v;var m;(function(A){A.serialize=k=>({range:k.range.toJSON(),uri:k.uri.toJSON()}),A.deserialize=k=>({range:y.Range.lift(k.range),uri:t.URI.revive(k.uri)})})(m||(e.IRichLocation=m={}));var S;(function(A){A[A.Error=0]="Error",A[A.Output=1]="Output"})(S||(e.TestMessageType=S={}));var h;(function(A){A.serialize=k=>({message:k.message,type:0,expected:k.expected,actual:k.actual,contextValue:k.contextValue,location:k.location&&m.serialize(k.location)}),A.deserialize=k=>({message:k.message,type:0,expected:k.expected,actual:k.actual,contextValue:k.contextValue,location:k.location&&m.deserialize(k.location)})})(h||(e.ITestErrorMessage=h={}));const a=(A,k)=>`${k?"s":"e"}${A}`;e.getMarkId=a;var r;(function(A){A.serialize=k=>({message:k.message,type:1,offset:k.offset,length:k.length,location:k.location&&m.serialize(k.location)}),A.deserialize=k=>({message:k.message,type:1,offset:k.offset,length:k.length,location:k.location&&m.deserialize(k.location)})})(r||(e.ITestOutputMessage=r={}));var i;(function(A){A.serialize=k=>k.type===0?h.serialize(k):r.serialize(k),A.deserialize=k=>k.type===0?h.deserialize(k):r.deserialize(k)})(i||(e.ITestMessage=i={}));var s;(function(A){A.serializeWithoutMessages=k=>({state:k.state,duration:k.duration,messages:[]}),A.serialize=k=>({state:k.state,duration:k.duration,messages:k.messages.map(i.serialize)}),A.deserialize=k=>({state:k.state,duration:k.duration,messages:k.messages.map(i.deserialize)})})(s||(e.ITestTaskState=s={}));const o="\0",u=(A,k)=>A+o+k;e.namespaceTestTag=u;const d=A=>{const k=A.indexOf(o);return{ctrlId:A.slice(0,k),tagId:A.slice(k+1)}};e.denamespaceTestTag=d;var p;(function(A){A.serialize=k=>({extId:k.extId,label:k.label,tags:k.tags,busy:k.busy,uri:k.uri?.toJSON(),range:k.range?.toJSON()||null,description:k.description,error:k.error,sortText:k.sortText}),A.deserialize=k=>({extId:k.extId,label:k.label,tags:k.tags,busy:k.busy,uri:k.uri?t.URI.revive(k.uri):void 0,range:k.range?y.Range.lift(k.range):null,description:k.description,error:k.error,sortText:k.sortText})})(p||(e.ITestItem=p={}));var c;(function(A){A[A.NotExpandable=0]="NotExpandable",A[A.Expandable=1]="Expandable",A[A.BusyExpanding=2]="BusyExpanding",A[A.Expanded=3]="Expanded"})(c||(e.TestItemExpandState=c={}));var l;(function(A){A.serialize=k=>({expand:k.expand,item:p.serialize(k.item)}),A.deserialize=k=>({controllerId:b.TestId.root(k.item.extId),expand:k.expand,item:p.deserialize(k.item)})})(l||(e.InternalTestItem=l={}));var n;(function(A){A.serialize=k=>{let L;return k.item&&(L={},k.item.label!==void 0&&(L.label=k.item.label),k.item.tags!==void 0&&(L.tags=k.item.tags),k.item.busy!==void 0&&(L.busy=k.item.busy),k.item.uri!==void 0&&(L.uri=k.item.uri?.toJSON()),k.item.range!==void 0&&(L.range=k.item.range?.toJSON()),k.item.description!==void 0&&(L.description=k.item.description),k.item.error!==void 0&&(L.error=k.item.error),k.item.sortText!==void 0&&(L.sortText=k.item.sortText)),{extId:k.extId,expand:k.expand,item:L}},A.deserialize=k=>{let L;return k.item&&(L={},k.item.label!==void 0&&(L.label=k.item.label),k.item.tags!==void 0&&(L.tags=k.item.tags),k.item.busy!==void 0&&(L.busy=k.item.busy),k.item.range!==void 0&&(L.range=k.item.range?y.Range.lift(k.item.range):null),k.item.description!==void 0&&(L.description=k.item.description),k.item.error!==void 0&&(L.error=k.item.error),k.item.sortText!==void 0&&(L.sortText=k.item.sortText)),{extId:k.extId,expand:k.expand,item:L}}})(n||(e.ITestItemUpdate=n={}));const g=(A,k)=>{k.expand!==void 0&&(A.expand=k.expand),k.item!==void 0&&(A.item=A.item?Object.assign(A.item,k.item):k.item)};e.applyTestItemUpdate=g;var w;(function(A){A.serializeWithoutMessages=k=>({...l.serialize(k),ownComputedState:k.ownComputedState,computedState:k.computedState,tasks:k.tasks.map(s.serializeWithoutMessages)}),A.serialize=k=>({...l.serialize(k),ownComputedState:k.ownComputedState,computedState:k.computedState,tasks:k.tasks.map(s.serialize)}),A.deserialize=k=>({...l.deserialize(k),ownComputedState:k.ownComputedState,computedState:k.computedState,tasks:k.tasks.map(s.deserialize),retired:!0})})(w||(e.TestResultItem=w={}));var E;(function(A){A[A.Function=0]="Function",A[A.Statement=1]="Statement"})(E||(e.DetailType=E={}));var C;(function(A){A[A.Add=0]="Add",A[A.Update=1]="Update",A[A.DocumentSynced=2]="DocumentSynced",A[A.Remove=3]="Remove",A[A.IncrementPendingExtHosts=4]="IncrementPendingExtHosts",A[A.Retire=5]="Retire",A[A.AddTag=6]="AddTag",A[A.RemoveTag=7]="RemoveTag"})(C||(e.TestDiffOpType=C={}));var I;(function(A){A.deserialize=k=>k.op===0?{op:k.op,item:l.deserialize(k.item)}:k.op===1?{op:k.op,item:n.deserialize(k.item)}:k.op===2?{op:k.op,uri:t.URI.revive(k.uri),docv:k.docv}:k,A.serialize=k=>k.op===0?{op:k.op,item:l.serialize(k.item)}:k.op===1?{op:k.op,item:n.serialize(k.item)}:k})(I||(e.TestsDiffOp=I={}));class _{constructor(){this._tags=new Map,this.items=new Map,this.roots=new Set,this.busyControllerCount=0,this.pendingRootCount=0,this.tags=this._tags}apply(k){const L=this.createChangeCollector();for(const R of k)switch(R.op){case 0:this.add(l.deserialize(R.item),L);break;case 1:this.update(n.deserialize(R.item),L);break;case 3:this.remove(R.itemId,L);break;case 5:this.retireTest(R.itemId);break;case 4:this.updatePendingRoots(R.amount);break;case 6:this._tags.set(R.tag.id,R.tag);break;case 7:this._tags.delete(R.id);break}L.complete?.()}add(k,L){const R=b.TestId.parentId(k.item.extId)?.toString();let M;if(!R)M=this.createItem(k),this.roots.add(M),this.items.set(k.item.extId,M);else if(this.items.has(R)){const N=this.items.get(R);N.children.add(k.item.extId),M=this.createItem(k,N),this.items.set(k.item.extId,M)}else{console.error(`Test with unknown parent ID: ${JSON.stringify(k)}`);return}return L.add?.(M),k.expand===2&&this.busyControllerCount++,M}update(k,L){const R=this.items.get(k.extId);if(R)return k.expand!==void 0&&(R.expand===2&&this.busyControllerCount--,k.expand===2&&this.busyControllerCount++),(0,e.applyTestItemUpdate)(R,k),L.update?.(R),R}remove(k,L){const R=this.items.get(k);if(!R)return;const M=b.TestId.parentId(R.item.extId)?.toString();M?this.items.get(M).children.delete(R.item.extId):this.roots.delete(R);const N=[[k]];for(;N.length;)for(const P of N.pop()){const x=this.items.get(P);x&&(N.push(x.children),this.items.delete(P),L.remove?.(x,x!==R),x.expand===2&&this.busyControllerCount--)}}retireTest(k){}updatePendingRoots(k){this.pendingRootCount+=k}createChangeCollector(){return{}}}e.AbstractIncrementalTestCollection=_}),define(Q[617],Y([1,0,299,6,83,937,312]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getChildrenForParent=e.testIdentityProvider=e.TestTreeErrorMessage=e.TestItemTreeElement=void 0;let f=0;const v=()=>String(f++);class m{constructor(r,i=null){this.test=r,this.parent=i,this.changeEmitter=new y.Emitter,this.onChange=this.changeEmitter.event,this.children=new Set,this.treeId=v(),this.depth=this.parent?this.parent.depth+1:0,this.retired=!1,this.state=0}toJSON(){if(this.depth===0)return{controllerId:this.test.controllerId};const r={$mid:15,tests:[T.InternalTestItem.serialize(this.test)]};for(let i=this.parent;i&&i.depth>0;i=i.parent)r.tests.unshift(T.InternalTestItem.serialize(i.test));return r}}e.TestItemTreeElement=m;class S{get description(){return typeof this.message=="string"?this.message:this.message.value}constructor(r,i){this.message=r,this.parent=i,this.treeId=v(),this.children=new Set}}e.TestTreeErrorMessage=S,e.testIdentityProvider={getId(a){return a.treeId+"\0"+(a instanceof S?"error":a.test.expand)}};const h=(a,r,i)=>{let s;if(i===null){const o=[...r];if(o.length===1)return(0,e.getChildrenForParent)(a,o,o[0]);s=o}else s=i.children;return b.Iterable.map(s,o=>o instanceof S?{element:o}:{element:o,collapsible:o.test.expand!==0,collapsed:(0,D.isCollapsedInSerializedTestTree)(a,o.test.item.extId)??o.depth>0?t.ObjectTreeElementCollapseState.PreserveOrCollapsed:t.ObjectTreeElementCollapseState.PreserveOrExpanded,children:(0,e.getChildrenForParent)(a,r,o)})};e.getChildrenForParent=h}),define(Q[3645],Y([1,0,90,617,235]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingObjectTree=void 0;class D extends t.WorkbenchObjectTree{getOptimizedViewState(f){const v=f||{},m=(S,h)=>{if(!(S.element instanceof y.TestItemTreeElement))return!1;const a=b.TestId.localId(S.element.test.item.extId),r=h.children?.[a]||{};r.collapsed=S.depth===0||!S.collapsed?S.collapsed:void 0;let i=r.collapsed!==void 0;if(S.children.length)for(const s of S.children)i=m(s,r)||i;return i?(h.children??={},h.children[a]=r):h.children?.hasOwnProperty(a)&&delete h.children[a],i};v.children??={};for(const S of this.getNode().children)if(S.element instanceof y.TestItemTreeElement)if(S.element.test.controllerId===S.element.test.item.extId)m(S,v);else{const h=v.children[S.element.test.controllerId]??={children:{}};m(S,h)}return v}}e.TestingObjectTree=D}),define(Q[3646],Y([1,0,6,83,312,69]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTestCollection=void 0;class T extends b.AbstractIncrementalTestCollection{get busyProviders(){return this.busyControllerCount}get rootItems(){return this.roots}get all(){return this.getIterator()}get rootIds(){return y.Iterable.map(this.roots.values(),v=>v.item.extId)}constructor(v){super(),this.expandActual=v,this.testsByUrl=new D.ResourceMap,this.busyProvidersChangeEmitter=new t.Emitter,this.expandPromises=new WeakMap,this.onBusyProvidersChange=this.busyProvidersChangeEmitter.event,this.changeCollector={add:m=>{if(!m.item.uri)return;const S=this.testsByUrl.get(m.item.uri);S?S.add(m):this.testsByUrl.set(m.item.uri,new Set([m]))},remove:m=>{if(!m.item.uri)return;const S=this.testsByUrl.get(m.item.uri);S&&(S.delete(m),S.size===0&&this.testsByUrl.delete(m.item.uri))}}}expand(v,m){const S=this.items.get(v);if(!S)return Promise.resolve();const h=this.expandPromises.get(S);if(h&&h.pendingLvl>=m)return h.prom;const a=this.expandActual(S.item.extId,m),r={doneLvl:h?h.doneLvl:-1,pendingLvl:m,prom:a};return this.expandPromises.set(S,r),a.then(()=>{r.doneLvl=m})}getNodeById(v){return this.items.get(v)}getNodeByUrl(v){return this.testsByUrl.get(v)||y.Iterable.empty()}getReviverDiff(){const v=[{op:4,amount:this.pendingRootCount}],m=[this.rootIds];for(;m.length;)for(const S of m.pop()){const h=this.items.get(S);v.push({op:0,item:{controllerId:h.controllerId,expand:h.expand,item:h.item}}),m.push(h.children)}return v}apply(v){const m=this.busyControllerCount;super.apply(v),m!==this.busyControllerCount&&this.busyProvidersChangeEmitter.fire(this.busyControllerCount)}clear(){const v=[];for(const m of this.roots)v.push({op:3,itemId:m.item.extId});return this.roots.clear(),this.items.clear(),v}createItem(v){return{...v,children:new Set}}createChangeCollector(){return this.changeCollector}*getIterator(){const v=[this.rootIds];for(;v.length;)for(const m of v.pop()){const S=this.getNodeById(m);yield S,v.push(S.children)}}}e.MainThreadTestCollection=T}),define(Q[739],Y([1,0,6,195,5,24,534,380,312]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestFilterTerm=e.TestExplorerFilterState=e.ITestExplorerFilterState=void 0,e.ITestExplorerFilterState=(0,b.createDecorator)("testingFilterState");const m=/!?@([^ ,:]+)/g,S=i=>i.replace(/\s\s+/g," ").trim();let h=class{constructor(s){this.storageService=s,this.focusEmitter=new t.Emitter,this.termFilterState={},this.globList=[],this.includeTags=new Set,this.excludeTags=new Set,this.text=new T.MutableObservableValue(""),this.fuzzy=T.MutableObservableValue.stored(new f.StoredValue({key:"testHistoryFuzzy",scope:0,target:0},this.storageService),!1),this.reveal=new T.MutableObservableValue(void 0),this.onDidRequestInputFocus=this.focusEmitter.event}focusInput(){this.focusEmitter.fire()}setText(s){if(s===this.text.value)return;this.termFilterState={},this.globList=[],this.includeTags.clear(),this.excludeTags.clear();let o="",u=0;for(const d of s.matchAll(m)){let p=d.index+d[0].length;const c=d[0];if(r.includes(c)&&(this.termFilterState[c]=!0),s[p]===":"){p++;let l=s[p];l!=='"'&&l!=="'"?l=" ":p++;let n="";for(;p<s.length&&s[p]!==l;)s[p]==="\\"?(n+=s[p+1],p+=2):(n+=s[p],p++);d[0].startsWith("!")?this.excludeTags.add((0,v.namespaceTestTag)(d[1],n)):this.includeTags.add((0,v.namespaceTestTag)(d[1],n)),p++}o+=s.slice(u,d.index),u=p}if(o+=s.slice(u).trim(),o.length)for(const d of(0,y.splitGlobAware)(o,",").map(p=>p.trim()).filter(p=>!!p.length))d.startsWith("!")?this.globList.push({include:!1,text:d.slice(1).toLowerCase()}):this.globList.push({include:!0,text:d.toLowerCase()});this.text.value=s}isFilteringFor(s){return!!this.termFilterState[s]}toggleFilteringFor(s,o){const u=this.text.value.trim();o!==!1&&!this.termFilterState[s]?this.setText(u?`${u} ${s}`:s):o!==!0&&this.termFilterState[s]&&this.setText(S(u.replace(s,"")))}};e.TestExplorerFilterState=h,e.TestExplorerFilterState=h=fe([O(0,D.IStorageService)],h);var a;(function(i){i.Failed="@failed",i.Executed="@executed",i.CurrentDoc="@doc",i.Hidden="@hidden"})(a||(e.TestFilterTerm=a={}));const r=["@failed","@executed","@doc","@hidden"]}),define(Q[3647],Y([1,0,14,6,4,214,312,235]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTestItemChildren=e.MixedTestItemController=e.InvalidTestItemError=e.DuplicateTestItemError=e.TestItemCollection=e.TestItemEventOp=void 0;var v;(function(d){d[d.Upsert=0]="Upsert",d[d.SetTags=1]="SetTags",d[d.UpdateCanResolveChildren=2]="UpdateCanResolveChildren",d[d.RemoveChild=3]="RemoveChild",d[d.SetProp=4]="SetProp",d[d.Bulk=5]="Bulk",d[d.DocumentSynced=6]="DocumentSynced"})(v||(e.TestItemEventOp=v={}));const m=(d,p)=>d===p,h=Object.entries({range:(d,p)=>d===p?!0:!d||!p?!1:d.equalsRange(p),busy:m,label:m,description:m,error:m,sortText:m,tags:(d,p)=>!(d.length!==p.length||d.some(c=>!p.includes(c)))}),a=(d,p)=>{let c;for(const[l,n]of h)n(d[l],p[l])||(c?c[l]=p[l]:c={[l]:p[l]});return c};class r extends b.Disposable{get root(){return this.options.root}constructor(p){super(),this.options=p,this.debounceSendDiff=this._register(new t.RunOnceScheduler(()=>this.flushDiff(),200)),this.diffOpEmitter=this._register(new y.Emitter),this.tree=new Map,this.tags=new Map,this.diff=[],this.onDidGenerateDiff=this.diffOpEmitter.event,this.root.canResolveChildren=!0,this.upsertItem(this.root,void 0)}set resolveHandler(p){this._resolveHandler=p;for(const c of this.tree.values())this.updateExpandability(c)}get resolveHandler(){return this._resolveHandler}collectDiff(){const p=this.diff;return this.diff=[],p}pushDiff(p){switch(p.op){case 2:{for(const c of this.diff)if(c.op===2&&c.uri===p.uri){c.docv=p.docv;return}break}case 1:{const c=this.diff[this.diff.length-1];if(c){if(c.op===1&&c.item.extId===p.item.extId){(0,T.applyTestItemUpdate)(c.item,p.item);return}if(c.op===0&&c.item.item.extId===p.item.extId){(0,T.applyTestItemUpdate)(c.item,p.item);return}}break}}this.diff.push(p),this.debounceSendDiff.isScheduled()||this.debounceSendDiff.schedule()}expand(p,c){const l=this.tree.get(p);if(l){if((l.expandLevels===void 0||c>l.expandLevels)&&(l.expandLevels=c),l.expand===1){const n=this.resolveChildren(l);return n.isOpen()?this.expandChildren(l,c-1):n.wait().then(()=>this.expandChildren(l,c-1))}else if(l.expand===3)return l.resolveBarrier?.isOpen()===!1?l.resolveBarrier.wait().then(()=>this.expandChildren(l,c-1)):this.expandChildren(l,c-1)}}dispose(){for(const p of this.tree.values())this.options.getApiFor(p.actual).listener=void 0;this.tree.clear(),this.diff=[],super.dispose()}onTestItemEvent(p,c){switch(c.op){case 3:this.removeItem(f.TestId.joinToString(p.fullId,c.id));break;case 0:this.upsertItem(c.item,p);break;case 5:for(const l of c.ops)this.onTestItemEvent(p,l);break;case 1:this.diffTagRefs(c.new,c.old,p.fullId.toString());break;case 2:this.updateExpandability(p);break;case 4:this.pushDiff({op:1,item:{extId:p.fullId.toString(),item:c.update}});break;case 6:this.documentSynced(p.actual.uri);break;default:(0,D.assertNever)(c)}}documentSynced(p){p&&this.pushDiff({op:2,uri:p,docv:this.options.getDocumentVersion(p)})}upsertItem(p,c){const l=f.TestId.fromExtHostTestItem(p,this.root.id,c?.actual),n=this.options.getApiFor(p);n.parent&&n.parent!==c?.actual&&this.options.getChildren(n.parent).delete(p.id);let g=this.tree.get(l.toString());if(!g){g={fullId:l,actual:p,expandLevels:c?.expandLevels?c.expandLevels-1:void 0,expand:0},p.tags.forEach(this.incrementTagRefs,this),this.tree.set(g.fullId.toString(),g),this.setItemParent(p,c),this.pushDiff({op:0,item:{controllerId:this.options.controllerId,expand:g.expand,item:this.options.toITestItem(p)}}),this.connectItemAndChildren(p,g,c);return}if(g.actual===p){this.connectItem(p,g,c);return}if(g.actual.uri?.toString()!==p.uri?.toString())return this.removeItem(l.toString()),this.upsertItem(p,c);const w=this.options.getChildren(g.actual),E=g.actual,C=a(this.options.toITestItem(E),this.options.toITestItem(p));this.options.getApiFor(E).listener=void 0,g.actual=p,g.expand=0,C&&(C.hasOwnProperty("tags")&&(this.diffTagRefs(p.tags,E.tags,l.toString()),delete C.tags),this.onTestItemEvent(g,{op:4,update:C})),this.connectItemAndChildren(p,g,c);for(const[I,_]of w)this.options.getChildren(p).get(_.id)||this.removeItem(f.TestId.joinToString(l,_.id));this.documentSynced(g.actual.uri)}diffTagRefs(p,c,l){const n=new Set(c.map(g=>g.id));for(const g of p)n.delete(g.id)||this.incrementTagRefs(g);this.pushDiff({op:1,item:{extId:l,item:{tags:p.map(g=>(0,T.namespaceTestTag)(this.options.controllerId,g.id))}}}),n.forEach(this.decrementTagRefs,this)}incrementTagRefs(p){const c=this.tags.get(p.id);c?c.refCount++:(this.tags.set(p.id,{refCount:1}),this.pushDiff({op:6,tag:{id:(0,T.namespaceTestTag)(this.options.controllerId,p.id)}}))}decrementTagRefs(p){const c=this.tags.get(p);c&&!--c.refCount&&(this.tags.delete(p),this.pushDiff({op:7,id:(0,T.namespaceTestTag)(this.options.controllerId,p)}))}setItemParent(p,c){this.options.getApiFor(p).parent=c&&c.actual!==this.root?c.actual:void 0}connectItem(p,c,l){this.setItemParent(p,l);const n=this.options.getApiFor(p);n.parent=l?.actual,n.listener=g=>this.onTestItemEvent(c,g),this.updateExpandability(c)}connectItemAndChildren(p,c,l){this.connectItem(p,c,l);for(const[n,g]of this.options.getChildren(p))this.upsertItem(g,c)}updateExpandability(p){let c;this._resolveHandler?p.resolveBarrier?c=p.resolveBarrier.isOpen()?3:2:c=p.actual.canResolveChildren?1:0:c=0,c!==p.expand&&(p.expand=c,this.pushDiff({op:1,item:{extId:p.fullId.toString(),expand:c}}),c===1&&p.expandLevels!==void 0&&this.resolveChildren(p))}expandChildren(p,c){if(c<0)return;const l=[];for(const[n,g]of this.options.getChildren(p.actual)){const w=this.expand(f.TestId.joinToString(p.fullId,g.id),c);(0,t.isThenable)(w)&&l.push(w)}if(l.length)return Promise.all(l).then(()=>{})}resolveChildren(p){if(p.resolveBarrier)return p.resolveBarrier;if(!this._resolveHandler){const g=new t.Barrier;return g.open(),g}p.expand=2,this.pushExpandStateUpdate(p);const c=p.resolveBarrier=new t.Barrier,l=g=>{console.error(`Unhandled error in resolveHandler of test controller "${this.options.controllerId}"`,g)};let n;try{n=this._resolveHandler(p.actual===this.root?void 0:p.actual)}catch(g){l(g)}return(0,t.isThenable)(n)?n.catch(l).then(()=>{c.open(),this.updateExpandability(p)}):(c.open(),this.updateExpandability(p)),p.resolveBarrier}pushExpandStateUpdate(p){this.pushDiff({op:1,item:{extId:p.fullId.toString(),expand:p.expand}})}removeItem(p){const c=this.tree.get(p);if(!c)throw new Error("attempting to remove non-existent child");this.pushDiff({op:3,itemId:p});const l=[c];for(;l.length;){const n=l.pop();if(n){this.options.getApiFor(n.actual).listener=void 0;for(const g of n.actual.tags)this.decrementTagRefs(g.id);this.tree.delete(n.fullId.toString());for(const[g,w]of this.options.getChildren(n.actual))l.push(this.tree.get(f.TestId.joinToString(n.fullId,w.id)))}}}flushDiff(){const p=this.collectDiff();p.length&&this.diffOpEmitter.fire(p)}}e.TestItemCollection=r;class i extends Error{constructor(p){super(`Attempted to insert a duplicate test item ID ${p}`)}}e.DuplicateTestItemError=i;class s extends Error{constructor(p){super(`TestItem with ID "${p}" is invalid. Make sure to create it from the createTestItem method.`)}}e.InvalidTestItemError=s;class o extends Error{constructor(p,c,l){super(`TestItem with ID "${p}" is from controller "${c}" and cannot be added as a child of an item from controller "${l}".`)}}e.MixedTestItemController=o;const u=(d,p,c)=>{let l=new Map;return{get size(){return l.size},forEach(n,g){for(const w of l.values())n.call(g,w,this)},[Symbol.iterator](){return l.entries()},replace(n){const g=new Map,w=new Set(l.keys()),E={op:5,ops:[]};for(const C of n){if(!(C instanceof c))throw new s(C.id);const I=p(C).controllerId;if(I!==d.controllerId)throw new o(C.id,I,d.controllerId);if(g.has(C.id))throw new i(C.id);g.set(C.id,C),w.delete(C.id),E.ops.push({op:0,item:C})}for(const C of w.keys())E.ops.push({op:3,id:C});d.listener?.(E),l=g},add(n){if(!(n instanceof c))throw new s(n.id);l.set(n.id,n),d.listener?.({op:0,item:n})},delete(n){l.delete(n)&&d.listener?.({op:3,id:n})},get(n){return l.get(n)},toJSON(){return Array.from(l.values())}}};e.createTestItemChildren=u}),define(Q[3648],Y([1,0,3647]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPrivateApiFor=e.createPrivateApiFor=void 0;const y=new WeakMap,b=(T,f)=>{const v={controllerId:f};return y.set(T,v),v};e.createPrivateApiFor=b;const D=T=>{const f=y.get(T);if(!f)throw new t.InvalidTestItemError(T?.id||"<unknown>");return f};e.getPrivateApiFor=D}),define(Q[381],Y([1,0,3008,8]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingContextKeys=void 0;var b;(function(D){D.providerCount=new y.RawContextKey("testing.providerCount",0),D.canRefreshTests=new y.RawContextKey("testing.canRefresh",!1,{type:"boolean",description:(0,t.localize)(0,null)}),D.isRefreshingTests=new y.RawContextKey("testing.isRefreshing",!1,{type:"boolean",description:(0,t.localize)(1,null)}),D.isContinuousModeOn=new y.RawContextKey("testing.isContinuousModeOn",!1,{type:"boolean",description:(0,t.localize)(2,null)}),D.hasDebuggableTests=new y.RawContextKey("testing.hasDebuggableTests",!1,{type:"boolean",description:(0,t.localize)(3,null)}),D.hasRunnableTests=new y.RawContextKey("testing.hasRunnableTests",!1,{type:"boolean",description:(0,t.localize)(4,null)}),D.hasCoverableTests=new y.RawContextKey("testing.hasCoverableTests",!1,{type:"boolean",description:(0,t.localize)(5,null)}),D.hasNonDefaultProfile=new y.RawContextKey("testing.hasNonDefaultProfile",!1,{type:"boolean",description:(0,t.localize)(6,null)}),D.hasConfigurableProfile=new y.RawContextKey("testing.hasConfigurableProfile",!1,{type:"boolean",description:(0,t.localize)(7,null)}),D.supportsContinuousRun=new y.RawContextKey("testing.supportsContinuousRun",!1,{type:"boolean",description:(0,t.localize)(8,null)}),D.isParentRunningContinuously=new y.RawContextKey("testing.isParentRunningContinuously",!1,{type:"boolean",description:(0,t.localize)(9,null)}),D.activeEditorHasTests=new y.RawContextKey("testing.activeEditorHasTests",!1,{type:"boolean",description:(0,t.localize)(10,null)}),D.capabilityToContextKey={[2]:D.hasRunnableTests,[8]:D.hasCoverableTests,[4]:D.hasDebuggableTests,[16]:D.hasNonDefaultProfile,[32]:D.hasConfigurableProfile,[64]:D.supportsContinuousRun},D.hasAnyResults=new y.RawContextKey("testing.hasAnyResults",!1),D.viewMode=new y.RawContextKey("testing.explorerViewMode","list"),D.viewSorting=new y.RawContextKey("testing.explorerViewSorting","location"),D.isRunning=new y.RawContextKey("testing.isRunning",!1),D.isInPeek=new y.RawContextKey("testing.isInPeek",!1),D.isPeekVisible=new y.RawContextKey("testing.isPeekVisible",!1),D.peekItemType=new y.RawContextKey("peekItemType",void 0,{type:"string",description:(0,t.localize)(11,null)}),D.controllerId=new y.RawContextKey("controllerId",void 0,{type:"string",description:(0,t.localize)(12,null)}),D.testItemExtId=new y.RawContextKey("testId",void 0,{type:"string",description:(0,t.localize)(13,null)}),D.testItemHasUri=new y.RawContextKey("testing.testItemHasUri",!1,{type:"boolean",description:(0,t.localize)(14,null)}),D.testItemIsHidden=new y.RawContextKey("testing.testItemIsHidden",!1,{type:"boolean",description:(0,t.localize)(15,null)}),D.testMessageContext=new y.RawContextKey("testMessage",void 0,{type:"string",description:(0,t.localize)(16,null)}),D.testResultOutdated=new y.RawContextKey("testResultOutdated",void 0,{type:"boolean",description:(0,t.localize)(17,null)})})(b||(e.TestingContextKeys=b={}))}),define(Q[359],Y([1,0,6,17,8,5,24,380,312,235,381]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestProfileService=e.capabilityContextKeys=e.canUseProfileWithTest=e.ITestProfileService=void 0,e.ITestProfileService=(0,D.createDecorator)("testProfileService");const h=(s,o)=>s.controllerId===o.controllerId&&(m.TestId.isRoot(o.item.extId)||!s.tag||o.item.tags.includes(s.tag));e.canUseProfileWithTest=h;const a=(s,o)=>s.isDefault!==o.isDefault?s.isDefault?-1:1:s.label.localeCompare(o.label),r=s=>[[S.TestingContextKeys.hasRunnableTests.key,(s&2)!==0],[S.TestingContextKeys.hasDebuggableTests.key,(s&4)!==0],[S.TestingContextKeys.hasCoverableTests.key,(s&8)!==0]];e.capabilityContextKeys=r;let i=class{constructor(o,u){this.changeEmitter=new t.Emitter,this.controllerProfiles=new Map,this.onDidChange=this.changeEmitter.event,this.preferredDefaults=new f.StoredValue({key:"testingPreferredProfiles",scope:1,target:1},u),this.capabilitiesContexts={[2]:S.TestingContextKeys.hasRunnableTests.bindTo(o),[4]:S.TestingContextKeys.hasDebuggableTests.bindTo(o),[8]:S.TestingContextKeys.hasCoverableTests.bindTo(o),[16]:S.TestingContextKeys.hasNonDefaultProfile.bindTo(o),[32]:S.TestingContextKeys.hasConfigurableProfile.bindTo(o),[64]:S.TestingContextKeys.supportsContinuousRun.bindTo(o)},this.refreshContextKeys()}addProfile(o,u){let d=this.controllerProfiles.get(u.controllerId);d?(d.profiles.push(u),d.profiles.sort(a)):(d={profiles:[u],controller:o},this.controllerProfiles.set(u.controllerId,d)),this.refreshContextKeys(),this.changeEmitter.fire()}updateProfile(o,u,d){const p=this.controllerProfiles.get(o);if(!p)return;const c=p.profiles.find(l=>l.controllerId===o&&l.profileId===u);c&&(Object.assign(c,d),p.profiles.sort(a),this.changeEmitter.fire())}configure(o,u){this.controllerProfiles.get(o)?.controller.configureRunProfile(u)}removeProfile(o,u){const d=this.controllerProfiles.get(o);if(!d)return;if(!u){this.controllerProfiles.delete(o),this.changeEmitter.fire();return}const p=d.profiles.findIndex(c=>c.profileId===u);p!==-1&&(d.profiles.splice(p,1),this.refreshContextKeys(),this.changeEmitter.fire())}capabilitiesForTest(o){const u=this.controllerProfiles.get(o.controllerId);if(!u)return 0;let d=0;for(const p of u.profiles)(!p.tag||o.item.tags.includes(p.tag))&&(d|=d&p.group?16:p.group);return d}all(){return this.controllerProfiles.values()}getControllerProfiles(o){return this.controllerProfiles.get(o)?.profiles??[]}getGroupDefaultProfiles(o){const u=this.preferredDefaults.get();if(!u)return this.getBaseDefaults(o);const d=u[o]?.map(p=>this.controllerProfiles.get(p.controllerId)?.profiles.find(c=>c.profileId===p.profileId&&c.group===o)).filter(y.isDefined);return d?.length?d:this.getBaseDefaults(o)}setGroupDefaultProfiles(o,u){const d={...this.preferredDefaults.get(),[o]:u.map(p=>({profileId:p.profileId,controllerId:p.controllerId}))};if(o===2||o===4){const p=o===2?4:2;let l=(d[p]||[]).slice();for(const[n,{profiles:g}]of this.controllerProfiles){const w=new Set(u.filter(C=>C.controllerId===n).map(C=>C.label)),E=g.filter(C=>w.has(C.label)&&C.group===p);E.length&&(l=l.filter(C=>C.controllerId!==n),l.push(...E.map(C=>({profileId:C.profileId,controllerId:C.controllerId}))))}d[p]=l}this.preferredDefaults.store(d),this.changeEmitter.fire()}getBaseDefaults(o){const u=[];for(const{profiles:d}of this.controllerProfiles.values()){const p=d.find(c=>c.group===o);p&&u.push(p)}return u}refreshContextKeys(){let o=0;for(const{profiles:u}of this.controllerProfiles.values())for(const d of u)o|=o&d.group?16:d.group,o|=d.supportsContinuousRun?64:0;for(const u of v.testRunProfileBitsetList)this.capabilitiesContexts[u].set((o&u)!==0)}};e.TestProfileService=i,e.TestProfileService=i=fe([O(0,b.IContextKeyService),O(1,T.IStorageService)],i)}),define(Q[938],Y([1,0,359,235,381]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTestItemContextOverlay=void 0;const D=(T,f)=>{if(!T)return[];const v=y.TestId.fromString(T.item.extId);return[[b.TestingContextKeys.testItemExtId.key,v.localId],[b.TestingContextKeys.controllerId.key,T.controllerId],[b.TestingContextKeys.testItemHasUri.key,!!T.item.uri],...(0,t.capabilityContextKeys)(f)]};e.getTestItemContextOverlay=D}),define(Q[3649],Y([1,0,20,17,2995,28,43,37,469,738,359]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function h(r,{onlyGroup:i,showConfigureButtons:s=!0,onlyForTest:o,onlyConfigurable:u,placeholder:d=(0,b.localize)(0,null)}){const p=r.get(S.ITestProfileService),c=[],l=(g,w)=>{for(const E of(0,t.groupBy)(g,(C,I)=>C.group-I.group)){let C=!1;if(i){if(E[0].group!==i)continue;C=!0}for(const I of E)u&&!I.hasConfigurationHandler||(C||(c.push({type:"separator",label:m.testConfigurationGroupNames[E[0].group]}),C=!0),c.push({type:"item",profile:I,label:I.label,description:w,alwaysShow:!0,buttons:I.hasConfigurationHandler&&s?[{iconClass:f.ThemeIcon.asClassName(v.testingUpdateProfiles),tooltip:(0,b.localize)(1,null)}]:[]}))}};if(o!==void 0)l(p.getControllerProfiles(o.controllerId).filter(g=>(0,S.canUseProfileWithTest)(g,o)));else for(const{profiles:g,controller:w}of p.all())l(g,w.label.value);const n=r.get(T.IQuickInputService).createQuickPick();return n.items=c,n.placeholder=d,n}const a=(r,i)=>s=>{const o=s.item.profile;o&&(r.configure(o.controllerId,o.profileId),i(void 0))};D.CommandsRegistry.registerCommand({id:"vscode.pickMultipleTestProfiles",handler:async(r,i)=>{const s=r.get(S.ITestProfileService),o=h(r,i);if(!o)return;o.canSelectMany=!0,i.selected&&(o.selectedItems=o.items.filter(d=>d.type==="item").filter(d=>i.selected.some(p=>p.controllerId===d.profile.controllerId&&p.profileId===d.profile.profileId)));const u=await new Promise(d=>{o.onDidAccept(()=>{const p=o.selectedItems;d(p.map(c=>c.profile).filter(y.isDefined))}),o.onDidHide(()=>d(void 0)),o.onDidTriggerItemButton(a(s,d)),o.show()});return o.dispose(),u}}),D.CommandsRegistry.registerCommand({id:"vscode.pickTestProfile",handler:async(r,i)=>{const s=r.get(S.ITestProfileService),o=h(r,i);if(!o)return;const u=await new Promise(d=>{o.onDidAccept(()=>d(o.selectedItems[0]?.profile)),o.onDidHide(()=>d(void 0)),o.onDidTriggerItemButton(a(s,d)),o.show()});return o.dispose(),u}})}),define(Q[939],Y([1,0,31,4,8,5,24,380,381,358,6,235,1030]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingContinuousRunService=e.ITestingContinuousRunService=void 0,e.ITestingContinuousRunService=(0,D.createDecorator)("testingContinuousRunService");let r=class extends y.Disposable{get lastRunProfileIds(){return this.lastRun.get(new Set)}constructor(s,o,u){super(),this.testService=s,this.changeEmitter=new S.Emitter,this.running=new a.WellDefinedPrefixTree,this.onDidChange=this.changeEmitter.event,this.isGloballyOn=v.TestingContextKeys.isContinuousModeOn.bindTo(u),this.lastRun=this._register(new f.StoredValue({key:"lastContinuousRunProfileIds",scope:1,target:1,serialization:{deserialize:d=>new Set(JSON.parse(d)),serialize:d=>JSON.stringify([...d])}},o)),this._register((0,y.toDisposable)(()=>{this.globallyRunning?.dispose();for(const d of this.running.values())d.dispose()}))}isSpecificallyEnabledFor(s){return this.running.size>0&&this.running.hasKey(h.TestId.fromString(s).path)}isEnabledForAParentOf(s){return this.globallyRunning?!0:this.running.size>0&&this.running.hasKeyOrParent(h.TestId.fromString(s).path)}isEnabledForAChildOf(s){return this.running.size>0&&this.running.hasKeyOrChildren(h.TestId.fromString(s).path)}isEnabled(){return!!this.globallyRunning||this.running.size>0}start(s,o){const u=new t.CancellationTokenSource;o===void 0&&this.isGloballyOn.set(!0),o?this.running.mutate(h.TestId.fromString(o).path,d=>(d?.dispose(!0),u)):(this.globallyRunning?.dispose(!0),this.globallyRunning=u),this.lastRun.store(new Set(s.map(d=>d.profileId))),this.testService.startContinuousRun({continuous:!0,targets:s.map(d=>({testIds:[o??d.controllerId],controllerId:d.controllerId,profileGroup:d.group,profileId:d.profileId}))},u.token),this.changeEmitter.fire(o)}stop(s){s?this.running.delete(h.TestId.fromString(s).path)?.dispose(!0):(this.globallyRunning?.dispose(!0),this.globallyRunning=void 0),s===void 0&&this.isGloballyOn.set(!1),this.changeEmitter.fire(s)}};e.TestingContinuousRunService=r,e.TestingContinuousRunService=r=fe([O(0,m.ITestService),O(1,T.IStorageService),O(2,b.IContextKeyService)],r)}),define(Q[1317],Y([1,0,20,5]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITestingDecorationsService=e.TestDecorations=void 0;class b{constructor(){this.value=[]}push(T){const f=(0,t.binarySearch)(this.value,T,(v,m)=>v.line-m.line);this.value.splice(f<0?~f:f,0,T)}*lines(){if(!this.value.length)return;let T=0,f=this.value[0].line;for(let v=1;v<this.value.length;v++){const m=this.value[v];m.line!==f&&(yield[f,this.value.slice(T,v)],f=m.line,T=v)}yield[f,this.value.slice(T)]}}e.TestDecorations=b,e.ITestingDecorationsService=(0,y.createDecorator)("testingDecorationService")}),define(Q[618],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITestingPeekOpener=void 0,e.ITestingPeekOpener=(0,t.createDecorator)("testingPeekOpener")}),define(Q[471],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makeEmptyCounts=e.terminalStatePriorities=e.statesInOrder=e.maxPriority=e.cmpPriority=e.stateNodes=e.isStateWithResult=e.isFailedState=e.statePriority=void 0,e.statePriority={[2]:6,[6]:5,[4]:4,[1]:3,[3]:2,[0]:0,[5]:1};const t=f=>f===6||f===4;e.isFailedState=t;const y=f=>f===6||f===4||f===3;e.isStateWithResult=y,e.stateNodes=Object.entries(e.statePriority).reduce((f,[v,m])=>{const S=Number(v);return f[S]={statusNode:!0,state:S,priority:m},f},{});const b=(f,v)=>e.statePriority[v]-e.statePriority[f];e.cmpPriority=b;const D=(...f)=>{switch(f.length){case 0:return 0;case 1:return f[0];case 2:return e.statePriority[f[0]]>e.statePriority[f[1]]?f[0]:f[1];default:{let v=f[0];for(let m=1;m<f.length;m++)e.statePriority[v]<e.statePriority[f[m]]&&(v=f[m]);return v}}};e.maxPriority=D,e.statesInOrder=Object.keys(e.statePriority).map(f=>Number(f)).sort(e.cmpPriority),e.terminalStatePriorities={[3]:0,[5]:1,[4]:2,[6]:3};const T=()=>new Uint32Array(e.statesInOrder.length);e.makeEmptyCounts=T}),define(Q[1318],Y([1,0,83,471]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.refreshComputedState=void 0;const b=S=>"getOwnDuration"in S,D=(S,h,a=!1)=>{let r=S.getCurrentComputedState(h);if(r===void 0||a){r=S.getOwnState(h)??0;let i=0;const s=(0,y.makeEmptyCounts)();for(const o of S.getChildren(h)){const u=D(S,o);i++,s[u]++,r=u===5&&r===0?5:(0,y.maxPriority)(r,u)}i>f&&v.set(h,s),S.setComputedState(h,r)}return r},T=(S,h,a=!1)=>{let r=S.getCurrentComputedDuration(h);if(r===void 0||a){const i=S.getOwnDuration(h);if(i!==void 0)r=i;else{r=void 0;for(const s of S.getChildren(h)){const o=T(S,s);o!==void 0&&(r=(r||0)+o)}}S.setComputedDuration(h,r)}return r},f=64,v=new WeakMap,m=(S,h,a,r=!0)=>{const i=S.getCurrentComputedState(h),s=y.statePriority[i],o=a??D(S,h,!0),u=y.statePriority[o],d=new Set;if(u!==s){S.setComputedState(h,o),d.add(h);let p=i,c=o;for(const l of S.getParents(h)){const n=v.get(l);n&&(n[p]--,n[c]++);const g=S.getCurrentComputedState(l);if(u>s){if(g!==void 0&&y.statePriority[g]>=u||n&&n[c]>1)break;S.setComputedState(l,o),d.add(l)}else{if(g===void 0||y.statePriority[g]>s||n&&n[p]>0)break;c=D(S,l,!0),S.setComputedState(l,c),d.add(l)}p=g}}if(b(S)&&r)for(const p of t.Iterable.concat(t.Iterable.single(h),S.getParents(h))){const c=S.getCurrentComputedDuration(p),l=T(S,p,!0);if(c===l)break;S.setComputedDuration(p,l),d.add(p)}return d};e.refreshComputedState=m}),define(Q[535],Y([1,0,14,62,6,203,18,33,3005,1318,534,235,471,312]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HydratedTestResult=e.LiveTestResult=e.TestResultItemChangeReason=e.maxCountPriority=e.resultItemParents=e.TaskRawOutput=void 0;const i={buffers:[],length:0,onDidWriteData:b.Event.None,endPromise:Promise.resolve(),getRange:()=>y.VSBuffer.alloc(0),getRangeIter:()=>[]};class s{constructor(){this.writeDataEmitter=new b.Emitter,this.endDeferred=new t.DeferredPromise,this.offset=0,this.onDidWriteData=this.writeDataEmitter.event,this.endPromise=this.endDeferred.p,this.buffers=[]}get length(){return this.offset}getRange(w,E){const C=y.VSBuffer.alloc(E);let I=0;for(const _ of this.getRangeIter(w,E))C.buffer.set(_.buffer,I),I+=_.byteLength;return I<E?C.slice(0,I):C}*getRangeIter(w,E){let C=0,I=0;for(const _ of this.buffers){if(I+_.byteLength<=w){I+=_.byteLength;continue}const A=Math.max(0,w-I),k=Math.min(_.byteLength,A+E-C);if(yield _.slice(A,k),C+=k-A,I+=_.byteLength,C===E)break}}append(w,E){const C=this.offset;let I=w.byteLength;if(E===void 0)return this.push(w),{offset:C,length:I};let _;(function(R){R[R.CR=13]="CR",R[R.LF=10]="LF"})(_||(_={}));const A=y.VSBuffer.fromString(d(E,!0)),k=y.VSBuffer.fromString(d(E,!1));I+=A.byteLength+k.byteLength,this.push(A);let L=w.byteLength;for(;L>0;L--){const R=w.buffer[L-1];if(R!==13&&R!==10)break}return this.push(w.slice(0,L)),this.push(k),this.push(w.slice(L)),{offset:C,length:I}}push(w){w.byteLength!==0&&(this.buffers.push(w),this.writeDataEmitter.fire(w),this.offset+=w.byteLength)}end(){this.endDeferred.complete()}}e.TaskRawOutput=s;const o=function*(g,w){for(const E of h.TestId.fromString(w.item.extId).idsToRoot())yield g.getStateById(E.toString())};e.resultItemParents=o;const u=g=>{for(const w of a.statesInOrder)if(g[w]>0)return w;return 0};e.maxCountPriority=u;const d=(g,w)=>`\x1B]633;SetMark;Id=${(0,r.getMarkId)(g,w)};Hidden\x07`,p=(g,w,E)=>({controllerId:g,expand:0,item:{...w},children:[],tasks:[],ownComputedState:0,computedState:0});var c;(function(g){g[g.ComputedStateChange=0]="ComputedStateChange",g[g.OwnStateChange=1]="OwnStateChange",g[g.NewMessage=2]="NewMessage"})(c||(e.TestResultItemChangeReason=c={}));class l{get completedAt(){return this._completedAt}get tests(){return this.testById.values()}constructor(w,E,C){this.id=w,this.persist=E,this.request=C,this.completeEmitter=new b.Emitter,this.newTaskEmitter=new b.Emitter,this.endTaskEmitter=new b.Emitter,this.changeEmitter=new b.Emitter,this.testById=new Map,this.testMarkerCounter=0,this.startedAt=Date.now(),this.onChange=this.changeEmitter.event,this.onComplete=this.completeEmitter.event,this.onNewTask=this.newTaskEmitter.event,this.onEndTask=this.endTaskEmitter.event,this.tasks=[],this.name=(0,v.localize)(0,null,new Date().toLocaleString(T.language)),this.counts=(0,a.makeEmptyCounts)(),this.computedStateAccessor={getOwnState:I=>I.ownComputedState,getCurrentComputedState:I=>I.computedState,setComputedState:(I,_)=>I.computedState=_,getChildren:I=>I.children,getParents:I=>{const{testById:_}=this;return function*(){const A=h.TestId.fromString(I.item.extId).parentId;if(A)for(const k of A.idsToRoot())yield _.get(k.toString())}()}},this.doSerialize=new D.Lazy(()=>({id:this.id,completedAt:this.completedAt,tasks:this.tasks.map(I=>({id:I.id,name:I.name})),name:this.name,request:this.request,items:[...this.testById.values()].map(r.TestResultItem.serializeWithoutMessages)})),this.doSerializeWithMessages=new D.Lazy(()=>({id:this.id,completedAt:this.completedAt,tasks:this.tasks.map(I=>({id:I.id,name:I.name})),name:this.name,request:this.request,items:[...this.testById.values()].map(r.TestResultItem.serialize)}))}getStateById(w){return this.testById.get(w)}appendOutput(w,E,C,I){const _=w.byteLength>100?w.slice(0,100).toString()+"\u2026":w.toString();let A;(I||C)&&(A=this.testMarkerCounter++);const k=this.mustGetTaskIndex(E),L=this.tasks[k],{offset:R,length:M}=L.output.append(w,A),N={location:C,message:(0,f.removeAnsiEscapeCodes)(_),offset:R,length:M,marker:A,type:1},P=I&&this.testById.get(I);P?(P.tasks[k].messages.push(N),this.changeEmitter.fire({item:P,result:this,reason:2,message:N})):L.otherMessages.push(N)}addTask(w){this.tasks.push({...w,coverage:new S.MutableObservableValue(void 0),otherMessages:[],output:new s});for(const E of this.tests)E.tasks.push({duration:void 0,messages:[],state:0});this.newTaskEmitter.fire(this.tasks.length-1)}addTestChainToRun(w,E){let C=this.testById.get(E[0].extId);C||(C=this.addTestToRun(w,E[0],null));for(let I=1;I<E.length;I++)C=this.addTestToRun(w,E[I],C.item.extId)}updateState(w,E,C,I){const _=this.testById.get(w);if(!_)return;const A=this.mustGetTaskIndex(E),k=a.terminalStatePriorities[_.tasks[A].state],L=a.terminalStatePriorities[C];k!==void 0&&(L===void 0||L<k)||this.fireUpdateAndRefresh(_,A,C,I)}appendMessage(w,E,C){const I=this.testById.get(w);I&&(I.tasks[this.mustGetTaskIndex(E)].messages.push(C),this.changeEmitter.fire({item:I,result:this,reason:2,message:C}))}markTaskComplete(w){const E=this.mustGetTaskIndex(w),C=this.tasks[E];C.running=!1,C.output.end(),this.setAllToState(0,w,I=>I.state===1||I.state===2),this.endTaskEmitter.fire(E)}markComplete(){if(this._completedAt!==void 0)throw new Error("cannot complete a test result multiple times");for(const w of this.tasks)w.running&&this.markTaskComplete(w.id);this._completedAt=Date.now(),this.completeEmitter.fire()}markRetired(w){for(const[E,C]of this.testById)!C.retired&&(!w||w.hasKeyOrParent(h.TestId.fromString(E).path))&&(C.retired=!0,this.changeEmitter.fire({reason:0,item:C,result:this}))}toJSON(){return this.completedAt&&this.persist?this.doSerialize.value:void 0}toJSONWithMessages(){return this.completedAt&&this.persist?this.doSerializeWithMessages.value:void 0}setAllToState(w,E,C){const I=this.mustGetTaskIndex(E);for(const _ of this.testById.values())C(_.tasks[I],_)&&this.fireUpdateAndRefresh(_,I,w)}fireUpdateAndRefresh(w,E,C,I){const _=w.ownComputedState,A=w.ownDuration,k={item:w,result:this,reason:1,previousState:_,previousOwnDuration:A};w.tasks[E].state=C,I!==void 0&&(w.tasks[E].duration=I,w.ownDuration=Math.max(w.ownDuration||0,I));const L=(0,a.maxPriority)(...w.tasks.map(R=>R.state));if(L===_){I!==A&&this.changeEmitter.fire(k);return}w.ownComputedState=L,this.counts[_]--,this.counts[L]++,(0,m.refreshComputedState)(this.computedStateAccessor,w).forEach(R=>this.changeEmitter.fire(R===w?k:{item:R,result:this,reason:0}))}addTestToRun(w,E,C){const I=p(w,E,C);if(this.testById.set(E.extId,I),this.counts[0]++,C&&this.testById.get(C)?.children.push(I),this.tasks.length)for(let _=0;_<this.tasks.length;_++)I.tasks.push({duration:void 0,messages:[],state:0});return I}mustGetTaskIndex(w){const E=this.tasks.findIndex(C=>C.id===w);if(E===-1)throw new Error(`Unknown task ${w} in updateState`);return E}}e.LiveTestResult=l;class n{get tests(){return this.testById.values()}constructor(w,E=!0){this.serialized=w,this.persist=E,this.counts=(0,a.makeEmptyCounts)(),this.testById=new Map,this.id=w.id,this.completedAt=w.completedAt,this.tasks=w.tasks.map((C,I)=>({id:C.id,name:C.name,running:!1,coverage:(0,S.staticObservableValue)(void 0),output:i,otherMessages:[]})),this.name=w.name,this.request=w.request;for(const C of w.items){const I=r.TestResultItem.deserialize(C);this.counts[I.ownComputedState]++,this.testById.set(C.item.extId,I)}}getStateById(w){return this.testById.get(w)}toJSON(){return this.persist?this.serialized:void 0}toJSONWithMessages(){return this.toJSON()}}e.HydratedTestResult=n}),define(Q[1319],Y([1,0,62,17,10,91,25,5,11,24,39,380,535]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestResultStorage=e.InMemoryResultStorage=e.BaseTestResultStorage=e.ITestResultStorage=e.RETAIN_MAX_RESULTS=void 0,e.RETAIN_MAX_RESULTS=128;const r=16,i=1024*128,s=.2;e.ITestResultStorage=(0,f.createDecorator)("ITestResultStorage");const o=1;let u=class{constructor(l,n){this.storageService=l,this.logService=n,this.stored=new h.StoredValue({key:"storedTestResults",scope:1,target:1},this.storageService)}async read(){return(await Promise.all(this.stored.get([]).map(async({id:n,rev:g})=>{if(g===o)try{const w=await this.readForResultId(n);return w?new a.HydratedTestResult(w):void 0}catch(w){this.logService.warn(`Error deserializing stored test result ${n}`,w);return}}))).filter(y.isDefined)}getResultOutputWriter(l){const n=(0,t.newWriteableBufferStream)();return this.storeOutputForResultId(l,n),n}async persist(l){const n=new Map(this.stored.get([]).map(({id:C,bytes:I})=>[C,I])),g=[],w=[];let E=i;for(let C=0;C<l.length&&C<e.RETAIN_MAX_RESULTS&&(E>0||g.length<r);C++){const I=l[C],_=n.get(I.id);if(_!==void 0){n.delete(I.id),g.push({id:I.id,rev:o,bytes:_}),E-=_;continue}const A=I.toJSON();if(!A)continue;const k=t.VSBuffer.fromString(JSON.stringify(A));w.push(this.storeForResultId(I.id,A)),g.push({id:I.id,rev:o,bytes:k.byteLength}),E-=k.byteLength}for(const C of n.keys())w.push(this.deleteForResultId(C).catch(()=>{}));this.stored.store(g),await Promise.all(w)}};e.BaseTestResultStorage=u,e.BaseTestResultStorage=u=fe([O(0,m.IStorageService),O(1,v.ILogService)],u);class d extends u{constructor(){super(...arguments),this.cache=new Map}async readForResultId(l){return Promise.resolve(this.cache.get(l))}storeForResultId(l,n){return this.cache.set(l,n),Promise.resolve()}deleteForResultId(l){return this.cache.delete(l),Promise.resolve()}readOutputForResultId(l){throw new Error("Method not implemented.")}storeOutputForResultId(l,n){throw new Error("Method not implemented.")}readOutputRangeForResultId(l,n,g){throw new Error("Method not implemented.")}}e.InMemoryResultStorage=d;let p=class extends u{constructor(l,n,g,w,E){super(l,n),this.fileService=w,this.directory=b.URI.joinPath(E.workspaceStorageHome,g.getWorkspace().id,"testResults")}async readForResultId(l){const n=await this.fileService.readFile(this.getResultJsonPath(l));return JSON.parse(n.value.toString())}storeForResultId(l,n){return this.fileService.writeFile(this.getResultJsonPath(l),t.VSBuffer.fromString(JSON.stringify(n)))}deleteForResultId(l){return this.fileService.del(this.getResultJsonPath(l)).catch(()=>{})}async readOutputRangeForResultId(l,n,g){try{const{value:w}=await this.fileService.readFile(this.getResultOutputPath(l),{position:n,length:g});return w}catch{return t.VSBuffer.alloc(0)}}async readOutputForResultId(l){try{const{value:n}=await this.fileService.readFileStream(this.getResultOutputPath(l));return n}catch{return(0,t.bufferToStream)(t.VSBuffer.alloc(0))}}async storeOutputForResultId(l,n){await this.fileService.createFile(this.getResultOutputPath(l),n)}async persist(l){await super.persist(l),Math.random()<s&&await this.cleanupDereferenced()}async cleanupDereferenced(){const{children:l}=await this.fileService.resolve(this.directory);if(!l)return;const n=new Set(this.stored.get([]).filter(g=>g.rev===o).map(g=>g.id));await Promise.all(l.filter(g=>!n.has(g.name.replace(/\.[a-z]+$/,""))).map(g=>this.fileService.del(g.resource).catch(()=>{})))}getResultJsonPath(l){return b.URI.joinPath(this.directory,`${l}.json`)}getResultOutputPath(l){return b.URI.joinPath(this.directory,`${l}.output`)}};e.TestResultStorage=p,e.TestResultStorage=p=fe([O(0,m.IStorageService),O(1,v.ILogService),O(2,S.IWorkspaceContextService),O(3,T.IFileService),O(4,D.IEnvironmentService)],p)}),define(Q[334],Y([1,0,20,14,6,202,59,8,5,381,359,535,1319]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestResultService=e.ITestResultService=void 0;const r=s=>s.results.length>0&&s.results[0].completedAt===void 0;e.ITestResultService=(0,v.createDecorator)("testResultService");let i=class{get results(){return this.loadResults(),this._results}constructor(o,u,d){this.storage=u,this.testProfiles=d,this.changeResultEmitter=new b.Emitter,this._results=[],this.testChangeEmitter=new b.Emitter,this.onResultsChanged=this.changeResultEmitter.event,this.onTestChanged=this.testChangeEmitter.event,this.loadResults=(0,D.once)(()=>this.storage.read().then(p=>{for(let c=p.length-1;c>=0;c--)this.push(p[c])})),this.persistScheduler=new y.RunOnceScheduler(()=>this.persistImmediately(),500),this.isRunning=m.TestingContextKeys.isRunning.bindTo(o),this.hasAnyResults=m.TestingContextKeys.hasAnyResults.bindTo(o)}getStateById(o){for(const u of this.results){const d=u.getStateById(o);if(d&&d.computedState!==0)return[u,d]}}createLiveResult(o){if("targets"in o){const p=(0,T.generateUuid)();return this.push(new h.LiveTestResult(p,!0,o))}let u;o.profile&&(u=this.testProfiles.getControllerProfiles(o.controllerId).find(c=>c.profileId===o.profile.id));const d={isUiTriggered:!1,targets:[],exclude:o.exclude,continuous:o.continuous};return u&&d.targets.push({profileGroup:u.group,profileId:u.profileId,controllerId:o.controllerId,testIds:o.include}),this.push(new h.LiveTestResult(o.id,o.persist,d))}push(o){if(o.completedAt===void 0)this.results.unshift(o);else{const u=(0,t.findFirstInSorted)(this.results,d=>d.completedAt!==void 0&&d.completedAt<=o.completedAt);this.results.splice(u,0,o),this.persistScheduler.schedule()}if(this.hasAnyResults.set(!0),this.results.length>a.RETAIN_MAX_RESULTS&&this.results.pop(),o instanceof h.LiveTestResult)o.onComplete(()=>this.onComplete(o)),o.onChange(this.testChangeEmitter.fire,this.testChangeEmitter),this.isRunning.set(!0),this.changeResultEmitter.fire({started:o});else{this.changeResultEmitter.fire({inserted:o});for(const u of o.tests)for(const d of this.results)if(d===o){this.testChangeEmitter.fire({item:u,result:o,reason:0});break}else if(d.getStateById(u.item.extId)!==void 0)break}return o}getResult(o){return this.results.find(u=>u.id===o)}clear(){const o=[],u=[];for(const d of this.results)d.completedAt!==void 0?u.push(d):o.push(d);this._results=o,this.persistScheduler.schedule(),o.length===0&&this.hasAnyResults.set(!1),this.changeResultEmitter.fire({removed:u})}onComplete(o){this.resort(),this.updateIsRunning(),this.persistScheduler.schedule(),this.changeResultEmitter.fire({completed:o})}resort(){this.results.sort((o,u)=>(u.completedAt??Number.MAX_SAFE_INTEGER)-(o.completedAt??Number.MAX_SAFE_INTEGER))}updateIsRunning(){this.isRunning.set(r(this))}async persistImmediately(){await this.loadResults(),this.storage.persist(this.results)}};e.TestResultService=i,e.TestResultService=i=fe([O(0,f.IContextKeyService),O(1,a.ITestResultStorage),O(2,S.ITestProfileService)],i)}),define(Q[3650],Y([1,0,6,83,4,1315,617,937,235,334,358,312]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListProjection=void 0;class a extends T.TestItemTreeElement{get description(){return this.chain.map(s=>s.item.label).join(D.flatTestItemDelimiter)}constructor(s,o,u){super({...s,item:{...s.item}},o),this.chain=u,this.descriptionParts=[],this.updateErrorVisibility()}update(s){(0,h.applyTestItemUpdate)(this.test,s),this.updateErrorVisibility(s),this.fireChange()}fireChange(){this.changeEmitter.fire()}updateErrorVisibility(s){this.errorChild&&(!this.test.item.error||s?.item?.error)&&(this.children.delete(this.errorChild),this.errorChild=void 0),this.test.item.error&&!this.errorChild&&(this.errorChild=new T.TestTreeErrorMessage(this.test.item.error,this),this.children.add(this.errorChild))}}let r=class extends b.Disposable{get rootsWithChildren(){const s=y.Iterable.map(this.testService.collection.rootItems,o=>this.items.get(o.item.extId));return y.Iterable.filter(s,o=>!!o?.children.size)}constructor(s,o,u){super(),this.lastState=s,this.testService=o,this.results=u,this.updateEmitter=new t.Emitter,this.items=new Map,this.onUpdate=this.updateEmitter.event,this._register(o.onDidProcessDiff(d=>this.applyDiff(d))),this._register(u.onResultsChanged(d=>{if("removed"in d)for(const p of this.items.values()){const c=this.results.getStateById(p.test.item.extId)?.[1];p.duration=c?.ownDuration,p.state=c?.ownComputedState||0,p.fireChange()}})),this._register(u.onTestChanged(d=>{if(d.reason===2)return;let p=d.item;if(p.ownComputedState===0||d.result!==u.results[0]){const l=u.getStateById(p.item.extId);l&&(p=l[1])}const c=this.items.get(p.item.extId);c&&(c.retired=!!p.retired,c.state=p.computedState,c.duration=p.ownDuration,c.fireChange())}));for(const d of o.collection.all)this.storeItem(d)}getElementByTestId(s){return this.items.get(s)}applyDiff(s){for(const o of s)switch(o.op){case 0:{this.storeItem(o.item);break}case 1:{this.items.get(o.item.extId)?.update(o.item);break}case 3:{for(const[u,d]of this.items)(u===o.itemId||v.TestId.isChild(o.itemId,u))&&this.unstoreItem(d);break}}s.length!==0&&this.updateEmitter.fire()}applyTo(s){s.setChildren(null,(0,T.getChildrenForParent)(this.lastState,this.rootsWithChildren,null),{diffIdentityProvider:T.testIdentityProvider,diffDepth:1/0})}expandElement(s,o){s instanceof a&&s.test.expand!==0&&this.testService.collection.expand(s.test.item.extId,o)}unstoreItem(s){this.items.delete(s.test.item.extId),s.parent?.children.delete(s);const o=v.TestId.fromString(s.test.item.extId).parentId;if(o)for(const u of o.idsToRoot()){const d=this.testService.collection.getNodeById(u.toString());if(d){d.children.size===0&&!this.items.has(u.toString())&&this._storeItem(o,d);break}}}_storeItem(s,o){const u=s.isRoot?null:this.items.get(o.controllerId),d=[...s.idsFromRoot()].slice(1,-1).map(l=>this.testService.collection.getNodeById(l.toString())),p=new a(o,u,d);u?.children.add(p),this.items.set(p.test.item.extId,p),(p.depth===0||(0,f.isCollapsedInSerializedTestTree)(this.lastState,p.test.item.extId)===!1)&&this.expandElement(p,1/0);const c=this.results.getStateById(p.test.item.extId)?.[1];c&&(p.retired=!!c.retired,p.state=c.computedState,p.duration=c.ownDuration)}storeItem(s){const o=v.TestId.fromString(s.item.extId);for(const u of o.idsToRoot())if(!u.isRoot){const d=this.items.get(u.toString());if(d){this.unstoreItem(d);break}}this._storeItem(o,s)}};e.ListProjection=r,e.ListProjection=r=fe([O(1,S.ITestService),O(2,m.ITestResultService)],r)}),define(Q[3651],Y([1,0,6,83,4,617,937,1318,235,334,358,312]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeProjection=void 0;const a={getOwnState:s=>s instanceof D.TestItemTreeElement?s.ownState:0,getCurrentComputedState:s=>s.state,setComputedState:(s,o)=>s.state=o,getCurrentComputedDuration:s=>s.duration,getOwnDuration:s=>s instanceof D.TestItemTreeElement?s.ownDuration:void 0,setComputedDuration:(s,o)=>s.duration=o,getChildren:s=>y.Iterable.filter(s.children.values(),o=>o instanceof r),*getParents(s){for(let o=s.parent;o;o=o.parent)yield o}};class r extends D.TestItemTreeElement{get description(){return this.test.item.description}constructor(o,u,d){super({...o,item:{...o.item}},u),this.addedOrRemoved=d,this.ownState=0,this.updateErrorVisibility()}update(o){(0,h.applyTestItemUpdate)(this.test,o),this.updateErrorVisibility(o),this.fireChange()}fireChange(){this.changeEmitter.fire()}updateErrorVisibility(o){this.errorChild&&(!this.test.item.error||o?.item?.error)&&(this.addedOrRemoved(this),this.children.delete(this.errorChild),this.errorChild=void 0),this.test.item.error&&!this.errorChild&&(this.errorChild=new D.TestTreeErrorMessage(this.test.item.error,this),this.children.add(this.errorChild),this.addedOrRemoved(this))}}let i=class extends b.Disposable{get rootsWithChildren(){const o=y.Iterable.map(this.testService.collection.rootItems,u=>this.items.get(u.item.extId));return y.Iterable.filter(o,u=>!!u?.children.size)}constructor(o,u,d){super(),this.lastState=o,this.testService=u,this.results=d,this.updateEmitter=new t.Emitter,this.changedParents=new Set,this.resortedParents=new Set,this.items=new Map,this.onUpdate=this.updateEmitter.event,this._register(u.onDidProcessDiff(p=>this.applyDiff(p))),this._register(d.onResultsChanged(p=>{if("removed"in p)for(const c of[...this.items.values()].sort((l,n)=>n.depth-l.depth)){const l=this.results.getStateById(c.test.item.extId)?.[1];c.ownDuration=l?.ownDuration,(0,f.refreshComputedState)(a,c,l?.ownComputedState??0).forEach(n=>n.fireChange())}})),this._register(d.onTestChanged(p=>{if(p.reason===2)return;let c=p.item;if(c.ownComputedState===0||p.result!==d.results[0]){const w=d.getStateById(c.item.extId);w&&(c=w[1])}const l=this.items.get(c.item.extId);if(!l)return;const n=p.reason===1&&p.previousOwnDuration!==c.ownDuration,g=l.children.size?void 0:c.computedState;l.retired=!!c.retired,l.ownState=c.ownComputedState,l.ownDuration=c.ownDuration,l.fireChange(),(0,f.refreshComputedState)(a,l,g,n).forEach(w=>w.fireChange())}));for(const p of u.collection.all)this.storeItem(this.createItem(p))}getElementByTestId(o){return this.items.get(o)}applyDiff(o){for(const u of o)switch(u.op){case 0:{const d=this.createItem(u.item);this.storeItem(d);break}case 1:{const d=u.item,p=this.items.get(d.extId);if(!p)break;const c=p.test.expand===0&&d.expand;p.update(d),c?this.changedParents.add(p.parent):this.resortedParents.add(p.parent);break}case 3:{const d=this.items.get(u.itemId);if(!d)break;const p=d.depth===1&&d.parent?.children.size===1;this.changedParents.add(p?null:d.parent);const c=[[d]];for(;c.length;)for(const l of c.pop())l instanceof r&&c.push(this.unstoreItem(l))}}o.length!==0&&this.updateEmitter.fire()}applyTo(o){for(const u of[this.changedParents,this.resortedParents])for(const d of u)d&&!o.hasElement(d)&&u.delete(d);for(const u of this.changedParents)o.setChildren(u,(0,D.getChildrenForParent)(this.lastState,this.rootsWithChildren,u),{diffIdentityProvider:D.testIdentityProvider});for(const u of this.resortedParents)o.resort(u,!1)}expandElement(o,u){o instanceof r&&o.test.expand!==0&&this.testService.collection.expand(o.test.item.extId,u)}createItem(o){const u=v.TestId.parentId(o.item.extId),d=u?this.items.get(u):null;return new r(o,d,p=>this.changedParents.add(p))}unstoreItem(o){const u=o.parent;return u?.children.delete(o),this.items.delete(o.test.item.extId),u instanceof r&&(0,f.refreshComputedState)(a,u,void 0,!!o.duration).forEach(d=>d.fireChange()),o.children}storeItem(o){o.parent?.children.add(o),this.items.set(o.test.item.extId,o);const u=o.depth===1&&o.parent?.children.size===1;this.changedParents.add(u?null:o.parent),(o.depth===0||(0,T.isCollapsedInSerializedTestTree)(this.lastState,o.test.item.extId)===!1)&&this.expandElement(o,0);const d=this.results.getStateById(o.test.item.extId)?.[1];d&&(o.retired=!!d.retired,o.ownState=d.computedState,o.ownDuration=d.ownDuration,(0,f.refreshComputedState)(a,o,void 0,!!o.ownDuration).forEach(p=>p.fireChange()))}};e.TreeProjection=i,e.TreeProjection=i=fe([O(1,S.ITestService),O(2,m.ITestResultService)],i)}),define(Q[1320],Y([1,0,4,3e3,9,46,470,471,334]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTestProgressText=e.collectTestStateCounts=e.TestingProgressTrigger=void 0;let m=class extends t.Disposable{constructor(r,i,s){super(),this.configurationService=i,this.viewsService=s,this._register(r.onResultsChanged(o=>{"started"in o&&this.attachAutoOpenForNewResults(o.started)}))}attachAutoOpenForNewResults(r){if(r.request.isUiTriggered===!1)return;const i=(0,T.getTestingConfiguration)(this.configurationService,"testing.openTesting");if(i==="neverOpen")return;if(i==="openOnTestStart")return this.openTestView();const s=new t.DisposableStore;s.add(r.onComplete(()=>s.dispose())),s.add(r.onChange(o=>{o.reason===1&&(0,f.isFailedState)(o.item.ownComputedState)&&(this.openTestView(),s.dispose())}))}openTestView(){this.viewsService.openView("workbench.panel.testResults.view",!1)}};e.TestingProgressTrigger=m,e.TestingProgressTrigger=m=fe([O(0,v.ITestResultService),O(1,b.IConfigurationService),O(2,D.IViewsService)],m);const S=(a,r)=>{let i=0,s=0,o=0,u=0,d=0;for(const p of r){const c=p.counts;s+=c[6]+c[4],i+=c[3],o+=c[5],u+=c[2],d+=c[1]}return{isRunning:a,passed:i,failed:s,runSoFar:i+s,totalWillBeRun:i+s+d+u,skipped:o}};e.collectTestStateCounts=S;const h=({isRunning:a,passed:r,runSoFar:i,totalWillBeRun:s,skipped:o,failed:u})=>{let d=r/i*100;return u>0?d=Math.min(d,99.9):i===0&&(d=0),a?i===0?(0,y.localize)(0,null):o===0?(0,y.localize)(1,null,r,s,d.toPrecision(3)):(0,y.localize)(2,null,r,s,d.toPrecision(3),o):o===0?(0,y.localize)(3,null,r,i,d.toPrecision(3)):(0,y.localize)(4,null,r,i,d.toPrecision(3),o)};e.getTestProgressText=h}),define(Q[940],Y([1,0,214,10]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildTestUri=e.parseTestUri=e.TestUriType=e.TEST_DATA_SCHEME=void 0,e.TEST_DATA_SCHEME="vscode-test-data";var b;(function(v){v[v.TaskOutput=0]="TaskOutput",v[v.TestOutput=1]="TestOutput",v[v.ResultMessage=2]="ResultMessage",v[v.ResultActualOutput=3]="ResultActualOutput",v[v.ResultExpectedOutput=4]="ResultExpectedOutput"})(b||(e.TestUriType=b={}));var D;(function(v){v.Results="results",v.AllOutput="output",v.Messages="message",v.Text="TestFailureMessage",v.ActualOutput="ActualOutput",v.ExpectedOutput="ExpectedOutput"})(D||(D={}));const T=v=>{const m=v.authority,[S,...h]=v.path.slice(1).split("/");if(h[0]==="message"){const a=Number(h[1]),r=v.query,i=Number(h[2]),s=h[3];if(m==="results")switch(s){case"TestFailureMessage":return{resultId:S,taskIndex:a,testExtId:r,messageIndex:i,type:2};case"ActualOutput":return{resultId:S,taskIndex:a,testExtId:r,messageIndex:i,type:3};case"ExpectedOutput":return{resultId:S,taskIndex:a,testExtId:r,messageIndex:i,type:4};case"message":}}if(h[0]==="output"){const a=v.query,r=Number(h[1]);return a?{resultId:S,taskIndex:r,testExtId:a,type:1}:{resultId:S,taskIndex:r,type:0}}};e.parseTestUri=T;const f=v=>{const m={scheme:e.TEST_DATA_SCHEME,authority:"results"};if(v.type===0)return y.URI.from({...m,path:["",v.resultId,"output",v.taskIndex].join("/")});const S=(h,...a)=>y.URI.from({...m,query:v.testExtId,path:["",h,"message",...a].join("/")});switch(v.type){case 3:return S(v.resultId,v.taskIndex,v.messageIndex,"ActualOutput");case 4:return S(v.resultId,v.taskIndex,v.messageIndex,"ExpectedOutput");case 2:return S(v.resultId,v.taskIndex,v.messageIndex,"TestFailureMessage");case 1:return y.URI.from({...m,query:v.testExtId,path:["",v.resultId,"output",v.taskIndex].join("/")});default:(0,t.assertNever)(v,"Invalid test uri")}};e.buildTestUri=f}),define(Q[3652],Y([1,0,7,217,34,20,14,6,110,257,83,4,69,18,37,59,79,232,137,57,2996,88,13,28,9,8,29,5,19,64,1265,938,469,470,738,235,359,535,334,358,1317,618,471,940]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P,x,F,V,W,z,B,K,H){"use strict";var U;Object.defineProperty(e,"__esModule",{value:!0}),e.TestingDecorations=e.TestingDecorationService=void 0;const G=128;function $(ue,de){const ge=ue.listDiffEditors();for(const he of ge)if(he.getOriginalEditor()===de)return!0;return!1}class ie{constructor(){this.runByIdKey=new Map,this.messages=new Map}get size(){return this.runByIdKey.size+this.messages.size}getForExactTests(de){const ge=de.sort().join("\0\0");return this.runByIdKey.get(ge)}getMessage(de){return this.messages.get(de)}removeMessage(de){this.messages.delete(de)}addMessage(de){this.messages.set(de.testMessage,de)}addTest(de){const ge=de.testIds.sort().join("\0\0");this.runByIdKey.set(ge,de)}getById(de){for(const ge of this.runByIdKey.values())if(ge.id===de)return ge;for(const ge of this.messages.values())if(ge.id===de)return ge}*[Symbol.iterator](){for(const de of this.runByIdKey.values())yield de;for(const de of this.messages.values())yield de}}let J=class extends h.Disposable{constructor(de,ge,he,be,ve,Ie){super(),this.configurationService=ge,this.testService=he,this.results=be,this.instantiationService=ve,this.modelService=Ie,this.generation=0,this.changeEmitter=new f.Emitter,this.decorationCache=new a.ResourceMap,this.invalidatedMessages=new WeakSet,this.onDidChange=this.changeEmitter.event,de.registerDecorationType("test-message-decoration",ae.decorationId,{},void 0),Ie.onModelRemoved(we=>this.decorationCache.delete(we.uri));const Se=this._register(new T.RunOnceScheduler(()=>this.invalidate(),100));this._register(this.testService.onWillProcessDiff(we=>{for(const ye of we){if(ye.op!==2)continue;const Re=this.decorationCache.get(ye.uri);Re&&(Re.rangeUpdateVersionId=ye.docv)}Se.isScheduled()||Se.schedule()})),this._register(f.Event.any(this.results.onResultsChanged,this.results.onTestChanged,this.testService.excluded.onTestExclusionsChanged,this.testService.showInlineOutput.onDidChange,f.Event.filter(ge.onDidChangeConfiguration,we=>we.affectsConfiguration("testing.gutterEnabled")))(()=>{Se.isScheduled()||Se.schedule()})),this._register(k.GutterActionsRegistry.registerGutterActionsGenerator((we,ye)=>{const Re=we.editor.getModel(),Le=j.get(we.editor);if(!Re||!Le?.currentUri)return;const Pe=this.syncDecorations(Le.currentUri);if(!Pe.size)return;const Ae=Re.getLinesDecorations(we.lineNumber,we.lineNumber);for(const{id:Me}of Ae){const Oe=Pe.getById(Me);if(Oe){const{object:De}=Oe.getContextMenuActions();for(const Ce of De)ye.push(Ce,"1_testing")}}}))}invalidateResultMessage(de){this.invalidatedMessages.add(de),this.invalidate()}syncDecorations(de){const ge=this.modelService.getModel(de);if(!ge)return new ie;const he=this.decorationCache.get(de);return he&&he.generation===this.generation&&(he.rangeUpdateVersionId===void 0||he.rangeUpdateVersionId!==ge.getVersionId())?he.value:this.applyDecorations(ge)}getDecoratedTestPosition(de,ge){const he=this.modelService.getModel(de);if(!he)return;const be=S.Iterable.find(this.syncDecorations(de),ve=>ve instanceof oe&&ve.isForTest(ge));if(be)return he.getDecorationRange(be.id)?.getStartPosition()}invalidate(){this.generation++,this.changeEmitter.fire()}applyDecorations(de){const ge=(0,M.getTestingConfiguration)(this.configurationService,"testing.gutterEnabled"),he=de.uri.toString(),be=this.decorationCache.get(de.uri),ve=be?.rangeUpdateVersionId===de.getVersionId(),Ie=be?.value??new ie;return de.changeDecorations(we=>{const ye=new ie,Re=new z.TestDecorations;for(const Ae of this.testService.collection.getNodeByUrl(de.uri)){if(!Ae.item.range)continue;const Me=this.results.getStateById(Ae.item.extId),Oe=Ae.item.range.startLineNumber;Re.push({line:Oe,id:"",test:Ae,resultItem:Me?.[1]})}for(const[Ae,Me]of Re.lines()){const Oe=Me.length>1;let De=Ie.getForExactTests(Me.map(Ce=>Ce.test.item.extId));De&&ve&&de.getDecorationRange(De.id)?.startLineNumber!==Ae&&(De=void 0),De?(De.replaceOptions(Me,ge)&&we.changeDecorationOptions(De.id,De.editorDecoration.options),ye.addTest(De)):ye.addTest(Oe?this.instantiationService.createInstance(le,Me,ge,de):this.instantiationService.createInstance(ne,Me[0].test,Me[0].resultItem,de,ge))}const Le=new Set;(0,M.getTestingConfiguration)(this.configurationService,"testing.showAllMessages")?this.results.results.forEach(Ae=>this.applyDecorationsFromResult(Ae,Le,he,Ie,de,ye)):this.applyDecorationsFromResult(this.results.results[0],Le,he,Ie,de,ye);const Pe=new Set;for(const Ae of ye)Ae.id===""?Ae.id=we.addDecoration(Ae.editorDecoration.range,Ae.editorDecoration.options):Pe.add(Ae.id);for(const Ae of Ie)Pe.has(Ae.id)||we.removeDecoration(Ae.id);return this.decorationCache.set(de.uri,{generation:this.generation,rangeUpdateVersionId:be?.rangeUpdateVersionId,value:ye}),ye})||Ie}applyDecorationsFromResult(de,ge,he,be,ve,Ie){if(this.testService.showInlineOutput.value&&de instanceof F.LiveTestResult){for(const Se of de.tasks)for(const we of Se.otherMessages)if(!this.invalidatedMessages.has(we)&&we.location?.uri.toString()===he){const ye=be.getMessage(we)||this.instantiationService.createInstance(ae,we,void 0,ve);Ie.addMessage(ye)}for(const Se of de.tests)for(let we=0;we<Se.tasks.length;we++){const ye=Se.tasks[we];for(let Re=0;Re<ye.messages.length;Re++){const Le=ye.messages[Re];if(this.invalidatedMessages.has(Le)||Le.location?.uri.toString()!==he)continue;const Pe=Le.location.range.startLineNumber;if(!ge.has(Pe)){const Ae=be.getMessage(Le)||this.instantiationService.createInstance(ae,Le,(0,H.buildTestUri)({type:3,messageIndex:Re,taskIndex:we,resultId:de.id,testExtId:Se.item.extId}),ve);Ie.addMessage(Ae),ge.add(Pe)}}}}}};e.TestingDecorationService=J,e.TestingDecorationService=J=fe([O(0,o.ICodeEditorService),O(1,w.IConfigurationService),O(2,W.ITestService),O(3,V.ITestResultService),O(4,I.IInstantiationService),O(5,p.IModelService)],J);let j=class extends h.Disposable{static get(de){return de.getContribution("editor.contrib.testingDecorations")}get currentUri(){return this._currentUri}constructor(de,ge,he,be,ve){super(),this.editor=de,this.codeEditorService=ge,this.testService=he,this.decorations=be,this.uriIdentityService=ve,this.expectedWidget=new h.MutableDisposable,this.actualWidget=new h.MutableDisposable,ge.registerDecorationType("test-message-decoration",ae.decorationId,{},void 0,de),this.attachModel(de.getModel()?.uri),this._register(be.onDidChange(()=>{this._currentUri&&be.syncDecorations(this._currentUri)})),this._register(this.editor.onDidChangeModel(Se=>this.attachModel(Se.newModelUrl||void 0))),this._register(this.editor.onMouseDown(Se=>{if(Se.target.position&&this.currentUri){const we=de.getModel()?.getLineDecorations(Se.target.position.lineNumber)??[];if(!we.length)return;const ye=be.syncDecorations(this.currentUri);for(const{id:Re}of we)if(ye.getById(Re)?.click(Se)){Se.event.stopPropagation();return}}})),this._register(f.Event.accumulate(this.editor.onDidChangeModelContent,0,this._store)(Se=>{const we=de.getModel();if(!this._currentUri||!we)return;const ye=be.syncDecorations(this._currentUri);if(ye.size)for(const Re of Se)for(const Le of Re.changes){const Pe=we.getLinesDecorations(Le.range.startLineNumber,Le.range.endLineNumber);for(const{id:Ae}of Pe){const Me=ye.getById(Ae);Me instanceof ae&&be.invalidateResultMessage(Me.testMessage)}}}));const Ie=()=>{this.editor.getContainerDomNode().style.setProperty("--testMessageDecorationFontFamily",de.getOption(48)),this.editor.getContainerDomNode().style.setProperty("--testMessageDecorationFontSize",`${de.getOption(51)}px`)};this._register(this.editor.onDidChangeConfiguration(Se=>{Se.hasChanged(48)&&Ie()})),Ie()}attachModel(de){switch(de&&(0,H.parseTestUri)(de)?.type){case 4:this.expectedWidget.value=new se(this.editor),this.actualWidget.clear();break;case 3:this.expectedWidget.clear(),this.actualWidget.value=new re(this.editor);break;default:this.expectedWidget.clear(),this.actualWidget.clear()}$(this.codeEditorService,this.editor)&&(de=void 0),this._currentUri=de,de&&(this.decorations.syncDecorations(de),(async()=>{for await(const ge of(0,W.testsInFile)(this.testService,this.uriIdentityService,de,!1))if(this._currentUri!==de)break})())}};e.TestingDecorations=j,e.TestingDecorations=j=fe([O(1,o.ICodeEditorService),O(2,W.ITestService),O(3,z.ITestingDecorationsService),O(4,A.IUriIdentityService)],j);const ee=ue=>({startLineNumber:ue.startLineNumber,endLineNumber:ue.startLineNumber,startColumn:ue.startColumn,endColumn:ue.startColumn}),X=(ue,de,ge)=>{const he=ue[0]?.item.range;if(!he)throw new Error("Test decorations can only be created for tests with a range");if(!ge)return{range:ee(he),options:{isWholeLine:!0,description:"run-test-decoration"}};let be=0;const ve=[];let Ie,Se=!1;for(let Pe=0;Pe<ue.length;Pe++){const Ae=ue[Pe],Me=de[Pe],Oe=Me?.computedState??0;ve.length<10&&ve.push((0,N.labelForTestInState)(Ae.item.label,Oe)),be=(0,K.maxPriority)(be,Oe),Se=Se||!!Me?.retired,!Ie&&Me?.tasks.some(De=>De.messages.length)&&(Ie=Ae.item.extId)}const we=ue.length>1||ue[0].children.size>0,ye=be===0?we?R.testingRunAllIcon:R.testingRunIcon:R.testingStatesToIcons.get(be);let Re,Le=i.ThemeIcon.asClassName(ye)+" testing-run-glyph";return Se&&(Le+=" retired"),{range:ee(he),options:{description:"run-test-decoration",showIfCollapsed:!0,get hoverMessage(){if(!Re){const Pe=Re=new v.MarkdownString("",!0).appendText(ve.join(", ")+".");if(Ie){const Ae=encodeURIComponent(JSON.stringify([Ie]));Pe.appendMarkdown(` [${(0,c.localize)(0,null)}](command:vscode.peekTestError?${Ae})`)}}return Re},glyphMarginClassName:Le,stickiness:1,zIndex:1e4}}};var te;(function(ue){ue.FontFamily="testingDiffLensFontFamily",ue.FontFeatures="testingDiffLensFontFeatures"})(te||(te={}));class Z{constructor(de){this.editor=de,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._domNode=t.$("span"),queueMicrotask(()=>{this.applyStyling(),this.editor.addContentWidget(this)})}applyStyling(){let de=this.editor.getOption(18),ge;!de||de<5?(de=this.editor.getOption(51)*.9|0,ge=this.editor.getOption(65)):ge=de*Math.max(1.3,this.editor.getOption(65)/this.editor.getOption(51))|0;const he=this.editor.getOption(49),be=this._domNode;be.classList.add("testing-diff-lens-widget"),be.textContent=this.getText(),be.style.lineHeight=`${ge}px`,be.style.fontSize=`${de}px`,be.style.fontFamily="var(--testingDiffLensFontFamily)",be.style.fontFeatureSettings="var(--testingDiffLensFontFeatures)";const ve=this.editor.getContainerDomNode().style;ve.setProperty("testingDiffLensFontFamily",this.editor.getOption(17)??"inherit"),ve.setProperty("testingDiffLensFontFeatures",he.fontFeatureSettings),this.editor.changeViewZones(Ie=>{this.viewZoneId&&Ie.removeZone(this.viewZoneId),this.viewZoneId=Ie.addZone({afterLineNumber:0,afterColumn:1073741824,domNode:document.createElement("div"),heightInPx:20})})}getDomNode(){return this._domNode}dispose(){this.editor.changeViewZones(de=>{this.viewZoneId&&de.removeZone(this.viewZoneId)}),this.editor.removeContentWidget(this)}getPosition(){return{position:{column:0,lineNumber:0},preference:[1]}}}class se extends Z{getId(){return"expectedTestingLens"}getText(){return(0,c.localize)(1,null)}}class re extends Z{getId(){return"actualTestingLens"}getText(){return(0,c.localize)(2,null)}}let oe=class{get line(){return this.editorDecoration.range.startLineNumber}get testIds(){return this.tests.map(de=>de.test.item.extId)}constructor(de,ge,he,be,ve,Ie,Se,we,ye,Re,Le){this.tests=de,this.visible=ge,this.model=he,this.codeEditorService=be,this.testService=ve,this.contextMenuService=Ie,this.commandService=Se,this.configurationService=we,this.testProfileService=ye,this.contextKeyService=Re,this.menuService=Le,this.id="",this.displayedStates=de.map(Pe=>Pe.resultItem?.computedState),this.editorDecoration=X(de.map(Pe=>Pe.test),de.map(Pe=>Pe.resultItem),ge),this.editorDecoration.options.glyphMarginHoverMessage=new v.MarkdownString().appendText(this.getGutterLabel())}click(de){if(de.target.type!==2||de.event.rightButton||r.isMacintosh&&de.event.leftButton&&de.event.ctrlKey)return!1;switch((0,M.getTestingConfiguration)(this.configurationService,"testing.defaultGutterClickAction")){case"contextMenu":this.showContextMenu(de);break;case"debug":this.defaultDebug();break;case"run":default:this.defaultRun();break}return!0}replaceOptions(de,ge){const he=de.map(be=>be.resultItem?.computedState);return ge===this.visible&&(0,D.equals)(this.displayedStates,he)?!1:(this.tests=de,this.displayedStates=he,this.visible=ge,this.editorDecoration.options=X(de.map(be=>be.test),de.map(be=>be.resultItem),ge).options,this.editorDecoration.options.glyphMarginHoverMessage=new v.MarkdownString().appendText(this.getGutterLabel()),!0)}isForTest(de){return this.tests.some(ge=>ge.test.item.extId===de)}defaultRun(){return this.testService.runTests({tests:this.tests.map(({test:de})=>de),group:2})}defaultDebug(){return this.testService.runTests({tests:this.tests.map(({test:de})=>de),group:4})}showContextMenu(de){this.codeEditorService.listCodeEditors().find(he=>he.getModel()===this.model)?.getContribution(k.EditorLineNumberContextMenu.ID)?.show(de)}getGutterLabel(){switch((0,M.getTestingConfiguration)(this.configurationService,"testing.defaultGutterClickAction")){case"contextMenu":return(0,c.localize)(3,null);case"debug":return(0,c.localize)(4,null);case"run":default:return(0,c.localize)(5,null)}}getTestContextMenuActions(de,ge){const he=[],be=this.testProfileService.capabilitiesForTest(de);be&2&&he.push(new b.Action("testing.gutter.run",(0,c.localize)(6,null),void 0,void 0,()=>this.testService.runTests({group:2,tests:[de]}))),be&4&&he.push(new b.Action("testing.gutter.debug",(0,c.localize)(7,null),void 0,void 0,()=>this.testService.runTests({group:4,tests:[de]}))),be&16&&he.push(new b.Action("testing.runUsing",(0,c.localize)(8,null),void 0,void 0,async()=>{const Ie=await this.commandService.executeCommand("vscode.pickTestProfile",{onlyForTest:de});Ie&&this.testService.runResolvedTests({targets:[{profileGroup:Ie.group,profileId:Ie.profileId,controllerId:Ie.controllerId,testIds:[de.item.extId]}]})})),ge&&(0,K.isFailedState)(ge.computedState)&&he.push(new b.Action("testing.gutter.peekFailure",(0,c.localize)(9,null),void 0,void 0,()=>this.commandService.executeCommand("vscode.peekTestError",de.item.extId))),he.push(new b.Action("testing.gutter.reveal",(0,c.localize)(10,null),void 0,void 0,()=>this.commandService.executeCommand("_revealTestInExplorer",de.item.extId)));const ve=this.getContributedTestActions(de,be);return{object:b.Separator.join(he,ve),dispose(){}}}getContributedTestActions(de,ge){const he=this.contextKeyService.createOverlay((0,L.getTestItemContextOverlay)(de,ge)),be=this.menuService.createMenu(n.MenuId.TestItemGutter,he);try{const ve=[],Ie=(0,W.getContextForTestItem)(this.testService.collection,de.item.extId);return(0,l.createAndFillInContextMenuActions)(be,{shouldForwardArgs:!0,arg:Ie},ve),ve}finally{be.dispose()}}};oe=fe([O(3,o.ICodeEditorService),O(4,W.ITestService),O(5,C.IContextMenuService),O(6,g.ICommandService),O(7,w.IConfigurationService),O(8,x.ITestProfileService),O(9,E.IContextKeyService),O(10,n.IMenuService)],oe);class le extends oe{getContextMenuActions(){const de=[];this.tests.some(({test:we})=>this.testProfileService.capabilitiesForTest(we)&2)&&de.push(new b.Action("testing.gutter.runAll",(0,c.localize)(11,null),void 0,void 0,()=>this.defaultRun())),this.tests.some(({test:we})=>this.testProfileService.capabilitiesForTest(we)&4)&&de.push(new b.Action("testing.gutter.debugAll",(0,c.localize)(12,null),void 0,void 0,()=>this.defaultDebug()));const ge=this.tests.map(we=>({currentLabel:we.test.item.label,testItem:we,parent:P.TestId.fromString(we.test.item.extId).parentId})),he=we=>{const ye=new Map;for(const Re of we)ye.set(Re.currentLabel,(ye.get(Re.currentLabel)||0)+1);return we.filter(Re=>ye.get(Re.currentLabel)>1)};let be,ve=!0;for(;(be=he(ge)).length&&ve;)for(const we of be)if(we.parent){const ye=this.testService.collection.getNodeById(we.parent.toString());we.currentLabel=ye?.item.label+" > "+we.currentLabel,we.parent=we.parent.parentId}else ve=!1;const Ie=new h.DisposableStore,Se=ge.map(({currentLabel:we,testItem:ye})=>{const Re=this.getTestContextMenuActions(ye.test,ye.resultItem);return Ie.add(Re),new b.SubmenuAction(ye.test.item.extId,(0,m.stripIcons)(we),Re.object)});return{object:b.Separator.join(de,Se),dispose:()=>Ie.dispose()}}}let ne=class extends oe{constructor(de,ge,he,be,ve,Ie,Se,we,ye,Re,Le,Pe){super([{test:de,resultItem:ge}],be,he,ve,Ie,we,Se,ye,Re,Le,Pe)}getContextMenuActions(){return this.getTestContextMenuActions(this.tests[0].test,this.tests[0].resultItem)}};ne=fe([O(4,o.ICodeEditorService),O(5,W.ITestService),O(6,g.ICommandService),O(7,C.IContextMenuService),O(8,w.IConfigurationService),O(9,x.ITestProfileService),O(10,E.IContextKeyService),O(11,n.IMenuService)],ne);const ce=/\r?\n\s*/g;let ae=class{static{U=this}static{this.inlineClassName="test-message-inline-content"}static{this.decorationId=`testmessage-${(0,s.generateUuid)()}`}constructor(de,ge,he,be,ve){this.testMessage=de,this.messageUri=ge,this.peekOpener=be,this.id="",this.contentIdClass=`test-message-inline-content-id${(0,s.generateUuid)()}`,this.location=de.location,this.line=this.location.range.startLineNumber;const Ie=de.type,Se=de.message,we=ve.resolveDecorationOptions(U.decorationId,!0);we.hoverMessage=typeof Se=="string"?new v.MarkdownString().appendText(Se):Se,we.zIndex=10,we.className=`testing-inline-message-severity-${Ie}`,we.isWholeLine=!0,we.stickiness=1,we.collapseOnReplaceEdit=!0;let ye=(0,y.renderStringAsPlaintext)(Se).replace(ce," ");ye.length>G&&(ye=ye.slice(0,G-1)+"\u2026"),we.after={content:" ".repeat(4)+ye,inlineClassName:`test-message-inline-content test-message-inline-content-s${Ie} ${this.contentIdClass} ${ge?"test-message-inline-content-clickable":""}`},we.showIfCollapsed=!0;const Re=Ie===0?u.overviewRulerError:u.overviewRulerInfo;Re&&(we.overviewRuler={color:(0,_.themeColorFromId)(Re),position:d.OverviewRulerLane.Right});const Le=he.getLineLength(this.location.range.startLineNumber),Pe=Le?Le+1:this.location.range.endColumn;this.editorDecoration={options:we,range:{startLineNumber:this.location.range.startLineNumber,startColumn:Pe,endColumn:Pe,endLineNumber:this.location.range.startLineNumber}}}click(de){return de.event.rightButton||!this.messageUri||de.target.element?.className.includes(this.contentIdClass)&&this.peekOpener.peekUri(this.messageUri),!1}getContextMenuActions(){return{object:[],dispose:()=>{}}}};ae=U=fe([O(3,B.ITestingPeekOpener),O(4,o.ICodeEditorService)],ae)}),define(Q[3653],Y([1,0,62,4,33,50,57,75,3007,334,940]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingContentProvider=void 0;let h=class{constructor(r,i,s,o){this.languageService=i,this.modelService=s,this.resultService=o,r.registerTextModelContentProvider(S.TEST_DATA_SCHEME,this)}async provideTextContent(r){const i=this.modelService.getModel(r);if(i&&!i.isDisposed())return i;const s=(0,S.parseTestUri)(r);if(!s)return null;const o=this.resultService.getResult(s.resultId);if(!o)return null;if(s.type===0){const c=o.tasks[s.taskIndex],l=this.modelService.createModel("",null,r,!1),n=C=>l.applyEdits([{range:{startColumn:1,endColumn:1,startLineNumber:1/0,endLineNumber:1/0},text:C}]),g=t.VSBuffer.concat(c.output.buffers,c.output.length).toString();n((0,b.removeAnsiEscapeCodes)(g));let w=g.length>0;const E=new y.DisposableStore;return E.add(c.output.onDidWriteData(C=>{w||=C.byteLength>0,n((0,b.removeAnsiEscapeCodes)(C.toString()))})),c.output.endPromise.then(()=>{E.isDisposed||w||(n((0,v.localize)(0,null)),E.dispose())}),l.onWillDispose(()=>E.dispose()),l}const u=o?.getStateById(s.testExtId);if(!u)return null;let d,p=null;switch(s.type){case 3:{const c=u.tasks[s.taskIndex].messages[s.messageIndex];c?.type===0&&(d=c.actual);break}case 1:{d="";const c=o.tasks[s.taskIndex].output;for(const l of u.tasks[s.taskIndex].messages)l.type===1&&(d+=(0,b.removeAnsiEscapeCodes)(c.getRange(l.offset,l.length).toString()));break}case 4:{const c=u.tasks[s.taskIndex].messages[s.messageIndex];c?.type===0&&(d=c.expected);break}case 2:{const c=u.tasks[s.taskIndex].messages[s.messageIndex];if(!c)break;if(c.type===1){const l=o.tasks[s.taskIndex].output.getRange(c.offset,c.length);d=(0,b.removeAnsiEscapeCodes)(l.toString())}else typeof c.message=="string"?d=c.message:(d=c.message.value,p=this.languageService.createById("markdown"))}}return d===void 0?null:this.modelService.createModel(d,p,r,!1)}};e.TestingContentProvider=h,e.TestingContentProvider=h=fe([O(0,f.ITextModelService),O(1,D.ILanguageService),O(2,T.IModelService),O(3,m.ITestResultService)],h)}),define(Q[619],Y([1,0,112,5]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITimelineService=e.TimelinePaneId=e.toKey=void 0;function b(T,f){return`${typeof T=="string"?T:t.ExtensionIdentifier.toKey(T)}|${f}`}e.toKey=b,e.TimelinePaneId="timeline";const D="timeline";e.ITimelineService=(0,y.createDecorator)(D)}),define(Q[3654],Y([1,0,6,11,619,46,9,8]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimelineService=e.TimelineHasProviderContext=void 0,e.TimelineHasProviderContext=new f.RawContextKey("timelineHasProvider",!1);let v=class{constructor(S,h,a,r){this.logService=S,this.viewsService=h,this.configurationService=a,this.contextKeyService=r,this._onDidChangeProviders=new t.Emitter,this.onDidChangeProviders=this._onDidChangeProviders.event,this._onDidChangeTimeline=new t.Emitter,this.onDidChangeTimeline=this._onDidChangeTimeline.event,this._onDidChangeUri=new t.Emitter,this.onDidChangeUri=this._onDidChangeUri.event,this.providers=new Map,this.providerSubscriptions=new Map,this.hasProviderContext=e.TimelineHasProviderContext.bindTo(this.contextKeyService),this.updateHasProviderContext()}getSources(){return[...this.providers.values()].map(S=>({id:S.id,label:S.label}))}getTimeline(S,h,a,r){this.logService.trace(`TimelineService#getTimeline(${S}): uri=${h.toString()}`);const i=this.providers.get(S);if(i!==void 0){if(typeof i.scheme=="string"){if(i.scheme!=="*"&&i.scheme!==h.scheme)return}else if(!i.scheme.includes(h.scheme))return;return{result:i.provideTimeline(h,a,r.token).then(s=>{if(s!==void 0)return s.items=s.items.map(o=>({...o,source:i.id})),s.items.sort((o,u)=>u.timestamp-o.timestamp||u.source.localeCompare(o.source,void 0,{numeric:!0,sensitivity:"base"})),s}),options:a,source:i.id,tokenSource:r,uri:h}}}registerTimelineProvider(S){this.logService.trace(`TimelineService#registerTimelineProvider: id=${S.id}`);const h=S.id,a=this.providers.get(h);if(a)try{a?.dispose()}catch{}return this.providers.set(h,S),this.updateHasProviderContext(),S.onDidChange&&this.providerSubscriptions.set(h,S.onDidChange(r=>this._onDidChangeTimeline.fire(r))),this._onDidChangeProviders.fire({added:[h]}),{dispose:()=>{this.providers.delete(h),this._onDidChangeProviders.fire({removed:[h]})}}}unregisterTimelineProvider(S){this.logService.trace(`TimelineService#unregisterTimelineProvider: id=${S}`),this.providers.has(S)&&(this.providers.delete(S),this.providerSubscriptions.delete(S),this.updateHasProviderContext(),this._onDidChangeProviders.fire({removed:[S]}))}setUri(S){this.viewsService.openView(b.TimelinePaneId,!0),this._onDidChangeUri.fire(S)}updateHasProviderContext(){this.hasProviderContext.set(this.providers.size!==0)}};e.TimelineService=v,e.TimelineService=v=fe([O(0,y.ILogService),O(1,D.IViewsService),O(2,T.IConfigurationService),O(3,f.IContextKeyService)],v)}),define(Q[941],Y([1,0,27,31,676,10,51,20,15,4,28,17,57,75]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchyModel=e.TypeHierarchyProviderRegistry=e.TypeHierarchyDirection=void 0;var i;(function(d){d.Subtypes="subtypes",d.Supertypes="supertypes"})(i||(e.TypeHierarchyDirection=i={})),e.TypeHierarchyProviderRegistry=new b.LanguageFeatureRegistry;class s{static async create(p,c,l){const[n]=e.TypeHierarchyProviderRegistry.ordered(p);if(!n)return;const g=await n.prepareTypeHierarchy(p,c,l);if(g)return new s(g.roots.reduce((w,E)=>w+E._sessionId,""),n,g.roots,new m.RefCountedDisposable(g))}constructor(p,c,l,n){this.id=p,this.provider=c,this.roots=l,this.ref=n,this.root=l[0]}dispose(){this.ref.release()}fork(p){const c=this;return new class extends s{constructor(){super(c.id,c.provider,[p],c.ref.acquire())}}}async provideSupertypes(p,c){try{const l=await this.provider.provideSupertypes(p,c);if((0,f.isNonEmptyArray)(l))return l}catch(l){(0,v.onUnexpectedExternalError)(l)}return[]}async provideSubtypes(p,c){try{const l=await this.provider.provideSubtypes(p,c);if((0,f.isNonEmptyArray)(l))return l}catch(l){(0,v.onUnexpectedExternalError)(l)}return[]}}e.TypeHierarchyModel=s;const o=new Map;S.CommandsRegistry.registerCommand("_executePrepareTypeHierarchy",async(d,...p)=>{const[c,l]=p;(0,h.assertType)(D.URI.isUri(c)),(0,h.assertType)(T.Position.isIPosition(l));let g=d.get(a.IModelService).getModel(c),w;if(!g){const C=await d.get(r.ITextModelService).createModelReference(c);g=C.object.textEditorModel,w=C}try{const E=await s.create(g,l,y.CancellationToken.None);return E?(o.set(E.id,E),o.forEach((C,I,_)=>{_.size>10&&(C.dispose(),o.delete(I))}),[E.root]):[]}finally{w?.dispose()}});function u(d){const p=d;return typeof d=="object"&&typeof p.name=="string"&&typeof p.kind=="number"&&D.URI.isUri(p.uri)&&t.Range.isIRange(p.range)&&t.Range.isIRange(p.selectionRange)}S.CommandsRegistry.registerCommand("_executeProvideSupertypes",async(d,...p)=>{const[c]=p;(0,h.assertType)(u(c));const l=o.get(c._sessionId);if(l)return l.provideSupertypes(c,y.CancellationToken.None)}),S.CommandsRegistry.registerCommand("_executeProvideSubtypes",async(d,...p)=>{const[c]=p;(0,h.assertType)(u(c));const l=o.get(c._sessionId);if(l)return l.provideSubtypes(c,y.CancellationToken.None)})}),define(Q[3655],Y([1,0,941,31,128,306,99,33,27,3014,37]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityProvider=e.VirtualDelegate=e.TypeRenderer=e.IdentityProvider=e.Sorter=e.DataSource=e.Type=void 0;class h{constructor(c,l,n){this.item=c,this.model=l,this.parent=n}static compare(c,l){let n=(0,f.compare)(c.item.uri.toString(),l.item.uri.toString());return n===0&&(n=v.Range.compareRangesUsingStarts(c.item.range,l.item.range)),n}}e.Type=h;class a{constructor(c){this.getDirection=c}hasChildren(){return!0}async getChildren(c){if(c instanceof t.TypeHierarchyModel)return c.roots.map(g=>new h(g,c,void 0));const{model:l,item:n}=c;return this.getDirection()==="supertypes"?(await l.provideSupertypes(n,y.CancellationToken.None)).map(g=>new h(g,l,c)):(await l.provideSubtypes(n,y.CancellationToken.None)).map(g=>new h(g,l,c))}}e.DataSource=a;class r{compare(c,l){return h.compare(c,l)}}e.Sorter=r;class i{constructor(c){this.getDirection=c}getId(c){let l=this.getDirection()+JSON.stringify(c.item.uri)+JSON.stringify(c.item.range);return c.parent&&(l+=this.getId(c.parent)),l}}e.IdentityProvider=i;class s{constructor(c,l){this.icon=c,this.label=l}}class o{constructor(){this.templateId=o.id}static{this.id="TypeRenderer"}renderTemplate(c){c.classList.add("typehierarchy-element");const l=document.createElement("div");c.appendChild(l);const n=new D.IconLabel(c,{supportHighlights:!0});return new s(l,n)}renderElement(c,l,n){const{element:g,filterData:w}=c,E=g.item.tags?.includes(1);n.icon.classList.add("inline",...S.ThemeIcon.asClassNameArray(T.SymbolKinds.toIcon(g.item.kind))),n.label.setLabel(g.item.name,g.item.detail,{labelEscapeNewLines:!0,matches:(0,b.createMatches)(w),strikethrough:E})}disposeTemplate(c){c.label.dispose()}}e.TypeRenderer=o;class u{getHeight(c){return 22}getTemplateId(c){return o.id}}e.VirtualDelegate=u;class d{constructor(c){this.getDirection=c}getWidgetAriaLabel(){return(0,m.localize)(0,null)}getAriaLabel(c){return this.getDirection()==="supertypes"?(0,m.localize)(1,null,c.item.name):(0,m.localize)(2,null,c.item.name)}}e.AccessibilityProvider=d}),define(Q[1321],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowCurrentReleaseNotesActionId=void 0,e.ShowCurrentReleaseNotesActionId="update.showCurrentReleaseNotes"}),define(Q[1322],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.testUrlMatchesGlob=void 0;const t=(b,D)=>{let T=b.with({query:null,fragment:null}).toString(!0);const f=S=>S.replace(/\/+$/,"");D=f(D),T=f(T);const v=Array.from({length:T.length+1}).map(()=>Array.from({length:D.length+1}).map(()=>{}));if(/^[^./:]*:\/\//.test(D))return y(v,T,D,0,0);const m=/^(https?):\/\//.exec(T)?.[1];return m?y(v,T,`${m}://${D}`,0,0):!1};e.testUrlMatchesGlob=t;const y=(b,D,T,f,v)=>{if(b[f]?.[v]!==void 0)return b[f][v];const m=[];if(f===D.length)return v===T.length;if(v===T.length)return D.slice(f)[0]==="/";if(D[f]===T[v]&&m.push(y(b,D,T,f+1,v+1)),T[v]+T[v+1]==="*."&&(["/",":"].includes(D[f])||m.push(y(b,D,T,f+1,v)),m.push(y(b,D,T,f,v+2))),T[v]==="*"&&(f+1===D.length?m.push(y(b,D,T,f+1,v+1)):m.push(y(b,D,T,f+1,v)),m.push(y(b,D,T,f,v+1))),T[v]+T[v+1]===":*")if(D[f]===":"){let S=f+1;do S++;while(/[0-9]/.test(D[S]));m.push(y(b,D,T,S,v+2))}else m.push(y(b,D,T,f,v+2));return b[f][v]=m.some(S=>S===!0)}}),define(Q[3656],Y([1,0,206,22,55,10,25,3423]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loadLocalResource=e.WebviewResourceResponse=void 0;var v;(function(r){let i;(function(u){u[u.Success=0]="Success",u[u.Failed=1]="Failed",u[u.AccessDenied=2]="AccessDenied",u[u.NotModified=3]="NotModified"})(i=r.Type||(r.Type={}));class s{constructor(d,p,c,l){this.stream=d,this.etag=p,this.mtime=c,this.mimeType=l,this.type=i.Success}}r.StreamSuccess=s,r.Failed={type:i.Failed},r.AccessDenied={type:i.AccessDenied};class o{constructor(d,p){this.mimeType=d,this.mtime=p,this.type=i.NotModified}}r.NotModified=o})(v||(e.WebviewResourceResponse=v={}));async function m(r,i,s,o,u){o.debug(`loadLocalResource - begin. requestUri=${r}`);const d=S(r,i.roots);if(o.debug(`loadLocalResource - found resource to load. requestUri=${r}, resourceToLoad=${d}`),!d)return v.AccessDenied;const p=(0,f.getWebviewContentMimeType)(r);try{const c=await s.readFileStream(d,{etag:i.ifNoneMatch},u);return new v.StreamSuccess(c.value,c.etag,c.mtime,p)}catch(c){return c instanceof T.FileOperationError&&c.fileOperationResult===2?new v.NotModified(p,c.options?.mtime):(o.debug(`loadLocalResource - Error using fileReader. requestUri=${r}`),console.log(c),v.Failed)}}e.loadLocalResource=m;function S(r,i){for(const s of i)if(h(s,r))return a(r)}function h(r,i){if(r.scheme!==i.scheme)return!1;let s=(0,b.normalize)(i.fsPath),o=(0,b.normalize)(r.fsPath+(r.fsPath.endsWith(b.sep)?"":b.sep));return(0,t.isUNC)(r.fsPath)&&(0,t.isUNC)(i.fsPath)&&(o=o.toLowerCase(),s=s.toLowerCase()),s.startsWith(o)}function a(r){return r.scheme===y.Schemas.vscodeRemote?D.URI.from({scheme:y.Schemas.vscodeRemote,authority:r.authority,path:"/vscode-resource",query:JSON.stringify({requestResourcePath:r.path})}):r}}),define(Q[222],Y([1,0,20,26,59,8,5,24,191]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionKeyedWebviewOriginStore=e.WebviewOriginStore=e.areWebviewContentOptionsEqual=e.WebviewContentPurpose=e.IWebviewService=e.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED=e.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED=e.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE=void 0,e.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE=new D.RawContextKey("webviewFindWidgetVisible",!1),e.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED=new D.RawContextKey("webviewFindWidgetFocused",!1),e.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED=new D.RawContextKey("webviewFindWidgetEnabled",!1),e.IWebviewService=(0,T.createDecorator)("webviewService");var m;(function(i){i.NotebookRenderer="notebookRenderer",i.CustomEditor="customEditor",i.WebviewView="webviewView"})(m||(e.WebviewContentPurpose=m={}));function S(i,s){return i.allowMultipleAPIAcquire===s.allowMultipleAPIAcquire&&i.allowScripts===s.allowScripts&&i.allowForms===s.allowForms&&(0,t.equals)(i.localResourceRoots,s.localResourceRoots,y.isEqual)&&(0,t.equals)(i.portMapping,s.portMapping,(o,u)=>o.extensionHostPort===u.extensionHostPort&&o.webviewPort===u.webviewPort)&&h(i,s)}e.areWebviewContentOptionsEqual=S;function h(i,s){return i.enableCommandUris===s.enableCommandUris?!0:Array.isArray(i.enableCommandUris)&&Array.isArray(s.enableCommandUris)?(0,t.equals)(i.enableCommandUris,s.enableCommandUris):!1}let a=class{constructor(s,o){this._memento=new v.Memento(s,o),this._state=this._memento.getMemento(-1,1)}getOrigin(s,o){const u=this._getKey(s,o),d=this._state[u];if(d&&typeof d=="string")return d;const p=(0,b.generateUuid)();return this._state[u]=p,this._memento.saveMemento(),p}_getKey(s,o){return JSON.stringify({viewType:s,key:o})}};e.WebviewOriginStore=a,e.WebviewOriginStore=a=fe([O(1,f.IStorageService)],a);let r=class{constructor(s,o){this._store=new a(s,o)}getOrigin(s,o){return this._store.getOrigin(s,o.value)}};e.ExtensionKeyedWebviewOriginStore=r,e.ExtensionKeyedWebviewOriginStore=r=fe([O(1,f.IStorageService)],r)}),define(Q[942],Y([1,0,40,6,7,102,144,680,136,222,1613]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewContent=void 0;let S=class extends v.AngularDisposable{constructor(a,r,i,s){super(),this._dashboardService=a,this._el=r,this.dashboardViewService=i,this.webviewService=s,this._onResize=new y.Emitter,this.onResize=this._onResize.event,this._onMessage=new y.Emitter,this.onMessage=this._onMessage.event}ngOnInit(){this.dashboardViewService.registerWebview(this),this._createWebview(),this._register((0,b.addDisposableListener)(window,b.EventType.RESIZE,a=>{this.layout()}))}layout(){}get id(){return this.webviewId}get connection(){const a=this._dashboardService.connectionManagementService.connectionInfo.connectionProfile;return{providerName:a.providerName,connectionId:a.id,options:a.options}}get serverInfo(){return this._dashboardService.connectionManagementService.connectionInfo.serverInfo}setHtml(a){this._html=a,this._webview&&this._webview.setHtml(a)}sendMessage(a){this._webview&&this._webview.postMessage(a)}_createWebview(){this._webview&&this._webview.dispose(),this._onMessageDisposable&&this._onMessageDisposable.dispose(),this._webview=this.webviewService.createWebviewElement({providedViewType:this.id,title:this.id,contentOptions:{allowScripts:!0},options:{},extension:void 0}),this._webview.mountTo(this._el.nativeElement),this._onMessageDisposable=this._webview.onMessage(a=>{this._onMessage.fire(a.message)}),this._html&&this._webview.setHtml(this._html)}};e.WebviewContent=S,fe([(0,t.Input)()],S.prototype,"webviewId",void 0),fe([D.memoize],S.prototype,"connection",null),fe([D.memoize],S.prototype,"serverInfo",null),e.WebviewContent=S=fe([(0,t.Component)({template:"",selector:"webview-content"}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>T.CommonServiceInterface))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(f.IDashboardViewService)),O(3,(0,t.Inject)(m.IWebviewService))],S)}),define(Q[3657],Y([1,0,40,6,434,942,185,1609]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DashboardWebviewContainer=void 0;let f=class extends b.DashboardTab{constructor(){super(),this._onResize=new y.Emitter,this.onResize=this._onResize.event}ngAfterContentInit(){this._register(this._webviewContent.onResize(()=>{this._onResize.fire()}))}layout(){this._webviewContent.layout()}get id(){return this.tab.id}get editable(){return this.tab.editable}refresh(){}};e.DashboardWebviewContainer=f,fe([(0,t.Input)()],f.prototype,"tab",void 0),fe([(0,t.ViewChild)(D.WebviewContent)],f.prototype,"_webviewContent",void 0),e.DashboardWebviewContainer=f=fe([(0,t.Component)({selector:"dashboard-webview-container",providers:[{provide:T.TabChild,useExisting:(0,t.forwardRef)(()=>f)}],template:` <webview-content [webviewId]="tab.id"> </webview-content> `})],f)}),define(Q[1323],Y([1,0,40,6,102,554,144,680,222]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewWidget=void 0;const m="webview-widget";let S=class extends D.DashboardWidget{constructor(a,r,i,s,o,u){super(u),this._dashboardService=a,this._el=i,this.dashboardViewService=s,this.webviewService=o,this._onMessage=new y.Emitter,this.onMessage=this._onMessage.event,this._config=r,this._id=r.widget[m].id}ngOnInit(){this.dashboardViewService.registerWebview(this),this._createWebview()}get id(){return this._id}setHtml(a){this._html=a,this._webview&&this._webview.setHtml(a)}get connection(){const a=this._dashboardService.connectionManagementService.connectionInfo.connectionProfile;return{providerName:a.providerName,connectionId:a.id,options:a.options}}get serverInfo(){return this._dashboardService.connectionManagementService.connectionInfo.serverInfo}layout(){}sendMessage(a){this._webview&&this._webview.postMessage(a)}_createWebview(){this._webview&&this._webview.dispose(),this._onMessageDisposable&&this._onMessageDisposable.dispose(),this._webview=this.webviewService.createWebviewElement({providedViewType:this.id,title:this.id,contentOptions:{allowScripts:!0},options:{},extension:void 0}),this._webview.mountTo(this._el.nativeElement),this._onMessageDisposable=this._webview.onMessage(a=>{this._onMessage.fire(a.message)}),this._html&&this._webview.setHtml(this._html)}};e.WebviewWidget=S,fe([b.memoize],S.prototype,"connection",null),fe([b.memoize],S.prototype,"serverInfo",null),e.WebviewWidget=S=fe([(0,t.Component)({selector:m,template:"<div></div>"}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>T.CommonServiceInterface))),O(1,(0,t.Inject)(D.WIDGET_CONFIG)),O(2,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(3,(0,t.Inject)(f.IDashboardViewService)),O(4,(0,t.Inject)(v.IWebviewService)),O(5,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef)))],S)}),define(Q[3658],Y([1,0,40,7,10,41,39,222,59,155,168,15,11,1624]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0});function i(o){return{...o,localResourceRoots:Array.isArray(o.localResourceRoots)?o.localResourceRoots.map(b.URI.revive):void 0}}let s=class extends m.ComponentBase{static{r=this}static{this.standardSupportedLinkSchemes=["http","https","mailto"]}constructor(u,d,p,c,l,n){super(u,d,n),this._openerService=p,this._contextService=c,this.webviewService=l,this.id=(0,v.generateUuid)()}ngAfterViewInit(){this._createWebview(),this._register((0,y.addDisposableListener)(window,y.EventType.RESIZE,u=>{this.layout()})),this.baseInit()}_createWebview(){this._webview=this.webviewService.createWebviewElement({providedViewType:this.id,title:this.id,contentOptions:{allowScripts:!0},options:{},extension:void 0}),this._webview.mountTo(this._el.nativeElement),this._ready=new Promise(u=>{let d=this._webview._webview;const p=this._register((0,y.addDisposableListener)(d,"ipc-message",c=>{c.channel==="webview-ready"&&(p.dispose(),u())}))}),this._ready.then(()=>{this._register(this._webview.onDidClickLink(u=>this.onDidClickLink(b.URI.parse(u)))),this._register(this._webview.onMessage(u=>{this.fireEvent({eventType:S.ComponentEventType.onMessage,args:u})})),this.setHtml()}).catch(h.onUnexpectedError)}ngOnDestroy(){this.baseDestroy()}setHtml(){this._webview&&this.html&&(this._renderedHtml=this.html,this._webview.setHtml(this._renderedHtml))}sendMessage(){this._webview&&this.message&&this._webview.postMessage(this.message)}onDidClickLink(u){u&&(r.standardSupportedLinkSchemes.indexOf(u.scheme)>=0?this._openerService.open(u):this.enableCommandUris&&u.scheme==="command"&&this._openerService.open(u,{allowCommands:!0}))}get enableCommandUris(){return!!(this.options&&this.options.enableCommandUris)}layout(){this._ready&&this._ready.then(()=>{let u=this._el.nativeElement;u.style.position=this.position}).catch(h.onUnexpectedError)}setLayout(u){this.layout()}setProperties(u){this._ready&&this._ready.then(()=>{super.setProperties(u),this.options&&(this._webview.contentOptions=this.getExtendedOptions()),this.html!==this._renderedHtml&&this.setHtml(),this.extensionLocation&&(this._extensionLocationUri=b.URI.revive(this.extensionLocation)),this.sendMessage()}).catch(h.onUnexpectedError)}get message(){return this.getPropertyOrDefault(u=>u.message,void 0)}set message(u){this.setPropertyFromUI((d,p)=>{d.message=p},u)}get html(){return this.getPropertyOrDefault(u=>u.html,void 0)}set html(u){this.setPropertyFromUI((d,p)=>{d.html=p},u)}get options(){return this.getPropertyOrDefault(u=>u.options,void 0)}get extensionLocation(){return this.getPropertyOrDefault(u=>u.extensionLocation,void 0)}get extensionLocationUri(){return!this._extensionLocationUri&&this.extensionLocation&&(this._extensionLocationUri=b.URI.revive(this.extensionLocation)),this._extensionLocationUri}getExtendedOptions(){let u=this.options||{enableScripts:!0};return u=i(u),{allowScripts:u.enableScripts,localResourceRoots:u.localResourceRoots||this.getDefaultLocalResourceRoots()}}getDefaultLocalResourceRoots(){const u=this._contextService.getWorkspace().folders.map(d=>d.uri);return this.extensionLocationUri&&u.push(this.extensionLocationUri),u}};fe([(0,t.Input)()],s.prototype,"descriptor",void 0),fe([(0,t.Input)()],s.prototype,"modelStore",void 0),s=r=fe([(0,t.Component)({template:"",selector:"modelview-webview-component"}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(2,(0,t.Inject)(D.IOpenerService)),O(3,(0,t.Inject)(T.IWorkspaceContextService)),O(4,(0,t.Inject)(f.IWebviewService)),O(5,(0,t.Inject)(a.ILogService))],s),e.default=s}),define(Q[3659],Y([1,0,174,19,6,8,68,2160,7,11,222,59,78,76,147,111]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebViewDialog=void 0;let o=class extends t.Modal{constructor(d,p,c,l,n,g,w,E){super("","WebView",l,c,p,d,g,E,n,{dialogStyle:"normal",hasTitleIcon:!0}),this.webviewService=w,this._onOk=new b.Emitter,this.onOk=this._onOk.event,this._onMessage=new b.Emitter,this.id=(0,h.generateUuid)(),this._okLabel=(0,f.localize)(0,null),this._closeLabel=(0,f.localize)(1,null)}setHtml(d){this._html=d}get html(){return this._html}set okTitle(d){this._okLabel=d}get okTitle(){return this._okLabel}set closeTitle(d){this._closeLabel=d}get closeTitle(){return this._closeLabel}setHeaderTitle(d){this._headerTitle=d}get headerTitle(){return this._headerTitle}renderBody(d){this._body=v.append(d,v.$("div.webview-dialog")),this._webview=this.webviewService.createWebviewElement({providedViewType:this.id,title:this.id,contentOptions:{allowScripts:!0},options:{},extension:void 0}),this._webview.mountTo(this._body),this._register(this._webview.onMessage(p=>this._onMessage.fire(p))),this._register(this._webview)}get onMessage(){return this._onMessage.event}render(){super.render(),this._register((0,i.attachModalDialogStyler)(this,this._themeService)),this._okButton=this.addFooterButton(this._okLabel,()=>this.ok()),this._register(this._okButton)}layout(d){}updateDialogBody(){this.html&&this._webview.setHtml(this.html)}onClose(){this.ok()}onAccept(){this.ok()}ok(){this._onOk.fire(),this.close("ok")}close(d="close"){this.hide(d)}sendMessage(d){this._webview&&this._webview.postMessage(d)}open(){this.title=this.headerTitle??"",this.updateDialogBody(),this.show(),this._okButton.focus()}};e.WebViewDialog=o,e.WebViewDialog=o=fe([O(0,y.IThemeService),O(1,T.IClipboardService),O(2,s.ILayoutService),O(3,r.IAdsTelemetryService),O(4,D.IContextKeyService),O(5,m.ILogService),O(6,S.IWebviewService),O(7,a.ITextResourcePropertiesService)],o)}),define(Q[3660],Y([1,0,140,6,4,59,8,111,222]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverlayWebview=void 0;let m=class extends b.Disposable{constructor(a,r,i,s){super(),this._layoutService=r,this._webviewService=i,this._baseContextKeyService=s,this._isFirstLoad=!0,this._firstLoadPendingMessages=new Set,this._webview=this._register(new b.MutableDisposable),this._webviewEvents=this._register(new b.DisposableStore),this._html="",this._initialScrollProgress=0,this._state=void 0,this._owner=void 0,this._scopedContextKeyService=this._register(new b.MutableDisposable),this._shouldShowFindWidgetOnRestore=!1,this._isDisposed=!1,this._onDidDispose=this._register(new y.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidFocus=this._register(new y.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new y.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidClickLink=this._register(new y.Emitter),this.onDidClickLink=this._onDidClickLink.event,this._onDidReload=this._register(new y.Emitter),this.onDidReload=this._onDidReload.event,this._onDidScroll=this._register(new y.Emitter),this.onDidScroll=this._onDidScroll.event,this._onDidUpdateState=this._register(new y.Emitter),this.onDidUpdateState=this._onDidUpdateState.event,this._onMessage=this._register(new y.Emitter),this.onMessage=this._onMessage.event,this._onMissingCsp=this._register(new y.Emitter),this.onMissingCsp=this._onMissingCsp.event,this._onDidWheel=this._register(new y.Emitter),this.onDidWheel=this._onDidWheel.event,this._onFatalError=this._register(new y.Emitter),this.onFatalError=this._onFatalError.event,this.providedViewType=a.providedViewType,this.origin=a.origin??(0,D.generateUuid)(),this._title=a.title,this._extension=a.extension,this._options=a.options,this._contentOptions=a.contentOptions}get isFocused(){return!!this._webview.value?.isFocused}dispose(){this._isDisposed=!0,this._container?.domNode.remove(),this._container=void 0;for(const a of this._firstLoadPendingMessages)a.resolve(!1);this._firstLoadPendingMessages.clear(),this._onDidDispose.fire(),super.dispose()}get container(){if(this._isDisposed)throw new Error("OverlayWebview has been disposed");if(!this._container){const a=document.createElement("div");a.style.position="absolute",a.style.overflow="hidden",this._container=new t.FastDomNode(a),this._container.setVisibility("hidden"),this._layoutService.container.appendChild(a)}return this._container.domNode}claim(a,r){if(this._isDisposed)return;const i=this._owner;if(this._owner=a,this._show(),i!==a){const s=r||this._baseContextKeyService;this._scopedContextKeyService.clear(),this._scopedContextKeyService.value=s.createScoped(this.container);const o=this._findWidgetVisible?.get();this._findWidgetVisible?.reset(),this._findWidgetVisible=v.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(s),this._findWidgetVisible.set(!!o),this._findWidgetEnabled?.reset(),this._findWidgetEnabled=v.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED.bindTo(s),this._findWidgetEnabled.set(!!this.options.enableFindWidget),this._webview.value?.setContextKeyService(this._scopedContextKeyService.value)}}release(a){this._owner===a&&(this._scopedContextKeyService.clear(),this._owner=void 0,this._container&&this._container.setVisibility("hidden"),this._options.retainContextWhenHidden?(this._shouldShowFindWidgetOnRestore=!!this._findWidgetVisible?.get(),this.hideFind(!1)):(this._webview.clear(),this._webviewEvents.clear()))}layoutWebviewOverElement(a,r,i){if(!this._container||!this._container.domNode.parentElement)return;const s=a.getBoundingClientRect(),o=this._container.domNode.parentElement.getBoundingClientRect(),u=(o.height-this._container.domNode.parentElement.clientHeight)/2,d=(o.width-this._container.domNode.parentElement.clientWidth)/2;if(this._container.setTop(s.top-o.top-u),this._container.setLeft(s.left-o.left-d),this._container.setWidth(r?r.width:s.width),this._container.setHeight(r?r.height:s.height),i){const{top:p,left:c,right:l,bottom:n}=S(s,i);this._container.domNode.style.clipPath=`polygon(${c}px ${p}px, ${l}px ${p}px, ${l}px ${n}px, ${c}px ${n}px)`}}_show(){if(this._isDisposed)throw new Error("OverlayWebview is disposed");if(!this._webview.value){const a=this._webviewService.createWebviewElement({providedViewType:this.providedViewType,origin:this.origin,title:this._title,options:this._options,contentOptions:this._contentOptions,extension:this.extension});this._webview.value=a,a.state=this._state,this._scopedContextKeyService.value&&this._webview.value.setContextKeyService(this._scopedContextKeyService.value),this._html&&a.setHtml(this._html),this._options.tryRestoreScrollPosition&&(a.initialScrollProgress=this._initialScrollProgress),this._findWidgetEnabled?.set(!!this.options.enableFindWidget),a.mountTo(this.container),this._webviewEvents.clear(),this._webviewEvents.add(a.onDidFocus(()=>{this._onDidFocus.fire()})),this._webviewEvents.add(a.onDidBlur(()=>{this._onDidBlur.fire()})),this._webviewEvents.add(a.onDidClickLink(r=>{this._onDidClickLink.fire(r)})),this._webviewEvents.add(a.onMessage(r=>{this._onMessage.fire(r)})),this._webviewEvents.add(a.onMissingCsp(r=>{this._onMissingCsp.fire(r)})),this._webviewEvents.add(a.onDidWheel(r=>{this._onDidWheel.fire(r)})),this._webviewEvents.add(a.onDidReload(()=>{this._onDidReload.fire()})),this._webviewEvents.add(a.onFatalError(r=>{this._onFatalError.fire(r)})),this._webviewEvents.add(a.onDidScroll(r=>{this._initialScrollProgress=r.scrollYPercentage,this._onDidScroll.fire(r)})),this._webviewEvents.add(a.onDidUpdateState(r=>{this._state=r,this._onDidUpdateState.fire(r)})),this._isFirstLoad&&this._firstLoadPendingMessages.forEach(async r=>{r.resolve(await a.postMessage(r.message,r.transfer))}),this._isFirstLoad=!1,this._firstLoadPendingMessages.clear()}this.options.retainContextWhenHidden&&this._shouldShowFindWidgetOnRestore&&(this.showFind(!1),this._shouldShowFindWidgetOnRestore=!1),this._container?.setVisibility("visible")}setHtml(a){this._html=a,this._withWebview(r=>r.setHtml(a))}setTitle(a){this._title=a,this._withWebview(r=>r.setTitle(a))}get initialScrollProgress(){return this._initialScrollProgress}set initialScrollProgress(a){this._initialScrollProgress=a,this._withWebview(r=>r.initialScrollProgress=a)}get state(){return this._state}set state(a){this._state=a,this._withWebview(r=>r.state=a)}get extension(){return this._extension}set extension(a){this._extension=a,this._withWebview(r=>r.extension=a)}get options(){return this._options}set options(a){this._options={customClasses:this._options.customClasses,...a}}get contentOptions(){return this._contentOptions}set contentOptions(a){this._contentOptions=a,this._withWebview(r=>r.contentOptions=a)}set localResourcesRoot(a){this._withWebview(r=>r.localResourcesRoot=a)}async postMessage(a,r){if(this._webview.value)return this._webview.value.postMessage(a,r);if(this._isFirstLoad){let i;const s=new Promise(o=>i=o);return this._firstLoadPendingMessages.add({message:a,transfer:r,resolve:i}),s}return!1}focus(){this._webview.value?.focus()}reload(){this._webview.value?.reload()}selectAll(){this._webview.value?.selectAll()}copy(){this._webview.value?.copy()}paste(){this._webview.value?.paste()}cut(){this._webview.value?.cut()}undo(){this._webview.value?.undo()}redo(){this._webview.value?.redo()}showFind(a=!0){this._webview.value&&(this._webview.value.showFind(a),this._findWidgetVisible?.set(!0))}hideFind(a=!0){this._findWidgetVisible?.reset(),this._webview.value?.hideFind(a)}runFindAction(a){this._webview.value?.runFindAction(a)}_withWebview(a){this._webview.value&&a(this._webview.value)}windowDidDragStart(){this._webview.value?.windowDidDragStart()}windowDidDragEnd(){this._webview.value?.windowDidDragEnd()}setContextKeyService(a){this._webview.value?.setContextKeyService(a)}};e.OverlayWebview=m,e.OverlayWebview=m=fe([O(1,f.ILayoutService),O(2,v.IWebviewService),O(3,T.IContextKeyService)],m);function S(h,a){const r=a.getBoundingClientRect(),i=Math.max(r.top-h.top,0),s=Math.max(h.width-(h.right-r.right),0),o=Math.max(h.height-(h.bottom-r.bottom),0),u=Math.max(r.left-h.left,0);return{top:i,right:s,bottom:o,left:u}}}),define(Q[3661],Y([1,0,8,29,38,1266,222]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewFindWidget=void 0;let f=class extends D.SimpleFindWidget{async _getResultCount(m){}constructor(m,S,h,a){super({showCommonFindToggles:!1,checkImeCompletionState:m.checkImeCompletionState,enableSash:!0},S,h,a),this._delegate=m,this._findWidgetFocused=T.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED.bindTo(h),this._register(m.hasFindResult(r=>{this.updateButtons(r),this.focusFindBox()})),this._register(m.onDidStopFind(()=>{this.updateButtons(!1)}))}find(m){const S=this.inputValue;S&&this._delegate.find(S,m)}hide(m=!0){super.hide(m),this._delegate.stopFind(!0),this._delegate.focus()}_onInputChanged(){const m=this.inputValue;return m?this._delegate.updateFind(m):this._delegate.stopFind(!1),!1}_onFocusTrackerFocus(){this._findWidgetFocused.set(!0)}_onFocusTrackerBlur(){this._findWidgetFocused.reset()}_onFindInputFocusTrackerFocus(){}_onFindInputFocusTrackerBlur(){}findFirst(){}};e.WebviewFindWidget=f,e.WebviewFindWidget=f=fe([O(1,y.IContextViewService),O(2,t.IContextKeyService),O(3,b.IKeybindingService)],f)}),define(Q[943],Y([1,0,7,4]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewWindowDragMonitor=void 0;class b extends y.Disposable{constructor(T){super(),this._register(t.addDisposableListener(window,t.EventType.DRAG_START,()=>{T()?.windowDidDragStart()}));const f=()=>{T()?.windowDidDragEnd()};this._register(t.addDisposableListener(window,t.EventType.DRAG_END,f)),this._register(t.addDisposableListener(window,t.EventType.MOUSE_MOVE,v=>{v.buttons===0&&f()}))}}e.WebviewWindowDragMonitor=b}),define(Q[1324],Y([1,0,22,10]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeAuthority=e.asWebviewUri=e.webviewGenericCspSource=e.webviewRootResourceAuthority=e.webviewResourceBaseHost=void 0,e.webviewResourceBaseHost="vscode-cdn.net",e.webviewRootResourceAuthority=`vscode-resource.${e.webviewResourceBaseHost}`,e.webviewGenericCspSource=`'self' https://*.${e.webviewResourceBaseHost}`;function b(f,v){return f.scheme===t.Schemas.http||f.scheme===t.Schemas.https?f:(v&&v.authority&&v.isRemote&&f.scheme===t.Schemas.file&&(f=y.URI.from({scheme:t.Schemas.vscodeRemote,authority:v.authority,path:f.path})),y.URI.from({scheme:t.Schemas.https,authority:`${f.scheme}+${D(f.authority)}.${e.webviewRootResourceAuthority}`,path:f.path,fragment:f.fragment,query:f.query}))}e.asWebviewUri=b;function D(f){return f.replace(/./g,v=>{const m=v.charCodeAt(0);return m>=97&&m<=122||m>=65&&m<=90||m>=48&&m<=57?v:"-"+m.toString(16).padStart(4,"0")})}function T(f){return f.replace(/-([0-9a-f]{4})/g,(v,m)=>String.fromCharCode(parseInt(m,16)))}e.decodeAuthority=T}),define(Q[3662],Y([1,0,3029,13,100,81]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenWebviewDeveloperToolsAction=void 0;class T extends y.Action2{constructor(){super({id:"workbench.action.webview.openDeveloperTools",title:{value:t.localize(0,null),original:"Open Webview Developer Tools"},category:D.Categories.Developer,f1:!0})}async run(v){const m=v.get(b.INativeHostService);document.querySelectorAll("iframe.webview.ready").length&&(console.info(t.localize(1,null)),m.openDevTools())}}e.OpenWebviewDeveloperToolsAction=T}),define(Q[3663],Y([1,0,18,250]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowIgnoreMenuShortcutsManager=void 0;class b{constructor(T,f,v){this._nativeHostService=v,this._isUsingNativeTitleBars=T.getValue("window.titleBarStyle")==="native",this._webviewMainService=y.ProxyChannel.toService(f.getChannel("webview"))}didFocus(){this.setIgnoreMenuShortcuts(!0)}didBlur(){this.setIgnoreMenuShortcuts(!1)}get _shouldToggleMenuShortcutsEnablement(){return t.isMacintosh||this._isUsingNativeTitleBars}setIgnoreMenuShortcuts(T){this._shouldToggleMenuShortcutsEnablement&&this._webviewMainService.setIgnoreMenuShortcuts({windowId:this._nativeHostService.windowId},T)}}e.WindowIgnoreMenuShortcutsManager=b}),define(Q[424],Y([1,0,22,10,59,163]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewInput=void 0;class T extends D.EditorInput{static{this.typeId="workbench.editors.webviewInput"}get typeId(){return T.typeId}get editorId(){return this.viewType}get capabilities(){return 138}get resource(){return y.URI.from({scheme:t.Schemas.webviewPanel,path:`webview-panel/webview-${this._resourceId}`})}constructor(v,m,S){super(),this._iconManager=S,this._resourceId=(0,b.generateUuid)(),this._hasTransfered=!1,this.viewType=v.viewType,this.providedId=v.providedId,this._name=v.name,this._webview=m}dispose(){this.isDisposed()||this._hasTransfered||this._webview?.dispose(),super.dispose()}getName(){return this._name}getTitle(v){return this.getName()}getDescription(){}setName(v){this._name=v,this.webview.setTitle(v),this._onDidChangeLabel.fire()}get webview(){return this._webview}get extension(){return this.webview.extension}get iconPath(){return this._iconPath}set iconPath(v){this._iconPath=v,this._iconManager.setIcons(this._resourceId,v)}matches(v){return super.matches(v)||v===this}get group(){return this._group}updateGroup(v){this._group=v}transfer(v){if(!this._hasTransfered)return this._hasTransfered=!0,v._webview=this._webview,v}}e.WebviewInput=T}),define(Q[944],Y([1,0,31,6,4,5]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewViewService=e.IWebviewViewService=void 0,e.IWebviewViewService=(0,D.createDecorator)("webviewViewService");class T extends b.Disposable{constructor(){super(...arguments),this._resolvers=new Map,this._awaitingRevival=new Map,this._onNewResolverRegistered=this._register(new y.Emitter),this.onNewResolverRegistered=this._onNewResolverRegistered.event}register(v,m){if(this._resolvers.has(v))throw new Error(`View resolver already registered for ${v}`);this._resolvers.set(v,m),this._onNewResolverRegistered.fire({viewType:v});const S=this._awaitingRevival.get(v);return S&&m.resolve(S.webview,t.CancellationToken.None).then(()=>{this._awaitingRevival.delete(v),S.resolve()}),(0,b.toDisposable)(()=>{this._resolvers.delete(v)})}resolve(v,m,S){const h=this._resolvers.get(v);if(!h){if(this._awaitingRevival.has(v))throw new Error("View already awaiting revival");let a;const r=new Promise(i=>a=i);return this._awaitingRevival.set(v,{webview:m,resolve:a}),r}return h.resolve(m,S)}}e.WebviewViewService=T}),define(Q[3664],Y([1,0,35,944]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSingleton)(y.IWebviewViewService,y.WebviewViewService,1)}),define(Q[1325],Y([1,0,3035]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.viewsWelcomeExtensionPointDescriptor=e.ViewIdentifierMap=e.ViewsWelcomeExtensionPointFields=void 0;var y;(function(D){D.view="view",D.contents="contents",D.when="when",D.group="group",D.enablement="enablement"})(y||(e.ViewsWelcomeExtensionPointFields=y={})),e.ViewIdentifierMap={explorer:"workbench.explorer.emptyView",debug:"workbench.debug.welcome",scm:"workbench.scm",testing:"workbench.view.testing"};const b=Object.freeze({type:"array",description:t.localize(0,null),items:{type:"object",description:t.localize(1,null),required:[y.view,y.contents],properties:{[y.view]:{anyOf:[{type:"string",description:t.localize(2,null)},{type:"string",description:t.localize(3,null),enum:Object.keys(e.ViewIdentifierMap)}]},[y.contents]:{type:"string",description:t.localize(4,null)},[y.when]:{type:"string",description:t.localize(5,null)},[y.group]:{type:"string",description:t.localize(6,null)},[y.enablement]:{type:"string",description:t.localize(7,null)}}}});e.viewsWelcomeExtensionPointDescriptor={extensionPoint:"viewsWelcome",jsonSchema:b}}),define(Q[1326],Y([1,0,75,57,50,340,22,27,98,17,5]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalkThroughSnippetContentProvider=e.requireToContent=void 0;function h(r,i){if(!i.query)throw new Error("Welcome: invalid resource");const s=JSON.parse(i.query);if(!s.moduleId)throw new Error("Welcome: invalid resource");return new Promise((u,d)=>{q([s.moduleId],p=>{try{u(r.invokeFunction(p.default))}catch(c){d(c)}})})}e.requireToContent=h;let a=class{constructor(i,s,o,u){this.textModelResolverService=i,this.languageService=s,this.modelService=o,this.instantiationService=u,this.loads=new Map,this.textModelResolverService.registerTextModelContentProvider(T.Schemas.walkThroughSnippet,this)}async textBufferFactoryFromResource(i){let s=this.loads.get(i.toString());return s||(s=h(this.instantiationService,i).then(o=>(0,v.createTextBufferFactory)(o)).finally(()=>this.loads.delete(i.toString())),this.loads.set(i.toString(),s)),s}async provideTextContent(i){const s=await this.textBufferFactoryFromResource(i.with({fragment:""}));let o=this.modelService.getModel(i);if(!o){const u=parseInt(i.fragment);let d=0;const p=new D.marked.Renderer;p.code=(w,E)=>{d++;const C=typeof E=="string"&&this.languageService.getLanguageIdByLanguageName(E)||"",I=this.languageService.createById(C),_=this.modelService.createModel(w,I,i.with({fragment:`${d}.${E}`}));return d===u&&(o=_),""};const c=s.create(1).textBuffer,l=c.getLineCount(),n=new f.Range(1,1,l,c.getLineLength(l)+1),g=c.getValueInRange(n,0);(0,D.marked)(g,{renderer:p})}return(0,m.assertIsDefined)(o)}};e.WalkThroughSnippetContentProvider=a,e.WalkThroughSnippetContentProvider=a=fe([O(0,t.ITextModelService),O(1,b.ILanguageService),O(2,y.IModelService),O(3,S.IInstantiationService)],a)}),define(Q[740],Y([1,0,163,290,75,340,22,26,1326,5]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.WalkThroughInput=void 0;class h extends y.EditorModel{constructor(i,s){super(),this.mainRef=i,this.snippetRefs=s}get main(){return this.mainRef}get snippets(){return this.snippetRefs.map(i=>i.object)}dispose(){this.snippetRefs.forEach(i=>i.dispose()),super.dispose()}}let a=S=class extends t.EditorInput{get capabilities(){return 8|super.capabilities}get resource(){return this.options.resource}constructor(i,s,o){super(),this.options=i,this.instantiationService=s,this.textModelResolverService=o,this.promise=null,this.maxTopScroll=0,this.maxBottomScroll=0}get typeId(){return this.options.typeId}getName(){return this.options.name}getDescription(){return this.options.description||""}getTelemetryFrom(){return this.options.telemetryFrom}getTelemetryDescriptor(){const i=super.getTelemetryDescriptor();return i.target=this.getTelemetryFrom(),i}get onReady(){return this.options.onReady}get layout(){return this.options.layout}resolve(){return this.promise||(this.promise=(0,v.requireToContent)(this.instantiationService,this.options.resource).then(i=>{if(this.resource.path.endsWith(".html"))return new h(i,[]);const s=[];let o=0;const u=new D.marked.Renderer;return u.code=(d,p)=>{o++;const c=this.options.resource.with({scheme:T.Schemas.walkThroughSnippet,fragment:`${o}.${p}`});return s.push(this.textModelResolverService.createModelReference(c)),`<div id="snippet-${c.fragment}" class="walkThroughEditorContainer" ></div>`},i=(0,D.marked)(i,{renderer:u}),Promise.all(s).then(d=>new h(i,d))})),this.promise}matches(i){return super.matches(i)?!0:i instanceof S?(0,f.isEqual)(i.options.resource,this.options.resource):!1}dispose(){this.promise&&(this.promise.then(i=>i.dispose()),this.promise=null),super.dispose()}relativeScrollPosition(i,s){this.maxTopScroll=Math.max(this.maxTopScroll,i),this.maxBottomScroll=Math.max(this.maxBottomScroll,s)}};e.WalkThroughInput=a,e.WalkThroughInput=a=S=fe([O(1,m.IInstantiationService),O(2,b.ITextModelService)],a)}),define(Q[3665],Y([1,0,36,3039,80]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.embeddedEditorBackground=void 0,e.embeddedEditorBackground=(0,t.registerColor)("walkThrough.embeddedEditorBackground",{dark:new b.Color(new b.RGBA(0,0,0,.4)),light:"#f4f4f4",hcDark:null,hcLight:null},(0,y.localize)(0,null))}),define(Q[1327],Y([1,0,3042,8]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MANAGE_TRUST_COMMAND_ID=e.WorkspaceTrustContext=void 0,e.WorkspaceTrustContext={IsEnabled:new y.RawContextKey("isWorkspaceTrustEnabled",!1,(0,t.localize)(0,null)),IsTrusted:new y.RawContextKey("isWorkspaceTrusted",!1,(0,t.localize)(1,null))},e.MANAGE_TRUST_COMMAND_ID="workbench.trust.manage"}),define(Q[3666],Y([1,0,3045,13,286,49,100,132,52]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UninstallShellScriptAction=e.InstallShellScriptAction=void 0;const m={value:(0,t.localize)(0,null),original:"Shell Command"};class S extends y.Action2{constructor(){super({id:"workbench.action.installCommandLine",title:{value:(0,t.localize)(1,null,b.default.applicationName),original:`Install '${b.default.applicationName}' command in PATH`},category:m,f1:!0})}async run(r){const i=r.get(T.INativeHostService),s=r.get(D.IDialogService),o=r.get(v.IProductService);try{await i.installShellCommand(),s.info((0,t.localize)(2,null,o.applicationName))}catch(u){s.error((0,f.toErrorMessage)(u))}}}e.InstallShellScriptAction=S;class h extends y.Action2{constructor(){super({id:"workbench.action.uninstallCommandLine",title:{value:(0,t.localize)(3,null,b.default.applicationName),original:`Uninstall '${b.default.applicationName}' command from PATH`},category:m,f1:!0})}async run(r){const i=r.get(T.INativeHostService),s=r.get(D.IDialogService),o=r.get(v.IProductService);try{await i.uninstallShellCommand(),s.info((0,t.localize)(4,null,o.applicationName))}catch(u){s.error((0,f.toErrorMessage)(u))}}}e.UninstallShellScriptAction=h}),define(Q[3667],Y([1,0,10,3046,895,38,97,25,57,50,43,252,9,100,32,37,39,13,81,1845]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleWindowTabsBarHandler=e.MergeWindowTabsHandlerHandler=e.MoveWindowTabToNewWindowHandler=e.ShowNextWindowTabHandler=e.ShowPreviousWindowTabHandler=e.NewWindowTabHandler=e.QuickSwitchWindowAction=e.SwitchWindowAction=e.ZoomResetAction=e.ZoomOutAction=e.ZoomInAction=e.CloseWindowAction=void 0;class p extends u.Action2{static{this.ID="workbench.action.closeWindow"}constructor(){super({id:p.ID,title:{value:(0,y.localize)(0,null),mnemonicTitle:(0,y.localize)(1,null),original:"Close Window"},f1:!0,keybinding:{weight:200,mac:{primary:3125},linux:{primary:574,secondary:[3125]},win:{primary:574,secondary:[3125]}},menu:{id:u.MenuId.MenubarFileMenu,group:"6_close",order:4}})}async run(N){return N.get(r.INativeHostService).closeWindow()}}e.CloseWindowAction=p;class c extends u.Action2{static{this.SETTING_KEY="window.zoomLevel"}static{this.MAX_ZOOM_LEVEL=8}static{this.MIN_ZOOM_LEVEL=-8}constructor(N){super(N)}async setConfiguredZoomLevel(N,P){const x=N.get(a.IConfigurationService);P=Math.round(P),!(P>c.MAX_ZOOM_LEVEL||P<c.MIN_ZOOM_LEVEL)&&(await x.updateValue(c.SETTING_KEY,P),(0,b.applyZoom)(P))}}class l extends c{constructor(){super({id:"workbench.action.zoomIn",title:{value:(0,y.localize)(2,null),mnemonicTitle:(0,y.localize)(3,null),original:"Zoom In"},category:d.Categories.View,f1:!0,keybinding:{weight:200,primary:2134,secondary:[3158,2157]},menu:{id:u.MenuId.MenubarAppearanceMenu,group:"5_zoom",order:1}})}run(N){return super.setConfiguredZoomLevel(N,(0,T.getZoomLevel)()+1)}}e.ZoomInAction=l;class n extends c{constructor(){super({id:"workbench.action.zoomOut",title:{value:(0,y.localize)(4,null),mnemonicTitle:(0,y.localize)(5,null),original:"Zoom Out"},category:d.Categories.View,f1:!0,keybinding:{weight:200,primary:2136,secondary:[3160,2159],linux:{primary:2136,secondary:[2159]}},menu:{id:u.MenuId.MenubarAppearanceMenu,group:"5_zoom",order:2}})}run(N){return super.setConfiguredZoomLevel(N,(0,T.getZoomLevel)()-1)}}e.ZoomOutAction=n;class g extends c{constructor(){super({id:"workbench.action.zoomReset",title:{value:(0,y.localize)(6,null),mnemonicTitle:(0,y.localize)(7,null),original:"Reset Zoom"},category:d.Categories.View,f1:!0,keybinding:{weight:200,primary:2146},menu:{id:u.MenuId.MenubarAppearanceMenu,group:"5_zoom",order:3}})}run(N){return super.setConfiguredZoomLevel(N,0)}}e.ZoomResetAction=g;class w extends u.Action2{constructor(N){super(N),this.closeWindowAction={iconClass:s.ThemeIcon.asClassName(i.Codicon.removeClose),tooltip:(0,y.localize)(8,null)},this.closeDirtyWindowAction={iconClass:"dirty-window "+i.Codicon.closeDirty,tooltip:(0,y.localize)(9,null),alwaysVisible:!0}}async run(N){const P=N.get(S.IQuickInputService),x=N.get(D.IKeybindingService),F=N.get(v.IModelService),V=N.get(m.ILanguageService),W=N.get(r.INativeHostService),z=W.windowId,B=await W.getWindows(),K=(0,y.localize)(10,null),H=B.map($=>{const ie=$.filename?t.URI.file($.filename):(0,o.isSingleFolderWorkspaceIdentifier)($.workspace)?$.workspace.uri:(0,o.isWorkspaceIdentifier)($.workspace)?$.workspace.configPath:void 0,J=$.filename?f.FileKind.FILE:(0,o.isSingleFolderWorkspaceIdentifier)($.workspace)?f.FileKind.FOLDER:(0,o.isWorkspaceIdentifier)($.workspace)?f.FileKind.ROOT_FOLDER:f.FileKind.FILE;return{payload:$.id,label:$.title,ariaLabel:$.dirty?(0,y.localize)(11,null,$.title):$.title,iconClasses:(0,h.getIconClasses)(F,V,ie,J),description:z===$.id?(0,y.localize)(12,null):void 0,buttons:z!==$.id?$.dirty?[this.closeDirtyWindowAction]:[this.closeWindowAction]:void 0}}),U=(H.indexOf(H.filter($=>$.payload===z)[0])+1)%H.length,G=await P.pick(H,{contextKey:"inWindowsPicker",activeItem:H[U],placeHolder:K,quickNavigate:this.isQuickNavigate()?{keybindings:x.lookupKeybindings(this.desc.id)}:void 0,hideInput:this.isQuickNavigate(),onDidTriggerItemButton:async $=>{await W.closeWindowById($.item.payload),$.removeItem()}});G&&W.focusWindow({windowId:G.payload})}}class E extends w{constructor(){super({id:"workbench.action.switchWindow",title:{value:(0,y.localize)(13,null),original:"Switch Window..."},f1:!0,keybinding:{weight:200,primary:0,mac:{primary:309}}})}isQuickNavigate(){return!1}}e.SwitchWindowAction=E;class C extends w{constructor(){super({id:"workbench.action.quickSwitchWindow",title:{value:(0,y.localize)(14,null),original:"Quick Switch Window..."},f1:!1})}isQuickNavigate(){return!0}}e.QuickSwitchWindowAction=C;const I=function(M){return M.get(r.INativeHostService).newWindowTab()};e.NewWindowTabHandler=I;const _=function(M){return M.get(r.INativeHostService).showPreviousWindowTab()};e.ShowPreviousWindowTabHandler=_;const A=function(M){return M.get(r.INativeHostService).showNextWindowTab()};e.ShowNextWindowTabHandler=A;const k=function(M){return M.get(r.INativeHostService).moveWindowTabToNewWindow()};e.MoveWindowTabToNewWindowHandler=k;const L=function(M){return M.get(r.INativeHostService).mergeAllWindowTabs()};e.MergeWindowTabsHandlerHandler=L;const R=function(M){return M.get(r.INativeHostService).toggleWindowTabsBar()};e.ToggleWindowTabsBarHandler=R}),define(Q[3668],Y([1,0,3049,260,18,68,49,11,100,52,274,228]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeDialogHandler=void 0;let a=class extends T.AbstractDialogHandler{constructor(i,s,o,u){super(),this.logService=i,this.nativeHostService=s,this.productService=o,this.clipboardService=u}async prompt(i){this.logService.trace("DialogService#prompt",i.message);const s=this.getPromptButtons(i),{response:o,checkboxChecked:u}=await this.nativeHostService.showMessageBox({type:this.getDialogType(i.type),title:i.title,message:i.message,detail:i.detail,buttons:s,cancelId:i.cancelButton?s.length-1:-1,checkboxLabel:i.checkbox?.label,checkboxChecked:i.checkbox?.checked});return this.getPromptResult(i,o,u)}async confirm(i){this.logService.trace("DialogService#confirm",i.message);const s=this.getConfirmationButtons(i),{response:o,checkboxChecked:u}=await this.nativeHostService.showMessageBox({type:this.getDialogType(i.type)??"question",title:i.title,message:i.message,detail:i.detail,buttons:s,cancelId:s.length-1,checkboxLabel:i.checkbox?.label,checkboxChecked:i.checkbox?.checked});return{confirmed:o===0,checkboxChecked:u}}input(){throw new Error("Unsupported")}async about(){let i=this.productService.version;this.productService.target?i=`${i} (${this.productService.target} setup)`:this.productService.darwinUniversalAssetId&&(i=`${i} (Universal)`);const s=await this.nativeHostService.getOSProperties(),o=c=>(0,h.aboutDetail)(i,this.productService.commit||"Unknown",this.productService.date?`${this.productService.date}${c?" ("+(0,y.fromNow)(new Date(this.productService.date),!0)+")":""}`:"Unknown",S.process.versions.electron,S.process.versions.chrome,S.process.versions.node,S.process.versions.v8,`${s.type} ${s.arch} ${s.release}${b.isLinuxSnap?" snap":""}`,this.productService.vscodeVersion),u=o(!0),d=o(!1),{response:p}=await this.nativeHostService.showMessageBox({type:"info",message:this.productService.nameLong,detail:` ${u}`,buttons:[(0,t.localize)(0,null),(0,t.localize)(1,null)]});p===0&&this.clipboardService.writeText(d)}};e.NativeDialogHandler=a,e.NativeDialogHandler=a=fe([O(0,f.ILogService),O(1,v.INativeHostService),O(2,m.IProductService),O(3,D.IClipboardService)],a)}),define(Q[223],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressBadge=e.IconBadge=e.TextBadge=e.NumberBadge=e.IActivityService=void 0,e.IActivityService=(0,t.createDecorator)("activityService");class y{constructor(m){this.descriptorFn=m,this.descriptorFn=m}getDescription(){return this.descriptorFn(null)}}class b extends y{constructor(m,S){super(S),this.number=m,this.number=m}getDescription(){return this.descriptorFn(this.number)}}e.NumberBadge=b;class D extends y{constructor(m,S){super(S),this.text=m}}e.TextBadge=D;class T extends y{constructor(m,S){super(S),this.icon=m}}e.IconBadge=T;class f extends y{}e.ProgressBadge=f}),define(Q[1328],Y([1,0,5,14,35,145,11]),function(q,e,t,y,b,D,T){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.AiEmbeddingVectorService=e.IAiEmbeddingVectorService=void 0,e.IAiEmbeddingVectorService=(0,t.createDecorator)("IAiEmbeddingVectorService");let v=class{static{f=this}static{this.DEFAULT_TIMEOUT=1e3*10}constructor(S){this.logService=S,this._providers=[]}isEnabled(){return this._providers.length>0}registerAiEmbeddingVectorProvider(S,h){return this._providers.push(h),{dispose:()=>{const a=this._providers.indexOf(h);a>=0&&this._providers.splice(a,1)}}}async getEmbeddingVector(S,h){if(this._providers.length===0)throw new Error("No embedding vector providers registered");const a=D.StopWatch.create(),r=[],i=(0,y.timeout)(f.DEFAULT_TIMEOUT),s=h.onCancellationRequested(()=>{s.dispose(),i.cancel()});for(const o of this._providers)r.push((0,y.createCancelablePromise)(async u=>{try{return await o.provideAiEmbeddingVector(Array.isArray(S)?S:[S],u)}catch{}throw await i,new Error("Embedding vector provider timed out")}));r.push((0,y.createCancelablePromise)(async o=>{const u=o.onCancellationRequested(()=>{i.cancel(),u.dispose()});throw await i,new Error("Embedding vector provider timed out")}));try{const o=await(0,y.raceCancellablePromises)(r);return o.length===1?o[0]:o}finally{a.stop(),this.logService.trace(`[AiEmbeddingVectorService]: getEmbeddingVector took ${a.elapsed()}ms`)}}};e.AiEmbeddingVectorService=v,e.AiEmbeddingVectorService=v=f=fe([O(0,T.ILogService)],v),(0,b.registerSingleton)(e.IAiEmbeddingVectorService,v,1)}),define(Q[741],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RelatedInformationType=e.IAiRelatedInformationService=void 0,e.IAiRelatedInformationService=(0,t.createDecorator)("IAiRelatedInformationService");var y;(function(b){b[b.SymbolInformation=1]="SymbolInformation",b[b.CommandInformation=2]="CommandInformation",b[b.SearchInformation=3]="SearchInformation",b[b.SettingInformation=4]="SettingInformation"})(y||(e.RelatedInformationType=y={}))}),define(Q[3669],Y([1,0,14,35,145,11,741]),function(q,e,t,y,b,D,T){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.AiRelatedInformationService=void 0;let v=class{static{f=this}static{this.DEFAULT_TIMEOUT=1e3*10}constructor(S){this.logService=S,this._providers=new Map}isEnabled(){return this._providers.size>0}registerAiRelatedInformationProvider(S,h){const a=this._providers.get(S)??[];return a.push(h),this._providers.set(S,a),{dispose:()=>{const r=this._providers.get(S)??[],i=r.indexOf(h);i!==-1&&r.splice(i,1),r.length===0&&this._providers.delete(S)}}}async getRelatedInformation(S,h,a){if(this._providers.size===0)throw new Error("No related information providers registered");const r=[];for(const d of h){const p=this._providers.get(d);p&&r.push(...p)}if(r.length===0)throw new Error("No related information providers registered for the given types");const i=b.StopWatch.create(),s=[],o=(0,t.timeout)(f.DEFAULT_TIMEOUT),u=a.onCancellationRequested(()=>{u.dispose(),o.cancel()});for(const d of r)s.push((0,t.createCancelablePromise)(async p=>{try{return(await d.provideAiRelatedInformation(S,p)).filter(l=>h.includes(l.type))}catch{}throw await o,new Error("Related information provider timed out")}));s.push((0,t.createCancelablePromise)(async d=>{const p=d.onCancellationRequested(()=>{o.cancel(),p.dispose()});throw await o,new Error("Related information provider timed out")}));try{return await(0,t.raceCancellablePromises)(s)}finally{i.stop(),this.logService.trace(`[AiRelatedInformationService]: getRelatedInformation took ${i.elapsed()}ms`)}}};e.AiRelatedInformationService=v,e.AiRelatedInformationService=v=f=fe([O(0,D.ILogService)],v),(0,y.registerSingleton)(T.IAiRelatedInformationService,v,1)}),define(Q[279],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IAuthenticationService=void 0,e.IAuthenticationService=(0,t.createDecorator)("IAuthenticationService")}),define(Q[945],Y([1,0,6,1938,34,262,49,23,63,11,279]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h,a,r,i;Object.defineProperty(e,"__esModule",{value:!0}),e.GitHubCopilotSignOutAction=e.RefreshAccountAction=e.ApplyFilterAction=e.RemoveAccountAction=e.AddAccountAction=void 0;let s=class extends b.Action{static{h=this}static{this.ID="account.addLinkedAccount"}static{this.LABEL=(0,y.localize)(0,null)}get addAccountCompleteEvent(){return this._addAccountCompleteEmitter.event}get addAccountErrorEvent(){return this._addAccountErrorEmitter.event}get addAccountStartEvent(){return this._addAccountStartEmitter.event}constructor(l,n,g){super(h.ID,h.LABEL),this._providerId=l,this._accountManagementService=n,this.logService=g,this.class="add-linked-account-action",this._addAccountCompleteEmitter=this._register(new t.Emitter),this._addAccountErrorEmitter=this._register(new t.Emitter),this._addAccountStartEmitter=this._register(new t.Emitter)}async run(){this._addAccountStartEmitter.fire();try{if(this._providerId)await this._accountManagementService.addAccount(this._providerId);else{let l=await this._accountManagementService.promptProvider();await this._accountManagementService.addAccount(l)}this._addAccountCompleteEmitter.fire()}catch(l){this.logService.error(`Error while adding account: ${l}`),this._addAccountErrorEmitter.fire(l),this._addAccountCompleteEmitter.fire()}}};e.AddAccountAction=s,e.AddAccountAction=s=h=fe([O(1,D.IAccountManagementService),O(2,m.ILogService)],s);let o=class extends b.Action{static{a=this}static{this.ID="account.removeAccount"}static{this.LABEL=(0,y.localize)(1,null)}constructor(l,n,g,w){super(a.ID,a.LABEL,"remove-account-action codicon remove"),this._account=l,this._dialogService=n,this._notificationService=g,this._accountManagementService=w}async run(){const l={message:(0,y.localize)(2,null,this._account.displayInfo.displayName),primaryButton:(0,y.localize)(3,null),cancelButton:(0,y.localize)(4,null),type:"question"};if((await this._dialogService.confirm(l))?.confirmed)try{await this._accountManagementService.removeAccount(this._account.key)}catch{this._notificationService.notify({severity:v.default.Error,message:(0,y.localize)(5,null)})}}};e.RemoveAccountAction=o,e.RemoveAccountAction=o=a=fe([O(1,T.IDialogService),O(2,f.INotificationService),O(3,D.IAccountManagementService)],o);class u extends b.Action{static{this.ID="account.applyFilters"}static{this.LABEL=(0,y.localize)(6,null)}constructor(l,n){super(l,n,"apply-filters-action codicon filter")}async run(){}}e.ApplyFilterAction=u;let d=class extends b.Action{static{r=this}static{this.ID="account.refresh"}static{this.LABEL=(0,y.localize)(7,null)}constructor(l,n){super(r.ID,r.LABEL,"refresh-account-action codicon refresh"),this._accountManagementService=l,this.logService=n}async run(){if(this.account)try{await this._accountManagementService.refreshAccount(this.account)}catch(l){this.logService.error(`Error while refreshing account: ${l}`)}else{const l=(0,y.localize)(8,null);throw new Error(l)}}};e.RefreshAccountAction=d,e.RefreshAccountAction=d=r=fe([O(0,D.IAccountManagementService),O(1,m.ILogService)],d);let p=class extends b.Action{static{i=this}static{this.ID="account.github.copilot.sign.out"}static{this.LABEL=(0,y.localize)(9,null)}constructor(l,n,g){super(i.ID,i.LABEL,"remove-account-action codicon remove"),this._account=l,this._accountManagementService=n,this.authenticationService=g}async run(){this.authenticationService.onDidChangeSessions(async()=>{await this._accountManagementService.updateAccountListAuthSessions(this._account)});const l=this._account.key.providerId,g=(await this.authenticationService.getSessions(l)).filter(w=>w.account.label===this._account.displayInfo.userId);await this.authenticationService.removeAccountSessions(l,this._account.displayInfo.userId,g)}};e.GitHubCopilotSignOutAction=p,e.GitHubCopilotSignOutAction=p=i=fe([O(1,D.IAccountManagementService),O(2,S.IAuthenticationService)],p)}),define(Q[3670],Y([1,0,6,262,20,11,279]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccountViewModel=void 0;let f=class{get addProviderEvent(){return this._addProviderEmitter.event}get removeProviderEvent(){return this._removeProviderEmitter.event}get updateAccountListEvent(){return this._updateAccountListEmitter.event}constructor(m,S,h){this._accountManagementService=m,this._logService=S,this._authenticationService=h,this._addProviderEmitter=new t.Emitter,this._removeProviderEmitter=new t.Emitter,this._updateAccountListEmitter=new t.Emitter,this._accountManagementService.addAccountProviderEvent(a=>this._addProviderEmitter.fire(a)),this._accountManagementService.removeAccountProviderEvent(a=>this._removeProviderEmitter.fire(a)),this._accountManagementService.updateAccountListEvent(a=>this._updateAccountListEmitter.fire(a))}async initialize(){try{let m=await this.getAccountsForProviders();const S=await this.getAccountForSessions();return m=m.concat(S),(0,b.coalesce)(m)}catch(m){return this._logService.warn(`Error getting account provider metadata : ${m}`),[]}}async getAccountsForProviders(){const m=await this._accountManagementService.getAccountProviderMetadata();return(await Promise.all(m.map(async h=>{try{const a=await this._accountManagementService.getAccountsForProvider(h.id);return{addedProvider:h,initialAccounts:a}}catch(a){this._logService.warn(`Error getting accounts for provider ${h.id} : ${a}`);return}}))).filter(h=>!!h)}async getAccountForSessions(){const m=[],S=this._authenticationService.getProviderIds();for(const h of S){const a=this._authenticationService.getLabel(h),r=h==="github"?"github":"microsoft",s=(await this._authenticationService.getSessions(h)).map(u=>({key:{providerId:h,accountId:u.account.id},displayInfo:{contextualDisplayName:a,accountType:r,displayName:u.account.label,userId:u.account.label},isStale:!1})),o={addedProvider:{id:h,displayName:a},initialAccounts:s};m.push(o)}return m}};e.AccountViewModel=f,e.AccountViewModel=f=fe([O(0,y.IAccountManagementService),O(1,D.ILogService),O(2,T.IAuthenticationService)],f)}),define(Q[1329],Y([1,0,7,85,2170,5,945,1654]),function(q,e,t,y,b,D,T){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.AccountListRenderer=e.AccountPickerListRenderer=e.AccountListDelegate=void 0;class v{constructor(a){this._height=a}getHeight(a){return this._height}getTemplateId(a){return"accountListRenderer"}}e.AccountListDelegate=v;class m{static{this.TEMPLATE_ID="accountListRenderer"}get templateId(){return m.TEMPLATE_ID}renderTemplate(a){const r=Object.create(null),i=t.$("div.badge");return r.root=t.append(a,t.$("div.list-row.account-picker-list")),r.icon=t.append(r.root,t.$("div.codicon")),t.append(r.icon,i),r.badgeContent=t.append(i,t.$("div.badge-content")),r.label=t.append(r.root,t.$("div.label")),r.contextualDisplayName=t.append(r.label,t.$("div.contextual-display-name")),r.displayName=t.append(r.label,t.$("div.display-name")),r}renderElement(a,r,i){i.icon.classList.add("account-logo",a.displayInfo.accountType),i.contextualDisplayName.innerText=a.displayInfo.contextualDisplayName,i.displayName.innerText=a.displayInfo.displayName,a.isStale?i.badgeContent.className="badge-content codicon warning-badge":i.badgeContent.className="badge-content"}disposeTemplate(a){}disposeElement(a,r,i){}}e.AccountPickerListRenderer=m;let S=f=class extends m{constructor(a){super(),this._instantiationService=a}get templateId(){return f.TEMPLATE_ID}renderTemplate(a){const r=super.renderTemplate(a);return r.content=t.append(r.label,t.$("div.content")),r.actions=new y.ActionBar(r.root,{animated:!1}),r}renderElement(a,r,i){super.renderElement(a,r,i),a.isStale?i.content.innerText=(0,b.localize)(0,null):i.content.innerText="",i.actions.clear();const s={icon:!0,label:!1};if(a.isStale){const o=this._instantiationService.createInstance(T.RefreshAccountAction);o.account=a,i.actions.push(o,s)}if(a.key.providerId==="github"){const o=this._instantiationService.createInstance(T.GitHubCopilotSignOutAction,a);i.actions.push(o,s)}else{const o=this._instantiationService.createInstance(T.RemoveAccountAction,a);i.actions.push(o,s)}}};e.AccountListRenderer=S,e.AccountListRenderer=S=f=fe([O(0,D.IInstantiationService)],S)}),define(Q[3671],Y([1,0,7,2172,6,179,29,36,278,5,4,85,19,2312,945,1329,3154,1109,54,101,1655]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.AccountPicker=void 0;let l=class extends S.Disposable{static{c=this}static{this.ACCOUNTPICKERLIST_HEIGHT=47}static{this.ACCOUNTTENANTLIST_HEIGHT=32}get addAccountCompleteEvent(){return this._addAccountCompleteEmitter.event}get addAccountErrorEvent(){return this._addAccountErrorEmitter.event}get addAccountStartEvent(){return this._addAccountStartEmitter.event}get onAccountSelectionChangeEvent(){return this._onAccountSelectionChangeEvent.event}get onTenantSelectionChangeEvent(){return this._onTenantSelectionChangeEvent.event}constructor(g,w,E){super(),this._themeService=g,this._instantiationService=w,this._contextViewService=E,this._addAccountCompleteEmitter=new b.Emitter,this._addAccountErrorEmitter=new b.Emitter,this._addAccountStartEmitter=new b.Emitter,this._onAccountSelectionChangeEvent=new b.Emitter,this._onTenantSelectionChangeEvent=new b.Emitter,this.viewModel=this._instantiationService.createInstance(o.AccountPickerViewModel),this.viewModel.updateAccountListEvent(C=>{this.updateAccountList(C.accountList)})}render(g){t.append(g,this._rootContainer)}createAccountPickerComponent(){const g=new s.AccountListDelegate(c.ACCOUNTPICKERLIST_HEIGHT),w=new u.TenantListDelegate(c.ACCOUNTTENANTLIST_HEIGHT),E=new s.AccountPickerListRenderer,C=new u.TenantPickerListRenderer;this._rootContainer=t.$("div.account-picker-container");const I=(0,y.localize)(0,null),_=(0,y.localize)(1,null),A=this.createLabelElement(I,!0);this._accountListContainer=t.$("div.account-list-container");const k=this.createLabelElement(_,!0);this._tenantListContainer=t.$("div.tenant-list-container"),this._accountList=new D.List("AccountPicker",this._accountListContainer,g,[E],{setRowLineHeight:!1}),this._tenantList=new D.List("TenantPicker",this._tenantListContainer,w,[C]),this._register((0,v.attachListStyler)(this._accountList,this._themeService)),this._register((0,v.attachListStyler)(this._tenantList,this._themeService)),this._accountContainer=t.$("div.account-picker"),this._tenantContainer=t.$("div.tenant-picker"),t.append(this._accountContainer,A),t.append(this._tenantContainer,k),t.append(this._rootContainer,this._accountContainer),t.append(this._rootContainer,this._tenantContainer);const L={contextViewProvider:this._contextViewService,labelRenderer:P=>this.renderAccountLabel(P),buttonStyles:d.defaultButtonStyles,dropdownStyles:p.defaultDropdownStyles},R={contextViewProvider:this._contextViewService,labelRenderer:P=>this.renderTenantLabel(P),buttonStyles:d.defaultButtonStyles,dropdownStyles:p.defaultDropdownStyles},M=this._register(this._instantiationService.createInstance(i.AddAccountAction,void 0));this._register(M.addAccountCompleteEvent(()=>this._addAccountCompleteEmitter.fire())),this._register(M.addAccountErrorEvent(P=>this._addAccountErrorEmitter.fire(P))),this._register(M.addAccountStartEvent(()=>this._addAccountStartEmitter.fire())),this._register(M),this._dropdown=this._register(new r.DropdownList(this._accountContainer,L,this._accountListContainer,this._accountList,M)),this._tenantDropdown=this._register(new r.DropdownList(this._tenantContainer,R,this._tenantListContainer,this._tenantList)),this._register(this._accountList.onDidChangeSelection(P=>{P.elements.length===1&&(this._dropdown.renderLabel(),this.onAccountSelectionChange(P.elements[0]))})),this._register(this._tenantList.onDidChangeSelection(P=>{P.elements.length===1&&(this._tenantDropdown.renderLabel(),this.onTenantSelectionChange(P.elements[0].id))})),this._refreshContainer=t.append(this._accountContainer,t.$("div.refresh-container")),t.append(this._refreshContainer,t.$("div.sql codicon warning"));const N=new h.ActionBar(this._refreshContainer,{animated:!1});this._refreshAccountAction=this._instantiationService.createInstance(i.RefreshAccountAction),N.push(this._refreshAccountAction,{icon:!1,label:!0}),this._accountList.length>0?(this._accountList.setSelection([0]),this.onAccountSelectionChange(this._accountList.getSelectedElements()[0])):t.hide(this._refreshContainer),this._register(this._themeService.onDidColorThemeChange(P=>this.updateTheme(P))),this.updateTheme(this._themeService.getColorTheme()),this.viewModel.initialize().then(P=>{this.updateAccountList(P),this.setAccountSelection(),this.setTenantSelection()})}dispose(){super.dispose(),this._accountList&&this._accountList.dispose()}setInitialTenant(g){this.initialTenant=g}setInitialAccount(g){this.initialAccount=g}setAccountSelection(){let g=0,w=!1;for(;g<this._accountList.length;){if(this.initialAccount===this._accountList.element(g).key.accountId){w=!0;break}g++}w&&this._accountList.setSelection([g])}setTenantSelection(){let g=0,w=!1;for(;g<this._tenantList.length;){if(this.initialTenant===this._tenantList.element(g).id){w=!0;break}g++}w&&this._tenantList.setSelection([g])}createLabelElement(g,w){let E="dialog-label";w&&(E+=".header");const C=t.$(`.${E}`);return C.innerText=g,C}onAccountSelectionChange(g){this.viewModel.selectedAccount=g,g?g&&g.isStale?(this._refreshAccountAction.account=g,t.show(this._refreshContainer),t.hide(this._tenantContainer)):g&&(t.hide(this._refreshContainer),g.properties.tenants?.length>1?(t.show(this._tenantContainer),this.updateTenantList(g)):t.hide(this._tenantContainer),this.onTenantSelectionChange(g?.properties?.tenants[0]?.id)):t.hide(this._tenantContainer),this._onAccountSelectionChangeEvent.fire(g)}onTenantSelectionChange(g){this.viewModel.selectedTenantId=g,this._onTenantSelectionChangeEvent.fire(g)}renderAccountLabel(g){if(g.hasChildNodes())for(let C=0;C<g.childNodes.length;C++)g.removeChild(g.childNodes.item(C));const w=this._accountList.getSelectedElements(),E=w?w[0]:void 0;if(E){const C=t.$("div.badge"),I=t.append(g,t.$("div.selected-account-container")),_=t.append(I,t.$("div.codicon"));t.append(_,C);const A=t.append(C,t.$("div.badge-content")),k=t.append(I,t.$("div.label"));_.classList.add("icon",E.displayInfo.accountType),k.innerText=E.displayInfo.displayName+" ("+E.displayInfo.contextualDisplayName+")",E.isStale?A.className="badge-content codicon warning-badge":A.className="badge-content"}else{const C=t.append(g,t.$("div.no-account-container"));C.innerText=i.AddAccountAction.LABEL+"..."}return null}renderTenantLabel(g){if(g.hasChildNodes())for(let C=0;C<g.childNodes.length;C++)g.removeChild(g.childNodes.item(C));const w=this._tenantList.getSelectedElements(),E=w?w[0]:void 0;if(E){const C=t.append(g,t.$("div.selected-tenant-container")),I=t.append(C,t.$("div.label"));I.innerText=E.displayName.concat(" (",E.id,")")}return null}updateTenantList(g){this._tenantList.splice(0,this._tenantList.length,g?.properties?.tenants??[]),this._tenantList.setSelection([0]),this._tenantDropdown.renderLabel(),this._tenantList.layout(this._tenantList.contentHeight)}updateAccountList(g){const w=this._accountList.getSelectedElements();let E;w.length>0&&g.length>0&&(E=g.findIndex(C=>C.key.accountId===w[0].key.accountId)),this._accountList.splice(0,this._accountList.length,g),this._accountList.length>0?E&&E!==-1?this._accountList.setSelection([E]):this._accountList.setSelection([0]):(this.onAccountSelectionChange(void 0),this._dropdown.renderLabel()),this._accountList.layout(this._accountList.contentHeight)}updateTheme(g){const w=g.getColor(f.buttonBackground),E=w?w.toString():null;this._refreshContainer&&(this._refreshContainer.style.color=E??"")}};e.AccountPicker=l,e.AccountPicker=l=c=fe([O(0,a.IThemeService),O(1,m.IInstantiationService),O(2,T.IContextViewService)],l)}),define(Q[3672],Y([1,0,5,6,3671,11]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccountPickerService=void 0;let T=class{get addAccountCompleteEvent(){return this._addAccountCompleteEmitter.event}get addAccountErrorEvent(){return this._addAccountErrorEmitter.event}get addAccountStartEvent(){return this._addAccountStartEmitter.event}get onAccountSelectionChangeEvent(){return this._onAccountSelectionChangeEvent.event}get onTenantSelectionChangeEvent(){return this._onTenantSelectionChangeEvent.event}constructor(v,m){this._instantiationService=v,this._logService=m,this._addAccountCompleteEmitter=new y.Emitter,this._addAccountErrorEmitter=new y.Emitter,this._addAccountStartEmitter=new y.Emitter,this._onAccountSelectionChangeEvent=new y.Emitter,this._onTenantSelectionChangeEvent=new y.Emitter}get selectedAccount(){if(this._accountPicker)return this._accountPicker.viewModel.selectedAccount}setInitialAccountTenant(v,m){this._accountPicker?(this._accountPicker.setInitialAccount(v),this._accountPicker.setInitialTenant(m),this._logService.info(`Set initial account: ${v} and tenant: ${m}`)):this._logService.error("Account Picker was undefined. Could not set initial account/tenant for firewall dialog.")}renderAccountPicker(v){this._accountPicker||(this._accountPicker=this._instantiationService.createInstance(b.AccountPicker),this._accountPicker.createAccountPickerComponent()),this._accountPicker.addAccountCompleteEvent(()=>this._addAccountCompleteEmitter.fire()),this._accountPicker.addAccountErrorEvent(m=>this._addAccountErrorEmitter.fire(m)),this._accountPicker.addAccountStartEvent(()=>this._addAccountStartEmitter.fire()),this._accountPicker.onAccountSelectionChangeEvent(m=>this._onAccountSelectionChangeEvent.fire(m)),this._accountPicker.onTenantSelectionChangeEvent(m=>this._onTenantSelectionChangeEvent.fire(m)),this._accountPicker.render(v)}};e.AccountPickerService=T,e.AccountPickerService=T=fe([O(0,t.IInstantiationService),O(1,D.ILogService)],T)}),define(Q[742],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBannerService=void 0,e.IBannerService=(0,t.createDecorator)("bannerService")}),define(Q[3673],Y([1,0,1144,153]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,y.registerSharedProcessRemoteService)(t.IChecksumService,"checksum")}),define(Q[3674],Y([1,0,68,10,18,35,100,62]),function(q,e,t,y,b,D,T,f){"use strict";var v;Object.defineProperty(e,"__esModule",{value:!0}),e.NativeClipboardService=void 0;let m=class{static{v=this}static{this.FILE_FORMAT="code/file-list"}constructor(h){this.nativeHostService=h}async write(h,a){return this.nativeHostService.writeClipboardData(h,a)}async writeText(h,a){return this.nativeHostService.writeClipboardText(h,a)}async readText(h){return this.nativeHostService.readClipboardText(h)}async readFindText(){return b.isMacintosh?this.nativeHostService.readClipboardFindText():""}async writeFindText(h){if(b.isMacintosh)return this.nativeHostService.writeClipboardFindText(h)}async writeResources(h){if(h.length)return this.nativeHostService.writeClipboardBuffer(v.FILE_FORMAT,this.resourcesToBuffer(h))}async readResources(){return this.bufferToResources(await this.nativeHostService.readClipboardBuffer(v.FILE_FORMAT))}async hasResources(){return this.nativeHostService.hasClipboard(v.FILE_FORMAT)}resourcesToBuffer(h){return f.VSBuffer.fromString(h.map(a=>a.toString()).join(` `))}bufferToResources(h){if(!h)return[];const a=h.toString();if(!a)return[];try{return a.split(` `).map(r=>y.URI.parse(r))}catch{return[]}}};e.NativeClipboardService=m,e.NativeClipboardService=m=v=fe([O(0,T.INativeHostService)],m),(0,D.registerSingleton)(t.IClipboardService,m,1)}),define(Q[245],Y([1,0,9,5]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.APPLY_ALL_PROFILES_SETTING=e.TASKS_DEFAULT=e.IWorkbenchConfigurationService=e.USER_STANDALONE_CONFIGURATIONS=e.WORKSPACE_STANDALONE_CONFIGURATIONS=e.LAUNCH_CONFIGURATION_KEY=e.TASKS_CONFIGURATION_KEY=e.FOLDER_SCOPES=e.WORKSPACE_SCOPES=e.REMOTE_MACHINE_SCOPES=e.LOCAL_MACHINE_SCOPES=e.LOCAL_MACHINE_PROFILE_SCOPES=e.PROFILE_SCOPES=e.APPLICATION_SCOPES=e.tasksSchemaId=e.launchSchemaId=e.folderSettingsSchemaId=e.workspaceSettingsSchemaId=e.machineSettingsSchemaId=e.profileSettingsSchemaId=e.userSettingsSchemaId=e.defaultSettingsSchemaId=e.FOLDER_SETTINGS_PATH=e.FOLDER_SETTINGS_NAME=e.TASKS_FOLDER_CONFIG_FOLDER_NAME=e.FOLDER_CONFIG_FOLDER_NAME=void 0,e.FOLDER_CONFIG_FOLDER_NAME=".azuredatastudio",e.TASKS_FOLDER_CONFIG_FOLDER_NAME=".vscode",e.FOLDER_SETTINGS_NAME="settings",e.FOLDER_SETTINGS_PATH=`${e.FOLDER_CONFIG_FOLDER_NAME}/${e.FOLDER_SETTINGS_NAME}.json`,e.defaultSettingsSchemaId="vscode://schemas/settings/default",e.userSettingsSchemaId="vscode://schemas/settings/user",e.profileSettingsSchemaId="vscode://schemas/settings/profile",e.machineSettingsSchemaId="vscode://schemas/settings/machine",e.workspaceSettingsSchemaId="vscode://schemas/settings/workspace",e.folderSettingsSchemaId="vscode://schemas/settings/folder",e.launchSchemaId="vscode://schemas/launch",e.tasksSchemaId="vscode://schemas/tasks",e.APPLICATION_SCOPES=[1],e.PROFILE_SCOPES=[2,3,4,5,6],e.LOCAL_MACHINE_PROFILE_SCOPES=[3,4,5],e.LOCAL_MACHINE_SCOPES=[1,...e.LOCAL_MACHINE_PROFILE_SCOPES],e.REMOTE_MACHINE_SCOPES=[2,3,4,5,6],e.WORKSPACE_SCOPES=[3,4,5,6],e.FOLDER_SCOPES=[4,5,6],e.TASKS_CONFIGURATION_KEY="tasks",e.LAUNCH_CONFIGURATION_KEY="launch",e.WORKSPACE_STANDALONE_CONFIGURATIONS=Object.create(null),e.WORKSPACE_STANDALONE_CONFIGURATIONS[e.TASKS_CONFIGURATION_KEY]=`${e.TASKS_FOLDER_CONFIG_FOLDER_NAME}/${e.TASKS_CONFIGURATION_KEY}.json`,e.WORKSPACE_STANDALONE_CONFIGURATIONS[e.LAUNCH_CONFIGURATION_KEY]=`${e.FOLDER_CONFIG_FOLDER_NAME}/${e.LAUNCH_CONFIGURATION_KEY}.json`,e.USER_STANDALONE_CONFIGURATIONS=Object.create(null),e.USER_STANDALONE_CONFIGURATIONS[e.TASKS_CONFIGURATION_KEY]=`${e.TASKS_CONFIGURATION_KEY}.json`,e.IWorkbenchConfigurationService=(0,y.refineServiceDecorator)(t.IConfigurationService),e.TASKS_DEFAULT=`{ "version": "2.0.0", "tasks": [] }`,e.APPLY_ALL_PROFILES_SETTING="workbench.settings.applyToAllProfiles"}),define(Q[3675],Y([1,0,26,62,14]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationCache=void 0;class D{constructor(v,m,S){this.donotCacheResourcesWithSchemes=v,this.fileService=S,this.cachedConfigurations=new Map,this.cacheHome=m.cacheHome}needsCaching(v){return!this.donotCacheResourcesWithSchemes.includes(v.scheme)}read(v){return this.getCachedConfiguration(v).read()}write(v,m){return this.getCachedConfiguration(v).save(m)}remove(v){return this.getCachedConfiguration(v).remove()}getCachedConfiguration({type:v,key:m}){const S=`${v}:${m}`;let h=this.cachedConfigurations.get(S);return h||(h=new T({type:v,key:m},this.cacheHome,this.fileService),this.cachedConfigurations.set(S,h)),h}}e.ConfigurationCache=D;class T{constructor({type:v,key:m},S,h){this.fileService=h,this.cachedConfigurationFolderResource=(0,t.joinPath)(S,"CachedConfigurations",v,m),this.cachedConfigurationFileResource=(0,t.joinPath)(this.cachedConfigurationFolderResource,v==="workspaces"?"workspace.json":"configuration.json"),this.queue=new b.Queue}async read(){try{return(await this.fileService.readFile(this.cachedConfigurationFileResource)).value.toString()}catch{return""}}async save(v){await this.createCachedFolder()&&await this.queue.queue(async()=>{await this.fileService.writeFile(this.cachedConfigurationFileResource,y.VSBuffer.fromString(v))})}async remove(){try{await this.queue.queue(()=>this.fileService.del(this.cachedConfigurationFolderResource,{recursive:!0,useTrash:!1}))}catch(v){if(v.fileOperationResult!==1)throw v}}async createCachedFolder(){if(await this.fileService.exists(this.cachedConfigurationFolderResource))return!0;try{return await this.fileService.createFolder(this.cachedConfigurationFolderResource),!0}catch{return!1}}}}),define(Q[1330],Y([1,0,42,9,699,17,20]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Configuration=e.StandaloneConfigurationModelParser=e.WorkspaceConfigurationModelParser=void 0;class f extends b.ConfigurationModelParser{constructor(h){super(h),this._folders=[],this._transient=!1,this._settingsModelParser=new b.ConfigurationModelParser(h),this._launchModel=new b.ConfigurationModel,this._tasksModel=new b.ConfigurationModel}get folders(){return this._folders}get transient(){return this._transient}get settingsModel(){return this._settingsModelParser.configurationModel}get launchModel(){return this._launchModel}get tasksModel(){return this._tasksModel}reparseWorkspaceSettings(h){this._settingsModelParser.reparse(h)}getRestrictedWorkspaceSettings(){return this._settingsModelParser.restrictedConfigurations}doParseRaw(h,a){return this._folders=h.folders||[],this._transient=(0,D.isBoolean)(h.transient)&&h.transient,this._settingsModelParser.parseRaw(h.settings,a),this._launchModel=this.createConfigurationModelFrom(h,"launch"),this._tasksModel=this.createConfigurationModelFrom(h,"tasks"),super.doParseRaw(h,a)}createConfigurationModelFrom(h,a){const r=h[a];if(r){const i=(0,y.toValuesTree)(r,u=>console.error(`Conflict in settings file ${this._name}: ${u}`)),s=Object.create(null);s[a]=i;const o=Object.keys(r).map(u=>`${a}.${u}`);return new b.ConfigurationModel(s,o,[])}return new b.ConfigurationModel}}e.WorkspaceConfigurationModelParser=f;class v extends b.ConfigurationModelParser{constructor(h,a){super(h),this.scope=a}doParseRaw(h,a){const r=(0,y.toValuesTree)(h,o=>console.error(`Conflict in settings file ${this._name}: ${o}`)),i=Object.create(null);i[this.scope]=r;const s=Object.keys(h).map(o=>`${this.scope}.${o}`);return{contents:i,keys:s,overrides:[]}}}e.StandaloneConfigurationModelParser=v;class m extends b.Configuration{constructor(h,a,r,i,s,o,u,d,p,c){super(h,a,r,i,s,o,u,d,p),this._workspace=c}getValue(h,a={}){return super.getValue(h,a,this._workspace)}inspect(h,a={}){return super.inspect(h,a,this._workspace)}keys(){return super.keys(this._workspace)}compareAndDeleteFolderConfiguration(h){return this._workspace&&this._workspace.folders.length>0&&this._workspace.folders[0].uri.toString()===h.toString()?{keys:[],overrides:[]}:super.compareAndDeleteFolderConfiguration(h)}compare(h){const a=(o,u,d)=>{const p=[];return p.push(...u.filter(c=>o.indexOf(c)===-1)),p.push(...o.filter(c=>u.indexOf(c)===-1)),p.push(...o.filter(c=>u.indexOf(c)===-1?!1:(0,t.equals)(this.getValue(c,{overrideIdentifier:d}),h.getValue(c,{overrideIdentifier:d}))?this._workspace&&this._workspace.folders.some(l=>!(0,t.equals)(this.getValue(c,{resource:l.uri,overrideIdentifier:d}),h.getValue(c,{resource:l.uri,overrideIdentifier:d}))):!0)),p},r=a(this.allKeys(),h.allKeys()),i=[],s=(0,T.distinct)([...this.allOverrideIdentifiers(),...h.allOverrideIdentifiers()]);for(const o of s){const u=a(this.getAllKeysForOverrideIdentifier(o),h.getAllKeysForOverrideIdentifier(o),o);u.length&&i.push([o,u])}return{keys:r,overrides:i}}}e.Configuration=m}),define(Q[3676],Y([1,0,6,15,4,14,25,699,1330,245,56,42,122,26,16,17,1179]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FolderConfiguration=e.WorkspaceConfiguration=e.RemoteUserConfiguration=e.UserConfiguration=e.ApplicationConfiguration=e.DefaultConfiguration=void 0;class u extends o.DefaultConfiguration{static{this.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY="DefaultOverridesCacheExists"}constructor(k,L){super(),this.configurationCache=k,this.configurationRegistry=i.Registry.as(S.Extensions.Configuration),this.cachedConfigurationDefaultsOverrides={},this.cacheKey={type:"defaults",key:"configurationDefaultsOverrides"},this.updateCache=!1,L.options?.configurationDefaults&&this.configurationRegistry.registerDefaultConfigurations([{overrides:L.options.configurationDefaults}])}getConfigurationDefaultOverrides(){return this.cachedConfigurationDefaultsOverrides}async initialize(){return await this.initializeCachedConfigurationDefaultsOverrides(),super.initialize()}reload(){return this.updateCache=!0,this.cachedConfigurationDefaultsOverrides={},this.updateCachedConfigurationDefaultsOverrides(),super.reload()}hasCachedConfigurationDefaultsOverrides(){return!(0,s.isEmptyObject)(this.cachedConfigurationDefaultsOverrides)}initializeCachedConfigurationDefaultsOverrides(){return this.initiaizeCachedConfigurationDefaultsOverridesPromise||(this.initiaizeCachedConfigurationDefaultsOverridesPromise=(async()=>{try{if(window.localStorage.getItem(u.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY)){const k=await this.configurationCache.read(this.cacheKey);k&&(this.cachedConfigurationDefaultsOverrides=JSON.parse(k))}}catch{}this.cachedConfigurationDefaultsOverrides=(0,s.isObject)(this.cachedConfigurationDefaultsOverrides)?this.cachedConfigurationDefaultsOverrides:{}})()),this.initiaizeCachedConfigurationDefaultsOverridesPromise}onDidUpdateConfiguration(k,L){super.onDidUpdateConfiguration(k,L),L&&this.updateCachedConfigurationDefaultsOverrides()}async updateCachedConfigurationDefaultsOverrides(){if(!this.updateCache)return;const k={},L=this.configurationRegistry.getConfigurationDefaultsOverrides();for(const[R,M]of L)!S.OVERRIDE_PROPERTY_REGEX.test(R)&&M.value!==void 0&&(k[R]=M.value);try{Object.keys(k).length?(window.localStorage.setItem(u.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY,"yes"),await this.configurationCache.write(this.cacheKey,JSON.stringify(k))):(window.localStorage.removeItem(u.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY),await this.configurationCache.remove(this.cacheKey))}catch{}}}e.DefaultConfiguration=u;class d extends f.UserSettings{constructor(k,L,R){super(k.defaultProfile.settingsResource,{scopes:[1]},R.extUri,L),this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._register(this.onDidChange(()=>this.reloadConfigurationScheduler.schedule())),this.reloadConfigurationScheduler=this._register(new D.RunOnceScheduler(()=>this.loadConfiguration().then(M=>this._onDidChangeConfiguration.fire(M)),50))}async initialize(){return this.loadConfiguration()}async loadConfiguration(){const k=await super.loadConfiguration(),L=k.getValue(m.APPLY_ALL_PROFILES_SETTING),R=Array.isArray(L)?L:[];return this.parseOptions.include||R.length?this.reparse({...this.parseOptions,include:R}):k}}e.ApplicationConfiguration=d;class p extends b.Disposable{get hasTasksLoaded(){return this.userConfiguration.value instanceof c}constructor(k,L,R,M,N,P){super(),this.settingsResource=k,this.tasksResource=L,this.configurationParseOptions=R,this.fileService=M,this.uriIdentityService=N,this.logService=P,this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.userConfiguration=this._register(new b.MutableDisposable),this.userConfigurationChangeDisposable=this._register(new b.MutableDisposable),this.userConfiguration.value=new f.UserSettings(k,this.configurationParseOptions,N.extUri,this.fileService),this.userConfigurationChangeDisposable.value=this.userConfiguration.value.onDidChange(()=>this.reloadConfigurationScheduler.schedule()),this.reloadConfigurationScheduler=this._register(new D.RunOnceScheduler(()=>this.userConfiguration.value.loadConfiguration().then(x=>this._onDidChangeConfiguration.fire(x)),50))}async reset(k,L,R){this.settingsResource=k,this.tasksResource=L,this.configurationParseOptions=R;const M=this.uriIdentityService.extUri.dirname(this.settingsResource),N=this.tasksResource?[[m.TASKS_CONFIGURATION_KEY,this.tasksResource]]:[],P=new c(M.toString(),this.settingsResource,N,this.configurationParseOptions,this.fileService,this.uriIdentityService,this.logService),x=await P.loadConfiguration();return this.userConfiguration.value=P,this.userConfigurationChangeDisposable.value&&(this.userConfigurationChangeDisposable.value=this.userConfiguration.value.onDidChange(()=>this.reloadConfigurationScheduler.schedule())),x}async initialize(){return this.userConfiguration.value.loadConfiguration()}async reload(){return this.hasTasksLoaded?this.userConfiguration.value.loadConfiguration():this.reset(this.settingsResource,this.tasksResource,this.configurationParseOptions)}reparse(k){return this.configurationParseOptions={...this.configurationParseOptions,...k},this.userConfiguration.value.reparse(this.configurationParseOptions)}getRestrictedSettings(){return this.userConfiguration.value.getRestrictedSettings()}}e.UserConfiguration=p;class c extends b.Disposable{constructor(k,L,R,M,N,P,x){super(),this.settingsResource=L,this.standAloneConfigurationResources=R,this.fileService=N,this.uriIdentityService=P,this.logService=x,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.allResources=[this.settingsResource,...this.standAloneConfigurationResources.map(([,F])=>F)],this._register((0,b.combinedDisposable)(...this.allResources.map(F=>(0,b.combinedDisposable)(this.fileService.watch(P.extUri.dirname(F)),this.fileService.watch(F))))),this._folderSettingsModelParser=new f.ConfigurationModelParser(k),this._folderSettingsParseOptions=M,this._standAloneConfigurations=[],this._cache=new f.ConfigurationModel,this._register(t.Event.debounce(t.Event.any(t.Event.filter(this.fileService.onDidFilesChange,F=>this.handleFileChangesEvent(F)),t.Event.filter(this.fileService.onDidRunOperation,F=>this.handleFileOperationEvent(F))),()=>{},100)(()=>this._onDidChange.fire()))}async resolveContents(){const k=async M=>Promise.all(M.map(async N=>{try{return(await this.fileService.readFile(N,{atomic:!0})).value.toString()}catch(P){this.logService.trace(`Error while resolving configuration file '${N.toString()}': ${y.getErrorMessage(P)}`),P.fileOperationResult!==1&&P.fileOperationResult!==9&&this.logService.error(P)}return"{}"})),[[L],R]=await Promise.all([k([this.settingsResource]),k(this.standAloneConfigurationResources.map(([,M])=>M))]);return[L,R.map((M,N)=>[this.standAloneConfigurationResources[N][0],M])]}async loadConfiguration(){const[k,L]=await this.resolveContents();this._standAloneConfigurations=[],this._folderSettingsModelParser.parse("",this._folderSettingsParseOptions),k!==void 0&&this._folderSettingsModelParser.parse(k,this._folderSettingsParseOptions);for(let R=0;R<L.length;R++){const M=L[R][1];if(M!==void 0){const N=new v.StandaloneConfigurationModelParser(this.standAloneConfigurationResources[R][1].toString(),this.standAloneConfigurationResources[R][0]);N.parse(M),this._standAloneConfigurations.push(N.configurationModel)}}return this.consolidate(),this._cache}getRestrictedSettings(){return this._folderSettingsModelParser.restrictedConfigurations}reparse(k){const L=this._folderSettingsModelParser.configurationModel.contents;return this._folderSettingsParseOptions=k,this._folderSettingsModelParser.reparse(this._folderSettingsParseOptions),(0,h.equals)(L,this._folderSettingsModelParser.configurationModel.contents)||this.consolidate(),this._cache}consolidate(){this._cache=this._folderSettingsModelParser.configurationModel.merge(...this._standAloneConfigurations)}handleFileChangesEvent(k){return!!(this.allResources.some(L=>k.contains(L))||this.allResources.some(L=>k.contains(this.uriIdentityService.extUri.dirname(L),2)))}handleFileOperationEvent(k){return!!((k.isOperation(0)||k.isOperation(3)||k.isOperation(1)||k.isOperation(4))&&this.allResources.some(L=>this.uriIdentityService.extUri.isEqual(k.resource,L))||k.isOperation(1)&&this.allResources.some(L=>this.uriIdentityService.extUri.isEqual(k.resource,this.uriIdentityService.extUri.dirname(L))))}}class l extends b.Disposable{constructor(k,L,R,M,N){super(),this._userConfigurationInitializationPromise=null,this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidInitialize=this._register(new t.Emitter),this.onDidInitialize=this._onDidInitialize.event,this._fileService=R,this._userConfiguration=this._cachedConfiguration=new g(k,L,{scopes:m.REMOTE_MACHINE_SCOPES}),N.getEnvironment().then(async P=>{if(P){const x=this._register(new n(P.settingsPath,{scopes:m.REMOTE_MACHINE_SCOPES},this._fileService,M));this._register(x.onDidChangeConfiguration(V=>this.onDidUserConfigurationChange(V))),this._userConfigurationInitializationPromise=x.initialize();const F=await this._userConfigurationInitializationPromise;this._userConfiguration.dispose(),this._userConfiguration=x,this.onDidUserConfigurationChange(F),this._onDidInitialize.fire(F)}})}async initialize(){if(this._userConfiguration instanceof n)return this._userConfiguration.initialize();let k=await this._userConfiguration.initialize();return this._userConfigurationInitializationPromise&&(k=await this._userConfigurationInitializationPromise,this._userConfigurationInitializationPromise=null),k}reload(){return this._userConfiguration.reload()}reparse(){return this._userConfiguration.reparse({scopes:m.REMOTE_MACHINE_SCOPES})}getRestrictedSettings(){return this._userConfiguration.getRestrictedSettings()}onDidUserConfigurationChange(k){this.updateCache(),this._onDidChangeConfiguration.fire(k)}async updateCache(){if(this._userConfiguration instanceof n){let k;try{k=await this._userConfiguration.resolveContent()}catch(L){if(L.fileOperationResult!==1)return}await this._cachedConfiguration.updateConfiguration(k)}}}e.RemoteUserConfiguration=l;class n extends b.Disposable{constructor(k,L,R,M){super(),this.configurationResource=k,this.fileService=R,this.uriIdentityService=M,this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.fileWatcherDisposable=b.Disposable.None,this.directoryWatcherDisposable=b.Disposable.None,this.parser=new f.ConfigurationModelParser(this.configurationResource.toString()),this.parseOptions=L,this._register(R.onDidFilesChange(N=>this.handleFileChangesEvent(N))),this._register(R.onDidRunOperation(N=>this.handleFileOperationEvent(N))),this.reloadConfigurationScheduler=this._register(new D.RunOnceScheduler(()=>this.reload().then(N=>this._onDidChangeConfiguration.fire(N)),50)),this._register((0,b.toDisposable)(()=>{this.stopWatchingResource(),this.stopWatchingDirectory()}))}watchResource(){this.fileWatcherDisposable=this.fileService.watch(this.configurationResource)}stopWatchingResource(){this.fileWatcherDisposable.dispose(),this.fileWatcherDisposable=b.Disposable.None}watchDirectory(){const k=this.uriIdentityService.extUri.dirname(this.configurationResource);this.directoryWatcherDisposable=this.fileService.watch(k)}stopWatchingDirectory(){this.directoryWatcherDisposable.dispose(),this.directoryWatcherDisposable=b.Disposable.None}async initialize(){const k=await this.fileService.exists(this.configurationResource);return this.onResourceExists(k),this.reload()}async resolveContent(){return(await this.fileService.readFile(this.configurationResource,{atomic:!0})).value.toString()}async reload(){try{const k=await this.resolveContent();return this.parser.parse(k,this.parseOptions),this.parser.configurationModel}catch{return new f.ConfigurationModel}}reparse(k){return this.parseOptions=k,this.parser.reparse(this.parseOptions),this.parser.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}handleFileChangesEvent(k){let L=k.contains(this.configurationResource,0);k.contains(this.configurationResource,1)?(L=!0,this.onResourceExists(!0)):k.contains(this.configurationResource,2)&&(L=!0,this.onResourceExists(!1)),L&&this.reloadConfigurationScheduler.schedule()}handleFileOperationEvent(k){(k.isOperation(0)||k.isOperation(3)||k.isOperation(1)||k.isOperation(4))&&this.uriIdentityService.extUri.isEqual(k.resource,this.configurationResource)&&this.reloadConfigurationScheduler.schedule()}onResourceExists(k){k?(this.stopWatchingDirectory(),this.watchResource()):(this.stopWatchingResource(),this.watchDirectory())}}class g extends b.Disposable{constructor(k,L,R){super(),this.configurationCache=L,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.key={type:"user",key:k},this.parser=new f.ConfigurationModelParser("CachedRemoteUserConfiguration"),this.parseOptions=R,this.configurationModel=new f.ConfigurationModel}getConfigurationModel(){return this.configurationModel}initialize(){return this.reload()}reparse(k){return this.parseOptions=k,this.parser.reparse(this.parseOptions),this.configurationModel=this.parser.configurationModel,this.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}async reload(){try{const k=await this.configurationCache.read(this.key),L=JSON.parse(k);L.content&&(this.parser.parse(L.content,this.parseOptions),this.configurationModel=this.parser.configurationModel)}catch{}return this.configurationModel}async updateConfiguration(k){return k?this.configurationCache.write(this.key,JSON.stringify({content:k})):this.configurationCache.remove(this.key)}}class w extends b.Disposable{get initialized(){return this._initialized}constructor(k,L,R,M){super(),this.configurationCache=k,this.fileService=L,this.uriIdentityService=R,this.logService=M,this._workspaceConfigurationDisposables=this._register(new b.DisposableStore),this._workspaceIdentifier=null,this._isWorkspaceTrusted=!1,this._onDidUpdateConfiguration=this._register(new t.Emitter),this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this._initialized=!1,this.fileService=L,this._workspaceConfiguration=this._cachedConfiguration=new C(k)}async initialize(k,L){this._workspaceIdentifier=k,this._isWorkspaceTrusted=L,this._initialized||(this.configurationCache.needsCaching(this._workspaceIdentifier.configPath)?(this._workspaceConfiguration=this._cachedConfiguration,this.waitAndInitialize(this._workspaceIdentifier)):this.doInitialize(new E(this.fileService,this.uriIdentityService,this.logService))),await this.reload()}async reload(){this._workspaceIdentifier&&await this._workspaceConfiguration.load(this._workspaceIdentifier,{scopes:m.WORKSPACE_SCOPES,skipRestricted:this.isUntrusted()})}getFolders(){return this._workspaceConfiguration.getFolders()}setFolders(k,L){return this._workspaceIdentifier?L.write(this._workspaceIdentifier.configPath,[{path:["folders"],value:k}],!0).then(()=>this.reload()):Promise.resolve()}isTransient(){return this._workspaceConfiguration.isTransient()}getConfiguration(){return this._workspaceConfiguration.getWorkspaceSettings()}updateWorkspaceTrust(k){return this._isWorkspaceTrusted=k,this.reparseWorkspaceSettings()}reparseWorkspaceSettings(){return this._workspaceConfiguration.reparseWorkspaceSettings({scopes:m.WORKSPACE_SCOPES,skipRestricted:this.isUntrusted()}),this.getConfiguration()}getRestrictedSettings(){return this._workspaceConfiguration.getRestrictedSettings()}async waitAndInitialize(k){if(await(0,T.whenProviderRegistered)(k.configPath,this.fileService),!(this._workspaceConfiguration instanceof E)){const L=this._register(new E(this.fileService,this.uriIdentityService,this.logService));await L.load(k,{scopes:m.WORKSPACE_SCOPES,skipRestricted:this.isUntrusted()}),this.doInitialize(L),this.onDidWorkspaceConfigurationChange(!1,!0)}}doInitialize(k){this._workspaceConfigurationDisposables.clear(),this._workspaceConfiguration=this._workspaceConfigurationDisposables.add(k),this._workspaceConfigurationDisposables.add(this._workspaceConfiguration.onDidChange(L=>this.onDidWorkspaceConfigurationChange(!0,!1))),this._initialized=!0}isUntrusted(){return!this._isWorkspaceTrusted}async onDidWorkspaceConfigurationChange(k,L){k&&await this.reload(),this.updateCache(),this._onDidUpdateConfiguration.fire(L)}async updateCache(){if(this._workspaceIdentifier&&this.configurationCache.needsCaching(this._workspaceIdentifier.configPath)&&this._workspaceConfiguration instanceof E){const k=await this._workspaceConfiguration.resolveContent(this._workspaceIdentifier);await this._cachedConfiguration.updateWorkspace(this._workspaceIdentifier,k)}}}e.WorkspaceConfiguration=w;class E extends b.Disposable{constructor(k,L,R){super(),this.fileService=k,this.logService=R,this._workspaceIdentifier=null,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.workspaceConfigurationModelParser=new v.WorkspaceConfigurationModelParser(""),this.workspaceSettings=new f.ConfigurationModel,this._register(t.Event.any(t.Event.filter(this.fileService.onDidFilesChange,M=>!!this._workspaceIdentifier&&M.contains(this._workspaceIdentifier.configPath)),t.Event.filter(this.fileService.onDidRunOperation,M=>!!this._workspaceIdentifier&&(M.isOperation(0)||M.isOperation(3)||M.isOperation(1)||M.isOperation(4))&&L.extUri.isEqual(M.resource,this._workspaceIdentifier.configPath)))(()=>this.reloadConfigurationScheduler.schedule())),this.reloadConfigurationScheduler=this._register(new D.RunOnceScheduler(()=>this._onDidChange.fire(),50)),this.workspaceConfigWatcher=this._register(this.watchWorkspaceConfigurationFile())}get workspaceIdentifier(){return this._workspaceIdentifier}async resolveContent(k){return(await this.fileService.readFile(k.configPath,{atomic:!0})).value.toString()}async load(k,L){(!this._workspaceIdentifier||this._workspaceIdentifier.id!==k.id)&&(this._workspaceIdentifier=k,this.workspaceConfigurationModelParser=new v.WorkspaceConfigurationModelParser(this._workspaceIdentifier.id),(0,b.dispose)(this.workspaceConfigWatcher),this.workspaceConfigWatcher=this._register(this.watchWorkspaceConfigurationFile()));let R="";try{R=await this.resolveContent(this._workspaceIdentifier)}catch(M){await this.fileService.exists(this._workspaceIdentifier.configPath)&&this.logService.error(M)}this.workspaceConfigurationModelParser.parse(R,L),this.consolidate()}getConfigurationModel(){return this.workspaceConfigurationModelParser.configurationModel}getFolders(){return this.workspaceConfigurationModelParser.folders}isTransient(){return this.workspaceConfigurationModelParser.transient}getWorkspaceSettings(){return this.workspaceSettings}reparseWorkspaceSettings(k){return this.workspaceConfigurationModelParser.reparseWorkspaceSettings(k),this.consolidate(),this.getWorkspaceSettings()}getRestrictedSettings(){return this.workspaceConfigurationModelParser.getRestrictedWorkspaceSettings()}consolidate(){this.workspaceSettings=this.workspaceConfigurationModelParser.settingsModel.merge(this.workspaceConfigurationModelParser.launchModel,this.workspaceConfigurationModelParser.tasksModel)}watchWorkspaceConfigurationFile(){return this._workspaceIdentifier?this.fileService.watch(this._workspaceIdentifier.configPath):b.Disposable.None}}class C{constructor(k){this.configurationCache=k,this.onDidChange=t.Event.None,this.workspaceConfigurationModelParser=new v.WorkspaceConfigurationModelParser(""),this.workspaceSettings=new f.ConfigurationModel}async load(k,L){try{const R=this.getKey(k),M=await this.configurationCache.read(R),N=JSON.parse(M);N.content&&(this.workspaceConfigurationModelParser=new v.WorkspaceConfigurationModelParser(R.key),this.workspaceConfigurationModelParser.parse(N.content,L),this.consolidate())}catch{}}get workspaceIdentifier(){return null}getConfigurationModel(){return this.workspaceConfigurationModelParser.configurationModel}getFolders(){return this.workspaceConfigurationModelParser.folders}isTransient(){return this.workspaceConfigurationModelParser.transient}getWorkspaceSettings(){return this.workspaceSettings}reparseWorkspaceSettings(k){return this.workspaceConfigurationModelParser.reparseWorkspaceSettings(k),this.consolidate(),this.getWorkspaceSettings()}getRestrictedSettings(){return this.workspaceConfigurationModelParser.getRestrictedWorkspaceSettings()}consolidate(){this.workspaceSettings=this.workspaceConfigurationModelParser.settingsModel.merge(this.workspaceConfigurationModelParser.launchModel,this.workspaceConfigurationModelParser.tasksModel)}async updateWorkspace(k,L){try{const R=this.getKey(k);L?await this.configurationCache.write(R,JSON.stringify({content:L})):await this.configurationCache.remove(R)}catch{}}getKey(k){return{type:"workspaces",key:k.id}}}class I{constructor(k,L,R,M){this.configurationCache=M,this.onDidChange=t.Event.None,this.key={type:"folder",key:(0,a.hash)((0,r.joinPath)(k,L).toString()).toString(16)},this._folderSettingsModelParser=new f.ConfigurationModelParser("CachedFolderConfiguration"),this._folderSettingsParseOptions=R,this._standAloneConfigurations=[],this.configurationModel=new f.ConfigurationModel}async loadConfiguration(){try{const k=await this.configurationCache.read(this.key),{content:L}=JSON.parse(k.toString());if(L)for(const R of Object.keys(L))if(R===m.FOLDER_SETTINGS_NAME)this._folderSettingsModelParser.parse(L[R],this._folderSettingsParseOptions);else{const M=new v.StandaloneConfigurationModelParser(R,R);M.parse(L[R]),this._standAloneConfigurations.push(M.configurationModel)}this.consolidate()}catch{}return this.configurationModel}async updateConfiguration(k,L){const R={};k&&(R[m.FOLDER_SETTINGS_NAME]=k),L.forEach(([M,N])=>{N&&(R[M]=N)}),Object.keys(R).length?await this.configurationCache.write(this.key,JSON.stringify({content:R})):await this.configurationCache.remove(this.key)}getRestrictedSettings(){return this._folderSettingsModelParser.restrictedConfigurations}reparse(k){return this._folderSettingsParseOptions=k,this._folderSettingsModelParser.reparse(this._folderSettingsParseOptions),this.consolidate(),this.configurationModel}consolidate(){this.configurationModel=this._folderSettingsModelParser.configurationModel.merge(...this._standAloneConfigurations)}getUnsupportedKeys(){return[]}}class _ extends b.Disposable{constructor(k,L,R,M,N,P,x,F,V){super(),this.workspaceFolder=L,this.workbenchState=M,this.workspaceTrusted=N,this.configurationCache=V,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.scopes=this.workbenchState===3?m.FOLDER_SCOPES:m.WORKSPACE_SCOPES,this.configurationFolder=x.extUri.joinPath(L.uri,R),this.cachedFolderConfiguration=new I(L.uri,R,{scopes:this.scopes,skipRestricted:this.isUntrusted()},V),k&&this.configurationCache.needsCaching(L.uri)?(this.folderConfiguration=this.cachedFolderConfiguration,(0,T.whenProviderRegistered)(L.uri,P).then(()=>{this.folderConfiguration=this._register(this.createFileServiceBasedConfiguration(P,x,F)),this._register(this.folderConfiguration.onDidChange(W=>this.onDidFolderConfigurationChange())),this.onDidFolderConfigurationChange()})):(this.folderConfiguration=this._register(this.createFileServiceBasedConfiguration(P,x,F)),this._register(this.folderConfiguration.onDidChange(W=>this.onDidFolderConfigurationChange())))}loadConfiguration(){return this.folderConfiguration.loadConfiguration()}updateWorkspaceTrust(k){return this.workspaceTrusted=k,this.reparse()}reparse(){const k=this.folderConfiguration.reparse({scopes:this.scopes,skipRestricted:this.isUntrusted()});return this.updateCache(),k}getRestrictedSettings(){return this.folderConfiguration.getRestrictedSettings()}isUntrusted(){return!this.workspaceTrusted}onDidFolderConfigurationChange(){this.updateCache(),this._onDidChange.fire()}createFileServiceBasedConfiguration(k,L,R){const M=L.extUri.joinPath(this.configurationFolder,`${m.FOLDER_SETTINGS_NAME}.json`),N=[m.TASKS_CONFIGURATION_KEY,m.LAUNCH_CONFIGURATION_KEY].map(P=>[P,L.extUri.joinPath(this.configurationFolder,`${P}.json`)]);return new c(this.configurationFolder.toString(),M,N,{scopes:this.scopes,skipRestricted:this.isUntrusted()},k,L,R)}async updateCache(){if(this.configurationCache.needsCaching(this.configurationFolder)&&this.folderConfiguration instanceof c){const[k,L]=await this.folderConfiguration.resolveContents();this.cachedFolderConfiguration.updateConfiguration(k,L)}}}e.FolderConfiguration=_}),define(Q[335],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSONEditingError=e.JSONEditingErrorCode=e.IJSONEditingService=void 0,e.IJSONEditingService=(0,t.createDecorator)("jsonEditingService");var y;(function(D){D[D.ERROR_INVALID_FILE=0]="ERROR_INVALID_FILE"})(y||(e.JSONEditingErrorCode=y={}));class b extends Error{constructor(T,f){super(T),this.code=f}}e.JSONEditingError=b}),define(Q[268],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VariableError=e.VariableKind=e.IConfigurationResolverService=void 0,e.IConfigurationResolverService=(0,t.createDecorator)("configurationResolverService");var y;(function(D){D.Unknown="unknown",D.Env="env",D.Config="config",D.Command="command",D.Input="input",D.ExtensionInstallFolder="extensionInstallFolder",D.WorkspaceFolder="workspaceFolder",D.Cwd="cwd",D.WorkspaceFolderBasename="workspaceFolderBasename",D.UserHome="userHome",D.LineNumber="lineNumber",D.SelectedText="selectedText",D.File="file",D.FileWorkspaceFolder="fileWorkspaceFolder",D.RelativeFile="relativeFile",D.RelativeFileDirname="relativeFileDirname",D.FileDirname="fileDirname",D.FileExtname="fileExtname",D.FileBasename="fileBasename",D.FileBasenameNoExtension="fileBasenameNoExtension",D.FileDirnameBasename="fileDirnameBasename",D.ExecPath="execPath",D.ExecInstallFolder="execInstallFolder",D.PathSeparator="pathSeparator"})(y||(e.VariableKind=y={}));class b extends Error{constructor(T,f){super(f),this.variable=T}}e.VariableError=b}),define(Q[1331],Y([1,0,2207,39,268,25,10,22]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveQueryFilePath=void 0;async function v(m,S){if(!S)return;const h=m.get(y.IWorkspaceContextService),a=m.get(b.IConfigurationResolverService),r=m.get(D.IFileService);let i=h.getWorkspace().folders;const s=await r.canHandleResource(T.URI.from({scheme:f.Schemas.vscodeRemote}));let o=(i.length>0?i:[void 0]).map(async d=>{const p=await a.resolveAsync(d,S),c=T.URI.file(p);return d?c.with({scheme:d.uri.scheme}):s?c.with({scheme:f.Schemas.vscodeRemote}):c});const u=await Promise.all(o);for(const d of u)if(await r.exists(d))return d;throw Error((0,t.localize)(0,null,u.map(d=>d.fsPath).join(` `)))}e.resolveQueryFilePath=v}),define(Q[3677],Y([1,0,3058]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inputsSchema=void 0;const y=t.localize(0,null),b=t.localize(1,null),D=t.localize(2,null),T=t.localize(3,null);e.inputsSchema={definitions:{inputs:{type:"array",description:t.localize(4,null),items:{oneOf:[{type:"object",required:["id","type","description"],additionalProperties:!1,properties:{id:{type:"string",description:y},type:{type:"string",description:b,enum:["promptString"],enumDescriptions:[t.localize(5,null)]},description:{type:"string",description:D},default:{type:"string",description:T},password:{type:"boolean",description:t.localize(6,null)}}},{type:"object",required:["id","type","description","options"],additionalProperties:!1,properties:{id:{type:"string",description:y},type:{type:"string",description:b,enum:["pickString"],enumDescriptions:[t.localize(7,null)]},description:{type:"string",description:D},default:{type:"string",description:T},options:{type:"array",description:t.localize(8,null),items:{oneOf:[{type:"string"},{type:"object",required:["value"],additionalProperties:!1,properties:{label:{type:"string",description:t.localize(9,null)},value:{type:"string",description:t.localize(10,null)}}}]}}}},{type:"object",required:["id","type","command"],additionalProperties:!1,properties:{id:{type:"string",description:y},type:{type:"string",description:b,enum:["command"],enumDescriptions:[t.localize(11,null)]},command:{type:"string",description:t.localize(12,null)},args:{oneOf:[{type:"object",description:t.localize(13,null)},{type:"array",description:t.localize(14,null)},{type:"string",description:t.localize(15,null)}]}}}]}}}}}),define(Q[3678],Y([1,0,3059]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyDeprecatedVariableMessage=void 0;function y(b){b.pattern=b.pattern||"^(?!.*\\$\\{(env|config|command)\\.)",b.patternErrorMessage=b.patternErrorMessage||t.localize(0,null)}e.applyDeprecatedVariableMessage=y}),define(Q[1332],Y([1,0,55,261,17,42,18,180,3060,268,33]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractVariableResolverService=void 0;class h{static{this.VARIABLE_LHS="${"}static{this.VARIABLE_REGEXP=/\$\{(.*?)\}/g}constructor(r,i,s,o){this._contributedVariables=new Map,this._context=r,this._labelService=i,this._userHomePromise=s,o&&(this._envVariablesPromise=o.then(u=>this.prepareEnv(u)))}prepareEnv(r){if(T.isWindows){const i=Object.create(null);return Object.keys(r).forEach(s=>{i[s.toLowerCase()]=r[s]}),i}return r}resolveWithEnvironment(r,i,s){return this.recursiveResolve({env:this.prepareEnv(r),userHome:void 0},i?i.uri:void 0,s)}async resolveAsync(r,i){const s={env:await this._envVariablesPromise,userHome:await this._userHomePromise};return this.recursiveResolve(s,r?r.uri:void 0,i)}async resolveAnyBase(r,i,s,o){const u=D.deepClone(i);T.isWindows&&u.windows?Object.keys(u.windows).forEach(p=>u[p]=u.windows[p]):T.isMacintosh&&u.osx?Object.keys(u.osx).forEach(p=>u[p]=u.osx[p]):T.isLinux&&u.linux&&Object.keys(u.linux).forEach(p=>u[p]=u.linux[p]),delete u.windows,delete u.osx,delete u.linux;const d={env:await this._envVariablesPromise,userHome:await this._userHomePromise};return this.recursiveResolve(d,r?r.uri:void 0,u,s,o)}async resolveAnyAsync(r,i,s){return this.resolveAnyBase(r,i,s)}async resolveAnyMap(r,i,s){const o=new Map;return{newConfig:await this.resolveAnyBase(r,i,s,o),resolvedVariables:o}}resolveWithInteractionReplace(r,i,s,o){throw new Error("resolveWithInteractionReplace not implemented.")}resolveWithInteraction(r,i,s,o){throw new Error("resolveWithInteraction not implemented.")}contributeVariable(r,i){if(this._contributedVariables.has(r))throw new Error("Variable "+r+" is contributed twice.");this._contributedVariables.set(r,i)}async recursiveResolve(r,i,s,o,u){if(b.isString(s))return this.resolveString(r,i,s,o,u);if(Array.isArray(s))return Promise.all(s.map(d=>this.recursiveResolve(r,i,d,o,u)));if(b.isObject(s)){const d=Object.create(null),p=await Promise.all(Object.keys(s).map(async c=>[await this.resolveString(r,i,c,o,u),await this.recursiveResolve(r,i,s[c],o,u)]));for(const[c,l]of p)d[c]=l;return d}return s}resolveString(r,i,s,o,u){return(0,S.replaceAsync)(s,h.VARIABLE_REGEXP,async(d,p)=>{if(p.includes(h.VARIABLE_LHS))return d;let c=await this.evaluateSingleVariable(r,d,p,i,o);return u?.set(p,c),c!==d&&b.isString(c)&&c.match(h.VARIABLE_REGEXP)&&(c=await this.resolveString(r,i,c,o,u)),c})}fsPath(r){return this._labelService?this._labelService.getUriLabel(r,{noPrefix:!0}):r.fsPath}async evaluateSingleVariable(r,i,s,o,u){let d;const p=s.split(":");p.length>1&&(s=p[0],d=p[1]);const c=g=>{const w=this._context.getFilePath();if(w)return(0,f.normalizeDriveLetter)(w);throw new m.VariableError(g,(0,v.localize)(0,null,i))},l=g=>{const w=c(g);if(this._context.getWorkspaceFolderPathForFile){const E=this._context.getWorkspaceFolderPathForFile();if(E)return(0,f.normalizeDriveLetter)(E)}throw new m.VariableError(g,(0,v.localize)(1,null,i,t.basename(w)))},n=g=>{if(d){const w=this._context.getFolderUri(d);if(w)return w;throw new m.VariableError(g,(0,v.localize)(2,null,i,d))}if(o)return o;throw this._context.getWorkspaceFolderCount()>1?new m.VariableError(g,(0,v.localize)(3,null,i)):new m.VariableError(g,(0,v.localize)(4,null,i))};switch(s){case"env":if(d){if(r.env){const g=r.env[T.isWindows?d.toLowerCase():d];if(b.isString(g))return g}return""}throw new m.VariableError(m.VariableKind.Env,(0,v.localize)(5,null,i));case"config":if(d){const g=this._context.getConfigurationValue(o,d);if(b.isUndefinedOrNull(g))throw new m.VariableError(m.VariableKind.Config,(0,v.localize)(6,null,i,d));if(b.isObject(g))throw new m.VariableError(m.VariableKind.Config,(0,v.localize)(7,null,i,d));return g}throw new m.VariableError(m.VariableKind.Config,(0,v.localize)(8,null,i));case"command":return this.resolveFromMap(m.VariableKind.Command,i,d,u,"command");case"input":return this.resolveFromMap(m.VariableKind.Input,i,d,u,"input");case"extensionInstallFolder":if(d){const g=await this._context.getExtension(d);if(!g)throw new m.VariableError(m.VariableKind.ExtensionInstallFolder,(0,v.localize)(9,null,i,d));return this.fsPath(g.extensionLocation)}throw new m.VariableError(m.VariableKind.ExtensionInstallFolder,(0,v.localize)(10,null,i));default:switch(s){case"workspaceRoot":case"workspaceFolder":return(0,f.normalizeDriveLetter)(this.fsPath(n(m.VariableKind.WorkspaceFolder)));case"cwd":return o||d?(0,f.normalizeDriveLetter)(this.fsPath(n(m.VariableKind.Cwd))):y.cwd();case"workspaceRootFolderName":case"workspaceFolderBasename":return(0,f.normalizeDriveLetter)(t.basename(this.fsPath(n(m.VariableKind.WorkspaceFolderBasename))));case"userHome":{if(r.userHome)return r.userHome;throw new m.VariableError(m.VariableKind.UserHome,(0,v.localize)(11,null,i))}case"lineNumber":{const g=this._context.getLineNumber();if(g)return g;throw new m.VariableError(m.VariableKind.LineNumber,(0,v.localize)(12,null,i))}case"selectedText":{const g=this._context.getSelectedText();if(g)return g;throw new m.VariableError(m.VariableKind.SelectedText,(0,v.localize)(13,null,i))}case"file":return c(m.VariableKind.File);case"fileWorkspaceFolder":return l(m.VariableKind.FileWorkspaceFolder);case"relativeFile":return o||d?t.relative(this.fsPath(n(m.VariableKind.RelativeFile)),c(m.VariableKind.RelativeFile)):c(m.VariableKind.RelativeFile);case"relativeFileDirname":{const g=t.dirname(c(m.VariableKind.RelativeFileDirname));if(o||d){const w=t.relative(this.fsPath(n(m.VariableKind.RelativeFileDirname)),g);return w.length===0?".":w}return g}case"fileDirname":return t.dirname(c(m.VariableKind.FileDirname));case"fileExtname":return t.extname(c(m.VariableKind.FileExtname));case"fileBasename":return t.basename(c(m.VariableKind.FileBasename));case"fileBasenameNoExtension":{const g=t.basename(c(m.VariableKind.FileBasenameNoExtension));return g.slice(0,g.length-t.extname(g).length)}case"fileDirnameBasename":return t.basename(t.dirname(c(m.VariableKind.FileDirnameBasename)));case"execPath":{const g=this._context.getExecPath();return g||i}case"execInstallFolder":{const g=this._context.getAppRoot();return g||i}case"pathSeparator":return t.sep;default:try{const g=d?`${s}:${d}`:s;return this.resolveFromMap(m.VariableKind.Unknown,i,g,u,void 0)}catch{return i}}}}resolveFromMap(r,i,s,o,u){if(s&&o){const d=u===void 0?o[s]:o[u+":"+s];if(typeof d=="string")return d;throw new m.VariableError(r,(0,v.localize)(14,null,i))}return i}}e.AbstractVariableResolverService=h}),define(Q[3679],Y([1,0,14,22,17,123,3057,47,1332]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseConfigurationResolverService=void 0;class m extends v.AbstractVariableResolverService{static{this.INPUT_OR_COMMAND_VARIABLES_PATTERN=/\${((input|command):(.*?))}/g}constructor(h,a,r,i,s,o,u,d,p,c){super({getFolderUri:l=>{const n=o.getWorkspace().folders.filter(g=>g.name===l).pop();return n?n.uri:void 0},getWorkspaceFolderCount:()=>o.getWorkspace().folders.length,getConfigurationValue:(l,n)=>i.getValue(n,l?{resource:l}:{}),getAppRoot:()=>h.getAppRoot(),getExecPath:()=>h.getExecPath(),getFilePath:()=>{const l=f.EditorResourceAccessor.getOriginalUri(r.activeEditor,{supportSideBySide:f.SideBySideEditor.PRIMARY,filterByScheme:[y.Schemas.file,y.Schemas.vscodeUserData,this.pathService.defaultUriScheme]});if(l)return this.labelService.getUriLabel(l,{noPrefix:!0})},getWorkspaceFolderPathForFile:()=>{const l=f.EditorResourceAccessor.getOriginalUri(r.activeEditor,{supportSideBySide:f.SideBySideEditor.PRIMARY,filterByScheme:[y.Schemas.file,y.Schemas.vscodeUserData,this.pathService.defaultUriScheme]});if(!l)return;const n=o.getWorkspaceFolder(l);if(n)return this.labelService.getUriLabel(n.uri,{noPrefix:!0})},getSelectedText:()=>{const l=r.activeTextEditorControl;let n=null;if((0,D.isCodeEditor)(l))n=l;else if((0,D.isDiffEditor)(l)){const E=l.getOriginalEditor(),C=l.getModifiedEditor();n=E.hasWidgetFocus()?E:C}const g=n?.getModel(),w=n?.getSelection();if(g&&w)return g.getValueInRange(w)},getLineNumber:()=>{const l=r.activeTextEditorControl;if((0,D.isCodeEditor)(l)){const n=l.getSelection();if(n){const g=n.positionLineNumber;return String(g)}}},getExtension:l=>c.getExtension(l)},d,p.userHome().then(l=>l.path),a),this.configurationService=i,this.commandService=s,this.workspaceContextService=o,this.quickInputService=u,this.labelService=d,this.pathService=p,this.userInputAccessQueue=new t.Queue}async resolveWithInteractionReplace(h,a,r,i,s){return a=await this.resolveAnyAsync(h,a),this.resolveWithInteraction(h,a,r,i,s).then(o=>o?o.size>0?this.resolveAnyAsync(h,a,Object.fromEntries(o)):a:null)}async resolveWithInteraction(h,a,r,i,s){const o=await this.resolveAnyMap(h,a);a=o.newConfig;const u=o.resolvedVariables;return this.resolveWithInputAndCommands(h,a,i,r,s).then(d=>{if(this.updateMapping(d,u))return u})}updateMapping(h,a){if(!h)return!1;for(const[r,i]of Object.entries(h))a.set(r,i);return!0}async resolveWithInputAndCommands(h,a,r,i,s){if(!a)return Promise.resolve(void 0);let o=[];if(this.workspaceContextService.getWorkbenchState()!==1&&i){const p=h?{resource:h.uri}:{},c=this.configurationService.inspect(i,p);if(c&&(c.userValue||c.workspaceValue||c.workspaceFolderValue))switch(s){case 2:o=c.userValue?.inputs;break;case 5:o=c.workspaceValue?.inputs;break;default:o=c.workspaceFolderValue?.inputs}else{const l=this.configurationService.getValue(i,p);l&&(o=l.inputs)}}const u=[];this.findVariables(a,u);const d=Object.create(null);for(const p of u){const[c,l]=p.split(":",2);let n;switch(c){case"input":n=await this.showUserInput(l,o);break;case"command":{const g=(r?r[l]:void 0)||l;if(n=await this.commandService.executeCommand(g,a),typeof n!="string"&&!b.isUndefinedOrNull(n))throw new Error(T.localize(0,null,g));break}default:this._contributedVariables.has(p)&&(n=await this._contributedVariables.get(p)())}if(typeof n=="string")d[p]=n;else return}return d}findVariables(h,a){if(typeof h=="string"){let r;for(;(r=m.INPUT_OR_COMMAND_VARIABLES_PATTERN.exec(h))!==null;)if(r.length===4){const i=r[1];a.indexOf(i)<0&&a.push(i)}for(const i of this._contributedVariables.keys())a.indexOf(i)<0&&h.indexOf("${"+i+"}")>=0&&a.push(i)}else if(Array.isArray(h))for(const r of h)this.findVariables(r,a);else if(h)for(const r of Object.values(h))this.findVariables(r,a)}showUserInput(h,a){if(!a)return Promise.reject(new Error(T.localize(1,null,h,"input")));const r=a.filter(i=>i.id===h).pop();if(r){const i=s=>{throw new Error(T.localize(2,null,h,r.type,s))};switch(r.type){case"promptString":{b.isString(r.description)||i("description");const s={prompt:r.description,ignoreFocusLost:!0};return r.default&&(s.value=r.default),r.password&&(s.password=r.password),this.userInputAccessQueue.queue(()=>this.quickInputService.input(s)).then(o=>o)}case"pickString":{if(b.isString(r.description)||i("description"),Array.isArray(r.options))for(const u of r.options)!b.isString(u)&&!b.isString(u.value)&&i("value");else i("options");const s=new Array;for(const u of r.options){const d=b.isString(u)?u:u.value,p=b.isString(u)?void 0:u.label,c={label:p?`${p}: ${d}`:d,value:d};d===r.default?(c.description=T.localize(3,null),s.unshift(c)):s.push(c)}const o={placeHolder:r.description,matchOnDetail:!0,ignoreFocusLost:!0};return this.userInputAccessQueue.queue(()=>this.quickInputService.pick(s,o,void 0)).then(u=>{if(u)return u.value})}case"command":return b.isString(r.command)||i("command"),this.userInputAccessQueue.queue(()=>this.commandService.executeCommand(r.command,r.args)).then(s=>{if(typeof s=="string"||b.isUndefinedOrNull(s))return s;throw new Error(T.localize(4,null,h,r.command))});default:throw new Error(T.localize(5,null,h))}}return Promise.reject(new Error(T.localize(6,null,h)))}}e.BaseConfigurationResolverService=m}),define(Q[3680],Y([1,0,34,7,29,30,38,97,180,23,202,2318,332,18,9,3449,35,257,20,6,821,13,8,4]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuService=void 0;let w=class{get onDidShowContextMenu(){return this.impl.onDidShowContextMenu}get onDidHideContextMenu(){return this.impl.onDidHideContextMenu}constructor(I,_,A,k,L,R,M){!r.isMacintosh&&(0,a.getTitleBarStyle)(k)==="custom"?this.impl=new s.ContextMenuService(_,I,L,A,R,M):this.impl=new E(I,_,A,R,M,k)}dispose(){this.impl.dispose()}showContextMenu(I){this.impl.showContextMenu(I)}};e.ContextMenuService=w,e.ContextMenuService=w=fe([O(0,m.INotificationService),O(1,D.ITelemetryService),O(2,T.IKeybindingService),O(3,i.IConfigurationService),O(4,b.IContextViewService),O(5,l.IMenuService),O(6,n.IContextKeyService)],w);let E=class extends g.Disposable{constructor(I,_,A,k,L,R){super(),this.notificationService=I,this.telemetryService=_,this.keybindingService=A,this.menuService=k,this.contextKeyService=L,this.configurationService=R,this._onDidShowContextMenu=this._store.add(new p.Emitter),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new p.Emitter),this.onDidHideContextMenu=this._onDidHideContextMenu.event,this.useNativeContextMenuLocation=!1,this.updateUseNativeContextMenuLocation(),this._register(this.configurationService.onDidChangeConfiguration(M=>{M.affectsConfiguration("window.experimental.nativeContextMenuLocation")&&this.updateUseNativeContextMenuLocation()}))}updateUseNativeContextMenuLocation(){this.useNativeContextMenuLocation=this.configurationService.getValue("window.experimental.nativeContextMenuLocation")===!0}showContextMenu(I){I=s.ContextMenuMenuDelegate.transform(I,this.menuService,this.contextKeyService);const _=I.getActions();if(_.length){const A=(0,S.once)(()=>{I.onHide?.(!1),y.ModifierKeyEmitter.getInstance().resetKeyStatus(),this._onDidHideContextMenu.fire()}),k=this.createMenu(I,_,A),L=I.getAnchor();let R,M,N=(0,f.getZoomFactor)();if(y.isHTMLElement(L)){const P=y.getDomNodePagePosition(L);N*=y.getDomNodeZoomLevel(L),I.anchorAxisAlignment===1?(I.anchorAlignment===0?(R=P.left,M=P.top):(R=P.left+P.width,M=P.top),r.isMacintosh||window.screen.height-M<_.length*(r.isWindows?45:32)&&(M+=P.height)):I.anchorAlignment===0?(R=P.left,M=P.top+P.height):(R=P.left+P.width,M=P.top+P.height),r.isMacintosh&&(M+=4/N)}else(0,c.isAnchor)(L)?(R=L.x,M=L.y):this.useNativeContextMenuLocation||(R=L.posx+1,M=L.posy);typeof R=="number"&&(R=Math.floor(R*N)),typeof M=="number"&&(M=Math.floor(M*N)),(0,h.popup)(k,{x:R,y:M,positioningItem:I.autoSelectFirstItem?0:void 0},()=>A()),this._onDidShowContextMenu.fire()}}createMenu(I,_,A,k=new Set){const L=I.actionRunner||new t.ActionRunner;return(0,d.coalesce)(_.map(R=>this.createMenuItem(I,R,L,A,k)))}createMenuItem(I,_,A,k,L){if(_ instanceof t.Separator)return{type:"separator"};if(_ instanceof t.SubmenuAction){if(L.has(_.id)){console.warn(`Found submenu cycle: ${_.id}`);return}return{label:(0,v.unmnemonicLabel)((0,u.stripIcons)(_.label)).trim(),submenu:this.createMenu(I,_.actions,k,new Set([...L,_.id]))}}else{let R;_.checked&&(typeof I.getCheckedActionsRepresentation=="function"?R=I.getCheckedActionsRepresentation(_):R="checkbox");const M={label:(0,v.unmnemonicLabel)((0,u.stripIcons)(_.label)).trim(),checked:!!_.checked,type:R,enabled:!!_.enabled,click:P=>{k(),this.runAction(A,_,I,P)}},N=I.getKeyBinding?I.getKeyBinding(_):this.keybindingService.lookupKeybinding(_.id);if(N){const P=N.getElectronAccelerator();if(P)M.accelerator=P;else{const x=N.getLabel();x&&(M.label=`${M.label} [${x}]`)}}return M}}async runAction(I,_,A,k){A.skipTelemetry||this.telemetryService.publicLog2("workbenchActionExecuted",{id:_.id,from:"contextMenu"});const L=A.getActionsContext?A.getActionsContext(k):void 0,R=I.run(_,L);try{await R}catch(M){this.notificationService.error(M)}}};E=fe([O(0,m.INotificationService),O(1,D.ITelemetryService),O(2,T.IKeybindingService),O(3,l.IMenuService),O(4,n.IContextKeyService),O(5,i.IConfigurationService)],E),(0,o.registerSingleton)(b.IContextMenuService,w,1)}),define(Q[3681],Y([1,0,503,153]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,y.registerMainProcessRemoteService)(t.ICredentialsService,"credentials")}),define(Q[382],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDecorationsService=void 0,e.IDecorationsService=(0,t.createDecorator)("IFileDecorationsService")}),define(Q[3682],Y([1,0,6,382,283,4,14,204,7,19,37,33,3061,15,31,35,122,64,20,36,77]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsService=void 0;class l{static keyOf(_){if(Array.isArray(_))return _.map(l.keyOf).join(",");{const{color:A,letter:k}=_;return S.ThemeIcon.isThemeIcon(k)?`${A}+${k.id}`:`${A}/${k}`}}static{this._classNamesPrefix="monaco-decoration"}constructor(_,A,k){this.themeService=_,this._refCounter=0,this.data=A;const L=(0,o.hash)(k).toString(36);this.itemColorClassName=`${l._classNamesPrefix}-itemColor-${L}`,this.itemBadgeClassName=`${l._classNamesPrefix}-itemBadge-${L}`,this.bubbleBadgeClassName=`${l._classNamesPrefix}-bubbleBadge-${L}`,this.iconBadgeClassName=`${l._classNamesPrefix}-iconBadge-${L}`}acquire(){this._refCounter+=1}release(){return--this._refCounter===0}appendCSSRules(_){Array.isArray(this.data)?this._appendForMany(this.data,_):this._appendForOne(this.data,_)}_appendForOne(_,A){const{color:k,letter:L}=_;(0,v.createCSSRule)(`.${this.itemColorClassName}`,`color: ${E(k)};`,A),S.ThemeIcon.isThemeIcon(L)?this._createIconCSSRule(L,k,A):L&&(0,v.createCSSRule)(`.${this.itemBadgeClassName}::after`,`content: "${L}"; color: ${E(k)};`,A)}_appendForMany(_,A){const{color:k}=_[0];(0,v.createCSSRule)(`.${this.itemColorClassName}`,`color: ${E(k)};`,A);const L=[];let R;for(const M of _)if(S.ThemeIcon.isThemeIcon(M.letter)){R=M.letter;break}else M.letter&&L.push(M.letter);R?this._createIconCSSRule(R,k,A):(L.length&&(0,v.createCSSRule)(`.${this.itemBadgeClassName}::after`,`content: "${L.join(", ")}"; color: ${E(k)};`,A),(0,v.createCSSRule)(`.${this.bubbleBadgeClassName}::after`,`content: "\uEA71"; color: ${E(k)}; font-family: codicon; font-size: 14px; margin-right: 14px; opacity: 0.4;`,A))}_createIconCSSRule(_,A,k){const L=S.ThemeIcon.getModifier(_);L&&(_=S.ThemeIcon.modify(_,void 0));const R=(0,c.getIconRegistry)().getIcon(_.id);if(!R)return;const M=this.themeService.getProductIconTheme().getIcon(R);M&&(0,v.createCSSRule)(`.${this.iconBadgeClassName}::after`,`content: '${M.fontCharacter}'; color: ${_.color?E(_.color.id):E(A)}; font-family: ${(0,v.asCSSPropertyValue)(M.font?.id??"codicon")}; font-size: 16px; margin-right: 14px; font-weight: normal; ${L==="spin"?"animation: codicon-spin 1.5s steps(30) infinite":""}; `,k)}removeCSSRules(_){(0,v.removeCSSRulesContainingSelector)(this.itemColorClassName,_),(0,v.removeCSSRulesContainingSelector)(this.itemBadgeClassName,_),(0,v.removeCSSRulesContainingSelector)(this.bubbleBadgeClassName,_),(0,v.removeCSSRulesContainingSelector)(this.iconBadgeClassName,_)}}class n{constructor(_){this._themeService=_,this._styleElement=(0,v.createStyleSheet)(),this._decorationRules=new Map,this._dispoables=new D.DisposableStore}dispose(){this._dispoables.dispose(),this._styleElement.remove()}asDecoration(_,A){_.sort((F,V)=>(V.weight||0)-(F.weight||0));const k=l.keyOf(_);let L=this._decorationRules.get(k);L||(L=new l(this._themeService,_,k),this._decorationRules.set(k,L),L.appendCSSRules(this._styleElement)),L.acquire();const R=L.itemColorClassName;let M=L.itemBadgeClassName;const N=L.iconBadgeClassName;let P=(0,d.distinct)(_.filter(F=>!(0,h.isFalsyOrWhitespace)(F.tooltip)).map(F=>F.tooltip)).join(" \u2022 ");const x=_.some(F=>F.strikethrough);return A&&(M=L.bubbleBadgeClassName,P=(0,a.localize)(0,null)),{labelClassName:R,badgeClassName:M,iconClassName:N,strikethrough:x,tooltip:P,dispose:()=>{L?.release()&&(this._decorationRules.delete(k),L.removeCSSRules(this._styleElement),L=void 0)}}}}class g{constructor(_){this._data=b.TernarySearchTree.forUris(A=>!0),this._data.fill(!0,(0,d.asArray)(_))}affectsResource(_){return this._data.hasElementOrSubtree(_)}}class w{constructor(_,A){this.source=_,this.thenable=A}}function E(I){return I?(0,p.asCssVariable)(I):"inherit"}let C=class{constructor(_,A){this._onDidChangeDecorationsDelayed=new t.DebounceEmitter({merge:k=>k.flat()}),this._onDidChangeDecorations=new t.Emitter,this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._provider=new f.LinkedList,this._decorationStyles=new n(A),this._data=b.TernarySearchTree.forUris(k=>_.extUri.ignorePathCasing(k)),this._onDidChangeDecorationsDelayed.event(k=>{this._onDidChangeDecorations.fire(new g(k))})}dispose(){this._onDidChangeDecorations.dispose(),this._onDidChangeDecorationsDelayed.dispose()}registerDecorationsProvider(_){const A=this._provider.unshift(_);this._onDidChangeDecorations.fire({affectsResource(){return!0}});const k=()=>{const R=[];for(const[M,N]of this._data)N.delete(_)&&R.push(M);R.length>0&&this._onDidChangeDecorationsDelayed.fire(R)},L=_.onDidChange(R=>{if(!R)k();else for(const M of R){const N=this._ensureEntry(M);this._fetchData(N,M,_)}});return(0,D.toDisposable)(()=>{A(),L.dispose(),k()})}_ensureEntry(_){let A=this._data.get(_);return A||(A=new Map,this._data.set(_,A)),A}getDecoration(_,A){const k=[];let L=!1;const R=this._ensureEntry(_);for(const M of this._provider){let N=R.get(M);N===void 0&&(N=this._fetchData(R,_,M)),N&&!(N instanceof w)&&k.push(N)}if(A){const M=this._data.findSuperstr(_);if(M)for(const N of M)for(const P of N[1].values())P&&!(P instanceof w)&&P.bubble&&(k.push(P),L=!0)}return k.length===0?void 0:this._decorationStyles.asDecoration(k,L)}_fetchData(_,A,k){const L=_.get(k);L instanceof w&&(L.source.cancel(),_.delete(k));const R=new i.CancellationTokenSource,M=k.provideDecorations(A,R.token);if((0,T.isThenable)(M)){const N=new w(R,Promise.resolve(M).then(P=>{_.get(k)===N&&this._keepItem(_,k,A,P)}).catch(P=>{!(0,r.isCancellationError)(P)&&_.get(k)===N&&_.delete(k)}));return _.set(k,N),null}else return this._keepItem(_,k,A,M)}_keepItem(_,A,k,L){const R=L||null,M=_.get(A);return _.set(A,R),(R||M)&&this._onDidChangeDecorationsDelayed.fire(k),R}};e.DecorationsService=C,e.DecorationsService=C=fe([O(0,u.IUriIdentityService),O(1,m.IThemeService)],C),(0,s.registerSingleton)(y.IDecorationsService,C,1)}),define(Q[946],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorDropService=void 0,e.IEditorDropService=(0,t.createDecorator)("editorDropService")}),define(Q[70],Y([1,0,5,47]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preferredSideBySideGroupDirection=e.isEditorGroup=e.OpenEditorContext=e.GroupsOrder=e.isEditorReplacement=e.MergeGroupMode=e.GroupsArrangement=e.GroupLocation=e.GroupOrientation=e.GroupDirection=e.IEditorGroupsService=void 0,e.IEditorGroupsService=(0,t.createDecorator)("editorGroupsService");var b;(function(i){i[i.UP=0]="UP",i[i.DOWN=1]="DOWN",i[i.LEFT=2]="LEFT",i[i.RIGHT=3]="RIGHT"})(b||(e.GroupDirection=b={}));var D;(function(i){i[i.HORIZONTAL=0]="HORIZONTAL",i[i.VERTICAL=1]="VERTICAL"})(D||(e.GroupOrientation=D={}));var T;(function(i){i[i.FIRST=0]="FIRST",i[i.LAST=1]="LAST",i[i.NEXT=2]="NEXT",i[i.PREVIOUS=3]="PREVIOUS"})(T||(e.GroupLocation=T={}));var f;(function(i){i[i.MAXIMIZE=0]="MAXIMIZE",i[i.EVEN=1]="EVEN",i[i.TOGGLE=2]="TOGGLE"})(f||(e.GroupsArrangement=f={}));var v;(function(i){i[i.COPY_EDITORS=0]="COPY_EDITORS",i[i.MOVE_EDITORS=1]="MOVE_EDITORS"})(v||(e.MergeGroupMode=v={}));function m(i){const s=i;return(0,y.isEditorInput)(s?.editor)&&(0,y.isEditorInput)(s?.replacement)}e.isEditorReplacement=m;var S;(function(i){i[i.CREATION_TIME=0]="CREATION_TIME",i[i.MOST_RECENTLY_ACTIVE=1]="MOST_RECENTLY_ACTIVE",i[i.GRID_APPEARANCE=2]="GRID_APPEARANCE"})(S||(e.GroupsOrder=S={}));var h;(function(i){i[i.NEW_EDITOR=1]="NEW_EDITOR",i[i.MOVE_EDITOR=2]="MOVE_EDITOR",i[i.COPY_EDITOR=3]="COPY_EDITOR"})(h||(e.OpenEditorContext=h={}));function a(i){const s=i;return!!s&&typeof s.id=="number"&&Array.isArray(s.editors)}e.isEditorGroup=a;function r(i){return i.getValue("workbench.editor.openSideBySideDirection")==="down"?1:3}e.preferredSideBySideGroupDirection=r}),define(Q[21],Y([1,0,5,70]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isPreferredGroup=e.SIDE_GROUP=e.ACTIVE_GROUP=e.IEditorService=void 0,e.IEditorService=(0,t.createDecorator)("editorService"),e.ACTIVE_GROUP=-1,e.SIDE_GROUP=-2;function b(D){const T=D;return typeof D=="number"||(0,y.isEditorGroup)(T)}e.isPreferredGroup=b}),define(Q[3683],Y([1,0,21,123,23,1972,16,510]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLanguageId=void 0;const v=T.Registry.as(f.Extensions.LanguageAssociations);async function m(S,h,a,r){const i=S.get(t.IEditorService),s=(0,y.getCodeEditor)(i.activeTextEditorControl),o=i.activeEditorPane,d=s.getModel().getLanguageId();if(r!==d){const p=v.getAssociationForLanguage(d),c=v.getAssociationForLanguage(r);if((p||c)&&a.isDirty()){S.get(b.INotificationService).error((0,D.localize)(0,null));return}h.setLanguageId(r);let l;if(p&&(l=p.createBase(a)),c){const n=c.convertInput(l||a);n&&await i.replaceEditors([{editor:a,replacement:await n}],o.group)}else p&&await i.replaceEditors([{editor:a,replacement:l}],o.group)}}e.setLanguageId=m}),define(Q[3684],Y([1,0,5,1987,9,23,58,172,21,373,117,851,372,107,106,143,11]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackupAction=e.showBackup=e.backupNotSupportedForAzure=e.backupNotSupportedOutOfDBContext=e.backupIsPreviewFeature=e.BackupFeatureName=void 0,e.BackupFeatureName="backup",e.backupIsPreviewFeature=(0,y.localize)(0,null),e.backupNotSupportedOutOfDBContext=(0,y.localize)(1,null),e.backupNotSupportedForAzure=(0,y.localize)(2,null);function u(p,c){return p.get(h.IBackupUiService).showBackup(c).then()}e.showBackup=u;class d extends a.Task{static{this.ID=e.BackupFeatureName}static{this.LABEL=(0,y.localize)(3,null)}static{this.ICON=e.BackupFeatureName}constructor(){super({id:d.ID,title:d.LABEL,iconPath:void 0,iconClass:d.ICON})}runTask(c,l){if(!c.get(b.IConfigurationService).getValue(s.CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES))return c.get(D.INotificationService).info(e.backupIsPreviewFeature);const w=c.get(T.IConnectionManagementService);if(!l){const I=c.get(f.IObjectExplorerService),_=c.get(v.IEditorService),A=c.get(o.ILogService);l=(0,m.getCurrentGlobalConnection)(I,w,_,A)}if(l){const I=w.getServerInfo(l.id);if(I&&I.isCloud&&l.providerName===S.mssqlProviderName)return c.get(D.INotificationService).info(e.backupNotSupportedForAzure);if(!l.databaseName&&l.providerName===S.mssqlProviderName)return c.get(D.INotificationService).info(e.backupNotSupportedOutOfDBContext)}const E=c.get(r.ICapabilitiesService),C=c.get(t.IInstantiationService);return l=l||new i.ConnectionProfile(E,l),l.databaseName?C.invokeFunction(u,l):c.get(D.INotificationService).info(e.backupNotSupportedOutOfDBContext)}}e.BackupAction=d}),define(Q[3685],Y([1,0,28,3684,13,8,451,376,298,117,1986,516,452,453,5,58]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),new y.BackupAction().registerTask();const o="dataExplorer.backup";t.CommandsRegistry.registerCommand({id:o,handler:async(p,c)=>{if(c.$treeItem?.payload){const l=p.get(t.ICommandService);let g=await p.get(s.IConnectionManagementService).fixProfile(c.$treeItem.payload);return l.executeCommand(y.BackupAction.ID,g)}}}),b.MenuRegistry.appendMenuItem(b.MenuId.DataExplorerContext,{group:"connection",order:4,command:{id:o,title:(0,S.localize)(0,null)},when:D.ContextKeyExpr.and(f.MssqlNodeContext.NodeProvider.isEqualTo(m.pgsqlProviderName),f.MssqlNodeContext.NodeType.isEqualTo(v.NodeType.Database))});const u="objectExplorer.backup";t.CommandsRegistry.registerCommand({id:u,handler:(p,c)=>p.get(i.IInstantiationService).createInstance(h.OEAction,y.BackupAction.ID,y.BackupAction.LABEL).run(c)}),b.MenuRegistry.appendMenuItem(b.MenuId.ObjectExplorerItemContext,{group:"connection",order:4,command:{id:u,title:(0,S.localize)(1,null)},when:D.ContextKeyExpr.and(a.TreeNodeContextKey.NodeType.isEqualTo(v.NodeType.Database),r.ConnectionContextKey.Provider.isEqualTo(m.pgsqlProviderName))});const d="explorer.backup";t.CommandsRegistry.registerCommand(d,async(p,c)=>{const l=p.get(t.ICommandService);let g=await p.get(s.IConnectionManagementService).fixProfile(c.profile);return l.executeCommand(y.BackupAction.ID,g)}),b.MenuRegistry.appendMenuItem(b.MenuId.ExplorerWidgetContext,{command:{id:d,title:y.BackupAction.LABEL},when:D.ContextKeyExpr.and(T.ItemContextKey.ItemType.isEqualTo("database"),T.ItemContextKey.ConnectionProvider.isEqualTo("pgsql")),order:2})}),define(Q[1333],Y([1,0,33,7,2048,164,30,19,5,84,21,585,218,241,1253,1200,8,2299,31,24,70,15,4]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.EditDataEditor=void 0;let w=class extends D.EditorPane{static{g=this}static{this.ID="workbench.editor.editDataEditor"}constructor(C,I,_,A,k,L,R,M,N){super(g.ID,C,I,M),this._instantiationService=_,this._editorService=A,this._queryModelService=k,this._editorDescriptorService=L,this._minEditorSize=55,this._initialized=!1,this.hideQueryResultsView=!1,this._disposables=new n.DisposableStore,R&&(this._queryEditorVisible=h.QueryEditorVisibleContext.bindTo(R)),N&&(N.whenReady.then(()=>N.groups.forEach(P=>{this.registerGroupListener(P)})),this._register(N.onDidAddGroup(P=>this.registerGroupListener(P))),this._register(this._disposables))}registerGroupListener(C){const I=C.onWillOpenEditor(_=>{this.isVisible()&&(_.editor!==this.input||C!==this.group)&&this.saveEditorViewState()});this._disposables.add(I)}get editDataInput(){return this.input}get tableName(){return this.editDataInput.tableName}get uri(){return this.input?this.editDataInput.uri.toString():void 0}set resultsEditorVisibility(C){let I=this.input;I.results.visible=C}clearInput(){this._resultsEditor&&this._resultsEditor.clearInput(),this._sqlEditor&&this._sqlEditor.clearInput(),this._disposeEditors(),super.clearInput()}createEditor(C){C.style.position="absolute",C.style.height="100%",C.style.width="100%",this._createTaskbar(C)}dispose(){this._disposeEditors(),super.dispose()}focus(){this._sqlEditor&&this._sqlEditor.focus()}getControl(){return this._sqlEditor?this._sqlEditor.getControl():null}getEditorText(){if(this._sqlEditor&&this._sqlEditor.getControl()){let I=this._sqlEditor.getControl();if(I){let _=I.getModel().getValue();if(_!==void 0&&_.length>0)return _}}return""}hideSpinner(){this._spinnerElement.style.visibility="hidden"}layout(C){this._dimension=C,this._sash&&(this._setSashDimension(),this._sash.layout()),this._doLayout(),this._resizeGridContents()}setEditorVisible(C,I){this._resultsEditor&&this._resultsEditor.setVisible(C,I),this._sqlEditor&&this._sqlEditor.setVisible(C,I),super.setEditorVisible(C,I),this._updateQueryEditorVisible(C)}setInput(C,I,_){let A=this.input;return C.setup||(this._initialized=!1,this._register(C.updateTaskbarEvent(k=>this._updateTaskbar(k))),this._register(C.editorInitializingEvent(k=>this._onEditorInitializingChanged(k))),this._register(C.showResultsEditorEvent(()=>this._showResultsEditor())),C.onRowDropDownSet(this._changeMaxRowsActionItem.defaultRowCount),C.setupComplete()),super.setInput(C,I,_,d.CancellationToken.None).then(()=>this._updateInput(A,C,I))}showSpinner(){setTimeout(()=>{this._initialized||(this._spinnerElement.style.visibility="visible")},200)}toggleResultsEditorVisibility(){let C=this.input,I=this.hideQueryResultsView;this.hideQueryResultsView=!this.hideQueryResultsView,C.results&&(this.resultsEditorVisibility=I,this._doLayout())}_createEditor(C,I){const _=this._editorDescriptorService.getEditor(C);if(!_)return Promise.reject(new Error(t.format("Can not find a registered editor for the input {0}",C)));let A=_.instantiate(this._instantiationService);return A.create(I),A.setVisible(this.isVisible(),A.group),Promise.resolve(A)}_createResultsEditorContainer(){this._createSash();const C=this.getContainer();let I=this.input;I.results.container?this._resultsEditorContainer=y.append(C,I.results.container):(this._resultsEditorContainer=y.append(C,y.$(".editDataContainer-horizontal")),I.results.setContainer(this._resultsEditorContainer)),this.updateStyles()}_createSash(){if(!this._sash){let C=this.getContainer();this._sash=this._register(new u.HorizontalFlexibleSash(C,this._minEditorSize)),this._setSashDimension(),this._register(this._sash.onPositionChange(I=>this._doLayout()))}this._sash.show()}updateStyles(){this._resultsEditorContainer&&(this._resultsEditorContainer.style.borderTopColor=this.getColor(m.PANEL_BORDER)),super.updateStyles()}_createSqlEditorContainer(){const C=this.getContainer();this._sqlEditorContainer=y.append(C,y.$(".details-editor-container"))}_createTaskbar(C){this._taskbarContainer=y.append(C,y.$("div")),this._taskbar=new a.Taskbar(this._taskbarContainer,{actionViewItemProvider:k=>this._getChangeMaxRowsAction(k)}),this._refreshTableAction=this._instantiationService.createInstance(s.RefreshTableAction,this),this._stopRefreshTableAction=this._instantiationService.createInstance(s.StopRefreshTableAction,this),this._changeMaxRowsAction=this._instantiationService.createInstance(s.ChangeMaxRowsAction,this),this._showQueryPaneAction=this._instantiationService.createInstance(s.ShowQueryPaneAction,this);let I=a.Taskbar.createTaskbarSeparator(),_=a.Taskbar.createTaskbarText(b.localize(0,null));this._spinnerElement=a.Taskbar.createTaskbarSpinner();let A=[{action:this._refreshTableAction},{action:this._stopRefreshTableAction},{element:I},{element:_},{action:this._changeMaxRowsAction},{action:this._showQueryPaneAction},{element:this._spinnerElement}];this._taskbar.setContent(A)}_getChangeMaxRowsAction(C){let I=s.ChangeMaxRowsAction.ID;return C.id===I?(this._changeMaxRowsActionItem||(this._changeMaxRowsActionItem=this._instantiationService.createInstance(s.ChangeMaxRowsActionItem,this,C)),this._changeMaxRowsActionItem):null}_disposeEditors(){this._sqlEditor&&(this._sqlEditor.dispose(),this._sqlEditor=null),this._resultsEditor&&(this._resultsEditor.dispose(),this._resultsEditor=null);let C=this.getContainer();if(this._sqlEditorContainer){let I=this._sqlEditorContainer.parentElement;I&&I===C&&this._sqlEditorContainer.parentElement.removeChild(this._sqlEditorContainer),this._sqlEditorContainer=null}if(this._resultsEditorContainer){let I=this._resultsEditorContainer.parentElement;I&&I===C&&this._resultsEditorContainer.parentElement.removeChild(this._resultsEditorContainer),this._resultsEditorContainer=null,this.hideQueryResultsView=!1}}_doLayout(C=!1){if(!this._isResultsEditorVisible()&&this._sqlEditor){this._doLayoutSql();return}!this._sqlEditor||!this._resultsEditor||!this._dimension||!this._sash||(this._doLayoutHorizontal(),C||this._resizeGridContents())}_doLayoutHorizontal(){let C,I;if(this._resultsEditorContainer.hidden=!1,this.queryPaneEnabled()){const _=this._sash.getSplitPoint();this._sqlEditorContainer.hidden=!1,C=_-this._getTaskBarHeight(),I=this._dimension.height-this._getTaskBarHeight()-C}else this._sqlEditorContainer.hidden=!0,C=0,I=this._dimension.height-this._getTaskBarHeight();this._sqlEditorContainer.style.height=`${C}px`,this._sqlEditorContainer.style.width=`${this._dimension.width}px`,this._resultsEditorContainer.style.height=`${I}px`,this._resultsEditorContainer.style.width=`${this._dimension.width}px`,this._sqlEditor.layout(new y.Dimension(this._dimension.width,C)),this._resultsEditor.layout(new y.Dimension(this._dimension.width,I))}_doLayoutSql(){if(this._resultsEditorContainer&&(this._resultsEditorContainer.style.width="0px",this._resultsEditorContainer.style.height="0px",this._resultsEditorContainer.style.left="0px",this._resultsEditorContainer.hidden=!0),this._dimension){let C;this.queryPaneEnabled()?(this._sqlEditorContainer.hidden=!1,C=this._dimension.height-this._getTaskBarHeight()):(this._sqlEditorContainer.hidden=!0,C=0),this._sqlEditorContainer.style.height=`${C}px`,this._sqlEditorContainer.style.width=`${this._dimension.width}px`,this._sqlEditor.layout(new y.Dimension(this._dimension.width,C))}}_getTaskBarHeight(){let C=this._taskbar.getContainer();return y.getContentHeight(C)}_isResultsEditorVisible(){let C=this.input;return C?C.results.visible:!1}_onEditorInitializingChanged(C){C?this.showSpinner():(this._initialized=!0,this.hideSpinner())}_onResultsEditorCreated(C,I,_){return this._resultsEditor=C,this._resultsEditor.setInput(I,_,void 0)}_onSqlEditorCreated(C,I,_){return this._sqlEditor=C,this._sqlEditor.setInput(I,_,void 0,d.CancellationToken.None)}_resizeGridContents(){if(this._isResultsEditorVisible()){let I=this.input.uri;I&&this._queryModelService.resizeResultsets(I)}}_setNewInput(C,I){let _,A;this._isResultsEditorVisible()?(_=()=>Promise.all([this._createEditor(C.results,this._resultsEditorContainer),this._createEditor(C.sql,this._sqlEditorContainer)]),A=L=>Promise.all([this._onResultsEditorCreated(L[0],C.results,I),this._onSqlEditorCreated(L[1],C.sql,I)])):(_=()=>this._createEditor(C.sql,this._sqlEditorContainer),A=L=>Promise.all([this._onSqlEditorCreated(L,C.sql,I)]));let k=()=>(this._doLayout(),Promise.resolve(void 0));return _().then(A).then(k).then(()=>{C.results&&C.results.onRestoreViewStateEmitter.fire(),C.savedViewState&&this._sqlEditor.getControl().restoreViewState(C.savedViewState)})}_setSashDimension(){this._dimension&&this._sash.setDimension(this._dimension)}_showResultsEditor(){if(this._isResultsEditorVisible())return;let C=this.input;this._createResultsEditorContainer(),this._createEditor(C.results,this._resultsEditorContainer).then(async I=>{await this._onResultsEditorCreated(I,C.results,this._options),this.resultsEditorVisibility=!0,this.hideQueryResultsView=!1,this._doLayout(!0)}).catch(l.onUnexpectedError)}_updateInput(C,I,_){if(this._sqlEditor&&this._sqlEditor.clearInput(),C&&this._disposeEditors(),this._createSqlEditorContainer(),this._isResultsEditorVisible()){this._createResultsEditorContainer();let A=I.uri;A&&this._queryModelService.refreshResultsets(A)}return this._sash&&(this._isResultsEditorVisible()?this._sash.show():this._sash.hide(),this.updateSashVisibility()),this._updateTaskbar(I),this._setNewInput(I,_)}updateSashVisibility(){this._resultsEditorContainer&&(this.queryPaneEnabled()?(this._resultsEditorContainer.style.borderTopStyle="solid",this._resultsEditorContainer.style.borderTopWidth="1px"):(this._resultsEditorContainer.style.borderTopStyle="",this._resultsEditorContainer.style.borderTopWidth=""))}_updateQueryEditorVisible(C){if(this._queryEditorVisible){let I=C;C||(I=[...this._editorService.visibleEditorPanes].filter(A=>A&&A.getId?A.getId()===g.ID:!1).length>1),this._queryEditorVisible.set(I)}}_updateTaskbar(C){C.matches(this.editDataInput)&&(this._refreshTableAction.enabled=C.refreshButtonEnabled,this._stopRefreshTableAction.enabled=C.stopButtonEnabled,this._changeMaxRowsActionItem.setCurrentOptionIndex=C.rowLimit,this._showQueryPaneAction.queryPaneEnabled=C.queryPaneEnabled)}runShowQueryPane(){this._showQueryPaneAction.run()}runQuery(){this._refreshTableAction.run()}cancelQuery(){this._stopRefreshTableAction.run()}toggleQueryPane(){this.editDataInput.queryPaneEnabled=!this.queryPaneEnabled(),this.updateSashVisibility(),this.queryPaneEnabled()?this._showQueryEditor():this._hideQueryEditor(),this._doLayout(!1)}_showQueryEditor(){this._sqlEditorContainer.hidden=!1,this._changeMaxRowsActionItem.disable()}_hideQueryEditor(){this._sqlEditorContainer.hidden=!0,this._changeMaxRowsActionItem.enable()}queryPaneEnabled(){return this.editDataInput.queryPaneEnabled}saveEditorViewState(){let C=this.input;C&&(this._sqlEditor&&(C.savedViewState=this._sqlEditor.getControl().saveViewState()),C.results&&C.results.onSaveViewStateEmitter.fire())}};e.EditDataEditor=w,e.EditDataEditor=w=g=fe([O(0,T.ITelemetryService),O(1,f.IThemeService),O(2,v.IInstantiationService),O(3,S.IEditorService),O(4,r.IQueryModelService),O(5,i.IEditorDescriptorService),O(6,o.IContextKeyService),O(7,p.IStorageService),O(8,c.IEditorGroupsService)],w)}),define(Q[1334],Y([1,0,2053,163,10,21]),function(q,e,t,y,b,D){"use strict";var T;Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionPlanComparisonInput=void 0;let f=class extends y.EditorInput{static{T=this}static{this.ID="workbench.editorinputs.compareExecutionPlanInput"}static{this.SCHEME="compareExecutionPlanInput"}constructor(m,S){super(),this.preloadModel=m,this._editorService=S,this.editorNamePrefix=(0,t.localize)(0,null);const h=this._editorService.editors.map(r=>r.getName());let a=1;for(this._editorName=`${this.editorNamePrefix}_${a}`;h.includes(this._editorName);)a++,this._editorName=`${this.editorNamePrefix}_${a}`}get typeId(){return T.ID}get resource(){return b.URI.from({scheme:T.SCHEME,path:"execution-plan-compare"})}getName(){return this._editorName}};e.ExecutionPlanComparisonInput=f,e.ExecutionPlanComparisonInput=f=T=fe([O(1,D.IEditorService)],f)}),define(Q[1335],Y([1,0,346,604,372,58,34,2125,21,5,49]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h,a;Object.defineProperty(e,"__esModule",{value:!0}),e.ProfilerClearSessionFilter=e.ProfilerFilterSession=e.NewProfilerAction=e.ProfilerFindPrevious=e.ProfilerFindNext=e.ProfilerEditColumns=e.ProfilerCollapsablePanelAction=e.ProfilerAutoScroll=e.ProfilerClear=e.ProfilerStop=e.ProfilerPause=e.ProfilerCreate=e.ProfilerStart=e.ProfilerConnect=void 0;let r=class extends T.Action{static{h=this}static{this.ConnectText=f.localize(0,null)}static{this.DisconnectText=f.localize(1,null)}static{this.ID="profiler.connect"}static{this.LABEL=h.ConnectText}constructor(_,A,k){super(_,A,"connect"),this._profilerService=k,this._connected=!1}async run(_){this.enabled=!1,this._connected?(await this._profilerService.disconnectSession(_.id),this.enabled=!0,this.connected=!1,_.state.change({isConnected:!1,isRunning:!1,isPaused:!1,isStopped:!1})):(await this._profilerService.connectSession(_.id),this.enabled=!0,this.connected=!0,_.state.change({isConnected:!0,isRunning:!1,isPaused:!1,isStopped:!0}))}set connected(_){this._connected=_,this._setClass(_?"disconnect":"connect"),this.label=_?h.DisconnectText:h.ConnectText}get connected(){return this._connected}};e.ProfilerConnect=r,e.ProfilerConnect=r=h=fe([O(2,t.IProfilerService)],r);let i=class extends T.Action{static{this.ID="profiler.start"}static{this.LABEL=f.localize(2,null)}constructor(_,A,k){super(_,A,"sql start"),this._profilerService=k}async run(_){_.data.clear(),await this._profilerService.startSession(_.id,_.sessionName)}};e.ProfilerStart=i,e.ProfilerStart=i=fe([O(2,t.IProfilerService)],i);let s=class extends T.Action{static{this.ID="profiler.create"}static{this.LABEL=f.localize(3,null)}constructor(_,A,k){super(_,A,"add"),this._profilerService=k}async run(_){return this._profilerService.launchCreateSessionDialog(_)}};e.ProfilerCreate=s,e.ProfilerCreate=s=fe([O(2,t.IProfilerService)],s);let o=class extends T.Action{static{a=this}static{this.PauseText=f.localize(4,null)}static{this.ResumeText=f.localize(5,null)}static{this.PauseCssClass="sql pause"}static{this.ResumeCssClass="sql continue"}static{this.ID="profiler.pause"}static{this.LABEL=a.PauseText}constructor(_,A,k){super(_,A,a.PauseCssClass),this._profilerService=k,this._paused=!1}async run(_){await this._profilerService.pauseSession(_.id),this.paused=!this._paused,_.state.change({isPaused:this.paused,isStopped:!1,isRunning:!this.paused})}set paused(_){this._paused=_,this._setClass(_?a.ResumeCssClass:a.PauseCssClass),this.label=_?a.ResumeText:a.PauseText}get paused(){return this._paused}};e.ProfilerPause=o,e.ProfilerPause=o=a=fe([O(2,t.IProfilerService)],o);let u=class extends T.Action{static{this.ID="profiler.stop"}static{this.LABEL=f.localize(6,null)}constructor(_,A,k){super(_,A,"sql stop"),this._profilerService=k}async run(_){await this._profilerService.stopSession(_.id)}};e.ProfilerStop=u,e.ProfilerStop=u=fe([O(2,t.IProfilerService)],u);let d=class extends T.Action{static{this.ID="profiler.clear"}static{this.LABEL=f.localize(7,null)}constructor(_,A,k){super(_,A,"clear-results"),this._dialogService=k}async run(_){(await this._dialogService.confirm({type:"question",message:f.localize(8,null)})).confirmed&&_.data.clear()}};e.ProfilerClear=d,e.ProfilerClear=d=fe([O(2,S.IDialogService)],d);class p extends T.Action{static{this.AutoScrollOnText=f.localize(9,null)}static{this.AutoScrollOffText=f.localize(10,null)}static{this.CheckedCssClass="sql checked"}static{this.ID="profiler.autoscroll"}static{this.LABEL=p.AutoScrollOnText}constructor(_,A){super(_,A,p.CheckedCssClass)}async run(_){this.checked=!this.checked,this.label=this.checked?p.AutoScrollOnText:p.AutoScrollOffText,this._setClass(this.checked?p.CheckedCssClass:""),_.state.change({autoscroll:this.checked})}}e.ProfilerAutoScroll=p;class c extends T.Action{static{this.ID="profiler.toggleCollapsePanel"}static{this.LABEL=f.localize(11,null)}constructor(_,A){super(_,A,"codicon-chevron-down")}async run(_){this.collapsed=!this._collapsed,_.state.change({isPanelCollapsed:this._collapsed})}get collapsed(){return this._collapsed}set collapsed(_){this._collapsed=_!==!1,this._setClass(this._collapsed?"codicon-chevron-up":"codicon-chevron-down")}}e.ProfilerCollapsablePanelAction=c;let l=class extends T.Action{static{this.ID="profiler."}static{this.LABEL=f.localize(12,null)}constructor(_,A,k){super(_,A),this._profilerService=k}async run(_){await this._profilerService.launchColumnEditor(_)}};e.ProfilerEditColumns=l,e.ProfilerEditColumns=l=fe([O(2,t.IProfilerService)],l);class n{constructor(_){this.profiler=_,this.id="profiler.findNext",this.label=f.localize(13,null),this.alias=""}async run(){this.profiler.findNext()}isSupported(){return!0}}e.ProfilerFindNext=n;class g{constructor(_){this.profiler=_,this.id="profiler.findPrevious",this.label=f.localize(14,null),this.alias=""}async run(){this.profiler.findPrevious()}isSupported(){return!0}}e.ProfilerFindPrevious=g;class w extends b.Task{static{this.ID="profiler.newProfiler"}static{this.LABEL=f.localize(15,null)}static{this.ICON="profile"}constructor(){super({id:w.ID,title:w.LABEL,iconPath:{dark:w.ICON,light:w.ICON},iconClass:w.ICON})}async runTask(_,A){let k=_.get(m.IInstantiationService).createInstance(y.ProfilerInput,A,void 0);await _.get(v.IEditorService).openEditor(k,{pinned:!0},v.ACTIVE_GROUP);let L={saveTheConnection:!1,showConnectionDialogOnError:!0,showDashboard:!1,showFirewallRuleOnError:!0};await _.get(D.IConnectionManagementService).connect(this._connectionProfile,k.id,L)}}e.NewProfilerAction=w;let E=class extends T.Action{static{this.ID="profiler.filter"}static{this.LABEL=f.localize(16,null)}constructor(_,A,k){super(_,A,"filterLabel"),this._profilerService=k}async run(_){this._profilerService.launchFilterSessionDialog(_)}};e.ProfilerFilterSession=E,e.ProfilerFilterSession=E=fe([O(2,t.IProfilerService)],E);let C=class extends T.Action{static{this.ID="profiler.clearFilter"}static{this.LABEL=f.localize(17,null)}constructor(_,A,k){super(_,A,"clear-filter"),this._dialogService=k}async run(_){(await this._dialogService.confirm({type:"question",message:f.localize(18,null)})).confirmed&&_.clearFilter()}};e.ProfilerClearSessionFilter=C,e.ProfilerClearSessionFilter=C=fe([O(2,S.IDialogService)],C)}),define(Q[3686],Y([1,0,59,278,19,5,90,17,4,7,515,648,2134,29,34,68,78,33,10,21,9,1645]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Model=e.MessagePanel=e.AccessibilityProvider=void 0;const l={MESSAGE:"message",BATCH:"batch",MODEL:"model",ERROR:"error"};function n(R){if(R.time)return((0,f.isString)(R.time)?new Date(R.time):R.time).toLocaleTimeString()}class g{getWidgetAriaLabel(){return(0,a.localize)(0,null)}getAriaLabel(M){return M.time&&M.range?(0,a.localize)(1,null,n(M),M.message):M.message}}e.AccessibilityProvider=g;class w{getId(M){return()=>M.id}}let E=class extends v.Disposable{constructor(M,N,P,x,F,V){super(),this.themeService=N,this.contextMenuService=P,this.clipboardService=x,this.textResourcePropertiesService=F,this.configurationService=V,this.model=new L,this.container=(0,m.$)(".message-tree"),this.styleElement=(0,m.createStyleSheet)(this.container),this.queryRunnerDisposables=this._register(new v.DisposableStore),this._treeStates=new Map;const W=this.configurationService.getValue("queryEditor").messages.wordwrap;this.container.classList.toggle("word-wrap",W),this.tree=M.createInstance(T.WorkbenchDataTree,"MessagePanel",this.container,new I,[new k,new _,M.createInstance(A)],new C,{accessibilityProvider:new g,mouseSupport:!1,horizontalScrolling:!W,setRowLineHeight:!1,supportDynamicHeights:W,identityProvider:new w}),this._register(this.tree.onContextMenu(z=>this.onContextMenu(z))),this.tree.setInput(this.model),this.container.style.width="100%",this.container.style.height="100%",this._register((0,y.attachListStyler)(this.tree,this.themeService)),this._register(this.themeService.onDidColorThemeChange(this.applyStyles,this)),this.applyStyles(this.themeService.getColorTheme())}onContextMenu(M){const N=[];N.push(new i.Action("messagePanel.copy",(0,a.localize)(2,null),void 0,!0,async()=>{const P=window.getSelection();return P&&await this.clipboardService.writeText(P.toString()),Promise.resolve()})),N.push(new i.Action("workbench.queryEditor.messages.action.copyAll",(0,a.localize)(3,null),void 0,!0,async()=>(await this.clipboardService.writeText(this.getVisibleContent()),Promise.resolve()))),this.contextMenuService.showContextMenu({getAnchor:()=>M.anchor,getActions:()=>N})}getVisibleContent(){let M="";const N=this.textResourcePropertiesService.getEOL(d.URI.parse("queryEditor:messagePanel")),P=x=>{x.children.forEach(F=>{M+=F.element.message.trimRight()+N,!F.collapsed&&F.children.length&&P(F)})};return P(this.tree.getNode()),(0,u.removeAnsiEscapeCodes)(M)}render(M){M.appendChild(this.container)}layout(M){this.tree.layout(M.height,M.width),this.tree.updateChildren()}focus(){this.tree.domFocus()}set queryRunner(M){this.currenturi&&this._treeStates.set(this.currenturi,this.tree.getViewState()),this.queryRunnerDisposables.clear(),this.reset(),this.currenturi=M.uri,this.queryRunnerDisposables.add(M.onQueryStart(()=>this.reset())),this.queryRunnerDisposables.add(M.onMessage(N=>this.onMessage(N))),this.onMessage(M.messages,!0)}onMessage(M,N=!1){Array.isArray(M)?this.model.messages.push(...M):this.model.messages.push(M),N?this.tree.setInput(this.model,this._treeStates.get(this.currenturi)):this.tree.updateChildren()}applyStyles(M){const N=M.getColor(S.resultsErrorColor),P=[];N&&P.push(`.message-tree .monaco-list-rows .error-message { color: ${N}; }`);const x=P.join(` `);x!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=x)}reset(){this.model.messages=[],this.model.totalExecuteMessage=void 0,this.tree.updateChildren()}clear(){this.reset()}dispose(){this.container&&(this.container.remove(),this.container=void 0),this.styleElement&&(this.styleElement.remove(),this.styleElement=void 0),super.dispose()}};e.MessagePanel=E,e.MessagePanel=E=fe([O(0,D.IInstantiationService),O(1,b.IThemeService),O(2,r.IContextMenuService),O(3,s.IClipboardService),O(4,o.ITextResourcePropertiesService),O(5,c.IConfigurationService)],E);class C{hasChildren(M){return M instanceof L}getChildren(M){let N=M.messages;return M.totalExecuteMessage&&(N=N.concat(M.totalExecuteMessage)),N||[]}}class I extends h.CachedListVirtualDelegate{estimateHeight(M){return 22*M.message.split(` `).length}getTemplateId(M){return M instanceof L?l.MODEL:M.range?l.BATCH:M.isError?l.ERROR:l.MESSAGE}hasDynamicHeight(M){return M.message.toString().length>0}}class _{constructor(){this.templateId=l.ERROR}renderTemplate(M){M.append((0,m.$)(".time-stamp"));const N=(0,m.$)(".error-message");return M.append(N),{message:N}}renderElement(M,N,P){let x=P;x.message.innerText=M.element.message}disposeTemplate(M){}}let A=class{constructor(M){this.editorService=M,this.templateId=l.BATCH}renderTemplate(M){const N=(0,m.$)(".time-stamp");M.append(N);const P=(0,m.$)(".batch-start");return M.append(P),{message:P,timeStamp:N,disposable:new v.DisposableStore}}renderElement(M,N,P){P.timeStamp.innerText=n(M.element),P.message.innerText=M.element.message,M.element.range&&P.disposable.add((0,m.addStandardDisposableGenericMouseDownListener)(P.message,()=>{const F=this.editorService.activeEditorPane.getControl();F.focus(),F.setSelection(M.element.range),F.revealRangeInCenterIfOutsideViewport(M.element.range)}))}disposeTemplate(M){(0,v.dispose)(M.disposable)}};A=fe([O(0,p.IEditorService)],A);class k{constructor(){this.templateId=l.MESSAGE}renderTemplate(M){M.append((0,m.$)(".time-stamp"));const N=(0,m.$)(".message");return M.append(N),{message:N}}renderElement(M,N,P){let x=P;x.message.innerText=M.element.message}disposeTemplate(M){}}class L{constructor(){this.messages=[],this.uuid=(0,t.generateUuid)()}}e.Model=L}),define(Q[360],Y([1,0,2136,34,4,29,9,23,63,7,58,241,372,172,21,275,432,373,5,28,516,107,106,251,11,15,117,448,76,32,37,101,1646]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L){"use strict";var R,M,N,P,x,F,V,W,z,B,K;Object.defineProperty(e,"__esModule",{value:!0}),e.ParseSyntaxTaskbarAction=e.ParseSyntaxCommandId=e.CATEGORIES=e.ExportAsNotebookAction=e.ListDatabasesActionItem=e.ToggleSqlCmdModeAction=e.ListDatabasesAction=e.ToggleConnectDatabaseAction=e.ConnectDatabaseAction=e.DisconnectDatabaseAction=e.ActualQueryPlanAction=e.ToggleActualExecutionPlanModeAction=e.EstimatedQueryPlanAction=e.CancelQueryAction=e.RunQueryAction=e.DE_NEW_QUERY_COMMAND_ID=e.OE_NEW_QUERY_ACTION_ID=e.NewQueryTask=e.openNewQuery=e.QueryTaskbarAction=void 0;class H extends y.Action{constructor(ae,ue,de,ge){super(de),this.connectionManagementService=ae,this.editor=ue,this.enabled=!0,this._setCssClass(ge)}updateCssClass(ae){this._setCssClass(ae)}_setCssClass(ae){this._classes=[],ae&&this._classes.push(ae),this.class=this._classes.join(" ")}isConnected(ae){return!ae||!ae.input?!1:this.connectionManagementService.isConnected(ae.input.uri)}connectEditor(ae,ue,de){let ge={input:ae.input,connectionType:S.ConnectionType.editor,runQueryOnCompletion:ue||S.RunQueryOnConnectionMode.none,queryRange:de};this.connectionManagementService.showConnectionDialog(ge)}}e.QueryTaskbarAction=H;async function U(ce,ae,ue,de){const ge=ce.get(i.IEditorService),he=ce.get(s.IQueryEditorService),be=ce.get(r.IObjectExplorerService),ve=ce.get(S.IConnectionManagementService),Ie=ce.get(w.ILogService);ae||(Ie.trace("openNewQuery: Profile not received, retrieving current global connection."),ae=(0,u.getCurrentGlobalConnection)(be,ve,ge,Ie));const Se=await he.newSqlEditor({initialContent:ue},ae?.providerName);let we={params:{connectionType:S.ConnectionType.editor,runQueryOnCompletion:de,input:Se},saveTheConnection:!1,showDashboard:!1,showConnectionDialogOnError:!0,showFirewallRuleOnError:!0};ae?await ve.connect(ae,Se.uri,we):Ie.trace("queryActions.openNewQuery: No connection profile found to connect.")}e.openNewQuery=U;class G extends a.Task{static{this.ID="newQuery"}static{this.LABEL=t.localize(0,null)}static{this.ICON="new-query"}constructor(){super({id:G.ID,title:G.LABEL,iconPath:void 0,iconClass:G.ICON})}runTask(ae,ue){return U(ae,ue)}}e.NewQueryTask=G,e.OE_NEW_QUERY_ACTION_ID="objectExplorer.newQuery",p.CommandsRegistry.registerCommand(e.OE_NEW_QUERY_ACTION_ID,(ce,ae)=>ce.get(d.IInstantiationService).createInstance(c.OEAction,G.ID,G.LABEL).run(ae)),e.DE_NEW_QUERY_COMMAND_ID="dataExplorer.newQuery",p.CommandsRegistry.registerCommand({id:e.DE_NEW_QUERY_COMMAND_ID,handler:async(ce,ae)=>{if(ae.$treeItem){const ue=ce.get(s.IQueryEditorService),de=ce.get(S.IConnectionManagementService),ge=ce.get(l.ICapabilitiesService),he=await ue.newSqlEditor();let be={params:{connectionType:S.ConnectionType.editor,input:he},saveTheConnection:!1,showDashboard:!1,showConnectionDialogOnError:!0,showFirewallRuleOnError:!0},ve=await de.fixProfile(ae.$treeItem.payload);return de.connect(new n.ConnectionProfile(ge,ve),he.uri,be)}return!0}});let $=class extends H{static{R=this}static{this.EnabledClass="start"}static{this.ID="runQueryAction"}constructor(ae,ue,de,ge,he){super(de,ae,R.ID,R.EnabledClass),this.queryModelService=ue,this.notificationService=ge,this.commandService=he,this.label=t.localize(1,null)}async run(){await this.runQuery()}async runCurrent(){await this.runQuery(!0)}async runQuery(ae=!1){if(!this.editor.isEditorEmpty())if(this.isConnected(this.editor)){this.commandService?.executeCommand("hideSuggestWidget"),this.editor.getSelections()?.length>1&&this.notificationService.error(t.localize(2,null));let ue=this.editor.getSelection(!1);ae&&ue&&this.isCursorPosition(ue)?this.editor.input.runQueryStatement(ue):this.editor.input.state.isActualExecutionPlanMode?(ue=this.editor.getSelection(),this.editor.input.runQuery(ue,{displayActualQueryPlan:!0})):(ue=this.editor.getSelection(),this.editor.input.runQuery(ue))}else this.connectEditor(this.editor,ae?S.RunQueryOnConnectionMode.executeCurrentQuery:S.RunQueryOnConnectionMode.executeQuery,this.editor.getSelection(!ae))}isCursorPosition(ae){return ae.startLineNumber===ae.endLineNumber&&ae.startColumn===ae.endColumn}};e.RunQueryAction=$,e.RunQueryAction=$=R=fe([O(1,h.IQueryModelService),O(2,S.IConnectionManagementService),O(3,f.INotificationService),O(4,p.ICommandService)],$);let ie=class extends H{static{M=this}static{this.EnabledClass="stop"}static{this.ID="cancelQueryAction"}constructor(ae,ue,de,ge){super(de,ae,M.ID,M.EnabledClass),this.queryModelService=ue,this.logService=ge,this.enabled=!1,this.label=t.localize(3,null)}async run(){if(this.isConnected(this.editor)){if(!this.editor.input){this.logService.error("editor input was null");return}this.queryModelService.cancelQuery(this.editor.input.uri)}}};e.CancelQueryAction=ie,e.CancelQueryAction=ie=M=fe([O(1,h.IQueryModelService),O(2,S.IConnectionManagementService),O(3,w.ILogService)],ie);let J=class extends H{static{N=this}static{this.EnabledClass="estimatedQueryPlan"}static{this.ID="estimatedQueryPlanAction"}constructor(ae,ue){super(ue,ae,N.ID,N.EnabledClass),this.label=t.localize(4,null)}async run(){this.editor.isEditorEmpty()||(this.isConnected(this.editor)?this.runQuery(this.editor):this.connectEditor(this.editor,S.RunQueryOnConnectionMode.estimatedQueryPlan,this.editor.getSelection()))}runQuery(ae){ae||(ae=this.editor),this.isConnected(ae)&&ae.input.runQuery(ae.getSelection(),{displayEstimatedQueryPlan:!0})}};e.EstimatedQueryPlanAction=J,e.EstimatedQueryPlanAction=J=N=fe([O(1,S.IConnectionManagementService)],J);let j=class extends H{static{P=this}static{this.EnabledClass="enabledActualExecutionPlan"}static{this.DisabledClass="disabledActualExecutionPlan"}static{this.ID="toggleActualExecutionPlanModeAction"}static{this.EnableActualPlanLabel=t.localize(5,null)}static{this.DisableActualPlanLabel=t.localize(6,null)}constructor(ae,ue,de,ge,he,be){super(he,ae,P.ID,P.EnabledClass),this._isActualPlanMode=ue,this.queryManagementService=de,this.configurationService=ge,this.telemetryService=be,this.updateLabel()}get isActualExecutionPlanMode(){return this._isActualPlanMode}set isActualExecutionPlanMode(ae){this._isActualPlanMode=ae,this.updateLabel()}updateLabel(){this.label=this.isActualExecutionPlanMode?P.DisableActualPlanLabel:P.EnableActualPlanLabel,this.isActualExecutionPlanMode?this.updateCssClass(P.DisabledClass):this.updateCssClass(P.EnabledClass)}async run(){const ae=!this.isActualExecutionPlanMode;this.editor.input.state.isActualExecutionPlanMode=ae,this.telemetryService.createActionEvent("ExecutionPlan","Click","ToggleActualExecutionPlan").withAdditionalProperties({actualExecutionPlanMode:this.isActualExecutionPlanMode}).send()}};e.ToggleActualExecutionPlanModeAction=j,e.ToggleActualExecutionPlanModeAction=j=P=fe([O(2,g.IQueryManagementService),O(3,T.IConfigurationService),O(4,S.IConnectionManagementService),O(5,_.IAdsTelemetryService)],j);let ee=class extends H{static{x=this}static{this.EnabledClass="actualQueryPlan"}static{this.ID="actualQueryPlanAction"}constructor(ae,ue){super(ue,ae,x.ID,x.EnabledClass),this.label=t.localize(7,null)}async run(){this.editor.isEditorEmpty()||(this.isConnected(this.editor)?this.runQuery(this.editor):this.connectEditor(this.editor,S.RunQueryOnConnectionMode.actualQueryPlan,this.editor.getSelection()))}runQuery(ae){if(ae||(ae=this.editor),this.isConnected(ae)){let ue=ae.getSelection();ue||(ue=ae.getAllSelection()),ae.input.runQuery(ue,{displayActualQueryPlan:!0})}}};e.ActualQueryPlanAction=ee,e.ActualQueryPlanAction=ee=x=fe([O(1,S.IConnectionManagementService)],ee);let X=class extends H{static{F=this}static{this.EnabledClass="disconnect"}static{this.ID="disconnectDatabaseAction"}constructor(ae,ue){super(ue,ae,F.ID,F.EnabledClass),this.label=t.localize(8,null)}async run(){this.connectionManagementService.disconnectEditor(this.editor.input)}};e.DisconnectDatabaseAction=X,e.DisconnectDatabaseAction=X=F=fe([O(1,S.IConnectionManagementService)],X);let te=class extends H{static{V=this}static{this.EnabledDefaultClass="connect"}static{this.EnabledChangeClass="changeConnection"}static{this.ID="connectDatabaseAction"}constructor(ae,ue,de){let ge,he,be;ue?(be=V.EnabledChangeClass,ge=t.localize(9,null),he=t.localize(10,null)):(be=V.EnabledDefaultClass,ge=t.localize(11,null)),super(de,ae,V.ID,be),this.label=ge,this.tooltip=he}async run(){this.connectEditor(this.editor)}};e.ConnectDatabaseAction=te,e.ConnectDatabaseAction=te=V=fe([O(2,S.IConnectionManagementService)],te);let Z=class extends H{static{W=this}static{this.ConnectClass="connect"}static{this.DisconnectClass="disconnect"}static{this.ID="toggleConnectDatabaseAction"}constructor(ae,ue,de){super(de,ae,W.ID,void 0),this._connected=ue,this._connectLabel=t.localize(12,null),this._disconnectLabel=t.localize(13,null)}get connected(){return this._connected}set connected(ae){this._connected=ae,this.updateLabelAndIcon()}updateLabelAndIcon(){this._connected?(this.label=this._disconnectLabel,this.updateCssClass(W.DisconnectClass)):(this.label=this._connectLabel,this.updateCssClass(W.ConnectClass))}async run(){this.editor.input.isSharedSession||(this.connected?this.connectionManagementService.disconnectEditor(this.editor.input):this.connectEditor(this.editor))}};e.ToggleConnectDatabaseAction=Z,e.ToggleConnectDatabaseAction=Z=W=fe([O(2,S.IConnectionManagementService)],Z);let se=class extends H{static{z=this}static{this.EnabledClass=""}static{this.ID="listDatabaseQueryAction"}constructor(ae,ue){super(ue,ae,z.ID,void 0),this.enabled=!1,this.class=z.EnabledClass}async run(){}};e.ListDatabasesAction=se,e.ListDatabasesAction=se=z=fe([O(1,S.IConnectionManagementService)],se);let re=class extends H{static{B=this}static{this.EnableSqlcmdClass="enablesqlcmd"}static{this.DisableSqlcmdClass="disablesqlcmd"}static{this.ID="ToggleSqlCmdModeAction"}constructor(ae,ue,de,ge,he,be){super(he,ae,B.ID,void 0),this._isSqlCmdMode=ue,this.queryManagementService=de,this.configurationService=ge,this.logService=be,this._enablesqlcmdLabel=t.localize(14,null),this._disablesqlcmdLabel=t.localize(15,null)}get isSqlCmdMode(){return this._isSqlCmdMode}set isSqlCmdMode(ae){this._isSqlCmdMode=ae,this.updateLabelAndIcon()}updateLabelAndIcon(){this.label=this.isSqlCmdMode?this._disablesqlcmdLabel:this._enablesqlcmdLabel,this.isSqlCmdMode?this.updateCssClass(B.DisableSqlcmdClass):this.updateCssClass(B.EnableSqlcmdClass)}async run(){const ae=!this.isSqlCmdMode;this.editor.input.state.isSqlCmdMode=ae;let ue={options:{}};if(ue.options.isSqlCmdMode=ae,!this.editor.input){this.logService.error("editor input was null");return}this.queryManagementService.setQueryExecutionOptions(this.editor.input.uri,ue),ae?this.connectionManagementService.doChangeLanguageFlavor(this.editor.input.uri,"sqlcmd","MSSQL"):this.connectionManagementService.doChangeLanguageFlavor(this.editor.input.uri,"sql","MSSQL")}};e.ToggleSqlCmdModeAction=re,e.ToggleSqlCmdModeAction=re=B=fe([O(2,g.IQueryManagementService),O(3,T.IConfigurationService),O(4,S.IConnectionManagementService),O(5,w.ILogService)],re);let oe=class extends b.Disposable{static{this.ID="listDatabaseQueryActionItem"}constructor(ae,ue,de,ge,he,be,ve){super(),this._editor=ae,this.action=ue,this.connectionManagementService=ge,this.notificationService=he,this.logService=be,this.capabilitiesService=ve,this._selectDatabaseString=t.localize(16,null),this._databaseListDropdown=(0,m.$)(".databaseListDropdown"),this._dropdown=this._register(new I.Dropdown(this._databaseListDropdown,de,{strictSelection:!0,placeholder:this._selectDatabaseString,ariaLabel:this._selectDatabaseString,...L.defaultEditableDropdownStyles})),this._register(this._dropdown.onBlur(()=>this.databaseSelected(this._dropdown.value))),this._register(this._dropdown.onValueChange(Ie=>this.databaseSelected(Ie))),this._register(this._dropdown.onFocus(()=>this.onDropdownFocus())),this._register(this.connectionManagementService.onConnectionChanged(Ie=>this.onConnectionChanged(Ie)))}render(ae){(0,m.append)(ae,this._databaseListDropdown)}setActionContext(ae){}isEnabled(){return!!this._isConnected}focus(){this._dropdown.focus()}blur(){this._dropdown.blur()}onConnected(){let ae=this.getCurrentDatabaseName();this.updateConnection(ae)}onDisconnect(){this._isConnected=!1,this._currentDatabaseName=void 0,this._dropdown.enabled=!1,this._dropdown.value=""}databaseSelected(ae){if(!ae||ae===this.getCurrentDatabaseName())return;if(!this._editor.input){this.logService.error("editor input was null");return}let ue=this._editor.input.uri;!ue||!this.connectionManagementService.getConnectionProfile(ue)||this.connectionManagementService.changeDatabase(this._editor.input.uri,ae).then(ge=>{ge?this._dropdown.options.strictSelection=!0:(this.resetDatabaseName(),this.notificationService.notify({severity:v.default.Error,message:t.localize(17,null)}))},ge=>{this.resetDatabaseName(),this.notificationService.notify({severity:v.default.Error,message:t.localize(18,null,(0,E.getErrorMessage)(ge))})})}isDWGen3Database(ae){const ue=this.connectionManagementService.getServerInfo(ae);return ue?ue.serverEdition===C.sqlDataWarehouse&&ue.serverMajorVersion===C.gen3Version:!1}removePoolInstanceName(ae){if(ae.includes("@")){const ue=ae.lastIndexOf("@");ae=ae.slice(0,ue)}return ae}getCurrentDatabaseName(){if(!this._editor.input){this.logService.error("editor input was null");return}let ae=this._editor.input.uri;if(ae){let ue=this.connectionManagementService.getConnectionProfile(ae);if(ue)return this.isDWGen3Database(ue.id)?this.removePoolInstanceName(ue.databaseName):ue.databaseName}}resetDatabaseName(){this._dropdown.value=this.getCurrentDatabaseName()}onConnectionChanged(ae){if(!ae)return;if(!this._editor.input){this.logService.error("editor input was null");return}this._editor.input.uri===ae.connectionUri&&this.updateConnection(ae.connectionProfile.databaseName)}onDropdownFocus(){this.getDatabaseNames().then(ae=>{this._dropdown.values=ae}).catch(E.onUnexpectedError)}async getDatabaseNames(){if(!this._editor.input)return this.logService.error("editor input was null"),[];let ae=this._editor.input.uri;if(!ae)return[];try{return(await this.connectionManagementService.listDatabases(ae))?.databaseNames??[]}catch(ue){this.logService.error("Error loading database names for query editor ",ue)}return[]}updateConnection(ae){if(!this._editor?.input)return;const ue=this.connectionManagementService.getConnectionProfile(this._editor.input.uri);!ue||!this.capabilitiesService.getCapabilities(ue.providerName).connection.connectionOptions?.find(ge=>ge.specialValueType===o.ConnectionOptionSpecialType.databaseName)||(this._isConnected=!0,this._currentDatabaseName=ae,this._dropdown.value=ae,this._dropdown.values=[ae],this._dropdown.enabled=!0,ae||(this._dropdown.options.strictSelection=!1),this.getDatabaseNames().then(ge=>{this._dropdown.values=ge}).catch(E.onUnexpectedError))}get currentDatabaseName(){return this._currentDatabaseName}};e.ListDatabasesActionItem=oe,e.ListDatabasesActionItem=oe=fe([O(2,D.IContextViewService),O(3,S.IConnectionManagementService),O(4,f.INotificationService),O(5,w.ILogService),O(6,l.ICapabilitiesService)],oe);let le=class extends H{static{K=this}static{this.ID="exportAsNotebookAction"}constructor(ae,ue,de){super(ue,ae,K.ID,k.ThemeIcon.asClassName(A.Codicon.notebook)),this._commandService=de,this.label=t.localize(19,null),this.tooltip=t.localize(20,null)}async run(){this._commandService.executeCommand("mssql.exportSqlAsNotebook",this.editor.input.uri)}};e.ExportAsNotebookAction=le,e.ExportAsNotebookAction=le=K=fe([O(1,S.IConnectionManagementService),O(2,p.ICommandService)],le),e.CATEGORIES={ExecutionPlan:{value:t.localize(21,null),original:"Execution Plan"}},e.ParseSyntaxCommandId="parseQueryAction";let ne=class extends y.Action{constructor(ae){super(e.ParseSyntaxCommandId,t.localize(22,null),k.ThemeIcon.asClassName(A.Codicon.check)),this._commandService=ae}async run(){this._commandService.executeCommand(e.ParseSyntaxCommandId)}};e.ParseSyntaxTaskbarAction=ne,e.ParseSyntaxTaskbarAction=ne=fe([O(0,p.ICommandService)],ne)}),define(Q[3687],Y([1,0,4520,106,194,33,58,107,117,21,28,1010,9,1998,374,10,11,23,5,360,459,15,49,91]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandLineWorkbenchContribution=void 0;var w;(function(_){_.connect="connect",_.openConnectionDialog="openConnectionDialog"})(w||(w={}));const E={};function C({path:_}){return function(A,k,L){const R=L.value;E[_]=R}}let I=class{constructor(A,k,L,R,M,N,P,x,F,V,W){this._capabilitiesService=A,this._connectionManagementService=k,this._editorService=R,this._commandService=M,this._configurationService=N,this._notificationService=P,this.logService=x,this.instantiationService=F,this.dialogService=W,h.ipcRenderer&&h.ipcRenderer.on("ads:processCommandLine",(z,B)=>this.onLaunched(B)),L&&this.onLaunched(L.args),V&&V.registerHandler(this)}onLaunched(A){this._capabilitiesService.getCapabilities(v.mssqlProviderName)?this.processCommandLine(A).catch(L=>{this.logService.warn("processCommandLine failed: "+L)}):this._capabilitiesService.onCapabilitiesRegistered(L=>{L.id===v.mssqlProviderName&&this.processCommandLine(A).catch(R=>{this.logService.warn("processCommandLine failed: "+R)})})}async processCommandLine(A){let k,L;if(A&&(this._commandService&&(L=A.command),A.server&&(k=await this.readProfileFromArgs(A))),this._configurationService.getValue("workbench.showConnectDialogOnStartup")&&!L&&!k&&!this._connectionManagementService.hasRegisteredServers()){await this._connectionManagementService.showConnectionDialog(void 0,{showDashboard:!0,saveTheConnection:!0,showConnectionDialogOnError:!0,showFirewallRuleOnError:!0});return}let M;if(k&&L!==w.openConnectionDialog){this._notificationService&&this._notificationService.status((0,r.localize)(0,null,k.serverName),{hideAfter:2500});try{await this._connectionManagementService.connectIfNotConnected(k,A.showDashboard?"dashboard":"connection",!0);let N=this._connectionManagementService.getConnectionProfileById(k.id);M={connectionProfile:new y.ConnectionProfile(this._capabilitiesService,N).toIConnectionProfile()}}catch(N){this.logService.warn("Failed to connect due to error: "+(0,l.getErrorMessage)(N))}}if(L)this._notificationService&&this._notificationService.status((0,r.localize)(1,null,L),{hideAfter:2500}),L===w.connect||L===w.openConnectionDialog?await this.runCommandHandler(L,A):await this._commandService.executeCommand(L,M);else if(M){if(A._&&A._.length>0)await Promise.all(A._.map((N,P)=>this.processFile(s.URI.file(N).toString(),k,P===0)));else if(this._capabilitiesService.getCapabilities(k.providerName)?.connection?.isQueryProvider){this._notificationService&&this._notificationService.status((0,r.localize)(2,null,k.serverName),{hideAfter:2500});try{await this.instantiationService.invokeFunction(p.openNewQuery,k)}catch(N){this.logService.warn("unable to open query editor "+N)}}}}async handleURL(A){let k=A.authority,L=this.parseProtocolArgs(A);const R=await this.runCommandHandler(k,L);if(typeof R!="boolean")throw new Error("Invalid URL Handler used in commandLine code.");return R}async runCommandHandler(A,k){let L=E[A];return L?(L=L.bind(this),await L(k)):!1}async handleConnect(A){try{if(!A.server)return this._notificationService.warn((0,r.localize)(3,null)),!0;if(await this.confirmConnect(A)){const L=await this.readProfileFromArgs(A);try{await this._connectionManagementService.connect(L,void 0,{saveTheConnection:!0,showDashboard:!0,showConnectionDialogOnError:!0,showFirewallRuleOnError:!0})}catch(R){this.logService.warn("Failed to connect due to error: "+(0,l.getErrorMessage)(R))}}}catch(k){this._notificationService.error((0,r.localize)(4,null,(0,l.getErrorMessage)(k)))}return!0}async handleOpenConnectionDialog(A){try{if(!A.server)return this._notificationService.warn((0,r.localize)(5,null)),!0;if(!await this.confirmConnect(A))return!0;const L=await this.readProfileFromArgs(A);await this._connectionManagementService.showConnectionDialog(void 0,{saveTheConnection:!0,showDashboard:!0,showConnectionDialogOnError:!0,showFirewallRuleOnError:!0},L)}catch(k){this._notificationService.error((0,r.localize)(6,null,(0,l.getErrorMessage)(k)))}return!0}async confirmConnect(A){let k=A&&A.server?(0,r.localize)(7,null,A.server):"";return!!(await this.dialogService.confirm({message:(0,r.localize)(8,null),detail:k,primaryButton:(0,r.localize)(9,null),type:"question"})).confirmed}parseProtocolArgs(A){let k=t.parse(A.query);return k.command=void 0,k}async processFile(A,k,L){let R=this._editorService.editors.filter(M=>M.resource.toString()===A).pop();if(R instanceof i.QueryEditorInput&&R.state.connected){let M={params:{connectionType:T.ConnectionType.editor,runQueryOnCompletion:T.RunQueryOnConnectionMode.none,input:R},saveTheConnection:!1,showDashboard:!1,showConnectionDialogOnError:L,showFirewallRuleOnError:L};this._notificationService&&this._notificationService.status((0,r.localize)(10,null),{hideAfter:2500}),await this._connectionManagementService.connect(k,A,M)}}async readProfileFromArgs(A){if(A.provider&&!this._capabilitiesService.providers[A.provider]&&!await this._connectionManagementService.handleUnsupportedProvider(A.provider))return;let k=new y.ConnectionProfile(this._capabilitiesService,null);k.savePassword=!0,k.providerName=A.provider??v.mssqlProviderName,k.serverName=A.server,k.databaseName=A.database??"",k.userName=A.user??"",k.authenticationType=A.authenticationType?A.authenticationType:A.integrated?v.AuthenticationType.Integrated:A.aad?v.AuthenticationType.AzureMFA:A.user&&A.user.length>0?A.user.includes("@")?v.AuthenticationType.AzureMFA:v.AuthenticationType.SqlLogin:v.AuthenticationType.Integrated,k.connectionName="";const L=A.applicationName?A.applicationName+"-"+v.applicationName:v.applicationName;return k.setOptionValue("applicationName",L),k.setOptionValue("databaseDisplayName",k.databaseName),k.setOptionValue("groupId",k.groupId),this.getAdvancedOptions(A.connectionProperties,k.getOptionKeyIdNames()).forEach((M,N)=>{k.setOptionValue(N,M)}),this._connectionManagementService?this.tryMatchSavedProfile(k):k}getAdvancedOptions(A,k){const L=k.concat(["password","azureAccountToken"]);let R=new Map;if(A)try{A=decodeURI(A),JSON.parse(A,(M,N)=>{M in L||R.set(M,N)})}catch(M){throw new Error((0,r.localize)(11,null,M,A))}return R}tryMatchSavedProfile(A){let k,L=this._connectionManagementService.getConnectionGroups([v.mssqlProviderName]);if(L&&L.length>0){let R=L[0];k=b.ConnectionProfileGroup.getConnectionsInGroup(R).find(N=>this.matchProfile(A,N))}return k||A}matchProfile(A,k){return(0,D.equalsIgnoreCase)(A.serverName,k.serverName)&&(0,D.equalsIgnoreCase)(A.providerName,k.providerName)&&A.databaseName===k.databaseName&&(0,D.equalsIgnoreCase)(A.userName,k.userName)&&A.authenticationType===k.authenticationType}};e.CommandLineWorkbenchContribution=I,fe([C({path:w.connect})],I.prototype,"handleConnect",null),fe([C({path:w.openConnectionDialog})],I.prototype,"handleOpenConnectionDialog",null),e.CommandLineWorkbenchContribution=I=fe([O(0,f.ICapabilitiesService),O(1,T.IConnectionManagementService),O(2,g.IEnvironmentService),O(3,m.IEditorService),O(4,S.ICommandService),O(5,a.IConfigurationService),O(6,u.INotificationService),O(7,o.ILogService),O(8,d.IInstantiationService),O(9,c.IURLService),O(10,n.IDialogService)],I)}),define(Q[1336],Y([1,0,413,360,2023,509]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DATABASE_DASHBOARD_TABS=e.DATABASE_DASHBOARD_PROPERTIES=e.DATABASE_DASHBOARD_SETTING=e.databaseDashboardTabsSchema=e.databaseDashboardSettingSchema=e.databaseDashboardPropertiesSchema=void 0,e.databaseDashboardPropertiesSchema={description:b.localize(0,null),default:!0,oneOf:[{type:"boolean"},{type:"string",enum:["collapsed"]},{type:"array",items:{type:"object",properties:{provider:{type:"string"},edition:{type:"number"},properties:{description:b.localize(1,null),type:"array",items:{type:"object",properties:{displayName:{type:"string",description:b.localize(2,null)},value:{type:"string",description:b.localize(3,null)},ignore:{type:"array",description:b.localize(4,null),items:"string"}}},default:[{displayName:b.localize(5,null),value:"recoveryModel"},{displayName:b.localize(6,null),value:"lastBackupDate",ignore:["1/1/0001 12:00:00 AM"]},{displayName:b.localize(7,null),value:"lastLogBackupDate",ignore:["1/1/0001 12:00:00 AM"]},{displayName:b.localize(8,null),value:"compatibilityLevel"},{displayName:b.localize(9,null),value:"owner"}]}}}}]},e.databaseDashboardSettingSchema={type:["array"],description:b.localize(10,null),items:(0,D.generateDashboardWidgetSchema)("database"),default:[{name:"Tasks",gridItemConfig:{sizex:1,sizey:2},widget:{"tasks-widget":[y.NewQueryTask.ID,t.NewNotebookTask.ID,{name:"backup",when:"connectionProvider == 'PGSQL'"},{name:"restore",when:"connectionProvider == 'PGSQL'"}]}},{name:b.localize(11,null),gridItemConfig:{sizex:3,sizey:2},widget:{"explorer-widget":{}}}]},e.databaseDashboardTabsSchema={type:["array"],description:b.localize(12,null),items:(0,D.generateDashboardTabSchema)("database"),default:[]},e.DATABASE_DASHBOARD_SETTING="dashboard.database.widgets",e.DATABASE_DASHBOARD_PROPERTIES="dashboard.database.properties",e.DATABASE_DASHBOARD_TABS="dashboard.database.tabs"}),define(Q[1337],Y([1,0,509,413,360,2025]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SERVER_DASHBOARD_TABS=e.SERVER_DASHBOARD_PROPERTIES=e.SERVER_DASHBOARD_SETTING=e.serverDashboardTabsSchema=e.serverDashboardSettingSchema=e.serverDashboardPropertiesSchema=void 0,e.serverDashboardPropertiesSchema={description:D.localize(0,null),default:!0,oneOf:[{type:"boolean"},{type:"string",enum:["collapsed"]},{type:"object",properties:{provider:{type:"string"},edition:{type:"number"},properties:{description:D.localize(1,null),type:"array",items:{type:"object",properties:{displayName:{type:"string",description:D.localize(2,null)},value:{type:"string",description:D.localize(3,null)}}},default:[{displayName:D.localize(4,null),value:"serverVersion"},{displayName:D.localize(5,null),value:"serverEdition"},{displayName:D.localize(6,null),value:"machineName"},{displayName:D.localize(7,null),value:"osVersion"}]}}}]};const T=[{name:"Tasks",widget:{"tasks-widget":[b.NewQueryTask.ID,y.NewNotebookTask.ID,{name:"restore",when:"connectionProvider == 'PGSQL'"}]},gridItemConfig:{sizex:1,sizey:1}},{widget:{"backup-history-server-insight":null}},{widget:{"all-database-size-server-insight":null}},{name:D.localize(8,null),gridItemConfig:{sizex:2,sizey:2},when:"connectionProvider != 'MSSQL' || mssql:engineedition == 11 || mssql:iscloud",widget:{"explorer-widget":{}}}];e.serverDashboardSettingSchema={type:["array"],description:D.localize(9,null),items:(0,t.generateDashboardWidgetSchema)("server"),default:T},e.serverDashboardTabsSchema={type:["array"],description:D.localize(10,null),items:(0,t.generateDashboardTabSchema)("server"),default:[]},e.SERVER_DASHBOARD_SETTING="dashboard.server.widgets",e.SERVER_DASHBOARD_PROPERTIES="dashboard.server.properties",e.SERVER_DASHBOARD_TABS="dashboard.server.tabs"}),define(Q[3688],Y([1,0,34,2031,58,360,5,78,17]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RunInsightQueryAction=void 0;let m=class extends t.Action{static{this.ID="runQuery"}static{this.LABEL=y.localize(0,null)}constructor(h,a,r,i){super(h,a),this.instantiationService=r,this._textResourcePropertiesService=i}async run(h){let a,r=this._textResourcePropertiesService.getEOL(void 0);if(h.insight&&h.insight.query)(0,v.isString)(h.insight.query)?a=h.insight.query:a=h.insight.query.join(r);else return;await this.instantiationService.invokeFunction(D.openNewQuery,h.profile,a,b.RunQueryOnConnectionMode.executeQuery)}};e.RunInsightQueryAction=m,e.RunInsightQueryAction=m=fe([O(2,T.IInstantiationService),O(3,f.ITextResourcePropertiesService)],m)}),define(Q[1338],Y([1,0,40,3201,554,144,388,879,230,1331,3688,17,2032,16,14,5,24,4,15,9,25,136,1618,3202]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InsightsWidget=void 0;const n=r.Registry.as(v.Extensions.InsightContribution);let g=class extends b.DashboardWidget{constructor(E,C,I,_,A,k,L,R,M){super(_),this._componentFactoryResolver=E,this.dashboardService=C,this._injector=A,this.instantiationService=k,this.storageService=L,this._configurationService=R,this.fileService=M,this._config=I,this.insightConfig=this._config.widget["insights-widget"],this._loadingMessage=a.localize(0,null,this._config.name),this._loadingCompletedMessage=a.localize(1,null,this._config.name),this._verifyConfig(),this._parseConfig().then(()=>{if(!this._checkStorage()){const N=this._runQuery();this.queryObv=y.Observable.fromPromise(N);const P=(0,i.createCancelablePromise)(()=>N.then(x=>{this._inited?(this._updateChild(x),this.setupInterval()):this.queryObv=y.Observable.fromPromise(Promise.resolve(x))},x=>{(0,d.isCancellationError)(x)||(this._inited?this.showError(x):this.queryObv=y.Observable.fromPromise(Promise.resolve(x)))}).then(()=>this._changeRef.detectChanges()));this._register((0,u.toDisposable)(()=>P.cancel()))}},N=>{this.setLoadingStatus(!1),this.showError(N)})}ngAfterContentInit(){this._inited=!0,this.queryObv&&this._register((0,l.subscriptionToDisposable)(this.queryObv.subscribe(E=>{this.setLoadingStatus(!1),this._updateChild(E),this.setupInterval()},E=>{this.setLoadingStatus(!1),this.showError(E)})))}setupInterval(){this.insightConfig.autoRefreshInterval&&(this._intervalTimer=new i.IntervalTimer,this._register(this._intervalTimer),this._intervalTimer.cancelAndSet(()=>{const E=(0,v.getWidgetAutoRefreshState)(this.insightConfig.id,this.actionsContext.profile.id);this.updateAutoRefreshStatus(E),E&&this.refresh()},this.insightConfig.autoRefreshInterval*60*1e3))}updateAutoRefreshStatus(E){let C=E?"":a.localize(2,null);this.autoRefreshStatus!==C&&(this.autoRefreshStatus=C,this._changeRef.detectChanges())}showError(E){this.error=E,this._changeRef.detectChanges()}get actions(){const E=[];return this.insightConfig.details&&(this.insightConfig.details.query||this.insightConfig.details.queryFile)&&E.push(this.instantiationService.createInstance(f.InsightAction,f.InsightAction.ID,f.InsightAction.LABEL)),E.push(this.instantiationService.createInstance(S.RunInsightQueryAction,S.RunInsightQueryAction.ID,S.RunInsightQueryAction.LABEL)),E}get actionsContext(){return{profile:this.dashboardService.connectionManagementService.connectionInfo.connectionProfile,insight:this.insightConfig}}_storeResult(E){if(this.insightConfig.cacheId){const C=new Date,I={date:C.toString(),results:E};this.lastUpdated=a.localize(3,null,C.toLocaleTimeString(),C.toLocaleDateString()),this._changeRef.detectChanges(),this.storageService.store(this._getStorageKey(),JSON.stringify(I),-1,1)}return E}_checkStorage(){if(this.insightConfig.cacheId){const E=this.storageService.get(this._getStorageKey(),-1);if(E){const C=JSON.parse(E),I=new Date(C.date);return this.lastUpdated=a.localize(4,null,I.toLocaleTimeString(),I.toLocaleDateString()),this._inited?(this._updateChild(C.results),this.setupInterval(),this._changeRef.detectChanges()):this.queryObv=y.Observable.fromPromise(Promise.resolve(JSON.parse(E))),!0}else return!1}return!1}refresh(){this._runQuery().then(E=>this._updateChild(E),E=>this.showError(E))}_getStorageKey(){return`insights.${this.insightConfig.cacheId}.${this.dashboardService.connectionManagementService.connectionInfo.connectionProfile.getOptionsKey()}`}_runQuery(){return this.setLoadingStatus(!0),Promise.resolve(this.dashboardService.queryManagementService.runQueryAndReturn(this.insightConfig.query).then(E=>(this.setLoadingStatus(!1),this._storeResult(E)),E=>{throw this.setLoadingStatus(!1),E}))}_updateChild(E){if(this.componentHost.viewContainerRef.clear(),this.error=void 0,this._changeRef.detectChanges(),E.rowCount===0){this.showError(a.localize(5,null));return}const C=this._componentFactoryResolver.resolveComponentFactory(n.getCtorFromId(this._typeKey)),_=this.componentHost.viewContainerRef.createComponent(C,0,this._injector).instance;_.setConfig&&_.setConfig(this.insightConfig.type[this._typeKey]),_.data={columns:E.columnInfo.map(A=>A.columnName),rows:E.rows.map(A=>A.map(k=>k.invariantCultureDisplayValue===null||k.invariantCultureDisplayValue===void 0?k.displayValue:k.invariantCultureDisplayValue))},_.init&&_.init()}_verifyConfig(){if(h.isUndefinedOrNull(this.insightConfig))throw new Error("Insight config must be defined");if(h.isUndefinedOrNull(this.insightConfig.type))throw new Error("An Insight type must be specified");if(Object.keys(this.insightConfig.type).length!==1)throw new Error("Exactly 1 insight type must be specified");if(!n.getAllIds().some(E=>E===Object.keys(this.insightConfig.type)[0]))throw new Error("The insight type must be a valid registered insight");if(!this.insightConfig.query&&!this.insightConfig.queryFile)throw new Error("No query was specified for this insight");if(this.insightConfig.autoRefreshInterval&&!h.isNumber(this.insightConfig.autoRefreshInterval))throw new Error("Auto Refresh Interval must be a number if specified");if(!h.isStringArray(this.insightConfig.query)&&!h.isString(this.insightConfig.query)&&!h.isString(this.insightConfig.queryFile))throw new Error("Invalid query or queryfile specified")}async _parseConfig(){if(this._typeKey=Object.keys(this.insightConfig.type)[0],this._configurationService.getValue("editor.accessibilitySupport")==="on"&&this._typeKey!=="count"&&(this._typeKey="table"),h.isStringArray(this.insightConfig.query))this.insightConfig.query=this.insightConfig.query.join(" ");else if(this.insightConfig.queryFile){const C=await this.instantiationService.invokeFunction(m.resolveQueryFilePath,this.insightConfig.queryFile);this.insightConfig.query=(await this.fileService.readFile(C)).value.toString()}}};e.InsightsWidget=g,fe([(0,t.ViewChild)(T.ComponentHostDirective)],g.prototype,"componentHost",void 0),e.InsightsWidget=g=fe([(0,t.Component)({selector:"insights-widget",template:` <div *ngIf="error" style="text-align: center; padding-top: 20px">{{error}}</div> <div *ngIf="lastUpdated" class="insights-widget-last-updated subText">{{lastUpdated}}</div> <div *ngIf="autoRefreshStatus" style="font-style: italic; font-size: 80%; margin-left: 5px">{{autoRefreshStatus}}</div> <div style="margin: 10px; width: calc(100% - 20px); height: calc(100% - 20px)"> <ng-template *ngIf="!_loading" component-host></ng-template> <loading-spinner [loading]="_loading" [loadingMessage]="_loadingMessage" [loadingCompletedMessage]="_loadingCompletedMessage"></loading-spinner> </div>`,styles:[":host { width: 100%; height: 100% }"]}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ComponentFactoryResolver))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>D.CommonServiceInterface))),O(2,(0,t.Inject)(b.WIDGET_CONFIG)),O(3,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(4,(0,t.Inject)((0,t.forwardRef)(()=>t.Injector))),O(5,(0,t.Inject)(s.IInstantiationService)),O(6,(0,t.Inject)(o.IStorageService)),O(7,(0,t.Inject)(p.IConfigurationService)),O(8,(0,t.Inject)(c.IFileService))],g)}),define(Q[743],Y([1,0,7,2067,360,5,58,198,201,4,54]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionPlanViewHeader=void 0;let h=class extends m.Disposable{constructor(r,i,s){super(),this._parentContainer=r,this._instantiationService=s,i&&(this._graphIndex=i.planIndex,this._relativeCost=i.relativeCost,this._query=i.query,this._recommendations=i.recommendations??[]),this._graphIndexAndCostContainer=t.$(".index-row"),this._queryContainer=t.$(".query-row"),this._recommendationsContainer=t.$(".recommendations"),this._parentContainer.appendChild(this._graphIndexAndCostContainer),this._parentContainer.appendChild(this._queryContainer),this._parentContainer.appendChild(this._recommendationsContainer),this.renderGraphIndexAndCost(),this.renderQueryText(),this.renderRecommendations()}set graphIndex(r){this._graphIndex=r,this.renderGraphIndexAndCost()}set relativeCost(r){this._relativeCost=r,this.renderGraphIndexAndCost()}set query(r){this._query=(0,v.removeLineBreaks)(r," "),this.renderQueryText()}set recommendations(r){r.forEach(i=>{i.displayString=(0,v.removeLineBreaks)(i.displayString)}),this._recommendations=r,this.renderRecommendations()}renderGraphIndexAndCost(){this._graphIndex&&this._relativeCost&&(this._graphIndexAndCostContainer.innerText=(0,y.localize)(0,null,this._graphIndex,this._relativeCost.toFixed(2)))}renderQueryText(){this._query&&(this._queryContainer.innerText=this._query,this._queryContainer.title=this._query)}renderRecommendations(){if(this._recommendations){for(;this._recommendationsContainer.firstChild;)this._recommendationsContainer.removeChild(this._recommendationsContainer.firstChild);this._recommendations.forEach(r=>{const i=this._register(new f.Button(this._recommendationsContainer,{title:r.displayString,secondary:!0,...S.defaultButtonStyles}));i.label=r.displayString,this._register(i.onDidClick(s=>{this._instantiationService.invokeFunction(b.openNewQuery,void 0,r.queryWithDescription,T.RunQueryOnConnectionMode.none)}))})}}};e.ExecutionPlanViewHeader=h,e.ExecutionPlanViewHeader=h=fe([O(2,D.IInstantiationService)],h)}),define(Q[3689],Y([1,0,2065,7,1114,196,5,29,143,68,34,398,272,743,571,4,42,66,43,170,101]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";var l,n;Object.defineProperty(e,"__esModule",{value:!0}),e.SelectAll=e.CopyTableDataWithHeader=e.CopyTableData=e.ExecutionPlanTreeTabView=e.ExecutionPlanTreeTab=void 0;let g=class extends s.Disposable{constructor(A){super(),this.title=(0,t.localize)(0,null),this.identifier="planTreeTab",this.view=this._register(A.createInstance(w))}clear(){}};e.ExecutionPlanTreeTab=g,e.ExecutionPlanTreeTab=g=fe([O(0,T.IInstantiationService)],g);let w=class extends s.Disposable{constructor(A,k,L,R,M){super(),this._instantiationService=A,this._contextMenuService=k,this._accessibilityService=L,this._quickInputService=R,this._componentContextService=M,this._container=y.$(".top-operations-tab"),this._treeGrids=[],this._planTreeContainers=[]}set state(A){this._input!==A&&(this._input=A,this.renderInput())}render(A){A.appendChild(this._container)}renderInput(){for(;this._container.firstChild;)this._container.removeChild(this._container.firstChild);this._input.graphs.forEach((A,k)=>{this.convertExecutionPlanGraphToTreeGrid(A,k)})}convertExecutionPlanGraphToTreeGrid(A,k){let L=[];const R=[],M=[];for(M.push({node:A.root,parentIndex:-1});M.length!==0;){const K=M.pop(),H={};K.node.topOperationsData.forEach((U,G)=>{let $=U.displayValue.toString();H[U.columnName]={text:$,ariaLabel:U.displayValue,dataType:U.dataType},R.indexOf(U.columnName)===-1&&R.splice(G,0,U.columnName)}),H.nodeId=K.node.id,H.parent=K.parentIndex,H.parentNodeId=L[K.parentIndex]?L[K.parentIndex].nodeId:void 0,H.expanded=!0,K.node.children&&K.node.children.forEach(U=>M.push({node:U,parentIndex:L.length})),L.push(H)}const N=R.map((K,H)=>({id:K.toString(),name:K,field:K.toString(),formatter:a.textFormatter,sortable:!0}));N[0].width=500;const P=y.$(".top-operations-container");this._container.appendChild(P);const x=this._register(this._instantiationService.createInstance(r.ExecutionPlanViewHeader,P,{planIndex:k}));x.query=A.query,x.relativeCost=A.root.relativeCost;const F=y.$(".table-container");P.appendChild(F),this._planTreeContainers.push(P);let V=new i.CopyKeybind;this._register(V.onCopy(K=>{let H="";const U=W.getSelectedRanges()[0];if(U){const G=[];for(let ie=U.fromRow;ie<=U.toRow;ie++){const J=z.getData().getItem(ie),j=[];for(let ee=U.fromCell;ee<=U.toCell;ee++){const X=J[z.grid.getColumns()[ee].field];X?j.push(X.displayText??X.text):j.push(" ")}G.push(j)}H=G.map(ie=>ie.map(J=>`${J}`).join(" ")).join(` `);const $=[];for(let ie=U.fromCell;ie<=U.toCell;ie++)$.push(z.grid.getColumns()[ie].name)}this._register(this._instantiationService.createInstance(E)).run({selectedText:H})}));const W=new h.CellSelectionModel,z=this._register(new b.TreeGrid(F,this._accessibilityService,this._quickInputService,c.defaultTableStyles,{columns:N,sorter:K=>{const H=K.sortCol.field;let U=(0,o.deepClone)(L);U.length===0&&(U=this._register(z.getData()).getItems());const G=[],$=U[0],ie=[];for(ie.push({row:$,originalIndex:0});ie.length!==0;){const J=ie.pop();G.push(J.row);let j=[];for(let ee=0;ee<U.length;ee++)U[ee].parentNodeId===J.row.nodeId&&j.push({row:U[ee],originalIndex:ee});j=j.sort((ee,X)=>{const te=ee.row,Z=X.row;let se=-1;if(!te[H])se=1;else if(!Z[H])se=-1;else{const re=te[H].dataType,oe=te[H].text,le=Z[H].text;if(oe===le)se=0;else switch(re){case D.executionPlan.ExecutionPlanGraphElementPropertyDataType.String:case D.executionPlan.ExecutionPlanGraphElementPropertyDataType.Boolean:se=oe.localeCompare(le);break;case D.executionPlan.ExecutionPlanGraphElementPropertyDataType.Number:se=parseFloat(oe)-parseFloat(le);break}}return K.sortAsc?se:-se}),j.forEach(ee=>{ee.row.parent=G.length-1}),ie.push(...j)}L=G,z.setData(G)}},{rowHeight:v.RESULTS_GRID_DEFAULTS.rowHeight,forceFitColumns:!1,defaultColumnWidth:120,showRowNumber:!0}));z.setSelectionModel(W),z.setData(L),z.registerPlugin(V),z.setTableTitle((0,t.localize)(1,null)),this._treeGrids.push(z),this._register(this._componentContextService.registerTable(z));const B=[this._register(this._instantiationService.createInstance(E)),this._register(this._instantiationService.createInstance(C)),this._register(this._instantiationService.createInstance(I))];return this._register(z.onKeyDown(K=>{K.event.ctrlKey&&(K.event.key==="a"||K.event.key==="A")&&(W.setSelectedRanges([new Slick.Range(0,0,this._register(z.getData()).getLength()-1,z.grid.getColumns().length-1)]),z.focus(),K.event.preventDefault(),K.event.stopPropagation())})),this._register(z.onContextMenu(K=>{let H="",U="";const G=W.getSelectedRanges()[0];if(G){const $=[];for(let J=G.fromRow;J<=G.toRow;J++){const j=this._register(z.getData()).getItem(J),ee=[];for(let X=G.fromCell;X<=G.toCell;X++){const te=j[z.grid.getColumns()[X].field];te?ee.push(te.displayText??te.text):ee.push("")}$.push(ee)}H=$.map(J=>J.map(j=>`${j}`).join(" ")).join(` `);const ie=[];for(let J=G.fromCell;J<=G.toCell;J++)ie.push(z.grid.getColumns()[J].name);U=ie.join(" ")+` `+H}this._contextMenuService.showContextMenu({getAnchor:()=>K.anchor,getActions:()=>B,getActionsContext:()=>({selectedText:H,selectionModel:W,treeGrid:z,selectionTextWithHeader:U})})})),new ResizeObserver(K=>{z.layout(new y.Dimension(F.clientWidth,F.clientHeight))}).observe(F),z}layout(A){this._container.style.width=A.width+"px",this._container.style.height=A.height+"px"}remove(){}onShow(){}onHide(){}};e.ExecutionPlanTreeTabView=w,e.ExecutionPlanTreeTabView=w=fe([O(0,T.IInstantiationService),O(1,f.IContextMenuService),O(2,u.IAccessibilityService),O(3,d.IQuickInputService),O(4,p.IComponentContextService)],w);let E=class extends S.Action{static{l=this}static{this.ID="ept.CopyTableData"}static{this.LABEL=(0,t.localize)(2,null)}constructor(A){super(l.ID,l.LABEL,""),this._clipboardService=A}async run(A){this._clipboardService.writeText(A.selectedText)}};e.CopyTableData=E,e.CopyTableData=E=l=fe([O(0,m.IClipboardService)],E);let C=class extends S.Action{static{n=this}static{this.ID="ept.CopyTableDataWithHeader"}static{this.LABEL=(0,t.localize)(3,null)}constructor(A){super(n.ID,n.LABEL,""),this._clipboardService=A}async run(A){this._clipboardService.writeText(A.selectionTextWithHeader)}};e.CopyTableDataWithHeader=C,e.CopyTableDataWithHeader=C=n=fe([O(0,m.IClipboardService)],C);class I extends S.Action{static{this.ID="ept.SelectAllTableData"}static{this.LABEL=(0,t.localize)(4,null)}constructor(){super(I.ID,I.LABEL,"")}async run(A){A.selectionModel.setSelectedRanges([new Slick.Range(0,0,A.treeGrid.getData().getLength()-1,A.treeGrid.grid.getColumns().length-1)])}}e.SelectAll=I}),define(Q[3690],Y([1,0,2068,5,7,187,272,143,19,743,653,571,398,196,36,29,34,68,4,166,396,66,43,170,54,101,790]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E){"use strict";var C,I;Object.defineProperty(e,"__esModule",{value:!0}),e.SelectAll=e.CopyTableDataWithHeader=e.CopyTableData=e.TopOperationsTabView=e.TopOperationsTab=void 0;const _="tableCostColumnForSorting";let A=class extends d.Disposable{constructor(P,x){super(),this._queryResultsView=P,this.title=(0,t.localize)(0,null),this.identifier="TopOperationsTab",this.view=this._register(x.createInstance(k,this._queryResultsView))}clear(){}};e.TopOperationsTab=A,e.TopOperationsTab=A=fe([O(1,y.IInstantiationService)],A);let k=class extends d.Disposable{constructor(P,x,F,V,W,z,B){super(),this._queryResultsView=P,this._instantiationService=x,this._contextMenuService=F,this._contextViewService=V,this._accessibilityService=W,this._quickInputService=z,this._componentContextService=B,this._container=b.$(".top-operations-tab"),this._topOperationsContainers=[],this._tables=[]}scrollToIndex(P){P=P-1,this._topOperationsContainers[P].scrollIntoView(!0),this._tables.forEach(x=>{x.getSelectionModel().setSelectedRanges([])}),this._tables[P].getSelectionModel().setSelectedRanges([new Slick.Range(0,1,0,1)]),this._tables[P].focus()}set state(P){this._input!==P&&(this._input=P,this.renderInput())}render(P){P.appendChild(this._container)}renderInput(){for(;this._container.firstChild;)this._container.removeChild(this._container.firstChild);this._input.graphs.forEach((P,x)=>{this.convertExecutionPlanGraphToTable(P,x)})}convertExecutionPlanGraphToTable(P,x){const F=[],V=[],W=[];for(W.push(...P.root.children);W.length!==0;){const te=W.pop(),Z={};te.topOperationsData.forEach((se,re)=>{let oe=se.displayValue.toString();re===0?Z[se.columnName]={displayText:oe,linkOrCommand:" ",dataType:se.dataType}:Z[se.columnName]={text:oe,ariaLabel:se.displayValue,dataType:se.dataType},V.indexOf(se.columnName)===-1&&V.splice(re,0,se.columnName)}),Z.nodeId=te.id,te.children&&te.children.forEach(se=>W.push(se)),Z[_]=te.cost,F.push(Z)}F.sort((te,Z)=>Z[_]-te[_]);const z=V.map((te,Z)=>({id:te.toString(),name:te,field:te.toString(),formatter:Z===0?T.hyperLinkFormatter:T.textFormatter,sortable:!0})),B=b.$(".top-operations-container");this._container.appendChild(B);const K=b.$(".top-operations-header");B.appendChild(K);const H=b.$(".top-operations-header-info");K.appendChild(H);const U=b.$(".top-operations-header-search-bar");K.appendChild(U);const G=this._register(new p.InputBox(U,this._contextViewService,{ariaDescription:c.topOperationsSearchDescription,placeholder:c.searchPlaceholder,inputBoxStyles:w.defaultInputBoxStyles}));G.element.classList.add("codicon",c.filterIconClassNames);const $=this._register(this._instantiationService.createInstance(m.ExecutionPlanViewHeader,H,{planIndex:x}));$.query=P.query,$.relativeCost=P.root.relativeCost;const ie=b.$(".table-container");B.appendChild(ie),this._topOperationsContainers.push(B);const J=new S.RowNumberColumn({autoCellSelection:!1});z.unshift(J.getColumnDefinition());let j=new h.CopyKeybind;this._register(j.onCopy(te=>{let Z="";const se=ee.getSelectedRanges()[0];if(se){const re=[];for(let le=se.fromRow;le<=se.toRow;le++){const ne=this._register(X.getData()).getItem(le),ce=[];for(let ae=se.fromCell;ae<=se.toCell;ae++){const ue=ne[X.columns[ae].field];ue?ce.push(ue.displayText??ue.text):ce.push(" ")}re.push(ce)}Z=re.map(le=>le.map(ne=>`${ne}`).join(" ")).join(` `);const oe=[];for(let le=se.fromCell;le<=se.toCell;le++)oe.push(X.columns[le].name)}this._instantiationService.createInstance(L).run({selectedText:Z})}));const ee=new a.CellSelectionModel({hasRowSelector:!0}),X=this._register(new D.Table(ie,this._accessibilityService,this._quickInputService,E.defaultTableStyles,{columns:z,sorter:te=>{const Z=te.sortCol.field,se=this._register(X.getData()).getItems().sort((re,oe)=>{let le=-1;if(!re[Z])le=1;else if(!oe[Z])le=-1;else{const ne=re[Z].dataType,ce=re[Z].displayText??re[Z].text,ae=oe[Z].displayText??oe[Z].text;if(ce===ae)le=0;else switch(ne){case r.executionPlan.ExecutionPlanGraphElementPropertyDataType.String:case r.executionPlan.ExecutionPlanGraphElementPropertyDataType.Boolean:le=ce.localeCompare(ae);break;case r.executionPlan.ExecutionPlanGraphElementPropertyDataType.Number:le=parseFloat(ce)-parseFloat(ae);break}}return te.sortAsc?le:-le});X.setData(se)}},{rowHeight:f.RESULTS_GRID_DEFAULTS.rowHeight,forceFitColumns:!1,defaultColumnWidth:120,showRowNumber:!0}));return X.setSelectionModel(ee),X.setData(F),X.registerPlugin(j),X.setTableTitle((0,t.localize)(1,null)),this._register(X.onClick(te=>{if(te.cell.cell===1){const se=X.getData().getItem(te.cell.row).nodeId,re=x;this._queryResultsView.switchToExecutionPlanTab(),this._queryResultsView.focusOnNode(re,se)}})),this._tables.push(X),this._register(G.onDidChange(te=>{const Z=te.toLowerCase();if(Z){const se=F.filter(re=>{let oe=!1;for(let le=0;le<z.length;le++){const ne=z[le].field;re[ne]&&(re[ne].displayText??re[ne].text).toLowerCase().includes(Z)&&(oe=!0)}return oe});X.setData(se)}else X.setData(F);X.rerenderGrid()})),this._register(X.onKeyDown(te=>{te.event.ctrlKey&&(te.event.key==="a"||te.event.key==="A")&&(ee.setSelectedRanges([new Slick.Range(0,1,this._register(X.getData()).getLength()-1,X.columns.length-1)]),X.focus(),te.event.preventDefault(),te.event.stopPropagation())})),this._register(X.onKeyDown(te=>{te.event.key==="F3"&&(X.grid.sortColumnByActiveCell(),te.event.preventDefault(),te.event.stopPropagation())})),this._register(X.onContextMenu(te=>{let Z="",se="";const re=ee.getSelectedRanges()[0];if(re){const le=[];for(let ce=re.fromRow;ce<=re.toRow;ce++){const ae=this._register(X.getData()).getItem(ce),ue=[];for(let de=re.fromCell;de<=re.toCell;de++){const ge=ae[X.columns[de].field];ge?ue.push(ge.displayText??ge.text):ue.push("")}le.push(ue)}Z=le.map(ce=>ce.map(ae=>`${ae}`).join(" ")).join(` `);const ne=[];for(let ce=re.fromCell;ce<=re.toCell;ce++)ne.push(X.columns[ce].name);se=ne.join(" ")+` `+Z}const oe=[this._register(this._instantiationService.createInstance(L)),this._register(this._instantiationService.createInstance(R)),this._register(this._instantiationService.createInstance(M))];this._contextMenuService.showContextMenu({getAnchor:()=>te.anchor,getActions:()=>oe,getActionsContext:()=>({selectedText:Z,selectionModel:ee,table:X,selectionTextWithHeader:se})})})),new ResizeObserver(te=>{X.layout(new b.Dimension(ie.clientWidth,ie.clientHeight))}).observe(ie),this._register(this._componentContextService.registerTable(X)),X}layout(P){this._container.style.width=P.width+"px",this._container.style.height=P.height+"px"}remove(){}onShow(){}onHide(){}};e.TopOperationsTabView=k,e.TopOperationsTabView=k=fe([O(1,y.IInstantiationService),O(2,s.IContextMenuService),O(3,s.IContextViewService),O(4,l.IAccessibilityService),O(5,n.IQuickInputService),O(6,g.IComponentContextService)],k),(0,v.registerThemingParticipant)((N,P)=>{const x=N.getColor(i.listHoverBackground);x&&P.addRule(` .top-operations-tab .top-operations-container .query-row { background-color: ${x}; } `)});let L=class extends o.Action{static{C=this}static{this.ID="ep.CopyTableData"}static{this.LABEL=(0,t.localize)(2,null)}constructor(P){super(C.ID,C.LABEL,""),this._clipboardService=P}async run(P){this._clipboardService.writeText(P.selectedText)}};e.CopyTableData=L,e.CopyTableData=L=C=fe([O(0,u.IClipboardService)],L);let R=class extends o.Action{static{I=this}static{this.ID="ep.CopyTableData"}static{this.LABEL=(0,t.localize)(3,null)}constructor(P){super(I.ID,I.LABEL,""),this._clipboardService=P}async run(P){this._clipboardService.writeText(P.selectionTextWithHeader)}};e.CopyTableDataWithHeader=R,e.CopyTableDataWithHeader=R=I=fe([O(0,u.IClipboardService)],R);class M extends o.Action{static{this.ID="ep.SelectAllTableData"}static{this.LABEL=(0,t.localize)(4,null)}constructor(){super(M.ID,M.LABEL,"")}async run(P){P.selectionModel.setSelectedRanges([new Slick.Range(0,1,P.table.getData().getLength()-1,P.table.columns.length-1)])}}e.SelectAll=M}),define(Q[3691],Y([1,0,2148,5,9,373,687,23,58,21,172,372,117,107,106,143,11]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RestoreAction=e.restoreNotSupportedForAzure=e.restoreNotSupportedOutOfContext=e.restoreIsPreviewFeature=e.RestoreFeatureName=e.showRestore=void 0;function u(p,c){return p.get(T.IRestoreDialogController).showDialog(c).then()}e.showRestore=u,e.RestoreFeatureName="restore",e.restoreIsPreviewFeature=(0,t.localize)(0,null),e.restoreNotSupportedOutOfContext=(0,t.localize)(1,null),e.restoreNotSupportedForAzure=(0,t.localize)(2,null);class d extends h.Task{static{this.ID=e.RestoreFeatureName}static{this.LABEL=(0,t.localize)(3,null)}static{this.ICON=e.RestoreFeatureName}constructor(){super({id:d.ID,title:d.LABEL,iconPath:void 0,iconClass:d.ICON})}runTask(c,l){let n=l;if(!c.get(b.IConfigurationService).getValue(s.CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES))return c.get(f.INotificationService).info(e.restoreIsPreviewFeature);let E=c.get(v.IConnectionManagementService);if(!n){const _=c.get(S.IObjectExplorerService),A=c.get(m.IEditorService),k=c.get(o.ILogService);n=(0,D.getCurrentGlobalConnection)(_,E,A,k)}if(n){const _=E.getServerInfo(n.id);if(_&&_.isCloud&&n.providerName===a.mssqlProviderName)return c.get(f.INotificationService).info(e.restoreNotSupportedForAzure)}const C=c.get(r.ICapabilitiesService),I=c.get(y.IInstantiationService);return n=n||new i.ConnectionProfile(C,n),n.serverName?I.invokeFunction(u,n):c.get(f.INotificationService).info(e.restoreNotSupportedOutOfContext)}}e.RestoreAction=d}),define(Q[3692],Y([1,0,28,13,2147,8,376,117,298,3691,452,453,451,58]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),new m.RestoreAction().registerTask();const i="dataExplorer.restore";t.CommandsRegistry.registerCommand({id:i,handler:async(u,d)=>{if(d.$treeItem?.payload){const p=u.get(t.ICommandService);let l=await u.get(r.IConnectionManagementService).fixProfile(d.$treeItem.payload);return p.executeCommand(m.RestoreAction.ID,l)}}}),y.MenuRegistry.appendMenuItem(y.MenuId.DataExplorerContext,{group:"connection",order:5,command:{id:i,title:(0,b.localize)(0,null)},when:D.ContextKeyExpr.and(T.MssqlNodeContext.NodeProvider.isEqualTo(f.pgsqlProviderName),T.MssqlNodeContext.NodeType.isEqualTo(v.NodeType.Database))});const s="objectExplorer.restore";t.CommandsRegistry.registerCommand({id:s,handler:async(u,d)=>{const p=u.get(t.ICommandService);let l=await u.get(r.IConnectionManagementService).fixProfile(d.connectionProfile);return p.executeCommand(m.RestoreAction.ID,l)}}),y.MenuRegistry.appendMenuItem(y.MenuId.ObjectExplorerItemContext,{group:"connection",order:4,command:{id:s,title:(0,b.localize)(1,null)},when:D.ContextKeyExpr.and(S.TreeNodeContextKey.NodeType.isEqualTo(v.NodeType.Database),h.ConnectionContextKey.Provider.isEqualTo(f.pgsqlProviderName))});const o="explorer.restore";t.CommandsRegistry.registerCommand(o,async(u,d)=>{const p=u.get(t.ICommandService);let l=await u.get(r.IConnectionManagementService).fixProfile(d.profile);return p.executeCommand(m.RestoreAction.ID,l)}),y.MenuRegistry.appendMenuItem(y.MenuId.ExplorerWidgetContext,{command:{id:o,title:m.RestoreAction.LABEL},when:D.ContextKeyExpr.and(a.ItemContextKey.ItemType.isEqualTo("database"),a.ItemContextKey.ConnectionProvider.isEqualTo("pgsql")),order:2})}),define(Q[947],Y([1,0,2181,34,6,58,23,63,49,21,374,906,719,68,43,13,22]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.GetCurrentConnectionStringAction=e.ClearSingleRecentConnectionAction=e.ClearRecentConnectionsAction=e.ClearRecentConnectionsAction1=void 0;let d=class extends y.Action{static{u=this}static{this.ID="clearRecentConnectionsAction"}static{this.LABEL=t.localize(0,null)}static{this.ICON="search-action clear-search-results"}constructor(g,w,E,C,I,_){super(g,w,u.ICON),this._connectionManagementService=E,this._notificationService=C,this._quickInputService=I,this._dialogService=_,this._onRecentConnectionsRemoved=new b.Emitter,this.onRecentConnectionsRemoved=this._onRecentConnectionsRemoved.event,this._useConfirmationMessage=!1,this.enabled=!0}set useConfirmationMessage(g){this._useConfirmationMessage=g}run(){return this._useConfirmationMessage?this.promptConfirmationMessage().then(g=>{g.confirmed&&(this._connectionManagementService.clearRecentConnectionsList(),this._onRecentConnectionsRemoved.fire())}):this.promptQuickOpenService().then(g=>{if(g){this._connectionManagementService.clearRecentConnectionsList();const w={primary:[]};this._notificationService.notify({severity:f.default.Info,message:t.localize(1,null),actions:w}),this._onRecentConnectionsRemoved.fire()}})}promptQuickOpenService(){const g=this;return new Promise((w,E)=>{let C=[{key:t.localize(2,null),value:!0},{key:t.localize(3,null),value:!1}];g._quickInputService.pick(C.map(I=>I.key),{placeHolder:t.localize(4,null),ignoreFocusLost:!0}).then(I=>{let _=C.find(A=>A.key===I);w(_&&_.value)})})}promptConfirmationMessage(){let g={message:t.localize(5,null),primaryButton:t.localize(6,null),cancelButton:t.localize(7,null),type:"question"};return new Promise((w,E)=>{this._dialogService.confirm(g).then(C=>{w(C)})})}};e.ClearRecentConnectionsAction1=d,e.ClearRecentConnectionsAction1=d=u=fe([O(2,D.IConnectionManagementService),O(3,T.INotificationService),O(4,i.IQuickInputService),O(5,v.IDialogService)],d);class p extends s.Action2{static{this.ID="clearRecentConnectionsAction"}static{this.LABEL_ORG="Clear List"}static{this.LABEL=t.localize(8,null)}static{this.ICON="search-action clear-search-results"}constructor(){super({id:p.ID,icon:{light:o.FileAccess.asBrowserUri("sql/workbench/services/connection/browser/media/clear-search-results.svg"),dark:o.FileAccess.asBrowserUri("sql/workbench/services/connection/browser/media/clear-search-results-dark.svg")},title:{value:p.LABEL,original:p.LABEL_ORG},f1:!0}),this._onRecentConnectionsRemoved=new b.Emitter,this.onRecentConnectionsRemoved=this._onRecentConnectionsRemoved.event,this._useConfirmationMessage=!1}set useConfirmationMessage(g){this._useConfirmationMessage=g}run(g){const w=g.get(D.IConnectionManagementService),E=g.get(T.INotificationService),C=g.get(i.IQuickInputService),I=g.get(v.IDialogService);return this._useConfirmationMessage?this.promptConfirmationMessage(I).then(_=>{_.confirmed&&(w.clearRecentConnectionsList(),this._onRecentConnectionsRemoved.fire())}):this.promptQuickOpenService(C).then(_=>{if(_){w.clearRecentConnectionsList();const A={primary:[]};E.notify({severity:f.default.Info,message:t.localize(9,null),actions:A}),this._onRecentConnectionsRemoved.fire()}})}promptQuickOpenService(g){return new Promise((w,E)=>{let C=[{key:t.localize(10,null),value:!0},{key:t.localize(11,null),value:!1}];g.pick(C.map(I=>I.key),{placeHolder:t.localize(12,null),ignoreFocusLost:!0}).then(I=>{let _=C.find(A=>A.key===I);w(_&&_.value)})})}promptConfirmationMessage(g){let w={message:t.localize(13,null),primaryButton:t.localize(14,null),cancelButton:t.localize(15,null),type:"question"};return new Promise((E,C)=>{g.confirm(w).then(I=>{E(I)})})}}e.ClearRecentConnectionsAction=p;let c=class extends y.Action{static{this.ID="clearSingleRecentConnectionAction"}static{this.LABEL=t.localize(16,null)}constructor(g,w,E,C){super(g,w),this._connectionProfile=E,this._connectionManagementService=C,this._onRecentConnectionRemoved=new b.Emitter,this.onRecentConnectionRemoved=this._onRecentConnectionRemoved.event,this.enabled=!0}run(){return new Promise((g,w)=>{g(this._connectionManagementService.clearRecentConnection(this._connectionProfile)),this._onRecentConnectionRemoved.fire()})}};e.ClearSingleRecentConnectionAction=c,e.ClearSingleRecentConnectionAction=c=fe([O(3,D.IConnectionManagementService)],c);class l extends s.Action2{static{this.ID="getCurrentConnectionStringAction"}static{this.LABEL_ORG="Get Current Connection String"}static{this.LABEL=t.localize(17,null)}constructor(){super({id:l.ID,title:{value:l.LABEL,original:l.LABEL_ORG},f1:!0})}run(g){const w=g.get(D.IConnectionManagementService),E=g.get(m.IEditorService),C=g.get(T.INotificationService),I=g.get(r.IClipboardService);return new Promise((_,A)=>{let k=E.activeEditor;if(k&&(k instanceof S.QueryEditorInput||k instanceof h.EditDataInput||k instanceof a.DashboardInput)&&w.isConnected(k.uri)){let L=!1,R=w.getConnectionProfile(k.uri);w.getConnectionString(R.id,L).then(M=>{I.writeText(M);let N=M||t.localize(18,null);C.info(N)})}else{let L=t.localize(19,null);C.info(L)}})}}e.GetCurrentConnectionStringAction=l}),define(Q[3693],Y([1,0,305,29,947,5,106,6]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RecentConnectionTreeController=e.RecentConnectionsActionsContext=e.RecentConnectionActionsProvider=void 0;let v=class{constructor(a){this._instantiationService=a,this._onRecentConnectionRemoved=new f.Emitter,this.onRecentConnectionRemoved=this._onRecentConnectionRemoved.event}getRecentConnectionActions(a,r){let i=[],s=this._instantiationService.createInstance(b.ClearSingleRecentConnectionAction,b.ClearSingleRecentConnectionAction.ID,b.ClearSingleRecentConnectionAction.LABEL,r);return s.onRecentConnectionRemoved(()=>this._onRecentConnectionRemoved.fire()),i.push(s),i}hasActions(a,r){return r instanceof T.ConnectionProfile}getActions(a,r){return r instanceof T.ConnectionProfile?this.getRecentConnectionActions(a,r):[]}};e.RecentConnectionActionsProvider=v,e.RecentConnectionActionsProvider=v=fe([O(0,D.IInstantiationService)],v);class m{}e.RecentConnectionsActionsContext=m;let S=class extends t.DefaultController{constructor(a,r,i,s){super(),this.clickcb=a,this.actionProvider=r,this._connectionManagementService=i,this._contextMenuService=s,this._onRecentConnectionRemoved=new f.Emitter,this.onRecentConnectionRemoved=this._onRecentConnectionRemoved.event}onLeftClick(a,r,i,s="mouse"){return this.clickcb(r,i,s),super.onLeftClick(a,r,i,s)}onEnter(a,r){return super.onEnter(a,r),this.clickcb(a.getSelection()[0],r,"keyboard"),!0}onRightClick(a,r,i,s="mouse"){return this.clickcb(r,i,s),this.showContextMenu(a,r,i),!0}onMouseDown(a,r,i,s="mouse"){return i.leftButton||i.middleButton?this.onLeftClick(a,r,i,s):this.onRightClick(a,r,i)}onKeyDown(a,r){if(r.keyCode===20){let i=a.getFocus();if(i instanceof T.ConnectionProfile)return this._connectionManagementService.clearRecentConnection(i),this._onRecentConnectionRemoved.fire(),!0}return super.onKeyDown(a,r)}showContextMenu(a,r,i){let s;r instanceof T.ConnectionProfile?(s=new m,s.container=i.target,s.connectionProfile=r,s.tree=a):s=r;let o={x:i.x+1,y:i.y};return this._contextMenuService.showContextMenu({getAnchor:()=>o,getActions:()=>this.actionProvider.getActions(a,r),onHide:u=>{u&&a.domFocus()},getActionsContext:()=>s}),!0}};e.RecentConnectionTreeController=S,e.RecentConnectionTreeController=S=fe([O(3,y.IContextMenuService)],S)}),define(Q[3694],Y([1,0,58,346,604,3486,2238,9,5,23,28,24,191,3487,117,21,25]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.ProfilerService=void 0;class d{constructor(){this.forwardMap=new Map,this.reverseMap=new Map}has(l){return this.forwardMap.has(l)}reverseHas(l){return this.reverseMap.has(l)}get(l){return this.forwardMap.get(l)}reverseGet(l){return this.reverseMap.get(l)}set(l,n){return this.forwardMap.set(l,n),this.reverseMap.set(n,l),this}}let p=class{static{u=this}static{this.PROFILER_SERVICE_UI_STATE_STORAGE_KEY="profileservice.uiState"}constructor(l,n,g,w,E,C){this._connectionService=l,this._configurationService=n,this._instantiationService=g,this._notificationService=w,this._commandService=E,this._storageService=C,this._providers=new Map,this._idMap=new d,this._sessionMap=new Map,this._connectionMap=new Map,this._context=new a.Memento("ProfilerEditor",this._storageService),this._memento=this._context.getMemento(-1,1)}registerProvider(l,n){this._providers.set(l,n)}async registerSession(l,n,g){let w={params:{connectionType:t.ConnectionType.default,runQueryOnCompletion:t.RunQueryOnConnectionMode.none,input:void 0},saveTheConnection:!1,showDashboard:!1,showConnectionDialogOnError:!1,showFirewallRuleOnError:!0};try{await this._connectionService.connect(n,l,w)}catch{}return this._sessionMap.set(l,g),this._connectionMap.set(l,n),this._idMap.set(l,l),Promise.resolve(l)}onMoreRows(l){this._idMap.reverseHas(l.sessionId)&&this._sessionMap.get(this._idMap.reverseGet(l.sessionId)).onMoreRows(l)}onSessionStopped(l){this._idMap.reverseHas(l.ownerUri)&&this._sessionMap.get(this._idMap.reverseGet(l.ownerUri)).onSessionStopped(l)}onProfilerSessionCreated(l){this._idMap.reverseHas(l.ownerUri)&&(this._sessionMap.get(this._idMap.reverseGet(l.ownerUri)).onProfilerSessionCreated(l),this.updateMemento(l.ownerUri,{previousSessionName:l.sessionName}))}async connectSession(l){return this._idMap.has(l)?this._runAction(l,n=>n.connectSession(this._idMap.get(l))):!1}async disconnectSession(l){return this._idMap.has(l)?this._runAction(l,n=>n.disconnectSession(this._idMap.get(l))):!1}async createSession(l,n,g){if(this._idMap.has(l))try{return await this._runAction(l,w=>w.createSession(this._idMap.get(l),n,g)),this._sessionMap.get(this._idMap.reverseGet(l)).onSessionStateChanged({isRunning:!0,isStopped:!1,isPaused:!1}),!0}catch(w){return this._notificationService.error(w.message),!1}return!1}async startSession(l,n,g){if(this._idMap.has(l)){this.updateMemento(l,{previousSessionName:n});try{await this._runAction(l,E=>E.startSession(this._idMap.get(l),n,g));let w=g!==y.ProfilingSessionType.LocalFile;return this._sessionMap.get(this._idMap.reverseGet(l)).onSessionStateChanged({isRunning:w,isStopped:!1,isPaused:!1}),!0}catch(w){return this._notificationService.error(w.message),!1}}return!1}async pauseSession(l){return this._idMap.has(l)?this._runAction(l,n=>n.pauseSession(this._idMap.get(l))):!1}async stopSession(l){if(this._idMap.has(l))try{return await this._runAction(l,n=>n.stopSession(this._idMap.get(l))),this._sessionMap.get(this._idMap.reverseGet(l)).onSessionStateChanged({isStopped:!0,isPaused:!1,isRunning:!1}),!0}catch{return this._sessionMap.get(this._idMap.reverseGet(l)).onSessionStateChanged({isStopped:!0,isPaused:!1,isRunning:!1}),!1}else return!1}async getXEventSessions(l){if(this._idMap.get(l))return this._runAction(l,n=>n.getXEventSessions(this._idMap.get(l))).then(n=>n,n=>{this._notificationService.error(n.message)})}_runAction(l,n){let g=this._providers.get(i.mssqlProviderName);return g?n(g):Promise.reject(new Error("No Handler Registered"))}getViewTemplates(l){let n=this._configurationService.getValue(y.PROFILER_SETTINGS);return n.viewTemplates}getSessionTemplates(l){let n=this._configurationService.getValue(y.PROFILER_SETTINGS);return n.sessionTemplates}getSessionViewState(l){let n=this.getMementoKey(l),g=this._memento[u.PROFILER_SERVICE_UI_STATE_STORAGE_KEY];if(g&&n)return g[n]}getMementoKey(l){let n,g=this._connectionMap.get(l);return g&&(n=g.serverName),n}updateMemento(l,n){let g=this.getMementoKey(l),w=this._memento[u.PROFILER_SERVICE_UI_STATE_STORAGE_KEY];w&&g&&(w[g]=n,this._memento[u.PROFILER_SERVICE_UI_STATE_STORAGE_KEY]=w,this._context.saveMemento())}launchColumnEditor(l){return this._editColumnDialog||(this._editColumnDialog=this._instantiationService.createInstance(D.ProfilerColumnEditorDialog),this._editColumnDialog.render()),this._editColumnDialog.open(l),Promise.resolve()}launchCreateSessionDialog(l){const n=this._connectionService.getConnectionInfo(l.id).serverInfo;let g=this.getSessionTemplates();if(n){const w=n.isCloud?y.EngineType.AzureSQLDB:y.EngineType.Standalone;g=g.filter(E=>!E.engineTypes||E.engineTypes.length===0||E.engineTypes.some(C=>C===w))}return this._commandService.executeCommand("profiler.openCreateSessionDialog",l.id,l.providerType,g)}launchFilterSessionDialog(l){this._instantiationService.createInstance(r.ProfilerFilterDialog).open(l)}getFilters(){return this._configurationService.getValue(y.PROFILER_FILTER_SETTINGS)}async saveFilter(l){const n=[l];await this._configurationService.updateValue(y.PROFILER_FILTER_SETTINGS,n,2)}async openFile(l,n,g,w){const E=await l.showOpenDialog({filters:[{extensions:["xel"],name:T.localize(0,null)}],canSelectMany:!1});if(E?.length===1){const C=E[0];try{const A=(await w.stat(C)).size,k=1*o.ByteSize.GB,L=100*o.ByteSize.MB;if(A>k)return this._notificationService.error(T.localize(1,null)),!1;A>L&&this._notificationService.info(T.localize(2,null))}catch(A){this._notificationService.error(A.message)}let I=g.createInstance(b.ProfilerInput,void 0,C);return await n.openEditor(I,{pinned:!0},s.ACTIVE_GROUP),I.setConnectionState(!1),await this.startSession(I.id,I.fileURI.fsPath,y.ProfilingSessionType.LocalFile)}return!0}};e.ProfilerService=p,e.ProfilerService=p=u=fe([O(0,t.IConnectionManagementService),O(1,f.IConfigurationService),O(2,v.IInstantiationService),O(3,m.INotificationService),O(4,S.ICommandService),O(5,h.IStorageService)],p)}),define(Q[472],Y([1,0,251,39,10,55,2243,63,23,21,2284,9,49,41,22,28]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResultSerializer=e.SaveFormat=void 0;let o;var u;(function(c){c.CSV="csv",c.JSON="json",c.MARKDOWN="markdown",c.EXCEL="excel",c.XML="xml"})(u||(e.SaveFormat=u={}));const d=T.localize(0,null);let p=class{static{this.tempFileCount=1}constructor(l,n,g,w,E,C,I,_){this._queryManagementService=l,this._configurationService=n,this._editorService=g,this._contextService=w,this.fileDialogService=E,this._notificationService=C,this.openerService=I,this.commandService=_}saveResults(l,n){const g=this;return this.promptForFilepath(n.format,l).then(w=>{if(w){let E=this.getParameters(l,w,n.batchIndex,n.resultSetNumber,n.format,n.selection?n.selection[0]:void 0),C=()=>this.sendSaveRequestToService(E);return g.doSave(w,n.format,C)}return Promise.resolve(void 0)})}async sendSaveRequestToService(l){let n=await this._queryManagementService.saveResults(l);return{succeeded:!n.messages,messages:n.messages}}handleSerialization(l,n,g){const w=this;return this.promptForFilepath(n,l).then(E=>E?w.doSave(E,n,()=>g(E)):Promise.resolve())}get rootPath(){return(0,S.getRootPath)(this._contextService)}async promptForFilepath(l,n){let g=o?D.dirname(o.fsPath):(0,S.resolveCurrentDirectory)(n,this.rootPath);g||(g=(await this.fileDialogService.defaultFilePath(i.Schemas.file)).fsPath),g=D.join(g,this.getResultsDefaultFilename(l));const w=await this.fileDialogService.showSaveDialog({title:T.localize(1,null),defaultUri:g?b.URI.file(g):void 0,filters:this.getResultsFileExtension(l)});return w&&(o=w),w}getResultsDefaultFilename(l){let n="Results";switch(l){case u.CSV:n=n+".csv";break;case u.JSON:n=n+".json";break;case u.MARKDOWN:n=n+".md";break;case u.EXCEL:n=n+".xlsx";break;case u.XML:n=n+".xml";break;default:n=n+".txt"}return n}getResultsFileExtension(l){let n=new Array,g=Object.create(null);switch(l){case u.CSV:g.name=T.localize(2,null),g.extensions=["csv"];break;case u.JSON:g.name=T.localize(3,null),g.extensions=["json"];break;case u.MARKDOWN:g.name=T.localize(4,null),g.extensions=["md"];break;case u.EXCEL:g.name=T.localize(5,null),g.extensions=["xlsx"];break;case u.XML:g.name=T.localize(6,null),g.extensions=["xml"];break;default:g.name=T.localize(7,null),g.extensions=["txt"]}return n.push(g),n}getBasicSaveParameters(l){switch(l){case u.CSV:return this.getConfigForCsv();case u.EXCEL:return this.getConfigForExcel();case u.JSON:return this.getConfigForJson();case u.MARKDOWN:return this.getConfigForMarkdown();case u.XML:return this.getConfigForXml()}}getConfigForCsv(){let l={resultFormat:u.CSV},n=this._configurationService.getValue("queryEditor").results.saveAsCsv;return n&&(n.includeHeaders!==void 0&&(l.includeHeaders=n.includeHeaders),n.delimiter!==void 0&&(l.delimiter=n.delimiter),n.lineSeperator!==void 0&&(l.lineSeperator=n.lineSeperator),n.textIdentifier!==void 0&&(l.textIdentifier=n.textIdentifier),n.encoding!==void 0&&(l.encoding=n.encoding)),l}getConfigForJson(){return{resultFormat:u.JSON}}getConfigForMarkdown(){let l={resultFormat:u.MARKDOWN};const n=this._configurationService.getValue("queryEditor").results.saveAsMarkdown;return n&&(n.encoding&&(l.encoding=n.encoding),n.includeHeaders!==void 0&&(l.includeHeaders=n.includeHeaders),n.lineSeparator!==void 0&&(l.lineSeperator=n.lineSeparator)),l}getConfigForExcel(){let l={resultFormat:u.EXCEL},n=this._configurationService.getValue("queryEditor").results.saveAsExcel;return n&&(n.includeHeaders!==void 0&&(l.includeHeaders=n.includeHeaders),n.freezeHeaderRow!==void 0&&(l.freezeHeaderRow=n.freezeHeaderRow),n.boldHeaderRow!==void 0&&(l.boldHeaderRow=n.boldHeaderRow),n.autoFilterHeaderRow!==void 0&&(l.autoFilterHeaderRow=n.autoFilterHeaderRow),n.autoSizeColumns!==void 0&&(l.autoSizeColumns=n.autoSizeColumns)),l}getConfigForXml(){let l={resultFormat:u.XML},n=this._configurationService.getValue("queryEditor").results.saveAsXml;return n&&(n.formatted!==void 0&&(l.formatted=n.formatted),n.encoding!==void 0&&(l.encoding=n.encoding)),l}getParameters(l,n,g,w,E,C){let I=this.getBasicSaveParameters(E);return I.filePath=n.fsPath,I.ownerUri=l,I.resultSetIndex=w,I.batchIndex=g,this.isSelected(C)&&(I.rowStartIndex=C.fromRow,I.rowEndIndex=C.toRow,I.columnStartIndex=C.fromCell,I.columnEndIndex=C.toCell),I}isSelected(l){return!!(l&&!(l.fromCell===l.toCell&&l.fromRow===l.toRow))}async doSave(l,n,g){const w={severity:f.default.Info,message:T.localize(8,null),progress:{infinite:!0}},E=this._notificationService.notify(w);try{let C=await g();!C||C.messages?this._notificationService.notify({severity:f.default.Error,message:d+(C?C.messages:"")}):this.openSavedFile(l,n)}catch(C){this._notificationService.notify({severity:f.default.Error,message:d+C})}finally{E.close()}}openSavedFile(l,n){const g=this._configurationService.getValue("queryEditor").results.openAfterSave;n!==u.EXCEL&&g?this._editorService.openEditor({resource:l}).then(w=>{},w=>{this._notificationService.notify({severity:f.default.Error,message:w})}):this._notificationService.prompt(f.default.Info,T.localize(9,null,l.fsPath),[{label:T.localize(10,null),run:()=>{this.openerService.open(l,{openExternal:n===u.EXCEL})}},{label:T.localize(11,null),run:async()=>{this.commandService.executeCommand("revealFileInOS",l)}}])}};e.ResultSerializer=p,e.ResultSerializer=p=fe([O(0,t.IQueryManagementService),O(1,h.IConfigurationService),O(2,m.IEditorService),O(3,y.IWorkspaceContextService),O(4,a.IFileDialogService),O(5,v.INotificationService),O(6,r.IOpenerService),O(7,s.ICommandService)],p)}),define(Q[3695],Y([1,0,2051,34,472,9,5,76]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GridActionProvider=e.GRID_GOTONEXTGRID_ID=e.GRID_VIEWASVISUALIZER_ID=e.GRID_VIEWASCHART_ID=e.GOTONEXTQUERYOUTPUTTAB_ID=e.TOGGLEMESSAGES_ID=e.TOGGLERESULTS_ID=e.MESSAGES_COPY_ID=e.MESSAGES_SELECTALL_ID=e.GRID_SELECTALL_ID=e.GRID_COPYWITHHEADERS_ID=e.GRID_COPY_ID=e.GRID_SAVEXML_ID=e.GRID_SAVEEXCEL_ID=e.GRID_SAVEMARKDOWN_ID=e.GRID_SAVEJSON_ID=e.GRID_SAVECSV_ID=void 0,e.GRID_SAVECSV_ID="grid.saveAsCsv",e.GRID_SAVEJSON_ID="grid.saveAsJson",e.GRID_SAVEMARKDOWN_ID="grid.saveAsMarkdown",e.GRID_SAVEEXCEL_ID="grid.saveAsExcel",e.GRID_SAVEXML_ID="grid.saveAsXml",e.GRID_COPY_ID="grid.copySelection",e.GRID_COPYWITHHEADERS_ID="grid.copyWithHeaders",e.GRID_SELECTALL_ID="grid.selectAll",e.MESSAGES_SELECTALL_ID="grid.messages.selectAll",e.MESSAGES_COPY_ID="grid.messages.copy",e.TOGGLERESULTS_ID="grid.toggleResultPane",e.TOGGLEMESSAGES_ID="grid.toggleMessagePane",e.GOTONEXTQUERYOUTPUTTAB_ID="query.goToNextQueryOutputTab",e.GRID_VIEWASCHART_ID="grid.viewAsChart",e.GRID_VIEWASVISUALIZER_ID="grid.viewAsVisualizer",e.GRID_GOTONEXTGRID_ID="grid.goToNextGrid";let v=class{constructor(r,i,s,o){this._dataService=r,this._selectAllCallback=i,this._instantiationService=s,this._configurationService=o}getGridActions(){const r=[];return r.push(this._instantiationService.createInstance(m,m.SAVECSV_ID,m.SAVECSV_LABEL,b.SaveFormat.CSV,this._dataService)),r.push(this._instantiationService.createInstance(m,m.SAVEJSON_ID,m.SAVEJSON_LABEL,b.SaveFormat.JSON,this._dataService)),r.push(this._instantiationService.createInstance(m,m.SAVEMARKDOWN_ID,m.SAVEMARKDOWN_LABEL,b.SaveFormat.MARKDOWN,this._dataService)),r.push(this._instantiationService.createInstance(m,m.SAVEEXCEL_ID,m.SAVEEXCEL_LABEL,b.SaveFormat.EXCEL,this._dataService)),r.push(this._instantiationService.createInstance(m,m.SAVEXML_ID,m.SAVEXML_LABEL,b.SaveFormat.XML,this._dataService)),r.push(this._instantiationService.createInstance(h,h.ID,h.LABEL,this._selectAllCallback)),r.push(this._instantiationService.createInstance(S,S.COPY_ID,S.COPY_LABEL,!1,this._dataService)),r.push(this._instantiationService.createInstance(S,S.COPYWITHHEADERS_ID,S.COPYWITHHEADERS_LABEL,!0,this._dataService)),r}};e.GridActionProvider=v,e.GridActionProvider=v=fe([O(2,T.IInstantiationService),O(3,D.IConfigurationService)],v);let m=class extends y.Action{static{this.SAVECSV_ID=e.GRID_SAVECSV_ID}static{this.SAVECSV_LABEL=(0,t.localize)(0,null)}static{this.SAVEJSON_ID=e.GRID_SAVEJSON_ID}static{this.SAVEJSON_LABEL=(0,t.localize)(1,null)}static{this.SAVEMARKDOWN_ID=e.GRID_SAVEMARKDOWN_ID}static{this.SAVEMARKDOWN_LABEL=(0,t.localize)(2,null)}static{this.SAVEEXCEL_ID=e.GRID_SAVEEXCEL_ID}static{this.SAVEEXCEL_LABEL=(0,t.localize)(3,null)}static{this.SAVEXML_ID=e.GRID_SAVEXML_ID}static{this.SAVEXML_LABEL=(0,t.localize)(4,null)}constructor(r,i,s,o,u){super(r,i),this.format=s,this.dataService=o,this.telemetryService=u}async run(r){this.telemetryService.createActionEvent("EditDataEditor","EditSaveResult").withAdditionalProperties({batchIndex:r.batchIndex,resultSetNumber:r.resultSetNumber,format:this.format}).send(),this.dataService.sendSaveRequest({batchIndex:r.batchIndex,resultSetNumber:r.resultSetNumber,selection:r.selection,format:this.format})}};m=fe([O(4,f.IAdsTelemetryService)],m);let S=class extends y.Action{static{this.COPY_ID=e.GRID_COPY_ID}static{this.COPY_LABEL=(0,t.localize)(5,null)}static{this.COPYWITHHEADERS_ID=e.GRID_COPYWITHHEADERS_ID}static{this.COPYWITHHEADERS_LABEL=(0,t.localize)(6,null)}constructor(r,i,s,o,u,d){super(r,i),this.copyHeader=s,this.dataService=o,this.configurationService=u,this.telemetryService=d}async run(r){const i=this.configurationService.getValue("queryEditor.results.copyIncludeHeaders")||this.copyHeader;this.telemetryService.createActionEvent("EditDataEditor","EditCopyResult").withAdditionalProperties({batchIndex:r.batchIndex,resultSetNumber:r.resultSetNumber,includeHeader:i}).send(),this.dataService.copyResults(r.selection,r.batchIndex,r.resultSetNumber,i)}};S=fe([O(4,D.IConfigurationService),O(5,f.IAdsTelemetryService)],S);let h=class extends y.Action{static{this.ID=e.GRID_SELECTALL_ID}static{this.LABEL=(0,t.localize)(7,null)}constructor(r,i,s,o){super(r,i),this.selectAllCallback=s,this.telemetryService=o}async run(r){this.telemetryService.createActionEvent("EditDataEditor","EditSelectAllGrid").withAdditionalProperties({gridIndex:r.gridIndex}).send(),this.selectAllCallback(r.gridIndex)}};h=fe([O(3,f.IAdsTelemetryService)],h)}),define(Q[3696],Y([1,0,3695,2049,34,9,5]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RevertRowAction=e.DeleteRowAction=e.EditDataGridActionProvider=void 0;let f=class extends t.GridActionProvider{constructor(h,a,r,i,s,o){super(h,a,o,s),this._deleteRowCallback=r,this._revertRowCallback=i}getGridActions(){let h=[];return h.push(new v(v.ID,v.LABEL,this._deleteRowCallback)),h.push(new m(m.ID,m.LABEL,this._revertRowCallback)),h}};e.EditDataGridActionProvider=f,e.EditDataGridActionProvider=f=fe([O(4,D.IConfigurationService),O(5,T.IInstantiationService)],f);class v extends b.Action{static{this.ID="grid.deleteRow"}static{this.LABEL=(0,y.localize)(0,null)}constructor(h,a,r){super(h,a),this.callback=r}async run(h){this.callback(h.rowIndex)}}e.DeleteRowAction=v;class m extends b.Action{static{this.ID="grid.revertRow"}static{this.LABEL=(0,y.localize)(1,null)}constructor(h,a,r){super(h,a),this.callback=r}async run(h){this.callback()}}e.RevertRowAction=m}),define(Q[3697],Y([1,0,1011,184,1024,585,275,398,38,8,29,4,9,68,67,11,136,472,76,1621,1622]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GridParentComponent=void 0;let p=class extends h.Disposable{get selectionModel(){return new f.CellSelectionModel}set messageActive(l){this.messageActiveBool=l,this.resultActive&&this.resizeGrids()}get messageActive(){return this.messageActiveBool}constructor(l,n,g,w,E,C,I,_){super(),this.contextMenuService=l,this.keybindingService=n,this.contextKeyService=g,this.configurationService=w,this.clipboardService=E,this.queryEditorService=C,this.logService=I,this.telemetryService=_,this.rowHeight=29,this.defaultNumShowingRows=8,this.Constants=t,this.Utils=y,this.startString=new Date().toLocaleTimeString(),this.toDispose=new h.DisposableStore,this.placeHolderDataSets=[],this.renderedDataSets=this.placeHolderDataSets,this.resultActive=!0,this.messageActiveBool=!0,this.activeGrid=0}baseInit(){const l=this;if(this.initShortcutsBase(),this.configurationService){let n=this.configurationService.getValue("sql");n&&(this.messageActiveBool=n.messagesDefaultOpen)}this.toDispose.add(this.dataService.gridContent(n=>{switch(n){case b.RefreshContents:l.refreshDatasets();break;case b.ResizeContents:l.resizeGrids();break;case b.CopySelection:l.copySelection();break;case b.CopyWithHeaders:l.copyWithHeaders();break;case b.CopyMessagesSelection:l.copyMessagesSelection();break;case b.ToggleResultPane:l.toggleResultPane();break;case b.ToggleMessagePane:l.toggleMessagePane();break;case b.SelectAll:l.onSelectAllForActiveGrid();break;case b.SelectAllMessages:l.selectAllMessages();break;case b.SaveAsCsv:l.sendSaveRequest(u.SaveFormat.CSV);break;case b.SaveAsJSON:l.sendSaveRequest(u.SaveFormat.JSON);break;case b.SaveAsMarkdown:l.sendSaveRequest(u.SaveFormat.MARKDOWN);break;case b.SaveAsExcel:l.sendSaveRequest(u.SaveFormat.EXCEL);break;case b.SaveAsXML:l.sendSaveRequest(u.SaveFormat.XML);break;case b.GoToNextQueryOutputTab:l.goToNextQueryOutputTab();break;case b.ViewAsChart:l.showChartForGrid(l.activeGrid);break;case b.ViewAsVisualizer:l.showVisualizerForGrid(l.activeGrid);break;case b.GoToNextGrid:l.goToNextGrid();break;default:this.logService.error('Unexpected grid content event type "'+n+'" sent');break}})),this.bindKeys(this.contextKeyService)}subscribeWithDispose(l,n){let g=l.subscribe(n);this.toDispose.add((0,o.subscriptionToDisposable)(g))}bindKeys(l){if(l){this.queryEditorVisible=D.QueryEditorVisibleContext.bindTo(l),this.queryEditorVisible.set(!0);let n=this.contextKeyService.createScoped(this.nativeElement);this.toDispose.add(n),this.resultsVisibleContextKey=D.ResultsVisibleContext.bindTo(n),this.resultsVisibleContextKey.set(!0),this.gridFocussedContextKey=D.ResultsGridFocussedContext.bindTo(n),this.messagesFocussedContextKey=D.ResultsMessagesFocussedContext.bindTo(n)}}baseDestroy(){this.toDispose.dispose()}toggleResultPane(){this.resultActive=!this.resultActive,this.resultActive&&this.resizeGrids()}toggleMessagePane(){this.messageActive=!this.messageActive}onGridFocus(){this.gridFocussedContextKey.set(!0)}onGridFocusout(){this.gridFocussedContextKey.set(!1)}onMessagesFocus(){this.messagesFocussedContextKey.set(!0)}onMessagesFocusout(){this.messagesFocussedContextKey.set(!1)}getSelection(l){let n=this.table.getSelectedRanges();if(n)return n=n.map(g=>({fromCell:g.fromCell-1,toCell:g.toCell-1,toRow:g.toRow,fromRow:g.fromRow})),n}copySelection(){let l=this.getMessageText();if(l.length>0)this.clipboardService.writeText(l);else{let n=this.activeGrid;this.dataService.copyResults(this.getSelection(n),this.renderedDataSets[n].batchId,this.renderedDataSets[n].resultId)}}copyWithHeaders(){let l=this.activeGrid;this.dataService.copyResults(this.getSelection(l),this.renderedDataSets[l].batchId,this.renderedDataSets[l].resultId,!0)}copyMessagesSelection(){let l=this.getMessageText();l.length===0&&(this.selectAllMessages(),l=this.getMessageText()),l.length>0&&this.clipboardService.writeText(l)}getMessageText(){return document.activeElement===this.getMessagesElement()&&window.getSelection()?window.getSelection().toString():""}goToNextQueryOutputTab(){}showChartForGrid(l){}showVisualizerForGrid(l){}goToNextGrid(){if(this.renderedDataSets.length>0){let l=this.activeGrid+1;l>=this.renderedDataSets.length&&(l=0),this.navigateToGrid(l)}}navigateToGrid(l){}initShortcutsBase(){let l={ToggleResultPane:()=>{this.toggleResultPane()},ToggleMessagePane:()=>{this.toggleMessagePane()},CopySelection:()=>{this.copySelection()},CopyWithHeaders:()=>{this.copyWithHeaders()},SelectAll:()=>{this.onSelectAllForActiveGrid()},SaveAsCSV:()=>{this.sendSaveRequest(u.SaveFormat.CSV)},SaveAsJSON:()=>{this.sendSaveRequest(u.SaveFormat.JSON)},SaveAsMarkdown:()=>{this.sendSaveRequest(u.SaveFormat.MARKDOWN)},SaveAsExcel:()=>{this.sendSaveRequest(u.SaveFormat.EXCEL)},SaveAsXML:()=>{this.sendSaveRequest(u.SaveFormat.XML)},GoToNextQueryOutputTab:()=>{this.goToNextQueryOutputTab()}};this.initShortcuts(l),this.shortcutfunc=l}handleContextClick(l){switch(l.type){case"savecsv":this.dataService.sendSaveRequest({batchIndex:l.batchId,resultSetNumber:l.resultId,format:u.SaveFormat.CSV,selection:l.selection});break;case"savejson":this.dataService.sendSaveRequest({batchIndex:l.batchId,resultSetNumber:l.resultId,format:u.SaveFormat.JSON,selection:l.selection});break;case"saveMarkdown":this.dataService.sendSaveRequest({batchIndex:l.batchId,resultSetNumber:l.resultId,format:u.SaveFormat.MARKDOWN,selection:l.selection});break;case"saveexcel":this.dataService.sendSaveRequest({batchIndex:l.batchId,resultSetNumber:l.resultId,format:u.SaveFormat.EXCEL,selection:l.selection});break;case"savexml":this.dataService.sendSaveRequest({batchIndex:l.batchId,resultSetNumber:l.resultId,format:u.SaveFormat.XML,selection:l.selection});break;case"selectall":this.activeGrid=l.index,this.onSelectAllForActiveGrid();break;case"copySelection":this.dataService.copyResults(l.selection,l.batchId,l.resultId);break;case"copyWithHeaders":this.dataService.copyResults(l.selection,l.batchId,l.resultId,!0);break;default:break}}sendSaveRequest(l){let n=this.activeGrid,g=this.renderedDataSets[n].batchId,w=this.renderedDataSets[n].resultId;this.dataService.sendSaveRequest({batchIndex:g,resultSetNumber:w,format:l,selection:this.getSelection(n)})}_keybindingFor(l){let[n]=this.keybindingService.lookupKeybindings(l.id);return n}openContextMenu(l,n,g,w){let E=this.table.grid,C=this.getSelection(w);if(C&&C.length===0){let _=E.getCellFromEvent(l);C=[new Slick.Range(_.row,_.cell-1)]}let I=E.getCellFromEvent(l).row;if(I!==E.getDataLength()-1){let _={batchIndex:n,resultSetNumber:g,selection:C,gridIndex:w,rowIndex:I},A={x:l.pageX+1,y:l.pageY};this.contextMenuService.showContextMenu({getAnchor:()=>A,getActions:()=>this.actionProvider.getGridActions(),getKeyBinding:k=>this._keybindingFor(k),getActionsContext:()=>_})}}onGridSelectAll(){let l=this;return n=>{l.telemetryService.createActionEvent("EditDataGrid","EditGridSelectAll").withAdditionalProperties({gridIndex:n}).send(),l.activeGrid=n;let g=l.table;g.setActiveCell(0,1),g.setSelectedRows(!0)}}onSelectAllForActiveGrid(){this.table.setSelectedRows(!0)}magnify(l){const n=this;this.renderedDataSets.length>1?this.renderedDataSets=[this.placeHolderDataSets[l]]:(this.renderedDataSets=this.placeHolderDataSets,this.onScroll(0)),setTimeout(()=>{n.resizeGrids(),n.table.setActiveCell(0,1)})}getResultsElement(){return this.nativeElement.querySelector("#results")}getMessagesElement(){return this.nativeElement.querySelector("#messages")}refreshDatasets(){let l=this.renderedDataSets;this.renderedDataSets=[],this.renderedDataSets=l}getSelectedRangeUnderMessages(){if(document.activeElement===this.getMessagesElement())return window.getSelection()}selectAllMessages(){let l=this.nativeElement.querySelector("#messages");this.selectElementContents(l)}selectElementContents(l){let n=document.createRange();n.selectNodeContents(l);let g=window.getSelection();g.removeAllRanges(),g.addRange(n)}keyEvent(l){this.tryHandleKeyEvent(new i.StandardKeyboardEvent(l))&&(l.preventDefault(),l.stopPropagation())}resizeGrids(){setTimeout(()=>{this.onResize()})}onResize(){this.table?.resizeCanvas()}render(l){l.appendChild(this.nativeElement)}};e.GridParentComponent=p,e.GridParentComponent=p=fe([O(0,S.IContextMenuService),O(1,v.IKeybindingService),O(2,m.IContextKeyService),O(3,a.IConfigurationService),O(4,r.IClipboardService),O(5,T.IQueryEditorService),O(6,s.ILogService),O(7,d.IAdsTelemetryService)],p)}),define(Q[3698],Y([1,0,558,187,272,3697,3696,275,653,819,818,201,23,63,5,29,38,8,9,68,67,11,42,20,15,66,43,2050,101,76,58,1620]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditDataGridPanel=void 0;const L=(0,I.localize)(0,null);let R=class extends D.GridParentComponent{constructor(N,P,x,F,V,W,z,B,K,H,U,G,$,ie,J,j,ee){super(z,B,K,H,U,G,ie,$),this.instantiationService=V,this.notificationService=W,this.accessibilityService=J,this.quickInputService=j,this.connectionManagementService=ee,this.refreshGridTimeoutInMs=1e3,this.windowSize=200,this.firstRender=!0,this.firstLoad=!0,this.enableEditing=!0,this.rowIdMappings={},this.dirtyCells=[],this.plugins=new Array,this.columnNameToIndex={},this.nativeElement=document.createElement("div"),this.nativeElement.className="editDataGridPanel",this.nativeElement.classList.add("slickgridContainer"),this.uri=N,this.dataService=P,this.actionProvider=this.instantiationService.createInstance(T.EditDataGridActionProvider,this.dataService,this.onGridSelectAll(),this.onDeleteRow(),this.onRevertRow()),F(()=>this.restoreViewState()),x(()=>this.saveViewState()),this.onInit()}onInit(){const N=this;this.baseInit(),this.toDispose.add(this.dataService.queryEvents(P=>{switch(P.type){case"start":N.handleStart(N,P);break;case"complete":N.handleComplete(N,P);break;case"message":N.handleMessage(N,P);break;case"resultSet":this.onRefreshComplete=N.handleResultSet(N,P);break;case"editSessionReady":N.handleEditSessionReady(N,P);break;default:this.logService.error('Unexpected query event type "'+P.type+'" sent');break}})),this.dataService.onLoaded()}render(N){N.appendChild(this.nativeElement)}initShortcuts(N){}onDestroy(){this.baseDestroy()}handleStart(N,P){N.dataSet=void 0,N.oldDataRows=void 0,N.oldGridData=void 0,N.placeHolderDataSets=[],N.renderedDataSets=N.placeHolderDataSets,this.onIsCellEditValid=(x,F,V)=>!0,this.onActiveCellChanged=this.onCellSelect,this.onCellEditEnd=x=>{let F=N.getConnectionInfo();N.telemetryService.createActionEvent("EditDataGrid","EditCellEnd").withAdditionalProperties({eventRow:x.row,eventCol:x.cell}).withConnectionInfo(F.profile).withServerInfo(F.serverInfo).send(),N.currentEditCellValue!==x.item[x.cell]&&(N.currentCell.isDirty=!0),N.currentEditCellValue=x.item[x.cell],N.isInNullRow&&N.submitCurrentCellChange(V=>{N.table.grid.navigateDown()},V=>{N.notificationService.error((0,I.localize)(1,null,V)),N.telemetryService.createErrorEvent("EditDataGrid","EditCellEndError").withConnectionInfo(F.profile).withServerInfo(F.serverInfo).send()}).catch(w.onUnexpectedError)},this.overrideCellFn=(x,F,V)=>{let W="",z=F==null||b.DBCellValue.isDBCellValue(F)&&F.isNull,B=b.DBCellValue.isDBCellValue(F)&&!F.isNull&&F.displayValue==="NULL";return z?W="NULL":B?W="'NULL'":b.DBCellValue.isDBCellValue(F)?(W=this.replaceLinebreaks(F.displayValue),W=W.trim()):typeof F=="string"&&(W=this.replaceLinebreaks(F),W=W.trim()),W},this.onBeforeAppendCell=(x,F)=>{let V;return this.isRowDirty(x)&&F===0?V=" dirtyRowHeader ":this.isCellDirty(x,F)&&(V=" dirtyCell "),V},this.loadDataFunction=(x,F)=>N.dataService.getEditRows(x,F).then(V=>{if(this.dataSet){let W=0,z=V.subset.map(B=>{let K=!1;this.isInNullRow&&W===F-2&&(K=!0);let H={};for(let U=1;U<this.dataSet.columnDefinitions.length;U++){let G=K&&B.cells[U-1].displayValue==="";H[this.dataSet.columnDefinitions[U].field]={displayValue:B.cells[U-1].displayValue,ariaLabel:(0,h.escape)(B.cells[U-1].displayValue),isNull:G?!0:B.cells[U-1].isNull}}return W++,H});return x+F>this.dataSet.totalRows-1&&z.push(this.dataSet.columnDefinitions.reduce((B,K)=>(K.id!=="rowNumber"&&(B[K.field]={displayValue:"NULL",ariaLabel:"NULL",isNull:!0}),B),{})),z&&z!==this.oldGridData&&(this.oldGridData=z),this.isInNullRow&&(this.isInNullRow=!1),z}else return this.isInNullRow&&(this.isInNullRow=!1),this.logService.error("Grid data is nonexistent, using last known good grid"),this.oldGridData})}onDeleteRow(){const N=this;return P=>{let x=N.getConnectionInfo();if(N.telemetryService.createActionEvent("EditDataGrid","DeleteEditRow").withAdditionalProperties({rowIndex:P}).withConnectionInfo(x.profile).withServerInfo(x.serverInfo).send(),N.newRowVisible&&P===N.dataSet.dataRows.getLength()-2)N.revertCurrentRow().catch(w.onUnexpectedError);else{if(N.isNullRow(P))return;N.dataService.deleteRow(P).then(()=>N.dataService.commitEdit()).then(()=>N.removeRow(P))}}}onRevertRow(){const N=this;return()=>{let P=N.getConnectionInfo();N.telemetryService.createActionEvent("EditDataGrid","RevertEditCurrentRow").withAdditionalProperties({currentRow:N.currentCell.row}).withConnectionInfo(P.profile).withServerInfo(P.serverInfo).send(),N.revertCurrentRow().catch(w.onUnexpectedError)}}onCellSelect(N){let P=this,x=N.row,F=N.cell,V=P.getConnectionInfo();if(P.telemetryService.createActionEvent("EditDataGrid","EditCellSelect").withAdditionalProperties({selectedRow:N.row,selectedColumn:N.cell}).withConnectionInfo(V.profile).withServerInfo(V.serverInfo).send(),x===void 0||F===void 0||this.cellSubmitInProgress||this.cellRevertInProgress||this.rowRevertInProgress||(this.lastClickedCell={row:x,column:F},this.currentCell.row===x&&this.currentCell.column===F&&this.currentCell.isDirty===!1))return;this.cellSubmitInProgress=!0,this.updateEnabledState(!1),this.cellSubmitInProgress=!1;let W=this.submitCurrentCellChange(z=>(P.setCellDirtyState(P.currentCell.row,P.currentCell.column,z.cell.isDirty),P.setRowDirtyState(P.currentCell.row,z.isRowDirty),Promise.resolve()),z=>(P.notificationService.error((0,I.localize)(2,null,z)),P.telemetryService.createErrorEvent("EditDataGrid","EditCellSelectError").withConnectionInfo(V.profile).withServerInfo(V.serverInfo).send(),this.cellSubmitInProgress=!0,this.updateEnabledState(!0),this.cellSubmitInProgress=!1,this.lastClickedCell={row:P.currentCell.row,column:P.currentCell.column},P.focusCell(P.currentCell.row,P.currentCell.column,!0),Promise.reject(null)));this.currentCell.row!==x&&(W=W.then(()=>this.dataService.commitEdit().then(z=>(this.setGridClean(),this.rowIdMappings={},this.newRowVisible=!1,Promise.resolve()),z=>(this.notificationService.error(z),this.telemetryService.createErrorEvent("EditDataGrid","SubmitCommitError").withConnectionInfo(V.profile).withServerInfo(V.serverInfo).send(),this.cellSubmitInProgress=!0,this.updateEnabledState(!0),this.cellSubmitInProgress=!1,this.lastClickedCell={row:this.currentCell.row,column:this.currentCell.column},this.focusCell(this.currentCell.row,this.currentCell.column),Promise.reject(null))))),W=W.then(()=>{this.cellSubmitInProgress=!0,this.updateEnabledState(!0),this.cellSubmitInProgress=!1,P.setCurrentCell(x,F),P.focusCell(x,F)}),W.catch(()=>{})}updateEnabledState(N){let P=this.table.grid.getOptions();P.editable=N,this.table.grid.setOptions(P,!0)}handleComplete(N,P){}handleEditSessionReady(N,P){}handleMessage(N,P){P.data&&P.data.isError&&N.notificationService.notify({severity:r.default.Error,message:P.data.message})}async handleResultSet(N,P){let x=Object.assign({},P.data);if(!x.complete)return;x.rowCount++;let F=this.getMaxHeight(x.rowCount),V=this.getMinHeight(x.rowCount),W=new v.RowNumberColumn,z={resized:void 0,batchId:x.batchId,resultId:x.id,totalRows:x.rowCount,maxHeight:F,minHeight:V,dataRows:new t.VirtualizedCollection(N.windowSize,K=>({}),x.rowCount,await this.loadDataFunction),columnDefinitions:[W.getColumnDefinition()].concat(x.columnInfo.map((K,H)=>{let U=(H+1).toString();return{id:U,name:(0,h.escape)(K.columnName),field:U,formatter:(G,$,ie,J,j)=>this.getColumnFormatter(G,$,ie,J,j,N.newlinePattern),isEditable:K.isUpdatable}}))};N.plugins.push(W,new m.AutoColumnSize({maxWidth:this.configurationService.getValue("resultsGrid.maxColumnWidth")}),new S.AdditionalKeyBindings),N.dataSet=z,N.gridDataProvider=new t.AsyncDataProvider(z.dataRows);let B=(0,n.deepClone)(z);B.columnDefinitions=z.columnDefinitions,B.dataRows=void 0,N.placeHolderDataSets.push(B),N.placeHolderDataSets[0]&&this.refreshDatasets(),await N.refreshGrid(!0)}onScroll(N){this.refreshGrid()}getConnectionInfo(){let N=this.connectionManagementService.getConnectionProfile(this.uri),P=this.connectionManagementService.getServerInfo(N.id);return{profile:N,serverInfo:P}}replaceLinebreaks(N){let P=N.match(/(\r\n|\n|\r)/g);return P&&P.length>0&&(this.newlinePattern=P[0]),N.replace(/(\r\n|\n|\r)/g,"\0")}refreshGrid(N){return new Promise(async(P,x)=>{clearTimeout(this.refreshGridTimeoutHandle),this.refreshGridTimeoutHandle=setTimeout(()=>{try{this.dataSet&&(this.placeHolderDataSets[0].dataRows=this.dataSet.dataRows,this.onResize()),this.placeHolderDataSets[0].dataRows&&this.oldDataRows!==this.placeHolderDataSets[0].dataRows&&(this.detectChange(),this.oldDataRows=this.placeHolderDataSets[0].dataRows)}catch{this.logService.error("data set is empty, refresh cancelled."),x()}this.firstRender?(this.resetCurrentCell(),this.setActive()):N&&(this.resetCurrentCell(),this.removingNewRow=!1,this.newRowVisible=!1,this.dirtyCells=[]),setTimeout(()=>P(),500)},this.refreshGridTimeoutInMs)})}setActive(){this.firstRender&&this.table&&(this.table.setActiveCell(0,1),this.firstRender=!1)}detectChange(){this.firstLoad?(this.handleChanges({dataRows:{currentValue:this.dataSet.dataRows,firstChange:this.firstLoad,previousValue:void 0},columnDefinitions:{currentValue:this.dataSet.columnDefinitions,firstChange:this.firstLoad,previousValue:void 0}}),this.handleInitializeTable(),this.firstLoad=!1):(this.table.setData(this.gridDataProvider),this.handleChanges({dataRows:{currentValue:this.dataSet.dataRows,firstChange:this.firstLoad,previousValue:this.oldDataRows}}))}tryHandleKeyEvent(N){let P=!1;return N.keyCode===9&&(this.revertCurrentRow(!0).catch(w.onUnexpectedError),P=!0),N.ctrlKey&&N.keyCode===21&&(document.execCommand("selectAll"),document.execCommand("delete"),document.execCommand("insertText",!1,"NULL"),P=!0),N.keyCode===3&&this.isNullRow(this.currentCell.row)&&(this.isInNullRow=!0),P}refreshDatasets(){let N=this.renderedDataSets;this.renderedDataSets=[],this.handleChanges({dataRows:{currentValue:void 0,firstChange:this.firstLoad,previousValue:this.dataSet.dataRows},columnDefinitions:{currentValue:void 0,firstChange:this.firstLoad,previousValue:this.dataSet.columnDefinitions}}),this.renderedDataSets=N,this.handleChanges({dataRows:{currentValue:this.renderedDataSets[0].dataRows,firstChange:this.firstLoad,previousValue:void 0},columnDefinitions:{currentValue:this.renderedDataSets[0].columnDefinitions,firstChange:this.firstLoad,previousValue:this.dataSet.columnDefinitions}})}async revertCurrentRow(N){this.rowRevertInProgress=!0;let P=this.dataSet.totalRows-2,x=this.getConnectionInfo();if(this.telemetryService.createActionEvent("EditDataGrid","EditRowRevert").withAdditionalProperties({currentNewRow:P,currentRow:this.currentCell.row}).withConnectionInfo(x.profile).withServerInfo(x.serverInfo).send(),this.newRowVisible&&this.currentCell.row===P)this.removingNewRow=!0,await this.dataService.revertRow(this.rowIdMappings[P]),await this.removeRow(P),this.currentCell&&this.isNullRow(this.currentCell.row)&&this.lastEnteredString&&(this.focusCell(this.currentCell.row,this.currentCell.column),document.execCommand("selectAll"),document.execCommand("delete"),document.execCommand("insertText",!1,this.lastEnteredString)),this.newRowVisible=!1,this.rowRevertInProgress=!1;else try{this.currentCell&&this.currentCell.row!==void 0&&await this.dataService.revertRow(this.currentCell.row)}finally{this.dirtyCells=[];let F=this.currentCell.row;F!==void 0&&this.dataSet.dataRows.resetWindowsAroundIndex(F),N&&(this.resetCurrentCell(),this.table.grid.resetActiveCell()),this.rowRevertInProgress=!1}}async revertCurrentCell(){this.cellRevertInProgress=!0,this.updateEnabledState(!1),await this.dataService.revertCell(this.currentCell.row,this.currentCell.column-1),this.dataSet.dataRows=new t.VirtualizedCollection(this.windowSize,N=>({}),this.dataSet.totalRows,this.loadDataFunction),this.gridDataProvider=new t.AsyncDataProvider(this.dataSet.dataRows),await this.refreshGrid(),this.currentCell&&this.lastEnteredString&&(this.updateEnabledState(!0),this.focusCell(this.currentCell.row,this.currentCell.column),document.execCommand("selectAll"),document.execCommand("delete"),document.execCommand("insertText",!1,this.lastEnteredString),this.cellRevertInProgress=!1)}submitCurrentCellChange(N,P){let x=this,F=Promise.resolve(),V=!1;return this.currentCell&&this.currentCell.isEditable&&this.currentEditCellValue!==void 0&&!this.removingNewRow&&(this.isNullRow(this.currentCell.row)&&(V=!0,F=F.then(()=>x.addRow(this.currentCell.row))),F=F.then(()=>{let W=x.rowIdMappings[x.currentCell.row]!==void 0?x.rowIdMappings[x.currentCell.row]:x.currentCell.row,z=this.newlinePattern?x.currentEditCellValue.replace(/\u0000/g,this.newlinePattern):x.currentEditCellValue;return x.dataService.updateCell(W,x.currentCell.column-1,z)}).then(W=>{x.lastEnteredString=void 0,x.currentEditCellValue=void 0;let z=Promise.resolve();return V&&(z=x.refreshGrid()),z.then(()=>N(W))},W=>{x.lastEnteredString=x.currentEditCellValue,x.currentEditCellValue=void 0,x.currentCell.isDirty=!1;let z=Promise.resolve();return V?z=this.revertCurrentRow():z=this.revertCurrentCell(),z.then(()=>P(W))})),F}isNullRow(N){return this.dataSet?N===this.dataSet.totalRows-1:!1}setCellDirtyState(N,P,x){let V=this.table._grid;x?(jQuery(V.getCellNode(N,P)).addClass("dirtyCell").removeClass("selected"),this.dirtyCells.indexOf(P)===-1&&this.dirtyCells.push(P)):(jQuery(V.getCellNode(N,P)).removeClass("dirtyCell"),this.dirtyCells.indexOf(P)!==-1&&this.dirtyCells.splice(this.dirtyCells.indexOf(P),1))}setRowDirtyState(N,P){let F=this.table._grid;P?jQuery(F.getCellNode(N,0)).addClass("dirtyRowHeader"):jQuery(F.getCellNode(N,0)).removeClass("dirtyRowHeader")}setGridClean(){let N=jQuery(jQuery(".grid-canvas").children());jQuery(N.children()).removeClass("dirtyCell").removeClass("dirtyRowHeader"),this.dirtyCells=[]}addRow(N){let P=this;return this.dataService.createRow().then(x=>{P.rowIdMappings[N]=x.newRowId,P.newRowVisible=!0,P.dataSet.totalRows++,P.dataSet.maxHeight=P.getMaxHeight(P.dataSet.totalRows),P.dataSet.minHeight=P.getMinHeight(P.dataSet.totalRows),P.dataSet.dataRows=new t.VirtualizedCollection(P.windowSize,F=>({}),P.dataSet.totalRows,P.loadDataFunction),P.gridDataProvider=new t.AsyncDataProvider(P.dataSet.dataRows)})}removeRow(N){return this.dataSet.totalRows--,this.dataSet.dataRows=new t.VirtualizedCollection(this.windowSize,P=>({}),this.dataSet.totalRows,this.loadDataFunction),this.gridDataProvider=new t.AsyncDataProvider(this.dataSet.dataRows),this.refreshGrid().then(()=>{this.currentCell.row===N&&!this.removingNewRow&&(this.setCurrentCell(this.currentCell.row,this.currentCell.column),this.focusCell(this.currentCell.row,this.currentCell.column)),this.removingNewRow=!1})}focusCell(N,P,x=!0){this.table._grid.gotoCell(N,P,x)}getMaxHeight(N){return N<this.defaultNumShowingRows?(N+1)*this.rowHeight+10:"inherit"}getMinHeight(N){return N>this.defaultNumShowingRows?(this.defaultNumShowingRows+1)*this.rowHeight+10:this.getMaxHeight(N)}saveViewState(){let N=this.table,P=this;if(N){let x=N.getSelectedRanges(),F=N,V=F._grid.getCanvasNode().parentElement;this.savedViewState={gridSelections:x,scrollTop:V.scrollTop,scrollLeft:V.scrollLeft};let W=this.getConnectionInfo();this.telemetryService.createActionEvent("EditDataGrid","EditSaveViewState").withAdditionalProperties({scrollLeft:this.savedViewState.scrollLeft,scrollTop:this.savedViewState.scrollTop}).withConnectionInfo(W.profile).withServerInfo(W.serverInfo).send(),this.currentCell.row!==void 0&&this.currentCell.column!==void 0&&this.currentCell.isEditable&&(F._grid.getEditorLock().commitCurrentEdit(),this.submitCurrentCellChange(z=>{P.setCellDirtyState(P.currentCell.row,P.currentCell.column,z.cell.isDirty),P.setRowDirtyState(this.currentCell.row,z.isRowDirty)},z=>{P.notificationService.error((0,I.localize)(3,null,z)),P.telemetryService.createErrorEvent("EditDataGrid","EditSaveViewError").withConnectionInfo(W.profile).withServerInfo(W.serverInfo).send()}).catch(w.onUnexpectedError))}}restoreViewState(){if(this.savedViewState){let N=this.getConnectionInfo();this.telemetryService.createActionEvent("EditDataGrid","EditRestoreViewState").withAdditionalProperties({scrollLeft:this.savedViewState.scrollLeft,scrollTop:this.savedViewState.scrollTop}).withConnectionInfo(N.profile).withServerInfo(N.serverInfo).send();let P=this.table._grid.getCanvasNode().parentElement;P.scrollLeft=this.savedViewState.scrollLeft,P.scrollTop=this.savedViewState.scrollTop,this.savedViewState=void 0,this.currentCell.row!==void 0&&this.isRowDirty(this.currentCell.row)&&(this.setRowDirtyState(this.currentCell.row,!0),this.dirtyCells.forEach(x=>{this.setCellDirtyState(this.currentCell.row,x,!0)}))}}isRowDirty(N){return this.currentCell.row===N&&this.dirtyCells.length>0}isCellDirty(N,P){return this.currentCell.row===N&&this.dirtyCells.indexOf(P)!==-1}resetCurrentCell(){this.currentCell={row:void 0,column:void 0,isEditable:!1,isDirty:!1},this.currentEditCellValue=void 0}setCurrentCell(N,P){this.currentCell&&(N!==this.currentCell.row||P!==this.currentCell.column)&&(this.currentCell={row:N,column:P,isEditable:this.dataSet.columnDefinitions[P]?this.dataSet.columnDefinitions[P].isEditable:!1,isDirty:!1})}createNewTable(){let N=document.createElement("div");if(N.className="editDataGrid",this.placeHolderDataSets){let P=this.placeHolderDataSets[0],x={enableCellNavigation:!0,enableColumnReorder:!1,renderRowWithRange:!0,showHeader:!0,rowHeight:this.rowHeight,defaultColumnWidth:120,defaultFormatter:void 0,editable:this.enableEditing,autoEdit:this.enableEditing,enableAddRow:!1,enableAsyncPostRender:!1,editorFactory:{getEditor:F=>this.getColumnEditor(F)}};if(P.columnDefinitions){this.table=new y.Table(this.nativeElement.appendChild(N),this.accessibilityService,this.quickInputService,_.defaultTableStyles,{dataProvider:this.gridDataProvider,columns:P.columnDefinitions},x);for(let F of this.plugins)this.table.registerPlugin(F);for(let F=0;F<P.columnDefinitions.length;F++)this.columnNameToIndex[this.dataSet.columnDefinitions[F].name]=F}}else this.table=new y.Table(this.nativeElement.appendChild(N),this.accessibilityService,this.quickInputService,_.defaultTableStyles)}getOverridableTextEditorClass(){let N=this;class P{constructor(F){this._args=F,this._textEditor=new Slick.Editors.Text(F);const V=35,W=36;this.keyCaptureList=[V,W]}destroy(){this._textEditor.destroy()}focus(){this._textEditor.focus()}getValue(){return this._textEditor.getValue()}setValue(F){this._textEditor.setValue(F)}loadValue(F){let V=(0,n.deepClone)(F);if(N.overrideCellFn){let W=N.overrideCellFn(this._args.column.id,V[this._args.column.id]);W!==void 0&&(V[this._args.column.id]=W)}this._textEditor.loadValue(V)}serializeValue(){return this._textEditor.serializeValue()}applyValue(F,V){let W=N.currentCell.row,z=N.dataSet.dataRows.at(W),B=N.getColumnIndex(this._args.column.name),K=N.dataSet.dataRows.getLength();W<K&&(z[B]=V,this._textEditor.applyValue(F,V))}isValueChanged(){return this._textEditor.isValueChanged()}validate(){let F=N.currentCell.row,V={valid:!0,msg:void 0},W=N.getColumnIndex(this._args.column.name),z=this._textEditor.getValue();return N.onIsCellEditValid&&!N.onIsCellEditValid(F,W,z)&&(V.valid=!1),V}}return P}getColumnEditor(N){if(N.isEditable===!1||typeof N.isEditable>"u")return;if(N.id!==void 0)return this.getOverridableTextEditorClass()}getColumnIndex(N){return this.columnNameToIndex[N]}handleChanges(N){let P=N.columnDefinitions,x,F=!1,V=this.table?!!this.table.grid.getCellEditor():!1;if(this.table&&(this.lastClickedCell?(x={row:this.lastClickedCell.row,cell:this.lastClickedCell.column},this.lastClickedCell=void 0):x=this.table.grid.getActiveCell()),P&&!(0,g.equals)(P.previousValue,P.currentValue)&&(this.table?(this.table.grid.resetActiveCell(),this.table.grid.setColumns(this.dataSet.columnDefinitions)):this.createNewTable(),F=!0,(!P.currentValue||P.currentValue.length===0)&&(x=void 0),x)){let W=P.previousValue[Math.max(x.cell-1,0)],z=W?P.currentValue.findIndex(B=>B.id===W.id):-1;x.cell=z!==-1?z+1:0}(N.dataRows||N.highlightedCells&&!(0,g.equals)(N.highlightedCells.currentValue,N.highlightedCells.previousValue)||N.blurredColumns&&!(0,g.equals)(N.blurredColumns.currentValue,N.blurredColumns.previousValue)||N.columnsLoading&&!(0,g.equals)(N.columnsLoading.currentValue,N.columnsLoading.previousValue))&&(this.setCallbackOnDataRowsChanged(),this.table.rerenderGrid(),F=!0),F&&(x?this.table.grid.setActiveCell(x.row,x.cell):this.table.grid.resetActiveCell()),V&&F&&this.table.grid.editActiveCell(this.table.grid.getCellEditor())}setCallbackOnDataRowsChanged(){this.dataSet.dataRows&&(this.changeEditSession(!0),this.dataSet.dataRows.setCollectionChangedCallback((N,P)=>{this.renderGridDataRowsRange(N,P)}))}changeEditSession(N){this.enableEditing=N;let P=this.table.grid.getOptions();P.editable=N,P.enableAddRow=!1,this.table.grid.setOptions(P)}renderGridDataRowsRange(N,P){let x=this.table.grid.getCellEditor(),F=x?x.getValue():void 0,V=x?x.isValueChanged():!1;this.invalidateRange(N,N+P);let W=this.currentCell;x&&W.row>=N&&W.row<N+P&&F&&V&&x.setValue(F)}invalidateRange(N,P){let x=Array.from({length:P-N},(F,V)=>V+N);this.table.grid.invalidateRows(x,!0),this.table.grid.render()}setupEvents(){this.table.grid.onCellChange.subscribe((N,P)=>{this.onCellEditEnd(P)}),this.table.grid.onBeforeEditCell.subscribe((N,P)=>this.onBeforeEditCell(P)),this.table.grid.onActiveCellChanged.subscribe((N,P)=>{this.onActiveCellChanged(P)}),this.table.grid.onContextMenu.subscribe((N,P)=>{this.openContextMenu(N,this.dataSet.batchId,this.dataSet.resultId,0)}),this.table.grid.onBeforeAppendCell.subscribe((N,P)=>this.onBeforeAppendCell?this.onBeforeAppendCell(P.row,P.cell):void 0),this.table.grid.onKeyDown.subscribe((N,P)=>{const x=N.originalEvent,F=new c.StandardKeyboardEvent(x);this.tryHandleKeyEvent(F)})}onBeforeEditCell(N){let P=!0;this.logService.debug("onBeforeEditCell called with grid: "+N.grid+" row: "+N.row+" cell: "+N.cell+" item: "+N.item+" column: "+N.column);let x=N.item[N.cell];return b.DBCellValue.isDBCellValue(x)?P=!this.hasNullAndLinebreak(x.displayValue):(typeof x=="string"||x&&x.text)&&(x.text?P=!this.hasNullAndLinebreak(x.text):P=!this.hasNullAndLinebreak(x)),P||this.notificationService.warn(L),P}hasNullAndLinebreak(N){return N?N.match(/(\r\n|\n|\r)/)?.length>0&&N.indexOf("\0")!==-1:!1}handleInitializeTable(){this.placeHolderDataSets[0].dataRows&&this.placeHolderDataSets[0].dataRows.getLength()>0&&this.table.grid.scrollRowToTop(0),this.setupEvents()}getColumnFormatter(N,P,x,F,V,W){let z="",B="grid-cell-value-container",K=x==null||b.DBCellValue.isDBCellValue(x)&&x.isNull||x==="NULL",H=b.DBCellValue.isDBCellValue(x)&&!x.isNull&&x.displayValue==="NULL";return K?(z="NULL",B+=" missing-value"):H?z="'NULL'":b.DBCellValue.isDBCellValue(x)?z=x.displayValue+"":(typeof x=="string"||x&&x.text)&&(x.text?z=x.text:z=x,z=W?z.replace(/\u0000/g,W):z),z=b.getCellDisplayValue(z),'<span title="'+z+'" class="'+B+'">'+z+"</span>"}};e.EditDataGridPanel=R,e.EditDataGridPanel=R=fe([O(4,i.IInstantiationService),O(5,a.INotificationService),O(6,s.IContextMenuService),O(7,o.IKeybindingService),O(8,u.IContextKeyService),O(9,d.IConfigurationService),O(10,p.IClipboardService),O(11,f.IQueryEditorService),O(12,A.IAdsTelemetryService),O(13,l.ILogService),O(14,E.IAccessibilityService),O(15,C.IQuickInputService),O(16,k.IConnectionManagementService)],R)}),define(Q[3699],Y([1,0,241,472,5,6]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataService=void 0;let T=class{fireQueryEvent(v){this._queryEvents.fire(v)}fireGridContent(v){this._gridContent.fire(v)}constructor(v,m,S){this.uri=v,this._instantiationService=m,this._queryModel=S,this._queryEvents=new D.Emitter,this.queryEvents=this._queryEvents.event,this._gridContent=new D.Emitter,this.gridContent=this._gridContent.event,this.editQueue=Promise.resolve()}getEditRows(v,m){return this._queryModel.getEditRows(this.uri,v,m)}updateCell(v,m,S){const h=this;return h.editQueue=h.editQueue.then(()=>h._queryModel.updateCell(h.uri,v,m,S).then(a=>a,a=>(h.editQueue=Promise.resolve(),Promise.reject(a)))),h.editQueue}commitEdit(){const v=this;return v.editQueue=v.editQueue.then(()=>v._queryModel.commitEdit(v.uri).then(m=>m,m=>(v.editQueue=Promise.resolve(),Promise.reject(m)))),v.editQueue}createRow(){const v=this;return v.editQueue=v.editQueue.then(()=>v._queryModel.createRow(v.uri).then(m=>m,m=>(v.editQueue=Promise.resolve(),Promise.reject(m)))),v.editQueue}deleteRow(v){const m=this;return m.editQueue=m.editQueue.then(()=>m._queryModel.deleteRow(m.uri,v).then(S=>S,S=>(m.editQueue=Promise.resolve(),m._queryModel.showCommitError(S.message),Promise.reject(S)))),m.editQueue}revertCell(v,m){const S=this;return S.editQueue=S.editQueue.then(()=>S._queryModel.revertCell(S.uri,v,m).then(h=>h,h=>(S.editQueue=Promise.resolve(),Promise.reject(h)))),S.editQueue}revertRow(v){const m=this;return m.editQueue=m.editQueue.then(()=>m._queryModel.revertRow(m.uri,v).then(S=>S,S=>(m.editQueue=Promise.resolve(),Promise.reject(S)))),m.editQueue}sendSaveRequest(v){this._instantiationService.createInstance(y.ResultSerializer).saveResults(this.uri,v)}copyResults(v,m,S,h){this._queryModel.copyResults(this.uri,v,m,S,h)}onLoaded(){this._queryModel.onLoaded(this.uri)}};e.DataService=T,e.DataService=T=fe([O(1,b.IInstantiationService),O(2,t.IQueryModelService)],T)}),define(Q[620],Y([1,0,251,184,183,472,2242,68,17,4,23,6,5,9,10,173,117,1163,15,11,27,78,107]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shouldSkipNewLineAfterTrailingLineBreak=e.shouldRemoveNewLines=e.shouldIncludeHeaders=e.getEolString=e.QueryGridDataProvider=void 0;let g=class extends m.Disposable{get isQueryPlan(){return this._isQueryPlan}get planXml(){return this._planXml.promise}get onMessage(){return this._onMessage.event}get onQueryEnd(){return this._onQueryEnd.event}get queryStartTime(){return this._queryStartTime}get queryEndTime(){return this._queryEndTime}constructor(L,R,M,N,P,x){super(),this.uri=L,this.queryManagementService=R,this.configurationService=M,this.instantiationService=N,this.textResourcePropertiesService=P,this.logService=x,this._totalElapsedMilliseconds=0,this._isExecuting=!1,this._hasCompleted=!1,this._batchSets=[],this._messages=[],this.registered=!1,this._isQueryPlan=!1,this._planXml=new b.Deferred,this._onMessage=this._register(new h.Emitter),this._onResultSet=this._register(new h.Emitter),this.onResultSet=this._onResultSet.event,this._onResultSetUpdate=this._register(new h.Emitter),this.onResultSetUpdate=this._onResultSetUpdate.event,this._onQueryStart=this._register(new h.Emitter),this.onQueryStart=this._onQueryStart.event,this._onQueryEnd=this._register(new h.Emitter),this._onBatchStart=this._register(new h.Emitter),this.onBatchStart=this._onBatchStart.event,this._onBatchEnd=this._register(new h.Emitter),this.onBatchEnd=this._onBatchEnd.event,this._onQueryPlanAvailable=this._register(new h.Emitter),this.onQueryPlanAvailable=this._onQueryPlanAvailable.event,this._onExecutionPlanAvailable=this._register(new h.Emitter),this.onExecutionPlanAvailable=this._onExecutionPlanAvailable.event,this._onVisualize=this._register(new h.Emitter),this.onVisualize=this._onVisualize.event,this._onConnectionIdUpdated=this._register(new h.Emitter),this.onConnectionIdUpdated=this._onConnectionIdUpdated.event,this._isDisposed=!1}get isExecuting(){return this._isExecuting}get hasCompleted(){return this._hasCompleted}get isDisposed(){return this._isDisposed}get batchSets(){return this._batchSets.slice(0)}get messages(){return this._messages.slice(0)}getProviderId(){return this.queryManagementService.getProviderIdFromUri(this.uri)}cancelQuery(){return this.queryManagementService.cancelQuery(this.uri)}runQuery(L,R){return v.isString(L)?this.doRunQuery(L,!1,R):v.isUndefined(L)?this.doRunQuery(L,!1,R):this.doRunQuery(L,!1,R)}runQueryStatement(L){return this.doRunQuery(L,!0)}doRunQuery(L,R,M){return this.isExecuting?Promise.resolve():(this._planXml=new b.Deferred,this._batchSets=[],this._hasCompleted=!1,this._queryStartTime=void 0,this._queryEndTime=void 0,this._messages=[],A(L)?(this._resultLineOffset=L?L.startLineNumber-1:0,this._resultColumnOffset=L?L.startColumn-1:0,this._isExecuting=!0,this._totalElapsedMilliseconds=0,this._onQueryStart.fire(),R?this.queryManagementService.runQueryStatement(this.uri,L.startLineNumber,L.startColumn).then(()=>this.handleSuccessRunQueryResult(),N=>this.handleFailureRunQueryResult(N)):this.queryManagementService.runQuery(this.uri,L,M).then(()=>this.handleSuccessRunQueryResult(),N=>this.handleFailureRunQueryResult(N))):(this._isExecuting=!0,this._totalElapsedMilliseconds=0,this._onQueryStart.fire(),this.queryManagementService.runQueryString(this.uri,L).then(()=>this.handleSuccessRunQueryResult(),N=>this.handleFailureRunQueryResult(N))))}handleSuccessRunQueryResult(){this._queryStartTime=new Date,this.registered||(this.registered=!0,this.queryManagementService.registerRunner(this,this.uri))}handleFailureRunQueryResult(L){const R=E(this.textResourcePropertiesService,this.uri);L instanceof Error&&(L=L.message);let M=T.localize(0,null,R,L);this.handleMessage([{isError:!0,message:M}]),this.handleQueryComplete()}handleQueryComplete(L){this._queryEndTime=new Date,s.mark(`sql/query/${this.uri}/handleQueryComplete`),this.logPerfMarks(),this._isExecuting=!1,this._hasCompleted=!0,this._batchSets=L||[],this._batchSets.map(N=>{if(N.range){const P=this._resultColumnOffset??0,x=this._resultLineOffset??0;N.range=new c.Range(N.range.startLineNumber+x,N.range.startColumn+P,N.range.endLineNumber+x,N.range.endColumn+P)}});let R=y.parseNumAsTimeString(this._totalElapsedMilliseconds),M={message:T.localize(1,null,R),isError:!1,time:void 0};this._messages.push(M),this._onQueryEnd.fire(R),this._onMessage.fire([M])}handleServerConnId(L){let R={uri:this.uri,connId:L};this._onConnectionIdUpdated.fire(R)}handleBatchStart(L){if(L.range){const M=this._resultColumnOffset??0,N=this._resultLineOffset??0;L.range=new c.Range(L.range.startLineNumber+N,L.range.startColumn+M,L.range.endLineNumber+N,L.range.endColumn+M)}this._batchSets[L.id]={...L,resultSetSummaries:[],hasError:!1};let R={message:L.range?T.localize(2,null,L.range.startLineNumber):T.localize(3,null,L.id),time:L.executionStart,range:L.range,isError:!1};this._messages.push(R),this._onMessage.fire([R]),this._onBatchStart.fire(L)}handleBatchComplete(L){this._batchSets[L.id]=L;let R=y.parseTimeString(L.executionElapsed)||0;this._totalElapsedMilliseconds+=R,R>0&&this.sendBatchTimeMessage(L.id,y.parseNumAsTimeString(R)),this._onBatchEnd.fire(L)}handleResultSetAvailable(L){if(L){let R;L.batchId?R=this._batchSets[L.batchId]:this._batchSets.length>0?R=this._batchSets[0]:(R={id:0,range:void 0,executionStart:Date.now().toString(),hasError:!1,resultSetSummaries:[]},this._batchSets[0]=R),!!L.columnInfo.find(N=>N.columnName==="Microsoft SQL Server 2005 XML Showplan")&&L.rowCount>0&&(this._isQueryPlan=!0,this.getQueryRowsPaged(0,1,L.batchId,L.id).then(N=>{N.rows&&this._planXml.resolve(N.rows[0][0].displayValue)}).catch(N=>this.logService.error(N))),R&&!R.resultSetSummaries[L.id]&&(R.resultSetSummaries[L.id]=L,this._onResultSet.fire(L))}}handleResultSetUpdated(L){if(L){let R;R=this._batchSets[L.batchId],!!L.columnInfo.find(N=>N.columnName==="Microsoft SQL Server 2005 XML Showplan")&&(this._isQueryPlan=!0,this.getQueryRowsPaged(0,1,L.batchId,L.id).then(N=>{if(N.rows){let P=N.rows[0][0].displayValue;this._planXml.resolve(N.rows[0][0].displayValue),L.complete&&this._onQueryPlanAvailable.fire({providerId:o.mssqlProviderName,fileUri:this.uri,planXml:P})}}).catch(N=>this.logService.error(N))),R&&(R.resultSetSummaries[L.id]=L,this._onResultSetUpdate.fire(L))}}handleExecutionPlanAvailable(L){L&&this._onExecutionPlanAvailable.fire({providerId:o.mssqlProviderName,fileUri:this.uri,planGraphs:L})}handleMessage(L){this._messages.push(...L),this._onMessage.fire(L)}getQueryRows(L,R,M,N,P,x){let F={ownerUri:this.uri,resultSetIndex:N,rowsCount:R,rowsStartIndex:L,batchIndex:M};return this.queryManagementService.getQueryRows(F)}getQueryRowsPaged(L,R,M,N,P,x){let F={ownerUri:this.uri,resultSetIndex:N,rowsCount:R,rowsStartIndex:L,batchIndex:M};return this.queryManagementService.getQueryRowsPaged(F,P,x).then(V=>V,V=>V)}async disposeQuery(){await this.queryManagementService.disposeQuery(this.uri),this.dispose()}dispose(){this._batchSets=void 0,super.dispose(),this._isDisposed=!0}get totalElapsedMilliseconds(){return this._totalElapsedMilliseconds}async copyResults(L,R,M,N){await this.queryManagementService.copyResults({ownerUri:this.uri,batchIndex:R,resultSetIndex:M,includeHeaders:N,selections:L.map(P=>({fromRow:P.fromRow,toRow:P.toRow,fromColumn:P.fromCell,toColumn:P.toCell}))})}getColumnHeaders(L,R,M){let N,P=this._batchSets[L];return P!==void 0&&(N=P.resultSetSummaries[R].columnInfo.slice(M.fromCell,M.toCell+1).map((F,V)=>F.columnName)),N}sendBatchTimeMessage(L,R){if(this.configurationService.getValue("queryEditor").messages.showBatchTime){let N={batchId:L,message:T.localize(4,null,R),time:void 0,isError:!1};this._messages.push(N),this._onMessage.fire([N])}}serializeResults(L,R,M,N){return this.instantiationService.createInstance(D.ResultSerializer).saveResults(this.uri,{selection:N,format:M,batchIndex:L,resultSetNumber:R})}getGridDataProvider(L,R){return this.instantiationService.createInstance(w,this,L,R)}notifyVisualizeRequested(L,R){let M={batchId:L,id:R,columnInfo:this.batchSets[L].resultSetSummaries[R].columnInfo,complete:!0,rowCount:this.batchSets[L].resultSetSummaries[R].rowCount};this._onVisualize.fire(M)}logPerfMarks(){let L=s.getMarks().filter(F=>F.name.startsWith(`sql/query/${this.uri}`)),R=L.slice().reverse().findIndex(F=>F.name.startsWith(`sql/query/${this.uri}/runQuery`));L=L.slice(-(R+1));let M=`Name Timestamp Delta Total `,N="",P=-1,x=0;for(const{name:F,startTime:V}of L){let W=P!==-1?V-P:0;x+=W,N+=`${F} ${V} ${W} ${x} `,P=V}this.logService.debug(`Traces for sql/query/${this.uri}: ${M}${N}`)}};g=fe([O(1,t.IQueryManagementService),O(2,r.IConfigurationService),O(3,a.IInstantiationService),O(4,l.ITextResourcePropertiesService),O(5,p.ILogService)],g),e.default=g;let w=class{constructor(L,R,M,N,P,x,F,V){this.queryRunner=L,this.batchId=R,this.resultSetId=M,this._notificationService=N,this._clipboardService=P,this._configurationService=x,this._textResourcePropertiesService=F,this._capabilitiesService=V}getRowData(L,R,M,N){return this.queryRunner.getQueryRowsPaged(L,R,this.batchId,this.resultSetId,M,N)}copyResults(L,R,M){return this.copyResultsAsync(L,R,M)}async copyResultsAsync(L,R,M){try{const N=this.queryRunner.getProviderId(),P=this._capabilitiesService.getCapabilities(N).connection.supportCopyResultsToClipboard;this._configurationService.getValue("queryEditor").results.preferProvidersCopyHandler&&P&&(M===void 0||!M.isDataInMemory)?await this.handleCopyRequestByProvider(L,R):await(0,u.copySelectionToClipboard)(this._clipboardService,this._notificationService,this._configurationService,this,L,R,M)}catch(N){this._notificationService.error(T.localize(5,null,(0,d.getErrorMessage)(N)))}}async handleCopyRequestByProvider(L,R){(0,u.executeCopyWithNotification)(this._notificationService,this._configurationService,L,async()=>{await this.queryRunner.copyResults(L,this.batchId,this.resultSetId,this.shouldIncludeHeaders(R))})}async copyHeaders(L){try{const R=(0,u.getTableHeaderString)(this,L);await this._clipboardService.writeText(R)}catch(R){this._notificationService.error(T.localize(6,null,(0,d.getErrorMessage)(R)))}}getEolString(){return E(this._textResourcePropertiesService,this.queryRunner.uri)}shouldIncludeHeaders(L){return C(L,this._configurationService)}shouldRemoveNewLines(){return I(this._configurationService)}shouldSkipNewLineAfterTrailingLineBreak(){return _(this._configurationService)}getColumnHeaders(L){return this.queryRunner.getColumnHeaders(this.batchId,this.resultSetId,L)}get canSerialize(){return!0}serializeResults(L,R){return this.queryRunner.serializeResults(this.batchId,this.resultSetId,L,R)}};e.QueryGridDataProvider=w,e.QueryGridDataProvider=w=fe([O(3,S.INotificationService),O(4,f.IClipboardService),O(5,r.IConfigurationService),O(6,l.ITextResourcePropertiesService),O(7,n.ICapabilitiesService)],w);function E(k,L){return k.getEOL(i.URI.parse(L),"sql")}e.getEolString=E;function C(k,L){return k!==void 0?k:(k=L.getValue("queryEditor").results.copyIncludeHeaders,!!k)}e.shouldIncludeHeaders=C;function I(k){return!!k.getValue("queryEditor").results.copyRemoveNewLine}e.shouldRemoveNewLines=I;function _(k){return!!k.getValue("queryEditor").results.skipNewLineAfterTrailingLineBreak}e.shouldSkipNewLineAfterTrailingLineBreak=_;function A(k){return c.Range.isIRange(k)||v.isUndefinedOrNull(k)}}),define(Q[3700],Y([1,0,2195,620,63,23,251,9,5,11,6,78]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let a=class extends y.default{constructor(i,s,o,u,d,p,c){super(i,o,u,d,p,c),this.notificationService=s,this._onEditSessionReady=this._register(new S.Emitter),this.onEditSessionReady=this._onEditSessionReady.event}async initializeEdit(i,s,o,u,d,p){this._isExecuting=!0,this._totalElapsedMilliseconds=0;try{await this.queryManagementService.initializeEdit(i,s,o,u,d,p),this._onQueryStart.fire(),this.queryManagementService.registerRunner(this,i)}catch(c){this._isExecuting=!1,this.notificationService.error(t.localize(0,null)+c)}}async getEditRows(i,s){let o={ownerUri:this.uri,rowCount:s,rowStartIndex:i};const u=await this.queryManagementService.getEditRows(o);if(!u.hasOwnProperty("rowCount")){let d="Nothing returned from subset query";throw this.notificationService.notify({severity:b.default.Error,message:d}),new Error(d)}return u}handleEditSessionReady(i,s,o){this._onEditSessionReady.fire({ownerUri:i,success:s,message:o})}updateCell(i,s,o,u){return this.queryManagementService.updateCell(i,s,o,u)}commitEdit(i){return this.queryManagementService.commitEdit(i)}createRow(i){return this.queryManagementService.createRow(i).then(s=>s)}deleteRow(i,s){return this.queryManagementService.deleteRow(i,s)}revertCell(i,s,o){return this.queryManagementService.revertCell(i,s,o)}revertRow(i,s){return this.queryManagementService.revertRow(i,s)}disposeEdit(i){return this.queryManagementService.disposeEdit(i)}};a=fe([O(1,D.INotificationService),O(2,T.IQueryManagementService),O(3,f.IConfigurationService),O(4,v.IInstantiationService),O(5,h.ITextResourcePropertiesService),O(6,m.ILogService)],a),e.default=a}),define(Q[3701],Y([1,0,58,620,184,188,1331,63,17,2205,5,23,11,25]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InsightsDialogController=void 0;let i=class{constructor(o,u,d,p,c,l,n){this._model=o,this._notificationService=u,this._errorMessageService=d,this._instantiationService=p,this._connectionManagementService=c,this.logService=l,this.fileService=n}async update(o,u){if(typeof o=="object"){if(u===void 0)return this._notificationService.notify({severity:f.default.Error,message:m.localize(0,null)}),Promise.resolve();if(v.isStringArray(o.query))return this.createQuery(o.query.join(" "),u).catch(d=>{this._errorMessageService.showDialog(f.default.Error,m.localize(1,null),d)}).then(()=>{});if(v.isString(o.query))return this.createQuery(o.query,u).catch(d=>{this._errorMessageService.showDialog(f.default.Error,m.localize(2,null),d)}).then(()=>{});if(v.isString(o.queryFile)){let d;try{d=await this._instantiationService.invokeFunction(T.resolveQueryFilePath,o.queryFile)}catch(p){return this._notificationService.notify({severity:f.default.Error,message:p}),Promise.resolve()}try{let p=await this.fileService.readFile(d);this.createQuery(p.value.toString(),u).catch(c=>{this._errorMessageService.showDialog(f.default.Error,m.localize(3,null),c)})}catch(p){this._notificationService.notify({severity:f.default.Error,message:m.localize(4,null)+p})}}else return this.logService.error("Error reading details Query: ",o),this._notificationService.notify({severity:f.default.Error,message:m.localize(5,null)}),Promise.resolve()}return Promise.resolve()}async createQuery(o,u){if(this._queryRunner){this._queryRunner.hasCompleted||await this._queryRunner.cancelQuery();try{await this.createNewConnection(u)}catch(d){return Promise.reject(d)}this._queryRunner.uri=this._connectionUri}else{try{await this.createNewConnection(u)}catch(d){return Promise.reject(d)}this._queryRunner=this._instantiationService.createInstance(y.default,this._connectionUri),this.addQueryEventListeners(this._queryRunner)}return this._queryRunner.runQuery(o)}async createNewConnection(o){if(!this._connectionProfile||o.getOptionsKey()!==this._connectionProfile.getOptionsKey()){if(this._connectionProfile)try{await this._connectionManagementService.disconnect(this._connectionUri)}catch(u){return Promise.reject(u)}return this._connectionProfile=o,this._connectionUri=b.generateUri(this._connectionProfile,"insights"),this._connectionManagementService.connect(this._connectionProfile,this._connectionUri).then(u=>{})}}addQueryEventListeners(o){o.onQueryEnd(()=>{this.queryComplete().catch(u=>{this._errorMessageService.showDialog(f.default.Error,m.localize(6,null),u)})}),o.onMessage(u=>{const d=u.find(p=>p.isError);d&&this._errorMessageService.showDialog(f.default.Error,m.localize(7,null),d.message)})}async queryComplete(){let o=this._queryRunner.batchSets;if(o.length>0){let u=o[0];if(u.resultSetSummaries.length>0&&u.resultSetSummaries[0].rowCount>0){let d=u.resultSetSummaries[0];this._columns=d.columnInfo;let p;try{p=await this._queryRunner.getQueryRowsPaged(0,d.rowCount,u.id,d.id)}catch(c){return Promise.reject(c)}this._rows=p.rows,this.updateModel()}}}updateModel(){let o=this._rows.map(d=>d.map(p=>p.displayValue)),u=this._columns.map(d=>d.columnName);this._model.rows=o,this._model.columns=u}};e.InsightsDialogController=i,e.InsightsDialogController=i=fe([O(1,h.INotificationService),O(2,D.IErrorMessageService),O(3,S.IInstantiationService),O(4,t.IConnectionManagementService),O(5,a.ILogService),O(6,r.IFileService)],i)}),define(Q[948],Y([1,0,2222,620,58,5,63,183,4,188,106,201,9,107,11,17,10,184,15,666,776,143,78]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.rowHasColumnNameKeys=e.SQLFuture=e.SqlSession=e.SqlSessionManager=e.SqlStopOnErrorConfigName=e.MaxTableRowsConfigName=e.NotebookConfigSectionName=e.MAX_ROWS=e.sqlKernelError=void 0,e.sqlKernelError=(0,t.localize)(0,null),e.MAX_ROWS=5e3,e.NotebookConfigSectionName="notebook",e.MaxTableRowsConfigName="maxTableRows",e.SqlStopOnErrorConfigName="sqlStopOnError";const w=[{language:"Python",magic:"lang_python"},{language:"R",magic:"lang_r"},{language:"Java",magic:"lang_java"}];class E{static{this._sessions=[]}constructor(R){this._instantiationService=R}get isReady(){return!0}get ready(){return Promise.resolve()}get specs(){return{defaultKernel:p.notebookConstants.sqlKernel,kernels:[p.notebookConstants.sqlKernelSpec]}}startNew(R){let M=new C(R,this._instantiationService),N=E._sessions.findIndex(P=>P.path===R.path);return N>-1&&E._sessions.splice(N),E._sessions.push(M),Promise.resolve(M)}shutdown(R){let M=E._sessions.findIndex(N=>N.id===R);if(M>-1){let N=E._sessions[M];if(E._sessions.splice(M),N&&N.kernel)return N.kernel.disconnect()}return Promise.resolve()}shutdownAll(){return Promise.all(E._sessions.map(R=>this.shutdown(R.id))).then()}dispose(){}}e.SqlSessionManager=E;class C{set defaultKernelLoaded(R){this._defaultKernelLoaded=R}get defaultKernelLoaded(){return this._defaultKernelLoaded}constructor(R,M){this.options=R,this._instantiationService=M,this._defaultKernelLoaded=!1,this._kernel=this._instantiationService.createInstance(I,R.path)}get canChangeKernels(){return!0}get id(){return this.options.kernelId||this.kernel?this._kernel.id:""}get path(){return this.options.path}get name(){return this.options.name||""}get type(){return this.options.type||""}get status(){return"connected"}get kernel(){return this._kernel}changeKernel(R){return Promise.resolve(this.kernel)}configureKernel(R){return Promise.resolve()}configureConnection(R){return this._kernel&&(this._kernel.connection=R),Promise.resolve()}}e.SqlSession=C;let I=class extends v.Disposable{static{g=this}static{this.kernelId=0}constructor(R,M,N,P,x,F,V,W){super(),this._path=R,this._connectionManagementService=M,this._capabilitiesService=N,this._instantiationService=P,this._errorMessageService=x,this._configurationService=F,this.logService=V,this.textResourcePropertiesService=W,this._executionCount=0,this._magicToExecutorMap=new Map,this.initMagics(),this.setConnectionPath()}initMagics(){for(let R of w){let M=new k(R.language);this._magicToExecutorMap.set(R.magic,M)}}setConnectionPath(){if(this._path){let R=(0,u.getUriPrefix)(this._path);if(!R||R===u.uriPrefixes.connection)this._connectionPath=u.uriPrefixes.notebook.concat(this._path);else if(R!==u.uriPrefixes.notebook)try{let M=o.URI.parse(this._path);M&&M.scheme&&(this._connectionPath=M.toString().replace(M.scheme,u.uriPrefixes.notebook))}catch{}finally{this._connectionPath||(this._connectionPath=this._path)}}}get id(){return this._id===void 0&&(this._id=(g.kernelId++).toString()),this._id}get name(){return p.notebookConstants.sqlKernel}get supportsIntellisense(){return!0}get requiresConnection(){return!0}get isReady(){return!0}get ready(){return Promise.resolve()}get info(){return{protocol_version:"",implementation:"",implementation_version:"",language_info:{name:this._connectionManagementService.getProviderLanguageMode(this._currentConnection?.providerName),version:""},banner:"",help_links:[{text:"",url:""}]}}set connection(R){this._currentConnection=R,this._currentConnectionProfile=new S.ConnectionProfile(this._capabilitiesService,this._currentConnection),this._newConnection=!0}getSpec(){return Promise.resolve(p.notebookConstants.sqlKernelSpec)}requestExecute(R,M){if(this._future?.inProgress)throw new Error(l.notebookMultipleRequestsError);let N=!0,P=this.getCodeWithoutCellMagic(R);this._queryRunner&&!this._newConnection?this._queryRunner.runQuery(P).catch(F=>(0,d.onUnexpectedError)(F)):this._currentConnection&&this._currentConnectionProfile?(this._newConnection=!1,this._queryRunner=this._instantiationService.createInstance(y.default,this._connectionPath),this.addQueryEventListeners(this._queryRunner),this._connectionManagementService.connect(this._currentConnectionProfile,this._connectionPath).then(F=>{this._queryRunner.runQuery(P).catch(V=>(0,d.onUnexpectedError)(V))}).catch(F=>(0,d.onUnexpectedError)(F))):N=!1;let x=N?++this._executionCount:void 0;return this._future=new _(this._queryRunner,x,this._configurationService,this.logService),N||this._future.handleDone(new Error((0,t.localize)(1,null))).catch(F=>(0,d.onUnexpectedError)(F)),this._future}getCodeWithoutCellMagic(R){let M=Array.isArray(R.code)?R.code.join(""):R.code,N=M.indexOf(this.textResourcePropertiesService.getEOL(o.URI.file(this._path))),P=M.substring(0,N>=0?N:0).trimLeft();if(P.startsWith("%%")){M=M.substring(N,M.length);let x=(0,c.tryMatchCellMagic)(P);if(x){let F=this._magicToExecutorMap.get(x.toLowerCase());F&&(M=F.convertToExternalScript(M))}}return M}requestComplete(R){let M={};return Promise.resolve(M)}interrupt(){return this._queryRunner.cancelQuery().then(R=>{})}restart(){return Promise.reject((0,t.localize)(2,null))}addQueryEventListeners(R){this._register(R.onQueryEnd(()=>{this.queryComplete().catch(M=>{this._errorMessageService.showDialog(T.default.Error,e.sqlKernelError,M)})})),this._register(R.onMessage(M=>{for(const N of M)this._future&&(0,s.isUndefinedOrNull)(N.range)&&this._future.handleMessage(N)})),this._register(R.onResultSet(M=>{this._future&&this._future.handleResultSet(M)})),this._register(R.onResultSetUpdate(M=>{this._future&&this._future.handleResultSetUpdate(M)})),this._register(R.onBatchEnd(M=>{this._future&&this._future.handleBatchEnd(M)}))}async queryComplete(){this._future&&await this._future.handleDone()}async disconnect(){if(this._connectionPath&&this._connectionManagementService.isConnected(this._connectionPath))try{await this._connectionManagementService.disconnect(this._connectionPath)}catch(R){this.logService.error(R)}}};I=g=fe([O(1,b.IConnectionManagementService),O(2,r.ICapabilitiesService),O(3,D.IInstantiationService),O(4,m.IErrorMessageService),O(5,a.IConfigurationService),O(6,i.ILogService),O(7,n.ITextResourcePropertiesService)],I);class _ extends v.Disposable{constructor(R,M,N,P){super(),this._queryRunner=R,this._executionCount=M,this.logService=P,this.doneDeferred=new f.Deferred,this.configuredMaxRows=e.MAX_ROWS,this._outputAddedPromises=[],this._errorOccurred=!1,this._stopOnError=!0,this._lastRowCountMap=new Map,this._dataToSaveMap=new Map,this._rowsMap=new Map;let x=N.getValue(e.NotebookConfigSectionName);if(x){let F=x[e.MaxTableRowsConfigName]?x[e.MaxTableRowsConfigName]:void 0;F&&F>0&&(this.configuredMaxRows=F),this._stopOnError=!!x[e.SqlStopOnErrorConfigName]}}get inProgress(){return this._queryRunner?!this._queryRunner.hasCompleted:!1}set inProgress(R){this._queryRunner&&!R&&this._queryRunner.cancelQuery().catch(M=>(0,d.onUnexpectedError)(M))}get msg(){return this._msg}get done(){return this.doneDeferred.promise}async handleDone(R){this._outputAddedPromises&&this._outputAddedPromises.length>0&&await Promise.all(this._outputAddedPromises).catch(N=>{});let M={channel:"shell",type:"execute_reply",content:{status:this._errorOccurred&&this._stopOnError?"error":"ok",execution_count:this._executionCount},header:void 0,metadata:{},parent_header:void 0};this._msg=M,this.doneHandler&&this.doneHandler.handle(M),this.doneDeferred.resolve(M)}sendInputReply(R){}setReplyHandler(R){}setStdInHandler(R){}handleMessage(R){if(this.ioHandler){let M;typeof R=="string"?M=this.convertToDisplayMessage(R):R.isError?M=this.convertToError(R):M=this.convertToDisplayMessage(R),M&&this.ioHandler.handle(M)}}handleResultSet(R){let M;Array.isArray(R)?M=R?.splice(0):M=[R];for(let N of M){let P=N.batchId+"-"+N.id;this._lastRowCountMap.set(P,0);let x={"application/vnd.dataresource+json":this.convertHeaderToDataResource(N.columnInfo),"text/html":this.convertHeaderToHtmlTable(N.columnInfo)};this._dataToSaveMap.set(P,x),this._rowsMap.set(P,[]),this.sendIOPubMessage(x,N),N.rowCount>0&&this.handleResultSetUpdate(N)}}handleResultSetUpdate(R){let M;Array.isArray(R)?M=R?.splice(0):M=[R];for(let N of M){N.rowCount>this.configuredMaxRows&&(N.rowCount=this.configuredMaxRows);let P=N.batchId+"-"+N.id;N.rowCount!==this._lastRowCountMap.get(P)&&(this._outputAddedPromises.push(this.queryAndConvertData(N,this._lastRowCountMap.get(P))),this._lastRowCountMap.set(P,N.rowCount))}}handleBatchEnd(R){if(this.ioHandler)for(let M of R.resultSetSummaries)M.rowCount>this.configuredMaxRows&&this.handleMessage((0,t.localize)(3,null,this.configuredMaxRows))}async queryAndConvertData(R,M){try{let N=R.batchId+"-"+R.id,P=await this._queryRunner.getQueryRows(M,R.rowCount-M,R.batchId,R.id);this.sendIOPubUpdateMessage(P.rows,R);let x=this._rowsMap.get(N);this._rowsMap.set(N,x.concat(P.rows));let F=this.convertRowsToDataResource(R.columnInfo,P.rows),V=this._dataToSaveMap.get(N);V["application/vnd.dataresource+json"].data=V["application/vnd.dataresource+json"].data.concat(F);let W=this.convertRowsToHtml(P.rows,N);V["text/html"].splice(V["text/html"].length-1,0,...W),this._dataToSaveMap.set(N,V),this.sendIOPubMessage(V,R)}catch(N){this.logService.error(`Error outputting result sets from Notebook query: ${N}`)}}sendIOPubMessage(R,M){let N={channel:"iopub",type:"iopub",header:{msg_id:void 0,msg_type:"execute_result"},content:{output_type:"execute_result",metadata:void 0,execution_count:this._executionCount,data:R},metadata:{batchId:M.batchId,id:M.id},parent_header:void 0};this.ioHandler.handle(N)}sendIOPubUpdateMessage(R,M){let N={channel:"iopub",type:"iopub",header:{msg_id:void 0,msg_type:"execute_result_update"},content:{output_type:"execute_result_update",resultSet:M,data:R},metadata:void 0,parent_header:void 0};this.ioHandler?.handle(N)}setIOPubHandler(R){this.ioHandler=R}registerMessageHook(R){}removeMessageHook(R){}convertHeaderToDataResource(R){let M=[];return R.forEach(P=>{M.push({name:(0,h.escape)(P.columnName)})}),{schema:{fields:M},data:[]}}convertHeaderToHtmlTable(R){let M=new Array(3);if(M[0]="<table>",R.length>0){let N="<tr>";for(let P of R)N+=`<th>${(0,h.escape)(P.columnName)}</th>`;N+="</tr>",M[1]=N}return M[2]="</table>",M}convertRowsToDataResource(R,M){return M.map(N=>{let P={};return N.forEach((x,F)=>{let V=R[F].columnName;P[V]=x.displayValue}),P})}convertRowsToHtml(R,M){let N=[];for(const P of R){let x="<tr>";for(let F=0;F<P.length;F++)x+=`<td>${(0,h.escape)(P[F].displayValue)}</td>`;x+="</tr>",N.push(x)}return N}convertToDisplayMessage(R){if(R){let M=typeof R=="string"?R:R.message;return{channel:"iopub",type:"iopub",header:{msg_id:void 0,msg_type:"display_data"},content:{output_type:"display_data",data:{"text/html":M},metadata:{}},metadata:void 0,parent_header:void 0}}}convertToError(R){if(this._errorOccurred=!0,R){let M=typeof R=="string"?R:R.message;return{channel:"iopub",type:"iopub",header:{msg_id:void 0,msg_type:"error"},content:{output_type:"error",evalue:M,ename:"",traceback:[]},metadata:void 0,parent_header:void 0}}}}e.SQLFuture=_;function A(L,R){let M=new Set(R);return Object.keys(L).every(N=>M.has(N))}e.rowHasColumnNameKeys=A;class k{constructor(R){this.language=R}convertToExternalScript(R){return`execute sp_execute_external_script @language = N'${this.language}', @script = N'${R}' `}}}),define(Q[3702],Y([1,0,256,187,272,653,201,948,1106,819,818,143,101]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderDataResource=void 0;function r(o){let{host:u,source:d}=o,p=JSON.parse(d);for(;u.firstChild;)u.removeChild(u.firstChild);let c=document.createElement("div");c.className="notebook-cellTable";const l=14;let n=new t.TableDataView,g=p.schema.fields.map(k=>k.name),w=s(g),E=new D.RowNumberColumn;w.unshift(E.getColumnDefinition());let C=i(p.data,w);n.push(C);let I=new y.Table(c,o.accessibilityService,o.quickInputService,a.defaultTableStyles,{dataProvider:n,columns:w},{rowHeight:h.RESULTS_GRID_DEFAULTS.rowHeight,forceFitColumns:!1,defaultColumnWidth:120});I.registerPlugin(E),I.registerPlugin(new v.MouseWheelSupport),I.registerPlugin(new m.AutoColumnSize({autoSizeOnRender:!0})),I.registerPlugin(new S.AdditionalKeyBindings);let _=I.grid.getDataLength(),A=(_+1)*h.RESULTS_GRID_DEFAULTS.rowHeight+l+_;return _===0?c.style.height="100%":c.style.height=A>=500?"500px":A.toString()+"px",u.appendChild(c),I.resizeCanvas(),Promise.resolve(void 0)}e.renderDataResource=r;function i(o,u){let d=(0,f.rowHasColumnNameKeys)(o[0],u.map(p=>p.name));return o.map(p=>{let c={};return Object.keys(p).forEach((l,n)=>{let g=u[n+1].field,w=d?g:n+1,E=String(p[w]);c[g]={displayValue:E,ariaLabel:(0,T.escape)(E),isNull:!1}}),c})}function s(o){return o.map((u,d)=>({name:u,id:u,field:d.toString(),formatter:b.textFormatter}))}}),define(Q[3703],Y([1,0,2283,183,3702]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenderedIPyWidget=e.RenderedDataResource=e.RenderedJavaScript=e.RenderedText=e.RenderedSVG=e.RenderedImage=e.RenderedHTML=e.RenderedHTMLCommon=e.RenderedCommon=void 0;class D{constructor(s){this.cachedClasses=[],this.mimeType=s.mimeType,this.sanitizer=s.sanitizer,this.resolver=s.resolver,this.linkHandler=s.linkHandler,this.latexTypesetter=s.latexTypesetter}get node(){return this._node}set node(s){this._node=s,s.dataset.mimeType=this.mimeType,this._node.classList.add(...this.cachedClasses),this.cachedClasses=[]}toggleClass(s,o){o?this.addClass(s):this.removeClass(s)}addClass(s){this._node?this._node.classList.contains(s)||this._node.classList.add(s):this.cachedClasses.push(s)}removeClass(s){this._node?this._node.classList.contains(s)&&this._node.classList.remove(s):this.cachedClasses=this.cachedClasses.filter(o=>o!==s)}renderModel(s){return this.toggleClass("jp-mod-trusted",s.trusted),this.render(s)}}e.RenderedCommon=D;class T extends D{constructor(s){super(s),this.addClass("jp-RenderedHTMLCommon")}}e.RenderedHTMLCommon=T;class f extends T{constructor(s){super(s),this.addClass("jp-RenderedHTML")}render(s){return t.renderHTML({host:this.node,source:String(s.data[this.mimeType]),trusted:s.trusted,resolver:this.resolver,sanitizer:this.sanitizer,linkHandler:this.linkHandler,shouldTypeset:!0,latexTypesetter:this.latexTypesetter})}}e.RenderedHTML=f;class v extends D{constructor(s){super(s),this.addClass("jp-RenderedImage")}render(s){let o=s.metadata[this.mimeType];return t.renderImage({host:this.node,mimeType:this.mimeType,source:String(s.data[this.mimeType]),width:o&&o.width,height:o&&o.height,needsBackground:s.metadata.needs_background,unconfined:o&&o.unconfined})}}e.RenderedImage=v;class m extends D{constructor(s){super(s),this.addClass("jp-RenderedSVG")}render(s){let o=s.metadata[this.mimeType];return t.renderSVG({host:this.node,source:String(s.data[this.mimeType]),trusted:s.trusted,unconfined:o&&o.unconfined})}}e.RenderedSVG=m;class S extends D{constructor(s){super(s),this.addClass("jp-RenderedText")}render(s){return t.renderText({host:this.node,source:String(s.data[this.mimeType])})}}e.RenderedText=S;class h extends D{constructor(s){super(s),this.addClass("jp-RenderedJavaScript")}render(s){return t.renderText({host:this.node,source:"JavaScript output is disabled in Notebooks"})}}e.RenderedJavaScript=h;class a extends D{constructor(s){super(s),this.addClass("jp-RenderedDataResource")}render(s){return b.renderDataResource({host:this.node,source:JSON.stringify(s.data[this.mimeType]),themeService:s.themeService,accessibilityService:s.accessibilityService,quickInputService:s.quickInputService})}}e.RenderedDataResource=a;class r extends D{constructor(s){super(s),this.addClass("jp-RenderedIPyWidget")}render(s){let o=new y.Deferred;return o.resolve(),o.promise}}e.RenderedIPyWidget=r}),define(Q[3704],Y([1,0,3703,205]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.standardRendererFactories=e.ipywidgetFactory=e.dataResourceRendererFactory=e.javaScriptRendererFactory=e.textRendererFactory=e.svgRendererFactory=e.imageRendererFactory=e.htmlRendererFactory=void 0,e.htmlRendererFactory={safe:!0,mimeTypes:["text/html"],defaultRank:50,createRenderer:b=>new t.RenderedHTML(b)},e.imageRendererFactory={safe:!0,mimeTypes:y.ImageMimeTypes,defaultRank:90,createRenderer:b=>new t.RenderedImage(b)},e.svgRendererFactory={safe:!1,mimeTypes:["image/svg+xml"],defaultRank:80,createRenderer:b=>new t.RenderedSVG(b)},e.textRendererFactory={safe:!0,mimeTypes:["text/plain","application/vnd.jupyter.stdout","application/vnd.jupyter.stderr"],defaultRank:120,createRenderer:b=>new t.RenderedText(b)},e.javaScriptRendererFactory={safe:!1,mimeTypes:["text/javascript","application/javascript"],defaultRank:110,createRenderer:b=>new t.RenderedJavaScript(b)},e.dataResourceRendererFactory={safe:!0,mimeTypes:["application/vnd.dataresource+json","application/vnd.dataresource"],defaultRank:40,createRenderer:b=>new t.RenderedDataResource(b)},e.ipywidgetFactory={safe:!1,mimeTypes:["application/vnd.jupyter.widget-view","application/vnd.jupyter.widget-view+json"],defaultRank:45,createRenderer:b=>new t.RenderedIPyWidget(b)},e.standardRendererFactories=[e.htmlRendererFactory,e.svgRendererFactory,e.imageRendererFactory,e.javaScriptRendererFactory,e.textRendererFactory,e.dataResourceRendererFactory,e.ipywidgetFactory]}),define(Q[3705],Y([1,0,130,948]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SqlExecuteManager=void 0;class b{constructor(T){this._sessionManager=new y.SqlSessionManager(T)}get providerId(){return t.SQL_NOTEBOOK_PROVIDER}get serverManager(){}get sessionManager(){return this._sessionManager}}e.SqlExecuteManager=b}),define(Q[3706],Y([1,0,130,3705]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SqlExecuteProvider=void 0;class b{constructor(T){this.manager=new y.SqlExecuteManager(T)}get providerId(){return t.SQL_NOTEBOOK_PROVIDER}getExecuteManager(T){return Promise.resolve(this.manager)}handleNotebookClosed(T){}}e.SqlExecuteProvider=b}),define(Q[3707],Y([1,0,1024,3699,2241,5,11,6,33,17,23,63,3700,251]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QueryModelService=e.QueryInfo=void 0;const i=100;class s{constructor(){this.queryEventQueue=[],this.batchRanges=[],this.dataServiceReady=!1}set uri(d){this.queryRunner&&(this.queryRunner.uri=d),this.dataService&&(this.dataService.uri=d)}}e.QueryInfo=s;let o=class{get onRunQueryStart(){return this._onRunQueryStart.event}get onRunQueryUpdate(){return this._onRunQueryUpdate.event}get onRunQueryComplete(){return this._onRunQueryComplete.event}get onQueryEvent(){return this._onQueryEvent.event}get onEditSessionReady(){return this._onEditSessionReady.event}get onCellSelectionChanged(){return this._onCellSelectionChangedEmitter.event}get onConnectionIdUpdated(){return this._onConnectionIdAvailableEmitter.event}constructor(d,p,c,l){this.queryManagementService=d,this._instantiationService=p,this._notificationService=c,this._logService=l,this._onCellSelectionChangedEmitter=new f.Emitter,this._queryInfoMap=new Map,this._onRunQueryStart=new f.Emitter,this._onRunQueryUpdate=new f.Emitter,this._onRunQueryComplete=new f.Emitter,this._onQueryEvent=new f.Emitter,this._onEditSessionReady=new f.Emitter,this._onConnectionIdAvailableEmitter=new f.Emitter}getDataService(d){let p;if(this._queryInfoMap.has(d)&&(p=this._getQueryInfo(d).dataService),!p)throw new Error("Could not find data service for uri: "+d);return p}notifyCellSelectionChanged(d){this._onCellSelectionChangedEmitter.fire(d)}refreshResultsets(d){this._fireGridContentEvent(d,t.RefreshContents)}resizeResultsets(d){this._fireGridContentEvent(d,t.ResizeContents)}sendGridContentEvent(d,p){this._fireGridContentEvent(d,p)}onLoaded(d){if(this._queryInfoMap.has(d)){let p=this._getQueryInfo(d);p.dataServiceReady=!0,this._sendQueuedEvents(d)}}getQueryRows(d,p,c,l,n){return this._queryInfoMap.has(d)?this._getQueryInfo(d).queryRunner.getQueryRowsPaged(p,c,l,n).then(g=>g):Promise.resolve(void 0)}getEditRows(d,p,c){return this._queryInfoMap.has(d)?this._queryInfoMap.get(d).queryRunner.getEditRows(p,c).then(l=>l):Promise.resolve(void 0)}async copyResults(d,p,c,l,n){if(this._queryInfoMap.has(d))return this._queryInfoMap.get(d).queryRunner.copyResults(p,c,l,n)}showCommitError(d){this._notificationService.notify({severity:h.default.Error,message:b.localize(0,null)+d})}isRunningQuery(d){return this._queryInfoMap.has(d)?this._getQueryInfo(d).queryRunner.isExecuting:!1}async runQuery(d,p,c){return this.doRunQuery(d,p,!1,c)}async runQueryStatement(d,p){return this.doRunQuery(d,p,!0)}async runQueryString(d,p){return this.doRunQuery(d,p,!0)}async doRunQuery(d,p,c,l){let n,g;if(this._queryInfoMap.has(d)){g=this._getQueryInfo(d);let w=g.queryRunner;if(w.isExecuting)return;n=w,g.batchRanges=[],g.selectionSnippet=void 0}else g=this.initQueryRunner(d),n=g.queryRunner;return m.isString(p)?(p.length<i?g.selectionSnippet=p:g.selectionSnippet=p.substring(0,i-3)+"...",n.runQuery(p,l)):c?n.runQueryStatement(p):n.runQuery(p,l)}initQueryRunner(d){let p=this._instantiationService.createInstance(a.default,d),c=new s;return p.onResultSet(l=>{this._fireQueryEvent(p.uri,"resultSet",l)}),p.onBatchStart(l=>{let n,g=b.localize(1,null);l.range&&(c.selectionSnippet?g=b.localize(2,null,c.selectionSnippet):n={text:v.format(b.localize(3,null),l.range.startLineNumber)},c.batchRanges.push(l.range));let w={message:g,batchId:l.id,isError:!1,time:new Date().toLocaleTimeString(),link:n};this._fireQueryEvent(p.uri,"message",w)}),p.onMessage(l=>{this._fireQueryEvent(p.uri,"message",l)}),p.onQueryEnd(l=>{this._onRunQueryComplete.fire(p.uri);let n={type:"queryStop",uri:p.uri,queryInfo:{batchRanges:c.batchRanges,messages:c.queryRunner.messages}};this._onQueryEvent.fire(n),this._fireQueryEvent(p.uri,"complete",l)}),p.onQueryStart(()=>{this._onRunQueryStart.fire(p.uri);let l={type:"queryStart",uri:p.uri,queryInfo:{batchRanges:c.batchRanges,messages:c.queryRunner.messages}};this._onQueryEvent.fire(l),this._fireQueryEvent(p.uri,"start")}),p.onResultSetUpdate(()=>{this._onRunQueryUpdate.fire(p.uri);let l={type:"queryUpdate",uri:p.uri,queryInfo:{batchRanges:c.batchRanges,messages:c.queryRunner.messages}};this._onQueryEvent.fire(l),this._fireQueryEvent(p.uri,"update")}),p.onQueryPlanAvailable(l=>{let n={type:"executionPlan",uri:l.fileUri,queryInfo:{batchRanges:c.batchRanges,messages:c.queryRunner.messages},params:l};this._onQueryEvent.fire(n)}),p.onExecutionPlanAvailable(l=>{let n={type:"executionPlan",uri:l.fileUri,queryInfo:{batchRanges:c.batchRanges,messages:c.queryRunner.messages},params:l.planGraphs};this._onQueryEvent.fire(n)}),p.onVisualize(l=>{let n={type:"visualize",uri:p.uri,queryInfo:{batchRanges:c.batchRanges,messages:c.queryRunner.messages},params:l};this._onQueryEvent.fire(n)}),p.onConnectionIdUpdated(l=>{this._onConnectionIdAvailableEmitter.fire(l)}),c.queryRunner=p,c.dataService=this._instantiationService.createInstance(y.DataService,p.uri),this._queryInfoMap.set(p.uri,c),c}cancelQuery(d){let p;typeof d=="string"?this._queryInfoMap.has(d)&&(p=this._getQueryInfo(d).queryRunner):p=d,!(p===void 0||!p.isExecuting)&&p.cancelQuery().then(c=>{},c=>{this._notificationService.notify({severity:h.default.Error,message:v.format(b.localize(4,null),c)}),this._fireQueryEvent(p.uri,"complete",0)})}async disposeQuery(d){let p=this.internalGetQueryRunner(d);p&&await p.disposeQuery(),this._queryInfoMap.has(d)&&this._queryInfoMap.delete(d)}async changeConnectionUri(d,p){if(this._queryInfoMap.has(d))throw this._logService.error(`New URI '${d}' already has query info associated with it.`),new Error(b.localize(5,null,d));await this.queryManagementService.changeConnectionUri(d,p);let c=this._queryInfoMap.get(p);c&&(c.uri=d,this._queryInfoMap.set(d,c),this._queryInfoMap.delete(p))}async initializeEdit(d,p,c,l,n,g){let w,E;if(this._queryInfoMap.has(d)){E=this._getQueryInfo(d);let C=E.queryRunner;if(C.isExecuting)return;w=C}else{E=new s,w=this._instantiationService.createInstance(a.default,d);const C="resultSet";w.onResultSet(I=>{this._fireQueryEvent(d,C,I)}),w.onResultSetUpdate(I=>{this._fireQueryEvent(d,C,I)}),w.onBatchStart(I=>{let _,A=b.localize(6,null);I.range&&(E.selectionSnippet?A=b.localize(7,null,E.selectionSnippet):_={text:v.format(b.localize(8,null),I.range.startLineNumber)});let k={message:A,batchId:I.id,isError:!1,time:new Date().toLocaleTimeString(),link:_};this._fireQueryEvent(d,"message",k)}),w.onMessage(I=>{this._fireQueryEvent(d,"message",I)}),w.onQueryEnd(I=>{this._onRunQueryComplete.fire(d);let _={type:"queryStop",uri:d,queryInfo:{batchRanges:E.batchRanges,messages:E.queryRunner.messages}};this._onQueryEvent.fire(_),this._fireQueryEvent(d,"complete",I)}),w.onQueryStart(()=>{this._onRunQueryStart.fire(d);let I={type:"queryStart",uri:d,queryInfo:{batchRanges:E.batchRanges,messages:E.queryRunner.messages}};this._onQueryEvent.fire(I),this._fireQueryEvent(d,"start")}),w.onEditSessionReady(I=>{this._onEditSessionReady.fire(I),this._fireQueryEvent(I.ownerUri,"editSessionReady")}),E.queryRunner=w,E.dataService=this._instantiationService.createInstance(y.DataService,d),this._queryInfoMap.set(d,E)}return g&&(g.length<i?E.selectionSnippet=g:E.selectionSnippet=g.substring(0,i-3)+"..."),w.initializeEdit(d,p,c,l,n,g)}cancelInitializeEdit(d){}disposeEdit(d){let p=this.internalGetQueryRunner(d);return p?p.disposeEdit(d):Promise.resolve()}updateCell(d,p,c,l){let n=this.internalGetQueryRunner(d);return n?n.updateCell(d,p,c,l).then(g=>g,g=>(this._notificationService.notify({severity:h.default.Error,message:b.localize(9,null)+g.message}),Promise.reject(g))):Promise.resolve(void 0)}commitEdit(d){let p=this.internalGetQueryRunner(d);return p?p.commitEdit(d).then(()=>{},c=>(this._notificationService.notify({severity:h.default.Error,message:b.localize(10,null)+c.message}),Promise.reject(c))):Promise.resolve()}createRow(d){let p=this.internalGetQueryRunner(d);return p?p.createRow(d):Promise.resolve(void 0)}deleteRow(d,p){let c=this.internalGetQueryRunner(d);return c?c.deleteRow(d,p):Promise.resolve()}revertCell(d,p,c){let l=this.internalGetQueryRunner(d);return l?l.revertCell(d,p,c):Promise.resolve(void 0)}revertRow(d,p){let c=this.internalGetQueryRunner(d);return c?c.revertRow(d,p):Promise.resolve()}getQueryRunner(d){let p;return this._queryInfoMap.has(d)&&(p=this._getQueryInfo(d).queryRunner),p}internalGetQueryRunner(d){let p;return this._queryInfoMap.has(d)&&(this._getQueryInfo(d).queryRunner.isExecuting||(p=this._getQueryInfo(d).queryRunner)),p}_fireGridContentEvent(d,p){let c=this._getQueryInfo(d);if(c&&c.dataServiceReady){let l=this.getDataService(d);l&&l.fireGridContent(p)}}_fireQueryEvent(d,p,c){let l=this._getQueryInfo(d);if(l&&l.dataServiceReady)this.getDataService(d).fireQueryEvent({type:p,data:c});else if(l){let n={type:p,data:c};l.queryEventQueue.push(n)}}_sendQueuedEvents(d){let p=this._getQueryInfo(d);for(;p&&p.queryEventQueue.length>0;){let c=p.queryEventQueue.shift();this._fireQueryEvent(d,c.type,c.data)}}_getQueryInfo(d){return this._queryInfoMap.get(d)}};e.QueryModelService=o,e.QueryModelService=o=fe([O(0,r.IQueryManagementService),O(1,D.IInstantiationService),O(2,S.INotificationService),O(3,T.ILogService)],o)}),define(Q[1339],Y([1,0,20,62,365,202,110,69,340,186,197,42,17,10,27,99,154,3648,47,71,235,312,21,732]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalQuickFix=e.ChatVariableLevel=e.ChatVariable=e.ChatMessageRole=e.ChatMessage=e.ChatFollowup=e.ChatReplyFollowup=e.DataTransfer=e.DataTransferItem=e.ViewBadge=e.TypeHierarchyItem=e.CodeActionTriggerKind=e.TestCoverage=e.TestResults=e.TestItem=e.TestTag=e.TestMessage=e.NotebookRendererScript=e.NotebookDocumentContentOptions=e.NotebookKernelSourceAction=e.NotebookStatusBarItem=e.NotebookExclusiveDocumentPattern=e.NotebookCellOutput=e.NotebookCellOutputItem=e.NotebookCellData=e.NotebookData=e.NotebookCellKind=e.NotebookCellExecutionState=e.NotebookCellExecutionSummary=e.NotebookRange=e.MappedEditsContext=e.LanguageSelector=e.GlobPattern=e.TextEditorOpenOptions=e.FoldingRangeKind=e.FoldingRange=e.ProgressLocation=e.EndOfLine=e.TextEditorLineNumbersStyle=e.TextDocumentSaveReason=e.SelectionRange=e.Color=e.ColorPresentation=e.DocumentLink=e.InlayHintKind=e.InlayHintLabelPart=e.InlayHint=e.SignatureHelp=e.SignatureInformation=e.ParameterInformation=e.CompletionItem=e.CompletionItemKind=e.CompletionItemTag=e.CompletionContext=e.CompletionTriggerKind=e.DocumentHighlight=e.InlineValueContext=e.InlineValue=e.EvaluatableExpression=e.Hover=e.DefinitionLink=e.location=e.CallHierarchyOutgoingCall=e.CallHierarchyIncomingCall=e.CallHierarchyItem=e.DocumentSymbol=e.WorkspaceSymbol=e.SymbolTag=e.SymbolKind=e.WorkspaceEdit=e.TextEdit=e.DecorationRenderOptions=e.DecorationRangeBehavior=e.ThemableDecorationRenderOptions=e.ThemableDecorationAttachmentRenderOptions=e.pathOrURIToURI=e.fromRangeOrRangeWithMessage=e.MarkdownString=e.isDecorationOptionsArr=e.ViewColumn=e.DiagnosticSeverity=e.DiagnosticRelatedInformation=e.Diagnostic=e.DiagnosticTag=e.DocumentSelector=e.Position=e.TokenType=e.Range=e.Selection=void 0;var w;(function($e){function Qe(Ke){const{selectionStartLineNumber:ht,selectionStartColumn:Tt,positionLineNumber:Ft,positionColumn:Pt}=Ke,$t=new g.Position(ht-1,Tt-1),Wt=new g.Position(Ft-1,Pt-1);return new g.Selection($t,Wt)}$e.to=Qe;function Ye(Ke){const{anchor:ht,active:Tt}=Ke;return{selectionStartLineNumber:ht.line+1,selectionStartColumn:ht.character+1,positionLineNumber:Tt.line+1,positionColumn:Tt.character+1}}$e.from=Ye})(w||(e.Selection=w={}));var E;(function($e){function Qe(Ke){if(!Ke)return;const{start:ht,end:Tt}=Ke;return{startLineNumber:ht.line+1,startColumn:ht.character+1,endLineNumber:Tt.line+1,endColumn:Tt.character+1}}$e.from=Qe;function Ye(Ke){if(!Ke)return;const{startLineNumber:ht,startColumn:Tt,endLineNumber:Ft,endColumn:Pt}=Ke;return new g.Range(ht-1,Tt-1,Ft-1,Pt-1)}$e.to=Ye})(E||(e.Range=E={}));var C;(function($e){function Qe(Ye){switch(Ye){case 1:return g.StandardTokenType.Comment;case 0:return g.StandardTokenType.Other;case 3:return g.StandardTokenType.RegEx;case 2:return g.StandardTokenType.String}}$e.to=Qe})(C||(e.TokenType=C={}));var I;(function($e){function Qe(Ke){return new g.Position(Ke.lineNumber-1,Ke.column-1)}$e.to=Qe;function Ye(Ke){return{lineNumber:Ke.line+1,column:Ke.character+1}}$e.from=Ye})(I||(e.Position=I={}));var _;(function($e){function Qe(ht,Tt,Ft){return(0,t.coalesce)((0,t.asArray)(ht).map(Pt=>Ye(Pt,Tt,Ft)))}$e.from=Qe;function Ye(ht,Tt,Ft){if(typeof ht=="string")return{$serialized:!0,language:ht,isBuiltin:Ft?.isBuiltin};if(ht)return{$serialized:!0,language:ht.language,scheme:Ke(ht.scheme,Tt),pattern:ke.from(ht.pattern)??void 0,exclusive:ht.exclusive,notebookType:ht.notebookType,isBuiltin:Ft?.isBuiltin}}function Ke(ht,Tt){return Tt&&typeof ht=="string"?Tt.transformOutgoingScheme(ht):ht}})(_||(e.DocumentSelector=_={}));var A;(function($e){function Qe(Ke){switch(Ke){case g.DiagnosticTag.Unnecessary:return 1;case g.DiagnosticTag.Deprecated:return 2}}$e.from=Qe;function Ye(Ke){switch(Ke){case 1:return g.DiagnosticTag.Unnecessary;case 2:return g.DiagnosticTag.Deprecated;default:return}}$e.to=Ye})(A||(e.DiagnosticTag=A={}));var k;(function($e){function Qe(Ke){let ht;return Ke.code&&((0,a.isString)(Ke.code)||(0,a.isNumber)(Ke.code)?ht=String(Ke.code):ht={value:String(Ke.code.value),target:Ke.code.target}),{...E.from(Ke.range),message:Ke.message,source:Ke.source,code:ht,severity:R.from(Ke.severity),relatedInformation:Ke.relatedInformation&&Ke.relatedInformation.map(L.from),tags:Array.isArray(Ke.tags)?(0,t.coalesce)(Ke.tags.map(A.from)):void 0}}$e.from=Qe;function Ye(Ke){const ht=new g.Diagnostic(E.to(Ke),Ke.message,R.to(Ke.severity));return ht.source=Ke.source,ht.code=(0,a.isString)(Ke.code)?Ke.code:Ke.code?.value,ht.relatedInformation=Ke.relatedInformation&&Ke.relatedInformation.map(L.to),ht.tags=Ke.tags&&(0,t.coalesce)(Ke.tags.map(A.to)),ht}$e.to=Ye})(k||(e.Diagnostic=k={}));var L;(function($e){function Qe(Ke){return{...E.from(Ke.location.range),message:Ke.message,resource:Ke.location.uri}}$e.from=Qe;function Ye(Ke){return new g.DiagnosticRelatedInformation(new g.Location(Ke.resource,E.to(Ke)),Ke.message)}$e.to=Ye})(L||(e.DiagnosticRelatedInformation=L={}));var R;(function($e){function Qe(Ke){switch(Ke){case g.DiagnosticSeverity.Error:return o.MarkerSeverity.Error;case g.DiagnosticSeverity.Warning:return o.MarkerSeverity.Warning;case g.DiagnosticSeverity.Information:return o.MarkerSeverity.Info;case g.DiagnosticSeverity.Hint:return o.MarkerSeverity.Hint}return o.MarkerSeverity.Error}$e.from=Qe;function Ye(Ke){switch(Ke){case o.MarkerSeverity.Info:return g.DiagnosticSeverity.Information;case o.MarkerSeverity.Warning:return g.DiagnosticSeverity.Warning;case o.MarkerSeverity.Error:return g.DiagnosticSeverity.Error;case o.MarkerSeverity.Hint:return g.DiagnosticSeverity.Hint;default:return g.DiagnosticSeverity.Error}}$e.to=Ye})(R||(e.DiagnosticSeverity=R={}));var M;(function($e){function Qe(Ke){return typeof Ke=="number"&&Ke>=g.ViewColumn.One?Ke-1:Ke===g.ViewColumn.Beside?n.SIDE_GROUP:n.ACTIVE_GROUP}$e.from=Qe;function Ye(Ke){if(typeof Ke=="number"&&Ke>=0)return Ke+1;throw new Error("invalid 'EditorGroupColumn'")}$e.to=Ye})(M||(e.ViewColumn=M={}));function N($e){return typeof $e.range<"u"}function P($e){return $e.length===0?!0:!!N($e[0])}e.isDecorationOptionsArr=P;var x;(function($e){function Qe(Pt){return Pt.map($e.from)}$e.fromMany=Qe;function Ye(Pt){return Pt&&typeof Pt=="object"&&typeof Pt.language=="string"&&typeof Pt.value=="string"}function Ke(Pt){let $t;if(Ye(Pt)){const{language:qe,value:dt}=Pt;$t={value:"```"+qe+` `+dt+"\n```\n"}}else g.MarkdownString.isMarkdownString(Pt)?$t={value:Pt.value,isTrusted:Pt.isTrusted,supportThemeIcons:Pt.supportThemeIcons,supportHtml:Pt.supportHtml,baseUri:Pt.baseUri}:typeof Pt=="string"?$t={value:Pt}:$t={value:""};const Wt=Object.create(null);$t.uris=Wt;const it=qe=>{try{let dt=r.URI.parse(qe,!0);dt=dt.with({query:ht(dt.query,Wt)}),Wt[qe]=dt}catch{}return""},ut=new v.marked.Renderer;return ut.link=it,ut.image=qe=>typeof qe=="string"?it(T.parseHrefAndDimensions(qe).href):"",(0,v.marked)($t.value,{renderer:ut}),$t}$e.from=Ke;function ht(Pt,$t){if(!Pt)return Pt;let Wt;try{Wt=(0,m.parse)(Pt)}catch{}if(!Wt)return Pt;let it=!1;return Wt=(0,h.cloneAndChange)(Wt,ut=>{if(r.URI.isUri(ut)){const qe=`__uri_${Math.random().toString(16).slice(2,8)}`;return $t[qe]=ut,it=!0,qe}else return}),it?JSON.stringify(Wt):Pt}function Tt(Pt){const $t=new g.MarkdownString(Pt.value,Pt.supportThemeIcons);return $t.isTrusted=Pt.isTrusted,$t.supportHtml=Pt.supportHtml,$t.baseUri=Pt.baseUri?r.URI.from(Pt.baseUri):void 0,$t}$e.to=Tt;function Ft(Pt){if(Pt)return typeof Pt=="string"?Pt:$e.from(Pt)}$e.fromStrict=Ft})(x||(e.MarkdownString=x={}));function F($e){return P($e)?$e.map(Qe=>({range:E.from(Qe.range),hoverMessage:Array.isArray(Qe.hoverMessage)?x.fromMany(Qe.hoverMessage):Qe.hoverMessage?x.from(Qe.hoverMessage):void 0,renderOptions:Qe.renderOptions})):$e.map(Qe=>({range:E.from(Qe)}))}e.fromRangeOrRangeWithMessage=F;function V($e){return typeof $e>"u"?$e:typeof $e=="string"?r.URI.file($e):$e}e.pathOrURIToURI=V;var W;(function($e){function Qe(Ye){return typeof Ye>"u"?Ye:{contentText:Ye.contentText,contentIconPath:Ye.contentIconPath?V(Ye.contentIconPath):void 0,border:Ye.border,borderColor:Ye.borderColor,fontStyle:Ye.fontStyle,fontWeight:Ye.fontWeight,textDecoration:Ye.textDecoration,color:Ye.color,backgroundColor:Ye.backgroundColor,margin:Ye.margin,width:Ye.width,height:Ye.height}}$e.from=Qe})(W||(e.ThemableDecorationAttachmentRenderOptions=W={}));var z;(function($e){function Qe(Ye){return typeof Ye>"u"?Ye:{backgroundColor:Ye.backgroundColor,outline:Ye.outline,outlineColor:Ye.outlineColor,outlineStyle:Ye.outlineStyle,outlineWidth:Ye.outlineWidth,border:Ye.border,borderColor:Ye.borderColor,borderRadius:Ye.borderRadius,borderSpacing:Ye.borderSpacing,borderStyle:Ye.borderStyle,borderWidth:Ye.borderWidth,fontStyle:Ye.fontStyle,fontWeight:Ye.fontWeight,textDecoration:Ye.textDecoration,cursor:Ye.cursor,color:Ye.color,opacity:Ye.opacity,letterSpacing:Ye.letterSpacing,gutterIconPath:Ye.gutterIconPath?V(Ye.gutterIconPath):void 0,gutterIconSize:Ye.gutterIconSize,overviewRulerColor:Ye.overviewRulerColor,before:Ye.before?W.from(Ye.before):void 0,after:Ye.after?W.from(Ye.after):void 0}}$e.from=Qe})(z||(e.ThemableDecorationRenderOptions=z={}));var B;(function($e){function Qe(Ye){if(typeof Ye>"u")return Ye;switch(Ye){case g.DecorationRangeBehavior.OpenOpen:return 0;case g.DecorationRangeBehavior.ClosedClosed:return 1;case g.DecorationRangeBehavior.OpenClosed:return 2;case g.DecorationRangeBehavior.ClosedOpen:return 3}}$e.from=Qe})(B||(e.DecorationRangeBehavior=B={}));var K;(function($e){function Qe(Ye){return{isWholeLine:Ye.isWholeLine,rangeBehavior:Ye.rangeBehavior?B.from(Ye.rangeBehavior):void 0,overviewRulerLane:Ye.overviewRulerLane,light:Ye.light?z.from(Ye.light):void 0,dark:Ye.dark?z.from(Ye.dark):void 0,backgroundColor:Ye.backgroundColor,outline:Ye.outline,outlineColor:Ye.outlineColor,outlineStyle:Ye.outlineStyle,outlineWidth:Ye.outlineWidth,border:Ye.border,borderColor:Ye.borderColor,borderRadius:Ye.borderRadius,borderSpacing:Ye.borderSpacing,borderStyle:Ye.borderStyle,borderWidth:Ye.borderWidth,fontStyle:Ye.fontStyle,fontWeight:Ye.fontWeight,textDecoration:Ye.textDecoration,cursor:Ye.cursor,color:Ye.color,opacity:Ye.opacity,letterSpacing:Ye.letterSpacing,gutterIconPath:Ye.gutterIconPath?V(Ye.gutterIconPath):void 0,gutterIconSize:Ye.gutterIconSize,overviewRulerColor:Ye.overviewRulerColor,before:Ye.before?W.from(Ye.before):void 0,after:Ye.after?W.from(Ye.after):void 0}}$e.from=Qe})(K||(e.DecorationRenderOptions=K={}));var H;(function($e){function Qe(Ke){return{text:Ke.newText,eol:Ke.newEol&&Oe.from(Ke.newEol),range:E.from(Ke.range)}}$e.from=Qe;function Ye(Ke){const ht=new g.TextEdit(E.to(Ke.range),Ke.text);return ht.newEol=typeof Ke.eol>"u"?void 0:Oe.to(Ke.eol),ht}$e.to=Ye})(H||(e.TextEdit=H={}));var U;(function($e){function Qe(Ke,ht){const Tt={edits:[]};if(Ke instanceof g.WorkspaceEdit){const Ft=new f.ResourceSet;for(const Pt of Ke._allEntries())Pt._type===1&&r.URI.isUri(Pt.to)&&Pt.from===void 0&&Ft.add(Pt.to);for(const Pt of Ke._allEntries())if(Pt._type===1){let $t;Pt.options?.contents&&(ArrayBuffer.isView(Pt.options.contents)?$t={type:"base64",value:(0,y.encodeBase64)(y.VSBuffer.wrap(Pt.options.contents))}:$t={type:"dataTransferItem",id:Pt.options.contents._itemId}),Tt.edits.push({oldResource:Pt.from,newResource:Pt.to,options:{...Pt.options,contents:$t},metadata:Pt.metadata})}else Pt._type===2?Tt.edits.push({resource:Pt.uri,textEdit:H.from(Pt.edit),versionId:Ft.has(Pt.uri)?void 0:ht?.getTextDocumentVersion(Pt.uri),metadata:Pt.metadata}):Pt._type===6?Tt.edits.push({resource:Pt.uri,textEdit:{range:E.from(Pt.range),text:Pt.edit.value,insertAsSnippet:!0},versionId:Ft.has(Pt.uri)?void 0:ht?.getTextDocumentVersion(Pt.uri),metadata:Pt.metadata}):Pt._type===3?Tt.edits.push({metadata:Pt.metadata,resource:Pt.uri,cellEdit:Pt.edit,notebookMetadata:Pt.notebookMetadata,notebookVersionId:ht?.getNotebookDocumentVersion(Pt.uri)}):Pt._type===5&&Tt.edits.push({metadata:Pt.metadata,resource:Pt.uri,notebookVersionId:ht?.getNotebookDocumentVersion(Pt.uri),cellEdit:{editType:1,index:Pt.index,count:Pt.count,cells:Pt.cells.map(Be.from)}})}return Tt}$e.from=Qe;function Ye(Ke){const ht=new g.WorkspaceEdit,Tt=new f.ResourceMap;for(const Ft of Ke.edits)if(Ft.textEdit){const Pt=Ft,$t=r.URI.revive(Pt.resource),Wt=E.to(Pt.textEdit.range),it=Pt.textEdit.text,ut=Pt.textEdit.insertAsSnippet;let qe;ut?qe=g.SnippetTextEdit.replace(Wt,new g.SnippetString(it)):qe=g.TextEdit.replace(Wt,it);const dt=Tt.get($t);dt?dt.push(qe):Tt.set($t,[qe])}else ht.renameFile(r.URI.revive(Ft.oldResource),r.URI.revive(Ft.newResource),Ft.options);for(const[Ft,Pt]of Tt)ht.set(Ft,Pt);return ht}$e.to=Ye})(U||(e.WorkspaceEdit=U={}));var G;(function($e){const Qe=Object.create(null);Qe[g.SymbolKind.File]=0,Qe[g.SymbolKind.Module]=1,Qe[g.SymbolKind.Namespace]=2,Qe[g.SymbolKind.Package]=3,Qe[g.SymbolKind.Class]=4,Qe[g.SymbolKind.Method]=5,Qe[g.SymbolKind.Property]=6,Qe[g.SymbolKind.Field]=7,Qe[g.SymbolKind.Constructor]=8,Qe[g.SymbolKind.Enum]=9,Qe[g.SymbolKind.Interface]=10,Qe[g.SymbolKind.Function]=11,Qe[g.SymbolKind.Variable]=12,Qe[g.SymbolKind.Constant]=13,Qe[g.SymbolKind.String]=14,Qe[g.SymbolKind.Number]=15,Qe[g.SymbolKind.Boolean]=16,Qe[g.SymbolKind.Array]=17,Qe[g.SymbolKind.Object]=18,Qe[g.SymbolKind.Key]=19,Qe[g.SymbolKind.Null]=20,Qe[g.SymbolKind.EnumMember]=21,Qe[g.SymbolKind.Struct]=22,Qe[g.SymbolKind.Event]=23,Qe[g.SymbolKind.Operator]=24,Qe[g.SymbolKind.TypeParameter]=25;function Ye(ht){return typeof Qe[ht]=="number"?Qe[ht]:6}$e.from=Ye;function Ke(ht){for(const Tt in Qe)if(Qe[Tt]===ht)return Number(Tt);return g.SymbolKind.Property}$e.to=Ke})(G||(e.SymbolKind=G={}));var $;(function($e){function Qe(Ke){switch(Ke){case g.SymbolTag.Deprecated:return 1}}$e.from=Qe;function Ye(Ke){switch(Ke){case 1:return g.SymbolTag.Deprecated}}$e.to=Ye})($||(e.SymbolTag=$={}));var ie;(function($e){function Qe(Ke){return{name:Ke.name,kind:G.from(Ke.kind),tags:Ke.tags&&Ke.tags.map($.from),containerName:Ke.containerName,location:te.from(Ke.location)}}$e.from=Qe;function Ye(Ke){const ht=new g.SymbolInformation(Ke.name,G.to(Ke.kind),Ke.containerName,te.to(Ke.location));return ht.tags=Ke.tags&&Ke.tags.map($.to),ht}$e.to=Ye})(ie||(e.WorkspaceSymbol=ie={}));var J;(function($e){function Qe(Ke){const ht={name:Ke.name||"!!MISSING: name!!",detail:Ke.detail,range:E.from(Ke.range),selectionRange:E.from(Ke.selectionRange),kind:G.from(Ke.kind),tags:Ke.tags?.map($.from)??[]};return Ke.children&&(ht.children=Ke.children.map(Qe)),ht}$e.from=Qe;function Ye(Ke){const ht=new g.DocumentSymbol(Ke.name,Ke.detail,G.to(Ke.kind),E.to(Ke.range),E.to(Ke.selectionRange));return(0,t.isNonEmptyArray)(Ke.tags)&&(ht.tags=Ke.tags.map($.to)),Ke.children&&(ht.children=Ke.children.map(Ye)),ht}$e.to=Ye})(J||(e.DocumentSymbol=J={}));var j;(function($e){function Qe(Ke){const ht=new g.CallHierarchyItem(G.to(Ke.kind),Ke.name,Ke.detail||"",r.URI.revive(Ke.uri),E.to(Ke.range),E.to(Ke.selectionRange));return ht._sessionId=Ke._sessionId,ht._itemId=Ke._itemId,ht}$e.to=Qe;function Ye(Ke,ht,Tt){if(ht=ht??Ke._sessionId,Tt=Tt??Ke._itemId,ht===void 0||Tt===void 0)throw new Error("invalid item");return{_sessionId:ht,_itemId:Tt,name:Ke.name,detail:Ke.detail,kind:G.from(Ke.kind),uri:Ke.uri,range:E.from(Ke.range),selectionRange:E.from(Ke.selectionRange),tags:Ke.tags?.map($.from)}}$e.from=Ye})(j||(e.CallHierarchyItem=j={}));var ee;(function($e){function Qe(Ye){return new g.CallHierarchyIncomingCall(j.to(Ye.from),Ye.fromRanges.map(Ke=>E.to(Ke)))}$e.to=Qe})(ee||(e.CallHierarchyIncomingCall=ee={}));var X;(function($e){function Qe(Ye){return new g.CallHierarchyOutgoingCall(j.to(Ye.to),Ye.fromRanges.map(Ke=>E.to(Ke)))}$e.to=Qe})(X||(e.CallHierarchyOutgoingCall=X={}));var te;(function($e){function Qe(Ke){return{range:Ke.range&&E.from(Ke.range),uri:Ke.uri}}$e.from=Qe;function Ye(Ke){return new g.Location(r.URI.revive(Ke.uri),E.to(Ke.range))}$e.to=Ye})(te||(e.location=te={}));var Z;(function($e){function Qe(Ke){const ht=Ke,Tt=Ke;return{originSelectionRange:ht.originSelectionRange?E.from(ht.originSelectionRange):void 0,uri:ht.targetUri?ht.targetUri:Tt.uri,range:E.from(ht.targetRange?ht.targetRange:Tt.range),targetSelectionRange:ht.targetSelectionRange?E.from(ht.targetSelectionRange):void 0}}$e.from=Qe;function Ye(Ke){return{targetUri:r.URI.revive(Ke.uri),targetRange:E.to(Ke.range),targetSelectionRange:Ke.targetSelectionRange?E.to(Ke.targetSelectionRange):void 0,originSelectionRange:Ke.originSelectionRange?E.to(Ke.originSelectionRange):void 0}}$e.to=Ye})(Z||(e.DefinitionLink=Z={}));var se;(function($e){function Qe(Ke){return{range:E.from(Ke.range),contents:x.fromMany(Ke.contents)}}$e.from=Qe;function Ye(Ke){return new g.Hover(Ke.contents.map(x.to),E.to(Ke.range))}$e.to=Ye})(se||(e.Hover=se={}));var re;(function($e){function Qe(Ke){return{range:E.from(Ke.range),expression:Ke.expression}}$e.from=Qe;function Ye(Ke){return new g.EvaluatableExpression(E.to(Ke.range),Ke.expression)}$e.to=Ye})(re||(e.EvaluatableExpression=re={}));var oe;(function($e){function Qe(Ke){if(Ke instanceof g.InlineValueText)return{type:"text",range:E.from(Ke.range),text:Ke.text};if(Ke instanceof g.InlineValueVariableLookup)return{type:"variable",range:E.from(Ke.range),variableName:Ke.variableName,caseSensitiveLookup:Ke.caseSensitiveLookup};if(Ke instanceof g.InlineValueEvaluatableExpression)return{type:"expression",range:E.from(Ke.range),expression:Ke.expression};throw new Error("Unknown 'InlineValue' type")}$e.from=Qe;function Ye(Ke){switch(Ke.type){case"text":return{range:E.to(Ke.range),text:Ke.text};case"variable":return{range:E.to(Ke.range),variableName:Ke.variableName,caseSensitiveLookup:Ke.caseSensitiveLookup};case"expression":return{range:E.to(Ke.range),expression:Ke.expression}}}$e.to=Ye})(oe||(e.InlineValue=oe={}));var le;(function($e){function Qe(Ke){return{frameId:Ke.frameId,stoppedLocation:E.from(Ke.stoppedLocation)}}$e.from=Qe;function Ye(Ke){return new g.InlineValueContext(Ke.frameId,E.to(Ke.stoppedLocation))}$e.to=Ye})(le||(e.InlineValueContext=le={}));var ne;(function($e){function Qe(Ke){return{range:E.from(Ke.range),kind:Ke.kind}}$e.from=Qe;function Ye(Ke){return new g.DocumentHighlight(E.to(Ke.range),Ke.kind)}$e.to=Ye})(ne||(e.DocumentHighlight=ne={}));var ce;(function($e){function Qe(Ye){switch(Ye){case 1:return g.CompletionTriggerKind.TriggerCharacter;case 2:return g.CompletionTriggerKind.TriggerForIncompleteCompletions;case 0:default:return g.CompletionTriggerKind.Invoke}}$e.to=Qe})(ce||(e.CompletionTriggerKind=ce={}));var ae;(function($e){function Qe(Ye){return{triggerKind:ce.to(Ye.triggerKind),triggerCharacter:Ye.triggerCharacter}}$e.to=Qe})(ae||(e.CompletionContext=ae={}));var ue;(function($e){function Qe(Ke){switch(Ke){case g.CompletionItemTag.Deprecated:return 1}}$e.from=Qe;function Ye(Ke){switch(Ke){case 1:return g.CompletionItemTag.Deprecated}}$e.to=Ye})(ue||(e.CompletionItemTag=ue={}));var de;(function($e){const Qe=new Map([[g.CompletionItemKind.Method,0],[g.CompletionItemKind.Function,1],[g.CompletionItemKind.Constructor,2],[g.CompletionItemKind.Field,3],[g.CompletionItemKind.Variable,4],[g.CompletionItemKind.Class,5],[g.CompletionItemKind.Interface,7],[g.CompletionItemKind.Struct,6],[g.CompletionItemKind.Module,8],[g.CompletionItemKind.Property,9],[g.CompletionItemKind.Unit,12],[g.CompletionItemKind.Value,13],[g.CompletionItemKind.Constant,14],[g.CompletionItemKind.Enum,15],[g.CompletionItemKind.EnumMember,16],[g.CompletionItemKind.Keyword,17],[g.CompletionItemKind.Snippet,27],[g.CompletionItemKind.Text,18],[g.CompletionItemKind.Color,19],[g.CompletionItemKind.File,20],[g.CompletionItemKind.Reference,21],[g.CompletionItemKind.Folder,23],[g.CompletionItemKind.Event,10],[g.CompletionItemKind.Operator,11],[g.CompletionItemKind.TypeParameter,24],[g.CompletionItemKind.Issue,26],[g.CompletionItemKind.User,25]]);function Ye(Tt){return Qe.get(Tt)??9}$e.from=Ye;const Ke=new Map([[0,g.CompletionItemKind.Method],[1,g.CompletionItemKind.Function],[2,g.CompletionItemKind.Constructor],[3,g.CompletionItemKind.Field],[4,g.CompletionItemKind.Variable],[5,g.CompletionItemKind.Class],[7,g.CompletionItemKind.Interface],[6,g.CompletionItemKind.Struct],[8,g.CompletionItemKind.Module],[9,g.CompletionItemKind.Property],[12,g.CompletionItemKind.Unit],[13,g.CompletionItemKind.Value],[14,g.CompletionItemKind.Constant],[15,g.CompletionItemKind.Enum],[16,g.CompletionItemKind.EnumMember],[17,g.CompletionItemKind.Keyword],[27,g.CompletionItemKind.Snippet],[18,g.CompletionItemKind.Text],[19,g.CompletionItemKind.Color],[20,g.CompletionItemKind.File],[21,g.CompletionItemKind.Reference],[23,g.CompletionItemKind.Folder],[10,g.CompletionItemKind.Event],[11,g.CompletionItemKind.Operator],[24,g.CompletionItemKind.TypeParameter],[25,g.CompletionItemKind.User],[26,g.CompletionItemKind.Issue]]);function ht(Tt){return Ke.get(Tt)??g.CompletionItemKind.Property}$e.to=ht})(de||(e.CompletionItemKind=de={}));var ge;(function($e){function Qe(Ye,Ke){const ht=new g.CompletionItem(Ye.label);return ht.insertText=Ye.insertText,ht.kind=de.to(Ye.kind),ht.tags=Ye.tags?.map(ue.to),ht.detail=Ye.detail,ht.documentation=T.isMarkdownString(Ye.documentation)?x.to(Ye.documentation):Ye.documentation,ht.sortText=Ye.sortText,ht.filterText=Ye.filterText,ht.preselect=Ye.preselect,ht.commitCharacters=Ye.commitCharacters,i.Range.isIRange(Ye.range)?ht.range=E.to(Ye.range):typeof Ye.range=="object"&&(ht.range={inserting:E.to(Ye.range.insert),replacing:E.to(Ye.range.replace)}),ht.keepWhitespace=typeof Ye.insertTextRules>"u"?!1:!!(Ye.insertTextRules&1),typeof Ye.insertTextRules<"u"&&Ye.insertTextRules&4?ht.insertText=new g.SnippetString(Ye.insertText):(ht.insertText=Ye.insertText,ht.textEdit=ht.range instanceof g.Range?new g.TextEdit(ht.range,ht.insertText):void 0),Ye.additionalTextEdits&&Ye.additionalTextEdits.length>0&&(ht.additionalTextEdits=Ye.additionalTextEdits.map(Tt=>H.to(Tt))),ht.command=Ke&&Ye.command?Ke.fromInternal(Ye.command):void 0,ht}$e.to=Qe})(ge||(e.CompletionItem=ge={}));var he;(function($e){function Qe(Ke){if(typeof Ke.label!="string"&&!Array.isArray(Ke.label))throw new TypeError("Invalid label");return{label:Ke.label,documentation:x.fromStrict(Ke.documentation)}}$e.from=Qe;function Ye(Ke){return{label:Ke.label,documentation:T.isMarkdownString(Ke.documentation)?x.to(Ke.documentation):Ke.documentation}}$e.to=Ye})(he||(e.ParameterInformation=he={}));var be;(function($e){function Qe(Ke){return{label:Ke.label,documentation:x.fromStrict(Ke.documentation),parameters:Array.isArray(Ke.parameters)?Ke.parameters.map(he.from):[],activeParameter:Ke.activeParameter}}$e.from=Qe;function Ye(Ke){return{label:Ke.label,documentation:T.isMarkdownString(Ke.documentation)?x.to(Ke.documentation):Ke.documentation,parameters:Array.isArray(Ke.parameters)?Ke.parameters.map(he.to):[],activeParameter:Ke.activeParameter}}$e.to=Ye})(be||(e.SignatureInformation=be={}));var ve;(function($e){function Qe(Ke){return{activeSignature:Ke.activeSignature,activeParameter:Ke.activeParameter,signatures:Array.isArray(Ke.signatures)?Ke.signatures.map(be.from):[]}}$e.from=Qe;function Ye(Ke){return{activeSignature:Ke.activeSignature,activeParameter:Ke.activeParameter,signatures:Array.isArray(Ke.signatures)?Ke.signatures.map(be.to):[]}}$e.to=Ye})(ve||(e.SignatureHelp=ve={}));var Ie;(function($e){function Qe(Ye,Ke){const ht=new g.InlayHint(I.to(Ke.position),typeof Ke.label=="string"?Ke.label:Ke.label.map(Se.to.bind(void 0,Ye)),Ke.kind&&we.to(Ke.kind));return ht.textEdits=Ke.textEdits&&Ke.textEdits.map(H.to),ht.tooltip=T.isMarkdownString(Ke.tooltip)?x.to(Ke.tooltip):Ke.tooltip,ht.paddingLeft=Ke.paddingLeft,ht.paddingRight=Ke.paddingRight,ht}$e.to=Qe})(Ie||(e.InlayHint=Ie={}));var Se;(function($e){function Qe(Ye,Ke){const ht=new g.InlayHintLabelPart(Ke.label);return ht.tooltip=T.isMarkdownString(Ke.tooltip)?x.to(Ke.tooltip):Ke.tooltip,s.Command.is(Ke.command)&&(ht.command=Ye.fromInternal(Ke.command)),Ke.location&&(ht.location=te.to(Ke.location)),ht}$e.to=Qe})(Se||(e.InlayHintLabelPart=Se={}));var we;(function($e){function Qe(Ke){return Ke}$e.from=Qe;function Ye(Ke){return Ke}$e.to=Ye})(we||(e.InlayHintKind=we={}));var ye;(function($e){function Qe(Ke){return{range:E.from(Ke.range),url:Ke.target,tooltip:Ke.tooltip}}$e.from=Qe;function Ye(Ke){let ht;if(Ke.url)try{ht=typeof Ke.url=="string"?r.URI.parse(Ke.url,!0):r.URI.revive(Ke.url)}catch{}return new g.DocumentLink(E.to(Ke.range),ht)}$e.to=Ye})(ye||(e.DocumentLink=ye={}));var Re;(function($e){function Qe(Ke){const ht=new g.ColorPresentation(Ke.label);return Ke.textEdit&&(ht.textEdit=H.to(Ke.textEdit)),Ke.additionalTextEdits&&(ht.additionalTextEdits=Ke.additionalTextEdits.map(Tt=>H.to(Tt))),ht}$e.to=Qe;function Ye(Ke){return{label:Ke.label,textEdit:Ke.textEdit?H.from(Ke.textEdit):void 0,additionalTextEdits:Ke.additionalTextEdits?Ke.additionalTextEdits.map(ht=>H.from(ht)):void 0}}$e.from=Ye})(Re||(e.ColorPresentation=Re={}));var Le;(function($e){function Qe(Ke){return new g.Color(Ke[0],Ke[1],Ke[2],Ke[3])}$e.to=Qe;function Ye(Ke){return[Ke.red,Ke.green,Ke.blue,Ke.alpha]}$e.from=Ye})(Le||(e.Color=Le={}));var Pe;(function($e){function Qe(Ke){return{range:E.from(Ke.range)}}$e.from=Qe;function Ye(Ke){return new g.SelectionRange(E.to(Ke.range))}$e.to=Ye})(Pe||(e.SelectionRange=Pe={}));var Ae;(function($e){function Qe(Ye){switch(Ye){case 2:return g.TextDocumentSaveReason.AfterDelay;case 1:return g.TextDocumentSaveReason.Manual;case 3:case 4:return g.TextDocumentSaveReason.FocusOut}}$e.to=Qe})(Ae||(e.TextDocumentSaveReason=Ae={}));var Me;(function($e){function Qe(Ke){switch(Ke){case g.TextEditorLineNumbersStyle.Off:return 0;case g.TextEditorLineNumbersStyle.Relative:return 2;case g.TextEditorLineNumbersStyle.On:default:return 1}}$e.from=Qe;function Ye(Ke){switch(Ke){case 0:return g.TextEditorLineNumbersStyle.Off;case 2:return g.TextEditorLineNumbersStyle.Relative;case 1:default:return g.TextEditorLineNumbersStyle.On}}$e.to=Ye})(Me||(e.TextEditorLineNumbersStyle=Me={}));var Oe;(function($e){function Qe(Ke){if(Ke===g.EndOfLine.CRLF)return 1;if(Ke===g.EndOfLine.LF)return 0}$e.from=Qe;function Ye(Ke){if(Ke===1)return g.EndOfLine.CRLF;if(Ke===0)return g.EndOfLine.LF}$e.to=Ye})(Oe||(e.EndOfLine=Oe={}));var De;(function($e){function Qe(Ye){if(typeof Ye=="object")return Ye.viewId;switch(Ye){case g.ProgressLocation.SourceControl:return 3;case g.ProgressLocation.Window:return 10;case g.ProgressLocation.Notification:return 15}throw new Error("Unknown 'ProgressLocation'")}$e.from=Qe})(De||(e.ProgressLocation=De={}));var Ce;(function($e){function Qe(Ke){const ht={start:Ke.start+1,end:Ke.end+1};return Ke.kind&&(ht.kind=_e.from(Ke.kind)),ht}$e.from=Qe;function Ye(Ke){const ht={start:Ke.start-1,end:Ke.end-1};return Ke.kind&&(ht.kind=_e.to(Ke.kind)),ht}$e.to=Ye})(Ce||(e.FoldingRange=Ce={}));var _e;(function($e){function Qe(Ke){if(Ke)switch(Ke){case g.FoldingRangeKind.Comment:return s.FoldingRangeKind.Comment;case g.FoldingRangeKind.Imports:return s.FoldingRangeKind.Imports;case g.FoldingRangeKind.Region:return s.FoldingRangeKind.Region}}$e.from=Qe;function Ye(Ke){if(Ke)switch(Ke.value){case s.FoldingRangeKind.Comment.value:return g.FoldingRangeKind.Comment;case s.FoldingRangeKind.Imports.value:return g.FoldingRangeKind.Imports;case s.FoldingRangeKind.Region.value:return g.FoldingRangeKind.Region}}$e.to=Ye})(_e||(e.FoldingRangeKind=_e={}));var me;(function($e){function Qe(Ye){if(Ye)return{pinned:typeof Ye.preview=="boolean"?!Ye.preview:void 0,inactive:Ye.background,preserveFocus:Ye.preserveFocus,selection:typeof Ye.selection=="object"?E.from(Ye.selection):void 0,override:typeof Ye.override=="boolean"?d.DEFAULT_EDITOR_ASSOCIATION.id:void 0}}$e.from=Qe})(me||(e.TextEditorOpenOptions=me={}));var ke;(function($e){function Qe(Tt){return Tt instanceof g.RelativePattern?Tt.toJSON():typeof Tt=="string"?Tt:Ye(Tt)||Ke(Tt)?new g.RelativePattern(Tt.baseUri??Tt.base,Tt.pattern).toJSON():Tt}$e.from=Qe;function Ye(Tt){const Ft=Tt;return Ft?r.URI.isUri(Ft.baseUri)&&typeof Ft.pattern=="string":!1}function Ke(Tt){const Ft=Tt;return Ft?typeof Ft.base=="string"&&typeof Ft.pattern=="string":!1}function ht(Tt){return typeof Tt=="string"?Tt:new g.RelativePattern(r.URI.revive(Tt.baseUri),Tt.pattern)}$e.to=ht})(ke||(e.GlobPattern=ke={}));var Ee;(function($e){function Qe(Ye){if(Ye){if(Array.isArray(Ye))return Ye.map(Qe);if(typeof Ye=="string")return Ye;{const Ke=Ye;return{language:Ke.language,scheme:Ke.scheme,pattern:ke.from(Ke.pattern),exclusive:Ke.exclusive,notebookType:Ke.notebookType}}}else return}$e.from=Qe})(Ee||(e.LanguageSelector=Ee={}));var pe;(function($e){function Qe(Ke){return!!Ke&&typeof Ke=="object"&&"selections"in Ke&&Array.isArray(Ke.selections)&&Ke.selections.every(ht=>ht instanceof g.Selection)&&"related"in Ke&&Array.isArray(Ke.related)&&Ke.related.every(ht=>ht&&typeof ht=="object"&&r.URI.isUri(ht.uri)&&ht.range instanceof g.Range)}$e.is=Qe;function Ye(Ke){return{selections:Ke.selections.map(ht=>w.from(ht)),related:Ke.related.map(ht=>({uri:r.URI.from(ht.uri),range:E.from(ht.range)}))}}$e.from=Ye})(pe||(e.MappedEditsContext=pe={}));var Te;(function($e){function Qe(Ke){return{start:Ke.start,end:Ke.end}}$e.from=Qe;function Ye(Ke){return new g.NotebookRange(Ke.start,Ke.end)}$e.to=Ye})(Te||(e.NotebookRange=Te={}));var Ne;(function($e){function Qe(Ke){return{timing:typeof Ke.runStartTime=="number"&&typeof Ke.runEndTime=="number"?{startTime:Ke.runStartTime,endTime:Ke.runEndTime}:void 0,executionOrder:Ke.executionOrder,success:Ke.lastRunSuccess}}$e.to=Qe;function Ye(Ke){return{lastRunSuccess:Ke.success,runStartTime:Ke.timing?.startTime,runEndTime:Ke.timing?.endTime,executionOrder:Ke.executionOrder}}$e.from=Ye})(Ne||(e.NotebookCellExecutionSummary=Ne={}));var xe;(function($e){function Qe(Ye){if(Ye===p.NotebookCellExecutionState.Unconfirmed)return g.NotebookCellExecutionState.Pending;if(Ye===p.NotebookCellExecutionState.Pending)return;if(Ye===p.NotebookCellExecutionState.Executing)return g.NotebookCellExecutionState.Executing;throw new Error(`Unknown state: ${Ye}`)}$e.to=Qe})(xe||(e.NotebookCellExecutionState=xe={}));var Ve;(function($e){function Qe(Ke){switch(Ke){case g.NotebookCellKind.Markup:return p.CellKind.Markup;case g.NotebookCellKind.Code:default:return p.CellKind.Code}}$e.from=Qe;function Ye(Ke){switch(Ke){case p.CellKind.Markup:return g.NotebookCellKind.Markup;case p.CellKind.Code:default:return g.NotebookCellKind.Code}}$e.to=Ye})(Ve||(e.NotebookCellKind=Ve={}));var Fe;(function($e){function Qe(Ke){const ht={metadata:Ke.metadata??Object.create(null),cells:[]};for(const Tt of Ke.cells)g.NotebookCellData.validate(Tt),ht.cells.push(Be.from(Tt));return ht}$e.from=Qe;function Ye(Ke){const ht=new g.NotebookData(Ke.cells.map(Be.to));return(0,a.isEmptyObject)(Ke.metadata)||(ht.metadata=Ke.metadata),ht}$e.to=Ye})(Fe||(e.NotebookData=Fe={}));var Be;(function($e){function Qe(Ke){return{cellKind:Ve.from(Ke.kind),language:Ke.languageId,mime:Ke.mime,source:Ke.value,metadata:Ke.metadata,internalMetadata:Ne.from(Ke.executionSummary??{}),outputs:Ke.outputs?Ke.outputs.map(et.from):[]}}$e.from=Qe;function Ye(Ke){return new g.NotebookCellData(Ve.to(Ke.cellKind),Ke.source,Ke.language,Ke.mime,Ke.outputs?Ke.outputs.map(et.to):void 0,Ke.metadata,Ke.internalMetadata?Ne.to(Ke.internalMetadata):void 0)}$e.to=Ye})(Be||(e.NotebookCellData=Be={}));var He;(function($e){function Qe(Ke){return{mime:Ke.mime,valueBytes:y.VSBuffer.wrap(Ke.data)}}$e.from=Qe;function Ye(Ke){return new g.NotebookCellOutputItem(Ke.valueBytes.buffer,Ke.mime)}$e.to=Ye})(He||(e.NotebookCellOutputItem=He={}));var et;(function($e){function Qe(Ke){return{outputId:Ke.id,items:Ke.items.map(He.from),metadata:Ke.metadata}}$e.from=Qe;function Ye(Ke){const ht=Ke.items.map(He.to);return new g.NotebookCellOutput(ht,Ke.outputId,Ke.metadata)}$e.to=Ye})(et||(e.NotebookCellOutput=et={}));var Je;(function($e){function Qe(ht){return Ke(ht)?{include:ke.from(ht.include)??void 0,exclude:ke.from(ht.exclude)??void 0}:ke.from(ht)??void 0}$e.from=Qe;function Ye(ht){return Ke(ht)?{include:ke.to(ht.include),exclude:ke.to(ht.exclude)}:ke.to(ht)}$e.to=Ye;function Ke(ht){const Tt=ht;return Tt?!(0,a.isUndefinedOrNull)(Tt.include)&&!(0,a.isUndefinedOrNull)(Tt.exclude):!1}})(Je||(e.NotebookExclusiveDocumentPattern=Je={}));var st;(function($e){function Qe(Ye,Ke,ht){const Tt=typeof Ye.command=="string"?{title:"",command:Ye.command}:Ye.command;return{alignment:Ye.alignment===g.NotebookCellStatusBarAlignment.Left?1:2,command:Ke.toInternal(Tt,ht),text:Ye.text,tooltip:Ye.tooltip,accessibilityInformation:Ye.accessibilityInformation,priority:Ye.priority}}$e.from=Qe})(st||(e.NotebookStatusBarItem=st={}));var ze;(function($e){function Qe(Ye,Ke,ht){const Tt=typeof Ye.command=="string"?{title:"",command:Ye.command}:Ye.command;return{command:Ke.toInternal(Tt,ht),label:Ye.label,description:Ye.description,detail:Ye.detail,documentation:Ye.documentation}}$e.from=Qe})(ze||(e.NotebookKernelSourceAction=ze={}));var je;(function($e){function Qe(Ye){return{transientOutputs:Ye?.transientOutputs??!1,transientCellMetadata:Ye?.transientCellMetadata??{},transientDocumentMetadata:Ye?.transientDocumentMetadata??{},cellContentMetadata:Ye?.cellContentMetadata??{}}}$e.from=Qe})(je||(e.NotebookDocumentContentOptions=je={}));var Ge;(function($e){function Qe(Ke){return{uri:Ke.uri,provides:Ke.provides}}$e.from=Qe;function Ye(Ke){return new g.NotebookRendererScript(r.URI.revive(Ke.uri),Ke.provides)}$e.to=Ye})(Ge||(e.NotebookRendererScript=Ge={}));var Ze;(function($e){function Qe(Ke){return{message:x.fromStrict(Ke.message)||"",type:0,expected:Ke.expectedOutput,actual:Ke.actualOutput,contextValue:Ke.contextValue,location:Ke.location&&{range:E.from(Ke.location.range),uri:Ke.location.uri}}}$e.from=Qe;function Ye(Ke){const ht=new g.TestMessage(typeof Ke.message=="string"?Ke.message:x.to(Ke.message));return ht.actualOutput=Ke.actual,ht.expectedOutput=Ke.expected,ht.contextValue=Ke.contextValue,ht.location=Ke.location?te.to(Ke.location):void 0,ht}$e.to=Ye})(Ze||(e.TestMessage=Ze={}));var tt;(function($e){$e.namespace=l.namespaceTestTag,$e.denamespace=l.denamespaceTestTag})(tt||(e.TestTag=tt={}));var Xe;(function($e){function Qe(Ke){const ht=(0,u.getPrivateApiFor)(Ke).controllerId;return{extId:c.TestId.fromExtHostTestItem(Ke,ht).toString(),label:Ke.label,uri:r.URI.revive(Ke.uri),busy:Ke.busy,tags:Ke.tags.map(Tt=>tt.namespace(ht,Tt.id)),range:i.Range.lift(E.from(Ke.range)),description:Ke.description||null,sortText:Ke.sortText||null,error:Ke.error&&x.fromStrict(Ke.error)||null}}$e.from=Qe;function Ye(Ke){return{parent:void 0,error:void 0,id:c.TestId.fromString(Ke.extId).localId,label:Ke.label,uri:r.URI.revive(Ke.uri),tags:(Ke.tags||[]).map(ht=>{const{tagId:Tt}=tt.denamespace(ht);return new g.TestTag(Tt)}),children:{add:()=>{},delete:()=>{},forEach:()=>{},*[Symbol.iterator](){},get:()=>{},replace:()=>{},size:0},range:E.to(Ke.range||void 0),canResolveChildren:!1,busy:Ke.busy,description:Ke.description||void 0,sortText:Ke.sortText||void 0}}$e.toPlain=Ye})(Xe||(e.TestItem=Xe={})),function($e){function Qe(Ke){return{id:Ke.id}}$e.from=Qe;function Ye(Ke){return new g.TestTag(Ke.id)}$e.to=Ye}(tt||(e.TestTag=tt={}));var nt;(function($e){const Qe=(Ke,ht)=>{const Tt=[];for(const[Pt,$t]of ht)c.TestId.compare($t.item.extId,Pt)===2&&(ht.delete(Pt),Tt.push($t));const Ft={...Xe.toPlain(Ke.item),parent:void 0,taskStates:Ke.tasks.map(Pt=>({state:Pt.state,duration:Pt.duration,messages:Pt.messages.filter($t=>$t.type===0).map(Ze.to)})),children:Tt.map(Pt=>Qe(Pt,ht))};for(const Pt of Ft.children)Pt.parent=Ft;return Ft};function Ye(Ke){const ht=[],Tt=new Map;for(const Ft of Ke.items){Tt.set(Ft.item.extId,Ft);const Pt=c.TestId.root(Ft.item.extId);Ke.request.targets.some($t=>$t.controllerId===Pt&&$t.testIds.includes(Ft.item.extId))&&ht.push(Ft)}return{completedAt:Ke.completedAt,results:ht.map(Ft=>Qe(Ft,Tt))}}$e.to=Ye})(nt||(e.TestResults=nt={}));var ft;(function($e){function Qe(Tt){return{covered:Tt.covered,total:Tt.covered}}function Ye(Tt){return"line"in Tt?I.from(Tt):E.from(Tt)}function Ke(Tt){return"branches"in Tt?{count:Tt.executionCount,location:Ye(Tt.location),type:1,branches:Tt.branches.length?Tt.branches.map(Ft=>({count:Ft.executionCount,location:Ft.location&&Ye(Ft.location)})):void 0}:{type:0,count:Tt.executionCount,location:Ye(Tt.location)}}$e.fromDetailed=Ke;function ht(Tt){return{uri:Tt.uri,statement:Qe(Tt.statementCoverage),branch:Tt.branchCoverage&&Qe(Tt.branchCoverage),function:Tt.functionCoverage&&Qe(Tt.functionCoverage),details:Tt.detailedCoverage?.map(Ke)}}$e.fromFile=ht})(ft||(e.TestCoverage=ft={}));var Et;(function($e){function Qe(Ye){switch(Ye){case 1:return g.CodeActionTriggerKind.Invoke;case 2:return g.CodeActionTriggerKind.Automatic}}$e.to=Qe})(Et||(e.CodeActionTriggerKind=Et={}));var It;(function($e){function Qe(Ke){const ht=new g.TypeHierarchyItem(G.to(Ke.kind),Ke.name,Ke.detail||"",r.URI.revive(Ke.uri),E.to(Ke.range),E.to(Ke.selectionRange));return ht._sessionId=Ke._sessionId,ht._itemId=Ke._itemId,ht}$e.to=Qe;function Ye(Ke,ht,Tt){if(ht=ht??Ke._sessionId,Tt=Tt??Ke._itemId,ht===void 0||Tt===void 0)throw new Error("invalid item");return{_sessionId:ht,_itemId:Tt,kind:G.from(Ke.kind),name:Ke.name,detail:Ke.detail??"",uri:Ke.uri,range:E.from(Ke.range),selectionRange:E.from(Ke.selectionRange),tags:Ke.tags?.map($.from)}}$e.from=Ye})(It||(e.TypeHierarchyItem=It={}));var Nt;(function($e){function Qe(Ye){if(Ye)return{value:Ye.value,tooltip:Ye.tooltip}}$e.from=Qe})(Nt||(e.ViewBadge=Nt={}));var Ot;(function($e){function Qe(Tt,Ft,Pt){const $t=Ft.fileData;return $t?new g.InternalFileDataTransferItem(new g.DataTransferFile($t.name,r.URI.revive($t.uri),$t.id,(0,D.once)(()=>Pt($t.id)))):Tt===S.Mimes.uriList&&Ft.uriListData?new g.InternalDataTransferItem(ht(Ft.uriListData)):new g.InternalDataTransferItem(Ft.asString)}$e.to=Qe;async function Ye(Tt,Ft){const Pt=await Ft.asString();if(Tt===S.Mimes.uriList)return{asString:Pt,fileData:void 0,uriListData:Ke(Pt)};const $t=Ft.asFile();return{asString:Pt,fileData:$t?{name:$t.name,uri:$t.uri,id:$t._itemId??$t.id}:void 0}}$e.from=Ye;function Ke(Tt){return b.UriList.split(Tt).map(Ft=>{if(Ft.startsWith("#"))return Ft;try{return r.URI.parse(Ft)}catch{}return Ft})}function ht(Tt){return b.UriList.create(Tt.map(Ft=>typeof Ft=="string"?Ft:r.URI.revive(Ft)))}})(Ot||(e.DataTransferItem=Ot={}));var kt;(function($e){function Qe(Ke,ht){const Tt=Ke.items.map(([Ft,Pt])=>[Ft,Ot.to(Ft,Pt,ht)]);return new g.DataTransfer(Tt)}$e.toDataTransfer=Qe;async function Ye(Ke){const ht={items:[]},Tt=[];for(const[Ft,Pt]of Ke)Tt.push((async()=>{ht.items.push([Ft,await Ot.from(Ft,Pt)])})());return await Promise.all(Tt),ht}$e.from=Ye})(kt||(e.DataTransfer=kt={}));var xt;(function($e){function Qe(Ke){return{message:Ke.message,metadata:Ke.metadata,title:Ke.title,tooltip:Ke.tooltip}}$e.to=Qe;function Ye(Ke){return{kind:"reply",message:Ke.message,metadata:Ke.metadata,title:Ke.title,tooltip:Ke.tooltip}}$e.from=Ye})(xt||(e.ChatReplyFollowup=xt={}));var Mt;(function($e){function Qe(Ye){return typeof Ye=="string"?{title:Ye,message:Ye,kind:"reply"}:"commandId"in Ye?{kind:"command",title:Ye.title??"",commandId:Ye.commandId??"",when:Ye.when??"",args:Ye.args}:xt.from(Ye)}$e.from=Qe})(Mt||(e.ChatFollowup=Mt={}));var Ht;(function($e){function Qe(Ke){const ht=new g.ChatMessage(Yt.to(Ke.role),Ke.content);return ht.name=Ke.name,ht}$e.to=Qe;function Ye(Ke){return{role:Yt.from(Ke.role),content:Ke.content,name:Ke.name}}$e.from=Ye})(Ht||(e.ChatMessage=Ht={}));var Yt;(function($e){function Qe(Ke){switch(Ke){case 0:return g.ChatMessageRole.System;case 1:return g.ChatMessageRole.User;case 2:return g.ChatMessageRole.Assistant;case 3:return g.ChatMessageRole.Function}}$e.to=Qe;function Ye(Ke){switch(Ke){case g.ChatMessageRole.System:return 0;case g.ChatMessageRole.Assistant:return 2;case g.ChatMessageRole.Function:return 3;case g.ChatMessageRole.User:default:return 1}}$e.from=Ye})(Yt||(e.ChatMessageRole=Yt={}));var jt;(function($e){function Qe(Ke){return{level:ii.to(Ke.level),value:Ke.value,description:Ke.description}}$e.to=Qe;function Ye(Ke){return{level:ii.from(Ke.level),value:Ke.value,description:Ke.description}}$e.from=Ye})(jt||(e.ChatVariable=jt={}));var ii;(function($e){function Qe(Ke){switch(Ke){case"short":return g.ChatVariableLevel.Short;case"medium":return g.ChatVariableLevel.Medium;case"full":default:return g.ChatVariableLevel.Full}}$e.to=Qe;function Ye(Ke){switch(Ke){case g.ChatVariableLevel.Short:return"short";case g.ChatVariableLevel.Medium:return"medium";case g.ChatVariableLevel.Full:default:return"full"}}$e.from=Ye})(ii||(e.ChatVariableLevel=ii={}));var ri;(function($e){function Qe(Ye,Ke,ht){return"terminalCommand"in Ye?{terminalCommand:Ye.terminalCommand}:"uri"in Ye?{uri:Ye.uri}:Ke.toInternal(Ye,ht)}$e.from=Qe})(ri||(e.TerminalQuickFix=ri={}))}),define(Q[3708],Y([1,0,21]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorGroupToViewColumn=e.viewColumnToEditorGroup=void 0;function y(D,T){if(typeof T!="number"||T===t.ACTIVE_GROUP)return t.ACTIVE_GROUP;const f=D.getGroups(2);let v=f[T];if(v)return v.id;let m=f[0];return f.length===1&&m.count===0?m.id:t.SIDE_GROUP}e.viewColumnToEditorGroup=y;function b(D,T){const f=typeof T=="number"?D.getGroup(T):T;if(!f)throw new Error("Invalid group provided");return D.getGroups(2).indexOf(f)}e.editorGroupToViewColumn=b}),define(Q[621],Y([1,0,6,4,26,123,243,98,1245,13,8,5,38,21]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.FloatingEditorClickMenu=e.FloatingEditorClickWidget=e.RangeHighlightDecorations=void 0;let s=class extends y.Disposable{static{i=this}constructor(p){super(),this.editorService=p,this._onHighlightRemoved=this._register(new t.Emitter),this.onHighlightRemoved=this._onHighlightRemoved.event,this.rangeHighlightDecorationId=null,this.editor=null,this.editorDisposables=this._register(new y.DisposableStore)}removeHighlightRange(){if(this.editor&&this.rangeHighlightDecorationId){const p=this.rangeHighlightDecorationId;this.editor.changeDecorations(c=>{c.removeDecoration(p)}),this._onHighlightRemoved.fire()}this.rangeHighlightDecorationId=null}highlightRange(p,c){c=c??this.getEditor(p),(0,D.isCodeEditor)(c)?this.doHighlightRange(c,p):(0,D.isCompositeEditor)(c)&&(0,D.isCodeEditor)(c.activeCodeEditor)&&this.doHighlightRange(c.activeCodeEditor,p)}doHighlightRange(p,c){this.removeHighlightRange(),p.changeDecorations(l=>{this.rangeHighlightDecorationId=l.addDecoration(c.range,this.createRangeHighlightDecoration(c.isWholeLine))}),this.setEditor(p)}getEditor(p){const c=this.editorService.activeEditor?.resource;if(c&&(0,b.isEqual)(c,p.resource)&&(0,D.isCodeEditor)(this.editorService.activeTextEditorControl))return this.editorService.activeTextEditorControl}setEditor(p){this.editor!==p&&(this.editorDisposables.clear(),this.editor=p,this.editorDisposables.add(this.editor.onDidChangeCursorPosition(c=>{(c.reason===0||c.reason===3||c.reason===5||c.reason===6)&&this.removeHighlightRange()})),this.editorDisposables.add(this.editor.onDidChangeModel(()=>{this.removeHighlightRange()})),this.editorDisposables.add(this.editor.onDidDispose(()=>{this.removeHighlightRange(),this.editor=null})))}static{this._WHOLE_LINE_RANGE_HIGHLIGHT=f.ModelDecorationOptions.register({description:"codeeditor-range-highlight-whole",stickiness:1,className:"rangeHighlight",isWholeLine:!0})}static{this._RANGE_HIGHLIGHT=f.ModelDecorationOptions.register({description:"codeeditor-range-highlight",stickiness:1,className:"rangeHighlight"})}createRangeHighlightDecoration(p=!0){return p?i._WHOLE_LINE_RANGE_HIGHLIGHT:i._RANGE_HIGHLIGHT}dispose(){super.dispose(),this.editor?.getModel()&&(this.removeHighlightRange(),this.editor=null)}};e.RangeHighlightDecorations=s,e.RangeHighlightDecorations=s=i=fe([O(0,r.IEditorService)],s);let o=class extends v.FloatingClickWidget{constructor(p,c,l,n){super(l&&n.lookupKeybinding(l)?`${c} (${n.lookupKeybinding(l).getLabel()})`:c),this.editor=p}getId(){return"editor.overlayWidget.floatingClickWidget"}getPosition(){return{preference:1}}render(){super.render(),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}};e.FloatingEditorClickWidget=o,e.FloatingEditorClickWidget=o=fe([O(3,a.IKeybindingService)],o);let u=class extends v.AbstractFloatingClickMenu{static{this.ID="editor.contrib.floatingClickMenu"}constructor(p,c,l,n){super(m.MenuId.EditorContent,l,n),this.editor=p,this.instantiationService=c,this.render()}createWidget(p){return this.instantiationService.createInstance(o,this.editor,p.label,p.id)}isVisible(){return!(this.editor instanceof T.EmbeddedCodeEditorWidget)&&this.editor?.hasModel()&&!this.editor.getOption(60)}getActionArg(){return this.editor.getModel()?.uri}};e.FloatingEditorClickMenu=u,e.FloatingEditorClickMenu=u=fe([O(1,h.IInstantiationService),O(2,m.IMenuService),O(3,S.IContextKeyService)],u)}),define(Q[949],Y([1,0,2554,43,347,70,47,21,57,50,252,570,32,37,1765]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";var i,s,o;Object.defineProperty(e,"__esModule",{value:!0}),e.AllEditorsByMostRecentlyUsedQuickAccess=e.AllEditorsByAppearanceQuickAccess=e.ActiveGroupEditorsByMostRecentlyUsedQuickAccess=e.BaseEditorQuickAccessProvider=void 0;let u=class extends b.PickerQuickAccessProvider{constructor(n,g,w,E,C){super(n,{canAcceptInBackground:!0,noResultsPick:{label:(0,t.localize)(0,null),groupId:-1}}),this.editorGroupService=g,this.editorService=w,this.modelService=E,this.languageService=C,this.pickState=new class{constructor(){this.scorerCache=Object.create(null),this.isQuickNavigating=void 0}reset(I){I||(this.scorerCache=Object.create(null)),this.isQuickNavigating=I}}}provide(n,g){return this.pickState.reset(!!n.quickNavigate),super.provide(n,g)}_getPicks(n){const g=(0,h.prepareQuery)(n),w=this.doGetEditorPickItems().filter(C=>{if(!g.normalized)return!0;const I=(0,h.scoreItemFuzzy)(C,g,!0,y.quickPickItemScorerAccessor,this.pickState.scorerCache);return I.score?(C.highlights={label:I.labelMatch,description:I.descriptionMatch},!0):!1});if(g.normalized){const C=this.editorGroupService.getGroups(2).map(I=>I.id);w.sort((I,_)=>I.groupId!==_.groupId?C.indexOf(I.groupId)-C.indexOf(_.groupId):(0,h.compareItemsByFuzzyScore)(I,_,g,!0,y.quickPickItemScorerAccessor,this.pickState.scorerCache))}const E=[];if(this.editorGroupService.count>1){let C;for(const I of w){if(typeof C!="number"||C!==I.groupId){const _=this.editorGroupService.getGroup(I.groupId);_&&E.push({type:"separator",label:_.label}),C=I.groupId}E.push(I)}}else E.push(...w);return E}doGetEditorPickItems(){const n=this.doGetEditors(),g=new Map;for(const{groupId:w}of n)if(!g.has(w)){const E=this.editorGroupService.getGroup(w);E&&g.set(w,E.ariaLabel)}return this.doGetEditors().map(({editor:w,groupId:E})=>{const C=T.EditorResourceAccessor.getOriginalUri(w,{supportSideBySide:T.SideBySideEditor.PRIMARY}),I=w.isDirty()&&!w.isSaving(),_=w.getDescription(),A=_?`${w.getName()} ${_}`:w.getName();return{groupId:E,resource:C,label:w.getName(),ariaLabel:(()=>g.size>1?I?(0,t.localize)(1,null,A,g.get(E)):(0,t.localize)(2,null,A,g.get(E)):I?(0,t.localize)(3,null,A):A)(),description:_,iconClasses:(0,S.getIconClasses)(this.modelService,this.languageService,C).concat(w.getLabelExtraClasses()),italic:!this.editorGroupService.getGroup(E)?.isPinned(w),buttons:(()=>[{iconClass:I?"dirty-editor "+r.ThemeIcon.asClassName(a.Codicon.closeDirty):r.ThemeIcon.asClassName(a.Codicon.close),tooltip:(0,t.localize)(4,null),alwaysVisible:I}])(),trigger:async()=>{const k=this.editorGroupService.getGroup(E);return k&&(await k.closeEditor(w,{preserveFocus:!0}),!k.contains(w))?b.TriggerAction.REMOVE_ITEM:b.TriggerAction.NO_ACTION},accept:(k,L)=>this.editorGroupService.getGroup(E)?.openEditor(w,{preserveFocus:L.inBackground})}})}};e.BaseEditorQuickAccessProvider=u,e.BaseEditorQuickAccessProvider=u=fe([O(1,D.IEditorGroupsService),O(2,f.IEditorService),O(3,v.IModelService),O(4,m.ILanguageService)],u);let d=class extends u{static{i=this}static{this.PREFIX="edt active "}constructor(n,g,w,E){super(i.PREFIX,n,g,w,E)}doGetEditors(){const n=this.editorGroupService.activeGroup;return n.getEditors(0).map(g=>({editor:g,groupId:n.id}))}};e.ActiveGroupEditorsByMostRecentlyUsedQuickAccess=d,e.ActiveGroupEditorsByMostRecentlyUsedQuickAccess=d=i=fe([O(0,D.IEditorGroupsService),O(1,f.IEditorService),O(2,v.IModelService),O(3,m.ILanguageService)],d);let p=class extends u{static{s=this}static{this.PREFIX="edt "}constructor(n,g,w,E){super(s.PREFIX,n,g,w,E)}doGetEditors(){const n=[];for(const g of this.editorGroupService.getGroups(2))for(const w of g.getEditors(1))n.push({editor:w,groupId:g.id});return n}};e.AllEditorsByAppearanceQuickAccess=p,e.AllEditorsByAppearanceQuickAccess=p=s=fe([O(0,D.IEditorGroupsService),O(1,f.IEditorService),O(2,v.IModelService),O(3,m.ILanguageService)],p);let c=class extends u{static{o=this}static{this.PREFIX="edt mru "}constructor(n,g,w,E){super(o.PREFIX,n,g,w,E)}doGetEditors(){const n=[];for(const g of this.editorService.getEditors(0))n.push(g);return n}};e.AllEditorsByMostRecentlyUsedQuickAccess=c,e.AllEditorsByMostRecentlyUsedQuickAccess=c=o=fe([O(0,D.IEditorGroupsService),O(1,f.IEditorService),O(2,v.IModelService),O(3,m.ILanguageService)],c)}),define(Q[1340],Y([1,0,6,47,164,24,5,30,19,78,70,21,4]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorWithViewState=void 0;let r=class extends b.EditorPane{constructor(s,o,u,d,p,c,l,n,g){super(s,u,l,p),this.instantiationService=d,this.textResourceConfigurationService=c,this.editorService=n,this.editorGroupService=g,this.groupListener=this._register(new a.MutableDisposable),this.viewState=this.getEditorMemento(g,c,o,100)}setEditorVisible(s,o){this.groupListener.value=o?.onWillCloseEditor(u=>this.onWillCloseEditor(u)),super.setEditorVisible(s,o)}onWillCloseEditor(s){const o=s.editor;o===this.input&&this.updateEditorViewState(o)}clearInput(){this.updateEditorViewState(this.input),super.clearInput()}saveState(){this.updateEditorViewState(this.input),super.saveState()}updateEditorViewState(s){if(!s||!this.tracksEditorViewState(s))return;const o=this.toEditorViewStateResource(s);o&&(this.tracksDisposedEditorViewState()||(this.editorViewStateDisposables||(this.editorViewStateDisposables=new Map),this.editorViewStateDisposables.has(s)||this.editorViewStateDisposables.set(s,t.Event.once(s.onWillDispose)(()=>{this.clearEditorViewState(o,this.group),this.editorViewStateDisposables?.delete(s)}))),s.isDisposed()&&!this.tracksDisposedEditorViewState()||!this.shouldRestoreEditorViewState(s)&&(!this.group||!this.group.contains(s))?this.clearEditorViewState(o,this.group):s.isDisposed()||this.saveEditorViewState(o))}shouldRestoreEditorViewState(s,o){return o?.newInGroup?this.textResourceConfigurationService.getValue(y.EditorResourceAccessor.getOriginalUri(s,{supportSideBySide:y.SideBySideEditor.PRIMARY}),"workbench.editor.restoreViewState")!==!1:!0}getViewState(){const s=this.input;if(!s||!this.tracksEditorViewState(s))return;const o=this.toEditorViewStateResource(s);if(o)return this.computeEditorViewState(o)}saveEditorViewState(s){if(!this.group)return;const o=this.computeEditorViewState(s);o&&this.viewState.saveEditorState(this.group,s,o)}loadEditorViewState(s,o){if(!s||!this.group||!this.tracksEditorViewState(s)||!this.shouldRestoreEditorViewState(s,o))return;const u=this.toEditorViewStateResource(s);if(u)return this.viewState.loadEditorState(this.group,u)}moveEditorViewState(s,o,u){return this.viewState.moveEditorState(s,o,u)}clearEditorViewState(s,o){this.viewState.clearEditorState(s,o)}dispose(){if(super.dispose(),this.editorViewStateDisposables){for(const[,s]of this.editorViewStateDisposables)s.dispose();this.editorViewStateDisposables=void 0}}tracksDisposedEditorViewState(){return!1}};e.AbstractEditorWithViewState=r,e.AbstractEditorWithViewState=r=fe([O(2,f.ITelemetryService),O(3,T.IInstantiationService),O(4,D.IStorageService),O(5,m.ITextResourceConfigurationService),O(6,v.IThemeService),O(7,h.IEditorService),O(8,S.IEditorGroupsService)],r)}),define(Q[236],Y([1,0,6,2592,16,47,163,21]),function(q,e,t,y,b,D,T,f){"use strict";var v;Object.defineProperty(e,"__esModule",{value:!0}),e.SideBySideEditorInputSerializer=e.AbstractSideBySideEditorInputSerializer=e.SideBySideEditorInput=void 0;let m=class extends T.EditorInput{static{v=this}static{this.ID="workbench.editorinputs.sidebysideEditorInput"}get typeId(){return v.ID}get capabilities(){let r=this.primary.capabilities;return r&=-33,this.secondary.hasCapability(16)&&(r|=16),this.secondary.hasCapability(8)&&(r|=8),r|=256,r}get resource(){if(this.hasIdenticalSides)return this.primary.resource}constructor(r,i,s,o,u){super(),this.preferredName=r,this.preferredDescription=i,this.secondary=s,this.primary=o,this.editorService=u,this.hasIdenticalSides=this.primary.matches(this.secondary),this.registerListeners()}registerListeners(){this._register(t.Event.once(t.Event.any(this.primary.onWillDispose,this.secondary.onWillDispose))(()=>{this.isDisposed()||this.dispose()})),this._register(this.primary.onDidChangeDirty(()=>this._onDidChangeDirty.fire())),this._register(this.primary.onDidChangeCapabilities(()=>this._onDidChangeCapabilities.fire())),this._register(this.secondary.onDidChangeCapabilities(()=>this._onDidChangeCapabilities.fire())),this._register(this.primary.onDidChangeLabel(()=>this._onDidChangeLabel.fire())),this._register(this.secondary.onDidChangeLabel(()=>this._onDidChangeLabel.fire()))}getName(){const r=this.getPreferredName();return r||(this.hasIdenticalSides?this.primary.getName():(0,y.localize)(0,null,this.secondary.getName(),this.primary.getName()))}getPreferredName(){return this.preferredName}getDescription(r){const i=this.getPreferredDescription();return i||(this.hasIdenticalSides?this.primary.getDescription(r):super.getDescription(r))}getPreferredDescription(){return this.preferredDescription}getTitle(r){return this.hasIdenticalSides?this.primary.getTitle(r)??this.getName():super.getTitle(r)}getLabelExtraClasses(){return this.hasIdenticalSides?this.primary.getLabelExtraClasses():super.getLabelExtraClasses()}getAriaLabel(){return this.hasIdenticalSides?this.primary.getAriaLabel():super.getAriaLabel()}getTelemetryDescriptor(){return{...this.primary.getTelemetryDescriptor(),...super.getTelemetryDescriptor()}}isDirty(){return this.primary.isDirty()}isSaving(){return this.primary.isSaving()}async save(r,i){const s=await this.primary.save(r,i);return this.saveResultToEditor(s)}async saveAs(r,i){const s=await this.primary.saveAs(r,i);return this.saveResultToEditor(s)}saveResultToEditor(r){if(!r||!this.hasIdenticalSides)return r;if(this.primary.matches(r))return this;if(r instanceof T.EditorInput)return new v(this.preferredName,this.preferredDescription,r,r,this.editorService);if(!(0,D.isResourceDiffEditorInput)(r)&&!(0,D.isResourceSideBySideEditorInput)(r)&&!(0,D.isResourceMergeEditorInput)(r))return{primary:r,secondary:r,label:this.preferredName,description:this.preferredDescription}}revert(r,i){return this.primary.revert(r,i)}async rename(r,i){if(!this.hasIdenticalSides)return;const s=await this.primary.rename(r,i);if(s){if((0,D.isEditorInput)(s.editor))return{editor:new v(this.preferredName,this.preferredDescription,s.editor,s.editor,this.editorService),options:{...s.options,viewState:(0,D.findViewStateForEditor)(this,r,this.editorService)}};if((0,D.isResourceEditorInput)(s.editor))return{editor:{label:this.preferredName,description:this.preferredDescription,primary:s.editor,secondary:s.editor,options:{...s.options,viewState:(0,D.findViewStateForEditor)(this,r,this.editorService)}}}}}isReadonly(){return this.primary.isReadonly()}toUntyped(r){const i=this.primary.toUntyped(r),s=this.secondary.toUntyped(r);if(i&&s&&!(0,D.isResourceDiffEditorInput)(i)&&!(0,D.isResourceDiffEditorInput)(s)&&!(0,D.isResourceSideBySideEditorInput)(i)&&!(0,D.isResourceSideBySideEditorInput)(s)&&!(0,D.isResourceMergeEditorInput)(i)&&!(0,D.isResourceMergeEditorInput)(s)){const o={label:this.preferredName,description:this.preferredDescription,primary:i,secondary:s};return typeof r?.preserveViewState=="number"&&(o.options={viewState:(0,D.findViewStateForEditor)(this,r.preserveViewState,this.editorService)}),o}}matches(r){return this===r?!0:(0,D.isDiffEditorInput)(r)||(0,D.isResourceDiffEditorInput)(r)?!1:r instanceof v?this.primary.matches(r.primary)&&this.secondary.matches(r.secondary):(0,D.isResourceSideBySideEditorInput)(r)?this.primary.matches(r.primary)&&this.secondary.matches(r.secondary):!1}};e.SideBySideEditorInput=m,e.SideBySideEditorInput=m=v=fe([O(4,f.IEditorService)],m);class S{canSerialize(r){const i=r;if(i.primary&&i.secondary){const[s,o]=this.getSerializers(i.secondary.typeId,i.primary.typeId);return!!(s?.canSerialize(i.secondary)&&o?.canSerialize(i.primary))}return!1}serialize(r){const i=r;if(i.primary&&i.secondary){const[s,o]=this.getSerializers(i.secondary.typeId,i.primary.typeId);if(o&&s){const u=o.serialize(i.primary),d=s.serialize(i.secondary);if(u&&d){const p={name:i.getPreferredName(),description:i.getPreferredDescription(),primarySerialized:u,secondarySerialized:d,primaryTypeId:i.primary.typeId,secondaryTypeId:i.secondary.typeId};return JSON.stringify(p)}}}}deserialize(r,i){const s=JSON.parse(i),[o,u]=this.getSerializers(s.secondaryTypeId,s.primaryTypeId);if(u&&o){const d=u.deserialize(r,s.primarySerialized),p=o.deserialize(r,s.secondarySerialized);if(d instanceof T.EditorInput&&p instanceof T.EditorInput)return this.createEditorInput(r,s.name,s.description,p,d)}}getSerializers(r,i){const s=b.Registry.as(D.EditorExtensions.EditorFactory);return[s.getEditorSerializer(r),s.getEditorSerializer(i)]}}e.AbstractSideBySideEditorInputSerializer=S;class h extends S{createEditorInput(r,i,s,o,u){return r.createInstance(m,i,s,o,u)}}e.SideBySideEditorInputSerializer=h}),define(Q[3709],Y([1,0,47,236,4,24,16,6,70,20,69,42]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorsObserver=void 0;let r=class extends b.Disposable{static{a=this}static{this.STORAGE_KEY="editors.mru"}get count(){return this.mostRecentEditorsMap.size}get editors(){return[...this.mostRecentEditorsMap.values()]}hasEditor(s){return this.editorsPerResourceCounter.get(s.resource)?.has(this.toIdentifier(s))??!1}hasEditors(s){return this.editorsPerResourceCounter.has(s)}toIdentifier(s,o){return typeof s!="string"?this.toIdentifier(s.typeId,s.editorId):o?`${s}/${o}`:s}constructor(s,o){super(),this.editorGroupsService=s,this.storageService=o,this.keyMap=new Map,this.mostRecentEditorsMap=new S.LinkedMap,this.editorsPerResourceCounter=new S.ResourceMap,this._onDidMostRecentlyActiveEditorsChange=this._register(new f.Emitter),this.onDidMostRecentlyActiveEditorsChange=this._onDidMostRecentlyActiveEditorsChange.event,this.registerListeners()}registerListeners(){this._register(this.storageService.onWillSaveState(()=>this.saveState())),this._register(this.editorGroupsService.onDidAddGroup(s=>this.onGroupAdded(s))),this._register(this.editorGroupsService.onDidChangeEditorPartOptions(s=>this.onDidChangeEditorPartOptions(s))),this.editorGroupsService.whenReady.then(()=>this.loadState())}onGroupAdded(s){const o=s.getEditors(0);for(let u=o.length-1;u>=0;u--)this.addMostRecentEditor(s,o[u],!1,!0);this.editorGroupsService.activeGroup===s&&s.activeEditor&&this.addMostRecentEditor(s,s.activeEditor,!0,!1),this.registerGroupListeners(s)}registerGroupListeners(s){const o=new b.DisposableStore;o.add(s.onDidModelChange(u=>{switch(u.kind){case 0:{this.editorGroupsService.activeGroup===s&&s.activeEditor&&this.addMostRecentEditor(s,s.activeEditor,!0,!1);break}case 3:{u.editor&&(this.addMostRecentEditor(s,u.editor,!1,!0),this.ensureOpenedEditorsLimit({groupId:s.id,editor:u.editor},s.id));break}}})),o.add(s.onDidCloseEditor(u=>{this.removeMostRecentEditor(s,u.editor)})),o.add(s.onDidActiveEditorChange(u=>{u.editor&&this.addMostRecentEditor(s,u.editor,this.editorGroupsService.activeGroup===s,!1)})),f.Event.once(s.onWillDispose)(()=>(0,b.dispose)(o))}onDidChangeEditorPartOptions(s){if(!(0,h.equals)(s.newPartOptions.limit,s.oldPartOptions.limit)){const o=this.editorGroupsService.activeGroup;let u;o.activeEditor&&(u={editor:o.activeEditor,groupId:o.id}),this.ensureOpenedEditorsLimit(u)}}addMostRecentEditor(s,o,u,d){const p=this.ensureKey(s,o),c=this.mostRecentEditorsMap.first;u||!c?this.mostRecentEditorsMap.set(p,p,c?1:void 0):(this.mostRecentEditorsMap.set(p,p,1),this.mostRecentEditorsMap.set(c,c,1)),d&&this.updateEditorResourcesMap(o,!0),this._onDidMostRecentlyActiveEditorsChange.fire()}updateEditorResourcesMap(s,o){let u,d,p;if(s instanceof y.SideBySideEditorInput?(u=s.primary.resource,d=s.primary.typeId,p=s.primary.editorId):(u=s.resource,d=s.typeId,p=s.editorId),!u)return;const c=this.toIdentifier(d,p);if(o){let l=this.editorsPerResourceCounter.get(u);l||(l=new Map,this.editorsPerResourceCounter.set(u,l)),l.set(c,(l.get(c)??0)+1)}else{const l=this.editorsPerResourceCounter.get(u);if(l){const n=l.get(c)??0;n>1?l.set(c,n-1):(l.delete(c),l.size===0&&this.editorsPerResourceCounter.delete(u))}}}removeMostRecentEditor(s,o){this.updateEditorResourcesMap(o,!1);const u=this.findKey(s,o);if(u){this.mostRecentEditorsMap.delete(u);const d=this.keyMap.get(s.id);d&&d.delete(u.editor)&&d.size===0&&this.keyMap.delete(s.id),this._onDidMostRecentlyActiveEditorsChange.fire()}}findKey(s,o){const u=this.keyMap.get(s.id);if(u)return u.get(o)}ensureKey(s,o){let u=this.keyMap.get(s.id);u||(u=new Map,this.keyMap.set(s.id,u));let d=u.get(o);return d||(d={groupId:s.id,editor:o},u.set(o,d)),d}async ensureOpenedEditorsLimit(s,o){if(!this.editorGroupsService.partOptions.limit?.enabled||typeof this.editorGroupsService.partOptions.limit.value!="number"||this.editorGroupsService.partOptions.limit.value<=0)return;const u=this.editorGroupsService.partOptions.limit.value;if(this.editorGroupsService.partOptions.limit?.perEditorGroup)if(typeof o=="number"){const d=this.editorGroupsService.getGroup(o);d&&await this.doEnsureOpenedEditorsLimit(u,d.getEditors(0).map(p=>({editor:p,groupId:o})),s)}else for(const d of this.editorGroupsService.groups)await this.ensureOpenedEditorsLimit(s,d.id);else await this.doEnsureOpenedEditorsLimit(u,[...this.mostRecentEditorsMap.values()],s)}async doEnsureOpenedEditorsLimit(s,o,u){let d;if(this.editorGroupsService.partOptions.limit?.excludeDirty?d=o.filter(({editor:n})=>!(n.isDirty()&&!n.isSaving()||n.hasCapability(512))):d=o,s>=d.length)return;const p=d.reverse().filter(({editor:n,groupId:g})=>!(n.isDirty()&&!n.isSaving()||n.hasCapability(512)||u&&n===u.editor&&g===u.groupId||this.editorGroupsService.getGroup(g)?.isSticky(n)));let c=d.length-s;const l=new Map;for(const{groupId:n,editor:g}of p){let w=l.get(n);if(w||(w=[],l.set(n,w)),w.push(g),c--,c===0)break}for(const[n,g]of l){const w=this.editorGroupsService.getGroup(n);w&&await w.closeEditors(g,{preserveFocus:!0})}}saveState(){this.mostRecentEditorsMap.isEmpty()?this.storageService.remove(a.STORAGE_KEY,1):this.storageService.store(a.STORAGE_KEY,JSON.stringify(this.serialize()),1,1)}serialize(){const s=T.Registry.as(t.EditorExtensions.EditorFactory),o=[...this.mostRecentEditorsMap.values()],u=new Map;return{entries:(0,m.coalesce)(o.map(({editor:d,groupId:p})=>{const c=this.editorGroupsService.getGroup(p);if(!c)return;let l=u.get(c);l||(l=c.getEditors(1).filter(g=>s.getEditorSerializer(g)?.canSerialize(g)),u.set(c,l));const n=l.indexOf(d);if(n!==-1)return{groupId:p,index:n}}))}}loadState(){const s=this.storageService.get(a.STORAGE_KEY,1);if(s)this.deserialize(JSON.parse(s));else{const o=this.editorGroupsService.getGroups(1);for(let u=o.length-1;u>=0;u--){const d=o[u],p=d.getEditors(0);for(let c=p.length-1;c>=0;c--)this.addMostRecentEditor(d,p[c],!0,!0)}}for(const o of this.editorGroupsService.groups)this.registerGroupListeners(o)}deserialize(s){const o=[];for(const{groupId:u,index:d}of s.entries){const p=this.editorGroupsService.getGroup(u);if(!p)continue;const c=p.getEditorByIndex(d);if(!c)continue;const l=this.ensureKey(p,c);o.push([l,l]),this.updateEditorResourcesMap(c,!0)}this.mostRecentEditorsMap.fromJSON(o)}};e.EditorsObserver=r,e.EditorsObserver=r=a=fe([O(0,v.IEditorGroupsService),O(1,D.IStorageService)],r)}),define(Q[950],Y([1,0,2556,7,16,47,236,30,5,19,70,216,6,24,17,9,416,4,84,1340,78,21,26,10,1768]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";var w;Object.defineProperty(e,"__esModule",{value:!0}),e.SideBySideEditor=void 0;function E(_){const A=_;return typeof A?.primary=="object"&&typeof A.secondary=="object"}let C=class extends p.AbstractEditorWithViewState{static{w=this}static{this.ID=D.SIDE_BY_SIDE_EDITOR_ID}static{this.SIDE_BY_SIDE_LAYOUT_SETTING="workbench.editor.splitInGroupLayout"}static{this.VIEW_STATE_PREFERENCE_KEY="sideBySideEditorViewState"}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(A){}set maximumWidth(A){}set minimumHeight(A){}set maximumHeight(A){}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}constructor(A,k,L,R,M,N,P,x){super(w.ID,w.VIEW_STATE_PREFERENCE_KEY,A,k,R,N,L,P,x),this.configurationService=M,this.onDidCreateEditors=this._register(new a.Emitter),this._onDidChangeSizeConstraints=this._register(new a.Relay),this.onDidChangeSizeConstraints=a.Event.any(this.onDidCreateEditors.event,this._onDidChangeSizeConstraints.event),this._onDidChangeSelection=this._register(new a.Emitter),this.onDidChangeSelection=this._onDidChangeSelection.event,this.primaryEditorPane=void 0,this.secondaryEditorPane=void 0,this.splitviewDisposables=this._register(new u.DisposableStore),this.editorDisposables=this._register(new u.DisposableStore),this.orientation=this.configurationService.getValue(w.SIDE_BY_SIDE_LAYOUT_SETTING)==="vertical"?0:1,this.dimension=new y.Dimension(0,0),this.lastFocusedSide=void 0,this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(A=>this.onConfigurationUpdated(A)))}onConfigurationUpdated(A){A.affectsConfiguration(w.SIDE_BY_SIDE_LAYOUT_SETTING)&&(this.orientation=this.configurationService.getValue(w.SIDE_BY_SIDE_LAYOUT_SETTING)==="vertical"?0:1,this.splitview&&this.recreateSplitview())}recreateSplitview(){const A=(0,i.assertIsDefined)(this.getContainer()),k=this.getSplitViewRatio();this.splitview&&(A.removeChild(this.splitview.el),this.splitviewDisposables.clear()),this.createSplitView(A,k),this.layout(this.dimension)}getSplitViewRatio(){let A;if(this.splitview){const k=this.splitview.getViewSize(0),L=this.splitview.getViewSize(1);if(Math.abs(k-L)>1){const R=this.splitview.orientation===1?this.dimension.width:this.dimension.height;A=k/R}}return A}createEditor(A){A.classList.add("side-by-side-editor"),this.secondaryEditorContainer=(0,y.$)(".side-by-side-editor-container.editor-instance"),this.primaryEditorContainer=(0,y.$)(".side-by-side-editor-container.editor-instance"),this.createSplitView(A)}createSplitView(A,k){this.splitview=this.splitviewDisposables.add(new h.SplitView(A,{orientation:this.orientation})),this.splitviewDisposables.add(this.splitview.onDidSashReset(()=>this.splitview?.distributeViewSizes())),this.orientation===1?this.splitview.orthogonalEndSash=this._boundarySashes?.bottom:(this.splitview.orthogonalStartSash=this._boundarySashes?.left,this.splitview.orthogonalEndSash=this._boundarySashes?.right);let L=h.Sizing.Distribute,R=h.Sizing.Distribute;if(k){const P=this.splitview.orientation===1?this.dimension.width:this.dimension.height;L=Math.round(P*k),R=P-L,this.splitview.layout(this.orientation===1?this.dimension.width:this.dimension.height)}const M=(0,i.assertIsDefined)(this.secondaryEditorContainer);this.splitview.addView({element:M,layout:P=>this.layoutPane(this.secondaryEditorPane,P),minimumSize:this.orientation===1?o.DEFAULT_EDITOR_MIN_DIMENSIONS.width:o.DEFAULT_EDITOR_MIN_DIMENSIONS.height,maximumSize:Number.POSITIVE_INFINITY,onDidChange:a.Event.None},L);const N=(0,i.assertIsDefined)(this.primaryEditorContainer);this.splitview.addView({element:N,layout:P=>this.layoutPane(this.primaryEditorPane,P),minimumSize:this.orientation===1?o.DEFAULT_EDITOR_MIN_DIMENSIONS.width:o.DEFAULT_EDITOR_MIN_DIMENSIONS.height,maximumSize:Number.POSITIVE_INFINITY,onDidChange:a.Event.None},R),this.updateStyles()}getTitle(){return this.input?this.input.getName():(0,t.localize)(0,null)}async setInput(A,k,L,R){const M=this.input;await super.setInput(A,k,L,R),(!M||!A.matches(M))&&(M&&this.disposeEditors(),this.createEditors(A));const{primary:N,secondary:P,viewState:x}=this.loadViewState(A,k,L);if(this.lastFocusedSide=x?.focus,typeof x?.ratio=="number"&&this.splitview){const F=this.splitview.orientation===1?this.dimension.width:this.dimension.height;this.splitview.resizeView(0,Math.round(F*x.ratio))}else this.splitview?.distributeViewSizes();await Promise.all([this.secondaryEditorPane?.setInput(A.secondary,P,L,R),this.primaryEditorPane?.setInput(A.primary,N,L,R)]),typeof k?.target=="number"&&(this.lastFocusedSide=k.target)}loadViewState(A,k,L){const R=E(k?.viewState)?k?.viewState:this.loadEditorViewState(A,L);let M=Object.create(null),N;return k?.target===D.SideBySideEditor.SECONDARY?N={...k}:M={...k},M.viewState=R?.primary,R?.secondary&&(N?N.viewState=R?.secondary:N={viewState:R.secondary}),{primary:M,secondary:N,viewState:R}}createEditors(A){this.secondaryEditorPane=this.doCreateEditor(A.secondary,(0,i.assertIsDefined)(this.secondaryEditorContainer)),this.primaryEditorPane=this.doCreateEditor(A.primary,(0,i.assertIsDefined)(this.primaryEditorContainer)),this.layout(this.dimension),this._onDidChangeSizeConstraints.input=a.Event.any(a.Event.map(this.secondaryEditorPane.onDidChangeSizeConstraints,()=>{}),a.Event.map(this.primaryEditorPane.onDidChangeSizeConstraints,()=>{})),this.onDidCreateEditors.fire(void 0),this.editorDisposables.add(this.primaryEditorPane.onDidFocus(()=>this.onDidFocusChange(D.SideBySideEditor.PRIMARY))),this.editorDisposables.add(this.secondaryEditorPane.onDidFocus(()=>this.onDidFocusChange(D.SideBySideEditor.SECONDARY)))}doCreateEditor(A,k){const L=b.Registry.as(D.EditorExtensions.EditorPane).getEditorPane(A);if(!L)throw new Error("No editor pane descriptor for editor found");const R=L.instantiate(this.instantiationService);return R.create(k),R.setVisible(this.isVisible(),this.group),(0,D.isEditorPaneWithSelection)(R)&&this.editorDisposables.add(R.onDidChangeSelection(M=>this._onDidChangeSelection.fire(M))),this.editorDisposables.add(R),R}onDidFocusChange(A){this.lastFocusedSide=A,this._onDidChangeControl.fire()}getSelection(){const A=this.getLastFocusedEditorPane();if((0,D.isEditorPaneWithSelection)(A)){const k=A.getSelection();if(k)return new I(k,A===this.primaryEditorPane?D.SideBySideEditor.PRIMARY:D.SideBySideEditor.SECONDARY)}}setOptions(A){super.setOptions(A),typeof A?.target=="number"&&(this.lastFocusedSide=A.target),this.getLastFocusedEditorPane()?.setOptions(A)}setEditorVisible(A,k){this.primaryEditorPane?.setVisible(A,k),this.secondaryEditorPane?.setVisible(A,k),super.setEditorVisible(A,k)}clearInput(){super.clearInput(),this.primaryEditorPane?.clearInput(),this.secondaryEditorPane?.clearInput(),this.disposeEditors()}focus(){this.getLastFocusedEditorPane()?.focus()}getLastFocusedEditorPane(){return this.lastFocusedSide===D.SideBySideEditor.SECONDARY?this.secondaryEditorPane:this.primaryEditorPane}layout(A){this.dimension=A,(0,i.assertIsDefined)(this.splitview).layout(this.orientation===1?A.width:A.height)}setBoundarySashes(A){this._boundarySashes=A,this.splitview&&(this.splitview.orthogonalEndSash=A.bottom)}layoutPane(A,k){A?.layout(this.orientation===1?new y.Dimension(k,this.dimension.height):new y.Dimension(this.dimension.width,k))}getControl(){return this.getLastFocusedEditorPane()?.getControl()}getPrimaryEditorPane(){return this.primaryEditorPane}getSecondaryEditorPane(){return this.secondaryEditorPane}tracksEditorViewState(A){return A instanceof T.SideBySideEditorInput}computeEditorViewState(A){if(!this.input||!(0,n.isEqual)(A,this.toEditorViewStateResource(this.input)))return;const k=this.primaryEditorPane?.getViewState(),L=this.secondaryEditorPane?.getViewState();if(!(!k||!L))return{primary:k,secondary:L,focus:this.lastFocusedSide,ratio:this.getSplitViewRatio()}}toEditorViewStateResource(A){let k,L;if(A instanceof T.SideBySideEditorInput&&(k=A.primary.resource,L=A.secondary.resource),!(!L||!k))return g.URI.from({scheme:"sideBySide",path:`${(0,y.multibyteAwareBtoa)(L.toString())}${(0,y.multibyteAwareBtoa)(k.toString())}`})}updateStyles(){super.updateStyles(),this.primaryEditorContainer&&(this.orientation===1?(this.primaryEditorContainer.style.borderLeftWidth="1px",this.primaryEditorContainer.style.borderLeftStyle="solid",this.primaryEditorContainer.style.borderLeftColor=this.getColor(d.SIDE_BY_SIDE_EDITOR_VERTICAL_BORDER)??"",this.primaryEditorContainer.style.borderTopWidth="0"):(this.primaryEditorContainer.style.borderTopWidth="1px",this.primaryEditorContainer.style.borderTopStyle="solid",this.primaryEditorContainer.style.borderTopColor=this.getColor(d.SIDE_BY_SIDE_EDITOR_HORIZONTAL_BORDER)??"",this.primaryEditorContainer.style.borderLeftWidth="0"))}dispose(){this.disposeEditors(),super.dispose()}disposeEditors(){this.editorDisposables.clear(),this.secondaryEditorPane=void 0,this.primaryEditorPane=void 0,this.lastFocusedSide=void 0,this.secondaryEditorContainer&&(0,y.clearNode)(this.secondaryEditorContainer),this.primaryEditorContainer&&(0,y.clearNode)(this.primaryEditorContainer)}};e.SideBySideEditor=C,e.SideBySideEditor=C=w=fe([O(0,f.ITelemetryService),O(1,v.IInstantiationService),O(2,m.IThemeService),O(3,r.IStorageService),O(4,s.IConfigurationService),O(5,c.ITextResourceConfigurationService),O(6,l.IEditorService),O(7,S.IEditorGroupsService)],C);class I{constructor(A,k){this.selection=A,this.side=k}compare(A){return!(A instanceof I)||this.side!==A.side?3:this.selection.compare(A.selection)}restore(A){const k={...A,target:this.side};return this.selection.restore(k)}}}),define(Q[951],Y([1,0,6,47,163,236,5,9,4,16,20]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorGroupModel=e.isGroupEditorCloseEvent=e.isGroupEditorMoveEvent=e.isGroupEditorOpenEvent=e.isGroupEditorChangeEvent=e.isSerializedEditorGroupModel=void 0;const a={LEFT:"left",RIGHT:"right",FIRST:"first",LAST:"last"};function r(p){const c=p;return!!(c&&typeof c=="object"&&Array.isArray(c.editors)&&Array.isArray(c.mru))}e.isSerializedEditorGroupModel=r;function i(p){const c=p;return c.editor&&c.editorIndex!==void 0}e.isGroupEditorChangeEvent=i;function s(p){const c=p;return c.kind===3&&c.editorIndex!==void 0}e.isGroupEditorOpenEvent=s;function o(p){const c=p;return c.kind===5&&c.editorIndex!==void 0&&c.oldEditorIndex!==void 0}e.isGroupEditorMoveEvent=o;function u(p){const c=p;return c.kind===4&&c.editorIndex!==void 0&&c.context!==void 0&&c.sticky!==void 0}e.isGroupEditorCloseEvent=u;let d=class extends v.Disposable{static{h=this}static{this.IDS=0}get id(){return this._id}constructor(c,l,n){super(),this.instantiationService=l,this.configurationService=n,this._onDidModelChange=this._register(new t.Emitter),this.onDidModelChange=this._onDidModelChange.event,this.editors=[],this.mru=[],this.editorListeners=new Set,this.locked=!1,this.preview=null,this.active=null,this.sticky=-1,r(c)?this._id=this.deserialize(c):this._id=h.IDS++,this.onConfigurationUpdated(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(c=>this.onConfigurationUpdated(c)))}onConfigurationUpdated(c){c&&!c.affectsConfiguration("workbench.editor.openPositioning")&&!c.affectsConfiguration("workbench.editor.focusRecentEditorAfterClose")||(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(c,l){const n=c===0?this.mru.slice(0):this.editors.slice(0);return l?.excludeSticky?c===0?n.filter(g=>!this.isSticky(g)):n.slice(this.sticky+1):n}getEditorByIndex(c){return this.editors[c]}get activeEditor(){return this.active}isActive(c){return this.matches(this.active,c)}get previewEditor(){return this.preview}openEditor(c,l){const n=l?.sticky||typeof l?.index=="number"&&this.isSticky(l.index),g=l?.pinned||l?.sticky,w=l?.active||!this.activeEditor||!g&&this.matches(this.preview,this.activeEditor),E=this.findEditor(c,l);if(E){const[C,I]=E;return g&&this.doPin(C,I),w&&this.doSetActive(C,I),l&&typeof l.index=="number"&&this.moveEditor(C,l.index),n&&this.doStick(C,this.indexOf(C)),{editor:C,isNew:!1}}else{const C=c,I=this.indexOf(this.active);let _;if(l&&typeof l.index=="number"?_=l.index:this.editorOpenPositioning===a.FIRST?(_=0,!n&&this.isSticky(_)&&(_=this.sticky+1)):this.editorOpenPositioning===a.LAST?_=this.editors.length:(this.editorOpenPositioning===a.LEFT?I===0||!this.editors.length?_=0:_=I:_=I+1,!n&&this.isSticky(_)&&(_=this.sticky+1)),n&&(this.sticky++,this.isSticky(_)||(_=this.sticky)),(g||!this.preview)&&this.splice(_,!1,C),!g){if(this.preview){const k=this.indexOf(this.preview);_>k&&_--,this.replaceEditor(this.preview,C,_,!w)}this.preview=C}this.registerEditorListeners(C);const A={kind:3,editor:C,editorIndex:_};return this._onDidModelChange.fire(A),w&&this.doSetActive(C,_),{editor:C,isNew:!0}}}registerEditorListeners(c){const l=new v.DisposableStore;this.editorListeners.add(l),l.add(t.Event.once(c.onWillDispose)(()=>{const n=this.editors.indexOf(c);if(n>=0){const g={kind:12,editor:c,editorIndex:n};this._onDidModelChange.fire(g)}})),l.add(c.onDidChangeDirty(()=>{const n={kind:11,editor:c,editorIndex:this.editors.indexOf(c)};this._onDidModelChange.fire(n)})),l.add(c.onDidChangeLabel(()=>{const n={kind:7,editor:c,editorIndex:this.editors.indexOf(c)};this._onDidModelChange.fire(n)})),l.add(c.onDidChangeCapabilities(()=>{const n={kind:8,editor:c,editorIndex:this.editors.indexOf(c)};this._onDidModelChange.fire(n)})),l.add(this.onDidModelChange(n=>{n.kind===4&&n.editor?.matches(c)&&((0,v.dispose)(l),this.editorListeners.delete(l))}))}replaceEditor(c,l,n,g=!0){const w=this.doCloseEditor(c,y.EditorCloseContext.REPLACE,g);if(this.splice(n,!1,l),w){const E={kind:4,...w};this._onDidModelChange.fire(E)}}closeEditor(c,l=y.EditorCloseContext.UNKNOWN,n=!0){const g=this.doCloseEditor(c,l,n);if(g){const w={kind:4,...g};return this._onDidModelChange.fire(w),g}}doCloseEditor(c,l,n){const g=this.indexOf(c);if(g===-1)return;const w=this.editors[g],E=this.isSticky(g);if(n&&this.matches(this.active,w))if(this.mru.length>1){let C;this.focusRecentEditorAfterClose?C=this.mru[1]:g===this.editors.length-1?C=this.editors[g-1]:C=this.editors[g+1],this.doSetActive(C,this.editors.indexOf(C))}else this.active=null;return this.matches(this.preview,w)&&(this.preview=null),this.splice(g,!0),{editor:w,sticky:E,editorIndex:g,context:l}}moveEditor(c,l){l>=this.editors.length?l=this.editors.length-1:l<0&&(l=0);const n=this.indexOf(c);if(n<0||l===n)return;const g=this.editors[n],w=this.sticky;this.isSticky(n)&&l>this.sticky?this.sticky--:!this.isSticky(n)&&l<=this.sticky&&this.sticky++,this.editors.splice(n,1),this.editors.splice(l,0,g);const E={kind:5,editor:g,oldEditorIndex:n,editorIndex:l};if(this._onDidModelChange.fire(E),w!==this.sticky){const C={kind:10,editor:g,editorIndex:l};this._onDidModelChange.fire(C)}return g}setActive(c){let l;return c?l=this.setEditorActive(c):this.setGroupActive(),l}setGroupActive(){this._onDidModelChange.fire({kind:0})}setEditorActive(c){const l=this.findEditor(c);if(!l)return;const[n,g]=l;return this.doSetActive(n,g),n}doSetActive(c,l){if(this.matches(this.active,c))return;this.active=c;const n=this.indexOf(c,this.mru);this.mru.splice(n,1),this.mru.unshift(c);const g={kind:6,editor:c,editorIndex:l};this._onDidModelChange.fire(g)}setIndex(c){this._onDidModelChange.fire({kind:1})}pin(c){const l=this.findEditor(c);if(!l)return;const[n,g]=l;return this.doPin(n,g),n}doPin(c,l){if(this.isPinned(c))return;this.preview=null;const n={kind:9,editor:c,editorIndex:l};this._onDidModelChange.fire(n)}unpin(c){const l=this.findEditor(c);if(!l)return;const[n,g]=l;return this.doUnpin(n,g),n}doUnpin(c,l){if(!this.isPinned(c))return;const n=this.preview;this.preview=c;const g={kind:9,editor:c,editorIndex:l};this._onDidModelChange.fire(g),n&&this.closeEditor(n,y.EditorCloseContext.UNPIN)}isPinned(c){let l;return typeof c=="number"?l=this.editors[c]:l=c,!this.matches(this.preview,l)}stick(c){const l=this.findEditor(c);if(!l)return;const[n,g]=l;return this.doStick(n,g),n}doStick(c,l){if(this.isSticky(l))return;this.pin(c);const n=this.sticky+1;this.moveEditor(c,n),this.sticky++;const g={kind:10,editor:c,editorIndex:n};this._onDidModelChange.fire(g)}unstick(c){const l=this.findEditor(c);if(!l)return;const[n,g]=l;return this.doUnstick(n,g),n}doUnstick(c,l){if(!this.isSticky(l))return;const n=this.sticky;this.moveEditor(c,n),this.sticky--;const g={kind:10,editor:c,editorIndex:n};this._onDidModelChange.fire(g)}isSticky(c){if(this.sticky<0)return!1;let l;return typeof c=="number"?l=c:l=this.indexOf(c),l<0?!1:l<=this.sticky}splice(c,l,n){const g=this.editors[c];if(l&&this.isSticky(c)&&this.sticky--,n?this.editors.splice(c,l?1:0,n):this.editors.splice(c,l?1:0),!l&&n)this.mru.length===0?this.mru.push(n):this.mru.splice(1,0,n);else{const w=this.indexOf(g,this.mru);l&&!n?this.mru.splice(w,1):l&&n&&this.mru.splice(w,1,n)}}indexOf(c,l=this.editors,n){let g=-1;if(!c)return g;for(let w=0;w<l.length;w++){const E=l[w];if(this.matches(E,c,n))if(n?.supportSideBySide&&E instanceof D.SideBySideEditorInput&&!(c instanceof D.SideBySideEditorInput))g=w;else{g=w;break}}return g}findEditor(c,l){const n=this.indexOf(c,this.editors,l);if(n!==-1)return[this.editors[n],n]}isFirst(c){return this.matches(this.editors[0],c)}isLast(c){return this.matches(this.editors[this.editors.length-1],c)}contains(c,l){return this.indexOf(c,this.editors,l)!==-1}matches(c,l,n){if(!c||!l)return!1;if(n?.supportSideBySide&&c instanceof D.SideBySideEditorInput&&!(l instanceof D.SideBySideEditorInput))switch(n.supportSideBySide){case y.SideBySideEditor.ANY:if(this.matches(c.primary,l,n)||this.matches(c.secondary,l,n))return!0;break;case y.SideBySideEditor.BOTH:if(this.matches(c.primary,l,n)&&this.matches(c.secondary,l,n))return!0;break}const g=c===l;return n?.strictEquals?g:g||c.matches(l)}get isLocked(){return this.locked}lock(c){this.isLocked!==c&&(this.locked=c,this._onDidModelChange.fire({kind:2}))}clone(){const c=this.instantiationService.createInstance(h,void 0);c.editors=this.editors.slice(0),c.mru=this.mru.slice(0),c.preview=this.preview,c.active=this.active,c.sticky=this.sticky;for(const l of c.editors)c.registerEditorListeners(l);return c}serialize(){const c=m.Registry.as(y.EditorExtensions.EditorFactory),l=[],n=[];let g,w=this.sticky;for(let C=0;C<this.editors.length;C++){const I=this.editors[C];let _=!1;const A=c.getEditorSerializer(I);if(A){const k=A.serialize(I);typeof k=="string"?(_=!0,n.push({id:I.typeId,value:k}),l.push(I),this.preview===I&&(g=l.length-1)):_=!1}!_&&this.isSticky(C)&&w--}const E=this.mru.map(C=>this.indexOf(C,l)).filter(C=>C>=0);return{id:this.id,locked:this.locked?!0:void 0,editors:n,mru:E,preview:g,sticky:w>=0?w:void 0}}deserialize(c){const l=m.Registry.as(y.EditorExtensions.EditorFactory);return typeof c.id=="number"?(this._id=c.id,h.IDS=Math.max(c.id+1,h.IDS)):this._id=h.IDS++,c.locked&&(this.locked=!0),this.editors=(0,S.coalesce)(c.editors.map((n,g)=>{let w;const E=l.getEditorSerializer(n.id);if(E){const C=E.deserialize(this.instantiationService,n.value);C instanceof b.EditorInput&&(w=C,this.registerEditorListeners(w))}return!w&&typeof c.sticky=="number"&&g<=c.sticky&&c.sticky--,w})),this.mru=(0,S.coalesce)(c.mru.map(n=>this.editors[n])),this.active=this.mru[0],typeof c.preview=="number"&&(this.preview=this.editors[c.preview]),typeof c.sticky=="number"&&(this.sticky=c.sticky),this._id}dispose(){(0,v.dispose)(Array.from(this.editorListeners)),this.editorListeners.clear(),super.dispose()}};e.EditorGroupModel=d,e.EditorGroupModel=d=h=fe([O(1,T.IInstantiationService),O(2,f.IConfigurationService)],d)}),define(Q[3710],Y([1,0,650,6,4,109,123,414,220,9,5,154,21]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioCueLineFeatureContribution=void 0;let r=class extends b.Disposable{constructor(u,d,p,c){super(),this.editorService=u,this.instantiationService=d,this.audioCueService=p,this._configurationService=c,this.store=this._register(new b.DisposableStore),this.features=[this.instantiationService.createInstance(i,v.AudioCue.error,h.MarkerSeverity.Error),this.instantiationService.createInstance(i,v.AudioCue.warning,h.MarkerSeverity.Warning),this.instantiationService.createInstance(s)],this.isEnabledCache=new t.CachedFunction(g=>(0,D.observableFromEvent)(this.audioCueService.onEnabledChanged(g),()=>this.audioCueService.isEnabled(g)));const l=(0,D.derived)(g=>this.features.some(w=>this.isEnabledCache.get(w.audioCue).read(g))),n=(0,D.observableFromEvent)(this.editorService.onDidActiveEditorChange,g=>{const w=this.editorService.activeTextEditorControl,E=(0,T.isDiffEditor)(w)?w.getOriginalEditor():(0,T.isCodeEditor)(w)?w:void 0;return E&&E.hasModel()?{editor:E,model:E.getModel()}:void 0});this._register((0,D.autorun)(g=>{if(this.store.clear(),!l.read(g))return;const w=n.read(g);w&&this.registerAudioCuesForEditor(w.editor,w.model,this.store)}))}registerAudioCuesForEditor(u,d,p){const c=(0,D.observableFromEvent)(u.onDidChangeCursorPosition,E=>{if(!(E&&E.reason!==3&&E.reason!==0))return u.getPosition()}),l=(0,D.debouncedObservable)(c,this._configurationService.getValue("audioCues.debouncePositionChanges")?300:0,p),n=(0,D.wasEventTriggeredRecently)(d.onDidChangeContent.bind(d),1e3,p),g=this.features.map(E=>{const C=E.getObservableState(u,d),I=(0,D.derivedOpts)({debugName:`isPresentInLine:${E.audioCue.name}`},_=>{if(!this.isEnabledCache.get(E.audioCue).read(_))return!1;const A=l.read(_);return A?C.read(_).isPresent(A):!1});return(0,D.derivedOpts)({debugName:`typingDebouncedFeatureState: ${E.audioCue.name}`},_=>E.debounceWhileTyping&&n.read(_)?(l.read(_),I.get()):I.read(_))}),w=(0,D.derived)(E=>({lineNumber:l.read(E),featureStates:new Map(this.features.map((C,I)=>[C,g[I].read(E)]))}));p.add((0,D.autorunDelta)(w,({lastValue:E,newValue:C})=>{const I=this.features.filter(_=>C?.featureStates.get(_)&&(!E?.featureStates?.get(_)||C.lineNumber!==E.lineNumber));this.audioCueService.playAudioCues(I.map(_=>_.audioCue))}))}};e.AudioCueLineFeatureContribution=r,e.AudioCueLineFeatureContribution=r=fe([O(0,a.IEditorService),O(1,S.IInstantiationService),O(2,v.IAudioCueService),O(3,m.IConfigurationService)],r);let i=class{constructor(u,d,p){this.audioCue=u,this.severity=d,this.markerService=p,this.debounceWhileTyping=!0,this._previousLine=0}getObservableState(u,d){return(0,D.observableFromEvent)(y.Event.filter(this.markerService.onMarkerChanged,p=>p.some(c=>c.toString()===d.uri.toString())),()=>({isPresent:p=>{const c=p.lineNumber!==this._previousLine;return this._previousLine=p.lineNumber,this.markerService.read({resource:d.uri}).some(n=>{const g=n.severity===this.severity&&n.startLineNumber<=p.lineNumber&&p.lineNumber<=n.endLineNumber;return c?g:g&&p.lineNumber<=n.endLineNumber&&n.startColumn<=p.column&&n.endColumn>=p.column})}}))}};i=fe([O(2,h.IMarkerService)],i);class s{constructor(){this.audioCue=v.AudioCue.foldedArea}getObservableState(u,d){const p=f.FoldingController.get(u);return p?(0,D.observableFromPromise)(p.getFoldingModel()??Promise.resolve(void 0)).map(l=>({isPresent:n=>{const g=l.value?.getRegionAtLine(n.lineNumber);return g?g.isCollapsed&&g.startLineNumber===n.lineNumber:!1}})):(0,D.constObservable)({isPresent:()=>!1})}}}),define(Q[473],Y([1,0,17,10,152,71,530,21]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkCellEdits=e.ResourceNotebookCellEdit=void 0;class v extends b.ResourceEdit{static is(h){return h instanceof v?!0:y.URI.isUri(h.resource)&&(0,t.isObject)(h.cellEdit)}static lift(h){return h instanceof v?h:new v(h.resource,h.cellEdit,h.notebookVersionId,h.metadata)}constructor(h,a,r=void 0,i){super(i),this.resource=h,this.cellEdit=a,this.notebookVersionId=r}}e.ResourceNotebookCellEdit=v;let m=class{constructor(h,a,r,i,s,o,u){this._editorService=o,s=s.map(d=>{if(d.resource.scheme===D.CellUri.scheme){const p=D.CellUri.parse(d.resource)?.notebook;if(!p)throw new Error(`Invalid notebook URI: ${d.resource}`);return new v(p,d.cellEdit,d.notebookVersionId,d.metadata)}else return d})}async apply(){return[]}};e.BulkCellEdits=m,e.BulkCellEdits=m=fe([O(5,f.IEditorService),O(6,T.INotebookEditorModelResolverService)],m)}),define(Q[3711],Y([1,0,25,57,69,4,6,152,473,11]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConflictDetector=void 0;let S=class{constructor(a,r,i,s){this._conflicts=new b.ResourceMap,this._disposables=new D.DisposableStore,this._onDidConflict=new T.Emitter,this.onDidConflict=this._onDidConflict.event;const o=new b.ResourceMap;for(const d of a)if(d instanceof f.ResourceTextEdit){if(o.set(d.resource,!0),typeof d.versionId=="number"){const p=i.getModel(d.resource);p&&p.getVersionId()!==d.versionId&&(this._conflicts.set(d.resource,!0),this._onDidConflict.fire(this))}}else d instanceof f.ResourceFileEdit?d.newResource?o.set(d.newResource,!0):d.oldResource&&o.set(d.oldResource,!0):d instanceof v.ResourceNotebookCellEdit?o.set(d.resource,!0):s.warn("UNKNOWN edit type",d);this._disposables.add(r.onDidFilesChange(d=>{for(const p of o.keys())if(!i.getModel(p)&&d.contains(p)){this._conflicts.set(p,!0),this._onDidConflict.fire(this);break}}));const u=d=>{o.has(d.uri)&&(this._conflicts.set(d.uri,!0),this._onDidConflict.fire(this))};for(const d of i.getModels())this._disposables.add(d.onDidChangeContent(()=>u(d)))}dispose(){this._disposables.dispose(),this._onDidConflict.dispose()}list(){return[...this._conflicts.keys()]}hasConflicts(){return this._conflicts.size>0}};e.ConflictDetector=S,e.ConflictDetector=S=fe([O(1,t.IFileService),O(2,y.IModelService),O(3,m.ILogService)],S)}),define(Q[952],Y([1,0,75,10,50,57,98,4,20,27,165,5,25,6,3711,69,2605,26,152,32,59,304,651]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";var g,w;Object.defineProperty(e,"__esModule",{value:!0}),e.BulkEditPreviewProvider=e.BulkFileOperations=e.BulkCategory=e.BulkFileOperation=e.BulkFileOperationType=e.BulkTextEdit=e.CheckedStates=void 0;class E{constructor(){this._states=new WeakMap,this._checkedCount=0,this._onDidChange=new r.Emitter,this.onDidChange=this._onDidChange.event}dispose(){this._onDidChange.dispose()}get checkedCount(){return this._checkedCount}isChecked(M){return this._states.get(M)??!1}updateChecked(M,N){const P=this._states.get(M);P!==N&&(P===void 0?N&&(this._checkedCount+=1):N?this._checkedCount+=1:this._checkedCount-=1,this._states.set(M,N),this._onDidChange.fire(M))}}e.CheckedStates=E;class C{constructor(M,N){this.parent=M,this.textEdit=N}}e.BulkTextEdit=C;var I;(function(R){R[R.TextEdit=1]="TextEdit",R[R.Create=2]="Create",R[R.Delete=4]="Delete",R[R.Rename=8]="Rename"})(I||(e.BulkFileOperationType=I={}));class _{constructor(M,N){this.uri=M,this.parent=N,this.type=0,this.textEdits=[],this.originalEdits=new Map}addEdit(M,N,P){this.type|=N,this.originalEdits.set(M,P),P instanceof d.ResourceTextEdit?this.textEdits.push(new C(this,P)):N===8&&(this.newUri=P.newResource)}needsConfirmation(){for(const[,M]of this.originalEdits)if(!this.parent.checked.isChecked(M))return!0;return!1}}e.BulkFileOperation=_;class A{static{this._defaultMetadata=Object.freeze({label:(0,o.localize)(0,null),icon:p.Codicon.symbolFile,needsConfirmation:!1})}static keyOf(M){return M?.label||"<default>"}constructor(M=A._defaultMetadata){this.metadata=M,this.operationByResource=new Map}get fileOperations(){return this.operationByResource.values()}}e.BulkCategory=A;let k=g=class{static async create(M,N){return await M.get(h.IInstantiationService).createInstance(g,N)._init()}constructor(M,N,P){this._bulkEdit=M,this._fileService=N,this.checked=new E,this.fileOperations=[],this.categories=[],this.conflicts=P.createInstance(i.ConflictDetector,M)}dispose(){this.checked.dispose(),this.conflicts.dispose()}async _init(){const M=new Map,N=new Map,P=new s.ResourceMap;for(let x=0;x<this._bulkEdit.length;x++){const F=this._bulkEdit[x];let V,W;if(this.checked.updateChecked(F,!F.metadata?.needsConfirmation),F instanceof d.ResourceTextEdit)W=1,V=F.resource;else if(F instanceof d.ResourceFileEdit)if(F.newResource&&F.oldResource){if(W=8,V=F.oldResource,F.options?.overwrite===void 0&&F.options?.ignoreIfExists&&await this._fileService.exists(V))continue;P.set(F.newResource,V)}else if(F.oldResource){if(W=4,V=F.oldResource,F.options?.ignoreIfNotExists&&!await this._fileService.exists(V))continue}else if(F.newResource){if(W=2,V=F.newResource,F.options?.overwrite===void 0&&F.options?.ignoreIfExists&&await this._fileService.exists(V))continue}else continue;else continue;const z=(H,U)=>{let G=u.extUri.getComparisonKey(H,!0),$=U.get(G);!$&&P.has(H)&&(H=P.get(H),G=u.extUri.getComparisonKey(H,!0),$=U.get(G)),$||($=new _(H,this),U.set(G,$)),$.addEdit(x,W,F)};z(V,M);const B=A.keyOf(F.metadata);let K=N.get(B);K||(K=new A(F.metadata),N.set(B,K)),z(V,K.operationByResource)}M.forEach(x=>this.fileOperations.push(x)),N.forEach(x=>this.categories.push(x));for(const x of this.fileOperations)if(x.type!==1){let F=!0;for(const V of x.originalEdits.values())V instanceof d.ResourceFileEdit&&(F=F&&this.checked.isChecked(V));if(!F)for(const V of x.originalEdits.values())this.checked.updateChecked(V,F)}return this.categories.sort((x,F)=>x.metadata.needsConfirmation===F.metadata.needsConfirmation?x.metadata.label.localeCompare(F.metadata.label):x.metadata.needsConfirmation?-1:1),this}getWorkspaceEdit(){const M=[];let N=!0;for(let P=0;P<this._bulkEdit.length;P++){const x=this._bulkEdit[P];if(this.checked.isChecked(x)){M[P]=x;continue}N=!1}return N?this._bulkEdit:((0,v.coalesceInPlace)(M),M)}getFileEdits(M){for(const N of this.fileOperations)if(N.uri.toString()===M.toString()){const P=[];let x=!1;for(const F of N.originalEdits.values())F instanceof d.ResourceTextEdit?this.checked.isChecked(F)&&P.push(S.EditOperation.replaceMove(m.Range.lift(F.textEdit.range),F.textEdit.insertAsSnippet?l.SnippetParser.asInsertText(F.textEdit.text):F.textEdit.text)):this.checked.isChecked(F)||(x=!0);return x?[]:P.sort((F,V)=>m.Range.compareRangesUsingStarts(F.range,V.range))}return[]}getUriOfEdit(M){for(const N of this.fileOperations)for(const P of N.originalEdits.values())if(P===M)return N.uri;throw new Error("invalid edit")}};e.BulkFileOperations=k,e.BulkFileOperations=k=g=fe([O(1,a.IFileService),O(2,h.IInstantiationService)],k);let L=class{static{w=this}static{this.Schema="vscode-bulkeditpreview"}static{this.emptyPreview=y.URI.from({scheme:w.Schema,fragment:"empty"})}static fromPreviewUri(M){return y.URI.parse(M.query)}constructor(M,N,P,x){this._operations=M,this._languageService=N,this._modelService=P,this._textModelResolverService=x,this._disposables=new f.DisposableStore,this._modelPreviewEdits=new Map,this._instanceId=(0,c.generateUuid)(),this._disposables.add(this._textModelResolverService.registerTextModelContentProvider(w.Schema,this)),this._ready=this._init()}dispose(){this._disposables.dispose()}asPreviewUri(M){return y.URI.from({scheme:w.Schema,authority:this._instanceId,path:M.path,query:M.toString()})}async _init(){for(const M of this._operations.fileOperations)await this._applyTextEditsToPreviewModel(M.uri);this._disposables.add(r.Event.debounce(this._operations.checked.onDidChange,(M,N)=>N,n.MicrotaskDelay)(M=>{const N=this._operations.getUriOfEdit(M);this._applyTextEditsToPreviewModel(N)}))}async _applyTextEditsToPreviewModel(M){const N=await this._getOrCreatePreviewModel(M),P=this._modelPreviewEdits.get(N.id);P&&N.applyEdits(P);const x=this._operations.getFileEdits(M),F=N.applyEdits(x,!0);this._modelPreviewEdits.set(N.id,F)}async _getOrCreatePreviewModel(M){const N=this.asPreviewUri(M);let P=this._modelService.getModel(N);if(!P){try{const x=await this._textModelResolverService.createModelReference(M),F=x.object.textEditorModel;P=this._modelService.createModel((0,T.createTextBufferFactoryFromSnapshot)(F.createSnapshot()),this._languageService.createById(F.getLanguageId()),N),x.dispose()}catch{P=this._modelService.createModel("",this._languageService.createByFilepathOrFirstLine(N),N)}queueMicrotask(async()=>{this._disposables.add(await this._textModelResolverService.createModelReference(P.uri))})}return P}async provideTextContent(M){return M.toString()===w.emptyPreview.toString()?this._modelService.createModel("",null,M):(await this._ready,this._modelService.getModel(M))}};e.BulkEditPreviewProvider=L,e.BulkEditPreviewProvider=L=w=fe([O(1,b.ILanguageService),O(2,D.IModelService),O(3,t.ITextModelService)],L)}),define(Q[3712],Y([1,0,75,128,444,27,7,4,98,952,25,2606,61,306,26,19,37,33,10,189,152,125,50,146,304]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w){"use strict";var E,C,I;Object.defineProperty(e,"__esModule",{value:!0}),e.BulkEditNaviLabelProvider=e.BulkEditDelegate=e.TextEditElementRenderer=e.FileElementRenderer=e.CategoryElementRenderer=e.BulkEditIdentityProvider=e.BulkEditAccessibilityProvider=e.BulkEditSorter=e.BulkEditDataSource=e.TextEditElement=e.FileElement=e.CategoryElement=void 0;class _{constructor(U,G){this.parent=U,this.category=G}isChecked(){const U=this.parent;let G=!0;for(const $ of this.category.fileOperations)for(const ie of $.originalEdits.values())G=G&&U.checked.isChecked(ie);return G}setChecked(U){const G=this.parent;for(const $ of this.category.fileOperations)for(const ie of $.originalEdits.values())G.checked.updateChecked(ie,U)}}e.CategoryElement=_;class A{constructor(U,G){this.parent=U,this.edit=G}isChecked(){const U=this.parent instanceof _?this.parent.parent:this.parent;let G=!0;this.edit.type===1&&(G=!this.edit.textEdits.every($=>!U.checked.isChecked($.textEdit)));for(const $ of this.edit.originalEdits.values())$ instanceof c.ResourceFileEdit&&(G=G&&U.checked.isChecked($));if(this.parent instanceof _&&this.edit.type===1){for(const $ of U.categories)for(const ie of $.fileOperations)if(ie.uri.toString()===this.edit.uri.toString())for(const J of ie.originalEdits.values())J instanceof c.ResourceFileEdit&&(G=G&&U.checked.isChecked(J))}return G}setChecked(U){const G=this.parent instanceof _?this.parent.parent:this.parent;for(const $ of this.edit.originalEdits.values())G.checked.updateChecked($,U);if(this.parent instanceof _&&this.edit.type!==1){for(const $ of G.categories)for(const ie of $.fileOperations)if(ie.uri.toString()===this.edit.uri.toString())for(const J of ie.originalEdits.values())G.checked.updateChecked(J,U)}}isDisabled(){if(this.parent instanceof _&&this.edit.type===1){const U=this.parent.parent;let G=!0;for(const $ of U.categories)for(const ie of $.fileOperations)if(ie.uri.toString()===this.edit.uri.toString())for(const J of ie.originalEdits.values())J instanceof c.ResourceFileEdit&&(G=G&&U.checked.isChecked(J));return!G}return!1}}e.FileElement=A;class k{constructor(U,G,$,ie,J,j,ee){this.parent=U,this.idx=G,this.edit=$,this.prefix=ie,this.selecting=J,this.inserting=j,this.suffix=ee}isChecked(){let U=this.parent.parent;return U instanceof _&&(U=U.parent),U.checked.isChecked(this.edit.textEdit)}setChecked(U){let G=this.parent.parent;if(G instanceof _&&(G=G.parent),G.checked.updateChecked(this.edit.textEdit,U),U)for(const $ of this.parent.edit.originalEdits.values())$ instanceof c.ResourceFileEdit&&G.checked.updateChecked($,U)}isDisabled(){return this.parent.isDisabled()}}e.TextEditElement=k;let L=class{constructor(U,G,$,ie){this._textModelService=U,this._undoRedoService=G,this._languageService=$,this._languageConfigurationService=ie,this.groupByFile=!0}hasChildren(U){return U instanceof A?U.edit.textEdits.length>0:!(U instanceof k)}async getChildren(U){if(U instanceof m.BulkFileOperations)return this.groupByFile?U.fileOperations.map(G=>new A(U,G)):U.categories.map(G=>new _(U,G));if(U instanceof _)return Array.from(U.category.fileOperations,G=>new A(U,G));if(U instanceof A&&U.edit.textEdits.length>0){let G,$;try{const J=await this._textModelService.createModelReference(U.edit.uri);G=J.object.textEditorModel,$=J}catch{G=new v.TextModel("",g.PLAINTEXT_LANGUAGE_ID,v.TextModel.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),$=G}const ie=U.edit.textEdits.map((J,j)=>{const ee=D.Range.lift(J.textEdit.textEdit.range),X=G.tokenization.getLineTokens(ee.startLineNumber);let te=23;for(let re=X.findTokenIndexAtOffset(ee.startColumn-1)-1;te<50&&re>=0;re--)te=ee.startColumn-X.getStartOffset(re);const Z=G.tokenization.getLineTokens(ee.endLineNumber);let se=0;for(let re=Z.findTokenIndexAtOffset(ee.endColumn-1);se<50&&re<Z.getCount();re++)se+=Z.getEndOffset(re)-Z.getStartOffset(re);return new k(U,j,J,G.getValueInRange(new D.Range(ee.startLineNumber,ee.startColumn-te,ee.startLineNumber,ee.startColumn)),G.getValueInRange(ee),J.textEdit.textEdit.insertAsSnippet?w.SnippetParser.asInsertText(J.textEdit.textEdit.text):J.textEdit.textEdit.text,G.getValueInRange(new D.Range(ee.endLineNumber,ee.endColumn,ee.endLineNumber,ee.endColumn+se)))});return $.dispose(),ie}return[]}};e.BulkEditDataSource=L,e.BulkEditDataSource=L=fe([O(0,t.ITextModelService),O(1,p.IUndoRedoService),O(2,n.ILanguageService),O(3,l.ILanguageConfigurationService)],L);class R{compare(U,G){return U instanceof A&&G instanceof A?(0,u.compare)(U.edit.uri.toString(),G.edit.uri.toString()):U instanceof k&&G instanceof k?D.Range.compareRangesUsingStarts(U.edit.textEdit.textEdit.range,G.edit.textEdit.textEdit.range):0}}e.BulkEditSorter=R;let M=class{constructor(U){this._labelService=U}getWidgetAriaLabel(){return(0,h.localize)(0,null)}getRole(U){return"checkbox"}getAriaLabel(U){if(U instanceof A){if(U.edit.textEdits.length>0)return U.edit.type&8&&U.edit.newUri?(0,h.localize)(1,null,this._labelService.getUriLabel(U.edit.uri,{relative:!0}),this._labelService.getUriLabel(U.edit.newUri,{relative:!0})):U.edit.type&2?(0,h.localize)(2,null,this._labelService.getUriLabel(U.edit.uri,{relative:!0})):U.edit.type&4?(0,h.localize)(3,null,this._labelService.getUriLabel(U.edit.uri,{relative:!0})):(0,h.localize)(4,null,this._labelService.getUriLabel(U.edit.uri,{relative:!0}));if(U.edit.type&8&&U.edit.newUri)return(0,h.localize)(5,null,this._labelService.getUriLabel(U.edit.uri,{relative:!0}),this._labelService.getUriLabel(U.edit.newUri,{relative:!0}));if(U.edit.type&2)return(0,h.localize)(6,null,this._labelService.getUriLabel(U.edit.uri,{relative:!0}));if(U.edit.type&4)return(0,h.localize)(7,null,this._labelService.getUriLabel(U.edit.uri,{relative:!0}))}if(U instanceof k){if(U.selecting.length>0&&U.inserting.length>0)return(0,h.localize)(8,null,U.edit.textEdit.textEdit.range.startLineNumber,U.selecting,U.inserting);if(U.selecting.length>0&&U.inserting.length===0)return(0,h.localize)(9,null,U.edit.textEdit.textEdit.range.startLineNumber,U.selecting);if(U.selecting.length===0&&U.inserting.length>0)return(0,h.localize)(10,null,U.edit.textEdit.textEdit.range.startLineNumber,U.selecting)}return null}};e.BulkEditAccessibilityProvider=M,e.BulkEditAccessibilityProvider=M=fe([O(0,a.ILabelService)],M);class N{getId(U){return U instanceof A?U.edit.uri+(U.parent instanceof _?JSON.stringify(U.parent.category.metadata):""):U instanceof k?U.parent.edit.uri.toString()+U.idx:JSON.stringify(U.category.metadata)}}e.BulkEditIdentityProvider=N;class P{constructor(U){U.classList.add("category"),this.icon=document.createElement("div"),U.appendChild(this.icon),this.label=new r.IconLabel(U)}}let x=class{static{E=this}static{this.id="CategoryElementRenderer"}constructor(U){this._themeService=U,this.templateId=E.id}renderTemplate(U){return new P(U)}renderElement(U,G,$){$.icon.style.setProperty("--background-dark",null),$.icon.style.setProperty("--background-light",null),$.icon.style.color="";const{metadata:ie}=U.element.category;if(o.ThemeIcon.isThemeIcon(ie.iconPath)){const J=o.ThemeIcon.asClassName(ie.iconPath);$.icon.className=J?`theme-icon ${J}`:"",$.icon.style.color=ie.iconPath.color?this._themeService.getColorTheme().getColor(ie.iconPath.color.id)?.toString()??"":""}else d.URI.isUri(ie.iconPath)?($.icon.className="uri-icon",$.icon.style.setProperty("--background-dark",T.asCSSUrl(ie.iconPath)),$.icon.style.setProperty("--background-light",T.asCSSUrl(ie.iconPath))):ie.iconPath&&($.icon.className="uri-icon",$.icon.style.setProperty("--background-dark",T.asCSSUrl(ie.iconPath.dark)),$.icon.style.setProperty("--background-light",T.asCSSUrl(ie.iconPath.light)));$.label.setLabel(ie.label,ie.description,{descriptionMatches:(0,y.createMatches)(U.filterData)})}disposeTemplate(U){U.label.dispose()}};e.CategoryElementRenderer=x,e.CategoryElementRenderer=x=E=fe([O(0,s.IThemeService)],x);let F=class{constructor(U,G,$){this._labelService=$,this._disposables=new f.DisposableStore,this._localDisposables=new f.DisposableStore,this._checkbox=document.createElement("input"),this._checkbox.className="edit-checkbox",this._checkbox.type="checkbox",this._checkbox.setAttribute("role","checkbox"),U.appendChild(this._checkbox),this._label=G.create(U,{supportHighlights:!0}),this._details=document.createElement("span"),this._details.className="details",U.appendChild(this._details)}dispose(){this._localDisposables.dispose(),this._disposables.dispose(),this._label.dispose()}set(U,G){if(this._localDisposables.clear(),this._checkbox.checked=U.isChecked(),this._checkbox.disabled=U.isDisabled(),this._localDisposables.add(T.addDisposableListener(this._checkbox,"change",()=>{U.setChecked(this._checkbox.checked)})),U.edit.type&8&&U.edit.newUri)this._label.setResource({resource:U.edit.uri,name:(0,h.localize)(11,null,this._labelService.getUriLabel(U.edit.uri,{relative:!0}),this._labelService.getUriLabel(U.edit.newUri,{relative:!0}))},{fileDecorations:{colors:!0,badges:!1}}),this._details.innerText=(0,h.localize)(12,null);else{const $={matches:(0,y.createMatches)(G),fileKind:S.FileKind.FILE,fileDecorations:{colors:!0,badges:!1},extraClasses:[]};U.edit.type&2?this._details.innerText=(0,h.localize)(13,null):U.edit.type&4?(this._details.innerText=(0,h.localize)(14,null),$.extraClasses.push("delete")):this._details.innerText="",this._label.setFile(U.edit.uri,$)}}};F=fe([O(2,a.ILabelService)],F);let V=class{static{C=this}static{this.id="FileElementRenderer"}constructor(U,G){this._resourceLabels=U,this._labelService=G,this.templateId=C.id}renderTemplate(U){return new F(U,this._resourceLabels,this._labelService)}renderElement(U,G,$){$.set(U.element,U.filterData)}disposeTemplate(U){U.dispose()}};e.FileElementRenderer=V,e.FileElementRenderer=V=C=fe([O(1,a.ILabelService)],V);let W=class{constructor(U,G){this._themeService=G,this._disposables=new f.DisposableStore,this._localDisposables=new f.DisposableStore,U.classList.add("textedit"),this._checkbox=document.createElement("input"),this._checkbox.className="edit-checkbox",this._checkbox.type="checkbox",this._checkbox.setAttribute("role","checkbox"),U.appendChild(this._checkbox),this._icon=document.createElement("div"),U.appendChild(this._icon),this._label=new b.HighlightedLabel(U)}dispose(){this._localDisposables.dispose(),this._disposables.dispose()}set(U){this._localDisposables.clear(),this._localDisposables.add(T.addDisposableListener(this._checkbox,"change",X=>{U.setChecked(this._checkbox.checked),X.preventDefault()})),U.parent.isChecked()?(this._checkbox.checked=U.isChecked(),this._checkbox.disabled=U.isDisabled()):(this._checkbox.checked=U.isChecked(),this._checkbox.disabled=U.isDisabled());let G="";G+=U.prefix,G+=U.selecting,G+=U.inserting,G+=U.suffix;const $={start:U.prefix.length,end:U.prefix.length+U.selecting.length,extraClasses:["remove"]},ie={start:$.end,end:$.end+U.inserting.length,extraClasses:["insert"]};let J;const{metadata:j}=U.edit.textEdit;j&&j.description?J=(0,h.localize)(15,null,j.label,j.description):j&&(J=j.label);const ee=j?.iconPath;if(!ee)this._icon.style.display="none";else if(this._icon.style.display="block",this._icon.style.setProperty("--background-dark",null),this._icon.style.setProperty("--background-light",null),o.ThemeIcon.isThemeIcon(ee)){const X=o.ThemeIcon.asClassName(ee);this._icon.className=X?`theme-icon ${X}`:"",this._icon.style.color=ee.color?this._themeService.getColorTheme().getColor(ee.color.id)?.toString()??"":""}else d.URI.isUri(ee)?(this._icon.className="uri-icon",this._icon.style.setProperty("--background-dark",T.asCSSUrl(ee)),this._icon.style.setProperty("--background-light",T.asCSSUrl(ee))):(this._icon.className="uri-icon",this._icon.style.setProperty("--background-dark",T.asCSSUrl(ee.dark)),this._icon.style.setProperty("--background-light",T.asCSSUrl(ee.light)));this._label.set(G,[$,ie],J,!0),this._icon.title=J||""}};W=fe([O(1,s.IThemeService)],W);let z=class{static{I=this}static{this.id="TextEditElementRenderer"}constructor(U){this._themeService=U,this.templateId=I.id}renderTemplate(U){return new W(U,this._themeService)}renderElement({element:U},G,$){$.set(U)}disposeTemplate(U){}};e.TextEditElementRenderer=z,e.TextEditElementRenderer=z=I=fe([O(0,s.IThemeService)],z);class B{getHeight(){return 23}getTemplateId(U){return U instanceof A?V.id:U instanceof k?z.id:x.id}}e.BulkEditDelegate=B;class K{getKeyboardNavigationLabel(U){if(U instanceof A)return(0,i.basename)(U.edit.uri);if(U instanceof _)return U.category.metadata.label}}e.BulkEditNaviLabelProvider=K}),define(Q[3713],Y([1,0,264,5,90,3497,2608,27,216,7,6,21,243,75,4,137,19,24,80,299,13,8,88,1781]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyTreePeekWidget=void 0;var w;(function(_){_.Loading="loading",_.Message="message",_.Data="data"})(w||(w={}));class E{static store(A,k){k.store("callHierarchyPeekLayout",JSON.stringify(A),0,1)}static retrieve(A){const k=A.get("callHierarchyPeekLayout",0,"{}"),L={ratio:.7,height:17};try{return{...L,...JSON.parse(k)}}catch{return L}}constructor(A,k){this.ratio=A,this.height=k}}class C extends b.WorkbenchAsyncDataTree{}let I=class extends t.PeekViewWidget{static{g=this}static{this.TitleMenu=new c.MenuId("callhierarchy/title")}constructor(A,k,L,R,M,N,P,x,F,V,W){super(A,{showFrame:!0,showArrow:!0,isResizeable:!0,isAccessible:!0},W),this._where=k,this._direction=L,this._peekViewService=M,this._editorService=N,this._textModelService=P,this._storageService=x,this._menuService=F,this._contextKeyService=V,this._instantiationService=W,this._treeViewStates=new Map,this._previewDisposable=new i.DisposableStore,this.create(),this._peekViewService.addExclusiveWidget(A,this),this._applyTheme(R.getColorTheme()),this._disposables.add(R.onDidColorThemeChange(this._applyTheme,this)),this._disposables.add(this._previewDisposable)}dispose(){E.store(this._layoutInfo,this._storageService),this._splitView.dispose(),this._tree.dispose(),this._editor.dispose(),super.dispose()}get direction(){return this._direction}_applyTheme(A){const k=A.getColor(t.peekViewBorder)||d.Color.transparent;this.style({arrowColor:k,frameColor:k,headerBackgroundColor:A.getColor(t.peekViewTitleBackground)||d.Color.transparent,primaryHeadingColor:A.getColor(t.peekViewTitleForeground),secondaryHeadingColor:A.getColor(t.peekViewTitleInfoForeground)})}_fillHead(A){super._fillHead(A,!0);const k=this._menuService.createMenu(g.TitleMenu,this._contextKeyService),L=()=>{const R=[];(0,n.createAndFillInActionBarActions)(k,void 0,R),this._actionbarWidget.clear(),this._actionbarWidget.push(R,{label:!1,icon:!0})};this._disposables.add(k),this._disposables.add(k.onDidChange(L)),L()}_fillBody(A){this._layoutInfo=E.retrieve(this._storageService),this._dim=new m.Dimension(0,0),this._parent=A,A.classList.add("call-hierarchy");const k=document.createElement("div");k.classList.add("message"),A.appendChild(k),this._message=k,this._message.tabIndex=0;const L=document.createElement("div");L.classList.add("results"),A.appendChild(L),this._splitView=new v.SplitView(L,{orientation:1});const R=document.createElement("div");R.classList.add("editor"),L.appendChild(R);const M={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._editor=this._instantiationService.createInstance(a.EmbeddedCodeEditorWidget,R,M,{},this.editor);const N=document.createElement("div");N.classList.add("tree"),L.appendChild(N);const P={sorter:new D.Sorter,accessibilityProvider:new D.AccessibilityProvider(()=>this._direction),identityProvider:new D.IdentityProvider(()=>this._direction),expandOnlyOnTwistieClick:!0,overrideStyles:{listBackground:t.peekViewResultsBackground}};this._tree=this._instantiationService.createInstance(C,"CallHierarchyPeek",N,new D.VirtualDelegate,[this._instantiationService.createInstance(D.CallRenderer)],this._instantiationService.createInstance(D.DataSource,()=>this._direction),P),this._splitView.addView({onDidChange:S.Event.None,element:R,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:x=>{this._dim.height&&this._editor.layout({height:this._dim.height,width:x})}},v.Sizing.Distribute),this._splitView.addView({onDidChange:S.Event.None,element:N,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:x=>{this._dim.height&&this._tree.layout(this._dim.height,x)}},v.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this._layoutInfo.ratio=this._splitView.getViewSize(0)/this._dim.width)})),this._disposables.add(this._tree.onDidChangeFocus(this._updatePreview,this)),this._disposables.add(this._editor.onMouseDown(x=>{const{event:F,target:V}=x;if(F.detail!==2)return;const[W]=this._tree.getFocus();W&&(this.dispose(),this._editorService.openEditor({resource:W.item.uri,options:{selection:V.range}}))})),this._disposables.add(this._tree.onMouseDblClick(x=>{x.target!==p.TreeMouseEventTarget.Twistie&&x.element&&(this.dispose(),this._editorService.openEditor({resource:x.element.item.uri,options:{selection:x.element.item.selectionRange,pinned:!0}}))})),this._disposables.add(this._tree.onDidChangeSelection(x=>{const[F]=x.elements;F&&x.browserEvent instanceof KeyboardEvent&&(this.dispose(),this._editorService.openEditor({resource:F.item.uri,options:{selection:F.item.selectionRange,pinned:!0}}))}))}async _updatePreview(){const[A]=this._tree.getFocus();if(!A)return;this._previewDisposable.clear();const k={description:"call-hierarchy-decoration",stickiness:1,className:"call-decoration",overviewRuler:{color:(0,o.themeColorFromId)(t.peekViewEditorMatchHighlight),position:s.OverviewRulerLane.Center}};let L;this._direction==="outgoingCalls"?L=A.parent?A.parent.item.uri:A.model.root.uri:L=A.item.uri;const R=await this._textModelService.createModelReference(L);this._editor.setModel(R.object.textEditorModel);const M=[];let N,P=A.locations;P||(P=[{uri:A.item.uri,range:A.item.selectionRange}]);for(const F of P)F.uri.toString()===L.toString()&&(M.push({range:F.range,options:k}),N=N?f.Range.plusRange(F.range,N):F.range);if(N){this._editor.revealRangeInCenter(N,1);const F=this._editor.createDecorationsCollection(M);this._previewDisposable.add((0,i.toDisposable)(()=>F.clear()))}this._previewDisposable.add(R);const x=this._direction==="outgoingCalls"?(0,T.localize)(0,null,A.model.root.name):(0,T.localize)(1,null,A.model.root.name);this.setTitle(x)}showLoading(){this._parent.dataset.state="loading",this.setTitle((0,T.localize)(2,null)),this._show()}showMessage(A){this._parent.dataset.state="message",this.setTitle(""),this.setMetaTitle(""),this._message.innerText=A,this._show(),this._message.focus()}async showModel(A){this._show();const k=this._treeViewStates.get(this._direction);await this._tree.setInput(A,k);const L=this._tree.getNode(A).children[0];await this._tree.expand(L.element),L.children.length===0?this.showMessage(this._direction==="outgoingCalls"?(0,T.localize)(3,null,A.root.name):(0,T.localize)(4,null,A.root.name)):(this._parent.dataset.state="data",(!k||this._tree.getFocus().length===0)&&this._tree.setFocus([L.children[0].element]),this._tree.domFocus(),this._updatePreview())}getModel(){return this._tree.getInput()}getFocused(){return this._tree.getFocus()[0]}async updateDirection(A){const k=this._tree.getInput();k&&A!==this._direction&&(this._treeViewStates.set(this._direction,this._tree.getViewState()),this._direction=A,await this.showModel(k))}_show(){this._isShowing||(this.editor.revealLineInCenterIfOutsideViewport(this._where.lineNumber,0),super.show(f.Range.fromPositions(this._where),this._layoutInfo.height))}_onWidth(A){this._dim&&this._doLayoutBody(this._dim.height,A)}_doLayoutBody(A,k){(this._dim.height!==A||this._dim.width!==k)&&(super._doLayoutBody(A,k),this._dim=new m.Dimension(k,A),this._layoutInfo.height=this._viewZone?this._viewZone.heightInLines:this._layoutInfo.height,this._splitView.layout(k),this._splitView.resizeView(0,k*this._layoutInfo.ratio))}};e.CallHierarchyTreePeekWidget=I,e.CallHierarchyTreePeekWidget=I=g=fe([O(3,o.IThemeService),O(4,t.IPeekViewService),O(5,h.IEditorService),O(6,r.ITextModelService),O(7,u.IStorageService),O(8,c.IMenuService),O(9,l.IContextKeyService),O(10,y.IInstantiationService)],I)}),define(Q[3714],Y([1,0,2607,912,31,5,3713,6,48,8,4,73,264,24,79,27,13,32,77,15]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0});const l=new m.RawContextKey("editorHasCallHierarchyProvider",!1,(0,t.localize)(0,null)),n=new m.RawContextKey("callHierarchyVisible",!1,(0,t.localize)(1,null)),g=new m.RawContextKey("callHierarchyDirection",void 0,{type:"string",description:(0,t.localize)(2,null)});function w(C){return C==="outgoingCalls"||C==="incomingCalls"?C:"incomingCalls"}let E=class{static{c=this}static{this.Id="callHierarchy"}static get(I){return I.getContribution(c.Id)}static{this._StorageDirection="callHierarchy/defaultDirection"}constructor(I,_,A,k,L){this._editor=I,this._contextKeyService=_,this._storageService=A,this._editorService=k,this._instantiationService=L,this._dispoables=new S.DisposableStore,this._sessionDisposables=new S.DisposableStore,this._ctxIsVisible=n.bindTo(this._contextKeyService),this._ctxHasProvider=l.bindTo(this._contextKeyService),this._ctxDirection=g.bindTo(this._contextKeyService),this._dispoables.add(f.Event.any(I.onDidChangeModel,I.onDidChangeModelLanguage,y.CallHierarchyProviderRegistry.onDidChange)(()=>{this._ctxHasProvider.set(I.hasModel()&&y.CallHierarchyProviderRegistry.has(I.getModel()))})),this._dispoables.add(this._sessionDisposables)}dispose(){this._ctxHasProvider.reset(),this._ctxIsVisible.reset(),this._dispoables.dispose()}async startCallHierarchyFromEditor(){if(this._sessionDisposables.clear(),!this._editor.hasModel())return;const I=this._editor.getModel(),_=this._editor.getPosition();if(!y.CallHierarchyProviderRegistry.has(I))return;const A=new b.CancellationTokenSource,k=y.CallHierarchyModel.create(I,_,A.token),L=w(this._storageService.get(c._StorageDirection,0,"incomingCalls"));this._showCallHierarchyWidget(_,L,k,A)}async startCallHierarchyFromCallHierarchy(){if(!this._widget)return;const I=this._widget.getModel(),_=this._widget.getFocused();if(!_||!I)return;const A=await this._editorService.openCodeEditor({resource:_.item.uri},this._editor);if(!A)return;const k=I.fork(_.item);this._sessionDisposables.clear(),c.get(A)?._showCallHierarchyWidget(s.Range.lift(k.root.selectionRange).getStartPosition(),this._widget.direction,Promise.resolve(k),new b.CancellationTokenSource)}_showCallHierarchyWidget(I,_,A,k){this._ctxIsVisible.set(!0),this._ctxDirection.set(_),f.Event.any(this._editor.onDidChangeModel,this._editor.onDidChangeModelLanguage)(this.endCallHierarchy,this,this._sessionDisposables),this._widget=this._instantiationService.createInstance(T.CallHierarchyTreePeekWidget,this._editor,I,_),this._widget.showLoading(),this._sessionDisposables.add(this._widget.onDidClose(()=>{this.endCallHierarchy(),this._storageService.store(c._StorageDirection,this._widget.direction,0,0)})),this._sessionDisposables.add({dispose(){k.dispose(!0)}}),this._sessionDisposables.add(this._widget),A.then(L=>{k.token.isCancellationRequested||(L?(this._sessionDisposables.add(L),this._widget.showModel(L)):this._widget.showMessage((0,t.localize)(3,null)))}).catch(L=>{if((0,p.isCancellationError)(L)){this.endCallHierarchy();return}this._widget.showMessage((0,t.localize)(4,null))})}showOutgoingCalls(){this._widget?.updateDirection("outgoingCalls"),this._ctxDirection.set("outgoingCalls")}showIncomingCalls(){this._widget?.updateDirection("incomingCalls"),this._ctxDirection.set("incomingCalls")}endCallHierarchy(){this._sessionDisposables.clear(),this._ctxIsVisible.set(!1),this._editor.focus()}};E=c=fe([O(1,m.IContextKeyService),O(2,r.IStorageService),O(3,i.ICodeEditorService),O(4,D.IInstantiationService)],E),(0,v.registerEditorContribution)(E.Id,E,0),(0,o.registerAction2)(class extends v.EditorAction2{constructor(){super({id:"editor.showCallHierarchy",title:{value:(0,t.localize)(5,null),original:"Peek Call Hierarchy"},menu:{id:o.MenuId.EditorContextPeek,group:"navigation",order:1e3,when:m.ContextKeyExpr.and(l,a.PeekContext.notInPeekEditor)},keybinding:{when:h.EditorContextKeys.editorTextFocus,weight:200,primary:1024+512+38},precondition:m.ContextKeyExpr.and(l,a.PeekContext.notInPeekEditor),f1:!0})}async runEditorCommand(I,_){return E.get(_)?.startCallHierarchyFromEditor()}}),(0,o.registerAction2)(class extends v.EditorAction2{constructor(){super({id:"editor.showIncomingCalls",title:{value:(0,t.localize)(6,null),original:"Show Incoming Calls"},icon:(0,d.registerIcon)("callhierarchy-incoming",u.Codicon.callIncoming,(0,t.localize)(7,null)),precondition:m.ContextKeyExpr.and(n,g.isEqualTo("outgoingCalls")),keybinding:{weight:200,primary:1024+512+38},menu:{id:T.CallHierarchyTreePeekWidget.TitleMenu,when:g.isEqualTo("outgoingCalls"),order:1}})}runEditorCommand(C,I){return E.get(I)?.showIncomingCalls()}}),(0,o.registerAction2)(class extends v.EditorAction2{constructor(){super({id:"editor.showOutgoingCalls",title:{value:(0,t.localize)(8,null),original:"Show Outgoing Calls"},icon:(0,d.registerIcon)("callhierarchy-outgoing",u.Codicon.callOutgoing,(0,t.localize)(9,null)),precondition:m.ContextKeyExpr.and(n,g.isEqualTo("incomingCalls")),keybinding:{weight:200,primary:1024+512+38},menu:{id:T.CallHierarchyTreePeekWidget.TitleMenu,when:g.isEqualTo("incomingCalls"),order:1}})}runEditorCommand(C,I){return E.get(I)?.showOutgoingCalls()}}),(0,o.registerAction2)(class extends v.EditorAction2{constructor(){super({id:"editor.refocusCallHierarchy",title:{value:(0,t.localize)(10,null),original:"Refocus Call Hierarchy"},precondition:n,keybinding:{weight:200,primary:1024+3}})}async runEditorCommand(C,I){return E.get(I)?.startCallHierarchyFromCallHierarchy()}}),(0,o.registerAction2)(class extends v.EditorAction2{constructor(){super({id:"editor.closeCallHierarchy",title:(0,t.localize)(11,null),icon:u.Codicon.close,precondition:n,keybinding:{weight:200+10,primary:9,when:m.ContextKeyExpr.not("config.editor.stablePeek")},menu:{id:T.CallHierarchyTreePeekWidget.TitleMenu,order:1e3}})}runEditorCommand(C,I){return E.get(I)?.endCallHierarchy()}})}),define(Q[1341],Y([1,0,462,70,21]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clearChatEditor=void 0;async function D(T){const f=T.get(b.IEditorService),v=T.get(y.IEditorGroupsService),m=f.activeEditor;m instanceof t.ChatEditorInput&&m.providerId&&await f.replaceEditors([{editor:m,replacement:{resource:t.ChatEditorInput.getNewEditorUri(),options:{target:{providerId:m.providerId,pinned:!0}}}}],v.activeGroup)}e.clearChatEditor=D}),define(Q[3715],Y([1,0,2641,38,21,81,13]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class f extends T.Action2{constructor(){super({id:"workbench.action.inspectKeyMappings",title:{value:(0,t.localize)(0,null),original:"Inspect Key Mappings"},category:D.Categories.Developer,f1:!0})}run(S,h){const a=S.get(y.IKeybindingService);S.get(b.IEditorService).openEditor({resource:void 0,contents:a._dumpDebugInfo(),options:{pinned:!0}})}}(0,T.registerAction2)(f);class v extends T.Action2{constructor(){super({id:"workbench.action.inspectKeyMappingsJSON",title:{value:(0,t.localize)(1,null),original:"Inspect Key Mappings (JSON)"},category:D.Categories.Developer,f1:!0})}async run(S){const h=S.get(b.IEditorService),a=S.get(y.IKeybindingService);await h.openEditor({resource:void 0,contents:a._dumpDebugInfoJSON(),options:{pinned:!0}})}}(0,T.registerAction2)(v)}),define(Q[3716],Y([1,0,2646,43,21,1216,16,287,9,13,70]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineQuickAccessProvider=void 0;let h=class extends D.AbstractGotoLineQuickAccessProvider{constructor(i,s,o){super(),this.editorService=i,this.editorGroupService=s,this.configurationService=o,this.onDidActiveTextEditorControlChange=this.editorService.onDidActiveEditorChange}get configuration(){const i=this.configurationService.getValue().workbench?.editor;return{openEditorPinned:!i?.enablePreviewFromQuickOpen||!i?.enablePreview}}get activeTextEditorControl(){return this.editorService.activeTextEditorControl}gotoLocation(i,s){if((s.keyMods.alt||this.configuration.openEditorPinned&&s.keyMods.ctrlCmd||s.forceSideBySide)&&this.editorService.activeEditor){i.restoreViewState?.();const o={selection:s.range,pinned:s.keyMods.ctrlCmd||this.configuration.openEditorPinned,preserveFocus:s.preserveFocus};this.editorGroupService.sideGroup.openEditor(this.editorService.activeEditor,o)}else super.gotoLocation(i,s)}};e.GotoLineQuickAccessProvider=h,e.GotoLineQuickAccessProvider=h=fe([O(0,b.IEditorService),O(1,S.IEditorGroupsService),O(2,v.IConfigurationService)],h);class a extends m.Action2{static{this.ID="workbench.action.gotoLine"}constructor(){super({id:a.ID,title:{value:(0,t.localize)(0,null),original:"Go to Line/Column..."},f1:!0,keybinding:{weight:200,when:null,primary:2085,mac:{primary:293}}})}async run(i){i.get(y.IQuickInputService).quickAccess.show(h.PREFIX)}}(0,m.registerAction2)(a),T.Registry.as(f.Extensions.Quickaccess).registerQuickAccessProvider({ctor:h,prefix:D.AbstractGotoLineQuickAccessProvider.PREFIX,placeholder:(0,t.localize)(1,null),helpEntries:[{description:(0,t.localize)(2,null),commandId:a.ID}]})}),define(Q[3717],Y([1,0,7,22,55,369,444,154,728,609,5,37,4,85,920,61,26,919,6,17,34,2776,14,57,27,349,259,21,593,41,25,72,157,32,77,276,74,8,526,693,54,63]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P,x,F,V,W,z,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersViewModel=e.MarkerViewModel=e.Filter=e.RelatedInformationRenderer=e.MarkerRenderer=e.FileResourceMarkersRenderer=e.ResourceMarkersRenderer=e.VirtualDelegate=e.MarkersWidgetAccessibilityProvider=void 0;let K=class{constructor(ce){this.labelService=ce}getWidgetAriaLabel(){return(0,l.localize)(0,null)}getAriaLabel(ce){if(ce instanceof v.ResourceMarkers){const ae=this.labelService.getUriLabel(ce.resource,{relative:!0})||ce.resource.fsPath;return m.default.MARKERS_TREE_ARIA_LABEL_RESOURCE(ce.markers.length,ce.name,b.dirname(ae))}return ce instanceof v.Marker||ce instanceof v.MarkerTableItem?m.default.MARKERS_TREE_ARIA_LABEL_MARKER(ce):ce instanceof v.RelatedInformation?m.default.MARKERS_TREE_ARIA_LABEL_RELATED_INFORMATION(ce.raw):null}};e.MarkersWidgetAccessibilityProvider=K,e.MarkersWidgetAccessibilityProvider=K=fe([O(0,s.ILabelService)],K);var H;(function(ne){ne.ResourceMarkers="rm",ne.Marker="m",ne.RelatedInformation="ri"})(H||(H={}));class U{static{this.LINE_HEIGHT=22}constructor(ce){this.markersViewState=ce}getHeight(ce){if(ce instanceof v.Marker){const ae=this.markersViewState.getViewModel(ce);return(!ae||ae.multiline?ce.lines.length:1)*U.LINE_HEIGHT}return U.LINE_HEIGHT}getTemplateId(ce){return ce instanceof v.ResourceMarkers?"rm":ce instanceof v.Marker?"m":"ri"}}e.VirtualDelegate=U;var G;(function(ne){ne[ne.ResourceMarkers=0]="ResourceMarkers",ne[ne.Marker=1]="Marker",ne[ne.RelatedInformation=2]="RelatedInformation"})(G||(G={}));let $=class{constructor(ce,ae,ue,de){this.labels=ce,this.labelService=ue,this.fileService=de,this.renderedNodes=new Map,this.disposables=new a.DisposableStore,this.templateId="rm",ae(this.onDidChangeRenderNodeCount,this,this.disposables)}renderTemplate(ce){const ae=t.append(ce,t.$(".resource-label-container")),ue=this.labels.create(ae,{supportHighlights:!0}),de=t.append(ce,t.$(".count-badge-wrapper"));return{count:new D.CountBadge(de,{},z.defaultCountBadgeStyles),resourceLabel:ue}}renderElement(ce,ae,ue){const de=ce.element,ge=ce.filterData&&ce.filterData.uriMatches||[];this.fileService.hasProvider(de.resource)||de.resource.scheme===y.Schemas.untitled?ue.resourceLabel.setFile(de.resource,{matches:ge}):ue.resourceLabel.setResource({name:de.name,description:this.labelService.getUriLabel((0,o.dirname)(de.resource),{relative:!0}),resource:de.resource},{matches:ge}),this.updateCount(ce,ue),this.renderedNodes.set(ce,ue)}disposeElement(ce){this.renderedNodes.delete(ce)}disposeTemplate(ce){ce.resourceLabel.dispose()}onDidChangeRenderNodeCount(ce){const ae=this.renderedNodes.get(ce);ae&&this.updateCount(ce,ae)}updateCount(ce,ae){ae.count.setCount(ce.children.reduce((ue,de)=>ue+(de.visible?1:0),0))}dispose(){this.disposables.dispose()}};e.ResourceMarkersRenderer=$,e.ResourceMarkersRenderer=$=fe([O(2,s.ILabelService),O(3,k.IFileService)],$);class ie extends ${}e.FileResourceMarkersRenderer=ie;let J=class{constructor(ce,ae,ue){this.markersViewState=ce,this.instantiationService=ae,this.openerService=ue,this.templateId="m"}renderTemplate(ce){const ae=Object.create(null);return ae.markerWidget=new Z(ce,this.markersViewState,this.openerService,this.instantiationService),ae}renderElement(ce,ae,ue){ue.markerWidget.render(ce.element,ce.filterData)}disposeTemplate(ce){ce.markerWidget.dispose()}};e.MarkerRenderer=J,e.MarkerRenderer=J=fe([O(1,S.IInstantiationService),O(2,A.IOpenerService)],J);const j=(0,N.registerIcon)("markers-view-multi-line-expanded",M.Codicon.chevronUp,(0,l.localize)(1,null)),ee=(0,N.registerIcon)("markers-view-multi-line-collapsed",M.Codicon.chevronDown,(0,l.localize)(2,null)),X="problems.action.toggleMultiline";class te extends R.ActionViewItem{render(ce){super.render(ce),this.updateExpandedAttribute()}updateClass(){super.updateClass(),this.updateExpandedAttribute()}updateExpandedAttribute(){this.element?.setAttribute("aria-expanded",`${this._action.class===h.ThemeIcon.asClassName(j)}`)}}class Z extends a.Disposable{constructor(ce,ae,ue,de){super(),this.parent=ce,this.markersViewModel=ae,this._openerService=ue,this.disposables=this._register(new a.DisposableStore),this.actionBar=this._register(new r.ActionBar(t.append(ce,t.$(".actions")),{actionViewItemProvider:ge=>ge.id===i.QuickFixAction.ID?de.createInstance(i.QuickFixActionViewItem,ge):void 0})),this.iconContainer=t.append(ce,t.$("")),this.icon=t.append(this.iconContainer,t.$("")),this.messageAndDetailsContainer=t.append(ce,t.$(".marker-message-details-container"))}render(ce,ae){this.actionBar.clear(),this.disposables.clear(),t.clearNode(this.messageAndDetailsContainer),this.iconContainer.className=`marker-icon ${B.default.toString(f.MarkerSeverity.toSeverity(ce.marker.severity))}`,this.icon.className=`codicon ${_.SeverityIcon.className(f.MarkerSeverity.toSeverity(ce.marker.severity))}`,this.renderQuickfixActionbar(ce),this.renderMessageAndDetails(ce,ae),this.disposables.add(t.addDisposableListener(this.parent,t.EventType.MOUSE_OVER,()=>this.markersViewModel.onMarkerMouseHover(ce))),this.disposables.add(t.addDisposableListener(this.parent,t.EventType.MOUSE_LEAVE,()=>this.markersViewModel.onMarkerMouseLeave(ce)))}renderQuickfixActionbar(ce){const ae=this.markersViewModel.getViewModel(ce);if(ae){const ue=ae.quickFixAction;this.actionBar.push([ue],{icon:!0,label:!1}),this.iconContainer.classList.toggle("quickFix",ue.enabled),ue.onDidChange(({enabled:de})=>{(0,p.isUndefinedOrNull)(de)||this.iconContainer.classList.toggle("quickFix",de)},this,this.disposables),ue.onShowQuickFixes(()=>{const de=this.actionBar.viewItems[0];de&&de.showQuickFixes()},this,this.disposables)}}renderMultilineActionbar(ce,ae){const ue=this.disposables.add(new r.ActionBar(t.append(ae,t.$(".multiline-actions")),{actionViewItemProvider:be=>{if(be.id===X)return new te(void 0,be,{icon:!0})}}));this.disposables.add((0,a.toDisposable)(()=>ue.dispose()));const de=this.markersViewModel.getViewModel(ce),ge=de&&de.multiline,he=new c.Action(X);he.enabled=!!de&&ce.lines.length>1,he.tooltip=ge?(0,l.localize)(3,null):(0,l.localize)(4,null),he.class=h.ThemeIcon.asClassName(ge?j:ee),he.run=()=>(de&&(de.multiline=!de.multiline),Promise.resolve()),ue.push([he],{icon:!0,label:!1})}renderMessageAndDetails(ce,ae){const{marker:ue,lines:de}=ce,ge=this.markersViewModel.getViewModel(ce),he=!ge||ge.multiline,be=ae&&ae.lineMatches||[];this.messageAndDetailsContainer.title=ce.marker.message;const ve=[];for(let Ie=0;Ie<(he?de.length:1);Ie++){const Se=t.append(this.messageAndDetailsContainer,t.$(".marker-message-line")),we=t.append(Se,t.$(".marker-message"));new T.HighlightedLabel(we).set(de[Ie].length>1e3?`${de[Ie].substring(0,1e3)}...`:de[Ie],be[Ie]),de[Ie]===""&&(Se.style.height=`${U.LINE_HEIGHT}px`),ve.push(Se)}this.renderDetails(ue,ae,ve[0]),this.renderMultilineActionbar(ce,ve[0])}renderDetails(ce,ae,ue){if(ue.classList.add("details-container"),ce.source||ce.code){const ge=new T.HighlightedLabel(t.append(ue,t.$(".marker-source"))),he=ae&&ae.sourceMatches||[];if(ge.set(ce.source,he),ce.code)if(typeof ce.code=="string"){const be=new T.HighlightedLabel(t.append(ue,t.$(".marker-code"))),ve=ae&&ae.codeMatches||[];be.set(ce.code,ve)}else{const be=t.$(".marker-code"),ve=new T.HighlightedLabel(be),Ie=ce.code.target.toString(!0);this.disposables.add(new P.Link(ue,{href:Ie,label:be,title:Ie},void 0,this._openerService));const Se=ae&&ae.codeMatches||[];ve.set(ce.code.value,Se)}}const de=t.append(ue,t.$("span.marker-line"));de.textContent=m.default.MARKERS_PANEL_AT_LINE_COL_NUMBER(ce.startLineNumber,ce.startColumn)}}let se=class{constructor(ce){this.labelService=ce,this.templateId="ri"}renderTemplate(ce){const ae=Object.create(null);t.append(ce,t.$(".actions")),t.append(ce,t.$(".icon")),ae.resourceLabel=new T.HighlightedLabel(t.append(ce,t.$(".related-info-resource"))),ae.lnCol=t.append(ce,t.$("span.marker-line"));const ue=t.append(ce,t.$("span.related-info-resource-separator"));return ue.textContent=":",ue.style.paddingRight="4px",ae.description=new T.HighlightedLabel(t.append(ce,t.$(".marker-description"))),ae}renderElement(ce,ae,ue){const de=ce.element.raw,ge=ce.filterData&&ce.filterData.uriMatches||[],he=ce.filterData&&ce.filterData.messageMatches||[];ue.resourceLabel.set((0,o.basename)(de.resource),ge),ue.resourceLabel.element.title=this.labelService.getUriLabel(de.resource,{relative:!0}),ue.lnCol.textContent=m.default.MARKERS_PANEL_AT_LINE_COL_NUMBER(de.startLineNumber,de.startColumn),ue.description.set(de.message,he),ue.description.element.title=de.message}disposeTemplate(ce){}};e.RelatedInformationRenderer=se,e.RelatedInformationRenderer=se=fe([O(0,s.ILabelService)],se);class re{constructor(ce){this.options=ce}filter(ce,ae){return ce instanceof v.ResourceMarkers?this.filterResourceMarkers(ce):ce instanceof v.Marker?this.filterMarker(ce,ae):this.filterRelatedInformation(ce,ae)}filterResourceMarkers(ce){if(W.unsupportedSchemas.has(ce.resource.scheme)||this.options.excludesMatcher.matches(ce.resource))return!1;if(this.options.includesMatcher.matches(ce.resource))return!0;if(this.options.textFilter.text&&!this.options.textFilter.negate){const ae=u.FilterOptions._filter(this.options.textFilter.text,(0,o.basename)(ce.resource));if(ae)return{visibility:!0,data:{type:0,uriMatches:ae||[]}}}return 2}filterMarker(ce,ae){if(!(this.options.showErrors&&f.MarkerSeverity.Error===ce.marker.severity||this.options.showWarnings&&f.MarkerSeverity.Warning===ce.marker.severity||this.options.showInfos&&f.MarkerSeverity.Info===ce.marker.severity))return!1;if(!this.options.textFilter.text)return!0;const de=[];for(const ve of ce.lines){const Ie=u.FilterOptions._messageFilter(this.options.textFilter.text,ve);de.push(Ie||[])}const ge=ce.marker.source?u.FilterOptions._filter(this.options.textFilter.text,ce.marker.source):void 0,he=ce.marker.code?u.FilterOptions._filter(this.options.textFilter.text,typeof ce.marker.code=="string"?ce.marker.code:ce.marker.code.value):void 0,be=ge||he||de.some(ve=>ve.length>0);return be&&!this.options.textFilter.negate?{visibility:!0,data:{type:1,lineMatches:de,sourceMatches:ge||[],codeMatches:he||[]}}:be&&this.options.textFilter.negate&&ae===2?!1:!be&&this.options.textFilter.negate&&ae===2?!0:ae}filterRelatedInformation(ce,ae){if(!this.options.textFilter.text)return!0;const ue=u.FilterOptions._filter(this.options.textFilter.text,(0,o.basename)(ce.raw.resource)),de=u.FilterOptions._messageFilter(this.options.textFilter.text,b.basename(ce.raw.message)),ge=ue||de;return ge&&!this.options.textFilter.negate?{visibility:!0,data:{type:2,uriMatches:ue||[],messageMatches:de||[]}}:ge&&this.options.textFilter.negate&&ae===2?!1:!ge&&this.options.textFilter.negate&&ae===2?!0:ae}}e.Filter=re;let oe=class extends a.Disposable{constructor(ce,ae,ue,de,ge){super(),this.marker=ce,this.modelService=ae,this.instantiationService=ue,this.editorService=de,this.languageFeaturesService=ge,this._onDidChange=this._register(new d.Emitter),this.onDidChange=this._onDidChange.event,this.modelPromise=null,this.codeActionsPromise=null,this._multiline=!0,this._quickFixAction=null,this._register((0,a.toDisposable)(()=>{this.modelPromise&&this.modelPromise.cancel(),this.codeActionsPromise&&this.codeActionsPromise.cancel()}))}get multiline(){return this._multiline}set multiline(ce){this._multiline!==ce&&(this._multiline=ce,this._onDidChange.fire())}get quickFixAction(){return this._quickFixAction||(this._quickFixAction=this._register(this.instantiationService.createInstance(i.QuickFixAction,this.marker))),this._quickFixAction}showLightBulb(){this.setQuickFixes(!0)}async setQuickFixes(ce){const ae=await this.getCodeActions(ce);this.quickFixAction.quickFixes=ae?this.toActions(ae):[],this.quickFixAction.autoFixable(!!ae&&ae.hasAutoFix)}getCodeActions(ce){return this.codeActionsPromise!==null?this.codeActionsPromise:this.getModel(ce).then(ae=>ae?(this.codeActionsPromise||(this.codeActionsPromise=(0,n.createCancelablePromise)(ue=>(0,E.getCodeActions)(this.languageFeaturesService.codeActionProvider,ae,new w.Range(this.marker.range.startLineNumber,this.marker.range.startColumn,this.marker.range.endLineNumber,this.marker.range.endColumn),{type:1,triggerAction:C.CodeActionTriggerSource.ProblemsView,filter:{include:C.CodeActionKind.QuickFix}},L.Progress.None,ue).then(de=>this._register(de)))),this.codeActionsPromise):null)}toActions(ce){return ce.validActions.map(ae=>new c.Action(ae.action.command?ae.action.command.id:ae.action.title,ae.action.title,void 0,!0,()=>this.openFileAtMarker(this.marker).then(()=>this.instantiationService.invokeFunction(E.applyCodeAction,ae,E.ApplyCodeActionReason.FromProblemsView))))}openFileAtMarker(ce){const{resource:ae,selection:ue}={resource:ce.resource,selection:ce.range};return this.editorService.openEditor({resource:ae,options:{selection:ue,preserveFocus:!0,pinned:!1,revealIfVisible:!0}},I.ACTIVE_GROUP).then(()=>{})}getModel(ce){const ae=this.modelService.getModel(this.marker.resource);return ae?Promise.resolve(ae):ce?(this.modelPromise||(this.modelPromise=(0,n.createCancelablePromise)(ue=>new Promise(de=>{this._register(this.modelService.onModelAdded(ge=>{(0,o.isEqual)(ge.uri,this.marker.resource)&&de(ge)}))}))),this.modelPromise):Promise.resolve(null)}};e.MarkerViewModel=oe,e.MarkerViewModel=oe=fe([O(1,g.IModelService),O(2,S.IInstantiationService),O(3,I.IEditorService),O(4,x.ILanguageFeaturesService)],oe);let le=class extends a.Disposable{constructor(ce=!0,ae="tree",ue,de){super(),this.contextKeyService=ue,this.instantiationService=de,this._onDidChange=this._register(new d.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeViewMode=this._register(new d.Emitter),this.onDidChangeViewMode=this._onDidChangeViewMode.event,this.markersViewStates=new Map,this.markersPerResource=new Map,this.bulkUpdate=!1,this.hoveredMarker=null,this.hoverDelayer=new n.Delayer(300),this._multiline=!0,this._viewMode="tree",this._multiline=ce,this._viewMode=ae,this.viewModeContextKey=V.MarkersContextKeys.MarkersViewModeContextKey.bindTo(this.contextKeyService),this.viewModeContextKey.set(ae)}add(ce){if(!this.markersViewStates.has(ce.id)){const ae=this.instantiationService.createInstance(oe,ce),ue=[ae];ae.multiline=this.multiline,ae.onDidChange(()=>{this.bulkUpdate||this._onDidChange.fire(ce)},this,ue),this.markersViewStates.set(ce.id,{viewModel:ae,disposables:ue});const de=this.markersPerResource.get(ce.resource.toString())||[];de.push(ce),this.markersPerResource.set(ce.resource.toString(),de)}}remove(ce){const ae=this.markersPerResource.get(ce.toString())||[];for(const ue of ae){const de=this.markersViewStates.get(ue.id);de&&(0,a.dispose)(de.disposables),this.markersViewStates.delete(ue.id),this.hoveredMarker===ue&&(this.hoveredMarker=null)}this.markersPerResource.delete(ce.toString())}getViewModel(ce){const ae=this.markersViewStates.get(ce.id);return ae?ae.viewModel:null}onMarkerMouseHover(ce){this.hoveredMarker=ce,this.hoverDelayer.trigger(()=>{if(this.hoveredMarker){const ae=this.getViewModel(this.hoveredMarker);ae&&ae.showLightBulb()}})}onMarkerMouseLeave(ce){this.hoveredMarker===ce&&(this.hoveredMarker=null)}get multiline(){return this._multiline}set multiline(ce){let ae=!1;this._multiline!==ce&&(this._multiline=ce,ae=!0),this.bulkUpdate=!0,this.markersViewStates.forEach(({viewModel:ue})=>{ue.multiline!==ce&&(ue.multiline=ce,ae=!0)}),this.bulkUpdate=!1,ae&&this._onDidChange.fire(void 0)}get viewMode(){return this._viewMode}set viewMode(ce){this._viewMode!==ce&&(this._viewMode=ce,this._onDidChangeViewMode.fire(ce),this.viewModeContextKey.set(ce))}dispose(){this.markersViewStates.forEach(({disposables:ce})=>(0,a.dispose)(ce)),this.markersViewStates.clear(),this.markersPerResource.clear(),super.dispose()}};e.MarkersViewModel=le,e.MarkersViewModel=le=fe([O(2,F.IContextKeyService),O(3,S.IInstantiationService)],le)}),define(Q[1342],Y([1,0,2843,217,32,6,4,26,37,9,154,19,267,1297,71,211,21]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellOutlineProvider=e.OutlineEntry=void 0;class u{get icon(){return this.isExecuting&&this.isPaused?a.executingStateIcon:this.isExecuting?v.ThemeIcon.modify(a.executingStateIcon,"spin"):this.cell.cellKind===i.CellKind.Markup?b.Codicon.markdown:b.Codicon.code}constructor(c,l,n,g,w,E){this.index=c,this.level=l,this.cell=n,this.label=g,this.isExecuting=w,this.isPaused=E,this._children=[]}addChild(c){this._children.push(c),c._parent=this}get parent(){return this._parent}get children(){return this._children}get markerInfo(){return this._markerInfo}updateMarkers(c){if(this.cell.cellKind===i.CellKind.Code){const l=c.read({resource:this.cell.uri,severities:S.MarkerSeverity.Error|S.MarkerSeverity.Warning});if(l.length===0)this._markerInfo=void 0;else{const n=l.find(g=>g.severity===S.MarkerSeverity.Error)?.severity??S.MarkerSeverity.Warning;this._markerInfo={topSev:n,count:l.length}}}else{let l;for(const n of this.children)n.updateMarkers(c),n.markerInfo&&(l=l?Math.max(n.markerInfo.topSev,l):n.markerInfo.topSev);this._markerInfo=l&&{topSev:l,count:0}}}clearMarkers(){this._markerInfo=void 0;for(const c of this.children)c.clearMarkers()}find(c,l){if(c.id===this.cell.id)return this;l.push(this);for(const n of this.children){const g=n.find(c,l);if(g)return g}l.pop()}asFlatList(c){c.push(this);for(const l of this.children)l.asFlatList(c)}}e.OutlineEntry=u;let d=class{get entries(){return this._entries}get activeElement(){return this._activeEntry}constructor(c,l,n,g,w,E,C){this._editor=c,this._target=l,this._markerService=w,this._configurationService=E,this._notebookExecutionStateService=C,this._dispoables=new T.DisposableStore,this._onDidChange=new D.Emitter,this.onDidChange=this._onDidChange.event,this._entries=[],this._entriesDisposables=new T.DisposableStore,this.outlineKind="notebookCells";const I=new T.MutableDisposable;this._dispoables.add(I),I.value=(0,T.combinedDisposable)(D.Event.debounce(c.onDidChangeSelection,(_,A)=>_,200)(this._recomputeActive,this),D.Event.debounce(c.onDidChangeViewCells,(_,A)=>_??A,200)(this._recomputeState,this)),this._dispoables.add(E.onDidChangeConfiguration(_=>{_.affectsConfiguration("notebook.outline.showCodeCells")&&this._recomputeState()})),this._dispoables.add(n.onDidFileIconThemeChange(()=>{this._onDidChange.fire({})})),this._dispoables.add(C.onDidChangeExecution(_=>{_.type===s.NotebookExecutionType.cell&&this._editor.textModel&&_.affectsNotebook(this._editor.textModel?.uri)&&this._recomputeState()})),this._recomputeState()}dispose(){this._entries.length=0,this._activeEntry=void 0,this._entriesDisposables.dispose(),this._dispoables.dispose()}init(){this._recomputeState()}_recomputeState(){if(this._entriesDisposables.clear(),this._activeEntry=void 0,this._entries.length=0,this._uri=void 0,!this._editor.hasModel())return;this._uri=this._editor.textModel.uri;const c=this._editor;if(c.getLength()===0)return;let l=!0;this._target===1?l=this._configurationService.getValue("notebook.outline.showCodeCells"):this._target===2&&(l=this._configurationService.getValue("notebook.breadcrumbs.showCodeCells"));const n=c.getFocus().start,g=c.cellAt(n)?.handle,w=[];for(let I=0;I<c.getLength();I++){const _=c.cellAt(I),A=_.cellKind===i.CellKind.Markup;if(!A&&!l)continue;let k=this._getCellFirstNonEmptyLine(_),L=!1;if(A){const R=_.getText().substring(0,1e4);for(const{depth:M,text:N}of(0,r.getMarkdownHeadersInCell)(R))L=!0,w.push(new u(w.length,M,_,N,!1,!1));if(!L){const M=R.match(/<h([1-6]).*>(.*)<\/h\1>/i);if(M){L=!0;const N=parseInt(M[1]),P=M[2].trim();w.push(new u(w.length,N,_,P,!1,!1))}}L||(k=(0,y.renderMarkdownAsPlaintext)({value:k}))}if(!L){let R=k.trim();R.length===0&&(R=(0,t.localize)(0,null));const M=!A&&this._notebookExecutionStateService.getCellExecution(_.uri);w.push(new u(w.length,7,_,R,!!M,M?M.isPaused:!1))}_.handle===g&&(this._activeEntry=w[w.length-1]),this._entriesDisposables.add(_.model.onDidChangeContent(()=>{this._recomputeState(),this._onDidChange.fire({})}))}if(w.length>0){const I=[w[0]],_=[w[0]];for(let A=1;A<w.length;A++){const k=w[A];for(;;){const L=_.length;if(L===0){I.push(k),_.push(k);break}else{const R=_[L-1];if(R.level<k.level){R.addChild(k),_.push(k);break}else _.pop()}}}this._entries=I}const E=new T.MutableDisposable;this._entriesDisposables.add(E);const C=()=>{if(c.isDisposed)return;const I=_=>{for(const A of this._entries)_?A.clearMarkers():A.updateMarkers(this._markerService)};this._configurationService.getValue("outline.problems.enabled")?(E.value=this._markerService.onMarkerChanged(_=>{if(c.isDisposed){console.error("notebook editor is disposed");return}_.some(A=>c.getCellsInRange().some(k=>(0,f.isEqual)(k.uri,A)))&&(I(!1),this._onDidChange.fire({}))}),I(!1)):(E.clear(),I(!0))};C(),this._entriesDisposables.add(this._configurationService.onDidChangeConfiguration(I=>{I.affectsConfiguration("outline.problems.enabled")&&(C(),this._onDidChange.fire({}))})),this._onDidChange.fire({})}_recomputeActive(){let c;const l=this._editor;if(l&&l.hasModel()&&l.getLength()>0){const n=l.cellAt(l.getFocus().start);if(n){for(const g of this._entries)if(c=g.find(n,[]),c)break}}c!==this._activeEntry&&(this._activeEntry=c,this._onDidChange.fire({affectOnlyActiveElement:!0}))}_getCellFirstNonEmptyLine(c){const l=c.textBuffer;for(let n=0;n<l.getLineCount();n++){const g=l.getLineFirstNonWhitespaceColumn(n+1),w=l.getLineLength(n+1);if(g<w)return l.getLineContent(n+1)}return c.getText().substring(0,1e4)}get isEmpty(){return this._entries.length===0}get uri(){return this._uri}};e.NotebookCellOutlineProvider=d,e.NotebookCellOutlineProvider=d=fe([O(2,h.IThemeService),O(3,o.IEditorService),O(4,S.IMarkerService),O(5,m.IConfigurationService),O(6,s.INotebookExecutionStateService)],d)}),define(Q[3718],Y([1,0,780,14,6,4,30,21]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputLatencyContrib=void 0;let v=class extends D.Disposable{constructor(S,h){super(),this._editorService=S,this._telemetryService=h,this._listener=this._register(new D.MutableDisposable),this._scheduler=this._register(new y.RunOnceScheduler(()=>{this._logSamples(),this._setupListener()},6e4)),this._setupListener()}_setupListener(){this._listener.value=b.Event.once(this._editorService.onDidActiveEditorChange)(()=>this._scheduler.schedule())}_logSamples(){const S=t.inputLatency.getAndClearMeasurements();S&&this._telemetryService.publicLog2("performance.inputLatency",{keydown:S.keydown,input:S.input,render:S.render,total:S.total,sampleCount:S.sampleCount})}};e.InputLatencyContrib=v,e.InputLatencyContrib=v=fe([O(0,f.IEditorService),O(1,T.ITelemetryService)],v)}),define(Q[361],Y([1,0,15,39,47,21,31,25,27,17,8,33,20]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchStateKey=e.SearchUIState=e.extractRangeFromFilter=e.getOutOfWorkspaceEditorResources=e.getWorkspaceSymbols=e.WorkspaceSymbolItem=e.WorkspaceSymbolProviderRegistry=void 0;var r;(function(c){const l=[];function n(w){let E=w;return E&&l.push(E),{dispose(){if(E){const C=l.indexOf(E);C>=0&&(l.splice(C,1),E=void 0)}}}}c.register=n;function g(){return l.slice(0)}c.all=g})(r||(e.WorkspaceSymbolProviderRegistry=r={}));class i{constructor(l,n){this.symbol=l,this.provider=n}}e.WorkspaceSymbolItem=i;async function s(c,l=T.CancellationToken.None){const n=[],g=r.all().map(async E=>{try{const C=await E.provideWorkspaceSymbols(c,l);if(!C)return;for(const I of C)n.push(new i(I,E))}catch(C){(0,t.onUnexpectedExternalError)(C)}});if(await Promise.all(g),l.isCancellationRequested)return[];function w(E,C){let I=(0,h.compare)(E.symbol.name,C.symbol.name);return I===0&&(I=E.symbol.kind-C.symbol.kind),I===0&&(I=(0,h.compare)(E.symbol.location.uri.toString(),C.symbol.location.uri.toString())),I===0&&(E.symbol.location.range&&C.symbol.location.range?v.Range.areIntersecting(E.symbol.location.range,C.symbol.location.range)||(I=v.Range.compareRangesUsingStarts(E.symbol.location.range,C.symbol.location.range)):E.provider.resolveWorkspaceSymbol&&!C.provider.resolveWorkspaceSymbol?I=-1:!E.provider.resolveWorkspaceSymbol&&C.provider.resolveWorkspaceSymbol&&(I=1)),I===0&&(I=(0,h.compare)(E.symbol.containerName??"",C.symbol.containerName??"")),I}return(0,a.groupBy)(n,w).map(E=>E[0]).flat()}e.getWorkspaceSymbols=s;function o(c){const l=c.get(D.IEditorService),n=c.get(y.IWorkspaceContextService),g=c.get(f.IFileService);return l.editors.map(E=>b.EditorResourceAccessor.getOriginalUri(E,{supportSideBySide:b.SideBySideEditor.PRIMARY})).filter(E=>!!E&&!n.isInsideWorkspace(E)&&g.hasProvider(E))}e.getOutOfWorkspaceEditorResources=o;const u=/\s?[#:\(](?:line )?(\d*)(?:[#:,](\d*))?\)?:?\s*$/;function d(c,l){if(!c||l?.some(w=>{const E=c.indexOf(w);return E===0||E>0&&!u.test(c.substring(E+1))}))return;let n;const g=u.exec(c);if(g){const w=parseInt(g[1]??"",10);if((0,m.isNumber)(w)){n={startLineNumber:w,startColumn:1,endLineNumber:w,endColumn:1};const E=parseInt(g[2]??"",10);(0,m.isNumber)(E)&&(n={startLineNumber:n.startLineNumber,startColumn:E,endLineNumber:n.endLineNumber,endColumn:E})}else g[1]===""&&(n={startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1})}if(g&&n)return{filter:c.substr(0,g.index),range:n}}e.extractRangeFromFilter=d;var p;(function(c){c[c.Idle=0]="Idle",c[c.Searching=1]="Searching",c[c.SlowSearch=2]="SlowSearch"})(p||(e.SearchUIState=p={})),e.SearchStateKey=new S.RawContextKey("searchState",p.Idle)}),define(Q[1343],Y([1,0,2912,347,14,361,99,61,22,41,21,27,9,79,518,570,32,37]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.SymbolsQuickAccessProvider=void 0;let p=class extends y.PickerQuickAccessProvider{static{d=this}static{this.PREFIX="#"}static{this.TYPING_SEARCH_DELAY=200}static{this.TREAT_AS_GLOBAL_SYMBOL_TYPES=new Set([4,9,0,10,2,3,1])}get defaultFilterValue(){const l=this.codeEditorService.getFocusedCodeEditor();if(l)return(0,i.getSelectionSearchString)(l)??void 0}constructor(l,n,g,w,E){super(d.PREFIX,{canAcceptInBackground:!0,noResultsPick:{label:(0,t.localize)(0,null)}}),this.labelService=l,this.openerService=n,this.editorService=g,this.configurationService=w,this.codeEditorService=E,this.delayer=this._register(new b.ThrottledDelayer(d.TYPING_SEARCH_DELAY))}get configuration(){const l=this.configurationService.getValue().workbench?.editor;return{openEditorPinned:!l?.enablePreviewFromQuickOpen||!l?.enablePreview,openSideBySideDirection:l?.openSideBySideDirection}}_getPicks(l,n,g){return this.getSymbolPicks(l,void 0,g)}async getSymbolPicks(l,n,g){return this.delayer.trigger(async()=>g.isCancellationRequested?[]:this.doGetSymbolPicks((0,s.prepareQuery)(l),n,g),n?.delay)}async doGetSymbolPicks(l,n,g){let w,E;l.values&&l.values.length>1?(w=(0,s.pieceToQuery)(l.values[0]),E=(0,s.pieceToQuery)(l.values.slice(1))):w=l;const C=await(0,D.getWorkspaceSymbols)(w.original,g);if(g.isCancellationRequested)return[];const I=[],_=this.configuration.openSideBySideDirection;for(const{symbol:A,provider:k}of C){if(n?.skipLocal&&!d.TREAT_AS_GLOBAL_SYMBOL_TYPES.has(A.kind)&&A.containerName)continue;const L=A.name,R=`$(${T.SymbolKinds.toIcon(A.kind).id}) ${L}`,M=R.length-L.length;let N,P,x=!1;if(w.original.length>0&&(w!==l&&([N,P]=(0,s.scoreFuzzy2)(R,{...l,values:void 0},0,M),typeof N=="number"&&(x=!0)),typeof N!="number"&&([N,P]=(0,s.scoreFuzzy2)(R,w,0,M),typeof N!="number")))continue;const F=A.location.uri;let V;if(F){const K=this.labelService.getUriLabel(F,{relative:!0});A.containerName?V=`${A.containerName} \u2022 ${K}`:V=K}let W,z;if(!x&&E&&E.original.length>0){if(V&&([W,z]=(0,s.scoreFuzzy2)(V,E)),typeof W!="number")continue;typeof N=="number"&&(N+=W)}const B=A.tags?A.tags.indexOf(1)>=0:!1;I.push({symbol:A,resource:F,score:N,label:R,ariaLabel:L,highlights:B?void 0:{label:P,description:z},description:V,strikethrough:B,buttons:[{iconClass:_==="right"?u.ThemeIcon.asClassName(o.Codicon.splitHorizontal):u.ThemeIcon.asClassName(o.Codicon.splitVertical),tooltip:_==="right"?(0,t.localize)(1,null):(0,t.localize)(2,null)}],trigger:(K,H)=>(this.openSymbol(k,A,g,{keyMods:H,forceOpenSideBySide:!0}),y.TriggerAction.CLOSE_PICKER),accept:async(K,H)=>this.openSymbol(k,A,g,{keyMods:K,preserveFocus:H.inBackground,forcePinned:H.inBackground})})}return n?.skipSorting||I.sort((A,k)=>this.compareSymbols(A,k)),I}async openSymbol(l,n,g,w){let E=n;typeof l.resolveWorkspaceSymbol=="function"&&(E=await l.resolveWorkspaceSymbol(n,g)||n,g.isCancellationRequested)||(E.location.uri.scheme===v.Schemas.http||E.location.uri.scheme===v.Schemas.https?await this.openerService.open(E.location.uri,{fromUserGesture:!0,allowContributedOpeners:!0}):await this.editorService.openEditor({resource:E.location.uri,options:{preserveFocus:w?.preserveFocus,pinned:w.keyMods.ctrlCmd||w.forcePinned||this.configuration.openEditorPinned,selection:E.location.range?h.Range.collapseToStart(E.location.range):void 0}},w.keyMods.alt||this.configuration.openEditorPinned&&w.keyMods.ctrlCmd||w?.forceOpenSideBySide?S.SIDE_GROUP:S.ACTIVE_GROUP))}compareSymbols(l,n){if(typeof l.score=="number"&&typeof n.score=="number"){if(l.score>n.score)return-1;if(l.score<n.score)return 1}if(l.symbol&&n.symbol){const g=l.symbol.name.toLowerCase(),w=n.symbol.name.toLowerCase(),E=g.localeCompare(w);if(E!==0)return E}if(l.symbol&&n.symbol){const g=T.SymbolKinds.toIcon(l.symbol.kind).id,w=T.SymbolKinds.toIcon(n.symbol.kind).id;return g.localeCompare(w)}return 0}};e.SymbolsQuickAccessProvider=p,e.SymbolsQuickAccessProvider=p=d=fe([O(0,f.ILabelService),O(1,m.IOpenerService),O(2,S.IEditorService),O(3,a.IConfigurationService),O(4,r.ICodeEditorService)],p)}),define(Q[953],Y([1,0,20,33,123,50,210,2921,43,736,378,21]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApplyFileSnippetAction=void 0;class a extends m.SnippetsAction{static{this.Id="workbench.action.populateFileFromSnippet"}constructor(){super({id:a.Id,title:{value:(0,f.localize)(0,null),original:"Fill File with Snippet"},f1:!0})}async run(i){const s=i.get(S.ISnippetsService),o=i.get(v.IQuickInputService),u=i.get(h.IEditorService),d=i.get(D.ILanguageService),p=(0,b.getCodeEditor)(u.activeTextEditorControl);if(!p||!p.hasModel())return;const c=await s.getSnippets(void 0,{fileTemplateSnippets:!0,noRecencySort:!0,includeNoPrefixSnippets:!0});if(c.length===0)return;const l=await this._pick(o,d,c);l&&p.hasModel()&&(T.SnippetController2.get(p)?.apply([{range:p.getModel().getFullModelRange(),template:l.snippet.body}]),p.getModel().setLanguage(d.createById(l.langId),a.Id),p.focus())}async _pick(i,s,o){const u=[];for(const l of o)if((0,t.isFalsyOrEmpty)(l.scopes))u.push({langId:"",snippet:l});else for(const n of l.scopes)u.push({langId:n,snippet:l});const d=[],p=(0,t.groupBy)(u,(l,n)=>(0,y.compare)(l.langId,n.langId));for(const l of p){let n=!0;for(const g of l)n&&(d.push({type:"separator",label:s.getLanguageName(g.langId)??g.langId}),n=!1),d.push({snippet:g,label:g.snippet.prefix||g.snippet.name,detail:g.snippet.description})}return(await i.pick(d,{placeHolder:(0,f.localize)(1,null),matchOnDetail:!0}))?.snippet}}e.ApplyFileSnippetAction=a}),define(Q[3719],Y([1,0,4,96,74,259,2924,9,5,953,1305,378]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";var a,r;Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetCodeActions=void 0;let i=class{static{a=this}static{this._MAX_CODE_ACTIONS=4}static{this._overflowCommandCodeAction={kind:D.CodeActionKind.SurroundWith.value,title:S.SurroundWithSnippetEditorAction.options.title.value,command:{id:S.SurroundWithSnippetEditorAction.options.id,title:S.SurroundWithSnippetEditorAction.options.title.value}}}constructor(p){this._snippetService=p}async provideCodeActions(p,c){if(c.isEmpty())return;const l=y.Selection.isISelection(c)?c.getPosition():c.getStartPosition(),n=await(0,S.getSurroundableSnippets)(this._snippetService,p,l,!1);if(!n.length)return;const g=[];for(const w of n){if(g.length>=a._MAX_CODE_ACTIONS){g.push(a._overflowCommandCodeAction);break}g.push({title:(0,T.localize)(0,null,w.name),kind:D.CodeActionKind.SurroundWith.value,edit:o(p,c,w)})}return{actions:g,dispose(){}}}};i=a=fe([O(0,h.ISnippetsService)],i);let s=class{static{r=this}static{this._MAX_CODE_ACTIONS=4}static{this._overflowCommandCodeAction={title:(0,T.localize)(1,null),kind:D.CodeActionKind.SurroundWith.value,command:{id:m.ApplyFileSnippetAction.Id,title:""}}}constructor(p){this._snippetService=p,this.providedCodeActionKinds=[D.CodeActionKind.SurroundWith.value]}async provideCodeActions(p){if(p.getValueLength()!==0)return;const c=await this._snippetService.getSnippets(p.getLanguageId(),{fileTemplateSnippets:!0,includeNoPrefixSnippets:!0}),l=[];for(const n of c){if(l.length>=r._MAX_CODE_ACTIONS){l.push(r._overflowCommandCodeAction);break}l.push({title:(0,T.localize)(2,null,n.name),kind:D.CodeActionKind.SurroundWith.value,edit:o(p,p.getFullModelRange(),n)})}return{actions:l,dispose(){}}}};s=r=fe([O(0,h.ISnippetsService)],s);function o(d,p,c){return{edits:[{versionId:d.getVersionId(),resource:d.uri,textEdit:{range:p,text:c.body,insertAsSnippet:!0}}]}}let u=class{constructor(p,c,l){this._store=new t.DisposableStore;const n="editor.snippets.codeActions.enabled",g=new t.DisposableStore,w=()=>{g.clear(),l.getValue(n)&&(g.add(c.codeActionProvider.register("*",p.createInstance(i))),g.add(c.codeActionProvider.register("*",p.createInstance(s))))};w(),this._store.add(l.onDidChangeConfiguration(E=>E.affectsConfiguration(n)&&w())),this._store.add(g)}dispose(){this._store.dispose()}};e.SnippetCodeActions=u,e.SnippetCodeActions=u=fe([O(0,v.IInstantiationService),O(1,b.ILanguageFeaturesService),O(2,f.IConfigurationService)],u)}),define(Q[954],Y([1,0,34,32,22,2958,13,8,126,82,357,158,192,422,21]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTerminalActionBarArgs=e.setupTerminalMenus=e.TerminalMenuBarGroup=void 0;var s;(function(p){p.Create="1_create",p.Edit="2_edit",p.Clear="3_clear",p.Kill="4_kill",p.Config="5_config"})(s||(s={}));var o;(function(p){p.Create="1_create",p.Run="2_run",p.Manage="3_manage",p.Configure="4_configure"})(o||(e.TerminalMenuBarGroup=o={}));function u(){T.MenuRegistry.appendMenuItems([{id:T.MenuId.MenubarTerminalMenu,item:{group:"1_create",command:{id:"workbench.action.terminal.new",title:(0,D.localize)(0,null)},order:1}},{id:T.MenuId.MenubarTerminalMenu,item:{group:"1_create",command:{id:"workbench.action.terminal.split",title:(0,D.localize)(1,null),precondition:f.ContextKeyExpr.has("terminalIsOpen")},order:2,when:a.TerminalContextKeys.processSupported}},{id:T.MenuId.MenubarTerminalMenu,item:{group:"2_run",command:{id:"workbench.action.terminal.runActiveFile",title:(0,D.localize)(2,null)},order:3,when:a.TerminalContextKeys.processSupported}},{id:T.MenuId.MenubarTerminalMenu,item:{group:"2_run",command:{id:"workbench.action.terminal.runSelectedText",title:(0,D.localize)(3,null)},order:4,when:a.TerminalContextKeys.processSupported}}]),T.MenuRegistry.appendMenuItems([{id:T.MenuId.TerminalInstanceContext,item:{group:"1_create",command:{id:"workbench.action.terminal.split",title:r.terminalStrings.split.value}}},{id:T.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.new",title:r.terminalStrings.new},group:"1_create"}},{id:T.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.killViewOrEditor",title:r.terminalStrings.kill.value},group:"4_kill"}},{id:T.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.copySelection",title:(0,D.localize)(4,null)},group:"2_edit",order:1}},{id:T.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.copySelectionAsHtml",title:(0,D.localize)(5,null)},group:"2_edit",order:2}},{id:T.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.paste",title:(0,D.localize)(6,null)},group:"2_edit",order:3}},{id:T.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.clear",title:(0,D.localize)(7,null)},group:"3_clear"}},{id:T.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.sizeToContentWidth",title:r.terminalStrings.toggleSizeToContentWidth},group:"5_config"}},{id:T.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.selectAll",title:(0,D.localize)(8,null)},group:"2_edit",order:3}}]),T.MenuRegistry.appendMenuItems([{id:T.MenuId.TerminalEditorInstanceContext,item:{group:"1_create",command:{id:"workbench.action.terminal.split",title:r.terminalStrings.split.value}}},{id:T.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.new",title:r.terminalStrings.new},group:"1_create"}},{id:T.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.killEditor",title:r.terminalStrings.kill.value},group:"4_kill"}},{id:T.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.copySelection",title:(0,D.localize)(9,null)},group:"2_edit",order:1}},{id:T.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.copySelectionAsHtml",title:(0,D.localize)(10,null)},group:"2_edit",order:2}},{id:T.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.paste",title:(0,D.localize)(11,null)},group:"2_edit",order:3}},{id:T.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.clear",title:(0,D.localize)(12,null)},group:"3_clear"}},{id:T.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.selectAll",title:(0,D.localize)(13,null)},group:"2_edit",order:3}},{id:T.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.sizeToContentWidth",title:r.terminalStrings.toggleSizeToContentWidth},group:"5_config"}}]),T.MenuRegistry.appendMenuItems([{id:T.MenuId.TerminalTabEmptyAreaContext,item:{command:{id:"workbench.action.terminal.newWithProfile",title:(0,D.localize)(14,null)},group:"1_create"}},{id:T.MenuId.TerminalTabEmptyAreaContext,item:{command:{id:"workbench.action.terminal.new",title:r.terminalStrings.new},group:"1_create"}}]),T.MenuRegistry.appendMenuItems([{id:T.MenuId.TerminalNewDropdownContext,item:{command:{id:"workbench.action.terminal.selectDefaultShell",title:{value:(0,D.localize)(15,null),original:"Select Default Profile"}},group:"3_configure"}},{id:T.MenuId.TerminalNewDropdownContext,item:{command:{id:"workbench.action.terminal.openSettings",title:(0,D.localize)(16,null)},group:"3_configure"}},{id:T.MenuId.TerminalNewDropdownContext,item:{command:{id:"workbench.action.tasks.runTask",title:(0,D.localize)(17,null)},when:S.TaskExecutionSupportedContext,group:"4_tasks",order:1}},{id:T.MenuId.TerminalNewDropdownContext,item:{command:{id:"workbench.action.tasks.configureTaskRunner",title:(0,D.localize)(18,null)},when:S.TaskExecutionSupportedContext,group:"4_tasks",order:2}}]),T.MenuRegistry.appendMenuItems([{id:T.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.switchTerminal",title:{value:(0,D.localize)(19,null),original:"Switch Terminal"}},group:"navigation",order:0,when:f.ContextKeyExpr.and(f.ContextKeyExpr.equals("view",h.TERMINAL_VIEW_ID),f.ContextKeyExpr.not("config.terminal.integrated.tabs.enabled"))}},{id:T.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.focus",title:r.terminalStrings.focus},alt:{id:"workbench.action.terminal.split",title:r.terminalStrings.split.value,icon:y.Codicon.splitHorizontal},group:"navigation",order:0,when:f.ContextKeyExpr.and(f.ContextKeyExpr.equals("view",h.TERMINAL_VIEW_ID),f.ContextKeyExpr.has("config.terminal.integrated.tabs.enabled"),f.ContextKeyExpr.or(f.ContextKeyExpr.and(f.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActiveTerminal","singleTerminal"),f.ContextKeyExpr.equals("terminalCount",1)),f.ContextKeyExpr.and(f.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActiveTerminal","singleTerminalOrNarrow"),f.ContextKeyExpr.or(f.ContextKeyExpr.equals("terminalCount",1),f.ContextKeyExpr.has("isTerminalTabsNarrow"))),f.ContextKeyExpr.and(f.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActiveTerminal","singleGroup"),f.ContextKeyExpr.equals("terminalGroupCount",1)),f.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActiveTerminal","always")))}},{id:T.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.split",title:r.terminalStrings.split,icon:y.Codicon.splitHorizontal},group:"navigation",order:2,when:f.ContextKeyExpr.and(f.ContextKeyExpr.equals("view",h.TERMINAL_VIEW_ID),f.ContextKeyExpr.notEquals("config.terminal.integrated.tabs.hideCondition","never"),f.ContextKeyExpr.or(f.ContextKeyExpr.not("config.terminal.integrated.tabs.enabled"),f.ContextKeyExpr.and(f.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleTerminal"),f.ContextKeyExpr.equals("terminalCount",1)),f.ContextKeyExpr.and(f.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleTerminalOrNarrow"),f.ContextKeyExpr.or(f.ContextKeyExpr.equals("terminalCount",1),f.ContextKeyExpr.has("isTerminalTabsNarrow"))),f.ContextKeyExpr.and(f.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleGroup"),f.ContextKeyExpr.equals("terminalGroupCount",1)),f.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","always")))}},{id:T.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.kill",title:r.terminalStrings.kill,icon:y.Codicon.trash},group:"navigation",order:3,when:f.ContextKeyExpr.and(f.ContextKeyExpr.equals("view",h.TERMINAL_VIEW_ID),f.ContextKeyExpr.notEquals("config.terminal.integrated.tabs.hideCondition","never"),f.ContextKeyExpr.or(f.ContextKeyExpr.not("config.terminal.integrated.tabs.enabled"),f.ContextKeyExpr.and(f.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleTerminal"),f.ContextKeyExpr.equals("terminalCount",1)),f.ContextKeyExpr.and(f.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleTerminalOrNarrow"),f.ContextKeyExpr.or(f.ContextKeyExpr.equals("terminalCount",1),f.ContextKeyExpr.has("isTerminalTabsNarrow"))),f.ContextKeyExpr.and(f.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleGroup"),f.ContextKeyExpr.equals("terminalGroupCount",1)),f.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","always")))}},{id:T.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.new",title:r.terminalStrings.new,icon:y.Codicon.plus},alt:{id:"workbench.action.terminal.split",title:r.terminalStrings.split.value,icon:y.Codicon.splitHorizontal},group:"navigation",order:0,when:f.ContextKeyExpr.and(f.ContextKeyExpr.equals("view",h.TERMINAL_VIEW_ID),f.ContextKeyExpr.or(a.TerminalContextKeys.webExtensionContributedProfile,a.TerminalContextKeys.processSupported))}},{id:T.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.clear",title:(0,D.localize)(20,null),icon:y.Codicon.clearAll},group:"navigation",order:4,when:f.ContextKeyExpr.equals("view",h.TERMINAL_VIEW_ID),isHiddenByDefault:!0}},{id:T.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.runActiveFile",title:(0,D.localize)(21,null),icon:y.Codicon.run},group:"navigation",order:5,when:f.ContextKeyExpr.equals("view",h.TERMINAL_VIEW_ID),isHiddenByDefault:!0}},{id:T.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.runSelectedText",title:(0,D.localize)(22,null),icon:y.Codicon.selection},group:"navigation",order:6,when:f.ContextKeyExpr.equals("view",h.TERMINAL_VIEW_ID),isHiddenByDefault:!0}}]),T.MenuRegistry.appendMenuItems([{id:T.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.splitActiveTab",title:r.terminalStrings.split.value},group:"1_create",order:1}},{id:T.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.moveToEditorActiveTab",title:r.terminalStrings.moveToEditor.value},group:"1_create",order:2}},{id:T.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.renameActiveTab",title:(0,D.localize)(23,null)},group:"2_edit"}},{id:T.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.changeIconActiveTab",title:(0,D.localize)(24,null)},group:"2_edit"}},{id:T.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.changeColorActiveTab",title:(0,D.localize)(25,null)},group:"2_edit"}},{id:T.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.sizeToContentWidthActiveTab",title:(0,D.localize)(26,null)},group:"2_edit"}},{id:T.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.joinActiveTab",title:(0,D.localize)(27,null)},when:a.TerminalContextKeys.tabsSingularSelection.toNegated(),group:"5_config"}},{id:T.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.unsplitActiveTab",title:r.terminalStrings.unsplit.value},when:f.ContextKeyExpr.and(a.TerminalContextKeys.tabsSingularSelection,a.TerminalContextKeys.splitTerminal),group:"5_config"}},{id:T.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.killActiveTab",title:r.terminalStrings.kill.value},group:"4_kill"}}]),T.MenuRegistry.appendMenuItem(T.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.moveToTerminalPanel",title:r.terminalStrings.moveToTerminalPanel},when:m.ResourceContextKey.Scheme.isEqualTo(b.Schemas.vscodeTerminal),group:"2_files"}),T.MenuRegistry.appendMenuItem(T.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.rename",title:r.terminalStrings.rename},when:m.ResourceContextKey.Scheme.isEqualTo(b.Schemas.vscodeTerminal),group:"3_files"}),T.MenuRegistry.appendMenuItem(T.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.changeColor",title:r.terminalStrings.changeColor},when:m.ResourceContextKey.Scheme.isEqualTo(b.Schemas.vscodeTerminal),group:"3_files"}),T.MenuRegistry.appendMenuItem(T.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.changeIcon",title:r.terminalStrings.changeIcon},when:m.ResourceContextKey.Scheme.isEqualTo(b.Schemas.vscodeTerminal),group:"3_files"}),T.MenuRegistry.appendMenuItem(T.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.sizeToContentWidth",title:r.terminalStrings.toggleSizeToContentWidth},when:m.ResourceContextKey.Scheme.isEqualTo(b.Schemas.vscodeTerminal),group:"3_files"}),T.MenuRegistry.appendMenuItem(T.MenuId.EditorTitle,{command:{id:"workbench.action.createTerminalEditorSameGroup",title:r.terminalStrings.new,icon:y.Codicon.plus},alt:{id:"workbench.action.terminal.split",title:r.terminalStrings.split.value,icon:y.Codicon.splitHorizontal},group:"navigation",order:0,when:m.ResourceContextKey.Scheme.isEqualTo(b.Schemas.vscodeTerminal)})}e.setupTerminalMenus=u;function d(p,c,l,n,g,w){let E=[],C=[];c=c.filter(R=>!R.isAutoDetected);const I=p===v.TerminalLocation.Editor||typeof p=="object"&&"viewColumn"in p&&p.viewColumn===i.ACTIVE_GROUP?{viewColumn:i.SIDE_GROUP}:{splitActiveTerminal:!0};for(const R of c){const M=R.profileName===l,N={config:R,location:p},P={config:R,location:I},x=R.profileName.replace(/[\n\r\t]/g,"");E.push(new t.Action("workbench.action.terminal.newWithProfile",M?(0,D.localize)(28,null,x):x,void 0,!0,async()=>{const F=await g.createTerminal(N);g.setActiveInstance(F),await g.focusActiveInstance()})),C.push(new t.Action("workbench.action.terminal.split",M?(0,D.localize)(29,null,x):x,void 0,!0,async()=>{const F=await g.createTerminal(P);g.setActiveInstance(F),await g.focusActiveInstance()}))}for(const R of n){const N=R.title===l?(0,D.localize)(30,null,R.title.replace(/[\n\r\t]/g,"")):R.title.replace(/[\n\r\t]/g,"");E.push(new t.Action("contributed",N,void 0,!0,()=>g.createTerminal({config:{extensionIdentifier:R.extensionIdentifier,id:R.id,title:N},location:p}))),C.push(new t.Action("contributed-split",N,void 0,!0,()=>g.createTerminal({config:{extensionIdentifier:R.extensionIdentifier,id:R.id,title:N},location:I})))}const _=E.find(R=>R.label.endsWith("(Default)"));_&&(E=E.filter(R=>R!==_).sort((R,M)=>R.label.localeCompare(M.label)),E.unshift(_)),E.length>0&&(E.push(new t.SubmenuAction("split.profile",(0,D.localize)(31,null),C)),E.push(new t.Separator));const A=w.getActions();E.push(...t.Separator.join(...A.map(R=>R[1])));const k=C.find(R=>R.label.endsWith("(Default)"));return k&&(C=C.filter(R=>R!==k).sort((R,M)=>R.label.localeCompare(M.label)),C.unshift(k)),{dropdownAction:new t.Action("refresh profiles","Launch Profile...","codicon-chevron-down",!0),dropdownMenuActions:E,className:`terminal-tab-actions-${g.resolveLocation(p)}`}}e.getTerminalActionBarArgs=d}),define(Q[1344],Y([1,0,2961,347,128,119,28,19,37,532,379,422,126,21,5]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";var s;Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalQuickAccessProvider=void 0;let o=[],u=class extends y.PickerQuickAccessProvider{static{s=this}static{this.PREFIX="term "}constructor(p,c,l,n,g,w,E){super(s.PREFIX,{canAcceptInBackground:!0}),this._editorService=p,this._terminalService=c,this._terminalEditorService=l,this._terminalGroupService=n,this._commandService=g,this._themeService=w,this._instantiationService=E}_getPicks(p){o=[],o.push({type:"separator",label:"panel"});const c=this._terminalGroupService.groups;for(let w=0;w<c.length;w++){const E=c[w];for(let C=0;C<E.terminalInstances.length;C++){const I=E.terminalInstances[C],_=this._createPick(I,C,p,{groupIndex:w,groupSize:E.terminalInstances.length});_&&o.push(_)}}o.length>0&&o.push({type:"separator",label:"editor"});const l=this._terminalEditorService.instances;for(let w=0;w<l.length;w++){const E=l[w];E.target=a.TerminalLocation.Editor;const C=this._createPick(E,w,p);C&&o.push(C)}o.length>0&&o.push({type:"separator"});const n=(0,t.localize)(0,null);o.push({label:`$(plus) ${n}`,ariaLabel:n,accept:()=>this._commandService.executeCommand("workbench.action.terminal.new")});const g=(0,t.localize)(1,null);return o.push({label:`$(plus) ${g}`,ariaLabel:g,accept:()=>this._commandService.executeCommand("workbench.action.terminal.newWithProfile")}),o}_createPick(p,c,l,n){const g=this._instantiationService.invokeFunction(S.getIconId,p),w=n?n.groupSize>1?`${n.groupIndex+1}.${c+1}`:`${n.groupIndex+1}`:`${c+1}`,E=`$(${g}) ${w}: ${p.title}`,C=[],I=(0,S.getColorClass)(p);I&&C.push(I);const _=(0,S.getUriClasses)(p,this._themeService.getColorTheme().type);_&&C.push(..._);const A=(0,b.matchesFuzzy)(l,E,!0);if(A)return{label:E,description:p.description,highlights:{label:A},buttons:[{iconClass:v.ThemeIcon.asClassName(m.renameTerminalIcon),tooltip:(0,t.localize)(2,null)},{iconClass:v.ThemeIcon.asClassName(m.killTerminalIcon),tooltip:h.terminalStrings.kill.value}],iconClasses:C,trigger:k=>{switch(k){case 0:return this._commandService.executeCommand("workbench.action.terminal.rename",p),y.TriggerAction.NO_ACTION;case 1:return this._terminalService.safeDisposeTerminal(p),y.TriggerAction.REMOVE_ITEM}return y.TriggerAction.NO_ACTION},accept:(k,L)=>{if(p.target===a.TerminalLocation.Editor){const R=this._editorService.findEditors(p.resource);this._terminalEditorService.openEditor(p,{viewColumn:R?.[0].groupId}),this._terminalEditorService.setActiveInstance(p)}else this._terminalGroupService.showPanel(!L.inBackground),this._terminalGroupService.setActiveInstance(p)}}}};e.TerminalQuickAccessProvider=u,e.TerminalQuickAccessProvider=u=s=fe([O(0,r.IEditorService),O(1,D.ITerminalEditorService),O(2,D.ITerminalEditorService),O(3,D.ITerminalGroupService),O(4,T.ICommandService),O(5,f.IThemeService),O(6,i.IInstantiationService)],u)}),define(Q[3720],Y([1,0,245,181,39,594,268,47,21,22,61,616,126]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteTerminalChannelClient=e.REMOTE_TERMINAL_CHANNEL_NAME=void 0,e.REMOTE_TERMINAL_CHANNEL_NAME="remoteterminal";let r=class{get onPtyHostExit(){return this._channel.listen("$onPtyHostExitEvent")}get onPtyHostStart(){return this._channel.listen("$onPtyHostStartEvent")}get onPtyHostUnresponsive(){return this._channel.listen("$onPtyHostUnresponsiveEvent")}get onPtyHostResponsive(){return this._channel.listen("$onPtyHostResponsiveEvent")}get onPtyHostRequestResolveVariables(){return this._channel.listen("$onPtyHostRequestResolveVariablesEvent")}get onProcessData(){return this._channel.listen("$onProcessDataEvent")}get onProcessExit(){return this._channel.listen("$onProcessExitEvent")}get onProcessReady(){return this._channel.listen("$onProcessReadyEvent")}get onProcessReplay(){return this._channel.listen("$onProcessReplayEvent")}get onProcessOrphanQuestion(){return this._channel.listen("$onProcessOrphanQuestion")}get onExecuteCommand(){return this._channel.listen("$onExecuteCommand")}get onDidRequestDetach(){return this._channel.listen("$onDidRequestDetach")}get onDidChangeProperty(){return this._channel.listen("$onDidChangeProperty")}constructor(s,o,u,d,p,c,l,n,g,w){this._remoteAuthority=s,this._channel=o,this._configurationService=u,this._workspaceContextService=d,this._resolverService=p,this._environmentVariableService=c,this._remoteAuthorityResolverService=l,this._logService=n,this._editorService=g,this._labelService=w}restartPtyHost(){return this._channel.call("$restartPtyHost",[])}async createProcess(s,o,u,d,p,c,l,n){await this._configurationService.whenRemoteConfigurationLoaded();const g=Object.create(null),w=u?this._workspaceContextService.getWorkspaceFolder(u)??void 0:void 0;let E;try{E=(await this._resolverService.resolveAnyMap(w,{shellLaunchConfig:s,configuration:o})).resolvedVariables}catch(N){this._logService.error(N)}if(E)for(const[N,P]of E.entries())(/^config:/.test(N)||N==="selectedText"||N==="lineNumber")&&(g[N]=P);const C=[];for(const[N,P]of this._environmentVariableService.collections.entries())C.push([N,(0,D.serializeEnvironmentVariableCollection)(P.map),(0,D.serializeEnvironmentDescriptionMap)(P.descriptionMap)]);const I=await this._remoteAuthorityResolverService.resolveAuthority(this._remoteAuthority),_=I.options&&I.options.extensionHostEnv,A=this._workspaceContextService.getWorkspace(),k=A.folders,L=u?this._workspaceContextService.getWorkspaceFolder(u):null,R=f.EditorResourceAccessor.getOriginalUri(this._editorService.activeEditor,{supportSideBySide:f.SideBySideEditor.PRIMARY,filterByScheme:[m.Schemas.file,m.Schemas.vscodeUserData,m.Schemas.vscodeRemote]}),M={configuration:o,resolvedVariables:g,envVariableCollections:C,shellLaunchConfig:s,workspaceId:A.id,workspaceName:this._labelService.getWorkspaceLabel(A),workspaceFolders:k,activeWorkspaceFolder:L,activeFileResource:R,shouldPersistTerminal:p,options:d,cols:c,rows:l,unicodeVersion:n,resolverEnv:_};return await this._channel.call("$createProcess",M)}requestDetachInstance(s,o){return this._channel.call("$requestDetachInstance",[s,o])}acceptDetachInstanceReply(s,o){return this._channel.call("$acceptDetachInstanceReply",[s,o])}attachToProcess(s){return this._channel.call("$attachToProcess",[s])}detachFromProcess(s,o){return this._channel.call("$detachFromProcess",[s,o])}listProcesses(){return this._channel.call("$listProcesses")}getLatency(){return this._channel.call("$getLatency")}getPerformanceMarks(){return this._channel.call("$getPerformanceMarks")}reduceConnectionGraceTime(){return this._channel.call("$reduceConnectionGraceTime")}processBinary(s,o){return this._channel.call("$processBinary",[s,o])}start(s){return this._channel.call("$start",[s])}input(s,o){return this._channel.call("$input",[s,o])}acknowledgeDataEvent(s,o){return this._channel.call("$acknowledgeDataEvent",[s,o])}setUnicodeVersion(s,o){return this._channel.call("$setUnicodeVersion",[s,o])}shutdown(s,o){return this._channel.call("$shutdown",[s,o])}resize(s,o,u){return this._channel.call("$resize",[s,o,u])}clearBuffer(s){return this._channel.call("$clearBuffer",[s])}getInitialCwd(s){return this._channel.call("$getInitialCwd",[s])}getCwd(s){return this._channel.call("$getCwd",[s])}orphanQuestionReply(s){return this._channel.call("$orphanQuestionReply",[s])}sendCommandResult(s,o,u){return this._channel.call("$sendCommandResult",[s,o,u])}freePortKillProcess(s){return this._channel.call("$freePortKillProcess",[s])}installAutoReply(s,o){return this._channel.call("$installAutoReply",[s,o])}uninstallAllAutoReplies(){return this._channel.call("$uninstallAllAutoReplies",[])}getDefaultSystemShell(s){return this._channel.call("$getDefaultSystemShell",[s])}getProfiles(s,o,u){return this._channel.call("$getProfiles",[this._workspaceContextService.getWorkspace().id,s,o,u])}acceptPtyHostResolvedVariables(s,o){return this._channel.call("$acceptPtyHostResolvedVariables",[s,o])}getEnvironment(){return this._channel.call("$getEnvironment")}getWslPath(s,o){return this._channel.call("$getWslPath",[s,o])}setTerminalLayoutInfo(s){const u={workspaceId:this._workspaceContextService.getWorkspace().id,tabs:s?s.tabs:[]};return this._channel.call("$setTerminalLayoutInfo",u)}updateTitle(s,o,u){return this._channel.call("$updateTitle",[s,o,u])}updateIcon(s,o,u,d){return this._channel.call("$updateIcon",[s,o,u,d])}refreshProperty(s,o){return this._channel.call("$refreshProperty",[s,o])}updateProperty(s,o,u){return this._channel.call("$updateProperty",[s,o,u])}getTerminalLayoutInfo(){const o={workspaceId:this._workspaceContextService.getWorkspace().id};return this._channel.call("$getTerminalLayoutInfo",o)}reviveTerminalProcesses(s,o,u){return this._channel.call("$reviveTerminalProcesses",[s,o,u])}getRevivedPtyNewId(s){return this._channel.call("$getRevivedPtyNewId",[s])}serializeTerminalState(s){return this._channel.call("$serializeTerminalState",[s])}};e.RemoteTerminalChannelClient=r,e.RemoteTerminalChannelClient=r=fe([O(2,t.IWorkbenchConfigurationService),O(3,b.IWorkspaceContextService),O(4,T.IConfigurationResolverService),O(5,h.IEnvironmentVariableService),O(6,y.IRemoteAuthorityResolverService),O(7,a.ITerminalLogService),O(8,v.IEditorService),O(9,S.ILabelService)],r)}),define(Q[3721],Y([1,0,20,31,6,83,4,3006,8,5,23,24,138,3646,534,380,3644,235,381,359,334,21,9,470,17]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestService=void 0;let E=class extends T.Disposable{constructor(I,_,A,k,L,R,M,N,P){super(),this.storage=A,this.editorService=k,this.testProfiles=L,this.notificationService=R,this.configurationService=M,this.testResults=N,this.workspaceTrustRequestService=P,this.testControllers=new Map,this.cancelExtensionTestRunEmitter=new b.Emitter,this.willProcessDiffEmitter=new b.Emitter,this.didProcessDiffEmitter=new b.Emitter,this.testRefreshCancellations=new Set,this.uiRunningTests=new Map,this.onWillProcessDiff=this.willProcessDiffEmitter.event,this.onDidProcessDiff=this.didProcessDiffEmitter.event,this.onDidCancelTestRun=this.cancelExtensionTestRunEmitter.event,this.collection=new r.MainThreadTestCollection(this.expandTest.bind(this)),this.showInlineOutput=i.MutableObservableValue.stored(this._register(new s.StoredValue({key:"inlineTestOutputVisible",scope:1,target:0},this.storage)),!0),this.excluded=_.createInstance(o.TestExclusions),this.providerCount=d.TestingContextKeys.providerCount.bindTo(I),this.canRefreshTests=d.TestingContextKeys.canRefreshTests.bindTo(I),this.isRefreshingTests=d.TestingContextKeys.isRefreshingTests.bindTo(I),this.activeEditorHasTests=d.TestingContextKeys.activeEditorHasTests.bindTo(I),this._register(k.onDidActiveEditorChange(()=>this.updateEditorContextKeys()))}async expandTest(I,_){await this.testControllers.get(u.TestId.fromString(I).controllerId)?.expandTest(I,_)}cancelTestRun(I){if(this.cancelExtensionTestRunEmitter.fire({runId:I}),I===void 0)for(const _ of this.uiRunningTests.values())_.cancel();else this.uiRunningTests.get(I)?.cancel()}async runTests(I,_=y.CancellationToken.None){const A={targets:[],exclude:I.exclude?.map(k=>k.item.extId),continuous:I.continuous};for(const k of this.testProfiles.getGroupDefaultProfiles(I.group)){const L=I.tests.filter(R=>(0,p.canUseProfileWithTest)(k,R)).map(R=>R.item.extId);L.length&&A.targets.push({testIds:L,profileGroup:k.group,profileId:k.profileId,controllerId:k.controllerId})}if(A.targets.length===0)for(const k of(0,t.groupBy)(I.tests,(L,R)=>L.controllerId===R.controllerId?0:1)){const L=this.testProfiles.getControllerProfiles(k[0].controllerId),R=k.map(M=>({profile:L.find(N=>N.group===I.group&&(0,p.canUseProfileWithTest)(N,M)),test:M}));for(const M of(0,t.groupBy)(R,(N,P)=>N.profile===P.profile?0:1)){const N=M[0].profile;N&&A.targets.push({testIds:M.map(P=>P.test.item.extId),profileGroup:I.group,profileId:N.profileId,controllerId:N.controllerId})}}return this.runResolvedTests(A,_)}async startContinuousRun(I,_){if(I.exclude||(I.exclude=[...this.excluded.all]),!await this.workspaceTrustRequestService.requestWorkspaceTrust({message:(0,f.localize)(0,null)}))return;const L=(0,t.groupBy)(I.targets,(R,M)=>R.controllerId.localeCompare(M.controllerId)).map(R=>this.testControllers.get(R[0].controllerId)?.startContinuousRun(R.map(M=>({excludeExtIds:I.exclude.filter(N=>!M.testIds.includes(N)),profileId:M.profileId,controllerId:M.controllerId,testIds:M.testIds})),_).then(M=>{const N=M.map(P=>P.error).filter(w.isDefined);N.length&&this.notificationService.error((0,f.localize)(1,null,N.join(" ")))}));await Promise.all(L)}async runResolvedTests(I,_=y.CancellationToken.None){I.exclude||(I.exclude=[...this.excluded.all]);const A=this.testResults.createLiveResult(I);if(!await this.workspaceTrustRequestService.requestWorkspaceTrust({message:(0,f.localize)(2,null)}))return A.markComplete(),A;try{const L=new y.CancellationTokenSource(_);this.uiRunningTests.set(A.id,L);const M=(0,t.groupBy)(I.targets,(N,P)=>N.controllerId.localeCompare(P.controllerId)).map(N=>this.testControllers.get(N[0].controllerId)?.runTests(N.map(P=>({runId:A.id,excludeExtIds:I.exclude.filter(x=>!P.testIds.includes(x)),profileId:P.profileId,controllerId:P.controllerId,testIds:P.testIds})),L.token).then(P=>{const x=P.map(F=>F.error).filter(w.isDefined);x.length&&this.notificationService.error((0,f.localize)(3,null,x.join(" ")))}));return await this.saveAllBeforeTest(I),await Promise.all(M),A}finally{this.uiRunningTests.delete(A.id),A.markComplete()}}publishDiff(I,_){this.willProcessDiffEmitter.fire(_),this.collection.apply(_),this.updateEditorContextKeys(),this.didProcessDiffEmitter.fire(_)}getTestController(I){return this.testControllers.get(I)}async syncTests(){const I=new y.CancellationTokenSource;try{await Promise.all([...this.testControllers.values()].map(_=>_.syncTests(I.token)))}finally{I.dispose(!0)}}async refreshTests(I){const _=new y.CancellationTokenSource;this.testRefreshCancellations.add(_),this.isRefreshingTests.set(!0);try{I?await this.testControllers.get(I)?.refreshTests(_.token):await Promise.all([...this.testControllers.values()].map(A=>A.refreshTests(_.token)))}finally{this.testRefreshCancellations.delete(_),this.isRefreshingTests.set(this.testRefreshCancellations.size>0),_.dispose(!0)}}cancelRefreshTests(){for(const I of this.testRefreshCancellations)I.cancel();this.testRefreshCancellations.clear(),this.isRefreshingTests.set(!1)}registerTestController(I,_){this.testControllers.set(I,_),this.providerCount.set(this.testControllers.size),this.updateCanRefresh();const A=new T.DisposableStore;return A.add((0,T.toDisposable)(()=>{const k=[];for(const L of this.collection.rootItems)L.controllerId===I&&k.push({op:3,itemId:L.item.extId});this.publishDiff(I,k),this.testControllers.delete(I)&&(this.providerCount.set(this.testControllers.size),this.updateCanRefresh())})),A.add(_.canRefresh.onDidChange(this.updateCanRefresh,this)),A}updateEditorContextKeys(){const I=this.editorService.activeEditor?.resource;I?this.activeEditorHasTests.set(!D.Iterable.isEmpty(this.collection.getNodeByUrl(I))):this.activeEditorHasTests.set(!1)}async saveAllBeforeTest(I,_=this.configurationService,A=this.editorService){if(I.isUiTriggered===!1)return;(0,g.getTestingConfiguration)(this.configurationService,"testing.saveBeforeTest")&&await A.saveAll()}updateCanRefresh(){this.canRefreshTests.set(D.Iterable.some(this.testControllers.values(),I=>I.canRefresh.value))}};e.TestService=E,e.TestService=E=fe([O(0,v.IContextKeyService),O(1,m.IInstantiationService),O(2,h.IStorageService),O(3,l.IEditorService),O(4,p.ITestProfileService),O(5,S.INotificationService),O(6,n.IConfigurationService),O(7,c.ITestResultService),O(8,a.IWorkspaceTrustRequestService)],E)}),define(Q[3722],Y([1,0,7,216,299,80,6,4,243,27,137,75,264,3013,88,13,8,5,90,24,19,3655,21,1842]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchyTreePeekWidget=void 0;var w;(function(_){_.Loading="loading",_.Message="message",_.Data="data"})(w||(w={}));class E{static store(A,k){k.store("typeHierarchyPeekLayout",JSON.stringify(A),0,1)}static retrieve(A){const k=A.get("typeHierarchyPeekLayout",0,"{}"),L={ratio:.7,height:17};try{return{...L,...JSON.parse(k)}}catch{return L}}constructor(A,k){this.ratio=A,this.height=k}}class C extends d.WorkbenchAsyncDataTree{}let I=class extends a.PeekViewWidget{static{g=this}static{this.TitleMenu=new s.MenuId("typehierarchy/title")}constructor(A,k,L,R,M,N,P,x,F,V,W){super(A,{showFrame:!0,showArrow:!0,isResizeable:!0,isAccessible:!0},W),this._where=k,this._direction=L,this._peekViewService=M,this._editorService=N,this._textModelService=P,this._storageService=x,this._menuService=F,this._contextKeyService=V,this._instantiationService=W,this._treeViewStates=new Map,this._previewDisposable=new f.DisposableStore,this.create(),this._peekViewService.addExclusiveWidget(A,this),this._applyTheme(R.getColorTheme()),this._disposables.add(R.onDidColorThemeChange(this._applyTheme,this)),this._disposables.add(this._previewDisposable)}dispose(){E.store(this._layoutInfo,this._storageService),this._splitView.dispose(),this._tree.dispose(),this._editor.dispose(),super.dispose()}get direction(){return this._direction}_applyTheme(A){const k=A.getColor(a.peekViewBorder)||D.Color.transparent;this.style({arrowColor:k,frameColor:k,headerBackgroundColor:A.getColor(a.peekViewTitleBackground)||D.Color.transparent,primaryHeadingColor:A.getColor(a.peekViewTitleForeground),secondaryHeadingColor:A.getColor(a.peekViewTitleInfoForeground)})}_fillHead(A){super._fillHead(A,!0);const k=this._menuService.createMenu(g.TitleMenu,this._contextKeyService),L=()=>{const R=[];(0,i.createAndFillInActionBarActions)(k,void 0,R),this._actionbarWidget.clear(),this._actionbarWidget.push(R,{label:!1,icon:!0})};this._disposables.add(k),this._disposables.add(k.onDidChange(L)),L()}_fillBody(A){this._layoutInfo=E.retrieve(this._storageService),this._dim=new t.Dimension(0,0),this._parent=A,A.classList.add("type-hierarchy");const k=document.createElement("div");k.classList.add("message"),A.appendChild(k),this._message=k,this._message.tabIndex=0;const L=document.createElement("div");L.classList.add("results"),A.appendChild(L),this._splitView=new y.SplitView(L,{orientation:1});const R=document.createElement("div");R.classList.add("editor"),L.appendChild(R);const M={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._editor=this._instantiationService.createInstance(v.EmbeddedCodeEditorWidget,R,M,{},this.editor);const N=document.createElement("div");N.classList.add("tree"),L.appendChild(N);const P={sorter:new l.Sorter,accessibilityProvider:new l.AccessibilityProvider(()=>this._direction),identityProvider:new l.IdentityProvider(()=>this._direction),expandOnlyOnTwistieClick:!0,overrideStyles:{listBackground:a.peekViewResultsBackground}};this._tree=this._instantiationService.createInstance(C,"TypeHierarchyPeek",N,new l.VirtualDelegate,[this._instantiationService.createInstance(l.TypeRenderer)],this._instantiationService.createInstance(l.DataSource,()=>this._direction),P),this._splitView.addView({onDidChange:T.Event.None,element:R,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:x=>{this._dim.height&&this._editor.layout({height:this._dim.height,width:x})}},y.Sizing.Distribute),this._splitView.addView({onDidChange:T.Event.None,element:N,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:x=>{this._dim.height&&this._tree.layout(this._dim.height,x)}},y.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this._layoutInfo.ratio=this._splitView.getViewSize(0)/this._dim.width)})),this._disposables.add(this._tree.onDidChangeFocus(this._updatePreview,this)),this._disposables.add(this._editor.onMouseDown(x=>{const{event:F,target:V}=x;if(F.detail!==2)return;const[W]=this._tree.getFocus();W&&(this.dispose(),this._editorService.openEditor({resource:W.item.uri,options:{selection:V.range}}))})),this._disposables.add(this._tree.onMouseDblClick(x=>{x.target!==b.TreeMouseEventTarget.Twistie&&x.element&&(this.dispose(),this._editorService.openEditor({resource:x.element.item.uri,options:{selection:x.element.item.selectionRange,pinned:!0}}))})),this._disposables.add(this._tree.onDidChangeSelection(x=>{const[F]=x.elements;F&&x.browserEvent instanceof KeyboardEvent&&(this.dispose(),this._editorService.openEditor({resource:F.item.uri,options:{selection:F.item.selectionRange,pinned:!0}}))}))}async _updatePreview(){const[A]=this._tree.getFocus();if(!A)return;this._previewDisposable.clear();const k={description:"type-hierarchy-decoration",stickiness:1,className:"type-decoration",overviewRuler:{color:(0,c.themeColorFromId)(a.peekViewEditorMatchHighlight),position:S.OverviewRulerLane.Center}};let L;this._direction==="supertypes"?L=A.parent?A.parent.item.uri:A.model.root.uri:L=A.item.uri;const R=await this._textModelService.createModelReference(L);this._editor.setModel(R.object.textEditorModel);const M=[];let N;const P={uri:A.item.uri,range:A.item.selectionRange};if(P.uri.toString()===L.toString()&&(M.push({range:P.range,options:k}),N=N?m.Range.plusRange(P.range,N):P.range),N){this._editor.revealRangeInCenter(N,1);const F=this._editor.createDecorationsCollection(M);this._previewDisposable.add((0,f.toDisposable)(()=>F.clear()))}this._previewDisposable.add(R);const x=this._direction==="supertypes"?(0,r.localize)(0,null,A.model.root.name):(0,r.localize)(1,null,A.model.root.name);this.setTitle(x)}showLoading(){this._parent.dataset.state="loading",this.setTitle((0,r.localize)(2,null)),this._show()}showMessage(A){this._parent.dataset.state="message",this.setTitle(""),this.setMetaTitle(""),this._message.innerText=A,this._show(),this._message.focus()}async showModel(A){this._show();const k=this._treeViewStates.get(this._direction);await this._tree.setInput(A,k);const L=this._tree.getNode(A).children[0];await this._tree.expand(L.element),L.children.length===0?this.showMessage(this._direction==="supertypes"?(0,r.localize)(3,null,A.root.name):(0,r.localize)(4,null,A.root.name)):(this._parent.dataset.state="data",(!k||this._tree.getFocus().length===0)&&this._tree.setFocus([L.children[0].element]),this._tree.domFocus(),this._updatePreview())}getModel(){return this._tree.getInput()}getFocused(){return this._tree.getFocus()[0]}async updateDirection(A){const k=this._tree.getInput();k&&A!==this._direction&&(this._treeViewStates.set(this._direction,this._tree.getViewState()),this._direction=A,await this.showModel(k))}_show(){this._isShowing||(this.editor.revealLineInCenterIfOutsideViewport(this._where.lineNumber,0),super.show(m.Range.fromPositions(this._where),this._layoutInfo.height))}_onWidth(A){this._dim&&this._doLayoutBody(this._dim.height,A)}_doLayoutBody(A,k){(this._dim.height!==A||this._dim.width!==k)&&(super._doLayoutBody(A,k),this._dim=new t.Dimension(k,A),this._layoutInfo.height=this._viewZone?this._viewZone.heightInLines:this._layoutInfo.height,this._splitView.layout(k),this._splitView.resizeView(0,k*this._layoutInfo.ratio))}};e.TypeHierarchyTreePeekWidget=I,e.TypeHierarchyTreePeekWidget=I=g=fe([O(3,c.IThemeService),O(4,a.IPeekViewService),O(5,n.IEditorService),O(6,h.ITextModelService),O(7,p.IStorageService),O(8,s.IMenuService),O(9,o.IContextKeyService),O(10,u.IInstantiationService)],I)}),define(Q[3723],Y([1,0,31,32,15,6,4,48,79,27,264,3012,13,8,5,24,3722,941]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0});const p=new r.RawContextKey("editorHasTypeHierarchyProvider",!1,(0,h.localize)(0,null)),c=new r.RawContextKey("typeHierarchyVisible",!1,(0,h.localize)(1,null)),l=new r.RawContextKey("typeHierarchyDirection",void 0,{type:"string",description:(0,h.localize)(2,null)});function n(w){return w==="subtypes"||w==="supertypes"?w:"subtypes"}let g=class{static{d=this}static{this.Id="typeHierarchy"}static get(E){return E.getContribution(d.Id)}static{this._storageDirectionKey="typeHierarchy/defaultDirection"}constructor(E,C,I,_,A){this._editor=E,this._contextKeyService=C,this._storageService=I,this._editorService=_,this._instantiationService=A,this._disposables=new T.DisposableStore,this._sessionDisposables=new T.DisposableStore,this._ctxHasProvider=p.bindTo(this._contextKeyService),this._ctxIsVisible=c.bindTo(this._contextKeyService),this._ctxDirection=l.bindTo(this._contextKeyService),this._disposables.add(D.Event.any(E.onDidChangeModel,E.onDidChangeModelLanguage,u.TypeHierarchyProviderRegistry.onDidChange)(()=>{this._ctxHasProvider.set(E.hasModel()&&u.TypeHierarchyProviderRegistry.has(E.getModel()))})),this._disposables.add(this._sessionDisposables)}dispose(){this._disposables.dispose()}async startTypeHierarchyFromEditor(){if(this._sessionDisposables.clear(),!this._editor.hasModel())return;const E=this._editor.getModel(),C=this._editor.getPosition();if(!u.TypeHierarchyProviderRegistry.has(E))return;const I=new t.CancellationTokenSource,_=u.TypeHierarchyModel.create(E,C,I.token),A=n(this._storageService.get(d._storageDirectionKey,0,"subtypes"));this._showTypeHierarchyWidget(C,A,_,I)}_showTypeHierarchyWidget(E,C,I,_){this._ctxIsVisible.set(!0),this._ctxDirection.set(C),D.Event.any(this._editor.onDidChangeModel,this._editor.onDidChangeModelLanguage)(this.endTypeHierarchy,this,this._sessionDisposables),this._widget=this._instantiationService.createInstance(o.TypeHierarchyTreePeekWidget,this._editor,E,C),this._widget.showLoading(),this._sessionDisposables.add(this._widget.onDidClose(()=>{this.endTypeHierarchy(),this._storageService.store(d._storageDirectionKey,this._widget.direction,0,0)})),this._sessionDisposables.add({dispose(){_.dispose(!0)}}),this._sessionDisposables.add(this._widget),I.then(A=>{_.token.isCancellationRequested||(A?(this._sessionDisposables.add(A),this._widget.showModel(A)):this._widget.showMessage((0,h.localize)(3,null)))}).catch(A=>{if((0,b.isCancellationError)(A)){this.endTypeHierarchy();return}this._widget.showMessage((0,h.localize)(4,null))})}async startTypeHierarchyFromTypeHierarchy(){if(!this._widget)return;const E=this._widget.getModel(),C=this._widget.getFocused();if(!C||!E)return;const I=await this._editorService.openCodeEditor({resource:C.item.uri},this._editor);if(!I)return;const _=E.fork(C.item);this._sessionDisposables.clear(),d.get(I)?._showTypeHierarchyWidget(m.Range.lift(_.root.selectionRange).getStartPosition(),this._widget.direction,Promise.resolve(_),new t.CancellationTokenSource)}showSupertypes(){this._widget?.updateDirection("supertypes"),this._ctxDirection.set("supertypes")}showSubtypes(){this._widget?.updateDirection("subtypes"),this._ctxDirection.set("subtypes")}endTypeHierarchy(){this._sessionDisposables.clear(),this._ctxIsVisible.set(!1),this._editor.focus()}};g=d=fe([O(1,r.IContextKeyService),O(2,s.IStorageService),O(3,v.ICodeEditorService),O(4,i.IInstantiationService)],g),(0,f.registerEditorContribution)(g.Id,g,0),(0,a.registerAction2)(class extends f.EditorAction2{constructor(){super({id:"editor.showTypeHierarchy",title:{value:(0,h.localize)(5,null),original:"Peek Type Hierarchy"},menu:{id:a.MenuId.EditorContextPeek,group:"navigation",order:1e3,when:r.ContextKeyExpr.and(p,S.PeekContext.notInPeekEditor)},precondition:r.ContextKeyExpr.and(p,S.PeekContext.notInPeekEditor),f1:!0})}async runEditorCommand(E,C){return g.get(C)?.startTypeHierarchyFromEditor()}}),(0,a.registerAction2)(class extends f.EditorAction2{constructor(){super({id:"editor.showSupertypes",title:{value:(0,h.localize)(6,null),original:"Show Supertypes"},icon:y.Codicon.typeHierarchySuper,precondition:r.ContextKeyExpr.and(c,l.isEqualTo("subtypes")),keybinding:{weight:200,primary:1024+512+38},menu:{id:o.TypeHierarchyTreePeekWidget.TitleMenu,when:l.isEqualTo("subtypes"),order:1}})}runEditorCommand(w,E){return g.get(E)?.showSupertypes()}}),(0,a.registerAction2)(class extends f.EditorAction2{constructor(){super({id:"editor.showSubtypes",title:{value:(0,h.localize)(7,null),original:"Show Subtypes"},icon:y.Codicon.typeHierarchySub,precondition:r.ContextKeyExpr.and(c,l.isEqualTo("supertypes")),keybinding:{weight:200,primary:1024+512+38},menu:{id:o.TypeHierarchyTreePeekWidget.TitleMenu,when:l.isEqualTo("supertypes"),order:1}})}runEditorCommand(w,E){return g.get(E)?.showSubtypes()}}),(0,a.registerAction2)(class extends f.EditorAction2{constructor(){super({id:"editor.refocusTypeHierarchy",title:{value:(0,h.localize)(8,null),original:"Refocus Type Hierarchy"},precondition:c,keybinding:{weight:200,primary:1024+3}})}async runEditorCommand(w,E){return g.get(E)?.startTypeHierarchyFromTypeHierarchy()}}),(0,a.registerAction2)(class extends f.EditorAction2{constructor(){super({id:"editor.closeTypeHierarchy",title:(0,h.localize)(9,null),icon:y.Codicon.close,precondition:c,keybinding:{weight:200+10,primary:9,when:r.ContextKeyExpr.not("config.editor.stablePeek")},menu:{id:o.TypeHierarchyTreePeekWidget.TitleMenu,order:1e3}})}runEditorCommand(w,E){return g.get(E)?.endTypeHierarchy()}})}),define(Q[3724],Y([1,0,48,512,3027,13,8,222,424,21]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreventDefaultContextMenuItemsContextKeyName=void 0;const S=100;function h(a,r){a?.addImplementation(S,"webview",i=>{const o=i.get(f.IWebviewService).activeWebview;if(o?.isFocused)return r(o),!0;if(document.activeElement?.classList.contains("action-menu-item")){const u=i.get(m.IEditorService);if(u.activeEditor instanceof v.WebviewInput)return r(u.activeEditor.webview),!0}return!1})}h(t.UndoCommand,a=>a.undo()),h(t.RedoCommand,a=>a.redo()),h(t.SelectAllCommand,a=>a.selectAll()),h(y.CopyAction,a=>a.copy()),h(y.PasteAction,a=>a.paste()),h(y.CutAction,a=>a.cut()),e.PreventDefaultContextMenuItemsContextKeyName="preventDefaultContextMenuItems",y.CutAction&&D.MenuRegistry.appendMenuItem(D.MenuId.WebviewContext,{command:{id:y.CutAction.id,title:b.localize(0,null)},group:"5_cutcopypaste",order:1,when:T.ContextKeyExpr.not(e.PreventDefaultContextMenuItemsContextKeyName)}),y.CopyAction&&D.MenuRegistry.appendMenuItem(D.MenuId.WebviewContext,{command:{id:y.CopyAction.id,title:b.localize(1,null)},group:"5_cutcopypaste",order:2,when:T.ContextKeyExpr.not(e.PreventDefaultContextMenuItemsContextKeyName)}),y.PasteAction&&D.MenuRegistry.appendMenuItem(D.MenuId.WebviewContext,{command:{id:y.PasteAction.id,title:b.localize(2,null)},group:"5_cutcopypaste",order:3,when:T.ContextKeyExpr.not(e.PreventDefaultContextMenuItemsContextKeyName)})}),define(Q[3725],Y([1,0,123,3363,19,21,79,35,26,9,520]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeEditorService=void 0;let h=class extends y.AbstractCodeEditorService{constructor(r,i,s){super(i),this.editorService=r,this.configurationService=s,this._register(this.registerCodeEditorOpenHandler(this.doOpenCodeEditor.bind(this))),this._register(this.registerCodeEditorOpenHandler(this.doOpenCodeEditorFromDiff.bind(this)))}getActiveCodeEditor(){const r=this.editorService.activeTextEditorControl;if((0,t.isCodeEditor)(r))return r;if((0,t.isDiffEditor)(r))return r.getModifiedEditor();const i=this.editorService.activeEditorPane?.getControl();return(0,t.isCompositeEditor)(i)&&(0,t.isCodeEditor)(i.activeCodeEditor)?i.activeCodeEditor:null}async doOpenCodeEditorFromDiff(r,i,s){const o=this.editorService.activeTextEditorControl;if(!s&&(0,t.isDiffEditor)(o)&&r.options&&r.resource&&i===o.getModifiedEditor()&&o.getModel()&&(0,v.isEqual)(r.resource,o.getModel()?.modified.uri)){const u=o.getModifiedEditor();return(0,S.applyTextEditorOptions)(r.options,u,0),u}return null}async doOpenCodeEditor(r,i,s){if(!this.configurationService.getValue().workbench?.editor?.enablePreviewFromCodeNavigation&&i&&!r.options?.pinned&&!s&&!(0,v.isEqual)(i.getModel()?.uri,r.resource)){for(const d of this.editorService.visibleEditorPanes)if((0,t.getCodeEditor)(d.getControl())===i){d.group.pinEditor();break}}const u=await this.editorService.openEditor(r,s?D.SIDE_GROUP:D.ACTIVE_GROUP);if(u){const d=u.getControl();if((0,t.isCodeEditor)(d))return d;if((0,t.isCompositeEditor)(d)&&(0,t.isCodeEditor)(d.activeCodeEditor))return d.activeCodeEditor}return null}};e.CodeEditorService=h,e.CodeEditorService=h=fe([O(0,D.IEditorService),O(1,b.IThemeService),O(2,m.IConfigurationService)],h),(0,f.registerSingleton)(T.ICodeEditorService,h,1)}),define(Q[362],Y([1,0,70,21]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorGroupToColumn=e.columnToEditorGroup=void 0;function b(T,f,v=y.ACTIVE_GROUP){if(v===y.ACTIVE_GROUP||v===y.SIDE_GROUP)return v;let m=T.getGroups(2)[v];if(!m&&v<9){for(let S=0;S<=v;S++){const h=T.getGroups(2);h[S]||T.addGroup(h[S-1],(0,t.preferredSideBySideGroupDirection)(f))}m=T.getGroups(2)[v]}return m?.id??y.SIDE_GROUP}e.columnToEditorGroup=b;function D(T,f){const v=typeof f=="number"?T.getGroup(f):f;return T.getGroups(2).indexOf(v??T.activeGroup)}e.editorGroupToColumn=D}),define(Q[955],Y([1,0,9,208,47,70,21]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findGroup=void 0;function f(a,r,i){const s=a.get(D.IEditorGroupsService),o=a.get(t.IConfigurationService),u=v(r,i,s,o);let d;return s.activeGroup!==u&&r.options&&!r.options.inactive&&r.options.preserveFocus&&typeof r.options.activation!="number"&&i!==T.SIDE_GROUP&&(d=y.EditorActivation.ACTIVATE),[u,d]}e.findGroup=f;function v(a,r,i,s){let o;const u=(0,b.isEditorInputWithOptions)(a)?a.editor:a,d=a.options;if(r&&typeof r!="number")o=r;else if(typeof r=="number"&&r>=0)o=i.getGroup(r);else if(r===T.SIDE_GROUP){const p=(0,D.preferredSideBySideGroupDirection)(s);let c=i.findGroup({direction:p});(!c||m(c,u))&&(c=i.addGroup(i.activeGroup,p)),o=c}else if(!d||typeof d.index!="number"){const p=i.getGroups(1);if(d?.revealIfVisible){for(const c of p)if(S(c,u)){o=c;break}}if(!o&&(d?.revealIfOpened||s.getValue("workbench.editor.revealIfOpen")||(0,b.isEditorInput)(u)&&u.hasCapability(8))){let c,l;for(const n of p)if(h(n,u)&&(l||(l=n),!c&&n.isActive(u)&&(c=n)),l&&c)break;o=c||l}}if(!o){let p=i.activeGroup;if(m(p,u)){for(const c of i.getGroups(1))if(!m(c,u)){p=c;break}m(p,u)?o=i.addGroup(p,(0,D.preferredSideBySideGroupDirection)(s)):o=p}else o=p}return o}function m(a,r){return!(!a.isLocked||h(a,r))}function S(a,r){return a.activeEditor?a.activeEditor.matches(r):!1}function h(a,r){for(const i of a.editors)if(i.matches(r))return!0;return!1}}),define(Q[3726],Y([1,0,153,690]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerMainProcessRemoteService)(y.IEncryptionService,"encryption")}),define(Q[295],Y([1,0,22,26,10,91,102,15,206,11,17,5,845]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserWorkbenchEnvironmentService=e.IBrowserWorkbenchEnvironmentService=void 0,e.IBrowserWorkbenchEnvironmentService=(0,h.refineServiceDecorator)(D.IEnvironmentService);class r{get remoteAuthority(){return this.options.remoteAuthority}get expectsResolverExtension(){return!!this.options.remoteAuthority?.includes("+")&&!this.options.webSocketFactory}get isBuilt(){return!!this.productService.commit}get logLevel(){const s=this.payload?.get("logLevel");return s?s.split(",").find(o=>!a.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.test(o)):this.options.developmentOptions?.logLevel!==void 0?(0,m.LogLevelToString)(this.options.developmentOptions?.logLevel):void 0}get extensionLogLevel(){const s=this.payload?.get("logLevel");if(s){const o=[];for(const u of s.split(",")){const d=a.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.exec(u);d&&d[1]&&d[2]&&o.push([d[1],d[2]])}return o.length?o:void 0}return this.options.developmentOptions?.extensionLogLevel!==void 0?this.options.developmentOptions?.extensionLogLevel.map(([o,u])=>[o,(0,m.LogLevelToString)(u)]):void 0}get profDurationMarkers(){const s=this.payload?.get("profDurationMarkers");if(s){const o=[];for(const u of s.split(","))o.push(u);return o.length===2?o:void 0}}get windowLogsPath(){return this.logsHome}get logFile(){return(0,y.joinPath)(this.windowLogsPath,"window.log")}get userRoamingDataHome(){return b.URI.file("/User").with({scheme:t.Schemas.vscodeUserData})}get argvResource(){return(0,y.joinPath)(this.userRoamingDataHome,"argv.json")}get cacheHome(){return(0,y.joinPath)(this.userRoamingDataHome,"caches")}get workspaceStorageHome(){return(0,y.joinPath)(this.userRoamingDataHome,"workspaceStorage")}get localHistoryHome(){return(0,y.joinPath)(this.userRoamingDataHome,"History")}get stateResource(){return(0,y.joinPath)(this.userRoamingDataHome,"State","storage.json")}get userDataSyncHome(){return(0,y.joinPath)(this.userRoamingDataHome,"sync",this.workspaceId)}get sync(){}get keyboardLayoutResource(){return(0,y.joinPath)(this.userRoamingDataHome,"keyboardLayout.json")}get untitledWorkspacesHome(){return(0,y.joinPath)(this.userRoamingDataHome,"Workspaces")}get serviceMachineIdResource(){return(0,y.joinPath)(this.userRoamingDataHome,"machineid")}get extHostLogsPath(){return(0,y.joinPath)(this.logsHome,"exthost")}get extHostTelemetryLogFile(){return(0,y.joinPath)(this.extHostLogsPath,"extensionTelemetry.log")}get debugExtensionHost(){return this.extensionHostDebugEnvironment||(this.extensionHostDebugEnvironment=this.resolveExtensionHostDebugEnvironment()),this.extensionHostDebugEnvironment.params}get isExtensionDevelopment(){return this.extensionHostDebugEnvironment||(this.extensionHostDebugEnvironment=this.resolveExtensionHostDebugEnvironment()),this.extensionHostDebugEnvironment.isExtensionDevelopment}get extensionDevelopmentLocationURI(){return this.extensionHostDebugEnvironment||(this.extensionHostDebugEnvironment=this.resolveExtensionHostDebugEnvironment()),this.extensionHostDebugEnvironment.extensionDevelopmentLocationURI}get extensionDevelopmentLocationKind(){return this.extensionHostDebugEnvironment||(this.extensionHostDebugEnvironment=this.resolveExtensionHostDebugEnvironment()),this.extensionHostDebugEnvironment.extensionDevelopmentKind}get extensionTestsLocationURI(){return this.extensionHostDebugEnvironment||(this.extensionHostDebugEnvironment=this.resolveExtensionHostDebugEnvironment()),this.extensionHostDebugEnvironment.extensionTestsLocationURI}get extensionEnabledProposedApi(){return this.extensionHostDebugEnvironment||(this.extensionHostDebugEnvironment=this.resolveExtensionHostDebugEnvironment()),this.extensionHostDebugEnvironment.extensionEnabledProposedApi}get debugRenderer(){return this.extensionHostDebugEnvironment||(this.extensionHostDebugEnvironment=this.resolveExtensionHostDebugEnvironment()),this.extensionHostDebugEnvironment.debugRenderer}get enableSmokeTestDriver(){return this.options.developmentOptions?.enableSmokeTestDriver}get disableExtensions(){return this.payload?.get("disableExtensions")==="true"}get enableExtensions(){return this.options.enabledExtensions}get webviewExternalEndpoint(){const s=this.options.webviewEndpoint||this.productService.webviewContentExternalBaseUrlTemplate||"https://{{uuid}}.vscode-cdn.net/{{quality}}/{{commit}}/out/vs/workbench/contrib/webview/browser/pre/",o=this.payload?.get("webviewExternalEndpointCommit");return s.replace("{{commit}}",o??this.productService.commit??"ef65ac1ba57f57f2a3961bfe94aa20481caca4c6").replace("{{quality}}",(o?"insider":this.productService.quality)??"insider")}get extensionTelemetryLogResource(){return(0,y.joinPath)(this.logsHome,"extensionTelemetry.log")}get disableTelemetry(){return!0}get verbose(){return this.payload?.get("verbose")==="true"}get logExtensionHostCommunication(){return this.payload?.get("logExtensionHostCommunication")==="true"}get skipReleaseNotes(){return this.payload?.get("skipReleaseNotes")==="true"}get skipWelcome(){return this.payload?.get("skipWelcome")==="true"}get disableWorkspaceTrust(){return!this.options.enableWorkspaceTrust}get lastActiveProfile(){return this.payload?.get("lastActiveProfile")}constructor(s,o,u,d){if(this.workspaceId=s,this.logsHome=o,this.options=u,this.productService=d,this.extensionHostDebugEnvironment=void 0,this.editSessionId=this.options.editSessionId,u.workspaceProvider&&Array.isArray(u.workspaceProvider.payload))try{this.payload=new Map(u.workspaceProvider.payload)}catch(p){(0,f.onUnexpectedError)(p)}}resolveExtensionHostDebugEnvironment(){const s={params:{port:null,break:!1},debugRenderer:!1,isExtensionDevelopment:!1,extensionDevelopmentLocationURI:void 0,extensionDevelopmentKind:void 0};if(this.payload)for(const[u,d]of this.payload)switch(u){case"extensionDevelopmentPath":s.extensionDevelopmentLocationURI||(s.extensionDevelopmentLocationURI=[]),s.extensionDevelopmentLocationURI.push(b.URI.parse(d)),s.isExtensionDevelopment=!0;break;case"extensionDevelopmentKind":s.extensionDevelopmentKind=[d];break;case"extensionTestsPath":s.extensionTestsLocationURI=b.URI.parse(d);break;case"debugRenderer":s.debugRenderer=d==="true";break;case"debugId":s.params.debugId=d;break;case"inspect-brk-extensions":s.params.port=parseInt(d),s.params.break=!0;break;case"inspect-extensions":s.params.port=parseInt(d);break;case"enableProposedApi":s.extensionEnabledProposedApi=[];break}const o=this.options.developmentOptions;return o&&!s.isExtensionDevelopment&&(o.extensions?.length&&(s.extensionDevelopmentLocationURI=o.extensions.map(u=>b.URI.revive(u)),s.isExtensionDevelopment=!0),o.extensionTestsPath&&(s.extensionTestsLocationURI=b.URI.revive(o.extensionTestsPath))),s}get filesToOpenOrCreate(){if(this.payload){const s=this.payload.get("openFile");if(s){const o=b.URI.parse(s);if(this.payload.has("gotoLineMode")){const u=(0,v.parseLineAndColumnAware)(o.path);return[{fileUri:o.with({path:u.path}),options:{selection:(0,S.isUndefined)(u.line)?void 0:{startLineNumber:u.line,startColumn:u.column||1}}}]}return[{fileUri:o}]}}}get filesToDiff(){if(this.payload){const s=this.payload.get("diffFilePrimary"),o=this.payload.get("diffFileSecondary");if(s&&o)return[{fileUri:b.URI.parse(o)},{fileUri:b.URI.parse(s)}]}}get filesToMerge(){if(this.payload){const s=this.payload.get("mergeFile1"),o=this.payload.get("mergeFile2"),u=this.payload.get("mergeFileBase"),d=this.payload.get("mergeFileResult");if(s&&o&&u&&d)return[{fileUri:b.URI.parse(s)},{fileUri:b.URI.parse(o)},{fileUri:b.URI.parse(u)},{fileUri:b.URI.parse(d)}]}}}e.BrowserWorkbenchEnvironmentService=r,fe([T.memoize],r.prototype,"remoteAuthority",null),fe([T.memoize],r.prototype,"expectsResolverExtension",null),fe([T.memoize],r.prototype,"isBuilt",null),fe([T.memoize],r.prototype,"logLevel",null),fe([T.memoize],r.prototype,"windowLogsPath",null),fe([T.memoize],r.prototype,"logFile",null),fe([T.memoize],r.prototype,"userRoamingDataHome",null),fe([T.memoize],r.prototype,"argvResource",null),fe([T.memoize],r.prototype,"cacheHome",null),fe([T.memoize],r.prototype,"workspaceStorageHome",null),fe([T.memoize],r.prototype,"localHistoryHome",null),fe([T.memoize],r.prototype,"stateResource",null),fe([T.memoize],r.prototype,"userDataSyncHome",null),fe([T.memoize],r.prototype,"sync",null),fe([T.memoize],r.prototype,"keyboardLayoutResource",null),fe([T.memoize],r.prototype,"untitledWorkspacesHome",null),fe([T.memoize],r.prototype,"serviceMachineIdResource",null),fe([T.memoize],r.prototype,"extHostLogsPath",null),fe([T.memoize],r.prototype,"extHostTelemetryLogFile",null),fe([T.memoize],r.prototype,"debugExtensionHost",null),fe([T.memoize],r.prototype,"isExtensionDevelopment",null),fe([T.memoize],r.prototype,"extensionDevelopmentLocationURI",null),fe([T.memoize],r.prototype,"extensionDevelopmentLocationKind",null),fe([T.memoize],r.prototype,"extensionTestsLocationURI",null),fe([T.memoize],r.prototype,"extensionEnabledProposedApi",null),fe([T.memoize],r.prototype,"debugRenderer",null),fe([T.memoize],r.prototype,"enableSmokeTestDriver",null),fe([T.memoize],r.prototype,"disableExtensions",null),fe([T.memoize],r.prototype,"enableExtensions",null),fe([T.memoize],r.prototype,"webviewExternalEndpoint",null),fe([T.memoize],r.prototype,"extensionTelemetryLogResource",null),fe([T.memoize],r.prototype,"disableTelemetry",null),fe([T.memoize],r.prototype,"verbose",null),fe([T.memoize],r.prototype,"logExtensionHostCommunication",null),fe([T.memoize],r.prototype,"skipReleaseNotes",null),fe([T.memoize],r.prototype,"skipWelcome",null),fe([T.memoize],r.prototype,"disableWorkspaceTrust",null),fe([T.memoize],r.prototype,"lastActiveProfile",null),fe([T.memoize],r.prototype,"filesToOpenOrCreate",null),fe([T.memoize],r.prototype,"filesToDiff",null),fe([T.memoize],r.prototype,"filesToMerge",null)}),define(Q[3727],Y([1,0,4,41,295]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExternalUriResolverContribution=void 0;let D=class extends t.Disposable{constructor(f,v){super(),v.options&&v.options.resolveExternalUri&&this._register(f.registerExternalUriResolver({resolveExternalUri:async m=>({resolved:await v.options.resolveExternalUri(m),dispose:()=>{}})}))}};e.ExternalUriResolverContribution=D,e.ExternalUriResolverContribution=D=fe([O(0,y.IOpenerService),O(1,b.IBrowserWorkbenchEnvironmentService)],D)}),define(Q[65],Y([1,0,5,91]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkbenchEnvironmentService=void 0,e.IWorkbenchEnvironmentService=(0,t.refineServiceDecorator)(y.IEnvironmentService)}),define(Q[1345],Y([1,0,11,5,65,25,335,17,845,35,161]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDefaultLogLevelsService=void 0,e.IDefaultLogLevelsService=(0,y.createDecorator)("IDefaultLogLevelsService");let h=class{constructor(r,i,s,o,u){this.environmentService=r,this.fileService=i,this.jsonEditingService=s,this.logService=o,this.loggerService=u}async getDefaultLogLevels(){const r=await this._parseLogLevelsFromArgv();return{default:r?.default??this._getDefaultLogLevelFromEnv(),extensions:r?.extensions??this._getExtensionsDefaultLogLevelsFromEnv()}}async setDefaultLogLevel(r,i){const s=await this._parseLogLevelsFromArgv()??{};if(i){i=i.toLowerCase();const o=await this._parseLogLevelsFromArgv()??{},u=this._getDefaultLogLevel(o,i);o.extensions=o.extensions??[];const d=o.extensions.find(([c])=>c===i);d?d[1]=r:o.extensions.push([i,r]),await this._writeLogLevelsToArgv(o);const p=[...this.loggerService.getRegisteredLoggers()].filter(c=>c.extensionId&&c.extensionId.toLowerCase()===i);for(const{resource:c}of p)this.loggerService.getLogLevel(c)===u&&this.loggerService.setLogLevel(c,r)}else{const o=this._getDefaultLogLevel(s);s.default=r,await this._writeLogLevelsToArgv(s),this.loggerService.getLogLevel()===o&&this.loggerService.setLogLevel(r)}}_getDefaultLogLevel(r,i){if(i){const s=r.extensions?.find(([o])=>o===i);if(s)return s[1]}return r.default??(0,t.getLogLevel)(this.environmentService)}async _writeLogLevelsToArgv(r){const i=[];(0,f.isUndefined)(r.default)||i.push((0,t.LogLevelToString)(r.default));for(const[s,o]of r.extensions??[])i.push(`${s}:${(0,t.LogLevelToString)(o)}`);await this.jsonEditingService.write(this.environmentService.argvResource,[{path:["log-level"],value:i.length?i:void 0}],!0)}async _parseLogLevelsFromArgv(){const r={extensions:[]};try{const i=await this.fileService.readFile(this.environmentService.argvResource),s=(0,S.parse)(i.value.toString()),o=(0,f.isString)(s["log-level"])?[s["log-level"]]:Array.isArray(s["log-level"])?s["log-level"]:[];for(const u of o){const d=v.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.exec(u);if(d&&d[1]&&d[2]){const p=(0,t.parseLogLevel)(d[2]);(0,f.isUndefined)(p)||r.extensions?.push([d[1].toLowerCase(),p])}else{const p=(0,t.parseLogLevel)(u);(0,f.isUndefined)(p)||(r.default=p)}}}catch(i){(0,D.toFileOperationResult)(i)!==1&&this.logService.error(i)}return!(0,f.isUndefined)(r.default)||r.extensions?.length?r:void 0}_getDefaultLogLevelFromEnv(){return(0,t.getLogLevel)(this.environmentService)}_getExtensionsDefaultLogLevelsFromEnv(){const r=[];for(const[i,s]of this.environmentService.extensionLogLevel??[]){const o=(0,t.parseLogLevel)(s);(0,f.isUndefined)(o)||r.push([i,o])}return r}};h=fe([O(0,b.IWorkbenchEnvironmentService),O(1,D.IFileService),O(2,T.IJSONEditingService),O(3,t.ILogService),O(4,t.ILoggerService)],h),(0,m.registerSingleton)(e.IDefaultLogLevelsService,h,1)}),define(Q[3728],Y([1,0,2831,4,11,26,65]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookLoggingService=void 0;const f="notebook.rendering";let v=class extends y.Disposable{static{this.ID="notebook"}constructor(S,h){super();const a=(0,D.joinPath)(h.windowLogsPath,"notebook.rendering.log");this._logger=this._register(S.createLogger(a,{id:f,name:t.localize(0,null)}))}debug(S,h){this._logger.debug(`[${S}] ${h}`)}info(S,h){this._logger.info(`[${S}] ${h}`)}};e.NotebookLoggingService=v,e.NotebookLoggingService=v=fe([O(0,b.ILoggerService),O(1,T.IWorkbenchEnvironmentService)],v)}),define(Q[956],Y([1,0,7,67,85,157,142,34,6,110,4,22,26,10,2865,308,501,8,29,5,38,61,36,37,39,465,65,50]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditPreferenceWidget=e.SearchWidget=e.SettingsTargetsWidget=e.FolderSettingsActionViewItem=void 0;let _=class extends D.BaseActionViewItem{constructor(M,N,P){super(null,M),this.contextService=N,this.contextMenuService=P,this._folderSettingCounts=new Map;const x=this.contextService.getWorkspace();this._folder=x.folders.length===1?x.folders[0]:null,this._register(this.contextService.onDidChangeWorkspaceFolders(()=>this.onWorkspaceFoldersChanged()))}get folder(){return this._folder}set folder(M){this._folder=M,this.update()}setCount(M,N){const P=this.contextService.getWorkspaceFolder(M);if(!P)throw new Error("unknown folder");const x=P.uri;this._folderSettingCounts.set(x.toString(),N),this.update()}render(M){this.element=M,this.container=M,this.labelElement=t.$(".action-title"),this.detailsElement=t.$(".action-details"),this.dropDownElement=t.$(".dropdown-icon.hide"+g.ThemeIcon.asCSSSelector(E.settingsScopeDropDownIcon)),this.anchorElement=t.$("a.action-label.folder-settings",{role:"button","aria-haspopup":"true",tabindex:"0"},this.labelElement,this.detailsElement,this.dropDownElement),this._register(t.addDisposableListener(this.anchorElement,t.EventType.MOUSE_DOWN,N=>t.EventHelper.stop(N))),this._register(t.addDisposableListener(this.anchorElement,t.EventType.CLICK,N=>this.onClick(N))),this._register(t.addDisposableListener(this.container,t.EventType.KEY_UP,N=>this.onKeyUp(N))),t.append(this.container,this.anchorElement),this.update()}onKeyUp(M){switch(new y.StandardKeyboardEvent(M).keyCode){case 3:case 10:this.onClick(M);return}}onClick(M){t.EventHelper.stop(M,!0),!this.folder||this._action.checked?this.showMenu():this._action.run(this._folder)}updateEnabled(){this.update()}updateChecked(){this.update()}onWorkspaceFoldersChanged(){const M=this._folder,N=this.contextService.getWorkspace();M&&(this._folder=N.folders.filter(P=>(0,a.isEqual)(P.uri,M.uri))[0]||N.folders[0]),this._folder=this._folder?this._folder:N.folders.length===1?N.folders[0]:null,this.update(),this._action.checked&&this._action.run(this._folder)}update(){let M=0;this._folderSettingCounts.forEach(P=>M+=P);const N=this.contextService.getWorkspace();if(this._folder){this.labelElement.textContent=this._folder.name,this.anchorElement.title=this._folder.name;const P=this.labelWithCount(this._action.label,M);this.detailsElement.textContent=P,this.dropDownElement.classList.toggle("hide",N.folders.length===1||!this._action.checked)}else{const P=this.labelWithCount(this._action.label,M);this.labelElement.textContent=P,this.detailsElement.textContent="",this.anchorElement.title=this._action.label,this.dropDownElement.classList.remove("hide")}this.anchorElement.classList.toggle("checked",this._action.checked),this.container.classList.toggle("disabled",!this._action.enabled)}showMenu(){this.contextMenuService.showContextMenu({getAnchor:()=>this.container,getActions:()=>this.getDropdownMenuActions(),getActionViewItem:()=>{},onHide:()=>{this.anchorElement.blur()}})}getDropdownMenuActions(){const M=[],N=this.contextService.getWorkspace().folders;return this.contextService.getWorkbenchState()===3&&N.length>0&&M.push(...N.map((P,x)=>{const F=this._folderSettingCounts.get(P.uri.toString());return{id:"folderSettingsTarget"+x,label:this.labelWithCount(P.name,F),checked:this.folder&&(0,a.isEqual)(this.folder.uri,P.uri),enabled:!0,run:()=>this._action.run(P)}})),M}labelWithCount(M,N){return N&&(M+=` (${N})`),M}};e.FolderSettingsActionViewItem=_,e.FolderSettingsActionViewItem=_=fe([O(1,w.IWorkspaceContextService),O(2,d.IContextMenuService)],_);let A=class extends T.Widget{constructor(M,N,P,x,F,V,W){super(),this.contextService=P,this.instantiationService=x,this.environmentService=F,this.labelService=V,this.languageService=W,this._settingsTarget=null,this._onDidTargetChange=this._register(new v.Emitter),this.onDidTargetChange=this._onDidTargetChange.event,this.options=N??{},this.create(M),this._register(this.contextService.onDidChangeWorkbenchState(()=>this.onWorkbenchStateChanged())),this._register(this.contextService.onDidChangeWorkspaceFolders(()=>this.update()))}resetLabels(){const M=this.environmentService.remoteAuthority,N=M&&this.labelService.getHostLabel(h.Schemas.vscodeRemote,M);this.userLocalSettings.label=(0,i.localize)(0,null),this.userRemoteSettings.label=(0,i.localize)(1,null)+(N?` [${N}]`:""),this.workspaceSettings.label=(0,i.localize)(2,null),this.folderSettingsAction.label=(0,i.localize)(3,null)}create(M){const N=t.append(M,t.$(".settings-tabs-widget"));this.settingsSwitcherBar=this._register(new b.ActionBar(N,{orientation:0,focusOnlyEnabledItems:!0,ariaLabel:(0,i.localize)(4,null),animated:!1,actionViewItemProvider:F=>F.id==="folderSettings"?this.folderSettings:void 0})),this.userLocalSettings=new f.Action("userSettings","",".settings-tab",!0,()=>this.updateTarget(3)),this.userLocalSettings.tooltip=(0,i.localize)(5,null),this.userRemoteSettings=new f.Action("userSettingsRemote","",".settings-tab",!0,()=>this.updateTarget(4));const P=this.environmentService.remoteAuthority,x=P&&this.labelService.getHostLabel(h.Schemas.vscodeRemote,P);this.userRemoteSettings.tooltip=(0,i.localize)(6,null)+(x?` [${x}]`:""),this.workspaceSettings=new f.Action("workspaceSettings","",".settings-tab",!1,()=>this.updateTarget(5)),this.folderSettingsAction=new f.Action("folderSettings","",".settings-tab",!1,async F=>{this.updateTarget((0,w.isWorkspaceFolder)(F)?F.uri:3)}),this.folderSettings=this.instantiationService.createInstance(_,this.folderSettingsAction),this.resetLabels(),this.update(),this.settingsSwitcherBar.push([this.userLocalSettings,this.userRemoteSettings,this.workspaceSettings,this.folderSettingsAction])}get settingsTarget(){return this._settingsTarget}set settingsTarget(M){this._settingsTarget=M,this.userLocalSettings.checked=this.settingsTarget===3,this.userRemoteSettings.checked=this.settingsTarget===4,this.workspaceSettings.checked=this.settingsTarget===5,this.settingsTarget instanceof r.URI?(this.folderSettings.action.checked=!0,this.folderSettings.folder=this.contextService.getWorkspaceFolder(this.settingsTarget)):this.folderSettings.action.checked=!1}setResultCount(M,N){if(M===5){let P=(0,i.localize)(7,null);N&&(P+=` (${N})`),this.workspaceSettings.label=P}else if(M===3){let P=(0,i.localize)(8,null);N&&(P+=` (${N})`),this.userLocalSettings.label=P}else M instanceof r.URI&&this.folderSettings.setCount(M,N)}updateLanguageFilterIndicators(M){if(this.resetLabels(),M){const N=this.languageService.getLanguageName(M);if(N){const P=` [${N}]`;this.userLocalSettings.label+=P,this.userRemoteSettings.label+=P,this.workspaceSettings.label+=P,this.folderSettingsAction.label+=P}}}onWorkbenchStateChanged(){this.folderSettings.folder=null,this.update(),this.settingsTarget===5&&this.contextService.getWorkbenchState()===3&&this.updateTarget(3)}updateTarget(M){return this.settingsTarget===M||M instanceof r.URI&&this.settingsTarget instanceof r.URI&&(0,a.isEqual)(this.settingsTarget,M)||(this.settingsTarget=M,this._onDidTargetChange.fire(this.settingsTarget)),Promise.resolve(void 0)}async update(){this.settingsSwitcherBar.domNode.classList.toggle("empty-workbench",this.contextService.getWorkbenchState()===1),this.userRemoteSettings.enabled=!!(this.options.enableRemoteSettings&&this.environmentService.remoteAuthority),this.workspaceSettings.enabled=this.contextService.getWorkbenchState()!==1,this.folderSettings.action.enabled=this.contextService.getWorkbenchState()===3&&this.contextService.getWorkspace().folders.length>0,this.workspaceSettings.tooltip=(0,i.localize)(9,null)}};e.SettingsTargetsWidget=A,e.SettingsTargetsWidget=A=fe([O(2,w.IWorkspaceContextService),O(3,p.IInstantiationService),O(4,C.IWorkbenchEnvironmentService),O(5,l.ILabelService),O(6,I.ILanguageService)],A);let k=class extends T.Widget{constructor(M,N,P,x,F,V){super(),this.options=N,this.contextViewService=P,this.instantiationService=x,this.contextKeyService=F,this.keybindingService=V,this._onDidChange=this._register(new v.Emitter),this.onDidChange=this._onDidChange.event,this._onFocus=this._register(new v.Emitter),this.onFocus=this._onFocus.event,this.create(M)}create(M){this.domNode=t.append(M,t.$("div.settings-header-widget")),this.createSearchContainer(t.append(this.domNode,t.$("div.settings-search-container"))),this.controlsDiv=t.append(this.domNode,t.$("div.settings-search-controls")),this.options.showResultCount&&(this.countElement=t.append(this.controlsDiv,t.$(".settings-count-widget")),this.countElement.style.backgroundColor=(0,n.asCssVariable)(n.badgeBackground),this.countElement.style.color=(0,n.asCssVariable)(n.badgeForeground),this.countElement.style.border=`1px solid ${(0,n.asCssVariable)(n.contrastBorder)}`),this.inputBox.inputElement.setAttribute("aria-live",this.options.ariaLive||"off"),this.options.ariaLabelledBy&&this.inputBox.inputElement.setAttribute("aria-labelledBy",this.options.ariaLabelledBy);const N=this._register(t.trackFocus(this.inputBox.inputElement));this._register(N.onDidFocus(()=>this._onFocus.fire()));const P=this.options.focusKey;P&&(this._register(N.onDidFocus(()=>P.set(!0))),this._register(N.onDidBlur(()=>P.set(!1))))}createSearchContainer(M){this.searchContainer=M;const N=t.append(this.searchContainer,t.$("div.settings-search-input"));this.inputBox=this._register(this.createInputBox(N)),this._register(this.inputBox.onDidChange(P=>this._onDidChange.fire(P)))}createInputBox(M){const N=()=>(0,o.showHistoryKeybindingHint)(this.keybindingService);return this._register(new s.ContextScopedHistoryInputBox(M,this.contextViewService,{...this.options,showHistoryHint:N},this.contextKeyService))}showMessage(M){this.countElement&&M!==this.countElement.textContent&&(this.countElement.textContent=M,this.inputBox.inputElement.setAttribute("aria-label",M),this.inputBox.inputElement.style.paddingRight=this.getControlsWidth()+"px")}layout(M){M.width<400?(this.countElement?.classList.add("hide"),this.inputBox.inputElement.style.paddingRight="0px"):(this.countElement?.classList.remove("hide"),this.inputBox.inputElement.style.paddingRight=this.getControlsWidth()+"px")}getControlsWidth(){return(this.countElement?t.getTotalWidth(this.countElement):0)+20}focus(){this.inputBox.focus(),this.getValue()&&this.inputBox.select()}hasFocus(){return this.inputBox.hasFocus()}clear(){this.inputBox.value=""}getValue(){return this.inputBox.value}setValue(M){return this.inputBox.value=M}dispose(){this.options.focusKey?.set(!1),super.dispose()}};e.SearchWidget=k,e.SearchWidget=k=fe([O(2,d.IContextViewService),O(3,p.IInstantiationService),O(4,u.IContextKeyService),O(5,c.IKeybindingService)],k);class L extends S.Disposable{constructor(M){super(),this.editor=M,this._line=-1,this._preferences=[],this._editPreferenceDecoration=this.editor.createDecorationsCollection(),this._onClick=this._register(new v.Emitter),this.onClick=this._onClick.event,this._register(this.editor.onMouseDown(N=>{N.target.type!==2||N.target.detail.isAfterLines||!this.isVisible()||this._onClick.fire(N)}))}get preferences(){return this._preferences}getLine(){return this._line}show(M,N,P){this._preferences=P;const x=[];this._line=M,x.push({options:{description:"edit-preference-widget-decoration",glyphMarginClassName:g.ThemeIcon.asClassName(E.settingsEditIcon),glyphMarginHoverMessage:new m.MarkdownString().appendText(N),stickiness:1},range:{startLineNumber:M,startColumn:1,endLineNumber:M,endColumn:1}}),this._editPreferenceDecoration.set(x)}hide(){this._editPreferenceDecoration.clear()}isVisible(){return this._editPreferenceDecoration.length>0}dispose(){this.hide(),super.dispose()}}e.EditPreferenceWidget=L}),define(Q[1346],Y([1,0,2858,18,4,6,400,142,7,87,67,140,38,29,5,36,956,14,8,54,1825]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";var c,l;Object.defineProperty(e,"__esModule",{value:!0}),e.DefineKeybindingOverlayWidget=e.DefineKeybindingWidget=e.KeybindingsSearchWidget=void 0;let n=class extends o.SearchWidget{constructor(C,I,_,A,k,L){super(C,I,_,A,k,L),this.recordDisposables=this._register(new b.DisposableStore),this._onKeybinding=this._register(new D.Emitter),this.onKeybinding=this._onKeybinding.event,this._onEnter=this._register(new D.Emitter),this.onEnter=this._onEnter.event,this._onEscape=this._register(new D.Emitter),this.onEscape=this._onEscape.event,this._onBlur=this._register(new D.Emitter),this.onBlur=this._onBlur.event,this._register((0,b.toDisposable)(()=>this.stopRecordingKeys())),this._chords=null,this._inputValue=""}clear(){this._chords=null,super.clear()}startRecordingKeys(){this.recordDisposables.add(v.addDisposableListener(this.inputBox.inputElement,v.EventType.KEY_DOWN,C=>this._onKeyDown(new S.StandardKeyboardEvent(C)))),this.recordDisposables.add(v.addDisposableListener(this.inputBox.inputElement,v.EventType.BLUR,()=>this._onBlur.fire())),this.recordDisposables.add(v.addDisposableListener(this.inputBox.inputElement,v.EventType.INPUT,()=>{this.setInputValue(this._inputValue)}))}stopRecordingKeys(){this._chords=null,this.recordDisposables.clear()}setInputValue(C){this._inputValue=C,this.inputBox.value=this._inputValue}_onKeyDown(C){if(C.preventDefault(),C.stopPropagation(),!this.options.recordEnter&&C.equals(3)){this._onEnter.fire();return}if(C.equals(9)){this._onEscape.fire();return}this.printKeybinding(C)}printKeybinding(C){const I=this.keybindingService.resolveKeyboardEvent(C),_=`code: ${C.browserEvent.code}, keyCode: ${C.browserEvent.keyCode}, key: ${C.browserEvent.key} => UI: ${I.getAriaLabel()}, user settings: ${I.getUserSettingsLabel()}, dispatch: ${I.getDispatchChords()[0]}`,A=this.options;this._chords||(this._chords=[]),this._chords.length>0&&this._chords[this._chords.length-1].getDispatchChords()[0]===null?this._chords[this._chords.length-1]=I:(this._chords.length===2&&(this._chords=[]),this._chords.push(I));const L=this._chords.map(R=>R.getUserSettingsLabel()||"").join(" ");this.setInputValue(A.quoteRecordedKeys?`"${L}"`:L),this.inputBox.inputElement.title=_,this._onKeybinding.fire(this._chords)}};e.KeybindingsSearchWidget=n,e.KeybindingsSearchWidget=n=fe([O(2,r.IContextViewService),O(3,i.IInstantiationService),O(4,d.IContextKeyService),O(5,a.IKeybindingService)],n);let g=class extends f.Widget{static{c=this}static{this.WIDTH=400}static{this.HEIGHT=110}constructor(C,I){super(),this.instantiationService=I,this._chords=null,this._isVisible=!1,this._onHide=this._register(new D.Emitter),this._onDidChange=this._register(new D.Emitter),this.onDidChange=this._onDidChange.event,this._onShowExistingKeybindings=this._register(new D.Emitter),this.onShowExistingKeybidings=this._onShowExistingKeybindings.event,this._domNode=(0,h.createFastDomNode)(document.createElement("div")),this._domNode.setDisplay("none"),this._domNode.setClassName("defineKeybindingWidget"),this._domNode.setWidth(c.WIDTH),this._domNode.setHeight(c.HEIGHT);const _=t.localize(0,null);v.append(this._domNode.domNode,v.$(".message",void 0,_)),this._domNode.domNode.style.backgroundColor=(0,s.asCssVariable)(s.editorWidgetBackground),this._domNode.domNode.style.color=(0,s.asCssVariable)(s.editorWidgetForeground),this._domNode.domNode.style.boxShadow=`0 2px 8px ${(0,s.asCssVariable)(s.widgetShadow)}`,this._keybindingInputWidget=this._register(this.instantiationService.createInstance(n,this._domNode.domNode,{ariaLabel:_,history:[],inputBoxStyles:p.defaultInputBoxStyles})),this._keybindingInputWidget.startRecordingKeys(),this._register(this._keybindingInputWidget.onKeybinding(A=>this.onKeybinding(A))),this._register(this._keybindingInputWidget.onEnter(()=>this.hide())),this._register(this._keybindingInputWidget.onEscape(()=>this.clearOrHide())),this._register(this._keybindingInputWidget.onBlur(()=>this.onCancel())),this._outputNode=v.append(this._domNode.domNode,v.$(".output")),this._showExistingKeybindingsNode=v.append(this._domNode.domNode,v.$(".existing")),C&&v.append(C,this._domNode.domNode)}get domNode(){return this._domNode.domNode}define(){return this._keybindingInputWidget.clear(),u.Promises.withAsyncBody(async C=>{this._isVisible||(this._isVisible=!0,this._domNode.setDisplay("block"),this._chords=null,this._keybindingInputWidget.setInputValue(""),v.clearNode(this._outputNode),v.clearNode(this._showExistingKeybindingsNode),await(0,u.timeout)(0),this._keybindingInputWidget.focus());const I=this._onHide.event(()=>{C(this.getUserSettingsLabel()),I.dispose()})})}layout(C){const I=Math.round((C.height-c.HEIGHT)/2);this._domNode.setTop(I);const _=Math.round((C.width-c.WIDTH)/2);this._domNode.setLeft(_)}printExisting(C){if(C>0){const I=v.$("span.existingText"),_=C===1?t.localize(1,null,C):t.localize(2,null,C);v.append(I,document.createTextNode(_)),m.alert(_),this._showExistingKeybindingsNode.appendChild(I),I.onmousedown=A=>{A.preventDefault()},I.onmouseup=A=>{A.preventDefault()},I.onclick=()=>{this._onShowExistingKeybindings.fire(this.getUserSettingsLabel())}}}onKeybinding(C){if(this._chords=C,v.clearNode(this._outputNode),v.clearNode(this._showExistingKeybindingsNode),new T.KeybindingLabel(this._outputNode,y.OS,p.defaultKeybindingLabelStyles).set(this._chords?.[0]??void 0),this._chords)for(let A=1;A<this._chords.length;A++)this._outputNode.appendChild(document.createTextNode(t.localize(3,null))),new T.KeybindingLabel(this._outputNode,y.OS,p.defaultKeybindingLabelStyles).set(this._chords[A]);const _=this.getUserSettingsLabel();_&&this._onDidChange.fire(_)}getUserSettingsLabel(){let C=null;return this._chords&&(C=this._chords.map(I=>I.getUserSettingsLabel()).join(" ")),C}onCancel(){this._chords=null,this.hide()}clearOrHide(){this._chords===null?this.hide():(this._chords=null,this._keybindingInputWidget.clear(),v.clearNode(this._outputNode),v.clearNode(this._showExistingKeybindingsNode))}hide(){this._domNode.setDisplay("none"),this._isVisible=!1,this._onHide.fire()}};e.DefineKeybindingWidget=g,e.DefineKeybindingWidget=g=c=fe([O(1,i.IInstantiationService)],g);let w=class extends b.Disposable{static{l=this}static{this.ID="editor.contrib.defineKeybindingWidget"}constructor(C,I){super(),this._editor=C,this._widget=I.createInstance(g,null),this._editor.addOverlayWidget(this)}getId(){return l.ID}getDomNode(){return this._widget.domNode}getPosition(){return{preference:null}}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}start(){this._editor.hasModel()&&this._editor.revealPositionInCenterIfOutsideViewport(this._editor.getPosition(),0);const C=this._editor.getLayoutInfo();return this._widget.layout(new v.Dimension(C.width,C.height)),this._widget.define()}};e.DefineKeybindingOverlayWidget=w,e.DefineKeybindingOverlayWidget=w=l=fe([O(1,i.IInstantiationService)],w)}),define(Q[1347],Y([1,0,97,7,14,62,31,6,4,22,10,59,3028,66,13,9,29,25,5,11,23,181,30,309,3424,1249,3656,222,3661,1324,65]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewElement=void 0;var L;(function(N){let P;(function(F){F[F.Initializing=0]="Initializing",F[F.Ready=1]="Ready"})(P=N.Type||(N.Type={}));class x{constructor(V){this.pendingMessages=V,this.type=0}}N.Initializing=x,N.Ready={type:1}})(L||(L={}));const R="webviewId";let M=class extends v.Disposable{get platform(){return"browser"}get element(){return this._element}get isFocused(){return!(!this._focused||document.activeElement&&document.activeElement!==this.element)}constructor(P,x,F,V,W,z,B,K,H,U,G,$,ie){super(),this.webviewThemeDataProvider=x,this._environmentService=z,this._fileService=B,this._logService=K,this._remoteAuthorityResolverService=H,this._telemetryService=U,this._tunnelService=G,this._accessibilityService=ie,this.id=(0,h.generateUuid)(),this._expectedServiceWorkerVersion=4,this._state=new L.Initializing([]),this._resourceLoadingCts=this._register(new T.CancellationTokenSource),this._focusDelayer=this._register(new b.ThrottledDelayer(50)),this._onDidHtmlChange=this._register(new f.Emitter),this.onDidHtmlChange=this._onDidHtmlChange.event,this._messageHandlers=new Map,this.checkImeCompletionState=!0,this._disposed=!1,this._onMissingCsp=this._register(new f.Emitter),this.onMissingCsp=this._onMissingCsp.event,this._onDidClickLink=this._register(new f.Emitter),this.onDidClickLink=this._onDidClickLink.event,this._onDidReload=this._register(new f.Emitter),this.onDidReload=this._onDidReload.event,this._onMessage=this._register(new f.Emitter),this.onMessage=this._onMessage.event,this._onDidScroll=this._register(new f.Emitter),this.onDidScroll=this._onDidScroll.event,this._onDidWheel=this._register(new f.Emitter),this.onDidWheel=this._onDidWheel.event,this._onDidUpdateState=this._register(new f.Emitter),this.onDidUpdateState=this._onDidUpdateState.event,this._onDidFocus=this._register(new f.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new f.Emitter),this.onDidBlur=this._onDidBlur.event,this._onFatalError=this._register(new f.Emitter),this.onFatalError=this._onFatalError.event,this._onDidDispose=this._register(new f.Emitter),this.onDidDispose=this._onDidDispose.event,this._hasAlertedAboutMissingCsp=!1,this._hasFindResult=this._register(new f.Emitter),this.hasFindResult=this._hasFindResult.event,this._onDidStopFind=this._register(new f.Emitter),this.onDidStopFind=this._onDidStopFind.event,this.providedViewType=P.providedViewType,this.origin=P.origin??this.id,this._encodedWebviewOriginPromise=(0,E.parentOriginHash)(window.origin,this.origin).then(j=>this._encodedWebviewOrigin=j),this._options=P.options,this.extension=P.extension,this._content={html:"",title:P.title,options:P.contentOptions,state:void 0},this._portMappingManager=this._register(new w.WebviewPortMappingManager(()=>this.extension?.location,()=>this._content.options.portMapping||[],this._tunnelService)),this._element=this._createElement(P.options,P.contentOptions);const J=this._register((0,y.addDisposableListener)(window,"message",j=>{if(!(!this._encodedWebviewOrigin||j?.data?.target!==this.id)){if(j.origin!==this._webviewContentOrigin(this._encodedWebviewOrigin)){console.log(`Skipped renderer receiving message due to mismatched origins: ${j.origin} ${this._webviewContentOrigin}`);return}if(j.data.channel==="webview-ready"){if(this._messagePort)return;this._logService.debug(`Webview(${this.id}): webview ready`),this._messagePort=j.ports[0],this._messagePort.onmessage=ee=>{const X=this._messageHandlers.get(ee.data.channel);if(!X){console.log(`No handlers found for '${ee.data.channel}'`);return}X?.forEach(te=>te(ee.data.data,ee))},this.element?.classList.add("ready"),this._state.type===0&&this._state.pendingMessages.forEach(({channel:ee,data:X})=>this.doPostMessage(ee,X)),this._state=L.Ready,J.dispose()}}}));this._register(this.on("no-csp-found",()=>{this.handleNoCspFound()})),this._register(this.on("did-click-link",({uri:j})=>{this._onDidClickLink.fire(j)})),this._register(this.on("onmessage",({message:j,transfer:ee})=>{this._onMessage.fire({message:j,transfer:ee})})),this._register(this.on("did-scroll",({scrollYPercentage:j})=>{this._onDidScroll.fire({scrollYPercentage:j})})),this._register(this.on("do-reload",()=>{this.reload()})),this._register(this.on("do-update-state",j=>{this.state=j,this._onDidUpdateState.fire(j)})),this._register(this.on("did-focus",()=>{this.handleFocusChange(!0)})),this._register(this.on("did-blur",()=>{this.handleFocusChange(!1)})),this._register(this.on("did-scroll-wheel",j=>{this._onDidWheel.fire(j)})),this._register(this.on("did-find",({didFind:j})=>{this._hasFindResult.fire(j)})),this._register(this.on("fatal-error",j=>{W.error((0,a.localize)(0,null,j.message)),this._onFatalError.fire({message:j.message})})),this._register(this.on("did-keydown",j=>{this.handleKeyEvent("keydown",j)})),this._register(this.on("did-keyup",j=>{this.handleKeyEvent("keyup",j)})),this._register(this.on("did-context-menu",j=>{if(!this.element||!this._contextKeyService)return;const ee=this.element.getBoundingClientRect(),X=this._contextKeyService.createOverlay([...Object.entries(j.context),[R,this.providedViewType]]);V.showContextMenu({menuId:i.MenuId.WebviewContext,menuActionOptions:{shouldForwardArgs:!0},contextKeyService:X,getActionsContext:()=>({...j.context,webview:this.providedViewType}),getAnchor:()=>({x:ee.x+j.clientX,y:ee.y+j.clientY})})})),this._register(this.on("load-resource",async j=>{try{const ee=(0,A.decodeAuthority)(j.authority),X=S.URI.from({scheme:j.scheme,authority:ee,path:decodeURIComponent(j.path),query:j.query?decodeURIComponent(j.query):j.query});this.loadResource(j.id,X,j.ifNoneMatch)}catch{this._send("did-load-resource",{id:j.id,status:404,path:j.path})}})),this._register(this.on("load-localhost",j=>{this.localLocalhost(j.id,j.origin)})),this._register(f.Event.runAndSubscribe(x.onThemeDataChanged,()=>this.style())),this._register(ie.onDidChangeReducedMotion(()=>this.style())),this._register(ie.onDidChangeScreenReaderOptimized(()=>this.style())),this._register(V.onDidShowContextMenu(()=>this._send("set-context-menu-visible",{visible:!0}))),this._register(V.onDidHideContextMenu(()=>this._send("set-context-menu-visible",{visible:!1}))),this._confirmBeforeClose=F.getValue("window.confirmBeforeClose"),this._register(F.onDidChangeConfiguration(j=>{j.affectsConfiguration("window.confirmBeforeClose")&&(this._confirmBeforeClose=F.getValue("window.confirmBeforeClose"),this._send("set-confirm-before-close",this._confirmBeforeClose))})),this._register(this.on("drag-start",()=>{this._startBlockingIframeDragEvents()})),P.options.enableFindWidget&&(this._webviewFindWidget=this._register($.createInstance(_.WebviewFindWidget,this))),this._encodedWebviewOriginPromise.then(j=>{this._disposed||this._initElement(j,this.extension,this._options)})}dispose(){if(this._disposed=!0,this.element?.remove(),this._element=void 0,this._messagePort=void 0,this._state.type===0){for(const P of this._state.pendingMessages)P.resolve(!1);this._state.pendingMessages=[]}this._onDidDispose.fire(),this._resourceLoadingCts.dispose(!0),super.dispose()}setContextKeyService(P){this._contextKeyService=P}postMessage(P,x){return this._send("message",{message:P,transfer:x})}async _send(P,x,F=[]){if(this._state.type===0){let V;const W=new Promise(z=>V=z);return this._state.pendingMessages.push({channel:P,data:x,transferable:F,resolve:V}),W}else return this.doPostMessage(P,x,F)}_createElement(P,x){const F=document.createElement("iframe");F.name=this.id,F.className=`webview ${P.customClasses||""}`,F.sandbox.add("allow-scripts","allow-same-origin","allow-forms","allow-pointer-lock","allow-downloads");const V=["cross-origin-isolated","autoplay"];return t.isFirefox||V.push("clipboard-read","clipboard-write"),F.setAttribute("allow",V.join("; ")),F.style.border="none",F.style.width="100%",F.style.height="100%",F.focus=()=>{this._doFocus()},F}_initElement(P,x,F){const V={id:this.id,origin:this.origin,swVersion:String(this._expectedServiceWorkerVersion),extensionId:x?.id.value??"",platform:this.platform,"vscode-resource-base-authority":A.webviewRootResourceAuthority,parentOrigin:window.origin};this._options.disableServiceWorker&&(V.disableServiceWorker="true"),this._environmentService.remoteAuthority&&(V.remoteAuthority=this._environmentService.remoteAuthority),F.purpose&&(V.purpose=F.purpose),m.COI.addSearchParam(V,!0,!0);const W=new URLSearchParams(V).toString(),z=t.isFirefox?"index-no-csp.html":"index.html";this.element.setAttribute("src",`${this.webviewContentEndpoint(P)}/${z}?${W}`)}mountTo(P){if(this.element){this._webviewFindWidget&&P.appendChild(this._webviewFindWidget.getDomNode());for(const x of[y.EventType.MOUSE_DOWN,y.EventType.MOUSE_MOVE,y.EventType.DROP])this._register((0,y.addDisposableListener)(P,x,()=>{this._stopBlockingIframeDragEvents()}));for(const x of[P,window])this._register((0,y.addDisposableListener)(x,y.EventType.DRAG_END,()=>{this._stopBlockingIframeDragEvents()}));P.id=this.id,P.appendChild(this.element)}}_startBlockingIframeDragEvents(){this.element&&(this.element.style.pointerEvents="none")}_stopBlockingIframeDragEvents(){this.element&&(this.element.style.pointerEvents="auto")}webviewContentEndpoint(P){const x=this._environmentService.webviewExternalEndpoint;if(!x)throw new Error("'webviewExternalEndpoint' has not been configured. Webviews will not work!");const F=x.replace("{{uuid}}",P);return F[F.length-1]==="/"?F.slice(0,F.length-1):F}_webviewContentOrigin(P){const x=S.URI.parse(this.webviewContentEndpoint(P));return x.scheme+"://"+x.authority.toLowerCase()}doPostMessage(P,x,F=[]){return this.element&&this._messagePort?(this._messagePort.postMessage({channel:P,args:x},F),!0):!1}on(P,x){let F=this._messageHandlers.get(P);return F||(F=new Set,this._messageHandlers.set(P,F)),F.add(x),(0,v.toDisposable)(()=>{this._messageHandlers.get(P)?.delete(x)})}handleNoCspFound(){if(!this._hasAlertedAboutMissingCsp&&(this._hasAlertedAboutMissingCsp=!0,this.extension?.id)){this._environmentService.isExtensionDevelopment&&this._onMissingCsp.fire(this.extension.id);const P={extension:this.extension.id.value};this._telemetryService.publicLog2("webviewMissingCsp",P)}}reload(){this.doUpdateContent(this._content);const P=this._register(this.on("did-load",()=>{this._onDidReload.fire(),P.dispose()}))}setHtml(P){this.doUpdateContent({...this._content,html:P}),this._onDidHtmlChange.fire(P)}setTitle(P){this._content={...this._content,title:P},this._send("set-title",P)}set contentOptions(P){if(this._logService.debug(`Webview(${this.id}): will update content options`),(0,I.areWebviewContentOptionsEqual)(P,this._content.options)){this._logService.debug(`Webview(${this.id}): skipping content options update`);return}this.doUpdateContent({...this._content,options:P})}set localResourcesRoot(P){this._content={...this._content,options:{...this._content.options,localResourceRoots:P}}}set state(P){this._content={...this._content,state:P}}set initialScrollProgress(P){this._send("initial-scroll-position",P)}doUpdateContent(P){this._logService.debug(`Webview(${this.id}): will update content`),this._content=P;const x=!!this._content.options.allowScripts;this._send("content",{contents:this._content.html,title:this._content.title,options:{allowMultipleAPIAcquire:!!this._content.options.allowMultipleAPIAcquire,allowScripts:x,allowForms:this._content.options.allowForms??x},state:this._content.state,cspSource:A.webviewGenericCspSource,confirmBeforeClose:this._confirmBeforeClose})}style(){let{styles:P,activeTheme:x,themeLabel:F,themeId:V}=this.webviewThemeDataProvider.getWebviewThemeData();this._options.transformCssVariables&&(P=this._options.transformCssVariables(P));const W=this._accessibilityService.isMotionReduced(),z=this._accessibilityService.isScreenReaderOptimized();this._send("styles",{styles:P,activeTheme:x,themeId:V,themeLabel:F,reduceMotion:W,screenReader:z})}handleFocusChange(P){this._focused=P,P?this._onDidFocus.fire():this._onDidBlur.fire()}handleKeyEvent(P,x){const F=new KeyboardEvent(P,x);Object.defineProperty(F,"target",{get:()=>this.element}),window.dispatchEvent(F)}windowDidDragStart(){this._startBlockingIframeDragEvents()}windowDidDragEnd(){this._stopBlockingIframeDragEvents()}selectAll(){this.execCommand("selectAll")}copy(){this.execCommand("copy")}paste(){this.execCommand("paste")}cut(){this.execCommand("cut")}undo(){this.execCommand("undo")}redo(){this.execCommand("redo")}execCommand(P){this.element&&this._send("execCommand",P)}async loadResource(P,x,F){try{const V=await(0,C.loadLocalResource)(x,{ifNoneMatch:F,roots:this._content.options.localResourceRoots||[]},this._fileService,this._logService,this._resourceLoadingCts.token);switch(V.type){case C.WebviewResourceResponse.Type.Success:{const W=await this.streamToBuffer(V.stream);return this._send("did-load-resource",{id:P,status:200,path:x.path,mime:V.mimeType,data:W,etag:V.etag,mtime:V.mtime},[W])}case C.WebviewResourceResponse.Type.NotModified:return this._send("did-load-resource",{id:P,status:304,path:x.path,mime:V.mimeType,mtime:V.mtime});case C.WebviewResourceResponse.Type.AccessDenied:return this._send("did-load-resource",{id:P,status:401,path:x.path})}}catch{}return this._send("did-load-resource",{id:P,status:404,path:x.path})}async streamToBuffer(P){return(await(0,D.streamToBuffer)(P)).buffer.buffer}async localLocalhost(P,x){const F=this._environmentService.remoteAuthority,V=F?await this._remoteAuthorityResolverService.resolveAuthority(F):void 0,W=V?await this._portMappingManager.getRedirect(V.authority,x):void 0;return this._send("did-load-localhost",{id:P,origin:x,location:W})}focus(){this._doFocus(),this.handleFocusChange(!0)}_doFocus(){if(this.element){try{this.element.contentWindow?.focus()}catch{}this._focusDelayer.trigger(async()=>{!this.isFocused||!this.element||document.activeElement&&document.activeElement!==this.element&&document.activeElement?.tagName!=="BODY"||this._send("focus",void 0)})}}find(P,x){this.element&&this._send("find",{value:P,previous:x})}updateFind(P){!P||!this.element||this._send("find",{value:P})}stopFind(P){this.element&&(this._send("find-stop",{clearSelection:!P}),this._onDidStopFind.fire())}showFind(P=!0){this._webviewFindWidget?.reveal(void 0,P)}hideFind(P=!0){this._webviewFindWidget?.hide(P)}runFindAction(P){this._webviewFindWidget?.find(P)}};e.WebviewElement=M,e.WebviewElement=M=fe([O(2,s.IConfigurationService),O(3,o.IContextMenuService),O(4,c.INotificationService),O(5,k.IWorkbenchEnvironmentService),O(6,u.IFileService),O(7,p.ILogService),O(8,l.IRemoteAuthorityResolverService),O(9,n.ITelemetryService),O(10,g.ITunnelService),O(11,d.IInstantiationService),O(12,r.IAccessibilityService)],M)}),define(Q[3729],Y([1,0,14,22,300,250,66,9,29,25,5,327,11,100,23,181,30,309,1347,3663,65]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronWebviewElement=void 0;let l=class extends d.WebviewElement{get platform(){return"electron"}constructor(g,w,E,C,I,_,A,k,L,R,M,N,P,x,F){super(g,w,R,E,N,A,I,L,k,_,C,x,F),this._nativeHostService=P,this._findStarted=!1,this._iframeDelayer=this._register(new t.Delayer(200)),this._webviewKeyboardHandler=new p.WindowIgnoreMenuShortcutsManager(R,M,P),this._webviewMainService=D.ProxyChannel.toService(M.getChannel("webview")),g.options.enableFindWidget&&(this._register(this.onDidHtmlChange(V=>{this._findStarted&&this._cachedHtmlContent!==V&&(this.stopFind(!1),this._cachedHtmlContent=V)})),this._register(this._webviewMainService.onFoundInFrame(V=>{this._hasFindResult.fire(V.matches>0)})))}dispose(){this._webviewKeyboardHandler.didBlur(),super.dispose()}webviewContentEndpoint(g){return`${y.Schemas.vscodeWebview}://${g}`}streamToBuffer(g){return(0,b.consumeStream)(g,w=>{const E=w.reduce((A,k)=>A+k.byteLength,0),C=new ArrayBuffer(E),I=new Uint8Array(C);let _=0;for(const A of w)I.set(A.buffer,_),_+=A.byteLength;return C})}find(g,w){if(this.element)if(!this._findStarted)this.updateFind(g);else{const E={forward:!w,findNext:!1,matchCase:!1};this._webviewMainService.findInFrame({windowId:this._nativeHostService.windowId},this.id,g,E)}}updateFind(g){if(!g||!this.element)return;const w={forward:!0,findNext:!0,matchCase:!1};this._iframeDelayer.trigger(()=>{this._findStarted=!0,this._webviewMainService.findInFrame({windowId:this._nativeHostService.windowId},this.id,g,w)})}stopFind(g){this.element&&(this._iframeDelayer.cancel(),this._findStarted=!1,this._webviewMainService.stopFindInFrame({windowId:this._nativeHostService.windowId},this.id,{keepSelection:g}),this._onDidStopFind.fire())}handleFocusChange(g){super.handleFocusChange(g),g?this._webviewKeyboardHandler.didFocus():this._webviewKeyboardHandler.didBlur()}};e.ElectronWebviewElement=l,e.ElectronWebviewElement=l=fe([O(2,v.IContextMenuService),O(3,u.ITunnelService),O(4,m.IFileService),O(5,o.ITelemetryService),O(6,c.IWorkbenchEnvironmentService),O(7,s.IRemoteAuthorityResolverService),O(8,a.ILogService),O(9,f.IConfigurationService),O(10,h.IMainProcessService),O(11,i.INotificationService),O(12,r.INativeHostService),O(13,S.IInstantiationService),O(14,T.IAccessibilityService)],l)}),define(Q[3730],Y([1,0,18,65]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function b(D){const T=t.isWeb&&!D.get(y.IWorkbenchEnvironmentService).remoteAuthority;return` ## Interactive Editor Playground The core editor in VS Code is packed with features. This page highlights a number of them and lets you interactively try them out through the use of a number of embedded editors. For full details on the editor features for VS Code and more head over to our [documentation](command:workbench.action.openDocumentationUrl). * [Multi-cursor Editing](#multi-cursor-editing) - block selection, select all occurrences, add additional cursors and more. * [IntelliSense](#intellisense) - get code assistance and parameter suggestions for your code and external modules. * [Line Actions](#line-actions) - quickly move lines around to re-order your code.${T?"":` * [Rename Refactoring](#rename-refactoring) - quickly rename symbols across your code base.`} * [Formatting](#formatting) - keep your code looking great with inbuilt document & selection formatting. * [Code Folding](#code-folding) - focus on the most relevant parts of your code by folding other areas. * [Errors and Warnings](#errors-and-warnings) - see errors and warnings as you type. * [Snippets](#snippets) - spend less time typing with snippets. * [Emmet](#emmet) - integrated Emmet support takes HTML and CSS editing to the next level. * [JavaScript Type Checking](#javascript-type-checking) - perform type checking on your JavaScript file using TypeScript with zero configuration. ### Multi-Cursor Editing Using multiple cursors allows you to edit multiple parts of the document at once, greatly improving your productivity. Try the following actions in the code block below: 1. Box Selection - press <span class="mac-only windows-only">any combination of kb(cursorColumnSelectDown), kb(cursorColumnSelectRight), kb(cursorColumnSelectUp), kb(cursorColumnSelectLeft) to select a block of text. You can also press</span> <span class="shortcut mac-only">|\u21E7\u2325|</span><span class="shortcut windows-only linux-only">|Shift+Alt|</span> while selecting text with the mouse or drag-select using the middle mouse button. 2. Add a cursor - press kb(editor.action.insertCursorAbove) to add a new cursor above, or kb(editor.action.insertCursorBelow) to add a new cursor below. You can also use your mouse with <span class="shortcut"><span class="multi-cursor-modifier"></span>+Click</span> to add a cursor anywhere. 3. Create cursors on all occurrences of a string - select one instance of a string e.g. |background-color| and press kb(editor.action.selectHighlights). Now you can replace all instances by simply typing. That is the tip of the iceberg for multi-cursor editing. Have a look at the selection menu and our handy [keyboard reference guide](command:workbench.action.keybindingsReference) for additional actions. |||css #p1 {background-color: #ff0000;} /* red in HEX format */ #p2 {background-color: hsl(120, 100%, 50%);} /* green in HSL format */ #p3 {background-color: rgba(0, 4, 255, 0.733);} /* blue with alpha channel in RGBA format */ ||| > **CSS Tip:** You may have noticed in the example above we also provide color swatches inline for CSS, additionally if you hover over an element such as |#p1| we will show how this is represented in HTML. These swatches also act as color pickers that allow you to easily change a color value. A simple example of some language-specific editor features. ### IntelliSense Visual Studio Code comes with the powerful IntelliSense for JavaScript and TypeScript pre-installed. In the below example, position the text cursor right after the dot and press kb(editor.action.triggerSuggest) to invoke IntelliSense. Notice how the suggestions come from the Canvas API. |||js const canvas = document.querySelector('canvas'); const context = canvas.getContext('2d'); context.strokeStyle = 'blue'; context. ||| >**Tip:** While we ship JavaScript and TypeScript support out of the box other languages can be upgraded with better IntelliSense through one of the many [extensions](command:workbench.extensions.action.showPopularExtensions). ### Line Actions Since it's very common to work with the entire text in a line we provide a set of useful shortcuts to help with this. 1. <span class="mac-only windows-only">Copy a line and insert it above or below the current position with kb(editor.action.copyLinesDownAction) or kb(editor.action.copyLinesUpAction) respectively.</span><span class="linux-only">Copy the entire current line when no text is selected with kb(editor.action.clipboardCopyAction).</span> 2. Move an entire line or selection of lines up or down with kb(editor.action.moveLinesUpAction) and kb(editor.action.moveLinesDownAction) respectively. 3. Delete the entire line with kb(editor.action.deleteLines). |||json { "name": "John", "age": 31, "city": "New York" } ||| >**Tip:** Another very common task is to comment out a block of code - you can toggle commenting by pressing kb(editor.action.commentLine). ${T?"":` ### Rename Refactoring It's easy to rename a symbol such as a function name or variable name. Hit kb(editor.action.rename) while in the symbol |Book| to rename all instances - this will occur across all files in a project. You also have |Rename Symbol| in the right-click context menu. |||js // Reference the function new Book("War of the Worlds", "H G Wells"); new Book("The Martian", "Andy Weir"); /** * Represents a book. * * @param {string} title Title of the book * @param {string} author Who wrote the book */ function Book(title, author) { this.title = title; this.author = author; } ||| > **JSDoc Tip:** VS Code's IntelliSense uses JSDoc comments to provide richer suggestions. The types and documentation from JSDoc comments show up when you hover over a reference to |Book| or in IntelliSense when you create a new instance of |Book|. `} ### Formatting Keeping your code looking great is hard without a good formatter. Luckily it's easy to format content, either for the entire document with kb(editor.action.formatDocument) or for the current selection with kb(editor.action.formatSelection). Both of these options are also available through the right-click context menu. |||js const cars = ["\u{1F697}", "\u{1F699}", "\u{1F695}"]; for (const car of cars){ // Drive the car console.log(|This is the car \${car}|); } ||| >**Tip:** Additional formatters are available in the [extension gallery](command:workbench.extensions.action.showPopularExtensions). Formatting support can also be configured via [settings](command:workbench.action.openGlobalSettings) e.g. enabling |editor.formatOnSave|. ### Code Folding In a large file it can often be useful to collapse sections of code to increase readability. To do this, you can simply press kb(editor.fold) to fold or press kb(editor.unfold) to unfold the ranges at the current cursor position. Folding can also be done with the down and right angle bracket icons in the left gutter. To fold all sections use kb(editor.foldAll) or to unfold all use kb(editor.unfoldAll). |||html <div> <header> <ul> <li><a href=""></a></li> <li><a href=""></a></li> </ul> </header> <footer> <p></p> </footer> </div> ||| >**Tip:** Folding is based on indentation and as a result can apply to all languages. Simply indent your code to create a foldable section you can fold a certain number of levels with shortcuts like kb(editor.foldLevel1) through to kb(editor.foldLevel5). ### Errors and Warnings Errors and warnings are highlighted as you edit your code with squiggles. In the sample below you can see a number of syntax errors. By pressing kb(editor.action.marker.nextInFiles) you can navigate across them in sequence and see the detailed error message. As you correct them the squiggles and scrollbar indicators will update. |||js // This code has a few syntax errors Console.log(add(1, 1.5)); function Add(a, b) return a + b; } ||| ### Snippets You can greatly accelerate your editing through the use of snippets. Simply start typing |try| and select |trycatch| from the suggestion list and press kb(insertSnippet) to create a |try|->|catch| block. Your cursor will be placed on the text |error| for easy editing. If more than one parameter exists then press kb(jumpToNextSnippetPlaceholder) to jump to it. |||js ||| >**Tip:** The [extension gallery](command:workbench.extensions.action.showPopularExtensions) includes snippets for almost every framework and language imaginable. You can also create your own [user-defined snippets](command:workbench.action.openSnippets). ### Emmet Emmet takes the snippets idea to a whole new level: you can type CSS-like expressions that can be dynamically parsed, and produce output depending on what you type in the abbreviation. Try it by selecting |Emmet: Expand Abbreviation| from the |Edit| menu with the cursor at the end of a valid Emmet abbreviation or snippet and the expansion will occur. |||html ul>li.item$*5 ||| >**Tip:** The [Emmet cheat sheet](https://docs.emmet.io/cheat-sheet/) is a great source of Emmet syntax suggestions. To expand Emmet abbreviations and snippets using the |tab| key use the |emmet.triggerExpansionOnTab| [setting](command:workbench.action.openGlobalSettings). Check out the docs on [Emmet in VS Code](https://code.visualstudio.com/docs/editor/emmet) to learn more. ### JavaScript Type Checking Sometimes type checking your JavaScript code can help you spot mistakes you might have not caught otherwise. You can run the TypeScript type checker against your existing JavaScript code by simply adding a |// @ts-check| comment to the top of your file. |||js // @ts-nocheck let easy = true; easy = 42; ||| >**Tip:** You can also enable the checks workspace or application wide by adding |"js/ts.implicitProjectConfig.checkJs": true| to your workspace or user settings and explicitly ignoring files or lines using |// @ts-nocheck| and |// @ts-expect-error|. Check out the docs on [JavaScript in VS Code](https://code.visualstudio.com/docs/languages/javascript) to learn more. ## Thanks! Well if you have got this far then you will have touched on some of the editing features in Visual Studio Code. But don't stop now :) We have lots of additional [documentation](https://code.visualstudio.com/docs), [introductory videos](https://code.visualstudio.com/docs/getstarted/introvideos) and [tips and tricks](https://go.microsoft.com/fwlink/?linkid=852118) for the product that will help you learn how to use it. And while you are here, here are a few additional things you can try: - Open the Integrated Terminal by pressing kb(workbench.action.terminal.toggleTerminal), then see what's possible by [reviewing the terminal documentation](https://code.visualstudio.com/docs/editor/integrated-terminal) - Work with version control by pressing kb(workbench.view.scm). Understand how to stage, commit, change branches, and view diffs and more by reviewing the [version control documentation](https://code.visualstudio.com/docs/editor/versioncontrol) - Browse thousands of extensions in our integrated gallery by pressing kb(workbench.view.extensions). The [documentation](https://code.visualstudio.com/docs/editor/extension-gallery) will show you how to see the most popular extensions, disable installed ones and more. That's all for now, Happy Coding! \u{1F389} `.replace(/\|/g,"`")}e.default=b}),define(Q[3731],Y([1,0,3036,21,5,740,22,13,81,3730]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWalkThroughInputSerializer=e.EditorWalkThroughAction=void 0;const m="workbench.editors.walkThroughInput",S={typeId:m,name:(0,t.localize)(0,null),resource:T.FileAccess.asBrowserUri("vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough.md").with({scheme:T.Schemas.walkThrough,query:JSON.stringify({moduleId:"vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough"})}),telemetryFrom:"walkThrough"};class h extends f.Action2{static{this.ID="workbench.action.showInteractivePlayground"}static{this.LABEL={value:(0,t.localize)(1,null),original:"Interactive Editor Playground"}}constructor(){super({id:h.ID,title:h.LABEL,category:v.Categories.Help,f1:!0})}run(i){const s=i.get(y.IEditorService),u=i.get(b.IInstantiationService).createInstance(D.WalkThroughInput,S);return s.openEditor(u,{pinned:!0}).then(()=>{})}}e.EditorWalkThroughAction=h;class a{static{this.ID=m}canSerialize(i){return!0}serialize(i){return""}deserialize(i){return i.createInstance(D.WalkThroughInput,S)}}e.EditorWalkThroughInputSerializer=a}),define(Q[3732],Y([1,0,63,4,49,3470,35,65,11]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogService=void 0;let m=class extends y.Disposable{constructor(h,a){super(),this.environmentService=h,this.logService=a,this.model=this._register(new D.DialogsModel),this.onWillShowDialog=this.model.onWillShowDialog,this.onDidShowDialog=this.model.onDidShowDialog}skipDialogs(){return this.environmentService.isExtensionDevelopment&&this.environmentService.extensionTestsLocationURI?!0:!!this.environmentService.enableSmokeTestDriver}async confirm(h){return this.skipDialogs()?(this.logService.trace("DialogService: refused to show confirmation dialog in tests."),{confirmed:!0}):await this.model.show({confirmArgs:{confirmation:h}}).result}async prompt(h){if(this.skipDialogs())throw new Error(`DialogService: refused to show dialog in tests. Contents: ${h.message}`);return await this.model.show({promptArgs:{prompt:h}}).result}async input(h){if(this.skipDialogs())throw new Error("DialogService: refused to show input dialog in tests.");return await this.model.show({inputArgs:{input:h}}).result}async info(h,a){await this.prompt({type:t.default.Info,message:h,detail:a})}async warn(h,a){await this.prompt({type:t.default.Warning,message:h,detail:a})}async error(h,a){await this.prompt({type:t.default.Error,message:h,detail:a})}async about(){if(this.skipDialogs())throw new Error("DialogService: refused to show about dialog in tests.");await this.model.show({}).result}};e.DialogService=m,e.DialogService=m=fe([O(0,f.IWorkbenchEnvironmentService),O(1,v.ILogService)],m),(0,T.registerSingleton)(b.IDialogService,m,1)}),define(Q[139],Y([1,0,91,5,845,102,22,26]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeWorkbenchEnvironmentService=e.INativeWorkbenchEnvironmentService=void 0,e.INativeWorkbenchEnvironmentService=(0,y.refineServiceDecorator)(t.IEnvironmentService);class v extends b.AbstractNativeEnvironmentService{get mainPid(){return this.configuration.mainPid}get machineId(){return this.configuration.machineId}get remoteAuthority(){return this.configuration.remoteAuthority}get expectsResolverExtension(){return!!this.configuration.remoteAuthority?.includes("+")}get execPath(){return this.configuration.execPath}get backupPath(){return this.configuration.backupPath}get window(){return{id:this.configuration.windowId,colorScheme:this.configuration.colorScheme,maximized:this.configuration.maximized,accessibilitySupport:this.configuration.accessibilitySupport,perfMarks:this.configuration.perfMarks,isInitialStartup:this.configuration.isInitialStartup,isCodeCaching:typeof this.configuration.codeCachePath=="string"}}get windowLogsPath(){return(0,f.joinPath)(this.logsHome,`window${this.configuration.windowId}`)}get logFile(){return(0,f.joinPath)(this.windowLogsPath,"renderer.log")}get extHostLogsPath(){return(0,f.joinPath)(this.windowLogsPath,"exthost")}get extHostTelemetryLogFile(){return(0,f.joinPath)(this.extHostLogsPath,"extensionTelemetry.log")}get webviewExternalEndpoint(){return`${T.Schemas.vscodeWebview}://{{uuid}}`}get skipReleaseNotes(){return!!this.args["skip-release-notes"]}get skipWelcome(){return!!this.args["skip-welcome"]}get logExtensionHostCommunication(){return!!this.args.logExtensionHostCommunication}get enableSmokeTestDriver(){return!!this.args["enable-smoke-test-driver"]}get extensionEnabledProposedApi(){if(Array.isArray(this.args["enable-proposed-api"]))return this.args["enable-proposed-api"];if("enable-proposed-api"in this.args)return[]}get os(){return this.configuration.os}get filesToOpenOrCreate(){return this.configuration.filesToOpenOrCreate}get filesToDiff(){return this.configuration.filesToDiff}get filesToMerge(){return this.configuration.filesToMerge}get filesToWait(){return this.configuration.filesToWait}constructor(S,h){super(S,{homeDir:S.homeDir,tmpDir:S.tmpDir,userDataDir:S.userDataDir},h),this.configuration=S}}e.NativeWorkbenchEnvironmentService=v,fe([D.memoize],v.prototype,"mainPid",null),fe([D.memoize],v.prototype,"machineId",null),fe([D.memoize],v.prototype,"remoteAuthority",null),fe([D.memoize],v.prototype,"expectsResolverExtension",null),fe([D.memoize],v.prototype,"execPath",null),fe([D.memoize],v.prototype,"backupPath",null),fe([D.memoize],v.prototype,"window",null),fe([D.memoize],v.prototype,"windowLogsPath",null),fe([D.memoize],v.prototype,"logFile",null),fe([D.memoize],v.prototype,"extHostLogsPath",null),fe([D.memoize],v.prototype,"extHostTelemetryLogFile",null),fe([D.memoize],v.prototype,"webviewExternalEndpoint",null),fe([D.memoize],v.prototype,"skipReleaseNotes",null),fe([D.memoize],v.prototype,"skipWelcome",null),fe([D.memoize],v.prototype,"logExtensionHostCommunication",null),fe([D.memoize],v.prototype,"enableSmokeTestDriver",null),fe([D.memoize],v.prototype,"extensionEnabledProposedApi",null),fe([D.memoize],v.prototype,"os",null),fe([D.memoize],v.prototype,"filesToOpenOrCreate",null),fe([D.memoize],v.prototype,"filesToDiff",null),fe([D.memoize],v.prototype,"filesToMerge",null),fe([D.memoize],v.prototype,"filesToWait",null)}),define(Q[3733],Y([1,0,2717,25,10,139,100,22,13,95,81]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CleanUpExtensionsFolderAction=e.OpenExtensionsFolderAction=void 0;class h extends v.Action2{constructor(){super({id:"workbench.extensions.action.openExtensionsFolder",title:{value:(0,t.localize)(0,null),original:"Open Extensions Folder"},category:m.ExtensionsLocalizedLabel,f1:!0})}async run(i){const s=i.get(T.INativeHostService),o=i.get(y.IFileService),u=i.get(D.INativeWorkbenchEnvironmentService),d=b.URI.file(u.extensionsPath),p=await o.resolve(d);let c;if(p.children&&p.children.length>0?c=p.children[0].resource:c=d,c.scheme===f.Schemas.file)return s.showItemInFolder(c.fsPath)}}e.OpenExtensionsFolderAction=h;class a extends v.Action2{constructor(){super({id:"_workbench.extensions.action.cleanUpExtensionsFolder",title:{value:(0,t.localize)(1,null),original:"Cleanup Extensions Folder"},category:S.Categories.Developer,f1:!0})}async run(i){return i.get(m.IExtensionManagementService).cleanUp()}}e.CleanUpExtensionsFolderAction=a}),define(Q[1348],Y([1,0,52,34,10,5,2719,31,288,26,49,41,100,139,695,25,62]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createSlowExtensionAction=e.SlowExtensionAction=void 0;class u{static fromExtension(g){let w;if(g.bugs&&typeof g.bugs.url=="string"){const E=b.URI.parse(g.bugs.url),C=/\/([^/]+)\/([^/]+)\/issues\/?$/.exec(g.bugs.url);C&&(w={base:E.with({path:null,fragment:null,query:null}).toString(!0),owner:C[1],repo:C[2]})}if(!w&&g.repository&&typeof g.repository.url=="string"){const E=b.URI.parse(g.repository.url),C=/\/([^/]+)\/([^/]+)(\.git)?$/.exec(g.repository.url);C&&(w={base:E.with({path:null,fragment:null,query:null}).toString(!0),owner:C[1],repo:C[2]})}return w&&w.base.indexOf("github")===-1&&(w=void 0),w}}let d=class extends y.Action{constructor(g,w,E){super("report.slow",(0,T.localize)(0,null),"extension-action report-issue"),this.extension=g,this.profile=w,this._instantiationService=E,this.enabled=!!u.fromExtension(g)}async run(){const g=await this._instantiationService.invokeFunction(p,this.extension,this.profile);g&&await g.run()}};e.SlowExtensionAction=d,e.SlowExtensionAction=d=fe([O(2,D.IInstantiationService)],d);async function p(n,g,w){const E=u.fromExtension(g);if(!E)return;const C=n.get(v.IRequestService),I=n.get(D.IInstantiationService),_=`https://api.github.com/search/issues?q=is:issue+state:open+in:title+repo:${E.owner}/${E.repo}+%22Extension+causes+high+cpu+load%22`;let A;try{A=await C.request({url:_},f.CancellationToken.None)}catch{return}const k=await(0,v.asText)(A);if(!k)return;const L=JSON.parse(k);if(!(!L||typeof L.total_count!="number"))return L.total_count===0?I.createInstance(c,g,E,w):I.createInstance(l,g,E,w)}e.createSlowExtensionAction=p;let c=class extends y.Action{constructor(g,w,E,C,I,_,A,k,L){super("report.slow",(0,T.localize)(1,null)),this.extension=g,this.repoInfo=w,this.profile=E,this._dialogService=C,this._openerService=I,this._productService=_,this._nativeHostService=A,this._environmentService=k,this._fileService=L}async run(){const g=i.Utils.rewriteAbsolutePaths(this.profile.data,"pii_removed"),w=(0,m.joinPath)(this._environmentService.tmpDir,`${this.extension.identifier.value}-unresponsive.cpuprofile.txt`);await this._fileService.writeFile(w,o.VSBuffer.fromString(JSON.stringify(g,void 0,4)));const E=await this._nativeHostService.getOSProperties(),C=encodeURIComponent("Extension causes high cpu load"),I=`${E.type} ${E.arch} ${E.release}`,_=`:warning: Make sure to **attach** this file from your *home*-directory: :warning:\`${w}\` Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load`,A=encodeURIComponent(`- Issue Type: \`Performance\` - Extension Name: \`${this.extension.name}\` - Extension Version: \`${this.extension.version}\` - OS Version: \`${I}\` - VS Code version: \`${this._productService.version}\` ${_}`),k=`${this.repoInfo.base}/${this.repoInfo.owner}/${this.repoInfo.repo}/issues/new/?body=${A}&title=${C}`;this._openerService.open(b.URI.parse(k)),this._dialogService.info((0,T.localize)(2,null),(0,T.localize)(3,null,w.fsPath))}};c=fe([O(3,S.IDialogService),O(4,h.IOpenerService),O(5,t.IProductService),O(6,a.INativeHostService),O(7,r.INativeWorkbenchEnvironmentService),O(8,s.IFileService)],c);let l=class extends y.Action{constructor(g,w,E,C,I,_,A){super("show.slow",(0,T.localize)(4,null)),this.extension=g,this.repoInfo=w,this.profile=E,this._dialogService=C,this._openerService=I,this._environmentService=_,this._fileService=A}async run(){const g=i.Utils.rewriteAbsolutePaths(this.profile.data,"pii_removed"),w=(0,m.joinPath)(this._environmentService.tmpDir,`${this.extension.identifier.value}-unresponsive.cpuprofile.txt`);await this._fileService.writeFile(w,o.VSBuffer.fromString(JSON.stringify(g,void 0,4)));const E=`${this.repoInfo.base}/${this.repoInfo.owner}/${this.repoInfo.repo}/issues?utf8=\u2713&q=is%3Aissue+state%3Aopen+%22Extension+causes+high+cpu+load%22`;this._openerService.open(b.URI.parse(E)),this._dialogService.info((0,T.localize)(5,null),(0,T.localize)(6,null,w.fsPath))}};l=fe([O(3,S.IDialogService),O(4,h.IOpenerService),O(5,r.INativeWorkbenchEnvironmentService),O(6,s.IFileService)],l)}),define(Q[3734],Y([1,0,34,2772,100,139,25,26]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenExtensionLogsFolderAction=e.OpenLogsFolderAction=void 0;let v=class extends t.Action{static{this.ID="workbench.action.openLogsFolder"}static{this.TITLE={value:y.localize(0,null),original:"Open Logs Folder"}}constructor(h,a,r,i){super(h,a),this.environmentService=r,this.nativeHostService=i}run(){return this.nativeHostService.showItemInFolder((0,f.joinPath)(this.environmentService.logsHome,"main.log").fsPath)}};e.OpenLogsFolderAction=v,e.OpenLogsFolderAction=v=fe([O(2,D.INativeWorkbenchEnvironmentService),O(3,b.INativeHostService)],v);let m=class extends t.Action{static{this.ID="workbench.action.openExtensionLogsFolder"}static{this.TITLE={value:y.localize(1,null),original:"Open Extension Logs Folder"}}constructor(h,a,r,i,s){super(h,a),this.environmentSerice=r,this.fileService=i,this.nativeHostService=s}async run(){const h=await this.fileService.resolve(this.environmentSerice.extHostLogsPath);if(h.children&&h.children[0])return this.nativeHostService.showItemInFolder(h.children[0].resource.fsPath)}};e.OpenExtensionLogsFolderAction=m,e.OpenExtensionLogsFolderAction=m=fe([O(2,D.INativeWorkbenchEnvironmentService),O(3,T.IFileService),O(4,b.INativeHostService)],m)}),define(Q[3735],Y([1,0,81,13,3734,5]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,y.registerAction2)(class extends y.Action2{constructor(){super({id:b.OpenLogsFolderAction.ID,title:b.OpenLogsFolderAction.TITLE,category:t.Categories.Developer,f1:!0})}run(T){return T.get(D.IInstantiationService).createInstance(b.OpenLogsFolderAction,b.OpenLogsFolderAction.ID,b.OpenLogsFolderAction.TITLE.value).run()}}),(0,y.registerAction2)(class extends y.Action2{constructor(){super({id:b.OpenExtensionLogsFolderAction.ID,title:b.OpenExtensionLogsFolderAction.TITLE,category:t.Categories.Developer,f1:!0})}run(T){return T.get(D.IInstantiationService).createInstance(b.OpenExtensionLogsFolderAction,b.OpenExtensionLogsFolderAction.ID,b.OpenExtensionLogsFolderAction.TITLE.value).run()}})}),define(Q[3736],Y([1,0,3044,100,21,13,81,65,171,25,139,10]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenUserDataFolderAction=e.ReloadWindowWithExtensionsDisabledAction=e.ConfigureRuntimeArgumentsAction=e.ToggleDevToolsAction=void 0;class a extends D.Action2{constructor(){super({id:"workbench.action.toggleDevTools",title:{value:(0,t.localize)(0,null),original:"Toggle Developer Tools"},category:T.Categories.Developer,f1:!0,keybinding:{weight:200+50,when:v.IsDevelopmentContext,primary:3111,mac:{primary:2599}},menu:{id:D.MenuId.MenubarHelpMenu,group:"5_tools",order:1}})}async run(u){return u.get(y.INativeHostService).toggleDevTools()}}e.ToggleDevToolsAction=a;class r extends D.Action2{constructor(){super({id:"workbench.action.configureRuntimeArguments",title:{value:(0,t.localize)(1,null),original:"Configure Runtime Arguments"},category:T.Categories.Preferences,f1:!0})}async run(u){const d=u.get(b.IEditorService),p=u.get(f.IWorkbenchEnvironmentService);await d.openEditor({resource:p.argvResource,options:{pinned:!0}})}}e.ConfigureRuntimeArgumentsAction=r;class i extends D.Action2{constructor(){super({id:"workbench.action.reloadWindowWithExtensionsDisabled",title:{value:(0,t.localize)(2,null),original:"Reload With Extensions Disabled"},category:T.Categories.Developer,f1:!0})}async run(u){return u.get(y.INativeHostService).reload({disableExtensions:!0})}}e.ReloadWindowWithExtensionsDisabledAction=i;class s extends D.Action2{constructor(){super({id:"workbench.action.openUserDataFolder",title:{value:(0,t.localize)(3,null),original:"Open User Data Folder"},category:T.Categories.Developer,f1:!0})}async run(u){const d=u.get(y.INativeHostService),p=u.get(m.IFileService),c=u.get(S.INativeWorkbenchEnvironmentService),l=h.URI.file(c.userDataPath),n=await p.resolve(l);let g;return n.children&&n.children.length>0?g=n.children[0].resource:g=l,d.showItemInFolder(g.fsPath)}}e.OpenUserDataFolderAction=s}),define(Q[744],Y([1,0,5,274,35]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShellEnvironmentService=e.IShellEnvironmentService=void 0,e.IShellEnvironmentService=(0,t.createDecorator)("shellEnvironmentService");class D{getShellEnv(){return y.process.shellEnv()}}e.ShellEnvironmentService=D,(0,b.registerSingleton)(e.IShellEnvironmentService,D,1)}),define(Q[3737],Y([1,0,112,18,65,64,35,115,22,10,412,52,1137,11]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BuiltinExtensionsScannerService=void 0;let i=class{constructor(o,u,d,p,c){if(this.extensionResourceLoaderService=d,this.logService=c,this.builtinExtensionsPromises=[],y.isWeb){const l=p.extensionsGallery?.nlsBaseUrl;l&&p.commit&&!y.Language.isDefaultVariant()&&(this.nlsUrl=m.URI.joinPath(m.URI.parse(l),p.commit,p.version,y.Language.value()));const n=v.FileAccess.asBrowserUri(v.builtinExtensionsPath);if(n){let g=[];if(o.isBuilt)g=[];else{const w=document.getElementById("vscode-workbench-builtin-extensions"),E=w?w.getAttribute("data-settings"):void 0;if(E)try{g=JSON.parse(E)}catch{}}this.builtinExtensionsPromises=g.map(async w=>{const E=(0,f.getGalleryExtensionId)(w.packageJSON.publisher,w.packageJSON.name);return{identifier:{id:E},location:u.extUri.joinPath(n,w.extensionPath),type:0,isBuiltin:!0,manifest:w.packageNLS?await this.localizeManifest(E,w.packageJSON,w.packageNLS):w.packageJSON,readmeUrl:w.readmePath?u.extUri.joinPath(n,w.readmePath):void 0,changelogUrl:w.changelogPath?u.extUri.joinPath(n,w.changelogPath):void 0,targetPlatform:"web",validations:[],isValid:!0}})}}}async scanBuiltinExtensions(){return[...await Promise.all(this.builtinExtensionsPromises)]}async localizeManifest(o,u,d){if(!this.nlsUrl)return(0,a.localizeManifest)(u,d);const p=m.URI.joinPath(this.nlsUrl,o,"package");try{const c=await this.extensionResourceLoaderService.readExtensionResource(p),l=JSON.parse(c.toString());return(0,a.localizeManifest)(u,l,d)}catch(c){return this.logService.error(c),(0,a.localizeManifest)(u,d)}}};e.BuiltinExtensionsScannerService=i,e.BuiltinExtensionsScannerService=i=fe([O(0,b.IWorkbenchEnvironmentService),O(1,D.IUriIdentityService),O(2,S.IExtensionResourceLoaderService),O(3,h.IProductService),O(4,r.ILogService)],i),(0,T.registerSingleton)(t.IBuiltinExtensionsScannerService,i,1)}),define(Q[149],Y([1,0,5,95,22]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWebExtensionsScannerService=e.IWorkbenchExtensionEnablementService=e.EnablementState=e.IWorkbenchExtensionManagementService=e.DefaultIconPath=e.IExtensionManagementServerService=e.ExtensionInstallLocation=e.IProfileAwareExtensionManagementService=void 0,e.IProfileAwareExtensionManagementService=(0,t.refineServiceDecorator)(y.IExtensionManagementService);var D;(function(f){f[f.Local=1]="Local",f[f.Remote=2]="Remote",f[f.Web=3]="Web"})(D||(e.ExtensionInstallLocation=D={})),e.IExtensionManagementServerService=(0,t.createDecorator)("extensionManagementServerService"),e.DefaultIconPath=b.FileAccess.asBrowserUri("vs/workbench/services/extensionManagement/common/media/defaultIcon.png").toString(!0),e.IWorkbenchExtensionManagementService=(0,t.refineServiceDecorator)(e.IProfileAwareExtensionManagementService);var T;(function(f){f[f.DisabledByTrustRequirement=0]="DisabledByTrustRequirement",f[f.DisabledByExtensionKind=1]="DisabledByExtensionKind",f[f.DisabledByEnvironment=2]="DisabledByEnvironment",f[f.EnabledByEnvironment=3]="EnabledByEnvironment",f[f.DisabledByVirtualWorkspace=4]="DisabledByVirtualWorkspace",f[f.DisabledByExtensionDependency=5]="DisabledByExtensionDependency",f[f.DisabledGlobally=6]="DisabledGlobally",f[f.DisabledWorkspace=7]="DisabledWorkspace",f[f.EnabledGlobally=8]="EnabledGlobally",f[f.EnabledWorkspace=9]="EnabledWorkspace"})(T||(e.EnablementState=T={})),e.IWorkbenchExtensionEnablementService=(0,t.createDecorator)("extensionEnablementService"),e.IWebExtensionsScannerService=(0,t.createDecorator)("IWebExtensionsScannerService")}),define(Q[3738],Y([1,0,95,519,3300,11,149]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnsupportedExtensionsMigrationContrib=void 0;let f=class{constructor(m,S,h,a,r){m.remoteExtensionManagementServer&&(0,b.migrateUnsupportedExtensions)(m.remoteExtensionManagementServer.extensionManagementService,S,h,a,r),m.webExtensionManagementServer&&(0,b.migrateUnsupportedExtensions)(m.webExtensionManagementServer.extensionManagementService,S,h,a,r)}};e.UnsupportedExtensionsMigrationContrib=f,e.UnsupportedExtensionsMigrationContrib=f=fe([O(0,T.IExtensionManagementServerService),O(1,t.IExtensionGalleryService),O(2,y.IExtensionStorageService),O(3,t.IGlobalExtensionEnablementService),O(4,D.ILogService)],f)}),define(Q[3739],Y([1,0,354,52,2707,149]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebRecommendations=void 0;let T=class extends t.ExtensionRecommendations{get recommendations(){return this._recommendations}constructor(v,m){super(),this.productService=v,this.extensionManagementServerService=m,this._recommendations=[]}async doActivate(){this.extensionManagementServerService.webExtensionManagementServer&&!this.extensionManagementServerService.localExtensionManagementServer&&!this.extensionManagementServerService.remoteExtensionManagementServer&&Array.isArray(this.productService.webExtensionTips)&&(this._recommendations=this.productService.webExtensionTips.map(m=>({extensionId:m.toLowerCase(),reason:{reasonId:6,reasonText:(0,b.localize)(0,null,this.productService.nameLong)}})))}};e.WebRecommendations=T,e.WebRecommendations=T=fe([O(0,y.IProductService),O(1,D.IExtensionManagementServerService)],T)}),define(Q[1349],Y([1,0,112,3181,6,20,33]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProfileAwareExtensionManagementChannelClient=void 0;class f extends y.ExtensionManagementChannelClient{constructor(m,S,h){super(m),this.userDataProfileService=S,this.uriIdentityService=h,this._onDidChangeProfile=this._register(new b.Emitter),this.onDidChangeProfile=this._onDidChangeProfile.event,this._register(S.onDidChangeCurrentProfile(a=>{this.uriIdentityService.extUri.isEqual(a.previous.extensionsResource,a.profile.extensionsResource)||a.join(this.whenProfileChanged(a))}))}async fireEvent(m,S){if(Array.isArray(S)){const h=m,a=S,r=[];for(const i of a){const s=this.filterEvent(i);(s instanceof Promise?await s:s)&&r.push(i)}r.length&&h.fire(r)}else{const h=m,a=S,r=this.filterEvent(a);(r instanceof Promise?await r:r)&&h.fire(a)}}async install(m,S){return S={...S,profileLocation:await this.getProfileLocation(S?.profileLocation)},super.install(m,S)}async installFromLocation(m,S){return super.installFromLocation(m,await this.getProfileLocation(S))}async installFromGallery(m,S){return S={...S,profileLocation:await this.getProfileLocation(S?.profileLocation)},super.installFromGallery(m,S)}async installGalleryExtensions(m){const S=[];for(const h of m)S.push({...h,options:{...h.options,profileLocation:h.options?.profileLocation?await this.getProfileLocation(h.options?.profileLocation):void 0}});return super.installGalleryExtensions(S)}async uninstall(m,S){return S={...S,profileLocation:await this.getProfileLocation(S?.profileLocation)},super.uninstall(m,S)}async getInstalled(m=null,S){return super.getInstalled(m,await this.getProfileLocation(S))}async updateMetadata(m,S,h){return super.updateMetadata(m,S,await this.getProfileLocation(h))}async toggleAppliationScope(m,S){return super.toggleAppliationScope(m,await this.getProfileLocation(S))}async copyExtensions(m,S){return super.copyExtensions(await this.getProfileLocation(m),await this.getProfileLocation(S))}async whenProfileChanged(m){const S=await this.getProfileLocation(m.previous.extensionsResource),h=await this.getProfileLocation(m.profile.extensionsResource);if(this.uriIdentityService.extUri.isEqual(S,h))return;const a=await this.switchExtensionsProfile(S,h);this._onDidChangeProfile.fire(a)}async switchExtensionsProfile(m,S,h){const a=await this.getInstalled(1,m),r=await this.getInstalled(1,S);if(h?.length){const i=[];for(const s of a)h.some(o=>t.ExtensionIdentifier.equals(s.identifier.id,o))&&!r.some(o=>t.ExtensionIdentifier.equals(o.identifier.id,s.identifier.id))&&i.push(s.identifier);i.length&&await this.installExtensionsFromProfile(i,m,S)}return(0,D.delta)(a,r,(i,s)=>(0,T.compare)(`${t.ExtensionIdentifier.toKey(i.identifier.id)}@${i.manifest.version}`,`${t.ExtensionIdentifier.toKey(s.identifier.id)}@${s.manifest.version}`))}async getProfileLocation(m){return m??this.userDataProfileService.currentProfile.extensionsResource}}e.ProfileAwareExtensionManagementChannelClient=f}),define(Q[3740],Y([1,0,35,153,95,3299,25,52,22]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let m=class extends D.ExtensionTipsService{constructor(h,a,r){super(h,a),this.channel=r.getChannel("extensionTipsService")}getConfigBasedTips(h){return h.scheme===v.Schemas.file?this.channel.call("getConfigBasedTips",[h]):super.getConfigBasedTips(h)}getImportantExecutableBasedTips(){return this.channel.call("getImportantExecutableBasedTips")}getOtherExecutableBasedTips(){return this.channel.call("getOtherExecutableBasedTips")}};m=fe([O(0,T.IFileService),O(1,f.IProductService),O(2,y.ISharedProcessService)],m),(0,t.registerSingleton)(b.IExtensionTipsService,m,1)}),define(Q[3741],Y([1,0,1150,153]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,y.registerMainProcessRemoteService)(t.IExtensionUrlTrustService,"extensionUrlTrust")}),define(Q[313],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionIgnoredRecommendationsService=e.IExtensionRecommendationsService=e.ExtensionRecommendationReason=void 0;var y;(function(b){b[b.Workspace=0]="Workspace",b[b.File=1]="File",b[b.Executable=2]="Executable",b[b.WorkspaceConfig=3]="WorkspaceConfig",b[b.DynamicWorkspace=4]="DynamicWorkspace",b[b.Experimental=5]="Experimental",b[b.Application=6]="Application"})(y||(e.ExtensionRecommendationReason=y={})),e.IExtensionRecommendationsService=(0,t.createDecorator)("extensionRecommendationsService"),e.IExtensionIgnoredRecommendationsService=(0,t.createDecorator)("IExtensionIgnoredRecommendationsService")}),define(Q[1350],Y([1,0,34,2130,21,23,1014,76,15,472,313,9,24,869,41]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";var s,o;Object.defineProperty(e,"__esModule",{value:!0}),e.VisualizerDataAction=e.ChartDataAction=e.RestoreTableAction=e.MaximizeTableAction=e.SelectAllGridAction=e.CopyHeadersAction=e.CopyResultAction=e.SaveResultAction=void 0;function u(A){if(A)return A.map(k=>new Slick.Range(k.fromRow,k.fromCell-1,k.toRow,k.toCell?k.toCell-1:void 0))}const d="https://support.microsoft.com/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3",p=1048576,c=16384;let l=class extends t.Action{static{this.SAVECSV_ID="grid.saveAsCsv"}static{this.SAVECSV_LABEL=(0,y.localize)(0,null)}static{this.SAVECSV_ICON="saveCsv"}static{this.SAVEJSON_ID="grid.saveAsJson"}static{this.SAVEJSON_LABEL=(0,y.localize)(1,null)}static{this.SAVEJSON_ICON="saveJson"}static{this.SAVEMARKDOWN_ID="grid.saveAsMarkdown"}static{this.SAVEMARKDOWN_LABEL=(0,y.localize)(2,null)}static{this.SAVEMARKDOWN_ICON="saveMarkdown"}static{this.SAVEEXCEL_ID="grid.saveAsExcel"}static{this.SAVEEXCEL_LABEL=(0,y.localize)(3,null)}static{this.SAVEEXCEL_ICON="saveExcel"}static{this.SAVEXML_ID="grid.saveAsXml"}static{this.SAVEXML_LABEL=(0,y.localize)(4,null)}static{this.SAVEXML_ICON="saveXml"}constructor(k,L,R,M,N,P,x){super(k,L,R),this.format=M,this.notificationService=N,this.editorService=P,this.openerService=x}async run(k){if(!k.gridDataProvider.canSerialize){this.notificationService.warn((0,y.localize)(5,null));return}if(this.format===m.SaveFormat.EXCEL&&(k.table.getData().getLength()>p||k.table.columns.length>c)){this.notificationService.notify({severity:D.Severity.Error,message:(0,y.localize)(6,null),actions:{primary:[(0,t.toAction)({id:"openExcelSpecs",label:(0,y.localize)(7,null),run:()=>{this.openerService.open(d)}})]}});return}const L=this.editorService.activeEditorPane;typeof L.getEncoding=="function"&&L.getEncoding()!=="utf8"&&this.notificationService.notify({severity:D.Severity.Info,message:(0,y.localize)(8,null),neverShowAgain:{id:"ignoreJsonEncoding",scope:D.NeverShowAgainScope.APPLICATION}});try{await k.gridDataProvider.serializeResults(this.format,u(k.selection))}catch(R){this.notificationService.error((0,v.getErrorMessage)(R));return}}};e.SaveResultAction=l,e.SaveResultAction=l=fe([O(4,D.INotificationService),O(5,b.IEditorService),O(6,i.IOpenerService)],l);let n=class extends t.Action{static{this.COPY_ID="editor.action.clipboardCopyAction"}static{this.COPY_LABEL=(0,y.localize)(9,null)}static{this.COPYWITHHEADERS_ID="grid.copyWithHeaders"}static{this.COPYWITHHEADERS_LABEL=(0,y.localize)(10,null)}constructor(k,L,R,M){super(k,L),this.copyHeader=R,this.configurationService=M}async run(k){const L=u(k.selection),R=this.configurationService.getValue("queryEditor.results.copyIncludeHeaders")||this.copyHeader;await k.gridDataProvider.copyResults(L,R,k.table.getData())}};e.CopyResultAction=n,e.CopyResultAction=n=fe([O(3,h.IConfigurationService)],n);class g extends t.Action{static{this.ID="grid.copyHeaders"}static{this.LABEL=(0,y.localize)(11,null)}constructor(){super(g.ID,g.LABEL)}async run(k){const L=u(k.selection);await k.gridDataProvider.copyHeaders(L)}}e.CopyHeadersAction=g;class w extends t.Action{static{this.ID="grid.selectAll"}static{this.LABEL=(0,y.localize)(12,null)}constructor(){super(w.ID,w.LABEL)}async run(k){k.selectionModel.setSelectedRanges([new Slick.Range(0,0,k.table.getData().getLength()-1,k.table.columns.length-1)])}}e.SelectAllGridAction=w;class E extends t.Action{static{this.ID="grid.maximize"}static{this.LABEL=(0,y.localize)(13,null)}static{this.ICON="extendFullScreen"}constructor(){super(E.ID,E.LABEL,E.ICON)}async run(k){k.tableState.maximized=!0}}e.MaximizeTableAction=E;class C extends t.Action{static{this.ID="grid.restore"}static{this.LABEL=(0,y.localize)(14,null)}static{this.ICON="exitFullScreen"}constructor(){super(C.ID,C.LABEL,C.ICON)}async run(k){k.tableState.maximized=!1}}e.RestoreTableAction=C;let I=class extends t.Action{static{s=this}static{this.ID="grid.chart"}static{this.LABEL=(0,y.localize)(15,null)}static{this.ICON="viewChart"}constructor(k,L,R,M,N,P){super(s.ID,s.LABEL,s.ICON),this.editorService=k,this.extensionTipsService=L,this.configurationService=R,this.storageService=M,this.notificationService=N,this.adsTelemetryService=P}async run(k){this.extensionTipsService.promptRecommendedExtensionsByScenario(T.visualizerExtensions);const L=(0,r.getChartMaxRowCount)(this.configurationService),M=k.table.getData().getLength()>L;M&&(0,r.notifyMaxRowCountExceeded)(this.storageService,this.notificationService,this.configurationService),this.adsTelemetryService.createActionEvent("ResultsPanel","ShowChart").withAdditionalProperties({chartMaxRowCountExceeded:M}).send(),this.editorService.activeEditorPane.chart({batchId:k.batchId,resultId:k.resultId})}};e.ChartDataAction=I,e.ChartDataAction=I=s=fe([O(0,b.IEditorService),O(1,S.IExtensionRecommendationsService),O(2,h.IConfigurationService),O(3,a.IStorageService),O(4,D.INotificationService),O(5,f.IAdsTelemetryService)],I);let _=class extends t.Action{static{o=this}static{this.ID="grid.visualizer"}static{this.LABEL=(0,y.localize)(16,null)}static{this.ICON="viewVisualizer"}constructor(k,L){super(o.ID,o.LABEL,o.ICON),this.runner=k,this.adsTelemetryService=L}async run(k){this.adsTelemetryService.sendActionEvent("ResultsPanel","Click","VisualizerButton","VisualizerDataAction"),this.runner.notifyVisualizeRequested(k.batchId,k.resultId)}};e.VisualizerDataAction=_,e.VisualizerDataAction=_=o=fe([O(1,f.IAdsTelemetryService)],_)}),define(Q[3742],Y([1,0,354,313,118,2706,24,52,22,26,195,57,50,588,20,4,71,14,39,115,17,146]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileBasedRecommendations=void 0;const n="fileBasedRecommendations/promptedRecommendations",g="extensionsAssistant/recommendations",w=1e3*60*60*24;let E=class extends t.ExtensionRecommendations{get recommendations(){const I=[];return[...this.fileBasedRecommendations.keys()].sort((_,A)=>{if(this.fileBasedRecommendations.get(_).recommendedTime===this.fileBasedRecommendations.get(A).recommendedTime){if(this.fileBasedImportantRecommendations.has(_))return-1;if(this.fileBasedImportantRecommendations.has(A))return 1}return this.fileBasedRecommendations.get(_).recommendedTime>this.fileBasedRecommendations.get(A).recommendedTime?-1:1}).forEach(_=>{I.push({extensionId:_,reason:{reasonId:1,reasonText:(0,D.localize)(0,null)}})}),I}get importantRecommendations(){return this.recommendations.filter(I=>this.fileBasedImportantRecommendations.has(I.extensionId))}get otherRecommendations(){return this.recommendations.filter(I=>!this.fileBasedImportantRecommendations.has(I.extensionId))}constructor(I,_,A,k,L,R,M,N){if(super(),this.extensionsWorkbenchService=I,this.modelService=_,this.languageService=A,this.storageService=L,this.extensionRecommendationNotificationService=R,this.extensionIgnoredRecommendationsService=M,this.workspaceContextService=N,this.recommendationsByPattern=new Map,this.fileBasedRecommendations=new Map,this.fileBasedImportantRecommendations=new Set,this.fileOpenRecommendations={},k.extensionRecommendations)for(const[P,x]of Object.entries(k.extensionRecommendations))x.onFileOpen&&(this.fileOpenRecommendations[P.toLowerCase()]=x.onFileOpen)}async doActivate(){if((0,c.isEmptyObject)(this.fileOpenRecommendations))return;await this.extensionsWorkbenchService.whenInitialized;const I=this.getCachedRecommendations(),_=Date.now();Object.entries(I).forEach(([A,k])=>{(_-k)/w<=7&&this.fileOpenRecommendations[A]&&this.fileBasedRecommendations.set(A.toLowerCase(),{recommendedTime:k})}),this._register(this.modelService.onModelAdded(A=>this.onModelAdded(A))),this.modelService.getModels().forEach(A=>this.onModelAdded(A))}onModelAdded(I){const _=I.uri.scheme===v.Schemas.vscodeNotebookCell?o.CellUri.parse(I.uri)?.notebook:I.uri;if(!_)return;const A=(0,i.distinct)([v.Schemas.untitled,v.Schemas.file,v.Schemas.vscodeRemote,...this.workspaceContextService.getWorkspace().folders.map(k=>k.uri.scheme)]);!_||!A.includes(_.scheme)||this._register((0,u.disposableTimeout)(()=>this.promptImportantRecommendations(_,I),0))}promptImportantRecommendations(I,_,A){const k=(0,m.extname)(I).toLowerCase();A=A??this.recommendationsByPattern.get(k)??this.fileOpenRecommendations;const L=Object.entries(A);if(L.length===0)return;const R=new Map,M=this.extensionsWorkbenchService.local,N={},P={},x={};let F=!1;for(const[V,W]of L){const z=[],B=[],K=[];for(const H of W){let U=!1,G=!1;const $=!!H.languages,ie=!!H.contentPattern;if(($||ie)&&z.push(H),$&&H.languages.includes(_.getLanguageId())&&(U=!0),H.pathGlob){const j=H.pathGlob;(R.get(j)??(0,S.match)(H.pathGlob,I.with({fragment:""}).toString()))&&(G=!0),R.set(j,G)}if(!U&&!G)continue;let J=!0;J&&H.whenInstalled&&(H.whenInstalled.every(j=>M.some(ee=>(0,p.areSameExtensions)({id:j},ee.identifier)))||(J=!1)),J&&H.whenNotInstalled&&M.some(j=>H.whenNotInstalled?.some(ee=>(0,p.areSameExtensions)({id:ee},j.identifier)))&&(J=!1),J&&ie&&(_.findMatches(H.contentPattern,!1,!0,!1,null,!1).length||(J=!1)),J?(B.push(H),z.pop()):($||ie)&&(K.push(H),$&&(F=!0))}B.length&&(P[V]=B),K.length&&(x[V]=K),z.length&&(N[V]=z)}if(this.recommendationsByPattern.set(k,N),Object.keys(x).length&&F){const V=new s.DisposableStore;V.add(_.onDidChangeLanguage(()=>{V.add((0,u.disposableTimeout)(()=>{V.isDisposed||(this.promptImportantRecommendations(I,_,x),V.dispose())},0))})),V.add(_.onWillDispose(()=>V.dispose()))}Object.keys(P).length&&this.promptFromRecommendations(I,_,P)}promptFromRecommendations(I,_,A){let k=!1;const L=new Set,R=new Set;for(const[P,x]of Object.entries(A))for(const F of x)R.add(P),F.important&&(L.add(P),this.fileBasedImportantRecommendations.add(P)),F.languages&&(k=!0);for(const P of R){const x=this.fileBasedRecommendations.get(P)||{recommendedTime:Date.now(),sources:[]};x.recommendedTime=Date.now(),this.fileBasedRecommendations.set(P,x)}if(this.storeCachedRecommendations(),this.extensionRecommendationNotificationService.hasToIgnoreRecommendationNotifications())return;const M=_.getLanguageId(),N=this.languageService.getLanguageName(M);L.size&&this.promptRecommendedExtensionForFileType(N&&k&&M!==l.PLAINTEXT_LANGUAGE_ID?(0,D.localize)(1,null,N):(0,m.basename)(I),M,[...L])}promptRecommendedExtensionForFileType(I,_,A){if(A=this.filterIgnoredOrNotAllowed(A),A.length===0)return!1;A=this.filterInstalled(A,this.extensionsWorkbenchService.local).filter(L=>this.fileBasedImportantRecommendations.has(L));const k=_!==l.PLAINTEXT_LANGUAGE_ID?this.getPromptedRecommendations()[_]:void 0;return k&&(A=A.filter(L=>k.includes(L))),A.length===0?!1:(this.promptImportantExtensionsInstallNotification(A,I,_),!0)}async promptImportantExtensionsInstallNotification(I,_,A){try{await this.extensionRecommendationNotificationService.promptImportantExtensionsInstallNotification({extensions:I,name:_,source:1})==="reacted"&&this.addToPromptedRecommendations(A,I)}catch{}}getPromptedRecommendations(){return JSON.parse(this.storageService.get(n,0,"{}"))}addToPromptedRecommendations(I,_){const A=this.getPromptedRecommendations();A[I]=(0,i.distinct)([...A[I]??[],..._]),this.storageService.store(n,JSON.stringify(A),0,0)}filterIgnoredOrNotAllowed(I){const _=[...this.extensionIgnoredRecommendationsService.ignoredRecommendations,...this.extensionRecommendationNotificationService.ignoredRecommendations];return I.filter(A=>!_.includes(A))}filterInstalled(I,_){const A=_.reduce((k,L)=>(L.enablementState!==1&&k.add(L.identifier.id.toLowerCase()),k),new Set);return I.filter(k=>!A.has(k.toLowerCase()))}getCachedRecommendations(){let I=JSON.parse(this.storageService.get(g,0,"[]"));Array.isArray(I)&&(I=I.reduce((A,k)=>(A[k]=Date.now(),A),{}));const _={};return Object.entries(I).forEach(([A,k])=>{typeof k=="number"&&(_[A.toLowerCase()]=k)}),_}storeCachedRecommendations(){const I={};this.fileBasedRecommendations.forEach((_,A)=>I[A]=_.recommendedTime),this.storageService.store(g,JSON.stringify(I),0,1)}};e.FileBasedRecommendations=E,e.FileBasedRecommendations=E=fe([O(0,b.IExtensionsWorkbenchService),O(1,h.IModelService),O(2,a.ILanguageService),O(3,f.IProductService),O(4,T.IStorageService),O(5,r.IExtensionRecommendationNotificationService),O(6,y.IExtensionIgnoredRecommendationsService),O(7,d.IWorkspaceContextService)],E)}),define(Q[622],Y([1,0,20,6,161,4,252,25,35,5,39,43,57,50,3071,335,69]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceExtensionsConfigService=e.IWorkspaceExtensionsConfigService=e.EXTENSIONS_CONFIG=void 0,e.EXTENSIONS_CONFIG=".vscode/extensions.json",e.IWorkspaceExtensionsConfigService=(0,m.createDecorator)("IWorkspaceExtensionsConfigService");let u=class extends D.Disposable{constructor(p,c,l,n,g,w){super(),this.workspaceContextService=p,this.fileService=c,this.quickInputService=l,this.modelService=n,this.languageService=g,this.jsonEditingService=w,this._onDidChangeExtensionsConfigs=this._register(new y.Emitter),this.onDidChangeExtensionsConfigs=this._onDidChangeExtensionsConfigs.event,this._register(p.onDidChangeWorkspaceFolders(E=>this._onDidChangeExtensionsConfigs.fire())),this._register(c.onDidFilesChange(E=>{const C=p.getWorkspace();(C.configuration&&E.affects(C.configuration)||C.folders.some(I=>E.affects(I.toResource(e.EXTENSIONS_CONFIG))))&&this._onDidChangeExtensionsConfigs.fire()}))}async getExtensionsConfigs(){const p=this.workspaceContextService.getWorkspace(),c=[],l=p.configuration?await this.resolveWorkspaceExtensionConfig(p.configuration):void 0;return l&&c.push(l),c.push(...await Promise.all(p.folders.map(n=>this.resolveWorkspaceFolderExtensionConfig(n)))),c}async getRecommendations(){const p=await this.getExtensionsConfigs();return(0,t.distinct)((0,t.flatten)(p.map(c=>c.recommendations?c.recommendations.map(l=>l.toLowerCase()):[])))}async getUnwantedRecommendations(){const p=await this.getExtensionsConfigs();return(0,t.distinct)((0,t.flatten)(p.map(c=>c.unwantedRecommendations?c.unwantedRecommendations.map(l=>l.toLowerCase()):[])))}async toggleRecommendation(p){p=p.toLowerCase();const c=this.workspaceContextService.getWorkspace(),l=c.configuration?await this.resolveWorkspaceExtensionConfig(c.configuration):void 0,n=new o.ResourceMap;await Promise.all(c.folders.map(async I=>{const _=await this.resolveWorkspaceFolderExtensionConfig(I);n.set(I.uri,_)}));const g=l&&l.recommendations?.some(I=>I.toLowerCase()===p),w=c.folders.filter(I=>n.get(I.uri)?.recommendations?.some(_=>_.toLowerCase()===p)),E=g||w.length>0,C=E?await this.pickWorkspaceOrFolders(w,g?c:void 0,(0,i.localize)(0,null)):await this.pickWorkspaceOrFolders(c.folders,c.configuration?c:void 0,(0,i.localize)(1,null));for(const I of C)(0,S.isWorkspace)(I)?await this.addOrRemoveWorkspaceRecommendation(p,I,l,!E):await this.addOrRemoveWorkspaceFolderRecommendation(p,I,n.get(I.uri),!E)}async toggleUnwantedRecommendation(p){const c=this.workspaceContextService.getWorkspace(),l=c.configuration?await this.resolveWorkspaceExtensionConfig(c.configuration):void 0,n=new o.ResourceMap;await Promise.all(c.folders.map(async I=>{const _=await this.resolveWorkspaceFolderExtensionConfig(I);n.set(I.uri,_)}));const g=l&&l.unwantedRecommendations?.some(I=>I===p),w=c.folders.filter(I=>n.get(I.uri)?.unwantedRecommendations?.some(_=>_===p)),E=g||w.length>0,C=E?await this.pickWorkspaceOrFolders(w,g?c:void 0,(0,i.localize)(2,null)):await this.pickWorkspaceOrFolders(c.folders,c.configuration?c:void 0,(0,i.localize)(3,null));for(const I of C)(0,S.isWorkspace)(I)?await this.addOrRemoveWorkspaceUnwantedRecommendation(p,I,l,!E):await this.addOrRemoveWorkspaceFolderUnwantedRecommendation(p,I,n.get(I.uri),!E)}async addOrRemoveWorkspaceFolderRecommendation(p,c,l,n){const g=[];if(n?(g.push({path:["recommendations"],value:[...l.recommendations||[],p]}),l.unwantedRecommendations&&l.unwantedRecommendations.some(w=>w===p)&&g.push({path:["unwantedRecommendations"],value:l.unwantedRecommendations.filter(w=>w!==p)})):l.recommendations&&g.push({path:["recommendations"],value:l.recommendations.filter(w=>w!==p)}),g.length)return this.jsonEditingService.write(c.toResource(e.EXTENSIONS_CONFIG),g,!0)}async addOrRemoveWorkspaceRecommendation(p,c,l,n){const g=[];if(l?n?(g.push({path:["extensions","recommendations"],value:[...l.recommendations||[],p]}),l.unwantedRecommendations&&l.unwantedRecommendations.some(w=>w===p)&&g.push({path:["extensions","unwantedRecommendations"],value:l.unwantedRecommendations.filter(w=>w!==p)})):l.recommendations&&g.push({path:["extensions","recommendations"],value:l.recommendations.filter(w=>w!==p)}):n&&g.push({path:["extensions"],value:{recommendations:[p]}}),g.length)return this.jsonEditingService.write(c.configuration,g,!0)}async addOrRemoveWorkspaceFolderUnwantedRecommendation(p,c,l,n){const g=[];if(n?(g.push({path:["unwantedRecommendations"],value:[...l.unwantedRecommendations||[],p]}),l.recommendations&&l.recommendations.some(w=>w===p)&&g.push({path:["recommendations"],value:l.recommendations.filter(w=>w!==p)})):l.unwantedRecommendations&&g.push({path:["unwantedRecommendations"],value:l.unwantedRecommendations.filter(w=>w!==p)}),g.length)return this.jsonEditingService.write(c.toResource(e.EXTENSIONS_CONFIG),g,!0)}async addOrRemoveWorkspaceUnwantedRecommendation(p,c,l,n){const g=[];if(l?n?(g.push({path:["extensions","unwantedRecommendations"],value:[...l.unwantedRecommendations||[],p]}),l.recommendations&&l.recommendations.some(w=>w===p)&&g.push({path:["extensions","recommendations"],value:l.recommendations.filter(w=>w!==p)})):l.unwantedRecommendations&&g.push({path:["extensions","unwantedRecommendations"],value:l.unwantedRecommendations.filter(w=>w!==p)}):n&&g.push({path:["extensions"],value:{unwantedRecommendations:[p]}}),g.length)return this.jsonEditingService.write(c.configuration,g,!0)}async pickWorkspaceOrFolders(p,c,l){const n=c?[...p,c]:[...p];if(n.length===1)return n;const g=p.map(E=>({label:E.name,description:(0,i.localize)(4,null),workspaceOrFolder:E,iconClasses:(0,T.getIconClasses)(this.modelService,this.languageService,E.uri,f.FileKind.ROOT_FOLDER)}));return c&&(g.push({type:"separator"}),g.push({label:(0,i.localize)(5,null),workspaceOrFolder:c})),(await this.quickInputService.pick(g,{placeHolder:l,canPickMany:!0})||[]).map(E=>E.workspaceOrFolder)}async resolveWorkspaceExtensionConfig(p){try{const c=await this.fileService.readFile(p),l=(0,b.parse)(c.value.toString()).extensions;return l?this.parseExtensionConfig(l):void 0}catch{}}async resolveWorkspaceFolderExtensionConfig(p){try{const c=await this.fileService.readFile(p.toResource(e.EXTENSIONS_CONFIG)),l=(0,b.parse)(c.value.toString());return this.parseExtensionConfig(l)}catch{}return{}}parseExtensionConfig(p){return{recommendations:(0,t.distinct)((p.recommendations||[]).map(c=>c.toLowerCase())),unwantedRecommendations:(0,t.distinct)((p.unwantedRecommendations||[]).map(c=>c.toLowerCase()))}}};e.WorkspaceExtensionsConfigService=u,e.WorkspaceExtensionsConfigService=u=fe([O(0,S.IWorkspaceContextService),O(1,f.IFileService),O(2,h.IQuickInputService),O(3,a.IModelService),O(4,r.ILanguageService),O(5,s.IJSONEditingService)],u),(0,v.registerSingleton)(e.IWorkspaceExtensionsConfigService,u,1)}),define(Q[3743],Y([1,0,95,20,354,23,2708,6,622]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceRecommendations=void 0;let m=class extends b.ExtensionRecommendations{get recommendations(){return this._recommendations}get ignoredRecommendations(){return this._ignoredRecommendations}constructor(h,a){super(),this.workspaceExtensionsConfigService=h,this.notificationService=a,this._recommendations=[],this._onDidChangeRecommendations=this._register(new f.Emitter),this.onDidChangeRecommendations=this._onDidChangeRecommendations.event,this._ignoredRecommendations=[]}async doActivate(){await this.fetch(),this._register(this.workspaceExtensionsConfigService.onDidChangeExtensionsConfigs(()=>this.onDidChangeExtensionsConfigs()))}async fetch(){const h=await this.workspaceExtensionsConfigService.getExtensionsConfigs(),{invalidRecommendations:a,message:r}=await this.validateExtensions(h);a.length&&this.notificationService.warn(`The ${a.length} extension(s) below, in workspace recommendations have issues: ${r}`),this._recommendations=[],this._ignoredRecommendations=[];for(const i of h){if(i.unwantedRecommendations)for(const s of i.unwantedRecommendations)a.indexOf(s)===-1&&this._ignoredRecommendations.push(s);if(i.recommendations)for(const s of i.recommendations)a.indexOf(s)===-1&&this._recommendations.push({extensionId:s,reason:{reasonId:0,reasonText:(0,T.localize)(0,null)}})}}async validateExtensions(h){const a=[],r=[];let i="";const s=(0,y.distinct)((0,y.flatten)(h.map(({recommendations:u})=>u||[]))),o=new RegExp(t.EXTENSION_IDENTIFIER_PATTERN);for(const u of s)o.test(u)?a.push(u):(r.push(u),i+=`${u} (bad format) Expected: <provider>.<name> `);return{validRecommendations:a,invalidRecommendations:r,message:i}}async onDidChangeExtensionsConfigs(){await this.fetch(),this._onDidChangeRecommendations.fire()}};e.WorkspaceRecommendations=m,e.WorkspaceRecommendations=m=fe([O(0,v.IWorkspaceExtensionsConfigService),O(1,D.INotificationService)],m)}),define(Q[3744],Y([1,0,20,6,4,35,24,313,622]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionIgnoredRecommendationsService=void 0;const m="extensionsAssistant/ignored_recommendations";let S=class extends b.Disposable{get globalIgnoredRecommendations(){return[...this._globalIgnoredRecommendations]}get ignoredRecommendations(){return(0,t.distinct)([...this.globalIgnoredRecommendations,...this.ignoredWorkspaceRecommendations])}constructor(a,r){super(),this.workspaceExtensionsConfigService=a,this.storageService=r,this._onDidChangeIgnoredRecommendations=this._register(new y.Emitter),this.onDidChangeIgnoredRecommendations=this._onDidChangeIgnoredRecommendations.event,this._globalIgnoredRecommendations=[],this._onDidChangeGlobalIgnoredRecommendation=this._register(new y.Emitter),this.onDidChangeGlobalIgnoredRecommendation=this._onDidChangeGlobalIgnoredRecommendation.event,this.ignoredWorkspaceRecommendations=[],this._globalIgnoredRecommendations=this.getCachedIgnoredRecommendations(),this._register(this.storageService.onDidChangeValue(0,m,this._register(new b.DisposableStore))(i=>this.onDidStorageChange())),this.initIgnoredWorkspaceRecommendations()}async initIgnoredWorkspaceRecommendations(){this.ignoredWorkspaceRecommendations=await this.workspaceExtensionsConfigService.getUnwantedRecommendations(),this._onDidChangeIgnoredRecommendations.fire(),this._register(this.workspaceExtensionsConfigService.onDidChangeExtensionsConfigs(async()=>{this.ignoredWorkspaceRecommendations=await this.workspaceExtensionsConfigService.getUnwantedRecommendations(),this._onDidChangeIgnoredRecommendations.fire()}))}toggleGlobalIgnoredRecommendation(a,r){a=a.toLowerCase(),this._globalIgnoredRecommendations.indexOf(a)!==-1!==r&&(this._globalIgnoredRecommendations=r?[...this._globalIgnoredRecommendations,a]:this._globalIgnoredRecommendations.filter(s=>s!==a),this.storeCachedIgnoredRecommendations(this._globalIgnoredRecommendations),this._onDidChangeGlobalIgnoredRecommendation.fire({extensionId:a,isRecommended:!r}),this._onDidChangeIgnoredRecommendations.fire())}getCachedIgnoredRecommendations(){return JSON.parse(this.ignoredRecommendationsValue).map(r=>r.toLowerCase())}onDidStorageChange(){this.ignoredRecommendationsValue!==this.getStoredIgnoredRecommendationsValue()&&(this._ignoredRecommendationsValue=void 0,this._globalIgnoredRecommendations=this.getCachedIgnoredRecommendations(),this._onDidChangeIgnoredRecommendations.fire())}storeCachedIgnoredRecommendations(a){this.ignoredRecommendationsValue=JSON.stringify(a)}get ignoredRecommendationsValue(){return this._ignoredRecommendationsValue||(this._ignoredRecommendationsValue=this.getStoredIgnoredRecommendationsValue()),this._ignoredRecommendationsValue}set ignoredRecommendationsValue(a){this.ignoredRecommendationsValue!==a&&(this._ignoredRecommendationsValue=a,this.setStoredIgnoredRecommendationsValue(a))}getStoredIgnoredRecommendationsValue(){return this.storageService.get(m,0,"[]")}setStoredIgnoredRecommendationsValue(a){this.storageService.store(m,a,0,0)}};e.ExtensionIgnoredRecommendationsService=S,e.ExtensionIgnoredRecommendationsService=S=fe([O(0,v.IWorkspaceExtensionsConfigService),O(1,T.IStorageService)],S),(0,D.registerSingleton)(f.IExtensionIgnoredRecommendationsService,S,1)}),define(Q[60],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostCustomersRegistry=e.extHostCustomer=e.extHostNamedCustomer=void 0;function t(T){return function(f){D.INSTANCE.registerNamedCustomer(T,f)}}e.extHostNamedCustomer=t;function y(T){D.INSTANCE.registerCustomer(T)}e.extHostCustomer=y;var b;(function(T){function f(){return D.INSTANCE.getNamedCustomers()}T.getNamedCustomers=f;function v(){return D.INSTANCE.getCustomers()}T.getCustomers=v})(b||(e.ExtHostCustomersRegistry=b={}));class D{static{this.INSTANCE=new D}constructor(){this._namedCustomers=[],this._customers=[]}registerNamedCustomer(f,v){const m=[f,v];this._namedCustomers.push(m)}getNamedCustomers(){return this._namedCustomers}registerCustomer(f){this._customers.push(f)}getCustomers(){return this._customers}}}),define(Q[3745],Y([1,0,112,6,55,4]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionDescriptionRegistryLock=e.LockableExtensionDescriptionRegistry=e.basicActivationEventsReader=e.ExtensionDescriptionRegistry=e.DeltaExtensionsResult=void 0;class T{constructor(o){this.removedDueToLooping=o}}e.DeltaExtensionsResult=T;class f{static isHostExtension(o,u,d){if(u.getExtensionDescription(o))return!1;const p=d.getExtensionDescription(o);return p?!!((p.main||p.browser)&&p.api==="none"):!1}constructor(o,u){this._activationEventsReader=o,this._onDidChange=new y.Emitter,this.onDidChange=this._onDidChange.event,this._extensionDescriptions=u,this._initialize()}_initialize(){this._extensionDescriptions.sort(r),this._extensionsMap=new t.ExtensionIdentifierMap,this._extensionsArr=[],this._activationMap=new Map;for(const o of this._extensionDescriptions){if(this._extensionsMap.has(o.identifier)){console.error("Extension `"+o.identifier.value+"` is already registered");continue}this._extensionsMap.set(o.identifier,o),this._extensionsArr.push(o);const u=this._activationEventsReader.readActivationEvents(o);if(Array.isArray(u))for(let d of u)d==="onUri"&&(d=`onUri:${t.ExtensionIdentifier.toKey(o.identifier)}`),this._activationMap.has(d)||this._activationMap.set(d,[]),this._activationMap.get(d).push(o)}}set(o){this._extensionDescriptions=o,this._initialize(),this._onDidChange.fire(void 0)}deltaExtensions(o,u){this._extensionDescriptions=i(this._extensionDescriptions,u),this._extensionDescriptions=this._extensionDescriptions.concat(o);const d=f._findLoopingExtensions(this._extensionDescriptions);return this._extensionDescriptions=i(this._extensionDescriptions,d.map(p=>p.identifier)),this._initialize(),this._onDidChange.fire(void 0),new T(d)}static _findLoopingExtensions(o){const u=new class{constructor(){this._arcs=new Map,this._nodesSet=new Set,this._nodesArr=[]}addNode(n){this._nodesSet.has(n)||(this._nodesSet.add(n),this._nodesArr.push(n))}addArc(n,g){this.addNode(n),this.addNode(g),this._arcs.has(n)?this._arcs.get(n).push(g):this._arcs.set(n,[g])}getArcs(n){return this._arcs.has(n)?this._arcs.get(n):[]}hasOnlyGoodArcs(n,g){const w=u.getArcs(n);for(let E=0;E<w.length;E++)if(!g.has(w[E]))return!1;return!0}getNodes(){return this._nodesArr}},d=new t.ExtensionIdentifierMap;for(const n of o)if(d.set(n.identifier,n),n.extensionDependencies)for(const g of n.extensionDependencies)u.addArc(t.ExtensionIdentifier.toKey(n.identifier),t.ExtensionIdentifier.toKey(g));const p=new Set;u.getNodes().filter(n=>u.getArcs(n).length===0).forEach(n=>p.add(n));const c=u.getNodes().filter(n=>!p.has(n));let l;do{l=!1;for(let n=0;n<c.length;n++){const g=c[n];u.hasOnlyGoodArcs(g,p)&&(c.splice(n,1),n--,p.add(g),l=!0)}}while(l);return c.map(n=>d.get(n))}containsActivationEvent(o){return this._activationMap.has(o)}containsExtension(o){return this._extensionsMap.has(o)}getExtensionDescriptionsForActivationEvent(o){const u=this._activationMap.get(o);return u?u.slice(0):[]}getAllExtensionDescriptions(){return this._extensionsArr.slice(0)}getExtensionDescription(o){const u=this._extensionsMap.get(o);return u||void 0}getExtensionDescriptionByUUID(o){for(const u of this._extensionsArr)if(u.uuid===o)return u}getExtensionDescriptionByIdOrUUID(o,u){return this.getExtensionDescription(o)??(u?this.getExtensionDescriptionByUUID(u):void 0)}}e.ExtensionDescriptionRegistry=f,e.basicActivationEventsReader={readActivationEvents:s=>s.activationEvents};class v{constructor(o){this._lock=new h,this._actual=new f(o,[])}async acquireLock(o){const u=await this._lock.acquire(o);return new m(this,u)}deltaExtensions(o,u,d){if(!o.isAcquiredFor(this))throw new Error("Lock is not held");return this._actual.deltaExtensions(u,d)}containsActivationEvent(o){return this._actual.containsActivationEvent(o)}containsExtension(o){return this._actual.containsExtension(o)}getExtensionDescriptionsForActivationEvent(o){return this._actual.getExtensionDescriptionsForActivationEvent(o)}getAllExtensionDescriptions(){return this._actual.getAllExtensionDescriptions()}getExtensionDescription(o){return this._actual.getExtensionDescription(o)}getExtensionDescriptionByUUID(o){return this._actual.getExtensionDescriptionByUUID(o)}getExtensionDescriptionByIdOrUUID(o,u){return this._actual.getExtensionDescriptionByIdOrUUID(o,u)}}e.LockableExtensionDescriptionRegistry=v;class m extends D.Disposable{constructor(o,u){super(),this._registry=o,this._isDisposed=!1,this._register(u)}isAcquiredFor(o){return!this._isDisposed&&this._registry===o}}e.ExtensionDescriptionRegistryLock=m;class S{constructor(o){this.name=o,this.promise=new Promise((u,d)=>{this._resolve=u})}resolve(o){this._resolve(o)}}class h{constructor(){this._pendingCustomers=[],this._isLocked=!1}async acquire(o){const u=new S(o);return this._pendingCustomers.push(u),this._advance(),u.promise}_advance(){if(this._isLocked||this._pendingCustomers.length===0)return;const o=this._pendingCustomers.shift();this._isLocked=!0;let u=!0;const d=setTimeout(()=>{u&&console.warn(`The customer named ${o.name} has been holding on to the lock for 30s. This might be a problem.`)},30*1e3),p=()=>{u&&(clearTimeout(d),u=!1,this._isLocked=!1,this._advance())};o.resolve((0,D.toDisposable)(p))}}var a;(function(s){s[s.Builtin=0]="Builtin",s[s.User=1]="User",s[s.Dev=2]="Dev"})(a||(a={}));function r(s,o){const u=s.isBuiltin?0:s.isUnderDevelopment?2:1,d=o.isBuiltin?0:o.isUnderDevelopment?2:1;if(u!==d)return u-d;const p=b.posix.basename(s.extensionLocation.path),c=b.posix.basename(o.extensionLocation.path);return p<c?-1:p>c?1:0}function i(s,o){const u=new t.ExtensionIdentifierSet(o);return s.filter(d=>!u.has(d.identifier))}}),define(Q[536],Y([1,0,22]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseExtensionDevOptions=void 0;function y(b){const D=b.isExtensionDevelopment;let T=!0;const f=b.extensionDevelopmentLocationURI;if(f)for(const h of f)h.scheme!==t.Schemas.file&&(T=!1);const v=T&&typeof b.debugExtensionHost.port=="number",m=T&&!!b.debugExtensionHost.break,S=D&&!!b.extensionTestsLocationURI&&!b.debugExtensionHost.debugId;return{isExtensionDevHost:D,isExtensionDevDebug:v,isExtensionDevDebugBrk:m,isExtensionDevTestFromCli:S}}e.parseExtensionDevOptions=y}),define(Q[3746],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readExtHostConnection=e.writeExtHostConnection=e.MessagePortExtHostConnection=e.SocketExtHostConnection=e.IPCExtHostConnection=e.ExtHostConnectionType=void 0;var t;(function(S){S[S.IPC=1]="IPC",S[S.Socket=2]="Socket",S[S.MessagePort=3]="MessagePort"})(t||(e.ExtHostConnectionType=t={}));class y{static{this.ENV_KEY="VSCODE_EXTHOST_IPC_HOOK"}constructor(h){this.pipeName=h,this.type=1}serialize(h){h[y.ENV_KEY]=this.pipeName}}e.IPCExtHostConnection=y;class b{constructor(){this.type=2}static{this.ENV_KEY="VSCODE_EXTHOST_WILL_SEND_SOCKET"}serialize(h){h[b.ENV_KEY]="1"}}e.SocketExtHostConnection=b;class D{constructor(){this.type=3}static{this.ENV_KEY="VSCODE_WILL_SEND_MESSAGE_PORT"}serialize(h){h[D.ENV_KEY]="1"}}e.MessagePortExtHostConnection=D;function T(S){delete S[y.ENV_KEY],delete S[b.ENV_KEY],delete S[D.ENV_KEY]}function f(S,h){T(h),S.serialize(h)}e.writeExtHostConnection=f;function v(S){if(S[y.ENV_KEY])return m(S,new y(S[y.ENV_KEY]));if(S[b.ENV_KEY])return m(S,new b);if(S[D.ENV_KEY])return m(S,new D);throw new Error("No connection information defined in environment!")}e.readExtHostConnection=v;function m(S,h){return T(S),h}}),define(Q[745],Y([1,0,112]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.determineExtensionHostKinds=e.extensionRunningPreferenceToString=e.ExtensionRunningPreference=e.extensionHostKindToString=e.ExtensionHostKind=void 0;var y;(function(h){h[h.LocalProcess=1]="LocalProcess",h[h.LocalWebWorker=2]="LocalWebWorker",h[h.Remote=3]="Remote"})(y||(e.ExtensionHostKind=y={}));function b(h){if(h===null)return"None";switch(h){case 1:return"LocalProcess";case 2:return"LocalWebWorker";case 3:return"Remote"}}e.extensionHostKindToString=b;var D;(function(h){h[h.None=0]="None",h[h.Local=1]="Local",h[h.Remote=2]="Remote"})(D||(e.ExtensionRunningPreference=D={}));function T(h){switch(h){case 0:return"None";case 1:return"Local";case 2:return"Remote"}}e.extensionRunningPreferenceToString=T;function f(h,a,r,i){const s=v(h,r),o=v(a,r),u=new Map,d=c=>{if(u.has(c.key))return;const l=s.get(c.key)||null,n=o.get(c.key)||null,g=new S(l,n);u.set(g.key,g)};s.forEach(c=>d(c)),o.forEach(c=>d(c));const p=new Map;return u.forEach(c=>{const l=!!c.local,n=!!c.remote,g=!!(c.local&&c.local.isUnderDevelopment),w=!!(c.remote&&c.remote.isUnderDevelopment);let E=0;g&&!w?E=1:w&&!g&&(E=2),p.set(c.key,i(c.identifier,c.kind,l,n,E))}),p}e.determineExtensionHostKinds=f;function v(h,a){const r=new Map;return h.forEach(i=>{const s=new m(i,a(i));r.set(s.key,s)}),r}class m{constructor(a,r){this.desc=a,this.kind=r}get key(){return t.ExtensionIdentifier.toKey(this.desc.identifier)}get isUnderDevelopment(){return this.desc.isUnderDevelopment}}class S{constructor(a,r){this.local=a,this.remote=r}get key(){return this.local?this.local.key:this.remote.key}get identifier(){return this.local?this.local.desc.identifier:this.remote.desc.identifier}get kind(){return this.local?this.local.kind:this.remote.kind}}}),define(Q[957],Y([1,0,62]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeLogMarkers=e.isMessageOfType=e.createMessageOfType=e.MessageType=e.ExtensionHostExitCode=e.UIKind=void 0;var y;(function(m){m[m.Desktop=1]="Desktop",m[m.Web=2]="Web"})(y||(e.UIKind=y={}));var b;(function(m){m[m.VersionMismatch=55]="VersionMismatch",m[m.UnexpectedError=81]="UnexpectedError"})(b||(e.ExtensionHostExitCode=b={}));var D;(function(m){m[m.Initialized=0]="Initialized",m[m.Ready=1]="Ready",m[m.Terminate=2]="Terminate"})(D||(e.MessageType=D={}));function T(m){const S=t.VSBuffer.alloc(1);switch(m){case 0:S.writeUInt8(1,0);break;case 1:S.writeUInt8(2,0);break;case 2:S.writeUInt8(3,0);break}return S}e.createMessageOfType=T;function f(m,S){if(m.byteLength!==1)return!1;switch(m.readUInt8(0)){case 1:return S===0;case 2:return S===1;case 3:return S===2;default:return!1}}e.isMessageOfType=f;var v;(function(m){m.Start="START_NATIVE_LOG",m.End="END_NATIVE_LOG"})(v||(e.NativeLogMarkers=v={}))}),define(Q[958],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteRunningLocation=e.LocalWebWorkerRunningLocation=e.LocalProcessRunningLocation=void 0;class t{constructor(T){this.affinity=T,this.kind=1}equals(T){return this.kind===T.kind&&this.affinity===T.affinity}asString(){return this.affinity===0?"LocalProcess":`LocalProcess${this.affinity}`}}e.LocalProcessRunningLocation=t;class y{constructor(T){this.affinity=T,this.kind=2}equals(T){return this.kind===T.kind&&this.affinity===T.affinity}asString(){return this.affinity===0?"LocalWebWorker":`LocalWebWorker${this.affinity}`}}e.LocalWebWorkerRunningLocation=y;class b{constructor(){this.kind=3,this.affinity=0}equals(T){return this.kind===T.kind}asString(){return"Remote"}}e.RemoteRunningLocation=b}),define(Q[3747],Y([1,0,15,91,519,25,11,24,64,116,39]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.migrateExtensionStorage=void 0;async function h(a,r,i,s){return s.invokeFunction(async o=>{const u=o.get(y.IEnvironmentService),d=o.get(m.IUserDataProfilesService),p=o.get(b.IExtensionStorageService),c=o.get(f.IStorageService),l=o.get(v.IUriIdentityService),n=o.get(D.IFileService),g=o.get(S.IWorkspaceContextService),w=o.get(T.ILogService),E=`extensionStorage.migrate.${a}-${r}`,C=a.toLowerCase()===r.toLowerCase()?`extension.storage.migrateFromLowerCaseKey.${a.toLowerCase()}`:void 0;if(a===r)return;const I=(A,k)=>k?l.extUri.joinPath(d.defaultProfile.globalStorageHome,A.toLowerCase()):l.extUri.joinPath(u.workspaceStorageHome,g.getWorkspace().id,A),_=i?0:1;if(!c.getBoolean(E,_,!1)&&!(C&&c.getBoolean(C,_,!1))){w.info(`Migrating ${i?"global":"workspace"} extension storage from ${a} to ${r}...`);const A=p.getExtensionState(a,i);A&&(p.setExtensionState(r,A,i),p.setExtensionState(a,void 0,i));const k=I(a,i),L=I(r,i);if(!l.extUri.isEqual(k,L))try{await n.move(k,L,!0)}catch(R){R.code!==D.FileSystemProviderErrorCode.FileNotFound&&w.info(`Error while migrating ${i?"global":"workspace"} file storage from '${a}' to '${r}'`,(0,t.getErrorMessage)(R))}w.info(`Migrated ${i?"global":"workspace"} extension storage from ${a} to ${r}`),c.store(E,!0,_,1)}})}e.migrateExtensionStorage=h}),define(Q[44],Y([1,0,6,10,115,881,112,5]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullExtensionService=e.toExtensionDescription=e.toExtension=e.ActivationKind=e.ExtensionPointContribution=e.ActivationTimes=e.checkProposedApiEnabled=e.isProposedApiEnabled=e.ExtensionHostExtensions=e.ExtensionHostStartup=e.MissingExtensionDependency=e.IExtensionService=e.webWorkerExtHostConfig=e.nullExtensionDescription=void 0,e.nullExtensionDescription=Object.freeze({identifier:new T.ExtensionIdentifier("nullExtensionDescription"),name:"Null Extension Description",version:"0.0.0",publisher:"vscode",engines:{vscode:""},extensionLocation:y.URI.parse("void:location"),isBuiltin:!1,targetPlatform:"undefined",isUserBuiltin:!1,isUnderDevelopment:!1}),e.webWorkerExtHostConfig="extensions.webWorker",e.IExtensionService=(0,f.createDecorator)("extensionService");class v{constructor(l){this.dependency=l}}e.MissingExtensionDependency=v;var m;(function(c){c[c.EagerAutoStart=1]="EagerAutoStart",c[c.EagerManualStart=2]="EagerManualStart",c[c.Lazy=3]="Lazy"})(m||(e.ExtensionHostStartup=m={}));class S{constructor(){this._allExtensions=[],this._myExtensions=[]}toDelta(){return{toRemove:[],toAdd:this._allExtensions,addActivationEvents:D.ImplicitActivationEvents.createActivationEventsMap(this._allExtensions),myToRemove:[],myToAdd:this._myExtensions}}set(l,n){const g=[],w=[],E=[],C=[],I=h(this._allExtensions),_=h(l),A=(N,P)=>N.extensionLocation.toString()===P.extensionLocation.toString()||N.isBuiltin===P.isBuiltin||N.isUserBuiltin===P.isUserBuiltin||N.isUnderDevelopment===P.isUnderDevelopment;for(const N of this._allExtensions){const P=_.get(N.identifier);if(!P){g.push(N.identifier),I.delete(N.identifier);continue}if(!A(N,P)){g.push(N.identifier),I.delete(N.identifier);continue}}for(const N of l){const P=I.get(N.identifier);if(!P){w.push(N);continue}if(!A(P,N)){g.push(P.identifier),I.delete(P.identifier);continue}}const k=new T.ExtensionIdentifierSet(this._myExtensions),L=new T.ExtensionIdentifierSet(n);for(const N of this._myExtensions)L.has(N)||E.push(N);for(const N of n)k.has(N)||C.push(N);const R=D.ImplicitActivationEvents.createActivationEventsMap(w),M={toRemove:g,toAdd:w,addActivationEvents:R,myToRemove:E,myToAdd:C};return this.delta(M),M}delta(l){const{toRemove:n,toAdd:g,myToRemove:w,myToAdd:E}=l,C=new T.ExtensionIdentifierSet(n),I=new T.ExtensionIdentifierSet(w);for(let _=0;_<this._allExtensions.length;_++)C.has(this._allExtensions[_].identifier)&&(this._allExtensions.splice(_,1),_--);for(let _=0;_<this._myExtensions.length;_++)I.has(this._myExtensions[_])&&(this._myExtensions.splice(_,1),_--);for(const _ of g)this._allExtensions.push(_);for(const _ of E)this._myExtensions.push(_)}containsExtension(l){for(const n of this._myExtensions)if(T.ExtensionIdentifier.equals(n,l))return!0;return!1}}e.ExtensionHostExtensions=S;function h(c){const l=new T.ExtensionIdentifierMap;for(const n of c)l.set(n.identifier,n);return l}function a(c,l){return c.enabledApiProposals?c.enabledApiProposals.includes(l):!1}e.isProposedApiEnabled=a;function r(c,l){if(!a(c,l))throw new Error(`Extension '${c.identifier.value}' CANNOT use API proposal: ${l}. Its package.json#enabledApiProposals-property declares: ${c.enabledApiProposals?.join(", ")??"[]"} but NOT ${l}. The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ${c.identifier.value}`)}e.checkProposedApiEnabled=r;class i{constructor(l,n,g,w){this.codeLoadingTime=l,this.activateCallTime=n,this.activateResolvedTime=g,this.activationReason=w}}e.ActivationTimes=i;class s{constructor(l,n){this.description=l,this.value=n}}e.ExtensionPointContribution=s;var o;(function(c){c[c.Normal=0]="Normal",c[c.Immediate=1]="Immediate"})(o||(e.ActivationKind=o={}));function u(c){return{type:c.isBuiltin?0:1,isBuiltin:c.isBuiltin||c.isUserBuiltin,identifier:{id:(0,b.getGalleryExtensionId)(c.publisher,c.name),uuid:c.uuid},manifest:c,location:c.extensionLocation,targetPlatform:c.targetPlatform,validations:[],isValid:!0}}e.toExtension=u;function d(c,l){return{identifier:new T.ExtensionIdentifier((0,b.getExtensionId)(c.manifest.publisher,c.manifest.name)),isBuiltin:c.type===0,isUserBuiltin:c.type===1&&c.isBuiltin,isUnderDevelopment:!!l,extensionLocation:c.location,...c.manifest,uuid:c.identifier.uuid,targetPlatform:c.targetPlatform}}e.toExtensionDescription=d;class p{constructor(){this.onDidRegisterExtensions=t.Event.None,this.onDidChangeExtensionsStatus=t.Event.None,this.onDidChangeExtensions=t.Event.None,this.onWillActivateByEvent=t.Event.None,this.onDidChangeResponsiveChange=t.Event.None,this.onWillStop=t.Event.None,this.extensions=[]}activateByEvent(l){return Promise.resolve(void 0)}activationEventIsDone(l){return!1}whenInstalledExtensionsRegistered(){return Promise.resolve(!0)}getExtension(){return Promise.resolve(void 0)}readExtensionPointContributions(l){return Promise.resolve(Object.create(null))}getExtensionsStatus(){return Object.create(null)}getInspectPorts(l,n){return Promise.resolve([])}stopExtensionHosts(){}async startExtensionHosts(){}async setRemoteEnvironment(l){}canAddExtension(){return!1}canRemoveExtension(){return!1}}e.NullExtensionService=p}),define(Q[3748],Y([1,0,363,58,4,28,9,11,44]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServerContextualizationService=void 0;let m=class extends b.Disposable{constructor(h,a,r,i,s){super(),this._connectionManagementService=h,this._configurationService=a,this._extensionService=r,this._commandService=i,this._logService=s,this._providers=new Map}registerProvider(h,a){if(this._providers.has(h))throw new Error(`A server contextualization provider with ID "${h}" is already registered`);this._providers.set(h,a)}unregisterProvider(h){this._providers.delete(h)}getProvider(h){const a=this._providers.get(h);if(a)return this._logService.info(`Found server contextualization provider for ${h}`),a;throw this._logService.info(`No server contextualization provider found for ${h}`),(0,t.invalidProvider)(h)}async contextualizeUriForCopilot(h){if(!await this.isContextualizationNeeded()){this._logService.info("Contextualization is not needed because the GitHub Copilot extension is not installed and/or contextualization is disabled.");return}const r=await this.getServerContextualization(h);r.context?(this._logService.info(`Server contextualization was retrieved for the URI (${h}) connection, so sending that to Copilot for context.`),await this.sendServerContextualizationToCopilot(r.context)):this._logService.warn(`Server contextualization was not generated for the URI (${h}) connection, so no context will be sent to Copilot.`)}async getServerContextualization(h){const a=this._connectionManagementService.getProviderIdFromUri(h),r=this.getProvider(a);return r?(this._logService.info(`Getting server contextualization for ${h}`),await r.getServerContextualization(h)):(this._logService.info(`No server contextualization provider found for ${h}`),Promise.resolve({context:void 0}))}async sendServerContextualizationToCopilot(h){h&&(this._logService.info("Sending server contextualization to Copilot"),await this._commandService.executeCommand("github.copilot.provideContext","**/*.sql",{value:h}))}async isContextualizationNeeded(){const h=await this._extensionService.getExtension("github.copilot");h||this._logService.info("GitHub Copilot extension is not installed, so contextualization is not needed.");const a=this._configurationService.getValue("queryEditor").githubCopilotContextualizationEnabled;return a||this._logService.info("GitHub Copilot contextualization is disabled, so contextualization is not needed."),h&&a}};e.ServerContextualizationService=m,e.ServerContextualizationService=m=fe([O(0,y.IConnectionManagementService),O(1,T.IConfigurationService),O(2,v.IExtensionService),O(3,D.ICommandService),O(4,f.ILogService)],m)}),define(Q[3749],Y([1,0,2198,107,43,44,6]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionPlanService=void 0;let f=class{constructor(m,S,h){this._capabilitiesService=m,this._quickInputService=S,this._extensionService=h,this._providers=Object.create(null),this._onProviderRegister=new T.Emitter,this._providerRegisterEvent=this._onProviderRegister.event}async ensureFileExtensionHandlerRegistered(m){for(let h of Object.keys(this._capabilitiesService.providers))if(this._capabilitiesService.providers[h].connection?.supportedExecutionPlanFileExtensions?.includes(m))return;let S;await new Promise((h,a)=>{S=this._capabilitiesService.onCapabilitiesRegistered(r=>{r.features.connection?.supportedExecutionPlanFileExtensions?.includes(m)&&(S.dispose(),h())}),setTimeout(()=>{S.dispose(),a(new Error((0,t.localize)(0,null,m)))},3e4)})}async ensureCapabilitiesRegistered(m){let S;this._capabilitiesService.providers[m]||await new Promise((h,a)=>{S=this._capabilitiesService.onCapabilitiesRegistered(r=>{r.id===m&&(S.dispose(),h())}),setTimeout(()=>{S.dispose(),a(new Error((0,t.localize)(1,null,m)))},3e4)})}async getExecutionPlanProvider(m){await this.ensureCapabilitiesRegistered(m);let S=this._providers[m];return S||(await this._extensionService.whenInstalledExtensionsRegistered(),S=this._providers[m],S||(S=await new Promise((h,a)=>{this._providerRegisterEvent(r=>{r.id===m&&h(r.provider)}),setTimeout(()=>{h(this._providers[m])},3e4)})),S)}async _runAction(m,S){await this.ensureFileExtensionHandlerRegistered(m);let h=Object.keys(this._capabilitiesService.providers),a=[];for(let s=0;s<h.length;s++)this._capabilitiesService.getCapabilities(h[s]).connection.supportedExecutionPlanFileExtensions?.includes(m)&&a.push(h[s]);let r;if(a.length>1){const s=this._quickInputService.createQuickPick();s.items=a.map(o=>({label:o,ariaLabel:o})),s.placeholder=(0,t.localize)(2,null),r=await new Promise(o=>{s.onDidChangeSelection(u=>{s.hide(),o(u[0].label)}),s.show()})}else r=a[0];if(!r)return Promise.reject(new Error((0,t.localize)(3,null)));const i=await this.getExecutionPlanProvider(r);return i?Promise.resolve(S(i)):Promise.reject(new Error((0,t.localize)(4,null)))}registerProvider(m,S){if(this._providers[m])throw new Error(`A execution plan provider with id "${m}" is already registered`);this._providers[m]=S,this._onProviderRegister.fire({id:m,provider:S})}getExecutionPlan(m){return this._runAction(m.graphFileType,S=>S.getExecutionPlan(m))}compareExecutionPlanGraph(m,S){return this._runAction(m.graphFileType,h=>h.compareExecutionPlanGraph(m,S))}async isExecutionPlan(m,S){const h=await this.getExecutionPlanProvider(m);return h?await h.isExecutionPlan(S):{isExecutionPlan:!1,queryExecutionPlanFileExtension:""}}getSupportedExecutionPlanExtensionsForProvider(m){return this._capabilitiesService.getCapabilities(m).connection.supportedExecutionPlanFileExtensions}getSupportedExecutionPlanExtensions(m){if(m)return this._capabilitiesService.getCapabilities(m).connection.supportedExecutionPlanFileExtensions;{const S=new Set;return Object.keys(this._capabilitiesService.providers).forEach(h=>{const a=this._capabilitiesService.getCapabilities(h).connection.supportedExecutionPlanFileExtensions;a&&a.forEach(r=>{S.add(r)})}),[...S]}}};e.ExecutionPlanService=f,e.ExecutionPlanService=f=fe([O(0,y.ICapabilitiesService),O(1,b.IQuickInputService),O(2,D.IExtensionService)],f)}),define(Q[3750],Y([1,0,2642,161,17,394,125,50,219,16,44,569,412,122,4]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageConfigurationFileHandler=void 0;function s(l){if(!Array.isArray(l))return!1;for(let n=0,g=l.length;n<g;n++)if(typeof l[n]!="string")return!1;return!0}function o(l){return s(l)&&l.length===2}let u=class extends i.Disposable{constructor(n,g,w,E){super(),this._languageService=n,this._extensionResourceLoaderService=g,this._extensionService=w,this._languageConfigurationService=E,this._done=new Map,this._register(this._languageService.onDidRequestBasicLanguageFeatures(async C=>{this._extensionService.whenInstalledExtensionsRegistered().then(()=>{this._loadConfigurationsForMode(C)})})),this._register(this._languageService.onDidChange(()=>{for(const[C]of this._done)this._loadConfigurationsForMode(C)}))}async _loadConfigurationsForMode(n){const g=this._languageService.getConfigurationFiles(n),w=(0,r.hash)(g.map(C=>C.toString()));if(this._done.get(n)===w)return;this._done.set(n,w);const E=await Promise.all(g.map(C=>this._readConfigFile(C)));for(const C of E)this._handleConfig(n,C)}async _readConfigFile(n){try{const g=await this._extensionResourceLoaderService.readExtensionResource(n),w=[];let E=(0,y.parse)(g,w);return w.length&&console.error(t.localize(0,null,n.toString(),w.map(C=>`[${C.offset}, ${C.length}] ${(0,h.getParseErrorMessage)(C.error)}`).join(` `))),(0,y.getNodeType)(E)!=="object"&&(console.error(t.localize(1,null,n.toString())),E={}),E}catch(g){return console.error(g),{}}}_extractValidCommentRule(n,g){const w=g.comments;if(typeof w>"u")return;if(!b.isObject(w)){console.warn(`[${n}]: language configuration: expected \`comments\` to be an object.`);return}let E;return typeof w.lineComment<"u"&&(typeof w.lineComment!="string"?console.warn(`[${n}]: language configuration: expected \`comments.lineComment\` to be a string.`):(E=E||{},E.lineComment=w.lineComment)),typeof w.blockComment<"u"&&(o(w.blockComment)?(E=E||{},E.blockComment=w.blockComment):console.warn(`[${n}]: language configuration: expected \`comments.blockComment\` to be an array of two strings.`)),E}_extractValidBrackets(n,g){const w=g.brackets;if(typeof w>"u")return;if(!Array.isArray(w)){console.warn(`[${n}]: language configuration: expected \`brackets\` to be an array.`);return}let E;for(let C=0,I=w.length;C<I;C++){const _=w[C];if(!o(_)){console.warn(`[${n}]: language configuration: expected \`brackets[${C}]\` to be an array of two strings.`);continue}E=E||[],E.push(_)}return E}_extractValidAutoClosingPairs(n,g){const w=g.autoClosingPairs;if(typeof w>"u")return;if(!Array.isArray(w)){console.warn(`[${n}]: language configuration: expected \`autoClosingPairs\` to be an array.`);return}let E;for(let C=0,I=w.length;C<I;C++){const _=w[C];if(Array.isArray(_)){if(!o(_)){console.warn(`[${n}]: language configuration: expected \`autoClosingPairs[${C}]\` to be an array of two strings or an object.`);continue}E=E||[],E.push({open:_[0],close:_[1]})}else{if(!b.isObject(_)){console.warn(`[${n}]: language configuration: expected \`autoClosingPairs[${C}]\` to be an array of two strings or an object.`);continue}if(typeof _.open!="string"){console.warn(`[${n}]: language configuration: expected \`autoClosingPairs[${C}].open\` to be a string.`);continue}if(typeof _.close!="string"){console.warn(`[${n}]: language configuration: expected \`autoClosingPairs[${C}].close\` to be a string.`);continue}if(typeof _.notIn<"u"&&!s(_.notIn)){console.warn(`[${n}]: language configuration: expected \`autoClosingPairs[${C}].notIn\` to be a string array.`);continue}E=E||[],E.push({open:_.open,close:_.close,notIn:_.notIn})}}return E}_extractValidSurroundingPairs(n,g){const w=g.surroundingPairs;if(typeof w>"u")return;if(!Array.isArray(w)){console.warn(`[${n}]: language configuration: expected \`surroundingPairs\` to be an array.`);return}let E;for(let C=0,I=w.length;C<I;C++){const _=w[C];if(Array.isArray(_)){if(!o(_)){console.warn(`[${n}]: language configuration: expected \`surroundingPairs[${C}]\` to be an array of two strings or an object.`);continue}E=E||[],E.push({open:_[0],close:_[1]})}else{if(!b.isObject(_)){console.warn(`[${n}]: language configuration: expected \`surroundingPairs[${C}]\` to be an array of two strings or an object.`);continue}if(typeof _.open!="string"){console.warn(`[${n}]: language configuration: expected \`surroundingPairs[${C}].open\` to be a string.`);continue}if(typeof _.close!="string"){console.warn(`[${n}]: language configuration: expected \`surroundingPairs[${C}].close\` to be a string.`);continue}E=E||[],E.push({open:_.open,close:_.close})}}return E}_extractValidColorizedBracketPairs(n,g){const w=g.colorizedBracketPairs;if(typeof w>"u")return;if(!Array.isArray(w)){console.warn(`[${n}]: language configuration: expected \`colorizedBracketPairs\` to be an array.`);return}const E=[];for(let C=0,I=w.length;C<I;C++){const _=w[C];if(!o(_)){console.warn(`[${n}]: language configuration: expected \`colorizedBracketPairs[${C}]\` to be an array of two strings.`);continue}E.push([_[0],_[1]])}return E}_extractValidOnEnterRules(n,g){const w=g.onEnterRules;if(typeof w>"u")return;if(!Array.isArray(w)){console.warn(`[${n}]: language configuration: expected \`onEnterRules\` to be an array.`);return}let E;for(let C=0,I=w.length;C<I;C++){const _=w[C];if(!b.isObject(_)){console.warn(`[${n}]: language configuration: expected \`onEnterRules[${C}]\` to be an object.`);continue}if(!b.isObject(_.action)){console.warn(`[${n}]: language configuration: expected \`onEnterRules[${C}].action\` to be an object.`);continue}let A;if(_.action.indent==="none")A=D.IndentAction.None;else if(_.action.indent==="indent")A=D.IndentAction.Indent;else if(_.action.indent==="indentOutdent")A=D.IndentAction.IndentOutdent;else if(_.action.indent==="outdent")A=D.IndentAction.Outdent;else{console.warn(`[${n}]: language configuration: expected \`onEnterRules[${C}].action.indent\` to be 'none', 'indent', 'indentOutdent' or 'outdent'.`);continue}const k={indentAction:A};_.action.appendText&&(typeof _.action.appendText=="string"?k.appendText=_.action.appendText:console.warn(`[${n}]: language configuration: expected \`onEnterRules[${C}].action.appendText\` to be undefined or a string.`)),_.action.removeText&&(typeof _.action.removeText=="number"?k.removeText=_.action.removeText:console.warn(`[${n}]: language configuration: expected \`onEnterRules[${C}].action.removeText\` to be undefined or a number.`));const L=this._parseRegex(n,`onEnterRules[${C}].beforeText`,_.beforeText);if(!L)continue;const R={beforeText:L,action:k};if(_.afterText){const M=this._parseRegex(n,`onEnterRules[${C}].afterText`,_.afterText);M&&(R.afterText=M)}if(_.previousLineText){const M=this._parseRegex(n,`onEnterRules[${C}].previousLineText`,_.previousLineText);M&&(R.previousLineText=M)}E=E||[],E.push(R)}return E}_handleConfig(n,g){const w=this._extractValidCommentRule(n,g),E=this._extractValidBrackets(n,g),C=this._extractValidAutoClosingPairs(n,g),I=this._extractValidSurroundingPairs(n,g),_=this._extractValidColorizedBracketPairs(n,g),A=typeof g.autoCloseBefore=="string"?g.autoCloseBefore:void 0,k=g.wordPattern?this._parseRegex(n,"wordPattern",g.wordPattern):void 0,L=g.indentationRules?this._mapIndentationRules(n,g.indentationRules):void 0;let R;if(g.folding){const P=g.folding.markers,x=P&&P.start?this._parseRegex(n,"folding.markers.start",P.start):void 0,F=P&&P.end?this._parseRegex(n,"folding.markers.end",P.end):void 0,V=x&&F?{start:x,end:F}:void 0;R={offSide:g.folding.offSide,markers:V}}const M=this._extractValidOnEnterRules(n,g),N={comments:w,brackets:E,wordPattern:k,indentationRules:L,onEnterRules:M,autoClosingPairs:C,surroundingPairs:I,colorizedBracketPairs:_,autoCloseBefore:A,folding:R,__electricCharacterSupport:void 0};this._languageConfigurationService.register(n,N,50)}_parseRegex(n,g,w){if(typeof w=="string")try{return new RegExp(w,"")}catch(E){console.warn(`[${n}]: Invalid regular expression in \`${g}\`: `,E);return}if(b.isObject(w)){if(typeof w.pattern!="string"){console.warn(`[${n}]: language configuration: expected \`${g}.pattern\` to be a string.`);return}if(typeof w.flags<"u"&&typeof w.flags!="string"){console.warn(`[${n}]: language configuration: expected \`${g}.flags\` to be a string.`);return}try{return new RegExp(w.pattern,w.flags)}catch(E){console.warn(`[${n}]: Invalid regular expression in \`${g}\`: `,E);return}}console.warn(`[${n}]: language configuration: expected \`${g}\` to be a string or an object.`)}_mapIndentationRules(n,g){const w=this._parseRegex(n,"indentationRules.increaseIndentPattern",g.increaseIndentPattern);if(!w)return;const E=this._parseRegex(n,"indentationRules.decreaseIndentPattern",g.decreaseIndentPattern);if(!E)return;const C={increaseIndentPattern:w,decreaseIndentPattern:E};return g.indentNextLinePattern&&(C.indentNextLinePattern=this._parseRegex(n,"indentationRules.indentNextLinePattern",g.indentNextLinePattern)),g.unIndentedLinePattern&&(C.unIndentedLinePattern=this._parseRegex(n,"indentationRules.unIndentedLinePattern",g.unIndentedLinePattern)),C}};e.LanguageConfigurationFileHandler=u,e.LanguageConfigurationFileHandler=u=fe([O(0,f.ILanguageService),O(1,a.IExtensionResourceLoaderService),O(2,S.IExtensionService),O(3,T.ILanguageConfigurationService)],u);const d="vscode://schemas/language-configuration",p={allowComments:!0,allowTrailingCommas:!0,default:{comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["(",")"],["[","]"],["{","}"]],autoClosingPairs:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[["(",")"],["[","]"],["{","}"]]},definitions:{openBracket:{type:"string",description:t.localize(2,null)},closeBracket:{type:"string",description:t.localize(3,null)},bracketPair:{type:"array",items:[{$ref:"#/definitions/openBracket"},{$ref:"#/definitions/closeBracket"}]}},properties:{comments:{default:{blockComment:["/*","*/"],lineComment:"//"},description:t.localize(4,null),type:"object",properties:{blockComment:{type:"array",description:t.localize(5,null),items:[{type:"string",description:t.localize(6,null)},{type:"string",description:t.localize(7,null)}]},lineComment:{type:"string",description:t.localize(8,null)}}},brackets:{default:[["(",")"],["[","]"],["{","}"]],markdownDescription:t.localize(9,null,"`colorizedBracketPairs`"),type:"array",items:{$ref:"#/definitions/bracketPair"}},colorizedBracketPairs:{default:[["(",")"],["[","]"],["{","}"]],markdownDescription:t.localize(10,null,"`brackets`"),type:"array",items:{$ref:"#/definitions/bracketPair"}},autoClosingPairs:{default:[["(",")"],["[","]"],["{","}"]],description:t.localize(11,null),type:"array",items:{oneOf:[{$ref:"#/definitions/bracketPair"},{type:"object",properties:{open:{$ref:"#/definitions/openBracket"},close:{$ref:"#/definitions/closeBracket"},notIn:{type:"array",description:t.localize(12,null),items:{enum:["string","comment"]}}}}]}},autoCloseBefore:{default:`;:.,=}])> `,description:t.localize(13,null),type:"string"},surroundingPairs:{default:[["(",")"],["[","]"],["{","}"]],description:t.localize(14,null),type:"array",items:{oneOf:[{$ref:"#/definitions/bracketPair"},{type:"object",properties:{open:{$ref:"#/definitions/openBracket"},close:{$ref:"#/definitions/closeBracket"}}}]}},wordPattern:{default:"",description:t.localize(15,null),type:["string","object"],properties:{pattern:{type:"string",description:t.localize(16,null),default:""},flags:{type:"string",description:t.localize(17,null),default:"g",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(18,null)}}},indentationRules:{default:{increaseIndentPattern:"",decreaseIndentPattern:""},description:t.localize(19,null),type:"object",properties:{increaseIndentPattern:{type:["string","object"],description:t.localize(20,null),properties:{pattern:{type:"string",description:t.localize(21,null),default:""},flags:{type:"string",description:t.localize(22,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(23,null)}}},decreaseIndentPattern:{type:["string","object"],description:t.localize(24,null),properties:{pattern:{type:"string",description:t.localize(25,null),default:""},flags:{type:"string",description:t.localize(26,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(27,null)}}},indentNextLinePattern:{type:["string","object"],description:t.localize(28,null),properties:{pattern:{type:"string",description:t.localize(29,null),default:""},flags:{type:"string",description:t.localize(30,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(31,null)}}},unIndentedLinePattern:{type:["string","object"],description:t.localize(32,null),properties:{pattern:{type:"string",description:t.localize(33,null),default:""},flags:{type:"string",description:t.localize(34,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(35,null)}}}}},folding:{type:"object",description:t.localize(36,null),properties:{offSide:{type:"boolean",description:t.localize(37,null)},markers:{type:"object",description:t.localize(38,null),properties:{start:{type:"string",description:t.localize(39,null)},end:{type:"string",description:t.localize(40,null)}}}}},onEnterRules:{type:"array",description:t.localize(41,null),items:{type:"object",description:t.localize(42,null),required:["beforeText","action"],properties:{beforeText:{type:["string","object"],description:t.localize(43,null),properties:{pattern:{type:"string",description:t.localize(44,null),default:""},flags:{type:"string",description:t.localize(45,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(46,null)}}},afterText:{type:["string","object"],description:t.localize(47,null),properties:{pattern:{type:"string",description:t.localize(48,null),default:""},flags:{type:"string",description:t.localize(49,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(50,null)}}},previousLineText:{type:["string","object"],description:t.localize(51,null),properties:{pattern:{type:"string",description:t.localize(52,null),default:""},flags:{type:"string",description:t.localize(53,null),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:t.localize(54,null)}}},action:{type:["string","object"],description:t.localize(55,null),required:["indent"],default:{indent:"indent"},properties:{indent:{type:"string",description:t.localize(56,null),default:"indent",enum:["none","indent","indentOutdent","outdent"],markdownEnumDescriptions:[t.localize(57,null),t.localize(58,null),t.localize(59,null),t.localize(60,null)]},appendText:{type:"string",description:t.localize(61,null),default:""},removeText:{type:"number",description:t.localize(62,null),default:0}}}}}}}};m.Registry.as(v.Extensions.JSONContribution).registerSchema(d,p)}),define(Q[3751],Y([1,0,139,16,56,44,28,25,62,10,52]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultConfigurationExportHelper=void 0;let h=class{constructor(r,i,s,o,u){this.extensionService=i,this.commandService=s,this.fileService=o,this.productService=u;const d=r.args["export-default-configuration"];d&&this.writeConfigModelAndQuit(m.URI.file(d))}async writeConfigModelAndQuit(r){try{await this.extensionService.whenInstalledExtensionsRegistered(),await this.writeConfigModel(r)}finally{this.commandService.executeCommand("workbench.action.quit")}}async writeConfigModel(r){const i=this.getConfigModel(),s=JSON.stringify(i,void 0," ");await this.fileService.writeFile(r,v.VSBuffer.fromString(s))}getConfigModel(){const r=y.Registry.as(b.Extensions.Configuration),i=r.getConfigurations().slice(),s=[],o=new Set,u=(l,n)=>{if(o.has(l)){console.warn("Setting is registered twice: "+l);return}o.add(l);const g={name:l,description:n.description||n.markdownDescription||"",default:n.default,type:n.type};n.enum&&(g.enum=n.enum),(n.enumDescriptions||n.markdownEnumDescriptions)&&(g.enumDescriptions=n.enumDescriptions||n.markdownEnumDescriptions),s.push(g)},d=l=>{if(l.properties)for(const n in l.properties)u(n,l.properties[n]);l.allOf?.forEach(d)};i.forEach(d);const p=r.getExcludedConfigurationProperties();for(const l in p)u(l,p[l]);return{settings:s.sort((l,n)=>l.name.localeCompare(n.name)),buildTime:Date.now(),commit:this.productService.commit,buildNumber:this.productService.settingsSearchBuildId}}};e.DefaultConfigurationExportHelper=h,e.DefaultConfigurationExportHelper=h=fe([O(0,t.INativeWorkbenchEnvironmentService),O(1,D.IExtensionService),O(2,T.ICommandService),O(3,f.IFileService),O(4,S.IProductService)],h)}),define(Q[1351],Y([1,0,7,85,169,34,20,14,102,4,22,2687,81,13,68,8,29,112,5,61,90,23,24,30,36,19,164,118,727,21,65,149,958,44,1799]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M){"use strict";var N;Object.defineProperty(e,"__esModule",{value:!0}),e.ShowRuntimeExtensionsAction=e.AbstractRuntimeExtensionsEditor=void 0;let P=class extends C.EditorPane{static{N=this}static{this.ID="workbench.editor.runtimeExtensions"}constructor(V,W,z,B,K,H,U,G,$,ie,J,j){super(N.ID,V,W,$),this._extensionsWorkbenchService=B,this._extensionService=K,this._notificationService=H,this._contextMenuService=U,this._instantiationService=G,this._labelService=ie,this._environmentService=J,this._clipboardService=j,this._list=null,this._elements=null,this._updateSoon=this._register(new f.RunOnceScheduler(()=>this._updateExtensions(),200)),this._register(this._extensionService.onDidChangeExtensionsStatus(()=>this._updateSoon.schedule())),this._updateExtensions()}async _updateExtensions(){this._elements=await this._resolveExtensions(),this._list?.splice(0,this._list.length,this._elements)}async _resolveExtensions(){await this._extensionService.whenInstalledExtensionsRegistered();const V=this._extensionService.extensions.filter(J=>!!J.main||!!J.browser),W=new u.ExtensionIdentifierMap,z=await this._extensionsWorkbenchService.queryLocal();for(const J of z)W.set(J.identifier.id,J);const B=this._extensionService.getExtensionsStatus(),K=new u.ExtensionIdentifierMap,H=this._getProfileInfo();if(H){let J=H.startTime;for(let j=0,ee=H.deltas.length;j<ee;j++){const X=H.ids[j],te=H.deltas[j];let Z=K.get(X);Z||(Z=[],K.set(X,Z)),Z.push(J),J=J+te,Z.push(J)}}let U=[];for(let J=0,j=V.length;J<j;J++){const ee=V[J];let X=null;if(H){const te=K.get(ee.identifier)||[];let Z=0;for(let se=0,re=te.length/2;se<re;se++){const oe=te[2*se],le=te[2*se+1];Z+=le-oe}X={segments:te,totalTime:Z}}U[J]={originalIndex:J,description:ee,marketplaceInfo:W.get(ee.identifier),status:B[ee.identifier.value],profileInfo:X||void 0,unresponsiveProfile:this._getUnresponsiveProfile(ee.identifier)}}U=U.filter(J=>J.status.activationStarted);const G=J=>J.unresponsiveProfile===H,$=J=>J.profileInfo?.totalTime??0,ie=J=>(J.status.activationTimes?.codeLoadingTime??0)+(J.status.activationTimes?.activateCallTime??0);return U=U.sort((J,j)=>G(J)||G(j)?+G(j)-+G(J):$(J)||$(j)?$(j)-$(J):ie(J)||ie(j)?ie(j)-ie(J):J.originalIndex-j.originalIndex),U}createEditor(V){V.classList.add("runtime-extensions-editor");const W="runtimeExtensionElementTemplate",z=new class{getHeight(K){return 70}getTemplateId(K){return W}},B={templateId:W,renderTemplate:K=>{const H=(0,t.append)(K,(0,t.$)(".extension")),U=(0,t.append)(H,(0,t.$)(".icon-container")),G=(0,t.append)(U,(0,t.$)("img.icon")),$=(0,t.append)(H,(0,t.$)("div.desc")),ie=(0,t.append)($,(0,t.$)(".header-container")),J=(0,t.append)(ie,(0,t.$)(".header")),j=(0,t.append)(J,(0,t.$)("div.name")),ee=(0,t.append)(J,(0,t.$)("span.version")),X=(0,t.append)($,(0,t.$)("div.msg")),te=new y.ActionBar($,{animated:!1});te.onDidRun(({error:le})=>le&&this._notificationService.error(le));const Z=(0,t.append)(H,(0,t.$)(".time")),se=(0,t.append)(Z,(0,t.$)("div.activation-time")),re=(0,t.append)(Z,(0,t.$)("div.profile-time"));return{root:K,element:H,icon:G,name:j,version:ee,actionbar:te,activationTime:se,profileTime:re,msgContainer:X,disposables:[te],elementDisposables:[]}},renderElement:(K,H,U)=>{U.elementDisposables=(0,m.dispose)(U.elementDisposables),U.root.classList.toggle("odd",H%2===1),U.elementDisposables.push((0,t.addDisposableListener)(U.icon,"error",()=>U.icon.src=K.marketplaceInfo?.iconUrlFallback||L.DefaultIconPath,{once:!0})),U.icon.src=K.marketplaceInfo?.iconUrl||L.DefaultIconPath,U.icon.complete?U.icon.style.visibility="inherit":(U.icon.style.visibility="hidden",U.icon.onload=()=>U.icon.style.visibility="inherit"),U.name.textContent=(K.marketplaceInfo?.displayName||K.description.identifier.value).substr(0,50),U.version.textContent=K.description.version;const G=K.status.activationTimes;if(G){const j=G.codeLoadingTime+G.activateCallTime;U.activationTime.textContent=G.activationReason.startup?`Startup Activation: ${j}ms`:`Activation: ${j}ms`}else U.activationTime.textContent="Activating...";U.actionbar.clear();const $=this._createSlowExtensionAction(K);if($&&U.actionbar.push($,{icon:!1,label:!0}),(0,T.isNonEmptyArray)(K.status.runtimeErrors)){const j=this._createReportExtensionIssueAction(K);j&&U.actionbar.push(j,{icon:!1,label:!0})}let ie;if(G){const j=G.activationReason.extensionId.value,ee=G.activationReason.activationEvent;if(ee==="*")ie=h.localize(0,null,j);else if(/^workspaceContains:/.test(ee)){const X=ee.substr(18);X.indexOf("*")>=0||X.indexOf("?")>=0?ie=h.localize(1,null,X,j):ie=h.localize(2,null,X,j)}else if(/^workspaceContainsTimeout:/.test(ee)){const X=ee.substr(25);ie=h.localize(3,null,X,j)}else if(ee==="onStartupFinished")ie=h.localize(4,null,j);else if(/^onLanguage:/.test(ee)){const X=ee.substr(11);ie=h.localize(5,null,X,j)}else ie=h.localize(6,null,ee,j)}else ie=h.localize(7,null);if(U.activationTime.title=ie,(0,t.clearNode)(U.msgContainer),this._getUnresponsiveProfile(K.description.identifier)){const j=(0,t.$)("span",void 0,...(0,b.renderLabelWithIcons)(" $(alert) Unresponsive"));j.title=h.localize(8,null),U.msgContainer.appendChild(j)}if((0,T.isNonEmptyArray)(K.status.runtimeErrors)){const j=(0,t.$)("span",void 0,...(0,b.renderLabelWithIcons)(`$(bug) ${h.localize(9,null,K.status.runtimeErrors.length)}`));U.msgContainer.appendChild(j)}if(K.status.messages&&K.status.messages.length>0){const j=(0,t.$)("span",void 0,...(0,b.renderLabelWithIcons)(`$(alert) ${K.status.messages[0].message}`));U.msgContainer.appendChild(j)}let J=null;if(K.status.runningLocation&&K.status.runningLocation.equals(new R.LocalWebWorkerRunningLocation(0)))J="$(globe) web worker";else if(K.description.extensionLocation.scheme===S.Schemas.vscodeRemote){const j=this._labelService.getHostLabel(S.Schemas.vscodeRemote,this._environmentService.remoteAuthority);j?J=`$(remote) ${j}`:J=`$(remote) ${K.description.extensionLocation.authority}`}else K.status.runningLocation&&K.status.runningLocation.affinity>0&&(J=K.status.runningLocation instanceof R.LocalWebWorkerRunningLocation?`$(globe) web worker ${K.status.runningLocation.affinity+1}`:`$(server-process) local process ${K.status.runningLocation.affinity+1}`);if(J){const j=(0,t.$)("span",void 0,...(0,b.renderLabelWithIcons)(J));U.msgContainer.appendChild(j)}K.profileInfo?U.profileTime.textContent=`Profile: ${(K.profileInfo.totalTime/1e3).toFixed(2)}ms`:U.profileTime.textContent=""},disposeTemplate:K=>{K.disposables=(0,m.dispose)(K.disposables)}};this._list=this._instantiationService.createInstance(c.WorkbenchList,"RuntimeExtensions",V,z,[B],{multipleSelectionSupport:!1,setRowLineHeight:!1,horizontalScrolling:!1,overrideStyles:{listBackground:w.editorBackground},accessibilityProvider:new class{getWidgetAriaLabel(){return h.localize(10,null)}getAriaLabel(K){return K.description.name}}}),this._list.splice(0,this._list.length,this._elements||void 0),this._list.onContextMenu(K=>{if(!K.element)return;const H=[];H.push(new D.Action("runtimeExtensionsEditor.action.copyId",h.localize(11,null,K.element.description.identifier.value),void 0,!0,()=>{this._clipboardService.writeText(K.element.description.identifier.value)}));const U=this._createReportExtensionIssueAction(K.element);U&&H.push(U),H.push(new D.Separator),K.element.marketplaceInfo&&(H.push(new D.Action("runtimeExtensionsEditor.action.disableWorkspace",h.localize(12,null),void 0,!0,()=>this._extensionsWorkbenchService.setEnablement(K.element.marketplaceInfo,7))),H.push(new D.Action("runtimeExtensionsEditor.action.disable",h.localize(13,null),void 0,!0,()=>this._extensionsWorkbenchService.setEnablement(K.element.marketplaceInfo,6)))),H.push(new D.Separator);const G=this._createProfileAction();G&&H.push(G);const $=this.saveExtensionHostProfileAction;$&&H.push($),this._contextMenuService.showContextMenu({getAnchor:()=>K.anchor,getActions:()=>H})})}get saveExtensionHostProfileAction(){return this._createSaveExtensionHostProfileAction()}layout(V){this._list?.layout(V.height)}};e.AbstractRuntimeExtensionsEditor=P,fe([v.memoize],P.prototype,"saveExtensionHostProfileAction",null),e.AbstractRuntimeExtensionsEditor=P=N=fe([O(0,g.ITelemetryService),O(1,E.IThemeService),O(2,s.IContextKeyService),O(3,I.IExtensionsWorkbenchService),O(4,M.IExtensionService),O(5,l.INotificationService),O(6,o.IContextMenuService),O(7,d.IInstantiationService),O(8,n.IStorageService),O(9,p.ILabelService),O(10,k.IWorkbenchEnvironmentService),O(11,i.IClipboardService)],P);class x extends r.Action2{constructor(){super({id:"workbench.action.showRuntimeExtensions",title:{value:h.localize(14,null),original:"Show Running Extensions"},category:a.Categories.Developer,f1:!0,menu:{id:r.MenuId.ViewContainerTitle,when:s.ContextKeyExpr.equals("viewContainer","workbench.view.extensions"),group:"2_enablement",order:3}})}async run(V){await V.get(A.IEditorService).openEditor(_.RuntimeExtensionsInput.instance,{pinned:!0})}}e.ShowRuntimeExtensionsAction=x}),define(Q[3752],Y([1,0,44,72,2696,14,11]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionActivationProgress=void 0;let f=class{constructor(m,S,h){const a={location:10,title:(0,b.localize)(0,null)};let r,i=0;this._listener=m.onWillActivateByEvent(s=>{h.trace("onWillActivateByEvent: ",s.event),r||(r=new D.DeferredPromise,S.withProgress(a,o=>r.p)),i++,Promise.race([s.activation,(0,D.timeout)(5e3)]).finally(()=>{--i===0&&(r.complete(void 0),r=void 0)})})}dispose(){this._listener.dispose()}};e.ExtensionActivationProgress=f,e.ExtensionActivationProgress=f=fe([O(0,t.IExtensionService),O(1,y.IProgressService),O(2,T.ILogService)],f)}),define(Q[3753],Y([1,0,34,1029,2714,49,100,52,726,44]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugExtensionHostAction=void 0;let h=class extends t.Action{static{S=this}static{this.ID="workbench.extensions.action.debugExtensionHost"}static{this.LABEL=b.localize(0,null)}static{this.CSS_CLASS="debug-extension-host"}constructor(r,i,s,o,u){super(S.ID,S.LABEL,S.CSS_CLASS),this._debugService=r,this._nativeHostService=i,this._dialogService=s,this._extensionService=o,this.productService=u}async run(){const r=await this._extensionService.getInspectPorts(1,!1);if(r.length===0){(await this._dialogService.confirm({message:b.localize(1,null),detail:b.localize(2,null,this.productService.nameLong),primaryButton:b.localize(3,null)})).confirmed&&await this._nativeHostService.relaunch({addArgs:[`--inspect-extensions=${(0,y.randomPort)()}`]});return}return r.length>1&&console.warn("There are multiple extension hosts available for debugging. Picking the first one..."),this._debugService.startDebugging(void 0,{type:"node",name:b.localize(4,null),request:"attach",port:r[0]})}};e.DebugExtensionHostAction=h,e.DebugExtensionHostAction=h=S=fe([O(0,v.IDebugService),O(1,T.INativeHostService),O(2,D.IDialogService),O(3,m.IExtensionService),O(4,f.IProductService)],h)}),define(Q[3754],Y([1,0,6,4,44]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookRendererMessagingService=void 0;let D=class extends y.Disposable{constructor(f){super(),this.extensionService=f,this.activations=new Map,this.scopedMessaging=new Map,this.postMessageEmitter=this._register(new t.Emitter),this.onShouldPostMessage=this.postMessageEmitter.event}receiveMessage(f,v,m){if(f===void 0){const S=[...this.scopedMessaging.values()].map(h=>h.receiveMessageHandler?.(v,m));return Promise.all(S).then(h=>h.some(a=>!!a))}return this.scopedMessaging.get(f)?.receiveMessageHandler?.(v,m)??Promise.resolve(!1)}prepare(f){if(this.activations.has(f))return;const v=[];this.activations.set(f,v),this.extensionService.activateByEvent(`onRenderer:${f}`).then(()=>{for(const m of v)this.postMessageEmitter.fire(m);this.activations.set(f,void 0)})}getScoped(f){const v=this.scopedMessaging.get(f);if(v)return v;const m={postMessage:(S,h)=>this.postMessage(f,S,h),dispose:()=>this.scopedMessaging.delete(f)};return this.scopedMessaging.set(f,m),m}postMessage(f,v,m){this.activations.has(v)||this.prepare(v);const S=this.activations.get(v),h={rendererId:v,editorId:f,message:m};S===void 0?this.postMessageEmitter.fire(h):S.push(h)}};e.NotebookRendererMessagingService=D,e.NotebookRendererMessagingService=D=fe([O(0,b.IExtensionService)],D)}),define(Q[3755],Y([1,0,119,2951,32,63,28,44]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentVariableInfoChangesActive=e.EnvironmentVariableInfoStale=void 0;let v=class{constructor(i,s,o,u,d){this._diff=i,this._terminalId=s,this._collection=o,this._terminalService=u,this._extensionService=d,this.requiresAction=!0}_getInfo(i){const s=new Set;h(s,this._diff.added.values()),h(s,this._diff.removed.values()),h(s,this._diff.changed.values());let o=(0,y.localize)(0,null);return o+=S(this._collection,i,this._extensionService,s),o}_getActions(){return[{label:(0,y.localize)(1,null),run:()=>this._terminalService.getInstanceFromId(this._terminalId)?.relaunch(),commandId:"workbench.action.terminal.relaunch"}]}getStatus(i){return{id:"relaunch-needed",severity:D.default.Warning,icon:b.Codicon.warning,tooltip:this._getInfo(i),hoverActions:this._getActions()}}};e.EnvironmentVariableInfoStale=v,e.EnvironmentVariableInfoStale=v=fe([O(3,t.ITerminalService),O(4,f.IExtensionService)],v);let m=class{constructor(i,s,o){this._collection=i,this._commandService=s,this._extensionService=o,this.requiresAction=!1}_getInfo(i){const s=new Set;h(s,this._collection.getVariableMap(i).values());let o=(0,y.localize)(2,null);return o+=S(this._collection,i,this._extensionService,s),o}_getActions(i){return[{label:(0,y.localize)(3,null),run:()=>this._commandService.executeCommand("workbench.action.terminal.showEnvironmentContributions",i),commandId:"workbench.action.terminal.showEnvironmentContributions"}]}getStatus(i){return{id:"env-var-info-changes-active",severity:D.default.Info,tooltip:this._getInfo(i),hoverActions:this._getActions(i)}}};e.EnvironmentVariableInfoChangesActive=m,e.EnvironmentVariableInfoChangesActive=m=fe([O(1,T.ICommandService),O(2,f.IExtensionService)],m);function S(r,i,s,o){const u=[` `],d=r.getDescriptionMap(void 0),p=r.getDescriptionMap(i);for(const c of o){const l=d.get(c);l&&(u.push(` - \`${a(c,s)}\``),u.push(`: ${l}`));const n=p.get(c);if(n){const g=l?` (${(0,y.localize)(4,null)})`:"";u.push(` - \`${a(c,s)}${g}\``),u.push(`: ${n}`)}!l&&!n&&u.push(` - \`${a(c,s)}\``)}return u.join("")}function h(r,i){for(const s of i)for(const o of s)r.add(o.extensionIdentifier)}function a(r,i){return i.extensions.find(s=>s.id===r)?.displayName||r}}),define(Q[3756],Y([1,0,6,102,24,44,1198,594,4]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentVariableService=void 0;let m=class extends v.Disposable{get onDidChangeCollections(){return this._onDidChangeCollections.event}constructor(h,a){super(),this._extensionService=h,this._storageService=a,this.collections=new Map,this._onDidChangeCollections=this._register(new t.Emitter),this._storageService.remove("terminal.integrated.environmentVariableCollections",1);const r=this._storageService.get("terminal.integrated.environmentVariableCollectionsV2",1);r&&(JSON.parse(r).forEach(s=>this.collections.set(s.extensionIdentifier,{persistent:!0,map:(0,f.deserializeEnvironmentVariableCollection)(s.collection),descriptionMap:(0,f.deserializeEnvironmentDescriptionMap)(s.description)})),this._invalidateExtensionCollections()),this.mergedCollection=this._resolveMergedCollection(),this._extensionService.onDidChangeExtensions(()=>this._invalidateExtensionCollections())}set(h,a){this.collections.set(h,a),this._updateCollections()}delete(h){this.collections.delete(h),this._updateCollections()}_updateCollections(){this._persistCollectionsEventually(),this.mergedCollection=this._resolveMergedCollection(),this._notifyCollectionUpdatesEventually()}_persistCollectionsEventually(){this._persistCollections()}_persistCollections(){const h=[];this.collections.forEach((r,i)=>{r.persistent&&h.push({extensionIdentifier:i,collection:(0,f.serializeEnvironmentVariableCollection)(this.collections.get(i).map),description:(0,f.serializeEnvironmentDescriptionMap)(r.descriptionMap)})});const a=JSON.stringify(h);this._storageService.store("terminal.integrated.environmentVariableCollectionsV2",a,1,1)}_notifyCollectionUpdatesEventually(){this._notifyCollectionUpdates()}_notifyCollectionUpdates(){this._onDidChangeCollections.fire(this.mergedCollection)}_resolveMergedCollection(){return new T.MergedEnvironmentVariableCollection(this.collections)}async _invalidateExtensionCollections(){await this._extensionService.whenInstalledExtensionsRegistered();const h=this._extensionService.extensions;let a=!1;this.collections.forEach((r,i)=>{h.some(o=>o.identifier.value===i)||(this.collections.delete(i),a=!0)}),a&&this._updateCollections()}};e.EnvironmentVariableService=m,fe([(0,y.throttle)(1e3)],m.prototype,"_persistCollectionsEventually",null),fe([(0,y.debounce)(1e3)],m.prototype,"_notifyCollectionUpdatesEventually",null),e.EnvironmentVariableService=m=fe([O(0,D.IExtensionService),O(1,b.IStorageService)],m)}),define(Q[3757],Y([1,0,3756,35,616]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,y.registerSingleton)(b.IEnvironmentVariableService,t.EnvironmentVariableService,1)}),define(Q[3758],Y([1,0,3034,4,8,1325,16,46,44]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewsWelcomeContribution=void 0;const m=T.Registry.as(f.Extensions.ViewsRegistry);class S extends y.Disposable{constructor(r){super(),this.viewWelcomeContents=new Map,r.setHandler((i,{added:s,removed:o})=>{for(const d of o)for(const p of d.value)this.viewWelcomeContents.get(p)?.dispose();const u=new Map;for(const d of s)for(const p of d.value){const{group:c,order:l}=h(p,d),n=b.ContextKeyExpr.deserialize(p.enablement),g=D.ViewIdentifierMap[p.view]??p.view;let w=u.get(g);w||(w=new Map,u.set(g,w)),w.set(p,{content:p.contents,when:b.ContextKeyExpr.deserialize(p.when),precondition:n,group:c,order:l})}for(const[d,p]of u){const c=m.registerViewWelcomeContent2(d,p);for(const[l,n]of c)this.viewWelcomeContents.set(l,n)}})}}e.ViewsWelcomeContribution=S;function h(a,r){let i,s;if(a.group){if(!(0,v.isProposedApiEnabled)(r.description,"contribViewsWelcome"))return r.collector.warn(t.localize(0,null,r.description.identifier.value)),{group:i,order:s};const o=a.group.lastIndexOf("@");o>0?(i=a.group.substr(0,o),s=Number(a.group.substr(o+1))||void 0):i=a.group}return{group:i,order:s}}}),define(Q[1352],Y([1,0,162,151,33,10,4,164,30,740,41,78,190,5,38,3038,24,8,9,17,28,19,443,18,42,23,7,70,44,3665,1843]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_){"use strict";var A;Object.defineProperty(e,"__esModule",{value:!0}),e.WalkThroughPart=e.WALK_THROUGH_FOCUS=void 0,e.WALK_THROUGH_FOCUS=new u.RawContextKey("interactivePlaygroundFocus",!1);const k=(0,s.localize)(0,null),L="walkThroughEditorViewState";let R=class extends f.EditorPane{static{A=this}static{this.ID="workbench.editor.walkThroughPart"}constructor(N,P,x,F,V,W,z,B,K,H,U,G){super(A.ID,N,P,z),this.instantiationService=F,this.openerService=V,this.keybindingService=W,this.contextKeyService=B,this.configurationService=K,this.notificationService=H,this.extensionService=U,this.disposables=new T.DisposableStore,this.contentDisposables=[],this.editorFocus=e.WALK_THROUGH_FOCUS.bindTo(this.contextKeyService),this.editorMemento=this.getEditorMemento(G,x,L)}createEditor(N){this.content=document.createElement("div"),this.content.classList.add("welcomePageFocusElement"),this.content.tabIndex=0,this.content.style.outlineStyle="none",this.scrollbar=new t.DomScrollableElement(this.content,{horizontal:1,vertical:1}),this.disposables.add(this.scrollbar),N.appendChild(this.scrollbar.getDomNode()),this.registerFocusHandlers(),this.registerClickHandler(),this.disposables.add(this.scrollbar.onScroll(P=>this.updatedScrollPosition()))}updatedScrollPosition(){const N=this.scrollbar.getScrollDimensions(),P=this.scrollbar.getScrollPosition(),x=N.scrollHeight;if(x&&this.input instanceof m.WalkThroughInput){const F=P.scrollTop,V=N.height;this.input.relativeScrollPosition(F/x,(F+V)/x)}}onTouchChange(N){N.preventDefault(),N.stopPropagation();const P=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:P.scrollTop-N.translationY})}addEventListener(N,P,x,F){return N.addEventListener(P,x,F),(0,T.toDisposable)(()=>{N.removeEventListener(P,x,F)})}registerFocusHandlers(){this.disposables.add(this.addEventListener(this.content,"mousedown",N=>{this.focus()})),this.disposables.add(this.addEventListener(this.content,"focus",N=>{this.editorFocus.set(!0)})),this.disposables.add(this.addEventListener(this.content,"blur",N=>{this.editorFocus.reset()})),this.disposables.add(this.addEventListener(this.content,"focusin",N=>{if(N.target instanceof HTMLElement&&N.target.classList.contains("zone-widget-container")){const P=this.scrollbar.getScrollPosition();this.content.scrollTop=P.scrollTop,this.content.scrollLeft=P.scrollLeft}N.target instanceof HTMLElement&&(this.lastFocus=N.target)}))}registerClickHandler(){this.content.addEventListener("click",N=>{for(let P=N.target;P;P=P.parentNode)if(P instanceof HTMLAnchorElement&&P.href){const x=window.document.getElementsByTagName("base")[0]||window.location;if(x&&P.href.indexOf(x.href)>=0&&P.hash){const F=this.content.querySelector(P.hash),V=this.content.firstElementChild;if(F&&V){const W=F.getBoundingClientRect().top-20,z=V.getBoundingClientRect().top;this.scrollbar.setScrollPosition({scrollTop:W-z})}}else this.open(D.URI.parse(P.href));N.preventDefault();break}else if(P instanceof HTMLButtonElement){const x=P.getAttribute("data-href");x&&this.open(D.URI.parse(x));break}else if(P===N.currentTarget)break})}open(N){if(N.scheme==="command"&&N.path==="git.clone"&&!c.CommandsRegistry.getCommand("git.clone")){this.notificationService.info((0,s.localize)(1,null));return}this.openerService.open(this.addFrom(N),{allowCommands:!0})}addFrom(N){if(N.scheme!=="command"||!(this.input instanceof m.WalkThroughInput))return N;const P=N.query?JSON.parse(N.query):{};return P.from=this.input.getTelemetryFrom(),N.with({query:JSON.stringify(P)})}layout(N){this.size=N,(0,C.size)(this.content,N.width,N.height),this.updateSizeClasses(),this.contentDisposables.forEach(x=>{x instanceof a.CodeEditorWidget&&x.layout()});const P=this.input instanceof m.WalkThroughInput&&this.input;P&&P.layout&&P.layout(N),this.scrollbar.scanDomNode()}updateSizeClasses(){const N=this.content.firstElementChild;this.size&&N&&N.classList.toggle("max-height-685px",this.size.height<=685)}focus(){let N=document.activeElement;for(;N&&N!==this.content;)N=N.parentElement;N||(this.lastFocus||this.content).focus(),this.editorFocus.set(!0)}arrowUp(){const N=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:N.scrollTop-this.getArrowScrollHeight()})}arrowDown(){const N=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:N.scrollTop+this.getArrowScrollHeight()})}getArrowScrollHeight(){let N=this.configurationService.getValue("editor.fontSize");return(typeof N!="number"||N<1)&&(N=12),3*N}pageUp(){const N=this.scrollbar.getScrollDimensions(),P=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:P.scrollTop-N.height})}pageDown(){const N=this.scrollbar.getScrollDimensions(),P=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:P.scrollTop+N.height})}setInput(N,P,x,F){const V=new T.DisposableStore;return this.contentDisposables.push(V),this.content.innerText="",super.setInput(N,P,x,F).then(async()=>(N.resource.path.endsWith(".md")&&await this.extensionService.whenInstalledExtensionsRegistered(),N.resolve())).then(W=>{if(F.isCancellationRequested)return;const z=W.main;if(!N.resource.path.endsWith(".md")){(0,C.safeInnerHtml)(this.content,z,!0),this.updateSizeClasses(),this.decorateContent(),this.contentDisposables.push(this.keybindingService.onDidUpdateKeybindings(()=>this.decorateContent())),N.onReady?.(this.content.firstElementChild,V),this.scrollbar.scanDomNode(),this.loadTextEditorViewState(N),this.updatedScrollPosition();return}const B=document.createElement("div");B.classList.add("walkThroughContent");const K=this.expandMacros(z);(0,C.safeInnerHtml)(B,K),this.content.appendChild(B),W.snippets.forEach((H,U)=>{const G=H.textEditorModel;if(!G)return;const $=`snippet-${G.uri.fragment}`,ie=B.querySelector(`#${$.replace(/[\\.]/g,"\\$&")}`),J=this.getEditorOptions(G.getLanguageId()),j={target:this.input instanceof m.WalkThroughInput?this.input.getTelemetryFrom():void 0,snippet:U},ee=this.instantiationService.createInstance(a.CodeEditorWidget,ie,J,{telemetryData:j});ee.setModel(G),this.contentDisposables.push(ee);const X=te=>{const Z=ee.getOption(65),se=`${Math.max(G.getLineCount()+1,4)*Z}px`;ie.style.height!==se&&(ie.style.height=se,ee.layout(),te||this.scrollbar.scanDomNode())};X(!0),this.contentDisposables.push(ee.onDidChangeModelContent(()=>X(!1))),this.contentDisposables.push(ee.onDidChangeCursorPosition(te=>{const Z=this.content.firstElementChild;if(Z){const se=ie.getBoundingClientRect().top,re=Z.getBoundingClientRect().top,oe=ee.getOption(65),le=se+(te.position.lineNumber-1)*oe-re,ne=le+oe,ce=this.scrollbar.getScrollDimensions(),ue=this.scrollbar.getScrollPosition().scrollTop,de=ce.height;ue>le?this.scrollbar.setScrollPosition({scrollTop:le}):ue<ne-de&&this.scrollbar.setScrollPosition({scrollTop:ne-de})}})),this.contentDisposables.push(this.configurationService.onDidChangeConfiguration(te=>{te.affectsConfiguration("editor")&&H.textEditorModel&&ee.updateOptions(this.getEditorOptions(H.textEditorModel.getLanguageId()))}))}),this.updateSizeClasses(),this.multiCursorModifier(),this.contentDisposables.push(this.configurationService.onDidChangeConfiguration(H=>{H.affectsConfiguration("editor.multiCursorModifier")&&this.multiCursorModifier()})),N.onReady?.(B,V),this.scrollbar.scanDomNode(),this.loadTextEditorViewState(N),this.updatedScrollPosition(),this.contentDisposables.push(y.Gesture.addTarget(B)),this.contentDisposables.push((0,C.addDisposableListener)(B,y.EventType.Change,H=>this.onTouchChange(H)))})}getEditorOptions(N){const P=(0,w.deepClone)(this.configurationService.getValue("editor",{overrideIdentifier:N}));return{...(0,p.isObject)(P)?P:Object.create(null),scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:3,fixedOverflowWidgets:!1,lineNumbersMinChars:1,minimap:{enabled:!1}}}expandMacros(N){return N.replace(/kb\(([a-z.\d\-]+)\)/gi,(P,x)=>{const F=this.keybindingService.lookupKeybinding(x),V=F?F.getLabel()||"":k;return`<span class="shortcut">${b.escape(V)}</span>`})}decorateContent(){const N=this.content.querySelectorAll(".shortcut[data-command]");Array.prototype.forEach.call(N,x=>{const F=x.getAttribute("data-command"),V=F&&this.keybindingService.lookupKeybinding(F),W=V?V.getLabel()||"":k;for(;x.firstChild;)x.removeChild(x.firstChild);x.appendChild(document.createTextNode(W))});const P=this.content.querySelectorAll(".if_shortcut[data-command]");Array.prototype.forEach.call(P,x=>{const F=x.getAttribute("data-command"),V=F&&this.keybindingService.lookupKeybinding(F);x.style.display=V?"":"none"})}multiCursorModifier(){const N=n.UILabelProvider.modifierLabels[g.OS],P=this.configurationService.getValue("editor.multiCursorModifier"),x=N[P==="ctrlCmd"?g.OS===2?"metaKey":"ctrlKey":"altKey"],F=this.content.querySelectorAll(".multi-cursor-modifier");Array.prototype.forEach.call(F,V=>{for(;V.firstChild;)V.removeChild(V.firstChild);V.appendChild(document.createTextNode(x))})}saveTextEditorViewState(N){const P=this.scrollbar.getScrollPosition();this.group&&this.editorMemento.saveEditorState(this.group,N,{viewState:{scrollTop:P.scrollTop,scrollLeft:P.scrollLeft}})}loadTextEditorViewState(N){if(this.group){const P=this.editorMemento.loadEditorState(this.group,N);P&&this.scrollbar.setScrollPosition(P.viewState)}}clearInput(){this.input instanceof m.WalkThroughInput&&this.saveTextEditorViewState(this.input),this.contentDisposables=(0,T.dispose)(this.contentDisposables),super.clearInput()}saveState(){this.input instanceof m.WalkThroughInput&&this.saveTextEditorViewState(this.input),super.saveState()}dispose(){this.editorFocus.reset(),this.contentDisposables=(0,T.dispose)(this.contentDisposables),this.disposables.dispose(),super.dispose()}};e.WalkThroughPart=R,e.WalkThroughPart=R=A=fe([O(0,v.ITelemetryService),O(1,l.IThemeService),O(2,h.ITextResourceConfigurationService),O(3,r.IInstantiationService),O(4,S.IOpenerService),O(5,i.IKeybindingService),O(6,o.IStorageService),O(7,u.IContextKeyService),O(8,d.IConfigurationService),O(9,E.INotificationService),O(10,_.IExtensionService),O(11,I.IEditorGroupsService)],R)}),define(Q[3759],Y([1,0,21,1352,73,8]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalkThroughPageDown=e.WalkThroughPageUp=e.WalkThroughArrowDown=e.WalkThroughArrowUp=void 0,e.WalkThroughArrowUp={id:"workbench.action.interactivePlayground.arrowUp",weight:200,when:D.ContextKeyExpr.and(y.WALK_THROUGH_FOCUS,b.EditorContextKeys.editorTextFocus.toNegated()),primary:16,handler:T=>{const v=T.get(t.IEditorService).activeEditorPane;v instanceof y.WalkThroughPart&&v.arrowUp()}},e.WalkThroughArrowDown={id:"workbench.action.interactivePlayground.arrowDown",weight:200,when:D.ContextKeyExpr.and(y.WALK_THROUGH_FOCUS,b.EditorContextKeys.editorTextFocus.toNegated()),primary:18,handler:T=>{const v=T.get(t.IEditorService).activeEditorPane;v instanceof y.WalkThroughPart&&v.arrowDown()}},e.WalkThroughPageUp={id:"workbench.action.interactivePlayground.pageUp",weight:200,when:D.ContextKeyExpr.and(y.WALK_THROUGH_FOCUS,b.EditorContextKeys.editorTextFocus.toNegated()),primary:11,handler:T=>{const v=T.get(t.IEditorService).activeEditorPane;v instanceof y.WalkThroughPart&&v.pageUp()}},e.WalkThroughPageDown={id:"workbench.action.interactivePlayground.pageDown",weight:200,when:D.ContextKeyExpr.and(y.WALK_THROUGH_FOCUS,b.EditorContextKeys.editorTextFocus.toNegated()),primary:12,handler:T=>{const v=T.get(t.IEditorService).activeEditorPane;v instanceof y.WalkThroughPart&&v.pageDown()}}}),define(Q[3760],Y([1,0,5,28,44,6,4,11,35,14]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandService=void 0;let S=class extends T.Disposable{constructor(a,r,i){super(),this._instantiationService=a,this._extensionService=r,this._logService=i,this._extensionHostIsReady=!1,this._onWillExecuteCommand=this._register(new D.Emitter),this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new D.Emitter,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._extensionService.whenInstalledExtensionsRegistered().then(s=>this._extensionHostIsReady=s),this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=Promise.race([this._extensionService.activateByEvent("*"),(0,m.timeout)(3e4)])),this._starActivation}async executeCommand(a,...r){this._logService.trace("CommandService#executeCommand",a);const i=`onCommand:${a}`;return y.CommandsRegistry.getCommand(a)?this._extensionService.activationEventIsDone(i)?this._tryExecuteCommand(a,r):this._extensionHostIsReady?(await this._extensionService.activateByEvent(i),this._tryExecuteCommand(a,r)):(this._extensionService.activateByEvent(i),this._tryExecuteCommand(a,r)):(await Promise.all([this._extensionService.activateByEvent(i),Promise.race([this._activateStar(),D.Event.toPromise(D.Event.filter(y.CommandsRegistry.onDidRegisterCommand,o=>o===a))])]),this._tryExecuteCommand(a,r))}_tryExecuteCommand(a,r){const i=y.CommandsRegistry.getCommand(a);if(!i)return Promise.reject(new Error(`command '${a}' not found`));try{this._onWillExecuteCommand.fire({commandId:a,args:r});const s=this._instantiationService.invokeFunction(i.handler,...r);return this._onDidExecuteCommand.fire({commandId:a,args:r}),Promise.resolve(s)}catch(s){return Promise.reject(s)}}};e.CommandService=S,e.CommandService=S=fe([O(0,t.IInstantiationService),O(1,b.IExtensionService),O(2,f.ILogService)],S),(0,v.registerSingleton)(y.ICommandService,S,1)}),define(Q[3761],Y([1,0,7,14,62,15,6,4,22,18,26,10,59,61,111,11,52,24,30,231,116,39,1249,295,957,44]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebWorkerExtensionHost=void 0;let C=class extends f.Disposable{constructor(_,A,k,L,R,M,N,P,x,F,V,W,z){super(),this.runningLocation=_,this.startup=A,this._initDataProvider=k,this._telemetryService=L,this._contextService=R,this._labelService=M,this._logService=N,this._loggerService=P,this._environmentService=x,this._userDataProfilesService=F,this._productService=V,this._layoutService=W,this._storageService=z,this.remoteAuthority=null,this.extensions=new E.ExtensionHostExtensions,this._onDidExit=this._register(new T.Emitter),this.onExit=this._onDidExit.event,this._isTerminating=!1,this._protocolPromise=null,this._protocol=null,this._extensionHostLogsLocation=(0,S.joinPath)(this._environmentService.extHostLogsPath,"webWorker")}async _getWebWorkerExtensionHostIframeSrc(){const _=new URLSearchParams;this._environmentService.debugExtensionHost&&this._environmentService.debugRenderer&&_.set("debugged","1"),v.COI.addSearchParam(_,!0,!0);const A=`?${_.toString()}`,k="vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html";if(m.isWeb){const R=this._productService.webEndpointUrlTemplate,M=this._productService.commit,N=this._productService.quality;if(R&&M&&N){const P="webWorkerExtensionHostIframeStableOriginUUID";let x=this._storageService.get(P,1);typeof x>"u"&&(x=(0,a.generateUuid)(),this._storageService.store(P,x,1,1));const F=await(0,n.parentOriginHash)(window.origin,x),V=R.replace("{{uuid}}",`v--${F}`).replace("{{commit}}",M).replace("{{quality}}",N),W=new URL(`${V}/out/${k}${A}`);return W.searchParams.set("parentOrigin",window.origin),W.searchParams.set("salt",x),W.toString()}console.warn("The web worker extension host is started in a same-origin iframe!")}return`${v.FileAccess.asBrowserUri(k).toString(!0)}${A}`}async start(){return this._protocolPromise||(this._protocolPromise=this._startInsideIframe(),this._protocolPromise.then(_=>this._protocol=_)),this._protocolPromise}async _startInsideIframe(){const _=await this._getWebWorkerExtensionHostIframeSrc(),A=this._register(new T.Emitter),k=document.createElement("iframe");k.setAttribute("class","web-worker-ext-host-iframe"),k.setAttribute("sandbox","allow-scripts allow-same-origin"),k.setAttribute("allow","usb; serial; hid; cross-origin-isolated;"),k.setAttribute("aria-hidden","true"),k.style.display="none";const L=(0,a.generateUuid)();k.setAttribute("src",`${_}&vscodeWebWorkerExtHostId=${L}`);const R=new y.Barrier;let M,N=null,P=!1,x=null;const F=(B,K)=>{N=K,P=!0,(0,D.onUnexpectedError)(N),clearTimeout(x),this._onDidExit.fire([81,N.message]),R.open()},V=B=>{M=B,clearTimeout(x),R.open()};if(x=setTimeout(()=>{console.warn("The Web Worker Extension Host did not start in 60s, that might be a problem.")},6e4),this._register(t.addDisposableListener(window,"message",B=>{if(B.source!==k.contentWindow||B.data.vscodeWebWorkerExtHostId!==L)return;if(B.data.error){const{name:H,message:U,stack:G}=B.data.error,$=new Error;return $.message=U,$.name=H,$.stack=G,F(81,$)}const{data:K}=B.data;if(R.isOpen()||!(K instanceof MessagePort)){console.warn("UNEXPECTED message",B);const H=new Error("UNEXPECTED message");return F(81,H)}V(K)})),this._layoutService.container.appendChild(k),this._register((0,f.toDisposable)(()=>k.remove())),await R.wait(),P)throw N;const W=this._environmentService.options?.messagePorts??new Map;k.contentWindow.postMessage({type:"vscode.init",data:W},"*",[...W.values()]),M.onmessage=B=>{const{data:K}=B;if(!(K instanceof ArrayBuffer)){console.warn("UNKNOWN data received",K),this._onDidExit.fire([77,"UNKNOWN data received"]);return}A.fire(b.VSBuffer.wrap(new Uint8Array(K,0,K.byteLength)))};const z={onMessage:A.event,send:B=>{const K=B.buffer.buffer.slice(B.buffer.byteOffset,B.buffer.byteOffset+B.buffer.byteLength);M.postMessage(K,[K])}};return this._performHandshake(z)}async _performHandshake(_){if(await T.Event.toPromise(T.Event.filter(_.onMessage,A=>(0,w.isMessageOfType)(A,1))),this._isTerminating||(_.send(b.VSBuffer.fromString(JSON.stringify(await this._createExtHostInitData()))),this._isTerminating)||(await T.Event.toPromise(T.Event.filter(_.onMessage,A=>(0,w.isMessageOfType)(A,0))),this._isTerminating))throw(0,D.canceled)();return _}dispose(){this._isTerminating||(this._isTerminating=!0,this._protocol?.send((0,w.createMessageOfType)(2)),super.dispose())}getInspectPort(){}enableInspectPort(){return Promise.resolve(!1)}async _createExtHostInitData(){const _=await this._initDataProvider.getInitData(),A=this._contextService.getWorkspace(),k=this.extensions.set(_.allExtensions,_.myExtensions),L=this._productService.extensionsGallery?.nlsBaseUrl;let R;return L&&this._productService.commit&&!m.Language.isDefaultVariant()&&(R=h.URI.joinPath(h.URI.parse(L),this._productService.commit,this._productService.version,m.Language.value())),{commit:this._productService.commit,version:this._productService.version,vscodeVersion:this._productService.vscodeVersion,quality:this._productService.quality,parentPid:0,environment:{isExtensionDevelopmentDebug:this._environmentService.debugRenderer,appName:this._productService.nameLong,appHost:this._productService.embedderIdentifier??(m.isWeb?"web":"desktop"),appUriScheme:this._productService.urlProtocol,appLanguage:m.language,extensionTelemetryLogResource:this._environmentService.extHostTelemetryLogFile,isExtensionTelemetryLoggingOnly:(0,p.isLoggingOnly)(this._productService,this._environmentService),extensionDevelopmentLocationURI:this._environmentService.extensionDevelopmentLocationURI,extensionTestsLocationURI:this._environmentService.extensionTestsLocationURI,globalStorageHome:this._userDataProfilesService.defaultProfile.globalStorageHome,workspaceStorageHome:this._environmentService.workspaceStorageHome,extensionLogLevel:this._environmentService.extensionLogLevel},workspace:this._contextService.getWorkbenchState()===1?void 0:{configuration:A.configuration||void 0,id:A.id,name:this._labelService.getWorkspaceLabel(A),transient:A.transient},consoleForward:{includeStack:!1,logNative:this._environmentService.debugRenderer},allExtensions:k.toAdd,activationEvents:k.addActivationEvents,myExtensions:k.myToAdd,nlsBaseUrl:R,telemetryInfo:{sessionId:this._telemetryService.sessionId,machineId:this._telemetryService.machineId,firstSessionDate:this._telemetryService.firstSessionDate,msftInternal:this._telemetryService.msftInternal},logLevel:this._logService.getLevel(),loggers:[...this._loggerService.getRegisteredLoggers()],logsLocation:this._extensionHostLogsLocation,autoStart:this.startup===1,remote:{authority:this._environmentService.remoteAuthority,connectionData:null,isRemote:!1},uiKind:m.isWeb?w.UIKind.Web:w.UIKind.Desktop}}};e.WebWorkerExtensionHost=C,e.WebWorkerExtensionHost=C=fe([O(3,d.ITelemetryService),O(4,l.IWorkspaceContextService),O(5,r.ILabelService),O(6,s.ILogService),O(7,s.ILoggerService),O(8,g.IBrowserWorkbenchEnvironmentService),O(9,c.IUserDataProfilesService),O(10,o.IProductService),O(11,i.ILayoutService),O(12,u.IStorageService)],C)}),define(Q[1353],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.allApiProposals=void 0,e.allApiProposals=Object.freeze({aiRelatedInformation:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts",authGetSessions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authGetSessions.d.ts",authSession:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authSession.d.ts",canonicalUriProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts",chat:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chat.d.ts",chatProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatProvider.d.ts",chatRequestAccess:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatRequestAccess.d.ts",chatSlashCommands:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatSlashCommands.d.ts",chatVariables:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.chatVariables.d.ts",codiconDecoration:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.codiconDecoration.d.ts",commentsDraftState:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentsDraftState.d.ts",contribCommentEditorActionsMenu:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts",contribCommentPeekContext:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts",contribCommentThreadAdditionalMenu:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts",contribEditSessions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribEditSessions.d.ts",contribEditorContentMenu:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts",contribLabelFormatterWorkspaceTooltip:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts",contribMenuBarHome:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts",contribMergeEditorMenus:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts",contribNotebookStaticPreloads:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts",contribRemoteHelp:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts",contribShareMenu:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribShareMenu.d.ts",contribStatusBarItems:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts",contribViewsRemote:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsRemote.d.ts",contribViewsWelcome:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts",customEditorMove:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.customEditorMove.d.ts",debugFocus:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.debugFocus.d.ts",diffCommand:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.diffCommand.d.ts",diffContentOptions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.diffContentOptions.d.ts",documentFiltersExclusive:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts",documentPaste:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.documentPaste.d.ts",dropMetadata:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.dropMetadata.d.ts",editSessionIdentityProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts",editorInsets:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editorInsets.d.ts",envShellEvent:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.envShellEvent.d.ts",extensionRuntime:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionRuntime.d.ts",extensionsAny:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionsAny.d.ts",externalUriOpener:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.externalUriOpener.d.ts",fileComments:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fileComments.d.ts",fileSearchProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fileSearchProvider.d.ts",findTextInFiles:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.findTextInFiles.d.ts",fsChunks:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fsChunks.d.ts",handleIssueUri:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.handleIssueUri.d.ts",idToken:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.idToken.d.ts",indentSize:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.indentSize.d.ts",inlineCompletionsAdditions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts",interactive:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.interactive.d.ts",interactiveUserActions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.interactiveUserActions.d.ts",interactiveWindow:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.interactiveWindow.d.ts",ipc:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.ipc.d.ts",languageConfigurationAutoClosingPairs:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageConfigurationAutoClosingPairs.d.ts",mappedEditsProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts",notebookCellExecutionState:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts",notebookCodeActions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookCodeActions.d.ts",notebookControllerAffinityHidden:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts",notebookDeprecated:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDeprecated.d.ts",notebookExecution:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookExecution.d.ts",notebookKernelSource:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookKernelSource.d.ts",notebookLiveShare:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookLiveShare.d.ts",notebookMessaging:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookMessaging.d.ts",notebookMime:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookMime.d.ts",portsAttributes:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.portsAttributes.d.ts",profileContentHandlers:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.profileContentHandlers.d.ts",quickDiffProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickDiffProvider.d.ts",quickPickItemTooltip:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts",quickPickSortByLabel:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts",readonlyMessage:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.readonlyMessage.d.ts",resolvers:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.resolvers.d.ts",saveEditor:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.saveEditor.d.ts",scmActionButton:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmActionButton.d.ts",scmSelectedProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts",scmTextDocument:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmTextDocument.d.ts",scmValidation:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmValidation.d.ts",shareProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.shareProvider.d.ts",showLocal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.showLocal.d.ts",tabInputTextMerge:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts",taskPresentationGroup:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts",telemetry:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.telemetry.d.ts",terminalContextMenu:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalContextMenu.d.ts",terminalDataWriteEvent:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts",terminalDimensions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDimensions.d.ts",terminalExecuteCommandEvent:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts",terminalQuickFixProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts",terminalSelection:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalSelection.d.ts",testCoverage:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testCoverage.d.ts",testMessageContextValue:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testMessageContextValue.d.ts",testObserver:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testObserver.d.ts",textDocumentNotebook:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textDocumentNotebook.d.ts",textSearchProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textSearchProvider.d.ts",timeline:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.timeline.d.ts",tokenInformation:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tokenInformation.d.ts",treeViewActiveItem:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeViewActiveItem.d.ts",treeViewMarkdownMessage:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeViewMarkdownMessage.d.ts",treeViewReveal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeViewReveal.d.ts",tunnelFactory:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tunnelFactory.d.ts",tunnels:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tunnels.d.ts",windowActivity:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.windowActivity.d.ts",workspaceTrust:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.workspaceTrust.d.ts"})}),define(Q[3762],Y([1,0,20,112,11,52,65,1353]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsProposedApi=void 0;let v=class{constructor(S,h,a){if(this._logService=S,this._environmentService=h,this._envEnabledExtensions=new Set((h.extensionEnabledProposedApi??[]).map(r=>y.ExtensionIdentifier.toKey(r))),this._envEnablesProposedApiForAll=!h.isBuilt||h.isExtensionDevelopment&&a.quality!=="stable"||this._envEnabledExtensions.size===0&&Array.isArray(h.extensionEnabledProposedApi),this._productEnabledExtensions=new Map,a.extensionEnabledApiProposals)for(const[r,i]of Object.entries(a.extensionEnabledApiProposals)){const s=y.ExtensionIdentifier.toKey(r),o=i.filter(u=>f.allApiProposals[u]?!0:(S.warn(`Via 'product.json#extensionEnabledApiProposals' extension '${s}' wants API proposal '${u}' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.`),!1));this._productEnabledExtensions.set(s,o)}}updateEnabledApiProposals(S){for(const h of S)this.doUpdateEnabledApiProposals(h)}doUpdateEnabledApiProposals(S){const h=S,a=y.ExtensionIdentifier.toKey(S.identifier);if((0,t.isNonEmptyArray)(h.enabledApiProposals)&&(h.enabledApiProposals=h.enabledApiProposals.filter(r=>{const i=!!f.allApiProposals[r];return i||this._logService.error(`Extension '${a}' wants API proposal '${r}' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.`),i})),this._productEnabledExtensions.has(a)){const r=this._productEnabledExtensions.get(a),i=new Set(r),s=new Set(h.enabledApiProposals),o=new Set([...s].filter(u=>!i.has(u)));o.size>0&&(this._logService.error(`Extension '${a}' appears in product.json but enables LESS API proposals than the extension wants. package.json (LOSES): ${[...s].join(", ")} product.json (WINS): ${[...i].join(", ")}`),this._environmentService.isExtensionDevelopment&&(this._logService.error(`Proceeding with EXTRA proposals (${[...o].join(", ")}) because extension is in development mode. Still, this EXTENSION WILL BE BROKEN unless product.json is updated.`),r.push(...o))),h.enabledApiProposals=r;return}this._envEnablesProposedApiForAll||this._envEnabledExtensions.has(a)||!h.isBuiltin&&(0,t.isNonEmptyArray)(h.enabledApiProposals)&&(this._logService.error(`Extension '${h.identifier.value} CANNOT USE these API proposals '${h.enabledApiProposals?.join(", ")||"*"}'. You MUST start in extension development mode or use the --enable-proposed-api command line flag`),h.enabledApiProposals=[])}};e.ExtensionsProposedApi=v,e.ExtensionsProposedApi=v=fe([O(0,b.ILogService),O(1,T.IWorkbenchEnvironmentService),O(2,D.IProductService)],v)}),define(Q[121],Y([1,0,3075,15,63,95,219,16,112,1353,52,881]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsRegistry=e.ExtensionsRegistryImpl=e.schema=e.ExtensionPoint=e.ExtensionPointUserDelta=e.ExtensionMessageCollector=void 0;const a=f.Registry.as(T.Extensions.JSONContribution);class r{constructor(l,n,g){this._messageHandler=l,this._extension=n,this._extensionPointId=g}_msg(l,n){this._messageHandler({type:l,message:n,extensionId:this._extension.identifier,extensionPointId:this._extensionPointId})}error(l){this._msg(b.default.Error,l)}warn(l){this._msg(b.default.Warning,l)}info(l){this._msg(b.default.Info,l)}}e.ExtensionMessageCollector=r;class i{static _toSet(l){const n=new v.ExtensionIdentifierSet;for(let g=0,w=l.length;g<w;g++)n.add(l[g].description.identifier);return n}static compute(l,n){if(!l||!l.length)return new i(n,[]);if(!n||!n.length)return new i([],l);const g=this._toSet(l),w=this._toSet(n),E=n.filter(I=>!g.has(I.description.identifier)),C=l.filter(I=>!w.has(I.description.identifier));return new i(E,C)}constructor(l,n){this.added=l,this.removed=n}}e.ExtensionPointUserDelta=i;class s{constructor(l,n){this.name=l,this.defaultExtensionKind=n,this._handler=null,this._users=null,this._delta=null}setHandler(l){if(this._handler!==null)throw new Error("Handler already set!");this._handler=l,this._handle()}acceptUsers(l){this._delta=i.compute(this._users,l),this._users=l,this._handle()}_handle(){if(!(this._handler===null||this._users===null||this._delta===null))try{this._handler(this._users,this._delta)}catch(l){(0,y.onUnexpectedError)(l)}}}e.ExtensionPoint=s;const o={type:"string",enum:["ui","workspace"],enumDescriptions:[t.localize(0,null),t.localize(1,null)]},u="vscode://schemas/vscode-extensions";e.schema={properties:{engines:{type:"object",description:t.localize(2,null),properties:{vscode:{type:"string",description:t.localize(3,null),default:"^1.22.0"}}},publisher:{description:t.localize(4,null),type:"string"},displayName:{description:t.localize(5,null),type:"string"},categories:{description:t.localize(6,null),type:"array",uniqueItems:!0,items:{oneOf:[{type:"string",enum:v.EXTENSION_CATEGORIES},{type:"string",const:"Languages",deprecationMessage:t.localize(7,null)}]}},galleryBanner:{type:"object",description:t.localize(8,null),properties:{color:{description:t.localize(9,null),type:"string"},theme:{description:t.localize(10,null),type:"string",enum:["dark","light"]}}},contributes:{description:t.localize(11,null),type:"object",properties:{},default:{}},preview:{type:"boolean",description:t.localize(12,null)},enableProposedApi:{type:"boolean",deprecationMessage:t.localize(13,null)},enabledApiProposals:{markdownDescription:t.localize(14,null),type:"array",uniqueItems:!0,items:{type:"string",enum:Object.keys(m.allApiProposals),markdownEnumDescriptions:Object.values(m.allApiProposals)}},api:{markdownDescription:t.localize(15,null),type:"string",enum:["none"],enumDescriptions:[t.localize(16,null)]},activationEvents:{description:t.localize(17,null),type:"array",items:{type:"string",defaultSnippets:[{label:"onWebviewPanel",description:t.localize(18,null),body:"onWebviewPanel:viewType"},{label:"onLanguage",description:t.localize(19,null),body:"onLanguage:${1:languageId}"},{label:"onCommand",description:t.localize(20,null),body:"onCommand:${2:commandId}"},{label:"onDebug",description:t.localize(21,null),body:"onDebug"},{label:"onDebugInitialConfigurations",description:t.localize(22,null),body:"onDebugInitialConfigurations"},{label:"onDebugDynamicConfigurations",description:t.localize(23,null),body:"onDebugDynamicConfigurations"},{label:"onDebugResolve",description:t.localize(24,null),body:"onDebugResolve:${6:type}"},{label:"onDebugAdapterProtocolTracker",description:t.localize(25,null),body:"onDebugAdapterProtocolTracker:${6:type}"},{label:"workspaceContains",description:t.localize(26,null),body:"workspaceContains:${4:filePattern}"},{label:"onStartupFinished",description:t.localize(27,null),body:"onStartupFinished"},{label:"onTaskType",description:t.localize(28,null),body:"onTaskType:${1:taskType}"},{label:"onFileSystem",description:t.localize(29,null),body:"onFileSystem:${1:scheme}"},{label:"onEditSession",description:t.localize(30,null),body:"onEditSession:${1:scheme}"},{label:"onSearch",description:t.localize(31,null),body:"onSearch:${7:scheme}"},{label:"onView",body:"onView:${5:viewId}",description:t.localize(32,null)},{label:"onUri",body:"onUri",description:t.localize(33,null)},{label:"onOpenExternalUri",body:"onOpenExternalUri",description:t.localize(34,null)},{label:"onCustomEditor",body:"onCustomEditor:${9:viewType}",description:t.localize(35,null)},{label:"onNotebook",body:"onNotebook:${1:type}",description:t.localize(36,null)},{label:"onAuthenticationRequest",body:"onAuthenticationRequest:${11:authenticationProviderId}",description:t.localize(37,null)},{label:"onRenderer",description:t.localize(38,null),body:"onRenderer:${11:rendererId}"},{label:"onTerminalProfile",body:"onTerminalProfile:${1:terminalId}",description:t.localize(39,null)},{label:"onTerminalQuickFixRequest",body:"onTerminalQuickFixRequest:${1:quickFixId}",description:t.localize(40,null)},{label:"onWalkthrough",body:"onWalkthrough:${1:walkthroughID}",description:t.localize(41,null)},{label:"*",description:t.localize(42,null),body:"*"}]}},badges:{type:"array",description:t.localize(43,null),items:{type:"object",required:["url","href","description"],properties:{url:{type:"string",description:t.localize(44,null)},href:{type:"string",description:t.localize(45,null)},description:{type:"string",description:t.localize(46,null)}}}},markdown:{type:"string",description:t.localize(47,null),enum:["github","standard"],default:"github"},qna:{default:"marketplace",description:t.localize(48,null),anyOf:[{type:["string","boolean"],enum:["marketplace",!1]},{type:"string"}]},extensionDependencies:{description:t.localize(49,null),type:"array",uniqueItems:!0,items:{type:"string",pattern:D.EXTENSION_IDENTIFIER_PATTERN}},extensionPack:{description:t.localize(50,null),type:"array",uniqueItems:!0,items:{type:"string",pattern:D.EXTENSION_IDENTIFIER_PATTERN}},extensionKind:{description:t.localize(51,null),type:"array",items:o,default:["workspace"],defaultSnippets:[{body:["ui"],description:t.localize(52,null)},{body:["workspace"],description:t.localize(53,null)},{body:["ui","workspace"],description:t.localize(54,null)},{body:["workspace","ui"],description:t.localize(55,null)},{body:[],description:t.localize(56,null)}]},capabilities:{description:t.localize(57,null),type:"object",properties:{virtualWorkspaces:{description:t.localize(58,null),type:["boolean","object"],defaultSnippets:[{label:"limited",body:{supported:"${1:limited}",description:"${2}"}},{label:"false",body:{supported:!1,description:"${2}"}}],default:(!0).valueOf,properties:{supported:{markdownDescription:t.localize(59,null),type:["string","boolean"],enum:["limited",!0,!1],enumDescriptions:[t.localize(60,null),t.localize(61,null),t.localize(62,null)]},description:{type:"string",markdownDescription:t.localize(63,null)}}},untrustedWorkspaces:{description:t.localize(64,null),type:"object",required:["supported"],defaultSnippets:[{body:{supported:"${1:limited}",description:"${2}"}}],properties:{supported:{markdownDescription:t.localize(65,null),type:["string","boolean"],enum:["limited",!0,!1],enumDescriptions:[t.localize(66,null),t.localize(67,null),t.localize(68,null)]},restrictedConfigurations:{description:t.localize(69,null),type:"array",items:{type:"string"}},description:{type:"string",markdownDescription:t.localize(70,null)}}}}},sponsor:{description:t.localize(71,null),type:"object",defaultSnippets:[{body:{url:"${1:https:}"}}],properties:{url:{description:t.localize(72,null),type:"string"}}},scripts:{type:"object",properties:{"vscode:prepublish":{description:t.localize(73,null),type:"string"},"vscode:uninstall":{description:t.localize(74,null),type:"string"}}},icon:{type:"string",description:t.localize(75,null)},l10n:{type:"string",description:t.localize(76,null)},pricing:{type:"string",markdownDescription:t.localize(77,null),enum:["Free","Trial"],default:"Free"}}};class d{constructor(){this._extensionPoints=new Map}registerExtensionPoint(l){if(this._extensionPoints.has(l.extensionPoint))throw new Error("Duplicate extension point: "+l.extensionPoint);const n=new s(l.extensionPoint,l.defaultExtensionKind);return this._extensionPoints.set(l.extensionPoint,n),l.activationEventsGenerator&&h.ImplicitActivationEvents.register(l.extensionPoint,l.activationEventsGenerator),e.schema.properties.contributes.properties[l.extensionPoint]=l.jsonSchema,a.registerSchema(u,e.schema),n}getExtensionPoints(){return Array.from(this._extensionPoints.values())}}e.ExtensionsRegistryImpl=d;const p={ExtensionsRegistry:"ExtensionsRegistry"};f.Registry.add(p.ExtensionsRegistry,new d),e.ExtensionsRegistry=f.Registry.as(p.ExtensionsRegistry),a.registerSchema(u,e.schema),a.registerSchema(S.productSchemaId,{properties:{extensionEnabledApiProposals:{description:t.localize(78,null),type:"object",properties:{},additionalProperties:{anyOf:[{type:"array",uniqueItems:!0,items:{type:"string",enum:Object.keys(m.allApiProposals),markdownEnumDescriptions:Object.values(m.allApiProposals)}}]}}}})}),define(Q[3763],Y([1,0,121,1980,7,26]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.accountsContribution=void 0;const T={type:"object",properties:{id:{description:(0,y.localize)(0,null),type:"string"},icon:{description:(0,y.localize)(1,null),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,y.localize)(2,null),type:"string"},dark:{description:(0,y.localize)(3,null),type:"string"}}}]}}};e.accountsContribution={description:(0,y.localize)(4,null),oneOf:[T,{type:"array",items:T}]},t.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"account-type",jsonSchema:e.accountsContribution}).setHandler(f=>{function v(m,S){const{icon:h,id:a}=m;if(h){const r=a;if(typeof h=="string"){const i=D.joinPath(S.description.extensionLocation,h);(0,b.createCSSRule)(`.codicon.${r}`,`background-image: ${(0,b.asCSSUrl)(i)}`)}else{const i=D.joinPath(S.description.extensionLocation,h.light),s=D.joinPath(S.description.extensionLocation,h.dark);(0,b.createCSSRule)(`.codicon.${r}, .hc-light .codicon.${r}`,`background-image: ${(0,b.asCSSUrl)(i)}`),(0,b.createCSSRule)(`.vs-dark .codicon.${r}, .hc-black .codicon.${r}`,`background-image: ${(0,b.asCSSUrl)(s)}`)}}}for(let m of f){const{value:S}=m;if(Array.isArray(S))for(let h of S)v(h,m);else v(S,m)}})}),define(Q[3764],Y([1,0,121,2004,371,591,455,454,872,141]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const S=[T.WIDGETS_CONTAINER,f.GRID_CONTAINER,v.WEBVIEW_CONTAINER,D.NAV_SECTION],h={type:"object",properties:{id:{type:"string",description:(0,y.localize)(0,null)},container:{description:(0,y.localize)(1,null),type:"object",properties:(0,b.generateContainerTypeSchemaProperties)()}}},a={description:(0,y.localize)(2,null),oneOf:[h,{type:"array",items:h}]};t.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"dashboard.containers",jsonSchema:a}).setHandler(r=>{function i(s,o){const{id:u,container:d}=s;if(!u){o.collector.error((0,y.localize)(3,null));return}if(!d){o.collector.error((0,y.localize)(4,null));return}if(Object.keys(d).length!==1){o.collector.error((0,y.localize)(5,null));return}let p=!0;const c=Object.keys(d)[0],l=(0,m.values)(d)[0];if(!S.find(g=>g===c)){o.collector.error((0,y.localize)(6,null));return}switch(c){case T.WIDGETS_CONTAINER:p=(0,T.validateWidgetContainerContribution)(o,l);break;case f.GRID_CONTAINER:p=(0,f.validateGridContainerContribution)(o,l);break;case D.NAV_SECTION:p=(0,D.validateNavSectionContributionAndRegisterIcon)(o,l);break}p&&(0,b.registerContainer)({id:u,container:d})}for(const s of r){const{value:o}=s;if(Array.isArray(o))for(const u of o)i(u,s);else i(o,s)}})}),define(Q[623],Y([1,0,16,56,2020,121,1336,1337,509]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerTabGroup=e.registerTab=e.getFlavor=e.Extensions=void 0,e.Extensions={DashboardContributions:"dashboard.contributions"};function m(d,p,c){const n=t.Registry.as(e.Extensions.DashboardContributions).getProperties(c);if(!n){p.error("No property definitions found for provider",c);return}let g;if(n.flavors.length===1)g=n.flavors[0];else if(n.flavors.length===0){p.error('No flavor definitions found for "',c,". If there are not multiple flavors of this provider, add one flavor without a condition");return}else{const w=n.flavors.filter(E=>{if(E.conditions){let C=!0;for(let I=0;I<E.conditions.length;I++)C=C&&S(p,d,E,E.conditions[I]);return C}else return E.condition?S(p,d,E,E.condition):(p.error("No condition was specified."),!1)});if(w.length===0){p.error("Could not determine flavor");return}else if(w.length>1){p.error("Multiple flavors matched correctly for this provider",c);return}g=w[0]}return g}e.getFlavor=m;function S(d,p,c,l){let n=p[l.field];switch(typeof l.value=="string"&&(n=n.toString()),l.operator){case"==":return n===l.value;case"!=":return n!==l.value;case">=":return n>=l.value;case"<=":return n<=l.value;default:return d.error('Could not parse operator: "',l.operator,'" on item "',c,'"'),!1}}class h{constructor(){this._properties=new Map,this._tabs=new Array,this._tabGroups=new Array,this._configurationRegistry=t.Registry.as(y.Extensions.Configuration)}registerDashboardProvider(p,c){this._properties.set(p,c)}getProperties(p){return this._properties.get(p)}registerTab(p){this._tabs.push(p);let c=this._configurationRegistry.getConfigurations().find(l=>l.id===v.DASHBOARD_CONFIG_ID);if(c){let l=c.properties[T.DATABASE_DASHBOARD_TABS].items.properties[v.DASHBOARD_TABS_KEY_PROPERTY];l.enum.push(p.id),l.enumDescriptions.push(p.description||"");let n=c.properties[f.SERVER_DASHBOARD_TABS].items.properties[v.DASHBOARD_TABS_KEY_PROPERTY];n.enum.push(p.id),n.enumDescriptions.push(p.description||""),this._configurationRegistry.notifyConfigurationSchemaUpdated(c)}}registerTabGroup(p){this.tabGroups.findIndex(c=>c.id===p.id)===-1&&this.tabGroups.push(p)}get tabs(){return this._tabs}get tabGroups(){return this._tabGroups}}const a=new h;t.Registry.add(e.Extensions.DashboardContributions,a);function r(d){a.registerTab(d)}e.registerTab=r;function i(d){a.registerTabGroup(d)}e.registerTabGroup=i;const s={description:b.localize(0,null),type:"object",properties:{displayName:{description:b.localize(1,null),type:"string"},value:{description:b.localize(2,null),type:"string"},ignore:{description:b.localize(3,null),type:"array",items:{type:"string"}},default:{description:b.localize(4,null),type:"string"}}},o={description:b.localize(5,null),type:"object",properties:{id:{description:b.localize(6,null),type:"string"},condition:{description:b.localize(7,null),type:"object",properties:{field:{description:b.localize(8,null),type:"string"},operator:{description:b.localize(9,null),type:"string",enum:["==","<=",">=","!="]},value:{description:b.localize(10,null),type:["string","boolean"]}}},databaseProperties:{description:b.localize(11,null),type:"array",items:s},serverProperties:{description:b.localize(12,null),type:"array",items:s}}},u={description:b.localize(13,null),type:"object",properties:{provider:{description:b.localize(14,null),type:"string"},flavors:{description:b.localize(15,null),type:"array",items:o}}};D.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"dashboard",jsonSchema:u}).setHandler(d=>{function p(c,l){a.registerDashboardProvider(c.provider,c)}for(let c of d){const{value:l}=c;if(Array.isArray(l))for(let n of l)p(n,c);else p(l,c)}})}),define(Q[3765],Y([1,0,121,2016,17,117,623,371,591,455,454,141,1107]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r={type:"object",properties:{id:{type:"string",description:(0,y.localize)(0,null)},title:{type:"string",description:(0,y.localize)(1,null)},description:{description:(0,y.localize)(2,null),type:"string"},when:{description:(0,y.localize)(3,null),type:"string"},provider:{description:(0,y.localize)(4,null),type:["string","array"]},container:{description:(0,y.localize)(5,null),type:"object",properties:(0,f.generateContainerTypeSchemaProperties)()},alwaysShow:{description:(0,y.localize)(6,null),type:"boolean"},isHomeTab:{description:(0,y.localize)(7,null),type:"boolean"},group:{description:(0,y.localize)(8,null),type:"string"},hideRefreshTask:{description:(0,y.localize)(9,null),type:"boolean"},icon:{description:(0,y.localize)(10,null),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,y.localize)(11,null),type:"string"},dark:{description:(0,y.localize)(12,null),type:"string"}}}]}}},i={description:(0,y.localize)(13,null),oneOf:[r,{type:"array",items:r}]};t.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"dashboard.tabs",jsonSchema:i}).setHandler(p=>{function c(l,n){let{description:g,container:w,provider:E,title:C,when:I,id:_,alwaysShow:A,isHomeTab:k,group:L,icon:R,hideRefreshTask:M}=l;b.isBoolean(A)||(A=!0);const N=n.description.publisher;if(!C){n.collector.error((0,y.localize)(14,null));return}if(g||n.collector.warn((0,y.localize)(15,null)),!w){n.collector.error((0,y.localize)(16,null));return}if(E||(E=D.mssqlProviderName,k=!1),Object.keys(w).length!==1){n.collector.error((0,y.localize)(17,null));return}let P=!0;const x=Object.keys(w)[0],F=(0,h.values)(w)[0];switch(x){case m.WIDGETS_CONTAINER:P=(0,m.validateWidgetContainerContribution)(n,F);break;case S.GRID_CONTAINER:P=(0,S.validateGridContainerContribution)(n,F);break;case v.NAV_SECTION:P=(0,v.validateNavSectionContributionAndRegisterIcon)(n,F);break}let V;(0,a.isValidIcon)(R,n)&&(V=(0,a.createCSSRuleForIcon)(R,n)),P&&(0,T.registerTab)({description:g,title:C,container:w,provider:E,when:I,id:_,alwaysShow:A,publisher:N,isHomeTab:k,group:L,iconClass:V,hideRefreshTask:M})}for(const l of p){const{value:n}=l;if(Array.isArray(n))for(const g of n)c(g,l);else c(n,l)}});const s={type:"object",properties:{id:{type:"string",description:(0,y.localize)(18,null)},title:{type:"string",description:(0,y.localize)(19,null)}}},o={description:(0,y.localize)(20,null),oneOf:[s,{type:"array",items:s}]};t.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"dashboard.tabGroups",jsonSchema:o}).setHandler(p=>{function c(l,n){let{id:g,title:w}=l;if(!g){n.collector.error((0,y.localize)(21,null));return}if(!w){n.collector.error((0,y.localize)(22,null));return}(0,T.registerTabGroup)({id:g,title:w})}for(const l of p){const{value:n}=l;if(Array.isArray(n))for(const g of n)c(g,l);else c(n,l)}}),[{id:"administration",title:(0,y.localize)(23,null)},{id:"monitoring",title:(0,y.localize)(24,null)},{id:"performance",title:(0,y.localize)(25,null)},{id:"security",title:(0,y.localize)(26,null)},{id:"troubleshooting",title:(0,y.localize)(27,null)},{id:"settings",title:(0,y.localize)(28,null)}].forEach(p=>(0,T.registerTabGroup)(p)),[{id:"databasesTab",description:(0,y.localize)(29,null),provider:"MSSQL",title:(0,y.localize)(30,null),when:"dashboardContext == 'server' && !mssql:iscloud && mssql:engineedition != 11",group:"home",iconClass:"database-colored",publisher:void 0,container:{"widgets-container":[{gridItemConfig:{sizex:3,sizey:2},widget:{"explorer-widget":{}},hideHeader:!0}]}}].forEach(p=>(0,T.registerTab)(p))}),define(Q[3766],Y([1,0,573,399,2291,187,256,623,451,3158,1138,774,7,87,15,4,2028,88,13,101]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerTable=e.ConnectionProfilePropertyName=void 0;const c=o.localize(0,null),l=o.localize(1,null),n=50,g="NameWithIcon";e.ConnectionProfilePropertyName="connection_profile";class w extends s.Disposable{constructor(C,I,_,A,k,L,R,M,N,P,x,F,V,W,z){super(),this.parentElement=C,this.activeRoute=I,this.router=_,this.context=A,this.bootStrapService=k,this.themeService=L,this.contextMenuService=R,this.menuService=M,this.contextKeyService=N,this.progressService=P,this.logService=x,this.dashboardService=F,this.accessibilityService=V,this.quickInputService=W,this.componentContextService=z,this.contextKey=new v.ItemContextKey(this.contextKeyService),this._explorerView=new S.ExplorerView(this.context);const B=this.bootStrapService.connectionManagementService.connectionInfo;this._propertiesToDisplay=this._explorerView.getPropertyList((0,f.getFlavor)(B.serverInfo,this.logService,B.providerId));const K=new m.ExplorerFilter(this.context,this.propertiesToFilter);this._view=new T.TableDataView(void 0,void 0,void 0,H=>K.filter(this._filterStr,H)),this._table=new D.Table(C,V,W,p.defaultTableStyles,{dataProvider:this._view},{forceFitColumns:!0}),this._table.setSelectionModel(new y.RowSelectionModel),this._actionsColumn=new t.ButtonColumn({id:"actions",iconCssClass:"toggle-more",title:c,name:l,width:n,resizable:!1}),this._table.registerPlugin(this._actionsColumn),this._register(this._actionsColumn.onClick(H=>{this.showContextMenu(H.item,H.position)})),this._register(this._table.onContextMenu(H=>{H.cell&&this.showContextMenu(this._view.getItem(H.cell.row),H.anchor)})),this._register(this._table.onDoubleClick(H=>{H.cell&&this.handleDoubleClick(this._view.getItem(H.cell.row))})),this._register(this._view),this._register(this._view.onRowCountChange(()=>{this._table.updateRowCount()})),this._register(this._view.onFilterStateChange(()=>{this._table.grid.invalidateAllRows(),this._table.updateRowCount()})),this._register(this.dashboardService.onLayout(()=>{this._table.grid.invalidateAllRows(),this._table.updateRowCount()})),this._register(this.componentContextService.registerTable(this._table))}showContextMenu(C,I){const _=C instanceof h.ObjectMetadataWrapper?C:C[e.ConnectionProfilePropertyName];this.contextKey.set({resource:_,providerName:this.bootStrapService.connectionManagementService.connectionInfo.providerId,isCloud:this.bootStrapService.connectionManagementService.connectionInfo.serverInfo.isCloud,engineEdition:this.bootStrapService.connectionManagementService.connectionInfo.serverInfo.engineEditionId});let A;_ instanceof h.ObjectMetadataWrapper?A={object:_,profile:this.bootStrapService.connectionManagementService.connectionInfo.connectionProfile}:A={profile:_.toIConnectionProfile(),uri:this.bootStrapService.getUnderlyingUri()};const k=this.menuService.createMenu(d.MenuId.ExplorerWidgetContext,this.contextKeyService),M={primary:[],secondary:[]};(0,u.createAndFillInContextMenuActions)(k,{shouldForwardArgs:!0},M,"inline"),this.contextMenuService.showContextMenu({getAnchor:()=>I,getActions:()=>M.secondary,getActionsContext:()=>A})}handleDoubleClick(C){this.context==="server"&&this.progressService.showWhile(this.bootStrapService.connectionManagementService.changeDatabase(C[S.NameProperty]).then(I=>{this.router.navigate(["database-dashboard"],{relativeTo:this.activeRoute,skipLocationChange:!0}).catch(i.onUnexpectedError)}))}filter(C){this._filterStr=C,this._view.clearFilter(),this._view.filter();const I=this._view.getItems().length;let _;I===0?_=o.localize(2,null):I===1?_=o.localize(3,null):_=o.localize(4,null,I),(0,r.status)(_)}layout(){this._table.layout(new a.Dimension(a.getContentWidth(this.parentElement),a.getContentHeight(this.parentElement))),this._table.columns=this.columnDefinitions}setData(C){this._table.columns=this.columnDefinitions,this._view.clear(),this._view.clearFilter(),C.forEach(I=>{I[g]={iconCssClass:this._explorerView.getIconClass(I),title:I[S.NameProperty]}}),this._view.push(C)}get columnDefinitions(){const C=a.getContentWidth(this.parentElement);let I=0;this._propertiesToDisplay.forEach(A=>{A.widthWeight&&(I+=A.widthWeight)});const _=this._propertiesToDisplay.map(A=>{const k=A.widthWeight?C*(A.widthWeight/I):void 0;return A.value===S.NameProperty?new b.TextWithIconColumn({id:A.value,width:k,field:g,name:A.displayName}).definition:{id:A.value,field:A.value,name:A.displayName,width:k}});return _.push(this._actionsColumn.definition),_}get propertiesToFilter(){const C=this._propertiesToDisplay.map(I=>I.value);return this.context==="database"&&C.push("fullName"),C}}e.ExplorerTable=w}),define(Q[3767],Y([1,0,55,696,230,3239,121,16,28]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const m=f.Registry.as(b.Extensions.InsightContribution);(0,y.registerDashboardWidget)("insights-widget","",D.insightsSchema),T.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"dashboard.insights",jsonSchema:D.insightsContribution}).setHandler(S=>{function h(a,r){a.contrib.queryFile&&(a.contrib.queryFile=(0,t.join)(r.description.extensionLocation.fsPath,a.contrib.queryFile)),a.contrib.details&&a.contrib.details.queryFile&&(a.contrib.details.queryFile=(0,t.join)(r.description.extensionLocation.fsPath,a.contrib.details.queryFile)),a.contrib.id=a.id,(0,y.registerNonCustomDashboardWidget)(a.id,"",a.contrib),m.registerExtensionInsight(a.id,a.contrib)}for(const a of S){const{value:r}=a;if(Array.isArray(r))for(const i of r)h(i,a);else h(r,a)}}),v.CommandsRegistry.registerCommand("azdata.widget.setAutoRefreshState",function(S,h,a,r){(0,b.setWidgetAutoRefreshState)(h,a,r)})}),define(Q[1354],Y([1,0,40,554,144,623,17,2041,11,136,831,19,417]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PropertiesWidgetComponent=void 0;let r=class extends y.DashboardWidget{constructor(s,o,u,d,p){super(o),this._bootstrap=s,this._el=u,this.logService=p,this.loadingMessage=f.localize(0,null),this.loadingCompletedMessage=f.localize(1,null),this._config=d,this.init()}ngOnInit(){this._inited=!0,this._changeRef.detectChanges()}refresh(){this.init()}init(){this._connection=this._bootstrap.connectionManagementService.connectionInfo,this.setLoadingStatus(!0),this._register((0,m.subscriptionToDisposable)(this._bootstrap.adminService.databaseInfo.subscribe(s=>{const o=this.parseProperties(s);this._inited?(this._propertiesContainer.propertyItems=o,this._changeRef.detectChanges()):this.logService.info("Database properties successfully retrieved but component not initialized yet"),this.setLoadingStatus(!1)},s=>{this.setLoadingStatus(!1),this._el.nativeElement.innerText=f.localize(2,null)})))}parseProperties(s){const o=this._config.provider;let u;if(this._config.widget["properties-widget"]&&this._config.widget["properties-widget"].properties)u=this._config.widget["properties-widget"].properties;else{const p=(0,D.getFlavor)(this._connection.serverInfo,this.logService,o);if(!p)return[];this._config.context==="database"?(Array.isArray(p.databaseProperties)||this.logService.error("flavor",p.flavor," does not have a definition for database properties"),Array.isArray(p.serverProperties)||this.logService.error("flavor",p.flavor," does not have a definition for server properties"),u=p.databaseProperties):(Array.isArray(p.serverProperties)||this.logService.error("flavor",p.flavor," does not have a definition for server properties"),u=p.serverProperties)}let d;return this._config.context==="database"?s?.options&&(d=s.options):d=this._connection.serverInfo,u.map(p=>{let c=this.getValueOrDefault(d,p.value,p.default||"--");if(p.ignore!==void 0&&c!=="--"){for(let l=0;l<p.ignore.length;l++)if(c===p.ignore[0]){c=p.default||"--";break}}return{displayName:p.displayName,value:c}})}getValueOrDefault(s,o,u){let d,p=o in s?s:"options"in s&&o in s.options?s.options:void 0;return p&&(d=p[o]),T.isUndefinedOrNull(d)&&(d=u),d}};e.PropertiesWidgetComponent=r,fe([(0,t.ViewChild)(S.PropertiesContainer)],r.prototype,"_propertiesContainer",void 0),e.PropertiesWidgetComponent=r=fe([(0,t.Component)({selector:"properties-widget",template:` <loading-spinner *ngIf="_loading" [loading]="_loading" [loadingMessage]="loadingMessage" [loadingCompletedMessage]="loadingCompletedMessage"></loading-spinner> <properties-container [style.display]="_loading ? 'none' : ''"></properties-container>`}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>b.CommonServiceInterface))),O(1,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(2,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(3,(0,t.Inject)(y.WIDGET_CONFIG)),O(4,(0,t.Inject)(v.ILogService))],r),(0,h.registerThemingParticipant)((i,s)=>{const o=i.getColor(a.PROPERTIES_CONTAINER_PROPERTY_NAME);o&&s.addRule(` properties-widget .propertyName, properties-widget .splitter { color: ${o} }`);const u=i.getColor(a.PROPERTIES_CONTAINER_PROPERTY_VALUE);u&&s.addRule(`properties-widget .propertyValue { color: ${u} }`)})}),define(Q[3768],Y([1,0,2146,16,121,1167,26]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceViewResourcesExtensionHandler=void 0;const f={type:"object",properties:{id:{description:(0,t.localize)(0,null),type:"string"},name:{description:(0,t.localize)(1,null),type:"string"},icon:{description:(0,t.localize)(2,null),type:"string"}}},v={description:(0,t.localize)(3,null),type:"array",items:f,default:[]},m=b.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"resourceViewResources",jsonSchema:v});class S{constructor(){this.handleAndRegisterCustomViews()}handleAndRegisterCustomViews(){const a=y.Registry.as(D.Extensions.ResourceViewerExtension);m.setHandler(r=>{for(let i of r){const{value:s,collector:o}=i;for(const u of s){if(!this.isValidResource(u,o))return;const d=T.joinPath(i.description.extensionLocation,u.icon),p={name:u.name,id:u.id,icon:d};a.registerResource(p)}}})}isValidResource(a,r){return typeof a.id!="string"?(r.error((0,t.localize)(4,null,"id")),!1):typeof a.name!="string"?(r.error((0,t.localize)(5,null,"name")),!1):typeof a.icon!="string"?(r.error((0,t.localize)(6,null,"icon")),!1):!0}}e.ResourceViewResourcesExtensionHandler=S}),define(Q[1355],Y([1,0,121,2227,16,6]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.NotebookProviderRegistryId=void 0,e.NotebookProviderRegistryId="notebooks.providers.registry",e.Extensions={NotebookProviderDescriptionContribution:"notebook.providers",NotebookLanguageMagicContribution:"notebook.languagemagics"};let T={type:"object",default:{provider:"",fileExtensions:[],standardKernels:[]},properties:{provider:{description:(0,y.localize)(0,null),type:"string"},fileExtensions:{description:(0,y.localize)(1,null),type:"array",items:{type:"string"}},standardKernels:{description:(0,y.localize)(2,null),type:"array",items:{type:"object",properties:{name:{type:"string"},displayName:{type:"string"},connectionProviderIds:{type:"array",items:{type:"string"}},supportedLanguages:{type:"array",items:{type:"string"}}}}}}},f={description:(0,y.localize)(3,null),type:"array",items:T},v={type:"object",default:{magic:"",language:"",kernels:[],executionTarget:null},properties:{magic:{description:(0,y.localize)(4,null),type:"string"},language:{description:(0,y.localize)(5,null),type:"string"},executionTarget:{description:(0,y.localize)(6,null),type:"string"},kernels:{description:(0,y.localize)(7,null),type:"array",items:{type:"string"}}}},m={description:(0,y.localize)(8,null),type:"array",items:v};class S{constructor(){this._providerDescriptionRegistration=new Map,this._magicToRegistration=new Map,this._onNewDescriptionRegistration=new D.Emitter,this.onNewDescriptionRegistration=this._onNewDescriptionRegistration.event}registerProviderDescription(r){this._providerDescriptionRegistration.set(r.provider,r),this._onNewDescriptionRegistration.fire({id:r.provider,registration:r})}get providerDescriptions(){let r=[];return this._providerDescriptionRegistration.forEach(i=>r.push(i)),r}registerNotebookLanguageMagic(r){this._magicToRegistration.set(r.magic,r)}get languageMagics(){let r=[];return this._magicToRegistration.forEach(i=>r.push(i)),r}}const h=new S;b.Registry.add(e.NotebookProviderRegistryId,h),t.ExtensionsRegistry.registerExtensionPoint({extensionPoint:e.Extensions.NotebookProviderDescriptionContribution,jsonSchema:f}).setHandler(a=>{for(let r of a){const{value:i}=r;for(let s of i)h.registerProviderDescription(s)}}),t.ExtensionsRegistry.registerExtensionPoint({extensionPoint:e.Extensions.NotebookLanguageMagicContribution,jsonSchema:m}).setHandler(a=>{for(let r of a){const{value:i}=r;for(let s of i)h.registerNotebookLanguageMagic(s)}})}),define(Q[3769],Y([1,0,2517,42,16,121,56,219,245,17,112]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const h=b.Registry.as(f.Extensions.JSONContribution),a=b.Registry.as(T.Extensions.Configuration),r={type:"object",defaultSnippets:[{body:{title:"",properties:{}}}],properties:{title:{description:t.localize(0,null),type:"string"},order:{description:t.localize(1,null),type:"integer"},properties:{description:t.localize(2,null),type:"object",propertyNames:{pattern:"\\S+",patternErrorMessage:t.localize(3,null)},additionalProperties:{anyOf:[{title:t.localize(4,null),$ref:"http://json-schema.org/draft-07/schema#"},{type:"object",properties:{scope:{type:"string",enum:["application","machine","window","resource","language-overridable","machine-overridable"],default:"window",enumDescriptions:[t.localize(5,null),t.localize(6,null),t.localize(7,null),t.localize(8,null),t.localize(9,null),t.localize(10,null)],markdownDescription:t.localize(11,null)},enumDescriptions:{type:"array",items:{type:"string"},description:t.localize(12,null)},markdownEnumDescriptions:{type:"array",items:{type:"string"},description:t.localize(13,null)},enumItemLabels:{type:"array",items:{type:"string"},markdownDescription:t.localize(14,null,"`enum`")},markdownDescription:{type:"string",description:t.localize(15,null)},deprecationMessage:{type:"string",description:t.localize(16,null)},markdownDeprecationMessage:{type:"string",description:t.localize(17,null)},editPresentation:{type:"string",enum:["singlelineText","multilineText"],enumDescriptions:[t.localize(18,null),t.localize(19,null)],default:"singlelineText",description:t.localize(20,null)},order:{type:"integer",description:t.localize(21,null)},ignoreSync:{type:"boolean",description:t.localize(22,null)}}}]}}}};let i;const s=D.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"configurationDefaults",jsonSchema:{$ref:T.configurationDefaultsSchemaId}});s.setHandler((d,{added:p,removed:c})=>{i&&a.deltaConfiguration(i);const l=i={};if(queueMicrotask(()=>{i===l&&(a.deltaConfiguration(i),i=void 0)}),c.length){const n=c.map(g=>({overrides:y.deepClone(g.value),source:{id:g.description.identifier.value,displayName:g.description.displayName}}));i.removedDefaults=n}if(p.length){const n=a.getConfigurationProperties(),g=[6,3,4,5],w=p.map(E=>{const C=y.deepClone(E.value);for(const I of Object.keys(C))if(!T.OVERRIDE_PROPERTY_REGEX.test(I)){const _=n[I];_?.scope&&!g.includes(_.scope)&&(E.collector.warn(t.localize(23,null,I)),delete C[I])}return{overrides:C,source:{id:E.description.identifier.value,displayName:E.description.displayName}}});i.addedDefaults=w}});const o=D.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"configuration",deps:[s],jsonSchema:{description:t.localize(24,null),oneOf:[r,{type:"array",items:r}]}}),u=new S.ExtensionIdentifierMap;o.setHandler((d,{added:p,removed:c})=>{if(i??={},c.length){const w=[];for(const E of c)w.push(...u.get(E.description.identifier)||[]),u.delete(E.description.identifier);i.removedConfigurations=w}const l=new Set;function n(w,E){const C=[],I=y.deepClone(w);return I.title&&typeof I.title!="string"&&E.collector.error(t.localize(25,null)),g(I,E),I.id=w.id||E.description.identifier.value,I.extensionInfo={id:E.description.identifier.value,displayName:E.description.displayName},I.restrictedProperties=E.description.capabilities?.untrustedWorkspaces?.supported==="limited"?E.description.capabilities?.untrustedWorkspaces.restrictedConfigurations:void 0,I.title=I.title||E.description.displayName||E.description.identifier.value,C.push(I),C}function g(w,E){const C=w.properties;if(C){typeof C!="object"&&(E.collector.error(t.localize(26,null)),w.properties={});for(const _ in C){const A=C[_],k=(0,T.validateProperty)(_,A);if(k){delete C[_],E.collector.warn(k);continue}if(l.has(_)){delete C[_],E.collector.warn(t.localize(27,null,_));continue}if(!(0,m.isObject)(A)){delete C[_],E.collector.error(t.localize(28,null,_));continue}l.add(_),A.scope?A.scope.toString()==="application"?A.scope=1:A.scope.toString()==="machine"?A.scope=2:A.scope.toString()==="resource"?A.scope=4:A.scope.toString()==="machine-overridable"?A.scope=6:A.scope.toString()==="language-overridable"?A.scope=5:A.scope=3:A.scope=3}}const I=w.allOf;if(I){E.collector.error(t.localize(29,null));for(const _ of I)g(_,E)}}if(p.length){const w=[];for(const E of p){const C=[],I=E.value;Array.isArray(I)?I.forEach(_=>C.push(...n(_,E))):C.push(...n(I,E)),u.set(E.description.identifier,C),w.push(...C)}i.addedConfigurations=w}a.deltaConfiguration(i),i=void 0}),h.registerSchema("vscode://schemas/workspaceConfig",{allowComments:!0,allowTrailingCommas:!0,default:{folders:[{path:""}],settings:{}},required:["folders"],properties:{folders:{minItems:0,uniqueItems:!0,description:t.localize(30,null),items:{type:"object",defaultSnippets:[{body:{path:"$1"}}],oneOf:[{properties:{path:{type:"string",description:t.localize(31,null)},name:{type:"string",description:t.localize(32,null)}},required:["path"]},{properties:{uri:{type:"string",description:t.localize(33,null)},name:{type:"string",description:t.localize(34,null)}},required:["uri"]}]}},settings:{type:"object",default:{},description:t.localize(35,null),$ref:v.workspaceSettingsSchemaId},launch:{type:"object",default:{configurations:[],compounds:[]},description:t.localize(36,null),$ref:v.launchSchemaId},tasks:{type:"object",default:{version:"2.0.0",tasks:[]},description:t.localize(37,null),$ref:v.tasksSchemaId},extensions:{type:"object",default:{},description:t.localize(38,null),$ref:"vscode://schemas/extensions"},remoteAuthority:{type:"string",doNotSuggest:!0,description:t.localize(39,null)},transient:{type:"boolean",doNotSuggest:!0,description:t.localize(40,null)}},errorMessage:t.localize(41,null)})}),define(Q[3770],Y([1,0,2519,121,26,17]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSONValidationExtensionPoint=void 0;const T=y.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"jsonValidation",defaultExtensionKind:["workspace","web"],jsonSchema:{description:t.localize(0,null),type:"array",defaultSnippets:[{body:[{fileMatch:"${1:file.json}",url:"${2:url}"}]}],items:{type:"object",defaultSnippets:[{body:{fileMatch:"${1:file.json}",url:"${2:url}"}}],properties:{fileMatch:{type:["string","array"],description:t.localize(1,null),items:{type:["string"]}},url:{description:t.localize(2,null),type:"string"}}}}});class f{constructor(){T.setHandler(m=>{for(const S of m){const h=S.value,a=S.collector,r=S.description.extensionLocation;if(!h||!Array.isArray(h)){a.error(t.localize(3,null));return}h.forEach(i=>{if(!(0,D.isString)(i.fileMatch)&&!(Array.isArray(i.fileMatch)&&i.fileMatch.every(D.isString))){a.error(t.localize(4,null));return}const s=i.url;if(!(0,D.isString)(s)){a.error(t.localize(5,null));return}if(s.startsWith("./"))try{const o=b.joinPath(r,s);b.isEqualOrParent(o,r)||a.warn(t.localize(6,null,T.name,o.toString(),r.path))}catch(o){a.error(t.localize(7,null,o.message))}else if(!/^[^:/?#]+:\/\//.test(s)){a.error(t.localize(8,null));return}})}})}}e.JSONValidationExtensionPoint=f}),define(Q[959],Y([1,0,6,83,4,2631,5,44,121]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChatSlashCommandService=e.IChatSlashCommandService=e.slashesExtPoint=void 0;const m={type:"object",required:["command","detail"],properties:{command:{type:"string",markdownDescription:(0,D.localize)(0,null)},detail:{type:"string",markdownDescription:(0,D.localize)(1,null)}}},S={description:(0,D.localize)(2,null),oneOf:[m,{type:"array",items:m}]};e.slashesExtPoint=v.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"slashes",jsonSchema:S});function h(r){return typeof r=="object"&&r&&typeof r.command=="string"&&typeof r.detail=="string"&&(typeof r.sortText>"u"||typeof r.sortText=="string")&&(typeof r.executeImmediately>"u"||typeof r.executeImmediately=="boolean")}e.IChatSlashCommandService=(0,T.createDecorator)("chatSlashCommandService");let a=class{constructor(i){this._extensionService=i,this._commands=new Map,this._onDidChangeCommands=new t.Emitter,this.onDidChangeCommands=this._onDidChangeCommands.event;const s=new b.DisposableStore;e.slashesExtPoint.setHandler(o=>{s.clear();for(const u of o){if(!(0,f.isProposedApiEnabled)(u.description,"chatSlashCommands")){u.collector.error(`The ${e.slashesExtPoint.name} is proposed API`);continue}const{value:d}=u;for(const p of y.Iterable.wrap(d)){if(!h(p)){u.collector.error((0,D.localize)(3,null,e.slashesExtPoint.name,JSON.stringify(p)));continue}s.add(this.registerSlashData({...p}))}}})}dispose(){this._commands.clear(),this._onDidChangeCommands.dispose()}registerSlashData(i){if(this._commands.has(i.command))throw new Error(`Already registered a command with id ${i.command}}`);return this._commands.set(i.command,{data:i}),this._onDidChangeCommands.fire(),(0,b.toDisposable)(()=>{this._commands.delete(i.command)&&this._onDidChangeCommands.fire()})}registerSlashCallback(i,s){const o=this._commands.get(i);if(!o)throw new Error(`No command with id ${i} registered`);return o.command=s,(0,b.toDisposable)(()=>o.command=void 0)}registerSlashCommand(i,s){return(0,b.combinedDisposable)(this.registerSlashData(i),this.registerSlashCallback(i.command,s))}getCommands(){return Array.from(this._commands.values(),i=>i.data)}hasCommand(i){return this._commands.has(i)}async executeCommand(i,s,o,u,d){const p=this._commands.get(i);if(!p)throw new Error("No command with id ${id} NOT registered");if(p.command||await this._extensionService.activateByEvent(`onSlash:${i}`),!p.command)throw new Error(`No command with id ${i} NOT resolved`);await p.command(s,o,u,d)}};e.ChatSlashCommandService=a,e.ChatSlashCommandService=a=fe([O(0,f.IExtensionService)],a)}),define(Q[3771],Y([1,0,14,31,6,110,83,4,186,145,10,2630,28,8,5,11,72,24,30,39,266,607,234,959,608,44]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChatService=void 0;const C="interactive.sessions",I="chat.workspaceTransfer",_=1e3*60,A=25;let k=class extends f.Disposable{get transferredSessionData(){return this._transferredSessionData}constructor(R,M,N,P,x,F,V,W,z){super(),this.storageService=R,this.logService=M,this.extensionService=N,this.instantiationService=P,this.telemetryService=x,this.contextKeyService=F,this.workspaceContextService=V,this.chatSlashCommandService=W,this.chatVariablesService=z,this._providers=new Map,this._sessionModels=new Map,this._pendingRequests=new Map,this._onDidPerformUserAction=this._register(new b.Emitter),this.onDidPerformUserAction=this._onDidPerformUserAction.event,this._onDidSubmitSlashCommand=this._register(new b.Emitter),this.onDidSubmitSlashCommand=this._onDidSubmitSlashCommand.event,this._hasProvider=c.CONTEXT_PROVIDER_EXISTS.bindTo(this.contextKeyService);const B=R.get(C,1,"");if(B){this._persistedSessions=this.deserializeChats(B);const U=Object.keys(this._persistedSessions).length;U>0&&this.trace("constructor",`Restored ${U} persisted sessions`)}else this._persistedSessions={};const K=this.getTransferredSessionData(),H=K?.chat;H&&(this.trace("constructor",`Transferred session ${H.sessionId}`),this._persistedSessions[H.sessionId]=H,this._transferredSessionData={sessionId:H.sessionId,inputValue:K.inputValue}),this._register(R.onWillSaveState(()=>this.saveState()))}saveState(){let R=Array.from(this._sessionModels.values()).filter(N=>N.getRequests().length>0);R=R.concat(Object.values(this._persistedSessions).filter(N=>!this._sessionModels.has(N.sessionId)).filter(N=>N.requests.length)),R.sort((N,P)=>(P.creationDate??0)-(N.creationDate??0)),R=R.slice(0,A),R.length&&this.trace("onWillSaveState",`Persisting ${R.length} sessions`);const M=JSON.stringify(R);R.length&&this.trace("onWillSaveState",`Persisting ${M.length} chars`),this.storageService.store(C,M,1,1)}notifyUserAction(R){if(R.action.kind==="vote")this.telemetryService.publicLog2("interactiveSessionVote",{providerId:R.providerId,direction:R.action.direction===n.InteractiveSessionVoteDirection.Up?"up":"down"});else if(R.action.kind==="copy")this.telemetryService.publicLog2("interactiveSessionCopy",{providerId:R.providerId,copyKind:R.action.copyType===n.InteractiveSessionCopyKind.Action?"action":"toolbar"});else if(R.action.kind==="insert")this.telemetryService.publicLog2("interactiveSessionInsert",{providerId:R.providerId,newFile:!!R.action.newFile});else if(R.action.kind==="command"){const N=a.CommandsRegistry.getCommand(R.action.command.commandId)?R.action.command.commandId:"INVALID";this.telemetryService.publicLog2("interactiveSessionCommand",{providerId:R.providerId,commandId:N})}else R.action.kind==="runInTerminal"&&this.telemetryService.publicLog2("interactiveSessionRunInTerminal",{providerId:R.providerId,languageId:R.action.languageId??""});this._onDidPerformUserAction.fire(R)}trace(R,M){this.logService.trace(`ChatService#${R}: ${M}`)}error(R,M){this.logService.error(`ChatService#${R} ${M}`)}deserializeChats(R){try{const M=(0,v.revive)(JSON.parse(R));if(!Array.isArray(M))throw new Error("Expected array");return M.reduce((P,x)=>{for(const F of x.requests)Array.isArray(F.response)?F.response=F.response.map(V=>typeof V=="string"?new D.MarkdownString(V):V):typeof F.response=="string"&&(F.response=[new D.MarkdownString(F.response)]);return P[x.sessionId]=x,P},{})}catch(M){return this.error("deserializeChats",`Malformed session data: ${M}. [${R.substring(0,20)}${R.length>20?"...":""}]`),{}}}getTransferredSessionData(){const R=this.storageService.getObject(I,0,[]),M=this.workspaceContextService.getWorkspace().folders[0]?.uri;if(!M)return;const N=M.toString(),P=Date.now(),x=R.find(V=>S.URI.revive(V.toWorkspace).toString()===N&&P-V.timestampInMilliseconds<_),F=R.filter(V=>S.URI.revive(V.toWorkspace).toString()!==N&&P-V.timestampInMilliseconds<_);return this.storageService.store(I,JSON.stringify(F),0,1),x}getHistory(){const R=Object.values(this._persistedSessions).filter(M=>M.requests.length>0);return R.sort((M,N)=>(N.creationDate??0)-(M.creationDate??0)),R.filter(M=>!this._sessionModels.has(M.sessionId)).filter(M=>!M.isImported).map(M=>({sessionId:M.sessionId,title:M.requests[0]?.message||""}))}removeHistoryEntry(R){delete this._persistedSessions[R]}startSession(R,M){return this.trace("startSession",`providerId=${R}`),this._startSession(R,void 0,M)}_startSession(R,M,N){const P=this.instantiationService.createInstance(l.ChatModel,R,M);return this._sessionModels.set(P.sessionId,P),this.initializeSession(P,N).catch(F=>{this.trace("startSession",`initializeSession failed: ${F}`),P.setInitializationError(F),P.dispose(),this._sessionModels.delete(P.sessionId)}),P}reinitializeModel(R){R.startReinitialize(),this.startSessionInit(R,y.CancellationToken.None)}startSessionInit(R,M){this.initializeSession(R,M).catch(P=>{this.trace("startSession",`initializeSession failed: ${P}`),R.setInitializationError(P),R.dispose(),this._sessionModels.delete(R.sessionId)})}async initializeSession(R,M){await this.extensionService.activateByEvent(`onInteractiveSession:${R.providerId}`);const N=this._providers.get(R.providerId);if(!N)throw new Error(`Unknown provider: ${R.providerId}`);let P;try{P=await N.prepareSession(R.providerState,M)??void 0}catch(V){this.trace("initializeSession",`Provider initializeSession threw: ${V}`)}if(!P)throw new Error("Provider returned no session");this.trace("startSession","Provider returned session");const x=R.welcomeMessage?void 0:await N.provideWelcomeMessage?.(M)??void 0,F=x&&new l.ChatWelcomeMessageModel(R,x.map(V=>typeof V=="string"?new D.MarkdownString(V):V));R.initialize(P,F)}getSession(R){return this._sessionModels.get(R)}getSessionId(R){return T.Iterable.find(this._sessionModels.values(),M=>M.session?.id===R)?.sessionId}getOrRestoreSession(R){const M=this._sessionModels.get(R);if(M)return M;const N=this._persistedSessions[R];if(N)return R===this.transferredSessionData?.sessionId&&(this._transferredSessionData=void 0),this._startSession(N.providerId,N,y.CancellationToken.None)}loadSessionFromContent(R){return this._startSession(R.providerId,R,y.CancellationToken.None)}async sendRequest(R,M,N){const P=typeof M=="string"?M:M.message;if(this.trace("sendRequest",`sessionId: ${R}, message: ${P.substring(0,20)}${P.length>20?"[...]":""}}`),!P.trim()){this.trace("sendRequest","Rejected empty message");return}const x=this._sessionModels.get(R);if(!x)throw new Error(`Unknown session: ${R}`);await x.waitForInitialization();const F=this._providers.get(x.providerId);if(!F)throw new Error(`Unknown provider: ${x.providerId}`);if(this._pendingRequests.has(R)){this.trace("sendRequest",`Session ${R} already has a pending request`);return}return{responseCompletePromise:this._sendRequestAsync(x,F,M,N)}}async _sendRequestAsync(R,M,N,P){const x=R.addRequest(N),F=typeof N=="string"&&N.startsWith("/")?await this.handleSlashCommand(R.sessionId,N):N;let V=!1;const W=typeof N=="string"?N.startsWith("/")?"slashCommand":"string":"followup",z=(0,t.createCancelablePromise)(async B=>{const K=G=>{B.isCancellationRequested||(V=!0,"content"in G?this.trace("sendRequest",`Provider returned progress for session ${R.sessionId}, ${typeof G.content=="string"?G.content.length:G.content.value.length} chars`):"placeholder"in G?this.trace("sendRequest",`Provider returned placeholder for session ${R.sessionId}, ${G.placeholder}`):(0,l.isCompleteInteractiveProgressTreeData)(G)?this.trace("sendRequest",`Provider returned tree data for session ${R.sessionId}, ${G.treeData.label}`):this.trace("sendRequest",`Provider returned id for session ${R.sessionId}, ${G.requestId}`),R.acceptResponseProgress(x,G))},H=new m.StopWatch(!1);B.onCancellationRequested(()=>{this.trace("sendRequest",`Request for session ${R.sessionId} was cancelled`),this.telemetryService.publicLog2("interactiveSessionProviderInvoked",{providerId:M.id,timeToFirstProgress:-1,totalTime:H.elapsed(),result:"cancelled",requestType:W,slashCommand:P?.command}),R.cancelRequest(x)}),P?.command&&this._onDidSubmitSlashCommand.fire({slashCommand:P.command,sessionId:R.sessionId});let U;if(typeof F=="string"&&typeof N=="string"&&this.chatSlashCommandService.hasCommand(F)){const G=[];for(const $ of R.getRequests())typeof $.message!="string"||!$.response||(0,D.isMarkdownString)($.response.response.value)&&(G.push({role:1,content:$.message}),G.push({role:2,content:$.response.response.value.value}));await this.chatSlashCommandService.executeCommand(F,N.substring(F.length+1).trimStart(),new o.Progress($=>K($)),G,B),U={session:R.session}}else{const G={session:R.session,message:F,variables:{}};if(typeof G.message=="string"){const $=await this.chatVariablesService.resolveVariables(G.message,R,B);G.variables=$.variables,G.message=$.prompt}U=await M.provideReply(G,K,B)}if(!B.isCancellationRequested){U||(this.trace("sendRequest",`Provider returned no response for session ${R.sessionId}`),U={session:R.session,errorDetails:{message:(0,h.localize)(0,null)}});const G=U.errorDetails?.responseIsFiltered?"filtered":U.errorDetails&&V?"errorWithOutput":U.errorDetails?"error":"success";this.telemetryService.publicLog2("interactiveSessionProviderInvoked",{providerId:M.id,timeToFirstProgress:U.timings?.firstProgress??0,totalTime:U.timings?.totalElapsed??0,result:G,requestType:W,slashCommand:P?.command}),R.setResponse(x,U),this.trace("sendRequest",`Provider returned response for session ${R.sessionId}`),M.provideFollowups?Promise.resolve(M.provideFollowups(R.session,y.CancellationToken.None)).then($=>{R.setFollowups(x,$??void 0),R.completeResponse(x)}):R.completeResponse(x)}});return this._pendingRequests.set(R.sessionId,z),z.finally(()=>{this._pendingRequests.delete(R.sessionId)}),z}async removeRequest(R,M){const N=this._sessionModels.get(R);if(!N)throw new Error(`Unknown session: ${R}`);await N.waitForInitialization();const P=this._providers.get(N.providerId);if(!P)throw new Error(`Unknown provider: ${N.providerId}`);N.removeRequest(M),P.removeRequest?.(N.session,M)}async handleSlashCommand(R,M){const N=await this.getSlashCommands(R,y.CancellationToken.None);for(const P of N??[])if(M.startsWith(`/${P.command}`)&&this.chatSlashCommandService.hasCommand(P.command))return P.command;return M}async getSlashCommands(R,M){const N=this._sessionModels.get(R);if(!N)throw new Error(`Unknown session: ${R}`);await N.waitForInitialization();const P=this._providers.get(N.providerId);if(!P)throw new Error(`Unknown provider: ${N.providerId}`);const x=this.chatSlashCommandService.getCommands().map(V=>({command:V.command,detail:V.detail,sortText:V.sortText,executeImmediately:V.executeImmediately})),F=P.provideSlashCommands?.(N.session,M);try{const V=await F;return V?V.concat(x):x}catch(V){return this.logService.error(V),x}}async addRequest(R){const M=T.Iterable.first(this._sessionModels.values());if(!M){this.trace("addRequest","No session available");return}const N=this._providers.get(M.providerId);if(!N||!N.resolveRequest){this.trace("addRequest","No provider available");return}this.trace("addRequest",`Calling resolveRequest for session ${M.sessionId}`);const P=await N.resolveRequest(M.session,R,y.CancellationToken.None);if(!P){this.trace("addRequest",`Provider returned no request for session ${M.sessionId}`);return}this.trace("addRequest",`Sending resolved request for session ${M.sessionId}`),this.sendRequest(M.sessionId,P.message)}async sendRequestToProvider(R,M){this.trace("sendRequestToProvider",`sessionId: ${R}`),await this.sendRequest(R,M.message)}getProviders(){return Array.from(this._providers.keys())}async addCompleteRequest(R,M,N){this.trace("addCompleteRequest",`message: ${M}`);const P=this._sessionModels.get(R);if(!P)throw new Error(`Unknown session: ${R}`);await P.waitForInitialization();const x=P.addRequest(M);if(typeof N.message=="string")P.acceptResponseProgress(x,{content:N.message});else for(const F of N.message){const V=(0,D.isMarkdownString)(F)?{content:F.value}:{treeData:F};P.acceptResponseProgress(x,V,!0)}P.setResponse(x,{session:P.session,errorDetails:N.errorDetails}),N.followups!==void 0&&P.setFollowups(x,N.followups),P.completeResponse(x)}cancelCurrentRequestForSession(R){this.trace("cancelCurrentRequestForSession",`sessionId: ${R}`),this._pendingRequests.get(R)?.cancel()}clearSession(R){this.trace("clearSession",`sessionId: ${R}`);const M=this._sessionModels.get(R);if(!M)throw new Error(`Unknown session: ${R}`);this._persistedSessions[R]=M.toJSON(),M.dispose(),this._sessionModels.delete(R),this._pendingRequests.get(R)?.cancel()}registerProvider(R){if(this.trace("registerProvider","Adding new chat provider"),this._providers.has(R.id))throw new Error(`Provider ${R.id} already registered`);return this._providers.set(R.id,R),this._hasProvider.set(!0),Array.from(this._sessionModels.values()).filter(M=>M.providerId===R.id).forEach(M=>this.reinitializeModel(M)),(0,f.toDisposable)(()=>{this.trace("registerProvider","Disposing chat provider"),this._providers.delete(R.id),this._hasProvider.set(this._providers.size>0)})}getProviderInfos(){return Array.from(this._providers.values()).map(R=>({id:R.id,displayName:R.displayName}))}transferChatSession(R,M){const N=T.Iterable.find(this._sessionModels.values(),x=>x.sessionId===R.sessionId);if(!N)throw new Error(`Failed to transfer session. Unknown session ID: ${R.sessionId}`);const P=this.storageService.getObject(I,0,[]);P.push({chat:N.toJSON(),timestampInMilliseconds:Date.now(),toWorkspace:M,inputValue:R.inputValue}),this.storageService.store(I,JSON.stringify(P),0,1),this.trace("transferChatSession",`Transferred session ${N.sessionId} to workspace ${M.toString()}`)}};e.ChatService=k,e.ChatService=k=fe([O(0,u.IStorageService),O(1,s.ILogService),O(2,E.IExtensionService),O(3,i.IInstantiationService),O(4,d.ITelemetryService),O(5,r.IContextKeyService),O(6,p.IWorkspaceContextService),O(7,g.IChatSlashCommandService),O(8,w.IChatVariablesService)],k)}),define(Q[3772],Y([1,0,2826,121,71]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notebookPreloadExtensionPoint=e.notebookRendererExtensionPoint=e.notebooksExtensionPoint=void 0;const D=Object.freeze({type:"type",displayName:"displayName",selector:"selector",priority:"priority"}),T=Object.freeze({id:"id",displayName:"displayName",mimeTypes:"mimeTypes",entrypoint:"entrypoint",hardDependencies:"dependencies",optionalDependencies:"optionalDependencies",requiresMessaging:"requiresMessaging"}),f=Object.freeze({type:"type",entrypoint:"entrypoint",localResourceRoots:"localResourceRoots"}),v={description:t.localize(0,null),type:"array",defaultSnippets:[{body:[{type:"",displayName:"",selector:[{filenamePattern:""}]}]}],items:{type:"object",required:[D.type,D.displayName,D.selector],properties:{[D.type]:{type:"string",description:t.localize(1,null)},[D.displayName]:{type:"string",description:t.localize(2,null)},[D.selector]:{type:"array",description:t.localize(3,null),items:{type:"object",properties:{filenamePattern:{type:"string",description:t.localize(4,null)},excludeFileNamePattern:{type:"string",description:t.localize(5,null)}}}},[D.priority]:{type:"string",markdownDeprecationMessage:t.localize(6,null),enum:[b.NotebookEditorPriority.default,b.NotebookEditorPriority.option],markdownEnumDescriptions:[t.localize(7,null),t.localize(8,null)],default:"default"}}}},m=Object.freeze({id:"",displayName:"",mimeTypes:[""],entrypoint:""}),S={description:t.localize(9,null),type:"array",defaultSnippets:[{body:[m]}],items:{defaultSnippets:[{body:m}],allOf:[{type:"object",required:[T.id,T.displayName],properties:{[T.id]:{type:"string",description:t.localize(10,null)},[T.displayName]:{type:"string",description:t.localize(11,null)},[T.hardDependencies]:{type:"array",uniqueItems:!0,items:{type:"string"},markdownDescription:t.localize(12,null)},[T.optionalDependencies]:{type:"array",uniqueItems:!0,items:{type:"string"},markdownDescription:t.localize(13,null)},[T.requiresMessaging]:{default:"never",enum:["always","optional","never"],enumDescriptions:[t.localize(14,null),t.localize(15,null),t.localize(16,null)],description:t.localize(17,null)}}},{oneOf:[{required:[T.entrypoint,T.mimeTypes],properties:{[T.mimeTypes]:{type:"array",description:t.localize(18,null),items:{type:"string"}},[T.entrypoint]:{description:t.localize(19,null),type:"string"}}},{required:[T.entrypoint],properties:{[T.entrypoint]:{description:t.localize(20,null),type:"object",required:["extends","path"],properties:{extends:{type:"string",description:t.localize(21,null)},path:{type:"string",description:t.localize(22,null)}}}}}]}]}},h={description:t.localize(23,null),type:"array",defaultSnippets:[{body:[{type:"",entrypoint:""}]}],items:{type:"object",required:[f.type,f.entrypoint],properties:{[f.type]:{type:"string",description:t.localize(24,null)},[f.entrypoint]:{type:"string",description:t.localize(25,null)},[f.localResourceRoots]:{type:"array",items:{type:"string"},description:t.localize(26,null)}}}};e.notebooksExtensionPoint=y.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"notebooks",jsonSchema:v,activationEventsGenerator:(a,r)=>{for(const i of a)i.type&&r.push(`onNotebookSerializer:${i.type}`)}}),e.notebookRendererExtensionPoint=y.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"notebookRenderer",jsonSchema:S,activationEventsGenerator:(a,r)=>{for(const i of a)i.id&&r.push(`onRenderer:${i.id}`)}}),e.notebookPreloadExtensionPoint=y.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"notebookPreload",jsonSchema:h})}),define(Q[425],Y([1,0,2943,42,33,214,55,17,59,18,63,10,1028,20,22,154,121,6,25]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProblemMatcherRegistry=e.ProblemMatcherParser=e.ProblemPatternRegistry=e.Schemas=e.ExtensionRegistryReporter=e.ProblemPatternParser=e.Config=e.createLineMatcher=e.getResource=e.isNamedProblemMatcher=e.ApplyToKind=e.ProblemLocationKind=e.FileLocationKind=void 0;var p;(function(W){W[W.Default=0]="Default",W[W.Relative=1]="Relative",W[W.Absolute=2]="Absolute",W[W.AutoDetect=3]="AutoDetect",W[W.Search=4]="Search"})(p||(e.FileLocationKind=p={})),function(W){function z(B){return B=B.toLowerCase(),B==="absolute"?W.Absolute:B==="relative"?W.Relative:B==="autodetect"?W.AutoDetect:B==="search"?W.Search:void 0}W.fromString=z}(p||(e.FileLocationKind=p={}));var c;(function(W){W[W.File=0]="File",W[W.Location=1]="Location"})(c||(e.ProblemLocationKind=c={})),function(W){function z(B){return B=B.toLowerCase(),B==="file"?W.File:B==="location"?W.Location:void 0}W.fromString=z}(c||(e.ProblemLocationKind=c={}));var l;(function(W){W[W.allDocuments=0]="allDocuments",W[W.openDocuments=1]="openDocuments",W[W.closedDocuments=2]="closedDocuments"})(l||(e.ApplyToKind=l={})),function(W){function z(B){return B=B.toLowerCase(),B==="alldocuments"?W.allDocuments:B==="opendocuments"?W.openDocuments:B==="closeddocuments"?W.closedDocuments:void 0}W.fromString=z}(l||(e.ApplyToKind=l={}));function n(W){return!!(W&&f.isString(W.name))}e.isNamedProblemMatcher=n;async function g(W,z,B){const K=z.fileLocation;let H;if(K===p.Absolute)H=W;else if(K===p.Relative&&z.filePrefix&&f.isString(z.filePrefix))H=(0,T.join)(z.filePrefix,W);else if(K===p.AutoDetect){const U=y.deepClone(z);if(U.fileLocation=p.Relative,B){const G=await g(W,U);let $;try{$=await B.stat(G)}catch{}if($)return G}return U.fileLocation=p.Absolute,g(W,U)}else if(K===p.Search&&B){const U=B.getProvider(i.Schemas.file);if(U&&(H=(await w(W,U,z.filePrefix))?.path),!H){const G=y.deepClone(z);return G.fileLocation=p.Absolute,g(W,G)}}if(H===void 0)throw new Error("FileLocationKind is not actionable. Does the matcher have a filePrefix? This should never happen.");return H=(0,T.normalize)(H),H=H.replace(/\\/g,"/"),H[0]!=="/"&&(H="/"+H),z.uriProvider!==void 0?z.uriProvider(H):h.URI.file(H)}e.getResource=g;async function w(W,z,B){const K=new Set((0,r.asArray)(B.exclude||[]).map(U=>h.URI.file(U).path));async function H(U){if(K.has(U.path))return;const G=await z.readdir(U),$=[];for(const[ie,J]of G){if(J===d.FileType.Directory){$.push(h.URI.joinPath(U,ie));continue}if(J===d.FileType.File){const j=h.URI.joinPath(U,ie);if(j.path.endsWith(W))return j}}for(const ie of $){const J=await H(ie);if(J)return J}}for(const U of(0,r.asArray)(B.include||[])){const G=await H(h.URI.file(U));if(G)return G}}function E(W,z){const B=W.pattern;return Array.isArray(B)?new A(W,z):new _(W,z)}e.createLineMatcher=E;const C=m.OS===1?`\r `:` `;class I{constructor(z,B){this.matcher=z,this.fileService=B}handle(z,B=0){return{match:null,continue:!1}}next(z){return null}fillProblemData(z,B,K){return z?(this.fillProperty(z,"file",B,K,!0),this.appendProperty(z,"message",B,K,!0),this.fillProperty(z,"code",B,K,!0),this.fillProperty(z,"severity",B,K,!0),this.fillProperty(z,"location",B,K,!0),this.fillProperty(z,"line",B,K),this.fillProperty(z,"character",B,K),this.fillProperty(z,"endLine",B,K),this.fillProperty(z,"endCharacter",B,K),!0):!1}appendProperty(z,B,K,H,U=!1){const G=K[B];if(f.isUndefined(z[B]))this.fillProperty(z,B,K,H,U);else if(!f.isUndefined(G)&&G<H.length){let $=H[G];U&&($=b.trim($)),z[B]+=C+$}}fillProperty(z,B,K,H,U=!1){const G=K[B];if(f.isUndefined(z[B])&&!f.isUndefined(G)&&G<H.length){let $=H[G];$!==void 0&&(U&&($=b.trim($)),z[B]=$)}}getMarkerMatch(z){try{const B=this.getLocation(z);if(z.file&&B&&z.message){const K={severity:this.getSeverity(z),startLineNumber:B.startLineNumber,startColumn:B.startCharacter,endLineNumber:B.endLineNumber,endColumn:B.endCharacter,message:z.message};return z.code!==void 0&&(K.code=z.code),this.matcher.source!==void 0&&(K.source=this.matcher.source),{description:this.matcher,resource:this.getResource(z.file),marker:K}}}catch{console.error(`Failed to convert problem data into match: ${JSON.stringify(z)}`)}}getResource(z){return g(z,this.matcher,this.fileService)}getLocation(z){if(z.kind===c.File)return this.createLocation(0,0,0,0);if(z.location)return this.parseLocationInfo(z.location);if(!z.line)return null;const B=parseInt(z.line),K=z.character?parseInt(z.character):void 0,H=z.endLine?parseInt(z.endLine):void 0,U=z.endCharacter?parseInt(z.endCharacter):void 0;return this.createLocation(B,K,H,U)}parseLocationInfo(z){if(!z||!z.match(/(\d+|\d+,\d+|\d+,\d+,\d+,\d+)/))return null;const B=z.split(","),K=parseInt(B[0]),H=B.length>1?parseInt(B[1]):void 0;return B.length>3?this.createLocation(K,H,parseInt(B[2]),parseInt(B[3])):this.createLocation(K,H,void 0,void 0)}createLocation(z,B,K,H){return B!==void 0&&H!==void 0?{startLineNumber:z,startCharacter:B,endLineNumber:K||z,endCharacter:H}:B!==void 0?{startLineNumber:z,startCharacter:B,endLineNumber:z,endCharacter:B}:{startLineNumber:z,startCharacter:1,endLineNumber:z,endCharacter:2**31-1}}getSeverity(z){let B=null;if(z.severity){const K=z.severity;K&&(B=S.default.fromValue(K),B===S.default.Ignore&&(K==="E"?B=S.default.Error:K==="W"?B=S.default.Warning:(K==="I"||b.equalsIgnoreCase(K,"hint")||b.equalsIgnoreCase(K,"note"))&&(B=S.default.Info)))}return(B===null||B===S.default.Ignore)&&(B=this.matcher.severity||S.default.Error),s.MarkerSeverity.fromSeverity(B)}}class _ extends I{constructor(z,B){super(z,B),this.pattern=z.pattern}get matchLength(){return 1}handle(z,B=0){D.ok(z.length-B===1);const K=Object.create(null);this.pattern.kind!==void 0&&(K.kind=this.pattern.kind);const H=this.pattern.regexp.exec(z[B]);if(H){this.fillProblemData(K,this.pattern,H);const U=this.getMarkerMatch(K);if(U)return{match:U,continue:!1}}return{match:null,continue:!1}}next(z){return null}}class A extends I{constructor(z,B){super(z,B),this.patterns=z.pattern}get matchLength(){return this.patterns.length}handle(z,B=0){D.ok(z.length-B===this.patterns.length),this.data=Object.create(null);let K=this.data;K.kind=this.patterns[0].kind;for(let G=0;G<this.patterns.length;G++){const $=this.patterns[G],ie=$.regexp.exec(z[G+B]);if(ie)$.loop&&G===this.patterns.length-1&&(K=y.deepClone(K)),this.fillProblemData(K,$,ie);else return{match:null,continue:!1}}const H=!!this.patterns[this.patterns.length-1].loop;H||(this.data=void 0);const U=K?this.getMarkerMatch(K):null;return{match:U||null,continue:H}}next(z){const B=this.patterns[this.patterns.length-1];D.ok(B.loop===!0&&this.data!==null);const K=B.regexp.exec(z);if(!K)return this.data=void 0,null;const H=y.deepClone(this.data);let U;return this.fillProblemData(H,B,K)&&(U=this.getMarkerMatch(H)),U||null}}var k;(function(W){let z;(function(ie){function J(j){const ee=j;return ee&&f.isString(ee.regexp)}ie.is=J})(z=W.CheckedProblemPattern||(W.CheckedProblemPattern={}));let B;(function(ie){function J(j){const ee=j;return ee&&f.isString(ee.name)}ie.is=J})(B=W.NamedProblemPattern||(W.NamedProblemPattern={}));let K;(function(ie){function J(j){const ee=j;return ee&&B.is(ee)&&f.isString(ee.regexp)}ie.is=J})(K=W.NamedCheckedProblemPattern||(W.NamedCheckedProblemPattern={}));let H;(function(ie){function J(j){return j&&Array.isArray(j)}ie.is=J})(H=W.MultiLineProblemPattern||(W.MultiLineProblemPattern={}));let U;(function(ie){function J(j){if(!H.is(j))return!1;for(const ee of j)if(!W.CheckedProblemPattern.is(ee))return!1;return!0}ie.is=J})(U=W.MultiLineCheckedProblemPattern||(W.MultiLineCheckedProblemPattern={}));let G;(function(ie){function J(j){const ee=j;return ee&&f.isString(ee.name)&&Array.isArray(ee.patterns)&&U.is(ee.patterns)}ie.is=J})(G=W.NamedMultiLineCheckedProblemPattern||(W.NamedMultiLineCheckedProblemPattern={}));function $(ie){return f.isString(ie.name)}W.isNamedProblemMatcher=$})(k||(e.Config=k={}));class L extends a.Parser{constructor(z){super(z)}parse(z){if(k.NamedMultiLineCheckedProblemPattern.is(z))return this.createNamedMultiLineProblemPattern(z);if(k.MultiLineCheckedProblemPattern.is(z))return this.createMultiLineProblemPattern(z);if(k.NamedCheckedProblemPattern.is(z)){const B=this.createSingleProblemPattern(z);return B.name=z.name,B}else return k.CheckedProblemPattern.is(z)?this.createSingleProblemPattern(z):(this.error((0,t.localize)(0,null)),null)}createSingleProblemPattern(z){const B=this.doCreateSingleProblemPattern(z,!0);return B===void 0?null:(B.kind===void 0&&(B.kind=c.Location),this.validateProblemPattern([B])?B:null)}createNamedMultiLineProblemPattern(z){const B=this.createMultiLineProblemPattern(z.patterns);return B?{name:z.name,label:z.label?z.label:z.name,patterns:B}:null}createMultiLineProblemPattern(z){const B=[];for(let K=0;K<z.length;K++){const H=this.doCreateSingleProblemPattern(z[K],!1);if(H===void 0)return null;K<z.length-1&&!f.isUndefined(H.loop)&&H.loop&&(H.loop=!1,this.error((0,t.localize)(1,null))),B.push(H)}return B[0].kind===void 0&&(B[0].kind=c.Location),this.validateProblemPattern(B)?B:null}doCreateSingleProblemPattern(z,B){const K=this.createRegularExpression(z.regexp);if(K===void 0)return;let H={regexp:K};z.kind&&(H.kind=c.fromString(z.kind));function U(G,$,ie,J){const j=$[J];typeof j=="number"&&(G[ie]=j)}if(U(H,z,"file","file"),U(H,z,"location","location"),U(H,z,"line","line"),U(H,z,"character","column"),U(H,z,"endLine","endLine"),U(H,z,"endCharacter","endColumn"),U(H,z,"severity","severity"),U(H,z,"code","code"),U(H,z,"message","message"),(z.loop===!0||z.loop===!1)&&(H.loop=z.loop),B)if(H.location||H.kind===c.File){const G={file:1,message:0};H=y.mixin(H,G,!1)}else{const G={file:1,line:2,character:3,message:0};H=y.mixin(H,G,!1)}return H}validateProblemPattern(z){let B=!1,K=!1,H=!1,U=!1;const G=z[0].kind===void 0?c.Location:z[0].kind;return z.forEach(($,ie)=>{ie!==0&&$.kind&&this.error((0,t.localize)(2,null)),B=B||!f.isUndefined($.file),K=K||!f.isUndefined($.message),H=H||!f.isUndefined($.location),U=U||!f.isUndefined($.line)}),B&&K?G===c.Location&&!(H||U)?(this.error((0,t.localize)(4,null)),!1):!0:(this.error((0,t.localize)(3,null)),!1)}createRegularExpression(z){let B;try{B=new RegExp(z)}catch{this.error((0,t.localize)(5,null,z))}return B}}e.ProblemPatternParser=L;class R{constructor(z,B=new a.ValidationStatus){this._collector=z,this._validationStatus=B}info(z){this._validationStatus.state=1,this._collector.info(z)}warn(z){this._validationStatus.state=2,this._collector.warn(z)}error(z){this._validationStatus.state=3,this._collector.error(z)}fatal(z){this._validationStatus.state=4,this._collector.error(z)}get status(){return this._validationStatus}}e.ExtensionRegistryReporter=R;var M;(function(W){W.ProblemPattern={default:{regexp:"^([^\\\\s].*)\\\\((\\\\d+,\\\\d+)\\\\):\\\\s*(.*)$",file:1,location:2,message:3},type:"object",additionalProperties:!1,properties:{regexp:{type:"string",description:(0,t.localize)(6,null)},kind:{type:"string",description:(0,t.localize)(7,null)},file:{type:"integer",description:(0,t.localize)(8,null)},location:{type:"integer",description:(0,t.localize)(9,null)},line:{type:"integer",description:(0,t.localize)(10,null)},column:{type:"integer",description:(0,t.localize)(11,null)},endLine:{type:"integer",description:(0,t.localize)(12,null)},endColumn:{type:"integer",description:(0,t.localize)(13,null)},severity:{type:"integer",description:(0,t.localize)(14,null)},code:{type:"integer",description:(0,t.localize)(15,null)},message:{type:"integer",description:(0,t.localize)(16,null)},loop:{type:"boolean",description:(0,t.localize)(17,null)}}},W.NamedProblemPattern=y.deepClone(W.ProblemPattern),W.NamedProblemPattern.properties=y.deepClone(W.NamedProblemPattern.properties)||{},W.NamedProblemPattern.properties.name={type:"string",description:(0,t.localize)(18,null)},W.MultiLineProblemPattern={type:"array",items:W.ProblemPattern},W.NamedMultiLineProblemPattern={type:"object",additionalProperties:!1,properties:{name:{type:"string",description:(0,t.localize)(19,null)},patterns:{type:"array",description:(0,t.localize)(20,null),items:W.ProblemPattern}}}})(M||(e.Schemas=M={}));const N=o.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"problemPatterns",jsonSchema:{description:(0,t.localize)(21,null),type:"array",items:{anyOf:[M.NamedProblemPattern,M.NamedMultiLineProblemPattern]}}});class P{constructor(){this.patterns=Object.create(null),this.fillDefaults(),this.readyPromise=new Promise((z,B)=>{N.setHandler((K,H)=>{try{H.removed.forEach(U=>{const G=U.value;for(const $ of G)this.patterns[$.name]&&delete this.patterns[$.name]}),H.added.forEach(U=>{const G=U.value,$=new L(new R(U.collector));for(const ie of G){if(k.NamedMultiLineCheckedProblemPattern.is(ie)){const J=$.parse(ie);$.problemReporter.status.state<3?this.add(J.name,J.patterns):(U.collector.error((0,t.localize)(22,null)),U.collector.error(JSON.stringify(ie,void 0,4)))}else if(k.NamedProblemPattern.is(ie)){const J=$.parse(ie);$.problemReporter.status.state<3?this.add(ie.name,J):(U.collector.error((0,t.localize)(23,null)),U.collector.error(JSON.stringify(ie,void 0,4)))}$.reset()}})}catch{}z(void 0)})})}onReady(){return this.readyPromise}add(z,B){this.patterns[z]=B}get(z){return this.patterns[z]}fillDefaults(){this.add("msCompile",{regexp:/^(?:\s*\d+>)?(\S.*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\)\s*:\s+((?:fatal +)?error|warning|info)\s+(\w+\d+)\s*:\s*(.*)$/,kind:c.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("gulp-tsc",{regexp:/^([^\s].*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(\d+)\s+(.*)$/,kind:c.Location,file:1,location:2,code:3,message:4}),this.add("cpp",{regexp:/^(\S.*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(C\d+)\s*:\s*(.*)$/,kind:c.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("csc",{regexp:/^(\S.*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(CS\d+)\s*:\s*(.*)$/,kind:c.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("vb",{regexp:/^(\S.*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\):\s+(error|warning|info)\s+(BC\d+)\s*:\s*(.*)$/,kind:c.Location,file:1,location:2,severity:3,code:4,message:5}),this.add("lessCompile",{regexp:/^\s*(.*) in file (.*) line no. (\d+)$/,kind:c.Location,message:1,file:2,line:3}),this.add("jshint",{regexp:/^(.*):\s+line\s+(\d+),\s+col\s+(\d+),\s(.+?)(?:\s+\((\w)(\d+)\))?$/,kind:c.Location,file:1,line:2,character:3,message:4,severity:5,code:6}),this.add("jshint-stylish",[{regexp:/^(.+)$/,kind:c.Location,file:1},{regexp:/^\s+line\s+(\d+)\s+col\s+(\d+)\s+(.+?)(?:\s+\((\w)(\d+)\))?$/,line:1,character:2,message:3,severity:4,code:5,loop:!0}]),this.add("eslint-compact",{regexp:/^(.+):\sline\s(\d+),\scol\s(\d+),\s(Error|Warning|Info)\s-\s(.+)\s\((.+)\)$/,file:1,kind:c.Location,line:2,character:3,severity:4,message:5,code:6}),this.add("eslint-stylish",[{regexp:/^((?:[a-zA-Z]:)*[./\\]+.*?)$/,kind:c.Location,file:1},{regexp:/^\s+(\d+):(\d+)\s+(error|warning|info)\s+(.+?)(?:\s\s+(.*))?$/,line:1,character:2,severity:3,message:4,code:5,loop:!0}]),this.add("go",{regexp:/^([^:]*: )?((.:)?[^:]*):(\d+)(:(\d+))?: (.*)$/,kind:c.Location,file:2,line:4,character:6,message:7})}}e.ProblemPatternRegistry=new P;class x extends a.Parser{constructor(z){super(z)}parse(z){const B=this.createProblemMatcher(z);if(this.checkProblemMatcherValid(z,B))return this.addWatchingMatcher(z,B),B}checkProblemMatcherValid(z,B){return B?B.pattern?B.owner?f.isUndefined(B.fileLocation)?(this.error((0,t.localize)(27,null,JSON.stringify(z,null,4))),!1):!0:(this.error((0,t.localize)(26,null,JSON.stringify(z,null,4))),!1):(this.error((0,t.localize)(25,null,JSON.stringify(z,null,4))),!1):(this.error((0,t.localize)(24,null,JSON.stringify(z,null,4))),!1)}createProblemMatcher(z){let B=null;const K=f.isString(z.owner)?z.owner:v.generateUuid(),H=f.isString(z.source)?z.source:void 0;let U=f.isString(z.applyTo)?l.fromString(z.applyTo):l.allDocuments;U||(U=l.allDocuments);let G,$,ie;if(f.isUndefined(z.fileLocation))G=p.Relative,$="${workspaceFolder}";else if(f.isString(z.fileLocation))ie=p.fromString(z.fileLocation),ie&&(G=ie,ie===p.Relative||ie===p.AutoDetect?$="${workspaceFolder}":ie===p.Search&&($={include:["${workspaceFolder}"]}));else if(f.isStringArray(z.fileLocation)){const ee=z.fileLocation;ee.length>0&&(ie=p.fromString(ee[0]),ee.length===1&&ie===p.Absolute?G=ie:ee.length===2&&(ie===p.Relative||ie===p.AutoDetect)&&ee[1]&&(G=ie,$=ee[1]))}else Array.isArray(z.fileLocation)&&p.fromString(z.fileLocation[0])===p.Search&&(G=p.Search,$=z.fileLocation[1]??{include:["${workspaceFolder}"]});const J=z.pattern?this.createProblemPattern(z.pattern):void 0;let j=z.severity?S.default.fromValue(z.severity):void 0;if(j===S.default.Ignore&&(this.info((0,t.localize)(28,null,z.severity)),j=S.default.Error),f.isString(z.base)){const ee=z.base;if(ee.length>1&&ee[0]==="$"){const X=e.ProblemMatcherRegistry.get(ee.substring(1));X&&(B=y.deepClone(X),z.owner!==void 0&&K!==void 0&&(B.owner=K),z.source!==void 0&&H!==void 0&&(B.source=H),z.fileLocation!==void 0&&G!==void 0&&(B.fileLocation=G,B.filePrefix=$),z.pattern!==void 0&&J!==void 0&&J!==null&&(B.pattern=J),z.severity!==void 0&&j!==void 0&&(B.severity=j),z.applyTo!==void 0&&U!==void 0&&(B.applyTo=U))}}else G&&J&&(B={owner:K,applyTo:U,fileLocation:G,pattern:J},H&&(B.source=H),$&&(B.filePrefix=$),j&&(B.severity=j));return k.isNamedProblemMatcher(z)&&(B.name=z.name,B.label=f.isString(z.label)?z.label:z.name),B}createProblemPattern(z){if(f.isString(z)){const B=z;if(B.length>1&&B[0]==="$"){const K=e.ProblemPatternRegistry.get(B.substring(1));return K||this.error((0,t.localize)(29,null,B)),K}else B.length===0?this.error((0,t.localize)(30,null)):this.error((0,t.localize)(31,null,B))}else if(z){const B=new L(this.problemReporter);return Array.isArray(z),B.parse(z)}return null}addWatchingMatcher(z,B){const K=this.createRegularExpression(z.watchedTaskBeginsRegExp),H=this.createRegularExpression(z.watchedTaskEndsRegExp);if(K&&H){B.watching={activeOnStart:!1,beginsPattern:{regexp:K},endsPattern:{regexp:H}};return}const U=z.background||z.watching;if(f.isUndefinedOrNull(U))return;const G=this.createWatchingPattern(U.beginsPattern),$=this.createWatchingPattern(U.endsPattern);if(G&&$){B.watching={activeOnStart:f.isBoolean(U.activeOnStart)?U.activeOnStart:!1,beginsPattern:G,endsPattern:$};return}(G||$)&&this.error((0,t.localize)(32,null))}createWatchingPattern(z){if(f.isUndefinedOrNull(z))return null;let B,K;return f.isString(z)?B=this.createRegularExpression(z):(B=this.createRegularExpression(z.regexp),f.isNumber(z.file)&&(K=z.file)),B?K?{regexp:B,file:K}:{regexp:B,file:1}:null}createRegularExpression(z){let B=null;if(!z)return B;try{B=new RegExp(z)}catch{this.error((0,t.localize)(33,null,z))}return B}}e.ProblemMatcherParser=x,function(W){W.WatchingPattern={type:"object",additionalProperties:!1,properties:{regexp:{type:"string",description:(0,t.localize)(34,null)},file:{type:"integer",description:(0,t.localize)(35,null)}}},W.PatternType={anyOf:[{type:"string",description:(0,t.localize)(36,null)},W.ProblemPattern,W.MultiLineProblemPattern],description:(0,t.localize)(37,null)},W.ProblemMatcher={type:"object",additionalProperties:!1,properties:{base:{type:"string",description:(0,t.localize)(38,null)},owner:{type:"string",description:(0,t.localize)(39,null)},source:{type:"string",description:(0,t.localize)(40,null)},severity:{type:"string",enum:["error","warning","info"],description:(0,t.localize)(41,null)},applyTo:{type:"string",enum:["allDocuments","openDocuments","closedDocuments"],description:(0,t.localize)(42,null)},pattern:W.PatternType,fileLocation:{oneOf:[{type:"string",enum:["absolute","relative","autoDetect","search"]},{type:"array",prefixItems:[{type:"string",enum:["absolute","relative","autoDetect","search"]}],minItems:1,maxItems:1,additionalItems:!1},{type:"array",prefixItems:[{type:"string",enum:["relative","autoDetect"]},{type:"string"}],minItems:2,maxItems:2,additionalItems:!1,examples:[["relative","${workspaceFolder}"],["autoDetect","${workspaceFolder}"]]},{type:"array",prefixItems:[{type:"string",enum:["search"]},{type:"object",properties:{include:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},exclude:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},required:["include"]}],minItems:2,maxItems:2,additionalItems:!1,examples:[["search",{include:["${workspaceFolder}"]}],["search",{include:["${workspaceFolder}"],exclude:[]}]]}],description:(0,t.localize)(43,null)},background:{type:"object",additionalProperties:!1,description:(0,t.localize)(44,null),properties:{activeOnStart:{type:"boolean",description:(0,t.localize)(45,null)},beginsPattern:{oneOf:[{type:"string"},W.WatchingPattern],description:(0,t.localize)(46,null)},endsPattern:{oneOf:[{type:"string"},W.WatchingPattern],description:(0,t.localize)(47,null)}}},watching:{type:"object",additionalProperties:!1,deprecationMessage:(0,t.localize)(48,null),description:(0,t.localize)(49,null),properties:{activeOnStart:{type:"boolean",description:(0,t.localize)(50,null)},beginsPattern:{oneOf:[{type:"string"},W.WatchingPattern],description:(0,t.localize)(51,null)},endsPattern:{oneOf:[{type:"string"},W.WatchingPattern],description:(0,t.localize)(52,null)}}}}},W.LegacyProblemMatcher=y.deepClone(W.ProblemMatcher),W.LegacyProblemMatcher.properties=y.deepClone(W.LegacyProblemMatcher.properties)||{},W.LegacyProblemMatcher.properties.watchedTaskBeginsRegExp={type:"string",deprecationMessage:(0,t.localize)(53,null),description:(0,t.localize)(54,null)},W.LegacyProblemMatcher.properties.watchedTaskEndsRegExp={type:"string",deprecationMessage:(0,t.localize)(55,null),description:(0,t.localize)(56,null)},W.NamedProblemMatcher=y.deepClone(W.ProblemMatcher),W.NamedProblemMatcher.properties=y.deepClone(W.NamedProblemMatcher.properties)||{},W.NamedProblemMatcher.properties.name={type:"string",description:(0,t.localize)(57,null)},W.NamedProblemMatcher.properties.label={type:"string",description:(0,t.localize)(58,null)}}(M||(e.Schemas=M={}));const F=o.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"problemMatchers",deps:[N],jsonSchema:{description:(0,t.localize)(59,null),type:"array",items:M.NamedProblemMatcher}});class V{constructor(){this._onMatchersChanged=new u.Emitter,this.onMatcherChanged=this._onMatchersChanged.event,this.matchers=Object.create(null),this.fillDefaults(),this.readyPromise=new Promise((z,B)=>{F.setHandler((K,H)=>{try{H.removed.forEach(G=>{const $=G.value;for(const ie of $)this.matchers[ie.name]&&delete this.matchers[ie.name]}),H.added.forEach(G=>{const $=G.value,ie=new x(new R(G.collector));for(const J of $){const j=ie.parse(J);j&&n(j)&&this.add(j)}}),(H.removed.length>0||H.added.length>0)&&this._onMatchersChanged.fire()}catch{}const U=this.get("tsc-watch");U&&(U.tscWatch=!0),z(void 0)})})}onReady(){return e.ProblemPatternRegistry.onReady(),this.readyPromise}add(z){this.matchers[z.name]=z}get(z){return this.matchers[z]}keys(){return Object.keys(this.matchers)}fillDefaults(){this.add({name:"msCompile",label:(0,t.localize)(60,null),owner:"msCompile",source:"cpp",applyTo:l.allDocuments,fileLocation:p.Absolute,pattern:e.ProblemPatternRegistry.get("msCompile")}),this.add({name:"lessCompile",label:(0,t.localize)(61,null),deprecated:!0,owner:"lessCompile",source:"less",applyTo:l.allDocuments,fileLocation:p.Absolute,pattern:e.ProblemPatternRegistry.get("lessCompile"),severity:S.default.Error}),this.add({name:"gulp-tsc",label:(0,t.localize)(62,null),owner:"typescript",source:"ts",applyTo:l.closedDocuments,fileLocation:p.Relative,filePrefix:"${workspaceFolder}",pattern:e.ProblemPatternRegistry.get("gulp-tsc")}),this.add({name:"jshint",label:(0,t.localize)(63,null),owner:"jshint",source:"jshint",applyTo:l.allDocuments,fileLocation:p.Absolute,pattern:e.ProblemPatternRegistry.get("jshint")}),this.add({name:"jshint-stylish",label:(0,t.localize)(64,null),owner:"jshint",source:"jshint",applyTo:l.allDocuments,fileLocation:p.Absolute,pattern:e.ProblemPatternRegistry.get("jshint-stylish")}),this.add({name:"eslint-compact",label:(0,t.localize)(65,null),owner:"eslint",source:"eslint",applyTo:l.allDocuments,fileLocation:p.Absolute,filePrefix:"${workspaceFolder}",pattern:e.ProblemPatternRegistry.get("eslint-compact")}),this.add({name:"eslint-stylish",label:(0,t.localize)(66,null),owner:"eslint",source:"eslint",applyTo:l.allDocuments,fileLocation:p.Absolute,pattern:e.ProblemPatternRegistry.get("eslint-stylish")}),this.add({name:"go",label:(0,t.localize)(67,null),owner:"go",source:"go",applyTo:l.allDocuments,fileLocation:p.Relative,filePrefix:"${workspaceFolder}",pattern:e.ProblemPatternRegistry.get("go")})}}e.ProblemMatcherRegistry=new V}),define(Q[1356],Y([1,0,2940,425]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const b={definitions:{showOutputType:{type:"string",enum:["always","silent","never"]},options:{type:"object",description:t.localize(0,null),properties:{cwd:{type:"string",description:t.localize(1,null)},env:{type:"object",additionalProperties:{type:"string"},description:t.localize(2,null)}},additionalProperties:{type:["string","array","object"]}},problemMatcherType:{oneOf:[{type:"string",errorMessage:t.localize(3,null)},y.Schemas.LegacyProblemMatcher,{type:"array",items:{anyOf:[{type:"string",errorMessage:t.localize(4,null)},y.Schemas.LegacyProblemMatcher]}}]},shellConfiguration:{type:"object",additionalProperties:!1,description:t.localize(5,null),properties:{executable:{type:"string",description:t.localize(6,null)},args:{type:"array",description:t.localize(7,null),items:{type:"string"}}}},commandConfiguration:{type:"object",additionalProperties:!1,properties:{command:{type:"string",description:t.localize(8,null)},args:{type:"array",description:t.localize(9,null),items:{type:"string"}},options:{$ref:"#/definitions/options"}}},taskDescription:{type:"object",required:["taskName"],additionalProperties:!1,properties:{taskName:{type:"string",description:t.localize(10,null)},command:{type:"string",description:t.localize(11,null)},args:{type:"array",description:t.localize(12,null),items:{type:"string"}},options:{$ref:"#/definitions/options"},windows:{anyOf:[{$ref:"#/definitions/commandConfiguration",description:t.localize(13,null)},{properties:{problemMatcher:{$ref:"#/definitions/problemMatcherType",description:t.localize(14,null)}}}]},osx:{anyOf:[{$ref:"#/definitions/commandConfiguration",description:t.localize(15,null)},{properties:{problemMatcher:{$ref:"#/definitions/problemMatcherType",description:t.localize(16,null)}}}]},linux:{anyOf:[{$ref:"#/definitions/commandConfiguration",description:t.localize(17,null)},{properties:{problemMatcher:{$ref:"#/definitions/problemMatcherType",description:t.localize(18,null)}}}]},suppressTaskName:{type:"boolean",description:t.localize(19,null),default:!0},showOutput:{$ref:"#/definitions/showOutputType",description:t.localize(20,null)},echoCommand:{type:"boolean",description:t.localize(21,null),default:!0},isWatching:{type:"boolean",deprecationMessage:t.localize(22,null),description:t.localize(23,null),default:!0},isBackground:{type:"boolean",description:t.localize(24,null),default:!0},promptOnClose:{type:"boolean",description:t.localize(25,null),default:!1},isBuildCommand:{type:"boolean",description:t.localize(26,null),default:!0},isTestCommand:{type:"boolean",description:t.localize(27,null),default:!0},problemMatcher:{$ref:"#/definitions/problemMatcherType",description:t.localize(28,null)}}},taskRunnerConfiguration:{type:"object",required:[],properties:{command:{type:"string",description:t.localize(29,null)},args:{type:"array",description:t.localize(30,null),items:{type:"string"}},options:{$ref:"#/definitions/options"},showOutput:{$ref:"#/definitions/showOutputType",description:t.localize(31,null)},isWatching:{type:"boolean",deprecationMessage:t.localize(32,null),description:t.localize(33,null),default:!0},isBackground:{type:"boolean",description:t.localize(34,null),default:!0},promptOnClose:{type:"boolean",description:t.localize(35,null),default:!1},echoCommand:{type:"boolean",description:t.localize(36,null),default:!0},suppressTaskName:{type:"boolean",description:t.localize(37,null),default:!0},taskSelector:{type:"string",description:t.localize(38,null)},problemMatcher:{$ref:"#/definitions/problemMatcherType",description:t.localize(39,null)},tasks:{type:"array",description:t.localize(40,null),items:{type:"object",$ref:"#/definitions/taskDescription"}}}}}};e.default=b}),define(Q[3773],Y([1,0,2941,42,425,1356]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const T={oneOf:[{allOf:[{type:"object",required:["version"],properties:{version:{type:"string",enum:["0.1.0"],deprecationMessage:t.localize(0,null),description:t.localize(1,null)},_runner:{deprecationMessage:t.localize(2,null)},runner:{type:"string",enum:["process","terminal"],default:"process",description:t.localize(3,null)},windows:{$ref:"#/definitions/taskRunnerConfiguration",description:t.localize(4,null)},osx:{$ref:"#/definitions/taskRunnerConfiguration",description:t.localize(5,null)},linux:{$ref:"#/definitions/taskRunnerConfiguration",description:t.localize(6,null)}}},{$ref:"#/definitions/taskRunnerConfiguration"}]}]},f={type:"boolean",default:!0,description:t.localize(7,null)};T.definitions=y.deepClone(D.default.definitions);const v=T.definitions;v.commandConfiguration.properties.isShellCommand=y.deepClone(f),v.taskDescription.properties.isShellCommand=y.deepClone(f),v.taskRunnerConfiguration.properties.isShellCommand=y.deepClone(f),Object.getOwnPropertyNames(v).forEach(S=>{const h=S+"1";v[h]=v[S],delete v[S]});function m(S){Array.isArray(S)?S.forEach(m):typeof S=="object"&&(S.$ref&&(S.$ref=S.$ref+"1"),Object.getOwnPropertyNames(S).forEach(h=>{const a=S[h];(Array.isArray(a)||typeof a=="object")&&m(a)}))}m(T),b.ProblemMatcherRegistry.onReady().then(()=>{try{const S=b.ProblemMatcherRegistry.keys().map(h=>"$"+h);v.problemMatcherType1.oneOf[0].enum=S,v.problemMatcherType1.oneOf[2].items.anyOf[1].enum=S}catch{console.log("Installing problem matcher ids failed")}}),e.default=T}),define(Q[1357],Y([1,0,10,6,4,425,154,59,18]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WatchingProblemCollector=e.StartStopProblemCollector=e.ProblemHandlingStrategy=e.AbstractProblemCollector=e.ProblemCollectorEventKind=void 0;var m;(function(s){s.BackgroundProcessingBegins="backgroundProcessingBegins",s.BackgroundProcessingEnds="backgroundProcessingEnds"})(m||(e.ProblemCollectorEventKind=m={}));var S;(function(s){function o(u){return Object.freeze({kind:u})}s.create=o})(S||(S={}));class h{constructor(o,u,d,p){this.problemMatchers=o,this.markerService=u,this.modelService=d,this.modelListeners=new b.DisposableStore,this._onDidFindFirstMatch=new y.Emitter,this.onDidFindFirstMatch=this._onDidFindFirstMatch.event,this._onDidFindErrors=new y.Emitter,this.onDidFindErrors=this._onDidFindErrors.event,this._onDidRequestInvalidateLastMarker=new y.Emitter,this.onDidRequestInvalidateLastMarker=this._onDidRequestInvalidateLastMarker.event,this.matchers=Object.create(null),this.bufferLength=1,o.map(c=>(0,D.createLineMatcher)(c,p)).forEach(c=>{const l=c.matchLength;l>this.bufferLength&&(this.bufferLength=l);let n=this.matchers[l];n||(n=[],this.matchers[l]=n),n.push(c)}),this.buffer=[],this.activeMatcher=null,this._numberOfMatches=0,this._maxMarkerSeverity=void 0,this.openModels=Object.create(null),this.applyToByOwner=new Map;for(const c of o){const l=this.applyToByOwner.get(c.owner);l===void 0?this.applyToByOwner.set(c.owner,c.applyTo):this.applyToByOwner.set(c.owner,this.mergeApplyTo(l,c.applyTo))}this.resourcesToClean=new Map,this.markers=new Map,this.deliveredMarkers=new Map,this.modelService.onModelAdded(c=>{this.openModels[c.uri.toString()]=!0},this,this.modelListeners),this.modelService.onModelRemoved(c=>{delete this.openModels[c.uri.toString()]},this,this.modelListeners),this.modelService.getModels().forEach(c=>this.openModels[c.uri.toString()]=!0),this._onDidStateChange=new y.Emitter}get onDidStateChange(){return this._onDidStateChange.event}processLine(o){if(this.tail){const u=this.tail;this.tail=u.then(()=>this.processLineInternal(o))}else this.tail=this.processLineInternal(o)}dispose(){this.modelListeners.dispose()}get numberOfMatches(){return this._numberOfMatches}get maxMarkerSeverity(){return this._maxMarkerSeverity}tryFindMarker(o){let u=null;if(this.activeMatcher){if(u=this.activeMatcher.next(o),u)return this.captureMatch(u),u;this.clearBuffer(),this.activeMatcher=null}if(this.buffer.length<this.bufferLength)this.buffer.push(o);else{const d=this.buffer.length-1;for(let p=0;p<d;p++)this.buffer[p]=this.buffer[p+1];this.buffer[d]=o}return u=this.tryMatchers(),u&&this.clearBuffer(),u}async shouldApplyMatch(o){switch(o.description.applyTo){case D.ApplyToKind.allDocuments:return!0;case D.ApplyToKind.openDocuments:return!!this.openModels[(await o.resource).toString()];case D.ApplyToKind.closedDocuments:return!this.openModels[(await o.resource).toString()];default:return!0}}mergeApplyTo(o,u){return o===u||o===D.ApplyToKind.allDocuments?o:D.ApplyToKind.allDocuments}tryMatchers(){this.activeMatcher=null;const o=this.buffer.length;for(let u=0;u<o;u++){const d=this.matchers[o-u];if(d)for(const p of d){const c=p.handle(this.buffer,u);if(c.match)return this.captureMatch(c.match),c.continue&&(this.activeMatcher=p),c.match}}return null}captureMatch(o){this._numberOfMatches++,(this._maxMarkerSeverity===void 0||o.marker.severity>this._maxMarkerSeverity)&&(this._maxMarkerSeverity=o.marker.severity)}clearBuffer(){this.buffer.length>0&&(this.buffer=[])}recordResourcesToClean(o){const u=this.getResourceSetToClean(o);this.markerService.read({owner:o}).forEach(d=>u.set(d.resource.toString(),d.resource))}recordResourceToClean(o,u){this.getResourceSetToClean(o).set(u.toString(),u)}removeResourceToClean(o,u){this.resourcesToClean.get(o)?.delete(u)}getResourceSetToClean(o){let u=this.resourcesToClean.get(o);return u||(u=new Map,this.resourcesToClean.set(o,u)),u}cleanAllMarkers(){this.resourcesToClean.forEach((o,u)=>{this._cleanMarkers(u,o)}),this.resourcesToClean=new Map}cleanMarkers(o){const u=this.resourcesToClean.get(o);u&&(this._cleanMarkers(o,u),this.resourcesToClean.delete(o))}_cleanMarkers(o,u){const d=[],p=this.applyToByOwner.get(o);u.forEach((c,l)=>{(p===D.ApplyToKind.allDocuments||p===D.ApplyToKind.openDocuments&&this.openModels[l]||p===D.ApplyToKind.closedDocuments&&!this.openModels[l])&&d.push(c)}),this.markerService.remove(o,d)}recordMarker(o,u,d){let p=this.markers.get(u);p||(p=new Map,this.markers.set(u,p));let c=p.get(d);c||(c=new Map,p.set(d,c));const l=T.IMarkerData.makeKeyOptionalMessage(o,!1);let n;c.has(l)?(n=c.get(l))!==void 0&&n.message.length<o.message.length&&v.isWindows&&c.set(l,o):c.set(l,o)}reportMarkers(){this.markers.forEach((o,u)=>{const d=this.getDeliveredMarkersPerOwner(u);o.forEach((p,c)=>{this.deliverMarkersPerOwnerAndResourceResolved(u,c,p,d)})})}deliverMarkersPerOwnerAndResource(o,u){const d=this.markers.get(o);if(!d)return;const p=this.getDeliveredMarkersPerOwner(o),c=d.get(u);c&&this.deliverMarkersPerOwnerAndResourceResolved(o,u,c,p)}deliverMarkersPerOwnerAndResourceResolved(o,u,d,p){if(d.size!==p.get(u)){const c=[];d.forEach(l=>c.push(l)),this.markerService.changeOne(o,t.URI.parse(u),c),p.set(u,d.size)}}getDeliveredMarkersPerOwner(o){let u=this.deliveredMarkers.get(o);return u||(u=new Map,this.deliveredMarkers.set(o,u)),u}cleanMarkerCaches(){this._numberOfMatches=0,this._maxMarkerSeverity=void 0,this.markers.clear(),this.deliveredMarkers.clear()}done(){this.reportMarkers(),this.cleanAllMarkers()}}e.AbstractProblemCollector=h;var a;(function(s){s[s.Clean=0]="Clean"})(a||(e.ProblemHandlingStrategy=a={}));class r extends h{constructor(o,u,d,p=0,c){super(o,u,d,c);const l=Object.create(null);o.forEach(n=>l[n.owner]=!0),this.owners=Object.keys(l),this.owners.forEach(n=>{this.recordResourcesToClean(n)})}async processLineInternal(o){const u=this.tryFindMarker(o);if(!u)return;const d=u.description.owner,c=(await u.resource).toString();this.removeResourceToClean(d,c),await this.shouldApplyMatch(u)&&(this.recordMarker(u.marker,d,c),(this.currentOwner!==d||this.currentResource!==c)&&(this.currentOwner&&this.currentResource&&this.deliverMarkersPerOwnerAndResource(this.currentOwner,this.currentResource),this.currentOwner=d,this.currentResource=c))}}e.StartStopProblemCollector=r;class i extends h{constructor(o,u,d,p){super(o,u,d,p),this.lines=[],this.beginPatterns=[],this.resetCurrentResource(),this.backgroundPatterns=[],this._activeBackgroundMatchers=new Set,this.problemMatchers.forEach(c=>{if(c.watching){const l=(0,f.generateUuid)();this.backgroundPatterns.push({key:l,matcher:c,begin:c.watching.beginsPattern,end:c.watching.endsPattern}),this.beginPatterns.push(c.watching.beginsPattern.regexp)}}),this.modelListeners.add(this.modelService.onModelRemoved(c=>{let l=y.Event.debounce(this.markerService.onMarkerChanged,(n,g)=>(n??[]).concat(g),500)(async n=>{if(l?.dispose(),l=void 0,!n.includes(c.uri)||this.markerService.read({resource:c.uri}).length!==0)return;const g=Array.from(this.lines);for(const w of g)await this.processLineInternal(w)});setTimeout(async()=>{l?.dispose(),l=void 0},600)}))}aboutToStart(){for(const o of this.backgroundPatterns)o.matcher.watching&&o.matcher.watching.activeOnStart&&(this._activeBackgroundMatchers.add(o.key),this._onDidStateChange.fire(S.create("backgroundProcessingBegins")),this.recordResourcesToClean(o.matcher.owner))}async processLineInternal(o){if(await this.tryBegin(o)||this.tryFinish(o))return;this.lines.push(o);const u=this.tryFindMarker(o);if(!u)return;const d=await u.resource,p=u.description.owner,c=d.toString();this.removeResourceToClean(p,c),await this.shouldApplyMatch(u)&&(this.recordMarker(u.marker,p,c),(this.currentOwner!==p||this.currentResource!==c)&&(this.reportMarkersForCurrentResource(),this.currentOwner=p,this.currentResource=c))}forceDelivery(){this.reportMarkersForCurrentResource()}async tryBegin(o){let u=!1;for(const d of this.backgroundPatterns){const p=d.begin.regexp.exec(o);if(p){if(this._activeBackgroundMatchers.has(d.key))continue;this._activeBackgroundMatchers.add(d.key),u=!0,this._onDidFindFirstMatch.fire(),this.lines=[],this.lines.push(o),this._onDidStateChange.fire(S.create("backgroundProcessingBegins")),this.cleanMarkerCaches(),this.resetCurrentResource();const c=d.matcher.owner,l=p[d.begin.file];if(l){const n=(0,D.getResource)(l,d.matcher);this.recordResourceToClean(c,await n)}else this.recordResourcesToClean(c)}}return u}tryFinish(o){let u=!1;for(const d of this.backgroundPatterns)if(d.end.regexp.exec(o)&&(this._numberOfMatches>0?this._onDidFindErrors.fire():this._onDidRequestInvalidateLastMarker.fire(),this._activeBackgroundMatchers.has(d.key))){this._activeBackgroundMatchers.delete(d.key),this.resetCurrentResource(),this._onDidStateChange.fire(S.create("backgroundProcessingEnds")),u=!0,this.lines.push(o);const c=d.matcher.owner;this.cleanMarkers(c),this.cleanMarkerCaches()}return u}resetCurrentResource(){this.reportMarkersForCurrentResource(),this.currentOwner=void 0,this.currentResource=void 0}reportMarkersForCurrentResource(){this.currentOwner&&this.currentResource&&this.deliverMarkersPerOwnerAndResource(this.currentOwner,this.currentResource)}done(){[...this.applyToByOwner.keys()].forEach(o=>{this.recordResourcesToClean(o)}),super.done()}isWatching(){return this.backgroundPatterns.length>0}}e.WatchingProblemCollector=i}),define(Q[3774],Y([1,0,2937,32,4,63,1357,357,154,77,220]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskTerminalStatus=e.FAILED_TASK_STATUS=e.SUCCEEDED_TASK_STATUS=e.ACTIVE_TASK_STATUS=void 0;const h="task_terminal_status";e.ACTIVE_TASK_STATUS={id:h,icon:m.spinningLoading,severity:D.default.Info,tooltip:t.localize(0,null)},e.SUCCEEDED_TASK_STATUS={id:h,icon:y.Codicon.check,severity:D.default.Info,tooltip:t.localize(1,null)};const a={id:h,icon:y.Codicon.check,severity:D.default.Info,tooltip:t.localize(2,null)};e.FAILED_TASK_STATUS={id:h,icon:y.Codicon.error,severity:D.default.Error,tooltip:t.localize(3,null)};const r={id:h,icon:y.Codicon.error,severity:D.default.Error,tooltip:t.localize(4,null)},i={id:h,icon:y.Codicon.warning,severity:D.default.Warning,tooltip:t.localize(5,null)},s={id:h,icon:y.Codicon.warning,severity:D.default.Warning,tooltip:t.localize(6,null)},o={id:h,icon:y.Codicon.info,severity:D.default.Info,tooltip:t.localize(7,null)},u={id:h,icon:y.Codicon.info,severity:D.default.Info,tooltip:t.localize(8,null)};let d=class extends b.Disposable{constructor(c,l){super(),this._audioCueService=l,this.terminalMap=new Map,this._register(c.onDidStateChange(n=>{switch(n.kind){case"processStarted":case"active":this.eventActive(n);break;case"inactive":this.eventInactive(n);break;case"processEnded":this.eventEnd(n);break}}))}addTerminal(c,l,n){const g={id:h,severity:D.default.Info};l.statusList.add(g),n.onDidFindFirstMatch(()=>{this._marker=l.registerMarker()}),n.onDidFindErrors(()=>{this._marker&&l.addBufferMarker({marker:this._marker,hoverMessage:t.localize(9,null),disableCommandStorage:!0})}),n.onDidRequestInvalidateLastMarker(()=>{this._marker?.dispose(),this._marker=void 0}),this.terminalMap.set(l.instanceId,{terminal:l,task:c,status:g,problemMatcher:n,taskRunEnded:!1})}terminalFromEvent(c){if(c.terminalId)return this.terminalMap.get(c.terminalId)}eventEnd(c){const l=this.terminalFromEvent(c);if(l)if(l.taskRunEnded=!0,l.terminal.statusList.remove(l.status),c.exitCode===0&&l.problemMatcher.numberOfMatches===0)if(this._audioCueService.playAudioCue(S.AudioCue.taskCompleted),l.task.configurationProperties.isBackground)for(const n of l.terminal.statusList.statuses)l.terminal.statusList.remove(n);else l.terminal.statusList.add(e.SUCCEEDED_TASK_STATUS);else c.exitCode||l.problemMatcher.maxMarkerSeverity===v.MarkerSeverity.Error?(this._audioCueService.playAudioCue(S.AudioCue.taskFailed),l.terminal.statusList.add(e.FAILED_TASK_STATUS)):l.problemMatcher.maxMarkerSeverity===v.MarkerSeverity.Warning?l.terminal.statusList.add(i):l.problemMatcher.maxMarkerSeverity===v.MarkerSeverity.Info&&l.terminal.statusList.add(o)}eventInactive(c){const l=this.terminalFromEvent(c);!l||!l.problemMatcher||l.taskRunEnded||(l.terminal.statusList.remove(l.status),l.problemMatcher.numberOfMatches===0?(this._audioCueService.playAudioCue(S.AudioCue.taskCompleted),l.terminal.statusList.add(a)):l.problemMatcher.maxMarkerSeverity===v.MarkerSeverity.Error?(this._audioCueService.playAudioCue(S.AudioCue.taskFailed),l.terminal.statusList.add(r)):l.problemMatcher.maxMarkerSeverity===v.MarkerSeverity.Warning?l.terminal.statusList.add(s):l.problemMatcher.maxMarkerSeverity===v.MarkerSeverity.Info&&l.terminal.statusList.add(u))}eventActive(c){const l=this.terminalFromEvent(c);l&&(l.disposeListener||(l.disposeListener=l.terminal.onDisposed(()=>{c.terminalId&&(this.terminalMap.delete(c.terminalId),l.disposeListener?.dispose())})),l.taskRunEnded=!1,l.terminal.statusList.remove(l.status),(l.problemMatcher instanceof T.StartStopProblemCollector||l.problemMatcher?.problemMatchers.length>0||c.runType==="singleRun")&&l.terminal.statusList.add(e.ACTIVE_TASK_STATUS))}};e.TaskTerminalStatus=d,e.TaskTerminalStatus=d=fe([O(0,f.ITaskService),O(1,S.IAudioCueService)],d)}),define(Q[624],Y([1,0,2945,17,42,121,8,6]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskDefinitionRegistry=void 0;const v={type:"object",additionalProperties:!1,properties:{type:{type:"string",description:t.localize(0,null)},required:{type:"array",items:{type:"string"}},properties:{type:"object",description:t.localize(1,null),additionalProperties:{$ref:"http://json-schema.org/draft-07/schema#"}},when:{type:"string",markdownDescription:t.localize(2,null),default:""}}};var m;(function(a){function r(i,s,o){if(!i)return;const u=y.isString(i.type)?i.type:void 0;if(!u||u.length===0){o.error(t.localize(3,null));return}const d=[];if(Array.isArray(i.required))for(const p of i.required)y.isString(p)&&d.push(p);return{extensionId:s.value,taskType:u,required:d,properties:i.properties?b.deepClone(i.properties):{},when:i.when?T.ContextKeyExpr.deserialize(i.when):void 0}}a.from=r})(m||(m={}));const S=D.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"taskDefinitions",activationEventsGenerator:(a,r)=>{for(const i of a)i.type&&r.push(`onTaskType:${i.type}`)},jsonSchema:{description:t.localize(4,null),type:"array",items:v}});class h{constructor(){this._onDefinitionsChanged=new f.Emitter,this.onDefinitionsChanged=this._onDefinitionsChanged.event,this.taskTypes=Object.create(null),this.readyPromise=new Promise((r,i)=>{S.setHandler((s,o)=>{this._schema=void 0;try{for(const u of o.removed){const d=u.value;for(const p of d)this.taskTypes&&p.type&&this.taskTypes[p.type]&&delete this.taskTypes[p.type]}for(const u of o.added){const d=u.value;for(const p of d){const c=m.from(p,u.description.identifier,u.collector);c&&(this.taskTypes[c.taskType]=c)}}(o.removed.length>0||o.added.length>0)&&this._onDefinitionsChanged.fire()}catch{}r(void 0)})})}onReady(){return this.readyPromise}get(r){return this.taskTypes[r]}all(){return Object.keys(this.taskTypes).map(r=>this.taskTypes[r])}getJsonSchema(){if(this._schema===void 0){const r=[];for(const i of this.all()){const s={type:"object",additionalProperties:!1};i.required.length>0&&(s.required=i.required.slice(0)),i.properties!==void 0?s.properties=b.deepClone(i.properties):s.properties=Object.create(null),s.properties.type={type:"string",enum:[i.taskType]},r.push(s)}this._schema={oneOf:r}}return this._schema}}e.TaskDefinitionRegistry=new h}),define(Q[3775],Y([1,0,2942,42,1356,425,624,3678,3677,32]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateProblemMatchers=e.updateTaskDefinitions=void 0;function S($){Array.isArray($)?$.forEach(S):typeof $=="object"&&($.$ref&&($.$ref=$.$ref+"2"),Object.getOwnPropertyNames($).forEach(ie=>{const J=$[ie];(Array.isArray(J)||typeof J=="object")&&S(J)}))}const h={anyOf:[{type:"boolean",default:!0,description:t.localize(0,null)},{$ref:"#/definitions/shellConfiguration"}],deprecationMessage:t.localize(1,null)},a={type:"boolean",description:t.localize(2,null),default:!0},r={type:"object",additionalProperties:!0,properties:{type:{type:"string",description:t.localize(3,null)}}},i={anyOf:[{type:"string",description:t.localize(4,null)},r,{type:"array",description:t.localize(5,null),items:{anyOf:[{type:"string"},r]}}],description:t.localize(6,null)},s={type:"string",enum:["parallel","sequence"],enumDescriptions:[t.localize(7,null),t.localize(8,null)],default:"parallel",description:t.localize(9,null)},o={type:"string",description:t.localize(10,null)},u={type:"object",description:t.localize(11,null),properties:{id:{description:t.localize(12,null),type:["string","null"],enum:Array.from((0,m.getAllCodicons)(),$=>$.id),markdownEnumDescriptions:Array.from((0,m.getAllCodicons)(),$=>`$(${$.id})`)},color:{description:t.localize(13,null),type:["string","null"],enum:["terminal.ansiBlack","terminal.ansiRed","terminal.ansiGreen","terminal.ansiYellow","terminal.ansiBlue","terminal.ansiMagenta","terminal.ansiCyan","terminal.ansiWhite"]}}},d={type:"object",default:{echo:!0,reveal:"always",focus:!1,panel:"shared",showReuseMessage:!0,clear:!1},description:t.localize(14,null),additionalProperties:!1,properties:{echo:{type:"boolean",default:!0,description:t.localize(15,null)},focus:{type:"boolean",default:!1,description:t.localize(16,null)},revealProblems:{type:"string",enum:["always","onProblem","never"],enumDescriptions:[t.localize(17,null),t.localize(18,null),t.localize(19,null)],default:"never",description:t.localize(20,null)},reveal:{type:"string",enum:["always","silent","never"],enumDescriptions:[t.localize(21,null),t.localize(22,null),t.localize(23,null)],default:"always",description:t.localize(24,null)},panel:{type:"string",enum:["shared","dedicated","new"],default:"shared",description:t.localize(25,null)},showReuseMessage:{type:"boolean",default:!0,description:t.localize(26,null)},clear:{type:"boolean",default:!1,description:t.localize(27,null)},group:{type:"string",description:t.localize(28,null)},close:{type:"boolean",description:t.localize(29,null)}}},p=y.deepClone(d);p.deprecationMessage=t.localize(30,null);const c={type:"string",enum:["build","test","none"],enumDescriptions:[t.localize(31,null),t.localize(32,null),t.localize(33,null)],description:t.localize(34,null)},l={oneOf:[c,{type:"object",properties:{kind:c,isDefault:{type:["boolean","string"],default:!1,description:t.localize(35,null)}}}],defaultSnippets:[{body:{kind:"build",isDefault:!0},description:t.localize(36,null)},{body:{kind:"test",isDefault:!0},description:t.localize(37,null)}],description:t.localize(38,null)},n={type:"string",enum:["shell"],default:"process",description:t.localize(39,null)},g={oneOf:[{oneOf:[{type:"string"},{type:"array",items:{type:"string"},description:t.localize(40,null)}]},{type:"object",required:["value","quoting"],properties:{value:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},description:t.localize(41,null)}],description:t.localize(42,null)},quoting:{type:"string",enum:["escape","strong","weak"],enumDescriptions:[t.localize(43,null),t.localize(44,null),t.localize(45,null)],default:"strong",description:t.localize(46,null)}}}],description:t.localize(47,null)},w={type:"array",items:{oneOf:[{type:"string"},{type:"object",required:["value","quoting"],properties:{value:{type:"string",description:t.localize(48,null)},quoting:{type:"string",enum:["escape","strong","weak"],enumDescriptions:[t.localize(49,null),t.localize(50,null),t.localize(51,null)],default:"strong",description:t.localize(52,null)}}}]},description:t.localize(53,null)},E={type:"string",description:t.localize(54,null)},C={type:"string",enum:["2.0.0"],description:t.localize(55,null)},I={type:"string",description:t.localize(56,null),deprecationMessage:t.localize(57,null)},_={type:"object",additionalProperties:!1,properties:{reevaluateOnRerun:{type:"boolean",description:t.localize(58,null),default:!0},runOn:{type:"string",enum:["default","folderOpen"],description:t.localize(59,null),default:"default"},instanceLimit:{type:"number",description:t.localize(60,null),default:1}},description:t.localize(61,null)},A=b.default.definitions,k=y.deepClone(A.options),L=k.properties;L.shell=y.deepClone(A.shellConfiguration);const R={type:"object",additionalProperties:!1,properties:{label:{type:"string",description:t.localize(62,null)},taskName:{type:"string",description:t.localize(63,null),deprecationMessage:t.localize(64,null)},identifier:y.deepClone(I),group:y.deepClone(l),isBackground:{type:"boolean",description:t.localize(65,null),default:!0},promptOnClose:{type:"boolean",description:t.localize(66,null),default:!1},presentation:y.deepClone(d),icon:y.deepClone(u),hide:y.deepClone(a),options:k,problemMatcher:{$ref:"#/definitions/problemMatcherType",description:t.localize(67,null)},runOptions:y.deepClone(_),dependsOn:y.deepClone(i),dependsOrder:y.deepClone(s),detail:y.deepClone(o)}},M=[];T.TaskDefinitionRegistry.onReady().then(()=>{N()});function N(){for(const $ of T.TaskDefinitionRegistry.all()){if(M.find(j=>j.properties?.type?.enum?.find?j.properties?.type.enum.find(ee=>ee===$.taskType):void 0))continue;const ie=y.deepClone(R),J=ie.properties;if(J.type={type:"string",description:t.localize(68,null),enum:[$.taskType]},$.required?ie.required=$.required.slice():ie.required=[],ie.required.push("type"),$.properties)for(const j of Object.keys($.properties)){const ee=$.properties[j];J[j]=y.deepClone(ee)}S(ie),M.push(ie)}}e.updateTaskDefinitions=N;const P=y.deepClone(R);P.properties.customize={type:"string",deprecationMessage:t.localize(69,null)},P.required||(P.required=[]),P.required.push("customize"),M.push(P);const x=y.deepClone(A),F=x.taskDescription;F.required=["label"];const V=F.properties;V.label=y.deepClone(E),V.command=y.deepClone(g),V.args=y.deepClone(w),V.isShellCommand=y.deepClone(h),V.dependsOn=i,V.hide=y.deepClone(a),V.dependsOrder=s,V.identifier=y.deepClone(I),V.type=y.deepClone(n),V.presentation=y.deepClone(d),V.terminal=p,V.icon=y.deepClone(u),V.group=y.deepClone(l),V.runOptions=y.deepClone(_),V.detail=o,V.taskName.deprecationMessage=t.localize(70,null);const W=y.deepClone(F);F.default={label:"My Task",type:"shell",command:"echo Hello",problemMatcher:[]},x.showOutputType.deprecationMessage=t.localize(71,null),V.echoCommand.deprecationMessage=t.localize(72,null),V.suppressTaskName.deprecationMessage=t.localize(73,null),V.isBuildCommand.deprecationMessage=t.localize(74,null),V.isTestCommand.deprecationMessage=t.localize(75,null),W.properties.type={type:"string",enum:["process"],default:"process",description:t.localize(76,null)},W.required.push("command"),W.required.push("type"),M.push(W),M.push({$ref:"#/definitions/taskDescription"});const z=x.taskRunnerConfiguration.properties,B=z.tasks;B.items={oneOf:M},z.inputs=v.inputsSchema.definitions.inputs,x.commandConfiguration.properties.isShellCommand=y.deepClone(h),x.commandConfiguration.properties.args=y.deepClone(w),x.options.properties.shell={$ref:"#/definitions/shellConfiguration"},z.isShellCommand=y.deepClone(h),z.type=y.deepClone(n),z.group=y.deepClone(l),z.presentation=y.deepClone(d),z.suppressTaskName.deprecationMessage=t.localize(77,null),z.taskSelector.deprecationMessage=t.localize(78,null);const K=y.deepClone(x.taskRunnerConfiguration);delete K.properties.tasks,K.additionalProperties=!1,x.osSpecificTaskRunnerConfiguration=K,z.version=y.deepClone(C);const H={oneOf:[{allOf:[{type:"object",required:["version"],properties:{version:y.deepClone(C),windows:{$ref:"#/definitions/osSpecificTaskRunnerConfiguration",description:t.localize(79,null)},osx:{$ref:"#/definitions/osSpecificTaskRunnerConfiguration",description:t.localize(80,null)},linux:{$ref:"#/definitions/osSpecificTaskRunnerConfiguration",description:t.localize(81,null)}}},{$ref:"#/definitions/taskRunnerConfiguration"}]}]};H.definitions=x;function U($,ie){const J=$[ie].properties;J?Object.keys(J).forEach(j=>{U(J,j)}):f.applyDeprecatedVariableMessage($[ie])}Object.getOwnPropertyNames(x).forEach($=>{const ie=$+"2";x[ie]=x[$],delete x[$],U(x,ie)}),S(H);function G(){try{const $=D.ProblemMatcherRegistry.keys().map(ie=>"$"+ie);x.problemMatcherType2.oneOf[0].enum=$,x.problemMatcherType2.oneOf[2].items.anyOf[0].enum=$}catch{console.log("Installing problem matcher ids failed")}}e.updateProblemMatchers=G,D.ProblemMatcherRegistry.onReady().then(()=>{G()}),e.default=H}),define(Q[383],Y([1,0,2948,17,26,42,8,624]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskDefinition=e.TasksSchemaProperties=e.TaskSettingId=e.KeyedTaskIdentifier=e.TaskEvent=e.TaskRunSource=e.TaskRunType=e.TaskEventKind=e.TaskSorter=e.JsonSchemaVersion=e.ExecutionEngine=e.InMemoryTask=e.ContributedTask=e.ConfiguringTask=e.CustomTask=e.CommonTask=e.RunOptions=e.RunOnOptions=e.DependsOrder=e.TaskSourceKind=e.TaskScope=e.TaskGroup=e.CommandString=e.RuntimeType=e.PresentationOptions=e.PanelKind=e.RevealProblemKind=e.RevealKind=e.CommandOptions=e.CUSTOMIZED_TASK_TYPE=e.ShellQuoting=e.TASKS_CATEGORY=e.TASK_RUNNING_STATE=e.USER_TASKS_GROUP_KEY=void 0,e.USER_TASKS_GROUP_KEY="settings",e.TASK_RUNNING_STATE=new T.RawContextKey("taskRunning",!1,t.localize(0,null)),e.TASKS_CATEGORY={value:t.localize(1,null),original:"Tasks"};var v;(function(V){V[V.Escape=1]="Escape",V[V.Strong=2]="Strong",V[V.Weak=3]="Weak"})(v||(e.ShellQuoting=v={})),e.CUSTOMIZED_TASK_TYPE="$customized",function(V){function W(z){if(!z)return V.Strong;switch(z.toLowerCase()){case"escape":return V.Escape;case"strong":return V.Strong;case"weak":return V.Weak;default:return V.Strong}}V.from=W}(v||(e.ShellQuoting=v={}));var m;(function(V){V.defaults={cwd:"${workspaceFolder}"}})(m||(e.CommandOptions=m={}));var S;(function(V){V[V.Always=1]="Always",V[V.Silent=2]="Silent",V[V.Never=3]="Never"})(S||(e.RevealKind=S={})),function(V){function W(z){switch(z.toLowerCase()){case"always":return V.Always;case"silent":return V.Silent;case"never":return V.Never;default:return V.Always}}V.fromString=W}(S||(e.RevealKind=S={}));var h;(function(V){V[V.Never=1]="Never",V[V.OnProblem=2]="OnProblem",V[V.Always=3]="Always"})(h||(e.RevealProblemKind=h={})),function(V){function W(z){switch(z.toLowerCase()){case"always":return V.Always;case"never":return V.Never;case"onproblem":return V.OnProblem;default:return V.OnProblem}}V.fromString=W}(h||(e.RevealProblemKind=h={}));var a;(function(V){V[V.Shared=1]="Shared",V[V.Dedicated=2]="Dedicated",V[V.New=3]="New"})(a||(e.PanelKind=a={})),function(V){function W(z){switch(z.toLowerCase()){case"shared":return V.Shared;case"dedicated":return V.Dedicated;case"new":return V.New;default:return V.Shared}}V.fromString=W}(a||(e.PanelKind=a={}));var r;(function(V){V.defaults={echo:!0,reveal:S.Always,revealProblems:h.Never,focus:!1,panel:a.Shared,showReuseMessage:!0,clear:!1}})(r||(e.PresentationOptions=r={}));var i;(function(V){V[V.Shell=1]="Shell",V[V.Process=2]="Process",V[V.CustomExecution=3]="CustomExecution"})(i||(e.RuntimeType=i={})),function(V){function W(B){switch(B.toLowerCase()){case"shell":return V.Shell;case"process":return V.Process;case"customExecution":return V.CustomExecution;default:return V.Process}}V.fromString=W;function z(B){switch(B){case V.Shell:return"shell";case V.Process:return"process";case V.CustomExecution:return"customExecution";default:return"process"}}V.toString=z}(i||(e.RuntimeType=i={}));var s;(function(V){function W(z){return y.isString(z)?z:z.value}V.value=W})(s||(e.CommandString=s={}));var o;(function(V){V.Clean={_id:"clean",isDefault:!1},V.Build={_id:"build",isDefault:!1},V.Rebuild={_id:"rebuild",isDefault:!1},V.Test={_id:"test",isDefault:!1};function W(B){return B===V.Clean._id||B===V.Build._id||B===V.Rebuild._id||B===V.Test._id}V.is=W;function z(B){if(B!==void 0)return y.isString(B)?W(B)?{_id:B,isDefault:!1}:void 0:B}V.from=z})(o||(e.TaskGroup=o={}));var u;(function(V){V[V.Global=1]="Global",V[V.Workspace=2]="Workspace",V[V.Folder=3]="Folder"})(u||(e.TaskScope=u={}));var d;(function(V){V.Workspace="workspace",V.Extension="extension",V.InMemory="inMemory",V.WorkspaceFile="workspaceFile",V.User="user";function W(z){switch(z){case V.User:return 2;case V.WorkspaceFile:return 5;default:return 6}}V.toConfigurationTarget=W})(d||(e.TaskSourceKind=d={}));var p;(function(V){V.parallel="parallel",V.sequence="sequence"})(p||(e.DependsOrder=p={}));var c;(function(V){V[V.default=1]="default",V[V.folderOpen=2]="folderOpen"})(c||(e.RunOnOptions=c={}));var l;(function(V){V.defaults={reevaluateOnRerun:!0,runOn:c.default,instanceLimit:1}})(l||(e.RunOptions=l={}));class n{constructor(W,z,B,K,H,U){this._label="",this._id=W,z&&(this._label=z),B&&(this.type=B),this.runOptions=K,this.configurationProperties=H,this._source=U}getDefinition(W){}getMapKey(){return this._id}getRecentlyUsedKey(){}getCommonTaskId(){const W={folder:this.getFolderId(),id:this._id};return JSON.stringify(W)}clone(){return this.fromObject(Object.assign({},this))}getWorkspaceFolder(){}getWorkspaceFileName(){}getTelemetryKind(){return"unknown"}matches(W,z=!1){if(W===void 0)return!1;if(y.isString(W))return W===this._label||W===this.configurationProperties.identifier||z&&W===this._id;const B=this.getDefinition(!0);return B!==void 0&&B._key===W._key}getQualifiedLabel(){const W=this.getWorkspaceFolder();return W?`${this._label} (${W.name})`:this._label}getTaskExecution(){return{id:this._id,task:this}}addTaskLoadMessages(W){this._taskLoadMessages===void 0&&(this._taskLoadMessages=[]),W&&(this._taskLoadMessages=this._taskLoadMessages.concat(W))}get taskLoadMessages(){return this._taskLoadMessages}}e.CommonTask=n;class g extends n{constructor(W,z,B,K,H,U,G,$){super(W,B,void 0,G,$,z),this.command={},this._source=z,this.hasDefinedMatchers=U,H&&(this.command=H)}clone(){return new g(this._id,this._source,this._label,this.type,this.command,this.hasDefinedMatchers,this.runOptions,this.configurationProperties)}customizes(){if(this._source&&this._source.customizes)return this._source.customizes}getDefinition(W=!1){if(W&&this._source.customizes!==void 0)return this._source.customizes;{let z;switch(this.command?this.command.runtime:void 0){case i.Shell:z="shell";break;case i.Process:z="process";break;case i.CustomExecution:z="customExecution";break;case void 0:z="$composite";break;default:throw new Error("Unexpected task runtime")}return{type:z,_key:this._id,id:this._id}}}static is(W){return W instanceof g}getMapKey(){const W=this._source.config.workspaceFolder;return W?`${W.uri.toString()}|${this._id}|${this.instance}`:`${this._id}|${this.instance}`}getFolderId(){return this._source.kind===d.User?e.USER_TASKS_GROUP_KEY:this._source.config.workspaceFolder?.uri.toString()}getCommonTaskId(){return this._source.customizes?super.getCommonTaskId():this.getRecentlyUsedKey()??super.getCommonTaskId()}getRecentlyUsedKey(){const W=this.getFolderId();if(!W)return;let z=this.configurationProperties.identifier;this._source.kind!==d.Workspace&&(z+=this._source.kind);const B={type:e.CUSTOMIZED_TASK_TYPE,folder:W,id:z};return JSON.stringify(B)}getWorkspaceFolder(){return this._source.config.workspaceFolder}getWorkspaceFileName(){return this._source.config.workspace&&this._source.config.workspace.configuration?b.basename(this._source.config.workspace.configuration):void 0}getTelemetryKind(){return this._source.customizes?"workspace>extension":"workspace"}fromObject(W){return new g(W._id,W._source,W._label,W.type,W.command,W.hasDefinedMatchers,W.runOptions,W.configurationProperties)}}e.CustomTask=g;class w extends n{constructor(W,z,B,K,H,U,G){super(W,B,K,U,G,z),this._source=z,this.configures=H}static is(W){return W instanceof w}fromObject(W){return W}getDefinition(){return this.configures}getWorkspaceFileName(){return this._source.config.workspace&&this._source.config.workspace.configuration?b.basename(this._source.config.workspace.configuration):void 0}getWorkspaceFolder(){return this._source.config.workspaceFolder}getFolderId(){return this._source.kind===d.User?e.USER_TASKS_GROUP_KEY:this._source.config.workspaceFolder?.uri.toString()}getRecentlyUsedKey(){const W=this.getFolderId();if(!W)return;let z=this.configurationProperties.identifier;this._source.kind!==d.Workspace&&(z+=this._source.kind);const B={type:e.CUSTOMIZED_TASK_TYPE,folder:W,id:z};return JSON.stringify(B)}}e.ConfiguringTask=w;class E extends n{constructor(W,z,B,K,H,U,G,$,ie){super(W,B,K,$,ie,z),this.defines=H,this.hasDefinedMatchers=G,this.command=U,this.icon=ie.icon,this.hide=ie.hide}clone(){return new E(this._id,this._source,this._label,this.type,this.defines,this.command,this.hasDefinedMatchers,this.runOptions,this.configurationProperties)}getDefinition(){return this.defines}static is(W){return W instanceof E}getMapKey(){const W=this._source.workspaceFolder;return W?`${this._source.scope.toString()}|${W.uri.toString()}|${this._id}|${this.instance}`:`${this._source.scope.toString()}|${this._id}|${this.instance}`}getFolderId(){if(this._source.scope===3&&this._source.workspaceFolder)return this._source.workspaceFolder.uri.toString()}getRecentlyUsedKey(){const W={type:"contributed",scope:this._source.scope,id:this._id};return W.folder=this.getFolderId(),JSON.stringify(W)}getWorkspaceFolder(){return this._source.workspaceFolder}getTelemetryKind(){return"extension"}fromObject(W){return new E(W._id,W._source,W._label,W.type,W.defines,W.command,W.hasDefinedMatchers,W.runOptions,W.configurationProperties)}}e.ContributedTask=E;class C extends n{constructor(W,z,B,K,H,U){super(W,B,K,H,U,z),this._source=z}clone(){return new C(this._id,this._source,this._label,this.type,this.runOptions,this.configurationProperties)}static is(W){return W instanceof C}getTelemetryKind(){return"composite"}getMapKey(){return`${this._id}|${this.instance}`}getFolderId(){}fromObject(W){return new C(W._id,W._source,W._label,W.type,W.runOptions,W.configurationProperties)}}e.InMemoryTask=C;var I;(function(V){V[V.Process=1]="Process",V[V.Terminal=2]="Terminal"})(I||(e.ExecutionEngine=I={})),function(V){V._default=V.Terminal}(I||(e.ExecutionEngine=I={}));var _;(function(V){V[V.V0_1_0=1]="V0_1_0",V[V.V2_0_0=2]="V2_0_0"})(_||(e.JsonSchemaVersion=_={}));class A{constructor(W){this._order=new Map;for(let z=0;z<W.length;z++)this._order.set(W[z].uri.toString(),z)}compare(W,z){const B=W.getWorkspaceFolder(),K=z.getWorkspaceFolder();if(B&&K){let H=this._order.get(B.uri.toString());H=H===void 0?0:H+1;let U=this._order.get(K.uri.toString());return U=U===void 0?0:U+1,H===U?W._label.localeCompare(z._label):H-U}else return!B&&K?-1:B&&!K?1:0}}e.TaskSorter=A;var k;(function(V){V.DependsOnStarted="dependsOnStarted",V.AcquiredInput="acquiredInput",V.Start="start",V.ProcessStarted="processStarted",V.Active="active",V.Inactive="inactive",V.Changed="changed",V.Terminated="terminated",V.ProcessEnded="processEnded",V.End="end"})(k||(e.TaskEventKind=k={}));var L;(function(V){V.SingleRun="singleRun",V.Background="background"})(L||(e.TaskRunType=L={}));var R;(function(V){V[V.System=0]="System",V[V.User=1]="User",V[V.FolderOpen=2]="FolderOpen",V[V.ConfigurationChange=3]="ConfigurationChange",V[V.Reconnect=4]="Reconnect"})(R||(e.TaskRunSource=R={}));var M;(function(V){function W(z,B,K,H){if(B){const U={kind:z,taskId:B._id,taskName:B.configurationProperties.name,runType:B.configurationProperties.isBackground?"background":"singleRun",group:B.configurationProperties.group,processId:void 0,exitCode:void 0,terminalId:K,__task:B};return z==="start"?U.resolvedVariables=H:z==="processStarted"?U.processId=H:z==="processEnded"&&(U.exitCode=H),Object.freeze(U)}else return Object.freeze({kind:"changed"})}V.create=W})(M||(e.TaskEvent=M={}));var N;(function(V){function W(B){const K=Object.keys(B).sort();let H="";for(const U of K){let G=B[U];G instanceof Object?G=W(G):typeof G=="string"&&(G=G.replace(/,/g,",,")),H+=U+","+G+","}return H}function z(B){const H={_key:W(B),type:B.taskType};return Object.assign(H,B),H}V.create=z})(N||(e.KeyedTaskIdentifier=N={}));var P;(function(V){V.AutoDetect="task.autoDetect",V.SaveBeforeRun="task.saveBeforeRun",V.ShowDecorations="task.showDecorations",V.ProblemMatchersNeverPrompt="task.problemMatchers.neverPrompt",V.SlowProviderWarning="task.slowProviderWarning",V.QuickOpenHistory="task.quickOpen.history",V.QuickOpenDetail="task.quickOpen.detail",V.QuickOpenSkip="task.quickOpen.skip",V.QuickOpenShowAll="task.quickOpen.showAll",V.AllowAutomaticTasks="task.allowAutomaticTasks",V.Reconnection="task.reconnection"})(P||(e.TaskSettingId=P={}));var x;(function(V){V.Tasks="tasks",V.SuppressTaskName="tasks.suppressTaskName",V.Windows="tasks.windows",V.Osx="tasks.osx",V.Linux="tasks.linux",V.ShowOutput="tasks.showOutput",V.IsShellCommand="tasks.isShellCommand",V.ServiceTestSetting="tasks.service.testSetting"})(x||(e.TasksSchemaProperties=x={}));var F;(function(V){function W(z,B){const K=f.TaskDefinitionRegistry.get(z.type);if(K===void 0){const $=D.deepClone(z);return delete $._key,N.create($)}const H=Object.create(null);H.type=K.taskType;const U=new Set;K.required.forEach($=>U.add($));const G=K.properties;for(const $ of Object.keys(G)){const ie=z[$];if(ie!=null)H[$]=ie;else if(U.has($)){const J=G[$];if(J.default!==void 0)H[$]=D.deepClone(J.default);else switch(J.type){case"boolean":H[$]=!1;break;case"number":case"integer":H[$]=0;break;case"string":H[$]="";break;default:B.error(t.localize(2,null,JSON.stringify(z,void 0,0),$));return}}}return N.create(H)}V.createTaskIdentifier=W})(F||(e.TaskDefinition=F={}))}),define(Q[3776],Y([1,0,2934,26,4,357,383,43,13,138,9,6,11]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ManageAutomaticTaskRunning=e.RunAutomaticTasks=void 0;const r="task.allowAutomaticTasks";let i=class extends b.Disposable{constructor(u,d,p,c){super(),this._taskService=u,this._configurationService=d,this._workspaceTrustManagementService=p,this._logService=c,this._hasRunTasks=!1,this._workspaceTrustManagementService.isWorkspaceTrusted()&&this._tryRunTasks(),this._register(this._workspaceTrustManagementService.onDidChangeTrust(async l=>{l&&await this._tryRunTasks()}))}async _tryRunTasks(){if(this._hasRunTasks||this._configurationService.getValue(r)==="off")return;this._hasRunTasks=!0,this._logService.trace("RunAutomaticTasks: Trying to run tasks."),this._taskService.hasTaskSystemInfo||(this._logService.trace("RunAutomaticTasks: Awaiting task system info."),await h.Event.toPromise(h.Event.once(this._taskService.onDidChangeTaskSystemInfo)));const u=await this._taskService.getWorkspaceTasks(2);this._logService.trace(`RunAutomaticTasks: Found ${u.size} automatic tasks`),await this._runWithPermission(this._taskService,this._configurationService,u)}_runTasks(u,d){d.forEach(p=>{p instanceof Promise?p.then(c=>{c&&u.run(c)}):u.run(p)})}_getTaskSource(u){switch(T.TaskSourceKind.toConfigurationTarget(u.kind)){case 6:return y.joinPath(u.config.workspaceFolder.uri,u.config.file);case 5:return u.config.workspace?.configuration??void 0}}_findAutoTasks(u,d){const p=new Array,c=new Array,l=new Map;return d&&d.forEach(n=>{if(n.set&&n.set.tasks.forEach(g=>{if(g.runOptions.runOn===T.RunOnOptions.folderOpen){p.push(g),c.push(g._label);const w=this._getTaskSource(g._source);w&&l.set(w.fsPath,w)}}),n.configurations){for(const g of Object.values(n.configurations.byIdentifier))if(g.runOptions.runOn===T.RunOnOptions.folderOpen){p.push(new Promise(E=>{u.getTask(n.workspaceFolder,g._id,!0).then(C=>E(C))})),g._label?c.push(g._label):c.push(g.configures.task);const w=this._getTaskSource(g._source);w&&l.set(w.fsPath,w)}}}),{tasks:p,taskNames:c,locations:l}}async _runWithPermission(u,d,p){const{tasks:c,taskNames:l}=this._findAutoTasks(u,p);l.length!==0&&d.getValue(r)!=="off"&&this._runTasks(u,c)}};e.RunAutomaticTasks=i,e.RunAutomaticTasks=i=fe([O(0,D.ITaskService),O(1,S.IConfigurationService),O(2,m.IWorkspaceTrustManagementService),O(3,a.ILogService)],i);class s extends v.Action2{static{this.ID="workbench.action.tasks.manageAutomaticRunning"}static{this.LABEL=t.localize(0,null)}constructor(){super({id:s.ID,title:s.LABEL,category:T.TASKS_CATEGORY})}async run(u){const d=u.get(f.IQuickInputService),p=u.get(S.IConfigurationService),c={label:t.localize(1,null)},l={label:t.localize(2,null)},n=await d.pick([c,l],{canPickMany:!1});n&&p.updateValue(r,n===c?"on":"off",2)}}e.ManageAutomaticTaskRunning=s}),define(Q[1358],Y([1,0,2936,42,383,17,357,43,9,4,6,23,32,19,37,77,49,379,1166,24]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.TaskQuickPick=e.configureTaskIcon=e.isWorkspaceFolder=e.QUICKOPEN_SKIP_CONFIG=e.QUICKOPEN_DETAIL_CONFIG=void 0,e.QUICKOPEN_DETAIL_CONFIG="task.quickOpen.detail",e.QUICKOPEN_SKIP_CONFIG="task.quickOpen.skip";function l(C){return"uri"in C}e.isWorkspaceFolder=l;const n=t.localize(0,null);e.configureTaskIcon=(0,s.registerIcon)("tasks-list-configure",a.Codicon.gear,t.localize(1,null));const g=(0,s.registerIcon)("tasks-remove",a.Codicon.close,t.localize(2,null)),w="runTaskStorageKey";let E=c=class extends m.Disposable{constructor(I,_,A,k,L,R,M){super(),this._taskService=I,this._configurationService=_,this._quickInputService=A,this._notificationService=k,this._themeService=L,this._dialogService=R,this._storageService=M,this._sorter=this._taskService.createSorter()}_showDetail(){return!!this._configurationService.getValue(e.QUICKOPEN_DETAIL_CONFIG)}_guessTaskLabel(I){if(I._label)return I._label;if(b.ConfiguringTask.is(I)){let _=I.configures.type;const A=y.deepClone(I.configures);return delete A._key,delete A.type,Object.keys(A).forEach(k=>_+=`: ${A[k]}`),_}return""}static getTaskLabelWithIcon(I,_){const A=_||I._label,k=I.configurationProperties.icon;return k?k.id?`$(${k.id}) ${A}`:`$(${a.Codicon.tools.id}) ${A}`:`${A}`}static applyColorStyles(I,_,A){if(I.configurationProperties.icon?.color){const k=A.getColorTheme(),L=(0,u.getColorStyleElement)(k);_.iconClasses=[(0,u.getColorClass)(I.configurationProperties.icon.color)],document.body.appendChild(L)}}_createTaskEntry(I,_=[]){const A=[{iconClass:i.ThemeIcon.asClassName(e.configureTaskIcon),tooltip:t.localize(3,null)},..._],k={label:c.getTaskLabelWithIcon(I,this._guessTaskLabel(I)),description:this._taskService.getTaskDescription(I),task:I,detail:this._showDetail()?I.configurationProperties.detail:void 0,buttons:A};return c.applyColorStyles(I,k,this._themeService),k}_createEntriesForGroup(I,_,A,k=[]){I.push({type:"separator",label:A}),_.forEach(L=>{L.configurationProperties.hide||I.push(this._createTaskEntry(L,k))})}_createTypeEntries(I,_){I.push({type:"separator",label:t.localize(4,null)}),_.forEach(A=>{I.push({label:`$(folder) ${A}`,task:A,ariaLabel:t.localize(5,null,A)})}),I.push({label:n,task:n,alwaysShow:!0})}_handleFolderTaskResult(I){const _=[];return Array.from(I).forEach(([A,k])=>{if(k.set&&_.push(...k.set.tasks),k.configurations)for(const L in k.configurations.byIdentifier)_.push(k.configurations.byIdentifier[L])}),_}_dedupeConfiguredAndRecent(I,_){let A=[];const k=Array(I.length).fill(!1);for(let R=0;R<_.length;R++){const M=_[R].getWorkspaceFolder()?.uri.toString(),N=_[R].getDefinition()?._key,P=_[R].type,x=_[R]._label,F=_[R].getRecentlyUsedKey(),V=I.findIndex(W=>M&&N&&W.getWorkspaceFolder()?.uri.toString()===M&&(W.getDefinition()?._key===N||W.type===P&&W._label===x)||F&&W.getRecentlyUsedKey()===F);V===-1?A.push(_[R]):(I[V]=_[R],k[V]=!0)}A=A.sort((R,M)=>this._sorter.compare(R,M));const L=[];for(let R=0;R<I.length;R++)(k[R]||b.ConfiguringTask.is(I[R]))&&L.push(I[R]);return{configuredTasks:A,recentTasks:L}}async getTopLevelEntries(I){if(this._topLevelEntries!==void 0)return{entries:this._topLevelEntries};let _=(await this._taskService.getSavedTasks("historical")).reverse();const A=this._handleFolderTaskResult(await this._taskService.getWorkspaceTasks()),k=this._taskService.taskTypes();this._topLevelEntries=[];const L=this._dedupeConfiguredAndRecent(_,A),R=L.configuredTasks;if(_=L.recentTasks,_.length>0){const M={iconClass:i.ThemeIcon.asClassName(g),tooltip:t.localize(6,null)};this._createEntriesForGroup(this._topLevelEntries,_,t.localize(7,null),[M])}return A.length>0&&R.length>0&&this._createEntriesForGroup(this._topLevelEntries,R,t.localize(8,null)),I&&A.length===0&&(this._topLevelEntries.push({type:"separator",label:t.localize(9,null)}),this._topLevelEntries.push(I)),k.length>0&&this._createTypeEntries(this._topLevelEntries,k),{entries:this._topLevelEntries,isSingleConfigured:A.length===1?A[0]:void 0}}async handleSettingOption(I){const{confirmed:_}=await this._dialogService.confirm({type:h.Severity.Warning,message:t.localize(10,null,I),cancelButton:t.localize(11,null)});if(_)return await this._configurationService.updateValue(`${I}.autoDetect`,"on"),await new Promise(A=>setTimeout(()=>A(),100)),this.show(t.localize(12,null),void 0,I)}async show(I,_,A,k){const L=this._quickInputService.createQuickPick();L.placeholder=I,L.matchOnDescription=!0,L.ignoreFocusOut=!1,L.onDidTriggerItemButton(async M=>{const N=M.item.task;if(M.button.iconClass===i.ThemeIcon.asClassName(g)){const P=N&&!D.isString(N)?N.getRecentlyUsedKey():void 0;P&&this._taskService.removeRecentlyUsedTask(P);const x=L.items.indexOf(M.item);x>=0&&(L.items=[...L.items.slice(0,x),...L.items.slice(x+1)])}else if(M.button.iconClass===i.ThemeIcon.asClassName(e.configureTaskIcon)){if(this._quickInputService.cancel(),b.ContributedTask.is(N))this._taskService.customize(N,void 0,!0);else if(b.CustomTask.is(N)||b.ConfiguringTask.is(N)){let P=!1;try{P=await this._taskService.openConfig(N)}catch{}P||this._taskService.customize(N,void 0,!0)}}}),k&&(L.value=k);let R=A;if(!R){const M=await this.getTopLevelEntries(_);if(M.isSingleConfigured&&this._configurationService.getValue(e.QUICKOPEN_SKIP_CONFIG))return L.dispose(),this._toTask(M.isSingleConfigured);const N=M.entries;R=await this._doPickerFirstLevel(L,N)}do if(D.isString(R)){if(k){await this._doPickerFirstLevel(L,(await this.getTopLevelEntries(_)).entries),L.dispose();return}const M=await this.doPickerSecondLevel(L,R);if(M&&!M.settingType&&M.task===null)L.value="",R=await this._doPickerFirstLevel(L,(await this.getTopLevelEntries(_)).entries);else return M&&D.isString(M.settingType)?(L.dispose(),this.handleSettingOption(M.settingType)):(L.dispose(),M?.task&&!D.isString(M?.task)?this._toTask(M?.task):void 0)}else{if(R)return L.dispose(),this._toTask(R);L.dispose();return}while(1)}async _doPickerFirstLevel(I,_){return I.items=_,(0,d.showWithPinnedItems)(this._storageService,w,I,!0),(await new Promise(k=>{S.Event.once(I.onDidAccept)(async()=>{k(I.selectedItems?I.selectedItems[0]:void 0)})}))?.task}async doPickerSecondLevel(I,_,A){if(I.busy=!0,_===n){const L=(await this._taskService.tasks()).filter(R=>!R.configurationProperties.hide).sort((R,M)=>this._sorter.compare(R,M)).map(R=>this._createTaskEntry(R));L.push(...c.allSettingEntries(this._configurationService)),I.items=L}else I.value=A||"",I.items=await this._getEntriesForProvider(_);return await I.show(),I.busy=!1,await new Promise(L=>{S.Event.once(I.onDidAccept)(async()=>{L(I.selectedItems?I.selectedItems[0]:void 0)})})}static allSettingEntries(I){const _=[],A=c.getSettingEntry(I,"grunt");A&&_.push(A);const k=c.getSettingEntry(I,"gulp");k&&_.push(k);const L=c.getSettingEntry(I,"jake");return L&&_.push(L),_}static getSettingEntry(I,_){if(I.getValue(`${_}.autoDetect`)==="off")return{label:t.localize(13,null,_[0].toUpperCase()+_.slice(1),_),task:null,settingType:_,alwaysShow:!0}}async _getEntriesForProvider(I){const _=(await this._taskService.tasks({type:I})).sort((L,R)=>this._sorter.compare(L,R));let A=[];if(_.length>0){for(const L of _)L.configurationProperties.hide||A.push(this._createTaskEntry(L));A.push({type:"separator"},{label:t.localize(14,null),task:null,alwaysShow:!0})}else A=[{label:t.localize(15,null,I),task:null,alwaysShow:!0}];const k=c.getSettingEntry(this._configurationService,I);return k&&A.push(k),A}async _toTask(I){if(!b.ConfiguringTask.is(I))return I;const _=await this._taskService.tryResolveTask(I);return _||this._notificationService.error(t.localize(16,null,I.type)),_}};e.TaskQuickPick=E,e.TaskQuickPick=E=c=fe([O(0,T.ITaskService),O(1,v.IConfigurationService),O(2,f.IQuickInputService),O(3,h.INotificationService),O(4,r.IThemeService),O(5,o.IDialogService),O(6,p.IStorageService)],E)}),define(Q[3777],Y([1,0,2938,43,347,128,44,357,383,1358,9,17,23,49,19,24]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.TasksQuickAccessProvider=void 0;let u=class extends b.PickerQuickAccessProvider{static{o=this}static{this.PREFIX="task "}constructor(p,c,l,n,g,w,E,C){super(o.PREFIX,{noResultsPick:{label:(0,t.localize)(0,null)}}),this._taskService=c,this._configurationService=l,this._quickInputService=n,this._notificationService=g,this._dialogService=w,this._themeService=E,this._storageService=C}async _getPicks(p,c,l){if(l.isCancellationRequested)return[];const n=new m.TaskQuickPick(this._taskService,this._configurationService,this._quickInputService,this._notificationService,this._themeService,this._dialogService,this._storageService),g=await n.getTopLevelEntries(),w=[];for(const E of g.entries){const C=(0,D.matchesFuzzy)(p,E.label);if(!C)continue;E.type==="separator"&&w.push(E);const I=E.task,_=E;_.highlights={label:C},_.trigger=A=>{if(A===1&&_.buttons?.length===2){const k=I&&!(0,h.isString)(I)?I.getRecentlyUsedKey():void 0;return k&&this._taskService.removeRecentlyUsedTask(k),b.TriggerAction.REFRESH_PICKER}else return v.ContributedTask.is(I)?this._taskService.customize(I,void 0,!0):v.CustomTask.is(I)&&this._taskService.openConfig(I),b.TriggerAction.CLOSE_PICKER},_.accept=async()=>{if((0,h.isString)(I)){const A=await n.show((0,t.localize)(1,null),void 0,I);A&&this._taskService.run(A,{attachProblemMatcher:!0})}else this._taskService.run(await this._toTask(I),{attachProblemMatcher:!0})},w.push(_)}return w}async _toTask(p){return v.ConfiguringTask.is(p)?this._taskService.tryResolveTask(p):p}};e.TasksQuickAccessProvider=u,e.TasksQuickAccessProvider=u=o=fe([O(0,T.IExtensionService),O(1,f.ITaskService),O(2,S.IConfigurationService),O(3,y.IQuickInputService),O(4,a.INotificationService),O(5,r.IDialogService),O(6,i.IThemeService),O(7,s.IStorageService)],u)}),define(Q[1359],Y([1,0,2944,42,17,59,425,383,624,357]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCustomTask=e.parse=e.TaskConfigSource=e.UUIDMap=e.JsonSchemaVersion=e.ExecutionEngine=e.TaskParser=e.GroupKind=e.ProblemMatcherConverter=e.RunOptions=e.RunOnOptions=e.CommandString=e.ITaskIdentifier=e.ShellQuoting=void 0;var S;(function($){$[$.escape=1]="escape",$[$.strong=2]="strong",$[$.weak=3]="weak"})(S||(e.ShellQuoting=S={}));var h;(function($){function ie(J){return J!==void 0&&b.isString(J.type)}$.is=ie})(h||(e.ITaskIdentifier=h={}));var a;(function($){function ie(J){return b.isString(J)?J:b.isStringArray(J)?J.join(" "):b.isString(J.value)?J.value:J.value.join(" ")}$.value=ie})(a||(e.CommandString=a={}));var r;(function($){$[$.Unknown=0]="Unknown",$[$.String=1]="String",$[$.ProblemMatcher=2]="ProblemMatcher",$[$.Array=3]="Array"})(r||(r={}));const i=[];Object.freeze(i);function s($,ie,J){const j=ie[J];j!==void 0&&($[J]=j)}function o($,ie,J){const j=ie[J];$[J]===void 0&&j!==void 0&&($[J]=j)}function u($,ie,J=!1){if($==null||ie===void 0)return!0;for(const j of ie){const ee=$[j.property];if(ee!=null){if(j.type!==void 0&&!j.type.isEmpty(ee))return!1;if(!Array.isArray(ee)||ee.length>0||J)return!1}}return!0}function d($,ie,J){if(!ie||u(ie,J))return $;if(!$||u($,J))return ie;for(const j of J){const ee=j.property;let X;j.type!==void 0?X=j.type.assignProperties($[ee],ie[ee]):X=ie[ee],X!=null&&($[ee]=X)}return $}function p($,ie,J,j=!1){if(!ie||u(ie,J))return $;if(!$||u($,J,j))return ie;for(const ee of J){const X=ee.property;let te;ee.type?te=ee.type.fillProperties($[X],ie[X]):$[X]===void 0&&(te=ie[X]),te!=null&&($[X]=te)}return $}function c($,ie,J,j){if($&&Object.isFrozen($))return $;if($==null||ie===void 0||ie===null)return ie!=null?y.deepClone(ie):void 0;for(const ee of J){const X=ee.property;if($[X]!==void 0)continue;let te;ee.type?te=ee.type.fillDefaults($[X],j):te=ie[X],te!=null&&($[X]=te)}return $}function l($,ie){if($!=null){if(Object.isFrozen($))return $;for(const J of ie)if(J.type){const j=$[J.property];j&&J.type.freeze(j)}return Object.freeze($),$}}var n;(function($){function ie(J){if(!J)return f.RunOnOptions.default;switch(J.toLowerCase()){case"folderopen":return f.RunOnOptions.folderOpen;case"default":default:return f.RunOnOptions.default}}$.fromString=ie})(n||(e.RunOnOptions=n={}));var g;(function($){const ie=[{property:"reevaluateOnRerun"},{property:"runOn"},{property:"instanceLimit"}];function J(X){return{reevaluateOnRerun:X?X.reevaluateOnRerun:!0,runOn:X?n.fromString(X.runOn):f.RunOnOptions.default,instanceLimit:X?X.instanceLimit:1}}$.fromConfiguration=J;function j(X,te){return d(X,te,ie)}$.assignProperties=j;function ee(X,te){return p(X,te,ie)}$.fillProperties=ee})(g||(e.RunOptions=g={}));var w;(function($){const ie=[{property:"executable"},{property:"args"},{property:"quoting"}];function J(re){const oe=re;return oe&&(b.isString(oe.executable)||b.isStringArray(oe.args))}$.is=J;function j(re,oe){if(!J(re))return;const le={};return re.executable!==void 0&&(le.executable=re.executable),re.args!==void 0&&(le.args=re.args.slice()),re.quoting!==void 0&&(le.quoting=y.deepClone(re.quoting)),le}$.from=j;function ee(re){return u(re,ie,!0)}$.isEmpty=ee;function X(re,oe){return d(re,oe,ie)}$.assignProperties=X;function te(re,oe){return p(re,oe,ie,!0)}$.fillProperties=te;function Z(re,oe){return re}$.fillDefaults=Z;function se(re){if(re)return Object.freeze(re)}$.freeze=se})(w||(w={}));var E;(function($){const ie=[{property:"cwd"},{property:"env"},{property:"shell",type:w}],J={cwd:"${workspaceFolder}"};function j(re,oe){const le={};return re.cwd!==void 0&&(b.isString(re.cwd)?le.cwd=re.cwd:oe.taskLoadIssues.push(t.localize(0,null,re.cwd))),re.env!==void 0&&(le.env=y.deepClone(re.env)),le.shell=w.from(re.shell,oe),ee(le)?void 0:le}$.from=j;function ee(re){return u(re,ie)}$.isEmpty=ee;function X(re,oe){if(oe===void 0||ee(oe))return re;if(re===void 0||ee(re))return oe;if(s(re,oe,"cwd"),re.env===void 0)re.env=oe.env;else if(oe.env!==void 0){const le=Object.create(null);re.env!==void 0&&Object.keys(re.env).forEach(ne=>le[ne]=re.env[ne]),oe.env!==void 0&&Object.keys(oe.env).forEach(ne=>le[ne]=oe.env[ne]),re.env=le}return re.shell=w.assignProperties(re.shell,oe.shell),re}$.assignProperties=X;function te(re,oe){return p(re,oe,ie)}$.fillProperties=te;function Z(re,oe){return c(re,J,ie,oe)}$.fillDefaults=Z;function se(re){return l(re,ie)}$.freeze=se})(E||(E={}));var C;(function($){let ie;(function(ce){const ae=[{property:"echo"},{property:"reveal"},{property:"revealProblems"},{property:"focus"},{property:"panel"},{property:"showReuseMessage"},{property:"clear"},{property:"group"},{property:"close"}];function ue(Ie,Se){let we,ye,Re,Le,Pe,Ae,Me,Oe,De,Ce=!1;b.isBoolean(Ie.echoCommand)&&(we=Ie.echoCommand,Ce=!0),b.isString(Ie.showOutput)&&(ye=f.RevealKind.fromString(Ie.showOutput),Ce=!0);const _e=Ie.presentation||Ie.terminal;if(_e&&(b.isBoolean(_e.echo)&&(we=_e.echo),b.isString(_e.reveal)&&(ye=f.RevealKind.fromString(_e.reveal)),b.isString(_e.revealProblems)&&(Re=f.RevealProblemKind.fromString(_e.revealProblems)),b.isBoolean(_e.focus)&&(Le=_e.focus),b.isString(_e.panel)&&(Pe=f.PanelKind.fromString(_e.panel)),b.isBoolean(_e.showReuseMessage)&&(Ae=_e.showReuseMessage),b.isBoolean(_e.clear)&&(Me=_e.clear),b.isString(_e.group)&&(Oe=_e.group),b.isBoolean(_e.close)&&(De=_e.close),Ce=!0),!!Ce)return{echo:we,reveal:ye,revealProblems:Re,focus:Le,panel:Pe,showReuseMessage:Ae,clear:Me,group:Oe,close:De}}ce.from=ue;function de(Ie,Se){return d(Ie,Se,ae)}ce.assignProperties=de;function ge(Ie,Se){return p(Ie,Se,ae)}ce.fillProperties=ge;function he(Ie,Se){const we=Se.engine===f.ExecutionEngine.Terminal;return c(Ie,{echo:we,reveal:f.RevealKind.Always,revealProblems:f.RevealProblemKind.Never,focus:!1,panel:f.PanelKind.Shared,showReuseMessage:!0,clear:!1},ae,Se)}ce.fillDefaults=he;function be(Ie){return l(Ie,ae)}ce.freeze=be;function ve(Ie){return u(Ie,ae)}ce.isEmpty=ve})(ie=$.PresentationOptions||($.PresentationOptions={}));let J;(function(ce){function ae(ue){if(ue!=null){if(b.isString(ue))return ue;if(b.isStringArray(ue))return ue.join(" ");{const de=f.ShellQuoting.from(ue.quoting),ge=b.isString(ue.value)?ue.value:b.isStringArray(ue.value)?ue.value.join(" "):void 0;return ge?{value:ge,quoting:de}:void 0}}}ce.from=ae})(J||(J={}));const j=[{property:"runtime"},{property:"name"},{property:"options",type:E},{property:"args"},{property:"taskSelector"},{property:"suppressTaskName"},{property:"presentation",type:ie}];function ee(ce,ae){let ue=X(ce,ae),de;return ce.windows&&ae.platform===3?de=X(ce.windows,ae):ce.osx&&ae.platform===1?de=X(ce.osx,ae):ce.linux&&ae.platform===2&&(de=X(ce.linux,ae)),de&&(ue=se(ue,de,ae.schemaVersion===2)),Z(ue)?void 0:ue}$.from=ee;function X(ce,ae){const ue=J.from(ce.command);let de;b.isString(ce.type)&&(ce.type==="shell"||ce.type==="process")&&(de=f.RuntimeType.fromString(ce.type));const ge=w.is(ce.isShellCommand);b.isBoolean(ce.isShellCommand)||ge?de=f.RuntimeType.Shell:ce.isShellCommand!==void 0&&(de=ce.isShellCommand?f.RuntimeType.Shell:f.RuntimeType.Process);const he={name:ue,runtime:de,presentation:ie.from(ce,ae)};if(ce.args!==void 0){he.args=[];for(const be of ce.args){const ve=J.from(be);ve!==void 0?he.args.push(ve):ae.taskLoadIssues.push(t.localize(1,null,be?JSON.stringify(be,void 0,4):"undefined"))}}return ce.options!==void 0&&(he.options=E.from(ce.options,ae),he.options&&he.options.shell===void 0&&ge&&(he.options.shell=w.from(ce.isShellCommand,ae),ae.engine!==f.ExecutionEngine.Terminal&&ae.taskLoadIssues.push(t.localize(2,null)))),b.isString(ce.taskSelector)&&(he.taskSelector=ce.taskSelector),b.isBoolean(ce.suppressTaskName)&&(he.suppressTaskName=ce.suppressTaskName),Z(he)?void 0:he}function te(ce){return ce&&!!ce.name}$.hasCommand=te;function Z(ce){return u(ce,j)}$.isEmpty=Z;function se(ce,ae,ue){return Z(ae)?ce:Z(ce)?ae:(s(ce,ae,"name"),s(ce,ae,"runtime"),s(ce,ae,"taskSelector"),s(ce,ae,"suppressTaskName"),ae.args!==void 0&&(ce.args===void 0||ue?ce.args=ae.args:ce.args=ce.args.concat(ae.args)),ce.presentation=ie.assignProperties(ce.presentation,ae.presentation),ce.options=E.assignProperties(ce.options,ae.options),ce)}$.assignProperties=se;function re(ce,ae){return p(ce,ae,j)}$.fillProperties=re;function oe(ce,ae,ue){if(ae===void 0||Z(ae))return ce;if(ce=ce||{name:void 0,runtime:void 0,presentation:void 0},ce.name===void 0){o(ce,ae,"name"),o(ce,ae,"taskSelector"),o(ce,ae,"suppressTaskName");let de=ae.args?ae.args.slice():[];!ce.suppressTaskName&&ue&&(ce.taskSelector!==void 0?de.push(ce.taskSelector+ue):de.push(ue)),ce.args&&(de=de.concat(ce.args)),ce.args=de}return o(ce,ae,"runtime"),ce.presentation=ie.fillProperties(ce.presentation,ae.presentation),ce.options=E.fillProperties(ce.options,ae.options),ce}$.fillGlobals=oe;function le(ce,ae){!ce||Object.isFrozen(ce)||(ce.name!==void 0&&ce.runtime===void 0&&(ce.runtime=f.RuntimeType.Process),ce.presentation=ie.fillDefaults(ce.presentation,ae),Z(ce)||(ce.options=E.fillDefaults(ce.options,ae)),ce.args===void 0&&(ce.args=i),ce.suppressTaskName===void 0&&(ce.suppressTaskName=ae.schemaVersion===2))}$.fillDefaults=le;function ne(ce){return l(ce,j)}$.freeze=ne})(C||(C={}));var I;(function($){function ie(te,Z){const se=Object.create(null);return Array.isArray(te)&&te.forEach(re=>{const oe=new T.ProblemMatcherParser(Z.problemReporter).parse(re);(0,T.isNamedProblemMatcher)(oe)?se[oe.name]=oe:Z.problemReporter.error(t.localize(3,null,JSON.stringify(re,void 0,4)))}),se}$.namedFrom=ie;function J(te,Z){let se={};return te.windows&&te.windows.problemMatcher&&Z.platform===3?se=j(te.windows.problemMatcher,Z):te.osx&&te.osx.problemMatcher&&Z.platform===1?se=j(te.osx.problemMatcher,Z):te.linux&&te.linux.problemMatcher&&Z.platform===2?se=j(te.linux.problemMatcher,Z):te.problemMatcher&&(se=j(te.problemMatcher,Z)),se}$.fromWithOsConfig=J;function j(te,Z){const se=[];if(te===void 0)return{value:se};const re=[];function oe(ne){ne.value&&se.push(ne.value),ne.errors&&re.push(...ne.errors)}const le=ee(te);if(le===r.Unknown){const ne=t.localize(4,null,JSON.stringify(te,null,4));Z.problemReporter.warn(ne)}else le===r.String||le===r.ProblemMatcher?oe(X(te,Z)):le===r.Array&&te.forEach(ce=>{oe(X(ce,Z))});return{value:se,errors:re}}$.from=j;function ee(te){return b.isString(te)?r.String:Array.isArray(te)?r.Array:b.isUndefined(te)?r.Unknown:r.ProblemMatcher}function X(te,Z){if(b.isString(te)){let se=te;if(se.length>1&&se[0]==="$"){se=se.substring(1);const re=T.ProblemMatcherRegistry.get(se);if(re)return{value:y.deepClone(re)};let oe=Z.namedProblemMatchers[se];if(oe)return oe=y.deepClone(oe),delete oe.name,{value:oe}}return{errors:[t.localize(5,null,te)]}}else{const se=te;return{value:new T.ProblemMatcherParser(Z.problemReporter).parse(se)}}}})(I||(e.ProblemMatcherConverter=I={}));const _={label:"Workspace",config:void 0};var A;(function($){function ie(j){if(j!==void 0){if(b.isString(j)&&f.TaskGroup.is(j))return{_id:j,isDefault:!1};if(b.isString(j.kind)&&f.TaskGroup.is(j.kind)){const ee=j.kind,X=b.isUndefined(j.isDefault)?!1:j.isDefault;return{_id:ee,isDefault:X}}}}$.from=ie;function J(j){return b.isString(j)?j:j.isDefault?{kind:j._id,isDefault:j.isDefault}:j._id}$.to=J})(A||(e.GroupKind=A={}));var k;(function($){function ie(j,ee){switch(ee){case z.User:return f.USER_TASKS_GROUP_KEY;case z.TasksJson:return j.workspaceFolder.uri;default:return j.workspace&&j.workspace.configuration?j.workspace.configuration:j.workspaceFolder.uri}}function J(j,ee,X){return b.isString(j)?{uri:ie(ee,X),task:j}:h.is(j)?{uri:ie(ee,X),task:f.TaskDefinition.createTaskIdentifier(j,ee.problemReporter)}:void 0}$.from=J})(k||(k={}));var L;(function($){function ie(J){switch(J){case"sequence":return"sequence";case"parallel":default:return"parallel"}}$.from=ie})(L||(L={}));var R;(function($){const ie=[{property:"name"},{property:"identifier"},{property:"group"},{property:"isBackground"},{property:"promptOnClose"},{property:"dependsOn"},{property:"presentation",type:C.PresentationOptions},{property:"problemMatchers"},{property:"options"},{property:"icon"},{property:"hide"}];function J(ee,X,te,Z,se){if(!ee)return{};const re={};if(se)for(const le of Object.keys(se))ee[le]!==void 0&&(re[le]=y.deepClone(ee[le]));if(b.isString(ee.taskName)&&(re.name=ee.taskName),b.isString(ee.label)&&X.schemaVersion===2&&(re.name=ee.label),b.isString(ee.identifier)&&(re.identifier=ee.identifier),re.icon=ee.icon,re.hide=ee.hide,ee.isBackground!==void 0&&(re.isBackground=!!ee.isBackground),ee.promptOnClose!==void 0&&(re.promptOnClose=!!ee.promptOnClose),re.group=A.from(ee.group),ee.dependsOn!==void 0)if(Array.isArray(ee.dependsOn))re.dependsOn=ee.dependsOn.reduce((le,ne)=>{const ce=k.from(ne,X,Z);return ce&&le.push(ce),le},[]);else{const le=k.from(ee.dependsOn,X,Z);re.dependsOn=le?[le]:void 0}re.dependsOrder=L.from(ee.dependsOrder),te&&(ee.presentation!==void 0||ee.terminal!==void 0)&&(re.presentation=C.PresentationOptions.from(ee,X)),te&&ee.options!==void 0&&(re.options=E.from(ee.options,X));const oe=I.fromWithOsConfig(ee,X);return oe.value!==void 0&&(re.problemMatchers=oe.value),ee.detail&&(re.detail=ee.detail),j(re)?{}:{value:re,errors:oe.errors}}$.from=J;function j(ee){return u(ee,ie)}$.isEmpty=j})(R||(R={}));var M;(function($){const ie="grunt.",J="jake.",j="gulp.",ee="vscode.npm.",X="vscode.typescript.";function te(Z,se,re,oe,le){if(!Z)return;const ne=Z.type,ce=Z.customize;if(!ne&&!ce){se.problemReporter.error(t.localize(6,null,JSON.stringify(Z,null,4)));return}const ae=ne?le?.get?.(ne)||v.TaskDefinitionRegistry.get(ne):void 0;if(!ae){const Ie=t.localize(7,null,ne);se.problemReporter.error(Ie);return}let ue;if(b.isString(ce)?ce.indexOf(ie)===0?ue={type:"grunt",task:ce.substring(ie.length)}:ce.indexOf(J)===0?ue={type:"jake",task:ce.substring(J.length)}:ce.indexOf(j)===0?ue={type:"gulp",task:ce.substring(j.length)}:ce.indexOf(ee)===0?ue={type:"npm",script:ce.substring(ee.length+4)}:ce.indexOf(X)===0&&(ue={type:"typescript",tsconfig:ce.substring(X.length+6)}):b.isString(Z.type)&&(ue=Z),ue===void 0){se.problemReporter.error(t.localize(8,null,JSON.stringify(Z,void 0,0)));return}const de=f.TaskDefinition.createTaskIdentifier(ue,se.problemReporter);if(de===void 0){se.problemReporter.error(t.localize(9,null,JSON.stringify(Z,void 0,0)));return}const ge={workspaceFolder:se.workspaceFolder,file:".vscode/tasks.json",index:re,element:Z};let he;switch(oe){case z.User:{he=Object.assign({},_,{kind:f.TaskSourceKind.User,config:ge});break}case z.WorkspaceFile:{he=Object.assign({},_,{kind:f.TaskSourceKind.WorkspaceFile,config:ge});break}default:{he=Object.assign({},_,{kind:f.TaskSourceKind.Workspace,config:ge});break}}const be=new f.ConfiguringTask(`${ae.extensionId}.${de._key}`,he,void 0,ne,de,g.fromConfiguration(Z.runOptions),{hide:Z.hide}),ve=R.from(Z,se,!0,oe,ae.properties);if(be.addTaskLoadMessages(ve.errors),ve.value){if(be.configurationProperties=Object.assign(be.configurationProperties,ve.value),be.configurationProperties.name)be._label=be.configurationProperties.name;else{let Ie=be.configures.type;if(ae.required&&ae.required.length>0)for(const Se of ae.required){const we=be.configures[Se];if(we){Ie=Ie+": "+we;break}}be._label=Ie}be.configurationProperties.identifier||(be.configurationProperties.identifier=de._key)}return be}$.from=te})(M||(M={}));var N;(function($){function ie(X,te,Z,se){if(!X)return;let re=X.type;if(re==null&&(re=f.CUSTOMIZED_TASK_TYPE),re!==f.CUSTOMIZED_TASK_TYPE&&re!=="shell"&&re!=="process"){te.problemReporter.error(t.localize(10,null,JSON.stringify(X,null,4)));return}let oe=X.taskName;if(b.isString(X.label)&&te.schemaVersion===2&&(oe=X.label),!oe){te.problemReporter.error(t.localize(11,null,JSON.stringify(X,null,4)));return}let le;switch(se){case z.User:{le=Object.assign({},_,{kind:f.TaskSourceKind.User,config:{index:Z,element:X,file:".vscode/tasks.json",workspaceFolder:te.workspaceFolder}});break}case z.WorkspaceFile:{le=Object.assign({},_,{kind:f.TaskSourceKind.WorkspaceFile,config:{index:Z,element:X,file:".vscode/tasks.json",workspaceFolder:te.workspaceFolder,workspace:te.workspace}});break}default:{le=Object.assign({},_,{kind:f.TaskSourceKind.Workspace,config:{index:Z,element:X,file:".vscode/tasks.json",workspaceFolder:te.workspaceFolder}});break}}const ne=new f.CustomTask(te.uuidMap.getUUID(oe),le,oe,f.CUSTOMIZED_TASK_TYPE,void 0,!1,g.fromConfiguration(X.runOptions),{name:oe,identifier:oe}),ce=R.from(X,te,!1,se);if(ne.addTaskLoadMessages(ce.errors),ce.value&&(ne.configurationProperties=Object.assign(ne.configurationProperties,ce.value)),!0){const de=X;ne.configurationProperties.isBackground===void 0&&de.isWatching!==void 0&&(ne.configurationProperties.isBackground=!!de.isWatching),ne.configurationProperties.group===void 0&&(de.isBuildCommand===!0?ne.configurationProperties.group=f.TaskGroup.Build:de.isTestCommand===!0&&(ne.configurationProperties.group=f.TaskGroup.Test))}const ue=C.from(X,te);return ue&&(ne.command=ue),X.command!==void 0&&(ue.suppressTaskName=!0),ne}$.from=ie;function J(X,te){(C.hasCommand(X.command)||X.configurationProperties.dependsOn===void 0)&&(X.command=C.fillGlobals(X.command,te.command,X.configurationProperties.name)),X.configurationProperties.problemMatchers===void 0&&te.problemMatcher!==void 0&&(X.configurationProperties.problemMatchers=y.deepClone(te.problemMatcher),X.hasDefinedMatchers=!0),X.configurationProperties.promptOnClose===void 0&&X.configurationProperties.isBackground===void 0&&te.promptOnClose!==void 0&&(X.configurationProperties.promptOnClose=te.promptOnClose)}$.fillGlobals=J;function j(X,te){C.fillDefaults(X.command,te),X.configurationProperties.promptOnClose===void 0&&(X.configurationProperties.promptOnClose=X.configurationProperties.isBackground!==void 0?!X.configurationProperties.isBackground:!0),X.configurationProperties.isBackground===void 0&&(X.configurationProperties.isBackground=!1),X.configurationProperties.problemMatchers===void 0&&(X.configurationProperties.problemMatchers=i)}$.fillDefaults=j;function ee(X,te){const Z=new f.CustomTask(te._id,Object.assign({},te._source,{customizes:X.defines}),te.configurationProperties.name||X._label,f.CUSTOMIZED_TASK_TYPE,X.command,!1,X.runOptions,{name:te.configurationProperties.name||X.configurationProperties.name,identifier:te.configurationProperties.identifier||X.configurationProperties.identifier,icon:te.configurationProperties.icon,hide:te.configurationProperties.hide});Z.addTaskLoadMessages(te.taskLoadMessages);const se=Z.configurationProperties;s(se,te.configurationProperties,"group"),s(se,te.configurationProperties,"isBackground"),s(se,te.configurationProperties,"dependsOn"),s(se,te.configurationProperties,"problemMatchers"),s(se,te.configurationProperties,"promptOnClose"),s(se,te.configurationProperties,"detail"),Z.command.presentation=C.PresentationOptions.assignProperties(Z.command.presentation,te.configurationProperties.presentation),Z.command.options=E.assignProperties(Z.command.options,te.configurationProperties.options),Z.runOptions=g.assignProperties(Z.runOptions,te.runOptions);const re=X.configurationProperties;return o(se,re,"group"),o(se,re,"isBackground"),o(se,re,"dependsOn"),o(se,re,"problemMatchers"),o(se,re,"promptOnClose"),o(se,re,"detail"),Z.command.presentation=C.PresentationOptions.fillProperties(Z.command.presentation,re.presentation),Z.command.options=E.fillProperties(Z.command.options,re.options),Z.runOptions=g.fillProperties(Z.runOptions,X.runOptions),X.hasDefinedMatchers===!0&&(Z.hasDefinedMatchers=!0),Z}$.createCustomTask=ee})(N||(N={}));var P;(function($){function ie(X){const te=X.type;return X.customize===void 0&&(te==null||te===f.CUSTOMIZED_TASK_TYPE||te==="shell"||te==="process")}const J={shell:m.ShellExecutionSupportedContext,process:m.ProcessExecutionSupportedContext};function j(X,te,Z,se,re){const oe={custom:[],configured:[]};if(!X)return oe;const le={task:void 0,rank:-1},ne={task:void 0,rank:-1},ce=Z.schemaVersion===2,ae=y.deepClone(Z.taskLoadIssues);for(let ge=0;ge<X.length;ge++){const he=X[ge],be=he.type?re?.get?.(he.type)||v.TaskDefinitionRegistry.get(he.type):void 0;let ve=!1;if(be&&be.when&&!Z.contextKeyService.contextMatchesRules(be.when))ve=!0;else if(!be&&he.type){for(const Ie of Object.keys(J))if(he.type===Ie){ve=!m.ShellExecutionSupportedContext.evaluate(Z.contextKeyService.getContext(null));break}}if(ve){Z.problemReporter.info(t.localize(12,null,he.type));continue}if(ie(he)){const Ie=N.from(he,Z,ge,se);if(Ie){if(N.fillGlobals(Ie,te),N.fillDefaults(Ie,Z),ce){if((Ie.command===void 0||Ie.command.name===void 0)&&(Ie.configurationProperties.dependsOn===void 0||Ie.configurationProperties.dependsOn.length===0)){Z.problemReporter.error(t.localize(13,null,Ie.configurationProperties.name,JSON.stringify(he,void 0,4)));continue}}else if(Ie.command===void 0||Ie.command.name===void 0){Z.problemReporter.warn(t.localize(14,null,Ie.configurationProperties.name,JSON.stringify(he,void 0,4)));continue}Ie.configurationProperties.group===f.TaskGroup.Build&&le.rank<2?(le.task=Ie,le.rank=2):Ie.configurationProperties.group===f.TaskGroup.Test&&ne.rank<2?(ne.task=Ie,ne.rank=2):Ie.configurationProperties.name==="build"&&le.rank<1?(le.task=Ie,le.rank=1):Ie.configurationProperties.name==="test"&&ne.rank<1&&(ne.task=Ie,ne.rank=1),Ie.addTaskLoadMessages(Z.taskLoadIssues),oe.custom.push(Ie)}}else{const Ie=M.from(he,Z,ge,se,re);Ie&&(Ie.addTaskLoadMessages(Z.taskLoadIssues),oe.configured.push(Ie))}Z.taskLoadIssues=y.deepClone(ae)}const ue=b.isString(le.task?.configurationProperties.group)?le.task?.configurationProperties.group:le.task?.configurationProperties.group?._id,de=b.isString(ne.task?.configurationProperties.group)?ne.task?.configurationProperties.group:ne.task?.configurationProperties.group?._id;return ue!==f.TaskGroup.Build._id&&le.rank>-1&&le.rank<2&&le.task?le.task.configurationProperties.group=f.TaskGroup.Build:de!==f.TaskGroup.Test._id&&ne.rank>-1&&ne.rank<2&&ne.task&&(ne.task.configurationProperties.group=f.TaskGroup.Test),oe}$.from=j;function ee(X,te){if(te===void 0||te.length===0)return X;if(X===void 0||X.length===0)return te;if(te){const Z=Object.create(null);X.forEach(re=>{Z[re.configurationProperties.name]=re}),te.forEach(re=>{Z[re.configurationProperties.name]=re});const se=[];X.forEach(re=>{se.push(Z[re.configurationProperties.name]),delete Z[re.configurationProperties.name]}),Object.keys(Z).forEach(re=>se.push(Z[re])),X=se}return X}$.assignTasks=ee})(P||(e.TaskParser=P={}));var x;(function($){function ie(Z,se){let re=J(Z,se),oe;Z.windows&&se.platform===3?oe=J(Z.windows,se):Z.osx&&se.platform===1?oe=J(Z.osx,se):Z.linux&&se.platform===2&&(oe=J(Z.linux,se)),oe&&(re=$.assignProperties(re,oe));const le=C.from(Z,se);return le&&(re.command=le),$.fillDefaults(re,se),$.freeze(re),re}$.from=ie;function J(Z,se){const re={};return Z.suppressTaskName!==void 0&&(re.suppressTaskName=!!Z.suppressTaskName),Z.promptOnClose!==void 0&&(re.promptOnClose=!!Z.promptOnClose),Z.problemMatcher&&(re.problemMatcher=I.from(Z.problemMatcher,se).value),re}$.fromBase=J;function j(Z){return!Z||Z.command===void 0&&Z.promptOnClose===void 0&&Z.suppressTaskName===void 0}$.isEmpty=j;function ee(Z,se){return j(se)?Z:j(Z)?se:(s(Z,se,"promptOnClose"),s(Z,se,"suppressTaskName"),Z)}$.assignProperties=ee;function X(Z,se){Z&&(C.fillDefaults(Z.command,se),Z.suppressTaskName===void 0&&(Z.suppressTaskName=se.schemaVersion===2),Z.promptOnClose===void 0&&(Z.promptOnClose=!0))}$.fillDefaults=X;function te(Z){Object.freeze(Z),Z.command&&C.freeze(Z.command)}$.freeze=te})(x||(x={}));var F;(function($){function ie(J){const j=J.runner||J._runner;let ee;if(j)switch(j){case"terminal":ee=f.ExecutionEngine.Terminal;break;case"process":ee=f.ExecutionEngine.Process;break}const X=V.from(J);if(X===1)return ee||f.ExecutionEngine.Process;if(X===2)return f.ExecutionEngine.Terminal;throw new Error("Shouldn't happen.")}$.from=ie})(F||(e.ExecutionEngine=F={}));var V;(function($){function J(j){const ee=j.version;if(!ee)return 2;switch(ee){case"0.1.0":return 1;case"2.0.0":return 2;default:return 2}}$.from=J})(V||(e.JsonSchemaVersion=V={}));class W{constructor(ie){if(this.current=Object.create(null),ie)for(const J of Object.keys(ie.current)){const j=ie.current[J];Array.isArray(j)?this.current[J]=j.slice():this.current[J]=j}}start(){this.last=this.current,this.current=Object.create(null)}getUUID(ie){const J=this.last?this.last[ie]:void 0;let j;J!==void 0&&(Array.isArray(J)?(j=J.shift(),J.length===0&&delete this.last[ie]):(j=J,delete this.last[ie])),j===void 0&&(j=D.generateUuid());const ee=this.current[ie];if(ee===void 0)this.current[ie]=j;else if(Array.isArray(ee))ee.push(j);else{const X=[ee];X.push(j),this.current[ie]=X}return j}finish(){this.last=void 0}}e.UUIDMap=W;var z;(function($){$[$.TasksJson=0]="TasksJson",$[$.WorkspaceFile=1]="WorkspaceFile",$[$.User=2]="User"})(z||(e.TaskConfigSource=z={}));class B{constructor(ie,J,j,ee,X){this.workspaceFolder=ie,this.workspace=J,this.platform=j,this.problemReporter=ee,this.uuidMap=X}run(ie,J,j){const ee=F.from(ie),X=V.from(ie),te={workspaceFolder:this.workspaceFolder,workspace:this.workspace,problemReporter:this.problemReporter,uuidMap:this.uuidMap,namedProblemMatchers:{},engine:ee,schemaVersion:X,platform:this.platform,taskLoadIssues:[],contextKeyService:j},Z=this.createTaskRunnerConfiguration(ie,te,J);return{validationStatus:this.problemReporter.status,custom:Z.custom,configured:Z.configured,engine:ee}}createTaskRunnerConfiguration(ie,J,j){const ee=x.from(ie,J);if(this.problemReporter.status.isFatal())return{custom:[],configured:[]};J.namedProblemMatchers=I.namedFrom(ie.declares,J);let X,te;if(ie.windows&&J.platform===3?(X=P.from(ie.windows.tasks,ee,J,j).custom,te=ie.windows.tasks):ie.osx&&J.platform===1?(X=P.from(ie.osx.tasks,ee,J,j).custom,te=ie.osx.tasks):ie.linux&&J.platform===2&&(X=P.from(ie.linux.tasks,ee,J,j).custom,te=ie.linux.tasks),J.schemaVersion===2&&X&&X.length>0&&te&&te.length>0){const se=[];for(const re of te)se.push(JSON.stringify(re,null,4));J.problemReporter.error(t.localize(15,null,se.join(` `)))}let Z={custom:[],configured:[]};if(ie.tasks&&(Z=P.from(ie.tasks,ee,J,j)),X&&(Z.custom=P.assignTasks(Z.custom,X)),(!Z.custom||Z.custom.length===0)&&ee.command&&ee.command.name){const se=I.from(ie.problemMatcher,J).value??[],re=ie.isBackground?!!ie.isBackground:ie.isWatching?!!ie.isWatching:void 0,oe=f.CommandString.value(ee.command.name),le=new f.CustomTask(J.uuidMap.getUUID(oe),Object.assign({},j,{config:{index:-1,element:ie,workspaceFolder:J.workspaceFolder}}),oe,f.CUSTOMIZED_TASK_TYPE,{name:void 0,runtime:void 0,presentation:void 0,suppressTaskName:!0},!1,{reevaluateOnRerun:!0},{name:oe,identifier:oe,group:f.TaskGroup.Build,isBackground:re,problemMatchers:se}),ne=A.from(ie.group);ne!==void 0?le.configurationProperties.group=ne:ie.group==="none"&&(le.configurationProperties.group=void 0),N.fillGlobals(le,ee),N.fillDefaults(le,J),Z.custom=[le]}return Z.custom=Z.custom||[],Z.configured=Z.configured||[],Z}}const K=new Map,H=new Map;function U($,ie,J,j,ee,X,te,Z=!1){const se=Z?H:K;let re=se.get(X);re||(se.set(X,new Map),re=se.get(X));let oe=re.get($.uri.toString());oe||(oe=new W,re.set($.uri.toString(),oe));try{return oe.start(),new B($,ie,J,ee,oe).run(j,X,te)}finally{oe.finish()}}e.parse=U;function G($,ie){return N.createCustomTask($,ie)}e.createCustomTask=G}),define(Q[1360],Y([1,0,20,14,6,206,4,69,42,55,18,26,63,17,2939,154,526,425,32,22,37,10,704,3774,1357,1359,1308,383,3619,1311,158]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalTaskSystem=void 0;const L="Task";class R{static{this._regex=/\$\{(.*?)\}/g}constructor(W,z,B,K){this.workspaceFolder=W,this.taskSystemInfo=z,this.values=B,this._service=K}async resolve(W){const z=[];W.replace(R._regex,(K,...H)=>(z.push(this._replacer(K,H)),K));const B=await Promise.all(z);return W.replace(R._regex,()=>B.shift())}async _replacer(W,z){const B=this.values.get(W.substring(2,W.length-1));return B??(this._service?this._service.resolveAsync(this.workspaceFolder,W):W)}}class M{constructor(W,z,B){this.task=W,this.resolver=z,this.trigger=B}verify(){let W=!1;return this.trigger&&this.resolvedVariables&&this.workspaceFolder&&this.shellLaunchConfig!==void 0&&(W=!0),W}getVerifiedTask(){if(this.verify())return{task:this.task,resolver:this.resolver,trigger:this.trigger,resolvedVariables:this.resolvedVariables,systemInfo:this.systemInfo,workspaceFolder:this.workspaceFolder,shellLaunchConfig:this.shellLaunchConfig};throw new Error("VerifiedTask was not checked. verify must be checked before getVerifiedTask.")}}class N extends T.Disposable{static{this.TelemetryEventName="taskService"}static{this.ProcessVarName="__process__"}static{this._shellQuotes={cmd:{strong:'"'},powershell:{escape:{escapeChar:"`",charsToEscape:` "'()`},strong:"'",weak:'"'},bash:{escape:{escapeChar:"\\",charsToEscape:` "'`},strong:"'",weak:'"'},zsh:{escape:{escapeChar:"\\",charsToEscape:` "'`},strong:"'",weak:'"'}}}static{this._osShellQuotes={Linux:N._shellQuotes.bash,Mac:N._shellQuotes.bash,Windows:N._shellQuotes.powershell}}taskShellIntegrationStartSequence(W){return(0,_.VSCodeSequence)("A")+(0,_.VSCodeSequence)("P","Task=True")+(W?(0,_.VSCodeSequence)("P",`Cwd=${typeof W=="string"?W:W.fsPath}`):"")+(0,_.VSCodeSequence)("B")}get taskShellIntegrationOutputSequence(){return(0,_.VSCodeSequence)("C")}constructor(W,z,B,K,H,U,G,$,ie,J,j,ee,X,te,Z,se,re,oe,le){super(),this._terminalService=W,this._terminalGroupService=z,this._outputService=B,this._paneCompositeService=K,this._viewsService=H,this._markerService=U,this._modelService=G,this._configurationResolverService=$,this._contextService=ie,this._environmentService=J,this._outputChannelId=j,this._fileService=ee,this._terminalProfileResolverService=X,this._pathService=te,this._viewDescriptorService=Z,this._logService=se,this._notificationService=re,this._isRerun=!1,this._terminalCreationQueue=Promise.resolve(),this._hasReconnected=!1,this._activeTasks=Object.create(null),this._busyTasks=Object.create(null),this._terminals=Object.create(null),this._idleTaskTerminals=new f.LinkedMap,this._sameTaskTerminals=Object.create(null),this._onDidStateChange=new b.Emitter,this._taskSystemInfoResolver=le,this._register(this._terminalStatusManager=oe.createInstance(g.TaskTerminalStatus))}get onDidStateChange(){return this._onDidStateChange.event}_log(W){this._appendOutput(W+` `)}_showOutput(){this._outputService.showChannel(this._outputChannelId,!0)}reconnect(W,z){return this._reconnectToTerminals(),this.run(W,z,C.Triggers.reconnect)}run(W,z,B=C.Triggers.command){W=W.clone();const K=I.InMemoryTask.is(W)||this._isTaskEmpty(W)?[]:this._getInstances(W),H=K.length<((W.runOptions&&W.runOptions.instanceLimit)??1),U=K[0]?.count?.count??0;if(this._currentTask=new M(W,z,B),U>0&&(W.instance=U),!H){const G=K[K.length-1];return this._lastTask=this._currentTask,{kind:2,task:G.task,active:{same:!0,background:W.configurationProperties.isBackground},promise:G.promise}}try{const G={kind:1,task:W,started:{},promise:this._executeTask(W,z,B,new Set,new Map,void 0)};return G.promise.then($=>{this._lastTask=this._currentTask}),G}catch(G){throw G instanceof C.TaskError?G:G instanceof Error?(this._log(G.message),new C.TaskError(a.default.Error,G.message,7)):(this._log(G.toString()),new C.TaskError(a.default.Error,i.localize(0,null),7))}}rerun(){if(this._lastTask&&this._lastTask.verify()){this._lastTask.task.runOptions.reevaluateOnRerun!==void 0&&!this._lastTask.task.runOptions.reevaluateOnRerun&&(this._isRerun=!0);const W=this.run(this._lastTask.task,this._lastTask.resolver);return W.promise.then(z=>{this._isRerun=!1}),W}else return}_showTaskLoadErrors(W){if(W.taskLoadMessages&&W.taskLoadMessages.length>0){W.taskLoadMessages.forEach(B=>{this._log(B+` `)});const z="Show Output";this._notificationService.prompt(a.default.Warning,i.localize(1,null,W._label),[{label:z,run:()=>this._showOutput()}])}}isTaskVisible(W){const z=this._activeTasks[W.getMapKey()];if(!z?.terminal)return!1;const B=this._terminalService.activeInstance;return!!this._viewsService.getActiveViewWithId(k.TERMINAL_VIEW_ID)&&B?.instanceId===z.terminal.instanceId}revealTask(W){const z=this._activeTasks[W.getMapKey()];if(!z?.terminal)return!1;const B=this._viewDescriptorService.getViewLocationById(k.TERMINAL_VIEW_ID)===1;return B&&this.isTaskVisible(W)?(this._previousPanelId?(this._previousTerminalInstance&&this._terminalService.setActiveInstance(this._previousTerminalInstance),this._paneCompositeService.openPaneComposite(this._previousPanelId,1)):this._paneCompositeService.hideActivePaneComposite(1),this._previousPanelId=void 0,this._previousTerminalInstance=void 0):(B&&(this._previousPanelId=this._paneCompositeService.getActivePaneComposite(1)?.getId(),this._previousPanelId===k.TERMINAL_VIEW_ID&&(this._previousTerminalInstance=this._terminalService.activeInstance??void 0)),this._terminalService.setActiveInstance(z.terminal),(I.CustomTask.is(W)||I.ContributedTask.is(W))&&this._terminalGroupService.showPanel(W.command.presentation.focus)),!0}isActive(){return Promise.resolve(this.isActiveSync())}isActiveSync(){return Object.values(this._activeTasks).some(W=>!!W.terminal)}canAutoTerminate(){return Object.values(this._activeTasks).every(W=>!W.task.configurationProperties.promptOnClose)}getActiveTasks(){return Object.values(this._activeTasks).flatMap(W=>W.terminal?W.task:[])}getLastInstance(W){const z=W.getRecentlyUsedKey();return Object.values(this._activeTasks).reverse().find(B=>z&&z===B.task.getRecentlyUsedKey())?.task}getBusyTasks(){return Object.keys(this._busyTasks).map(W=>this._busyTasks[W])}customExecutionComplete(W,z){return this._activeTasks[W.getMapKey()]?.terminal?new Promise(K=>{K()}):Promise.reject(new Error("Expected to have a terminal for a custom execution task"))}_getInstances(W){const z=W.getRecentlyUsedKey();return Object.values(this._activeTasks).filter(B=>z&&z===B.task.getRecentlyUsedKey())}_removeFromActiveTasks(W){const z=typeof W=="string"?W:W.getMapKey();this._activeTasks[z]&&delete this._activeTasks[z]}_fireTaskEvent(W){if(W.__task){const z=this._activeTasks[W.__task.getMapKey()];z&&(z.state=W.kind)}this._onDidStateChange.fire(W)}terminate(W){const z=this._activeTasks[W.getMapKey()],B=z.terminal;return B?new Promise((K,H)=>{B.onDisposed(G=>{this._fireTaskEvent(I.TaskEvent.create("terminated",W,G.instanceId,G.exitReason))});const U=B.onExit(()=>{const G=z.task;try{U.dispose(),this._fireTaskEvent(I.TaskEvent.create("terminated",G,B.instanceId,B.exitReason))}catch{}K({success:!0,task:G})});B.dispose()}):Promise.resolve({success:!1,task:void 0})}terminateAll(){const W=[];for(const[z,B]of Object.entries(this._activeTasks)){const K=B.terminal;K&&(W.push(new Promise((H,U)=>{const G=K.onExit(()=>{const $=B.task;try{G.dispose(),this._fireTaskEvent(I.TaskEvent.create("terminated",$,K.instanceId,K.exitReason))}catch{}this._activeTasks[z]===B&&delete this._activeTasks[z],H({success:!0,task:B.task})})})),K.dispose())}return Promise.all(W)}_showDependencyCycleMessage(W){this._log(i.localize(2,null,W._label)),this._showOutput()}_executeTask(W,z,B,K,H,U){this._showTaskLoadErrors(W);const G=W.getMapKey(),$=Promise.resolve().then(async()=>{U=U??new Map;const ee=[];if(W.configurationProperties.dependsOn){const X=new Set(K).add(W.getCommonTaskId());for(const te of W.configurationProperties.dependsOn){const Z=await z.resolve(te.uri,te.task);if(Z){this._adoptConfigurationForDependencyTask(Z,W);let se;const re=Z.getCommonTaskId();if(X.has(re))this._showDependencyCycleMessage(Z),se=Promise.resolve({});else if(se=H.get(re),!se){const oe=this._activeTasks[Z.getMapKey()]??this._getInstances(Z).pop();se=oe&&this._getDependencyPromise(oe)}if(se||(this._fireTaskEvent(I.TaskEvent.create("dependsOnStarted",W)),se=this._executeDependencyTask(Z,z,B,X,H,U)),H.set(re,se),ee.push(se),W.configurationProperties.dependsOrder==="sequence"&&(await se).exitCode!==0)break}else this._log(i.localize(3,null,r.isString(te.task)?te.task:JSON.stringify(te.task,void 0,0),te.uri.toString())),this._showOutput()}}return Promise.all(ee).then(X=>{for(const te of X)if(te.exitCode!==0)return{exitCode:te.exitCode};return(I.ContributedTask.is(W)||I.CustomTask.is(W))&&W.command?this._isRerun?this._reexecuteCommand(W,B,U):this._executeCommand(W,B,U):{exitCode:0}})}).finally(()=>{this._activeTasks[G]===j&&delete this._activeTasks[G]}),J=this._getInstances(W).pop()?.count??{count:0};J.count++;const j={task:W,promise:$,count:J};return this._activeTasks[G]=j,$}_createInactiveDependencyPromise(W){return new Promise(z=>{const B=this.onDidStateChange(K=>{K.kind==="inactive"&&K.__task===W&&(B.dispose(),z({exitCode:0}))})})}_adoptConfigurationForDependencyTask(W,z){W.configurationProperties.icon?(W.configurationProperties.icon.id||=z.configurationProperties.icon?.id,W.configurationProperties.icon.color||=z.configurationProperties.icon?.color):W.configurationProperties.icon=z.configurationProperties.icon,W.configurationProperties.hide?W.configurationProperties.hide||=z.configurationProperties.hide:W.configurationProperties.hide=z.configurationProperties.hide}async _getDependencyPromise(W){return!W.task.configurationProperties.isBackground||!W.task.configurationProperties.problemMatchers||W.task.configurationProperties.problemMatchers.length===0?W.promise:W.state==="inactive"?{exitCode:0}:this._createInactiveDependencyPromise(W.task)}async _executeDependencyTask(W,z,B,K,H,U){if(!W.configurationProperties.isBackground)return this._executeTask(W,z,B,K,H,U);const G=this._createInactiveDependencyPromise(W);return Promise.race([G,this._executeTask(W,z,B,K,H,U)])}async _resolveAndFindExecutable(W,z,B,K,H){const U=await this._configurationResolverService.resolveAsync(z,I.CommandString.value(B.command.name));K=K?await this._configurationResolverService.resolveAsync(z,K):void 0;const G=H?await Promise.all(H.split(m.delimiter).map(ie=>this._configurationResolverService.resolveAsync(z,ie))):void 0;let $=await W?.findExecutable(U,K,G);return $||($=m.join(K??"",U)),$}_findUnresolvedVariables(W,z){if(z.size===0)return W;const B=new Set;for(const K of W)z.has(K.substring(2,K.length-1))||B.add(K);return B}_mergeMaps(W,z){for(const B of z)W.has(B[0])||W.set(B[0],B[1])}async _acquireInput(W,z,B,K,H){const U=await this._resolveVariablesFromSet(W,z,B,K,H);return this._fireTaskEvent(I.TaskEvent.create("acquiredInput",B)),U}_resolveVariablesFromSet(W,z,B,K,H){const U=B.command&&B.command.runtime===I.RuntimeType.Process,G=B.command&&B.command.options?B.command.options:void 0,$=G?G.cwd:void 0;let ie;if(G&&G.env){for(const ee of Object.keys(G.env))if(ee.toLowerCase()==="path"){r.isString(G.env[ee])&&(ie=G.env[ee]);break}}const J=this._findUnresolvedVariables(K,H);let j;if(W&&z){const ee={variables:J};return W.platform===3&&U&&(ee.process={name:I.CommandString.value(B.command.name)},$&&(ee.process.cwd=$),ie&&(ee.process.path=ie)),j=W.resolveVariables(z,ee,I.TaskSourceKind.toConfigurationTarget(B._source.kind)).then(async X=>{if(X){if(this._mergeMaps(H,X.variables),X.variables=new Map(H),U){let te=I.CommandString.value(B.command.name);W.platform===3&&(te=await this._resolveAndFindExecutable(W,z,B,$,ie)),X.variables.set(N.ProcessVarName,te)}return X}}),j}else{const ee=new Array;return J.forEach(X=>ee.push(X)),new Promise((X,te)=>{this._configurationResolverService.resolveWithInteraction(z,ee,"tasks",void 0,I.TaskSourceKind.toConfigurationTarget(B._source.kind)).then(async Z=>{if(Z){if(this._mergeMaps(H,Z),Z=new Map(H),U){let re;S.isWindows?re=await this._resolveAndFindExecutable(W,z,B,$,ie):re=await this._configurationResolverService.resolveAsync(z,I.CommandString.value(B.command.name)),Z.set(N.ProcessVarName,re)}X({variables:Z})}else X(void 0)},Z=>{te(Z)})})}}_executeCommand(W,z,B){const K=W.getWorkspaceFolder();let H;if(K)H=this._currentTask.workspaceFolder=K;else{const ie=this._contextService.getWorkspace().folders;H=ie.length>0?ie[0]:void 0}const U=this._currentTask.systemInfo=this._taskSystemInfoResolver(H),G=new Set;return this._collectTaskVariables(G,W),this._acquireInput(U,H,W,G,B).then(ie=>ie&&!this._isTaskEmpty(W)?(this._currentTask.resolvedVariables=ie,this._executeInTerminal(W,z,new R(H,U,ie.variables,this._configurationResolverService),H)):(this._fireTaskEvent(I.TaskEvent.create("end",W)),Promise.resolve({exitCode:0})),ie=>Promise.reject(ie))}_isTaskEmpty(W){const z=W.command.runtime===I.RuntimeType.CustomExecution;return!(W.command!==void 0&&W.command.runtime&&(z||W.command.name!==void 0))}_reexecuteCommand(W,z,B){const K=this._lastTask;if(!K)return Promise.reject(new Error("No task previously run"));const H=this._currentTask.workspaceFolder=K.workspaceFolder,U=new Set;this._collectTaskVariables(U,W);let G=!0;return U.forEach($=>{$.substring(2,$.length-1)in K.getVerifiedTask().resolvedVariables&&(G=!1)}),G?(this._currentTask.resolvedVariables=K.getVerifiedTask().resolvedVariables,this._executeInTerminal(W,z,new R(K.getVerifiedTask().workspaceFolder,K.getVerifiedTask().systemInfo,K.getVerifiedTask().resolvedVariables.variables,this._configurationResolverService),H)):this._acquireInput(K.getVerifiedTask().systemInfo,K.getVerifiedTask().workspaceFolder,W,U,B).then($=>$?(this._currentTask.resolvedVariables=$,this._executeInTerminal(W,z,new R(K.getVerifiedTask().workspaceFolder,K.getVerifiedTask().systemInfo,$.variables,this._configurationResolverService),H)):(this._fireTaskEvent(I.TaskEvent.create("end",W)),{exitCode:0}),$=>Promise.reject($))}async _executeInTerminal(W,z,B,K){let H,U,G;if(W.configurationProperties.isBackground){const ie=await this._resolveMatchers(B,W.configurationProperties.problemMatchers),J=new w.WatchingProblemCollector(ie,this._markerService,this._modelService,this._fileService);ie.length>0&&!J.isWatching()&&(this._appendOutput(i.localize(4,null,W._label)),this._showOutput());const j=new T.DisposableStore;let ee=0;const X=W.getMapKey();j.add(J.onDidStateChange(re=>{if(re.kind==="backgroundProcessingBegins")ee++,this._busyTasks[X]=W,this._fireTaskEvent(I.TaskEvent.create("active",W,H?.instanceId));else if(re.kind==="backgroundProcessingEnds"&&(ee--,this._busyTasks[X]&&delete this._busyTasks[X],this._fireTaskEvent(I.TaskEvent.create("inactive",W,H?.instanceId)),ee===0&&J.numberOfMatches>0&&J.maxMarkerSeverity&&J.maxMarkerSeverity>=s.MarkerSeverity.Error)){const oe=W.command.presentation.reveal;W.command.presentation.revealProblems===I.RevealProblemKind.OnProblem?this._viewsService.openView(o.Markers.MARKERS_VIEW_ID,!0):oe===I.RevealKind.Silent&&(this._terminalService.setActiveInstance(H),this._terminalGroupService.showPanel(!1))}})),J.aboutToStart();let te;if([H,U]=await this._createTerminal(W,B,K),U)return Promise.reject(new Error(U.message));if(!H)return Promise.reject(new Error(`Failed to create terminal for task ${W._label}`));this._terminalStatusManager.addTerminal(W,H,J);let Z=!1;H.processReady.then(()=>{Z||(this._fireTaskEvent(I.TaskEvent.create("processStarted",W,H.instanceId,H.processId)),Z=!0)},re=>{this._logService.error("Task terminal process never got ready")}),this._fireTaskEvent(I.TaskEvent.create("start",W,H.instanceId,B.values));let se;if(ie.length&&(se=H.onLineData(re=>{J.processLine(re),te||(te=new y.Delayer(3e3)),te.trigger(()=>{J.forceDelivery(),te=void 0})})),G=new Promise((re,oe)=>{const le=H.onExit(ne=>{const ce=typeof ne=="number"?ne:ne?.code;se?.dispose(),le.dispose();const ae=W.getMapKey();if(this._busyTasks[X]&&delete this._busyTasks[X],this._removeFromActiveTasks(W),this._fireTaskEvent(I.TaskEvent.create("changed")),ne!==void 0)switch(W.command.presentation.panel){case I.PanelKind.Dedicated:this._sameTaskTerminals[ae]=H.instanceId.toString();break;case I.PanelKind.Shared:this._idleTaskTerminals.set(ae,H.instanceId.toString(),1);break}if(W.command.presentation.reveal===I.RevealKind.Silent&&(ce!==0||J.numberOfMatches>0&&J.maxMarkerSeverity&&J.maxMarkerSeverity>=s.MarkerSeverity.Error))try{this._terminalService.setActiveInstance(H),this._terminalGroupService.showPanel(!1)}catch{}J.done(),J.dispose(),Z||(this._fireTaskEvent(I.TaskEvent.create("processStarted",W,H.instanceId,H.processId)),Z=!0),this._fireTaskEvent(I.TaskEvent.create("processEnded",W,H.instanceId,ce));for(let de=0;de<ee;de++)this._fireTaskEvent(I.TaskEvent.create("inactive",W,H.instanceId));ee=0,this._fireTaskEvent(I.TaskEvent.create("end",W)),j.dispose(),re({exitCode:ce??void 0})})}),z===C.Triggers.reconnect&&H.xterm){const re=[],oe=H.xterm.getBufferReverseIterator(),le=new RegExp(J.beginPatterns.map(ne=>ne.source).join("|"));for(const ne of oe)if(re.push(ne),le.test(ne))break;for(let ne=re.length-1;ne>=0;ne--)J.processLine(re[ne])}}else{if([H,U]=await this._createTerminal(W,B,K),U)return Promise.reject(new Error(U.message));if(!H)return Promise.reject(new Error(`Failed to create terminal for task ${W._label}`));let ie=!1;H.processReady.then(()=>{ie||(this._fireTaskEvent(I.TaskEvent.create("processStarted",W,H.instanceId,H.processId)),ie=!0)},te=>{}),this._fireTaskEvent(I.TaskEvent.create("start",W,H.instanceId,B.values));const J=W.getMapKey();this._busyTasks[J]=W,this._fireTaskEvent(I.TaskEvent.create("active",W,H.instanceId));const j=await this._resolveMatchers(B,W.configurationProperties.problemMatchers),ee=new w.StartStopProblemCollector(j,this._markerService,this._modelService,0,this._fileService);this._terminalStatusManager.addTerminal(W,H,ee);const X=H.onLineData(te=>{ee.processLine(te)});G=new Promise((te,Z)=>{const se=H.onExit(re=>{const oe=typeof re=="number"?re:re?.code;se.dispose();const le=W.getMapKey();if(this._removeFromActiveTasks(W),this._fireTaskEvent(I.TaskEvent.create("changed")),re!==void 0)switch(W.command.presentation.panel){case I.PanelKind.Dedicated:this._sameTaskTerminals[le]=H.instanceId.toString();break;case I.PanelKind.Shared:this._idleTaskTerminals.set(le,H.instanceId.toString(),1);break}const ne=W.command.presentation.reveal,ce=W.command.presentation.revealProblems;if(H&&ce===I.RevealProblemKind.OnProblem&&ee.numberOfMatches>0)this._viewsService.openView(o.Markers.MARKERS_VIEW_ID);else if(H&&ne===I.RevealKind.Silent&&(oe!==0||ee.numberOfMatches>0&&ee.maxMarkerSeverity&&ee.maxMarkerSeverity>=s.MarkerSeverity.Error))try{this._terminalService.setActiveInstance(H),this._terminalGroupService.showPanel(!1)}catch{}setTimeout(()=>{X.dispose(),ee.done(),ee.dispose()},100),!ie&&H&&(this._fireTaskEvent(I.TaskEvent.create("processStarted",W,H.instanceId,H.processId)),ie=!0),this._fireTaskEvent(I.TaskEvent.create("processEnded",W,H?.instanceId,oe??void 0)),this._busyTasks[J]&&delete this._busyTasks[J],this._fireTaskEvent(I.TaskEvent.create("inactive",W,H?.instanceId)),this._fireTaskEvent(I.TaskEvent.create("end",W,H?.instanceId)),te({exitCode:oe??void 0})})})}return W.command.presentation&&W.command.presentation.revealProblems===I.RevealProblemKind.Always?this._viewsService.openView(o.Markers.MARKERS_VIEW_ID):W.command.presentation&&(W.command.presentation.focus||W.command.presentation.reveal===I.RevealKind.Always)&&(this._terminalService.setActiveInstance(H),this._terminalGroupService.showPanel(W.command.presentation.focus)),this._activeTasks[W.getMapKey()].terminal=H,this._fireTaskEvent(I.TaskEvent.create("changed")),G}_createTerminalName(W){return this._contextService.getWorkbenchState()===3?W.getQualifiedLabel():W.configurationProperties.name||""}async _createShellLaunchConfig(W,z,B,K,H,U,G,$){let ie;const J=W.command.runtime===I.RuntimeType.Shell,j=this._contextService.getWorkbenchState()===3,ee=this._createTerminalName(W),X=L,te=W.command.name;let Z;if(H.cwd&&(Z=H.cwd,m.isAbsolute(Z)||z&&z.uri.scheme===p.Schemas.file&&(Z=m.join(z.uri.fsPath,Z)),Z=(0,D.isUNC)(Z)?Z:h.toLocalResource(l.URI.from({scheme:p.Schemas.file,path:Z}),this._environmentService.remoteAuthority,this._pathService.defaultUriScheme)),J){let se;switch(K){case 3:se=1;break;case 1:se=2;break;case 2:default:se=3;break}const re=await this._terminalProfileResolverService.getDefaultProfile({allowAutomationShell:!0,os:se,remoteAuthority:this._environmentService.remoteAuthority});let oe;if(W.configurationProperties.icon?.id)oe=c.ThemeIcon.fromId(W.configurationProperties.icon.id);else{const be=W.configurationProperties.group?E.GroupKind.to(W.configurationProperties.group):void 0;oe=(typeof be=="string"?be:be?.kind)==="test"?c.ThemeIcon.fromId(d.Codicon.beaker.id):re.icon}ie={name:ee,type:X,executable:re.path,args:re.args,env:{...re.env},icon:oe,color:W.configurationProperties.icon?.color||void 0,waitOnExit:$};let le=!1;const ne=W.command.options&&W.command.options.shell;ne&&(ne.executable&&(ne.executable!==ie.executable&&(ie.args=void 0),ie.executable=await this._resolveVariable(B,ne.executable),le=!0),ne.args&&(ie.args=await this._resolveVariables(B,ne.args.slice()))),ie.args===void 0&&(ie.args=[]);const ce=Array.isArray(ie.args)?ie.args.slice(0):[ie.args],ae=[],ue=m.posix.basename((await this._pathService.fileURI(ie.executable)).path).toLowerCase(),de=this._buildShellCommandLine(K,ue,ne,U,te,G);let ge=!1;if(K===3){ge=!0;const be=await this._pathService.userHome();if(ue==="cmd.exe"&&(H.cwd&&(0,D.isUNC)(H.cwd)||!H.cwd&&(0,D.isUNC)(be.fsPath)))return;ue==="powershell.exe"||ue==="pwsh.exe"?le||ae.push("-Command"):ue==="bash.exe"||ue==="zsh.exe"?(ge=!1,le||ae.push("-c")):ue==="wsl.exe"?le||ae.push("-e"):le||ae.push("/d","/c")}else le||ae.push("-c");const he=this._addAllArgument(ae,ce);he.push(de),ie.args=ge?he.join(" "):he,W.command.presentation&&W.command.presentation.echo?j&&z?ie.initialText=this.taskShellIntegrationStartSequence(Z)+(0,n.formatMessageForTerminal)(i.localize(5,null,z.name,de),{excludeLeadingNewLine:!0})+this.taskShellIntegrationOutputSequence:ie.initialText=this.taskShellIntegrationStartSequence(Z)+(0,n.formatMessageForTerminal)(i.localize(6,null,de),{excludeLeadingNewLine:!0})+this.taskShellIntegrationOutputSequence:ie.initialText={text:this.taskShellIntegrationStartSequence(Z)+this.taskShellIntegrationOutputSequence,trailingNewLine:!1}}else{const se=W.command.runtime!==I.RuntimeType.CustomExecution?I.CommandString.value(U):void 0,re=J?se:await this._resolveVariable(B,await this._resolveVariable(B,"${"+N.ProcessVarName+"}"));if(ie={name:ee,type:X,icon:W.configurationProperties.icon?.id?c.ThemeIcon.fromId(W.configurationProperties.icon.id):void 0,color:W.configurationProperties.icon?.color||void 0,executable:re,args:G.map(oe=>r.isString(oe)?oe:oe.value),waitOnExit:$},W.command.presentation&&W.command.presentation.echo){const oe=le=>!le||le.length===0?"":r.isString(le)?le:le.join(" ");j&&z?ie.initialText=this.taskShellIntegrationStartSequence(Z)+(0,n.formatMessageForTerminal)(i.localize(7,null,z.name,`${ie.executable} ${oe(ie.args)}`),{excludeLeadingNewLine:!0})+this.taskShellIntegrationOutputSequence:ie.initialText=this.taskShellIntegrationStartSequence(Z)+(0,n.formatMessageForTerminal)(i.localize(8,null,`${ie.executable} ${oe(ie.args)}`),{excludeLeadingNewLine:!0})+this.taskShellIntegrationOutputSequence}else ie.initialText={text:this.taskShellIntegrationStartSequence(Z)+this.taskShellIntegrationOutputSequence,trailingNewLine:!1}}return Z&&(ie.cwd=Z),H.env&&(ie.env?ie.env={...ie.env,...H.env}:ie.env=H.env),ie.isFeatureTerminal=!0,ie.useShellEnvironment=!0,ie}_addAllArgument(W,z){const B=v.deepClone(z);return W.forEach(K=>{z.every((U,G)=>U.toLowerCase()===K&&z.length>G+1?!z.slice(G+1).every($=>$.startsWith("-")):U.toLowerCase()!==K)&&B.push(K)}),B}async _reconnectToTerminal(W){if(this._reconnectedTerminals)for(let z=0;z<this._reconnectedTerminals.length;z++){const B=this._reconnectedTerminals[z];if(F(B)?.lastTask===W.getCommonTaskId())return this._reconnectedTerminals.splice(z,1),B}}async _doCreateTerminal(W,z,B){const K=await this._reconnectToTerminal(W);if(K)return"command"in W&&W.command.presentation&&(K.waitOnExit=P(W.command.presentation,W.configurationProperties)),K.onDisposed(U=>this._fireTaskEvent({kind:"terminated",exitReason:U.exitReason,taskId:W.getRecentlyUsedKey()})),this._logService.trace("reconnected to task and terminal",W._id),K;if(z){for(const U of Object.values(this._terminals))if(U.group===z){this._logService.trace(`Found terminal to split for group ${z}`);const G=U.terminal,$=await this._terminalService.createTerminal({location:{parentTerminal:G},config:B});if($.onDisposed(ie=>this._fireTaskEvent({kind:"terminated",exitReason:ie.exitReason,taskId:W.getRecentlyUsedKey()})),$)return $}this._logService.trace(`No terminal found to split for group ${z}`)}const H=await this._terminalService.createTerminal({config:B});return H.onDisposed(U=>this._fireTaskEvent({kind:"terminated",exitReason:U.exitReason,taskId:W.getRecentlyUsedKey()})),H}_reconnectToTerminals(){if(this._hasReconnected){this._logService.trace(`Already reconnected, to ${this._reconnectedTerminals?.length} terminals so returning`);return}if(this._reconnectedTerminals=this._terminalService.getReconnectedTerminals(L)?.filter(W=>!W.isDisposed&&F(W))||[],this._logService.trace(`Attempting reconnection of ${this._reconnectedTerminals?.length} terminals`),!this._reconnectedTerminals?.length)this._logService.trace("No terminals to reconnect to so returning");else for(const W of this._reconnectedTerminals){const z=F(W);if(z){const B={lastTask:z.lastTask,group:z.group,terminal:W};this._terminals[W.instanceId]=B,this._logService.trace("Reconnecting to task terminal",B.lastTask,W.instanceId)}}this._hasReconnected=!0}_deleteTaskAndTerminal(W,z){delete this._terminals[W.instanceId],delete this._sameTaskTerminals[z.lastTask],this._idleTaskTerminals.delete(z.lastTask);const B=z.lastTask;this._removeFromActiveTasks(B),this._busyTasks[B]&&delete this._busyTasks[B]}async _createTerminal(W,z,B){const K=z.taskSystemInfo?z.taskSystemInfo.platform:S.platform,H=await this._resolveOptions(z,W.command.options),U=W.command.presentation;if(!U)throw new Error("Task presentation options should not be undefined here.");const G=P(U,W.configurationProperties);let $,ie,J;if(W.command.runtime===I.RuntimeType.CustomExecution)this._currentTask.shellLaunchConfig=J={customPtyImplementation:(le,ne,ce)=>new A.TerminalProcessExtHostProxy(le,ne,ce,this._terminalService),waitOnExit:G,name:this._createTerminalName(W),initialText:W.command.presentation&&W.command.presentation.echo?(0,n.formatMessageForTerminal)(i.localize(9,null,W._label),{excludeLeadingNewLine:!0}):void 0,isFeatureTerminal:!0,icon:W.configurationProperties.icon?.id?c.ThemeIcon.fromId(W.configurationProperties.icon.id):void 0,color:W.configurationProperties.icon?.color||void 0};else{const le=await this._resolveCommandAndArgs(z,W.command);if($=le.command,ie=le.args,this._currentTask.shellLaunchConfig=J=await this._createShellLaunchConfig(W,B,z,K,H,$,ie,G),J===void 0)return[void 0,new C.TaskError(a.default.Error,i.localize(10,null),7)]}const j=U.panel===I.PanelKind.Dedicated,ee=U.panel===I.PanelKind.Shared,X=U.group,te=W.getMapKey();let Z;if(j){const le=this._sameTaskTerminals[te];le&&(Z=this._terminals[le],delete this._sameTaskTerminals[te])}else if(ee){let le=this._idleTaskTerminals.remove(te);if(!le)for(const ne of this._idleTaskTerminals.keys()){const ce=this._idleTaskTerminals.get(ne);if(ce&&this._terminals[ce]&&this._terminals[ce].group===X){le=this._idleTaskTerminals.remove(ne);break}}le&&(Z=this._terminals[le])}if(Z){if(!J)throw new Error("Task shell launch configuration should not be undefined here.");return Z.terminal.scrollToBottom(),W.configurationProperties.isBackground&&(J.reconnectionProperties={ownerId:L,data:{lastTask:W.getCommonTaskId(),group:X,label:W._label,id:W._id}}),await Z.terminal.reuseTerminal(J),W.command.presentation&&W.command.presentation.clear&&Z.terminal.clearBuffer(),this._terminals[Z.terminal.instanceId.toString()].lastTask=te,[Z.terminal,void 0]}this._terminalCreationQueue=this._terminalCreationQueue.then(()=>this._doCreateTerminal(W,X,J));const se=await this._terminalCreationQueue;W.configurationProperties.isBackground&&(se.shellLaunchConfig.reconnectionProperties={ownerId:L,data:{lastTask:W.getCommonTaskId(),group:X,label:W._label,id:W._id}});const re=se.instanceId.toString(),oe={terminal:se,lastTask:te,group:X};return se.onDisposed(()=>this._deleteTaskAndTerminal(se,oe)),this._terminals[re]=oe,[se,void 0]}_buildShellCommandLine(W,z,B,K,H,U){const G=m.parse(z).name.toLowerCase(),$=this._getQuotingOptions(G,B,W);function ie(oe){if(oe.length>=2&&(oe[0]===$.strong?$.strong:oe[0]===$.weak?$.weak:void 0)===oe[oe.length-1])return!1;let le;for(let ne=0;ne<oe.length;ne++){const ce=oe[ne];if(ce===le)le=void 0;else{if(le!==void 0)continue;if(ce===$.escape)ne++;else if(ce===$.strong||ce===$.weak)le=ce;else if(ce===" ")return!0}}return!1}function J(oe,le){if(le===I.ShellQuoting.Strong&&$.strong)return[$.strong+oe+$.strong,!0];if(le===I.ShellQuoting.Weak&&$.weak)return[$.weak+oe+$.weak,!0];if(le===I.ShellQuoting.Escape&&$.escape){if(r.isString($.escape))return[oe.replace(/ /g,$.escape+" "),!0];{const ne=[];for(const ue of $.escape.charsToEscape)ne.push(`\\${ue}`);const ce=new RegExp("["+ne.join(",")+"]","g"),ae=$.escape.escapeChar;return[oe.replace(ce,ue=>ae+ue),!0]}}return[oe,!1]}function j(oe){return r.isString(oe)?ie(oe)?J(oe,I.ShellQuoting.Strong):[oe,!1]:J(oe.value,oe.quoting)}if((!U||U.length===0)&&r.isString(K)&&(K===H||ie(H)))return K;const ee=[];let X=!1,te=!1,Z,se;[Z,se]=j(K),ee.push(Z),X=se;for(const oe of U)[Z,se]=j(oe),ee.push(Z),te=te||se;let re=ee.join(" ");return W===3&&(G==="cmd"&&X&&te?re='"'+re+'"':(G==="powershell"||G==="pwsh")&&X&&(re="& "+re)),re}_getQuotingOptions(W,z,B){return z&&z.quoting?z.quoting:N._shellQuotes[W]||N._osShellQuotes[S.PlatformToString(B)]}_collectTaskVariables(W,z){if(z.command&&z.command.name&&this._collectCommandVariables(W,z.command,z),this._collectMatcherVariables(W,z.configurationProperties.problemMatchers),z.command.runtime===I.RuntimeType.CustomExecution&&(I.CustomTask.is(z)||I.ContributedTask.is(z))){let B;I.CustomTask.is(z)?B=z._source.config.element:(B=v.deepClone(z.defines),delete B._key,delete B.type),this._collectDefinitionVariables(W,B)}}_collectDefinitionVariables(W,z){if(r.isString(z))this._collectVariables(W,z);else if(Array.isArray(z))z.forEach(B=>this._collectDefinitionVariables(W,B));else if(r.isObject(z))for(const B in z)this._collectDefinitionVariables(W,z[B])}_collectCommandVariables(W,z,B){if(z.runtime===I.RuntimeType.CustomExecution)return;if(z.name===void 0)throw new Error("Command name should never be undefined here.");if(this._collectVariables(W,z.name),z.args?.forEach(H=>this._collectVariables(W,H)),B._source.scope!==1&&W.add("${workspaceFolder}"),z.options){const H=z.options;H.cwd&&this._collectVariables(W,H.cwd);const U=H.env;U&&Object.keys(U).forEach(G=>{const $=U[G];r.isString($)&&this._collectVariables(W,$)}),H.shell&&(H.shell.executable&&this._collectVariables(W,H.shell.executable),H.shell.args?.forEach(G=>this._collectVariables(W,G)))}}_collectMatcherVariables(W,z){z==null||z.length===0||z.forEach(B=>{let K;if(r.isString(B)?B[0]==="$"?K=u.ProblemMatcherRegistry.get(B.substring(1)):K=u.ProblemMatcherRegistry.get(B):K=B,K&&K.filePrefix)if(r.isString(K.filePrefix))this._collectVariables(W,K.filePrefix);else for(const H of[...(0,t.asArray)(K.filePrefix.include||[]),...(0,t.asArray)(K.filePrefix.exclude||[])])this._collectVariables(W,H)})}_collectVariables(W,z){const B=r.isString(z)?z:z.value,K=/\$\{(.*?)\}/g;let H;do H=K.exec(B),H&&W.add(H[0]);while(H)}async _resolveCommandAndArgs(W,z){let B=z.args?z.args.slice():[];return B=await this._resolveVariables(W,B),{command:await this._resolveVariable(W,z.name),args:B}}async _resolveVariables(W,z){return Promise.all(z.map(B=>this._resolveVariable(W,B)))}async _resolveMatchers(W,z){if(z==null||z.length===0)return[];const B=[];for(const K of z){let H;if(r.isString(K)?K[0]==="$"?H=u.ProblemMatcherRegistry.get(K.substring(1)):H=u.ProblemMatcherRegistry.get(K):H=K,!H){this._appendOutput(i.localize(11,null));continue}const U=W.taskSystemInfo,G=H.filePrefix!==void 0,$=U!==void 0&&U.uriProvider!==void 0;if(!G&&!$)B.push(H);else{const ie=v.deepClone(H);if($&&U!==void 0&&(ie.uriProvider=U.uriProvider),G){const J=ie.filePrefix;r.isString(J)?ie.filePrefix=await this._resolveVariable(W,J):J!==void 0&&(J.include&&(J.include=Array.isArray(J.include)?await Promise.all(J.include.map(j=>this._resolveVariable(W,j))):await this._resolveVariable(W,J.include)),J.exclude&&(J.exclude=Array.isArray(J.exclude)?await Promise.all(J.exclude.map(j=>this._resolveVariable(W,j))):await this._resolveVariable(W,J.exclude)))}B.push(ie)}}return B}async _resolveVariable(W,z){if(r.isString(z))return W.resolve(z);if(z!==void 0)return{value:await W.resolve(z.value),quoting:z.quoting};throw new Error("Should never try to resolve undefined.")}async _resolveOptions(W,z){if(z==null){let K;try{K=await this._resolveVariable(W,"${workspaceFolder}")}catch{}return{cwd:K}}const B=r.isString(z.cwd)?{cwd:await this._resolveVariable(W,z.cwd)}:{cwd:await this._resolveVariable(W,"${workspaceFolder}")};if(z.env){B.env=Object.create(null);for(const K of Object.keys(z.env)){const H=z.env[K];r.isString(H)?B.env[K]=await this._resolveVariable(W,H):B.env[K]=H.toString()}}return B}static{this.WellKnownCommands={ant:!0,cmake:!0,eslint:!0,gradle:!0,grunt:!0,gulp:!0,jake:!0,jenkins:!0,jshint:!0,make:!0,maven:!0,msbuild:!0,msc:!0,nmake:!0,npm:!0,rake:!0,tsc:!0,xbuild:!0}}getSanitizedCommand(W){let z=W.toLowerCase();const B=z.lastIndexOf(m.sep);return B!==-1&&(z=z.substring(B+1)),N.WellKnownCommands[z]?z:"other"}_appendOutput(W){this._outputService.getChannel(this._outputChannelId)?.append(W)}}e.TerminalTaskSystem=N;function P(V,W){return(V.close===void 0||V.close===!1)&&(V.reveal!==I.RevealKind.Never||!W.isBackground||V.close===!1)?V.panel===I.PanelKind.New?x(i.localize(12,null)):V.showReuseMessage?x(i.localize(13,null)):!0:!V.close}function x(V){return W=>`${(0,_.VSCodeSequence)("D",W.toString())}${V}`}function F(V){return V.shellLaunchConfig.attachPersistentProcess?.reconnectionProperties?.data}}),define(Q[1361],Y([1,0,121,158,5,10]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalContributionService=e.ITerminalContributionService=void 0;const T=t.ExtensionsRegistry.registerExtensionPoint(y.terminalContributionsDescriptor);e.ITerminalContributionService=(0,b.createDecorator)("terminalContributionsService");class f{get terminalProfiles(){return this._terminalProfiles}constructor(){this._terminalProfiles=[],T.setHandler(S=>{this._terminalProfiles=S.map(h=>h.value?.profiles?.filter(a=>v(a)).map(a=>({...a,extensionIdentifier:h.description.identifier.value}))||[]).flat()})}}e.TerminalContributionService=f;function v(m){return!m.icon||typeof m.icon=="string"||D.URI.isUri(m.icon)||"light"in m.icon&&"dark"in m.icon&&D.URI.isUri(m.icon.light)&&D.URI.isUri(m.icon.dark)}}),define(Q[3778],Y([1,0,35,1361]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSingleton)(y.ITerminalContributionService,y.TerminalContributionService,1)}),define(Q[3779],Y([1,0,6,4,2991,44,121]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalQuickFixService=void 0;class f{get providers(){return this._providers}constructor(){this._selectors=new Map,this._providers=new Map,this._onDidRegisterProvider=new t.Emitter,this.onDidRegisterProvider=this._onDidRegisterProvider.event,this._onDidRegisterCommandSelector=new t.Emitter,this.onDidRegisterCommandSelector=this._onDidRegisterCommandSelector.event,this._onDidUnregisterProvider=new t.Emitter,this.onDidUnregisterProvider=this._onDidUnregisterProvider.event,this.extensionQuickFixes=new Promise(S=>v.setHandler(h=>{S(h.filter(a=>(0,D.isProposedApiEnabled)(a.description,"terminalQuickFixProvider")).map(a=>a.value?a.value.map(r=>({...r,extensionIdentifier:a.description.identifier.value})):[]).flat())})),this.extensionQuickFixes.then(S=>{for(const h of S)this.registerCommandSelector(h)})}registerCommandSelector(S){this._selectors.set(S.id,S),this._onDidRegisterCommandSelector.fire(S)}registerQuickFixProvider(S,h){let a=!1;return this.extensionQuickFixes.then(()=>{if(a)return;this._providers.set(S,h);const r=this._selectors.get(S);if(!r)throw new Error(`No registered selector for ID: ${S}`);this._onDidRegisterProvider.fire({selector:r,provider:h})}),(0,y.toDisposable)(()=>{a=!0,this._providers.delete(S);const r=this._selectors.get(S);r&&(this._selectors.delete(S),this._onDidUnregisterProvider.fire(r.id))})}}e.TerminalQuickFixService=f;const v=T.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"terminalQuickFixes",defaultExtensionKind:["workspace"],activationEventsGenerator:(m,S)=>{for(const h of m??[])S.push(`onTerminalQuickFixRequest:${h.id}`)},jsonSchema:{description:(0,b.localize)(0,null),type:"array",items:{type:"object",additionalProperties:!1,required:["id","commandLineMatcher","outputMatcher","commandExitResult"],defaultSnippets:[{body:{id:"$1",commandLineMatcher:"$2",outputMatcher:"$3",exitStatus:"$4"}}],properties:{id:{description:(0,b.localize)(1,null),type:"string"},commandLineMatcher:{description:(0,b.localize)(2,null),type:"string"},outputMatcher:{markdownDescription:(0,b.localize)(3,null),type:"object",required:["lineMatcher","anchor","offset","length"],properties:{lineMatcher:{description:"A regular expression or string to test the command line against",type:"string"},anchor:{description:"Where the search should begin in the buffer",enum:["top","bottom"]},offset:{description:"The number of lines vertically from the anchor in the buffer to start matching against",type:"number"},length:{description:"The number of rows to match against, this should be as small as possible for performance reasons",type:"number"}}},commandExitResult:{description:(0,b.localize)(4,null),enum:["success","error"],enumDescriptions:["The command exited with an exit code of zero.","The command exited with a non-zero exit code."]},kind:{description:(0,b.localize)(5,null,'`"fix"`'),enum:["default","explain"],enumDescriptions:["A high confidence quick fix.","An explanation of the problem."]}}}}})}),define(Q[1362],Y([1,0,3051,33,26,121,8,13,4,37,20,44,228]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.commandsExtensionPoint=void 0;const r=[{key:"commandPalette",id:f.MenuId.CommandPalette,description:(0,t.localize)(0,null),supportsSubmenus:!1},{key:"touchBar",id:f.MenuId.TouchBarContext,description:(0,t.localize)(1,null),supportsSubmenus:!1},{key:"editor/title",id:f.MenuId.EditorTitle,description:(0,t.localize)(2,null)},{key:"editor/title/run",id:f.MenuId.EditorTitleRun,description:(0,t.localize)(3,null)},{key:"editor/context",id:f.MenuId.EditorContext,description:(0,t.localize)(4,null)},{key:"editor/context/copy",id:f.MenuId.EditorContextCopy,description:(0,t.localize)(5,null)},{key:"editor/context/share",id:f.MenuId.EditorContextShare,description:(0,t.localize)(6,null),proposed:"contribShareMenu"},{key:"explorer/context",id:f.MenuId.ExplorerContext,description:(0,t.localize)(7,null)},{key:"explorer/context/share",id:f.MenuId.ExplorerContextShare,description:(0,t.localize)(8,null),proposed:"contribShareMenu"},{key:"editor/title/context",id:f.MenuId.EditorTitleContext,description:(0,t.localize)(9,null)},{key:"editor/title/context/share",id:f.MenuId.EditorTitleContextShare,description:(0,t.localize)(10,null),proposed:"contribShareMenu"},{key:"debug/callstack/context",id:f.MenuId.DebugCallStackContext,description:(0,t.localize)(11,null)},{key:"debug/variables/context",id:f.MenuId.DebugVariablesContext,description:(0,t.localize)(12,null)},{key:"debug/toolBar",id:f.MenuId.DebugToolBar,description:(0,t.localize)(13,null)},{key:"menuBar/home",id:f.MenuId.MenubarHomeMenu,description:(0,t.localize)(14,null),proposed:"contribMenuBarHome",supportsSubmenus:!1},{key:"menuBar/edit/copy",id:f.MenuId.MenubarCopy,description:(0,t.localize)(15,null)},{key:"scm/title",id:f.MenuId.SCMTitle,description:(0,t.localize)(16,null)},{key:"scm/sourceControl",id:f.MenuId.SCMSourceControl,description:(0,t.localize)(17,null)},{key:"scm/resourceState/context",id:f.MenuId.SCMResourceContext,description:(0,t.localize)(18,null)},{key:"scm/resourceFolder/context",id:f.MenuId.SCMResourceFolderContext,description:(0,t.localize)(19,null)},{key:"scm/resourceGroup/context",id:f.MenuId.SCMResourceGroupContext,description:(0,t.localize)(20,null)},{key:"scm/change/title",id:f.MenuId.SCMChangeContext,description:(0,t.localize)(21,null)},{key:"statusBar/remoteIndicator",id:f.MenuId.StatusBarRemoteIndicatorMenu,description:(0,t.localize)(22,null),supportsSubmenus:!1},{key:"terminal/context",id:f.MenuId.TerminalInstanceContext,description:(0,t.localize)(23,null),proposed:"terminalContextMenu"},{key:"terminal/title/context",id:f.MenuId.TerminalTabContext,description:(0,t.localize)(24,null),proposed:"terminalContextMenu"},{key:"view/title",id:f.MenuId.ViewTitle,description:(0,t.localize)(25,null)},{key:"view/item/context",id:f.MenuId.ViewItemContext,description:(0,t.localize)(26,null)},{key:"comments/comment/editorActions",id:f.MenuId.CommentEditorActions,description:(0,t.localize)(27,null),proposed:"contribCommentEditorActionsMenu"},{key:"comments/commentThread/title",id:f.MenuId.CommentThreadTitle,description:(0,t.localize)(28,null)},{key:"comments/commentThread/context",id:f.MenuId.CommentThreadActions,description:(0,t.localize)(29,null),supportsSubmenus:!1},{key:"comments/commentThread/additionalActions",id:f.MenuId.CommentThreadAdditionalActions,description:(0,t.localize)(30,null),supportsSubmenus:!1,proposed:"contribCommentThreadAdditionalMenu"},{key:"comments/commentThread/title/context",id:f.MenuId.CommentThreadTitleContext,description:(0,t.localize)(31,null),proposed:"contribCommentPeekContext"},{key:"comments/comment/title",id:f.MenuId.CommentTitle,description:(0,t.localize)(32,null)},{key:"comments/comment/context",id:f.MenuId.CommentActions,description:(0,t.localize)(33,null),supportsSubmenus:!1},{key:"comments/commentThread/comment/context",id:f.MenuId.CommentThreadCommentContext,description:(0,t.localize)(34,null),proposed:"contribCommentPeekContext"},{key:"notebook/kernelSource",id:f.MenuId.NotebookKernelSource,description:(0,t.localize)(35,null),proposed:"notebookKernelSource"},{key:"notebook/cell/title",id:f.MenuId.NotebookCellTitle,description:(0,t.localize)(36,null)},{key:"notebook/cell/execute",id:f.MenuId.NotebookCellExecute,description:(0,t.localize)(37,null)},{key:"interactive/toolbar",id:f.MenuId.InteractiveToolbar,description:(0,t.localize)(38,null)},{key:"interactive/cell/title",id:f.MenuId.InteractiveCellTitle,description:(0,t.localize)(39,null)},{key:"testing/item/context",id:f.MenuId.TestItem,description:(0,t.localize)(40,null)},{key:"testing/item/gutter",id:f.MenuId.TestItemGutter,description:(0,t.localize)(41,null)},{key:"testing/message/context",id:f.MenuId.TestMessageContext,description:(0,t.localize)(42,null)},{key:"testing/message/content",id:f.MenuId.TestMessageContent,description:(0,t.localize)(43,null)},{key:"extension/context",id:f.MenuId.ExtensionContext,description:(0,t.localize)(44,null)},{key:"timeline/title",id:f.MenuId.TimelineTitle,description:(0,t.localize)(45,null)},{key:"timeline/item/context",id:f.MenuId.TimelineItemContext,description:(0,t.localize)(46,null)},{key:"ports/item/context",id:f.MenuId.TunnelContext,description:(0,t.localize)(47,null)},{key:"ports/item/origin/inline",id:f.MenuId.TunnelOriginInline,description:(0,t.localize)(48,null)},{key:"ports/item/port/inline",id:f.MenuId.TunnelPortInline,description:(0,t.localize)(49,null)},{key:"dashboard/toolbar",id:f.MenuId.DashboardToolbar,description:a.menusExtensionPointDashboardToolbar},{key:"notebook/cell/title",id:f.MenuId.NotebookCellTitle,description:a.menusExtensionPointNotebookCellTitle},{key:"notebooks/title",id:f.MenuId.NotebookTitle,description:a.menusExtensionPointNotebookTitle},{key:"notebook/toolbar",id:f.MenuId.NotebookToolbar,description:a.menusExtensionPointNotebookToolbar},{key:"dataExplorer/action",id:f.MenuId.DataExplorerAction,description:a.menusExtensionPointDataExplorerAction},{key:"dataExplorer/context",id:f.MenuId.DataExplorerContext,description:a.menusExtensionPointDataExplorerContext},{key:"objectExplorer/item/context",id:f.MenuId.ObjectExplorerItemContext,description:a.menusExtensionPointObjectExplorerContext},{key:"connectionDialog/browseTree",id:f.MenuId.ConnectionDialogBrowseTreeContext,description:a.menusExtensionPointConnectionDialogBrowseTreeContext},{key:"dataGrid/item/context",id:f.MenuId.DataGridItemContext,description:a.menusExtensionPointDataGridContext},{key:"file/newFile",id:f.MenuId.NewFile,description:(0,t.localize)(50,null),supportsSubmenus:!1},{key:"webview/context",id:f.MenuId.WebviewContext,description:(0,t.localize)(51,null)},{key:"file/share",id:f.MenuId.MenubarShare,description:(0,t.localize)(52,null),proposed:"contribShareMenu"},{key:"editor/inlineCompletions/actions",id:f.MenuId.InlineCompletionsActions,description:(0,t.localize)(53,null),supportsSubmenus:!1,proposed:"inlineCompletionsAdditions"},{key:"editor/content",id:f.MenuId.EditorContent,description:(0,t.localize)(54,null),proposed:"contribEditorContentMenu"},{key:"editor/lineNumber/context",id:f.MenuId.EditorLineNumberContext,description:(0,t.localize)(55,null)},{key:"mergeEditor/result/title",id:f.MenuId.MergeInputResultToolbar,description:(0,t.localize)(56,null),proposed:"contribMergeEditorMenus"}];var i;(function(n){function g(P){return typeof P.command=="string"}n.isMenuItem=g;function w(P,x){return typeof P.command!="string"?(x.error((0,t.localize)(57,null,"command")),!1):P.alt&&typeof P.alt!="string"?(x.error((0,t.localize)(58,null,"alt")),!1):P.when&&typeof P.when!="string"?(x.error((0,t.localize)(59,null,"when")),!1):P.group&&typeof P.group!="string"?(x.error((0,t.localize)(60,null,"group")),!1):!0}n.isValidMenuItem=w;function E(P,x){return typeof P.submenu!="string"?(x.error((0,t.localize)(61,null,"submenu")),!1):P.when&&typeof P.when!="string"?(x.error((0,t.localize)(62,null,"when")),!1):P.group&&typeof P.group!="string"?(x.error((0,t.localize)(63,null,"group")),!1):!0}n.isValidSubmenuItem=E;function C(P,x){if(!Array.isArray(P))return x.error((0,t.localize)(64,null)),!1;for(const F of P)if(g(F)){if(!w(F,x))return!1}else if(!E(F,x))return!1;return!0}n.isValidItems=C;function I(P,x){return typeof P!="object"?(x.error((0,t.localize)(65,null)),!1):typeof P.id!="string"?(x.error((0,t.localize)(66,null,"id")),!1):typeof P.label!="string"?(x.error((0,t.localize)(67,null,"label")),!1):!0}n.isValidSubmenu=I;const _={type:"object",required:["command"],properties:{command:{description:(0,t.localize)(68,null),type:"string"},alt:{description:(0,t.localize)(69,null),type:"string"},when:{description:(0,t.localize)(70,null),type:"string"},group:{description:(0,t.localize)(71,null),type:"string"}}},A={type:"object",required:["submenu"],properties:{submenu:{description:(0,t.localize)(72,null),type:"string"},when:{description:(0,t.localize)(73,null),type:"string"},group:{description:(0,t.localize)(74,null),type:"string"}}},k={type:"object",required:["id","label"],properties:{id:{description:(0,t.localize)(75,null),type:"string"},label:{description:(0,t.localize)(76,null),type:"string"},icon:{description:(0,t.localize)(77,null),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,t.localize)(78,null),type:"string"},dark:{description:(0,t.localize)(79,null),type:"string"}}}]}}};n.menusContribution={description:(0,t.localize)(80,null),type:"object",properties:(0,S.index)(r,P=>P.key,P=>({markdownDescription:P.proposed?(0,t.localize)(81,null,P.proposed,P.description):P.description,type:"array",items:P.supportsSubmenus===!1?_:{oneOf:[_,A]}})),additionalProperties:{description:"Submenu",type:"array",items:{oneOf:[_,A]}}},n.submenusContribution={description:(0,t.localize)(82,null),type:"array",items:k};function L(P,x){return P?(0,y.isFalsyOrWhitespace)(P.command)?(x.error((0,t.localize)(84,null,"command")),!1):!M(P.title,x,"title")||P.shortTitle&&!M(P.shortTitle,x,"shortTitle")?!1:P.enablement&&typeof P.enablement!="string"?(x.error((0,t.localize)(85,null,"precondition")),!1):!(P.category&&!M(P.category,x,"category")||!R(P.icon,x)):(x.error((0,t.localize)(83,null)),!1)}n.isValidCommand=L;function R(P,x){return typeof P>"u"||typeof P=="string"||typeof P.dark=="string"&&typeof P.light=="string"?!0:(x.error((0,t.localize)(86,null)),!1)}function M(P,x,F){return typeof P>"u"?(x.error((0,t.localize)(87,null,F)),!1):typeof P=="string"&&(0,y.isFalsyOrWhitespace)(P)?(x.error((0,t.localize)(88,null,F)),!1):typeof P!="string"&&((0,y.isFalsyOrWhitespace)(P.original)||(0,y.isFalsyOrWhitespace)(P.value))?(x.error((0,t.localize)(89,null,`${F}.value`,`${F}.original`)),!1):!0}const N={type:"object",required:["command","title"],properties:{command:{description:(0,t.localize)(90,null),type:"string"},title:{description:(0,t.localize)(91,null),type:"string"},shortTitle:{markdownDescription:(0,t.localize)(92,null),type:"string"},category:{description:(0,t.localize)(93,null),type:"string"},enablement:{description:(0,t.localize)(94,null),type:"string"},icon:{description:(0,t.localize)(95,null),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,t.localize)(96,null),type:"string"},dark:{description:(0,t.localize)(97,null),type:"string"}}}]}}};n.commandsContribution={description:(0,t.localize)(98,null),oneOf:[N,{type:"array",items:N}]}})(i||(i={}));const s=new v.DisposableStore;e.commandsExtensionPoint=D.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"commands",jsonSchema:i.commandsContribution,activationEventsGenerator:(n,g)=>{for(const w of n)w.command&&g.push(`onCommand:${w.command}`)}}),e.commandsExtensionPoint.setHandler(n=>{function g(w,E){if(!i.isValidCommand(w,E.collector))return;const{icon:C,enablement:I,category:_,title:A,shortTitle:k,command:L}=w;let R;C&&(typeof C=="string"?R=m.ThemeIcon.fromString(C)??{dark:b.joinPath(E.description.extensionLocation,C),light:b.joinPath(E.description.extensionLocation,C)}:R={dark:b.joinPath(E.description.extensionLocation,C.dark),light:b.joinPath(E.description.extensionLocation,C.light)});const M=f.MenuRegistry.getCommand(L);M&&(M.source?E.collector.info((0,t.localize)(99,null,w.command,M.source.title,M.source.id)):E.collector.info((0,t.localize)(100,null,w.command))),s.add(f.MenuRegistry.addCommand({id:L,title:A,source:{id:E.description.identifier.value,title:E.description.displayName??E.description.name},shortTitle:k,tooltip:A,category:_,precondition:T.ContextKeyExpr.deserialize(I),icon:R}))}s.clear();for(const w of n){const{value:E}=w;if(Array.isArray(E))for(const C of E)g(C,w);else g(E,w)}});const o=new Map,u=D.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"submenus",jsonSchema:i.submenusContribution});u.setHandler(n=>{o.clear();for(const g of n){const{value:w,collector:E}=g;for(const[,C]of Object.entries(w)){if(!i.isValidSubmenu(C,E))continue;if(!C.id){E.warn((0,t.localize)(101,null,C.id));continue}if(o.has(C.id)){E.info((0,t.localize)(102,null,C.id));continue}if(!C.label){E.warn((0,t.localize)(103,null,C.label));continue}let I;C.icon&&(typeof C.icon=="string"?I=m.ThemeIcon.fromString(C.icon)||{dark:b.joinPath(g.description.extensionLocation,C.icon)}:I={dark:b.joinPath(g.description.extensionLocation,C.icon.dark),light:b.joinPath(g.description.extensionLocation,C.icon.light)});const _={id:f.MenuId.for(`api:${C.id}`),label:C.label,icon:I};o.set(C.id,_)}}});const d=new Map(r.map(n=>[n.key,n])),p=new v.DisposableStore,c=new Map;D.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"menus",jsonSchema:i.menusContribution,deps:[u]}).setHandler(n=>{p.clear(),c.clear();for(const g of n){const{value:w,collector:E}=g;for(const C of Object.entries(w)){if(!i.isValidItems(C[1],E))continue;let I=d.get(C[0]);if(!I){const _=o.get(C[0]);_&&(I={key:C[0],id:_.id,description:""})}if(I){if(I.proposed&&!(0,h.isProposedApiEnabled)(g.description,I.proposed)){E.error((0,t.localize)(104,null,C[0],I.proposed,g.description.identifier.value));continue}for(const _ of C[1]){let A;if(i.isMenuItem(_)){const k=f.MenuRegistry.getCommand(_.command),L=_.alt&&f.MenuRegistry.getCommand(_.alt)||void 0;if(!k){E.error((0,t.localize)(105,null,_.command));continue}_.alt&&!L&&E.warn((0,t.localize)(106,null,_.alt)),_.command===_.alt&&E.info((0,t.localize)(107,null)),A={command:k,alt:L,group:void 0,order:void 0,when:void 0},A.isDefault=_.isDefault}else{if(I.supportsSubmenus===!1){E.error((0,t.localize)(108,null));continue}const k=o.get(_.submenu);if(!k){E.error((0,t.localize)(109,null,_.submenu));continue}let L=c.get(I.id.id);if(L||(L=new Set,c.set(I.id.id,L)),L.has(k.id.id)){E.warn((0,t.localize)(110,null,_.submenu,C[0]));continue}L.add(k.id.id),A={submenu:k.id,icon:k.icon,title:k.label,group:void 0,order:void 0,when:void 0}}if(_.group){const k=_.group.lastIndexOf("@");k>0?(A.group=_.group.substr(0,k),A.order=Number(_.group.substr(k+1))||void 0):A.group=_.group}A.when=T.ContextKeyExpr.deserialize(_.when),p.add(f.MenuRegistry.appendMenuItem(I.id,A))}}}}})}),define(Q[625],Y([1,0,20,6,4,33,17,3053,13,28,8,49,35,23,52,43,24,223,279,295,44,121]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AuthenticationService=e.readAllowedExtensions=e.getCurrentAuthenticationSessionInfo=e.addAccountUsage=e.removeAccountUsage=e.readAccountUsages=e.getAuthenticationProviderActivationEvent=void 0;function n(M){return`onAuthenticationRequest:${M}`}e.getAuthenticationProviderActivationEvent=n;function g(M,N,P){const x=`${N}-${P}-usages`,F=M.get(x,-1);let V=[];if(F)try{V=JSON.parse(F)}catch{}return V}e.readAccountUsages=g;function w(M,N,P){const x=`${N}-${P}-usages`;M.remove(x,-1)}e.removeAccountUsage=w;function E(M,N,P,x,F){const V=`${N}-${P}-usages`,W=g(M,N,P),z=W.findIndex(B=>B.extensionId===x);z>-1?W.splice(z,1,{extensionId:x,extensionName:F,lastUsed:Date.now()}):W.push({extensionId:x,extensionName:F,lastUsed:Date.now()}),M.store(V,JSON.stringify(W),-1,1)}e.addAccountUsage=E;async function C(M,N,P){const x=await N.get(`${P.urlProtocol}.loginAccount`)??await M.getPassword(`${P.urlProtocol}.login`,"account");if(x)try{const F=JSON.parse(x);if(F&&(0,T.isString)(F.id)&&(0,T.isString)(F.accessToken)&&(0,T.isString)(F.providerId))return F}catch(F){console.error(`Failed parsing current auth session value: ${F}`)}}e.getCurrentAuthenticationSessionInfo=C;function I(M,N,P){let x=[];try{const F=M.get(`${N}-${P}`,-1);F&&(x=JSON.parse(F))}catch{}return x}e.readAllowedExtensions=I;const _=" ";m.CommandsRegistry.registerCommand("workbench.getCodeExchangeProxyEndpoints",function(M,N){return M.get(p.IBrowserWorkbenchEnvironmentService).options?.codeExchangeProxyEndpoints});const A={type:"object",additionalProperties:!1,properties:{id:{type:"string",description:f.localize(0,null)},label:{type:"string",description:f.localize(1,null)}}},k=l.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"authentication",jsonSchema:{description:f.localize(2,null),type:"array",items:A},activationEventsGenerator:(M,N)=>{for(const P of M)P.id&&N.push(`onAuthenticationRequest:${P.id}`)}});let L=v.MenuRegistry.appendMenuItem(v.MenuId.AccountsContext,{command:{id:"noAuthenticationProviders",title:f.localize(3,null),precondition:S.ContextKeyExpr.false()}}),R=class extends b.Disposable{constructor(N,P,x,F,V,W){super(),this.activityService=N,this.extensionService=P,this.storageService=x,this.dialogService=F,this.quickInputService=V,this.productService=W,this._signInRequestItems=new Map,this._sessionAccessRequestItems=new Map,this._accountBadgeDisposable=this._register(new b.MutableDisposable),this._authenticationProviders=new Map,this.declaredProviders=[],this._onDidRegisterAuthenticationProvider=this._register(new y.Emitter),this.onDidRegisterAuthenticationProvider=this._onDidRegisterAuthenticationProvider.event,this._onDidUnregisterAuthenticationProvider=this._register(new y.Emitter),this.onDidUnregisterAuthenticationProvider=this._onDidUnregisterAuthenticationProvider.event,this._onDidChangeSessions=this._register(new y.Emitter),this.onDidChangeSessions=this._onDidChangeSessions.event,this._onDidChangeDeclaredProviders=this._register(new y.Emitter),this.onDidChangeDeclaredProviders=this._onDidChangeDeclaredProviders.event,k.setHandler((z,{added:B,removed:K})=>{B.forEach(U=>{for(const G of U.value){if((0,D.isFalsyOrWhitespace)(G.id)){U.collector.error(f.localize(4,null));continue}if((0,D.isFalsyOrWhitespace)(G.label)){U.collector.error(f.localize(5,null));continue}this.declaredProviders.some($=>$.id===G.id)?U.collector.error(f.localize(6,null,G.id)):this.declaredProviders.push(G)}}),(0,t.flatten)(K.map(U=>U.value)).forEach(U=>{const G=this.declaredProviders.findIndex($=>$.id===U.id);G>-1&&this.declaredProviders.splice(G,1)}),this._onDidChangeDeclaredProviders.fire(this.declaredProviders)})}getProviderIds(){const N=[];return this._authenticationProviders.forEach(P=>{N.push(P.id)}),N}isAuthenticationProviderRegistered(N){return this._authenticationProviders.has(N)}registerAuthenticationProvider(N,P){this._authenticationProviders.set(N,P),this._onDidRegisterAuthenticationProvider.fire({id:N,label:P.label}),L&&(L.dispose(),L=void 0)}unregisterAuthenticationProvider(N){const P=this._authenticationProviders.get(N);if(P){P.dispose(),this._authenticationProviders.delete(N),this._onDidUnregisterAuthenticationProvider.fire({id:N,label:P.label});const x=this._sessionAccessRequestItems.get(N)||{};Object.keys(x).forEach(F=>{this.removeAccessRequest(N,F)})}this._authenticationProviders.size||(L=v.MenuRegistry.appendMenuItem(v.MenuId.AccountsContext,{command:{id:"noAuthenticationProviders",title:f.localize(7,null),precondition:S.ContextKeyExpr.false()}}))}async sessionsUpdate(N,P){const x=this._authenticationProviders.get(N);x&&(this._onDidChangeSessions.fire({providerId:N,label:x.label,event:P}),P.added&&await this.updateNewSessionRequests(x,P.added),P.removed&&await this.updateAccessRequests(N,P.removed),this.updateBadgeCount())}async updateNewSessionRequests(N,P){const x=this._signInRequestItems.get(N.id);x&&Object.keys(x).forEach(F=>{P.some(V=>V.scopes.slice().join(_)===F)&&(x[F]?.disposables.forEach(W=>W.dispose()),delete x[F],Object.keys(x).length===0?this._signInRequestItems.delete(N.id):this._signInRequestItems.set(N.id,x))})}async updateAccessRequests(N,P){const x=this._sessionAccessRequestItems.get(N);x&&Object.keys(x).forEach(F=>{P.forEach(V=>{const W=x[F].possibleSessions.findIndex(z=>z.id===V.id);W&&x[F].possibleSessions.splice(W,1)}),x[F].possibleSessions.length||this.removeAccessRequest(N,F)})}updateBadgeCount(){this._accountBadgeDisposable.clear();let N=0;if(this._signInRequestItems.forEach(P=>{Object.keys(P).forEach(x=>{N+=P[x].requestingExtensionIds.length})}),this._sessionAccessRequestItems.forEach(P=>{N+=Object.keys(P).length}),N>0){const P=new u.NumberBadge(N,()=>f.localize(8,null));this._accountBadgeDisposable.value=this.activityService.showAccountsActivity({badge:P})}}removeAccessRequest(N,P){const x=this._sessionAccessRequestItems.get(N)||{};x[P]&&((0,b.dispose)(x[P].disposables),delete x[P],this.updateBadgeCount())}isAccessAllowed(N,P,x){const V=I(this.storageService,N,P).find(W=>W.id===x);if(V)return V.allowed!==void 0?V.allowed:!0;if(this.productService.trustedExtensionAuthAccess?.includes(x))return!0}updateAllowedExtension(N,P,x,F,V){const W=I(this.storageService,N,P),z=W.findIndex(B=>B.id===x);z===-1?W.push({id:x,name:F,allowed:V}):W[z].allowed=V,this.storageService.store(`${N}-${P}`,JSON.stringify(W),-1,0)}updateSessionPreference(N,P,x){const F=`${P}-${N}-${x.scopes.join(" ")}`;this.storageService.store(F,x.id,1,1),this.storageService.store(F,x.id,-1,1)}getSessionPreference(N,P,x){const F=`${P}-${N}-${x.join(" ")}`;return this.storageService.get(F,1)??this.storageService.get(F,-1)}removeSessionPreference(N,P,x){const F=`${P}-${N}-${x.join(" ")}`;this.storageService.remove(F,1),this.storageService.remove(F,-1)}async showGetSessionPrompt(N,P,x,F){const V=this.getLabel(N);let W;(function(B){B[B.Allow=0]="Allow",B[B.Deny=1]="Deny",B[B.Cancel=2]="Cancel"})(W||(W={}));const{result:z}=await this.dialogService.prompt({type:r.Severity.Info,message:f.localize(9,null,F,V,P),buttons:[{label:f.localize(10,null),run:()=>W.Allow},{label:f.localize(11,null),run:()=>W.Deny}],cancelButton:{run:()=>W.Cancel}});return z!==W.Cancel&&(this.updateAllowedExtension(N,P,x,F,z===W.Allow),this.removeAccessRequest(N,x)),z===W.Allow}async selectSession(N,P,x,F,V){return new Promise((W,z)=>{V.length||z("No available sessions");const B=this.quickInputService.createQuickPick();B.ignoreFocusOut=!0;const K=V.map(U=>({label:U.account.label,session:U}));K.push({label:f.localize(12,null)});const H=this.getLabel(N);B.items=K,B.title=f.localize(13,null,x,H),B.placeholder=f.localize(14,null,x),B.onDidAccept(async U=>{const G=B.selectedItems[0].session??await this.createSession(N,F),$=G.account.label;this.updateAllowedExtension(N,$,P,x,!0),this.updateSessionPreference(N,P,G),this.removeAccessRequest(N,P),B.dispose(),W(G)}),B.onDidHide(U=>{B.selectedItems[0]||z("User did not consent to account access"),B.dispose()}),B.show()})}async completeSessionAccessRequest(N,P,x,F){const W=(this._sessionAccessRequestItems.get(N)||{})[P];if(!W)return;const z=W.possibleSessions,B=this.supportsMultipleAccounts(N);let K;if(B)try{K=await this.selectSession(N,P,x,F,z)}catch{}else await this.showGetSessionPrompt(N,z[0].account.label,P,x)&&(K=z[0]);if(K){E(this.storageService,N,K.account.label,P,x);const H=this.getLabel(N);this._onDidChangeSessions.fire({providerId:N,label:H,event:{added:[],removed:[],changed:[K]}})}}requestSessionAccess(N,P,x,F,V){const W=this._sessionAccessRequestItems.get(N)||{};if(W[P])return;const B=v.MenuRegistry.appendMenuItem(v.MenuId.AccountsContext,{group:"3_accessRequests",command:{id:`${N}${P}Access`,title:f.localize(15,null,this.getLabel(N),x)}}),K=m.CommandsRegistry.registerCommand({id:`${N}${P}Access`,handler:async H=>{H.get(d.IAuthenticationService).completeSessionAccessRequest(N,P,x,F)}});W[P]={possibleSessions:V,disposables:[B,K]},this._sessionAccessRequestItems.set(N,W),this.updateBadgeCount()}async requestNewSession(N,P,x,F){let V=this._authenticationProviders.get(N);if(V||await new Promise((G,$)=>{const ie=this.onDidRegisterAuthenticationProvider(J=>{J.id===N&&(V=this._authenticationProviders.get(N),ie.dispose(),G())})}),!V)return;const W=this._signInRequestItems.get(N),z=P.join(_);if(W&&W[z]&&W[z].requestingExtensionIds.includes(x))return;const K=`${N}:${x}:signIn${Object.keys(W||[]).length}`,H=v.MenuRegistry.appendMenuItem(v.MenuId.AccountsContext,{group:"2_signInRequests",command:{id:K,title:f.localize(16,null,V.label,F)}}),U=m.CommandsRegistry.registerCommand({id:K,handler:async G=>{const ie=await G.get(d.IAuthenticationService).createSession(N,P);this.updateAllowedExtension(N,ie.account.label,x,F,!0),this.updateSessionPreference(N,x,ie)}});if(W){const G=W[z]||{disposables:[],requestingExtensionIds:[]};W[z]={disposables:[...G.disposables,H,U],requestingExtensionIds:[...G.requestingExtensionIds,x]},this._signInRequestItems.set(N,W)}else this._signInRequestItems.set(N,{[z]:{disposables:[H,U],requestingExtensionIds:[x]}});this.updateBadgeCount()}getLabel(N){const P=this._authenticationProviders.get(N);if(P)return P.label;throw new Error(`No authentication provider '${N}' is currently registered.`)}supportsMultipleAccounts(N){const P=this._authenticationProviders.get(N);if(P)return P.supportsMultipleAccounts;throw new Error(`No authentication provider '${N}' is currently registered.`)}async tryActivateProvider(N,P){await this.extensionService.activateByEvent(n(N),P?1:0);let x=this._authenticationProviders.get(N);if(x)return x;const F=new Promise((W,z)=>{this.onDidRegisterAuthenticationProvider(B=>{if(B.id===N)if(x=this._authenticationProviders.get(N),x)W(x);else throw new Error(`No authentication provider '${N}' is currently registered.`)})}),V=new Promise((W,z)=>{setTimeout(()=>{z("Timed out waiting for authentication provider to register")},5e3)});return Promise.race([F,V])}async getSessions(N,P,x=!1){const F=this._authenticationProviders.get(N)||await this.tryActivateProvider(N,x);if(F)return await F.getSessions(P);throw new Error(`No authentication provider '${N}' is currently registered.`)}async createSession(N,P,x){const F=this._authenticationProviders.get(N)||await this.tryActivateProvider(N,!!x?.activateImmediate);if(F)return await F.createSession(P,{sessionToRecreate:x?.sessionToRecreate});throw new Error(`No authentication provider '${N}' is currently registered.`)}async removeSession(N,P){const x=this._authenticationProviders.get(N);if(x)return x.removeSession(P);throw new Error(`No authentication provider '${N}' is currently registered.`)}async manageTrustedExtensionsForAccount(N,P){const x=this._authenticationProviders.get(N);if(x)return x.manageTrustedExtensions(P);throw new Error(`No authentication provider '${N}' is currently registered.`)}async removeAccountSessions(N,P,x){const F=this._authenticationProviders.get(N);if(F)return F.removeAccountSessions(P,x);throw new Error(`No authentication provider '${N}' is currently registered.`)}};e.AuthenticationService=R,e.AuthenticationService=R=fe([O(0,u.IActivityService),O(1,c.IExtensionService),O(2,o.IStorageService),O(3,h.IDialogService),O(4,s.IQuickInputService),O(5,i.IProductService)],R),(0,a.registerSingleton)(d.IAuthenticationService,R,1)}),define(Q[3780],Y([1,0,4,2683,13,8,91,25,52,43,24,120,279,44,524,49,59,503,625,18,903,6,15,602]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";var w;Object.defineProperty(e,"__esModule",{value:!0}),e.EditSessionsWorkbenchService=void 0;let E=class extends t.Disposable{static{w=this}static{this.CACHED_SESSION_STORAGE_KEY="editSessionAccountPreference"}get isSignedIn(){return this.existingSessionId!==void 0}get onDidSignIn(){return this._didSignIn.event}get onDidSignOut(){return this._didSignOut.event}get lastWrittenResources(){return this._lastWrittenResources}get lastReadResources(){return this._lastReadResources}constructor(I,_,A,k,L,R,M,N,P,x,F,V){super(),this.fileService=I,this.storageService=_,this.quickInputService=A,this.authenticationService=k,this.extensionService=L,this.environmentService=R,this.logService=M,this.productService=N,this.contextKeyService=P,this.dialogService=x,this.secretStorageService=F,this.credentialsService=V,this.SIZE_LIMIT=Math.floor(1024*1024*1.9),this.serverConfiguration=this.productService["editSessions.store"],this.initialized=!1,this._didSignIn=new l.Emitter,this._didSignOut=new l.Emitter,this._lastWrittenResources=new Map,this._lastReadResources=new Map,this._register(this.authenticationService.onDidChangeSessions(W=>this.onDidChangeSessions(W.event))),this._register(this.storageService.onDidChangeValue(-1,w.CACHED_SESSION_STORAGE_KEY,this._register(new t.DisposableStore))(()=>this.onDidChangeStorage())),this.registerSignInAction(),this.registerResetAuthenticationAction(),this.signedInContext=i.EDIT_SESSIONS_SIGNED_IN.bindTo(this.contextKeyService),this.signedInContext.set(this.existingSessionId!==void 0)}async write(I,_){if(await this.initialize("write",!1),!this.initialized)throw new Error("Please sign in to store your edit session.");typeof _!="string"&&_.machine===void 0&&(_.machine=await this.getOrCreateCurrentMachineId()),_=typeof _=="string"?_:JSON.stringify(_);const A=await this.storeClient.writeResource(I,_,null,void 0,(0,h.createSyncHeaders)((0,o.generateUuid)()));return this._lastWrittenResources.set(I,{ref:A,content:_}),A}async read(I,_){if(await this.initialize("read",!1),!this.initialized)throw new Error("Please sign in to apply your latest edit session.");let A;const k=(0,h.createSyncHeaders)((0,o.generateUuid)());try{if(_!==void 0)A=await this.storeClient?.resolveResourceContent(I,_,void 0,k);else{const L=await this.storeClient?.readResource(I,null,void 0,k);A=L?.content,_=L?.ref}}catch(L){this.logService.error(L)}if(A!=null&&_!==void 0)return this._lastReadResources.set(I,{ref:_,content:A}),{ref:_,content:A}}async delete(I,_){if(await this.initialize("write",!1),!this.initialized)throw new Error(`Unable to delete edit session with ref ${_}.`);try{await this.storeClient?.deleteResource(I,_)}catch(A){this.logService.error(A)}}async list(I){if(await this.initialize("read",!1),!this.initialized)throw new Error("Unable to list edit sessions.");try{return this.storeClient?.getAllResourceRefs(I)??[]}catch(_){this.logService.error(_)}return[]}async initialize(I,_=!1){return this.initialized?!0:(this.initialized=await this.doInitialize(I,_),this.signedInContext.set(this.initialized),this.initialized&&this._didSignIn.fire(),this.initialized)}async doInitialize(I,_){if(await this.extensionService.whenInstalledExtensionsRegistered(),!this.serverConfiguration?.url)throw new Error("Unable to initialize sessions sync as session sync preference is not configured in product.json.");if(this.storeClient===void 0)return!1;if(this._register(this.storeClient.onTokenFailed(()=>{this.logService.info("Clearing edit sessions authentication preference because of successive token failures."),this.clearAuthenticationPreference()})),this.machineClient===void 0&&(this.machineClient=new c.UserDataSyncMachinesService(this.environmentService,this.fileService,this.storageService,this.storeClient,this.logService,this.productService)),this.authenticationInfo!==void 0)return!0;const A=await this.getAuthenticationSession(I,_);return A!==void 0&&(this.authenticationInfo=A,this.storeClient.setAuthToken(A.token,A.providerId)),A!==void 0}async getMachineById(I){if(await this.initialize("read",!1),!this.cachedMachines){const _=await this.machineClient.getMachines();this.cachedMachines=_.reduce((A,k)=>A.set(k.id,k.name),new Map)}return this.cachedMachines.get(I)}async getOrCreateCurrentMachineId(){const I=await this.machineClient.getMachines().then(_=>_.find(A=>A.isCurrent)?.id);return I===void 0?(await this.machineClient.addCurrentMachine(),await this.machineClient.getMachines().then(_=>_.find(A=>A.isCurrent).id)):I}async getAuthenticationSession(I,_){if(this.existingSessionId){this.logService.info(`Searching for existing authentication session with ID ${this.existingSessionId}`);const k=await this.getExistingSession();if(k)return this.logService.info(`Found existing authentication session with ID ${k.session.id}`),{sessionId:k.session.id,token:k.session.idToken??k.session.accessToken,providerId:k.session.providerId};this._didSignOut.fire()}if(this.shouldAttemptEditSessionInit()){this.logService.info("Reusing user data sync enablement");const k=await(0,d.getCurrentAuthenticationSessionInfo)(this.credentialsService,this.secretStorageService,this.productService);if(k!==void 0)return this.logService.info(`Using current authentication session with ID ${k.id}`),this.existingSessionId=k.id,{sessionId:k.id,token:k.accessToken,providerId:k.providerId}}if(_)return;const A=await this.getAccountPreference(I);if(A!==void 0)return this.existingSessionId=A.id,{sessionId:A.id,token:A.idToken??A.accessToken,providerId:A.providerId}}shouldAttemptEditSessionInit(){return p.isWeb&&this.storageService.isNew(-1)&&this.storageService.isNew(1)}async getAccountPreference(I){const _=this.quickInputService.createQuickPick();return _.ok=!1,_.placeholder=I==="read"?(0,y.localize)(0,null):(0,y.localize)(1,null),_.ignoreFocusOut=!0,_.items=await this.createQuickpickItems(),new Promise((A,k)=>{_.onDidHide(L=>{k(new n.CancellationError),_.dispose()}),_.onDidAccept(async L=>{const R=_.selectedItems[0],M="provider"in R?{...await this.authenticationService.createSession(R.provider.id,R.provider.scopes),providerId:R.provider.id}:"session"in R?R.session:void 0;A(M),_.hide()}),_.show()})}async createQuickpickItems(){const I=[];I.push({type:"separator",label:(0,y.localize)(2,null)});const _=await this.getAllSessions();I.push(..._),I.push({type:"separator",label:(0,y.localize)(3,null)});for(const A of await this.getAuthenticationProviders())if(!_.some(L=>L.session.providerId===A.id)||this.authenticationService.supportsMultipleAccounts(A.id)){const L=this.authenticationService.getLabel(A.id);I.push({label:(0,y.localize)(4,null,L),provider:A})}return I}async getAllSessions(){const I=await this.getAuthenticationProviders(),_=new Map;let A;for(const k of I){const L=await this.authenticationService.getSessions(k.id,k.scopes);for(const R of L){const M={label:R.account.label,description:this.authenticationService.getLabel(k.id),session:{...R,providerId:k.id}};_.set(M.session.account.id,M),this.existingSessionId===R.id&&(A=M)}}return A!==void 0&&_.set(A.session.account.id,A),[..._.values()].sort((k,L)=>k.label.localeCompare(L.label))}async getAuthenticationProviders(){if(!this.serverConfiguration)throw new Error("Unable to get configured authentication providers as session sync preference is not configured in product.json.");const I=this.serverConfiguration.authenticationProviders,_=Object.keys(I).reduce((k,L)=>(k.push({id:L,scopes:I[L].scopes}),k),[]),A=this.authenticationService.declaredProviders;return _.filter(({id:k})=>A.some(L=>L.id===k))}get existingSessionId(){return this.storageService.get(w.CACHED_SESSION_STORAGE_KEY,-1)}set existingSessionId(I){this.logService.trace(`Saving authentication session preference for ID ${I}.`),I===void 0?this.storageService.remove(w.CACHED_SESSION_STORAGE_KEY,-1):this.storageService.store(w.CACHED_SESSION_STORAGE_KEY,I,-1,1)}async getExistingSession(){return(await this.getAllSessions()).find(_=>_.session.id===this.existingSessionId)}async onDidChangeStorage(){const I=this.existingSessionId,_=this.authenticationInfo?.sessionId;_!==I&&(this.logService.trace(`Resetting authentication state because authentication session ID preference changed from ${_} to ${I}.`),this.authenticationInfo=void 0,this.initialized=!1)}clearAuthenticationPreference(){this.authenticationInfo=void 0,this.initialized=!1,this.existingSessionId=void 0,this.signedInContext.set(!1)}onDidChangeSessions(I){this.authenticationInfo?.sessionId&&I.removed.find(_=>_.id===this.authenticationInfo?.sessionId)&&this.clearAuthenticationPreference()}registerSignInAction(){const I=this,_="workbench.editSessions.actions.signIn",A=D.ContextKeyExpr.and(D.ContextKeyExpr.equals(i.EDIT_SESSIONS_PENDING_KEY,!1),D.ContextKeyExpr.equals(i.EDIT_SESSIONS_SIGNED_IN_KEY,!1));this._register((0,b.registerAction2)(class extends b.Action2{constructor(){super({id:_,title:(0,y.localize)(5,null),category:i.EDIT_SESSION_SYNC_CATEGORY,precondition:A,menu:[{id:b.MenuId.CommandPalette},{id:b.MenuId.AccountsContext,group:"2_editSessions",when:A}]})}async run(){return await I.initialize("write",!1)}})),this._register(b.MenuRegistry.appendMenuItem(b.MenuId.AccountsContext,{group:"2_editSessions",command:{id:_,title:(0,y.localize)(6,null)},when:D.ContextKeyExpr.and(D.ContextKeyExpr.equals(i.EDIT_SESSIONS_PENDING_KEY,!0),D.ContextKeyExpr.equals(i.EDIT_SESSIONS_SIGNED_IN_KEY,!1))}))}registerResetAuthenticationAction(){const I=this;this._register((0,b.registerAction2)(class extends b.Action2{constructor(){super({id:"workbench.editSessions.actions.resetAuth",title:(0,y.localize)(7,null),category:i.EDIT_SESSION_SYNC_CATEGORY,precondition:D.ContextKeyExpr.equals(i.EDIT_SESSIONS_SIGNED_IN_KEY,!0),menu:[{id:b.MenuId.CommandPalette},{id:b.MenuId.AccountsContext,group:"2_editSessions",when:D.ContextKeyExpr.equals(i.EDIT_SESSIONS_SIGNED_IN_KEY,!0)}]})}async run(){const A=await I.dialogService.confirm({message:(0,y.localize)(8,null),checkbox:{label:(0,y.localize)(9,null)}});A.confirmed&&(A.checkboxChecked&&I.storeClient?.deleteResource("editSessions",null),I.clearAuthenticationPreference())}}))}};e.EditSessionsWorkbenchService=E,e.EditSessionsWorkbenchService=E=w=fe([O(0,f.IFileService),O(1,S.IStorageService),O(2,m.IQuickInputService),O(3,a.IAuthenticationService),O(4,r.IExtensionService),O(5,T.IEnvironmentService),O(6,i.IEditSessionsLogService),O(7,v.IProductService),O(8,D.IContextKeyService),O(9,s.IDialogService),O(10,g.ISecretStorageService),O(11,u.ICredentialsService)],E)}),define(Q[3781],Y([1,0,112,3076,406]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dedupExtensions=void 0;function D(T,f,v,m){const S=new t.ExtensionIdentifierMap;return T.forEach(h=>{const a=S.get(h.identifier);a&&m.warn((0,y.localize)(0,null,a.extensionLocation.fsPath,h.extensionLocation.fsPath)),S.set(h.identifier,h)}),f.forEach(h=>{const a=S.get(h.identifier);if(a)if(a.isBuiltin){if(b.gte(a.version,h.version)){m.warn(`Skipping extension ${h.extensionLocation.path} in favour of the builtin extension ${a.extensionLocation.path}.`);return}h.isBuiltin=!0}else m.warn((0,y.localize)(1,null,a.extensionLocation.fsPath,h.extensionLocation.fsPath));else if(h.isBuiltin){m.warn(`Skipping obsolete builtin extension ${h.extensionLocation.path}`);return}S.set(h.identifier,h)}),v.forEach(h=>{m.info((0,y.localize)(2,null,h.extensionLocation.fsPath));const a=S.get(h.identifier);a&&a.isBuiltin&&(h.isBuiltin=!0),S.set(h.identifier,h)}),Array.from(S.values())}e.dedupExtensions=D}),define(Q[3782],Y([1,0,15]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CanceledLazyPromise=e.LazyPromise=void 0;class y{constructor(){this._actual=null,this._actualOk=null,this._actualErr=null,this._hasValue=!1,this._value=null,this._hasErr=!1,this._err=null}get[Symbol.toStringTag](){return this.toString()}_ensureActual(){return this._actual||(this._actual=new Promise((T,f)=>{this._actualOk=T,this._actualErr=f,this._hasValue&&this._actualOk(this._value),this._hasErr&&this._actualErr(this._err)})),this._actual}resolveOk(T){this._hasValue||this._hasErr||(this._hasValue=!0,this._value=T,this._actual&&this._actualOk(T))}resolveErr(T){this._hasValue||this._hasErr||(this._hasErr=!0,this._err=T,this._actual?this._actualErr(T):(0,t.onUnexpectedError)(T))}then(T,f){return this._ensureActual().then(T,f)}catch(T){return this._ensureActual().then(void 0,T)}finally(T){return this._ensureActual().finally(T)}}e.LazyPromise=y;class b extends y{constructor(){super(),this._hasErr=!0,this._err=new t.CancellationError}}e.CanceledLazyPromise=b}),define(Q[474],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SerializableObjectWithBuffers=e.getStringIdentifierForProxy=e.createProxyIdentifier=e.ProxyIdentifier=void 0;class t{static{this.count=0}constructor(v){this._proxyIdentifierBrand=void 0,this.sid=v,this.nid=++t.count}}e.ProxyIdentifier=t;const y=[];function b(f){const v=new t(f);return y[v.nid]=v,v}e.createProxyIdentifier=b;function D(f){return y[f].sid}e.getStringIdentifierForProxy=D;class T{constructor(v){this.value=v}}e.SerializableObjectWithBuffers=T}),define(Q[53],Y([1,0,474]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SqlExtHostContext=e.SqlMainContext=e.ExtHostContext=e.MainContext=e.ExtHostTestingResource=e.ISuggestResultDtoField=e.ISuggestDataDtoField=e.IdObject=e.CandidatePortSource=e.NotebookEditorRevealType=e.CellOutputKind=e.WebviewMessageArrayBufferViewType=e.WebviewEditorCapabilities=e.TabModelOperationKind=e.TabInputKind=e.TextEditorRevealType=void 0;var y;(function(s){s[s.Default=0]="Default",s[s.InCenter=1]="InCenter",s[s.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",s[s.AtTop=3]="AtTop"})(y||(e.TextEditorRevealType=y={}));var b;(function(s){s[s.UnknownInput=0]="UnknownInput",s[s.TextInput=1]="TextInput",s[s.TextDiffInput=2]="TextDiffInput",s[s.TextMergeInput=3]="TextMergeInput",s[s.NotebookInput=4]="NotebookInput",s[s.NotebookDiffInput=5]="NotebookDiffInput",s[s.CustomEditorInput=6]="CustomEditorInput",s[s.WebviewEditorInput=7]="WebviewEditorInput",s[s.TerminalEditorInput=8]="TerminalEditorInput",s[s.InteractiveEditorInput=9]="InteractiveEditorInput"})(b||(e.TabInputKind=b={}));var D;(function(s){s[s.TAB_OPEN=0]="TAB_OPEN",s[s.TAB_CLOSE=1]="TAB_CLOSE",s[s.TAB_UPDATE=2]="TAB_UPDATE",s[s.TAB_MOVE=3]="TAB_MOVE"})(D||(e.TabModelOperationKind=D={}));var T;(function(s){s[s.Editable=0]="Editable",s[s.SupportsHotExit=1]="SupportsHotExit"})(T||(e.WebviewEditorCapabilities=T={}));var f;(function(s){s[s.Int8Array=1]="Int8Array",s[s.Uint8Array=2]="Uint8Array",s[s.Uint8ClampedArray=3]="Uint8ClampedArray",s[s.Int16Array=4]="Int16Array",s[s.Uint16Array=5]="Uint16Array",s[s.Int32Array=6]="Int32Array",s[s.Uint32Array=7]="Uint32Array",s[s.Float32Array=8]="Float32Array",s[s.Float64Array=9]="Float64Array",s[s.BigInt64Array=10]="BigInt64Array",s[s.BigUint64Array=11]="BigUint64Array"})(f||(e.WebviewMessageArrayBufferViewType=f={}));var v;(function(s){s[s.Text=1]="Text",s[s.Error=2]="Error",s[s.Rich=3]="Rich"})(v||(e.CellOutputKind=v={}));var m;(function(s){s[s.Default=0]="Default",s[s.InCenter=1]="InCenter",s[s.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",s[s.AtTop=3]="AtTop"})(m||(e.NotebookEditorRevealType=m={}));var S;(function(s){s[s.None=0]="None",s[s.Process=1]="Process",s[s.Output=2]="Output"})(S||(e.CandidatePortSource=S={}));class h{static{this._n=0}static mixin(o){return o._id=h._n++,o}}e.IdObject=h;var a;(function(s){s.label="a",s.kind="b",s.detail="c",s.documentation="d",s.sortText="e",s.filterText="f",s.preselect="g",s.insertText="h",s.insertTextRules="i",s.range="j",s.commitCharacters="k",s.additionalTextEdits="l",s.kindModifier="m",s.commandIdent="n",s.commandId="o",s.commandArguments="p"})(a||(e.ISuggestDataDtoField=a={}));var r;(function(s){s.defaultRanges="a",s.completions="b",s.isIncomplete="c",s.duration="d"})(r||(e.ISuggestResultDtoField=r={}));var i;(function(s){s[s.Workspace=0]="Workspace",s[s.TextDocument=1]="TextDocument"})(i||(e.ExtHostTestingResource=i={})),e.MainContext={MainThreadAuthentication:(0,t.createProxyIdentifier)("MainThreadAuthentication"),MainThreadBulkEdits:(0,t.createProxyIdentifier)("MainThreadBulkEdits"),MainThreadChatProvider:(0,t.createProxyIdentifier)("MainThreadChatProvider"),MainThreadChatSlashCommands:(0,t.createProxyIdentifier)("MainThreadChatSlashCommands"),MainThreadChatVariables:(0,t.createProxyIdentifier)("MainThreadChatVariables"),MainThreadClipboard:(0,t.createProxyIdentifier)("MainThreadClipboard"),MainThreadCommands:(0,t.createProxyIdentifier)("MainThreadCommands"),MainThreadComments:(0,t.createProxyIdentifier)("MainThreadComments"),MainThreadConfiguration:(0,t.createProxyIdentifier)("MainThreadConfiguration"),MainThreadConsole:(0,t.createProxyIdentifier)("MainThreadConsole"),MainThreadDebugService:(0,t.createProxyIdentifier)("MainThreadDebugService"),MainThreadDecorations:(0,t.createProxyIdentifier)("MainThreadDecorations"),MainThreadDiagnostics:(0,t.createProxyIdentifier)("MainThreadDiagnostics"),MainThreadDialogs:(0,t.createProxyIdentifier)("MainThreadDiaglogs"),MainThreadDocuments:(0,t.createProxyIdentifier)("MainThreadDocuments"),MainThreadDocumentContentProviders:(0,t.createProxyIdentifier)("MainThreadDocumentContentProviders"),MainThreadTextEditors:(0,t.createProxyIdentifier)("MainThreadTextEditors"),MainThreadEditorInsets:(0,t.createProxyIdentifier)("MainThreadEditorInsets"),MainThreadEditorTabs:(0,t.createProxyIdentifier)("MainThreadEditorTabs"),MainThreadErrors:(0,t.createProxyIdentifier)("MainThreadErrors"),MainThreadTreeViews:(0,t.createProxyIdentifier)("MainThreadTreeViews"),MainThreadDownloadService:(0,t.createProxyIdentifier)("MainThreadDownloadService"),MainThreadKeytar:(0,t.createProxyIdentifier)("MainThreadKeytar"),MainThreadLanguageFeatures:(0,t.createProxyIdentifier)("MainThreadLanguageFeatures"),MainThreadLanguages:(0,t.createProxyIdentifier)("MainThreadLanguages"),MainThreadLogger:(0,t.createProxyIdentifier)("MainThreadLogger"),MainThreadMessageService:(0,t.createProxyIdentifier)("MainThreadMessageService"),MainThreadOutputService:(0,t.createProxyIdentifier)("MainThreadOutputService"),MainThreadProgress:(0,t.createProxyIdentifier)("MainThreadProgress"),MainThreadQuickDiff:(0,t.createProxyIdentifier)("MainThreadQuickDiff"),MainThreadQuickOpen:(0,t.createProxyIdentifier)("MainThreadQuickOpen"),MainThreadStatusBar:(0,t.createProxyIdentifier)("MainThreadStatusBar"),MainThreadSecretState:(0,t.createProxyIdentifier)("MainThreadSecretState"),MainThreadStorage:(0,t.createProxyIdentifier)("MainThreadStorage"),MainThreadTelemetry:(0,t.createProxyIdentifier)("MainThreadTelemetry"),MainThreadTerminalService:(0,t.createProxyIdentifier)("MainThreadTerminalService"),MainThreadWebviews:(0,t.createProxyIdentifier)("MainThreadWebviews"),MainThreadWebviewPanels:(0,t.createProxyIdentifier)("MainThreadWebviewPanels"),MainThreadWebviewViews:(0,t.createProxyIdentifier)("MainThreadWebviewViews"),MainThreadCustomEditors:(0,t.createProxyIdentifier)("MainThreadCustomEditors"),MainThreadUrls:(0,t.createProxyIdentifier)("MainThreadUrls"),MainThreadUriOpeners:(0,t.createProxyIdentifier)("MainThreadUriOpeners"),MainThreadProfileContentHandlers:(0,t.createProxyIdentifier)("MainThreadProfileContentHandlers"),MainThreadWorkspace:(0,t.createProxyIdentifier)("MainThreadWorkspace"),MainThreadFileSystem:(0,t.createProxyIdentifier)("MainThreadFileSystem"),MainThreadExtensionService:(0,t.createProxyIdentifier)("MainThreadExtensionService"),MainThreadSCM:(0,t.createProxyIdentifier)("MainThreadSCM"),MainThreadSearch:(0,t.createProxyIdentifier)("MainThreadSearch"),MainThreadShare:(0,t.createProxyIdentifier)("MainThreadShare"),MainThreadTask:(0,t.createProxyIdentifier)("MainThreadTask"),MainThreadWindow:(0,t.createProxyIdentifier)("MainThreadWindow"),MainThreadLabelService:(0,t.createProxyIdentifier)("MainThreadLabelService"),MainThreadNotebook:(0,t.createProxyIdentifier)("MainThreadNotebook"),MainThreadNotebookDocuments:(0,t.createProxyIdentifier)("MainThreadNotebookDocumentsShape"),MainThreadNotebookEditors:(0,t.createProxyIdentifier)("MainThreadNotebookEditorsShape"),MainThreadNotebookKernels:(0,t.createProxyIdentifier)("MainThreadNotebookKernels"),MainThreadNotebookRenderers:(0,t.createProxyIdentifier)("MainThreadNotebookRenderers"),MainThreadInteractive:(0,t.createProxyIdentifier)("MainThreadInteractive"),MainThreadChat:(0,t.createProxyIdentifier)("MainThreadChat"),MainThreadInlineChat:(0,t.createProxyIdentifier)("MainThreadInlineChatShape"),MainThreadTheming:(0,t.createProxyIdentifier)("MainThreadTheming"),MainThreadTunnelService:(0,t.createProxyIdentifier)("MainThreadTunnelService"),MainThreadManagedSockets:(0,t.createProxyIdentifier)("MainThreadManagedSockets"),MainThreadTimeline:(0,t.createProxyIdentifier)("MainThreadTimeline"),MainThreadTesting:(0,t.createProxyIdentifier)("MainThreadTesting"),MainThreadLocalization:(0,t.createProxyIdentifier)("MainThreadLocalizationShape"),MainThreadAiRelatedInformation:(0,t.createProxyIdentifier)("MainThreadAiRelatedInformation"),MainThreadAiEmbeddingVector:(0,t.createProxyIdentifier)("MainThreadAiEmbeddingVector"),MainThreadIssueReporter:(0,t.createProxyIdentifier)("MainThreadIssueReporter")},e.ExtHostContext={ExtHostCommands:(0,t.createProxyIdentifier)("ExtHostCommands"),ExtHostConfiguration:(0,t.createProxyIdentifier)("ExtHostConfiguration"),ExtHostDiagnostics:(0,t.createProxyIdentifier)("ExtHostDiagnostics"),ExtHostDebugService:(0,t.createProxyIdentifier)("ExtHostDebugService"),ExtHostDecorations:(0,t.createProxyIdentifier)("ExtHostDecorations"),ExtHostDocumentsAndEditors:(0,t.createProxyIdentifier)("ExtHostDocumentsAndEditors"),ExtHostDocuments:(0,t.createProxyIdentifier)("ExtHostDocuments"),ExtHostDocumentContentProviders:(0,t.createProxyIdentifier)("ExtHostDocumentContentProviders"),ExtHostDocumentSaveParticipant:(0,t.createProxyIdentifier)("ExtHostDocumentSaveParticipant"),ExtHostEditors:(0,t.createProxyIdentifier)("ExtHostEditors"),ExtHostTreeViews:(0,t.createProxyIdentifier)("ExtHostTreeViews"),ExtHostFileSystem:(0,t.createProxyIdentifier)("ExtHostFileSystem"),ExtHostFileSystemInfo:(0,t.createProxyIdentifier)("ExtHostFileSystemInfo"),ExtHostFileSystemEventService:(0,t.createProxyIdentifier)("ExtHostFileSystemEventService"),ExtHostLanguages:(0,t.createProxyIdentifier)("ExtHostLanguages"),ExtHostLanguageFeatures:(0,t.createProxyIdentifier)("ExtHostLanguageFeatures"),ExtHostQuickOpen:(0,t.createProxyIdentifier)("ExtHostQuickOpen"),ExtHostQuickDiff:(0,t.createProxyIdentifier)("ExtHostQuickDiff"),ExtHostStatusBar:(0,t.createProxyIdentifier)("ExtHostStatusBar"),ExtHostShare:(0,t.createProxyIdentifier)("ExtHostShare"),ExtHostExtensionService:(0,t.createProxyIdentifier)("ExtHostExtensionService"),ExtHostLogLevelServiceShape:(0,t.createProxyIdentifier)("ExtHostLogLevelServiceShape"),ExtHostTerminalService:(0,t.createProxyIdentifier)("ExtHostTerminalService"),ExtHostSCM:(0,t.createProxyIdentifier)("ExtHostSCM"),ExtHostSearch:(0,t.createProxyIdentifier)("ExtHostSearch"),ExtHostTask:(0,t.createProxyIdentifier)("ExtHostTask"),ExtHostWorkspace:(0,t.createProxyIdentifier)("ExtHostWorkspace"),ExtHostWindow:(0,t.createProxyIdentifier)("ExtHostWindow"),ExtHostWebviews:(0,t.createProxyIdentifier)("ExtHostWebviews"),ExtHostWebviewPanels:(0,t.createProxyIdentifier)("ExtHostWebviewPanels"),ExtHostCustomEditors:(0,t.createProxyIdentifier)("ExtHostCustomEditors"),ExtHostWebviewViews:(0,t.createProxyIdentifier)("ExtHostWebviewViews"),ExtHostEditorInsets:(0,t.createProxyIdentifier)("ExtHostEditorInsets"),ExtHostEditorTabs:(0,t.createProxyIdentifier)("ExtHostEditorTabs"),ExtHostProgress:(0,t.createProxyIdentifier)("ExtHostProgress"),ExtHostComments:(0,t.createProxyIdentifier)("ExtHostComments"),ExtHostSecretState:(0,t.createProxyIdentifier)("ExtHostSecretState"),ExtHostStorage:(0,t.createProxyIdentifier)("ExtHostStorage"),ExtHostUrls:(0,t.createProxyIdentifier)("ExtHostUrls"),ExtHostUriOpeners:(0,t.createProxyIdentifier)("ExtHostUriOpeners"),ExtHostProfileContentHandlers:(0,t.createProxyIdentifier)("ExtHostProfileContentHandlers"),ExtHostOutputService:(0,t.createProxyIdentifier)("ExtHostOutputService"),ExtHosLabelService:(0,t.createProxyIdentifier)("ExtHostLabelService"),ExtHostNotebook:(0,t.createProxyIdentifier)("ExtHostNotebook"),ExtHostNotebookDocuments:(0,t.createProxyIdentifier)("ExtHostNotebookDocuments"),ExtHostNotebookEditors:(0,t.createProxyIdentifier)("ExtHostNotebookEditors"),ExtHostNotebookKernels:(0,t.createProxyIdentifier)("ExtHostNotebookKernels"),ExtHostNotebookRenderers:(0,t.createProxyIdentifier)("ExtHostNotebookRenderers"),ExtHostNotebookDocumentSaveParticipant:(0,t.createProxyIdentifier)("ExtHostNotebookDocumentSaveParticipant"),ExtHostInteractive:(0,t.createProxyIdentifier)("ExtHostInteractive"),ExtHostInlineChat:(0,t.createProxyIdentifier)("ExtHostInlineChatShape"),ExtHostChat:(0,t.createProxyIdentifier)("ExtHostChat"),ExtHostChatSlashCommands:(0,t.createProxyIdentifier)("ExtHostChatSlashCommands"),ExtHostChatVariables:(0,t.createProxyIdentifier)("ExtHostChatVariables"),ExtHostChatProvider:(0,t.createProxyIdentifier)("ExtHostChatProvider"),ExtHostAiRelatedInformation:(0,t.createProxyIdentifier)("ExtHostAiRelatedInformation"),ExtHostAiEmbeddingVector:(0,t.createProxyIdentifier)("ExtHostAiEmbeddingVector"),ExtHostTheming:(0,t.createProxyIdentifier)("ExtHostTheming"),ExtHostTunnelService:(0,t.createProxyIdentifier)("ExtHostTunnelService"),ExtHostManagedSockets:(0,t.createProxyIdentifier)("ExtHostManagedSockets"),ExtHostAuthentication:(0,t.createProxyIdentifier)("ExtHostAuthentication"),ExtHostTimeline:(0,t.createProxyIdentifier)("ExtHostTimeline"),ExtHostTesting:(0,t.createProxyIdentifier)("ExtHostTesting"),ExtHostTelemetry:(0,t.createProxyIdentifier)("ExtHostTelemetry"),ExtHostLocalization:(0,t.createProxyIdentifier)("ExtHostLocalization"),ExtHostIssueReporter:(0,t.createProxyIdentifier)("ExtHostIssueReporter")},e.SqlMainContext={MainThreadAccountManagement:(0,t.createProxyIdentifier)("MainThreadAccountManagement"),MainThreadAzureAccount:(0,t.createProxyIdentifier)("MainThreadAzureAccount"),MainThreadConnectionManagement:(0,t.createProxyIdentifier)("MainThreadConnectionManagement"),MainThreadCredentialManagement:(0,t.createProxyIdentifier)("MainThreadCredentialManagement"),MainThreadDataProtocol:(0,t.createProxyIdentifier)("MainThreadDataProtocol"),MainThreadObjectExplorer:(0,t.createProxyIdentifier)("MainThreadObjectExplorer"),MainThreadBackgroundTaskManagement:(0,t.createProxyIdentifier)("MainThreadBackgroundTaskManagement"),MainThreadResourceProvider:(0,t.createProxyIdentifier)("MainThreadResourceProvider"),MainThreadErrorDiagnostics:(0,t.createProxyIdentifier)("MainThreadErrorDiagnostics"),MainThreadModalDialog:(0,t.createProxyIdentifier)("MainThreadModalDialog"),MainThreadTasks:(0,t.createProxyIdentifier)("MainThreadTasks"),MainThreadDashboardWebview:(0,t.createProxyIdentifier)("MainThreadDashboardWebview"),MainThreadModelView:(0,t.createProxyIdentifier)("MainThreadModelView"),MainThreadDashboard:(0,t.createProxyIdentifier)("MainThreadDashboard"),MainThreadModelViewDialog:(0,t.createProxyIdentifier)("MainThreadModelViewDialog"),MainThreadQueryEditor:(0,t.createProxyIdentifier)("MainThreadQueryEditor"),MainThreadNotebook:(0,t.createProxyIdentifier)("MainThreadNotebook"),MainThreadNotebookDocumentsAndEditors:(0,t.createProxyIdentifier)("MainThreadNotebookDocumentsAndEditors"),MainThreadExtensionManagement:(0,t.createProxyIdentifier)("MainThreadExtensionManagement"),MainThreadWorkspace:(0,t.createProxyIdentifier)("MainThreadWorkspace"),MainThreadAzureBlob:(0,t.createProxyIdentifier)("MainThreadAzureBlob"),MainThreadPerf:(0,t.createProxyIdentifier)("MainThreadPerf"),MainThreadWindow:(0,t.createProxyIdentifier)("MainThreadWindow")},e.SqlExtHostContext={ExtHostAccountManagement:(0,t.createProxyIdentifier)("ExtHostAccountManagement"),ExtHostAzureAccount:(0,t.createProxyIdentifier)("ExtHostAzureAccount"),ExtHostConnectionManagement:(0,t.createProxyIdentifier)("ExtHostConnectionManagement"),ExtHostCredentialManagement:(0,t.createProxyIdentifier)("ExtHostCredentialManagement"),ExtHostDataProtocol:(0,t.createProxyIdentifier)("ExtHostDataProtocol"),ExtHostObjectExplorer:(0,t.createProxyIdentifier)("ExtHostObjectExplorer"),ExtHostResourceProvider:(0,t.createProxyIdentifier)("ExtHostResourceProvider"),ExtHostErrorDiagnostics:(0,t.createProxyIdentifier)("ExtHostErrorDiagnostics"),ExtHostModalDialogs:(0,t.createProxyIdentifier)("ExtHostModalDialogs"),ExtHostTasks:(0,t.createProxyIdentifier)("ExtHostTasks"),ExtHostBackgroundTaskManagement:(0,t.createProxyIdentifier)("ExtHostBackgroundTaskManagement"),ExtHostDashboardWebviews:(0,t.createProxyIdentifier)("ExtHostDashboardWebviews"),ExtHostModelView:(0,t.createProxyIdentifier)("ExtHostModelView"),ExtHostModelViewTreeViews:(0,t.createProxyIdentifier)("ExtHostModelViewTreeViews"),ExtHostDashboard:(0,t.createProxyIdentifier)("ExtHostDashboard"),ExtHostModelViewDialog:(0,t.createProxyIdentifier)("ExtHostModelViewDialog"),ExtHostQueryEditor:(0,t.createProxyIdentifier)("ExtHostQueryEditor"),ExtHostNotebook:(0,t.createProxyIdentifier)("ExtHostNotebook"),ExtHostNotebookDocumentsAndEditors:(0,t.createProxyIdentifier)("ExtHostNotebookDocumentsAndEditors"),ExtHostExtensionManagement:(0,t.createProxyIdentifier)("ExtHostExtensionManagement"),ExtHostWorkspace:(0,t.createProxyIdentifier)("ExtHostWorkspace"),ExtHostWindow:(0,t.createProxyIdentifier)("ExtHostWindow"),ExtHostAzureBlob:(0,t.createProxyIdentifier)("ExtHostAzureBlob"),ExtHostPerf:(0,t.createProxyIdentifier)("ExtHostPerf")}}),define(Q[3783],Y([1,0,262,4,141,60,53]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadAccountManagement=void 0;let f=class extends y.Disposable{constructor(m,S){super(),this._accountManagementService=S,this._providerMetadata={},m&&(this._proxy=m.getProxy(T.SqlExtHostContext.ExtHostAccountManagement)),this._accountManagementService.updateAccountListEvent(h=>{if(!h)return;const a=(0,b.values)(this._providerMetadata).findIndex(i=>i.id===h.providerId);if(a===-1)return;const r=parseInt(Object.keys(this._providerMetadata)[a]);this._proxy.$accountsChanged(r,h.accountList)})}$beginAutoOAuthDeviceCode(m,S,h,a,r){return this._accountManagementService.beginAutoOAuthDeviceCode(m,S,h,a,r)}$endAutoOAuthDeviceCode(){return this._accountManagementService.endAutoOAuthDeviceCode()}$accountUpdated(m){this._accountManagementService.accountUpdated(m)}$getAccountsForProvider(m){return this._accountManagementService.getAccountsForProvider(m)}$registerAccountProvider(m,S){let h=this,a={autoOAuthCancelled(){return h._proxy.$autoOAuthCancelled(S)},clear(r){return h._proxy.$clear(S,r)},getSecurityToken(r,i){return h._proxy.$getSecurityToken(r,i)},getAccountSecurityToken(r,i,s){return h._proxy.$getAccountSecurityToken(r,i,s)},initialize(r){return h._proxy.$initialize(S,r)},prompt(){return h._proxy.$prompt(S)},refresh(r){return h._proxy.$refresh(S,r)},clearTokenCache(){return h._proxy.$clearTokenCache()}};return this._accountManagementService.registerProvider(m,a),this._providerMetadata[S]=m,Promise.resolve(null)}$unregisterAccountProvider(m){return this._accountManagementService.unregisterProvider(this._providerMetadata[m]),Promise.resolve(null)}};e.MainThreadAccountManagement=f,e.MainThreadAccountManagement=f=fe([(0,D.extHostNamedCustomer)(T.SqlMainContext.MainThreadAccountManagement),O(1,t.IAccountManagementService)],f)}),define(Q[3784],Y([1,0,4,847,60,53]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadAzureAccount=void 0;let T=class extends t.Disposable{constructor(v,m){super(),this._proxy=v.getProxy(D.SqlExtHostContext.ExtHostAzureAccount),m.registerProxy(this)}async getSubscriptions(v,m,S){return this._proxy.$getSubscriptions(v,m,S)}getStorageAccounts(v,m,S){return this._proxy.$getStorageAccounts(v,m,S)}getBlobContainers(v,m,S,h){return this._proxy.$getBlobContainers(v,m,S,h)}getBlobs(v,m,S,h,a){return this._proxy.$getBlobs(v,m,S,h,a)}getStorageAccountAccessKey(v,m,S,h){return this._proxy.$getStorageAccountAccessKey(v,m,S,h)}};e.MainThreadAzureAccount=T,e.MainThreadAzureAccount=T=fe([(0,b.extHostNamedCustomer)(D.SqlMainContext.MainThreadAzureAccount),O(1,y.IAzureAccountService)],T)}),define(Q[3785],Y([1,0,4,679,60,53]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadAzureBlob=void 0;let T=class extends t.Disposable{constructor(v,m){super(),this._proxy=v.getProxy(D.SqlExtHostContext.ExtHostAzureBlob),m.registerProxy(this)}createSas(v,m,S,h,a){return this._proxy.$createSas(v,m,S,h,a)}};e.MainThreadAzureBlob=T,e.MainThreadAzureBlob=T=fe([(0,b.extHostNamedCustomer)(D.SqlMainContext.MainThreadAzureBlob),O(1,y.IAzureBlobService)],T)}),define(Q[3786],Y([1,0,58,172,21,373,4,17,59,107,106,502,42,60,53,11]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadConnectionManagement=void 0;let o=class extends T.Disposable{constructor(d,p,c,l,n,g,w){super(),this._connectionManagementService=p,this._objectExplorerService=c,this._workbenchEditorService=l,this._connectionDialogService=n,this._capabilitiesService=g,this._logService=w,this._connectionEventListenerDisposables=new Map,d&&(this._proxy=d.getProxy(i.SqlExtHostContext.ExtHostConnectionManagement))}$registerConnectionEventListener(d){let p=l=>l&&{connectionName:l.connectionName,serverName:l.serverName,databaseName:l.databaseName,userName:l.userName,password:l.password,authenticationType:l.authenticationType,savePassword:l.savePassword,groupFullName:l.groupFullName,groupId:l.groupId,providerName:l.providerName,saveProfile:l.saveProfile,id:l.id,azureTenantId:l.azureTenantId,azureAccount:l.azureAccount,options:l.options};const c=new T.DisposableStore;c.add(this._connectionManagementService.onConnect(l=>{this._proxy.$onConnectionEvent(d,"onConnect",l.connectionUri,p(l.connectionProfile))})),c.add(this._connectionManagementService.onConnectionChanged(l=>{this._proxy.$onConnectionEvent(d,"onConnectionChanged",l.connectionUri,p(l.connectionProfile))})),c.add(this._connectionManagementService.onDisconnect(l=>{this._proxy.$onConnectionEvent(d,"onDisconnect",l.connectionUri,p(l.connectionProfile))})),this._connectionEventListenerDisposables.set(d,c)}$unregisterConnectionEventListener(d){const p=this._connectionEventListenerDisposables.get(d);p&&(p.dispose(),this._connectionEventListenerDisposables.delete(d))}$getConnections(d){return Promise.resolve(this._connectionManagementService.getConnections(d).map(p=>this.convertToConnectionProfile(p)))}$getConnection(d){const p=this._connectionManagementService.getConnectionProfile(d);if(!p)return Promise.resolve(void 0);let c={providerId:p.providerName,connectionId:p.id,connectionName:p.connectionName,serverName:p.serverName,databaseName:p.databaseName,userName:p.userName,password:p.password,authenticationType:p.authenticationType,savePassword:p.savePassword,groupFullName:p.groupFullName,groupId:p.groupId,saveProfile:p.savePassword,azureTenantId:p.azureTenantId,options:p.options};return Promise.resolve(c)}$getActiveConnections(){return Promise.resolve(this._connectionManagementService.getActiveConnections().map(d=>this.convertConnection(d)))}$getCurrentConnection(){return Promise.resolve(this.convertConnection(D.getCurrentGlobalConnection(this._objectExplorerService,this._connectionManagementService,this._workbenchEditorService,this._logService,!0)))}$getCurrentConnectionProfile(){return Promise.resolve(this.convertToConnectionProfile(D.getCurrentGlobalConnection(this._objectExplorerService,this._connectionManagementService,this._workbenchEditorService,this._logService,!0)))}$getCredentials(d){return Promise.resolve(this._connectionManagementService.getConnectionCredentials(d))}$getServerInfo(d){return Promise.resolve(this._connectionManagementService.getServerInfo(d))}async $openConnectionDialog(d,p,c){if(p?.providerName&&this._capabilitiesService.providers[p.providerName]===void 0){await this._connectionManagementService.handleUnsupportedProvider(p.providerName);return}let l=t.ConnectionType.default;c&&!c.saveConnection&&(l=t.ConnectionType.temporary);let n=await this._connectionDialogService.openDialogAndWait(this._connectionManagementService,{connectionType:l,providers:d},p,void 0);if(!n)return;n.options.savePassword=n.savePassword;const g=n?{connectionId:n.id,options:n.options,providerName:n.providerName}:void 0;return c&&c.saveConnection&&await this._connectionManagementService.connectAndSaveProfile(n,void 0,{saveTheConnection:(0,f.isUndefinedOrNull)(c.saveConnection)?!0:c.saveConnection,showDashboard:(0,f.isUndefinedOrNull)(c.showDashboard)?!1:c.showDashboard,showConnectionDialogOnError:(0,f.isUndefinedOrNull)(c.showConnectionDialogOnError)?!0:c.showConnectionDialogOnError,showFirewallRuleOnError:(0,f.isUndefinedOrNull)(c.showFirewallRuleOnError)?!0:c.showFirewallRuleOnError}),g}$openChangePasswordDialog(d){let p=new S.ConnectionProfile(this._capabilitiesService,d);return this._connectionManagementService.openChangePasswordDialog(p)}$getNonDefaultOptions(d){let p=new S.ConnectionProfile(this._capabilitiesService,d);return Promise.resolve(this._connectionManagementService.getNonDefaultOptions(p))}async $listDatabases(d){let p=await this.$getUriForConnection(d);return(await this._connectionManagementService.listDatabases(p)).databaseNames}async $getConnectionString(d,p){return this._connectionManagementService.getConnectionString(d,p)}$getUriForConnection(d){return Promise.resolve(this._connectionManagementService.getConnectionUriFromId(d))}convertConnection(d){return d?(d=this._connectionManagementService.removeConnectionProfileCredentials(d),{providerName:d.providerName,connectionId:d.id,options:(0,a.deepClone)(d.options)}):void 0}convertToConnectionProfile(d){return d?(d=this._connectionManagementService.removeConnectionProfileCredentials(d),{providerId:d.providerName,connectionId:d.id,options:(0,a.deepClone)(d.options),connectionName:d.connectionName,serverName:d.serverName,databaseName:d.databaseName,userName:d.userName,password:d.password,authenticationType:d.authenticationType,savePassword:d.savePassword,groupFullName:d.groupFullName,groupId:d.groupId,saveProfile:d.saveProfile}):void 0}$connect(d,p=!0,c=!0){let l=new S.ConnectionProfile(this._capabilitiesService,d);return l.id=(0,v.generateUuid)(),this._connectionManagementService.connectAndSaveProfile(l,void 0,{saveTheConnection:p,showDashboard:c,showConnectionDialogOnError:!0,showFirewallRuleOnError:!0}).then(n=>({connected:n.connected,connectionId:n.connected?l.id:void 0,errorCode:n.errorCode,errorMessage:n.errorMessage}))}};e.MainThreadConnectionManagement=o,e.MainThreadConnectionManagement=o=fe([(0,r.extHostNamedCustomer)(i.SqlMainContext.MainThreadConnectionManagement),O(1,t.IConnectionManagementService),O(2,y.IObjectExplorerService),O(3,b.IEditorService),O(4,h.IConnectionDialogService),O(5,m.ICapabilitiesService),O(6,s.ILogService)],o)}),define(Q[3787],Y([1,0,4,848,60,53]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadCredentialManagement=void 0;let T=class extends t.Disposable{constructor(v,m){super(),this.credentialService=m,this._registrations=Object.create(null),v&&(this._proxy=v.getProxy(D.SqlExtHostContext.ExtHostCredentialManagement))}$registerCredentialProvider(v){let m=this;this._registrations[v]=this.credentialService.addEventListener(v,{onSaveCredential(S,h){return m._proxy.$saveCredential(S,h)},onReadCredential(S){return m._proxy.$readCredential(S)},onDeleteCredential(S){return m._proxy.$deleteCredential(S)}})}$unregisterCredentialProvider(v){let m=this._registrations[v];m&&(m.dispose(),delete this._registrations[v])}};e.MainThreadCredentialManagement=T,e.MainThreadCredentialManagement=T=fe([(0,b.extHostNamedCustomer)(D.SqlMainContext.MainThreadCredentialManagement),O(1,y.ICredentialsService)],T)}),define(Q[3788],Y([1,0,284,44,60,53]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDashboard=void 0;let T=class{constructor(v,m,S){this._proxy=v.getProxy(D.SqlExtHostContext.ExtHostDashboard),S.onDidChangeToDashboard(h=>{m.activateByEvent("onDashboardOpen"),this._proxy.$onDidChangeToDashboard(h)}),S.onDidOpenDashboard(h=>{this._proxy.$onDidOpenDashboard(h)})}dispose(){}};e.MainThreadDashboard=T,e.MainThreadDashboard=T=fe([(0,b.extHostNamedCustomer)(D.SqlMainContext.MainThreadDashboard),O(1,y.IExtensionService),O(2,t.IDashboardService)],T)}),define(Q[3789],Y([1,0,680,4,60,53]),function(q,e,t,y,b,D){"use strict";var T;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDashboardWebview=void 0;let f=class extends y.Disposable{static{T=this}static{this._handlePool=0}constructor(m,S){super(),this._dialogs=new Map,this.knownWidgets=new Array,this._proxy=m.getProxy(D.SqlExtHostContext.ExtHostDashboardWebviews),this._register(S.onRegisteredWebview(h=>{if(this.knownWidgets.find(a=>a===h.id)){let a=T._handlePool++;this._dialogs.set(a,h),this._proxy.$registerWidget(a,h.id,h.connection,h.serverInfo),h.onMessage(r=>{this._proxy.$onMessage(a,r)})}}))}$sendMessage(m,S){this._dialogs.get(m).sendMessage(S)}$setHtml(m,S){this._dialogs.get(m).setHtml(S)}$registerProvider(m){this.knownWidgets.push(m)}};e.MainThreadDashboardWebview=f,e.MainThreadDashboardWebview=f=T=fe([(0,b.extHostNamedCustomer)(D.SqlMainContext.MainThreadDashboardWebview),O(1,t.IDashboardViewService)],f)}),define(Q[3790],Y([1,0,855,4,60,53]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadErrorDiagnostics=void 0;let T=class extends y.Disposable{constructor(v,m){super(),this._errorDiagnosticsService=m,this._providerMetadata={},v&&(this._proxy=v.getProxy(D.SqlExtHostContext.ExtHostErrorDiagnostics))}$registerDiagnosticsProvider(v,m){let S=this,h={handleConnectionError(a,r){return S._proxy.$handleConnectionError(m,a,r)}};this._errorDiagnosticsService.registerDiagnosticsProvider(v.targetProviderId,h),this._providerMetadata[m]=v}$unregisterDiagnosticsProvider(v){this._errorDiagnosticsService.unregisterDiagnosticsProvider(this._providerMetadata[v].targetProviderId)}};e.MainThreadErrorDiagnostics=T,e.MainThreadErrorDiagnostics=T=fe([(0,b.extHostNamedCustomer)(D.SqlMainContext.MainThreadErrorDiagnostics),O(1,t.IErrorDiagnosticsService)],T)}),define(Q[3791],Y([1,0,4,95,10,9,23,1949,11,60,53]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadExtensionManagement=void 0;let h=class extends t.Disposable{constructor(r,i,s,o,u){super(),this._extensionService=i,this._configurationService=s,this._notificationService=o,this.logService=u,this._obsoleteExtensionApiUsageNotificationShown=!1}$install(r){return this._extensionService.install(b.URI.file(r)).then(i=>{},i=>i?i.toString():void 0)}$showObsoleteExtensionApiUsageNotification(r){if(this.logService.warn(r),this._obsoleteExtensionApiUsageNotificationShown)return;let i=this._configurationService.getValue("workbench").enableObsoleteApiUsageNotification;i!==void 0&&!i||(this._notificationService.prompt(T.Severity.Warning,(0,f.localize)(0,null),[{label:(0,f.localize)(1,null),run:()=>{this._configurationService.updateValue("workbench.enableObsoleteApiUsageNotification",!1,2)},isSecondary:!0}]),this._obsoleteExtensionApiUsageNotificationShown=!0)}};e.MainThreadExtensionManagement=h,e.MainThreadExtensionManagement=h=fe([(0,m.extHostNamedCustomer)(S.SqlMainContext.MainThreadExtensionManagement),O(1,y.IExtensionManagementService),O(2,D.IConfigurationService),O(3,T.INotificationService),O(4,v.ILogService)],h)}),define(Q[3792],Y([1,0,3659,5,4,60,53,1573]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadModalDialog=void 0;let f=class extends b.Disposable{constructor(m,S){super(),this._instantiationService=S,this._dialogs=new Map,this._proxy=m.getProxy(T.SqlExtHostContext.ExtHostModalDialogs)}$createDialog(m){const S=this._instantiationService.createInstance(t.WebViewDialog);this._dialogs.set(m,S),S.onMessage(h=>{this._proxy.$onMessage(m,h)}),S.onClosed(h=>{this._proxy.$onClosed(m)})}$disposeDialog(m){this._dialogs.get(m).close()}$setTitle(m,S){this._dialogs.get(m).setHeaderTitle(S)}$setHtml(m,S){this._dialogs.get(m).setHtml(S)}$show(m){const S=this._dialogs.get(m);S.render(),S.open()}async $sendMessage(m,S){return this._dialogs.get(m).sendMessage(S),Promise.resolve(!0)}};e.MainThreadModalDialog=f,e.MainThreadModalDialog=f=fe([(0,D.extHostNamedCustomer)(T.SqlMainContext.MainThreadModalDialog),O(1,y.IInstantiationService)],f)}),define(Q[3793],Y([1,0,4,849,60,53]),function(q,e,t,y,b,D){"use strict";var T;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadModelView=void 0;let f=class extends t.Disposable{static{T=this}static{this._handlePool=0}constructor(m,S){super(),this._context=m,this._dialogs=new Map,this.knownWidgets=new Array,this._proxy=m.getProxy(D.SqlExtHostContext.ExtHostModelView),S.onRegisteredModelView(h=>{if(this.knownWidgets.find(a=>a===h.id)){let a=T._handlePool++;this._dialogs.set(a,h),this._proxy.$registerWidget(a,h.id,h.connection,h.serverInfo),h.onDestroy(()=>this._proxy.$onClosed(a))}})}$registerProvider(m){this.knownWidgets.push(m)}$initializeModel(m,S){return this.execModelViewAction(m,h=>{h.initializeModel(S,a=>this.runCustomValidations(m,a))})}$clearContainer(m,S){return this.execModelViewAction(m,h=>h.clearContainer(S))}$addToContainer(m,S,h){return this.execModelViewAction(m,a=>a.addToContainer(S,h))}$removeFromContainer(m,S,h){return this.execModelViewAction(m,a=>a.removeFromContainer(S,h))}$setLayout(m,S,h){return this.execModelViewAction(m,a=>a.setLayout(S,h))}$setItemLayout(m,S,h){return this.execModelViewAction(m,a=>a.setItemLayout(S,h))}onEvent(m,S,h){this._proxy.$handleEvent(m,S,h)}$registerEvent(m,S){return this.execModelViewAction(m,h=>{this._register(h.onEvent(a=>{a.componentId&&a.componentId===S&&this.onEvent(m,S,a)}))})}$setDataProvider(m,S){return this.execModelViewAction(m,h=>h.setDataProvider(m,S,this._context))}$refreshDataProvider(m,S,h){return this.execModelViewAction(m,a=>a.refreshDataProvider(S,h))}$setProperties(m,S,h){return this.execModelViewAction(m,a=>a.setProperties(S,h))}$validate(m,S){return new Promise(h=>this.execModelViewAction(m,a=>h(a.validate(S))))}$focus(m,S){return new Promise(h=>this.execModelViewAction(m,a=>h(a.focus(S))))}$doAction(m,S,h,...a){return new Promise(r=>this.execModelViewAction(m,i=>r(i.doAction(S,h,...a))))}runCustomValidations(m,S){return this._proxy.$runCustomValidations(m,S)}execModelViewAction(m,S){let h=this._dialogs.get(m),a=S(h);return Promise.resolve(a)}};e.MainThreadModelView=f,e.MainThreadModelView=f=T=fe([(0,b.extHostNamedCustomer)(D.SqlMainContext.MainThreadModelView),O(1,y.IModelViewService)],f)}),define(Q[3794],Y([1,0,4,6,130,196,859,183,5,60,53]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebook=void 0;let h=class extends t.Disposable{constructor(g,w,E){super(),this.notebookService=w,this.instantiationService=E,this._serializationProviders=new Map,this._executeProviders=new Map,this._futures=new Map,g&&(this._proxy=g.getProxy(S.SqlExtHostContext.ExtHostNotebook))}addFuture(g,w){this._futures.set(g,w)}disposeFuture(g){this._futures.delete(g)}$registerSerializationProvider(g,w){let E={main:this,ext:this._proxy},C=this.instantiationService.createInstance(a,E,g,w);this._serializationProviders.set(w,C),this.notebookService.registerSerializationProvider(g,C)}$registerExecuteProvider(g,w){let E={main:this,ext:this._proxy},C=this.instantiationService.createInstance(r,E,g,w);this._executeProviders.set(w,C),this.notebookService.registerExecuteProvider(g,C)}$unregisterSerializationProvider(g){let w=this._serializationProviders.get(g);w&&(this.notebookService.unregisterSerializationProvider(w.providerId),w.dispose(),this._serializationProviders.delete(g))}$unregisterExecuteProvider(g){let w=this._executeProviders.get(g);w&&(this.notebookService.unregisterExecuteProvider(w.providerId),w.dispose(),this._executeProviders.delete(g))}$onFutureMessage(g,w,E){let C=this._futures.get(g);C&&C.onMessage(w,E)}$onFutureDone(g,w){let E=this._futures.get(g);E&&E.onDone(w)}};e.MainThreadNotebook=h,e.MainThreadNotebook=h=fe([(0,m.extHostNamedCustomer)(S.SqlMainContext.MainThreadNotebook),O(1,b.INotebookService),O(2,v.IInstantiationService)],h);let a=class extends t.Disposable{constructor(g,w,E,C){super(),this._proxy=g,this.providerId=w,this.providerHandle=E,this.instantiationService=C,this._notebookUriToManagerMap=new Map}getSerializationManager(g){return this.doGetSerializationManager(g)}async doGetSerializationManager(g){let w=g.toString(),E=this._notebookUriToManagerMap.get(w);return E||(E=this.instantiationService.createInstance(i,this._proxy,this.providerId,g),await E.initialize(this.providerHandle),this._notebookUriToManagerMap.set(w,E)),E}};a=fe([O(3,v.IInstantiationService)],a);let r=class extends t.Disposable{constructor(g,w,E,C){super(),this._proxy=g,this.providerId=w,this.providerHandle=E,this.instantiationService=C,this._notebookUriToManagerMap=new Map}getExecuteManager(g){return this.doGetExecuteManager(g)}async doGetExecuteManager(g){let w=g.toString(),E=this._notebookUriToManagerMap.get(w);return E||(E=this.instantiationService.createInstance(s,this._proxy,this.providerId,g),await E.initialize(this.providerHandle),this._notebookUriToManagerMap.set(w,E)),E}handleNotebookClosed(g){this._notebookUriToManagerMap.delete(g.toString()),this._proxy.ext.$handleNotebookClosed(g)}};r=fe([O(3,v.IInstantiationService)],r);let i=class{constructor(g,w,E,C){this._proxy=g,this.providerId=w,this.notebookUri=E,this.instantiationService=C}async initialize(g){this.managerDetails=await this._proxy.ext.$getSerializationManagerDetails(g,this.notebookUri);let w=this.managerDetails.handle;return this._contentManager=this.managerDetails.hasContentManager?new o(w,this._proxy):this.instantiationService.createInstance(T.LocalContentManager),this}get contentManager(){return this._contentManager}get managerHandle(){return this.managerDetails.handle}};i=fe([O(3,v.IInstantiationService)],i);class s{constructor(g,w,E){this._proxy=g,this.providerId=w,this.notebookUri=E}async initialize(g){this.managerDetails=await this._proxy.ext.$getExecuteManagerDetails(g,this.notebookUri);let w=this.managerDetails.handle;return this._serverManager=this.managerDetails.hasServerManager?new u(w,this._proxy):void 0,this._sessionManager=new d(w,this._proxy),this}get sessionManager(){return this._sessionManager}get serverManager(){return this._serverManager}get managerHandle(){return this.managerDetails.handle}}class o{constructor(g,w){this.handle=g,this._proxy=w}deserializeNotebook(g){return this._proxy.ext.$deserializeNotebook(this.handle,g)}serializeNotebook(g){return this._proxy.ext.$serializeNotebook(this.handle,g)}}class u{constructor(g,w){this.handle=g,this._proxy=w,this.onServerStartedEmitter=new y.Emitter,this._isStarted=!1}get isStarted(){return this._isStarted}get onServerStarted(){return this.onServerStartedEmitter.event}startServer(g){return this.doStartServer(g)}async doStartServer(g){await this._proxy.ext.$doStartServer(this.handle,g),this._isStarted=!0,this.onServerStartedEmitter.fire()}stopServer(){return this.doStopServer()}async doStopServer(){try{await this._proxy.ext.$doStopServer(this.handle)}finally{this._isStarted=!1}}}class d{constructor(g,w){this.managerHandle=g,this._proxy=w,this._isReady=!1,this.readyPromise=this.initializeSessionManager()}get isReady(){return this._isReady}get ready(){return this.readyPromise}get specs(){return this._specs}startNew(g){return this.doStartNew(g)}async doStartNew(g){let w=await this._proxy.ext.$startNewSession(this.managerHandle,g);const E=new p(this._proxy,w);return await E.initialize(),E}shutdown(g){return this._proxy.ext.$shutdownSession(this.managerHandle,g)}async initializeSessionManager(){await this.refreshSpecs(),this._isReady=!0}async refreshSpecs(){let g=await this._proxy.ext.$refreshSpecs(this.managerHandle);g&&(this._specs=g)}shutdownAll(){return this._proxy.ext.$shutdownAll(this.managerHandle)}dispose(){return this._proxy.ext.$dispose(this.managerHandle)}}class p{constructor(g,w){this._proxy=g,this._sessionDetails=w}async initialize(){if(this._sessionDetails&&this._sessionDetails.kernelDetails)return this._kernel=new c(this._proxy,this._sessionDetails.kernelDetails),this._kernel.initialize()}get canChangeKernels(){return this._sessionDetails.canChangeKernels}get id(){return this._sessionDetails.id}get path(){return this._sessionDetails.path}get name(){return this._sessionDetails.name}get type(){return this._sessionDetails.type}get status(){return this._sessionDetails.status}get kernel(){return this._kernel}changeKernel(g){return this.doChangeKernel(g)}configureKernel(g){return this.doConfigureKernel(g)}configureConnection(g){return g.capabilitiesService!==void 0&&(g.capabilitiesService=void 0),this.doConfigureConnection(g)}async doChangeKernel(g){let w=await this._proxy.ext.$changeKernel(this._sessionDetails.sessionId,g);return this._kernel=new c(this._proxy,w),await this._kernel.initialize(),this._kernel}async doConfigureKernel(g){await this._proxy.ext.$configureKernel(this._sessionDetails.sessionId,g)}async doConfigureConnection(g){await this._proxy.ext.$configureConnection(this._sessionDetails.sessionId,g)}}class c{constructor(g,w){this._proxy=g,this.kernelDetails=w,this._isReady=!1,this._ready=new f.Deferred}async initialize(){try{this._info=await this._proxy.ext.$getKernelReadyStatus(this.kernelDetails.kernelId),this._isReady=!0,this._ready.resolve()}catch(g){this._isReady=!1,this._ready.reject(g)}}get isReady(){return this._isReady}get ready(){return this._ready.promise}get id(){return this.kernelDetails.id}get name(){return this.kernelDetails.name}get supportsIntellisense(){return this.kernelDetails.supportsIntellisense}get requiresConnection(){return this.kernelDetails.requiresConnection}get info(){return this._info}getSpec(){return this._proxy.ext.$getKernelSpec(this.kernelDetails.kernelId)}requestComplete(g){return this._proxy.ext.$requestComplete(this.kernelDetails.kernelId,g)}requestExecute(g,w){let E=new l(this._proxy);return this._proxy.ext.$requestExecute(this.kernelDetails.kernelId,g,w).then(C=>{E.setDetails(C),this._proxy.main.addFuture(C.futureId,E)},C=>E.setError(C)),E}interrupt(){return this._proxy.ext.$interruptKernel(this.kernelDetails.kernelId)}restart(){return this._proxy.ext.$restartKernel(this.kernelDetails.kernelId)}}class l{constructor(g){this._proxy=g,this._done=new f.Deferred,this._messageHandlers=new Map,this._inProgress=!0}setDetails(g){this._futureId=g.futureId,this._msg=g.msg}setError(g){this._done.reject(g)}onMessage(g,w){let E=this._messageHandlers.get(g);if(E)try{E.handle(w)}catch{}}onDone(g){this._inProgress=!1,g.succeeded?this._done.resolve(g.message):this._done.reject(new Error(g.rejectReason))}addMessageHandler(g,w){this._messageHandlers.set(g,w)}get inProgress(){return this._inProgress}set inProgress(g){this._inProgress=g}get msg(){return this._msg}get done(){return this._done.promise}setReplyHandler(g){this.addMessageHandler(D.FutureMessageType.Reply,g)}setStdInHandler(g){this.addMessageHandler(D.FutureMessageType.StdIn,g)}setIOPubHandler(g){this.addMessageHandler(D.FutureMessageType.IOPub,g)}sendInputReply(g){this._proxy.ext.$sendInputReply(this._futureId,g)}dispose(){this._proxy.main.disposeFuture(this._futureId),this._proxy.ext.$disposeFuture(this._futureId)}registerMessageHook(g){throw new Error("Method not implemented.")}removeMessageHook(g){throw new Error("Method not implemented.")}}}),define(Q[3795],Y([1,0,172,4,60,53]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadObjectExplorer=void 0;let T=class extends y.Disposable{constructor(v,m){super(),this._objectExplorerService=m}$getNode(v,m){return this._objectExplorerService.getTreeNode(v,m).then(S=>{if(S)return S.toNodeInfo()})}$getActiveConnectionNodes(){let v=this._objectExplorerService.getActiveConnectionNodes();return Promise.resolve(v.map(m=>({connectionId:m.connection.id,nodeInfo:m.toNodeInfo()})))}$setExpandedState(v,m,S){return this._objectExplorerService.getTreeNode(v,m).then(h=>h.setExpandedState(S))}$setSelected(v,m,S,h=void 0){return this._objectExplorerService.getTreeNode(v,m).then(a=>a.setSelected(S,h))}$getChildren(v,m){return this._objectExplorerService.getTreeNode(v,m).then(S=>S.getChildren().then(h=>h.map(a=>a.toNodeInfo())))}$isExpanded(v,m){return this._objectExplorerService.getTreeNode(v,m).then(S=>S.isExpanded())}$findNodes(v,m,S,h,a,r){return this._objectExplorerService.findNodes(v,m,S,h,a,r)}$refresh(v,m){return this._objectExplorerService.refreshNodeInView(v,m).then(S=>S.toNodeInfo())}$getNodeActions(v,m){return this._objectExplorerService.getNodeActions(v,m)}$getSessionConnectionProfile(v){return Promise.resolve(this._objectExplorerService.getSessionConnectionProfile(v))}};e.MainThreadObjectExplorer=T,e.MainThreadObjectExplorer=T=fe([(0,b.extHostNamedCustomer)(D.SqlMainContext.MainThreadObjectExplorer),O(1,t.IObjectExplorerService)],T)}),define(Q[3796],Y([1,0,60,53,173]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadPerf=void 0;let D=class{constructor(f){}$mark(f){b.mark(f)}dispose(){}};e.MainThreadPerf=D,e.MainThreadPerf=D=fe([(0,t.extHostNamedCustomer)(y.SqlMainContext.MainThreadPerf)],D)}),define(Q[3797],Y([1,0,686,4,60,53]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadResourceProvider=void 0;let T=class extends y.Disposable{constructor(v,m){super(),this._resourceProviderService=m,this._providerMetadata={},v&&(this._proxy=v.getProxy(D.SqlExtHostContext.ExtHostResourceProvider))}$registerResourceProvider(v,m){let S=this,h={createFirewallRule(a,r){return S._proxy.$createFirewallRule(m,a,r)},handleFirewallRule(a,r,i){return S._proxy.$handleFirewallRule(m,a,r,i)}};return this._resourceProviderService.registerProvider(v.id,h),this._providerMetadata[m]=v,Promise.resolve(null)}$unregisterResourceProvider(v){return this._resourceProviderService.unregisterProvider(this._providerMetadata[v].id),Promise.resolve(null)}};e.MainThreadResourceProvider=T,e.MainThreadResourceProvider=T=fe([(0,b.extHostNamedCustomer)(D.SqlMainContext.MainThreadResourceProvider),O(1,t.IResourceProviderService)],T)}),define(Q[3798],Y([1,0,4,106,372,60,53]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTasks=void 0;let f=class extends t.Disposable{constructor(m){super(),this._disposables=new Map,this._proxy=m.getProxy(T.SqlExtHostContext.ExtHostTasks)}dispose(){this._disposables.forEach(m=>m.dispose()),this._disposables.clear()}$registerTask(m){this._disposables.set(m,b.TaskRegistry.registerTask(m,(S,h,...a)=>{h instanceof y.ConnectionProfile&&(h=h.toIConnectionProfile()),this._proxy.$executeContributedTask(m,h,...a)}))}$unregisterTask(m){this._disposables.has(m)&&(this._disposables.get(m).dispose(),this._disposables.delete(m))}};e.MainThreadTasks=f,e.MainThreadTasks=f=fe([(0,D.extHostNamedCustomer)(T.SqlMainContext.MainThreadTasks)],f)}),define(Q[3799],Y([1,0,684,685,4,53,60]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadWindow=void 0;let f=class extends b.Disposable{constructor(m,S,h){super(),this._fileBrowserDialogService=S,this._urlBrowserDialogService=h}async $openServerFileBrowserDialog(m,S,h,a){return await new Promise((i,s)=>{try{const o=u=>{i(u)};this._fileBrowserDialogService.showDialog(m,S,h,"",!0,o,a)}catch(o){s(o)}})}async $openBackupUrlBrowserDialog(m,S,h){return this._urlBrowserDialogService.showDialog(m,h,h,h?"":S)}};e.MainThreadWindow=f,e.MainThreadWindow=f=fe([(0,T.extHostNamedCustomer)(D.SqlMainContext.MainThreadWindow),O(1,y.IFileBrowserDialogController),O(2,t.IBackupRestoreUrlBrowserDialogService)],f)}),define(Q[3800],Y([1,0,6,59,53]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostBackgroundTaskManagement=e.ExtBackgroundOperation=e.TaskStatus=void 0;var D;(function(v){v[v.NotStarted=0]="NotStarted",v[v.InProgress=1]="InProgress",v[v.Succeeded=2]="Succeeded",v[v.SucceededWithWarning=3]="SucceededWithWarning",v[v.Failed=4]="Failed",v[v.Canceled=5]="Canceled",v[v.Canceling=6]="Canceling"})(D||(e.TaskStatus=D={}));class T{constructor(m,S){this._id=m,this._onCanceled=new t.Emitter,this._proxy=S.getProxy(b.SqlMainContext.MainThreadBackgroundTaskManagement)}updateStatus(m,S){this._proxy.$updateTask({message:S,status:m,taskId:this.id})}get onCanceled(){return this._onCanceled.event}cancel(){this._onCanceled.fire()}get id(){return this._id}}e.ExtBackgroundOperation=T;class f{constructor(m){this._handlers=new Map,this._operations=new Map,this._proxy=m.getProxy(b.SqlMainContext.MainThreadBackgroundTaskManagement),this._mainContext=m}$onTaskRegistered(m){let S=new T(m,this._mainContext);this._operations.set(m,S);let h=this._handlers.get(m);h&&h.operation(S)}$onTaskCanceled(m){let S=this._operations.get(m);S&&S.cancel()}$registerTask(m){let S=m.operationId||`OperationId${(0,y.generateUuid)()}`;if(this._handlers.has(S))throw new Error(`operation '${S}' already exists`);this._handlers.set(S,m);let h={databaseName:void 0,serverName:void 0,description:m.description,isCancelable:m.isCancelable,name:m.displayName,providerName:void 0,taskExecutionMode:0,taskId:S,status:D.NotStarted,connection:m.connection};this._proxy.$registerTask(h)}$removeTask(m){this._handlers.has(m)&&this._handlers.delete(m)}}e.ExtHostBackgroundTaskManagement=f}),define(Q[3801],Y([1,0,4,53,1328,60]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadAiEmbeddingVector=void 0;let T=class extends t.Disposable{constructor(v,m){super(),this._AiEmbeddingVectorService=m,this._registrations=this._register(new t.DisposableMap),this._proxy=v.getProxy(y.ExtHostContext.ExtHostAiEmbeddingVector)}$registerAiEmbeddingVectorProvider(v,m){const S={provideAiEmbeddingVector:(h,a)=>this._proxy.$provideAiEmbeddingVector(m,h,a)};this._registrations.set(m,this._AiEmbeddingVectorService.registerAiEmbeddingVectorProvider(v,S))}$unregisterAiEmbeddingVectorProvider(v){this._registrations.deleteAndDispose(v)}};e.MainThreadAiEmbeddingVector=T,e.MainThreadAiEmbeddingVector=T=fe([(0,D.extHostNamedCustomer)(y.MainContext.MainThreadAiEmbeddingVector),O(1,b.IAiEmbeddingVectorService)],T)}),define(Q[3802],Y([1,0,31,4,53,741,60]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadAiRelatedInformation=void 0;let f=class extends y.Disposable{constructor(m,S){super(),this._aiRelatedInformationService=S,this._registrations=this._register(new y.DisposableMap),this._proxy=m.getProxy(b.ExtHostContext.ExtHostAiRelatedInformation)}$getAiRelatedInformation(m,S){return this._aiRelatedInformationService.getRelatedInformation(m,S,t.CancellationToken.None)}$registerAiRelatedInformationProvider(m,S){const h={provideAiRelatedInformation:(a,r)=>this._proxy.$provideAiRelatedInformation(m,a,r)};this._registrations.set(m,this._aiRelatedInformationService.registerAiRelatedInformationProvider(S,h))}$unregisterAiRelatedInformationProvider(m){this._registrations.deleteAndDispose(m)}};e.MainThreadAiRelatedInformation=f,e.MainThreadAiRelatedInformation=f=fe([(0,T.extHostNamedCustomer)(b.MainContext.MainThreadAiRelatedInformation),O(1,D.IAiRelatedInformationService)],f)}),define(Q[3803],Y([1,0,4,2499,60,625,279,53,49,24,63,43,23,260,44,30]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadAuthentication=e.MainThreadAuthenticationProvider=void 0;class o extends t.Disposable{constructor(p,c,l,n,g,w,E,C){super(),this._proxy=p,this.id=c,this.label=l,this.supportsMultipleAccounts=n,this.notificationService=g,this.storageService=w,this.quickInputService=E,this.dialogService=C}manageTrustedExtensions(p){const c=(0,D.readAllowedExtensions)(this.storageService,this.id,p);if(!c.length){this.dialogService.info(y.localize(0,null));return}const l=this.quickInputService.createQuickPick();l.canSelectMany=!0,l.customButton=!0,l.customLabel=y.localize(1,null);const n=(0,D.readAccountUsages)(this.storageService,this.id,p),g=c.map(w=>{const E=n.find(C=>w.id===C.extensionId);return{label:w.name,description:E?y.localize(2,null,(0,r.fromNow)(E.lastUsed,!0)):y.localize(3,null),extension:w}});l.items=g,l.selectedItems=g.filter(w=>w.extension.allowed===void 0||w.extension.allowed),l.title=y.localize(4,null),l.placeholder=y.localize(5,null),l.onDidAccept(()=>{const w=l.items.map(E=>E.extension);this.storageService.store(`${this.id}-${p}`,JSON.stringify(w),-1,0),l.dispose()}),l.onDidChangeSelection(w=>{l.items.forEach(E=>{E.extension&&(E.extension.allowed=!1)}),w.forEach(E=>E.extension.allowed=!0)}),l.onDidHide(()=>{l.dispose()}),l.onDidCustom(()=>{l.hide()}),l.show()}async removeAccountSessions(p,c){const l=(0,D.readAccountUsages)(this.storageService,this.id,p),{confirmed:n}=await this.dialogService.confirm({type:S.default.Info,message:l.length?y.localize(6,null,p,l.map(g=>g.extensionName).join(` `)):y.localize(7,null,p),primaryButton:y.localize(8,null)});if(n){const g=c.map(w=>this.removeSession(w.id));await Promise.all(g),(0,D.removeAccountUsage)(this.storageService,this.id,p),this.storageService.remove(`${this.id}-${p}`,-1)}}async getSessions(p){return this._proxy.$getSessions(this.id,p)}createSession(p,c){return this._proxy.$createSession(this.id,p,c)}async removeSession(p){await this._proxy.$removeSession(this.id,p),this.notificationService.info(y.localize(9,null))}}e.MainThreadAuthenticationProvider=o;let u=class extends t.Disposable{constructor(p,c,l,n,g,w,E,C){super(),this.authenticationService=c,this.dialogService=l,this.storageService=n,this.notificationService=g,this.quickInputService=w,this.extensionService=E,this.telemetryService=C,this._proxy=p.getProxy(f.ExtHostContext.ExtHostAuthentication),this._register(this.authenticationService.onDidChangeSessions(I=>{this._proxy.$onDidChangeAuthenticationSessions(I.providerId,I.label)})),this._proxy.$setProviders(this.authenticationService.declaredProviders),this._register(this.authenticationService.onDidChangeDeclaredProviders(I=>{this._proxy.$setProviders(I)}))}async $registerAuthenticationProvider(p,c,l){const n=new o(this._proxy,p,c,l,this.notificationService,this.storageService,this.quickInputService,this.dialogService);this.authenticationService.registerAuthenticationProvider(p,n)}$unregisterAuthenticationProvider(p){this.authenticationService.unregisterAuthenticationProvider(p)}$ensureProvider(p){return this.extensionService.activateByEvent((0,D.getAuthenticationProviderActivationEvent)(p),1)}$sendDidChangeSessions(p,c){this.authenticationService.sessionsUpdate(p,c)}$removeSession(p,c){return this.authenticationService.removeSession(p,c)}async loginPrompt(p,c,l,n){const g=l?y.localize(10,null,c,p):y.localize(11,null,c,p),{confirmed:w}=await this.dialogService.confirm({type:S.default.Info,message:g,detail:n,primaryButton:y.localize(12,null)});return w}async doGetSession(p,c,l,n,g){const w=await this.authenticationService.getSessions(p,c,!0),E=this.authenticationService.supportsMultipleAccounts(p);if(g.forceNewSession&&g.createIfNone)throw new Error("Invalid combination of options. Please remove one of the following: forceNewSession, createIfNone");if(g.forceNewSession&&g.silent)throw new Error("Invalid combination of options. Please remove one of the following: forceNewSession, silent");if(g.createIfNone&&g.silent)throw new Error("Invalid combination of options. Please remove one of the following: createIfNone, silent");if(!g.forceNewSession&&w.length){if(E)if(g.clearSessionPreference)this.authenticationService.removeSessionPreference(p,l,c);else{const I=this.authenticationService.getSessionPreference(p,l,c);if(I){const _=w.find(A=>A.id===I);if(_&&this.authenticationService.isAccessAllowed(p,_.account.label,l))return _}}else if(this.authenticationService.isAccessAllowed(p,w[0].account.label,l))return w[0]}if(g.createIfNone||g.forceNewSession){const I=this.authenticationService.getLabel(p),_=typeof g.forceNewSession=="object"?g.forceNewSession.detail:void 0,A=!!(g.forceNewSession&&w.length);if(!await this.loginPrompt(I,n,A,_))throw new Error("User did not consent to login.");let L;if(w?.length&&!g.forceNewSession&&E)L=await this.authenticationService.selectSession(p,l,n,c,w);else{let R;if(typeof g.forceNewSession=="object"&&g.forceNewSession.sessionToRecreate)R=g.forceNewSession.sessionToRecreate;else{const M=this.authenticationService.getSessionPreference(p,l,c);R=M?w.find(N=>N.id===M):void 0}L=await this.authenticationService.createSession(p,c,{activateImmediate:!0,sessionToRecreate:R})}return this.authenticationService.updateAllowedExtension(p,L.account.label,l,n,!0),this.authenticationService.updateSessionPreference(p,l,L),L}const C=w.find(I=>this.authenticationService.isAccessAllowed(p,I.account.label,l));if(C)return this.authenticationService.getSessionPreference(p,l,c)||(this.storageService.get(`${n}-${p}`,-1)&&this.storageService.remove(`${n}-${p}`,-1),this.authenticationService.updateAllowedExtension(p,C.account.label,l,n,!0),this.authenticationService.updateSessionPreference(p,l,C)),C;g.silent||(w.length?this.authenticationService.requestSessionAccess(p,l,n,c,w):await this.authenticationService.requestNewSession(p,c,l,n))}async $getSession(p,c,l,n,g){const w=await this.doGetSession(p,c,l,n,g);return w&&(this.sendProviderUsageTelemetry(l,p),(0,D.addAccountUsage)(this.storageService,p,w.account.label,l,n)),w}async $getSessions(p,c,l,n){const w=(await this.authenticationService.getSessions(p,[...c],!0)).filter(E=>this.authenticationService.isAccessAllowed(p,E.account.label,l));if(w.length){this.sendProviderUsageTelemetry(l,p);for(const E of w)(0,D.addAccountUsage)(this.storageService,p,E.account.label,l,n)}return w}sendProviderUsageTelemetry(p,c){this.telemetryService.publicLog2("authentication.providerUsage",{providerId:c,extensionId:p})}};e.MainThreadAuthentication=u,e.MainThreadAuthentication=u=fe([(0,b.extHostNamedCustomer)(f.MainContext.MainThreadAuthentication),O(1,T.IAuthenticationService),O(2,v.IDialogService),O(3,m.IStorageService),O(4,a.INotificationService),O(5,h.IQuickInputService),O(6,i.IExtensionService),O(7,s.ITelemetryService)],u)}),define(Q[746],Y([1,0,62,186,152,11,64,53,473,60]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reviveWorkspaceEditDto=e.MainThreadBulkEdits=void 0;let S=class{constructor(r,i,s,o){this._bulkEditService=i,this._logService=s,this._uriIdentService=o}dispose(){}$tryApplyWorkspaceEdit(r,i,s){const o=h(r,this._uriIdentService);return this._bulkEditService.apply(o,{undoRedoGroupId:i,respectAutoSaveConfig:s}).then(u=>u.isApplied,u=>(this._logService.warn(`IGNORING workspace edit: ${u}`),!1))}};e.MainThreadBulkEdits=S,e.MainThreadBulkEdits=S=fe([(0,m.extHostNamedCustomer)(f.MainContext.MainThreadBulkEdits),O(1,b.IBulkEditService),O(2,D.ILogService),O(3,T.IUriIdentityService)],S);function h(a,r,i){if(!a||!a.edits)return a;const s=(0,y.revive)(a);for(const o of s.edits){if(b.ResourceTextEdit.is(o)&&(o.resource=r.asCanonicalUri(o.resource)),b.ResourceFileEdit.is(o)){if(o.options){const u=o.options?.contents;if(u)if(u.type==="base64")o.options.contents=Promise.resolve((0,t.decodeBase64)(u.value));else if(i)o.options.contents=i(u.id);else throw new Error("Could not revive data transfer file")}o.newResource=o.newResource&&r.asCanonicalUri(o.newResource),o.oldResource=o.oldResource&&r.asCanonicalUri(o.oldResource)}v.ResourceNotebookCellEdit.is(o)&&(o.resource=r.asCanonicalUri(o.resource))}return a}e.reviveWorkspaceEditDto=h}),define(Q[3804],Y([1,0,14,6,4,186,10,53,233,606,607,234,60]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadChat=void 0;let r=class extends b.Disposable{constructor(s,o,u,d){super(),this._chatService=o,this._chatWidgetService=u,this.chatContribService=d,this._providerRegistrations=this._register(new b.DisposableMap),this._activeRequestProgressCallbacks=new Map,this._stateEmitters=new Map,this._responsePartHandlePool=0,this._activeResponsePartPromises=new Map,this._proxy=s.getProxy(f.ExtHostContext.ExtHostChat),this._register(this._chatService.onDidPerformUserAction(p=>{this._proxy.$onDidPerformUserAction(p)}))}$transferChatSession(s,o){const u=this._chatService.getSessionId(s);if(!u)throw new Error(`Failed to transfer session. Unknown session provider ID: ${s}`);const p=this._chatWidgetService.getWidgetBySessionId(u)?.inputEditor.getValue()??"";this._chatService.transferChatSession({sessionId:u,inputValue:p},T.URI.revive(o))}async $registerChatProvider(s,o){const u=this.chatContribService.registeredProviders.find(p=>p.id===o);if(!u)throw new Error(`Provider ${o} must be declared in the package.json.`);const d=this._chatService.registerProvider({id:o,displayName:u.label,prepareSession:async(p,c)=>{const l=await this._proxy.$prepareChat(s,p,c);if(!l)return;const n=l.responderAvatarIconUri?T.URI.revive(l.responderAvatarIconUri):u.extensionIcon,g=new y.Emitter;return this._stateEmitters.set(l.id,g),{id:l.id,requesterUsername:l.requesterUsername,requesterAvatarIconUri:T.URI.revive(l.requesterAvatarIconUri),responderUsername:l.responderUsername,responderAvatarIconUri:n,inputPlaceholder:l.inputPlaceholder,onDidChangeState:g.event,dispose:()=>{g.dispose(),this._stateEmitters.delete(l.id),this._proxy.$releaseSession(l.id)}}},resolveRequest:async(p,c,l)=>{const n=await this._proxy.$resolveRequest(s,p.id,c,l);return{session:p,...n}},provideReply:async(p,c,l)=>{const n=`${s}_${p.session.id}`;this._activeRequestProgressCallbacks.set(n,c);try{const g={message:p.message,variables:p.variables},w=await this._proxy.$provideReply(s,p.session.id,g,l);return{session:p.session,...w}}finally{this._activeRequestProgressCallbacks.delete(n)}},provideWelcomeMessage:p=>this._proxy.$provideWelcomeMessage(s,p),provideSlashCommands:(p,c)=>this._proxy.$provideSlashCommands(s,p.id,c),provideFollowups:(p,c)=>this._proxy.$provideFollowups(s,p.id,c),removeRequest:(p,c)=>this._proxy.$removeRequest(s,p.id,c)});this._providerRegistrations.set(s,d)}async $acceptResponseProgress(s,o,u,d){const p=`${s}_${o}`;if("placeholder"in u){const c=`${p}_${++this._responsePartHandlePool}`,l=new t.DeferredPromise;return this._activeResponsePartPromises.set(c,l),this._activeRequestProgressCallbacks.get(p)?.({...u,resolvedContent:l.p}),this._responsePartHandlePool}else if(d){const c=`${p}_${d}`,l=this._activeResponsePartPromises.get(c);if(l&&(0,S.isCompleteInteractiveProgressTreeData)(u)){const n=(0,D.revive)(u);l.complete(n),this._activeResponsePartPromises.delete(c)}else l&&"content"in u&&(l.complete(u.content),this._activeResponsePartPromises.delete(c));return}(0,S.isCompleteInteractiveProgressTreeData)(u)||this._activeRequestProgressCallbacks.get(p)?.(u)}async $acceptChatState(s,o){this._stateEmitters.get(s)?.fire(o)}$addRequest(s){this._chatService.addRequest(s)}async $sendRequestToProvider(s,o){const u=await this._chatWidgetService.revealViewForProvider(s);u&&u.viewModel&&this._chatService.sendRequestToProvider(u.viewModel.sessionId,o)}async $unregisterChatProvider(s){this._providerRegistrations.deleteAndDispose(s)}};e.MainThreadChat=r,e.MainThreadChat=r=fe([(0,a.extHostNamedCustomer)(f.MainContext.MainThreadChat),O(1,h.IChatService),O(2,v.IChatWidgetService),O(3,m.IChatContributionService)],r)}),define(Q[3805],Y([1,0,4,11,72,53,1263,60]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadChatProvider=void 0;let v=class{constructor(S,h,a){this._chatProviderService=h,this._logService=a,this._providerRegistrations=new t.DisposableMap,this._pendingProgress=new Map,this._proxy=S.getProxy(D.ExtHostContext.ExtHostChatProvider)}dispose(){this._providerRegistrations.dispose()}$registerProvider(S,h,a){const r=this._chatProviderService.registerChatResponseProvider(h,{metadata:a,provideChatResponse:async(i,s,o,u)=>{const d=Math.random()*1e6|0;this._pendingProgress.set(d,o);try{await this._proxy.$provideChatResponse(S,d,i,s,u)}finally{this._pendingProgress.delete(d)}}});this._providerRegistrations.set(S,r)}async $handleProgressChunk(S,h){this._pendingProgress.get(S)?.report(h)}$unregisterProvider(S){this._providerRegistrations.deleteAndDispose(S)}async $fetchResponse(S,h,a,r,i,s){this._logService.debug("[CHAT] extension request STARTED",S.value,a);const o=this._chatProviderService.fetchChatResponse(h,r,i,new b.Progress(u=>{this._proxy.$handleResponseFragment(a,u)}),s);return o.catch(u=>{this._logService.error("[CHAT] extension request ERRORED",u,S.value,a)}).finally(()=>{this._logService.debug("[CHAT] extension request DONE",S.value,a)}),o}};e.MainThreadChatProvider=v,e.MainThreadChatProvider=v=fe([(0,f.extHostNamedCustomer)(D.MainContext.MainThreadChatProvider),O(1,T.IChatProviderService),O(2,y.ILogService)],v)}),define(Q[3806],Y([1,0,4,53,959,60]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadChatSlashCommands=void 0;let T=class{constructor(v,m){this._chatSlashCommandService=m,this._commands=new t.DisposableMap,this._pendingProgress=new Map,this._proxy=v.getProxy(y.ExtHostContext.ExtHostChatSlashCommands)}dispose(){this._commands.clearAndDisposeAll()}$registerCommand(v,m,S){this._chatSlashCommandService.hasCommand(m)||this._chatSlashCommandService.registerSlashData({command:m,detail:S});const h=this._chatSlashCommandService.registerSlashCallback(m,async(a,r,i,s)=>{const o=Math.random();this._pendingProgress.set(o,r);try{await this._proxy.$executeCommand(v,o,a,{history:i},s)}finally{this._pendingProgress.delete(o)}});this._commands.set(v,h)}async $handleProgressChunk(v,m){this._pendingProgress.get(v)?.report(m)}$unregisterCommand(v){this._commands.deleteAndDispose(v)}};e.MainThreadChatSlashCommands=T,e.MainThreadChatSlashCommands=T=fe([(0,D.extHostNamedCustomer)(y.MainContext.MainThreadChatSlashCommands),O(1,b.IChatSlashCommandService)],T)}),define(Q[3807],Y([1,0,4,53,608,60]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadChatSlashCommands=void 0;let T=class{constructor(v,m){this._chatVariablesService=m,this._variables=new t.DisposableMap,this._proxy=v.getProxy(y.ExtHostContext.ExtHostChatVariables)}dispose(){this._variables.clearAndDisposeAll()}$registerVariable(v,m){const S=this._chatVariablesService.registerVariable(m,(h,a,r,i)=>this._proxy.$resolveVariable(v,h,i));this._variables.set(v,S)}$unregisterVariable(v){this._variables.deleteAndDispose(v)}};e.MainThreadChatSlashCommands=T,e.MainThreadChatSlashCommands=T=fe([(0,D.extHostNamedCustomer)(y.MainContext.MainThreadChatVariables),O(1,b.IChatVariablesService)],T)}),define(Q[3808],Y([1,0,60,53,68]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadClipboard=void 0;let D=class{constructor(f,v){this._clipboardService=v}dispose(){}$readText(){return this._clipboardService.readText()}$writeText(f){return this._clipboardService.writeText(f)}};e.MainThreadClipboard=D,e.MainThreadClipboard=D=fe([(0,t.extHostNamedCustomer)(y.MainContext.MainThreadClipboard),O(1,b.IClipboardService)],D)}),define(Q[3809],Y([1,0,4,186,28,60,44,474,53]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadCommands=void 0;let m=class{constructor(a,r,i){this._commandService=r,this._extensionService=i,this._commandRegistrations=new t.DisposableMap,this._proxy=a.getProxy(v.ExtHostContext.ExtHostCommands),this._generateCommandsDocumentationRegistration=b.CommandsRegistry.registerCommand("_generateCommandsDocumentation",()=>this._generateCommandsDocumentation())}dispose(){this._commandRegistrations.dispose(),this._generateCommandsDocumentationRegistration.dispose()}async _generateCommandsDocumentation(){const a=await this._proxy.$getContributedCommandHandlerDescriptions(),r=b.CommandsRegistry.getCommands();for(const[s,o]of r)o.description&&(a[s]=o.description);const i=[];for(const s in a)i.push("`"+s+"` - "+S(a[s]));console.log(i.join(` `))}$registerCommand(a){this._commandRegistrations.set(a,b.CommandsRegistry.registerCommand(a,(r,...i)=>this._proxy.$executeContributedCommand(a,...i).then(s=>(0,y.revive)(s))))}$unregisterCommand(a){this._commandRegistrations.deleteAndDispose(a)}$fireCommandActivationEvent(a){const r=`onCommand:${a}`;this._extensionService.activationEventIsDone(r)||this._extensionService.activateByEvent(r)}async $executeCommand(a,r,i){r instanceof f.SerializableObjectWithBuffers&&(r=r.value);for(let s=0;s<r.length;s++)r[s]=(0,y.revive)(r[s]);if(i&&r.length>0&&!b.CommandsRegistry.getCommand(a))throw await this._extensionService.activateByEvent(`onCommand:${a}`),new Error("$executeCommand:retry");return this._commandService.executeCommand(a,...r)}$getCommands(){return Promise.resolve([...b.CommandsRegistry.getCommands().keys()])}};e.MainThreadCommands=m,e.MainThreadCommands=m=fe([(0,D.extHostNamedCustomer)(v.MainContext.MainThreadCommands),O(1,b.ICommandService),O(2,T.IExtensionService)],m);function S(h){if(typeof h=="string")return h;{const a=[h.description];if(a.push(` `),h.args)for(const r of h.args)a.push(`* _${r.name}_ - ${r.description||""} `);return h.returns&&a.push(`* _(returns)_ - ${h.returns}`),a.push(` `),a.join("")}}}),define(Q[3810],Y([1,0,10,16,56,39,53,60,9,91]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadConfiguration=void 0;let S=class{constructor(a,r,i,s){this._workspaceContextService=r,this.configurationService=i,this._environmentService=s;const o=a.getProxy(T.ExtHostContext.ExtHostConfiguration);o.$initializeConfiguration(this._getConfigurationData()),this._configurationListener=i.onDidChangeConfiguration(u=>{o.$acceptConfigurationChanged(this._getConfigurationData(),u.change)})}_getConfigurationData(){const a={...this.configurationService.getConfigurationData(),configurationScopes:[]};return(!this._environmentService.isBuilt||this._environmentService.isExtensionDevelopment)&&(a.configurationScopes=(0,b.getScopes)()),a}dispose(){this._configurationListener.dispose()}$updateConfigurationOption(a,r,i,s,o){return s={resource:s?.resource?t.URI.revive(s.resource):void 0,overrideIdentifier:s?.overrideIdentifier},this.writeConfiguration(a,r,i,s,o)}$removeConfigurationOption(a,r,i,s){return i={resource:i?.resource?t.URI.revive(i.resource):void 0,overrideIdentifier:i?.overrideIdentifier},this.writeConfiguration(a,r,void 0,i,s)}writeConfiguration(a,r,i,s,o){a=a??this.deriveConfigurationTarget(r,s);const u=this.configurationService.inspect(r,s);switch(a){case 8:return this._updateValue(r,i,a,u?.memory?.override,s,o);case 6:return this._updateValue(r,i,a,u?.workspaceFolder?.override,s,o);case 5:return this._updateValue(r,i,a,u?.workspace?.override,s,o);case 4:return this._updateValue(r,i,a,u?.userRemote?.override,s,o);default:return this._updateValue(r,i,a,u?.userLocal?.override,s,o)}}_updateValue(a,r,i,s,o,u){return o=u===!0?o:u===!1?{resource:o.resource}:o.overrideIdentifier&&s!==void 0?o:{resource:o.resource},this.configurationService.updateValue(a,r,o,i,{donotNotifyError:!0})}deriveConfigurationTarget(a,r){if(r.resource&&this._workspaceContextService.getWorkbenchState()===3){const i=y.Registry.as(b.Extensions.Configuration).getConfigurationProperties();if(i[a]&&(i[a].scope===4||i[a].scope===5))return 6}return 5}};e.MainThreadConfiguration=S,e.MainThreadConfiguration=S=fe([(0,f.extHostNamedCustomer)(T.MainContext.MainThreadConfiguration),O(1,D.IWorkspaceContextService),O(2,v.IConfigurationService),O(3,m.IEnvironmentService)],S)}),define(Q[3811],Y([1,0,10,6,4,53,60,382,31]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDecorations=void 0;class m{constructor(a,r){this._proxy=a,this._handle=r,this._idPool=0,this._requests=new Map,this._resolver=new Map}enqueue(a,r){const i=++this._idPool,s=new Promise(u=>{this._requests.set(i,{id:i,uri:a}),this._resolver.set(i,u),this._processQueue()}),o=r.onCancellationRequested(()=>{this._requests.delete(i),this._resolver.delete(i)});return s.finally(()=>o.dispose())}_processQueue(){typeof this._timer!="number"&&(this._timer=setTimeout(()=>{const a=this._requests,r=this._resolver;this._proxy.$provideDecorations(this._handle,[...a.values()],v.CancellationToken.None).then(i=>{for(const[s,o]of r)o(i[s])}),this._requests=new Map,this._resolver=new Map,this._timer=void 0},0))}}let S=class{constructor(a,r){this._decorationsService=r,this._provider=new Map,this._proxy=a.getProxy(D.ExtHostContext.ExtHostDecorations)}dispose(){this._provider.forEach(a=>(0,b.dispose)(a)),this._provider.clear()}$registerDecorationProvider(a,r){const i=new y.Emitter,s=new m(this._proxy,a),o=this._decorationsService.registerDecorationsProvider({label:r,onDidChange:i.event,provideDecorations:async(u,d)=>{const p=await s.enqueue(u,d);if(!p)return;const[c,l,n,g]=p;return{weight:10,bubble:c??!1,color:g?.id,tooltip:l,letter:n}}});this._provider.set(a,[i,o])}$onDidChange(a,r){const i=this._provider.get(a);if(i){const[s]=i;s.fire(r&&r.map(o=>t.URI.revive(o)))}}$unregisterDecorationProvider(a){const r=this._provider.get(a);r&&((0,b.dispose)(r),this._provider.delete(a))}};e.MainThreadDecorations=S,e.MainThreadDecorations=S=fe([(0,T.extHostNamedCustomer)(D.MainContext.MainThreadDecorations),O(1,f.IDecorationsService)],S)}),define(Q[3812],Y([1,0,154,10,53,60,64]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDiagnostics=void 0;let f=class{constructor(m,S,h){this._markerService=S,this._uriIdentService=h,this._activeOwners=new Set,this._proxy=m.getProxy(b.ExtHostContext.ExtHostDiagnostics),this._markerListener=this._markerService.onMarkerChanged(this._forwardMarkers,this)}dispose(){this._markerListener.dispose(),this._activeOwners.forEach(m=>this._markerService.changeAll(m,[])),this._activeOwners.clear()}_forwardMarkers(m){const S=[];for(const h of m){const a=this._markerService.read({resource:h});if(a.length===0)S.push([h,[]]);else{const r=a.filter(i=>!this._activeOwners.has(i.owner));r.length>0&&S.push([h,r])}}S.length>0&&this._proxy.$acceptMarkersChange(S)}$changeMany(m,S){for(const h of S){const[a,r]=h;if(r)for(const i of r){if(i.relatedInformation)for(const s of i.relatedInformation)s.resource=y.URI.revive(s.resource);i.code&&typeof i.code!="string"&&(i.code.target=y.URI.revive(i.code.target))}this._markerService.changeOne(m,this._uriIdentService.asCanonicalUri(y.URI.revive(a)),r)}this._activeOwners.add(m)}$clear(m){this._markerService.changeAll(m,[]),this._activeOwners.delete(m)}};e.MainThreadDiagnostics=f,e.MainThreadDiagnostics=f=fe([(0,D.extHostNamedCustomer)(b.MainContext.MainThreadDiagnostics),O(1,t.IMarkerService),O(2,T.IUriIdentityService)],f)}),define(Q[3813],Y([1,0,10,53,60,49,22]),function(q,e,t,y,b,D,T){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDialogs=void 0;let v=f=class{constructor(S,h){this._fileDialogService=h}dispose(){}async $showOpenDialog(S){const h=f._convertOpenOptions(S);return h.defaultUri||(h.defaultUri=await this._fileDialogService.defaultFilePath()),Promise.resolve(this._fileDialogService.showOpenDialog(h))}async $showSaveDialog(S){const h=f._convertSaveOptions(S);return h.defaultUri||(h.defaultUri=await this._fileDialogService.defaultFilePath()),Promise.resolve(this._fileDialogService.showSaveDialog(h))}static _convertOpenOptions(S){const h={openLabel:S?.openLabel||void 0,canSelectFiles:S?.canSelectFiles||!S?.canSelectFiles&&!S?.canSelectFolders,canSelectFolders:S?.canSelectFolders,canSelectMany:S?.canSelectMany,defaultUri:S?.defaultUri?t.URI.revive(S.defaultUri):void 0,title:S?.title||void 0,availableFileSystems:S?.allowUIResources?[T.Schemas.vscodeRemote,T.Schemas.file]:[]};if(S?.filters){h.filters=[];for(const[a,r]of Object.entries(S.filters))h.filters.push({name:a,extensions:r})}return h}static _convertSaveOptions(S){const h={defaultUri:S?.defaultUri?t.URI.revive(S.defaultUri):void 0,saveLabel:S?.saveLabel||void 0,title:S?.title||void 0};if(S?.filters){h.filters=[];for(const[a,r]of Object.entries(S.filters))h.filters.push({name:a,extensions:r})}return h}};e.MainThreadDialogs=v,e.MainThreadDialogs=v=f=fe([(0,b.extHostNamedCustomer)(y.MainContext.MainThreadDialogs),O(1,D.IFileDialogService)],v)}),define(Q[3814],Y([1,0,15,4,10,165,27,242,57,50,75,60,53,31]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDocumentContentProviders=void 0;let i=class{constructor(o,u,d,p,c){this._textModelResolverService=u,this._languageService=d,this._modelService=p,this._editorWorkerService=c,this._resourceContentProvider=new y.DisposableMap,this._pendingUpdate=new Map,this._proxy=o.getProxy(a.ExtHostContext.ExtHostDocumentContentProviders)}dispose(){this._resourceContentProvider.dispose(),(0,y.dispose)(this._pendingUpdate.values())}$registerTextContentProvider(o,u){const d=this._textModelResolverService.registerTextModelContentProvider(u,{provideTextContent:p=>this._proxy.$provideTextDocumentContent(o,p).then(c=>{if(typeof c=="string"){const l=c.substr(0,1+c.search(/\r?\n/)),n=this._languageService.createByFilepathOrFirstLine(p,l);return this._modelService.createModel(c,n,p)}return null})});this._resourceContentProvider.set(o,d)}$unregisterTextContentProvider(o){this._resourceContentProvider.deleteAndDispose(o)}$onVirtualDocumentChange(o,u){const d=this._modelService.getModel(b.URI.revive(o));if(!d)return;this._pendingUpdate.get(d.id)?.cancel();const c=new r.CancellationTokenSource;this._pendingUpdate.set(d.id,c),this._editorWorkerService.computeMoreMinimalEdits(d.uri,[{text:u,range:d.getFullModelRange()}]).then(l=>{this._pendingUpdate.delete(d.id),!c.token.isCancellationRequested&&l&&l.length>0&&d.applyEdits(l.map(n=>D.EditOperation.replace(T.Range.lift(n.range),n.text)))}).catch(t.onUnexpectedError)}};e.MainThreadDocumentContentProviders=i,e.MainThreadDocumentContentProviders=i=fe([(0,h.extHostNamedCustomer)(a.MainContext.MainThreadDocumentContentProviders),O(1,S.ITextModelService),O(2,m.ILanguageService),O(3,v.IModelService),O(4,f.IEditorWorkerService)],i)}),define(Q[3815],Y([1,0,4,53,60,587,10]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDownloadService=void 0;let f=class extends t.Disposable{constructor(m,S){super(),this.downloadService=S}$download(m,S){return this.downloadService.download(T.URI.revive(m),T.URI.revive(S))}};e.MainThreadDownloadService=f,e.MainThreadDownloadService=f=fe([(0,b.extHostNamedCustomer)(y.MainContext.MainThreadDownloadService),O(1,D.IDownloadService)],f)}),define(Q[3816],Y([1,0,2503,5,60,14,600,53]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditSessionIdentityCreateParticipant=void 0;class v{constructor(h){this.timeout=1e4,this._proxy=h.getProxy(f.ExtHostContext.ExtHostWorkspace)}async participate(h,a){const r=new Promise((i,s)=>{setTimeout(()=>s(new Error((0,t.localize)(0,null))),this.timeout),this._proxy.$onWillCreateEditSessionIdentity(h.uri,a,this.timeout).then(i,s)});return(0,D.raceCancellationError)(r,a)}}let m=class{constructor(h,a,r){this._editSessionIdentityService=r,this._saveParticipantDisposable=this._editSessionIdentityService.addEditSessionIdentityCreateParticipant(a.createInstance(v,h))}dispose(){this._saveParticipantDisposable.dispose()}};e.EditSessionIdentityCreateParticipant=m,e.EditSessionIdentityCreateParticipant=m=fe([b.extHostCustomer,O(1,y.IInstantiationService),O(2,T.IEditSessionIdentityService)],m)}),define(Q[1363],Y([1,0,6,4,133,27,96,210,53,20,348,304]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTextEditor=e.MainThreadTextEditorProperties=void 0;class a{static readFromEditor(s,o,u){const d=a._readSelectionsFromCodeEditor(s,u),p=a._readOptionsFromCodeEditor(s,o,u),c=a._readVisibleRangesFromCodeEditor(s,u);return new a(d,p,c)}static _readSelectionsFromCodeEditor(s,o){let u=null;return o&&(u=o.getSelections()),!u&&s&&(u=s.selections),u||(u=[new T.Selection(1,1,1,1)]),u}static _readOptionsFromCodeEditor(s,o,u){if(o.isDisposed()){if(s)return s.options;throw new Error("No valid properties")}let d,p;if(u){const l=u.getOptions(),n=l.get(66);d=l.get(27),p=n.renderType}else s?(d=s.options.cursorStyle,p=s.options.lineNumbers):(d=b.TextEditorCursorStyle.Line,p=1);const c=o.getOptions();return{insertSpaces:c.insertSpaces,tabSize:c.tabSize,indentSize:c.indentSize,cursorStyle:d,lineNumbers:p}}static _readVisibleRangesFromCodeEditor(s,o){return o?o.getVisibleRanges():[]}constructor(s,o,u){this.selections=s,this.options=o,this.visibleRanges=u}generateDelta(s,o){const u={options:null,selections:null,visibleRanges:null};return(!s||!a._selectionsEqual(s.selections,this.selections))&&(u.selections={selections:this.selections,source:o??void 0}),(!s||!a._optionsEqual(s.options,this.options))&&(u.options=this.options),(!s||!a._rangesEqual(s.visibleRanges,this.visibleRanges))&&(u.visibleRanges=this.visibleRanges),u.selections||u.options||u.visibleRanges?u:null}static _selectionsEqual(s,o){return(0,m.equals)(s,o,(u,d)=>u.equalsSelection(d))}static _rangesEqual(s,o){return(0,m.equals)(s,o,(u,d)=>u.equalsRange(d))}static _optionsEqual(s,o){return s&&!o||!s&&o?!1:!s&&!o?!0:s.tabSize===o.tabSize&&s.indentSize===o.indentSize&&s.insertSpaces===o.insertSpaces&&s.cursorStyle===o.cursorStyle&&s.lineNumbers===o.lineNumbers}}e.MainThreadTextEditorProperties=a;class r{constructor(s,o,u,d,p,c,l){this._modelListeners=new y.DisposableStore,this._codeEditorListeners=new y.DisposableStore,this._id=s,this._model=o,this._codeEditor=null,this._properties=null,this._focusTracker=d,this._mainThreadDocuments=p,this._modelService=c,this._clipboardService=l,this._onPropertiesChanged=new t.Emitter,this._modelListeners.add(this._model.onDidChangeOptions(n=>{this._updatePropertiesNow(null)})),this.setCodeEditor(u),this._updatePropertiesNow(null)}dispose(){this._modelListeners.dispose(),this._codeEditor=null,this._codeEditorListeners.dispose()}_updatePropertiesNow(s){this._setProperties(a.readFromEditor(this._properties,this._model,this._codeEditor),s)}_setProperties(s,o){const u=s.generateDelta(this._properties,o);this._properties=s,u&&this._onPropertiesChanged.fire(u)}getId(){return this._id}getModel(){return this._model}getCodeEditor(){return this._codeEditor}hasCodeEditor(s){return this._codeEditor===s}setCodeEditor(s){if(!this.hasCodeEditor(s)&&(this._codeEditorListeners.clear(),this._codeEditor=s,this._codeEditor)){this._codeEditorListeners.add(this._codeEditor.onDidChangeModel(()=>{this.setCodeEditor(null)})),this._codeEditorListeners.add(this._codeEditor.onDidFocusEditorWidget(()=>{this._focusTracker.onGainedFocus()})),this._codeEditorListeners.add(this._codeEditor.onDidBlurEditorWidget(()=>{this._focusTracker.onLostFocus()}));let o=null;this._codeEditorListeners.add(this._mainThreadDocuments.onIsCaughtUpWithContentChanges(p=>{if(p.toString()===this._model.uri.toString()){const c=o;o=null,this._updatePropertiesNow(c)}}));const u=()=>this._codeEditor&&this._codeEditor.getModel()===this._model,d=p=>{this._mainThreadDocuments.isCaughtUpWithContentChanges(this._model.uri)?(o=null,this._updatePropertiesNow(p)):o=p};this._codeEditorListeners.add(this._codeEditor.onDidChangeCursorSelection(p=>{u()&&d(p.source)})),this._codeEditorListeners.add(this._codeEditor.onDidChangeConfiguration(p=>{u()&&d(null)})),this._codeEditorListeners.add(this._codeEditor.onDidLayoutChange(()=>{u()&&d(null)})),this._codeEditorListeners.add(this._codeEditor.onDidScrollChange(()=>{u()&&d(null)})),this._updatePropertiesNow(null)}}isVisible(){return!!this._codeEditor}getProperties(){return this._properties}get onPropertiesChanged(){return this._onPropertiesChanged.event}setSelections(s){if(this._codeEditor){this._codeEditor.setSelections(s);return}const o=s.map(T.Selection.liftSelection);this._setProperties(new a(o,this._properties.options,this._properties.visibleRanges),null)}_setIndentConfiguration(s){const o=this._modelService.getCreationOptions(this._model.getLanguageId(),this._model.uri,this._model.isForSimpleWidget);if(s.tabSize==="auto"||s.insertSpaces==="auto"){let d=o.insertSpaces,p=o.tabSize;s.insertSpaces!=="auto"&&typeof s.insertSpaces<"u"&&(d=s.insertSpaces),s.tabSize!=="auto"&&typeof s.tabSize<"u"&&(p=s.tabSize),this._model.detectIndentation(d,p);return}const u={};typeof s.insertSpaces<"u"&&(u.insertSpaces=s.insertSpaces),typeof s.tabSize<"u"&&(u.tabSize=s.tabSize),typeof s.indentSize<"u"&&(u.indentSize=s.indentSize),this._model.updateOptions(u)}setConfiguration(s){if(this._setIndentConfiguration(s),!!this._codeEditor){if(s.cursorStyle){const o=(0,b.cursorStyleToString)(s.cursorStyle);this._codeEditor.updateOptions({cursorStyle:o})}if(typeof s.lineNumbers<"u"){let o;switch(s.lineNumbers){case 1:o="on";break;case 2:o="relative";break;default:o="off"}this._codeEditor.updateOptions({lineNumbers:o})}}}setDecorations(s,o){this._codeEditor&&this._codeEditor.setDecorationsByType("exthost-api",s,o)}setDecorationsFast(s,o){if(!this._codeEditor)return;const u=[];for(let d=0,p=Math.floor(o.length/4);d<p;d++)u[d]=new D.Range(o[4*d],o[4*d+1],o[4*d+2],o[4*d+3]);this._codeEditor.setDecorationsByTypeFast(s,u)}revealRange(s,o){if(this._codeEditor)switch(o){case v.TextEditorRevealType.Default:this._codeEditor.revealRange(s,0);break;case v.TextEditorRevealType.InCenter:this._codeEditor.revealRangeInCenter(s,0);break;case v.TextEditorRevealType.InCenterIfOutsideViewport:this._codeEditor.revealRangeInCenterIfOutsideViewport(s,0);break;case v.TextEditorRevealType.AtTop:this._codeEditor.revealRangeAtTop(s,0);break;default:console.warn(`Unknown revealType: ${o}`);break}}isFocused(){return this._codeEditor?this._codeEditor.hasTextFocus():!1}matches(s){return s?s.getControl()===this._codeEditor:!1}applyEdits(s,o,u){if(this._model.getVersionId()!==s||!this._codeEditor)return!1;typeof u.setEndOfLine<"u"&&this._model.pushEOL(u.setEndOfLine);const d=o.map(p=>({range:D.Range.lift(p.range),text:p.text,forceMoveMarkers:p.forceMoveMarkers}));return u.undoStopBefore&&this._codeEditor.pushUndoStop(),this._codeEditor.executeEdits("MainThreadTextEditor",d),u.undoStopAfter&&this._codeEditor.pushUndoStop(),!0}async insertSnippet(s,o,u,d){if(!this._codeEditor||!this._codeEditor.hasModel())return!1;let p;if(h.SnippetParser.guessNeedsClipboard(o)){const g=new S.EditorState(this._codeEditor,5);if(p=await this._clipboardService.readText(),!g.validate(this._codeEditor))return!1}if(this._codeEditor.getModel().getVersionId()!==s)return!1;const l=f.SnippetController2.get(this._codeEditor);if(!l)return!1;const n=u.map(g=>new T.Selection(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn));return this._codeEditor.setSelections(n),this._codeEditor.focus(),l.insert(o,{overwriteBefore:0,overwriteAfter:0,undoStopBefore:d.undoStopBefore,undoStopAfter:d.undoStopAfter,clipboardText:p}),!0}}e.MainThreadTextEditor=r}),define(Q[3817],Y([1,0,15,60,53]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadErrors=void 0;let D=class{dispose(){}$onUnexpectedError(f){if(f&&f.$isError){const{name:v,message:m,stack:S}=f;f=f.noTelemetry?new t.ErrorNoTelemetry:new Error,f.message=m,f.name=v,f.stack=S}(0,t.onUnexpectedError)(f)}};e.MainThreadErrors=D,e.MainThreadErrors=D=fe([(0,y.extHostNamedCustomer)(b.MainContext.MainThreadErrors)],D)}),define(Q[3818],Y([1,0,4,146,53,917]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadInteractive=void 0;let T=class{constructor(v,m){this._disposables=new t.DisposableStore,this._proxy=v.getProxy(b.ExtHostContext.ExtHostInteractive),this._disposables.add(m.onWillAddInteractiveDocument(S=>{this._proxy.$willAddInteractiveDocument(S.inputUri,` `,y.PLAINTEXT_LANGUAGE_ID,S.notebookUri)})),this._disposables.add(m.onWillRemoveInteractiveDocument(S=>{this._proxy.$willRemoveInteractiveDocument(S.inputUri,S.notebookUri)}))}dispose(){this._disposables.dispose()}};e.MainThreadInteractive=T,e.MainThreadInteractive=T=fe([O(1,D.IInteractiveDocumentService)],T)}),define(Q[3819],Y([1,0,60,53,503]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadKeytar=void 0;let D=class{constructor(f,v){this._credentialsService=v}async $getPassword(f,v){return this._credentialsService.getPassword(f,v)}async $setPassword(f,v,m){return this._credentialsService.setPassword(f,v,m)}async $deletePassword(f,v){return this._credentialsService.deletePassword(f,v)}async $findPassword(f){return this._credentialsService.findPassword(f)}async $findCredentials(f){return this._credentialsService.findCredentials(f)}dispose(){}};e.MainThreadKeytar=D,e.MainThreadKeytar=D=fe([(0,t.extHostNamedCustomer)(y.MainContext.MainThreadKeytar),O(1,b.ICredentialsService)],D)}),define(Q[3820],Y([1,0,4,61,53,60]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadLabelService=void 0;let T=class extends t.Disposable{constructor(v,m){super(),this._labelService=m,this._resourceLabelFormatters=this._register(new t.DisposableMap)}$registerResourceLabelFormatter(v,m){m.priority=!0;const S=this._labelService.registerCachedFormatter(m);this._resourceLabelFormatters.set(v,S)}$unregisterResourceLabelFormatter(v){this._resourceLabelFormatters.deleteAndDispose(v)}};e.MainThreadLabelService=T,e.MainThreadLabelService=T=fe([(0,D.extHostNamedCustomer)(b.MainContext.MainThreadLabelService),O(1,y.ILabelService)],T)}),define(Q[3821],Y([1,0,365,15,6,4,186,42,10,50,125,74,1130,64,746,1339,1248,912,361,941,60,53]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadMappedEditsProvider=e.MainThreadDocumentRangeSemanticTokensProvider=e.MainThreadDocumentSemanticTokensProvider=e.MainThreadLanguageFeatures=void 0;let g=n=class extends D.Disposable{constructor(k,L,R,M,N){if(super(),this._languageService=L,this._languageConfigurationService=R,this._languageFeaturesService=M,this._uriIdentService=N,this._registrations=this._register(new D.DisposableMap),this._pasteEditProviders=new Map,this._documentOnDropEditProviders=new Map,this._proxy=k.getProxy(l.ExtHostContext.ExtHostLanguageFeatures),this._languageService){const P=()=>{const x=[];for(const F of L.getRegisteredLanguageIds()){const V=this._languageConfigurationService.getLanguageConfiguration(F).getWordDefinition();x.push({languageId:F,regexSource:V.source,regexFlags:V.flags})}this._proxy.$setWordDefinitions(x)};this._languageConfigurationService.onDidChange(x=>{if(!x.languageId)P();else{const F=this._languageConfigurationService.getLanguageConfiguration(x.languageId).getWordDefinition();this._proxy.$setWordDefinitions([{languageId:x.languageId,regexSource:F.source,regexFlags:F.flags}])}}),P()}}$unregister(k){this._registrations.deleteAndDispose(k)}static _reviveLocationDto(k){return k&&(Array.isArray(k)?(k.forEach(L=>n._reviveLocationDto(L)),k):(k.uri=v.URI.revive(k.uri),k))}static _reviveLocationLinkDto(k){return k&&(Array.isArray(k)?(k.forEach(L=>n._reviveLocationLinkDto(L)),k):(k.uri=v.URI.revive(k.uri),k))}static _reviveWorkspaceSymbolDto(k){return k&&(Array.isArray(k)?(k.forEach(n._reviveWorkspaceSymbolDto),k):(k.location=n._reviveLocationDto(k.location),k))}static _reviveCodeActionDto(k,L){return k?.forEach(R=>(0,i.reviveWorkspaceEditDto)(R.edit,L)),k}static _reviveLinkDTO(k){return k.url&&typeof k.url!="string"&&(k.url=v.URI.revive(k.url)),k}static _reviveCallHierarchyItemDto(k){return k&&(k.uri=v.URI.revive(k.uri)),k}static _reviveTypeHierarchyItemDto(k){return k&&(k.uri=v.URI.revive(k.uri)),k}$registerDocumentSymbolProvider(k,L,R){this._registrations.set(k,this._languageFeaturesService.documentSymbolProvider.register(L,{displayName:R,provideDocumentSymbols:(M,N)=>this._proxy.$provideDocumentSymbols(k,M.uri,N)}))}$registerCodeLensSupport(k,L,R){const M={provideCodeLenses:async(N,P)=>{const x=await this._proxy.$provideCodeLenses(k,N.uri,P);if(x)return{lenses:x.lenses,dispose:()=>x.cacheId&&this._proxy.$releaseCodeLenses(k,x.cacheId)}},resolveCodeLens:async(N,P,x)=>{const F=await this._proxy.$resolveCodeLens(k,P,x);if(F)return{...F,range:N.validateRange(F.range)}}};if(typeof R=="number"){const N=new b.Emitter;this._registrations.set(R,N),M.onDidChange=N.event}this._registrations.set(k,this._languageFeaturesService.codeLensProvider.register(L,M))}$emitCodeLensEvent(k,L){const R=this._registrations.get(k);R instanceof b.Emitter&&R.fire(L)}$registerDefinitionSupport(k,L){this._registrations.set(k,this._languageFeaturesService.definitionProvider.register(L,{provideDefinition:(R,M,N)=>this._proxy.$provideDefinition(k,R.uri,M,N).then(n._reviveLocationLinkDto)}))}$registerDeclarationSupport(k,L){this._registrations.set(k,this._languageFeaturesService.declarationProvider.register(L,{provideDeclaration:(R,M,N)=>this._proxy.$provideDeclaration(k,R.uri,M,N).then(n._reviveLocationLinkDto)}))}$registerImplementationSupport(k,L){this._registrations.set(k,this._languageFeaturesService.implementationProvider.register(L,{provideImplementation:(R,M,N)=>this._proxy.$provideImplementation(k,R.uri,M,N).then(n._reviveLocationLinkDto)}))}$registerTypeDefinitionSupport(k,L){this._registrations.set(k,this._languageFeaturesService.typeDefinitionProvider.register(L,{provideTypeDefinition:(R,M,N)=>this._proxy.$provideTypeDefinition(k,R.uri,M,N).then(n._reviveLocationLinkDto)}))}$registerHoverProvider(k,L){this._registrations.set(k,this._languageFeaturesService.hoverProvider.register(L,{provideHover:(R,M,N)=>this._proxy.$provideHover(k,R.uri,M,N)}))}$registerEvaluatableExpressionProvider(k,L){this._registrations.set(k,this._languageFeaturesService.evaluatableExpressionProvider.register(L,{provideEvaluatableExpression:(R,M,N)=>this._proxy.$provideEvaluatableExpression(k,R.uri,M,N)}))}$registerInlineValuesProvider(k,L,R){const M={provideInlineValues:(N,P,x,F)=>this._proxy.$provideInlineValues(k,N.uri,P,x,F)};if(typeof R=="number"){const N=new b.Emitter;this._registrations.set(R,N),M.onDidChangeInlineValues=N.event}this._registrations.set(k,this._languageFeaturesService.inlineValuesProvider.register(L,M))}$emitInlineValuesEvent(k,L){const R=this._registrations.get(k);R instanceof b.Emitter&&R.fire(L)}$registerDocumentHighlightProvider(k,L){this._registrations.set(k,this._languageFeaturesService.documentHighlightProvider.register(L,{provideDocumentHighlights:(R,M,N)=>this._proxy.$provideDocumentHighlights(k,R.uri,M,N)}))}$registerLinkedEditingRangeProvider(k,L){this._registrations.set(k,this._languageFeaturesService.linkedEditingRangeProvider.register(L,{provideLinkedEditingRanges:async(R,M,N)=>{const P=await this._proxy.$provideLinkedEditingRanges(k,R.uri,M,N);if(P)return{ranges:P.ranges,wordPattern:P.wordPattern?n._reviveRegExp(P.wordPattern):void 0}}}))}$registerReferenceSupport(k,L){this._registrations.set(k,this._languageFeaturesService.referenceProvider.register(L,{provideReferences:(R,M,N,P)=>this._proxy.$provideReferences(k,R.uri,M,N,P).then(n._reviveLocationDto)}))}$registerQuickFixSupport(k,L,R,M,N){const P={provideCodeActions:async(x,F,V,W)=>{const z=await this._proxy.$provideCodeActions(k,x.uri,F,V,W);if(z)return{actions:n._reviveCodeActionDto(z.actions,this._uriIdentService),dispose:()=>{typeof z.cacheId=="number"&&this._proxy.$releaseCodeActions(k,z.cacheId)}}},providedCodeActionKinds:R.providedKinds,documentation:R.documentation,displayName:M};N&&(P.resolveCodeAction=async(x,F)=>{const V=await this._proxy.$resolveCodeAction(k,x.cacheId,F);return V.edit&&(x.edit=(0,i.reviveWorkspaceEditDto)(V.edit,this._uriIdentService)),V.command&&(x.command=V.command),x}),this._registrations.set(k,this._languageFeaturesService.codeActionProvider.register(L,P))}$registerPasteEditProvider(k,L,R,M){const N=new w(k,this._proxy,R,M,this._uriIdentService);this._pasteEditProviders.set(k,N),this._registrations.set(k,(0,D.combinedDisposable)(this._languageFeaturesService.documentPasteEditProvider.register(L,N),(0,D.toDisposable)(()=>this._pasteEditProviders.delete(k))))}$resolvePasteFileData(k,L,R){const M=this._pasteEditProviders.get(k);if(!M)throw new Error("Could not find provider");return M.resolveFileData(L,R)}$registerDocumentFormattingSupport(k,L,R,M){this._registrations.set(k,this._languageFeaturesService.documentFormattingEditProvider.register(L,{extensionId:R,displayName:M,provideDocumentFormattingEdits:(N,P,x)=>this._proxy.$provideDocumentFormattingEdits(k,N.uri,P,x)}))}$registerRangeFormattingSupport(k,L,R,M,N){this._registrations.set(k,this._languageFeaturesService.documentRangeFormattingEditProvider.register(L,{extensionId:R,displayName:M,provideDocumentRangeFormattingEdits:(P,x,F,V)=>this._proxy.$provideDocumentRangeFormattingEdits(k,P.uri,x,F,V),provideDocumentRangesFormattingEdits:N?(P,x,F,V)=>this._proxy.$provideDocumentRangesFormattingEdits(k,P.uri,x,F,V):void 0}))}$registerOnTypeFormattingSupport(k,L,R,M){this._registrations.set(k,this._languageFeaturesService.onTypeFormattingEditProvider.register(L,{extensionId:M,autoFormatTriggerCharacters:R,provideOnTypeFormattingEdits:(N,P,x,F,V)=>this._proxy.$provideOnTypeFormattingEdits(k,N.uri,P,x,F,V)}))}$registerNavigateTypeSupport(k,L){let R;const M={provideWorkspaceSymbols:async(N,P)=>{const x=await this._proxy.$provideWorkspaceSymbols(k,N,P);return R!==void 0&&this._proxy.$releaseWorkspaceSymbols(k,R),R=x.cacheId,n._reviveWorkspaceSymbolDto(x.symbols)}};L&&(M.resolveWorkspaceSymbol=async(N,P)=>{const x=await this._proxy.$resolveWorkspaceSymbol(k,N,P);return x&&n._reviveWorkspaceSymbolDto(x)}),this._registrations.set(k,d.WorkspaceSymbolProviderRegistry.register(M))}$registerRenameSupport(k,L,R){this._registrations.set(k,this._languageFeaturesService.renameProvider.register(L,{provideRenameEdits:(M,N,P,x)=>this._proxy.$provideRenameEdits(k,M.uri,N,P,x).then(F=>(0,i.reviveWorkspaceEditDto)(F,this._uriIdentService)),resolveRenameLocation:R?(M,N,P)=>this._proxy.$resolveRenameLocation(k,M.uri,N,P):void 0}))}$registerDocumentSemanticTokensProvider(k,L,R,M){let N;if(typeof M=="number"){const P=new b.Emitter;this._registrations.set(M,P),N=P.event}this._registrations.set(k,this._languageFeaturesService.documentSemanticTokensProvider.register(L,new C(this._proxy,k,R,N)))}$emitDocumentSemanticTokensEvent(k){const L=this._registrations.get(k);L instanceof b.Emitter&&L.fire(void 0)}$registerDocumentRangeSemanticTokensProvider(k,L,R){this._registrations.set(k,this._languageFeaturesService.documentRangeSemanticTokensProvider.register(L,new I(this._proxy,k,R)))}static _inflateSuggestDto(k,L,R){const M=L.a,N=L.o,P=L.n,x=L.k;return{label:M,extensionId:R,kind:L.b??9,tags:L.m,detail:L.c,documentation:L.d,sortText:L.e,filterText:L.f,preselect:L.g,insertText:L.h??(typeof M=="string"?M:M.label),range:L.j??k,insertTextRules:L.i,commitCharacters:x?Array.from(x):void 0,additionalTextEdits:L.l,command:N?{$ident:P,id:N,title:"",arguments:P?[P]:L.p}:void 0,_id:L.x}}$registerCompletionsProvider(k,L,R,M,N){const P={triggerCharacters:R,_debugDisplayName:`${N.value}(${R.join("")})`,provideCompletionItems:async(x,F,V,W)=>{const z=await this._proxy.$provideCompletionItems(k,x.uri,F,V,W);return z&&{suggestions:z.b.map(B=>n._inflateSuggestDto(z.a,B,N)),incomplete:z.c||!1,duration:z.d,dispose:()=>{typeof z.x=="number"&&this._proxy.$releaseCompletionItems(k,z.x)}}}};M&&(P.resolveCompletionItem=(x,F)=>this._proxy.$resolveCompletionItem(k,x._id,F).then(V=>{if(!V)return x;const W=n._inflateSuggestDto(x.range,V,N);return(0,f.mixin)(x,W,!0)})),this._registrations.set(k,this._languageFeaturesService.completionProvider.register(L,P))}$registerInlineCompletionsSupport(k,L,R,M,N){const P={provideInlineCompletions:async(x,F,V,W)=>this._proxy.$provideInlineCompletions(k,x.uri,F,V,W),handleItemDidShow:async(x,F,V)=>{R&&await this._proxy.$handleInlineCompletionDidShow(k,x.pid,F.idx,V)},handlePartialAccept:async(x,F,V)=>{R&&await this._proxy.$handleInlineCompletionPartialAccept(k,x.pid,F.idx,V)},freeInlineCompletions:x=>{this._proxy.$freeInlineCompletionsList(k,x.pid)},groupId:M,yieldsToGroupIds:N,toString(){return`InlineCompletionsProvider(${M})`}};this._registrations.set(k,this._languageFeaturesService.inlineCompletionsProvider.register(L,P))}$registerSignatureHelpProvider(k,L,R){this._registrations.set(k,this._languageFeaturesService.signatureHelpProvider.register(L,{signatureHelpTriggerCharacters:R.triggerCharacters,signatureHelpRetriggerCharacters:R.retriggerCharacters,provideSignatureHelp:async(M,N,P,x)=>{const F=await this._proxy.$provideSignatureHelp(k,M.uri,N,x,P);if(F)return{value:F,dispose:()=>{this._proxy.$releaseSignatureHelp(k,F.id)}}}}))}$registerInlayHintsProvider(k,L,R,M,N){const P={displayName:N,provideInlayHints:async(x,F,V)=>{const W=await this._proxy.$provideInlayHints(k,x.uri,F,V);if(W)return{hints:(0,T.revive)(W.hints),dispose:()=>{W.cacheId&&this._proxy.$releaseInlayHints(k,W.cacheId)}}}};if(R&&(P.resolveInlayHint=async(x,F)=>{const V=x;if(!V.cacheId)return x;const W=await this._proxy.$resolveInlayHint(k,V.cacheId,F);if(F.isCancellationRequested)throw new y.CancellationError;return W?{...x,tooltip:W.tooltip,label:(0,T.revive)(W.label)}:x}),typeof M=="number"){const x=new b.Emitter;this._registrations.set(M,x),P.onDidChangeInlayHints=x.event}this._registrations.set(k,this._languageFeaturesService.inlayHintsProvider.register(L,P))}$emitInlayHintsEvent(k){const L=this._registrations.get(k);L instanceof b.Emitter&&L.fire(void 0)}$registerDocumentLinkProvider(k,L,R){const M={provideLinks:(N,P)=>this._proxy.$provideDocumentLinks(k,N.uri,P).then(x=>{if(x)return{links:x.links.map(n._reviveLinkDTO),dispose:()=>{typeof x.cacheId=="number"&&this._proxy.$releaseDocumentLinks(k,x.cacheId)}}})};R&&(M.resolveLink=(N,P)=>{const x=N;return x.cacheId?this._proxy.$resolveDocumentLink(k,x.cacheId,P).then(F=>F&&n._reviveLinkDTO(F)):N}),this._registrations.set(k,this._languageFeaturesService.linkProvider.register(L,M))}$registerDocumentColorProvider(k,L){const R=this._proxy;this._registrations.set(k,this._languageFeaturesService.colorProvider.register(L,{provideDocumentColors:(M,N)=>R.$provideDocumentColors(k,M.uri,N).then(P=>P.map(x=>{const[F,V,W,z]=x.color;return{color:{red:F,green:V,blue:W,alpha:z},range:x.range}})),provideColorPresentations:(M,N,P)=>R.$provideColorPresentations(k,M.uri,{color:[N.color.red,N.color.green,N.color.blue,N.color.alpha],range:N.range},P)}))}$registerFoldingRangeProvider(k,L,R,M){const N={id:R.value,provideFoldingRanges:(P,x,F)=>this._proxy.$provideFoldingRanges(k,P.uri,x,F)};if(typeof M=="number"){const P=new b.Emitter;this._registrations.set(M,P),N.onDidChange=P.event}this._registrations.set(k,this._languageFeaturesService.foldingRangeProvider.register(L,N))}$emitFoldingRangeEvent(k,L){const R=this._registrations.get(k);R instanceof b.Emitter&&R.fire(L)}$registerSelectionRangeProvider(k,L){this._registrations.set(k,this._languageFeaturesService.selectionRangeProvider.register(L,{provideSelectionRanges:(R,M,N)=>this._proxy.$provideSelectionRanges(k,R.uri,M,N)}))}$registerCallHierarchyProvider(k,L){this._registrations.set(k,u.CallHierarchyProviderRegistry.register(L,{prepareCallHierarchy:async(R,M,N)=>{const P=await this._proxy.$prepareCallHierarchy(k,R.uri,M,N);if(!(!P||P.length===0))return{dispose:()=>{for(const x of P)this._proxy.$releaseCallHierarchy(k,x._sessionId)},roots:P.map(n._reviveCallHierarchyItemDto)}},provideOutgoingCalls:async(R,M)=>{const N=await this._proxy.$provideCallHierarchyOutgoingCalls(k,R._sessionId,R._itemId,M);return N&&(N.forEach(P=>{P.to=n._reviveCallHierarchyItemDto(P.to)}),N)},provideIncomingCalls:async(R,M)=>{const N=await this._proxy.$provideCallHierarchyIncomingCalls(k,R._sessionId,R._itemId,M);return N&&(N.forEach(P=>{P.from=n._reviveCallHierarchyItemDto(P.from)}),N)}}))}static _reviveRegExp(k){return new RegExp(k.pattern,k.flags)}static _reviveIndentationRule(k){return{decreaseIndentPattern:n._reviveRegExp(k.decreaseIndentPattern),increaseIndentPattern:n._reviveRegExp(k.increaseIndentPattern),indentNextLinePattern:k.indentNextLinePattern?n._reviveRegExp(k.indentNextLinePattern):void 0,unIndentedLinePattern:k.unIndentedLinePattern?n._reviveRegExp(k.unIndentedLinePattern):void 0}}static _reviveOnEnterRule(k){return{beforeText:n._reviveRegExp(k.beforeText),afterText:k.afterText?n._reviveRegExp(k.afterText):void 0,previousLineText:k.previousLineText?n._reviveRegExp(k.previousLineText):void 0,action:k.action}}static _reviveOnEnterRules(k){return k.map(n._reviveOnEnterRule)}$setLanguageConfiguration(k,L,R){const M={comments:R.comments,brackets:R.brackets,wordPattern:R.wordPattern?n._reviveRegExp(R.wordPattern):void 0,indentationRules:R.indentationRules?n._reviveIndentationRule(R.indentationRules):void 0,onEnterRules:R.onEnterRules?n._reviveOnEnterRules(R.onEnterRules):void 0,autoClosingPairs:void 0,surroundingPairs:void 0,__electricCharacterSupport:void 0};R.autoClosingPairs?M.autoClosingPairs=R.autoClosingPairs:R.__characterPairSupport&&(M.autoClosingPairs=R.__characterPairSupport.autoClosingPairs),R.__electricCharacterSupport&&R.__electricCharacterSupport.docComment&&(M.__electricCharacterSupport={docComment:{open:R.__electricCharacterSupport.docComment.open,close:R.__electricCharacterSupport.docComment.close}}),this._languageService.isRegisteredLanguageId(L)&&this._registrations.set(k,this._languageConfigurationService.register(L,M,100))}$registerTypeHierarchyProvider(k,L){this._registrations.set(k,p.TypeHierarchyProviderRegistry.register(L,{prepareTypeHierarchy:async(R,M,N)=>{const P=await this._proxy.$prepareTypeHierarchy(k,R.uri,M,N);if(P)return{dispose:()=>{for(const x of P)this._proxy.$releaseTypeHierarchy(k,x._sessionId)},roots:P.map(n._reviveTypeHierarchyItemDto)}},provideSupertypes:async(R,M)=>{const N=await this._proxy.$provideTypeHierarchySupertypes(k,R._sessionId,R._itemId,M);return N&&N.map(P=>n._reviveTypeHierarchyItemDto(P))},provideSubtypes:async(R,M)=>{const N=await this._proxy.$provideTypeHierarchySubtypes(k,R._sessionId,R._itemId,M);return N&&N.map(n._reviveTypeHierarchyItemDto)}}))}$registerDocumentOnDropEditProvider(k,L,R,M){const N=new E(k,this._proxy,R,M,this._uriIdentService);this._documentOnDropEditProviders.set(k,N),this._registrations.set(k,(0,D.combinedDisposable)(this._languageFeaturesService.documentOnDropEditProvider.register(L,N),(0,D.toDisposable)(()=>this._documentOnDropEditProviders.delete(k))))}async $resolveDocumentOnDropFileData(k,L,R){const M=this._documentOnDropEditProviders.get(k);if(!M)throw new Error("Could not find provider");return M.resolveDocumentOnDropFileData(L,R)}$registerMappedEditsProvider(k,L){const R=new _(k,this._proxy,this._uriIdentService);this._registrations.set(k,this._languageFeaturesService.mappedEditsProvider.register(L,R))}};e.MainThreadLanguageFeatures=g,e.MainThreadLanguageFeatures=g=n=fe([(0,c.extHostNamedCustomer)(l.MainContext.MainThreadLanguageFeatures),O(1,m.ILanguageService),O(2,S.ILanguageConfigurationService),O(3,h.ILanguageFeaturesService),O(4,r.IUriIdentityService)],g);let w=class{constructor(k,L,R,M,N){this._handle=k,this._proxy=L,this._uriIdentService=N,this.dataTransfers=new o.DataTransferFileCache,this.id=R,this.copyMimeTypes=M.copyMimeTypes,this.pasteMimeTypes=M.pasteMimeTypes,M.supportsCopy&&(this.prepareDocumentPaste=async(P,x,F,V)=>{const W=await s.DataTransfer.from(F);if(V.isCancellationRequested)return;const z=await this._proxy.$prepareDocumentPaste(k,P.uri,x,W,V);if(!z)return;const B=new t.VSDataTransfer;for(const[K,H]of z.items)B.replace(K,(0,t.createStringDataTransferItem)(H.asString));return B}),M.supportsPaste&&(this.provideDocumentPasteEdits=async(P,x,F,V)=>{const W=this.dataTransfers.add(F);try{const z=await s.DataTransfer.from(F);if(V.isCancellationRequested)return;const B=await this._proxy.$providePasteEdits(this._handle,W.id,P.uri,x,z,V);return B?{...B,additionalEdit:B.additionalEdit?(0,i.reviveWorkspaceEditDto)(B.additionalEdit,this._uriIdentService,K=>this.resolveFileData(W.id,K)):void 0}:void 0}finally{W.dispose()}})}resolveFileData(k,L){return this.dataTransfers.resolveFileData(k,L)}};w=fe([O(4,r.IUriIdentityService)],w);let E=class{constructor(k,L,R,M,N){this._handle=k,this._proxy=L,this._uriIdentService=N,this.dataTransfers=new o.DataTransferFileCache,this.id=R,this.dropMimeTypes=M?.dropMimeTypes??["*/*"]}async provideDocumentOnDropEdits(k,L,R,M){const N=this.dataTransfers.add(R);try{const P=await s.DataTransfer.from(R);if(M.isCancellationRequested)return;const x=await this._proxy.$provideDocumentOnDropEdits(this._handle,N.id,k.uri,L,P,M);return x?{...x,additionalEdit:(0,i.reviveWorkspaceEditDto)(x.additionalEdit,this._uriIdentService,F=>this.resolveDocumentOnDropFileData(N.id,F))}:void 0}finally{N.dispose()}}resolveDocumentOnDropFileData(k,L){return this.dataTransfers.resolveFileData(k,L)}};E=fe([O(4,r.IUriIdentityService)],E);class C{constructor(k,L,R,M){this._proxy=k,this._handle=L,this._legend=R,this.onDidChange=M}releaseDocumentSemanticTokens(k){k&&this._proxy.$releaseDocumentSemanticTokens(this._handle,parseInt(k,10))}getLegend(){return this._legend}async provideDocumentSemanticTokens(k,L,R){const M=L?parseInt(L,10):0,N=await this._proxy.$provideDocumentSemanticTokens(this._handle,k.uri,M,R);if(!N||R.isCancellationRequested)return null;const P=(0,a.decodeSemanticTokensDto)(N);return P.type==="full"?{resultId:String(P.id),data:P.data}:{resultId:String(P.id),edits:P.deltas}}}e.MainThreadDocumentSemanticTokensProvider=C;class I{constructor(k,L,R){this._proxy=k,this._handle=L,this._legend=R}getLegend(){return this._legend}async provideDocumentRangeSemanticTokens(k,L,R){const M=await this._proxy.$provideDocumentRangeSemanticTokens(this._handle,k.uri,L,R);if(!M||R.isCancellationRequested)return null;const N=(0,a.decodeSemanticTokensDto)(M);if(N.type==="full")return{resultId:String(N.id),data:N.data};throw new Error("Unexpected")}}e.MainThreadDocumentRangeSemanticTokensProvider=I;class _{constructor(k,L,R){this._handle=k,this._proxy=L,this._uriService=R}async provideMappedEdits(k,L,R,M){const N=await this._proxy.$provideMappedEdits(this._handle,k.uri,L,R,M);return N?(0,i.reviveWorkspaceEditDto)(N,this._uriService):null}}e.MainThreadMappedEditsProvider=_}),define(Q[3822],Y([1,0,53,60,10,25,4,504]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadLocalization=void 0;let v=class extends T.Disposable{constructor(S,h,a){super(),this.fileService=h,this.languagePackService=a}async $fetchBuiltInBundleUri(S,h){try{return await this.languagePackService.getBuiltInExtensionTranslationsUri(S,h)}catch{return}}async $fetchBundleContents(S){return(await this.fileService.readFile(b.URI.revive(S))).value.toString()}};e.MainThreadLocalization=v,e.MainThreadLocalization=v=fe([(0,y.extHostNamedCustomer)(t.MainContext.MainThreadLocalization),O(1,D.IFileService),O(2,f.ILanguagePackService)],v)}),define(Q[3823],Y([1,0,60,11,4,53,10,28,91]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadLoggerService=void 0;let m=class{constructor(h,a){this.loggerService=a,this.disposables=new b.DisposableStore;const r=h.getProxy(D.ExtHostContext.ExtHostLogLevelServiceShape);this.disposables.add(a.onDidChangeLogLevel(i=>{(0,y.isLogLevel)(i)?r.$setLogLevel(i):r.$setLogLevel(i[1],i[0])}))}$log(h,a){const r=this.loggerService.getLogger(T.URI.revive(h));if(!r)throw new Error("Create the logger before logging");for(const[i,s]of a)(0,y.log)(r,i,s)}async $createLogger(h,a){this.loggerService.createLogger(T.URI.revive(h),a)}async $registerLogger(h){this.loggerService.registerLogger({...h,resource:T.URI.revive(h.resource)})}async $deregisterLogger(h){this.loggerService.deregisterLogger(T.URI.revive(h))}async $setVisibility(h,a){this.loggerService.setVisibility(T.URI.revive(h),a)}$flush(h){const a=this.loggerService.getLogger(T.URI.revive(h));if(!a)throw new Error("Create the logger before flushing");a.flush()}dispose(){this.disposables.dispose()}};e.MainThreadLoggerService=m,e.MainThreadLoggerService=m=fe([(0,t.extHostNamedCustomer)(D.MainContext.MainThreadLogger),O(1,y.ILoggerService)],m),f.CommandsRegistry.registerCommand("_extensionTests.setLogLevel",function(S,h){const a=S.get(y.ILoggerService),r=S.get(v.IEnvironmentService);if(r.isExtensionDevelopment&&r.extensionTestsLocationURI){const i=(0,y.parseLogLevel)(h);i!==void 0&&a.setLogLevel(i)}}),f.CommandsRegistry.registerCommand("_extensionTests.getLogLevel",function(S){const h=S.get(y.ILogService);return(0,y.LogLevelToString)(h.getLevel())})}),define(Q[3824],Y([1,0,6,4,3266,592,53,60]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadManagedSocket=e.MainThreadManagedSockets=void 0;let v=class extends y.Disposable{constructor(h,a){super(),this._remoteSocketFactoryService=a,this._registrations=new Map,this._remoteSockets=new Map,this._proxy=h.getProxy(T.ExtHostContext.ExtHostManagedSockets)}async $registerSocketFactory(h){const a=this,r=new class{supports(i){return i.id===h}connect(i,s,o,u){return new Promise((d,p)=>{if(i.id!==h)return p(new Error("Invalid connectTo"));const c=i.id;a._proxy.$openRemoteSocket(c).then(l=>{const n={onClose:new t.Emitter,onData:new t.Emitter,onEnd:new t.Emitter};a._remoteSockets.set(l,n),m.connect(l,a._proxy,s,o,u,n).then(g=>{g.onDidDispose(()=>a._remoteSockets.delete(l)),d(g)},g=>{a._remoteSockets.delete(l),p(g)})}).catch(p)})}};this._registrations.set(h,this._remoteSocketFactoryService.register(1,r))}async $unregisterSocketFactory(h){this._registrations.get(h)?.dispose()}$onDidManagedSocketHaveData(h,a){this._remoteSockets.get(h)?.onData.fire(a)}$onDidManagedSocketClose(h,a){this._remoteSockets.get(h)?.onClose.fire({type:0,error:a?new Error(a):void 0,hadError:!!a}),this._remoteSockets.delete(h)}$onDidManagedSocketEnd(h){this._remoteSockets.get(h)?.onEnd.fire()}};e.MainThreadManagedSockets=v,e.MainThreadManagedSockets=v=fe([(0,f.extHostNamedCustomer)(T.MainContext.MainThreadManagedSockets),O(1,D.IRemoteSocketFactoryService)],v);class m extends b.ManagedSocket{static connect(h,a,r,i,s,o){const u=new m(h,a,s,o);return(0,b.connectManagedSocket)(u,r,i,s,o)}constructor(h,a,r,i){super(r,i),this.socketId=h,this.proxy=a}write(h){this.proxy.$remoteSocketWrite(this.socketId,h)}closeRemote(){this.proxy.$remoteSocketEnd(this.socketId)}drain(){return this.proxy.$remoteSocketDrain(this.socketId)}}e.MainThreadManagedSocket=m}),define(Q[3825],Y([1,0,2506,34,53,60,49,23,6,28,118]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadMessageService=void 0;let h=class{constructor(r,i,s,o,u){this._notificationService=i,this._commandService=s,this._dialogService=o,this._extensionService=u}dispose(){}$showMessage(r,i,s,o){return s.modal?this._showModalMessage(r,i,s.detail,o,s.useCustom):this._showMessage(r,i,o,s)}_showMessage(r,i,s,o){return new Promise(u=>{const d=s.map(n=>(0,y.toAction)({id:`_extension_message_handle_${n.handle}`,label:n.title,enabled:!0,run:()=>(u(n.handle),Promise.resolve())}));let p;o.source&&(p={label:t.localize(0,null,o.source.label),id:o.source.identifier.value}),p||(p=t.localize(1,null));const c=[];if(o.source){const n=this._extensionService?.local.find(g=>g.identifier.id.toUpperCase()===o.source.identifier.value.toUpperCase());n&&!n.isBuiltin&&c.push((0,y.toAction)({id:o.source.identifier.value,label:t.localize(2,null),run:()=>this._commandService.executeCommand("_extensions.manage",o.source.identifier.value)}))}const l=this._notificationService.notify({severity:r,message:i,actions:{primary:d,secondary:c},source:p});v.Event.once(l.onDidClose)(()=>{u(void 0)})})}async _showModalMessage(r,i,s,o,u){const d=[];let p;for(const l of o){const n={label:l.title,run:()=>l.handle};l.isCloseAffordance?p=n:d.push(n)}p||(d.length>0?p={label:t.localize(3,null),run:()=>{}}:p={label:t.localize(4,null),run:()=>{}});const{result:c}=await this._dialogService.prompt({type:r,message:i,detail:s,buttons:d,cancelButton:p,custom:u});return c}};e.MainThreadMessageService=h,e.MainThreadMessageService=h=fe([(0,D.extHostNamedCustomer)(b.MainContext.MainThreadMessageService),O(1,f.INotificationService),O(2,m.ICommandService),O(3,T.IDialogService),O(4,S.IExtensionsWorkbenchService)],h)}),define(Q[3826],Y([1,0,62,31,6,4,145,17,28,11,734,731,148,60,474,53]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebooks=void 0;let o=class{constructor(d,p,c,l){this._notebookService=p,this._cellStatusBarService=c,this._logService=l,this._disposables=new D.DisposableStore,this._notebookSerializer=new Map,this._notebookCellStatusBarRegistrations=new Map,this._proxy=d.getProxy(s.ExtHostContext.ExtHostNotebook)}dispose(){this._disposables.dispose(),(0,D.dispose)(this._notebookSerializer.values())}$registerNotebookSerializer(d,p,c,l,n){const g=new D.DisposableStore;g.add(this._notebookService.registerNotebookSerializer(c,p,{options:l,dataToNotebook:async w=>{const E=new T.StopWatch;let C;if(w.byteLength===0&&c==="interactive")C=S.NotebookDto.fromNotebookDataDto({cells:[],metadata:{}});else{const I=await this._proxy.$dataToNotebook(d,w,y.CancellationToken.None);C=S.NotebookDto.fromNotebookDataDto(I.value)}return this._logService.trace(`[NotebookSerializer] dataToNotebook DONE after ${E.elapsed()}ms`,{viewType:c,extensionId:p.id.value}),C},notebookToData:w=>{const E=new T.StopWatch,C=this._proxy.$notebookToData(d,new i.SerializableObjectWithBuffers(S.NotebookDto.toNotebookDataDto(w)),y.CancellationToken.None);return this._logService.trace(`[NotebookSerializer] notebookToData DONE after ${E.elapsed()}`,{viewType:c,extensionId:p.id.value}),C},save:async(w,E,C,I)=>({...await this._proxy.$saveNotebook(d,w,E,C,I),children:void 0,resource:w})})),n&&g.add(this._notebookService.registerContributedNotebookType(c,n)),this._notebookSerializer.set(d,g),this._logService.trace("[NotebookSerializer] registered notebook serializer",{viewType:c,extensionId:p.id.value})}$unregisterNotebookSerializer(d){this._notebookSerializer.get(d)?.dispose(),this._notebookSerializer.delete(d)}$emitCellStatusBarEvent(d){const p=this._notebookCellStatusBarRegistrations.get(d);p instanceof b.Emitter&&p.fire(void 0)}async $registerNotebookCellStatusBarItemProvider(d,p,c){const l=this,n={async provideCellStatusBarItems(w,E,C){const I=await l._proxy.$provideNotebookCellStatusBarItems(d,w,E,C);return{items:I?.items??[],dispose(){I&&l._proxy.$releaseNotebookCellStatusBarItems(I.cacheId)}}},viewType:c};if(typeof p=="number"){const w=new b.Emitter;this._notebookCellStatusBarRegistrations.set(p,w),n.onDidChangeStatusBarItems=w.event}const g=this._cellStatusBarService.registerCellStatusBarItemProvider(n);this._notebookCellStatusBarRegistrations.set(d,g)}async $unregisterNotebookCellStatusBarItemProvider(d,p){const c=l=>{this._notebookCellStatusBarRegistrations.get(l)&&(this._notebookCellStatusBarRegistrations.get(l)?.dispose(),this._notebookCellStatusBarRegistrations.delete(l))};c(d),typeof p=="number"&&c(p)}};e.MainThreadNotebooks=o,e.MainThreadNotebooks=o=fe([(0,r.extHostNamedCustomer)(s.MainContext.MainThreadNotebook),O(1,a.INotebookService),O(2,h.INotebookCellStatusBarService),O(3,m.ILogService)],o),v.CommandsRegistry.registerCommand("_executeDataToNotebook",async(u,...d)=>{const[p,c]=d;(0,f.assertType)(typeof p=="string","string"),(0,f.assertType)(c instanceof t.VSBuffer,"VSBuffer");const n=await u.get(a.INotebookService).withNotebookDataProvider(p);if(!(n instanceof a.SimpleNotebookProviderInfo))return;const g=await n.serializer.dataToNotebook(c);return new i.SerializableObjectWithBuffers(S.NotebookDto.toNotebookDataDto(g))}),v.CommandsRegistry.registerCommand("_executeNotebookToData",async(u,...d)=>{const[p,c]=d;(0,f.assertType)(typeof p=="string","string"),(0,f.assertType)(typeof c=="object");const n=await u.get(a.INotebookService).withNotebookDataProvider(p);if(!(n instanceof a.SimpleNotebookProviderInfo))return;const g=S.NotebookDto.fromNotebookDataDto(c.value);return await n.serializer.notebookToData(g)})}),define(Q[3827],Y([1,0,20,31,15,6,4,10,50,734,60,292,211,253,53,148]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebookKernels=void 0;class o{get preloadUris(){return this.preloads.map(c=>c.uri)}get preloadProvides(){return this.preloads.map(c=>c.provides).flat()}constructor(c,l){this._languageService=l,this._onDidChange=new D.Emitter,this.onDidChange=this._onDidChange.event,this.id=c.id,this.viewType=c.notebookType,this.extension=c.extensionId,this.implementsInterrupt=c.supportsInterrupt??!1,this.label=c.label,this.description=c.description,this.detail=c.detail,this.supportedLanguages=(0,t.isNonEmptyArray)(c.supportedLanguages)?c.supportedLanguages:l.getRegisteredLanguageIds(),this.implementsExecutionOrder=c.supportsExecutionOrder??!1,this.localResourceRoot=f.URI.revive(c.extensionLocation),this.preloads=c.preloads?.map(n=>({uri:f.URI.revive(n.uri),provides:n.provides}))??[]}update(c){const l=Object.create(null);c.label!==void 0&&(this.label=c.label,l.label=!0),c.description!==void 0&&(this.description=c.description,l.description=!0),c.detail!==void 0&&(this.detail=c.detail,l.detail=!0),c.supportedLanguages!==void 0&&(this.supportedLanguages=(0,t.isNonEmptyArray)(c.supportedLanguages)?c.supportedLanguages:this._languageService.getRegisteredLanguageIds(),l.supportedLanguages=!0),c.supportsExecutionOrder!==void 0&&(this.implementsExecutionOrder=c.supportsExecutionOrder,l.hasExecutionOrder=!0),c.supportsInterrupt!==void 0&&(this.implementsInterrupt=c.supportsInterrupt,l.hasInterruptHandler=!0),this._onDidChange.fire(l)}}class u{constructor(c){this.notebookType=c}}let d=class{constructor(c,l,n,g,w,E){this._languageService=l,this._notebookKernelService=n,this._notebookExecutionStateService=g,this._notebookService=w,this._editors=new T.DisposableMap,this._disposables=new T.DisposableStore,this._kernels=new Map,this._kernelDetectionTasks=new Map,this._kernelSourceActionProviders=new Map,this._kernelSourceActionProvidersEventRegistrations=new Map,this._executions=new Map,this._notebookExecutions=new Map,this._proxy=c.getProxy(i.ExtHostContext.ExtHostNotebookKernels),E.listNotebookEditors().forEach(this._onEditorAdd,this),E.onDidAddNotebookEditor(this._onEditorAdd,this,this._disposables),E.onDidRemoveNotebookEditor(this._onEditorRemove,this,this._disposables),this._disposables.add((0,T.toDisposable)(()=>{this._executions.forEach(C=>{C.complete({})}),this._notebookExecutions.forEach(C=>C.complete())})),this._disposables.add(this._notebookExecutionStateService.onDidChangeExecution(C=>{C.type===a.NotebookExecutionType.cell&&this._proxy.$cellExecutionChanged(C.notebook,C.cellHandle,C.changed?.state)}))}dispose(){this._disposables.dispose();for(const[,c]of this._kernels.values())c.dispose();for(const[,c]of this._kernelDetectionTasks.values())c.dispose();for(const[,c]of this._kernelSourceActionProviders.values())c.dispose();this._editors.dispose()}_onEditorAdd(c){const l=c.onDidReceiveMessage(n=>{if(!c.hasModel())return;const{selected:g}=this._notebookKernelService.getMatchingKernel(c.textModel);if(g){for(const[w,E]of this._kernels)if(E[0]===g){this._proxy.$acceptKernelMessageFromRenderer(w,c.getId(),n.message);break}}});this._editors.set(c,l)}_onEditorRemove(c){this._editors.deleteAndDispose(c)}async $postMessage(c,l,n){const g=this._kernels.get(c);if(!g)throw new Error("kernel already disposed");const[w]=g;let E=!1;for(const[C]of this._editors)if(C.hasModel()&&this._notebookKernelService.getMatchingKernel(C.textModel).selected===w){if(l===void 0)C.postMessage(n),E=!0;else if(C.getId()===l){C.postMessage(n),E=!0;break}}return E}async $addKernel(c,l){const n=this,g=new class extends o{async executeNotebookCellsRequest(C,I){await n._proxy.$executeCells(c,C,I)}async cancelNotebookCellExecution(C,I){await n._proxy.$cancelCells(c,C,I)}}(l,this._languageService),w=this._notebookKernelService.onDidChangeSelectedNotebooks(C=>{C.oldKernel===g.id?this._proxy.$acceptNotebookAssociation(c,C.notebook,!1):C.newKernel===g.id&&this._proxy.$acceptNotebookAssociation(c,C.notebook,!0)}),E=this._notebookKernelService.registerKernel(g);this._kernels.set(c,[g,(0,T.combinedDisposable)(w,E)])}$updateKernel(c,l){const n=this._kernels.get(c);n&&n[0].update(l)}$removeKernel(c){const l=this._kernels.get(c);l&&(l[1].dispose(),this._kernels.delete(c))}$updateNotebookPriority(c,l,n){const g=this._kernels.get(c);g&&this._notebookKernelService.updateKernelNotebookAffinity(g[0],f.URI.revive(l),n)}$createExecution(c,l,n,g){const w=f.URI.revive(n),E=this._notebookService.getNotebookTextModel(w);if(!E)throw new Error(`Notebook not found: ${w.toString()}`);const C=this._notebookKernelService.getMatchingKernel(E);if(!C.selected||C.selected.id!==l)throw new Error(`Kernel is not selected: ${C.selected?.id} !== ${l}`);const I=this._notebookExecutionStateService.createCellExecution(w,g);I.confirm(),this._executions.set(c,I)}$updateExecution(c,l){const n=l.value;try{this._executions.get(c)?.update(n.map(m.NotebookDto.fromCellExecuteUpdateDto))}catch(g){(0,b.onUnexpectedError)(g)}}$completeExecution(c,l){try{this._executions.get(c)?.complete(m.NotebookDto.fromCellExecuteCompleteDto(l.value))}catch(n){(0,b.onUnexpectedError)(n)}finally{this._executions.delete(c)}}$createNotebookExecution(c,l,n){const g=f.URI.revive(n),w=this._notebookService.getNotebookTextModel(g);if(!w)throw new Error(`Notebook not found: ${g.toString()}`);const E=this._notebookKernelService.getMatchingKernel(w);if(!E.selected||E.selected.id!==l)throw new Error(`Kernel is not selected: ${E.selected?.id} !== ${l}`);const C=this._notebookExecutionStateService.createExecution(g);C.confirm(),this._notebookExecutions.set(c,C)}$beginNotebookExecution(c){try{this._notebookExecutions.get(c)?.begin()}catch(l){(0,b.onUnexpectedError)(l)}}$completeNotebookExecution(c){try{this._notebookExecutions.get(c)?.complete()}catch(l){(0,b.onUnexpectedError)(l)}finally{this._notebookExecutions.delete(c)}}async $addKernelDetectionTask(c,l){const n=new u(l),g=this._notebookKernelService.registerNotebookKernelDetectionTask(n);this._kernelDetectionTasks.set(c,[n,g])}$removeKernelDetectionTask(c){const l=this._kernelDetectionTasks.get(c);l&&(l[1].dispose(),this._kernelDetectionTasks.delete(c))}async $addKernelSourceActionProvider(c,l,n){const g={viewType:n,provideKernelSourceActions:async()=>(await this._proxy.$provideKernelSourceActions(c,y.CancellationToken.None)).map(C=>{let I=C.documentation;return C.documentation&&typeof C.documentation!="string"&&(I=f.URI.revive(C.documentation)),{label:C.label,command:C.command,description:C.description,detail:C.detail,documentation:I}})};if(typeof l=="number"){const E=new D.Emitter;this._kernelSourceActionProvidersEventRegistrations.set(l,E),g.onDidChangeSourceActions=E.event}const w=this._notebookKernelService.registerKernelSourceActionProvider(n,g);this._kernelSourceActionProviders.set(c,[g,w])}$removeKernelSourceActionProvider(c,l){const n=this._kernelSourceActionProviders.get(c);n&&(n[1].dispose(),this._kernelSourceActionProviders.delete(c)),typeof l=="number"&&this._kernelSourceActionProvidersEventRegistrations.delete(l)}$emitNotebookKernelSourceActionsChangeEvent(c){const l=this._kernelSourceActionProvidersEventRegistrations.get(c);l instanceof D.Emitter&&l.fire(void 0)}};e.MainThreadNotebookKernels=d,e.MainThreadNotebookKernels=d=fe([(0,S.extHostNamedCustomer)(i.MainContext.MainThreadNotebookKernels),O(1,v.ILanguageService),O(2,r.INotebookKernelService),O(3,a.INotebookExecutionStateService),O(4,s.INotebookService),O(5,h.INotebookEditorService)],d)}),define(Q[3828],Y([1,0,4,53,60,926]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebookRenderers=void 0;let T=class extends t.Disposable{constructor(v,m){super(),this.messaging=m,this.proxy=v.getProxy(y.ExtHostContext.ExtHostNotebookRenderers),this._register(m.onShouldPostMessage(S=>{this.proxy.$postRendererMessage(S.editorId,S.rendererId,S.message)}))}$postMessage(v,m,S){return this.messaging.receiveMessage(v,m,S)}};e.MainThreadNotebookRenderers=T,e.MainThreadNotebookRenderers=T=fe([(0,b.extHostNamedCustomer)(y.MainContext.MainThreadNotebookRenderers),O(1,D.INotebookRendererMessagingService)],T)}),define(Q[3829],Y([1,0,72,53,60,34,28,2508]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadProgress=void 0;class v extends D.Action{constructor(h,a,r){super(h,a,void 0,!0,()=>r.executeCommand("_extensions.manage",h))}}let m=class{constructor(h,a,r){this._commandService=r,this._progress=new Map,this._proxy=h.getProxy(y.ExtHostContext.ExtHostProgress),this._progressService=a}dispose(){this._progress.forEach(h=>h.resolve()),this._progress.clear()}async $startProgress(h,a,r){const i=this._createTask(h);a.location===15&&r&&(a={...a,location:15,secondaryActions:[new v(r,(0,f.localize)(0,null),this._commandService)]}),this._progressService.withProgress(a,i,()=>this._proxy.$acceptProgressCanceled(h))}$progressReport(h,a){this._progress.get(h)?.progress.report(a)}$progressEnd(h){const a=this._progress.get(h);a&&(a.resolve(),this._progress.delete(h))}_createTask(h){return a=>new Promise(r=>{this._progress.set(h,{resolve:r,progress:a})})}};e.MainThreadProgress=m,e.MainThreadProgress=m=fe([(0,b.extHostNamedCustomer)(y.MainContext.MainThreadProgress),O(1,t.IProgressService),O(2,T.ICommandService)],m)}),define(Q[3830],Y([1,0,31,4,10,53,615,60]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadQuickDiff=void 0;let v=class{constructor(S,h){this.quickDiffService=h,this.providers=new Map,this.providerDisposables=new Map,this.proxy=S.getProxy(D.ExtHostContext.ExtHostQuickDiff)}async $registerQuickDiffProvider(S,h,a,r){const i={label:a,rootUri:b.URI.revive(r),selector:h,isSCM:!1,getOriginalResource:async o=>b.URI.revive(await this.proxy.$provideOriginalResource(S,o,new t.CancellationTokenSource().token))};this.providers.set(S,i);const s=this.quickDiffService.addQuickDiffProvider(i);this.providerDisposables.set(S,s)}async $unregisterQuickDiffProvider(S){this.providers.has(S)&&this.providers.delete(S),this.providerDisposables.has(S)&&this.providerDisposables.delete(S)}dispose(){this.providers.clear(),(0,y.dispose)(this.providerDisposables.values()),this.providerDisposables.clear()}};e.MainThreadQuickDiff=v,e.MainThreadQuickDiff=v=fe([(0,f.extHostNamedCustomer)(D.MainContext.MainThreadQuickDiff),O(1,T.IQuickDiffService)],v)}),define(Q[3831],Y([1,0,43,53,60,10]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadQuickOpen=void 0;function T(v){v.dark=D.URI.revive(v.dark),v.light&&(v.light=D.URI.revive(v.light))}let f=class{constructor(m,S){this._items={},this.sessions=new Map,this._proxy=m.getProxy(y.ExtHostContext.ExtHostQuickOpen),this._quickInputService=S}dispose(){}$show(m,S,h){const a=document.activeElement,r=()=>{try{a?.focus()}catch{}},i=new Promise((s,o)=>{this._items[m]={resolve:s,reject:o}});return S={...S,onDidFocus:s=>{s&&this._proxy.$onItemSelected(s.handle)}},S.canPickMany?this._quickInputService.pick(i,S,h).then(s=>{if(r(),s)return s.map(o=>o.handle)}):this._quickInputService.pick(i,S,h).then(s=>{if(r(),s)return s.handle})}$setItems(m,S){return this._items[m]&&(this._items[m].resolve(S),delete this._items[m]),Promise.resolve()}$setError(m,S){return this._items[m]&&(this._items[m].reject(S),delete this._items[m]),Promise.resolve()}$input(m,S,h){const a=Object.create(null);return m&&(a.title=m.title,a.password=m.password,a.placeHolder=m.placeHolder,a.valueSelection=m.valueSelection,a.prompt=m.prompt,a.value=m.value,a.ignoreFocusLost=m.ignoreFocusOut),S&&(a.validateInput=r=>this._proxy.$validateInput(r)),this._quickInputService.input(a,h)}$createOrUpdate(m){const S=m.id;let h=this.sessions.get(S);if(!h){const i=m.type==="quickPick"?this._quickInputService.createQuickPick():this._quickInputService.createInputBox();if(i.onDidAccept(()=>{this._proxy.$onDidAccept(S)}),i.onDidTriggerButton(s=>{this._proxy.$onDidTriggerButton(S,s.handle)}),i.onDidChangeValue(s=>{this._proxy.$onDidChangeValue(S,s)}),i.onDidHide(()=>{this._proxy.$onDidHide(S)}),m.type==="quickPick"){const s=i;s.onDidChangeActive(o=>{this._proxy.$onDidChangeActive(S,o.map(u=>u.handle))}),s.onDidChangeSelection(o=>{this._proxy.$onDidChangeSelection(S,o.map(u=>u.handle))}),s.onDidTriggerItemButton(o=>{this._proxy.$onDidTriggerItemButton(S,o.item.handle,o.button.handle)})}h={input:i,handlesToItems:new Map},this.sessions.set(S,h)}const{input:a,handlesToItems:r}=h;for(const i in m)i==="id"||i==="type"||(i==="visible"?m.visible?a.show():a.hide():i==="items"?(r.clear(),m[i].forEach(s=>{s.type!=="separator"&&(s.buttons&&(s.buttons=s.buttons.map(o=>(o.iconPath&&T(o.iconPath),o))),r.set(s.handle,s))}),a[i]=m[i]):i==="activeItems"||i==="selectedItems"?a[i]=m[i].filter(s=>r.has(s)).map(s=>r.get(s)):i==="buttons"?a[i]=m.buttons.map(s=>s.handle===-1?this._quickInputService.backButton:(s.iconPath&&T(s.iconPath),s)):a[i]=m[i]);return Promise.resolve(void 0)}$dispose(m){const S=this.sessions.get(m);return S&&(S.input.dispose(),this.sessions.delete(m)),Promise.resolve(void 0)}};e.MainThreadQuickOpen=f,e.MainThreadQuickOpen=f=fe([(0,b.extHostNamedCustomer)(y.MainContext.MainThreadQuickOpen),O(1,t.IQuickInputService)],f)}),define(Q[3832],Y([1,0,60,53,181,4,65]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadRemoteConnectionData=void 0;let f=class extends D.Disposable{constructor(m,S,h){super(),this._environmentService=S,this._proxy=m.getProxy(y.ExtHostContext.ExtHostExtensionService);const a=this._environmentService.remoteAuthority;a&&this._register(h.onDidChangeConnectionData(()=>{const r=h.getConnectionData(a);r&&this._proxy.$updateRemoteConnectionData(r)}))}};e.MainThreadRemoteConnectionData=f,e.MainThreadRemoteConnectionData=f=fe([t.extHostCustomer,O(1,T.IWorkbenchEnvironmentService),O(2,b.IRemoteAuthorityResolverService)],f)}),define(Q[3833],Y([1,0,10,6,4,293,53,60,1538,31,37,615]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadSCM=void 0;class a{get hideWhenEmpty(){return!!this.features.hideWhenEmpty}constructor(u,d,p,c,l,n){this.sourceControlHandle=u,this.handle=d,this.provider=p,this.features=c,this.label=l,this.id=n,this.elements=[],this._onDidSplice=new y.Emitter,this.onDidSplice=this._onDidSplice.event,this._onDidChange=new y.Emitter,this.onDidChange=this._onDidChange.event}toJSON(){return{$mid:4,sourceControlHandle:this.sourceControlHandle,groupHandle:this.handle}}splice(u,d,p){this.elements.splice(u,d,...p),this._onDidSplice.fire({start:u,deleteCount:d,toInsert:p})}$updateGroup(u){this.features={...this.features,...u},this._onDidChange.fire()}$updateGroupLabel(u){this.label=u,this._onDidChange.fire()}}class r{constructor(u,d,p,c,l,n,g,w,E){this.proxy=u,this.sourceControlHandle=d,this.groupHandle=p,this.handle=c,this.sourceUri=l,this.resourceGroup=n,this.decorations=g,this.contextValue=w,this.command=E}open(u){return this.proxy.$executeResourceCommand(this.sourceControlHandle,this.groupHandle,this.handle,u)}toJSON(){return{$mid:3,sourceControlHandle:this.sourceControlHandle,groupHandle:this.groupHandle,handle:this.handle}}}class i{static{this.ID_HANDLE=0}get id(){return this._id}get handle(){return this._handle}get label(){return this._label}get rootUri(){return this._rootUri}get inputBoxDocumentUri(){return this._inputBoxDocumentUri}get contextValue(){return this._contextValue}get commitTemplate(){return this.features.commitTemplate||""}get acceptInputCommand(){return this.features.acceptInputCommand}get actionButton(){return this.features.actionButton??void 0}get statusBarCommands(){return this.features.statusBarCommands}get count(){return this.features.count}get onDidChangeStatusBarCommands(){return this._onDidChangeStatusBarCommands.event}constructor(u,d,p,c,l,n,g){this.proxy=u,this._handle=d,this._contextValue=p,this._label=c,this._rootUri=l,this._inputBoxDocumentUri=n,this._quickDiffService=g,this._id=`scm${i.ID_HANDLE++}`,this.groups=new v.Sequence,this._groupsByHandle=Object.create(null),this._onDidChangeResources=new y.Emitter,this.onDidChangeResources=this._onDidChangeResources.event,this.features={},this._onDidChangeCommitTemplate=new y.Emitter,this.onDidChangeCommitTemplate=this._onDidChangeCommitTemplate.event,this._onDidChangeStatusBarCommands=new y.Emitter,this._onDidChange=new y.Emitter,this.onDidChange=this._onDidChange.event,this.isSCM=!0}$updateSourceControl(u){this.features={...this.features,...u},this._onDidChange.fire(),typeof u.commitTemplate<"u"&&this._onDidChangeCommitTemplate.fire(this.commitTemplate),typeof u.statusBarCommands<"u"&&this._onDidChangeStatusBarCommands.fire(this.statusBarCommands),u.hasQuickDiffProvider&&!this._quickDiff?this._quickDiff=this._quickDiffService.addQuickDiffProvider({label:u.quickDiffLabel??this.label,rootUri:this.rootUri,isSCM:this.isSCM,getOriginalResource:d=>this.getOriginalResource(d)}):u.hasQuickDiffProvider===!1&&this._quickDiff&&(this._quickDiff.dispose(),this._quickDiff=void 0)}$registerGroups(u){const d=u.map(([p,c,l,n])=>{const g=new a(this.handle,p,this,n,l,c);return this._groupsByHandle[p]=g,g});this.groups.splice(this.groups.elements.length,0,d)}$updateGroup(u,d){const p=this._groupsByHandle[u];p&&p.$updateGroup(d)}$updateGroupLabel(u,d){const p=this._groupsByHandle[u];p&&p.$updateGroupLabel(d)}$spliceGroupResourceStates(u){for(const[d,p]of u){const c=this._groupsByHandle[d];if(!c){console.warn(`SCM group ${d} not found in provider ${this.label}`);continue}p.reverse();for(const[l,n,g]of p){const w=g.map(E=>{const[C,I,_,A,k,L,R,M]=E,[N,P]=_,x=S.ThemeIcon.isThemeIcon(N)?N:t.URI.revive(N),F=(S.ThemeIcon.isThemeIcon(P)?P:t.URI.revive(P))||x,V={icon:x,iconDark:F,tooltip:A,strikeThrough:k,faded:L};return new r(this.proxy,this.handle,d,C,t.URI.revive(I),c,V,R||void 0,M)});c.splice(l,n,w)}}this._onDidChangeResources.fire()}$unregisterGroup(u){const d=this._groupsByHandle[u];d&&(delete this._groupsByHandle[u],this.groups.splice(this.groups.elements.indexOf(d),1),this._onDidChangeResources.fire())}async getOriginalResource(u){if(!this.features.hasQuickDiffProvider)return null;const d=await this.proxy.$provideOriginalResource(this.handle,u,m.CancellationToken.None);return d&&t.URI.revive(d)}toJSON(){return{$mid:5,handle:this.handle}}dispose(){this._quickDiff?.dispose()}}let s=class{constructor(u,d,p,c){this.scmService=d,this.scmViewService=p,this.quickDiffService=c,this._repositories=new Map,this._repositoryDisposables=new Map,this._disposables=new b.DisposableStore,this._proxy=u.getProxy(T.ExtHostContext.ExtHostSCM)}dispose(){(0,b.dispose)(this._repositories.values()),this._repositories.clear(),(0,b.dispose)(this._repositoryDisposables.values()),this._repositoryDisposables.clear(),this._disposables.dispose()}$registerSourceControl(u,d,p,c,l){const n=new i(this._proxy,u,d,p,c?t.URI.revive(c):void 0,t.URI.revive(l),this.quickDiffService),g=this.scmService.registerSCMProvider(n);this._repositories.set(u,g);const w=(0,b.combinedDisposable)(y.Event.filter(this.scmViewService.onDidFocusRepository,E=>E===g)(E=>this._proxy.$setSelectedSourceControl(u)),g.input.onDidChange(({value:E})=>this._proxy.$onInputBoxValueChange(u,E)));this.scmViewService.focusedRepository===g&&setTimeout(()=>this._proxy.$setSelectedSourceControl(u),0),g.input.value&&setTimeout(()=>this._proxy.$onInputBoxValueChange(u,g.input.value),0),this._repositoryDisposables.set(u,w)}$updateSourceControl(u,d){const p=this._repositories.get(u);if(!p)return;p.provider.$updateSourceControl(d)}$unregisterSourceControl(u){const d=this._repositories.get(u);d&&(this._repositoryDisposables.get(u).dispose(),this._repositoryDisposables.delete(u),d.dispose(),this._repositories.delete(u))}$registerGroups(u,d,p){const c=this._repositories.get(u);if(!c)return;const l=c.provider;l.$registerGroups(d),l.$spliceGroupResourceStates(p)}$updateGroup(u,d,p){const c=this._repositories.get(u);if(!c)return;c.provider.$updateGroup(d,p)}$updateGroupLabel(u,d,p){const c=this._repositories.get(u);if(!c)return;c.provider.$updateGroupLabel(d,p)}$spliceResourceStates(u,d){const p=this._repositories.get(u);if(!p)return;p.provider.$spliceGroupResourceStates(d)}$unregisterGroup(u,d){const p=this._repositories.get(u);if(!p)return;p.provider.$unregisterGroup(d)}$setInputBoxValue(u,d){const p=this._repositories.get(u);p&&p.input.setValue(d,!1)}$setInputBoxPlaceholder(u,d){const p=this._repositories.get(u);p&&(p.input.placeholder=d)}$setInputBoxEnablement(u,d){const p=this._repositories.get(u);p&&(p.input.enabled=d)}$setInputBoxVisibility(u,d){const p=this._repositories.get(u);p&&(p.input.visible=d)}$showValidationMessage(u,d,p){const c=this._repositories.get(u);c&&c.input.showValidationMessage(d,p)}$setValidationProviderIsEnabled(u,d){const p=this._repositories.get(u);p&&(d?p.input.validateInput=async(c,l)=>{const n=await this._proxy.$validateInput(u,c,l);return n&&{message:n[0],type:n[1]}}:p.input.validateInput=async()=>{})}};e.MainThreadSCM=s,e.MainThreadSCM=s=fe([(0,f.extHostNamedCustomer)(T.MainContext.MainThreadSCM),O(1,D.ISCMService),O(2,D.ISCMViewService),O(3,h.IQuickDiffService)],s)}),define(Q[3834],Y([1,0,4,60,503,53,11,14,602,295,690]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadSecretState=void 0;class h extends t.Disposable{constructor(i,s,o,u){super(),this._proxy=i,this.credentialsService=s,this.encryptionService=o,this.logService=u,this.secretStoragePrefix=this.credentialsService.getSecretStoragePrefix(),this._register(this.credentialsService.onDidChangePassword(async d=>{const p=d.service?.substring((await this.secretStoragePrefix).length);p&&this._proxy.$onDidChangePassword({extensionId:p,key:d.account})}))}async getFullKey(i){return`${await this.secretStoragePrefix}${i}`}async $getPassword(i,s){this.logService.trace(`MainThreadSecretState#getPassword: Getting password for ${i} extension: `,s);const o=await this.getFullKey(i),u=await this.credentialsService.getPassword(o,s);if(!u){this.logService.trace("MainThreadSecretState#getPassword: No password found for: ",s);return}let d;try{this.logService.trace("MainThreadSecretState#getPassword: Decrypting password for: ",s),d=await this.encryptionService.decrypt(u)}catch(p){this.logService.error(p),this.logService.trace("MainThreadSecretState#getPassword: Trying migration for: ",s);const c=await this.encryptionService.encrypt(u);await this.credentialsService.setPassword(o,s,c);const l=await this.credentialsService.getPassword(o,s);d=l&&await this.encryptionService.decrypt(l)}if(d)try{const p=JSON.parse(d);if(p.extensionId===i)return this.logService.trace("MainThreadSecretState#getPassword: Password found for: ",s),p.content}catch(p){throw this.logService.error(p),new Error("Unable to parse decrypted password")}this.logService.trace("MainThreadSecretState#getPassword: No password found for: ",s)}async $setPassword(i,s,o){this.logService.trace(`MainThreadSecretState#setPassword: Setting password for ${i} extension: `,s);const u=await this.getFullKey(i),d=JSON.stringify({extensionId:i,content:o});this.logService.trace("MainThreadSecretState#setPassword: Encrypting password for: ",s);const p=await this.encryptionService.encrypt(d);return this.logService.trace("MainThreadSecretState#setPassword: Storing password for: ",s),await this.credentialsService.setPassword(u,s,p)}async $deletePassword(i,s){try{const o=await this.getFullKey(i);await this.credentialsService.deletePassword(o,s)}catch{throw new Error("Cannot delete password")}}}let a=class extends t.Disposable{constructor(i,s,o,u,d,p){super(),this.secretStorageService=s,this.logService=o,this.credentialsService=u,this.encryptionService=d,this._sequencer=new f.SequencerByKey,this.secretStoragePrefix=this.credentialsService.getSecretStoragePrefix(),this._proxy=i.getProxy(D.ExtHostContext.ExtHostSecretState),p.options?.credentialsProvider&&!p.options?.secretStorageProvider&&(this._oldMainThreadSecretState=this._register(new h(this._proxy,u,d,o))),this._register(this.secretStorageService.onDidChangeSecret(c=>{try{const{extensionId:l,key:n}=this.parseKey(c);l&&n&&this._proxy.$onDidChangePassword({extensionId:l,key:n})}catch{}}))}$getPassword(i,s){return this.logService.trace(`[mainThreadSecretState] Getting password for ${i} extension: `,s),this._sequencer.queue(i,()=>this.doGetPassword(i,s))}async doGetPassword(i,s){if(this._oldMainThreadSecretState)return await this._oldMainThreadSecretState.$getPassword(i,s);const o=this.getKey(i,s),u=await this.secretStorageService.get(o);return u?(this.logService.trace("[mainThreadSecretState] Password found for: ",i,s),u):(this.logService.trace("[mainThreadSecretState] No password found for: ",i,s),await this.getAndDeleteOldPassword(i,s))}$setPassword(i,s,o){return this.logService.trace(`[mainThreadSecretState] Setting password for ${i} extension: `,s),this._sequencer.queue(i,()=>this.doSetPassword(i,s,o))}async doSetPassword(i,s,o){if(this._oldMainThreadSecretState)return await this._oldMainThreadSecretState.$setPassword(i,s,o);const u=this.getKey(i,s);await this.secretStorageService.set(u,o),this.logService.trace("[mainThreadSecretState] Password set for: ",i,s)}$deletePassword(i,s){return this.logService.trace(`[mainThreadSecretState] Deleting password for ${i} extension: `,s),this._sequencer.queue(i,()=>this.doDeletePassword(i,s))}async doDeletePassword(i,s){if(this._oldMainThreadSecretState)return await this._oldMainThreadSecretState.$deletePassword(i,s);const o=this.getKey(i,s);await this.secretStorageService.delete(o),this.logService.trace("[mainThreadSecretState] Password deleted for: ",i,s)}getKey(i,s){return JSON.stringify({extensionId:i,key:s})}parseKey(i){return JSON.parse(i)}async getAndDeleteOldPassword(i,s){const o=await this.getOldPassword(i,s);if(o){const u=this.getKey(i,s);this.logService.trace("[mainThreadSecretState] Setting old password to new location for: ",i,s),await this.secretStorageService.set(u,o),this.logService.trace("[mainThreadSecretState] Old Password set to new location for: ",i,s),this.secretStorageService.type==="persisted"&&(this.logService.trace("[mainThreadSecretState] Deleting old password for since it was persisted in the new location: ",i,s),await this.deleteOldPassword(i,s))}return o}async getOldPassword(i,s){this.logService.trace(`[mainThreadSecretState] Getting old password for ${i} extension: `,s);const o=`${await this.secretStoragePrefix}${i}`,u=await this.credentialsService.getPassword(o,s);if(!u){this.logService.trace("[mainThreadSecretState] No old password found for: ",i,s);return}let d;try{this.logService.trace("[mainThreadSecretState] Decrypting old password for: ",i,s),d=await this.encryptionService.decrypt(u)}catch(p){this.logService.error(p),this.logService.trace("[mainThreadSecretState] Trying old migration for: ",i,s);const c=await this.encryptionService.encrypt(u);await this.credentialsService.setPassword(o,s,c);const l=await this.credentialsService.getPassword(o,s);d=l&&await this.encryptionService.decrypt(l)}if(d)try{const p=JSON.parse(d);if(p.extensionId===i)return this.logService.trace("[mainThreadSecretState] Old password found for: ",i,s),p.content}catch(p){this.logService.error(p);return}this.logService.trace("[mainThreadSecretState] No old password found for: ",i,s)}async deleteOldPassword(i,s){try{const o=`${await this.secretStoragePrefix}${i}`;this.logService.trace(`[mainThreadSecretState] Deleting old password for ${i} extension: `,s),await this.credentialsService.deletePassword(o,s),this.logService.trace("[mainThreadSecretState] Old password deleted for: ",i,s)}catch{throw new Error("Cannot delete password")}}};e.MainThreadSecretState=a,e.MainThreadSecretState=a=fe([(0,y.extHostNamedCustomer)(D.MainContext.MainThreadSecretState),O(1,v.ISecretStorageService),O(2,T.ILogService),O(3,b.ICredentialsService),O(4,S.IEncryptionService),O(5,m.IBrowserWorkbenchEnvironmentService)],a)}),define(Q[3835],Y([1,0,31,4,10,53,1303,60]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadShare=void 0;let v=class{constructor(S,h){this.shareService=h,this.providers=new Map,this.providerDisposables=new Map,this.proxy=S.getProxy(D.ExtHostContext.ExtHostShare)}$registerShareProvider(S,h,a,r,i){const s={id:a,label:r,selector:h,priority:i,provideShare:async u=>{const d=await this.proxy.$provideShare(S,u,new t.CancellationTokenSource().token);return typeof d=="string"?d:b.URI.revive(d)}};this.providers.set(S,s);const o=this.shareService.registerShareProvider(s);this.providerDisposables.set(S,o)}$unregisterShareProvider(S){this.providers.has(S)&&this.providers.delete(S),this.providerDisposables.has(S)&&this.providerDisposables.delete(S)}dispose(){this.providers.clear(),(0,y.dispose)(this.providerDisposables.values()),this.providerDisposables.clear()}};e.MainThreadShare=v,e.MainThreadShare=v=fe([(0,f.extHostNamedCustomer)(D.MainContext.MainThreadShare),O(1,T.IShareService)],v)}),define(Q[3836],Y([1,0,24,53,60,4,18,519,3747,5,11]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadStorage=void 0;let h=class{constructor(r,i,s,o,u){this._extensionStorageService=i,this._storageService=s,this._instantiationService=o,this._logService=u,this._storageListener=new D.DisposableStore,this._sharedStorageKeysToWatch=new Map,this._proxy=r.getProxy(y.ExtHostContext.ExtHostStorage),this._storageListener.add(this._storageService.onDidChangeValue(0,void 0,this._storageListener)(d=>{if(this._sharedStorageKeysToWatch.has(d.key)){const p=this._extensionStorageService.getExtensionStateRaw(d.key,!0);typeof p=="string"&&this._proxy.$acceptValue(!0,d.key,p)}}))}dispose(){this._storageListener.dispose()}async $initializeExtensionStorage(r,i){return await this.checkAndMigrateExtensionStorage(i,r),r&&this._sharedStorageKeysToWatch.set(i,!0),this._extensionStorageService.getExtensionStateRaw(i,r)}async $setValue(r,i,s){this._extensionStorageService.setExtensionState(i,s,r)}$registerExtensionStorageKeysToSync(r,i){this._extensionStorageService.setKeysForSync(r,i)}async checkAndMigrateExtensionStorage(r,i){try{let s=this._extensionStorageService.getSourceExtensionToMigrate(r);!s&&T.isWeb&&r!==r.toLowerCase()&&(s=r.toLowerCase()),s&&(T.isWeb&&s!==s.toLowerCase()&&this._extensionStorageService.getExtensionState(s.toLowerCase(),i)&&!this._extensionStorageService.getExtensionState(s,i)&&(s=s.toLowerCase()),await(0,v.migrateExtensionStorage)(s,r,i,this._instantiationService))}catch(s){this._logService.error(s)}}};e.MainThreadStorage=h,e.MainThreadStorage=h=fe([(0,b.extHostNamedCustomer)(y.MainContext.MainThreadStorage),O(1,f.IExtensionStorageService),O(2,t.IStorageService),O(3,m.IInstantiationService),O(4,S.ILogService)],h)}),define(Q[3837],Y([1,0,2510,10,59,17,18,39,383,357,60,53,268,15]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTask=void 0;var i;(function(L){function R(M){return{id:M.id,task:I.from(M.task)}}L.from=R})(i||(i={}));var s;(function(L){function R(M,N){return{id:M.id,processId:N}}L.from=R})(s||(s={}));var o;(function(L){function R(M,N){return{id:M.id,exitCode:N}}L.from=R})(o||(o={}));var u;(function(L){function R(N){const P=Object.assign(Object.create(null),N);return delete P._key,P}L.from=R;function M(N,P){let x=v.TaskDefinition.createTaskIdentifier(N,console);return x===void 0&&P&&(x={_key:(0,b.generateUuid)(),type:"$executeOnly"}),x}L.to=M})(u||(u={}));var d;(function(L){function R(N){if(N!=null)return Object.assign(Object.create(null),N)}L.from=R;function M(N){return N==null?v.PresentationOptions.defaults:Object.assign(Object.create(null),v.PresentationOptions.defaults,N)}L.to=M})(d||(d={}));var p;(function(L){function R(N){if(N!=null)return Object.assign(Object.create(null),N)}L.from=R;function M(N){return N==null?v.RunOptions.defaults:Object.assign(Object.create(null),v.RunOptions.defaults,N)}L.to=M})(p||(p={}));var c;(function(L){function R(N){if(N!=null)return{cwd:N.cwd,env:N.env}}L.from=R;function M(N){return N==null?v.CommandOptions.defaults:{cwd:N.cwd||v.CommandOptions.defaults.cwd,env:N.env}}L.to=M})(c||(c={}));var l;(function(L){function R(P){const x=P;return x&&!!x.process}L.is=R;function M(P){const x=D.isString(P.name)?P.name:P.name.value,F=P.args?P.args.map(W=>D.isString(W)?W:W.value):[],V={process:x,args:F};return P.options&&(V.options=c.from(P.options)),V}L.from=M;function N(P){const x={runtime:v.RuntimeType.Process,name:P.process,args:P.args,presentation:void 0};return x.options=c.to(P.options),x}L.to=N})(l||(l={}));var n;(function(L){function R(N){if(N==null)return;const P={cwd:N.cwd||v.CommandOptions.defaults.cwd,env:N.env};return N.shell&&(P.executable=N.shell.executable,P.shellArgs=N.shell.args,P.shellQuoting=N.shell.quoting),P}L.from=R;function M(N){if(N==null)return;const P={cwd:N.cwd,env:N.env};return N.executable&&(P.shell={executable:N.executable},N.shellArgs&&(P.shell.args=N.shellArgs),N.shellQuoting&&(P.shell.quoting=N.shellQuoting)),P}L.to=M})(n||(n={}));var g;(function(L){function R(P){const x=P;return x&&(!!x.commandLine||!!x.command)}L.is=R;function M(P){const x={};return P.name&&D.isString(P.name)&&(P.args===void 0||P.args===null||P.args.length===0)?x.commandLine=P.name:(x.command=P.name,x.args=P.args),P.options&&(x.options=n.from(P.options)),x}L.from=M;function N(P){const x={runtime:v.RuntimeType.Shell,name:P.commandLine?P.commandLine:P.command,args:P.args,presentation:void 0};return P.options&&(x.options=n.to(P.options)),x}L.to=N})(g||(g={}));var w;(function(L){function R(P){const x=P;return x&&x.customExecution==="customExecution"}L.is=R;function M(P){return{customExecution:"customExecution"}}L.from=M;function N(P){return{runtime:v.RuntimeType.CustomExecution,presentation:void 0}}L.to=N})(w||(w={}));var E;(function(L){function R(N){const P={label:N.label};return N.kind===v.TaskSourceKind.Extension?(P.extensionId=N.extension,N.workspaceFolder?P.scope=N.workspaceFolder.uri:P.scope=N.scope):N.kind===v.TaskSourceKind.Workspace&&(P.extensionId="$core",P.scope=N.config.workspaceFolder?N.config.workspaceFolder.uri:1),P}L.from=R;function M(N,P){let x,F;return N.scope===void 0||typeof N.scope=="number"&&N.scope!==1?P.getWorkspace().folders.length===0?(x=1,F=void 0):(x=3,F=P.getWorkspace().folders[0]):typeof N.scope=="number"?x=N.scope:(x=3,F=P.getWorkspaceFolder(y.URI.revive(N.scope))??void 0),{kind:v.TaskSourceKind.Extension,label:N.label,extension:N.extensionId,scope:x,workspaceFolder:F}}L.to=M})(E||(E={}));var C;(function(L){function R(M){const N=M;return N&&D.isString(N.id)&&!!N.workspaceFolder}L.is=R})(C||(C={}));var I;(function(L){function R(N){if(N==null||!v.CustomTask.is(N)&&!v.ContributedTask.is(N)&&!v.ConfiguringTask.is(N))return;const P={_id:N._id,name:N.configurationProperties.name,definition:u.from(N.getDefinition(!0)),source:E.from(N._source),execution:void 0,presentationOptions:!v.ConfiguringTask.is(N)&&N.command?d.from(N.command.presentation):void 0,isBackground:N.configurationProperties.isBackground,problemMatchers:[],hasDefinedMatchers:v.ContributedTask.is(N)?N.hasDefinedMatchers:!1,runOptions:p.from(N.runOptions)};if(P.group=_.from(N.configurationProperties.group),N.configurationProperties.detail&&(P.detail=N.configurationProperties.detail),!v.ConfiguringTask.is(N)&&N.command)switch(N.command.runtime){case v.RuntimeType.Process:P.execution=l.from(N.command);break;case v.RuntimeType.Shell:P.execution=g.from(N.command);break;case v.RuntimeType.CustomExecution:P.execution=w.from(N.command);break}if(N.configurationProperties.problemMatchers)for(const x of N.configurationProperties.problemMatchers)D.isString(x)&&P.problemMatchers.push(x);return P}L.from=R;function M(N,P,x,F,V){if(!N||typeof N.name!="string")return;let W;if(N.execution&&(g.is(N.execution)?W=g.to(N.execution):l.is(N.execution)?W=l.to(N.execution):w.is(N.execution)&&(W=w.to(N.execution))),!W)return;W.presentation=d.to(N.presentationOptions);const z=E.to(N.source,P),B=t.localize(0,null,z.label,N.name),K=u.to(N.definition,x),H=w.is(N.execution)&&N._id?N._id:`${N.source.extensionId}.${K._key}`;return new v.ContributedTask(H,z,B,K.type,K,W,N.hasDefinedMatchers,p.to(N.runOptions),{name:N.name,identifier:B,group:N.group,isBackground:!!N.isBackground,problemMatchers:N.problemMatchers.slice(),detail:N.detail,icon:F,hide:V})}L.to=M})(I||(I={}));var _;(function(L){function R(M){if(M!==void 0)return{_id:typeof M=="string"?M:M._id,isDefault:typeof M=="string"||typeof M.isDefault=="string"?!1:M.isDefault}}L.from=R})(_||(_={}));var A;(function(L){function R(N){return N}L.from=R;function M(N){return N}L.to=M})(A||(A={}));let k=class{constructor(R,M,N,P){this._taskService=M,this._workspaceContextServer=N,this._configurationResolverService=P,this._proxy=R.getProxy(h.ExtHostContext.ExtHostTask),this._providers=new Map,this._taskService.onDidStateChange(async x=>{const F=x.__task;if(x.kind==="start"){const V=i.from(F.getTaskExecution());let W=V.task.definition;if(V.task?.execution&&w.is(V.task.execution)&&x.resolvedVariables){const z={};for(const[B,K]of x.resolvedVariables.entries())z[B]=K;W=await this._configurationResolverService.resolveAnyAsync(F.getWorkspaceFolder(),V.task.definition,z)}this._proxy.$onDidStartTask(V,x.terminalId,W)}else x.kind==="processStarted"?this._proxy.$onDidStartTaskProcess(s.from(F.getTaskExecution(),x.processId)):x.kind==="processEnded"?this._proxy.$onDidEndTaskProcess(o.from(F.getTaskExecution(),x.exitCode)):x.kind==="end"&&this._proxy.$OnDidEndTask(i.from(F.getTaskExecution()))})}dispose(){for(const R of this._providers.values())R.disposable.dispose();this._providers.clear()}$createTaskId(R){return new Promise((M,N)=>{const P=I.to(R,this._workspaceContextServer,!0);P?M(P._id):N(new Error("Task could not be created from DTO"))})}$registerTaskProvider(R,M){const N={provideTasks:x=>Promise.resolve(this._proxy.$provideTasks(R,x)).then(F=>{const V=[];for(const W of F.tasks){const z=I.to(W,this._workspaceContextServer,!0);z?V.push(z):console.error(`Task System: can not convert task: ${JSON.stringify(W.definition,void 0,0)}. Task will be dropped`)}return{tasks:V,extension:F.extension}}),resolveTask:x=>{const F=I.from(x);return F?(F.name=F.name===void 0?"":F.name,Promise.resolve(this._proxy.$resolveTask(R,F)).then(V=>{if(V)return I.to(V,this._workspaceContextServer,!0,x.configurationProperties.icon,x.configurationProperties.hide)})):Promise.resolve(void 0)}},P=this._taskService.registerTaskProvider(N,M);return this._providers.set(R,{disposable:P,provider:N}),Promise.resolve(void 0)}$unregisterTaskProvider(R){const M=this._providers.get(R);return M&&(M.disposable.dispose(),this._providers.delete(R)),Promise.resolve(void 0)}$fetchTasks(R){return this._taskService.tasks(A.to(R)).then(M=>{const N=[];for(const P of M){const x=I.from(P);x&&N.push(x)}return N})}getWorkspace(R){let M;if(typeof R=="string")M=R;else{const N=this._workspaceContextServer.getWorkspace(),P=y.URI.revive(R);N.configuration?.toString()===P.toString()?M=N:M=this._workspaceContextServer.getWorkspaceFolder(P)}return M}async $getTaskExecution(R){if(C.is(R)){const M=this.getWorkspace(R.workspaceFolder);if(M){const N=await this._taskService.getTask(M,R.id,!0);if(N)return{id:N._id,task:I.from(N)};throw new Error("Task not found")}else throw new Error("No workspace folder")}else{const M=I.to(R,this._workspaceContextServer,!0);return{id:M._id,task:I.from(M)}}}$executeTask(R){return new Promise((M,N)=>{if(C.is(R)){const P=this.getWorkspace(R.workspaceFolder);P?this._taskService.getTask(P,R.id,!0).then(x=>{if(!x)N(new Error("Task not found"));else{const F={id:R.id,task:I.from(x)};this._taskService.run(x).then(V=>{(V?.exitCode===void 0||V.exitCode!==0)&&this._proxy.$OnDidEndTask(F)},V=>{}),M(F)}},x=>{N(new Error("Task not found"))}):N(new Error("No workspace folder"))}else{const P=I.to(R,this._workspaceContextServer,!0);this._taskService.run(P).then(void 0,F=>{});const x={id:P._id,task:I.from(P)};M(x)}})}$customExecutionComplete(R,M){return new Promise((N,P)=>{this._taskService.getActiveTasks().then(x=>{for(const F of x)if(R===F._id){this._taskService.extensionCallbackTaskComplete(F,M).then(V=>{N(void 0)},V=>{P(V)});return}P(new Error("Task to mark as complete not found"))})})}$terminateTask(R){return new Promise((M,N)=>{this._taskService.getActiveTasks().then(P=>{for(const x of P)if(R===x._id){this._taskService.terminate(x).then(F=>{M(void 0)},F=>{N(void 0)});return}N(new r.ErrorNoTelemetry("Task to terminate not found"))})})}$registerTaskSystem(R,M){let N;switch(M.platform){case"Web":N=0;break;case"win32":N=3;break;case"darwin":N=1;break;case"linux":N=2;break;default:N=T.platform}this._taskService.registerTaskSystem(R,{platform:N,uriProvider:P=>y.URI.from({scheme:M.scheme,authority:M.authority,path:P}),context:this._extHostContext,resolveVariables:(P,x,F)=>{const V=[];return x.variables.forEach(W=>V.push(W)),Promise.resolve(this._proxy.$resolveVariables(P.uri,{process:x.process,variables:V})).then(W=>{const z=Array.from(Object.values(W.variables));return new Promise((B,K)=>{this._configurationResolverService.resolveWithInteraction(P,z,"tasks",void 0,F).then(H=>{H||B(void 0);const U={process:void 0,variables:new Map};for(let G=0;G<z.length;G++){const $=V[G].substring(2,V[G].length-1);if(H&&W.variables[V[G]]===V[G]){const ie=H.get($);typeof ie=="string"&&U.variables.set($,ie)}else U.variables.set($,z[G])}D.isString(W.process)&&(U.process=W.process),B(U)},H=>{K(H)})})})},findExecutable:(P,x,F)=>this._proxy.$findExecutable(P,x,F)})}async $registerSupportedExecutions(R,M,N){return this._taskService.registerSupportedExecutions(R,M,N)}};e.MainThreadTask=k,e.MainThreadTask=k=fe([(0,S.extHostNamedCustomer)(h.MainContext.MainThreadTask),O(1,m.ITaskService),O(2,f.IWorkspaceContextService),O(3,a.IConfigurationResolverService)],k)}),define(Q[3838],Y([1,0,4,9,91,52,30,231,60,53]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTelemetry=void 0;let h=class extends t.Disposable{static{S=this}static{this._name="pluginHostTelemetry"}constructor(r,i,s,o,u){super(),this._telemetryService=i,this._configurationService=s,this._environmentService=o,this._productService=u,this._proxy=r.getProxy(m.ExtHostContext.ExtHostTelemetry),(0,f.supportsTelemetry)(this._productService,this._environmentService)&&this._register(this._configurationService.onDidChangeConfiguration(d=>{(d.affectsConfiguration(T.TELEMETRY_SETTING_ID)||d.affectsConfiguration(T.TELEMETRY_OLD_SETTING_ID))&&this._proxy.$onDidChangeTelemetryLevel(this.telemetryLevel)})),this._proxy.$initializeTelemetryLevel(this.telemetryLevel,(0,f.supportsTelemetry)(this._productService,this._environmentService),this._productService.enabledTelemetryLevels)}get telemetryLevel(){return(0,f.supportsTelemetry)(this._productService,this._environmentService)?this._telemetryService.telemetryLevel:0}$publicLog(r,i=Object.create(null)){i[S._name]=!0,this._telemetryService.publicLog(r,i)}$publicLog2(r,i){this.$publicLog(r,i)}};e.MainThreadTelemetry=h,e.MainThreadTelemetry=h=S=fe([(0,v.extHostNamedCustomer)(m.MainContext.MainThreadTelemetry),O(1,T.ITelemetryService),O(2,y.IConfigurationService),O(3,b.IEnvironmentService),O(4,D.IProductService)],h)}),define(Q[3839],Y([1,0,4,186,10,27,534,312,3643,359,535,334,358,60,53,1030,235]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTesting=void 0;let u=class extends t.Disposable{constructor(p,c,l,n){super(),this.testService=c,this.testProfiles=l,this.resultService=n,this.diffListener=this._register(new t.MutableDisposable),this.testProviderRegistrations=new Map,this.proxy=p.getProxy(i.ExtHostContext.ExtHostTesting),this._register(this.testService.onDidCancelTestRun(({runId:g})=>{this.proxy.$cancelExtensionTestRun(g)})),this._register(n.onResultsChanged(g=>{const E=("completed"in g?g.completed:"inserted"in g?g.inserted:void 0)?.toJSONWithMessages();E&&this.proxy.$publishTestResults([E])}))}$markTestRetired(p){let c;if(p){c=new s.WellDefinedPrefixTree;for(const l of p)c.insert(o.TestId.fromString(l).path,void 0)}for(const l of this.resultService.results)l instanceof S.LiveTestResult&&l.markRetired(c)}$publishTestRunProfile(p){const c=this.testProviderRegistrations.get(p.controllerId);c&&this.testProfiles.addProfile(c.instance,p)}$updateTestRunConfig(p,c,l){this.testProfiles.updateProfile(p,c,l)}$removeTestProfile(p,c){this.testProfiles.removeProfile(p,c)}$addTestsToRun(p,c,l){this.withLiveRun(c,n=>n.addTestChainToRun(p,l.map(f.ITestItem.deserialize)))}$signalCoverageAvailable(p,c){this.withLiveRun(p,l=>{const n=l.tasks.find(g=>g.id===c);n&&(n.coverage.value=new v.TestCoverage({provideFileCoverage:async g=>(0,y.revive)(await this.proxy.$provideFileCoverage(p,c,g)),resolveFileCoverage:(g,w)=>this.proxy.$resolveFileCoverage(p,c,g,w)}))})}$startedExtensionTestRun(p){this.resultService.createLiveResult(p)}$startedTestRunTask(p,c){this.withLiveRun(p,l=>l.addTask(c))}$finishedTestRunTask(p,c){this.withLiveRun(p,l=>l.markTaskComplete(c))}$finishedExtensionTestRun(p){this.withLiveRun(p,c=>c.markComplete())}$updateTestStateInRun(p,c,l,n,g){this.withLiveRun(p,w=>w.updateState(l,c,n,g))}$appendOutputToRun(p,c,l,n,g){const w=n&&{uri:b.URI.revive(n.uri),range:D.Range.lift(n.range)};this.withLiveRun(p,E=>E.appendOutput(l,c,w,g))}$appendTestMessagesInRun(p,c,l,n){const g=this.resultService.getResult(p);if(g&&g instanceof S.LiveTestResult)for(const w of n)g.appendMessage(l,c,f.ITestMessage.deserialize(w))}$registerTestController(p,c,l){const n=new t.DisposableStore,g=n.add(new T.MutableObservableValue(c)),w=n.add(new T.MutableObservableValue(l)),E={id:p,label:g,canRefresh:w,syncTests:()=>this.proxy.$syncTests(),refreshTests:C=>this.proxy.$refreshTests(p,C),configureRunProfile:C=>this.proxy.$configureRunProfile(p,C),runTests:(C,I)=>this.proxy.$runControllerTests(C,I),startContinuousRun:(C,I)=>this.proxy.$startContinuousRun(C,I),expandTest:(C,I)=>this.proxy.$expandTest(C,isFinite(I)?I:-1)};n.add((0,t.toDisposable)(()=>this.testProfiles.removeProfile(p))),n.add(this.testService.registerTestController(p,E)),this.testProviderRegistrations.set(p,{instance:E,label:g,canRefresh:w,disposable:n})}$updateController(p,c){const l=this.testProviderRegistrations.get(p);l&&(c.label!==void 0&&(l.label.value=c.label),c.canRefresh!==void 0&&(l.canRefresh.value=c.canRefresh))}$unregisterTestController(p){this.testProviderRegistrations.get(p)?.disposable.dispose(),this.testProviderRegistrations.delete(p)}$subscribeToDiffs(){this.proxy.$acceptDiff(this.testService.collection.getReviverDiff().map(f.TestsDiffOp.serialize)),this.diffListener.value=this.testService.onDidProcessDiff(this.proxy.$acceptDiff,this.proxy)}$unsubscribeFromDiffs(){this.diffListener.clear()}$publishDiff(p,c){this.testService.publishDiff(p,c.map(f.TestsDiffOp.deserialize))}async $runTests(p,c){return(await this.testService.runResolvedTests(p,c)).id}dispose(){super.dispose();for(const p of this.testProviderRegistrations.values())p.disposable.dispose();this.testProviderRegistrations.clear()}withLiveRun(p,c){const l=this.resultService.getResult(p);return l&&l instanceof S.LiveTestResult?c(l):void 0}};e.MainThreadTesting=u,e.MainThreadTesting=u=fe([(0,r.extHostNamedCustomer)(i.MainContext.MainThreadTesting),O(1,a.ITestService),O(2,m.ITestProfileService),O(3,h.ITestResultService)],u)}),define(Q[3840],Y([1,0,53,60,19]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTheming=void 0;let D=class{constructor(f,v){this._themeService=v,this._proxy=f.getProxy(t.ExtHostContext.ExtHostTheming),this._themeChangeListener=this._themeService.onDidColorThemeChange(m=>{this._proxy.$onColorThemeChange(this._themeService.getColorTheme().type)}),this._proxy.$onColorThemeChange(this._themeService.getColorTheme().type)}dispose(){this._themeChangeListener.dispose()}};e.MainThreadTheming=D,e.MainThreadTheming=D=fe([(0,y.extHostNamedCustomer)(t.MainContext.MainThreadTheming),O(1,b.IThemeService)],D)}),define(Q[3841],Y([1,0,6,11,53,60,619,186]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTimeline=void 0;let v=class{constructor(S,h,a){this.logService=h,this._timelineService=a,this._providerEmitters=new Map,this._proxy=S.getProxy(b.ExtHostContext.ExtHostTimeline)}$registerTimelineProvider(S){this.logService.trace(`MainThreadTimeline#registerTimelineProvider: id=${S.id}`);const h=this._proxy,a=this._providerEmitters;let r=a.get(S.id);r===void 0&&(r=new t.Emitter,a.set(S.id,r)),this._timelineService.registerTimelineProvider({...S,onDidChange:r.event,async provideTimeline(i,s,o){return(0,f.revive)(await h.$getTimeline(S.id,i,s,o))},dispose(){a.delete(S.id),r?.dispose()}})}$unregisterTimelineProvider(S){this.logService.trace(`MainThreadTimeline#unregisterTimelineProvider: id=${S}`),this._timelineService.unregisterTimelineProvider(S)}$emitTimelineChangeEvent(S){this.logService.trace(`MainThreadTimeline#emitChangeEvent: id=${S.id}, uri=${S.uri?.toString(!0)}`),this._providerEmitters.get(S.id)?.fire(S)}dispose(){}};e.MainThreadTimeline=v,e.MainThreadTimeline=v=fe([(0,D.extHostNamedCustomer)(b.MainContext.MainThreadTimeline),O(1,y.ILogService),O(2,T.ITimelineService)],v)}),define(Q[1364],Y([1,0,4,53,46,60,20,23,17,16,44,11,853,365,1248,1339]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeViewDataProvider=e.MainThreadTreeViews=void 0;let o=class extends t.Disposable{constructor(c,l,n,g,w,E){super(),this.viewsService=l,this.notificationService=n,this.extensionService=g,this.logService=w,this.connectionTreeService=E,this._dataProviders=new Map,this._dndControllers=new Map,this._proxy=c.getProxy(y.ExtHostContext.ExtHostTreeViews)}async $registerTreeViewDataProvider(c,l){this.logService.trace("MainThreadTreeViews#$registerTreeViewDataProvider",c,l),this.extensionService.whenInstalledExtensionsRegistered().then(()=>{const n=new d(c,this._proxy,this.notificationService);this._dataProviders.set(c,n);const g=l.hasHandleDrag||l.hasHandleDrop?new u(c,l.dropMimeTypes,l.dragMimeTypes,l.hasHandleDrag,this._proxy):void 0,w=this.getTreeView(c);w?(w.showCollapseAllAction=l.showCollapseAll,w.canSelectMany=l.canSelectMany,w.manuallyManageCheckboxes=l.manuallyManageCheckboxes,w.dragAndDropController=g,g&&this._dndControllers.set(c,g),w.dataProvider=n,this.registerListeners(c,w),this._proxy.$setVisible(c,w.visible)):c.includes("connectionDialog")?this.connectionTreeService.registerTreeProvider(c,n):this.notificationService.error("No view is registered with id: "+c)})}$reveal(c,l,n){return this.logService.trace("MainThreadTreeViews#$reveal",c,l?.item,l?.parentChain,n),this.viewsService.openView(c,n.focus).then(()=>{const g=this.getTreeView(c);if(g&&l)return this.reveal(g,this._dataProviders.get(c),l.item,l.parentChain,n)})}$refresh(c,l){this.logService.trace("MainThreadTreeViews#$refresh",c,l);const n=this.getTreeView(c),g=this._dataProviders.get(c);if(n&&g){const w=g.getItemsToRefresh(l);return n.refresh(w.length?w:void 0)}else if(c.includes("connectionDialog")){const w=g.getItemsToRefresh(l);return this.connectionTreeService.view?.refresh(w.length?w:void 0)}return Promise.resolve()}$setMessage(c,l){this.logService.trace("MainThreadTreeViews#$setMessage",c,l.toString());const n=this.getTreeView(c);n&&(n.message=l)}$setTitle(c,l,n){this.logService.trace("MainThreadTreeViews#$setTitle",c,l,n);const g=this.getTreeView(c);g&&(g.title=l,g.description=n)}$setBadge(c,l){this.logService.trace("MainThreadTreeViews#$setBadge",c,l?.value,l?.tooltip);const n=this.getTreeView(c);n&&(n.badge=l)}$resolveDropFileData(c,l,n){const g=this._dndControllers.get(c);if(!g)throw new Error("Unknown tree");return g.resolveDropFileData(l,n)}async $disposeTree(c){const l=this.getTreeView(c);l&&(l.dataProvider=void 0)}async reveal(c,l,n,g,w){w=w||{select:!1,focus:!1};const E=(0,v.isUndefinedOrNull)(w.select)?!1:w.select,C=(0,v.isUndefinedOrNull)(w.focus)?!1:w.focus;let I=Math.min((0,v.isNumber)(w.expand)?w.expand:w.expand===!0?1:0,3);l.isEmpty()&&await c.refresh();for(const A of g){const k=l.getItem(A.handle);k&&await c.expand(k)}const _=l.getItem(n.handle);if(_){await c.reveal(_),E&&c.setSelection([_]),C===!1?c.setFocus():C&&c.setFocus(_);let A=[_];for(;A.length>0&&I>0;I--)await c.expand(A),A=A.reduce((k,L)=>{const R=l.getItem(L.handle);return R&&R.children&&R.children.length&&k.push(...R.children),k},[])}}registerListeners(c,l){this._register(l.onDidExpandItem(n=>this._proxy.$setExpanded(c,n.handle,!0))),this._register(l.onDidCollapseItem(n=>this._proxy.$setExpanded(c,n.handle,!1))),this._register(l.onDidChangeSelectionAndFocus(n=>this._proxy.$setSelectionAndFocus(c,n.selection.map(({handle:g})=>g),n.focus.handle))),this._register(l.onDidChangeVisibility(n=>this._proxy.$setVisible(c,n))),this._register(l.onDidChangeCheckboxState(n=>{this._proxy.$changeCheckboxState(c,n.map(g=>({treeItemHandle:g.handle,newState:g.checkbox?.isChecked??!1})))}))}getTreeView(c){const l=m.Registry.as(b.Extensions.ViewsRegistry).getView(c);return l?l.treeView:null}dispose(){this._dataProviders.forEach((c,l)=>{const n=this.getTreeView(l);n&&(n.dataProvider=void 0)}),this._dataProviders.clear(),this._dndControllers.clear(),super.dispose()}};e.MainThreadTreeViews=o,e.MainThreadTreeViews=o=fe([(0,D.extHostNamedCustomer)(y.MainContext.MainThreadTreeViews),O(1,b.IViewsService),O(2,f.INotificationService),O(3,S.IExtensionService),O(4,h.ILogService),O(5,a.IConnectionTreeService)],o);class u{constructor(c,l,n,g,w){this.treeViewId=c,this.dropMimeTypes=l,this.dragMimeTypes=n,this.hasWillDrop=g,this._proxy=w,this.dataTransfersCache=new i.DataTransferFileCache}async handleDrop(c,l,n,g,w,E){const C=this.dataTransfersCache.add(c);try{const I=await s.DataTransfer.from(c);return n.isCancellationRequested?void 0:await this._proxy.$handleDrop(this.treeViewId,C.id,I,l?.handle,n,g,w,E)}finally{C.dispose()}}async handleDrag(c,l,n){if(!this.hasWillDrop)return;const g=await this._proxy.$handleDrag(this.treeViewId,c,l,n);if(!g)return;const w=new r.VSDataTransfer;return g.items.forEach(([E,C])=>{w.replace(E,(0,r.createStringDataTransferItem)(C.asString))}),w}resolveDropFileData(c,l){return this.dataTransfersCache.resolveFileData(c,l)}}class d{constructor(c,l,n){this.treeViewId=c,this._proxy=l,this.notificationService=n,this.itemsMap=new Map,this.hasResolve=this._proxy.$hasResolve(this.treeViewId)}getChildren(c){return this._proxy.$getChildren(this.treeViewId,c?c.handle:void 0).then(l=>this.postGetChildren(l),l=>(b.NoTreeViewError.is(l)||this.notificationService.error(l),[]))}getItemsToRefresh(c){const l=[];if(c)for(const n of Object.keys(c)){const g=this.getItem(n);if(g){const w=c[n];if(this.updateTreeItem(g,w),n===w.handle)l.push(g);else{this.itemsMap.delete(n),this.itemsMap.set(g.handle,g);const E=w.parentHandle?this.itemsMap.get(w.parentHandle):null;E&&l.push(E)}}}return l}getItem(c){return this.itemsMap.get(c)}isEmpty(){return this.itemsMap.size===0}async postGetChildren(c){if(c===void 0)return;const l=[],n=await this.hasResolve;if(c)for(const g of c)if(n){const w=new b.ResolvableTreeItem(g,n?E=>this._proxy.$resolve(this.treeViewId,g.handle,E):void 0);this.itemsMap.set(g.handle,w),l.push(w)}else this.itemsMap.set(g.handle,g),l.push(g);return l}updateTreeItem(c,l){if(l.children=l.children?l.children:void 0,c){const n=(0,T.distinct)([...Object.keys(c instanceof b.ResolvableTreeItem?c.asTreeItem():c),...Object.keys(l)]);for(const g of n)c[g]=l[g];c instanceof b.ResolvableTreeItem&&c.resetResolve()}}}e.TreeViewDataProvider=d}),define(Q[3842],Y([1,0,1364,46,42,53]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeViewDataProvider=e.ResolvableTreeComponentItem=void 0;class T extends y.ResolvableTreeItem{constructor(m,S){super(m,S),this.checked=m.checked,this.enabled=m.enabled,this.onCheckedChanged=m.onCheckedChanged,this.children=(0,b.deepClone)(m.children)}asTreeItem(){const m=super.asTreeItem();return m.checked=this.checked,m.enabled=this.enabled,m}}e.ResolvableTreeComponentItem=T;class f extends t.TreeViewDataProvider{constructor(m,S,h,a){super(`${m}-${S}`,h.getProxy(D.SqlExtHostContext.ExtHostModelViewTreeViews),a)}onNodeCheckedChanged(m,S){this._proxy.$onNodeCheckedChanged(this.treeViewId,m,S)}onNodeSelected(m){m&&this._proxy.$onNodeSelected(this.treeViewId,m.map(S=>S.handle))}refresh(m){}async postGetChildren(m){const S=[],h=await this.hasResolve;if(m)for(const a of m){const r=new T(a,h?()=>this._proxy.$resolve(this.treeViewId,a.handle,void 0):void 0);this.itemsMap.set(a.handle,r),S.push(r)}return S}}e.TreeViewDataProvider=f}),define(Q[3843],Y([1,0,40,155,445,3340,3493,278,305,5,3842,7,141,19,156,11,23,1597]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class u{constructor(){this.label={label:"root"},this.handle="0",this.parentHandle=null,this.collapsibleState=2,this.children=void 0,this.options=void 0}}let d=class extends y.ComponentBase{constructor(c,l,n,g,w,E){super(c,g,w),this.themeService=l,this._instantiationService=n,this._notificationService=E}ngAfterViewInit(){this._inputContainer&&this.createTreeControl(),this.baseInit()}ngOnDestroy(){this.baseDestroy()}setDataProvider(c,l,n){this._dataProvider=new S.TreeViewDataProvider(c,l,n,this._notificationService),this.createTreeControl()}refreshDataProvider(c){if(this._dataProvider&&this._dataProvider.getItemsToRefresh(c),this._tree)for(const l of(0,a.values)(c))this._tree.refresh(l)}createTreeControl(){if(!this._tree&&this._dataProvider){const c=this._instantiationService.createInstance(T.TreeComponentDataSource,this._dataProvider),l=new D.TreeComponentRenderer(this._dataProvider,this.themeService,{withCheckbox:this.withCheckbox});this._treeRenderer=l;const n=new v.DefaultController,g=new v.DefaultFilter,w=void 0,E=void 0,C=new v.DefaultAccessibilityProvider;this._tree=new b.Tree(this._inputContainer.nativeElement,{dataSource:c,renderer:l,controller:n,dnd:E,filter:g,sorter:w,accessibilityProvider:C},{indentPixels:10,twistiePixels:20,ariaLabel:this.ariaLabel}),this._tree.setInput(new u),this._tree.domFocus(),this._register(this._tree),this._register((0,f.attachListStyler)(this._tree,this.themeService)),this._register(this._tree.onDidChangeSelection(I=>{this._dataProvider.onNodeSelected(I.selection)})),this.onkeydown(this._inputContainer.nativeElement,I=>{I.keyCode===3&&(this._tree.toggleExpansion(this._tree.getFocus()),h.EventHelper.stop(I,!0))}),this._tree.refresh(),this.layout()}}layout(){this._tree&&(this.layoutTree(),this._tree.refresh()),super.layout()}layoutTree(){let c=(0,i.convertSizeToNumber)(this.width),l=(0,i.convertSizeToNumber)(this.height);this._tree.layout(l&&l>0?l:h.getContentHeight(this._inputContainer.nativeElement),c&&c>0?c:h.getContentWidth(this._inputContainer.nativeElement))}setLayout(c){this.layout()}setProperties(c){super.setProperties(c),this._treeRenderer&&(this._treeRenderer.options.withCheckbox=this.withCheckbox),this._tree&&this.ariaLabel&&(this._tree.ariaLabel=this.ariaLabel)}get withCheckbox(){return this.getPropertyOrDefault(c=>c.withCheckbox,!1)}set withCheckbox(c){this.setPropertyFromUI((l,n)=>{l.withCheckbox=n},c)}get CSSStyles(){return this.mergeCss(super.CSSStyles,{width:"100%",height:"100%"})}};fe([(0,t.Input)()],d.prototype,"descriptor",void 0),fe([(0,t.Input)()],d.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("input",{read:t.ElementRef})],d.prototype,"_inputContainer",void 0),d=fe([(0,t.Component)({selector:"modelview-tree",template:` <div #input [ngStyle]="CSSStyles"></div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)(r.IThemeService)),O(2,(0,t.Inject)(m.IInstantiationService)),O(3,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(4,(0,t.Inject)(s.ILogService)),O(5,(0,t.Inject)(o.INotificationService))],d),e.default=d}),define(Q[626],Y([1,0,4,22,18,33,10,2513,41,52,53,3463,474]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.reviveWebviewContentOptions=e.reviveWebviewExtension=e.MainThreadWebviews=void 0;let i=class extends t.Disposable{static{r=this}static{this.standardSupportedLinkSchemes=new Set([y.Schemas.http,y.Schemas.https,y.Schemas.mailto,y.Schemas.vscode,"vscode-insider"])}constructor(d,p,c){super(),this._openerService=p,this._productService=c,this._webviews=new Map,this._proxy=d.getProxy(S.ExtHostContext.ExtHostWebviews)}addWebview(d,p,c){if(this._webviews.has(d))throw new Error("Webview already registered");this._webviews.set(d,p),this.hookupWebviewEventDelegate(d,p,c)}$setHtml(d,p){this.tryGetWebview(d)?.setHtml(p)}$setOptions(d,p){const c=this.tryGetWebview(d);c&&(c.contentOptions=o(p))}async $postMessage(d,p,...c){const l=this.tryGetWebview(d);if(!l)return!1;const{message:n,arrayBuffers:g}=(0,h.deserializeWebviewMessage)(p,c);return l.postMessage(n,g)}hookupWebviewEventDelegate(d,p,c){const l=new t.DisposableStore;l.add(p.onDidClickLink(n=>this.onDidClickLink(d,n))),l.add(p.onMessage(n=>{const g=(0,h.serializeWebviewMessage)(n.message,c);this._proxy.$onMessage(d,g.message,new a.SerializableObjectWithBuffers(g.buffers))})),l.add(p.onMissingCsp(n=>this._proxy.$onMissingCsp(d,n.value))),l.add(p.onDidDispose(()=>{l.dispose(),this._webviews.delete(d)}))}onDidClickLink(d,p){const c=this.getWebview(d);this.isSupportedLink(c,T.URI.parse(p))&&this._openerService.open(p,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:Array.isArray(c.contentOptions.enableCommandUris)||c.contentOptions.enableCommandUris===!0,fromWorkspace:!0})}isSupportedLink(d,p){return r.standardSupportedLinkSchemes.has(p.scheme)||!b.isWeb&&this._productService.urlProtocol===p.scheme?!0:p.scheme===y.Schemas.command?Array.isArray(d.contentOptions.enableCommandUris)?d.contentOptions.enableCommandUris.includes(p.path):d.contentOptions.enableCommandUris===!0:!1}tryGetWebview(d){return this._webviews.get(d)}getWebview(d){const p=this.tryGetWebview(d);if(!p)throw new Error(`Unknown webview handle:${d}`);return p}getWebviewResolvedFailedContent(d){return`<!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> <meta http-equiv="Content-Security-Policy" content="default-src 'none';"> </head> <body>${(0,f.localize)(0,null,(0,D.escape)(d))}</body> </html>`}};e.MainThreadWebviews=i,e.MainThreadWebviews=i=r=fe([O(1,v.IOpenerService),O(2,m.IProductService)],i);function s(u){return{id:u.id,location:T.URI.revive(u.location)}}e.reviveWebviewExtension=s;function o(u){return{allowScripts:u.enableScripts,allowForms:u.enableForms,enableCommandUris:u.enableCommandUris,localResourceRoots:Array.isArray(u.localResourceRoots)?u.localResourceRoots.map(d=>T.URI.revive(d)):void 0,portMapping:u.portMapping}}e.reviveWebviewContentOptions=o}),define(Q[3844],Y([1,0,4,26,10,79,626,53,222,60]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadEditorInsets=void 0;class S{constructor(r,i,s,o){this.editor=r,this.line=i,this.height=s,this.webview=o,this.domNode=document.createElement("div"),this.domNode.style.zIndex="10",this.afterLineNumber=i,this.afterColumn=1,this.heightInLines=s,r.changeViewZones(u=>this._id=u.addZone(this)),o.mountTo(this.domNode)}dispose(){this.editor.changeViewZones(r=>this._id&&r.removeZone(this._id))}}let h=class{constructor(r,i,s){this._editorService=i,this._webviewService=s,this._disposables=new t.DisposableStore,this._insets=new Map,this._proxy=r.getProxy(f.ExtHostContext.ExtHostEditorInsets)}dispose(){this._disposables.dispose()}async $createEditorInset(r,i,s,o,u,d,p,c){let l;i=i.substr(0,i.indexOf(","));for(const C of this._editorService.listCodeEditors())if(C.getId()===i&&C.hasModel()&&(0,y.isEqual)(C.getModel().uri,b.URI.revive(s))){l=C;break}if(!l){setTimeout(()=>this._proxy.$onDidDispose(r));return}const n=new t.DisposableStore,g=this._webviewService.createWebviewElement({title:void 0,options:{enableFindWidget:!1},contentOptions:(0,T.reviveWebviewContentOptions)(d),extension:{id:p,location:b.URI.revive(c)}}),w=new S(l,o,u,g),E=()=>{n.dispose(),this._proxy.$onDidDispose(r),this._insets.delete(r)};n.add(l.onDidChangeModel(E)),n.add(l.onDidDispose(E)),n.add(w),n.add(g),n.add(g.onMessage(C=>this._proxy.$onDidReceiveMessage(r,C.message))),this._insets.set(r,w)}$disposeEditorInset(r){const i=this.getInset(r);this._insets.delete(r),i.dispose()}$setHtml(r,i){this.getInset(r).webview.setHtml(i)}$setOptions(r,i){const s=this.getInset(r);s.webview.contentOptions=(0,T.reviveWebviewContentOptions)(i)}async $postMessage(r,i){return this.getInset(r).webview.postMessage(i),!0}getInset(r){const i=this._insets.get(r);if(!i)throw new Error("Unknown inset");return i}};e.MainThreadEditorInsets=h,e.MainThreadEditorInsets=h=fe([(0,m.extHostNamedCustomer)(f.MainContext.MainThreadEditorInsets),O(1,D.ICodeEditorService),O(2,v.IWebviewService)],h)}),define(Q[3845],Y([1,0,15,4,59,626,53,944,30]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadWebviewsViews=void 0;let m=class extends y.Disposable{constructor(h,a,r,i){super(),this.mainThreadWebviews=a,this._telemetryService=r,this._webviewViewService=i,this._webviewViews=this._register(new y.DisposableMap),this._webviewViewProviders=this._register(new y.DisposableMap),this._proxy=h.getProxy(T.ExtHostContext.ExtHostWebviewViews)}$setWebviewViewTitle(h,a){const r=this.getWebviewView(h);r.title=a}$setWebviewViewDescription(h,a){const r=this.getWebviewView(h);r.description=a}$setWebviewViewBadge(h,a){const r=this.getWebviewView(h);r.badge=a}$show(h,a){this.getWebviewView(h).show(a)}$registerWebviewViewProvider(h,a,r){if(this._webviewViewProviders.has(a))throw new Error(`View provider for ${a} already registered`);const i=(0,D.reviveWebviewExtension)(h),s=this._webviewViewService.register(a,{resolve:async(o,u)=>{const d=(0,b.generateUuid)();this._webviewViews.set(d,o),this.mainThreadWebviews.addWebview(d,o.webview,{serializeBuffersForPostMessage:r.serializeBuffersForPostMessage});let p;if(o.webview.state)try{p=JSON.parse(o.webview.state)}catch(c){console.error("Could not load webview state",c,o.webview.state)}o.webview.extension=i,r&&(o.webview.options=r),o.onDidChangeVisibility(c=>{this._proxy.$onDidChangeWebviewViewVisibility(d,c)}),o.onDispose(()=>{this._proxy.$disposeWebviewView(d),this._webviewViews.deleteAndDispose(d)}),this._telemetryService.publicLog2("webviews:createWebviewView",{extensionId:i.id.value,id:a});try{await this._proxy.$resolveWebviewView(d,a,o.title,p,u)}catch(c){(0,t.onUnexpectedError)(c),o.webview.setHtml(this.mainThreadWebviews.getWebviewResolvedFailedContent(a))}}});this._webviewViewProviders.set(a,s)}$unregisterWebviewViewProvider(h){if(!this._webviewViewProviders.has(h))throw new Error(`No view provider for ${h} registered`);this._webviewViewProviders.deleteAndDispose(h)}getWebviewView(h){const a=this._webviewViews.get(h);if(!a)throw new Error("unknown webview view");return a}};e.MainThreadWebviewsViews=m,e.MainThreadWebviewsViews=m=fe([O(2,v.ITelemetryService),O(3,f.IWebviewViewService)],m)}),define(Q[3846],Y([1,0,31,6,4,2518,5,11,309,53,3461,3462,732]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostTunnelService=e.IExtHostTunnelService=e.TunnelDtoConverter=void 0;class r extends v.DisposableTunnel{}var i;(function(o){function u(p){return{remoteAddress:p.remoteAddress,localAddress:p.localAddress,public:!!p.public,privacy:p.privacy??(p.public?v.TunnelPrivacyId.Public:v.TunnelPrivacyId.Private),protocol:p.protocol}}o.fromApiTunnel=u;function d(p){return{remoteAddress:{host:p.tunnelRemoteHost,port:p.tunnelRemotePort},localAddress:p.localAddress,public:p.privacy!==v.TunnelPrivacyId.ConstantPrivate&&p.privacy!==v.TunnelPrivacyId.ConstantPrivate,privacy:p.privacy,protocol:p.protocol}}o.fromServiceTunnel=d})(i||(e.TunnelDtoConverter=i={})),e.IExtHostTunnelService=(0,T.createDecorator)("IExtHostTunnelService");let s=class extends b.Disposable{constructor(u,d,p){super(),this.logService=p,this._showCandidatePort=()=>Promise.resolve(!0),this._extensionTunnels=new Map,this._onDidChangeTunnels=new y.Emitter,this.onDidChangeTunnels=this._onDidChangeTunnels.event,this._providerHandleCounter=0,this._portAttributesProviders=new Map,this._proxy=u.getProxy(m.MainContext.MainThreadTunnelService)}async openTunnel(u,d){this.logService.trace(`ForwardedPorts: (ExtHostTunnelService) ${u.identifier.value} called openTunnel API for ${d.remoteAddress.host}:${d.remoteAddress.port}.`);const p=await this._proxy.$openTunnel(d,u.displayName);if(p){const c=new r(p.remoteAddress,p.localAddress,()=>this._proxy.$closeTunnel(p.remoteAddress));return this._register(c),c}}async getTunnels(){return this._proxy.$getTunnels()}nextPortAttributesProviderHandle(){return this._providerHandleCounter++}registerPortsAttributesProvider(u,d){const p=this.nextPortAttributesProviderHandle();return this._portAttributesProviders.set(p,{selector:u,provider:d}),this._proxy.$registerPortsAttributesProvider(u,p),new a.Disposable(()=>{this._portAttributesProviders.delete(p),this._proxy.$unregisterPortsAttributesProvider(p)})}async $providePortAttributes(u,d,p,c,l){const n=[];for(const w of u){const E=this._portAttributesProviders.get(w);if(!E)return[];n.push(...await Promise.all(d.map(async C=>{let I;try{I=await E.provider.providePortAttributes({port:C,pid:p,commandLine:c},l)}catch{I=await E.provider.providePortAttributes(C,p,c,l)}return{providedAttributes:I,port:C}})))}const g=n.filter(w=>!!w.providedAttributes);return g.length>0?g.map(w=>({autoForwardAction:w.providedAttributes.autoForwardAction,port:w.port})):[]}async $registerCandidateFinder(u){}registerTunnelProvider(u,d){if(this._forwardPortProvider)throw new Error("A tunnel provider has already been registered. Only the first tunnel provider to be registered will be used.");this._forwardPortProvider=async(c,l)=>await u.provideTunnel(c,l,new t.CancellationTokenSource().token)??void 0;const p=d.tunnelFeatures?{elevation:!!d.tunnelFeatures?.elevation,privacyOptions:d.tunnelFeatures?.privacyOptions}:void 0;return this._proxy.$setTunnelProvider(p),Promise.resolve((0,b.toDisposable)(()=>{this._forwardPortProvider=void 0,this._proxy.$setTunnelProvider(void 0)}))}async setTunnelFactory(u,d){if(u){u.candidatePortSource!==void 0&&this._proxy.$setCandidatePortSource(u.candidatePortSource),u.showCandidatePort&&(this._showCandidatePort=u.showCandidatePort,this._proxy.$setCandidateFilter());const p=u.tunnelFactory??(d?this.makeManagedTunnelFactory(d):void 0);if(p){this._forwardPortProvider=p;let c=u.tunnelFeatures?.privacyOptions??[];u.tunnelFeatures?.public&&c.length===0&&(c=[{id:"private",label:D.localize(0,null),themeIcon:"lock"},{id:"public",label:D.localize(1,null),themeIcon:"eye"}]);const l=u.tunnelFeatures?{elevation:!!u.tunnelFeatures?.elevation,public:!!u.tunnelFeatures?.public,privacyOptions:c}:void 0;this._proxy.$setTunnelProvider(l)}}else this._forwardPortProvider=void 0;return(0,b.toDisposable)(()=>{this._forwardPortProvider=void 0})}makeManagedTunnelFactory(u){}async $closeTunnel(u,d){if(this._extensionTunnels.has(u.host)){const p=this._extensionTunnels.get(u.host);p.has(u.port)&&(d&&p.get(u.port).disposeListener.dispose(),await p.get(u.port).tunnel.dispose(),p.delete(u.port))}}async $onDidTunnelsChange(){this._onDidChangeTunnels.fire()}async $forwardPort(u,d){if(this._forwardPortProvider)try{this.logService.trace("ForwardedPorts: (ExtHostTunnelService) Getting tunnel from provider.");const p=this._forwardPortProvider(u,d);if(this.logService.trace("ForwardedPorts: (ExtHostTunnelService) Got tunnel promise from provider."),p!==void 0){const c=await p;if(this.logService.trace("ForwardedPorts: (ExtHostTunnelService) Successfully awaited tunnel from provider."),c===void 0){this.logService.error("ForwardedPorts: (ExtHostTunnelService) Resolved tunnel is undefined");return}this._extensionTunnels.has(u.remoteAddress.host)||this._extensionTunnels.set(u.remoteAddress.host,new Map);const l=this._register(c.onDidDispose(()=>(this.logService.trace("ForwardedPorts: (ExtHostTunnelService) Extension fired tunnel's onDidDispose."),this._proxy.$closeTunnel(c.remoteAddress))));return this._extensionTunnels.get(u.remoteAddress.host).set(u.remoteAddress.port,{tunnel:c,disposeListener:l}),i.fromApiTunnel(c)}else this.logService.trace("ForwardedPorts: (ExtHostTunnelService) Tunnel is undefined")}catch(p){if(this.logService.trace("ForwardedPorts: (ExtHostTunnelService) tunnel provider error"),p instanceof Error)return p.message}}async $applyCandidateFilter(u){const d=await Promise.all(u.map(c=>this._showCandidatePort(c.host,c.port,c.detail??""))),p=u.filter((c,l)=>d[l]);return this.logService.trace(`ForwardedPorts: (ExtHostTunnelService) filtered from ${u.map(c=>c.port).join(", ")} to ${p.map(c=>c.port).join(", ")}`),p}};e.ExtHostTunnelService=s,e.ExtHostTunnelService=s=fe([O(0,h.IExtHostRpcService),O(1,S.IExtHostInitDataService),O(2,f.ILogService)],s)}),define(Q[3847],Y([1,0,1103]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.logRemoteEntryIfError=e.logRemoteEntry=void 0;function y(D,T,f=null){const v=(0,t.parse)(T).args;let m=v.shift();if(typeof m=="string")switch(T.severity||(T.severity="info"),f&&(/^\[/.test(f)||(f=`[${f}]`),/ $/.test(f)||(f=`${f} `),m=f+m),T.severity){case"log":case"info":D.info(m,...v);break;case"warn":D.warn(m,...v);break;case"error":D.error(m,...v);break}}e.logRemoteEntry=y;function b(D,T,f){const v=(0,t.parse)(T).args,m=v.shift();typeof m!="string"||T.severity!=="error"||(/^\[/.test(f)||(f=`[${f}]`),/ $/.test(f)||(f=`${f} `),D.error(f+m,...v))}e.logRemoteEntryIfError=b}),define(Q[3848],Y([1,0,60,53,91,1103,3847,536,11]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadConsole=void 0;let m=class{constructor(h,a,r){this._environmentService=a,this._logService=r;const i=(0,f.parseExtensionDevOptions)(this._environmentService);this._isExtensionDevTestFromCli=i.isExtensionDevTestFromCli}dispose(){}$logExtensionHostMessage(h){this._isExtensionDevTestFromCli?(0,T.logRemoteEntry)(this._logService,h):((0,T.logRemoteEntryIfError)(this._logService,h,"Extension Host"),(0,D.log)(h,"Extension Host"))}};e.MainThreadConsole=m,e.MainThreadConsole=m=fe([(0,t.extHostNamedCustomer)(y.MainContext.MainThreadConsole),O(1,b.IEnvironmentService),O(2,v.ILogService)],m)}),define(Q[3849],Y([1,0,62,6,4,22,18,861,61,11,52,1180,181,592,702,30,231,39,65,536,957,44]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteExtensionHost=void 0;let n=class extends b.Disposable{constructor(w,E,C,I,_,A,k,L,R,M,N,P,x){super(),this.runningLocation=w,this._initDataProvider=E,this.remoteSocketFactoryService=C,this._contextService=I,this._environmentService=_,this._telemetryService=A,this._logService=k,this._loggerService=L,this._labelService=R,this.remoteAuthorityResolverService=M,this._extensionHostDebugService=N,this._productService=P,this._signService=x,this.startup=1,this.extensions=new l.ExtensionHostExtensions,this._onExit=this._register(new y.Emitter),this.onExit=this._onExit.event,this.remoteAuthority=this._initDataProvider.remoteAuthority,this._protocol=null,this._hasLostConnection=!1,this._terminating=!1;const F=(0,p.parseExtensionDevOptions)(this._environmentService);this._isExtensionDevHost=F.isExtensionDevHost}start(){const w={commit:this._productService.commit,quality:this._productService.quality,addressProvider:{getAddress:async()=>{const{authority:E}=await this.remoteAuthorityResolverService.resolveAuthority(this._initDataProvider.remoteAuthority);return{connectTo:E.connectTo,connectionToken:E.connectionToken}}},remoteSocketFactoryService:this.remoteSocketFactoryService,signService:this._signService,logService:this._logService,ipcLogger:null};return this.remoteAuthorityResolverService.resolveAuthority(this._initDataProvider.remoteAuthority).then(E=>{const C={language:T.language,debugId:this._environmentService.debugExtensionHost.debugId,break:this._environmentService.debugExtensionHost.break,port:this._environmentService.debugExtensionHost.port,env:{...this._environmentService.debugExtensionHost.env,...E.options?.extensionHostEnv}},I=this._environmentService.extensionDevelopmentLocationURI;let _=!0;return I&&I.length>0&&I[0].scheme===D.Schemas.file&&(_=!1),_||(C.break=!1),(0,h.connectRemoteAgentExtensionHost)(w,C).then(A=>{this._register(A);const{protocol:k,debugPort:L,reconnectionToken:R}=A,M=typeof L=="number";return _&&this._environmentService.isExtensionDevelopment&&this._environmentService.debugExtensionHost.debugId&&L&&this._extensionHostDebugService.attachSession(this._environmentService.debugExtensionHost.debugId,L,this._initDataProvider.remoteAuthority),k.onDidDispose(()=>{this._onExtHostConnectionLost(R)}),k.onSocketClose(()=>{this._isExtensionDevHost&&this._onExtHostConnectionLost(R)}),new Promise((N,P)=>{const x=setTimeout(()=>{P("The remote extension host took longer than 60s to send its ready message.")},6e4),F=k.onMessage(V=>{if((0,c.isMessageOfType)(V,1)){this._createExtHostInitData(M).then(W=>{k.send(t.VSBuffer.fromString(JSON.stringify(W)))});return}if((0,c.isMessageOfType)(V,0)){clearTimeout(x),F.dispose(),this._protocol=k,N(k);return}console.error("received unexpected message during handshake phase from the extension host: ",V)})})})})}_onExtHostConnectionLost(w){this._hasLostConnection||(this._hasLostConnection=!0,this._isExtensionDevHost&&this._environmentService.debugExtensionHost.debugId&&this._extensionHostDebugService.close(this._environmentService.debugExtensionHost.debugId),!this._terminating&&this._onExit.fire([0,w]))}async _createExtHostInitData(w){const E=await this._initDataProvider.getInitData(),C=this._contextService.getWorkspace(),I=this.extensions.set(E.allExtensions,E.myExtensions);return{commit:this._productService.commit,version:this._productService.version,vscodeVersion:this._productService.vscodeVersion,quality:this._productService.quality,parentPid:E.pid,environment:{isExtensionDevelopmentDebug:w,appRoot:E.appRoot,appName:this._productService.nameLong,appHost:this._productService.embedderIdentifier||"desktop",appUriScheme:this._productService.urlProtocol,extensionTelemetryLogResource:this._environmentService.extHostTelemetryLogFile,isExtensionTelemetryLoggingOnly:(0,o.isLoggingOnly)(this._productService,this._environmentService),appLanguage:T.language,extensionDevelopmentLocationURI:this._environmentService.extensionDevelopmentLocationURI,extensionTestsLocationURI:this._environmentService.extensionTestsLocationURI,globalStorageHome:E.globalStorageHome,workspaceStorageHome:E.workspaceStorageHome,extensionLogLevel:this._environmentService.extensionLogLevel},workspace:this._contextService.getWorkbenchState()===1?null:{configuration:C.configuration,id:C.id,name:this._labelService.getWorkspaceLabel(C),transient:C.transient},remote:{isRemote:!0,authority:this._initDataProvider.remoteAuthority,connectionData:E.connectionData},consoleForward:{includeStack:!1,logNative:!!this._environmentService.debugExtensionHost.debugId},allExtensions:I.toAdd,activationEvents:I.addActivationEvents,myExtensions:I.myToAdd,telemetryInfo:{sessionId:this._telemetryService.sessionId,machineId:this._telemetryService.machineId,firstSessionDate:this._telemetryService.firstSessionDate,msftInternal:this._telemetryService.msftInternal},logLevel:this._logService.getLevel(),loggers:[...this._loggerService.getRegisteredLoggers()],logsLocation:E.extensionHostLogsPath,autoStart:this.startup===1,uiKind:T.isWeb?c.UIKind.Web:c.UIKind.Desktop}}getInspectPort(){}enableInspectPort(){return Promise.resolve(!1)}dispose(){if(super.dispose(),this._terminating=!0,this._protocol){const w=this._protocol.getSocket();this._protocol.send((0,c.createMessageOfType)(2)),this._protocol.sendDisconnect(),this._protocol.dispose(),w.end(),this._protocol=null}}};e.RemoteExtensionHost=n,e.RemoteExtensionHost=n=fe([O(2,r.IRemoteSocketFactoryService),O(3,u.IWorkspaceContextService),O(4,d.IWorkbenchEnvironmentService),O(5,s.ITelemetryService),O(6,m.ILogService),O(7,m.ILoggerService),O(8,v.ILabelService),O(9,a.IRemoteAuthorityResolverService),O(10,f.IExtensionHostDebugService),O(11,S.IProductService),O(12,i.ISignService)],n)}),define(Q[3850],Y([1,0,14,62,31,15,6,4,834,3782,474]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.RPCProtocol=e.ResponsiveState=e.RequestInitiator=e.parseJsonAndRestoreBufferRefs=e.stringifyJsonWithBufferRefs=void 0;function a(L,R){try{return JSON.stringify(L,R)}catch{return"null"}}const r="$$ref$$",i={[r]:-1};class s{constructor(R,M){this.jsonString=R,this.referencedBuffers=M}}function o(L,R=null,M=!1){const N=[];return{jsonString:(M?a:JSON.stringify)(L,(x,F)=>{if(typeof F>"u")return i;if(typeof F=="object"){if(F instanceof y.VSBuffer){const V=N.push(F)-1;return{[r]:V}}if(R)return R(x,F)}return F}),referencedBuffers:N}}e.stringifyJsonWithBufferRefs=o;function u(L,R,M){return JSON.parse(L,(N,P)=>{if(P){const x=P[r];if(typeof x=="number")return R[x];if(M&&P.$mid===1)return M.transformIncoming(P)}return P})}e.parseJsonAndRestoreBufferRefs=u;function d(L,R){return JSON.stringify(L,R)}function p(L){return L?(R,M)=>M&&M.$mid===1?L.transformOutgoing(M):M:null}var c;(function(L){L[L.LocalSide=0]="LocalSide",L[L.OtherSide=1]="OtherSide"})(c||(e.RequestInitiator=c={}));var l;(function(L){L[L.Responsive=0]="Responsive",L[L.Unresponsive=1]="Unresponsive"})(l||(e.ResponsiveState=l={}));const n=()=>{},g=Symbol.for("rpcProtocol"),w=Symbol.for("rpcProxy");class E extends f.Disposable{static{h=g}static{this.UNRESPONSIVE_TIME=3*1e3}constructor(R,M=null,N=null){super(),this[h]=!0,this._onDidChangeResponsiveState=this._register(new T.Emitter),this.onDidChangeResponsiveState=this._onDidChangeResponsiveState.event,this._protocol=R,this._logger=M,this._uriTransformer=N,this._uriReplacer=p(this._uriTransformer),this._isDisposed=!1,this._locals=[],this._proxies=[];for(let P=0,x=S.ProxyIdentifier.count;P<x;P++)this._locals[P]=null,this._proxies[P]=null;this._lastMessageId=0,this._cancelInvokedHandlers=Object.create(null),this._pendingRPCReplies={},this._responsiveState=0,this._unacknowledgedCount=0,this._unresponsiveTime=0,this._asyncCheckUresponsive=this._register(new t.RunOnceScheduler(()=>this._checkUnresponsive(),1e3)),this._protocol.onMessage(P=>this._receiveOneMessage(P))}dispose(){this._isDisposed=!0,Object.keys(this._pendingRPCReplies).forEach(R=>{this._pendingRPCReplies[R].resolveErr(D.canceled())})}drain(){return typeof this._protocol.drain=="function"?this._protocol.drain():Promise.resolve()}_onWillSendRequest(R){this._unacknowledgedCount===0&&(this._unresponsiveTime=Date.now()+E.UNRESPONSIVE_TIME),this._unacknowledgedCount++,this._asyncCheckUresponsive.isScheduled()||this._asyncCheckUresponsive.schedule()}_onDidReceiveAcknowledge(R){this._unresponsiveTime=Date.now()+E.UNRESPONSIVE_TIME,this._unacknowledgedCount--,this._unacknowledgedCount===0&&this._asyncCheckUresponsive.cancel(),this._setResponsiveState(0)}_checkUnresponsive(){this._unacknowledgedCount!==0&&(Date.now()>this._unresponsiveTime?this._setResponsiveState(1):this._asyncCheckUresponsive.schedule())}_setResponsiveState(R){this._responsiveState!==R&&(this._responsiveState=R,this._onDidChangeResponsiveState.fire(this._responsiveState))}get responsiveState(){return this._responsiveState}transformIncomingURIs(R){return this._uriTransformer?(0,v.transformIncomingURIs)(R,this._uriTransformer):R}getProxy(R){const{nid:M,sid:N}=R;return this._proxies[M]||(this._proxies[M]=this._createProxy(M,N)),this._proxies[M]}_createProxy(R,M){const N={get:(P,x)=>(typeof x=="string"&&!P[x]&&x.charCodeAt(0)===36&&(P[x]=(...F)=>this._remoteCall(R,x,F)),x===w?M:P[x])};return new Proxy(Object.create(null),N)}set(R,M){return this._locals[R.nid]=M,M}assertRegistered(R){for(let M=0,N=R.length;M<N;M++){const P=R[M];if(!this._locals[P.nid])throw new Error(`Missing proxy instance ${P.sid}`)}}_receiveOneMessage(R){if(this._isDisposed)return;const M=R.byteLength,N=C.read(R,0),P=N.readUInt8(),x=N.readUInt32();switch(P){case 1:case 2:{let{rpcId:F,method:V,args:W}=_.deserializeRequestJSONArgs(N);this._uriTransformer&&(W=(0,v.transformIncomingURIs)(W,this._uriTransformer)),this._receiveRequest(M,x,F,V,W,P===2);break}case 3:case 4:{let{rpcId:F,method:V,args:W}=_.deserializeRequestMixedArgs(N);this._uriTransformer&&(W=(0,v.transformIncomingURIs)(W,this._uriTransformer)),this._receiveRequest(M,x,F,V,W,P===4);break}case 5:{this._logger?.logIncoming(M,x,0,"ack"),this._onDidReceiveAcknowledge(x);break}case 6:{this._receiveCancel(M,x);break}case 7:{this._receiveReply(M,x,void 0);break}case 9:{let F=_.deserializeReplyOKJSON(N);this._uriTransformer&&(F=(0,v.transformIncomingURIs)(F,this._uriTransformer)),this._receiveReply(M,x,F);break}case 10:{const F=_.deserializeReplyOKJSONWithBuffers(N,this._uriTransformer);this._receiveReply(M,x,F);break}case 8:{const F=_.deserializeReplyOKVSBuffer(N);this._receiveReply(M,x,F);break}case 11:{let F=_.deserializeReplyErrError(N);this._uriTransformer&&(F=(0,v.transformIncomingURIs)(F,this._uriTransformer)),this._receiveReplyErr(M,x,F);break}case 12:{this._receiveReplyErr(M,x,void 0);break}default:console.error("received unexpected message"),console.error(R)}}_receiveRequest(R,M,N,P,x,F){this._logger?.logIncoming(R,M,1,`receiveRequest ${(0,S.getStringIdentifierForProxy)(N)}.${P}(`,x);const V=String(M);let W,z;if(F){const K=new b.CancellationTokenSource;x.push(K.token),W=this._invokeHandler(N,P,x),z=()=>K.cancel()}else W=this._invokeHandler(N,P,x),z=n;this._cancelInvokedHandlers[V]=z;const B=_.serializeAcknowledged(M);this._logger?.logOutgoing(B.byteLength,M,1,"ack"),this._protocol.send(B),W.then(K=>{delete this._cancelInvokedHandlers[V];const H=_.serializeReplyOK(M,K,this._uriReplacer);this._logger?.logOutgoing(H.byteLength,M,1,"reply:",K),this._protocol.send(H)},K=>{delete this._cancelInvokedHandlers[V];const H=_.serializeReplyErr(M,K);this._logger?.logOutgoing(H.byteLength,M,1,"replyErr:",K),this._protocol.send(H)})}_receiveCancel(R,M){this._logger?.logIncoming(R,M,1,"receiveCancel");const N=String(M);this._cancelInvokedHandlers[N]?.()}_receiveReply(R,M,N){this._logger?.logIncoming(R,M,0,"receiveReply:",N);const P=String(M);if(!this._pendingRPCReplies.hasOwnProperty(P))return;const x=this._pendingRPCReplies[P];delete this._pendingRPCReplies[P],x.resolveOk(N)}_receiveReplyErr(R,M,N){this._logger?.logIncoming(R,M,0,"receiveReplyErr:",N);const P=String(M);if(!this._pendingRPCReplies.hasOwnProperty(P))return;const x=this._pendingRPCReplies[P];delete this._pendingRPCReplies[P];let F;N&&(N.$isError?(F=new Error,F.name=N.name,F.message=N.message,F.stack=N.stack,F.errorCode=N.errorCode,F.data=N.data):F=N),x.resolveErr(F)}_invokeHandler(R,M,N){try{return Promise.resolve(this._doInvokeHandler(R,M,N))}catch(P){return Promise.reject(P)}}_doInvokeHandler(R,M,N){const P=this._locals[R];if(!P)throw new Error("Unknown actor "+(0,S.getStringIdentifierForProxy)(R));const x=P[M];if(typeof x!="function")throw new Error("Unknown method "+M+" on actor "+(0,S.getStringIdentifierForProxy)(R));return x.apply(P,N)}_remoteCall(R,M,N){if(this._isDisposed)return new m.CanceledLazyPromise;let P=null;if(N.length>0&&b.CancellationToken.isCancellationToken(N[N.length-1])&&(P=N.pop()),P&&P.isCancellationRequested)return Promise.reject(D.canceled());const x=_.serializeRequestArguments(N,this._uriReplacer),F=++this._lastMessageId,V=String(F),W=new m.LazyPromise;P&&P.onCancellationRequested(()=>{const B=_.serializeCancel(F);this._logger?.logOutgoing(B.byteLength,F,0,"cancel"),this._protocol.send(_.serializeCancel(F))}),this._pendingRPCReplies[V]=W,this._onWillSendRequest(F);const z=_.serializeRequest(F,R,M,x,!!P);return this._logger?.logOutgoing(z.byteLength,F,0,`request: ${(0,S.getStringIdentifierForProxy)(R)}.${M}(`,N),this._protocol.send(z),W}}e.RPCProtocol=E;class C{static alloc(R,M,N){const P=new C(y.VSBuffer.alloc(N+1+4),0);return P.writeUInt8(R),P.writeUInt32(M),P}static read(R,M){return new C(R,M)}get buffer(){return this._buff}constructor(R,M){this._buff=R,this._offset=M}static sizeUInt8(){return 1}static{this.sizeUInt32=4}writeUInt8(R){this._buff.writeUInt8(R,this._offset),this._offset+=1}readUInt8(){const R=this._buff.readUInt8(this._offset);return this._offset+=1,R}writeUInt32(R){this._buff.writeUInt32BE(R,this._offset),this._offset+=4}readUInt32(){const R=this._buff.readUInt32BE(this._offset);return this._offset+=4,R}static sizeShortString(R){return 1+R.byteLength}writeShortString(R){this._buff.writeUInt8(R.byteLength,this._offset),this._offset+=1,this._buff.set(R,this._offset),this._offset+=R.byteLength}readShortString(){const R=this._buff.readUInt8(this._offset);this._offset+=1;const N=this._buff.slice(this._offset,this._offset+R).toString();return this._offset+=R,N}static sizeLongString(R){return 4+R.byteLength}writeLongString(R){this._buff.writeUInt32BE(R.byteLength,this._offset),this._offset+=4,this._buff.set(R,this._offset),this._offset+=R.byteLength}readLongString(){const R=this._buff.readUInt32BE(this._offset);this._offset+=4;const N=this._buff.slice(this._offset,this._offset+R).toString();return this._offset+=R,N}writeBuffer(R){this._buff.writeUInt32BE(R.byteLength,this._offset),this._offset+=4,this._buff.set(R,this._offset),this._offset+=R.byteLength}static sizeVSBuffer(R){return 4+R.byteLength}writeVSBuffer(R){this._buff.writeUInt32BE(R.byteLength,this._offset),this._offset+=4,this._buff.set(R,this._offset),this._offset+=R.byteLength}readVSBuffer(){const R=this._buff.readUInt32BE(this._offset);this._offset+=4;const M=this._buff.slice(this._offset,this._offset+R);return this._offset+=R,M}static sizeMixedArray(R){let M=0;M+=1;for(let N=0,P=R.length;N<P;N++){const x=R[N];switch(M+=1,x.type){case 1:M+=this.sizeLongString(x.value);break;case 2:M+=this.sizeVSBuffer(x.value);break;case 3:M+=this.sizeUInt32,M+=this.sizeLongString(x.value);for(let F=0;F<x.buffers.length;++F)M+=this.sizeVSBuffer(x.buffers[F]);break;case 4:break}}return M}writeMixedArray(R){this._buff.writeUInt8(R.length,this._offset),this._offset+=1;for(let M=0,N=R.length;M<N;M++){const P=R[M];switch(P.type){case 1:this.writeUInt8(1),this.writeLongString(P.value);break;case 2:this.writeUInt8(2),this.writeVSBuffer(P.value);break;case 3:this.writeUInt8(3),this.writeUInt32(P.buffers.length),this.writeLongString(P.value);for(let x=0;x<P.buffers.length;++x)this.writeBuffer(P.buffers[x]);break;case 4:this.writeUInt8(4);break}}}readMixedArray(){const R=this._buff.readUInt8(this._offset);this._offset+=1;const M=new Array(R);for(let N=0;N<R;N++)switch(this.readUInt8()){case 1:M[N]=this.readLongString();break;case 2:M[N]=this.readVSBuffer();break;case 3:{const x=this.readUInt32(),F=this.readLongString(),V=[];for(let W=0;W<x;++W)V.push(this.readVSBuffer());M[N]=new S.SerializableObjectWithBuffers(u(F,V,null));break}case 4:M[N]=void 0;break}return M}}var I;(function(L){L[L.Simple=0]="Simple",L[L.Mixed=1]="Mixed"})(I||(I={}));class _{static _useMixedArgSerialization(R){for(let M=0,N=R.length;M<N;M++)if(R[M]instanceof y.VSBuffer||R[M]instanceof S.SerializableObjectWithBuffers||typeof R[M]>"u")return!0;return!1}static serializeRequestArguments(R,M){if(this._useMixedArgSerialization(R)){const N=[];for(let P=0,x=R.length;P<x;P++){const F=R[P];if(F instanceof y.VSBuffer)N[P]={type:2,value:F};else if(typeof F>"u")N[P]={type:4};else if(F instanceof S.SerializableObjectWithBuffers){const{jsonString:V,referencedBuffers:W}=o(F.value,M);N[P]={type:3,value:y.VSBuffer.fromString(V),buffers:W}}else N[P]={type:1,value:y.VSBuffer.fromString(d(F,M))}}return{type:1,args:N}}return{type:0,args:d(R,M)}}static serializeRequest(R,M,N,P,x){switch(P.type){case 0:return this._requestJSONArgs(R,M,N,P.args,x);case 1:return this._requestMixedArgs(R,M,N,P.args,x)}}static _requestJSONArgs(R,M,N,P,x){const F=y.VSBuffer.fromString(N),V=y.VSBuffer.fromString(P);let W=0;W+=C.sizeUInt8(),W+=C.sizeShortString(F),W+=C.sizeLongString(V);const z=C.alloc(x?2:1,R,W);return z.writeUInt8(M),z.writeShortString(F),z.writeLongString(V),z.buffer}static deserializeRequestJSONArgs(R){const M=R.readUInt8(),N=R.readShortString(),P=R.readLongString();return{rpcId:M,method:N,args:JSON.parse(P)}}static _requestMixedArgs(R,M,N,P,x){const F=y.VSBuffer.fromString(N);let V=0;V+=C.sizeUInt8(),V+=C.sizeShortString(F),V+=C.sizeMixedArray(P);const W=C.alloc(x?4:3,R,V);return W.writeUInt8(M),W.writeShortString(F),W.writeMixedArray(P),W.buffer}static deserializeRequestMixedArgs(R){const M=R.readUInt8(),N=R.readShortString(),P=R.readMixedArray(),x=new Array(P.length);for(let F=0,V=P.length;F<V;F++){const W=P[F];typeof W=="string"?x[F]=JSON.parse(W):x[F]=W}return{rpcId:M,method:N,args:x}}static serializeAcknowledged(R){return C.alloc(5,R,0).buffer}static serializeCancel(R){return C.alloc(6,R,0).buffer}static serializeReplyOK(R,M,N){if(typeof M>"u")return this._serializeReplyOKEmpty(R);if(M instanceof y.VSBuffer)return this._serializeReplyOKVSBuffer(R,M);if(M instanceof S.SerializableObjectWithBuffers){const{jsonString:P,referencedBuffers:x}=o(M.value,N,!0);return this._serializeReplyOKJSONWithBuffers(R,P,x)}else return this._serializeReplyOKJSON(R,a(M,N))}static _serializeReplyOKEmpty(R){return C.alloc(7,R,0).buffer}static _serializeReplyOKVSBuffer(R,M){let N=0;N+=C.sizeVSBuffer(M);const P=C.alloc(8,R,N);return P.writeVSBuffer(M),P.buffer}static deserializeReplyOKVSBuffer(R){return R.readVSBuffer()}static _serializeReplyOKJSON(R,M){const N=y.VSBuffer.fromString(M);let P=0;P+=C.sizeLongString(N);const x=C.alloc(9,R,P);return x.writeLongString(N),x.buffer}static _serializeReplyOKJSONWithBuffers(R,M,N){const P=y.VSBuffer.fromString(M);let x=0;x+=C.sizeUInt32,x+=C.sizeLongString(P);for(const V of N)x+=C.sizeVSBuffer(V);const F=C.alloc(10,R,x);F.writeUInt32(N.length),F.writeLongString(P);for(const V of N)F.writeBuffer(V);return F.buffer}static deserializeReplyOKJSON(R){const M=R.readLongString();return JSON.parse(M)}static deserializeReplyOKJSONWithBuffers(R,M){const N=R.readUInt32(),P=R.readLongString(),x=[];for(let F=0;F<N;++F)x.push(R.readVSBuffer());return new S.SerializableObjectWithBuffers(u(P,x,M))}static serializeReplyErr(R,M){const N=M?a(D.transformErrorForSerialization(M),null):void 0;if(typeof N!="string")return this._serializeReplyErrEmpty(R);const P=y.VSBuffer.fromString(N);let x=0;x+=C.sizeLongString(P);const F=C.alloc(11,R,x);return F.writeLongString(P),F.buffer}static deserializeReplyErrError(R){const M=R.readLongString();return JSON.parse(M)}static _serializeReplyErrEmpty(R){return C.alloc(12,R,0).buffer}}var A;(function(L){L[L.RequestJSONArgs=1]="RequestJSONArgs",L[L.RequestJSONArgsWithCancellation=2]="RequestJSONArgsWithCancellation",L[L.RequestMixedArgs=3]="RequestMixedArgs",L[L.RequestMixedArgsWithCancellation=4]="RequestMixedArgsWithCancellation",L[L.Acknowledged=5]="Acknowledged",L[L.Cancel=6]="Cancel",L[L.ReplyOKEmpty=7]="ReplyOKEmpty",L[L.ReplyOKVSBuffer=8]="ReplyOKVSBuffer",L[L.ReplyOKJSON=9]="ReplyOKJSON",L[L.ReplyOKJSONWithBuffers=10]="ReplyOKJSONWithBuffers",L[L.ReplyErrError=11]="ReplyErrError",L[L.ReplyErrEmpty=12]="ReplyErrEmpty"})(A||(A={}));var k;(function(L){L[L.String=1]="String",L[L.VSBuffer=2]="VSBuffer",L[L.SerializedObjectWithBuffers=3]="SerializedObjectWithBuffers",L[L.Undefined=4]="Undefined"})(k||(k={}))}),define(Q[3851],Y([1,0,14,62,15,6,4,145,3074,81,13,5,11,181,30,53,21,65,60,745,44,3850]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.createExtensionHostManager=void 0;const g=!1,w=!0;function E(x,F,V,W){return F.startup===3&&V.length===0?x.createInstance(I,F,W):x.createInstance(C,F,V,W)}e.createExtensionHostManager=E;let C=n=class extends T.Disposable{get kind(){return this._extensionHost.runningLocation.kind}get startup(){return this._extensionHost.startup}constructor(F,V,W,z,B,K,H){super(),this._internalExtensionService=W,this._instantiationService=z,this._environmentService=B,this._telemetryService=K,this._logService=H,this._onDidChangeResponsiveState=this._register(new D.Emitter),this.onDidChangeResponsiveState=this._onDidChangeResponsiveState.event,this._hasStarted=!1,this._cachedActivationEvents=new Map,this._resolvedActivationEvents=new Set,this._rpcProtocol=null,this._customers=[],this._extensionHost=F,this.onDidExit=this._extensionHost.onExit;const U={time:Date.now(),action:"starting",kind:(0,p.extensionHostKindToString)(this.kind)};this._telemetryService.publicLog2("extensionHostStartup",U),this._proxy=this._extensionHost.start().then(G=>{this._hasStarted=!0;const $={time:Date.now(),action:"success",kind:(0,p.extensionHostKindToString)(this.kind)};return this._telemetryService.publicLog2("extensionHostStartup",$),this._createExtensionHostCustomers(this.kind,G)},G=>{this._logService.error(`Error received from starting extension host (kind: ${(0,p.extensionHostKindToString)(this.kind)})`),this._logService.error(G);const $={time:Date.now(),action:"error",kind:(0,p.extensionHostKindToString)(this.kind)};return G&&G.name&&($.errorName=G.name),G&&G.message&&($.errorMessage=G.message),G&&G.stack&&($.errorStack=G.stack),this._telemetryService.publicLog2("extensionHostStartup",$),null}),this._proxy.then(()=>{V.forEach(G=>this.activateByEvent(G,0)),this._register(N({measure:()=>this.measure()}))})}dispose(){this._extensionHost&&this._extensionHost.dispose(),this._rpcProtocol&&this._rpcProtocol.dispose();for(let F=0,V=this._customers.length;F<V;F++){const W=this._customers[F];try{W.dispose()}catch(z){b.onUnexpectedError(z)}}this._proxy=null,super.dispose()}async measure(){const F=await this._proxy;if(!F)return null;const V=await this._measureLatency(F),W=await this._measureDown(F),z=await this._measureUp(F);return{remoteAuthority:this._extensionHost.remoteAuthority,latency:V,down:W,up:z}}async ready(){await this._proxy}async _measureLatency(F){let W=0;for(let z=0;z<10;z++){const B=f.StopWatch.create();await F.test_latency(z),B.stop(),W+=B.elapsed()}return W/10}static _convert(F,V){return F*1e3*8/V}async _measureUp(F){const W=y.VSBuffer.alloc(10485760),z=Math.ceil(Math.random()*256);for(let K=0;K<W.byteLength;K++)W.writeUInt8(K,z);const B=f.StopWatch.create();return await F.test_up(W),B.stop(),n._convert(10485760,B.elapsed())}async _measureDown(F){const W=f.StopWatch.create();return await F.test_down(10485760),W.stop(),n._convert(10485760,W.elapsed())}_createExtensionHostCustomers(F,V){let W=null;g||this._environmentService.logExtensionHostCommunication?W=new L(F):R.isEnabled()&&(W=new R(this._telemetryService)),this._rpcProtocol=new l.RPCProtocol(V,W),this._register(this._rpcProtocol.onDidChangeResponsiveState($=>this._onDidChangeResponsiveState.fire($)));let z=null;const B={remoteAuthority:this._extensionHost.remoteAuthority,extensionHostKind:this.kind,getProxy:$=>this._rpcProtocol.getProxy($),set:($,ie)=>this._rpcProtocol.set($,ie),dispose:()=>this._rpcProtocol.dispose(),assertRegistered:$=>this._rpcProtocol.assertRegistered($),drain:()=>this._rpcProtocol.drain(),internalExtensionService:this._internalExtensionService,_setExtensionHostProxy:$=>{z=$},_setAllMainProxyIdentifiers:$=>{}},K=d.ExtHostCustomersRegistry.getNamedCustomers();for(let $=0,ie=K.length;$<ie;$++){const[J,j]=K[$];try{const ee=this._instantiationService.createInstance(j,B);this._customers.push(ee),this._rpcProtocol.set(J,ee)}catch(ee){this._logService.error(`Cannot instantiate named customer: '${J.sid}'`),this._logService.error(ee),b.onUnexpectedError(ee)}}const H=d.ExtHostCustomersRegistry.getCustomers();for(const $ of H)try{const ie=this._instantiationService.createInstance($,B);this._customers.push(ie)}catch(ie){this._logService.error(ie),b.onUnexpectedError(ie)}if(!z)throw new Error("Missing IExtensionHostProxy!");const U=[s.MainContext.MainThreadDebugService,s.MainContext.MainThreadInteractive],G=Object.keys(s.MainContext).map($=>s.MainContext[$]).filter($=>!U.some(ie=>ie===$));return this._rpcProtocol.assertRegistered(G),z}async activate(F,V){const W=await this._proxy;return W?W.activate(F,V):!1}activateByEvent(F,V){return V===1&&!this._hasStarted?Promise.resolve():(this._cachedActivationEvents.has(F)||this._cachedActivationEvents.set(F,this._activateByEvent(F,V)),this._cachedActivationEvents.get(F))}activationEventIsDone(F){return this._resolvedActivationEvents.has(F)}async _activateByEvent(F,V){if(!this._proxy)return;const W=await this._proxy;W&&(await W.activateByEvent(F,V),this._resolvedActivationEvents.add(F))}async getInspectPort(F){if(this._extensionHost){F&&await this._extensionHost.enableInspectPort();const V=this._extensionHost.getInspectPort();if(V)return V}return 0}async resolveAuthority(F,V){const W=f.StopWatch.create(!1),z=()=>`[${(0,p.extensionHostKindToString)(this._extensionHost.runningLocation.kind)}${this._extensionHost.runningLocation.affinity}][resolveAuthority(${(0,r.getRemoteAuthorityPrefix)(F)},${V})][${W.elapsed()}ms] `,B=G=>this._logService.info(`${z()}${G}`),K=(G,$=void 0)=>this._logService.error(`${z()}${G}`,$);B("obtaining proxy...");const H=await this._proxy;if(!H)return K("no proxy"),{type:"error",error:{message:"Cannot resolve authority",code:r.RemoteAuthorityResolverErrorCode.Unknown,detail:void 0}};B("invoking...");const U=new t.IntervalTimer;try{U.cancelAndSet(()=>B("waiting..."),1e3);const G=await H.resolveAuthority(F,V);return U.dispose(),G.type==="ok"?B(`returned ${G.value.authority.connectTo}`):K("returned an error",G.error),G}catch(G){return U.dispose(),K("returned an error",G),{type:"error",error:{message:G.message,code:r.RemoteAuthorityResolverErrorCode.Unknown,detail:G}}}}async getCanonicalURI(F,V){const W=await this._proxy;if(!W)throw new Error("Cannot resolve canonical URI");return W.getCanonicalURI(F,V)}async start(F,V){const W=await this._proxy;if(!W)return;const z=this._extensionHost.extensions.set(F,V);return W.startExtensionHost(z)}async extensionTestsExecute(){const F=await this._proxy;if(!F)throw new Error("Could not obtain Extension Host Proxy");return F.extensionTestsExecute()}representsRunningLocation(F){return this._extensionHost.runningLocation.equals(F)}async deltaExtensions(F){const V=await this._proxy;if(V)return this._extensionHost.extensions.delta(F),V.deltaExtensions(F)}containsExtension(F){return this._extensionHost.extensions.containsExtension(F)}async setRemoteEnvironment(F){const V=await this._proxy;if(V)return V.setRemoteEnvironment(F)}};C=n=fe([O(3,h.IInstantiationService),O(4,u.IWorkbenchEnvironmentService),O(5,i.ITelemetryService),O(6,a.ILogService)],C);let I=class extends T.Disposable{get kind(){return this._extensionHost.runningLocation.kind}get startup(){return this._extensionHost.startup}constructor(F,V,W,z){super(),this._internalExtensionService=V,this._instantiationService=W,this._logService=z,this._onDidChangeResponsiveState=this._register(new D.Emitter),this.onDidChangeResponsiveState=this._onDidChangeResponsiveState.event,this._extensionHost=F,this.onDidExit=F.onExit,this._startCalled=new t.Barrier,this._actual=null,this._lazyStartExtensions=null}_createActual(F){return this._logService.info(`Creating lazy extension host: ${F}`),this._actual=this._register(this._instantiationService.createInstance(C,this._extensionHost,[],this._internalExtensionService)),this._register(this._actual.onDidChangeResponsiveState(V=>this._onDidChangeResponsiveState.fire(V))),this._actual}async _getOrCreateActualAndStart(F){if(this._actual)return this._actual;const V=this._createActual(F);return await V.start([],[]),V}async ready(){await this._startCalled.wait(),this._actual&&await this._actual.ready()}representsRunningLocation(F){return this._extensionHost.runningLocation.equals(F)}async deltaExtensions(F){if(await this._startCalled.wait(),this._actual)return this._actual.deltaExtensions(F);if(this._lazyStartExtensions.delta(F),F.myToAdd.length>0){const V=this._createActual(`contains ${F.myToAdd.length} new extension(s) (installed or enabled): ${F.myToAdd.map(B=>B.value)}`),{toAdd:W,myToAdd:z}=this._lazyStartExtensions.toDelta();V.start(W,z);return}}containsExtension(F){return this._extensionHost.extensions.containsExtension(F)}async activate(F,V){return await this._startCalled.wait(),this._actual?this._actual.activate(F,V):!1}async activateByEvent(F,V){if(V===1)return this._actual?this._actual.activateByEvent(F,V):void 0;if(await this._startCalled.wait(),this._actual)return this._actual.activateByEvent(F,V)}activationEventIsDone(F){return this._startCalled.isOpen()?this._actual?this._actual.activationEventIsDone(F):!0:!1}async getInspectPort(F){return await this._startCalled.wait(),this._actual?this._actual.getInspectPort(F):0}async resolveAuthority(F,V){return await this._startCalled.wait(),this._actual?this._actual.resolveAuthority(F,V):{type:"error",error:{message:"Cannot resolve authority",code:r.RemoteAuthorityResolverErrorCode.Unknown,detail:void 0}}}async getCanonicalURI(F,V){if(await this._startCalled.wait(),this._actual)return this._actual.getCanonicalURI(F,V);throw new Error("Cannot resolve canonical URI")}async start(F,V){if(V.length>0){const z=this._createActual(`contains ${V.length} extension(s): ${V.map(B=>B.value)}.`).start(F,V);return this._startCalled.open(),z}this._lazyStartExtensions=new c.ExtensionHostExtensions,this._lazyStartExtensions.set(F,V),this._startCalled.open()}async extensionTestsExecute(){return await this._startCalled.wait(),(await this._getOrCreateActualAndStart("execute tests.")).extensionTestsExecute()}async setRemoteEnvironment(F){if(await this._startCalled.wait(),this._actual)return this._actual.setRemoteEnvironment(F)}};I=fe([O(2,h.IInstantiationService),O(3,a.ILogService)],I);const _=[["#2977B1","#FC802D","#34A13A","#D3282F","#9366BA"],["#8B564C","#E177C0","#7F7F7F","#BBBE3D","#2EBECD"]];function A(x){if(Array.isArray(x))return x;if(x&&typeof x=="object"&&typeof x.toString=="function"){const F=x.toString();if(F!=="[object Object]")return F}return x}function k(x){return Array.isArray(x)?x.map(A):A(x)}class L{constructor(F){this._kind=F,this._totalIncoming=0,this._totalOutgoing=0}_log(F,V,W,z,B,K,H){H=k(H);const U=_[B],G=w?U[z%U.length]:"#000000";let $=[`%c[${(0,p.extensionHostKindToString)(this._kind)}][${F}]%c[${String(V).padStart(7)}]%c[len: ${String(W).padStart(5)}]%c${String(z).padStart(5)} - ${K}`,"color: darkgreen","color: grey","color: grey",`color: ${G}`];/\($/.test(K)?($=$.concat(H),$.push(")")):$.push(H),console.log.apply(console,$)}logIncoming(F,V,W,z,B){this._totalIncoming+=F,this._log("Ext \u2192 Win",this._totalIncoming,F,V,W,z,B)}logOutgoing(F,V,W,z,B){this._totalOutgoing+=F,this._log("Win \u2192 Ext",this._totalOutgoing,F,V,W,z,B)}}let R=class{static isEnabled(){return Math.trunc(Math.random()*1e3)<.5}constructor(F){this._telemetryService=F,this._pendingRequests=new Map}logIncoming(F,V,W,z){if(W===0&&/^receiveReply(Err)?:/.test(z)){const B=this._pendingRequests.get(V)??"unknown_reply";this._pendingRequests.delete(V),this._telemetryService.publicLog2("extensionhost.incoming",{type:`${z} ${B}`,length:F})}W===1&&/^receiveRequest /.test(z)&&this._telemetryService.publicLog2("extensionhost.incoming",{type:`${z}`,length:F})}logOutgoing(F,V,W,z){W===0&&z.startsWith("request: ")&&(this._pendingRequests.set(V,z),this._telemetryService.publicLog2("extensionhost.outgoing",{type:z,length:F}))}};R=fe([O(0,i.ITelemetryService)],R);const M=[];function N(x){return M.push(x),{dispose:()=>{for(let F=0;F<M.length;F++)if(M[F]===x){M.splice(F,1);return}}}}function P(){return M.slice(0)}(0,S.registerAction2)(class Ui extends S.Action2{constructor(){super({id:"editor.action.measureExtHostLatency",title:{value:v.localize(0,null),original:"Measure Extension Host Latency"},category:m.Categories.Developer,f1:!0})}async run(F){const V=F.get(o.IEditorService),W=await Promise.all(P().map(z=>z.measure()));V.openEditor({resource:void 0,contents:W.map(Ui._print).join(` `),options:{pinned:!0}})}static _print(F){return F?`${F.remoteAuthority?`Authority: ${F.remoteAuthority} `:""}Roundtrip latency: ${F.latency.toFixed(3)}ms Up: ${Ui._printSpeed(F.up)} Down: ${Ui._printSpeed(F.down)} `:""}static _printSpeed(F){return F<=1024?`${F} bps`:F<1024*1024?`${(F/1024).toFixed(1)} kbps`:`${(F/1024/1024).toFixed(1)} Mbps`}})}),define(Q[1365],Y([1,0,283,44,22,10,695,202]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostProfiler=void 0;let v=class{constructor(S,h,a){this._port=S,this._extensionService=h,this._profilingService=a}async start(){const S=await this._profilingService.startProfiling({port:this._port});return{stop:(0,f.once)(async()=>{const h=await this._profilingService.stopProfiling(S);await this._extensionService.whenInstalledExtensionsRegistered();const a=this._extensionService.extensions;return this._distill(h,a)})}}_distill(S,h){const a=t.TernarySearchTree.forUris();for(const g of h)g.extensionLocation.scheme===b.Schemas.file&&a.set(D.URI.file(g.extensionLocation.fsPath),g);const r=S.nodes,i=new Map,s=new Map;for(const g of r)i.set(g.id,g);function o(g,w){if(w){if(w==="self"&&g.callFrame.url){let E;try{E=a.findSubstr(D.URI.parse(g.callFrame.url))}catch{}E&&(w=E.identifier.value)}}else switch(g.callFrame.functionName){case"(root)":break;case"(program)":w="program";break;case"(garbage collector)":w="gc";break;default:w="self";break}if(s.set(g.id,w),g.children)for(const E of g.children){const C=i.get(E);C&&o(C,w)}}o(r[0],null);const u=S.samples||[],d=S.timeDeltas||[],p=[],c=[];let l=0,n;for(let g=0;g<u.length;g++){const w=u[g],E=s.get(w);E!==n&&(n&&(c.push(n),p.push(l)),n=E??void 0,l=0),l+=d[g]}return n&&(c.push(n),p.push(l)),{startTime:S.startTime,endTime:S.endTime,deltas:p,ids:c,data:S,getAggregatedTimes:()=>{const g=new Map;for(let w=0;w<c.length;w++){const E=c[w];g.set(E,(g.get(E)||0)+p[w])}return g}}}};e.ExtensionHostProfiler=v,e.ExtensionHostProfiler=v=fe([O(1,y.IExtensionService),O(2,T.IV8InspectProfilingService)],v)}),define(Q[3852],Y([1,0,153,1151]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerMainProcessRemoteService)(y.IExtensionHostStarter,y.ipcExtensionHostStarterChannelName)}),define(Q[537],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IElevatedFileService=void 0,e.IElevatedFileService=(0,t.createDecorator)("elevatedFileService")}),define(Q[960],Y([1,0,25,5]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkbenchFileService=void 0,e.IWorkbenchFileService=(0,y.refineServiceDecorator)(t.IFileService)}),define(Q[3853],Y([1,0,6,4,10,25,60,53,62,39,11,9,960,863,195,33]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadFileSystem=void 0;let u=o=class{constructor(c,l,n,g,w){this._fileService=l,this._contextService=n,this._logService=g,this._configurationService=w,this._fileProvider=new y.DisposableMap,this._disposables=new y.DisposableStore,this._watches=new y.DisposableMap,this._proxy=c.getProxy(f.ExtHostContext.ExtHostFileSystem);const E=c.getProxy(f.ExtHostContext.ExtHostFileSystemInfo);for(const C of l.listCapabilities())E.$acceptProviderInfos(b.URI.from({scheme:C.scheme,path:"/dummy"}),C.capabilities);this._disposables.add(l.onDidChangeFileSystemProviderRegistrations(C=>E.$acceptProviderInfos(b.URI.from({scheme:C.scheme,path:"/dummy"}),C.provider?.capabilities??null))),this._disposables.add(l.onDidChangeFileSystemProviderCapabilities(C=>E.$acceptProviderInfos(b.URI.from({scheme:C.scheme,path:"/dummy"}),C.provider.capabilities)))}dispose(){this._disposables.dispose(),this._fileProvider.dispose(),this._watches.dispose()}async $registerFileSystemProvider(c,l,n,g){this._fileProvider.set(c,new d(this._fileService,l,n,g,c,this._proxy))}$unregisterProvider(c){this._fileProvider.deleteAndDispose(c)}$onFileSystemChange(c,l){const n=this._fileProvider.get(c);if(!n)throw new Error("Unknown file provider");n.$onFileSystemChange(l)}$stat(c){return this._fileService.stat(b.URI.revive(c)).then(l=>({ctime:l.ctime,mtime:l.mtime,size:l.size,permissions:l.readonly?D.FilePermission.Readonly:void 0,type:o._asFileType(l)})).catch(o._handleError)}$readdir(c){return this._fileService.resolve(b.URI.revive(c),{resolveMetadata:!1}).then(l=>{if(!l.isDirectory){const n=new Error(l.name);throw n.name=D.FileSystemProviderErrorCode.FileNotADirectory,n}return l.children?l.children.map(n=>[n.name,o._asFileType(n)]):[]}).catch(o._handleError)}static _asFileType(c){let l=0;return c.isFile?l+=D.FileType.File:c.isDirectory&&(l+=D.FileType.Directory),c.isSymbolicLink&&(l+=D.FileType.SymbolicLink),l}$readFile(c){return this._fileService.readFile(b.URI.revive(c)).then(l=>l.value).catch(o._handleError)}$writeFile(c,l){return this._fileService.writeFile(b.URI.revive(c),l).then(()=>{}).catch(o._handleError)}$rename(c,l,n){return this._fileService.move(b.URI.revive(c),b.URI.revive(l),n.overwrite).then(()=>{}).catch(o._handleError)}$copy(c,l,n){return this._fileService.copy(b.URI.revive(c),b.URI.revive(l),n.overwrite).then(()=>{}).catch(o._handleError)}$mkdir(c){return this._fileService.createFolder(b.URI.revive(c)).then(()=>{}).catch(o._handleError)}$delete(c,l){return this._fileService.del(b.URI.revive(c),l).catch(o._handleError)}static _handleError(c){if(c instanceof D.FileOperationError)switch(c.fileOperationResult){case 1:c.name=D.FileSystemProviderErrorCode.FileNotFound;break;case 0:c.name=D.FileSystemProviderErrorCode.FileIsADirectory;break;case 6:c.name=D.FileSystemProviderErrorCode.NoPermissions;break;case 4:c.name=D.FileSystemProviderErrorCode.FileExists;break}else if(c instanceof Error){const l=(0,D.toFileSystemProviderErrorCode)(c);l!==D.FileSystemProviderErrorCode.Unknown&&(c.name=l)}throw c}$ensureActivation(c){return this._fileService.activateProvider(c)}async $watch(c,l,n,g){const w=b.URI.revive(n),E=this._contextService.getWorkspaceFolder(w),C={...g};if(C.recursive)try{(await this._fileService.stat(w)).isDirectory||(C.recursive=!1)}catch(_){this._logService.error(`MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: ${c}, path: ${w.toString(!0)}, recursive: ${C.recursive}, session: ${l}): ${_}`)}if(E&&C.recursive){this._logService.trace(`MainThreadFileSystem#$watch(): ignoring request to start watching because path is inside workspace (extension: ${c}, path: ${w.toString(!0)}, recursive: ${C.recursive}, session: ${l})`);return}if(this._logService.trace(`MainThreadFileSystem#$watch(): request to start watching (extension: ${c}, path: ${w.toString(!0)}, recursive: ${C.recursive}, session: ${l})`),C.recursive){const _=this._configurationService.getValue();if(_.files?.watcherExclude)for(const A in _.files.watcherExclude)_.files.watcherExclude[A]===!0&&C.excludes.push(A)}else if(E){const _=this._configurationService.getValue();if(_.files?.watcherExclude){for(const A in _.files.watcherExclude)if(_.files.watcherExclude[A]===!0){C.includes||(C.includes=[]);const k=`${(0,s.rtrim)(A,"/")}/${i.GLOBSTAR}`;C.includes.push((0,r.normalizeWatcherPattern)(E.uri.fsPath,k))}}if(!C.includes||C.includes.length===0){this._logService.trace(`MainThreadFileSystem#$watch(): ignoring request to start watching because path is inside workspace and no excludes are configured (extension: ${c}, path: ${w.toString(!0)}, recursive: ${C.recursive}, session: ${l})`);return}}const I=this._fileService.watch(w,C);this._watches.set(l,I)}$unwatch(c){this._watches.has(c)&&(this._logService.trace(`MainThreadFileSystem#$unwatch(): request to stop watching (session: ${c})`),this._watches.deleteAndDispose(c))}};e.MainThreadFileSystem=u,e.MainThreadFileSystem=u=o=fe([(0,T.extHostNamedCustomer)(f.MainContext.MainThreadFileSystem),O(1,a.IWorkbenchFileService),O(2,m.IWorkspaceContextService),O(3,S.ILogService),O(4,h.IConfigurationService)],u);class d{constructor(c,l,n,g,w,E){this.readOnlyMessage=g,this._handle=w,this._proxy=E,this._onDidChange=new t.Emitter,this.onDidChangeFile=this._onDidChange.event,this.onDidChangeCapabilities=t.Event.None,this.capabilities=n,this._registration=c.registerProvider(l,this)}dispose(){this._registration.dispose(),this._onDidChange.dispose()}watch(c,l){const n=Math.random();return this._proxy.$watch(this._handle,n,c,l),(0,y.toDisposable)(()=>{this._proxy.$unwatch(this._handle,n)})}$onFileSystemChange(c){this._onDidChange.fire(c.map(d._createFileChange))}static _createFileChange(c){return{resource:b.URI.revive(c.resource),type:c.type}}stat(c){return this._proxy.$stat(this._handle,c).then(void 0,l=>{throw l})}readFile(c){return this._proxy.$readFile(this._handle,c).then(l=>l.buffer)}writeFile(c,l,n){return this._proxy.$writeFile(this._handle,c,v.VSBuffer.wrap(l),n)}delete(c,l){return this._proxy.$delete(this._handle,c,l)}mkdir(c){return this._proxy.$mkdir(this._handle,c)}readdir(c){return this._proxy.$readdir(this._handle,c)}rename(c,l,n){return this._proxy.$rename(this._handle,c,l,n)}copy(c,l,n){return this._proxy.$copy(this._handle,c,l,n)}open(c,l){return this._proxy.$open(this._handle,c,l)}close(c){return this._proxy.$close(this._handle,c)}read(c,l,n,g,w){return this._proxy.$read(this._handle,c,l,w).then(E=>(n.set(E.buffer,g),E.byteLength))}write(c,l,n,g,w){return this._proxy.$write(this._handle,c,l,v.VSBuffer.wrap(n).slice(g,g+w))}}}),define(Q[3854],Y([1,0,206,22,10,25,35,100,139,537]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeElevatedFileService=void 0;let S=class{constructor(a,r,i){this.nativeHostService=a,this.fileService=r,this.environmentService=i}isSupported(a){return a.scheme===y.Schemas.file}async writeFileElevated(a,r,i){const s=b.URI.file((0,t.randomPath)(this.environmentService.userDataPath,"code-elevated"));try{await this.fileService.writeFile(s,r,i),await this.nativeHostService.writeElevated(s,a,i)}finally{await this.fileService.del(s)}return this.fileService.resolve(a,{resolveMetadata:!0})}};e.NativeElevatedFileService=S,e.NativeElevatedFileService=S=fe([O(0,f.INativeHostService),O(1,D.IFileService),O(2,v.INativeWorkbenchEnvironmentService)],S),(0,T.registerSingleton)(m.IElevatedFileService,S,1)}),define(Q[3855],Y([1,0,4,250,863]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UniversalWatcherClient=void 0;class D extends b.AbstractUniversalWatcherClient{constructor(f,v,m,S){super(f,v,m),this.utilityProcessWorkerWorkbenchService=S,this.init()}createWatcher(f){const v=y.ProxyChannel.toService((0,y.getDelayedChannel)((async()=>{const{client:m,onDidTerminate:S}=await this.utilityProcessWorkerWorkbenchService.createWorker({moduleId:"vs/platform/files/node/watcher/watcherMain",type:"fileWatcher"});return S.then(({reason:h})=>{h?.code===0?this.trace(`terminated by itself with code ${h.code}, signal: ${h.signal}`):this.onError(`terminated by itself unexpectedly with code ${h?.code}, signal: ${h?.signal}`)}),m.getChannel("watcher")})()));return f.add((0,t.toDisposable)(()=>v.stop())),v}}e.UniversalWatcherClient=D}),define(Q[3856],Y([1,0,18,3204,1153,3855]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiskFileSystemProvider=void 0;class T extends y.AbstractDiskFileSystemProvider{constructor(v,m,S){super(S,{watcher:{forceUniversal:!0}}),this.mainProcessService=v,this.utilityProcessWorkerWorkbenchService=m,this.provider=this._register(new b.DiskFileSystemProviderClient(this.mainProcessService.getChannel(b.LOCAL_FILE_SYSTEM_CHANNEL_NAME),{pathCaseSensitive:t.isLinux,trash:!0})),this.registerListeners()}registerListeners(){this.provider.onDidChangeFile(v=>this._onDidChangeFile.fire(v)),this.provider.onDidWatchError(v=>this._onDidWatchError.fire(v))}get onDidChangeCapabilities(){return this.provider.onDidChangeCapabilities}get capabilities(){return this.provider.capabilities}stat(v){return this.provider.stat(v)}readdir(v){return this.provider.readdir(v)}readFile(v,m){return this.provider.readFile(v,m)}readFileStream(v,m,S){return this.provider.readFileStream(v,m,S)}writeFile(v,m,S){return this.provider.writeFile(v,m,S)}open(v,m){return this.provider.open(v,m)}close(v){return this.provider.close(v)}read(v,m,S,h,a){return this.provider.read(v,m,S,h,a)}write(v,m,S,h,a){return this.provider.write(v,m,S,h,a)}mkdir(v){return this.provider.mkdir(v)}delete(v,m){return this.provider.delete(v,m)}rename(v,m,S){return this.provider.rename(v,m,S)}copy(v,m,S){return this.provider.copy(v,m,S)}cloneFile(v,m){return this.provider.cloneFile(v,m)}createUniversalWatcher(v,m,S){return new D.UniversalWatcherClient(h=>v(h),h=>m(h),S,this.utilityProcessWorkerWorkbenchService)}createNonRecursiveWatcher(){throw new Error("Method not implemented in sandbox.")}}e.DiskFileSystemProvider=T}),define(Q[150],Y([1,0,3080,5,35,6,4,8,9,25,42,18,39,722,14,64,91,69]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.FilesConfigurationService=e.IFilesConfigurationService=e.AutoSaveMode=e.AutoSaveAfterShortDelayContext=void 0,e.AutoSaveAfterShortDelayContext=new f.RawContextKey("autoSaveAfterShortDelayContext",!1,!0);var p;(function(l){l[l.OFF=0]="OFF",l[l.AFTER_SHORT_DELAY=1]="AFTER_SHORT_DELAY",l[l.AFTER_LONG_DELAY=2]="AFTER_LONG_DELAY",l[l.ON_FOCUS_CHANGE=3]="ON_FOCUS_CHANGE",l[l.ON_WINDOW_CHANGE=4]="ON_WINDOW_CHANGE"})(p||(e.AutoSaveMode=p={})),e.IFilesConfigurationService=(0,y.createDecorator)("filesConfigurationService");let c=class extends T.Disposable{static{d=this}static{this.DEFAULT_AUTO_SAVE_MODE=h.isWeb?m.AutoSaveConfiguration.AFTER_DELAY:m.AutoSaveConfiguration.OFF}static{this.READONLY_MESSAGES={providerReadonly:{value:(0,t.localize)(0,null),isTrusted:!0},sessionReadonly:{value:(0,t.localize)(1,null,"workbench.action.files.setActiveEditorWriteableInSession"),isTrusted:!0},configuredReadonly:{value:(0,t.localize)(2,null,`workbench.action.openSettings?${encodeURIComponent('["files.readonly"]')}`),isTrusted:!0},fileLocked:{value:(0,t.localize)(3,null,"workbench.action.files.setActiveEditorWriteableInSession"),isTrusted:!0},fileReadonly:{value:(0,t.localize)(4,null),isTrusted:!0}}}constructor(n,g,w,E,C,I){super(),this.configurationService=g,this.contextService=w,this.environmentService=E,this.uriIdentityService=C,this.fileService=I,this._onAutoSaveConfigurationChange=this._register(new D.Emitter),this.onAutoSaveConfigurationChange=this._onAutoSaveConfigurationChange.event,this._onFilesAssociationChange=this._register(new D.Emitter),this.onFilesAssociationChange=this._onFilesAssociationChange.event,this._onReadonlyConfigurationChange=this._register(new D.Emitter),this.onReadonlyChange=this._onReadonlyConfigurationChange.event,this.readonlyIncludeMatcher=this._register(new i.IdleValue(()=>this.createReadonlyMatcher(m.FILES_READONLY_INCLUDE_CONFIG))),this.readonlyExcludeMatcher=this._register(new i.IdleValue(()=>this.createReadonlyMatcher(m.FILES_READONLY_EXCLUDE_CONFIG))),this.sessionReadonlyOverrides=new u.ResourceMap(A=>this.uriIdentityService.extUri.getComparisonKey(A)),this.autoSaveAfterShortDelayContext=e.AutoSaveAfterShortDelayContext.bindTo(n);const _=g.getValue();this.currentFilesAssociationConfig=_?.files?.associations,this.currentHotExitConfig=_?.files?.hotExit||m.HotExitConfiguration.ON_EXIT,this.onFilesConfigurationChange(_),this.registerListeners()}createReadonlyMatcher(n){const g=this._register(new r.ResourceGlobMatcher(w=>this.configurationService.getValue(n,{resource:w}),w=>w.affectsConfiguration(n),this.contextService,this.configurationService));return this._register(g.onExpressionChange(()=>this._onReadonlyConfigurationChange.fire())),g}isReadonly(n,g){const w=this.fileService.getProvider(n.scheme);if(w&&(0,m.hasReadonlyCapability)(w))return w.readOnlyMessage??d.READONLY_MESSAGES.providerReadonly;const E=this.sessionReadonlyOverrides.get(n);return typeof E=="boolean"?E===!0?d.READONLY_MESSAGES.sessionReadonly:!1:this.uriIdentityService.extUri.isEqualOrParent(n,this.environmentService.userRoamingDataHome)||this.uriIdentityService.extUri.isEqual(n,this.contextService.getWorkspace().configuration??void 0)?!1:this.readonlyIncludeMatcher.value.matches(n)?this.readonlyExcludeMatcher.value.matches(n)?!1:d.READONLY_MESSAGES.configuredReadonly:this.configuredReadonlyFromPermissions&&g?.locked?d.READONLY_MESSAGES.fileLocked:g?.readonly?d.READONLY_MESSAGES.fileReadonly:!1}async updateReadonly(n,g){if(g==="toggle"){let w;try{w=await this.fileService.resolve(n,{resolveMetadata:!0})}catch{}g=!this.isReadonly(n,w)}g==="reset"?this.sessionReadonlyOverrides.delete(n):this.sessionReadonlyOverrides.set(n,g),this._onReadonlyConfigurationChange.fire()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(n=>{n.affectsConfiguration("files")&&this.onFilesConfigurationChange(this.configurationService.getValue())}))}onFilesConfigurationChange(n){switch(n?.files?.autoSave||d.DEFAULT_AUTO_SAVE_MODE){case m.AutoSaveConfiguration.AFTER_DELAY:this.configuredAutoSaveDelay=n?.files?.autoSaveDelay,this.configuredAutoSaveOnFocusChange=!1,this.configuredAutoSaveOnWindowChange=!1;break;case m.AutoSaveConfiguration.ON_FOCUS_CHANGE:this.configuredAutoSaveDelay=void 0,this.configuredAutoSaveOnFocusChange=!0,this.configuredAutoSaveOnWindowChange=!1;break;case m.AutoSaveConfiguration.ON_WINDOW_CHANGE:this.configuredAutoSaveDelay=void 0,this.configuredAutoSaveOnFocusChange=!1,this.configuredAutoSaveOnWindowChange=!0;break;default:this.configuredAutoSaveDelay=void 0,this.configuredAutoSaveOnFocusChange=!1,this.configuredAutoSaveOnWindowChange=!1;break}this.autoSaveAfterShortDelayContext.set(this.getAutoSaveMode()===1),this._onAutoSaveConfigurationChange.fire(this.getAutoSaveConfiguration());const w=n?.files?.associations;(0,S.equals)(this.currentFilesAssociationConfig,w)||(this.currentFilesAssociationConfig=w,this._onFilesAssociationChange.fire());const E=n?.files?.hotExit;E===m.HotExitConfiguration.OFF||E===m.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE?this.currentHotExitConfig=E:this.currentHotExitConfig=m.HotExitConfiguration.ON_EXIT;const C=!!n?.files?.readonlyFromPermissions;C!==!!this.configuredReadonlyFromPermissions&&(this.configuredReadonlyFromPermissions=C,this._onReadonlyConfigurationChange.fire())}getAutoSaveMode(){return this.configuredAutoSaveOnFocusChange?3:this.configuredAutoSaveOnWindowChange?4:typeof this.configuredAutoSaveDelay=="number"&&this.configuredAutoSaveDelay>=0?this.configuredAutoSaveDelay<=1e3?1:2:0}getAutoSaveConfiguration(){return{autoSaveDelay:typeof this.configuredAutoSaveDelay=="number"&&this.configuredAutoSaveDelay>=0?this.configuredAutoSaveDelay:void 0,autoSaveFocusChange:!!this.configuredAutoSaveOnFocusChange,autoSaveApplicationChange:!!this.configuredAutoSaveOnWindowChange}}async toggleAutoSave(){const n=this.configurationService.getValue("files.autoSave");let g;return[m.AutoSaveConfiguration.AFTER_DELAY,m.AutoSaveConfiguration.ON_FOCUS_CHANGE,m.AutoSaveConfiguration.ON_WINDOW_CHANGE].some(w=>w===n)?g=m.AutoSaveConfiguration.OFF:g=m.AutoSaveConfiguration.AFTER_DELAY,this.configurationService.updateValue("files.autoSave",g)}get isHotExitEnabled(){return this.contextService.getWorkspace().transient?!1:this.currentHotExitConfig!==m.HotExitConfiguration.OFF}get hotExitConfiguration(){return this.currentHotExitConfig}preventSaveConflicts(n,g){return this.configurationService.getValue("files.saveConflictResolution",{resource:n,overrideIdentifier:g})!=="overwriteFileOnDisk"}};e.FilesConfigurationService=c,e.FilesConfigurationService=c=d=fe([O(0,f.IContextKeyService),O(1,v.IConfigurationService),O(2,a.IWorkspaceContextService),O(3,o.IEnvironmentService),O(4,s.IUriIdentityService),O(5,m.IFileService)],c),(0,b.registerSingleton)(e.IFilesConfigurationService,c,0)}),define(Q[1366],Y([1,0,163,25,61,26,150]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractResourceEditorInput=void 0;let f=class extends t.EditorInput{get capabilities(){let m=32;return this.fileService.hasProvider(this.resource)?this.filesConfigurationService.isReadonly(this.resource)&&(m|=2):m|=4,m&2||(m|=128),m}get preferredResource(){return this._preferredResource}constructor(m,S,h,a,r){super(),this.resource=m,this.labelService=h,this.fileService=a,this.filesConfigurationService=r,this._name=void 0,this._shortDescription=void 0,this._mediumDescription=void 0,this._longDescription=void 0,this._shortTitle=void 0,this._mediumTitle=void 0,this._longTitle=void 0,this._preferredResource=S||m,this.registerListeners()}registerListeners(){this._register(this.labelService.onDidChangeFormatters(m=>this.onLabelEvent(m.scheme))),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(m=>this.onLabelEvent(m.scheme))),this._register(this.fileService.onDidChangeFileSystemProviderCapabilities(m=>this.onLabelEvent(m.scheme)))}onLabelEvent(m){m===this._preferredResource.scheme&&this.updateLabel()}updateLabel(){this._name=void 0,this._shortDescription=void 0,this._mediumDescription=void 0,this._longDescription=void 0,this._shortTitle=void 0,this._mediumTitle=void 0,this._longTitle=void 0,this._onDidChangeLabel.fire()}setPreferredResource(m){(0,D.isEqual)(m,this._preferredResource)||(this._preferredResource=m,this.updateLabel())}getName(){return typeof this._name!="string"&&(this._name=this.labelService.getUriBasenameLabel(this._preferredResource)),this._name}getDescription(m=1){switch(m){case 0:return this.shortDescription;case 2:return this.longDescription;case 1:default:return this.mediumDescription}}get shortDescription(){return typeof this._shortDescription!="string"&&(this._shortDescription=this.labelService.getUriBasenameLabel((0,D.dirname)(this._preferredResource))),this._shortDescription}get mediumDescription(){return typeof this._mediumDescription!="string"&&(this._mediumDescription=this.labelService.getUriLabel((0,D.dirname)(this._preferredResource),{relative:!0})),this._mediumDescription}get longDescription(){return typeof this._longDescription!="string"&&(this._longDescription=this.labelService.getUriLabel((0,D.dirname)(this._preferredResource))),this._longDescription}get shortTitle(){return typeof this._shortTitle!="string"&&(this._shortTitle=this.getName()),this._shortTitle}get mediumTitle(){return typeof this._mediumTitle!="string"&&(this._mediumTitle=this.labelService.getUriLabel(this._preferredResource,{relative:!0})),this._mediumTitle}get longTitle(){return typeof this._longTitle!="string"&&(this._longTitle=this.labelService.getUriLabel(this._preferredResource)),this._longTitle}getTitle(m){switch(m){case 0:return this.shortTitle;case 2:return this.longTitle;default:case 1:return this.mediumTitle}}isReadonly(){return this.filesConfigurationService.isReadonly(this.resource)}};e.AbstractResourceEditorInput=f,e.AbstractResourceEditorInput=f=fe([O(2,b.ILabelService),O(3,y.IFileService),O(4,T.IFilesConfigurationService)],f)}),define(Q[314],Y([1,0,195,148,26,5,49,530,61,22,25,1366,15,62,150,44,2847,21]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.isCompositeNotebookEditorInput=e.NotebookEditorInput=void 0;let p=class extends h.AbstractResourceEditorInput{static{d=this}static create(n,g,w,E={}){return n.createInstance(d,g,w,E)}static{this.ID="workbench.input.notebook"}constructor(n,g,w,E,C,I,_,A,k,L,R,M){super(n,void 0,A,k,L),this.viewType=g,this.options=w,this._notebookService=E,this._notebookModelResolverService=C,this._fileDialogService=I,this._instantiationService=_,this._editorModelReference=null,this._defaultDirtyState=!1,this._defaultDirtyState=!!w.startDirty,this._sideLoadedListener=E.onDidAddNotebookDocument(N=>{N.viewType===this.viewType&&N.uri.toString()===this.resource.toString()&&this.resolve().catch(a.onUnexpectedError)}),this._register(R.onWillStop(N=>{this.isDirty()&&N.veto((async()=>{const P=M.findEditors(this);return!(P.length>0&&(await M.save(P[0])).success)})(),(0,o.localize)(0,null,this.resource.path))}))}dispose(){this._sideLoadedListener.dispose(),this._editorModelReference?.dispose(),this._editorModelReference=null,super.dispose()}get typeId(){return d.ID}get editorId(){return this.viewType}get capabilities(){let n=0;return this.resource.scheme===m.Schemas.untitled&&(n|=4),this._editorModelReference?this._editorModelReference.object.isReadonly()&&(n|=2):this.filesConfigurationService.isReadonly(this.resource)&&(n|=2),n&2||(n|=128),n}getDescription(n=1){if(!this.hasCapability(4)||this._editorModelReference?.object.hasAssociatedFilePath())return super.getDescription(n)}isReadonly(){return this._editorModelReference?this._editorModelReference.object.isReadonly():this.filesConfigurationService.isReadonly(this.resource)}isDirty(){return this._editorModelReference?this._editorModelReference.object.isDirty():this._defaultDirtyState}isSaving(){const n=this._editorModelReference?.object;return!n||!n.isDirty()||n.hasErrorState||this.hasCapability(4)?!1:this.filesConfigurationService.getAutoSaveMode()===1}async save(n,g){if(this._editorModelReference)return this.hasCapability(4)?this.saveAs(n,g):(await this._editorModelReference.object.save(g),this)}async saveAs(n,g){if(!this._editorModelReference)return;const w=this._notebookService.getContributedNotebookType(this.viewType);if(!w)return;const E=this.hasCapability(4)?await this._suggestName(w,this.labelService.getUriBasenameLabel(this.resource)):this._editorModelReference.object.resource;let C;if(this._editorModelReference.object.hasAssociatedFilePath())C=E;else if(C=await this._fileDialogService.pickFileToSave(E,g?.availableFileSystems),!C)return;if(!w.matches(C)){const I=w.selectors.map(_=>typeof _=="string"?_:t.isRelativePattern(_)?`${_} (base ${_.base})`:_.exclude?`${_.include} (exclude: ${_.exclude})`:`${_.include}`).join(", ");throw new Error(`File name ${C} is not supported by ${w.providerDisplayName}. Please make sure the file name matches following patterns: ${I}`)}return await this._editorModelReference.object.saveAs(C)}async _suggestName(n,g){const w=n.selectors[0];let E=w&&typeof w=="string"?w:void 0;if(!E&&w){const C=w.include;typeof C=="string"&&(E=C)}if(E){const C=/^\*\.([A-Za-z_-]*)$/.exec(E);if(C&&C.length>1){const I=C[1];if(!g.endsWith(I))return(0,b.joinPath)(await this._fileDialogService.defaultFilePath(),g+"."+I)}}return(0,b.joinPath)(await this._fileDialogService.defaultFilePath(),g)}async rename(n,g){if(this._editorModelReference&&this._notebookService.getContributedNotebookTypes(g).find(E=>E.id===this._editorModelReference.object.viewType))return this._move(n,g)}_move(n,g){return{editor:d.create(this._instantiationService,g,this.viewType)}}async revert(n,g){this._editorModelReference&&this._editorModelReference.object.isDirty()&&await this._editorModelReference.object.revert(g)}async resolve(n,g){if(!await this._notebookService.canResolve(this.viewType))return null;if(g?.mark("extensionActivated"),this._sideLoadedListener.dispose(),this._editorModelReference)this._editorModelReference.object.load();else{const w=await this._notebookModelResolverService.resolve(this.resource,this.viewType);if(this._editorModelReference)return w.dispose(),this._editorModelReference.object;if(this._editorModelReference=w,this.isDisposed())return this._editorModelReference.dispose(),this._editorModelReference=null,null;this._register(this._editorModelReference.object.onDidChangeDirty(()=>this._onDidChangeDirty.fire())),this._register(this._editorModelReference.object.onDidChangeReadonly(()=>this._onDidChangeCapabilities.fire())),this._register(this._editorModelReference.object.onDidRevertUntitled(()=>this.dispose())),this._editorModelReference.object.isDirty()&&this._onDidChangeDirty.fire()}if(this.options._backupId){const w=await this._notebookService.withNotebookDataProvider(this._editorModelReference.object.notebook.viewType);if(!(w instanceof y.SimpleNotebookProviderInfo))throw new Error("CANNOT open file notebook with this provider");const E=await w.serializer.dataToNotebook(r.VSBuffer.fromString(JSON.stringify({__webview_backup:this.options._backupId})));this._editorModelReference.object.notebook.applyEdits([{editType:1,index:0,count:this._editorModelReference.object.notebook.length,cells:E.cells}],!0,void 0,()=>{},void 0,!1),this.options._workingCopy&&(this.options._backupId=void 0,this.options._workingCopy=void 0,this.options.startDirty=void 0)}return this._editorModelReference.object}toUntyped(){return{resource:this.preferredResource,options:{override:this.viewType}}}matches(n){return super.matches(n)?!0:n instanceof d?this.viewType===n.viewType&&(0,b.isEqual)(this.resource,n.resource):!1}};e.NotebookEditorInput=p,e.NotebookEditorInput=p=d=fe([O(3,y.INotebookService),O(4,f.INotebookEditorModelResolverService),O(5,T.IFileDialogService),O(6,D.IInstantiationService),O(7,v.ILabelService),O(8,S.IFileService),O(9,i.IFilesConfigurationService),O(10,s.IExtensionService),O(11,u.IEditorService)],p);function c(l){return!!l&&typeof l=="object"&&Array.isArray(l.editorInputs)&&l.editorInputs.every(n=>n instanceof p)}e.isCompositeNotebookEditorInput=c}),define(Q[961],Y([1,0,6,55,26,146,75,49,5,163,917,1277,314,148]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveEditorInput=void 0;let s=class extends m.EditorInput{static{i=this}static create(u,d,p,c,l){return u.createInstance(i,d,p,c,l)}static{this.windowNames={}}static setName(u,d){d&&(this.windowNames[u.path]=d)}static{this.ID="workbench.input.interactive"}get editorId(){return"interactive"}get typeId(){return i.ID}get language(){return this._inputModelRef?.object.textEditorModel.getLanguageId()??this._initLanguage}get notebookEditorInput(){return this._notebookEditorInput}get editorInputs(){return[this._notebookEditorInput]}get resource(){return this._resource}get inputResource(){return this._inputResource}get primary(){return this._notebookEditorInput}constructor(u,d,p,c,l,n,g,w,E,C){const I=a.NotebookEditorInput.create(l,u,"interactive",{});super(),this._notebookService=E,this._fileDialogService=C,this._notebookEditorInput=I,this._register(this._notebookEditorInput),this.name=p??i.windowNames[u.path]??y.basename(u.path,y.extname(u.path)),this._initLanguage=c,this._resource=u,this._inputResource=d,this._inputResolver=null,this._editorModelReference=null,this._inputModelRef=null,this._textModelService=n,this._interactiveDocumentService=g,this._historyService=w,this._registerListeners()}_registerListeners(){const u=t.Event.once(this.primary.onWillDispose);this._register(u(()=>{this.isDisposed()||this.dispose()})),this._register(this.primary.onDidChangeDirty(()=>this._onDidChangeDirty.fire())),this._register(this.primary.onDidChangeLabel(()=>this._onDidChangeLabel.fire())),this._register(this.primary.onDidChangeCapabilities(()=>this._onDidChangeCapabilities.fire()))}get capabilities(){return 518}async _resolveEditorModel(){return this._editorModelReference||(this._editorModelReference=await this._notebookEditorInput.resolve()),this._editorModelReference}async resolve(){return this._editorModelReference?this._editorModelReference:this._inputResolver?this._inputResolver:(this._inputResolver=this._resolveEditorModel(),this._inputResolver)}async resolveInput(u){if(this._inputModelRef)return this._inputModelRef.object.textEditorModel;const d=u??this._initLanguage??D.PLAINTEXT_LANGUAGE_ID;return this._interactiveDocumentService.willCreateInteractiveDocument(this.resource,this.inputResource,d),this._inputModelRef=await this._textModelService.createModelReference(this.inputResource),this._inputModelRef.object.textEditorModel}async save(u,d){if(this._editorModelReference)return this.hasCapability(4)?this.saveAs(u,d):(await this._editorModelReference.save(d),this)}async saveAs(u,d){if(!this._editorModelReference||!this._notebookService.getContributedNotebookType("interactive"))return;const c=this.getName()+".ipynb",l=(0,b.joinPath)(await this._fileDialogService.defaultFilePath(),c),n=await this._fileDialogService.pickFileToSave(l,d?.availableFileSystems);if(n)return await this._editorModelReference.saveAs(n)}matches(u){return super.matches(u)?!0:u instanceof i?(0,b.isEqual)(this.resource,u.resource)&&(0,b.isEqual)(this.inputResource,u.inputResource):!1}getName(){return this.name}isModified(){return this._editorModelReference?.isModified()??!1}dispose(){this._editorModelReference?.revert({soft:!0}),this._notebookEditorInput?.dispose(),this._editorModelReference?.dispose(),this._editorModelReference=null,this._interactiveDocumentService.willRemoveInteractiveDocument(this.resource,this.inputResource),this._inputModelRef?.dispose(),this._inputModelRef=null,super.dispose()}get historyService(){return this._historyService}};e.InteractiveEditorInput=s,e.InteractiveEditorInput=s=i=fe([O(4,v.IInstantiationService),O(5,T.ITextModelService),O(6,S.IInteractiveDocumentService),O(7,h.IInteractiveHistoryService),O(8,r.INotebookService),O(9,f.IFileDialogService)],s)}),define(Q[103],Y([1,0,71,314,356]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellFoldingState=e.cellRangeToViewCells=e.expandCellRangesWithHiddenCells=e.getNotebookEditorFromEditorPane=e.CursorAtLineBoundary=e.CursorAtBoundary=e.CellFocusMode=e.CellEditState=e.CellRevealType=e.CellRevealRangeType=e.CellRevealSyncType=e.NotebookOverviewRulerLane=e.CellLayoutContext=e.CellLayoutState=e.RenderOutputType=e.KERNEL_RECOMMENDATIONS=e.KERNEL_EXTENSIONS=e.JUPYTER_EXTENSION_ID=e.IPYNB_VIEW_TYPE=e.EXPAND_CELL_OUTPUT_COMMAND_ID=e.QUIT_EDIT_CELL_COMMAND_ID=e.CHANGE_CELL_LANGUAGE=e.DETECT_CELL_LANGUAGE=e.EXECUTE_CELL_COMMAND_ID=e.EXPAND_CELL_INPUT_COMMAND_ID=void 0,e.EXPAND_CELL_INPUT_COMMAND_ID="notebook.cell.expandCellInput",e.EXECUTE_CELL_COMMAND_ID="notebook.cell.execute",e.DETECT_CELL_LANGUAGE="notebook.cell.detectLanguage",e.CHANGE_CELL_LANGUAGE="notebook.cell.changeLanguage",e.QUIT_EDIT_CELL_COMMAND_ID="notebook.cell.quitEdit",e.EXPAND_CELL_OUTPUT_COMMAND_ID="notebook.cell.expandCellOutput",e.IPYNB_VIEW_TYPE="jupyter-notebook",e.JUPYTER_EXTENSION_ID="ms-toolsai.jupyter",e.KERNEL_EXTENSIONS=new Map([[e.IPYNB_VIEW_TYPE,e.JUPYTER_EXTENSION_ID]]),e.KERNEL_RECOMMENDATIONS=new Map,e.KERNEL_RECOMMENDATIONS.set(e.IPYNB_VIEW_TYPE,new Map),e.KERNEL_RECOMMENDATIONS.get(e.IPYNB_VIEW_TYPE)?.set("python",{extensionIds:["ms-python.python",e.JUPYTER_EXTENSION_ID],displayName:"Python + Jupyter"});var D;(function(c){c[c.Html=0]="Html",c[c.Extension=1]="Extension"})(D||(e.RenderOutputType=D={}));var T;(function(c){c[c.Uninitialized=0]="Uninitialized",c[c.Estimated=1]="Estimated",c[c.FromCache=2]="FromCache",c[c.Measured=3]="Measured"})(T||(e.CellLayoutState=T={}));var f;(function(c){c[c.Fold=0]="Fold"})(f||(e.CellLayoutContext=f={}));var v;(function(c){c[c.Left=1]="Left",c[c.Center=2]="Center",c[c.Right=4]="Right",c[c.Full=7]="Full"})(v||(e.NotebookOverviewRulerLane=v={}));var m;(function(c){c[c.Default=1]="Default",c[c.Top=2]="Top",c[c.Center=3]="Center",c[c.CenterIfOutsideViewport=4]="CenterIfOutsideViewport"})(m||(e.CellRevealSyncType=m={}));var S;(function(c){c[c.Default=1]="Default",c[c.Center=2]="Center",c[c.CenterIfOutsideViewport=3]="CenterIfOutsideViewport"})(S||(e.CellRevealRangeType=S={}));var h;(function(c){c[c.NearTopIfOutsideViewport=0]="NearTopIfOutsideViewport",c[c.CenterIfOutsideViewport=1]="CenterIfOutsideViewport"})(h||(e.CellRevealType=h={}));var a;(function(c){c[c.Preview=0]="Preview",c[c.Editing=1]="Editing"})(a||(e.CellEditState=a={}));var r;(function(c){c[c.Container=0]="Container",c[c.Editor=1]="Editor",c[c.Output=2]="Output"})(r||(e.CellFocusMode=r={}));var i;(function(c){c[c.None=0]="None",c[c.Top=1]="Top",c[c.Bottom=2]="Bottom",c[c.Both=3]="Both"})(i||(e.CursorAtBoundary=i={}));var s;(function(c){c[c.None=0]="None",c[c.Start=1]="Start",c[c.End=2]="End",c[c.Both=3]="Both"})(s||(e.CursorAtLineBoundary=s={}));function o(c){if(!c)return;if(c.getId()===t.NOTEBOOK_EDITOR_ID)return c.getControl();const l=c.input;if(l&&(0,y.isCompositeNotebookEditorInput)(l))return c.getControl()?.notebookEditor}e.getNotebookEditorFromEditorPane=o;function u(c,l){const n=(0,b.cellRangesToIndexes)(l),g=[];return n.forEach(w=>{if(!c.cellAt(w))return;const C=c.getViewIndexByModelIndex(w);if(C<0)return;const I=C+1,_=c.getCellRangeFromViewRange(C,I);_&&g.push(_)}),(0,b.reduceCellRanges)(g)}e.expandCellRangesWithHiddenCells=u;function d(c,l){const n=[];return(0,b.reduceCellRanges)(l).forEach(g=>{n.push(...c.getCellsInRange(g))}),n}e.cellRangeToViewCells=d;var p;(function(c){c[c.None=0]="None",c[c.Expanded=1]="Expanded",c[c.Collapsed=2]="Collapsed"})(p||(e.CellFoldingState=p={}))}),define(Q[3857],Y([1,0,4,42,10,9,208,103,292,362,70,21,53]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebookEditors=void 0;class r{constructor(o,u){this.editor=o,this.disposables=u}dispose(){this.disposables.dispose()}}let i=class{constructor(o,u,d,p,c){this._editorService=u,this._notebookEditorService=d,this._editorGroupService=p,this._configurationService=c,this._disposables=new t.DisposableStore,this._mainThreadEditors=new Map,this._proxy=o.getProxy(a.ExtHostContext.ExtHostNotebookEditors),this._editorService.onDidActiveEditorChange(()=>this._updateEditorViewColumns(),this,this._disposables),this._editorGroupService.onDidRemoveGroup(()=>this._updateEditorViewColumns(),this,this._disposables),this._editorGroupService.onDidMoveGroup(()=>this._updateEditorViewColumns(),this,this._disposables)}dispose(){this._disposables.dispose(),(0,t.dispose)(this._mainThreadEditors.values())}handleEditorsAdded(o){for(const u of o){const d=new t.DisposableStore;d.add(u.onDidChangeVisibleRanges(()=>{this._proxy.$acceptEditorPropertiesChanged(u.getId(),{visibleRanges:{ranges:u.visibleRanges}})})),d.add(u.onDidChangeSelection(()=>{this._proxy.$acceptEditorPropertiesChanged(u.getId(),{selections:{selections:u.getSelections()}})}));const p=new r(u,d);this._mainThreadEditors.set(u.getId(),p)}}handleEditorsRemoved(o){for(const u of o)this._mainThreadEditors.get(u)?.dispose(),this._mainThreadEditors.delete(u)}_updateEditorViewColumns(){const o=Object.create(null);for(const u of this._editorService.visibleEditorPanes){const d=(0,f.getNotebookEditorFromEditorPane)(u);d&&this._mainThreadEditors.has(d.getId())&&(o[d.getId()]=(0,m.editorGroupToColumn)(this._editorGroupService,u.group))}(0,y.equals)(o,this._currentViewColumnInfo)||(this._currentViewColumnInfo=o,this._proxy.$acceptEditorViewColumns(o))}async $tryShowNotebookDocument(o,u,d){const p={cellSelections:d.selections,preserveFocus:d.preserveFocus,pinned:d.pinned,activation:d.preserveFocus?T.EditorActivation.RESTORE:void 0,override:u},c=await this._editorService.openEditor({resource:b.URI.revive(o),options:p},(0,m.columnToEditorGroup)(this._editorGroupService,this._configurationService,d.position)),l=(0,f.getNotebookEditorFromEditorPane)(c);if(l)return l.getId();throw new Error(`Notebook Editor creation failure for document ${JSON.stringify(o)}`)}async $tryRevealRange(o,u,d){const p=this._notebookEditorService.getNotebookEditor(o);if(!p)return;const c=p;if(!c.hasModel()||u.start>=c.getLength())return;const l=c.cellAt(u.start);switch(d){case a.NotebookEditorRevealType.Default:return c.revealCellRangeInView(u);case a.NotebookEditorRevealType.InCenter:return c.revealInCenter(l);case a.NotebookEditorRevealType.InCenterIfOutsideViewport:return c.revealInCenterIfOutsideViewport(l);case a.NotebookEditorRevealType.AtTop:return c.revealInViewAtTop(l)}}$trySetSelections(o,u){const d=this._notebookEditorService.getNotebookEditor(o);d&&(d.setSelections(u),u.length&&d.setFocus({start:u[0].start,end:u[0].start+1}))}};e.MainThreadNotebookEditors=i,e.MainThreadNotebookEditors=i=fe([O(1,h.IEditorService),O(2,v.INotebookEditorService),O(3,S.IEditorGroupsService),O(4,D.IConfigurationService)],i)}),define(Q[1367],Y([1,0,4,1222,36,103]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindMatchDecorationModel=void 0;class T extends t.Disposable{constructor(v,m){super(),this._notebookEditor=v,this.ownerID=m,this._allMatchesDecorations=[],this._currentMatchCellDecorations=[],this._allMatchesCellDecorations=[],this._currentMatchDecorations=null}get currentMatchDecorations(){return this._currentMatchDecorations}clearDecorations(){this.clearCurrentFindMatchDecoration(),this.setAllFindMatchesDecorations([])}async highlightCurrentFindMatchDecorationInCell(v,m){return this.clearCurrentFindMatchDecoration(),this._notebookEditor.changeModelDecorations(S=>{const h=y.FindDecorations._CURRENT_FIND_MATCH_DECORATION,a=[{range:m,options:h}],r={ownerId:v.handle,decorations:a};this._currentMatchDecorations={kind:"input",decorations:S.deltaDecorations(this._currentMatchDecorations?.kind==="input"?this._currentMatchDecorations.decorations:[],[r])}}),this._currentMatchCellDecorations=this._notebookEditor.deltaCellDecorations(this._currentMatchCellDecorations,[{ownerId:v.handle,handle:v.handle,options:{overviewRuler:{color:b.overviewRulerSelectionHighlightForeground,modelRanges:[m],includeOutput:!1,position:D.NotebookOverviewRulerLane.Center}}}]),null}async highlightCurrentFindMatchDecorationInWebview(v,m){this.clearCurrentFindMatchDecoration();const S=await this._notebookEditor.findHighlightCurrent(m,this.ownerID);return this._currentMatchDecorations={kind:"output",index:m},this._currentMatchCellDecorations=this._notebookEditor.deltaCellDecorations(this._currentMatchCellDecorations,[{ownerId:v.handle,handle:v.handle,options:{overviewRuler:{color:b.overviewRulerSelectionHighlightForeground,modelRanges:[],includeOutput:!0,position:D.NotebookOverviewRulerLane.Center}}}]),S}clearCurrentFindMatchDecoration(){this._currentMatchDecorations?.kind==="input"?this._notebookEditor.changeModelDecorations(v=>{v.deltaDecorations(this._currentMatchDecorations?.kind==="input"?this._currentMatchDecorations.decorations:[],[]),this._currentMatchDecorations=null}):this._currentMatchDecorations?.kind==="output"&&this._notebookEditor.findUnHighlightCurrent(this._currentMatchDecorations.index,this.ownerID),this._currentMatchCellDecorations=this._notebookEditor.deltaCellDecorations(this._currentMatchCellDecorations,[])}setAllFindMatchesDecorations(v){this._notebookEditor.changeModelDecorations(m=>{const S=y.FindDecorations._FIND_MATCH_DECORATION,h=v.map(a=>{const r=new Array(a.contentMatches.length);for(let i=0;i<a.contentMatches.length;i++)r[i]={range:a.contentMatches[i].range,options:S};return{ownerId:a.cell.handle,decorations:r}});this._allMatchesDecorations=m.deltaDecorations(this._allMatchesDecorations,h)}),this._allMatchesCellDecorations=this._notebookEditor.deltaCellDecorations(this._allMatchesCellDecorations,v.map(m=>({ownerId:m.cell.handle,handle:m.cell.handle,options:{overviewRuler:{color:b.overviewRulerFindMatchForeground,modelRanges:m.contentMatches.map(S=>S.range),includeOutput:m.webviewMatches.length>0,position:D.NotebookOverviewRulerLane.Center}}})))}stopWebviewFind(){this._notebookEditor.findStop(this.ownerID)}dispose(){this.clearDecorations(),super.dispose()}}e.FindMatchDecorationModel=T}),define(Q[962],Y([1,0,14,103,27,490,71,9,4,20,1367]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindModel=e.CellFindMatchModel=void 0;class h{get length(){return this._contentMatches.length+this._webviewMatches.length}get contentMatches(){return this._contentMatches}get webviewMatches(){return this._webviewMatches}constructor(i,s,o,u){this.cell=i,this.index=s,this._contentMatches=o,this._webviewMatches=u}getMatch(i){if(i>=this.length)throw new Error("NotebookCellFindMatch: index out of range");return i<this._contentMatches.length?this._contentMatches[i]:this._webviewMatches[i-this._contentMatches.length]}}e.CellFindMatchModel=h;let a=class extends v.Disposable{get findMatches(){return this._findMatches}get currentMatch(){return this._currentMatch}constructor(i,s,o){super(),this._notebookEditor=i,this._state=s,this._configurationService=o,this._findMatches=[],this._findMatchesStarts=null,this._currentMatch=-1,this._computePromise=null,this._modelDisposable=this._register(new v.DisposableStore),this._throttledDelayer=new t.Delayer(20),this._computePromise=null,this._register(s.onFindReplaceStateChange(u=>{this._updateCellStates(u),(u.searchString||u.isRegex||u.matchCase||u.searchScope||u.wholeWord||u.isRevealed&&this._state.isRevealed||u.filters||u.isReplaceRevealed)&&this.research(),u.isRevealed&&!this._state.isRevealed&&this.clear()})),this._register(this._notebookEditor.onDidChangeModel(u=>{this._registerModelListener(u)})),this._register(this._notebookEditor.onDidChangeCellState(u=>{u.cell.cellKind===T.CellKind.Markup&&u.source.editStateChanged&&this.research()})),this._notebookEditor.hasModel()&&this._registerModelListener(this._notebookEditor.textModel),this._findMatchDecorationModel=new S.FindMatchDecorationModel(this._notebookEditor,this._notebookEditor.getId())}_updateCellStates(i){if(!this._state.filters?.markupInput||!this._state.filters?.markupPreview)return;const s=()=>{const o=this._notebookEditor.getViewModel();if(!o)return;const u=this._configurationService.inspect("editor.wordSeparators").value,d={regex:this._state.isRegex,wholeWord:this._state.wholeWord,caseSensitive:this._state.matchCase,wordSeparators:u,includeMarkupInput:!0,includeCodeInput:!1,includeMarkupPreview:!1,includeOutput:!1},p=o.find(this._state.searchString,d);for(let c=0;c<o.length;c++){const l=o.cellAt(c);if(l&&l.cellKind===T.CellKind.Markup){const g=p.find(E=>E.cell.handle===l.handle&&E.contentMatches.length>0)?y.CellEditState.Editing:y.CellEditState.Preview,w=l.getEditState();if(w===y.CellEditState.Editing&&l.editStateSource!=="find")continue;w!==g&&l.updateEditState(g,"find")}}};if(i.isReplaceRevealed&&!this._state.isReplaceRevealed){const o=this._notebookEditor.getViewModel();if(!o)return;for(let u=0;u<o.length;u++){const d=o.cellAt(u);d&&d.cellKind===T.CellKind.Markup&&d.getEditState()===y.CellEditState.Editing&&d.editStateSource==="find"&&d.updateEditState(y.CellEditState.Preview,"find")}return}(i.isReplaceRevealed||(i.filters||i.isRevealed||i.searchString||i.replaceString)&&this._state.isRevealed&&this._state.isReplaceRevealed)&&s()}ensureFindMatches(){this._findMatchesStarts||this.set(this._findMatches,!0)}getCurrentMatch(){const i=this._findMatchesStarts.getIndexOf(this._currentMatch),s=this._findMatches[i.index].cell,o=this._findMatches[i.index].getMatch(i.remainder);return{cell:s,match:o,isModelMatch:i.remainder<this._findMatches[i.index].contentMatches.length}}refreshCurrentMatch(i){const s=this.findMatches.findIndex(p=>p.cell===i.cell);if(s===-1)return;const u=this.findMatches[s].contentMatches.findIndex(p=>p.range.intersectRanges(i.range)!==null);if(u===void 0)return;const d=s===0?0:this._findMatchesStarts?.getPrefixSum(s-1)??0;this._currentMatch=d+u,this.highlightCurrentFindMatchDecoration(s,u).then(p=>{this.revealCellRange(s,u,p),this._state.changeMatchInfo(this._currentMatch,this._findMatches.reduce((c,l)=>c+l.length,0),void 0)})}find(i){if(!this.findMatches.length)return;if(!this._findMatchesStarts)this.set(this._findMatches,!0),"index"in i&&(this._currentMatch=i.index);else{const o=this._findMatchesStarts.getTotalSum();if("index"in i)this._currentMatch=i.index;else if(this._currentMatch===-1)this._currentMatch=i.previous?o-1:0;else{const u=(this._currentMatch+(i.previous?-1:1)+o)%o;this._currentMatch=u}}const s=this._findMatchesStarts.getIndexOf(this._currentMatch);this.highlightCurrentFindMatchDecoration(s.index,s.remainder).then(o=>{this.revealCellRange(s.index,s.remainder,o),this._state.changeMatchInfo(this._currentMatch,this._findMatches.reduce((u,d)=>u+d.length,0),void 0)})}revealCellRange(i,s,o){const u=this._findMatches[i];if(s>=u.contentMatches.length)this._notebookEditor.focusElement(u.cell),this._notebookEditor.getCellIndex(u.cell)!==void 0&&this._notebookEditor.revealCellOffsetInCenterAsync(u.cell,o??0);else{const d=u.getMatch(s);u.cell.getEditState()!==y.CellEditState.Editing&&u.cell.updateEditState(y.CellEditState.Editing,"find"),u.cell.isInputCollapsed=!1,this._notebookEditor.focusElement(u.cell),this._notebookEditor.setCellEditorSelection(u.cell,d.range),this._notebookEditor.revealRangeInCenterIfOutsideViewportAsync(u.cell,d.range)}}_registerModelListener(i){this._modelDisposable.clear(),i&&this._modelDisposable.add(i.onDidChangeContent(s=>{s.rawEvents.some(o=>o.kind===T.NotebookCellsChangeType.ChangeCellContent||o.kind===T.NotebookCellsChangeType.ModelChange)&&this.research()})),this.research()}async research(){return this._throttledDelayer.trigger(async()=>{this._state.change({isSearching:!0},!1),await this._research(),this._state.change({isSearching:!1},!1)})}async _research(){if(this._computePromise?.cancel(),!this._state.isRevealed||!this._notebookEditor.hasModel()){this.set([],!1);return}this._computePromise=(0,t.createCancelablePromise)(c=>this._compute(c));const i=await this._computePromise;if(!i){this.set([],!1);return}if(i.length===0){this.set([],!1);return}const s=c=>{const l=(0,m.findFirstInSorted)(i.map(n=>n.index),n=>n>=c);this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,l))};if(this._currentMatch===-1)if(this._notebookEditor.getLength()===0){this.set(i,!1);return}else{const c=this._notebookEditor.getFocus().start;s(c),this.set(i,!1);return}const o=this._findMatchesStarts.getIndexOf(this._currentMatch),u=this._findMatches[o.index].cell,d=this._notebookEditor.getCellIndex(u);if(d<0){if(this._notebookEditor.getLength()===0){this.set(i,!1);return}s(d);return}const p=this._notebookEditor.cellAt(d);if(p.cellKind===T.CellKind.Markup&&p.getEditState()===y.CellEditState.Preview){s(d);return}if(!this._findMatchDecorationModel.currentMatchDecorations){s(d);return}if(this._findMatchDecorationModel.currentMatchDecorations.kind==="input"){const c=this._findMatchDecorationModel.currentMatchDecorations.decorations.find(n=>n.ownerId===p.handle);if(!c){s(d);return}const l=(0,m.findFirstInSorted)(i,n=>n.index>=d)%i.length;if(i[l].index>d){this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,l));return}else{let n=p.editorAttached&&c.decorations[0]?p.getCellDecorationRange(c.decorations[0]):null;if(n===null&&o.remainder<this._findMatches[o.index].contentMatches.length&&(n=this._findMatches[o.index].getMatch(o.remainder).range),n!==null){const g=i[l],w=(0,m.findFirstInSorted)(g.contentMatches,E=>b.Range.compareRangesUsingStarts(E.range,n)>=0);this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,l)+w)}else{this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,l));return}}}else{const c=(0,m.findFirstInSorted)(i.map(l=>l.index),l=>l>=d)%i.length;this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,c))}}set(i,s){if(!i||!i.length){this._findMatches=[],this._findMatchDecorationModel.setAllFindMatchesDecorations([]),this.constructFindMatchesStarts(),this._currentMatch=-1,this._findMatchDecorationModel.clearCurrentFindMatchDecoration(),this._state.changeMatchInfo(this._currentMatch,this._findMatches.reduce((o,u)=>o+u.length,0),void 0);return}this._findMatches=i,this._findMatchDecorationModel.setAllFindMatchesDecorations(i||[]),this.constructFindMatchesStarts(),s&&(this._currentMatch=0,this.highlightCurrentFindMatchDecoration(0,0)),this._state.changeMatchInfo(this._currentMatch,this._findMatches.reduce((o,u)=>o+u.length,0),void 0)}async _compute(i){if(!this._notebookEditor.hasModel())return null;let s=null;const o=this._state.searchString,u=this._configurationService.inspect("editor.wordSeparators").value,d={regex:this._state.isRegex,wholeWord:this._state.wholeWord,caseSensitive:this._state.matchCase,wordSeparators:u,includeMarkupInput:this._state.filters?.markupInput??!0,includeCodeInput:this._state.filters?.codeInput??!0,includeMarkupPreview:!!this._state.filters?.markupPreview,includeOutput:!!this._state.filters?.codeOutput};return s=await this._notebookEditor.find(o,d,i),i.isCancellationRequested?null:s}_updateCurrentMatch(i,s){this.set(i,!1),this._currentMatch=s%i.length;const o=this._findMatchesStarts.getIndexOf(this._currentMatch);this.highlightCurrentFindMatchDecoration(o.index,o.remainder),this._state.changeMatchInfo(this._currentMatch,this._findMatches.reduce((u,d)=>u+d.length,0),void 0)}_matchesCountBeforeIndex(i,s){let o=0;for(let u=0;u<s;u++)o+=i[u].length;return o}constructFindMatchesStarts(){if(this._findMatches&&this._findMatches.length){const i=new Uint32Array(this._findMatches.length);for(let s=0;s<this._findMatches.length;s++)i[s]=this._findMatches[s].length;this._findMatchesStarts=new D.PrefixSumComputer(i)}else this._findMatchesStarts=null}async highlightCurrentFindMatchDecoration(i,s){const o=this._findMatches[i].cell,u=this._findMatches[i].getMatch(s);return s<this._findMatches[i].contentMatches.length?this._findMatchDecorationModel.highlightCurrentFindMatchDecorationInCell(o,u.range):this._findMatchDecorationModel.highlightCurrentFindMatchDecorationInWebview(o,u.index)}clear(){this._computePromise?.cancel(),this._throttledDelayer.cancel(),this.set([],!1)}dispose(){this._findMatchDecorationModel.dispose(),super.dispose()}};e.FindModel=a,e.FindModel=a=fe([O(2,f.IConfigurationService)],a)}),define(Q[1368],Y([1,0,7,87,203,4,33,352,517,711,2802,13,9,8,29,5,962,1292,103,176]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookFindContrib=void 0;const c="find-hide-transition",l="find-show-transition";let n=69;const g=200;let w=class extends D.Disposable{static{this.id="workbench.notebook.find"}constructor(I,_){super(),this.notebookEditor=I,this.instantiationService=_,this.widget=new b.Lazy(()=>this._register(this.instantiationService.createInstance(E,this.notebookEditor)))}show(I,_){return this.widget.value.show(I,_)}hide(){this.widget.rawValue?.hide()}replace(I){return this.widget.value.replace(I)}};e.NotebookFindContrib=w,e.NotebookFindContrib=w=fe([O(1,s.IInstantiationService)],w);let E=class extends u.SimpleFindReplaceWidget{constructor(I,_,A,k,L,R,M){super(_,A,k,L,M,new v.FindReplaceState,I),this._showTimeout=null,this._hideTimeout=null,this._findModel=new o.FindModel(this._notebookEditor,this._state,this._configurationService),t.append(this._notebookEditor.getDomNode(),this.getDomNode()),this._findWidgetFocused=p.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED.bindTo(A),this._register(this._findInput.onKeyDown(N=>this._onFindInputKeyDown(N))),this._register(this._replaceInput.onKeyDown(N=>this._onReplaceInputKeyDown(N))),this._register(this._state.onFindReplaceStateChange(N=>{if(this.onInputChanged(),N.isSearching&&(this._state.isSearching?this._progressBar.infinite().show(g):this._progressBar.stop().hide()),this._findModel.currentMatch>=0){const x=this._findModel.getCurrentMatch();this._replaceBtn.setEnabled(x.isModelMatch)}const P=this._findModel.findMatches;this._replaceAllBtn.setEnabled(P.length>0&&P.find(x=>x.webviewMatches.length>0)===void 0),N.filters&&this._findInput.updateFilterState(this._state.filters?.isModified()??!1)})),this._register(t.addDisposableListener(this.getDomNode(),t.EventType.FOCUS,N=>{this._previousFocusElement=N.relatedTarget instanceof HTMLElement?N.relatedTarget:void 0},!0))}_onFindInputKeyDown(I){if(I.equals(3)){this.find(!1),I.preventDefault();return}else if(I.equals(1027)){this.find(!0),I.preventDefault();return}}_onReplaceInputKeyDown(I){if(I.equals(3)){this.replaceOne(),I.preventDefault();return}}onInputChanged(){this._state.change({searchString:this.inputValue},!1);const I=this._findModel.findMatches;return!!(I&&I.length)}findIndex(I){this._findModel.find({index:I})}find(I){this._findModel.find({previous:I})}replaceOne(){if(!this._notebookEditor.hasModel()||!this._findModel.findMatches.length)return;this._findModel.ensureFindMatches(),this._findModel.currentMatch<0&&this._findModel.find({previous:!1});const I=this._findModel.getCurrentMatch(),_=I.cell;if(I.isModelMatch){const A=I.match;this._progressBar.infinite().show(g);const L=this.replacePattern.buildReplaceString(A.matches,this._state.preserveCase);this._notebookEditor.getViewModel().replaceOne(_,A.range,L).then(()=>{this._progressBar.stop()})}else console.error("Replace does not work for output match")}replaceAll(){if(!this._notebookEditor.hasModel())return;this._progressBar.infinite().show(g);const I=this.replacePattern,_=this._findModel.findMatches,A=[];_.forEach(L=>{L.contentMatches.forEach(R=>{const M=R.matches;A.push(I.buildReplaceString(M,this._state.preserveCase))})}),this._notebookEditor.getViewModel().replaceAll(this._findModel.findMatches,A).then(()=>{this._progressBar.stop()})}findFirst(){}onFocusTrackerFocus(){this._findWidgetFocused.set(!0)}onFocusTrackerBlur(){this._previousFocusElement=void 0,this._findWidgetFocused.reset()}onReplaceInputFocusTrackerFocus(){}onReplaceInputFocusTrackerBlur(){}onFindInputFocusTrackerFocus(){}onFindInputFocusTrackerBlur(){}async show(I,_){const A=this._state.searchString!==I;super.show(I,_),this._state.change({searchString:I??this._state.searchString,isRevealed:!0},!1),typeof _?.matchIndex=="number"?(this._findModel.findMatches.length||await this._findModel.research(),this.findIndex(_.matchIndex)):this._findInput.select(),!A&&_?.searchStringSeededFrom&&this._findModel.refreshCurrentMatch(_.searchStringSeededFrom),this._showTimeout===null&&(this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null,this._notebookEditor.removeClassName(c)),this._notebookEditor.addClassName(l),this._showTimeout=window.setTimeout(()=>{this._notebookEditor.removeClassName(l),this._showTimeout=null},200))}replace(I,_){super.showWithReplace(I,_),this._state.change({searchString:I??"",replaceString:_??"",isRevealed:!0},!1),this._replaceInput.select(),this._showTimeout===null&&(this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null,this._notebookEditor.removeClassName(c)),this._notebookEditor.addClassName(l),this._showTimeout=window.setTimeout(()=>{this._notebookEditor.removeClassName(l),this._showTimeout=null},200))}hide(){if(super.hide(),this._state.change({isRevealed:!1},!1),this._findModel.clear(),this._notebookEditor.findStop(),this._progressBar.stop(),this._hideTimeout===null&&(this._showTimeout!==null&&(window.clearTimeout(this._showTimeout),this._showTimeout=null,this._notebookEditor.removeClassName(l)),this._notebookEditor.addClassName(c),this._hideTimeout=window.setTimeout(()=>{this._notebookEditor.removeClassName(c)},200)),this._previousFocusElement&&this._previousFocusElement.offsetParent&&(this._previousFocusElement.focus(),this._previousFocusElement=void 0),this._notebookEditor.hasModel())for(let I=0;I<this._notebookEditor.getLength();I++){const _=this._notebookEditor.cellAt(I);_.getEditState()===d.CellEditState.Editing&&_.editStateSource==="find"&&_.updateEditState(d.CellEditState.Preview,"closeFind")}}_updateMatchesCount(){if(!this._findModel||!this._findModel.findMatches)return;this._matchesCount.style.width=n+"px",this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let I;if(this._state.matchesCount>0){let _=String(this._state.matchesCount);this._state.matchesCount>=f.MATCHES_LIMIT&&(_+="+");const A=this._findModel.currentMatch<0?"?":String(this._findModel.currentMatch+1);I=T.format(m.NLS_MATCHES_LOCATION,A,_)}else I=m.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(I)),(0,y.alert)(this._getAriaLabel(I,this._state.currentMatch,this._state.searchString)),n=Math.max(n,this._matchesCount.clientWidth)}_getAriaLabel(I,_,A){return I===m.NLS_NO_RESULTS?A===""?(0,S.localize)(0,null,I):(0,S.localize)(1,null,I,A):(0,S.localize)(2,null,I,A)}dispose(){this._notebookEditor?.removeClassName(l),this._notebookEditor?.removeClassName(c),this._findModel.dispose(),super.dispose()}};E=fe([O(1,i.IContextViewService),O(2,r.IContextKeyService),O(3,a.IConfigurationService),O(4,i.IContextMenuService),O(5,h.IMenuService),O(6,s.IInstantiationService)],E)}),define(Q[3858],Y([1,0,22,26,79,73,518,2800,13,8,1368,103,355,71,176,21,1809]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,a.registerNotebookContribution)(S.NotebookFindContrib.id,S.NotebookFindContrib),(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:"notebook.hideFind",title:{value:(0,f.localize)(0,null),original:"Hide Find in Notebook"},keybinding:{when:m.ContextKeyExpr.and(i.NOTEBOOK_EDITOR_FOCUSED,i.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED),primary:9,weight:200}})}async run(d){const p=d.get(s.IEditorService),c=(0,h.getNotebookEditorFromEditorPane)(p.activeEditorPane);if(!c)return;c.getContribution(S.NotebookFindContrib.id).hide(),c.focus()}}),(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:"notebook.find",title:{value:(0,f.localize)(1,null),original:"Find in Notebook"},keybinding:{when:m.ContextKeyExpr.and(i.NOTEBOOK_EDITOR_FOCUSED,m.ContextKeyExpr.or(i.NOTEBOOK_IS_ACTIVE_EDITOR,i.INTERACTIVE_WINDOW_IS_ACTIVE_EDITOR),D.EditorContextKeys.focus.toNegated()),primary:2084,weight:200}})}async run(d){const p=d.get(s.IEditorService),c=(0,h.getNotebookEditorFromEditorPane)(p.activeEditorPane);if(!c)return;c.getContribution(S.NotebookFindContrib.id).show()}});function o(d,p){if(p.uri.scheme===t.Schemas.vscodeNotebookCell){const c=r.CellUri.parse(p.uri);if(c&&(0,y.isEqual)(c.notebook,d))return!0}return!1}function u(d,p){if(p.seedSearchStringFromSelection==="single"){const c=(0,T.getSelectionSearchString)(d,p.seedSearchStringFromSelection,p.seedSearchStringFromNonEmptySelection);if(c)return{searchString:c,selection:d.getSelection()}}else if(p.seedSearchStringFromSelection==="multiple"&&!p.updateSearchScope){const c=(0,T.getSelectionSearchString)(d,p.seedSearchStringFromSelection);if(c)return{searchString:c,selection:d.getSelection()}}}T.StartFindAction.addImplementation(100,(d,p,c)=>{const l=d.get(s.IEditorService),n=(0,h.getNotebookEditorFromEditorPane)(l.activeEditorPane);if(!n||!p.hasModel())return!1;if(!n.hasEditorFocus()&&!n.hasWebviewFocus()){const _=d.get(b.ICodeEditorService),A=_.getFocusedCodeEditor()||_.getActiveCodeEditor();if(!(n.hasModel()&&A&&A.hasModel()&&o(n.textModel.uri,A.getModel())))return!1}const g=n.getContribution(S.NotebookFindContrib.id),w=u(p,{forceRevealReplace:!1,seedSearchStringFromSelection:p.getOption(40).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:p.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:p.getOption(40).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:p.getOption(40).loop});let E;const C=p.getModel().uri,I=r.CellUri.parse(C);if(w?.selection&&I){const _=n.getCellByHandle(I.handle);_&&(E={searchStringSeededFrom:{cell:_,range:w.selection}})}return g.show(w?.searchString,E),!0}),T.StartFindReplaceAction.addImplementation(100,(d,p,c)=>{const l=d.get(s.IEditorService),n=(0,h.getNotebookEditorFromEditorPane)(l.activeEditorPane);if(!n||!p.hasModel())return!1;const g=n.getContribution(S.NotebookFindContrib.id),w=u(p,{forceRevealReplace:!1,seedSearchStringFromSelection:p.getOption(40).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:p.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:p.getOption(40).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:p.getOption(40).loop});return g?(g.replace(w?.searchString),!0):!1})}),define(Q[3859],Y([1,0,4,2810,13,81,103,355,148,21]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TroubleshootController=void 0;class S extends t.Disposable{static{this.id="workbench.notebook.troubleshoot"}constructor(a){super(),this._notebookEditor=a,this._localStore=this._register(new t.DisposableStore),this._cellStateListeners=[],this._enabled=!1,this._cellStatusItems=[],this._register(this._notebookEditor.onDidChangeModel(()=>{this._update()})),this._update()}toggle(){this._enabled=!this._enabled,this._update()}_update(){this._localStore.clear(),this._cellStateListeners.forEach(a=>a.dispose()),this._notebookEditor.hasModel()&&this._updateListener()}_log(a,r){if(this._enabled){const i=this._notebookEditor.getViewHeight(a);console.log(`cell#${a.handle}`,r,`${i} -> ${a.layoutInfo.totalHeight}`)}}_updateListener(){if(!this._notebookEditor.hasModel())return;for(let i=0;i<this._notebookEditor.getLength();i++){const s=this._notebookEditor.cellAt(i);this._cellStateListeners.push(s.onDidChangeLayout(o=>{this._log(s,o)}))}this._localStore.add(this._notebookEditor.onDidChangeViewCells(i=>{[...i.splices].reverse().forEach(s=>{const[o,u,d]=s,p=this._cellStateListeners.splice(o,u,...d.map(c=>c.onDidChangeLayout(l=>{this._log(c,l)})));(0,t.dispose)(p)})}));const a=this._notebookEditor.getViewModel();let r=[];this._enabled&&(r=this._getItemsForCells()),this._cellStatusItems=a.deltaCellStatusBarItems(this._cellStatusItems,r)}_getItemsForCells(){const a=[];for(let r=0;r<this._notebookEditor.getLength();r++)a.push({handle:r,items:[{text:`index: ${r}`,alignment:1,priority:Number.MAX_SAFE_INTEGER}]});return a}dispose(){(0,t.dispose)(this._cellStateListeners),super.dispose()}}e.TroubleshootController=S,(0,f.registerNotebookContribution)(S.id,S),(0,b.registerAction2)(class extends b.Action2{constructor(){super({id:"notebook.toggleLayoutTroubleshoot",title:{value:(0,y.localize)(0,null),original:"Toggle Notebook Layout Troubleshoot"},category:D.Categories.Developer,f1:!0})}async run(h){const a=h.get(m.IEditorService),r=(0,T.getNotebookEditorFromEditorPane)(a.activeEditorPane);if(!r)return;r.getContribution(S.id)?.toggle()}}),(0,b.registerAction2)(class extends b.Action2{constructor(){super({id:"notebook.inspectLayout",title:{value:(0,y.localize)(1,null),original:"Inspect Notebook Layout"},category:D.Categories.Developer,f1:!0})}async run(h){const a=h.get(m.IEditorService),r=(0,T.getNotebookEditorFromEditorPane)(a.activeEditorPane);if(!(!r||!r.hasModel()))for(let i=0;i<r.getLength();i++){const s=r.cellAt(i);console.log(`cell#${s.handle}`,s.layoutInfo)}}}),(0,b.registerAction2)(class extends b.Action2{constructor(){super({id:"notebook.clearNotebookEdtitorTypeCache",title:{value:(0,y.localize)(2,null),original:"Clear Notebook Editor Cache"},category:D.Categories.Developer,f1:!0})}async run(h){h.get(v.INotebookService).clearEditorCache()}})}),define(Q[627],Y([1,0,152,51,27,146,473,103,612,71,356,2811]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.insertCellAtIndex=e.insertCell=e.computeCellLinesContents=e.joinCellsWithSurrounds=e.joinNotebookCells=e.joinSelectedCells=e.copyCellRange=e.moveCellRange=e.runDeleteAction=e.changeCellToKind=void 0;async function a(w,E,C,I){const{notebookEditor:_}=E;if(_.hasModel()&&!_.isReadOnly){if(E.ui&&E.cell){const{cell:A}=E;if(A.cellKind===w)return;const k=A.getText(),L=_.getCellIndex(A);C===void 0&&(C=(_.activeKernel?.supportedLanguages??[])[0]??D.PLAINTEXT_LANGUAGE_ID),_.textModel.applyEdits([{editType:1,index:L,count:1,cells:[{cellKind:w,source:k,language:C,mime:I??A.mime,outputs:A.model.outputs,metadata:A.metadata}]}],!0,{kind:m.SelectionStateType.Index,focus:_.getFocus(),selections:_.getSelections()},()=>({kind:m.SelectionStateType.Index,focus:_.getFocus(),selections:_.getSelections()}),void 0,!0);const R=_.cellAt(L);await _.focusNotebookCell(R,A.getEditState()===f.CellEditState.Editing?"editor":"container")}else if(E.selectedCells){const A=E.selectedCells,k=[];A.forEach(L=>{if(L.cellKind===w)return;const R=L.getText(),M=_.getCellIndex(L);C===void 0&&(C=(_.activeKernel?.supportedLanguages??[])[0]??D.PLAINTEXT_LANGUAGE_ID),k.push({editType:1,index:M,count:1,cells:[{cellKind:w,source:R,language:C,mime:I??L.mime,outputs:L.model.outputs,metadata:L.metadata}]})}),_.textModel.applyEdits(k,!0,{kind:m.SelectionStateType.Index,focus:_.getFocus(),selections:_.getSelections()},()=>({kind:m.SelectionStateType.Index,focus:_.getFocus(),selections:_.getSelections()}),void 0,!0)}}}e.changeCellToKind=a;function r(w,E){const C=w.textModel,I=w.getSelections(),_=w.getCellIndex(E),A=I.find(L=>L.start<=_&&_<L.end),k=!w.isReadOnly||C.viewType==="interactive";if(A){const L=I.reverse().map(M=>({editType:1,index:M.start,count:M.end-M.start,cells:[]})),R=A.end>=w.getLength()?void 0:w.cellAt(A.end);C.applyEdits(L,!0,{kind:m.SelectionStateType.Index,focus:w.getFocus(),selections:w.getSelections()},()=>{if(R){const M=C.cells.findIndex(N=>N.handle===R.handle);return{kind:m.SelectionStateType.Index,focus:{start:M,end:M+1},selections:[{start:M,end:M+1}]}}else if(C.length){const M=C.length-1;return{kind:m.SelectionStateType.Index,focus:{start:M,end:M+1},selections:[{start:M,end:M+1}]}}else return{kind:m.SelectionStateType.Index,focus:{start:0,end:0},selections:[{start:0,end:0}]}},void 0,k)}else{const L=w.getFocus(),R=[{editType:1,index:_,count:1,cells:[]}],M=[];for(let N=0;N<I.length;N++){const P=I[N];P.end<=_?M.push(P):P.start>_?M.push({start:P.start-1,end:P.end-1}):M.push({start:_,end:_+1})}if(w.cellAt(L.start)===E){const N=L.end===C.length?{start:L.start-1,end:L.end-1}:L;C.applyEdits(R,!0,{kind:m.SelectionStateType.Index,focus:w.getFocus(),selections:w.getSelections()},()=>({kind:m.SelectionStateType.Index,focus:N,selections:M}),void 0,k)}else{const N=L.start>_?{start:L.start-1,end:L.end-1}:L;C.applyEdits(R,!0,{kind:m.SelectionStateType.Index,focus:w.getFocus(),selections:w.getSelections()},()=>({kind:m.SelectionStateType.Index,focus:N,selections:M}),void 0,k)}}}e.runDeleteAction=r;async function i(w,E){if(!w.notebookEditor.hasModel())return;const C=w.notebookEditor,I=C.textModel;if(C.isReadOnly)return;const _=C.getSelections(),k=(0,f.expandCellRangesWithHiddenCells)(C,_)[0];if(!(!k||k.start===k.end))if(E==="up"){if(k.start===0)return;const L=k.start-1,R={start:k.start-1,end:k.end-1},M=w.notebookEditor.getFocus(),N=(0,S.cellRangeContains)(k,M)?{start:M.start-1,end:M.end-1}:{start:k.start-1,end:k.start};I.applyEdits([{editType:6,index:L,length:1,newIdx:k.end-1}],!0,{kind:m.SelectionStateType.Index,focus:C.getFocus(),selections:C.getSelections()},()=>({kind:m.SelectionStateType.Index,focus:N,selections:[R]}),void 0,!0);const P=C.getSelections()[0]??C.getFocus();C.revealCellRangeInView(P)}else{if(k.end>=I.length)return;const L=k.end,R={start:k.start+1,end:k.end+1},M=C.getFocus(),N=(0,S.cellRangeContains)(k,M)?{start:M.start+1,end:M.end+1}:{start:k.start+1,end:k.start+2};I.applyEdits([{editType:6,index:L,length:1,newIdx:k.start}],!0,{kind:m.SelectionStateType.Index,focus:C.getFocus(),selections:C.getSelections()},()=>({kind:m.SelectionStateType.Index,focus:N,selections:[R]}),void 0,!0);const P=C.getSelections()[0]??C.getFocus();C.revealCellRangeInView(P)}}e.moveCellRange=i;async function s(w,E){const C=w.notebookEditor;if(!C.hasModel())return;const I=C.textModel;if(C.isReadOnly)return;let _;if(w.ui){const A=w.cell,k=C.getCellIndex(A);_={start:k,end:k+1}}else{const A=C.getSelections();_=(0,f.expandCellRangesWithHiddenCells)(C,A)[0]}if(!(!_||_.start===_.end))if(E==="up"){const A=C.getFocus(),k=C.getSelections();I.applyEdits([{editType:1,index:_.end,count:0,cells:(0,S.cellRangesToIndexes)([_]).map(L=>(0,v.cloneNotebookCellTextModel)(C.cellAt(L).model))}],!0,{kind:m.SelectionStateType.Index,focus:A,selections:k},()=>({kind:m.SelectionStateType.Index,focus:A,selections:k}),void 0,!0)}else{const A=C.getFocus(),k=C.getSelections(),R=(0,S.cellRangesToIndexes)([_]).map(x=>(0,v.cloneNotebookCellTextModel)(C.cellAt(x).model)).length,M=w.ui?A:{start:A.start+R,end:A.end+R},N=w.ui?k:[{start:_.start+R,end:_.end+R}];I.applyEdits([{editType:1,index:_.end,count:0,cells:(0,S.cellRangesToIndexes)([_]).map(x=>(0,v.cloneNotebookCellTextModel)(C.cellAt(x).model))}],!0,{kind:m.SelectionStateType.Index,focus:A,selections:k},()=>({kind:m.SelectionStateType.Index,focus:M,selections:N}),void 0,!0);const P=C.getSelections()[0]??C.getFocus();C.revealCellRangeInView(P)}}e.copyCellRange=s;async function o(w,E,C){const I=C.notebookEditor;if(I.isReadOnly)return;const _=[],A=[];for(const P of I.getSelections())A.push(...I.getCellsInRange(P));if(A.length<=1)return;const k=A[0].cellKind;if(!A.every(P=>P.cellKind===k)){const P=(0,h.localize)(0,null);return E.warn(P)}const R=A[0],M=A.map(P=>P.getText()).join(R.textBuffer.getEOL()),N=I.getSelections()[0];_.push(new T.ResourceNotebookCellEdit(I.textModel.uri,{editType:1,index:N.start,count:N.end-N.start,cells:[{cellKind:R.cellKind,source:M,language:R.language,mime:R.mime,outputs:R.model.outputs,metadata:R.metadata}]}));for(const P of I.getSelections().slice(1))_.push(new T.ResourceNotebookCellEdit(I.textModel.uri,{editType:1,index:P.start,count:P.end-P.start,cells:[]}));_.length&&await w.apply(_,{quotableLabel:(0,h.localize)(1,null)})}e.joinSelectedCells=o;async function u(w,E,C,I){if(w.isReadOnly)return null;const _=w.textModel,A=w.getCellsInRange(E);if(!A.length||E.start===0&&C==="above"||E.end===_.length&&C==="below")return null;for(let k=0;k<A.length;k++){const L=A[k];if(I&&L.cellKind!==I)return null}if(C==="above"){const k=w.cellAt(E.start-1);if(I&&k.cellKind!==I)return null;const L=A.map(N=>(N.textBuffer.getEOL()??"")+N.getText()).join(""),R=k.textBuffer.getLineCount(),M=k.textBuffer.getLineLength(R);return{edits:[new t.ResourceTextEdit(k.uri,{range:new b.Range(R,M+1,R,M+1),text:L}),new T.ResourceNotebookCellEdit(_.uri,{editType:1,index:E.start,count:E.end-E.start,cells:[]})],cell:k,endFocus:{start:E.start-1,end:E.start},endSelections:[{start:E.start-1,end:E.start}]}}else{const k=w.cellAt(E.end);if(I&&k.cellKind!==I)return null;const L=A[0],M=[...A.slice(1),k].map(x=>(x.textBuffer.getEOL()??"")+x.getText()).join(""),N=L.textBuffer.getLineCount(),P=L.textBuffer.getLineLength(N);return{edits:[new t.ResourceTextEdit(L.uri,{range:new b.Range(N,P+1,N,P+1),text:M}),new T.ResourceNotebookCellEdit(_.uri,{editType:1,index:E.start+1,count:E.end-E.start,cells:[]})],cell:L,endFocus:{start:E.start,end:E.start+1},endSelections:[{start:E.start,end:E.start+1}]}}}e.joinNotebookCells=u;async function d(w,E,C){const I=E.notebookEditor,_=I.textModel,A=I.getViewModel();let k=null;if(E.ui){const L=E.cell.focusMode,R=I.getCellIndex(E.cell);if(k=await u(I,{start:R,end:R+1},C),!k)return;await w.apply(k?.edits,{quotableLabel:"Join Notebook Cells"}),A.updateSelectionsState({kind:m.SelectionStateType.Index,focus:k.endFocus,selections:k.endSelections}),k.cell.updateEditState(f.CellEditState.Editing,"joinCellsWithSurrounds"),I.revealCellRangeInView(I.getFocus()),L===f.CellFocusMode.Editor&&(k.cell.focusMode=f.CellFocusMode.Editor)}else{const L=I.getSelections();if(!L.length)return;const R=I.getFocus(),M=I.cellAt(R.start)?.focusMode,N=[];let P=null;const x=[];for(let V=L.length-1;V>=0;V--){const W=L[V],z=(0,S.cellRangeContains)(W,R);if(W.end>=_.length&&C==="below"||W.start===0&&C==="above"){z&&(P=I.cellAt(R.start)),x.push(...I.getCellsInRange(W));continue}const B=await u(I,W,C);if(!B)return;N.push(...B.edits),x.push(B.cell),z&&(P=B.cell)}if(!N.length||!P||!x.length)return;await w.apply(N,{quotableLabel:"Join Notebook Cells"}),x.forEach(V=>{V.updateEditState(f.CellEditState.Editing,"joinCellsWithSurrounds")}),A.updateSelectionsState({kind:m.SelectionStateType.Handle,primary:P.handle,selections:x.map(V=>V.handle)}),I.revealCellRangeInView(I.getFocus());const F=I.cellAt(I.getFocus().start);M===f.CellFocusMode.Editor&&F&&(F.focusMode=f.CellFocusMode.Editor)}}e.joinCellsWithSurrounds=d;function p(w,E){const C=[],I=E.getLineCount(),_=L=>E.getLineLength(L);w=w.sort((L,R)=>{const M=L.lineNumber-R.lineNumber,N=L.column-R.column;return M!==0?M:N});for(let L of w)_(L.lineNumber)+1===L.column&&L.column!==1&&L.lineNumber<I&&(L=new y.Position(L.lineNumber+1,1)),c(C,L);if(C.length===0)return null;const A=new y.Position(1,1),k=new y.Position(I,_(I)+1);return[A,...C,k]}function c(w,E){const C=w.length>0?w[w.length-1]:void 0;(!C||C.lineNumber!==E.lineNumber||C.column!==E.column)&&w.push(E)}function l(w,E){const C=p(E,w.textBuffer);if(!C)return null;const I=[];for(let _=1;_<C.length;_++){const A=C[_-1],k=C[_];I.push(w.textBuffer.getValueInRange(new b.Range(A.lineNumber,A.column,k.lineNumber,k.column),0))}return I}e.computeCellLinesContents=l;function n(w,E,C,I,_="above",A="",k=!1){const L=E.getViewModel(),R=E.activeKernel;if(L.options.isReadOnly)return null;const M=E.cellAt(C),N=k?L.getNextVisibleCellIndex(C):C+1;let P;if(I===m.CellKind.Code){const F=R?.supportedLanguages??w.getRegisteredLanguageIds(),V=F[0]||D.PLAINTEXT_LANGUAGE_ID;if(M?.cellKind===m.CellKind.Code)P=M.language;else if(M?.cellKind===m.CellKind.Markup){const W=L.nearestCodeCellIndex(C);W>-1?P=L.cellAt(W).language:P=V}else M===void 0&&_==="above"?P=L.viewCells.find(W=>W.cellKind===m.CellKind.Code)?.language||V:P=V;F.includes(P)||(P=V)}else P="markdown";return g(L,M?_==="above"?C:N:C,A,P,I,void 0,[],!0,!0)}e.insertCell=n;function g(w,E,C,I,_,A,k,L,R){const M={kind:m.SelectionStateType.Index,focus:{start:E,end:E+1},selections:[{start:E,end:E+1}]};return w.notebookDocument.applyEdits([{editType:1,index:E,count:0,cells:[{cellKind:_,language:I,mime:void 0,outputs:k,metadata:A,source:C}]}],L,{kind:m.SelectionStateType.Index,focus:w.getFocus(),selections:w.getSelections()},()=>M,void 0,R&&!w.options.isReadOnly),w.cellAt(E)}e.insertCellAtIndex=g}),define(Q[224],Y([1,0,10,2813,13,8,103,176,356,21,292,30,26]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cellExecutionArgs=e.parseMultiCellExecutionArgs=e.getEditorFromArgsOrActivePane=e.executeNotebookCondition=e.NotebookCellAction=e.NotebookMultiCellAction=e.NotebookAction=e.findTargetCellEditor=e.getContextFromUri=e.getContextFromActiveEditor=e.CellOverflowToolbarGroups=e.CellToolbarOrder=e.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT=e.CELL_TITLE_OUTPUT_GROUP_ID=e.CELL_TITLE_CELL_GROUP_ID=e.NOTEBOOK_ACTIONS_CATEGORY=e.SELECT_KERNEL_ID=void 0,e.SELECT_KERNEL_ID="_notebook.selectKernel",e.NOTEBOOK_ACTIONS_CATEGORY={value:(0,y.localize)(0,null),original:"Notebook"},e.CELL_TITLE_CELL_GROUP_ID="inline/cell",e.CELL_TITLE_OUTPUT_GROUP_ID="inline/output",e.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT=100;var r;(function(E){E[E.EditCell=0]="EditCell",E[E.ExecuteAboveCells=1]="ExecuteAboveCells",E[E.ExecuteCellAndBelow=2]="ExecuteCellAndBelow",E[E.SaveCell=3]="SaveCell",E[E.SplitCell=4]="SplitCell",E[E.ClearCellOutput=5]="ClearCellOutput"})(r||(e.CellToolbarOrder=r={}));var i;(function(E){E.Copy="1_copy",E.Insert="2_insert",E.Edit="3_edit",E.Share="4_share"})(i||(e.CellOverflowToolbarGroups=i={}));function s(E){const C=(0,T.getNotebookEditorFromEditorPane)(E.activeEditorPane);if(!C||!C.hasModel())return;const I=C.getActiveCell(),_=C.getSelectionViewModels();return{cell:I,selectedCells:_,notebookEditor:C}}e.getContextFromActiveEditor=s;function o(E,C){const _=E.get(S.INotebookEditorService).listNotebookEditors().find(A=>A.hasModel()&&A.textModel.uri.toString()===C.toString());if(_&&_.hasModel())return _}function u(E,C){const I=t.URI.revive(C);if(I){const _=o(E,I);if(_)return{notebookEditor:_}}}e.getContextFromUri=u;function d(E,C){let I;for(const[,_]of E.notebookEditor.codeEditors)if((0,a.isEqual)(_.getModel()?.uri,C.uri)){I=_;break}return I}e.findTargetCellEditor=d;class p extends b.Action2{constructor(C){if(C.f1!==!1){C.f1=!1;const I={id:b.MenuId.CommandPalette,when:D.ContextKeyExpr.or(f.NOTEBOOK_IS_ACTIVE_EDITOR,f.INTERACTIVE_WINDOW_IS_ACTIVE_EDITOR)};C.menu?Array.isArray(C.menu)||(C.menu=[C.menu]):C.menu=[],C.menu=[...C.menu,I]}C.category=e.NOTEBOOK_ACTIONS_CATEGORY,super(C)}async run(C,I,..._){const k=!!I?this.isNotebookActionContext(I)?"notebookToolbar":"editorToolbar":void 0;if(!(!this.isNotebookActionContext(I)&&(I=this.getEditorContextFromArgsOrActive(C,I,..._),!I)))return k!==void 0&&C.get(h.ITelemetryService).publicLog2("workbenchActionExecuted",{id:this.desc.id,from:k}),this.runWithContext(C,I)}isNotebookActionContext(C){return!!C&&!!C.notebookEditor}getEditorContextFromArgsOrActive(C,I,..._){return s(C.get(m.IEditorService))}}e.NotebookAction=p;class c extends b.Action2{constructor(C){if(C.f1!==!1){C.f1=!1;const I={id:b.MenuId.CommandPalette,when:f.NOTEBOOK_IS_ACTIVE_EDITOR};C.menu?Array.isArray(C.menu)||(C.menu=[C.menu]):C.menu=[],C.menu=[...C.menu,I]}C.category=e.NOTEBOOK_ACTIONS_CATEGORY,super(C)}parseArgs(C,...I){}isCellToolbarContext(C){return!!C&&!!C.notebookEditor&&C.$mid===13}isEditorContext(C){return!!C&&C.groupId!==void 0}async run(C,...I){const _=I[0],A=this.isCellToolbarContext(_),k=this.isEditorContext(_),L=A?"cellToolbar":k?"editorToolbar":"other",R=C.get(h.ITelemetryService);if(A)return R.publicLog2("workbenchActionExecuted",{id:this.desc.id,from:L}),this.runWithContext(C,_);const M=this.parseArgs(C,...I);if(M)return R.publicLog2("workbenchActionExecuted",{id:this.desc.id,from:L}),this.runWithContext(C,M);const N=g(C);if(N)return R.publicLog2("workbenchActionExecuted",{id:this.desc.id,from:L}),this.runWithContext(C,{ui:!1,notebookEditor:N,selectedCells:(0,T.cellRangeToViewCells)(N,N.getSelections())})}}e.NotebookMultiCellAction=c;class l extends p{isCellActionContext(C){return!!C&&!!C.notebookEditor&&!!C.cell}getCellContextFromArgs(C,I,..._){}async run(C,I,..._){if(this.isCellActionContext(I))return C.get(h.ITelemetryService).publicLog2("workbenchActionExecuted",{id:this.desc.id,from:"cellToolbar"}),this.runWithContext(C,I);const A=this.getCellContextFromArgs(C,I,..._);if(A)return this.runWithContext(C,A);const k=this.getEditorContextFromArgsOrActive(C);if(this.isCellActionContext(k))return this.runWithContext(C,k)}}e.NotebookCellAction=l,e.executeNotebookCondition=D.ContextKeyExpr.or(D.ContextKeyExpr.greater(f.NOTEBOOK_KERNEL_COUNT.key,0),D.ContextKeyExpr.greater(f.NOTEBOOK_KERNEL_SOURCE_COUNT.key,0));function n(E){if(E===void 0)return!1;const C=E.ranges;return!(!C||!Array.isArray(C)||C.some(I=>!(0,v.isICellRange)(I))||E.document&&!t.URI.revive(E.document))}function g(E,C){const I=u(E,C)?.notebookEditor;if(I)return I;const _=(0,T.getNotebookEditorFromEditorPane)(E.get(m.IEditorService).activeEditorPane);if(!(!_||!_.hasModel()))return _}e.getEditorFromArgsOrActivePane=g;function w(E,...C){const I=C[0];if(n(I)){const A=g(E,I.document);if(!A)return;const L=I.ranges.map(M=>A.getCellsInRange(M).slice(0)).flat(),R=I.autoReveal;return{ui:!1,notebookEditor:A,selectedCells:L,autoReveal:R}}if((0,v.isICellRange)(I)){const A=C[1],k=g(E,A);return k?{ui:!1,notebookEditor:k,selectedCells:k.getCellsInRange(I)}:void 0}const _=s(E.get(m.IEditorService));return _?{ui:!1,notebookEditor:_.notebookEditor,selectedCells:_.selectedCells??[]}:void 0}e.parseMultiCellExecutionArgs=w,e.cellExecutionArgs=[{isOptional:!0,name:"options",description:"The cell range options",schema:{type:"object",required:["ranges"],properties:{ranges:{type:"array",items:[{type:"object",required:["start","end"],properties:{start:{type:"number"},end:{type:"number"}}}]},document:{type:"object",description:"The document uri"},autoReveal:{type:"boolean",description:"Whether the cell should be revealed into view automatically"}}}}],b.MenuRegistry.appendMenuItem(b.MenuId.NotebookCellTitle,{submenu:b.MenuId.NotebookCellInsert,title:(0,y.localize)(1,null),group:"2_insert",when:f.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0)}),b.MenuRegistry.appendMenuItem(b.MenuId.EditorContext,{submenu:b.MenuId.NotebookCellTitle,title:(0,y.localize)(2,null),group:"2_insert",when:f.NOTEBOOK_EDITOR_FOCUSED}),b.MenuRegistry.appendMenuItem(b.MenuId.NotebookCellTitle,{title:(0,y.localize)(3,null),submenu:b.MenuId.EditorContextShare,group:"4_share"})}),define(Q[3860],Y([1,0,105,197,152,2795,13,8,171,473,627,224,103,176,267,71,23,73,9]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const p="notebook.cell.moveUp",c="notebook.cell.moveDown",l="notebook.cell.copyUp",n="notebook.cell.copyDown";(0,T.registerAction2)(class extends h.NotebookCellAction{constructor(){super({id:p,title:{value:(0,D.localize)(0,null),original:"Move Cell Up"},icon:i.moveUpIcon,keybinding:{primary:528,when:f.ContextKeyExpr.and(r.NOTEBOOK_EDITOR_FOCUSED,v.InputFocusedContext.toNegated()),weight:200},menu:{id:T.MenuId.NotebookCellTitle,when:f.ContextKeyExpr.equals("config.notebook.dragAndDropEnabled",!1),group:"3_edit",order:14}})}async runWithContext(V,W){return(0,S.moveCellRange)(W,"up")}}),(0,T.registerAction2)(class extends h.NotebookCellAction{constructor(){super({id:c,title:{value:(0,D.localize)(1,null),original:"Move Cell Down"},icon:i.moveDownIcon,keybinding:{primary:530,when:f.ContextKeyExpr.and(r.NOTEBOOK_EDITOR_FOCUSED,v.InputFocusedContext.toNegated()),weight:200},menu:{id:T.MenuId.NotebookCellTitle,when:f.ContextKeyExpr.equals("config.notebook.dragAndDropEnabled",!1),group:"3_edit",order:14}})}async runWithContext(V,W){return(0,S.moveCellRange)(W,"down")}}),(0,T.registerAction2)(class extends h.NotebookCellAction{constructor(){super({id:l,title:{value:(0,D.localize)(2,null),original:"Copy Cell Up"},keybinding:{primary:1552,when:f.ContextKeyExpr.and(r.NOTEBOOK_EDITOR_FOCUSED,v.InputFocusedContext.toNegated()),weight:200}})}async runWithContext(V,W){return(0,S.copyCellRange)(W,"up")}}),(0,T.registerAction2)(class extends h.NotebookCellAction{constructor(){super({id:n,title:{value:(0,D.localize)(3,null),original:"Copy Cell Down"},keybinding:{primary:1554,when:f.ContextKeyExpr.and(r.NOTEBOOK_EDITOR_FOCUSED,v.InputFocusedContext.toNegated()),weight:200},menu:{id:T.MenuId.NotebookCellTitle,when:f.ContextKeyExpr.and(r.NOTEBOOK_EDITOR_FOCUSED,r.NOTEBOOK_EDITOR_EDITABLE,r.NOTEBOOK_CELL_EDITABLE),group:"3_edit",order:13}})}async runWithContext(V,W){return(0,S.copyCellRange)(W,"down")}});const g="notebook.cell.split",w="notebook.cell.joinSelected",E="notebook.cell.joinAbove",C="notebook.cell.joinBelow";(0,T.registerAction2)(class extends h.NotebookCellAction{constructor(){super({id:g,title:{value:(0,D.localize)(4,null),original:"Split Cell"},menu:{id:T.MenuId.NotebookCellTitle,when:f.ContextKeyExpr.and(r.NOTEBOOK_EDITOR_EDITABLE,r.NOTEBOOK_CELL_EDITABLE,r.NOTEBOOK_CELL_INPUT_COLLAPSED.toNegated()),order:4,group:h.CELL_TITLE_CELL_GROUP_ID},icon:i.splitCellIcon,keybinding:{when:f.ContextKeyExpr.and(r.NOTEBOOK_EDITOR_FOCUSED,r.NOTEBOOK_EDITOR_EDITABLE,r.NOTEBOOK_CELL_EDITABLE,u.EditorContextKeys.editorTextFocus),primary:(0,t.KeyChord)(2089,3165),weight:200}})}async runWithContext(V,W){if(W.notebookEditor.isReadOnly)return;const z=V.get(b.IBulkEditService),B=W.cell,K=W.notebookEditor.getCellIndex(B),H=B.focusMode===a.CellFocusMode.Container?[{lineNumber:1,column:1}]:B.getSelectionsStartPosition();if(H&&H.length>0){if(await B.resolveTextModel(),!B.hasModel())return;const U=(0,S.computeCellLinesContents)(B,H);if(U){const G=B.language,$=B.cellKind,ie=B.mime,J=await B.resolveTextModel();await z.apply([new b.ResourceTextEdit(B.uri,{range:J.getFullModelRange(),text:U[0]}),new m.ResourceNotebookCellEdit(W.notebookEditor.textModel.uri,{editType:1,index:K+1,count:0,cells:U.slice(1).map(j=>({cellKind:$,language:G,mime:ie,source:j,outputs:[],metadata:{}}))})],{quotableLabel:"Split Notebook Cell"})}}}}),(0,T.registerAction2)(class extends h.NotebookCellAction{constructor(){super({id:E,title:{value:(0,D.localize)(5,null),original:"Join With Previous Cell"},keybinding:{when:r.NOTEBOOK_EDITOR_FOCUSED,primary:1832,weight:200},menu:{id:T.MenuId.NotebookCellTitle,when:f.ContextKeyExpr.and(r.NOTEBOOK_EDITOR_FOCUSED,r.NOTEBOOK_EDITOR_EDITABLE),group:"3_edit",order:10}})}async runWithContext(V,W){const z=V.get(b.IBulkEditService);return(0,S.joinCellsWithSurrounds)(z,W,"above")}}),(0,T.registerAction2)(class extends h.NotebookCellAction{constructor(){super({id:C,title:{value:(0,D.localize)(6,null),original:"Join With Next Cell"},keybinding:{when:r.NOTEBOOK_EDITOR_FOCUSED,primary:808,weight:200},menu:{id:T.MenuId.NotebookCellTitle,when:f.ContextKeyExpr.and(r.NOTEBOOK_EDITOR_FOCUSED,r.NOTEBOOK_EDITOR_EDITABLE),group:"3_edit",order:11}})}async runWithContext(V,W){const z=V.get(b.IBulkEditService);return(0,S.joinCellsWithSurrounds)(z,W,"below")}}),(0,T.registerAction2)(class extends h.NotebookCellAction{constructor(){super({id:w,title:{value:(0,D.localize)(7,null),original:"Join Selected Cells"},menu:{id:T.MenuId.NotebookCellTitle,when:f.ContextKeyExpr.and(r.NOTEBOOK_EDITOR_FOCUSED,r.NOTEBOOK_EDITOR_EDITABLE),group:"3_edit",order:12}})}async runWithContext(V,W){const z=V.get(b.IBulkEditService),B=V.get(o.INotificationService);return(0,S.joinSelectedCells)(z,B,W)}});const I="notebook.cell.changeToCode",_="notebook.cell.changeToMarkdown";(0,T.registerAction2)(class extends h.NotebookMultiCellAction{constructor(){super({id:I,title:{value:(0,D.localize)(8,null),original:"Change Cell to Code"},keybinding:{when:f.ContextKeyExpr.and(r.NOTEBOOK_EDITOR_FOCUSED,f.ContextKeyExpr.not(v.InputFocusedContextKey),r.NOTEBOOK_OUTPUT_FOCUSED.toNegated()),primary:55,weight:200},precondition:f.ContextKeyExpr.and(r.NOTEBOOK_IS_ACTIVE_EDITOR,r.NOTEBOOK_CELL_TYPE.isEqualTo("markup")),menu:{id:T.MenuId.NotebookCellTitle,when:f.ContextKeyExpr.and(r.NOTEBOOK_EDITOR_FOCUSED,r.NOTEBOOK_EDITOR_EDITABLE,r.NOTEBOOK_CELL_EDITABLE,r.NOTEBOOK_CELL_TYPE.isEqualTo("markup")),group:"3_edit"}})}async runWithContext(W,z){await(0,S.changeCellToKind)(s.CellKind.Code,z)}}),(0,T.registerAction2)(class extends h.NotebookMultiCellAction{constructor(){super({id:_,title:{value:(0,D.localize)(9,null),original:"Change Cell to Markdown"},keybinding:{when:f.ContextKeyExpr.and(r.NOTEBOOK_EDITOR_FOCUSED,f.ContextKeyExpr.not(v.InputFocusedContextKey),r.NOTEBOOK_OUTPUT_FOCUSED.toNegated()),primary:43,weight:200},precondition:f.ContextKeyExpr.and(r.NOTEBOOK_IS_ACTIVE_EDITOR,r.NOTEBOOK_CELL_TYPE.isEqualTo("code")),menu:{id:T.MenuId.NotebookCellTitle,when:f.ContextKeyExpr.and(r.NOTEBOOK_EDITOR_FOCUSED,r.NOTEBOOK_EDITOR_EDITABLE,r.NOTEBOOK_CELL_EDITABLE,r.NOTEBOOK_CELL_TYPE.isEqualTo("code")),group:"3_edit"}})}async runWithContext(W,z){await(0,S.changeCellToKind)(s.CellKind.Markup,z,"markdown",y.Mimes.markdown)}});const A="notebook.cell.collapseCellInput",k="notebook.cell.collapseCellOutput",L="notebook.cell.collapseAllCellInputs",R="notebook.cell.expandAllCellInputs",M="notebook.cell.collapseAllCellOutputs",N="notebook.cell.expandAllCellOutputs",P="notebook.cell.toggleOutputs",x="notebook.cell.toggleOutputScrolling";(0,T.registerAction2)(class extends h.NotebookMultiCellAction{constructor(){super({id:A,title:{value:(0,D.localize)(10,null),original:"Collapse Cell Input"},keybinding:{when:f.ContextKeyExpr.and(r.NOTEBOOK_CELL_LIST_FOCUSED,r.NOTEBOOK_CELL_INPUT_COLLAPSED.toNegated(),v.InputFocusedContext.toNegated()),primary:(0,t.KeyChord)(2089,2081),weight:200}})}parseArgs(W,...z){return(0,h.parseMultiCellExecutionArgs)(W,...z)}async runWithContext(W,z){z.ui?z.cell.isInputCollapsed=!0:z.selectedCells.forEach(B=>B.isInputCollapsed=!0)}}),(0,T.registerAction2)(class extends h.NotebookMultiCellAction{constructor(){super({id:a.EXPAND_CELL_INPUT_COMMAND_ID,title:{value:(0,D.localize)(11,null),original:"Expand Cell Input"},keybinding:{when:f.ContextKeyExpr.and(r.NOTEBOOK_CELL_LIST_FOCUSED,r.NOTEBOOK_CELL_INPUT_COLLAPSED),primary:(0,t.KeyChord)(2089,2081),weight:200}})}parseArgs(W,...z){return(0,h.parseMultiCellExecutionArgs)(W,...z)}async runWithContext(W,z){z.ui?z.cell.isInputCollapsed=!1:z.selectedCells.forEach(B=>B.isInputCollapsed=!1)}}),(0,T.registerAction2)(class extends h.NotebookMultiCellAction{constructor(){super({id:k,title:{value:(0,D.localize)(12,null),original:"Collapse Cell Output"},keybinding:{when:f.ContextKeyExpr.and(r.NOTEBOOK_CELL_LIST_FOCUSED,r.NOTEBOOK_CELL_OUTPUT_COLLAPSED.toNegated(),v.InputFocusedContext.toNegated(),r.NOTEBOOK_CELL_HAS_OUTPUTS),primary:(0,t.KeyChord)(2089,50),weight:200}})}async runWithContext(W,z){z.ui?z.cell.isOutputCollapsed=!0:z.selectedCells.forEach(B=>B.isOutputCollapsed=!0)}}),(0,T.registerAction2)(class extends h.NotebookMultiCellAction{constructor(){super({id:a.EXPAND_CELL_OUTPUT_COMMAND_ID,title:{value:(0,D.localize)(13,null),original:"Expand Cell Output"},keybinding:{when:f.ContextKeyExpr.and(r.NOTEBOOK_CELL_LIST_FOCUSED,r.NOTEBOOK_CELL_OUTPUT_COLLAPSED),primary:(0,t.KeyChord)(2089,50),weight:200}})}async runWithContext(W,z){z.ui?z.cell.isOutputCollapsed=!1:z.selectedCells.forEach(B=>B.isOutputCollapsed=!1)}}),(0,T.registerAction2)(class extends h.NotebookMultiCellAction{constructor(){super({id:P,precondition:r.NOTEBOOK_CELL_LIST_FOCUSED,title:{value:(0,D.localize)(14,null),original:"Toggle Outputs"},description:{description:(0,D.localize)(15,null),args:h.cellExecutionArgs}})}parseArgs(V,...W){return(0,h.parseMultiCellExecutionArgs)(V,...W)}async runWithContext(V,W){let z=[];W.ui?z=[W.cell]:W.selectedCells&&(z=W.selectedCells);for(const B of z)B.isOutputCollapsed=!B.isOutputCollapsed}}),(0,T.registerAction2)(class extends h.NotebookMultiCellAction{constructor(){super({id:L,title:{value:(0,D.localize)(16,null),original:"Collapse All Cell Inputs"},f1:!0})}async runWithContext(W,z){F(z.notebookEditor,B=>B.isInputCollapsed=!0)}}),(0,T.registerAction2)(class extends h.NotebookMultiCellAction{constructor(){super({id:R,title:{value:(0,D.localize)(17,null),original:"Expand All Cell Inputs"},f1:!0})}async runWithContext(W,z){F(z.notebookEditor,B=>B.isInputCollapsed=!1)}}),(0,T.registerAction2)(class extends h.NotebookMultiCellAction{constructor(){super({id:M,title:{value:(0,D.localize)(18,null),original:"Collapse All Cell Outputs"},f1:!0})}async runWithContext(W,z){F(z.notebookEditor,B=>B.isOutputCollapsed=!0)}}),(0,T.registerAction2)(class extends h.NotebookMultiCellAction{constructor(){super({id:N,title:{value:(0,D.localize)(19,null),original:"Expand All Cell Outputs"},f1:!0})}async runWithContext(W,z){F(z.notebookEditor,B=>B.isOutputCollapsed=!1)}}),(0,T.registerAction2)(class extends h.NotebookMultiCellAction{constructor(){super({id:x,title:{value:(0,D.localize)(20,null),original:"Toggle Scroll Cell Output"},keybinding:{when:f.ContextKeyExpr.and(r.NOTEBOOK_CELL_LIST_FOCUSED,v.InputFocusedContext.toNegated(),r.NOTEBOOK_CELL_HAS_OUTPUTS),primary:(0,t.KeyChord)(2089,55),weight:200}})}toggleOutputScrolling(W,z,B){const K=W.model.metadata;if(K){const H=K.scrollable!==void 0?K.scrollable:z,U=B||!H;K.scrollable=U,W.resetRenderer()}}async runWithContext(W,z){const B=W.get(d.IConfigurationService).getValue(s.NotebookSetting.outputScrolling);z.ui?(z.cell.outputsViewModels.forEach(K=>{this.toggleOutputScrolling(K,B,z.cell.isOutputCollapsed)}),z.cell.isOutputCollapsed=!1):z.selectedCells.forEach(K=>{K.outputsViewModels.forEach(H=>{this.toggleOutputScrolling(H,B,K.isOutputCollapsed)}),K.isOutputCollapsed=!1})}});function F(V,W){for(let z=0;z<V.getLength();z++){const B=V.cellAt(z);W(B,z)}}}),define(Q[3861],Y([1,0,2805,13,9,224,71]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleCellToolbarPositionAction=void 0;const f="notebook.toggleCellToolbarPosition";class v extends y.Action2{constructor(){super({id:f,title:{value:(0,t.localize)(0,null),original:"Toggle Cell Toolbar Position"},menu:[{id:y.MenuId.NotebookCellTitle,group:"View",order:1}],category:D.NOTEBOOK_ACTIONS_CATEGORY,f1:!1})}async run(S,h){const a=h&&h.ui?h.notebookEditor:void 0;if(a&&a.hasModel()){const r=a.textModel.viewType,i=S.get(b.IConfigurationService),s=i.getValue(T.NotebookSetting.cellToolbarLocation),o=this.togglePosition(r,s);await i.updateValue(T.NotebookSetting.cellToolbarLocation,o)}}togglePosition(S,h){if(typeof h=="string")if(["left","right","hidden"].indexOf(h)>=0){const a=h==="right"?"left":"right",r={default:h};return r[S]=a,r}else{const a={default:"right"};return a[S]="left",a}else{const r=(h[S]??h.default??"right")==="right"?"left":"right",i={...h};return i[S]=r,i}}}e.ToggleCellToolbarPositionAction=v,(0,y.registerAction2)(v)}),define(Q[1369],Y([1,0,2812,13,68,224,176,267,11,1291,21,103,71]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COPY_OUTPUT_COMMAND_ID=void 0,e.COPY_OUTPUT_COMMAND_ID="notebook.cellOutput.copy",(0,y.registerAction2)(class extends y.Action2{constructor(){super({id:e.COPY_OUTPUT_COMMAND_ID,title:(0,t.localize)(0,null),menu:{id:y.MenuId.NotebookOutputToolbar,when:T.NOTEBOOK_CELL_HAS_OUTPUTS},category:D.NOTEBOOK_ACTIONS_CATEGORY,icon:f.copyIcon})}async run(s,o){const u=s.get(S.IEditorService),d=(0,h.getNotebookEditorFromEditorPane)(u.activeEditorPane);if(!d)return;let p;if("outputId"in o&&typeof o.outputId=="string"?p=r(o.outputId,d):p=o.outputViewModel,!p)return;const c=p.pickedMimeType?.mimeType;if(c?.startsWith("image/")){const l={skipReveal:!0,outputId:p.model.outputId,altOutputId:p.model.alternativeOutputId};await d.focusNotebookCell(p.cellViewModel,"output",l),d.copyOutputImage(p)}else{const l=s.get(b.IClipboardService),n=s.get(v.ILogService);(0,m.copyCellOutput)(c,p,l,n)}}});function r(i,s){const o=s.getViewModel();if(o){const u=o.viewCells.filter(d=>d.cellKind===a.CellKind.Code);for(const d of u){const p=d.outputsViewModels.find(c=>c.model.outputId===i);if(p)return p}}}}),define(Q[1370],Y([1,0,4,176,103,1297,71,355,13,8,171,21,224,2816]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingController=void 0;class i extends t.Disposable{static{this.id="workbench.notebook.foldingController"}constructor(p){super(),this._notebookEditor=p,this._foldingModel=null,this._localStore=this._register(new t.DisposableStore),this._register(this._notebookEditor.onMouseUp(c=>{this.onMouseUp(c)})),this._register(this._notebookEditor.onDidChangeModel(()=>{this._localStore.clear(),this._notebookEditor.hasModel()&&(this._localStore.add(this._notebookEditor.onDidChangeCellState(c=>{c.source.editStateChanged&&c.cell.cellKind===T.CellKind.Markup&&this._foldingModel?.recompute()})),this._foldingModel=new D.FoldingModel,this._localStore.add(this._foldingModel),this._foldingModel.attachViewModel(this._notebookEditor.getViewModel()),this._localStore.add(this._foldingModel.onDidFoldingRegionChanged(()=>{this._updateEditorFoldingRanges()})))}))}saveViewState(){return this._foldingModel?.getMemento()||[]}restoreViewState(p){this._foldingModel?.applyMemento(p||[]),this._updateEditorFoldingRanges()}setFoldingStateDown(p,c,l){const n=c===2,g=this._foldingModel.getRegionAtLine(p+1),w=[];if(g&&(g.isCollapsed!==n&&w.push(g),l>1)){const E=this._foldingModel.getRegionsInside(g,(C,I)=>C.isCollapsed!==n&&I<l);w.push(...E)}w.forEach(E=>this._foldingModel.setCollapsed(E.regionIndex,c===2)),this._updateEditorFoldingRanges()}setFoldingStateUp(p,c,l){if(!this._foldingModel)return;this._foldingModel.getAllRegionsAtLine(p+1,(g,w)=>g.isCollapsed!==(c===2)&&w<=l).forEach(g=>this._foldingModel.setCollapsed(g.regionIndex,c===2)),this._updateEditorFoldingRanges()}_updateEditorFoldingRanges(){if(!this._foldingModel||!this._notebookEditor.hasModel())return;const p=this._notebookEditor.getViewModel();p.updateFoldingRanges(this._foldingModel.regions);const c=p.getHiddenRanges();this._notebookEditor.setHiddenAreas(c)}onMouseUp(p){if(!p.event.target||!this._notebookEditor.hasModel())return;const c=this._notebookEditor.getViewModel(),l=p.event.target;if(l.classList.contains("codicon-notebook-collapsed")||l.classList.contains("codicon-notebook-expanded")){if(!l.parentElement.classList.contains("notebook-folding-indicator"))return;const g=p.target,w=c.getCellIndex(g),E=c.getFoldingState(w);if(E===0)return;this.setFoldingStateUp(w,E===2?1:2,1),this._notebookEditor.focusElement(g)}}}e.FoldingController=i,(0,f.registerNotebookContribution)(i.id,i);const s=(0,r.localize)(0,null),o=(0,r.localize)(1,null),u={args:[{isOptional:!0,name:"index",description:"The cell index",schema:{type:"object",required:["index","direction"],properties:{index:{type:"number"},direction:{type:"string",enum:["up","down"],default:"down"},levels:{type:"number",default:1}}}}]};(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:"notebook.fold",title:{value:(0,r.localize)(2,null),original:"Fold Cell"},category:a.NOTEBOOK_ACTIONS_CATEGORY,keybinding:{when:m.ContextKeyExpr.and(y.NOTEBOOK_EDITOR_FOCUSED,m.ContextKeyExpr.not(S.InputFocusedContextKey)),primary:3164,mac:{primary:2652,secondary:[15]},secondary:[15],weight:200},description:{description:s,args:u.args},precondition:y.NOTEBOOK_IS_ACTIVE_EDITOR,f1:!0})}async run(d,p){const c=d.get(h.IEditorService),l=(0,b.getNotebookEditorFromEditorPane)(c.activeEditorPane);if(!l||!l.hasModel())return;const n=p&&p.levels||1,g=p&&p.direction==="up"?"up":"down";let w;if(p)w=p.index;else{const C=l.getActiveCell();if(!C)return;w=l.getCellIndex(C)}const E=l.getContribution(i.id);if(w!==void 0){if((w<0||w>=l.getLength()?void 0:l.cellAt(w))?.cellKind===T.CellKind.Code&&g==="down")return;g==="up"?E.setFoldingStateUp(w,2,n):E.setFoldingStateDown(w,2,n);const I=l.getViewModel().getNearestVisibleCellIndexUpwards(w);l.focusElement(l.cellAt(I))}}}),(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:"notebook.unfold",title:{value:o,original:"Unfold Cell"},category:a.NOTEBOOK_ACTIONS_CATEGORY,keybinding:{when:m.ContextKeyExpr.and(y.NOTEBOOK_EDITOR_FOCUSED,m.ContextKeyExpr.not(S.InputFocusedContextKey)),primary:3166,mac:{primary:2654,secondary:[17]},secondary:[17],weight:200},description:{description:o,args:u.args},precondition:y.NOTEBOOK_IS_ACTIVE_EDITOR,f1:!0})}async run(d,p){const c=d.get(h.IEditorService),l=(0,b.getNotebookEditorFromEditorPane)(c.activeEditorPane);if(!l)return;const n=p&&p.levels||1,g=p&&p.direction==="up"?"up":"down";let w;if(p)w=p.index;else{const C=l.getActiveCell();if(!C)return;w=l.getCellIndex(C)}const E=l.getContribution(i.id);w!==void 0&&(g==="up"?E.setFoldingStateUp(w,1,n):E.setFoldingStateDown(w,1,n))}})}),define(Q[3862],Y([1,0,32,50,2817,13,8,171,627,224,176,71]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const a="notebook.cell.insertCodeCellAbove",r="notebook.cell.insertCodeCellBelow",i="notebook.cell.insertCodeCellAboveAndFocusContainer",s="notebook.cell.insertCodeCellBelowAndFocusContainer",o="notebook.cell.insertCodeCellAtTop",u="notebook.cell.insertMarkdownCellAbove",d="notebook.cell.insertMarkdownCellBelow",p="notebook.cell.insertMarkdownCellAtTop";class c extends m.NotebookAction{constructor(n,g,w,E){super(n),this.kind=g,this.direction=w,this.focusEditor=E}async runWithContext(n,g){let w=null;g.ui&&g.notebookEditor.focus();const E=n.get(y.ILanguageService);if(g.cell){const C=g.notebookEditor.getCellIndex(g.cell);w=(0,v.insertCell)(E,g.notebookEditor,C,this.kind,this.direction,void 0,!0)}else{const C=g.notebookEditor.getFocus(),I=Math.max(C.end-1,0);w=(0,v.insertCell)(E,g.notebookEditor,I,this.kind,this.direction,void 0,!0)}w&&await g.notebookEditor.focusNotebookCell(w,this.focusEditor?"editor":"container")}}(0,D.registerAction2)(class extends c{constructor(){super({id:a,title:(0,b.localize)(0,null),keybinding:{primary:3075,when:T.ContextKeyExpr.and(S.NOTEBOOK_CELL_LIST_FOCUSED,f.InputFocusedContext.toNegated()),weight:200},menu:{id:D.MenuId.NotebookCellInsert,order:0}},h.CellKind.Code,"above",!0)}}),(0,D.registerAction2)(class extends c{constructor(){super({id:i,title:(0,b.localize)(1,null)},h.CellKind.Code,"above",!1)}}),(0,D.registerAction2)(class extends c{constructor(){super({id:r,title:(0,b.localize)(2,null),keybinding:{primary:2051,when:T.ContextKeyExpr.and(S.NOTEBOOK_CELL_LIST_FOCUSED,f.InputFocusedContext.toNegated()),weight:200},menu:{id:D.MenuId.NotebookCellInsert,order:1}},h.CellKind.Code,"below",!0)}}),(0,D.registerAction2)(class extends c{constructor(){super({id:s,title:(0,b.localize)(3,null)},h.CellKind.Code,"below",!1)}}),(0,D.registerAction2)(class extends c{constructor(){super({id:u,title:(0,b.localize)(4,null),menu:{id:D.MenuId.NotebookCellInsert,order:2}},h.CellKind.Markup,"above",!0)}}),(0,D.registerAction2)(class extends c{constructor(){super({id:d,title:(0,b.localize)(5,null),menu:{id:D.MenuId.NotebookCellInsert,order:3}},h.CellKind.Markup,"below",!0)}}),(0,D.registerAction2)(class extends m.NotebookAction{constructor(){super({id:o,title:(0,b.localize)(6,null),f1:!1})}async run(n,g){g=g??this.getEditorContextFromArgsOrActive(n),g&&this.runWithContext(n,g)}async runWithContext(n,g){const w=n.get(y.ILanguageService),E=(0,v.insertCell)(w,g.notebookEditor,0,h.CellKind.Code,"above",void 0,!0);E&&await g.notebookEditor.focusNotebookCell(E,"editor")}}),(0,D.registerAction2)(class extends m.NotebookAction{constructor(){super({id:p,title:(0,b.localize)(7,null),f1:!1})}async run(n,g){g=g??this.getEditorContextFromArgsOrActive(n),g&&this.runWithContext(n,g)}async runWithContext(n,g){const w=n.get(y.ILanguageService),E=(0,v.insertCell)(w,g.notebookEditor,0,h.CellKind.Markup,"above",void 0,!0);E&&await g.notebookEditor.focusNotebookCell(E,"editor")}}),D.MenuRegistry.appendMenuItem(D.MenuId.NotebookCellBetween,{command:{id:r,title:"$(add) "+(0,b.localize)(8,null),tooltip:(0,b.localize)(9,null)},order:0,group:"inline",when:T.ContextKeyExpr.and(S.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),T.ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment","left"))}),D.MenuRegistry.appendMenuItem(D.MenuId.NotebookCellBetween,{command:{id:r,title:(0,b.localize)(10,null),icon:t.Codicon.add,tooltip:(0,b.localize)(11,null)},order:0,group:"inline",when:T.ContextKeyExpr.and(S.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),T.ContextKeyExpr.equals("config.notebook.experimental.insertToolbarAlignment","left"))}),D.MenuRegistry.appendMenuItem(D.MenuId.NotebookToolbar,{command:{id:r,icon:t.Codicon.add,title:(0,b.localize)(12,null),tooltip:(0,b.localize)(13,null)},order:-5,group:"navigation/add",when:T.ContextKeyExpr.and(S.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),T.ContextKeyExpr.notEquals("config.notebook.insertToolbarLocation","betweenCells"),T.ContextKeyExpr.notEquals("config.notebook.insertToolbarLocation","hidden"))}),D.MenuRegistry.appendMenuItem(D.MenuId.NotebookCellListTop,{command:{id:o,title:"$(add) "+(0,b.localize)(14,null),tooltip:(0,b.localize)(15,null)},order:0,group:"inline",when:T.ContextKeyExpr.and(S.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),T.ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment","left"))}),D.MenuRegistry.appendMenuItem(D.MenuId.NotebookCellListTop,{command:{id:o,title:(0,b.localize)(16,null),icon:t.Codicon.add,tooltip:(0,b.localize)(17,null)},order:0,group:"inline",when:T.ContextKeyExpr.and(S.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),T.ContextKeyExpr.equals("config.notebook.experimental.insertToolbarAlignment","left"))}),D.MenuRegistry.appendMenuItem(D.MenuId.NotebookCellBetween,{command:{id:d,title:"$(add) "+(0,b.localize)(18,null),tooltip:(0,b.localize)(19,null)},order:1,group:"inline",when:T.ContextKeyExpr.and(S.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),T.ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment","left"))}),D.MenuRegistry.appendMenuItem(D.MenuId.NotebookToolbar,{command:{id:d,icon:t.Codicon.add,title:(0,b.localize)(20,null),tooltip:(0,b.localize)(21,null)},order:-5,group:"navigation/add",when:T.ContextKeyExpr.and(S.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),T.ContextKeyExpr.notEquals("config.notebook.insertToolbarLocation","betweenCells"),T.ContextKeyExpr.notEquals("config.notebook.insertToolbarLocation","hidden"),T.ContextKeyExpr.notEquals(`config.${h.NotebookSetting.globalToolbarShowLabel}`,!1),T.ContextKeyExpr.notEquals(`config.${h.NotebookSetting.globalToolbarShowLabel}`,"never"))}),D.MenuRegistry.appendMenuItem(D.MenuId.NotebookCellListTop,{command:{id:p,title:"$(add) "+(0,b.localize)(22,null),tooltip:(0,b.localize)(23,null)},order:1,group:"inline",when:T.ContextKeyExpr.and(S.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),T.ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment","left"))})}),define(Q[628],Y([1,0,6,122,433,4,458,924,1282,529,103]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFormattedOutputJSON=e.getStreamOutputData=e.getFormattedMetadataJSON=e.outputEqual=e.OutputComparison=e.SingleSideDiffElementViewModel=e.SideBySideDiffElementViewModel=e.DiffElementViewModelBase=e.OUTPUT_EDITOR_HEIGHT_MAGIC=e.PropertyFoldingState=void 0;var h;(function(l){l[l.Expanded=0]="Expanded",l[l.Collapsed=1]="Collapsed"})(h||(e.PropertyFoldingState=h={})),e.OUTPUT_EDITOR_HEIGHT_MAGIC=1440;class a extends D.Disposable{set rawOutputHeight(n){this._layout({rawOutputHeight:Math.min(e.OUTPUT_EDITOR_HEIGHT_MAGIC,n)})}get rawOutputHeight(){throw new Error("Use Cell.layoutInfo.rawOutputHeight")}set outputStatusHeight(n){this._layout({outputStatusHeight:n})}get outputStatusHeight(){throw new Error("Use Cell.layoutInfo.outputStatusHeight")}set outputMetadataHeight(n){this._layout({outputMetadataHeight:n})}get outputMetadataHeight(){throw new Error("Use Cell.layoutInfo.outputStatusHeight")}set editorHeight(n){this._layout({editorHeight:n})}get editorHeight(){throw new Error("Use Cell.layoutInfo.editorHeight")}set editorMargin(n){this._layout({editorMargin:n})}get editorMargin(){throw new Error("Use Cell.layoutInfo.editorMargin")}set metadataStatusHeight(n){this._layout({metadataStatusHeight:n})}get metadataStatusHeight(){throw new Error("Use Cell.layoutInfo.outputStatusHeight")}set metadataHeight(n){this._layout({metadataHeight:n})}get metadataHeight(){throw new Error("Use Cell.layoutInfo.metadataHeight")}set renderOutput(n){this._renderOutput=n,this._layout({recomputeOutput:!0}),this._stateChangeEmitter.fire({renderOutput:this._renderOutput})}get renderOutput(){return this._renderOutput}get layoutInfo(){return this._layoutInfo}constructor(n,g,w,E,C,I){super(),this.mainDocumentTextModel=n,this.original=g,this.modified=w,this.type=E,this.editorEventDispatcher=C,this.initData=I,this._layoutInfoEmitter=this._register(new t.Emitter),this.onDidLayoutChange=this._layoutInfoEmitter.event,this._stateChangeEmitter=this._register(new t.Emitter),this.onDidStateChange=this._stateChangeEmitter.event,this._renderOutput=!0,this._sourceEditorViewState=null,this._outputEditorViewState=null,this._metadataEditorViewState=null;const _=this._estimateEditorHeight(I.fontInfo);this._layoutInfo={width:0,editorHeight:_,editorMargin:0,metadataHeight:0,metadataStatusHeight:25,rawOutputHeight:0,outputTotalHeight:0,outputStatusHeight:25,outputMetadataHeight:0,bodyMargin:32,totalHeight:82+_,layoutState:S.CellLayoutState.Uninitialized},this.metadataFoldingState=h.Collapsed,this.outputFoldingState=h.Collapsed,this._register(this.editorEventDispatcher.onDidChangeLayout(A=>{this._layoutInfoEmitter.fire({outerWidth:!0})}))}layoutChange(){this._layout({recomputeOutput:!0})}_estimateEditorHeight(n){const g=n?.lineHeight??17;switch(this.type){case"unchanged":case"insert":return this.modified.textModel.textBuffer.getLineCount()*g+f.fixedEditorPadding.top+f.fixedEditorPadding.bottom;case"delete":case"modified":return this.original.textModel.textBuffer.getLineCount()*g+f.fixedEditorPadding.top+f.fixedEditorPadding.bottom}}_layout(n){const g=n.width!==void 0?n.width:this._layoutInfo.width,w=n.editorHeight!==void 0?n.editorHeight:this._layoutInfo.editorHeight,E=n.editorMargin!==void 0?n.editorMargin:this._layoutInfo.editorMargin,C=n.metadataHeight!==void 0?n.metadataHeight:this._layoutInfo.metadataHeight,I=n.metadataStatusHeight!==void 0?n.metadataStatusHeight:this._layoutInfo.metadataStatusHeight,_=n.rawOutputHeight!==void 0?n.rawOutputHeight:this._layoutInfo.rawOutputHeight,A=n.outputStatusHeight!==void 0?n.outputStatusHeight:this._layoutInfo.outputStatusHeight,k=n.bodyMargin!==void 0?n.bodyMargin:this._layoutInfo.bodyMargin,L=n.outputMetadataHeight!==void 0?n.outputMetadataHeight:this._layoutInfo.outputMetadataHeight,R=n.recomputeOutput||n.rawOutputHeight!==void 0||n.outputMetadataHeight!==void 0?this._getOutputTotalHeight(_,L):this._layoutInfo.outputTotalHeight,M=w+E+C+I+R+A+k,N={width:g,editorHeight:w,editorMargin:E,metadataHeight:C,metadataStatusHeight:I,outputTotalHeight:R,outputStatusHeight:A,bodyMargin:k,rawOutputHeight:_,outputMetadataHeight:L,totalHeight:M,layoutState:S.CellLayoutState.Measured};let P=!1;const x={};N.width!==this._layoutInfo.width&&(x.width=!0,P=!0),N.editorHeight!==this._layoutInfo.editorHeight&&(x.editorHeight=!0,P=!0),N.editorMargin!==this._layoutInfo.editorMargin&&(x.editorMargin=!0,P=!0),N.metadataHeight!==this._layoutInfo.metadataHeight&&(x.metadataHeight=!0,P=!0),N.metadataStatusHeight!==this._layoutInfo.metadataStatusHeight&&(x.metadataStatusHeight=!0,P=!0),N.outputTotalHeight!==this._layoutInfo.outputTotalHeight&&(x.outputTotalHeight=!0,P=!0),N.outputStatusHeight!==this._layoutInfo.outputStatusHeight&&(x.outputStatusHeight=!0,P=!0),N.bodyMargin!==this._layoutInfo.bodyMargin&&(x.bodyMargin=!0,P=!0),N.outputMetadataHeight!==this._layoutInfo.outputMetadataHeight&&(x.outputMetadataHeight=!0,P=!0),N.totalHeight!==this._layoutInfo.totalHeight&&(x.totalHeight=!0,P=!0),P&&(this._layoutInfo=N,this._fireLayoutChangeEvent(x))}getHeight(n){if(this._layoutInfo.layoutState===S.CellLayoutState.Uninitialized){const g=this.estimateEditorHeight(n);return this._computeTotalHeight(g)}else return this._layoutInfo.totalHeight}_computeTotalHeight(n){return n+this._layoutInfo.editorMargin+this._layoutInfo.metadataHeight+this._layoutInfo.metadataStatusHeight+this._layoutInfo.outputTotalHeight+this._layoutInfo.outputStatusHeight+this._layoutInfo.outputMetadataHeight+this._layoutInfo.bodyMargin}estimateEditorHeight(n=20){return Math.max(this.original?.textModel.textBuffer.getLineCount()??1,this.modified?.textModel.textBuffer.getLineCount()??1)*n+24+12+0}_getOutputTotalHeight(n,g){return this.outputFoldingState===h.Collapsed?0:this.renderOutput?this.isOutputEmpty()?24:this.getRichOutputTotalHeight()+g:n}_fireLayoutChangeEvent(n){this._layoutInfoEmitter.fire(n),this.editorEventDispatcher.emit([{type:v.NotebookDiffViewEventType.CellLayoutChanged,source:this._layoutInfo}])}getComputedCellContainerWidth(n,g,w){return w?n.width-2*m.DIFF_CELL_MARGIN+(g?T.DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH:0)-2:(n.width-2*m.DIFF_CELL_MARGIN+(g?T.DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH:0))/2-18-2}getOutputEditorViewState(){return this._outputEditorViewState}saveOutputEditorViewState(n){this._outputEditorViewState=n}getMetadataEditorViewState(){return this._metadataEditorViewState}saveMetadataEditorViewState(n){this._metadataEditorViewState=n}getSourceEditorViewState(){return this._sourceEditorViewState}saveSpirceEditorViewState(n){this._sourceEditorViewState=n}}e.DiffElementViewModelBase=a;class r extends a{get originalDocument(){return this.otherDocumentTextModel}get modifiedDocument(){return this.mainDocumentTextModel}constructor(n,g,w,E,C,I,_){super(n,w,E,C,I,_),this.otherDocumentTextModel=g,this.original=w,this.modified=E,this.type=C,this.metadataFoldingState=h.Collapsed,this.outputFoldingState=h.Collapsed,this.checkMetadataIfModified()&&(this.metadataFoldingState=h.Expanded),this.checkIfOutputsModified()&&(this.outputFoldingState=h.Expanded),this._register(this.original.onDidChangeOutputLayout(()=>{this._layout({recomputeOutput:!0})})),this._register(this.modified.onDidChangeOutputLayout(()=>{this._layout({recomputeOutput:!0})})),this._register(this.modified.textModel.onDidChangeContent(()=>{if(n.transientOptions.cellContentMetadata){const A=[...Object.keys(n.transientOptions.cellContentMetadata)],k=Object.assign({},this.modified.metadata),L=this.original.metadata;for(const R of A)k[R]=L[R];this.modified.textModel.metadata=k}}))}checkIfOutputsModified(){if(this.mainDocumentTextModel.transientOptions.transientOutputs)return!1;const n=u(this.original?.outputs??[],this.modified?.outputs??[]);return n===0?!1:{reason:n===1?"Output metadata is changed":void 0,kind:n}}checkMetadataIfModified(){return(0,y.hash)(d(this.mainDocumentTextModel,this.original?.metadata||{},this.original?.language))!==(0,y.hash)(d(this.mainDocumentTextModel,this.modified?.metadata??{},this.modified?.language))?{reason:void 0}:!1}updateOutputHeight(n,g,w){n===m.DiffSide.Original?this.original.updateOutputHeight(g,w):this.modified.updateOutputHeight(g,w)}getOutputOffsetInContainer(n,g){return n===m.DiffSide.Original?this.original.getOutputOffset(g):this.modified.getOutputOffset(g)}getOutputOffsetInCell(n,g){const w=this.getOutputOffsetInContainer(n,g);return this._layoutInfo.editorHeight+this._layoutInfo.editorMargin+this._layoutInfo.metadataHeight+this._layoutInfo.metadataStatusHeight+this._layoutInfo.outputStatusHeight+this._layoutInfo.bodyMargin/2+w}isOutputEmpty(){return this.mainDocumentTextModel.transientOptions.transientOutputs?!0:this.checkIfOutputsModified()?!1:(this.original?.outputs||[]).length===0}getRichOutputTotalHeight(){return Math.max(this.original.getOutputTotalHeight(),this.modified.getOutputTotalHeight())}getNestedCellViewModel(n){return n===m.DiffSide.Original?this.original:this.modified}getCellByUri(n){return n.toString()===this.original.uri.toString()?this.original:this.modified}}e.SideBySideDiffElementViewModel=r;class i extends a{get cellViewModel(){return this.type==="insert"?this.modified:this.original}get originalDocument(){return this.type==="insert"?this.otherDocumentTextModel:this.mainDocumentTextModel}get modifiedDocument(){return this.type==="insert"?this.mainDocumentTextModel:this.otherDocumentTextModel}constructor(n,g,w,E,C,I,_){super(n,w,E,C,I,_),this.otherDocumentTextModel=g,this.type=C,this._register(this.cellViewModel.onDidChangeOutputLayout(()=>{this._layout({recomputeOutput:!0})}))}getNestedCellViewModel(n){return this.type==="insert"?this.modified:this.original}checkIfOutputsModified(){return!1}checkMetadataIfModified(){return!1}updateOutputHeight(n,g,w){this.cellViewModel?.updateOutputHeight(g,w)}getOutputOffsetInContainer(n,g){return this.cellViewModel.getOutputOffset(g)}getOutputOffsetInCell(n,g){const w=this.cellViewModel.getOutputOffset(g);return this._layoutInfo.editorHeight+this._layoutInfo.editorMargin+this._layoutInfo.metadataHeight+this._layoutInfo.metadataStatusHeight+this._layoutInfo.outputStatusHeight+this._layoutInfo.bodyMargin/2+w}isOutputEmpty(){return this.mainDocumentTextModel.transientOptions.transientOutputs?!0:(this.original?.outputs||this.modified?.outputs||[]).length===0}getRichOutputTotalHeight(){return this.cellViewModel?.getOutputTotalHeight()??0}getCellByUri(n){return this.cellViewModel}}e.SingleSideDiffElementViewModel=i;var s;(function(l){l[l.Unchanged=0]="Unchanged",l[l.Metadata=1]="Metadata",l[l.Other=2]="Other"})(s||(e.OutputComparison=s={}));function o(l,n){if((0,y.hash)(l.metadata)===(0,y.hash)(n.metadata))return 2;for(let g=0;g<l.outputs.length;g++){const w=l.outputs[g],E=n.outputs[g];if(w.mime!==E.mime||w.data.buffer.length!==E.data.buffer.length)return 2;for(let C=0;C<w.data.buffer.length;C++)if(w.data.buffer[C]!==E.data.buffer[C])return 2}return 1}e.outputEqual=o;function u(l,n){if(l.length!==n.length)return 2;const g=l.length;for(let w=0;w<g;w++){const E=l[w],C=n[w];if((0,y.hash)(E.metadata)!==(0,y.hash)(C.metadata))return 1;if(E.outputs.length!==C.outputs.length)return 2;for(let I=0;I<E.outputs.length;I++){const _=E.outputs[I],A=C.outputs[I];if(_.mime!==A.mime||_.data.buffer.length!==A.data.buffer.length)return 2;for(let k=0;k<_.data.buffer.length;k++)if(_.data.buffer[k]!==A.data.buffer[k])return 2}}return 0}function d(l,n,g){let w={};if(l){const I=l.transientOptions.transientCellMetadata,_=new Set([...Object.keys(n)]);for(const A of _)I[A]||(w[A]=n[A])}else w=n;const E={language:g,...w};return(0,b.toFormattedString)(E,{})}e.getFormattedMetadataJSON=d;function p(l){if(!l.length)return null;const g=l[0].mime;return l.find(E=>E.mime!==g)?null:l.map(E=>E.data.toString()).join("")}e.getStreamOutputData=p;function c(l){if(l.length===1){const n=p(l[0].outputs);if(n)return n}return JSON.stringify(l.map(n=>({metadata:n.metadata,outputItems:n.outputs.map(g=>({mimeType:g.mime,data:g.data.toString()}))})),void 0," ")}e.getFormattedOutputJSON=c}),define(Q[3863],Y([1,0,7,2819,4,628,529,148,37,267,67,43]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputContainer=e.OutputElement=void 0;class a extends b.Disposable{constructor(s,o,u,d,p,c,l,n,g){super(),this._notebookEditor=s,this._notebookTextModel=o,this._notebookService=u,this._quickInputService=d,this._diffElementViewModel=p,this._diffSide=c,this._nestedCell=l,this._outputContainer=n,this.output=g,this.resizeListener=this._register(new b.DisposableStore)}render(s,o){const u=document.createElement("div");let d;const[p,c]=this.output.resolveMimeTypes(this._notebookTextModel,void 0),l=p[c];if(p.length>1){u.style.position="relative";const g=t.$(".multi-mimetype-output");g.classList.add(...v.ThemeIcon.asClassNameArray(m.mimetypeIcon)),g.tabIndex=0,g.title=y.localize(0,null,p.map(w=>w.mimeType).join(", ")),u.appendChild(g),this.resizeListener.add(t.addStandardDisposableListener(g,"mousedown",async w=>{w.leftButton&&(w.preventDefault(),w.stopPropagation(),await this.pickActiveMimeTypeRenderer(this._notebookTextModel,this.output))})),this.resizeListener.add(t.addDisposableListener(g,t.EventType.KEY_DOWN,async w=>{const E=new S.StandardKeyboardEvent(w);(E.equals(3)||E.equals(10))&&(w.preventDefault(),w.stopPropagation(),await this.pickActiveMimeTypeRenderer(this._notebookTextModel,this.output))}))}const n=t.$(".output-inner-container");if(t.append(u,n),p.length!==0){const g=this._notebookService.getRendererInfo(l.rendererId);d=g?{type:1,renderer:g,source:this.output,mimeType:l.mimeType}:this._renderMissingRenderer(this.output,l.mimeType),this.output.pickedMimeType=l}this.domNode=u,this.renderResult=d,d&&(o?this._outputContainer.insertBefore(u,o):this._outputContainer.appendChild(u),this._notebookEditor.createOutput(this._diffElementViewModel,this._nestedCell,d,()=>this.getOutputOffsetInCell(s),this._diffElementViewModel instanceof D.SideBySideDiffElementViewModel?this._diffSide:this._diffElementViewModel.type==="insert"?T.DiffSide.Modified:T.DiffSide.Original))}_renderMissingRenderer(s,o){if(!s.model.outputs.length)return this._renderMessage(s,y.localize(1,null));if(!o){const d=s.model.outputs.map(p=>p.mime).join(", ");return this._renderMessage(s,y.localize(2,null,d))}return this._renderSearchForMimetype(s,o)}_renderSearchForMimetype(s,o){const u=`@tag:notebookRenderer ${o}`,d=t.$("p",void 0,`No renderer could be found for mimetype "${o}", but one might be available on the Marketplace.`),p=t.$("a",{href:`command:workbench.extensions.search?%22${u}%22`,class:"monaco-button monaco-text-button",tabindex:0,role:"button",style:"padding: 8px; text-decoration: none; color: rgb(255, 255, 255); background-color: rgb(14, 99, 156); max-width: 200px;"},"Search Marketplace");return{type:0,source:s,htmlContent:d.outerHTML+p.outerHTML}}_renderMessage(s,o){const u=t.$("p",void 0,o);return{type:0,source:s,htmlContent:u.outerHTML}}async pickActiveMimeTypeRenderer(s,o){const[u,d]=o.resolveMimeTypes(s,void 0),p=u.filter(n=>n.isTrusted).map((n,g)=>({label:n.mimeType,id:n.mimeType,index:g,picked:g===d,detail:this.generateRendererInfo(n.rendererId),description:g===d?y.localize(3,null):void 0})),c=this._quickInputService.createQuickPick();c.items=p,c.activeItems=p.filter(n=>!!n.picked),c.placeholder=p.length!==u.length?y.localize(4,null):y.localize(5,null);const l=await new Promise(n=>{c.onDidAccept(()=>{n(c.selectedItems.length===1?c.selectedItems[0].index:void 0),c.dispose()}),c.show()});if(l!==void 0&&l!==d){const n=this._nestedCell.outputsViewModels.indexOf(o),g=this.domNode.nextElementSibling;this.resizeListener.clear();const w=this.domNode;w&&(w.parentElement?.removeChild(w),this._notebookEditor.removeInset(this._diffElementViewModel,this._nestedCell,o,this._diffSide)),o.pickedMimeType=u[l],this.render(n,g)}}generateRendererInfo(s){const o=this._notebookService.getRendererInfo(s);return o?`${o.displayName!==""?o.displayName:o.id} (${o.extensionId.value})`:y.localize(6,null)}getCellOutputCurrentIndex(){return this._diffElementViewModel.getNestedCellViewModel(this._diffSide).outputs.indexOf(this.output.model)}updateHeight(s,o){this._diffElementViewModel.updateOutputHeight(this._diffSide,s,o)}getOutputOffsetInContainer(s){return this._diffElementViewModel.getOutputOffsetInContainer(this._diffSide,s)}getOutputOffsetInCell(s){return this._diffElementViewModel.getOutputOffsetInCell(this._diffSide,s)}}e.OutputElement=a;let r=class extends b.Disposable{constructor(s,o,u,d,p,c,l,n){super(),this._editor=s,this._notebookTextModel=o,this._diffElementViewModel=u,this._nestedCellViewModel=d,this._diffSide=p,this._outputContainer=c,this._notebookService=l,this._quickInputService=n,this._outputEntries=new Map,this._register(this._diffElementViewModel.onDidLayoutChange(()=>{this._outputEntries.forEach((g,w)=>{const E=d.outputs.indexOf(w.model);if(E>=0){const C=this._diffElementViewModel.getOutputOffsetInContainer(this._diffSide,E);g.domNode.style.top=`${C}px`}})})),this._register(this._nestedCellViewModel.textModel.onDidChangeOutputs(g=>{this._updateOutputs(g)}))}_updateOutputs(s){const o=[];this._outputEntries.forEach((p,c)=>{this._nestedCellViewModel.outputsViewModels.indexOf(c)<0&&(o.push(c),this._outputContainer.removeChild(p.domNode),this._editor.removeInset(this._diffElementViewModel,this._nestedCellViewModel,c,this._diffSide))}),o.forEach(p=>{this._outputEntries.get(p)?.dispose(),this._outputEntries.delete(p)});let u;this._nestedCellViewModel.outputsViewModels.reverse().forEach(p=>{if(this._outputEntries.has(p)){u=this._outputEntries.get(p).domNode;return}const c=this._nestedCellViewModel.outputsViewModels.indexOf(p);this._renderOutput(p,c,u),u=this._outputEntries.get(p)?.domNode})}render(){for(let s=0;s<this._nestedCellViewModel.outputsViewModels.length;s++){const o=this._nestedCellViewModel.outputsViewModels[s];this._renderOutput(o,s,void 0)}}showOutputs(){for(let s=0;s<this._nestedCellViewModel.outputsViewModels.length;s++){const o=this._nestedCellViewModel.outputsViewModels[s];this._editor.showInset(this._diffElementViewModel,o.cellViewModel,o,this._diffSide)}}hideOutputs(){this._outputEntries.forEach((s,o)=>{this._editor.hideInset(this._diffElementViewModel,this._nestedCellViewModel,o)})}_renderOutput(s,o,u){this._outputEntries.has(s)||this._outputEntries.set(s,new a(this._editor,this._notebookTextModel,this._notebookService,this._quickInputService,this._diffElementViewModel,this._diffSide,this._nestedCellViewModel,this._outputContainer,s)),this._outputEntries.get(s).render(o,u)}};e.OutputContainer=r,e.OutputContainer=r=fe([O(6,f.INotebookService),O(7,h.IQuickInputService)],r)}),define(Q[1371],Y([1,0,7,14,4,18,103,244,612,71,356]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.performCellDropEdits=e.CellDragAndDropController=e.CellDragAndDropPart=void 0;const h=t.$,a="cell-dragging",r="global-drag-active";class i extends f.CellContentPart{constructor(d){super(),this.container=d}didRenderCell(d){this.update(d)}updateState(d,p){p.dragStateChanged&&this.update(d)}update(d){this.container.classList.toggle(a,d.dragging)}}e.CellDragAndDropPart=i;class s extends b.Disposable{constructor(d,p){super(),this.notebookEditor=d,this.notebookListContainer=p,this.draggedCells=[],this.isScrolling=!1,this.listOnWillScrollListener=this._register(new b.MutableDisposable),this.listInsertionIndicator=t.append(p,h(".cell-list-insertion-indicator")),this._register(t.addDisposableListener(document.body,t.EventType.DRAG_START,this.onGlobalDragStart.bind(this),!0)),this._register(t.addDisposableListener(document.body,t.EventType.DRAG_END,this.onGlobalDragEnd.bind(this),!0));const c=(l,n,g=!1)=>{this._register(t.addDisposableListener(d.getDomNode(),l,w=>{const E=this.toCellDragEvent(w);E&&n(E)},g))};c(t.EventType.DRAG_OVER,l=>{this.currentDraggedCell&&(l.browserEvent.preventDefault(),this.onCellDragover(l))},!0),c(t.EventType.DROP,l=>{this.currentDraggedCell&&(l.browserEvent.preventDefault(),this.onCellDrop(l))}),c(t.EventType.DRAG_LEAVE,l=>{l.browserEvent.preventDefault(),this.onCellDragLeave(l)}),this.scrollingDelayer=this._register(new y.Delayer(200))}setList(d){this.list=d,this.listOnWillScrollListener.value=this.list.onWillScroll(p=>{p.scrollTopChanged&&(this.setInsertIndicatorVisibility(!1),this.isScrolling=!0,this.scrollingDelayer.trigger(()=>{this.isScrolling=!1}))})}setInsertIndicatorVisibility(d){this.listInsertionIndicator.style.opacity=d?"1":"0"}toCellDragEvent(d){const p=this.notebookListContainer.getBoundingClientRect().top,c=this.list.scrollTop+d.clientY-p,l=this.list.elementAt(c);if(!l)return;const n=this.list.getCellViewScrollTop(l),g=this.list.elementHeight(l),E=(c-n)/g;return{browserEvent:d,draggedOverCell:l,cellTop:n,cellHeight:g,dragPosRatio:E}}clearGlobalDragState(){this.notebookEditor.getDomNode().classList.remove(r)}onGlobalDragStart(){this.notebookEditor.getDomNode().classList.add(r)}onGlobalDragEnd(){this.notebookEditor.getDomNode().classList.remove(r)}onCellDragover(d){if(!d.browserEvent.dataTransfer)return;if(!this.currentDraggedCell){d.browserEvent.dataTransfer.dropEffect="none";return}if(this.isScrolling||this.currentDraggedCell===d.draggedOverCell){this.setInsertIndicatorVisibility(!1);return}const p=this.getDropInsertDirection(d.dragPosRatio),c=p==="above"?d.cellTop:d.cellTop+d.cellHeight;this.updateInsertIndicator(p,c)}updateInsertIndicator(d,p){const{bottomToolbarGap:c}=this.notebookEditor.notebookOptions.computeBottomToolbarDimensions(this.notebookEditor.textModel?.viewType),l=p-this.list.scrollTop+c/2;l>=0?(this.listInsertionIndicator.style.top=`${l}px`,this.setInsertIndicatorVisibility(!0)):this.setInsertIndicatorVisibility(!1)}getDropInsertDirection(d){return d<.5?"above":"below"}onCellDrop(d){const p=this.currentDraggedCell;if(this.isScrolling||this.currentDraggedCell===d.draggedOverCell)return;this.dragCleanup();const c=this.getDropInsertDirection(d.dragPosRatio);this._dropImpl(p,c,d.browserEvent,d.draggedOverCell)}getCellRangeAroundDragTarget(d){const p=this.notebookEditor.getSelections(),l=(0,T.expandCellRangesWithHiddenCells)(this.notebookEditor,p).find(n=>n.start<=d&&d<n.end);return l||{start:d,end:d+1}}_dropImpl(d,p,c,l){const n=this.list.getCellViewScrollTop(l),g=this.list.elementHeight(l),w=p==="above"?n:n+g,{bottomToolbarGap:E}=this.notebookEditor.notebookOptions.computeBottomToolbarDimensions(this.notebookEditor.textModel?.viewType),C=w-this.list.scrollTop+E/2,I=this.notebookEditor.getDomNode().getBoundingClientRect().height;if(C<0||C>I)return;const _=c.ctrlKey&&!D.isMacintosh||c.altKey&&D.isMacintosh;if(!this.notebookEditor.hasModel())return;const A=this.notebookEditor.textModel;if(_){const k=this.notebookEditor.getCellIndex(d),L=this.getCellRangeAroundDragTarget(k);let R=this.notebookEditor.getCellIndex(l);if(p==="below"){const P=this.notebookEditor.getCellIndex(l);R=this.notebookEditor.getNextVisibleCellIndex(P)}let M,N;if(R<=L.start)M={start:R,end:R+L.end-L.start},N={start:R+k-L.start,end:R+k-L.start+1};else{const P=R-L.start;M={start:L.start+P,end:L.end+P},N={start:k+P,end:k+P+1}}A.applyEdits([{editType:1,index:R,count:0,cells:(0,S.cellRangesToIndexes)([L]).map(P=>(0,v.cloneNotebookCellTextModel)(this.notebookEditor.cellAt(P).model))}],!0,{kind:m.SelectionStateType.Index,focus:this.notebookEditor.getFocus(),selections:this.notebookEditor.getSelections()},()=>({kind:m.SelectionStateType.Index,focus:N,selections:[M]}),void 0,!0),this.notebookEditor.revealCellRangeInView(M)}else o(this.notebookEditor,d,p,l)}onCellDragLeave(d){(!d.browserEvent.relatedTarget||!t.isAncestor(d.browserEvent.relatedTarget,this.notebookEditor.getDomNode()))&&this.setInsertIndicatorVisibility(!1)}dragCleanup(){this.currentDraggedCell&&(this.draggedCells.forEach(d=>d.dragging=!1),this.currentDraggedCell=void 0,this.draggedCells=[]),this.setInsertIndicatorVisibility(!1)}registerDragHandle(d,p,c,l){const n=d.container;for(const E of c)E.setAttribute("draggable","true");const g=()=>{!this.notebookEditor.notebookOptions.getLayoutConfiguration().dragAndDropEnabled||this.notebookEditor.isReadOnly||(n.classList.remove(a),this.dragCleanup())};for(const E of c)d.templateDisposables.add(t.addDisposableListener(E,t.EventType.DRAG_END,g));const w=E=>{if(!E.dataTransfer||!this.notebookEditor.notebookOptions.getLayoutConfiguration().dragAndDropEnabled||this.notebookEditor.isReadOnly)return;this.currentDraggedCell=d.currentRenderedCell,this.draggedCells=this.notebookEditor.getSelections().map(I=>this.notebookEditor.getCellsInRange(I)).flat(),this.draggedCells.forEach(I=>I.dragging=!0);const C=l();p.parentElement.appendChild(C),E.dataTransfer.setDragImage(C,0,0),setTimeout(()=>p.parentElement.removeChild(C),0)};for(const E of c)d.templateDisposables.add(t.addDisposableListener(E,t.EventType.DRAG_START,w))}startExplicitDrag(d,p){!this.notebookEditor.notebookOptions.getLayoutConfiguration().dragAndDropEnabled||this.notebookEditor.isReadOnly||(this.currentDraggedCell=d,this.setInsertIndicatorVisibility(!0))}explicitDrag(d,p){if(!this.notebookEditor.notebookOptions.getLayoutConfiguration().dragAndDropEnabled||this.notebookEditor.isReadOnly)return;const c=this.list.elementAt(p);if(c&&c!==d){const C=this.list.getCellViewScrollTop(c),I=this.list.elementHeight(c),_=this.getExplicitDragDropDirection(p,C,I),A=_==="above"?C:C+I;this.updateInsertIndicator(_,A)}if(this.currentDraggedCell!==d)return;const l=this.notebookEditor.getDomNode().getBoundingClientRect(),n=p-this.list.scrollTop,g=.2,w=20,E=n/l.height;E<g?this.list.scrollTop-=w*(1-E/g):E>1-g&&(this.list.scrollTop+=w*(1-(1-E)/g))}endExplicitDrag(d){this.setInsertIndicatorVisibility(!1)}explicitDrop(d,p){this.currentDraggedCell=void 0,this.setInsertIndicatorVisibility(!1);const c=this.list.elementAt(p.dragOffsetY);if(!c||c===d)return;const l=this.list.getCellViewScrollTop(c),n=this.list.elementHeight(c),g=this.getExplicitDragDropDirection(p.dragOffsetY,l,n);this._dropImpl(d,g,p,c)}getExplicitDragDropDirection(d,p,c){const n=(d-p)/c;return this.getDropInsertDirection(n)}dispose(){this.notebookEditor=null,super.dispose()}}e.CellDragAndDropController=s;function o(u,d,p,c){const l=u.getCellIndex(d);let n=u.getCellIndex(c);if(typeof l!="number"||typeof n!="number")return;p==="below"&&(n=u.getNextVisibleCellIndex(n)??n);let g=u.getSelections();g.length||(g=[u.getFocus()]);let w=u.getFocus().start;g.some(M=>M.start<=l&&M.end>l)||(g=[{start:l,end:l+1}],w=l);const E=g.find(M=>M.start<=n&&M.end>n);E&&(n=E.start);let C=0,I=n,_=n;g.sort((M,N)=>N.start-M.start);const A=g.map(M=>{const N=M.end-M.start;let P=0;M.end<=_&&(P=-N);const x=_+P;if(w>=M.start&&w<=M.end){const W=w-M.start;I=x+W}const F=M.start>=n?C:0,V={editType:6,index:M.start+F,length:N,newIdx:x};return C+=N,M.end<_&&(_-=N),V}),k=A[A.length-1],L={start:k.newIdx,end:k.newIdx+C},R={start:I,end:I+1};u.textModel.applyEdits(A,!0,{kind:m.SelectionStateType.Index,focus:u.getFocus(),selections:u.getSelections()},()=>({kind:m.SelectionStateType.Index,focus:R,selections:[L]}),void 0,!0),u.revealCellRangeInView(L)}e.performCellDropEdits=o}),define(Q[963],Y([1,0,6,2833,13,9,56,8,16,82,224,176,244,71]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellEditorOptions=void 0;class i extends a.CellContentPart{constructor(o,u,d){super(),this.base=o,this.notebookOptions=u,this.configurationService=d,this._lineNumbers="inherit",this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._register(o.onDidChange(()=>{this._recomputeOptions()})),this._value=this._computeEditorOptions()}updateState(o,u){u.cellLineNumberChanged&&this.setLineNumbers(o.lineNumbers)}_recomputeOptions(){this._value=this._computeEditorOptions(),this._onDidChange.fire()}_computeEditorOptions(){const o=this.base.value;let u=o.lineNumbers;switch(this._lineNumbers){case"inherit":this.configurationService.getValue("notebook.lineNumbers")==="on"?o.lineNumbers==="off"&&(u="on"):u="off";break;case"on":o.lineNumbers==="off"&&(u="on");break;case"off":u="off";break}return o.lineNumbers!==u?{...o,lineNumbers:u}:Object.assign({},o)}getUpdatedValue(o,u){const d=this.getValue(o,u);return delete d.hover,d}getValue(o,u){return{...this._value,padding:this.notebookOptions.computeEditorPadding(o,u)}}getDefaultValue(){return{...this._value,padding:{top:12,bottom:12}}}setLineNumbers(o){this._lineNumbers=o,this._recomputeOptions()}}e.CellEditorOptions=i,v.Registry.as(T.Extensions.Configuration).registerConfiguration({id:"notebook",order:100,type:"object",properties:{"notebook.lineNumbers":{type:"string",enum:["off","on"],default:"off",markdownDescription:(0,y.localize)(0,null)}}}),(0,b.registerAction2)(class extends b.Action2{constructor(){super({id:"notebook.toggleLineNumbers",title:{value:(0,y.localize)(1,null),original:"Toggle Notebook Line Numbers"},precondition:h.NOTEBOOK_EDITOR_FOCUSED,menu:[{id:b.MenuId.NotebookToolbar,group:"notebookLayout",order:2,when:f.ContextKeyExpr.equals("config.notebook.globalToolbar",!0)}],category:S.NOTEBOOK_ACTIONS_CATEGORY,f1:!0,toggled:{condition:f.ContextKeyExpr.notEquals("config.notebook.lineNumbers","off"),title:(0,y.localize)(2,null)}})}async run(o){const u=o.get(D.IConfigurationService);u.getValue("notebook.lineNumbers")==="on"?u.updateValue("notebook.lineNumbers","off"):u.updateValue("notebook.lineNumbers","on")}}),(0,b.registerAction2)(class extends S.NotebookMultiCellAction{constructor(){super({id:"notebook.cell.toggleLineNumbers",title:(0,y.localize)(3,null),precondition:m.ActiveEditorContext.isEqualTo(r.NOTEBOOK_EDITOR_ID),menu:[{id:b.MenuId.NotebookCellTitle,group:"View",order:1}],toggled:f.ContextKeyExpr.or(h.NOTEBOOK_CELL_LINE_NUMBERS.isEqualTo("on"),f.ContextKeyExpr.and(h.NOTEBOOK_CELL_LINE_NUMBERS.isEqualTo("inherit"),f.ContextKeyExpr.equals("config.notebook.lineNumbers","on")))})}async runWithContext(o,u){if(u.ui)this.updateCell(o.get(D.IConfigurationService),u.cell);else{const d=o.get(D.IConfigurationService);u.selectedCells.forEach(p=>{this.updateCell(d,p)})}}updateCell(o,u){const d=o.getValue("notebook.lineNumbers")==="on",p=u.lineNumbers;p==="on"||p==="inherit"&&d?u.lineNumbers="off":u.lineNumbers="on"}})}),define(Q[3864],Y([1,0,7,32,37,2838,38,103,244]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsedCellOutput=void 0;const m=t.$;let S=class extends v.CellContentPart{constructor(a,r,i){super(),this.notebookEditor=a;const s=t.append(r,m("span.expandOutputPlaceholder"));s.textContent=(0,D.localize)(0,null);const o=t.append(r,m("span.expandOutputIcon"));o.classList.add(...b.ThemeIcon.asClassNameArray(y.Codicon.more));const u=i.lookupKeybinding(f.EXPAND_CELL_OUTPUT_COMMAND_ID);u&&(s.title=(0,D.localize)(1,null,u.getLabel()),r.title=(0,D.localize)(2,null,u.getLabel())),t.hide(r),this._register(t.addDisposableListener(o,t.EventType.CLICK,()=>this.expand())),this._register(t.addDisposableListener(r,t.EventType.DBLCLICK,()=>this.expand()))}expand(){!this.currentCell||!this.currentCell||this.notebookEditor.textModel.cells.indexOf(this.currentCell.model)<0||(this.currentCell.isOutputCollapsed=!this.currentCell.isOutputCollapsed)}};e.CollapsedCellOutput=S,e.CollapsedCellOutput=S=fe([O(2,T.IKeybindingService)],S)}),define(Q[3865],Y([1,0,7,32,37,2839,1370,103,244]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldedCellHint=void 0;class m extends v.CellContentPart{constructor(h,a){super(),this._notebookEditor=h,this._container=a}didRenderCell(h){this.update(h)}update(h){if(this._notebookEditor.hasModel())if(h.isInputCollapsed||h.getEditState()===f.CellEditState.Editing)t.hide(this._container);else if(h.foldingState===2){const a=this._notebookEditor.getViewModel().getCellIndex(h),r=this._notebookEditor.getViewModel().getFoldedLength(a);t.reset(this._container,this.getHiddenCellsLabel(r),this.getHiddenCellHintButton(h)),t.show(this._container);const i=h.layoutInfo.previewHeight;this._container.style.top=`${i}px`}else t.hide(this._container)}getHiddenCellsLabel(h){const a=h===1?(0,D.localize)(0,null):(0,D.localize)(1,null,h);return t.$("span.notebook-folded-hint-label",void 0,a)}getHiddenCellHintButton(h){const a=t.$("span.cell-expand-part-button");return a.classList.add(...b.ThemeIcon.asClassNameArray(y.Codicon.more)),this._register(t.addDisposableListener(a,t.EventType.CLICK,()=>{const r=this._notebookEditor.getContribution(T.FoldingController.id),i=this._notebookEditor.getCellIndex(h);typeof i=="number"&&r.setFoldingStateDown(i,1,1)})),a}updateInternalLayoutNow(h){this.update(h)}}e.FoldedCellHint=m}),define(Q[3866],Y([1,0,7,169,14,31,32,37,4,190,73,50,449,2840,66,9,8,5,134,38,103,267,963,599]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkupCell=void 0;let w=class extends v.Disposable{constructor(C,I,_,A,k,L,R,M,N,P){super(),this.notebookEditor=C,this.viewCell=I,this.templateData=_,this.renderedEditors=A,this.accessibilityService=k,this.contextKeyService=L,this.instantiationService=R,this.languageService=M,this.configurationService=N,this.keybindingService=P,this.editor=null,this.localDisposables=this._register(new v.DisposableStore),this.focusSwitchDisposable=this._register(new v.MutableDisposable),this.editorDisposables=this._register(new v.DisposableStore),this.constructDOM(),this.editorPart=_.editorPart,this.cellEditorOptions=this._register(new n.CellEditorOptions(this.notebookEditor.getBaseCellEditorOptions(I.language),this.notebookEditor.notebookOptions,this.configurationService)),this.cellEditorOptions.setLineNumbers(this.viewCell.lineNumbers),this.editorOptions=this.cellEditorOptions.getValue(this.viewCell.internalMetadata,this.viewCell.uri),this._register((0,v.toDisposable)(()=>A.delete(this.viewCell))),this.registerListeners(),this.templateData.cellParts.scheduleRenderCell(this.viewCell),this._register((0,v.toDisposable)(()=>{this.templateData.cellParts.unrenderCell(this.viewCell)})),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(()=>{this.viewUpdate()})),this.updateForHover(),this.updateForFocusModeChange(),this.foldingState=I.foldingState,this.layoutFoldingIndicator(),this.updateFoldingIconShowClass(),this.viewCell.layoutInfo.totalHeight>0&&this.relayoutCell(),this.applyDecorations(),this.viewUpdate(),this.layoutCellParts(),this._register(this.viewCell.onDidChangeLayout(()=>{this.layoutCellParts()}))}layoutCellParts(){this.templateData.cellParts.updateInternalLayoutNow(this.viewCell)}constructDOM(){const C=`aria-markup-cell-${this.viewCell.id}`;this.markdownAccessibilityContainer=this.templateData.cellContainer,this.markdownAccessibilityContainer.id=C,this.markdownAccessibilityContainer.style.height="1px",this.markdownAccessibilityContainer.style.overflow="hidden",this.markdownAccessibilityContainer.style.position="absolute",this.markdownAccessibilityContainer.style.top="100000px",this.markdownAccessibilityContainer.style.left="10000px",this.markdownAccessibilityContainer.ariaHidden="false",this.templateData.rootContainer.setAttribute("aria-describedby",C),this.templateData.container.classList.toggle("webview-backed-markdown-cell",!0)}registerListeners(){this._register(this.viewCell.onDidChangeState(C=>{this.templateData.cellParts.updateState(this.viewCell,C)})),this._register(this.viewCell.model.onDidChangeMetadata(()=>{this.viewUpdate()})),this._register(this.viewCell.onDidChangeState(C=>{if((C.editStateChanged||C.contentChanged)&&this.viewUpdate(),C.focusModeChanged&&this.updateForFocusModeChange(),C.foldingStateChanged){const I=this.viewCell.foldingState;I!==this.foldingState&&(this.foldingState=I,this.layoutFoldingIndicator())}C.cellIsHoveredChanged&&this.updateForHover(),C.inputCollapsedChanged&&(this.updateCollapsedState(),this.viewUpdate()),C.cellLineNumberChanged&&this.cellEditorOptions.setLineNumbers(this.viewCell.lineNumbers)})),this._register(this.notebookEditor.notebookOptions.onDidChangeOptions(C=>{C.showFoldingControls&&this.updateFoldingIconShowClass()})),this._register(this.viewCell.onDidChangeLayout(C=>{const I=this.editor?.getLayoutInfo();C.outerWidth&&this.viewCell.getEditState()===c.CellEditState.Editing&&I&&I.width!==this.viewCell.layoutInfo.editorWidth&&this.onCellEditorWidthChange()})),this._register(this.cellEditorOptions.onDidChange(()=>{this.updateEditorOptions(this.cellEditorOptions.getUpdatedValue(this.viewCell.internalMetadata,this.viewCell.uri))}))}updateCollapsedState(){this.viewCell.isInputCollapsed?this.notebookEditor.hideMarkupPreviews([this.viewCell]):this.notebookEditor.unhideMarkupPreviews([this.viewCell])}updateForHover(){this.templateData.container.classList.toggle("markdown-cell-hover",this.viewCell.cellIsHovered)}updateForFocusModeChange(){this.viewCell.focusMode===c.CellFocusMode.Editor&&this.focusEditorIfNeeded(),this.templateData.container.classList.toggle("cell-editor-focus",this.viewCell.focusMode===c.CellFocusMode.Editor)}applyDecorations(){this._register(this.viewCell.onCellDecorationsChanged(C=>{C.added.forEach(I=>{I.className&&this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id,[I.className],[])}),C.removed.forEach(I=>{I.className&&this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id,[],[I.className])})})),this.viewCell.getCellDecorations().forEach(C=>{C.className&&this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id,[C.className],[])})}dispose(){this.notebookEditor.getActiveCell()===this.viewCell&&this.viewCell.focusMode===c.CellFocusMode.Editor&&(this.notebookEditor.hasEditorFocus()||document.activeElement===document.body)&&this.notebookEditor.focusContainer(),this.viewCell.detachTextEditor(),super.dispose()}updateFoldingIconShowClass(){const C=this.notebookEditor.notebookOptions.getLayoutConfiguration().showFoldingControls;this.templateData.foldingIndicator.classList.remove("mouseover","always"),this.templateData.foldingIndicator.classList.add(C)}viewUpdate(){this.viewCell.isInputCollapsed?this.viewUpdateCollapsed():this.viewCell.getEditState()===c.CellEditState.Editing?this.viewUpdateEditing():this.viewUpdatePreview()}viewUpdateCollapsed(){t.show(this.templateData.cellInputCollapsedContainer),t.hide(this.editorPart),this.templateData.cellInputCollapsedContainer.innerText="",t.append(this.templateData.cellInputCollapsedContainer,t.$("span")).classList.add(...f.ThemeIcon.asClassNameArray(T.Codicon.markdown));const I=t.$("div");I.classList.add("cell-collapse-preview");const _=this.getRichText(this.viewCell.textBuffer,this.viewCell.language);t.safeInnerHtml(I,_),this.templateData.cellInputCollapsedContainer.appendChild(I);const A=t.append(I,t.$("span.expandInputIcon"));A.classList.add(...f.ThemeIcon.asClassNameArray(T.Codicon.more));const k=this.keybindingService.lookupKeybinding(c.EXPAND_CELL_INPUT_COMMAND_ID);k&&(I.title=(0,r.localize)(0,null,k.getLabel()),A.title=(0,r.localize)(1,null,k.getLabel())),this.markdownAccessibilityContainer.ariaHidden="true",this.templateData.container.classList.toggle("input-collapsed",!0),this.viewCell.renderedMarkdownHeight=0,this.viewCell.layoutChange({})}getRichText(C,I){return(0,a.tokenizeToStringSync)(this.languageService,C.getLineContent(1),I)}viewUpdateEditing(){let C;if(t.show(this.editorPart),this.markdownAccessibilityContainer.ariaHidden="true",t.hide(this.templateData.cellInputCollapsedContainer),this.notebookEditor.hideMarkupPreviews([this.viewCell]),this.templateData.container.classList.toggle("input-collapsed",!1),this.templateData.container.classList.toggle("markdown-cell-edit-mode",!0),this.editor&&this.editor.hasModel())C=this.editor.getContentHeight(),this.viewCell.attachTextEditor(this.editor),this.focusEditorIfNeeded(),this.bindEditorListeners(this.editor),this.editor.layout({width:this.viewCell.layoutInfo.editorWidth,height:C});else{this.editorDisposables.clear();const I=this.notebookEditor.notebookOptions.computeMarkdownCellEditorWidth(this.notebookEditor.getLayoutInfo().width),_=this.viewCell.lineCount,A=this.viewCell.layoutInfo.fontInfo?.lineHeight||17,k=this.notebookEditor.notebookOptions.computeEditorPadding(this.viewCell.internalMetadata,this.viewCell.uri);C=Math.max(_,1)*A+k.top+k.bottom,this.templateData.editorContainer.innerText="";const L=this.contextKeyService.createScoped(this.templateData.editorPart);S.EditorContextKeys.inCompositeEditor.bindTo(L).set(!0);const R=this.instantiationService.createChild(new d.ServiceCollection([o.IContextKeyService,L]));this.editorDisposables.add(L),this.editor=this.editorDisposables.add(R.createInstance(m.CodeEditorWidget,this.templateData.editorContainer,{...this.editorOptions,dimension:{width:I,height:C}},{contributions:this.notebookEditor.creationOptions.cellEditorContributions})),this.templateData.currentEditor=this.editor,this.editorDisposables.add(this.editor.onDidBlurEditorWidget(()=>{this.editor&&g.WordHighlighterContribution.get(this.editor)?.stopHighlighting()})),this.editorDisposables.add(this.editor.onDidFocusEditorWidget(()=>{this.editor&&g.WordHighlighterContribution.get(this.editor)?.restoreViewState(!0)}));const M=new D.CancellationTokenSource;this.editorDisposables.add({dispose(){M.dispose(!0)}}),(0,b.raceCancellation)(this.viewCell.resolveTextModel(),M.token).then(N=>{if(!N)return;this.editor.setModel(N);const P=this.editor.getContentHeight();P!==C&&(this.editor.layout({width:I,height:P}),C=P),this.viewCell.attachTextEditor(this.editor),this.viewCell.getEditState()===c.CellEditState.Editing&&this.focusEditorIfNeeded(),this.bindEditorListeners(this.editor),this.viewCell.editorHeight=C})}this.viewCell.editorHeight=C,this.focusEditorIfNeeded(),this.renderedEditors.set(this.viewCell,this.editor)}viewUpdatePreview(){this.viewCell.detachTextEditor(),t.hide(this.editorPart),t.hide(this.templateData.cellInputCollapsedContainer),this.markdownAccessibilityContainer.ariaHidden="false",this.templateData.container.classList.toggle("input-collapsed",!1),this.templateData.container.classList.toggle("markdown-cell-edit-mode",!1),this.renderedEditors.delete(this.viewCell),this.markdownAccessibilityContainer.innerText="",this.viewCell.renderedHtml&&(this.accessibilityService.isScreenReaderOptimized()?t.safeInnerHtml(this.markdownAccessibilityContainer,this.viewCell.renderedHtml):t.clearNode(this.markdownAccessibilityContainer)),this.notebookEditor.createMarkupPreview(this.viewCell)}focusEditorIfNeeded(){if(this.viewCell.focusMode===c.CellFocusMode.Editor&&(this.notebookEditor.hasEditorFocus()||document.activeElement===document.body)){if(!this.editor)return;this.editor.focus();const C=this.editor.getSelection();if(!C)return;this.notebookEditor.revealRangeInViewAsync(this.viewCell,C)}}layoutEditor(C){this.editor?.layout(C)}onCellEditorWidthChange(){const C=this.editor.getContentHeight();this.layoutEditor({width:this.viewCell.layoutInfo.editorWidth,height:C})}relayoutCell(){this.notebookEditor.layoutNotebookCell(this.viewCell,this.viewCell.layoutInfo.totalHeight),this.layoutFoldingIndicator()}updateEditorOptions(C){this.editorOptions=C,this.editor?.updateOptions(this.editorOptions)}layoutFoldingIndicator(){switch(this.foldingState){case 0:this.templateData.foldingIndicator.style.display="none",this.templateData.foldingIndicator.innerText="";break;case 2:this.templateData.foldingIndicator.style.display="",t.reset(this.templateData.foldingIndicator,(0,y.renderIcon)(l.collapsedIcon));break;case 1:this.templateData.foldingIndicator.style.display="",t.reset(this.templateData.foldingIndicator,(0,y.renderIcon)(l.expandedIcon));break;default:break}}bindEditorListeners(C){this.localDisposables.clear(),this.focusSwitchDisposable.clear(),this.localDisposables.add(C.onDidContentSizeChange(_=>{_.contentHeightChanged&&this.onCellEditorHeightChange(C,_.contentHeight)})),this.localDisposables.add(C.onDidChangeCursorSelection(_=>{if(_.source==="restoreState")return;const A=C.getSelections();if(A?.length){const k=C.getContentHeight(),L=this.viewCell.layoutInfo.editorHeight;k!==L&&this.onCellEditorHeightChange(C,k);const R=A[A.length-1];this.notebookEditor.revealRangeInViewAsync(this.viewCell,R)}}));const I=()=>this.viewCell.focusMode=C.hasWidgetFocus()?c.CellFocusMode.Editor:c.CellFocusMode.Container;this.localDisposables.add(C.onDidFocusEditorWidget(()=>{I()})),this.localDisposables.add(C.onDidBlurEditorWidget(()=>{document.activeElement?.contains(this.templateData.container)?this.focusSwitchDisposable.value=(0,b.disposableTimeout)(()=>I(),300):I()})),I()}onCellEditorHeightChange(C,I){const _=C.getLayoutInfo();this.viewCell.editorHeight=I,C.layout({width:_.width,height:I})}};e.MarkupCell=w,e.MarkupCell=w=fe([O(4,i.IAccessibilityService),O(5,o.IContextKeyService),O(6,u.IInstantiationService),O(7,h.ILanguageService),O(8,s.IConfigurationService),O(9,p.IKeybindingService)],w)}),define(Q[3867],Y([1,0,7,4,8,103,176,211,253,44]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEditorContextKeys=void 0;let S=class{constructor(a,r,i,s,o){this._editor=a,this._notebookKernelService=r,this._extensionService=s,this._notebookExecutionStateService=o,this._disposables=new y.DisposableStore,this._viewModelDisposables=new y.DisposableStore,this._cellOutputsListeners=[],this._selectedKernelDisposables=new y.DisposableStore,this._notebookKernel=T.NOTEBOOK_KERNEL.bindTo(i),this._notebookKernelCount=T.NOTEBOOK_KERNEL_COUNT.bindTo(i),this._notebookKernelSelected=T.NOTEBOOK_KERNEL_SELECTED.bindTo(i),this._interruptibleKernel=T.NOTEBOOK_INTERRUPTIBLE_KERNEL.bindTo(i),this._someCellRunning=T.NOTEBOOK_HAS_RUNNING_CELL.bindTo(i),this._kernelRunning=T.NOTEBOOK_HAS_SOMETHING_RUNNING.bindTo(i),this._useConsolidatedOutputButton=T.NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON.bindTo(i),this._hasOutputs=T.NOTEBOOK_HAS_OUTPUTS.bindTo(i),this._viewType=T.NOTEBOOK_VIEW_TYPE.bindTo(i),this._missingKernelExtension=T.NOTEBOOK_MISSING_KERNEL_EXTENSION.bindTo(i),this._notebookKernelSourceCount=T.NOTEBOOK_KERNEL_SOURCE_COUNT.bindTo(i),this._cellToolbarLocation=T.NOTEBOOK_CELL_TOOLBAR_LOCATION.bindTo(i),this._lastCellFailed=T.NOTEBOOK_LAST_CELL_FAILED.bindTo(i),this._handleDidChangeModel(),this._updateForNotebookOptions(),this._disposables.add(a.onDidChangeModel(this._handleDidChangeModel,this)),this._disposables.add(r.onDidAddKernel(this._updateKernelContext,this)),this._disposables.add(r.onDidChangeSelectedNotebooks(this._updateKernelContext,this)),this._disposables.add(r.onDidChangeSourceActions(this._updateKernelContext,this)),this._disposables.add(a.notebookOptions.onDidChangeOptions(this._updateForNotebookOptions,this)),this._disposables.add(s.onDidChangeExtensions(this._updateForInstalledExtension,this)),this._disposables.add(o.onDidChangeExecution(this._updateForExecution,this)),this._disposables.add(o.onDidChangeLastRunFailState(this._updateForLastRunFailState,this))}dispose(){this._disposables.dispose(),this._viewModelDisposables.dispose(),this._notebookKernelCount.reset(),this._notebookKernelSourceCount.reset(),this._interruptibleKernel.reset(),this._someCellRunning.reset(),this._kernelRunning.reset(),this._viewType.reset(),(0,y.dispose)(this._cellOutputsListeners),this._cellOutputsListeners.length=0}_handleDidChangeModel(){if(this._updateKernelContext(),this._updateForNotebookOptions(),this._viewModelDisposables.clear(),(0,y.dispose)(this._cellOutputsListeners),this._cellOutputsListeners.length=0,!this._editor.hasModel())return;const a=()=>{let s=!1;if(this._editor.hasModel()){for(let o=0;o<this._editor.getLength();o++)if(this._editor.cellAt(o).outputsViewModels.length>0){s=!0;break}}this._hasOutputs.set(s)},r=this._viewModelDisposables.add(new y.DisposableStore),i=s=>s.model.onDidChangeOutputs(()=>{r.clear(),r.add(t.scheduleAtNextAnimationFrame(()=>{a()}))});for(let s=0;s<this._editor.getLength();s++){const o=this._editor.cellAt(s);this._cellOutputsListeners.push(i(o))}a(),this._updateForInstalledExtension(),this._viewModelDisposables.add(this._editor.onDidChangeViewCells(s=>{[...s.splices].reverse().forEach(o=>{const[u,d,p]=o,c=this._cellOutputsListeners.splice(u,d,...p.map(i));(0,y.dispose)(c)})})),this._viewType.set(this._editor.textModel.viewType)}_updateForExecution(a){if(this._editor.textModel){const r=this._notebookExecutionStateService.getExecution(this._editor.textModel.uri),i=this._notebookExecutionStateService.getCellExecutionsForNotebook(this._editor.textModel.uri);this._kernelRunning.set(i.length>0||!!r),a.type===f.NotebookExecutionType.cell&&this._someCellRunning.set(i.length>0)}else this._kernelRunning.set(!1),a.type===f.NotebookExecutionType.cell&&this._someCellRunning.set(!1)}_updateForLastRunFailState(a){a.notebook===this._editor.textModel?.uri&&this._lastCellFailed.set(a.visible)}async _updateForInstalledExtension(){if(!this._editor.hasModel())return;const a=this._editor.textModel.viewType,r=D.KERNEL_EXTENSIONS.get(a);this._missingKernelExtension.set(!!r&&!await this._extensionService.getExtension(r))}_updateKernelContext(){if(!this._editor.hasModel()){this._notebookKernelCount.reset(),this._notebookKernelSourceCount.reset(),this._interruptibleKernel.reset();return}const{selected:a,all:r}=this._notebookKernelService.getMatchingKernel(this._editor.textModel),i=this._notebookKernelService.getSourceActions(this._editor.textModel,this._editor.scopedContextKeyService);this._notebookKernelCount.set(r.length),this._notebookKernelSourceCount.set(i.length),this._interruptibleKernel.set(a?.implementsInterrupt??!1),this._notebookKernelSelected.set(!!a),this._notebookKernel.set(a?.id??""),this._selectedKernelDisposables.clear(),a&&this._selectedKernelDisposables.add(a.onDidChange(()=>{this._interruptibleKernel.set(a?.implementsInterrupt??!1)}))}_updateForNotebookOptions(){const a=this._editor.notebookOptions.getLayoutConfiguration();this._useConsolidatedOutputButton.set(a.consolidatedOutputButton),this._cellToolbarLocation.set(this._editor.notebookOptions.computeCellToolbarLocation(this._editor.textModel?.viewType))}};e.NotebookEditorContextKeys=S,e.NotebookEditorContextKeys=S=fe([O(1,v.INotebookKernelService),O(2,b.IContextKeyService),O(3,m.IExtensionService),O(4,f.INotebookExecutionStateService)],S)}),define(Q[3868],Y([1,0,97,140,19,103]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookOverviewRuler=void 0;let T=class extends b.Themable{constructor(v,m,S){super(S),this.notebookEditor=v,this._lanes=3,this._domNode=(0,y.createFastDomNode)(document.createElement("canvas")),this._domNode.setPosition("relative"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),m.appendChild(this._domNode.domNode),this._register(v.onDidChangeDecorations(()=>{this.layout()})),this._register(t.PixelRatio.onDidChange(()=>{this.layout()}))}layout(){const m=this.notebookEditor.getLayoutInfo(),S=m.scrollHeight,h=m.height,a=t.PixelRatio.value;this._domNode.setWidth(10),this._domNode.setHeight(h),this._domNode.domNode.width=10*a,this._domNode.domNode.height=h*a;const r=this._domNode.domNode.getContext("2d");r.clearRect(0,0,10*a,h*a),this._render(r,10*a,h*a,S*a,a)}_render(v,m,S,h,a){const r=this.notebookEditor.getViewModel(),i=this.notebookEditor.getLayoutInfo().fontInfo,s=m/this._lanes;let o=0;if(r)for(let u=0;u<r.viewCells.length;u++){const d=r.viewCells[u],p=d.textBuffer,c=d.getCellDecorations(),l=d.layoutInfo.totalHeight/h*a*S;c.filter(n=>n.overviewRuler).forEach(n=>{const g=n.overviewRuler,w=this.getColor(g.color)??"#000000",E=Math.min(i.lineHeight,d.layoutInfo.editorHeight/h/p.getLineCount()*a*S),C=g.modelRanges.map(A=>A.startLineNumber).reduce((A,k)=>((A.length===0||A[A.length-1]!==k)&&A.push(k),A),[]);let I=0;switch(g.position){case D.NotebookOverviewRulerLane.Left:I=0;break;case D.NotebookOverviewRulerLane.Center:I=s;break;case D.NotebookOverviewRulerLane.Right:I=s*2;break;default:break}const _=g.position===D.NotebookOverviewRulerLane.Full?s*3:s;for(let A=0;A<C.length;A++){v.fillStyle=w;const L=(C[A]-1)*E;v.fillRect(I,o+L,_,E)}if(g.includeOutput){v.fillStyle=w;const A=d.layoutInfo.editorHeight/h*a*S,k=i.lineHeight/h*a*S;v.fillRect(s,o+A,s,k)}}),o+=l}}};e.NotebookOverviewRuler=T,e.NotebookOverviewRuler=T=fe([O(2,b.IThemeService)],T)}),define(Q[964],Y([1,0,62,15,6,4,22,42,17,9,290,71,148,150]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookFileWorkingCopyModelFactory=e.NotebookFileWorkingCopyModel=e.SimpleNotebookEditorModel=void 0;let s=i=class extends S.EditorModel{constructor(p,c,l,n,g){super(),this.resource=p,this._hasAssociatedFilePath=c,this.viewType=l,this._workingCopyManager=n,this._filesConfigurationService=g,this._onDidChangeDirty=this._register(new b.Emitter),this._onDidSave=this._register(new b.Emitter),this._onDidChangeOrphaned=this._register(new b.Emitter),this._onDidChangeReadonly=this._register(new b.Emitter),this._onDidRevertUntitled=this._register(new b.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this.onDidSave=this._onDidSave.event,this.onDidChangeOrphaned=this._onDidChangeOrphaned.event,this.onDidChangeReadonly=this._onDidChangeReadonly.event,this.onDidRevertUntitled=this._onDidRevertUntitled.event,this._workingCopyListeners=this._register(new D.DisposableStore),this.scratchPad=l==="interactive"}dispose(){this._workingCopy?.dispose(),super.dispose()}get notebook(){return this._workingCopy?.model?.notebookModel}isResolved(){return!!this._workingCopy?.model?.notebookModel}async canDispose(){return this._workingCopy&&i._isStoredFileWorkingCopy(this._workingCopy)?this._workingCopyManager.stored.canDispose(this._workingCopy):!0}isDirty(){return this._workingCopy?.isDirty()??!1}isModified(){return this._workingCopy?.isModified()??!1}isOrphaned(){return i._isStoredFileWorkingCopy(this._workingCopy)&&this._workingCopy.hasState(4)}hasAssociatedFilePath(){return!i._isStoredFileWorkingCopy(this._workingCopy)&&!!this._workingCopy?.hasAssociatedFilePath}isReadonly(){return i._isStoredFileWorkingCopy(this._workingCopy)?this._workingCopy?.isReadonly():this._filesConfigurationService.isReadonly(this.resource)}get hasErrorState(){return this._workingCopy&&"hasState"in this._workingCopy?this._workingCopy.hasState(5):!1}revert(p){return(0,v.assertType)(this.isResolved()),this._workingCopy.revert(p)}save(p){return(0,v.assertType)(this.isResolved()),this._workingCopy.save(p)}async load(p){return!this._workingCopy||!this._workingCopy.model?(this.resource.scheme===T.Schemas.untitled?(this._hasAssociatedFilePath?this._workingCopy=await this._workingCopyManager.resolve({associatedResource:this.resource}):this._workingCopy=await this._workingCopyManager.resolve({untitledResource:this.resource,isScratchpad:this.scratchPad}),this._workingCopy.onDidRevert(()=>this._onDidRevertUntitled.fire())):(this._workingCopy=await this._workingCopyManager.resolve(this.resource,p?.forceReadFromFile?{reload:{async:!1,force:!0}}:void 0),this._workingCopyListeners.add(this._workingCopy.onDidSave(c=>this._onDidSave.fire(c))),this._workingCopyListeners.add(this._workingCopy.onDidChangeOrphaned(()=>this._onDidChangeOrphaned.fire())),this._workingCopyListeners.add(this._workingCopy.onDidChangeReadonly(()=>this._onDidChangeReadonly.fire()))),this._workingCopyListeners.add(this._workingCopy.onDidChangeDirty(()=>this._onDidChangeDirty.fire(),void 0)),this._workingCopyListeners.add(this._workingCopy.onWillDispose(()=>{this._workingCopyListeners.clear(),this._workingCopy?.model?.dispose()}))):await this._workingCopyManager.resolve(this.resource,{reload:{async:!p?.forceReadFromFile,force:p?.forceReadFromFile}}),(0,v.assertType)(this.isResolved()),this}async saveAs(p){const c=await this._workingCopyManager.saveAs(this.resource,p);if(c)return{resource:c.resource}}static _isStoredFileWorkingCopy(p){return!(p&&p.capabilities&2)}};e.SimpleNotebookEditorModel=s,e.SimpleNotebookEditorModel=s=i=fe([O(4,r.IFilesConfigurationService)],s);class o extends D.Disposable{constructor(p,c,l){super(),this._notebookModel=p,this._notebookService=c,this._configurationService=l,this._onDidChangeContent=this._register(new b.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this.configuration=void 0,this.onWillDispose=p.onWillDispose.bind(p),this._register(p.onDidChangeContent(n=>{for(const g of n.rawEvents)if(g.kind!==h.NotebookCellsChangeType.Initialize&&!g.transient){this._onDidChangeContent.fire({isRedoing:!1,isUndoing:!1,isInitial:!1});break}})),p.uri.scheme===T.Schemas.vscodeRemote&&(this.configuration={backupDelay:1e4},this._configurationService.getValue(h.NotebookSetting.remoteSaving)&&(this.save=async(n,g)=>{const w=await this.getNotebookSerializer();if(g.isCancellationRequested)throw new y.CancellationError;return await w.save(this._notebookModel.uri,this._notebookModel.versionId,n,g)}))}dispose(){this._notebookModel.dispose(),super.dispose()}get notebookModel(){return this._notebookModel}async snapshot(p){const c=await this.getNotebookSerializer(),l={metadata:(0,f.filter)(this._notebookModel.metadata,g=>!c.options.transientDocumentMetadata[g]),cells:[]};for(const g of this._notebookModel.cells){const w={cellKind:g.cellKind,language:g.language,mime:g.mime,source:g.getValue(),outputs:[],internalMetadata:g.internalMetadata};w.outputs=c.options.transientOutputs?[]:g.outputs,w.metadata=(0,f.filter)(g.metadata,E=>!c.options.transientCellMetadata[E]),l.cells.push(w)}const n=await c.notebookToData(l);if(p.isCancellationRequested)throw new y.CancellationError;return(0,t.bufferToStream)(n)}async update(p,c){const l=await this.getNotebookSerializer(),n=await(0,t.streamToBuffer)(p),g=await l.dataToNotebook(n);if(c.isCancellationRequested)throw new y.CancellationError;this._notebookModel.reset(g.cells,g.metadata,l.options)}async getNotebookSerializer(){const p=await this._notebookService.withNotebookDataProvider(this.notebookModel.viewType);if(!(p instanceof a.SimpleNotebookProviderInfo))throw new Error("CANNOT open file notebook with this provider");return p.serializer}get versionId(){return this._notebookModel.alternativeVersionId}pushStackElement(){this._notebookModel.pushStackElement("save",void 0,void 0)}}e.NotebookFileWorkingCopyModel=o;let u=class{constructor(p,c,l){this._viewType=p,this._notebookService=c,this._configurationService=l}async createModel(p,c,l){const n=await this._notebookService.withNotebookDataProvider(this._viewType);if(!(n instanceof a.SimpleNotebookProviderInfo))throw new Error("CANNOT open file notebook with this provider");const g=await(0,t.streamToBuffer)(c),w=await n.serializer.dataToNotebook(g);if(l.isCancellationRequested)throw new y.CancellationError;const E=this._notebookService.createNotebookTextModel(n.viewType,p,w,n.serializer.options);return new o(E,this._notebookService,this._configurationService)}};e.NotebookFileWorkingCopyModelFactory=u,e.NotebookFileWorkingCopyModelFactory=u=fe([O(1,a.INotebookService),O(2,m.IConfigurationService)],u)}),define(Q[254],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GoScope=e.GoFilter=e.IHistoryService=void 0,e.IHistoryService=(0,t.createDecorator)("historyService");var y;(function(D){D[D.NONE=0]="NONE",D[D.EDITS=1]="EDITS",D[D.NAVIGATION=2]="NAVIGATION"})(y||(e.GoFilter=y={}));var b;(function(D){D[D.DEFAULT=0]="DEFAULT",D[D.EDITOR_GROUP=1]="EDITOR_GROUP",D[D.EDITOR=2]="EDITOR"})(b||(e.GoScope=b={}))}),define(Q[86],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IHostService=void 0,e.IHostService=(0,t.createDecorator)("hostService")}),define(Q[3869],Y([1,0,24,30,41,23,10,2157,52,86,91,15]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserTelemetryOptOut=e.AbstractTelemetryOptOut=void 0;let r=class{static{a=this}static{this.TELEMETRY_OPT_OUT_SHOWN="workbench.telemetryOptOutShown"}constructor(o,u,d,p,c,l,n){this.storageService=o,this.openerService=u,this.notificationService=d,this.hostService=p,this.telemetryService=c,this.productService=l,this.environmentService=n}async handleTelemetryOptOut(){if(this.productService.telemetryOptOutUrl&&!this.storageService.get(a.TELEMETRY_OPT_OUT_SHOWN,-1)&&!this.environmentService.disableTelemetry){const[o]=await Promise.all([this.getWindowCount()]);if(!this.hostService.hasFocus&&o>1)return;this.storageService.store(a.TELEMETRY_OPT_OUT_SHOWN,!0,-1,0),this.privacyUrl=this.productService.privacyStatementUrl||this.productService.telemetryOptOutUrl;const u=this.productService.telemetryOptOutUrl;u&&this.showTelemetryOptOut(u)}}showTelemetryOptOut(o){const u=(0,f.localize)(0,null,this.privacyUrl,this.productService.telemetryOptOutUrl),d=(0,f.localize)(1,null,this.privacyUrl,this.productService.telemetryOptOutUrl);this.notificationService.prompt(D.Severity.Info,this.telemetryService.telemetryLevel!==0?u:d,[{label:(0,f.localize)(2,null),run:()=>this.openerService.open(T.URI.parse(o))}],{sticky:!0})}};e.AbstractTelemetryOptOut=r,e.AbstractTelemetryOptOut=r=a=fe([O(0,t.IStorageService),O(1,b.IOpenerService),O(2,D.INotificationService),O(3,m.IHostService),O(4,y.ITelemetryService),O(5,v.IProductService),O(6,S.IEnvironmentService)],r);let i=class extends r{constructor(o,u,d,p,c,l,n){super(o,u,d,p,c,l,n),this.handleTelemetryOptOut().catch(h.onUnexpectedError)}async getWindowCount(){return 1}};e.BrowserTelemetryOptOut=i,e.BrowserTelemetryOptOut=i=fe([O(0,t.IStorageService),O(1,b.IOpenerService),O(2,D.INotificationService),O(3,m.IHostService),O(4,y.ITelemetryService),O(5,v.IProductService),O(6,S.IEnvironmentService)],i)}),define(Q[3870],Y([1,0,24,30,41,23,52,86,3869,91,100]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeTelemetryOptOut=void 0;let h=class extends v.AbstractTelemetryOptOut{constructor(r,i,s,o,u,d,p,c){super(r,i,s,o,u,d,p),this.nativeHostService=c,this.handleTelemetryOptOut()}getWindowCount(){return this.nativeHostService?this.nativeHostService.getWindowCount():Promise.resolve(0)}};e.NativeTelemetryOptOut=h,e.NativeTelemetryOptOut=h=fe([O(0,t.IStorageService),O(1,b.IOpenerService),O(2,D.INotificationService),O(3,f.IHostService),O(4,y.ITelemetryService),O(5,T.IProductService),O(6,m.IEnvironmentService),O(7,S.INativeHostService)],h)}),define(Q[3871],Y([1,0,24,23,2161,15,9,86,143]),function(q,e,t,y,b,D,T,f,v){"use strict";var m;Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEnablePreviewFeatures=void 0;let S=class{static{m=this}static{this.ENABLE_PREVIEW_FEATURES_SHOWN="workbench.enablePreviewFeaturesShown"}constructor(a,r,i,s){this.storageService=a,this.notificationService=r,this.hostService=i,this.configurationService=s}handlePreviewFeatures(){this.configurationService.getValue(v.CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES)||this.storageService.get(m.ENABLE_PREVIEW_FEATURES_SHOWN,-1)||Promise.all([this.hostService.hasFocus,this.getWindowCount()]).then(async([r,i])=>{if(!r&&i>1)return null;await this.configurationService.updateValue(v.CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES,!1);const s=(0,b.localize)(0,null,"https://aka.ms/ads-preview-features");this.notificationService.prompt(y.Severity.Info,s,[{label:(0,b.localize)(1,null),run:()=>{this.configurationService.updateValue(v.CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES,!0).catch(o=>(0,D.onUnexpectedError)(o)),this.storageService.store(m.ENABLE_PREVIEW_FEATURES_SHOWN,!0,-1,1)}},{label:(0,b.localize)(2,null),run:()=>{this.configurationService.updateValue(v.CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES,!1).catch(o=>(0,D.onUnexpectedError)(o))}},{label:(0,b.localize)(3,null),run:()=>{this.configurationService.updateValue(v.CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES,!1).catch(o=>(0,D.onUnexpectedError)(o)),this.storageService.store(m.ENABLE_PREVIEW_FEATURES_SHOWN,!0,-1,1)},isSecondary:!0}])}).catch(r=>(0,D.onUnexpectedError)(r))}};e.AbstractEnablePreviewFeatures=S,e.AbstractEnablePreviewFeatures=S=m=fe([O(0,t.IStorageService),O(1,y.INotificationService),O(2,f.IHostService),O(3,T.IConfigurationService)],S)}),define(Q[3872],Y([1,0,24,23,86,9,2164]),function(q,e,t,y,b,D,T){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.RetirementAnnouncement=void 0;let v=class{static{f=this}static{this.DO_NOT_SHOW_RETIREMENT_PROMPT="workbench.doNotShowRetirementPrompt"}constructor(S,h,a,r){if(this.storageService=S,this.notificationService=h,this.storageService.get(f.DO_NOT_SHOW_RETIREMENT_PROMPT,-1))return;const i=(0,T.localize)(0,null);this.notificationService.prompt(y.Severity.Info,i,[{label:(0,T.localize)(1,null),run:()=>{}},{label:(0,T.localize)(2,null),run:()=>{this.storageService.store(f.DO_NOT_SHOW_RETIREMENT_PROMPT,!0,-1,1)}}])}};e.RetirementAnnouncement=v,e.RetirementAnnouncement=v=f=fe([O(0,t.IStorageService),O(1,y.INotificationService),O(2,b.IHostService),O(3,D.IConfigurationService)],v)}),define(Q[3873],Y([1,0,3871,24,23,86,9,100]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeEnablePreviewFeatures=void 0;let v=class extends t.AbstractEnablePreviewFeatures{constructor(S,h,a,r,i){super(S,h,a,r),this.electronService=i,this.handlePreviewFeatures()}getWindowCount(){return this.electronService.getWindowCount()}};e.NativeEnablePreviewFeatures=v,e.NativeEnablePreviewFeatures=v=fe([O(0,y.IStorageService),O(1,b.INotificationService),O(2,D.IHostService),O(3,T.IConfigurationService),O(4,f.INativeHostService)],v)}),define(Q[747],Y([1,0,2526,49,13,105,82,171,81,113,43,39,61,38,57,50,265,252,25,180,18,8,461,86,69,32,37,7,28,9,3149]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReloadWindowAction=e.OpenRecentAction=e.inRecentFilesPickerContextKey=void 0,e.inRecentFilesPickerContextKey="inRecentFilesPicker";class L extends b.Action2{constructor(H){super(H),this.removeFromRecentlyOpened={iconClass:C.ThemeIcon.asClassName(E.Codicon.removeClose),tooltip:(0,t.localize)(0,null)},this.dirtyRecentlyOpenedFolder={iconClass:"dirty-workspace "+C.ThemeIcon.asClassName(E.Codicon.closeDirty),tooltip:(0,t.localize)(1,null),alwaysVisible:!0},this.dirtyRecentlyOpenedWorkspace={...this.dirtyRecentlyOpenedFolder,tooltip:(0,t.localize)(2,null)}}async run(H){const U=H.get(o.IWorkspacesService),G=H.get(S.IQuickInputService),$=H.get(h.IWorkspaceContextService),ie=H.get(a.ILabelService),J=H.get(r.IKeybindingService),j=H.get(i.IModelService),ee=H.get(s.ILanguageService),X=H.get(g.IHostService),te=H.get(y.IDialogService),Z=await U.getRecentlyOpened(),se=await U.getDirtyWorkspaces();let re=!1;const oe=new w.ResourceMap,le=new w.ResourceMap;for(const we of se)(0,k.isFolderBackupInfo)(we)?oe.set(we.folderUri,!0):(le.set(we.workspace.configPath,we.workspace),re=!0);const ne=new w.ResourceMap,ce=new w.ResourceMap;for(const we of Z.workspaces)(0,o.isRecentFolder)(we)?ne.set(we.folderUri,!0):(ce.set(we.workspace.configPath,we.workspace),re=!0);const ae=[];for(const we of Z.workspaces){const ye=(0,o.isRecentFolder)(we)?oe.has(we.folderUri):le.has(we.workspace.configPath);ae.push(this.toQuickPick(j,ee,ie,we,ye))}for(const we of se)(0,k.isFolderBackupInfo)(we)&&!ne.has(we.folderUri)?ae.push(this.toQuickPick(j,ee,ie,we,!0)):(0,k.isWorkspaceBackupInfo)(we)&&!ce.has(we.workspace.configPath)&&ae.push(this.toQuickPick(j,ee,ie,we,!0));const ue=Z.files.map(we=>this.toQuickPick(j,ee,ie,we,!1)),de=Z.workspaces[0],ge=de&&$.isCurrentWorkspace((0,o.isRecentWorkspace)(de)?de.workspace:de.folderUri);let he;const be={type:"separator",label:re?(0,t.localize)(3,null):(0,t.localize)(4,null)},ve={type:"separator",label:(0,t.localize)(5,null)},Ie=[be,...ae,ve,...ue],Se=await G.pick(Ie,{contextKey:e.inRecentFilesPickerContextKey,activeItem:[...ae,...ue][ge?1:0],placeHolder:c.isMacintosh?(0,t.localize)(6,null):(0,t.localize)(7,null),matchOnDescription:!0,onKeyMods:we=>he=we,quickNavigate:this.isQuickNavigate()?{keybindings:J.lookupKeybindings(this.desc.id)}:void 0,hideInput:this.isQuickNavigate(),onDidTriggerItemButton:async we=>{if(we.button===this.removeFromRecentlyOpened)await U.removeRecentlyOpened([we.item.resource]),we.removeItem();else if(we.button===this.dirtyRecentlyOpenedFolder||we.button===this.dirtyRecentlyOpenedWorkspace){const ye=we.button===this.dirtyRecentlyOpenedWorkspace,{confirmed:Re}=await te.confirm({title:ye?(0,t.localize)(8,null):(0,t.localize)(9,null),message:ye?(0,t.localize)(10,null):(0,t.localize)(11,null),detail:ye?(0,t.localize)(12,null):(0,t.localize)(13,null)});Re&&(X.openWindow([we.item.openable],{remoteAuthority:we.item.remoteAuthority||null}),G.cancel())}}});if(Se)return X.openWindow([Se.openable],{forceNewWindow:he?.ctrlCmd,forceReuseWindow:he?.alt,remoteAuthority:Se.remoteAuthority||null})}toQuickPick(H,U,G,$,ie){let J,j,ee,X,te=!1;(0,o.isRecentFolder)($)?(X=$.folderUri,j=(0,u.getIconClasses)(H,U,X,d.FileKind.FOLDER),J={folderUri:X},ee=$.label||G.getWorkspaceLabel(X,{verbose:2})):(0,o.isRecentWorkspace)($)?(X=$.workspace.configPath,j=(0,u.getIconClasses)(H,U,X,d.FileKind.ROOT_FOLDER),J={workspaceUri:X},ee=$.label||G.getWorkspaceLabel($.workspace,{verbose:2}),te=!0):(X=$.fileUri,j=(0,u.getIconClasses)(H,U,X,d.FileKind.FILE),J={fileUri:X},ee=$.label||G.getUriLabel(X));const{name:Z,parentPath:se}=(0,p.splitRecentLabel)(ee);return{iconClasses:j,label:Z,ariaLabel:ie?te?(0,t.localize)(14,null,Z):(0,t.localize)(15,null,Z):Z,description:se,buttons:ie?[te?this.dirtyRecentlyOpenedWorkspace:this.dirtyRecentlyOpenedFolder]:[this.removeFromRecentlyOpened],openable:J,resource:X,remoteAuthority:$.remoteAuthority}}}class R extends L{static{this.ID="workbench.action.openRecent"}constructor(){super({id:R.ID,title:{value:(0,t.localize)(16,null),mnemonicTitle:(0,t.localize)(17,null),original:"Open Recent..."},category:v.Categories.File,f1:!0,keybinding:{weight:200,primary:2096,mac:{primary:304}},menu:{id:b.MenuId.MenubarRecentMenu,group:"y_more",order:1}})}isQuickNavigate(){return!1}}e.OpenRecentAction=R;class M extends L{constructor(){super({id:"workbench.action.quickOpenRecent",title:{value:(0,t.localize)(18,null),original:"Quick Open Recent..."},category:v.Categories.File,f1:!1})}isQuickNavigate(){return!0}}class N extends b.Action2{constructor(){super({id:"workbench.action.toggleFullScreen",title:{value:(0,t.localize)(19,null),mnemonicTitle:(0,t.localize)(20,null),original:"Toggle Full Screen"},category:v.Categories.View,f1:!0,keybinding:{weight:200,primary:69,mac:{primary:2340}},precondition:f.IsIOSContext.toNegated(),toggled:T.IsFullscreenContext,menu:[{id:b.MenuId.MenubarAppearanceMenu,group:"1_toggle_view",order:1}]})}run(H){return H.get(g.IHostService).toggleFullScreen()}}class P extends b.Action2{static{this.ID="workbench.action.reloadWindow"}constructor(){super({id:P.ID,title:{value:(0,t.localize)(21,null),original:"Reload Window"},category:v.Categories.Developer,f1:!0,keybinding:{weight:200+50,when:f.IsDevelopmentContext,primary:2096}})}run(H){return H.get(g.IHostService).reload()}}e.ReloadWindowAction=P;class x extends b.Action2{constructor(){super({id:"workbench.action.showAboutDialog",title:{value:(0,t.localize)(22,null),mnemonicTitle:(0,t.localize)(23,null),original:"About"},category:v.Categories.Help,f1:!0,menu:{id:b.MenuId.MenubarHelpMenu,group:"z_about",order:1,when:f.IsMacNativeContext.toNegated()}})}run(H){return H.get(y.IDialogService).about()}}class F extends b.Action2{constructor(){super({id:"workbench.action.newWindow",title:{value:(0,t.localize)(24,null),mnemonicTitle:(0,t.localize)(25,null),original:"New Window"},f1:!0,keybinding:{weight:200,primary:c.isWeb?c.isWindows?(0,D.KeyChord)(2089,1068):3628:3116,secondary:c.isWeb?[3116]:void 0},menu:{id:b.MenuId.MenubarFileMenu,group:"1_new",order:3}})}run(H){return H.get(g.IHostService).openWindow({remoteAuthority:null})}}class V extends b.Action2{constructor(){super({id:"workbench.action.blur",title:{value:(0,t.localize)(26,null),original:"Remove keyboard focus from focused element"}})}run(){const H=document.activeElement;(0,I.isHTMLElement)(H)&&H.blur()}}(0,b.registerAction2)(F),(0,b.registerAction2)(N),(0,b.registerAction2)(M),(0,b.registerAction2)(R),(0,b.registerAction2)(P),(0,b.registerAction2)(x),(0,b.registerAction2)(V);const W=l.ContextKeyExpr.and(n.inQuickPickContext,l.ContextKeyExpr.has(e.inRecentFilesPickerContextKey)),z="workbench.action.quickOpenNavigateNextInRecentFilesPicker";m.KeybindingsRegistry.registerCommandAndKeybindingRule({id:z,weight:200+50,handler:(0,n.getQuickNavigateHandler)(z,!0),when:W,primary:2096,mac:{primary:304}});const B="workbench.action.quickOpenNavigatePreviousInRecentFilesPicker";m.KeybindingsRegistry.registerCommandAndKeybindingRule({id:B,weight:200+50,handler:(0,n.getQuickNavigateHandler)(B,!1),when:W,primary:3120,mac:{primary:1328}}),_.CommandsRegistry.registerCommand("workbench.action.toggleConfirmBeforeClose",K=>{const H=K.get(A.IConfigurationService),U=H.inspect("window.confirmBeforeClose").userValue;return H.updateValue("window.confirmBeforeClose",U==="never"?"keyboardOnly":"never")}),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarFileMenu,{group:"z_ConfirmClose",command:{id:"workbench.action.toggleConfirmBeforeClose",title:(0,t.localize)(27,null),toggled:l.ContextKeyExpr.notEquals("config.window.confirmBeforeClose","never")},order:1,when:f.IsWebContext}),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarFileMenu,{title:(0,t.localize)(28,null),submenu:b.MenuId.MenubarRecentMenu,group:"2_open",order:4})}),define(Q[3874],Y([1,0,2692,4,138,65,149,44,86]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionEnablementWorkspaceTrustTransitionParticipant=void 0;let m=class extends y.Disposable{constructor(h,a,r,i,s,o){super(),s.isWorkspaceTrustEnabled()&&o.workspaceTrustInitialized.then(()=>{const u=new class{async participate(d){if(d)await i.updateExtensionsEnablementsWhenWorkspaceTrustChanges();else if(r.remoteAuthority)a.reload();else{const p=await h.stopExtensionHosts((0,t.localize)(0,null));await i.updateExtensionsEnablementsWhenWorkspaceTrustChanges(),p&&h.startExtensionHosts()}}};this._register(o.addWorkspaceTrustTransitionParticipant(u))})}};e.ExtensionEnablementWorkspaceTrustTransitionParticipant=m,e.ExtensionEnablementWorkspaceTrustTransitionParticipant=m=fe([O(0,f.IExtensionService),O(1,v.IHostService),O(2,D.IWorkbenchEnvironmentService),O(3,T.IWorkbenchExtensionEnablementService),O(4,b.IWorkspaceTrustEnablementService),O(5,b.IWorkspaceTrustManagementService)],m)}),define(Q[3875],Y([1,0,118,44,28,13,2698,115,23,34,86,4,31,14]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionDependencyChecker=void 0;let i=class extends h.Disposable{constructor(o,u,d,p){super(),this.extensionService=o,this.extensionsWorkbenchService=u,this.notificationService=d,this.hostService=p,b.CommandsRegistry.registerCommand("workbench.extensions.installMissingDependencies",()=>this.installMissingDependencies()),D.MenuRegistry.appendMenuItem(D.MenuId.CommandPalette,{command:{id:"workbench.extensions.installMissingDependencies",category:(0,T.localize)(0,null),title:(0,T.localize)(1,null)}})}async getUninstalledMissingDependencies(){const o=await this.getAllMissingDependencies(),u=await this.extensionsWorkbenchService.queryLocal();return o.filter(d=>u.every(p=>!(0,f.areSameExtensions)(p.identifier,{id:d})))}async getAllMissingDependencies(){await this.extensionService.whenInstalledExtensionsRegistered();const o=this.extensionService.extensions.reduce((d,p)=>(d.add(p.identifier.value.toLowerCase()),d),new Set),u=new Set;for(const d of this.extensionService.extensions)d.extensionDependencies&&d.extensionDependencies.forEach(p=>{o.has(p.toLowerCase())||u.add(p)});return[...u.values()]}async installMissingDependencies(){const o=await this.getUninstalledMissingDependencies();if(o.length){const u=await this.extensionsWorkbenchService.getExtensions(o.map(d=>({id:d})),a.CancellationToken.None);u.length&&(await r.Promises.settled(u.map(d=>this.extensionsWorkbenchService.install(d))),this.notificationService.notify({severity:v.Severity.Info,message:(0,T.localize)(2,null),actions:{primary:[new m.Action("realod",(0,T.localize)(3,null),"",!0,()=>this.hostService.reload())]}}))}else this.notificationService.info((0,T.localize)(4,null))}};e.ExtensionDependencyChecker=i,e.ExtensionDependencyChecker=i=fe([O(0,y.IExtensionService),O(1,t.IExtensionsWorkbenchService),O(2,v.INotificationService),O(3,S.IHostService)],i)}),define(Q[3876],Y([1,0,6,39,4,525,25,26,9,68,21,64,152,189,72,31,14,86,722,150,30]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerService=e.UNDO_REDO_SOURCE=void 0,e.UNDO_REDO_SOURCE=new r.UndoRedoSource;let n=class{static{l=this}static{this.EXPLORER_FILE_CHANGES_REACT_DELAY=500}constructor(C,I,_,A,k,L,R,M,N,P,x){this.fileService=C,this.configurationService=I,this.contextService=_,this.clipboardService=A,this.editorService=k,this.uriIdentityService=L,this.bulkEditService=R,this.progressService=M,this.filesConfigurationService=P,this.telemetryService=x,this.disposables=new b.DisposableStore,this.fileChangeEvents=[],this.config=this.configurationService.getValue("explorer"),this.model=new D.ExplorerModel(this.contextService,this.uriIdentityService,this.fileService,this.configurationService,this.filesConfigurationService),this.disposables.add(this.model),this.disposables.add(this.fileService.onDidRunOperation(F=>this.onDidRunOperation(F))),this.onFileChangesScheduler=new o.RunOnceScheduler(async()=>{const F=this.fileChangeEvents;this.fileChangeEvents=[];const V=[2];this.config.sortOrder==="modified"&&V.push(0);let W=!1;this.roots.forEach(z=>{this.view&&!W&&(W=g(z,this.view,F,V))}),F.forEach(z=>{if(!W)for(const B of z.rawAdded){const K=this.model.findClosest((0,f.dirname)(B));if(K&&!K.getChild((0,f.basename)(B))){W=!0;break}}}),W&&await this.refresh(!1)},l.EXPLORER_FILE_CHANGES_REACT_DELAY),this.disposables.add(this.fileService.onDidFilesChange(F=>{this.fileChangeEvents.push(F),!this.editable&&(this.onFileChangesScheduler.isScheduled()||this.onFileChangesScheduler.schedule())})),this.disposables.add(this.configurationService.onDidChangeConfiguration(F=>this.onConfigurationUpdated(F))),this.disposables.add(t.Event.any(this.fileService.onDidChangeFileSystemProviderRegistrations,this.fileService.onDidChangeFileSystemProviderCapabilities)(async F=>{let V=!1;this.model.roots.forEach(W=>{W.resource.scheme===F.scheme&&(V=!0,W.forgetChildren())}),V&&this.view&&await this.view.setTreeInput()})),this.disposables.add(this.model.onDidChangeRoots(()=>{this.view?.setTreeInput()})),this.disposables.add(N.onDidChangeFocus(F=>{F&&this.refresh(!1)})),this.revealExcludeMatcher=new d.ResourceGlobMatcher(F=>w(I.getValue({resource:F})),F=>F.affectsConfiguration("explorer.autoRevealExclude"),_,I),this.disposables.add(this.revealExcludeMatcher)}get roots(){return this.model.roots}get sortOrderConfiguration(){return{sortOrder:this.config.sortOrder,lexicographicOptions:this.config.sortOrderLexicographicOptions}}registerView(C){this.view=C}getContext(C,I=!1){if(!this.view)return[];const _=new Set(this.view.getContext(C));return _.forEach(A=>{try{if(C&&!I&&this.view?.isItemCollapsed(A)&&A.nestedChildren)for(const k of A.nestedChildren)_.add(k)}catch{return}}),[..._]}async applyBulkEdit(C,I){const _=new s.CancellationTokenSource,A=this.progressService.withProgress({location:I.progressLocation||10,title:I.progressLabel,cancellable:C.length>1,delay:500},async k=>{await this.bulkEditService.apply(C,{undoRedoSource:e.UNDO_REDO_SOURCE,label:I.undoLabel,code:"undoredo.explorerOperation",progress:k,token:_.token,confirmBeforeUndo:I.confirmBeforeUndo})},()=>_.cancel());await this.progressService.withProgress({location:1,delay:500},()=>A),_.dispose()}hasViewFocus(){return!!this.view&&this.view.hasFocus()}findClosest(C){return this.model.findClosest(C)}findClosestRoot(C){const I=this.model.roots.filter(_=>this.uriIdentityService.extUri.isEqualOrParent(C,_.resource)).sort((_,A)=>A.resource.path.length-_.resource.path.length);return I.length?I[0]:null}async setEditable(C,I){if(!this.view)return;I?this.editable={stat:C,data:I}:this.editable=void 0;const _=this.isEditable(C);try{await this.view.setEditable(C,_)}catch{const A=C.parent,k={parentIsDirectory:A?.isDirectory,isDirectory:C.isDirectory,isReadonly:!!C.isReadonly,parentIsReadonly:!!A?.isReadonly,parentIsExcluded:A?.isExcluded,isExcluded:C.isExcluded,parentIsRoot:A?.isRoot,isRoot:C.isRoot,parentHasNests:A?.hasNests,hasNests:C.hasNests};this.telemetryService.publicLogError2("explorerView.setEditableError",k);return}!this.editable&&this.fileChangeEvents.length&&!this.onFileChangesScheduler.isScheduled()&&this.onFileChangesScheduler.schedule()}async setToCopy(C,I){const _=this.cutItems;this.cutItems=I?C:void 0,await this.clipboardService.writeResources(C.map(A=>A.resource)),this.view?.itemsCopied(C,I,_)}isCut(C){return!!this.cutItems&&this.cutItems.some(I=>this.uriIdentityService.extUri.isEqual(I.resource,C.resource))}getEditable(){return this.editable}getEditableData(C){return this.editable&&this.editable.stat===C?this.editable.data:void 0}isEditable(C){return!!this.editable&&(this.editable.stat===C||!C)}async select(C,I){if(!this.view)return;const _=I==="force",A=this.findClosest(C);if(A)return this.shouldAutoRevealItem(A,_)?(await this.view.selectResource(A.resource,I),Promise.resolve(void 0)):void 0;const k={resolveTo:[C],resolveMetadata:this.config.sortOrder==="modified"},L=this.findClosestRoot(C);if(L)try{const R=await this.fileService.resolve(L.resource,k),M=D.ExplorerItem.create(this.fileService,this.configurationService,this.filesConfigurationService,R,void 0,k.resolveTo);D.ExplorerItem.mergeLocalWithDisk(M,L);const N=L.find(C);if(await this.view.refresh(!0,L),N&&!this.shouldAutoRevealItem(N,_))return;await this.view.selectResource(N?N.resource:void 0,I)}catch(R){L.error=R,await this.view.refresh(!1,L)}}async refresh(C=!0){if(this.model.roots.forEach(I=>I.forgetChildren()),this.view){await this.view.refresh(!0);const I=this.editorService.activeEditor?.resource,_=this.configurationService.getValue().explorer.autoReveal;C&&I&&_&&this.select(I,_)}}async onDidRunOperation(C){const I=this.config.fileNesting.enabled;if(C.isOperation(0)||C.isOperation(3)){const _=C.target,A=(0,f.dirname)(_.resource),k=this.model.findAll(A);k.length&&await Promise.all(k.map(async L=>{const R=this.config.sortOrder==="modified";if(!L.isDirectoryResolved){const N=await this.fileService.resolve(L.resource,{resolveMetadata:R});if(N){const P=D.ExplorerItem.create(this.fileService,this.configurationService,this.filesConfigurationService,N,L.parent);D.ExplorerItem.mergeLocalWithDisk(P,L)}}const M=D.ExplorerItem.create(this.fileService,this.configurationService,this.filesConfigurationService,_,L.parent);L.removeChild(M),L.addChild(M),await this.view?.refresh(I,L)}))}else if(C.isOperation(2)){const _=C.resource,A=C.target,k=(0,f.dirname)(_),L=(0,f.dirname)(A.resource),R=this.model.findAll(_);if(R.every(N=>!N.nestedParent)&&this.uriIdentityService.extUri.isEqual(k,L))await Promise.all(R.map(async N=>{N.rename(A),await this.view?.refresh(I,N.parent)}));else{const N=this.model.findAll(L);N.length&&R.length&&await Promise.all(R.map(async(P,x)=>{const F=P.parent,V=P.nestedParent;P.move(N[x]),V&&await this.view?.refresh(!1,V),await this.view?.refresh(!1,F),await this.view?.refresh(I,N[x])}))}}else if(C.isOperation(1)){const _=this.model.findAll(C.resource);await Promise.all(_.map(async A=>{if(A.parent){const k=A.parent;k.removeChild(A);const L=A.nestedParent;L&&(L.removeChild(A),await this.view?.refresh(!1,L)),await this.view?.refresh(I,k)}}))}}shouldAutoRevealItem(C,I){if(C===void 0||I)return!0;if(this.revealExcludeMatcher.matches(C.resource,k=>!!(C.parent&&C.parent.getChild(k))))return!1;const _=C.root;let A=C.parent;for(;A!==_;){if(A===void 0)return!0;if(this.revealExcludeMatcher.matches(A.resource))return!1;A=A.parent}return!0}async onConfigurationUpdated(C){if(!C.affectsConfiguration("explorer"))return;let I=!1;C.affectsConfiguration("explorer.fileNesting")&&(I=!0);const _=this.configurationService.getValue(),A=_?.explorer?.sortOrder||"default";this.config.sortOrder!==A&&(I=this.config.sortOrder!==void 0);const k=_?.explorer?.sortOrderLexicographicOptions||"default";this.config.sortOrderLexicographicOptions!==k&&(I=I||this.config.sortOrderLexicographicOptions!==void 0),this.config=_.explorer,I&&await this.refresh()}dispose(){this.disposables.dispose()}};e.ExplorerService=n,e.ExplorerService=n=l=fe([O(0,T.IFileService),O(1,v.IConfigurationService),O(2,y.IWorkspaceContextService),O(3,m.IClipboardService),O(4,S.IEditorService),O(5,h.IUriIdentityService),O(6,a.IBulkEditService),O(7,i.IProgressService),O(8,u.IHostService),O(9,p.IFilesConfigurationService),O(10,c.ITelemetryService)],n);function g(E,C,I,_){for(const[A,k]of E.children)if(C.isItemVisible(k)&&(I.some(L=>L.contains(k.resource,..._))||k.isDirectory&&k.isDirectoryResolved&&g(k,C,I,_)))return!0;return!1}function w(E){const C=E&&E.explorer&&E.explorer.autoRevealExclude;return C||{}}}),define(Q[3877],Y([1,0,2740,4,10,9,39,69,23,41,55,64,86,960]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceWatcher=void 0;let i=class extends y.Disposable{constructor(o,u,d,p,c,l,n){super(),this.fileService=o,this.configurationService=u,this.contextService=d,this.notificationService=p,this.openerService=c,this.uriIdentityService=l,this.hostService=n,this.watchedWorkspaces=new f.ResourceMap(g=>this.uriIdentityService.extUri.getComparisonKey(g)),this.registerListeners(),this.refresh()}registerListeners(){this._register(this.contextService.onDidChangeWorkspaceFolders(o=>this.onDidChangeWorkspaceFolders(o))),this._register(this.contextService.onDidChangeWorkbenchState(()=>this.onDidChangeWorkbenchState())),this._register(this.configurationService.onDidChangeConfiguration(o=>this.onDidChangeConfiguration(o))),this._register(this.fileService.onDidWatchError(o=>this.onDidWatchError(o)))}onDidChangeWorkspaceFolders(o){for(const u of o.removed)this.unwatchWorkspace(u);for(const u of o.added)this.watchWorkspace(u)}onDidChangeWorkbenchState(){this.refresh()}onDidChangeConfiguration(o){(o.affectsConfiguration("files.watcherExclude")||o.affectsConfiguration("files.watcherInclude"))&&this.refresh()}onDidWatchError(o){const u=o.toString();u.indexOf("ENOSPC")>=0?this.notificationService.prompt(v.Severity.Warning,(0,t.localize)(0,null),[{label:(0,t.localize)(1,null),run:()=>this.openerService.open(b.URI.parse("https://go.microsoft.com/fwlink/?linkid=867693"))}],{sticky:!0,neverShowAgain:{id:"ignoreEnospcError",isSecondary:!0,scope:v.NeverShowAgainScope.WORKSPACE}}):u.indexOf("EUNKNOWN")>=0&&this.notificationService.prompt(v.Severity.Warning,(0,t.localize)(2,null),[{label:(0,t.localize)(3,null),run:()=>this.hostService.reload()}],{sticky:!0,priority:v.NotificationPriority.SILENT})}watchWorkspace(o){const u=[],d=this.configurationService.getValue({resource:o.uri});if(d.files?.watcherExclude)for(const l in d.files.watcherExclude)d.files.watcherExclude[l]===!0&&u.push(l);const p=new f.ResourceMap(l=>this.uriIdentityService.extUri.getComparisonKey(l));if(p.set(o.uri,o.uri),d.files?.watcherInclude){for(const l of d.files.watcherInclude)if(l)if((0,S.isAbsolute)(l)){const n=b.URI.file(l).with({scheme:o.uri.scheme});this.uriIdentityService.extUri.isEqualOrParent(n,o.uri)&&p.set(n,n)}else{const n=o.toResource(l);p.set(n,n)}}const c=new y.DisposableStore;for(const[,l]of p)c.add(this.fileService.watch(l,{recursive:!0,excludes:u}));this.watchedWorkspaces.set(o.uri,c)}unwatchWorkspace(o){this.watchedWorkspaces.has(o.uri)&&((0,y.dispose)(this.watchedWorkspaces.get(o.uri)),this.watchedWorkspaces.delete(o.uri))}refresh(){this.unwatchWorkspaces();for(const o of this.contextService.getWorkspace().folders)this.watchWorkspace(o)}unwatchWorkspaces(){for(const[,o]of this.watchedWorkspaces)o.dispose();this.watchedWorkspaces.clear()}dispose(){super.dispose(),this.unwatchWorkspaces()}};e.WorkspaceWatcher=i,e.WorkspaceWatcher=i=fe([O(0,r.IWorkbenchFileService),O(1,D.IConfigurationService),O(2,T.IWorkspaceContextService),O(3,v.INotificationService),O(4,m.IOpenerService),O(5,h.IUriIdentityService),O(6,a.IHostService)],i)}),define(Q[3878],Y([1,0,6,86,100,35,61,65,332,4,3211,139,327]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let r=class extends S.NativeHostService{constructor(o,u){super(o.window.id,u)}};r=fe([O(0,h.INativeWorkbenchEnvironmentService),O(1,a.IMainProcessService)],r);let i=class extends m.Disposable{constructor(o,u,d){super(),this.nativeHostService=o,this.labelService=u,this.environmentService=d,this._onDidChangeFocus=t.Event.latch(t.Event.any(t.Event.map(t.Event.filter(this.nativeHostService.onDidFocusWindow,p=>p===this.nativeHostService.windowId),()=>this.hasFocus),t.Event.map(t.Event.filter(this.nativeHostService.onDidBlurWindow,p=>p===this.nativeHostService.windowId),()=>this.hasFocus)),void 0,this._store)}get onDidChangeFocus(){return this._onDidChangeFocus}get hasFocus(){return document.hasFocus()}async hadLastFocus(){const o=await this.nativeHostService.getActiveWindowId();return typeof o>"u"?!1:o===this.nativeHostService.windowId}openWindow(o,u){return Array.isArray(o)?this.doOpenWindow(o,u):this.doOpenEmptyWindow(o)}doOpenWindow(o,u){const d=this.environmentService.remoteAuthority;return d&&(o.forEach(p=>p.label=p.label||this.getRecentLabel(p)),u?.remoteAuthority===void 0&&(u=u?{...u,remoteAuthority:d}:{remoteAuthority:d})),this.nativeHostService.openWindow(o,u)}getRecentLabel(o){return(0,v.isFolderToOpen)(o)?this.labelService.getWorkspaceLabel(o.folderUri,{verbose:2}):(0,v.isWorkspaceToOpen)(o)?this.labelService.getWorkspaceLabel({id:"",configPath:o.workspaceUri},{verbose:2}):this.labelService.getUriLabel(o.fileUri)}doOpenEmptyWindow(o){const u=this.environmentService.remoteAuthority;return u&&o?.remoteAuthority===void 0&&(o=o?{...o,remoteAuthority:u}:{remoteAuthority:u}),this.nativeHostService.openWindow(o)}toggleFullScreen(){return this.nativeHostService.toggleFullScreen()}focus(o){return this.nativeHostService.focusWindow(o)}restart(){return this.nativeHostService.relaunch()}reload(o){return this.nativeHostService.reload(o)}close(){return this.nativeHostService.closeWindow()}async withExpectedShutdown(o){return await o()}};i=fe([O(0,b.INativeHostService),O(1,T.ILabelService),O(2,f.IWorkbenchEnvironmentService)],i),(0,D.registerSingleton)(y.IHostService,i,1),(0,D.registerSingleton)(b.INativeHostService,r,1)}),define(Q[193],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IHoverService=void 0,e.IHoverService=(0,t.createDecorator)("hoverService")}),define(Q[3879],Y([1,0,7,67,576,14,4,50,2867,28,116,120,333,245,193]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIndicatorsLabelAriaLabel=e.SettingsTreeIndicatorsLabel=void 0;const s=t.$;let o=new Set,u=[],d=class{constructor(w,E,C,I,_,A,k){this.configurationService=E,this.hoverService=C,this.userDataSyncEnablementService=I,this.languageService=_,this.userDataProfilesService=A,this.commandService=k,this.keybindingListeners=new T.DisposableStore,this.focusedIndex=0,this.defaultHoverOptions={hoverPosition:2,showPointer:!0,compact:!1,trapFocus:!0},this.indicatorsContainerElement=t.append(w,s(".setting-indicators-container")),this.indicatorsContainerElement.style.display="inline",this.profilesEnabled=this.userDataProfilesService.isEnabled(),this.workspaceTrustIndicator=this.createWorkspaceTrustIndicator(),this.scopeOverridesIndicator=this.createScopeOverridesIndicator(),this.syncIgnoredIndicator=this.createSyncIgnoredIndicator(),this.defaultOverrideIndicator=this.createDefaultOverrideIndicator(),this.allIndicators=[this.workspaceTrustIndicator,this.scopeOverridesIndicator,this.syncIgnoredIndicator,this.defaultOverrideIndicator]}addHoverDisposables(w,E,C){w.clear();const I=w.add(new D.RunOnceScheduler(()=>{const _=C(!1);_&&w.add(_)},this.configurationService.getValue("workbench.hover.delay")));w.add(t.addDisposableListener(E,t.EventType.MOUSE_OVER,()=>{I.isScheduled()||I.schedule()})),w.add(t.addDisposableListener(E,t.EventType.MOUSE_LEAVE,()=>{I.cancel()})),w.add(t.addDisposableListener(E,t.EventType.KEY_DOWN,_=>{const A=new y.StandardKeyboardEvent(_);if(A.equals(10)||A.equals(3)){const k=C(!0);k&&w.add(k),_.preventDefault()}}))}createWorkspaceTrustIndicator(){const w=s("span.setting-indicator.setting-item-workspace-trust"),E=new b.SimpleIconLabel(w);E.text="$(warning) "+(0,v.localize)(0,null);const C=(0,v.localize)(1,null),I=new T.DisposableStore,_=A=>this.hoverService.showHover({...this.defaultHoverOptions,content:C,target:w,actions:[{label:(0,v.localize)(2,null),commandId:"workbench.trust.manage",run:k=>{this.commandService.executeCommand("workbench.trust.manage")}}]},A);return this.addHoverDisposables(I,w,_),{element:w,label:E,disposables:I}}createScopeOverridesIndicator(){const w=s("span.setting-item-overrides"),E=new b.SimpleIconLabel(w);return{element:w,label:E,disposables:new T.DisposableStore}}createSyncIgnoredIndicator(){const w=s("span.setting-indicator.setting-item-ignored"),E=new b.SimpleIconLabel(w);E.text=(0,v.localize)(3,null);const C=(0,v.localize)(4,null),I=new T.DisposableStore,_=A=>this.hoverService.showHover({...this.defaultHoverOptions,content:C,target:w},A);return this.addHoverDisposables(I,w,_),{element:w,label:E,disposables:new T.DisposableStore}}createDefaultOverrideIndicator(){const w=s("span.setting-indicator.setting-item-default-overridden"),E=new b.SimpleIconLabel(w);return E.text=(0,v.localize)(5,null),{element:w,label:E,disposables:new T.DisposableStore}}render(){const w=this.allIndicators.filter(E=>E.element.style.display!=="none");if(this.indicatorsContainerElement.innerText="",this.indicatorsContainerElement.style.display="none",w.length){this.indicatorsContainerElement.style.display="inline",t.append(this.indicatorsContainerElement,s("span",void 0,"("));for(let E=0;E<w.length-1;E++)t.append(this.indicatorsContainerElement,w[E].element),t.append(this.indicatorsContainerElement,s("span.comma",void 0," \u2022 "));t.append(this.indicatorsContainerElement,w[w.length-1].element),t.append(this.indicatorsContainerElement,s("span",void 0,")")),this.resetIndicatorNavigationKeyBindings(w)}}resetIndicatorNavigationKeyBindings(w){if(this.keybindingListeners.clear(),this.indicatorsContainerElement.role=w.length>=1?"toolbar":"button",!w.length)return;const E=w[0].focusElement??w[0].element;E.tabIndex=0,this.keybindingListeners.add(t.addDisposableListener(this.indicatorsContainerElement,"keydown",C=>{const I=new y.StandardKeyboardEvent(C);let _=!0;if(I.equals(14))this.focusIndicatorAt(w,0);else if(I.equals(13))this.focusIndicatorAt(w,w.length-1);else if(I.equals(17)){const A=(this.focusedIndex+1)%w.length;this.focusIndicatorAt(w,A)}else if(I.equals(15)){const A=this.focusedIndex?this.focusedIndex-1:w.length-1;this.focusIndicatorAt(w,A)}else _=!1;_&&(C.preventDefault(),C.stopPropagation())}))}focusIndicatorAt(w,E){if(E===this.focusedIndex)return;const C=w[E],I=C.focusElement??C.element;I.tabIndex=0,I.focus();const _=w[this.focusedIndex],A=_.focusElement??_.element;A.tabIndex=-1,this.focusedIndex=E}updateWorkspaceTrust(w){this.workspaceTrustIndicator.element.style.display=w.isUntrusted?"inline":"none",this.render()}updateSyncIgnored(w,E){this.syncIgnoredIndicator.element.style.display=this.userDataSyncEnablementService.isEnabled()&&E.includes(w.setting.key)?"inline":"none",this.render(),u!==E&&(u=E,o=new Set(u))}getInlineScopeDisplayText(w){const[E,C]=w.split(":"),I=E==="user"?(0,v.localize)(6,null):E==="workspace"?(0,v.localize)(7,null):(0,v.localize)(8,null);return C?`${this.languageService.getLanguageName(C)} > ${I}`:I}dispose(){this.keybindingListeners.dispose();for(const w of this.allIndicators)w.disposables.dispose()}updateScopeOverrides(w,E,C){if(this.scopeOverridesIndicator.element.innerText="",this.scopeOverridesIndicator.element.style.display="none",this.scopeOverridesIndicator.focusElement=this.scopeOverridesIndicator.element,w.hasPolicyValue){this.scopeOverridesIndicator.element.style.display="inline",this.scopeOverridesIndicator.element.classList.add("setting-indicator"),this.scopeOverridesIndicator.label.text="$(warning) "+(0,v.localize)(9,null);const I=(0,v.localize)(10,null),_=A=>this.hoverService.showHover({...this.defaultHoverOptions,content:I,actions:[{label:(0,v.localize)(11,null),commandId:"_settings.action.viewPolicySettings",run:k=>{C.fire(`@${a.POLICY_SETTING_TAG}`)}}],target:this.scopeOverridesIndicator.element},A);this.addHoverDisposables(this.scopeOverridesIndicator.disposables,this.scopeOverridesIndicator.element,_)}else if(this.profilesEnabled&&w.settingsTarget===3&&this.configurationService.isSettingAppliedForAllProfiles(w.setting.key)){this.scopeOverridesIndicator.element.style.display="inline",this.scopeOverridesIndicator.element.classList.add("setting-indicator"),this.scopeOverridesIndicator.label.text=(0,v.localize)(12,null);const I=(0,v.localize)(13,null),_=A=>this.hoverService.showHover({...this.defaultHoverOptions,content:I,target:this.scopeOverridesIndicator.element},A);this.addHoverDisposables(this.scopeOverridesIndicator.disposables,this.scopeOverridesIndicator.element,_)}else if(w.overriddenScopeList.length||w.overriddenDefaultsLanguageList.length)if(w.overriddenScopeList.length===1&&!w.overriddenDefaultsLanguageList.length){this.scopeOverridesIndicator.element.style.display="inline",this.scopeOverridesIndicator.element.classList.remove("setting-indicator"),this.scopeOverridesIndicator.disposables.clear();const I=w.isConfigured?(0,v.localize)(14,null):(0,v.localize)(15,null);this.scopeOverridesIndicator.label.text=`${I} `;const _=w.overriddenScopeList[0],A=t.append(this.scopeOverridesIndicator.element,s("a.modified-scope",void 0,this.getInlineScopeDisplayText(_)));A.tabIndex=-1,this.scopeOverridesIndicator.focusElement=A;const k=L=>{const[R,M]=_.split(":");E.fire({settingKey:w.setting.key,scope:R,language:M}),L.preventDefault(),L.stopPropagation()};this.scopeOverridesIndicator.disposables.add(t.addDisposableListener(A,t.EventType.CLICK,L=>{k(L)})),this.scopeOverridesIndicator.disposables.add(t.addDisposableListener(A,t.EventType.KEY_DOWN,L=>{const R=new y.StandardKeyboardEvent(L);(R.equals(10)||R.equals(3))&&k(L)}))}else{this.scopeOverridesIndicator.element.style.display="inline",this.scopeOverridesIndicator.element.classList.add("setting-indicator");const I=w.isConfigured?(0,v.localize)(16,null):(0,v.localize)(17,null);this.scopeOverridesIndicator.label.text=I;let _="";if(w.overriddenScopeList.length){_=w.isConfigured?(0,v.localize)(18,null):(0,v.localize)(19,null);for(const R of w.overriddenScopeList){const M=this.getInlineScopeDisplayText(R);_+=` - [${M}](${encodeURIComponent(R)} "${c(R,this.languageService)}")`}}if(w.overriddenDefaultsLanguageList.length){_&&(_+=` `);const L=(0,v.localize)(20,null);_+=L;for(const R of w.overriddenDefaultsLanguageList){const M=this.languageService.getLanguageName(R);_+=` - [${M}](${encodeURIComponent(`default:${R}`)} "${M}")`}}const A={value:_,isTrusted:!1,supportHtml:!1},k=L=>this.hoverService.showHover({...this.defaultHoverOptions,content:A,linkHandler:R=>{const[M,N]=decodeURIComponent(R).split(":");E.fire({settingKey:w.setting.key,scope:M,language:N})},target:this.scopeOverridesIndicator.element},L);this.addHoverDisposables(this.scopeOverridesIndicator.disposables,this.scopeOverridesIndicator.element,k)}this.render()}updateDefaultOverrideIndicator(w){this.defaultOverrideIndicator.element.style.display="none";const E=p(w);if(E!==void 0){this.defaultOverrideIndicator.element.style.display="inline",this.defaultOverrideIndicator.disposables.clear();const C=(0,v.localize)(21,null,E),I=_=>this.hoverService.showHover({content:C,target:this.defaultOverrideIndicator.element,hoverPosition:2,showPointer:!0,compact:!1},_);this.addHoverDisposables(this.defaultOverrideIndicator.disposables,this.defaultOverrideIndicator.element,I)}this.render()}};e.SettingsTreeIndicatorsLabel=d,e.SettingsTreeIndicatorsLabel=d=fe([O(1,r.IWorkbenchConfigurationService),O(2,i.IHoverService),O(3,h.IUserDataSyncEnablementService),O(4,f.ILanguageService),O(5,S.IUserDataProfilesService),O(6,m.ICommandService)],d);function p(g){let w;const E=g.defaultValueSource;return E&&(typeof E!="string"?w=E.displayName??E.id:typeof E=="string"&&(w=E)),w}function c(g,w){const[E,C]=g.split(":"),I=E==="user"?(0,v.localize)(22,null):E==="workspace"?(0,v.localize)(23,null):(0,v.localize)(24,null);return C?(0,v.localize)(25,null,I,w.getLanguageName(C)):I}function l(g,w){const[E,C]=g.split(":"),I=E==="user"?(0,v.localize)(26,null):E==="workspace"?(0,v.localize)(27,null):(0,v.localize)(28,null);return C?(0,v.localize)(29,null,I.toLowerCase(),w.getLanguageName(C)):I}function n(g,w,E,C){const I=[];if(g.isUntrusted&&I.push((0,v.localize)(30,null)),g.hasPolicyValue)I.push((0,v.localize)(31,null));else if(E.isEnabled()&&g.settingsTarget===3&&w.isSettingAppliedForAllProfiles(g.setting.key))I.push((0,v.localize)(32,null));else{const L=g.isConfigured?(0,v.localize)(33,null):(0,v.localize)(34,null),R=g.overriddenScopeList.map(M=>l(M,C)).join(", ");g.overriddenScopeList.length&&I.push(`${L} ${R}`)}o.has(g.setting.key)&&I.push((0,v.localize)(35,null));const _=p(g);_!==void 0&&I.push((0,v.localize)(36,null,_));const A=g.overriddenDefaultsLanguageList.map(L=>C.getLanguageName(L)).join(", ");if(g.overriddenDefaultsLanguageList.length){const L=(0,v.localize)(37,null,A);I.push(L)}return I.join(". ")}e.getIndicatorsLabelAriaLabel=n}),define(Q[3880],Y([1,0,4,142,7,193,9]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalHover=void 0;const f=b.$;let v=class extends t.Disposable{constructor(h,a,r,i,s,o){super(),this._targetOptions=h,this._text=a,this._actions=r,this._linkHandler=i,this._hoverService=s,this._configurationService=o,this.id="hover"}dispose(){super.dispose()}attach(h){if(!this._configurationService.getValue("terminal.integrated.showLinkHover"))return;const r=new m(h,this._targetOptions),i=this._hoverService.showHover({target:r,content:this._text,actions:this._actions,linkHandler:this._linkHandler,additionalClasses:["xterm-hover"]});i&&this._register(i)}};e.TerminalHover=v,e.TerminalHover=v=fe([O(4,D.IHoverService),O(5,T.IConfigurationService)],v);class m extends y.Widget{get targetElements(){return this._targetElements}constructor(h,a){super(),this._options=a,this._targetElements=[],this._domNode=f("div.terminal-hover-targets.xterm-hover");const r=this._options.viewportRange.end.y-this._options.viewportRange.start.y+1,i=(this._options.viewportRange.end.y>this._options.viewportRange.start.y?this._options.terminalDimensions.width-this._options.viewportRange.start.x:this._options.viewportRange.end.x-this._options.viewportRange.start.x+1)*this._options.cellDimensions.width,s=f("div.terminal-hover-target.hoverHighlight");if(s.style.left=`${this._options.viewportRange.start.x*this._options.cellDimensions.width}px`,s.style.bottom=`${(this._options.terminalDimensions.height-this._options.viewportRange.start.y-1)*this._options.cellDimensions.height}px`,s.style.width=`${i}px`,s.style.height=`${this._options.cellDimensions.height}px`,this._targetElements.push(this._domNode.appendChild(s)),r>2){const o=f("div.terminal-hover-target.hoverHighlight");o.style.left="0px",o.style.bottom=`${(this._options.terminalDimensions.height-this._options.viewportRange.start.y-1-(r-2))*this._options.cellDimensions.height}px`,o.style.width=`${this._options.terminalDimensions.width*this._options.cellDimensions.width}px`,o.style.height=`${(r-2)*this._options.cellDimensions.height}px`,this._targetElements.push(this._domNode.appendChild(o))}if(r>1){const o=f("div.terminal-hover-target.hoverHighlight");o.style.left="0px",o.style.bottom=`${(this._options.terminalDimensions.height-this._options.viewportRange.end.y-1)*this._options.cellDimensions.height}px`,o.style.width=`${(this._options.viewportRange.end.x+1)*this._options.cellDimensions.width}px`,o.style.height=`${this._options.cellDimensions.height}px`,this._targetElements.push(this._domNode.appendChild(o))}if(this._options.modifierDownCallback&&this._options.modifierUpCallback){let o=!1;this._register(b.addDisposableListener(document,"keydown",u=>{u.ctrlKey&&!o&&(o=!0,this._options.modifierDownCallback())})),this._register(b.addDisposableListener(document,"keyup",u=>{u.ctrlKey||(o=!1,this._options.modifierUpCallback())}))}h.appendChild(this._domNode)}dispose(){this._domNode?.parentElement?.removeChild(this._domNode),super.dispose()}}}),define(Q[1372],Y([1,0,7,14,260,110,4,2969,9,29,193]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateLayout=e.TerminalDecorationHoverManager=e.DecorationSelector=void 0;var h;(function(s){s[s.DefaultDimension=16]="DefaultDimension",s[s.MarginLeft=-17]="MarginLeft"})(h||(h={}));var a;(function(s){s.CommandDecoration="terminal-command-decoration",s.Hide="hide",s.ErrorColor="error",s.DefaultColor="default-color",s.Default="default",s.Codicon="codicon",s.XtermDecoration="xterm-decoration",s.OverviewRuler=".xterm-decoration-overview-ruler",s.QuickFix="quick-fix"})(a||(e.DecorationSelector=a={}));let r=class extends T.Disposable{constructor(o,u,d){super(),this._hoverService=o,this._contextMenuVisible=!1,this._register(d.onDidShowContextMenu(()=>this._contextMenuVisible=!0)),this._register(d.onDidHideContextMenu(()=>this._contextMenuVisible=!1)),this._hoverDelayer=this._register(new y.Delayer(u.getValue("workbench.hover.delay")))}hideHover(){this._hoverDelayer.cancel(),this._hoverService.hideHover()}createHover(o,u,d){return(0,T.combinedDisposable)(t.addDisposableListener(o,t.EventType.MOUSE_ENTER,()=>{this._contextMenuVisible||this._hoverDelayer.trigger(()=>{let p=`${(0,f.localize)(0,null)}`;if(p+=` --- `,u)if(u.markProperties||d)if(u.markProperties?.hoverMessage||d)p=u.markProperties?.hoverMessage||d||"";else return;else u.exitCode?u.exitCode===-1?p+=(0,f.localize)(1,null,(0,b.fromNow)(u.timestamp,!0)):p+=(0,f.localize)(2,null,(0,b.fromNow)(u.timestamp,!0),u.exitCode):p+=(0,f.localize)(3,null,(0,b.fromNow)(u.timestamp,!0));else if(d)p=d;else return;this._hoverService.showHover({content:new D.MarkdownString(p),target:o})})}),t.addDisposableListener(o,t.EventType.MOUSE_LEAVE,()=>this.hideHover()),t.addDisposableListener(o,t.EventType.MOUSE_OUT,()=>this.hideHover()))}};e.TerminalDecorationHoverManager=r,e.TerminalDecorationHoverManager=r=fe([O(0,S.IHoverService),O(1,v.IConfigurationService),O(2,m.IContextMenuService)],r);function i(s,o){if(!o)return;const u=s.inspect("terminal.integrated.fontSize").value,d=s.inspect("terminal.integrated.fontSize").defaultValue,p=s.inspect("terminal.integrated.lineHeight").value;if(typeof u=="number"&&typeof d=="number"&&typeof p=="number"){const c=u/d<=1?u/d:1;o.style.width=`${c*16}px`,o.style.height=`${c*16*p}px`,o.style.fontSize=`${c*16}px`,o.style.marginLeft=`${c*-17}px`}}e.updateLayout=i}),define(Q[3881],Y([1,0,6,4,7,20,2988,9,41,1372,30,31,44,220,1201,1196,61,22,737,259,32,37,28]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getQuickFixesForCommand=e.TerminalQuickFixAddon=void 0;const g=["quick-fix","codicon","terminal-command-decoration","xterm-decoration"];let w=class extends y.Disposable{constructor(L,R,M,N,P,x,F,V,W,z,B){super(),this._aliases=L,this._capabilities=R,this._quickFixService=M,this._commandService=N,this._configurationService=P,this._audioCueService=x,this._openerService=F,this._telemetryService=V,this._extensionService=W,this._actionWidgetService=z,this._labelService=B,this._onDidRequestRerunCommand=new t.Emitter,this.onDidRequestRerunCommand=this._onDidRequestRerunCommand.event,this._commandListeners=new Map,this._registeredSelectors=new Set,this._capabilities.get(2)?this._registerCommandHandlers():this._register(this._capabilities.onDidAddCapabilityType(H=>{H===2&&this._registerCommandHandlers()})),this._register(this._quickFixService.onDidRegisterProvider(H=>this.registerCommandFinishedListener(C(H)))),this._quickFixService.extensionQuickFixes.then(H=>{for(const U of H)this.registerCommandSelector(U)}),this._register(this._quickFixService.onDidRegisterCommandSelector(H=>this.registerCommandSelector(H))),this._register(this._quickFixService.onDidUnregisterProvider(H=>this._commandListeners.delete(H)))}activate(L){this._terminal=L}showMenu(){if(!this._currentRenderContext)return;const L=this._currentRenderContext.quickFixes.map(P=>new I(P,P.type,P.source,P.label,P.kind)),M={documentation:this._currentRenderContext.quickFixes.map(P=>({id:P.source,title:P.label,tooltip:P.source})),allActions:L,hasAutoFix:!1,validActions:L,dispose:()=>{}},N={onSelect:async P=>{P.action?.run(),this._actionWidgetService.hide(),this._disposeQuickFix(P.action.id,!0)},onHide:()=>{this._terminal?.focus()}};this._actionWidgetService.show("quickFixWidget",!1,_(M.validActions,!0),N,this._currentRenderContext.anchor,this._currentRenderContext.parentElement)}registerCommandSelector(L){if(this._registeredSelectors.has(L.id))return;const R=L.commandLineMatcher.toString(),M=this._commandListeners.get(R)||[];M.push({id:L.id,type:"unresolved",commandLineMatcher:L.commandLineMatcher,outputMatcher:L.outputMatcher,commandExitResult:L.commandExitResult,kind:L.kind}),this._registeredSelectors.add(L.id),this._commandListeners.set(R,M)}registerCommandFinishedListener(L){const R=L.commandLineMatcher.toString();let M=this._commandListeners.get(R)||[];M=M.filter(N=>N.id!==L.id),M.push(L),this._commandListeners.set(R,M)}_registerCommandHandlers(){const L=this._terminal,R=this._capabilities.get(2);!L||!R||this._register(R.onCommandFinished(async M=>await this._resolveQuickFixes(M,this._aliases)))}async _resolveQuickFixes(L,R){const M=this._terminal;if(!M||L.wasReplayed)return;L.command!==""&&this._lastQuickFixId&&this._disposeQuickFix(this._lastQuickFixId,!1);const N=async(x,F)=>{if(F===void 0)return;const V=x.id;return await this._extensionService.activateByEvent(`onTerminalQuickFixRequest:${V}`),this._quickFixService.providers.get(V)?.provideTerminalQuickFixes(L,F,{type:"resolved",commandLineMatcher:x.commandLineMatcher,outputMatcher:x.outputMatcher,commandExitResult:x.commandExitResult,kind:x.kind,id:x.id},new h.CancellationTokenSource().token)},P=await E(R,M,L,this._commandListeners,this._commandService,this._openerService,this._labelService,this._onDidRequestRerunCommand,N);P&&(this._quickFixes=P,this._lastQuickFixId=this._quickFixes[0].id,this._registerQuickFixDecoration())}_disposeQuickFix(L,R){this._telemetryService?.publicLog2("terminal/quick-fix",{quickFixId:L,ranQuickFix:R}),this._decoration?.dispose(),this._decoration=void 0,this._quickFixes=void 0,this._lastQuickFixId=void 0}_registerQuickFixDecoration(){if(!this._terminal||!this._quickFixes)return;const L=this._terminal.registerMarker();if(!L)return;const R=this._terminal.registerDecoration({marker:L,layer:"top"});if(!R)return;this._decoration=R;const M=this._quickFixes;if(!M){R.dispose();return}R?.onRender(N=>{const P=N.getBoundingClientRect(),x={x:P.x,y:P.y,width:P.width,height:P.height};if(N.classList.contains("quick-fix")){this._currentRenderContext&&(this._currentRenderContext.anchor=x);return}N.classList.add(...g);const F=M.every(W=>W.kind==="explain");F&&N.classList.add("explainOnly"),N.classList.add(...l.ThemeIcon.asClassNameArray(F?c.Codicon.sparkle:c.Codicon.lightBulb)),(0,m.updateLayout)(this._configurationService,N),this._audioCueService.playAudioCue(r.AudioCue.terminalQuickFix);const V=N.parentElement?.parentElement?.parentElement?.parentElement;V&&(this._currentRenderContext={quickFixes:M,anchor:x,parentElement:V},this._register(b.addDisposableListener(N,b.EventType.CLICK,()=>this.showMenu())))}),R.onDispose(()=>this._currentRenderContext=void 0),this._quickFixes=void 0}};e.TerminalQuickFixAddon=w,e.TerminalQuickFixAddon=w=fe([O(2,d.ITerminalQuickFixService),O(3,n.ICommandService),O(4,f.IConfigurationService),O(5,r.IAudioCueService),O(6,v.IOpenerService),O(7,S.ITelemetryService),O(8,a.IExtensionService),O(9,i.IActionWidgetService),O(10,o.ILabelService)],w);async function E(k,L,R,M,N,P,x,F,V){const W=new Set,z=new Set,B=[],K=R.command;for(const H of M.values())for(const U of H){if(U.commandExitResult==="success"&&R.exitCode!==0||U.commandExitResult==="error"&&R.exitCode===0)continue;let G;if(U.type==="resolved")G=await U.getQuickFixes(R,(0,s.getLinesForCommand)(L.buffer.active,R,L.cols,U.outputMatcher),U,new h.CancellationTokenSource().token);else if(U.type==="unresolved"){if(!V)throw new Error("No resolved fix provider");G=await V(U,U.outputMatcher?(0,s.getLinesForCommand)(L.buffer.active,R,L.cols,U.outputMatcher):void 0)}else if(U.type==="internal"){const $=K.match(U.commandLineMatcher);if(!$)continue;const ie=U.outputMatcher;let J;if(ie&&(J=R.getOutputMatch(ie)),!J)continue;const j={commandLineMatch:$,outputMatch:J,commandLine:R.command};G=U.getQuickFixes(j)}if(G)for(const $ of(0,D.asArray)(G)){let ie;if("type"in $){switch($.type){case d.TerminalQuickFixType.TerminalCommand:{const J=$;if(W.has(J.terminalCommand))continue;W.add(J.terminalCommand);const j=(0,T.localize)(0,null,J.terminalCommand);ie={type:d.TerminalQuickFixType.TerminalCommand,kind:U.kind,class:void 0,source:$.source,id:$.id,label:j,enabled:!0,run:()=>{F?.fire({command:J.terminalCommand,addNewLine:J.addNewLine??!0})},tooltip:j,command:J.terminalCommand};break}case d.TerminalQuickFixType.Opener:{const J=$;if(!J.uri)return;if(z.has(J.uri.toString()))continue;z.add(J.uri.toString());const ee=J.uri.scheme===u.Schemas.http||J.uri.scheme===u.Schemas.https?encodeURI(J.uri.toString(!0)):x.getUriLabel(J.uri),X=(0,T.localize)(1,null,ee);ie={source:$.source,id:$.id,label:X,type:d.TerminalQuickFixType.Opener,kind:U.kind,class:void 0,enabled:!0,run:()=>P.open(J.uri),tooltip:X,uri:J.uri};break}case d.TerminalQuickFixType.Port:{const J=$;ie={source:"builtin",type:J.type,kind:U.kind,id:J.id,label:J.label,class:J.class,enabled:J.enabled,run:()=>{J.run()},tooltip:J.tooltip};break}case d.TerminalQuickFixType.VscodeCommand:{const J=$;ie={source:$.source,type:J.type,kind:U.kind,id:J.id,label:J.title,class:void 0,enabled:!0,run:()=>N.executeCommand(J.id),tooltip:J.title};break}}ie&&B.push(ie)}}}return B.length>0?B:void 0}e.getQuickFixesForCommand=E;function C(k){return{id:k.selector.id,type:"resolved",commandLineMatcher:k.selector.commandLineMatcher,outputMatcher:k.selector.outputMatcher,commandExitResult:k.selector.commandExitResult,kind:k.selector.kind,getQuickFixes:k.provider.provideTerminalQuickFixes}}class I{constructor(L,R,M,N,P="fix"){this.action=L,this.type=R,this.source=M,this.title=N,this.kind=P,this.disabled=!1}}function _(k,L){const R=[];R.push({kind:"header",group:{kind:p.CodeActionKind.QuickFix,title:(0,T.localize)(2,null)}});for(const M of L?k:k.filter(N=>!!N.action))!M.disabled&&M.action&&R.push({kind:"action",item:M,group:{kind:p.CodeActionKind.QuickFix,icon:A(M),title:M.action.label},disabled:!1,label:M.title});return R}function A(k){if(k.kind==="explain")return c.Codicon.sparkle;switch(k.type){case d.TerminalQuickFixType.Opener:if("uri"in k.action&&k.action.uri)return k.action.uri.scheme===u.Schemas.http||k.action.uri.scheme===u.Schemas.https?c.Codicon.linkExternal:c.Codicon.goToFile;case d.TerminalQuickFixType.TerminalCommand:return c.Codicon.run;case d.TerminalQuickFixType.Port:return c.Codicon.debugDisconnect;case d.TerminalQuickFixType.VscodeCommand:return c.Codicon.lightbulb}}}),define(Q[3882],Y([1,0,4,6,7,38,9,133,827,142,41,5,209,110,3082,18,66,87]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverWidget=void 0;const d=b.$;var p;(function(g){g[g.PointerSize=3]="PointerSize",g[g.HoverBorderWidth=2]="HoverBorderWidth",g[g.HoverWindowEdgeMargin=2]="HoverWindowEdgeMargin"})(p||(p={}));let c=class extends m.Widget{get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(w){this._isLocked!==w&&(this._isLocked=w,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(w,E,C,I,_,A){super(),this._keybindingService=E,this._configurationService=C,this._openerService=I,this._instantiationService=_,this._accessibilityService=A,this._messageListeners=new t.DisposableStore,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new y.Emitter),this._onRequestLayout=this._register(new y.Emitter),this._linkHandler=w.linkHandler||(P=>(0,a.openLinkFromMarkdown)(this._openerService,P,(0,r.isMarkdownString)(w.content)?w.content.isTrusted:void 0)),this._target="targetElements"in w.target?w.target:new n(w.target),this._hoverPointer=w.showPointer?d("div.workbench-hover-pointer"):void 0,this._hover=this._register(new v.HoverWidget),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),w.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),w.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),w.additionalClasses&&this._hover.containerDomNode.classList.add(...w.additionalClasses),w.forcePosition&&(this._forcePosition=!0),w.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=w.hoverPosition??3,this.onmousedown(this._hover.containerDomNode,P=>P.stopPropagation()),this.onkeydown(this._hover.containerDomNode,P=>{P.equals(9)&&this.dispose()}),this._register(b.addDisposableListener(window,"blur",()=>this.dispose()));const k=d("div.hover-row.markdown-hover"),L=d("div.hover-contents");if(typeof w.content=="string")L.textContent=w.content,L.style.whiteSpace="pre-wrap";else if(w.content instanceof HTMLElement)L.appendChild(w.content),L.classList.add("html-hover-contents");else{const P=w.content,x=this._instantiationService.createInstance(a.MarkdownRenderer,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||f.EDITOR_FONT_DEFAULTS.fontFamily}),{element:F}=x.render(P,{actionHandler:{callback:V=>this._linkHandler(V),disposables:this._messageListeners},asyncRenderCallback:()=>{L.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});L.appendChild(F)}if(k.appendChild(L),this._hover.contentsDomNode.appendChild(k),w.actions&&w.actions.length>0){const P=d("div.hover-row.status-bar"),x=d("div.actions");w.actions.forEach(F=>{const V=this._keybindingService.lookupKeybinding(F.commandId),W=V?V.getLabel():null;v.HoverAction.render(x,{label:F.label,commandId:F.commandId,run:z=>{F.run(z),this.dispose()},iconClass:F.iconClass},W)}),P.appendChild(x),this._hover.containerDomNode.appendChild(P)}this._hoverContainer=d("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);let R;if(w.actions&&w.actions.length>0?R=!1:w.hideOnHover===void 0?R=typeof w.content=="string"||(0,r.isMarkdownString)(w.content)&&!w.content.value.includes("](")&&!w.content.value.includes("</a>"):R=w.hideOnHover,R&&w.showHoverHint){const P=d("div.hover-row.status-bar"),x=d("div.info");x.textContent=(0,i.localize)(0,null,s.isMacintosh?"Option":"Alt"),P.appendChild(x),this._hover.containerDomNode.appendChild(P)}const M=[...this._target.targetElements];R||M.push(this._hoverContainer);const N=this._register(new l(M));if(this._register(N.onMouseOut(()=>{this._isLocked||this.dispose()})),R){const P=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new l(P)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=N}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;const w=this._hover.containerDomNode,E=this.findLastFocusableChild(this._hover.containerDomNode);if(E){const C=b.prepend(this._hoverContainer,d("div")),I=b.append(this._hoverContainer,d("div"));C.tabIndex=0,I.tabIndex=0,this._register(b.addDisposableListener(I,"focus",_=>{w.focus(),_.preventDefault()})),this._register(b.addDisposableListener(C,"focus",_=>{E.focus(),_.preventDefault()}))}}findLastFocusableChild(w){if(w.hasChildNodes())for(let E=0;E<w.childNodes.length;E++){const C=w.childNodes.item(w.childNodes.length-E-1);if(C.nodeType===C.ELEMENT_NODE){const _=C;if(typeof _.tabIndex=="number"&&_.tabIndex>=0)return _}const I=this.findLastFocusableChild(C);if(I)return I}}render(w){w.appendChild(this._hoverContainer);const E=(0,v.getHoverAccessibleViewHint)(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel());E&&(0,u.status)(E),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const w=M=>{const N=b.getDomNodeZoomLevel(M),P=M.getBoundingClientRect();return{top:P.top*N,bottom:P.bottom*N,right:P.right*N,left:P.left*N}},E=this._target.targetElements.map(M=>w(M)),C=Math.min(...E.map(M=>M.top)),I=Math.max(...E.map(M=>M.right)),_=Math.max(...E.map(M=>M.bottom)),A=Math.min(...E.map(M=>M.left)),k=I-A,L=_-C,R={top:C,right:I,bottom:_,left:A,width:k,height:L,center:{x:A+k/2,y:C+L/2}};if(this.adjustHorizontalHoverPosition(R),this.adjustVerticalHoverPosition(R),this.adjustHoverMaxHeight(R),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:R.left+=3,R.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:R.left-=3,R.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:R.top+=3,R.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:R.top-=3,R.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px";break}R.center.x=R.left+k/2,R.center.y=R.top+L/2}this.computeXCordinate(R),this.computeYCordinate(R),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(R)),this._hover.onContentsChanged()}computeXCordinate(w){const E=this._hover.containerDomNode.clientWidth+2;this._target.x!==void 0?this._x=this._target.x:this._hoverPosition===1?this._x=w.right:this._hoverPosition===0?this._x=w.left-E:(this._hoverPointer?this._x=w.center.x-this._hover.containerDomNode.clientWidth/2:this._x=w.left,this._x+E>=document.documentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(document.documentElement.clientWidth-E-2,document.documentElement.clientLeft))),this._x<document.documentElement.clientLeft&&(this._x=w.left+2)}computeYCordinate(w){this._target.y!==void 0?this._y=this._target.y:this._hoverPosition===3?this._y=w.top:this._hoverPosition===2?this._y=w.bottom-2:this._hoverPointer?this._y=w.center.y+this._hover.containerDomNode.clientHeight/2:this._y=w.bottom,this._y>window.innerHeight&&(this._y=w.bottom)}adjustHorizontalHoverPosition(w){if(this._target.x===void 0){if(this._forcePosition){const E=(this._hoverPointer?3:0)+2;this._hoverPosition===1?this._hover.containerDomNode.style.maxWidth=`${document.documentElement.clientWidth-w.right-E}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${w.left-E}px`);return}this._hoverPosition===1?document.documentElement.clientWidth-w.right<this._hover.containerDomNode.clientWidth&&(w.left>=this._hover.containerDomNode.clientWidth?this._hoverPosition=0:this._hoverPosition=2):this._hoverPosition===0&&(w.left<this._hover.containerDomNode.clientWidth&&(document.documentElement.clientWidth-w.right>=this._hover.containerDomNode.clientWidth?this._hoverPosition=1:this._hoverPosition=2),w.left-this._hover.containerDomNode.clientWidth<=document.documentElement.clientLeft&&(this._hoverPosition=1))}}adjustVerticalHoverPosition(w){this._target.y!==void 0||this._forcePosition||(this._hoverPosition===3?w.top-this._hover.containerDomNode.clientHeight<0&&(this._hoverPosition=2):this._hoverPosition===2&&w.bottom+this._hover.containerDomNode.clientHeight>window.innerHeight&&(this._hoverPosition=3))}adjustHoverMaxHeight(w){let E=window.innerHeight/2;if(this._forcePosition){const C=(this._hoverPointer?3:0)+2;this._hoverPosition===3?E=Math.min(E,w.top-C):this._hoverPosition===2&&(E=Math.min(E,window.innerHeight-w.bottom-C))}if(this._hover.containerDomNode.style.maxHeight=`${E}px`,this._hover.contentsDomNode.clientHeight<this._hover.contentsDomNode.scrollHeight){const C=`${this._hover.scrollbar.options.verticalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingRight!==C&&(this._hover.contentsDomNode.style.paddingRight=C)}}setHoverPointerPosition(w){if(this._hoverPointer)switch(this._hoverPosition){case 0:case 1:{this._hoverPointer.classList.add(this._hoverPosition===0?"right":"left");const E=this._hover.containerDomNode.clientHeight;E>w.height?this._hoverPointer.style.top=`${w.center.y-(this._y-E)-3}px`:this._hoverPointer.style.top=`${Math.round(E/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(this._hoverPosition===3?"bottom":"top");const E=this._hover.containerDomNode.clientWidth;let C=Math.round(E/2)-3;const I=this._x+C;(I<w.left||I>w.right)&&(C=w.center.x-this._x-3),this._hoverPointer.style.left=`${C}px`;break}}}focus(){this._hover.containerDomNode.focus()}hide(){this.dispose()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};e.HoverWidget=c,e.HoverWidget=c=fe([O(1,D.IKeybindingService),O(2,T.IConfigurationService),O(3,S.IOpenerService),O(4,h.IInstantiationService),O(5,o.IAccessibilityService)],c);class l extends m.Widget{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(w){super(),this._elements=w,this._isMouseIn=!0,this._onMouseOut=this._register(new y.Emitter),this._elements.forEach(E=>this.onmouseover(E,()=>this._onTargetMouseOver())),this._elements.forEach(E=>this.onmouseleave(E,()=>this._onTargetMouseLeave()))}_onTargetMouseOver(){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout()}_onTargetMouseLeave(){this._isMouseIn=!1,this._evaluateMouseState()}_evaluateMouseState(){this._clearEvaluateMouseStateTimeout(),this._mouseTimeout=window.setTimeout(()=>this._fireIfMouseOutside(),0)}_clearEvaluateMouseStateTimeout(){this._mouseTimeout&&(clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}}class n{constructor(w){this._element=w,this.targetElements=[this._element]}dispose(){}}}),define(Q[3883],Y([1,0,35,19,36,193,29,5,3882,4,7,38,67,66,1846]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverService=void 0;let i=class{constructor(d,p,c,l,n){this._instantiationService=d,this._contextViewService=p,this._keybindingService=l,this._accessibilityService=n,c.onDidShowContextMenu(()=>this.hideHover())}showHover(d,p,c){if(s(this._currentHoverOptions)===s(d))return;this._currentHoverOptions=d,this._lastHoverOptions=d;const l=d.trapFocus||this._accessibilityService.isScreenReaderOptimized();c||(l&&document.activeElement?this._lastFocusedElementBeforeOpen=document.activeElement:this._lastFocusedElementBeforeOpen=void 0);const n=new m.DisposableStore,g=this._instantiationService.createInstance(v.HoverWidget,d);g.onDispose(()=>{this._lastFocusedElementBeforeOpen?.focus(),this._currentHoverOptions===d&&(this._currentHoverOptions=void 0),n.dispose()});const w=this._contextViewService;if(w.showContextView(new o(g,p),d.container),g.onRequestLayout(()=>w.layout()),"targetElements"in d.target)for(const C of d.target.targetElements)n.add((0,S.addDisposableListener)(C,S.EventType.CLICK,()=>this.hideHover()));else n.add((0,S.addDisposableListener)(d.target,S.EventType.CLICK,()=>this.hideHover()));const E=document.activeElement;if(E&&(n.add((0,S.addDisposableListener)(E,S.EventType.KEY_DOWN,C=>this._keyDown(C,g,!!d.hideOnKeyDown))),n.add((0,S.addDisposableListener)(document,S.EventType.KEY_DOWN,C=>this._keyDown(C,g,!!d.hideOnKeyDown))),n.add((0,S.addDisposableListener)(E,S.EventType.KEY_UP,C=>this._keyUp(C,g))),n.add((0,S.addDisposableListener)(document,S.EventType.KEY_UP,C=>this._keyUp(C,g)))),"IntersectionObserver"in window){const C=new IntersectionObserver(_=>this._intersectionChange(_,g),{threshold:0}),I="targetElements"in d.target?d.target.targetElements[0]:d.target;C.observe(I),n.add((0,m.toDisposable)(()=>C.disconnect()))}return this._currentHover=g,g}hideHover(){this._currentHover?.isLocked||!this._currentHoverOptions||(this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewService.hideContextView())}_intersectionChange(d,p){d[d.length-1].isIntersecting||p.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showHover(this._lastHoverOptions,!0,!0)}_keyDown(d,p,c){if(d.key==="Alt"){p.isLocked=!0;return}const l=new a.StandardKeyboardEvent(d);this._keybindingService.resolveKeyboardEvent(l).getSingleModifierDispatchChords().some(g=>!!g)||this._keybindingService.softDispatch(l,l.target).kind!==0||c&&(!this._currentHoverOptions?.trapFocus||d.key!=="Tab")&&(this.hideHover(),this._lastFocusedElementBeforeOpen?.focus())}_keyUp(d,p){d.key==="Alt"&&(p.isLocked=!1,p.isMouseIn||(this.hideHover(),this._lastFocusedElementBeforeOpen?.focus()))}};e.HoverService=i,e.HoverService=i=fe([O(0,f.IInstantiationService),O(1,T.IContextViewService),O(2,T.IContextMenuService),O(3,h.IKeybindingService),O(4,r.IAccessibilityService)],i);function s(u){if(u!==void 0)return u?.id??u}class o{get anchorPosition(){return this._hover.anchor}constructor(d,p=!1){this._hover=d,this._focus=p}render(d){return this._hover.render(d),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}}(0,t.registerSingleton)(D.IHoverService,i,1),(0,y.registerThemingParticipant)((u,d)=>{const p=u.getColor(b.editorHoverBorder);p&&(d.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${p.transparent(.5)}; }`),d.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${p.transparent(.5)}; }`))})}),define(Q[965],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IIntegrityService=void 0,e.IIntegrityService=(0,t.createDecorator)("integrityService")}),define(Q[426],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkbenchIssueService=void 0,e.IWorkbenchIssueService=(0,t.createDecorator)("workbenchIssueService")}),define(Q[3884],Y([1,0,4,10,53,60,426]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadIssueReporter=void 0;let f=class extends t.Disposable{constructor(m,S){super(),this._issueService=S,this._registrations=this._register(new t.DisposableMap),this._proxy=m.getProxy(b.ExtHostContext.ExtHostIssueReporter)}$registerIssueUriRequestHandler(m){const S={provideIssueUrl:async h=>{const a=await this._proxy.$getIssueReporterUri(m,h);return y.URI.from(a)}};this._registrations.set(m,this._issueService.registerIssueUriRequestHandler(m,S))}$unregisterIssueUriRequestHandler(m){this._registrations.deleteAndDispose(m)}};e.MainThreadIssueReporter=f,e.MainThreadIssueReporter=f=fe([(0,D.extHostNamedCustomer)(b.MainContext.MainThreadIssueReporter),O(1,T.IWorkbenchIssueService)],f)}),define(Q[3885],Y([1,0,2712,34,426]),function(q,e,t,y,b){"use strict";var D;Object.defineProperty(e,"__esModule",{value:!0}),e.ReportExtensionIssueAction=void 0;let T=class extends y.Action{static{D=this}static{this._id="workbench.extensions.action.reportExtensionIssue"}static{this._label=t.localize(0,null)}constructor(v,m){super(D._id,D._label,"extension-action report-issue"),this.extension=v,this.issueService=m,this.enabled=v.isBuiltin||!!v.repository&&!!v.repository.url}async run(){await this.issueService.openReporter({extensionId:this.extension.identifier.value})}};e.ReportExtensionIssueAction=T,e.ReportExtensionIssueAction=T=D=fe([O(1,b.IWorkbenchIssueService)],T)}),define(Q[966],Y([1,0,2720,34,30,5,118,19,44,29,23,8,24,61,1348,65,3885,1351,62,10,25,100,695,68]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";var w,E;Object.defineProperty(e,"__esModule",{value:!0}),e.SaveExtensionHostProfileAction=e.StopExtensionHostProfileAction=e.StartExtensionHostProfileAction=e.RuntimeExtensionsEditor=e.ProfileSessionState=e.CONTEXT_EXTENSION_HOST_PROFILE_RECORDED=e.CONTEXT_PROFILE_SESSION_STATE=e.IExtensionHostProfileService=void 0,e.IExtensionHostProfileService=(0,D.createDecorator)("extensionHostProfileService"),e.CONTEXT_PROFILE_SESSION_STATE=new h.RawContextKey("profileSessionState","none"),e.CONTEXT_EXTENSION_HOST_PROFILE_RECORDED=new h.RawContextKey("extensionHostProfileRecorded",!1);var C;(function(L){L[L.None=0]="None",L[L.Starting=1]="Starting",L[L.Running=2]="Running",L[L.Stopping=3]="Stopping"})(C||(e.ProfileSessionState=C={}));let I=class extends u.AbstractRuntimeExtensionsEditor{constructor(R,M,N,P,x,F,V,W,z,B,K,H,U){super(R,M,N,P,x,F,V,W,z,B,K,H),this._extensionHostProfileService=U,this._profileInfo=this._extensionHostProfileService.lastProfile,this._extensionsHostRecorded=e.CONTEXT_EXTENSION_HOST_PROFILE_RECORDED.bindTo(N),this._profileSessionState=e.CONTEXT_PROFILE_SESSION_STATE.bindTo(N),this._register(this._extensionHostProfileService.onDidChangeLastProfile(()=>{this._profileInfo=this._extensionHostProfileService.lastProfile,this._extensionsHostRecorded.set(!!this._profileInfo),this._updateExtensions()})),this._register(this._extensionHostProfileService.onDidChangeState(()=>{const G=this._extensionHostProfileService.state;this._profileSessionState.set(C[G].toLowerCase())}))}_getProfileInfo(){return this._profileInfo}_getUnresponsiveProfile(R){return this._extensionHostProfileService.getUnresponsiveProfile(R)}_createSlowExtensionAction(R){return R.unresponsiveProfile?this._instantiationService.createInstance(i.SlowExtensionAction,R.description,R.unresponsiveProfile):null}_createReportExtensionIssueAction(R){return R.marketplaceInfo?this._instantiationService.createInstance(o.ReportExtensionIssueAction,R.description):null}_createSaveExtensionHostProfileAction(){return this._instantiationService.createInstance(k,k.ID,k.LABEL)}_createProfileAction(){return this._extensionHostProfileService.state===C.Running?this._instantiationService.createInstance(A,A.ID,A.LABEL):this._instantiationService.createInstance(_,_.ID,_.LABEL)}};e.RuntimeExtensionsEditor=I,e.RuntimeExtensionsEditor=I=fe([O(0,b.ITelemetryService),O(1,f.IThemeService),O(2,h.IContextKeyService),O(3,T.IExtensionsWorkbenchService),O(4,v.IExtensionService),O(5,S.INotificationService),O(6,m.IContextMenuService),O(7,D.IInstantiationService),O(8,a.IStorageService),O(9,r.ILabelService),O(10,s.IWorkbenchEnvironmentService),O(11,g.IClipboardService),O(12,e.IExtensionHostProfileService)],I);let _=class extends y.Action{static{w=this}static{this.ID="workbench.extensions.action.extensionHostProfile"}static{this.LABEL=t.localize(0,null)}constructor(R=w.ID,M=w.LABEL,N){super(R,M),this._extensionHostProfileService=N}run(){return this._extensionHostProfileService.startProfiling(),Promise.resolve()}};e.StartExtensionHostProfileAction=_,e.StartExtensionHostProfileAction=_=w=fe([O(2,e.IExtensionHostProfileService)],_);let A=class extends y.Action{static{this.ID="workbench.extensions.action.stopExtensionHostProfile"}static{this.LABEL=t.localize(1,null)}constructor(R=_.ID,M=_.LABEL,N){super(R,M),this._extensionHostProfileService=N}run(){return this._extensionHostProfileService.stopProfiling(),Promise.resolve()}};e.StopExtensionHostProfileAction=A,e.StopExtensionHostProfileAction=A=fe([O(2,e.IExtensionHostProfileService)],A);let k=class extends y.Action{static{E=this}static{this.LABEL=t.localize(2,null)}static{this.ID="workbench.extensions.action.saveExtensionHostProfile"}constructor(R=E.ID,M=E.LABEL,N,P,x,F){super(R,M,void 0,!1),this._nativeHostService=N,this._environmentService=P,this._extensionHostProfileService=x,this._fileService=F,this._extensionHostProfileService.onDidChangeLastProfile(()=>{this.enabled=this._extensionHostProfileService.lastProfile!==null})}run(){return Promise.resolve(this._asyncRun())}async _asyncRun(){const R=await this._nativeHostService.showSaveDialog({title:t.localize(3,null),buttonLabel:t.localize(4,null),defaultPath:`CPU-${new Date().toISOString().replace(/[\-:]/g,"")}.cpuprofile`,filters:[{name:"CPU Profiles",extensions:["cpuprofile","txt"]}]});if(!R||!R.filePath||R.canceled)return;const M=this._extensionHostProfileService.lastProfile;let N=M?M.data:{},P=R.filePath;return this._environmentService.isBuilt&&(N=n.Utils.rewriteAbsolutePaths(N,"piiRemoved"),P=P+".txt"),this._fileService.writeFile(p.URI.file(P),d.VSBuffer.fromString(JSON.stringify(M?M.data:{},null," ")))}};e.SaveExtensionHostProfileAction=k,e.SaveExtensionHostProfileAction=k=E=fe([O(2,l.INativeHostService),O(3,s.IWorkbenchEnvironmentService),O(4,e.IExtensionHostProfileService),O(5,c.IFileService)],k)}),define(Q[3886],Y([1,0,2756,81,13,28,52,426]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseIssueContribution=void 0;const v="workbench.action.openIssueReporter",m="vscode.openIssueReporter",S={description:"Open the issue reporter and optionally prefill part of the form.",args:[{name:"options",description:"Data to use to prefill the issue reporter with.",isOptional:!0,schema:{oneOf:[{type:"string",description:"The extension id to preselect."},{type:"object",properties:{extensionId:{type:"string"},issueTitle:{type:"string"},issueBody:{type:"string"}}}]}}]};let h=class{constructor(r){if(!r.reportIssueUrl)return;D.CommandsRegistry.registerCommand({id:v,handler:function(s,o){const u=typeof o=="string"?{extensionId:o}:Array.isArray(o)?{extensionId:o[0]}:o??{};return s.get(f.IWorkbenchIssueService).openReporter(u)},description:S}),D.CommandsRegistry.registerCommand({id:m,handler:function(s,o){const u=typeof o=="string"?{extensionId:o}:Array.isArray(o)?{extensionId:o[0]}:o??{};return s.get(f.IWorkbenchIssueService).openReporter(u)},description:S});const i={id:v,title:{value:(0,t.localize)(0,null),original:"Report Issue..."},category:y.Categories.Help};b.MenuRegistry.appendMenuItem(b.MenuId.CommandPalette,{command:i}),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarHelpMenu,{group:"3_feedback",command:{id:v,title:(0,t.localize)(1,null)},order:3})}};e.BaseIssueContribution=h,e.BaseIssueContribution=h=fe([O(0,T.IProductService)],h)}),define(Q[3887],Y([1,0,153,865]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerMainProcessRemoteService)(y.IIssueMainService,"issue")}),define(Q[1373],Y([1,0,28,20,48,13]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAllUnboundCommands=void 0;function T(f){const v=[],m=new Map,S=(h,a)=>{if(!m.has(h)&&(m.set(h,!0),!(h[0]==="_"||h.indexOf("vscode.")===0)&&f.get(h)!==!0)){if(!a){const r=t.CommandsRegistry.getCommand(h);if(r&&typeof r.description=="object"&&(0,y.isNonEmptyArray)(r.description.args))return}v.push(h)}};for(const h of D.MenuRegistry.getMenuItems(D.MenuId.CommandPalette))(0,D.isIMenuItem)(h)&&S(h.command.id,!0);for(const h of b.EditorExtensionsRegistry.getEditorActions())S(h.id,!0);for(const h of t.CommandsRegistry.getCommands().keys())S(h,!1);return v}e.getAllUnboundCommands=T}),define(Q[3888],Y([1,0,321,3190]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FallbackKeyboardMapper=void 0;class b{constructor(T,f){this._mapAltGrToCtrlAlt=T,this._OS=f}dumpDebugInfo(){return"FallbackKeyboardMapper dispatching on keyCode"}resolveKeyboardEvent(T){const f=T.ctrlKey||this._mapAltGrToCtrlAlt&&T.altGraphKey,v=T.altKey||this._mapAltGrToCtrlAlt&&T.altGraphKey,m=new t.KeyCodeChord(f,T.shiftKey,v,T.metaKey,T.keyCode);return this.resolveKeybinding(new t.Keybinding([m]))[0]}resolveKeybinding(T){return y.USLayoutResolvedKeybinding.resolveKeybinding(T,this._OS)}}e.FallbackKeyboardMapper=b}),define(Q[3889],Y([1,0,782,8]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputBuilder=e.KeybindingIO=void 0;class b{static writeKeybindingItem(v,m){if(!m.resolvedKeybinding)return;const S=JSON.stringify(m.resolvedKeybinding.getUserSettingsLabel());v.write(`{ "key": ${D(S+",",25)} "command": `);const h=m.when?JSON.stringify(m.when.serialize()):"",a=JSON.stringify(m.command);h.length>0?(v.write(`${a},`),v.writeLine(),v.write(` "when": ${h}`)):v.write(`${a}`),m.commandArgs&&(v.write(","),v.writeLine(),v.write(` "args": ${JSON.stringify(m.commandArgs)}`)),v.write(" }")}static readUserKeybindingItem(v){const m="key"in v&&typeof v.key=="string"?t.KeybindingParser.parseKeybinding(v.key):null,S="when"in v&&typeof v.when=="string"?y.ContextKeyExpr.deserialize(v.when):void 0,h="command"in v&&typeof v.command=="string"?v.command:null,a="args"in v&&typeof v.args<"u"?v.args:void 0;return{keybinding:m,command:h,commandArgs:a,when:S,_sourceKey:"key"in v&&typeof v.key=="string"?v.key:void 0}}}e.KeybindingIO=b;function D(f,v){return f.length<v?f+new Array(v-f.length).join(" "):f}class T{constructor(){this._lines=[],this._currentLine=""}write(v){this._currentLine+=v}writeLine(v=""){this._lines.push(this._currentLine+v),this._currentLine=""}toString(){return this.writeLine(),this._lines.join(` `)}}e.OutputBuilder=T}),define(Q[3890],Y([1,0,105,321,866]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MacLinuxKeyboardMapper=e.NativeResolvedKeybinding=void 0;const D=[];class T extends b.BaseResolvedKeybinding{constructor(a,r,i){super(r,i),this._mapper=a}_getLabel(a){return this._mapper.getUILabelForScanCodeChord(a)}_getAriaLabel(a){return this._mapper.getAriaLabelForScanCodeChord(a)}_getElectronAccelerator(a){return this._mapper.getElectronAcceleratorLabelForScanCodeChord(a)}_getUserSettingsLabel(a){return this._mapper.getUserSettingsLabelForScanCodeChord(a)}_isWYSIWYG(a){if(!a||t.IMMUTABLE_CODE_TO_KEY_CODE[a.scanCode]!==-1)return!0;const r=this._mapper.getAriaLabelForScanCodeChord(a),i=this._mapper.getUserSettingsLabelForScanCodeChord(a);return!r&&!i?!0:!r||!i?!1:r.toLowerCase()===i.toLowerCase()}_getChordDispatch(a){return this._mapper.getDispatchStrForScanCodeChord(a)}_getSingleModifierChordDispatch(a){return(a.scanCode===157||a.scanCode===161)&&!a.shiftKey&&!a.altKey&&!a.metaKey?"ctrl":(a.scanCode===159||a.scanCode===163)&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey?"alt":(a.scanCode===158||a.scanCode===162)&&!a.ctrlKey&&!a.altKey&&!a.metaKey?"shift":(a.scanCode===160||a.scanCode===164)&&!a.ctrlKey&&!a.shiftKey&&!a.altKey?"meta":null}}e.NativeResolvedKeybinding=T;class f{constructor(a,r,i,s){this.ctrlKey=a,this.shiftKey=r,this.altKey=i,this.scanCode=s}toString(){return`${this.ctrlKey?"Ctrl+":""}${this.shiftKey?"Shift+":""}${this.altKey?"Alt+":""}${t.ScanCodeUtils.toString(this.scanCode)}`}equals(a){return this.ctrlKey===a.ctrlKey&&this.shiftKey===a.shiftKey&&this.altKey===a.altKey&&this.scanCode===a.scanCode}getProducedCharCode(a){return a?this.ctrlKey&&this.shiftKey&&this.altKey?a.withShiftAltGr:this.ctrlKey&&this.altKey?a.withAltGr:this.shiftKey?a.withShift:a.value:""}getProducedChar(a){const r=S.getCharCode(this.getProducedCharCode(a));return r===0?" --- ":r>=768&&r<=879?"U+"+r.toString(16):" "+String.fromCharCode(r)+" "}}class v{constructor(a,r,i,s){this.ctrlKey=a,this.shiftKey=r,this.altKey=i,this.keyCode=s}toString(){return`${this.ctrlKey?"Ctrl+":""}${this.shiftKey?"Shift+":""}${this.altKey?"Alt+":""}${t.KeyCodeUtils.toString(this.keyCode)}`}}class m{constructor(){this._scanCodeToKeyCode=[],this._keyCodeToScanCode=[],this._scanCodeToKeyCode=[],this._keyCodeToScanCode=[]}registrationComplete(){this._moveToEnd(56),this._moveToEnd(106)}_moveToEnd(a){for(let r=0;r<8;r++){const i=this._scanCodeToKeyCode[(a<<3)+r];if(i)for(let s=0,o=i.length;s<o;s++){const u=this._keyCodeToScanCode[i[s]];if(u.length!==1)for(let d=0,p=u.length;d<p;d++){const c=u[d];if(c>>>3===a){for(let n=d+1;n<p;n++)u[n-1]=u[n];u[p-1]=c}}}}}registerIfUnknown(a,r){if(r.keyCode===0)return;const i=this._encodeScanCodeCombo(a),s=this._encodeKeyCodeCombo(r),o=r.keyCode>=21&&r.keyCode<=30,u=r.keyCode>=31&&r.keyCode<=56,d=this._scanCodeToKeyCode[i];if(o||u){if(d){for(let p=0,c=d.length;p<c;p++)if(d[p]===s)return}}else if(d&&d.length!==0)return;this._scanCodeToKeyCode[i]=this._scanCodeToKeyCode[i]||[],this._scanCodeToKeyCode[i].unshift(s),this._keyCodeToScanCode[s]=this._keyCodeToScanCode[s]||[],this._keyCodeToScanCode[s].unshift(i)}lookupKeyCodeCombo(a){const r=this._encodeKeyCodeCombo(a),i=this._keyCodeToScanCode[r];if(!i||i.length===0)return[];const s=[];for(let o=0,u=i.length;o<u;o++){const d=i[o],p=!!(d&1),c=!!(d&2),l=!!(d&4),n=d>>>3;s[o]=new f(p,c,l,n)}return s}lookupScanCodeCombo(a){const r=this._encodeScanCodeCombo(a),i=this._scanCodeToKeyCode[r];if(!i||i.length===0)return[];const s=[];for(let o=0,u=i.length;o<u;o++){const d=i[o],p=!!(d&1),c=!!(d&2),l=!!(d&4),n=d>>>3;s[o]=new v(p,c,l,n)}return s}guessStableKeyCode(a){if(a>=36&&a<=45)switch(a){case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21}const r=this.lookupScanCodeCombo(new f(!1,!1,!1,a)),i=this.lookupScanCodeCombo(new f(!1,!0,!1,a));if(r.length===1&&i.length===1){const s=r[0].shiftKey,o=r[0].keyCode,u=i[0].shiftKey,d=i[0].keyCode;if(o===d&&s!==u)return o}return-1}_encodeScanCodeCombo(a){return this._encode(a.ctrlKey,a.shiftKey,a.altKey,a.scanCode)}_encodeKeyCodeCombo(a){return this._encode(a.ctrlKey,a.shiftKey,a.altKey,a.keyCode)}_encode(a,r,i,s){return((a?1:0)<<0|(r?1:0)<<1|(i?1:0)<<2|s<<3)>>>0}}class S{constructor(a,r,i,s){this._isUSStandard=a,this._mapAltGrToCtrlAlt=i,this._OS=s,this._scanCodeToLabel=[],this._scanCodeToDispatch=[],this._codeInfo=[],this._scanCodeKeyCodeMapper=new m,this._scanCodeToLabel=[],this._scanCodeToDispatch=[];const o=(l,n,g,w,E,C,I,_)=>{this._scanCodeKeyCodeMapper.registerIfUnknown(new f(!!l,!!n,!!g,w),new v(!!E,!!C,!!I,_))},u=(l,n,g,w,E)=>{for(let C=l;C<=1;C++)for(let I=n;I<=1;I++)for(let _=g;_<=1;_++)o(C,I,_,w,C,I,_,E)};for(let l=0;l<193;l++)this._scanCodeToLabel[l]=null;for(let l=0;l<193;l++)this._scanCodeToDispatch[l]=null;for(let l=0;l<193;l++){const n=t.IMMUTABLE_CODE_TO_KEY_CODE[l];n!==-1&&(u(0,0,0,l,n),this._scanCodeToLabel[l]=t.KeyCodeUtils.toString(n),n===0||n===5||n===57||n===6||n===4?this._scanCodeToDispatch[l]=null:this._scanCodeToDispatch[l]=`[${t.ScanCodeUtils.toString(l)}]`)}const d={};{const l=[];for(const g in r)if(r.hasOwnProperty(g)){const w=t.ScanCodeUtils.toEnum(g);if(w===0||t.IMMUTABLE_CODE_TO_KEY_CODE[w]!==-1)continue;const E=r[g],C=S.getCharCode(E.value);if(C>=97&&C<=122){const I=65+(C-97);l[I]=!0}}const n=(g,w,E,C)=>{l[g]||(d[t.ScanCodeUtils.toString(w)]={value:E,withShift:C,withAltGr:"",withShiftAltGr:""})};n(65,10,"a","A"),n(66,11,"b","B"),n(67,12,"c","C"),n(68,13,"d","D"),n(69,14,"e","E"),n(70,15,"f","F"),n(71,16,"g","G"),n(72,17,"h","H"),n(73,18,"i","I"),n(74,19,"j","J"),n(75,20,"k","K"),n(76,21,"l","L"),n(77,22,"m","M"),n(78,23,"n","N"),n(79,24,"o","O"),n(80,25,"p","P"),n(81,26,"q","Q"),n(82,27,"r","R"),n(83,28,"s","S"),n(84,29,"t","T"),n(85,30,"u","U"),n(86,31,"v","V"),n(87,32,"w","W"),n(88,33,"x","X"),n(89,34,"y","Y"),n(90,35,"z","Z")}const p=[];let c=0;for(const l in r)if(r.hasOwnProperty(l)){const n=t.ScanCodeUtils.toEnum(l);if(n===0||t.IMMUTABLE_CODE_TO_KEY_CODE[n]!==-1)continue;this._codeInfo[n]=r[l];const g=d[l]||r[l],w=S.getCharCode(g.value),E=S.getCharCode(g.withShift),C=S.getCharCode(g.withAltGr),I=S.getCharCode(g.withShiftAltGr),_={scanCode:n,value:w,withShift:E,withAltGr:C,withShiftAltGr:I};if(p[c++]=_,this._scanCodeToDispatch[n]=`[${t.ScanCodeUtils.toString(n)}]`,w>=97&&w<=122){const A=65+(w-97);this._scanCodeToLabel[n]=String.fromCharCode(A)}else w>=65&&w<=90?this._scanCodeToLabel[n]=String.fromCharCode(w):w?this._scanCodeToLabel[n]=String.fromCharCode(w):this._scanCodeToLabel[n]=null}for(let l=p.length-1;l>=0;l--){const n=p[l],g=n.scanCode,w=n.withShiftAltGr;if(w===n.withAltGr||w===n.withShift||w===n.value)continue;const E=S._charCodeToKb(w);if(!E)continue;const C=E.shiftKey,I=E.keyCode;C?o(1,1,1,g,0,1,0,I):o(1,1,1,g,0,0,0,I)}for(let l=p.length-1;l>=0;l--){const n=p[l],g=n.scanCode,w=n.withAltGr;if(w===n.withShift||w===n.value)continue;const E=S._charCodeToKb(w);if(!E)continue;const C=E.shiftKey,I=E.keyCode;C?o(1,0,1,g,0,1,0,I):o(1,0,1,g,0,0,0,I)}for(let l=p.length-1;l>=0;l--){const n=p[l],g=n.scanCode,w=n.withShift;if(w===n.value)continue;const E=S._charCodeToKb(w);if(!E)continue;const C=E.shiftKey,I=E.keyCode;C?(o(0,1,0,g,0,1,0,I),o(0,1,1,g,0,1,1,I),o(1,1,0,g,1,1,0,I),o(1,1,1,g,1,1,1,I)):(o(0,1,0,g,0,0,0,I),o(0,1,0,g,0,1,0,I),o(0,1,1,g,0,0,1,I),o(0,1,1,g,0,1,1,I),o(1,1,0,g,1,0,0,I),o(1,1,0,g,1,1,0,I),o(1,1,1,g,1,0,1,I),o(1,1,1,g,1,1,1,I))}for(let l=p.length-1;l>=0;l--){const n=p[l],g=n.scanCode,w=S._charCodeToKb(n.value);if(!w)continue;const E=w.shiftKey,C=w.keyCode;E?(o(0,0,0,g,0,1,0,C),o(0,0,1,g,0,1,1,C),o(1,0,0,g,1,1,0,C),o(1,0,1,g,1,1,1,C)):(o(0,0,0,g,0,0,0,C),o(0,0,1,g,0,0,1,C),o(0,1,0,g,0,1,0,C),o(0,1,1,g,0,1,1,C),o(1,0,0,g,1,0,0,C),o(1,0,1,g,1,0,1,C),o(1,1,0,g,1,1,0,C),o(1,1,1,g,1,1,1,C))}u(0,0,0,36,22),u(0,0,0,37,23),u(0,0,0,38,24),u(0,0,0,39,25),u(0,0,0,40,26),u(0,0,0,41,27),u(0,0,0,42,28),u(0,0,0,43,29),u(0,0,0,44,30),u(0,0,0,45,21),this._scanCodeKeyCodeMapper.registrationComplete()}dumpDebugInfo(){const a=[],r=[88,104];let i=0;a.push(`isUSStandard: ${this._isUSStandard}`),a.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------");for(let s=0;s<193;s++){if(t.IMMUTABLE_CODE_TO_KEY_CODE[s]!==-1&&r.indexOf(s)===-1)continue;i%4===0&&(a.push("| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG |"),a.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------")),i++;const o=this._codeInfo[s];for(let u=0;u<8;u++){const d=!!(u&1),p=!!(u&2),c=!!(u&4),l=new f(d,p,c,s),n=this.resolveKeyboardEvent({_standardKeyboardEventBrand:!0,ctrlKey:l.ctrlKey,shiftKey:l.shiftKey,altKey:l.altKey,metaKey:!1,altGraphKey:!1,keyCode:-1,code:t.ScanCodeUtils.toString(s)}),g=l.toString(),w=l.getProducedChar(o),E=n.getAriaLabel(),C=E?E.replace(/Control\+/,"Ctrl+"):null,I=n.getUserSettingsLabel(),_=n.getElectronAccelerator(),A=n.getDispatchChords()[0],L=(n?n.isWYSIWYG():!1)?" ":" NO ",R=this._scanCodeKeyCodeMapper.lookupScanCodeCombo(l);if(R.length===0)a.push(`| ${this._leftPad(g,30)} | ${w} | ${this._leftPad("",25)} | ${this._leftPad("",3)} | ${this._leftPad(C,25)} | ${this._leftPad(I,30)} | ${this._leftPad(_,25)} | ${this._leftPad(A,30)} | ${L} |`);else for(let M=0,N=R.length;M<N;M++){const P=R[M];let x;const F=this._scanCodeKeyCodeMapper.lookupKeyCodeCombo(P);if(F.length===1)x="";else{let W=-1;for(let z=0;z<F.length;z++)if(F[z].equals(l)){W=z+1;break}x=String(W)}const V=P.toString();M===0?a.push(`| ${this._leftPad(g,30)} | ${w} | ${this._leftPad(V,25)} | ${this._leftPad(x,3)} | ${this._leftPad(C,25)} | ${this._leftPad(I,30)} | ${this._leftPad(_,25)} | ${this._leftPad(A,30)} | ${L} |`):a.push(`| ${this._leftPad("",30)} | | ${this._leftPad(V,25)} | ${this._leftPad(x,3)} | ${this._leftPad("",25)} | ${this._leftPad("",30)} | ${this._leftPad("",25)} | ${this._leftPad("",30)} | |`)}}a.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------")}return a.join(` `)}_leftPad(a,r){for(a===null&&(a="null");a.length<r;)a=" "+a;return a}keyCodeChordToScanCodeChord(a){if(a.keyCode===3)return[new y.ScanCodeChord(a.ctrlKey,a.shiftKey,a.altKey,a.metaKey,46)];const r=this._scanCodeKeyCodeMapper.lookupKeyCodeCombo(new v(a.ctrlKey,a.shiftKey,a.altKey,a.keyCode)),i=[];for(let s=0,o=r.length;s<o;s++){const u=r[s];i[s]=new y.ScanCodeChord(u.ctrlKey,u.shiftKey,u.altKey,a.metaKey,u.scanCode)}return i}getUILabelForScanCodeChord(a){if(!a)return null;if(a.isDuplicateModifierCase())return"";if(this._OS===2)switch(a.scanCode){case 86:return"\u2190";case 88:return"\u2191";case 85:return"\u2192";case 87:return"\u2193"}return this._scanCodeToLabel[a.scanCode]}getAriaLabelForScanCodeChord(a){return a?a.isDuplicateModifierCase()?"":this._scanCodeToLabel[a.scanCode]:null}getDispatchStrForScanCodeChord(a){const r=this._scanCodeToDispatch[a.scanCode];if(!r)return null;let i="";return a.ctrlKey&&(i+="ctrl+"),a.shiftKey&&(i+="shift+"),a.altKey&&(i+="alt+"),a.metaKey&&(i+="meta+"),i+=r,i}getUserSettingsLabelForScanCodeChord(a){if(!a)return null;if(a.isDuplicateModifierCase())return"";const r=t.IMMUTABLE_CODE_TO_KEY_CODE[a.scanCode];if(r!==-1)return t.KeyCodeUtils.toUserSettingsUS(r).toLowerCase();const i=this._scanCodeKeyCodeMapper.guessStableKeyCode(a.scanCode);if(i!==-1){const s=this.keyCodeChordToScanCodeChord(new y.KeyCodeChord(a.ctrlKey,a.shiftKey,a.altKey,a.metaKey,i));for(let o=0,u=s.length;o<u;o++)if(s[o].scanCode===a.scanCode)return t.KeyCodeUtils.toUserSettingsUS(i).toLowerCase()}return this._scanCodeToDispatch[a.scanCode]}getElectronAcceleratorLabelForScanCodeChord(a){if(!a)return null;const r=t.IMMUTABLE_CODE_TO_KEY_CODE[a.scanCode];if(r!==-1)return t.KeyCodeUtils.toElectronAccelerator(r);const i=this._scanCodeKeyCodeMapper.guessStableKeyCode(a.scanCode);return this._OS===3&&!this._isUSStandard&&(i===85||i===86||i===87||i===88||i===89||i===90||i===91||i===92||i===93||i===94)?null:i!==-1?t.KeyCodeUtils.toElectronAccelerator(i):null}_toResolvedKeybinding(a){if(a.length===0)return[];const r=[];return this._generateResolvedKeybindings(a,0,[],r),r}_generateResolvedKeybindings(a,r,i,s){const o=a[r],u=r===a.length-1;for(let d=0,p=o.length;d<p;d++){const c=[...i,o[d]];u?s.push(new T(this,this._OS,c)):this._generateResolvedKeybindings(a,r+1,c,s)}}resolveKeyboardEvent(a){let r=t.ScanCodeUtils.toEnum(a.code);r===94&&(r=46);const i=a.keyCode;if(i===15||i===16||i===17||i===18||i===20||i===19||i===14||i===13||i===12||i===11||i===1){const d=t.IMMUTABLE_KEY_CODE_TO_CODE[i];d!==-1&&(r=d)}else if((r===95||r===96||r===97||r===98||r===99||r===100||r===101||r===102||r===103||r===104||r===105)&&i>=0){const d=t.IMMUTABLE_KEY_CODE_TO_CODE[i];d!==-1&&(r=d)}const s=a.ctrlKey||this._mapAltGrToCtrlAlt&&a.altGraphKey,o=a.altKey||this._mapAltGrToCtrlAlt&&a.altGraphKey,u=new y.ScanCodeChord(s,a.shiftKey,o,a.metaKey,r);return new T(this,this._OS,[u])}_resolveChord(a){return a?a instanceof y.ScanCodeChord?[a]:this.keyCodeChordToScanCodeChord(a):[]}resolveKeybinding(a){const r=a.chords.map(i=>this._resolveChord(i));return this._toResolvedKeybinding(r)}static _redirectCharCode(a){switch(a){case 12290:return 46;case 12300:return 91;case 12301:return 93;case 12304:return 91;case 12305:return 93;case 65307:return 59;case 65292:return 44}return a}static _charCodeToKb(a){return a=this._redirectCharCode(a),a<D.length?D[a]:null}static getCharCode(a){if(a.length===0)return 0;const r=a.charCodeAt(0);switch(r){case 768:return 96;case 769:return 180;case 770:return 94;case 771:return 732;case 772:return 175;case 773:return 8254;case 774:return 728;case 775:return 729;case 776:return 168;case 778:return 730;case 779:return 733}return r}}e.MacLinuxKeyboardMapper=S,function(){function h(a,r,i){for(let s=D.length;s<a;s++)D[s]=null;D[a]={keyCode:r,shiftKey:i}}for(let a=65;a<=90;a++)h(a,31+(a-65),!0);for(let a=97;a<=122;a++)h(a,31+(a-97),!1);h(59,85,!1),h(58,85,!0),h(61,86,!1),h(43,86,!0),h(44,87,!1),h(60,87,!0),h(45,88,!1),h(95,88,!0),h(46,89,!1),h(62,89,!0),h(47,90,!1),h(63,90,!0),h(96,91,!1),h(126,91,!0),h(91,92,!1),h(123,92,!0),h(92,93,!1),h(124,93,!0),h(93,94,!1),h(125,94,!0),h(39,95,!1),h(34,95,!0)}()}),define(Q[1374],Y([1,0,105,321,443,866,691]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowsKeyboardMapper=e.WindowsNativeResolvedKeybinding=void 0;const f=!1;function v(h){f&&console.info(h)}class m extends D.BaseResolvedKeybinding{constructor(a,r){super(1,r),this._mapper=a}_getLabel(a){return a.isDuplicateModifierCase()?"":this._mapper.getUILabelForKeyCode(a.keyCode)}_getUSLabelForKeybinding(a){return a.isDuplicateModifierCase()?"":t.KeyCodeUtils.toString(a.keyCode)}getUSLabel(){return b.UILabelProvider.toLabel(this._os,this._chords,a=>this._getUSLabelForKeybinding(a))}_getAriaLabel(a){return a.isDuplicateModifierCase()?"":this._mapper.getAriaLabelForKeyCode(a.keyCode)}_getElectronAccelerator(a){return this._mapper.getElectronAcceleratorForKeyBinding(a)}_getUserSettingsLabel(a){if(a.isDuplicateModifierCase())return"";const r=this._mapper.getUserSettingsLabelForKeyCode(a.keyCode);return r&&r.toLowerCase()}_isWYSIWYG(a){return this.__isWYSIWYG(a.keyCode)}__isWYSIWYG(a){if(a===15||a===16||a===17||a===18)return!0;const r=this._mapper.getAriaLabelForKeyCode(a),i=this._mapper.getUserSettingsLabelForKeyCode(a);return r===i}_getChordDispatch(a){if(a.isModifierKey())return null;let r="";return a.ctrlKey&&(r+="ctrl+"),a.shiftKey&&(r+="shift+"),a.altKey&&(r+="alt+"),a.metaKey&&(r+="meta+"),r+=t.KeyCodeUtils.toString(a.keyCode),r}_getSingleModifierChordDispatch(a){return a.keyCode===5&&!a.shiftKey&&!a.altKey&&!a.metaKey?"ctrl":a.keyCode===4&&!a.ctrlKey&&!a.altKey&&!a.metaKey?"shift":a.keyCode===6&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey?"alt":a.keyCode===57&&!a.ctrlKey&&!a.shiftKey&&!a.altKey?"meta":null}static getProducedCharCode(a,r){return r?a.ctrlKey&&a.shiftKey&&a.altKey?r.withShiftAltGr:a.ctrlKey&&a.altKey?r.withAltGr:a.shiftKey?r.withShift:r.value:null}static getProducedChar(a,r){const i=this.getProducedCharCode(a,r);return i===null||i.length===0?" --- ":" "+i+" "}}e.WindowsNativeResolvedKeybinding=m;class S{constructor(a,r,i){this._isUSStandard=a,this._mapAltGrToCtrlAlt=i,this._keyCodeToLabel=[],this._scanCodeToKeyCode=[],this._keyCodeToLabel=[],this._keyCodeExists=[],this._keyCodeToLabel[0]=t.KeyCodeUtils.toString(0);for(let d=0;d<193;d++){const p=t.IMMUTABLE_CODE_TO_KEY_CODE[d];p!==-1&&(this._scanCodeToKeyCode[d]=p,this._keyCodeToLabel[p]=t.KeyCodeUtils.toString(p),this._keyCodeExists[p]=!0)}const s=[];let o=!1;this._codeInfo=[];for(const d in r)if(r.hasOwnProperty(d)){const p=t.ScanCodeUtils.toEnum(d);if(p===0){v(`Unknown scanCode ${d} in mapping.`);continue}const c=r[d],l=t.IMMUTABLE_CODE_TO_KEY_CODE[p];if(l!==-1){const _=t.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[c.vkey]||0;if(_===0||l===_||p!==134)continue}const n=c.value,g=c.withShift,w=c.withAltGr,E=c.withShiftAltGr,C=t.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[c.vkey]||0,I={scanCode:p,keyCode:C,value:n,withShift:g,withAltGr:w,withShiftAltGr:E};if(this._codeInfo[p]=I,this._scanCodeToKeyCode[p]=C,C===0)continue;if(this._keyCodeExists[C]=!0,n.length===0)this._keyCodeToLabel[C]=null;else if(n.length>1)this._keyCodeToLabel[C]=n;else{const _=n.charCodeAt(0);if(_>=97&&_<=122){const A=65+(_-97);s[A]=!0,o=!0,this._keyCodeToLabel[C]=String.fromCharCode(65+(_-97))}else _>=65&&_<=90?(s[_]=!0,o=!0,this._keyCodeToLabel[C]=n):this._keyCodeToLabel[C]=n}}const u=(d,p)=>{s[d]||(this._keyCodeToLabel[p]=String.fromCharCode(d))};if(u(65,31),u(66,32),u(67,33),u(68,34),u(69,35),u(70,36),u(71,37),u(72,38),u(73,39),u(74,40),u(75,41),u(76,42),u(77,43),u(78,44),u(79,45),u(80,46),u(81,47),u(82,48),u(83,49),u(84,50),u(85,51),u(86,52),u(87,53),u(88,54),u(89,55),u(90,56),!o){const d=(p,c)=>{this._keyCodeToLabel[p]=String.fromCharCode(c)};d(85,59),d(86,61),d(87,44),d(88,45),d(89,46),d(90,47),d(91,96),d(92,91),d(93,92),d(94,93),d(95,39)}}dumpDebugInfo(){const a=[],r=[88,104];let i=0;a.push("-----------------------------------------------------------------------------------------------------------------------------------------");for(let s=0;s<193;s++){if(t.IMMUTABLE_CODE_TO_KEY_CODE[s]!==-1&&r.indexOf(s)===-1)continue;i%6===0&&(a.push("| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG |"),a.push("-----------------------------------------------------------------------------------------------------------------------------------------")),i++;const o=this._codeInfo[s],u=t.ScanCodeUtils.toString(s),d=[0,2,5,7];for(const p of d){const c=!!(p&1),l=!!(p&2),n=!!(p&4),g=new y.ScanCodeChord(c,l,n,!1,s),w=this._resolveChord(g),E=w?t.KeyCodeUtils.toString(w.keyCode):null,C=w?new m(this,[w]):null,I=`${c?"Ctrl+":""}${l?"Shift+":""}${n?"Alt+":""}${u}`,_=C?C.getAriaLabel():null,A=_?_.replace(/Control\+/,"Ctrl+"):null,k=C?C.getUserSettingsLabel():null,L=m.getProducedChar(g,o),R=E?`${c?"Ctrl+":""}${l?"Shift+":""}${n?"Alt+":""}${E}`:null,N=(C?C.isWYSIWYG():!1)?" ":" NO ";a.push(`| ${this._leftPad(I,30)} | ${L} | ${this._leftPad(R,25)} | ${this._leftPad(A,25)} | ${this._leftPad(k,25)} | ${N} |`)}a.push("-----------------------------------------------------------------------------------------------------------------------------------------")}return a.join(` `)}_leftPad(a,r){for(a===null&&(a="null");a.length<r;)a=" "+a;return a}getUILabelForKeyCode(a){return this._getLabelForKeyCode(a)}getAriaLabelForKeyCode(a){return this._getLabelForKeyCode(a)}getUserSettingsLabelForKeyCode(a){return this._isUSStandard?t.KeyCodeUtils.toUserSettingsUS(a):t.KeyCodeUtils.toUserSettingsGeneral(a)}getElectronAcceleratorForKeyBinding(a){return t.KeyCodeUtils.toElectronAccelerator(a.keyCode)}_getLabelForKeyCode(a){return this._keyCodeToLabel[a]||t.KeyCodeUtils.toString(0)}resolveKeyboardEvent(a){const r=a.ctrlKey||this._mapAltGrToCtrlAlt&&a.altGraphKey,i=a.altKey||this._mapAltGrToCtrlAlt&&a.altGraphKey,s=new y.KeyCodeChord(r,a.shiftKey,i,a.metaKey,a.keyCode);return new m(this,[s])}_resolveChord(a){if(!a)return null;if(a instanceof y.KeyCodeChord)return this._keyCodeExists[a.keyCode]?a:null;const r=this._scanCodeToKeyCode[a.scanCode]||0;return r===0||!this._keyCodeExists[r]?null:new y.KeyCodeChord(a.ctrlKey,a.shiftKey,a.altKey,a.metaKey,r)}resolveKeybinding(a){const r=(0,T.toEmptyArrayIfContainsNull)(a.chords.map(i=>this._resolveChord(i)));return r.length>0?[new m(this,r)]:[]}}e.WindowsKeyboardMapper=S}),define(Q[1375],Y([1,0,4,867,6,18,327,250,5]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeKeyboardLayoutService=e.INativeKeyboardLayoutService=void 0,e.INativeKeyboardLayoutService=(0,v.createDecorator)("nativeKeyboardLayoutService");let m=class extends t.Disposable{constructor(a){super(),this._onDidChangeKeyboardLayout=this._register(new b.Emitter),this.onDidChangeKeyboardLayout=this._onDidChangeKeyboardLayout.event,this._keyboardLayoutService=f.ProxyChannel.toService(a.getChannel("keyboardLayout")),this._initPromise=null,this._keyboardMapping=null,this._keyboardLayoutInfo=null,this._register(this._keyboardLayoutService.onDidChangeKeyboardLayout(async({keyboardLayoutInfo:r,keyboardMapping:i})=>{await this.initialize(),!S(this._keyboardMapping,i)&&(this._keyboardMapping=i,this._keyboardLayoutInfo=r,this._onDidChangeKeyboardLayout.fire())}))}initialize(){return this._initPromise||(this._initPromise=this._doInitialize()),this._initPromise}async _doInitialize(){const a=await this._keyboardLayoutService.getKeyboardLayoutData(),{keyboardLayoutInfo:r,keyboardMapping:i}=a;this._keyboardMapping=i,this._keyboardLayoutInfo=r}getRawKeyboardMapping(){return this._keyboardMapping}getCurrentKeyboardLayout(){return this._keyboardLayoutInfo}};e.NativeKeyboardLayoutService=m,e.NativeKeyboardLayoutService=m=fe([O(0,T.IMainProcessService)],m);function S(h,a){return D.OS===1?(0,y.windowsKeyboardMappingEquals)(h,a):(0,y.macLinuxKeyboardMappingEquals)(h,a)}}),define(Q[3891],Y([1,0,4,867,6,18,3191,1374,3888,3890,3262,9,1375,35]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyboardLayoutService=void 0;let i=class extends t.Disposable{constructor(d,p){super(),this._nativeKeyboardLayoutService=d,this._configurationService=p,this._onDidChangeKeyboardLayout=this._register(new b.Emitter),this.onDidChangeKeyboardLayout=this._onDidChangeKeyboardLayout.event,this._keyboardMapper=null,this._register(this._nativeKeyboardLayoutService.onDidChangeKeyboardLayout(async()=>{this._keyboardMapper=null,this._onDidChangeKeyboardLayout.fire()})),this._register(p.onDidChangeConfiguration(async c=>{c.affectsConfiguration("keyboard")&&(this._keyboardMapper=null,this._onDidChangeKeyboardLayout.fire())}))}getRawKeyboardMapping(){return this._nativeKeyboardLayoutService.getRawKeyboardMapping()}getCurrentKeyboardLayout(){return this._nativeKeyboardLayoutService.getCurrentKeyboardLayout()}getAllKeyboardLayouts(){return[]}getKeyboardMapper(){const d=(0,S.readKeyboardConfig)(this._configurationService);return d.dispatch===1?new v.FallbackKeyboardMapper(d.mapAltGrToCtrlAlt,D.OS):(this._keyboardMapper||(this._keyboardMapper=new T.CachedKeyboardMapper(s(this.getCurrentKeyboardLayout(),this.getRawKeyboardMapping(),d.mapAltGrToCtrlAlt))),this._keyboardMapper)}validateCurrentKeyboardMapping(d){}};e.KeyboardLayoutService=i,e.KeyboardLayoutService=i=fe([O(0,a.INativeKeyboardLayoutService),O(1,h.IConfigurationService)],i);function s(u,d,p){const c=o(u);return D.OS===1?new f.WindowsKeyboardMapper(c,d,p):!d||Object.keys(d).length===0?new v.FallbackKeyboardMapper(p,D.OS):D.OS===2&&u.id==="com.apple.keylayout.DVORAK-QWERTYCMD"?new v.FallbackKeyboardMapper(p,D.OS):new m.MacLinuxKeyboardMapper(c,d,p,D.OS)}function o(u){if(!u)return!1;if(D.OS===3){const d=u;return d.layout.split(/,/g)[d.group]==="us"}return D.OS===2?u.id==="com.apple.keylayout.US":D.OS===1?u.name==="00000409":!1}(0,r.registerSingleton)(y.IKeyboardLayoutService,i,1)}),define(Q[538],Y([1,0,3088,698,26,50,3250,9,91,25,44,121,35,11]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchLanguageService=e.languagesExtPoint=void 0,e.languagesExtPoint=h.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"languages",jsonSchema:{description:(0,t.localize)(0,null),type:"array",items:{type:"object",defaultSnippets:[{body:{id:"${1:languageId}",aliases:["${2:label}"],extensions:["${3:extension}"],configuration:"./language-configuration.json"}}],properties:{id:{description:(0,t.localize)(1,null),type:"string"},aliases:{description:(0,t.localize)(2,null),type:"array",items:{type:"string"}},extensions:{description:(0,t.localize)(3,null),default:[".foo"],type:"array",items:{type:"string"}},filenames:{description:(0,t.localize)(4,null),type:"array",items:{type:"string"}},filenamePatterns:{description:(0,t.localize)(5,null),type:"array",items:{type:"string"}},mimetypes:{description:(0,t.localize)(6,null),type:"array",items:{type:"string"}},firstLine:{description:(0,t.localize)(7,null),type:"string"},configuration:{description:(0,t.localize)(8,null),type:"string",default:"./language-configuration.json"},icon:{type:"object",description:(0,t.localize)(9,null),properties:{light:{description:(0,t.localize)(10,null),type:"string"},dark:{description:(0,t.localize)(11,null),type:"string"}}}}}},activationEventsGenerator:(u,d)=>{for(const p of u)p.id&&p.configuration&&d.push(`onLanguage:${p.id}`)}});let i=class extends T.LanguageService{constructor(d,p,c,l){super(c.verbose||c.isExtensionDevelopment||!c.isBuilt),this.logService=l,this._configurationService=p,this._extensionService=d,e.languagesExtPoint.setHandler(n=>{const g=[];for(let w=0,E=n.length;w<E;w++){const C=n[w];if(!Array.isArray(C.value)){C.collector.error((0,t.localize)(12,null,e.languagesExtPoint.name));continue}for(let I=0,_=C.value.length;I<_;I++){const A=C.value[I];if(o(A,C.description,C.collector)){let k;A.configuration&&(k=(0,b.joinPath)(C.description.extensionLocation,A.configuration)),g.push({id:A.id,extensions:A.extensions,filenames:A.filenames,filenamePatterns:A.filenamePatterns,firstLine:A.firstLine,aliases:A.aliases,mimetypes:A.mimetypes,configuration:k,icon:A.icon&&{light:(0,b.joinPath)(C.description.extensionLocation,A.icon.light),dark:(0,b.joinPath)(C.description.extensionLocation,A.icon.dark)}})}}}this._registry.setDynamicLanguages(g)}),this.updateMime(),this._configurationService.onDidChangeConfiguration(n=>{n.affectsConfiguration(m.FILES_ASSOCIATIONS_CONFIG)&&this.updateMime()}),this._extensionService.whenInstalledExtensionsRegistered().then(()=>{this.updateMime()}),this._register(this.onDidRequestRichLanguageFeatures(n=>{this._extensionService.activateByEvent(`onLanguage:${n}`),this._extensionService.activateByEvent("onLanguage")}))}updateMime(){const d=this._configurationService.getValue();(0,y.clearConfiguredLanguageAssociations)(),d.files?.associations&&Object.keys(d.files.associations).forEach(p=>{const c=d.files.associations[p];if(typeof c!="string"){this.logService.warn(`Ignoring configured 'files.associations' for '${p}' because its type is not a string but '${typeof c}'`);return}const l=this.getMimeType(c)||`text/x-${c}`;(0,y.registerConfiguredLanguageAssociation)({id:c,mime:l,filepattern:p})}),this._onDidChange.fire()}};e.WorkbenchLanguageService=i,e.WorkbenchLanguageService=i=fe([O(0,S.IExtensionService),O(1,f.IConfigurationService),O(2,v.IEnvironmentService),O(3,r.ILogService)],i);function s(u){return typeof u>"u"?!0:Array.isArray(u)?u.every(d=>typeof d=="string"):!1}function o(u,d,p){return u?typeof u.id!="string"?(p.error((0,t.localize)(14,null,"id")),!1):s(u.extensions)?s(u.filenames)?typeof u.firstLine<"u"&&typeof u.firstLine!="string"?(p.error((0,t.localize)(17,null,"firstLine")),!1):typeof u.configuration<"u"&&typeof u.configuration!="string"?(p.error((0,t.localize)(18,null,"configuration")),!1):s(u.aliases)?s(u.mimetypes)?typeof u.icon<"u"&&(typeof u.icon!="object"||typeof u.icon.light!="string"||typeof u.icon.dark!="string")?(p.error((0,t.localize)(21,null,"icon","light","dark")),!1):!0:(p.error((0,t.localize)(20,null,"mimetypes")),!1):(p.error((0,t.localize)(19,null,"aliases")),!1):(p.error((0,t.localize)(16,null,"filenames")),!1):(p.error((0,t.localize)(15,null,"extensions")),!1):(p.error((0,t.localize)(13,null,e.languagesExtPoint.name)),!1)}(0,a.registerSingleton)(D.ILanguageService,i,0)}),define(Q[3892],Y([1,0,2635,538]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.codeActionsExtensionPointDescriptor=void 0;var b;(function(T){T.languages="languages",T.actions="actions",T.kind="kind",T.title="title",T.description="description"})(b||(b={}));const D=Object.freeze({type:"array",markdownDescription:t.localize(0,null),items:{type:"object",required:[b.languages,b.actions],properties:{[b.languages]:{type:"array",description:t.localize(1,null),items:{type:"string"}},[b.actions]:{type:"object",required:[b.kind,b.title],properties:{[b.kind]:{type:"string",markdownDescription:t.localize(2,null)},[b.title]:{type:"string",description:t.localize(3,null)},[b.description]:{type:"string",description:t.localize(4,null)}}}}}});e.codeActionsExtensionPointDescriptor={extensionPoint:"codeActions",deps:[y.languagesExtPoint],jsonSchema:D}}),define(Q[3893],Y([1,0,2636,538]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.documentationExtensionPointDescriptor=void 0;var b;(function(T){T.when="when",T.title="title",T.command="command"})(b||(b={}));const D=Object.freeze({type:"object",description:t.localize(0,null),properties:{refactoring:{type:"array",description:t.localize(1,null),items:{type:"object",description:t.localize(2,null),required:[b.title,b.when,b.command],properties:{[b.title]:{type:"string",description:t.localize(3,null)},[b.when]:{type:"string",description:t.localize(4,null)},[b.command]:{type:"string",description:t.localize(5,null)}}}}}});e.documentationExtensionPointDescriptor={extensionPoint:"documentation",deps:[y.languagesExtPoint],jsonSchema:D}}),define(Q[3894],Y([1,0,2677,121,538]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.customEditorsExtensionPoint=void 0;const D=Object.freeze({viewType:"viewType",displayName:"displayName",selector:"selector",priority:"priority"}),T={description:t.localize(0,null),type:"array",defaultSnippets:[{body:[{[D.viewType]:"$1",[D.displayName]:"$2",[D.selector]:[{filenamePattern:"$3"}]}]}],items:{type:"object",required:[D.viewType,D.displayName,D.selector],properties:{[D.viewType]:{type:"string",markdownDescription:t.localize(1,null)},[D.displayName]:{type:"string",description:t.localize(2,null)},[D.selector]:{type:"array",description:t.localize(3,null),items:{type:"object",defaultSnippets:[{body:{filenamePattern:"$1"}}],properties:{filenamePattern:{type:"string",description:t.localize(4,null)}}}},[D.priority]:{type:"string",markdownDeprecationMessage:t.localize(5,null),enum:["default","option"],markdownEnumDescriptions:[t.localize(6,null),t.localize(7,null)],default:"default"}}}};e.customEditorsExtensionPoint=y.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"customEditors",deps:[b.languagesExtPoint],jsonSchema:T,activationEventsGenerator:(f,v)=>{for(const m of f){const S=m[D.viewType];S&&v.push(`onCustomEditor:${S}`)}}})}),define(Q[384],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageDetectionStatsId=e.AutomaticLanguageDetectionLikelyWrongId=e.LanguageDetectionLanguageEventSource=e.ILanguageDetectionService=void 0,e.ILanguageDetectionService=(0,t.createDecorator)("ILanguageDetectionService"),e.LanguageDetectionLanguageEventSource="languageDetection",e.AutomaticLanguageDetectionLikelyWrongId="automaticlanguagedetection.likelywrong",e.LanguageDetectionStatsId="automaticlanguagedetection.stats"}),define(Q[539],Y([1,0,290,50,57,4,146,384,14,66,2593]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTextEditorModel=void 0;let a=class extends t.EditorModel{static{h=this}static{this.AUTO_DETECT_LANGUAGE_THROTTLE_DELAY=600}constructor(i,s,o,u,d){super(),this.modelService=i,this.languageService=s,this.languageDetectionService=o,this.accessibilityService=u,this.textEditorModelHandle=void 0,this.modelDisposeListener=this._register(new D.MutableDisposable),this.autoDetectLanguageThrottler=this._register(new v.ThrottledDelayer(h.AUTO_DETECT_LANGUAGE_THROTTLE_DELAY)),this._hasLanguageSetExplicitly=!1,d&&this.handleExistingModel(d)}handleExistingModel(i){const s=this.modelService.getModel(i);if(!s)throw new Error(`Document with resource ${i.toString(!0)} does not exist`);this.textEditorModelHandle=i,this.registerModelDisposeListener(s)}registerModelDisposeListener(i){this.modelDisposeListener.value=i.onWillDispose(()=>{this.textEditorModelHandle=void 0,this.dispose()})}get textEditorModel(){return this.textEditorModelHandle?this.modelService.getModel(this.textEditorModelHandle):null}isReadonly(){return!0}get hasLanguageSetExplicitly(){return this._hasLanguageSetExplicitly}setLanguageId(i,s){this._hasLanguageSetExplicitly=!0,this.setLanguageIdInternal(i,s)}setLanguageIdInternal(i,s){this.isResolved()&&(!i||i===this.textEditorModel.getLanguageId()||this.textEditorModel.setLanguage(this.languageService.createById(i),s))}installModelListeners(i){const s=this._register(i.onDidChangeLanguage(o=>{o.source!==f.LanguageDetectionLanguageEventSource&&(this._hasLanguageSetExplicitly=!0,s.dispose())}))}getLanguageId(){return this.textEditorModel?.getLanguageId()}autoDetectLanguage(){return this.autoDetectLanguageThrottler.trigger(()=>this.doAutoDetectLanguage())}async doAutoDetectLanguage(){if(this.hasLanguageSetExplicitly||!this.textEditorModelHandle||!this.languageDetectionService.isEnabledForLanguage(this.getLanguageId()??T.PLAINTEXT_LANGUAGE_ID))return;const i=await this.languageDetectionService.detectLanguage(this.textEditorModelHandle),s=this.getLanguageId();if(i&&i!==s&&!this.isDisposed()){this.setLanguageIdInternal(i,f.LanguageDetectionLanguageEventSource);const o=this.languageService.getLanguageName(i);this.accessibilityService.alert((0,S.localize)(0,null,o??i))}}createTextEditorModel(i,s,o){const u=this.getFirstLineText(i),d=this.getOrCreateLanguage(s,this.languageService,o,u);return this.doCreateTextEditorModel(i,d,s)}doCreateTextEditorModel(i,s,o){let u=o&&this.modelService.getModel(o);return u?this.updateTextEditorModel(i,s.languageId):(u=this.modelService.createModel(i,s,o),this.createdEditorModel=!0,this.registerModelDisposeListener(u)),this.textEditorModelHandle=u.uri,u}getFirstLineText(i){const s=i;return typeof s.getFirstLineText=="function"?s.getFirstLineText(1e3):i.getLineContent(1).substr(0,1e3)}getOrCreateLanguage(i,s,o,u){return!o||o===T.PLAINTEXT_LANGUAGE_ID?s.createByFilepathOrFirstLine(i??null,u):s.createById(o)}updateTextEditorModel(i,s){this.isResolved()&&(i&&this.modelService.updateModel(this.textEditorModel,i),s&&s!==T.PLAINTEXT_LANGUAGE_ID&&this.textEditorModel.getLanguageId()!==s&&this.textEditorModel.setLanguage(this.languageService.createById(s)))}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=void 0,this.createdEditorModel=!1,super.dispose()}};e.BaseTextEditorModel=a,e.BaseTextEditorModel=a=h=fe([O(0,b.IModelService),O(1,y.ILanguageService),O(2,f.ILanguageDetectionService),O(3,m.IAccessibilityService)],a)}),define(Q[246],Y([1,0,2591,236,47,539,1255,1256,21,180]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorInputSerializer=e.DiffEditorInput=void 0;let h=class extends y.SideBySideEditorInput{static{S=this}static{this.ID="workbench.editors.diffEditorInput"}get typeId(){return S.ID}get editorId(){return this.modified.editorId===this.original.editorId?this.modified.editorId:void 0}get capabilities(){let i=super.capabilities;return this.labels.forceDescription&&(i|=64),i}constructor(i,s,o,u,d,p){super(i,s,o,u,p),this.original=o,this.modified=u,this.forceOpenAsBinary=d,this.cachedModel=void 0,this.labels=this.computeLabels()}computeLabels(){let i,s=!1;if(this.preferredName)i=this.preferredName;else{const n=this.original.getName(),g=this.modified.getName();i=(0,t.localize)(0,null,n,g),s=n===g}let o,u,d;if(this.preferredDescription)o=this.preferredDescription,u=this.preferredDescription,d=this.preferredDescription;else{o=this.computeLabel(this.original.getDescription(0),this.modified.getDescription(0)),d=this.computeLabel(this.original.getDescription(2),this.modified.getDescription(2));const n=this.original.getDescription(1),g=this.modified.getDescription(1);if(typeof n=="string"&&typeof g=="string"&&(n||g)){const[w,E]=(0,m.shorten)([n,g]);u=this.computeLabel(w,E)}}const p=this.computeLabel(this.original.getTitle(0)??this.original.getName(),this.modified.getTitle(0)??this.modified.getName()," \u2194 "),c=this.computeLabel(this.original.getTitle(1)??this.original.getName(),this.modified.getTitle(1)??this.modified.getName()," \u2194 "),l=this.computeLabel(this.original.getTitle(2)??this.original.getName(),this.modified.getTitle(2)??this.modified.getName()," \u2194 ");return{name:i,shortDescription:o,mediumDescription:u,longDescription:d,forceDescription:s,shortTitle:p,mediumTitle:c,longTitle:l}}computeLabel(i,s,o=" - "){if(!(!i||!s))return i===s?s:`${i}${o}${s}`}getName(){return this.labels.name}getDescription(i=1){switch(i){case 0:return this.labels.shortDescription;case 2:return this.labels.longDescription;case 1:default:return this.labels.mediumDescription}}getTitle(i){switch(i){case 0:return this.labels.shortTitle;case 2:return this.labels.longTitle;default:case 1:return this.labels.mediumTitle}}async resolve(i){const s=await this.createModel(i);return this.cachedModel?.dispose(),this.cachedModel=s,this.cachedModel}prefersEditorPane(i){return this.forceOpenAsBinary?i.find(s=>s.typeId===b.BINARY_DIFF_EDITOR_ID):i.find(s=>s.typeId===b.TEXT_DIFF_EDITOR_ID)}async createModel(i){const[s,o]=await Promise.all([this.original.resolve(i),this.modified.resolve(i)]);return o instanceof D.BaseTextEditorModel&&s instanceof D.BaseTextEditorModel?new f.TextDiffEditorModel(s,o):new T.DiffEditorModel(s??void 0,o??void 0)}toUntyped(i){const s=super.toUntyped(i);if(s)return{...s,modified:s.primary,original:s.secondary}}matches(i){return this===i?!0:i instanceof S?this.modified.matches(i.modified)&&this.original.matches(i.original)&&i.forceOpenAsBinary===this.forceOpenAsBinary:(0,b.isResourceDiffEditorInput)(i)?this.modified.matches(i.modified)&&this.original.matches(i.original):!1}dispose(){this.cachedModel&&(this.cachedModel.dispose(),this.cachedModel=void 0),super.dispose()}};e.DiffEditorInput=h,e.DiffEditorInput=h=S=fe([O(5,v.IEditorService)],h);class a extends y.AbstractSideBySideEditorInputSerializer{createEditorInput(i,s,o,u,d){return i.createInstance(h,s,o,u,d,void 0)}}e.DiffEditorInputSerializer=a}),define(Q[967],Y([1,0,539,50,57,384,66]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextResourceEditorModel=void 0;let f=class extends t.BaseTextEditorModel{constructor(m,S,h,a,r){super(h,S,a,r,m)}dispose(){this.textEditorModelHandle&&this.modelService.destroyModel(this.textEditorModelHandle),super.dispose()}};e.TextResourceEditorModel=f,e.TextResourceEditorModel=f=fe([O(1,y.ILanguageService),O(2,b.IModelService),O(3,D.ILanguageDetectionService),O(4,T.IAccessibilityService)],f)}),define(Q[1376],Y([1,0,47,290,246,314,21]),function(q,e,t,y,b,D,T){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookDiffEditorInput=void 0;class v extends y.EditorModel{constructor(h,a){super(),this.original=h,this.modified=a}}let m=class extends b.DiffEditorInput{static{f=this}static create(h,a,r,i,s,o){const u=D.NotebookEditorInput.create(h,s,o),d=D.NotebookEditorInput.create(h,a,o);return h.createInstance(f,r,i,u,d,o)}static{this.ID="workbench.input.diffNotebookInput"}get resource(){return this.modified.resource}get editorId(){return this.viewType}constructor(h,a,r,i,s,o){super(h,a,r,i,void 0,o),this.original=r,this.modified=i,this.viewType=s,this._modifiedTextModel=null,this._originalTextModel=null,this._cachedModel=void 0}get typeId(){return f.ID}async resolve(){const[h,a]=await Promise.all([this.original.resolve(),this.modified.resolve()]);if(this._cachedModel?.dispose(),!a)throw new Error(`Fail to resolve modified editor model for resource ${this.modified.resource} with notebookType ${this.viewType}`);if(!h)throw new Error(`Fail to resolve original editor model for resource ${this.original.resource} with notebookType ${this.viewType}`);return this._originalTextModel=h,this._modifiedTextModel=a,this._cachedModel=new v(this._originalTextModel,this._modifiedTextModel),this._cachedModel}toUntyped(){const h={resource:this.original.resource},a={resource:this.resource};return{original:h,modified:a,primary:a,secondary:h,options:{override:this.viewType}}}matches(h){return this===h?!0:h instanceof f?this.modified.matches(h.modified)&&this.original.matches(h.original)&&this.viewType===h.viewType:(0,t.isResourceDiffEditorInput)(h)?this.modified.matches(h.modified)&&this.original.matches(h.original)&&this.editorId!==void 0&&(this.editorId===h.options?.override||h.options?.override===void 0):!1}dispose(){super.dispose(),this._cachedModel?.dispose(),this._cachedModel=void 0,this.original.dispose(),this.modified.dispose(),this._originalTextModel=null,this._modifiedTextModel=null}};e.NotebookDiffEditorInput=m,e.NotebookDiffEditorInput=m=f=fe([O(5,T.IEditorService)],m)}),define(Q[3895],Y([1,0,4,384,22,65,9,50,10,18,35,57,577,30,697,125,862,39,21,24,69,11]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageDetectionWorkerClient=e.LanguageDetectionWorkerHost=e.LanguageDetectionService=void 0;const g=12,w=`${b.nodeModulesPath}/vscode-regexp-languagedetection`,E=`${b.nodeModulesAsarPath}/vscode-regexp-languagedetection`,C=`${b.nodeModulesPath}/@vscode/vscode-languagedetection`,I=`${b.nodeModulesAsarPath}/@vscode/vscode-languagedetection`;let _=class extends t.Disposable{static{n=this}static{this.enablementSettingKey="workbench.editor.languageDetection"}static{this.historyBasedEnablementConfig="workbench.editor.historyBasedLanguageDetection"}static{this.preferHistoryConfig="workbench.editor.preferHistoryBasedLanguageDetection"}static{this.workspaceOpenedLanguagesStorageKey="workbench.editor.languageDetectionOpenedLanguages.workspace"}static{this.globalOpenedLanguagesStorageKey="workbench.editor.languageDetectionOpenedLanguages.global"}constructor(R,M,N,P,x,F,V,W,z,B,K){super(),this._environmentService=R,this._configurationService=N,this._diagnosticsService=P,this._workspaceContextService=x,this._editorService=V,this._logService=B,this.hasResolvedWorkspaceLanguageIds=!1,this.workspaceLanguageIds=new Set,this.sessionOpenedLanguageIds=new Set,this.historicalGlobalOpenedLanguageIds=new c.LRUCache(g),this.historicalWorkspaceOpenedLanguageIds=new c.LRUCache(g),this.dirtyBiases=!0,this.langBiases={},this._languageDetectionWorkerClient=new k(F,M,W,this._environmentService.isBuilt&&!m.isWeb?b.FileAccess.asBrowserUri(`${I}/dist/lib/index.js`).toString(!0):b.FileAccess.asBrowserUri(`${C}/dist/lib/index.js`).toString(!0),this._environmentService.isBuilt&&!m.isWeb?b.FileAccess.asBrowserUri(`${I}/model/model.json`).toString(!0):b.FileAccess.asBrowserUri(`${C}/model/model.json`).toString(!0),this._environmentService.isBuilt&&!m.isWeb?b.FileAccess.asBrowserUri(`${I}/model/group1-shard1of1.bin`).toString(!0):b.FileAccess.asBrowserUri(`${C}/model/group1-shard1of1.bin`).toString(!0),this._environmentService.isBuilt&&!m.isWeb?b.FileAccess.asBrowserUri(`${E}/dist/index.js`).toString(!0):b.FileAccess.asBrowserUri(`${w}/dist/index.js`).toString(!0),K),this.initEditorOpenedListeners(z)}async resolveWorkspaceLanguageIds(){if(this.hasResolvedWorkspaceLanguageIds)return;this.hasResolvedWorkspaceLanguageIds=!0;const R=await this._diagnosticsService.getWorkspaceFileExtensions(this._workspaceContextService.getWorkspace());let M=0;for(const N of R.extensions){const P=this._languageDetectionWorkerClient.getLanguageId(N);if(P&&M<g&&(this.workspaceLanguageIds.add(P),M++,M>g))break}this.dirtyBiases=!0}isEnabledForLanguage(R){return!!R&&this._configurationService.getValue(n.enablementSettingKey,{overrideIdentifier:R})}getLanguageBiases(){if(!this.dirtyBiases)return this.langBiases;const R={};return this.sessionOpenedLanguageIds.forEach(M=>R[M]=(R[M]??0)+7),this.workspaceLanguageIds.forEach(M=>R[M]=(R[M]??0)+5),[...this.historicalWorkspaceOpenedLanguageIds.keys()].forEach(M=>R[M]=(R[M]??0)+3),[...this.historicalGlobalOpenedLanguageIds.keys()].forEach(M=>R[M]=(R[M]??0)+1),this._logService.trace("Session Languages:",JSON.stringify([...this.sessionOpenedLanguageIds])),this._logService.trace("Workspace Languages:",JSON.stringify([...this.workspaceLanguageIds])),this._logService.trace("Historical Workspace Opened Languages:",JSON.stringify([...this.historicalWorkspaceOpenedLanguageIds.keys()])),this._logService.trace("Historical Globally Opened Languages:",JSON.stringify([...this.historicalGlobalOpenedLanguageIds.keys()])),this._logService.trace("Computed Language Detection Biases:",JSON.stringify(R)),this.dirtyBiases=!1,this.langBiases=R,R}async detectLanguage(R,M){const N=this._configurationService.getValue(n.historyBasedEnablementConfig),P=this._configurationService.getValue(n.preferHistoryConfig);N&&await this.resolveWorkspaceLanguageIds();const x=N?this.getLanguageBiases():void 0;return this._languageDetectionWorkerClient.detectLanguage(R,x,P,M)}initEditorOpenedListeners(R){try{const M=JSON.parse(R.get(n.globalOpenedLanguagesStorageKey,0,"[]"));this.historicalGlobalOpenedLanguageIds.fromJSON(M)}catch(M){console.error(M)}try{const M=JSON.parse(R.get(n.workspaceOpenedLanguagesStorageKey,1,"[]"));this.historicalWorkspaceOpenedLanguageIds.fromJSON(M)}catch(M){console.error(M)}this._register(this._editorService.onDidActiveEditorChange(()=>{const M=this._editorService.activeTextEditorLanguageId;M&&this._editorService.activeEditor?.resource?.scheme!==b.Schemas.untitled&&(this.sessionOpenedLanguageIds.add(M),this.historicalGlobalOpenedLanguageIds.set(M,!0),this.historicalWorkspaceOpenedLanguageIds.set(M,!0),R.store(n.globalOpenedLanguagesStorageKey,JSON.stringify(this.historicalGlobalOpenedLanguageIds.toJSON()),0,1),R.store(n.workspaceOpenedLanguagesStorageKey,JSON.stringify(this.historicalWorkspaceOpenedLanguageIds.toJSON()),1,1),this.dirtyBiases=!0)}))}};e.LanguageDetectionService=_,e.LanguageDetectionService=_=n=fe([O(0,D.IWorkbenchEnvironmentService),O(1,f.ILanguageService),O(2,T.IConfigurationService),O(3,o.IDiagnosticsService),O(4,u.IWorkspaceContextService),O(5,h.IModelService),O(6,d.IEditorService),O(7,r.ITelemetryService),O(8,p.IStorageService),O(9,l.ILogService),O(10,s.ILanguageConfigurationService)],_);class A{constructor(R,M,N,P){this._indexJsUri=R,this._modelJsonUri=M,this._weightsUri=N,this._telemetryService=P}async getIndexJsUri(){return this._indexJsUri}async getModelJsonUri(){return this._modelJsonUri}async getWeightsUri(){return this._weightsUri}async sendTelemetryEvent(R,M,N){this._telemetryService.publicLog2("automaticlanguagedetection.stats",{languages:R.join(","),confidences:M.join(","),timeSpent:N})}}e.LanguageDetectionWorkerHost=A;class k extends i.EditorWorkerClient{constructor(R,M,N,P,x,F,V,W){super(R,!0,"languageDetectionWorkerService",W),this._languageService=M,this._telemetryService=N,this._indexJsUri=P,this._modelJsonUri=x,this._weightsUri=F,this._regexpModelUri=V}_getOrCreateLanguageDetectionWorker(){return this.workerPromise?this.workerPromise:(this.workerPromise=new Promise((R,M)=>{R(this._register(new a.SimpleWorkerClient(this._workerFactory,"vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorker",new i.EditorWorkerHost(this))))}),this.workerPromise)}_guessLanguageIdByUri(R){const M=this._languageService.guessLanguageIdByFilepathOrFirstLine(R);if(M&&M!=="unknown")return M}async _getProxy(){return(await this._getOrCreateLanguageDetectionWorker()).getProxyObject()}async fhr(R,M){switch(R){case"getIndexJsUri":return this.getIndexJsUri();case"getModelJsonUri":return this.getModelJsonUri();case"getWeightsUri":return this.getWeightsUri();case"getRegexpModelUri":return this.getRegexpModelUri();case"getLanguageId":return this.getLanguageId(M[0]);case"sendTelemetryEvent":return this.sendTelemetryEvent(M[0],M[1],M[2]);default:return super.fhr(R,M)}}async getIndexJsUri(){return this._indexJsUri}getLanguageId(R){if(!R)return;if(this._languageService.isRegisteredLanguageId(R))return R;const M=this._guessLanguageIdByUri(v.URI.file(`file.${R}`));if(!(!M||M==="unknown"))return M}async getModelJsonUri(){return this._modelJsonUri}async getWeightsUri(){return this._weightsUri}async getRegexpModelUri(){return this._regexpModelUri}async sendTelemetryEvent(R,M,N){this._telemetryService.publicLog2(y.LanguageDetectionStatsId,{languages:R.join(","),confidences:M.join(","),timeSpent:N})}async detectLanguage(R,M,N,P){const x=Date.now(),F=this._guessLanguageIdByUri(R);if(F)return F;await this._withSyncedResources([R]);const V=await(await this._getProxy()).detectLanguage(R.toString(),M,N,P),W=this.getLanguageId(V),z="automaticlanguagedetection.perf";return this._telemetryService.publicLog2(z,{timeSpent:Date.now()-x,detection:W||"unknown"}),W}}e.LanguageDetectionWorkerClient=k,(0,S.registerSingleton)(y.ILanguageDetectionService,_,0)}),define(Q[748],Y([1,0,33,676,35,5]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageStatusService=void 0,e.ILanguageStatusService=(0,D.createDecorator)("ILanguageStatusService");class T{constructor(){this._provider=new y.LanguageFeatureRegistry,this.onDidChange=this._provider.onDidChange}addStatus(v){return this._provider.register(v.selector,v)}getLanguageStatus(v){return this._provider.ordered(v).sort((m,S)=>{let h=S.severity-m.severity;return h===0&&(h=(0,t.compare)(m.source,S.source)),h===0&&(h=(0,t.compare)(m.id,S.id)),h})}}(0,b.registerSingleton)(e.ILanguageStatusService,T,1)}),define(Q[3896],Y([1,0,10,50,57,53,60,27,75,748,4]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadLanguages=void 0;let h=class{constructor(r,i,s,o,u){this._languageService=i,this._modelService=s,this._resolverService=o,this._languageStatusService=u,this._disposables=new S.DisposableStore,this._status=new S.DisposableMap,this._proxy=r.getProxy(D.ExtHostContext.ExtHostLanguages),this._proxy.$acceptLanguageIds(i.getRegisteredLanguageIds()),this._disposables.add(i.onDidChange(d=>{this._proxy.$acceptLanguageIds(i.getRegisteredLanguageIds())}))}dispose(){this._disposables.dispose(),this._status.dispose()}async $changeLanguage(r,i){if(!this._languageService.isRegisteredLanguageId(i))return Promise.reject(new Error(`Unknown language id: ${i}`));const s=t.URI.revive(r),o=await this._resolverService.createModelReference(s);try{o.object.textEditorModel.setLanguage(this._languageService.createById(i))}finally{o.dispose()}}async $tokensAtPosition(r,i){const s=t.URI.revive(r),o=this._modelService.getModel(s);if(!o)return;o.tokenization.tokenizeIfCheap(i.lineNumber);const u=o.tokenization.getLineTokens(i.lineNumber),d=u.findTokenIndexAtOffset(i.column-1);return{type:u.getStandardTokenType(d),range:new f.Range(i.lineNumber,1+u.getStartOffset(d),i.lineNumber,1+u.getEndOffset(d))}}$setLanguageStatus(r,i){this._status.get(r)?.dispose(),this._status.set(r,this._languageStatusService.addStatus(i))}$removeLanguageStatus(r){this._status.get(r)?.dispose()}};e.MainThreadLanguages=h,e.MainThreadLanguages=h=fe([(0,T.extHostNamedCustomer)(D.MainContext.MainThreadLanguages),O(1,y.ILanguageService),O(2,b.IModelService),O(3,v.ITextModelService),O(4,m.ILanguageStatusService)],h)}),define(Q[92],Y([1,0,5,111]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.panelOpensMaximizedFromString=e.positionFromString=e.positionToString=e.PanelOpensMaximizedOptions=e.Position=e.Parts=e.IWorkbenchLayoutService=void 0,e.IWorkbenchLayoutService=(0,t.refineServiceDecorator)(y.ILayoutService);var b;(function(r){r.TITLEBAR_PART="workbench.parts.titlebar",r.BANNER_PART="workbench.parts.banner",r.ACTIVITYBAR_PART="workbench.parts.activitybar",r.SIDEBAR_PART="workbench.parts.sidebar",r.PANEL_PART="workbench.parts.panel",r.AUXILIARYBAR_PART="workbench.parts.auxiliarybar",r.EDITOR_PART="workbench.parts.editor",r.STATUSBAR_PART="workbench.parts.statusbar"})(b||(e.Parts=b={}));var D;(function(r){r[r.LEFT=0]="LEFT",r[r.RIGHT=1]="RIGHT",r[r.BOTTOM=2]="BOTTOM"})(D||(e.Position=D={}));var T;(function(r){r[r.ALWAYS=0]="ALWAYS",r[r.NEVER=1]="NEVER",r[r.REMEMBER_LAST=2]="REMEMBER_LAST"})(T||(e.PanelOpensMaximizedOptions=T={}));function f(r){switch(r){case 0:return"left";case 1:return"right";case 2:return"bottom";default:return"bottom"}}e.positionToString=f;const v={[f(0)]:0,[f(1)]:1,[f(2)]:2};function m(r){return v[r]}e.positionFromString=m;function S(r){switch(r){case 0:return"always";case 1:return"never";case 2:return"preserve";default:return"preserve"}}const h={[S(0)]:0,[S(1)]:1,[S(2)]:2};function a(r){return h[r]}e.panelOpensMaximizedFromString=a}),define(Q[3897],Y([1,0,13,8,82,46,92]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleViewAction=void 0;class f extends t.Action2{constructor(m,S,h,a){super({id:m,title:{value:h,original:S},category:"View",f1:!0,keybinding:a}),this.viewId=m}run(m){const S=m.get(y.IContextKeyService),h=m.get(D.IViewDescriptorService),a=m.get(D.IViewsService),r=m.get(T.IWorkbenchLayoutService);b.FocusedViewContext.getValue(S)===this.viewId?h.getViewLocationById(this.viewId)===0?r.setPartHidden(!0,"workbench.parts.sidebar"):r.setPartHidden(!0,"workbench.parts.panel"):a.openView(this.viewId,!0)}}e.ToggleViewAction=f}),define(Q[3898],Y([1,0,19,1994,174,92,76,8,68,11,78,147]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigureChartDialog=void 0;let a=class extends b.Modal{constructor(i,s,o,u,d,p,c,l,n,g){super(i,s,p,u,l,d,n,g,c,void 0),this._chart=o}open(){this.show()}render(){super.render(),(0,h.attachModalDialogStyler)(this,this._themeService),this.addFooterButton((0,y.localize)(0,null),()=>this.close())}renderBody(i){i.appendChild(this._chart.optionsControl)}layout(i){}close(){this.hide("close")}};e.ConfigureChartDialog=a,e.ConfigureChartDialog=a=fe([O(3,D.IWorkbenchLayoutService),O(4,t.IThemeService),O(5,T.IAdsTelemetryService),O(6,f.IContextKeyService),O(7,v.IClipboardService),O(8,m.ILogService),O(9,S.ITextResourcePropertiesService)],a)}),define(Q[3899],Y([1,0,2153,3897]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTasksAction=void 0;class b extends y.ToggleViewAction{static{this.ID="workbench.action.tasks.toggleTasks"}static{this.LABEL_ORG="Toggle Tasks"}static{this.LABEL=(0,t.localize)(0,null)}constructor(){super(b.ID,b.LABEL_ORG,b.LABEL,{weight:200,primary:2098})}}e.ToggleTasksAction=b}),define(Q[3900],Y([1,0,2534,7,85,35,5,24,19,37,521,92,34,276,6,742,209,13,81,113,8,10,77,82,1761]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerPart=void 0;let w=class extends S.Part{get minimumHeight(){return this.visible?this.height:0}get maximumHeight(){return this.visible?this.height:0}get onDidChange(){return this._onDidChangeSize.event}constructor(I,_,A,k,L){super("workbench.parts.banner",{hasTitle:!1},I,A,_),this.contextKeyService=k,this.instantiationService=L,this.height=26,this.minimumWidth=0,this.maximumWidth=Number.POSITIVE_INFINITY,this._onDidChangeSize=this._register(new i.Emitter),this.visible=!1,this.focusedActionIndex=-1,this.markdownRenderer=this.instantiationService.createInstance(o.MarkdownRenderer,{})}createContentArea(I){this.element=I,this.element.tabIndex=0,this._register((0,y.addDisposableListener)(this.element,y.EventType.FOCUS,()=>{this.focusedActionIndex!==-1&&this.focusActionLink()}));const _=this.contextKeyService.createScoped(this.element);return g.BannerFocused.bindTo(_).set(!0),this.element}close(I){this.setVisibility(!1),(0,y.clearNode)(this.element),typeof I.onClose=="function"&&I.onClose(),this.item=void 0}focusActionLink(){const I=this.item?.actions?.length??0;if(this.focusedActionIndex<I){const _=this.messageActionsContainer?.children[this.focusedActionIndex];_ instanceof HTMLElement&&(this.actionBar?.setFocusable(!1),_.focus())}else this.actionBar?.focus(0)}getAriaLabel(I){if(I.ariaLabel)return I.ariaLabel;if(typeof I.message=="string")return I.message}getBannerMessage(I){if(typeof I=="string"){const _=(0,y.$)("span");return _.innerText=I,_}return this.markdownRenderer.render(I).element}setVisibility(I){I!==this.visible&&(this.visible=I,this.focusedActionIndex=-1,this.layoutService.setPartHidden(!I,"workbench.parts.banner"),this._onDidChangeSize.fire(void 0))}focus(){this.focusedActionIndex=-1,this.element.focus()}focusNextAction(){const I=this.item?.actions?.length??0;this.focusedActionIndex=this.focusedActionIndex<I?this.focusedActionIndex+1:0,this.focusActionLink()}focusPreviousAction(){const I=this.item?.actions?.length??0;this.focusedActionIndex=this.focusedActionIndex>0?this.focusedActionIndex-1:I,this.focusActionLink()}hide(I){this.item?.id===I&&this.setVisibility(!1)}show(I){if(I.id===this.item?.id){this.setVisibility(!0);return}(0,y.clearNode)(this.element);const _=this.getAriaLabel(I);_&&this.element.setAttribute("aria-label",_);const A=(0,y.append)(this.element,(0,y.$)("div.icon-container"));A.setAttribute("aria-hidden","true"),m.ThemeIcon.isThemeIcon(I.icon)?A.appendChild((0,y.$)(`div${m.ThemeIcon.asCSSSelector(I.icon)}`)):(A.classList.add("custom-icon"),l.URI.isUri(I.icon)&&(A.style.backgroundImage=(0,y.asCSSUrl)(I.icon)));const k=(0,y.append)(this.element,(0,y.$)("div.message-container"));if(k.setAttribute("aria-hidden","true"),k.appendChild(this.getBannerMessage(I.message)),this.messageActionsContainer=(0,y.append)(this.element,(0,y.$)("div.message-actions-container")),I.actions)for(const M of I.actions)this._register(this.instantiationService.createInstance(r.Link,this.messageActionsContainer,{...M,tabIndex:-1},{}));const L=(0,y.append)(this.element,(0,y.$)("div.action-container"));this.actionBar=this._register(new b.ActionBar(L));const R=this._register(new a.Action("banner.close","Close Banner",m.ThemeIcon.asClassName(n.widgetClose),!0,()=>this.close(I)));this.actionBar.push(R,{icon:!0,label:!1}),this.actionBar.setFocusable(!1),this.setVisibility(!0),this.item=I}toJSON(){return{type:"workbench.parts.banner"}}};e.BannerPart=w,e.BannerPart=w=fe([O(0,v.IThemeService),O(1,h.IWorkbenchLayoutService),O(2,f.IStorageService),O(3,c.IContextKeyService),O(4,T.IInstantiationService)],w),(0,D.registerSingleton)(s.IBannerService,w,0),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.banner.focusBanner",weight:200,primary:9,when:g.BannerFocused,handler:C=>{C.get(s.IBannerService).focus()}}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.banner.focusNextAction",weight:200,primary:17,secondary:[18],when:g.BannerFocused,handler:C=>{C.get(s.IBannerService).focusNextAction()}}),p.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.banner.focusPreviousAction",weight:200,primary:15,secondary:[16],when:g.BannerFocused,handler:C=>{C.get(s.IBannerService).focusPreviousAction()}});class E extends u.Action2{static{this.ID="workbench.action.focusBanner"}static{this.LABEL=(0,t.localize)(0,null)}constructor(){super({id:E.ID,title:{value:E.LABEL,original:"Focus Banner"},category:d.Categories.View,f1:!0})}async run(I){I.get(h.IWorkbenchLayoutService).focusPart("workbench.parts.banner")}}(0,u.registerAction2)(E)}),define(Q[3901],Y([1,0,84,19,92,6,8,522,1259,5,7,36,70,2564,85,910,38,17,82,23,1772,1060]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsCenter=void 0;let l=class extends y.Themable{static{c=this}static{this.MAX_DIMENSIONS=new S.Dimension(450,400)}constructor(g,w,E,C,I,_,A,k,L){super(E),this.container=g,this.model=w,this.instantiationService=C,this.layoutService=I,this.contextKeyService=_,this.editorGroupService=A,this.keybindingService=k,this.notificationService=L,this._onDidChangeVisibility=this._register(new D.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.notificationsCenterVisibleContextKey=d.NotificationsCenterVisibleContext.bindTo(this.contextKeyService),this.notificationsCenterVisibleContextKey=d.NotificationsCenterVisibleContext.bindTo(_),this.registerListeners()}registerListeners(){this._register(this.model.onDidChangeNotification(g=>this.onDidChangeNotification(g))),this._register(this.layoutService.onDidLayout(g=>this.layout(S.Dimension.lift(g)))),this._register(this.notificationService.onDidChangeDoNotDisturbMode(()=>this.onDidChangeDoNotDisturbMode()))}onDidChangeDoNotDisturbMode(){this.hide()}get isVisible(){return!!this._isVisible}show(){if(this._isVisible){const E=(0,u.assertIsDefined)(this.notificationsList);E.show(),E.focusFirst();return}this.notificationsCenterContainer||this.create(),this.updateTitle();const[g,w]=(0,u.assertAllDefined)(this.notificationsList,this.notificationsCenterContainer);this._isVisible=!0,w.classList.add("visible"),g.show(),this.layout(this.workbenchDimensions),g.updateNotificationsList(0,0,this.model.notifications),g.focusFirst(),this.updateStyles(),this.model.notifications.forEach(E=>E.updateVisibility(!0)),this.notificationsCenterVisibleContextKey.set(!0),this._onDidChangeVisibility.fire()}updateTitle(){const[g,w]=(0,u.assertAllDefined)(this.notificationsCenterTitle,this.clearAllAction);this.model.notifications.length===0?(g.textContent=(0,r.localize)(0,null),w.enabled=!1):(g.textContent=(0,r.localize)(1,null),w.enabled=this.model.notifications.some(E=>!E.hasProgress))}create(){this.notificationsCenterContainer=document.createElement("div"),this.notificationsCenterContainer.classList.add("notifications-center"),this.notificationsCenterHeader=document.createElement("div"),this.notificationsCenterHeader.classList.add("notifications-center-header"),this.notificationsCenterContainer.appendChild(this.notificationsCenterHeader),this.notificationsCenterTitle=document.createElement("span"),this.notificationsCenterTitle.classList.add("notifications-center-header-title"),this.notificationsCenterHeader.appendChild(this.notificationsCenterTitle);const g=document.createElement("div");g.classList.add("notifications-center-header-toolbar"),this.notificationsCenterHeader.appendChild(g);const w=this._register(this.instantiationService.createInstance(f.NotificationActionRunner)),E=this._register(new i.ActionBar(g,{ariaLabel:(0,r.localize)(2,null),actionRunner:w}));this.clearAllAction=this._register(this.instantiationService.createInstance(s.ClearAllNotificationsAction,s.ClearAllNotificationsAction.ID,s.ClearAllNotificationsAction.LABEL)),E.push(this.clearAllAction,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(this.clearAllAction)}),this.toggleDoNotDisturbAction=this._register(this.instantiationService.createInstance(s.ToggleDoNotDisturbAction,s.ToggleDoNotDisturbAction.ID,s.ToggleDoNotDisturbAction.LABEL)),E.push(this.toggleDoNotDisturbAction,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(this.toggleDoNotDisturbAction)});const C=this._register(this.instantiationService.createInstance(s.HideNotificationsCenterAction,s.HideNotificationsCenterAction.ID,s.HideNotificationsCenterAction.LABEL));E.push(C,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(C)}),this.notificationsList=this.instantiationService.createInstance(v.NotificationsList,this.notificationsCenterContainer,{widgetAriaLabel:(0,r.localize)(3,null)}),this.container.appendChild(this.notificationsCenterContainer)}getKeybindingLabel(g){const w=this.keybindingService.lookupKeybinding(g.id);return w?w.getLabel():null}onDidChangeNotification(g){if(!this._isVisible)return;let w=!1;const[E,C]=(0,u.assertAllDefined)(this.notificationsList,this.notificationsCenterContainer);switch(g.kind){case 0:E.updateNotificationsList(g.index,0,[g.item]),g.item.updateVisibility(!0);break;case 1:switch(g.detail){case 2:E.updateNotificationsList(g.index,1,[g.item]);break;case 1:g.item.expanded&&E.updateNotificationHeight(g.item);break}break;case 2:E.updateNotificationsList(g.index,1,[g.item]);break;case 3:w=(0,S.isAncestor)(document.activeElement,C),E.updateNotificationsList(g.index,1),g.item.updateVisibility(!1);break}this.updateTitle(),this.model.notifications.length===0&&(this.hide(),w&&this.editorGroupService.activeGroup.focus())}hide(){if(!this._isVisible||!this.notificationsCenterContainer||!this.notificationsList)return;const g=(0,S.isAncestor)(document.activeElement,this.notificationsCenterContainer);this._isVisible=!1,this.notificationsCenterContainer.classList.remove("visible"),this.notificationsList.hide(),this.model.notifications.forEach(w=>w.updateVisibility(!1)),this.notificationsCenterVisibleContextKey.set(!1),this._onDidChangeVisibility.fire(),g&&this.editorGroupService.activeGroup.focus()}updateStyles(){if(this.notificationsCenterContainer&&this.notificationsCenterHeader){const g=this.getColor(h.widgetShadow);this.notificationsCenterContainer.style.boxShadow=g?`0 0 8px 2px ${g}`:"";const w=this.getColor(t.NOTIFICATIONS_CENTER_BORDER);this.notificationsCenterContainer.style.border=w?`1px solid ${w}`:"";const E=this.getColor(t.NOTIFICATIONS_CENTER_HEADER_FOREGROUND);this.notificationsCenterHeader.style.color=E??"";const C=this.getColor(t.NOTIFICATIONS_CENTER_HEADER_BACKGROUND);this.notificationsCenterHeader.style.background=C??""}}layout(g){if(this.workbenchDimensions=g,this._isVisible&&this.notificationsCenterContainer){const w=c.MAX_DIMENSIONS.width,E=c.MAX_DIMENSIONS.height;let C=w,I=E;this.workbenchDimensions&&(C=this.workbenchDimensions.width,C-=2*8,I=this.workbenchDimensions.height-35,this.layoutService.isVisible("workbench.parts.statusbar")&&(I-=22),this.layoutService.isVisible("workbench.parts.titlebar")&&(I-=22),I-=2*12),(0,u.assertIsDefined)(this.notificationsList).layout(Math.min(w,C),Math.min(E,I))}}clearAll(){this.hide();for(const g of[...this.model.notifications])g.hasProgress||g.close()}};e.NotificationsCenter=l,e.NotificationsCenter=l=c=fe([O(2,y.IThemeService),O(3,m.IInstantiationService),O(4,b.IWorkbenchLayoutService),O(5,T.IContextKeyService),O(6,a.IEditorGroupsService),O(7,o.IKeybindingService),O(8,p.INotificationService)],l)}),define(Q[336],Y([1,0,2663,5,6,4,31,3511,92,9,724,8]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentService=e.WorkspaceHasCommenting=e.ICommentService=void 0,e.ICommentService=(0,y.createDecorator)("commentService"),e.WorkspaceHasCommenting=new h.RawContextKey("workspaceHasCommenting",!1,{description:t.localize(0,null),type:"boolean"});let a=class extends D.Disposable{constructor(i,s,o,u){super(),this.instantiationService=i,this.layoutService=s,this.configurationService=o,this._onDidSetDataProvider=this._register(new b.Emitter),this.onDidSetDataProvider=this._onDidSetDataProvider.event,this._onDidDeleteDataProvider=this._register(new b.Emitter),this.onDidDeleteDataProvider=this._onDidDeleteDataProvider.event,this._onDidSetResourceCommentInfos=this._register(new b.Emitter),this.onDidSetResourceCommentInfos=this._onDidSetResourceCommentInfos.event,this._onDidSetAllCommentThreads=this._register(new b.Emitter),this.onDidSetAllCommentThreads=this._onDidSetAllCommentThreads.event,this._onDidUpdateCommentThreads=this._register(new b.Emitter),this.onDidUpdateCommentThreads=this._onDidUpdateCommentThreads.event,this._onDidUpdateNotebookCommentThreads=this._register(new b.Emitter),this.onDidUpdateNotebookCommentThreads=this._onDidUpdateNotebookCommentThreads.event,this._onDidUpdateCommentingRanges=this._register(new b.Emitter),this.onDidUpdateCommentingRanges=this._onDidUpdateCommentingRanges.event,this._onDidChangeActiveCommentThread=this._register(new b.Emitter),this.onDidChangeActiveCommentThread=this._onDidChangeActiveCommentThread.event,this._onDidChangeCurrentCommentThread=this._register(new b.Emitter),this.onDidChangeCurrentCommentThread=this._onDidChangeCurrentCommentThread.event,this._onDidChangeCommentingEnabled=this._register(new b.Emitter),this.onDidChangeCommentingEnabled=this._onDidChangeCommentingEnabled.event,this._onDidChangeActiveCommentingRange=this._register(new b.Emitter),this.onDidChangeActiveCommentingRange=this._onDidChangeActiveCommentingRange.event,this._commentControls=new Map,this._commentMenus=new Map,this._isCommentingEnabled=!0,this._handleConfiguration(),this._handleZenMode(),this._workspaceHasCommenting=e.WorkspaceHasCommenting.bindTo(u)}_handleConfiguration(){this._isCommentingEnabled=this._defaultCommentingEnablement,this._register(this.configurationService.onDidChangeConfiguration(i=>{i.affectsConfiguration("comments.visible")&&this.enableCommenting(this._defaultCommentingEnablement)}))}_handleZenMode(){let i=this._isCommentingEnabled;this._register(this.layoutService.onDidChangeZenMode(s=>{s?(i=this._isCommentingEnabled,this.enableCommenting(!1)):this.enableCommenting(i)}))}get _defaultCommentingEnablement(){return!!this.configurationService.getValue(S.COMMENTS_SECTION)?.visible}get isCommentingEnabled(){return this._isCommentingEnabled}enableCommenting(i){i!==this._isCommentingEnabled&&(this._isCommentingEnabled=i,this._onDidChangeCommentingEnabled.fire(i))}setCurrentCommentThread(i){this._onDidChangeCurrentCommentThread.fire(i)}setActiveCommentThread(i){this._onDidChangeActiveCommentThread.fire(i)}setDocumentComments(i,s){s.length&&this._workspaceHasCommenting.set(!0),this._onDidSetResourceCommentInfos.fire({resource:i,commentInfos:s})}setWorkspaceComments(i,s){s.length&&this._workspaceHasCommenting.set(!0),this._onDidSetAllCommentThreads.fire({ownerId:i,commentThreads:s})}removeWorkspaceComments(i){this._onDidSetAllCommentThreads.fire({ownerId:i,commentThreads:[]})}registerCommentController(i,s){this._commentControls.set(i,s),this._onDidSetDataProvider.fire()}unregisterCommentController(i){i?this._commentControls.delete(i):this._commentControls.clear(),this._onDidDeleteDataProvider.fire(i)}getCommentController(i){return this._commentControls.get(i)}createCommentThreadTemplate(i,s,o){const u=this._commentControls.get(i);u&&u.createCommentThreadTemplate(s,o)}async updateCommentThreadTemplate(i,s,o){const u=this._commentControls.get(i);u&&await u.updateCommentThreadTemplate(s,o)}disposeCommentThread(i,s){this.getCommentController(i)?.deleteCommentThreadMain(s)}getCommentMenus(i){if(this._commentMenus.get(i))return this._commentMenus.get(i);const s=this.instantiationService.createInstance(f.CommentMenus);return this._commentMenus.set(i,s),s}updateComments(i,s){const o=Object.assign({},s,{owner:i});this._onDidUpdateCommentThreads.fire(o)}updateNotebookComments(i,s){const o=Object.assign({},s,{owner:i});this._onDidUpdateNotebookCommentThreads.fire(o)}updateCommentingRanges(i){this._workspaceHasCommenting.set(!0),this._onDidUpdateCommentingRanges.fire({owner:i})}async toggleReaction(i,s,o,u,d){const p=this._commentControls.get(i);if(p)return p.toggleReaction(s,o,u,d,T.CancellationToken.None);throw new Error("Not supported")}hasReactionHandler(i){const s=this._commentControls.get(i);return s?!!s.features.reactionHandler:!1}async getDocumentComments(i){const s=[];return this._commentControls.forEach(o=>{s.push(o.getDocumentComments(i,T.CancellationToken.None).catch(u=>null))}),Promise.all(s)}async getNotebookComments(i){const s=[];return this._commentControls.forEach(o=>{s.push(o.getNotebookComments(i,T.CancellationToken.None).catch(u=>null))}),Promise.all(s)}};e.CommentService=a,e.CommentService=a=fe([O(0,y.IInstantiationService),O(1,v.IWorkbenchLayoutService),O(2,m.IConfigurationService),O(3,h.IContextKeyService)],a)}),define(Q[3902],Y([1,0,97,7,80,6,4,36,19,416,84,92,65,70,9,173,17,14,1307]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.PartsSplash=void 0;let c=class{static{p=this}static{this._splashElementId="monaco-parts-splash"}constructor(n,g,w,E,C,I){this._themeService=n,this._layoutService=g,this._environmentService=w,this._configService=C,this._partSplashService=I,this._disposables=new T.DisposableStore,D.Event.once(g.onDidLayout)(()=>{this._removePartsSplash(),s.mark("code/didRemovePartsSplash")},void 0,this._disposables);let _;D.Event.any(t.onDidChangeFullscreen,E.onDidLayout,n.onDidColorThemeChange)(()=>{_?.dispose(),_=(0,u.runWhenIdle)(()=>this._savePartsSplash(),800)},void 0,this._disposables),C.onDidChangeConfiguration(A=>{A.affectsConfiguration("window.titleBarStyle")&&(this._didChangeTitleBarStyle=!0,this._savePartsSplash())},this,this._disposables)}dispose(){this._disposables.dispose()}_savePartsSplash(){const n=this._themeService.getColorTheme();this._partSplashService.saveWindowSplash({zoomLevel:this._configService.getValue("window.zoomLevel"),baseTheme:(0,v.getThemeTypeSelector)(n.type),colorInfo:{foreground:n.getColor(f.foreground)?.toString(),background:b.Color.Format.CSS.formatHex(n.getColor(f.editorBackground)||S.WORKBENCH_BACKGROUND(n)),editorBackground:n.getColor(f.editorBackground)?.toString(),titleBarBackground:n.getColor(S.TITLE_BAR_ACTIVE_BACKGROUND)?.toString(),activityBarBackground:n.getColor(S.ACTIVITY_BAR_BACKGROUND)?.toString(),sideBarBackground:n.getColor(S.SIDE_BAR_BACKGROUND)?.toString(),statusBarBackground:n.getColor(S.STATUS_BAR_BACKGROUND)?.toString(),statusBarNoFolderBackground:n.getColor(S.STATUS_BAR_NO_FOLDER_BACKGROUND)?.toString(),windowBorder:n.getColor(S.WINDOW_ACTIVE_BORDER)?.toString()??n.getColor(S.WINDOW_INACTIVE_BORDER)?.toString()},layoutInfo:this._shouldSaveLayoutInfo()?{sideBarSide:this._layoutService.getSideBarPosition()===1?"right":"left",editorPartMinWidth:m.DEFAULT_EDITOR_MIN_DIMENSIONS.width,titleBarHeight:this._layoutService.isVisible("workbench.parts.titlebar")?y.getTotalHeight((0,o.assertIsDefined)(this._layoutService.getContainer("workbench.parts.titlebar"))):0,activityBarWidth:this._layoutService.isVisible("workbench.parts.activitybar")?y.getTotalWidth((0,o.assertIsDefined)(this._layoutService.getContainer("workbench.parts.activitybar"))):0,sideBarWidth:this._layoutService.isVisible("workbench.parts.sidebar")?y.getTotalWidth((0,o.assertIsDefined)(this._layoutService.getContainer("workbench.parts.sidebar"))):0,statusBarHeight:this._layoutService.isVisible("workbench.parts.statusbar")?y.getTotalHeight((0,o.assertIsDefined)(this._layoutService.getContainer("workbench.parts.statusbar"))):0,windowBorder:this._layoutService.hasWindowBorder(),windowBorderRadius:this._layoutService.getWindowBorderRadius()}:void 0})}_shouldSaveLayoutInfo(){return!(0,t.isFullscreen)()&&!this._environmentService.isExtensionDevelopment&&!this._didChangeTitleBarStyle}_removePartsSplash(){const n=document.getElementById(p._splashElementId);n&&(n.style.display="none");const g=document.head.getElementsByClassName("initialShellColors");g.length&&document.head.removeChild(g[0])}};e.PartsSplash=c,e.PartsSplash=c=p=fe([O(0,v.IThemeService),O(1,h.IWorkbenchLayoutService),O(2,a.IWorkbenchEnvironmentService),O(3,r.IEditorGroupsService),O(4,i.IConfigurationService),O(5,d.ISplashStorageService)],c)}),define(Q[3903],Y([1,0,7,715,13,8,29,5,24,30,19,164,119,954,158,18,324,23,1310,21,92]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalEditor=void 0;let l=class extends h.EditorPane{constructor(g,w,E,C,I,_,A,k,L,R,M,N,P){super(a.terminalEditorId,g,w,E),this._terminalEditorService=C,this._terminalProfileResolverService=I,this._terminalService=_,this._instantiationService=L,this._contextMenuService=R,this._notificationService=M,this._terminalProfileService=N,this._workbenchLayoutService=P,this._editorInput=void 0,this._cancelContextMenu=!1,this._dropdownMenu=this._register(k.createMenu(b.MenuId.TerminalNewDropdownContext,A)),this._instanceMenu=this._register(k.createMenu(b.MenuId.TerminalInstanceContext,A))}async setInput(g,w,E,C){this._editorInput?.terminalInstance?.detachFromElement(),this._editorInput=g,await super.setInput(g,w,E,C),this._editorInput.terminalInstance?.attachToElement(this._overflowGuardElement),this._lastDimension&&this.layout(this._lastDimension),this._editorInput.terminalInstance?.setVisible(this.isVisible()&&this._workbenchLayoutService.isVisible("workbench.parts.editor")),this._editorInput.terminalInstance&&(this._register(this._editorInput.terminalInstance.onDidFocus(()=>this._setActiveInstance())),this._editorInput.setCopyLaunchConfig(this._editorInput.terminalInstance.shellLaunchConfig))}clearInput(){super.clearInput(),this._editorInput?.terminalInstance?.detachFromElement(),this._editorInput=void 0}_setActiveInstance(){this._editorInput?.terminalInstance&&this._terminalEditorService.setActiveInstance(this._editorInput.terminalInstance)}focus(){this._editorInput?.terminalInstance?.focus()}createEditor(g){this._editorInstanceElement=g,this._overflowGuardElement=t.$(".terminal-overflow-guard.terminal-editor"),this._editorInstanceElement.appendChild(this._overflowGuardElement),this._registerListeners()}_registerListeners(){this._editorInstanceElement&&(this._register(t.addDisposableListener(this._editorInstanceElement,"mousedown",async g=>{if(this._terminalEditorService.instances.length!==0){if(g.which===2&&s.isLinux)this._terminalEditorService.activeInstance?.focus();else if(g.which===3){const w=this._terminalService.configHelper.config.rightClickBehavior;if(w==="nothing"){g.shiftKey||(this._cancelContextMenu=!0);return}else if(w==="copyPaste"||w==="paste"){const E=this._terminalEditorService.activeInstance;if(!E)return;if(w==="copyPaste"&&g.shiftKey){(0,d.openContextMenu)(g,this._editorInstanceElement,this._instanceMenu,this._contextMenuService);return}w==="copyPaste"&&E.hasSelection()?(await E.copySelection(),E.clearSelection()):o.BrowserFeatures.clipboard.readText?E.paste():this._notificationService.info(`This browser doesn't support the clipboard.readText API needed to trigger a paste, try ${s.isMacintosh?"\u2318":"Ctrl"}+V instead.`),s.isMacintosh&&setTimeout(()=>{E.clearSelection()},0),this._cancelContextMenu=!0}}}})),this._register(t.addDisposableListener(this._editorInstanceElement,"contextmenu",g=>{const w=this._terminalService.configHelper.config.rightClickBehavior;if(w==="nothing"&&!g.shiftKey){g.preventDefault(),g.stopImmediatePropagation(),this._cancelContextMenu=!1;return}else!this._cancelContextMenu&&w!=="copyPaste"&&w!=="paste"&&(this._cancelContextMenu||(0,d.openContextMenu)(g,this._editorInstanceElement,this._instanceMenu,this._contextMenuService),g.preventDefault(),g.stopImmediatePropagation(),this._cancelContextMenu=!1)})))}layout(g){this._editorInput?.terminalInstance?.layout(g),this._lastDimension=g}setVisible(g,w){super.setVisible(g,w),this._editorInput?.terminalInstance?.setVisible(g&&this._workbenchLayoutService.isVisible("workbench.parts.editor"))}getActionViewItem(g){switch(g.id){case"workbench.action.createTerminalEditor":if(g instanceof b.MenuItemAction){const w={viewColumn:p.ACTIVE_GROUP},E=(0,r.getTerminalActionBarArgs)(w,this._terminalProfileService.availableProfiles,this._getDefaultProfileName(),this._terminalProfileService.contributedProfiles,this._terminalService,this._dropdownMenu);return this._instantiationService.createInstance(y.DropdownWithPrimaryActionViewItem,g,E.dropdownAction,E.dropdownMenuActions,E.className,this._contextMenuService,{})}}return super.getActionViewItem(g)}_getDefaultProfileName(){let g;try{g=this._terminalProfileService.getDefaultProfileName()}catch{g=this._terminalProfileResolverService.defaultProfileName}return g}};e.TerminalEditor=l,e.TerminalEditor=l=fe([O(0,m.ITelemetryService),O(1,S.IThemeService),O(2,v.IStorageService),O(3,a.ITerminalEditorService),O(4,i.ITerminalProfileResolverService),O(5,a.ITerminalService),O(6,D.IContextKeyService),O(7,b.IMenuService),O(8,f.IInstantiationService),O(9,T.IContextMenuService),O(10,u.INotificationService),O(11,i.ITerminalProfileService),O(12,c.IWorkbenchLayoutService)],l)}),define(Q[749],Y([1,0,7,6,4,18,59,3031,8,24,30,19,164,943,424,946,70,21,86,92]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewEditor=e.CONTEXT_ACTIVE_WEBVIEW_PANEL_ID=void 0,e.CONTEXT_ACTIVE_WEBVIEW_PANEL_ID=new v.RawContextKey("activeWebviewPanelId","",{type:"string",description:f.localize(0,null)});let l=class extends a.EditorPane{static{c=this}static{this.ID="WebviewEditor"}get onDidFocus(){return this._onDidFocusWebview.event}constructor(g,w,E,C,I,_,A,k,L){super(c.ID,g,w,E),this._editorService=I,this._workbenchLayoutService=_,this._editorDropService=A,this._hostService=k,this._contextKeyService=L,this._visible=!1,this._isDisposed=!1,this._webviewVisibleDisposables=this._register(new b.DisposableStore),this._onFocusWindowHandler=this._register(new b.MutableDisposable),this._onDidFocusWebview=this._register(new y.Emitter),this._scopedContextKeyService=this._register(new b.MutableDisposable),this._register(y.Event.any(C.onDidScroll,C.onDidAddGroup,C.onDidRemoveGroup,C.onDidMoveGroup)(()=>{this.webview&&this._visible&&this.synchronizeWebviewContainerDimensions(this.webview)}))}get webview(){return this.input instanceof i.WebviewInput?this.input.webview:void 0}get scopedContextKeyService(){return this._scopedContextKeyService.value}createEditor(g){const w=document.createElement("div");this._element=w,this._element.id=`webview-editor-element-${(0,T.generateUuid)()}`,g.appendChild(w),this._scopedContextKeyService.value=this._contextKeyService.createScoped(w)}dispose(){this._isDisposed=!0,this._element?.remove(),this._element=void 0,super.dispose()}layout(g){this._dimension=g,this.webview&&this._visible&&this.synchronizeWebviewContainerDimensions(this.webview,g)}focus(){super.focus(),!this._onFocusWindowHandler.value&&!D.isWeb&&(this._onFocusWindowHandler.value=this._hostService.onDidChangeFocus(g=>{g&&this._editorService.activeEditorPane===this&&this._workbenchLayoutService.hasFocus("workbench.parts.editor")&&this.focus()})),this.webview?.focus()}setEditorVisible(g,w){this._visible=g,this.input instanceof i.WebviewInput&&this.webview&&(g?this.claimWebview(this.input):this.webview.release(this)),super.setEditorVisible(g,w)}clearInput(){this.webview&&(this.webview.release(this),this._webviewVisibleDisposables.clear()),super.clearInput()}async setInput(g,w,E,C){if(this.input&&g.matches(this.input))return;const I=g instanceof i.WebviewInput&&g.webview===this.webview;this.webview&&!I&&this.webview.release(this),await super.setInput(g,w,E,C),await g.resolve(w),!(C.isCancellationRequested||this._isDisposed)&&g instanceof i.WebviewInput&&(this.group&&g.updateGroup(this.group.id),I||this.claimWebview(g),this._dimension&&this.layout(this._dimension))}claimWebview(g){g.webview.claim(this,this.scopedContextKeyService),this._element&&(this._element.setAttribute("aria-flowto",g.webview.container.id),t.setParentFlowTo(g.webview.container,this._element)),this._webviewVisibleDisposables.clear(),this._webviewVisibleDisposables.add(this._editorDropService.createEditorDropTarget(g.webview.container,{containsGroup:w=>this.group?.id===w.id})),this._webviewVisibleDisposables.add(new r.WebviewWindowDragMonitor(()=>this.webview)),this.synchronizeWebviewContainerDimensions(g.webview),this._webviewVisibleDisposables.add(this.trackFocus(g.webview))}synchronizeWebviewContainerDimensions(g,w){if(!this._element?.isConnected)return;const E=this._workbenchLayoutService.getContainer("workbench.parts.editor");g.layoutWebviewOverElement(this._element.parentElement,w,E)}trackFocus(g){const w=new b.DisposableStore,E=t.trackFocus(g.container);return w.add(E),w.add(E.onDidFocus(()=>this._onDidFocusWebview.fire())),w.add(g.onDidFocus(()=>this._onDidFocusWebview.fire())),w}};e.WebviewEditor=l,e.WebviewEditor=l=c=fe([O(0,S.ITelemetryService),O(1,h.IThemeService),O(2,m.IStorageService),O(3,o.IEditorGroupsService),O(4,u.IEditorService),O(5,p.IWorkbenchLayoutService),O(6,s.IEditorDropService),O(7,d.IHostService),O(8,v.IContextKeyService)],l)}),define(Q[3904],Y([1,0,73,3030,13,8,81,222,749,424,21]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReloadWebviewAction=e.WebViewEditorFindPreviousCommand=e.WebViewEditorFindNextCommand=e.HideWebViewEditorFindCommand=e.ShowWebViewEditorFindWidgetAction=void 0;const h=D.ContextKeyExpr.and(D.ContextKeyExpr.equals("activeEditor",v.WebviewEditor.ID),t.EditorContextKeys.focus.toNegated());class a extends b.Action2{static{this.ID="editor.action.webvieweditor.showFind"}static{this.LABEL=y.localize(0,null)}constructor(){super({id:a.ID,title:a.LABEL,keybinding:{when:D.ContextKeyExpr.and(h,f.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED),primary:2084,weight:100}})}run(p){u(p)?.showFind()}}e.ShowWebViewEditorFindWidgetAction=a;class r extends b.Action2{static{this.ID="editor.action.webvieweditor.hideFind"}static{this.LABEL=y.localize(1,null)}constructor(){super({id:r.ID,title:r.LABEL,keybinding:{when:D.ContextKeyExpr.and(h,f.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE),primary:9,weight:100}})}run(p){u(p)?.hideFind()}}e.HideWebViewEditorFindCommand=r;class i extends b.Action2{static{this.ID="editor.action.webvieweditor.findNext"}static{this.LABEL=y.localize(2,null)}constructor(){super({id:i.ID,title:i.LABEL,keybinding:{when:D.ContextKeyExpr.and(h,f.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED),primary:3,weight:100}})}run(p){u(p)?.runFindAction(!1)}}e.WebViewEditorFindNextCommand=i;class s extends b.Action2{static{this.ID="editor.action.webvieweditor.findPrevious"}static{this.LABEL=y.localize(3,null)}constructor(){super({id:s.ID,title:s.LABEL,keybinding:{when:D.ContextKeyExpr.and(h,f.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED),primary:1027,weight:100}})}run(p){u(p)?.runFindAction(!0)}}e.WebViewEditorFindPreviousCommand=s;class o extends b.Action2{static{this.ID="workbench.action.webview.reloadWebviewAction"}static{this.LABEL=y.localize(4,null)}constructor(){super({id:o.ID,title:{value:o.LABEL,original:"Reload Webviews"},category:T.Categories.Developer,menu:[{id:b.MenuId.CommandPalette}]})}async run(p){const c=p.get(f.IWebviewService);for(const l of c.webviews)l.reload()}}e.ReloadWebviewAction=o;function u(d){const c=d.get(S.IEditorService).activeEditor;return c instanceof m.WebviewInput?c.webview:void 0}}),define(Q[89],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LifecyclePhaseToString=e.LifecyclePhase=e.StartupKindToString=e.StartupKind=e.ShutdownReason=e.ILifecycleService=void 0,e.ILifecycleService=(0,t.createDecorator)("lifecycleService");var y;(function(v){v[v.CLOSE=1]="CLOSE",v[v.QUIT=2]="QUIT",v[v.RELOAD=3]="RELOAD",v[v.LOAD=4]="LOAD"})(y||(e.ShutdownReason=y={}));var b;(function(v){v[v.NewWindow=1]="NewWindow",v[v.ReloadedWindow=3]="ReloadedWindow",v[v.ReopenedWindow=4]="ReopenedWindow"})(b||(e.StartupKind=b={}));function D(v){switch(v){case 1:return"NewWindow";case 3:return"ReloadedWindow";case 4:return"ReopenedWindow"}}e.StartupKindToString=D;var T;(function(v){v[v.Starting=1]="Starting",v[v.Ready=2]="Ready",v[v.Restored=3]="Restored",v[v.Eventually=4]="Eventually"})(T||(e.LifecyclePhase=T={}));function f(v){switch(v){case 1:return"Starting";case 2:return"Ready";case 3:return"Restored";case 4:return"Eventually"}}e.LifecyclePhaseToString=f}),define(Q[3905],Y([1,0,2253,363,21,1290,5,76,49,89]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TableDesignerService=void 0;let S=class{constructor(a,r,i,s,o){this._editorService=a,this._instantiationService=r,this._adsTelemetryService=i,this._lifecycleService=s,this._dialogService=o,this._providers=new Map,this._lifecycleService.onBeforeShutdown(async u=>{u.veto(this.confirmBeforeExit(),"veto.tableDesigner")})}async confirmBeforeExit(){return this._editorService.editors.filter(r=>r instanceof D.TableDesignerInput&&r.isDirty()).length>0?!(await this._dialogService.confirm({message:(0,t.localize)(0,null),primaryButton:(0,t.localize)(1,null),type:"question"})).confirmed:!1}registerProvider(a,r){if(this._providers.has(a))throw new Error(`A table designer provider with id "${a}" is already registered`);this._providers.set(a,r)}unregisterProvider(a){this._providers.delete(a)}getProvider(a){const r=this._providers.get(a);if(r)return r;throw(0,y.invalidProvider)(a)}async openTableDesigner(a,r,i,s){this._adsTelemetryService.createActionEvent("TableDesigner","Open").withAdditionalProperties(i).send();const o=this.getProvider(a),u=this._instantiationService.createInstance(D.TableDesignerInput,o,r,i,s);await this._editorService.openEditor(u,{pinned:!0},b.ACTIVE_GROUP)}};e.TableDesignerService=S,e.TableDesignerService=S=fe([O(0,b.IEditorService),O(1,T.IInstantiationService),O(2,f.IAdsTelemetryService),O(3,m.ILifecycleService),O(4,v.IDialogService)],S)}),define(Q[385],Y([1,0,437,275,5,6,89,2254,63,49,58]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskService=e.ITaskService=e.SERVICE_ID=void 0,e.SERVICE_ID="taskHistoryService",e.ITaskService=(0,b.createDecorator)(e.SERVICE_ID);let h=class{constructor(r,i,s,o){this.dialogService=i,this.queryEditorService=s,this.connectionManagementService=o,this._onTaskComplete=new D.Emitter,this._onAddNewTask=new D.Emitter,this._providers=Object.create(null),this._taskQueue=new t.TaskNode("Root"),this._onTaskComplete=new D.Emitter,this._onAddNewTask=new D.Emitter,r.onBeforeShutdown(u=>u.veto(this.beforeShutdown(),"veto.taskservice"))}registerProvider(r,i){this._providers[r]=i}onNewTaskCreated(r,i){this.createNewTask(i)}createNewTask(r){let i=r.databaseName,s=r.serverName;if(r&&r.connection){let u=this.connectionManagementService.getConnectionProfile(r.connection.connectionId);u&&i&&(i=u.databaseName),u&&s&&(s=u.serverName)}let o=new t.TaskNode(r.name,s,i,r.taskId,r.taskExecutionMode,r.isCancelable,r.targetLocation);o.providerName=r.providerName,this.handleNewTask(o)}updateTask(r){this.handleTaskComplete({taskId:r.taskId,status:r.status,message:r.message,script:r.script})}onTaskStatusChanged(r,i){this.updateTask(i)}cancelTask(r,i){let s=this.getTaskInQueue(i);if(s)if(s.status=t.TaskStatus.Canceling,this._onTaskComplete.fire(s),r){let o=this._providers[r];if(o&&o.cancelTask)return Promise.resolve(o.cancelTask({taskId:i}))}else return Promise.resolve(!0);return Promise.resolve(void 0)}cancelAllTasks(){return new Promise((r,i)=>{let s=this._taskQueue.children.map(o=>o.status===t.TaskStatus.InProgress||o.status===t.TaskStatus.NotStarted?this.cancelTask(o.providerName,o.id):Promise.resolve(!0));Promise.all(s).then(o=>{r(void 0)}).catch(o=>{i(o)})})}handleNewTask(r){this._taskQueue.hasChildren?this._taskQueue.children.unshift(r):(this._taskQueue.hasChildren=!0,this._taskQueue.children=[r]),this._onAddNewTask.fire(r)}beforeShutdown(){const r=(0,f.localize)(0,null);return new Promise((i,s)=>{this.getNumberOfInProgressTasks()>0?this.dialogService.confirm({type:v.default.Warning,message:r,primaryButton:(0,f.localize)(1,null),cancelButton:(0,f.localize)(2,null)}).then(u=>{if(u.confirmed){let d,p=!1;this.cancelAllTasks().then(()=>{clearTimeout(d),p||i(!1)},c=>{clearTimeout(d),p||i(!1)}),d=setTimeout(function(){p=!0,i(!1)},2e3)}else i(!0)}):i(!1)})}handleTaskComplete(r){let i=this.getTaskInQueue(r.taskId);if(i){switch(i.status=r.status,r.message&&(i.message=r.message),i.status){case t.TaskStatus.Canceled:case t.TaskStatus.Succeeded:case t.TaskStatus.SucceededWithWarning:case t.TaskStatus.Failed:i.endTime=new Date().toLocaleTimeString(),i.timer.stop(),this._onTaskComplete.fire(i);break;default:break}(i.status===t.TaskStatus.Succeeded||i.status===t.TaskStatus.SucceededWithWarning)&&r.script&&r.script!==""&&(i.taskExecutionMode===t.TaskExecutionMode.script?this.queryEditorService.newSqlEditor({initialContent:r.script}):i.taskExecutionMode===t.TaskExecutionMode.executeAndScript&&(i.script=r.script))}}getTaskInQueue(r){if(this._taskQueue.hasChildren)return this._taskQueue.children.find(i=>i.id===r)}get onTaskComplete(){return this._onTaskComplete.event}get onAddNewTask(){return this._onAddNewTask.event}getNumberOfInProgressTasks(){if(this._taskQueue.hasChildren){let r=this._taskQueue.children.filter(i=>i.status===t.TaskStatus.InProgress);return r?r.length:0}return 0}getAllTasks(){return this._taskQueue}};e.TaskService=h,e.TaskService=h=fe([O(0,T.ILifecycleService),O(1,m.IDialogService),O(2,y.IQueryEditorService),O(3,S.IConnectionManagementService)],h)}),define(Q[3906],Y([1,0,385,4,60,53]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadBackgroundTaskManagement=e.TaskStatus=void 0;var T;(function(v){v[v.NotStarted=0]="NotStarted",v[v.InProgress=1]="InProgress",v[v.Succeeded=2]="Succeeded",v[v.SucceededWithWarning=3]="SucceededWithWarning",v[v.Failed=4]="Failed",v[v.Canceled=5]="Canceled",v[v.Canceling=6]="Canceling"})(T||(e.TaskStatus=T={}));let f=class extends y.Disposable{constructor(m,S){super(),this._taskService=S,this._proxy=m.getProxy(D.SqlExtHostContext.ExtHostBackgroundTaskManagement),this._register(this._taskService.onTaskComplete(h=>{h.status===T.Canceling&&this._proxy.$onTaskCanceled(h.id)}))}$registerTask(m){this._taskService.createNewTask(m),this._proxy.$onTaskRegistered(m.taskId)}$updateTask(m){this._taskService.updateTask(m)}};e.MainThreadBackgroundTaskManagement=f,e.MainThreadBackgroundTaskManagement=f=fe([(0,b.extHostNamedCustomer)(D.SqlMainContext.MainThreadBackgroundTaskManagement),O(1,t.ITaskService)],f)}),define(Q[3907],Y([1,0,4,173,58,107,251,681,172,589,683,307,581,687,385,346,850,583,773,852,854,76,1142,450,60,53,582]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDataProtocol=void 0;let I=class extends t.Disposable{constructor(A,k,L,R,M,N,P,x,F,V,W,z,B,K,H,U,G,$,ie,J,j){super(),this._connectionManagementService=k,this._capabilitiesService=L,this._queryManagementService=R,this._metadataService=M,this._objectExplorerService=N,this._scriptingService=P,this._adminService=x,this._jobManagementService=F,this._backupService=V,this._restoreService=W,this._taskService=z,this._profilerService=B,this._serializationService=K,this._fileBrowserService=H,this._assessmentService=U,this._dataGridProviderService=G,this._telemetryService=$,this._tableDesignerService=ie,this._executionPlanService=J,this._serverContextualizationService=j,this._capabilitiesRegistrations=Object.create(null),A&&(this._proxy=A.getProxy(E.SqlExtHostContext.ExtHostDataProtocol)),this._connectionManagementService&&this._register(this._connectionManagementService.onLanguageFlavorChanged(ee=>this._proxy.$languageFlavorChanged(ee)))}$registerConnectionProvider(A,k){const L=this;this._connectionManagementService.registerProvider(A,{connect(R,M){return L._proxy.$connect(k,R,M)},disconnect(R){return L._proxy.$disconnect(k,R)},changePassword(R,M,N){return L._proxy.$changePassword(k,R,M,N)},changeDatabase(R,M){return L._proxy.$changeDatabase(k,R,M)},cancelConnect(R){return L._proxy.$cancelConnect(k,R)},listDatabases(R){return L._proxy.$listDatabases(k,R)},getConnectionString(R,M){return L._proxy.$getConnectionString(k,R,M)},buildConnectionInfo(R){return L._proxy.$buildConnectionInfo(k,R)},rebuildIntelliSenseCache(R){return L._proxy.$rebuildIntelliSenseCache(k,R)}})}$registerQueryProvider(A,k){const L=this;this._queryManagementService.addQueryRequestHandler(A,{cancelQuery(R){return Promise.resolve(L._proxy.$cancelQuery(k,R))},runQuery(R,M,N){return y.mark(`sql/query/${R}/main_$runQuery`),Promise.resolve(L._proxy.$runQuery(k,R,M,N))},runQueryStatement(R,M,N){return y.mark(`sql/query/${R}/main_$runQueryStatement`),Promise.resolve(L._proxy.$runQueryStatement(k,R,M,N))},runQueryString(R,M){return y.mark(`sql/query/${R}/main_$runQueryString`),Promise.resolve(L._proxy.$runQueryString(k,R,M))},runQueryAndReturn(R,M){return y.mark(`sql/query/${R}/main_$runQueryAndReturn`),Promise.resolve(L._proxy.$runQueryAndReturn(k,R,M))},parseSyntax(R,M){return Promise.resolve(L._proxy.$parseSyntax(k,R,M))},getQueryRows(R){return Promise.resolve(L._proxy.$getQueryRows(k,R))},setQueryExecutionOptions(R,M){return Promise.resolve(L._proxy.$setQueryExecutionOptions(k,R,M))},disposeQuery(R){return Promise.resolve(L._proxy.$disposeQuery(k,R))},connectionUriChanged(R,M){return Promise.resolve(L._proxy.$connectionUriChanged(k,R,M))},saveResults(R){let M=L._serializationService.getSaveResultsFeatureMetadataProvider(R.ownerUri);return M&&M.enabled?Promise.resolve(L._proxy.$saveResults(k,R)):M&&!M.enabled?Promise.resolve(L._serializationService.disabledSaveAs()):Promise.resolve(L._serializationService.saveAs(R.resultFormat,R.filePath,void 0,!0))},copyResults(R){return Promise.resolve(L._proxy.$copyResults(k,R))},initializeEdit(R,M,N,P,x,F){return Promise.resolve(L._proxy.$initializeEdit(k,R,M,N,P,x,F))},updateCell(R,M,N,P){return Promise.resolve(L._proxy.$updateCell(k,R,M,N,P))},commitEdit(R){return Promise.resolve(L._proxy.$commitEdit(k,R))},createRow(R){return Promise.resolve(L._proxy.$createRow(k,R))},deleteRow(R,M){return Promise.resolve(L._proxy.$deleteRow(k,R,M))},disposeEdit(R){return Promise.resolve(L._proxy.$disposeEdit(k,R))},revertCell(R,M,N){return Promise.resolve(L._proxy.$revertCell(k,R,M,N))},revertRow(R,M){return Promise.resolve(L._proxy.$revertRow(k,R,M))},getEditRows(R){return Promise.resolve(L._proxy.$getEditRows(k,R))}})}$registerBackupProvider(A,k){const L=this;this._backupService.registerProvider(A,{backup(R,M,N){return L._proxy.$backup(k,R,M,N)},getBackupConfigInfo(R){return L._proxy.$getBackupConfigInfo(k,R)}})}$registerRestoreProvider(A,k){const L=this;this._restoreService.registerProvider(A,{getRestorePlan(R,M){return L._proxy.$getRestorePlan(k,R,M)},cancelRestorePlan(R,M){return L._proxy.$cancelRestorePlan(k,R,M)},restore(R,M){return L._proxy.$restore(k,R,M)},getRestoreConfigInfo(R){return L._proxy.$getRestoreConfigInfo(k,R)}})}$registerMetadataProvider(A,k){const L=this;this._metadataService.registerProvider(A,{getMetadata(R){return L._proxy.$getMetadata(k,R)},getDatabases(R){return L._proxy.$getDatabases(k,R)},getTableInfo(R,M){return L._proxy.$getTableInfo(k,R,M)},getViewInfo(R,M){return L._proxy.$getViewInfo(k,R,M)}})}$registerObjectExplorerProvider(A,k){const L=this;this._objectExplorerService.registerProvider(A,{providerId:A,createNewSession(R){return L._proxy.$createObjectExplorerSession(k,R)},expandNode(R){return L._proxy.$expandObjectExplorerNode(k,R)},refreshNode(R){return L._proxy.$refreshObjectExplorerNode(k,R)},closeSession(R){return L._proxy.$closeObjectExplorerSession(k,R)},findNodes(R){return L._proxy.$findNodes(k,R)}})}$registerObjectExplorerNodeProvider(A,k,L,R){const M=this;this._objectExplorerService.registerNodeProvider({supportedProviderId:k,providerId:A,group:L,expandNode(N){return M._proxy.$expandObjectExplorerNode(R,N)},refreshNode(N){return M._proxy.$refreshObjectExplorerNode(R,N)},findNodes(N){return M._proxy.$findNodes(R,N)},handleSessionOpen(N){return M._proxy.$createObjectExplorerNodeProviderSession(R,N)},handleSessionClose(N){return M._proxy.$handleSessionClose(R,N)}})}$registerIconProvider(A,k){const L=this;this._connectionManagementService.registerIconProvider(A,{getConnectionIconId(R,M){return L._proxy.$getConnectionIconId(k,R,M)}})}$registerTaskServicesProvider(A,k){const L=this;this._taskService.registerProvider(A,{getAllTasks(R){return L._proxy.$getAllTasks(k,R)},cancelTask(R){return L._proxy.$cancelTask(k,R)}})}$registerScriptingProvider(A,k){const L=this;this._scriptingService.registerProvider(A,{scriptAsOperation(R,M,N,P){return L._proxy.$scriptAsOperation(k,R,M,N,P)}})}$registerFileBrowserProvider(A,k){const L=this;this._fileBrowserService.registerProvider(A,{openFileBrowser(R,M,N,P,x){return L._proxy.$openFileBrowser(k,R,M,N,P,x)},expandFolderNode(R,M){return L._proxy.$expandFolderNode(k,R,M)},validateFilePaths(R,M,N){return L._proxy.$validateFilePaths(k,R,M,N)},closeFileBrowser(R){return L._proxy.$closeFileBrowser(k,R)}})}$registerProfilerProvider(A,k){const L=this;this._profilerService.registerProvider(A,{createSession(R,M,N){return L._proxy.$createSession(k,R,M,N)},startSession(R,M,N){return L._proxy.$startSession(k,R,M,N)},stopSession(R){return L._proxy.$stopSession(k,R)},pauseSession(R){return L._proxy.$pauseSession(k,R)},getXEventSessions(R){return L._proxy.$getXEventSessions(k,R)},connectSession(R){return Promise.resolve(!0)},disconnectSession(R){return L._proxy.$disconnectSession(k,R)}})}$registerAdminServicesProvider(A,k){const L=this;this._adminService.registerProvider(A,{createDatabase(R,M){return L._proxy.$createDatabase(k,R,M)},getDefaultDatabaseInfo(R){return L._proxy.$getDefaultDatabaseInfo(k,R)},getDatabaseInfo(R){return L._proxy.$getDatabaseInfo(k,R)},createLogin(R,M){return L._proxy.$createLogin(k,R,M)}})}$registerAgentServicesProvider(A,k){const L=this;this._jobManagementService.registerProvider(A,{providerId:A,getJobs(R){return L._proxy.$getJobs(k,R)},getJobHistory(R,M,N){return L._proxy.$getJobHistory(k,R,M,N)},jobAction(R,M,N){return L._proxy.$jobAction(k,R,M,N)},deleteJob(R,M){return L._proxy.$deleteJob(k,R,M)},deleteJobStep(R,M){return L._proxy.$deleteJobStep(k,R,M)},getNotebooks(R){return L._proxy.$getNotebooks(k,R)},getNotebookHistory(R,M,N,P){return L._proxy.$getNotebookHistory(k,R,M,N,P)},getMaterializedNotebook(R,M,N){return L._proxy.$getMaterializedNotebook(k,R,M,N)},updateNotebookMaterializedName(R,M,N,P){return L._proxy.$updateNotebookMaterializedName(k,R,M,N,P)},deleteMaterializedNotebook(R,M,N){return L._proxy.$deleteMaterializedNotebook(k,R,M,N)},updateNotebookMaterializedPin(R,M,N,P){return L._proxy.$updateNotebookMaterializedPin(k,R,M,N,P)},getTemplateNotebook(R,M,N){return L._proxy.$getTemplateNotebook(k,R,M,N)},deleteNotebook(R,M){return L._proxy.$deleteNotebook(k,R,M)},getAlerts(R){return L._proxy.$getAlerts(k,R)},deleteAlert(R,M){return L._proxy.$deleteAlert(k,R,M)},getOperators(R){return L._proxy.$getOperators(k,R)},deleteOperator(R,M){return L._proxy.$deleteOperator(k,R,M)},getProxies(R){return L._proxy.$getProxies(k,R)},deleteProxy(R,M){return L._proxy.$deleteProxy(k,R,M)},getCredentials(R){return L._proxy.$getCredentials(k,R)}})}$registerSqlAssessmentServicesProvider(A,k){const L=this;this._assessmentService.registerProvider(A,{providerId:A,assessmentInvoke(R,M){return L._proxy.$assessmentInvoke(k,R,M)},getAssessmentItems(R,M){return L._proxy.$getAssessmentItems(k,R,M)},generateAssessmentScript(R){return L._proxy.$generateAssessmentScript(k,R)}})}$registerDataGridProvider(A,k,L){const R=this;this._dataGridProviderService.registerProvider(A,{providerId:A,title:k,getDataGridItems(){return R._telemetryService.createActionEvent("Shell","GetDataGridItems").withAdditionalProperties({provider:A}).send(),R._proxy.$getDataGridItems(L)},getDataGridColumns(){return R._telemetryService.createActionEvent("Shell","GetDataGridColumns").withAdditionalProperties({provider:A}).send(),R._proxy.$getDataGridColumns(L)}})}$registerCapabilitiesServiceProvider(A,k){const L=this;this._capabilitiesService.registerProvider({getServerCapabilities(R){return L._proxy.$getServerCapabilities(k,R)}})}$registerTableDesignerProvider(A,k){const L=this;this._tableDesignerService.registerProvider(A,{providerId:A,initializeTableDesigner(R){return L._proxy.$initializeTableDesigner(k,R)},processTableEdit(R,M){return L._proxy.$processTableDesignerEdit(k,R,M)},publishChanges(R){return L._proxy.$publishTableDesignerChanges(k,R)},generateScript(R){return L._proxy.$generateScriptForTableDesigner(k,R)},generatePreviewReport(R){return L._proxy.$generatePreviewReportForTableDesigner(k,R)},disposeTableDesigner(R){return L._proxy.$disposeTableDesigner(k,R)}})}$registerSerializationProvider(A,k){const L=this;this._serializationService.registerProvider(A,{startSerialization(R){return L._proxy.$startSerialization(k,R)},continueSerialization(R){return L._proxy.$continueSerialization(k,R)}})}$registerExecutionPlanProvider(A,k){this._executionPlanService.registerProvider(A,{getExecutionPlan:L=>this._proxy.$getExecutionPlan(k,L),compareExecutionPlanGraph:(L,R)=>this._proxy.$compareExecutionPlanGraph(k,L,R),isExecutionPlan:L=>this._proxy.$isExecutionPlan(k,L)})}$registerServerContextualizationProvider(A,k){this._serverContextualizationService.registerProvider(A,{getServerContextualization:L=>this._proxy.$getServerContextualization(k,L)})}$onConnectionComplete(A,k){this._connectionManagementService.onConnectionComplete(A,k)}$onIntelliSenseCacheComplete(A,k){this._connectionManagementService.onIntelliSenseCacheComplete(A,k)}$onConnectionChangeNotification(A,k){this._connectionManagementService.onConnectionChangedNotification(A,k)}$onQueryComplete(A,k){y.mark(`sql/query/${k.ownerUri}/main_$onQueryComplete`),this._queryManagementService.onQueryComplete(k)}$onBatchStart(A,k){this._queryManagementService.onBatchStart(k)}$onBatchComplete(A,k){this._queryManagementService.onBatchComplete(k)}$onResultSetAvailable(A,k){this._queryManagementService.onResultSetAvailable(k)}$onResultSetUpdated(A,k){this._queryManagementService.onResultSetUpdated(k)}$onQueryMessage(A){this._queryManagementService.onMessage((0,d.serializableToMap)(A))}$onEditSessionReady(A,k,L,R){this._queryManagementService.onEditSessionReady(k,L,R)}$onScriptingComplete(A,k){this._scriptingService.onScriptingComplete(A,k)}$onObjectExplorerSessionCreated(A,k){this._objectExplorerService.onSessionCreated(A,k)}$onObjectExplorerSessionDisconnected(A,k){this._objectExplorerService.onSessionDisconnected(A,k)}$onObjectExplorerNodeExpanded(A,k){let L=Object.assign({providerId:A},k);this._objectExplorerService.onNodeExpanded(L)}$onTaskCreated(A,k){this._taskService.onNewTaskCreated(A,k)}$onTaskStatusChanged(A,k){this._taskService.onTaskStatusChanged(A,k)}$onFileBrowserOpened(A,k){this._fileBrowserService.onFileBrowserOpened(A,k)}$onFolderNodeExpanded(A,k){this._fileBrowserService.onFolderNodeExpanded(A,k)}$onFilePathsValidated(A,k){this._fileBrowserService.onFilePathsValidated(A,k)}$onSessionEventsAvailable(A,k){this._profilerService.onMoreRows(k)}$onSessionStopped(A,k){this._profilerService.onSessionStopped(k)}$onProfilerSessionCreated(A,k){this._profilerService.onProfilerSessionCreated(k)}$onJobDataUpdated(A){this._jobManagementService.fireOnDidChange()}$openTableDesigner(A,k,L,R){this._tableDesignerService.openTableDesigner(A,k,L,R)}$unregisterProvider(A){let k=this._capabilitiesRegistrations[A];k&&(k.dispose(),delete this._capabilitiesRegistrations[A])}};e.MainThreadDataProtocol=I,e.MainThreadDataProtocol=I=fe([(0,w.extHostNamedCustomer)(E.SqlMainContext.MainThreadDataProtocol),O(1,b.IConnectionManagementService),O(2,D.ICapabilitiesService),O(3,T.IQueryManagementService),O(4,f.IMetadataService),O(5,v.IObjectExplorerService),O(6,m.IScriptingService),O(7,S.IAdminService),O(8,h.IJobManagementService),O(9,a.IBackupService),O(10,r.IRestoreService),O(11,i.ITaskService),O(12,s.IProfilerService),O(13,o.ISerializationService),O(14,u.IFileBrowserService),O(15,p.IAssessmentService),O(16,c.IDataGridProviderService),O(17,l.IAdsTelemetryService),O(18,n.ITableDesignerService),O(19,g.IExecutionPlanService),O(20,C.IServerContextualizationService)],I)}),define(Q[3908],Y([1,0,2156,34,385,437,275,63,188]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScriptAction=e.CancelAction=void 0;let m=class extends y.Action{static{this.ID="taskHistory.cancel"}static{this.LABEL=(0,t.localize)(0,null)}constructor(a,r,i,s){super(a,r),this._taskService=i,this._errorMessageService=s}async run(a){if(a instanceof D.TaskNode)try{if(!await this._taskService.cancelTask(a.providerName,a.id)){let i=(0,t.localize)(1,null);this.showError(i)}}catch(r){this.showError(r)}}showError(a){this._errorMessageService&&this._errorMessageService.showDialog(f.default.Error,"",a)}};e.CancelAction=m,e.CancelAction=m=fe([O(2,b.ITaskService),O(3,v.IErrorMessageService)],m);let S=class extends y.Action{static{this.ID="taskHistory.script"}static{this.LABEL=(0,t.localize)(2,null)}constructor(a,r,i){super(a,r),this._queryEditorService=i}async run(a){a instanceof D.TaskNode&&a.script&&await this._queryEditorService.newSqlEditor({initialContent:a.script})}};e.ScriptAction=S,e.ScriptAction=S=fe([O(2,T.IQueryEditorService)],S)}),define(Q[3909],Y([1,0,5,437,3908]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskHistoryActionProvider=void 0;let D=class{constructor(f){this._instantiationService=f}hasActions(f,v){return v instanceof y.TaskNode}getActions(f,v){return v instanceof y.TaskNode?this.getTaskHistoryActions(f,v):[]}hasSecondaryActions(f,v){return!1}getTaskHistoryActions(f,v){let m=[];return v.status===y.TaskStatus.InProgress&&v.isCancelable&&m.push(this._instantiationService.createInstance(b.CancelAction,b.CancelAction.ID,b.CancelAction.LABEL)),(v.status===y.TaskStatus.Succeeded||v.status===y.TaskStatus.SucceededWithWarning)&&v.taskExecutionMode===y.TaskExecutionMode.executeAndScript&&m.push(this._instantiationService.createInstance(b.ScriptAction,b.ScriptAction.ID,b.ScriptAction.LABEL)),m}};e.TaskHistoryActionProvider=D,e.TaskHistoryActionProvider=D=fe([O(0,t.IInstantiationService)],D)}),define(Q[3910],Y([1,0,5,17,107,687,911,3580,117,1520,813,184,172,385,437,58,363,11,76,2247]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RestoreDialogController=e.RestoreService=void 0;let c=class{constructor(g,w){this._connectionService=g,this._telemetryService=w,this._providers=Object.create(null)}getRestoreConfigInfo(g){return new Promise((w,E)=>{const C=this.getProvider(g);C?C.provider.getRestoreConfigInfo(g).then(I=>{w(I)},I=>{E(I)}):E((0,o.invalidProvider)())})}restore(g,w){return new Promise((E,C)=>{const I=this.getProvider(g);I?(this._telemetryService.createActionEvent("Shell","RestoreRequested").withAdditionalProperties({provider:I.providerName}).send(),I.provider.restore(g,w).then(_=>{E(_)},_=>{C(_)})):C(o.invalidProvider)})}getProvider(g){let w=this._connectionService.getProviderIdFromUri(g);if(w)return{provider:this._providers[w],providerName:w}}getRestorePlan(g,w){return new Promise((E,C)=>{const I=this.getProvider(g);I?I.provider.getRestorePlan(g,w).then(_=>{E(_)},_=>{C(_)}):C(o.invalidProvider)})}cancelRestorePlan(g,w){return new Promise((E,C)=>{const I=this.getProvider(g);I?I.provider.cancelRestorePlan(g,w).then(_=>{E(_)},_=>{C(_)}):C(o.invalidProvider)})}registerProvider(g,w){this._providers[g]=w}};e.RestoreService=c,e.RestoreService=c=fe([O(0,s.IConnectionManagementService),O(1,d.IAdsTelemetryService)],c);let l=class{constructor(g,w,E,C,I,_,A){this._instantiationService=g,this._restoreService=w,this._connectionService=E,this._capabilitiesService=C,this._objectExplorerService=I,this._taskService=_,this._logService=A,this._restoreDialogs={},this._restoreFeature="Restore",this._restoreTaskName="Restore Database",this._restoreCompleted="Completed",this._optionValues={}}handleOnRestore(g=!1){let w=this.setRestoreOption(g?D.TaskExecutionMode.script:D.TaskExecutionMode.executeAndScript);this._restoreService.restore(this._ownerUri,w).then(E=>{let C=this._connectionService.getConnectionProfile(this._ownerUri),I=this._objectExplorerService.getObjectExplorerNode(C);this._taskService.onTaskComplete(async A=>{if(E.taskId===A.id&&this.isSuccessfulRestore(A)&&I)try{await this._objectExplorerService.refreshTreeNode(I.getSession(),I),await this._objectExplorerService.getServerTreeView().refreshTree()}catch(k){this._logService.error(k)}}),this._restoreDialogs[this._currentProvider].close()})}isSuccessfulRestore(g){return g.taskName===this._restoreTaskName&&g.message===this._restoreCompleted&&(g.status===i.TaskStatus.Succeeded||g.status===i.TaskStatus.SucceededWithWarning)&&(g.taskExecutionMode===D.TaskExecutionMode.execute||g.taskExecutionMode===D.TaskExecutionMode.executeAndScript)}handleMssqlOnValidateFile(g=!1){let w=this._restoreDialogs[this._currentProvider];this._restoreService.getRestorePlan(this._ownerUri,this.setRestoreOption(D.TaskExecutionMode.execute,g)).then(E=>{this._sessionId=E.sessionId,E.errorMessage?w.onValidateResponseFail(E.errorMessage):(w.removeErrorMessage(),w.viewModel.onRestorePlanResponse(E)),E.canRestore&&!this.isEmptyBackupset()?w.enableRestoreButton(!0):w.enableRestoreButton(!1)},E=>{w.showError(E)})}isEmptyBackupset(){let g=this._restoreDialogs[this._currentProvider];return!y.isUndefinedOrNull(g.viewModel.selectedBackupSets)&&g.viewModel.selectedBackupSets.length===0}getMssqlRestoreConfigInfo(){return new Promise((g,w)=>{let E=this._restoreDialogs[this._currentProvider];this._restoreService.getRestoreConfigInfo(this._ownerUri).then(C=>{E.viewModel.updateOptionWithConfigInfo(C.configInfo),g()},C=>{E.showError(C),w(C)})})}setRestoreOption(g,w=!1){let E=this.getCurrentProviderId();if(E===v.mssqlProviderName){let C=new m.MssqlRestoreInfo(g);this._sessionId&&(C.sessionId=this._sessionId);let I=this._restoreDialogs[E];return C.backupFilePaths=I.viewModel.filePath,C.readHeaderFromMedia=I.viewModel.readHeaderFromMedia,C.selectedBackupSets=I.viewModel.selectedBackupSets,C.sourceDatabaseName=I.viewModel.sourceDatabaseName,I.viewModel.targetDatabaseName&&(C.targetDatabaseName=I.viewModel.targetDatabaseName),C.overwriteTargetDatabase=w,C.deviceType=I.viewModel.deviceType,I.viewModel.getRestoreAdvancedOptions(C.options),C}else return{options:this._optionValues}}getRestoreOption(){let g=[],w=this.getCurrentProviderId(),E=this._capabilitiesService.getLegacyCapabilities(w);if(E){let C=E.features.find(I=>I.featureName===this._restoreFeature);C&&(g=C.optionsMetadata)}return g}handleOnClose(){this._connectionService.disconnect(this._ownerUri).catch(g=>this._logService.error(g))}handleOnCancel(){let g=new m.MssqlRestoreInfo(D.TaskExecutionMode.execute);g.sessionId=this._sessionId,this._restoreService.cancelRestorePlan(this._ownerUri,g).then(()=>{this._connectionService.disconnect(this._ownerUri)})}showDialog(g){return new Promise((w,E)=>{let C;this._ownerUri=this._connectionService.getConnectionUri(g)+S.ProviderConnectionInfo.idSeparator+h.ConnectionUriRestoreIdAttributeName+S.ProviderConnectionInfo.nameValueSeparator+"0",this._connectionService.isConnected(this._ownerUri)||this._connectionService.connect(g,this._ownerUri).then(I=>{this._sessionId=void 0,this._currentProvider=this.getCurrentProviderId();const _=(0,p.localize)(0,null,g.serverName,g.databaseName);if(this._restoreDialogs[this._currentProvider])this._currentProvider!==v.mssqlProviderName&&(this._restoreDialogs[this._currentProvider].title=_);else{let A;if(this._currentProvider===v.mssqlProviderName){let k=this._currentProvider;A=this._instantiationService.createInstance(f.RestoreDialog,this.getRestoreOption()),A.onCancel(()=>this.handleOnCancel()),A.onRestore(L=>this.handleOnRestore(L)),A.onValidate(L=>this.handleMssqlOnValidateFile(L)),A.onDatabaseListFocused(()=>this.fetchDatabases(k))}else A=this._instantiationService.createInstance(T.OptionsDialog,_,"RestoreOptions",void 0),A.onOk(()=>this.handleOnRestore());A.onCloseEvent(()=>this.handleOnClose()),A.render(),this._restoreDialogs[this._currentProvider]=A}if(this._currentProvider===v.mssqlProviderName){let A=this._restoreDialogs[this._currentProvider];this.getMssqlRestoreConfigInfo().then(()=>{const k=this._connectionService.getConnectionInfo(this._ownerUri).serverInfo.engineEditionId;A.viewModel.resetRestoreOptions(g.databaseName,A.viewModel.databaseList),A.open(g.serverName,this._ownerUri,k),A.validateRestore()},k=>{E(k)})}else this._restoreDialogs[this._currentProvider].open(this.getRestoreOption(),this._optionValues);w(C)},I=>{E(I)})})}getCurrentProviderId(){return this._connectionService.getProviderIdFromUri(this._ownerUri)}fetchDatabases(g){this._connectionService.listDatabases(this._ownerUri).then(w=>{w&&w.databaseNames&&(this._restoreDialogs[g].databaseListOptions=w.databaseNames)})}};e.RestoreDialogController=l,e.RestoreDialogController=l=fe([O(0,t.IInstantiationService),O(1,D.IRestoreService),O(2,s.IConnectionManagementService),O(3,b.ICapabilitiesService),O(4,a.IObjectExplorerService),O(5,r.ITaskService),O(6,u.ILogService)],l)}),define(Q[3911],Y([1,0,4,18,38,30,2551,39,89,9,7,400,28,8,54]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorGroupWatermark=void 0;const s={text:T.localize(0,null),id:"workbench.action.showCommands"},o={text:T.localize(1,null),id:"workbench.action.quickOpen"},u={text:T.localize(2,null),id:"workbench.action.files.openFile",mac:!1},d={text:T.localize(3,null),id:"workbench.action.files.openFolder",mac:!1},p={text:T.localize(4,null),id:"workbench.action.files.openFileFolder",mac:!0},c={text:T.localize(5,null),id:"workbench.action.openRecent"},l={text:T.localize(6,null),id:"workbench.action.files.newUntitledFile"},n=Object.assign({mac:!0},l),g={text:T.localize(7,null),id:"workbench.action.findInFiles"},w={text:T.localize(8,null),id:"workbench.action.terminal.toggleTerminal",when:r.ContextKeyExpr.equals("terminalProcessSupported",!0)},E={text:T.localize(9,null),id:"workbench.action.debug.start",when:r.ContextKeyExpr.equals("terminalProcessSupported",!0)},C={text:T.localize(10,null),id:"workbench.action.toggleFullScreen",when:r.ContextKeyExpr.equals("terminalProcessSupported",!0).negate()},I={text:T.localize(11,null),id:"workbench.action.openSettings",when:r.ContextKeyExpr.equals("terminalProcessSupported",!0).negate()},_=[s,u,d,p,c,n],A=[s,o,g,E,w,C,I];let k=class extends t.Disposable{constructor(R,M,N,P,x,F,V){super(),this.lifecycleService=M,this.keybindingService=N,this.contextService=P,this.contextKeyService=x,this.configurationService=F,this.telemetryService=V,this.transientDisposables=this._register(new t.DisposableStore),this.enabled=!1;const W=(0,S.h)(".editor-group-watermark",[(0,S.h)(".letterpress"),(0,S.h)(".shortcuts@shortcuts")]);(0,S.append)(R,W.root),this.shortcuts=W.shortcuts,this.registerListeners(),this.workbenchState=P.getWorkbenchState(),this.render()}registerListeners(){this._register(this.lifecycleService.onDidShutdown(()=>this.dispose())),this._register(this.configurationService.onDidChangeConfiguration(N=>{N.affectsConfiguration("workbench.tips.enabled")&&this.render()})),this._register(this.contextService.onDidChangeWorkbenchState(N=>{this.workbenchState!==N&&(this.workbenchState=N,this.render())}));const R=[..._,...A].filter(N=>N.when!==void 0).map(N=>N.when),M=new Set;R.forEach(N=>N.keys().forEach(P=>M.add(P))),this._register(this.contextKeyService.onDidChangeContext(N=>{N.affectsSome(M)&&this.render()}))}render(){const R=this.configurationService.getValue("workbench.tips.enabled");if(R===this.enabled||(this.enabled=R,this.clear(),!R))return;const M=(0,S.append)(this.shortcuts,(0,S.$)(".watermark-box")),P=(this.workbenchState!==1?A:_).filter(F=>!("when"in F)||this.contextKeyService.contextMatchesRules(F.when)).filter(F=>!("mac"in F)||F.mac===(y.isMacintosh&&!y.isWeb)).filter(F=>!!a.CommandsRegistry.getCommand(F.id)),x=()=>{(0,S.clearNode)(M),P.map(F=>{const V=(0,S.append)(M,(0,S.$)("dl")),W=(0,S.append)(V,(0,S.$)("dt"));W.textContent=F.text;const z=(0,S.append)(V,(0,S.$)("dd"));new h.KeybindingLabel(z,y.OS,{renderUnboundKeybindings:!0,...i.defaultKeybindingLabelStyles}).set(this.keybindingService.lookupKeybinding(F.id))})};x(),this.transientDisposables.add(this.keybindingService.onDidUpdateKeybindings(x)),this.telemetryService.publicLog("watermark:open")}clear(){(0,S.clearNode)(this.shortcuts),this.transientDisposables.clear()}dispose(){super.dispose(),this.clear()}};e.EditorGroupWatermark=k,e.EditorGroupWatermark=k=fe([O(1,v.ILifecycleService),O(2,b.IKeybindingService),O(3,f.IWorkspaceContextService),O(4,r.IContextKeyService),O(5,m.IConfigurationService),O(6,D.ITelemetryService)],k)}),define(Q[3912],Y([1,0,2568,4,7,5,1259,6,92,84,19,36,70,8,23,89,86,14,17,82,1774]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsToasts=void 0;var l;(function(g){g[g.HIDDEN_OR_VISIBLE=0]="HIDDEN_OR_VISIBLE",g[g.HIDDEN=1]="HIDDEN",g[g.VISIBLE=2]="VISIBLE"})(l||(l={}));let n=class extends S.Themable{static{c=this}static{this.MAX_WIDTH=450}static{this.MAX_NOTIFICATIONS=3}static{this.PURGE_TIMEOUT={[i.Severity.Info]:15e3,[i.Severity.Warning]:18e3,[i.Severity.Error]:2e4}}static{this.SPAM_PROTECTION={interval:800,limit:c.MAX_NOTIFICATIONS}}get isVisible(){return!!this._isVisible}constructor(w,E,C,I,_,A,k,L,R){super(_),this.container=w,this.model=E,this.instantiationService=C,this.layoutService=I,this.editorGroupService=A,this.contextKeyService=k,this.lifecycleService=L,this.hostService=R,this._onDidChangeVisibility=this._register(new f.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._isVisible=!1,this.mapNotificationToToast=new Map,this.mapNotificationToDisposable=new Map,this.notificationsToastsVisibleContextKey=p.NotificationsToastsVisibleContext.bindTo(this.contextKeyService),this.addedToastsIntervalCounter=new u.IntervalCounter(c.SPAM_PROTECTION.interval),this.registerListeners()}registerListeners(){this._register(this.layoutService.onDidLayout(w=>this.layout(b.Dimension.lift(w)))),this.lifecycleService.when(3).then(()=>{this.model.notifications.forEach(w=>this.addToast(w)),this._register(this.model.onDidChangeNotification(w=>this.onDidChangeNotification(w)))}),this._register(this.model.onDidChangeFilter(w=>{(w===i.NotificationsFilter.SILENT||w===i.NotificationsFilter.ERROR)&&this.hide()}))}onDidChangeNotification(w){switch(w.kind){case 0:return this.addToast(w.item);case 3:return this.removeToast(w.item)}}addToast(w){if(this.isNotificationsCenterVisible||w.priority===i.NotificationPriority.SILENT||this.addedToastsIntervalCounter.increment()>c.SPAM_PROTECTION.limit)return;const E=new y.DisposableStore;this.mapNotificationToDisposable.set(w,E),E.add((0,b.scheduleAtNextAnimationFrame)(()=>this.doAddToast(w,E)))}doAddToast(w,E){let C=this.notificationsToastsContainer;C||(C=this.notificationsToastsContainer=document.createElement("div"),C.classList.add("notifications-toasts"),this.container.appendChild(C)),C.classList.add("visible");const I=document.createElement("div");I.classList.add("notification-toast-container");const _=C.firstChild;_?C.insertBefore(I,_):C.appendChild(I);const A=document.createElement("div");A.classList.add("notification-toast"),I.appendChild(A);const k=this.instantiationService.createInstance(T.NotificationsList,A,{verticalScrollMode:2,widgetAriaLabel:(()=>w.source?(0,t.localize)(1,null,w.message.raw,w.source):(0,t.localize)(0,null,w.message.raw))()});E.add(k);const L={item:w,list:k,container:I,toast:A};this.mapNotificationToToast.set(w,L),E.add((0,y.toDisposable)(()=>this.updateToastVisibility(L,!1))),k.show();const R=this.computeMaxDimensions();this.layoutLists(R.width),k.updateNotificationsList(0,0,[w]),this.layoutContainer(R.height),E.add(w.onDidChangeExpansion(()=>{k.updateNotificationsList(0,1,[w])})),E.add(w.onDidChangeContent(M=>{switch(M.kind){case 2:k.updateNotificationsList(0,1,[w]);break;case 1:w.expanded&&k.updateNotificationHeight(w);break}})),f.Event.once(w.onDidClose)(()=>{this.removeToast(w)}),this.purgeNotification(w,I,k,E),this.updateStyles(),this.notificationsToastsVisibleContextKey.set(!0),A.classList.add("notification-fade-in"),E.add((0,b.addDisposableListener)(A,"transitionend",()=>{A.classList.remove("notification-fade-in"),A.classList.add("notification-fade-in-done")})),w.updateVisibility(!0),this._isVisible||(this._isVisible=!0,this._onDidChangeVisibility.fire())}purgeNotification(w,E,C,I){let _=!1;I.add((0,b.addDisposableListener)(E,b.EventType.MOUSE_OVER,()=>_=!0)),I.add((0,b.addDisposableListener)(E,b.EventType.MOUSE_OUT,()=>_=!1));let A,k;const L=()=>{A=setTimeout(()=>{this.hostService.hasFocus?w.sticky||C.hasFocus()||_?L():this.removeToast(w):k||(k=this.hostService.onDidChangeFocus(R=>{R&&L()}),I.add(k))},c.PURGE_TIMEOUT[w.severity])};L(),I.add((0,y.toDisposable)(()=>clearTimeout(A)))}removeToast(w){let E=!1;const C=this.mapNotificationToToast.get(w);C&&((0,b.isAncestor)(document.activeElement,C.container)&&(E=!(this.focusNext()||this.focusPrevious())),this.mapNotificationToToast.delete(w));const I=this.mapNotificationToDisposable.get(w);I&&((0,y.dispose)(I),this.mapNotificationToDisposable.delete(w)),this.mapNotificationToToast.size>0?this.layout(this.workbenchDimensions):(this.doHide(),E&&this.editorGroupService.activeGroup.focus())}removeToasts(){this.mapNotificationToToast.clear(),this.mapNotificationToDisposable.forEach(w=>(0,y.dispose)(w)),this.mapNotificationToDisposable.clear(),this.doHide()}doHide(){this.notificationsToastsContainer?.classList.remove("visible"),this.notificationsToastsVisibleContextKey.set(!1),this._isVisible&&(this._isVisible=!1,this._onDidChangeVisibility.fire())}hide(){const w=this.notificationsToastsContainer?(0,b.isAncestor)(document.activeElement,this.notificationsToastsContainer):!1;this.removeToasts(),w&&this.editorGroupService.activeGroup.focus()}focus(){const w=this.getToasts(l.VISIBLE);return w.length>0?(w[0].list.focusFirst(),!0):!1}focusNext(){const w=this.getToasts(l.VISIBLE);for(let E=0;E<w.length;E++)if(w[E].list.hasFocus()){const I=w[E+1];if(I)return I.list.focusFirst(),!0;break}return!1}focusPrevious(){const w=this.getToasts(l.VISIBLE);for(let E=0;E<w.length;E++)if(w[E].list.hasFocus()){const I=w[E-1];if(I)return I.list.focusFirst(),!0;break}return!1}focusFirst(){const w=this.getToasts(l.VISIBLE)[0];return w?(w.list.focusFirst(),!0):!1}focusLast(){const w=this.getToasts(l.VISIBLE);return w.length>0?(w[w.length-1].list.focusFirst(),!0):!1}update(w){this.isNotificationsCenterVisible!==w&&(this.isNotificationsCenterVisible=w,this.isNotificationsCenterVisible&&this.removeToasts())}updateStyles(){this.mapNotificationToToast.forEach(({toast:w})=>{const E=this.getColor(m.NOTIFICATIONS_BACKGROUND);w.style.background=E||"";const C=this.getColor(h.widgetShadow);w.style.boxShadow=C?`0 0 8px 2px ${C}`:"";const I=this.getColor(m.NOTIFICATIONS_TOAST_BORDER);w.style.border=I?`1px solid ${I}`:""})}getToasts(w){const E=[];return this.mapNotificationToToast.forEach(C=>{switch(w){case l.HIDDEN_OR_VISIBLE:E.push(C);break;case l.HIDDEN:this.isToastInDOM(C)||E.push(C);break;case l.VISIBLE:this.isToastInDOM(C)&&E.push(C);break}}),E.reverse()}layout(w){this.workbenchDimensions=w;const E=this.computeMaxDimensions();E.height&&this.layoutContainer(E.height),this.layoutLists(E.width)}computeMaxDimensions(){const w=c.MAX_WIDTH;let E=w,C;return this.workbenchDimensions&&(E=this.workbenchDimensions.width,E-=2*8,C=this.workbenchDimensions.height,this.layoutService.isVisible("workbench.parts.statusbar")&&(C-=22),this.layoutService.isVisible("workbench.parts.titlebar")&&(C-=22),C-=2*12),C=typeof C=="number"?Math.round(C*.618):0,new b.Dimension(Math.min(w,E),C)}layoutLists(w){this.mapNotificationToToast.forEach(({list:E})=>E.layout(w))}layoutContainer(w){let E=0;for(const C of this.getToasts(l.HIDDEN_OR_VISIBLE)){C.container.style.opacity="0",this.updateToastVisibility(C,!0),w-=C.container.offsetHeight;let I=!1;E===c.MAX_NOTIFICATIONS?I=!1:w>=0&&(I=!0),this.updateToastVisibility(C,I),C.container.style.opacity="",I&&E++}}updateToastVisibility(w,E){if(this.isToastInDOM(w)===E)return;const C=(0,d.assertIsDefined)(this.notificationsToastsContainer);E?C.appendChild(w.container):C.removeChild(w.container),w.item.updateVisibility(E)}isToastInDOM(w){return!!w.container.parentElement}};e.NotificationsToasts=n,e.NotificationsToasts=n=c=fe([O(2,D.IInstantiationService),O(3,v.IWorkbenchLayoutService),O(4,S.IThemeService),O(5,a.IEditorGroupsService),O(6,r.IContextKeyService),O(7,s.ILifecycleService),O(8,o.IHostService)],n)}),define(Q[45],Y([1,0,5,89,16,14,173,11,91]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0;var m;(function(h){h.Workbench="workbench.contributions.kind"})(m||(e.Extensions=m={}));class S{constructor(){this.contributions=new Map,this.pendingRestoredContributions=new D.DeferredPromise}registerWorkbenchContribution(a,r=1){if(this.instantiationService&&this.lifecycleService&&this.logService&&this.environmentService&&this.lifecycleService.phase>=r)this.safeCreateContribution(this.instantiationService,this.logService,this.environmentService,a,r);else{let i=this.contributions.get(r);i||(i=[],this.contributions.set(r,i)),i.push(a)}}start(a){const r=this.instantiationService=a.get(t.IInstantiationService),i=this.lifecycleService=a.get(y.ILifecycleService),s=this.logService=a.get(f.ILogService),o=this.environmentService=a.get(v.IEnvironmentService);for(const u of[1,2,3,4])this.instantiateByPhase(r,i,s,o,u)}instantiateByPhase(a,r,i,s,o){r.phase>=o?this.doInstantiateByPhase(a,i,s,o):r.when(o).then(()=>this.doInstantiateByPhase(a,i,s,o))}async doInstantiateByPhase(a,r,i,s){const o=this.contributions.get(s);if(o)switch(this.contributions.delete(s),s){case 1:case 2:{(0,T.mark)(`code/willCreateWorkbenchContributions/${s}`);for(const u of o)this.safeCreateContribution(a,r,i,u,s);(0,T.mark)(`code/didCreateWorkbenchContributions/${s}`);break}case 3:case 4:{s===4&&await this.pendingRestoredContributions.p,this.doInstantiateWhenIdle(o,a,r,i,s);break}}}doInstantiateWhenIdle(a,r,i,s,o){(0,T.mark)(`code/willCreateWorkbenchContributions/${o}`);let u=0;const d=o===4?3e3:500,p=c=>{for(;u<a.length;){const l=a[u++];if(this.safeCreateContribution(r,i,s,l,o),c.timeRemaining()<1){(0,D.runWhenIdle)(p,d);break}}u===a.length&&((0,T.mark)(`code/didCreateWorkbenchContributions/${o}`),o===3&&this.pendingRestoredContributions.complete())};(0,D.runWhenIdle)(p,d)}safeCreateContribution(a,r,i,s,o){const u=o<3?Date.now():void 0;try{a.createInstance(s)}catch(d){r.error(`Unable to create workbench contribution ${s.name}.`,d)}if(typeof u=="number"&&!i.isBuilt){const d=Date.now()-u;d>20&&r.warn(`Workbench contribution ${s.name} blocked restore phase by ${d}ms.`)}}}b.Registry.add(m.Workbench,new S)}),define(Q[3913],Y([1,0,16,45,3687]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(y.Extensions.Workbench).registerWorkbenchContribution(b.CommandLineWorkbenchContribution,3)}),define(Q[3914],Y([1,0,16,45,3432]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(y.Extensions.Workbench).registerWorkbenchContribution(b.ConfigurationUpgraderContribution,1)}),define(Q[3915],Y([1,0,16,121,2002,26,107,45]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const v={type:"object",properties:{providerId:{type:"string",description:(0,b.localize)(0,null)},displayName:{type:"string",description:(0,b.localize)(1,null)},azureResource:{type:"string",description:(0,b.localize)(2,null)},notebookKernelAlias:{type:"string",description:(0,b.localize)(3,null)},isQueryProvider:{type:"boolean",description:(0,b.localize)(4,null)},connectionStringOptions:{type:"object",properties:{isEnabled:{type:"boolean",description:(0,b.localize)(5,null)},isDefaultOption:{type:"boolean",description:(0,b.localize)(6,null)}}},iconPath:{description:(0,b.localize)(7,null),oneOf:[{type:"array",items:{type:"object",properties:{id:{type:"string"},path:{type:"object",properties:{light:{type:"string"},dark:{type:"string"}}}}}},{type:"object",properties:{light:{type:"string"},dark:{type:"string"}}},{type:"string"}]},connectionOptions:{type:"array",description:(0,b.localize)(8,null),items:{type:"object",properties:{specialValueType:{type:"string"},isIdentity:{type:"boolean"},name:{type:"string"},displayName:{type:"string"},description:{type:"string"},groupName:{type:"string"},valueType:{type:"string"},defaultValue:{type:["string","number","boolean","object","integer","null","array"]},defaultValueOsOverrides:{type:"array",items:{type:"object",properties:{os:{type:"string",enum:["Windows","Macintosh","Linux"]},defaultValueOverride:{type:["string","number","boolean","object","integer","null","array"]}}}},objectType:{type:["string","number","boolean","object","integer","null","array"]},categoryValues:{type:["string","number","boolean","object","integer","null","array"]},isRequired:{type:"boolean"},isArray:{type:"boolean"}}}}},required:["providerId"]},m=y.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"connectionProvider",jsonSchema:v});let S=class{constructor(r){this.disposables=new Map,m.setHandler((i,s)=>{function o(u){return r.registerConnectionProvider(u.providerId,u)}s.added.forEach(u=>{if(h(u),Array.isArray(u.value))for(const d of u.value)this.disposables.set(d,o(d));else this.disposables.set(u.value,o(u.value))}),s.removed.forEach(u=>{if(Array.isArray(u.value))for(const d of u.value)this.disposables.get(d).dispose();else this.disposables.get(u.value).dispose()})})}};S=fe([O(0,T.ICapabilitiesService)],S),t.Registry.as(f.Extensions.Workbench).registerWorkbenchContribution(S,3);function h(a){if(!a||!a.value)return;let r=o=>{if(!(!o||!i))if(Array.isArray(o))for(let u of o)u.path={light:D.joinPath(a.description.extensionLocation,u.path.light.toString()),dark:D.joinPath(a.description.extensionLocation,u.path.dark.toString())};else typeof o=="string"?o={light:D.joinPath(a.description.extensionLocation,o),dark:D.joinPath(a.description.extensionLocation,o)}:o={light:D.joinPath(a.description.extensionLocation,o.light.toString()),dark:D.joinPath(a.description.extensionLocation,o.dark.toString())}},i=a.description.extensionLocation.fsPath,s=a.value;if(Array.isArray(s))for(let o of s)r(o.iconPath);else r(s.iconPath)}}),define(Q[3916],Y([1,0,853,17,2003,16,45,121]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const v={type:"array",items:{type:"object",properties:{name:{type:"string",description:(0,b.localize)(0,null)},id:{type:"string",description:(0,b.localize)(1,null)}}}},m=f.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"connectionTreeProvider",jsonSchema:v});let S=class{constructor(r){this.disposables=new Map,m.setHandler((i,s)=>{function o(u){return r.registerTreeDescriptor(u)}s.added.forEach(u=>{if(!Array.isArray(u.value)){u.collector.error("Value must be array");return}for(const d of u.value){if(!h(d)){u.collector.error("Invalid descriptor");continue}this.disposables.set(d,o(d))}}),s.removed.forEach(u=>{for(const d of u.value)this.disposables.get(d).dispose()})})}};S=fe([O(0,t.IConnectionTreeService)],S);function h(a){return!(!(0,y.isString)(a.name)||!(0,y.isString)(a.id))}D.Registry.as(T.Extensions.Workbench).registerWorkbenchContribution(S,2)}),define(Q[3917],Y([1,0,76,16,45,4,24,28]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SqlTelemetryContribution=void 0;let v=class extends D.Disposable{constructor(S,h,a){super(),this._register(a.onWillExecuteCommand(r=>{!["deleteLeft","deleteRight","lineBreakInsert","outdent","redo","tab","undo","deleteInsideWord","setContext","compositionEnd","compositionStart","compositionType","cut","paste","replacePreviousChar","type","selectNextSuggestion","selectPrevSuggestion","acceptSelectedSuggestion","acceptAlternativeSelectedSuggestion","hideSuggestWidget","selectNextSuggestion","selectNextPageSuggestion","selectLastSuggestion","selectPrevSuggestion","selectPrevPageSuggestion","selectFirstSuggestion","toggleSuggestionDetails","toggleExplainMode","toggleSuggestionFocus","insertBestCompletion","insertNextSuggestion","insertPrevSuggestion","editor.action.resetSuggestSize","workbench.action.toggleSidebarVisibility","workbench.action.togglePanel","workbench.action.focusPanel","workbench.action.previousPanelView","workbench.action.nextPanelView","workbench.action.toggleMaximizedPanel","workbench.action.closePanel","workbench.action.closeAuxiliaryBar","workbench.action.movePanelToSidePanel","workbench.action.movePanelToSecondarySideBar","workbench.action.moveSidePanelToPanel","workbench.action.moveSecondarySideBarToPanel"].some(i=>i===r.commandId)&&!r.commandId.startsWith("deleteWord")&&!r.commandId.startsWith("cursor")&&!r.commandId.startsWith("notification")&&!r.commandId.startsWith("editor.action")&&!r.commandId.startsWith("_")&&S.sendActionEvent("Shell","adsCommandExecuted",r.commandId)}))}};e.SqlTelemetryContribution=v,e.SqlTelemetryContribution=v=fe([O(0,t.IAdsTelemetryService),O(1,T.IStorageService),O(2,f.ICommandService)],v),y.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(v,1)}),define(Q[3918],Y([1,0,16,45,3870]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(y.Extensions.Workbench).registerWorkbenchContribution(b.NativeTelemetryOptOut,4)}),define(Q[3919],Y([1,0,16,45,3872]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(y.Extensions.Workbench).registerWorkbenchContribution(b.RetirementAnnouncement,4)}),define(Q[3920],Y([1,0,16,45,3873,3256,13]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(y.Extensions.Workbench).registerWorkbenchContribution(b.NativeEnablePreviewFeatures,4),(0,T.registerAction2)(D.ShowGettingStartedAction)}),define(Q[3921],Y([1,0,34,2525,92,29,4,7,45,16,18,68,129]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextInputActionsProvider=void 0;let r=class extends T.Disposable{constructor(s,o,u){super(),this.layoutService=s,this.contextMenuService=o,this.clipboardService=u,this.textInputActions=[],this.createActions(),this.registerListeners()}createActions(){this.textInputActions.push(new t.Action("undo",(0,y.localize)(0,null),void 0,!0,async()=>document.execCommand("undo")),new t.Action("redo",(0,y.localize)(1,null),void 0,!0,async()=>document.execCommand("redo")),new t.Separator,new t.Action("editor.action.clipboardCutAction",(0,y.localize)(2,null),void 0,!0,async()=>document.execCommand("cut")),new t.Action("editor.action.clipboardCopyAction",(0,y.localize)(3,null),void 0,!0,async()=>document.execCommand("copy")),new t.Action("editor.action.clipboardPasteAction",(0,y.localize)(4,null),void 0,!0,async s=>{if(S.isNative)document.execCommand("paste");else{const o=await this.clipboardService.readText();if(s instanceof HTMLTextAreaElement||s instanceof HTMLInputElement){const u=s.selectionStart||0,d=s.selectionEnd||0;s.value=`${s.value.substring(0,u)}${o}${s.value.substring(d,s.value.length)}`,s.selectionStart=u+o.length,s.selectionEnd=s.selectionStart}}}),new t.Separator,new t.Action("editor.action.selectAll",(0,y.localize)(5,null),void 0,!0,async()=>document.execCommand("selectAll")))}registerListeners(){this.layoutService.container.addEventListener("contextmenu",s=>this.onContextMenu(s))}onContextMenu(s){if(s.defaultPrevented)return;const o=s.target;if(!(o instanceof HTMLElement)||o.nodeName.toLowerCase()!=="input"&&o.nodeName.toLowerCase()!=="textarea")return;f.EventHelper.stop(s,!0);const u=new a.StandardMouseEvent(s);this.contextMenuService.showContextMenu({getAnchor:()=>u,getActions:()=>this.textInputActions,getActionsContext:()=>o})}};e.TextInputActionsProvider=r,e.TextInputActionsProvider=r=fe([O(0,b.IWorkbenchLayoutService),O(1,D.IContextMenuService),O(2,h.IClipboardService)],r),m.Registry.as(v.Extensions.Workbench).registerWorkbenchContribution(r,2)}),define(Q[427],Y([1,0,8,113,90,4,16,45]),function(q,e,t,y,b,D,T,f){"use strict";var v;Object.defineProperty(e,"__esModule",{value:!0}),e.registerNavigableContainer=void 0;function m(r,i){const s=new Set;return(0,D.combinedDisposable)(...r.map((o,u)=>(0,D.combinedDisposable)(o.onDidFocus(()=>{s.size||i(!0),s.add(u)}),o.onDidBlur(()=>{s.delete(u),s.size||i(!1)}))))}const S=new t.RawContextKey("navigableContainerFocused",!1);let h=class{static{v=this}constructor(i){this.containers=new Set,this.focused=S.bindTo(i),v.INSTANCE=this}dispose(){this.containers.clear(),this.focused.reset(),v.INSTANCE=void 0}static register(i){const s=this.INSTANCE;return s?(s.containers.add(i),(0,D.combinedDisposable)(m(i.focusNotifiers,o=>{o?(s.focused.set(!0),s.lastContainer=i):s.lastContainer===i&&(s.focused.set(!1),s.lastContainer=void 0)}),(0,D.toDisposable)(()=>{s.containers.delete(i),s.lastContainer===i&&(s.focused.set(!1),s.lastContainer=void 0)}))):D.Disposable.None}static getActive(){return this.INSTANCE?.lastContainer}};h=v=fe([O(0,t.IContextKeyService)],h);function a(r){return h.register(r)}e.registerNavigableContainer=a,T.Registry.as(f.Extensions.Workbench).registerWorkbenchContribution(h,1),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"widgetNavigation.focusPrevious",weight:200,when:t.ContextKeyExpr.and(S,t.ContextKeyExpr.or(b.WorkbenchListFocusContextKey?.negate(),b.WorkbenchListScrollAtTopContextKey)),primary:2064,handler:()=>{h.getActive()?.focusPreviousWidget()}}),y.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"widgetNavigation.focusNext",weight:200,when:t.ContextKeyExpr.and(S,t.ContextKeyExpr.or(b.WorkbenchListFocusContextKey?.negate(),b.WorkbenchListScrollAtBottomContextKey)),primary:2066,handler:()=>{h.getActive()?.focusNextWidget()}})}),define(Q[3922],Y([1,0,15,9,16,30,45,118]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let v=class{constructor(S,h,a){this.configurationService=S,this.extensionsWorkbenchService=h,this.telemetryService=a,this.init().catch(t.onUnexpectedError)}async init(){const S="coenraads.bracket-pair-colorizer-2";await this.extensionsWorkbenchService.queryLocal();const h=this.extensionsWorkbenchService.installed.find(i=>i.identifier.id===S);if(!h||h.enablementState!==8&&h.enablementState!==9)return;const a="editor.bracketPairColorization.enabled",r=!!this.configurationService.getValue(a);this.telemetryService.publicLog2("bracketPairColorizerTwoUsage",{nativeColorizationEnabled:r})}};v=fe([O(0,y.IConfigurationService),O(1,f.IExtensionsWorkbenchService),O(2,D.ITelemetryService)],v),b.Registry.as(T.Extensions.Workbench).registerWorkbenchContribution(v,3)}),define(Q[3923],Y([1,0,4,16,45,608]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let T=class extends t.Disposable{constructor(v){super(),this._register(v.registerVariable({name:"response",description:"",canTakeArgument:!0,hidden:!0},async(m,S,h,a)=>{if(!S)return;const r=parseInt(S,10),i=h.getRequests()[r-1].response;if(i)return[{level:"full",value:i.response.asString()}]}))}};T=fe([O(0,D.IChatVariablesService)],T),y.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(T,4)}),define(Q[3924],Y([1,0,56,5,16,45,3892,3893,121,3500,3501]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const h=v.ExtensionsRegistry.registerExtensionPoint(T.codeActionsExtensionPointDescriptor),a=v.ExtensionsRegistry.registerExtensionPoint(f.documentationExtensionPointDescriptor);b.Registry.as(t.Extensions.Configuration).registerConfiguration(m.editorConfiguration);let r=class{constructor(s){s.createInstance(m.CodeActionsContribution,h),s.createInstance(S.CodeActionDocumentationContribution,a)}};r=fe([O(0,y.IInstantiationService)],r),b.Registry.as(D.Extensions.Workbench).registerWorkbenchContribution(r,4)}),define(Q[3925],Y([1,0,15,4,79,564,5,16,45]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let m=class extends y.Disposable{constructor(a,r){super(),this._instantiationService=r,this._instantiated=!1,this._register(a.onWillCreateCodeEditor(()=>this._instantiate())),this._register(a.onWillCreateDiffEditor(()=>this._instantiate())),(a.listCodeEditors().length>0||a.listDiffEditors().length>0)&&this._instantiate()}_instantiate(){if(this._instantiated)return;this._instantiated=!0;const a=(0,D.getEditorFeatures)();for(const r of a)try{const i=this._instantiationService.createInstance(r);typeof i.dispose=="function"&&this._register(i)}catch(i){(0,t.onUnexpectedError)(i)}}};m=fe([O(0,b.ICodeEditorService),O(1,T.IInstantiationService)],m),f.Registry.as(v.Extensions.Workbench).registerWorkbenchContribution(m,2)}),define(Q[3926],Y([1,0,2651,18,13,9,8,16,45]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMultiCursorModifierAction=void 0;class m extends b.Action2{static{this.ID="workbench.action.toggleMultiCursorModifier"}static{this.multiCursorModifierConfigurationKey="editor.multiCursorModifier"}constructor(){super({id:m.ID,title:{value:(0,t.localize)(0,null),original:"Toggle Multi-Cursor Modifier"},f1:!0})}run(r){const i=r.get(D.IConfigurationService),o=i.getValue("editor").multiCursorModifier==="ctrlCmd"?"alt":"ctrlCmd";return i.updateValue(m.multiCursorModifierConfigurationKey,o)}}e.ToggleMultiCursorModifierAction=m;const S=new T.RawContextKey("multiCursorModifier","altKey");let h=class{constructor(r,i){this.configurationService=r,this._multiCursorModifier=S.bindTo(i),this._update(),r.onDidChangeConfiguration(s=>{s.affectsConfiguration("editor.multiCursorModifier")&&this._update()})}_update(){const i=this.configurationService.getValue("editor").multiCursorModifier==="ctrlCmd"?"ctrlCmd":"altKey";this._multiCursorModifier.set(i)}};h=fe([O(0,D.IConfigurationService),O(1,T.IContextKeyService)],h),f.Registry.as(v.Extensions.Workbench).registerWorkbenchContribution(h,3),(0,b.registerAction2)(m),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarSelectionMenu,{group:"4_config",command:{id:m.ID,title:(0,t.localize)(1,null)},when:S.isEqualTo("ctrlCmd"),order:1}),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarSelectionMenu,{group:"4_config",command:{id:m.ID,title:y.isMacintosh?(0,t.localize)(2,null):(0,t.localize)(3,null)},when:S.isEqualTo("altKey"),order:1})}),define(Q[750],Y([1,0,2654,4,48,79,13,8,73,32,16,45,21]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readTransientState=e.writeTransientState=void 0;const r="transientWordWrapState",i="isWordWrapMinified",s="isDominatedByLongLines",o=new f.RawContextKey("canToggleWordWrap",!1,!0),u=new f.RawContextKey("editorWordWrap",!1,t.localize(0,null));function d(_,A,k){k.setTransientModelProperty(_,r,A)}e.writeTransientState=d;function p(_,A){return A.getTransientModelProperty(_,r)}e.readTransientState=p;const c="editor.action.toggleWordWrap";class l extends b.EditorAction{constructor(){super({id:c,label:t.localize(1,null),alias:"View: Toggle Word Wrap",precondition:void 0,kbOpts:{kbExpr:null,primary:568,weight:100}})}run(A,k){const L=A.get(D.ICodeEditorService);if(!E(L,k))return;const R=k.getModel(),M=p(R,L);let N;M?N=null:N={wordWrapOverride:k.getOption(143).wrappingColumn===-1?"on":"off"},d(R,N,L);const P=n(k,L);if(P){const x=P.getOriginalEditor(),F=P.getModifiedEditor(),V=x===k?F:x;E(L,V)&&(d(V.getModel(),N,L),P.updateOptions({}))}}}function n(_,A){if(!_.getOption(60))return null;for(const k of A.listDiffEditors()){const L=k.getOriginalEditor(),R=k.getModifiedEditor();if(L===_||R===_)return k}return null}let g=class extends y.Disposable{static{this.ID="editor.contrib.toggleWordWrapController"}constructor(A,k,L){super(),this._editor=A,this._contextKeyService=k,this._codeEditorService=L;const M=this._editor.getOptions().get(143),N=this._contextKeyService.createKey(i,M.isWordWrapMinified),P=this._contextKeyService.createKey(s,M.isDominatedByLongLines);let x=!1;this._register(A.onDidChangeConfiguration(V=>{if(!V.hasChanged(143))return;const z=this._editor.getOptions().get(143);N.set(z.isWordWrapMinified),P.set(z.isDominatedByLongLines),x||F()})),this._register(A.onDidChangeModel(V=>{F()})),this._register(L.onDidChangeTransientModelProperty(()=>{F()}));const F=()=>{if(!E(this._codeEditorService,this._editor))return;const V=p(this._editor.getModel(),this._codeEditorService);try{x=!0,this._applyWordWrapState(V)}finally{x=!1}}}_applyWordWrapState(A){const k=A?A.wordWrapOverride:"inherit";this._editor.updateOptions({wordWrapOverride2:k})}};g=fe([O(1,f.IContextKeyService),O(2,D.ICodeEditorService)],g);let w=class extends y.Disposable{static{this.ID="diffeditor.contrib.toggleWordWrapController"}constructor(A,k){super(),this._diffEditor=A,this._codeEditorService=k,this._register(this._diffEditor.onDidChangeModel(()=>{this._ensureSyncedWordWrapToggle()}))}_ensureSyncedWordWrapToggle(){const A=this._diffEditor.getOriginalEditor(),k=this._diffEditor.getModifiedEditor();if(!A.hasModel()||!k.hasModel())return;const L=p(A.getModel(),this._codeEditorService),R=p(k.getModel(),this._codeEditorService);L&&!R&&E(this._codeEditorService,A)&&(d(k.getModel(),L,this._codeEditorService),this._diffEditor.updateOptions({})),!L&&R&&E(this._codeEditorService,k)&&(d(A.getModel(),R,this._codeEditorService),this._diffEditor.updateOptions({}))}};w=fe([O(1,D.ICodeEditorService)],w);function E(_,A){if(!A||A.isSimpleWidget)return!1;const k=A.getModel();if(!k||k.uri.scheme==="output")return!1;if(A.getOption(60)){for(const L of _.listDiffEditors())if(L.getOriginalEditor()===A&&!L.renderSideBySide)return!1}return!0}let C=class{constructor(A,k,L){this._editorService=A,this._codeEditorService=k,this._contextService=L,window.addEventListener("focus",()=>this._update(),!0),window.addEventListener("blur",()=>this._update(),!0),this._editorService.onDidActiveEditorChange(()=>this._update()),this._canToggleWordWrap=o.bindTo(this._contextService),this._editorWordWrap=u.bindTo(this._contextService),this._activeEditor=null,this._activeEditorListener=new y.DisposableStore,this._update()}_update(){const A=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();this._activeEditor!==A&&(this._activeEditorListener.clear(),this._activeEditor=A,A&&(this._activeEditorListener.add(A.onDidChangeModel(()=>this._updateFromCodeEditor())),this._activeEditorListener.add(A.onDidChangeConfiguration(k=>{k.hasChanged(143)&&this._updateFromCodeEditor()})),this._updateFromCodeEditor()))}_updateFromCodeEditor(){if(E(this._codeEditorService,this._activeEditor)){const A=this._activeEditor.getOption(143);this._setValues(!0,A.wrappingColumn!==-1)}else return this._setValues(!1,!1)}_setValues(A,k){this._canToggleWordWrap.set(A),this._editorWordWrap.set(k)}};C=fe([O(0,a.IEditorService),O(1,D.ICodeEditorService),O(2,f.IContextKeyService)],C),S.Registry.as(h.Extensions.Workbench).registerWorkbenchContribution(C,2),(0,b.registerEditorContribution)(g.ID,g,0),(0,b.registerDiffEditorContribution)(w.ID,w),(0,b.registerEditorAction)(l),T.MenuRegistry.appendMenuItem(T.MenuId.EditorTitle,{command:{id:c,title:t.localize(2,null),icon:m.Codicon.wordWrap},group:"navigation",order:1,when:f.ContextKeyExpr.and(f.ContextKeyExpr.has(s),f.ContextKeyExpr.has(i))}),T.MenuRegistry.appendMenuItem(T.MenuId.EditorTitle,{command:{id:c,title:t.localize(3,null),icon:m.Codicon.wordWrap},group:"navigation",order:1,when:f.ContextKeyExpr.and(v.EditorContextKeys.inDiffEditor.negate(),f.ContextKeyExpr.has(s),f.ContextKeyExpr.not(i))})}),define(Q[3927],Y([1,0,4,499,100,16,45]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let f=class extends t.Disposable{constructor(m){super(),this._register(m.onDidChangeDisplay(()=>{y.FontMeasurements.clearAllFontInfos()}))}};f=fe([O(0,b.INativeHostService)],f),D.Registry.as(T.Extensions.Workbench).registerWorkbenchContribution(f,4)}),define(Q[3928],Y([1,0,2656,14,4,18,48,27,68,463,16,45,9,73]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionClipboard=void 0;let s=class extends b.Disposable{static{i=this}static{this.SELECTION_LENGTH_LIMIT=65536}constructor(p,c){if(super(),D.isLinux){let l=p.getOption(105);this._register(p.onDidChangeConfiguration(g=>{g.hasChanged(105)&&(l=p.getOption(105))}));const n=this._register(new y.RunOnceScheduler(()=>{if(!p.hasModel())return;const g=p.getModel();let w=p.getSelections();w=w.slice(0),w.sort(f.Range.compareRangesUsingStarts);let E=0;for(const _ of w){if(_.isEmpty())return;E+=g.getValueLengthInRange(_)}if(E>i.SELECTION_LENGTH_LIMIT)return;const C=[];for(const _ of w)C.push(g.getValueInRange(_,0));const I=C.join(g.getEOL());c.writeText(I,"selection")},100));this._register(p.onDidChangeCursorSelection(g=>{l&&g.source!=="restoreState"&&n.schedule()}))}}dispose(){super.dispose()}};e.SelectionClipboard=s,e.SelectionClipboard=s=i=fe([O(1,v.IClipboardService)],s);let o=class{constructor(p){D.isLinux&&document.addEventListener("mouseup",c=>{c.button===1&&(p.getValue("editor").selectionClipboard||c.preventDefault())})}};o=fe([O(0,a.IConfigurationService)],o);class u extends T.EditorAction{constructor(){super({id:"editor.action.selectionClipboardPaste",label:t.localize(0,null),alias:"Paste Selection Clipboard",precondition:r.EditorContextKeys.writable})}async run(p,c,l){const g=await p.get(v.IClipboardService).readText("selection");c.trigger("keyboard","paste",{text:g,pasteOnNewLine:!1,multicursorText:null})}}(0,T.registerEditorContribution)(m.SelectionClipboardContributionID,s,0),S.Registry.as(h.Extensions.Workbench).registerWorkbenchContribution(o,2),D.isLinux&&(0,T.registerEditorAction)(u)}),define(Q[3929],Y([1,0,16,45,79,100,4]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let f=class extends T.Disposable{constructor(m,S){super(),this._register(S.onDidResumeOS(()=>{m.listCodeEditors().forEach(h=>h.render(!0))}))}};f=fe([O(0,b.ICodeEditorService),O(1,D.INativeHostService)],f),t.Registry.as(y.Extensions.Workbench).registerWorkbenchContribution(f,4)}),define(Q[3930],Y([1,0,45,16,5,139,3751]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionPoints=void 0;let f=class{constructor(m,S){S.args["export-default-configuration"]&&m.createInstance(T.DefaultConfigurationExportHelper)}};e.ExtensionPoints=f,e.ExtensionPoints=f=fe([O(0,b.IInstantiationService),O(1,D.INativeWorkbenchEnvironmentService)],f),y.Registry.as(t.Extensions.Workbench).registerWorkbenchContribution(f,3)}),define(Q[3931],Y([1,0,4,29,111,16,45]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let f=class{constructor(m,S){this.disposables=new t.DisposableStore;const h=a=>m.container.classList.toggle("context-menu-visible",a);S.onDidShowContextMenu(()=>h(!0),null,this.disposables),S.onDidHideContextMenu(()=>h(!1),null,this.disposables)}};f=fe([O(0,b.ILayoutService),O(1,y.IContextMenuService)],f),D.Registry.as(T.Extensions.Workbench).registerWorkbenchContribution(f,4)}),define(Q[3932],Y([1,0,34,15,17,2681,9,23,41,16,24,45,118]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let r=class{constructor(s,o,u,d,p){this.configurationService=s,this.extensionsWorkbenchService=o,this.storageService=u,this.notificationService=d,this.openerService=p,this.storageKey="deprecatedExtensionMigrator.state",this.init().catch(y.onUnexpectedError)}async init(){const s="coenraads.bracket-pair-colorizer";await this.extensionsWorkbenchService.queryLocal();const o=this.extensionsWorkbenchService.installed.find(l=>l.identifier.id===s);if(!o||o.enablementState!==8&&o.enablementState!==9)return;const u=await this.getState();if(u.disablementLog.some(l=>l.extensionId===s))return;u.disablementLog.push({extensionId:s,disablementDateTime:new Date().getTime()}),await this.setState(u),await this.extensionsWorkbenchService.setEnablement(o,6);const p="editor.bracketPairColorization.enabled",c=!!this.configurationService.inspect(p).user;this.notificationService.notify({message:(0,D.localize)(0,null),severity:f.Severity.Info,actions:{primary:[new t.Action("",(0,D.localize)(1,null),void 0,void 0,()=>{this.extensionsWorkbenchService.uninstall(o)})],secondary:[c?void 0:new t.Action("",(0,D.localize)(2,null),void 0,void 0,()=>{this.configurationService.updateValue(p,!0,2)}),new t.Action("",(0,D.localize)(3,null),void 0,void 0,()=>{this.openerService.open("https://github.com/microsoft/vscode/issues/155179")})].filter(b.isDefined)}})}async getState(){const s=await this.storageService.get(this.storageKey,-1,"");return s===""?{disablementLog:[]}:JSON.parse(s)}async setState(s){const o=JSON.stringify(s);await this.storageService.store(this.storageKey,o,-1,0)}};r=fe([O(0,T.IConfigurationService),O(1,a.IExtensionsWorkbenchService),O(2,S.IStorageService),O(3,f.INotificationService),O(4,v.IOpenerService)],r),m.Registry.as(h.Extensions.Workbench).registerWorkbenchContribution(r,3)}),define(Q[968],Y([1,0,2711,6,15,4,95,149,313,89,5,115,23]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isKeymapExtension=e.getInstalledExtensions=e.onExtensionChanged=e.KeymapExtensions=void 0;let r=class extends D.Disposable{constructor(d,p,c,l,n){super(),this.instantiationService=d,this.extensionEnablementService=p,this.tipsService=c,this.notificationService=n,this._register(l.onDidShutdown(()=>this.dispose())),this._register(d.invokeFunction(i)(g=>{Promise.all(g.map(w=>this.checkForOtherKeymaps(w))).then(void 0,b.onUnexpectedError)}))}checkForOtherKeymaps(d){return this.instantiationService.invokeFunction(s).then(p=>{const c=p.filter(n=>o(this.tipsService,n)),l=c.find(n=>(0,h.areSameExtensions)(n.identifier,d));if(l&&l.globallyEnabled){const n=c.filter(g=>!(0,h.areSameExtensions)(g.identifier,d)&&g.globallyEnabled);if(n.length)return this.promptForDisablingOtherKeymaps(l,n)}})}promptForDisablingOtherKeymaps(d,p){const c=l=>{l&&this.extensionEnablementService.setEnablement(p.map(n=>n.local),6)};this.notificationService.prompt(a.Severity.Info,(0,t.localize)(0,null,p.map(l=>`'${l.local.manifest.displayName}'`).join(", ")),[{label:(0,t.localize)(1,null),run:()=>c(!0)},{label:(0,t.localize)(2,null),run:()=>c(!1)}])}};e.KeymapExtensions=r,e.KeymapExtensions=r=fe([O(0,S.IInstantiationService),O(1,f.IWorkbenchExtensionEnablementService),O(2,v.IExtensionRecommendationsService),O(3,m.ILifecycleService),O(4,a.INotificationService)],r);function i(u){const d=u.get(T.IExtensionManagementService),p=u.get(f.IWorkbenchExtensionEnablementService),c=y.Event.chain(d.onDidInstallExtensions).filter(l=>l.some(({operation:n})=>n===2)).map(l=>l.map(({identifier:n})=>n)).event;return y.Event.debounce(y.Event.any(y.Event.chain(y.Event.any(c,y.Event.map(d.onDidUninstallExtension,l=>[l.identifier]))).event,y.Event.map(p.onEnablementChanged,l=>l.map(n=>n.identifier))),(l,n)=>{l=l||[];for(const g of n)l.some(w=>!(0,h.areSameExtensions)(w,g))&&l.push(g);return l})}e.onExtensionChanged=i;async function s(u){const d=u.get(T.IExtensionManagementService),p=u.get(f.IWorkbenchExtensionEnablementService);return(await d.getInstalled()).map(l=>({identifier:l.identifier,local:l,globallyEnabled:p.isEnabled(l)}))}e.getInstalledExtensions=s;function o(u,d){const p=d.local.manifest.categories;return p&&p.indexOf("Keymaps")!==-1||u.getKeymapRecommendations().some(c=>(0,h.areSameExtensions)({id:c},d.local.identifier))}e.isKeymapExtension=o}),define(Q[3933],Y([1,0,2722,55,1152,13,254,113,22,56,16,45,3187,9,192,181]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExternalTerminalContribution=void 0;const o="workbench.action.terminal.openNativeConsole";f.KeybindingsRegistry.registerCommandAndKeybindingRule({id:o,primary:3105,when:i.TerminalContextKeys.notFocus,weight:200,handler:async p=>{const c=p.get(T.IHistoryService),l=p.get(b.IExternalTerminalService),n=p.get(r.IConfigurationService),g=p.get(s.IRemoteAuthorityResolverService),w=c.getLastActiveWorkspaceRoot(),E=n.getValue("terminal.external");if(w?.scheme===v.Schemas.file){l.openTerminal(E,w.fsPath);return}try{if(w?.scheme===v.Schemas.vscodeRemote){const I=await g.getCanonicalURI(w);if(I.scheme===v.Schemas.file){l.openTerminal(E,I.fsPath);return}}}catch{}const C=c.getLastActiveFile(v.Schemas.file);if(C?.scheme===v.Schemas.file){l.openTerminal(E,y.dirname(C.fsPath));return}try{if(C?.scheme===v.Schemas.vscodeRemote){const I=await g.getCanonicalURI(C);if(I.scheme===v.Schemas.file){l.openTerminal(E,I.fsPath);return}}}catch{}l.openTerminal(E,void 0)}}),D.MenuRegistry.appendMenuItem(D.MenuId.CommandPalette,{command:{id:o,title:{value:t.localize(0,null),original:"Open New External Terminal"}}});let u=class{constructor(c){this._externalTerminalService=c,this._updateConfiguration()}async _updateConfiguration(){const c=await this._externalTerminalService.getDefaultTerminalForPlatforms();S.Registry.as(m.Extensions.Configuration).registerConfiguration({id:"externalTerminal",order:100,title:t.localize(1,null),type:"object",properties:{"terminal.explorerKind":{type:"string",enum:["integrated","external","both"],enumDescriptions:[t.localize(2,null),t.localize(3,null),t.localize(4,null)],description:t.localize(5,null),default:"integrated"},"terminal.sourceControlRepositoriesKind":{type:"string",enum:["integrated","external","both"],enumDescriptions:[t.localize(6,null),t.localize(7,null),t.localize(8,null)],description:t.localize(9,null),default:"integrated"},"terminal.external.windowsExec":{type:"string",description:t.localize(10,null),default:c.windows,scope:1},"terminal.external.osxExec":{type:"string",description:t.localize(11,null),default:b.DEFAULT_TERMINAL_OSX,scope:1},"terminal.external.linuxExec":{type:"string",description:t.localize(12,null),default:c.linux,scope:1}}})}};e.ExternalTerminalContribution=u,e.ExternalTerminalContribution=u=fe([O(0,a.IExternalTerminalMainService)],u),S.Registry.as(h.Extensions.Workbench).registerWorkbenchContribution(u,3)}),define(Q[3934],Y([1,0,4,414,2744,16,45,56,456,44,9]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0});let a=class extends t.Disposable{static{h=this}static{this.configName="editor.defaultFoldingRangeProvider"}static{this.extensionIds=[]}static{this.extensionItemLabels=[]}static{this.extensionDescriptions=[]}constructor(i,s){super(),this._extensionService=i,this._configurationService=s,this._store.add(this._extensionService.onDidChangeExtensions(this._updateConfigValues,this)),this._store.add(y.FoldingController.setFoldingRangeProviderSelector(this._selectFoldingRangeProvider.bind(this))),this._updateConfigValues()}async _updateConfigValues(){await this._extensionService.whenInstalledExtensionsRegistered(),h.extensionIds.length=0,h.extensionItemLabels.length=0,h.extensionDescriptions.length=0,h.extensionIds.push(null),h.extensionItemLabels.push(b.localize(0,null)),h.extensionDescriptions.push(b.localize(1,null));const i=[],s=[];for(const u of this._extensionService.extensions)(u.main||u.browser)&&(u.categories?.find(d=>d==="Programming Languages")?i.push(u):s.push(u));const o=(u,d)=>u.name.localeCompare(d.name);for(const u of i.sort(o))h.extensionIds.push(u.identifier.value),h.extensionItemLabels.push(u.displayName??""),h.extensionDescriptions.push(u.description??"");for(const u of s.sort(o))h.extensionIds.push(u.identifier.value),h.extensionItemLabels.push(u.displayName??""),h.extensionDescriptions.push(u.description??"")}_selectFoldingRangeProvider(i,s){const o=this._configurationService.getValue(h.configName,{overrideIdentifier:s.getLanguageId()});if(o)return i.filter(u=>u.id===o)}};a=h=fe([O(0,m.IExtensionService),O(1,S.IConfigurationService)],a),D.Registry.as(f.Extensions.Configuration).registerConfiguration({...v.editorConfigurationBaseNode,properties:{[a.configName]:{description:b.localize(2,null),type:["string","null"],default:null,enum:a.extensionIds,enumItemLabels:a.extensionItemLabels,markdownEnumDescriptions:a.extensionDescriptions}}}),D.Registry.as(T.Extensions.Workbench).registerWorkbenchContribution(a,3)}),define(Q[3935],Y([1,0,123,48,73,2745,8,43,31,5,411,27,30,112,16,56,45,44,4,9,23,50,149,456,49,74,748,21,28,59]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A){"use strict";var k;Object.defineProperty(e,"__esModule",{value:!0});let L=class extends d.Disposable{static{k=this}static{this.configName="editor.defaultFormatter"}static{this.extensionIds=[]}static{this.extensionItemLabels=[]}static{this.extensionDescriptions=[]}constructor(P,x,F,V,W,z,B,K,H,U){super(),this._extensionService=P,this._extensionEnablementService=x,this._configService=F,this._notificationService=V,this._dialogService=W,this._quickInputService=z,this._languageService=B,this._languageFeaturesService=K,this._languageStatusService=H,this._editorService=U,this._languageStatusStore=this._store.add(new d.DisposableStore),this._store.add(this._extensionService.onDidChangeExtensions(this._updateConfigValues,this)),this._store.add(S.FormattingConflicts.setFormatterSelector((G,$,ie)=>this._selectFormatter(G,$,ie))),this._store.add(U.onDidActiveEditorChange(this._updateStatus,this)),this._store.add(K.documentFormattingEditProvider.onDidChange(this._updateStatus,this)),this._store.add(K.documentRangeFormattingEditProvider.onDidChange(this._updateStatus,this)),this._store.add(F.onDidChangeConfiguration(G=>G.affectsConfiguration(k.configName)&&this._updateStatus())),this._updateConfigValues()}async _updateConfigValues(){await this._extensionService.whenInstalledExtensionsRegistered();let P=[...this._extensionService.extensions];P=P.sort((x,F)=>{const V=x.categories?.find(z=>z==="Formatters"||z==="Programming Languages"),W=F.categories?.find(z=>z==="Formatters"||z==="Programming Languages");return V&&!W?-1:!V&&W?1:x.name.localeCompare(F.name)}),k.extensionIds.length=0,k.extensionItemLabels.length=0,k.extensionDescriptions.length=0,k.extensionIds.push(null),k.extensionItemLabels.push(D.localize(0,null)),k.extensionDescriptions.push(D.localize(1,null));for(const x of P)(x.main||x.browser)&&(k.extensionIds.push(x.identifier.value),k.extensionItemLabels.push(x.displayName??""),k.extensionDescriptions.push(x.description??""))}static _maybeQuotes(P){return P.match(/\s/)?`'${P}'`:P}async _analyzeFormatter(P,x){const F=this._configService.getValue(k.configName,{resource:x.uri,overrideIdentifier:x.getLanguageId()});if(F){const z=P.find(K=>r.ExtensionIdentifier.equals(K.extensionId,F));if(z)return z;const B=await this._extensionService.getExtension(F);if(B&&this._extensionEnablementService.isEnabled((0,u.toExtension)(B))){const K=this._languageService.getLanguageName(x.getLanguageId())||x.getLanguageId();return D.localize(2,null,B.displayName||B.name,K)}}else if(P.length===1)return P[0];const V=this._languageService.getLanguageName(x.getLanguageId())||x.getLanguageId();return F?D.localize(4,null,F):D.localize(3,null,k._maybeQuotes(V))}async _selectFormatter(P,x,F){const V=await this._analyzeFormatter(P,x);if(typeof V!="string")return V;if(F!==2){const{confirmed:W}=await this._dialogService.confirm({message:D.localize(5,null),detail:V,primaryButton:D.localize(6,null)});if(W)return this._pickAndPersistDefaultFormatter(P,x)}else this._notificationService.prompt(c.Severity.Info,V,[{label:D.localize(7,null),run:()=>this._pickAndPersistDefaultFormatter(P,x)}],{priority:c.NotificationPriority.SILENT})}async _pickAndPersistDefaultFormatter(P,x){const F=P.map((z,B)=>({index:B,label:z.displayName||(z.extensionId?z.extensionId.value:"?"),description:z.extensionId&&z.extensionId.value})),V=this._languageService.getLanguageName(x.getLanguageId())||x.getLanguageId(),W=await this._quickInputService.pick(F,{placeHolder:D.localize(8,null,k._maybeQuotes(V))});if(!(!W||!P[W.index].extensionId))return this._configService.updateValue(k.configName,P[W.index].extensionId.value,{resource:x.uri,overrideIdentifier:x.getLanguageId()}),P[W.index]}_updateStatus(){this._languageStatusStore.clear();const P=(0,t.getCodeEditor)(this._editorService.activeTextEditorControl);if(!P||!P.hasModel())return;const x=P.getModel(),F=(0,S.getRealAndSyntheticDocumentFormattersOrdered)(this._languageFeaturesService.documentFormattingEditProvider,this._languageFeaturesService.documentRangeFormattingEditProvider,x);if(F.length===0)return;const V=new v.CancellationTokenSource;this._languageStatusStore.add((0,d.toDisposable)(()=>V.dispose(!0))),this._analyzeFormatter(F,x).then(W=>{if(V.token.isCancellationRequested||typeof W!="string")return;const z={id:`formatter/configure/dfl/${(0,A.generateUuid)()}`,title:D.localize(9,null)};this._languageStatusStore.add(_.CommandsRegistry.registerCommand(z.id,()=>this._pickAndPersistDefaultFormatter(F,x))),this._languageStatusStore.add(this._languageStatusService.addStatus({id:"formatter.conflict",name:D.localize(10,null),selector:{language:x.getLanguageId(),pattern:x.uri.fsPath},severity:c.Severity.Error,label:D.localize(11,null),detail:W,busy:!1,source:"",command:z,accessibilityInfo:void 0}))})}};L=k=fe([O(0,u.IExtensionService),O(1,n.IWorkbenchExtensionEnablementService),O(2,p.IConfigurationService),O(3,c.INotificationService),O(4,w.IDialogService),O(5,f.IQuickInputService),O(6,l.ILanguageService),O(7,E.ILanguageFeaturesService),O(8,C.ILanguageStatusService),O(9,I.IEditorService)],L),i.Registry.as(o.Extensions.Workbench).registerWorkbenchContribution(L,3),i.Registry.as(s.Extensions.Configuration).registerConfiguration({...g.editorConfigurationBaseNode,properties:{[L.configName]:{description:D.localize(12,null),type:["string","null"],default:null,enum:L.extensionIds,enumItemLabels:L.extensionItemLabels,markdownEnumDescriptions:L.extensionDescriptions}}});function R(N,P,x,F){function V(W){return W.extensionId?r.ExtensionIdentifier.toKey(W.extensionId):"unknown"}N.publicLog2("formatterpick",{mode:P,extensions:x.map(V),pick:F?V(F):"none"})}async function M(N,P,x){const F=N.get(f.IQuickInputService),V=N.get(p.IConfigurationService),W=N.get(l.ILanguageService),z={resource:P.uri,overrideIdentifier:P.getLanguageId()},B=V.getValue(L.configName,z);let K;const H=x.map(($,ie)=>{const J=r.ExtensionIdentifier.equals($.extensionId,B),j={index:ie,label:$.displayName||"",description:J?D.localize(13,null):void 0};return J&&(K=j),j}),U={label:D.localize(14,null)},G=await F.pick([...H,{type:"separator"},U],{placeHolder:D.localize(15,null),activeItem:K});if(G)if(G===U){const $=W.getLanguageName(P.getLanguageId())||P.getLanguageId(),ie=await F.pick(H,{placeHolder:D.localize(16,null,L._maybeQuotes($))});ie&&x[ie.index].extensionId&&V.updateValue(L.configName,x[ie.index].extensionId.value,z);return}else return G.index;else return}(0,y.registerEditorAction)(class extends y.EditorAction{constructor(){super({id:"editor.action.formatDocument.multiple",label:D.localize(17,null),alias:"Format Document...",precondition:T.ContextKeyExpr.and(b.EditorContextKeys.writable,b.EditorContextKeys.hasMultipleDocumentFormattingProvider),contextMenuOpts:{group:"1_modification",order:1.3}})}async run(P,x,F){if(!x.hasModel())return;const V=P.get(m.IInstantiationService),W=P.get(a.ITelemetryService),z=P.get(E.ILanguageFeaturesService),B=x.getModel(),K=(0,S.getRealAndSyntheticDocumentFormattersOrdered)(z.documentFormattingEditProvider,z.documentRangeFormattingEditProvider,B),H=await V.invokeFunction(M,B,K);typeof H=="number"&&await V.invokeFunction(S.formatDocumentWithProvider,K[H],x,1,v.CancellationToken.None),R(W,"document",K,typeof H=="number"&&K[H]||void 0)}}),(0,y.registerEditorAction)(class extends y.EditorAction{constructor(){super({id:"editor.action.formatSelection.multiple",label:D.localize(18,null),alias:"Format Code...",precondition:T.ContextKeyExpr.and(T.ContextKeyExpr.and(b.EditorContextKeys.writable),b.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider),contextMenuOpts:{when:T.ContextKeyExpr.and(b.EditorContextKeys.hasNonEmptySelection),group:"1_modification",order:1.31}})}async run(P,x){if(!x.hasModel())return;const F=P.get(m.IInstantiationService),V=P.get(E.ILanguageFeaturesService),W=P.get(a.ITelemetryService),z=x.getModel();let B=x.getSelection();B.isEmpty()&&(B=new h.Range(B.startLineNumber,1,B.startLineNumber,z.getLineMaxColumn(B.startLineNumber)));const K=V.documentRangeFormattingEditProvider.ordered(z),H=await F.invokeFunction(M,z,K);typeof H=="number"&&await F.invokeFunction(S.formatDocumentRangesWithProvider,K[H],x,B,v.CancellationToken.None),R(W,"range",K,typeof H=="number"&&K[H]||void 0)}})}),define(Q[3936],Y([1,0,2757,13,426,28,3886,52,16,45,81,91,49,100,72,865]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let o=class extends T.BaseIssueContribution{constructor(l){super(l),l.reportIssueUrl&&(0,y.registerAction2)(u)}};o=fe([O(0,f.IProductService)],o),v.Registry.as(m.Extensions.Workbench).registerWorkbenchContribution(o,3);class u extends y.Action2{static{this.ID="workbench.action.reportPerformanceIssueUsingReporter"}constructor(){super({id:u.ID,title:{value:(0,t.localize)(0,null),original:"Report Performance Issue"},category:S.Categories.Help,f1:!0})}async run(l){return l.get(b.IWorkbenchIssueService).openReporter({issueType:1})}}class d extends y.Action2{static{this.ID="workbench.action.openProcessExplorer"}constructor(){super({id:d.ID,title:{value:(0,t.localize)(1,null),original:"Open Process Explorer"},category:S.Categories.Developer,f1:!0})}async run(l){return l.get(b.IWorkbenchIssueService).openProcessExplorer()}}(0,y.registerAction2)(d),y.MenuRegistry.appendMenuItem(y.MenuId.MenubarHelpMenu,{group:"5_tools",command:{id:d.ID,title:(0,t.localize)(2,null)},order:2});class p extends y.Action2{static{this.ID="workbench.action.stopTracing"}constructor(){super({id:p.ID,title:{value:(0,t.localize)(3,null),original:"Stop Tracing"},category:S.Categories.Developer,f1:!0})}async run(l){const n=l.get(s.IIssueMainService),g=l.get(h.INativeEnvironmentService),w=l.get(a.IDialogService),E=l.get(r.INativeHostService),C=l.get(i.IProgressService);if(!g.args.trace){const{confirmed:I}=await w.confirm({message:(0,t.localize)(4,null),primaryButton:(0,t.localize)(5,null)});if(I)return E.relaunch({addArgs:["--trace"]})}await C.withProgress({location:20,title:(0,t.localize)(6,null),cancellable:!1,detail:(0,t.localize)(7,null)},()=>n.stopTracing())}}(0,y.registerAction2)(p),D.CommandsRegistry.registerCommand("_issues.getSystemStatus",c=>c.get(s.IIssueMainService).getSystemStatus())}),define(Q[3937],Y([1,0,4,63,123,21,748,16,45,2761,414,710]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LimitIndicatorContribution=void 0;const a="workbench.action.openSettings",r=m.localize(0,null);let i=class extends t.Disposable{constructor(p,c){super();const n=[new s,new o].map(E=>new u(c,E));n.forEach(E=>this._register(E));let g;const w=()=>{const E=p.activeTextEditorControl;if(E===g)return;g=E;const C=(0,b.getCodeEditor)(E);n.forEach(I=>I.onActiveEditorChanged(C))};this._register(p.onDidActiveEditorChange(w)),w()}};e.LimitIndicatorContribution=i,e.LimitIndicatorContribution=i=fe([O(0,D.IEditorService),O(1,T.ILanguageStatusService)],i);class s{constructor(){this.id="decoratorsLimitInfo",this.name=m.localize(1,null),this.label=m.localize(2,null),this.source=m.localize(3,null),this.settingsId="editor.colorDecoratorsLimit"}getLimitReporter(p){return h.ColorDetector.get(p)?.limitReporter}}class o{constructor(){this.id="foldingLimitInfo",this.name=m.localize(4,null),this.label=m.localize(5,null),this.source=m.localize(6,null),this.settingsId="editor.foldingMaximumRegions"}getLimitReporter(p){return S.FoldingController.get(p)?.limitReporter}}class u{constructor(p,c){this.languageStatusService=p,this.accessor=c}onActiveEditorChanged(p){this._indicatorChangeListener&&(this._indicatorChangeListener.dispose(),this._indicatorChangeListener=void 0);let c;return p&&(c=this.accessor.getLimitReporter(p)),this.updateStatusItem(c),c?(this._indicatorChangeListener=c.onDidChange(l=>{this.updateStatusItem(c)}),!0):!1}updateStatusItem(p){if(this._limitStatusItem&&(this._limitStatusItem.dispose(),this._limitStatusItem=void 0),p&&p.limited!==!1){const c={id:this.accessor.id,selector:"*",name:this.accessor.name,severity:y.default.Warning,label:this.accessor.label,detail:m.localize(7,null,p.limited),command:{id:a,arguments:[this.accessor.settingsId],title:r},accessibilityInfo:void 0,source:this.accessor.source,busy:!1};this._limitStatusItem=this.languageStatusService.addStatus(c)}}dispose(){this._limitStatusItem?.dispose,this._limitStatusItem=void 0,this._indicatorChangeListener?.dispose,this._indicatorChangeListener=void 0}}f.Registry.as(v.Extensions.Workbench).registerWorkbenchContribution(i,3)}),define(Q[3938],Y([1,0,8,16,45]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListContext=void 0;let D=class{constructor(f){f.createKey("listSupportsTypeNavigation",!0),f.createKey("listSupportsKeyboardNavigation",!0)}};e.ListContext=D,e.ListContext=D=fe([O(0,t.IContextKeyService)],D),y.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(D,1)}),define(Q[3939],Y([1,0,45,154,382,4,2774,16,36,9,56]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class h{constructor(i){this._markerService=i,this.label=(0,T.localize)(0,null),this.onDidChange=i.onMarkerChanged}provideDecorations(i){const s=this._markerService.read({resource:i,severities:y.MarkerSeverity.Error|y.MarkerSeverity.Warning});let o;for(const u of s)(!o||u.severity>o.severity)&&(o=u);if(o)return{weight:100*o.severity,bubble:!0,tooltip:s.length===1?(0,T.localize)(1,null):(0,T.localize)(2,null,s.length),letter:s.length<10?s.length.toString():"9+",color:o.severity===y.MarkerSeverity.Error?v.listErrorForeground:v.listWarningForeground}}}let a=class{constructor(i,s,o){this._markerService=i,this._decorationsService=s,this._configurationService=o,this._disposables=[this._configurationService.onDidChangeConfiguration(u=>{u.affectsConfiguration("problems")&&this._updateEnablement()})],this._updateEnablement()}dispose(){(0,D.dispose)(this._provider),(0,D.dispose)(this._disposables)}_updateEnablement(){const i=this._configurationService.getValue("problems");if(i.decorations.enabled!==this._enabled)if(this._enabled=i.decorations.enabled,this._enabled){const s=new h(this._markerService);this._provider=this._decorationsService.registerDecorationsProvider(s)}else this._provider&&(this._enabled=i.decorations.enabled,this._provider.dispose())}};a=fe([O(0,y.IMarkerService),O(1,b.IDecorationsService),O(2,m.IConfigurationService)],a),f.Registry.as(S.Extensions.Configuration).registerConfiguration({id:"problems",order:101,type:"object",properties:{"problems.decorations.enabled":{description:(0,T.localize)(3,null),type:"boolean",default:!0}}}),f.Registry.as(t.Extensions.Workbench).registerWorkbenchContribution(a,3)}),define(Q[3940],Y([1,0,4,69,50,2797,9,5,38,16,45,103,731,71,253,148,384]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let u=class{constructor(l,n){this._notebookService=l,this._languageService=n,this.viewType="*"}async provideCellStatusBarItems(l,n,g){const E=this._notebookService.getNotebookTextModel(l)?.cells[n];if(!E)return;const C=[];let I=E.language;if(E.cellKind===r.CellKind.Markup)I="markdown";else if(this._languageService.getLanguageIdByLanguageName(E.language))I=this._languageService.getLanguageName(I)??I;else{const A=(0,D.localize)(0,null,E.language);C.push({text:"$(dialog-warning)",command:{id:"workbench.extensions.search",arguments:[`@tag:${E.language}`],title:"Search Extensions"},tooltip:A,alignment:2,priority:-Number.MAX_SAFE_INTEGER+1})}return C.push({text:I,command:h.CHANGE_CELL_LANGUAGE,tooltip:(0,D.localize)(1,null),alignment:2,priority:-Number.MAX_SAFE_INTEGER}),{items:C}}};u=fe([O(0,s.INotebookService),O(1,b.ILanguageService)],u);let d=class{constructor(l,n,g,w,E,C){this._notebookService=l,this._notebookKernelService=n,this._languageService=g,this._configurationService=w,this._languageDetectionService=E,this._keybindingService=C,this.viewType="*",this.cache=new y.ResourceMap}async provideCellStatusBarItems(l,n,g){const w=this._notebookService.getNotebookTextModel(l),E=w?.cells[n];if(!E)return;const C=this._configurationService.getValue("workbench.editor.languageDetectionHints");if(!(typeof C=="object"&&C?.notebookEditors))return;const _=E.uri,A=E.textModel?.getVersionId();if(!A)return;const k=E.cellKind===r.CellKind.Markup?"markdown":this._languageService.getLanguageIdByLanguageName(E.language)||E.language;this.cache.has(_)||this.cache.set(_,{cellLanguage:k,updateTimestamp:0,contentVersion:1});const L=this.cache.get(_);if(L.cellLanguage!==k||L.updateTimestamp<Date.now()-1e3&&L.contentVersion!==A){L.updateTimestamp=Date.now(),L.cellLanguage=k,L.contentVersion=A;const M=this._notebookKernelService.getSelectedOrSuggestedKernel(w);if(M){const N=[...M.supportedLanguages,"markdown"];L.guess=await this._languageDetectionService.detectLanguage(E.uri,N)}}const R=[];if(L.guess&&k!==L.guess){const M=this._languageService.getLanguageName(L.guess)||L.guess;let N=(0,D.localize)(2,null,M);const x=this._keybindingService.lookupKeybinding(h.DETECT_CELL_LANGUAGE)?.getLabel();x&&(N+=` (${x})`),R.push({text:"$(lightbulb-autofix)",command:h.DETECT_CELL_LANGUAGE,tooltip:N,alignment:2,priority:-Number.MAX_SAFE_INTEGER+1})}return{items:R}}};d=fe([O(0,s.INotebookService),O(1,i.INotebookKernelService),O(2,b.ILanguageService),O(3,T.IConfigurationService),O(4,o.ILanguageDetectionService),O(5,v.IKeybindingService)],d);let p=class extends t.Disposable{constructor(l,n){super(),[u,d].forEach(w=>{this._register(n.registerCellStatusBarItemProvider(l.createInstance(w)))})}};p=fe([O(0,f.IInstantiationService),O(1,a.INotebookCellStatusBarService)],p),m.Registry.as(S.Extensions.Workbench).registerWorkbenchContribution(p,3)}),define(Q[3941],Y([1,0,2803,31,4,48,152,73,242,74,75,411,13,8,5,72,224,103,176,21,613,71,9,16,45,148]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellExecutionParticipantsContribution=void 0,(0,a.registerAction2)(class extends a.Action2{constructor(){super({id:"notebook.format",title:{value:(0,t.localize)(0,null),original:"Format Notebook"},category:o.NOTEBOOK_ACTIONS_CATEGORY,precondition:r.ContextKeyExpr.and(d.NOTEBOOK_IS_ACTIVE_EDITOR,d.NOTEBOOK_EDITOR_EDITABLE),keybinding:{when:f.EditorContextKeys.editorTextFocus.toNegated(),primary:1572,linux:{primary:3111},weight:200},f1:!0,menu:{id:a.MenuId.EditorContext,when:r.ContextKeyExpr.and(f.EditorContextKeys.inCompositeEditor,f.EditorContextKeys.hasDocumentFormattingProvider),group:"1_modification",order:1.3}})}async run(A){const k=A.get(p.IEditorService),L=A.get(S.ITextModelService),R=A.get(v.IEditorWorkerService),M=A.get(m.ILanguageFeaturesService),N=A.get(T.IBulkEditService),P=(0,u.getNotebookEditorFromEditorPane)(k.activeEditorPane);if(!P||!P.hasModel())return;const x=P.textModel,F=new b.DisposableStore;try{const V=await Promise.all(x.cells.map(async W=>{const z=await L.createModelReference(W.uri);F.add(z);const B=z.object.textEditorModel,K=await(0,h.getDocumentFormattingEditsUntilResult)(R,M,B,B.getOptions(),y.CancellationToken.None),H=[];if(K){for(const U of K)H.push(new T.ResourceTextEdit(B.uri,U,B.getVersionId()));return H}return[]}));await N.apply(V.flat(),{label:(0,t.localize)(1,null),code:"undoredo.formatNotebook"})}finally{F.dispose()}}}),(0,D.registerEditorAction)(class extends D.EditorAction{constructor(){super({id:"notebook.formatCell",label:(0,t.localize)(2,null),alias:"Format Cell",precondition:r.ContextKeyExpr.and(d.NOTEBOOK_IS_ACTIVE_EDITOR,d.NOTEBOOK_EDITOR_EDITABLE,f.EditorContextKeys.inCompositeEditor,f.EditorContextKeys.writable,f.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:r.ContextKeyExpr.and(f.EditorContextKeys.editorTextFocus),primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.301}})}async run(k,L){L.hasModel()&&await k.get(i.IInstantiationService).invokeFunction(h.formatDocumentWithSelectedProvider,L,1,s.Progress.None,y.CancellationToken.None)}});let C=class{constructor(k,L,R,M,N,P){this.bulkEditService=k,this.languageFeaturesService=L,this.textModelService=R,this.editorWorkerService=M,this.configurationService=N,this._notebookService=P}async onWillExecuteCell(k){if(!this.configurationService.getValue(l.NotebookSetting.formatOnCellExecution))return;const R=new b.DisposableStore;try{const M=await Promise.all(k.map(async N=>{const P=this._notebookService.getNotebookTextModel(N.notebook);if(!P)return[];let x;for(const B of P.cells)if(B.handle===N.cellHandle){x=B;break}if(!x)return[];const F=await this.textModelService.createModelReference(x.uri);R.add(F);const V=F.object.textEditorModel,W=await(0,h.getDocumentFormattingEditsUntilResult)(this.editorWorkerService,this.languageFeaturesService,V,V.getOptions(),y.CancellationToken.None),z=[];return W?(z.push(...W.map(B=>new T.ResourceTextEdit(V.uri,B,V.getVersionId()))),z):[]}));await this.bulkEditService.apply(M.flat(),{label:(0,t.localize)(3,null),code:"undoredo.notebooks.onWillExecuteFormat"})}finally{R.dispose()}}};C=fe([O(0,T.IBulkEditService),O(1,m.ILanguageFeaturesService),O(2,S.ITextModelService),O(3,v.IEditorWorkerService),O(4,n.IConfigurationService),O(5,E.INotebookService)],C);let I=class extends b.Disposable{constructor(k,L){super(),this.instantiationService=k,this.notebookExecutionService=L,this.registerKernelExecutionParticipants()}registerKernelExecutionParticipants(){this._register(this.notebookExecutionService.registerExecutionParticipant(this.instantiationService.createInstance(C)))}};e.CellExecutionParticipantsContribution=I,e.CellExecutionParticipantsContribution=I=fe([O(0,i.IInstantiationService),O(1,c.INotebookExecutionService)],I),g.Registry.as(w.Extensions.Workbench).registerWorkbenchContribution(I,3)}),define(Q[3942],Y([1,0,4,2804,13,28,9,8,16,24,81,45,191,176,71,314,21]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookGettingStarted=void 0;const u="hasOpenedNotebook",d="hasShownNotebookGettingStarted";let p=class extends t.Disposable{constructor(l,n,g,w,E){super();const C=r.HAS_OPENED_NOTEBOOK.bindTo(g),I=new a.Memento("notebookGettingStarted2",n),_=I.getMemento(0,0);_[u]&&C.set(!0);const A=E.getValue(i.NotebookSetting.openGettingStarted)&&!_[d];if(!_[u]||A){const k=()=>{C.set(!0),_[u]=!0,A&&(w.executeCommand("workbench.action.openWalkthrough",{category:"notebooks",step:"notebookProfile"},!0),_[d]=!0),I.saveMemento()};if(l.activeEditor?.typeId===s.NotebookEditorInput.ID){k();return}const L=this._register(l.onDidActiveEditorChange(()=>{l.activeEditor?.typeId===s.NotebookEditorInput.ID&&(L.dispose(),k())}))}}};e.NotebookGettingStarted=p,e.NotebookGettingStarted=p=fe([O(0,o.IEditorService),O(1,m.IStorageService),O(2,f.IContextKeyService),O(3,D.ICommandService),O(4,T.IConfigurationService)],p),v.Registry.as(h.Extensions.Workbench).registerWorkbenchContribution(p,3),(0,b.registerAction2)(class extends b.Action2{constructor(){super({id:"workbench.notebook.layout.gettingStarted",title:{value:(0,y.localize)(0,null),original:"Reset notebook getting started"},f1:!0,precondition:f.ContextKeyExpr.equals(`config.${i.NotebookSetting.openGettingStarted}`,!0),category:S.Categories.Developer})}run(l){const n=l.get(m.IStorageService),g=new a.Memento("notebookGettingStarted",n),w=g.getMemento(0,0);w[u]=void 0,g.saveMemento()}})}),define(Q[3943],Y([1,0,4,16,45,253,614,44]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let v=class extends t.Disposable{constructor(S,h,a){super(),this._notebookKernelService=S,this._extensionService=h,this._notebookLoggingService=a,this._detectionMap=new Map,this._localDisposableStore=this._register(new t.DisposableStore),this._registerListeners()}_registerListeners(){this._localDisposableStore.clear(),this._localDisposableStore.add(this._extensionService.onWillActivateByEvent(h=>{if(h.event.startsWith("onNotebook:")){if(this._extensionService.activationEventIsDone(h.event))return;const a=h.event.substring(11);if(a==="*")return;let r=!1;const i=this._extensionService.getExtensionsStatus();if(this._extensionService.extensions.forEach(s=>{i[s.identifier.value].activationTimes||s.activationEvents?.includes(h.event)&&(r=!0)}),r&&!this._detectionMap.has(a)){this._notebookLoggingService.debug("KernelDetection",`start extension activation for ${a}`);const s=this._notebookKernelService.registerNotebookKernelDetectionTask({notebookType:a});this._detectionMap.set(a,s)}}}));let S=null;this._localDisposableStore.add(this._extensionService.onDidChangeExtensionsStatus(()=>{S&&clearTimeout(S),S=setTimeout(()=>{const h=[];for(const[a,r]of this._detectionMap)this._extensionService.activationEventIsDone(`onNotebook:${a}`)&&(this._notebookLoggingService.debug("KernelDetection",`finish extension activation for ${a}`),h.push(a),r.dispose());h.forEach(a=>{this._detectionMap.delete(a)})})})),this._localDisposableStore.add({dispose:()=>{S&&clearTimeout(S)}})}};v=fe([O(0,D.INotebookKernelService),O(1,f.IExtensionService),O(2,T.INotebookLoggingService)],v),y.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(v,3)}),define(Q[3944],Y([1,0,16,45,1161,71,154,9,4,103,355,102,36,26]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let i=class{constructor(u,d,p){this._markerService=u,this._configService=p,this._dispoables=d.registerProvider(this)}dispose(){this._dispoables.dispose()}getMarkerList(u){if(!u)return;const d=D.CellUri.parse(u);if(d)return new b.MarkerList(p=>D.CellUri.parse(p)?.notebook.toString()===d.notebook.toString(),this._markerService,this._configService)}};i=fe([O(0,T.IMarkerService),O(1,b.IMarkerNavigationService),O(2,f.IConfigurationService)],i);let s=class extends v.Disposable{static{this.id="workbench.notebook.markerDecoration"}constructor(u,d){super(),this._notebookEditor=u,this._markerService=d,this._markersOverviewRulerDecorations=[],this._update(),this._register(this._notebookEditor.onDidChangeModel(()=>this._update())),this._register(this._markerService.onMarkerChanged(p=>{p.some(c=>this._notebookEditor.getCellsInRange().some(l=>(0,r.isEqual)(l.uri,c)))&&this._update()}))}_update(){if(!this._notebookEditor.hasModel())return;const u=[];this._notebookEditor.getCellsInRange().forEach(d=>{this._markerService.read({resource:d.uri,severities:T.MarkerSeverity.Error|T.MarkerSeverity.Warning}).forEach(c=>{const l=c.severity===T.MarkerSeverity.Error?a.editorErrorForeground:a.editorWarningForeground,n={startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn};u.push({handle:d.handle,options:{overviewRuler:{color:l,modelRanges:[n],includeOutput:!1,position:m.NotebookOverviewRulerLane.Right}}})})}),this._markersOverviewRulerDecorations=this._notebookEditor.deltaCellDecorations(this._markersOverviewRulerDecorations,u)}};fe([(0,h.throttle)(100)],s.prototype,"_update",null),s=fe([O(1,T.IMarkerService)],s),t.Registry.as(y.Extensions.Workbench).registerWorkbenchContribution(i,2),(0,S.registerNotebookContribution)(s.id,s)}),define(Q[3945],Y([1,0,4,16,45,71,21,103,48]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let m=class extends t.Disposable{constructor(a){super(),this._editorService=a;const r=105;this._register(v.UndoCommand.addImplementation(r,"notebook-undo-redo",()=>{const i=(0,f.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane),s=i?.getViewModel();return i&&i.hasModel()&&s?s.undo().then(o=>{if(o?.length){for(let u=0;u<i.getLength();u++){const d=i.cellAt(u);d.cellKind===D.CellKind.Markup&&o.find(p=>p.fragment===d.model.uri.fragment)&&d.updateEditState(f.CellEditState.Editing,"undo")}i?.setOptions({cellOptions:{resource:o[0]},preserveFocus:!0})}}):!1})),this._register(v.RedoCommand.addImplementation(r,"notebook-undo-redo",()=>{const i=(0,f.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane),s=i?.getViewModel();return i&&i.hasModel()&&s?s.redo().then(o=>{if(o?.length){for(let u=0;u<i.getLength();u++){const d=i.cellAt(u);d.cellKind===D.CellKind.Markup&&o.find(p=>p.fragment===d.model.uri.fragment)&&d.updateEditState(f.CellEditState.Editing,"redo")}i?.setOptions({cellOptions:{resource:o[0]},preserveFocus:!0})}}):!1}))}};m=fe([O(0,T.IEditorService)],m),y.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(m,2)}),define(Q[3946],Y([1,0,15,6,4,2830,5,23,968,149,89,95,115,24,191,20]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isNotebookKeymapExtension=e.NotebookKeymapService=void 0;function o(c){const l=c.get(h.IExtensionManagementService),n=c.get(m.IWorkbenchExtensionEnablementService),g=y.Event.chain(l.onDidInstallExtensions).filter(w=>w.some(({operation:E})=>E===2)).map(w=>w.map(({identifier:E})=>E)).event;return y.Event.debounce(y.Event.any(y.Event.chain(y.Event.any(g,y.Event.map(l.onDidUninstallExtension,w=>[w.identifier]))).event,y.Event.map(n.onEnablementChanged,w=>w.map(E=>E.identifier))),(w,E)=>{w=w||(E.length?[E[0]]:[]);for(const C of E)w.some(I=>!(0,a.areSameExtensions)(I,C))&&w.push(C);return w})}const u="hasRecommendedKeymap";let d=class extends b.Disposable{constructor(l,n,g,w,E){super(),this.instantiationService=l,this.extensionEnablementService=n,this.notificationService=g,this.notebookKeymapMemento=new i.Memento("notebookKeymap",w),this.notebookKeymap=this.notebookKeymapMemento.getMemento(0,0),this._register(E.onDidShutdown(()=>this.dispose())),this._register(this.instantiationService.invokeFunction(o)(C=>{Promise.all(C.map(I=>this.checkForOtherKeymaps(I))).then(void 0,t.onUnexpectedError)}))}checkForOtherKeymaps(l){return this.instantiationService.invokeFunction(v.getInstalledExtensions).then(n=>{const g=n.filter(E=>p(E)),w=g.find(E=>(0,a.areSameExtensions)(E.identifier,l));if(w&&w.globallyEnabled){this.notebookKeymap[u]=!0,this.notebookKeymapMemento.saveMemento();const E=g.filter(C=>!(0,a.areSameExtensions)(C.identifier,l)&&C.globallyEnabled);if(E.length)return this.promptForDisablingOtherKeymaps(w,E)}})}promptForDisablingOtherKeymaps(l,n){const g=w=>{w&&this.extensionEnablementService.setEnablement(n.map(E=>E.local),6)};this.notificationService.prompt(f.Severity.Info,(0,D.localize)(0,null,(0,s.distinct)(n.map(w=>w.local.manifest.displayName)).map(w=>`'${w}'`).join(", ")),[{label:(0,D.localize)(1,null),run:()=>g(!0)},{label:(0,D.localize)(2,null),run:()=>g(!1)}])}};e.NotebookKeymapService=d,e.NotebookKeymapService=d=fe([O(0,T.IInstantiationService),O(1,m.IWorkbenchExtensionEnablementService),O(2,f.INotificationService),O(3,r.IStorageService),O(4,S.ILifecycleService)],d);function p(c){if(c.local.manifest.extensionPack)return!1;const l=c.local.manifest.keywords;return l?l.indexOf("notebook-keymap")!==-1:!1}e.isNotebookKeymapExtension=p}),define(Q[1377],Y([1,0,6,4,197,27,96,440,750,103,611]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseCellViewModel=void 0;class h extends y.Disposable{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 internalMetadata(){return this.model.internalMetadata}get language(){return this.model.language}get mime(){if(typeof this.model.mime=="string")return this.model.mime;switch(this.language){case"markdown":return b.Mimes.markdown;default:return b.Mimes.text}}get lineNumbers(){return this._lineNumbers}set lineNumbers(r){r!==this._lineNumbers&&(this._lineNumbers=r,this._onDidChangeState.fire({cellLineNumberChanged:!0}))}get focusMode(){return this._focusMode}set focusMode(r){this._focusMode!==r&&(this._focusMode=r,this._onDidChangeState.fire({focusModeChanged:!0}))}get editorAttached(){return!!this._textEditor}get textModel(){return this.model.textModel}hasModel(){return!!this.textModel}get dragging(){return this._dragging}set dragging(r){this._dragging=r,this._onDidChangeState.fire({dragStateChanged:!0})}get isInputCollapsed(){return this._inputCollapsed}set isInputCollapsed(r){this._inputCollapsed=r,this._onDidChangeState.fire({inputCollapsedChanged:!0})}get isOutputCollapsed(){return this._outputCollapsed}set isOutputCollapsed(r){this._outputCollapsed=r,this._onDidChangeState.fire({outputCollapsedChanged:!0})}constructor(r,i,s,o,u,d,p,c){super(),this.viewType=r,this.model=i,this.id=s,this._viewContext=o,this._configurationService=u,this._modelService=d,this._undoRedoService=p,this._codeEditorService=c,this._onDidChangeEditorAttachState=this._register(new t.Emitter),this.onDidChangeEditorAttachState=this._onDidChangeEditorAttachState.event,this._onDidChangeState=this._register(new t.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._editState=m.CellEditState.Preview,this._lineNumbers="inherit",this._focusMode=m.CellFocusMode.Container,this._editorListeners=[],this._editorViewStates=null,this._editorTransientState=null,this._resolvedCellDecorations=new Map,this._cellDecorationsChanged=this._register(new t.Emitter),this.onCellDecorationsChanged=this._cellDecorationsChanged.event,this._resolvedDecorations=new Map,this._lastDecorationId=0,this._cellStatusBarItems=new Map,this._onDidChangeCellStatusBarItems=this._register(new t.Emitter),this.onDidChangeCellStatusBarItems=this._onDidChangeCellStatusBarItems.event,this._lastStatusBarId=0,this._dragging=!1,this._inputCollapsed=!1,this._outputCollapsed=!1,this._isDisposed=!1,this._editStateSource="",this._register(i.onDidChangeMetadata(()=>{this._onDidChangeState.fire({metadataChanged:!0})})),this._register(i.onDidChangeInternalMetadata(l=>{this._onDidChangeState.fire({internalMetadataChanged:!0}),l.lastRunSuccessChanged&&this.layoutChange({})})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration("notebook.lineNumbers")&&(this.lineNumbers="inherit")})),this.model.collapseState?.inputCollapsed&&(this._inputCollapsed=!0),this.model.collapseState?.outputCollapsed&&(this._outputCollapsed=!0)}assertTextModelAttached(){return!!(this.textModel&&this._textEditor&&this._textEditor.getModel()===this.textModel)}attachTextEditor(r,i){if(!r.hasModel())throw new Error("Invalid editor: model is missing");if(this._textEditor===r){this._editorListeners.length===0&&(this._editorListeners.push(this._textEditor.onDidChangeCursorSelection(()=>{this._onDidChangeState.fire({selectionChanged:!0})})),this._onDidChangeState.fire({selectionChanged:!0}));return}this._textEditor=r,this._editorViewStates?this._restoreViewState(this._editorViewStates):i&&this._restoreViewState({contributionsState:{},cursorState:[],viewState:{scrollLeft:0,firstPosition:{lineNumber:1,column:1},firstPositionDeltaTop:(0,S.getEditorTopPadding)()}}),this._editorTransientState&&(0,v.writeTransientState)(r.getModel(),this._editorTransientState,this._codeEditorService),this._textEditor?.changeDecorations(s=>{this._resolvedDecorations.forEach((o,u)=>{if(u.startsWith("_lazy_")){const d=s.addDecoration(o.options.range,o.options.options);this._resolvedDecorations.get(u).id=d}else{const d=s.addDecoration(o.options.range,o.options.options);this._resolvedDecorations.get(u).id=d}})}),this._editorListeners.push(this._textEditor.onDidChangeCursorSelection(()=>{this._onDidChangeState.fire({selectionChanged:!0})})),this._onDidChangeState.fire({selectionChanged:!0}),this._onDidChangeEditorAttachState.fire()}detachTextEditor(){this.saveViewState(),this.saveTransientState(),this._textEditor?.changeDecorations(r=>{this._resolvedDecorations.forEach(i=>{const s=i.id;s&&r.removeDecoration(s)})}),this._textEditor=void 0,(0,y.dispose)(this._editorListeners),this._editorListeners=[],this._onDidChangeEditorAttachState.fire(),this._textModelRef&&(this._textModelRef.dispose(),this._textModelRef=void 0)}getText(){return this.model.getValue()}getTextLength(){return this.model.getTextLength()}saveViewState(){this._textEditor&&(this._editorViewStates=this._textEditor.saveViewState())}saveTransientState(){!this._textEditor||!this._textEditor.hasModel()||(this._editorTransientState=(0,v.readTransientState)(this._textEditor.getModel(),this._codeEditorService))}saveEditorViewState(){return this._textEditor&&(this._editorViewStates=this._textEditor.saveViewState()),this._editorViewStates}restoreEditorViewState(r,i){this._editorViewStates=r}_restoreViewState(r){r&&this._textEditor?.restoreViewState(r)}addModelDecoration(r){if(!this._textEditor){const s=++this._lastDecorationId,o=`_lazy_${this.id};${s}`;return this._resolvedDecorations.set(o,{options:r}),o}let i;return this._textEditor.changeDecorations(s=>{i=s.addDecoration(r.range,r.options),this._resolvedDecorations.set(i,{id:i,options:r})}),i}removeModelDecoration(r){const i=this._resolvedDecorations.get(r);this._textEditor&&i&&i.id!==void 0&&this._textEditor.changeDecorations(s=>{s.removeDecoration(i.id)}),this._resolvedDecorations.delete(r)}deltaModelDecorations(r,i){return r.forEach(o=>{this.removeModelDecoration(o)}),i.map(o=>this.addModelDecoration(o))}_removeCellDecoration(r){const i=this._resolvedCellDecorations.get(r);i&&(this._cellDecorationsChanged.fire({added:[],removed:[i]}),this._resolvedCellDecorations.delete(r))}_addCellDecoration(r){const i=++this._lastDecorationId,s=`_cell_${this.id};${i}`;return this._resolvedCellDecorations.set(s,r),this._cellDecorationsChanged.fire({added:[r],removed:[]}),s}getCellDecorations(){return[...this._resolvedCellDecorations.values()]}getCellDecorationRange(r){return this._textEditor?this._textEditor.getModel()?.getDecorationRange(r)??null:null}deltaCellDecorations(r,i){return r.forEach(o=>{this._removeCellDecoration(o)}),i.map(o=>this._addCellDecoration(o))}deltaCellStatusBarItems(r,i){r.forEach(o=>{this._cellStatusBarItems.get(o)&&this._cellStatusBarItems.delete(o)});const s=i.map(o=>{const u=++this._lastStatusBarId,d=`_cell_${this.id};${u}`;return this._cellStatusBarItems.set(d,o),d});return this._onDidChangeCellStatusBarItems.fire(),s}getCellStatusBarItems(){return Array.from(this._cellStatusBarItems.values())}revealRangeInCenter(r){this._textEditor?.revealRangeInCenter(r,1)}setSelection(r){this._textEditor?.setSelection(r)}setSelections(r){r.length&&this._textEditor?.setSelections(r)}getSelections(){return this._textEditor?.getSelections()||[]}getSelectionsStartPosition(){return this._textEditor?this._textEditor.getSelections()?.map(i=>i.getStartPosition()):this._editorViewStates?.cursorState?.map(i=>i.selectionStart)}getLineScrollTopOffset(r){if(!this._textEditor)return 0;const i=this._viewContext.notebookOptions.computeEditorPadding(this.internalMetadata,this.uri);return this._textEditor.getTopForLineNumber(r)+i.top}getPositionScrollTopOffset(r){if(!this._textEditor)return 0;const i=r instanceof T.Selection?r.getPosition():r.getStartPosition(),s=this._viewContext.notebookOptions.computeEditorPadding(this.internalMetadata,this.uri);return this._textEditor.getTopForPosition(i.lineNumber,i.column)+s.top}cursorAtLineBoundary(){if(!this._textEditor||!this.textModel||!this._textEditor.hasTextFocus())return m.CursorAtLineBoundary.None;const r=this._textEditor.getSelection();if(!r||!r.isEmpty())return m.CursorAtLineBoundary.None;const i=this.textModel.getLineLength(r.startLineNumber);if(i===0)return m.CursorAtLineBoundary.Both;switch(r.startColumn){case 1:return m.CursorAtLineBoundary.Start;case i+1:return m.CursorAtLineBoundary.End;default:return m.CursorAtLineBoundary.None}}cursorAtBoundary(){if(!this._textEditor||!this.textModel)return m.CursorAtBoundary.None;const r=this._textEditor.getSelection();if(!r||!r.isEmpty())return m.CursorAtBoundary.None;const i=this._textEditor.getTopForPosition(1,1),s=this._textEditor.getTopForPosition(this.textModel.getLineCount(),this.textModel.getLineLength(this.textModel.getLineCount())),o=this._textEditor.getTopForPosition(r.startLineNumber,r.startColumn);return o===s?o===i?m.CursorAtBoundary.Both:m.CursorAtBoundary.Bottom:o===i?m.CursorAtBoundary.Top:m.CursorAtBoundary.None}get editStateSource(){return this._editStateSource}updateEditState(r,i){this._editStateSource=i,r!==this._editState&&(this._editState=r,this._onDidChangeState.fire({editStateChanged:!0}),this._editState===m.CellEditState.Preview&&(this.focusMode=m.CellFocusMode.Container))}getEditState(){return this._editState}get textBuffer(){return this.model.textBuffer}async resolveTextModel(){if(!this._textModelRef||!this.textModel){if(this._textModelRef=await this._modelService.createModelReference(this.uri),this._isDisposed)return this.textModel;if(!this._textModelRef)throw new Error(`Cannot resolve text model for ${this.uri}`);this._register(this.textModel.onDidChangeContent(()=>this.onDidChangeTextModelContent()))}return this.textModel}cellStartFind(r,i){let s=[];if(this.assertTextModelAttached())s=this.textModel.findMatches(r,!1,i.regex||!1,i.caseSensitive||!1,i.wholeWord&&i.wordSeparators||null,i.regex||!1);else{const o=this.textBuffer.getLineCount(),u=new D.Range(1,1,o,this.textBuffer.getLineLength(o)+1),p=new f.SearchParams(r,i.regex||!1,i.caseSensitive||!1,i.wholeWord&&i.wordSeparators||null).parseSearchRequest();if(!p)return null;s=this.textBuffer.findMatchesLineByLine(u,p,i.regex||!1,1e3)}return s}dispose(){this._isDisposed=!0,super.dispose(),(0,y.dispose)(this._editorListeners),this._undoRedoService.getUriComparisonKey(this.uri)===this.uri.toString()&&this._undoRedoService.removeElements(this.uri),this._textModelRef?.dispose()}toJSON(){return{handle:this.handle}}}e.BaseCellViewModel=h}),define(Q[540],Y([1,0,6,4,59,79,75,490,9,189,103,1293,71,148,1377]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeCellViewModel=e.outputDisplayLimit=void 0,e.outputDisplayLimit=500;let s=class extends i.BaseCellViewModel{set editorHeight(u){this._editorHeight!==u&&(this._editorHeight=u,this.layoutChange({editorHeight:!0},"CodeCellViewModel#editorHeight"))}get editorHeight(){throw new Error("editorHeight is write-only")}set commentHeight(u){this._commentHeight!==u&&(this._commentHeight=u,this.layoutChange({commentHeight:!0},"CodeCellViewModel#commentHeight"))}get outputIsHovered(){return this._hoveringOutput}set outputIsHovered(u){this._hoveringOutput=u,this._onDidChangeState.fire({outputIsHoveredChanged:!0})}get outputIsFocused(){return this._focusOnOutput}set outputIsFocused(u){this._focusOnOutput=u,this._onDidChangeState.fire({outputIsFocusedChanged:!0})}get outputMinHeight(){return this._outputMinHeight}set outputMinHeight(u){this._outputMinHeight=u}get layoutInfo(){return this._layoutInfo}get outputsViewModels(){return this._outputViewModels}constructor(u,d,p,c,l,n,g,w,E){super(u,d,b.generateUuid(),c,l,g,w,E),this.viewContext=c,this._notebookService=n,this.cellKind=a.CellKind.Code,this._onLayoutInfoRead=this._register(new t.Emitter),this.onLayoutInfoRead=this._onLayoutInfoRead.event,this._onDidStartExecution=this._register(new t.Emitter),this.onDidStartExecution=this._onDidStartExecution.event,this._onDidStopExecution=this._register(new t.Emitter),this.onDidStopExecution=this._onDidStopExecution.event,this._onDidChangeOutputs=this._register(new t.Emitter),this.onDidChangeOutputs=this._onDidChangeOutputs.event,this._onDidRemoveOutputs=this._register(new t.Emitter),this.onDidRemoveOutputs=this._onDidRemoveOutputs.event,this._outputCollection=[],this._outputsTop=null,this._pauseableEmitter=this._register(new t.PauseableEmitter),this.onDidChangeLayout=this._pauseableEmitter.event,this._editorHeight=0,this._commentHeight=0,this._hoveringOutput=!1,this._focusOnOutput=!1,this._outputMinHeight=0,this._hasFindResult=this._register(new t.Emitter),this.hasFindResult=this._hasFindResult.event,this._outputViewModels=this.model.outputs.map(C=>new h.CellOutputViewModel(this,C,this._notebookService)),this._register(this.model.onDidChangeOutputs(C=>{const I=[];let _=!1;for(let A=C.start;A<C.start+C.deleteCount;A++)this._outputCollection[A]!==void 0&&this._outputCollection[A]!==0&&(_=!0);this._outputCollection.splice(C.start,C.deleteCount,...C.newOutputs.map(()=>0)),I.push(...this._outputViewModels.splice(C.start,C.deleteCount,...C.newOutputs.map(A=>new h.CellOutputViewModel(this,A,this._notebookService)))),this._outputsTop=null,this._onDidChangeOutputs.fire(C),this._onDidRemoveOutputs.fire(I),_&&this.layoutChange({outputHeight:!0},"CodeCellViewModel#model.onDidChangeOutputs"),(0,y.dispose)(I)})),this._outputCollection=new Array(this.model.outputs.length),this._layoutInfo={fontInfo:p?.fontInfo||null,editorHeight:0,editorWidth:p?this.viewContext.notebookOptions.computeCodeCellEditorWidth(p.width):0,statusBarHeight:0,commentHeight:0,outputContainerOffset:0,outputTotalHeight:0,outputShowMoreContainerHeight:0,outputShowMoreContainerOffset:0,totalHeight:this.computeTotalHeight(17,0,0),codeIndicatorHeight:0,outputIndicatorHeight:0,bottomToolbarOffset:0,layoutState:S.CellLayoutState.Uninitialized,estimatedHasHorizontalScrolling:!1}}updateExecutionState(u){u.changed?this._onDidStartExecution.fire(u):this._onDidStopExecution.fire(u)}updateOptions(u){(u.cellStatusBarVisibility||u.insertToolbarPosition||u.cellToolbarLocation)&&this.layoutChange({})}pauseLayout(){this._pauseableEmitter.pause()}resumeLayout(){this._pauseableEmitter.resume()}layoutChange(u,d){this._ensureOutputsTop();const p=this.viewContext.notebookOptions.getLayoutConfiguration(),c=this.viewContext.notebookOptions.computeBottomToolbarDimensions(this.viewType),l=u.outputShowMoreContainerHeight?u.outputShowMoreContainerHeight:this._layoutInfo.outputShowMoreContainerHeight,n=Math.max(this._outputMinHeight,this.isOutputCollapsed?p.collapsedIndicatorHeight:this._outputsTop.getTotalSum()),g=u.commentHeight?this._commentHeight:this._layoutInfo.commentHeight,w=this.layoutInfo;if(this.isInputCollapsed){const E=p.collapsedIndicatorHeight,C=n+l,I=p.cellTopMargin+p.collapsedIndicatorHeight,_=p.cellTopMargin+p.collapsedIndicatorHeight+p.cellBottomMargin+c.bottomToolbarGap+g+n+l,A=_-c.bottomToolbarGap-c.bottomToolbarHeight/2-l,k=this.viewContext.notebookOptions.computeBottomToolbarOffset(_,this.viewType),L=u.outerWidth!==void 0?this.viewContext.notebookOptions.computeCodeCellEditorWidth(u.outerWidth):this._layoutInfo?.editorWidth;this._layoutInfo={fontInfo:u.font??this._layoutInfo.fontInfo??null,editorHeight:this._layoutInfo.editorHeight,editorWidth:L,statusBarHeight:0,commentHeight:g,outputContainerOffset:I,outputTotalHeight:n,outputShowMoreContainerHeight:l,outputShowMoreContainerOffset:A,totalHeight:_,codeIndicatorHeight:E,outputIndicatorHeight:C,bottomToolbarOffset:k,layoutState:this._layoutInfo.layoutState,estimatedHasHorizontalScrolling:!1}}else{let E,C,I,_=!1;if(!u.editorHeight&&this._layoutInfo.layoutState===S.CellLayoutState.FromCache&&!u.outputHeight){const x=this.estimateEditorHeight(u.font?.lineHeight??this._layoutInfo.fontInfo?.lineHeight);C=x.editorHeight,_=x.hasHorizontalScrolling,I=this._layoutInfo.totalHeight,E=S.CellLayoutState.FromCache}else if(u.editorHeight||this._layoutInfo.layoutState===S.CellLayoutState.Measured)C=this._editorHeight,I=this.computeTotalHeight(this._editorHeight,n,l),E=S.CellLayoutState.Measured,_=this._layoutInfo.estimatedHasHorizontalScrolling;else{const x=this.estimateEditorHeight(u.font?.lineHeight??this._layoutInfo.fontInfo?.lineHeight);C=x.editorHeight,_=x.hasHorizontalScrolling,I=this.computeTotalHeight(C,n,l),E=S.CellLayoutState.Estimated}const A=this.viewContext.notebookOptions.computeEditorStatusbarHeight(this.internalMetadata,this.uri),k=C+A,L=n+l,R=p.editorToolbarHeight+p.cellTopMargin+C+A,M=I-c.bottomToolbarGap-c.bottomToolbarHeight/2-l,N=this.viewContext.notebookOptions.computeBottomToolbarOffset(I,this.viewType),P=u.outerWidth!==void 0?this.viewContext.notebookOptions.computeCodeCellEditorWidth(u.outerWidth):this._layoutInfo?.editorWidth;this._layoutInfo={fontInfo:u.font??this._layoutInfo.fontInfo??null,editorHeight:C,editorWidth:P,statusBarHeight:A,commentHeight:g,outputContainerOffset:R,outputTotalHeight:n,outputShowMoreContainerHeight:l,outputShowMoreContainerOffset:M,totalHeight:I,codeIndicatorHeight:k,outputIndicatorHeight:L,bottomToolbarOffset:N,layoutState:E,estimatedHasHorizontalScrolling:_}}this._fireOnDidChangeLayout({...u,totalHeight:this.layoutInfo.totalHeight!==w.totalHeight,source:d})}_fireOnDidChangeLayout(u){this._pauseableEmitter.fire(u)}restoreEditorViewState(u,d){super.restoreEditorViewState(u),d!==void 0&&this._layoutInfo.layoutState!==S.CellLayoutState.Measured&&(this._layoutInfo={fontInfo:this._layoutInfo.fontInfo,editorHeight:this._layoutInfo.editorHeight,editorWidth:this._layoutInfo.editorWidth,statusBarHeight:this.layoutInfo.statusBarHeight,commentHeight:this.layoutInfo.commentHeight,outputContainerOffset:this._layoutInfo.outputContainerOffset,outputTotalHeight:this._layoutInfo.outputTotalHeight,outputShowMoreContainerHeight:this._layoutInfo.outputShowMoreContainerHeight,outputShowMoreContainerOffset:this._layoutInfo.outputShowMoreContainerOffset,totalHeight:d,codeIndicatorHeight:this._layoutInfo.codeIndicatorHeight,outputIndicatorHeight:this._layoutInfo.outputIndicatorHeight,bottomToolbarOffset:this._layoutInfo.bottomToolbarOffset,layoutState:S.CellLayoutState.FromCache,estimatedHasHorizontalScrolling:this._layoutInfo.estimatedHasHorizontalScrolling})}getDynamicHeight(){return this._onLayoutInfoRead.fire(),this._layoutInfo.totalHeight}getHeight(u){if(this._layoutInfo.layoutState===S.CellLayoutState.Uninitialized){const d=this.estimateEditorHeight(u);return this.computeTotalHeight(d.editorHeight,0,0)}else return this._layoutInfo.totalHeight}estimateEditorHeight(u=20){let d=!1;const p=this.viewContext.getBaseCellEditorOptions(this.language);if(this.layoutInfo.fontInfo&&p.value.wordWrap==="off"){for(let g=0;g<this.lineCount;g++)if(this.textBuffer.getLineLastNonWhitespaceColumn(g+1)*(this.layoutInfo.fontInfo.typicalHalfwidthCharacterWidth+this.layoutInfo.fontInfo.letterSpacing)>this.layoutInfo.editorWidth){d=!0;break}}const c=d?12:0,l=this.viewContext.notebookOptions.computeEditorPadding(this.internalMetadata,this.uri);return{editorHeight:this.lineCount*u+l.top+l.bottom+c,hasHorizontalScrolling:d}}computeTotalHeight(u,d,p){const c=this.viewContext.notebookOptions.getLayoutConfiguration(),{bottomToolbarGap:l}=this.viewContext.notebookOptions.computeBottomToolbarDimensions(this.viewType);return c.editorToolbarHeight+c.cellTopMargin+u+this.viewContext.notebookOptions.computeEditorStatusbarHeight(this.internalMetadata,this.uri)+this._commentHeight+d+p+l+c.cellBottomMargin}onDidChangeTextModelContent(){this.getEditState()!==S.CellEditState.Editing&&(this.updateEditState(S.CellEditState.Editing,"onDidChangeTextModelContent"),this._onDidChangeState.fire({contentChanged:!0}))}onDeselect(){this.updateEditState(S.CellEditState.Preview,"onDeselect")}updateOutputShowMoreContainerHeight(u){this.layoutChange({outputShowMoreContainerHeight:u},"CodeCellViewModel#updateOutputShowMoreContainerHeight")}updateOutputMinHeight(u){this.outputMinHeight=u}unlockOutputHeight(){this.outputMinHeight=0,this.layoutChange({outputHeight:!0})}updateOutputHeight(u,d,p){if(u>=this._outputCollection.length)throw new Error("Output index out of range!");this._ensureOutputsTop(),d<28&&this._outputViewModels[u].hasMultiMimeType()&&(d=28),this._outputCollection[u]=d,this._outputsTop.setValue(u,d)&&this.layoutChange({outputHeight:!0},p)}getOutputOffsetInContainer(u){if(this._ensureOutputsTop(),u>=this._outputCollection.length)throw new Error("Output index out of range!");return this._outputsTop.getPrefixSum(u-1)}getOutputOffset(u){return this.layoutInfo.outputContainerOffset+this.getOutputOffsetInContainer(u)}spliceOutputHeights(u,d,p){if(this._ensureOutputsTop(),this._outputsTop.removeValues(u,d),p.length){const c=new Uint32Array(p.length);for(let l=0;l<p.length;l++)c[l]=p[l];this._outputsTop.insertValues(u,c)}this.layoutChange({outputHeight:!0},"CodeCellViewModel#spliceOutputs")}_ensureOutputsTop(){if(!this._outputsTop){const u=new Uint32Array(this._outputCollection.length);for(let d=0;d<this._outputCollection.length;d++)u[d]=this._outputCollection[d];this._outputsTop=new f.PrefixSumComputer(u)}}startFind(u,d){const p=super.cellStartFind(u,d);return p===null?null:{cell:this,contentMatches:p}}dispose(){super.dispose(),this._outputCollection=[],this._outputsTop=null,(0,y.dispose)(this._outputViewModels)}};e.CodeCellViewModel=s,e.CodeCellViewModel=s=fe([O(4,v.IConfigurationService),O(5,r.INotebookService),O(6,T.ITextModelService),O(7,m.IUndoRedoService),O(8,D.ICodeEditorService)],s)}),define(Q[3947],Y([1,0,14,4,66,103,355,540,71,356,148]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let h=class extends y.Disposable{static{this.id="workbench.notebook.viewportWarmup"}constructor(r,i,s){super(),this._notebookEditor=r,this._notebookService=i,this._warmupDocument=null,this._warmupViewport=new t.RunOnceScheduler(()=>this._warmupViewportNow(),200),this._register(this._warmupViewport),this._register(this._notebookEditor.onDidScroll(()=>{this._warmupViewport.schedule()})),this._warmupDocument=new t.RunOnceScheduler(()=>this._warmupDocumentNow(),200),this._register(this._warmupDocument),this._register(this._notebookEditor.onDidAttachViewModel(()=>{this._notebookEditor.hasModel()&&this._warmupDocument?.schedule()})),this._notebookEditor.hasModel()&&this._warmupDocument?.schedule()}_warmupDocumentNow(){if(this._notebookEditor.hasModel())for(let r=0;r<this._notebookEditor.getLength();r++){const i=this._notebookEditor.cellAt(r);i?.cellKind===v.CellKind.Markup&&i?.getEditState()===D.CellEditState.Preview&&!i.isInputCollapsed||i?.cellKind===v.CellKind.Code&&this._warmupCodeCell(i)}}_warmupViewportNow(){if(this._notebookEditor.isDisposed||!this._notebookEditor.hasModel())return;const r=this._notebookEditor.getVisibleRangesPlusViewportAboveAndBelow();(0,m.cellRangesToIndexes)(r).forEach(i=>{const s=this._notebookEditor.cellAt(i);s?.cellKind===v.CellKind.Markup&&s?.getEditState()===D.CellEditState.Preview&&!s.isInputCollapsed?this._notebookEditor.createMarkupPreview(s):s?.cellKind===v.CellKind.Code&&this._warmupCodeCell(s)})}_warmupCodeCell(r){if(r.isOutputCollapsed)return;const i=r.outputsViewModels;for(const s of i.slice(0,f.outputDisplayLimit)){const[o,u]=s.resolveMimeTypes(this._notebookEditor.textModel,void 0);if(!o.find(l=>l.isTrusted)||o.length===0)continue;const d=o[u];if(!d||!this._notebookEditor.hasModel())return;const p=this._notebookService.getRendererInfo(d.rendererId);if(!p)return;const c={type:1,renderer:p,source:s,mimeType:d.mimeType};this._notebookEditor.createOutput(r,c,0,!0)}}};h=fe([O(1,S.INotebookService),O(2,b.IAccessibilityService)],h),(0,T.registerNotebookContribution)(h.id,h)}),define(Q[3948],Y([1,0,7,67,576,132,6,257,4,393,28,5,23,30,19,103,244,540,446,193,9]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellEditorStatusBar=void 0;const l=t.$;let n=class extends o.CellContentPart{constructor(E,C,I,_,A,k,L,R){super(),this._notebookEditor=E,this._cellContainer=C,this._editor=_,this._instantiationService=A,this._themeService=R,this.leftItems=[],this.rightItems=[],this.width=0,this._onDidClick=this._register(new T.Emitter),this.onDidClick=this._onDidClick.event,this.statusBarContainer=t.append(I,l(".cell-statusbar-container")),this.statusBarContainer.tabIndex=-1;const M=t.append(this.statusBarContainer,l(".cell-status-left")),N=t.append(this.statusBarContainer,l(".cell-status-right"));this.leftItemsContainer=t.append(M,l(".cell-contributed-items.cell-contributed-items-left")),this.rightItemsContainer=t.append(N,l(".cell-contributed-items.cell-contributed-items-right")),this.itemsDisposable=this._register(new v.DisposableStore),this.hoverDelegate=new class{constructor(){this._lastHoverHideTime=0,this.showHover=P=>(P.hoverPosition=3,k.showHover(P)),this.placement="element"}get delay(){return Date.now()-this._lastHoverHideTime<200?0:L.getValue("workbench.hover.delay")}onDidHideHover(){this._lastHoverHideTime=Date.now()}},this._register(this._themeService.onDidColorThemeChange(()=>this.currentContext&&this.updateContext(this.currentContext))),this._register(t.addDisposableListener(this.statusBarContainer,t.EventType.CLICK,P=>{P.target===M||P.target===N||P.target===this.statusBarContainer?this._onDidClick.fire({type:0,event:P}):P.target.classList.contains("cell-status-item-has-command")?this._onDidClick.fire({type:2,event:P}):this._onDidClick.fire({type:1,event:P})}))}didRenderCell(E){if(this.updateContext({ui:!0,cell:E,notebookEditor:this._notebookEditor,$mid:13}),this._editor){const C=()=>{this._editor&&(this._editor.hasWidgetFocus()||document.activeElement&&this.statusBarContainer.contains(document.activeElement))?E.focusMode=s.CellFocusMode.Editor:E.focusMode===s.CellFocusMode.Output&&this._notebookEditor.hasWebviewFocus()?E.focusMode=s.CellFocusMode.Output:E.focusMode=s.CellFocusMode.Container};this.cellDisposables.add(this._editor.onDidFocusEditorWidget(()=>{C()})),this.cellDisposables.add(this._editor.onDidBlurEditorWidget(()=>{this._notebookEditor.hasEditorFocus()&&!(document.activeElement&&this.statusBarContainer.contains(document.activeElement))&&C()})),this.cellDisposables.add(this.onDidClick(I=>{if(this.currentCell instanceof u.CodeCellViewModel&&I.type!==2&&this._editor){const _=this._editor.getTargetAtClientPoint(I.event.clientX,I.event.clientY-this._notebookEditor.notebookOptions.computeEditorStatusbarHeight(this.currentCell.internalMetadata,this.currentCell.uri));_?.position&&(this._editor.setPosition(_.position),this._editor.focus())}}))}}updateInternalLayoutNow(E){this._cellContainer.classList.toggle("cell-statusbar-hidden",this._notebookEditor.notebookOptions.computeEditorStatusbarHeight(E.internalMetadata,E.uri)===0);const I=E.layoutInfo.editorWidth;if(!I)return;this.width=I,this.statusBarContainer.style.width=`${I}px`;const _=this.getMaxItemWidth();this.leftItems.forEach(A=>A.maxWidth=_),this.rightItems.forEach(A=>A.maxWidth=_)}getMaxItemWidth(){return this.width/2}updateContext(E){this.currentContext=E,this.itemsDisposable.clear(),this.currentContext&&(this.itemsDisposable.add(this.currentContext.cell.onDidChangeLayout(()=>{this.currentContext&&this.updateInternalLayoutNow(this.currentContext.cell)})),this.itemsDisposable.add(this.currentContext.cell.onDidChangeCellStatusBarItems(()=>this.updateRenderedItems())),this.itemsDisposable.add(this.currentContext.notebookEditor.onDidChangeActiveCell(()=>this.updateActiveCell())),this.updateInternalLayoutNow(this.currentContext.cell),this.updateActiveCell(),this.updateRenderedItems())}updateActiveCell(){const E=this.currentContext.notebookEditor.getActiveCell()===this.currentContext?.cell;this.statusBarContainer.classList.toggle("is-active-cell",E)}updateRenderedItems(){const E=this.currentContext.cell.getCellStatusBarItems();E.sort((k,L)=>(L.priority??0)-(k.priority??0));const C=this.getMaxItemWidth(),I=E.filter(k=>k.alignment===1),_=E.filter(k=>k.alignment===2).reverse(),A=(k,L,R)=>{if(k.length>L.length){const M=k.splice(L.length,k.length-L.length);for(const N of M)R.removeChild(N.container),N.dispose()}L.forEach((M,N)=>{const P=k[N];if(P)P.updateItem(M,C);else{const x=this._instantiationService.createInstance(g,this.currentContext,this.hoverDelegate,M,C);k.push(x),R.appendChild(x.container)}})};A(this.leftItems,I,this.leftItemsContainer),A(this.rightItems,_,this.rightItemsContainer)}dispose(){super.dispose(),(0,v.dispose)(this.leftItems),(0,v.dispose)(this.rightItems)}};e.CellEditorStatusBar=n,e.CellEditorStatusBar=n=fe([O(4,h.IInstantiationService),O(5,p.IHoverService),O(6,c.IConfigurationService),O(7,i.IThemeService)],n);let g=class extends v.Disposable{set maxWidth(E){this.container.style.maxWidth=E+"px"}constructor(E,C,I,_,A,k,L,R){super(),this._context=E,this._hoverDelegate=C,this._telemetryService=A,this._commandService=k,this._notificationService=L,this._themeService=R,this.container=l(".cell-status-item"),this._itemDisposables=this._register(new v.DisposableStore),this.updateItem(I,_)}updateItem(E,C){this._itemDisposables.clear(),(!this._currentItem||this._currentItem.text!==E.text)&&(new b.SimpleIconLabel(this.container).text=E.text.replace(/\n/g," "));const I=k=>(0,m.isThemeColor)(k)?this._themeService.getColorTheme().getColor(k.id)?.toString()||"":k;this.container.style.color=E.color?I(E.color):"",this.container.style.backgroundColor=E.backgroundColor?I(E.backgroundColor):"",this.container.style.opacity=E.opacity?E.opacity:"",this.container.classList.toggle("cell-status-item-show-when-active",!!E.onlyShowWhenActive),typeof C=="number"&&(this.maxWidth=C);let _,A;if(E.accessibilityInformation?(_=E.accessibilityInformation.label,A=E.accessibilityInformation.role):_=E.text?(0,f.stripIcons)(E.text).trim():"",this.container.setAttribute("aria-label",_),this.container.setAttribute("role",A||""),E.tooltip){const k=typeof E.tooltip=="string"?E.tooltip:{markdown:E.tooltip};this._itemDisposables.add((0,d.setupCustomHover)(this._hoverDelegate,this.container,k))}this.container.classList.toggle("cell-status-item-has-command",!!E.command),E.command?(this.container.tabIndex=0,this._itemDisposables.add(t.addDisposableListener(this.container,t.EventType.CLICK,k=>{this.executeCommand()})),this._itemDisposables.add(t.addDisposableListener(this.container,t.EventType.KEY_DOWN,k=>{const L=new y.StandardKeyboardEvent(k);(L.equals(10)||L.equals(3))&&this.executeCommand()}))):this.container.removeAttribute("tabIndex"),this._currentItem=E}async executeCommand(){const E=this._currentItem.command;if(!E)return;const C=typeof E=="string"?E:E.id,I=typeof E=="string"?[]:E.arguments??[];(typeof E=="string"||!E.arguments||!Array.isArray(E.arguments)||E.arguments.length===0)&&I.unshift(this._context),this._telemetryService.publicLog2("workbenchActionExecuted",{id:C,from:"cell status bar"});try{await this._commandService.executeCommand(C,...I)}catch(_){this._notificationService.error((0,D.toErrorMessage)(_))}}};g=fe([O(4,r.ITelemetryService),O(5,S.ICommandService),O(6,a.INotificationService),O(7,i.IThemeService)],g)}),define(Q[629],Y([1,0,6,59,9,103,1377,71,75,189,79,730]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkupCellViewModel=void 0;let a=class extends T.BaseCellViewModel{get renderedHtml(){return this._renderedHtml}set renderedHtml(i){this._renderedHtml!==i&&(this._renderedHtml=i,this._onDidChangeState.fire({contentChanged:!0}))}get layoutInfo(){return this._layoutInfo}set renderedMarkdownHeight(i){this._previewHeight=i,this._updateTotalHeight(this._computeTotalHeight())}set editorHeight(i){this._editorHeight=i,this._statusBarHeight=this.viewContext.notebookOptions.computeStatusBarHeight(),this._updateTotalHeight(this._computeTotalHeight())}get editorHeight(){throw new Error("MarkdownCellViewModel.editorHeight is write only")}get foldingState(){return this.foldingDelegate.getFoldingState(this.foldingDelegate.getCellIndex(this))}get outputIsHovered(){return this._hoveringOutput}set outputIsHovered(i){this._hoveringOutput=i}get outputIsFocused(){return this._focusOnOutput}set outputIsFocused(i){this._focusOnOutput=i}get cellIsHovered(){return this._hoveringCell}set cellIsHovered(i){this._hoveringCell=i,this._onDidChangeState.fire({cellIsHoveredChanged:!0})}constructor(i,s,o,u,d,p,c,l,n){super(i,s,y.generateUuid(),d,p,c,l,n),this.foldingDelegate=u,this.viewContext=d,this.cellKind=f.CellKind.Markup,this._previewHeight=0,this._editorHeight=0,this._statusBarHeight=0,this._onDidChangeLayout=this._register(new t.Emitter),this.onDidChangeLayout=this._onDidChangeLayout.event,this._hoveringOutput=!1,this._focusOnOutput=!1,this._hoveringCell=!1,this.outputsViewModels=[],this._hasFindResult=this._register(new t.Emitter),this.hasFindResult=this._hasFindResult.event;const{bottomToolbarGap:g}=this.viewContext.notebookOptions.computeBottomToolbarDimensions(this.viewType);this._layoutInfo={editorHeight:0,previewHeight:0,fontInfo:o?.fontInfo||null,editorWidth:o?.width?this.viewContext.notebookOptions.computeMarkdownCellEditorWidth(o.width):0,bottomToolbarOffset:g,totalHeight:100,layoutState:D.CellLayoutState.Uninitialized,foldHintHeight:0,statusBarHeight:0},this._register(this.onDidChangeState(w=>{this.viewContext.eventDispatcher.emit([new h.NotebookCellStateChangedEvent(w,this.model)]),w.foldingStateChanged&&this._updateTotalHeight(this._computeTotalHeight(),D.CellLayoutContext.Fold)}))}_computeTotalHeight(){const i=this.viewContext.notebookOptions.getLayoutConfiguration(),{bottomToolbarGap:s}=this.viewContext.notebookOptions.computeBottomToolbarDimensions(this.viewType),o=this._computeFoldHintHeight();return this.getEditState()===D.CellEditState.Editing?this._editorHeight+i.markdownCellTopMargin+i.markdownCellBottomMargin+s+this._statusBarHeight:Math.max(1,this._previewHeight+s+o)}_computeFoldHintHeight(){return this.getEditState()===D.CellEditState.Editing||this.foldingState!==2?0:this.viewContext.notebookOptions.getLayoutConfiguration().markdownFoldHintHeight}updateOptions(i){(i.cellStatusBarVisibility||i.insertToolbarPosition||i.cellToolbarLocation)&&this._updateTotalHeight(this._computeTotalHeight())}getOutputOffset(i){return-1}updateOutputHeight(i,s){}triggerFoldingStateChange(){this._onDidChangeState.fire({foldingStateChanged:!0})}_updateTotalHeight(i,s){i!==this.layoutInfo.totalHeight&&this.layoutChange({totalHeight:i,context:s})}layoutChange(i){const s=this._computeFoldHintHeight();if(this.isInputCollapsed){const o=i.outerWidth!==void 0?this.viewContext.notebookOptions.computeMarkdownCellEditorWidth(i.outerWidth):this._layoutInfo.editorWidth,u=this.viewContext.notebookOptions.computeCollapsedMarkdownCellHeight(this.viewType);i.totalHeight=u,this._layoutInfo={fontInfo:i.font||this._layoutInfo.fontInfo,editorWidth:o,editorHeight:this._editorHeight,statusBarHeight:this._statusBarHeight,previewHeight:this._previewHeight,bottomToolbarOffset:this.viewContext.notebookOptions.computeBottomToolbarOffset(u,this.viewType),totalHeight:u,layoutState:D.CellLayoutState.Measured,foldHintHeight:0}}else{const o=i.outerWidth!==void 0?this.viewContext.notebookOptions.computeMarkdownCellEditorWidth(i.outerWidth):this._layoutInfo.editorWidth,u=i.totalHeight===void 0?this._layoutInfo.layoutState===D.CellLayoutState.Uninitialized?100:this._layoutInfo.totalHeight:i.totalHeight,d=this._previewHeight;this._layoutInfo={fontInfo:i.font||this._layoutInfo.fontInfo,editorWidth:o,previewHeight:d,editorHeight:this._editorHeight,statusBarHeight:this._statusBarHeight,bottomToolbarOffset:this.viewContext.notebookOptions.computeBottomToolbarOffset(u,this.viewType),totalHeight:u,layoutState:D.CellLayoutState.Measured,foldHintHeight:s}}this._onDidChangeLayout.fire(i)}restoreEditorViewState(i,s){super.restoreEditorViewState(i),s!==void 0&&this.layoutInfo.layoutState===D.CellLayoutState.Uninitialized&&(this._layoutInfo={fontInfo:this._layoutInfo.fontInfo,editorWidth:this._layoutInfo.editorWidth,previewHeight:this._layoutInfo.previewHeight,bottomToolbarOffset:this._layoutInfo.bottomToolbarOffset,totalHeight:s,editorHeight:this._editorHeight,statusBarHeight:this._statusBarHeight,layoutState:D.CellLayoutState.FromCache,foldHintHeight:this._layoutInfo.foldHintHeight},this.layoutChange({}))}getDynamicHeight(){return null}getHeight(i){return this._layoutInfo.layoutState===D.CellLayoutState.Uninitialized?100:this._layoutInfo.totalHeight}onDidChangeTextModelContent(){this._onDidChangeState.fire({contentChanged:!0})}onDeselect(){}startFind(i,s){const o=super.cellStartFind(i,s);return o===null?null:{cell:this,contentMatches:o}}dispose(){super.dispose(),this.foldingDelegate=null}};e.MarkupCellViewModel=a,e.MarkupCellViewModel=a=fe([O(5,b.IConfigurationService),O(6,v.ITextModelService),O(7,m.IUndoRedoService),O(8,S.ICodeEditorService)],a)}),define(Q[1378],Y([1,0,4,8,5,103,244,540,629,71,176,211]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellContextKeyManager=e.CellContextKeyPart=void 0;let a=class extends T.CellContentPart{constructor(s,o){super(),this.instantiationService=o,this.cellContextKeyManager=this._register(this.instantiationService.createInstance(r,s,void 0))}didRenderCell(s){this.cellContextKeyManager.updateForElement(s)}};e.CellContextKeyPart=a,e.CellContextKeyPart=a=fe([O(1,b.IInstantiationService)],a);let r=class extends t.Disposable{constructor(s,o,u,d){super(),this.notebookEditor=s,this.element=o,this._contextKeyService=u,this._notebookExecutionStateService=d,this.elementDisposables=this._register(new t.DisposableStore),this._contextKeyService.bufferChangeEvents(()=>{this.cellType=S.NOTEBOOK_CELL_TYPE.bindTo(this._contextKeyService),this.cellEditable=S.NOTEBOOK_CELL_EDITABLE.bindTo(this._contextKeyService),this.cellFocused=S.NOTEBOOK_CELL_FOCUSED.bindTo(this._contextKeyService),this.cellEditorFocused=S.NOTEBOOK_CELL_EDITOR_FOCUSED.bindTo(this._contextKeyService),this.markdownEditMode=S.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.bindTo(this._contextKeyService),this.cellRunState=S.NOTEBOOK_CELL_EXECUTION_STATE.bindTo(this._contextKeyService),this.cellExecuting=S.NOTEBOOK_CELL_EXECUTING.bindTo(this._contextKeyService),this.cellHasOutputs=S.NOTEBOOK_CELL_HAS_OUTPUTS.bindTo(this._contextKeyService),this.cellContentCollapsed=S.NOTEBOOK_CELL_INPUT_COLLAPSED.bindTo(this._contextKeyService),this.cellOutputCollapsed=S.NOTEBOOK_CELL_OUTPUT_COLLAPSED.bindTo(this._contextKeyService),this.cellLineNumbers=S.NOTEBOOK_CELL_LINE_NUMBERS.bindTo(this._contextKeyService),this.cellResource=S.NOTEBOOK_CELL_RESOURCE.bindTo(this._contextKeyService),o&&this.updateForElement(o)}),this._register(this._notebookExecutionStateService.onDidChangeExecution(p=>{p.type===h.NotebookExecutionType.cell&&this.element&&p.affectsCell(this.element.uri)&&this.updateForExecutionState()}))}updateForElement(s){this.elementDisposables.clear(),this.element=s,s&&(this.elementDisposables.add(s.onDidChangeState(o=>this.onDidChangeState(o))),s instanceof f.CodeCellViewModel&&this.elementDisposables.add(s.onDidChangeOutputs(()=>this.updateForOutputs())),this.elementDisposables.add(this.notebookEditor.onDidChangeActiveCell(()=>this.updateForFocusState())),this.element instanceof v.MarkupCellViewModel?this.cellType.set("markup"):this.element instanceof f.CodeCellViewModel&&this.cellType.set("code"),this._contextKeyService.bufferChangeEvents(()=>{this.updateForFocusState(),this.updateForExecutionState(),this.updateForEditState(),this.updateForCollapseState(),this.updateForOutputs(),this.cellLineNumbers.set(this.element.lineNumbers),this.cellResource.set(this.element.uri.toString())}))}onDidChangeState(s){this._contextKeyService.bufferChangeEvents(()=>{s.internalMetadataChanged&&this.updateForExecutionState(),s.editStateChanged&&this.updateForEditState(),s.focusModeChanged&&this.updateForFocusState(),s.cellLineNumberChanged&&this.cellLineNumbers.set(this.element.lineNumbers),(s.inputCollapsedChanged||s.outputCollapsedChanged)&&this.updateForCollapseState()})}updateForFocusState(){if(!this.element)return;const s=this.notebookEditor.getActiveCell();this.cellFocused.set(this.notebookEditor.getActiveCell()===this.element),s===this.element?this.cellEditorFocused.set(this.element.focusMode===D.CellFocusMode.Editor):this.cellEditorFocused.set(!1)}updateForExecutionState(){if(!this.element)return;const s=this.element.internalMetadata;this.cellEditable.set(!this.notebookEditor.isReadOnly);const o=this._notebookExecutionStateService.getCellExecution(this.element.uri);this.element instanceof v.MarkupCellViewModel?(this.cellRunState.reset(),this.cellExecuting.reset()):o?.state===m.NotebookCellExecutionState.Executing?(this.cellRunState.set("executing"),this.cellExecuting.set(!0)):o?.state===m.NotebookCellExecutionState.Pending||o?.state===m.NotebookCellExecutionState.Unconfirmed?(this.cellRunState.set("pending"),this.cellExecuting.set(!0)):s.lastRunSuccess===!0?(this.cellRunState.set("succeeded"),this.cellExecuting.set(!1)):s.lastRunSuccess===!1?(this.cellRunState.set("failed"),this.cellExecuting.set(!1)):(this.cellRunState.set("idle"),this.cellExecuting.set(!1))}updateForEditState(){this.element&&(this.element instanceof v.MarkupCellViewModel?this.markdownEditMode.set(this.element.getEditState()===D.CellEditState.Editing):this.markdownEditMode.set(!1))}updateForCollapseState(){this.element&&(this.cellContentCollapsed.set(!!this.element.isInputCollapsed),this.cellOutputCollapsed.set(!!this.element.isOutputCollapsed))}updateForOutputs(){this.element instanceof f.CodeCellViewModel?this.cellHasOutputs.set(this.element.outputsViewModels.length>0):this.cellHasOutputs.set(!1)}};e.CellContextKeyManager=r,e.CellContextKeyManager=r=fe([O(2,y.IContextKeyService),O(3,h.INotebookExecutionStateService)],r)}),define(Q[1379],Y([1,0,7,648,6,4,18,490,9,90,103,71,356,176,226,140,629,5,3558]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListViewInfoAccessor=e.NotebookCellList=e.NOTEBOOK_WEBVIEW_BOUNDARY=void 0;var p;(function(I){I[I.Line=0]="Line",I[I.Range=1]="Range"})(p||(p={}));var c;(function(I){I[I.Top=0]="Top",I[I.Center=1]="Center",I[I.Bottom=2]="Bottom",I[I.NearTop=3]="NearTop"})(c||(c={}));function l(I,_){if(!_.length)return I;let A=0,k=0;const L=[];for(;A<I.length&&k<_.length;)A<_[k].start&&L.push(...I.slice(A,_[k].start)),A=_[k].end+1,k++;return A<I.length&&L.push(...I.slice(A)),L}e.NOTEBOOK_WEBVIEW_BOUNDARY=5e3;function n(I){const _=0-(parseInt(I.style.top,10)||0);return _>=0&&_<=e.NOTEBOOK_WEBVIEW_BOUNDARY*2}let g=class extends m.WorkbenchList{get onWillScroll(){return this.view.onWillScroll}get rowsContainer(){return this.view.containerDomNode}get scrollableElement(){return this.view.scrollableElementDomNode}get viewModel(){return this._viewModel}get visibleRanges(){return this._visibleRanges}set visibleRanges(_){(0,a.cellRangesEqual)(this._visibleRanges,_)||(this._visibleRanges=_,this._onDidChangeVisibleRanges.fire())}get isDisposed(){return this._isDisposed}get webviewElement(){return this._webviewElement}get inRenderingTransaction(){return this.view.inRenderingTransaction}constructor(_,A,k,L,R,M,N,P,x,F){super(_,A,L,R,N,M,P,x,F),this.listUser=_,this._previousFocusedElements=[],this._localDisposableStore=new D.DisposableStore,this._viewModelStore=new D.DisposableStore,this._onDidRemoveOutputs=this._localDisposableStore.add(new b.Emitter),this.onDidRemoveOutputs=this._onDidRemoveOutputs.event,this._onDidHideOutputs=this._localDisposableStore.add(new b.Emitter),this.onDidHideOutputs=this._onDidHideOutputs.event,this._onDidRemoveCellsFromView=this._localDisposableStore.add(new b.Emitter),this.onDidRemoveCellsFromView=this._onDidRemoveCellsFromView.event,this._viewModel=null,this._hiddenRangeIds=[],this.hiddenRangesPrefixSum=null,this._onDidChangeVisibleRanges=this._localDisposableStore.add(new b.Emitter),this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._visibleRanges=[],this._isDisposed=!1,this._isInLayout=!1,this._webviewElement=null,r.NOTEBOOK_CELL_LIST_FOCUSED.bindTo(this.contextKeyService).set(!0),this._previousFocusedElements=this.getFocusedElements(),this._localDisposableStore.add(this.onDidChangeFocus(U=>{this._previousFocusedElements.forEach(G=>{U.elements.indexOf(G)<0&&G.onDeselect()}),this._previousFocusedElements=U.elements}));const V=h.NOTEBOOK_EDITOR_CURSOR_BOUNDARY.bindTo(M);V.set("none");const W=h.NOTEBOOK_EDITOR_CURSOR_LINE_BOUNDARY.bindTo(M);W.set("none");const z=this._localDisposableStore.add(new D.MutableDisposable),B=this._localDisposableStore.add(new D.MutableDisposable),K=U=>{switch(U.cursorAtBoundary()){case S.CursorAtBoundary.Both:V.set("both");break;case S.CursorAtBoundary.Top:V.set("top");break;case S.CursorAtBoundary.Bottom:V.set("bottom");break;default:V.set("none");break}switch(U.cursorAtLineBoundary()){case S.CursorAtLineBoundary.Both:W.set("both");break;case S.CursorAtLineBoundary.Start:W.set("start");break;case S.CursorAtLineBoundary.End:W.set("end");break;default:W.set("none");break}};this._localDisposableStore.add(this.onDidChangeFocus(U=>{if(U.elements.length){const G=U.elements[0];z.value=G.onDidChangeState($=>{$.selectionChanged&&K(G)}),B.value=G.onDidChangeEditorAttachState(()=>{G.editorAttached&&K(G)}),K(G);return}V.set("none")})),this._localDisposableStore.add(this.view.onMouseDblClick(()=>{const U=this.getFocusedElements()[0];if(U&&U.cellKind===h.CellKind.Markup&&!U.isInputCollapsed&&!this._viewModel?.options.isReadOnly){const G=this._getViewIndexUpperBound(U);G>=0&&this._revealInViewWithMinimalScrolling(G),U.updateEditState(S.CellEditState.Editing,"dbclick"),U.focusMode=S.CellFocusMode.Editor}}));const H=()=>{if(!this.view.length)return;const U=this.getViewScrollTop(),G=this.getViewScrollBottom();if(U>=G)return;const $=(0,i.clamp)(this.view.indexAt(U),0,this.view.length-1),ie=this.view.element($),J=this._viewModel.getCellIndex(ie),j=(0,i.clamp)(this.view.indexAt(G),0,this.view.length-1),ee=this.view.element(j),X=this._viewModel.getCellIndex(ee);X-J===j-$?this.visibleRanges=[{start:J,end:X+1}]:this.visibleRanges=this._getVisibleRangesFromIndex($,J,j,X)};this._localDisposableStore.add(this.view.onDidChangeContentHeight(()=>{this._isInLayout&&t.scheduleAtNextAnimationFrame(()=>{H()}),H()})),this._localDisposableStore.add(this.view.onDidScroll(()=>{this._isInLayout&&t.scheduleAtNextAnimationFrame(()=>{H()}),H()}))}createListView(_,A,k,L){return new d.NotebookCellListView(_,A,k,L)}attachWebview(_){_.style.top=`-${e.NOTEBOOK_WEBVIEW_BOUNDARY}px`,this.rowsContainer.insertAdjacentElement("afterbegin",_),this._webviewElement=new s.FastDomNode(_)}elementAt(_){if(!this.view.length)return;const A=this.view.indexAt(_),k=(0,i.clamp)(A,0,this.view.length-1);return this.element(k)}elementHeight(_){const A=this._getViewIndexUpperBound(_);if(A===void 0||A<0||A>=this.length)throw this._getViewIndexUpperBound(_),new y.ListError(this.listUser,`Invalid index ${A}`);return this.view.elementHeight(A)}detachViewModel(){this._viewModelStore.clear(),this._viewModel=null,this.hiddenRangesPrefixSum=null}attachViewModel(_){this._viewModel=_,this._viewModelStore.add(_.onDidChangeViewCells(R=>{if(this._isDisposed)return;const M=this._hiddenRangeIds.map(V=>this._viewModel.getTrackedRange(V)).filter(V=>V!==null),N=l(this._viewModel.viewCells,M),P=[],x=new Set;for(let V=0;V<this.length;V++)P.push(this.element(V)),x.add(this.element(V).uri.toString());const F=(0,h.diff)(P,N,V=>x.has(V.uri.toString()));R.synchronous?this._updateElementsInWebview(F):this._viewModelStore.add(t.scheduleAtNextAnimationFrame(()=>{this._isDisposed||this._updateElementsInWebview(F)}))})),this._viewModelStore.add(_.onDidChangeSelection(R=>{if(R==="view")return;const M=(0,a.cellRangesToIndexes)(_.getSelections()).map(P=>_.cellAt(P)).filter(P=>!!P).map(P=>this._getViewIndexUpperBound(P));this.setSelection(M,void 0,!0);const N=(0,a.cellRangesToIndexes)([_.getFocus()]).map(P=>_.cellAt(P)).filter(P=>!!P).map(P=>this._getViewIndexUpperBound(P));N.length&&this.setFocus(N,void 0,!0)}));const A=_.getHiddenRanges();this.setHiddenAreas(A,!1);const k=(0,a.reduceCellRanges)(A),L=_.viewCells.slice(0);k.reverse().forEach(R=>{const M=L.splice(R.start,R.end-R.start+1);this._onDidRemoveCellsFromView.fire(M)}),this.splice2(0,0,L)}_updateElementsInWebview(_){_.reverse().forEach(A=>{const k=[],L=[],R=[];for(let M=A.start;M<A.start+A.deleteCount;M++){const N=this.element(M);N.cellKind===h.CellKind.Code?this._viewModel.hasCell(N)?k.push(...N?.outputsViewModels):L.push(...N?.outputsViewModels):R.push(N)}this.splice2(A.start,A.deleteCount,A.toInsert),this._onDidHideOutputs.fire(k),this._onDidRemoveOutputs.fire(L),this._onDidRemoveCellsFromView.fire(R)})}clear(){super.splice(0,this.length)}setHiddenAreas(_,A){if(!this._viewModel)return!1;const k=(0,a.reduceCellRanges)(_),L=this._hiddenRangeIds.map(M=>this._viewModel.getTrackedRange(M)).filter(M=>M!==null);if(k.length===L.length){let M=!1;for(let N=0;N<k.length;N++)if(!(k[N].start===L[N].start&&k[N].end===L[N].end)){M=!0;break}if(!M)return this._updateHiddenRangePrefixSum(k),!1}this._hiddenRangeIds.forEach(M=>this._viewModel.setTrackedRange(M,null,3));const R=k.map(M=>this._viewModel.setTrackedRange(null,M,3)).filter(M=>M!==null);return this._hiddenRangeIds=R,this._updateHiddenRangePrefixSum(k),A&&this.updateHiddenAreasInView(L,k),!0}_updateHiddenRangePrefixSum(_){let A=0,k=0;const L=[];for(;k<_.length;){for(let M=A;M<_[k].start-1;M++)L.push(1);L.push(_[k].end-_[k].start+1+1),A=_[k].end+1,k++}for(let M=A;M<this._viewModel.length;M++)L.push(1);const R=new Uint32Array(L.length);for(let M=0;M<L.length;M++)R[M]=L[M];this.hiddenRangesPrefixSum=new f.PrefixSumComputer(R)}updateHiddenAreasInView(_,A){const k=l(this._viewModel.viewCells,_),L=new Set;k.forEach(N=>{L.add(N.uri.toString())});const R=l(this._viewModel.viewCells,A),M=(0,h.diff)(k,R,N=>L.has(N.uri.toString()));this._updateElementsInWebview(M)}splice2(_,A,k=[]){if(_<0||_>this.view.length)return;const L=t.isAncestor(document.activeElement,this.rowsContainer);super.splice(_,A,k),L&&this.domFocus();const R=[];this.getSelectedElements().forEach(M=>{this._viewModel.hasCell(M)&&R.push(M.handle)}),!R.length&&this._viewModel.viewCells.length&&this._viewModel.updateSelectionsState({kind:h.SelectionStateType.Index,focus:{start:0,end:1},selections:[{start:0,end:1}]})}getModelIndex(_){const A=this.indexOf(_);return this.getModelIndex2(A)}getModelIndex2(_){return this.hiddenRangesPrefixSum?this.hiddenRangesPrefixSum.getPrefixSum(_-1):_}getViewIndex(_){const A=this._viewModel.getCellIndex(_);return this.getViewIndex2(A)}getViewIndex2(_){if(!this.hiddenRangesPrefixSum)return _;const A=this.hiddenRangesPrefixSum.getIndexOf(_);return A.remainder!==0?_>=this.hiddenRangesPrefixSum.getTotalSum()?_-(this.hiddenRangesPrefixSum.getTotalSum()-this.hiddenRangesPrefixSum.getCount()):void 0:A.index}_getVisibleRangesFromIndex(_,A,k,L){const R=[],M=[];let N=_,P=A;for(;N<=k;){const x=this.hiddenRangesPrefixSum.getPrefixSum(N);x===P+1?(R.length&&(R[R.length-1]===P-1?M.push({start:R[R.length-1],end:P+1}):M.push({start:R[R.length-1],end:R[R.length-1]+1})),R.push(P),N++,P++):(R.length&&(R[R.length-1]===P-1?M.push({start:R[R.length-1],end:P+1}):M.push({start:R[R.length-1],end:R[R.length-1]+1})),R.push(P),N++,P=x)}return R.length&&M.push({start:R[R.length-1],end:R[R.length-1]+1}),(0,a.reduceCellRanges)(M)}getVisibleRangesPlusViewportAboveAndBelow(){if(this.view.length<=0)return[];const _=Math.max(this.getViewScrollTop()-this.renderHeight,0),A=this.view.indexAt(_),k=this.view.element(A),L=this._viewModel.getCellIndex(k),R=(0,i.clamp)(this.getViewScrollBottom()+this.renderHeight,0,this.scrollHeight),M=(0,i.clamp)(this.view.indexAt(R),0,this.view.length-1),N=this.view.element(M),P=this._viewModel.getCellIndex(N);return P-L===M-A?[{start:L,end:P}]:this._getVisibleRangesFromIndex(A,L,M,P)}_getViewIndexUpperBound(_){if(!this._viewModel)return-1;const A=this._viewModel.getCellIndex(_);if(A===-1)return-1;if(!this.hiddenRangesPrefixSum)return A;const k=this.hiddenRangesPrefixSum.getIndexOf(A);return k.remainder!==0&&A>=this.hiddenRangesPrefixSum.getTotalSum()?A-(this.hiddenRangesPrefixSum.getTotalSum()-this.hiddenRangesPrefixSum.getCount()):k.index}_getViewIndexUpperBound2(_){if(!this.hiddenRangesPrefixSum)return _;const A=this.hiddenRangesPrefixSum.getIndexOf(_);return A.remainder!==0&&_>=this.hiddenRangesPrefixSum.getTotalSum()?_-(this.hiddenRangesPrefixSum.getTotalSum()-this.hiddenRangesPrefixSum.getCount()):A.index}focusElement(_){const A=this._getViewIndexUpperBound(_);if(A>=0&&this._viewModel){const k=this.element(A).handle;this._viewModel.updateSelectionsState({kind:h.SelectionStateType.Handle,primary:k,selections:[k]},"view"),this.setFocus([A],void 0,!1)}}selectElements(_){const A=_.map(k=>this._getViewIndexUpperBound(k)).filter(k=>k>=0);this.setSelection(A)}getCellViewScrollTop(_){const A=this._getViewIndexUpperBound(_);if(A===void 0||A<0||A>=this.length)throw new y.ListError(this.listUser,`Invalid index ${A}`);return this.view.elementTop(A)}getCellViewScrollBottom(_){const A=this._getViewIndexUpperBound(_);if(A===void 0||A<0||A>=this.length)throw new y.ListError(this.listUser,`Invalid index ${A}`);const k=this.view.elementTop(A),L=this.view.elementHeight(A);return k+L}setFocus(_,A,k){if(k){super.setFocus(_,A);return}if(_.length){if(this._viewModel){const L=this.element(_[0]).handle;this._viewModel.updateSelectionsState({kind:h.SelectionStateType.Handle,primary:L,selections:this.getSelection().map(R=>this.element(R).handle)},"view")}}else if(this._viewModel){if(this.length)return;this._viewModel.updateSelectionsState({kind:h.SelectionStateType.Handle,primary:null,selections:[]},"view")}super.setFocus(_,A)}setSelection(_,A,k){if(k){super.setSelection(_,A);return}_.length?this._viewModel&&this._viewModel.updateSelectionsState({kind:h.SelectionStateType.Handle,primary:this.getFocusedElements()[0]?.handle??null,selections:_.map(L=>this.element(L)).map(L=>L.handle)},"view"):this._viewModel&&this._viewModel.updateSelectionsState({kind:h.SelectionStateType.Handle,primary:this.getFocusedElements()[0]?.handle??null,selections:[]},"view"),super.setSelection(_,A)}revealCellsInView(_){const A=this._getViewIndexUpperBound2(_.start);if(A<0)return;const k=this._getViewIndexUpperBound2(_.end-1),L=this.getViewScrollTop(),R=this.getViewScrollBottom(),M=this.view.elementTop(A);if(M>=L&&M<R){const N=this.view.elementTop(k),P=this.view.elementHeight(k);if(N+P<=R)return;if(N>=R)return this._revealInternal(k,!1,2);if(N<R)return N+P-R<M-L?this.view.setScrollTop(L+N+P-R):this._revealInternal(A,!1,0)}this._revealInViewWithMinimalScrolling(A)}_revealInViewWithMinimalScrolling(_){const A=this.view.firstVisibleIndex;_<=A?this._revealInternal(_,!0,0):this._revealInternal(_,!0,2)}scrollToBottom(){const _=this.view.scrollHeight,A=this.getViewScrollTop(),k=this.getViewScrollBottom();this.view.setScrollTop(_-(k-A))}revealCell(_,A){const k=this._getViewIndexUpperBound(_);if(!(k<0))switch(A){case 2:this._revealInternal(k,!1,0);break;case 3:this._revealInternal(k,!1,1);break;case 4:this._revealInternal(k,!0,1);break;case 1:this._revealInViewWithMinimalScrolling(k);break}}_revealInternal(_,A,k){if(_>=this.view.length)return;const L=this.getViewScrollTop(),R=this.getViewScrollBottom(),M=this.view.elementTop(_),N=this.view.elementHeight(_)+M;if(!(A&&M>=L&&N<R&&!(k===1&&N>R&&M>(L+R)/2)))switch(k){case 0:this.view.setScrollTop(M),this.view.setScrollTop(this.view.elementTop(_));break;case 1:case 3:{this.view.setScrollTop(M-this.view.renderHeight/2);const P=this.view.elementTop(_),x=this.view.elementHeight(_),F=this.getViewScrollBottom()-this.getViewScrollTop();x>=F?this.view.setScrollTop(P):k===1?this.view.setScrollTop(P+x/2-F/2):k===3&&this.view.setScrollTop(P-F/5)}break;case 2:this.view.setScrollTop(this.scrollTop+(N-R)),this.view.setScrollTop(this.scrollTop+(this.view.elementTop(_)+this.view.elementHeight(_)-this.getViewScrollBottom()));break;default:break}}async revealCellAsync(_,A){const k=this._getViewIndexUpperBound(_);if(k<0)return;const L=A===S.CellRevealType.NearTopIfOutsideViewport?3:1;if(this._revealInternal(k,!0,L),_.getEditState()===S.CellEditState.Editing&&!_.editorAttached)return E(_)}async revealCellRangeAsync(_,A,k){const L=this._getViewIndexUpperBound(_);if(!(L<0))switch(k){case S.CellRevealRangeType.Default:return this._revealRangeInternalAsync(L,A,1);case S.CellRevealRangeType.Center:return this._revealRangeInCenterInternalAsync(L,A,1);case S.CellRevealRangeType.CenterIfOutsideViewport:return this._revealRangeInCenterIfOutsideViewportInternalAsync(L,A,1)}}async _revealRangeInternalAsync(_,A,k){const L=this.getViewScrollTop(),R=this.getViewScrollBottom(),M=this.view.elementTop(_),N=this.view.element(_);if(N.editorAttached)this._revealRangeCommon(_,A,k,!1,!1);else{const P=this.view.elementHeight(_);let x=!1;return M+P<L?(this.view.setScrollTop(M),x=!1):M>R&&(this.view.setScrollTop(M-this.view.renderHeight/2),x=!0),new Promise((V,W)=>{N.onDidChangeEditorAttachState(()=>{N.editorAttached?V():W()})}).then(()=>{this._revealRangeCommon(_,A,k,!0,x)})}}async _revealRangeInCenterInternalAsync(_,A,k){const L=(P,x,F)=>{const V=this.view.element(P),W=V.getPositionScrollTopOffset(x),z=this.view.elementTop(P)+W;this.view.setScrollTop(z-this.view.renderHeight/2),F===1&&V.revealRangeInCenter(x)},M=this.view.elementTop(_);this.view.setScrollTop(M-this.view.renderHeight/2);const N=this.view.element(_);if(N.editorAttached)L(_,A,k);else return E(N).then(()=>L(_,A,k))}async _revealRangeInCenterIfOutsideViewportInternalAsync(_,A,k){const L=(V,W,z)=>{const B=this.view.element(V),K=B.getPositionScrollTopOffset(W),H=this.view.elementTop(V)+K;this.view.setScrollTop(H-this.view.renderHeight/2),z===1&&B.revealRangeInCenter(W)},R=this.getViewScrollTop(),M=this.getViewScrollBottom(),P=this.view.elementTop(_),x=this.view.element(_),F=P+x.getPositionScrollTopOffset(A);if(F<R||F>M){this.view.setScrollTop(F-this.view.renderHeight/2);const V=this.view.elementTop(_)+x.getPositionScrollTopOffset(A);if(this.view.setScrollTop(V-this.view.renderHeight/2),!x.editorAttached)return E(x).then(()=>L(_,A,k))}else if(x.editorAttached)x.revealRangeInCenter(A);else return E(x).then(()=>L(_,A,k))}_revealRangeCommon(_,A,k,L,R){const M=this.view.element(_),N=this.getViewScrollTop(),P=this.getViewScrollBottom(),x=M.getPositionScrollTopOffset(A),F=this.view.elementHeight(_);if(x>=F){const z=M.layoutInfo.totalHeight;this.updateElementHeight(_,z)}const W=this.view.elementTop(_)+x;W<N?this.view.setScrollTop(W-30):W>P?this.view.setScrollTop(N+W-P+30):L&&(R?this.view.setScrollTop(N+W-P+30):this.view.setScrollTop(W-30)),k===1&&M.revealRangeInCenter(A)}async revealCellOffsetInCenterAsync(_,A){const k=this._getViewIndexUpperBound(_);if(k>=0){const L=this.view.element(k),R=this.view.elementTop(k);if(L instanceof o.MarkupCellViewModel)return this._revealInCenterIfOutsideViewport(k);{const M=L.layoutInfo.outputContainerOffset+Math.min(A,L.layoutInfo.outputTotalHeight);this.view.setScrollTop(R-this.view.renderHeight/2),this.view.setScrollTop(R+M-this.view.renderHeight/2)}}}_revealInCenterIfOutsideViewport(_){this._revealInternal(_,!0,1)}domElementOfElement(_){const A=this._getViewIndexUpperBound(_);return A>=0?this.view.domElement(A):null}focusView(){this.view.domNode.focus()}triggerScrollFromMouseWheelEvent(_){this.view.delegateScrollFromMouseWheelEvent(_)}delegateVerticalScrollbarPointerDown(_){this.view.delegateVerticalScrollbarPointerDown(_)}isElementAboveViewport(_){return this.view.elementTop(_)+this.view.elementHeight(_)<this.scrollTop}updateElementHeight2(_,A,k=null){const L=this._getViewIndexUpperBound(_);if(L===void 0||L<0||L>=this.length)return;if(this.isElementAboveViewport(L)){const P=this.elementHeight(_)-A;this._webviewElement&&b.Event.once(this.view.onWillScroll)(()=>{const x=parseInt(this._webviewElement.domNode.style.top,10);n(this._webviewElement.domNode)?this._webviewElement.setTop(x-P):this._webviewElement.setTop(-e.NOTEBOOK_WEBVIEW_BOUNDARY)}),this.view.updateElementHeight(L,A,k);return}if(k!==null)return this.view.updateElementHeight(L,A,k);const R=this.getFocus();if(!R.length)return this.view.updateElementHeight(L,A,null);const M=R[0];if(M<=L)return this.view.updateElementHeight(L,A,M);if(this.view.elementTop(L)>=this.view.getScrollTop())return this.view.updateElementHeight(L,A,L);this.view.updateElementHeight(L,A,M)}domFocus(){const _=this.getFocusedElements()[0],A=_&&this.domElementOfElement(_);document.activeElement&&A&&A.contains(document.activeElement)||!T.isMacintosh&&document.activeElement&&C()||super.domFocus()}focusContainer(){super.domFocus()}getViewScrollTop(){return this.view.getScrollTop()}getViewScrollBottom(){return this.getViewScrollTop()+this.view.renderHeight}setCellEditorSelection(_,A){const k=_;k.editorAttached?k.setSelection(A):E(k).then(()=>{k.setSelection(A)})}style(_){const A=this.view.domId;this.styleElement||(this.styleElement=t.createStyleSheet(this.view.domNode));const k=A&&`.${A}`,L=[];_.listBackground&&L.push(`.monaco-list${k} > div.monaco-scrollable-element > .monaco-list-rows { background: ${_.listBackground}; }`),_.listFocusBackground&&(L.push(`.monaco-list${k}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${_.listFocusBackground}; }`),L.push(`.monaco-list${k}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${_.listFocusBackground}; }`)),_.listFocusForeground&&L.push(`.monaco-list${k}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { color: ${_.listFocusForeground}; }`),_.listActiveSelectionBackground&&(L.push(`.monaco-list${k}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${_.listActiveSelectionBackground}; }`),L.push(`.monaco-list${k}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${_.listActiveSelectionBackground}; }`)),_.listActiveSelectionForeground&&L.push(`.monaco-list${k}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${_.listActiveSelectionForeground}; }`),_.listFocusAndSelectionBackground&&L.push(` .monaco-drag-image, .monaco-list${k}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { background-color: ${_.listFocusAndSelectionBackground}; } `),_.listFocusAndSelectionForeground&&L.push(` .monaco-drag-image, .monaco-list${k}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { color: ${_.listFocusAndSelectionForeground}; } `),_.listInactiveFocusBackground&&(L.push(`.monaco-list${k} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${_.listInactiveFocusBackground}; }`),L.push(`.monaco-list${k} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${_.listInactiveFocusBackground}; }`)),_.listInactiveSelectionBackground&&(L.push(`.monaco-list${k} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${_.listInactiveSelectionBackground}; }`),L.push(`.monaco-list${k} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${_.listInactiveSelectionBackground}; }`)),_.listInactiveSelectionForeground&&L.push(`.monaco-list${k} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${_.listInactiveSelectionForeground}; }`),_.listHoverBackground&&L.push(`.monaco-list${k}:not(.drop-target) > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${_.listHoverBackground}; }`),_.listHoverForeground&&L.push(`.monaco-list${k} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { color: ${_.listHoverForeground}; }`),_.listSelectionOutline&&L.push(`.monaco-list${k} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { outline: 1px dotted ${_.listSelectionOutline}; outline-offset: -1px; }`),_.listFocusOutline&&L.push(` .monaco-drag-image, .monaco-list${k}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px solid ${_.listFocusOutline}; outline-offset: -1px; } `),_.listInactiveFocusOutline&&L.push(`.monaco-list${k} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px dotted ${_.listInactiveFocusOutline}; outline-offset: -1px; }`),_.listHoverOutline&&L.push(`.monaco-list${k} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover { outline: 1px dashed ${_.listHoverOutline}; outline-offset: -1px; }`),_.listDropBackground&&L.push(` .monaco-list${k}.drop-target, .monaco-list${k} > div.monaco-scrollable-element > .monaco-list-rows.drop-target, .monaco-list${k} > div.monaco-scrollable-element > .monaco-list-row.drop-target { background-color: ${_.listDropBackground} !important; color: inherit !important; } `);const R=L.join(` `);R!==this.styleElement.textContent&&(this.styleElement.textContent=R)}getRenderHeight(){return this.view.renderHeight}getScrollHeight(){return this.view.scrollHeight}layout(_,A){this._isInLayout=!0,super.layout(_,A),this.renderHeight===0?this.view.domNode.style.visibility="hidden":this.view.domNode.style.visibility="initial",this._isInLayout=!1}dispose(){this._isDisposed=!0,this._viewModelStore.dispose(),this._localDisposableStore.dispose(),super.dispose(),this._previousFocusedElements=[],this._viewModel=null,this._hiddenRangeIds=[],this.hiddenRangesPrefixSum=null,this._visibleRanges=[]}};e.NotebookCellList=g,e.NotebookCellList=g=fe([O(7,m.IListService),O(8,v.IConfigurationService),O(9,u.IInstantiationService)],g);class w extends D.Disposable{constructor(_){super(),this.list=_}getViewIndex(_){return this.list.getViewIndex(_)??-1}getViewHeight(_){return this.list.viewModel?this.list.elementHeight(_):-1}getCellRangeFromViewRange(_,A){if(!this.list.viewModel)return;const k=this.list.getModelIndex2(_);if(k===void 0)throw new Error(`startIndex ${_} out of boundary`);if(A>=this.list.length){const L=this.list.viewModel.length;return{start:k,end:L}}else{const L=this.list.getModelIndex2(A);if(L===void 0)throw new Error(`endIndex ${A} out of boundary`);return{start:k,end:L}}}getCellsFromViewRange(_,A){if(!this.list.viewModel)return[];const k=this.getCellRangeFromViewRange(_,A);return k?this.list.viewModel.getCellsInRange(k):[]}getCellsInRange(_){return this.list.viewModel?.getCellsInRange(_)??[]}getVisibleRangesPlusViewportAboveAndBelow(){return this.list?.getVisibleRangesPlusViewportAboveAndBelow()??[]}}e.ListViewInfoAccessor=w;function E(I){return new Promise((_,A)=>{b.Event.once(I.onDidChangeEditorAttachState)(()=>I.editorAttached?_():A())})}function C(){return!!t.findParentWithClass(document.activeElement,"context-view")}}),define(Q[3949],Y([1,0,141,15,6,4,226,33,152,27,578,800,98,75,5,189,103,3562,540,629,71,356,730,962,211]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCellViewModel=e.NotebookViewModel=void 0;const E=()=>{throw new Error("Invalid change accessor")};class C{constructor(){this._decorationsTree=new h.IntervalTree}intervalSearch(M,N,P,x,F,V=!1){return this._decorationsTree.intervalSearch(M,N,P,x,F,V)}search(M,N,P,x,F){return this._decorationsTree.search(M,N,x,F)}collectNodesFromOwner(M){return this._decorationsTree.collectNodesFromOwner(M)}collectNodesPostOrder(){return this._decorationsTree.collectNodesPostOrder()}insert(M){this._decorationsTree.insert(M)}delete(M){this._decorationsTree.delete(M)}resolveNode(M,N){this._decorationsTree.resolveNode(M,N)}acceptReplace(M,N,P,x){this._decorationsTree.acceptReplace(M,N,P,x)}}const I=[a.ModelDecorationOptions.register({description:"notebook-view-model-tracked-range-always-grows-when-typing-at-edges",stickiness:0}),a.ModelDecorationOptions.register({description:"notebook-view-model-tracked-range-never-grows-when-typing-at-edges",stickiness:1}),a.ModelDecorationOptions.register({description:"notebook-view-model-tracked-range-grows-only-when-typing-before",stickiness:2}),a.ModelDecorationOptions.register({description:"notebook-view-model-tracked-range-grows-only-when-typing-after",stickiness:3})];function _(R){return R instanceof a.ModelDecorationOptions?R:a.ModelDecorationOptions.createDynamic(R)}let A=0,k=class extends D.Disposable{get options(){return this._options}get onDidChangeOptions(){return this._onDidChangeOptions.event}get viewCells(){return this._viewCells}set viewCells(M){throw new Error("NotebookViewModel.viewCells is readonly")}get length(){return this._viewCells.length}get notebookDocument(){return this._notebook}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(){const M=new Set,N=[];return(0,l.cellRangesToIndexes)(this._selectionCollection.selections).map(P=>P<this.length?this.cellAt(P):void 0).forEach(P=>{P&&!M.has(P.handle)&&N.push(P.handle)}),N}set selectionHandles(M){const N=M.map(P=>this._viewCells.findIndex(x=>x.handle===P));this._selectionCollection.setSelections((0,l.cellIndexesToRanges)(N),!0,"model")}get focused(){return this._focused}constructor(M,N,P,x,F,V,W,z,B,K){super(),this.viewType=M,this._notebook=N,this._viewContext=P,this._layoutInfo=x,this._options=F,this._instantiationService=V,this._bulkEditService=W,this._undoService=z,this._textModelService=B,this._localStore=this._register(new D.DisposableStore),this._handleToViewCellMapping=new Map,this._onDidChangeOptions=this._register(new b.Emitter),this._viewCells=[],this._onDidChangeViewCells=this._register(new b.Emitter),this._lastNotebookEditResource=[],this._onDidChangeSelection=this._register(new b.Emitter),this._selectionCollection=new u.NotebookCellSelectionCollection,this._decorationsTree=new C,this._decorations=Object.create(null),this._lastDecorationId=0,this._foldingRanges=null,this._hiddenRanges=[],this._focused=!0,this._decorationIdToCellMap=new Map,this._statusBarItemIdToCellMap=new Map,A++,this.id="$notebookViewModel"+A,this._instanceId=f.singleLetterHash(A);const H=(U,G)=>{const $=U.map(ee=>[ee[0],ee[1],ee[2].map(X=>L(this._instantiationService,this,X,this._viewContext))]);$.reverse().forEach(ee=>{const X=this._viewCells.splice(ee[0],ee[1],...ee[2]);this._decorationsTree.acceptReplace(ee[0],ee[1],ee[2].length,!0),X.forEach(te=>{this._handleToViewCellMapping.delete(te.handle),te.dispose()}),ee[2].forEach(te=>{this._handleToViewCellMapping.set(te.handle,te),this._localStore.add(te)})});const ie=this.selectionHandles;this._onDidChangeViewCells.fire({synchronous:G,splices:$});let J=[];if(ie.length){const ee=ie[0],X=this._viewCells.indexOf(this.getCellByHandle(ee));J=[ee];let te=0;for(let Z=0;Z<$.length;Z++){const se=$[0];if(se[0]+se[1]<=X){te+=se[2].length-se[1];continue}if(se[0]>X){J=[ee];break}if(se[0]+se[1]>X){J=[this._viewCells[se[0]+te].handle];break}}}const j=J.map(ee=>this._viewCells.findIndex(X=>X.handle===ee));this._selectionCollection.setState((0,l.cellIndexesToRanges)([j[0]])[0],(0,l.cellIndexesToRanges)(j),!0,"model")};this._register(this._notebook.onDidChangeContent(U=>{for(let G=0;G<U.rawEvents.length;G++){const $=U.rawEvents[G];let ie=[];const J=U.synchronous??!0;if($.kind===c.NotebookCellsChangeType.ModelChange||$.kind===c.NotebookCellsChangeType.Initialize){ie=$.changes,H(ie,J);continue}else if($.kind===c.NotebookCellsChangeType.Move)H([[$.index,$.length,[]]],J),H([[$.newIdx,0,$.cells]],J);else continue}})),this._register(this._notebook.onDidChangeContent(U=>{U.rawEvents.forEach(G=>{G.kind===c.NotebookCellsChangeType.ChangeDocumentMetadata&&this._viewContext.eventDispatcher.emit([new n.NotebookMetadataChangedEvent(this._notebook.metadata)])}),U.endSelectionState&&this.updateSelectionsState(U.endSelectionState)})),this._register(this._viewContext.eventDispatcher.onDidChangeLayout(U=>{this._layoutInfo=U.value,this._viewCells.forEach(G=>{G.cellKind===c.CellKind.Markup?(U.source.width||U.source.fontInfo)&&G.layoutChange({outerWidth:U.value.width,font:U.value.fontInfo}):U.source.width!==void 0&&G.layoutChange({outerWidth:U.value.width,font:U.value.fontInfo})})})),this._register(this._viewContext.notebookOptions.onDidChangeOptions(U=>{for(let G=0;G<this.length;G++)this._viewCells[G].updateOptions(U)})),this._register(K.onDidChangeExecution(U=>{if(U.type!==w.NotebookExecutionType.cell)return;const G=this.getCellByHandle(U.cellHandle);G instanceof d.CodeCellViewModel&&G.updateExecutionState(U)})),this._register(this._selectionCollection.onDidChangeSelection(U=>{this._onDidChangeSelection.fire(U)})),this._viewCells=this._notebook.cells.map(U=>L(this._instantiationService,this,U,this._viewContext)),this._viewCells.forEach(U=>{this._handleToViewCellMapping.set(U.handle,U)})}updateOptions(M){this._options={...this._options,...M},this._onDidChangeOptions.fire()}getFocus(){return this._selectionCollection.focus}getSelections(){return this._selectionCollection.selections}setEditorFocus(M){this._focused=M}validateRange(M){if(!M)return null;const N=(0,T.clamp)(M.start,0,this.length),P=(0,T.clamp)(M.end,0,this.length);return N===P?null:N<P?{start:N,end:P}:{start:P,end:N}}updateSelectionsState(M,N="model"){if(this._focused||N==="model")if(M.kind===c.SelectionStateType.Handle){const P=M.primary!==null?this.getCellIndexByHandle(M.primary):null,x=P!==null?this.validateRange({start:P,end:P+1}):null,F=(0,l.cellIndexesToRanges)(M.selections.map(V=>this.getCellIndexByHandle(V))).map(V=>this.validateRange(V)).filter(V=>V!==null);this._selectionCollection.setState(x,(0,l.reduceCellRanges)(F),!0,N)}else{const P=this.validateRange(M.focus),x=M.selections.map(F=>this.validateRange(F)).filter(F=>F!==null);this._selectionCollection.setState(P,(0,l.reduceCellRanges)(x),!0,N)}}getFoldingStartIndex(M){if(!this._foldingRanges)return-1;const N=this._foldingRanges.findRange(M+1);return this._foldingRanges.getStartLineNumber(N)-1}getFoldingState(M){if(!this._foldingRanges)return 0;const N=this._foldingRanges.findRange(M+1);return this._foldingRanges.getStartLineNumber(N)-1!==M?0:this._foldingRanges.isCollapsed(N)?2:1}getFoldedLength(M){if(!this._foldingRanges)return 0;const N=this._foldingRanges.findRange(M+1),P=this._foldingRanges.getStartLineNumber(N)-1;return this._foldingRanges.getEndLineNumber(N)-1-P}updateFoldingRanges(M){this._foldingRanges=M;let N=!1;const P=[];let x=0,F=0,V=Number.MAX_VALUE,W=-1;for(;x<M.length;x++){if(!M.isCollapsed(x))continue;const z=M.getStartLineNumber(x)+1,B=M.getEndLineNumber(x);V<=z&&B<=W||(!N&&F<this._hiddenRanges.length&&this._hiddenRanges[F].start+1===z&&this._hiddenRanges[F].end+1===B?(P.push(this._hiddenRanges[F]),F++):(N=!0,P.push({start:z-1,end:B-1})),V=z,W=B)}(N||F<this._hiddenRanges.length)&&(this._hiddenRanges=P),this._viewCells.forEach(z=>{z.cellKind===c.CellKind.Markup&&z.triggerFoldingStateChange()})}getHiddenRanges(){return this._hiddenRanges}getCellByHandle(M){return this._handleToViewCellMapping.get(M)}getCellIndexByHandle(M){return this._viewCells.findIndex(N=>N.handle===M)}getCellIndex(M){return this._viewCells.indexOf(M)}cellAt(M){return this._viewCells[M]}getCellsInRange(M){if(!M)return this._viewCells.slice(0);const N=this.validateRange(M);if(N){const P=[];for(let x=N.start;x<N.end;x++)P.push(this._viewCells[x]);return P}return[]}getNearestVisibleCellIndexUpwards(M){for(let N=this._hiddenRanges.length-1;N>=0;N--){const P=this._hiddenRanges[N],x=P.start-1,F=P.end;if(!(x>M)){if(x<=M&&F>=M)return M;break}}return M}getNextVisibleCellIndex(M){for(let N=0;N<this._hiddenRanges.length;N++){const P=this._hiddenRanges[N],x=P.start-1,F=P.end;if(!(F<M)){if(x<=M)return F+1;break}}return M+1}getPreviousVisibleCellIndex(M){for(let N=this._hiddenRanges.length-1;N>=0;N--){const P=this._hiddenRanges[N],x=P.start-1;if(P.end<M)return M;if(x<=M)return x}return M}hasCell(M){return this._handleToViewCellMapping.has(M.handle)}getVersionId(){return this._notebook.versionId}getAlternativeId(){return this._notebook.alternativeVersionId}getTrackedRange(M){return this._getDecorationRange(M)}_getDecorationRange(M){const N=this._decorations[M];if(!N)return null;const P=this.getVersionId();return N.cachedVersionId!==P&&this._decorationsTree.resolveNode(N,P),N.range===null?{start:N.cachedAbsoluteStart-1,end:N.cachedAbsoluteEnd-1}:{start:N.range.startLineNumber-1,end:N.range.endLineNumber-1}}setTrackedRange(M,N,P){const x=M?this._decorations[M]:null;return x?N?(this._decorationsTree.delete(x),x.reset(this.getVersionId(),N.start,N.end+1,new m.Range(N.start+1,1,N.end+1,1)),x.setOptions(I[P]),this._decorationsTree.insert(x),x.id):(this._decorationsTree.delete(x),delete this._decorations[x.id],null):N?this._deltaCellDecorationsImpl(0,[],[{range:new m.Range(N.start+1,1,N.end+1,1),options:I[P]}])[0]:null}_deltaCellDecorationsImpl(M,N,P){const x=this.getVersionId(),F=N.length;let V=0;const W=P.length;let z=0;const B=new Array(W);for(;V<F||z<W;){let K=null;if(V<F){do K=this._decorations[N[V++]];while(!K&&V<F);K&&this._decorationsTree.delete(K)}if(z<W){if(!K){const $=++this._lastDecorationId,ie=`${this._instanceId};${$}`;K=new h.IntervalNode(ie,0,0),this._decorations[ie]=K}const H=P[z],U=H.range,G=_(H.options);K.ownerId=M,K.reset(x,U.startLineNumber,U.endLineNumber,m.Range.lift(U)),K.setOptions(G),this._decorationsTree.insert(K),B[z]=K.id,z++}else K&&delete this._decorations[K.id]}return B}deltaCellDecorations(M,N){M.forEach(x=>{const F=this._decorationIdToCellMap.get(x);F!==void 0&&this.getCellByHandle(F)?.deltaCellDecorations([x],[])});const P=[];return N.forEach(x=>{const V=this.getCellByHandle(x.handle)?.deltaCellDecorations([],[x.options])||[];V.forEach(W=>{this._decorationIdToCellMap.set(W,x.handle)}),P.push(...V)}),P}deltaCellStatusBarItems(M,N){const P=(0,t.groupBy)(M,F=>this._statusBarItemIdToCellMap.get(F)??-1),x=[];N.forEach(F=>{const V=this.getCellByHandle(F.handle),W=P[F.handle]??[];delete P[F.handle],W.forEach(B=>this._statusBarItemIdToCellMap.delete(B));const z=V?.deltaCellStatusBarItems(W,F.items)||[];z.forEach(B=>{this._statusBarItemIdToCellMap.set(B,F.handle)}),x.push(...z)});for(const F in P){const V=parseInt(F),W=P[V];this.getCellByHandle(V)?.deltaCellStatusBarItems(W,[]),W.forEach(B=>this._statusBarItemIdToCellMap.delete(B))}return x}nearestCodeCellIndex(M){const N=this.viewCells.slice(0,M).reverse().findIndex(P=>P.cellKind===c.CellKind.Code);if(N>-1)return M-N-1;{const P=this.viewCells.slice(M+1).findIndex(x=>x.cellKind===c.CellKind.Code);return P>-1?M+1+P:-1}}getEditorViewState(){const M={},N={},P={},x={};this._viewCells.forEach((V,W)=>{V.getEditState()===o.CellEditState.Editing&&(M[W]=!0),V.isInputCollapsed&&(N[W]=!0),V instanceof d.CodeCellViewModel&&V.isOutputCollapsed&&(P[W]=!0),V.lineNumbers!=="inherit"&&(x[W]=V.lineNumbers)});const F={};return this._viewCells.map(V=>({handle:V.model.handle,state:V.saveEditorViewState()})).forEach((V,W)=>{V.state&&(F[W]=V.state)}),{editingCells:M,editorViewStates:F,cellLineNumberStates:x,collapsedInputCells:N,collapsedOutputCells:P}}restoreEditorViewState(M){M&&this._viewCells.forEach((N,P)=>{const x=M.editingCells&&M.editingCells[P],F=M.editorViewStates&&M.editorViewStates[P];N.updateEditState(x?o.CellEditState.Editing:o.CellEditState.Preview,"viewState");const V=M.cellTotalHeights?M.cellTotalHeights[P]:void 0;N.restoreEditorViewState(F,V),M.collapsedInputCells&&M.collapsedInputCells[P]&&(N.isInputCollapsed=!0),M.collapsedOutputCells&&M.collapsedOutputCells[P]&&N instanceof d.CodeCellViewModel&&(N.isOutputCollapsed=!0),M.cellLineNumberStates&&M.cellLineNumberStates[P]&&(N.lineNumbers=M.cellLineNumberStates[P])})}changeModelDecorations(M){const N={deltaDecorations:(x,F)=>this._deltaModelDecorationsImpl(x,F)};let P=null;try{P=M(N)}catch(x){(0,y.onUnexpectedError)(x)}return N.deltaDecorations=E,P}_deltaModelDecorationsImpl(M,N){const P=new Map;M.forEach(F=>{const V=F.ownerId;if(!P.has(V)){const z=this._viewCells.find(B=>B.handle===V);z&&P.set(V,{cell:z,oldDecorations:[],newDecorations:[]})}const W=P.get(V);W&&(W.oldDecorations=F.decorations)}),N.forEach(F=>{const V=F.ownerId;if(!P.has(V)){const z=this._viewCells.find(B=>B.handle===V);z&&P.set(V,{cell:z,oldDecorations:[],newDecorations:[]})}const W=P.get(V);W&&(W.newDecorations=F.decorations)});const x=[];return P.forEach((F,V)=>{const W=F.cell.deltaModelDecorations(F.oldDecorations,F.newDecorations);x.push({ownerId:V,decorations:W})}),x}find(M,N){const P=[];return this._viewCells.forEach((x,F)=>{const V=x.startFind(M,N);V&&P.push(new g.CellFindMatchModel(V.cell,F,V.contentMatches,[]))}),P.filter(x=>x.cell.cellKind===c.CellKind.Code?N.includeCodeInput:(x.cell.getEditState()===o.CellEditState.Editing||!N.includeMarkupPreview)&&N.includeMarkupInput)}replaceOne(M,N,P){const x=M;return this._lastNotebookEditResource.push(x.uri),x.resolveTextModel().then(()=>{this._bulkEditService.apply([new v.ResourceTextEdit(M.uri,{range:N,text:P})],{quotableLabel:"Notebook Replace"})})}async replaceAll(M,N){if(!M.length)return;const P=[];return this._lastNotebookEditResource.push(M[0].cell.uri),M.forEach(x=>{x.contentMatches.forEach((F,V)=>{P.push({versionId:void 0,textEdit:{range:F.range,text:N[V]},resource:x.cell.uri})})}),Promise.all(M.map(x=>x.cell.resolveTextModel())).then(async()=>{this._bulkEditService.apply({edits:P},{quotableLabel:"Notebook Replace All"})})}async _withElement(M,N){const P=this._viewCells.filter(F=>M.matchesResource(F.uri)),x=await Promise.all(P.map(F=>this._textModelService.createModelReference(F.uri)));await N(),x.forEach(F=>F.dispose())}async undo(){const M=this._undoService.getElements(this.uri),N=M.past.length?M.past[M.past.length-1]:void 0;return N&&N instanceof S.SingleModelEditStackElement||N instanceof S.MultiModelEditStackElement?(await this._withElement(N,async()=>{await this._undoService.undo(this.uri)}),N instanceof S.SingleModelEditStackElement?[N.resource]:N.resources):(await this._undoService.undo(this.uri),[])}async redo(){const N=this._undoService.getElements(this.uri).future[0];return N&&N instanceof S.SingleModelEditStackElement||N instanceof S.MultiModelEditStackElement?(await this._withElement(N,async()=>{await this._undoService.redo(this.uri)}),N instanceof S.SingleModelEditStackElement?[N.resource]:N.resources):(await this._undoService.redo(this.uri),[])}equal(M){return this._notebook===M}dispose(){this._localStore.clear(),this._viewCells.forEach(M=>{M.dispose()}),super.dispose()}};e.NotebookViewModel=k,e.NotebookViewModel=k=fe([O(5,i.IInstantiationService),O(6,v.IBulkEditService),O(7,s.IUndoRedoService),O(8,r.ITextModelService),O(9,w.INotebookExecutionStateService)],k);function L(R,M,N,P){return N.cellKind===c.CellKind.Code?R.createInstance(d.CodeCellViewModel,M.viewType,N,M.layoutInfo,P):R.createInstance(p.MarkupCellViewModel,M.viewType,N,M.layoutInfo,M,P)}e.createCellViewModel=L}),define(Q[3950],Y([1,0,4,45,16,86,9,2878,39,44,14,26,18,49,65,52]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceChangeExtHostRelauncher=e.SettingsChangeRelauncher=void 0;let u=class extends t.Disposable{static{o=this}static{this.SETTINGS=["window.titleBarStyle","window.nativeTabs","window.nativeFullScreen","window.clickThroughInactive","update.mode","editor.accessibilitySupport","security.workspace.trust.enabled","workbench.enableExperiments","_extensionsGallery.enablePPE"]}constructor(n,g,w,E){super(),this.hostService=n,this.configurationService=g,this.productService=w,this.dialogService=E,this.titleBarStyle=new d("string"),this.nativeTabs=new d("boolean"),this.nativeFullScreen=new d("boolean"),this.clickThroughInactive=new d("boolean"),this.updateMode=new d("string"),this.workspaceTrustEnabled=new d("boolean"),this.experimentsEnabled=new d("boolean"),this.enablePPEExtensionsGallery=new d("boolean"),this.restrictUNCAccess=new d("boolean"),this.onConfigurationChange(void 0),this._register(this.configurationService.onDidChangeConfiguration(C=>this.onConfigurationChange(C)))}onConfigurationChange(n){if(n&&!o.SETTINGS.some(C=>n.affectsConfiguration(C)))return;let g=!1;function w(C){g=g||C}const E=this.configurationService.getValue();a.isNative&&(w((E.window.titleBarStyle==="native"||E.window.titleBarStyle==="custom")&&this.titleBarStyle.handleChange(E.window?.titleBarStyle)),w(a.isMacintosh&&this.nativeTabs.handleChange(E.window?.nativeTabs)),w(a.isMacintosh&&this.nativeFullScreen.handleChange(E.window?.nativeFullScreen)),w(a.isMacintosh&&this.clickThroughInactive.handleChange(E.window?.clickThroughInactive)),w(this.updateMode.handleChange(E.update?.mode)),a.isLinux&&typeof E.editor?.accessibilitySupport=="string"&&E.editor.accessibilitySupport!==this.accessibilitySupport&&(this.accessibilitySupport=E.editor.accessibilitySupport,this.accessibilitySupport==="on"&&(g=!0)),w(this.workspaceTrustEnabled.handleChange(E?.security?.workspace?.trust?.enabled)),w(this.restrictUNCAccess.handleChange(E?.security?.restrictUNCAccess))),w(this.experimentsEnabled.handleChange(E.workbench?.enableExperiments)),w(this.productService.quality!=="stable"&&this.enablePPEExtensionsGallery.handleChange(E._extensionsGallery?.enablePPE)),g&&n&&n.source!==7&&this.doConfirm(a.isNative?(0,f.localize)(0,null):(0,f.localize)(1,null),a.isNative?(0,f.localize)(2,null,this.productService.nameLong):(0,f.localize)(3,null,this.productService.nameLong),a.isNative?(0,f.localize)(4,null):(0,f.localize)(5,null),()=>this.hostService.restart())}async doConfirm(n,g,w,E){if(this.hostService.hasFocus){const{confirmed:C}=await this.dialogService.confirm({message:n,detail:g,primaryButton:w});C&&E()}}};e.SettingsChangeRelauncher=u,e.SettingsChangeRelauncher=u=o=fe([O(0,D.IHostService),O(1,T.IConfigurationService),O(2,s.IProductService),O(3,r.IDialogService)],u);class d{static create(n){return new d(n)}constructor(n){this.typeName=n,this.lastValue=void 0}handleChange(n){return typeof n===this.typeName&&n!==this.lastValue?(this.lastValue=n,!0):!1}}let p=class extends t.Disposable{constructor(n,g,w,E){super(),this.contextService=n,this.extensionHostRestarter=this._register(new S.RunOnceScheduler(async()=>{E.extensionTestsLocationURI||(E.remoteAuthority?w.reload():a.isNative&&await g.stopExtensionHosts((0,f.localize)(6,null))&&g.startExtensionHosts())},10)),this.contextService.getCompleteWorkspace().then(C=>{this.firstFolderResource=C.folders.length>0?C.folders[0].uri:void 0,this.handleWorkbenchState(),this._register(this.contextService.onDidChangeWorkbenchState(()=>setTimeout(()=>this.handleWorkbenchState())))}),this._register((0,t.toDisposable)(()=>{this.onDidChangeWorkspaceFoldersUnbind?.dispose()}))}handleWorkbenchState(){if(this.contextService.getWorkbenchState()===3){const n=this.contextService.getWorkspace();this.firstFolderResource=n.folders.length>0?n.folders[0].uri:void 0,this.onDidChangeWorkspaceFoldersUnbind||(this.onDidChangeWorkspaceFoldersUnbind=this.contextService.onDidChangeWorkspaceFolders(()=>this.onDidChangeWorkspaceFolders()))}else(0,t.dispose)(this.onDidChangeWorkspaceFoldersUnbind),this.onDidChangeWorkspaceFoldersUnbind=void 0}onDidChangeWorkspaceFolders(){const n=this.contextService.getWorkspace(),g=n.folders.length>0?n.folders[0].uri:void 0;(0,h.isEqual)(this.firstFolderResource,g)||(this.firstFolderResource=g,this.extensionHostRestarter.schedule())}};e.WorkspaceChangeExtHostRelauncher=p,e.WorkspaceChangeExtHostRelauncher=p=fe([O(0,v.IWorkspaceContextService),O(1,m.IExtensionService),O(2,D.IHostService),O(3,i.IWorkbenchEnvironmentService)],p);const c=b.Registry.as(y.Extensions.Workbench);c.registerWorkbenchContribution(u,3),c.registerWorkbenchContribution(p,3)}),define(Q[3951],Y([1,0,16,45,1307,100,35,3902]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let v=class{constructor(S){this.saveWindowSplash=S.saveWindowSplash.bind(S)}};v=fe([O(0,D.INativeHostService)],v),(0,T.registerSingleton)(b.ISplashStorageService,v,1),t.Registry.as(y.Extensions.Workbench).registerWorkbenchContribution(f.PartsSplash,1)}),define(Q[3952],Y([1,0,2932,18,45,16,30,24,52,23,41,10,261]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=1,i="nps/sessionCount",s="nps/lastSessionDate",o="nps/skipVersion",u="nps/isCandidate";let d=class{constructor(c,l,n,g,w){if(!w.npsSurveyUrl||c.get(o,-1,""))return;const C=new Date().toDateString(),I=c.get(s,-1,new Date(0).toDateString());if(C===I)return;const _=(c.getNumber(i,-1,0)||0)+1;if(c.store(s,C,-1,0),c.store(i,_,-1,0),_<9)return;const A=c.getBoolean(u,-1,!1)||Math.random()<r;if(c.store(u,A,-1,0),!A){c.store(o,w.version,-1,0);return}l.prompt(m.Severity.Info,t.localize(0,null),[{label:t.localize(1,null),run:()=>{g.open(h.URI.parse(`${w.npsSurveyUrl}?ctx=${encodeURIComponent(`{"ProductVersion":"${w.version}","Platform":"${a.platform}","MachineId":"${n.machineId}"}`)}`)),c.store(u,!1,-1,0),c.store(o,w.version,-1,0)}},{label:t.localize(2,null),run:()=>c.store(i,_-3,-1,0)},{label:t.localize(3,null),run:()=>{c.store(u,!1,-1,0),c.store(o,w.version,-1,0)}}],{sticky:!0})}};d=fe([O(0,f.IStorageService),O(1,m.INotificationService),O(2,T.ITelemetryService),O(3,S.IOpenerService),O(4,v.IProductService)],d),y.language==="en"&&D.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(d,3)}),define(Q[630],Y([1,0,2955,63,4,19,37,163,119,379,5,126,89,8,9,192,49,6]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalEditorInput=void 0;let p=class extends f.EditorInput{static{d=this}static{this.ID="workbench.editors.terminal"}setGroup(l){this._group=l}get group(){return this._group}get typeId(){return d.ID}get editorId(){return v.terminalEditorId}get capabilities(){return 138}setTerminalInstance(l){if(this._terminalInstance)throw new Error("cannot set instance that has already been set");this._terminalInstance=l,this._setupInstanceListeners()}copy(){const l=this._terminalInstanceService.createInstance(this._copyLaunchConfig||{},h.TerminalLocation.Editor);return l.focusWhenReady(),this._copyLaunchConfig=void 0,this._instantiationService.createInstance(d,l.resource,l)}setCopyLaunchConfig(l){this._copyLaunchConfig=l}get terminalInstance(){return this._isDetached?void 0:this._terminalInstance}showConfirm(){if(this._isReverted)return!1;const l=this._configurationService.getValue("terminal.integrated.confirmOnKill");return(l==="editor"||l==="always")&&this._terminalInstance?.hasChildProcesses||!1}async confirm(l){const{confirmed:n}=await this._dialogService.confirm({type:y.default.Warning,message:(0,t.localize)(0,null),primaryButton:(0,t.localize)(1,null),detail:l.length>1?l.map(g=>g.editor.getName()).join(` `)+` `+(0,t.localize)(2,null):(0,t.localize)(3,null)});return n?1:2}async revert(){this._isReverted=!0}constructor(l,n,g,w,E,C,I,_,A){super(),this.resource=l,this._terminalInstance=n,this._themeService=g,this._terminalInstanceService=w,this._instantiationService=E,this._configurationService=C,this._lifecycleService=I,this._dialogService=A,this.closeHandler=this,this._isDetached=!1,this._isShuttingDown=!1,this._isReverted=!1,this._onDidRequestAttach=this._register(new u.Emitter),this.onDidRequestAttach=this._onDidRequestAttach.event,this._terminalEditorFocusContextKey=s.TerminalContextKeys.editorFocus.bindTo(_),n&&this._setupInstanceListeners()}_setupInstanceListeners(){const l=this._terminalInstance;if(!l)return;const n=l.onDidFocus(()=>this._terminalEditorFocusContextKey.set(!0)),g=l.onDidBlur(()=>this._terminalEditorFocusContextKey.reset());this._register((0,b.toDisposable)(()=>{!this._isDetached&&!this._isShuttingDown&&l.dispose(h.TerminalExitReason.User),(0,b.dispose)([n,g])}));const w=[l.onExit(E=>{l.waitOnExit||this.dispose()}),l.onDisposed(()=>this.dispose()),l.onTitleChanged(()=>this._onDidChangeLabel.fire()),l.onIconChanged(()=>this._onDidChangeLabel.fire()),n,g,l.statusList.onDidChangePrimaryStatus(()=>this._onDidChangeLabel.fire())];this._lifecycleService.onWillShutdown(E=>{this._isShuttingDown=!0,(0,b.dispose)(w),this._configurationService.getValue("terminal.integrated.enablePersistentSessions")&&E.reason===3?l.detachProcessAndDispose(h.TerminalExitReason.Shutdown):l.dispose(h.TerminalExitReason.Shutdown)})}getName(){return this._terminalInstance?.title||this.resource.fragment}getLabelExtraClasses(){if(!this._terminalInstance)return[];const l=["terminal-tab"],n=(0,m.getColorClass)(this._terminalInstance);n&&l.push(n);const g=(0,m.getUriClasses)(this._terminalInstance,this._themeService.getColorTheme().type);return g&&l.push(...g),T.ThemeIcon.isThemeIcon(this._terminalInstance.icon)&&l.push(`codicon-${this._terminalInstance.icon.id}`),l}detachInstance(){this._isShuttingDown||(this._terminalInstance?.detachFromElement(),this._isDetached=!0)}getDescription(){return this._terminalInstance?.description}toUntyped(){return{resource:this.resource,options:{override:v.terminalEditorId,pinned:!0,forceReload:!0}}}};e.TerminalEditorInput=p,e.TerminalEditorInput=p=d=fe([O(2,D.IThemeService),O(3,v.ITerminalInstanceService),O(4,S.IInstantiationService),O(5,i.IConfigurationService),O(6,a.ILifecycleService),O(7,r.IContextKeyService),O(8,o.IDialogService)],p)}),define(Q[3953],Y([1,0,6,4,10,8,208,5,126,119,630,533,192,70,21,89]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalEditorService=void 0;let o=class extends y.Disposable{constructor(d,p,c,l,n,g){super(),this._editorService=d,this._editorGroupsService=p,this._terminalInstanceService=c,this._instantiationService=l,this.instances=[],this._activeInstanceIndex=-1,this._isShuttingDown=!1,this._editorInputs=new Map,this._instanceDisposables=new Map,this._onDidDisposeInstance=this._register(new t.Emitter),this.onDidDisposeInstance=this._onDidDisposeInstance.event,this._onDidFocusInstance=this._register(new t.Emitter),this.onDidFocusInstance=this._onDidFocusInstance.event,this._onDidChangeInstanceCapability=this._register(new t.Emitter),this.onDidChangeInstanceCapability=this._onDidChangeInstanceCapability.event,this._onDidChangeActiveInstance=this._register(new t.Emitter),this.onDidChangeActiveInstance=this._onDidChangeActiveInstance.event,this._onDidChangeInstances=this._register(new t.Emitter),this.onDidChangeInstances=this._onDidChangeInstances.event,this._terminalEditorActive=a.TerminalContextKeys.terminalEditorActive.bindTo(g),this._register((0,y.toDisposable)(()=>{for(const w of this._instanceDisposables.values())(0,y.dispose)(w)})),this._register(n.onWillShutdown(()=>this._isShuttingDown=!0)),this._register(this._editorService.onDidActiveEditorChange(()=>{const w=this._editorService.activeEditor,E=w instanceof S.TerminalEditorInput?w?.terminalInstance:void 0,C=!!E&&w instanceof S.TerminalEditorInput;if(this._terminalEditorActive.set(C),C)w?.setGroup(this._editorService.activeEditorPane?.group),this.setActiveInstance(E);else for(const I of this.instances)I.resetFocusContextKey()})),this._register(this._editorService.onDidVisibleEditorsChange(()=>{const w=this.instances.map(I=>I.instanceId),C=this._getActiveTerminalEditors().find(I=>{const _=I instanceof S.TerminalEditorInput?I.terminalInstance?.instanceId:void 0;return _===void 0?!1:!w.includes(_)});C instanceof S.TerminalEditorInput&&C.terminalInstance&&(this._editorInputs.set(C.terminalInstance.resource.path,C),this.instances.push(C.terminalInstance))})),this._register(this._editorService.onDidCloseEditor(w=>{const E=w.editor instanceof S.TerminalEditorInput?w.editor.terminalInstance:void 0;if(E){const C=this.instances.findIndex(I=>I===E);if(C!==-1){const I=this.instances[C]===this.activeInstance;this._removeInstance(E),I&&this.setActiveInstance(void 0)}}}))}_getActiveTerminalEditors(){return this._editorService.visibleEditors.filter(d=>d instanceof S.TerminalEditorInput&&d.terminalInstance?.instanceId)}get activeInstance(){if(!(this.instances.length===0||this._activeInstanceIndex===-1))return this.instances[this._activeInstanceIndex]}setActiveInstance(d){this._activeInstanceIndex=d?this.instances.findIndex(p=>p===d):-1,this._onDidChangeActiveInstance.fire(this.activeInstance)}async focusActiveInstance(){return this.activeInstance?.focusWhenReady(!0)}async openEditor(d,p){const c=this.resolveResource(d);c&&(await this._activeOpenEditorRequest?.promise,this._activeOpenEditorRequest={instanceId:d.instanceId,promise:this._editorService.openEditor({resource:c,description:d.description||d.shellLaunchConfig.type,options:{pinned:!0,forceReload:!0,preserveFocus:p?.preserveFocus}},p?.viewColumn??i.ACTIVE_GROUP)},await this._activeOpenEditorRequest?.promise,this._activeOpenEditorRequest=void 0)}resolveResource(d){const p=d.resource,c=p.path,l=this._editorInputs.get(c);if(l)return l.resource;d.target=v.TerminalLocation.Editor;const n=this._instantiationService.createInstance(S.TerminalEditorInput,p,d);return this._registerInstance(c,n,d),n.resource}getInputFromResource(d){const p=this._editorInputs.get(d.path);if(!p)throw new Error(`Could not get input from resource: ${d.path}`);return p}_registerInstance(d,p,c){this._editorInputs.set(d,p),this._instanceDisposables.set(d,[c.onDidFocus(this._onDidFocusInstance.fire,this._onDidFocusInstance),c.onDisposed(this._onDidDisposeInstance.fire,this._onDidDisposeInstance),c.capabilities.onDidAddCapabilityType(()=>this._onDidChangeInstanceCapability.fire(c)),c.capabilities.onDidRemoveCapabilityType(()=>this._onDidChangeInstanceCapability.fire(c))]),this.instances.push(c),this._onDidChangeInstances.fire()}_removeInstance(d){const p=d.resource.path;this._editorInputs.delete(p);const c=this.instances.findIndex(n=>n===d);c!==-1&&this.instances.splice(c,1);const l=this._instanceDisposables.get(p);this._instanceDisposables.delete(p),l&&(0,y.dispose)(l),this._onDidChangeInstances.fire()}getInstanceFromResource(d){return(0,h.getInstanceFromResource)(this.instances,d)}splitInstance(d,p={}){if(d.target===v.TerminalLocation.Editor){const n=this._editorInputs.get(d.resource.path)?.group;n&&this._editorGroupsService.activateGroup(n)}const c=this._terminalInstanceService.createInstance(p,v.TerminalLocation.Editor),l=this.resolveResource(c);return l&&this._editorService.openEditor({resource:b.URI.revive(l),description:c.description,options:{pinned:!0,forceReload:!0}},i.SIDE_GROUP),c}reviveInput(d){if("pid"in d){const p={...d,findRevivedId:!0},c=this._terminalInstanceService.createInstance({attachPersistentProcess:p},v.TerminalLocation.Editor),l=this._instantiationService.createInstance(S.TerminalEditorInput,c.resource,c);return this._registerInstance(c.resource.path,l,c),l}else throw new Error(`Could not revive terminal editor input, ${d}`)}detachInstance(d){const p=d.resource.path,c=this._editorInputs.get(p);c?.detachInstance(),this._removeInstance(d),this._isShuttingDown||c?.dispose()}async revealActiveEditor(d){const p=this.activeInstance;if(!p||this._activeOpenEditorRequest?.instanceId===p.instanceId)return;const c=this._editorInputs.get(p.resource.path);this._editorService.openEditor(c,{pinned:!0,forceReload:!0,preserveFocus:d,activation:T.EditorActivation.PRESERVE})}};e.TerminalEditorService=o,e.TerminalEditorService=o=fe([O(0,i.IEditorService),O(1,r.IEditorGroupsService),O(2,m.ITerminalInstanceService),O(3,f.IInstantiationService),O(4,s.ILifecycleService),O(5,D.IContextKeyService)],o)}),define(Q[3954],Y([1,0,7,34,6,4,2968,68,28,9,29,5,41,43,19,37,532,1372,468,89,220,23]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationAddon=void 0;let n=class extends D.Disposable{constructor(w,E,C,I,_,A,k,L,R,M,N,P){super(),this._capabilities=w,this._clipboardService=E,this._contextMenuService=C,this._configurationService=I,this._themeService=_,this._openerService=A,this._quickInputService=k,this._commandService=R,this._audioCueService=N,this._notificationService=P,this._capabilityDisposables=new Map,this._decorations=new Map,this._onDidRequestRunCommand=this._register(new b.Emitter),this.onDidRequestRunCommand=this._onDidRequestRunCommand.event,this._register((0,D.toDisposable)(()=>this._dispose())),this._register(this._configurationService.onDidChangeConfiguration(x=>{x.affectsConfiguration("terminal.integrated.fontSize")||x.affectsConfiguration("terminal.integrated.lineHeight")?this.refreshLayouts():x.affectsConfiguration("workbench.colorCustomizations")?this._refreshStyles(!0):x.affectsConfiguration("terminal.integrated.shellIntegration.decorationsEnabled")&&(this._removeCapabilityDisposables(2),this._updateDecorationVisibility())})),this._register(this._themeService.onDidColorThemeChange(()=>this._refreshStyles(!0))),this._updateDecorationVisibility(),this._register(this._capabilities.onDidAddCapabilityType(x=>this._createCapabilityDisposables(x))),this._register(this._capabilities.onDidRemoveCapabilityType(x=>this._removeCapabilityDisposables(x))),this._register(L.onWillShutdown(()=>this._disposeAllDecorations())),this._terminalDecorationHoverService=M.createInstance(u.TerminalDecorationHoverManager)}_removeCapabilityDisposables(w){const E=this._capabilityDisposables.get(w);E&&(0,D.dispose)(E),this._capabilityDisposables.delete(w)}_createCapabilityDisposables(w){let E=[];const C=this._capabilities.get(w);if(!(!C||this._capabilityDisposables.has(w))){switch(C.type){case 4:E=[C.onMarkAdded(I=>this.registerMarkDecoration(I))];break;case 2:E=this._getCommandDetectionListeners(C);break}this._capabilityDisposables.set(w,E)}}registerMarkDecoration(w){if(!(!this._terminal||!this._showGutterDecorations&&!this._showOverviewRulerDecorations)&&!w.hidden)return this.registerCommandDecoration(void 0,void 0,w)}_updateDecorationVisibility(){const w=this._configurationService.getValue("terminal.integrated.shellIntegration.decorationsEnabled");this._showGutterDecorations=w==="both"||w==="gutter",this._showOverviewRulerDecorations=w==="both"||w==="overviewRuler",this._disposeAllDecorations(),(this._showGutterDecorations||this._showOverviewRulerDecorations)&&(this._attachToCommandCapability(),this._updateGutterDecorationVisibility());const E=this._capabilities.get(2)?.executingCommandObject;E&&this.registerCommandDecoration(E,!0)}_disposeAllDecorations(){this._placeholderDecoration?.dispose();for(const w of this._decorations.values())w.decoration.dispose(),(0,D.dispose)(w.disposables)}_updateGutterDecorationVisibility(){const w=document.querySelectorAll("terminal-command-decoration");for(const E of w)this._updateCommandDecorationVisibility(E)}_updateCommandDecorationVisibility(w){this._showGutterDecorations?w.classList.remove("hide"):w.classList.add("hide")}refreshLayouts(){(0,u.updateLayout)(this._configurationService,this._placeholderDecoration?.element);for(const w of this._decorations)(0,u.updateLayout)(this._configurationService,w[1].decoration.element)}_refreshStyles(w){if(w)for(const E of this._decorations.values()){const C=this._getDecorationCssColor(E)?.toString()??"";E.decoration.options?.overviewRulerOptions?E.decoration.options.overviewRulerOptions.color=C:E.decoration.options&&(E.decoration.options.overviewRulerOptions={color:C})}this._updateClasses(this._placeholderDecoration?.element);for(const E of this._decorations.values())this._updateClasses(E.decoration.element,E.exitCode,E.markProperties)}_dispose(){this._terminalDecorationHoverService.dispose();for(const w of this._capabilityDisposables.values())(0,D.dispose)(w);this.clearDecorations()}_clearPlaceholder(){this._placeholderDecoration?.dispose(),this._placeholderDecoration=void 0}clearDecorations(){this._placeholderDecoration?.marker.dispose(),this._clearPlaceholder(),this._disposeAllDecorations(),this._decorations.clear()}_attachToCommandCapability(){this._capabilities.has(2)&&this._getCommandDetectionListeners(this._capabilities.get(2))}_getCommandDetectionListeners(w){if(this._capabilityDisposables.has(2)){const C=this._capabilityDisposables.get(2);(0,D.dispose)(C),this._capabilityDisposables.delete(w.type)}const E=[];w.executingCommandObject?.marker&&this.registerCommandDecoration(w.executingCommandObject,!0),E.push(w.onCommandStarted(C=>this.registerCommandDecoration(C,!0)));for(const C of w.commands)this.registerCommandDecoration(C);return E.push(w.onCommandFinished(C=>{this.registerCommandDecoration(C),C.exitCode&&this._audioCueService.playAudioCue(c.AudioCue.terminalCommandFailed)})),E.push(w.onCommandInvalidated(C=>{for(const I of C){const _=I.marker?.id;if(_){const A=this._decorations.get(_);A&&(A.decoration.dispose(),(0,D.dispose)(A.disposables))}}})),E.push(w.onCurrentCommandInvalidated(C=>{C.reason==="noProblemsReported"?Array.from(this._decorations.entries())[this._decorations.size-1]?.[1].decoration.dispose():C.reason==="windows"&&this._clearPlaceholder()})),E}activate(w){this._terminal=w,this._attachToCommandCapability()}registerCommandDecoration(w,E,C){if(!this._terminal||E&&!w||!this._showGutterDecorations&&!this._showOverviewRulerDecorations)return;const I=w?.marker||C?.marker;if(!I)throw new Error(`cannot add a decoration for a command ${JSON.stringify(w)} with no marker`);this._clearPlaceholder();const _=this._getDecorationCssColor(w)?.toString()??"",A=this._terminal.registerDecoration({marker:I,overviewRulerOptions:this._showOverviewRulerDecorations?E?{color:_,position:"left"}:{color:_,position:w?.exitCode?"right":"left"}:void 0});if(A)return E&&(this._placeholderDecoration=A),A.onRender(k=>{k.classList.contains(".xterm-decoration-overview-ruler")||(this._decorations.get(A.marker.id)||(A.onDispose(()=>this._decorations.delete(A.marker.id)),this._decorations.set(A.marker.id,{decoration:A,disposables:this._createDisposables(k,w,C),exitCode:w?.exitCode,markProperties:w?.markProperties})),(!k.classList.contains("codicon")||w?.marker?.line===0)&&((0,u.updateLayout)(this._configurationService,k),this._updateClasses(k,w?.exitCode,w?.markProperties||C)))}),A}_createDisposables(w,E,C){return E?.exitCode===void 0&&!E?.markProperties?[]:E?.markProperties||C?[this._terminalDecorationHoverService.createHover(w,E||C,C?.hoverMessage)]:[this._createContextMenu(w,E),this._terminalDecorationHoverService.createHover(w,E)]}_updateClasses(w,E,C){if(w){for(const I of w.classList)w.classList.remove(I);w.classList.add("terminal-command-decoration","codicon","xterm-decoration"),C?(w.classList.add("default-color",...s.ThemeIcon.asClassNameArray(o.terminalDecorationMark)),C.hoverMessage||w.classList.add("default")):(this._updateCommandDecorationVisibility(w),E===void 0?(w.classList.add("default-color","default"),w.classList.add(...s.ThemeIcon.asClassNameArray(o.terminalDecorationIncomplete))):E?(w.classList.add("error"),w.classList.add(...s.ThemeIcon.asClassNameArray(o.terminalDecorationError))):w.classList.add(...s.ThemeIcon.asClassNameArray(o.terminalDecorationSuccess)))}}_createContextMenu(w,E){return t.addDisposableListener(w,t.EventType.CLICK,async()=>{this._terminalDecorationHoverService.hideHover();const C=await this._getCommandActions(E);this._contextMenuService.showContextMenu({getAnchor:()=>w,getActions:()=>C})})}async _getCommandActions(w){const E=[];if(w.command!==""){const k=(0,T.localize)(0,null);E.push({class:void 0,tooltip:k,id:"terminal.rerunCommand",label:k,enabled:!0,run:async()=>{w.command!==""&&(!w.isTrusted&&!await new Promise(M=>{this._notificationService.prompt(l.Severity.Info,(0,T.localize)(1,null,w.command),[{label:(0,T.localize)(2,null),run:()=>M(!0)},{label:(0,T.localize)(3,null),run:()=>M(!1)}])})||this._onDidRequestRunCommand.fire({command:w}))}});const L=(0,T.localize)(4,null);E.push({class:void 0,tooltip:L,id:"terminal.copyCommand",label:L,enabled:!0,run:()=>this._clipboardService.writeText(w.command)})}if(w.hasOutput()){E.length>0&&E.push(new y.Separator);const k=(0,T.localize)(5,null);E.push({class:void 0,tooltip:k,id:"terminal.copyOutput",label:k,enabled:!0,run:()=>{const R=w.getOutput();typeof R=="string"&&this._clipboardService.writeText(R)}});const L=(0,T.localize)(6,null);E.push({class:void 0,tooltip:L,id:"terminal.copyOutputAsHtml",label:L,enabled:!0,run:()=>this._onDidRequestRunCommand.fire({command:w,copyAsHtml:!0})})}E.length>0&&E.push(new y.Separator);const C=(0,T.localize)(7,null);E.push({class:void 0,tooltip:C,id:"workbench.action.terminal.runRecentCommand",label:C,enabled:!0,run:()=>this._commandService.executeCommand("workbench.action.terminal.runRecentCommand")});const I=(0,T.localize)(8,null);E.push({class:void 0,tooltip:C,id:"workbench.action.terminal.goToRecentDirectory",label:I,enabled:!0,run:()=>this._commandService.executeCommand("workbench.action.terminal.goToRecentDirectory")}),E.push(new y.Separator);const _=(0,T.localize)(9,null);E.push({class:void 0,tooltip:_,id:"terminal.configureCommandDecorations",label:_,enabled:!0,run:()=>this._showConfigureCommandDecorationsQuickPick()});const A=(0,T.localize)(10,null);return E.push({class:void 0,tooltip:A,id:"terminal.learnShellIntegration",label:A,enabled:!0,run:()=>this._openerService.open("https://code.visualstudio.com/docs/terminal/shell-integration")}),E}async _showConfigureCommandDecorationsQuickPick(){const w=this._quickInputService.createQuickPick();w.items=[{id:"a",label:(0,T.localize)(11,null)}],w.canSelectMany=!1,w.onDidAccept(async E=>{switch(w.hide(),w.activeItems[0].id){case"a":this._showToggleVisibilityQuickPick();break}}),w.show()}_showToggleVisibilityQuickPick(){const w=this._quickInputService.createQuickPick();w.hideInput=!0,w.hideCheckAll=!0,w.canSelectMany=!0,w.title=(0,T.localize)(12,null);const E=this._configurationService.getValue("terminal.integrated.shellIntegration.decorationsEnabled"),C={label:(0,T.localize)(13,null),picked:E!=="never"&&E!=="overviewRuler"},I={label:(0,T.localize)(14,null),picked:E!=="never"&&E!=="gutter"};w.items=[C,I];const _=[];E!=="never"&&(E!=="gutter"&&_.push(C),E!=="overviewRuler"&&_.push(I)),w.selectedItems=_,w.onDidChangeSelection(async A=>{let k="never";A.includes(C)?A.includes(I)?k="both":k="gutter":A.includes(I)&&(k="overviewRuler"),await this._configurationService.updateValue("terminal.integrated.shellIntegration.decorationsEnabled",k)}),w.ok=!1,w.show()}_getDecorationCssColor(w){let E;return w?.exitCode===void 0?E=d.TERMINAL_COMMAND_DECORATION_DEFAULT_BACKGROUND_COLOR:E=w.exitCode?d.TERMINAL_COMMAND_DECORATION_ERROR_BACKGROUND_COLOR:d.TERMINAL_COMMAND_DECORATION_SUCCESS_BACKGROUND_COLOR,this._themeService.getColorTheme().getColor(E)?.toString()}};e.DecorationAddon=n,e.DecorationAddon=n=fe([O(1,f.IClipboardService),O(2,S.IContextMenuService),O(3,m.IConfigurationService),O(4,i.IThemeService),O(5,a.IOpenerService),O(6,r.IQuickInputService),O(7,p.ILifecycleService),O(8,v.ICommandService),O(9,h.IInstantiationService),O(10,c.IAudioCueService),O(11,l.INotificationService)],n)}),define(Q[3955],Y([1,0,7,9,89]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewIconManager=void 0;let D=class{constructor(f,v){this._lifecycleService=f,this._configService=v,this._icons=new Map,this._configService.onDidChangeConfiguration(m=>{m.affectsConfiguration("workbench.iconTheme")&&this.updateStyleSheet()})}dispose(){this._styleElement?.remove(),this._styleElement=void 0}get styleElement(){return this._styleElement||(this._styleElement=t.createStyleSheet(),this._styleElement.className="webview-icons"),this._styleElement}setIcons(f,v){v?this._icons.set(f,v):this._icons.delete(f),this.updateStyleSheet()}async updateStyleSheet(){await this._lifecycleService.when(1);const f=[];if(this._configService.getValue("workbench.iconTheme")!==null)for(const[v,m]of this._icons){const S=`.show-file-icons .webview-${v}-name-file-icon::before`;try{f.push(`.monaco-workbench.vs ${S}, .monaco-workbench.hc-light ${S} { content: ""; background-image: ${t.asCSSUrl(m.light)}; }`,`.monaco-workbench.vs-dark ${S}, .monaco-workbench.hc-black ${S} { content: ""; background-image: ${t.asCSSUrl(m.dark)}; }`)}catch{}}this.styleElement.textContent=f.join(` `)}};e.WebviewIconManager=D,e.WebviewIconManager=D=fe([O(0,b.ILifecycleService),O(1,y.IConfigurationService)],D)}),define(Q[541],Y([1,0,14,31,102,15,6,83,4,8,208,5,246,222,749,3955,21,424]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewEditorService=e.LazilyResolvedWebviewEditorInput=e.IWebviewWorkbenchService=void 0,e.IWebviewWorkbenchService=(0,h.createDecorator)("webviewEditorService");function d(n,g){return n.canResolve(g)}let p=class extends u.WebviewInput{constructor(g,w,E){super(g,w,E.iconManager),this._webviewWorkbenchService=E,this._resolved=!1}dispose(){super.dispose(),this._resolvePromise?.cancel(),this._resolvePromise=void 0}async resolve(){if(!this._resolved){this._resolved=!0,this._resolvePromise=(0,t.createCancelablePromise)(g=>this._webviewWorkbenchService.resolveWebview(this,g));try{await this._resolvePromise}catch(g){if(!(0,D.isCancellationError)(g))throw g}}return super.resolve()}transfer(g){if(super.transfer(g))return g._resolved=this._resolved,g}};e.LazilyResolvedWebviewEditorInput=p,fe([b.memoize],p.prototype,"resolve",null),e.LazilyResolvedWebviewEditorInput=p=fe([O(2,e.IWebviewWorkbenchService)],p);class c{constructor(){this._awaitingRevival=[]}enqueueForRestoration(g,w){const E=new t.DeferredPromise,C=()=>{const _=this._awaitingRevival.findIndex(A=>g===A.input);_>=0&&this._awaitingRevival.splice(_,1)},I=(0,v.combinedDisposable)(g.webview.onDidDispose(C),w.onCancellationRequested(()=>{C(),E.cancel()}));return this._awaitingRevival.push({input:g,promise:E,disposable:I}),E.p}reviveFor(g,w){const E=this._awaitingRevival.filter(({input:C})=>d(g,C));this._awaitingRevival=this._awaitingRevival.filter(({input:C})=>!d(g,C));for(const{input:C,promise:I,disposable:_}of E)g.resolveWebview(C,w).then(A=>I.complete(A),A=>I.error(A)).finally(()=>{_.dispose()})}}let l=class extends v.Disposable{constructor(g,w,E,C){super(),this._editorService=w,this._instantiationService=E,this._webviewService=C,this._revivers=new Set,this._revivalPool=new c,this._onDidChangeActiveWebviewEditor=this._register(new T.Emitter),this.onDidChangeActiveWebviewEditor=this._onDidChangeActiveWebviewEditor.event,this._activeWebviewPanelIdContext=i.CONTEXT_ACTIVE_WEBVIEW_PANEL_ID.bindTo(g),this._iconManager=this._register(this._instantiationService.createInstance(s.WebviewIconManager)),this._register(w.onDidActiveEditorChange(()=>{this.updateActiveWebview()})),this._register(C.onDidChangeActiveWebview(()=>{this.updateActiveWebview()})),this.updateActiveWebview()}get iconManager(){return this._iconManager}updateActiveWebview(){const g=this._editorService.activeEditor;let w;g instanceof u.WebviewInput?w=g:g instanceof a.DiffEditorInput&&(g.primary instanceof u.WebviewInput&&g.primary.webview===this._webviewService.activeWebview?w=g.primary:g.secondary instanceof u.WebviewInput&&g.secondary.webview===this._webviewService.activeWebview&&(w=g.secondary)),w?this._activeWebviewPanelIdContext.set(w.webview.providedViewType??""):this._activeWebviewPanelIdContext.reset(),w!==this._activeWebview&&(this._activeWebview=w,this._onDidChangeActiveWebviewEditor.fire(w))}openWebview(g,w,E,C){const I=this._webviewService.createWebviewOverlay(g),_=this._instantiationService.createInstance(u.WebviewInput,{viewType:w,name:E,providedId:g.providedViewType},I,this.iconManager);return this._editorService.openEditor(_,{pinned:!0,preserveFocus:C.preserveFocus,activation:C.preserveFocus?S.EditorActivation.RESTORE:void 0},C.group),_}revealWebview(g,w,E){const C=this.findTopLevelEditorForWebview(g);this._editorService.openEditor(C,{preserveFocus:E,activation:E?S.EditorActivation.RESTORE:void 0},w)}findTopLevelEditorForWebview(g){for(const w of this._editorService.editors)if(w===g||w instanceof a.DiffEditorInput&&(g===w.primary||g===w.secondary))return w;return g}openRevivedWebview(g){const w=this._webviewService.createWebviewOverlay(g.webviewInitInfo);w.state=g.state;const E=this._instantiationService.createInstance(p,{viewType:g.viewType,providedId:g.webviewInitInfo.providedViewType,name:g.title},w);return E.iconPath=g.iconPath,typeof g.group=="number"&&E.updateGroup(g.group),E}registerResolver(g){this._revivers.add(g);const w=new y.CancellationTokenSource;return this._revivalPool.reviveFor(g,w.token),(0,v.toDisposable)(()=>{this._revivers.delete(g),w.dispose(!0)})}shouldPersist(g){return g instanceof p?!0:f.Iterable.some(this._revivers.values(),w=>d(w,g))}async tryRevive(g,w){for(const E of this._revivers.values())if(d(E,g))return await E.resolveWebview(g,w),!0;return!1}async resolveWebview(g,w){if(!await this.tryRevive(g,w)&&!w.isCancellationRequested)return this._revivalPool.enqueueForRestoration(g,w)}setIcons(g,w){this._iconManager.setIcons(g,w)}};e.WebviewEditorService=l,e.WebviewEditorService=l=fe([O(0,m.IContextKeyService),O(1,o.IEditorService),O(2,h.IInstantiationService),O(3,r.IWebviewService)],l)}),define(Q[3956],Y([1,0,15,6,4,10,59,9,24,30,626,53,246,222,424,541,362,70,21,44]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadWebviewPanels=void 0;class c{constructor(){this._handlesToInputs=new Map,this._inputsToHandles=new Map}add(C,I){this._handlesToInputs.set(C,I),this._inputsToHandles.set(I,C)}getHandleForInput(C){return this._inputsToHandles.get(C)}getInputForHandle(C){return this._handlesToInputs.get(C)}delete(C){const I=this.getInputForHandle(C);this._handlesToInputs.delete(C),I&&this._inputsToHandles.delete(I)}get size(){return this._handlesToInputs.size}[Symbol.iterator](){return this._handlesToInputs.values()}}class l{constructor(C){this.prefix=C}fromExternal(C){return this.prefix+C}toExternal(C){return C.startsWith(this.prefix)?C.substr(this.prefix.length):void 0}}let n=class extends b.Disposable{constructor(C,I,_,A,k,L,R,M,N){super(),this._mainThreadWebviews=I,this._configurationService=_,this._editorGroupService=A,this._editorService=k,this._telemetryService=M,this._webviewWorkbenchService=N,this.webviewPanelViewType=new l("mainThreadWebview-"),this._webviewInputs=new c,this._revivers=this._register(new b.DisposableMap),this.webviewOriginStore=new r.ExtensionKeyedWebviewOriginStore("mainThreadWebviewPanel.origins",R),this._proxy=C.getProxy(h.ExtHostContext.ExtHostWebviewPanels),this._register(y.Event.any(k.onDidActiveEditorChange,k.onDidVisibleEditorsChange,A.onDidAddGroup,A.onDidRemoveGroup,A.onDidMoveGroup)(()=>{this.updateWebviewViewStates(this._editorService.activeEditor)})),this._register(N.onDidChangeActiveWebviewEditor(P=>{this.updateWebviewViewStates(P)})),this._register(N.registerResolver({canResolve:P=>{const x=this.webviewPanelViewType.toExternal(P.viewType);return typeof x=="string"&&L.activateByEvent(`onWebviewPanel:${x}`),!1},resolveWebview:()=>{throw new Error("not implemented")}}))}get webviewInputs(){return this._webviewInputs}addWebviewInput(C,I,_){this._webviewInputs.add(C,I),this._mainThreadWebviews.addWebview(C,I.webview,_),I.webview.onDidDispose(()=>{this._proxy.$onDidDisposeWebviewPanel(C).finally(()=>{this._webviewInputs.delete(C)})})}$createWebviewPanel(C,I,_,A,k){const L=this.getTargetGroupFromShowOptions(k),R=k?{preserveFocus:!!k.preserveFocus,group:L}:{},M=(0,S.reviveWebviewExtension)(C),N=this.webviewOriginStore.getOrigin(_,M.id),P=this._webviewWorkbenchService.openWebview({origin:N,providedViewType:_,title:A.title,options:w(A.panelOptions),contentOptions:(0,S.reviveWebviewContentOptions)(A.webviewOptions),extension:M},this.webviewPanelViewType.fromExternal(_),A.title,R);this.addWebviewInput(I,P,{serializeBuffersForPostMessage:A.serializeBuffersForPostMessage});const x={extensionId:M.id.value,viewType:_};this._telemetryService.publicLog2("webviews:createWebviewPanel",x)}$disposeWebview(C){const I=this.tryGetWebviewInput(C);I&&I.dispose()}$setTitle(C,I){this.tryGetWebviewInput(C)?.setName(I)}$setIconPath(C,I){const _=this.tryGetWebviewInput(C);_&&(_.iconPath=g(I))}$reveal(C,I){const _=this.tryGetWebviewInput(C);if(!_||_.isDisposed())return;const A=this.getTargetGroupFromShowOptions(I);this._webviewWorkbenchService.revealWebview(_,A,!!I.preserveFocus)}getTargetGroupFromShowOptions(C){if(typeof C.viewColumn>"u"||C.viewColumn===d.ACTIVE_GROUP||this._editorGroupService.count===1&&this._editorGroupService.activeGroup.isEmpty)return d.ACTIVE_GROUP;if(C.viewColumn===d.SIDE_GROUP)return d.SIDE_GROUP;if(C.viewColumn>=0){const I=this._editorGroupService.getGroups(2)[C.viewColumn];if(I)return I.id;const _=this._editorGroupService.findGroup({location:1});if(_){const A=(0,u.preferredSideBySideGroupDirection)(this._configurationService);return this._editorGroupService.addGroup(_,A)}}return d.ACTIVE_GROUP}$registerSerializer(C,I){if(this._revivers.has(C))throw new Error(`Reviver for ${C} already registered`);this._revivers.set(C,this._webviewWorkbenchService.registerResolver({canResolve:_=>_.viewType===this.webviewPanelViewType.fromExternal(C),resolveWebview:async _=>{const A=this.webviewPanelViewType.toExternal(_.viewType);if(!A){_.webview.setHtml(this._mainThreadWebviews.getWebviewResolvedFailedContent(_.viewType));return}const k=(0,T.generateUuid)();this.addWebviewInput(k,_,I);let L;if(_.webview.state)try{L=JSON.parse(_.webview.state)}catch(R){console.error("Could not load webview state",R,_.webview.state)}try{await this._proxy.$deserializeWebviewPanel(k,A,{title:_.getTitle(),state:L,panelOptions:_.webview.options,webviewOptions:_.webview.contentOptions,active:_===this._editorService.activeEditor},(0,o.editorGroupToColumn)(this._editorGroupService,_.group||0))}catch(R){(0,t.onUnexpectedError)(R),_.webview.setHtml(this._mainThreadWebviews.getWebviewResolvedFailedContent(A))}}}))}$unregisterSerializer(C){if(!this._revivers.has(C))throw new Error(`No reviver for ${C} registered`);this._revivers.deleteAndDispose(C)}updateWebviewViewStates(C){if(!this._webviewInputs.size)return;const I={},_=(A,k,L)=>{if(!(L instanceof i.WebviewInput))return;L.updateGroup(A.id);const R=this._webviewInputs.getHandleForInput(L);R&&(I[R]={visible:k===A.activeEditor,active:L===C,position:(0,o.editorGroupToColumn)(this._editorGroupService,A.id)})};for(const A of this._editorGroupService.groups)for(const k of A.editors)k instanceof a.DiffEditorInput?(_(A,k,k.primary),_(A,k,k.secondary)):_(A,k,k);Object.keys(I).length&&this._proxy.$onDidChangeWebviewPanelViewStates(I)}tryGetWebviewInput(C){return this._webviewInputs.getInputForHandle(C)}};e.MainThreadWebviewPanels=n,e.MainThreadWebviewPanels=n=fe([O(2,f.IConfigurationService),O(3,u.IEditorGroupsService),O(4,d.IEditorService),O(5,p.IExtensionService),O(6,v.IStorageService),O(7,m.ITelemetryService),O(8,s.IWebviewWorkbenchService)],n);function g(E){if(E)return{light:D.URI.revive(E.light),dark:D.URI.revive(E.dark)}}function w(E){return{enableFindWidget:E.enableFindWidget,retainContextWhenHidden:E.retainContextWhenHidden}}}),define(Q[1380],Y([1,0,10,112,424,541]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.restoreWebviewContentOptions=e.restoreWebviewOptions=e.reviveWebviewExtensionDescription=e.WebviewEditorInputSerializer=void 0;let T=class{static{this.ID=b.WebviewInput.typeId}constructor(i){this._webviewWorkbenchService=i}canSerialize(i){return this._webviewWorkbenchService.shouldPersist(i)}serialize(i){if(!this._webviewWorkbenchService.shouldPersist(i))return;const s=this.toJson(i);try{return JSON.stringify(s)}catch{return}}deserialize(i,s){const o=this.fromJson(JSON.parse(s));return this._webviewWorkbenchService.openRevivedWebview({webviewInitInfo:{providedViewType:o.providedId,origin:o.origin,title:o.title,options:o.webviewOptions,contentOptions:o.contentOptions,extension:o.extension},viewType:o.viewType,title:o.title,iconPath:o.iconPath,state:o.state,group:o.group})}fromJson(i){return{...i,extension:f(i.extensionId,i.extensionLocation),iconPath:v(i.iconPath),state:S(i.state),webviewOptions:i.options,contentOptions:a(i.options)}}toJson(i){return{origin:i.webview.origin,viewType:i.viewType,providedId:i.providedId,title:i.getName(),options:{...i.webview.options,...i.webview.contentOptions},extensionLocation:i.extension?.location,extensionId:i.extension?.id.value,state:i.webview.state,iconPath:i.iconPath?{light:i.iconPath.light,dark:i.iconPath.dark}:void 0,group:i.group}}};e.WebviewEditorInputSerializer=T,e.WebviewEditorInputSerializer=T=fe([O(0,D.IWebviewWorkbenchService)],T);function f(r,i){if(!r)return;const s=m(i);if(s)return{id:new y.ExtensionIdentifier(r),location:s}}e.reviveWebviewExtensionDescription=f;function v(r){if(!r)return;const i=m(r.light),s=m(r.dark);return i&&s?{light:i,dark:s}:void 0}function m(r){if(r)try{return typeof r=="string"?t.URI.parse(r):t.URI.from(r)}catch{return}}function S(r){return typeof r=="string"?r:void 0}function h(r){return r}e.restoreWebviewOptions=h;function a(r){return{...r,localResourceRoots:r.localResourceRoots?.map(i=>m(i))}}e.restoreWebviewContentOptions=a}),define(Q[3957],Y([1,0,4,17,3033,13,28,8,38,43,16,45]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0});const r=(0,b.localize)(0,null),i={value:(0,b.localize)(1,null),original:"Create"};(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"welcome.showNewFileEntries",title:{value:(0,b.localize)(2,null),original:"New File..."},category:i,f1:!0,keybinding:{primary:512+2048+256+44,weight:200}})}async run(o){return(0,y.assertIsDefined)(s.Instance).run()}});let s=class extends t.Disposable{static{a=this}constructor(u,d,p,c,l){super(),this.quickInputService=u,this.contextKeyService=d,this.commandService=p,this.keybindingService=c,a.Instance=this,this._register({dispose(){a.Instance===this&&(a.Instance=void 0)}}),this.menu=l.createMenu(D.MenuId.NewFile,d)}allEntries(){const u=[];for(const[d,p]of this.menu.getActions({renderShortTitle:!0}))for(const c of p)c instanceof D.MenuItemAction&&u.push({commandID:c.item.id,from:c.item.source?.title??r,title:c.label,group:d});return u}async run(){const u=this.allEntries();if(u.length===0)throw Error("Unexpected empty new items list");return u.length===1?(this.commandService.executeCommand(u[0].commandID),!0):this.selectNewEntry(u)}async selectNewEntry(u){let d;const p=new Promise(E=>{d=E}),c=new t.DisposableStore,l=this.quickInputService.createQuickPick();l.title=(0,b.localize)(3,null),l.placeholder=(0,b.localize)(4,null),l.sortByLabel=!1,l.matchOnDetail=!0,l.matchOnDescription=!0;const n=(E,C)=>{const I={file:1,notebook:2};if(I[E.group]&&I[C.group]){if(I[E.group]!==I[C.group])return I[C.group]-I[E.group]}else{if(I[E.group])return 1;if(I[C.group])return-1}return E.from===r?1:C.from===r?-1:E.from.localeCompare(C.from)},g={file:(0,b.localize)(5,null),notebook:(0,b.localize)(6,null)},w=E=>{const C=[];let I;E.sort((_,A)=>-n(_,A)).forEach(_=>{const A=_.commandID,k=this.keybindingService.lookupKeybinding(A||"",this.contextKeyService);I!==_.group&&(C.push({type:"separator",label:g[_.group]??_.group}),I=_.group),C.push({..._,label:_.title,type:"item",keybinding:k,buttons:A?[{iconClass:"codicon codicon-gear",tooltip:(0,b.localize)(7,null)}]:[],detail:"",description:_.from})}),l.items=C};return w(u),c.add(this.menu.onDidChange(()=>w(this.allEntries()))),c.add(l.onDidChangeValue(E=>{if(E===""){w(u);return}const C={commandID:"workbench.action.files.newFile",commandArgs:{languageId:void 0,viewType:void 0,fileName:E},title:(0,b.localize)(8,null,E),group:"file",from:r};w([C,...u])})),c.add(l.onDidAccept(async E=>{const C=l.selectedItems[0];d(!!C),l.hide(),C&&await this.commandService.executeCommand(C.commandID,C.commandArgs)})),c.add(l.onDidHide(()=>{l.dispose(),c.dispose(),d(!1)})),c.add(l.onDidTriggerItemButton(E=>{l.hide(),this.commandService.executeCommand("workbench.action.openGlobalKeybindings",E.item.commandID),d(!1)})),l.show(),p}};s=a=fe([O(0,m.IQuickInputService),O(1,f.IContextKeyService),O(2,T.ICommandService),O(3,v.IKeybindingService),O(4,D.IMenuService)],s),S.Registry.as(h.Extensions.Workbench).registerWorkbenchContribution(s,3),D.MenuRegistry.appendMenuItem(D.MenuId.NewFile,{group:"file",command:{id:"workbench.action.files.newUntitledFile",title:(0,b.localize)(9,null)},order:1})}),define(Q[3958],Y([1,0,5,16,45,3758,1325,121]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const v=f.ExtensionsRegistry.registerExtensionPoint(T.viewsWelcomeExtensionPointDescriptor);let m=class{constructor(h){h.createInstance(D.ViewsWelcomeContribution,v)}};m=fe([O(0,t.IInstantiationService)],m),y.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(m,3)}),define(Q[3959],Y([1,0,68,9,49,38,111,11,100,52,16,45,3466,3668,4,5]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogHandlerContribution=void 0;let o=class extends i.Disposable{constructor(p,c,l,n,g,w,E,C,I){super(),this.configurationService=p,this.dialogService=c,this.browserImpl=new a.BrowserDialogHandler(l,n,g,w,E,C),this.nativeImpl=new r.NativeDialogHandler(l,I,E,C),this.model=this.dialogService.model,this._register(this.model.onWillShowDialog(()=>{this.currentDialog||this.processDialogs()})),this.processDialogs()}async processDialogs(){for(;this.model.dialogs.length;){this.currentDialog=this.model.dialogs[0];let p;if(this.currentDialog.args.confirmArgs){const c=this.currentDialog.args.confirmArgs;p=this.useCustomDialog||c?.confirmation.custom?await this.browserImpl.confirm(c.confirmation):await this.nativeImpl.confirm(c.confirmation)}else if(this.currentDialog.args.inputArgs){const c=this.currentDialog.args.inputArgs;p=await this.browserImpl.input(c.input)}else if(this.currentDialog.args.promptArgs){const c=this.currentDialog.args.promptArgs;p=this.useCustomDialog||c?.prompt.custom?await this.browserImpl.prompt(c.prompt):await this.nativeImpl.prompt(c.prompt)}else this.useCustomDialog?await this.browserImpl.about():await this.nativeImpl.about();this.currentDialog.close(p),this.currentDialog=void 0}}get useCustomDialog(){return this.configurationService.getValue("window.dialogStyle")==="custom"}};e.DialogHandlerContribution=o,e.DialogHandlerContribution=o=fe([O(0,y.IConfigurationService),O(1,b.IDialogService),O(2,f.ILogService),O(3,T.ILayoutService),O(4,D.IKeybindingService),O(5,s.IInstantiationService),O(6,m.IProductService),O(7,t.IClipboardService),O(8,v.INativeHostService)],o),S.Registry.as(h.Extensions.Workbench).registerWorkbenchContribution(o,1)}),define(Q[3960],Y([1,0,66,18,139,8,9,16,3193,35,30,335,45,100,111]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeAccessibilityService=void 0;let s=class extends v.AccessibilityService{constructor(d,p,c,l,n,g){super(p,l,c),this._telemetryService=n,this.nativeHostService=g,this.didSendTelemetry=!1,this.shouldAlwaysUnderlineAccessKeys=void 0,this.setAccessibilitySupport(d.window.accessibilitySupport?2:1)}async alwaysUnderlineAccessKeys(){if(!y.isWindows)return!1;if(typeof this.shouldAlwaysUnderlineAccessKeys!="boolean"){const d=await this.nativeHostService.windowsGetStringRegKey("HKEY_CURRENT_USER","Control Panel\\Accessibility\\Keyboard Preference","On");this.shouldAlwaysUnderlineAccessKeys=d==="1"}return this.shouldAlwaysUnderlineAccessKeys}setAccessibilitySupport(d){super.setAccessibilitySupport(d),!this.didSendTelemetry&&d===2&&(this._telemetryService.publicLog2("accessibility",{enabled:!0}),this.didSendTelemetry=!0)}};e.NativeAccessibilityService=s,e.NativeAccessibilityService=s=fe([O(0,b.INativeWorkbenchEnvironmentService),O(1,D.IContextKeyService),O(2,T.IConfigurationService),O(3,i.ILayoutService),O(4,S.ITelemetryService),O(5,r.INativeHostService)],s),(0,m.registerSingleton)(t.IAccessibilityService,s,1);let o=class{constructor(d,p,c){const l=()=>{p.isScreenReaderOptimized()&&d.write(c.argvResource,[{path:["force-renderer-accessibility"],value:!0}],!0)};l(),p.onDidChangeScreenReaderOptimized(l)}};o=fe([O(0,h.IJSONEditingService),O(1,t.IAccessibilityService),O(2,b.INativeWorkbenchEnvironmentService)],o),y.isLinux&&f.Registry.as(a.Extensions.Workbench).registerWorkbenchContribution(o,2)}),define(Q[1381],Y([1,0,3066,95,24,112,35,23,86,5,13,8,49,16,45,28,11,52,426,65,115,81,149]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";var g,w;Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionBisectService=void 0,e.IExtensionBisectService=(0,m.createDecorator)("IExtensionBisectService");class E{static fromJSON(A){if(A)try{const k=JSON.parse(A);return new E(k.extensions,k.low,k.high,k.mid)}catch{return}}constructor(A,k,L,R=(k+L)/2|0){this.extensions=A,this.low=k,this.high=L,this.mid=R}}let C=class{static{g=this}static{this._storageKey="extensionBisectState"}constructor(A,k,L){this._storageService=k,this._envService=L,this._disabled=new Map;const R=k.get(g._storageKey,-1);if(this._state=E.fromJSON(R),this._state){const{mid:M,high:N}=this._state;for(let P=0;P<this._state.extensions.length;P++){const x=P>=M&&P<N;this._disabled.set(this._state.extensions[P],x)}A.warn("extension BISECT active",[...this._disabled])}}get isActive(){return!!this._state}get disabledCount(){return this._state?this._state.high-this._state.mid:-1}isDisabledByBisect(A){return!this._state||(0,D.isResolverExtension)(A.manifest,this._envService.remoteAuthority)||this._isEnabledInEnv(A)?!1:this._disabled.get(A.identifier.id)??!1}_isEnabledInEnv(A){return Array.isArray(this._envService.enableExtensions)&&this._envService.enableExtensions.some(k=>(0,c.areSameExtensions)({id:k},A.identifier))}async start(A){if(this._state)throw new Error("invalid state");const k=A.map(R=>R.identifier.id),L=new E(k,0,k.length,0);this._storageService.store(g._storageKey,JSON.stringify(L),-1,1),await this._storageService.flush()}async next(A){if(!this._state)throw new Error("invalid state");if(A&&this._state.mid===0&&this._state.high===this._state.extensions.length)return{bad:!0,id:""};if(this._state.low===this._state.high-1)return await this.reset(),{id:this._state.extensions[this._state.low],bad:A};const k=new E(this._state.extensions,A?this._state.low:this._state.mid,A?this._state.mid:this._state.high);this._storageService.store(g._storageKey,JSON.stringify(k),-1,1),await this._storageService.flush()}async reset(){this._storageService.remove(g._storageKey,-1),await this._storageService.flush()}};C=g=fe([O(0,o.ILogService),O(1,b.IStorageService),O(2,p.IWorkbenchEnvironmentService)],C),(0,T.registerSingleton)(e.IExtensionBisectService,C,1);let I=class{static{w=this}static{this.ctxIsBisectActive=new h.RawContextKey("isExtensionBisectActive",!1)}constructor(A,k,L,R){this._extensionBisectService=k,this._notificationService=L,this._commandService=R,k.isActive&&(w.ctxIsBisectActive.bindTo(A).set(!0),this._showBisectPrompt())}_showBisectPrompt(){const A={label:(0,t.localize)(0,null),run:()=>this._commandService.executeCommand("extension.bisect.next",!1)},k={label:(0,t.localize)(1,null),run:()=>this._commandService.executeCommand("extension.bisect.next",!0)},L={label:"Stop Bisect",run:()=>this._commandService.executeCommand("extension.bisect.stop")},R=this._extensionBisectService.disabledCount===1?(0,t.localize)(2,null):(0,t.localize)(3,null,this._extensionBisectService.disabledCount);this._notificationService.prompt(f.Severity.Info,R,[A,k,L],{sticky:!0,priority:f.NotificationPriority.URGENT})}};I=w=fe([O(0,h.IContextKeyService),O(1,e.IExtensionBisectService),O(2,f.INotificationService),O(3,s.ICommandService)],I),r.Registry.as(i.Extensions.Workbench).registerWorkbenchContribution(I,3),(0,S.registerAction2)(class extends S.Action2{constructor(){super({id:"extension.bisect.start",title:{value:(0,t.localize)(4,null),original:"Start Extension Bisect"},category:l.Categories.Help,f1:!0,precondition:I.ctxIsBisectActive.negate(),menu:{id:S.MenuId.ViewContainerTitle,when:h.ContextKeyExpr.equals("viewContainer","workbench.view.extensions"),group:"2_enablement",order:4}})}async run(_){const A=_.get(a.IDialogService),k=_.get(v.IHostService),L=_.get(y.IExtensionManagementService),R=_.get(n.IWorkbenchExtensionEnablementService),M=_.get(e.IExtensionBisectService),N=(await L.getInstalled(1)).filter(x=>R.isEnabled(x));(await A.confirm({message:(0,t.localize)(5,null),detail:(0,t.localize)(6,null,2+Math.log2(N.length)|0),primaryButton:(0,t.localize)(7,null)})).confirmed&&(await M.start(N),k.reload())}}),(0,S.registerAction2)(class extends S.Action2{constructor(){super({id:"extension.bisect.next",title:{value:(0,t.localize)(8,null),original:"Continue Extension Bisect"},category:l.Categories.Help,f1:!0,precondition:I.ctxIsBisectActive})}async run(_,A){const k=_.get(a.IDialogService),L=_.get(v.IHostService),R=_.get(e.IExtensionBisectService),M=_.get(u.IProductService),N=_.get(y.IGlobalExtensionEnablementService),P=_.get(d.IWorkbenchIssueService);if(!R.isActive)return;if(A===void 0){const F=await this._checkForBad(k,R);if(F===null)return;A=F}if(A===void 0){await R.reset(),L.reload();return}const x=await R.next(A);if(!x){L.reload();return}if(x.bad)await k.info((0,t.localize)(9,null),(0,t.localize)(10,null,M.nameShort));else{const F=await k.confirm({type:f.Severity.Info,message:(0,t.localize)(11,null),primaryButton:(0,t.localize)(12,null),cancelButton:(0,t.localize)(13,null),detail:(0,t.localize)(14,null,x.id),checkbox:{label:(0,t.localize)(15,null),checked:!0}});F.checkboxChecked&&await N.disableExtension({id:x.id},void 0),F.confirmed&&await P.openReporter({extensionId:x.id})}await R.reset(),L.reload()}async _checkForBad(_,A){const{result:k}=await _.prompt({type:f.Severity.Info,message:(0,t.localize)(16,null),detail:(0,t.localize)(17,null,A.disabledCount),buttons:[{label:(0,t.localize)(18,null),run:()=>!1},{label:(0,t.localize)(19,null),run:()=>!0},{label:(0,t.localize)(20,null),run:()=>{}}],cancelButton:{label:(0,t.localize)(21,null),run:()=>null}});return k}}),(0,S.registerAction2)(class extends S.Action2{constructor(){super({id:"extension.bisect.stop",title:{value:(0,t.localize)(22,null),original:"Stop Extension Bisect"},category:l.Categories.Help,f1:!0,precondition:I.ctxIsBisectActive})}async run(_){const A=_.get(e.IExtensionBisectService),k=_.get(v.IHostService);await A.reset(),k.reload()}})}),define(Q[1382],Y([1,0,3072,4,10,9,49,95,149,115,5,23,24,459,86,44,112,35,16,45,13,43,72,171,1150,31,30]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C){"use strict";var I;Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionUrlHandler=void 0;const _=5*60*1e3,A=30*1e3,k="extensionUrlHandler.urlToHandle",L="extensions.confirmedUriHandlerExtensionIds",R="extensionUrlHandler.confirmedExtensions";function M(W){return/^[a-z0-9][a-z0-9\-]*\.[a-z0-9][a-z0-9\-]*$/i.test(W)}class N{get extensions(){const z=this.storageService.get(R,0,"[]");try{return JSON.parse(z)}catch{return[]}}constructor(z){this.storageService=z}has(z){return this.extensions.indexOf(z)>-1}add(z){this.set([...this.extensions,z])}set(z){this.storageService.store(R,JSON.stringify(z),0,1)}}e.IExtensionUrlHandler=(0,S.createDecorator)("extensionUrlHandler");let P=class{constructor(z,B,K,H,U,G,$,ie,J,j,ee,X,te){this.extensionService=B,this.dialogService=K,this.notificationService=H,this.extensionManagementService=U,this.extensionEnablementService=G,this.hostService=$,this.galleryService=ie,this.storageService=J,this.configurationService=j,this.progressService=ee,this.telemetryService=X,this.extensionUrlTrustService=te,this.extensionHandlers=new Map,this.uriBuffer=new Map,this.userTrustedExtensionsStorage=new N(J);const Z=setInterval(()=>this.garbageCollect(),A),se=this.storageService.get(k,1);se&&(this.storageService.remove(k,1),this.handleURL(b.URI.revive(JSON.parse(se)),{trusted:!0})),this.disposable=(0,y.combinedDisposable)(z.registerHandler(this),(0,y.toDisposable)(()=>clearInterval(Z)));const re=x.cache;setTimeout(()=>re.forEach(([oe,le])=>this.handleURL(oe,le)))}async handleURL(z,B){if(!M(z.authority))return!1;const K=z.authority;this.telemetryService.publicLog2("uri_invoked/start",{extensionId:K});const H=this.extensionHandlers.get(o.ExtensionIdentifier.toKey(K));let U;if(H)U=H.extensionDisplayName;else{const j=await this.extensionService.getExtension(K);if(j)U=j.displayName||j.name;else return await this.handleUnhandledURL(z,{id:K},B),!0}if(!(B?.trusted||(B?.originalUrl?await this.extensionUrlTrustService.isExtensionUrlTrusted(K,B.originalUrl):!1)||this.didUserTrustExtension(o.ExtensionIdentifier.toKey(K)))){let j=z.toString(!1);if(j.length>80){let X=Math.min(j.length/2,80)-5;j=`${j.substring(0,X)} ... ${j.substring(j.length-X)}`}const ee=await this.dialogService.confirm({message:(0,t.localize)(0,null,K),checkbox:{label:(0,t.localize)(1,null)},detail:`${U} (${K}) wants to open a URI: ${j}`,primaryButton:(0,t.localize)(2,null)});if(!ee.confirmed)return this.telemetryService.publicLog2("uri_invoked/cancel",{extensionId:K}),!0;ee.checkboxChecked&&this.userTrustedExtensionsStorage.add(o.ExtensionIdentifier.toKey(K))}const $=this.extensionHandlers.get(o.ExtensionIdentifier.toKey(K));if($)return H?!1:await this.handleURLByExtension(K,$,z,B);const ie=new Date().getTime();let J=this.uriBuffer.get(o.ExtensionIdentifier.toKey(K));return J||(J=[],this.uriBuffer.set(o.ExtensionIdentifier.toKey(K),J)),J.push({timestamp:ie,uri:z}),await this.extensionService.activateByEvent(`onUri:${o.ExtensionIdentifier.toKey(K)}`,1),!0}registerExtensionHandler(z,B){this.extensionHandlers.set(o.ExtensionIdentifier.toKey(z),B);const K=this.uriBuffer.get(o.ExtensionIdentifier.toKey(z))||[];for(const{uri:H}of K)this.handleURLByExtension(z,B,H);this.uriBuffer.delete(o.ExtensionIdentifier.toKey(z))}unregisterExtensionHandler(z){this.extensionHandlers.delete(o.ExtensionIdentifier.toKey(z))}async handleURLByExtension(z,B,K,H){return this.telemetryService.publicLog2("uri_invoked/end",{extensionId:o.ExtensionIdentifier.toKey(z)}),await B.handleURL(K,H)}async handleUnhandledURL(z,B,K){let U=(await this.extensionManagementService.getInstalled()).find(G=>(0,m.areSameExtensions)(G.identifier,B));if(!U){let G;try{G=(await this.galleryService.getExtensions([B],E.CancellationToken.None))[0]??void 0}catch{return}if(!G)return;if(this.telemetryService.publicLog2("uri_invoked/install_extension/start",{extensionId:B.id}),!(await this.dialogService.confirm({message:(0,t.localize)(3,null,G.displayName||G.name),detail:`${G.displayName||G.name} (${B.id}) wants to open a URL: ${z.toString()}`,primaryButton:(0,t.localize)(4,null)})).confirmed){this.telemetryService.publicLog2("uri_invoked/install_extension/cancel",{extensionId:B.id});return}this.telemetryService.publicLog2("uri_invoked/install_extension/accept",{extensionId:B.id});try{U=await this.progressService.withProgress({location:15,title:(0,t.localize)(5,null,G.displayName||G.name)},()=>this.extensionManagementService.installFromGallery(G))}catch(ie){this.notificationService.error(ie);return}}if(!this.extensionEnablementService.isEnabled(U)){if(this.telemetryService.publicLog2("uri_invoked/enable_extension/start",{extensionId:B.id}),!(await this.dialogService.confirm({message:(0,t.localize)(6,null,U.manifest.displayName||U.manifest.name),detail:`${U.manifest.displayName||U.manifest.name} (${B.id}) wants to open a URL: ${z.toString()}`,primaryButton:(0,t.localize)(7,null)})).confirmed){this.telemetryService.publicLog2("uri_invoked/enable_extension/cancel",{extensionId:B.id});return}this.telemetryService.publicLog2("uri_invoked/enable_extension/accept",{extensionId:B.id}),await this.extensionEnablementService.setEnablement([U],8)}if(this.extensionService.canAddExtension((0,s.toExtensionDescription)(U)))await this.waitUntilExtensionIsAdded(B),await this.handleURL(z,{...K,trusted:!0});else{if(this.telemetryService.publicLog2("uri_invoked/activate_extension/start",{extensionId:B.id}),!(await this.dialogService.confirm({message:(0,t.localize)(8,null,U.manifest.displayName||U.manifest.name),detail:`${U.manifest.displayName||U.manifest.name} (${B.id}) wants to open a URL: ${z.toString()}`,primaryButton:(0,t.localize)(9,null)})).confirmed){this.telemetryService.publicLog2("uri_invoked/activate_extension/cancel",{extensionId:B.id});return}this.telemetryService.publicLog2("uri_invoked/activate_extension/accept",{extensionId:B.id}),this.storageService.store(k,JSON.stringify(z.toJSON()),1,1),await this.hostService.reload()}}async waitUntilExtensionIsAdded(z){await this.extensionService.getExtension(z.id)||await new Promise((B,K)=>{const H=this.extensionService.onDidChangeExtensions(async()=>{try{await this.extensionService.getExtension(z.id)&&(H.dispose(),B())}catch(U){K(U)}})})}garbageCollect(){const z=new Date().getTime(),B=new Map;this.uriBuffer.forEach((K,H)=>{K=K.filter(({timestamp:U})=>z-U<_),K.length>0&&B.set(H,K)}),this.uriBuffer=B}didUserTrustExtension(z){return this.userTrustedExtensionsStorage.has(z)?!0:this.getConfirmedTrustedExtensionIdsFromConfiguration().indexOf(z)>-1}getConfirmedTrustedExtensionIdsFromConfiguration(){const z=this.configurationService.getValue(L);return Array.isArray(z)?z:[]}dispose(){this.disposable.dispose(),this.extensionHandlers.clear(),this.uriBuffer.clear()}};P=fe([O(0,r.IURLService),O(1,s.IExtensionService),O(2,T.IDialogService),O(3,h.INotificationService),O(4,f.IExtensionManagementService),O(5,v.IWorkbenchExtensionEnablementService),O(6,i.IHostService),O(7,f.IExtensionGalleryService),O(8,a.IStorageService),O(9,D.IConfigurationService),O(10,n.IProgressService),O(11,C.ITelemetryService),O(12,w.IExtensionUrlTrustService)],P),(0,u.registerSingleton)(e.IExtensionUrlHandler,P,0);let x=class{static{I=this}static{this._cache=[]}static get cache(){I.disposable.dispose();const z=I._cache;return I._cache=[],z}constructor(z){I.disposable=z.registerHandler(this)}async handleURL(z,B){return M(z.authority)?(I._cache.push([z,B]),!0):!1}};x=I=fe([O(0,r.IURLService)],x),d.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(x,2);class V extends c.Action2{constructor(){super({id:"workbench.extensions.action.manageAuthorizedExtensionURIs",title:{value:(0,t.localize)(10,null),original:"Manage Authorized Extension URIs..."},category:{value:(0,t.localize)(11,null),original:"Extensions"},menu:{id:c.MenuId.CommandPalette,when:g.IsWebContext.toNegated()}})}async run(z){const B=z.get(a.IStorageService),K=z.get(l.IQuickInputService),H=new N(B),U=H.extensions.map($=>({label:$,picked:!0}));if(U.length===0){await K.pick([{label:(0,t.localize)(12,null)}]);return}const G=await K.pick(U,{canPickMany:!0});G&&H.set(G.map($=>$.label))}}(0,c.registerAction2)(V)}),define(Q[3961],Y([1,0,53,60,459,1382,112]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadUrls=void 0;class f{constructor(S,h,a,r){this.proxy=S,this.handle=h,this.extensionId=a,this.extensionDisplayName=r}handleURL(S,h){return T.ExtensionIdentifier.equals(this.extensionId,S.authority)?Promise.resolve(this.proxy.$handleExternalUri(this.handle,S)).then(()=>!0):Promise.resolve(!1)}}let v=class{constructor(S,h,a){this.urlService=h,this.extensionUrlHandler=a,this.handlers=new Map,this.proxy=S.getProxy(t.ExtHostContext.ExtHostUrls)}$registerUriHandler(S,h,a){const r=new f(this.proxy,S,h,a),i=this.urlService.registerHandler(r);return this.handlers.set(S,{extensionId:h,disposable:i}),this.extensionUrlHandler.registerExtensionHandler(h,r),Promise.resolve(void 0)}$unregisterUriHandler(S){const h=this.handlers.get(S);if(!h)return Promise.resolve(void 0);const{extensionId:a,disposable:r}=h;return this.extensionUrlHandler.unregisterExtensionHandler(a),this.handlers.delete(S),r.dispose(),Promise.resolve(void 0)}async $createAppUri(S){return this.urlService.create(S)}dispose(){this.handlers.forEach(({disposable:S})=>S.dispose()),this.handlers.clear()}};e.MainThreadUrls=v,e.MainThreadUrls=v=fe([(0,y.extHostNamedCustomer)(t.MainContext.MainThreadUrls),O(1,b.IURLService),O(2,D.IExtensionUrlHandler)],v)}),define(Q[3962],Y([1,0,14,62,15,6,4,42,18,1102,145,10,59,673,674,3078,9,861,1151,61,11,100,23,52,30,231,116,39,139,744,3746,957,44,86,89,536]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostMessagePortCommunication=e.NativeLocalProcessExtensionHost=e.ExtensionHostProcess=void 0;class x{get onStdout(){return this._extensionHostStarter.onDynamicStdout(this._id)}get onStderr(){return this._extensionHostStarter.onDynamicStderr(this._id)}get onMessage(){return this._extensionHostStarter.onDynamicMessage(this._id)}get onExit(){return this._extensionHostStarter.onDynamicExit(this._id)}constructor(z,B){this._extensionHostStarter=B,this._id=z}start(z){return this._extensionHostStarter.start(this._id,z)}enableInspectPort(){return this._extensionHostStarter.enableInspectPort(this._id)}kill(){return this._extensionHostStarter.kill(this._id)}}e.ExtensionHostProcess=x;let F=class{constructor(z,B,K,H,U,G,$,ie,J,j,ee,X,te,Z,se,re,oe,le,ne){this.runningLocation=z,this.startup=B,this._initDataProvider=K,this._contextService=H,this._notificationService=U,this._nativeHostService=G,this._lifecycleService=$,this._environmentService=ie,this._userDataProfilesService=J,this._telemetryService=j,this._logService=ee,this._loggerService=X,this._labelService=te,this._extensionHostDebugService=Z,this._hostService=se,this._productService=re,this._shellEnvironmentService=oe,this._extensionHostStarter=le,this._configurationService=ne,this.remoteAuthority=null,this.extensions=new R.ExtensionHostExtensions,this._onExit=new D.Emitter,this.onExit=this._onExit.event,this._onDidSetInspectPort=new D.Emitter,this._toDispose=new T.DisposableStore;const ce=(0,P.parseExtensionDevOptions)(this._environmentService);this._isExtensionDevHost=ce.isExtensionDevHost,this._isExtensionDevDebug=ce.isExtensionDevDebug,this._isExtensionDevDebugBrk=ce.isExtensionDevDebugBrk,this._isExtensionDevTestFromCli=ce.isExtensionDevTestFromCli,this._terminating=!1,this._inspectPort=null,this._extensionHostProcess=null,this._messageProtocol=null,this._toDispose.add(this._onExit),this._toDispose.add(this._lifecycleService.onWillShutdown(ae=>this._onWillShutdown(ae))),this._toDispose.add(this._extensionHostDebugService.onClose(ae=>{this._isExtensionDevHost&&this._environmentService.debugExtensionHost.debugId===ae.sessionId&&this._nativeHostService.closeWindow()})),this._toDispose.add(this._extensionHostDebugService.onReload(ae=>{this._isExtensionDevHost&&this._environmentService.debugExtensionHost.debugId===ae.sessionId&&this._hostService.reload()}))}dispose(){this._terminating||(this._terminating=!0,this._toDispose.dispose())}start(){if(this._terminating)throw new b.CancellationError;return this._messageProtocol||(this._messageProtocol=this._start()),this._messageProtocol}async _start(){const z=this._toDispose.add(new V(this._logService));return this._startWithCommunication(z)}async _startWithCommunication(z){const[B,K,H,U]=await Promise.all([this._extensionHostStarter.createExtensionHost(),z.prepare(),this._tryFindDebugPort(),this._shellEnvironmentService.getShellEnv()]);this._extensionHostProcess=new x(B.id,this._extensionHostStarter);const G=f.mixin(U,{VSCODE_AMD_ENTRYPOINT:"vs/workbench/api/node/extensionHostProcess",VSCODE_HANDLES_UNCAUGHT_ERRORS:!0});this._environmentService.debugExtensionHost.env&&f.mixin(G,this._environmentService.debugExtensionHost.env),(0,m.removeDangerousEnvVariables)(G),this._isExtensionDevHost&&delete G.VSCODE_CODE_CACHE_PATH;const $={responseWindowId:this._environmentService.window.id,responseChannel:"vscode:startExtensionHostMessagePortResult",responseNonce:(0,a.generateUuid)(),env:G,detached:!!v.isWindows,execArgv:void 0,silent:!0};H!==0?$.execArgv=["--nolazy",(this._isExtensionDevDebugBrk?"--inspect-brk=":"--inspect=")+H]:$.execArgv=["--inspect-port=0"],this._environmentService.extensionTestsLocationURI&&$.execArgv.unshift("--expose-gc"),this._environmentService.args["prof-v8-extensions"]&&$.execArgv.unshift("--prof"),$.execArgv.unshift("--dns-result-order=ipv4first");const ie=this._handleProcessOutputStream(this._extensionHostProcess.onStdout),J=this._handleProcessOutputStream(this._extensionHostProcess.onStderr),j=D.Event.any(D.Event.map(ie.event,Z=>({data:`%c${Z}`,format:[""]})),D.Event.map(J.event,Z=>({data:`%c${Z}`,format:["color: red"]})));D.Event.debounce(j,(Z,se)=>Z?{data:Z.data+se.data,format:[...Z.format,...se.format]}:{data:se.data,format:se.format},100)(Z=>{const se=Z.data&&Z.data.match(/ws:\/\/([^\s]+:(\d+)\/[^\s]+)/);se?(!this._environmentService.isBuilt&&!this._isExtensionDevTestFromCli&&console.log(`%c[Extension Host] %cdebugger inspector at devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=${se[1]}`,"color: blue","color:"),this._inspectPort||(this._inspectPort=Number(se[2]),this._onDidSetInspectPort.fire())):this._isExtensionDevTestFromCli||(console.group("Extension Host"),console.log(Z.data,...Z.format),console.groupEnd())}),this._extensionHostProcess.onExit(({code:Z,signal:se})=>this._onExtHostProcessExit(Z,se)),H&&(this._isExtensionDevHost&&H&&this._isExtensionDevDebug&&this._environmentService.debugExtensionHost.debugId&&this._extensionHostDebugService.attachSession(this._environmentService.debugExtensionHost.debugId,H),this._inspectPort=H,this._onDidSetInspectPort.fire());let X;(!this._environmentService.isBuilt&&!this._environmentService.remoteAuthority||this._isExtensionDevHost)&&(X=setTimeout(()=>{this._logService.error(`[LocalProcessExtensionHost]: Extension host did not start in 10 seconds (debugBrk: ${this._isExtensionDevDebugBrk})`);const Z=this._isExtensionDevDebugBrk?s.localize(0,null):s.localize(1,null);this._notificationService.prompt(n.Severity.Warning,Z,[{label:s.localize(2,null),run:()=>this._hostService.reload()}],{sticky:!0,priority:n.NotificationPriority.URGENT})},1e4));const te=await z.establishProtocol(K,this._extensionHostProcess,$);return await this._performHandshake(te),clearTimeout(X),te}async _tryFindDebugPort(){if(typeof this._environmentService.debugExtensionHost.port!="number")return 0;const z=this._environmentService.debugExtensionHost.port,B=await this._nativeHostService.findFreePort(z,10,5e3,2048);return this._isExtensionDevTestFromCli||(B?(B!==z&&console.warn(`%c[Extension Host] %cProvided debugging port ${z} is not free, using ${B} instead.`,"color: blue","color:"),this._isExtensionDevDebugBrk?console.warn(`%c[Extension Host] %cSTOPPED on first line for debugging on port ${B}`,"color: blue","color:"):console.info(`%c[Extension Host] %cdebugger listening on port ${B}`,"color: blue","color:")):console.warn("%c[Extension Host] %cCould not find a free port for debugging","color: blue","color:")),B||0}_performHandshake(z){return new Promise((B,K)=>{let H;const U=()=>{H=setTimeout(()=>{K("The local extension host took longer than 60s to send its ready message.")},6e4)},G=()=>{clearTimeout(H)};U();const $=z.onMessage(ie=>{if((0,L.isMessageOfType)(ie,1)){G(),this._createExtHostInitData().then(J=>{U(),z.send(y.VSBuffer.fromString(JSON.stringify(J)))});return}if((0,L.isMessageOfType)(ie,0)){G(),$.dispose(),B();return}console.error("received unexpected message during handshake phase from the extension host: ",ie)})})}async _createExtHostInitData(){const z=await this._initDataProvider.getInitData(),B=this._contextService.getWorkspace(),K=this.extensions.set(z.allExtensions,z.myExtensions);return{commit:this._productService.commit,version:this._productService.version,vscodeVersion:this._productService.vscodeVersion,quality:this._productService.quality,parentPid:0,environment:{isExtensionDevelopmentDebug:this._isExtensionDevDebug,appRoot:this._environmentService.appRoot?h.URI.file(this._environmentService.appRoot):void 0,appName:this._productService.nameLong,appHost:this._productService.embedderIdentifier||"desktop",appUriScheme:this._productService.urlProtocol,extensionTelemetryLogResource:this._environmentService.extHostTelemetryLogFile,isExtensionTelemetryLoggingOnly:(0,E.isLoggingOnly)(this._productService,this._environmentService),appLanguage:v.language,extensionDevelopmentLocationURI:this._environmentService.extensionDevelopmentLocationURI,extensionTestsLocationURI:this._environmentService.extensionTestsLocationURI,globalStorageHome:this._userDataProfilesService.defaultProfile.globalStorageHome,workspaceStorageHome:this._environmentService.workspaceStorageHome,extensionLogLevel:this._environmentService.extensionLogLevel},workspace:this._contextService.getWorkbenchState()===1?void 0:{configuration:B.configuration??void 0,id:B.id,name:this._labelService.getWorkspaceLabel(B),isUntitled:B.configuration?(0,I.isUntitledWorkspace)(B.configuration,this._environmentService):!1,transient:B.transient},remote:{authority:this._environmentService.remoteAuthority,connectionData:null,isRemote:!1},consoleForward:{includeStack:!this._isExtensionDevTestFromCli&&(this._isExtensionDevHost||!this._environmentService.isBuilt||this._productService.quality!=="stable"||this._environmentService.verbose),logNative:!this._isExtensionDevTestFromCli&&this._isExtensionDevHost},allExtensions:K.toAdd,activationEvents:K.addActivationEvents,myExtensions:K.myToAdd,telemetryInfo:{sessionId:this._telemetryService.sessionId,machineId:this._telemetryService.machineId,firstSessionDate:this._telemetryService.firstSessionDate,msftInternal:this._telemetryService.msftInternal},logLevel:this._logService.getLevel(),loggers:[...this._loggerService.getRegisteredLoggers()],logsLocation:this._environmentService.extHostLogsPath,autoStart:this.startup===1,uiKind:L.UIKind.Desktop}}_onExtHostProcessExit(z,B){this._terminating||this._onExit.fire([z,B])}_handleProcessOutputStream(z){let B="",K=!1;const H=new D.Emitter;return z(U=>{B+=U;const G=B.split(/\r?\n/g);B=G.pop(),B.length>1e4&&(G.push(B),B="");for(const $ of G)K?$==="END_NATIVE_LOG"&&(K=!1):$==="START_NATIVE_LOG"?K=!0:$.length&&H.fire($+` `)}),H}async enableInspectPort(){return typeof this._inspectPort=="number"?!0:!this._extensionHostProcess||!await this._extensionHostProcess.enableInspectPort()?!1:(await Promise.race([D.Event.toPromise(this._onDidSetInspectPort.event),(0,t.timeout)(1e3)]),typeof this._inspectPort=="number")}getInspectPort(){return this._inspectPort??void 0}_onWillShutdown(z){this._isExtensionDevHost&&!this._isExtensionDevTestFromCli&&!this._isExtensionDevDebug&&this._environmentService.debugExtensionHost.debugId&&(this._extensionHostDebugService.terminateSession(this._environmentService.debugExtensionHost.debugId),z.join((0,t.timeout)(100),{id:"join.extensionDevelopment",label:s.localize(3,null)}))}};e.NativeLocalProcessExtensionHost=F,e.NativeLocalProcessExtensionHost=F=fe([O(3,I.IWorkspaceContextService),O(4,n.INotificationService),O(5,l.INativeHostService),O(6,N.ILifecycleService),O(7,_.INativeWorkbenchEnvironmentService),O(8,C.IUserDataProfilesService),O(9,w.ITelemetryService),O(10,c.ILogService),O(11,c.ILoggerService),O(12,p.ILabelService),O(13,u.IExtensionHostDebugService),O(14,M.IHostService),O(15,g.IProductService),O(16,A.IShellEnvironmentService),O(17,d.IExtensionHostStarter),O(18,o.IConfigurationService)],F);let V=class extends T.Disposable{constructor(z){super(),this._logService=z}async prepare(){}establishProtocol(z,B,K){(0,k.writeExtHostConnection)(new k.MessagePortExtHostConnection,K.env);const H=(0,i.acquirePort)(void 0,K.responseChannel,K.responseNonce);return new Promise((U,G)=>{const $=setTimeout(()=>{G("The local extension host took longer than 60s to connect.")},6e4);H.then(J=>{this._register((0,T.toDisposable)(()=>{J.close()})),clearTimeout($);const j=new r.BufferedEmitter;J.onmessage=ee=>j.fire(y.VSBuffer.wrap(ee.data)),J.start(),U({onMessage:j.event,send:ee=>J.postMessage(ee.buffer)})});const ie=S.StopWatch.create(!1);B.start(K).then(()=>{const J=ie.elapsed();v.isCI&&this._logService.info(`IExtensionHostStarter.start() took ${J} ms.`)},J=>{G(J)})})}};e.ExtHostMessagePortCommunication=V,e.ExtHostMessagePortCommunication=V=fe([O(0,c.ILogService)],V)}),define(Q[3963],Y([1,0,3083,63,10,965,89,52,23,24,35,41,22,1144]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrityService=void 0;class s{static{this.KEY="integrityService"}constructor(d){this.storageService=d,this.value=this._read()}_read(){const d=this.storageService.get(s.KEY,-1);if(!d)return null;try{return JSON.parse(d)}catch{return null}}get(){return this.value}set(d){this.value=d,this.storageService.store(s.KEY,JSON.stringify(this.value),-1,1)}}let o=i=class{constructor(d,p,c,l,n,g){this.notificationService=d,this.lifecycleService=c,this.openerService=l,this.productService=n,this.checksumService=g,this._storage=new s(p),this._isPurePromise=this._isPure(),this.isPure().then(w=>{w.isPure||this._prompt()})}_prompt(){const d=this._storage.get();if(d?.dontShowPrompt&&d.commit===this.productService.commit)return;const p=this.productService.checksumFailMoreInfoUrl,c=(0,t.localize)(0,null,this.productService.nameShort);p?this.notificationService.prompt(y.default.Warning,c,[{label:(0,t.localize)(1,null),run:()=>this.openerService.open(b.URI.parse(p))},{label:(0,t.localize)(2,null),isSecondary:!0,run:()=>this._storage.set({dontShowPrompt:!0,commit:this.productService.commit})}],{sticky:!0,priority:v.NotificationPriority.URGENT}):this.notificationService.notify({severity:y.default.Warning,message:c,sticky:!0})}isPure(){return this._isPurePromise}async _isPure(){const d=this.productService.checksums||{};await this.lifecycleService.when(4);const p=await Promise.all(Object.keys(d).map(l=>this._resolve(l,d[l])));let c=!0;for(let l=0,n=p.length;l<n;l++)if(!p[l].isPure){c=!1;break}return{isPure:c,proof:p}}async _resolve(d,p){const c=a.FileAccess.asFileUri(d);try{const l=await this.checksumService.checksum(c);return i._createChecksumPair(c,l,p)}catch{return i._createChecksumPair(c,"",p)}}static _createChecksumPair(d,p,c){return{uri:d,actual:p,expected:c,isPure:p===c}}};e.IntegrityService=o,e.IntegrityService=o=i=fe([O(0,v.INotificationService),O(1,m.IStorageService),O(2,T.ILifecycleService),O(3,h.IOpenerService),O(4,f.IProductService),O(5,r.IChecksumService)],o),(0,S.registerSingleton)(D.IIntegrityService,o,1)}),define(Q[3964],Y([1,0,6,14,4,89,11,173,24]),function(q,e,t,y,b,D,T,f,v){"use strict";var m;Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractLifecycleService=void 0;let S=class extends b.Disposable{static{m=this}static{this.LAST_SHUTDOWN_REASON_KEY="lifecyle.lastShutdownReason"}get startupKind(){return this._startupKind}get phase(){return this._phase}constructor(a,r){super(),this.logService=a,this.storageService=r,this._onBeforeShutdown=this._register(new t.Emitter),this.onBeforeShutdown=this._onBeforeShutdown.event,this._onWillShutdown=this._register(new t.Emitter),this.onWillShutdown=this._onWillShutdown.event,this._onDidShutdown=this._register(new t.Emitter),this.onDidShutdown=this._onDidShutdown.event,this._onBeforeShutdownError=this._register(new t.Emitter),this.onBeforeShutdownError=this._onBeforeShutdownError.event,this._onShutdownVeto=this._register(new t.Emitter),this.onShutdownVeto=this._onShutdownVeto.event,this._phase=1,this.phaseWhen=new Map,this._startupKind=this.resolveStartupKind(),this.storageService.onWillSaveState(i=>{i.reason===v.WillSaveStateReason.SHUTDOWN&&this.storageService.store(m.LAST_SHUTDOWN_REASON_KEY,this.shutdownReason,1,1)})}resolveStartupKind(){const a=this.storageService.getNumber(m.LAST_SHUTDOWN_REASON_KEY,1);this.storageService.remove(m.LAST_SHUTDOWN_REASON_KEY,1);let r;switch(a){case 3:r=3;break;case 4:r=4;break;default:r=1}return this.logService.trace(`[lifecycle] starting up (startup kind: ${r})`),r}set phase(a){if(a<this.phase)throw new Error("Lifecycle cannot go backwards");if(this._phase===a)return;this.logService.trace(`lifecycle: phase changed (value: ${a})`),this._phase=a,(0,f.mark)(`code/LifecyclePhase/${(0,D.LifecyclePhaseToString)(a)}`);const r=this.phaseWhen.get(this._phase);r&&(r.open(),this.phaseWhen.delete(this._phase))}async when(a){if(a<=this._phase)return;let r=this.phaseWhen.get(a);r||(r=new y.Barrier,this.phaseWhen.set(a,r)),await r.wait()}};e.AbstractLifecycleService=S,e.AbstractLifecycleService=S=m=fe([O(0,T.ILogService),O(1,v.IStorageService)],S)}),define(Q[3965],Y([1,0,1157,89,24,274,11,3964,35,100,14,132,31]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.NativeLifecycleService=void 0;let i=class extends f.AbstractLifecycleService{static{r=this}static{this.BEFORE_SHUTDOWN_WARNING_DELAY=5e3}static{this.WILL_SHUTDOWN_WARNING_DELAY=800}constructor(o,u,d){super(d,u),this.nativeHostService=o,this.registerListeners()}registerListeners(){const o=this.nativeHostService.windowId;D.ipcRenderer.on("vscode:onBeforeUnload",async(u,d)=>{this.logService.trace(`[lifecycle] onBeforeUnload (reason: ${d.reason})`),await this.handleBeforeShutdown(d.reason)?(this.logService.trace("[lifecycle] onBeforeUnload prevented via veto"),this._onShutdownVeto.fire(),D.ipcRenderer.send(d.cancelChannel,o)):(this.logService.trace("[lifecycle] onBeforeUnload continues without veto"),this.shutdownReason=d.reason,D.ipcRenderer.send(d.okChannel,o))}),D.ipcRenderer.on("vscode:onWillUnload",async(u,d)=>{this.logService.trace(`[lifecycle] onWillUnload (reason: ${d.reason})`),await this.handleWillShutdown(d.reason),this._onDidShutdown.fire(),D.ipcRenderer.send(d.replyChannel,o)})}async handleBeforeShutdown(o){const u=this.logService,d=[],p=new Set;let c,l;this._onBeforeShutdown.fire({reason:o,veto(g,w){d.push(g),g===!0?u.info(`[lifecycle]: Shutdown was prevented (id: ${w})`):g instanceof Promise&&(p.add(w),g.then(E=>{E===!0&&u.info(`[lifecycle]: Shutdown was prevented (id: ${w})`)}).finally(()=>p.delete(w)))},finalVeto(g,w){if(!c)c=g,l=w;else throw new Error(`[lifecycle]: Final veto is already defined (id: ${w})`)}});const n=(0,S.disposableTimeout)(()=>{u.warn(`[lifecycle] onBeforeShutdown is taking a long time, pending operations: ${Array.from(p).join(", ")}`)},r.BEFORE_SHUTDOWN_WARNING_DELAY);try{let g=await(0,t.handleVetos)(d,w=>this.handleBeforeShutdownError(w,o));if(g)return g;if(c)try{p.add(l),g=await c(),g&&u.info(`[lifecycle]: Shutdown was prevented by final veto (id: ${l})`)}catch(w){g=!0,this.handleBeforeShutdownError(w,o)}return g}finally{n.dispose()}}handleBeforeShutdownError(o,u){this.logService.error(`[lifecycle]: Error during before-shutdown phase (error: ${(0,h.toErrorMessage)(o)})`),this._onBeforeShutdownError.fire({reason:u,error:o})}async handleWillShutdown(o){const u=[],d=new Set,p=new a.CancellationTokenSource;this._onWillShutdown.fire({reason:o,token:p.token,joiners:()=>Array.from(d.values()),join(l,n){u.push(l),d.add(n),l.finally(()=>d.delete(n))},force:()=>{p.dispose(!0)}});const c=(0,S.disposableTimeout)(()=>{this.logService.warn(`[lifecycle] onWillShutdown is taking a long time, pending operations: ${Array.from(d).map(l=>l.id).join(", ")}`)},r.WILL_SHUTDOWN_WARNING_DELAY);try{await(0,S.raceCancellation)(S.Promises.settled(u),p.token)}catch(l){this.logService.error(`[lifecycle]: Error during will-shutdown phase (error: ${(0,h.toErrorMessage)(l)})`)}finally{c.dispose()}}shutdown(){return this.nativeHostService.closeWindow()}};e.NativeLifecycleService=i,e.NativeLifecycleService=i=r=fe([O(0,m.INativeHostService),O(1,b.IStorageService),O(2,T.ILogService)],i),(0,v.registerSingleton)(y.ILifecycleService,i,0)}),define(Q[542],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IActiveLanguagePackService=e.ILocaleService=void 0,e.ILocaleService=(0,t.createDecorator)("localizationService"),e.IActiveLanguagePackService=(0,t.createDecorator)("activeLanguageService")}),define(Q[3966],Y([1,0,2767,43,31,4,13,504,542,118]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClearDisplayLanguageAction=e.ConfigureDisplayLanguageAction=void 0;class S extends T.Action2{static{this.ID="workbench.action.configureLocale"}static{this.LABEL=(0,t.localize)(0,null)}constructor(){super({id:S.ID,title:{original:"Configure Display Language",value:S.LABEL},menu:{id:T.MenuId.CommandPalette}})}async run(r){const i=r.get(f.ILanguagePackService),s=r.get(y.IQuickInputService),o=r.get(v.ILocaleService),u=r.get(m.IExtensionsWorkbenchService),d=await i.getInstalledLanguages(),p=s.createQuickPick();if(p.placeholder=(0,t.localize)(1,null),d?.length){const g=[{type:"separator",label:(0,t.localize)(2,null)}];p.items=g.concat(this.withMoreInfoButton(d))}const c=new D.DisposableStore,l=new b.CancellationTokenSource;c.add(p.onDispose(()=>{l.cancel(),c.dispose()}));const n=new Set(d?.map(g=>g.id)??[]);i.getAvailableLanguages().then(g=>{const w=g.filter(E=>E.id&&!n.has(E.id));w.length&&(p.items=[...p.items,{type:"separator",label:(0,t.localize)(3,null)},...this.withMoreInfoButton(w)]),p.busy=!1}),c.add(p.onDidAccept(async()=>{const g=p.activeItems[0];p.hide(),await o.setLocale(g)})),c.add(p.onDidTriggerItemButton(async g=>{p.hide(),g.item.extensionId&&await u.open(g.item.extensionId)})),p.show(),p.busy=!0}withMoreInfoButton(r){for(const i of r)i.extensionId&&(i.buttons=[{tooltip:(0,t.localize)(4,null),iconClass:"codicon-info"}]);return r}}e.ConfigureDisplayLanguageAction=S;class h extends T.Action2{static{this.ID="workbench.action.clearLocalePreference"}static{this.LABEL=(0,t.localize)(5,null)}constructor(){super({id:h.ID,title:{original:"Clear Display Language Preference",value:h.LABEL},menu:{id:T.MenuId.CommandPalette}})}async run(r){await r.get(v.ILocaleService).clearLocalePreference()}}e.ClearDisplayLanguageAction=h}),define(Q[3967],Y([1,0,4,2766,13,3966,121]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseLocalizationWorkbenchContribution=void 0;class f extends t.Disposable{constructor(){super(),(0,b.registerAction2)(D.ConfigureDisplayLanguageAction),(0,b.registerAction2)(D.ClearDisplayLanguageAction),T.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"localizations",defaultExtensionKind:["ui","workspace"],jsonSchema:{description:(0,y.localize)(0,null),type:"array",default:[],items:{type:"object",required:["languageId","translations"],defaultSnippets:[{body:{languageId:"",languageName:"",localizedLanguageName:"",translations:[{id:"vscode",path:""}]}}],properties:{languageId:{description:(0,y.localize)(1,null),type:"string"},languageName:{description:(0,y.localize)(2,null),type:"string"},localizedLanguageName:{description:(0,y.localize)(3,null),type:"string"},translations:{description:(0,y.localize)(4,null),type:"array",default:[{id:"vscode",path:""}],items:{type:"object",required:["id","path"],properties:{id:{type:"string",description:(0,y.localize)(5,null),pattern:"^((vscode)|([a-z0-9A-Z][a-z0-9A-Z-]*)\\.([a-z0-9A-Z][a-z0-9A-Z-]*))$",patternErrorMessage:(0,y.localize)(6,null)},path:{type:"string",description:(0,y.localize)(7,null)}},defaultSnippets:[{body:{id:"",path:""}}]}}}}}})}}e.BaseLocalizationWorkbenchContribution=f}),define(Q[3968],Y([1,0,504,153]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,y.registerSharedProcessRemoteService)(t.ILanguagePackService,"languagePacks")}),define(Q[475],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showWindowLogActionId=e.windowLogId=void 0,e.windowLogId="rendererLog",e.showWindowLogActionId="workbench.action.showWindowLog"}),define(Q[3969],Y([1,0,2758,13,38,81,28,475]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class v extends y.Action2{constructor(){super({id:"workbench.action.toggleKeybindingsLog",title:{value:t.localize(0,null),original:"Toggle Keyboard Shortcuts Troubleshooting"},category:D.Categories.Developer,f1:!0})}run(S){S.get(b.IKeybindingService).toggleLogging()&&S.get(T.ICommandService).executeCommand(f.showWindowLogActionId)}}(0,y.registerAction2)(v)}),define(Q[3970],Y([1,0,2798,4,16,45,21,176,103,512,68,612,71,148,18,13,224,8,171,48,81,11,28,475]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookClipboardContribution=e.runCutCells=e.runCopyCells=e.runPasteCells=void 0;let w=!1;function E(){w=!w}function C(W,z){w&&W.info(`[NotebookClipboard]: ${z}`)}function I(W){const z=W.get(l.ILogService),B=W.get(T.IEditorService),K=(0,v.getNotebookEditorFromEditorPane)(B.activeEditorPane);if(!K){C(z,"[Revive Webview] No notebook editor found for active editor pane, bypass");return}if(!K.hasEditorFocus()){C(z,"[Revive Webview] Notebook editor is not focused, bypass");return}if(!K.hasWebviewFocus()){C(z,"[Revive Webview] Notebook editor backlayer webview is not focused, bypass");return}const H=K.getInnerWebview();return C(z,"[Revive Webview] Notebook editor backlayer webview is focused"),H}function _(W,z){const B=I(W);return B?(z(B),!0):!1}const A=105;p.UndoCommand.addImplementation(A,"notebook-webview",W=>_(W,z=>z.undo())),p.RedoCommand.addImplementation(A,"notebook-webview",W=>_(W,z=>z.redo())),m.CopyAction?.addImplementation(A,"notebook-webview",W=>_(W,z=>z.copy())),m.PasteAction?.addImplementation(A,"notebook-webview",W=>_(W,z=>z.paste())),m.CutAction?.addImplementation(A,"notebook-webview",W=>_(W,z=>z.cut()));function k(W,z,B){if(!W.hasModel())return!1;const K=W.textModel;if(W.isReadOnly)return!1;const H={kind:a.SelectionStateType.Index,focus:W.getFocus(),selections:W.getSelections()};if(z){const U=W.getCellIndex(z),G=typeof U=="number"?U+1:0;K.applyEdits([{editType:1,index:G,count:0,cells:B.items.map($=>(0,h.cloneNotebookCellTextModel)($))}],!0,H,()=>({kind:a.SelectionStateType.Index,focus:{start:G,end:G+1},selections:[{start:G,end:G+B.items.length}]}),void 0,!0)}else{if(W.getLength()!==0)return!1;K.applyEdits([{editType:1,index:0,count:0,cells:B.items.map(U=>(0,h.cloneNotebookCellTextModel)(U))}],!0,H,()=>({kind:a.SelectionStateType.Index,focus:{start:0,end:1},selections:[{start:1,end:B.items.length+1}]}),void 0,!0)}return!0}e.runPasteCells=k;function L(W,z,B){if(!z.hasModel())return!1;if(z.hasOutputTextSelection())return document.execCommand("copy"),!0;const K=W.get(S.IClipboardService),H=W.get(r.INotebookService),U=z.getSelections();if(B){const ie=z.getCellIndex(B);if(!U.find(j=>j.start<=ie&&ie<j.end))return K.writeText(B.getText()),H.setToCopy([B.model],!0),!0}const G=(0,v.expandCellRangesWithHiddenCells)(z,z.getSelections()),$=(0,v.cellRangeToViewCells)(z,G);return $.length?(K.writeText($.map(ie=>ie.getText()).join(` `)),H.setToCopy($.map(ie=>ie.model),!0),!0):!1}e.runCopyCells=L;function R(W,z,B){if(!z.hasModel()||z.isReadOnly)return!1;const K=z.textModel,H=W.get(S.IClipboardService),U=W.get(r.INotebookService),G=z.getSelections();if(B){const Z=z.getCellIndex(B);if(!G.find(re=>re.start<=Z&&Z<re.end)){H.writeText(B.getText());const re=z.getFocus(),oe=re.end<=Z?re:{start:re.start-1,end:re.end-1},le=G.map(ne=>ne.end<=Z?ne:{start:ne.start-1,end:ne.end-1});return K.applyEdits([{editType:1,index:Z,count:1,cells:[]}],!0,{kind:a.SelectionStateType.Index,focus:z.getFocus(),selections:G},()=>({kind:a.SelectionStateType.Index,focus:oe,selections:le}),void 0,!0),U.setToCopy([B.model],!1),!0}}const $=z.getFocus();if(!G.find(Z=>Z.start<=$.start&&$.end<=Z.end)){const Z=z.cellAt($.start);H.writeText(Z.getText());const se=$.end===z.getLength()?{start:$.start-1,end:$.end-1}:$,re=G.map(oe=>oe.end<=$.start?oe:{start:oe.start-1,end:oe.end-1});return K.applyEdits([{editType:1,index:$.start,count:1,cells:[]}],!0,{kind:a.SelectionStateType.Index,focus:z.getFocus(),selections:G},()=>({kind:a.SelectionStateType.Index,focus:se,selections:re}),void 0,!0),U.setToCopy([Z.model],!1),!0}const J=(0,v.expandCellRangesWithHiddenCells)(z,z.getSelections()),j=(0,v.cellRangeToViewCells)(z,J);if(!j.length)return!1;H.writeText(j.map(Z=>Z.getText()).join(` `));const ee=J.map(Z=>({editType:1,index:Z.start,count:Z.end-Z.start,cells:[]})),X=J[0].start,te=X<K.cells.length-1?X:Math.max(K.cells.length-2,0);return K.applyEdits(ee,!0,{kind:a.SelectionStateType.Index,focus:z.getFocus(),selections:J},()=>({kind:a.SelectionStateType.Index,focus:{start:te,end:te+1},selections:[{start:te,end:te+1}]}),void 0,!0),U.setToCopy(j.map(Z=>Z.model),!1),!0}e.runCutCells=R;let M=class extends y.Disposable{constructor(z){super(),this._editorService=z;const B=105;m.CopyAction&&this._register(m.CopyAction.addImplementation(B,"notebook-clipboard",K=>this.runCopyAction(K))),m.PasteAction&&this._register(m.PasteAction.addImplementation(B,"notebook-clipboard",K=>this.runPasteAction(K))),m.CutAction&&this._register(m.CutAction.addImplementation(B,"notebook-clipboard",K=>this.runCutAction(K)))}_getContext(){const z=(0,v.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane),B=z?.getActiveCell();return{editor:z,activeCell:B}}_focusInsideEmebedMonaco(z){const B=window.getSelection();if(B?.rangeCount!==1)return!1;const K=B.getRangeAt(0);if(K.startContainer===K.endContainer&&K.endOffset-K.startOffset===0)return!1;let H=K.commonAncestorContainer;const U=z.getDomNode();if(!U.contains(H))return!1;for(;H&&H!==U;){if(H.classList&&H.classList.contains("monaco-editor"))return!0;H=H.parentNode}return!1}runCopyAction(z){const B=z.get(l.ILogService),K=document.activeElement;if(K&&["input","textarea"].indexOf(K.tagName.toLowerCase())>=0)return C(B,"[NotebookEditor] focus is on input or textarea element, bypass"),!1;const{editor:H}=this._getContext();return H?this._focusInsideEmebedMonaco(H)?(C(B,"[NotebookEditor] focus is on embed monaco editor, bypass"),!1):(C(B,"[NotebookEditor] run copy actions on notebook model"),L(z,H,void 0)):(C(B,"[NotebookEditor] no active notebook editor, bypass"),!1)}runPasteAction(z){const B=document.activeElement;if(B&&["input","textarea"].indexOf(B.tagName.toLowerCase())>=0)return!1;const H=z.get(r.INotebookService).getToCopy();if(!H)return!1;const{editor:U,activeCell:G}=this._getContext();return U?k(U,G,H):!1}runCutAction(z){const B=document.activeElement;if(B&&["input","textarea"].indexOf(B.tagName.toLowerCase())>=0)return!1;const{editor:K}=this._getContext();return K?R(z,K,void 0):!1}};e.NotebookClipboardContribution=M,e.NotebookClipboardContribution=M=fe([O(0,T.IEditorService)],M),b.Registry.as(D.Extensions.Workbench).registerWorkbenchContribution(M,2);const P="notebook.cell.copy",x="notebook.cell.cut",F="notebook.cell.paste",V="notebook.cell.pasteAbove";(0,s.registerAction2)(class extends o.NotebookCellAction{constructor(){super({id:P,title:(0,t.localize)(0,null),menu:{id:s.MenuId.NotebookCellTitle,when:f.NOTEBOOK_EDITOR_FOCUSED,group:"1_copy"},keybinding:i.isNative?void 0:{primary:2081,win:{primary:2081,secondary:[2067]},when:u.ContextKeyExpr.and(f.NOTEBOOK_EDITOR_FOCUSED,u.ContextKeyExpr.not(d.InputFocusedContextKey)),weight:200}})}async runWithContext(W,z){L(W,z.notebookEditor,z.cell)}}),(0,s.registerAction2)(class extends o.NotebookCellAction{constructor(){super({id:x,title:(0,t.localize)(1,null),menu:{id:s.MenuId.NotebookCellTitle,when:u.ContextKeyExpr.and(f.NOTEBOOK_EDITOR_FOCUSED,f.NOTEBOOK_EDITOR_EDITABLE,f.NOTEBOOK_CELL_EDITABLE),group:"1_copy"},keybinding:i.isNative?void 0:{when:u.ContextKeyExpr.and(f.NOTEBOOK_EDITOR_FOCUSED,u.ContextKeyExpr.not(d.InputFocusedContextKey)),primary:2102,win:{primary:2102,secondary:[1044]},weight:200}})}async runWithContext(W,z){R(W,z.notebookEditor,z.cell)}}),(0,s.registerAction2)(class extends o.NotebookAction{constructor(){super({id:F,title:(0,t.localize)(2,null),menu:{id:s.MenuId.NotebookCellTitle,when:u.ContextKeyExpr.and(f.NOTEBOOK_EDITOR_FOCUSED,f.NOTEBOOK_EDITOR_EDITABLE),group:"1_copy"},keybinding:i.isNative?void 0:{when:u.ContextKeyExpr.and(f.NOTEBOOK_EDITOR_FOCUSED,u.ContextKeyExpr.not(d.InputFocusedContextKey)),primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}})}async runWithContext(W,z){const K=W.get(r.INotebookService).getToCopy();!z.notebookEditor.hasModel()||z.notebookEditor.isReadOnly||K&&k(z.notebookEditor,z.cell,K)}}),(0,s.registerAction2)(class extends o.NotebookCellAction{constructor(){super({id:V,title:(0,t.localize)(3,null),keybinding:{when:u.ContextKeyExpr.and(f.NOTEBOOK_EDITOR_FOCUSED,u.ContextKeyExpr.not(d.InputFocusedContextKey)),primary:3124,weight:o.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}})}async runWithContext(W,z){const K=W.get(r.INotebookService).getToCopy(),H=z.notebookEditor,U=H.textModel;if(H.isReadOnly||!K)return;const G={kind:a.SelectionStateType.Index,focus:H.getFocus(),selections:H.getSelections()},$=z.notebookEditor.getCellIndex(z.cell),ie=$;U.applyEdits([{editType:1,index:$,count:0,cells:K.items.map(J=>(0,h.cloneNotebookCellTextModel)(J))}],!0,G,()=>({kind:a.SelectionStateType.Index,focus:{start:ie,end:ie+1},selections:[{start:ie,end:ie+K.items.length}]}),void 0,!0)}}),(0,s.registerAction2)(class extends s.Action2{constructor(){super({id:"workbench.action.toggleNotebookClipboardLog",title:{value:(0,t.localize)(4,null),original:"Toggle Notebook Clipboard Troubleshooting"},category:c.Categories.Developer,f1:!0})}run(W){E(),w&&W.get(n.ICommandService).executeCommand(g.showWindowLogActionId)}})}),define(Q[3971],Y([1,0,11,4,3090,475,3210]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeLogService=void 0;class f extends T.LogService{constructor(m,S){const h=new y.DisposableStore,a=h.add(m.createLogger(S.logFile,{id:D.windowLogId,name:(0,b.localize)(0,null)}));let r;S.isExtensionDevelopment&&S.extensionTestsLocationURI?r=m.createConsoleMainLogger():r=new t.ConsoleLogger(a.getLevel()),super(a,[r]),this._register(h)}}e.NativeLogService=f}),define(Q[3972],Y([1,0,1162,153]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,y.registerMainProcessRemoteService)(t.IMenubarService,"menubar")}),define(Q[3973],Y([1,0,3091,23,909,4,6,35,34,24]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationService=void 0;let h=class extends D.Disposable{static{S=this}constructor(r){super(),this.storageService=r,this.model=this._register(new b.NotificationsModel),this._onDidAddNotification=this._register(new T.Emitter),this.onDidAddNotification=this._onDidAddNotification.event,this._onDidRemoveNotification=this._register(new T.Emitter),this.onDidRemoveNotification=this._onDidRemoveNotification.event,this._onDidChangeDoNotDisturbMode=this._register(new T.Emitter),this.onDidChangeDoNotDisturbMode=this._onDidChangeDoNotDisturbMode.event,this._doNotDisturbMode=this.storageService.getBoolean(S.DND_SETTINGS_KEY,-1,!1),this.updateDoNotDisturbFilters(),this.registerListeners()}registerListeners(){this._register(this.model.onDidChangeNotification(r=>{switch(r.kind){case 0:case 3:{const i={message:r.item.message.original,severity:r.item.severity,source:typeof r.item.sourceId=="string"&&typeof r.item.source=="string"?{id:r.item.sourceId,label:r.item.source}:r.item.source,priority:r.item.priority};r.kind===0&&this._onDidAddNotification.fire(i),r.kind===3&&this._onDidRemoveNotification.fire(i);break}}}))}static{this.DND_SETTINGS_KEY="notifications.doNotDisturbMode"}get doNotDisturbMode(){return this._doNotDisturbMode}set doNotDisturbMode(r){this._doNotDisturbMode!==r&&(this.storageService.store(S.DND_SETTINGS_KEY,r,-1,1),this._doNotDisturbMode=r,this.updateDoNotDisturbFilters(),this._onDidChangeDoNotDisturbMode.fire())}updateDoNotDisturbFilters(){let r;this._doNotDisturbMode?r=y.NotificationsFilter.ERROR:r=y.NotificationsFilter.OFF,this.model.setFilter(r)}info(r){if(Array.isArray(r)){r.forEach(i=>this.info(i));return}this.model.addNotification({severity:y.Severity.Info,message:r})}warn(r){if(Array.isArray(r)){r.forEach(i=>this.warn(i));return}this.model.addNotification({severity:y.Severity.Warning,message:r})}error(r){if(Array.isArray(r)){r.forEach(i=>this.error(i));return}this.model.addNotification({severity:y.Severity.Error,message:r})}notify(r){const i=new D.DisposableStore;if(r.neverShowAgain){const o=this.toStorageScope(r.neverShowAgain),u=r.neverShowAgain.id;if(this.storageService.getBoolean(u,o))return new y.NoOpNotification;const d=i.add(new v.Action("workbench.notification.neverShowAgain",(0,t.localize)(0,null),void 0,!0,async()=>{s.close(),this.storageService.store(u,!0,o,0)})),p={primary:r.actions?.primary||[],secondary:r.actions?.secondary||[]};r.neverShowAgain.isSecondary?p.secondary=[...p.secondary,d]:p.primary=[d,...p.primary],r.actions=p}const s=this.model.addNotification(r);return T.Event.once(s.onDidClose)(()=>i.dispose()),s}toStorageScope(r){switch(r.scope){case y.NeverShowAgainScope.APPLICATION:return-1;case y.NeverShowAgainScope.PROFILE:return 0;case y.NeverShowAgainScope.WORKSPACE:return 1;default:return-1}}prompt(r,i,s,o){const u=new D.DisposableStore;if(o?.neverShowAgain){const g=this.toStorageScope(o.neverShowAgain),w=o.neverShowAgain.id;if(this.storageService.getBoolean(w,g))return new y.NoOpNotification;const E={label:(0,t.localize)(1,null),run:()=>this.storageService.store(w,!0,g,0),isSecondary:o.neverShowAgain.isSecondary};o.neverShowAgain.isSecondary?s=[...s,E]:s=[E,...s]}let d=!1;const p=[],c=[];s.forEach((g,w)=>{const E=new b.ChoiceAction(`workbench.dialog.choice.${w}`,g);g.isSecondary?c.push(E):p.push(E),u.add(E.onDidRun(()=>{d=!0,g.keepOpen||n.close()})),u.add(E)});const l={primary:p,secondary:c},n=this.notify({severity:r,message:i,actions:l,sticky:o?.sticky,priority:o?.priority});return T.Event.once(n.onDidClose)(()=>{u.dispose(),o&&typeof o.onCancel=="function"&&!d&&o.onCancel()}),n}status(r,i){return this.model.showStatusMessage(r,i)}};e.NotificationService=h,e.NotificationService=h=S=fe([O(0,m.IStorageService)],h),(0,f.registerSingleton)(y.INotificationService,h,1)}),define(Q[543],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineConfigCollapseItemsValues=e.OutlineConfigKeys=e.OutlineTarget=e.IOutlineService=void 0,e.IOutlineService=(0,t.createDecorator)("IOutlineService");var y;(function(T){T[T.OutlinePane=1]="OutlinePane",T[T.Breadcrumbs=2]="Breadcrumbs",T[T.QuickPick=4]="QuickPick"})(y||(e.OutlineTarget=y={}));var b;(function(T){T.icons="outline.icons",T.collapseItems="outline.collapseItems",T.problemsEnabled="outline.problems.enabled",T.problemsColors="outline.problems.colors",T.problemsBadges="outline.problems.badges"})(b||(e.OutlineConfigKeys=b={}));var D;(function(T){T.Collapsed="alwaysCollapse",T.Expanded="alwaysExpand"})(D||(e.OutlineConfigCollapseItemsValues=D={}))}),define(Q[3974],Y([1,0,31,15,6,4,26,39,22,9,718,25,543,41]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbsModel=e.OutlineElement2=e.FileElement=void 0;class i{constructor(d,p){this.uri=d,this.kind=p}}e.FileElement=i;class s{constructor(d,p){this.element=d,this.outline=p}}e.OutlineElement2=s;let o=class{constructor(d,p,c,l,n){this.resource=d,this._workspaceService=l,this._outlineService=n,this._disposables=new D.DisposableStore,this._currentOutline=new D.MutableDisposable,this._outlineDisposables=new D.DisposableStore,this._onDidUpdate=new b.Emitter,this.onDidUpdate=this._onDidUpdate.event,this._cfgFilePath=S.BreadcrumbsConfig.FilePath.bindTo(c),this._cfgSymbolPath=S.BreadcrumbsConfig.SymbolPath.bindTo(c),this._disposables.add(this._cfgFilePath.onDidChange(g=>this._onDidUpdate.fire(this))),this._disposables.add(this._cfgSymbolPath.onDidChange(g=>this._onDidUpdate.fire(this))),this._workspaceService.onDidChangeWorkspaceFolders(this._onDidChangeWorkspaceFolders,this,this._disposables),this._fileInfo=this._initFilePathInfo(d),p&&(this._bindToEditor(p),this._disposables.add(n.onDidChange(()=>this._bindToEditor(p))),this._disposables.add(p.onDidChangeControl(()=>this._bindToEditor(p)))),this._onDidUpdate.fire(this)}dispose(){this._disposables.dispose(),this._cfgFilePath.dispose(),this._cfgSymbolPath.dispose(),this._currentOutline.dispose(),this._outlineDisposables.dispose(),this._onDidUpdate.dispose()}isRelative(){return!!this._fileInfo.folder}getElements(){let d=[];if(this._cfgFilePath.getValue()==="on"?d=d.concat(this._fileInfo.path):this._cfgFilePath.getValue()==="last"&&this._fileInfo.path.length>0&&(d=d.concat(this._fileInfo.path.slice(-1))),this._cfgSymbolPath.getValue()==="off"||!this._currentOutline.value)return d;const p=this._currentOutline.value.config.breadcrumbsDataSource.getBreadcrumbElements();for(let c=this._cfgSymbolPath.getValue()==="last"&&p.length>0?p.length-1:0;c<p.length;c++)d.push(new s(p[c],this._currentOutline.value));return p.length===0&&!this._currentOutline.value.isEmpty&&d.push(new s(this._currentOutline.value,this._currentOutline.value)),d}_initFilePathInfo(d){if((0,r.matchesSomeScheme)(d,v.Schemas.untitled,v.Schemas.data))return{folder:void 0,path:[]};const p={folder:this._workspaceService.getWorkspaceFolder(d)??void 0,path:[]};let c=d;for(;c&&c.path!=="/"&&!(p.folder&&(0,T.isEqual)(p.folder.uri,c));){p.path.unshift(new i(c,p.path.length===0?h.FileKind.FILE:h.FileKind.FOLDER));const l=c.path.length;if(c=(0,T.dirname)(c),c.path.length===l)break}return p.folder&&this._workspaceService.getWorkbenchState()===3&&p.path.unshift(new i(p.folder.uri,h.FileKind.ROOT_FOLDER)),p}_onDidChangeWorkspaceFolders(){this._fileInfo=this._initFilePathInfo(this.resource),this._onDidUpdate.fire(this)}_bindToEditor(d){const p=new t.CancellationTokenSource;this._currentOutline.clear(),this._outlineDisposables.clear(),this._outlineDisposables.add((0,D.toDisposable)(()=>p.dispose(!0))),this._outlineService.createOutline(d,2,p.token).then(c=>{p.token.isCancellationRequested&&(c?.dispose(),c=void 0),this._currentOutline.value=c,this._onDidUpdate.fire(this),c&&this._outlineDisposables.add(c.onDidChange(()=>this._onDidUpdate.fire(this)))}).catch(c=>{this._onDidUpdate.fire(this),(0,y.onUnexpectedError)(c)})}};e.BreadcrumbsModel=o,e.BreadcrumbsModel=o=fe([O(2,m.IConfigurationService),O(3,f.IWorkspaceContextService),O(4,a.IOutlineService)],o)}),define(Q[3975],Y([1,0,6,4,543,45,16,3503,123,506,31,14,15,78,5,27,79,9,2644,688,154,26,74]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let g=class{constructor(I,_){this._editor=I,this._textResourceConfigurationService=_,this._breadcrumbs=[]}getBreadcrumbElements(){return this._breadcrumbs}clear(){this._breadcrumbs=[]}update(I,_){const A=this._computeBreadcrumbs(I,_);this._breadcrumbs=A}_computeBreadcrumbs(I,_){let A=I.getItemEnclosingPosition(_);if(!A)return[];const k=[];for(;A;){k.push(A);const R=A.parent;if(R instanceof m.OutlineModel||R instanceof m.OutlineGroup&&R.parent&&R.parent.children.size===1)break;A=R}const L=[];for(let R=k.length-1;R>=0;R--){const M=k[R];if(this._isFiltered(M))break;L.push(M)}return L.length===0?[]:L}_isFiltered(I){if(!(I instanceof m.OutlineElement))return!1;const _=`breadcrumbs.${f.DocumentSymbolFilter.kindToConfigName[I.symbol.kind]}`;let A;return this._editor&&this._editor.getModel()&&(A=this._editor.getModel().uri),!this._textResourceConfigurationService.getValue(A,_)}};g=fe([O(1,r.ITextResourceConfigurationService)],g);let w=class{get activeElement(){const I=this._editor.getPosition();if(!(!I||!this._outlineModel))return this._outlineModel.getItemEnclosingPosition(I)}constructor(I,_,A,k,L,R,M,N,P,x){this._editor=I,this._languageFeaturesService=k,this._codeEditorService=L,this._outlineModelService=R,this._configurationService=M,this._markerDecorationsService=N,this._disposables=new y.DisposableStore,this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event,this._outlineDisposables=new y.DisposableStore,this.outlineKind="documentSymbols",this._breadcrumbsDataSource=new g(I,P);const F=new f.DocumentSymbolVirtualDelegate,V=[new f.DocumentSymbolGroupRenderer,x.createInstance(f.DocumentSymbolRenderer,!0)],W={getChildren:U=>U instanceof m.OutlineElement||U instanceof m.OutlineGroup?U.children.values():U===this&&this._outlineModel?this._outlineModel.children.values():[]},z=new f.DocumentSymbolComparator,B=P.getValue(I.getModel()?.uri,"outline.collapseItems"),K={collapseByDefault:_===2||_===1&&B==="alwaysCollapse",expandOnlyOnTwistieClick:!0,multipleSelectionSupport:!1,identityProvider:new f.DocumentSymbolIdentityProvider,keyboardNavigationLabelProvider:new f.DocumentSymbolNavigationLabelProvider,accessibilityProvider:new f.DocumentSymbolAccessibilityProvider((0,d.localize)(0,null)),filter:_===1?x.createInstance(f.DocumentSymbolFilter,"outline"):_===2?x.createInstance(f.DocumentSymbolFilter,"breadcrumbs"):void 0};this.config={breadcrumbsDataSource:this._breadcrumbsDataSource,delegate:F,renderers:V,treeDataSource:W,comparator:z,options:K,quickPickDataSource:{getQuickPickElements:()=>{throw new Error("not implemented")}}},this._disposables.add(k.documentSymbolProvider.onDidChange(U=>this._createOutline())),this._disposables.add(this._editor.onDidChangeModel(U=>this._createOutline())),this._disposables.add(this._editor.onDidChangeModelLanguage(U=>this._createOutline()));const H=new h.TimeoutTimer;this._disposables.add(H),this._disposables.add(this._editor.onDidChangeModelContent(U=>{const G=this._editor.getModel();if(G){const $=R.getDebounceValue(G);H.cancelAndSet(()=>this._createOutline(U),$)}})),this._disposables.add(this._editor.onDidDispose(()=>this._outlineDisposables.clear())),this._createOutline().finally(()=>A.open())}dispose(){this._disposables.dispose(),this._outlineDisposables.dispose()}get isEmpty(){return!this._outlineModel||m.TreeElement.empty(this._outlineModel)}get uri(){return this._outlineModel?.uri}async reveal(I,_,A){const k=m.OutlineModel.get(I);!k||!(I instanceof m.OutlineElement)||await this._codeEditorService.openCodeEditor({resource:k.uri,options:{..._,selection:s.Range.collapseToStart(I.symbol.selectionRange),selectionRevealType:3}},this._editor,A)}preview(I){if(!(I instanceof m.OutlineElement))return y.Disposable.None;const{symbol:_}=I;this._editor.revealRangeInCenterIfOutsideViewport(_.range,0);const A=this._editor.createDecorationsCollection([{range:_.range,options:{description:"document-symbols-outline-range-highlight",className:"rangeHighlight",isWholeLine:!0}}]);return(0,y.toDisposable)(()=>A.clear())}captureViewState(){const I=this._editor.saveViewState();return(0,y.toDisposable)(()=>{I&&this._editor.restoreViewState(I)})}async _createOutline(I){if(this._outlineDisposables.clear(),I||this._setOutlineModel(void 0),!this._editor.hasModel())return;const _=this._editor.getModel();if(!this._languageFeaturesService.documentSymbolProvider.has(_))return;const A=new S.CancellationTokenSource,k=_.getVersionId(),L=new h.TimeoutTimer;this._outlineDisposables.add(L),this._outlineDisposables.add((0,y.toDisposable)(()=>A.dispose(!0)));try{const R=await this._outlineModelService.getOrCreate(_,A.token);if(A.token.isCancellationRequested)return;if(m.TreeElement.empty(R)||!this._editor.hasModel()){this._setOutlineModel(R);return}if(I&&this._outlineModel&&_.getLineCount()>=25){const M=m.TreeElement.size(R),N=_.getValueLength(),P=M/N,x=m.TreeElement.size(this._outlineModel),F=N-I.changes.reduce((W,z)=>W+z.rangeLength,0),V=x/F;if((P<=V*.5||P>=V*1.5)&&!await(0,h.raceCancellation)((0,h.timeout)(2e3).then(()=>!0),A.token,!1))return}this._applyMarkersToOutline(R),this._outlineDisposables.add(this._markerDecorationsService.onDidChangeMarker(M=>{(0,l.isEqual)(R.uri,M.uri)&&(this._applyMarkersToOutline(R),this._onDidChange.fire({}))})),this._outlineDisposables.add(this._configurationService.onDidChangeConfiguration(M=>{M.affectsConfiguration("outline.problems.enabled")&&(this._configurationService.getValue("outline.problems.enabled")?this._applyMarkersToOutline(R):R.updateMarker([]),this._onDidChange.fire({})),M.affectsConfiguration("outline")&&this._onDidChange.fire({}),M.affectsConfiguration("breadcrumbs")&&this._editor.hasModel()&&(this._breadcrumbsDataSource.update(R,this._editor.getPosition()),this._onDidChange.fire({}))})),this._outlineDisposables.add(this._configurationService.onDidChangeConfiguration(M=>{M.affectsConfiguration("outline.icons")&&this._onDidChange.fire({}),M.affectsConfiguration("outline")&&this._onDidChange.fire({})})),this._outlineDisposables.add(this._editor.onDidChangeCursorPosition(M=>{L.cancelAndSet(()=>{!_.isDisposed()&&k===_.getVersionId()&&this._editor.hasModel()&&(this._breadcrumbsDataSource.update(R,this._editor.getPosition()),this._onDidChange.fire({affectOnlyActiveElement:!0}))},150)})),this._setOutlineModel(R)}catch(R){this._setOutlineModel(void 0),(0,a.onUnexpectedError)(R)}}_applyMarkersToOutline(I){if(!I||!this._configurationService.getValue("outline.problems.enabled"))return;const _=[];for(const[A,k]of this._markerDecorationsService.getLiveMarkers(I.uri))(k.severity===c.MarkerSeverity.Error||k.severity===c.MarkerSeverity.Warning)&&_.push({...A,severity:k.severity});I.updateMarker(_)}_setOutlineModel(I){const _=this._editor.getPosition();!_||!I?(this._outlineModel=void 0,this._breadcrumbsDataSource.clear()):(this._outlineModel?.merge(I)||(this._outlineModel=I),this._breadcrumbsDataSource.update(I,_)),this._onDidChange.fire({})}};w=fe([O(3,n.ILanguageFeaturesService),O(4,o.ICodeEditorService),O(5,m.IOutlineModelService),O(6,u.IConfigurationService),O(7,p.IMarkerDecorationsService),O(8,r.ITextResourceConfigurationService),O(9,i.IInstantiationService)],w);let E=class{constructor(I){const _=I.registerOutlineCreator(this);this.dispose=()=>_.dispose()}matches(I){const _=I.getControl();return(0,v.isCodeEditor)(_)||(0,v.isDiffEditor)(_)}async createOutline(I,_,A){const k=I.getControl();let L;if((0,v.isCodeEditor)(k)?L=k:(0,v.isDiffEditor)(k)&&(L=k.getModifiedEditor()),!L)return;const R=new h.Barrier,M=L.invokeWithinContext(N=>N.get(i.IInstantiationService).createInstance(w,L,_,R));return await R.wait(),M}};E=fe([O(0,b.IOutlineService)],E),T.Registry.as(D.Extensions.Workbench).registerWorkbenchContribution(E,4)}),define(Q[969],Y([1,0,2647,43,21,16,287,3385,9,4,14,31,13,570,128,15,543,123,70,506,74]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.GotoSymbolQuickAccessProvider=void 0;let n=class extends f.AbstractGotoSymbolQuickAccessProvider{static{l=this}constructor(E,C,I,_,A,k){super(_,k,{openSideBySideDirection:()=>this.configuration.openSideBySideDirection}),this.editorService=E,this.editorGroupService=C,this.configurationService=I,this.outlineService=A,this.onDidActiveTextEditorControlChange=this.editorService.onDidActiveEditorChange}get configuration(){const E=this.configurationService.getValue().workbench?.editor;return{openEditorPinned:!E?.enablePreviewFromQuickOpen||!E?.enablePreview,openSideBySideDirection:E?.openSideBySideDirection}}get activeTextEditorControl(){if(!(0,u.isCompositeEditor)(this.editorService.activeEditorPane?.getControl()))return this.editorService.activeTextEditorControl}gotoLocation(E,C){if((C.keyMods.alt||this.configuration.openEditorPinned&&C.keyMods.ctrlCmd||C.forceSideBySide)&&this.editorService.activeEditor){E.restoreViewState?.();const I={selection:C.range,pinned:C.keyMods.ctrlCmd||this.configuration.openEditorPinned,preserveFocus:C.preserveFocus};this.editorGroupService.sideGroup.openEditor(this.editorService.activeEditor,I)}else super.gotoLocation(E,C)}static{this.SYMBOL_PICKS_TIMEOUT=8e3}async getSymbolPicks(E,C,I,_,A){return!await Promise.race([this.waitForLanguageSymbolRegistry(E,_),(0,S.timeout)(l.SYMBOL_PICKS_TIMEOUT)])||A.isCancellationRequested?[]:this.doGetSymbolPicks(this.getDocumentSymbols(E,A),(0,r.prepareQuery)(C),I,A)}provideWithoutTextEditor(E){return this.canPickWithOutlineService()?this.doGetOutlinePicks(E):super.provideWithoutTextEditor(E)}canPickWithOutlineService(){return this.editorService.activeEditorPane?this.outlineService.canCreateOutline(this.editorService.activeEditorPane):!1}doGetOutlinePicks(E){const C=this.editorService.activeEditorPane;if(!C)return m.Disposable.None;const I=new h.CancellationTokenSource,_=new m.DisposableStore;return _.add((0,m.toDisposable)(()=>I.dispose(!0))),E.busy=!0,this.outlineService.createOutline(C,4,I.token).then(A=>{if(!A)return;if(I.token.isCancellationRequested){A.dispose();return}_.add(A);const k=A.captureViewState();_.add((0,m.toDisposable)(()=>{E.selectedItems.length===0&&k.dispose()}));const L=A.config.quickPickDataSource.getQuickPickElements(),R=L.map((P,x)=>({kind:0,index:x,score:0,label:P.label,description:P.description,ariaLabel:P.ariaLabel,iconClasses:P.iconClasses}));_.add(E.onDidAccept(()=>{E.hide();const[P]=E.selectedItems;P&&L[P.index]&&A.reveal(L[P.index].element,{},!1)}));const M=()=>{const P=R.filter(x=>{if(E.value==="@")return x.score=0,x.highlights=void 0,!0;const F=(0,i.fuzzyScore)(E.value,E.value.toLowerCase(),1,x.label,x.label.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return F?(x.score=F[1],x.highlights={label:(0,i.createMatches)(F)},!0):!1});if(P.length===0){const x=(0,t.localize)(0,null);E.items=[{label:x,index:-1,kind:14}],E.ariaLabel=x}else E.items=P};M(),_.add(E.onDidChangeValue(M));const N=new m.MutableDisposable;_.add(N),_.add(E.onDidChangeActive(()=>{const[P]=E.activeItems;P&&L[P.index]?N.value=A.preview(L[P.index].element):N.clear()}))}).catch(A=>{(0,s.onUnexpectedError)(A),E.hide()}).finally(()=>{E.busy=!1}),_}};e.GotoSymbolQuickAccessProvider=n,e.GotoSymbolQuickAccessProvider=n=l=fe([O(0,b.IEditorService),O(1,d.IEditorGroupsService),O(2,v.IConfigurationService),O(3,c.ILanguageFeaturesService),O(4,o.IOutlineService),O(5,p.IOutlineModelService)],n);class g extends a.Action2{static{this.ID="workbench.action.gotoSymbol"}constructor(){super({id:g.ID,title:{value:(0,t.localize)(1,null),mnemonicTitle:(0,t.localize)(2,null),original:"Go to Symbol in Editor..."},f1:!0,keybinding:{when:void 0,weight:200,primary:3117},menu:[{id:a.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:1}]})}run(E){E.get(y.IQuickInputService).quickAccess.show(n.PREFIX,{itemActivation:y.ItemActivation.NONE})}}(0,a.registerAction2)(g),D.Registry.as(T.Extensions.Quickaccess).registerQuickAccessProvider({ctor:n,prefix:f.AbstractGotoSymbolQuickAccessProvider.PREFIX,contextKey:"inFileSymbolsPicker",placeholder:(0,t.localize)(3,null),helpEntries:[{description:(0,t.localize)(4,null),prefix:f.AbstractGotoSymbolQuickAccessProvider.PREFIX,commandId:g.ID,commandCenterOrder:40},{description:(0,t.localize)(5,null),prefix:f.AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY}]})}),define(Q[3976],Y([1,0,4,204,35,543,6]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class f{constructor(){this._factories=new y.LinkedList,this._onDidChange=new T.Emitter,this.onDidChange=this._onDidChange.event}canCreateOutline(m){for(const S of this._factories)if(S.matches(m))return!0;return!1}async createOutline(m,S,h){for(const a of this._factories)if(a.matches(m))return await a.createOutline(m,S,h)}registerOutlineCreator(m){const S=this._factories.push(m);return this._onDidChange.fire(),(0,t.toDisposable)(()=>{S(),this._onDidChange.fire()})}}(0,b.registerSingleton)(D.IOutlineService,f,1)}),define(Q[237],Y([1,0,6,16,8,5]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ACTIVE_OUTPUT_CHANNEL_CONTEXT=e.Extensions=e.OutputChannelUpdateMode=e.IOutputService=e.CONTEXT_OUTPUT_SCROLL_LOCK=e.CONTEXT_ACTIVE_LOG_OUTPUT=e.CONTEXT_IN_OUTPUT=e.OUTPUT_VIEW_ID=e.LOG_MODE_ID=e.LOG_SCHEME=e.LOG_MIME=e.OUTPUT_MODE_ID=e.OUTPUT_SCHEME=e.OUTPUT_MIME=void 0,e.OUTPUT_MIME="text/x-code-output",e.OUTPUT_SCHEME="output",e.OUTPUT_MODE_ID="Log",e.LOG_MIME="text/x-code-log-output",e.LOG_SCHEME="log",e.LOG_MODE_ID="log",e.OUTPUT_VIEW_ID="workbench.panel.output",e.CONTEXT_IN_OUTPUT=new b.RawContextKey("inOutput",!1),e.CONTEXT_ACTIVE_LOG_OUTPUT=new b.RawContextKey("activeLogOutput",!1),e.CONTEXT_OUTPUT_SCROLL_LOCK=new b.RawContextKey("outputView.scrollLock",!1),e.IOutputService=(0,D.createDecorator)("outputService");var T;(function(v){v[v.Append=1]="Append",v[v.Replace=2]="Replace",v[v.Clear=3]="Clear"})(T||(e.OutputChannelUpdateMode=T={})),e.Extensions={OutputChannels:"workbench.contributions.outputChannels"};class f{constructor(){this.channels=new Map,this._onDidRegisterChannel=new t.Emitter,this.onDidRegisterChannel=this._onDidRegisterChannel.event,this._onDidRemoveChannel=new t.Emitter,this.onDidRemoveChannel=this._onDidRemoveChannel.event}registerChannel(m){this.channels.has(m.id)||(this.channels.set(m.id,m),this._onDidRegisterChannel.fire(m.id))}getChannels(){const m=[];return this.channels.forEach(S=>m.push(S)),m}getChannel(m){return this.channels.get(m)}removeChannel(m){this.channels.delete(m),this._onDidRemoveChannel.fire(m)}}y.Registry.add(e.Extensions.OutputChannels,new f),e.ACTIVE_OUTPUT_CHANNEL_CONTEXT=new b.RawContextKey("activeOutputChannel","")}),define(Q[3977],Y([1,0,16,237,53,60,10,4,6,46,17]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadOutputService=void 0;let a=class extends f.Disposable{static{h=this}static{this._extensionIdPool=new Map}constructor(i,s,o){super(),this._outputService=s,this._viewsService=o,this._proxy=i.getProxy(b.ExtHostContext.ExtHostOutputService);const u=()=>{const d=this._viewsService.isViewVisible(y.OUTPUT_VIEW_ID)?this._outputService.getActiveChannel():void 0;this._proxy.$setVisibleChannel(d?d.id:null)};this._register(v.Event.any(this._outputService.onActiveOutputChannel,v.Event.filter(this._viewsService.onDidChangeViewVisibility,({id:d})=>d===y.OUTPUT_VIEW_ID))(()=>u())),u()}async $register(i,s,o,u){const d=(h._extensionIdPool.get(u)||0)+1;h._extensionIdPool.set(u,d);const p=`extension-output-${u}-#${d}-${i}`,c=T.URI.revive(s);return t.Registry.as(y.Extensions.OutputChannels).registerChannel({id:p,label:i,file:c,log:!1,languageId:o,extensionId:u}),this._register((0,f.toDisposable)(()=>this.$dispose(p))),p}async $update(i,s,o){const u=this._getChannel(i);u&&(s===y.OutputChannelUpdateMode.Append?u.update(s):(0,S.isNumber)(o)&&u.update(s,o))}async $reveal(i,s){const o=this._getChannel(i);o&&this._outputService.showChannel(o.id,s)}async $close(i){if(this._viewsService.isViewVisible(y.OUTPUT_VIEW_ID)){const s=this._outputService.getActiveChannel();s&&i===s.id&&this._viewsService.closeView(y.OUTPUT_VIEW_ID)}}async $dispose(i){this._getChannel(i)?.dispose()}_getChannel(i){return this._outputService.getChannel(i)}};e.MainThreadOutputService=a,e.MainThreadOutputService=a=h=fe([(0,D.extHostNamedCustomer)(b.MainContext.MainThreadOutputService),O(1,y.IOutputService),O(2,m.IViewsService)],a)}),define(Q[3978],Y([1,0,2771,34,11,43,10,25,65,26,21,237,231,1345,32,37,4]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenWindowSessionLogFileAction=e.SetLogLevelAction=void 0;let u=class extends y.Action{static{this.ID="workbench.action.setLogLevel"}static{this.TITLE={value:t.localize(0,null),original:"Set Log Level..."}}constructor(c,l,n,g,w,E){super(c,l),this.quickInputService=n,this.loggerService=g,this.outputService=w,this.defaultLogLevelsService=E}async run(){const c=await this.selectLogLevelOrChannel();c!==null&&((0,b.isLogLevel)(c)?this.loggerService.setLogLevel(c):await this.setLogLevelForChannel(c))}async selectLogLevelOrChannel(){const c=await this.defaultLogLevelsService.getDefaultLogLevels(),l=[],n=[],g=this.loggerService.getLogLevel();for(const E of this.outputService.getChannelDescriptors()){if(!E.log||!E.file||E.id===a.telemetryLogId||E.id===a.extensionTelemetryLogChannelId)continue;const C=this.loggerService.getLogLevel(E.file)??g,I={id:E.id,resource:E.file,label:E.label,description:C!==g?this.getLabel(C):void 0,extensionId:E.extensionId};E.extensionId?l.push(I):n.push(I)}const w=[];return w.push({type:"separator",label:t.localize(1,null)}),w.push(...this.getLogLevelEntries(c.default,this.loggerService.getLogLevel(),!0)),l.length&&(w.push({type:"separator",label:t.localize(2,null)}),w.push(...l.sort((E,C)=>E.label.localeCompare(C.label)))),w.push({type:"separator",label:t.localize(3,null)}),w.push(...n.sort((E,C)=>E.label.localeCompare(C.label))),new Promise((E,C)=>{const I=new o.DisposableStore,_=this.quickInputService.createQuickPick();_.placeholder=t.localize(4,null),_.items=w;let A;I.add(_.onDidTriggerItemButton(k=>{_.hide(),this.defaultLogLevelsService.setDefaultLogLevel(k.item.level)})),I.add(_.onDidAccept(k=>{A=_.selectedItems[0],_.hide()})),I.add(_.onDidHide(()=>{const k=A?A.level??A:null;I.dispose(),E(k)})),_.show()})}async setLogLevelForChannel(c){const l=await this.defaultLogLevelsService.getDefaultLogLevels(),n=l.extensions.find(E=>E[0]===c.extensionId?.toLowerCase())?.[1]??l.default,g=this.loggerService.getLogLevel(c.resource)??n,w=this.getLogLevelEntries(n,g,!!c.extensionId);return new Promise((E,C)=>{const I=new o.DisposableStore,_=this.quickInputService.createQuickPick();_.placeholder=c?t.localize(5,null,c?.label):t.localize(6,null),_.items=w,_.activeItems=[w[this.loggerService.getLogLevel()]];let A;I.add(_.onDidTriggerItemButton(k=>{_.hide(),this.defaultLogLevelsService.setDefaultLogLevel(k.item.level,c.extensionId)})),I.add(_.onDidAccept(k=>{A=_.selectedItems[0],_.hide()})),I.add(_.onDidHide(()=>{A&&this.loggerService.setLogLevel(c.resource,A.level),I.dispose(),E()})),_.show()})}getLogLevelEntries(c,l,n){const g=n?{iconClass:s.ThemeIcon.asClassName(i.Codicon.checkAll),tooltip:t.localize(7,null)}:void 0;return[{label:this.getLabel(b.LogLevel.Trace,l),level:b.LogLevel.Trace,description:this.getDescription(b.LogLevel.Trace,c),buttons:g&&c!==b.LogLevel.Trace?[g]:void 0},{label:this.getLabel(b.LogLevel.Debug,l),level:b.LogLevel.Debug,description:this.getDescription(b.LogLevel.Debug,c),buttons:g&&c!==b.LogLevel.Debug?[g]:void 0},{label:this.getLabel(b.LogLevel.Info,l),level:b.LogLevel.Info,description:this.getDescription(b.LogLevel.Info,c),buttons:g&&c!==b.LogLevel.Info?[g]:void 0},{label:this.getLabel(b.LogLevel.Warning,l),level:b.LogLevel.Warning,description:this.getDescription(b.LogLevel.Warning,c),buttons:g&&c!==b.LogLevel.Warning?[g]:void 0},{label:this.getLabel(b.LogLevel.Error,l),level:b.LogLevel.Error,description:this.getDescription(b.LogLevel.Error,c),buttons:g&&c!==b.LogLevel.Error?[g]:void 0},{label:this.getLabel(b.LogLevel.Off,l),level:b.LogLevel.Off,description:this.getDescription(b.LogLevel.Off,c),buttons:g&&c!==b.LogLevel.Off?[g]:void 0}]}getLabel(c,l){let n;switch(c){case b.LogLevel.Trace:n=t.localize(8,null);break;case b.LogLevel.Debug:n=t.localize(9,null);break;case b.LogLevel.Info:n=t.localize(10,null);break;case b.LogLevel.Warning:n=t.localize(11,null);break;case b.LogLevel.Error:n=t.localize(12,null);break;case b.LogLevel.Off:n=t.localize(13,null);break}return c===l?`$(check) ${n}`:n}getDescription(c,l){return l===c?t.localize(14,null):void 0}};e.SetLogLevelAction=u,e.SetLogLevelAction=u=fe([O(2,D.IQuickInputService),O(3,b.ILoggerService),O(4,h.IOutputService),O(5,r.IDefaultLogLevelsService)],u);let d=class extends y.Action{static{this.ID="workbench.action.openSessionLogFile"}static{this.TITLE={value:t.localize(15,null),original:"Open Window Log File (Session)..."}}constructor(c,l,n,g,w,E){super(c,l),this.environmentService=n,this.fileService=g,this.quickInputService=w,this.editorService=E}async run(){const c=await this.quickInputService.pick(this.getSessions().then(l=>l.map((n,g)=>({id:n.toString(),label:(0,m.basename)(n),description:g===0?t.localize(16,null):void 0}))),{canPickMany:!1,placeHolder:t.localize(17,null)});if(c){const l=await this.quickInputService.pick(this.getLogFiles(T.URI.parse(c.id)).then(n=>n.map(g=>({id:g.toString(),label:(0,m.basename)(g)}))),{canPickMany:!1,placeHolder:t.localize(18,null)});if(l)return this.editorService.openEditor({resource:T.URI.parse(l.id),options:{pinned:!0}}).then(()=>{})}}async getSessions(){const c=this.environmentService.logsHome.with({scheme:this.environmentService.logFile.scheme}),l=[c],n=await this.fileService.resolve((0,m.dirname)(c));return n.children&&l.push(...n.children.filter(g=>!(0,m.isEqual)(g.resource,c)&&g.isDirectory&&/^\d{8}T\d{6}$/.test(g.name)).sort().reverse().map(g=>g.resource)),l}async getLogFiles(c){const l=await this.fileService.resolve(c);return l.children?l.children.filter(n=>!n.isDirectory).map(n=>n.resource):[]}};e.OpenWindowSessionLogFileAction=d,e.OpenWindowSessionLogFileAction=d=fe([O(2,v.IWorkbenchEnvironmentService),O(3,f.IFileService),O(4,D.IQuickInputService),O(5,S.IEditorService)],d)}),define(Q[3979],Y([1,0,2770,16,81,13,3978,45,25,237,4,11,5,6,475,14,15,1345,8,69,64,22]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:T.SetLogLevelAction.ID,title:T.SetLogLevelAction.TITLE,category:b.Categories.Developer,f1:!0})}run(g){return g.get(a.IInstantiationService).createInstance(T.SetLogLevelAction,T.SetLogLevelAction.ID,T.SetLogLevelAction.TITLE.value).run()}}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.action.setDefaultLogLevel",title:{value:t.localize(0,null),original:"Set Default Log Level"},category:b.Categories.Developer})}run(g,w,E){return g.get(u.IDefaultLogLevelsService).setDefaultLogLevel(w,E)}});let n=class extends S.Disposable{constructor(w,E,C,I,_){super(),this.logService=w,this.loggerService=E,this.contextKeyService=C,this.fileService=I,this.uriIdentityService=_,this.contextKeys=new p.CounterSet,this.outputChannelRegistry=y.Registry.as(m.Extensions.OutputChannels);const A=h.CONTEXT_LOG_LEVEL.bindTo(C);A.set((0,h.LogLevelToString)(E.getLogLevel())),E.onDidChangeLogLevel(k=>{(0,h.isLogLevel)(k)&&A.set((0,h.LogLevelToString)(E.getLogLevel()))}),this.onDidAddLoggers(E.getRegisteredLoggers()),this._register(E.onDidChangeLoggers(({added:k,removed:L})=>{this.onDidAddLoggers(k),this.onDidRemoveLoggers(L)})),this._register(E.onDidChangeVisibility(([k,L])=>{const R=E.getRegisteredLogger(k);R&&(L?this.registerLogChannel(R):this.outputChannelRegistry.removeChannel(R.id))})),this.registerShowWindowLogAction(),this._register(r.Event.filter(C.onDidChangeContext,k=>k.affectsSome(this.contextKeys))(()=>this.onDidChangeContext()))}onDidAddLoggers(w){for(const E of w){if(E.when){const C=d.ContextKeyExpr.deserialize(E.when);if(C){for(const I of C.keys())this.contextKeys.add(I);if(!this.contextKeyService.contextMatchesRules(C))continue}}E.hidden||this.registerLogChannel(E)}}onDidChangeContext(){for(const w of this.loggerService.getRegisteredLoggers())w.when&&(this.contextKeyService.contextMatchesRules(d.ContextKeyExpr.deserialize(w.when))?this.registerLogChannel(w):this.outputChannelRegistry.removeChannel(w.id))}onDidRemoveLoggers(w){for(const E of w){if(E.when){const C=d.ContextKeyExpr.deserialize(E.when);if(C)for(const I of C.keys())this.contextKeys.delete(I)}this.outputChannelRegistry.removeChannel(E.id)}}registerLogChannel(w){const E=this.outputChannelRegistry.getChannel(w.id);if(E&&this.uriIdentityService.extUri.isEqual(E.file,w.resource))return;const C=(0,s.createCancelablePromise)(async I=>{await(0,v.whenProviderRegistered)(w.resource,this.fileService);try{await this.whenFileExists(w.resource,1,I);const _=this.outputChannelRegistry.getChannel(w.id);_?.file?.scheme===l.Schemas.vscodeRemote&&(this.outputChannelRegistry.removeChannel(_.id),this.outputChannelRegistry.registerChannel({id:`${_.id}.remote`,label:t.localize(1,null,_.label),file:_.file,log:_.log,extensionId:_.extensionId}));const A=_&&w.resource.scheme===l.Schemas.vscodeRemote,k=A?`${w.id}.remote`:w.id,L=A?t.localize(2,null,w.name??w.id):w.name??w.id;this.outputChannelRegistry.registerChannel({id:k,label:L,file:w.resource,log:!0,extensionId:w.extensionId})}catch(_){(0,o.isCancellationError)(_)||this.logService.error("Error while registering log channel",w.resource.toString(),(0,o.getErrorMessage)(_))}});this._register((0,S.toDisposable)(()=>C.cancel()))}async whenFileExists(w,E,C){if(!await this.fileService.exists(w)){if(C.isCancellationRequested)throw new o.CancellationError;if(E>10)throw new Error("Timed out while waiting for file to be created");this.logService.debug("[Registering Log Channel] File does not exist. Waiting for 1s to retry.",w.toString()),await(0,s.timeout)(1e3,C),await this.whenFileExists(w,E+1,C)}}registerShowWindowLogAction(){(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:i.showWindowLogActionId,title:{value:t.localize(3,null),original:"Show Window Log"},category:b.Categories.Developer,f1:!0})}async run(E){E.get(m.IOutputService).showChannel(i.windowLogId)}})}};n=fe([O(0,h.ILogService),O(1,h.ILoggerService),O(2,d.IContextKeyService),O(3,v.IFileService),O(4,c.IUriIdentityService)],n),y.Registry.as(f.Extensions.Workbench).registerWorkbenchContribution(n,3)}),define(Q[3980],Y([1,0,14,57,39,237,1175,4,125,74]),function(q,e,t,y,b,D,T,f,v,m){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.OutputLinkProvider=void 0;let h=class{static{S=this}static{this.DISPOSE_WORKER_TIME=3*60*1e3}constructor(r,i,s,o){this.contextService=r,this.modelService=i,this.languageConfigurationService=s,this.languageFeaturesService=o,this.disposeWorkerScheduler=new t.RunOnceScheduler(()=>this.disposeWorker(),S.DISPOSE_WORKER_TIME),this.registerListeners(),this.updateLinkProviderWorker()}registerListeners(){this.contextService.onDidChangeWorkspaceFolders(()=>this.updateLinkProviderWorker())}updateLinkProviderWorker(){this.contextService.getWorkspace().folders.length>0?this.linkProviderRegistration||(this.linkProviderRegistration=this.languageFeaturesService.linkProvider.register([{language:D.OUTPUT_MODE_ID,scheme:"*"},{language:D.LOG_MODE_ID,scheme:"*"}],{provideLinks:async i=>{const s=await this.provideLinks(i.uri);return s&&{links:s}}})):((0,f.dispose)(this.linkProviderRegistration),this.linkProviderRegistration=void 0),this.disposeWorker(),this.disposeWorkerScheduler.cancel()}getOrCreateWorker(){if(this.disposeWorkerScheduler.schedule(),!this.worker){const r={workspaceFolders:this.contextService.getWorkspace().folders.map(i=>i.uri.toString())};this.worker=(0,T.createWebWorker)(this.modelService,this.languageConfigurationService,{moduleId:"vs/workbench/contrib/output/common/outputLinkComputer",createData:r,label:"outputLinkComputer"})}return this.worker}async provideLinks(r){return(await this.getOrCreateWorker().withSyncedResources([r])).computeLinks(r.toString())}disposeWorker(){this.worker&&(this.worker.dispose(),this.worker=void 0)}};e.OutputLinkProvider=h,e.OutputLinkProvider=h=S=fe([O(0,b.IWorkspaceContextService),O(1,y.IModelService),O(2,v.ILanguageConfigurationService),O(3,m.ILanguageFeaturesService)],h)}),define(Q[3981],Y([1,0,5,26,242,6,14,25,57,4,17,165,51,27,62,11,31,237,15]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DelegatedOutputChannelModel=e.FileOutputChannelModel=void 0;class p extends m.Disposable{constructor(w,E,C){super(),this.file=w,this.fileService=E,this.logService=C,this._onDidContentChange=new D.Emitter,this.onDidContentChange=this._onDidContentChange.event,this.watching=!1,this.syncDelayer=new T.ThrottledDelayer(500)}watch(w){this.watching||(this.etag=w,this.poll(),this.logService.trace("Started polling",this.file.toString()),this.watching=!0)}poll(){const w=()=>this.doWatch().then(()=>this.poll());this.syncDelayer.trigger(w).catch(E=>{if(!(0,d.isCancellationError)(E))throw E})}async doWatch(){const w=await this.fileService.stat(this.file);w.etag!==this.etag&&(this.etag=w.etag,this._onDidContentChange.fire(w.size))}unwatch(){this.watching&&(this.syncDelayer.cancel(),this.watching=!1,this.logService.trace("Stopped polling",this.file.toString()))}dispose(){this.unwatch(),super.dispose()}}let c=class extends m.Disposable{constructor(w,E,C,I,_,A,k){super(),this.modelUri=w,this.language=E,this.file=C,this.fileService=I,this.modelService=_,this.editorWorkerService=k,this._onDispose=this._register(new D.Emitter),this.onDispose=this._onDispose.event,this.etag="",this.loadModelPromise=null,this.model=null,this.modelUpdateInProgress=!1,this.modelUpdateCancellationSource=this._register(new m.MutableDisposable),this.appendThrottler=this._register(new T.ThrottledDelayer(300)),this.startOffset=0,this.endOffset=0,this.fileHandler=this._register(new p(this.file,this.fileService,A)),this._register(this.fileHandler.onDidContentChange(L=>this.onDidContentChange(L))),this._register((0,m.toDisposable)(()=>this.fileHandler.unwatch()))}append(w){throw new Error("Not supported")}replace(w){throw new Error("Not supported")}clear(){this.update(u.OutputChannelUpdateMode.Clear,this.endOffset,!0)}update(w,E,C){(this.loadModelPromise?this.loadModelPromise:Promise.resolve()).then(()=>this.doUpdate(w,E,C))}loadModel(){return this.loadModelPromise=T.Promises.withAsyncBody(async(w,E)=>{try{let C="";if(await this.fileService.exists(this.file)){const I=await this.fileService.readFile(this.file,{position:this.startOffset});this.endOffset=this.startOffset+I.value.byteLength,this.etag=I.etag,C=I.value.toString()}else this.startOffset=0,this.endOffset=0;w(this.createModel(C))}catch(C){E(C)}}),this.loadModelPromise}createModel(w){if(this.model)this.model.setValue(w);else{this.model=this.modelService.createModel(w,this.language,this.modelUri),this.fileHandler.watch(this.etag);const E=this.model.onWillDispose(()=>{this.cancelModelUpdate(),this.fileHandler.unwatch(),this.model=null,(0,m.dispose)(E)})}return this.model}doUpdate(w,E,C){if((w===u.OutputChannelUpdateMode.Clear||w===u.OutputChannelUpdateMode.Replace)&&(this.startOffset=this.endOffset=(0,S.isNumber)(E)?E:this.endOffset,this.cancelModelUpdate()),!this.model)return;this.modelUpdateInProgress=!0,this.modelUpdateCancellationSource.value||(this.modelUpdateCancellationSource.value=new o.CancellationTokenSource);const I=this.modelUpdateCancellationSource.value.token;w===u.OutputChannelUpdateMode.Clear?this.clearContent(this.model):w===u.OutputChannelUpdateMode.Replace?this.replacePromise=this.replaceContent(this.model,I).finally(()=>this.replacePromise=void 0):this.appendContent(this.model,C,I)}clearContent(w){this.doUpdateModel(w,[h.EditOperation.delete(w.getFullModelRange())],i.VSBuffer.fromString(""))}appendContent(w,E,C){this.appendThrottler.trigger(async()=>{if(C.isCancellationRequested)return;if(this.replacePromise){try{await this.replacePromise}catch{}if(C.isCancellationRequested)return}const I=await this.getContentToUpdate();if(C.isCancellationRequested)return;const _=w.getLineCount(),A=w.getLineMaxColumn(_),k=[h.EditOperation.insert(new a.Position(_,A),I.toString())];this.doUpdateModel(w,k,I)},E?0:void 0).catch(I=>{if(!(0,d.isCancellationError)(I))throw I})}async replaceContent(w,E){const C=await this.getContentToUpdate();if(E.isCancellationRequested)return;const I=await this.getReplaceEdits(w,C.toString());E.isCancellationRequested||this.doUpdateModel(w,I,C)}async getReplaceEdits(w,E){if(!E)return[h.EditOperation.delete(w.getFullModelRange())];if(E!==w.getValue()){const C=await this.editorWorkerService.computeMoreMinimalEdits(w.uri,[{text:E.toString(),range:w.getFullModelRange()}]);if(C?.length)return C.map(I=>h.EditOperation.replace(r.Range.lift(I.range),I.text))}return[]}doUpdateModel(w,E,C){E.length&&w.applyEdits(E),this.endOffset=this.endOffset+C.byteLength,this.modelUpdateInProgress=!1}cancelModelUpdate(){this.modelUpdateCancellationSource.value?.cancel(),this.modelUpdateCancellationSource.value=void 0,this.appendThrottler.cancel(),this.replacePromise=void 0,this.modelUpdateInProgress=!1}async getContentToUpdate(){const w=await this.fileService.readFile(this.file,{position:this.endOffset});return this.etag=w.etag,w.value}onDidContentChange(w){this.model&&(this.modelUpdateInProgress||(0,S.isNumber)(w)&&this.endOffset>w&&this.update(u.OutputChannelUpdateMode.Clear,0,!0),this.update(u.OutputChannelUpdateMode.Append,void 0,!1))}isVisible(){return!!this.model}dispose(){this._onDispose.fire(),super.dispose()}};e.FileOutputChannelModel=c,e.FileOutputChannelModel=c=fe([O(3,f.IFileService),O(4,v.IModelService),O(5,s.ILogService),O(6,b.IEditorWorkerService)],c);let l=class extends c{constructor(w,E,C,I,_,A,k,L,R){super(E,C,I,_,A,L,R),this.logger=k.createLogger(I,{logLevel:"always",donotRotate:!0,donotUseFormatters:!0,hidden:!0}),this._offset=0}append(w){this.write(w),this.update(u.OutputChannelUpdateMode.Append,void 0,this.isVisible())}replace(w){const E=this._offset;this.write(w),this.update(u.OutputChannelUpdateMode.Replace,E,!0)}write(w){this._offset+=i.VSBuffer.fromString(w).byteLength,this.logger.info(w),this.isVisible()&&this.logger.flush()}};l=fe([O(4,f.IFileService),O(5,v.IModelService),O(6,s.ILoggerService),O(7,s.ILogService),O(8,b.IEditorWorkerService)],l);let n=class extends m.Disposable{constructor(w,E,C,I,_,A){super(),this.instantiationService=_,this.fileService=A,this._onDispose=this._register(new D.Emitter),this.onDispose=this._onDispose.event,this.outputChannelModel=this.createOutputChannelModel(w,E,C,I)}async createOutputChannelModel(w,E,C,I){const _=await I,A=y.joinPath(_,`${w.replace(/[\\/:\*\?"<>\|]/g,"")}.log`);await this.fileService.createFile(A);const k=this._register(this.instantiationService.createInstance(l,w,E,C,A));return this._register(k.onDispose(()=>this._onDispose.fire())),k}append(w){this.outputChannelModel.then(E=>E.append(w))}update(w,E,C){this.outputChannelModel.then(I=>I.update(w,E,C))}loadModel(){return this.outputChannelModel.then(w=>w.loadModel())}clear(){this.outputChannelModel.then(w=>w.clear())}replace(w){this.outputChannelModel.then(E=>E.replace(w))}};e.DelegatedOutputChannelModel=n,e.DelegatedOutputChannelModel=n=fe([O(4,t.IInstantiationService),O(5,f.IFileService)],n)}),define(Q[1383],Y([1,0,35,65,5,25,260,26,3981]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputChannelModelService=e.IOutputChannelModelService=void 0,e.IOutputChannelModelService=(0,b.createDecorator)("outputChannelModelService");let m=class{constructor(h,a,r){this.fileService=h,this.instantiationService=a,this._outputDir=null,this.outputLocation=(0,f.joinPath)(r.windowLogsPath,`output_${(0,T.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"")}`)}createOutputChannelModel(h,a,r,i){return i?this.instantiationService.createInstance(v.FileOutputChannelModel,a,r,i):this.instantiationService.createInstance(v.DelegatedOutputChannelModel,h,a,r,this.outputDir)}get outputDir(){return this._outputDir||(this._outputDir=this.fileService.createFolder(this.outputLocation).then(()=>this.outputLocation)),this._outputDir}};e.OutputChannelModelService=m,e.OutputChannelModelService=m=fe([O(0,D.IFileService),O(1,b.IInstantiationService),O(2,y.IWorkbenchEnvironmentService)],m),(0,t.registerSingleton)(e.IOutputChannelModelService,m,1)}),define(Q[3982],Y([1,0,6,10,4,5,24,16,237,3980,75,11,89,46,1383,50,8]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogContentProvider=e.OutputService=void 0;const u="output.activechannel";let d=class extends b.Disposable{constructor(n,g,w){super(),this.outputChannelDescriptor=n,this.scrollLock=!1,this.id=n.id,this.label=n.label,this.uri=y.URI.from({scheme:v.OUTPUT_SCHEME,path:this.id}),this.model=this._register(g.createOutputChannelModel(this.id,this.uri,n.languageId?w.createById(n.languageId):w.createByMimeType(n.log?v.LOG_MIME:v.OUTPUT_MIME),n.file))}append(n){this.model.append(n)}update(n,g){this.model.update(n,g,!0)}clear(){this.model.clear()}replace(n){this.model.replace(n)}};d=fe([O(1,i.IOutputChannelModelService),O(2,s.ILanguageService)],d);let p=class extends b.Disposable{constructor(n,g,w,E,C,I,_){super(),this.storageService=n,this.instantiationService=g,this.logService=E,this.lifecycleService=C,this.viewsService=I,this.channels=new Map,this._onActiveOutputChannel=this._register(new t.Emitter),this.onActiveOutputChannel=this._onActiveOutputChannel.event,this.activeChannelIdInStorage=this.storageService.get(u,1,""),this.activeOutputChannelContext=v.ACTIVE_OUTPUT_CHANNEL_CONTEXT.bindTo(_),this.activeOutputChannelContext.set(this.activeChannelIdInStorage),this._register(this.onActiveOutputChannel(k=>this.activeOutputChannelContext.set(k))),this.activeLogOutputChannelContext=v.CONTEXT_ACTIVE_LOG_OUTPUT.bindTo(_),w.registerTextModelContentProvider(v.OUTPUT_SCHEME,this),g.createInstance(m.OutputLinkProvider);const A=f.Registry.as(v.Extensions.OutputChannels);for(const k of A.getChannels())this.onDidRegisterChannel(k.id);if(this._register(A.onDidRegisterChannel(this.onDidRegisterChannel,this)),!this.activeChannel){const k=this.getChannelDescriptors();this.setActiveChannel(k&&k.length>0?this.getChannel(k[0].id):void 0)}this._register(t.Event.filter(this.viewsService.onDidChangeViewVisibility,k=>k.id===v.OUTPUT_VIEW_ID&&k.visible)(()=>{this.activeChannel&&this.viewsService.getActiveViewWithId(v.OUTPUT_VIEW_ID)?.showChannel(this.activeChannel,!0)})),this._register(this.lifecycleService.onDidShutdown(()=>this.dispose()))}provideTextContent(n){const g=this.getChannel(n.path);return g?g.model.loadModel():null}async showChannel(n,g){const w=this.getChannel(n);this.activeChannel?.id!==w?.id&&(this.setActiveChannel(w),this._onActiveOutputChannel.fire(n));const E=await this.viewsService.openView(v.OUTPUT_VIEW_ID,!g);E&&w&&E.showChannel(w,!!g)}getChannel(n){return this.channels.get(n)}getChannelDescriptor(n){return f.Registry.as(v.Extensions.OutputChannels).getChannel(n)}getChannelDescriptors(){return f.Registry.as(v.Extensions.OutputChannels).getChannels()}getActiveChannel(){return this.activeChannel}async onDidRegisterChannel(n){const g=this.createChannel(n);this.channels.set(n,g),(!this.activeChannel||this.activeChannelIdInStorage===n)&&(this.setActiveChannel(g),this._onActiveOutputChannel.fire(n),this.viewsService.getActiveViewWithId(v.OUTPUT_VIEW_ID)?.showChannel(g,!0))}createChannel(n){const g=[],w=this.instantiateChannel(n);return w.model.onDispose(()=>{if(this.activeChannel===w){const E=this.getChannelDescriptors(),C=E.length?this.getChannel(E[0].id):void 0;C&&this.viewsService.isViewVisible(v.OUTPUT_VIEW_ID)?this.showChannel(C.id):this.setActiveChannel(void 0)}f.Registry.as(v.Extensions.OutputChannels).removeChannel(n),(0,b.dispose)(g)},g),w}instantiateChannel(n){const g=f.Registry.as(v.Extensions.OutputChannels).getChannel(n);if(!g)throw this.logService.error(`Channel '${n}' is not registered yet`),new Error(`Channel '${n}' is not registered yet`);return this.instantiationService.createInstance(d,g)}setActiveChannel(n){this.activeChannel=n,this.activeLogOutputChannelContext.set(!!n?.outputChannelDescriptor?.file&&n?.outputChannelDescriptor?.log),this.activeChannel?this.storageService.store(u,this.activeChannel.id,1,1):this.storageService.remove(u,1)}};e.OutputService=p,e.OutputService=p=fe([O(0,T.IStorageService),O(1,D.IInstantiationService),O(2,S.ITextModelService),O(3,h.ILogService),O(4,a.ILifecycleService),O(5,r.IViewsService),O(6,o.IContextKeyService)],p);let c=class{constructor(n,g,w){this.outputService=n,this.outputChannelModelService=g,this.languageService=w,this.channelModels=new Map}provideTextContent(n){if(n.scheme===v.LOG_SCHEME){const g=this.getChannelModel(n);if(g)return g.loadModel()}return null}getChannelModel(n){const g=n.path;let w=this.channelModels.get(g);if(!w){const E=[],C=this.outputService.getChannelDescriptors().filter(({id:I})=>I===g)[0];C&&C.file&&(w=this.outputChannelModelService.createOutputChannelModel(g,n,C.languageId?this.languageService.createById(C.languageId):this.languageService.createByMimeType(C.log?v.LOG_MIME:v.OUTPUT_MIME),C.file),w.onDispose(()=>(0,b.dispose)(E),E),this.channelModels.set(g,w))}return w}};e.LogContentProvider=c,e.LogContentProvider=c=fe([O(0,v.IOutputService),O(1,i.IOutputChannelModelService),O(2,s.ILanguageService)],c)}),define(Q[104],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPaneCompositePartService=void 0,e.IPaneCompositePartService=(0,t.createDecorator)("paneCompositePartService")}),define(Q[1384],Y([1,0,2074,34,118,41,10,31,785,104,13]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenExtensionAuthoringDocsAction=e.InstallRecommendedExtensionsByScenarioAction=e.ShowRecommendedExtensionsByScenarioAction=void 0;function h(s){return"workbench.extensions.action.show"+s}let a=class extends y.Action{constructor(o,u){super(h(o),(0,t.localize)(0,null),void 0,!0),this.scenarioType=o,this.viewletService=u}run(){return this.viewletService.openPaneComposite(b.VIEWLET_ID,0,!0).then(o=>o?.getViewPaneContainer()).then(o=>{o.search("@"+this.scenarioType),o.focus()})}};e.ShowRecommendedExtensionsByScenarioAction=a,e.ShowRecommendedExtensionsByScenarioAction=a=fe([O(1,m.IPaneCompositePartService)],a);let r=class extends y.Action{get recommendations(){return this._recommendations}set recommendations(o){this._recommendations=o,this.enabled=this._recommendations.length>0}constructor(o,u,d,p){super(h(o),(0,t.localize)(1,null),"extension-action"),this.scenarioType=o,this.viewletService=d,this.extensionWorkbenchService=p,this._recommendations=[],this.recommendations=u}async run(){if(!this.recommendations.length)return;const o=await this.viewletService.openPaneComposite(b.VIEWLET_ID,0,!0);(o?.getViewPaneContainer()).search("@"+this.scenarioType),o.focus();const d=this.recommendations.map(({extensionId:n})=>n),p=await this.extensionWorkbenchService.queryGallery({names:d,source:"install-"+this.scenarioType},f.CancellationToken.None);let c=[],l=new v.PagedModel(p);for(let n=0;n<p.total;n++)c.push(l.resolve(n,f.CancellationToken.None).then(g=>this.extensionWorkbenchService.install(g)));await Promise.all(c)}};e.InstallRecommendedExtensionsByScenarioAction=r,e.InstallRecommendedExtensionsByScenarioAction=r=fe([O(2,m.IPaneCompositePartService),O(3,b.IExtensionsWorkbenchService)],r);class i extends S.Action2{static{this.ID="workbench.extensions.action.openExtensionAuthoringDocs"}static{this.LABEL_ORG="Author an Extension..."}static{this.LABEL=(0,t.localize)(2,null)}static{this.extensionAuthoringDocsURI="https://docs.microsoft.com/sql/azure-data-studio/extension-authoring"}constructor(){super({id:i.ID,title:{value:i.LABEL,original:i.LABEL_ORG},f1:!0})}async run(o){await o.get(D.IOpenerService).open(T.URI.parse(i.extensionAuthoringDocsURI))}}e.OpenExtensionAuthoringDocsAction=i}),define(Q[3983],Y([1,0,28,95,1384,2073,42,31,13]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,v.registerAction2)(b.OpenExtensionAuthoringDocsAction),t.CommandsRegistry.registerCommand("azdata.extension.open",(m,S)=>{if(S&&S.id)return m.get(t.ICommandService).executeCommand("extension.open",S.id);throw new Error("Extension id is not provided")}),t.CommandsRegistry.registerCommand({id:"workbench.extensions.getExtensionFromGallery",description:{description:(0,D.localize)(0,null),args:[{name:(0,D.localize)(1,null),schema:{type:["string"]}}]},handler:async(m,S)=>{const h=m.get(y.IExtensionGalleryService),[a]=await h.getExtensions([{id:S}],{source:"getExtensionFromGallery"},f.CancellationToken.None);if(a)return(0,T.deepClone)(a);throw new Error((0,D.localize)(2,null,S))}})}),define(Q[3984],Y([1,0,354,52,5,23,24,2075,95,1014,76,1384,118,9]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScenarioRecommendations=void 0;const i=(0,f.localize)(0,null);let s=class extends t.ExtensionRecommendations{get recommendations(){return this._recommendations}constructor(u,d,p,c,l,n,g,w){super(),this.productService=u,this.instantiationService=d,this.notificationService=p,this.storageService=c,this.extensionManagementService=l,this.adsTelemetryService=n,this.extensionsWorkbenchService=g,this.configurationService=w,this._recommendations=[]}async doActivate(){}ignoreRecommendations(){return this.configurationService.getValue("extensions.ignoreRecommendations")}promptRecommendedExtensionsByScenario(u){const d="extensionAssistant/RecommendationsIgnore/"+u;if(this.storageService.getBoolean(d,-1,!1)||this.ignoreRecommendations())return;const p="VisualizerExtensionNotificationService";let c=(0,f.localize)(1,null);u===m.visualizerExtensions&&(c=(0,f.localize)(2,null)),Promise.all([this.getRecommendedExtensionsByScenario(u),this.extensionManagementService.getInstalled(1)]).then(([l,n])=>{l.every(g=>n.findIndex(w=>w.identifier.id.toLocaleLowerCase()===g.extensionId.toLocaleLowerCase())!==-1)||this.notificationService.prompt(D.Severity.Info,c,[{label:(0,f.localize)(3,null),run:()=>{this.adsTelemetryService.sendActionEvent("ExtensionRecommendationDialog","Click","InstallButton",p);const g=this.instantiationService.createInstance(h.InstallRecommendedExtensionsByScenarioAction,u,l);g.run(),g.dispose()}},{label:(0,f.localize)(4,null),run:()=>{this.adsTelemetryService.sendActionEvent("ExtensionRecommendationDialog","Click","ShowRecommendationsButton",p);const g=this.instantiationService.createInstance(h.ShowRecommendedExtensionsByScenarioAction,u);g.run(),g.dispose()}},{label:i,isSecondary:!0,run:()=>{this.adsTelemetryService.sendActionEvent("ExtensionRecommendationDialog","Click","NeverShowAgainButton",p),this.storageService.store(d,!0,-1,1)}}],{sticky:!0,onCancel:()=>{this.adsTelemetryService.sendActionEvent("ExtensionRecommendationDialog","Click","CancelButton",p)}})})}async getRecommendedExtensionsByScenario(u){return u?(this.productService.recommendedExtensionsByScenario[u]||[]).map(d=>({extensionId:d,sources:["application"]})):Promise.reject(new Error((0,f.localize)(5,null)))}};e.ScenarioRecommendations=s,e.ScenarioRecommendations=s=fe([O(0,y.IProductService),O(1,b.IInstantiationService),O(2,D.INotificationService),O(3,T.IStorageService),O(4,v.IExtensionManagementService),O(5,S.IAdsTelemetryService),O(6,a.IExtensionsWorkbenchService),O(7,r.IConfigurationService)],s)}),define(Q[3985],Y([1,0,2158,92,104,46,13]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HideActivityBarViewContainers=e.HideSettings=e.HidePanel=void 0;class f extends T.Action2{static{this.ID="workbench.action.hidePanel"}static{this.LABEL_ORG="Hide the panel"}static{this.LABEL=(0,t.localize)(0,null)}constructor(){super({id:f.ID,title:{value:f.LABEL,original:f.LABEL_ORG}})}run(h){h.get(y.IWorkbenchLayoutService).setPartHidden(!0,"workbench.parts.panel")}}e.HidePanel=f;class v extends T.Action2{static{this.ID="workbench.action.hideSettings"}static{this.LABEL_ORG="Hide the settings icon"}static{this.LABEL=(0,t.localize)(1,null)}constructor(){super({id:v.ID,title:{value:v.LABEL,original:v.LABEL_ORG}})}run(){let a=Array.from(document.getElementsByClassName("action-item icon")).filter(r=>r.getAttribute("aria-label")==="Manage");a[0].parentNode.removeChild(a[0])}}e.HideSettings=v;class m extends T.Action2{static{this.ID="workbench.action.hideActivityBarViewContainers"}static{this.LABEL_ORG="Hide the extension viewlet"}static{this.LABEL=(0,t.localize)(2,null)}constructor(){super({id:m.ID,title:{value:m.LABEL,original:m.LABEL_ORG}})}run(h){const a=h.get(D.IViewDescriptorService),r=h.get(b.IPaneCompositePartService);let i=["workbench.view.search","workbench.view.explorer","workbench.view.scm","workbench.view.extensions"];for(let s=0;s<i.length;s++){const o=a.getViewContainerById(i[s]);o&&r.hideActivePaneComposite(a.getViewContainerLocation(o))}}}e.HideActivityBarViewContainers=m}),define(Q[3986],Y([1,0,28,16,3985,45,286,143,13]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ADSWebLite=void 0;let m=class{constructor(h){this.commandService=h,this.createTSGOpsImage()}async createTSGOpsImage(){await this.commandService.executeCommand("workbench.action.hideSettings"),await this.commandService.executeCommand("workbench.action.hidePanel"),await this.commandService.executeCommand("workbench.action.hideActivityBarViewContainers")}};e.ADSWebLite=m,e.ADSWebLite=m=fe([O(0,t.ICommandService)],m),T.default.quality===f.TSGOPS_WEB_QUALITY&&((0,v.registerAction2)(b.HideActivityBarViewContainers),(0,v.registerAction2)(b.HideSettings),(0,v.registerAction2)(b.HidePanel),y.Registry.as(D.Extensions.Workbench).registerWorkbenchContribution(m,3))}),define(Q[3987],Y([1,0,106,553,58,3431,184,117,107,1514,3197,719,3216,686,326,183,196,262,2185,15,4,5,21,194,6,43,502,9,11,24,191,23,646,141,76,44,132,10,374,28,104,118,49,855,3483,1019]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P,x,F,V,W,z,B,K,H,U,G){"use strict";var $;Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionManagementService=void 0;let ie=class extends c.Disposable{static{$=this}static{this.CONNECTION_MEMENTO="ConnectionManagement"}static{this._azureResources=[o.AzureResource.ResourceManagement,o.AzureResource.Sql,o.AzureResource.OssRdbms,o.AzureResource.AzureLogAnalytics,o.AzureResource.AzureKusto]}constructor(j,ee,X,te,Z,se,re,oe,le,ne,ce,ae,ue,de,ge,he,be,ve){super(),this._connectionDialogService=j,this._instantiationService=ee,this._editorService=X,this._telemetryService=te,this._configurationService=Z,this._capabilitiesService=se,this._quickInputService=re,this._notificationService=oe,this._resourceProviderService=le,this._errorDiagnosticsService=ne,this._angularEventing=ce,this._accountManagementService=ae,this._logService=ue,this._storageService=de,this._extensionService=ge,this._commandService=he,this._paneCompositePartService=be,this._dialogService=ve,this._providers=new Map,this._providerNameToDisplayNameMap={},this._iconProviders=new Map,this._uriToProvider=Object.create(null),this._onAddConnectionProfile=new w.Emitter,this._onDeleteConnectionProfile=new w.Emitter,this._onConnect=new w.Emitter,this._onDisconnect=new w.Emitter,this._onConnectRequestSent=new w.Emitter,this._onConnectionChanged=new w.Emitter,this._onLanguageFlavorChanged=new w.Emitter,this._connectionGlobalStatus=new a.ConnectionGlobalStatus(this._notificationService),this._uriToReconnectPromiseMap={},this._onConnectionProfileCreated=new w.Emitter,this._onConnectionProfileDeleted=new w.Emitter,this._onConnectionProfileEdited=new w.Emitter,this._onConnectionProfileMoved=new w.Emitter,this._onConnectionProfileConnected=new w.Emitter,this._onConnectionProfileDisconnected=new w.Emitter,this._onConnectionProfileGroupCreated=new w.Emitter,this._onConnectionProfileGroupDeleted=new w.Emitter,this._onConnectionProfileGroupEdited=new w.Emitter,this._onConnectionProfileGroupMoved=new w.Emitter,this._onRecentConnectionProfileDeleted=new w.Emitter,this._connectionsGotUnsupportedVersionWarning=[],this._connectionStore=ee.createInstance(D.ConnectionStore),this._connectionStatusManager=ee.createInstance(S.ConnectionStatusManager),this._storageService&&(this._mementoContext=new k.Memento($.CONNECTION_MEMENTO,this._storageService),this._mementoObj=this._mementoContext.getMemento(-1,1)),this.initializeConnectionProvidersMap();let Ie=Se=>{let we={onReady:new s.Deferred,properties:Se.features.connection};this._providers.set(Se.id,we)};this._capabilitiesService.onCapabilitiesRegistered(Ie,this),(0,R.entries)(this._capabilitiesService.providers).map(Se=>{Ie({id:Se[0],features:Se[1]})}),this._register(this._onAddConnectionProfile),this._register(this._onDeleteConnectionProfile)}initializeConnectionProvidersMap(){this.updateConnectionProvidersMap(),this._capabilitiesService&&this._capabilitiesService.onCapabilitiesRegistered(()=>{this.updateConnectionProvidersMap()})}updateConnectionProvidersMap(){this._capabilitiesService&&(this._providerNameToDisplayNameMap={},(0,R.entries)(this._capabilitiesService.providers).forEach(j=>{this._providerNameToDisplayNameMap[j[0]]=j[1].connection.displayName}))}providerRegistered(j){return!!this._providers.get(j)}get onAddConnectionProfile(){return this._onAddConnectionProfile.event}get onDeleteConnectionProfile(){return this._onDeleteConnectionProfile.event}get onConnect(){return this._onConnect.event}get onDisconnect(){return this._onDisconnect.event}get onConnectionChanged(){return this._onConnectionChanged.event}get onConnectionRequestSent(){return this._onConnectRequestSent.event}get onLanguageFlavorChanged(){return this._onLanguageFlavorChanged.event}get onConnectionProfileCreated(){return this._onConnectionProfileCreated.event}get onConnectionProfileEdited(){return this._onConnectionProfileEdited.event}get onConnectionProfileDeleted(){return this._onConnectionProfileDeleted.event}get onConnectionProfileMoved(){return this._onConnectionProfileMoved.event}get onConnectionProfileConnected(){return this._onConnectionProfileConnected.event}get onConnectionProfileDisconnected(){return this._onConnectionProfileDisconnected.event}get onConnectionProfileGroupCreated(){return this._onConnectionProfileGroupCreated.event}get onConnectionProfileGroupDeleted(){return this._onConnectionProfileGroupDeleted.event}get onConnectionProfileGroupEdited(){return this._onConnectionProfileGroupEdited.event}get onConnectionProfileGroupMoved(){return this._onConnectionProfileGroupMoved.event}get onRecentConnectionProfileDeleted(){return this._onRecentConnectionProfileDeleted.event}get providerNameToDisplayNameMap(){return this._providerNameToDisplayNameMap}registerProvider(j,ee){if(!this._providers.has(j)){this._logService.warn("Provider",j,"attempted to register but has no metadata");let X={onReady:new s.Deferred,properties:void 0};this._providers.set(j,X)}this._providers.get(j).onReady.resolve(ee)}registerIconProvider(j,ee){this._iconProviders.set(j,ee)}showConnectionDialog(j,ee,X,te){return j||(j={connectionType:b.ConnectionType.default}),!X&&j.input&&j.input.uri&&(X=this._connectionStatusManager.getConnectionProfile(j.input.uri)),this._connectionDialogService.showDialog(this,j,X,te,ee).catch(Z=>{throw this._logService.warn("failed to open the connection dialog. error: "+Z),Z})}async showEditConnectionDialog(j){if(!j)throw new Error("Connection Profile is undefined");let ee={connectionType:b.ConnectionType.default,isEditConnection:!0,oldProfileId:j.id};try{return await this._connectionDialogService.showDialog(this,ee,j)}catch(X){this._logService.warn("failed to open the connection dialog. error: "+X)}}async addSavedPassword(j,ee=!1){return ee||await this.fillInOrClearToken(j),this._connectionStore.addSavedPassword(j).then(X=>X.profile)}getProviderIdFromUri(j){let ee=this._uriToProvider[j];return ee||(ee=this._connectionStatusManager.getProviderIdFromUri(j)),ee}getUniqueConnectionProvidersByNameMap(j){let ee={},X=(0,R.entries)(j);return X.forEach(te=>{(te[0]!==f.cmsProviderName||X.length===1)&&(ee[te[0]]=te[1])}),ee}tryConnect(j,ee,X){return this._connectionStore.addSavedPassword(j).then(async te=>{let Z=te.profile,se=te.savedCred;if(!se&&this._connectionStore.isPasswordRequired(Z)){let oe=this._connectionStatusManager.findConnectionProfile(j);oe&&oe.connectionProfile&&(Z.password=oe.connectionProfile.password,se=!0)}let re=await this.fillInOrClearToken(Z);return(!Z.authenticationType||Z.authenticationType==="")&&(Z.authenticationType=this.getDefaultAuthenticationTypeId(Z.providerName)),!se&&this._connectionStore.isPasswordRequired(Z)&&!Z.password||!re?this.showConnectionDialogOnError(j,ee,{connected:!1,errorMessage:void 0,messageDetails:void 0,errorCode:void 0},X):this.connectWithOptions(Z,ee.uri,X,ee).then(oe=>!oe.connected&&!oe.errorHandled?this.showConnectionDialogOnError(j,ee,oe,X):!oe.connected&&oe.errorHandled?void 0:oe)})}showConnectionDialogOnError(j,ee,X,te){if(te&&te.showConnectionDialogOnError){let Z=te&&te.params?te.params:{connectionType:this._connectionStatusManager.isEditorTypeUri(ee.uri)?b.ConnectionType.editor:b.ConnectionType.default,input:ee,runQueryOnCompletion:b.RunQueryOnConnectionMode.none,showDashboard:te.showDashboard,isEditConnection:!0,oldProfileId:j.id};return this.showConnectionDialog(Z,te,j,X).then(()=>X)}else return Promise.resolve(X)}connect(j,ee,X,te){ee||(ee=T.generateUri(j));let Z=X&&X.params?X.params.input:void 0;return Z||(Z={onConnectReject:te?te.onConnectReject:void 0,onConnectStart:te?te.onConnectStart:void 0,onConnectSuccess:te?te.onConnectSuccess:void 0,onDisconnect:te?te.onDisconnect:void 0,onConnectCanceled:te?te.onConnectCanceled:void 0,uri:ee}),ee!==Z.uri&&this._logService.warn(`the given uri is different that the input uri. ${ee}|${Z.uri}`),this.tryConnect(j,Z,X)}async fixProfile(j){if(j){if(j.authenticationType!==void 0&&j.authenticationType===""&&(j.authenticationType=this.getDefaultAuthenticationTypeId(j.providerName)),j.authenticationType==="AzureMFA"){let ee=await this._accountManagementService?.getAccounts();j.userName=ee?.find(X=>X.key.accountId===j.azureAccount)?.displayInfo.displayName??j.userName}(j.databaseName!=="master"||!j.databaseName)&&(j.options.originalDatabase=j.databaseName)}return j}connectIfNotConnected(j,ee,X=!1){let te=T.generateUri(j,ee);if(this._connectionStatusManager.isConnected(te))return Promise.resolve(this._connectionStatusManager.getOriginalOwnerUri(te));{const Z={saveTheConnection:X,showConnectionDialogOnError:!0,showDashboard:ee==="dashboard",showFirewallRuleOnError:!0};return this.connect(j,te,Z).then(se=>{if(se&&se.connected)return this._connectionStatusManager.getOriginalOwnerUri(te);throw se.errorMessage})}}async changePassword(j,ee,X){return this.sendChangePasswordRequest(j,ee,X)}connectAndSaveProfile(j,ee,X,te){return X||(X={saveTheConnection:!0,showDashboard:!1,showConnectionDialogOnError:!1,showFirewallRuleOnError:!0}),this.connectWithOptions(j,ee,X,te)}duplicateEditErrorMessage(j){let ee=t.ConnectionProfile.displayIdSeparator+"groupName"+t.ConnectionProfile.displayNameValueSeparator,X=t.ConnectionProfile.getDisplayOptionsKey(j.getOptionsKey()),te=j.groupFullName!==void 0&&j.groupFullName!==""&&j.groupFullName!=="/"?ee+j.groupFullName:ee+"<default>";throw this._logService.error(`Profile edit for '${j.id}' matches an existing profile with data: '${X}'`),new Error(d.localize(0,null,X,te))}async connectWithOptions(j,ee,X,te){j.options.groupId=j.groupId,j.options.databaseDisplayName=j.databaseName;let Z=X?.params?.isEditConnection??!1,se;if(Z&&(se=(le,ne)=>le.id===X.params.oldProfileId,await this._connectionStore.isDuplicateEdit(j,se)&&this.duplicateEditErrorMessage(j)),ee||(ee=T.generateUri(j)),ee=this._connectionStatusManager.getOriginalOwnerUri(ee),te||(te={onConnectReject:()=>{},onConnectStart:()=>{},onConnectSuccess:()=>{},onDisconnect:()=>{},onConnectCanceled:()=>{}}),X||(X={saveTheConnection:!1,showDashboard:!1,showConnectionDialogOnError:!1,showFirewallRuleOnError:!0}),te.onConnectStart&&te.onConnectStart(),!await this.fillInOrClearToken(j))throw new Error(d.localize(1,null));return X.saveTheConnection&&(j.options.originalDatabase=j.databaseName),this.createNewConnection(ee,j).then(async oe=>{if(oe&&oe.connected){let le=this._connectionStatusManager.findConnection(ee);return le?(this.tryAddActiveConnection(le,j,X.saveTheConnection),te.onConnectSuccess&&te.onConnectSuccess(X.params,oe.connectionProfile),X.saveTheConnection||Z?await this.saveToSettings(ee,j,se).then(ne=>{this._onAddConnectionProfile.fire(j),Z?this._onConnectionProfileEdited.fire({oldProfileId:X.params.oldProfileId,profile:j}):X.params===void 0?this._onConnectionProfileConnected.fire(j):this._onConnectionProfileCreated.fire(j),this.doActionsAfterConnectionComplete(ne,X)}):(j.saveProfile=!1,this.doActionsAfterConnectionComplete(ee,X)),j.savePassword?this._connectionStore.savePassword(j).then(()=>oe):oe):(this._logService.info(`Could not find connection management info for ${ee} after connection`),oe)}else return oe&&oe.errorMessage?this.handleConnectionError(j,ee,X,te,oe).catch(le=>{throw te.onConnectReject&&te.onConnectReject(le),le}):(te.onConnectReject&&te.onConnectReject(d.localize(2,null)),oe)}).catch(oe=>{throw te.onConnectReject&&te.onConnectReject(oe),oe})}async handleConnectionError(j,ee,X,te,Z){let se=d.localize(3,null);if(X.showFirewallRuleOnError&&Z.errorCode){if(await this.handleFirewallRuleError(j,Z))return X.showFirewallRuleOnError=!1,this.connectWithOptions(j,ee,X,te);{let oe=await this._errorDiagnosticsService.tryHandleConnectionError(Z,j.providerName,j);return oe.handled?(Z.errorHandled=!0,oe.options&&(j.options=oe.options),oe.reconnect?this.connectWithOptions(j,void 0,X,te):(te.onConnectCanceled&&te.onConnectCanceled(),Z)):(te.onConnectReject&&te.onConnectReject(se),Z)}}else return te.onConnectReject&&te.onConnectReject(se),Promise.resolve(Z)}handleFirewallRuleError(j,ee){return this._resourceProviderService.handleFirewallRule(ee.errorCode,ee.errorMessage,j.providerName).then(X=>X.canHandleFirewallRule?(ee.errorHandled=!0,this._resourceProviderService.showFirewallRuleDialog(j,X.ipAddress,X.resourceProviderId)):!1)}async openChangePasswordDialog(j){return await this._instantiationService.createInstance(U.PasswordChangeDialog).open(j)}getNonDefaultOptions(j){return new t.ConnectionProfile(this._capabilitiesService,j).getNonDefaultOptionsString().replace("(","[").replace(")","]")}doActionsAfterConnectionComplete(j,ee){let X=this._connectionStatusManager.findConnection(j);if(!X)this._logService.info(`Could not find connection management info for ${j} after connection complete`);else{ee.showDashboard&&this.showDashboardForConnectionManagementInfo(X.connectionProfile);let te=X.connectionProfile;this._onConnect.fire({connectionUri:j,connectionProfile:te});let Z=this._iconProviders.get(X.providerId);if(Z){const se=this.getServerInfo(te.id);if(!se){this._logService.warn(`Could not find ServerInfo for connection ${te.id} when updating icon`);return}const re=te.toIConnectionProfile();Z.getConnectionIconId(re,se).then(oe=>{oe&&this._mementoObj&&this._mementoContext&&(this._mementoObj.CONNECTION_ICON_ID||(this._mementoObj.CONNECTION_ICON_ID={}),this._mementoObj.CONNECTION_ICON_ID[te.id]!==oe&&(this._mementoObj.CONNECTION_ICON_ID[te.id]=oe,this._mementoContext.saveMemento()))})}}}getConnectionIconId(j){if(!(!j||!this._mementoObj||!this._mementoObj.CONNECTION_ICON_ID))return this._mementoObj.CONNECTION_ICON_ID[j]}showDashboard(j){return this.showDashboardForConnectionManagementInfo(j)}showDashboardForConnectionManagementInfo(j){if(this.focusDashboard(j))return Promise.resolve(!0);{let ee=this._instantiationService?this._instantiationService.createInstance(h.DashboardInput,j):void 0;return ee.initializedPromise.then(()=>this._editorService.openEditor(ee,{pinned:!0},n.ACTIVE_GROUP)).then(()=>!0)}}focusDashboard(j){const ee=this._editorService.editors.find(X=>X instanceof h.DashboardInput&&h.DashboardInput.profileMatches(j,X.connectionProfile));return ee&&(ee.connectionProfile.connectionName=j.connectionName,ee.connectionProfile.databaseName=j.databaseName,this._editorService.openEditor(ee).then(()=>{const X=!j.databaseName||T.isServerConnection(j)?i.AngularEventType.NAV_SERVER:i.AngularEventType.NAV_DATABASE;this._angularEventing.sendAngularEvent(ee.uri,X)},p.onUnexpectedError)),!!ee}closeDashboard(j){}getConnectionGroups(j){return this._connectionStore.getConnectionProfileGroups(!1,j)}getConnectionGroupById(j){const ee=this.getConnectionGroups();for(let X of ee){if(X.id===j)return X;const te=g.ConnectionProfileGroup.getSubgroups(X).find(Z=>Z.id===j);if(te)return te}}getRecentConnections(j){return this._connectionStore.getRecentlyUsedConnections(j)}clearRecentConnectionsList(){return this._connectionStore.clearRecentlyUsed()}clearRecentConnection(j){this._connectionStore.removeRecentConnection(j),this._onRecentConnectionProfileDeleted.fire(j)}getActiveConnections(j){return this._connectionStatusManager.getActiveConnectionProfiles(j)}getConnectionUriFromId(j){let ee=this._connectionStatusManager.findConnectionByProfileId(j);if(ee)return ee.ownerUri}saveProfileGroup(j){return this._telemetryService.sendActionEvent("Shell","AddServerGroup"),this._connectionStore.saveProfileGroup(j).then(ee=>{this._onAddConnectionProfile.fire(void 0),j.id=ee;const X=this.getConnectionGroupById(j.parentId);return this._onConnectionProfileGroupCreated.fire(g.ConnectionProfileGroup.createConnectionProfileGroup(j,X)),ee})}getAdvancedProperties(){let j=this._capabilitiesService.providers;if(j){let ee=(0,M.values)(j)[0];if(ee.connection)return ee.connection.connectionOptions}}hasRegisteredServers(){const j=this.getConnectionGroups();return this.doHasRegisteredServers(j)}doHasRegisteredServers(j){if(!j||j.length===0)return!1;for(let ee=0;j.length;++ee){let X=j[ee];if(!X)return!1;if(X.connections&&X.connections.length>0||this.doHasRegisteredServers(X.children))return!0}return!1}getConnectionUri(j){return this._connectionStatusManager.getOriginalOwnerUri(T.generateUri(j))}getFormattedUri(j,ee){return this._connectionStatusManager.isDefaultTypeUri(j)?this.getConnectionUri(ee):j}doChangeLanguageFlavor(j,ee,X){if(this._providers.has(X))this._uriToProvider[j]=X,this._onLanguageFlavorChanged.fire({uri:j,language:ee,flavor:X});else throw new Error(`provider "${X}" is not registered`)}ensureDefaultLanguageFlavor(j){if(this.getProviderIdFromUri(j)===""){let ee=this.getDefaultProviderId();ee&&this.doChangeLanguageFlavor(j,"sql",ee)}}getDefaultProviderId(){let j=y.getSqlConfigValue(this._configurationService,f.defaultEngine);return j&&this._providers.has(j)?j:void 0}getDefaultAuthenticationTypeId(j){return this._capabilitiesService.getCapabilities(j)?.connection.connectionOptions?.find(te=>te.specialValueType===o.ConnectionOptionSpecialType.authType)?y.getSqlConfigValue(this._configurationService,f.defaultAuthenticationType):void 0}getAzureResourceForConnection(j){if(this.isPowerBiConnection(j))return o.AzureResource.PowerBi;let ee=this._providers.get(j.providerName);if(!ee||!ee.properties||!ee.properties.azureResource)return this._logService.warn(`Connection provider '${j.providerName}' is incorrectly registered, defaulting to 'SQL' Azure resource. Provider must specify applicable 'azureResource' in 'connectionProvider' configuration.`),o.AzureResource.Sql;let X=$._azureResources.find(te=>o.AzureResource[te]===ee.properties.azureResource);return X||o.AzureResource.Sql}isPowerBiConnection(j){if(!j||!j.serverName||j.serverName.length===0)return!1;let ee=["pbidedicated.windows.net","pbidedicated.cloudapi.de","pbidedicated.usgovcloudapi.net","pbidedicated.chinacloudapi.cn","pbidedicated.windows-int.net"],X=j.serverName.toLowerCase();return!!ee.find(te=>X.indexOf(te)>=0)}async fillInOrClearToken(j){if(j.authenticationType!==f.AuthenticationType.AzureMFA&&j.authenticationType!==f.AuthenticationType.AzureMFAAndUser&&j.authenticationType!==f.AuthenticationType.DSTSAuth)return j.options.azureAccountToken=void 0,j.options.expiresOn=void 0,!0;let ee=this.getAzureResourceForConnection(j);const X=await this._accountManagementService.getAccounts();if(j.authenticationType===f.AuthenticationType.DSTSAuth){let Z=X.filter(re=>re.key.providerId.startsWith("dstsAuth"));if(Z.length<=0)return j.options.azureAccountToken=void 0,j.options.expiresOn=void 0,!1;Z[0].key.providerArgs={serverName:j.serverName,databaseName:j.databaseName};let se=await this._accountManagementService.getAccountSecurityToken(Z[0],void 0,void 0);return j.options.azureAccountToken=se.token,!0}const te=X.filter(Z=>Z.key.providerId.startsWith("azure"));if(te&&te.length>0){let Z=j.authenticationType===f.AuthenticationType.AzureMFA||j.authenticationType===f.AuthenticationType.AzureMFAAndUser?j.azureAccount??j.userName:j.userName,se=te.find(re=>re.key.accountId===Z||re.displayInfo.email?.toLocaleLowerCase()===Z?.toLocaleLowerCase());if(se){if(this._logService.debug(`Getting security token for Azure account ${se.key.accountId}`),se.isStale){this._logService.debug("Account is stale - refreshing");try{se=await this._accountManagementService.refreshAccount(se)}catch(le){return this._logService.info(`Exception refreshing stale account : ${(0,x.toErrorMessage)(le,!0)}`),!1}}const re=j.azureTenantId,oe=await this._accountManagementService.getAccountSecurityToken(se,re,ee);if(!oe)this._logService.warn("No security tokens found for account");else return this._logService.debug(`Got access token for tenant ${re} that expires in ${(oe.expiresOn-new Date().getTime())/1e3} seconds`),j.options.azureAccountToken=oe.token,j.options.expiresOn=oe.expiresOn,j.options.password="",!0}else this._logService.info(`Could not find Azure account with name ${Z}`)}else this._logService.info(`Could not find any Azure accounts from accounts : [${X.map(Z=>`${Z.key.accountId} (${Z.key.providerId})`).join(",")}]`);return!1}async refreshAzureAccountTokenIfNecessary(j){if(!j)return this._logService.warn("refreshAzureAccountTokenIfNecessary: Neither Connection uri nor connection profile received."),!1;let ee,X;if(typeof j=="string"){if(ee=j,X=this._connectionStatusManager.getConnectionProfile(ee),!X)return this._logService.warn(`Connection not found for uri ${ee} when refreshing token`),!1}else X=j,ee=this.getConnectionUri(X);const te=this._uriToReconnectPromiseMap[ee];if(te){this._logService.debug(`Found pending reconnect promise for uri ${ee}, waiting.`);try{const Z=await te;if(Z&&Z.connected)return this._logService.debug(`Previous pending reconnection for uri ${ee} succeeded.`),!0;this._logService.debug(`Previous pending reconnection for uri ${ee} failed.`)}catch(Z){this._logService.debug(`Previous pending reconnect promise for uri ${ee} is rejected with error ${Z}, will attempt to reconnect if necessary.`)}}if(X&&X.authenticationType===f.AuthenticationType.AzureMFA){if((0,G.isMssqlAuthProviderEnabled)(X.providerName,this._configurationService))return await this.fillInOrClearToken(X),!0;const Z=X.options.expiresOn;if(typeof Z=="number"&&!Number.isNaN(Z)){const se=new Date().getTime()/1e3,re=2*60;if(Z-se<re){this._logService.debug(`Access token expired for connection ${X.id} with uri ${ee}`);try{const oe=this.connect(X,ee);this._uriToReconnectPromiseMap[ee]=oe;const le=await oe;if(le){if(!le.connected)throw this._logService.error(`Failed to refresh connection ${X.id} with uri ${ee}, error code: ${le.errorCode}, error message: ${le.errorMessage}`),new Error(d.localize(5,null))}else throw this._logService.error(`Failed to refresh connection ${X.id} with uri ${ee}, invalid connection result.`),new Error(d.localize(4,null));return this._logService.debug(`Successfully refreshed token for connection ${X.id} with uri ${ee}, result: ${le.connected} ${le.connectionProfile}, ${this._connectionStatusManager.getConnectionProfile(ee)}`),!0}finally{delete this._uriToReconnectPromiseMap[ee]}}else this._logService.debug(`No need to refresh Azure acccount token for connection ${X.id} with uri ${ee}`)}else this._logService.warn(`Invalid expiry time ${Z} for connection ${X.id} with uri ${ee}`);return!0}else return!1}async sendConnectRequest(j,ee){let X=Object.assign({},{options:j.options});if(await this._extensionService.activateByEvent(`onConnect:${j.providerName}`),this._providers.get(j.providerName)===void 0)throw await this.handleUnsupportedProvider(j.providerName),new Error(d.localize(6,null,j.providerName));return this._providers.get(j.providerName).onReady.then(te=>{te.connect(ee,X),this._onConnectRequestSent.fire();const Z=this._editorService.findEditors(F.URI.parse(ee));if(Z&&Z[0]?.editor){const se=Z[0].editor,re=se instanceof V.QueryEditorInput&&se.state.isSqlCmdMode?"sqlcmd":"sql";this.doChangeLanguageFlavor(ee,re,j.providerName)}return!0})}sendDisconnectRequest(j){let ee=this.getProviderIdFromUri(j);return ee?this._providers.get(ee).onReady.then(X=>(X.disconnect(j),!0)):Promise.resolve(!1)}async sendChangePasswordRequest(j,ee,X){let te=Object.assign({},{options:j.options});return this._providers.get(j.providerName).onReady.then(Z=>Z.changePassword(ee,te,X).then(se=>se))}sendCancelRequest(j){let ee=this.getProviderIdFromUri(j);return ee?this._providers.get(ee).onReady.then(X=>(X.cancelConnect(j),!0)):Promise.resolve(!1)}sendListDatabasesRequest(j){let ee=this.getProviderIdFromUri(j);return ee?this._providers.get(ee).onReady.then(X=>X.listDatabases(j)):Promise.resolve(void 0)}async saveToSettings(j,ee,X){const te=await this._connectionStore.saveProfile(ee,void 0,X);return this._connectionStatusManager.updateConnectionProfile(te,j)}tryAddActiveConnection(j,ee,X){ee&&X?this._connectionStore.addRecentConnection(ee).then(()=>{j.connectHandler(!0)},te=>{j.connectHandler(!1,te)}):j.connectHandler(!1)}onConnectionComplete(j,ee){let X=this._connectionStatusManager.onConnectionComplete(ee);if(ee.connectionId){ee.connectionSummary&&ee.connectionSummary.databaseName&&this._connectionStatusManager.updateDatabaseName(ee),X.serverInfo=ee.serverInfo,X.serverConnectionId=ee.serverConnectionId,X.extensionTimer.stop(),X.connectHandler(!0),this._telemetryService.createActionEvent("Shell","DatabaseConnected").withConnectionInfo(X.connectionProfile).withServerInfo(X.serverInfo).withAdditionalMeasurements({extensionConnectionTimeMs:X.extensionTimer.elapsed()-X.serviceTimer.elapsed(),serviceConnectionTimeMs:X.serviceTimer.elapsed()}).send(),this._connectionStatusManager.isDefaultTypeUri(ee.ownerUri)&&this._connectionGlobalStatus.setStatusToConnected(ee.connectionSummary);const te=X.connectionProfile.getOptionsKey();if(ee.isSupportedVersion===!1&&this._connectionsGotUnsupportedVersionWarning.indexOf(te)===-1&&this._configurationService.getValue("connection.showUnsupportedServerVersionWarning")){const Z=d.localize(7,null);this._connectionsGotUnsupportedVersionWarning.push(te),this._notificationService.prompt(L.Severity.Warning,`${Z} ${ee.unsupportedVersionMessage??""}`,[{label:d.localize(8,null),run:()=>{this._configurationService.updateValue("connection.showUnsupportedServerVersionWarning",!1).catch(se=>p.onUnexpectedError(se))}}])}}else X.connectHandler(!1,ee.errorMessage,ee.errorNumber,ee.messages),this._telemetryService.createErrorEvent("Shell","DatabaseConnectionError",ee.errorNumber?.toString()).withConnectionInfo(X.connectionProfile).withAdditionalMeasurements({extensionConnectionTimeMs:X.extensionTimer.elapsed()-X.serviceTimer.elapsed(),serviceConnectionTimeMs:X.serviceTimer.elapsed()}).send()}onConnectionChangedNotification(j,ee){let X=this._connectionStatusManager.onConnectionChanged(ee);this._notifyConnectionChanged(X,ee.connectionUri)}_notifyConnectionChanged(j,ee){j&&this._onConnectionChanged.fire({connectionProfile:j,connectionUri:ee})}onIntelliSenseCacheComplete(j,ee){}async changeGroupIdForConnectionGroup(j,ee){this._telemetryService.sendActionEvent("Shell","MoveServerConnection"),await this._connectionStore.changeGroupIdForConnectionGroup(j,ee),this._onConnectionProfileGroupMoved.fire({source:j,oldGroupId:j.parentId,newGroupId:ee.id})}async changeGroupIdForConnection(j,ee){const X=j.groupId;let te=T.generateUri(j);this._telemetryService.sendActionEvent("Shell","MoveServerGroup"),await this._connectionStore.changeGroupIdForConnection(j,ee),this._onAddConnectionProfile.fire(j),te&&ee&&(j.groupId=ee),this.changeConnectionUri(T.generateUri(j),te),this._onConnectionProfileMoved.fire({source:j,oldGroupId:X,newGroupId:ee})}canChangeConnectionConfig(j,ee){return this._connectionStore.canChangeConnectionConfig(j,ee)}isRecent(j){let ee=this._connectionStore.getRecentlyUsedConnections();return ee=ee.filter(X=>j.id===X.id),ee.length>=1}disconnectEditor(j,ee=!1){if(this.isConnected(j.uri)){let X=this.getConnectionProfile(j.uri);return j.onDisconnect(),this.doDisconnect(j.uri,X)}else if(this.isConnecting(j.uri))return ee?(j.onDisconnect(),this.cancelEditorConnection(j)):this.shouldCancelConnect(j.uri).then(X=>X?(j.onDisconnect(),this.cancelEditorConnection(j)):!1);return j.onDisconnect(),Promise.resolve(!0)}changeConnectionUri(j,ee){this._connectionStatusManager.hasConnection(ee)&&(this._connectionStatusManager.changeConnectionUri(j,ee),this._uriToProvider[ee]&&(this._uriToProvider[j]=this._uriToProvider[ee],delete this._uriToProvider[ee]))}createNewConnection(j,ee){const X=this;return this._logService.info(`Creating new connection ${j}`),new Promise((te,Z)=>{let se=this._connectionStatusManager.addConnection(ee,j);se.connectHandler=(re,oe,le,ne)=>{let ce=this._connectionStatusManager.findConnection(j);ce&&ce.deleted?(this._logService.info(`Found deleted connection management info for ${j} - removing`),this._connectionStatusManager.deleteConnection(j),te({connected:re,errorMessage:void 0,errorCode:void 0,messageDetails:void 0,errorHandled:!0,connectionProfile:ee})):oe?(this._logService.info(`Error occurred while connecting, removing connection management info for ${j}`),this._connectionStatusManager.deleteConnection(j),te({connected:re,errorMessage:oe,errorCode:le,messageDetails:ne,connectionProfile:ee})):(ce.serverInfo&&(ee.options.isCloud=ce.serverInfo.isCloud),te({connected:re,errorMessage:oe,errorCode:le,messageDetails:ne,connectionProfile:ee}))},X.sendConnectRequest(ee,j).catch(re=>{this._logService.error(re),this._connectionStatusManager.removeConnection(j),Z(re)})})}shouldCancelConnect(j){let ee=[{key:d.localize(9,null),value:!0},{key:d.localize(10,null),value:!1}];return this._quickInputService.pick(ee.map(X=>X.key),{placeHolder:d.localize(11,null),ignoreFocusLost:!0}).then(X=>{let te=ee.find(Z=>Z.key===X);return te&&te.value})}doDisconnect(j,ee){let X=new m.DisconnectParams;return X.ownerUri=j,this.sendDisconnectRequest(j).then(te=>(te&&(this._logService.info(`Disconnect request sent for ${j} - deleting connection`),this._connectionStatusManager.deleteConnection(j),ee&&this._notifyDisconnected(ee,j),this._connectionStatusManager.isDefaultTypeUri(j)&&this._connectionGlobalStatus.setStatusToDisconnected(j)),te))}disconnect(j){let ee,X,te;return typeof j=="object"?(ee=T.generateUri(j),X=j,te=this.getConnectionInfo(ee)):typeof j=="string"&&(X=this.getConnectionProfile(j),te=this.getConnectionInfo(j),ee=j),this.doDisconnect(ee,X).then(Z=>{if(Z)this._telemetryService.createActionEvent("Shell","DatabaseDisconnected").withConnectionInfo(X).withServerInfo(te?.serverInfo).send(),this._connectionStatusManager.removeConnection(ee);else throw Z})}cancelConnection(j){let ee=T.generateUri(j);return this.cancelConnectionForUri(ee)}cancelConnectionForUri(j){let ee=new m.CancelConnectParams;return ee.ownerUri=j,this._logService.info(`Cancelling connection for URI ${j}`),this._connectionStatusManager.deleteConnection(j),this.sendCancelRequest(j)}cancelEditorConnection(j){let ee=j.uri;return this.isConnecting(ee)?this.cancelConnectionForUri(ee):Promise.resolve(!1)}isConnected(j,ee){return ee&&(j=T.generateUri(ee)),this._connectionStatusManager.isConnected(j)}findExistingConnection(j,ee){let X=T.generateUri(j,ee),te=this._connectionStatusManager.findConnection(X);if(te&&this._connectionStatusManager.isConnected(X))return te.connectionProfile}isProfileConnected(j){let ee=this._connectionStatusManager.findConnectionProfile(j);return ee&&!ee.connecting}isProfileConnecting(j){let ee=this._connectionStatusManager.findConnectionProfile(j);return ee&&ee.connecting}isConnecting(j){return this._connectionStatusManager.isConnecting(j)}getConnectionProfile(j){return this._connectionStatusManager.isConnected(j)?this._connectionStatusManager.getConnectionProfile(j):void 0}getConnectionInfo(j){return this._connectionStatusManager.isConnected(j)?this._connectionStatusManager.findConnection(j):void 0}updateServerConnectionId(j,ee){let X=this.getConnectionInfo(j),te=!1;return X&&X.serverConnectionId!==ee&&(te=!0,X.serverConnectionId=ee),te}async listDatabases(j){return await this.refreshAzureAccountTokenIfNecessary(j),this.isConnected(j)?this.sendListDatabasesRequest(j):Promise.resolve(void 0)}changeDatabase(j,ee){if(this.isConnected(j)){let X=this.getProviderIdFromUri(j);return X?this._providers.get(X).onReady.then(te=>te.changeDatabase(j,ee).then(Z=>(Z&&(this.getConnectionProfile(j).databaseName=ee),Z))):Promise.resolve(!1)}return Promise.resolve(!1)}editGroup(j){return this._connectionStore.editGroup(j).then(ee=>{this._onAddConnectionProfile.fire(void 0),this._onConnectionProfileGroupEdited.fire(j)})}async deleteConnection(j){this._telemetryService.createActionEvent("Shell","DeleteConnection").withAdditionalProperties({provider:j.providerName}).send();let ee=T.generateUri(j);return this.isConnected(ee)||this.isConnecting(ee)?this.doDisconnect(ee,j).then(X=>X?this._connectionStore.deleteConnectionFromConfiguration(j).then(()=>(this._onDeleteConnectionProfile.fire(),this._onConnectionProfileDeleted.fire(j),!0)):!1):this._connectionStore.deleteConnectionFromConfiguration(j).then(()=>(this._onDeleteConnectionProfile.fire(),this._onConnectionProfileDeleted.fire(j),!0))}deleteConnectionGroup(j){this._telemetryService.sendActionEvent("Shell","DeleteServerGroup");let ee=g.ConnectionProfileGroup.getConnectionsInGroup(j),X=[];return ee.forEach(te=>{let Z=T.generateUri(te);this.isConnected(Z)&&X.push(this.doDisconnect(Z,te))}),Promise.all(X).then(()=>this._connectionStore.deleteGroupFromConfiguration(j).then(()=>(this._onDeleteConnectionProfile.fire(),this._onConnectionProfileGroupDeleted.fire(j),!0))).catch(()=>!1)}_notifyDisconnected(j,ee){this._onDisconnect.fire({connectionUri:ee,connectionProfile:j})}rebuildIntelliSenseCache(j){if(this.isConnected(j)){let ee=this.getProviderIdFromUri(j);return ee?this._providers.get(ee).onReady.then(X=>X.rebuildIntelliSenseCache(j)):Promise.reject("No provider corresponding to the given URI")}return Promise.reject("The given URI is not currently connected")}getTabColorForUri(j){if(this._configurationService.getValue("queryEditor").tabColorMode==="off")return;let ee=this.getConnectionProfile(j);if(!ee)return;let X=this._connectionStore.getGroupFromId(ee.groupId);if(X)return X.color}removeConnectionProfileCredentials(j){return this._connectionStore.getProfileWithoutPassword(j)}async getConnectionCredentials(j){let ee=this.getActiveConnections().find(Z=>Z.id===j);if(!ee){if(ee=this.getConnections().find(Z=>Z.id===j),!ee)return;await this.addSavedPassword(ee)}let X=this._capabilitiesService.getCapabilities(ee.providerName).connection.connectionOptions.find(Z=>Z.specialValueType===o.ConnectionOptionSpecialType.password);if(!X)return;let te={};return te[X.name]=ee.options[X.name],te}getServerInfo(j){let ee=this._connectionStatusManager.findConnectionByProfileId(j);if(ee)return ee.serverInfo}getConnectionProfileById(j){let ee=this._connectionStatusManager.findConnectionByProfileId(j);if(ee)return ee.connectionProfile}getConnectionString(j,ee=!1){let X=this.getConnectionUriFromId(j);if(!X)return Promise.resolve(void 0);let te=this.getProviderIdFromUri(X);return te?this._providers.get(te).onReady.then(Z=>Z.getConnectionString(X,ee).then(se=>se)):Promise.resolve(void 0)}async buildConnectionInfo(j,ee){const X=this._providers.get(ee);if(!X)throw new Error(d.localize(12,null,ee));return(await X.onReady).buildConnectionInfo(j)}getProviderProperties(j){let ee=this._providers.get(j);return ee&&ee.properties}getProviderLanguageMode(j){return this._providers.get(j)?.properties?.languageMode||"sql"}getConnections(j){const ee=this.getActiveConnections(),X=te=>ee.find(Z=>Z.id===te.id)!==void 0;if(!j){this.getRecentConnections().forEach(Z=>{X(Z)||ee.push(Z)});const te=this.getConnectionGroups();te&&te.length>0&&te.forEach(Z=>{this.getConnectionsInGroup(Z).forEach(se=>{X(se)||ee.push(se)})})}return ee}getConnectionsInGroup(j){const ee=[];return j&&(j.connections&&j.connections.length>0&&ee.push(...j.connections),j.children&&j.children.length>0&&j.children.forEach(X=>ee.push(...this.getConnectionsInGroup(X)))),ee}async handleUnsupportedProvider(j){const ee=v.ConnectionProviderAndExtensionMap.get(j),X=ee?d.localize(13,null,ee):d.localize(14,null,j),te=await this._dialogService.confirm({message:X,type:"question"});if(te.confirmed)if(ee){const Z=new Promise(se=>{const re=this._capabilitiesService.onCapabilitiesRegistered(oe=>{oe.id===j&&(se(),re.dispose())})});await this._commandService.executeCommand("workbench.extensions.installExtension",ee),await Z}else await this._paneCompositePartService.openPaneComposite(B.VIEWLET_ID,0);return te.confirmed}};e.ConnectionManagementService=ie,e.ConnectionManagementService=ie=$=fe([O(0,C.IConnectionDialogService),O(1,l.IInstantiationService),O(2,n.IEditorService),O(3,N.IAdsTelemetryService),O(4,I.IConfigurationService),O(5,v.ICapabilitiesService),O(6,E.IQuickInputService),O(7,L.INotificationService),O(8,r.IResourceProviderService),O(9,H.IErrorDiagnosticsService),O(10,i.IAngularEventingService),O(11,u.IAccountManagementService),O(12,_.ILogService),O(13,A.IStorageService),O(14,P.IExtensionService),O(15,W.ICommandService),O(16,z.IPaneCompositePartService),O(17,K.IDialogService)],ie)}),define(Q[3988],Y([1,0,2523,70,92,13,81,21,104]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class m extends D.Action2{constructor(a,r){super(a),this.direction=r}run(a){const r=a.get(b.IWorkbenchLayoutService),i=a.get(y.IEditorGroupsService),s=a.get(v.IPaneCompositePartService),o=r.hasFocus("workbench.parts.editor"),u=r.hasFocus("workbench.parts.panel"),d=r.hasFocus("workbench.parts.sidebar"),p=r.hasFocus("workbench.parts.auxiliarybar");let c;if(o){if(this.navigateAcrossEditorGroup(this.toGroupDirection(this.direction),i))return;c=r.getVisibleNeighborPart("workbench.parts.editor",this.direction)}u&&(c=r.getVisibleNeighborPart("workbench.parts.panel",this.direction)),d&&(c=r.getVisibleNeighborPart("workbench.parts.sidebar",this.direction)),p&&(c=c=r.getVisibleNeighborPart("workbench.parts.auxiliarybar",this.direction)),c==="workbench.parts.editor"?this.navigateBackToEditorGroup(this.toGroupDirection(this.direction),i)||this.navigateToEditorGroup(this.direction===3?0:1,i):c==="workbench.parts.sidebar"?this.navigateToSidebar(r,s):c==="workbench.parts.panel"?this.navigateToPanel(r,s):c==="workbench.parts.auxiliarybar"&&this.navigateToAuxiliaryBar(r,s)}async navigateToPanel(a,r){if(!a.isVisible("workbench.parts.panel"))return!1;const i=r.getActivePaneComposite(1);if(!i)return!1;const s=i.getId(),o=await r.openPaneComposite(s,1,!0);return o||!1}async navigateToSidebar(a,r){if(!a.isVisible("workbench.parts.sidebar"))return!1;const i=r.getActivePaneComposite(0);if(!i)return!1;const s=i.getId();return!!await r.openPaneComposite(s,0,!0)}async navigateToAuxiliaryBar(a,r){if(!a.isVisible("workbench.parts.auxiliarybar"))return!1;const i=r.getActivePaneComposite(2);if(!i)return!1;const s=i.getId(),o=await r.openPaneComposite(s,2,!0);return o||!1}navigateAcrossEditorGroup(a,r){return this.doNavigateToEditorGroup({direction:a},r)}navigateToEditorGroup(a,r){return this.doNavigateToEditorGroup({location:a},r)}navigateBackToEditorGroup(a,r){if(!r.activeGroup)return!1;const i=this.toOppositeDirection(a);return r.findGroup({direction:i},r.activeGroup)?!1:(r.activeGroup.focus(),!0)}toGroupDirection(a){switch(a){case 1:return 1;case 2:return 2;case 3:return 3;case 0:return 0}}toOppositeDirection(a){switch(a){case 0:return 1;case 3:return 2;case 2:return 3;case 1:return 0}}doNavigateToEditorGroup(a,r){const i=r.findGroup(a,r.activeGroup);return i?(i.focus(),!0):!1}}(0,D.registerAction2)(class extends m{constructor(){super({id:"workbench.action.navigateLeft",title:{value:(0,t.localize)(0,null),original:"Navigate to the View on the Left"},category:T.Categories.View,f1:!0},2)}}),(0,D.registerAction2)(class extends m{constructor(){super({id:"workbench.action.navigateRight",title:{value:(0,t.localize)(1,null),original:"Navigate to the View on the Right"},category:T.Categories.View,f1:!0},3)}}),(0,D.registerAction2)(class extends m{constructor(){super({id:"workbench.action.navigateUp",title:{value:(0,t.localize)(2,null),original:"Navigate to the View Above"},category:T.Categories.View,f1:!0},0)}}),(0,D.registerAction2)(class extends m{constructor(){super({id:"workbench.action.navigateDown",title:{value:(0,t.localize)(3,null),original:"Navigate to the View Below"},category:T.Categories.View,f1:!0},1)}});class S extends D.Action2{constructor(a,r){super(a),this.focusNext=r}run(a){const r=a.get(b.IWorkbenchLayoutService),i=a.get(f.IEditorService);this.focusNextOrPreviousPart(r,i,this.focusNext)}findVisibleNeighbour(a,r,i){let s;switch(r){case"workbench.parts.editor":s=i?"workbench.parts.panel":"workbench.parts.sidebar";break;case"workbench.parts.panel":s=i?"workbench.parts.statusbar":"workbench.parts.editor";break;case"workbench.parts.statusbar":s=i?"workbench.parts.activitybar":"workbench.parts.panel";break;case"workbench.parts.activitybar":s=i?"workbench.parts.sidebar":"workbench.parts.statusbar";break;case"workbench.parts.sidebar":s=i?"workbench.parts.editor":"workbench.parts.activitybar";break;default:s="workbench.parts.editor"}return a.isVisible(s)||s==="workbench.parts.editor"?s:this.findVisibleNeighbour(a,s,i)}focusNextOrPreviousPart(a,r,i){let s;r.activeEditorPane?.hasFocus()||a.hasFocus("workbench.parts.editor")?s="workbench.parts.editor":a.hasFocus("workbench.parts.activitybar")?s="workbench.parts.activitybar":a.hasFocus("workbench.parts.statusbar")?s="workbench.parts.statusbar":a.hasFocus("workbench.parts.sidebar")?s="workbench.parts.sidebar":a.hasFocus("workbench.parts.panel")&&(s="workbench.parts.panel"),a.focusPart(s?this.findVisibleNeighbour(a,s,i):"workbench.parts.editor")}}(0,D.registerAction2)(class extends S{constructor(){super({id:"workbench.action.focusNextPart",title:{value:(0,t.localize)(4,null),original:"Focus Next Part"},category:T.Categories.View,f1:!0,keybinding:{primary:64,weight:200}},!0)}}),(0,D.registerAction2)(class extends S{constructor(){super({id:"workbench.action.focusPreviousPart",title:{value:(0,t.localize)(5,null),original:"Focus Previous Part"},category:T.Categories.View,f1:!0,keybinding:{primary:1088,weight:200}},!1)}})}),define(Q[1385],Y([1,0,32,2532,13,8,77,81,82,46,92,104]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleAuxiliaryBarAction=void 0;const a=(0,T.registerIcon)("auxiliarybar-right-layout-icon",t.Codicon.layoutSidebarRight,(0,y.localize)(0,null)),r=(0,T.registerIcon)("auxiliarybar-right-off-layout-icon",t.Codicon.layoutSidebarRightOff,(0,y.localize)(1,null)),i=(0,T.registerIcon)("auxiliarybar-left-layout-icon",t.Codicon.layoutSidebarLeft,(0,y.localize)(2,null)),s=(0,T.registerIcon)("auxiliarybar-left-off-layout-icon",t.Codicon.layoutSidebarLeftOff,(0,y.localize)(3,null));class o extends b.Action2{static{this.ID="workbench.action.toggleAuxiliaryBar"}static{this.LABEL=(0,y.localize)(4,null)}constructor(){super({id:o.ID,title:{value:o.LABEL,original:"Toggle Secondary Side Bar Visibility"},toggled:{condition:v.AuxiliaryBarVisibleContext,title:(0,y.localize)(5,null),mnemonicTitle:(0,y.localize)(6,null)},category:f.Categories.View,f1:!0,keybinding:{weight:200,primary:2592},menu:[{id:b.MenuId.LayoutControlMenuSubmenu,group:"0_workbench_layout",order:1},{id:b.MenuId.MenubarAppearanceMenu,group:"2_workbench_layout",order:2}]})}async run(d){const p=d.get(S.IWorkbenchLayoutService);p.setPartHidden(p.isVisible("workbench.parts.auxiliarybar"),"workbench.parts.auxiliarybar")}}e.ToggleAuxiliaryBarAction=o,(0,b.registerAction2)(o),(0,b.registerAction2)(class un extends b.Action2{static{this.ID="workbench.action.focusAuxiliaryBar"}static{this.LABEL=(0,y.localize)(7,null)}constructor(){super({id:un.ID,title:{value:un.LABEL,original:"Focus into Secondary Side Bar"},category:f.Categories.View,f1:!0})}async run(d){const p=d.get(h.IPaneCompositePartService),c=d.get(S.IWorkbenchLayoutService);c.isVisible("workbench.parts.auxiliarybar")||c.setPartHidden(!1,"workbench.parts.auxiliarybar"),p.getActivePaneComposite(2)?.focus()}}),b.MenuRegistry.appendMenuItems([{id:b.MenuId.LayoutControlMenu,item:{group:"0_workbench_toggles",command:{id:o.ID,title:(0,y.localize)(8,null),toggled:{condition:v.AuxiliaryBarVisibleContext,icon:i},icon:s},when:D.ContextKeyExpr.and(D.ContextKeyExpr.or(D.ContextKeyExpr.equals("config.workbench.layoutControl.type","toggles"),D.ContextKeyExpr.equals("config.workbench.layoutControl.type","both")),D.ContextKeyExpr.equals("config.workbench.sideBar.location","right")),order:0}},{id:b.MenuId.LayoutControlMenu,item:{group:"0_workbench_toggles",command:{id:o.ID,title:(0,y.localize)(9,null),toggled:{condition:v.AuxiliaryBarVisibleContext,icon:a},icon:r},when:D.ContextKeyExpr.and(D.ContextKeyExpr.or(D.ContextKeyExpr.equals("config.workbench.layoutControl.type","toggles"),D.ContextKeyExpr.equals("config.workbench.layoutControl.type","both")),D.ContextKeyExpr.equals("config.workbench.sideBar.location","left")),order:2}},{id:b.MenuId.ViewTitleContext,item:{group:"3_workbench_layout_move",command:{id:o.ID,title:{value:(0,y.localize)(10,null),original:"Hide Secondary Side Bar"}},when:D.ContextKeyExpr.and(v.AuxiliaryBarVisibleContext,D.ContextKeyExpr.equals("viewLocation",(0,m.ViewContainerLocationToString)(2))),order:2}}])}),define(Q[3989],Y([1,0,2572,13,92,81,104,1062]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FocusSideBarAction=void 0;class f extends y.Action2{constructor(){super({id:"workbench.action.focusSideBar",title:{value:(0,t.localize)(0,null),original:"Focus into Primary Side Bar"},category:D.Categories.View,f1:!0,keybinding:{weight:200,when:null,primary:2069}})}async run(m){const S=m.get(b.IWorkbenchLayoutService),h=m.get(T.IPaneCompositePartService);if(!S.isVisible("workbench.parts.sidebar")){S.setPartHidden(!1,"workbench.parts.sidebar");return}h.getActivePaneComposite(0)?.focus()}}e.FocusSideBarAction=f,(0,y.registerAction2)(f)}),define(Q[3990],Y([1,0,347,2700,118,95,23,11,104]),function(q,e,t,y,b,D,T,f,v){"use strict";var m,S;Object.defineProperty(e,"__esModule",{value:!0}),e.ManageExtensionsQuickAccessProvider=e.InstallExtensionQuickAccessProvider=void 0;let h=class extends t.PickerQuickAccessProvider{static{m=this}static{this.PREFIX="ext install "}constructor(s,o,u,d,p){super(m.PREFIX),this.paneCompositeService=s,this.galleryService=o,this.extensionsService=u,this.notificationService=d,this.logService=p}_getPicks(s,o,u){if(!s)return[{label:(0,y.localize)(0,null)}];const d={label:(0,y.localize)(1,null,s),accept:()=>this.searchExtension(s)};return/\./.test(s)?this.getPicksForExtensionId(s,d,u):[d]}async getPicksForExtensionId(s,o,u){try{const[d]=await this.galleryService.getExtensions([{id:s}],u);return u.isCancellationRequested?[]:d?[{label:(0,y.localize)(2,null,s),accept:()=>this.installExtension(d,s)}]:[o]}catch(d){return u.isCancellationRequested?[]:(this.logService.error(d),[o])}}async installExtension(s,o){try{await r(this.paneCompositeService,`@id:${o}`),await this.extensionsService.installFromGallery(s)}catch(u){this.notificationService.error(u)}}async searchExtension(s){r(this.paneCompositeService,s)}};e.InstallExtensionQuickAccessProvider=h,e.InstallExtensionQuickAccessProvider=h=m=fe([O(0,v.IPaneCompositePartService),O(1,D.IExtensionGalleryService),O(2,D.IExtensionManagementService),O(3,T.INotificationService),O(4,f.ILogService)],h);let a=class extends t.PickerQuickAccessProvider{static{S=this}static{this.PREFIX="ext "}constructor(s){super(S.PREFIX),this.paneCompositeService=s}_getPicks(){return[{label:(0,y.localize)(3,null),accept:()=>r(this.paneCompositeService)}]}};e.ManageExtensionsQuickAccessProvider=a,e.ManageExtensionsQuickAccessProvider=a=S=fe([O(0,v.IPaneCompositePartService)],a);async function r(i,s=""){const u=(await i.openPaneComposite(b.VIEWLET_ID,0,!0))?.getViewPaneContainer();u?.search(s),u?.focus()}}),define(Q[3991],Y([1,0,48,73,2746,8,28,23,118,49,104,74]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0});async function a(r,i){const s=await r.openPaneComposite(v.VIEWLET_ID,0,!0);s&&(s?.getViewPaneContainer()).search(i)}(0,t.registerEditorAction)(class extends t.EditorAction{constructor(){super({id:"editor.action.formatDocument.none",label:b.localize(0,null),alias:"Format Document",precondition:D.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasDocumentFormattingProvider.toNegated()),kbOpts:{kbExpr:y.EditorContextKeys.editorTextFocus,primary:1572,linux:{primary:3111},weight:100}})}async run(i,s){if(!s.hasModel())return;const o=i.get(T.ICommandService),u=i.get(S.IPaneCompositePartService),d=i.get(f.INotificationService),p=i.get(m.IDialogService),c=i.get(h.ILanguageFeaturesService),l=s.getModel(),n=c.documentFormattingEditProvider.all(l).length;if(n>1)return o.executeCommand("editor.action.formatDocument.multiple");if(n===1)return o.executeCommand("editor.action.formatDocument");if(l.isTooLargeForSyncing())d.warn(b.localize(1,null));else{const g=l.getLanguageId(),w=b.localize(2,null,g),{confirmed:E}=await p.confirm({message:w,primaryButton:b.localize(3,null)});E&&a(u,`category:formatters ${g}`)}}})}),define(Q[3992],Y([1,0,2768,16,45,18,95,23,63,24,118,3532,30,31,104,542,52,3967]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0});let p=class extends u.BaseLocalizationWorkbenchContribution{static{d=this}static{this.LANGUAGEPACK_SUGGESTION_IGNORE_STORAGE_KEY="extensionsAssistant/languagePackSuggestionIgnore"}constructor(n,g,w,E,C,I,_,A){super(),this.notificationService=n,this.localeService=g,this.productService=w,this.storageService=E,this.extensionManagementService=C,this.galleryService=I,this.paneCompositeService=_,this.telemetryService=A,this.checkAndInstall(),this._register(this.extensionManagementService.onDidInstallExtensions(k=>this.onDidInstallExtensions(k))),this._register(this.extensionManagementService.onDidUninstallExtension(k=>this.onDidUninstallExtension(k)))}async onDidInstallExtensions(n){for(const g of n)g.operation===2&&g.local&&await this.onDidInstallExtension(g.local,!!g.context?.extensionsSync)}async onDidInstallExtension(n,g){const w=n.manifest.contributes?.localizations?.[0];if(!w||D.language===w.languageId)return;const{languageId:E,languageName:C}=w;this.notificationService.prompt(v.default.Info,(0,t.localize)(0,null,this.productService.nameLong,C||E),[{label:(0,t.localize)(1,null),run:async()=>{await this.localeService.setLocale({id:E,label:C??E,extensionId:n.identifier.id},!0)}}],{sticky:!0,neverShowAgain:{id:"langugage.update.donotask",isSecondary:!0,scope:f.NeverShowAgainScope.APPLICATION}})}async onDidUninstallExtension(n){await this.isLocaleInstalled(D.language)||this.localeService.setLocale({id:"en",label:"English"})}async checkAndInstall(){const n=D.language;let g=D.locale??"";const w=JSON.parse(this.storageService.get(d.LANGUAGEPACK_SUGGESTION_IGNORE_STORAGE_KEY,-1,"[]"));if(!this.galleryService.isEnabled()||!n||!g||g==="en"||g.indexOf("en-")===0||g.startsWith(n)||w.includes(g)||await this.isLocaleInstalled(g))return;const C=g;let I=await this.galleryService.query({text:`tag:lp-${g}`},r.CancellationToken.None);if(I.total===0&&(g=g.split("-")[0],I=await this.galleryService.query({text:`tag:lp-${g}`},r.CancellationToken.None),I.total===0))return;const _=I.total===1?I.firstPage[0]:I.firstPage.find(H=>H.publisher==="MS-CEINTL"&&H.name.startsWith("vscode-language-pack")),A=_??I.firstPage[0];if(!A.assets.manifest)return;const[k,L]=await Promise.all([this.galleryService.getManifest(A,r.CancellationToken.None),this.galleryService.getCoreTranslation(A,g)]),R=k?.contributes?.localizations?.find(H=>g.startsWith(H.languageId.toLowerCase())),M=R&&R.languageName||g,N=R&&(R.localizedLanguageName||R.languageName)||g,P=L?.contents?.["vs/workbench/contrib/localization/electron-sandbox/minimalTranslations"]??{},x=_?"installAndRestartMessage":"showLanguagePackExtensions",F=!P[x],V={};Object.keys(h.minimumTranslatedStrings).forEach(H=>{!P[H]||F?V[H]=h.minimumTranslatedStrings[H].replace("{0}",()=>M):V[H]=`${P[H].replace("{0}",()=>N)} (${h.minimumTranslatedStrings[H].replace("{0}",()=>M)})`});const W=H=>{this.telemetryService.publicLog("languagePackSuggestion:popup",{userReaction:H,language:g})},z={label:V.searchMarketplace,run:async()=>{W("search");const H=await this.paneCompositeService.openPaneComposite(S.VIEWLET_ID,0,!0);if(!H)return;const U=H.getViewPaneContainer();U&&(U.search(`tag:lp-${g}`),U.focus())}},B={label:V.installAndRestart,run:async()=>{W("installAndRestart"),await this.localeService.setLocale({id:g,label:M,extensionId:_?.identifier.id,galleryExtension:_},!0)}},K=V[x];this.notificationService.prompt(v.default.Info,K,[_?B:z,{label:(0,t.localize)(2,null),isSecondary:!0,run:()=>{w.push(C),this.storageService.store(d.LANGUAGEPACK_SUGGESTION_IGNORE_STORAGE_KEY,JSON.stringify(w),-1,0),W("neverShowAgain")}}],{onCancel:()=>{W("cancelled")}})}async isLocaleInstalled(n){return(await this.extensionManagementService.getInstalled()).some(w=>!!w.manifest.contributes?.localizations?.length&&w.manifest.contributes.localizations.some(E=>n.startsWith(E.languageId.toLowerCase())))}};p=d=fe([O(0,f.INotificationService),O(1,s.ILocaleService),O(2,o.IProductService),O(3,m.IStorageService),O(4,T.IExtensionManagementService),O(5,T.IExtensionGalleryService),O(6,i.IPaneCompositePartService),O(7,a.ITelemetryService)],p),y.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(p,4)}),define(Q[1386],Y([1,0,20,14,31,32,6,4,33,2845,28,61,11,52,43,37,118,103,267,253,44,104,10,41,224]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KernelPickerMRUStrategy=void 0;function E(x){return"kernel"in x}function C(x){return"kernels"in x}function I(x){return"action"in x}function _(x){return x.id==="installSuggested"&&"extensionIds"in x}function A(x){return x.id==="install"}function k(x){return"command"in x}function L(x){return"autoRun"in x&&!!x.autoRun}const R=200;function M(x,F){const V={kernel:x,picked:x.id===F?.id,label:x.label,description:x.description,detail:x.detail};return x.id===F?.id&&(V.description?V.description=(0,m.localize)(1,null,V.description):V.description=(0,m.localize)(0,null)),V}class N{constructor(F,V,W,z,B,K,H,U,G){this._notebookKernelService=F,this._productService=V,this._quickInputService=W,this._labelService=z,this._logService=B,this._paneCompositePartService=K,this._extensionWorkbenchService=H,this._extensionService=U,this._commandService=G}async showQuickPick(F,V,W){const z=F.textModel,B=F.scopedContextKeyService,K=this._getMatchingResult(z),{selected:H,all:U}=K;let G;if(V){for(const te of U)if(te.id===V){G=te;break}if(!G)return this._logService.warn(`wanted kernel DOES NOT EXIST, wanted: ${V}, all: ${U.map(te=>te.id)}`),!1}if(G)return this._selecteKernel(z,G),!0;const $=this._quickInputService.createQuickPick(),ie=this._getKernelPickerQuickPickItems(z,K,this._notebookKernelService,B);if(ie.length===1&&L(ie[0])&&!W)return await this._handleQuickPick(F,ie[0],ie);$.items=ie,$.canSelectMany=!1,$.placeholder=H?(0,m.localize)(2,null,this._labelService.getUriLabel(z.uri,{relative:!0})):(0,m.localize)(3,null,this._labelService.getUriLabel(z.uri,{relative:!0})),$.busy=this._notebookKernelService.getKernelDetectionTasks(z).length>0;const J=this._notebookKernelService.onDidChangeKernelDetectionTasks(()=>{$.busy=this._notebookKernelService.getKernelDetectionTasks(z).length>0}),j=ie.length===0?(0,y.createCancelablePromise)(te=>this._showInstallKernelExtensionRecommendation(z,$,this._extensionWorkbenchService,te)):void 0,ee=T.Event.debounce(T.Event.any(this._notebookKernelService.onDidChangeSourceActions,this._notebookKernelService.onDidAddKernel,this._notebookKernelService.onDidRemoveKernel,this._notebookKernelService.onDidChangeNotebookAffinity),(te,Z)=>te,R)(async()=>{$.busy=!1,j?.cancel();const te=$.activeItems,Z=this._getMatchingResult(z),se=this._getKernelPickerQuickPickItems(z,Z,this._notebookKernelService,B);$.keepScrollPosition=!0;const re=[];for(const oe of te)if(E(oe)){const le=oe.kernel.id,ne=se.find(ce=>E(ce)&&ce.kernel.id===le);ne&&re.push(ne)}else if(I(oe)){const le=se.find(ne=>I(ne)&&ne.action.action.id===oe.action.action.id);le&&re.push(le)}$.items=se,$.activeItems=re},this),X=await new Promise((te,Z)=>{$.onDidAccept(()=>{const se=$.selectedItems[0];te(se?{selected:se,items:$.items}:{selected:void 0,items:$.items}),$.hide()}),$.onDidHide(()=>{J.dispose(),ee.dispose(),$.dispose(),te({selected:void 0,items:$.items})}),$.show()});return X.selected?await this._handleQuickPick(F,X.selected,X.items):!1}_getMatchingResult(F){return this._notebookKernelService.getMatchingKernel(F)}async _handleQuickPick(F,V,W){if(E(V)){const z=V.kernel;return this._selecteKernel(F.textModel,z),!0}return A(V)?await this._showKernelExtension(this._paneCompositePartService,this._extensionWorkbenchService,this._extensionService,F.textModel.viewType,[]):_(V)?await this._showKernelExtension(this._paneCompositePartService,this._extensionWorkbenchService,this._extensionService,F.textModel.viewType,V.extensionIds,this._productService.quality!=="stable"):I(V)&&V.action.runAction(),!0}_selecteKernel(F,V){this._notebookKernelService.selectKernelForNotebook(V,F)}async _showKernelExtension(F,V,W,z,B,K){const H=[],U=[];for(const J of B){const j=(await V.getExtensions([{id:J}],b.CancellationToken.None))[0];j.enablementState===6||j.enablementState===7||j.enablementState===2?U.push(j):await V.canInstall(j)&&H.push(j)}if(H.length||U.length){await Promise.all([...H.map(async J=>{await V.install(J,{installPreReleaseVersion:K??!1,context:{skipWalkthrough:!0}},15)}),...U.map(async J=>{switch(J.enablementState){case 7:await V.setEnablement([J],9);return;case 6:await V.setEnablement([J],8);return;case 2:await V.setEnablement([J],3);return;default:break}})]),await W.activateByEvent(`onNotebook:${z}`);return}const $=(await F.openPaneComposite(o.VIEWLET_ID,0,!0))?.getViewPaneContainer(),ie=z.split(/[^a-z0-9]/ig).map(v.uppercaseFirstLetter).join("");$?.search(`@tag:notebookKernel${ie}`)}async _showInstallKernelExtensionRecommendation(F,V,W,z){V.busy=!0;const B=await this._getKernelRecommendationsQuickPickItems(F,W);V.busy=!1,!z.isCancellationRequested&&B&&V.items.length===0&&(V.items=B)}async _getKernelRecommendationsQuickPickItems(F,V){const W=[],z=this.getSuggestedLanguage(F),B=z?this.getSuggestedKernelFromLanguage(F.viewType,z):void 0;if(B){if(await V.queryLocal(),V.installed.filter(H=>(H.enablementState===3||H.enablementState===8||H.enablementState===9)&&B.extensionIds.includes(H.identifier.id)).length===B.extensionIds.length)return;W.push({id:"installSuggested",description:B.displayName??B.extensionIds.join(", "),label:`$(${D.Codicon.lightbulb.id}) `+(0,m.localize)(4,null),extensionIds:B.extensionIds})}return W.push({id:"install",label:(0,m.localize)(5,null)}),W}getSuggestedLanguage(F){let W=F.metadata.custom?.metadata?.language_info?.name;if(!W){const z=F.cells.map(B=>B.language).filter(B=>B!=="markdown");if(z.length>1){const B=z[0];z.every(K=>K===B)&&(W=B)}}return W}getSuggestedKernelFromLanguage(F,V){return u.KERNEL_RECOMMENDATIONS.get(F)?.get(V)}}let P=class extends N{constructor(F,V,W,z,B,K,H,U,G,$,ie){super(F,V,W,z,B,K,H,U,G),this._notebookKernelHistoryService=$,this._openerService=ie}_getKernelPickerQuickPickItems(F,V,W,z){const B=[];if(V.selected){const H=M(V.selected,V.selected);B.push(H)}V.suggestions.filter(H=>H.id!==V.selected?.id).map(H=>M(H,V.selected)).forEach(H=>{B.push(H)});const K=B.length===0;return B.length>0&&B.push({type:"separator"}),B.push({id:"selectAnother",label:(0,m.localize)(6,null),autoRun:K}),B}_selecteKernel(F,V){const W=this._notebookKernelService.getMatchingKernel(F);W.selected&&this._notebookKernelHistoryService.addMostRecentKernel(W.selected),super._selecteKernel(F,V),this._notebookKernelHistoryService.addMostRecentKernel(V)}_getMatchingResult(F){const{selected:V,all:W}=this._notebookKernelHistoryService.getKernels(F),z=this._notebookKernelService.getMatchingKernel(F);return{selected:V,all:z.all,suggestions:W,hidden:[]}}async _handleQuickPick(F,V,W){return V.id==="selectAnother"?this.displaySelectAnotherQuickPick(F,W.length===1&&W[0]===V):super._handleQuickPick(F,V,W)}async displaySelectAnotherQuickPick(F,V){const W=F.textModel,z=new f.DisposableStore,B=this._quickInputService.createQuickPick(),K=await new Promise(H=>{B.title=V?(0,m.localize)(7,null):(0,m.localize)(8,null),B.placeholder=(0,m.localize)(9,null),B.busy=!0,B.buttons=[this._quickInputService.backButton],B.show(),z.add(B.onDidTriggerButton(U=>{U===this._quickInputService.backButton&&H(U)})),B.onDidTriggerItemButton(async U=>{if(k(U.item)&&U.item.documentation!==void 0){const G=n.URI.isUri(U.item.documentation)?n.URI.parse(U.item.documentation):await this._commandService.executeCommand(U.item.documentation);this._openerService.open(G,{openExternal:!0})}}),z.add(B.onDidAccept(async()=>{H(B.selectedItems[0])})),z.add(B.onDidHide(()=>{H(void 0)})),this._calculdateKernelSources(F).then(U=>{B.items=U,B.items.length>0&&(B.busy=!1)}),z.add(T.Event.debounce(T.Event.any(this._notebookKernelService.onDidChangeSourceActions,this._notebookKernelService.onDidAddKernel,this._notebookKernelService.onDidRemoveKernel),(U,G)=>U,R)(async()=>{B.busy=!0;const U=await this._calculdateKernelSources(F);B.items=U,B.busy=!1}))});if(B.hide(),z.dispose(),K===this._quickInputService.backButton)return this.showQuickPick(F,void 0,!0);if(K){const H=K;if(k(H))try{const U=await this._executeCommand(W,H.command);if(U){const{all:G}=await this._getMatchingResult(W),$=G.find(ie=>ie.id===`ms-toolsai.jupyter/${U}`);return $&&await this._selecteKernel(W,$),!0}else return this.displaySelectAnotherQuickPick(F,!1)}catch{return!1}else{if(E(H))return await this._selecteKernel(W,H.kernel),!0;if(C(H))return await this._selectOneKernel(W,H.source,H.kernels),!0;if(I(H))try{return await H.action.runAction(),!0}catch{return!1}else{if(A(H))return await this._showKernelExtension(this._paneCompositePartService,this._extensionWorkbenchService,this._extensionService,F.textModel.viewType,[]),!0;if(_(H))return await this._showKernelExtension(this._paneCompositePartService,this._extensionWorkbenchService,this._extensionService,F.textModel.viewType,H.extensionIds,this._productService.quality!=="stable"),this.displaySelectAnotherQuickPick(F,!1)}}}return!1}async _calculdateKernelSources(F){const V=F.textModel,W=this._notebookKernelService.getSourceActions(V,F.scopedContextKeyService),z=await this._notebookKernelService.getKernelSourceActions2(V),B=this._getMatchingResult(V);if(W.length===0&&B.all.length===0&&z.length===0)return await this._getKernelRecommendationsQuickPickItems(V,this._extensionWorkbenchService)??[];const K=B.all.filter(G=>G.extension.value!==u.JUPYTER_EXTENSION_ID),H=[];for(const G of(0,t.groupBy)(K,($,ie)=>$.extension.value===ie.extension.value?0:1)){const $=this._extensionService.extensions.find(J=>J.identifier.value===G[0].extension.value),ie=$?.displayName??$?.description??G[0].extension.value;G.length>1?H.push({label:ie,kernels:G}):H.push({label:G[0].label,kernel:G[0]})}const U=z.filter(G=>G.command);H.push(...U.map(G=>{const $=G.documentation?[{iconClass:s.ThemeIcon.asClassName(D.Codicon.info),tooltip:(0,m.localize)(10,null)}]:[];return{id:typeof G.command=="string"?G.command:G.command.id,label:G.label,description:G.description,command:G.command,documentation:G.documentation,buttons:$}}));for(const G of W){const $={action:G,picked:!1,label:G.action.label,tooltip:G.action.tooltip};H.push($)}return H}async _selectOneKernel(F,V,W){const z=W.map(K=>M(K,void 0)),B=this._quickInputService.createQuickPick();B.items=z,B.canSelectMany=!1,B.title=(0,m.localize)(11,null,V),B.onDidAccept(async()=>{B.selectedItems&&B.selectedItems.length>0&&E(B.selectedItems[0])&&await this._selecteKernel(F,B.selectedItems[0].kernel),B.hide(),B.dispose()}),B.onDidHide(()=>{B.dispose()}),B.show()}async _executeCommand(F,V){const W=typeof V=="string"?V:V.id,z=typeof V=="string"?[]:V.arguments??[];return(typeof V=="string"||!V.arguments||!Array.isArray(V.arguments)||V.arguments.length===0)&&z.unshift({uri:F.uri,$mid:14}),typeof V=="string"?this._commandService.executeCommand(W):this._commandService.executeCommand(W,...z)}static updateKernelStatusAction(F,V,W,z){if(W.getKernelDetectionTasks(F).length){const G=W.getMatchingKernel(F);if(V.enabled=!0,V.class=s.ThemeIcon.asClassName(s.ThemeIcon.modify(d.executingStateIcon,"spin")),G.selected){V.label=G.selected.label;const $=G.selected.description??G.selected.detail;V.tooltip=$?(0,m.localize)(12,null,$):(0,m.localize)(13,null)}else V.label=(0,m.localize)(14,null);return}const K=W.getRunningSourceActions(F),H=(G,$)=>{const ie=G.action;V.class=$?s.ThemeIcon.asClassName(s.ThemeIcon.modify(d.executingStateIcon,"spin")):s.ThemeIcon.asClassName(d.selectKernelIcon),V.label=ie.label,V.enabled=!0};if(K.length)return H(K[0],!0);const{selected:U}=z.getKernels(F);U?(V.label=U.label,V.class=s.ThemeIcon.asClassName(d.selectKernelIcon),V.tooltip=U.description??U.detail??""):(V.label=(0,m.localize)(15,null),V.class=s.ThemeIcon.asClassName(d.selectKernelIcon),V.tooltip="")}static async resolveKernel(F,V,W,z){const B=W.getKernels(F);if(B.selected)return B.selected;await z.executeCommand(w.SELECT_KERNEL_ID);const{selected:K}=W.getKernels(F);return K}};e.KernelPickerMRUStrategy=P,e.KernelPickerMRUStrategy=P=fe([O(0,p.INotebookKernelService),O(1,r.IProductService),O(2,i.IQuickInputService),O(3,h.ILabelService),O(4,a.ILogService),O(5,l.IPaneCompositePartService),O(6,o.IExtensionsWorkbenchService),O(7,c.IExtensionService),O(8,S.ICommandService),O(9,p.INotebookKernelHistoryService),O(10,g.IOpenerService)],P)}),define(Q[3993],Y([1,0,4,2828,28,11,138,1386,71,211,253]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookExecutionService=void 0;let h=class{constructor(r,i,s,o,u,d){this._commandService=r,this._notebookKernelService=i,this._notebookKernelHistoryService=s,this._workspaceTrustRequestService=o,this._logService=u,this._notebookExecutionStateService=d,this.cellExecutionParticipants=new Set}async executeNotebookCells(r,i,s){const o=Array.from(i).filter(n=>n.cellKind===v.CellKind.Code);if(!o.length)return;this._logService.debug(`NotebookExecutionService#executeNotebookCells ${JSON.stringify(o.map(n=>n.handle))}`);const u=y.localize(0,null);if(!await this._workspaceTrustRequestService.requestWorkspaceTrust({message:u}))return;const p=[];for(const n of o)this._notebookExecutionStateService.getCellExecution(n.uri)||p.push([n,this._notebookExecutionStateService.createCellExecution(r.uri,n.handle)]);const c=await f.KernelPickerMRUStrategy.resolveKernel(r,this._notebookKernelService,this._notebookKernelHistoryService,this._commandService);if(!c){p.forEach(n=>n[1].complete({}));return}this._notebookKernelHistoryService.addMostRecentKernel(c);const l=[];for(const[n,g]of p)c.supportedLanguages.includes(n.language)?l.push(g):g.complete({});if(l.length>0){await this.runExecutionParticipants(l),this._notebookKernelService.selectKernelForNotebook(c,r),await c.executeNotebookCellsRequest(r.uri,l.map(g=>g.cellHandle));const n=l.filter(g=>g.state===v.NotebookCellExecutionState.Unconfirmed);n.length&&(this._logService.debug(`NotebookExecutionService#executeNotebookCells completing unconfirmed executions ${JSON.stringify(n.map(g=>g.cellHandle))}`),n.forEach(g=>g.complete({})))}}async cancelNotebookCellHandles(r,i){const s=Array.from(i);this._logService.debug(`NotebookExecutionService#cancelNotebookCellHandles ${JSON.stringify(s)}`);const o=this._notebookKernelService.getSelectedOrSuggestedKernel(r);o&&await o.cancelNotebookCellExecution(r.uri,s)}async cancelNotebookCells(r,i){this.cancelNotebookCellHandles(r,Array.from(i,s=>s.handle))}registerExecutionParticipant(r){return this.cellExecutionParticipants.add(r),(0,t.toDisposable)(()=>this.cellExecutionParticipants.delete(r))}async runExecutionParticipants(r){for(const i of this.cellExecutionParticipants)await i.onWillExecuteCell(r)}dispose(){this._activeProxyKernelExecutionToken?.dispose(!0)}};e.NotebookExecutionService=h,e.NotebookExecutionService=h=fe([O(0,b.ICommandService),O(1,S.INotebookKernelService),O(2,S.INotebookKernelHistoryService),O(3,T.IWorkspaceTrustRequestService),O(4,D.ILogService),O(5,m.INotebookExecutionStateService)],h)}),define(Q[1387],Y([1,0,157,34,2846,13,8,112,5,37,224,103,267,1386,176,253,21]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebooKernelActionViewItem=void 0;function u(p,c){let l;if(c!==void 0&&"notebookEditorId"in c){const n=c.notebookEditorId,g=p.visibleEditorPanes.find(w=>(0,h.getNotebookEditorFromEditorPane)(w)?.getId()===n);l=(0,h.getNotebookEditorFromEditorPane)(g)}else c!==void 0&&"notebookEditor"in c?l=c?.notebookEditor:l=(0,h.getNotebookEditorFromEditorPane)(p.activeEditorPane);return l}(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:S.SELECT_KERNEL_ID,category:S.NOTEBOOK_ACTIONS_CATEGORY,title:{value:(0,b.localize)(0,null),original:"Select Notebook Kernel"},icon:a.selectKernelIcon,f1:!0,precondition:i.NOTEBOOK_IS_ACTIVE_EDITOR,menu:[{id:D.MenuId.EditorTitle,when:T.ContextKeyExpr.and(i.NOTEBOOK_IS_ACTIVE_EDITOR,T.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0)),group:"navigation",order:-10},{id:D.MenuId.NotebookToolbar,when:T.ContextKeyExpr.equals("config.notebook.globalToolbar",!0),group:"status",order:-10},{id:D.MenuId.InteractiveToolbar,when:i.NOTEBOOK_KERNEL_COUNT.notEqualsTo(0),group:"status",order:-10}],description:{description:(0,b.localize)(1,null),args:[{name:"kernelInfo",description:"The kernel info",schema:{type:"object",required:["id","extension"],properties:{id:{type:"string"},extension:{type:"string"},notebookEditorId:{type:"string"}}}}]}})}async run(p,c){const l=p.get(v.IInstantiationService),n=p.get(o.IEditorService),g=u(n,c);if(!g||!g.hasModel())return!1;let w=c&&"id"in c?c.id:void 0,E=c&&"extension"in c?c.extension:void 0;w&&(typeof w!="string"||typeof E!="string")&&(w=void 0,E=void 0);const C=g.textModel,_=p.get(s.INotebookKernelService).getMatchingKernel(C),{selected:A}=_;if(A&&w&&A.id===w&&f.ExtensionIdentifier.equals(A.extension,E))return!0;const k=w?`${E}/${w}`:void 0;return l.createInstance(r.KernelPickerMRUStrategy).showQuickPick(g,k)}});let d=class extends t.ActionViewItem{constructor(c,l,n,g){super(void 0,new y.Action("fakeAction",void 0,m.ThemeIcon.asClassName(a.selectKernelIcon),!0,w=>c.run(w)),{label:!1,icon:!0}),this._editor=l,this._notebookKernelService=n,this._notebookKernelHistoryService=g,this._register(l.onDidChangeModel(this._update,this)),this._register(n.onDidAddKernel(this._update,this)),this._register(n.onDidRemoveKernel(this._update,this)),this._register(n.onDidChangeNotebookAffinity(this._update,this)),this._register(n.onDidChangeSelectedNotebooks(this._update,this)),this._register(n.onDidChangeSourceActions(this._update,this)),this._register(n.onDidChangeKernelDetectionTasks(this._update,this))}render(c){this._update(),super.render(c),c.classList.add("kernel-action-view-item"),this._kernelLabel=document.createElement("a"),c.appendChild(this._kernelLabel),this.updateLabel()}updateLabel(){this._kernelLabel&&(this._kernelLabel.classList.add("kernel-label"),this._kernelLabel.innerText=this._action.label,this._kernelLabel.title=this._action.tooltip)}_update(){const c=this._editor.textModel;if(!c){this._resetAction();return}r.KernelPickerMRUStrategy.updateKernelStatusAction(c,this._action,this._notebookKernelService,this._notebookKernelHistoryService),this.updateClass()}_resetAction(){this._action.enabled=!1,this._action.label="",this._action.class=""}};e.NotebooKernelActionViewItem=d,e.NotebooKernelActionViewItem=d=fe([O(2,s.INotebookKernelService),O(3,s.INotebookKernelHistoryService)],d)}),define(Q[3994],Y([1,0,2877,43,347,46,237,119,8,128,33,38,13,81,104]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";var s;Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessViewPickerAction=e.OpenViewPickerAction=e.ViewQuickAccessProvider=void 0;let o=class extends b.PickerQuickAccessProvider{static{s=this}static{this.PREFIX="view "}constructor(c,l,n,g,w,E,C){super(s.PREFIX,{noResultsPick:{label:(0,t.localize)(0,null),containerLabel:""}}),this.viewDescriptorService=c,this.viewsService=l,this.outputService=n,this.terminalService=g,this.terminalGroupService=w,this.paneCompositeService=E,this.contextKeyService=C}_getPicks(c){const l=this.doGetViewPickItems().filter(E=>c?(E.highlights={label:(0,m.matchesFuzzy)(c,E.label,!0)??void 0},E.highlights.label||(0,S.fuzzyContains)(E.containerLabel,c)):!0),n=new Map;for(const E of l)n.has(E.label)||n.set(E.label,E.containerLabel);const g=[];let w;for(const E of l){if(w!==E.containerLabel){w=E.containerLabel;let C;n.has(w)?C=`${n.get(w)} / ${w}`:C=w,g.push({type:"separator",label:C})}g.push(E)}return g}doGetViewPickItems(){const c=[],l=(E,C)=>{const I=this.viewDescriptorService.getViewContainerModel(C),_=[];for(const A of I.allViewDescriptors)this.contextKeyService.contextMatchesRules(A.when)&&_.push({label:A.name,containerLabel:I.title,accept:()=>this.viewsService.openView(A.id,!0)});return _},n=(E,C)=>{const I=this.paneCompositeService.getPaneComposites(E),_=this.paneCompositeService.getVisiblePaneCompositeIds(E);I.sort((A,k)=>{let L=_.findIndex(M=>A.id===M),R=_.findIndex(M=>k.id===M);return L<0&&(L=I.indexOf(A)+_.length),R<0&&(R=I.indexOf(k)+_.length),L-R});for(const A of I)if(this.includeViewContainer(A)){const k=this.viewDescriptorService.getViewContainerById(A.id);k&&c.push({label:this.viewDescriptorService.getViewContainerModel(k).title,containerLabel:C,accept:()=>this.paneCompositeService.openPaneComposite(A.id,E,!0)})}};n(0,(0,t.localize)(1,null)),n(1,(0,t.localize)(2,null)),n(2,(0,t.localize)(3,null));const g=E=>{const C=this.paneCompositeService.getPaneComposites(E);for(const I of C){const _=this.viewDescriptorService.getViewContainerById(I.id);_&&c.push(...l(I,_))}};g(0),g(1),g(2),this.terminalGroupService.groups.forEach((E,C)=>{E.terminalInstances.forEach((I,_)=>{const A=(0,t.localize)(4,null,`${C+1}.${_+1}`,I.title);c.push({label:A,containerLabel:(0,t.localize)(5,null),accept:async()=>{await this.terminalGroupService.showPanel(!0),this.terminalService.setActiveInstance(I)}})})});const w=this.outputService.getChannelDescriptors();for(const E of w)c.push({label:E.label,containerLabel:(0,t.localize)(6,null),accept:()=>this.outputService.showChannel(E.id)});return c}includeViewContainer(c){const l=this.viewDescriptorService.getViewContainerById(c.id);return l?.hideIfEmpty?this.viewDescriptorService.getViewContainerModel(l).activeViewDescriptors.length>0:!0}};e.ViewQuickAccessProvider=o,e.ViewQuickAccessProvider=o=s=fe([O(0,D.IViewDescriptorService),O(1,D.IViewsService),O(2,T.IOutputService),O(3,f.ITerminalService),O(4,f.ITerminalGroupService),O(5,i.IPaneCompositePartService),O(6,v.IContextKeyService)],o);class u extends a.Action2{static{this.ID="workbench.action.openView"}constructor(){super({id:u.ID,title:{value:(0,t.localize)(7,null),original:"Open View"},category:r.Categories.View,f1:!0})}async run(c){c.get(y.IQuickInputService).quickAccess.show(o.PREFIX)}}e.OpenViewPickerAction=u;class d extends a.Action2{static{this.ID="workbench.action.quickOpenView"}static{this.KEYBINDING={primary:2095,mac:{primary:303},linux:{primary:0}}}constructor(){super({id:d.ID,title:{value:(0,t.localize)(8,null),original:"Quick Open View"},category:r.Categories.View,f1:!1,keybinding:{weight:200,when:void 0,...d.KEYBINDING}})}async run(c){const l=c.get(h.IKeybindingService),n=c.get(y.IQuickInputService),g=l.lookupKeybindings(d.ID);n.quickAccess.show(o.PREFIX,{quickNavigateConfiguration:{keybindings:g},itemActivation:y.ItemActivation.FIRST})}}e.QuickAccessViewPickerAction=d}),define(Q[3995],Y([1,0,223,4,35,46,1252,6,5,104]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActivityService=void 0;let S=class extends y.Disposable{constructor(r,i,s){super(),this.viewId=r,this.viewDescriptorService=i,this.activityService=s,this.activity=void 0,this.activityDisposable=y.Disposable.None,this._register(f.Event.filter(this.viewDescriptorService.onDidChangeContainer,o=>o.views.some(u=>u.id===r))(()=>this.update())),this._register(f.Event.filter(this.viewDescriptorService.onDidChangeLocation,o=>o.views.some(u=>u.id===r))(()=>this.update()))}setActivity(r){this.activity=r,this.update()}clearActivity(){this.activity=void 0,this.update()}update(){this.activityDisposable.dispose();const r=this.viewDescriptorService.getViewContainerByViewId(this.viewId);r&&this.activity&&(this.activityDisposable=this.activityService.showViewContainerActivity(r.id,this.activity))}dispose(){this.activityDisposable.dispose()}};S=fe([O(1,D.IViewDescriptorService),O(2,t.IActivityService)],S);let h=class{constructor(r,i,s){this.paneCompositeService=r,this.viewDescriptorService=i,this.instantiationService=s,this.viewActivities=new Map}showViewContainerActivity(r,{badge:i,clazz:s,priority:o}){const u=this.viewDescriptorService.getViewContainerById(r);if(u){const d=this.viewDescriptorService.getViewContainerLocation(u);if(d!==null)return this.paneCompositeService.showActivity(u.id,d,i,s,o)}return y.Disposable.None}showViewActivity(r,i){let s=this.viewActivities.get(r);s?s.id++:(s={id:1,activity:this.instantiationService.createInstance(S,r)},this.viewActivities.set(r,s));const o=s.id;s.activity.setActivity(i);const u=s;return(0,y.toDisposable)(()=>{u.id===o&&(u.activity.dispose(),this.viewActivities.delete(r))})}showAccountsActivity({badge:r,clazz:i,priority:s}){return this.paneCompositeService.showActivity(T.ACCOUNTS_ACTIVITY_ID,0,r,i,s)}showGlobalActivity({badge:r,clazz:i,priority:s}){return this.paneCompositeService.showActivity(T.GLOBAL_ACTIVITY_ID,0,r,i,s)}};e.ActivityService=h,e.ActivityService=h=fe([O(0,m.IPaneCompositePartService),O(1,D.IViewDescriptorService),O(2,v.IInstantiationService)],h),(0,b.registerSingleton)(t.IActivityService,h,1)}),define(Q[1388],Y([1,0,3093,20,33,18,128,443,13,290,38,691,1373,17,44,112]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingsEditorModel=e.KEYBINDING_ENTRY_TEMPLATE_ID=void 0,e.KEYBINDING_ENTRY_TEMPLATE_ID="keybinding.entry.template";const u=(0,t.localize)(0,null),d=(0,t.localize)(1,null),p=(0,t.localize)(2,null),c=(0,T.or)(T.matchesPrefix,T.matchesWords,T.matchesContiguousSubString),l=/@source:\s*(user|default|system|extension)/i,n=/@ext:\s*((".+")|([^\s]+))/i;let g=o=class extends m.EditorModel{constructor(C,I,_){super(),this.keybindingsService=I,this.extensionService=_,this._keybindingItems=[],this._keybindingItemsSortedByPrecedence=[],this.modifierLabels={ui:f.UILabelProvider.modifierLabels[C],aria:f.AriaLabelProvider.modifierLabels[C],user:f.UserSettingsLabelProvider.modifierLabels[C]}}fetch(C,I=!1){let _=I?this._keybindingItemsSortedByPrecedence:this._keybindingItems;const A=/@command:\s*(.+)/i.exec(C);if(A&&A[1])return _.filter(k=>k.command===A[1]).map(k=>({id:o.getId(k),keybindingItem:k,templateId:e.KEYBINDING_ENTRY_TEMPLATE_ID}));if(l.test(C))_=this.filterBySource(_,C),C=C.replace(l,"");else{const k=n.exec(C);if(k&&(k[2]||k[3])){const L=k[2]?k[2].substring(1,k[2].length-1):k[3];_=this.filterByExtension(_,L),C=C.replace(n,"")}else{const L=/@keybinding:\s*((\".+\")|(\S+))/i.exec(C);L&&(L[2]||L[3])&&(C=L[2]||`"${L[3]}"`)}}return C=C.trim(),C?this.filterByText(_,C):_.map(k=>({id:o.getId(k),keybindingItem:k,templateId:e.KEYBINDING_ENTRY_TEMPLATE_ID}))}filterBySource(C,I){return/@source:\s*default/i.test(I)||/@source:\s*system/i.test(I)?C.filter(_=>_.source===u):/@source:\s*user/i.test(I)?C.filter(_=>_.source===p):/@source:\s*extension/i.test(I)?C.filter(_=>!(0,r.isString)(_.source)||_.source===d):C}filterByExtension(C,I){return I=I.toLowerCase().trim(),C.filter(_=>!(0,r.isString)(_.source)&&(s.ExtensionIdentifier.equals(_.source.identifier,I)||_.source.displayName?.toLowerCase()===I.toLowerCase()))}filterByText(C,I){const _=I.charAt(0)==='"',A=I.charAt(I.length-1)==='"',k=_&&A;_&&(I=I.substring(1)),A&&(I=I.substring(0,I.length-1)),I=I.trim();const L=[],R=I.split(" "),M=this.splitKeybindingWords(R);for(const N of C){const P=new w(this.modifierLabels,N,I,R,M,k);(P.commandIdMatches||P.commandLabelMatches||P.commandDefaultLabelMatches||P.sourceMatches||P.whenMatches||P.keybindingMatches||P.extensionIdMatches||P.extensionLabelMatches)&&L.push({id:o.getId(N),templateId:e.KEYBINDING_ENTRY_TEMPLATE_ID,commandLabelMatches:P.commandLabelMatches||void 0,commandDefaultLabelMatches:P.commandDefaultLabelMatches||void 0,keybindingItem:N,keybindingMatches:P.keybindingMatches||void 0,commandIdMatches:P.commandIdMatches||void 0,sourceMatches:P.sourceMatches||void 0,whenMatches:P.whenMatches||void 0,extensionIdMatches:P.extensionIdMatches||void 0,extensionLabelMatches:P.extensionLabelMatches||void 0})}return L}splitKeybindingWords(C){const I=[];for(const _ of C)I.push(...(0,y.coalesce)(_.split("+")));return I}async resolve(C=new Map){const I=new s.ExtensionIdentifierMap;for(const k of this.extensionService.extensions)I.set(k.identifier,k);this._keybindingItemsSortedByPrecedence=[];const _=new Map;for(const k of this.keybindingsService.getKeybindings())k.command&&(this._keybindingItemsSortedByPrecedence.push(o.toKeybindingEntry(k.command,k,C,I)),_.set(k.command,!0));const A=this.keybindingsService.getDefaultKeybindings().map(k=>k.command);for(const k of(0,a.getAllUnboundCommands)(_)){const L=new h.ResolvedKeybindingItem(void 0,k,null,void 0,A.indexOf(k)===-1,null,!1);this._keybindingItemsSortedByPrecedence.push(o.toKeybindingEntry(k,L,C,I))}return this._keybindingItemsSortedByPrecedence=(0,y.distinct)(this._keybindingItemsSortedByPrecedence,k=>o.getId(k)),this._keybindingItems=this._keybindingItemsSortedByPrecedence.slice(0).sort((k,L)=>o.compareKeybindingData(k,L)),super.resolve()}static getId(C){return C.command+(C?.keybinding?.getAriaLabel()??"")+C.when+((0,r.isString)(C.source)?C.source:C.source.identifier.value)}static compareKeybindingData(C,I){return C.keybinding&&!I.keybinding?-1:I.keybinding&&!C.keybinding?1:C.commandLabel&&!I.commandLabel?-1:I.commandLabel&&!C.commandLabel?1:C.commandLabel&&I.commandLabel&&C.commandLabel!==I.commandLabel?C.commandLabel.localeCompare(I.commandLabel):C.command===I.command?C.keybindingItem.isDefault?1:-1:C.command.localeCompare(I.command)}static toKeybindingEntry(C,I,_,A){const k=v.MenuRegistry.getCommand(C),L=_.get(C);let R=p;if(I.isDefault){const M=I.extensionId??(I.resolvedKeybinding?void 0:k?.source?.id);R=M?A.get(M)??d:u}return{keybinding:I.resolvedKeybinding,keybindingItem:I,command:C,commandLabel:o.getCommandLabel(k,L),commandDefaultLabel:o.getCommandDefaultLabel(k),when:I.when?I.when.serialize():"",source:R}}static getCommandDefaultLabel(C){if(!D.Language.isDefaultVariant()&&C&&C.title&&C.title.original){const I=C.category?C.category.original:void 0,_=C.title.original;return I?(0,t.localize)(3,null,I,_):_}return null}static getCommandLabel(C,I){if(C){const _=C.category?typeof C.category=="string"?C.category:C.category.value:void 0,A=typeof C.title=="string"?C.title:C.title.value;return _?(0,t.localize)(4,null,_,A):A}return I||""}};e.KeybindingsEditorModel=g,e.KeybindingsEditorModel=g=o=fe([O(1,S.IKeybindingService),O(2,i.IExtensionService)],g);class w{constructor(C,I,_,A,k,L){this.modifierLabels=C,this.commandIdMatches=null,this.commandLabelMatches=null,this.commandDefaultLabelMatches=null,this.sourceMatches=null,this.whenMatches=null,this.keybindingMatches=null,this.extensionIdMatches=null,this.extensionLabelMatches=null,L||(this.commandIdMatches=this.matches(_,I.command,(0,T.or)(T.matchesWords,T.matchesCamelCase),A),this.commandLabelMatches=I.commandLabel?this.matches(_,I.commandLabel,(R,M)=>(0,T.matchesWords)(R,I.commandLabel,!0),A):null,this.commandDefaultLabelMatches=I.commandDefaultLabel?this.matches(_,I.commandDefaultLabel,(R,M)=>(0,T.matchesWords)(R,I.commandDefaultLabel,!0),A):null,this.whenMatches=I.when?this.matches(null,I.when,(0,T.or)(T.matchesWords,T.matchesCamelCase),A):null,(0,r.isString)(I.source)?this.sourceMatches=this.matches(_,I.source,(R,M)=>(0,T.matchesWords)(R,I.source,!0),A):this.extensionLabelMatches=I.source.displayName?this.matches(_,I.source.displayName,(R,M)=>(0,T.matchesWords)(R,I.commandLabel,!0),A):null),this.keybindingMatches=I.keybinding?this.matchesKeybinding(I.keybinding,_,k,L):null}matches(C,I,_,A){let k=C?c(C,I):null;return k||(k=this.matchesWords(A,I,_)),k&&(k=this.filterAndSort(k)),k}matchesWords(C,I,_){let A=[];for(const k of C){const L=_(k,I);if(L)A=[...A||[],...L];else{A=null;break}}return A}filterAndSort(C){return(0,y.distinct)(C,I=>I.start+"."+I.end).filter(I=>!C.some(_=>!(_.start===I.start&&_.end===I.end)&&_.start<=I.start&&_.end>=I.end)).sort((I,_)=>I.start-_.start)}matchesKeybinding(C,I,_,A){const[k,L]=C.getChords(),R=C.getUserSettingsLabel(),M=C.getAriaLabel(),N=C.getLabel();if(R&&b.compareIgnoreCase(I,R)===0||M&&b.compareIgnoreCase(I,M)===0||N&&b.compareIgnoreCase(I,N)===0)return{firstPart:this.createCompleteMatch(k),chordPart:this.createCompleteMatch(L)};const P={};let x={};const F=[],V=[];let W=[],z=!0;for(let B=0;B<_.length;B++){const K=_[B];let H=!1,U=!1;z=z&&!P.keyCode;let G=!x.keyCode;if(z&&(H=this.matchPart(k,P,K,A),P.keyCode)){for(const $ of W)V.indexOf($)===-1&&F.splice(F.indexOf($),1);x={},W=[],G=!1}G&&(U=this.matchPart(L,x,K,A)),H&&V.push(B),U&&W.push(B),(H||U)&&F.push(B),z=z&&this.isModifier(K)}return F.length!==_.length||A&&(!this.isCompleteMatch(k,P)||!(0,r.isEmptyObject)(x)&&!this.isCompleteMatch(L,x))?null:this.hasAnyMatch(P)||this.hasAnyMatch(x)?{firstPart:P,chordPart:x}:null}matchPart(C,I,_,A){let k=!1;return this.matchesMetaModifier(C,_)&&(k=!0,I.metaKey=!0),this.matchesCtrlModifier(C,_)&&(k=!0,I.ctrlKey=!0),this.matchesShiftModifier(C,_)&&(k=!0,I.shiftKey=!0),this.matchesAltModifier(C,_)&&(k=!0,I.altKey=!0),this.matchesKeyCode(C,_,A)&&(I.keyCode=!0,k=!0),k}matchesKeyCode(C,I,_){if(!C)return!1;const A=C.keyAriaLabel||"";if(_||A.length===1||I.length===1){if(b.compareIgnoreCase(A,I)===0)return!0}else if((0,T.matchesContiguousSubString)(I,A))return!0;return!1}matchesMetaModifier(C,I){return!C||!C.metaKey?!1:this.wordMatchesMetaModifier(I)}matchesCtrlModifier(C,I){return!C||!C.ctrlKey?!1:this.wordMatchesCtrlModifier(I)}matchesShiftModifier(C,I){return!C||!C.shiftKey?!1:this.wordMatchesShiftModifier(I)}matchesAltModifier(C,I){return!C||!C.altKey?!1:this.wordMatchesAltModifier(I)}hasAnyMatch(C){return!!C.altKey||!!C.ctrlKey||!!C.metaKey||!!C.shiftKey||!!C.keyCode}isCompleteMatch(C,I){return C?!(!I.keyCode||C.metaKey&&!I.metaKey||C.altKey&&!I.altKey||C.ctrlKey&&!I.ctrlKey||C.shiftKey&&!I.shiftKey):!0}createCompleteMatch(C){const I={};return C&&(I.keyCode=!0,C.metaKey&&(I.metaKey=!0),C.altKey&&(I.altKey=!0),C.ctrlKey&&(I.ctrlKey=!0),C.shiftKey&&(I.shiftKey=!0)),I}isModifier(C){return!!(this.wordMatchesAltModifier(C)||this.wordMatchesCtrlModifier(C)||this.wordMatchesMetaModifier(C)||this.wordMatchesShiftModifier(C))}wordMatchesAltModifier(C){return!!(b.equalsIgnoreCase(this.modifierLabels.ui.altKey,C)||b.equalsIgnoreCase(this.modifierLabels.aria.altKey,C)||b.equalsIgnoreCase(this.modifierLabels.user.altKey,C)||b.equalsIgnoreCase((0,t.localize)(5,null),C))}wordMatchesCtrlModifier(C){return!!(b.equalsIgnoreCase(this.modifierLabels.ui.ctrlKey,C)||b.equalsIgnoreCase(this.modifierLabels.aria.ctrlKey,C)||b.equalsIgnoreCase(this.modifierLabels.user.ctrlKey,C))}wordMatchesMetaModifier(C){return!!(b.equalsIgnoreCase(this.modifierLabels.ui.metaKey,C)||b.equalsIgnoreCase(this.modifierLabels.aria.metaKey,C)||b.equalsIgnoreCase(this.modifierLabels.user.metaKey,C)||b.equalsIgnoreCase((0,t.localize)(6,null),C))}wordMatchesShiftModifier(C){return!!(b.equalsIgnoreCase(this.modifierLabels.ui.shiftKey,C)||b.equalsIgnoreCase(this.modifierLabels.aria.shiftKey,C)||b.equalsIgnoreCase(this.modifierLabels.user.shiftKey,C))}}}),define(Q[970],Y([1,0,18,3092,5,163,1388]),function(q,e,t,y,b,D,T){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingsEditorInput=void 0;let v=class extends D.EditorInput{static{f=this}static{this.ID="workbench.input.keybindings"}constructor(S){super(),this.searchOptions=null,this.resource=void 0,this.keybindingsModel=S.createInstance(T.KeybindingsEditorModel,t.OS)}get typeId(){return f.ID}getName(){return y.localize(0,null)}async resolve(){return this.keybindingsModel}matches(S){return S instanceof f}dispose(){this.keybindingsModel.dispose(),super.dispose()}};e.KeybindingsEditorInput=v,e.KeybindingsEditorInput=v=f=fe([O(0,b.IInstantiationService)],v)}),define(Q[124],Y([1,0,5,47]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USE_SPLIT_JSON_SETTING=e.DEFAULT_SETTINGS_EDITOR_SETTING=e.FOLDER_SETTINGS_PATH=e.DEFINE_KEYBINDING_EDITOR_CONTRIB_ID=e.IPreferencesService=e.validateSettingsEditorOptions=e.SettingMatchType=e.SettingValueType=void 0;var b;(function(f){f.Null="null",f.Enum="enum",f.String="string",f.MultilineString="multiline-string",f.Integer="integer",f.Number="number",f.Boolean="boolean",f.Array="array",f.Exclude="exclude",f.Include="include",f.Complex="complex",f.NullableInteger="nullable-integer",f.NullableNumber="nullable-number",f.Object="object",f.BooleanObject="boolean-object",f.LanguageTag="language-tag",f.ExtensionToggle="extension-toggle"})(b||(e.SettingValueType=b={}));var D;(function(f){f[f.None=0]="None",f[f.RemoteMatch=1]="RemoteMatch",f[f.WholeWordMatch=2]="WholeWordMatch",f[f.KeyMatch=4]="KeyMatch"})(D||(e.SettingMatchType=D={}));function T(f){return{...f,override:y.DEFAULT_EDITOR_ASSOCIATION.id,pinned:!0}}e.validateSettingsEditorOptions=T,e.IPreferencesService=(0,t.createDecorator)("preferencesService"),e.DEFINE_KEYBINDING_EDITOR_CONTRIB_ID="editor.contrib.defineKeybinding",e.FOLDER_SETTINGS_PATH=".azuredatastudio/settings.json",e.DEFAULT_SETTINGS_EDITOR_SETTING="workbench.settings.openDefaultSettings",e.USE_SPLIT_JSON_SETTING="workbench.settings.useSplitJSON"}),define(Q[971],Y([1,0,2576,13,332,8,34,7,38,18,9,6,4,265,14,61,353,24,23,124,65,2315,832,180,66,92,97,86,324,171,28,30,747,844,88,54,286,143,1777]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P,x,F){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomMenubarControl=e.MenubarControl=void 0,x.default.quality!==F.TSGOPS_WEB_QUALITY&&(y.MenuRegistry.appendMenuItem(y.MenuId.MenubarMainMenu,{submenu:y.MenuId.MenubarFileMenu,title:{value:"File",original:"File",mnemonicTitle:(0,t.localize)(0,null)},order:1}),y.MenuRegistry.appendMenuItem(y.MenuId.MenubarMainMenu,{submenu:y.MenuId.MenubarEditMenu,title:{value:"Edit",original:"Edit",mnemonicTitle:(0,t.localize)(1,null)},order:2}),y.MenuRegistry.appendMenuItem(y.MenuId.MenubarMainMenu,{submenu:y.MenuId.MenubarViewMenu,title:{value:"View",original:"View",mnemonicTitle:(0,t.localize)(2,null)},order:4})),y.MenuRegistry.appendMenuItem(y.MenuId.MenubarMainMenu,{submenu:y.MenuId.MenubarHelpMenu,title:{value:"Help",original:"Help",mnemonicTitle:(0,t.localize)(3,null)},order:8}),y.MenuRegistry.appendMenuItem(y.MenuId.MenubarMainMenu,{submenu:y.MenuId.MenubarPreferencesMenu,title:{value:"Preferences",original:"Preferences",mnemonicTitle:(0,t.localize)(4,null)},when:A.IsMacNativeContext,order:9});class V extends a.Disposable{static{this.MAX_MENU_RECENT_ENTRIES=10}constructor(B,K,H,U,G,$,ie,J,j,ee,X,te,Z,se){super(),this.menuService=B,this.workspacesService=K,this.contextKeyService=H,this.keybindingService=U,this.configurationService=G,this.labelService=$,this.updateService=ie,this.storageService=J,this.notificationService=j,this.preferencesService=ee,this.environmentService=X,this.accessibilityService=te,this.hostService=Z,this.commandService=se,this.keys=["window.menuBarVisibility","window.enableMenuBarMnemonics","window.customMenuBarAltFocus","workbench.sideBar.location","window.nativeTabs"],this.menus={},this.topLevelTitles={},this.recentlyOpened={files:[],workspaces:[]},this.mainMenu=this._register(this.menuService.createMenu(y.MenuId.MenubarMainMenu,this.contextKeyService)),this.mainMenuDisposables=this._register(new a.DisposableStore),this.setupMainMenu(),this.menuUpdater=this._register(new i.RunOnceScheduler(()=>this.doUpdateMenubar(!1),200)),this.notifyUserOfCustomMenubarAccessibility()}registerListeners(){this._register(this.hostService.onDidChangeFocus(B=>this.onDidChangeWindowFocus(B))),this._register(this.configurationService.onDidChangeConfiguration(B=>this.onConfigurationUpdated(B))),this.updateService.onStateChange(()=>this.onUpdateStateChange()),this._register(this.workspacesService.onDidChangeRecentlyOpened(()=>{this.onDidChangeRecentlyOpened()})),this._register(this.keybindingService.onDidUpdateKeybindings(()=>this.updateMenubar())),this._register(this.labelService.onDidChangeFormatters(()=>{this.onDidChangeRecentlyOpened()})),this._register(this.mainMenu.onDidChange(()=>{this.setupMainMenu(),this.doUpdateMenubar(!0)}))}setupMainMenu(){this.mainMenuDisposables.clear(),this.menus={},this.topLevelTitles={};const[,B]=this.mainMenu.getActions()[0];for(const K of B)K instanceof y.SubmenuItemAction&&typeof K.item.title!="string"&&(this.menus[K.item.title.original]=this.mainMenuDisposables.add(this.menuService.createMenu(K.item.submenu,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.topLevelTitles[K.item.title.original]=K.item.title.mnemonicTitle??K.item.title.value)}updateMenubar(){this.menuUpdater.schedule()}calculateActionLabel(B){const K=B.label;switch(B.id){default:break}return K}onUpdateStateChange(){this.updateMenubar()}onUpdateKeybindings(){this.updateMenubar()}getOpenRecentActions(){if(!this.recentlyOpened)return[];const{workspaces:B,files:K}=this.recentlyOpened,H=[];if(B.length>0){for(let U=0;U<V.MAX_MENU_RECENT_ENTRIES&&U<B.length;U++)H.push(this.createOpenRecentMenuAction(B[U]));H.push(new T.Separator)}if(K.length>0){for(let U=0;U<V.MAX_MENU_RECENT_ENTRIES&&U<K.length;U++)H.push(this.createOpenRecentMenuAction(K[U]));H.push(new T.Separator)}return H}onDidChangeWindowFocus(B){B&&this.onDidChangeRecentlyOpened()}onConfigurationUpdated(B){this.keys.some(K=>B.affectsConfiguration(K))&&this.updateMenubar(),B.affectsConfiguration("editor.accessibilitySupport")&&this.notifyUserOfCustomMenubarAccessibility(),B.affectsConfiguration("window.menuBarVisibility")&&this.onDidChangeRecentlyOpened()}get menubarHidden(){return m.isMacintosh&&m.isNative?!1:(0,b.getMenuBarVisibility)(this.configurationService)==="hidden"}onDidChangeRecentlyOpened(){this.menubarHidden||this.workspacesService.getRecentlyOpened().then(B=>{this.recentlyOpened=B,this.updateMenubar()})}createOpenRecentMenuAction(B){let K,H,U,G;const $=B.remoteAuthority;(0,r.isRecentFolder)(B)?(H=B.folderUri,K=B.label||this.labelService.getWorkspaceLabel(H,{verbose:2}),U="openRecentFolder",G={folderUri:H}):(0,r.isRecentWorkspace)(B)?(H=B.workspace.configPath,K=B.label||this.labelService.getWorkspaceLabel(B.workspace,{verbose:2}),U="openRecentWorkspace",G={workspaceUri:H}):(H=B.fileUri,K=B.label||this.labelService.getUriLabel(H),U="openRecentFile",G={fileUri:H});const ie=new T.Action(U,(0,g.unmnemonicLabel)(K),void 0,void 0,J=>{const j=J,ee=J&&(!m.isMacintosh&&(j.ctrlKey||j.shiftKey)||m.isMacintosh&&(j.metaKey||j.altKey));return this.hostService.openWindow([G],{forceNewWindow:!!ee,remoteAuthority:$||null})});return Object.assign(ie,{uri:H,remoteAuthority:$})}notifyUserOfCustomMenubarAccessibility(){if(m.isWeb||m.isMacintosh)return;const B=this.storageService.getBoolean("menubar/accessibleMenubarNotified",-1,!1),K=(0,b.getTitleBarStyle)(this.configurationService)==="custom";if(B||K||!this.accessibilityService.isScreenReaderOptimized())return;const H=(0,t.localize)(5,null);this.notificationService.prompt(d.Severity.Info,H,[{label:(0,t.localize)(6,null),run:()=>this.preferencesService.openUserSettings({query:"window.titleBarStyle"})}]),this.storageService.store("menubar/accessibleMenubarNotified",!0,-1,0)}}e.MenubarControl=V;let W=class extends V{constructor(B,K,H,U,G,$,ie,J,j,ee,X,te,Z,se,re,oe){super(B,K,H,U,G,$,ie,J,j,ee,X,te,re,oe),this.layoutService=Z,this.telemetryService=se,this.alwaysOnMnemonics=!1,this.focusInsideMenubar=!1,this.pendingFirstTimeUpdate=!1,this.visible=!0,this.webNavigationMenu=this._register(this.menuService.createMenu(y.MenuId.MenubarHomeMenu,this.contextKeyService)),this.reinstallDisposables=this._register(new a.DisposableStore),this._onVisibilityChange=this._register(new h.Emitter),this._onFocusStateChange=this._register(new h.Emitter),this.actionRunner=this._register(new T.ActionRunner),this.actionRunner.onDidRun(le=>{this.telemetryService.publicLog2("workbenchActionExecuted",{id:le.action.id,from:"menu"})}),this.workspacesService.getRecentlyOpened().then(le=>{this.recentlyOpened=le}),this.registerListeners(),this.registerActions()}doUpdateMenubar(B){this.focusInsideMenubar||this.setupCustomMenubar(B),B&&(this.pendingFirstTimeUpdate=!0)}registerActions(){const B=this;m.isWeb&&this._register((0,y.registerAction2)(class extends y.Action2{constructor(){super({id:"workbench.actions.menubar.focus",title:{value:(0,t.localize)(7,null),original:"Focus Application Menu"},keybinding:{primary:580,weight:200,when:A.IsWebContext},f1:!0})}async run(){B.menubar?.toggleFocus()}}))}getUpdateAction(){switch(this.updateService.state.type){case"idle":return new T.Action("update.check",(0,t.localize)(8,null),void 0,!0,()=>this.updateService.checkForUpdates(!0));case"checking for updates":return new T.Action("update.checking",(0,t.localize)(9,null),void 0,!1);case"available for download":return new T.Action("update.downloadNow",(0,t.localize)(10,null),void 0,!0,()=>this.updateService.downloadUpdate());case"downloading":return new T.Action("update.downloading",(0,t.localize)(11,null),void 0,!1);case"downloaded":return new T.Action("update.install",(0,t.localize)(12,null),void 0,!0,()=>this.updateService.applyUpdate());case"updating":return new T.Action("update.updating",(0,t.localize)(13,null),void 0,!1);case"ready":return new T.Action("update.restart",(0,t.localize)(14,null),void 0,!0,()=>this.updateService.quitAndInstall());default:return null}}get currentMenubarVisibility(){return(0,b.getMenuBarVisibility)(this.configurationService)}get currentDisableMenuBarAltFocus(){const B=this.configurationService.getValue("window.customMenuBarAltFocus");let K=!1;return typeof B=="boolean"&&(K=!B),K}insertActionsBefore(B,K){switch(B.id){case R.OpenRecentAction.ID:K.push(...this.getOpenRecentActions());break;case"workbench.action.showAboutDialog":if(!m.isMacintosh&&!m.isWeb){const H=this.getUpdateAction();H&&(H.label=(0,g.mnemonicMenuLabel)(H.label),K.push(H),K.push(new T.Separator))}break;default:break}}get currentEnableMenuBarMnemonics(){let B=this.configurationService.getValue("window.enableMenuBarMnemonics");return typeof B!="boolean"&&(B=!0),B&&(!m.isWeb||(0,C.isFullscreen)())}get currentCompactMenuMode(){return this.currentMenubarVisibility!=="compact"?void 0:this.configurationService.getValue("workbench.sideBar.location")==="right"?n.Direction.Left:n.Direction.Right}onDidVisibilityChange(B){this.visible=B,this.onDidChangeRecentlyOpened(),this._onVisibilityChange.fire(B)}toActionsArray(B){const K=[];return(0,N.createAndFillInContextMenuActions)(B,{shouldForwardArgs:!0},K),K}setupCustomMenubar(B){if(!this.container)return;B?(this.menubar&&this.reinstallDisposables.clear(),this.menubar=this.reinstallDisposables.add(new l.MenuBar(this.container,this.getMenuBarOptions(),P.defaultMenuStyles)),this.accessibilityService.alwaysUnderlineAccessKeys().then(H=>{this.alwaysOnMnemonics=H,this.menubar?.update(this.getMenuBarOptions())}),this.reinstallDisposables.add(this.menubar.onFocusStateChange(H=>{this._onFocusStateChange.fire(H),H||(this.pendingFirstTimeUpdate?(this.setupCustomMenubar(!0),this.pendingFirstTimeUpdate=!1):this.updateMenubar(),this.focusInsideMenubar=!1)})),this.reinstallDisposables.add(this.menubar.onVisibilityChange(H=>this.onDidVisibilityChange(H))),this.reinstallDisposables.add((0,f.addDisposableListener)(this.container,f.EventType.FOCUS_IN,()=>{this.focusInsideMenubar=!0})),this.reinstallDisposables.add((0,f.addDisposableListener)(this.container,f.EventType.FOCUS_OUT,()=>{this.focusInsideMenubar=!1})),this.menubar.isVisible&&this.onDidVisibilityChange(!0)):this.menubar?.update(this.getMenuBarOptions());const K=(H,U,G)=>{U.splice(0);for(const $ of H)if(this.insertActionsBefore($,U),$ instanceof T.Separator)U.push($);else if($ instanceof y.SubmenuItemAction||$ instanceof y.MenuItemAction){let ie=typeof $.item.title=="string"?$.item.title:$.item.title.mnemonicTitle??$.item.title.value;if($ instanceof y.SubmenuItemAction){const J=[];K($.actions,J,G),J.length>0&&U.push(new T.SubmenuAction($.id,(0,g.mnemonicMenuLabel)(ie),J))}else{(0,M.isICommandActionToggleInfo)($.item.toggled)&&(ie=$.item.toggled.mnemonicTitle??$.item.toggled.title??ie);const J=new T.Action($.id,(0,g.mnemonicMenuLabel)(ie),$.class,$.enabled,()=>this.commandService.executeCommand($.id));J.tooltip=$.tooltip,J.checked=$.checked,U.push(J)}}if(G==="File"&&this.currentCompactMenuMode===void 0){const $=this.getWebNavigationActions();$.length&&U.push(...$)}};for(const H of Object.keys(this.topLevelTitles)){const U=this.menus[H];B&&U&&(this.reinstallDisposables.add(U.onDidChange(()=>{if(!this.focusInsideMenubar){const $=[];K(this.toActionsArray(U),$,H),this.menubar?.updateMenu({actions:$,label:(0,g.mnemonicMenuLabel)(this.topLevelTitles[H])})}})),U===this.menus.File&&this.reinstallDisposables.add(this.webNavigationMenu.onDidChange(()=>{if(!this.focusInsideMenubar){const $=[];K(this.toActionsArray(U),$,H),this.menubar?.updateMenu({actions:$,label:(0,g.mnemonicMenuLabel)(this.topLevelTitles[H])})}})));const G=[];U&&K(this.toActionsArray(U),G,H),this.menubar&&(B?this.menubar.push({actions:G,label:(0,g.mnemonicMenuLabel)(this.topLevelTitles[H])}):this.menubar.updateMenu({actions:G,label:(0,g.mnemonicMenuLabel)(this.topLevelTitles[H])}))}}getWebNavigationActions(){if(!m.isWeb)return[];const B=[];for(const K of this.webNavigationMenu.getActions()){const[,H]=K;for(const U of H)if(U instanceof y.MenuItemAction){const G=typeof U.item.title=="string"?U.item.title:U.item.title.mnemonicTitle??U.item.title.value;B.push(new T.Action(U.id,(0,g.mnemonicMenuLabel)(G),U.class,U.enabled,async $=>{this.commandService.executeCommand(U.id,$)}))}B.push(new T.Separator)}return B.length&&B.pop(),B}getMenuBarOptions(){return{enableMnemonics:this.currentEnableMenuBarMnemonics,disableAltFocus:this.currentDisableMenuBarAltFocus,visibility:this.currentMenubarVisibility,actionRunner:this.actionRunner,getKeybinding:B=>this.keybindingService.lookupKeybinding(B.id),alwaysOnMnemonics:this.alwaysOnMnemonics,compactMode:this.currentCompactMenuMode,getCompactMenuActions:()=>m.isWeb?this.getWebNavigationActions():[]}}onDidChangeWindowFocus(B){this.visible&&(super.onDidChangeWindowFocus(B),this.container&&(B?this.container.classList.remove("inactive"):(this.container.classList.add("inactive"),this.menubar?.blur())))}onUpdateStateChange(){this.visible&&super.onUpdateStateChange()}onDidChangeRecentlyOpened(){this.visible&&super.onDidChangeRecentlyOpened()}onUpdateKeybindings(){this.visible&&super.onUpdateKeybindings()}registerListeners(){super.registerListeners(),this._register((0,f.addDisposableListener)(window,f.EventType.RESIZE,()=>{this.menubar&&!(m.isIOS&&_.BrowserFeatures.pointerEvents)&&this.menubar.blur()})),m.isWeb&&(this._register(this.layoutService.onDidChangeFullscreen(B=>this.updateMenubar())),this._register(this.webNavigationMenu.onDidChange(()=>this.updateMenubar())))}get onVisibilityChange(){return this._onVisibilityChange.event}get onFocusStateChange(){return this._onFocusStateChange.event}getMenubarItemsDimensions(){return this.menubar?new f.Dimension(this.menubar.getWidth(),this.menubar.getHeight()):new f.Dimension(0,0)}create(B){return this.container=B,this.container&&this.doUpdateMenubar(!0),this.container}layout(B){this.menubar?.update(this.getMenuBarOptions())}toggleFocus(){this.menubar?.toggleFocus()}};e.CustomMenubarControl=W,e.CustomMenubarControl=W=fe([O(0,y.IMenuService),O(1,r.IWorkspacesService),O(2,D.IContextKeyService),O(3,v.IKeybindingService),O(4,S.IConfigurationService),O(5,s.ILabelService),O(6,o.IUpdateService),O(7,u.IStorageService),O(8,d.INotificationService),O(9,p.IPreferencesService),O(10,c.IWorkbenchEnvironmentService),O(11,w.IAccessibilityService),O(12,E.IWorkbenchLayoutService),O(13,L.ITelemetryService),O(14,I.IHostService),O(15,k.ICommandService)],W)}),define(Q[3996],Y([1,0,32,37,2601,66,13,220,43,124]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowAudioCueHelp=void 0;class S extends T.Action2{static{this.ID="audioCues.help"}constructor(){super({id:S.ID,title:{value:(0,b.localize)(0,null),original:"Help: List Audio Cues"},f1:!0})}async run(a){const r=a.get(f.IAudioCueService),i=a.get(v.IQuickInputService),s=a.get(m.IPreferencesService),o=a.get(D.IAccessibilityService),u=f.AudioCue.allAudioCues.map((p,c)=>({label:o.isScreenReaderOptimized()?`${p.name}${r.isEnabled(p)?"":" ("+(0,b.localize)(1,null)+")"}`:`${r.isEnabled(p)?"$(check)":" "} ${p.name}`,audioCue:p,buttons:[{iconClass:y.ThemeIcon.asClassName(t.Codicon.settingsGear),tooltip:(0,b.localize)(2,null)}]}));await i.pick(u,{activeItem:u[0],onDidFocus:p=>{r.playSound(p.audioCue.sound.getSound(!0),!0)},onDidTriggerItemButton:p=>{s.openSettings({query:p.item.audioCue.settingsKey})},placeHolder:(0,b.localize)(3,null)})}}e.ShowAudioCueHelp=S}),define(Q[3997],Y([1,0,3996,2600,13,56,35,16,45,220,3710]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,T.registerSingleton)(m.IAudioCueService,m.AudioCueService,1),f.Registry.as(v.Extensions.Workbench).registerWorkbenchContribution(S.AudioCueLineFeatureContribution,3);const h={type:"string",enum:["auto","on","off"],default:"auto",enumDescriptions:[(0,y.localize)(0,null),(0,y.localize)(1,null),(0,y.localize)(2,null)],tags:["accessibility"]};f.Registry.as(D.Extensions.Configuration).registerConfiguration({properties:{"audioCues.enabled":{markdownDeprecationMessage:"Deprecated. Use the specific setting for each audio cue instead (`audioCues.*`).",tags:["accessibility"]},"audioCues.volume":{description:(0,y.localize)(3,null),type:"number",minimum:0,maximum:100,default:70,tags:["accessibility"]},"audioCues.debouncePositionChanges":{description:(0,y.localize)(4,null),type:"boolean",default:!1,tags:["accessibility"]},"audioCues.lineHasBreakpoint":{description:(0,y.localize)(5,null),...h},"audioCues.lineHasInlineSuggestion":{description:(0,y.localize)(6,null),...h},"audioCues.lineHasError":{description:(0,y.localize)(7,null),...h},"audioCues.lineHasFoldedArea":{description:(0,y.localize)(8,null),...h},"audioCues.lineHasWarning":{description:(0,y.localize)(9,null),...h,default:"off"},"audioCues.onDebugBreak":{description:(0,y.localize)(10,null),...h},"audioCues.noInlayHints":{description:(0,y.localize)(11,null),...h},"audioCues.taskCompleted":{description:(0,y.localize)(12,null),...h},"audioCues.taskFailed":{description:(0,y.localize)(13,null),...h},"audioCues.terminalCommandFailed":{description:(0,y.localize)(14,null),...h},"audioCues.terminalQuickFix":{description:(0,y.localize)(15,null),...h},"audioCues.diffLineInserted":{description:(0,y.localize)(16,null),...h},"audioCues.diffLineDeleted":{description:(0,y.localize)(17,null),...h},"audioCues.diffLineModified":{description:(0,y.localize)(18,null),...h},"audioCues.notebookCellCompleted":{description:(0,y.localize)(19,null),...h},"audioCues.notebookCellFailed":{description:(0,y.localize)(20,null),...h},"audioCues.chatRequestSent":{description:(0,y.localize)(21,null),...h,default:"off"},"audioCues.chatResponsePending":{description:(0,y.localize)(22,null),...h,default:"auto"},"audioCues.chatResponseReceived":{description:(0,y.localize)(23,null),...h,default:"off"}}}),(0,b.registerAction2)(t.ShowAudioCueHelp)}),define(Q[3998],Y([1,0,32,10,2818,13,28,8,43,224,103,292,71,176,148,21,124]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.notebook.layout.select",title:{value:(0,b.localize)(0,null),original:"Select between Notebook Layouts"},f1:!0,precondition:f.ContextKeyExpr.equals(`config.${a.NotebookSetting.openGettingStarted}`,!0),category:m.NOTEBOOK_ACTIONS_CATEGORY,menu:[{id:D.MenuId.EditorTitle,group:"notebookLayout",when:f.ContextKeyExpr.and(r.NOTEBOOK_IS_ACTIVE_EDITOR,f.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0),f.ContextKeyExpr.equals(`config.${a.NotebookSetting.openGettingStarted}`,!0)),order:0},{id:D.MenuId.NotebookToolbar,group:"notebookLayout",when:f.ContextKeyExpr.and(f.ContextKeyExpr.equals("config.notebook.globalToolbar",!0),f.ContextKeyExpr.equals(`config.${a.NotebookSetting.openGettingStarted}`,!0)),order:0}]})}run(d){d.get(T.ICommandService).executeCommand("workbench.action.openWalkthrough",{category:"notebooks",step:"notebookProfile"},!0)}}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.notebook.layout.configure",title:{value:(0,b.localize)(1,null),original:"Customize Notebook Layout"},f1:!0,category:m.NOTEBOOK_ACTIONS_CATEGORY,menu:[{id:D.MenuId.NotebookToolbar,group:"notebookLayout",when:f.ContextKeyExpr.equals("config.notebook.globalToolbar",!0),order:1}]})}run(d){d.get(o.IPreferencesService).openSettings({jsonEditor:!1,query:"@tag:notebookLayout"})}}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.notebook.layout.configure.editorTitle",title:{value:(0,b.localize)(2,null),original:"Customize Notebook Layout"},f1:!1,category:m.NOTEBOOK_ACTIONS_CATEGORY,menu:[{id:D.MenuId.NotebookEditorLayoutConfigure,group:"notebookLayout",when:r.NOTEBOOK_IS_ACTIVE_EDITOR,order:1}]})}run(d){d.get(o.IPreferencesService).openSettings({jsonEditor:!1,query:"@tag:notebookLayout"})}}),D.MenuRegistry.appendMenuItem(D.MenuId.EditorTitle,{submenu:D.MenuId.NotebookEditorLayoutConfigure,rememberDefaultAction:!1,title:{value:(0,b.localize)(3,null),original:"Customize Notebook..."},icon:t.Codicon.gear,group:"navigation",order:-1,when:r.NOTEBOOK_IS_ACTIVE_EDITOR}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"notebook.toggleLineNumbersFromEditorTitle",title:{value:(0,b.localize)(4,null),original:"Toggle Notebook Line Numbers"},precondition:r.NOTEBOOK_EDITOR_FOCUSED,menu:[{id:D.MenuId.NotebookEditorLayoutConfigure,group:"notebookLayoutDetails",order:1,when:r.NOTEBOOK_IS_ACTIVE_EDITOR}],category:m.NOTEBOOK_ACTIONS_CATEGORY,f1:!0,toggled:{condition:f.ContextKeyExpr.notEquals("config.notebook.lineNumbers","off"),title:(0,b.localize)(5,null)}})}async run(d){return d.get(T.ICommandService).executeCommand("notebook.toggleLineNumbers")}}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"notebook.toggleCellToolbarPositionFromEditorTitle",title:{value:(0,b.localize)(6,null),original:"Toggle Cell Toolbar Position"},menu:[{id:D.MenuId.NotebookEditorLayoutConfigure,group:"notebookLayoutDetails",order:3}],category:m.NOTEBOOK_ACTIONS_CATEGORY,f1:!1})}async run(d,...p){return d.get(T.ICommandService).executeCommand("notebook.toggleCellToolbarPosition",...p)}}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"breadcrumbs.toggleFromEditorTitle",title:{value:(0,b.localize)(7,null),original:"Toggle Breadcrumbs"},menu:[{id:D.MenuId.NotebookEditorLayoutConfigure,group:"notebookLayoutDetails",order:2}],f1:!1})}async run(d){return d.get(T.ICommandService).executeCommand("breadcrumbs.toggle")}}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"notebook.saveMimeTypeOrder",title:{value:(0,b.localize)(8,null),original:"Save Mimetype Display Order"},f1:!0,category:m.NOTEBOOK_ACTIONS_CATEGORY,precondition:r.NOTEBOOK_IS_ACTIVE_EDITOR})}run(d){const p=d.get(i.INotebookService),c=d.get(v.IQuickInputService).createQuickPick();c.placeholder=(0,b.localize)(9,null),c.items=[{target:2,label:(0,b.localize)(10,null)},{target:5,label:(0,b.localize)(11,null)}],c.onDidAccept(()=>{const l=c.selectedItems[0]?.target;l!==void 0&&p.saveMimeDisplayOrder(l),c.dispose()}),c.onDidHide(()=>c.dispose()),c.show()}}),(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"workbench.notebook.layout.webview.reset",title:{value:(0,b.localize)(12,null),original:"Reset Notebook Webview"},f1:!1,category:m.NOTEBOOK_ACTIONS_CATEGORY})}run(d,p){const c=d.get(s.IEditorService);if(p){const l=y.URI.revive(p),g=d.get(h.INotebookEditorService).listNotebookEditors().filter(w=>w.hasModel()&&w.textModel.uri.toString()===l.toString());for(const w of g)w.hasModel()&&w.getInnerWebview()?.reload()}else{const l=(0,S.getNotebookEditorFromEditorPane)(c.activeEditorPane);if(!l)return;l.getInnerWebview()?.reload()}}})}),define(Q[3999],Y([1,0,34,10,252,57,50,2862,43,124,28,16,56,48,13,38]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigureLanguageBasedSettingsAction=void 0;let o=class extends t.Action{static{this.ID="workbench.action.configureLanguageBasedSettings"}static{this.LABEL={value:f.localize(0,null),original:"Configure Language Specific Settings..."}}constructor(d,p,c,l,n,g){super(d,p),this.modelService=c,this.languageService=l,this.quickInputService=n,this.preferencesService=g}async run(){const p=this.languageService.getSortedRegisteredLanguageNames().map(({languageName:c,languageId:l})=>{const n=f.localize(1,null,l);let g;const w=this.languageService.getExtensions(l);if(w.length)g=y.URI.file(w[0]);else{const E=this.languageService.getFilenames(l);E.length&&(g=y.URI.file(E[0]))}return{label:c,iconClasses:(0,b.getIconClasses)(this.modelService,this.languageService,g),description:n}});await this.quickInputService.pick(p,{placeHolder:f.localize(2,null)}).then(c=>{if(c){const l=this.languageService.getLanguageIdByLanguageName(c.label);if(typeof l=="string")return this.preferencesService.openLanguageSpecificSettings(l)}})}};e.ConfigureLanguageBasedSettingsAction=o,e.ConfigureLanguageBasedSettingsAction=o=fe([O(2,D.IModelService),O(3,T.ILanguageService),O(4,v.IQuickInputService),O(5,m.IPreferencesService)],o),S.CommandsRegistry.registerCommand({id:"_getAllSettings",handler:()=>h.Registry.as(a.Extensions.Configuration).getConfigurationProperties()}),S.CommandsRegistry.registerCommand("_getAllCommands",function(u){const d=u.get(s.IKeybindingService),p=[];for(const c of r.EditorExtensionsRegistry.getEditorActions()){const l=d.lookupKeybinding(c.id);p.push({command:c.id,label:c.label,precondition:c.precondition?.serialize(),keybinding:l?.getLabel()??"Not set"})}for(const c of i.MenuRegistry.getMenuItems(i.MenuId.CommandPalette))if((0,i.isIMenuItem)(c)){const l=typeof c.command.title=="string"?c.command.title:c.command.title.value,n=c.command.category?typeof c.command.category=="string"?c.command.category:c.command.category.value:void 0,g=n?`${n}: ${l}`:l,w=d.lookupKeybinding(c.command.id);p.push({command:c.command.id,label:g,precondition:c.when?.serialize(),keybinding:w?.getLabel()??"Not set"})}return p})}),define(Q[4e3],Y([1,0,124,20,33,16,56,128,5,4,333,95,149,31,9,35,741]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";var u,d,p;Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteSearchProvider=e.SettingMatches=e.LocalSearchProvider=e.PreferencesSearchService=void 0;let c=class extends m.Disposable{constructor(I,_,A,k){super(),this.instantiationService=I,this.configurationService=_,this.extensionManagementService=A,this.extensionEnablementService=k,this._installedExtensions=this.extensionManagementService.getInstalled(1).then(L=>L.filter(R=>this.extensionEnablementService.isEnabled(R)).filter(R=>R.manifest&&R.manifest.contributes&&R.manifest.contributes.configuration).filter(R=>!!R.identifier.uuid))}get remoteSearchAllowed(){return this.configurationService.getValue().workbench.settings.enableNaturalLanguageSearch}getRemoteSearchProvider(I,_=!1){if(this.remoteSearchAllowed)return this._remoteSearchProvider||(this._remoteSearchProvider=this.instantiationService.createInstance(E)),this._remoteSearchProvider.setFilter(I),this._remoteSearchProvider}getLocalSearchProvider(I){return this.instantiationService.createInstance(n,I)}};e.PreferencesSearchService=c,e.PreferencesSearchService=c=fe([O(0,v.IInstantiationService),O(1,i.IConfigurationService),O(2,h.IExtensionManagementService),O(3,a.IWorkbenchExtensionEnablementService)],c);function l(C){return C.replace(/[":]/g," ").replace(/ /g," ").trim()}let n=class{static{u=this}static{this.EXACT_MATCH_SCORE=1e4}static{this.START_SCORE=1e3}constructor(I,_){this._filter=I,this.configurationService=_,this._filter=l(this._filter)}searchModel(I,_){if(!this._filter)return Promise.resolve(null);let A=u.START_SCORE;const k=R=>{const{matches:M,matchType:N}=new g(this._filter,R,!0,!0,(x,F)=>I.findValueMatches(x,F),this.configurationService),P=this._filter===R.key?u.EXACT_MATCH_SCORE:A--;return M&&M.length?{matches:M,matchType:N,score:P}:null},L=I.filterSettings(this._filter,this.getGroupFilter(this._filter),k);return L[0]&&L[0].score===u.EXACT_MATCH_SCORE?Promise.resolve({filterMatches:L.slice(0,1),exactMatch:!0}):Promise.resolve({filterMatches:L})}getGroupFilter(I){const _=b.createRegExp(I,!1,{global:!0});return A=>_.test(A.title)}};e.LocalSearchProvider=n,e.LocalSearchProvider=n=u=fe([O(1,i.IConfigurationService)],n);let g=d=class{constructor(I,_,A,k,L,R){this.requireFullQueryMatch=A,this.searchDescription=k,this.valuesMatcher=L,this.configurationService=R,this.descriptionMatchingWords=new Map,this.keyMatchingWords=new Map,this.valueMatchingWords=new Map,this.matchType=t.SettingMatchType.None,this.matches=(0,y.distinct)(this._findMatchesInSetting(I,_),M=>`${M.startLineNumber}_${M.startColumn}_${M.endLineNumber}_${M.endColumn}_`)}_findMatchesInSetting(I,_){const A=this._doFindMatchesInSetting(I,_);if(_.overrides&&_.overrides.length)for(const k of _.overrides){const L=new d(I,k,this.requireFullQueryMatch,this.searchDescription,this.valuesMatcher,this.configurationService),R=I.split(" "),M=this.getRangesForWords(R,this.descriptionMatchingWords,[L.descriptionMatchingWords,L.keyMatchingWords,L.valueMatchingWords]),N=this.getRangesForWords(R,this.keyMatchingWords,[L.descriptionMatchingWords,L.keyMatchingWords,L.valueMatchingWords]),P=this.getRangesForWords(R,L.keyMatchingWords,[this.descriptionMatchingWords,this.keyMatchingWords,L.valueMatchingWords]),x=this.getRangesForWords(R,L.valueMatchingWords,[this.descriptionMatchingWords,this.keyMatchingWords,L.keyMatchingWords]);A.push(...M,...N,...P,...x),A.push(...L.matches),this.refreshMatchType(N.length+P.length),this.matchType|=L.matchType}return A}_doFindMatchesInSetting(I,_){const k=D.Registry.as(T.Extensions.Configuration).getConfigurationProperties()[_.key],L=I.split(" "),R=_.key.split(".").join(" "),M=this.configurationService.getValue(_.key);for(const V of L){if(this.searchDescription)for(let B=0;B<_.description.length;B++){const K=(0,f.matchesWords)(V,_.description[B],!0);K&&this.descriptionMatchingWords.set(V,K.map(H=>this.toDescriptionRange(_,H,B))),this.checkForWholeWordMatchType(V,_.description[B])}const W=(0,f.or)(f.matchesWords,f.matchesCamelCase)(V,R);W&&this.keyMatchingWords.set(V,W.map(B=>this.toKeyRange(_,B))),this.checkForWholeWordMatchType(V,R);const z=typeof M=="string"?(0,f.matchesContiguousSubString)(V,M):null;z?this.valueMatchingWords.set(V,z.map(B=>this.toValueRange(_,B))):k&&k.enum&&k.enum.some(B=>typeof B=="string"&&!!(0,f.matchesContiguousSubString)(V,B))&&this.valueMatchingWords.set(V,[]),typeof M=="string"&&this.checkForWholeWordMatchType(V,M)}const N=[];if(this.searchDescription){for(let V=0;V<_.description.length;V++){const W=(0,f.or)(f.matchesContiguousSubString)(I,_.description[V]||"")||[];N.push(...W.map(z=>this.toDescriptionRange(_,z,V)))}N.length===0&&N.push(...this.getRangesForWords(L,this.descriptionMatchingWords,[this.keyMatchingWords,this.valueMatchingWords]))}const P=(0,f.or)(f.matchesPrefix,f.matchesContiguousSubString)(I,_.key),x=P?P.map(V=>this.toKeyRange(_,V)):this.getRangesForWords(L,this.keyMatchingWords,[this.descriptionMatchingWords,this.valueMatchingWords]);let F=[];if(typeof M=="string"&&M){const V=(0,f.or)(f.matchesPrefix,f.matchesContiguousSubString)(I,M);F=V?V.map(W=>this.toValueRange(_,W)):this.getRangesForWords(L,this.valueMatchingWords,[this.keyMatchingWords,this.descriptionMatchingWords])}else F=this.valuesMatcher(I,_);return this.refreshMatchType(x.length),[...N,...x,...F]}checkForWholeWordMatchType(I,_){I=I.toLowerCase().replace(/[\s-\._]+$/,""),_=_.toLowerCase(),new RegExp(`\\b${b.escapeRegExpCharacters(I)}\\b`).test(_)&&(this.matchType|=t.SettingMatchType.WholeWordMatch)}refreshMatchType(I){I&&(this.matchType|=t.SettingMatchType.KeyMatch)}getRangesForWords(I,_,A){const k=[];for(const L of I){const R=_.get(L);if(R)k.push(...R);else if(this.requireFullQueryMatch&&A.every(M=>!M.has(L)))return[]}return k}toKeyRange(I,_){return{startLineNumber:I.keyRange.startLineNumber,startColumn:I.keyRange.startColumn+_.start,endLineNumber:I.keyRange.startLineNumber,endColumn:I.keyRange.startColumn+_.end}}toDescriptionRange(I,_,A){return{startLineNumber:I.descriptionRanges[A].startLineNumber,startColumn:I.descriptionRanges[A].startColumn+_.start,endLineNumber:I.descriptionRanges[A].endLineNumber,endColumn:I.descriptionRanges[A].startColumn+_.end}}toValueRange(I,_){return{startLineNumber:I.valueRange.startLineNumber,startColumn:I.valueRange.startColumn+_.start+1,endLineNumber:I.valueRange.startLineNumber,endColumn:I.valueRange.startColumn+_.end+1}}};e.SettingMatches=g,e.SettingMatches=g=d=fe([O(5,i.IConfigurationService)],g);class w{constructor(I){this.aiRelatedInformationService=I,this.settingKeys=[],this.settingsRecord={}}updateModel(I){I!==this.currentPreferencesModel&&(this.currentPreferencesModel=I,this.refresh())}refresh(){if(this.settingKeys=[],this.settingsRecord={},!(!this.currentPreferencesModel||!this.aiRelatedInformationService.isEnabled())){for(const I of this.currentPreferencesModel.settingsGroups)if(I.id!=="mostCommonlyUsed")for(const _ of I.sections)for(const A of _.settings)this.settingKeys.push(A.key),this.settingsRecord[A.key]=A}}getSettingKeys(){return this.settingKeys}getSettingsRecord(){return this.settingsRecord}}let E=class{static{p=this}static{this.AI_RELATED_INFORMATION_THRESHOLD=.73}static{this.AI_RELATED_INFORMATION_MAX_PICKS=15}constructor(I){this.aiRelatedInformationService=I,this._filter="",this._keysProvider=new w(I)}setFilter(I){this._filter=l(I)}async searchModel(I,_){return!this._filter||!this.aiRelatedInformationService.isEnabled()?null:(this._keysProvider.updateModel(I),{filterMatches:await this.getAiRelatedInformationItems(_)})}async getAiRelatedInformationItems(I){const _=this._keysProvider.getSettingsRecord(),A=[],k=await this.aiRelatedInformationService.getRelatedInformation(this._filter,[o.RelatedInformationType.SettingInformation],I??r.CancellationToken.None);k.sort((L,R)=>R.weight-L.weight);for(const L of k){if(L.weight<p.AI_RELATED_INFORMATION_THRESHOLD||A.length===p.AI_RELATED_INFORMATION_MAX_PICKS)break;const R=L.setting;A.push({setting:_[R],matches:[_[R].range],matchType:t.SettingMatchType.RemoteMatch,score:L.weight})}return A}};e.RemoteSearchProvider=E,e.RemoteSearchProvider=E=p=fe([O(0,o.IAiRelatedInformationService)],E),(0,s.registerSingleton)(S.IPreferencesSearchService,c,1)}),define(Q[4001],Y([1,0,34,4,22,26,17,10,2883,13,68,28,56,8,49,91,11,23,41,52,72,43,16,1182,24,39,45,279,44,237,124]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteTunnelWorkbenchContribution=e.REMOTE_TUNNEL_CONNECTION_STATE=e.REMOTE_TUNNEL_CONNECTION_STATE_KEY=e.REMOTE_TUNNEL_CATEGORY=void 0,e.REMOTE_TUNNEL_CATEGORY={original:"Remote-Tunnels",value:(0,v.localize)(0,null)},e.REMOTE_TUNNEL_CONNECTION_STATE_KEY="remoteTunnelConnection",e.REMOTE_TUNNEL_CONNECTION_STATE=new r.RawContextKey(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"disconnected");const L="remoteTunnelServiceUsed",R="remoteTunnelServicePromptedPreview",M="remoteTunnelExtensionRecommended",N=4*60*1e3,P=2;var x;(function(z){z.turnOn="workbench.remoteTunnel.actions.turnOn",z.turnOff="workbench.remoteTunnel.actions.turnOff",z.connecting="workbench.remoteTunnel.actions.connecting",z.manage="workbench.remoteTunnel.actions.manage",z.showLog="workbench.remoteTunnel.actions.showLog",z.configure="workbench.remoteTunnel.actions.configure",z.copyToClipboard="workbench.remoteTunnel.actions.copyToClipboard",z.learnMore="workbench.remoteTunnel.actions.learnMore"})(x||(x={}));var F;(function(z){z.turnOn=(0,v.localize)(1,null),z.turnOff=(0,v.localize)(2,null),z.showLog=(0,v.localize)(3,null),z.configure=(0,v.localize)(4,null),z.copyToClipboard=(0,v.localize)(5,null),z.learnMore=(0,v.localize)(6,null)})(F||(F={}));let V=class extends y.Disposable{constructor(B,K,H,U,G,$,ie,J,j,ee,X,te,Z,se){super(),this.authenticationService=B,this.dialogService=K,this.extensionService=H,this.contextKeyService=U,this.storageService=$,this.quickInputService=J,this.environmentService=j,this.remoteTunnelService=ee,this.commandService=X,this.workspaceContextService=te,this.progressService=Z,this.notificationService=se,this.expiredSessions=new Set,this.logger=this._register(ie.createLogger(g.LOG_ID,{name:g.LOGGER_NAME})),this.connectionStateContext=e.REMOTE_TUNNEL_CONNECTION_STATE.bindTo(this.contextKeyService);const re=G.tunnelApplicationConfig;if(!re||!G.tunnelApplicationName){this.logger.error("Missing 'tunnelApplicationConfig' or 'tunnelApplicationName' in product.json. Remote tunneling is not available."),this.serverConfiguration={authenticationProviders:{},editorWebUrl:"",extension:{extensionId:"",friendlyName:""}};return}this.serverConfiguration=re,this._register(this.remoteTunnelService.onDidChangeTunnelStatus(oe=>this.handleTunnelStatusUpdate(oe))),this.registerCommands(),this.initialize(),this.recommendRemoteExtensionIfNeeded()}handleTunnelStatusUpdate(B){this.connectionInfo=void 0,B.type==="disconnected"?(B.onTokenFailed&&this.expiredSessions.add(B.onTokenFailed.sessionId),this.connectionStateContext.set("disconnected")):B.type==="connecting"?this.connectionStateContext.set("connecting"):B.type==="connected"&&(this.connectionInfo=B.info,this.connectionStateContext.set("connected"))}async recommendRemoteExtensionIfNeeded(){await this.extensionService.whenInstalledExtensionsRegistered();const B=this.serverConfiguration.extension,K=async()=>{if(this.storageService.getBoolean(M,-1)||await this.extensionService.getExtension(B.extensionId))return!1;const U=this.storageService.get(L,-1);if(!U)return!1;let G;try{const ie=JSON.parse(U);if(!(0,T.isObject)(ie))return!1;const{hostName:J,timeStamp:j}=ie;if(!(0,T.isString)(J)||!(0,T.isNumber)(j)||new Date().getTime()>j+N)return!1;G=J}catch{return!1}const $=await this.remoteTunnelService.getTunnelName();return!$||$===G?!1:G},H=async()=>{const U=await K();return U?(this.notificationService.notify({severity:u.Severity.Info,message:(0,v.localize)(7,null,U,B.friendlyName),actions:{primary:[new t.Action("showExtension",(0,v.localize)(8,null),void 0,!0,()=>this.commandService.executeCommand("workbench.extensions.action.showExtensionsWithIds",[B.extensionId])),new t.Action("doNotShowAgain",(0,v.localize)(9,null),void 0,!0,()=>{this.storageService.store(M,!0,-1,0)})]}}),!0):!1};if(await K()){const U=this._register(new y.DisposableStore);U.add(this.storageService.onDidChangeValue(-1,L,U)(async()=>{await H()&&U.dispose()}))}}async initialize(){const[B,K]=await Promise.all([this.remoteTunnelService.getMode(),this.remoteTunnelService.getTunnelStatus()]);if(this.handleTunnelStatusUpdate(K),!(B.active&&B.session.token))return await this.progressService.withProgress({location:10,title:(0,v.localize)(10,null,x.showLog)},async H=>{const U=this.remoteTunnelService.onDidChangeTunnelStatus(ie=>{switch(ie.type){case"connecting":ie.progress&&H.report({message:ie.progress});break}});let G;if(B.active){const ie=await this.getSessionToken(B.session);ie&&(G={...B.session,token:ie})}const $=await this.remoteTunnelService.initialize(B.active&&G?{...B,session:G}:g.INACTIVE_TUNNEL_MODE);if(U.dispose(),$.type==="connected"){this.connectionInfo=$.info,this.connectionStateContext.set("connected");return}})}async startTunnel(B){if(this.connectionInfo)return this.connectionInfo;let K=!1;for(let H=0;H<P;H++){K=!1;const U=await this.getAuthenticationSession();if(U===void 0){this.logger.info("No authentication session available, not starting tunnel");return}const G=await this.progressService.withProgress({location:15,title:(0,v.localize)(11,null,x.showLog)},$=>new Promise((ie,J)=>{let j=!1;const ee=this.remoteTunnelService.onDidChangeTunnelStatus(Z=>{switch(Z.type){case"connecting":Z.progress&&$.report({message:Z.progress});break;case"connected":ee.dispose(),j=!0,ie(Z.info),Z.serviceInstallFailed&&this.notificationService.notify({severity:u.Severity.Warning,message:(0,v.localize)(12,null,x.showLog)});break;case"disconnected":ee.dispose(),j=!0,K=!!Z.onTokenFailed,ie(void 0);break}}),X=U.session.idToken??U.session.accessToken,te={sessionId:U.session.id,token:X,providerId:U.providerId,accountLabel:U.session.account.label};this.remoteTunnelService.startTunnel({active:!0,asService:B,session:te}).then(Z=>{!j&&(Z.type==="connected"||Z.type==="disconnected")&&(ee.dispose(),Z.type==="connected"?ie(Z.info):(K=!!Z.onTokenFailed,ie(void 0)))})}));if(G||!K)return G}}async getAuthenticationSession(){const B=await this.getAllSessions();if(B.length===1)return B[0];const K=this.quickInputService.createQuickPick();return K.ok=!1,K.placeholder=(0,v.localize)(13,null),K.ignoreFocusOut=!0,K.items=await this.createQuickpickItems(B),new Promise((H,U)=>{K.onDidHide(G=>{H(void 0),K.dispose()}),K.onDidAccept(async G=>{const $=K.selectedItems[0];if("provider"in $){const ie=await this.authenticationService.createSession($.provider.id,$.provider.scopes);H(this.createExistingSessionItem(ie,$.provider.id))}else"session"in $?H($):H(void 0);K.hide()}),K.show()})}createExistingSessionItem(B,K){return{label:B.account.label,description:this.authenticationService.getLabel(K),session:B,providerId:K}}async createQuickpickItems(B){const K=[];B.length&&(K.push({type:"separator",label:(0,v.localize)(14,null)}),K.push(...B),K.push({type:"separator",label:(0,v.localize)(15,null)}));for(const H of await this.getAuthenticationProviders())if(!B.some(G=>G.providerId===H.id)||this.authenticationService.supportsMultipleAccounts(H.id)){const G=this.authenticationService.getLabel(H.id);K.push({label:(0,v.localize)(16,null,G),provider:H})}return K}async getAllSessions(){const B=await this.getAuthenticationProviders(),K=new Map,H=await this.remoteTunnelService.getMode();let U;for(const G of B){const $=await this.authenticationService.getSessions(G.id,G.scopes);for(const ie of $)if(!this.expiredSessions.has(ie.id)){const J=this.createExistingSessionItem(ie,G.id);K.set(J.session.account.id,J),H.active&&H.session.sessionId===ie.id&&(U=J)}}return U!==void 0&&K.set(U.session.account.id,U),[...K.values()]}async getSessionToken(B){if(B){const K=(await this.getAllSessions()).find(H=>H.session.id===B.sessionId);if(K)return K.session.idToken??K.session.accessToken}}async getAuthenticationProviders(){const B=this.serverConfiguration.authenticationProviders,K=Object.keys(B).reduce((U,G)=>(U.push({id:G,scopes:B[G].scopes}),U),[]),H=this.authenticationService.declaredProviders;return K.filter(({id:U})=>H.some(G=>G.id===U))}registerCommands(){const B=this;this._register((0,m.registerAction2)(class extends m.Action2{constructor(){super({id:x.turnOn,title:F.turnOn,category:e.REMOTE_TUNNEL_CATEGORY,precondition:r.ContextKeyExpr.equals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"disconnected"),menu:[{id:m.MenuId.CommandPalette},{id:m.MenuId.AccountsContext,group:"2_remoteTunnel",when:r.ContextKeyExpr.equals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"disconnected")}]})}async run(K){const H=K.get(u.INotificationService),U=K.get(S.IClipboardService),G=K.get(h.ICommandService),$=K.get(w.IStorageService),ie=K.get(i.IDialogService),J=K.get(l.IQuickInputService),j=K.get(p.IProductService);if(!$.getBoolean(R,-1,!1)){const{confirmed:re}=await ie.confirm({message:(0,v.localize)(17,null),primaryButton:(0,v.localize)(18,null)});if(!re)return;$.store(R,!0,-1,0)}const X=new y.DisposableStore,te=J.createQuickPick();te.placeholder=(0,v.localize)(19,null),te.items=[{service:!1,label:(0,v.localize)(20,null),description:(0,v.localize)(21,null,j.nameShort)},{service:!0,label:(0,v.localize)(22,null),description:(0,v.localize)(23,null)}];const Z=await new Promise(re=>{X.add(te.onDidAccept(()=>re(te.selectedItems[0]?.service))),X.add(te.onDidHide(()=>re(void 0))),te.show()});if(te.dispose(),Z===void 0)return;const se=await B.startTunnel(Z);if(se){const re=B.getLinkToOpen(se),oe=B.serverConfiguration.extension,le=re.toString(!1).replace(/\)/g,"%29");H.notify({severity:u.Severity.Info,message:(0,v.localize)(24,null,se.tunnelName,se.domain,le,x.manage,x.configure,x.turnOff,oe.friendlyName,"https://code.visualstudio.com/docs/remote/tunnels"),actions:{primary:[new t.Action("copyToClipboard",(0,v.localize)(25,null),void 0,!0,()=>U.writeText(re.toString(!0))),new t.Action("showExtension",(0,v.localize)(26,null),void 0,!0,()=>G.executeCommand("workbench.extensions.action.showExtensionsWithIds",[oe.extensionId]))]}});const ne={hostName:se.tunnelName,timeStamp:new Date().getTime()};$.store(L,JSON.stringify(ne),-1,0)}else H.notify({severity:u.Severity.Info,message:(0,v.localize)(27,null)}),await G.executeCommand(x.showLog)}})),this._register((0,m.registerAction2)(class extends m.Action2{constructor(){super({id:x.manage,title:(0,v.localize)(28,null),category:e.REMOTE_TUNNEL_CATEGORY,menu:[{id:m.MenuId.AccountsContext,group:"2_remoteTunnel",when:r.ContextKeyExpr.equals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"connected")}]})}async run(){B.showManageOptions()}})),this._register((0,m.registerAction2)(class extends m.Action2{constructor(){super({id:x.connecting,title:(0,v.localize)(29,null),category:e.REMOTE_TUNNEL_CATEGORY,menu:[{id:m.MenuId.AccountsContext,group:"2_remoteTunnel",when:r.ContextKeyExpr.equals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"connecting")}]})}async run(){B.showManageOptions()}})),this._register((0,m.registerAction2)(class extends m.Action2{constructor(){super({id:x.turnOff,title:F.turnOff,category:e.REMOTE_TUNNEL_CATEGORY,precondition:r.ContextKeyExpr.notEquals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"disconnected"),menu:[{id:m.MenuId.CommandPalette,when:r.ContextKeyExpr.notEquals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"")}]})}async run(){const K=B.connectionInfo?.isAttached?(0,v.localize)(30,null):(0,v.localize)(31,null),{confirmed:H}=await B.dialogService.confirm({message:K});H&&B.remoteTunnelService.stopTunnel()}})),this._register((0,m.registerAction2)(class extends m.Action2{constructor(){super({id:x.showLog,title:F.showLog,category:e.REMOTE_TUNNEL_CATEGORY,menu:[{id:m.MenuId.CommandPalette,when:r.ContextKeyExpr.notEquals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"")}]})}async run(K){K.get(A.IOutputService).showChannel(g.LOG_ID)}})),this._register((0,m.registerAction2)(class extends m.Action2{constructor(){super({id:x.configure,title:F.configure,category:e.REMOTE_TUNNEL_CATEGORY,menu:[{id:m.MenuId.CommandPalette,when:r.ContextKeyExpr.notEquals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"")}]})}async run(K){K.get(k.IPreferencesService).openSettings({query:g.CONFIGURATION_KEY_PREFIX})}})),this._register((0,m.registerAction2)(class extends m.Action2{constructor(){super({id:x.copyToClipboard,title:F.copyToClipboard,category:e.REMOTE_TUNNEL_CATEGORY,precondition:r.ContextKeyExpr.equals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"connected"),menu:[{id:m.MenuId.CommandPalette,when:r.ContextKeyExpr.equals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"connected")}]})}async run(K){const H=K.get(S.IClipboardService);if(B.connectionInfo){const U=B.getLinkToOpen(B.connectionInfo);H.writeText(U.toString(!0))}}})),this._register((0,m.registerAction2)(class extends m.Action2{constructor(){super({id:x.learnMore,title:F.learnMore,category:e.REMOTE_TUNNEL_CATEGORY,menu:[]})}async run(K){await K.get(d.IOpenerService).open("https://aka.ms/vscode-server-doc")}}))}getLinkToOpen(B){const K=this.workspaceContextService.getWorkspace(),H=K.folders;let U;H.length===1?U=H[0].uri:K.configuration&&!(0,E.isUntitledWorkspace)(K.configuration,this.environmentService)&&(U=K.configuration);const G=f.URI.parse(B.link);return U?.scheme===b.Schemas.file?(0,D.joinPath)(G,U.path):(0,D.joinPath)(G,this.environmentService.userHome.path)}async showManageOptions(){const B=await this.remoteTunnelService.getMode();return new Promise((K,H)=>{const U=new y.DisposableStore,G=this.quickInputService.createQuickPick();G.placeholder=(0,v.localize)(32,null),U.add(G);const $=[];$.push({id:x.learnMore,label:F.learnMore}),this.connectionInfo?(G.title=this.connectionInfo.isAttached?(0,v.localize)(33,null,this.connectionInfo.tunnelName):(0,v.localize)(34,null,this.connectionInfo.tunnelName),$.push({id:x.copyToClipboard,label:F.copyToClipboard,description:this.connectionInfo.domain})):G.title=(0,v.localize)(35,null),$.push({id:x.showLog,label:(0,v.localize)(36,null)}),$.push({type:"separator"}),$.push({id:x.configure,label:(0,v.localize)(37,null),description:this.connectionInfo?.tunnelName}),$.push({id:x.turnOff,label:F.turnOff,description:B.active?`${B.session.accountLabel} (${B.session.providerId})`:void 0}),G.items=$,U.add(G.onDidAccept(()=>{G.selectedItems[0]&&G.selectedItems[0].id&&this.commandService.executeCommand(G.selectedItems[0].id),G.hide()})),U.add(G.onDidHide(()=>{U.dispose(),K()})),G.show()})}};e.RemoteTunnelWorkbenchContribution=V,e.RemoteTunnelWorkbenchContribution=V=fe([O(0,I.IAuthenticationService),O(1,i.IDialogService),O(2,_.IExtensionService),O(3,r.IContextKeyService),O(4,p.IProductService),O(5,w.IStorageService),O(6,o.ILoggerService),O(7,l.IQuickInputService),O(8,s.INativeEnvironmentService),O(9,g.IRemoteTunnelService),O(10,h.ICommandService),O(11,E.IWorkspaceContextService),O(12,c.IProgressService),O(13,u.INotificationService)],V),n.Registry.as(C.Extensions.Workbench).registerWorkbenchContribution(V,3),n.Registry.as(a.Extensions.Configuration).registerConfiguration({type:"object",properties:{[g.CONFIGURATION_KEY_HOST_NAME]:{description:(0,v.localize)(38,null),type:"string",scope:1,pattern:"^(\\w[\\w-]*)?$",patternErrorMessage:(0,v.localize)(39,null),maxLength:20,default:""},[g.CONFIGURATION_KEY_PREVENT_SLEEP]:{description:(0,v.localize)(40,null),type:"boolean",scope:1,default:!1}}})}),define(Q[4002],Y([1,0,34,13,8,265,18,23,38,139,66,9,61,353,971,24,1162,100,86,124,28,747,844,88]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeMenubarControl=void 0;let w=class extends i.MenubarControl{constructor(C,I,_,A,k,L,R,M,N,P,x,F,V,W,z,B){super(C,I,_,A,k,L,R,M,N,P,x,F,W,B),this.menubarService=V,this.nativeHostService=z,(async()=>(this.recentlyOpened=await this.workspacesService.getRecentlyOpened(),this.doUpdateMenubar()))(),this.registerListeners()}setupMainMenu(){super.setupMainMenu();for(const C of Object.keys(this.topLevelTitles)){const I=this.menus[C];I&&this.mainMenuDisposables.add(I.onDidChange(()=>this.updateMenubar()))}}doUpdateMenubar(){if(!this.hostService.hasFocus)return;const C={menus:{},keybindings:{}};this.getMenubarMenus(C)&&this.menubarService.updateMenubar(this.nativeHostService.windowId,C)}getMenubarMenus(C){if(!C)return!1;C.keybindings=this.getAdditionalKeybindings();for(const I of Object.keys(this.topLevelTitles)){const _=this.menus[I];if(_){const A={items:[]},k=[];if((0,g.createAndFillInContextMenuActions)(_,{shouldForwardArgs:!0},k),this.populateMenuItems(k,A,C.keybindings),A.items.length===0)return!1;C.menus[I]=A}}return!0}populateMenuItems(C,I,_){for(const A of C)if(A instanceof t.Separator)I.items.push({id:"vscode.menubar.separator"});else if(A instanceof y.MenuItemAction||A instanceof y.SubmenuItemAction){const k=typeof A.item.title=="string"?A.item.title:A.item.title.mnemonicTitle??A.item.title.value;if(A instanceof y.SubmenuItemAction){const L={items:[]};if(this.populateMenuItems(A.actions,L,_),L.items.length>0){const R={id:A.id,label:k,submenu:L};I.items.push(R)}}else{if(A.id===l.OpenRecentAction.ID){const R=this.getOpenRecentActions().map(this.transformOpenRecentAction);I.items.push(...R)}const L={id:A.id,label:k};(0,n.isICommandActionToggleInfo)(A.item.toggled)&&(L.label=A.item.toggled.mnemonicTitle??A.item.toggled.title??k),A.checked&&(L.checked=!0),A.enabled||(L.enabled=!1),_[A.id]=this.getMenubarKeybinding(A.id),I.items.push(L)}}}transformOpenRecentAction(C){return C instanceof t.Separator?{id:"vscode.menubar.separator"}:{id:C.id,uri:C.uri,remoteAuthority:C.remoteAuthority,enabled:C.enabled,label:C.label}}getAdditionalKeybindings(){const C={};if(T.isMacintosh){const I=this.getMenubarKeybinding("workbench.action.quit");I&&(C["workbench.action.quit"]=I)}return C}getMenubarKeybinding(C){const I=this.keybindingService.lookupKeybinding(C);if(!I)return;const _=I.getElectronAccelerator();if(_)return{label:_,userSettingsLabel:I.getUserSettingsLabel()??void 0};const A=I.getLabel();if(A)return{label:A,isNative:!1,userSettingsLabel:I.getUserSettingsLabel()??void 0}}};e.NativeMenubarControl=w,e.NativeMenubarControl=w=fe([O(0,y.IMenuService),O(1,D.IWorkspacesService),O(2,b.IContextKeyService),O(3,v.IKeybindingService),O(4,h.IConfigurationService),O(5,a.ILabelService),O(6,r.IUpdateService),O(7,s.IStorageService),O(8,f.INotificationService),O(9,p.IPreferencesService),O(10,m.INativeWorkbenchEnvironmentService),O(11,S.IAccessibilityService),O(12,o.IMenubarService),O(13,d.IHostService),O(14,u.INativeHostService),O(15,c.ICommandService)],w)}),define(Q[972],Y([1,0,22,10,3095,163,124]),function(q,e,t,y,b,D,T){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsEditor2Input=void 0;let v=class extends D.EditorInput{static{f=this}static{this.ID="workbench.input.settings2"}constructor(S){super(),this.resource=y.URI.from({scheme:t.Schemas.vscodeSettings,path:"settingseditor"}),this._settingsModel=S.createSettings2EditorModel()}matches(S){return super.matches(S)||S instanceof f}get typeId(){return f.ID}getName(){return b.localize(0,null)}async resolve(){return this._settingsModel}dispose(){this._settingsModel.dispose(),super.dispose()}};e.SettingsEditor2Input=v,e.SettingsEditor2Input=v=f=fe([O(0,T.IPreferencesService)],v)}),define(Q[4003],Y([1,0,6,4,18,26,116,120,46,118,21,86,970,972]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncTrigger=void 0;let i=class extends y.Disposable{constructor(o,u,d,p,c){super(),this.userDataProfilesService=u;const l=t.Event.filter(t.Event.any(t.Event.map(o.onDidActiveEditorChange,()=>this.getUserDataEditorInputSource(o.activeEditor)),t.Event.map(t.Event.filter(d.onDidChangeViewContainerVisibility,n=>n.id===m.VIEWLET_ID&&n.visible),n=>n.id)),n=>n!==void 0);b.isWeb?this._register(t.Event.debounce(t.Event.any(t.Event.map(c.onDidChangeFocus,()=>"windowFocus"),t.Event.map(l,n=>n)),(n,g)=>n?[...n,g]:[g],1e3)(n=>p.triggerSync(n,!0,!1))):this._register(l(n=>p.triggerSync([n],!0,!1)))}getUserDataEditorInputSource(o){if(!o)return;if(o instanceof r.SettingsEditor2Input)return"settingsEditor";if(o instanceof a.KeybindingsEditorInput)return"keybindingsEditor";const u=o.resource;if((0,D.isEqual)(u,this.userDataProfilesService.defaultProfile.settingsResource))return"settingsEditor";if((0,D.isEqual)(u,this.userDataProfilesService.defaultProfile.keybindingsResource))return"keybindingsEditor"}};e.UserDataSyncTrigger=i,e.UserDataSyncTrigger=i=fe([O(0,S.IEditorService),O(1,T.IUserDataProfilesService),O(2,v.IViewsService),O(3,f.IUserDataAutoSyncService),O(4,h.IHostService)],i)}),define(Q[1389],Y([1,0,3097,80,17]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getInvalidTypeError=e.createValidator=void 0;function D(s,...o){return o.some(u=>s.includes(u))}function T(s){return s===""||(0,b.isUndefinedOrNull)(s)}function f(s){const o=Array.isArray(s.type)?s.type:[s.type],u=D(o,"null"),d=(D(o,"number")||D(o,"integer"))&&(o.length===1||o.length===2&&u),p=h(s),c=S(s),l=a(s),n=r(s);return g=>{if(u&&T(g))return"";const w=[];if(l){const E=l(g);E&&w.push(E)}if(n){const E=n(g);E&&w.push(E)}return s.type==="boolean"&&g!==!0&&g!==!1&&w.push(t.localize(0,null)),d&&(T(g)||typeof g=="boolean"||Array.isArray(g)||isNaN(+g)?w.push(t.localize(1,null)):w.push(...p.filter(E=>!E.isValid(+g)).map(E=>E.message))),s.type==="string"&&(s.enum&&!(0,b.isStringArray)(s.enum)?w.push(t.localize(2,null)):(0,b.isString)(g)?w.push(...c.filter(E=>!E.isValid(g)).map(E=>E.message)):w.push(t.localize(3,null))),w.length?s.errorMessage?[s.errorMessage,...w].join(" "):w.join(" "):""}}e.createValidator=f;function v(s,o){if(typeof o>"u")return;if(!(Array.isArray(o)?o:[o]).some(d=>m(s,d)))return t.localize(4,null,JSON.stringify(o))}e.getInvalidTypeError=v;function m(s,o){const u=typeof s;return o==="boolean"?u==="boolean":o==="object"?s&&!Array.isArray(s)&&u==="object":o==="null"?s===null:o==="array"?Array.isArray(s):o==="string"?u==="string":o==="number"||o==="integer"?u==="number":!0}function S(s){const o=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let u;return typeof s.pattern=="string"&&(u=new RegExp(s.pattern)),[{enabled:s.maxLength!==void 0,isValid:d=>d.length<=s.maxLength,message:t.localize(5,null,s.maxLength)},{enabled:s.minLength!==void 0,isValid:d=>d.length>=s.minLength,message:t.localize(6,null,s.minLength)},{enabled:u!==void 0,isValid:d=>u.test(d),message:s.patternErrorMessage||t.localize(7,null,s.pattern)},{enabled:s.format==="color-hex",isValid:d=>y.Color.Format.CSS.parseHex(d),message:t.localize(8,null)},{enabled:s.format==="uri"||s.format==="uri-reference",isValid:d=>!!d.length,message:t.localize(9,null)},{enabled:s.format==="uri"||s.format==="uri-reference",isValid:d=>o.test(d),message:t.localize(10,null)},{enabled:s.format==="uri",isValid:d=>{const p=d.match(o);return!!(p&&p[2])},message:t.localize(11,null)},{enabled:s.enum!==void 0,isValid:d=>s.enum.includes(d),message:t.localize(12,null,s.enum?s.enum.map(d=>`"${d}"`).join(", "):"[]")}].filter(d=>d.enabled)}function h(s){const o=Array.isArray(s.type)?s.type:[s.type],u=D(o,"null"),d=D(o,"integer")&&(o.length===1||o.length===2&&u);if(!(D(o,"number","integer")&&(o.length===1||o.length===2&&u)))return[];let c,l;return typeof s.exclusiveMaximum=="boolean"?c=s.exclusiveMaximum?s.maximum:void 0:c=s.exclusiveMaximum,typeof s.exclusiveMinimum=="boolean"?l=s.exclusiveMinimum?s.minimum:void 0:l=s.exclusiveMinimum,[{enabled:c!==void 0&&(s.maximum===void 0||c<=s.maximum),isValid:n=>n<c,message:t.localize(13,null,c)},{enabled:l!==void 0&&(s.minimum===void 0||l>=s.minimum),isValid:n=>n>l,message:t.localize(14,null,l)},{enabled:s.maximum!==void 0&&(c===void 0||c>s.maximum),isValid:n=>n<=s.maximum,message:t.localize(15,null,s.maximum)},{enabled:s.minimum!==void 0&&(l===void 0||l<s.minimum),isValid:n=>n>=s.minimum,message:t.localize(16,null,s.minimum)},{enabled:s.multipleOf!==void 0,isValid:n=>n%s.multipleOf===0,message:t.localize(17,null,s.multipleOf)},{enabled:d,isValid:n=>n%1===0,message:t.localize(18,null)}].filter(n=>n.enabled)}function a(s){if(s.type==="array"&&s.items&&!Array.isArray(s.items)){const o=s.items;if(o&&!Array.isArray(o.type)){const u=d=>"'"+d+"'";return d=>{if(!d)return null;let p="";if(!Array.isArray(d))return p+=t.localize(19,null),p+=` `,p;const c=d;if(s.uniqueItems&&new Set(c).size<c.length&&(p+=t.localize(20,null),p+=` `),s.minItems&&c.length<s.minItems&&(p+=t.localize(21,null,s.minItems),p+=` `),s.maxItems&&c.length>s.maxItems&&(p+=t.localize(22,null,s.maxItems),p+=` `),o.type==="string"){if(!(0,b.isStringArray)(c))return p+=t.localize(23,null),p+=` `,p;if(typeof o.pattern=="string"){const n=new RegExp(o.pattern);c.forEach(g=>{n.test(g)||(p+=o.patternErrorMessage||t.localize(24,null,u(g),u(o.pattern)))})}const l=o.enum;l&&c.forEach(n=>{l.indexOf(n)===-1&&(p+=t.localize(25,null,u(n),"["+l.map(u).join(", ")+"]"),p+=` `)})}else(o.type==="integer"||o.type==="number")&&c.forEach(l=>{const n=i(o,l);n&&(p+=`${l}: ${n} `)});return p}}}return null}function r(s){if(s.type==="object"){const{properties:o,patternProperties:u,additionalProperties:d}=s;return p=>{if(!p)return null;const c=[];return(0,b.isObject)(p)?Object.keys(p).forEach(l=>{const n=p[l];if(o&&l in o){const g=i(o[l],n);g&&c.push(`${l}: ${g} `);return}if(u){for(const g in u)if(RegExp(g).test(l)){const w=i(u[g],n);w&&c.push(`${l}: ${w} `);return}}if(d===!1)c.push(t.localize(27,null,l));else if(typeof d=="object"){const g=i(d,n);g&&c.push(`${l}: ${g} `)}}):c.push(t.localize(26,null)),c.length?s.errorMessage?[s.errorMessage,...c].join(" "):c.join(" "):""}}return null}function i(s,o){return f(s)(o)}}),define(Q[751],Y([1,0,20,6,161,4,27,96,3096,9,56,38,16,290,124,245,1389]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultKeybindingsEditorModel=e.defaultKeybindingsContents=e.DefaultRawSettingsEditorModel=e.DefaultSettingsEditorModel=e.DefaultSettings=e.WorkspaceConfigurationEditorModel=e.Settings2EditorModel=e.SettingsEditorModel=e.nullRange=void 0,e.nullRange={startLineNumber:-1,startColumn:-1,endLineNumber:-1,endColumn:-1};function u(L){return L.startLineNumber===-1&&L.startColumn===-1&&L.endLineNumber===-1&&L.endColumn===-1}class d extends r.EditorModel{constructor(){super(...arguments),this._currentResultGroups=new Map}updateResultGroup(R,M){return M?this._currentResultGroups.set(R,M):this._currentResultGroups.delete(R),this.removeDuplicateResults(),this.update()}removeDuplicateResults(){const R=new Set;[...this._currentResultGroups.keys()].sort((M,N)=>this._currentResultGroups.get(M).order-this._currentResultGroups.get(N).order).forEach(M=>{const N=this._currentResultGroups.get(M);N.result.filterMatches=N.result.filterMatches.filter(P=>!R.has(P.setting.key)),N.result.filterMatches.forEach(P=>R.add(P.setting.key))})}compareTwoNullableNumbers(R,M){const N=R??Number.MAX_SAFE_INTEGER,P=M??Number.MAX_SAFE_INTEGER;return N<P?-1:N>P?1:0}filterSettings(R,M,N){const P=this.filterGroups,x=[];for(const F of P){const V=M(F);for(const W of F.sections)for(const z of W.settings){const B=N(z,F);(V||B)&&x.push({setting:z,matches:B&&B.matches,matchType:B?.matchType??i.SettingMatchType.None,score:B?.score??0})}}return x.sort((F,V)=>{if(F.matchType!==V.matchType)return V.matchType-F.matchType;if(F.matchType===i.SettingMatchType.RemoteMatch)return V.score-F.score;if(F.setting.extensionInfo&&V.setting.extensionInfo&&F.setting.extensionInfo.id===V.setting.extensionInfo.id){if(F.setting.categoryLabel!==V.setting.categoryLabel&&(F.setting.categoryOrder!==void 0||V.setting.categoryOrder!==void 0)&&F.setting.categoryOrder!==V.setting.categoryOrder)return this.compareTwoNullableNumbers(F.setting.categoryOrder,V.setting.categoryOrder);if(F.setting.categoryLabel===V.setting.categoryLabel&&(F.setting.order!==void 0||V.setting.order!==void 0)&&F.setting.order!==V.setting.order)return this.compareTwoNullableNumbers(F.setting.order,V.setting.order)}return V.score-F.score}),x}getPreference(R){for(const M of this.settingsGroups)for(const N of M.sections)for(const P of N.settings)if(R===P.key)return P}collectMetadata(R){const M=Object.create(null);let N=!1;return R.forEach(P=>{P.result.metadata&&(M[P.id]=P.result.metadata,N=!0)}),N?M:null}get filterGroups(){return this.settingsGroups}}class p extends d{constructor(R,M){super(),this._configurationTarget=M,this._onDidChangeGroups=this._register(new y.Emitter),this.onDidChangeGroups=this._onDidChangeGroups.event,this.settingsModel=R.object.textEditorModel,this._register(this.onWillDispose(()=>R.dispose())),this._register(this.settingsModel.onDidChangeContent(()=>{this._settingsGroups=void 0,this._onDidChangeGroups.fire()}))}get uri(){return this.settingsModel.uri}get configurationTarget(){return this._configurationTarget}get settingsGroups(){return this._settingsGroups||this.parse(),this._settingsGroups}get content(){return this.settingsModel.getValue()}findValueMatches(R,M){return this.settingsModel.findMatches(R,M.valueRange,!1,!1,null,!1).map(N=>N.range)}isSettingsProperty(R,M){return M.length===0}parse(){this._settingsGroups=l(this.settingsModel,(R,M)=>this.isSettingsProperty(R,M))}update(){const R=[...this._currentResultGroups.values()];if(!R.length)return;const M=[],N=[];R.forEach(V=>{V.result.filterMatches.forEach(W=>{M.push(W.setting),W.matches&&N.push(...W.matches)})});let P;const x=this.settingsGroups[0];x&&(P={id:x.id,range:x.range,sections:[{settings:M}],title:x.title,titleRange:x.titleRange,order:x.order,extensionInfo:x.extensionInfo});const F=this.collectMetadata(R);return{allGroups:this.settingsGroups,filteredGroups:P?[P]:[],matches:N,metadata:F}}}e.SettingsEditorModel=p;let c=class extends d{constructor(R,M){super(),this._defaultSettings=R,this._onDidChangeGroups=this._register(new y.Emitter),this.onDidChangeGroups=this._onDidChangeGroups.event,this.dirty=!1,this._register(M.onDidChangeConfiguration(N=>{N.source===7&&(this.dirty=!0,this._onDidChangeGroups.fire())})),this._register(a.Registry.as(S.Extensions.Configuration).onDidSchemaChange(N=>{this.dirty=!0,this._onDidChangeGroups.fire()}))}get filterGroups(){return this.settingsGroups.slice(1)}get settingsGroups(){const R=this._defaultSettings.getSettingsGroups(this.dirty);return this.additionalGroups?.length&&R.push(...this.additionalGroups),this.dirty=!1,R}setAdditionalGroups(R){this.additionalGroups=R}findValueMatches(R,M){return[]}update(){throw new Error("Not supported")}};e.Settings2EditorModel=c,e.Settings2EditorModel=c=fe([O(1,m.IConfigurationService)],c);function l(L,R){const M=[];let N=null,P=null,x=[];const F=[];let V=-1;const W={startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0};function z(K,H,U){if(Array.isArray(x)?x.push(K):P&&(x[P]=K),F.length===V+1||F.length===V+2&&N!==null){const G=F.length===V+1?M[M.length-1]:N.overrides[N.overrides.length-1];if(G){const $=L.getPositionAt(H),ie=L.getPositionAt(H+U);G.value=K,G.valueRange={startLineNumber:$.lineNumber,startColumn:$.column,endLineNumber:ie.lineNumber,endColumn:ie.column},G.range=Object.assign(G.range,{endLineNumber:ie.lineNumber,endColumn:ie.column})}}}const B={onObjectBegin:(K,H)=>{if(R(P,F)){V=F.length;const G=L.getPositionAt(K);W.startLineNumber=G.lineNumber,W.startColumn=G.column}const U={};z(U,K,H),x=U,P=null,F.push(x)},onObjectProperty:(K,H,U)=>{if(P=K,F.length===V+1||F.length===V+2&&N!==null){const G=L.getPositionAt(H),$={description:[],descriptionIsMarkdown:!1,key:K,keyRange:{startLineNumber:G.lineNumber,startColumn:G.column+1,endLineNumber:G.lineNumber,endColumn:G.column+U},range:{startLineNumber:G.lineNumber,startColumn:G.column,endLineNumber:0,endColumn:0},value:null,valueRange:e.nullRange,descriptionRanges:[],overrides:[],overrideOf:N??void 0};F.length===V+1?(M.push($),S.OVERRIDE_PROPERTY_REGEX.test(K)&&(N=$)):N.overrides.push($)}},onObjectEnd:(K,H)=>{if(x=F.pop(),V!==-1&&(F.length===V+1||F.length===V+2&&N!==null)){const U=F.length===V+1?M[M.length-1]:N.overrides[N.overrides.length-1];if(U){const G=L.getPositionAt(K+H);U.valueRange=Object.assign(U.valueRange,{endLineNumber:G.lineNumber,endColumn:G.column}),U.range=Object.assign(U.range,{endLineNumber:G.lineNumber,endColumn:G.column})}F.length===V+1&&(N=null)}if(F.length===V){const U=L.getPositionAt(K);W.endLineNumber=U.lineNumber,W.endColumn=U.column,V=-1}},onArrayBegin:(K,H)=>{const U=[];z(U,K,H),F.push(x),x=U,P=null},onArrayEnd:(K,H)=>{if(x=F.pop(),F.length===V+1||F.length===V+2&&N!==null){const U=F.length===V+1?M[M.length-1]:N.overrides[N.overrides.length-1];if(U){const G=L.getPositionAt(K+H);U.valueRange=Object.assign(U.valueRange,{endLineNumber:G.lineNumber,endColumn:G.column}),U.range=Object.assign(U.range,{endLineNumber:G.lineNumber,endColumn:G.column})}}},onLiteralValue:z,onError:K=>{const H=M[M.length-1];H&&(u(H.range)||u(H.keyRange)||u(H.valueRange))&&M.pop()}};return L.isDisposed()||(0,b.visit)(L.getValue(),B),M.length>0?[{sections:[{settings:M}],title:"",titleRange:e.nullRange,range:W}]:[]}class n extends p{constructor(){super(...arguments),this._configurationGroups=[]}get configurationGroups(){return this._configurationGroups}parse(){super.parse(),this._configurationGroups=l(this.settingsModel,(R,M)=>M.length===0)}isSettingsProperty(R,M){return R==="settings"&&M.length===1}}e.WorkspaceConfigurationEditorModel=n;class g extends D.Disposable{constructor(R,M){super(),this._mostCommonlyUsedSettingsKeys=R,this.target=M,this._settingsByName=new Map,this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event}getContent(R=!1){return(!this._content||R)&&this.initialize(),this._content}getContentWithoutMostCommonlyUsed(R=!1){return(!this._contentWithoutMostCommonlyUsed||R)&&this.initialize(),this._contentWithoutMostCommonlyUsed}getSettingsGroups(R=!1){return(!this._allSettingsGroups||R)&&this.initialize(),this._allSettingsGroups}initialize(){this._allSettingsGroups=this.parse(),this._content=this.toContent(this._allSettingsGroups,0),this._contentWithoutMostCommonlyUsed=this.toContent(this._allSettingsGroups,1)}parse(){const R=this.getRegisteredGroups();return this.initAllSettingsMap(R),[this.getMostCommonlyUsedSettings(R),...R]}getRegisteredGroups(){const R=a.Registry.as(S.Extensions.Configuration).getConfigurations().slice(),M=this.removeEmptySettingsGroups(R.sort(this.compareConfigurationNodes).reduce((N,P,x,F)=>this.parseConfig(P,N,F),[]));return this.sortGroups(M)}sortGroups(R){return R.forEach(M=>{M.sections.forEach(N=>{N.settings.sort((P,x)=>P.key.localeCompare(x.key))})}),R}initAllSettingsMap(R){this._settingsByName=new Map;for(const M of R)for(const N of M.sections)for(const P of N.settings)this._settingsByName.set(P.key,P)}getMostCommonlyUsedSettings(R){const M=(0,t.coalesce)(this._mostCommonlyUsedSettingsKeys.map(N=>{const P=this._settingsByName.get(N);return P?{description:P.description,key:P.key,value:P.value,keyRange:e.nullRange,range:e.nullRange,valueRange:e.nullRange,overrides:[],scope:4,type:P.type,enum:P.enum,enumDescriptions:P.enumDescriptions,descriptionRanges:[]}:null}));return{id:"mostCommonlyUsed",range:e.nullRange,title:v.localize(0,null),titleRange:e.nullRange,sections:[{settings:M}]}}parseConfig(R,M,N,P,x){x=x||{};let F=R.title;if(!F){const V=N.find(W=>W.id===R.id&&W.title);V&&(F=V.title)}if(F&&(P?P.sections[P.sections.length-1].title=F:(P=M.find(V=>V.title===F&&V.extensionInfo?.id===R.extensionInfo?.id),P||(P={sections:[{settings:[]}],id:R.id||"",title:F||"",titleRange:e.nullRange,order:R.order,range:e.nullRange,extensionInfo:R.extensionInfo},M.push(P)))),R.properties){P||(P={sections:[{settings:[]}],id:R.id||"",title:R.id||"",titleRange:e.nullRange,order:R.order,range:e.nullRange,extensionInfo:R.extensionInfo},M.push(P));const V=[];for(const W of[...P.sections[P.sections.length-1].settings,...this.parseSettings(R)])x[W.key]||(V.push(W),x[W.key]=!0);V.length&&(P.sections[P.sections.length-1].settings=V)}return R.allOf?.forEach(V=>this.parseConfig(V,M,N,P,x)),M}removeEmptySettingsGroups(R){const M=[];for(const N of R)N.sections=N.sections.filter(P=>P.settings.length>0),N.sections.length&&M.push(N);return M}parseSettings(R){const M=[],N=R.properties,P=R.extensionInfo,x=R.extensionInfo?.id===R.id?R.title:R.id,F=R.order;for(const V in N){const W=N[V];if(this.matchesScope(W)){const z=W.default;let B=W.markdownDescription||W.description||"";typeof B!="string"&&(B="");const K=B.split(` `),H=S.OVERRIDE_PROPERTY_REGEX.test(V)?this.parseOverrideSettings(W.default):[];let U;W.type==="array"&&W.items&&!Array.isArray(W.items)&&W.items.type&&(W.items.enum?U="enum":Array.isArray(W.items.type)||(U=W.items.type));const G=W.type==="object"?W.properties:void 0,$=W.type==="object"?W.patternProperties:void 0,ie=W.type==="object"?W.additionalProperties:void 0;let J=W.enum,j=W.markdownEnumDescriptions??W.enumDescriptions,ee=!!W.markdownEnumDescriptions;U==="enum"&&!Array.isArray(W.items)&&(J=W.items.enum,j=W.items.markdownEnumDescriptions??W.items.enumDescriptions,ee=!!W.items.markdownEnumDescriptions);let X=!1;W.type==="object"&&!W.additionalProperties&&W.properties&&Object.keys(W.properties).length&&(X=Object.keys(W.properties).every(se=>W.properties[se].type==="boolean"));let te=!1;S.OVERRIDE_PROPERTY_REGEX.test(V)&&(te=!0);let Z;if(!te){const se=W;se&&se.defaultValueSource&&(Z=se.defaultValueSource)}M.push({key:V,value:z,description:K,descriptionIsMarkdown:!!W.markdownDescription,range:e.nullRange,keyRange:e.nullRange,valueRange:e.nullRange,descriptionRanges:[],overrides:H,scope:W.scope,type:W.type,arrayItemType:U,objectProperties:G,objectPatternProperties:$,objectAdditionalProperties:ie,enum:J,enumDescriptions:j,enumDescriptionsAreMarkdown:ee,uniqueItems:W.uniqueItems,tags:W.tags,disallowSyncIgnore:W.disallowSyncIgnore,restricted:W.restricted,extensionInfo:P,deprecationMessage:W.markdownDeprecationMessage||W.deprecationMessage,deprecationMessageIsMarkdown:!!W.markdownDeprecationMessage,validator:(0,o.createValidator)(W),enumItemLabels:W.enumItemLabels,allKeysAreBoolean:X,editPresentation:W.editPresentation,order:W.order,nonLanguageSpecificDefaultValueSource:Z,isLanguageTagSetting:te,categoryLabel:x,categoryOrder:F})}}return M}parseOverrideSettings(R){return Object.keys(R).map(M=>({key:M,value:R[M],description:[],descriptionIsMarkdown:!1,range:e.nullRange,keyRange:e.nullRange,valueRange:e.nullRange,descriptionRanges:[],overrides:[]}))}matchesScope(R){return R.scope?this.target===6?s.FOLDER_SCOPES.indexOf(R.scope)!==-1:this.target===5?s.WORKSPACE_SCOPES.indexOf(R.scope)!==-1:!0:!0}compareConfigurationNodes(R,M){if(typeof R.order!="number")return 1;if(typeof M.order!="number")return-1;if(R.order===M.order){const N=R.title||"",P=M.title||"";return N.localeCompare(P)}return R.order-M.order}toContent(R,M){const N=new E;for(let P=M;P<R.length;P++)N.pushGroup(R[P],P===M,P===R.length-1);return N.getContent()}}e.DefaultSettings=g;class w extends d{constructor(R,M,N){super(),this._uri=R,this.defaultSettings=N,this._onDidChangeGroups=this._register(new y.Emitter),this.onDidChangeGroups=this._onDidChangeGroups.event,this._register(N.onDidChange(()=>this._onDidChangeGroups.fire())),this._model=M.object.textEditorModel,this._register(this.onWillDispose(()=>M.dispose()))}get uri(){return this._uri}get target(){return this.defaultSettings.target}get settingsGroups(){return this.defaultSettings.getSettingsGroups()}get filterGroups(){return this.settingsGroups.slice(1)}update(){if(this._model.isDisposed())return;const R=[...this._currentResultGroups.values()].sort((V,W)=>V.order-W.order),M=R.filter(V=>V.result.filterMatches.length),N=(0,t.tail)(this.settingsGroups).range.endLineNumber+2,{settingsGroups:P,matches:x}=this.writeResultGroups(M,N),F=this.collectMetadata(R);return R.length?{allGroups:this.settingsGroups,filteredGroups:P,matches:x,metadata:F}:void 0}writeResultGroups(R,M){const N=M-1,P=new E(N),x=[],F=[];R.length&&(P.pushLine(","),R.forEach(H=>{const U=this.getGroup(H);x.push(U),F.push(...this.writeSettingsGroupToBuilder(P,U,H.result.filterMatches))}));const V=P.getContent()+` `,W=this._model.getLineCount(),z=new f.Selection(M,1,M,1),B={text:V,forceMoveMarkers:!0,range:new T.Range(M,1,W,1)};this._model.pushEditOperations([z],[B],()=>[z]);const K=Math.min(M+60,this._model.getLineCount());return this._model.tokenization.forceTokenization(K),{matches:F,settingsGroups:x}}writeSettingsGroupToBuilder(R,M,N){return N=N.map(x=>({matchType:i.SettingMatchType.None,setting:x.setting,score:x.score,matches:x.matches&&x.matches.map(F=>new T.Range(F.startLineNumber-x.setting.range.startLineNumber,F.startColumn,F.endLineNumber-x.setting.range.startLineNumber,F.endColumn))})),R.pushGroup(M),(0,t.flatten)(N.map(x=>x.matches||[]).map((x,F)=>{const V=M.sections[0].settings[F];return x.map(W=>new T.Range(W.startLineNumber+V.range.startLineNumber,W.startColumn,W.endLineNumber+V.range.startLineNumber,W.endColumn))}))}copySetting(R){return{description:R.description,scope:R.scope,type:R.type,enum:R.enum,enumDescriptions:R.enumDescriptions,key:R.key,value:R.value,range:R.range,overrides:[],overrideOf:R.overrideOf,tags:R.tags,deprecationMessage:R.deprecationMessage,keyRange:e.nullRange,valueRange:e.nullRange,descriptionIsMarkdown:void 0,descriptionRanges:[]}}findValueMatches(R,M){return[]}getPreference(R){for(const M of this.settingsGroups)for(const N of M.sections)for(const P of N.settings)if(P.key===R)return P}getGroup(R){return{id:R.id,range:e.nullRange,title:R.label,titleRange:e.nullRange,sections:[{settings:R.result.filterMatches.map(M=>this.copySetting(M.setting))}]}}}e.DefaultSettingsEditorModel=w;class E{get lineCountWithOffset(){return this._contentByLines.length+this._rangeOffset}get lastLine(){return this._contentByLines[this._contentByLines.length-1]||""}constructor(R=0){this._rangeOffset=R,this._contentByLines=[]}pushLine(...R){this._contentByLines.push(...R)}pushGroup(R,M,N){this._contentByLines.push(M?"[{":"{");const P=this._pushGroup(R," ");if(P){const x=P.range.endLineNumber-this._rangeOffset,F=this._contentByLines[x-2];this._contentByLines[x-2]=F.substring(0,F.length-1)}this._contentByLines.push(N?"}]":"},")}_pushGroup(R,M){let N=null;const P=this.lineCountWithOffset+1;for(const x of R.sections){if(x.title){const F=this.lineCountWithOffset+1;this.addDescription([x.title],M,this._contentByLines),x.titleRange={startLineNumber:F,startColumn:1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length}}if(x.settings.length)for(const F of x.settings)this.pushSetting(F,M),N=F}return R.range={startLineNumber:P,startColumn:1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length},N}getContent(){return this._contentByLines.join(` `)}pushSetting(R,M){const N=this.lineCountWithOffset+1;this.pushSettingDescription(R,M);let P=M;const x=JSON.stringify(R.key);P+=x,R.keyRange={startLineNumber:this.lineCountWithOffset+1,startColumn:P.indexOf(R.key)+1,endLineNumber:this.lineCountWithOffset+1,endColumn:R.key.length},P+=": ";const F=this.lineCountWithOffset+1;this.pushValue(R,P,M),R.valueRange={startLineNumber:F,startColumn:P.length+1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length+1},this._contentByLines[this._contentByLines.length-1]+=",",this._contentByLines.push(""),R.range={startLineNumber:N,startColumn:1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length}}pushSettingDescription(R,M){const N=F=>F.replace(/`#(.*)#`/g,(V,W)=>`\`${W}\``);R.descriptionRanges=[];const P=M+"// ",x=R.deprecationMessage?.split(/\n/g)??[];for(let F of[...x,...R.description])F=N(F),this._contentByLines.push(P+F),R.descriptionRanges.push({startLineNumber:this.lineCountWithOffset,startColumn:this.lastLine.indexOf(F)+1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length});R.enumDescriptions&&R.enumDescriptions.some(F=>!!F)&&R.enumDescriptions.forEach((F,V)=>{const W=_(String(R.enum[V])),z=F?`${W}: ${N(F)}`:W,B=z.split(/\n/g);B[0]=" - "+B[0],this._contentByLines.push(...B.map(K=>`${M}// ${K}`)),R.descriptionRanges.push({startLineNumber:this.lineCountWithOffset,startColumn:this.lastLine.indexOf(z)+1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length})})}pushValue(R,M,N){const P=JSON.stringify(R.value,null,N);if(P&&typeof R.value=="object")if(R.overrides&&R.overrides.length){this._contentByLines.push(M+" {");for(const V of R.overrides)this.pushSetting(V,N+N),this._contentByLines.pop();const x=R.overrides[R.overrides.length-1],F=this._contentByLines[x.range.endLineNumber-2];this._contentByLines[x.range.endLineNumber-2]=F.substring(0,F.length-1),this._contentByLines.push(N+"}")}else{const x=P.split(` `);this._contentByLines.push(M+x[0]);for(let F=1;F<x.length;F++)this._contentByLines.push(N+x[F])}else this._contentByLines.push(M+P)}addDescription(R,M,N){for(const P of R)N.push(M+"// "+P)}}class C extends E{constructor(R=" "){super(0),this.indent=R}pushGroup(R){this._pushGroup(R,this.indent)}}class I extends D.Disposable{constructor(R){super(),this.defaultSettings=R,this._content=null,this._register(R.onDidChange(()=>this._content=null))}get content(){if(this._content===null){const R=new C;R.pushLine("{");for(const M of this.defaultSettings.getRegisteredGroups())R.pushGroup(M);R.pushLine("}"),this._content=R.getContent()}return this._content}}e.DefaultRawSettingsEditorModel=I;function _(L){return L&&L.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}function A(L){return"// "+v.localize(1,null)+` `+L.getDefaultKeybindingsContent()}e.defaultKeybindingsContents=A;let k=class{constructor(R,M){this._uri=R,this.keybindingService=M}get uri(){return this._uri}get content(){return this._content||(this._content=A(this.keybindingService)),this._content}getPreference(){return null}dispose(){}};e.DefaultKeybindingsEditorModel=k,e.DefaultKeybindingsEditorModel=k=fe([O(1,h.IKeybindingService)],k)}),define(Q[973],Y([1,0,6,4,72]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractProgressScope=e.ScopedProgressIndicator=e.EditorProgressIndicator=void 0;class D extends y.Disposable{constructor(S,h){super(),this.progressBar=S,this.group=h,this.registerListeners()}registerListeners(){this._register(this.group.onDidModelChange(S=>{(S.kind===6||S.kind===4&&this.group.isEmpty)&&this.progressBar.stop().hide()}))}show(S,h){return this.group.isEmpty?b.emptyProgressRunner:S===!0?this.doShow(!0,h):this.doShow(S,h)}doShow(S,h){return typeof S=="boolean"?this.progressBar.infinite().show(h):this.progressBar.total(S).show(h),{total:a=>{this.progressBar.total(a)},worked:a=>{this.progressBar.hasTotal()?this.progressBar.worked(a):this.progressBar.infinite().show()},done:()=>{this.progressBar.stop().hide()}}}async showWhile(S,h){if(this.group.isEmpty)try{await S}catch{}return this.doShowWhile(S,h)}async doShowWhile(S,h){try{this.progressBar.infinite().show(h),await S}catch{}finally{this.progressBar.stop().hide()}}}e.EditorProgressIndicator=D;var T;(function(m){let S;(function(r){r[r.None=0]="None",r[r.Done=1]="Done",r[r.Infinite=2]="Infinite",r[r.While=3]="While",r[r.Work=4]="Work"})(S=m.Type||(m.Type={})),m.None={type:0},m.Done={type:1},m.Infinite={type:2};class h{constructor(i,s,o){this.whilePromise=i,this.whileStart=s,this.whileDelay=o,this.type=3}}m.While=h;class a{constructor(i,s){this.total=i,this.worked=s,this.type=4}}m.Work=a})(T||(T={}));class f extends y.Disposable{constructor(S,h){super(),this.progressBar=S,this.scope=h,this.progressState=T.None,this.registerListeners()}registerListeners(){this._register(this.scope.onDidChangeActive(()=>{this.scope.isActive?this.onDidScopeActivate():this.onDidScopeDeactivate()}))}onDidScopeActivate(){if(this.progressState.type!==T.Done.type)if(this.progressState.type===3){let S;if(this.progressState.whileDelay>0){const h=this.progressState.whileDelay-(Date.now()-this.progressState.whileStart);h>0&&(S=h)}this.doShowWhile(S)}else this.progressState.type===2?this.progressBar.infinite().show():this.progressState.type===4&&(this.progressState.total&&this.progressBar.total(this.progressState.total).show(),this.progressState.worked&&this.progressBar.worked(this.progressState.worked).show())}onDidScopeDeactivate(){this.progressBar.stop().hide()}show(S,h){return typeof S=="boolean"?this.progressState=T.Infinite:this.progressState=new T.Work(S,void 0),this.scope.isActive&&(this.progressState.type===2?this.progressBar.infinite().show(h):this.progressState.type===4&&typeof this.progressState.total=="number"&&this.progressBar.total(this.progressState.total).show(h)),{total:a=>{this.progressState=new T.Work(a,this.progressState.type===4?this.progressState.worked:void 0),this.scope.isActive&&this.progressBar.total(a)},worked:a=>{!this.scope.isActive||this.progressBar.hasTotal()?(this.progressState=new T.Work(this.progressState.type===4?this.progressState.total:void 0,this.progressState.type===4&&typeof this.progressState.worked=="number"?this.progressState.worked+a:a),this.scope.isActive&&this.progressBar.worked(a)):(this.progressState=T.Infinite,this.progressBar.infinite().show())},done:()=>{this.progressState=T.Done,this.scope.isActive&&this.progressBar.stop().hide()}}}async showWhile(S,h){this.progressState.type===3&&(S=Promise.all([S,this.progressState.whilePromise])),this.progressState=new T.While(S,h||0,Date.now());try{this.doShowWhile(h),await S}catch{}finally{(this.progressState.type!==3||this.progressState.whilePromise===S)&&(this.progressState=T.None,this.scope.isActive&&this.progressBar.stop().hide())}}doShowWhile(S){this.scope.isActive&&this.progressBar.infinite().show(S)}}e.ScopedProgressIndicator=f;class v extends y.Disposable{get isActive(){return this._isActive}constructor(S,h){super(),this.scopeId=S,this._isActive=h,this._onDidChangeActive=this._register(new t.Emitter),this.onDidChangeActive=this._onDidChangeActive.event}onScopeOpened(S){S===this.scopeId&&(this._isActive||(this._isActive=!0,this._onDidChangeActive.fire()))}onScopeClosed(S){S===this.scopeId&&this._isActive&&(this._isActive=!1,this._onDidChangeActive.fire())}}e.AbstractProgressScope=v}),define(Q[1390],Y([1,0,2537,320,4,6,15,85,342,521,134,72,7,17,88,973,221,54,1771]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositePart=void 0;class d extends m.Part{constructor(c,l,n,g,w,E,C,I,_,A,k,L,R,M,N){super(M,N,C,l,g),this.notificationService=c,this.storageService=l,this.contextMenuService=n,this.keybindingService=w,this.instantiationService=E,this.registry=I,this.activeCompositeSettingsKey=_,this.defaultCompositeId=A,this.nameForTelemetry=k,this.compositeCSSClass=L,this.titleForegroundColor=R,this.onDidCompositeOpen=this._register(new D.Emitter),this.onDidCompositeClose=this._register(new D.Emitter),this.mapCompositeToCompositeContainer=new Map,this.mapActionsBindingToComposite=new Map,this.instantiatedCompositeItems=new Map,this.actionsListener=this._register(new b.MutableDisposable),this.lastActiveCompositeId=l.get(_,1,this.defaultCompositeId)}openComposite(c,l){if(this.activeComposite?.getId()===c)return l&&this.activeComposite.focus(),this.activeComposite;if(this.element)return this.doOpenComposite(c,l)}doOpenComposite(c,l=!1){const n=y.defaultGenerator.nextId();this.currentCompositeOpenToken=n,this.activeComposite&&this.hideActiveComposite(),this.updateTitle(c);const g=this.createComposite(c,!0);if(!(this.currentCompositeOpenToken!==n||this.activeComposite&&this.activeComposite.getId()!==g.getId()))return this.activeComposite?.getId()===g.getId()?(l&&g.focus(),this.onDidCompositeOpen.fire({composite:g,focus:l}),g):(this.showComposite(g),l&&g.focus(),g&&this.onDidCompositeOpen.fire({composite:g,focus:l}),g)}createComposite(c,l){const n=this.instantiatedCompositeItems.get(c);if(n)return n.composite;const g=this.registry.getComposite(c);if(g){const w=this,E=new s.ScopedProgressIndicator((0,r.assertIsDefined)(this.progressBar),new class extends s.AbstractProgressScope{constructor(){super(g.id,!!l),this._register(w.onDidCompositeOpen.event(A=>this.onScopeOpened(A.composite.getId()))),this._register(w.onDidCompositeClose.event(A=>this.onScopeClosed(A.getId())))}}),C=this.instantiationService.createChild(new S.ServiceCollection([h.IEditorProgressService,E])),I=g.instantiate(C),_=new b.DisposableStore;return this.instantiatedCompositeItems.set(c,{composite:I,disposable:_,progress:E}),_.add(I.onTitleAreaUpdate(()=>this.onTitleAreaUpdate(I.getId()),this)),I}throw new Error(`Unable to find composite with id ${c}`)}showComposite(c){this.activeComposite=c;const l=this.activeComposite.getId();l!==this.defaultCompositeId?this.storageService.store(this.activeCompositeSettingsKey,l,1,1):this.storageService.remove(this.activeCompositeSettingsKey,1),this.lastActiveCompositeId=this.activeComposite.getId();let n=this.mapCompositeToCompositeContainer.get(c.getId());if(n||(n=(0,a.$)(".composite"),n.classList.add(...this.compositeCSSClass.split(" ")),n.id=c.getId(),c.create(n),c.updateStyles(),this.mapCompositeToCompositeContainer.set(c.getId(),n)),!this.activeComposite||c.getId()!==this.activeComposite.getId())return;this.getContentArea()?.appendChild(n),(0,a.show)(n);const w=(0,r.assertIsDefined)(this.toolBar);w.actionRunner=c.getActionRunner();const E=this.registry.getComposite(c.getId());E&&E.name!==c.getTitle()&&this.updateTitle(c.getId(),c.getTitle());let C=this.mapActionsBindingToComposite.get(c.getId());C||(C=this.collectCompositeActions(c),this.mapActionsBindingToComposite.set(c.getId(),C)),C(),this.actionsListener.value=w.actionRunner.onDidRun(I=>{I.error&&!(0,T.isCancellationError)(I.error)&&this.notificationService.error(I.error)}),c.setVisible(!0),!(!this.activeComposite||c.getId()!==this.activeComposite.getId())&&(this.contentAreaSize&&c.layout(this.contentAreaSize),this.boundarySashes&&c.setBoundarySashes(this.boundarySashes))}onTitleAreaUpdate(c){const l=this.instantiatedCompositeItems.get(c);if(l&&this.updateTitle(c,l.composite.getTitle()),this.activeComposite?.getId()===c){const n=this.collectCompositeActions(this.activeComposite);this.mapActionsBindingToComposite.set(this.activeComposite.getId(),n),n()}else this.mapActionsBindingToComposite.delete(c)}updateTitle(c,l){const n=this.registry.getComposite(c);if(!n||!this.titleLabel)return;l||(l=n.name);const g=this.keybindingService.lookupKeybinding(c);this.titleLabel.updateTitle(c,l,g?.getLabel()??void 0),(0,r.assertIsDefined)(this.toolBar).setAriaLabel((0,t.localize)(0,null,l))}collectCompositeActions(c){const l=c?.getMenuIds(),n=c?.getActions().slice(0)||[],g=c?.getSecondaryActions().slice(0)||[],w=(0,r.assertIsDefined)(this.toolBar);return w.context=this.actionsContextProvider(),()=>w.setActions((0,f.prepareActions)(n),(0,f.prepareActions)(g),l)}getActiveComposite(){return this.activeComposite}getLastActiveCompositeId(){return this.lastActiveCompositeId}hideActiveComposite(){if(!this.activeComposite)return;const c=this.activeComposite;this.activeComposite=void 0;const l=this.mapCompositeToCompositeContainer.get(c.getId());return c.setVisible(!1),l&&(l.remove(),(0,a.hide)(l)),this.progressBar?.stop().hide(),this.toolBar&&this.collectCompositeActions()(),this.onDidCompositeClose.fire(c),c}createTitleArea(c){const l=(0,a.append)(c,(0,a.$)(".composite"));l.classList.add("title"),this.titleLabel=this.createTitleLabel(l);const n=(0,a.append)(l,(0,a.$)(".title-actions"));return this.toolBar=this._register(this.instantiationService.createInstance(o.WorkbenchToolBar,n,{actionViewItemProvider:g=>this.actionViewItemProvider(g),orientation:0,getKeyBinding:g=>this.keybindingService.lookupKeybinding(g.id),anchorAlignmentProvider:()=>this.getTitleAreaDropDownAnchorAlignment(),toggleMenuTitle:(0,t.localize)(1,null),telemetrySource:this.nameForTelemetry})),this.collectCompositeActions()(),l}createTitleLabel(c){const l=(0,a.append)(c,(0,a.$)(".title-label")),n=(0,a.append)(l,(0,a.$)("h2"));this.titleLabelElement=n;const g=this;return{updateTitle:(w,E,C)=>{(!this.activeComposite||this.activeComposite.getId()===w)&&(n.innerText=E,n.title=C?(0,t.localize)(2,null,E,C):E)},updateStyles:()=>{n.style.color=g.titleForegroundColor&&g.getColor(g.titleForegroundColor)||""}}}updateStyles(){super.updateStyles(),(0,r.assertIsDefined)(this.titleLabel).updateStyles()}actionViewItemProvider(c){return this.activeComposite?this.activeComposite.getActionViewItem(c):(0,i.createActionViewItem)(this.instantiationService,c)}actionsContextProvider(){return this.activeComposite?this.activeComposite.getActionsContext():null}createContentArea(c){const l=(0,a.append)(c,(0,a.$)(".content"));return this.progressBar=this._register(new v.ProgressBar(l,u.defaultProgressBarStyles)),this.progressBar.hide(),l}getProgressIndicator(c){const l=this.instantiatedCompositeItems.get(c);return l?l.progress:void 0}getTitleAreaDropDownAnchorAlignment(){return 1}layout(c,l,n,g){super.layout(c,l,n,g),this.contentAreaSize=a.Dimension.lift(super.layoutContents(c,l).contentSize),this.activeComposite?.layout(this.contentAreaSize)}setBoundarySashes(c){this.boundarySashes=c,this.activeComposite?.setBoundarySashes(c)}removeComposite(c){if(this.activeComposite?.getId()===c)return!1;this.mapCompositeToCompositeContainer.delete(c),this.mapActionsBindingToComposite.delete(c);const l=this.instantiatedCompositeItems.get(c);return l&&(l.composite.dispose(),(0,b.dispose)(l.disposable),this.instantiatedCompositeItems.delete(c)),!0}dispose(){this.mapCompositeToCompositeContainer.clear(),this.mapActionsBindingToComposite.clear(),this.instantiatedCompositeItems.forEach(c=>{c.composite.dispose(),(0,b.dispose)(c.disposable)}),this.instantiatedCompositeItems.clear(),super.dispose()}}e.CompositePart=d}),define(Q[135],Y([1,0,2582,6,36,84,7,4,34,85,16,38,29,30,19,37,1119,9,46,8,17,5,13,88,436,41,207,276,342,973,162,10,77,32,904,221,905,157,134,54,1063]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P,x,F,V,W){"use strict";var z;Object.defineProperty(e,"__esModule",{value:!0}),e.ViewAction=e.FilterViewPane=e.ViewPane=e.VIEWPANE_FILTER_ACTION=e.ViewPaneShowActions=void 0;var B;(function(j){j[j.Default=0]="Default",j[j.WhenExpanded=1]="WhenExpanded",j[j.Always=2]="Always"})(B||(e.ViewPaneShowActions=B={})),e.VIEWPANE_FILTER_ACTION=new v.Action("viewpane.action.filter");const K=(0,R.registerIcon)("view-pane-container-expanded",M.Codicon.chevronDown,t.localize(0,null)),H=(0,R.registerIcon)("view-pane-container-collapsed",M.Codicon.chevronRight,t.localize(1,null)),U=S.Registry.as(d.Extensions.ViewsRegistry);let G=class{get contents(){const ee=this.items.filter(X=>X.visible);return ee.length===0&&this.defaultItem?[this.defaultItem.descriptor]:ee.map(X=>X.descriptor)}constructor(ee,X){this.id=ee,this.contextKeyService=X,this._onDidChange=new y.Emitter,this.onDidChange=this._onDidChange.event,this.items=[],this.disposables=new f.DisposableStore,X.onDidChangeContext(this.onDidChangeContext,this,this.disposables),y.Event.filter(U.onDidChangeViewWelcomeContent,te=>te===this.id)(this.onDidChangeViewWelcomeContent,this,this.disposables),this.onDidChangeViewWelcomeContent()}onDidChangeViewWelcomeContent(){const ee=U.getViewWelcomeContent(this.id);this.items=[];for(const X of ee)if(X.when==="default")this.defaultItem={descriptor:X,visible:!0};else{const te=X.when?this.contextKeyService.contextMatchesRules(X.when):!0;this.items.push({descriptor:X,visible:te})}this._onDidChange.fire()}onDidChangeContext(){let ee=!1;for(const X of this.items){if(!X.descriptor.when||X.descriptor.when==="default")continue;const te=this.contextKeyService.contextMatchesRules(X.descriptor.when);X.visible!==te&&(X.visible=te,ee=!0)}ee&&this._onDidChange.fire()}dispose(){this.disposables.dispose()}};G=fe([O(1,p.IContextKeyService)],G);let $=class extends o.Pane{static{z=this}static{this.AlwaysShowActionsConfig="workbench.view.alwaysShowHeaderActions"}get title(){return this._title}get titleDescription(){return this._titleDescription}constructor(ee,X,te,Z,se,re,oe,le,ne,ce){super({...ee,orientation:re.getViewLocationById(ee.id)===1?1:0}),this.keybindingService=X,this.contextMenuService=te,this.configurationService=Z,this.contextKeyService=se,this.viewDescriptorService=re,this.instantiationService=oe,this.openerService=le,this.themeService=ne,this.telemetryService=ce,this._onDidFocus=this._register(new y.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new y.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidChangeBodyVisibility=this._register(new y.Emitter),this.onDidChangeBodyVisibility=this._onDidChangeBodyVisibility.event,this._onDidChangeTitleArea=this._register(new y.Emitter),this.onDidChangeTitleArea=this._onDidChangeTitleArea.event,this._onDidChangeViewWelcomeState=this._register(new y.Emitter),this.onDidChangeViewWelcomeState=this._onDidChangeViewWelcomeState.event,this._isVisible=!1,this.viewWelcomeDisposable=f.Disposable.None,this.id=ee.id,this._title=ee.title,this._titleDescription=ee.titleDescription,this.showActions=ee.showActions??B.Default,this.scopedContextKeyService=this._register(se.createScoped(this.element)),this.scopedContextKeyService.createKey("view",this.id);const ae=this.scopedContextKeyService.createKey("viewLocation",(0,d.ViewContainerLocationToString)(re.getViewLocationById(this.id)));this._register(y.Event.filter(re.onDidChangeLocation,ue=>ue.views.some(de=>de.id===this.id))(()=>ae.set((0,d.ViewContainerLocationToString)(re.getViewLocationById(this.id))))),this.menuActions=this._register(this.instantiationService.createChild(new V.ServiceCollection([p.IContextKeyService,this.scopedContextKeyService])).createInstance(N.CompositeMenuActions,ee.titleMenuId??n.MenuId.ViewTitle,n.MenuId.ViewTitleContext,{shouldForwardArgs:!ee.donotForwardArgs})),this._register(this.menuActions.onDidChange(()=>this.updateActions())),this.viewWelcomeController=new G(this.id,se)}get headerVisible(){return super.headerVisible}set headerVisible(ee){super.headerVisible=ee,this.element.classList.toggle("merged-header",!ee)}setVisible(ee){this._isVisible!==ee&&(this._isVisible=ee,this.isExpanded()&&this._onDidChangeBodyVisibility.fire(ee))}isVisible(){return this._isVisible}isBodyVisible(){return this._isVisible&&this.isExpanded()}setExpanded(ee){const X=super.setExpanded(ee);return X&&this._onDidChangeBodyVisibility.fire(ee),this.twistiesContainer&&(this.twistiesContainer.classList.remove(...s.ThemeIcon.asClassNameArray(this.getTwistyIcon(!ee))),this.twistiesContainer.classList.add(...s.ThemeIcon.asClassNameArray(this.getTwistyIcon(ee)))),X}render(){super.render();const ee=(0,T.trackFocus)(this.element);this._register(ee),this._register(ee.onDidFocus(()=>this._onDidFocus.fire())),this._register(ee.onDidBlur(()=>this._onDidBlur.fire()))}renderHeader(ee){this.headerContainer=ee,this.twistiesContainer=(0,T.append)(ee,(0,T.$)(s.ThemeIcon.asCSSSelector(this.getTwistyIcon(this.isExpanded())))),this.renderHeaderTitle(ee,this.title);const X=(0,T.append)(ee,(0,T.$)(".actions"));X.classList.toggle("show-always",this.showActions===B.Always),X.classList.toggle("show-expanded",this.showActions===B.WhenExpanded),this.toolbar=this.instantiationService.createInstance(P.WorkbenchToolBar,X,{orientation:0,actionViewItemProvider:se=>this.getActionViewItem(se),ariaLabel:t.localize(2,null,this.title),getKeyBinding:se=>this.keybindingService.lookupKeybinding(se.id),renderDropdownAsChildElement:!0,actionRunner:this.getActionRunner(),resetMenu:this.menuActions.menuId}),this._register(this.toolbar),this.setActions(),this._register((0,T.addDisposableListener)(X,T.EventType.CLICK,se=>se.preventDefault()));const te=this.viewDescriptorService.getViewContainerByViewId(this.id);te?this._register(this.viewDescriptorService.getViewContainerModel(te).onDidChangeContainerInfo(({title:se})=>this.updateTitle(this.title))):console.error(`View container model not found for view ${this.id}`);const Z=y.Event.filter(this.configurationService.onDidChangeConfiguration,se=>se.affectsConfiguration(z.AlwaysShowActionsConfig));this._register(Z(this.updateActionsVisibility,this)),this.updateActionsVisibility()}getTwistyIcon(ee){return ee?K:H}style(ee){super.style(ee);const X=this.getIcon();if(this.iconContainer){const te=(0,T.asCssValueWithDefault)(ee.headerForeground,(0,b.asCssVariable)(b.foreground));L.URI.isUri(X)?(this.iconContainer.style.backgroundColor=te,this.iconContainer.style.color=""):(this.iconContainer.style.color=te,this.iconContainer.style.backgroundColor="")}}getIcon(){return this.viewDescriptorService.getViewDescriptorById(this.id)?.containerIcon||d.defaultViewIcon}renderHeaderTitle(ee,X){this.iconContainer=(0,T.append)(ee,(0,T.$)(".icon",void 0));const te=this.getIcon();let Z;if(L.URI.isUri(te)){Z=`view-${this.id.replace(/[\.\:]/g,"-")}`;const re=`.pane-header .icon.${Z}`;(0,T.createCSSRule)(re,` mask: ${(0,T.asCSSUrl)(te)} no-repeat 50% 50%; mask-size: 24px; -webkit-mask: ${(0,T.asCSSUrl)(te)} no-repeat 50% 50%; -webkit-mask-size: 16px; `)}else s.ThemeIcon.isThemeIcon(te)&&(Z=s.ThemeIcon.asClassName(te));Z&&this.iconContainer.classList.add(...Z.split(" "));const se=this.calculateTitle(X);this.titleContainer=(0,T.append)(ee,(0,T.$)("h3.title",{title:se},se)),this._titleDescription&&this.setTitleDescription(this._titleDescription),this.iconContainer.title=se,this.iconContainer.setAttribute("aria-label",se)}updateTitle(ee){const X=this.calculateTitle(ee);this.titleContainer&&(this.titleContainer.textContent=X,this.titleContainer.setAttribute("title",X)),this.iconContainer&&(this.iconContainer.title=X,this.iconContainer.setAttribute("aria-label",X)),this._title=ee,this._onDidChangeTitleArea.fire()}setTitleDescription(ee){this.titleDescriptionContainer?(this.titleDescriptionContainer.textContent=ee??"",this.titleDescriptionContainer.setAttribute("title",ee??"")):ee&&this.titleContainer&&(this.titleDescriptionContainer=(0,T.after)(this.titleContainer,(0,T.$)("span.description",{title:ee},ee)))}updateTitleDescription(ee){this.setTitleDescription(ee),this._titleDescription=ee,this._onDidChangeTitleArea.fire()}calculateTitle(ee){const X=this.viewDescriptorService.getViewContainerByViewId(this.id),te=this.viewDescriptorService.getViewContainerModel(X),Z=this.viewDescriptorService.getViewDescriptorById(this.id);return!(this.viewDescriptorService.getDefaultContainerById(this.id)===X)&&Z?.containerTitle&&te.title!==Z.containerTitle?`${Z.containerTitle}: ${ee}`:ee}renderBody(ee){this.bodyContainer=ee;const X=(0,T.append)(ee,(0,T.$)(".welcome-view"));this.viewWelcomeContainer=(0,T.$)(".welcome-view-content",{tabIndex:0}),this.scrollableElement=this._register(new k.DomScrollableElement(this.viewWelcomeContainer,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3})),(0,T.append)(X,this.scrollableElement.getDomNode());const te=y.Event.any(this.viewWelcomeController.onDidChange,this.onDidChangeViewWelcomeState);this._register(te(this.updateViewWelcome,this)),this.updateViewWelcome()}layoutBody(ee,X){this.viewWelcomeContainer.style.height=`${ee}px`,this.viewWelcomeContainer.style.width=`${X}px`,this.viewWelcomeContainer.classList.toggle("wide",X>640),this.scrollableElement.scanDomNode()}onDidScrollRoot(){}getProgressIndicator(){if(this.progressBar===void 0&&(this.progressBar=this._register(new _.ProgressBar(this.element,W.defaultProgressBarStyles)),this.progressBar.hide()),this.progressIndicator===void 0){const ee=this;this.progressIndicator=new A.ScopedProgressIndicator((0,c.assertIsDefined)(this.progressBar),new class extends A.AbstractProgressScope{constructor(){super(ee.id,ee.isBodyVisible()),this._register(ee.onDidChangeBodyVisibility(X=>X?this.onScopeOpened(ee.id):this.onScopeClosed(ee.id)))}})}return this.progressIndicator}getProgressLocation(){return this.viewDescriptorService.getViewContainerByViewId(this.id).id}getBackgroundColor(){switch(this.viewDescriptorService.getViewLocationById(this.id)){case 1:return D.PANEL_BACKGROUND;case 0:case 2:return D.SIDE_BAR_BACKGROUND}return D.SIDE_BAR_BACKGROUND}focus(){this.shouldShowWelcome()?this.viewWelcomeContainer.focus():this.element&&(this.element.focus(),this._onDidFocus.fire())}setActions(){if(this.toolbar){const ee=[...this.menuActions.getPrimaryActions()];this.shouldShowFilterInHeader()&&ee.unshift(e.VIEWPANE_FILTER_ACTION),this.toolbar.setActions((0,m.prepareActions)(ee),(0,m.prepareActions)(this.menuActions.getSecondaryActions())),this.toolbar.context=this.getActionsContext()}}updateActionsVisibility(){if(!this.headerContainer)return;const ee=this.configurationService.getValue("workbench.view.alwaysShowHeaderActions");this.headerContainer.classList.toggle("actions-always-visible",ee)}updateActions(){this.setActions(),this._onDidChangeTitleArea.fire()}getActionViewItem(ee,X){if(ee.id===e.VIEWPANE_FILTER_ACTION.id){const te=this;return new class extends F.BaseActionViewItem{constructor(){super(null,ee)}setFocusable(){}get trapsArrowNavigation(){return!0}render(Z){Z.classList.add("viewpane-filter-container"),(0,T.append)(Z,te.getFilterWidget().element)}}}return(0,g.createActionViewItem)(this.instantiationService,ee,{...X,menuAsChild:ee instanceof n.SubmenuItemAction})}getActionsContext(){}getActionRunner(){}getOptimalWidth(){return 0}saveState(){}updateViewWelcome(){if(this.viewWelcomeDisposable.dispose(),!this.shouldShowWelcome()){this.bodyContainer.classList.remove("welcome"),this.viewWelcomeContainer.innerText="",this.scrollableElement.scanDomNode();return}const ee=this.viewWelcomeController.contents;if(ee.length===0){this.bodyContainer.classList.remove("welcome"),this.viewWelcomeContainer.innerText="",this.scrollableElement.scanDomNode();return}const X=new f.DisposableStore;this.bodyContainer.classList.add("welcome"),this.viewWelcomeContainer.innerText="";for(const{content:te,precondition:Z}of ee){const se=te.split(` `);for(let re of se){if(re=re.trim(),!re)continue;const oe=(0,w.parseLinkedText)(re);if(oe.nodes.length===1&&typeof oe.nodes[0]!="string"){const le=oe.nodes[0],ne=(0,T.append)(this.viewWelcomeContainer,(0,T.$)(".button-container")),ce=new C.Button(ne,{title:le.title,supportIcons:!0,...W.defaultButtonStyles});if(ce.label=le.label,ce.onDidClick(ae=>{this.telemetryService.publicLog2("views.welcomeAction",{viewId:this.id,uri:le.href}),this.openerService.open(le.href,{allowCommands:!0})},null,X),X.add(ce),Z){const ae=()=>ce.enabled=this.contextKeyService.contextMatchesRules(Z);ae();const ue=new Set;Z.keys().forEach(ge=>ue.add(ge)),y.Event.filter(this.contextKeyService.onDidChangeContext,ge=>ge.affectsSome(ue))(ae,null,X)}}else{const le=(0,T.append)(this.viewWelcomeContainer,(0,T.$)("p"));for(const ne of oe.nodes)if(typeof ne=="string")(0,T.append)(le,document.createTextNode(ne));else{const ce=X.add(this.instantiationService.createInstance(I.Link,le,ne,{}));if(Z&&ne.href.startsWith("command:")){const ae=()=>ce.enabled=this.contextKeyService.contextMatchesRules(Z);ae();const ue=new Set;Z.keys().forEach(ge=>ue.add(ge)),y.Event.filter(this.contextKeyService.onDidChangeContext,ge=>ge.affectsSome(ue))(ae,null,X)}}}}}this.scrollableElement.scanDomNode(),this.viewWelcomeDisposable=X}shouldShowWelcome(){return!1}getFilterWidget(){}shouldShowFilterInHeader(){return!1}};e.ViewPane=$,e.ViewPane=$=z=fe([O(1,h.IKeybindingService),O(2,a.IContextMenuService),O(3,u.IConfigurationService),O(4,p.IContextKeyService),O(5,d.IViewDescriptorService),O(6,l.IInstantiationService),O(7,E.IOpenerService),O(8,i.IThemeService),O(9,r.ITelemetryService)],$);let ie=class extends ${constructor(ee,X,te,Z,se,re,oe,le,ne,ce){super(ee,X,te,Z,se,re,oe,le,ne,ce),this.filterWidget=this._register(oe.createChild(new V.ServiceCollection([p.IContextKeyService,this.scopedContextKeyService])).createInstance(x.FilterWidget,ee.filterOptions))}getFilterWidget(){return this.filterWidget}renderBody(ee){super.renderBody(ee),this.filterContainer=(0,T.append)(ee,(0,T.$)(".viewpane-filter-container"))}layoutBody(ee,X){super.layoutBody(ee,X),this.dimension=new T.Dimension(X,ee);const te=!this.filterContainer?.hasChildNodes(),Z=this.shouldShowFilterInHeader();te!==Z&&(Z&&(0,T.reset)(this.filterContainer),this.updateActions(),Z||(0,T.append)(this.filterContainer,this.filterWidget.element)),Z||(ee=ee-44),this.filterWidget.layout(X),this.layoutBodyContent(ee,X)}shouldShowFilterInHeader(){return!(this.dimension&&this.dimension.width<600&&this.dimension.height>100)}};e.FilterViewPane=ie,e.FilterViewPane=ie=fe([O(1,h.IKeybindingService),O(2,a.IContextMenuService),O(3,u.IConfigurationService),O(4,p.IContextKeyService),O(5,d.IViewDescriptorService),O(6,l.IInstantiationService),O(7,E.IOpenerService),O(8,i.IThemeService),O(9,r.ITelemetryService)],ie);class J extends n.Action2{constructor(ee){super(ee),this.desc=ee}run(ee,...X){const te=ee.get(d.IViewsService).getActiveViewWithId(this.desc.viewId);if(te)return this.runInView(ee,te,...X)}}e.ViewAction=J}),define(Q[4004],Y([1,0,1167,7,28,9,8,29,5,38,90,41,16,30,19,135,46,2145,1050]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceViewerView=void 0;let d=class extends s.ViewPane{constructor(C,I,_,A,k,L,R,M,N,P,x){super(C,I,A,M,N,R,L,P,_,x),this.commandService=k}renderBody(C){super.renderBody(C),this.listContainer=(0,y.append)(C,(0,y.$)(".resource-view"));const I=[new p];this.model=new n,this.tree=this.instantiationService.createInstance(S.WorkbenchDataTree,"Resource View",this.listContainer,new c,I,new w,{identityProvider:new l,horizontalScrolling:!1,setRowLineHeight:!1,transformOptimization:!1,accessibilityProvider:new g}),this.tree.setInput(this.model),this._register(a.Registry.as(t.Extensions.ResourceViewerExtension).onDidRegisterResource(()=>this.tree.updateChildren(this.model))),this._register(this.tree.onMouseClick(this.onMouseClick,this))}onMouseClick(C){C.element&&this.commandService.executeCommand("resourceViewer.openResourceViewer",C.element.id)}layoutBody(C,I){super.layoutBody(C,I),this.tree.layout(C,I)}};e.ResourceViewerView=d,e.ResourceViewerView=d=fe([O(1,m.IKeybindingService),O(2,i.IThemeService),O(3,f.IContextMenuService),O(4,b.ICommandService),O(5,v.IInstantiationService),O(6,o.IViewDescriptorService),O(7,D.IConfigurationService),O(8,T.IContextKeyService),O(9,h.IOpenerService),O(10,r.ITelemetryService)],d);class p{constructor(){this.templateId=p.TEMPLATEID}static{this.TEMPLATEID="resourceType"}renderTemplate(C){const I=(0,y.append)(C,(0,y.$)("span.resource-type-row")),_=(0,y.append)(I,(0,y.$)(".resource-type-icon"));return{name:(0,y.append)(I,(0,y.$)(".resource-type-name")),icon:_}}renderElement(C,I,_,A){_.name.innerText=C.element.name,_.icon.style.backgroundImage=(0,y.asCSSUrl)(C.element.icon)}disposeTemplate(C){}}class c{getHeight(){return 40}getTemplateId(C){return p.TEMPLATEID}}class l{getId(C){return C.id}}class n{constructor(){this.registry=a.Registry.as(t.Extensions.ResourceViewerExtension)}getChildren(){return this.registry.allResources.filter(C=>C.id==="azure-resources")}}class g{getAriaLabel(C){return C.name}getWidgetAriaLabel(){return(0,u.localize)(0,null)}}class w{hasChildren(C){return C instanceof n}getChildren(C){return C instanceof n?C.getChildren():[]}}}),define(Q[4005],Y([1,0,15,5,63,445,19,278,305,2155,7,135,46,9,30,8,29,38,41,2296,1542,3188,3909,385,437,188,1650]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskHistoryView=void 0;let C=class extends h.ViewPane{constructor(_,A,k,L,R,M,N,P,x,F,V,W){super(_,P,N,L,M,k,A,x,F,R),this.taskService=V,this.errorMessageService=W}renderBody(_){super.renderBody(_);let A=this.taskService.getAllTasks();this._messages=(0,S.append)(_,(0,S.$)("div.empty-task-message")),A&&A.hasChildren&&(0,S.hide)(this._messages);let k=(0,m.localize)(0,null);(0,S.append)(this._messages,(0,S.$)("span")).innerText=k,this._tree=this._register(this.createTaskHistoryTree(_,this.instantiationService)),this._register(this._tree.onDidChangeSelection(L=>this.onSelected(L))),this._register((0,f.attachListStyler)(this._tree,this.themeService)),this._register(this.taskService.onAddNewTask(L=>{(0,S.hide)(this._messages),this.refreshTree()})),this._register(this.taskService.onTaskComplete(L=>{this.updateTask(L)})),this.refreshTree()}createTaskHistoryTree(_,A){const k=A.createInstance(c.TaskHistoryDataSource),L=A.createInstance(n.TaskHistoryActionProvider),R=A.createInstance(p.TaskHistoryRenderer),M=A.createInstance(l.TaskHistoryController,L),N=new v.DefaultDragAndDrop,P=new v.DefaultFilter,x=new v.DefaultAccessibilityProvider;return _.classList.add("task-history"),new D.Tree(_,{dataSource:k,renderer:R,controller:M,dnd:N,filter:P,accessibilityProvider:x},{indentPixels:10,twistiePixels:20,ariaLabel:(0,m.localize)(1,null)})}updateTask(_){this._tree.refresh(_).catch(A=>t.onUnexpectedError(A))}refreshTree(){let _,A;if(this._tree){this._tree.domFocus();let k=this._tree.getSelection();k&&k.length===1&&(_=k[0]),A=this._tree.getExpandedElements();let R=this.taskService.getAllTasks();R&&this._tree.setInput(R).then(async()=>{A&&await this._tree.expandAll(A),_&&this._tree.select(_),this._tree.getFocus()},t.onUnexpectedError)}}onSelected(_){let A=this._tree.getSelection();if(A&&A.length>0&&A[0]instanceof w.TaskNode){let k=A[0];if(_.payload&&_.payload.origin==="mouse"&&_.payload.originalEvent&&_.payload.originalEvent.detail===2&&k.status===w.TaskStatus.Failed){let M=k.taskName+": "+k.message;this.errorMessageService.showDialog(b.default.Error,(0,m.localize)(2,null),M)}}}layoutBody(_,A){super.layoutBody(_,A),this._tree&&this._tree.layout(_)}};e.TaskHistoryView=C,e.TaskHistoryView=C=fe([O(1,y.IInstantiationService),O(2,a.IViewDescriptorService),O(3,r.IConfigurationService),O(4,i.ITelemetryService),O(5,s.IContextKeyService),O(6,o.IContextMenuService),O(7,u.IKeybindingService),O(8,d.IOpenerService),O(9,T.IThemeService),O(10,g.ITaskService),O(11,E.IErrorMessageService)],C)}),define(Q[4006],Y([1,0,4,2671,8,6,1268,13,135,725,82,905]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentsFilters=void 0;const a=new b.RawContextKey("commentsView.showResolvedFilter",!0),r=new b.RawContextKey("commentsView.showUnResolvedFilter",!0);class i extends t.Disposable{constructor(o,u){super(),this.contextKeyService=u,this._onDidChange=this._register(new D.Emitter),this.onDidChange=this._onDidChange.event,this._showUnresolved=r.bindTo(this.contextKeyService),this._showResolved=a.bindTo(this.contextKeyService),this._showResolved.set(o.showResolved),this._showUnresolved.set(o.showUnresolved)}get showUnresolved(){return!!this._showUnresolved.get()}set showUnresolved(o){this._showUnresolved.get()!==o&&(this._showUnresolved.set(o),this._onDidChange.fire({showUnresolved:!0}))}get showResolved(){return!!this._showResolved.get()}set showResolved(o){this._showResolved.get()!==o&&(this._showResolved.set(o),this._onDidChange.fire({showResolved:!0}))}}e.CommentsFilters=i,(0,f.registerAction2)(class extends v.ViewAction{constructor(){super({id:"commentsFocusViewFromFilter",title:(0,y.localize)(0,null),keybinding:{when:T.CommentsViewFilterFocusContextKey,weight:200,primary:2066},viewId:m.COMMENTS_VIEW_ID})}async runInView(s,o){o.focus()}}),(0,f.registerAction2)(class extends v.ViewAction{constructor(){super({id:"commentsClearFilterText",title:(0,y.localize)(1,null),keybinding:{when:T.CommentsViewFilterFocusContextKey,weight:200,primary:9},viewId:m.COMMENTS_VIEW_ID})}async runInView(s,o){o.clearFilterText()}}),(0,f.registerAction2)(class extends v.ViewAction{constructor(){super({id:"commentsFocusFilter",title:(0,y.localize)(2,null),keybinding:{when:S.FocusedViewContext.isEqualTo(m.COMMENTS_VIEW_ID),weight:200,primary:2084},viewId:m.COMMENTS_VIEW_ID})}async runInView(s,o){o.focusFilter()}}),(0,f.registerAction2)(class extends v.ViewAction{constructor(){super({id:`workbench.actions.${m.COMMENTS_VIEW_ID}.toggleUnResolvedComments`,title:(0,y.localize)(3,null),category:(0,y.localize)(4,null),toggled:{condition:r,title:(0,y.localize)(5,null)},menu:{id:h.viewFilterSubmenu,group:"1_filter",when:b.ContextKeyExpr.equals("view",m.COMMENTS_VIEW_ID),order:1},viewId:m.COMMENTS_VIEW_ID})}async runInView(s,o){o.filters.showUnresolved=!o.filters.showUnresolved}}),(0,f.registerAction2)(class extends v.ViewAction{constructor(){super({id:`workbench.actions.${m.COMMENTS_VIEW_ID}.toggleResolvedComments`,title:(0,y.localize)(6,null),category:(0,y.localize)(7,null),toggled:{condition:a,title:(0,y.localize)(8,null)},menu:{id:h.viewFilterSubmenu,group:"1_filter",when:b.ContextKeyExpr.equals("view",m.COMMENTS_VIEW_ID),order:1},viewId:m.COMMENTS_VIEW_ID})}async runInView(s,o){o.filters.showResolved=!o.filters.showResolved}})}),define(Q[4007],Y([1,0,2849,32,13,135,8,928]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,b.registerAction2)(class extends D.ViewAction{constructor(){super({viewId:f.IOutlinePane.Id,id:"outline.collapse",title:(0,t.localize)(0,null),f1:!1,icon:y.Codicon.collapseAll,menu:{id:b.MenuId.ViewTitle,group:"navigation",when:T.ContextKeyExpr.and(T.ContextKeyExpr.equals("view",f.IOutlinePane.Id),f.ctxAllCollapsed.isEqualTo(!1))}})}runInView(m,S){S.collapseAll()}}),(0,b.registerAction2)(class extends D.ViewAction{constructor(){super({viewId:f.IOutlinePane.Id,id:"outline.expand",title:(0,t.localize)(1,null),f1:!1,icon:y.Codicon.expandAll,menu:{id:b.MenuId.ViewTitle,group:"navigation",when:T.ContextKeyExpr.and(T.ContextKeyExpr.equals("view",f.IOutlinePane.Id),f.ctxAllCollapsed.isEqualTo(!0))}})}runInView(m,S){S.expandAll()}}),(0,b.registerAction2)(class extends D.ViewAction{constructor(){super({viewId:f.IOutlinePane.Id,id:"outline.followCursor",title:(0,t.localize)(2,null),f1:!1,toggled:f.ctxFollowsCursor,menu:{id:b.MenuId.ViewTitle,group:"config",order:1,when:T.ContextKeyExpr.equals("view",f.IOutlinePane.Id)}})}runInView(m,S){S.outlineViewState.followCursor=!S.outlineViewState.followCursor}}),(0,b.registerAction2)(class extends D.ViewAction{constructor(){super({viewId:f.IOutlinePane.Id,id:"outline.filterOnType",title:(0,t.localize)(3,null),f1:!1,toggled:f.ctxFilterOnType,menu:{id:b.MenuId.ViewTitle,group:"config",order:2,when:T.ContextKeyExpr.equals("view",f.IOutlinePane.Id)}})}runInView(m,S){S.outlineViewState.filterOnType=!S.outlineViewState.filterOnType}}),(0,b.registerAction2)(class extends D.ViewAction{constructor(){super({viewId:f.IOutlinePane.Id,id:"outline.sortByPosition",title:(0,t.localize)(4,null),f1:!1,toggled:f.ctxSortMode.isEqualTo(0),menu:{id:b.MenuId.ViewTitle,group:"sort",order:1,when:T.ContextKeyExpr.equals("view",f.IOutlinePane.Id)}})}runInView(m,S){S.outlineViewState.sortBy=0}}),(0,b.registerAction2)(class extends D.ViewAction{constructor(){super({viewId:f.IOutlinePane.Id,id:"outline.sortByName",title:(0,t.localize)(5,null),f1:!1,toggled:f.ctxSortMode.isEqualTo(1),menu:{id:b.MenuId.ViewTitle,group:"sort",order:2,when:T.ContextKeyExpr.equals("view",f.IOutlinePane.Id)}})}runInView(m,S){S.outlineViewState.sortBy=1}}),(0,b.registerAction2)(class extends D.ViewAction{constructor(){super({viewId:f.IOutlinePane.Id,id:"outline.sortByKind",title:(0,t.localize)(6,null),f1:!1,toggled:f.ctxSortMode.isEqualTo(2),menu:{id:b.MenuId.ViewTitle,group:"sort",order:3,when:T.ContextKeyExpr.equals("view",f.IOutlinePane.Id)}})}runInView(m,S){S.outlineViewState.sortBy=2}})}),define(Q[4008],Y([1,0,7,342,14,4,69,2850,9,8,29,5,38,90,24,19,135,21,26,46,41,30,3599,543,47,31,6,404,928,54,1824]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlinePane=void 0;class k{constructor(M,N){this._comparator=M,this.order=N}compare(M,N){return this.order===2?this._comparator.compareByType(M,N):this.order===1?this._comparator.compareByName(M,N):this._comparator.compareByPosition(M,N)}}let L=class extends o.ViewPane{static{this.Id="outline"}constructor(M,N,P,x,F,V,W,z,B,K,H,U,G){super(M,z,K,W,B,x,P,H,U,G),this._outlineService=N,this._instantiationService=P,this._storageService=F,this._editorService=V,this._disposables=new D.DisposableStore,this._editorControlDisposables=new D.DisposableStore,this._editorPaneDisposables=new D.DisposableStore,this._outlineViewState=new n.OutlineViewState,this._editorListener=new D.MutableDisposable,this._treeStates=new T.LRUCache(10),this._outlineViewState.restore(this._storageService),this._disposables.add(this._outlineViewState),B.bufferChangeEvents(()=>{this._ctxFollowsCursor=_.ctxFollowsCursor.bindTo(B),this._ctxFilterOnType=_.ctxFilterOnType.bindTo(B),this._ctxSortMode=_.ctxSortMode.bindTo(B),this._ctxAllCollapsed=_.ctxAllCollapsed.bindTo(B)});const $=()=>{this._ctxFollowsCursor.set(this._outlineViewState.followCursor),this._ctxFilterOnType.set(this._outlineViewState.filterOnType),this._ctxSortMode.set(this._outlineViewState.sortBy)};$(),this._disposables.add(this._outlineViewState.onDidChange($))}dispose(){this._disposables.dispose(),this._editorPaneDisposables.dispose(),this._editorControlDisposables.dispose(),this._editorListener.dispose(),super.dispose()}focus(){this._tree?.domFocus()}renderBody(M){super.renderBody(M),this._domNode=M,M.classList.add("outline-pane");const N=t.$(".outline-progress");this._message=t.$(".outline-message"),this._progressBar=new y.ProgressBar(N,A.defaultProgressBarStyles),this._treeContainer=t.$(".outline-tree"),t.append(M,N,this._message,this._treeContainer),this._disposables.add(this.onDidChangeBodyVisibility(P=>{if(!P)this._editorListener.clear(),this._editorPaneDisposables.clear(),this._editorControlDisposables.clear();else if(!this._editorListener.value){const x=C.Event.any(this._editorService.onDidActiveEditorChange,this._outlineService.onDidChange);this._editorListener.value=x(()=>this._handleEditorChanged(this._editorService.activeEditorPane)),this._handleEditorChanged(this._editorService.activeEditorPane)}}))}layoutBody(M,N){super.layoutBody(M,N),this._tree?.layout(M,N),this._treeDimensions=new t.Dimension(N,M)}collapseAll(){this._tree?.collapseAll()}expandAll(){this._tree?.expandAll()}get outlineViewState(){return this._outlineViewState}_showMessage(M){this._domNode.classList.add("message"),this._progressBar.stop().hide(),this._message.innerText=M}_captureViewState(M){if(this._tree){const N=this._tree.getInput();if(M||(M=N?.uri),N&&M)return this._treeStates.set(`${N.outlineKind}/${M}`,this._tree.getViewState()),!0}return!1}_handleEditorChanged(M){this._editorPaneDisposables.clear(),M&&this._editorPaneDisposables.add(M.onDidChangeControl(()=>{this._handleEditorControlChanged(M)})),this._handleEditorControlChanged(M)}async _handleEditorControlChanged(M){const N=w.EditorResourceAccessor.getOriginalUri(M?.input),P=this._captureViewState();if(this._editorControlDisposables.clear(),!M||!this._outlineService.canCreateOutline(M)||!N)return this._showMessage((0,f.localize)(0,null));let x;P||(x=new b.TimeoutTimer(()=>{this._showMessage((0,f.localize)(1,null,(0,d.basename)(N)))},100)),this._progressBar.infinite().show(500);const F=new E.CancellationTokenSource;this._editorControlDisposables.add((0,D.toDisposable)(()=>F.dispose(!0)));const V=await this._outlineService.createOutline(M,1,F.token);if(x?.dispose(),!V)return;if(F.token.isCancellationRequested){V?.dispose();return}this._editorControlDisposables.add(V),this._progressBar.stop().hide();const W=new k(V.config.comparator,this._outlineViewState.sortBy),z=this._instantiationService.createInstance(r.WorkbenchDataTree,"OutlinePane",this._treeContainer,V.config.delegate,V.config.renderers,V.config.treeDataSource,{...V.config.options,sorter:W,expandOnDoubleClick:!1,expandOnlyOnTwistieClick:!0,multipleSelectionSupport:!1,hideTwistiesOfChildlessElements:!0,defaultFindMode:this._outlineViewState.filterOnType?I.TreeFindMode.Filter:I.TreeFindMode.Highlight,overrideStyles:{listBackground:this.getBackgroundColor()}}),B=()=>{if(V.isEmpty)this._showMessage((0,f.localize)(2,null,(0,d.basename)(N))),this._captureViewState(N),z.setInput(void 0);else if(z.getInput())this._domNode.classList.remove("message"),z.updateChildren();else{this._domNode.classList.remove("message");const G=this._treeStates.get(`${V.outlineKind}/${V.uri}`);z.setInput(V,G&&I.AbstractTreeViewState.lift(G))}};B(),this._editorControlDisposables.add(V.onDidChange(B)),z.findMode=this._outlineViewState.filterOnType?I.TreeFindMode.Filter:I.TreeFindMode.Highlight,this._editorControlDisposables.add(this.viewDescriptorService.onDidChangeLocation(({views:G})=>{G.some($=>$.id===this.id)&&z.updateOptions({overrideStyles:{listBackground:this.getBackgroundColor()}})})),this._editorControlDisposables.add(z.onDidChangeFindMode(G=>this._outlineViewState.filterOnType=G===I.TreeFindMode.Filter)),this._editorControlDisposables.add(z.onDidOpen(G=>V.reveal(G.element,G.editorOptions,G.sideBySide)));const K=()=>{if(!this._outlineViewState.followCursor||!V.activeElement)return;let G=V.activeElement;for(;G;){if(z.getRelativeTop(G)===null&&z.reveal(G,.5),z.getRelativeTop(G)!==null){z.setFocus([G]),z.setSelection([G]);break}G=z.getParentElement(G)}};K(),this._editorControlDisposables.add(V.onDidChange(K)),this._editorControlDisposables.add(this._outlineViewState.onDidChange(G=>{this._outlineViewState.persist(this._storageService),G.filterOnType&&(z.findMode=this._outlineViewState.filterOnType?I.TreeFindMode.Filter:I.TreeFindMode.Highlight),G.followCursor&&K(),G.sortBy&&(W.order=this._outlineViewState.sortBy,z.resort())}));let H;this._editorControlDisposables.add(z.onDidChangeFindPattern(G=>{z.findMode!==I.TreeFindMode.Highlight&&(!H&&G?(H=z.getViewState(),z.expandAll()):!G&&H&&(z.setInput(z.getInput(),H),H=void 0))}));const U=()=>{this._ctxAllCollapsed.set(z.getNode(null).children.every(G=>!G.collapsible||G.collapsed))};this._editorControlDisposables.add(z.onDidChangeCollapseState(U)),this._editorControlDisposables.add(z.onDidChangeModel(U)),U(),z.layout(this._treeDimensions?.height,this._treeDimensions?.width),this._tree=z,this._editorControlDisposables.add((0,D.toDisposable)(()=>{z.dispose(),this._tree=void 0}))}};e.OutlinePane=L,e.OutlinePane=L=fe([O(1,g.IOutlineService),O(2,h.IInstantiationService),O(3,p.IViewDescriptorService),O(4,i.IStorageService),O(5,u.IEditorService),O(6,v.IConfigurationService),O(7,a.IKeybindingService),O(8,m.IContextKeyService),O(9,S.IContextMenuService),O(10,c.IOpenerService),O(11,s.IThemeService),O(12,l.ITelemetryService)],L)}),define(Q[4009],Y([1,0,2890,135,7,293,5,29,8,38,19,90,9,46,84,41,30,1299,930,83,561]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMRepositoriesViewPane=void 0;class c{getHeight(){return 22}getTemplateId(){return u.RepositoryRenderer.TEMPLATE_ID}}let l=class extends y.ViewPane{constructor(g,w,E,C,I,_,A,k,L,R,M){super(g,E,C,k,A,_,I,L,R,M),this.scmViewService=w}renderBody(g){super.renderBody(g);const w=(0,b.append)(g,(0,b.$)(".scm-view.scm-repositories-view")),E=new c,C=this.instantiationService.createInstance(u.RepositoryRenderer,(0,d.getActionViewItemProvider)(this.instantiationService)),I={getId:_=>_.provider.id};this.list=this.instantiationService.createInstance(h.WorkbenchList,"SCM Main",w,E,[C],{identityProvider:I,horizontalScrolling:!1,overrideStyles:{listBackground:i.SIDE_BAR_BACKGROUND},accessibilityProvider:{getAriaLabel(_){return _.provider.label},getWidgetAriaLabel(){return(0,t.localize)(0,null)}}}),this._register(this.list),this._register(this.list.onDidChangeSelection(this.onListSelectionChange,this)),this._register(this.list.onContextMenu(this.onListContextMenu,this)),this._register(this.scmViewService.onDidChangeRepositories(this.onDidChangeRepositories,this)),this._register(this.scmViewService.onDidChangeVisibleRepositories(this.updateListSelection,this)),this.orientation===0&&this._register(this.configurationService.onDidChangeConfiguration(_=>{_.affectsConfiguration("scm.repositories.visible")&&this.updateBodySize()})),this.onDidChangeRepositories(),this.updateListSelection()}onDidChangeRepositories(){this.list.splice(0,this.list.length,this.scmViewService.repositories),this.updateBodySize()}focus(){this.list.domFocus()}layoutBody(g,w){super.layoutBody(g,w),this.list.layout(g,w)}updateBodySize(){if(this.orientation===1)return;const g=this.configurationService.getValue("scm.repositories.visible"),w=this.list.length===0,E=Math.min(this.list.length,g)*22;this.minimumBodySize=g===0?22:E,this.maximumBodySize=g===0||w?Number.POSITIVE_INFINITY:E}onListContextMenu(g){if(!g.element)return;const w=g.element.provider,C=this.scmViewService.menus.getRepositoryMenus(w).repositoryMenu,I=(0,d.collectContextMenuActions)(C);this.contextMenuService.showContextMenu({getAnchor:()=>g.anchor,getActions:()=>I,getActionsContext:()=>w})}onListSelectionChange(g){if(g.browserEvent&&g.elements.length>0){const w=this.list.scrollTop;this.scmViewService.visibleRepositories=g.elements,this.list.scrollTop=w}}updateListSelection(){const g=this.list.getSelection(),w=new Set(p.Iterable.map(g,A=>this.list.element(A))),E=new Set(this.scmViewService.visibleRepositories),C=new Set(p.Iterable.filter(E,A=>!w.has(A))),I=new Set(p.Iterable.filter(w,A=>!E.has(A)));if(C.size===0&&I.size===0)return;const _=g.filter(A=>!I.has(this.list.element(A)));for(let A=0;A<this.list.length;A++)C.has(this.list.element(A))&&_.push(A);this.list.setSelection(_),_.length>0&&_.indexOf(this.list.getFocus()[0])===-1&&(this.list.setAnchor(_[0]),this.list.setFocus([_[0]]))}};e.SCMRepositoriesViewPane=l,e.SCMRepositoriesViewPane=l=fe([O(1,D.ISCMViewService),O(2,m.IKeybindingService),O(3,f.IContextMenuService),O(4,T.IInstantiationService),O(5,r.IViewDescriptorService),O(6,v.IContextKeyService),O(7,a.IConfigurationService),O(8,s.IOpenerService),O(9,S.IThemeService),O(10,o.ITelemetryService)],l)}),define(Q[1391],Y([1,0,20,32,105,17,123,51,27,73,513,2993,81,13,28,9,8,23,72,43,64,135,82,46,118,617,469,470,738,235,359,334,358,381,939,618,471,21,104]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P,x,F,V){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.allTestActions=e.CancelTestRefreshAction=e.RefreshTestsAction=e.ToggleInlineTestOutput=e.OpenOutputPeek=e.SearchForTestExtension=e.DebugLastRun=e.ReRunLastRun=e.DebugFailedTests=e.ReRunFailedTests=e.discoverAndRunTests=e.DebugCurrentFile=e.RunCurrentFile=e.DebugAtCursor=e.RunAtCursor=e.GoToTest=e.ClearTestResultsAction=e.CollapseAllAction=e.ShowMostRecentOutputAction=e.TestingSortByDurationAction=e.TestingSortByLocationAction=e.TestingSortByStatusAction=e.TestingViewAsTreeAction=e.TestingViewAsListAction=e.CancelTestRunAction=e.DebugAllAction=e.RunAllAction=e.DebugSelectedAction=e.RunSelectedAction=e.GetExplorerSelection=e.GetSelectedProfiles=e.ConfigureTestProfilesAction=e.ContinuousRunUsingProfileTestAction=e.ContinuousRunTestAction=e.SelectDefaultTestProfiles=e.RunAction=e.RunUsingProfileAction=e.DebugAction=e.UnhideAllTestsAction=e.UnhideTestAction=e.HideTestAction=void 0;const W=a.Categories.Test;var z;(function(Ge){Ge[Ge.Refresh=10]="Refresh",Ge[Ge.Run=11]="Run",Ge[Ge.Debug=12]="Debug",Ge[Ge.Coverage=13]="Coverage",Ge[Ge.RunContinuous=14]="RunContinuous",Ge[Ge.RunUsing=15]="RunUsing",Ge[Ge.Collapse=16]="Collapse",Ge[Ge.ClearResults=17]="ClearResults",Ge[Ge.DisplayMode=18]="DisplayMode",Ge[Ge.Sort=19]="Sort",Ge[Ge.GoToTest=20]="GoToTest",Ge[Ge.HideTest=21]="HideTest",Ge[Ge.ContinuousRunTest=2147483647]="ContinuousRunTest"})(z||(z={}));const B=o.ContextKeyGreaterExpr.create(M.TestingContextKeys.providerCount.key,0);class K extends r.Action2{constructor(){super({id:"testing.hideTest",title:(0,h.localize)(0,null),menu:{id:r.MenuId.TestItem,group:"builtin@2",when:M.TestingContextKeys.testItemIsHidden.isEqualTo(!1)}})}run(Ze,...tt){const Xe=Ze.get(R.ITestService);for(const nt of tt)Xe.excluded.toggle(nt.test,!0);return Promise.resolve()}}e.HideTestAction=K;class H extends r.Action2{constructor(){super({id:"testing.unhideTest",title:(0,h.localize)(1,null),menu:{id:r.MenuId.TestItem,order:21,when:M.TestingContextKeys.testItemIsHidden.isEqualTo(!0)}})}run(Ze,...tt){const Xe=Ze.get(R.ITestService);for(const nt of tt)nt instanceof E.TestItemTreeElement&&Xe.excluded.toggle(nt.test,!1);return Promise.resolve()}}e.UnhideTestAction=H;class U extends r.Action2{constructor(){super({id:"testing.unhideAllTests",title:(0,h.localize)(2,null)})}run(Ze){return Ze.get(R.ITestService).excluded.clear(),Promise.resolve()}}e.UnhideAllTestsAction=U;const G=(Ge,Ze)=>[{id:r.MenuId.TestItem,group:"inline",order:Ge,when:Ze},{id:r.MenuId.TestItem,group:"builtin@1",order:Ge,when:Ze}];class $ extends r.Action2{constructor(){super({id:"testing.debug",title:(0,h.localize)(3,null),icon:C.testingDebugIcon,menu:G(12,M.TestingContextKeys.hasDebuggableTests.isEqualTo(!0))})}run(Ze,...tt){return Ze.get(R.ITestService).runTests({tests:tt.map(Xe=>Xe.test),group:4})}}e.DebugAction=$;class ie extends r.Action2{constructor(){super({id:"testing.runUsing",title:(0,h.localize)(4,null),icon:C.testingDebugIcon,menu:{id:r.MenuId.TestItem,order:15,group:"builtin@2",when:M.TestingContextKeys.hasNonDefaultProfile.isEqualTo(!0)}})}async run(Ze,...tt){const Xe=Ze.get(i.ICommandService),nt=Ze.get(R.ITestService),ft=await Xe.executeCommand("vscode.pickTestProfile",{onlyForTest:tt[0].test});ft&&nt.runResolvedTests({targets:[{profileGroup:ft.group,profileId:ft.profileId,controllerId:ft.controllerId,testIds:tt.filter(Et=>(0,k.canUseProfileWithTest)(ft,Et.test)).map(Et=>Et.test.item.extId)}]})}}e.RunUsingProfileAction=ie;class J extends r.Action2{constructor(){super({id:"testing.run",title:(0,h.localize)(5,null),icon:C.testingRunIcon,menu:G(11,M.TestingContextKeys.hasRunnableTests.isEqualTo(!0))})}run(Ze,...tt){return Ze.get(R.ITestService).runTests({tests:tt.map(Xe=>Xe.test),group:2})}}e.RunAction=J;class j extends r.Action2{constructor(){super({id:"testing.selectDefaultTestProfiles",title:(0,h.localize)(6,null),icon:C.testingUpdateProfiles,category:W})}async run(Ze,tt){const Xe=Ze.get(i.ICommandService),nt=Ze.get(k.ITestProfileService),ft=await Xe.executeCommand("vscode.pickMultipleTestProfiles",{showConfigureButtons:!1,selected:nt.getGroupDefaultProfiles(tt),onlyGroup:tt});ft?.length&&nt.setGroupDefaultProfiles(tt,ft)}}e.SelectDefaultTestProfiles=j;class ee extends r.Action2{constructor(){super({id:"testing.toggleContinuousRunForTest",title:(0,h.localize)(7,null),icon:C.testingTurnContinuousRunOn,precondition:o.ContextKeyExpr.or(M.TestingContextKeys.isContinuousModeOn.isEqualTo(!0),M.TestingContextKeys.isParentRunningContinuously.isEqualTo(!1)),toggled:{condition:M.TestingContextKeys.isContinuousModeOn.isEqualTo(!0),icon:C.testingContinuousIsOn,title:(0,h.localize)(8,null)},menu:G(2147483647,M.TestingContextKeys.supportsContinuousRun.isEqualTo(!0))})}async run(Ze,...tt){const Xe=Ze.get(N.ITestingContinuousRunService),nt=Ze.get(k.ITestProfileService);for(const ft of tt){const Et=ft.test.item.extId;if(Xe.isSpecificallyEnabledFor(Et)){Xe.stop(Et);continue}const It=nt.getGroupDefaultProfiles(2).filter(Nt=>Nt.supportsContinuousRun&&Nt.controllerId===ft.test.controllerId);It.length&&Xe.start(It,Et)}}}e.ContinuousRunTestAction=ee;class X extends r.Action2{constructor(){super({id:"testing.continuousRunUsingForTest",title:(0,h.localize)(9,null),icon:C.testingDebugIcon,menu:[{id:r.MenuId.TestItem,order:14,group:"builtin@2",when:o.ContextKeyExpr.and(M.TestingContextKeys.supportsContinuousRun.isEqualTo(!0),M.TestingContextKeys.isContinuousModeOn.isEqualTo(!1))}]})}async run(Ze,...tt){const Xe=Ze.get(N.ITestingContinuousRunService),nt=Ze.get(k.ITestProfileService),ft=Ze.get(u.INotificationService),Et=Ze.get(p.IQuickInputService);for(const It of tt){const Nt=await re(Xe,ft,Et,[{profiles:nt.getControllerProfiles(It.test.controllerId)}]);Nt.length&&Xe.start(Nt,It.test.item.extId)}}}e.ContinuousRunUsingProfileTestAction=X;class te extends r.Action2{constructor(){super({id:"testing.configureProfile",title:{value:(0,h.localize)(10,null),original:"Configure Test Profiles"},icon:C.testingUpdateProfiles,f1:!0,category:W,menu:{id:r.MenuId.CommandPalette,when:M.TestingContextKeys.hasConfigurableProfile.isEqualTo(!0)}})}async run(Ze,tt){const Xe=Ze.get(i.ICommandService),nt=Ze.get(k.ITestProfileService),ft=await Xe.executeCommand("vscode.pickTestProfile",{placeholder:(0,h.localize)(11,null),showConfigureButtons:!1,onlyConfigurable:!0,onlyGroup:tt});ft&&nt.configure(ft.controllerId,ft.profileId)}}e.ConfigureTestProfilesAction=te;const Z=Ge=>[{id:r.MenuId.ViewTitle,group:"navigation",order:15,when:o.ContextKeyExpr.and(o.ContextKeyExpr.equals("view","workbench.view.testing"),M.TestingContextKeys.supportsContinuousRun.isEqualTo(!0),M.TestingContextKeys.isContinuousModeOn.isEqualTo(Ge))},{id:r.MenuId.CommandPalette,when:M.TestingContextKeys.supportsContinuousRun.isEqualTo(!0)}];class se extends r.Action2{constructor(){super({id:"testing.stopContinuousRun",title:{value:(0,h.localize)(12,null),original:"Stop Continuous Run"},category:W,icon:C.testingTurnContinuousRunOff,menu:Z(!0)})}run(Ze){Ze.get(N.ITestingContinuousRunService).stop()}}function re(Ge,Ze,tt,Xe){const nt=[];for(const{controller:Ot,profiles:kt}of Xe)for(const xt of kt)xt.supportsContinuousRun&&nt.push({label:xt.label||Ot?.label.value||"",description:Ot?.label.value,profile:xt});if(nt.length===0)return Ze.info((0,h.localize)(13,null)),Promise.resolve([]);if(nt.length===1)return Promise.resolve([nt[0].profile]);const ft=[],Et=[],It=Ge.lastRunProfileIds;nt.sort((Ot,kt)=>Ot.profile.group-kt.profile.group||Ot.profile.controllerId.localeCompare(kt.profile.controllerId)||Ot.label.localeCompare(kt.label));for(let Ot=0;Ot<nt.length;Ot++){const kt=nt[Ot];(Ot===0||nt[Ot-1].profile.group!==kt.profile.group)&&ft.push({type:"separator",label:_.testConfigurationGroupNames[kt.profile.group]}),ft.push(kt),It.has(kt.profile.profileId)&&Et.push(kt)}const Nt=tt.createQuickPick();return Nt.title=(0,h.localize)(14,null),Nt.canSelectMany=!0,Nt.items=ft,Nt.selectedItems=Et,Nt.show(),new Promise((Ot,kt)=>{Nt.onDidAccept(()=>{Ot(Nt.selectedItems.map(xt=>xt.profile)),Nt.dispose()}),Nt.onDidHide(()=>{Ot([]),Nt.dispose()})})}class oe extends r.Action2{constructor(){super({id:"testing.startContinuousRun",title:{value:(0,h.localize)(15,null),original:"Enable Continuous Run"},category:W,icon:C.testingTurnContinuousRunOn,menu:Z(!1)})}async run(Ze,...tt){const Xe=Ze.get(N.ITestingContinuousRunService),nt=await re(Xe,Ze.get(u.INotificationService),Ze.get(p.IQuickInputService),Ze.get(k.ITestProfileService).all());nt.length&&Xe.start(nt)}}class le extends l.ViewAction{constructor(Ze,tt){super({...Ze,menu:[{id:r.MenuId.ViewTitle,order:tt===2?11:tt===4?12:13,group:"navigation",when:o.ContextKeyExpr.and(o.ContextKeyExpr.equals("view","workbench.view.testing"),M.TestingContextKeys.isRunning.isEqualTo(!1),M.TestingContextKeys.capabilityToContextKey[tt].isEqualTo(!0))}],category:W,viewId:"workbench.view.testing"}),this.group=tt}runInView(Ze,tt){const{include:Xe,exclude:nt}=tt.getTreeIncludeExclude();return Ze.get(R.ITestService).runTests({tests:Xe,exclude:nt,group:this.group})}}class ne extends r.Action2{constructor(){super({id:"testing.getSelectedProfiles",title:(0,h.localize)(16,null)})}run(Ze){const tt=Ze.get(k.ITestProfileService);return[...tt.getGroupDefaultProfiles(2),...tt.getGroupDefaultProfiles(4),...tt.getGroupDefaultProfiles(8)].map(Xe=>({controllerId:Xe.controllerId,label:Xe.label,kind:Xe.group&8?3:Xe.group&4?2:1}))}}e.GetSelectedProfiles=ne;class ce extends l.ViewAction{constructor(){super({id:"_testing.getExplorerSelection",title:(0,h.localize)(17,null),viewId:"workbench.view.testing"})}runInView(Ze,tt){const{include:Xe,exclude:nt}=tt.getTreeIncludeExclude(void 0,"selected"),ft=Et=>Et.item.extId;return{include:Xe.map(ft),exclude:nt.map(ft)}}}e.GetExplorerSelection=ce;class ae extends le{constructor(){super({id:"testing.runSelected",title:(0,h.localize)(18,null),icon:C.testingRunAllIcon},2)}}e.RunSelectedAction=ae;class ue extends le{constructor(){super({id:"testing.debugSelected",title:(0,h.localize)(19,null),icon:C.testingDebugAllIcon},4)}}e.DebugSelectedAction=ue;const de=(Ge,Ze)=>Ge.withProgress({location:10,title:(0,h.localize)(20,null)},()=>Ze);class ge extends r.Action2{constructor(Ze,tt,Xe){super({...Ze,category:W,menu:[{id:r.MenuId.CommandPalette,when:M.TestingContextKeys.capabilityToContextKey[tt].isEqualTo(!0)}]}),this.group=tt,this.noTestsFoundError=Xe}async run(Ze){const tt=Ze.get(R.ITestService),Xe=Ze.get(u.INotificationService),nt=[...tt.collection.rootItems];if(!nt.length){Xe.info(this.noTestsFoundError);return}await tt.runTests({tests:nt,group:this.group})}}class he extends ge{constructor(){super({id:"testing.runAll",title:(0,h.localize)(21,null),icon:C.testingRunAllIcon,keybinding:{weight:200,primary:(0,b.KeyChord)(2133,31)}},2,(0,h.localize)(22,null))}}e.RunAllAction=he;class be extends ge{constructor(){super({id:"testing.debugAll",title:(0,h.localize)(23,null),icon:C.testingDebugIcon,keybinding:{weight:200,primary:(0,b.KeyChord)(2133,2079)}},4,(0,h.localize)(24,null))}}e.DebugAllAction=be;class ve extends r.Action2{constructor(){super({id:"testing.cancelRun",title:{value:(0,h.localize)(25,null),original:"Cancel Test Run"},icon:C.testingCancelIcon,keybinding:{weight:200,primary:(0,b.KeyChord)(2133,2102)},menu:{id:r.MenuId.ViewTitle,order:11,group:"navigation",when:o.ContextKeyExpr.and(o.ContextKeyExpr.equals("view","workbench.view.testing"),o.ContextKeyExpr.equals(M.TestingContextKeys.isRunning.serialize(),!0))}})}async run(Ze){const tt=Ze.get(L.ITestResultService),Xe=Ze.get(R.ITestService);for(const nt of tt.results)nt.completedAt||Xe.cancelTestRun(nt.id)}}e.CancelTestRunAction=ve;class Ie extends l.ViewAction{constructor(){super({id:"testing.viewAsList",viewId:"workbench.view.testing",title:{value:(0,h.localize)(26,null),original:"View as List"},toggled:M.TestingContextKeys.viewMode.isEqualTo("list"),menu:{id:r.MenuId.ViewTitle,order:18,group:"viewAs",when:o.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(Ze,tt){tt.viewModel.viewMode="list"}}e.TestingViewAsListAction=Ie;class Se extends l.ViewAction{constructor(){super({id:"testing.viewAsTree",viewId:"workbench.view.testing",title:{value:(0,h.localize)(27,null),original:"View as Tree"},toggled:M.TestingContextKeys.viewMode.isEqualTo("true"),menu:{id:r.MenuId.ViewTitle,order:18,group:"viewAs",when:o.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(Ze,tt){tt.viewModel.viewMode="true"}}e.TestingViewAsTreeAction=Se;class we extends l.ViewAction{constructor(){super({id:"testing.sortByStatus",viewId:"workbench.view.testing",title:{value:(0,h.localize)(28,null),original:"Sort by Status"},toggled:M.TestingContextKeys.viewSorting.isEqualTo("status"),menu:{id:r.MenuId.ViewTitle,order:19,group:"sortBy",when:o.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(Ze,tt){tt.viewModel.viewSorting="status"}}e.TestingSortByStatusAction=we;class ye extends l.ViewAction{constructor(){super({id:"testing.sortByLocation",viewId:"workbench.view.testing",title:{value:(0,h.localize)(29,null),original:"Sort by Location"},toggled:M.TestingContextKeys.viewSorting.isEqualTo("location"),menu:{id:r.MenuId.ViewTitle,order:19,group:"sortBy",when:o.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(Ze,tt){tt.viewModel.viewSorting="location"}}e.TestingSortByLocationAction=ye;class Re extends l.ViewAction{constructor(){super({id:"testing.sortByDuration",viewId:"workbench.view.testing",title:{value:(0,h.localize)(30,null),original:"Sort by Duration"},toggled:M.TestingContextKeys.viewSorting.isEqualTo("duration"),menu:{id:r.MenuId.ViewTitle,order:19,group:"sortBy",when:o.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(Ze,tt){tt.viewModel.viewSorting="duration"}}e.TestingSortByDurationAction=Re;class Le extends r.Action2{constructor(){super({id:"testing.showMostRecentOutput",title:{value:(0,h.localize)(31,null),original:"Show Output"},category:W,icon:y.Codicon.terminal,keybinding:{weight:200,primary:(0,b.KeyChord)(2133,2093)},precondition:M.TestingContextKeys.hasAnyResults.isEqualTo(!0),menu:[{id:r.MenuId.ViewTitle,order:16,group:"navigation",when:o.ContextKeyExpr.equals("view","workbench.view.testing")},{id:r.MenuId.CommandPalette,when:M.TestingContextKeys.hasAnyResults.isEqualTo(!0)}]})}async run(Ze){(await Ze.get(g.IViewsService).openView("workbench.panel.testResults.view",!0))?.showLatestRun()}}e.ShowMostRecentOutputAction=Le;class Pe extends l.ViewAction{constructor(){super({id:"testing.collapseAll",viewId:"workbench.view.testing",title:{value:(0,h.localize)(32,null),original:"Collapse All Tests"},icon:y.Codicon.collapseAll,menu:{id:r.MenuId.ViewTitle,order:16,group:"displayAction",when:o.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(Ze,tt){tt.viewModel.collapseAll()}}e.CollapseAllAction=Pe;class Ae extends r.Action2{constructor(){super({id:"testing.clearTestResults",title:{value:(0,h.localize)(33,null),original:"Clear All Results"},category:W,icon:y.Codicon.trash,menu:[{id:r.MenuId.TestPeekTitle},{id:r.MenuId.CommandPalette,when:M.TestingContextKeys.hasAnyResults.isEqualTo(!0)},{id:r.MenuId.ViewTitle,order:17,group:"displayAction",when:o.ContextKeyExpr.equals("view","workbench.view.testing")},{id:r.MenuId.ViewTitle,order:17,group:"navigation",when:o.ContextKeyExpr.equals("view","workbench.panel.testResults.view")}]})}run(Ze){Ze.get(L.ITestResultService).clear()}}e.ClearTestResultsAction=Ae;class Me extends r.Action2{constructor(){super({id:"testing.editFocusedTest",title:{value:(0,h.localize)(34,null),original:"Go to Test"},icon:y.Codicon.goToFile,menu:G(20,M.TestingContextKeys.testItemHasUri.isEqualTo(!0)),keybinding:{weight:100-10,when:n.FocusedViewContext.isEqualTo("workbench.view.testing"),primary:515}})}async run(Ze,tt,Xe){tt||(tt=Ze.get(g.IViewsService).getActiveViewWithId("workbench.view.testing")?.focusedTreeElements[0]),tt&&tt instanceof E.TestItemTreeElement&&Ze.get(i.ICommandService).executeCommand("vscode.revealTest",tt.test.item.extId,Xe)}}e.GoToTest=Me;class Oe extends r.Action2{constructor(Ze,tt){super({...Ze,menu:[{id:r.MenuId.CommandPalette,when:B},{id:r.MenuId.EditorContext,group:"testing",order:tt===2?11:12,when:o.ContextKeyExpr.and(M.TestingContextKeys.activeEditorHasTests,M.TestingContextKeys.capabilityToContextKey[tt])}]}),this.group=tt}async run(Ze){const tt=Ze.get(F.IEditorService),Xe=tt.activeEditorPane,nt=tt.activeTextEditorControl;if(!Xe||!nt)return;const ft=nt?.getPosition(),Et=nt?.getModel();if(!ft||!Et||!("uri"in Et))return;const It=Ze.get(R.ITestService),Nt=Ze.get(k.ITestProfileService),Ot=Ze.get(c.IUriIdentityService),kt=Ze.get(d.IProgressService),xt=Ze.get(s.IConfigurationService);let Mt=[],Ht,Yt=[],jt;(0,I.getTestingConfiguration)(xt,"testing.saveBeforeTest")&&(await tt.save({editor:Xe.input,groupId:Xe.group.id}),await It.syncTests()),await de(kt,(async()=>{for await(const $e of(0,R.testsInFile)(It,Ot,Et.uri)){if(!$e.item.range||!(Nt.capabilitiesForTest($e)&this.group))continue;const Qe=v.Range.lift($e.item.range);Qe.containsPosition(ft)?Ht&&v.Range.equalsRange($e.item.range,Ht)?Mt.some(Ye=>A.TestId.isChild(Ye.item.extId,$e.item.extId))||Mt.push($e):(Ht=Qe,Mt=[$e]):f.Position.isBefore(Qe.getStartPosition(),ft)&&(!jt||jt.getStartPosition().isBefore(Qe.getStartPosition())?(jt=Qe,Yt=[$e]):Qe.equalsRange(jt)&&!Yt.some(Ye=>A.TestId.isChild(Ye.item.extId,$e.item.extId))&&Yt.push($e))}})()),(Mt.length?Mt:Yt).length?await It.runTests({group:this.group,tests:Mt.length?Mt:Yt}):(0,T.isCodeEditor)(nt)&&S.MessageController.get(nt)?.showMessage((0,h.localize)(35,null),ft)}}class De extends Oe{constructor(){super({id:"testing.runAtCursor",title:{value:(0,h.localize)(36,null),original:"Run Test at Cursor"},category:W,keybinding:{weight:200,when:m.EditorContextKeys.editorTextFocus,primary:(0,b.KeyChord)(2133,33)}},2)}}e.RunAtCursor=De;class Ce extends Oe{constructor(){super({id:"testing.debugAtCursor",title:{value:(0,h.localize)(37,null),original:"Debug Test at Cursor"},category:W,keybinding:{weight:200,when:m.EditorContextKeys.editorTextFocus,primary:(0,b.KeyChord)(2133,2081)}},4)}}e.DebugAtCursor=Ce;class _e extends r.Action2{constructor(Ze,tt){super({...Ze,menu:[{id:r.MenuId.CommandPalette,when:M.TestingContextKeys.capabilityToContextKey[tt].isEqualTo(!0)},{id:r.MenuId.EditorContext,group:"testing",order:(tt===2?11:12)+.1,when:o.ContextKeyExpr.and(M.TestingContextKeys.activeEditorHasTests,M.TestingContextKeys.capabilityToContextKey[tt])}]}),this.group=tt}run(Ze){const tt=Ze.get(F.IEditorService).activeTextEditorControl,Xe=tt?.getPosition(),nt=tt?.getModel();if(!Xe||!nt||!("uri"in nt))return;const ft=Ze.get(R.ITestService),Et=nt.uri.toString(),It=[ft.collection.rootIds],Nt=[];for(;It.length;)for(const Ot of It.pop()){const kt=ft.collection.getNodeById(Ot);kt.item.uri?.toString()===Et?Nt.push(kt):It.push(kt.children)}if(Nt.length)return ft.runTests({tests:Nt,group:this.group});(0,T.isCodeEditor)(tt)&&S.MessageController.get(tt)?.showMessage((0,h.localize)(38,null),Xe)}}class me extends _e{constructor(){super({id:"testing.runCurrentFile",title:{value:(0,h.localize)(39,null),original:"Run Tests in Current File"},category:W,keybinding:{weight:200,when:m.EditorContextKeys.editorTextFocus,primary:(0,b.KeyChord)(2133,36)}},2)}}e.RunCurrentFile=me;class ke extends _e{constructor(){super({id:"testing.debugCurrentFile",title:{value:(0,h.localize)(40,null),original:"Debug Tests in Current File"},category:W,keybinding:{weight:200,when:m.EditorContextKeys.editorTextFocus,primary:(0,b.KeyChord)(2133,2084)}},4)}}e.DebugCurrentFile=ke;const Ee=async(Ge,Ze,tt,Xe)=>{const nt=Promise.all(tt.map(Et=>(0,R.expandAndGetTestById)(Ge,Et))),ft=(await de(Ze,nt)).filter(D.isDefined);return ft.length?await Xe(ft):void 0};e.discoverAndRunTests=Ee;class pe extends r.Action2{async run(Ze,...tt){const Xe=Ze.get(R.ITestService);await(0,e.discoverAndRunTests)(Ze.get(R.ITestService).collection,Ze.get(d.IProgressService),[...this.getTestExtIdsToRun(Ze,...tt)],nt=>this.runTest(Xe,nt))}}class Te extends pe{constructor(Ze){super({...Ze,menu:{id:r.MenuId.CommandPalette,when:B}})}getTestExtIdsToRun(Ze){const{results:tt}=Ze.get(L.ITestResultService),Xe=new Set;for(let nt=tt.length-1;nt>=0;nt--){const ft=tt[nt];for(const Et of ft.tests)(0,x.isFailedState)(Et.ownComputedState)?Xe.add(Et.item.extId):Xe.delete(Et.item.extId)}return Xe}}class Ne extends pe{constructor(Ze){super({...Ze,menu:{id:r.MenuId.CommandPalette,when:o.ContextKeyExpr.and(B,M.TestingContextKeys.hasAnyResults.isEqualTo(!0))}})}*getTestExtIdsToRun(Ze,tt){const Xe=Ze.get(L.ITestResultService),nt=tt?Xe.results.find(ft=>ft.id===tt):Xe.results[0];if(nt)for(const ft of nt.request.targets)for(const Et of ft.testIds)yield Et}}class xe extends Te{constructor(){super({id:"testing.reRunFailTests",title:{value:(0,h.localize)(41,null),original:"Rerun Failed Tests"},category:W,keybinding:{weight:200,primary:(0,b.KeyChord)(2133,35)}})}runTest(Ze,tt){return Ze.runTests({group:2,tests:tt})}}e.ReRunFailedTests=xe;class Ve extends Te{constructor(){super({id:"testing.debugFailTests",title:{value:(0,h.localize)(42,null),original:"Debug Failed Tests"},category:W,keybinding:{weight:200,primary:(0,b.KeyChord)(2133,2083)}})}runTest(Ze,tt){return Ze.runTests({group:4,tests:tt})}}e.DebugFailedTests=Ve;class Fe extends Ne{constructor(){super({id:"testing.reRunLastRun",title:{value:(0,h.localize)(43,null),original:"Rerun Last Run"},category:W,keybinding:{weight:200,primary:(0,b.KeyChord)(2133,42)}})}runTest(Ze,tt){return Ze.runTests({group:2,tests:tt})}}e.ReRunLastRun=Fe;class Be extends Ne{constructor(){super({id:"testing.debugLastRun",title:{value:(0,h.localize)(44,null),original:"Debug Last Run"},category:W,keybinding:{weight:200,primary:(0,b.KeyChord)(2133,2090)}})}runTest(Ze,tt){return Ze.runTests({group:4,tests:tt})}}e.DebugLastRun=Be;class He extends r.Action2{constructor(){super({id:"testing.searchForTestExtension",title:{value:(0,h.localize)(45,null),original:"Search for Test Extension"}})}async run(Ze){const Xe=(await Ze.get(V.IPaneCompositePartService).openPaneComposite(w.VIEWLET_ID,0,!0))?.getViewPaneContainer();Xe.search('@category:"testing"'),Xe.focus()}}e.SearchForTestExtension=He;class et extends r.Action2{constructor(){super({id:"testing.openOutputPeek",title:{value:(0,h.localize)(46,null),original:"Peek Output"},category:W,keybinding:{weight:200,primary:(0,b.KeyChord)(2133,2091)},menu:{id:r.MenuId.CommandPalette,when:M.TestingContextKeys.hasAnyResults.isEqualTo(!0)}})}async run(Ze){Ze.get(P.ITestingPeekOpener).open()}}e.OpenOutputPeek=et;class Je extends r.Action2{constructor(){super({id:"testing.toggleInlineTestOutput",title:{value:(0,h.localize)(47,null),original:"Toggle Inline Test Output"},category:W,keybinding:{weight:200,primary:(0,b.KeyChord)(2133,2087)},menu:{id:r.MenuId.CommandPalette,when:M.TestingContextKeys.hasAnyResults.isEqualTo(!0)}})}async run(Ze){const tt=Ze.get(R.ITestService);tt.showInlineOutput.value=!tt.showInlineOutput.value}}e.ToggleInlineTestOutput=Je;const st=Ge=>[{id:r.MenuId.TestItem,group:"inline",order:10,when:o.ContextKeyExpr.and(M.TestingContextKeys.canRefreshTests.isEqualTo(!0),M.TestingContextKeys.isRefreshingTests.isEqualTo(Ge))},{id:r.MenuId.ViewTitle,group:"navigation",order:10,when:o.ContextKeyExpr.and(o.ContextKeyExpr.equals("view","workbench.view.testing"),M.TestingContextKeys.canRefreshTests.isEqualTo(!0),M.TestingContextKeys.isRefreshingTests.isEqualTo(Ge))},{id:r.MenuId.CommandPalette,when:M.TestingContextKeys.canRefreshTests.isEqualTo(!0)}];class ze extends r.Action2{constructor(){super({id:"testing.refreshTests",title:{value:(0,h.localize)(48,null),original:"Refresh Tests"},category:W,icon:C.testingRefreshTests,keybinding:{weight:200,primary:(0,b.KeyChord)(2133,2096),when:M.TestingContextKeys.canRefreshTests.isEqualTo(!0)},menu:st(!1)})}async run(Ze,...tt){const Xe=Ze.get(R.ITestService),nt=Ze.get(d.IProgressService),ft=(0,t.distinct)(tt.filter(D.isDefined).map(Et=>Et.test.controllerId));return nt.withProgress({location:"workbench.view.extension.test"},async()=>{ft.length?await Promise.all(ft.map(Et=>Xe.refreshTests(Et))):await Xe.refreshTests()})}}e.RefreshTestsAction=ze;class je extends r.Action2{constructor(){super({id:"testing.cancelTestRefresh",title:{value:(0,h.localize)(49,null),original:"Cancel Test Refresh"},category:W,icon:C.testingCancelRefreshTests,menu:st(!0)})}async run(Ze){Ze.get(R.ITestService).cancelRefreshTests()}}e.CancelTestRefreshAction=je,e.allTestActions=[je,ve,Ae,Pe,te,ee,X,$,be,Ce,ke,Ve,Be,ue,Me,ce,ne,K,et,ze,xe,Fe,J,he,De,me,ae,ie,He,j,Le,oe,se,Re,ye,we,Ie,Se,Je,U,H]}),define(Q[4010],Y([1,0,7,31,6,4,13,9,8,29,5,38,41,72,24,30,19,135,191,46,222,943,944,223,44]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w){"use strict";var E;Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewViewPane=void 0;const C={webviewState:"webviewState"};let I=class extends u.ViewPane{static{E=this}static getOriginStore(A){return this._originStore??=new c.ExtensionKeyedWebviewOriginStore("webviewViews.origins",A),this._originStore}constructor(A,k,L,R,M,N,P,x,F,V,W,z,B,K,H,U,G){super({...A,titleMenuId:T.MenuId.ViewTitle,showActions:u.ViewPaneShowActions.WhenExpanded},N,R,k,L,V,M,P,F,x),this.activityService=W,this.extensionService=z,this.progressService=B,this.storageService=K,this.viewService=H,this.webviewService=U,this.webviewViewService=G,this._webview=this._register(new D.MutableDisposable),this._webviewDisposables=this._register(new D.DisposableStore),this._activated=!1,this._onDidChangeVisibility=this._register(new b.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._onDispose=this._register(new b.Emitter),this.onDispose=this._onDispose.event,this.extensionId=A.fromExtensionId,this.defaultTitle=this.title,this.memento=new d.Memento(`webviewView.${this.id}`,K),this.viewState=this.memento.getMemento(1,1),this._register(this.onDidChangeBodyVisibility(()=>this.updateTreeVisibility())),this._register(this.webviewViewService.onNewResolverRegistered($=>{$.viewType===this.id&&this.updateTreeVisibility()})),this.updateTreeVisibility()}dispose(){this._onDispose.fire(),clearTimeout(this._repositionTimeout),super.dispose()}focus(){super.focus(),this._webview.value?.focus()}renderBody(A){super.renderBody(A),this._container=A,this._rootContainer=void 0,this._resizeObserver||(this._resizeObserver=new ResizeObserver(()=>{setTimeout(()=>{this.layoutWebview()},0)}),this._register((0,D.toDisposable)(()=>{this._resizeObserver.disconnect()})),this._resizeObserver.observe(A))}saveState(){this._webview.value&&(this.viewState[C.webviewState]=this._webview.value.state),this.memento.saveMemento(),super.saveState()}layoutBody(A,k){super.layoutBody(A,k),this.layoutWebview(new t.Dimension(k,A))}updateTreeVisibility(){this.isBodyVisible()?(this.activate(),this._webview.value?.claim(this,void 0)):this._webview.value?.release(this)}activate(){if(this._activated)return;this._activated=!0;const A=this.extensionId?E.getOriginStore(this.storageService).getOrigin(this.id,this.extensionId):void 0,k=this.webviewService.createWebviewOverlay({origin:A,providedViewType:this.id,title:this.title,options:{purpose:"webviewView"},contentOptions:{},extension:this.extensionId?{id:this.extensionId}:void 0});k.state=this.viewState[C.webviewState],this._webview.value=k,this._container&&this.layoutWebview(),this._webviewDisposables.add((0,D.toDisposable)(()=>{this._webview.value?.release(this)})),this._webviewDisposables.add(k.onDidUpdateState(()=>{this.viewState[C.webviewState]=k.state}));for(const R of[t.EventType.DRAG,t.EventType.DRAG_END,t.EventType.DRAG_ENTER,t.EventType.DRAG_LEAVE,t.EventType.DRAG_START])this._webviewDisposables.add((0,t.addDisposableListener)(this._webview.value.container,R,M=>{M.preventDefault(),M.stopImmediatePropagation(),this.dropTargetElement.dispatchEvent(new DragEvent(M.type,M))}));this._webviewDisposables.add(new l.WebviewWindowDragMonitor(()=>this._webview.value));const L=this._webviewDisposables.add(new y.CancellationTokenSource);this.withProgress(async()=>{await this.extensionService.activateByEvent(`onView:${this.id}`);const R=this,M={webview:k,onDidChangeVisibility:this.onDidChangeBodyVisibility,onDispose:this.onDispose,get title(){return R.setTitle},set title(N){R.updateTitle(N)},get description(){return R.titleDescription},set description(N){R.updateTitleDescription(N)},get badge(){return R.badge},set badge(N){R.updateBadge(N)},dispose:()=>{this._activated=!1,this._webview.clear(),this._webviewDisposables.clear()},show:N=>{this.viewService.openView(this.id,!N)}};await this.webviewViewService.resolve(this.id,M,L.token)})}updateTitle(A){this.setTitle=A,super.updateTitle(typeof A=="string"?A:this.defaultTitle)}updateBadge(A){if(!(this.badge?.value===A?.value&&this.badge?.tooltip===A?.tooltip)&&(this.activity&&(this.activity.dispose(),this.activity=void 0),this.badge=A,A)){const k={badge:new g.NumberBadge(A.value,()=>A.tooltip),priority:150};this.activityService.showViewActivity(this.id,k)}}async withProgress(A){return this.progressService.withProgress({location:this.id,delay:500},A)}onDidScrollRoot(){this.layoutWebview()}doLayoutWebview(A){const k=this._webview.value;!this._container||!k||((!this._rootContainer||!this._rootContainer.isConnected)&&(this._rootContainer=this.findRootContainer(this._container)),k.layoutWebviewOverElement(this._container,A,this._rootContainer))}layoutWebview(A){this.doLayoutWebview(A),clearTimeout(this._repositionTimeout),this._repositionTimeout=setTimeout(()=>this.doLayoutWebview(A),200)}findRootContainer(A){return(0,t.findParentWithClass)(A,"monaco-scrollable-element")??void 0}};e.WebviewViewPane=I,e.WebviewViewPane=I=E=fe([O(1,f.IConfigurationService),O(2,v.IContextKeyService),O(3,m.IContextMenuService),O(4,S.IInstantiationService),O(5,h.IKeybindingService),O(6,a.IOpenerService),O(7,s.ITelemetryService),O(8,o.IThemeService),O(9,p.IViewDescriptorService),O(10,g.IActivityService),O(11,w.IExtensionService),O(12,r.IProgressService),O(13,i.IStorageService),O(14,p.IViewsService),O(15,c.IWebviewService),O(16,n.IWebviewViewService)],I)}),define(Q[4011],Y([1,0,111,5,19,9,8,38,3390,35,43,461,193]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let r=class extends v.QuickInputService{constructor(o,u,d,p,c,l,n){super(u,p,c,l),this.configurationService=o,this.keybindingService=d,this.hoverService=n,this.hoverDelegate=new i(this.configurationService,this.hoverService),this.inQuickInputContext=h.InQuickPickContextKey.bindTo(this.contextKeyService),this.registerListeners()}registerListeners(){this._register(this.onShow(()=>this.inQuickInputContext.set(!0))),this._register(this.onHide(()=>this.inQuickInputContext.set(!1)))}createController(){return super.createController(this.layoutService,{ignoreFocusOut:()=>!this.configurationService.getValue("workbench.quickOpen.closeOnFocusLost"),backKeybindingLabel:()=>this.keybindingService.lookupKeybinding("workbench.action.quickInputBack")?.getLabel()||void 0,hoverDelegate:this.hoverDelegate})}};e.QuickInputService=r,e.QuickInputService=r=fe([O(0,D.IConfigurationService),O(1,y.IInstantiationService),O(2,f.IKeybindingService),O(3,T.IContextKeyService),O(4,b.IThemeService),O(5,t.ILayoutService),O(6,a.IHoverService)],r);class i{get delay(){return Date.now()-this.lastHoverHideTime<200?0:this.configurationService.getValue("workbench.hover.delay")}constructor(o,u){this.configurationService=o,this.hoverService=u,this.lastHoverHideTime=0,this.placement="element"}showHover(o,u){return this.hoverService.showHover({...o,showHoverHint:!0,hideOnKeyDown:!1,skipFadeInAnimation:!0},u)}onDidHideHover(){this.lastHoverHideTime=Date.now()}}(0,m.registerSingleton)(S.IQuickInputService,r,1)}),define(Q[4012],Y([1,0,10,186]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteExtensionEnvironmentChannelClient=void 0;class b{static async getEnvironmentData(T,f,v){const m={remoteAuthority:f,profile:v},S=await T.call("getEnvironmentData",m);return{pid:S.pid,connectionToken:S.connectionToken,appRoot:t.URI.revive(S.appRoot),settingsPath:t.URI.revive(S.settingsPath),logsPath:t.URI.revive(S.logsPath),extensionHostLogsPath:t.URI.revive(S.extensionHostLogsPath),globalStorageHome:t.URI.revive(S.globalStorageHome),workspaceStorageHome:t.URI.revive(S.workspaceStorageHome),localHistoryHome:t.URI.revive(S.localHistoryHome),userHome:t.URI.revive(S.userHome),os:S.os,arch:S.arch,marks:S.marks,useHostProxy:S.useHostProxy,profiles:(0,y.revive)(S.profiles)}}static async getExtensionHostExitInfo(T,f,v){const m={remoteAuthority:f,reconnectionToken:v};return T.call("getExtensionHostExitInfo",m)}static getDiagnosticInfo(T,f){return T.call("getDiagnosticInfo",f)}static updateTelemetryLevel(T,f){return T.call("updateTelemetryLevel",{telemetryLevel:f})}static logTelemetry(T,f,v){return T.call("logTelemetry",{eventName:f,data:v})}static flushTelemetry(T){return T.call("flushTelemetry")}static async ping(T){await T.call("ping")}}e.RemoteExtensionEnvironmentChannelClient=b}),define(Q[127],Y([1,0,5,14]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.remoteConnectionLatencyMeasurer=e.IRemoteAgentService=void 0,e.IRemoteAgentService=(0,t.createDecorator)("remoteAgentService"),e.remoteConnectionLatencyMeasurer=new class{constructor(){this.maxSampleCount=5,this.sampleDelay=2e3,this.initial=[],this.maxInitialCount=3,this.average=[],this.maxAverageCount=100,this.highLatencyMultiple=2,this.highLatencyMinThreshold=500,this.highLatencyMaxThreshold=1500,this.lastMeasurement=void 0}get latency(){return this.lastMeasurement}async measure(b){let D=1/0;for(let f=0;f<this.maxSampleCount;f++){const v=await b.getRoundTripTime();if(v===void 0)return;D=Math.min(D,v/2),await(0,y.timeout)(this.sampleDelay)}this.average.push(D),this.average.length>this.maxAverageCount&&this.average.shift();let T;return this.initial.length<this.maxInitialCount?this.initial.push(D):T=this.initial.reduce((f,v)=>f+v,0)/this.initial.length,this.lastMeasurement={initial:T,current:D,average:this.average.reduce((f,v)=>f+v,0)/this.average.length,high:(()=>typeof T>"u"?!1:D>this.highLatencyMaxThreshold||D>this.highLatencyMinThreshold&&D>T*this.highLatencyMultiple)()},this.lastMeasurement}}}),define(Q[4013],Y([1,0,4,53,60,10,5,11,126,3308,119,1311,616,594,158,127,18,14,1314,737]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOutputMatchForLines=e.MainThreadTerminalService=void 0;let c=class{constructor(C,I,_,A,k,L,R,M,N,P,x,F){this._extHostContext=C,this._terminalService=I,this._terminalLinkProviderService=_,this._terminalQuickFixService=A,this._instantiationService=k,this._environmentVariableService=L,this._logService=R,this._terminalProfileResolverService=M,this._terminalGroupService=P,this._terminalEditorService=x,this._terminalProfileService=F,this._store=new t.DisposableStore,this._extHostTerminals=new Map,this._terminalProcessProxies=new Map,this._profileProviders=new Map,this._quickFixProviders=new Map,this._dataEventTracker=new t.MutableDisposable,this._sendCommandEventListener=new t.MutableDisposable,this._os=o.OS,this._proxy=C.getProxy(y.ExtHostContext.ExtHostTerminalService),this._store.add(I.onDidCreateInstance(W=>{this._onTerminalOpened(W),this._onInstanceDimensionsChanged(W)})),this._store.add(I.onDidDisposeInstance(W=>this._onTerminalDisposed(W))),this._store.add(I.onDidReceiveProcessId(W=>this._onTerminalProcessIdReady(W))),this._store.add(I.onDidChangeInstanceDimensions(W=>this._onInstanceDimensionsChanged(W))),this._store.add(I.onDidMaximumDimensionsChange(W=>this._onInstanceMaximumDimensionsChanged(W))),this._store.add(I.onDidRequestStartExtensionTerminal(W=>this._onRequestStartExtensionTerminal(W))),this._store.add(I.onDidChangeActiveInstance(W=>this._onActiveTerminalChanged(W?W.instanceId:null))),this._store.add(I.onDidChangeInstanceTitle(W=>W&&this._onTitleChanged(W.instanceId,W.title))),this._store.add(I.onDidInputInstanceData(W=>this._proxy.$acceptTerminalInteraction(W.instanceId))),this._store.add(I.onDidChangeSelection(W=>this._proxy.$acceptTerminalSelection(W.instanceId,W.selection)));for(const W of this._terminalService.instances)this._onTerminalOpened(W),W.processReady.then(()=>this._onTerminalProcessIdReady(W));const V=this._terminalService.activeInstance;if(V&&this._proxy.$acceptActiveTerminalChanged(V.instanceId),this._environmentVariableService.collections.size>0){const z=[...this._environmentVariableService.collections.entries()].map(B=>[B[0],(0,r.serializeEnvironmentVariableCollection)(B[1].map)]);this._proxy.$initEnvironmentVariableCollections(z)}N.getEnvironment().then(async W=>{this._os=W?.os||o.OS,this._updateDefaultProfile()}),this._store.add(this._terminalProfileService.onDidChangeAvailableProfiles(()=>this._updateDefaultProfile()))}dispose(){this._store.dispose(),this._linkProvider?.dispose();for(const C of this._profileProviders.values())C.dispose();for(const C of this._quickFixProviders.values())C.dispose()}async _updateDefaultProfile(){const C=this._extHostContext.remoteAuthority??void 0,I=this._terminalProfileResolverService.getDefaultProfile({remoteAuthority:C,os:this._os}),_=this._terminalProfileResolverService.getDefaultProfile({remoteAuthority:C,os:this._os,allowAutomationShell:!0});this._proxy.$acceptDefaultProfile(...await Promise.all([I,_]))}async _getTerminalInstance(C){return typeof C=="string"?this._extHostTerminals.get(C):this._terminalService.getInstanceFromId(C)}async $createTerminal(C,I){const _={name:I.name,executable:I.shellPath,args:I.shellArgs,cwd:typeof I.cwd=="string"?I.cwd:D.URI.revive(I.cwd),icon:I.icon,color:I.color,initialText:I.initialText,waitOnExit:I.waitOnExit,ignoreConfigurationCwd:!0,env:I.env,strictEnv:I.strictEnv,hideFromUser:I.hideFromUser,customPtyImplementation:I.isExtensionCustomPtyTerminal?(L,R,M)=>new h.TerminalProcessExtHostProxy(L,R,M,this._terminalService):void 0,extHostTerminalId:C,isFeatureTerminal:I.isFeatureTerminal,isExtensionOwnedTerminal:I.isExtensionOwnedTerminal,useShellEnvironment:I.useShellEnvironment,isTransient:I.isTransient},A=u.Promises.withAsyncBody(async L=>{const R=await this._terminalService.createTerminal({config:_,location:await this._deserializeParentTerminal(I.location)});L(R)});this._extHostTerminals.set(C,A);const k=await A;this._store.add(k.onDisposed(()=>{this._extHostTerminals.delete(C)}))}async _deserializeParentTerminal(C){if(typeof C=="object"&&"parentTerminal"in C){const I=await this._extHostTerminals.get(C.parentTerminal.toString());return I?{parentTerminal:I}:void 0}return C}async $show(C,I){const _=await this._getTerminalInstance(C);_&&(this._terminalService.setActiveInstance(_),_.target===v.TerminalLocation.Editor?await this._terminalEditorService.revealActiveEditor(I):await this._terminalGroupService.showPanel(!I))}async $hide(C){const I=await this._getTerminalInstance(C),_=this._terminalService.activeInstance;_&&_.instanceId===I?.instanceId&&_.target!==v.TerminalLocation.Editor&&this._terminalGroupService.hidePanel()}async $dispose(C){(await this._getTerminalInstance(C))?.dispose(v.TerminalExitReason.Extension)}async $sendText(C,I,_){await(await this._getTerminalInstance(C))?.sendText(I,_)}$sendProcessExit(C,I){this._terminalProcessProxies.get(C)?.emitExit(I)}$startSendingDataEvents(){if(!this._dataEventTracker.value){this._dataEventTracker.value=this._instantiationService.createInstance(l,(C,I)=>{this._onTerminalData(C,I)});for(const C of this._terminalService.instances)for(const I of C.initialDataEvents||[])this._onTerminalData(C.instanceId,I)}}$stopSendingDataEvents(){this._dataEventTracker.clear()}$startSendingCommandEvents(){if(this._logService.info("$startSendingCommandEvents"),this._sendCommandEventListener.value)return;const C=this._terminalService.onInstanceCapabilityEvent(2,I=>I.onCommandFinished);C.event(I=>{this._onDidExecuteCommand(I.instance.instanceId,{commandLine:I.data.command,cwd:I.data.cwd,exitCode:I.data.exitCode,output:I.data.getOutput()})}),this._sendCommandEventListener.value=C}$stopSendingCommandEvents(){this._logService.info("$stopSendingCommandEvents"),this._sendCommandEventListener.clear()}$startLinkProvider(){this._linkProvider?.dispose(),this._linkProvider=this._terminalLinkProviderService.registerLinkProvider(new n(this._proxy))}$stopLinkProvider(){this._linkProvider?.dispose(),this._linkProvider=void 0}$registerProcessSupport(C){this._terminalService.registerProcessSupport(C)}$registerProfileProvider(C,I){this._profileProviders.set(C,this._terminalProfileService.registerTerminalProfileProvider(I,C,{createContributedTerminalProfile:async _=>this._proxy.$createContributedProfileTerminal(C,_)}))}$unregisterProfileProvider(C){this._profileProviders.get(C)?.dispose(),this._profileProviders.delete(C)}async $registerQuickFixProvider(C,I){this._quickFixProviders.set(C,this._terminalQuickFixService.registerQuickFixProvider(C,{provideTerminalQuickFixes:async(_,A,k,L)=>{if(L.isCancellationRequested)return;k.outputMatcher?.length&&k.outputMatcher.length>40&&(k.outputMatcher.length=40,this._logService.warn("Cannot exceed output matcher length of 40"));const R=_.command.match(k.commandLineMatcher);if(!R||!A)return;const M=k.outputMatcher;let N;if(M&&(N=g(A,M)),!N)return;const P={commandLineMatch:R,outputMatch:N,commandLine:_.command};if(P){const x=await this._proxy.$provideTerminalQuickFixes(C,P,L);if(x&&Array.isArray(x))return x.map(F=>w(C,I,F));if(x)return w(C,I,x)}}}))}$unregisterQuickFixProvider(C){this._quickFixProviders.get(C)?.dispose(),this._quickFixProviders.delete(C)}_onActiveTerminalChanged(C){this._proxy.$acceptActiveTerminalChanged(C)}_onTerminalData(C,I){this._proxy.$acceptTerminalProcessData(C,I)}_onDidExecuteCommand(C,I){this._proxy.$acceptDidExecuteCommand(C,I)}_onTitleChanged(C,I){this._proxy.$acceptTerminalTitleChange(C,I)}_onTerminalDisposed(C){this._proxy.$acceptTerminalClosed(C.instanceId,C.exitCode,C.exitReason??v.TerminalExitReason.Unknown)}_onTerminalOpened(C){const I=C.shellLaunchConfig.extHostTerminalId,_={name:C.shellLaunchConfig.name,executable:C.shellLaunchConfig.executable,args:C.shellLaunchConfig.args,cwd:C.shellLaunchConfig.cwd,env:C.shellLaunchConfig.env,hideFromUser:C.shellLaunchConfig.hideFromUser};this._proxy.$acceptTerminalOpened(C.instanceId,I,C.title,_)}_onTerminalProcessIdReady(C){C.processId!==void 0&&this._proxy.$acceptTerminalProcessId(C.instanceId,C.processId)}_onInstanceDimensionsChanged(C){this._proxy.$acceptTerminalDimensions(C.instanceId,C.cols,C.rows)}_onInstanceMaximumDimensionsChanged(C){this._proxy.$acceptTerminalMaximumDimensions(C.instanceId,C.maxCols,C.maxRows)}_onRequestStartExtensionTerminal(C){const I=C.proxy;this._terminalProcessProxies.set(I.instanceId,I);const _=C.cols&&C.rows?{columns:C.cols,rows:C.rows}:void 0;this._proxy.$startExtensionTerminal(I.instanceId,_).then(C.callback),I.onInput(A=>this._proxy.$acceptProcessInput(I.instanceId,A)),I.onShutdown(A=>this._proxy.$acceptProcessShutdown(I.instanceId,A)),I.onRequestCwd(()=>this._proxy.$acceptProcessRequestCwd(I.instanceId)),I.onRequestInitialCwd(()=>this._proxy.$acceptProcessRequestInitialCwd(I.instanceId))}$sendProcessData(C,I){this._terminalProcessProxies.get(C)?.emitData(I)}$sendProcessReady(C,I,_,A){this._terminalProcessProxies.get(C)?.emitReady(I,_,A)}$sendProcessProperty(C,I){I.type==="title"&&this._terminalService.getInstanceFromId(C)?.rename(I.value),this._terminalProcessProxies.get(C)?.emitProcessProperty(I)}$setEnvironmentVariableCollection(C,I,_,A){if(_){const k={persistent:I,map:(0,r.deserializeEnvironmentVariableCollection)(_),descriptionMap:(0,r.deserializeEnvironmentDescriptionMap)(A)};this._environmentVariableService.set(C,k)}else this._environmentVariableService.delete(C)}};e.MainThreadTerminalService=c,e.MainThreadTerminalService=c=fe([(0,b.extHostNamedCustomer)(y.MainContext.MainThreadTerminalService),O(1,S.ITerminalService),O(2,d.ITerminalLinkProviderService),O(3,p.ITerminalQuickFixService),O(4,T.IInstantiationService),O(5,a.IEnvironmentVariableService),O(6,f.ILogService),O(7,i.ITerminalProfileResolverService),O(8,s.IRemoteAgentService),O(9,S.ITerminalGroupService),O(10,S.ITerminalEditorService),O(11,i.ITerminalProfileService)],c);let l=class extends t.Disposable{constructor(C,I){super(),this._callback=C,this._terminalService=I,this._register(this._bufferer=new m.TerminalDataBufferer(this._callback));for(const _ of this._terminalService.instances)this._registerInstance(_);this._register(this._terminalService.onDidCreateInstance(_=>this._registerInstance(_))),this._register(this._terminalService.onDidDisposeInstance(_=>this._bufferer.stopBuffering(_.instanceId)))}_registerInstance(C){this._register(this._bufferer.startBuffering(C.instanceId,C.onData))}};l=fe([O(1,S.ITerminalService)],l);class n{constructor(C){this._proxy=C}async provideLinks(C,I){const _=this._proxy;return(await _.$provideLinks(C.instanceId,I)).map(k=>({id:k.id,startIndex:k.startIndex,length:k.length,label:k.label,activate:()=>_.$activateLink(C.instanceId,k.id)}))}}function g(E,C){const I=E.join(` `).match(C.lineMatcher);return I?{regexMatch:I,outputLines:E}:void 0}e.getOutputMatchForLines=g;function w(E,C,I){let _=p.TerminalQuickFixType.TerminalCommand;return"uri"in I?(I.uri=D.URI.revive(I.uri),_=p.TerminalQuickFixType.Opener):"id"in I&&(_=p.TerminalQuickFixType.VscodeCommand),{id:E,type:_,source:C,...I}}}),define(Q[212],Y([1,0,2588,56,16,39,9,4,6,127,18]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicWorkbenchConfigurationWorkbenchContribution=e.ConfigurationMigrationWorkbenchContribution=e.Extensions=e.securityConfigurationNodeBase=e.workbenchConfigurationNodeBase=e.applicationConfigurationNodeBase=void 0,e.applicationConfigurationNodeBase=Object.freeze({id:"application",order:100,title:(0,t.localize)(0,null),type:"object"}),e.workbenchConfigurationNodeBase=Object.freeze({id:"workbench",order:7,title:(0,t.localize)(1,null),type:"object"}),e.securityConfigurationNodeBase=Object.freeze({id:"security",scope:1,title:(0,t.localize)(2,null),type:"object",order:7}),e.Extensions={ConfigurationMigration:"base.contributions.configuration.migration"};class h{constructor(){this.migrations=[],this._onDidRegisterConfigurationMigrations=new v.Emitter,this.onDidRegisterConfigurationMigration=this._onDidRegisterConfigurationMigrations.event}registerConfigurationMigrations(o){this.migrations.push(...o)}}const a=new h;b.Registry.add(e.Extensions.ConfigurationMigration,a);let r=class extends f.Disposable{constructor(o,u){super(),this.configurationService=o,this.workspaceService=u,this._register(this.workspaceService.onDidChangeWorkspaceFolders(async d=>{for(const p of d.added)await this.migrateConfigurationsForFolder(p,a.migrations)})),this.migrateConfigurations(a.migrations),this._register(a.onDidRegisterConfigurationMigration(d=>this.migrateConfigurations(d)))}async migrateConfigurations(o){await this.migrateConfigurationsForFolder(void 0,o);for(const u of this.workspaceService.getWorkspace().folders)await this.migrateConfigurationsForFolder(u,o)}async migrateConfigurationsForFolder(o,u){await Promise.all(u.map(d=>this.migrateConfigurationsForFolderAndOverride(d,{resource:o?.uri})))}async migrateConfigurationsForFolderAndOverride(o,u){const d=this.configurationService.inspect(o.key,u);if(await this.migrateConfigurationForFolderOverrideAndTarget(o,u,d,"userValue",2),await this.migrateConfigurationForFolderOverrideAndTarget(o,u,d,"userLocalValue",3),await this.migrateConfigurationForFolderOverrideAndTarget(o,u,d,"userRemoteValue",4),await this.migrateConfigurationForFolderOverrideAndTarget(o,u,d,"workspaceFolderValue",6),await this.migrateConfigurationForFolderOverrideAndTarget(o,u,d,"workspaceValue",5),typeof u.overrideIdentifier>"u"&&typeof d.overrideIdentifiers<"u")for(const p of d.overrideIdentifiers)await this.migrateConfigurationsForFolderAndOverride(o,{resource:u.resource,overrideIdentifier:p})}async migrateConfigurationForFolderOverrideAndTarget(o,u,d,p,c){const l=d[p];if(typeof l>"u")return;const n=E=>this.configurationService.inspect(E,u)[p],g=await o.migrateFn(l,n),w=Array.isArray(g)?g:[[o.key,g]];await Promise.allSettled(w.map(async([E,C])=>this.configurationService.updateValue(E,C.value,u,c)))}};e.ConfigurationMigrationWorkbenchContribution=r,e.ConfigurationMigrationWorkbenchContribution=r=fe([O(0,T.IConfigurationService),O(1,D.IWorkspaceContextService)],r);let i=class extends f.Disposable{constructor(o){super(),(async()=>{if(!S.isWindows&&(await o.getEnvironment())?.os!==1)return;b.Registry.as(y.Extensions.Configuration).registerConfiguration({...e.securityConfigurationNodeBase,properties:{"security.allowedUNCHosts":{type:"array",items:{type:"string",pattern:"^[^\\\\]+$",patternErrorMessage:(0,t.localize)(3,null)},default:[],markdownDescription:(0,t.localize)(4,null),scope:2},"security.restrictUNCAccess":{type:"boolean",default:!0,markdownDescription:(0,t.localize)(5,null),scope:2}}})})()}};e.DynamicWorkbenchConfigurationWorkbenchContribution=i,e.DynamicWorkbenchConfigurationWorkbenchContribution=i=fe([O(0,m.IRemoteAgentService)],i)}),define(Q[4014],Y([1,0,16,2587,56,18,212,97,45,228]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const S=t.Registry.as(b.Extensions.Configuration);(function(){t.Registry.as(v.Extensions.Workbench).registerWorkbenchContribution(T.ConfigurationMigrationWorkbenchContribution,4),t.Registry.as(v.Extensions.Workbench).registerWorkbenchContribution(T.DynamicWorkbenchConfigurationWorkbenchContribution,2),S.registerConfiguration({...T.workbenchConfigurationNodeBase,properties:{"workbench.editor.titleScrollbarSizing":{type:"string",enum:["default","large"],enumDescriptions:[(0,y.localize)(0,null),(0,y.localize)(1,null)],description:(0,y.localize)(2,null),default:"default"},"workbench.editor.showTabs":{type:"boolean",description:(0,y.localize)(3,null),default:!0},"workbench.editor.wrapTabs":{type:"boolean",markdownDescription:(0,y.localize)(4,null),default:!1},"workbench.editor.scrollToSwitchTabs":{type:"boolean",markdownDescription:(0,y.localize)(5,null),default:!1},"workbench.editor.highlightModifiedTabs":{type:"boolean",markdownDescription:(0,y.localize)(6,null),default:!1},"workbench.editor.decorations.badges":{type:"boolean",markdownDescription:(0,y.localize)(7,null),default:!0},"workbench.editor.decorations.colors":{type:"boolean",markdownDescription:(0,y.localize)(8,null),default:!0},"workbench.editor.labelFormat":{type:"string",enum:["default","short","medium","long"],enumDescriptions:[(0,y.localize)(9,null),(0,y.localize)(10,null),(0,y.localize)(11,null),(0,y.localize)(12,null)],default:"default",description:(0,y.localize)(13,null)},"workbench.editor.untitled.labelFormat":{type:"string",enum:["content","name"],enumDescriptions:[(0,y.localize)(14,null),(0,y.localize)(15,null)],default:"name",description:(0,y.localize)(16,null)},"workbench.editor.untitled.hint":{type:"string",enum:["text","hidden"],default:"text",markdownDescription:(0,y.localize)(17,null)},"workbench.editor.languageDetection":{type:"boolean",default:!0,description:(0,y.localize)(18,null),scope:5},"workbench.editor.historyBasedLanguageDetection":{type:"boolean",default:!0,tags:["experimental"],description:(0,y.localize)(19,null)},"workbench.editor.preferHistoryBasedLanguageDetection":{type:"boolean",default:!1,tags:["experimental"],description:(0,y.localize)(20,null)},"workbench.editor.languageDetectionHints":{type:"object",default:{untitledEditors:!0,notebookEditors:!0},tags:["experimental"],description:(0,y.localize)(21,null),additionalProperties:!1,properties:{untitledEditors:{type:"boolean",description:(0,y.localize)(22,null)},notebookEditors:{type:"boolean",description:(0,y.localize)(23,null)}}},"workbench.editor.tabCloseButton":{type:"string",enum:["left","right","off"],default:"right",markdownDescription:(0,y.localize)(24,null)},"workbench.editor.tabSizing":{type:"string",enum:["fit","shrink","fixed"],default:"fit",enumDescriptions:[(0,y.localize)(25,null),(0,y.localize)(26,null),(0,y.localize)(27,null)],markdownDescription:(0,y.localize)(28,null)},"workbench.editor.tabSizingFixedMinWidth":{type:"number",default:50,minimum:38,markdownDescription:(0,y.localize)(29,null)},"workbench.editor.tabSizingFixedMaxWidth":{type:"number",default:160,minimum:38,markdownDescription:(0,y.localize)(30,null)},"workbench.editor.pinnedTabSizing":{type:"string",enum:["normal","compact","shrink"],default:"normal",enumDescriptions:[(0,y.localize)(31,null),(0,y.localize)(32,null),(0,y.localize)(33,null)],markdownDescription:(0,y.localize)(34,null)},"workbench.editor.preventPinnedEditorClose":{type:"string",enum:["keyboardAndMouse","keyboard","mouse","never"],default:"keyboardAndMouse",enumDescriptions:[(0,y.localize)(35,null),(0,y.localize)(36,null),(0,y.localize)(37,null),(0,y.localize)(38,null)],description:(0,y.localize)(39,null)},"workbench.editor.splitSizing":{type:"string",enum:["auto","distribute","split"],default:"auto",enumDescriptions:[(0,y.localize)(40,null),(0,y.localize)(41,null),(0,y.localize)(42,null)],description:(0,y.localize)(43,null)},"workbench.editor.splitOnDragAndDrop":{type:"boolean",default:!0,description:(0,y.localize)(44,null)},"workbench.editor.focusRecentEditorAfterClose":{type:"boolean",description:(0,y.localize)(45,null),default:!0},"workbench.editor.showIcons":{type:"boolean",description:(0,y.localize)(46,null),default:!0},"workbench.editor.enablePreview":{type:"boolean",description:(0,y.localize)(47,null),default:!0},"workbench.editor.enablePreviewFromQuickOpen":{type:"boolean",markdownDescription:(0,y.localize)(48,null),default:!1},"workbench.editor.enablePreviewFromCodeNavigation":{type:"boolean",markdownDescription:(0,y.localize)(49,null),default:!1},"workbench.editor.closeOnFileDelete":{type:"boolean",description:(0,y.localize)(50,null),default:!1},"workbench.editor.openPositioning":{type:"string",enum:["left","right","first","last"],default:"right",markdownDescription:(0,y.localize)(51,null)},"workbench.editor.openSideBySideDirection":{type:"string",enum:["right","down"],default:"right",markdownDescription:(0,y.localize)(52,null)},"workbench.editor.closeEmptyGroups":{type:"boolean",description:(0,y.localize)(53,null),default:!0},"workbench.editor.revealIfOpen":{type:"boolean",description:(0,y.localize)(54,null),default:!1},"workbench.editor.mouseBackForwardToNavigate":{type:"boolean",description:(0,y.localize)(55,null),default:!0},"workbench.editor.navigationScope":{type:"string",enum:["default","editorGroup","editor"],default:"default",markdownDescription:(0,y.localize)(56,null),enumDescriptions:[(0,y.localize)(57,null),(0,y.localize)(58,null),(0,y.localize)(59,null)]},"workbench.editor.restoreViewState":{type:"boolean",markdownDescription:(0,y.localize)(60,null,"`#workbench.editor.sharedViewState#`"),default:!0,scope:5},"workbench.editor.sharedViewState":{type:"boolean",description:(0,y.localize)(61,null),default:!1},"workbench.editor.splitInGroupLayout":{type:"string",enum:["vertical","horizontal"],default:"horizontal",markdownDescription:(0,y.localize)(62,null),enumDescriptions:[(0,y.localize)(63,null),(0,y.localize)(64,null)]},"workbench.editor.centeredLayoutAutoResize":{type:"boolean",default:!0,description:(0,y.localize)(65,null)},"workbench.editor.centeredLayoutFixedWidth":{type:"boolean",default:!1,description:(0,y.localize)(66,null)},"workbench.editor.doubleClickTabToToggleEditorGroupSizes":{type:"boolean",default:!0,markdownDescription:(0,y.localize)(67,null)},"workbench.editor.limit.enabled":{type:"boolean",default:!1,description:(0,y.localize)(68,null)},"workbench.editor.limit.value":{type:"number",default:10,exclusiveMinimum:0,markdownDescription:(0,y.localize)(69,null,"`#workbench.editor.limit.perEditorGroup#`")},"workbench.editor.limit.excludeDirty":{type:"boolean",default:!1,description:(0,y.localize)(70,null)},"workbench.editor.limit.perEditorGroup":{type:"boolean",default:!1,description:(0,y.localize)(71,null)},"workbench.localHistory.enabled":{type:"boolean",default:!0,description:(0,y.localize)(72,null),scope:4},"workbench.localHistory.maxFileSize":{type:"number",default:256,minimum:1,description:(0,y.localize)(73,null),scope:4},"workbench.localHistory.maxFileEntries":{type:"number",default:50,minimum:0,description:(0,y.localize)(74,null),scope:4},"workbench.localHistory.exclude":{type:"object",patternProperties:{".*":{type:"boolean"}},markdownDescription:(0,y.localize)(75,null),scope:4},"workbench.localHistory.mergeWindow":{type:"number",default:10,minimum:1,markdownDescription:(0,y.localize)(76,null),scope:4},"workbench.commandPalette.history":{type:"number",description:(0,y.localize)(77,null),default:50,minimum:0},"workbench.commandPalette.preserveInput":{type:"boolean",description:(0,y.localize)(78,null),default:!1},"workbench.commandPalette.experimental.suggestCommands":{type:"boolean",tags:["experimental"],description:(0,y.localize)(79,null),default:!1},"workbench.commandPalette.experimental.enableNaturalLanguageSearch":{type:"boolean",tags:["experimental"],description:(0,y.localize)(80,null),default:!0},"workbench.quickOpen.closeOnFocusLost":{type:"boolean",description:(0,y.localize)(81,null),default:!0},"workbench.quickOpen.preserveInput":{type:"boolean",description:(0,y.localize)(82,null),default:!1},"workbench.settings.openDefaultSettings":{type:"boolean",description:(0,y.localize)(83,null),default:!1},"workbench.settings.useSplitJSON":{type:"boolean",markdownDescription:(0,y.localize)(84,null),default:!1},"workbench.settings.openDefaultKeybindings":{type:"boolean",description:(0,y.localize)(85,null),default:!1},"workbench.sideBar.location":{type:"string",enum:["left","right"],default:"left",description:(0,y.localize)(86,null)},"workbench.panel.defaultLocation":{type:"string",enum:["left","bottom","right"],default:"bottom",description:(0,y.localize)(87,null)},"workbench.panel.opensMaximized":{type:"string",enum:["always","never","preserve"],default:"preserve",description:(0,y.localize)(88,null),enumDescriptions:[(0,y.localize)(89,null),(0,y.localize)(90,null),(0,y.localize)(91,null)]},"workbench.statusBar.visible":{type:"boolean",default:!0,description:(0,y.localize)(92,null)},"workbench.activityBar.visible":{type:"boolean",default:!0,description:(0,y.localize)(93,null)},"workbench.activityBar.iconClickBehavior":{type:"string",enum:["toggle","focus"],default:"toggle",description:(0,y.localize)(94,null),enumDescriptions:[(0,y.localize)(95,null),(0,y.localize)(96,null)]},"workbench.view.alwaysShowHeaderActions":{type:"boolean",default:!0,description:(0,y.localize)(97,null)},"workbench.fontAliasing":{type:"string",enum:["default","antialiased","none","auto"],default:"default",description:(0,y.localize)(98,null),enumDescriptions:[(0,y.localize)(99,null),(0,y.localize)(100,null),(0,y.localize)(101,null),(0,y.localize)(102,null)],included:D.isMacintosh},"workbench.settings.editor":{type:"string",enum:["ui","json"],enumDescriptions:[(0,y.localize)(103,null),(0,y.localize)(104,null)],description:(0,y.localize)(105,null),default:"ui",scope:3},"workbench.hover.delay":{type:"number",description:(0,y.localize)(106,null),default:D.isMacintosh?1500:500,minimum:0},"workbench.reduceMotion":{type:"string",description:(0,y.localize)(107,null),enumDescriptions:[(0,y.localize)(108,null),(0,y.localize)(109,null),(0,y.localize)(110,null)],default:"auto",tags:["accessibility"],enum:["on","off","auto"]},"workbench.layoutControl.enabled":{type:"boolean",default:!0,markdownDescription:D.isWeb?(0,y.localize)(111,null):(0,y.localize)(112,null,"`#window.titleBarStyle#`","`custom`")},"workbench.layoutControl.type":{type:"string",enum:["menu","toggles","both"],enumDescriptions:[(0,y.localize)(113,null),(0,y.localize)(114,null),(0,y.localize)(115,null)],default:"both",description:(0,y.localize)(116,null)},"workbench.tips.enabled":{type:"boolean",default:!0,description:(0,y.localize)(117,null)}}});let a=(0,y.localize)(118,null);a+=` - `+[(0,y.localize)(119,null),(0,y.localize)(120,null),(0,y.localize)(121,null),(0,y.localize)(122,null),(0,y.localize)(123,null),(0,y.localize)(124,null),(0,y.localize)(125,null),(0,y.localize)(126,null),(0,y.localize)(127,null),(0,y.localize)(128,null),(0,y.localize)(129,null),(0,y.localize)(130,null),m.windowTitleAppNameDescription,(0,y.localize)(131,null),(0,y.localize)(132,null),(0,y.localize)(133,null),(0,y.localize)(134,null)].join(` - `),S.registerConfiguration({id:"window",order:8,title:(0,y.localize)(135,null),type:"object",properties:{"window.title":{type:"string",default:(()=>{if(D.isMacintosh&&D.isNative)return"${activeEditorShort}${separator}${rootName}${separator}${profileName}";const r="${dirty}${activeEditorShort}${separator}${rootName}${separator}${profileName}${separator}${appName}";return D.isWeb?r+"${separator}${remoteName}":r})(),markdownDescription:a},"window.titleSeparator":{type:"string",default:D.isMacintosh?" \u2014 ":" - ",markdownDescription:(0,y.localize)(136,null,"`#window.title#`")},"window.commandCenter":{type:"boolean",default:!0,markdownDescription:D.isWeb?(0,y.localize)(137,null):(0,y.localize)(138,null,"`#window.titleBarStyle#`","`custom`")},"window.menuBarVisibility":{type:"string",enum:["classic","visible","toggle","hidden","compact"],markdownEnumDescriptions:[(0,y.localize)(139,null),(0,y.localize)(140,null),D.isMacintosh?(0,y.localize)(141,null):(0,y.localize)(142,null),(0,y.localize)(143,null),D.isWeb?(0,y.localize)(144,null):(0,y.localize)(145,null,"`#window.titleBarStyle#`","`native`")],default:D.isWeb?"compact":"classic",scope:1,markdownDescription:D.isMacintosh?(0,y.localize)(146,null):(0,y.localize)(147,null),included:D.isWindows||D.isLinux||D.isWeb},"window.enableMenuBarMnemonics":{type:"boolean",default:!0,scope:1,description:(0,y.localize)(148,null),included:D.isWindows||D.isLinux},"window.customMenuBarAltFocus":{type:"boolean",default:!0,scope:1,markdownDescription:(0,y.localize)(149,null),included:D.isWindows||D.isLinux},"window.openFilesInNewWindow":{type:"string",enum:["on","off","default"],enumDescriptions:[(0,y.localize)(150,null),(0,y.localize)(151,null),D.isMacintosh?(0,y.localize)(152,null):(0,y.localize)(153,null)],default:"off",scope:1,markdownDescription:D.isMacintosh?(0,y.localize)(154,null):(0,y.localize)(155,null)},"window.openFoldersInNewWindow":{type:"string",enum:["on","off","default"],enumDescriptions:[(0,y.localize)(156,null),(0,y.localize)(157,null),(0,y.localize)(158,null)],default:"default",scope:1,markdownDescription:(0,y.localize)(159,null)},"window.confirmBeforeClose":{type:"string",enum:["always","keyboardOnly","never"],enumDescriptions:[D.isWeb?(0,y.localize)(160,null):(0,y.localize)(161,null),D.isWeb?(0,y.localize)(162,null):(0,y.localize)(163,null),D.isWeb?(0,y.localize)(164,null):(0,y.localize)(165,null)],default:D.isWeb&&!(0,f.isStandalone)()?"keyboardOnly":"never",markdownDescription:D.isWeb?(0,y.localize)(166,null):(0,y.localize)(167,null),scope:1}}}),S.registerConfiguration({id:"zenMode",order:9,title:(0,y.localize)(168,null),type:"object",properties:{"zenMode.fullScreen":{type:"boolean",default:!0,description:(0,y.localize)(169,null)},"zenMode.centerLayout":{type:"boolean",default:!0,description:(0,y.localize)(170,null)},"zenMode.hideTabs":{type:"boolean",default:!0,description:(0,y.localize)(171,null)},"zenMode.hideStatusBar":{type:"boolean",default:!0,description:(0,y.localize)(172,null)},"zenMode.hideActivityBar":{type:"boolean",default:!0,description:(0,y.localize)(173,null)},"zenMode.hideLineNumbers":{type:"boolean",default:!0,description:(0,y.localize)(174,null)},"zenMode.restore":{type:"boolean",default:!0,description:(0,y.localize)(175,null)},"zenMode.silentNotifications":{type:"boolean",default:!0,description:(0,y.localize)(176,null)}}})})()}),define(Q[631],Y([1,0,2596,56,16,8,212]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerAccessibilityConfiguration=e.AccessibleViewProviderId=e.AccessibilityVerbositySettingId=e.ViewDimUnfocusedOpacityProperties=e.AccessibilityWorkbenchSettingId=e.accessibleViewCurrentProviderId=e.accessibleViewGoToSymbolSupported=e.accessibleViewVerbosityEnabled=e.accessibleViewSupportsNavigation=e.accessibleViewIsShown=e.accessibilityHelpIsShown=void 0,e.accessibilityHelpIsShown=new D.RawContextKey("accessibilityHelpIsShown",!1,!0),e.accessibleViewIsShown=new D.RawContextKey("accessibleViewIsShown",!1,!0),e.accessibleViewSupportsNavigation=new D.RawContextKey("accessibleViewSupportsNavigation",!1,!0),e.accessibleViewVerbosityEnabled=new D.RawContextKey("accessibleViewVerbosityEnabled",!1,!0),e.accessibleViewGoToSymbolSupported=new D.RawContextKey("accessibleViewGoToSymbolSupported",!1,!0),e.accessibleViewCurrentProviderId=new D.RawContextKey("accessibleViewCurrentProviderId",void 0,void 0);var f;(function(i){i.DimUnfocusedEnabled="accessibility.dimUnfocused.enabled",i.DimUnfocusedOpacity="accessibility.dimUnfocused.opacity"})(f||(e.AccessibilityWorkbenchSettingId=f={}));var v;(function(i){i[i.Default=.75]="Default",i[i.Minimum=.2]="Minimum",i[i.Maximum=1]="Maximum"})(v||(e.ViewDimUnfocusedOpacityProperties=v={}));var m;(function(i){i.Terminal="accessibility.verbosity.terminal",i.DiffEditor="accessibility.verbosity.diffEditor",i.Chat="accessibility.verbosity.panelChat",i.InlineChat="accessibility.verbosity.inlineChat",i.InlineCompletions="accessibility.verbosity.inlineCompletions",i.KeybindingsEditor="accessibility.verbosity.keybindingsEditor",i.Notebook="accessibility.verbosity.notebook",i.Editor="accessibility.verbosity.editor",i.Hover="accessibility.verbosity.hover",i.Notification="accessibility.verbosity.notification",i.EditorUntitledHint="accessibility.verbosity.untitledHint"})(m||(e.AccessibilityVerbositySettingId=m={}));var S;(function(i){i.Terminal="terminal",i.DiffEditor="diffEditor",i.Chat="panelChat",i.InlineChat="inlineChat",i.InlineCompletions="inlineCompletions",i.KeybindingsEditor="keybindingsEditor",i.Notebook="notebook",i.Editor="editor",i.Hover="hover",i.Notification="notification",i.EditorUntitledHint="editor.untitledHint"})(S||(e.AccessibleViewProviderId=S={}));const h={type:"boolean",default:!0,tags:["accessibility"]},a={id:"accessibility",title:(0,t.localize)(0,null),type:"object",properties:{["accessibility.verbosity.terminal"]:{description:(0,t.localize)(1,null),...h},["accessibility.verbosity.diffEditor"]:{description:(0,t.localize)(2,null),...h},["accessibility.verbosity.panelChat"]:{description:(0,t.localize)(3,null),...h},["accessibility.verbosity.inlineChat"]:{description:(0,t.localize)(4,null),...h},["accessibility.verbosity.inlineCompletions"]:{description:(0,t.localize)(5,null),...h},["accessibility.verbosity.keybindingsEditor"]:{description:(0,t.localize)(6,null),...h},["accessibility.verbosity.notebook"]:{description:(0,t.localize)(7,null),...h},["accessibility.verbosity.hover"]:{description:(0,t.localize)(8,null),...h},["accessibility.verbosity.notification"]:{description:(0,t.localize)(9,null),...h},["accessibility.verbosity.untitledHint"]:{description:(0,t.localize)(10,null),...h}}};function r(){const i=b.Registry.as(y.Extensions.Configuration);i.registerConfiguration(a),i.registerConfiguration({...T.workbenchConfigurationNodeBase,properties:{["accessibility.dimUnfocused.enabled"]:{description:(0,t.localize)(11,null),type:"boolean",default:!1,tags:["accessibility"],scope:1},["accessibility.dimUnfocused.opacity"]:{markdownDescription:(0,t.localize)(12,null,"`#accessibility.dimUnfocused.enabled#`"),type:"number",minimum:.2,maximum:1,default:.75,tags:["accessibility"],scope:1}}})}e.registerAccessibilityConfiguration=r}),define(Q[4015],Y([1,0,2637,9,66,13,631,87,678,1786]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class m extends D.Action2{constructor(){super({id:"editor.action.toggleScreenReaderAccessibilityMode",title:{value:t.localize(0,null),original:"Toggle Screen Reader Accessibility Mode"},f1:!0,keybinding:[{primary:2083,weight:200+10,when:T.accessibilityHelpIsShown},{primary:1595,linux:{primary:1598},weight:200+10}]})}async run(h){const a=h.get(b.IAccessibilityService),r=h.get(y.IConfigurationService),i=a.isScreenReaderOptimized();r.updateValue("editor.accessibilitySupport",i?"off":"on",2),(0,f.alert)(i?v.AccessibilityHelpNLS.screenReaderModeDisabled:v.AccessibilityHelpNLS.screenReaderModeEnabled)}}(0,D.registerAction2)(m)}),define(Q[4016],Y([1,0,16,1064,212]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(b.Extensions.ConfigurationMigration).registerConfigurationMigrations(y.EditorSettingMigration.items.map(D=>({key:`editor.${D.key}`,migrateFn:(T,f)=>{const v=[],m=(S,h)=>v.push([`editor.${S}`,{value:h}]);return D.migrate(T,S=>f(`editor.${S}`),m),v}})))}),define(Q[752],Y([1,0,56,212,2723,16]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateContributedOpeners=e.externalUriOpenersConfigurationNode=e.externalUriOpenersSettingId=e.defaultExternalUriOpenerId=void 0,e.defaultExternalUriOpenerId="default",e.externalUriOpenersSettingId="workbench.externalUriOpeners";const T={type:"string",enum:[]},f="\n- `https://microsoft.com`: Matches this specific domain using https\n- `https://microsoft.com:8080`: Matches this specific domain on this port using https\n- `https://microsoft.com:*`: Matches this specific domain on any port using https\n- `https://microsoft.com/foo`: Matches `https://microsoft.com/foo` and `https://microsoft.com/foo/bar`, but not `https://microsoft.com/foobar` or `https://microsoft.com/bar`\n- `https://*.microsoft.com`: Match all domains ending in `microsoft.com` using https\n- `microsoft.com`: Match this specific domain using either http or https\n- `*.microsoft.com`: Match all domains ending in `microsoft.com` using either http or https\n- `http://192.168.0.1`: Matches this specific IP using http\n- `http://192.168.0.*`: Matches all IP's with this prefix using http\n- `*`: Match all domains using either http or https";e.externalUriOpenersConfigurationNode={...y.workbenchConfigurationNodeBase,properties:{[e.externalUriOpenersSettingId]:{type:"object",markdownDescription:b.localize(0,null),defaultSnippets:[{body:{"example.com":"$1"}}],additionalProperties:{anyOf:[{type:"string",markdownDescription:b.localize(1,null,f)},{type:"string",markdownDescription:b.localize(2,null,f),enum:[e.defaultExternalUriOpenerId],enumDescriptions:[b.localize(3,null)]},T]}}}};function v(m,S){T.enum=m,T.enumDescriptions=S,D.Registry.as(t.Extensions.Configuration).notifyConfigurationSchemaUpdated(e.externalUriOpenersConfigurationNode)}e.updateContributedOpeners=v}),define(Q[4017],Y([1,0,4,24,191,752,44]),function(q,e,t,y,b,D,T){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.ContributedExternalUriOpenersStore=void 0;let v=class extends t.Disposable{static{f=this}static{this.STORAGE_ID="externalUriOpeners"}constructor(S,h){super(),this._extensionService=h,this._openers=new Map,this._memento=new b.Memento(f.STORAGE_ID,S),this._mementoObject=this._memento.getMemento(0,1);for(const[a,r]of Object.entries(this._mementoObject||{}))this.add(a,r.extensionId,{isCurrentlyRegistered:!1});this.invalidateOpenersOnExtensionsChanged(),this._register(this._extensionService.onDidChangeExtensions(()=>this.invalidateOpenersOnExtensionsChanged())),this._register(this._extensionService.onDidChangeExtensionsStatus(()=>this.invalidateOpenersOnExtensionsChanged()))}didRegisterOpener(S,h){this.add(S,h,{isCurrentlyRegistered:!0})}add(S,h,a){const r=this._openers.get(S);if(r){r.isCurrentlyRegistered=r.isCurrentlyRegistered||a.isCurrentlyRegistered;return}const i={extensionId:h,isCurrentlyRegistered:a.isCurrentlyRegistered};this._openers.set(S,i),this._mementoObject[S]=i,this._memento.saveMemento(),this.updateSchema()}delete(S){this._openers.delete(S),delete this._mementoObject[S],this._memento.saveMemento(),this.updateSchema()}async invalidateOpenersOnExtensionsChanged(){await this._extensionService.whenInstalledExtensionsRegistered();const S=this._extensionService.extensions;for(const[h,a]of this._openers){const r=S.find(i=>i.identifier.value===a.extensionId);r?this._extensionService.canRemoveExtension(r)||a.isCurrentlyRegistered||this.delete(h):this.delete(h)}}updateSchema(){const S=[],h=[];for(const[a,r]of this._openers)S.push(a),h.push(r.extensionId);(0,D.updateContributedOpeners)(S,h)}};e.ContributedExternalUriOpenersStore=v,e.ContributedExternalUriOpenersStore=v=f=fe([O(0,y.IStorageService),O(1,T.IExtensionService)],v)}),define(Q[753],Y([1,0,20,83,4,204,18,10,99,2724,9,5,11,41,43,752,1322,124]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExternalUriOpenerService=e.IExternalUriOpenerService=void 0,e.IExternalUriOpenerService=(0,h.createDecorator)("externalUriOpenerService");let d=class extends b.Disposable{constructor(c,l,n,g,w){super(),this.configurationService=l,this.logService=n,this.preferencesService=g,this.quickInputService=w,this._providers=new D.LinkedList,this._register(c.registerExternalOpener(this))}registerExternalOpenerProvider(c){return{dispose:this._providers.push(c)}}async getOpeners(c,l,n,g){const w=await this.getAllOpenersForUri(c);if(w.size===0)return[];if(n.preferredOpenerId){if(n.preferredOpenerId===s.defaultExternalUriOpenerId)return[];const _=w.get(n.preferredOpenerId);if(_)return[_]}const E=this.getConfiguredOpenerForUri(w,c);if(E)return E===s.defaultExternalUriOpenerId?[]:[E];const C=[];if(await Promise.all(Array.from(w.values()).map(async _=>{let A;try{A=await _.canOpen(n.sourceUri,g)}catch(k){this.logService.error(k);return}switch(A){case v.ExternalUriOpenerPriority.Option:case v.ExternalUriOpenerPriority.Default:case v.ExternalUriOpenerPriority.Preferred:C.push({opener:_,priority:A});break}})),C.length===0)return[];const I=(0,t.firstOrDefault)(C.filter(_=>_.priority===v.ExternalUriOpenerPriority.Preferred));return I?[I.opener]:!l&&C.every(_=>_.priority===v.ExternalUriOpenerPriority.Option)?[]:C.map(_=>_.opener)}async openExternal(c,l,n){const g=typeof c=="string"?f.URI.parse(c):c,w=await this.getOpeners(g,!1,l,n);return w.length===0?!1:w.length===1?w[0].openExternalUri(g,l,n):this.showOpenerPrompt(w,g,l,n)}async getOpener(c,l,n){const g=await this.getOpeners(c,!0,l,n);if(g.length>=1)return g[0]}async getAllOpenersForUri(c){const l=new Map;return await Promise.all(y.Iterable.map(this._providers,async n=>{for await(const g of n.getOpeners(c))l.set(g.id,g)})),l}getConfiguredOpenerForUri(c,l){const n=this.configurationService.getValue(s.externalUriOpenersSettingId)||{};for(const[g,w]of Object.entries(n))if((0,o.testUrlMatchesGlob)(l,g)){if(w===s.defaultExternalUriOpenerId)return"default";const E=c.get(w);if(E)return E}}async showOpenerPrompt(c,l,n,g){const w=c.map(C=>({label:C.label,opener:C}));w.push({label:T.isWeb?m.localize(0,null):m.localize(1,null),opener:void 0},{type:"separator"},{label:m.localize(2,null),opener:"configureDefault"});const E=await this.quickInputService.pick(w,{placeHolder:m.localize(3,null,l.toString())});return E?typeof E.opener>"u"?!1:E.opener==="configureDefault"?(await this.preferencesService.openUserSettings({jsonEditor:!0,revealSetting:{key:s.externalUriOpenersSettingId,edit:!0}}),!0):E.opener.openExternalUri(l,n,g):!0}};e.ExternalUriOpenerService=d,e.ExternalUriOpenerService=d=fe([O(0,r.IOpenerService),O(1,S.IConfigurationService),O(2,a.ILogService),O(3,u.IPreferencesService),O(4,i.IQuickInputService)],d)}),define(Q[4018],Y([1,0,34,15,4,22,2512,23,41,24,53,752,4017,753,44,60]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadUriOpeners=void 0;let o=class extends b.Disposable{constructor(d,p,c,l,n,g){super(),this.extensionService=l,this.openerService=n,this.notificationService=g,this._registeredOpeners=new Map,this.proxy=d.getProxy(S.ExtHostContext.ExtHostUriOpeners),this._register(c.registerExternalOpenerProvider(this)),this._contributedExternalUriOpenersStore=this._register(new a.ContributedExternalUriOpenersStore(p,l))}async*getOpeners(d){if(!(d.scheme!==D.Schemas.http&&d.scheme!==D.Schemas.https)){await this.extensionService.activateByEvent(`onOpenExternalUri:${d.scheme}`);for(const[p,c]of this._registeredOpeners)c.schemes.has(d.scheme)&&(yield this.createOpener(p,c))}}createOpener(d,p){return{id:d,label:p.label,canOpen:(c,l)=>this.proxy.$canOpenUri(d,c,l),openExternalUri:async(c,l,n)=>{try{await this.proxy.$openUri(d,{resolvedUri:c,sourceUri:l.sourceUri},n)}catch(g){if(!(0,y.isCancellationError)(g)){const w=new t.Action("default",(0,T.localize)(0,null),void 0,void 0,async()=>{await this.openerService.open(c,{allowTunneling:!1,allowContributedOpeners:h.defaultExternalUriOpenerId})});w.tooltip=c.toString(),this.notificationService.notify({severity:f.Severity.Error,message:(0,T.localize)(1,null,d,g.toString()),actions:{primary:[w]}})}}return!0}}}async $registerUriOpener(d,p,c,l){if(this._registeredOpeners.has(d))throw new Error(`Opener with id '${d}' already registered`);this._registeredOpeners.set(d,{schemes:new Set(p),label:l,extensionId:c}),this._contributedExternalUriOpenersStore.didRegisterOpener(d,c.value)}async $unregisterUriOpener(d){this._registeredOpeners.delete(d),this._contributedExternalUriOpenersStore.delete(d)}dispose(){super.dispose(),this._registeredOpeners.clear()}};e.MainThreadUriOpeners=o,e.MainThreadUriOpeners=o=fe([(0,s.extHostNamedCustomer)(S.MainContext.MainThreadUriOpeners),O(1,m.IStorageService),O(2,r.IExternalUriOpenerService),O(3,i.IExtensionService),O(4,v.IOpenerService),O(5,f.INotificationService)],o)}),define(Q[4019],Y([1,0,56,35,16,752,753]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,y.registerSingleton)(T.IExternalUriOpenerService,T.ExternalUriOpenerService,1),b.Registry.as(t.Extensions.Configuration).registerConfiguration(D.externalUriOpenersConfigurationNode)}),define(Q[296],Y([1,0,2753,13,56,8,5,16,36,212]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditMode=e.inlineChatDiffRemoved=e.inlineChatDiffInserted=e.inlineChatInputBackground=e.inlineChatInputPlaceholderForeground=e.inlineChatInputFocusBorder=e.inlineChatInputBorder=e.inlineChatRegionHighlight=e.inlineChatShadow=e.inlineChatBorder=e.inlineChatBackground=e.MENU_INLINE_CHAT_WIDGET_TOGGLE=e.MENU_INLINE_CHAT_WIDGET_DISCARD=e.MENU_INLINE_CHAT_WIDGET_FEEDBACK=e.MENU_INLINE_CHAT_WIDGET_STATUS=e.MENU_INLINE_CHAT_WIDGET_MARKDOWN_MESSAGE=e.MENU_INLINE_CHAT_WIDGET=e.ACTION_VIEW_IN_CHAT=e.ACTION_REGENERATE_RESPONSE=e.ACTION_ACCEPT_CHANGES=e.CTX_INLINE_CHAT_EDIT_MODE=e.CTX_INLINE_CHAT_DOCUMENT_CHANGED=e.CTX_INLINE_CHAT_LAST_FEEDBACK=e.CTX_INLINE_CHAT_USER_DID_EDIT=e.CTX_INLINE_CHAT_DID_EDIT=e.CTX_INLINE_CHAT_RESPONSE_TYPES=e.CTX_INLINE_CHAT_LAST_RESPONSE_TYPE=e.CTX_INLINE_CHAT_HAS_STASHED_SESSION=e.CTX_INLINE_CHAT_HAS_ACTIVE_REQUEST=e.CTX_INLINE_CHAT_OUTER_CURSOR_POSITION=e.CTX_INLINE_CHAT_MESSAGE_CROP_STATE=e.CTX_INLINE_CHAT_INNER_CURSOR_END=e.CTX_INLINE_CHAT_INNER_CURSOR_START=e.CTX_INLINE_CHAT_INNER_CURSOR_LAST=e.CTX_INLINE_CHAT_INNER_CURSOR_FIRST=e.CTX_INLINE_CHAT_EMPTY=e.CTX_INLINE_CHAT_RESPONSE_FOCUSED=e.CTX_INLINE_CHAT_FOCUSED=e.CTX_INLINE_CHAT_VISIBLE=e.CTX_INLINE_CHAT_HAS_PROVIDER=e.INTERACTIVE_EDITOR_ACCESSIBILITY_HELP_ID=e.INLINE_CHAT_ID=e.IInlineChatService=e.InlineChatResponseFeedbackKind=e.InlineChateResponseTypes=e.InlineChatResponseType=void 0;var S;(function(i){i.EditorEdit="editorEdit",i.BulkEdit="bulkEdit",i.Message="message"})(S||(e.InlineChatResponseType=S={}));var h;(function(i){i.OnlyMessages="onlyMessages",i.OnlyEdits="onlyEdits",i.Mixed="mixed"})(h||(e.InlineChateResponseTypes=h={}));var a;(function(i){i[i.Unhelpful=0]="Unhelpful",i[i.Helpful=1]="Helpful",i[i.Undone=2]="Undone",i[i.Accepted=3]="Accepted"})(a||(e.InlineChatResponseFeedbackKind=a={})),e.IInlineChatService=(0,T.createDecorator)("IInlineChatService"),e.INLINE_CHAT_ID="interactiveEditor",e.INTERACTIVE_EDITOR_ACCESSIBILITY_HELP_ID="interactiveEditorAccessiblityHelp",e.CTX_INLINE_CHAT_HAS_PROVIDER=new D.RawContextKey("inlineChatHasProvider",!1,(0,t.localize)(0,null)),e.CTX_INLINE_CHAT_VISIBLE=new D.RawContextKey("inlineChatVisible",!1,(0,t.localize)(1,null)),e.CTX_INLINE_CHAT_FOCUSED=new D.RawContextKey("inlineChatFocused",!1,(0,t.localize)(2,null)),e.CTX_INLINE_CHAT_RESPONSE_FOCUSED=new D.RawContextKey("inlineChatResponseFocused",!1,(0,t.localize)(3,null)),e.CTX_INLINE_CHAT_EMPTY=new D.RawContextKey("inlineChatEmpty",!1,(0,t.localize)(4,null)),e.CTX_INLINE_CHAT_INNER_CURSOR_FIRST=new D.RawContextKey("inlineChatInnerCursorFirst",!1,(0,t.localize)(5,null)),e.CTX_INLINE_CHAT_INNER_CURSOR_LAST=new D.RawContextKey("inlineChatInnerCursorLast",!1,(0,t.localize)(6,null)),e.CTX_INLINE_CHAT_INNER_CURSOR_START=new D.RawContextKey("inlineChatInnerCursorStart",!1,(0,t.localize)(7,null)),e.CTX_INLINE_CHAT_INNER_CURSOR_END=new D.RawContextKey("inlineChatInnerCursorEnd",!1,(0,t.localize)(8,null)),e.CTX_INLINE_CHAT_MESSAGE_CROP_STATE=new D.RawContextKey("inlineChatMarkdownMessageCropState","not_cropped",(0,t.localize)(9,null)),e.CTX_INLINE_CHAT_OUTER_CURSOR_POSITION=new D.RawContextKey("inlineChatOuterCursorPosition","",(0,t.localize)(10,null)),e.CTX_INLINE_CHAT_HAS_ACTIVE_REQUEST=new D.RawContextKey("inlineChatHasActiveRequest",!1,(0,t.localize)(11,null)),e.CTX_INLINE_CHAT_HAS_STASHED_SESSION=new D.RawContextKey("inlineChatHasStashedSession",!1,(0,t.localize)(12,null)),e.CTX_INLINE_CHAT_LAST_RESPONSE_TYPE=new D.RawContextKey("inlineChatLastResponseType",void 0,(0,t.localize)(13,null)),e.CTX_INLINE_CHAT_RESPONSE_TYPES=new D.RawContextKey("inlineChatResponseTypes",void 0,(0,t.localize)(14,null)),e.CTX_INLINE_CHAT_DID_EDIT=new D.RawContextKey("inlineChatDidEdit",void 0,(0,t.localize)(15,null)),e.CTX_INLINE_CHAT_USER_DID_EDIT=new D.RawContextKey("inlineChatUserDidEdit",void 0,(0,t.localize)(16,null)),e.CTX_INLINE_CHAT_LAST_FEEDBACK=new D.RawContextKey("inlineChatLastFeedbackKind","",(0,t.localize)(17,null)),e.CTX_INLINE_CHAT_DOCUMENT_CHANGED=new D.RawContextKey("inlineChatDocumentChanged",!1,(0,t.localize)(18,null)),e.CTX_INLINE_CHAT_EDIT_MODE=new D.RawContextKey("config.inlineChat.editMode","live"),e.ACTION_ACCEPT_CHANGES="interactive.acceptChanges",e.ACTION_REGENERATE_RESPONSE="inlineChat.regenerate",e.ACTION_VIEW_IN_CHAT="inlineChat.viewInChat",e.MENU_INLINE_CHAT_WIDGET=y.MenuId.for("inlineChatWidget"),e.MENU_INLINE_CHAT_WIDGET_MARKDOWN_MESSAGE=y.MenuId.for("inlineChatWidget.markdownMessage"),e.MENU_INLINE_CHAT_WIDGET_STATUS=y.MenuId.for("inlineChatWidget.status"),e.MENU_INLINE_CHAT_WIDGET_FEEDBACK=y.MenuId.for("inlineChatWidget.feedback"),e.MENU_INLINE_CHAT_WIDGET_DISCARD=y.MenuId.for("inlineChatWidget.undo"),e.MENU_INLINE_CHAT_WIDGET_TOGGLE=y.MenuId.for("inlineChatWidget.toggle"),e.inlineChatBackground=(0,v.registerColor)("inlineChat.background",{dark:v.editorWidgetBackground,light:v.editorWidgetBackground,hcDark:v.editorWidgetBackground,hcLight:v.editorWidgetBackground},(0,t.localize)(19,null)),e.inlineChatBorder=(0,v.registerColor)("inlineChat.border",{dark:v.editorWidgetBorder,light:v.editorWidgetBorder,hcDark:v.editorWidgetBorder,hcLight:v.editorWidgetBorder},(0,t.localize)(20,null)),e.inlineChatShadow=(0,v.registerColor)("inlineChat.shadow",{dark:v.widgetShadow,light:v.widgetShadow,hcDark:v.widgetShadow,hcLight:v.widgetShadow},(0,t.localize)(21,null)),e.inlineChatRegionHighlight=(0,v.registerColor)("inlineChat.regionHighlight",{dark:v.editorHoverHighlight,light:v.editorHoverHighlight,hcDark:v.editorHoverHighlight,hcLight:v.editorHoverHighlight},(0,t.localize)(22,null),!0),e.inlineChatInputBorder=(0,v.registerColor)("inlineChatInput.border",{dark:v.editorWidgetBorder,light:v.editorWidgetBorder,hcDark:v.editorWidgetBorder,hcLight:v.editorWidgetBorder},(0,t.localize)(23,null)),e.inlineChatInputFocusBorder=(0,v.registerColor)("inlineChatInput.focusBorder",{dark:v.focusBorder,light:v.focusBorder,hcDark:v.focusBorder,hcLight:v.focusBorder},(0,t.localize)(24,null)),e.inlineChatInputPlaceholderForeground=(0,v.registerColor)("inlineChatInput.placeholderForeground",{dark:v.inputPlaceholderForeground,light:v.inputPlaceholderForeground,hcDark:v.inputPlaceholderForeground,hcLight:v.inputPlaceholderForeground},(0,t.localize)(25,null)),e.inlineChatInputBackground=(0,v.registerColor)("inlineChatInput.background",{dark:v.inputBackground,light:v.inputBackground,hcDark:v.inputBackground,hcLight:v.inputBackground},(0,t.localize)(26,null)),e.inlineChatDiffInserted=(0,v.registerColor)("inlineChatDiff.inserted",{dark:(0,v.transparent)(v.diffInserted,.5),light:(0,v.transparent)(v.diffInserted,.5),hcDark:(0,v.transparent)(v.diffInserted,.5),hcLight:(0,v.transparent)(v.diffInserted,.5)},(0,t.localize)(27,null)),e.inlineChatDiffRemoved=(0,v.registerColor)("inlineChatDiff.removed",{dark:(0,v.transparent)(v.diffRemoved,.5),light:(0,v.transparent)(v.diffRemoved,.5),hcDark:(0,v.transparent)(v.diffRemoved,.5),hcLight:(0,v.transparent)(v.diffRemoved,.5)},(0,t.localize)(28,null));var r;(function(i){i.Live="live",i.LivePreview="livePreview",i.Preview="preview"})(r||(e.EditMode=r={})),f.Registry.as(m.Extensions.ConfigurationMigration).registerConfigurationMigrations([{key:"interactiveEditor.editMode",migrateFn:i=>[["inlineChat.mode",{value:i}]]}]),f.Registry.as(b.Extensions.Configuration).registerConfiguration({id:"editor",properties:{"inlineChat.mode":{description:(0,t.localize)(29,null),default:"livePreview",type:"string",enum:["livePreview","preview","live"],markdownEnumDescriptions:[(0,t.localize)(30,null),(0,t.localize)(31,null),(0,t.localize)(32,null)]},"inlineChat.showDiff":{description:(0,t.localize)(33,null),default:!0,type:"boolean"}}})}),define(Q[4020],Y([1,0,4,296,64,746,53,60]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadInlineChat=void 0;let v=class{constructor(S,h,a){this._inlineChatService=h,this._uriIdentService=a,this._registrations=new t.DisposableMap,this._progresses=new Map,this._proxy=S.getProxy(T.ExtHostContext.ExtHostInlineChat)}dispose(){this._registrations.dispose()}async $registerInteractiveEditorProvider(S,h,a,r){const i=this._inlineChatService.addProvider({debugName:a,label:h,prepareInlineChatSession:async(s,o,u)=>{const d=await this._proxy.$prepareSession(S,s.uri,o,u);if(d)return{...d,dispose:()=>{this._proxy.$releaseSession(S,d.id)}}},provideResponse:async(s,o,u,d)=>{this._progresses.set(o.requestId,u);try{const p=await this._proxy.$provideResponse(S,s,o,d);return p?.type==="bulkEdit"&&(p.edits=(0,D.reviveWorkspaceEditDto)(p.edits,this._uriIdentService)),p}finally{this._progresses.delete(o.requestId)}},handleInlineChatResponseFeedback:r?async(s,o,u)=>{this._proxy.$handleFeedback(S,s.id,o.id,u)}:void 0});this._registrations.set(S,i)}async $handleProgressChunk(S,h){this._progresses.get(S)?.report(h)}async $unregisterInteractiveEditorProvider(S){this._registrations.deleteAndDispose(S)}};e.MainThreadInlineChat=v,e.MainThreadInlineChat=v=fe([(0,f.extHostNamedCustomer)(T.MainContext.MainThreadInlineChat),O(1,y.IInlineChatService),O(2,b.IUriIdentityService)],v)}),define(Q[476],Y([1,0,26,6,152,296,27,5,30,57,75,4,98,11,83,132,15,14]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineChatSessionService=e.IInlineChatSessionService=e.EditResponse=e.MarkdownResponse=e.ErrorResponse=e.EmptyResponse=e.SessionExchange=e.SessionPrompt=e.Session=e.ExpansionState=void 0;var d;(function(_){_.EXPANDED="expanded",_.CROPPED="cropped",_.NOT_CROPPED="not_cropped"})(d||(e.ExpansionState=d={}));class p{static{this._options={description:"inlineChat/session/wholeRange"}}constructor(A,k){this._textModel=A,this._onDidChange=new y.Emitter,this.onDidChange=this._onDidChange.event,this._decorationIds=[],this._decorationIds=A.deltaDecorations([],[{range:k,options:p._options}])}dispose(){this._onDidChange.dispose(),this._textModel.isDisposed()||this._textModel.deltaDecorations(this._decorationIds,[])}trackEdits(A){const k=[];for(const L of A)k.push({range:L.range,options:p._options});this._decorationIds.push(...this._textModel.deltaDecorations([],k)),this._onDidChange.fire(this)}get value(){let A;for(const k of this._decorationIds){const L=this._textModel.getDecorationRange(k);L&&(A?A=T.Range.plusRange(A,L):A=L)}return A}}class c{constructor(A,k,L,R,M,N,P){this.editMode=A,this.editor=k,this.textModel0=L,this.textModelN=R,this.provider=M,this.session=N,this.wholeRange=P,this._isUnstashed=!1,this._exchange=[],this._startTime=new Date,this.textModelNAltVersion=R.getAlternativeVersionId(),this._teldata={extension:M.debugName,startTime:this._startTime.toISOString(),edits:!1,rounds:"",undos:"",editMode:A}}addInput(A){this._lastInput=A}get lastInput(){return this._lastInput}get isUnstashed(){return this._isUnstashed}markUnstashed(){this._isUnstashed=!0}get lastExpansionState(){return this._lastExpansionState}set lastExpansionState(A){this._lastExpansionState=A}get textModelNSnapshotAltVersion(){return this._textModelNSnapshotAltVersion}createSnapshot(){this._textModelNSnapshotAltVersion=this.textModelN.getAlternativeVersionId()}addExchange(A){this._isUnstashed=!1;const k=this._exchange.push(A);this._teldata.rounds+=`${k}|`}get exchanges(){return this._exchange}get lastExchange(){return this._exchange[this._exchange.length-1]}get lastTextModelChanges(){return this._lastTextModelChanges??[]}set lastTextModelChanges(A){this._lastTextModelChanges=A}get hasChangedText(){return!this.textModel0.equalsTextBuffer(this.textModelN.getTextBuffer())}asChangedText(){if(!this._lastTextModelChanges||this._lastTextModelChanges.length===0)return;let A=Number.MAX_VALUE,k=Number.MIN_VALUE;for(const L of this._lastTextModelChanges)A=Math.min(A,L.modifiedRange.startLineNumber),k=Math.max(k,L.modifiedRange.endLineNumberExclusive);return this.textModelN.getValueInRange(new T.Range(A,1,k,Number.MAX_VALUE))}recordExternalEditOccurred(A){this._teldata.edits=!0,this._teldata.finishedByEdit=A}asTelemetryData(){return{...this._teldata,endTime:new Date().toISOString()}}asRecording(){const A={session:this.session,when:this._startTime,exchanges:[]};for(const k of this._exchange){const L=k.response;(L instanceof E||L instanceof C)&&A.exchanges.push({prompt:k.prompt.value,res:L.raw})}return A}}e.Session=c;class l{constructor(A){this.value=A,this._attempt=0}get attempt(){return this._attempt}retry(){const A=new l(this.value);return A._attempt=this._attempt+1,A}}e.SessionPrompt=l;class n{constructor(A,k){this.prompt=A,this.response=k}}e.SessionExchange=n;class g{}e.EmptyResponse=g;class w{constructor(A){this.error=A,this.message=(0,s.toErrorMessage)(A,!1),this.isCancellation=(0,o.isCancellationError)(A)}}e.ErrorResponse=w;class E{constructor(A,k){this.localUri=A,this.raw=k}}e.MarkdownResponse=E;class C{constructor(A,k,L,R){if(this.modelAltVersionId=k,this.raw=L,this.allLocalEdits=[],this.workspaceEditsIncludeLocalEdits=!1,this.allLocalEdits.push(...R),L.type==="editorEdit")this.allLocalEdits.push(L.edits),this.singleCreateFileEdit=void 0,this.workspaceEdits=void 0;else{const M=b.ResourceEdit.convert(L.edits);this.workspaceEdits=M;let N=!1;const P=[];for(const x of M)x instanceof b.ResourceFileEdit?!N&&x.newResource&&!x.oldResource&&(this.singleCreateFileEdit?(N=!0,this.singleCreateFileEdit=void 0):(this.singleCreateFileEdit={uri:x.newResource,edits:[]},x.options.contents&&this.singleCreateFileEdit.edits.push(x.options.contents.then(F=>({range:new T.Range(1,1,1,1),text:F.toString()}))))):x instanceof b.ResourceTextEdit&&((0,t.isEqual)(x.resource,A)?(P.push(x.textEdit),this.workspaceEditsIncludeLocalEdits=!0):(0,t.isEqual)(this.singleCreateFileEdit?.uri,x.resource)?this.singleCreateFileEdit.edits.push(Promise.resolve(x.textEdit)):N=!0);P.length>0&&this.allLocalEdits.push(P),N&&(this.singleCreateFileEdit=void 0)}}}e.EditResponse=C,e.IInlineChatSessionService=(0,f.createDecorator)("IInlineChatSessionService");let I=class{constructor(A,k,L,R,M){this._inlineChatService=A,this._telemetryService=k,this._modelService=L,this._textModelService=R,this._logService=M,this._onWillStartSession=new y.Emitter,this.onWillStartSession=this._onWillStartSession.event,this._onDidEndSession=new y.Emitter,this.onDidEndSession=this._onDidEndSession.event,this._sessions=new Map,this._keyComputers=new Map,this._recordings=[]}dispose(){this._onWillStartSession.dispose(),this._onDidEndSession.dispose(),this._sessions.forEach(A=>A.store.dispose()),this._sessions.clear()}async createSession(A,k,L){const R=i.Iterable.first(this._inlineChatService.getAllProvider());if(!R){this._logService.trace("[IE] NO provider found");return}this._onWillStartSession.fire(A);const M=A.getModel(),N=A.getSelection();let P;try{P=await(0,u.raceCancellation)(Promise.resolve(R.prepareInlineChatSession(M,N,L)),L)}catch(H){this._logService.error("[IE] FAILED to prepare session",R.debugName),this._logService.error(H);return}if(!P){this._logService.trace("[IE] NO session",R.debugName);return}this._logService.trace("[IE] NEW session",R.debugName),this._logService.trace(`[IE] creating NEW session for ${A.getId()}, ${R.debugName}`);const x=new h.DisposableStore,F=await this._textModelService.createModelReference(M.uri);x.add(F);const V=this._modelService.createModel((0,a.createTextBufferFactoryFromSnapshot)(M.createSnapshot()),{languageId:M.getLanguageId(),onDidChange:y.Event.None},void 0,!0);x.add(V);let W=k.wholeRange;W||(W=P.wholeRange?T.Range.lift(P.wholeRange):A.getSelection()),W=new T.Range(W.startLineNumber,1,W.endLineNumber,M.getLineMaxColumn(W.endLineNumber));const z=new p(M,W);x.add(z);const B=new c(k.editMode,A,V,M,R,P,z),K=this._key(A,M.uri);if(this._sessions.has(K))throw x.dispose(),new Error(`Session already stored for ${K}`);return this._sessions.set(K,{session:B,store:x}),B}releaseSession(A){const{editor:k}=A;for(const[R,M]of this._sessions)if(M.session===A){M.store.dispose(),this._sessions.delete(R),this._logService.trace(`[IE] did RELEASED session for ${k.getId()}, ${A.provider.debugName}`);break}this._recordings.unshift(A.asRecording())>5&&this._recordings.pop(),this._telemetryService.publicLog2("interactiveEditor/session",A.asTelemetryData()),this._onDidEndSession.fire(k)}getSession(A,k){const L=this._key(A,k);return this._sessions.get(L)?.session}_key(A,k){const L=this._keyComputers.get(k.scheme);return L?L.getComparisonKey(A,k):`${A.getId()}@${k.toString()}`}registerSessionKeyComputer(A,k){return this._keyComputers.set(A,k),(0,h.toDisposable)(()=>this._keyComputers.delete(A))}recordings(){return this._recordings}};e.InlineChatSessionService=I,e.InlineChatSessionService=I=fe([O(0,D.IInlineChatService),O(1,v.ITelemetryService),O(2,m.IModelService),O(3,S.ITextModelService),O(4,r.ILogService)],I)}),define(Q[4021],Y([1,0,4,6,204,8,296]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineChatServiceImpl=void 0;let f=class{get onDidChangeProviders(){return this._onDidChangeProviders.event}constructor(m){this._entries=new b.LinkedList,this._onDidChangeProviders=new y.Emitter,this._ctxHasProvider=T.CTX_INLINE_CHAT_HAS_PROVIDER.bindTo(m)}addProvider(m){const S=this._entries.push(m);return this._ctxHasProvider.set(!0),this._onDidChangeProviders.fire(),(0,t.toDisposable)(()=>{S(),this._ctxHasProvider.set(this._entries.size>0),this._onDidChangeProviders.fire()})}getAllProvider(){return[...this._entries].reverse()}};e.InlineChatServiceImpl=f,e.InlineChatServiceImpl=f=fe([O(0,D.IContextKeyService)],f)}),define(Q[4022],Y([1,0,2884,56,16,212,45,3605,18]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),b.Registry.as(T.Extensions.Workbench).registerWorkbenchContribution(f.SashSettingsController,3),b.Registry.as(y.Extensions.Configuration).registerConfiguration({...D.workbenchConfigurationNodeBase,properties:{"workbench.sash.size":{type:"number",default:v.isIOS?20:4,minimum:1,maximum:20,description:(0,t.localize)(0,null)},"workbench.sash.hoverDelay":{type:"number",default:300,minimum:0,maximum:2e3,description:(0,t.localize)(1,null)}}})}),define(Q[4023],Y([1,0,31,32,110,2917,13,68,9,8,47,49,35,23,41,16,39,82,45,3613,1303,21,72,79,56,212,4,1834]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C){"use strict";var I;Object.defineProperty(e,"__esModule",{value:!0});const _=[T.MenuId.EditorContextShare,T.MenuId.SCMResourceContextShare,T.MenuId.OpenEditorsContextShare,T.MenuId.EditorTitleContextShare,T.MenuId.MenubarShare,T.MenuId.ExplorerContextShare];let A=class{static{I=this}static{this.SHARE_ENABLED_SETTING="workbench.experimental.share.enabled"}constructor(R,M){this.shareService=R,this.configurationService=M,this.configurationService.getValue(I.SHARE_ENABLED_SETTING)&&this.registerActions(),this.configurationService.onDidChangeConfiguration(N=>{if(N.affectsConfiguration(I.SHARE_ENABLED_SETTING)){const P=this.configurationService.getValue(I.SHARE_ENABLED_SETTING);P===!0&&this._disposables===void 0?this.registerActions():P===!1&&this._disposables!==void 0&&(this._disposables?.clear(),this._disposables=void 0)}})}registerActions(){this._disposables||(this._disposables=new C.DisposableStore),this._disposables.add((0,T.registerAction2)(class hn extends T.Action2{static{this.ID="workbench.action.share"}static{this.LABEL=(0,D.localize)(0,null)}constructor(){super({id:hn.ID,title:{value:hn.LABEL,original:"Share..."},f1:!0,icon:y.Codicon.linkExternal,precondition:m.ContextKeyExpr.and(p.ShareProviderCountContext.notEqualsTo(0),u.WorkspaceFolderCountContext.notEqualsTo(0)),keybinding:{weight:200,primary:2609},menu:[{id:T.MenuId.CommandCenter,order:1e3}]})}async run(N,...P){const x=N.get(c.IShareService),F=N.get(l.IEditorService)?.activeEditor,V=(F&&S.EditorResourceAccessor.getOriginalUri(F,{supportSideBySide:S.SideBySideEditor.PRIMARY}))??N.get(o.IWorkspaceContextService).getWorkspace().folders[0].uri,W=N.get(f.IClipboardService),z=N.get(h.IDialogService),B=N.get(i.IOpenerService),K=N.get(n.IProgressService),H=N.get(g.ICodeEditorService).getActiveCodeEditor()?.getSelection()??void 0,U=await K.withProgress({location:10,detail:(0,D.localize)(1,null)},async()=>x.provideShare({resourceUri:V,selection:H},new t.CancellationTokenSource().token));if(U){const G=U.toString(),$=typeof U=="string";await W.writeText(G),z.prompt({type:r.Severity.Info,message:$?(0,D.localize)(2,null):(0,D.localize)(3,null),custom:{icon:y.Codicon.check,markdownDetails:[{markdown:new b.MarkdownString(`<div aria-label='${G}'>${G}</div>`,{supportHtml:!0}),classes:[$?"share-dialog-input-text":"share-dialog-input-link"]}]},cancelButton:(0,D.localize)(4,null),buttons:$?[]:[{label:(0,D.localize)(5,null),run:()=>{B.open(U,{openExternal:!0})}}]})}}}));const R=this.shareService.getShareActions();for(const M of _)for(const N of R)this._disposables.add(T.MenuRegistry.appendMenuItem(M,N))}};A=I=fe([O(0,c.IShareService),O(1,v.IConfigurationService)],A),(0,a.registerSingleton)(c.IShareService,p.ShareService,1),s.Registry.as(d.Extensions.Workbench).registerWorkbenchContribution(A,4),s.Registry.as(w.Extensions.Configuration).registerConfiguration({...E.workbenchConfigurationNodeBase,properties:{"workbench.experimental.share.enabled":{type:"boolean",default:!1,tags:["experimental"],markdownDescription:(0,D.localize)(6,null,"`#window.commandCenter#`","`true`"),restricted:!1}}})}),define(Q[4024],Y([1,0,14,6,4,173,10,126,127]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemotePty=void 0;let m=class extends b.Disposable{constructor(h,a,r,i,s){super(),this.id=h,this.shouldPersist=a,this._remoteTerminalChannel=r,this._remoteAgentService=i,this._logService=s,this._properties={cwd:"",initialCwd:"",fixedDimensions:{cols:void 0,rows:void 0},title:"",shellType:void 0,hasChildProcesses:!0,resolvedShellLaunchConfig:{},overrideDimensions:void 0,failedShellIntegrationActivation:!1,usedShellIntegrationInjection:void 0},this._lastDimensions={cols:-1,rows:-1},this._inReplay=!1,this._onProcessData=this._register(new y.Emitter),this.onProcessData=this._onProcessData.event,this._onProcessReplayComplete=this._register(new y.Emitter),this.onProcessReplayComplete=this._onProcessReplayComplete.event,this._onProcessReady=this._register(new y.Emitter),this.onProcessReady=this._onProcessReady.event,this._onDidChangeProperty=this._register(new y.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._onProcessExit=this._register(new y.Emitter),this.onProcessExit=this._onProcessExit.event,this._onRestoreCommands=this._register(new y.Emitter),this.onRestoreCommands=this._onRestoreCommands.event,this._startBarrier=new t.Barrier}async start(){if(!await this._remoteAgentService.getEnvironment())throw new Error("Could not fetch remote environment");this._logService.trace("Spawning remote agent process",{terminalId:this.id});const a=await this._remoteTerminalChannel.start(this.id);return a&&"message"in a||this._startBarrier.open(),a}async detach(h){return await this._startBarrier.wait(),this._remoteTerminalChannel.detachFromProcess(this.id,h)}shutdown(h){this._startBarrier.wait().then(a=>{this._remoteTerminalChannel.shutdown(this.id,h)})}input(h){this._inReplay||this._startBarrier.wait().then(a=>{this._remoteTerminalChannel.input(this.id,h)})}resize(h,a){this._inReplay||this._lastDimensions.cols===h&&this._lastDimensions.rows===a||this._startBarrier.wait().then(r=>{this._lastDimensions.cols=h,this._lastDimensions.rows=a,this._remoteTerminalChannel.resize(this.id,h,a)})}async clearBuffer(){await this._remoteTerminalChannel.clearBuffer(this.id)}freePortKillProcess(h){if(!this._remoteTerminalChannel.freePortKillProcess)throw new Error("freePortKillProcess does not exist on the local pty service");return this._remoteTerminalChannel.freePortKillProcess(h)}acknowledgeDataEvent(h){this._inReplay||this._startBarrier.wait().then(a=>{this._remoteTerminalChannel.acknowledgeDataEvent(this.id,h)})}async setUnicodeVersion(h){return this._remoteTerminalChannel.setUnicodeVersion(this.id,h)}async getInitialCwd(){return this._properties.initialCwd}async getCwd(){return this._properties.cwd||this._properties.initialCwd}async refreshProperty(h){return this._remoteTerminalChannel.refreshProperty(this.id,h)}async updateProperty(h,a){return this._remoteTerminalChannel.updateProperty(this.id,h,a)}handleData(h){this._onProcessData.fire(h)}handleExit(h){this._onProcessExit.fire(h)}processBinary(h){return this._remoteTerminalChannel.processBinary(this.id,h)}handleReady(h){this._onProcessReady.fire(h)}handleDidChangeProperty({type:h,value:a}){switch(h){case"cwd":this._properties.cwd=a;break;case"initialCwd":this._properties.initialCwd=a;break;case"resolvedShellLaunchConfig":a.cwd&&typeof a.cwd!="string"&&(a.cwd=T.URI.revive(a.cwd))}this._onDidChangeProperty.fire({type:h,value:a})}async handleReplay(h){(0,D.mark)(`code/terminal/willHandleReplay/${this.id}`);try{this._inReplay=!0;for(const a of h.events){(a.cols!==0||a.rows!==0)&&this._onDidChangeProperty.fire({type:"overrideDimensions",value:{cols:a.cols,rows:a.rows,forceExactSize:!0}});const r={data:a.data,trackCommit:!0};this._onProcessData.fire(r),await r.writePromise}}finally{this._inReplay=!1}h.commands&&this._onRestoreCommands.fire(h.commands),this._onDidChangeProperty.fire({type:"overrideDimensions",value:void 0}),(0,D.mark)(`code/terminal/didHandleReplay/${this.id}`),this._onProcessReplayComplete.fire()}handleOrphanQuestion(){this._remoteTerminalChannel.orphanQuestionReply(this.id)}};e.RemotePty=m,e.RemotePty=m=fe([O(3,v.IRemoteAgentService),O(4,f.ITerminalLogService)],m)}),define(Q[4025],Y([1,0,22,261,9,39,268,254,18,126,158,55,32,77,127,102,37,10,20,42,703,119]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserTerminalProfileResolverService=e.BaseTerminalProfileResolverService=void 0;const n="Generated";class g{get defaultProfileName(){return this._defaultProfileName}constructor(C,I,_,A,k,L,R,M){this._context=C,this._configurationService=I,this._configurationResolverService=_,this._historyService=A,this._logService=k,this._terminalProfileService=L,this._workspaceContextService=R,this._remoteAgentService=M,this._iconRegistry=(0,r.getIconRegistry)(),this._remoteAgentService.getConnection()?this._remoteAgentService.getEnvironment().then(N=>this._primaryBackendOs=N?.os||v.OS):this._primaryBackendOs=v.OS,this._configurationService.onDidChangeConfiguration(N=>{(N.affectsConfiguration("terminal.integrated.defaultProfile.windows")||N.affectsConfiguration("terminal.integrated.defaultProfile.osx")||N.affectsConfiguration("terminal.integrated.defaultProfile.linux"))&&this._refreshDefaultProfileName()}),this._terminalProfileService.onDidChangeAvailableProfiles(()=>this._refreshDefaultProfileName())}async _refreshDefaultProfileName(){this._primaryBackendOs&&(this._defaultProfileName=(await this.getDefaultProfile({remoteAuthority:this._remoteAgentService.getConnection()?.remoteAuthority,os:this._primaryBackendOs}))?.profileName)}resolveIcon(C,I){if(C.icon){C.icon=this._getCustomIcon(C.icon)||this.getDefaultIcon();return}if(C.customPtyImplementation){C.icon=this.getDefaultIcon();return}if(C.executable)return;const _=this._getUnresolvedRealDefaultProfile(I);_&&(C.icon=_.icon),C.icon||(C.icon=this.getDefaultIcon())}getDefaultIcon(C){return this._iconRegistry.getIcon(this._configurationService.getValue("terminal.integrated.tabs.defaultIcon",{resource:C}))||a.Codicon.terminal}async resolveShellLaunchConfig(C,I){let _;C.executable?_=await this._resolveProfile({path:C.executable,args:C.args,profileName:n,isDefault:!1},I):_=await this.getDefaultProfile(I),C.executable=_.path,C.args=_.args,_.env&&(C.env?C.env={...C.env,..._.env}:C.env=_.env);const A=C===void 0||typeof C.cwd=="string"?void 0:C.cwd;C.icon=this._getCustomIcon(C.icon)||this._getCustomIcon(_.icon)||this.getDefaultIcon(A),_.overrideName&&(C.name=_.profileName),C.color=C.color||_.color||this._configurationService.getValue("terminal.integrated.tabs.defaultColor",{resource:A}),C.useShellEnvironment===void 0&&(C.useShellEnvironment=this._configurationService.getValue("terminal.integrated.inheritEnv"))}async getDefaultShell(C){return(await this.getDefaultProfile(C)).path}async getDefaultShellArgs(C){return(await this.getDefaultProfile(C)).args||[]}async getDefaultProfile(C){return this._resolveProfile(await this._getUnresolvedDefaultProfile(C),C)}getEnvironment(C){return this._context.getEnvironment(C)}_getCustomIcon(C){if(C){if(typeof C=="string")return o.ThemeIcon.fromId(C);if(o.ThemeIcon.isThemeIcon(C))return C;if(u.URI.isUri(C)||(0,c.isUriComponents)(C))return u.URI.revive(C);if(typeof C=="object"&&"light"in C&&"dark"in C){const I=C;if((u.URI.isUri(I.light)||(0,c.isUriComponents)(I.light))&&(u.URI.isUri(I.dark)||(0,c.isUriComponents)(I.dark)))return{light:u.URI.revive(I.light),dark:u.URI.revive(I.dark)}}}}async _getUnresolvedDefaultProfile(C){if(C.allowAutomationShell){const _=this._getUnresolvedAutomationShellProfile(C);if(_)return _}await this._terminalProfileService.profilesReady;const I=this._getUnresolvedRealDefaultProfile(C.os);return I?this._setIconForAutomation(C,I):this._setIconForAutomation(C,await this._getUnresolvedFallbackDefaultProfile(C))}_setIconForAutomation(C,I){if(C.allowAutomationShell){const _=(0,p.deepClone)(I);return _.icon=a.Codicon.tools,_}return I}_getUnresolvedRealDefaultProfile(C){return this._terminalProfileService.getDefaultProfile(C)}async _getUnresolvedFallbackDefaultProfile(C){const I=await this._context.getDefaultSystemShell(C.remoteAuthority,C.os);if(C.os===v.OS){let k=this._terminalProfileService.availableProfiles.find(L=>h.parse(L.path).name===h.parse(I).name);if(k)return C.allowAutomationShell&&(k=(0,p.deepClone)(k),k.icon=a.Codicon.tools),k}let _;C.os===2&&h.parse(I).name.match(/(zsh|bash)/)?_=["--login"]:_=[];const A=this._guessProfileIcon(I);return{profileName:n,path:I,args:_,icon:A,isDefault:!1}}_getUnresolvedAutomationShellProfile(C){const I=this._configurationService.getValue(`terminal.integrated.automationProfile.${this._getOsKey(C.os)}`);if(this._isValidAutomationProfile(I,C.os))return I.icon=this._getCustomIcon(I.icon)||a.Codicon.tools,I}async _resolveProfile(C,I){const _=await this._context.getEnvironment(I.remoteAuthority);if(I.os===1){const L=!!_.hasOwnProperty("PROCESSOR_ARCHITEW6432"),R=_.windir;if(!L&&R){const M=h.join(R,"Sysnative").replace(/\//g,"\\").toLowerCase();C.path&&C.path.toLowerCase().indexOf(M)===0&&(C.path=h.join(R,"System32",C.path.substr(M.length+1)))}C.path&&(C.path=C.path.replace(/\//g,"\\"))}const A=this._historyService.getLastActiveWorkspaceRoot(I.remoteAuthority?t.Schemas.vscodeRemote:t.Schemas.file),k=A?this._workspaceContextService.getWorkspaceFolder(A)??void 0:void 0;return C.path=await this._resolveVariables(C.path,_,k),C.args&&(typeof C.args=="string"?C.args=await this._resolveVariables(C.args,_,k):C.args=await Promise.all(C.args.map(L=>this._resolveVariables(L,_,k)))),C}async _resolveVariables(C,I,_){try{C=await this._configurationResolverService.resolveWithEnvironment(I,_,C)}catch(A){this._logService.error("Could not resolve shell",A)}return C}_getOsKey(C){switch(C){case 3:return"linux";case 2:return"osx";case 1:return"windows"}}_guessProfileIcon(C){switch(h.parse(C).name){case"bash":return a.Codicon.terminalBash;case"pwsh":case"powershell":return a.Codicon.terminalPowershell;case"tmux":return a.Codicon.terminalTmux;case"cmd":return a.Codicon.terminalCmd;default:return}}_isValidShellArgs(C,I){return!!(C===void 0||I===1&&typeof C=="string"||Array.isArray(C)&&C.every(_=>typeof _=="string"))}async createProfileFromShellAndShellArgs(C,I){const _=this._terminalProfileService.availableProfiles?.find(M=>M.path!==C?!1:M.args===void 0||typeof M.args=="string"?M.args===I:M.path===C&&(0,d.equals)(M.args,I||[])),A=await this.getDefaultProfile({remoteAuthority:this._remoteAgentService.getConnection()?.remoteAuthority,os:this._primaryBackendOs});A.profileName=`${A.path} (migrated)`;const k=_||A,L=this._isValidShellArgs(I,this._primaryBackendOs)?I:k.args,R={profileName:k.profileName,path:k.path,args:L,isDefault:!0};return _&&_.profileName===R.profileName&&_.path===R.path&&(0,c.terminalProfileArgsMatch)(_.args,R.args)?_.profileName:R}_isValidAutomationProfile(C,I){return C==null||typeof C!="object"?!1:"path"in C&&typeof C.path=="string"}}e.BaseTerminalProfileResolverService=g,fe([(0,s.debounce)(200)],g.prototype,"_refreshDefaultProfileName",null);let w=class extends g{constructor(C,I,_,A,k,L,R,M){super({getDefaultSystemShell:async(N,P)=>{const x=await k.getBackend(N);return!N||!x?P===1?"pwsh":"bash":x.getDefaultSystemShell(P)},getEnvironment:async N=>{const P=await k.getBackend(N);return!N||!P?y.env:P.getEnvironment()}},I,C,_,A,L,R,M)}};e.BrowserTerminalProfileResolverService=w,e.BrowserTerminalProfileResolverService=w=fe([O(0,T.IConfigurationResolverService),O(1,b.IConfigurationService),O(2,f.IHistoryService),O(3,m.ITerminalLogService),O(4,l.ITerminalInstanceService),O(5,S.ITerminalProfileService),O(6,D.IWorkspaceContextService),O(7,i.IRemoteAgentService)],w)}),define(Q[974],Y([1,0,261,4,69,9,25,5,24,10,127,22,18,55]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeFishHistoryCmd=e.fetchFishHistory=e.fetchPwshHistory=e.fetchZshHistory=e.fetchBashHistory=e.TerminalPersistedHistory=e.clearShellFileHistory=e.getShellFileHistory=e.getDirectoryHistory=e.getCommandHistory=void 0;var i;(function(L){L[L.DefaultHistoryLimit=100]="DefaultHistoryLimit"})(i||(i={}));var s;(function(L){L.Entries="terminal.history.entries",L.Timestamp="terminal.history.timestamp"})(s||(s={}));let o;function u(L){return o||(o=L.get(f.IInstantiationService).createInstance(g,"commands")),o}e.getCommandHistory=u;let d;function p(L){return d||(d=L.get(f.IInstantiationService).createInstance(g,"dirs")),d}e.getDirectoryHistory=p;const c=new Map;async function l(L,R){const M=c.get(R);if(M===null)return[];if(M!==void 0)return M;let N;switch(R){case"bash":N=await w(L);break;case"pwsh":N=await C(L);break;case"zsh":N=await E(L);break;case"fish":N=await I(L);break;default:return[]}if(N===void 0)return c.set(R,null),[];const P=Array.from(N);return c.set(R,P),P}e.getShellFileHistory=l;function n(){c.clear()}e.clearShellFileHistory=n;let g=class extends y.Disposable{get entries(){return this._ensureUpToDate(),this._entries.entries()}constructor(R,M,N){super(),this._storageDataKey=R,this._configurationService=M,this._storageService=N,this._timestamp=0,this._isReady=!1,this._isStale=!0,this._entries=new b.LRUCache(this._getHistoryLimit()),this._register(this._configurationService.onDidChangeConfiguration(P=>{P.affectsConfiguration("terminal.integrated.shellIntegration.history")&&(this._entries.limit=this._getHistoryLimit())})),this._register(this._storageService.onDidChangeValue(-1,this._getTimestampStorageKey(),this._register(new y.DisposableStore))(()=>{this._isStale||(this._isStale=this._storageService.getNumber(this._getTimestampStorageKey(),-1,0)!==this._timestamp)}))}add(R,M){this._ensureUpToDate(),this._entries.set(R,M),this._saveState()}remove(R){this._ensureUpToDate(),this._entries.delete(R),this._saveState()}clear(){this._ensureUpToDate(),this._entries.clear(),this._saveState()}_ensureUpToDate(){this._isReady||(this._loadState(),this._isReady=!0),this._isStale&&(this._entries.clear(),this._loadState(),this._isStale=!1)}_loadState(){this._timestamp=this._storageService.getNumber(this._getTimestampStorageKey(),-1,0);const R=this._loadPersistedState();if(R)for(const M of R.entries)this._entries.set(M.key,M.value)}_loadPersistedState(){const R=this._storageService.get(this._getEntriesStorageKey(),-1);if(R===void 0||R.length===0)return;let M;try{M=JSON.parse(R)}catch{return}return M}_saveState(){const R={entries:[]};this._entries.forEach((M,N)=>R.entries.push({key:N,value:M})),this._storageService.store(this._getEntriesStorageKey(),JSON.stringify(R),-1,1),this._timestamp=Date.now(),this._storageService.store(this._getTimestampStorageKey(),this._timestamp,-1,1)}_getHistoryLimit(){const R=this._configurationService.getValue("terminal.integrated.shellIntegration.history");return typeof R=="number"?R:100}_getTimestampStorageKey(){return`terminal.history.timestamp.${this._storageDataKey}`}_getEntriesStorageKey(){return`terminal.history.entries.${this._storageDataKey}`}};e.TerminalPersistedHistory=g,e.TerminalPersistedHistory=g=fe([O(1,D.IConfigurationService),O(2,v.IStorageService)],g);async function w(L){const R=L.get(T.IFileService),M=L.get(S.IRemoteAgentService),N=await M.getEnvironment();if(N?.os===1||!N&&a.isWindows)return;const P=await k(t.env.HOME,".bash_history",!1,R,M);if(P===void 0)return;const x=P.split(` `),F=new Set;let V,W,z;for(let B=0;B<x.length;B++){V=x[B],W===void 0?W=V:W+=` ${V}`;for(let K=0;K<V.length;K++)z?V[K]===z&&(z=void 0):V[K].match(/['"]/)&&(z=V[K]);z===void 0&&(W.length>0&&F.add(W.trim()),W=void 0)}return F.values()}e.fetchBashHistory=w;async function E(L){const R=L.get(T.IFileService),M=L.get(S.IRemoteAgentService),N=await M.getEnvironment();if(N?.os===1||!N&&a.isWindows)return;const P=await k(t.env.HOME,".zsh_history",!1,R,M);if(P===void 0)return;const x=P.split(/\:\s\d+\:\d+;/),F=new Set;for(let V=0;V<x.length;V++){const W=x[V].replace(/\\\n/g,` `).trim();W.length>0&&F.add(W)}return F.values()}e.fetchZshHistory=E;async function C(L){const R=L.get(T.IFileService),M=L.get(S.IRemoteAgentService);let N,P;const x=await M.getEnvironment(),F=x?.os===1||!x&&a.isWindows;F?(N=t.env.APPDATA,P="\\Microsoft\\Windows\\PowerShell\\PSReadLine\\ConsoleHost_history.txt"):(N=t.env.HOME,P=".local/share/powershell/PSReadline/ConsoleHost_history.txt");const V=await k(N,P,F,R,M);if(V===void 0)return;const W=V.split(` `),z=new Set;let B,K,H;for(let U=0;U<W.length;U++){if(B=W[U],K===void 0?K=B:K+=` ${B}`,!B.endsWith("`")){const G=K.trim();G.length>0&&z.add(G),K=void 0;continue}for(let G=0;G<B.length;G++)H?B[G]===H&&(H=void 0):B[G].match(/`/)&&(H=B[G]);if(H)K=K.replace(/`$/,""),H=void 0;else{const G=K.trim();G.length>0&&z.add(G),K=void 0}}return z.values()}e.fetchPwshHistory=C;async function I(L){const R=L.get(T.IFileService),M=L.get(S.IRemoteAgentService),N=await M.getEnvironment();if(N?.os===1||!N&&a.isWindows)return;const x=await(t.env.XDG_DATA_HOME?k(t.env.XDG_DATA_HOME,"fish/fish_history",!1,R,M):k(t.env.HOME,".local/share/fish/fish_history",!1,R,M));if(x===void 0)return;const F=new Set,V=x.split(` `).filter(W=>W.startsWith("- cmd:")).map(W=>W.substring(6).trimStart());for(let W=0;W<V.length;W++){const z=_(V[W]).trim();z.length>0&&F.add(z)}return F.values()}e.fetchFishHistory=I;function _(L){return A(/(^|[^\\])((?:\\\\)*)(\\n)/g,L,`$1$2 `)}e.sanitizeFishHistoryCmd=_;function A(L,R,M){let N,P=R;for(;;)if(N=P,P=P.replace(L,M),P===N)return P}async function k(L,R,M,N,P){if(!L)return;const x=!!P.getConnection()?.remoteAuthority,F=m.URI.from({scheme:x?h.Schemas.vscodeRemote:h.Schemas.file,path:(M?r.win32.join:r.posix.join)(L,R)});let V;try{V=await N.readFile(F)}catch(W){if(W instanceof T.FileOperationError&&W.fileOperationResult===1)return;throw W}if(V!==void 0)return V.value.toString()}}),define(Q[4026],Y([1,0,273,18,57,75,2962,5,43,884,36,37,532,974,422,10,260,21,1166,24]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.showRunRecentQuickPick=void 0;async function l(g,w,E,C,I,_){if(!w.xterm)return;const A=g.get(u.IEditorService),k=g.get(f.IInstantiationService),L=g.get(v.IQuickInputService),R=g.get(p.IStorageService),M=`terminal.pinnedRecentCommands.${w.shellType}`;let N,P=[];const x=new Set,F={iconClass:h.ThemeIcon.asClassName(a.commandHistoryRemoveIcon),tooltip:(0,T.localize)(0,null)},V={iconClass:h.ThemeIcon.asClassName(a.commandHistoryOutputIcon),tooltip:(0,T.localize)(1,null),alwaysVisible:!1};if(C==="command"){let $=function(X){return X.replace(/\r?\n/g,"\u23CE").replace(/\s\s\s+/g,"\u22EF")};N=y.isMacintosh?(0,T.localize)(2,null):(0,T.localize)(3,null);const H=w.capabilities.get(2),U=H?.commands,G=H?.executingCommand;if(G&&x.add(G),U&&U.length>0){for(const X of U){const te=X.command.trim();if(te.length===0||x.has(te))continue;let Z=(0,m.collapseTildePath)(X.cwd,w.userHome,w.os===1?"\\":"/");X.exitCode&&(X.exitCode===-1?Z+=" failed":Z+=` exitCode: ${X.exitCode}`),Z=Z.trim();const se=[V],re=P.length>0?P[P.length-1]:void 0;if(re?.type!=="separator"&&re?.label===te){re.id=X.timestamp.toString(),re.description=Z;continue}P.push({label:$(te),rawLabel:te,description:Z,id:X.timestamp.toString(),command:X,buttons:X.hasOutput()?se:void 0}),x.add(te)}P=P.reverse()}G&&P.unshift({label:$(G),rawLabel:G,description:H.cwd}),P.length>0&&P.unshift({type:"separator",label:i.terminalStrings.currentSessionCategory});const ie=k.invokeFunction(r.getCommandHistory),J=[];for(const[X,te]of ie.entries)!x.has(X)&&te.shellType===w.shellType&&(J.unshift({label:$(X),rawLabel:X,buttons:[F]}),x.add(X));J.length>0&&P.push({type:"separator",label:i.terminalStrings.previousSessionCategory},...J);const j=await k.invokeFunction(r.getShellFileHistory,w.shellType),ee=[];for(const X of j)x.has(X)||ee.unshift({label:$(X),rawLabel:X});ee.length>0&&P.push({type:"separator",label:(0,T.localize)(4,null,w.shellType)},...ee)}else{N=y.isMacintosh?(0,T.localize)(5,null):(0,T.localize)(6,null);const H=w.capabilities.get(0)?.cwds||[];if(H&&H.length>0){for(const $ of H)P.push({label:$,rawLabel:$});P=P.reverse(),P.unshift({type:"separator",label:i.terminalStrings.currentSessionCategory})}const U=k.invokeFunction(r.getDirectoryHistory),G=[];for(const[$,ie]of U.entries)(ie===null||ie.remoteAuthority===w.remoteAuthority)&&!H.includes($)&&G.unshift({label:$,rawLabel:$,buttons:[F]});G.length>0&&P.push({type:"separator",label:i.terminalStrings.previousSessionCategory},...G)}if(P.length===0)return;const W=new t.Toggle({title:"Fuzzy search",icon:a.commandHistoryFuzzySearchIcon,isChecked:I==="fuzzy",inputActiveOptionBorder:(0,S.asCssVariable)(S.inputActiveOptionBorder),inputActiveOptionForeground:(0,S.asCssVariable)(S.inputActiveOptionForeground),inputActiveOptionBackground:(0,S.asCssVariable)(S.inputActiveOptionBackground)});W.onChange(()=>{k.invokeFunction(l,w,E,C,W.checked?"fuzzy":"contiguous",B.value)});const z=k.createInstance(n),B=L.createQuickPick(),K=P;return B.items=[...K],B.sortByLabel=!1,B.placeholder=N,B.matchOnLabelMode=I||"contiguous",B.toggles=[W],B.onDidTriggerItemButton(async H=>{if(H.button===F)C==="command"?k.invokeFunction(r.getCommandHistory)?.remove(H.item.label):k.invokeFunction(r.getDirectoryHistory)?.remove(H.item.label);else if(H.button===V){const U=H.item.command,G=U?.getOutput();if(G&&U?.command){const $=await z.provideTextContent(s.URI.from({scheme:n.scheme,path:`${U.command}... ${(0,o.fromNow)(U.timestamp,!0)}`,fragment:G,query:`terminal-output-${U.timestamp}-${w.instanceId}`}));$&&await A.openEditor({resource:$.uri})}}await k.invokeFunction(l,w,E,C,I,_)}),B.onDidChangeValue(async H=>{H||await k.invokeFunction(l,w,E,C,I,H)}),B.onDidAccept(async()=>{const H=B.activeItems[0];let U;C==="cwd"?U=`cd ${await w.preparePathForShell(H.rawLabel)}`:U=H.rawLabel,B.hide(),w.runCommand(U,!B.keyMods.alt),B.keyMods.alt&&w.focus()}),_&&(B.value=_),new Promise(H=>{E.set(!0),(0,d.showWithPinnedItems)(R,M,B,!0),B.onDidHide(()=>{E.set(!1),H()})})}e.showRunRecentQuickPick=l;let n=class{static{c=this}static{this.scheme="TERMINAL_OUTPUT"}constructor(w,E){this._modelService=E,w.registerTextModelContentProvider(c.scheme,this)}async provideTextContent(w){const E=this._modelService.getModel(w);return E&&!E.isDisposed()?E:this._modelService.createModel(w.fragment,null,w,!1)}};n=c=fe([O(0,D.ITextModelService),O(1,b.IModelService)],n)}),define(Q[4027],Y([1,0,15,9,126,39,119,4025,158,268,254,127]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronTerminalProfileResolverService=void 0;let a=class extends f.BaseTerminalProfileResolverService{constructor(i,s,o,u,d,p,c,l){super({getDefaultSystemShell:async(n,g)=>{const w=await l.getBackend(n);if(!w)throw new t.ErrorNoTelemetry(`Cannot get default system shell when there is no backend for remote authority '${n}'`);return w.getDefaultSystemShell(g)},getEnvironment:async n=>{const g=await l.getBackend(n);if(!g)throw new t.ErrorNoTelemetry(`Cannot get environment when there is no backend for remote authority '${n}'`);return g.getEnvironment()}},s,i,o,u,p,d,c)}};e.ElectronTerminalProfileResolverService=a,e.ElectronTerminalProfileResolverService=a=fe([O(0,m.IConfigurationResolverService),O(1,y.IConfigurationService),O(2,S.IHistoryService),O(3,b.ITerminalLogService),O(4,D.IWorkspaceContextService),O(5,v.ITerminalProfileService),O(6,h.IRemoteAgentService),O(7,T.ITerminalInstanceService)],a)}),define(Q[477],Y([1,0,3052,5,191,30,24,35,9,52,16,3297,212,56]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchAssignmentService=e.IWorkbenchAssignmentService=void 0,e.IWorkbenchAssignmentService=(0,y.createDecorator)("WorkbenchAssignmentService");class i{constructor(p){this.memento=p,this.mementoObj=p.getMemento(-1,1)}async getValue(p,c){return await this.mementoObj[p]||c}setValue(p,c){this.mementoObj[p]=c,this.memento.saveMemento()}}class s{constructor(p,c){this.telemetryService=p,this.productService=c}get assignmentContext(){return this._lastAssignmentContext?.split(";")}setSharedProperty(p,c){p===this.productService.tasConfig?.assignmentContextTelemetryPropertyName&&(this._lastAssignmentContext=c),this.telemetryService.setExperimentProperty(p,c)}postEvent(p,c){const l={};for(const[n,g]of c.entries())l[n]=g;this.telemetryService.publicLog(p,l)}}let o=class extends h.BaseAssignmentService{constructor(p,c,l,n){super(p.machineId,l,n,new s(p,n),new i(new b.Memento("experiment.service.memento",c))),this.telemetryService=p}get experimentsEnabled(){return this.configurationService.getValue("workbench.enableExperiments")===!0}async getTreatment(p){const c=await super.getTreatment(p);return this.telemetryService.publicLog2("tasClientReadTreatmentComplete",{treatmentName:p,treatmentValue:JSON.stringify(c)}),c}async getCurrentExperiments(){if(this.tasClient&&this.experimentsEnabled)return await this.tasClient,this.telemetry?.assignmentContext}};e.WorkbenchAssignmentService=o,e.WorkbenchAssignmentService=o=fe([O(0,D.ITelemetryService),O(1,T.IStorageService),O(2,v.IConfigurationService),O(3,m.IProductService)],o),(0,f.registerSingleton)(e.IWorkbenchAssignmentService,o,1),S.Registry.as(r.Extensions.Configuration).registerConfiguration({...a.workbenchConfigurationNodeBase,properties:{"workbench.enableExperiments":{type:"boolean",description:(0,t.localize)(0,null),default:!0,scope:1,restricted:!0,tags:["usesOnlineServices"]}}})}),define(Q[4028],Y([1,0,4,16,2808,13,9,71,477,45]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookProfileContribution=e.NotebookProfileType=void 0;var S;(function(o){o.default="default",o.jupyter="jupyter",o.colab="colab"})(S||(e.NotebookProfileType=S={}));const h={[S.default]:{[f.NotebookSetting.focusIndicator]:"gutter",[f.NotebookSetting.insertToolbarLocation]:"both",[f.NotebookSetting.globalToolbar]:!0,[f.NotebookSetting.cellToolbarLocation]:{default:"right"},[f.NotebookSetting.compactView]:!0,[f.NotebookSetting.showCellStatusBar]:"visible",[f.NotebookSetting.consolidatedRunButton]:!0,[f.NotebookSetting.undoRedoPerCell]:!1},[S.jupyter]:{[f.NotebookSetting.focusIndicator]:"gutter",[f.NotebookSetting.insertToolbarLocation]:"notebookToolbar",[f.NotebookSetting.globalToolbar]:!0,[f.NotebookSetting.cellToolbarLocation]:{default:"left"},[f.NotebookSetting.compactView]:!0,[f.NotebookSetting.showCellStatusBar]:"visible",[f.NotebookSetting.consolidatedRunButton]:!1,[f.NotebookSetting.undoRedoPerCell]:!0},[S.colab]:{[f.NotebookSetting.focusIndicator]:"border",[f.NotebookSetting.insertToolbarLocation]:"betweenCells",[f.NotebookSetting.globalToolbar]:!1,[f.NotebookSetting.cellToolbarLocation]:{default:"right"},[f.NotebookSetting.compactView]:!1,[f.NotebookSetting.showCellStatusBar]:"hidden",[f.NotebookSetting.consolidatedRunButton]:!0,[f.NotebookSetting.undoRedoPerCell]:!1}};async function a(o,u){const d=[];for(const p in u)d.push(o.updateValue(p,u[p]));await Promise.all(d)}(0,D.registerAction2)(class extends D.Action2{constructor(){super({id:"notebook.setProfile",title:(0,b.localize)(0,null)})}async run(o,u){if(!r(u))return;const d=o.get(T.IConfigurationService);return a(d,h[u.profile])}});function r(o){const u=o;return u.profile===S.colab||u.profile===S.default||u.profile===S.jupyter}let i=class extends t.Disposable{constructor(u,d){super(),this.experimentService=d,this.experimentService&&this.experimentService.getTreatment("notebookprofile").then(p=>{if(p!==void 0){const c=u.getValue(f.NotebookSetting.focusIndicator),l=u.getValue(f.NotebookSetting.insertToolbarLocation),n=u.getValue(f.NotebookSetting.globalToolbar),g=u.getValue(f.NotebookSetting.compactView),w=u.getValue(f.NotebookSetting.showCellStatusBar),E=u.getValue(f.NotebookSetting.consolidatedRunButton);c==="border"&&l==="both"&&n===!1&&g===!0&&w==="visible"&&E===!0&&a(u,h[p]??h[S.default])}})}};e.NotebookProfileContribution=i,e.NotebookProfileContribution=i=fe([O(0,T.IConfigurationService),O(1,v.IWorkbenchAssignmentService)],i),y.Registry.as(m.Extensions.Workbench).registerWorkbenchContribution(i,2)}),define(Q[4029],Y([1,0,7,162,344,34,6,4,88,13,9,29,5,38,224,71,1387,610,21,477,14,221]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.workbenchDynamicCalculateActions=e.workbenchCalculateActions=e.NotebookEditorWorkbenchToolbar=e.convertConfiguration=e.RenderLabel=void 0;var n;(function(N){N[N.Always=0]="Always",N[N.Never=1]="Never",N[N.Dynamic=2]="Dynamic"})(n||(e.RenderLabel=n={}));function g(N){switch(N){case!0:return n.Always;case!1:return n.Never;case"always":return n.Always;case"never":return n.Never;case"dynamic":return n.Dynamic}}e.convertConfiguration=g;const w=21,E=21,C=8;class I{constructor(P,x,F){this.notebookEditor=P,this.editorToolbar=x,this.instantiationService=F}actionProvider(P){return P.id===i.SELECT_KERNEL_ID?this.instantiationService.createInstance(o.NotebooKernelActionViewItem,P,this.notebookEditor):P instanceof m.MenuItemAction?this.instantiationService.createInstance(u.ActionViewWithLabel,P,void 0):void 0}calculateActions(P){const x=this.editorToolbar.primaryActions,F=this.editorToolbar.secondaryActions,V=L(x,F,P);return{primaryActions:V.primaryActions.map(W=>W.action),secondaryActions:V.secondaryActions}}}class _{constructor(P,x,F){this.notebookEditor=P,this.editorToolbar=x,this.instantiationService=F}actionProvider(P){return P.id===i.SELECT_KERNEL_ID?this.instantiationService.createInstance(o.NotebooKernelActionViewItem,P,this.notebookEditor):P instanceof m.MenuItemAction?this.instantiationService.createInstance(v.MenuEntryActionViewItem,P,void 0):void 0}calculateActions(P){const x=this.editorToolbar.primaryActions,F=this.editorToolbar.secondaryActions,V=L(x,F,P);return{primaryActions:V.primaryActions.map(W=>W.action),secondaryActions:V.secondaryActions}}}class A{constructor(P,x,F){this.notebookEditor=P,this.editorToolbar=x,this.instantiationService=F}actionProvider(P){if(P.id===i.SELECT_KERNEL_ID)return this.instantiationService.createInstance(o.NotebooKernelActionViewItem,P,this.notebookEditor);const x=this.editorToolbar.primaryActions.find(F=>F.action.id===P.id);return!x||x.renderLabel?P instanceof m.MenuItemAction?this.instantiationService.createInstance(u.ActionViewWithLabel,P,void 0):void 0:P instanceof m.MenuItemAction?this.instantiationService.createInstance(v.MenuEntryActionViewItem,P,void 0):void 0}calculateActions(P){const x=this.editorToolbar.primaryActions,F=this.editorToolbar.secondaryActions,V=R(x,F,P);return{primaryActions:V.primaryActions.map(W=>W.action),secondaryActions:V.secondaryActions}}}let k=class extends f.Disposable{get primaryActions(){return this._primaryActions}get secondaryActions(){return this._secondaryActions}set visible(P){this._visible!==P&&(this._visible=P,this._onDidChangeVisibility.fire(P))}get useGlobalToolbar(){return this._useGlobalToolbar}constructor(P,x,F,V,W,z,B,K,H,U,G){super(),this.notebookEditor=P,this.contextKeyService=x,this.notebookOptions=F,this.domNode=V,this.instantiationService=W,this.configurationService=z,this.contextMenuService=B,this.menuService=K,this.editorService=H,this.keybindingService=U,this.experimentService=G,this._useGlobalToolbar=!1,this._renderLabel=n.Always,this._visible=!1,this._onDidChangeVisibility=this._register(new T.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._dimension=null,this._primaryActions=[],this._secondaryActions=[],this._buildBody(),this._register(T.Event.debounce(this.editorService.onDidActiveEditorChange,($,ie)=>$,200)(this._updatePerEditorChange,this)),this._registerNotebookActionsToolbar()}_buildBody(){this._notebookTopLeftToolbarContainer=document.createElement("div"),this._notebookTopLeftToolbarContainer.classList.add("notebook-toolbar-left"),this._leftToolbarScrollable=new y.DomScrollableElement(this._notebookTopLeftToolbarContainer,{vertical:2,horizontal:3,horizontalScrollbarSize:3,useShadows:!1,scrollYToX:!0}),this._register(this._leftToolbarScrollable),t.append(this.domNode,this._leftToolbarScrollable.getDomNode()),this._notebookTopRightToolbarContainer=document.createElement("div"),this._notebookTopRightToolbarContainer.classList.add("notebook-toolbar-right"),t.append(this.domNode,this._notebookTopRightToolbarContainer)}_updatePerEditorChange(){if(this.editorService.activeEditorPane?.getId()===s.NOTEBOOK_EDITOR_ID&&this.editorService.activeEditorPane.getControl()===this.notebookEditor){this._showNotebookActionsinEditorToolbar();return}}_registerNotebookActionsToolbar(){this._notebookGlobalActionsMenu=this._register(this.menuService.createMenu(this.notebookEditor.creationOptions.menuIds.notebookToolbar,this.contextKeyService)),this._register(this._notebookGlobalActionsMenu),this._useGlobalToolbar=this.notebookOptions.getLayoutConfiguration().globalToolbar,this._renderLabel=this._convertConfiguration(this.configurationService.getValue(s.NotebookSetting.globalToolbarShowLabel)),this._updateStrategy();const P={ui:!0,notebookEditor:this.notebookEditor},x=z=>{if(z.id===i.SELECT_KERNEL_ID)return this.instantiationService.createInstance(o.NotebooKernelActionViewItem,z,this.notebookEditor);if(this._renderLabel!==n.Never){const B=this._primaryActions.find(K=>K.action.id===z.id);return B&&B.renderLabel?z instanceof m.MenuItemAction?this.instantiationService.createInstance(u.ActionViewWithLabel,z,void 0):void 0:z instanceof m.MenuItemAction?this.instantiationService.createInstance(v.MenuEntryActionViewItem,z,void 0):void 0}else return z instanceof m.MenuItemAction?this.instantiationService.createInstance(v.MenuEntryActionViewItem,z,void 0):void 0},F={hiddenItemStrategy:1,resetMenu:m.MenuId.NotebookToolbar,actionViewItemProvider:(z,B)=>this._strategy.actionProvider(z,B),getKeyBinding:z=>this.keybindingService.lookupKeybinding(z.id),renderDropdownAsChildElement:!0};this._notebookLeftToolbar=this.instantiationService.createInstance(l.WorkbenchToolBar,this._notebookTopLeftToolbarContainer,F),this._register(this._notebookLeftToolbar),this._notebookLeftToolbar.context=P,this._notebookRightToolbar=new b.ToolBar(this._notebookTopRightToolbarContainer,this.contextMenuService,{getKeyBinding:z=>this.keybindingService.lookupKeybinding(z.id),actionViewItemProvider:x,renderDropdownAsChildElement:!0}),this._register(this._notebookRightToolbar),this._notebookRightToolbar.context=P,this._showNotebookActionsinEditorToolbar();let V=!1,W;this._register(this._notebookGlobalActionsMenu.onDidChange(()=>{if(V){W=()=>this._showNotebookActionsinEditorToolbar();return}this.notebookEditor.isVisible&&this._showNotebookActionsinEditorToolbar()})),this._register(this._notebookLeftToolbar.onDidChangeDropdownVisibility(z=>{V=z,W&&!z&&(setTimeout(()=>{W?.()},0),W=void 0)})),this._register(this.notebookOptions.onDidChangeOptions(z=>{z.globalToolbar!==void 0&&(this._useGlobalToolbar=this.notebookOptions.getLayoutConfiguration().globalToolbar,this._showNotebookActionsinEditorToolbar())})),this._register(this.configurationService.onDidChangeConfiguration(z=>{if(z.affectsConfiguration(s.NotebookSetting.globalToolbarShowLabel)){this._renderLabel=this._convertConfiguration(this.configurationService.getValue(s.NotebookSetting.globalToolbarShowLabel)),this._updateStrategy();const B=this._notebookLeftToolbar.getElement();B.parentElement?.removeChild(B),this._notebookLeftToolbar.dispose(),this._notebookLeftToolbar=this.instantiationService.createInstance(l.WorkbenchToolBar,this._notebookTopLeftToolbarContainer,F),this._register(this._notebookLeftToolbar),this._notebookLeftToolbar.context=P,this._showNotebookActionsinEditorToolbar();return}})),this.experimentService&&this.experimentService.getTreatment("nbtoolbarineditor").then(z=>{z!==void 0&&this._useGlobalToolbar!==z&&(this._useGlobalToolbar=z,this._showNotebookActionsinEditorToolbar())})}_updateStrategy(){switch(this._renderLabel){case n.Always:this._strategy=new I(this.notebookEditor,this,this.instantiationService);break;case n.Never:this._strategy=new _(this.notebookEditor,this,this.instantiationService);break;case n.Dynamic:this._strategy=new A(this.notebookEditor,this,this.instantiationService);break}}_convertConfiguration(P){switch(P){case!0:return n.Always;case!1:return n.Never;case"always":return n.Always;case"never":return n.Never;case"dynamic":return n.Dynamic}}_showNotebookActionsinEditorToolbar(){if(!this.notebookEditor.hasModel()){this._deferredActionUpdate?.dispose(),this._deferredActionUpdate=void 0,this.visible=!1;return}this._deferredActionUpdate||(this._useGlobalToolbar?this._deferredActionUpdate=(0,c.disposableTimeout)(async()=>{await this._setNotebookActions(),this.visible=!0,this._deferredActionUpdate=void 0},50):(this.domNode.style.display="none",this._deferredActionUpdate=void 0,this.visible=!1))}async _setNotebookActions(){const P=this._notebookGlobalActionsMenu.getActions({shouldForwardArgs:!0,renderShortTitle:!0});this.domNode.style.display="flex";const x=P.filter(B=>/^navigation/.test(B[0])),F=[];x.sort((B,K)=>B[0]==="navigation"?1:K[0]==="navigation"?-1:0).forEach((B,K)=>{F.push(...B[1]),K<x.length-1&&F.push(new D.Separator)});const V=P.find(B=>/^status/.test(B[0])),W=V?V[1]:[],z=P.filter(B=>!/^navigation/.test(B[0])&&!/^status/.test(B[0])).reduce((B,K)=>(B.push(...K[1]),B),[]);this._notebookLeftToolbar.setActions([],[]),this._primaryActions=F.map(B=>({action:B,size:B instanceof D.Separator?1:0,renderLabel:!0,visible:!0})),this._notebookLeftToolbar.setActions(F,z),this._secondaryActions=z,this._notebookRightToolbar.setActions(W,[]),this._secondaryActions=z,this._dimension&&this._dimension.width>=0&&this._dimension.height>=0&&this._cacheItemSizes(this._notebookLeftToolbar),this._computeSizes()}_cacheItemSizes(P){for(let x=0;x<P.getItemsLength();x++){const F=P.getItemAction(x);if(F&&F.id!=="toolbar.toggle.more"){const V=this._primaryActions.find(W=>W.action.id===F.id);V&&(V.size=P.getItemWidth(x))}}}_computeSizes(){const P=this._notebookLeftToolbar,x=this._notebookRightToolbar;if(P&&x&&this._dimension&&this._dimension.height>=0&&this._dimension.width>=0){if(this._primaryActions.length===0&&P.getItemsLength()!==this._primaryActions.length&&this._cacheItemSizes(this._notebookLeftToolbar),this._primaryActions.length===0)return;const F=(x.getItemsLength()?x.getItemWidth(0):0)+C,V=this._dimension.width-F-(C+E)-C-C,W=this._strategy.calculateActions(V);this._notebookLeftToolbar.setActions(W.primaryActions,W.secondaryActions)}}layout(P){this._dimension=P,this._useGlobalToolbar?this.domNode.style.display="flex":this.domNode.style.display="none",this._computeSizes()}dispose(){this._notebookLeftToolbar.context=void 0,this._notebookRightToolbar.context=void 0,this._notebookLeftToolbar.dispose(),this._notebookRightToolbar.dispose(),this._notebookLeftToolbar=null,this._notebookRightToolbar=null,this._deferredActionUpdate?.dispose(),this._deferredActionUpdate=void 0,super.dispose()}};e.NotebookEditorWorkbenchToolbar=k,e.NotebookEditorWorkbenchToolbar=k=fe([O(4,a.IInstantiationService),O(5,S.IConfigurationService),O(6,h.IContextMenuService),O(7,m.IMenuService),O(8,d.IEditorService),O(9,r.IKeybindingService),O(10,p.IWorkbenchAssignmentService)],k);function L(N,P,x){return M(N,P,x,!1)}e.workbenchCalculateActions=L;function R(N,P,x){if(N.length===0)return{primaryActions:[],secondaryActions:P};const F=N.filter(B=>B.size!==0).length;if(N.map(B=>B.size).reduce((B,K)=>B+K,0)+(F-1)*C<=x)return N.forEach(B=>{B.renderLabel=!0}),M(N,P,x,!1);if(F*w+(F-1)*C>x)return N.forEach(B=>{B.renderLabel=!1}),M(N,P,x,!0);let W=0,z=-1;for(let B=0;B<N.length;B++)if(W+=N[B].size+C,N[B].action instanceof D.Separator){const K=N.slice(B+1).filter(U=>U.size!==0);W+(K.length===0?0:K.length*w+(K.length-1)*C)<=x&&(z=B)}else continue;return z<0?(N.forEach(B=>{B.renderLabel=!1}),M(N,P,x,!0)):(N.slice(0,z+1).forEach(B=>{B.renderLabel=!0}),N.slice(z+1).forEach(B=>{B.renderLabel=!1}),{primaryActions:N,secondaryActions:P})}e.workbenchDynamicCalculateActions=R;function M(N,P,x,F){const V=[],W=[];let z=0,B=!1,K=!1;if(N.length===0)return{primaryActions:[],secondaryActions:P};for(let H=0;H<N.length;H++){const U=N[H],G=F?U.size===0?0:w:U.size;if(!(U.action instanceof D.Separator&&V.length>0&&V[V.length-1].action instanceof D.Separator)&&!(U.action instanceof D.Separator&&!B))if(z+G<=x&&!K)z+=C+G,V.push(U),G!==0&&(B=!0),U.action instanceof D.Separator&&(B=!1);else if(K=!0,G===0)V.push(U);else{if(U.action instanceof D.Separator)continue;W.push(U.action)}}for(let H=V.length-1;H>0;H--){const U=V[H];if(U.size!==0){U.action instanceof D.Separator&&V.splice(H,1);break}}if(V.length&&V[V.length-1].action instanceof D.Separator&&V.pop(),W.length!==0&&W.push(new D.Separator),F){const H=V.findIndex(U=>U.action.id==="notebook.cell.insertMarkdownCellBelow");H!==-1&&V.splice(H,1)}return{primaryActions:V,secondaryActions:[...W,...P]}}}),define(Q[4030],Y([1,0,2930,18,45,16,30,24,52,23,41,477,10,261,14,4,6]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const u=1e3*60*60,d=1e3*60*2,p=1e3*60*60*24,c=1e3*60*60*4,l="ces/skipSurvey",n="ces/remindLaterDate";let g=class extends s.Disposable{constructor(E,C,I,_,A,k){super(),this.storageService=E,this.notificationService=C,this.telemetryService=I,this.openerService=_,this.productService=A,this.promptDelayer=this._register(new i.ThrottledDelayer(0)),this.tasExperimentService=k,!(!A.cesSurveyUrl||E.get(l,-1,""))&&this.schedulePrompt()}async promptUser(){if(!await this.tasExperimentService?.getTreatment("CESSurvey")){this.skipSurvey();return}const C=k=>{this.telemetryService.publicLog("cesSurvey:popup",{userReaction:k})},I=await this.tasExperimentService?.getTreatment("CESSurveyMessage")??t.localize(0,null),_=await this.tasExperimentService?.getTreatment("CESSurveyButton")??t.localize(1,null),A=this.notificationService.prompt(m.Severity.Info,I,[{label:_,run:()=>{C("accept");let k=`${this.productService.cesSurveyUrl}?o=${encodeURIComponent(r.platform)}&v=${encodeURIComponent(this.productService.version)}&m=${encodeURIComponent(this.telemetryService.machineId)}`;const L=this.productService.surveys?.filter(R=>R.surveyId&&R.languageId).filter(R=>this.storageService.getNumber(`${R.surveyId}.editedCount`,-1,0)>0).map(R=>`${encodeURIComponent(R.languageId)}Lang=1`).join("&");L&&(k+=`&${L}`),this.openerService.open(a.URI.parse(k)),this.skipSurvey()}},{label:t.localize(2,null),run:()=>{C("remindLater"),this.storageService.store(n,new Date().toUTCString(),-1,0),this.schedulePrompt()}}],{sticky:!0,onCancel:()=>{C("cancelled"),this.skipSurvey()}});await o.Event.toPromise(A.onDidClose)}async schedulePrompt(){let E=0;const C=this.storageService.get(n,-1,"");if(C){const I=new Date(C).getTime()+c-Date.now();I>0&&(E=I)}else{const I=Date.now()-new Date(this.telemetryService.firstSessionDate).getTime();if(!(!isNaN(I)&&I<p)){this.skipSurvey();return}I<u&&(E=u-I)}this.telemetryService.publicLog("cesSurvey:schedule"),this.promptDelayer.trigger(async()=>{await this.promptUser()},Math.max(E,d))}skipSurvey(){this.storageService.store(l,this.productService.version,-1,0)}};g=fe([O(0,f.IStorageService),O(1,m.INotificationService),O(2,T.ITelemetryService),O(3,S.IOpenerService),O(4,v.IProductService),O(5,h.IWorkbenchAssignmentService)],g),y.language==="en"&&D.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(g,3)}),define(Q[159],Y([1,0,195,22,55,26,3065,212,56,5,16]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.globMatchesResource=e.priorityToRank=e.ResolvedStatus=e.RegisteredEditorPriority=e.editorsAssociationsSettingId=e.IEditorResolverService=void 0,e.IEditorResolverService=(0,m.createDecorator)("editorResolverService"),e.editorsAssociationsSettingId="workbench.editorAssociations";const h=S.Registry.as(v.Extensions.Configuration),a={...f.workbenchConfigurationNodeBase,properties:{"workbench.editorAssociations":{type:"object",markdownDescription:(0,T.localize)(0,null),additionalProperties:{type:"string"}}}};h.registerConfiguration(a);var r;(function(u){u.builtin="builtin",u.option="option",u.exclusive="exclusive",u.default="default"})(r||(e.RegisteredEditorPriority=r={}));var i;(function(u){u[u.ABORT=1]="ABORT",u[u.NONE=2]="NONE"})(i||(e.ResolvedStatus=i={}));function s(u){switch(u){case r.exclusive:return 5;case r.default:return 4;case r.builtin:return 3;case r.option:default:return 1}}e.priorityToRank=s;function o(u,d){if(new Set([y.Schemas.extension,y.Schemas.webviewPanel,y.Schemas.vscodeWorkspaceTrust,y.Schemas.vscodeSettings]).has(d.scheme))return!1;const l=typeof u=="string"&&u.indexOf(b.posix.sep)>=0?`${d.scheme}:${d.path}`:(0,D.basename)(d);return t.match(typeof u=="string"?u.toLowerCase():u,l.toLowerCase())}e.globMatchesResource=o}),define(Q[754],Y([1,0,374,58,241,9,47,720,5,143,159,11,582]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledQueryEditorInput=void 0;let i=class extends t.QueryEditorInput{static{r=this}static{this.ID=m.UNTITLED_QUERY_EDITOR_TYPEID}constructor(o,u,d,p,c,l,n,g,w,E){super(o,u,d,p,c,l,n,E),this.logService=g,this.editorResolverService=w,u.setLanguageId(u.getLanguageId()??"sql")}resolve(){return this.text.resolve()}get text(){return this._text}get hasAssociatedFilePath(){return this.text.model.hasAssociatedFilePath}async save(o,u){let d=await this.text.save(o,u);return this.createFileQueryEditorInput(d,o)}async saveAs(o,u){let d=await this.text.saveAs(o,u);return this.createFileQueryEditorInput(d,o)}async createFileQueryEditorInput(o,u){try{let p=o.resource.toString(!0);await this.changeConnectionUri(p),this._results.uri=p;const c=await this.editorResolverService.resolveEditor({resource:o.resource,options:{override:T.DEFAULT_EDITOR_ASSOCIATION.id}},u);if((0,T.isEditorInputWithOptionsAndGroup)(c)){let l=this.instantiationService.createInstance(f.FileQueryEditorInput,"",c.editor,this.results);return l.state.setState(this.state),l}else throw new Error(`Could not resolved editor for resource '${p}'`)}catch(d){return this.logService.warn(d.message),o}}setMode(o){this.text.setLanguageId(o)}getMode(){return this.text.getLanguageId()}get typeId(){return r.ID}getEncoding(){return this.text.getEncoding()}setEncoding(o,u){return this.text.setEncoding(o,u)}get capabilities(){return 4}};e.UntitledQueryEditorInput=i,e.UntitledQueryEditorInput=i=r=fe([O(3,y.IConnectionManagementService),O(4,b.IQueryModelService),O(5,D.IConfigurationService),O(6,v.IInstantiationService),O(7,h.ILogService),O(8,S.IEditorResolverService),O(9,a.IServerContextualizationService)],i)}),define(Q[4031],Y([1,0,2548,16,4,56,212,159,44,20,6,65,25]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicEditorConfigurations=void 0;let i=class extends b.Disposable{static{r=this}static{this.AUTO_LOCK_DEFAULT_ENABLED=new Set(["terminalEditor"])}static{this.AUTO_LOCK_EXTRA_EDITORS=[{id:"workbench.input.interactive",label:(0,t.localize)(0,null),priority:f.RegisteredEditorPriority.builtin},{id:"mainThreadWebview-markdown.preview",label:(0,t.localize)(1,null),priority:f.RegisteredEditorPriority.builtin}]}static{this.AUTO_LOCK_REMOVE_EDITORS=new Set(["vscode-interactive-input","interactive","vscode.markdown.preview.editor"])}constructor(o,u,d){super(),this.editorResolverService=o,this.environmentService=d,this.configurationRegistry=y.Registry.as(D.Extensions.Configuration),(async()=>(await u.whenInstalledExtensionsRegistered(),this.updateDynamicEditorConfigurations(),this.registerListeners()))()}registerListeners(){S.Event.debounce(this.editorResolverService.onDidChangeEditorRegistrations,(o,u)=>u)(()=>this.updateDynamicEditorConfigurations())}updateDynamicEditorConfigurations(){const o=[...this.editorResolverService.getEditors(),...r.AUTO_LOCK_EXTRA_EDITORS].filter(w=>!r.AUTO_LOCK_REMOVE_EDITORS.has(w.id)),u=this.editorResolverService.getEditors().filter(w=>w.priority!==f.RegisteredEditorPriority.exclusive).map(w=>w.id),d=Object.create(null);for(const w of o)d[w.id]={type:"boolean",default:r.AUTO_LOCK_DEFAULT_ENABLED.has(w.id),description:w.label};const p=Object.create(null);for(const w of o)p[w.id]=r.AUTO_LOCK_DEFAULT_ENABLED.has(w.id);const c=this.autoLockConfigurationNode;this.autoLockConfigurationNode={...T.workbenchConfigurationNodeBase,properties:{"workbench.editor.autoLockGroups":{type:"object",description:(0,t.localize)(2,null),properties:d,default:p,additionalProperties:!1}}};const l=this.defaultBinaryEditorConfigurationNode;this.defaultBinaryEditorConfigurationNode={...T.workbenchConfigurationNodeBase,properties:{"workbench.editor.defaultBinaryEditor":{type:"string",default:"",enum:[...u,""],description:(0,t.localize)(3,null)}}};const n=this.editorAssociationsConfigurationNode;this.editorAssociationsConfigurationNode={...T.workbenchConfigurationNodeBase,properties:{"workbench.editorAssociations":{type:"object",markdownDescription:(0,t.localize)(4,null),patternProperties:{".*":{type:"string",enum:u}}}}};const g=this.editorLargeFileConfirmationConfigurationNode;this.editorLargeFileConfirmationConfigurationNode={...T.workbenchConfigurationNodeBase,properties:{"workbench.editorLargeFileConfirmation":{type:"number",default:(0,a.getLargeFileConfirmationLimit)(this.environmentService.remoteAuthority)/a.ByteSize.MB,minimum:1,scope:4,markdownDescription:(0,t.localize)(5,null)}}},this.configurationRegistry.updateConfigurations({add:[this.autoLockConfigurationNode,this.defaultBinaryEditorConfigurationNode,this.editorAssociationsConfigurationNode,this.editorLargeFileConfirmationConfigurationNode],remove:(0,m.coalesce)([c,l,n,g])})}};e.DynamicEditorConfigurations=i,e.DynamicEditorConfigurations=i=r=fe([O(0,f.IEditorResolverService),O(1,v.IExtensionService),O(2,h.IWorkbenchEnvironmentService)],i)}),define(Q[544],Y([1,0,20,2676,8,5,159]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomEditorInfoCollection=e.CustomEditorInfo=e.CustomEditorPriority=e.CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE=e.CONTEXT_ACTIVE_CUSTOM_EDITOR_ID=e.ICustomEditorService=void 0,e.ICustomEditorService=(0,D.createDecorator)("customEditorService"),e.CONTEXT_ACTIVE_CUSTOM_EDITOR_ID=new b.RawContextKey("activeCustomEditorId","",{type:"string",description:y.localize(0,null)}),e.CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE=new b.RawContextKey("focusedCustomEditorIsEditable",!1);var f;(function(h){h.default="default",h.builtin="builtin",h.option="option"})(f||(e.CustomEditorPriority=f={}));class v{constructor(a){this.id=a.id,this.displayName=a.displayName,this.providerDisplayName=a.providerDisplayName,this.priority=a.priority,this.selector=a.selector}matches(a){return this.selector.some(r=>r.filenamePattern&&(0,T.globMatchesResource)(r.filenamePattern,a))}}e.CustomEditorInfo=v;class m{constructor(a){this.allEditors=(0,t.distinct)(a,r=>r.id)}get length(){return this.allEditors.length}get defaultEditor(){return this.allEditors.find(a=>{switch(a.priority){case T.RegisteredEditorPriority.default:case T.RegisteredEditorPriority.builtin:return this.allEditors.every(r=>r===a||S(r,a));default:return!1}})}get bestAvailableEditor(){return Array.from(this.allEditors).sort((r,i)=>(0,T.priorityToRank)(r.priority)-(0,T.priorityToRank)(i.priority))[0]}}e.CustomEditorInfoCollection=m;function S(h,a){return(0,T.priorityToRank)(h.priority)<(0,T.priorityToRank)(a.priority)}}),define(Q[4032],Y([1,0,6,4,2675,191,544,3894,159]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContributedCustomEditors=void 0;class m extends y.Disposable{static{this.CUSTOM_EDITORS_STORAGE_ID="customEditors"}static{this.CUSTOM_EDITORS_ENTRY_ID="editors"}constructor(a){super(),this._editors=new Map,this._onChange=this._register(new t.Emitter),this.onChange=this._onChange.event,this._memento=new D.Memento(m.CUSTOM_EDITORS_STORAGE_ID,a);const r=this._memento.getMemento(0,1);for(const i of r[m.CUSTOM_EDITORS_ENTRY_ID]||[])this.add(new T.CustomEditorInfo(i));f.customEditorsExtensionPoint.setHandler(i=>{this.update(i)})}update(a){this._editors.clear();for(const i of a)for(const s of i.value)this.add(new T.CustomEditorInfo({id:s.viewType,displayName:s.displayName,providerDisplayName:i.description.isBuiltin?b.localize(0,null):i.description.displayName||i.description.identifier.value,selector:s.selector||[],priority:S(s,i.description)}));const r=this._memento.getMemento(0,1);r[m.CUSTOM_EDITORS_ENTRY_ID]=Array.from(this._editors.values()),this._memento.saveMemento(),this._onChange.fire()}[Symbol.iterator](){return this._editors.values()}get(a){return this._editors.get(a)}getContributedEditors(a){return Array.from(this._editors.values()).filter(r=>r.matches(a))}add(a){if(this._editors.has(a.id)){console.error(`Custom editor with id '${a.id}' already registered`);return}this._editors.set(a.id,a)}}e.ContributedCustomEditors=m;function S(h,a){switch(h.priority){case v.RegisteredEditorPriority.default:case v.RegisteredEditorPriority.option:return h.priority;case v.RegisteredEditorPriority.builtin:return a.isBuiltin?v.RegisteredEditorPriority.builtin:v.RegisteredEditorPriority.default;default:return v.RegisteredEditorPriority.default}}}),define(Q[4033],Y([1,0,195,20,4,26,10,9,208,47,70,22,159,43,3064,23,30,35,24,44,11,955,5,236,6]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w){"use strict";var E;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorResolverService=void 0;let C=class extends b.Disposable{static{E=this}static{this.configureDefaultID="promptOpenWith.configureDefault"}static{this.cacheStorageID="editorOverrideService.cache"}static{this.conflictingDefaultsStorageID="editorOverrideService.conflictingDefaults"}constructor(_,A,k,L,R,M,N,P,x){super(),this.editorGroupService=_,this.instantiationService=A,this.configurationService=k,this.quickInputService=L,this.notificationService=R,this.telemetryService=M,this.storageService=N,this.extensionService=P,this.logService=x,this._onDidChangeEditorRegistrations=this._register(new w.PauseableEmitter),this.onDidChangeEditorRegistrations=this._onDidChangeEditorRegistrations.event,this._editors=new Map,this._flattenedEditors=new Map,this._shouldReFlattenEditors=!0,this.storageService.remove(E.cacheStorageID,0),this._register(this.storageService.onWillSaveState(()=>{this.cacheEditors()}))}resolveUntypedInputAndGroup(_,A){const k=_,[L,R]=this.instantiationService.invokeFunction(l.findGroup,k,A);return[k,L,R]}async resolveEditor(_,A){if(this._flattenedEditors=this._flattenEditorsMap(),(0,m.isResourceSideBySideEditorInput)(_))return this.doResolveSideBySideEditor(_,A);const k=this.resolveUntypedInputAndGroup(_,A);if(!k)return 2;const[L,R,M]=k;M&&(L.options={...L.options,activation:M});let N=m.EditorResourceAccessor.getCanonicalUri(L,{supportSideBySide:m.SideBySideEditor.PRIMARY});if(await this.extensionService.whenInstalledExtensionsRegistered(),N===void 0)N=T.URI.from({scheme:h.Schemas.untitled});else if(N.scheme===void 0||N===null)return 2;if(L.options?.override===v.EditorResolution.PICK){const V=await this.doPickEditor(L);if(!V)return 1;L.options=V}let{editor:P,conflictingDefault:x}=this.getEditor(N,L.options?.override);if(!P&&(L.options?.override||(0,m.isEditorInputWithOptions)(_)))return 2;if(!P){const V=this.getEditor(N,m.DEFAULT_EDITOR_ASSOCIATION.id);if(P=V?.editor,x=V?.conflictingDefault,!P)return 2}if((0,m.isResourceDiffEditorInput)(L)&&L.options?.override===void 0){let V=m.EditorResourceAccessor.getCanonicalUri(L,{supportSideBySide:m.SideBySideEditor.SECONDARY});V||(V=T.URI.from({scheme:h.Schemas.untitled}));const{editor:W}=this.getEditor(V,void 0);if(!W||P.editorInfo.id!==W.editorInfo.id){const{editor:z,conflictingDefault:B}=this.getEditor(N,m.DEFAULT_EDITOR_ASSOCIATION.id);P=z,x=B}if(!P)return 2}if(L.options={override:P.editorInfo.id,...L.options},P.editorFactoryObject.createDiffEditorInput===void 0&&(0,m.isResourceDiffEditorInput)(L))return 2;const F=await this.doResolveEditor(L,R,P);return x&&F&&await this.doHandleConflictingDefaults(N,P.editorInfo.label,L,F.editor,R),F?(this.sendEditorResolutionTelemetry(F.editor),F.editor.editorId!==P.editorInfo.id&&this.logService.warn(`Editor ID Mismatch: ${F.editor.editorId} !== ${P.editorInfo.id}. This will cause bugs. Please ensure editorInput.editorId matches the registered id`),{...F,group:R}):1}async doResolveSideBySideEditor(_,A){const k=await this.resolveEditor(_.primary,A);if(!(0,m.isEditorInputWithOptionsAndGroup)(k))return 2;const L=await this.resolveEditor(_.secondary,k.group??A);return(0,m.isEditorInputWithOptionsAndGroup)(L)?{group:k.group??L.group,editor:this.instantiationService.createInstance(g.SideBySideEditorInput,_.label,_.description,L.editor,k.editor),options:_.options}:2}bufferChangeEvents(_){this._onDidChangeEditorRegistrations.pause();try{_()}finally{this._onDidChangeEditorRegistrations.resume()}}registerEditor(_,A,k,L){let R=this._editors.get(_);R===void 0&&(R=new Map,this._editors.set(_,R));let M=R.get(A.id);M===void 0&&(M=[]);const N=(0,y.insert)(M,{globPattern:_,editorInfo:A,options:k,editorFactoryObject:L});return R.set(A.id,M),this._shouldReFlattenEditors=!0,this._onDidChangeEditorRegistrations.fire(),(0,b.toDisposable)(()=>{N(),M&&M.length===0&&R?.delete(A.id),this._shouldReFlattenEditors=!0,this._onDidChangeEditorRegistrations.fire()})}getAssociationsForResource(_){let k=this.getAllUserAssociations().filter(R=>R.filenamePattern&&(0,a.globMatchesResource)(R.filenamePattern,_));k=k.sort((R,M)=>(M.filenamePattern?.length??0)-(R.filenamePattern?.length??0));const L=this._registeredEditors;return k.filter(R=>L.find(M=>M.editorInfo.id===R.viewType))}getAllUserAssociations(){const _=this.configurationService.inspect(a.editorsAssociationsSettingId)||{},A=_.workspaceValue??{},k=_.userValue??{},L={...A};for(const[M,N]of Object.entries(k))L[M]===void 0&&(L[M]=N);const R=[];for(const[M,N]of Object.entries(L)){const P={filenamePattern:M,viewType:N};R.push(P)}return R}_flattenEditorsMap(){if(!this._shouldReFlattenEditors)return this._flattenedEditors;this._shouldReFlattenEditors=!1;const _=new Map;for(const[A,k]of this._editors){const L=[];for(const R of k.values()){let M;for(const N of R)M||(M={editorInfo:N.editorInfo,globPattern:N.globPattern,options:{},editorFactoryObject:{}}),M.options={...M.options,...N.options},M.editorFactoryObject={...M.editorFactoryObject,...N.editorFactoryObject};M&&L.push(M)}_.set(A,L)}return _}get _registeredEditors(){return(0,y.flatten)(Array.from(this._flattenedEditors.values()))}updateUserAssociations(_,A){const k={viewType:A,filenamePattern:_},L=this.getAllUserAssociations(),R=Object.create(null);for(const M of[...L,k])M.filenamePattern&&(R[M.filenamePattern]=M.viewType);this.configurationService.updateValue(a.editorsAssociationsSettingId,R)}findMatchingEditors(_){const A=this.getAssociationsForResource(_),k=[];for(const[L,R]of this._flattenedEditors)for(const M of R)(A.find(P=>P.viewType===M.editorInfo.id)&&M.editorInfo.priority!==a.RegisteredEditorPriority.exclusive||(0,a.globMatchesResource)(L,_))&&k.push(M);return k.sort((L,R)=>(0,a.priorityToRank)(R.editorInfo.priority)===(0,a.priorityToRank)(L.editorInfo.priority)&&typeof R.globPattern=="string"&&typeof L.globPattern=="string"?R.globPattern.length-L.globPattern.length:(0,a.priorityToRank)(R.editorInfo.priority)-(0,a.priorityToRank)(L.editorInfo.priority))}getEditors(_){if(this._flattenedEditors=this._flattenEditorsMap(),T.URI.isUri(_)){const A=this.findMatchingEditors(_);return A.find(k=>k.editorInfo.priority===a.RegisteredEditorPriority.exclusive)?[]:A.map(k=>k.editorInfo)}return(0,y.distinct)(this._registeredEditors.map(A=>A.editorInfo),A=>A.id)}getEditor(_,A){const k=(F,V)=>F.find(W=>W.options&&W.options.canSupportResource!==void 0?W.editorInfo.id===V&&W.options.canSupportResource(_):W.editorInfo.id===V);if(A&&A!==v.EditorResolution.EXCLUSIVE_ONLY){const F=this._registeredEditors;return{editor:k(F,A),conflictingDefault:!1}}const L=this.findMatchingEditors(_),R=this.getAssociationsForResource(_),M=A===v.EditorResolution.EXCLUSIVE_ONLY?a.RegisteredEditorPriority.exclusive:a.RegisteredEditorPriority.builtin;let N=L.filter(F=>(0,a.priorityToRank)(F.editorInfo.priority)>=(0,a.priorityToRank)(M)&&F.editorInfo.id!==m.DEFAULT_EDITOR_ASSOCIATION.id);if(N.length===0)return{editor:R[0]&&M!==a.RegisteredEditorPriority.exclusive?k(L,R[0].viewType):void 0,conflictingDefault:!1};const P=N[0].editorInfo.priority===a.RegisteredEditorPriority.exclusive?N[0].editorInfo.id:R[0]?.viewType||N[0].editorInfo.id;let x=!1;return N=N.filter(F=>F.editorInfo.priority!==a.RegisteredEditorPriority.exclusive),R.length===0&&N.length>1&&(x=!0),{editor:k(L,P),conflictingDefault:x}}async doResolveEditor(_,A,k){let L=_.options;const R=m.EditorResourceAccessor.getCanonicalUri(_,{supportSideBySide:m.SideBySideEditor.PRIMARY});if(L&&typeof L.activation>"u"&&(L={...L,activation:L.preserveFocus?v.EditorActivation.RESTORE:void 0}),(0,m.isResourceMergeEditorInput)(_)){if(!k.editorFactoryObject.createMergeEditorInput)return;const x=await k.editorFactoryObject.createMergeEditorInput(_,A);return{editor:x.editor,options:x.options??L}}if((0,m.isResourceDiffEditorInput)(_)){if(!k.editorFactoryObject.createDiffEditorInput)return;const x=await k.editorFactoryObject.createDiffEditorInput(_,A);return{editor:x.editor,options:x.options??L}}if((0,m.isResourceSideBySideEditorInput)(_))throw new Error("Untyped side by side editor input not supported here.");if((0,m.isUntitledResourceEditorInput)(_)){if(!k.editorFactoryObject.createUntitledEditorInput)return;const x=await k.editorFactoryObject.createUntitledEditorInput(_,A);return{editor:x.editor,options:x.options??L}}if(R===void 0)throw new Error("Undefined resource on non untitled editor input.");if(typeof k.options?.singlePerResource=="function"?k.options.singlePerResource():k.options?.singlePerResource){const x=await this.moveExistingEditorForResource(R,k.editorInfo.id,A);if(x)return{editor:x,options:L}}if(!k.editorFactoryObject.createEditorInput||!k.editorFactoryObject.createEditorInput)return;const N=await k.editorFactoryObject.createEditorInput(_,A);return L=N.options??L,{editor:N.editor,options:L}}async moveExistingEditorForResource(_,A,k){const L=this.findExistingEditorsForResource(_,A);if(!L.length)return;const R=L[0];for(const{editor:M,group:N}of L)if(M!==R.editor&&!await N.closeEditor(M))return;if(k.id!==R.group.id)return R.group.moveEditor(R.editor,k),R.editor}findExistingEditorsForResource(_,A){const k=[],L=(0,y.distinct)([...this.editorGroupService.groups]);for(const R of L)for(const M of R.editors)(0,D.isEqual)(M.resource,_)&&M.editorId===A&&k.push({editor:M,group:R});return k}async doHandleConflictingDefaults(_,A,k,L,R){const M=this.findMatchingEditors(_),N=JSON.parse(this.storageService.get(E.conflictingDefaultsStorageID,0,"{}")),P=`*${(0,D.extname)(_)}`,x=()=>{N[P]=[],M.forEach(W=>N[P].push(W.editorInfo.id)),this.storageService.store(E.conflictingDefaultsStorageID,JSON.stringify(N),0,1)};if(N[P]&&N[P].find(W=>W===L.editorId))return;const V=this.notificationService.prompt(s.Severity.Warning,(0,i.localize)(0,null),[{label:(0,i.localize)(1,null),run:async()=>{const W=await this.doPickEditor(k,!0);if(!W)return;k.options=W;const z=await this.resolveEditor(k,R);z===1||z===2||R.replaceEditors([{editor:L,replacement:z.editor,options:z.options??W}])}},{label:(0,i.localize)(2,null,A),run:x}]).onDidClose(()=>{x(),V.dispose()})}mapEditorsToQuickPickEntry(_,A){const k=(0,y.firstOrDefault)(this.editorGroupService.activeGroup.findEditors(_));let L=_.scheme===h.Schemas.untitled?this._registeredEditors.filter(V=>V.editorInfo.priority!==a.RegisteredEditorPriority.exclusive):this.findMatchingEditors(_);L=(0,y.distinct)(L,V=>V.editorInfo.id);const R=this.getAssociationsForResource(_)[0]?.viewType;L=L.sort((V,W)=>V.editorInfo.id===m.DEFAULT_EDITOR_ASSOCIATION.id?-1:W.editorInfo.id===m.DEFAULT_EDITOR_ASSOCIATION.id?1:(0,a.priorityToRank)(W.editorInfo.priority)-(0,a.priorityToRank)(V.editorInfo.priority));const M=[],N=(0,i.localize)(3,null),P=(0,i.localize)(4,null),x=(0,i.localize)(5,null);let F=R;if(!F&&L.length>2&&L[1]?.editorInfo.priority!==a.RegisteredEditorPriority.option&&(F=L[1]?.editorInfo.id),F||(F=m.DEFAULT_EDITOR_ASSOCIATION.id),L.forEach(V=>{const W=k?.editorId??m.DEFAULT_EDITOR_ASSOCIATION.id,z=k?V.editorInfo.id===W:!1,B=V.editorInfo.id===F,K={id:V.editorInfo.id,label:V.editorInfo.label,description:z&&B?x:z?N:B?P:void 0,detail:V.editorInfo.detail??V.editorInfo.priority};M.push(K)}),!A&&(0,D.extname)(_)!==""){const V={type:"separator"};M.push(V);const W={id:E.configureDefaultID,label:(0,i.localize)(6,null,`*${(0,D.extname)(_)}`)};M.push(W)}return M}async doPickEditor(_,A){let k=m.EditorResourceAccessor.getOriginalUri(_,{supportSideBySide:m.SideBySideEditor.PRIMARY});k===void 0&&(k=T.URI.from({scheme:h.Schemas.untitled}));const L=this.mapEditorsToQuickPickEntry(k,A),R=this.quickInputService.createQuickPick(),M=A?(0,i.localize)(7,null,`*${(0,D.extname)(k)}`):(0,i.localize)(8,null,(0,D.basename)(k));R.placeholder=M,R.canAcceptInBackground=!0,R.items=L;const N=R.items.find(x=>x.type==="item");N&&(R.selectedItems=[N]);const P=await new Promise(x=>{R.onDidAccept(F=>{let V;R.selectedItems.length===1&&(V={item:R.selectedItems[0],keyMods:R.keyMods,openInBackground:F.inBackground}),k&&A&&V?.item.id&&this.updateUserAssociations(`*${(0,D.extname)(k)}`,V.item.id),x(V)}),R.onDidHide(()=>x(void 0)),R.onDidTriggerItemButton(F=>{x({item:F.item,openInBackground:!1}),k&&F.item&&F.item.id&&this.updateUserAssociations(`*${(0,D.extname)(k)}`,F.item.id)}),R.show()});if(R.dispose(),P)return P.item.id===E.configureDefaultID?this.doPickEditor(_,!0):{..._.options,override:P.item.id,preserveFocus:P.openInBackground||_.options?.preserveFocus}}sendEditorResolutionTelemetry(_){_.editorId&&this.telemetryService.publicLog2("override.viewType",{viewType:_.editorId})}cacheEditors(){const _=new Set;for(const[k,L]of this._flattenedEditors)L.find(M=>M.editorInfo.priority!==a.RegisteredEditorPriority.option&&M.editorInfo.id!==m.DEFAULT_EDITOR_ASSOCIATION.id)&&(t.isRelativePattern(k)?_.add(`${k.pattern}`):_.add(k));const A=this.getAllUserAssociations();for(const k of A)k.filenamePattern&&_.add(k.filenamePattern);this.storageService.store(E.cacheStorageID,JSON.stringify(Array.from(_)),0,1)}};e.EditorResolverService=C,e.EditorResolverService=C=E=fe([O(0,S.IEditorGroupsService),O(1,n.IInstantiationService),O(2,f.IConfigurationService),O(3,r.IQuickInputService),O(4,s.INotificationService),O(5,o.ITelemetryService),O(6,d.IStorageService),O(7,p.IExtensionService),O(8,c.ILogService)],C),(0,u.registerSingleton)(a.IEditorResolverService,C,0)}),define(Q[4034],Y([1,0,865,19,36,84,95,149,97,426,139,261,52,477,279,138,9,143,965,274,31,35]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIssueReporterStyles=e.NativeIssueService=void 0;let n=class{constructor(C,I,_,A,k,L,R,M,N,P,x){this.issueMainService=C,this.themeService=I,this.extensionManagementService=_,this.extensionEnablementService=A,this.environmentService=k,this.workspaceTrustManagementService=L,this.productService=R,this.experimentService=M,this.authenticationService=N,this.configurationService=P,this.integrityService=x,this._handlers=new Map,p.ipcRenderer.on("vscode:triggerIssueUriRequestHandler",async(F,V)=>{const W=await this.getIssueReporterUri(V.extensionId,c.CancellationToken.None);p.ipcRenderer.send(V.replyChannel,W.toString())})}async openReporter(C={}){const I=[];try{const N=(await this.extensionManagementService.getInstalled()).filter(P=>this.extensionEnablementService.isEnabled(P)||C.extensionId&&P.identifier.id===C.extensionId);I.push(...N.map(P=>{const{manifest:x}=P,F=x.contributes?Object.keys(x.contributes):[],V=!x.main&&!x.browser&&F.length===1&&F[0]==="themes",W=P.type===0;return{name:x.name,publisher:x.publisher,version:x.version,repositoryUrl:x.repository&&x.repository.url,bugsUrl:x.bugs&&x.bugs.url,hasIssueUriRequestHandler:this._handlers.has(P.identifier.id.toLowerCase()),displayName:x.displayName,id:P.identifier.id,isTheme:V,isBuiltin:W}}))}catch(M){I.push({name:"Workbench Issue Service",publisher:"Unknown",version:"0.0.0",repositoryUrl:void 0,bugsUrl:void 0,displayName:`Extensions not loaded: ${M}`,id:"workbench.issue",isTheme:!1,isBuiltin:!0})}const _=await this.experimentService.getCurrentExperiments();let A="";try{A=(await this.authenticationService.getSessions("github")).filter(P=>P.scopes.includes("repo"))[0]?.accessToken}catch{}let k=!1;try{k=!(await this.integrityService.isPure()).isPure}catch{}const L=this.themeService.getColorTheme(),R=Object.assign({styles:g(L),zoomLevel:(0,v.getZoomLevel)(),enabledExtensions:I,experiments:_?.join(` `),restrictedMode:!this.workspaceTrustManagementService.isWorkspaceTrusted(),previewFeaturesEnabled:this.configurationService.getValue(u.CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES),isUnsupported:k,githubAccessToken:A},C);return this.issueMainService.openReporter(R)}openProcessExplorer(){const C=this.themeService.getColorTheme(),I={pid:this.environmentService.mainPid,zoomLevel:(0,v.getZoomLevel)(),styles:{backgroundColor:w(C,b.editorBackground),color:w(C,b.editorForeground),listHoverBackground:w(C,b.listHoverBackground),listHoverForeground:w(C,b.listHoverForeground),listFocusBackground:w(C,b.listFocusBackground),listFocusForeground:w(C,b.listFocusForeground),listFocusOutline:w(C,b.listFocusOutline),listActiveSelectionBackground:w(C,b.listActiveSelectionBackground),listActiveSelectionForeground:w(C,b.listActiveSelectionForeground),listHoverOutline:w(C,b.activeContrastBorder),scrollbarShadowColor:w(C,b.scrollbarShadow),scrollbarSliderActiveBackgroundColor:w(C,b.scrollbarSliderActiveBackground),scrollbarSliderBackgroundColor:w(C,b.scrollbarSliderBackground),scrollbarSliderHoverBackgroundColor:w(C,b.scrollbarSliderHoverBackground)},platform:h.platform,applicationName:this.productService.applicationName};return this.issueMainService.openProcessExplorer(I)}registerIssueUriRequestHandler(C,I){return this._handlers.set(C.toLowerCase(),I),{dispose:()=>this._handlers.delete(C)}}async getIssueReporterUri(C,I){const _=this._handlers.get(C);if(!_)throw new Error(`No issue uri request handler registered for extension '${C}'`);return _.provideIssueUrl(I)}};e.NativeIssueService=n,e.NativeIssueService=n=fe([O(0,t.IIssueMainService),O(1,y.IThemeService),O(2,T.IExtensionManagementService),O(3,f.IWorkbenchExtensionEnablementService),O(4,S.INativeWorkbenchEnvironmentService),O(5,s.IWorkspaceTrustManagementService),O(6,a.IProductService),O(7,r.IWorkbenchAssignmentService),O(8,i.IAuthenticationService),O(9,o.IConfigurationService),O(10,d.IIntegrityService)],n);function g(E){return{backgroundColor:w(E,D.SIDE_BAR_BACKGROUND),color:w(E,b.foreground),textLinkColor:w(E,b.textLinkForeground),textLinkActiveForeground:w(E,b.textLinkActiveForeground),inputBackground:w(E,b.inputBackground),inputForeground:w(E,b.inputForeground),inputBorder:w(E,b.inputBorder),inputActiveBorder:w(E,b.inputActiveOptionBorder),inputErrorBorder:w(E,b.inputValidationErrorBorder),inputErrorBackground:w(E,b.inputValidationErrorBackground),inputErrorForeground:w(E,b.inputValidationErrorForeground),buttonBackground:w(E,b.buttonBackground),buttonForeground:w(E,b.buttonForeground),buttonHoverBackground:w(E,b.buttonHoverBackground),sliderActiveColor:w(E,b.scrollbarSliderActiveBackground),sliderBackgroundColor:w(E,b.scrollbarSliderBackground),sliderHoverColor:w(E,b.scrollbarSliderHoverBackground)}}e.getIssueReporterStyles=g;function w(E,C){const I=E.getColor(C);return I?I.toString():void 0}(0,l.registerSingleton)(m.IWorkbenchIssueService,n,1)}),define(Q[131],Y([1,0,206,22,55,18,26,10,5,310,39,65,127]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractPathService=e.IPathService=void 0,e.IPathService=(0,v.createDecorator)("pathService");let i=r=class{constructor(o,u,d,p){this.localUserHome=o,this.remoteAgentService=u,this.environmentService=d,this.contextService=p,this.resolveOS=(async()=>(await this.remoteAgentService.getEnvironment())?.os||D.OS)(),this.resolveUserHome=(async()=>{const c=await this.remoteAgentService.getEnvironment();return this.maybeUnresolvedUserHome=c?.userHome??o})()}hasValidBasename(o,u,d){return typeof u=="string"||typeof u>"u"?this.resolveOS.then(p=>this.doHasValidBasename(o,p,u)):this.doHasValidBasename(o,u,d)}doHasValidBasename(o,u,d){return o.scheme===y.Schemas.file||o.scheme===y.Schemas.vscodeRemote?(0,t.isValidBasename)(d??(0,T.basename)(o),u===1):!0}get defaultUriScheme(){return r.findDefaultUriScheme(this.environmentService,this.contextService)}static findDefaultUriScheme(o,u){if(o.remoteAuthority)return y.Schemas.vscodeRemote;const d=(0,m.getVirtualWorkspaceScheme)(u.getWorkspace());if(d)return d;const p=u.getWorkspace().folders[0];if(p)return p.uri.scheme;const c=u.getWorkspace().configuration;return c?c.scheme:y.Schemas.file}userHome(o){return o?.preferLocal?this.localUserHome:this.resolveUserHome}get resolvedUserHome(){return this.maybeUnresolvedUserHome}get path(){return this.resolveOS.then(o=>o===1?b.win32:b.posix)}async fileURI(o){let u="";if(await this.resolveOS===1&&(o=o.replace(/\\/g,"/")),o[0]==="/"&&o[1]==="/"){const p=o.indexOf("/",2);p===-1?(u=o.substring(2),o="/"):(u=o.substring(2,p),o=o.substring(p)||"/")}return f.URI.from({scheme:y.Schemas.file,authority:u,path:o,query:"",fragment:""})}};e.AbstractPathService=i,e.AbstractPathService=i=r=fe([O(1,a.IRemoteAgentService),O(2,h.IWorkbenchEnvironmentService),O(3,S.IWorkspaceContextService)],i)}),define(Q[4035],Y([1,0,7,1096,10,174,49,29,8,131,68,19,11,76,111,183,166,343,824,147,55,1033,78,54,1625]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImageCalloutDialog=void 0;const w=452,E=["jpg","jpeg","png","gif"];let C=class extends D.Modal{constructor(_,A,k,L,R,M,N,P,x,F,V,W,z){super(_,"CalloutDialog",x,P,V,N,W,z,F,{dialogStyle:"callout",dialogPosition:A,dialogProperties:k,width:w}),this._pathService=L,this._fileDialogService=R,this._contextViewService=M,this._selectionComplete=new s.Deferred,this._editorImageLocationGroup="editorImageLocationGroup"}layout(_){}open(){return this.show(),this._selectionComplete.promise}render(){super.render(),(0,p.attachCalloutDialogStyler)(this,this._themeService),this.addFooterButton(y.insertButtonText,()=>this.insert()),this.addFooterButton(y.cancelButtonText,()=>this.cancel(),void 0,!0)}renderBody(_){let A=t.$(".column.insert-image");t.append(_,A);let k=t.$(".row");t.append(A,k),this._imageLocationLabel=t.$("p"),this._imageLocationLabel.innerText=y.locationLabel,t.append(k,this._imageLocationLabel);let L=t.$(".radio-group");this._imageLocalRadioButton=this._register(new d.RadioButton(L,{label:y.localImageLabel,enabled:!0,checked:!0})),this._imageRemoteRadioButton=this._register(new d.RadioButton(L,{label:y.remoteImageLabel,enabled:!0,checked:!1})),this._imageLocalRadioButton.name=this._editorImageLocationGroup,this._imageLocalRadioButton.value=y.locationLocal,this._imageRemoteRadioButton.name=this._editorImageLocationGroup,this._imageRemoteRadioButton.value=y.locationRemote,t.append(k,L);let R=t.$(".row");t.append(A,R),this._imageUrlLabel=t.$("p"),this._imageLocalRadioButton.checked===!0?this._imageUrlLabel.innerText=y.pathPlaceholder:this._imageUrlLabel.innerText=y.urlPlaceholder,t.append(R,this._imageUrlLabel);let M=t.$(".flex-container");this._imageUrlInputBox=new o.InputBox(M,this._contextViewService,{placeholder:y.pathPlaceholder,ariaLabel:y.pathInputLabel,inputBoxStyles:g.defaultInputBoxStyles});let N=t.$(".button-icon");this._imageBrowseButton=t.$("a.codicon.masked-icon.browse-local"),this._imageBrowseButton.title=y.browseAltText,t.append(M,N),t.append(N,this._imageBrowseButton),this._register(t.addDisposableListener(this._imageBrowseButton,t.EventType.CLICK,async()=>{let x=await this.handleBrowse();x&&(this._imageUrlInputBox.value=x.fsPath)},!0)),t.append(R,M);let P=t.$(".row");t.append(A,P),this._imageEmbedLabel=t.append(P,t.$(".checkbox")),this._imageEmbedCheckbox=new u.Checkbox(this._imageEmbedLabel,{label:y.embedImageLabel,checked:!1,onChange:x=>{},ariaLabel:y.embedImageLabel}),t.append(P,this._imageEmbedLabel),this._register(this._imageRemoteRadioButton.onClicked(x=>{this._imageBrowseButton.style.display="none",this._imageEmbedCheckbox.enabled=!1,this._imageUrlLabel.innerText=y.urlPlaceholder,this._imageUrlInputBox.setPlaceHolder(y.urlPlaceholder)})),this._register(this._imageLocalRadioButton.onClicked(x=>{this._imageBrowseButton.style.display="block",this._imageEmbedCheckbox.enabled=!0,this._imageUrlLabel.innerText=y.pathPlaceholder,this._imageUrlInputBox.setPlaceHolder(y.pathPlaceholder)}))}insert(){this.hide("ok");let _=(0,l.unquoteText)(this._imageUrlInputBox.value),A=c.basename(_);this._selectionComplete.resolve({embedImage:this._imageEmbedCheckbox.checked,insertEscapedMarkdown:this._imageEmbedCheckbox.checked?`})`:`})`,imagePath:_}),this.dispose()}cancel(){this.hide("cancel"),this._selectionComplete.resolve({insertEscapedMarkdown:"",imagePath:void 0,embedImage:void 0})}async getUserHome(){return(await this._pathService.userHome()).path}async handleBrowse(){let _={openLabel:void 0,canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1,defaultUri:b.URI.file(await this.getUserHome()),title:void 0,filters:[{extensions:E,name:"images"}]},A=await this._fileDialogService.showOpenDialog(_);if(A.length>0)return A[0]}set imagePath(_){this._imageUrlInputBox.value=_}set embedImage(_){this._imageEmbedCheckbox.checked=_}};e.ImageCalloutDialog=C,e.ImageCalloutDialog=C=fe([O(3,m.IPathService),O(4,T.IFileDialogService),O(5,f.IContextViewService),O(6,h.IThemeService),O(7,i.ILayoutService),O(8,r.IAdsTelemetryService),O(9,v.IContextKeyService),O(10,S.IClipboardService),O(11,a.ILogService),O(12,n.ITextResourcePropertiesService)],C)}),define(Q[4036],Y([1,0,7,198,40,2094,271,218,29,3172,130,5,829,9,136,3476,55,10,33,4035,205,1147,67,22,1628]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkdownToolbarComponent=e.MARKDOWN_TOOLBAR_SELECTOR=void 0,e.MARKDOWN_TOOLBAR_SELECTOR="markdown-toolbar-component";const w=/\[(?<text>.+)\]\((?<url>[^ ]+)(?: "(?<title>.+)")?\)/;let E=class extends i.AngularDisposable{async onkeydown(I){if(this.cellModel?.currentMode===T.CellEditModes.SPLIT||this.cellModel?.currentMode===T.CellEditModes.MARKDOWN){const _=new n.StandardKeyboardEvent(I);let A=new m.MarkdownTextTransformer(this._notebookService,this.cellModel);(_.ctrlKey||_.metaKey)&&_.keyCode===32?(t.EventHelper.stop(I,!0),await A.transformText(m.MarkdownButtonType.BOLD)):(_.ctrlKey||_.metaKey)&&_.keyCode===39?(t.EventHelper.stop(I,!0),await A.transformText(m.MarkdownButtonType.ITALIC)):(_.ctrlKey||_.metaKey)&&_.keyCode===51?(t.EventHelper.stop(I,!0),await A.transformText(m.MarkdownButtonType.UNDERLINE)):(_.ctrlKey||_.metaKey)&&_.shiftKey&&_.keyCode===41?(t.EventHelper.stop(I,!0),await A.transformText(m.MarkdownButtonType.CODE)):(_.ctrlKey||_.metaKey)&&_.shiftKey&&_.keyCode===38&&(t.EventHelper.stop(I,!0),await A.transformText(m.MarkdownButtonType.HIGHLIGHT))}}constructor(I,_,A,k){super(),this._notebookService=I,this._instantiationService=_,this._contextMenuService=A,this._configurationService=k,this.bold=(0,D.localize)(0,null),this.italic=(0,D.localize)(1,null),this.underline=(0,D.localize)(2,null),this.highlight=(0,D.localize)(3,null),this.insertCode=(0,D.localize)(4,null),this.insertLink=(0,D.localize)(5,null),this.insertList=(0,D.localize)(6,null),this.insertOrderedList=(0,D.localize)(7,null),this.insertImage=(0,D.localize)(8,null),this.buttonPreview=(0,D.localize)(9,null),this.headingDropdownLabel=(0,D.localize)(10,null),this.optionHeading1=(0,D.localize)(11,null),this.optionHeading2=(0,D.localize)(12,null),this.optionHeading3=(0,D.localize)(13,null),this.optionParagraph=(0,D.localize)(14,null),this.richTextViewButton=(0,D.localize)(15,null),this.splitViewButton=(0,D.localize)(16,null),this.markdownViewButton=(0,D.localize)(17,null)}ngOnInit(){this.initActionBar()}initActionBar(){let I=t.$("li.action-item");I.setAttribute("role","presentation");let _=new y.Button(I,null);_.title=this.insertLink,_.element.setAttribute("class","action-label codicon insert-link masked-icon"),this._register(t.addDisposableListener(I,t.EventType.CLICK,async $=>{await this.onInsertButtonClick($,m.MarkdownButtonType.LINK_PREVIEW)}));let A=t.$("li.action-item");A.setAttribute("role","presentation");let k=new y.Button(A,null);k.title=this.insertImage,k.element.setAttribute("class","action-label codicon insert-image masked-icon"),this._register(t.addDisposableListener(A,t.EventType.CLICK,async $=>{await this.onInsertButtonClick($,m.MarkdownButtonType.IMAGE_PREVIEW)}));let L=this._instantiationService.createInstance(m.TransformMarkdownAction,"notebook.boldText","","bold masked-icon",this.bold,this.cellModel,m.MarkdownButtonType.BOLD),R=this._instantiationService.createInstance(m.TransformMarkdownAction,"notebook.italicText","","italic masked-icon",this.italic,this.cellModel,m.MarkdownButtonType.ITALIC),M=this._instantiationService.createInstance(m.TransformMarkdownAction,"notebook.underlineText","","underline masked-icon",this.underline,this.cellModel,m.MarkdownButtonType.UNDERLINE),N=this._instantiationService.createInstance(m.TransformMarkdownAction,"notebook.highlightText","","highlight masked-icon",this.highlight,this.cellModel,m.MarkdownButtonType.HIGHLIGHT),P=this._instantiationService.createInstance(m.TransformMarkdownAction,"notebook.codeText","","code masked-icon",this.insertCode,this.cellModel,m.MarkdownButtonType.CODE),x=this._instantiationService.createInstance(m.TransformMarkdownAction,"notebook.listText","","list masked-icon",this.insertList,this.cellModel,m.MarkdownButtonType.UNORDERED_LIST),F=this._instantiationService.createInstance(m.TransformMarkdownAction,"notebook.orderedText","","ordered-list masked-icon",this.insertOrderedList,this.cellModel,m.MarkdownButtonType.ORDERED_LIST),V=this._instantiationService.createInstance(m.TransformMarkdownAction,"notebook.heading","","heading",this.headingDropdownLabel,this.cellModel,null),W=this._instantiationService.createInstance(m.TransformMarkdownAction,"notebook.heading1",this.optionHeading1,"heading 1",this.optionHeading1,this.cellModel,m.MarkdownButtonType.HEADING1),z=this._instantiationService.createInstance(m.TransformMarkdownAction,"notebook.heading2",this.optionHeading2,"heading 2",this.optionHeading2,this.cellModel,m.MarkdownButtonType.HEADING2),B=this._instantiationService.createInstance(m.TransformMarkdownAction,"notebook.heading3",this.optionHeading3,"heading 3",this.optionHeading3,this.cellModel,m.MarkdownButtonType.HEADING3),K=this._instantiationService.createInstance(m.TransformMarkdownAction,"notebook.paragraph",this.optionParagraph,"paragraph",this.optionParagraph,this.cellModel,m.MarkdownButtonType.PARAGRAPH);this._toggleTextViewAction=this._instantiationService.createInstance(m.ToggleViewAction,"notebook.toggleTextView","",this.cellModel.defaultTextEditMode===c.TextCellEditModes.RichText?"masked-icon show-text active":"masked-icon show-text",this.richTextViewButton,!0,!1),this._toggleSplitViewAction=this._instantiationService.createInstance(m.ToggleViewAction,"notebook.toggleSplitView","",this.cellModel.defaultTextEditMode===c.TextCellEditModes.SplitView?"masked-icon split-toggle-on active":"masked-icon split-toggle-on",this.splitViewButton,!0,!0),this._toggleMarkdownViewAction=this._instantiationService.createInstance(m.ToggleViewAction,"notebook.toggleMarkdownView","",this.cellModel.defaultTextEditMode===c.TextCellEditModes.Markdown?"masked-icon show-markdown active":"masked-icon show-markdown",this.markdownViewButton,!1,!0);let H=this.mdtoolbar.nativeElement;this._actionBar=new f.Taskbar(H),this._actionBar.context=this;let U=t.$("li.action-item");U.setAttribute("role","presentation");let G=new a.DropdownMenuActionViewItem(V,[W,z,B,K],this._contextMenuService,void 0,this._actionBar.actionRunner,void 0,"masked-pseudo-after dropdown-arrow heading-dropdown",this.headingDropdownLabel,void 0);G.render(U),G.setActionContext(this),this._taskbarContent=[{action:L},{action:R},{action:M},{action:N},{action:P},{element:I},{action:x},{action:F},{element:A},{element:U},{action:this._toggleTextViewAction},{action:this._toggleSplitViewAction},{action:this._toggleMarkdownViewAction}],this._wysiwygTaskbarContent=[{action:L},{action:R},{action:M},{action:N},{action:P},{element:I},{action:x},{action:F},{element:U},{action:this._toggleTextViewAction},{action:this._toggleSplitViewAction},{action:this._toggleMarkdownViewAction}],this.cellModel.showPreview&&!this.cellModel.showMarkdown?this._actionBar.setContent(this._wysiwygTaskbarContent):this._actionBar.setContent(this._taskbarContent),this._notebookEditor=this._notebookService.findNotebookEditor(this.cellModel?.notebookModel?.notebookUri),this.updateActiveViewAction()}async onInsertButtonClick(I,_){t.EventHelper.stop(I,!0);let A=I.target,k=!0,L,R;if(_===m.MarkdownButtonType.LINK_PREVIEW){if(L=await this.createCallout(_,A),!L.insertUnescapedLinkUrl)return;if(this.cellModel.currentMode!==T.CellEditModes.WYSIWYG)k=!1;else{let N=new l.NotebookLinkHandler(this.cellModel?.notebookModel?.notebookUri,L.insertUnescapedLinkUrl,this._configurationService),P=N.getLinkUrl();this.output?.nativeElement?.focus();let x=N.getEncodedLinkUrl();document.execCommand("insertHTML",!1,`<a href="${x}" title="${P}" is-encoded="true" is-absolute=${N.isAbsolutePath}>${(0,d.escape)(L?.insertUnescapedLinkLabel)}</a>`);return}}else _===m.MarkdownButtonType.IMAGE_PREVIEW&&(R=await this.createCallout(_,A),this.cellModel.currentMode!==T.CellEditModes.WYSIWYG&&(k=!1));const M=new m.MarkdownTextTransformer(this._notebookService,this.cellModel);if(k)await M.transformText(_);else if(!k){if(_===m.MarkdownButtonType.LINK_PREVIEW)await(0,m.insertFormattedMarkdown)(L?.insertEscapedMarkdown,this.getCellEditorControl());else if(_===m.MarkdownButtonType.IMAGE_PREVIEW){if(R.embedImage){const N=g.FileAccess.uriToBrowserUri(u.URI.file(R.imagePath));let P=await this.getFileContentBase64(N),x=await this.getFileMimeType(N);const F=o.basename(R.imagePath).replace(/\s/g,"");let V=this.cellModel.addAttachment(x,P,F);F!==V&&(R.insertEscapedMarkdown=`})`)}await(0,m.insertFormattedMarkdown)(R.insertEscapedMarkdown,this.getCellEditorControl())}}}hideImageButton(){this._actionBar.setContent(this._wysiwygTaskbarContent)}showLinkAndImageButtons(){this._actionBar.setContent(this._taskbarContent)}removeActiveClassFromModeActions(){const I=" active";for(let _ of[this._toggleTextViewAction,this._toggleSplitViewAction,this._toggleMarkdownViewAction])_.class.includes(I)&&(_.class=_.class.replace(I,""))}updateActiveViewAction(){this.removeActiveClassFromModeActions();const I=" active";switch(this.cellModel.currentMode){case T.CellEditModes.MARKDOWN:this._toggleMarkdownViewAction.class+=I;break;case T.CellEditModes.SPLIT:this._toggleSplitViewAction.class+=I;break;case T.CellEditModes.WYSIWYG:this._toggleTextViewAction.class+=I;break}}async createCallout(I,_){const A=_.getBoundingClientRect().left,k=_.getBoundingClientRect().top,L=_.offsetHeight,R=_.offsetWidth,M={xPos:A,yPos:k,width:R,height:L},N=window.innerHeight-k<250?"above":"below";let P;if(I===m.MarkdownButtonType.LINK_PREVIEW){const x=this.getCurrentLinkLabel(),F=this.getCurrentLinkUrl();this._linkCallout=this._instantiationService.createInstance(s.LinkCalloutDialog,this.insertLink,N,M,x,F),this._linkCallout.render(),P=await this._linkCallout.open()}else if(I===m.MarkdownButtonType.IMAGE_PREVIEW){const x=this._instantiationService.createInstance(p.ImageCalloutDialog,this.insertImage,N,M);x.render(),P=await x.open()}return P}getCurrentLinkLabel(){if(this.cellModel.currentMode===T.CellEditModes.WYSIWYG)return document.getSelection()?.toString()||"";{const I=this.getCellEditorControl(),_=I?.getSelection();if(_&&!_.isEmpty()){const k=I?.getModel()?.getValueInRange(_);return k?.match(w)?.groups.text||k||""}return""}}getCurrentLinkUrl(){if(this.cellModel.currentMode===T.CellEditModes.WYSIWYG){const I=document.getSelection().anchorNode;if(!I)return"";const _=I.parentNode;return new l.NotebookLinkHandler(this.cellModel?.notebookModel?.notebookUri,_,this._configurationService).getLinkUrl()}else{const I=this.getCellEditorControl(),_=I?.getSelection();return _&&!_.isEmpty()&&I?.getModel()?.getValueInRange(_)?.match(w)?.groups.url||""}}getCellEditorControl(){return this._cellEditor?.getEditor()?.getControl()||(this._cellEditor=this._notebookEditor?.cellEditors?.find(I=>I.cellGuid()===this.cellModel?.cellGuid)),this._cellEditor.getEditor()?.getControl()}async getFileContentBase64(I){return new Promise(async _=>{let k=await(await fetch(I.toString())).blob(),L=new File([k],I.toString()),R=new FileReader;R.onload=function(M){_(M.target.result.toString())},R.readAsDataURL(L)})}async getFileMimeType(I){return(await(await fetch(I.toString())).blob()).type}};e.MarkdownToolbarComponent=E,fe([(0,b.ViewChild)("mdtoolbar",{read:b.ElementRef})],E.prototype,"mdtoolbar",void 0),fe([(0,b.HostListener)("document:keydown",["$event"])],E.prototype,"onkeydown",null),fe([(0,b.Input)()],E.prototype,"cellModel",void 0),fe([(0,b.Input)()],E.prototype,"output",void 0),e.MarkdownToolbarComponent=E=fe([(0,b.Component)({selector:e.MARKDOWN_TOOLBAR_SELECTOR,templateUrl:decodeURI(q.toUrl("./markdownToolbar.component.html"))}),O(0,(0,b.Inject)(S.INotebookService)),O(1,(0,b.Inject)(h.IInstantiationService)),O(2,(0,b.Inject)(v.IContextMenuService)),O(3,(0,b.Inject)(r.IConfigurationService))],E)}),define(Q[1392],Y([1,0,55,20,14,62,6,197,22,42,18,26,10,59,99,50,798,449,2841,13,9,8,29,49,25,41,24,36,19,39,138,103,1379,3559,3560,629,71,148,222,943,1324,70,65,131,614,30]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P,x,F,V,W,z,B,K,H,U,G){"use strict";var $;Object.defineProperty(e,"__esModule",{value:!0}),e.BackLayerWebView=void 0;const ie=/:([\d]+)(?::([\d]+))?$/,J=/line=(\d+)$/;let j=class extends _.Themable{static{$=this}static getOriginStore(se){return this._originStore??=new V.WebviewOriginStore("notebook.backlayerWebview.origins",se),this._originStore}constructor(se,re,oe,le,ne,ce,ae,ue,de,ge,he,be,ve,Ie,Se,we,ye,Re,Le,Pe,Ae,Me,Oe,De,Ce){super(De),this.notebookEditor=se,this.id=re,this.notebookViewType=oe,this.documentUri=le,this.options=ne,this.rendererMessaging=ce,this.webviewService=ae,this.openerService=ue,this.notebookService=de,this.contextService=ge,this.environmentService=he,this.fileDialogService=be,this.fileService=ve,this.contextMenuService=Ie,this.contextKeyService=Se,this.workspaceTrustManagementService=we,this.configurationService=ye,this.languageService=Re,this.workspaceContextService=Le,this.editorGroupService=Pe,this.storageService=Ae,this.pathService=Me,this.notebookLogService=Oe,this.telemetryService=Ce,this.webview=void 0,this.insetMapping=new Map,this.pendingWebviewIdleCreationRequest=new Map,this.pendingWebviewIdleInsetMapping=new Map,this.reversedPendingWebviewIdleInsetMapping=new Map,this.markupPreviewMapping=new Map,this.hiddenInsetMapping=new Set,this.reversedInsetMapping=new Map,this.localResourceRootsCache=void 0,this._onMessage=this._register(new T.Emitter),this._preloadsCache=new Set,this.onMessage=this._onMessage.event,this._disposed=!1,this.firstInit=!0,this.nonce=r.generateUuid(),this._logRendererDebugMessage("Creating backlayer webview for notebook"),this.element=document.createElement("div"),this.element.style.height="1400px",this.element.style.position="absolute",ce&&(this._register(ce),ce.receiveMessageHandler=(_e,me)=>!this.webview||this._disposed?Promise.resolve(!1):(this._sendMessageToWebview({__vscode_notebook_message:!0,type:"customRendererMessage",rendererId:_e,message:me}),Promise.resolve(!0))),this._register(we.onDidChangeTrust(_e=>{const me=this.asWebviewUri(this.getNotebookBaseUri(),void 0),ke=this.generateContent(me.toString());this.webview?.setHtml(ke)})),this._register(i.TokenizationRegistry.onDidChange(()=>{this._sendMessageToWebview({type:"tokenizedStylesChanged",css:X()})}))}updateOptions(se){this.options=se,this._updateStyles(),this._updateOptions()}_logRendererDebugMessage(se){this.notebookLogService.debug("BacklayerWebview",`${this.documentUri} (${this.id}) - ${se}`)}_updateStyles(){this._sendMessageToWebview({type:"notebookStyles",styles:this._generateStyles()})}_updateOptions(){this._sendMessageToWebview({type:"notebookOptions",options:{dragAndDropEnabled:this.options.dragAndDropEnabled},renderOptions:{lineLimit:this.options.outputLineLimit,outputScrolling:this.options.outputScrolling,outputWordWrap:this.options.outputWordWrap}})}_generateStyles(){return{"notebook-output-left-margin":`${this.options.leftMargin+this.options.runGutter}px`,"notebook-output-width":`calc(100% - ${this.options.leftMargin+this.options.rightMargin+this.options.runGutter}px)`,"notebook-output-node-padding":`${this.options.outputNodePadding}px`,"notebook-run-gutter":`${this.options.runGutter}px`,"notebook-preview-node-padding":`${this.options.previewNodePadding}px`,"notebook-markdown-left-margin":`${this.options.markdownLeftMargin}px`,"notebook-output-node-left-padding":`${this.options.outputNodeLeftPadding}px`,"notebook-markdown-min-height":`${this.options.previewNodePadding*2}px`,"notebook-markup-font-size":typeof this.options.markupFontSize=="number"&&this.options.markupFontSize>0?`${this.options.markupFontSize}px`:`calc(${this.options.fontSize}px * 1.2)`,"notebook-cell-output-font-size":`${this.options.outputFontSize||this.options.fontSize}px`,"notebook-cell-output-line-height":`${this.options.outputLineHeight}px`,"notebook-cell-output-max-height":`${this.options.outputLineHeight*this.options.outputLineLimit}px`,"notebook-cell-output-font-family":this.options.outputFontFamily||this.options.fontFamily,"notebook-cell-markup-empty-content":d.localize(0,null),"notebook-cell-renderer-not-found-error":d.localize(1,null),"notebook-cell-renderer-fallbacks-exhausted":d.localize(2,null)}}generateContent(se){const re=this.getRendererData(),oe=this.getStaticPreloadsData(),le={lineLimit:this.options.outputLineLimit,outputScrolling:this.options.outputScrolling,outputWordWrap:this.options.outputWordWrap},ne=(0,M.preloadsScriptStr)({...this.options,tokenizationCss:X()},{dragAndDropEnabled:this.options.dragAndDropEnabled},le,re,oe,this.workspaceTrustManagementService.isWorkspaceTrusted(),this.nonce),ce=this.configurationService.getValue("notebook.experimental.enableCsp"),ae=this.getColor(I.editorFindMatch),ue=this.getColor(I.editorFindMatchHighlight);return` <html lang="en"> <head> <meta charset="UTF-8"> <base href="${se}/" /> ${ce?`<meta http-equiv="Content-Security-Policy" content=" default-src 'none'; script-src ${z.webviewGenericCspSource} 'unsafe-inline' 'unsafe-eval'; style-src ${z.webviewGenericCspSource} 'unsafe-inline'; img-src ${z.webviewGenericCspSource} https: http: data:; font-src ${z.webviewGenericCspSource} https:; connect-src https:; child-src https: data:; ">`:""} <style nonce="${this.nonce}"> ::highlight(find-highlight) { background-color: var(--vscode-editor-findMatchBackground, ${ue}); } ::highlight(current-find-highlight) { background-color: var(--vscode-editor-findMatchHighlightBackground, ${ae}); } #container .cell_container { width: 100%; } #container .output_container { width: 100%; } #container > div > div > div.output { font-size: var(--notebook-cell-output-font-size); width: var(--notebook-output-width); margin-left: var(--notebook-output-left-margin); background-color: var(--theme-notebook-output-background); padding-top: var(--notebook-output-node-padding); padding-right: var(--notebook-output-node-padding); padding-bottom: var(--notebook-output-node-padding); padding-left: var(--notebook-output-node-left-padding); box-sizing: border-box; border-top: none; } /* markdown */ #container div.preview { width: 100%; padding-right: var(--notebook-preview-node-padding); padding-left: var(--notebook-markdown-left-margin); padding-top: var(--notebook-preview-node-padding); padding-bottom: var(--notebook-preview-node-padding); box-sizing: border-box; white-space: nowrap; overflow: hidden; white-space: initial; font-size: var(--notebook-markup-font-size); color: var(--theme-ui-foreground); } #container div.preview.draggable { user-select: none; -webkit-user-select: none; -ms-user-select: none; cursor: grab; } #container div.preview.selected { background: var(--theme-notebook-cell-selected-background); } #container div.preview.dragging { background-color: var(--theme-background); opacity: 0.5 !important; } .monaco-workbench.vs-dark .notebookOverlay .cell.markdown .latex img, .monaco-workbench.vs-dark .notebookOverlay .cell.markdown .latex-block img { filter: brightness(0) invert(1) } #container .markup > div.nb-symbolHighlight { background-color: var(--theme-notebook-symbol-highlight-background); } #container > div.nb-cellDeleted .output_container { background-color: var(--theme-notebook-diff-removed-background); } #container > div.nb-cellAdded .output_container { background-color: var(--theme-notebook-diff-inserted-background); } #container > div > div:not(.preview) > div { overflow-x: auto; } #container .no-renderer-error { color: var(--vscode-editorError-foreground); } body { padding: 0px; height: 100%; width: 100%; } table, thead, tr, th, td, tbody { border: none !important; border-color: transparent; border-spacing: 0; border-collapse: collapse; } table, th, tr { vertical-align: middle; text-align: right; } thead { font-weight: bold; background-color: rgba(130, 130, 130, 0.16); } th, td { padding: 4px 8px; } tr:nth-child(even) { background-color: rgba(130, 130, 130, 0.08); } tbody th { font-weight: normal; } .find-match { background-color: var(--vscode-editor-findMatchHighlightBackground); } .current-find-match { background-color: var(--vscode-editor-findMatchBackground); } #_defaultColorPalatte { color: var(--vscode-editor-findMatchHighlightBackground); background-color: var(--vscode-editor-findMatchBackground); } </style> </head> <body style="overflow: hidden;"> <div id='findStart' tabIndex=-1></div> <div id='container' class="widgetarea" style="position: absolute;width:100%;top: 0px"></div> <div id="_defaultColorPalatte"></div> <script type="module">${ne}</script> </body> </html>`}getRendererData(){return this.notebookService.getRenderers().map(se=>{const re={extends:se.entrypoint.extends,path:this.asWebviewUri(se.entrypoint.path,se.extensionLocation).toString()};return{id:se.id,entrypoint:re,mimeTypes:se.mimeTypes,messaging:se.messaging!=="never",isBuiltin:se.isBuiltin}})}getStaticPreloadsData(){return Array.from(this.notebookService.getStaticPreloads(this.notebookViewType),se=>({entrypoint:this.asWebviewUri(se.entrypoint,se.extensionLocation).toString().toString()}))}asWebviewUri(se,re){return(0,z.asWebviewUri)(se,re?.scheme===v.Schemas.vscodeRemote?{isRemote:!0,authority:re.authority}:void 0)}postKernelMessage(se){this._sendMessageToWebview({__vscode_notebook_message:!0,type:"customKernelMessage",message:se})}resolveOutputId(se){const re=this.reversedInsetMapping.get(se);return re?{cellInfo:this.insetMapping.get(re).cellInfo,output:re}:void 0}isResolved(){return!!this.webview}createWebview(){const se=this.asWebviewUri(this.getNotebookBaseUri(),void 0),re=this.generateContent(se.toString());return this._initialize(re)}getNotebookBaseUri(){if(this.documentUri.scheme===v.Schemas.untitled){const se=this.workspaceContextService.getWorkspaceFolder(this.documentUri);if(se)return se.uri;const re=this.workspaceContextService.getWorkspace().folders;if(re.length)return re[0].uri}return(0,h.dirname)(this.documentUri)}getBuiltinLocalResourceRoots(){return this.documentUri.path.toLowerCase().endsWith(".ipynb")?S.isWeb?[]:[(0,h.dirname)(v.FileAccess.asFileUri("vs/loader.js"))]:[]}_initialize(se){if(!document.body.contains(this.element))throw new Error("Element is already detached from the DOM tree");this.webview=this._createInset(this.webviewService,se),this.webview.mountTo(this.element),this._register(this.webview),this._register(new W.WebviewWindowDragMonitor(()=>this.webview));const re=new b.DeferredPromise;return this._register(this.webview.onFatalError(oe=>{re.error(new Error(`Could not initialize webview: ${oe.message}}`))})),this._register(this.webview.onMessage(async oe=>{const le=oe.message;if(!this._disposed&&le.__vscode_notebook_message)switch(le.type){case"initialized":{re.complete(),this.initializeWebViewState();break}case"initializedMarkup":{this.initializeMarkupPromise?.requestId===le.requestId&&(this.initializeMarkupPromise?.p.complete(),this.initializeMarkupPromise=void 0);break}case"dimension":{for(const ne of le.updates){const ce=ne.height;if(ne.isOutput){const ae=this.resolveOutputId(ne.id);if(ae){const{cellInfo:ue,output:de}=ae;this.notebookEditor.updateOutputHeight(ue,de,ce,!!ne.init,"webview#dimension"),this.notebookEditor.scheduleOutputHeightAck(ue,ne.id,ce)}else if(ne.init){const ue=this.reversedPendingWebviewIdleInsetMapping.get(ne.id);if(ue){const de=this.pendingWebviewIdleInsetMapping.get(ue);this.pendingWebviewIdleCreationRequest.delete(ue),this.pendingWebviewIdleCreationRequest.delete(ue);const ge=de.cellInfo;this.reversedInsetMapping.set(ne.id,ue),this.insetMapping.set(ue,de),this.notebookEditor.updateOutputHeight(ge,ue,ce,!!ne.init,"webview#dimension"),this.notebookEditor.scheduleOutputHeightAck(ge,ne.id,ce)}this.reversedPendingWebviewIdleInsetMapping.delete(ne.id)}{if(!ne.init)continue;const ue=this.reversedInsetMapping.get(ne.id);if(!ue)continue;const de=this.insetMapping.get(ue);de.initialized=!0}}else this.notebookEditor.updateMarkupCellHeight(ne.id,ce,!!ne.init)}break}case"mouseenter":{const ne=this.resolveOutputId(le.id);if(ne){const ce=this.notebookEditor.getCellByInfo(ne.cellInfo);ce&&(ce.outputIsHovered=!0)}break}case"mouseleave":{const ne=this.resolveOutputId(le.id);if(ne){const ce=this.notebookEditor.getCellByInfo(ne.cellInfo);ce&&(ce.outputIsHovered=!1)}break}case"outputFocus":{const ne=this.resolveOutputId(le.id);if(ne){const ce=this.notebookEditor.getCellByInfo(ne.cellInfo);ce&&(ce.outputIsFocused=!0,this.notebookEditor.focusNotebookCell(ce,"output",{skipReveal:!0}))}break}case"outputBlur":{const ne=this.resolveOutputId(le.id);if(ne){const ce=this.notebookEditor.getCellByInfo(ne.cellInfo);ce&&(ce.outputIsFocused=!1)}break}case"scroll-ack":break;case"scroll-to-reveal":{this.notebookEditor.setScrollTop(le.scrollTop-R.NOTEBOOK_WEBVIEW_BOUNDARY);break}case"did-scroll-wheel":{this.notebookEditor.triggerScroll({...le.payload,preventDefault:()=>{},stopPropagation:()=>{}});break}case"focus-editor":{const ne=this.notebookEditor.getCellById(le.cellId);ne&&(le.focusNext?this.notebookEditor.focusNextNotebookCell(ne,"editor"):await this.notebookEditor.focusNotebookCell(ne,"editor"));break}case"clicked-data-url":{this._onDidClickDataLink(le);break}case"clicked-link":{if((0,E.matchesScheme)(le.href,v.Schemas.command)){const ne=a.URI.parse(le.href);if(ne.path==="workbench.action.openLargeOutput"){const ce=ne.query,ae=this.editorGroupService.activeGroup;ae&&ae.activeEditor&&ae.pinEditor(ae.activeEditor),this.openerService.open(x.CellUri.generateCellOutputUri(this.documentUri,ce));return}if(ne.path==="cellOutput.enableScrolling"){const ce=ne.query,ae=this.reversedInsetMapping.get(ce);ae&&(this.telemetryService.publicLog2("workbenchActionExecuted",{id:"notebook.cell.toggleOutputScrolling",from:"inlineLink"}),ae.cellViewModel.outputsViewModels.forEach(ue=>{ue.model.metadata&&(ue.model.metadata.scrollable=!0,ue.resetRenderer())}));return}this.openerService.open(le.href,{fromUserGesture:!0,fromWorkspace:!0,allowCommands:["github-issues.authNow","workbench.extensions.search","workbench.action.openSettings","_notebook.selectKernel","jupyter.viewOutput"]});return}if((0,E.matchesSomeScheme)(le.href,v.Schemas.http,v.Schemas.https,v.Schemas.mailto))this.openerService.open(le.href,{fromUserGesture:!0,fromWorkspace:!0});else if((0,E.matchesScheme)(le.href,v.Schemas.vscodeNotebookCell)){const ne=a.URI.parse(le.href);this._handleNotebookCellResource(ne)}else/^[\w\-]+:/.test(le.href)?t.isAbsolute(le.href)?this._openUri(a.URI.file(le.href)):this._openUri(a.URI.parse(le.href)):this._handleResourceOpening(te(le.href));break}case"customKernelMessage":{this._onMessage.fire({message:le.message});break}case"customRendererMessage":{this.rendererMessaging?.postMessage(le.rendererId,le.message);break}case"clickMarkupCell":{const ne=this.notebookEditor.getCellById(le.cellId);ne&&(le.shiftKey||(S.isMacintosh?le.metaKey:le.ctrlKey)?this.notebookEditor.toggleNotebookCellSelection(ne,le.shiftKey):await this.notebookEditor.focusNotebookCell(ne,"container",{skipReveal:!0}));break}case"contextMenuMarkupCell":{const ne=this.notebookEditor.getCellById(le.cellId);if(ne){await this.notebookEditor.focusNotebookCell(ne,"container",{skipReveal:!0});const ce=this.element.getBoundingClientRect();this.contextMenuService.showContextMenu({menuId:p.MenuId.NotebookCellTitle,contextKeyService:this.contextKeyService,getAnchor:()=>({x:ce.x+le.clientX,y:ce.y+le.clientY})})}break}case"toggleMarkupPreview":{const ne=this.notebookEditor.getCellById(le.cellId);ne&&!this.notebookEditor.creationOptions.isReadOnly&&(this.notebookEditor.setMarkupCellEditState(le.cellId,L.CellEditState.Editing),await this.notebookEditor.focusNotebookCell(ne,"editor",{skipReveal:!0}));break}case"mouseEnterMarkupCell":{const ne=this.notebookEditor.getCellById(le.cellId);ne instanceof P.MarkupCellViewModel&&(ne.cellIsHovered=!0);break}case"mouseLeaveMarkupCell":{const ne=this.notebookEditor.getCellById(le.cellId);ne instanceof P.MarkupCellViewModel&&(ne.cellIsHovered=!1);break}case"cell-drag-start":{this.notebookEditor.didStartDragMarkupCell(le.cellId,le);break}case"cell-drag":{this.notebookEditor.didDragMarkupCell(le.cellId,le);break}case"cell-drop":{this.notebookEditor.didDropMarkupCell(le.cellId,{dragOffsetY:le.dragOffsetY,ctrlKey:le.ctrlKey,altKey:le.altKey});break}case"cell-drag-end":{this.notebookEditor.didEndDragMarkupCell(le.cellId);break}case"renderedMarkup":{const ne=this.notebookEditor.getCellById(le.cellId);ne instanceof P.MarkupCellViewModel&&(ne.renderedHtml=le.html),this._handleHighlightCodeBlock(le.codeBlocks);break}case"renderedCellOutput":{this._handleHighlightCodeBlock(le.codeBlocks);break}case"outputResized":{this.notebookEditor.didResizeOutput(le.cellId);break}case"getOutputItem":{const ce=this.resolveOutputId(le.outputId)?.output.model.outputs.find(ae=>ae.mime===le.mime);this._sendMessageToWebview({type:"returnOutputItem",requestId:le.requestId,output:ce?{mime:ce.mime,valueBytes:ce.data.buffer}:void 0});break}case"logRendererDebugMessage":{this._logRendererDebugMessage(`${le.message}${le.data?" "+JSON.stringify(le.data,null,4):""}`);break}case"notebookPerformanceMessage":{this.notebookEditor.updatePerformanceMetadata(le.cellId,le.executionId,le.duration,le.rendererId);break}case"outputInputFocus":this.notebookEditor.didFocusOutputInputChange(le.inputFocused)}})),re.p}_handleNotebookCellResource(se){const re=/\?line=(\d+)$/.exec(se.fragment);if(re){const oe=parseInt(re[1],10);if(!isNaN(oe)){const le=oe+1,ne=se.fragment.substring(0,re.index),ce={selection:{startLineNumber:le,startColumn:1,endLineNumber:le,endColumn:1}};this.openerService.open(se.with({fragment:ne}),{fromUserGesture:!0,fromWorkspace:!0,editorOptions:ce});return}}return this.openerService.open(se,{fromUserGesture:!0,fromWorkspace:!0}),se}_handleResourceOpening(se){let re;if(se.startsWith("/"))re=a.URI.parse(se);else if(se.startsWith("~")){const oe=this.pathService.resolvedUserHome;oe&&(re=a.URI.parse(t.join(oe.fsPath,se.substring(1))))}else if(this.documentUri.scheme===v.Schemas.untitled){const oe=this.workspaceContextService.getWorkspace().folders;if(!oe.length)return;re=a.URI.joinPath(oe[0].uri,se)}else re=a.URI.joinPath((0,h.dirname)(this.documentUri),se);re&&this._openUri(re)}_openUri(se){let re,oe;const le=ie.exec(se.path);le&&(se=se.with({path:se.path.slice(0,le.index),fragment:`L${le[0].slice(1)}`}),re=parseInt(le[1],10),oe=parseInt(le[2],10));const ne=J.exec(se.query);if(ne){const ae=parseInt(ne[1],10);isNaN(ae)||(re=ae+1,oe=1,se=se.with({fragment:`L${re}`}))}se=se.with({query:null});let ce;for(const ae of this.editorGroupService.groups){const ue=ae.editors.find(de=>de.resource&&(0,h.isEqual)(de.resource,se,!0));if(ue){ce={group:ae,editor:ue};break}}ce?ce.group.openEditor(ce.editor,re!==void 0&&oe!==void 0?{selection:{startLineNumber:re,startColumn:oe}}:void 0):this.openerService.open(se,{fromUserGesture:!0,fromWorkspace:!0})}_handleHighlightCodeBlock(se){for(const{id:re,value:oe,lang:le}of se){const ne=this.languageService.getLanguageIdByLanguageName(le);ne&&(0,u.tokenizeToString)(this.languageService,oe,ne).then(ce=>{this._disposed||this._sendMessageToWebview({type:"tokenizedCodeBlock",html:ce,codeBlockId:re})})}}async _onDidClickDataLink(se){if(typeof se.data!="string")return;const[re,oe]=se.data.split(";base64,");if(!oe||!re)return;const le=(0,h.extname)(this.documentUri)===".interactive"?this.workspaceContextService.getWorkspace().folders[0]?.uri??await this.fileDialogService.defaultFilePath():(0,h.dirname)(this.documentUri);let ne;if(se.downloadName)ne=se.downloadName;else{const de=re.replace(/^data:/,""),ge=de&&(0,f.getExtensionForMimeType)(de);ne=ge?`download${ge}`:"download"}const ce=(0,h.joinPath)(le,ne),ae=await this.fileDialogService.showSaveDialog({defaultUri:ce});if(!ae)return;const ue=(0,D.decodeBase64)(oe);await this.fileService.writeFile(ae,ue),await this.openerService.open(ae)}_createInset(se,re){this.localResourceRootsCache=this._getResourceRootsCache();const oe=se.createWebviewElement({origin:$.getOriginStore(this.storageService).getOrigin(this.notebookViewType,void 0),title:d.localize(3,null),options:{purpose:"notebookRenderer",enableFindWidget:!1,transformCssVariables:N.transformWebviewThemeVars},contentOptions:{allowMultipleAPIAcquire:!0,allowScripts:!0,localResourceRoots:this.localResourceRootsCache},extension:void 0,providedViewType:"notebook.output"});return oe.setHtml(re),oe.setContextKeyService(this.contextKeyService),oe}_getResourceRootsCache(){const se=this.contextService.getWorkspace().folders.map(oe=>oe.uri),re=this.getNotebookBaseUri();return[this.notebookService.getNotebookProviderResourceRoots(),this.notebookService.getRenderers().map(oe=>(0,h.dirname)(oe.entrypoint.path)),...Array.from(this.notebookService.getStaticPreloads(this.notebookViewType),oe=>[(0,h.dirname)(oe.entrypoint),...oe.localResourceRoots]),se,re,this.getBuiltinLocalResourceRoots()].flat()}initializeWebViewState(){this._preloadsCache.clear(),this._currentKernel&&this._updatePreloadsFromKernel(this._currentKernel);for(const[se,re]of this.insetMapping.entries())this._sendMessageToWebview({...re.cachedCreation,initiallyHidden:this.hiddenInsetMapping.has(se)});if(!this.initializeMarkupPromise?.isFirstInit){const se=[...this.markupPreviewMapping.values()];this.markupPreviewMapping.clear(),this.initializeMarkup(se)}this._updateStyles(),this._updateOptions()}shouldUpdateInset(se,re,oe,le){if(this._disposed||"isOutputCollapsed"in se&&se.isOutputCollapsed)return!1;if(this.hiddenInsetMapping.has(re))return!0;const ne=this.insetMapping.get(re);return!(!ne||le===ne.cachedCreation.outputOffset&&oe===ne.cachedCreation.cellTop)}ackHeight(se){this._sendMessageToWebview({type:"ack-dimension",updates:se})}updateScrollTops(se,re){if(this._disposed)return;const oe=(0,y.coalesce)(se.map(le=>{const ne=this.insetMapping.get(le.output);if(!ne||!le.forceDisplay&&!this.shouldUpdateInset(le.cell,le.output,le.cellTop,le.outputOffset))return;const ce=ne.outputId;return ne.cachedCreation.cellTop=le.cellTop,ne.cachedCreation.outputOffset=le.outputOffset,this.hiddenInsetMapping.delete(le.output),{cellId:le.cell.id,outputId:ce,cellTop:le.cellTop,outputOffset:le.outputOffset,forceDisplay:le.forceDisplay}}));!oe.length&&!re.length||this._sendMessageToWebview({type:"view-scroll",widgets:oe,markupCells:re})}async createMarkupPreview(se){if(!this._disposed){if(this.markupPreviewMapping.has(se.cellId)){console.error("Trying to create markup preview that already exists");return}this.markupPreviewMapping.set(se.cellId,se),this._sendMessageToWebview({type:"createMarkupCell",cell:se})}}async showMarkupPreview(se){if(this._disposed)return;const re=this.markupPreviewMapping.get(se.cellId);if(!re)return this.createMarkupPreview(se);const oe=se.content===re.content,le=(0,m.equals)(se.metadata,re.metadata);(!oe||!le||!re.visible)&&this._sendMessageToWebview({type:"showMarkupCell",id:se.cellId,handle:se.cellHandle,content:oe?void 0:se.content,top:se.offset,metadata:le?void 0:se.metadata}),re.metadata=se.metadata,re.content=se.content,re.offset=se.offset,re.visible=!0}async hideMarkupPreviews(se){if(this._disposed)return;const re=[];for(const oe of se){const le=this.markupPreviewMapping.get(oe);le&&le.visible&&(re.push(oe),le.visible=!1)}re.length&&this._sendMessageToWebview({type:"hideMarkupCells",ids:re})}async unhideMarkupPreviews(se){if(this._disposed)return;const re=[];for(const oe of se){const le=this.markupPreviewMapping.get(oe);le?le.visible||(le.visible=!0,re.push(oe)):console.error(`Trying to unhide a preview that does not exist: ${oe}`)}this._sendMessageToWebview({type:"unhideMarkupCells",ids:re})}async deleteMarkupPreviews(se){if(!this._disposed){for(const re of se)this.markupPreviewMapping.has(re)||console.error(`Trying to delete a preview that does not exist: ${re}`),this.markupPreviewMapping.delete(re);se.length&&this._sendMessageToWebview({type:"deleteMarkupCell",ids:se})}}async updateMarkupPreviewSelections(se){this._disposed||this._sendMessageToWebview({type:"updateSelectedMarkupCells",selectedCellIds:se.filter(re=>this.markupPreviewMapping.has(re))})}async initializeMarkup(se){if(this._disposed)return;this.initializeMarkupPromise?.p.complete();const re=r.generateUuid();this.initializeMarkupPromise={p:new b.DeferredPromise,requestId:re,isFirstInit:this.firstInit},this.firstInit=!1;for(const oe of se)this.markupPreviewMapping.set(oe.cellId,oe);return this._sendMessageToWebview({type:"initializeMarkup",cells:se,requestId:re}),this.initializeMarkupPromise.p.p}_cachedInsetEqual(se,re){return re.type===1?se.renderer?.id===re.renderer.id:se.cachedCreation.type==="html"}requestCreateOutputWhenWebviewIdle(se,re,oe,le){this._disposed||this.insetMapping.has(re.source)||this.pendingWebviewIdleCreationRequest.has(re.source)||this.pendingWebviewIdleInsetMapping.has(re.source)||this.pendingWebviewIdleCreationRequest.set(re.source,(0,b.runWhenIdle)(()=>{const{message:ne,renderer:ce,transfer:ae}=this._createOutputCreationMessage(se,re,oe,le,!0,!0);this._sendMessageToWebview(ne,ae),this.pendingWebviewIdleInsetMapping.set(re.source,{outputId:ne.outputId,versionId:re.source.model.versionId,cellInfo:se,renderer:ce,cachedCreation:ne}),this.reversedPendingWebviewIdleInsetMapping.set(ne.outputId,re.source),this.pendingWebviewIdleCreationRequest.delete(re.source)}))}createOutput(se,re,oe,le){if(this._disposed)return;const ne=this.insetMapping.get(re.source);if(this.pendingWebviewIdleCreationRequest.get(re.source)?.dispose(),this.pendingWebviewIdleCreationRequest.delete(re.source),this.pendingWebviewIdleInsetMapping.delete(re.source),ne&&this.reversedPendingWebviewIdleInsetMapping.delete(ne.outputId),ne&&this._cachedInsetEqual(ne,re)){this.hiddenInsetMapping.delete(re.source),this._sendMessageToWebview({type:"showOutput",cellId:ne.cellInfo.cellId,outputId:ne.outputId,cellTop:oe,outputOffset:le});return}const{message:ce,renderer:ae,transfer:ue}=this._createOutputCreationMessage(se,re,oe,le,!1,!1);this._sendMessageToWebview(ce,ue),this.insetMapping.set(re.source,{outputId:ce.outputId,versionId:re.source.model.versionId,cellInfo:se,renderer:ae,cachedCreation:ce}),this.hiddenInsetMapping.delete(re.source),this.reversedInsetMapping.set(ce.outputId,re.source)}createMetadata(se,re){if(re.startsWith("image")){const oe=se.outputs.find(le=>le.mime==="text/plain")?.data.buffer;if(oe?.length&&oe?.length>0){const le=new TextDecoder().decode(oe);return{...se.metadata,vscode_altText:le}}}return se.metadata}_createOutputCreationMessage(se,re,oe,le,ne,ce){const ae={type:"html",executionId:se.executionId,cellId:se.cellId,cellTop:oe,outputOffset:le,left:0,requiredPreloads:[],createOnIdle:ne},ue=[];let de,ge;if(re.type===1){const he=re.source.model;ge=re.renderer;const be=he.outputs.find(Se=>Se.mime===re.mimeType),ve=this.createMetadata(he,re.mimeType),Ie=ee(be.data.buffer,ue);de={...ae,outputId:he.outputId,rendererId:re.renderer.id,content:{type:1,outputId:he.outputId,metadata:ve,output:{mime:be.mime,valueBytes:Ie},allOutputs:he.outputs.map(Se=>({mime:Se.mime}))},initiallyHidden:ce}}else de={...ae,outputId:r.generateUuid(),content:{type:re.type,htmlContent:re.htmlContent},initiallyHidden:ce};return{message:de,renderer:ge,transfer:ue}}updateOutput(se,re,oe,le){if(this._disposed)return;if(!this.insetMapping.has(re.source)){this.createOutput(se,re,oe,le);return}const ne=this.insetMapping.get(re.source);if(ne.versionId===re.source.model.versionId)return;this.hiddenInsetMapping.delete(re.source);let ce;const ae=[];if(re.type===1){const ue=re.source.model,de=ue.outputs.find(ve=>ve.mime===re.mimeType),ge=ue.appendedSinceVersion(ne.versionId,re.mimeType),he=ge?{valueBytes:ge.buffer,previousVersion:ne.versionId}:void 0,be=ee(de.data.buffer,ae);ce={type:1,outputId:ne.outputId,metadata:ue.metadata,output:{mime:re.mimeType,valueBytes:be,appended:he},allOutputs:ue.outputs.map(ve=>({mime:ve.mime}))}}this._sendMessageToWebview({type:"showOutput",cellId:ne.cellInfo.cellId,outputId:ne.outputId,cellTop:oe,outputOffset:le,content:ce},ae),ne.versionId=re.source.model.versionId}async copyImage(se){this._sendMessageToWebview({type:"copyImage",outputId:se.model.outputId,altOutputId:se.model.alternativeOutputId})}removeInsets(se){if(!this._disposed)for(const re of se){const oe=this.insetMapping.get(re);if(!oe)continue;const le=oe.outputId;this._sendMessageToWebview({type:"clearOutput",rendererId:oe.cachedCreation.rendererId,cellUri:oe.cellInfo.cellUri.toString(),outputId:le,cellId:oe.cellInfo.cellId}),this.insetMapping.delete(re),this.pendingWebviewIdleCreationRequest.get(re)?.dispose(),this.pendingWebviewIdleCreationRequest.delete(re),this.pendingWebviewIdleInsetMapping.delete(re),this.reversedPendingWebviewIdleInsetMapping.delete(le),this.reversedInsetMapping.delete(le)}}hideInset(se){if(this._disposed)return;const re=this.insetMapping.get(se);re&&(this.hiddenInsetMapping.add(se),this._sendMessageToWebview({type:"hideOutput",outputId:re.outputId,cellId:re.cellInfo.cellId}))}focusWebview(){this._disposed||this.webview?.focus()}focusOutput(se,re,oe){this._disposed||(oe||this.webview?.focus(),this._sendMessageToWebview({type:"focus-output",cellOrOutputId:se,alternateId:re}))}async find(se,re){if(se==="")return this._sendMessageToWebview({type:"findStop",ownerID:re.ownerID}),[];const oe=new Promise(ne=>{const ce=this.webview?.onMessage(ae=>{ae.message.type==="didFind"&&(ne(ae.message.matches),ce?.dispose())})});return this._sendMessageToWebview({type:"find",query:se,options:re}),await oe}findStop(se){this._sendMessageToWebview({type:"findStop",ownerID:se})}async findHighlightCurrent(se,re){const oe=new Promise(ne=>{const ce=this.webview?.onMessage(ae=>{ae.message.type==="didFindHighlightCurrent"&&(ne(ae.message.offset),ce?.dispose())})});return this._sendMessageToWebview({type:"findHighlightCurrent",index:se,ownerID:re}),await oe}async findUnHighlightCurrent(se,re){this._sendMessageToWebview({type:"findUnHighlightCurrent",index:se,ownerID:re})}deltaCellContainerClassNames(se,re,oe){this._sendMessageToWebview({type:"decorations",cellId:se,addedClassNames:re,removedClassNames:oe})}updateOutputRenderers(){if(!this.webview)return;const se=this.getRendererData();this.localResourceRootsCache=this._getResourceRootsCache();const re=[...this.localResourceRootsCache||[],...this._currentKernel?[this._currentKernel.localResourceRoot]:[]];this.webview.localResourcesRoot=re,this._sendMessageToWebview({type:"updateRenderers",rendererData:se})}async updateKernelPreloads(se){if(this._disposed||se===this._currentKernel)return;const re=this._currentKernel;this._currentKernel=se,re&&re.preloadUris.length>0?this.webview?.reload():se&&this._updatePreloadsFromKernel(se)}_updatePreloadsFromKernel(se){const re=[];for(const oe of se.preloadUris){const le=this.environmentService.isExtensionDevelopment&&(oe.scheme==="http"||oe.scheme==="https")?oe:this.asWebviewUri(oe,void 0);this._preloadsCache.has(le.toString())||(re.push({uri:le.toString(),originalUri:oe.toString()}),this._preloadsCache.add(le.toString()))}re.length&&this._updatePreloads(re)}_updatePreloads(se){if(!this.webview)return;const re=[...this.localResourceRootsCache||[],...this._currentKernel?[this._currentKernel.localResourceRoot]:[]];this.webview.localResourcesRoot=re,this._sendMessageToWebview({type:"preload",resources:se})}_sendMessageToWebview(se,re){this._disposed||this.webview?.postMessage(se,re)}dispose(){this._disposed=!0,this.webview?.dispose(),this.webview=void 0,this.notebookEditor=null,this.insetMapping.clear(),this.pendingWebviewIdleCreationRequest.clear(),super.dispose()}};e.BackLayerWebView=j,e.BackLayerWebView=j=$=fe([O(6,V.IWebviewService),O(7,E.IOpenerService),O(8,F.INotebookService),O(9,A.IWorkspaceContextService),O(10,K.IWorkbenchEnvironmentService),O(11,g.IFileDialogService),O(12,w.IFileService),O(13,n.IContextMenuService),O(14,l.IContextKeyService),O(15,k.IWorkspaceTrustManagementService),O(16,c.IConfigurationService),O(17,s.ILanguageService),O(18,A.IWorkspaceContextService),O(19,B.IEditorGroupsService),O(20,C.IStorageService),O(21,H.IPathService),O(22,U.INotebookLoggingService),O(23,_.IThemeService),O(24,G.ITelemetryService)],j);function ee(Z,se){if(Z.byteLength===Z.buffer.byteLength)return Z;{const re=new Uint8Array(Z);return se.push(re.buffer),re}}function X(){const Z=i.TokenizationRegistry.getColorMap();return Z?(0,o.generateTokensCSSForColorMap)(Z):""}function te(Z){try{return decodeURIComponent(Z)}catch{return Z}}}),define(Q[4037],Y([1,0,6,4,22,18,2959,704,9,5,52,330,30,3306,514,126,3309,39,3755,119,616,1198,594,158,935,268,65,254,131,127,63,23,59,14]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalProcessManager=void 0;var N;(function(z){z[z.ErrorLaunchThresholdDuration=500]="ErrorLaunchThresholdDuration",z[z.LatencyMeasuringInterval=1e3]="LatencyMeasuringInterval"})(N||(N={}));var P;(function(z){z[z.Process=0]="Process",z[z.PsuedoTerminal=1]="PsuedoTerminal"})(P||(P={}));let x=class extends y.Disposable{get persistentProcessId(){return this._process?.id}get shouldPersist(){return!!this.reconnectionProperties||(this._process?this._process.shouldPersist:!1)}get hasWrittenData(){return this._hasWrittenData}get hasChildProcesses(){return this._hasChildProcesses}get reconnectionProperties(){return this._shellLaunchConfig?.attachPersistentProcess?.reconnectionProperties||this._shellLaunchConfig?.reconnectionProperties||void 0}get extEnvironmentVariableCollection(){return this._extEnvironmentVariableCollection}constructor(B,K,H,U,G,$,ie,J,j,ee,X,te,Z,se,re,oe,le,ne,ce,ae){super(),this._instanceId=B,this._configHelper=K,this._historyService=$,this._instantiationService=ie,this._logService=J,this._workspaceContextService=j,this._configurationResolverService=ee,this._workbenchEnvironmentService=X,this._productService=te,this._remoteAgentService=Z,this._pathService=se,this._environmentVariableService=re,this._terminalProfileResolverService=oe,this._configurationService=le,this._terminalInstanceService=ne,this._telemetryService=ce,this._notificationService=ae,this.processState=1,this.capabilities=new i.TerminalCapabilityStore,this._isDisposed=!1,this._process=null,this._processType=0,this._preLaunchInputQueue=[],this._hasWrittenData=!1,this._hasChildProcesses=!1,this._ptyListenersAttached=!1,this._isDisconnected=!1,this._dimensions={cols:0,rows:0},this._onPtyDisconnect=this._register(new t.Emitter),this.onPtyDisconnect=this._onPtyDisconnect.event,this._onPtyReconnect=this._register(new t.Emitter),this.onPtyReconnect=this._onPtyReconnect.event,this._onProcessReady=this._register(new t.Emitter),this.onProcessReady=this._onProcessReady.event,this._onProcessStateChange=this._register(new t.Emitter),this.onProcessStateChange=this._onProcessStateChange.event,this._onBeforeProcessData=this._register(new t.Emitter),this.onBeforeProcessData=this._onBeforeProcessData.event,this._onProcessData=this._register(new t.Emitter),this.onProcessData=this._onProcessData.event,this._onProcessReplayComplete=this._register(new t.Emitter),this.onProcessReplayComplete=this._onProcessReplayComplete.event,this._onDidChangeProperty=this._register(new t.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._onEnvironmentVariableInfoChange=this._register(new t.Emitter),this.onEnvironmentVariableInfoChanged=this._onEnvironmentVariableInfoChange.event,this._onProcessExit=this._register(new t.Emitter),this.onProcessExit=this._onProcessExit.event,this._onRestoreCommands=this._register(new t.Emitter),this.onRestoreCommands=this._onRestoreCommands.event,this._cwdWorkspaceFolder=w.getWorkspaceForTerminal(H,this._workspaceContextService,this._historyService),this.ptyProcessReady=this._createPtyProcessReadyPromise(),this._ackDataBufferer=new F(ue=>this._process?.acknowledgeDataEvent(ue)),this._dataFilter=this._instantiationService.createInstance(W),this._dataFilter.onProcessData(ue=>{const ge={data:typeof ue=="string"?ue:ue.data};this._onBeforeProcessData.fire(ge),ge.data&&ge.data.length>0&&(typeof ue!="string"&&(ue.data=ge.data),this._onProcessData.fire(typeof ue!="string"?ue:{data:ge.data,trackCommit:!1}))}),H&&typeof H=="object"?this.remoteAuthority=(0,h.getRemoteAuthority)(H):this.remoteAuthority=this._workbenchEnvironmentService.remoteAuthority,U&&(this._extEnvironmentVariableCollection=new l.MergedEnvironmentVariableCollection(U),this._register(this._environmentVariableService.onDidChangeCollections(ue=>this._onEnvironmentVariableCollectionChange(ue))),this.environmentVariableInfo=this._instantiationService.createInstance(d.EnvironmentVariableInfoChangesActive,this._extEnvironmentVariableCollection),this._onEnvironmentVariableInfoChange.fire(this.environmentVariableInfo)),this.shellIntegrationNonce=G??(0,R.generateUuid)()}async freePortKillProcess(B){try{this._process?.freePortKillProcess&&await this._process?.freePortKillProcess(B)}catch(K){this._notificationService.notify({message:(0,T.localize)(0,null,B,K),severity:k.default.Warning})}}dispose(B=!1){this._isDisposed=!0,this._process&&(this._setProcessState(5),this._process.shutdown(B),this._process=null),super.dispose()}_createPtyProcessReadyPromise(){return new Promise(B=>{const K=this.onProcessReady(()=>{this._logService.debug(`Terminal process ready (shellProcessId: ${this.shellProcessId})`),K.dispose(),B(void 0)})})}async detachFromProcess(B){await this._process?.detach?.(B),this._process=null}async createProcess(B,K,H,U=!0){this._shellLaunchConfig=B,this._dimensions.cols=K,this._dimensions.rows=H;let G;if(B.customPtyImplementation)this._processType=1,G=B.customPtyImplementation(this._instanceId,K,H);else{const ie=await this._terminalInstanceService.getBackend(this.remoteAuthority);if(!ie)throw new Error(`No terminal backend registered for remote authority '${this.remoteAuthority}'`);this.backend=ie;const J=w.createVariableResolver(this._cwdWorkspaceFolder,await this._terminalProfileResolverService.getEnvironment(this.remoteAuthority),this._configurationResolverService);if(this.userHome=this._pathService.resolvedUserHome?.fsPath,this.os=D.OS,this.remoteAuthority){const j=await this._pathService.userHome();this.userHome=j.path;const ee=await this._remoteAgentService.getEnvironment();if(!ee)throw new Error(`Failed to get remote environment for remote authority "${this.remoteAuthority}"`);this.userHome=ee.userHome.path,this.os=ee.os;const X=await this._resolveEnvironment(ie,J,B),te=(this._configurationService.getValue("task.reconnection")&&B.reconnectionProperties||!B.isFeatureTerminal)&&this._configHelper.config.enablePersistentSessions&&!B.isTransient;if(B.attachPersistentProcess){const Z=await ie.attachToProcess(B.attachPersistentProcess.id);Z?G=Z:(this._logService.warn("Attach to process failed for terminal",B.attachPersistentProcess),B.attachPersistentProcess=void 0)}if(!G){await this._terminalProfileResolverService.resolveShellLaunchConfig(B,{remoteAuthority:this.remoteAuthority,os:this.os});const Z={shellIntegration:{enabled:this._configurationService.getValue("terminal.integrated.shellIntegration.enabled"),suggestEnabled:this._configurationService.getValue("terminal.integrated.shellIntegration.suggestEnabled"),nonce:this.shellIntegrationNonce},windowsEnableConpty:this._configHelper.config.windowsEnableConpty,environmentVariableCollections:this._extEnvironmentVariableCollection?.collections?(0,n.serializeEnvironmentVariableCollections)(this._extEnvironmentVariableCollection.collections):void 0,workspaceFolder:this._cwdWorkspaceFolder};try{G=await ie.createProcess(B,"",K,H,this._configHelper.config.unicodeVersion,X,Z,te)}catch(se){if(se?.message==="Could not fetch remote environment"){this._logService.trace("Could not fetch remote environment, silently failing");return}throw se}}this._isDisposed||this._setupPtyHostListeners(ie)}else{if(B.attachPersistentProcess){const j=B.attachPersistentProcess.findRevivedId?await ie.attachToRevivedProcess(B.attachPersistentProcess.id):await ie.attachToProcess(B.attachPersistentProcess.id);j?G=j:(this._logService.warn("Attach to process failed for terminal",B.attachPersistentProcess),B.attachPersistentProcess=void 0)}G||(G=await this._launchLocalProcess(ie,B,K,H,this.userHome,J)),this._isDisposed||this._setupPtyHostListeners(ie)}}if(this._isDisposed){G.shutdown(!1);return}this._process=G,this._setProcessState(2),(this.os===3||this.os===2)&&this.capabilities.add(1,new r.NaiveCwdDetectionCapability(this._process)),this._dataFilter.newProcess(this._process,U),this._processListeners&&(0,y.dispose)(this._processListeners),this._processListeners=[G.onProcessReady(ie=>{this.shellProcessId=ie.pid,this._initialCwd=ie.cwd,this._onDidChangeProperty.fire({type:"initialCwd",value:this._initialCwd}),this._onProcessReady.fire(ie),this._preLaunchInputQueue.length>0&&this._process&&(G.input(this._preLaunchInputQueue.join("")),this._preLaunchInputQueue.length=0)}),G.onProcessExit(ie=>this._onExit(ie)),G.onDidChangeProperty(({type:ie,value:J})=>{switch(ie){case"hasChildProcesses":this._hasChildProcesses=J;break;case"failedShellIntegrationActivation":this._telemetryService?.publicLog2("terminal/shellIntegrationActivationFailureCustomArgs");break}this._onDidChangeProperty.fire({type:ie,value:J})})],G.onProcessReplayComplete&&this._processListeners.push(G.onProcessReplayComplete(()=>this._onProcessReplayComplete.fire())),G.onRestoreCommands&&this._processListeners.push(G.onRestoreCommands(ie=>this._onRestoreCommands.fire(ie))),setTimeout(()=>{this.processState===2&&this._setProcessState(3)},500);const $=await G.start();if($)return $;(0,M.runWhenIdle)(()=>{this.backend?.getLatency().then(ie=>{this._logService?.info(`Latency measurements for ${this.remoteAuthority??"local"} backend ${ie.map(J=>`${J.label}: ${J.latency.toFixed(2)}ms`).join(` `)}`)})})}async relaunch(B,K,H,U){return this.ptyProcessReady=this._createPtyProcessReadyPromise(),this._logService.trace(`Relaunching terminal instance ${this._instanceId}`),this._isDisconnected&&(this._isDisconnected=!1,this._onPtyReconnect.fire()),this._hasWrittenData=!1,this.createProcess(B,K,H,U)}async _resolveEnvironment(B,K,H){const U=w.getWorkspaceForTerminal(H.cwd,this._workspaceContextService,this._historyService),G=D.isWindows?"windows":D.isMacintosh?"osx":"linux",$=this._configurationService.getValue(`terminal.integrated.env.${G}`);this._configHelper.showRecommendations(H);let ie;H.useShellEnvironment?ie=await B.getShellEnvironment():ie=await this._terminalProfileResolverService.getEnvironment(this.remoteAuthority);const J=await w.createTerminalEnvironment(H,$,K,this._productService.version,this._configHelper.config.detectLocale,ie);return!this._isDisposed&&!H.strictEnv&&!H.hideFromUser&&(this._extEnvironmentVariableCollection=this._environmentVariableService.mergedCollection,this._register(this._environmentVariableService.onDidChangeCollections(j=>this._onEnvironmentVariableCollectionChange(j))),await this._extEnvironmentVariableCollection.applyToProcessEnvironment(J,{workspaceFolder:U},K),this._extEnvironmentVariableCollection.getVariableMap({workspaceFolder:U}).size&&(this.environmentVariableInfo=this._instantiationService.createInstance(d.EnvironmentVariableInfoChangesActive,this._extEnvironmentVariableCollection),this._onEnvironmentVariableInfoChange.fire(this.environmentVariableInfo))),J}async _launchLocalProcess(B,K,H,U,G,$){await this._terminalProfileResolverService.resolveShellLaunchConfig(K,{remoteAuthority:void 0,os:D.OS});const ie=this._historyService.getLastActiveWorkspaceRoot(b.Schemas.file),J=await w.getCwd(K,G,$,ie,this._configHelper.config.cwd,this._logService),j=await this._resolveEnvironment(B,$,K),ee={shellIntegration:{enabled:this._configurationService.getValue("terminal.integrated.shellIntegration.enabled"),suggestEnabled:this._configurationService.getValue("terminal.integrated.shellIntegration.suggestEnabled"),nonce:this.shellIntegrationNonce},windowsEnableConpty:this._configHelper.config.windowsEnableConpty,environmentVariableCollections:this._extEnvironmentVariableCollection?(0,n.serializeEnvironmentVariableCollections)(this._extEnvironmentVariableCollection.collections):void 0,workspaceFolder:this._cwdWorkspaceFolder},X=(this._configurationService.getValue("task.reconnection")&&K.reconnectionProperties||!K.isFeatureTerminal)&&this._configHelper.config.enablePersistentSessions&&!K.isTransient;return await B.createProcess(K,J,H,U,this._configHelper.config.unicodeVersion,j,ee,X)}_setupPtyHostListeners(B){this._ptyListenersAttached||(this._ptyListenersAttached=!0,this._register(B.onPtyHostUnresponsive(()=>{this._isDisconnected=!0,this._onPtyDisconnect.fire()})),this._ptyResponsiveListener=B.onPtyHostResponsive(()=>{this._isDisconnected=!1,this._onPtyReconnect.fire()}),this._register((0,y.toDisposable)(()=>this._ptyResponsiveListener?.dispose())),this._register(B.onPtyHostRestart(async()=>{if(this._isDisconnected||(this._isDisconnected=!0,this._onPtyDisconnect.fire()),this._ptyResponsiveListener?.dispose(),this._ptyResponsiveListener=void 0,this._shellLaunchConfig)if(this._shellLaunchConfig.isFeatureTerminal&&!this.reconnectionProperties)this._onExit(-1);else{const K=(0,T.localize)(1,null);this._onProcessData.fire({data:(0,f.formatMessageForTerminal)(K,{loudFormatting:!0}),trackCommit:!1}),await this.relaunch(this._shellLaunchConfig,this._dimensions.cols,this._dimensions.rows,!1)}})))}async getBackendOS(){let B=D.OS;if(this.remoteAuthority){const K=await this._remoteAgentService.getEnvironment();if(!K)throw new Error(`Failed to get remote environment for remote authority "${this.remoteAuthority}"`);B=K.os}return B}setDimensions(B,K,H){if(H){this._resize(B,K);return}return this.ptyProcessReady.then(()=>this._resize(B,K))}async setUnicodeVersion(B){return this._process?.setUnicodeVersion(B)}_resize(B,K){if(this._process){try{this._process.resize(B,K)}catch(H){if(H.code!=="EPIPE"&&H.code!=="ERR_IPC_CHANNEL_CLOSED")throw H}this._dimensions.cols=B,this._dimensions.rows=K}}async write(B){await this.ptyProcessReady,this._dataFilter.disableSeamlessRelaunch(),this._hasWrittenData=!0,this.shellProcessId||this._processType===1?this._process&&this._process.input(B):this._preLaunchInputQueue.push(B)}async processBinary(B){await this.ptyProcessReady,this._dataFilter.disableSeamlessRelaunch(),this._hasWrittenData=!0,this._process?.processBinary(B)}get initialCwd(){return this._initialCwd??""}async refreshProperty(B){if(!this._process)throw new Error("Cannot refresh property when process is not set");return this._process.refreshProperty(B)}async updateProperty(B,K){return this._process?.updateProperty(B,K)}acknowledgeDataEvent(B){this._ackDataBufferer.ack(B)}_onExit(B){this._process=null,this.processState===2&&this._setProcessState(4),this.processState===3&&this._setProcessState(6),this._onProcessExit.fire(B)}_setProcessState(B){this.processState=B,this._onProcessStateChange.fire()}_onEnvironmentVariableCollectionChange(B){const K=this._extEnvironmentVariableCollection.diff(B,{workspaceFolder:this._cwdWorkspaceFolder});if(K===void 0){this.environmentVariableInfo instanceof d.EnvironmentVariableInfoStale&&(this.environmentVariableInfo=this._instantiationService.createInstance(d.EnvironmentVariableInfoChangesActive,this._extEnvironmentVariableCollection),this._onEnvironmentVariableInfoChange.fire(this.environmentVariableInfo));return}this.environmentVariableInfo=this._instantiationService.createInstance(d.EnvironmentVariableInfoStale,K,this._instanceId,B),this._onEnvironmentVariableInfoChange.fire(this.environmentVariableInfo)}async clearBuffer(){this._process?.clearBuffer?.()}};e.TerminalProcessManager=x,e.TerminalProcessManager=x=fe([O(5,I.IHistoryService),O(6,m.IInstantiationService),O(7,s.ITerminalLogService),O(8,u.IWorkspaceContextService),O(9,E.IConfigurationResolverService),O(10,C.IWorkbenchEnvironmentService),O(11,S.IProductService),O(12,A.IRemoteAgentService),O(13,_.IPathService),O(14,c.IEnvironmentVariableService),O(15,g.ITerminalProfileResolverService),O(16,v.IConfigurationService),O(17,p.ITerminalInstanceService),O(18,a.ITelemetryService),O(19,L.INotificationService)],x);class F{constructor(B){this._callback=B,this._unsentCharCount=0}ack(B){for(this._unsentCharCount+=B;this._unsentCharCount>5e3;)this._unsentCharCount-=5e3,this._callback(5e3)}}var V;(function(z){z[z.RecordTerminalDuration=1e4]="RecordTerminalDuration",z[z.SwapWaitMaximumDuration=3e3]="SwapWaitMaximumDuration"})(V||(V={}));let W=class extends y.Disposable{get onProcessData(){return this._onProcessData.event}constructor(B){super(),this._logService=B,this._disableSeamlessRelaunch=!1,this._onProcessData=this._register(new t.Emitter)}newProcess(B,K){if(this._dataListener?.dispose(),this._activeProcess?.shutdown(!1),this._activeProcess=B,!this._firstRecorder||!K||this._disableSeamlessRelaunch){this._firstDisposable?.dispose(),[this._firstRecorder,this._firstDisposable]=this._createRecorder(B),this._disableSeamlessRelaunch&&K&&this._onProcessData.fire("\x1Bc"),this._dataListener=B.onProcessData(U=>this._onProcessData.fire(U)),this._disableSeamlessRelaunch=!1;return}this._secondRecorder&&this.triggerSwap(),this._swapTimeout=window.setTimeout(()=>this.triggerSwap(),3e3),this._dataListener?.dispose(),this._firstDisposable?.dispose();const H=this._createRecorder(B);[this._secondRecorder,this._secondDisposable]=H}disableSeamlessRelaunch(){this._disableSeamlessRelaunch=!0,this._stopRecording(),this.triggerSwap()}triggerSwap(){if(this._swapTimeout&&(window.clearTimeout(this._swapTimeout),this._swapTimeout=void 0),!this._firstRecorder)return;if(!this._secondRecorder){this._firstRecorder=void 0,this._firstDisposable?.dispose();return}const B=this._getDataFromRecorder(this._firstRecorder),K=this._getDataFromRecorder(this._secondRecorder);B===K?this._logService.trace("Seamless terminal relaunch - identical content"):(this._logService.trace("Seamless terminal relaunch - resetting content"),this._onProcessData.fire({data:`\x1Bc${K}`,trackCommit:!1})),this._dataListener?.dispose(),this._dataListener=this._activeProcess.onProcessData(H=>this._onProcessData.fire(H)),this._firstRecorder=this._secondRecorder,this._firstDisposable?.dispose(),this._firstDisposable=this._secondDisposable,this._secondRecorder=void 0}_stopRecording(){this._swapTimeout||(this._firstRecorder=void 0,this._firstDisposable?.dispose(),this._secondRecorder=void 0,this._secondDisposable?.dispose())}_createRecorder(B){const K=new o.TerminalRecorder(0,0),H=B.onProcessData(U=>K.handleData(typeof U=="string"?U:U.data));return[K,H]}_getDataFromRecorder(B){return B.generateReplayEventSync().events.filter(K=>!!K.data).map(K=>K.data).join("")}};W=fe([O(0,s.ITerminalLogService)],W)}),define(Q[4038],Y([1,0,139,9,28,39,21,43,268,35,3679,61,744,131,44]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationResolverService=void 0;let s=class extends S.BaseConfigurationResolverService{constructor(u,d,p,c,l,n,g,w,E,C){super({getAppRoot:()=>d.appRoot,getExecPath:()=>d.execPath},w.getShellEnv(),u,p,c,l,n,g,E,C)}};e.ConfigurationResolverService=s,e.ConfigurationResolverService=s=fe([O(0,T.IEditorService),O(1,t.INativeWorkbenchEnvironmentService),O(2,y.IConfigurationService),O(3,b.ICommandService),O(4,D.IWorkspaceContextService),O(5,f.IQuickInputService),O(6,h.ILabelService),O(7,a.IShellEnvironmentService),O(8,r.IPathService),O(9,i.IExtensionService)],s),(0,m.registerSingleton)(v.IConfigurationResolverService,s,1)}),define(Q[1393],Y([1,0,3063,26,42,25,43,10,18,49,61,39,23,57,50,252,22,65,127,8,33,38,206,6,4,14,21,180,131,66]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleFileDialog=e.RemoteFileDialogContext=e.OpenLocalFileFolderCommand=e.OpenLocalFolderCommand=e.SaveLocalFileCommand=e.OpenLocalFileCommand=void 0;var k;(function(x){x.ID="workbench.action.files.openLocalFile",x.LABEL=t.localize(0,null);function F(){return V=>V.get(m.IFileDialogService).pickFileAndOpen({forceNewWindow:!1,availableFileSystems:[o.Schemas.file]})}x.handler=F})(k||(e.OpenLocalFileCommand=k={}));var L;(function(x){x.ID="workbench.action.files.saveLocalFile",x.LABEL=t.localize(1,null);function F(){return V=>{const W=V.get(C.IEditorService),z=W.activeEditorPane;return z?W.save({groupId:z.group.id,editor:z.input},{saveAs:!0,availableFileSystems:[o.Schemas.file],reason:1}):Promise.resolve(void 0)}}x.handler=F})(L||(e.SaveLocalFileCommand=L={}));var R;(function(x){x.ID="workbench.action.files.openLocalFolder",x.LABEL=t.localize(2,null);function F(){return V=>V.get(m.IFileDialogService).pickFolderAndOpen({forceNewWindow:!1,availableFileSystems:[o.Schemas.file]})}x.handler=F})(R||(e.OpenLocalFolderCommand=R={}));var M;(function(x){x.ID="workbench.action.files.openLocalFileFolder",x.LABEL=t.localize(3,null);function F(){return V=>V.get(m.IFileDialogService).pickFileFolderAndOpen({forceNewWindow:!1,availableFileSystems:[o.Schemas.file]})}x.handler=F})(M||(e.OpenLocalFileFolderCommand=M={}));var N;(function(x){x[x.Updated=0]="Updated",x[x.UpdatedWithTrailing=1]="UpdatedWithTrailing",x[x.Updating=2]="Updating",x[x.NotUpdated=3]="NotUpdated",x[x.InvalidPath=4]="InvalidPath"})(N||(N={})),e.RemoteFileDialogContext=new p.RawContextKey("remoteFileDialogVisible",!1);let P=class{constructor(F,V,W,z,B,K,H,U,G,$,ie,J,j,ee){this.fileService=F,this.quickInputService=V,this.labelService=W,this.workspaceContextService=z,this.notificationService=B,this.fileDialogService=K,this.modelService=H,this.languageService=U,this.environmentService=G,this.remoteAgentService=$,this.pathService=ie,this.keybindingService=J,this.accessibilityService=ee,this.hidden=!1,this.allowFileSelection=!0,this.allowFolderSelection=!1,this.requiresTrailing=!1,this.userEnteredPathSegment="",this.autoCompletePathSegment="",this.isWindows=!1,this.separator="/",this.onBusyChangeEmitter=new g.Emitter,this.disposables=[this.onBusyChangeEmitter],this.remoteAuthority=this.environmentService.remoteAuthority,this.contextKey=e.RemoteFileDialogContext.bindTo(j),this.scheme=this.pathService.defaultUriScheme}set busy(F){this.filePickBox.busy!==F&&(this.filePickBox.busy=F,this.onBusyChangeEmitter.fire(F))}get busy(){return this.filePickBox.busy}async showOpenDialog(F={}){this.scheme=this.getScheme(F.availableFileSystems,F.defaultUri),this.userHome=await this.getUserHome(),this.trueHome=await this.getUserHome(!0);const V=this.getOptions(F);return V?(this.options=V,this.pickResource()):Promise.resolve(void 0)}async showSaveDialog(F){this.scheme=this.getScheme(F.availableFileSystems,F.defaultUri),this.userHome=await this.getUserHome(),this.trueHome=await this.getUserHome(!0),this.requiresTrailing=!0;const V=this.getOptions(F,!0);return V?(this.options=V,this.options.canSelectFolders=!0,this.options.canSelectFiles=!0,new Promise(W=>{this.pickResource(!0).then(z=>{W(z)})})):Promise.resolve(void 0)}getOptions(F,V=!1){let W,z;if(F.defaultUri&&(W=this.scheme===F.defaultUri.scheme?F.defaultUri:void 0,z=V?y.basename(F.defaultUri):void 0),W||(W=this.userHome,z&&(W=y.joinPath(W,z))),this.scheme!==o.Schemas.file&&!this.fileService.hasProvider(W)){this.notificationService.info(t.localize(4,null,W.toString()));return}const B=b.deepClone(F);return B.defaultUri=W,B}remoteUriFrom(F,V){F.startsWith("\\\\")||(F=F.replace(/\\/g,"/"));const W=this.scheme===o.Schemas.file?f.URI.file(F):f.URI.from({scheme:this.scheme,path:F,query:V?.query,fragment:V?.fragment}),z=W.scheme===o.Schemas.file?void 0:this.remoteAuthority??V?.authority;return y.toLocalResource(W,z,z?this.pathService.defaultUriScheme:W.scheme)}getScheme(F,V){return F&&F.length>0?V&&F.indexOf(V.scheme)>=0?V.scheme:F[0]:V?V.scheme:o.Schemas.file}async getRemoteAgentEnvironment(){return this.remoteAgentEnvironment===void 0&&(this.remoteAgentEnvironment=await this.remoteAgentService.getEnvironment()),this.remoteAgentEnvironment}getUserHome(F=!1){return F?this.pathService.userHome({preferLocal:this.scheme===o.Schemas.file}):this.fileDialogService.preferredHome(this.scheme)}async pickResource(F=!1){this.allowFolderSelection=!!this.options.canSelectFolders,this.allowFileSelection=!!this.options.canSelectFiles,this.separator=this.labelService.getSeparator(this.scheme,this.remoteAuthority),this.hidden=!1,this.isWindows=await this.checkIsWindowsOS();let V=this.options.defaultUri?this.options.defaultUri:this.workspaceContextService.getWorkspace().folders[0].uri,W;const z=y.extname(V);if(this.options.defaultUri){try{W=await this.fileService.stat(this.options.defaultUri)}catch{}(!W||!W.isDirectory)&&(V=y.dirname(this.options.defaultUri),this.trailing=y.basename(this.options.defaultUri))}return new Promise(B=>{if(this.filePickBox=this.quickInputService.createQuickPick(),this.busy=!0,this.filePickBox.matchOnLabel=!1,this.filePickBox.sortByLabel=!1,this.filePickBox.autoFocusOnList=!1,this.filePickBox.ignoreFocusOut=!0,this.filePickBox.ok=!0,this.scheme!==o.Schemas.file&&this.options&&this.options.availableFileSystems&&this.options.availableFileSystems.length>1&&this.options.availableFileSystems.indexOf(o.Schemas.file)>-1){this.filePickBox.customButton=!0,this.filePickBox.customLabel=t.localize(5,null);let $;F?$=L:$=this.allowFileSelection?this.allowFolderSelection?M:k:R;const ie=this.keybindingService.lookupKeybinding($.ID);if(ie){const J=ie.getLabel();J&&(this.filePickBox.customHover=(0,c.format)("{0} ({1})",$.LABEL,J))}}let K=0,H=!1;this.currentFolder=y.dirname(V),this.userEnteredPathSegment="",this.autoCompletePathSegment="",this.filePickBox.title=this.options.title,this.filePickBox.value=this.pathFromUri(this.currentFolder,!0),this.filePickBox.valueSelection=[this.filePickBox.value.length,this.filePickBox.value.length],this.filePickBox.items=[];function U($,ie){ie&&(ie=y.addTrailingPathSeparator(ie,$.separator),ie=y.removeTrailingPathSeparator(ie)),B(ie),$.contextKey.set(!1),$.filePickBox.dispose(),(0,w.dispose)($.disposables)}this.filePickBox.onDidCustom(()=>{if(!(H||this.busy))return H=!0,K++,this.options.availableFileSystems&&this.options.availableFileSystems.length>1&&(this.options.availableFileSystems=this.options.availableFileSystems.slice(1)),this.filePickBox.hide(),F?this.fileDialogService.showSaveDialog(this.options).then($=>{U(this,$)}):this.fileDialogService.showOpenDialog(this.options).then($=>{U(this,$?$[0]:void 0)})});function G($){if($.busy){$.onBusyChangeEmitter.event(ie=>{ie||G($)});return}else if(H)return;H=!0,K++,$.onDidAccept().then(ie=>{ie?($.filePickBox.hide(),U($,ie)):$.hidden?U($,void 0):(K--,H=!1)})}this.filePickBox.onDidAccept($=>{G(this)}),this.filePickBox.onDidChangeActive($=>{if(H=!1,$.length===1&&this.isSelectionChangeFromUser()){this.filePickBox.validationMessage=void 0;const ie=this.constructFullUserPath();(0,c.equalsIgnoreCase)(this.filePickBox.value.substring(0,ie.length),ie)||(this.filePickBox.valueSelection=[0,this.filePickBox.value.length],this.insertText(ie,ie)),this.setAutoComplete(ie,this.userEnteredPathSegment,$[0],!0)}}),this.filePickBox.onDidChangeValue(async $=>this.handleValueChange($)),this.filePickBox.onDidHide(()=>{this.hidden=!0,K===0&&U(this,void 0)}),this.filePickBox.show(),this.contextKey.set(!0),this.updateItems(V,!0,this.trailing).then(()=>{this.trailing?this.filePickBox.valueSelection=[this.filePickBox.value.length-this.trailing.length,this.filePickBox.value.length-z.length]:this.filePickBox.valueSelection=[this.filePickBox.value.length,this.filePickBox.value.length],this.busy=!1})})}async handleValueChange(F){try{if(this.isValueChangeFromUser())if(!(0,c.equalsIgnoreCase)(F,this.constructFullUserPath())&&!this.isBadSubpath(F)){this.filePickBox.validationMessage=void 0;const V=this.filePickBoxValue();let W=N.NotUpdated;y.extUriIgnorePathCase.isEqual(this.currentFolder,V)||(W=await this.tryUpdateItems(F,V)),(W===N.NotUpdated||W===N.UpdatedWithTrailing)&&this.setActiveItems(F)}else this.filePickBox.activeItems=[],this.userEnteredPathSegment=""}catch{}}isBadSubpath(F){return this.badPath&&F.length>this.badPath.length&&(0,c.equalsIgnoreCase)(F.substring(0,this.badPath.length),this.badPath)}isValueChangeFromUser(){return!(0,c.equalsIgnoreCase)(this.filePickBox.value,this.pathAppend(this.currentFolder,this.userEnteredPathSegment+this.autoCompletePathSegment))}isSelectionChangeFromUser(){return this.activeItem!==(this.filePickBox.activeItems?this.filePickBox.activeItems[0]:void 0)}constructFullUserPath(){const F=this.pathFromUri(this.currentFolder);return(0,c.equalsIgnoreCase)(this.filePickBox.value.substr(0,this.userEnteredPathSegment.length),this.userEnteredPathSegment)?(0,c.equalsIgnoreCase)(this.filePickBox.value.substr(0,F.length),F)?F:this.userEnteredPathSegment:this.pathAppend(this.currentFolder,this.userEnteredPathSegment)}filePickBoxValue(){const F=this.remoteUriFrom(this.filePickBox.value.trimRight(),this.currentFolder),V=this.pathFromUri(this.currentFolder);if((0,c.equalsIgnoreCase)(this.filePickBox.value,V))return this.currentFolder;const W=this.remoteUriFrom(V,this.currentFolder),z=y.relativePath(W,F),B=this.filePickBox.value.length>1&&V.length>1?(0,c.equalsIgnoreCase)(this.filePickBox.value.substr(0,2),V.substr(0,2)):!1;if(z&&B){let K=y.joinPath(this.currentFolder,z);const H=y.basename(F);return(H==="."||H==="..")&&(K=this.remoteUriFrom(this.pathAppend(K,H),this.currentFolder)),y.hasTrailingPathSeparator(F)?y.addTrailingPathSeparator(K):K}else return F}async onDidAccept(){if(this.busy=!0,this.filePickBox.activeItems.length===1){const V=this.filePickBox.selectedItems[0];if(V.isFolder){if(this.trailing)await this.updateItems(V.uri,!0,this.trailing);else{const W=this.pathFromUri(V.uri);(0,c.startsWithIgnoreCase)(W,this.filePickBox.value)&&(0,c.equalsIgnoreCase)(V.label,y.basename(V.uri))?(this.filePickBox.valueSelection=[this.pathFromUri(this.currentFolder).length,this.filePickBox.value.length],this.insertText(W,this.basenameWithTrailingSlash(V.uri))):V.label===".."&&(0,c.startsWithIgnoreCase)(this.filePickBox.value,W)?(this.filePickBox.valueSelection=[W.length,this.filePickBox.value.length],this.insertText(W,"")):await this.updateItems(V.uri,!0)}this.filePickBox.busy=!1;return}}else if(await this.tryUpdateItems(this.filePickBox.value,this.filePickBoxValue())!==N.NotUpdated){this.filePickBox.busy=!1;return}let F;if(this.filePickBox.activeItems.length===0?F=this.filePickBoxValue():this.filePickBox.activeItems.length===1&&(F=this.filePickBox.selectedItems[0].uri),F&&(F=this.addPostfix(F)),await this.validate(F))return this.busy=!1,F;this.busy=!1}root(F){let V=F,W=y.dirname(F);for(;!y.isEqual(V,W);)V=W,W=y.dirname(W);return W}tildaReplace(F){const V=this.trueHome;return F.length>0&&F[0]==="~"?y.joinPath(V,F.substring(1)):this.remoteUriFrom(F)}tryAddTrailingSeparatorToDirectory(F,V){return V.isDirectory&&!this.endsWithSlash(F.path)?y.addTrailingPathSeparator(F):F}async tryUpdateItems(F,V){if(F.length>0&&F[0]==="~"){const W=this.tildaReplace(F);return await this.updateItems(W,!0)?N.UpdatedWithTrailing:N.Updated}else{if(F==="\\")return V=this.root(this.currentFolder),F=this.pathFromUri(V),await this.updateItems(V,!0)?N.UpdatedWithTrailing:N.Updated;if(!y.extUriIgnorePathCase.isEqual(this.currentFolder,V)&&(this.endsWithSlash(F)||!y.extUriIgnorePathCase.isEqual(this.currentFolder,y.dirname(V))&&y.extUriIgnorePathCase.isEqualOrParent(this.currentFolder,y.dirname(V)))){let W;try{W=await this.fileService.stat(V)}catch{}if(W&&W.isDirectory&&y.basename(V)!=="."&&this.endsWithSlash(F))return V=this.tryAddTrailingSeparatorToDirectory(V,W),await this.updateItems(V)?N.UpdatedWithTrailing:N.Updated;if(this.endsWithSlash(F))return this.filePickBox.validationMessage=t.localize(6,null),this.badPath=F,N.InvalidPath;{let z=y.dirname(V);const B=y.removeTrailingPathSeparator(y.addTrailingPathSeparator(this.currentFolder)),K=y.removeTrailingPathSeparator(y.addTrailingPathSeparator(z));if(!y.extUriIgnorePathCase.isEqual(B,K)&&(!/^[a-zA-Z]:$/.test(this.filePickBox.value)||!(0,c.equalsIgnoreCase)(this.pathFromUri(this.currentFolder).substring(0,this.filePickBox.value.length),this.filePickBox.value))){let H;try{H=await this.fileService.stat(z)}catch{}if(H&&H.isDirectory)return this.badPath=void 0,z=this.tryAddTrailingSeparatorToDirectory(z,H),await this.updateItems(z,!1,y.basename(V))?N.UpdatedWithTrailing:N.Updated}}}}return this.badPath=void 0,N.NotUpdated}tryUpdateTrailing(F){const V=y.extname(F);this.trailing&&V&&(this.trailing=y.basename(F))}setActiveItems(F){F=this.pathFromUri(this.tildaReplace(F));const V=this.remoteUriFrom(F),W=y.basename(V),z=this.constructFullUserPath();if((0,c.equalsIgnoreCase)(z,F.substring(0,z.length))||(0,c.equalsIgnoreCase)(F,z.substring(0,F.length))){let K=!1;for(let H=0;H<this.filePickBox.items.length;H++){const U=this.filePickBox.items[H];if(this.setAutoComplete(F,W,U)){K=!0;break}}if(!K){const H=W.length>=2?z.substring(z.length-W.length+2):"";this.userEnteredPathSegment=H===W?W:"",this.autoCompletePathSegment="",this.filePickBox.activeItems=[],this.tryUpdateTrailing(V)}}else this.userEnteredPathSegment=W,this.autoCompletePathSegment="",this.filePickBox.activeItems=[],this.tryUpdateTrailing(V)}setAutoComplete(F,V,W,z=!1){if(this.busy)return this.userEnteredPathSegment=V,this.autoCompletePathSegment="",!1;const B=W.label;return B===".."?(this.userEnteredPathSegment="",this.autoCompletePathSegment="",this.activeItem=W,z&&document.execCommand("insertText",!1,""),!1):!z&&B.length>=V.length&&(0,c.equalsIgnoreCase)(B.substr(0,V.length),V)?(this.userEnteredPathSegment=V,this.activeItem=W,this.autoCompletePathSegment="",W.isFolder||!this.trailing?this.filePickBox.activeItems=[W]:this.filePickBox.activeItems=[],!0):z&&!(0,c.equalsIgnoreCase)(this.basenameWithTrailingSlash(W.uri),this.userEnteredPathSegment+this.autoCompletePathSegment)?(this.userEnteredPathSegment="",this.accessibilityService.isScreenReaderOptimized()||(this.autoCompletePathSegment=this.trimTrailingSlash(B)),this.activeItem=W,this.accessibilityService.isScreenReaderOptimized()||(this.filePickBox.valueSelection=[this.pathFromUri(this.currentFolder,!0).length,this.filePickBox.value.length],this.insertText(this.pathAppend(this.currentFolder,this.autoCompletePathSegment),this.autoCompletePathSegment),this.filePickBox.valueSelection=[this.filePickBox.value.length-this.autoCompletePathSegment.length,this.filePickBox.value.length]),!0):(this.userEnteredPathSegment=V,this.autoCompletePathSegment="",!1)}insertText(F,V){this.filePickBox.inputHasFocus()?(document.execCommand("insertText",!1,V),this.filePickBox.value!==F&&(this.filePickBox.value=F,this.handleValueChange(F))):(this.filePickBox.value=F,this.handleValueChange(F))}addPostfix(F){let V=F;if(this.requiresTrailing&&this.options.filters&&this.options.filters.length>0&&!y.hasTrailingPathSeparator(F)){let W=!1;const z=y.extname(F).substr(1);for(let B=0;B<this.options.filters.length;B++){for(let K=0;K<this.options.filters[B].extensions.length;K++)if(this.options.filters[B].extensions[K]==="*"||this.options.filters[B].extensions[K]===z){W=!0;break}if(W)break}W||(V=y.joinPath(y.dirname(F),y.basename(F)+"."+this.options.filters[0].extensions[0]))}return V}trimTrailingSlash(F){return F.length>1&&this.endsWithSlash(F)?F.substr(0,F.length-1):F}yesNoPrompt(F,V){const W=this.quickInputService.createQuickPick();W.title=V,W.ignoreFocusOut=!0,W.ok=!0,W.customButton=!0,W.customLabel=t.localize(7,null),W.value=this.pathFromUri(F);let z=!1;return new Promise(B=>{W.onDidAccept(()=>{z=!0,W.hide(),B(!0)}),W.onDidHide(()=>{z||B(!1),this.filePickBox.show(),this.hidden=!1,this.filePickBox.items=this.filePickBox.items,W.dispose()}),W.onDidChangeValue(()=>{W.hide()}),W.onDidCustom(()=>{W.hide()}),W.show()})}async validate(F){if(F===void 0)return this.filePickBox.validationMessage=t.localize(8,null),Promise.resolve(!1);let V,W;try{W=await this.fileService.stat(y.dirname(F)),V=await this.fileService.stat(F)}catch{}if(this.requiresTrailing){if(V&&V.isDirectory)return this.filePickBox.validationMessage=t.localize(9,null),Promise.resolve(!1);if(V){const z=t.localize(10,null,y.basename(F));return this.yesNoPrompt(F,z)}else if((0,n.isValidBasename)(y.basename(F),this.isWindows))if(W){if(!W.isDirectory)return this.filePickBox.validationMessage=t.localize(13,null),Promise.resolve(!1)}else{const z=t.localize(12,null,y.basename(y.dirname(F)));return this.yesNoPrompt(F,z)}else return this.filePickBox.validationMessage=t.localize(11,null),Promise.resolve(!1)}else if(V){if(F.path==="/"&&this.isWindows)return this.filePickBox.validationMessage=t.localize(15,null),Promise.resolve(!1);if(V.isDirectory&&!this.allowFolderSelection)return this.filePickBox.validationMessage=t.localize(16,null),Promise.resolve(!1);if(!V.isDirectory&&!this.allowFileSelection)return this.filePickBox.validationMessage=t.localize(17,null),Promise.resolve(!1)}else return this.filePickBox.validationMessage=t.localize(14,null),Promise.resolve(!1);return Promise.resolve(!0)}async updateItems(F,V=!1,W){this.busy=!0,this.autoCompletePathSegment="";const z=!!W;let B=!1;const K=(0,E.createCancelablePromise)(async H=>{let U;try{U=await this.fileService.resolve(F),U.isDirectory||(W=y.basename(F),F=y.dirname(F),U=void 0,B=!0)}catch{}const G=W?this.pathAppend(F,W):this.pathFromUri(F,!0);return this.currentFolder=this.endsWithSlash(F.path)?F:y.addTrailingPathSeparator(F,this.separator),this.userEnteredPathSegment=W||"",this.createItems(U,this.currentFolder,H).then($=>H.isCancellationRequested?(this.busy=!1,!1):(this.filePickBox.items=$,this.filePickBox.activeItems=[this.filePickBox.items[0]],this.filePickBox.activeItems=[],!(0,c.equalsIgnoreCase)(this.filePickBox.value,G)&&V&&(this.filePickBox.valueSelection=[0,this.filePickBox.value.length],this.insertText(G,G)),V&&W&&z?this.filePickBox.valueSelection=[this.filePickBox.value.length-W.length,this.filePickBox.value.length-W.length]:W||(this.filePickBox.valueSelection=[this.filePickBox.value.length,this.filePickBox.value.length]),this.busy=!1,this.updatingPromise=void 0,B))});return this.updatingPromise!==void 0&&this.updatingPromise.cancel(),this.updatingPromise=K,K}pathFromUri(F,V=!1){let W=(0,I.normalizeDriveLetter)(F.fsPath,this.isWindows).replace(/\n/g,"");return this.separator==="/"?W=W.replace(/\\/g,this.separator):W=W.replace(/\//g,this.separator),V&&!this.endsWithSlash(W)&&(W=W+this.separator),W}pathAppend(F,V){return V===".."||V==="."?this.pathFromUri(F,!0)+V:this.pathFromUri(y.joinPath(F,V))}async checkIsWindowsOS(){let F=v.isWindows;const V=await this.getRemoteAgentEnvironment();return V&&(F=V.os===1),F}endsWithSlash(F){return/[\/\\]$/.test(F)}basenameWithTrailingSlash(F){const V=this.pathFromUri(F,!0),W=this.pathFromUri(y.dirname(F),!0);return V.substring(W.length)}async createBackItem(F){const V=this.currentFolder.with({scheme:o.Schemas.file,authority:""}),W=y.dirname(V);if(!y.isEqual(V,W)){const z=y.dirname(F);if(await this.fileService.exists(z))return{label:"..",uri:y.addTrailingPathSeparator(z,this.separator),isFolder:!0}}}async createItems(F,V,W){const z=[],B=await this.createBackItem(V);try{F||(F=await this.fileService.resolve(V));const H=F.children?await Promise.all(F.children.map(U=>this.createItem(U,V,W))):[];for(const U of H)U&&z.push(U)}catch(H){console.log(H)}if(W.isCancellationRequested)return[];const K=z.sort((H,U)=>{if(H.isFolder!==U.isFolder)return H.isFolder?-1:1;const G=this.endsWithSlash(H.label)?H.label.substr(0,H.label.length-1):H.label,$=this.endsWithSlash(U.label)?U.label.substr(0,U.label.length-1):U.label;return G.localeCompare($)});return B&&K.unshift(B),K}extname(F){const V=y.extname(F);if(V.length===0){const W=y.basename(F);if(W.startsWith("."))return W}else return V;return""}filterFile(F){if(this.options.filters){const V=this.extname(F);for(let W=0;W<this.options.filters.length;W++)for(let z=0;z<this.options.filters[W].extensions.length;z++){const B=this.options.filters[W].extensions[z];if(B==="*"||V==="."+B)return!0}return!1}return!0}async createItem(F,V,W){if(W.isCancellationRequested)return;let z=y.joinPath(V,F.name);if(F.isDirectory){const B=y.basename(z);return z=y.addTrailingPathSeparator(z,this.separator),{label:B,uri:z,isFolder:!0,iconClasses:(0,s.getIconClasses)(this.modelService,this.languageService,z||void 0,D.FileKind.FOLDER)}}else if(!F.isDirectory&&this.allowFileSelection&&this.filterFile(z))return{label:F.name,uri:z,isFolder:!1,iconClasses:(0,s.getIconClasses)(this.modelService,this.languageService,z||void 0)}}};e.SimpleFileDialog=P,e.SimpleFileDialog=P=fe([O(0,D.IFileService),O(1,T.IQuickInputService),O(2,S.ILabelService),O(3,h.IWorkspaceContextService),O(4,a.INotificationService),O(5,m.IFileDialogService),O(6,r.IModelService),O(7,i.ILanguageService),O(8,u.IWorkbenchEnvironmentService),O(9,d.IRemoteAgentService),O(10,_.IPathService),O(11,l.IKeybindingService),O(12,p.IContextKeyService),O(13,A.IAccessibilityService)],P)}),define(Q[4039],Y([1,0,2882,16,127,4,18,105,113,45,89,61,28,22,44,274,139,9,56,181,1393,39,30,231,8,100,24]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let I=class{constructor(N,P){s.ipcRenderer.on("vscode:getDiagnosticInfo",(x,F)=>{const V=N.getConnection();if(V){const W=P.getHostLabel(r.Schemas.vscodeRemote,V.remoteAuthority);N.getDiagnosticInfo(F.args).then(z=>{z&&(z.hostName=W,b.remoteConnectionLatencyMeasurer.latency?.high&&(z.latency={average:b.remoteConnectionLatencyMeasurer.latency.average,current:b.remoteConnectionLatencyMeasurer.latency.current})),s.ipcRenderer.send(F.replyChannel,z)}).catch(z=>{const B=z&&z.message?`Connection to '${W}' could not be established ${z.message}`:`Connection to '${W}' could not be established `;s.ipcRenderer.send(F.replyChannel,{hostName:W,errorMessage:B})})}else s.ipcRenderer.send(F.replyChannel)})}};I=fe([O(0,b.IRemoteAgentService),O(1,h.ILabelService)],I);let _=class{constructor(N,P,x){const F=N.getConnection();F&&F.onDidStateChange(async V=>{if(V.type===4){const W=await P.resolveAuthority(F.remoteAuthority);W.options&&W.options.extensionHostEnv&&await x.setRemoteEnvironment(W.options.extensionHostEnv)}})}};_=fe([O(0,b.IRemoteAgentService),O(1,p.IRemoteAuthorityResolverService),O(2,i.IExtensionService)],_);let A=class extends D.Disposable{constructor(N,P){super(),this.remoteAgentService=N,this.configurationService=P,this.updateRemoteTelemetryEnablement(),this._register(P.onDidChangeConfiguration(x=>{x.affectsConfiguration(n.TELEMETRY_SETTING_ID)&&this.updateRemoteTelemetryEnablement()}))}updateRemoteTelemetryEnablement(){return this.remoteAgentService.updateTelemetryLevel((0,g.getTelemetryLevel)(this.configurationService))}};A=fe([O(0,b.IRemoteAgentService),O(1,u.IConfigurationService)],A);let k=class extends D.Disposable{constructor(N,P,x,F,V){super();function W(){const $=x.getValue("workbench.startupEditor");return $!=="welcomePage"&&$!=="welcomePageInEmptyWorkbench"}function z(){return W()}const{remoteAuthority:B,filesToDiff:K,filesToMerge:H,filesToOpenOrCreate:U,filesToWait:G}=N;B&&V.getWorkbenchState()===1&&!K?.length&&!H?.length&&!U?.length&&!G&&P.resolveAuthority(B).then(()=>{W()&&F.executeCommand("workbench.view.explorer"),z()&&F.executeCommand("workbench.action.terminal.toggleTerminal")})}};k=fe([O(0,o.INativeWorkbenchEnvironmentService),O(1,p.IRemoteAuthorityResolverService),O(2,u.IConfigurationService),O(3,a.ICommandService),O(4,l.IWorkspaceContextService)],k);let L=class extends D.Disposable{constructor(N,P,x,F){super();const V="wslFeatureInstalled",W="remote.wslFeatureInstalled",z=x.getBoolean(W,-1,void 0),K=new w.RawContextKey(V,!!z,t.localize(0,null)).bindTo(N);z===void 0&&F.when(4).then(async()=>{P.hasWSLFeatureInstalled().then(H=>{H&&(K.set(!0),x.store(W,!0,-1,1))})})}};L=fe([O(0,w.IContextKeyService),O(1,E.INativeHostService),O(2,C.IStorageService),O(3,S.ILifecycleService)],L);const R=y.Registry.as(m.Extensions.Workbench);R.registerWorkbenchContribution(I,4),R.registerWorkbenchContribution(_,4),R.registerWorkbenchContribution(A,2),R.registerWorkbenchContribution(k,2),T.isWindows&&R.registerWorkbenchContribution(L,2),y.Registry.as(d.Extensions.Configuration).registerConfiguration({id:"remote",title:t.localize(1,null),type:"object",properties:{"remote.downloadExtensionsLocally":{type:"boolean",markdownDescription:t.localize(2,null),default:!1}}}),T.isMacintosh?v.KeybindingsRegistry.registerCommandAndKeybindingRule({id:c.OpenLocalFileFolderCommand.ID,weight:200,primary:2093,when:c.RemoteFileDialogContext,description:{description:c.OpenLocalFileFolderCommand.LABEL,args:[]},handler:c.OpenLocalFileFolderCommand.handler()}):(v.KeybindingsRegistry.registerCommandAndKeybindingRule({id:c.OpenLocalFileCommand.ID,weight:200,primary:2093,when:c.RemoteFileDialogContext,description:{description:c.OpenLocalFileCommand.LABEL,args:[]},handler:c.OpenLocalFileCommand.handler()}),v.KeybindingsRegistry.registerCommandAndKeybindingRule({id:c.OpenLocalFolderCommand.ID,weight:200,primary:(0,f.KeyChord)(2089,2093),when:c.RemoteFileDialogContext,description:{description:c.OpenLocalFolderCommand.LABEL,args:[]},handler:c.OpenLocalFolderCommand.handler()})),v.KeybindingsRegistry.registerCommandAndKeybindingRule({id:c.SaveLocalFileCommand.ID,weight:200,primary:3121,when:c.RemoteFileDialogContext,description:{description:c.SaveLocalFileCommand.LABEL,args:[]},handler:c.SaveLocalFileCommand.handler()})}),define(Q[4040],Y([1,0,3062,332,49,39,254,65,26,55,5,1393,265,9,25,41,86,63,20,33,50,61,131,22,146,28,79,21,208,11]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractFileDialogService=void 0;let k=class{constructor(R,M,N,P,x,F,V,W,z,B,K,H,U,G,$,ie,J){this.hostService=R,this.contextService=M,this.historyService=N,this.environmentService=P,this.instantiationService=x,this.configurationService=F,this.fileService=V,this.openerService=W,this.dialogService=z,this.languageService=B,this.workspacesService=K,this.labelService=H,this.pathService=U,this.commandService=G,this.editorService=$,this.codeEditorService=ie,this.logService=J}async defaultFilePath(R=this.getSchemeFilterForWindow()){let M=this.historyService.getLastActiveFile(R);return M?M=v.dirname(M):M=this.historyService.getLastActiveWorkspaceRoot(R),M||(M=await this.preferredHome(R)),M}async defaultFolderPath(R=this.getSchemeFilterForWindow()){let M=this.historyService.getLastActiveWorkspaceRoot(R);return M||(M=this.historyService.getLastActiveFile(R)),M?v.dirname(M):this.preferredHome(R)}async preferredHome(R=this.getSchemeFilterForWindow()){const M=R===g.Schemas.file,N=this.configurationService.inspect("files.dialog.defaultPath"),P=M?N.userLocalValue:N.userRemoteValue;if(P&&(M?(0,m.isAbsolute)(P):(await this.pathService.path).isAbsolute(P))){const F=M?(0,m.normalize)(P):(await this.pathService.path).normalize(P),V=v.toLocalResource(await this.pathService.fileURI(F),this.environmentService.remoteAuthority,this.pathService.defaultUriScheme);if(await this.fileService.exists(V))return V}return this.pathService.userHome({preferLocal:M})}async defaultWorkspacePath(R=this.getSchemeFilterForWindow()){let M;if(this.contextService.getWorkbenchState()===3){const N=this.contextService.getWorkspace().configuration;N?.scheme===R&&(0,D.isSavedWorkspace)(N,this.environmentService)&&!(0,D.isTemporaryWorkspace)(N)&&(M=v.dirname(N))}return M||(M=await this.defaultFilePath(R)),M}async showSaveConfirm(R){return this.skipDialogs()?(this.logService.trace("FileDialogService: refused to show save confirmation dialog in tests."),1):this.doShowSaveConfirm(R)}skipDialogs(){return this.environmentService.isExtensionDevelopment&&this.environmentService.extensionTestsLocationURI?!0:!!this.environmentService.enableSmokeTestDriver}async doShowSaveConfirm(R){if(R.length===0)return 1;let M,N=t.localize(0,null);R.length===1?M=t.localize(1,null,typeof R[0]=="string"?R[0]:v.basename(R[0])):(M=t.localize(2,null,R.length),N=(0,b.getFileNamesMessage)(R)+` `+N);const{result:P}=await this.dialogService.prompt({type:u.default.Warning,message:M,detail:N,buttons:[{label:R.length>1?t.localize(3,null):t.localize(4,null),run:()=>0},{label:t.localize(5,null),run:()=>1}],cancelButton:{run:()=>2}});return P}addFileSchemaIfNeeded(R,M){return R===g.Schemas.untitled?[g.Schemas.file]:R!==g.Schemas.file?[R,g.Schemas.file]:[R]}async pickFileFolderAndOpenSimplified(R,M,N){const P=t.localize(6,null),x=this.addFileSchemaIfNeeded(R),F=await this.pickResource({canSelectFiles:!0,canSelectFolders:!0,canSelectMany:!1,defaultUri:M.defaultUri,title:P,availableFileSystems:x});if(F){const V=await this.fileService.stat(F),W=V.isDirectory?{folderUri:F}:{fileUri:F};!(0,y.isWorkspaceToOpen)(W)&&(0,y.isFileToOpen)(W)&&this.addFileToRecentlyOpened(W.fileUri),V.isDirectory||M.forceNewWindow||N?await this.hostService.openWindow([W],{forceNewWindow:M.forceNewWindow,remoteAuthority:M.remoteAuthority}):await this.editorService.openEditors([{resource:F,options:{source:_.EditorOpenSource.USER,pinned:!0}}],void 0,{validateTrust:!0})}}async pickFileAndOpenSimplified(R,M,N){const P=t.localize(7,null),x=this.addFileSchemaIfNeeded(R),F=await this.pickResource({canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1,defaultUri:M.defaultUri,title:P,availableFileSystems:x});F&&(this.addFileToRecentlyOpened(F),M.forceNewWindow||N?await this.hostService.openWindow([{fileUri:F}],{forceNewWindow:M.forceNewWindow,remoteAuthority:M.remoteAuthority}):await this.editorService.openEditors([{resource:F,options:{source:_.EditorOpenSource.USER,pinned:!0}}],void 0,{validateTrust:!0}))}addFileToRecentlyOpened(R){this.workspacesService.addRecentlyOpened([{fileUri:R,label:this.labelService.getUriLabel(R)}])}async pickFolderAndOpenSimplified(R,M){const N=t.localize(8,null),P=this.addFileSchemaIfNeeded(R,!0),x=await this.pickResource({canSelectFiles:!1,canSelectFolders:!0,canSelectMany:!1,defaultUri:M.defaultUri,title:N,availableFileSystems:P});if(x)return this.hostService.openWindow([{folderUri:x}],{forceNewWindow:M.forceNewWindow,remoteAuthority:M.remoteAuthority})}async pickWorkspaceAndOpenSimplified(R,M){const N=t.localize(9,null),P=[{name:t.localize(10,null),extensions:[D.WORKSPACE_EXTENSION]}],x=this.addFileSchemaIfNeeded(R,!0),F=await this.pickResource({canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1,defaultUri:M.defaultUri,title:N,filters:P,availableFileSystems:x});if(F)return this.hostService.openWindow([{workspaceUri:F}],{forceNewWindow:M.forceNewWindow,remoteAuthority:M.remoteAuthority})}async pickFileToSaveSimplified(R,M){M.availableFileSystems||(M.availableFileSystems=this.addFileSchemaIfNeeded(R)),M.title=t.localize(11,null);const N=await this.saveRemoteResource(M);return N&&this.addFileToRecentlyOpened(N),N}async showSaveDialogSimplified(R,M){return M.availableFileSystems||(M.availableFileSystems=this.addFileSchemaIfNeeded(R)),this.saveRemoteResource(M)}async showOpenDialogSimplified(R,M){M.availableFileSystems||(M.availableFileSystems=this.addFileSchemaIfNeeded(R,M.canSelectFolders));const N=await this.pickResource(M);return N?[N]:void 0}getSimpleFileDialog(){return this.instantiationService.createInstance(h.SimpleFileDialog)}pickResource(R){return this.getSimpleFileDialog().showOpenDialog(R)}saveRemoteResource(R){return this.getSimpleFileDialog().showSaveDialog(R)}getSchemeFilterForWindow(R){return R??this.pathService.defaultUriScheme}getFileSystemSchema(R){return R.availableFileSystems&&R.availableFileSystems[0]||this.getSchemeFilterForWindow(R.defaultUri?.scheme)}getWorkspaceAvailableFileSystems(R){if(R.availableFileSystems&&R.availableFileSystems.length>0)return R.availableFileSystems;const M=[g.Schemas.file];return this.environmentService.remoteAuthority&&M.unshift(g.Schemas.vscodeRemote),M}getPickFileToSaveDialogOptions(R,M){const N={defaultUri:R,title:t.localize(12,null),availableFileSystems:M},P=R?v.extname(R):void 0;let x;const F=this.languageService.getSortedRegisteredLanguageNames(),V=(0,d.coalesce)(F.map(({languageName:W,languageId:z})=>{const B=this.languageService.getExtensions(z);if(!B.length)return null;const K={name:W,extensions:(0,d.distinct)(B).slice(0,10).map(U=>(0,p.trim)(U,"."))},H=P||w.PLAINTEXT_EXTENSION;if(!x&&B.includes(H)){x=K;const U=(0,p.trim)(H,".");return K.extensions.includes(U)||K.extensions.unshift(U),null}return K}));return!x&&P&&(x={name:(0,p.trim)(P,".").toUpperCase(),extensions:[(0,p.trim)(P,".")]}),N.filters=(0,d.coalesce)([{name:t.localize(13,null),extensions:["*"]},x,...V,{name:t.localize(14,null),extensions:[""]}]),N}};e.AbstractFileDialogService=k,e.AbstractFileDialogService=k=fe([O(0,o.IHostService),O(1,D.IWorkspaceContextService),O(2,T.IHistoryService),O(3,f.IWorkbenchEnvironmentService),O(4,S.IInstantiationService),O(5,r.IConfigurationService),O(6,i.IFileService),O(7,s.IOpenerService),O(8,b.IDialogService),O(9,c.ILanguageService),O(10,a.IWorkspacesService),O(11,l.ILabelService),O(12,n.IPathService),O(13,E.ICommandService),O(14,I.IEditorService),O(15,C.ICodeEditorService),O(16,A.ILogService)],k)}),define(Q[4041],Y([1,0,86,49,39,254,65,10,5,9,35,25,41,100,4040,22,50,265,61,131,28,79,21,11]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileDialogService=void 0;let w=class extends i.AbstractFileDialogService{constructor(C,I,_,A,k,L,R,M,N,P,x,F,V,W,z,B,K,H){super(C,I,_,A,k,L,R,M,P,x,F,V,W,z,B,K,H),this.nativeHostService=N}toNativeOpenDialogOptions(C){return{forceNewWindow:C.forceNewWindow,telemetryExtraData:C.telemetryExtraData,defaultPath:C.defaultUri?.fsPath}}shouldUseSimplified(C){const I=this.configurationService.getValue("files.simpleDialog.enable")===!0,_=this.configurationService.getValue("window.openFilesInNewWindow")==="on";return{useSimplified:C!==s.Schemas.file&&C!==s.Schemas.vscodeUserData||I,isSetting:_}}async pickFileFolderAndOpen(C){const I=this.getFileSystemSchema(C);C.defaultUri||(C.defaultUri=await this.defaultFilePath(I));const _=this.shouldUseSimplified(I);return _.useSimplified?this.pickFileFolderAndOpenSimplified(I,C,_.isSetting):this.nativeHostService.pickFileFolderAndOpen(this.toNativeOpenDialogOptions(C))}async pickFileAndOpen(C){const I=this.getFileSystemSchema(C);C.defaultUri||(C.defaultUri=await this.defaultFilePath(I));const _=this.shouldUseSimplified(I);return _.useSimplified?this.pickFileAndOpenSimplified(I,C,_.isSetting):this.nativeHostService.pickFileAndOpen(this.toNativeOpenDialogOptions(C))}async pickFolderAndOpen(C){const I=this.getFileSystemSchema(C);return C.defaultUri||(C.defaultUri=await this.defaultFolderPath(I)),this.shouldUseSimplified(I).useSimplified?this.pickFolderAndOpenSimplified(I,C):this.nativeHostService.pickFolderAndOpen(this.toNativeOpenDialogOptions(C))}async pickWorkspaceAndOpen(C){C.availableFileSystems=this.getWorkspaceAvailableFileSystems(C);const I=this.getFileSystemSchema(C);return C.defaultUri||(C.defaultUri=await this.defaultWorkspacePath(I)),this.shouldUseSimplified(I).useSimplified?this.pickWorkspaceAndOpenSimplified(I,C):this.nativeHostService.pickWorkspaceAndOpen(this.toNativeOpenDialogOptions(C))}async pickFileToSave(C,I){const _=this.getFileSystemSchema({defaultUri:C,availableFileSystems:I}),A=this.getPickFileToSaveDialogOptions(C,I);if(this.shouldUseSimplified(_).useSimplified)return this.pickFileToSaveSimplified(_,A);{const k=await this.nativeHostService.showSaveDialog(this.toNativeSaveDialogOptions(A));if(k&&!k.canceled&&k.filePath){const L=f.URI.file(k.filePath);return this.addFileToRecentlyOpened(L),L}}}toNativeSaveDialogOptions(C){return C.defaultUri=C.defaultUri?f.URI.file(C.defaultUri.path):void 0,{defaultPath:C.defaultUri?.fsPath,buttonLabel:C.saveLabel,filters:C.filters,title:C.title}}async showSaveDialog(C){const I=this.getFileSystemSchema(C);if(this.shouldUseSimplified(I).useSimplified)return this.showSaveDialogSimplified(I,C);const _=await this.nativeHostService.showSaveDialog(this.toNativeSaveDialogOptions(C));if(_&&!_.canceled&&_.filePath)return f.URI.file(_.filePath)}async showOpenDialog(C){const I=this.getFileSystemSchema(C);if(this.shouldUseSimplified(I).useSimplified)return this.showOpenDialogSimplified(I,C);const _={title:C.title,defaultPath:C.defaultUri?.fsPath,buttonLabel:C.openLabel,filters:C.filters,properties:[]};_.properties.push("createDirectory"),C.canSelectFiles&&_.properties.push("openFile"),C.canSelectFolders&&_.properties.push("openDirectory"),C.canSelectMany&&_.properties.push("multiSelections");const A=await this.nativeHostService.showOpenDialog(_);return A&&Array.isArray(A.filePaths)&&A.filePaths.length>0?A.filePaths.map(f.URI.file):void 0}};e.FileDialogService=w,e.FileDialogService=w=fe([O(0,t.IHostService),O(1,b.IWorkspaceContextService),O(2,D.IHistoryService),O(3,T.IWorkbenchEnvironmentService),O(4,v.IInstantiationService),O(5,m.IConfigurationService),O(6,h.IFileService),O(7,a.IOpenerService),O(8,r.INativeHostService),O(9,y.IDialogService),O(10,o.ILanguageService),O(11,u.IWorkspacesService),O(12,d.ILabelService),O(13,p.IPathService),O(14,c.ICommandService),O(15,n.IEditorService),O(16,l.ICodeEditorService),O(17,g.ILogService)],w),(0,S.registerSingleton)(y.IFileDialogService,w,1)}),define(Q[4042],Y([1,0,3087,10,4,55,6,45,16,65,39,26,180,61,121,195,89,35,131,44,18,127,22,24,191,20]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LabelService=void 0;const C=i.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"resourceLabelFormatters",jsonSchema:{description:(0,t.localize)(0,null),type:"array",items:{type:"object",required:["scheme","formatting"],properties:{scheme:{type:"string",description:(0,t.localize)(1,null)},authority:{type:"string",description:(0,t.localize)(2,null)},formatting:{description:(0,t.localize)(3,null),type:"object",properties:{label:{type:"string",description:(0,t.localize)(4,null)},separator:{type:"string",description:(0,t.localize)(5,null)},stripPathStartingSeparator:{type:"boolean",description:(0,t.localize)(6,null)},tildify:{type:"boolean",description:(0,t.localize)(7,null)},workspaceSuffix:{type:"string",description:(0,t.localize)(8,null)}}}}}}}),I=/\//g,_=/\$\{(scheme|authoritySuffix|authority|path|(query)\.(.+?))\}/g;function A(M){return!!(M&&M[2]===":")}let k=class{constructor(N){this.formattersDisposables=new Map,C.setHandler((P,x)=>{for(const F of x.added)for(const V of F.value){const W={...V};typeof W.formatting.label!="string"&&(W.formatting.label="${authority}${path}"),typeof W.formatting.separator!="string"&&(W.formatting.separator=D.sep),!(0,p.isProposedApiEnabled)(F.description,"contribLabelFormatterWorkspaceTooltip")&&W.formatting.workspaceTooltip&&(W.formatting.workspaceTooltip=void 0),this.formattersDisposables.set(W,N.registerFormatter(W))}for(const F of x.removed)for(const V of F.value)(0,b.dispose)(this.formattersDisposables.get(V))})}};k=fe([O(0,r.ILabelService)],k),v.Registry.as(f.Extensions.Workbench).registerWorkbenchContribution(k,3);const L=50;let R=class extends b.Disposable{constructor(N,P,x,F,V,W){super(),this.environmentService=N,this.contextService=P,this.pathService=x,this.remoteAgentService=F,this._onDidChangeFormatters=this._register(new T.Emitter({leakWarningThreshold:400})),this.onDidChangeFormatters=this._onDidChangeFormatters.event,this.os=c.OS,this.userHome=x.defaultUriScheme===n.Schemas.file?this.pathService.userHome({preferLocal:!0}):void 0;const z=this.storedFormattersMemento=new w.Memento("cachedResourceLabelFormatters2",V);this.storedFormatters=z.getMemento(0,1),this.formatters=this.storedFormatters?.formatters?.slice()||[],this.resolveRemoteEnvironment()}async resolveRemoteEnvironment(){const N=await this.remoteAgentService.getEnvironment();this.os=N?.os??c.OS,this.userHome=await this.pathService.userHome()}findFormatting(N){let P;for(const x of this.formatters)if(x.scheme===N.scheme){if(!x.authority&&(!P||x.priority)){P=x;continue}if(!x.authority)continue;(0,s.match)(x.authority.toLowerCase(),N.authority.toLowerCase())&&(!P||!P.authority||x.authority.length>P.authority.length||x.authority.length===P.authority.length&&x.priority)&&(P=x)}return P?P.formatting:void 0}getUriLabel(N,P={}){let x=this.findFormatting(N);x&&P.separator&&(x={...x,separator:P.separator});const F=this.doGetUriLabel(N,x,P);return!x&&P.separator?F.replace(I,P.separator):F}doGetUriLabel(N,P,x={}){if(!P)return(0,a.getPathLabel)(N,{os:this.os,tildify:this.userHome?{userHome:this.userHome}:void 0,relative:x.relative?{noPrefix:x.noPrefix,getWorkspace:()=>this.contextService.getWorkspace(),getWorkspaceFolder:F=>this.contextService.getWorkspaceFolder(F)}:void 0});if(x.relative&&this.contextService){let F=this.contextService.getWorkspaceFolder(N);if(!F){const V=this.contextService.getWorkspace(),W=(0,E.firstOrDefault)(V.folders);W&&N.scheme!==W.uri.scheme&&N.path.startsWith(D.posix.sep)&&(F=this.contextService.getWorkspaceFolder(W.uri.with({path:N.path})))}if(F){const V=this.formatUri(F.uri,P,x.noPrefix);let W=this.formatUri(N,P,x.noPrefix),z=0;for(;W[z]&&W[z]===V[z];)z++;if(!W[z]||W[z]===P.separator?W=W.substring(1+z):z===V.length&&F.uri.path===D.posix.sep&&(W=W.substring(z)),this.contextService.getWorkspace().folders.length>1&&!x.noPrefix){const K=F?.name??(0,h.basenameOrAuthority)(F.uri);W=W?`${K} \u2022 ${W}`:K}return W}}return this.formatUri(N,P,x.noPrefix)}getUriBasenameLabel(N){const P=this.findFormatting(N),x=this.doGetUriLabel(N,P);let F;return P?.separator===D.win32.sep?F=D.win32:P?.separator===D.posix.sep?F=D.posix:F=this.os===1?D.win32:D.posix,F.basename(x)}getWorkspaceLabel(N,P){if((0,S.isWorkspace)(N)){const x=(0,S.toWorkspaceIdentifier)(N);return(0,S.isSingleFolderWorkspaceIdentifier)(x)||(0,S.isWorkspaceIdentifier)(x)?this.getWorkspaceLabel(x,P):""}return y.URI.isUri(N)?this.doGetSingleFolderWorkspaceLabel(N,P):(0,S.isSingleFolderWorkspaceIdentifier)(N)?this.doGetSingleFolderWorkspaceLabel(N.uri,P):(0,S.isWorkspaceIdentifier)(N)?this.doGetWorkspaceLabel(N.configPath,P):""}doGetWorkspaceLabel(N,P){if((0,S.isUntitledWorkspace)(N,this.environmentService))return(0,t.localize)(9,null);if((0,S.isTemporaryWorkspace)(N))return(0,t.localize)(10,null);let x=(0,h.basename)(N);x.endsWith(S.WORKSPACE_EXTENSION)&&(x=x.substr(0,x.length-S.WORKSPACE_EXTENSION.length-1));let F;switch(P?.verbose){case 0:F=x;break;case 2:F=(0,t.localize)(11,null,this.getUriLabel((0,h.joinPath)((0,h.dirname)(N),x)));break;case 1:default:F=(0,t.localize)(12,null,x);break}return P?.verbose===0?F:this.appendWorkspaceSuffix(F,N)}doGetSingleFolderWorkspaceLabel(N,P){let x;switch(P?.verbose){case 2:x=this.getUriLabel(N);break;case 0:case 1:default:x=(0,h.basename)(N)||D.posix.sep;break}return P?.verbose===0?x:this.appendWorkspaceSuffix(x,N)}getSeparator(N,P){return this.findFormatting(y.URI.from({scheme:N,authority:P}))?.separator||D.posix.sep}getHostLabel(N,P){return this.findFormatting(y.URI.from({scheme:N,authority:P}))?.workspaceSuffix||P||""}getHostTooltip(N,P){return this.findFormatting(y.URI.from({scheme:N,authority:P}))?.workspaceTooltip}registerCachedFormatter(N){const P=this.storedFormatters.formatters??=[];let x=P.findIndex(F=>F.scheme===N.scheme&&F.authority===N.authority);if(x===-1&&P.length>=L&&(x=L-1),x===-1)P.unshift(N);else{for(let F=x;F>0;F--)P[F]=P[F-1];P[0]=N}return this.storedFormattersMemento.saveMemento(),this.registerFormatter(N)}registerFormatter(N){return this.formatters.push(N),this._onDidChangeFormatters.fire({scheme:N.scheme}),{dispose:()=>{this.formatters=this.formatters.filter(P=>P!==N),this._onDidChangeFormatters.fire({scheme:N.scheme})}}}formatUri(N,P,x){let F=P.label.replace(_,(V,W,z,B)=>{switch(W){case"scheme":return N.scheme;case"authority":return N.authority;case"authoritySuffix":{const K=N.authority.indexOf("+");return K===-1?N.authority:N.authority.slice(K+1)}case"path":return P.stripPathStartingSeparator?N.path.slice(N.path[0]===P.separator?1:0):N.path;default:{if(z==="query"){const{query:K}=N;if(K&&K[0]==="{"&&K[K.length-1]==="}")try{return JSON.parse(K)[B]||""}catch{}}return""}}});return P.normalizeDriveLetter&&A(F)&&(F=F.charAt(1).toUpperCase()+F.substr(2)),P.tildify&&!x&&this.userHome&&(F=(0,a.tildify)(F,this.userHome.fsPath,this.os)),P.authorityPrefix&&N.authority&&(F=P.authorityPrefix+F),F.replace(I,P.separator)}appendWorkspaceSuffix(N,P){const x=this.findFormatting(P),F=x&&typeof x.workspaceSuffix=="string"?x.workspaceSuffix:void 0;return F?`${N} [${F}]`:N}};e.LabelService=R,e.LabelService=R=fe([O(0,m.IWorkbenchEnvironmentService),O(1,S.IWorkspaceContextService),O(2,d.IPathService),O(3,l.IRemoteAgentService),O(4,g.IStorageService),O(5,o.ILifecycleService)],R),(0,u.registerSingleton)(r.ILabelService,R,1)}),define(Q[4043],Y([1,0,125,57,3394,50,78,9,35,189,131]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchModelService=void 0;let h=class extends b.ModelService{constructor(r,i,s,o,u,d){super(r,i,s,u,o),this._pathService=d}_schemaShouldMaintainUndoRedoElements(r){return super._schemaShouldMaintainUndoRedoElements(r)||r.scheme===this._pathService.defaultUriScheme}};e.WorkbenchModelService=h,e.WorkbenchModelService=h=fe([O(0,f.IConfigurationService),O(1,T.ITextResourcePropertiesService),O(2,m.IUndoRedoService),O(3,t.ILanguageConfigurationService),O(4,D.ILanguageService),O(5,S.IPathService)],h),(0,v.registerSingleton)(y.IModelService,h,1)}),define(Q[4044],Y([1,0,35,127,139,131,39]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativePathService=void 0;let f=class extends D.AbstractPathService{constructor(m,S,h){super(S.userHome,m,S,h)}};e.NativePathService=f,e.NativePathService=f=fe([O(0,y.IRemoteAgentService),O(1,b.INativeWorkbenchEnvironmentService),O(2,T.IWorkspaceContextService)],f),(0,t.registerSingleton)(D.IPathService,f,1)}),define(Q[4045],Y([1,0,15,4,22,1153]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteFileSystemProviderClient=e.REMOTE_FILE_SYSTEM_CHANNEL_NAME=void 0,e.REMOTE_FILE_SYSTEM_CHANNEL_NAME="remoteFilesystem";class T extends D.DiskFileSystemProviderClient{static register(v,m,S){const h=v.getConnection();if(!h)return y.Disposable.None;const a=new y.DisposableStore,r=(async()=>{try{const i=await v.getRawEnvironment();i?m.registerProvider(b.Schemas.vscodeRemote,a.add(new T(i,h))):S.error("Cannot register remote filesystem provider. Remote environment doesnot exist.")}catch(i){S.error("Cannot register remote filesystem provider. Error while fetching remote environment.",(0,t.getErrorMessage)(i))}})();return a.add(m.onWillActivateFileSystemProvider(i=>{i.scheme===b.Schemas.vscodeRemote&&i.join(r)})),a}constructor(v,m){super(m.getChannel(e.REMOTE_FILE_SYSTEM_CHANNEL_NAME),{pathCaseSensitive:v.os===3})}}e.RemoteFileSystemProviderClient=T}),define(Q[755],Y([1,0,3099,20,102,6,122,4,10,9,49,11,181,24,309,39,65,44,31,17,42,8]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TunnelModel=e.PortsAttributes=e.isCandidatePort=e.OnPortForward=e.makeAddress=e.mapHasAddressLocalhostOrAllInterfaces=e.mapHasAddress=e.AutoTunnelSource=e.UserTunnelSource=e.TunnelSource=e.TunnelCloseReason=e.parseAddress=e.forwardedPortsViewEnabled=e.ACTIVATION_EVENT=void 0;const n=10*1e3,g="remote.tunnels.toRestore";e.ACTIVATION_EVENT="onTunnel",e.forwardedPortsViewEnabled=new l.RawContextKey("forwardedPortsViewEnabled",!1,t.localize(0,null));function w(N){const P=N.match(/^([a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*:)?([0-9]+)$/);if(P)return{host:P[1]?.substring(0,P[1].length-1)||"localhost",port:Number(P[2])}}e.parseAddress=w;var E;(function(N){N.Other="Other",N.User="User",N.AutoForwardEnd="AutoForwardEnd"})(E||(e.TunnelCloseReason=E={}));var C;(function(N){N[N.User=0]="User",N[N.Auto=1]="Auto",N[N.Extension=2]="Extension"})(C||(e.TunnelSource=C={})),e.UserTunnelSource={source:C.User,description:t.localize(1,null)},e.AutoTunnelSource={source:C.Auto,description:t.localize(2,null)};function I(N,P,x){const F=N.get(A(P,x));if(F)return F;if((0,i.isLocalhost)(P))for(const V of i.LOCALHOST_ADDRESSES){const W=A(V,x);if(N.has(W))return N.get(W)}else if((0,i.isAllInterfaces)(P))for(const V of i.ALL_INTERFACES_ADDRESSES){const W=A(V,x);if(N.has(W))return N.get(W)}}e.mapHasAddress=I;function _(N,P,x){const F=I(N,P,x);if(F)return F;const V=(0,i.isAllInterfaces)(P)?"localhost":(0,i.isLocalhost)(P)?"0.0.0.0":void 0;if(V)return I(N,V,x)}e.mapHasAddressLocalhostOrAllInterfaces=_;function A(N,P){return N+":"+P}e.makeAddress=A;var k;(function(N){N.Notify="notify",N.OpenBrowser="openBrowser",N.OpenBrowserOnce="openBrowserOnce",N.OpenPreview="openPreview",N.Silent="silent",N.Ignore="ignore"})(k||(e.OnPortForward=k={}));function L(N){return N&&"host"in N&&typeof N.host=="string"&&"port"in N&&typeof N.port=="number"&&(!("detail"in N)||typeof N.detail=="string")&&(!("pid"in N)||typeof N.pid=="string")}e.isCandidatePort=L;class R extends f.Disposable{static{this.SETTING="remote.portsAttributes"}static{this.DEFAULTS="remote.otherPortsAttributes"}static{this.RANGE=/^(\d+)\-(\d+)$/}static{this.HOST_AND_PORT=/^([a-z0-9\-]+):(\d{1,5})$/}constructor(P){super(),this.configurationService=P,this.portsAttributes=[],this._onDidChangeAttributes=new D.Emitter,this.onDidChangeAttributes=this._onDidChangeAttributes.event,this._register(P.onDidChangeConfiguration(x=>{(x.affectsConfiguration(R.SETTING)||x.affectsConfiguration(R.DEFAULTS))&&this.updateAttributes()})),this.updateAttributes()}updateAttributes(){this.portsAttributes=this.readSetting(),this._onDidChangeAttributes.fire()}getAttributes(P,x,F){let V=this.findNextIndex(P,x,F,this.portsAttributes,0);const W={label:void 0,onAutoForward:void 0,elevateIfNeeded:void 0,requireLocalPort:void 0,protocol:void 0};for(;V>=0;){const z=this.portsAttributes[V];z.key===P?(W.onAutoForward=z.onAutoForward??W.onAutoForward,W.elevateIfNeeded=z.elevateIfNeeded!==void 0?z.elevateIfNeeded:W.elevateIfNeeded,W.label=z.label??W.label,W.requireLocalPort=z.requireLocalPort,W.protocol=z.protocol):(W.onAutoForward=W.onAutoForward??z.onAutoForward,W.elevateIfNeeded=W.elevateIfNeeded!==void 0?W.elevateIfNeeded:z.elevateIfNeeded,W.label=W.label??z.label,W.requireLocalPort=W.requireLocalPort!==void 0?W.requireLocalPort:void 0,W.protocol=W.protocol??z.protocol),V=this.findNextIndex(P,x,F,this.portsAttributes,V+1)}return W.onAutoForward!==void 0||W.elevateIfNeeded!==void 0||W.label!==void 0||W.requireLocalPort!==void 0||W.protocol!==void 0?W:this.getOtherAttributes()}hasStartEnd(P){return P.start!==void 0&&P.end!==void 0}hasHostAndPort(P){return P.host!==void 0&&P.port!==void 0&&(0,p.isString)(P.host)&&(0,p.isNumber)(P.port)}findNextIndex(P,x,F,V,W){if(W>=V.length)return-1;const z=!(0,i.isLocalhost)(x)&&!(0,i.isAllInterfaces)(x),K=V.slice(W).findIndex(H=>(0,p.isNumber)(H.key)?z?!1:H.key===P:this.hasStartEnd(H.key)?z?!1:P>=H.key.start&&P<=H.key.end:this.hasHostAndPort(H.key)?P===H.key.port&&x===H.key.host:F?H.key.test(F):!1);return K>=0?K+W:-1}readSetting(){const P=this.configurationService.getValue(R.SETTING);if(!P||!(0,p.isObject)(P))return[];const x=[];for(const V in P){if(V===void 0)continue;const W=P[V];let z;if(Number(V))z=Number(V);else if((0,p.isString)(V))if(R.RANGE.test(V)){const B=V.match(R.RANGE);z={start:Number(B[1]),end:Number(B[2])}}else if(R.HOST_AND_PORT.test(V)){const B=V.match(R.HOST_AND_PORT);z={host:B[1],port:Number(B[2])}}else{let B;try{B=RegExp(V)}catch{}B&&(z=B)}z&&x.push({key:z,elevateIfNeeded:W.elevateIfNeeded,onAutoForward:W.onAutoForward,label:W.label,requireLocalPort:W.requireLocalPort,protocol:W.protocol})}const F=this.configurationService.getValue(R.DEFAULTS);return F&&(this.defaultPortAttributes={elevateIfNeeded:F.elevateIfNeeded,label:F.label,onAutoForward:F.onAutoForward,requireLocalPort:F.requireLocalPort,protocol:F.protocol}),this.sortAttributes(x)}sortAttributes(P){function x(F,V){return(0,p.isNumber)(F.key)?F.key:V.hasStartEnd(F.key)?F.key.start:V.hasHostAndPort(F.key)?F.key.port:Number.MAX_VALUE}return P.sort((F,V)=>x(F,this)-x(V,this))}getOtherAttributes(){return this.defaultPortAttributes}static providedActionToAction(P){switch(P){case i.ProvidedOnAutoForward.Notify:return k.Notify;case i.ProvidedOnAutoForward.OpenBrowser:return k.OpenBrowser;case i.ProvidedOnAutoForward.OpenBrowserOnce:return k.OpenBrowserOnce;case i.ProvidedOnAutoForward.OpenPreview:return k.OpenPreview;case i.ProvidedOnAutoForward.Silent:return k.Silent;case i.ProvidedOnAutoForward.Ignore:return k.Ignore;default:return}}async addAttributes(P,x,F){const W=this.configurationService.inspect(R.SETTING).userRemoteValue;let z;!W||!(0,p.isObject)(W)?z={}:z=(0,c.deepClone)(W),z[`${P}`]||(z[`${P}`]={});for(const B in x)z[`${P}`][B]=x[B];return this.configurationService.updateValue(R.SETTING,z,F)}}e.PortsAttributes=R;let M=class extends f.Disposable{constructor(P,x,F,V,W,z,B,K,H,U){super(),this.tunnelService=P,this.storageService=x,this.configurationService=F,this.environmentService=V,this.remoteAuthorityResolverService=W,this.workspaceContextService=z,this.logService=B,this.dialogService=K,this.extensionService=H,this.contextKeyService=U,this.inProgress=new Map,this._onForwardPort=new D.Emitter,this.onForwardPort=this._onForwardPort.event,this._onClosePort=new D.Emitter,this.onClosePort=this._onClosePort.event,this._onPortName=new D.Emitter,this.onPortName=this._onPortName.event,this._onCandidatesChanged=new D.Emitter,this.onCandidatesChanged=this._onCandidatesChanged.event,this._onEnvironmentTunnelsSet=new D.Emitter,this.onEnvironmentTunnelsSet=this._onEnvironmentTunnelsSet.event,this._environmentTunnelsSet=!1,this.restoreListener=void 0,this.restoreComplete=!1,this.onRestoreComplete=new D.Emitter,this.unrestoredExtensionTunnels=new Map,this.sessionCachedProperties=new Map,this.portAttributesProviders=[],this.mismatchCooldown=new Date,this.configPortsAttributes=new R(F),this.tunnelRestoreValue=this.getTunnelRestoreValue(),this._register(this.configPortsAttributes.onDidChangeAttributes(this.updateAttributes,this)),this.forwarded=new Map,this.remoteTunnels=new Map,this.tunnelService.tunnels.then(async G=>{const $=await this.getAttributes(G.map(ie=>({port:ie.tunnelRemotePort,host:ie.tunnelRemoteHost})));for(const ie of G)if(ie.localAddress){const J=A(ie.tunnelRemoteHost,ie.tunnelRemotePort),j=_(this._candidates??new Map,ie.tunnelRemoteHost,ie.tunnelRemotePort);this.forwarded.set(J,{remotePort:ie.tunnelRemotePort,remoteHost:ie.tunnelRemoteHost,localAddress:ie.localAddress,protocol:$?.get(ie.tunnelRemotePort)?.protocol??i.TunnelProtocol.Http,localUri:await this.makeLocalUri(ie.localAddress,$?.get(ie.tunnelRemotePort)),localPort:ie.tunnelLocalPort,runningProcess:j?.detail,hasRunningProcess:!!j,pid:j?.pid,privacy:ie.privacy,source:e.UserTunnelSource}),this.remoteTunnels.set(J,ie)}}),this.detected=new Map,this._register(this.tunnelService.onTunnelOpened(async G=>{const $=A(G.tunnelRemoteHost,G.tunnelRemotePort);if(!_(this.forwarded,G.tunnelRemoteHost,G.tunnelRemotePort)&&!_(this.detected,G.tunnelRemoteHost,G.tunnelRemotePort)&&!_(this.inProgress,G.tunnelRemoteHost,G.tunnelRemotePort)&&G.localAddress){const ie=_(this._candidates??new Map,G.tunnelRemoteHost,G.tunnelRemotePort),J=(await this.getAttributes([{port:G.tunnelRemotePort,host:G.tunnelRemoteHost}]))?.get(G.tunnelRemotePort);this.forwarded.set($,{remoteHost:G.tunnelRemoteHost,remotePort:G.tunnelRemotePort,localAddress:G.localAddress,protocol:J?.protocol??i.TunnelProtocol.Http,localUri:await this.makeLocalUri(G.localAddress,J),localPort:G.tunnelLocalPort,closeable:!0,runningProcess:ie?.detail,hasRunningProcess:!!ie,pid:ie?.pid,privacy:G.privacy,source:e.UserTunnelSource})}await this.storeForwarded(),this.remoteTunnels.set($,G),this._onForwardPort.fire(this.forwarded.get($))})),this._register(this.tunnelService.onTunnelClosed(G=>this.onTunnelClosed(G,E.Other))),this.checkExtensionActivationEvents()}extensionHasActivationEvent(){return this.extensionService.extensions.find(P=>P.activationEvents?.includes(e.ACTIVATION_EVENT))?(this.contextKeyService.createKey(e.forwardedPortsViewEnabled.key,!0),!0):!1}checkExtensionActivationEvents(){if(this.extensionHasActivationEvent())return;const P=this._register(this.extensionService.onDidRegisterExtensions(()=>{this.extensionHasActivationEvent()&&P.dispose()}))}async onTunnelClosed(P,x){const F=A(P.host,P.port);this.forwarded.has(F)&&(this.forwarded.delete(F),await this.storeForwarded(),this._onClosePort.fire(P))}makeLocalUri(P,x){if(P.startsWith("http"))return v.URI.parse(P);const F=x?.protocol??"http";return v.URI.parse(`${F}://${P}`)}async getStorageKey(){const P=this.workspaceContextService.getWorkspace(),x=P.configuration?(0,T.hash)(P.configuration.path):P.folders.length>0?(0,T.hash)(P.folders[0].uri.path):void 0;if(x===void 0){this.logService.debug("Could not get workspace hash for forwarded ports storage key.");return}return`${g}.${this.environmentService.remoteAuthority}.${x}`}async getTunnelRestoreValue(){const P=this.storageService.get(g,1);if(P)return this.storageService.remove(g,1),await this.storeForwarded(),P;const x=await this.getStorageKey();if(x)return this.storageService.get(x,0)}async restoreForwarded(){if(this.configurationService.getValue("remote.restoreForwardedPorts")){const P=await this.tunnelRestoreValue;if(P&&P!==this.knownPortsRestoreValue){const x=JSON.parse(P)??[];this.logService.trace(`ForwardedPorts: (TunnelModel) restoring ports ${x.map(F=>F.remotePort).join(", ")}`);for(const F of x){const V=_(this.detected,F.remoteHost,F.remotePort);F.source.source!==C.Extension&&!V||F.source.source===C.Extension&&V?await this.doForward({remote:{host:F.remoteHost,port:F.remotePort},local:F.localPort,name:F.name,privacy:F.privacy,elevateIfNeeded:!0,source:F.source}):F.source.source===C.Extension&&!V&&this.unrestoredExtensionTunnels.set(A(F.remoteHost,F.remotePort),F)}}}if(this.restoreComplete=!0,this.onRestoreComplete.fire(),!this.restoreListener){const P=await this.getStorageKey();this.restoreListener=this._register(new f.DisposableStore),this.restoreListener.add(this.storageService.onDidChangeValue(0,void 0,this.restoreListener)(async x=>{x.key===P&&(this.tunnelRestoreValue=Promise.resolve(this.storageService.get(P,0)),await this.restoreForwarded())}))}}async storeForwarded(){if(this.configurationService.getValue("remote.restoreForwardedPorts")){const P=JSON.stringify(Array.from(this.forwarded.values()));if(P!==this.knownPortsRestoreValue){this.knownPortsRestoreValue=P;const x=await this.getStorageKey();x&&this.storageService.store(x,this.knownPortsRestoreValue,0,0)}}}async showPortMismatchModalIfNeeded(P,x,F){if(!P.tunnelLocalPort||!F?.requireLocalPort||P.tunnelLocalPort===x)return;const V=new Date;if(this.mismatchCooldown.getTime()+n>V.getTime())return;this.mismatchCooldown=V;const W=t.localize(3,null,x,P.tunnelRemotePort,P.tunnelLocalPort);return this.dialogService.info(W)}async forward(P,x){return!this.restoreComplete&&this.environmentService.remoteAuthority&&await D.Event.toPromise(this.onRestoreComplete.event),this.doForward(P,x)}async doForward(P,x){await this.extensionService.activateByEvent(e.ACTIVATION_EVENT);const F=_(this.forwarded,P.remote.host,P.remote.port);x=x??(x!==null?(await this.getAttributes([P.remote]))?.get(P.remote.port):void 0);const V=P.local!==void 0?P.local:P.remote.port;let W;if(F)return this.mergeAttributesIntoExistingTunnel(F,P,x);{const z=this.environmentService.remoteAuthority,B=z?{getAddress:async()=>(await this.remoteAuthorityResolverService.resolveAuthority(z)).authority}:void 0,K=A(P.remote.host,P.remote.port);this.inProgress.set(K,!0),P=this.mergeCachedAndUnrestoredProperties(K,P);const H=await this.tunnelService.openTunnel(B,P.remote.host,P.remote.port,void 0,V,P.elevateIfNeeded?P.elevateIfNeeded:x?.elevateIfNeeded,P.privacy,x?.protocol);if(typeof H=="string")W=H;else if(H&&H.localAddress){const U=_(this._candidates??new Map,P.remote.host,P.remote.port),G=H.protocol?H.protocol===i.TunnelProtocol.Https?i.TunnelProtocol.Https:i.TunnelProtocol.Http:x?.protocol??i.TunnelProtocol.Http,$={remoteHost:H.tunnelRemoteHost,remotePort:H.tunnelRemotePort,localPort:H.tunnelLocalPort,name:x?.label??P.name,closeable:!0,localAddress:H.localAddress,protocol:G,localUri:await this.makeLocalUri(H.localAddress,x),runningProcess:U?.detail,hasRunningProcess:!!U,pid:U?.pid,source:P.source??e.UserTunnelSource,privacy:H.privacy};return this.forwarded.set(K,$),this.remoteTunnels.set(K,H),this.inProgress.delete(K),await this.storeForwarded(),await this.showPortMismatchModalIfNeeded(H,V,x),this._onForwardPort.fire($),H}this.inProgress.delete(K)}return W}mergeCachedAndUnrestoredProperties(P,x){const F=this.unrestoredExtensionTunnels.has(P)?this.unrestoredExtensionTunnels:this.sessionCachedProperties.has(P)?this.sessionCachedProperties:void 0;if(F){const V=F.get(P);F.delete(P),V&&(x.name=V.name??x.name,x.local=("local"in V?V.local:"localPort"in V?V.localPort:void 0)??x.local,x.privacy=V.privacy??x.privacy)}return x}async mergeAttributesIntoExistingTunnel(P,x,F){const V=F?.label??x.name;let W;(function(B){B[B.None=0]="None",B[B.Fire=1]="Fire",B[B.Reopen=2]="Reopen"})(W||(W={}));let z=W.None;switch(V!==P.name&&(P.name=V,z=W.Fire),(F?.protocol||P.protocol!==i.TunnelProtocol.Http)&&F?.protocol!==P.protocol&&(x.source=P.source,z=W.Reopen),x.privacy&&P.privacy!==x.privacy&&(z=W.Reopen),z){case W.Fire:{this._onForwardPort.fire();break}case W.Reopen:await this.close(P.remoteHost,P.remotePort,E.User),await this.doForward(x,F)}return _(this.remoteTunnels,x.remote.host,x.remote.port)}async name(P,x,F){const V=_(this.forwarded,P,x),W=A(P,x);if(V){V.name=F,await this.storeForwarded(),this._onPortName.fire({host:P,port:x});return}else this.detected.has(W)&&(this.detected.get(W).name=F,this._onPortName.fire({host:P,port:x}))}async close(P,x,F){const V=A(P,x),W=this.forwarded.get(V);return F===E.AutoForwardEnd&&W&&W.source.source===C.Auto&&this.sessionCachedProperties.set(V,{local:W.localPort,name:W.name,privacy:W.privacy}),await this.tunnelService.closeTunnel(P,x),this.onTunnelClosed({host:P,port:x},F)}address(P,x){const F=A(P,x);return(this.forwarded.get(F)||this.detected.get(F))?.localAddress}get environmentTunnelsSet(){return this._environmentTunnelsSet}addEnvironmentTunnels(P){if(P)for(const x of P){const F=_(this._candidates??new Map,x.remoteAddress.host,x.remoteAddress.port),V=typeof x.localAddress=="string"?x.localAddress:A(x.localAddress.host,x.localAddress.port);this.detected.set(A(x.remoteAddress.host,x.remoteAddress.port),{remoteHost:x.remoteAddress.host,remotePort:x.remoteAddress.port,localAddress:V,protocol:i.TunnelProtocol.Http,localUri:this.makeLocalUri(V),closeable:!1,runningProcess:F?.detail,hasRunningProcess:!!F,pid:F?.pid,privacy:i.TunnelPrivacyId.ConstantPrivate,source:{source:C.Extension,description:t.localize(4,null)}}),this.tunnelService.setEnvironmentTunnel(x.remoteAddress.host,x.remoteAddress.port,V,i.TunnelPrivacyId.ConstantPrivate,i.TunnelProtocol.Http)}this._environmentTunnelsSet=!0,this._onEnvironmentTunnelsSet.fire(),this._onForwardPort.fire()}setCandidateFilter(P){this._candidateFilter=P}async setCandidates(P){let x=P;this._candidateFilter&&(x=await this._candidateFilter(P));const F=this.updateInResponseToCandidates(x);this.logService.trace(`ForwardedPorts: (TunnelModel) removed candidates ${Array.from(F.values()).map(V=>V.port).join(", ")}`),this._onCandidatesChanged.fire(F)}updateInResponseToCandidates(P){const x=this._candidates??new Map,F=new Map;return this._candidates=F,P.forEach(V=>{const W=A(V.host,V.port);F.set(W,{host:V.host,port:V.port,detail:V.detail,pid:V.pid}),x.has(W)&&x.delete(W);const z=_(this.forwarded,V.host,V.port);z&&(z.runningProcess=V.detail,z.hasRunningProcess=!0,z.pid=V.pid)}),x.forEach((V,W)=>{const z=w(W);if(!z)return;const B=_(this.forwarded,z.host,z.port);B&&(B.runningProcess=void 0,B.hasRunningProcess=!1,B.pid=void 0);const K=_(this.detected,z.host,z.port);K&&(K.runningProcess=void 0,K.hasRunningProcess=!1,K.pid=void 0)}),x}get candidates(){return this._candidates?Array.from(this._candidates.values()):[]}get candidatesOrUndefined(){return this._candidates?this.candidates:void 0}async updateAttributes(){const P=Array.from(this.forwarded.values()),x=await this.getAttributes(P.map(F=>({port:F.remotePort,host:F.remoteHost})),!1);if(x)for(const F of P){const V=x.get(F.remotePort);(V?.protocol||F.protocol!==i.TunnelProtocol.Http)&&V?.protocol!==F.protocol&&await this.doForward({remote:{host:F.remoteHost,port:F.remotePort},local:F.localPort,name:F.name,source:F.source},V),V&&V.label&&V.label!==F.name&&await this.name(F.remoteHost,F.remotePort,V.label)}}async getAttributes(P,x=!0){const F=new Map,V=new Map;P.forEach(H=>{const U=_(this._candidates??new Map,i.LOCALHOST_ADDRESSES[0],H.port)??H;if(U){F.set(H.port,U);const G=L(U)?U.pid:void 0;V.has(G)||V.set(G,[]),V.get(G)?.push(H.port)}});const W=new Map;if(P.forEach(H=>{const U=this.configPortsAttributes.getAttributes(H.port,H.host,F.get(H.port)?.detail);U&&W.set(H.port,U)}),this.portAttributesProviders.length===0||!x)return W.size>0?W:void 0;const z=await Promise.all((0,y.flatten)(this.portAttributesProviders.map(H=>Array.from(V.entries()).map(U=>{const G=U[1],$=F.get(G[0]);return H.providePortAttributes(G,$?.pid,$?.detail,new d.CancellationTokenSource().token)})))),B=new Map;if(z.forEach(H=>H.forEach(U=>{U&&B.set(U.port,U)})),!W&&!B)return;const K=new Map;return P.forEach(H=>{const U=W.get(H.port),G=B.get(H.port);K.set(H.port,{elevateIfNeeded:U?.elevateIfNeeded,label:U?.label,onAutoForward:U?.onAutoForward??R.providedActionToAction(G?.autoForwardAction),requireLocalPort:U?.requireLocalPort,protocol:U?.protocol})}),K}addAttributesProvider(P){this.portAttributesProviders.push(P)}};e.TunnelModel=M,fe([(0,b.debounce)(1e3)],M.prototype,"storeForwarded",null),e.TunnelModel=M=fe([O(0,i.ITunnelService),O(1,r.IStorageService),O(2,m.IConfigurationService),O(3,o.IWorkbenchEnvironmentService),O(4,a.IRemoteAuthorityResolverService),O(5,s.IWorkspaceContextService),O(6,h.ILogService),O(7,S.IDialogService),O(8,u.IExtensionService),O(9,l.IContextKeyService)],M)}),define(Q[632],Y([1,0,6,5,35,24,309,755]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TunnelEditId=e.TunnelType=e.PORT_AUTO_SOURCE_SETTING_HYBRID=e.PORT_AUTO_SOURCE_SETTING_OUTPUT=e.PORT_AUTO_SOURCE_SETTING_PROCESS=e.PORT_AUTO_SOURCE_SETTING=e.PORT_AUTO_FORWARD_SETTING=e.TUNNEL_VIEW_CONTAINER_ID=e.TUNNEL_VIEW_ID=e.REMOTE_EXPLORER_TYPE_KEY=e.IRemoteExplorerService=void 0,e.IRemoteExplorerService=(0,y.createDecorator)("remoteExplorerService"),e.REMOTE_EXPLORER_TYPE_KEY="remote.explorerType",e.TUNNEL_VIEW_ID="~remote.forwardedPorts",e.TUNNEL_VIEW_CONTAINER_ID="~remote.forwardedPortsContainer",e.PORT_AUTO_FORWARD_SETTING="remote.autoForwardPorts",e.PORT_AUTO_SOURCE_SETTING="remote.autoForwardPortsSource",e.PORT_AUTO_SOURCE_SETTING_PROCESS="process",e.PORT_AUTO_SOURCE_SETTING_OUTPUT="output",e.PORT_AUTO_SOURCE_SETTING_HYBRID="hybrid";var v;(function(h){h.Candidate="Candidate",h.Detected="Detected",h.Forwarded="Forwarded",h.Add="Add"})(v||(e.TunnelType=v={}));var m;(function(h){h[h.None=0]="None",h[h.New=1]="New",h[h.Label=2]="Label",h[h.LocalPort=3]="LocalPort"})(m||(e.TunnelEditId=m={}));let S=class{constructor(a,r,i){this.storageService=a,this.tunnelService=r,this._targetType=[],this._onDidChangeTargetType=new t.Emitter,this.onDidChangeTargetType=this._onDidChangeTargetType.event,this._onDidChangeEditable=new t.Emitter,this.onDidChangeEditable=this._onDidChangeEditable.event,this._onEnabledPortsFeatures=new t.Emitter,this.onEnabledPortsFeatures=this._onEnabledPortsFeatures.event,this._portsFeaturesEnabled=!1,this.namedProcesses=new Map,this._tunnelModel=i.createInstance(f.TunnelModel)}set targetType(a){const r=this._targetType.length>0?this._targetType[0]:"",i=a.length>0?a[0]:"";r!==i&&(this._targetType=a,this.storageService.store(e.REMOTE_EXPLORER_TYPE_KEY,this._targetType.toString(),1,1),this.storageService.store(e.REMOTE_EXPLORER_TYPE_KEY,this._targetType.toString(),0,0),this._onDidChangeTargetType.fire(this._targetType))}get targetType(){return this._targetType}get tunnelModel(){return this._tunnelModel}forward(a,r){return this.tunnelModel.forward(a,r)}close(a,r){return this.tunnelModel.close(a.host,a.port,r)}setTunnelInformation(a){a?.features&&this.tunnelService.setTunnelFeatures(a.features),this.tunnelModel.addEnvironmentTunnels(a?.environmentTunnels)}setEditable(a,r,i){i?this._editable={tunnelItem:a,data:i,editId:r}:this._editable=void 0,this._onDidChangeEditable.fire(a?{tunnel:a,editId:r}:void 0)}getEditableData(a,r){return this._editable&&(!a&&a===this._editable.tunnelItem||a&&this._editable.tunnelItem?.remotePort===a.remotePort&&this._editable.tunnelItem.remoteHost===a.remoteHost&&this._editable.editId===r)?this._editable.data:void 0}setCandidateFilter(a){return a?(this.tunnelModel.setCandidateFilter(a),{dispose:()=>{this.tunnelModel.setCandidateFilter(void 0)}}):{dispose:()=>{}}}onFoundNewCandidates(a){this.tunnelModel.setCandidates(a)}restore(){return this.tunnelModel.restoreForwarded()}enablePortsFeatures(){this._portsFeaturesEnabled=!0,this._onEnabledPortsFeatures.fire()}get portsFeaturesEnabled(){return this._portsFeaturesEnabled}};S=fe([O(0,D.IStorageService),O(1,T.ITunnelService),O(2,y.IInstantiationService)],S),(0,b.registerSingleton)(e.IRemoteExplorerService,S,1)}),define(Q[4046],Y([1,0,2511,53,3846,60,632,309,4,23,9,11,127,16,56,8,755]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTunnelService=void 0;let u=class extends v.Disposable{constructor(p,c,l,n,g,w,E,C){super(),this.remoteExplorerService=c,this.tunnelService=l,this.notificationService=n,this.configurationService=g,this.logService=w,this.remoteAgentService=E,this.contextKeyService=C,this.elevateionRetry=!1,this.portsAttributesProviders=new Map,this._alreadyRegistered=!1,this._proxy=p.getProxy(y.ExtHostContext.ExtHostTunnelService),this._register(l.onTunnelOpened(()=>this._proxy.$onDidTunnelsChange())),this._register(l.onTunnelClosed(()=>this._proxy.$onDidTunnelsChange()))}processFindingEnabled(){return(!!this.configurationService.getValue(T.PORT_AUTO_FORWARD_SETTING)||this.tunnelService.hasTunnelProvider)&&this.configurationService.getValue(T.PORT_AUTO_SOURCE_SETTING)!==T.PORT_AUTO_SOURCE_SETTING_OUTPUT}async $setRemoteTunnelService(p){this.remoteExplorerService.namedProcesses.set(p,"Code Extension Host"),this.remoteExplorerService.portsFeaturesEnabled?this._proxy.$registerCandidateFinder(this.processFindingEnabled()):this._register(this.remoteExplorerService.onEnabledPortsFeatures(()=>this._proxy.$registerCandidateFinder(this.configurationService.getValue(T.PORT_AUTO_FORWARD_SETTING)))),this._register(this.configurationService.onDidChangeConfiguration(async c=>{if(c.affectsConfiguration(T.PORT_AUTO_FORWARD_SETTING)||c.affectsConfiguration(T.PORT_AUTO_SOURCE_SETTING))return this._proxy.$registerCandidateFinder(this.processFindingEnabled())})),this._register(this.tunnelService.onAddedTunnelProvider(()=>this._proxy.$registerCandidateFinder(this.processFindingEnabled())))}async $registerPortsAttributesProvider(p,c){this.portsAttributesProviders.set(c,p),this._alreadyRegistered||(this.remoteExplorerService.tunnelModel.addAttributesProvider(this),this._alreadyRegistered=!0)}async $unregisterPortsAttributesProvider(p){this.portsAttributesProviders.delete(p)}async providePortAttributes(p,c,l,n){if(this.portsAttributesProviders.size===0)return[];const g=Array.from(this.portsAttributesProviders.entries()).filter(w=>{const E=w[1],C=typeof E.portRange=="number"?[E.portRange,E.portRange+1]:E.portRange,I=C?p.some(A=>C[0]<=A&&A<C[1]):!0,_=!E.commandPattern||l&&l.match(E.commandPattern);return I&&_}).map(w=>w[0]);return g.length===0?[]:this._proxy.$providePortAttributes(g,p,c,l,n)}async $openTunnel(p,c){const l=await this.remoteExplorerService.forward({remote:p.remoteAddress,local:p.localAddressPort,name:p.label,source:{source:o.TunnelSource.Extension,description:c},elevateIfNeeded:!1});if(!(!l||typeof l=="string"))return!this.elevateionRetry&&p.localAddressPort!==void 0&&l.tunnelLocalPort!==void 0&&this.tunnelService.isPortPrivileged(p.localAddressPort)&&l.tunnelLocalPort!==p.localAddressPort&&this.tunnelService.canElevate&&this.elevationPrompt(p,l,c),b.TunnelDtoConverter.fromServiceTunnel(l)}async elevationPrompt(p,c,l){return this.notificationService.prompt(m.Severity.Info,t.localize(0,null,l,p.remoteAddress.port,p.localAddressPort),[{label:t.localize(1,null,c.tunnelRemotePort),run:async()=>{this.elevateionRetry=!0,await this.remoteExplorerService.close({host:c.tunnelRemoteHost,port:c.tunnelRemotePort},o.TunnelCloseReason.Other),await this.remoteExplorerService.forward({remote:p.remoteAddress,local:p.localAddressPort,name:p.label,source:{source:o.TunnelSource.Extension,description:l},elevateIfNeeded:!0}),this.elevateionRetry=!1}}])}async $closeTunnel(p){return this.remoteExplorerService.close(p,o.TunnelCloseReason.Other)}async $getTunnels(){return(await this.tunnelService.tunnels).map(p=>({remoteAddress:{port:p.tunnelRemotePort,host:p.tunnelRemoteHost},localAddress:p.localAddress,privacy:p.privacy,protocol:p.protocol}))}async $onFoundNewCandidates(p){this.remoteExplorerService.onFoundNewCandidates(p)}async $setTunnelProvider(p){const c={forwardPort:(l,n)=>this._proxy.$forwardPort(l,n).then(w=>{if(w){if(typeof w=="string")return w}else return;const E=w;return this.logService.trace(`ForwardedPorts: (MainThreadTunnelService) New tunnel established by tunnel provider: ${E?.remoteAddress.host}:${E?.remoteAddress.port}`),{tunnelRemotePort:E.remoteAddress.port,tunnelRemoteHost:E.remoteAddress.host,localAddress:typeof E.localAddress=="string"?E.localAddress:(0,o.makeAddress)(E.localAddress.host,E.localAddress.port),tunnelLocalPort:typeof E.localAddress!="string"?E.localAddress.port:void 0,public:E.public,privacy:E.privacy,protocol:E.protocol??f.TunnelProtocol.Http,dispose:async C=>(this.logService.trace(`ForwardedPorts: (MainThreadTunnelService) Closing tunnel from tunnel provider: ${E?.remoteAddress.host}:${E?.remoteAddress.port}`),this._proxy.$closeTunnel({host:E.remoteAddress.host,port:E.remoteAddress.port},C))}})};p&&this.tunnelService.setTunnelFeatures(p),this.tunnelService.setTunnelProvider(c),this.contextKeyService.createKey(o.forwardedPortsViewEnabled.key,!0)}async $setCandidateFilter(){this.remoteExplorerService.setCandidateFilter(p=>this._proxy.$applyCandidateFilter(p))}async $setCandidatePortSource(p){this.remoteAgentService.getEnvironment().then(()=>{switch(p){case y.CandidatePortSource.None:{r.Registry.as(i.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"remote.autoForwardPorts":!1}}]);break}case y.CandidatePortSource.Output:{r.Registry.as(i.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"remote.autoForwardPortsSource":T.PORT_AUTO_SOURCE_SETTING_OUTPUT}}]);break}default:}}).catch(()=>{})}};e.MainThreadTunnelService=u,e.MainThreadTunnelService=u=fe([(0,D.extHostNamedCustomer)(y.MainContext.MainThreadTunnelService),O(1,T.IRemoteExplorerService),O(2,f.ITunnelService),O(3,m.INotificationService),O(4,S.IConfigurationService),O(5,h.ILogService),O(6,a.IRemoteAgentService),O(7,s.IContextKeyService)],u)}),define(Q[4047],Y([1,0,2881,7,46,38,29,8,9,5,41,43,28,6,4,85,306,34,13,88,632,68,23,249,202,19,37,135,10,309,94,113,30,157,1298,753,31,18,90,207,36,110,193,84,32,54,755,1830]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P,x,F,V,W,z,B,K,H,U,G,$){"use strict";var ie;Object.defineProperty(e,"__esModule",{value:!0}),e.OpenPortInPreviewAction=e.OpenPortInBrowserAction=e.ForwardPortAction=e.TunnelPanelDescriptor=e.TunnelPanel=e.TunnelViewModel=e.openPreviewEnabledContext=void 0,e.openPreviewEnabledContext=new f.RawContextKey("openPreviewEnabled",!1);class J{constructor(ze){this.remoteExplorerService=ze,this.headerRowHeight=22}getHeight(ze){return ze.tunnelType===c.TunnelType.Add&&!this.remoteExplorerService.getEditableData(void 0)?30:22}}let j=class{constructor(ze,je){this.remoteExplorerService=ze,this.tunnelService=je,this._candidates=new Map,this.input={label:t.localize(0,null),icon:void 0,tunnelType:c.TunnelType.Add,hasRunningProcess:!1,remoteHost:"",remotePort:0,processDescription:"",tooltipPostfix:"",iconTooltip:"",portTooltip:"",processTooltip:"",originTooltip:"",privacyTooltip:"",source:{source:$.TunnelSource.User,description:""},protocol:A.TunnelProtocol.Http,privacy:{id:A.TunnelPrivacyId.Private,themeIcon:N.privatePortIcon.id,label:t.localize(1,null)},strip:()=>{}},this.model=ze.tunnelModel,this.onForwardedPortsChanged=r.Event.any(this.model.onForwardPort,this.model.onClosePort,this.model.onPortName,this.model.onCandidatesChanged)}get all(){const ze=[];return this._candidates=new Map,this.model.candidates.forEach(je=>{this._candidates.set((0,$.makeAddress)(je.host,je.port),je)}),(this.model.forwarded.size>0||this.remoteExplorerService.getEditableData(void 0))&&ze.push(...this.forwarded),this.model.detected.size>0&&ze.push(...this.detected),ze.push(this.input),ze}addProcessInfoFromCandidate(ze){const je=(0,$.makeAddress)(ze.remoteHost,ze.remotePort);this._candidates.has(je)&&(ze.processDescription=this._candidates.get(je).detail)}get forwarded(){return Array.from(this.model.forwarded.values()).map(je=>{const Ge=ne.createFromTunnel(this.remoteExplorerService,this.tunnelService,je);return this.addProcessInfoFromCandidate(Ge),Ge}).sort((je,Ge)=>je.remotePort===Ge.remotePort?je.remoteHost<Ge.remoteHost?-1:1:je.remotePort<Ge.remotePort?-1:1)}get detected(){return Array.from(this.model.detected.values()).map(ze=>{const je=ne.createFromTunnel(this.remoteExplorerService,this.tunnelService,ze,c.TunnelType.Detected,!1);return this.addProcessInfoFromCandidate(je),je})}isEmpty(){return this.detected.length===0&&(this.forwarded.length===0||this.forwarded.length===1&&this.forwarded[0].tunnelType===c.TunnelType.Add&&!this.remoteExplorerService.getEditableData(void 0))}};e.TunnelViewModel=j,e.TunnelViewModel=j=fe([O(0,c.IRemoteExplorerService),O(1,A.ITunnelService)],j);function ee(st){return{label:"",tunnel:st,editId:c.TunnelEditId.None,tooltip:""}}class X{constructor(){this.label="",this.tooltip="",this.weight=1,this.minimumWidth=40,this.maximumWidth=40,this.templateId="actionbar"}project(ze){if(ze.tunnelType===c.TunnelType.Add)return ee(ze);const je=ze.processDescription?N.forwardedPortWithProcessIcon:N.forwardedPortWithoutProcessIcon;let Ge="";return ze instanceof ne&&(Ge=`${ze.iconTooltip} ${ze.tooltipPostfix}`),{label:"",icon:je,tunnel:ze,editId:c.TunnelEditId.None,tooltip:Ge}}}class te{constructor(){this.label=t.localize(2,null),this.tooltip=t.localize(3,null),this.weight=1,this.templateId="actionbar"}project(ze){const je=ze.tunnelType===c.TunnelType.Add,Ge=ze.label;let Ze="";return ze instanceof ne&&!je?Ze=`${ze.portTooltip} ${ze.tooltipPostfix}`:Ze=Ge,{label:Ge,tunnel:ze,menuId:d.MenuId.TunnelPortInline,editId:ze.tunnelType===c.TunnelType.Add?c.TunnelEditId.New:c.TunnelEditId.Label,tooltip:Ze}}}class Z{constructor(){this.label=t.localize(4,null),this.tooltip=t.localize(5,null),this.weight=1,this.templateId="actionbar"}project(ze){if(ze.tunnelType===c.TunnelType.Add)return ee(ze);const je=ze.localAddress??"";let Ge=je;return ze instanceof ne&&(Ge=ze.tooltipPostfix),{label:je,menuId:d.MenuId.TunnelLocalAddressInline,tunnel:ze,editId:c.TunnelEditId.LocalPort,tooltip:Ge,markdownTooltip:je?Z.getHoverText(je):void 0}}static getHoverText(ze){return function(je){const Ge=je.getValue("editor");let Ze="";Ge.multiCursorModifier==="ctrlCmd"?F.isMacintosh?Ze=t.localize(6,null):Ze=t.localize(7,null):F.isMacintosh?Ze=t.localize(8,null):Ze=t.localize(9,null);const tt=new B.MarkdownString("",!0),Xe=ze.startsWith("http")?ze:`http://${ze}`;return tt.appendLink(Xe,"Follow link").appendMarkdown(` (${Ze})`)}}}class se{constructor(){this.label=t.localize(10,null),this.tooltip=t.localize(11,null),this.weight=2,this.templateId="actionbar"}project(ze){return ze.tunnelType===c.TunnelType.Add?ee(ze):{label:ze.processDescription??"",tunnel:ze,editId:c.TunnelEditId.None,tooltip:ze instanceof ne?ze.processTooltip:""}}}class re{constructor(){this.label=t.localize(12,null),this.tooltip=t.localize(13,null),this.weight=1,this.templateId="actionbar"}project(ze){if(ze.tunnelType===c.TunnelType.Add)return ee(ze);const je=ze.source.description,Ge=`${ze instanceof ne?ze.originTooltip:""}. ${ze instanceof ne?ze.tooltipPostfix:""}`;return{label:je,menuId:d.MenuId.TunnelOriginInline,tunnel:ze,editId:c.TunnelEditId.None,tooltip:Ge}}}class oe{constructor(){this.label=t.localize(14,null),this.tooltip=t.localize(15,null),this.weight=1,this.templateId="actionbar"}project(ze){if(ze.tunnelType===c.TunnelType.Add)return ee(ze);const je=ze.privacy?.label;let Ge="";return ze instanceof ne&&(Ge=`${ze.privacy.label} ${ze.tooltipPostfix}`),{label:je,tunnel:ze,icon:{id:ze.privacy.themeIcon},editId:c.TunnelEditId.None,tooltip:Ge}}}let le=class extends i.Disposable{constructor(ze,je,Ge,Ze,tt,Xe,nt,ft){super(),this.instantiationService=ze,this.contextKeyService=je,this.menuService=Ge,this.contextViewService=Ze,this.remoteExplorerService=tt,this.commandService=Xe,this.configurationService=nt,this.hoverService=ft,this.templateId="actionbar"}set actionRunner(ze){this._actionRunner=ze}renderTemplate(ze){const je=y.append(ze,y.$(".ports-view-actionbar-cell")),Ge=y.append(je,y.$(".ports-view-actionbar-cell-icon")),Ze=new o.IconLabel(je,{supportHighlights:!0,hoverDelegate:{showHover:nt=>this.hoverService.showHover(nt),delay:this.configurationService.getValue("workbench.hover.delay")}}),tt=y.append(je,y.$(".actions")),Xe=new s.ActionBar(tt,{actionViewItemProvider:p.createActionViewItem.bind(void 0,this.instantiationService)});return{label:Ze,icon:Ge,actionBar:Xe,container:je,elementDisposable:i.Disposable.None}}renderElement(ze,je,Ge){Ge.actionBar.clear(),Ge.icon.className="ports-view-actionbar-cell-icon",Ge.icon.style.display="none",Ge.label.setLabel(""),Ge.label.element.style.display="none",Ge.container.style.height="22px",Ge.button&&(Ge.button.element.style.display="none",Ge.button.dispose()),Ge.container.style.paddingLeft="0px",Ge.elementDisposable.dispose();let Ze;ze.editId===c.TunnelEditId.New&&(Ze=this.remoteExplorerService.getEditableData(void 0))?this.renderInputBox(Ge.container,Ze):(Ze=this.remoteExplorerService.getEditableData(ze.tunnel,ze.editId),Ze?this.renderInputBox(Ge.container,Ze):ze.tunnel.tunnelType===c.TunnelType.Add&&ze.menuId===d.MenuId.TunnelPortInline?this.renderButton(ze,Ge):this.renderActionBarItem(ze,Ge))}renderButton(ze,je){je.container.style.paddingLeft="7px",je.container.style.height="28px",je.button=this._register(new W.Button(je.container,G.defaultButtonStyles)),je.button.label=ze.label,je.button.element.title=ze.tooltip,this._register(je.button.onDidClick(()=>{this.commandService.executeCommand(_e.INLINE_ID)}))}tunnelContext(ze){let je;return ze instanceof ne&&(je=ze.strip()),je||(je={tunnelType:ze.tunnelType,remoteHost:ze.remoteHost,remotePort:ze.remotePort,localAddress:ze.localAddress,protocol:ze.protocol,localUri:ze.localUri,localPort:ze.localPort,name:ze.name,closeable:ze.closeable,source:ze.source,privacy:ze.privacy,processDescription:ze.processDescription,label:ze.label}),je}renderActionBarItem(ze,je){je.label.element.style.display="flex",je.label.setLabel(ze.label,void 0,{title:ze.markdownTooltip?{markdown:ze.markdownTooltip(this.configurationService),markdownNotSupportedFallback:ze.tooltip}:ze.tooltip,extraClasses:ze.menuId===d.MenuId.TunnelLocalAddressInline?["ports-view-actionbar-cell-localaddress"]:void 0}),je.actionBar.context=this.tunnelContext(ze.tunnel),je.container.style.paddingLeft="10px";const Ge=[["view",c.TUNNEL_VIEW_ID],[ce.key,ze.tunnel.tunnelType],[ae.key,ze.tunnel.closeable],[ue.key,ze.tunnel.privacy.id],[ge.key,ze.tunnel.protocol]],Ze=this.contextKeyService.createOverlay(Ge),tt=new i.DisposableStore;if(je.elementDisposable=tt,ze.menuId){const Xe=tt.add(this.menuService.createMenu(ze.menuId,Ze));let nt=[];if((0,p.createAndFillInActionBarActions)(Xe,{shouldForwardArgs:!0},nt),nt){const ft=nt.filter(Et=>Et.id.toLowerCase().indexOf("label")>=0);ft.length>1&&(ft.sort((Et,It)=>Et.label.length-It.label.length),ft.pop(),nt=nt.filter(Et=>ft.indexOf(Et)<0)),je.actionBar.push(nt,{icon:!0,label:!1}),this._actionRunner&&(je.actionBar.actionRunner=this._actionRunner)}}ze.icon&&(je.icon.className=`ports-view-actionbar-cell-icon ${C.ThemeIcon.asClassName(ze.icon)}`,je.icon.title=ze.tooltip,je.icon.style.display="inline")}renderInputBox(ze,je){this.inputDone&&(this.inputDone(!1,!1),this.inputDone=void 0),ze.style.paddingLeft="5px";const Ge=je.startingValue||"",Ze=new g.InputBox(ze,this.contextViewService,{ariaLabel:t.localize(16,null),validationOptions:{validation:nt=>{const ft=je.validationMessage(nt);return ft?{content:ft.content,formatContent:!0,type:ft.severity===n.Severity.Error?3:1}:null}},placeholder:je.placeholder||"",inputBoxStyles:G.defaultInputBoxStyles});Ze.value=Ge,Ze.focus(),Ze.select({start:0,end:je.startingValue?je.startingValue.length:0});const tt=(0,w.once)(async(nt,ft)=>{(0,i.dispose)(Xe),this.inputDone&&(this.inputDone=void 0),Ze.element.style.display="none";const Et=Ze.value;if(ft)return je.onFinish(Et,nt)});this.inputDone=tt;const Xe=[Ze,y.addStandardDisposableListener(Ze.inputElement,y.EventType.KEY_DOWN,async nt=>{if(nt.equals(3))return nt.stopPropagation(),Ze.validate()!==3?tt(!0,!0):tt(!1,!0);if(nt.equals(9))return nt.preventDefault(),nt.stopPropagation(),tt(!1,!0)}),y.addDisposableListener(Ze.inputElement,y.EventType.BLUR,()=>tt(Ze.validate()!==3,!0))];return(0,i.toDisposable)(()=>{tt(!1,!1)})}disposeElement(ze,je,Ge,Ze){Ge.elementDisposable.dispose()}disposeTemplate(ze){ze.label.dispose(),ze.actionBar.dispose(),ze.elementDisposable.dispose(),ze.button?.dispose()}};le=fe([O(0,m.IInstantiationService),O(1,f.IContextKeyService),O(2,d.IMenuService),O(3,T.IContextViewService),O(4,c.IRemoteExplorerService),O(5,a.ICommandService),O(6,v.IConfigurationService),O(7,K.IHoverService)],le);class ne{static createFromTunnel(ze,je,Ge,Ze=c.TunnelType.Forwarded,tt){return new ne(Ze,Ge.remoteHost,Ge.remotePort,Ge.source,!!Ge.hasRunningProcess,Ge.protocol,Ge.localUri,Ge.localAddress,Ge.localPort,tt===void 0?Ge.closeable:tt,Ge.name,Ge.runningProcess,Ge.pid,Ge.privacy,ze,je)}strip(){return new ne(this.tunnelType,this.remoteHost,this.remotePort,this.source,this.hasRunningProcess,this.protocol,this.localUri,this.localAddress,this.localPort,this.closeable,this.name,this.runningProcess,this.pid,this._privacy)}constructor(ze,je,Ge,Ze,tt,Xe,nt,ft,Et,It,Nt,Ot,kt,xt,Mt,Ht){this.tunnelType=ze,this.remoteHost=je,this.remotePort=Ge,this.source=Ze,this.hasRunningProcess=tt,this.protocol=Xe,this.localUri=nt,this.localAddress=ft,this.localPort=Et,this.closeable=It,this.name=Nt,this.runningProcess=Ot,this.pid=kt,this._privacy=xt,this.remoteExplorerService=Mt,this.tunnelService=Ht}get label(){if(this.tunnelType===c.TunnelType.Add&&this.name)return this.name;const ze=(0,A.isLocalhost)(this.remoteHost)||(0,A.isAllInterfaces)(this.remoteHost)?`${this.remotePort}`:`${this.remoteHost}:${this.remotePort}`;return this.name?`${this.name} (${ze})`:ze}set processDescription(ze){this.runningProcess=ze}get processDescription(){let ze="";return this.runningProcess?(this.pid&&this.remoteExplorerService?.namedProcesses.has(this.pid)?ze=this.remoteExplorerService.namedProcesses.get(this.pid):ze=this.runningProcess.replace(/\0/g," ").trim(),this.pid&&(ze+=` (${this.pid})`)):this.hasRunningProcess&&(ze=t.localize(17,null)),ze}get tooltipPostfix(){let ze;return this.localAddress?ze=t.localize(18,null,this.remoteHost,this.remotePort,this.localAddress):ze=t.localize(19,null,this.remoteHost,this.remotePort),ze}get iconTooltip(){return this.tunnelType===c.TunnelType.Add?this.label:`${this.processDescription?t.localize(20,null):t.localize(21,null)}`}get portTooltip(){return this.tunnelType===c.TunnelType.Add?"":`${this.name?t.localize(22,null,this.name):""}`}get processTooltip(){return this.processDescription??""}get originTooltip(){return this.source.description}get privacy(){return this.tunnelService?.privacyOptions?this.tunnelService?.privacyOptions.find(ze=>ze.id===this._privacy)??{id:"",themeIcon:U.Codicon.question.id,label:t.localize(23,null)}:{id:A.TunnelPrivacyId.Private,themeIcon:N.privatePortIcon.id,label:t.localize(24,null)}}}const ce=new f.RawContextKey("tunnelType",c.TunnelType.Add,!0),ae=new f.RawContextKey("tunnelCloseable",!1,!0),ue=new f.RawContextKey("tunnelPrivacy",void 0,!0),de=new f.RawContextKey("tunnelPrivacyEnabled",!1,!0),ge=new f.RawContextKey("tunnelProtocol",A.TunnelProtocol.Http,!0),he=new f.RawContextKey("tunnelViewFocus",!1,t.localize(25,null)),be="tunnelViewSelection",ve=new f.RawContextKey(be,void 0,!0),Ie="tunnelViewMultiSelection",Se=new f.RawContextKey(Ie,void 0,!0),we=new f.RawContextKey("portChangable",!1,!0);let ye=class extends I.ViewPane{static{ie=this}static{this.ID=c.TUNNEL_VIEW_ID}static{this.TITLE=t.localize(26,null)}constructor(ze,je,Ge,Ze,tt,Xe,nt,ft,Et,It,Nt,Ot,kt,xt,Mt,Ht,Yt,jt){super(je,Ge,Ze,Xe,tt,ft,nt,Et,kt,Mt),this.viewModel=ze,this.quickInputService=It,this.commandService=Nt,this.menuService=Ot,this.remoteExplorerService=xt,this.tunnelService=Ht,this.contextViewService=Yt,this.hoverService=jt,this.tableDisposables=this._register(new i.DisposableStore),this.isEditing=!1,this.titleActions=[],this.lastFocus=[],this.height=0,this.width=0,this.tunnelTypeContext=ce.bindTo(tt),this.tunnelCloseableContext=ae.bindTo(tt),this.tunnelPrivacyContext=ue.bindTo(tt),this.tunnelPrivacyEnabledContext=de.bindTo(tt),this.tunnelPrivacyEnabledContext.set(Ht.canChangePrivacy),this.tunnelProtocolContext=ge.bindTo(tt),this.tunnelViewFocusContext=he.bindTo(tt),this.tunnelViewSelectionContext=ve.bindTo(tt),this.tunnelViewMultiSelectionContext=Se.bindTo(tt),this.portChangableContextKey=we.bindTo(tt);const ii=this.contextKeyService.createOverlay([["view",ie.ID]]),ri=this._register(this.menuService.createMenu(d.MenuId.TunnelTitle,ii)),$e=()=>{this.titleActions=[],(0,p.createAndFillInActionBarActions)(ri,void 0,this.titleActions),this.updateActions()};this._register(ri.onDidChange($e)),$e(),this._register((0,i.toDisposable)(()=>{this.titleActions=[]})),this.registerPrivacyActions(),this._register(r.Event.once(this.tunnelService.onAddedTunnelProvider)(()=>{this.tunnelPrivacyEnabledContext.get()===!1&&(this.tunnelPrivacyEnabledContext.set(Ht.canChangePrivacy),$e(),this.registerPrivacyActions(),this.createTable(),this.table.layout(this.height,this.width))}))}registerPrivacyActions(){for(const ze of this.tunnelService.privacyOptions){const je=`remote.tunnel.privacy${ze.id}`;a.CommandsRegistry.registerCommand(je,Ve.handler(ze.id)),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelPrivacy,{order:0,command:{id:je,title:ze.label,toggled:ue.isEqualTo(ze.id)}})}}get portCount(){return this.remoteExplorerService.tunnelModel.forwarded.size+this.remoteExplorerService.tunnelModel.detected.size}createTable(){if(!this.panelContainer)return;this.tableDisposables.clear(),y.clearNode(this.panelContainer);const ze=y.append(this.panelContainer,y.$(".customview-tree"));ze.classList.add("ports-view"),ze.classList.add("file-icon-themable-tree","show-file-icons");const je=new le(this.instantiationService,this.contextKeyService,this.menuService,this.contextViewService,this.remoteExplorerService,this.commandService,this.configurationService,this.hoverService),Ge=[new X,new te,new Z,new se];this.tunnelService.canChangePrivacy&&Ge.push(new oe),Ge.push(new re),this.table=this.instantiationService.createInstance(V.WorkbenchTable,"RemoteTunnels",ze,new J(this.remoteExplorerService),Ge,[je],{keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:nt=>nt.label},multipleSelectionSupport:!0,accessibilityProvider:{getAriaLabel:nt=>nt instanceof ne?`${nt.tooltipPostfix} ${nt.portTooltip} ${nt.iconTooltip} ${nt.processTooltip} ${nt.originTooltip} ${this.tunnelService.canChangePrivacy?nt.privacy.label:""}`:nt.label,getWidgetAriaLabel:()=>t.localize(27,null)},openOnSingleClick:!0});const Ze=new u.ActionRunner;je.actionRunner=Ze,this.tableDisposables.add(this.table),this.tableDisposables.add(this.table.onContextMenu(nt=>this.onContextMenu(nt,Ze))),this.tableDisposables.add(this.table.onMouseDblClick(nt=>this.onMouseDblClick(nt))),this.tableDisposables.add(this.table.onDidChangeFocus(nt=>this.onFocusChanged(nt))),this.tableDisposables.add(this.table.onDidChangeSelection(nt=>this.onSelectionChanged(nt))),this.tableDisposables.add(this.table.onDidFocus(()=>this.tunnelViewFocusContext.set(!0))),this.tableDisposables.add(this.table.onDidBlur(()=>this.tunnelViewFocusContext.set(!1)));const tt=()=>this.table.splice(0,Number.POSITIVE_INFINITY,this.viewModel.all);tt();let Xe=this.portCount;this.tableDisposables.add(r.Event.debounce(this.viewModel.onForwardedPortsChanged,(nt,ft)=>ft,50)(()=>{const nt=this.portCount;(Xe===0||nt===0)&&Xe!==nt&&this._onDidChangeViewWelcomeState.fire(),Xe=nt,tt()})),this.tableDisposables.add(this.table.onMouseClick(nt=>{if(this.hasOpenLinkModifier(nt.browserEvent)){const ft=this.table.getSelectedElements();(ft.length===0||ft.length===1&&ft[0]===nt.element)&&this.commandService.executeCommand(Ee.ID,nt.element)}})),this.tableDisposables.add(this.table.onDidOpen(nt=>{!nt.element||nt.element.tunnelType!==c.TunnelType.Forwarded||nt.browserEvent?.type==="dblclick"&&this.commandService.executeCommand(Pe.ID)})),this.tableDisposables.add(this.remoteExplorerService.onDidChangeEditable(nt=>{this.isEditing=!!this.remoteExplorerService.getEditableData(nt?.tunnel,nt?.editId),this._onDidChangeViewWelcomeState.fire(),this.isEditing||ze.classList.remove("highlight"),tt(),this.isEditing?(ze.classList.add("highlight"),nt||this.table.reveal(this.table.indexOf(this.viewModel.input))):(nt&&nt.tunnel.tunnelType!==c.TunnelType.Add&&this.table.setFocus(this.lastFocus),this.focus())}))}renderBody(ze){super.renderBody(ze),this.panelContainer=y.append(ze,y.$(".tree-explorer-viewlet-tree-view")),this.createTable()}shouldShowWelcome(){return this.viewModel.isEmpty()&&!this.isEditing}focus(){super.focus(),this.table.domFocus()}onFocusChanged(ze){ze.indexes.length>0&&ze.elements.length>0&&(this.lastFocus=[...ze.indexes]);const je=ze.elements,Ge=je&&je.length?je[0]:void 0;Ge?(this.tunnelViewSelectionContext.set((0,$.makeAddress)(Ge.remoteHost,Ge.remotePort)),this.tunnelTypeContext.set(Ge.tunnelType),this.tunnelCloseableContext.set(!!Ge.closeable),this.tunnelPrivacyContext.set(Ge.privacy.id),this.tunnelProtocolContext.set((Ge.protocol===A.TunnelProtocol.Https,A.TunnelProtocol.Https)),this.portChangableContextKey.set(!!Ge.localPort)):(this.tunnelTypeContext.reset(),this.tunnelViewSelectionContext.reset(),this.tunnelCloseableContext.reset(),this.tunnelPrivacyContext.reset(),this.tunnelProtocolContext.reset(),this.portChangableContextKey.reset())}hasOpenLinkModifier(ze){const je=this.configurationService.getValue("editor");let Ge=!1;return je.multiCursorModifier==="ctrlCmd"?Ge=ze.altKey:F.isMacintosh?Ge=ze.metaKey:Ge=ze.ctrlKey,Ge}onSelectionChanged(ze){const je=ze.elements;je.length>1?this.tunnelViewMultiSelectionContext.set(je.map(Ge=>(0,$.makeAddress)(Ge.remoteHost,Ge.remotePort))):this.tunnelViewMultiSelectionContext.set(void 0)}onContextMenu(ze,je){if(ze.element!==void 0&&!(ze.element instanceof ne))return;ze.browserEvent.preventDefault(),ze.browserEvent.stopPropagation();const Ge=ze.element;Ge?(this.table.setFocus([this.table.indexOf(Ge)]),this.tunnelTypeContext.set(Ge.tunnelType),this.tunnelCloseableContext.set(!!Ge.closeable),this.tunnelPrivacyContext.set(Ge.privacy.id),this.tunnelProtocolContext.set(Ge.protocol),this.portChangableContextKey.set(!!Ge.localPort)):(this.tunnelTypeContext.set(c.TunnelType.Add),this.tunnelCloseableContext.set(!1),this.tunnelPrivacyContext.set(void 0),this.tunnelProtocolContext.set(void 0),this.portChangableContextKey.set(!1)),this.contextMenuService.showContextMenu({menuId:d.MenuId.TunnelContext,menuActionOptions:{shouldForwardArgs:!0},contextKeyService:this.table.contextKeyService,getAnchor:()=>ze.anchor,getActionViewItem:Ze=>{const tt=this.keybindingService.lookupKeybinding(Ze.id);if(tt)return new M.ActionViewItem(Ze,Ze,{label:!0,keybinding:tt.getLabel()})},onHide:Ze=>{Ze&&this.table.domFocus()},getActionsContext:()=>Ge?.strip(),actionRunner:je})}onMouseDblClick(ze){ze.element||this.commandService.executeCommand(_e.INLINE_ID)}layoutBody(ze,je){this.height=ze,this.width=je,super.layoutBody(ze,je),this.table.layout(ze,je)}};e.TunnelPanel=ye,e.TunnelPanel=ye=ie=fe([O(2,D.IKeybindingService),O(3,T.IContextMenuService),O(4,f.IContextKeyService),O(5,v.IConfigurationService),O(6,m.IInstantiationService),O(7,b.IViewDescriptorService),O(8,S.IOpenerService),O(9,h.IQuickInputService),O(10,a.ICommandService),O(11,d.IMenuService),O(12,E.IThemeService),O(13,c.IRemoteExplorerService),O(14,R.ITelemetryService),O(15,A.ITunnelService),O(16,T.IContextViewService),O(17,K.IHoverService)],ye);class Re{constructor(ze,je){this.id=ye.ID,this.name=ye.TITLE,this.canToggleVisibility=!0,this.hideByDefault=!1,this.group="details@0",this.order=-500,this.canMoveView=!0,this.containerIcon=N.portsViewIcon,this.ctorDescriptor=new k.SyncDescriptor(ye,[ze]),this.remoteAuthority=je.remoteAuthority?je.remoteAuthority.split("+")[0]:void 0}}e.TunnelPanelDescriptor=Re;function Le(st){return st&&st.tunnelType&&st.remoteHost&&st.source}var Pe;(function(st){st.ID="remote.tunnel.label",st.LABEL=t.localize(28,null),st.COMMAND_ID_KEYWORD="label";function ze(){return async(je,Ge)=>{const Ze=je.get(c.IRemoteExplorerService);let tt;if(Le(Ge))tt=Ge;else{const Xe=je.get(f.IContextKeyService).getContextKeyValue(be),nt=Xe?Ze.tunnelModel.forwarded.get(Xe):void 0;if(nt){const ft=je.get(A.ITunnelService);tt=ne.createFromTunnel(Ze,ft,nt)}}if(tt){const Xe=tt;return new Promise(nt=>{const ft=Xe.name?Xe.name:`${Xe.remotePort}`;Ze.setEditable(Xe,c.TunnelEditId.Label,{onFinish:async(Et,It)=>{Et=Et.trim(),Ze.setEditable(Xe,c.TunnelEditId.Label,null);const Nt=It&&Et!==ft;Nt&&await Ze.tunnelModel.name(Xe.remoteHost,Xe.remotePort,Et),nt(Nt?{port:Xe.remotePort,label:Et}:void 0)},validationMessage:()=>null,placeholder:t.localize(29,null),startingValue:ft})})}}}st.handler=ze})(Pe||(Pe={}));const Ae=t.localize(30,null),Me=65536,Oe=t.localize(31,null,Me),De=t.localize(32,null),Ce=t.localize(33,null);var _e;(function(st){st.INLINE_ID="remote.tunnel.forwardInline",st.COMMANDPALETTE_ID="remote.tunnel.forwardCommandPalette",st.LABEL={value:t.localize(34,null),original:"Forward a Port"},st.TREEITEM_LABEL=t.localize(35,null);const ze=t.localize(36,null);function je(Xe,nt,ft,Et){const It=(0,$.parseAddress)(ft);if(It){if(It.port>=Me)return{content:Oe,severity:n.Severity.Error};if(Et&&nt.isPortPrivileged(It.port))return{content:De,severity:n.Severity.Info};if((0,$.mapHasAddressLocalhostOrAllInterfaces)(Xe.tunnelModel.forwarded,It.host,It.port))return{content:Ce,severity:n.Severity.Error}}else return{content:Ae,severity:n.Severity.Error};return null}function Ge(Xe,nt,ft,Et){nt?typeof nt=="string"&&Xe.warn(t.localize(38,null,ft,Et,nt)):Xe.warn(t.localize(37,null,ft,Et))}function Ze(){return async(Xe,nt)=>{const ft=Xe.get(c.IRemoteExplorerService),Et=Xe.get(n.INotificationService),It=Xe.get(A.ITunnelService);ft.setEditable(void 0,c.TunnelEditId.New,{onFinish:async(Nt,Ot)=>{ft.setEditable(void 0,c.TunnelEditId.New,null);let kt;Ot&&(kt=(0,$.parseAddress)(Nt))&&ft.forward({remote:{host:kt.host,port:kt.port},elevateIfNeeded:!0}).then(xt=>Ge(Et,xt,kt.host,kt.port))},validationMessage:Nt=>je(ft,It,Nt,It.canElevate),placeholder:ze})}}st.inlineHandler=Ze;function tt(){return async(Xe,nt)=>{const ft=Xe.get(c.IRemoteExplorerService),Et=Xe.get(n.INotificationService),It=Xe.get(b.IViewsService),Nt=Xe.get(h.IQuickInputService),Ot=Xe.get(A.ITunnelService);await It.openView(ye.ID,!0);const kt=await Nt.input({prompt:ze,validateInput:Mt=>Promise.resolve(je(ft,Ot,Mt,Ot.canElevate))});let xt;kt&&(xt=(0,$.parseAddress)(kt))&&ft.forward({remote:{host:xt.host,port:xt.port},elevateIfNeeded:!0}).then(Mt=>Ge(Et,Mt,xt.host,xt.port))}}st.commandPaletteHandler=tt})(_e||(e.ForwardPortAction=_e={}));function me(st,ze,je){const Ge=st.map(Ze=>{const tt=ne.createFromTunnel(ze,je,Ze);return{label:tt.label,description:tt.processDescription,tunnel:tt}});return Ge.length===0&&Ge.push({label:t.localize(39,null,_e.LABEL.value)}),Ge}var ke;(function(st){st.INLINE_ID="remote.tunnel.closeInline",st.COMMANDPALETTE_ID="remote.tunnel.closeCommandPalette",st.LABEL={value:t.localize(40,null),original:"Stop Forwarding Port"};function ze(){return async(Ge,Ze)=>{const tt=Ge.get(f.IContextKeyService),Xe=Ge.get(c.IRemoteExplorerService);let nt=[];const ft=tt.getContextKeyValue(Ie);if(ft)ft.forEach(Et=>{const It=Xe.tunnelModel.forwarded.get(Et);It&&nt?.push(It)});else if(Le(Ze))nt=[Ze];else{const Et=tt.getContextKeyValue(be),It=Et?Xe.tunnelModel.forwarded.get(Et):void 0;It&&(nt=[It])}if(!(!nt||nt.length===0))return Promise.all(nt.map(Et=>Xe.close({host:Et.remoteHost,port:Et.remotePort},$.TunnelCloseReason.User)))}}st.inlineHandler=ze;function je(){return async Ge=>{const Ze=Ge.get(h.IQuickInputService),tt=Ge.get(c.IRemoteExplorerService),Xe=Ge.get(A.ITunnelService),nt=Ge.get(a.ICommandService),ft=me(Array.from(tt.tunnelModel.forwarded.values()).filter(It=>It.closeable),tt,Xe),Et=await Ze.pick(ft,{placeHolder:t.localize(41,null)});Et&&Et.tunnel?await tt.close({host:Et.tunnel.remoteHost,port:Et.tunnel.remotePort},$.TunnelCloseReason.User):Et&&await nt.executeCommand(_e.COMMANDPALETTE_ID)}}st.commandPaletteHandler=je})(ke||(ke={}));var Ee;(function(st){st.ID="remote.tunnel.open",st.LABEL=t.localize(42,null);function ze(){return async(Ge,Ze)=>{let tt;if(Le(Ze)?tt=(0,$.makeAddress)(Ze.remoteHost,Ze.remotePort):Ze.tunnelRemoteHost&&Ze.tunnelRemotePort&&(tt=(0,$.makeAddress)(Ze.tunnelRemoteHost,Ze.tunnelRemotePort)),tt){const Xe=Ge.get(c.IRemoteExplorerService).tunnelModel,nt=Ge.get(S.IOpenerService);return je(Xe,nt,tt)}}}st.handler=ze;function je(Ge,Ze,tt){const Xe=Ge.forwarded.get(tt)||Ge.detected.get(tt);return Xe?Ze.open(Xe.localUri,{allowContributedOpeners:!1}):Promise.resolve()}st.run=je})(Ee||(e.OpenPortInBrowserAction=Ee={}));var pe;(function(st){st.ID="remote.tunnel.openPreview",st.LABEL=t.localize(43,null);function ze(){return async(Ge,Ze)=>{let tt;if(Le(Ze)?tt=(0,$.makeAddress)(Ze.remoteHost,Ze.remotePort):Ze.tunnelRemoteHost&&Ze.tunnelRemotePort&&(tt=(0,$.makeAddress)(Ze.tunnelRemoteHost,Ze.tunnelRemotePort)),tt){const Xe=Ge.get(c.IRemoteExplorerService).tunnelModel,nt=Ge.get(S.IOpenerService),ft=Ge.get(P.IExternalUriOpenerService);return je(Xe,nt,ft,tt)}}}st.handler=ze;async function je(Ge,Ze,tt,Xe){const nt=Ge.forwarded.get(Xe)||Ge.detected.get(Xe);if(nt){const ft=nt.remoteHost.includes(":")?`[${nt.remoteHost}]`:nt.remoteHost,Et=_.URI.parse(`http://${ft}:${nt.remotePort}`),It=await tt.getOpener(nt.localUri,{sourceUri:Et},new x.CancellationTokenSource().token);return It?It.openExternalUri(nt.localUri,{sourceUri:Et},new x.CancellationTokenSource().token):Ze.open(nt.localUri)}return Promise.resolve()}st.run=je})(pe||(e.OpenPortInPreviewAction=pe={}));var Te;(function(st){st.ID="remote.tunnel.openCommandPalette",st.LABEL=t.localize(44,null);function ze(){return async(je,Ge)=>{const Ze=je.get(c.IRemoteExplorerService),tt=je.get(A.ITunnelService),Xe=Ze.tunnelModel,nt=je.get(h.IQuickInputService),ft=je.get(S.IOpenerService),Et=je.get(a.ICommandService),It=[...Xe.forwarded,...Xe.detected].map(Ot=>{const kt=ne.createFromTunnel(Ze,tt,Ot[1]);return{label:kt.label,description:kt.processDescription,tunnel:kt}});It.length===0?It.push({label:t.localize(45,null)}):It.push({label:t.localize(46,null)});const Nt=await nt.pick(It,{placeHolder:t.localize(47,null)});if(Nt&&Nt.tunnel)return Ee.run(Xe,ft,(0,$.makeAddress)(Nt.tunnel.remoteHost,Nt.tunnel.remotePort));if(Nt)return Et.executeCommand(`${c.TUNNEL_VIEW_ID}.focus`)}}st.handler=ze})(Te||(Te={}));var Ne;(function(st){st.INLINE_ID="remote.tunnel.copyAddressInline",st.COMMANDPALETTE_ID="remote.tunnel.copyAddressCommandPalette",st.INLINE_LABEL=t.localize(48,null),st.COMMANDPALETTE_LABEL=t.localize(49,null);async function ze(Ze,tt,Xe){const nt=Ze.tunnelModel.address(Xe.remoteHost,Xe.remotePort);nt&&await tt.writeText(nt.toString())}function je(){return async(Ze,tt)=>{const Xe=Ze.get(c.IRemoteExplorerService);let nt;if(Le(tt))nt=tt;else{const ft=Ze.get(f.IContextKeyService).getContextKeyValue(be);nt=ft?Xe.tunnelModel.forwarded.get(ft):void 0}if(nt)return ze(Xe,Ze.get(l.IClipboardService),nt)}}st.inlineHandler=je;function Ge(){return async(Ze,tt)=>{const Xe=Ze.get(h.IQuickInputService),nt=Ze.get(c.IRemoteExplorerService),ft=Ze.get(A.ITunnelService),Et=Ze.get(a.ICommandService),It=Ze.get(l.IClipboardService),Nt=Array.from(nt.tunnelModel.forwarded.values()).concat(Array.from(nt.tunnelModel.detected.values())),Ot=await Xe.pick(me(Nt,nt,ft),{placeHolder:t.localize(50,null)});Ot&&Ot.tunnel?await ze(nt,It,Ot.tunnel):Ot&&await Et.executeCommand(_e.COMMANDPALETTE_ID)}}st.commandPaletteHandler=Ge})(Ne||(Ne={}));var xe;(function(st){st.ID="remote.tunnel.changeLocalPort",st.LABEL=t.localize(51,null);function ze(Ge,Ze,tt){if(Ze.match(/^[0-9]+$/)){if(Number(Ze)>=Me)return{content:Oe,severity:n.Severity.Error};if(tt&&Ge.isPortPrivileged(Number(Ze)))return{content:De,severity:n.Severity.Info}}else return{content:Ae,severity:n.Severity.Error};return null}function je(){return async(Ge,Ze)=>{const tt=Ge.get(c.IRemoteExplorerService),Xe=Ge.get(n.INotificationService),nt=Ge.get(A.ITunnelService);let ft;if(Le(Ze))ft=Ze;else{const Et=Ge.get(f.IContextKeyService).getContextKeyValue(be),It=Et?tt.tunnelModel.forwarded.get(Et):void 0;if(It){const Nt=Ge.get(A.ITunnelService);ft=ne.createFromTunnel(tt,Nt,It)}}if(ft){const Et=ft;tt.setEditable(Et,c.TunnelEditId.LocalPort,{onFinish:async(It,Nt)=>{if(tt.setEditable(Et,c.TunnelEditId.LocalPort,null),Nt){await tt.close({host:Et.remoteHost,port:Et.remotePort},$.TunnelCloseReason.Other);const Ot=Number(It),kt=await tt.forward({remote:{host:Et.remoteHost,port:Et.remotePort},local:Ot,name:Et.name,elevateIfNeeded:!0,source:Et.source});kt&&typeof kt!="string"&&kt.tunnelLocalPort!==Ot&&Xe.warn(t.localize(52,null,It,kt.tunnelLocalPort??kt.localAddress))}},validationMessage:It=>ze(nt,It,nt.canElevate),placeholder:t.localize(53,null)})}}}st.handler=je})(xe||(xe={}));var Ve;(function(st){function ze(je){return async(Ge,Ze)=>{if(Le(Ze)){const tt=Ge.get(c.IRemoteExplorerService);return await tt.close({host:Ze.remoteHost,port:Ze.remotePort},$.TunnelCloseReason.Other),tt.forward({remote:{host:Ze.remoteHost,port:Ze.remotePort},local:Ze.localPort,name:Ze.name,elevateIfNeeded:!0,privacy:je,source:Ze.source})}}}st.handler=ze})(Ve||(Ve={}));var Fe;(function(st){st.ID_HTTP="remote.tunnel.setProtocolHttp",st.ID_HTTPS="remote.tunnel.setProtocolHttps",st.LABEL_HTTP=t.localize(54,null),st.LABEL_HTTPS=t.localize(55,null);async function ze(Ze,tt,Xe){if(Le(Ze)){const nt={protocol:tt};return Xe.tunnelModel.configPortsAttributes.addAttributes(Ze.remotePort,nt,4)}}function je(){return async(Ze,tt)=>ze(tt,A.TunnelProtocol.Http,Ze.get(c.IRemoteExplorerService))}st.handlerHttp=je;function Ge(){return async(Ze,tt)=>ze(tt,A.TunnelProtocol.Https,Ze.get(c.IRemoteExplorerService))}st.handlerHttps=Ge})(Fe||(Fe={}));const Be=10,He=ce.isEqualTo(c.TunnelType.Forwarded),et=f.ContextKeyExpr.or(He,ce.isEqualTo(c.TunnelType.Detected)),Je=Se.isEqualTo(void 0);L.KeybindingsRegistry.registerCommandAndKeybindingRule({id:Pe.ID,weight:200+Be,when:f.ContextKeyExpr.and(he,He,Je),primary:60,mac:{primary:3},handler:Pe.handler()}),a.CommandsRegistry.registerCommand(_e.INLINE_ID,_e.inlineHandler()),a.CommandsRegistry.registerCommand(_e.COMMANDPALETTE_ID,_e.commandPaletteHandler()),L.KeybindingsRegistry.registerCommandAndKeybindingRule({id:ke.INLINE_ID,weight:200+Be,when:f.ContextKeyExpr.and(ae,he),primary:20,mac:{primary:2049,secondary:[20]},handler:ke.inlineHandler()}),a.CommandsRegistry.registerCommand(ke.COMMANDPALETTE_ID,ke.commandPaletteHandler()),a.CommandsRegistry.registerCommand(Ee.ID,Ee.handler()),a.CommandsRegistry.registerCommand(pe.ID,pe.handler()),a.CommandsRegistry.registerCommand(Te.ID,Te.handler()),L.KeybindingsRegistry.registerCommandAndKeybindingRule({id:Ne.INLINE_ID,weight:200+Be,when:f.ContextKeyExpr.and(he,et,Je),primary:2081,handler:Ne.inlineHandler()}),a.CommandsRegistry.registerCommand(Ne.COMMANDPALETTE_ID,Ne.commandPaletteHandler()),a.CommandsRegistry.registerCommand(xe.ID,xe.handler()),a.CommandsRegistry.registerCommand(Fe.ID_HTTP,Fe.handlerHttp()),a.CommandsRegistry.registerCommand(Fe.ID_HTTPS,Fe.handlerHttps()),d.MenuRegistry.appendMenuItem(d.MenuId.CommandPalette,{command:{id:ke.COMMANDPALETTE_ID,title:ke.LABEL},when:$.forwardedPortsViewEnabled}),d.MenuRegistry.appendMenuItem(d.MenuId.CommandPalette,{command:{id:_e.COMMANDPALETTE_ID,title:_e.LABEL},when:$.forwardedPortsViewEnabled}),d.MenuRegistry.appendMenuItem(d.MenuId.CommandPalette,{command:{id:Ne.COMMANDPALETTE_ID,title:Ne.COMMANDPALETTE_LABEL},when:$.forwardedPortsViewEnabled}),d.MenuRegistry.appendMenuItem(d.MenuId.CommandPalette,{command:{id:Te.ID,title:Te.LABEL},when:$.forwardedPortsViewEnabled}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelContext,{group:"._open",order:0,command:{id:Ee.ID,title:Ee.LABEL},when:f.ContextKeyExpr.and(et,Je)}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelContext,{group:"._open",order:1,command:{id:pe.ID,title:pe.LABEL},when:f.ContextKeyExpr.and(et,Je)}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelContext,{group:"0_manage",order:1,command:{id:Pe.ID,title:Pe.LABEL,icon:N.labelPortIcon},when:f.ContextKeyExpr.and(He,Je)}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelContext,{group:"2_localaddress",order:0,command:{id:Ne.INLINE_ID,title:Ne.INLINE_LABEL},when:f.ContextKeyExpr.and(et,Je)}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelContext,{group:"2_localaddress",order:1,command:{id:xe.ID,title:xe.LABEL},when:f.ContextKeyExpr.and(He,we,Je)}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelContext,{group:"2_localaddress",order:2,submenu:d.MenuId.TunnelPrivacy,title:t.localize(56,null),when:f.ContextKeyExpr.and(He,de)}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelContext,{group:"2_localaddress",order:3,submenu:d.MenuId.TunnelProtocol,title:t.localize(57,null),when:f.ContextKeyExpr.and(He,Je)}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelContext,{group:"3_forward",order:0,command:{id:ke.INLINE_ID,title:ke.LABEL},when:ae}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelContext,{group:"3_forward",order:1,command:{id:_e.INLINE_ID,title:_e.LABEL}}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelProtocol,{order:0,command:{id:Fe.ID_HTTP,title:Fe.LABEL_HTTP,toggled:ge.isEqualTo(A.TunnelProtocol.Http)}}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelProtocol,{order:1,command:{id:Fe.ID_HTTPS,title:Fe.LABEL_HTTPS,toggled:ge.isEqualTo(A.TunnelProtocol.Https)}}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelPortInline,{group:"0_manage",order:0,command:{id:_e.INLINE_ID,title:_e.TREEITEM_LABEL,icon:N.forwardPortIcon},when:ce.isEqualTo(c.TunnelType.Candidate)}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelPortInline,{group:"0_manage",order:4,command:{id:Pe.ID,title:Pe.LABEL,icon:N.labelPortIcon},when:He}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelPortInline,{group:"0_manage",order:5,command:{id:ke.INLINE_ID,title:ke.LABEL,icon:N.stopForwardIcon},when:ae}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelLocalAddressInline,{order:-1,command:{id:Ne.INLINE_ID,title:Ne.INLINE_LABEL,icon:N.copyAddressIcon},when:et}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelLocalAddressInline,{order:0,command:{id:Ee.ID,title:Ee.LABEL,icon:N.openBrowserIcon},when:et}),d.MenuRegistry.appendMenuItem(d.MenuId.TunnelLocalAddressInline,{order:1,command:{id:pe.ID,title:pe.LABEL,icon:N.openPreviewIcon},when:et}),(0,z.registerColor)("ports.iconRunningProcessForeground",{light:H.STATUS_BAR_REMOTE_ITEM_BACKGROUND,dark:H.STATUS_BAR_REMOTE_ITEM_BACKGROUND,hcDark:H.STATUS_BAR_REMOTE_ITEM_BACKGROUND,hcLight:H.STATUS_BAR_REMOTE_ITEM_BACKGROUND},t.localize(58,null))}),define(Q[4048],Y([1,0,9,11,3273,35,288,100]),function(q,e,t,y,b,D,T,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeRequestService=void 0;let v=class extends b.RequestService{constructor(S,h,a){super(S,h),this.nativeHostService=a}async resolveProxy(S){return this.nativeHostService.resolveProxy(S)}};e.NativeRequestService=v,e.NativeRequestService=v=fe([O(0,t.IConfigurationService),O(1,y.ILoggerService),O(2,f.INativeHostService)],v),(0,D.registerSingleton)(T.IRequestService,v,1)}),define(Q[4049],Y([1,0,195]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IgnoreFile=void 0;class y{constructor(D,T,f){if(this.location=T,this.parent=f,T[T.length-1]==="\\")throw Error("Unexpected path format, do not use trailing backslashes");T[T.length-1]!=="/"&&(T+="/"),this.isPathIgnored=this.parseIgnoreFile(D,this.location,this.parent)}updateContents(D){this.isPathIgnored=this.parseIgnoreFile(D,this.location,this.parent)}isPathIncludedInTraversal(D,T){if(D[0]!=="/"||D[D.length-1]==="/")throw Error("Unexpected path format, expectred to begin with slash and end without. got:"+D);return!this.isPathIgnored(D,T)}isArbitraryPathIgnored(D,T){if(D[0]!=="/"||D[D.length-1]==="/")throw Error("Unexpected path format, expectred to begin with slash and end without. got:"+D);const f=D.split("/").filter(S=>S);let v=!1,m="";for(let S=0;S<f.length;S++){const h=S===f.length-1,a=f[S];if(m=m+"/"+a,!this.isPathIncludedInTraversal(m,h?T:!0)){v=!0;break}}return v}gitignoreLinesToExpression(D,T,f){const v=D.map(S=>this.gitignoreLineToGlob(S,T)),m=Object.create(null);for(const S of v)m[S]=!0;return t.parse(m,{trimForExclusions:f})}parseIgnoreFile(D,T,f){const v=D.split(` `).map(p=>p.trim()).filter(p=>p&&p[0]!=="#"),m=v.filter(p=>!p.endsWith("/")),S=m.filter(p=>!p.includes("!")),h=this.gitignoreLinesToExpression(S,T,!0),a=m.filter(p=>p.includes("!")).map(p=>p.replace(/!/g,"")),r=this.gitignoreLinesToExpression(a,T,!1),i=v.filter(p=>!p.includes("!")),s=this.gitignoreLinesToExpression(i,T,!0),o=v.filter(p=>p.includes("!")).map(p=>p.replace(/!/g,"")),u=this.gitignoreLinesToExpression(o,T,!1);return(p,c)=>p.startsWith(T)?c&&s(p)&&!u(p)||h(p)&&!r(p)?!0:f?f.isPathIgnored(p,c):!1:!1}gitignoreLineToGlob(D,T){const f=D.indexOf("/");return f===-1||f===D.length-1?D="**/"+D:(f===0?T.slice(-1)==="/"&&(D=D.slice(1)):T.slice(-1)!=="/"&&(D="/"+D),D=T+D),D}}e.IgnoreFile=y}),define(Q[4050],Y([1,0,33,1034]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplacePattern=void 0;class b{constructor(T,f,v){this._hasParameters=!1,this._replacePattern=T;let m,S;typeof f=="boolean"?(S=f,this._regExp=v):(m=f,S=!!m.isRegExp,this._regExp=t.createRegExp(m.pattern,!!m.isRegExp,{matchCase:m.isCaseSensitive,wholeWord:m.isWordMatch,multiline:m.isMultiline,global:!1,unicode:!0})),S&&this.parseReplaceString(T),this._regExp.global&&(this._regExp=t.createRegExp(this._regExp.source,!0,{matchCase:!this._regExp.ignoreCase,wholeWord:!1,multiline:this._regExp.multiline,global:!1})),this._caseOpsRegExp=new RegExp(/([\s\S]*?)((?:\\[uUlL])+?|)(\$[0-9]+)([\s\S]*?)/g)}get hasParameters(){return this._hasParameters}get pattern(){return this._replacePattern}get regExp(){return this._regExp}getReplaceString(T,f){this._regExp.lastIndex=0;const v=this._regExp.exec(T);if(v){if(this.hasParameters){const m=this.replaceWithCaseOperations(T,this._regExp,this.buildReplaceString(v,f));return v[0]===T?m:m.substr(v.index,v[0].length-(T.length-m.length))}return this.buildReplaceString(v,f)}return null}replaceWithCaseOperations(T,f,v){if(!/\\[uUlL]/.test(v))return T.replace(f,v);const m=f.exec(T);if(m===null)return T.replace(f,v);let S,h="",a=0,r="";for(;(S=this._caseOpsRegExp.exec(v))!==null;){a=S.index;const i=S[0];r=i;let s=S[2];const o=S[3];if(!s){h+=i;continue}const u=m[parseInt(o.slice(1))];if(!u){h+=i;continue}const d=u.length;h+=S[1],s=s.replace(/\\/g,"");let p=0;for(;p<s.length;p++)switch(s[p]){case"U":h+=u.slice(p).toUpperCase(),p=d;break;case"u":h+=u[p].toUpperCase();break;case"L":h+=u.slice(p).toLowerCase(),p=d;break;case"l":h+=u[p].toLowerCase();break}p<d&&(h+=u.slice(p)),h+=S[4]}return h+=v.slice(a+r.length),T.replace(f,h)}buildReplaceString(T,f){return f?(0,y.buildReplaceStringWithCasePreserved)(T,this._replacePattern):this._replacePattern}parseReplaceString(T){if(!T||T.length===0)return;let f=0,v="";for(let m=0,S=T.length;m<S;m++){const h=T.charCodeAt(m);if(h===92){if(m++,m>=S)break;const a=T.charCodeAt(m);let r=null;switch(a){case 92:r="\\";break;case 110:r=` `;break;case 116:r=" ";break}r&&(v+=T.substring(f,m-1)+r,f=m+1)}if(h===36){if(m++,m>=S)break;const a=T.charCodeAt(m);let r=null;switch(a){case 48:r="$&",this._hasParameters=!0;break;case 96:case 39:this._hasParameters=!0;break;default:{if(!this.between(a,49,57))break;if(m===T.length-1){this._hasParameters=!0;break}let i=T.charCodeAt(++m);if(!this.between(i,48,57)){this._hasParameters=!0,--m;break}if(m===T.length-1){this._hasParameters=!0;break}if(i=T.charCodeAt(++m),!this.between(i,48,57)){this._hasParameters=!0,--m;break}break}}r&&(v+=T.substring(f,m-1)+r,f=m+1)}}f!==0&&(this._replacePattern=v+T.substring(f))}between(T,f,v){return f<=T&&T<=v}}e.ReplacePattern=b}),define(Q[1394],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextSearchCompleteMessageType=e.Range=e.Position=void 0;class t{constructor(T,f){this.line=T,this.character=f}isBefore(T){return!1}isBeforeOrEqual(T){return!1}isAfter(T){return!1}isAfterOrEqual(T){return!1}isEqual(T){return!1}compareTo(T){return 0}translate(T,f){return new t(0,0)}with(T){return new t(0,0)}}e.Position=t;class y{constructor(T,f,v,m){this.isEmpty=!1,this.isSingleLine=!1,this.start=new t(T,f),this.end=new t(v,m)}contains(T){return!1}isEqual(T){return!1}intersection(T){}union(T){return new y(0,0,0,0)}with(T){return new y(0,0,0,0)}}e.Range=y;var b;(function(D){D[D.Information=1]="Information",D[D.Warning=2]="Warning"})(b||(e.TextSearchCompleteMessageType=b={}))}),define(Q[1395],Y([1,0,2908,7,436,63,593,1394,22,276,10]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderSearchMessage=void 0;const h=(a,r,i,s,o,u,d)=>{const p=y.$("div.providerMessage"),c=(0,b.parseLinkedText)(a.text);y.append(p,y.$("."+T.SeverityIcon.className(a.type===f.TextSearchCompleteMessageType.Information?D.default.Info:D.default.Warning).split(" ").join(".")));for(const l of c.nodes)if(typeof l=="string")y.append(p,document.createTextNode(l));else{const n=r.createInstance(m.Link,p,l,{opener:async g=>{if(!a.trusted)return;const w=S.URI.parse(g,!0);w.scheme===v.Schemas.command&&a.trusted?(await o.executeCommand(w.path))?.triggerSearch&&d():w.scheme===v.Schemas.https?s.open(w):w.scheme===v.Schemas.command&&!a.trusted?i.error(t.localize(0,null,g)):i.error(t.localize(1,null,g))}});u.add(n)}return p};e.renderSearchMessage=h}),define(Q[225],Y([1,0,20,195,42,206,33,5,55,15,1394,14]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasSiblingFn=e.hasSiblingPromiseFn=e.QueryGlobTester=e.resolvePatternsForProvider=e.SerializableFileMatch=e.isFilePatternMatch=e.isSerializedFileMatch=e.isSerializedSearchSuccess=e.isSerializedSearchComplete=e.serializeSearchError=e.deserializeSearchError=e.SearchError=e.SearchErrorCode=e.pathIncludedInQuery=e.getExcludes=e.SearchSortOrder=e.ViewMode=e.OneLineRange=e.SearchRange=e.TextSearchMatch=e.FileMatch=e.SearchCompletionExitCode=e.isProgressMessage=e.isFileMatch=e.resultIsMatch=e.QueryType=e.SearchProviderType=e.ISearchService=e.SEARCH_EXCLUDE_CONFIG=e.VIEW_ID=e.PANEL_ID=e.VIEWLET_ID=e.TextSearchCompleteMessageType=void 0,Object.defineProperty(e,"TextSearchCompleteMessageType",{enumerable:!0,get:function(){return S.TextSearchCompleteMessageType}}),e.VIEWLET_ID="workbench.view.search",e.PANEL_ID="workbench.panel.search",e.VIEW_ID="workbench.view.search",e.SEARCH_EXCLUDE_CONFIG="search.exclude";const a="\u27EA ",r=" characters skipped \u27EB",i=(a.length+r.length+5)*2;e.ISearchService=(0,f.createDecorator)("searchService");var s;(function(G){G[G.file=0]="file",G[G.text=1]="text"})(s||(e.SearchProviderType=s={}));var o;(function(G){G[G.File=1]="File",G[G.Text=2]="Text"})(o||(e.QueryType=o={}));function u(G){return!!G.preview}e.resultIsMatch=u;function d(G){return!!G.resource}e.isFileMatch=d;function p(G){return!!G.message}e.isProgressMessage=p;var c;(function(G){G[G.Normal=0]="Normal",G[G.NewSearchStarted=1]="NewSearchStarted"})(c||(e.SearchCompletionExitCode=c={}));class l{constructor($){this.resource=$,this.results=[]}}e.FileMatch=l;class n{constructor($,ie,J,j){this.ranges=ie,this.webviewIndex=j;const ee=Array.isArray(ie)?ie:[ie];if(J&&J.matchLines===1&&g(ee)){$=(0,T.getNLines)($,J.matchLines);let X="",te=0,Z=0;const se=Math.floor(J.charsPerLine/5),re=[];for(const oe of ee){const le=Math.max(oe.startColumn-se,0),ne=oe.startColumn+J.charsPerLine;if(le>Z+se+i){const ce=a+(le-Z)+r;X+=ce+$.slice(le,ne),te+=le-(Z+ce.length)}else X+=$.slice(Z,ne);re.push(new E(0,oe.startColumn-te,oe.endColumn-te)),Z=ne}this.preview={text:X,matches:Array.isArray(this.ranges)?re:re[0]}}else{const X=Array.isArray(ie)?ie[0].startLineNumber:ie.startLineNumber;this.preview={text:$,matches:(0,t.mapArrayOrNot)(ie,te=>new w(te.startLineNumber-X,te.startColumn,te.endLineNumber-X,te.endColumn))}}}}e.TextSearchMatch=n;function g(G){const $=G[0].startLineNumber;for(const ie of G)if(ie.startLineNumber!==$||ie.endLineNumber!==$)return!1;return!0}class w{constructor($,ie,J,j){this.startLineNumber=$,this.startColumn=ie,this.endLineNumber=J,this.endColumn=j}}e.SearchRange=w;class E extends w{constructor($,ie,J){super($,ie,$,J)}}e.OneLineRange=E;var C;(function(G){G.List="list",G.Tree="tree"})(C||(e.ViewMode=C={}));var I;(function(G){G.Default="default",G.FileNames="fileNames",G.Type="type",G.Modified="modified",G.CountDescending="countDescending",G.CountAscending="countAscending"})(I||(e.SearchSortOrder=I={}));function _(G,$=!0){const ie=G&&G.files&&G.files.exclude,J=$&&G&&G.search&&G.search.exclude;if(!ie&&!J)return;if(!ie||!J)return ie||J;let j=Object.create(null);return j=b.mixin(j,b.deepClone(ie)),j=b.mixin(j,b.deepClone(J),!0),j}e.getExcludes=_;function A(G,$){return G.excludePattern&&y.match(G.excludePattern,$)?!1:G.includePattern||G.usingSearchPaths?G.includePattern&&y.match(G.includePattern,$)?!0:G.usingSearchPaths?!!G.folderQueries&&G.folderQueries.some(ie=>{const J=ie.folder.fsPath;if(D.isEqualOrParent($,J)){const j=v.relative(J,$);return!ie.includePattern||!!y.match(ie.includePattern,j)}else return!1}):!1:!0}e.pathIncludedInQuery=A;var k;(function(G){G[G.unknownEncoding=1]="unknownEncoding",G[G.regexParseError=2]="regexParseError",G[G.globParseError=3]="globParseError",G[G.invalidLiteral=4]="invalidLiteral",G[G.rgProcessError=5]="rgProcessError",G[G.other=6]="other",G[G.canceled=7]="canceled"})(k||(e.SearchErrorCode=k={}));class L extends Error{constructor($,ie){super($),this.code=ie}}e.SearchError=L;function R(G){const $=G.message;if((0,m.isCancellationError)(G))return new L($,k.canceled);try{const ie=JSON.parse($);return new L(ie.message,ie.code)}catch{return new L($,k.other)}}e.deserializeSearchError=R;function M(G){const $={message:G.message,code:G.code};return new Error(JSON.stringify($))}e.serializeSearchError=M;function N(G){return G.type==="error"?!0:G.type==="success"}e.isSerializedSearchComplete=N;function P(G){return G.type==="success"}e.isSerializedSearchSuccess=P;function x(G){return!!G.path}e.isSerializedFileMatch=x;function F(G,$){const ie=G.searchPath?G.searchPath:G.relativePath;return(0,T.fuzzyContains)(ie,$)}e.isFilePatternMatch=F;class V{constructor($){this.path=$,this.results=[]}addMatch($){this.results.push($)}serialize(){return{path:this.path,results:this.results,numMatches:this.results.length}}}e.SerializableFileMatch=V;function W(G,$){const ie={...G||{},...$||{}};return Object.keys(ie).filter(J=>{const j=ie[J];return typeof j=="boolean"&&j})}e.resolvePatternsForProvider=W;class z{constructor($,ie){this._parsedIncludeExpression=null,this._excludeExpression={...$.excludePattern||{},...ie.excludePattern||{}},this._parsedExcludeExpression=y.parse(this._excludeExpression);let J=$.includePattern;ie.includePattern&&(J?J={...J,...ie.includePattern}:J=ie.includePattern),J&&(this._parsedIncludeExpression=y.parse(J))}matchesExcludesSync($,ie,J){return!!(this._parsedExcludeExpression&&this._parsedExcludeExpression($,ie,J))}includedInQuerySync($,ie,J){return!(this._parsedExcludeExpression&&this._parsedExcludeExpression($,ie,J)||this._parsedIncludeExpression&&!this._parsedIncludeExpression($,ie,J))}includedInQuery($,ie,J){const j=this._parsedExcludeExpression($,ie,J),ee=()=>this._parsedIncludeExpression?!!this._parsedIncludeExpression($,ie,J):!0;return(0,h.isThenable)(j)?j.then(X=>X?!1:ee()):ee()}hasSiblingExcludeClauses(){return B(this._excludeExpression)}}e.QueryGlobTester=z;function B(G){for(const $ in G)if(typeof G[$]!="boolean")return!0;return!1}function K(G){if(!G)return;let $;return ie=>($||($=(G()||Promise.resolve([])).then(J=>J?U(J):{})),$.then(J=>!!J[ie]))}e.hasSiblingPromiseFn=K;function H(G){if(!G)return;let $;return ie=>{if(!$){const J=G();$=J?U(J):{}}return!!$[ie]}}e.hasSiblingFn=H;function U(G){const $={};for(const ie of G)$[ie]=!0;return $}}),define(Q[4051],Y([1,0,31,4,10,9,30,60,225,53]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadSearch=void 0;let S=class{constructor(i,s,o,u){this._searchService=s,this._telemetryService=o,this._searchProvider=new Map,this._proxy=i.getProxy(m.ExtHostContext.ExtHostSearch),this._proxy.$enableExtensionHostSearch()}dispose(){this._searchProvider.forEach(i=>i.dispose()),this._searchProvider.clear()}$registerTextSearchProvider(i,s){this._searchProvider.set(i,new a(this._searchService,1,s,i,this._proxy))}$registerFileSearchProvider(i,s){this._searchProvider.set(i,new a(this._searchService,0,s,i,this._proxy))}$unregisterProvider(i){(0,y.dispose)(this._searchProvider.get(i)),this._searchProvider.delete(i)}$handleFileMatch(i,s,o){const u=this._searchProvider.get(i);if(!u)throw new Error("Got result for unknown provider");u.handleFindMatch(s,o)}$handleTextMatch(i,s,o){const u=this._searchProvider.get(i);if(!u)throw new Error("Got result for unknown provider");u.handleFindMatch(s,o)}$handleTelemetry(i,s){this._telemetryService.publicLog(i,s)}};e.MainThreadSearch=S,e.MainThreadSearch=S=fe([(0,f.extHostNamedCustomer)(m.MainContext.MainThreadSearch),O(1,v.ISearchService),O(2,T.ITelemetryService),O(3,D.IConfigurationService)],S);class h{static{this._idPool=0}constructor(i,s=++h._idPool,o=new Map){this.progress=i,this.id=s,this.matches=o}addMatch(i){const s=this.matches.get(i.resource.toString());s?s.results&&i.results&&s.results.push(...i.results):this.matches.set(i.resource.toString(),i),this.progress?.(i)}}class a{constructor(i,s,o,u,d){this._scheme=o,this._handle=u,this._proxy=d,this._registrations=new y.DisposableStore,this._searches=new Map,this._registrations.add(i.registerSearchResultProvider(this._scheme,s,this))}dispose(){this._registrations.dispose()}fileSearch(i,s=t.CancellationToken.None){return this.doSearch(i,void 0,s)}textSearch(i,s,o=t.CancellationToken.None){return this.doSearch(i,s,o)}doSearch(i,s,o=t.CancellationToken.None){if(!i.folderQueries.length)throw new Error("Empty folderQueries");const u=new h(s);this._searches.set(u.id,u);const d=i.type===1?this._proxy.$provideFileSearchResults(this._handle,u.id,i,o):this._proxy.$provideTextSearchResults(this._handle,u.id,i,o);return Promise.resolve(d).then(p=>(this._searches.delete(u.id),{results:Array.from(u.matches.values()),stats:p.stats,limitHit:p.limitHit,messages:p.messages}),p=>(this._searches.delete(u.id),Promise.reject(p)))}clearCache(i){return Promise.resolve(this._proxy.$clearCache(i))}handleFindMatch(i,s){const o=this._searches.get(i);o&&s.forEach(u=>{u.results?o.addMatch({resource:b.URI.revive(u.resource),results:u.results}):o.addMatch({resource:b.URI.revive(u)})})}}}),define(Q[1396],Y([1,0,225,27,841,440,4]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellSearchModel=e.rawCellPrefix=e.webviewMatchesToTextSearchMatches=e.genericCellMatchesToTextSearchMatches=e.contentMatchesToTextSearchMatches=e.isIFileMatchWithCells=void 0;function f(a){return"cellResults"in a}e.isIFileMatchWithCells=f;function v(a,r){return m(a,r instanceof h?r.inputTextBuffer:r.textBuffer,r)}e.contentMatchesToTextSearchMatches=v;function m(a,r,i){let s=-1;const o=[];let u=[];return a.forEach(p=>{p.range.startLineNumber!==s&&u.length>0&&(o.push([...u]),u=[]),u.push(p),s=p.range.endLineNumber}),u.length>0&&o.push([...u]),o.map(p=>{const c=[],l=p[0].range.startLineNumber,n=p[p.length-1].range.endLineNumber;for(let g=l;g<=n;g++)c.push(r.getLineContent(g));return new t.TextSearchMatch(c.join(` `)+` `,p.map(g=>new y.Range(g.range.startLineNumber-1,g.range.startColumn-1,g.range.endLineNumber-1,g.range.endColumn-1)))})}e.genericCellMatchesToTextSearchMatches=m;function S(a){return a.map(r=>r.searchPreviewInfo?new t.TextSearchMatch(r.searchPreviewInfo.line,new y.Range(0,r.searchPreviewInfo.range.start,0,r.searchPreviewInfo.range.end),void 0,r.index):void 0).filter(r=>!!r)}e.webviewMatchesToTextSearchMatches=S,e.rawCellPrefix="rawCell#";class h extends T.Disposable{constructor(r,i,s,o,u){super(),this._source=r,this._inputTextBuffer=i,this._outputs=s,this._uri=o,this._cellIndex=u,this._outputTextBuffers=void 0}get id(){return`${e.rawCellPrefix}${this._cellIndex}`}get uri(){return this._uri}_getFullModelRange(r){const i=r.getLineCount();return new y.Range(1,1,i,this._getLineMaxColumn(r,i))}_getLineMaxColumn(r,i){if(i<1||i>r.getLineCount())throw new Error("Illegal value for lineNumber");return r.getLineLength(i)+1}get inputTextBuffer(){if(!this._inputTextBuffer){const r=new b.PieceTreeTextBufferBuilder;r.acceptChunk(this._source);const i=r.finish(!0),{textBuffer:s,disposable:o}=i.create(1);this._inputTextBuffer=s,this._register(o)}return this._inputTextBuffer}get outputTextBuffers(){return this._outputTextBuffers||(this._outputTextBuffers=this._outputs.map(r=>{const i=new b.PieceTreeTextBufferBuilder;i.acceptChunk(r.data.toString());const s=i.finish(!0),{textBuffer:o,disposable:u}=s.create(1);return this._register(u),o})),this._outputTextBuffers}findInInputs(r){const s=new D.SearchParams(r,!1,!1,null).parseSearchRequest();if(!s)return[];const o=this._getFullModelRange(this.inputTextBuffer);return this.inputTextBuffer.findMatchesLineByLine(o,s,!0,5e3)}findInOutputs(r){const s=new D.SearchParams(r,!1,!1,null).parseSearchRequest();return s?this.outputTextBuffers.map(o=>{const u=o.findMatchesLineByLine(this._getFullModelRange(o),s,!0,5e3);if(u.length!==0)return{textBuffer:o,matches:u}}).filter(o=>!!o):[]}}e.CellSearchModel=h}),define(Q[4052],Y([1,0,62,31,69,9,25,5,11,64,292,612,148,1396,159,225,20,17]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookSearchService=void 0;let d=class{constructor(l,n,g,w){this.uriIdentityService=l,this.fileService=n,this.notebookService=g,this.editorResolverService=w,this._entries=new b.ResourceMap(E=>this.uriIdentityService.extUri.getComparisonKey(E))}async getSerializer(l){const g=this.editorResolverService.getEditors(l).reduce((E,C)=>(0,i.priorityToRank)(E.priority)>(0,i.priorityToRank)(C.priority)?E:C),w=await this.notebookService.withNotebookDataProvider(g.id);if(w instanceof a.SimpleNotebookProviderInfo)return w.serializer}async getNotebookData(l){const n=(await this.fileService.stat(l)).mtime,g=this._entries.get(l);if(g&&g.mTime===n)return g.notebookData;{let w={metadata:{},cells:[]};const E=await this.fileService.readFileStream(l),C=await(0,t.streamToBuffer)(E.value),I=await this.getSerializer(l);if(!I)throw new Error("serializer not initialized");return w=await I.dataToNotebook(C),this._entries.set(l,{notebookData:w,mTime:n}),w}}};d=fe([O(0,m.IUriIdentityService),O(1,T.IFileService),O(2,a.INotebookService),O(3,i.IEditorResolverService)],d);let p=class{constructor(l,n,g,w,E,C,I){this.instantiationService=l,this.uriIdentityService=n,this.notebookEditorService=g,this.logService=w,this.notebookService=E,this.searchService=C,this.configurationService=I,this._notebookDataCache=this.instantiationService.createInstance(d)}async runFileQueries(l,n,g){const w=l.map(I=>{const _={type:1,filePattern:I,folderQueries:g.folderQueries,maxResults:g.maxResults};return this.searchService.fileSearch(_,n)}),E=(await Promise.all(w)).map(I=>I.results.map(_=>_.resource)).flat(),C=new b.ResourceSet(E,I=>this.uriIdentityService.extUri.getComparisonKey(I));return Array.from(C.keys())}notebookSearch(l,n,g,w){if(l.type!==2)return{openFilesToScan:new b.ResourceSet,completeData:Promise.resolve({messages:[],limitHit:!1,results:[]}),allScannedFiles:Promise.resolve(new b.ResourceSet)};const E=this.getLocalNotebookWidgets(),C=E.map(A=>A.viewModel.uri),_=(()=>{const A=Date.now(),k=this.getLocalNotebookResults(l,n??y.CancellationToken.None,E,g),L=Date.now(),R=this.configurationService.getValue("search").experimental?.closedNotebookRichContentResults??!1;let M=Promise.resolve(void 0);R&&(M=this.getClosedNotebookResults(l,new b.ResourceSet(C,P=>this.uriIdentityService.extUri.getComparisonKey(P)),n??y.CancellationToken.None));const N=Promise.all([k,M]);return{completeData:N.then(P=>{const x=P.filter(W=>!!W),F=x.map(W=>W.results),V=o.coalesce(F.flatMap(W=>Array.from(W.values())));return w&&V.forEach(w),this.logService.trace(`local notebook search time | ${L-A}ms`),{messages:[],limitHit:x.reduce((W,z)=>W||z.limitHit,!1),results:V}}),allScannedFiles:N.then(P=>{const F=P.filter(V=>!!V).map(V=>V.results);return new b.ResourceSet(F.flatMap(V=>Array.from(V.keys())),V=>this.uriIdentityService.extUri.getComparisonKey(V))})}})();return{openFilesToScan:new b.ResourceSet(C),completeData:_.completeData,allScannedFiles:_.allScannedFiles}}async getClosedNotebookResults(l,n,g){const E=this.notebookService.getContributedNotebookTypes().flatMap(M=>M.selectors.map(N=>(N.include||N).toString())),C=new b.ResourceMap(M=>this.uriIdentityService.extUri.getComparisonKey(M)),I=Date.now(),_=await this.runFileQueries(E,g,l),A=new b.ResourceMap,k=this.notebookService.getNotebookTextModels();for(const M of k)A.set(M.uri,M);const L=_.map(async M=>{const N=[];if(!n.has(M))try{if(g.isCancellationRequested)return;const x=(A.get(M)??await this._notebookDataCache.getNotebookData(M)).cells;if(g.isCancellationRequested)return;x.forEach((V,W)=>{const z=l.contentPattern.pattern,B=V instanceof h.NotebookCellTextModel?new r.CellSearchModel("",V.textBuffer,V.outputs.flatMap(G=>G.outputs),M,W):new r.CellSearchModel(V.source,void 0,V.outputs.flatMap(G=>G.outputs),M,W),K=B.findInInputs(z),H=B.findInOutputs(z),U=H.flatMap(G=>(0,r.genericCellMatchesToTextSearchMatches)(G.matches,G.textBuffer,B)).map((G,$)=>(G.webviewIndex=$,G));if(K.length>0||H.length>0){const G={cell:B,index:W,contentResults:(0,r.contentMatchesToTextSearchMatches)(K,B),webviewResults:U};N.push(G)}});const F=N.length>0?{resource:M,cellResults:N}:null;C.set(M,F);return}catch(P){this.logService.info("error: "+P);return}});await Promise.all(L);const R=Date.now();return this.logService.trace(`query: ${l.contentPattern.pattern}`),this.logService.trace(`closed notebook search time | ${R-I}ms`),{results:C,limitHit:!1}}async getLocalNotebookResults(l,n,g,w){const E=new b.ResourceMap(I=>this.uriIdentityService.extUri.getComparisonKey(I));let C=!1;for(const I of g){if(!I.viewModel)continue;const _=(0,u.isNumber)(l.maxResults)?l.maxResults+1:Number.MAX_SAFE_INTEGER;let A=await I.find(l.contentPattern.pattern,{regex:l.contentPattern.isRegExp,wholeWord:l.contentPattern.isWordMatch,caseSensitive:l.contentPattern.isCaseSensitive,includeMarkupInput:l.contentPattern.notebookInfo?.isInNotebookMarkdownInput??!0,includeMarkupPreview:l.contentPattern.notebookInfo?.isInNotebookMarkdownPreview??!0,includeCodeInput:l.contentPattern.notebookInfo?.isInNotebookCellInput??!0,includeOutput:l.contentPattern.notebookInfo?.isInNotebookCellOutput??!0},n,!1,!0,w);if(A.length){_&&A.length>=_&&(C=!0,A=A.slice(0,_-1));const k=A.map(R=>{const M=(0,r.contentMatchesToTextSearchMatches)(R.contentMatches,R.cell),N=(0,r.webviewMatchesToTextSearchMatches)(R.webviewMatches);return{cell:R.cell,index:R.index,contentResults:M,webviewResults:N}}),L={resource:I.viewModel.uri,cellResults:k};E.set(I.viewModel.uri,L)}else E.set(I.viewModel.uri,null)}return{results:E,limitHit:C}}getLocalNotebookWidgets(){return this.notebookEditorService.retrieveAllExistingWidgets().map(n=>n.value).filter(n=>!!n&&!!n.viewModel)}};e.NotebookSearchService=p,e.NotebookSearchService=p=fe([O(0,f.IInstantiationService),O(1,m.IUriIdentityService),O(2,S.INotebookEditorService),O(3,v.ILogService),O(4,a.INotebookService),O(5,s.ISearchService),O(6,D.IConfigurationService)],p)}),define(Q[4053],Y([1,0,3081,10,47,21,254,25,39,4,24,6,9,70,225,5,92,8,20,35,7,265,22,15,14,722,131,64,89,11]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A){"use strict";var k,L;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorNavigationStack=e.HistoryService=void 0;let R=class extends m.Disposable{static{k=this}static{this.MOUSE_NAVIGATION_SETTING="workbench.editor.mouseBackForwardToNavigate"}static{this.NAVIGATION_SCOPE_SETTING="workbench.editor.navigationScope"}constructor(W,z,B,K,H,U,G,$,ie,J){super(),this.editorService=W,this.editorGroupService=z,this.contextService=B,this.storageService=K,this.configurationService=H,this.fileService=U,this.workspacesService=G,this.instantiationService=$,this.layoutService=ie,this.contextKeyService=J,this.activeEditorListeners=this._register(new m.DisposableStore),this.lastActiveEditor=void 0,this.editorHelper=this.instantiationService.createInstance(F),this.canNavigateBackContextKey=new u.RawContextKey("canNavigateBack",!1,(0,t.localize)(0,null)).bindTo(this.contextKeyService),this.canNavigateForwardContextKey=new u.RawContextKey("canNavigateForward",!1,(0,t.localize)(1,null)).bindTo(this.contextKeyService),this.canNavigateBackInNavigationsContextKey=new u.RawContextKey("canNavigateBackInNavigationLocations",!1,(0,t.localize)(2,null)).bindTo(this.contextKeyService),this.canNavigateForwardInNavigationsContextKey=new u.RawContextKey("canNavigateForwardInNavigationLocations",!1,(0,t.localize)(3,null)).bindTo(this.contextKeyService),this.canNavigateToLastNavigationLocationContextKey=new u.RawContextKey("canNavigateToLastNavigationLocation",!1,(0,t.localize)(4,null)).bindTo(this.contextKeyService),this.canNavigateBackInEditsContextKey=new u.RawContextKey("canNavigateBackInEditLocations",!1,(0,t.localize)(5,null)).bindTo(this.contextKeyService),this.canNavigateForwardInEditsContextKey=new u.RawContextKey("canNavigateForwardInEditLocations",!1,(0,t.localize)(6,null)).bindTo(this.contextKeyService),this.canNavigateToLastEditLocationContextKey=new u.RawContextKey("canNavigateToLastEditLocation",!1,(0,t.localize)(7,null)).bindTo(this.contextKeyService),this.canReopenClosedEditorContextKey=new u.RawContextKey("canReopenClosedEditor",!1,(0,t.localize)(8,null)).bindTo(this.contextKeyService),this._onDidChangeEditorNavigationStack=this._register(new h.Emitter),this.onDidChangeEditorNavigationStack=this._onDidChangeEditorNavigationStack.event,this.defaultScopedEditorNavigationStack=void 0,this.editorGroupScopedNavigationStacks=new Map,this.editorScopedNavigationStacks=new Map,this.editorNavigationScope=0,this.recentlyUsedEditorsStack=void 0,this.recentlyUsedEditorsStackIndex=0,this.recentlyUsedEditorsInGroupStack=void 0,this.recentlyUsedEditorsInGroupStackIndex=0,this.navigatingInRecentlyUsedEditorsStack=!1,this.navigatingInRecentlyUsedEditorsInGroupStack=!1,this.recentlyClosedEditors=[],this.ignoreEditorCloseEvent=!1,this.history=void 0,this.editorHistoryListeners=new Map,this.resourceExcludeMatcher=this._register(new w.IdleValue(()=>{const j=this._register(this.instantiationService.createInstance(E.ResourceGlobMatcher,ee=>(0,i.getExcludes)(ee?this.configurationService.getValue({resource:ee}):this.configurationService.getValue())||Object.create(null),ee=>ee.affectsConfiguration(f.FILES_EXCLUDE_CONFIG)||ee.affectsConfiguration(i.SEARCH_EXCLUDE_CONFIG)));return this._register(j.onExpressionChange(()=>this.removeExcludedFromHistory())),j})),this.registerListeners(),this.editorService.activeEditorPane&&this.onDidActiveEditorChange()}registerListeners(){this.registerMouseNavigationListener(),this._register(this.editorService.onDidActiveEditorChange(()=>this.onDidActiveEditorChange())),this._register(this.editorService.onDidOpenEditorFail(W=>this.remove(W.editor))),this._register(this.editorService.onDidCloseEditor(W=>this.onDidCloseEditor(W))),this._register(this.editorService.onDidMostRecentlyActiveEditorsChange(()=>this.handleEditorEventInRecentEditorsStack())),this._register(this.editorGroupService.onDidRemoveGroup(W=>this.onDidRemoveGroup(W))),this._register(this.fileService.onDidFilesChange(W=>this.onDidFilesChange(W))),this._register(this.fileService.onDidRunOperation(W=>this.onDidFilesChange(W))),this._register(this.storageService.onWillSaveState(()=>this.saveState())),this.registerEditorNavigationScopeChangeListener(),this._register(this.onDidChangeEditorNavigationStack(()=>this.updateContextKeys())),this._register(this.editorGroupService.onDidChangeActiveGroup(()=>this.updateContextKeys()))}onDidCloseEditor(W){this.handleEditorCloseEventInHistory(W),this.handleEditorCloseEventInReopen(W)}registerMouseNavigationListener(){const W=this._register(new m.DisposableStore),z=()=>{W.clear(),this.configurationService.getValue(k.MOUSE_NAVIGATION_SETTING)&&(W.add((0,c.addDisposableListener)(this.layoutService.container,c.EventType.MOUSE_DOWN,B=>this.onMouseDownOrUp(B,!0))),W.add((0,c.addDisposableListener)(this.layoutService.container,c.EventType.MOUSE_UP,B=>this.onMouseDownOrUp(B,!1))))};this._register(this.configurationService.onDidChangeConfiguration(B=>{B.affectsConfiguration(k.MOUSE_NAVIGATION_SETTING)&&z()})),z()}onMouseDownOrUp(W,z){switch(W.button){case 3:c.EventHelper.stop(W),z&&this.goBack();break;case 4:c.EventHelper.stop(W),z&&this.goForward();break}}onDidRemoveGroup(W){this.handleEditorGroupRemoveInNavigationStacks(W)}onDidActiveEditorChange(){const W=this.editorGroupService.activeGroup,z=W.activeEditorPane;this.lastActiveEditor&&this.editorHelper.matchesEditorIdentifier(this.lastActiveEditor,z)||(this.lastActiveEditor=z?.input&&z.group?{editor:z.input,groupId:z.group.id}:void 0,this.activeEditorListeners.clear(),this.handleActiveEditorChange(W,z),(0,b.isEditorPaneWithSelection)(z)&&this.activeEditorListeners.add(z.onDidChangeSelection(B=>this.handleActiveEditorSelectionChangeEvent(W,z,B))),this.updateContextKeys())}onDidFilesChange(W){W instanceof f.FileChangesEvent?W.gotDeleted()&&this.remove(W):W.isOperation(1)?this.remove(W):W.isOperation(2)&&W.target.isFile&&this.move(W)}handleActiveEditorChange(W,z){this.handleActiveEditorChangeInHistory(z),this.handleActiveEditorChangeInNavigationStacks(W,z)}handleActiveEditorSelectionChangeEvent(W,z,B){this.handleActiveEditorSelectionChangeInNavigationStacks(W,z,B)}move(W){this.moveInHistory(W),this.moveInEditorNavigationStacks(W)}remove(W){this.removeFromHistory(W),this.removeFromEditorNavigationStacks(W),this.removeFromRecentlyClosedEditors(W),this.removeFromRecentlyOpened(W)}removeFromRecentlyOpened(W){let z;(0,b.isEditorInput)(W)?z=b.EditorResourceAccessor.getOriginalUri(W):W instanceof f.FileChangesEvent||(z=W.resource),z&&this.workspacesService.removeRecentlyOpened([z])}clear(){this.clearRecentlyOpened(),this.clearEditorNavigationStacks(),this.recentlyClosedEditors=[],this.updateContextKeys()}updateContextKeys(){this.contextKeyService.bufferChangeEvents(()=>{const W=this.getStack();this.canNavigateBackContextKey.set(W.canGoBack(0)),this.canNavigateForwardContextKey.set(W.canGoForward(0)),this.canNavigateBackInNavigationsContextKey.set(W.canGoBack(2)),this.canNavigateForwardInNavigationsContextKey.set(W.canGoForward(2)),this.canNavigateToLastNavigationLocationContextKey.set(W.canGoLast(2)),this.canNavigateBackInEditsContextKey.set(W.canGoBack(1)),this.canNavigateForwardInEditsContextKey.set(W.canGoForward(1)),this.canNavigateToLastEditLocationContextKey.set(W.canGoLast(1)),this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length>0)})}registerEditorNavigationScopeChangeListener(){const W=()=>{this.disposeEditorNavigationStacks();const z=this.configurationService.getValue(k.NAVIGATION_SCOPE_SETTING);z==="editorGroup"?this.editorNavigationScope=1:z==="editor"?this.editorNavigationScope=2:this.editorNavigationScope=0};this._register(this.configurationService.onDidChangeConfiguration(z=>{z.affectsConfiguration(k.NAVIGATION_SCOPE_SETTING)&&W()})),W()}getStack(W=this.editorGroupService.activeGroup,z=W.activeEditor){switch(this.editorNavigationScope){case 2:{if(!z)return new P;let B=this.editorScopedNavigationStacks.get(W.id);B||(B=new Map,this.editorScopedNavigationStacks.set(W.id,B));let K=B.get(z)?.stack;if(!K){const H=new m.DisposableStore;K=H.add(this.instantiationService.createInstance(N,2)),H.add(K.onDidChange(()=>this._onDidChangeEditorNavigationStack.fire())),B.set(z,{stack:K,disposable:H})}return K}case 1:{let B=this.editorGroupScopedNavigationStacks.get(W.id)?.stack;if(!B){const K=new m.DisposableStore;B=K.add(this.instantiationService.createInstance(N,1)),K.add(B.onDidChange(()=>this._onDidChangeEditorNavigationStack.fire())),this.editorGroupScopedNavigationStacks.set(W.id,{stack:B,disposable:K})}return B}case 0:return this.defaultScopedEditorNavigationStack||(this.defaultScopedEditorNavigationStack=this._register(this.instantiationService.createInstance(N,0)),this._register(this.defaultScopedEditorNavigationStack.onDidChange(()=>this._onDidChangeEditorNavigationStack.fire()))),this.defaultScopedEditorNavigationStack}}goForward(W){return this.getStack().goForward(W)}goBack(W){return this.getStack().goBack(W)}goPrevious(W){return this.getStack().goPrevious(W)}goLast(W){return this.getStack().goLast(W)}handleActiveEditorChangeInNavigationStacks(W,z){this.getStack(W,z?.input).handleActiveEditorChange(z)}handleActiveEditorSelectionChangeInNavigationStacks(W,z,B){this.getStack(W,z.input).handleActiveEditorSelectionChange(z,B)}handleEditorCloseEventInHistory(W){const z=this.editorScopedNavigationStacks.get(W.groupId);if(z){const B=z.get(W.editor);B&&(B.disposable.dispose(),z.delete(W.editor)),z.size===0&&this.editorScopedNavigationStacks.delete(W.groupId)}}handleEditorGroupRemoveInNavigationStacks(W){this.defaultScopedEditorNavigationStack?.remove(W.id);const z=this.editorGroupScopedNavigationStacks.get(W.id);z&&(z.disposable.dispose(),this.editorGroupScopedNavigationStacks.delete(W.id))}clearEditorNavigationStacks(){this.withEachEditorNavigationStack(W=>W.clear())}removeFromEditorNavigationStacks(W){this.withEachEditorNavigationStack(z=>z.remove(W))}moveInEditorNavigationStacks(W){this.withEachEditorNavigationStack(z=>z.move(W))}withEachEditorNavigationStack(W){this.defaultScopedEditorNavigationStack&&W(this.defaultScopedEditorNavigationStack);for(const[,z]of this.editorGroupScopedNavigationStacks)W(z.stack);for(const[,z]of this.editorScopedNavigationStacks)for(const[,B]of z)W(B.stack)}disposeEditorNavigationStacks(){this.defaultScopedEditorNavigationStack?.dispose(),this.defaultScopedEditorNavigationStack=void 0;for(const[,W]of this.editorGroupScopedNavigationStacks)W.disposable.dispose();this.editorGroupScopedNavigationStacks.clear();for(const[,W]of this.editorScopedNavigationStacks)for(const[,z]of W)z.disposable.dispose();this.editorScopedNavigationStacks.clear()}openNextRecentlyUsedEditor(W){const[z,B]=this.ensureRecentlyUsedStack(K=>K-1,W);return this.doNavigateInRecentlyUsedEditorsStack(z[B],W)}openPreviouslyUsedEditor(W){const[z,B]=this.ensureRecentlyUsedStack(K=>K+1,W);return this.doNavigateInRecentlyUsedEditorsStack(z[B],W)}async doNavigateInRecentlyUsedEditorsStack(W,z){if(W){const B=typeof z!="number"||!this.editorGroupService.getGroup(z);B?this.navigatingInRecentlyUsedEditorsStack=!0:this.navigatingInRecentlyUsedEditorsInGroupStack=!0;const K=this.editorGroupService.getGroup(W.groupId)??this.editorGroupService.activeGroup;try{await K.openEditor(W.editor)}finally{B?this.navigatingInRecentlyUsedEditorsStack=!1:this.navigatingInRecentlyUsedEditorsInGroupStack=!1}}}ensureRecentlyUsedStack(W,z){let B,K;const H=typeof z=="number"?this.editorGroupService.getGroup(z):void 0;H?(B=this.recentlyUsedEditorsInGroupStack||H.getEditors(0).map(G=>({groupId:H.id,editor:G})),K=this.recentlyUsedEditorsInGroupStackIndex):(B=this.recentlyUsedEditorsStack||this.editorService.getEditors(0),K=this.recentlyUsedEditorsStackIndex);let U=W(K);return U<0?U=0:U>B.length-1&&(U=B.length-1),H?(this.recentlyUsedEditorsInGroupStack=B,this.recentlyUsedEditorsInGroupStackIndex=U):(this.recentlyUsedEditorsStack=B,this.recentlyUsedEditorsStackIndex=U),[B,U]}handleEditorEventInRecentEditorsStack(){this.navigatingInRecentlyUsedEditorsStack||(this.recentlyUsedEditorsStack=void 0,this.recentlyUsedEditorsStackIndex=0),this.navigatingInRecentlyUsedEditorsInGroupStack||(this.recentlyUsedEditorsInGroupStack=void 0,this.recentlyUsedEditorsInGroupStackIndex=0)}static{this.MAX_RECENTLY_CLOSED_EDITORS=20}handleEditorCloseEventInReopen(W){if(this.ignoreEditorCloseEvent)return;const{editor:z,context:B}=W;if(B===b.EditorCloseContext.REPLACE||B===b.EditorCloseContext.MOVE)return;const K=z.toUntyped();if(!K)return;const H=[],U=b.EditorResourceAccessor.getOriginalUri(z,{supportSideBySide:b.SideBySideEditor.BOTH});y.URI.isUri(U)?H.push(U):U&&H.push(...(0,d.coalesce)([U.primary,U.secondary])),this.removeFromRecentlyClosedEditors(z),this.recentlyClosedEditors.push({editorId:z.editorId,editor:K,resource:b.EditorResourceAccessor.getOriginalUri(z),associatedResources:H,index:W.index,sticky:W.sticky}),this.recentlyClosedEditors.length>k.MAX_RECENTLY_CLOSED_EDITORS&&this.recentlyClosedEditors.shift(),this.canReopenClosedEditorContextKey.set(!0)}async reopenLastClosedEditor(){const W=this.recentlyClosedEditors.pop();let z;return W&&(z=this.doReopenLastClosedEditor(W)),this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length>0),z}async doReopenLastClosedEditor(W){const z={pinned:!0,sticky:W.sticky,index:W.index,ignoreError:!0};(W.sticky&&!this.editorGroupService.activeGroup.isSticky(W.index)||!W.sticky&&this.editorGroupService.activeGroup.isSticky(W.index))&&(z.index=void 0);let B;if(!this.editorGroupService.activeGroup.contains(W.editor)){this.ignoreEditorCloseEvent=!0;try{B=await this.editorService.openEditor({...W.editor,options:{...W.editor.options,...z}})}finally{this.ignoreEditorCloseEvent=!1}}B||((0,d.remove)(this.recentlyClosedEditors,W),this.reopenLastClosedEditor())}removeFromRecentlyClosedEditors(W){this.recentlyClosedEditors=this.recentlyClosedEditors.filter(z=>(0,b.isEditorInput)(W)&&z.editorId!==W.editorId?!0:!(z.resource&&this.editorHelper.matchesFile(z.resource,W)||z.associatedResources.some(B=>this.editorHelper.matchesFile(B,W)))),this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length>0)}static{this.MAX_HISTORY_ITEMS=200}static{this.HISTORY_STORAGE_KEY="history.entries"}handleActiveEditorChangeInHistory(W){const z=W?.input;!z||z.isDisposed()||!this.includeInHistory(z)||(this.removeFromHistory(z),this.addToHistory(z))}addToHistory(W,z=!0){this.ensureHistoryLoaded(this.history);const B=this.editorHelper.preferResourceEditorInput(W);B&&(z?this.history.unshift(B):this.history.push(B),this.history.length>k.MAX_HISTORY_ITEMS&&this.editorHelper.clearOnEditorDispose(this.history.pop(),this.editorHistoryListeners),(0,b.isEditorInput)(B)&&this.editorHelper.onEditorDispose(B,()=>this.updateHistoryOnEditorDispose(B),this.editorHistoryListeners))}updateHistoryOnEditorDispose(W){if(!(0,b.isSideBySideEditorInput)(W))this.removeFromHistory(W);else{const z=[],B=W.primary.matches(W.secondary)?[W.primary]:[W.primary,W.secondary];for(const K of B){const H=this.editorHelper.preferResourceEditorInput(K);(0,b.isResourceEditorInput)(H)&&z.push(H)}this.replaceInHistory(W,...z)}}includeInHistory(W){return(0,b.isEditorInput)(W)?!0:!this.resourceExcludeMatcher.value.matches(W.resource)}removeExcludedFromHistory(){this.ensureHistoryLoaded(this.history),this.history=this.history.filter(W=>{const z=this.includeInHistory(W);return z||this.editorHelper.clearOnEditorDispose(W,this.editorHistoryListeners),z})}moveInHistory(W){W.isOperation(2)&&this.removeFromHistory(W)&&this.addToHistory({resource:W.target.resource})}removeFromHistory(W){let z=!1;return this.ensureHistoryLoaded(this.history),this.history=this.history.filter(B=>{const K=this.editorHelper.matchesEditor(W,B);return K&&(this.editorHelper.clearOnEditorDispose(W,this.editorHistoryListeners),z=!0),!K}),z}replaceInHistory(W,...z){this.ensureHistoryLoaded(this.history);let B=!1;const K=[];for(const H of this.history)this.editorHelper.matchesEditor(W,H)?(this.editorHelper.clearOnEditorDispose(W,this.editorHistoryListeners),B||(K.push(...z),B=!0)):z.some(U=>this.editorHelper.matchesEditor(U,H))||K.push(H);B||K.push(...z),this.history=K}clearRecentlyOpened(){this.history=[];for(const[,W]of this.editorHistoryListeners)(0,m.dispose)(W);this.editorHistoryListeners.clear()}getHistory(){return this.ensureHistoryLoaded(this.history),this.history}ensureHistoryLoaded(W){this.history||(this.history=[],this.editorGroupService.isReady?this.loadHistory():(async()=>(await this.editorGroupService.whenReady,this.loadHistory()))())}loadHistory(){this.history=[];const W=this.loadHistoryFromStorage(),z=[...this.editorService.getEditors(0)].reverse(),B=new Set;for(const{editor:K}of z)this.includeInHistory(K)&&(this.addToHistory(K),K.resource&&B.add(`${K.resource.toString()}/${K.editorId}`));for(const K of W)B.has(`${K.resource.toString()}/${K.options?.override}`)||this.addToHistory(K,!1)}loadHistoryFromStorage(){const W=[],z=this.storageService.get(k.HISTORY_STORAGE_KEY,1);if(z)try{const B=JSON.parse(z);for(const K of B)if(!(!K.editor||!K.editor.resource))try{W.push({...K.editor,resource:typeof K.editor.resource=="string"?y.URI.parse(K.editor.resource):y.URI.from(K.editor.resource)})}catch(H){(0,g.onUnexpectedError)(H)}}catch(B){(0,g.onUnexpectedError)(B)}return W}saveState(){if(!this.history)return;const W=[];for(const z of this.history)(0,b.isEditorInput)(z)||!(0,b.isResourceEditorInput)(z)||W.push({editor:{...z,resource:z.resource.toString()}});this.storageService.store(k.HISTORY_STORAGE_KEY,JSON.stringify(W),1,1)}getLastActiveWorkspaceRoot(W){const z=this.contextService.getWorkspace().folders;if(z.length!==0){if(z.length===1){const B=z[0].uri;return!W||B.scheme===W?B:void 0}for(const B of this.getHistory()){if((0,b.isEditorInput)(B)||W&&B.resource.scheme!==W)continue;const K=this.contextService.getWorkspaceFolder(B.resource);if(K)return K.uri}for(const B of z){const K=B.uri;if(!W||K.scheme===W)return K}}}getLastActiveFile(W){for(const z of this.getHistory()){let B;if((0,b.isEditorInput)(z)?B=b.EditorResourceAccessor.getOriginalUri(z,{filterByScheme:W}):B=z.resource,B?.scheme===W)return B}}};e.HistoryService=R,e.HistoryService=R=k=fe([O(0,D.IEditorService),O(1,r.IEditorGroupsService),O(2,v.IWorkspaceContextService),O(3,S.IStorageService),O(4,a.IConfigurationService),O(5,f.IFileService),O(6,l.IWorkspacesService),O(7,s.IInstantiationService),O(8,o.IWorkbenchLayoutService),O(9,u.IContextKeyService)],R),(0,p.registerSingleton)(T.IHistoryService,R,0);class M{constructor(W,z,B){this.editorIdentifier=W,this.selection=z,this.reason=B}justifiesNewNavigationEntry(W){if(this.editorIdentifier.groupId!==W.editorIdentifier.groupId||!this.editorIdentifier.editor.matches(W.editorIdentifier.editor)||!this.selection||!W.selection)return!0;const z=this.selection.compare(W.selection);return z===2&&(W.reason===4||W.reason===5)?!0:z===3}}let N=class extends m.Disposable{constructor(W,z){super(),this.scope=W,this.instantiationService=z,this.selectionsStack=this._register(this.instantiationService.createInstance(x,0,this.scope)),this.editsStack=this._register(this.instantiationService.createInstance(x,1,this.scope)),this.navigationsStack=this._register(this.instantiationService.createInstance(x,2,this.scope)),this.stacks=[this.selectionsStack,this.editsStack,this.navigationsStack],this.onDidChange=h.Event.any(this.selectionsStack.onDidChange,this.editsStack.onDidChange,this.navigationsStack.onDidChange)}canGoForward(W){return this.getStack(W).canGoForward()}goForward(W){return this.getStack(W).goForward()}canGoBack(W){return this.getStack(W).canGoBack()}goBack(W){return this.getStack(W).goBack()}goPrevious(W){return this.getStack(W).goPrevious()}canGoLast(W){return this.getStack(W).canGoLast()}goLast(W){return this.getStack(W).goLast()}getStack(W=0){switch(W){case 0:return this.selectionsStack;case 1:return this.editsStack;case 2:return this.navigationsStack}}handleActiveEditorChange(W){this.selectionsStack.notifyNavigation(W)}handleActiveEditorSelectionChange(W,z){const B=this.selectionsStack.current;this.selectionsStack.notifyNavigation(W,z),z.reason===3?this.editsStack.notifyNavigation(W,z):(z.reason===4||z.reason===5)&&!this.selectionsStack.isNavigating()&&(z.reason===5&&!this.navigationsStack.isNavigating()&&B&&this.navigationsStack.addOrReplace(B.groupId,B.editor,B.selection),this.navigationsStack.notifyNavigation(W,z))}clear(){for(const W of this.stacks)W.clear()}remove(W){for(const z of this.stacks)z.remove(W)}move(W){for(const z of this.stacks)z.move(W)}};N=fe([O(1,s.IInstantiationService)],N);class P{constructor(){this.onDidChange=h.Event.None}canGoForward(){return!1}async goForward(){}canGoBack(){return!1}async goBack(){}async goPrevious(){}canGoLast(){return!1}async goLast(){}handleActiveEditorChange(){}handleActiveEditorSelectionChange(){}clear(){}remove(){}move(){}dispose(){}}let x=class extends m.Disposable{static{L=this}static{this.MAX_STACK_SIZE=50}get current(){return this.stack[this.index]}set current(W){W&&(this.stack[this.index]=W)}constructor(W,z,B,K,H,U){super(),this.filter=W,this.scope=z,this.instantiationService=B,this.editorService=K,this.editorGroupService=H,this.logService=U,this._onDidChange=this._register(new h.Emitter),this.onDidChange=this._onDidChange.event,this.mapEditorToDisposable=new Map,this.mapGroupToDisposable=new Map,this.editorHelper=this.instantiationService.createInstance(F),this.stack=[],this.index=-1,this.previousIndex=-1,this.navigating=!1,this.currentSelectionState=void 0,this.registerListeners()}registerListeners(){this._register(this.onDidChange(()=>this.traceStack())),this._register(this.logService.onDidChangeLogLevel(()=>this.traceStack()))}traceStack(){if(this.logService.getLevel()!==A.LogLevel.Trace)return;const W=[];for(const z of this.stack)typeof z.selection?.log=="function"?W.push(`- group: ${z.groupId}, editor: ${z.editor.resource?.toString()}, selection: ${z.selection.log()}`):W.push(`- group: ${z.groupId}, editor: ${z.editor.resource?.toString()}, selection: <none>`);W.length===0?this.trace(`index: ${this.index}, navigating: ${this.isNavigating()}: <empty>`):this.trace(`index: ${this.index}, navigating: ${this.isNavigating()} ${W.join(` `)} `)}trace(W,z=null,B){if(this.logService.getLevel()!==A.LogLevel.Trace)return;let K;switch(this.filter){case 0:K="global";break;case 1:K="edits";break;case 2:K="navigation";break}let H;switch(this.scope){case 0:H="default";break;case 1:H="editorGroup";break;case 2:H="editor";break}z!==null?this.logService.trace(`[History stack ${K}-${H}]: ${W} (editor: ${z?.resource?.toString()}, event: ${this.traceEvent(B)})`):this.logService.trace(`[History stack ${K}-${H}]: ${W}`)}traceEvent(W){if(!W)return"<none>";switch(W.reason){case 3:return"edit";case 4:return"navigation";case 5:return"jump";case 1:return"programmatic";case 2:return"user"}}registerGroupListeners(W){if(!this.mapGroupToDisposable.has(W)){const z=this.editorGroupService.getGroup(W);z&&this.mapGroupToDisposable.set(W,z.onWillMoveEditor(B=>this.onWillMoveEditor(B)))}}onWillMoveEditor(W){if(this.trace("onWillMoveEditor()",W.editor),this.scope!==1)for(const z of this.stack)z.groupId===W.groupId&&this.editorHelper.matchesEditor(W.editor,z.editor)&&(z.groupId=W.target)}notifyNavigation(W,z){this.trace("notifyNavigation()",W?.input,z);const B=(0,b.isEditorPaneWithSelection)(W),K=W?.group&&W.input&&!W.input.isDisposed();this.navigating?(this.trace("notifyNavigation() ignoring (navigating)",W?.input,z),B&&K?(this.trace("notifyNavigation() updating current selection state",W?.input,z),this.currentSelectionState=new M({groupId:W.group.id,editor:W.input},W.getSelection(),z?.reason)):(this.trace("notifyNavigation() dropping current selection state",W?.input,z),this.currentSelectionState=void 0)):(this.trace("notifyNavigation() not ignoring",W?.input,z),B&&K?this.onSelectionAwareEditorNavigation(W.group.id,W.input,W.getSelection(),z):(this.currentSelectionState=void 0,K&&this.onNonSelectionAwareEditorNavigation(W.group.id,W.input)))}onSelectionAwareEditorNavigation(W,z,B,K){if(this.current?.groupId===W&&!B&&this.editorHelper.matchesEditor(this.current.editor,z))return;this.trace("onSelectionAwareEditorNavigation()",z,K);const H=new M({groupId:W,editor:z},B,K?.reason);!this.currentSelectionState||this.currentSelectionState.justifiesNewNavigationEntry(H)?this.doAdd(W,z,H.selection):this.doReplace(W,z,H.selection),this.currentSelectionState=H}onNonSelectionAwareEditorNavigation(W,z){this.current?.groupId===W&&this.editorHelper.matchesEditor(this.current.editor,z)||(this.trace("onNonSelectionAwareEditorNavigation()",z),this.doAdd(W,z))}doAdd(W,z,B){this.navigating||this.addOrReplace(W,z,B)}doReplace(W,z,B){this.navigating||this.addOrReplace(W,z,B,!0)}addOrReplace(W,z,B,K){this.registerGroupListeners(W);let H=!1;this.current&&(K||this.shouldReplaceStackEntry(this.current,{groupId:W,editor:z,selection:B}))&&(H=!0);const U=this.editorHelper.preferResourceEditorInput(z);if(!U)return;H?this.trace("replace()",U):this.trace("add()",U);const G={groupId:W,editor:U,selection:B},$=[];if(H)this.current&&$.push(this.current),this.current=G;else{if(this.stack.length>this.index+1){for(let ie=this.index+1;ie<this.stack.length;ie++)$.push(this.stack[ie]);this.stack=this.stack.slice(0,this.index+1)}this.stack.splice(this.index+1,0,G),this.stack.length>L.MAX_STACK_SIZE?($.push(this.stack.shift()),this.previousIndex>=0&&this.previousIndex--):this.setIndex(this.index+1,!0)}for(const ie of $)this.editorHelper.clearOnEditorDispose(ie.editor,this.mapEditorToDisposable);(0,b.isEditorInput)(U)&&this.editorHelper.onEditorDispose(U,()=>this.remove(U),this.mapEditorToDisposable),this._onDidChange.fire()}shouldReplaceStackEntry(W,z){return W.groupId!==z.groupId||!this.editorHelper.matchesEditor(W.editor,z.editor)?!1:W.selection?z.selection?W.selection.compare(z.selection)===1:!1:!0}move(W){if(W.isOperation(2))for(const z of this.stack)this.editorHelper.matchesEditor(W,z.editor)&&(z.editor={resource:W.target.resource})}remove(W){this.stack=this.stack.filter(z=>{const B=typeof W=="number"?z.groupId===W:this.editorHelper.matchesEditor(W,z.editor);return B&&this.editorHelper.clearOnEditorDispose(z.editor,this.mapEditorToDisposable),!B}),this.flatten(),this.index=this.stack.length-1,this.previousIndex=-1,typeof W=="number"&&(this.mapGroupToDisposable.get(W)?.dispose(),this.mapGroupToDisposable.delete(W)),this._onDidChange.fire()}flatten(){const W=[];let z;for(const B of this.stack)z&&this.shouldReplaceStackEntry(B,z)||(z=B,W.push(B));this.stack=W}clear(){this.index=-1,this.previousIndex=-1,this.stack.splice(0);for(const[,W]of this.mapEditorToDisposable)(0,m.dispose)(W);this.mapEditorToDisposable.clear();for(const[,W]of this.mapGroupToDisposable)(0,m.dispose)(W);this.mapGroupToDisposable.clear()}dispose(){super.dispose(),this.clear()}canGoForward(){return this.stack.length>this.index+1}async goForward(){if(!await this.maybeGoCurrent()&&this.canGoForward())return this.setIndex(this.index+1),this.navigate()}canGoBack(){return this.index>0}async goBack(){if(!await this.maybeGoCurrent()&&this.canGoBack())return this.setIndex(this.index-1),this.navigate()}async goPrevious(){if(!await this.maybeGoCurrent())return this.previousIndex===-1?this.goBack():(this.setIndex(this.previousIndex),this.navigate())}canGoLast(){return this.stack.length>0}async goLast(){if(this.canGoLast())return this.setIndex(this.stack.length-1),this.navigate()}async maybeGoCurrent(){return this.filter===0||this.isCurrentSelectionActive()?!1:(await this.navigate(),!0)}isCurrentSelectionActive(){if(!this.current?.selection)return!1;const W=this.editorService.activeEditorPane;if(!(0,b.isEditorPaneWithSelection)(W)||W.group?.id!==this.current.groupId||!W.input||!this.editorHelper.matchesEditor(W.input,this.current.editor))return!1;const z=W.getSelection();return z?z.compare(this.current.selection)===1:!1}setIndex(W,z){this.previousIndex=this.index,this.index=W,z||this._onDidChange.fire()}async navigate(){this.navigating=!0;try{this.current&&await this.doNavigate(this.current)}finally{this.navigating=!1}}doNavigate(W){let z=Object.create(null);return W.selection&&(z=W.selection.restore(z)),(0,b.isEditorInput)(W.editor)?this.editorService.openEditor(W.editor,z,W.groupId):this.editorService.openEditor({...W.editor,options:{...W.editor.options,...z}},W.groupId)}isNavigating(){return this.navigating}};e.EditorNavigationStack=x,e.EditorNavigationStack=x=L=fe([O(2,s.IInstantiationService),O(3,D.IEditorService),O(4,r.IEditorGroupsService),O(5,A.ILogService)],x);let F=class{constructor(W,z,B,K){this.uriIdentityService=W,this.lifecycleService=z,this.fileService=B,this.pathService=K}preferResourceEditorInput(W){const z=b.EditorResourceAccessor.getOriginalUri(W);if(z?.scheme===n.Schemas.file||z?.scheme===n.Schemas.vscodeRemote||z?.scheme===n.Schemas.vscodeUserData||z?.scheme===this.pathService.defaultUriScheme){if((0,b.isEditorInput)(W)){const K=W.toUntyped();if((0,b.isResourceEditorInput)(K))return K}return W}else return(0,b.isEditorInput)(W)?W:void 0}matchesEditor(W,z){return W instanceof f.FileChangesEvent||W instanceof f.FileOperationEvent?(0,b.isEditorInput)(z)?!1:W instanceof f.FileChangesEvent?W.contains(z.resource,2):this.matchesFile(z.resource,W):(0,b.isEditorInput)(W)?(0,b.isEditorInput)(z)?W.matches(z):this.matchesFile(z.resource,W):(0,b.isEditorInput)(z)?this.matchesFile(W.resource,z):W&&z&&this.uriIdentityService.extUri.isEqual(W.resource,z.resource)}matchesFile(W,z){if(z instanceof f.FileChangesEvent)return z.contains(W,2);if(z instanceof f.FileOperationEvent)return this.uriIdentityService.extUri.isEqualOrParent(W,z.resource);if((0,b.isEditorInput)(z)){const B=z.resource;return!B||this.lifecycleService.phase>=3&&!this.fileService.hasProvider(B)?!1:this.uriIdentityService.extUri.isEqual(B,W)}return this.uriIdentityService.extUri.isEqual(z?.resource,W)}matchesEditorIdentifier(W,z){return!z?.group||W.groupId!==z.group.id?!1:z.input?W.editor.matches(z.input):!1}onEditorDispose(W,z,B){const K=h.Event.once(W.onWillDispose)(()=>z());let H=B.get(W);H||(H=new m.DisposableStore,B.set(W,H)),H.add(K)}clearOnEditorDispose(W,z){if(!(0,b.isEditorInput)(W))return;const B=z.get(W);B&&((0,m.dispose)(B),z.delete(W))}};F=fe([O(0,I.IUriIdentityService),O(1,_.ILifecycleService),O(2,f.IFileService),O(3,C.IPathService)],F)}),define(Q[386],Y([1,0,20,141,195,180,69,22,55,26,33,17,10,440,3101,9,11,39,70,131,225]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveResourcesForSearchIncludes=e.QueryBuilder=void 0;let l=class{constructor(L,R,M,N,P){this.configurationService=L,this.workspaceContextService=R,this.editorGroupsService=M,this.logService=N,this.pathService=P}text(L,R,M={}){L=this.getContentPattern(L,M);const N=this.configurationService.getValue(),P=R&&R.some(F=>!this.configurationService.getValue({resource:F}).search.useRipgrep);return{...this.commonQuery(R?.map(u.toWorkspaceFolder),M),type:2,contentPattern:L,previewOptions:M.previewOptions,maxFileSize:M.maxFileSize,usePCRE2:N.search.usePCRE2||P||!1,beforeContext:M.beforeContext,afterContext:M.afterContext,userDisabledExcludesAndIgnoreFiles:M.disregardExcludeSettings&&M.disregardIgnoreFiles}}getContentPattern(L,R){const M=this.configurationService.getValue();L.isRegExp&&(L.pattern=L.pattern.replace(/\r?\n/g,"\\n"));const N={...L,wordSeparators:M.editor.wordSeparators};return this.isCaseSensitive(L,R)&&(N.isCaseSensitive=!0),this.isMultiline(L)&&(N.isMultiline=!0),R.notebookSearchConfig?.includeMarkupInput&&(N.notebookInfo||(N.notebookInfo={}),N.notebookInfo.isInNotebookMarkdownInput=R.notebookSearchConfig.includeMarkupInput),R.notebookSearchConfig?.includeMarkupPreview&&(N.notebookInfo||(N.notebookInfo={}),N.notebookInfo.isInNotebookMarkdownPreview=R.notebookSearchConfig.includeMarkupPreview),R.notebookSearchConfig?.includeCodeInput&&(N.notebookInfo||(N.notebookInfo={}),N.notebookInfo.isInNotebookCellInput=R.notebookSearchConfig.includeCodeInput),R.notebookSearchConfig?.includeOutput&&(N.notebookInfo||(N.notebookInfo={}),N.notebookInfo.isInNotebookCellOutput=R.notebookSearchConfig.includeOutput),N}file(L,R={}){return{...this.commonQuery(L,R),type:1,filePattern:R.filePattern?R.filePattern.trim():R.filePattern,exists:R.exists,sortByScore:R.sortByScore,cacheKey:R.cacheKey}}handleIncludeExclude(L,R){return L?(L=Array.isArray(L)?L.map(C):C(L),R?this.parseSearchPaths(L):{pattern:g(...Array.isArray(L)?L:[L])}):{}}commonQuery(L=[],R={}){const M=this.handleIncludeExclude(R.includePattern,R.expandPatterns),N=this.handleIncludeExclude(R.excludePattern,R.expandPatterns),P=L.length>1,x=(M.searchPaths&&M.searchPaths.length?M.searchPaths.map(W=>this.getFolderQueryForSearchPath(W,R,N)):L.map(W=>this.getFolderQueryForRoot(W,R,N,P))).filter(W=>!!W),F={_reason:R._reason,folderQueries:x,usingSearchPaths:!!(M.searchPaths&&M.searchPaths.length),extraFileResources:R.extraFileResources,excludePattern:N.pattern,includePattern:M.pattern,onlyOpenEditors:R.onlyOpenEditors,maxResults:R.maxResults};if(R.onlyOpenEditors){const W=t.coalesce(t.flatten(this.editorGroupsService.groups.map(K=>K.editors.map(H=>H.resource))));this.logService.trace("QueryBuilder#commonQuery - openEditor URIs",JSON.stringify(W));const z=W.filter(K=>(0,c.pathIncludedInQuery)(F,K.fsPath)),B=this.commonQueryFromFileList(z);return this.logService.trace("QueryBuilder#commonQuery - openEditor Query",JSON.stringify(B)),{...F,...B}}const V=R.extraFileResources&&R.extraFileResources.filter(W=>(0,c.pathIncludedInQuery)(F,W.fsPath));return F.extraFileResources=V&&V.length?V:void 0,F}commonQueryFromFileList(L){const R=[],M=new T.ResourceMap,N={};let P=!1;return L.forEach(x=>{if(x.scheme===f.Schemas.walkThrough)return;if((0,m.isAbsolutePath)(x)){const V=this.workspaceContextService.getWorkspaceFolder(x)?.uri??x.with({path:v.dirname(x.fsPath)});let W=M.get(V);W||(P=!0,W={folder:V,includePattern:{}},R.push(W),M.set(V,W));const z=v.relative(V.fsPath,x.fsPath);(0,h.assertIsDefined)(W.includePattern)[z.replace(/\\/g,"/")]=!0}else x.fsPath&&(P=!0,N[x.fsPath]=!0)}),{folderQueries:R,includePattern:N,usingSearchPaths:!0,excludePattern:P?void 0:{"**/*":!0}}}isCaseSensitive(L,R){if(R.isSmartCase){if(L.isRegExp){if(S.containsUppercaseCharacter(L.pattern,!0))return!0}else if(S.containsUppercaseCharacter(L.pattern))return!0}return!!L.isCaseSensitive}isMultiline(L){return L.isMultiline||L.isRegExp&&(0,r.isMultilineRegexSource)(L.pattern)||L.pattern.indexOf(` `)>=0?!0:!!L.isMultiline}parseSearchPaths(L){const R=B=>v.isAbsolute(B)||/^\.\.?([\/\\]|$)/.test(B),N=(Array.isArray(L)?L:w(L)).map(B=>{const K=this.pathService.resolvedUserHome;return K?(0,D.untildify)(B,K.scheme===f.Schemas.file?K.fsPath:K.path):B}),P=y.groupBy(N,B=>R(B)?"searchPaths":"exprSegments"),x=(P.exprSegments||[]).map(B=>S.rtrim(B,"/")).map(B=>S.rtrim(B,"\\")).map(B=>(B[0]==="."&&(B="*"+B),E(B))),F={},V=this.expandSearchPathPatterns(P.searchPaths||[]);V&&V.length&&(F.searchPaths=V);const W=t.flatten(x),z=g(...W);return z&&(F.pattern=z),F}getExcludesForFolder(L,R){return R.disregardExcludeSettings?void 0:(0,c.getExcludes)(L,!R.disregardSearchExcludeSettings)}expandSearchPathPatterns(L){if(!L||!L.length)return[];const R=L.flatMap(N=>{let{pathPortion:P,globPortion:x}=n(N);return x&&(x=I(x)),this.expandOneSearchPath(P).flatMap(V=>this.resolveOneSearchPathPattern(V,x))}),M=new Map;return R.forEach(N=>{const P=N.searchPath.toString(),x=M.get(P);x?N.pattern&&(x.pattern=x.pattern||{},x.pattern[N.pattern]=!0):M.set(P,{searchPath:N.searchPath,pattern:N.pattern?g(N.pattern):void 0})}),Array.from(M.values())}expandOneSearchPath(L){if(v.isAbsolute(L)){const R=this.workspaceContextService.getWorkspace().folders;return R[0]&&R[0].uri.scheme!==f.Schemas.file?[{searchPath:R[0].uri.with({path:L})}]:[{searchPath:a.URI.file(v.normalize(L))}]}if(this.workspaceContextService.getWorkbenchState()===2){const R=this.workspaceContextService.getWorkspace().folders[0].uri;if(L=C(L),L.startsWith("../")||L===".."){const N=v.posix.resolve(R.path,L);return[{searchPath:R.with({path:N})}]}const M=I(L);return[{searchPath:R,pattern:M}]}else{if(L==="./"||L===".\\")return[];{const R=L.replace(/^\.[\/\\]/,""),N=this.workspaceContextService.getWorkspace().folders.map(P=>{const x=R.match(new RegExp(`^${S.escapeRegExpCharacters(P.name)}(?:/(.*)|$)`));return x?{match:x,folder:P}:null}).filter(h.isDefined);if(N.length)return N.map(P=>{const x=P.match[1];return{searchPath:P.folder.uri,pattern:x&&I(x)}});{const P=L.match(/\.[\/\\](.+)[\/\\]?/),x=P?P[1]:L,F=i.localize(0,null,x);throw new Error(F)}}}}resolveOneSearchPathPattern(L,R){const M=L.pattern&&R?`${L.pattern}/${R}`:L.pattern||R,N=[{searchPath:L.searchPath,pattern:M}];return M&&!M.endsWith("**")&&N.push({searchPath:L.searchPath,pattern:M+"/**"}),N}getFolderQueryForSearchPath(L,R,M){const N=this.getFolderQueryForRoot((0,u.toWorkspaceFolder)(L.searchPath),R,M,!1);return N?{...N,includePattern:L.pattern}:null}getFolderQueryForRoot(L,R,M,N){let P;const x=a.URI.isUri(L)?L:L.uri;if(M.searchPaths){const B=M.searchPaths.filter(K=>(0,m.isEqual)(K.searchPath,x))[0];if(B&&!B.pattern)return null;B&&(P=B.pattern)}const F=this.configurationService.getValue({resource:x}),W={...this.getExcludesForFolder(F,R)||{},...P||{}},z=a.URI.isUri(L)?(0,m.basename)(L):L.name;return{folder:x,folderName:N?z:void 0,excludePattern:Object.keys(W).length>0?W:void 0,fileEncoding:F.files&&F.files.encoding,disregardIgnoreFiles:typeof R.disregardIgnoreFiles=="boolean"?R.disregardIgnoreFiles:!F.search.useIgnoreFiles,disregardGlobalIgnoreFiles:typeof R.disregardGlobalIgnoreFiles=="boolean"?R.disregardGlobalIgnoreFiles:!F.search.useGlobalIgnoreFiles,disregardParentIgnoreFiles:typeof R.disregardParentIgnoreFiles=="boolean"?R.disregardParentIgnoreFiles:!F.search.useParentIgnoreFiles,ignoreSymlinks:typeof R.ignoreSymlinks=="boolean"?R.ignoreSymlinks:!F.search.followSymlinks}}};e.QueryBuilder=l,e.QueryBuilder=l=fe([O(0,s.IConfigurationService),O(1,u.IWorkspaceContextService),O(2,d.IEditorGroupsService),O(3,o.ILogService),O(4,p.IPathService)],l);function n(k){const L=k.match(/[\*\{\}\(\)\[\]\?]/);if(L){const R=L.index,M=k.substr(0,R).match(/[/|\\][^/\\]*$/);if(M){let N=k.substr(0,M.index);return N.match(/[/\\]/)||(N+="/"),{pathPortion:N,globPortion:k.substr((M.index||0)+1)}}}return{pathPortion:k}}function g(...k){return k.length?k.reduce((L,R)=>(L[R]=!0,L),Object.create(null)):void 0}function w(k){return b.splitGlobAware(k,",").map(L=>L.trim()).filter(L=>!!L.length)}function E(k){return[`**/${k}/**`,`**/${k}`].map(R=>R.replace(/\*\*\/\*\*/g,"**"))}function C(k){return k.replace(/\\/g,"/")}function I(k){return C(k).replace(/^\.\//,"").replace(/\/+$/g,"")}function _(k){return k.replace(/([?*[\]])/g,"[$1]")}function A(k,L){k=t.distinct(k,N=>N.toString());const R=[],M=L.getWorkspace();return k&&k.forEach(N=>{let P;if(L.getWorkbenchState()===2)P=(0,m.relativePath)(M.folders[0].uri,N),P&&P!=="."&&(P="./"+P);else{const x=L.getWorkspaceFolder(N);if(x){const F=x.name;if(M.folders.filter(W=>W.name===F).length===1){const W=(0,m.relativePath)(x.uri,N);W===""?P=`./${x.name}`:P=`./${x.name}/${W}`}else P=N.fsPath}}P&&R.push(_(P))}),R}e.resolveResourcesForSearchIncludes=A}),define(Q[4054],Y([1,0,22,10,28,25,5,41,43,39,423,21,65,86,386,225,9,936,126]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalUrlLinkOpener=e.TerminalSearchLinkOpener=e.TerminalLocalFolderOutsideWorkspaceLinkOpener=e.TerminalLocalFolderInWorkspaceLinkOpener=e.TerminalLocalFileLinkOpener=void 0;let p=class{constructor(E){this._editorService=E}async open(E){if(!E.uri)throw new Error("Tried to open file link without a resolved URI");const C=E.parsedLink?E.parsedLink.suffix:(0,u.getLinkSuffix)(E.text);let I=E.selection;I||(I=C?.row===void 0?void 0:{startLineNumber:C.row??1,startColumn:C.col??1,endLineNumber:C.rowEnd,endColumn:C.colEnd}),await this._editorService.openEditor({resource:E.uri,options:{pinned:!0,selection:I,revealIfOpened:!0}})}};e.TerminalLocalFileLinkOpener=p,e.TerminalLocalFileLinkOpener=p=fe([O(0,h.IEditorService)],p);let c=class{constructor(E){this._commandService=E}async open(E){if(!E.uri)throw new Error("Tried to open folder in workspace link without a resolved URI");await this._commandService.executeCommand("revealInExplorer",E.uri)}};e.TerminalLocalFolderInWorkspaceLinkOpener=c,e.TerminalLocalFolderInWorkspaceLinkOpener=c=fe([O(0,b.ICommandService)],c);let l=class{constructor(E){this._hostService=E}async open(E){if(!E.uri)throw new Error("Tried to open folder in workspace link without a resolved URI");this._hostService.openWindow([{folderUri:E.uri}],{forceNewWindow:!0})}};e.TerminalLocalFolderOutsideWorkspaceLinkOpener=l,e.TerminalLocalFolderOutsideWorkspaceLinkOpener=l=fe([O(0,r.IHostService)],l);let n=class{constructor(E,C,I,_,A,k,L,R,M,N,P,x){this._capabilities=E,this._initialCwd=C,this._localFileOpener=I,this._localFolderInWorkspaceOpener=_,this._getOS=A,this._fileService=k,this._instantiationService=L,this._logService=R,this._quickInputService=M,this._searchService=N,this._workspaceContextService=P,this._workbenchEnvironmentService=x,this._fileQueryBuilder=this._instantiationService.createInstance(i.QueryBuilder)}async open(E){const C=(0,S.osPathModule)(this._getOS()),I=C.sep;let _=E.text.replace(/^file:\/\/\/?/,"");_=C.normalize(_).replace(/^(\.+[\\/])+/,""),_=_.replace(/:[^\\/][^\d]+$/,""),this._workspaceContextService.getWorkspace().folders.forEach(k=>{if(_.substring(0,k.name.length+1)===k.name+I){_=_.substring(k.name.length+1);return}});let A=_;if(this._capabilities.has(2)&&(A=(0,S.updateLinkWithRelativeCwd)(this._capabilities,E.bufferRange.start.y,_,C,this._logService)?.[0]||_),!await this._tryOpenExactLink(A,E)&&!(_!==A&&await this._tryOpenExactLink(_,E)))return this._quickInputService.quickAccess.show(_)}async _getExactMatch(E){const C=this._getOS(),I=(0,S.osPathModule)(C),_=I.isAbsolute(E);let A=_?E:void 0;!_&&this._initialCwd.length>0&&(A=I.join(this._initialCwd,E));let k;if(A){let L=A;C===1&&(L=A.replace(/\\/g,"/"),L.match(/[a-z]:/i)&&(L=`/${L}`));let R;this._workbenchEnvironmentService.remoteAuthority?R=y.URI.from({scheme:t.Schemas.vscodeRemote,authority:this._workbenchEnvironmentService.remoteAuthority,path:L}):R=y.URI.file(L);try{const M=await this._fileService.stat(R);k={uri:R,isDirectory:M.isDirectory}}catch{}}if(!k){const L=await this._searchService.fileSearch(this._fileQueryBuilder.file(this._workspaceContextService.getWorkspace().folders,{filePattern:E,maxResults:2}));if(L.results.length>0){if(L.results.length===1)k={uri:L.results[0].resource};else if(!_){const M=(await this._searchService.fileSearch(this._fileQueryBuilder.file(this._workspaceContextService.getWorkspace().folders,{filePattern:`**/${E}`}))).results.filter(N=>N.resource.toString().endsWith(E));M.length===1&&(k={uri:M[0].resource})}}}return k}async _tryOpenExactLink(E,C){const I=E.replace(/:\d+(:\d+)?$/,"");try{const _=await this._getExactMatch(I);if(_){const{uri:A,isDirectory:k}=_,L={text:_.uri.path+(E.match(/:\d+(:\d+)?$/)?.[0]||""),uri:A,bufferRange:C.bufferRange,type:C.type};if(A)return await(k?this._localFolderInWorkspaceOpener.open(L):this._localFileOpener.open(L)),!0}}catch{return!1}return!1}};e.TerminalSearchLinkOpener=n,e.TerminalSearchLinkOpener=n=fe([O(5,D.IFileService),O(6,T.IInstantiationService),O(7,d.ITerminalLogService),O(8,v.IQuickInputService),O(9,s.ISearchService),O(10,m.IWorkspaceContextService),O(11,a.IWorkbenchEnvironmentService)],n);let g=class{constructor(E,C,I){this._isRemote=E,this._openerService=C,this._configurationService=I}async open(E){if(!E.uri)throw new Error("Tried to open a url without a resolved URI");this._openerService.open(E.text,{allowTunneling:this._isRemote&&this._configurationService.getValue("remote.forwardOnOpen"),allowContributedOpeners:!0,openExternal:!0})}};e.TerminalUrlLinkOpener=g,e.TerminalUrlLinkOpener=g=fe([O(1,f.IOpenerService),O(2,o.IConfigurationService)],g)}),define(Q[4055],Y([1,0,7,110,4,18,10,2986,9,5,309,3630,3632,4054,3636,3638,3639,119,3880,158,423,14,126,3637]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLinkManager=void 0;let w=class extends b.DisposableStore{constructor(C,I,_,A,k,L,R,M){super(),this._xterm=C,this._processInfo=I,this._linkResolver=A,this._configurationService=k,this._instantiationService=L,this._logService=R,this._tunnelService=M,this._standardLinkProviders=new Map,this._linkProvidersDisposables=[],this._externalLinkProviders=[],this._openers=new Map;let N=!0;switch(this._configurationService.getValue(p.TERMINAL_CONFIG_SECTION).enableFileLinks){case"off":case!1:N=!1;break;case"notRemote":N=!this._processInfo.remoteAuthority;break}this._setupLinkDetector(s.TerminalUriLinkDetector.id,this._instantiationService.createInstance(s.TerminalUriLinkDetector,this._xterm,this._processInfo,this._linkResolver)),N&&(this._setupLinkDetector(g.TerminalMultiLineLinkDetector.id,this._instantiationService.createInstance(g.TerminalMultiLineLinkDetector,this._xterm,this._processInfo,this._linkResolver)),this._setupLinkDetector(i.TerminalLocalLinkDetector.id,this._instantiationService.createInstance(i.TerminalLocalLinkDetector,this._xterm,_,this._processInfo,this._linkResolver))),this._setupLinkDetector(o.TerminalWordLinkDetector.id,this.add(this._instantiationService.createInstance(o.TerminalWordLinkDetector,this._xterm)));const x=this._instantiationService.createInstance(r.TerminalLocalFileLinkOpener),F=this._instantiationService.createInstance(r.TerminalLocalFolderInWorkspaceLinkOpener);this._openers.set("LocalFile",x),this._openers.set("LocalFolderInWorkspace",F),this._openers.set("LocalFolderOutsideWorkspace",this._instantiationService.createInstance(r.TerminalLocalFolderOutsideWorkspaceLinkOpener)),this._openers.set("Search",this._instantiationService.createInstance(r.TerminalSearchLinkOpener,_,this._processInfo.initialCwd,x,F,()=>this._processInfo.os||D.OS)),this._openers.set("Url",this._instantiationService.createInstance(r.TerminalUrlLinkOpener,!!this._processInfo.remoteAuthority)),this._registerStandardLinkProviders();let V,W;this.add((0,b.toDisposable)(()=>{V?.dispose(),W?.dispose()})),this._xterm.options.linkHandler={activate:(z,B)=>{this._openers.get("Url")?.open({type:"Url",text:B,bufferRange:null,uri:T.URI.parse(B)})},hover:(z,B,K)=>{V?.dispose(),V=void 0,W?.dispose(),W=new l.RunOnceScheduler(()=>{const H=this._xterm._core,U={width:H._renderService.dimensions.css.cell.width,height:H._renderService.dimensions.css.cell.height},G={width:this._xterm.cols,height:this._xterm.rows};V=this._showHover({viewportRange:(0,c.convertBufferRangeToViewport)(K,this._xterm.buffer.active.viewportY),cellDimensions:U,terminalDimensions:G},this._getLinkHoverString(B,B),void 0,$=>this._xterm.options.linkHandler?.activate(z,$,K)),W?.dispose(),W=void 0},this._configurationService.getValue("workbench.hover.delay")),W.schedule()}}}_setupLinkDetector(C,I,_=!1){const A=this._instantiationService.createInstance(a.TerminalLinkDetectorAdapter,I);return A.onDidActivateLink(k=>{k.event?.preventDefault(),!(k.event&&!(k.event instanceof u.TerminalLinkQuickPickEvent)&&!this._isLinkActivationModifierDown(k.event))&&(k.link.activate?k.link.activate(k.link.text):this._openLink(k.link))}),A.onDidShowHover(k=>this._tooltipCallback(k.link,k.viewportRange,k.modifierDownCallback,k.modifierUpCallback)),_||this._standardLinkProviders.set(C,A),A}async _openLink(C){this._logService.debug("Opening link",C);const I=this._openers.get(C.type);if(!I)throw new Error(`No matching opener for link type "${C.type}"`);await I.open(C)}async openRecentLink(C){let I,_=this._xterm.buffer.active.length;for(;(!I||I.length===0)&&_>=this._xterm.buffer.active.viewportY;)I=await this._getLinksForType(_,C),_--;if(!I||I.length<1)return;const A=new u.TerminalLinkQuickPickEvent(t.EventType.CLICK);return I[0].activate(A,I[0].text),I[0]}async getLinks(){const C=[];for(let R=this._xterm.buffer.active.viewportY+this._xterm.rows-1;R>=this._xterm.buffer.active.viewportY;R--)C.push(this._getLinksForLine(R));const I=await Promise.all(C),_={wordLinks:[],webLinks:[],fileLinks:[],folderLinks:[]};for(const R of I)if(R){const{wordLinks:M,webLinks:N,fileLinks:P,folderLinks:x}=R;M?.length&&_.wordLinks.push(...M.reverse()),N?.length&&_.webLinks.push(...N.reverse()),P?.length&&_.fileLinks.push(...P.reverse()),x?.length&&_.folderLinks.push(...x.reverse())}const A=[];for(let R=this._xterm.buffer.active.viewportY-1;R>=0;R--)A.push(this._getLinksForLine(R));const k=[];for(let R=this._xterm.buffer.active.length-1;R>=this._xterm.buffer.active.viewportY+this._xterm.rows;R--)k.push(this._getLinksForLine(R));const L=Promise.all(A).then(async R=>{const M=await Promise.all(k),N={wordLinks:[..._.wordLinks],webLinks:[..._.webLinks],fileLinks:[..._.fileLinks],folderLinks:[..._.folderLinks]};for(const P of[...M,...R])if(P){const{wordLinks:x,webLinks:F,fileLinks:V,folderLinks:W}=P;x?.length&&N.wordLinks.push(...x.reverse()),F?.length&&N.webLinks.push(...F.reverse()),V?.length&&N.fileLinks.push(...V.reverse()),W?.length&&N.folderLinks.push(...W.reverse())}return N});return{viewport:_,all:L}}async _getLinksForLine(C){const I=await this._getLinksForType(C,"word"),_=await this._getLinksForType(C,"url"),A=await this._getLinksForType(C,"localFile"),k=await this._getLinksForType(C,"localFolder"),L=new Set;let R;if(I){R=[];for(const M of I)!L.has(M.text)&&M.text.length>1&&(R.push(M),L.add(M.text))}return{wordLinks:R,webLinks:_,fileLinks:A,folderLinks:k}}async _getLinksForType(C,I){switch(I){case"word":return await new Promise(_=>this._standardLinkProviders.get(o.TerminalWordLinkDetector.id)?.provideLinks(C,_));case"url":return await new Promise(_=>this._standardLinkProviders.get(s.TerminalUriLinkDetector.id)?.provideLinks(C,_));case"localFile":return(await new Promise(A=>this._standardLinkProviders.get(i.TerminalLocalLinkDetector.id)?.provideLinks(C,A)))?.filter(A=>A.type==="LocalFile");case"localFolder":return(await new Promise(A=>this._standardLinkProviders.get(i.TerminalLocalLinkDetector.id)?.provideLinks(C,A)))?.filter(A=>A.type==="LocalFolderInWorkspace")}}_tooltipCallback(C,I,_,A){if(!this._widgetManager)return;const k=this._xterm._core,L={width:k._renderService.dimensions.css.cell.width,height:k._renderService.dimensions.css.cell.height},R={width:this._xterm.cols,height:this._xterm.rows};this._showHover({viewportRange:I,cellDimensions:L,terminalDimensions:R,modifierDownCallback:_,modifierUpCallback:A},this._getLinkHoverString(C.text,C.label),C.actions,M=>C.activate(void 0,M),C)}_showHover(C,I,_,A,k){if(this._widgetManager){const L=this._instantiationService.createInstance(d.TerminalHover,C,I,_,A),R=this._widgetManager.attachWidget(L);return R&&k?.onInvalidated(()=>R.dispose()),R}}setWidgetManager(C){this._widgetManager=C}_clearLinkProviders(){(0,b.dispose)(this._linkProvidersDisposables),this._linkProvidersDisposables.length=0}_registerStandardLinkProviders(){for(const C of this._standardLinkProviders.values())this._linkProvidersDisposables.push(this._xterm.registerLinkProvider(C))}registerExternalLinkProvider(C){this._clearLinkProviders();const I=`extension-${this._externalLinkProviders.length}`,_=this._setupLinkDetector(I,new h.TerminalExternalLinkDetector(I,this._xterm,C),!0),A=this._xterm.registerLinkProvider(_);return this._externalLinkProviders.push(A),this._registerStandardLinkProviders(),A}_isLinkActivationModifierDown(C){return this._configurationService.getValue("editor").multiCursorModifier==="ctrlCmd"?!!C.altKey:D.isMacintosh?C.metaKey:C.ctrlKey}_getLinkHoverString(C,I){const _=this._configurationService.getValue("editor");let A="";_.multiCursorModifier==="ctrlCmd"?D.isMacintosh?A=f.localize(0,null):A=f.localize(1,null):D.isMacintosh?A=f.localize(2,null):A=f.localize(3,null);let k=f.localize(4,null);try{this._tunnelService.canTunnel(T.URI.parse(C))&&(k=f.localize(5,null))}catch{}const L=new y.MarkdownString("",!0);return I&&(I=L.appendText(I).value,L.value=""),C&&(C=L.appendText(C).value,L.value=""),I=I||k,C=C||I,/(\s| )/.test(C)&&(C=f.localize(6,null)),L.appendLink(C,I).appendMarkdown(` (${A})`)}};e.TerminalLinkManager=w,e.TerminalLinkManager=w=fe([O(4,v.IConfigurationService),O(5,m.IInstantiationService),O(6,n.ITerminalLogService),O(7,S.ITunnelService)],w)}),define(Q[1397],Y([1,0,26,10,31,15,5,386,225,39]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkGlobFileExists=e.checkActivateWorkspaceContainsExtension=void 0;const S=7e3;function h(s,o){const u=o.activationEvents;if(!u)return Promise.resolve(void 0);const d=[],p=[];for(const E of u)if(/^workspaceContains:/.test(E)){const C=E.substr(18);C.indexOf("*")>=0||C.indexOf("?")>=0||s.forceUsingSearch?p.push(C):d.push(C)}if(d.length===0&&p.length===0)return Promise.resolve(void 0);let c;const l=new Promise((E,C)=>{c=E}),n=E=>c({activationEvent:E}),g=Promise.all(d.map(E=>a(s,E,n))).then(()=>{}),w=r(s,o.identifier,p,n);return Promise.all([g,w]).then(()=>{c(void 0)}),l}e.checkActivateWorkspaceContainsExtension=h;async function a(s,o,u){for(const d of s.folders)if(await s.exists(t.joinPath(y.URI.revive(d),o))){u(`workspaceContains:${o}`);return}}async function r(s,o,u,d){if(u.length===0)return Promise.resolve(void 0);const p=new b.CancellationTokenSource,c=s.checkExists(s.folders,u,p.token),l=setTimeout(async()=>{p.cancel(),s.logService.info(`Not activating extension '${o.value}': Timed out while searching for 'workspaceContains' pattern ${u.join(",")}`)},S);let n=!1;try{n=await c}catch(g){D.isCancellationError(g)||D.onUnexpectedError(g)}p.dispose(),clearTimeout(l),n&&d(`workspaceContains:${u.join(",")}`)}function i(s,o,u,d){const p=s.get(T.IInstantiationService),c=s.get(v.ISearchService),n=p.createInstance(f.QueryBuilder).file(o.map(g=>(0,m.toWorkspaceFolder)(y.URI.revive(g))),{_reason:"checkExists",includePattern:u,exists:!0});return c.fileSearch(n,d).then(g=>!!g.limitHit,g=>D.isCancellationError(g)?!1:Promise.reject(g))}e.checkGlobFileExists=i}),define(Q[1398],Y([1,0,27,225]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addContextToEditorMatches=e.editorMatchesToTextSearchResults=void 0;function b(v,m,S){const h=v[0].range.startLineNumber,a=v[v.length-1].range.endLineNumber,r=[];for(let i=h;i<=a;i++)r.push(m.getLineContent(i));return new y.TextSearchMatch(r.join(` `)+` `,v.map(i=>new t.Range(i.range.startLineNumber-1,i.range.startColumn-1,i.range.endLineNumber-1,i.range.endColumn-1)),S)}function D(v,m,S){let h=-1;const a=[];let r=[];return v.forEach(i=>{i.range.startLineNumber!==h&&(r=[],a.push(r)),r.push(i),h=i.range.endLineNumber}),a.map(i=>b(i,m,S))}e.editorMatchesToTextSearchResults=D;function T(v,m,S){const h=[];let a=-1;for(let r=0;r<v.length;r++){const{start:i,end:s}=f(v[r]);if(typeof S.beforeContext=="number"&&S.beforeContext>0){const d=Math.max(a+1,i-S.beforeContext);for(let p=d;p<i;p++)h.push({text:m.getLineContent(p+1),lineNumber:p})}h.push(v[r]);const o=v[r+1],u=o?f(o).start:Number.MAX_VALUE;if(typeof S.afterContext=="number"&&S.afterContext>0){const d=Math.min(u-1,s+S.afterContext,m.getLineCount()-1);for(let p=s+1;p<=d;p++)h.push({text:m.getLineContent(p+1),lineNumber:p})}a=s}return h}e.addContextToEditorMatches=T;function f(v){const m=v.ranges,S=Array.isArray(m)?m[0].startLineNumber:m.startLineNumber,h=Array.isArray(m)?m[m.length-1].endLineNumber:m.endLineNumber;return{start:S,end:h}}}),define(Q[4056],Y([1,0,20,14,15,4,69,22,145,17,57,25,11,30,64,47,21,44,225,1398]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchService=void 0;let c=class extends D.Disposable{constructor(n,g,w,E,C,I,_){super(),this.modelService=n,this.editorService=g,this.telemetryService=w,this.logService=E,this.extensionService=C,this.fileService=I,this.uriIdentityService=_,this.fileSearchProviders=new Map,this.textSearchProviders=new Map,this.deferredFileSearchesByScheme=new Map,this.deferredTextSearchesByScheme=new Map,this.loggedSchemesMissingProviders=new Set}registerSearchResultProvider(n,g,w){let E,C;if(g===0)E=this.fileSearchProviders,C=this.deferredFileSearchesByScheme;else if(g===1)E=this.textSearchProviders,C=this.deferredTextSearchesByScheme;else throw new Error("Unknown SearchProviderType");return E.set(n,w),C.has(n)&&(C.get(n).complete(w),C.delete(n)),(0,D.toDisposable)(()=>{E.delete(n)})}async textSearch(n,g,w){const E=this.textSearchSplitSyncAsync(n,g,w),C=E.syncResults,I=await E.asyncResults;return{limitHit:I.limitHit||C.limitHit,results:[...I.results,...C.results],messages:[...I.messages,...C.messages]}}textSearchSplitSyncAsync(n,g,w,E,C){const I=this.getOpenEditorResults(n);return w&&t.coalesce([...I.results.values()]).filter(k=>!(E&&E.has(k.resource))).forEach(w),{syncResults:{results:t.coalesce([...I.results.values()]),limitHit:I.limitHit??!1,messages:[]},asyncResults:(async()=>{const k=await C??new T.ResourceSet,L=R=>{(0,d.isFileMatch)(R)?!I.results.has(R.resource)&&!k.has(R.resource)&&w&&w(R):w&&w(R),(0,d.isProgressMessage)(R)&&this.logService.debug("SearchService#search",R.message)};return await this.doSearch(n,g,L)})()}}fileSearch(n,g){return this.doSearch(n,g)}doSearch(n,g,w){this.logService.trace("SearchService#search",JSON.stringify(n));const E=this.getSchemesInQuery(n),C=[Promise.resolve(null)];E.forEach(_=>C.push(this.extensionService.activateByEvent(`onSearch:${_}`))),C.push(this.extensionService.activateByEvent("onSearch:file"));const I=(async()=>{if(await Promise.all(C),await this.extensionService.whenInstalledExtensionsRegistered(),g&&g.isCancellationRequested)return Promise.reject(new b.CancellationError);const _=L=>{g&&g.isCancellationRequested||w?.(L)},A=await Promise.all(n.folderQueries.map(L=>this.fileService.exists(L.folder)));n.folderQueries=n.folderQueries.filter((L,R)=>A[R]);let k=await this.searchWithProviders(n,_,g);return k=t.coalesce(k),k.length?{limitHit:k[0]&&k[0].limitHit,stats:k[0].stats,messages:t.coalesce(t.flatten(k.map(L=>L.messages))).filter(t.uniqueFilter(L=>L.type+L.text+L.trusted)),results:t.flatten(k.map(L=>L.results))}:{limitHit:!1,results:[],messages:[]}})();return new Promise((_,A)=>{g&&g.onCancellationRequested(()=>{A(new b.CancellationError)}),I.then(_,A)})}getSchemesInQuery(n){const g=new Set;return n.folderQueries?.forEach(w=>g.add(w.folder.scheme)),n.extraFileResources?.forEach(w=>g.add(w.scheme)),g}async waitForProvider(n,g){const w=n===1?this.deferredFileSearchesByScheme:this.deferredTextSearchesByScheme;if(w.has(g))return w.get(g).p;{const E=new y.DeferredPromise;return w.set(g,E),E.p}}async searchWithProviders(n,g,w){const E=v.StopWatch.create(!1),C=[],I=this.groupFolderQueriesByScheme(n),_=[...I.keys()].some(A=>n.type===1?this.fileSearchProviders.has(A):this.textSearchProviders.has(A));return await Promise.all([...I.keys()].map(async A=>{const k=I.get(A);let L=n.type===1?this.fileSearchProviders.get(A):this.textSearchProviders.get(A);if(!L)if(_){this.loggedSchemesMissingProviders.has(A)||(this.logService.warn(`No search provider registered for scheme: ${A}. Another scheme has a provider, not waiting for ${A}`),this.loggedSchemesMissingProviders.add(A));return}else this.loggedSchemesMissingProviders.has(A)||(this.logService.warn(`No search provider registered for scheme: ${A}, waiting`),this.loggedSchemesMissingProviders.add(A)),L=await this.waitForProvider(n.type,A);const R={...n,folderQueries:k};C.push(n.type===1?L.fileSearch(R,w):L.textSearch(R,g,w))})),Promise.all(C).then(A=>{const k=E.elapsed();return this.logService.trace(`SearchService#search: ${k}ms`),A.forEach(L=>{this.sendTelemetry(n,k,L)}),A},A=>{const k=E.elapsed();this.logService.trace(`SearchService#search: ${k}ms`);const L=(0,d.deserializeSearchError)(A);throw this.logService.trace(`SearchService#searchError: ${L.message}`),this.sendTelemetry(n,k,void 0,L),L})}groupFolderQueriesByScheme(n){const g=new Map;return n.folderQueries.forEach(w=>{const E=g.get(w.folder.scheme)||[];E.push(w),g.set(w.folder.scheme,E)}),g}sendTelemetry(n,g,w,E){const C=n.folderQueries.every(A=>A.folder.scheme===f.Schemas.file),I=n.folderQueries.every(A=>A.folder.scheme!==f.Schemas.file),_=C?f.Schemas.file:I?"other":"mixed";if(n.type===1&&w&&w.stats){const A=w.stats;if(A.fromCache){const k=A.detailStats;this.telemetryService.publicLog2("cachedSearchComplete",{reason:n._reason,resultCount:A.resultCount,workspaceFolderCount:n.folderQueries.length,endToEndTime:g,sortingTime:A.sortingTime,cacheWasResolved:k.cacheWasResolved,cacheLookupTime:k.cacheLookupTime,cacheFilterTime:k.cacheFilterTime,cacheEntryCount:k.cacheEntryCount,scheme:_})}else{const k=A.detailStats;this.telemetryService.publicLog2("searchComplete",{reason:n._reason,resultCount:A.resultCount,workspaceFolderCount:n.folderQueries.length,endToEndTime:g,sortingTime:A.sortingTime,fileWalkTime:k.fileWalkTime,directoriesWalked:k.directoriesWalked,filesWalked:k.filesWalked,cmdTime:k.cmdTime,cmdResultCount:k.cmdResultCount,scheme:_})}}else if(n.type===2){let A;E&&(A=E.code===d.SearchErrorCode.regexParseError?"regex":E.code===d.SearchErrorCode.unknownEncoding?"encoding":E.code===d.SearchErrorCode.globParseError?"glob":E.code===d.SearchErrorCode.invalidLiteral?"literal":E.code===d.SearchErrorCode.other?"other":E.code===d.SearchErrorCode.canceled?"canceled":"unknown"),this.telemetryService.publicLog2("textSearchComplete",{reason:n._reason,workspaceFolderCount:n.folderQueries.length,endToEndTime:g,scheme:_,error:A})}}getOpenEditorResults(n){const g=new T.ResourceMap(E=>this.uriIdentityService.extUri.getComparisonKey(E));let w=!1;if(n.type===2){const E=new T.ResourceMap;for(const I of this.editorService.editors){const _=s.EditorResourceAccessor.getCanonicalUri(I,{supportSideBySide:s.SideBySideEditor.PRIMARY}),A=s.EditorResourceAccessor.getOriginalUri(I,{supportSideBySide:s.SideBySideEditor.PRIMARY});_&&E.set(_,A??_)}this.modelService.getModels().forEach(I=>{const _=I.uri;if(!_||w)return;const A=E.get(_);if(!A||I.getLanguageId()==="search-result"&&!(n.includePattern&&n.includePattern["**/*.code-search"])||A.scheme!==f.Schemas.untitled&&!this.fileService.hasProvider(A)||A.scheme==="git"||!this.matches(A,n))return;const k=(0,m.isNumber)(n.maxResults)?n.maxResults+1:Number.MAX_SAFE_INTEGER;let L=I.findMatches(n.contentPattern.pattern,!1,!!n.contentPattern.isRegExp,!!n.contentPattern.isCaseSensitive,n.contentPattern.isWordMatch?n.contentPattern.wordSeparators:null,!1,k);if(L.length){k&&L.length>=k&&(w=!0,L=L.slice(0,k-1));const R=new d.FileMatch(A);g.set(A,R);const M=(0,p.editorMatchesToTextSearchResults)(L,I,n.previewOptions);R.results=(0,p.addContextToEditorMatches)(M,I,n)}else g.set(A,null)})}return{results:g,limitHit:w}}matches(n,g){return(0,d.pathIncludedInQuery)(g,n.fsPath)}async clearCache(n){const g=Array.from(this.fileSearchProviders.values()).map(w=>w&&w.clearCache(n));await Promise.all(g)}};e.SearchService=c,e.SearchService=c=fe([O(0,S.IModelService),O(1,o.IEditorService),O(2,r.ITelemetryService),O(3,a.ILogService),O(4,u.IExtensionService),O(5,h.IFileService),O(6,i.IUriIdentityService)],c)}),define(Q[4057],Y([1,0,35,225,4056]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSingleton)(y.ISearchService,b.SearchService,1)}),define(Q[4058],Y([1,0,202,18,63,3102,49,690,91,35,11,23,41,602,24,335]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeSecretStorageService=void 0;let o=class extends r.BaseSecretStorageService{constructor(d,p,c,l,n,g,w,E){super(!!n.disableKeytar,g,w,E),this._notificationService=d,this._dialogService=p,this._openerService=c,this._jsonEditingService=l,this._environmentService=n,this.notifyOfNoEncryptionOnce=(0,t.once)(()=>this.notifyOfNoEncryption())}set(d,p){return this._sequencer.queue(d,async()=>{await this.resolvedStorageService,this.type!=="persisted"&&!this._environmentService.disableKeytar&&(this._logService.trace("[NativeSecretStorageService] Notifying user that secrets are not being stored on disk."),await this.notifyOfNoEncryptionOnce())}),super.set(d,p)}async notifyOfNoEncryption(){const d=[],p={label:(0,D.localize)(0,null),run:()=>this._openerService.open("https://go.microsoft.com/fwlink/?linkid=2239490"),keepOpen:!0};d.push(p);let c=(0,D.localize)(1,null);if(!y.isLinux){this._notificationService.prompt(b.default.Error,c,d);return}const l=await this._encryptionService.getKeyStorageProvider();if(l==="basic_text"){const n=(0,D.localize)(2,null),g={label:(0,D.localize)(3,null),run:async()=>{await this._encryptionService.setUsePlainTextEncryption(),await this._jsonEditingService.write(this._environmentService.argvResource,[{path:["password-store"],value:"basic"}],!0),this.reinitialize()}};d.unshift(g),await this._dialogService.prompt({type:"error",buttons:d,message:c,detail:n});return}(0,f.isGnome)(l)?c=(0,D.localize)(4,null):(0,f.isKwallet)(l)&&(c=(0,D.localize)(5,null)),this._notificationService.prompt(b.default.Error,c,d)}};e.NativeSecretStorageService=o,e.NativeSecretStorageService=o=fe([O(0,h.INotificationService),O(1,T.IDialogService),O(2,a.IOpenerService),O(3,s.IJSONEditingService),O(4,v.INativeEnvironmentService),O(5,i.IStorageService),O(6,f.IEncryptionService),O(7,S.ILogService)],o),(0,m.registerSingleton)(r.ISecretStorageService,o,1)}),define(Q[4059],Y([1,0,835,250,11,4,3274,173,14,674]),function(q,e,t,y,b,D,T,f,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedProcessService=void 0;let S=class extends D.Disposable{constructor(a,r){super(),this.windowId=a,this.logService=r,this.restoredBarrier=new v.Barrier,this.withSharedProcessConnection=this.connect()}async connect(){this.logService.trace("Renderer->SharedProcess#connect"),await Promise.race([this.restoredBarrier.wait(),(0,v.timeout)(2e3)]),(0,f.mark)("code/willConnectSharedProcess"),this.logService.trace("Renderer->SharedProcess#connect: before acquirePort");const a=await(0,m.acquirePort)(T.SharedProcessChannelConnection.request,T.SharedProcessChannelConnection.response);return(0,f.mark)("code/didConnectSharedProcess"),this.logService.trace("Renderer->SharedProcess#connect: connection established"),this._register(new t.Client(a,`window:${this.windowId}`))}notifyRestored(){this.restoredBarrier.isOpen()||this.restoredBarrier.open()}getChannel(a){return(0,y.getDelayedChannel)(this.withSharedProcessConnection.then(r=>r.getChannel(a)))}registerChannel(a,r){this.withSharedProcessConnection.then(i=>i.registerChannel(a,r))}async createRawConnection(){await this.withSharedProcessConnection,this.logService.trace("Renderer->SharedProcess#createRawConnection: before acquirePort");const a=await(0,m.acquirePort)(T.SharedProcessRawConnection.request,T.SharedProcessRawConnection.response);return this.logService.trace("Renderer->SharedProcess#createRawConnection: connection established"),a}};e.SharedProcessService=S,e.SharedProcessService=S=fe([O(1,b.ILogService)],S)}),define(Q[177],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatusbarEntryKinds=e.ShowTooltipCommand=e.isStatusbarEntryPriority=e.isStatusbarEntryLocation=e.StatusbarAlignment=e.IStatusbarService=void 0,e.IStatusbarService=(0,t.createDecorator)("statusbarService");var y;(function(T){T[T.LEFT=0]="LEFT",T[T.RIGHT=1]="RIGHT"})(y||(e.StatusbarAlignment=y={}));function b(T){const f=T;return typeof f?.id=="string"&&typeof f.alignment=="number"}e.isStatusbarEntryLocation=b;function D(T){const f=T;return(typeof f?.primary=="number"||b(f?.primary))&&typeof f?.secondary=="number"}e.isStatusbarEntryPriority=D,e.ShowTooltipCommand={id:"statusBar.entry.showTooltip",title:""},e.StatusbarEntryKinds=["standard","warning","error","prominent","remote","offline"]}),define(Q[4060],Y([1,0,4,21,58,172,373,177,2001,241,11]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionStatusbarItem=void 0;let a=class extends t.Disposable{static{h=this}static{this.ID="status.connection.status"}constructor(i,s,o,u,d,p){super(),this._statusbarService=i,this._connectionManagementService=s,this._editorService=o,this._objectExplorerService=u,this._queryModelService=d,this._logService=p,this.name=(0,v.localize)(0,null),this.statusItem=this._register(this._statusbarService.addEntry({name:this.name,text:"",ariaLabel:""},h.ID,1,100)),this.hide(),this._register(this._connectionManagementService.onConnect(()=>this._updateStatus())),this._register(this._connectionManagementService.onConnectionChanged(()=>this._updateStatus())),this._register(this._connectionManagementService.onDisconnect(()=>this._updateStatus())),this._register(this._editorService.onDidActiveEditorChange(()=>this._updateStatus())),this._register(this._objectExplorerService.onSelectionOrFocusChange(()=>this._updateStatus())),this._register(this._queryModelService.onConnectionIdUpdated(c=>this._refreshServerConnIdForQuery(c.uri,c.connId)))}hide(){this._statusbarService.updateEntryVisibility(h.ID,!1)}show(){this._statusbarService.updateEntryVisibility(h.ID,!0)}_updateStatus(){let i=T.getCurrentGlobalConnection(this._objectExplorerService,this._connectionManagementService,this._editorService,this._logService),s,o=this.getCurrentActiveEditorInfo();i?(o&&o.connectionProfile.id===i.id&&(s=o.serverConnectionId),this._setConnectionText(i,s),this.show()):this.hide()}_refreshServerConnIdForQuery(i,s){let o=this._connectionManagementService.updateServerConnectionId(i,s);if(o){let u=this._connectionManagementService.getConnectionInfo(i),d=this.getCurrentActiveEditorInfo();d&&d.ownerUri===u.ownerUri&&o&&this._updateStatus()}}getCurrentActiveEditorInfo(){if(this._editorService?.activeEditor?.resource)return this._connectionManagementService.getConnectionInfo(this._editorService.activeEditor.resource.toString())}_setConnectionText(i,s){let o=i.serverName;o&&(i.databaseName&&i.databaseName!==""?o=o+" : "+i.databaseName:o=o+" : <default>");let u=(0,v.localize)(1,null,i.serverName,i.databaseName?i.databaseName:"<default>");if(i.userName&&i.userName!==""&&(u+=` `+(0,v.localize)(2,null,i.userName)),s){o+=" ("+s+")";const d=i.serverCapabilities.serverConnectionIdName||"PID";u+=` `+d+": "+s}this.statusItem.update({name:this.name,text:o,ariaLabel:o,tooltip:u})}};e.ConnectionStatusbarItem=a,e.ConnectionStatusbarItem=a=h=fe([O(0,f.IStatusbarService),O(1,b.IConnectionManagementService),O(2,y.IEditorService),O(3,D.IObjectExplorerService),O(4,m.IQueryModelService),O(5,S.ILogService)],a)}),define(Q[4061],Y([1,0,4,21,123,2131,58,63,23,43,117,177,13,1643]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.ChangeFlavorAction=e.SqlFlavorStatusbarItem=void 0;class i{constructor(d,p){this.providerId=d,this._providerDisplayName=p}get label(){if(this._providerDisplayName)return this._providerDisplayName;if(!this.providerId)return i.getDefaultLabel();switch(this.providerId){case S.mssqlProviderName:return"MSSQL";default:return this.providerId}}static getDefaultLabel(){return D.localize(0,null)}}let s=class extends t.Disposable{static{r=this}static{this.ID="status.query.flavor"}constructor(d,p,c){super(),this.statusbarService=d,this.editorService=p,this.connectionManagementService=c,this.name=D.localize(1,null),this._sqlStatusEditors={},this.statusItem=this._register(this.statusbarService.addEntry({name:this.name,text:D.localize(2,null),ariaLabel:D.localize(3,null),command:"sql.action.editor.changeProvider"},r.ID,1,100)),this.hide(),this._register(this.connectionManagementService.onLanguageFlavorChanged(l=>this._onFlavorChanged(l))),this._register(this.editorService.onDidVisibleEditorsChange(()=>this._onEditorsChanged())),this._register(this.editorService.onDidCloseEditor(l=>this._onEditorClosed(l)))}hide(){this.statusbarService.updateEntryVisibility(r.ID,!1)}show(){this.statusbarService.updateEntryVisibility(r.ID,!0)}_onEditorClosed(d){let p=d.editor.resource?.toString();if(p&&p in this._sqlStatusEditors){let c=this.editorService.activeEditorPane;if(c){let l=c.input.resource?.toString();p===l&&this.hide()}}}_onEditorsChanged(){let d=this.editorService.activeEditorPane;if(d){let p=d.input.resource?.toString();p?this._showStatus(p):this.hide()}else this.hide()}_onFlavorChanged(d){d&&this._updateStatus(d.uri,new i(d.flavor))}_updateStatus(d,p){d&&(this._sqlStatusEditors[d]=p,this._showStatus(d))}_showStatus(d){let p=this.editorService.activeEditorPane;if(p){let c=p.input.resource?.toString();if(d===c){let l=this._sqlStatusEditors[d];l?this.updateFlavorElement(l.label):this.updateFlavorElement(i.getDefaultLabel()),this.show()}}}updateFlavorElement(d){const p={name:this.name,text:d,ariaLabel:d,command:"sql.action.editor.changeProvider"};this.statusItem.update(p)}};e.SqlFlavorStatusbarItem=s,e.SqlFlavorStatusbarItem=s=r=fe([O(0,h.IStatusbarService),O(1,y.IEditorService),O(2,T.IConnectionManagementService)],s);class o extends a.Action2{static{this.ID="sql.action.editor.changeProvider"}static{this.LABEL_ORG="Change SQL Engine Provider"}static{this.LABEL=D.localize(4,null)}constructor(){super({id:o.ID,title:{value:o.LABEL,original:o.LABEL_ORG},f1:!0})}async run(d){const p=d.get(y.IEditorService),c=d.get(m.IQuickInputService),l=d.get(v.INotificationService),n=d.get(T.IConnectionManagementService);let g=p.activeEditorPane,w=g?.input.resource?.toString(!0);if(n.isConnected(w)){let _=n.getProviderIdFromUri(w);return this._showMessage(l,f.default.Info,D.localize(5,null,_))}if(!(0,b.getCodeEditor)(g.getControl()))return this._showMessage(l,f.default.Info,D.localize(6,null));let C=n.providerNameToDisplayNameMap,I=Object.keys(n.getUniqueConnectionProvidersByNameMap(C)).map(_=>new i(_));return c.pick(I,{placeHolder:D.localize(7,null)}).then(_=>{if(_){let A=p.activeEditorPane.getControl();(0,b.getCodeEditor)(A)&&w&&n.doChangeLanguageFlavor(w,"sql",_.providerId)}})}_showMessage(d,p,c){return d.notify({severity:p,message:c}),Promise.resolve(void 0)}}e.ChangeFlavorAction=o}),define(Q[4062],Y([1,0,184,374,130,241,14,6,4,2139,21,177]),function(q,e,t,y,b,D,T,f,v,m,S,h){"use strict";var a,r,i,s;Object.defineProperty(e,"__esModule",{value:!0}),e.QueryResultSelectionSummaryStatusBarContribution=e.QueryStatusStatusBarContributions=e.RowCountStatusBarContributions=e.TimeElapsedStatusBarContributions=void 0;let o=class extends v.Disposable{static{a=this}static{this.ID="status.query.timeElapsed"}constructor(l,n,g){super(),this.statusbarService=l,this.editorService=n,this.queryModelService=g,this.intervalTimer=new T.IntervalTimer,this.disposable=this._register(new v.DisposableStore),this.name=(0,m.localize)(0,null),this.statusItem=this._register(this.statusbarService.addEntry({name:this.name,text:"",ariaLabel:""},a.ID,1,100)),this._register(n.onDidActiveEditorChange(this.update,this)),this.update()}hide(){this.statusbarService.updateEntryVisibility(a.ID,!1)}show(){this.statusbarService.updateEntryVisibility(a.ID,!0)}update(){this.intervalTimer.cancel(),this.disposable.clear(),this.hide();const l=this.editorService.activeEditor;if(l&&l instanceof y.QueryEditorInput&&l.uri){const n=l.uri,g=this.queryModelService.getQueryRunner(n);g?((g.hasCompleted||g.isExecuting)&&this._displayValue(g),this.disposable.add(g.onQueryStart(w=>{this._displayValue(g)})),this.disposable.add(g.onQueryEnd(w=>{this._displayValue(g)}))):(this.disposable.add(this.queryModelService.onRunQueryStart(w=>{w===n&&this._displayValue(this.queryModelService.getQueryRunner(n))})),this.disposable.add(this.queryModelService.onRunQueryComplete(w=>{w===n&&this._displayValue(this.queryModelService.getQueryRunner(n))})))}}_displayValue(l){if(this.intervalTimer.cancel(),l.isExecuting){this.intervalTimer.cancelAndSet(()=>{const w=l.queryStartTime?Date.now()-l.queryStartTime.getTime():0,E=(0,t.parseNumAsTimeString)(w,!1);this.statusItem.update({name:this.name,text:E,ariaLabel:E})},1e3);const n=l.queryStartTime?Date.now()-l.queryStartTime.getTime():0,g=(0,t.parseNumAsTimeString)(n,!1);this.statusItem.update({name:this.name,text:g,ariaLabel:g})}else{const n=l.queryStartTime&&l.queryEndTime?l.queryEndTime.getTime()-l.queryStartTime.getTime():0,g=(0,t.parseNumAsTimeString)(n,!1);this.statusItem.update({name:this.name,text:g,ariaLabel:g})}this.show()}};e.TimeElapsedStatusBarContributions=o,e.TimeElapsedStatusBarContributions=o=a=fe([O(0,h.IStatusbarService),O(1,S.IEditorService),O(2,D.IQueryModelService)],o);let u=class extends v.Disposable{static{r=this}static{this.ID="status.query.rowCount"}constructor(l,n,g){super(),this.statusbarService=l,this.editorService=n,this.queryModelService=g,this.disposable=this._register(new v.DisposableStore),this.name=(0,m.localize)(1,null),this.statusItem=this._register(this.statusbarService.addEntry({name:this.name,text:"",ariaLabel:""},r.ID,1,100)),this._register(n.onDidActiveEditorChange(this.update,this)),this.update()}hide(){this.statusbarService.updateEntryVisibility(r.ID,!1)}show(){this.statusbarService.updateEntryVisibility(r.ID,!0)}update(){this.disposable.clear(),this.hide();const l=this.editorService.activeEditor;if(l&&l instanceof y.QueryEditorInput&&l.uri){const n=l.uri,g=this.queryModelService.getQueryRunner(n);g?((g.hasCompleted||g.isExecuting)&&this._displayValue(g),this.disposable.add(g.onQueryStart(w=>{this._displayValue(g)})),this.disposable.add(g.onResultSetUpdate(w=>{this._displayValue(g)})),this.disposable.add(g.onQueryEnd(w=>{this._displayValue(g)}))):(this.disposable.add(this.queryModelService.onRunQueryStart(w=>{w===n&&this._displayValue(this.queryModelService.getQueryRunner(n))})),this.disposable.add(this.queryModelService.onRunQueryUpdate(w=>{w===n&&this._displayValue(this.queryModelService.getQueryRunner(n))})),this.disposable.add(this.queryModelService.onRunQueryComplete(w=>{w===n&&this._displayValue(this.queryModelService.getQueryRunner(n))})))}}_displayValue(l){const n=l.batchSets.reduce((w,E)=>{const C=E.resultSetSummaries?.reduce((I,_)=>I+_.rowCount,0)??0;return w+C},0),g=(0,m.localize)(2,null,n.toLocaleString());this.statusItem.update({name:this.name,text:g,ariaLabel:g}),this.show()}};e.RowCountStatusBarContributions=u,e.RowCountStatusBarContributions=u=r=fe([O(0,h.IStatusbarService),O(1,S.IEditorService),O(2,D.IQueryModelService)],u);let d=class extends v.Disposable{static{i=this}static{this.ID="status.query.status"}constructor(l,n,g){super(),this.statusbarService=l,this.editorService=n,this.queryModelService=g,this._register(this.statusbarService.addEntry({name:(0,m.localize)(3,null),text:(0,m.localize)(4,null),ariaLabel:(0,m.localize)(5,null)},i.ID,1,100)),this._register(f.Event.filter(this.queryModelService.onRunQueryStart,w=>w===this.visisbleUri)(this.update,this)),this._register(f.Event.filter(this.queryModelService.onRunQueryComplete,w=>w===this.visisbleUri)(this.update,this)),this._register(this.editorService.onDidActiveEditorChange(this.update,this)),this.update()}update(){this.hide(),this.visisbleUri=void 0;const l=this.editorService.activeEditor;if(l&&l instanceof y.QueryEditorInput&&l.uri){this.visisbleUri=l.uri;const n=this.queryModelService.getQueryRunner(this.visisbleUri);n&&n.isExecuting&&this.show()}}hide(){this.statusbarService.updateEntryVisibility(i.ID,!1)}show(){this.statusbarService.updateEntryVisibility(i.ID,!0)}};e.QueryStatusStatusBarContributions=d,e.QueryStatusStatusBarContributions=d=i=fe([O(0,h.IStatusbarService),O(1,S.IEditorService),O(2,D.IQueryModelService)],d);let p=class extends v.Disposable{static{s=this}static{this.ID="status.query.selection-summary"}constructor(l,n,g,w){super(),this.statusbarService=l,this.name=(0,m.localize)(6,null),this.statusItem=this._register(this.statusbarService.addEntry({name:this.name,text:"",ariaLabel:""},s.ID,1,100)),this._register(n.onDidActiveEditorChange(()=>{this.hide()},this)),this._register(g.onRunQueryStart(()=>{this.hide()})),this._register(w.onCodeCellExecutionStart(()=>{this.hide()})),this._register(g.onCellSelectionChanged(E=>{this.onCellSelectionChanged(E)}))}hide(){this.statusbarService.updateEntryVisibility(s.ID,!1)}show(){this.statusbarService.updateEntryVisibility(s.ID,!0)}onCellSelectionChanged(l){if(!l||l.length<=1){this.hide();return}const n=l.map(_=>_.invariantCultureDisplayValue||_.displayValue),g=new Set(n),w=l.map(_=>_.invariantCultureDisplayValue||_.displayValue).filter(_=>!Number.isNaN(Number(_))).map(_=>Number(_)),E=l.filter(_=>_.isNull).length;let C,I;if(w.length>=2){const _=w.reduce((L,R)=>L+R),A=w.reduce((L,R)=>Math.min(L,R)),k=w.reduce((L,R)=>Math.max(L,R));C=(0,m.localize)(7,null,Number((_/w.length).toFixed(3)),l.length,_),I=(0,m.localize)(8,null,Number((_/w.length).toFixed(3)),l.length,g.size,k,A,E,_)}else C=C=(0,m.localize)(9,null,l.length,g.size,E);this.statusItem.update({name:this.name,text:C,ariaLabel:C,tooltip:I,command:I?h.ShowTooltipCommand:void 0}),this.show()}};e.QueryResultSelectionSummaryStatusBarContribution=p,e.QueryResultSelectionSummaryStatusBarContribution=p=s=fe([O(0,h.IStatusbarService),O(1,S.IEditorService),O(2,D.IQueryModelService),O(3,b.INotebookService)],p)}),define(Q[1399],Y([1,0,4,2515,5,44,121,177,66,257,122,6,35,83,112,732,84]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatusBarItemsExtensionPoint=e.StatusBarUpdateKind=e.IExtensionStatusBarItemService=void 0,e.IExtensionStatusBarItemService=(0,b.createDecorator)("IExtensionStatusBarItemService");var u;(function(w){w[w.DidDefine=0]="DidDefine",w[w.DidUpdate=1]="DidUpdate"})(u||(e.StatusBarUpdateKind=u={}));let d=class{constructor(E){this._statusbarService=E,this._entries=new Map,this._onDidChange=new h.Emitter,this.onDidChange=this._onDidChange.event}dispose(){this._entries.forEach(E=>E.accessor.dispose()),this._entries.clear(),this._onDidChange.dispose()}setOrUpdateEntry(E,C,I,_,A,k,L,R,M,N,P,x){let F,V;if(x)F=x.label,V=x.role;else if(F=(0,m.getCodiconAriaLabel)(A),k){const H=typeof k=="string"?k:k.value;F+=`, ${H}`}let W;switch(M?.id){case o.STATUS_BAR_ERROR_ITEM_BACKGROUND:case o.STATUS_BAR_WARNING_ITEM_BACKGROUND:W=M.id===o.STATUS_BAR_ERROR_ITEM_BACKGROUND?"error":"warning",R=void 0,M=void 0}const z={name:_,text:A,tooltip:k,command:L,color:R,backgroundColor:M,ariaLabel:F,role:V,kind:W};typeof P>"u"&&(P=0);let B=N?0:1;const K=this._entries.get(E);if(K&&(B=K.alignment,P=K.priority),K)return K.accessor.update(z),K.entry=z,1;{let H;typeof I=="string"?H={primary:P,secondary:(0,S.hash)(I)}:H=P;const U=this._statusbarService.addEntry(z,C,B,H);return this._entries.set(E,{accessor:U,entry:z,alignment:B,priority:P,disposable:(0,t.toDisposable)(()=>{U.dispose(),this._entries.delete(E),this._onDidChange.fire({removed:E})})}),this._onDidChange.fire({added:[E,{entry:z,alignment:B,priority:P}]}),0}}unsetEntry(E){this._entries.get(E)?.disposable.dispose(),this._entries.delete(E)}getEntries(){return this._entries.entries()}};d=fe([O(0,f.IStatusbarService)],d),(0,a.registerSingleton)(e.IExtensionStatusBarItemService,d,1);function p(w){const E=w;return typeof E.id=="string"&&E.id.length>0&&typeof E.name=="string"&&typeof E.text=="string"&&(E.alignment==="left"||E.alignment==="right")&&(E.command===void 0||typeof E.command=="string")&&(E.tooltip===void 0||typeof E.tooltip=="string")&&(E.priority===void 0||typeof E.priority=="number")&&(E.accessibilityInformation===void 0||(0,v.isAccessibilityInformation)(E.accessibilityInformation))}const c={type:"object",required:["id","text","alignment","name"],properties:{id:{type:"string",markdownDescription:(0,y.localize)(0,null)},name:{type:"string",description:(0,y.localize)(1,null)},text:{type:"string",description:(0,y.localize)(2,null)},tooltip:{type:"string",description:(0,y.localize)(3,null)},command:{type:"string",description:(0,y.localize)(4,null)},alignment:{type:"string",enum:["left","right"],description:(0,y.localize)(5,null)},priority:{type:"number",description:(0,y.localize)(6,null)},accessibilityInformation:{type:"object",description:(0,y.localize)(7,null),properties:{role:{type:"string",description:(0,y.localize)(8,null)},label:{type:"string",description:(0,y.localize)(9,null)}}}}},l={description:(0,y.localize)(10,null),oneOf:[c,{type:"array",items:c}]},n=T.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"statusBarItems",jsonSchema:l});let g=class{constructor(E){const C=new t.DisposableStore;n.setHandler(I=>{C.clear();for(const _ of I){if(!(0,D.isProposedApiEnabled)(_.description,"contribStatusBarItems")){_.collector.error(`The ${n.name} is proposed API`);continue}const{value:A,collector:k}=_;for(const L of r.Iterable.wrap(A)){if(!p(L)){k.error((0,y.localize)(11,null));continue}const R=(0,s.asStatusBarItemIdentifier)(_.description.identifier,L.id);E.setOrUpdateEntry(R,R,i.ExtensionIdentifier.toKey(_.description.identifier),L.name??_.description.displayName??_.description.name,L.text,L.tooltip,L.command?{id:L.command,title:L.name}:void 0,void 0,void 0,L.alignment==="left",L.priority,L.accessibilityInformation)===0&&C.add((0,t.toDisposable)(()=>E.unsetEntry(R)))}}})}};e.StatusBarItemsExtensionPoint=g,e.StatusBarItemsExtensionPoint=g=fe([O(0,e.IExtensionStatusBarItemService)],g)}),define(Q[4063],Y([1,0,53,60,4,1399]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadStatusBar=void 0;let T=class{constructor(v,m){this.statusbarService=m,this._store=new b.DisposableStore;const S=v.getProxy(t.ExtHostContext.ExtHostStatusBar),h=[];for(const[r,i]of m.getEntries())h.push(a(r,i));S.$acceptStaticEntries(h),this._store.add(m.onDidChange(r=>{r.added&&S.$acceptStaticEntries([a(r.added[0],r.added[1])])}));function a(r,i){return{entryId:r,name:i.entry.name,text:i.entry.text,tooltip:i.entry.tooltip,command:typeof i.entry.command=="string"?i.entry.command:typeof i.entry.command=="object"?i.entry.command.id:void 0,priority:i.priority,alignLeft:i.alignment===0,accessibilityInformation:i.entry.ariaLabel?{label:i.entry.ariaLabel,role:i.entry.role}:void 0}}}dispose(){this._store.dispose()}$setEntry(v,m,S,h,a,r,i,s,o,u,d,p){this.statusbarService.setOrUpdateEntry(v,m,S,h,a,r,i,s,o,u,d,p)===0&&this._store.add((0,b.toDisposable)(()=>this.statusbarService.unsetEntry(v)))}$disposeEntry(v){this.statusbarService.unsetEntry(v)}};e.MainThreadStatusBar=T,e.MainThreadStatusBar=T=fe([(0,y.extHostNamedCustomer)(t.MainContext.MainThreadStatusBar),O(1,D.IExtensionStatusBarItemService)],T)}),define(Q[4064],Y([1,0,4,6,63,2539,66,28,9,23,177]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityStatus=void 0;let h=class extends t.Disposable{constructor(r,i,s,o){super(),this.configurationService=r,this.notificationService=i,this._accessibilityService=s,this.statusbarService=o,this.screenReaderNotification=null,this.promptedScreenReader=!1,this.screenReaderModeElement=this._register(new t.MutableDisposable),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this.onScreenReaderModeChange())),this._register(r.onDidChangeConfiguration(u=>{u.affectsConfiguration("editor.accessibilitySupport")&&this.onScreenReaderModeChange()})),f.CommandsRegistry.registerCommand({id:"showEditorScreenReaderNotification",handler:()=>this.showScreenReaderNotification()}),this.updateScreenReaderModeElement(this._accessibilityService.isScreenReaderOptimized())}showScreenReaderNotification(){this.screenReaderNotification=this.notificationService.prompt(b.default.Info,(0,D.localize)(0,null),[{label:(0,D.localize)(1,null),run:()=>{this.configurationService.updateValue("editor.accessibilitySupport","on",2)}},{label:(0,D.localize)(2,null),run:()=>{this.configurationService.updateValue("editor.accessibilitySupport","off",2)}}],{sticky:!0,priority:m.NotificationPriority.URGENT}),y.Event.once(this.screenReaderNotification.onDidClose)(()=>this.screenReaderNotification=null)}updateScreenReaderModeElement(r){if(r){if(!this.screenReaderModeElement.value){const i=(0,D.localize)(3,null);this.screenReaderModeElement.value=this.statusbarService.addEntry({name:(0,D.localize)(4,null),text:i,ariaLabel:i,command:"showEditorScreenReaderNotification",kind:"prominent"},"status.editor.screenReaderMode",1,100.6)}}else this.screenReaderModeElement.clear()}onScreenReaderModeChange(){this._accessibilityService.isScreenReaderOptimized()&&this.configurationService.getValue("editor.accessibilitySupport")==="auto"&&(this.promptedScreenReader||(this.promptedScreenReader=!0,setTimeout(()=>this.showScreenReaderNotification(),100))),this.screenReaderNotification&&this.screenReaderNotification.close(),this.updateScreenReaderModeElement(this._accessibilityService.isScreenReaderOptimized())}};e.AccessibilityStatus=h,e.AccessibilityStatus=h=fe([O(0,v.IConfigurationService),O(1,m.INotificationService),O(2,T.IAccessibilityService),O(3,S.IStatusbarService)],h)}),define(Q[4065],Y([1,0,177,4,522,2567,23]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsStatus=void 0;let f=class extends y.Disposable{constructor(m,S,h){super(),this.model=m,this.statusbarService=S,this.notificationService=h,this.newNotificationsCount=0,this.isNotificationsCenterVisible=!1,this.isNotificationsToastsVisible=!1,this.updateNotificationsCenterStatusItem(),m.statusMessage&&this.doSetStatusMessage(m.statusMessage),this.registerListeners()}registerListeners(){this._register(this.model.onDidChangeNotification(m=>this.onDidChangeNotification(m))),this._register(this.model.onDidChangeStatusMessage(m=>this.onDidChangeStatusMessage(m))),this._register(this.notificationService.onDidChangeDoNotDisturbMode(()=>this.updateNotificationsCenterStatusItem()))}onDidChangeNotification(m){this.isNotificationsCenterVisible||(m.kind===0?this.newNotificationsCount++:m.kind===3&&this.newNotificationsCount>0&&this.newNotificationsCount--),this.updateNotificationsCenterStatusItem()}updateNotificationsCenterStatusItem(){let m=0;if(!this.isNotificationsCenterVisible&&!this.isNotificationsToastsVisible)for(const h of this.model.notifications)h.hasProgress&&m++;let S={name:(0,D.localize)(0,null),text:`${m>0||this.newNotificationsCount>0?"$(bell-dot)":"$(bell)"}`,ariaLabel:(0,D.localize)(1,null),command:this.isNotificationsCenterVisible?b.HIDE_NOTIFICATIONS_CENTER:b.SHOW_NOTIFICATIONS_CENTER,tooltip:this.getTooltip(m),showBeak:this.isNotificationsCenterVisible};this.notificationService.doNotDisturbMode&&(S={...S,text:`${m>0||this.newNotificationsCount>0?"$(bell-slash-dot)":"$(bell-slash)"}`,ariaLabel:(0,D.localize)(2,null),tooltip:(0,D.localize)(3,null)}),this.notificationsCenterStatusItem?this.notificationsCenterStatusItem.update(S):this.notificationsCenterStatusItem=this.statusbarService.addEntry(S,"status.notifications",1,-Number.MAX_VALUE)}getTooltip(m){return this.isNotificationsCenterVisible?(0,D.localize)(4,null):this.model.notifications.length===0?(0,D.localize)(5,null):m===0?this.newNotificationsCount===0?(0,D.localize)(6,null):this.newNotificationsCount===1?(0,D.localize)(7,null):(0,D.localize)(8,null,this.newNotificationsCount):this.newNotificationsCount===0?(0,D.localize)(9,null,m):this.newNotificationsCount===1?(0,D.localize)(10,null,m):(0,D.localize)(11,null,this.newNotificationsCount,m)}update(m,S){let h=!1;this.isNotificationsCenterVisible!==m&&(this.isNotificationsCenterVisible=m,this.newNotificationsCount=0,h=!0),this.isNotificationsToastsVisible!==S&&(this.isNotificationsToastsVisible=S,h=!0),h&&this.updateNotificationsCenterStatusItem()}onDidChangeStatusMessage(m){const S=m.item;switch(m.kind){case 0:this.doSetStatusMessage(S);break;case 1:this.currentStatusMessage&&this.currentStatusMessage[0]===S&&((0,y.dispose)(this.currentStatusMessage[1]),this.currentStatusMessage=void 0);break}}doSetStatusMessage(m){const S=m.message,h=m.options&&typeof m.options.showAfter=="number"?m.options.showAfter:0,a=m.options&&typeof m.options.hideAfter=="number"?m.options.hideAfter:-1;this.currentStatusMessage&&(0,y.dispose)(this.currentStatusMessage[1]);let r,i=setTimeout(()=>{r=this.statusbarService.addEntry({name:(0,D.localize)(12,null),text:S,ariaLabel:S},"status.message",0,-Number.MAX_VALUE),i=null},h),s;const o={dispose:()=>{i&&clearTimeout(i),s&&clearTimeout(s),r?.dispose()}};a>0&&(s=setTimeout(()=>o.dispose(),a)),this.currentStatusMessage=[m,o]}};e.NotificationsStatus=f,e.NotificationsStatus=f=fe([O(1,t.IStatusbarService),O(2,T.INotificationService)],f)}),define(Q[4066],Y([1,0,2573,177,34,92,113,13,81,21,82]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HideStatusbarEntryAction=e.ToggleStatusbarEntryVisibilityAction=void 0;class h extends b.Action{constructor(s,o,u){super(s,o,void 0,!0),this.model=u,this.checked=!u.isHidden(s)}async run(){this.model.isHidden(this.id)?this.model.show(this.id):this.model.hide(this.id)}}e.ToggleStatusbarEntryVisibilityAction=h;class a extends b.Action{constructor(s,o,u){super(s,(0,t.localize)(0,null,o),void 0,!0),this.model=u}async run(){this.model.hide(this.id)}}e.HideStatusbarEntryAction=a,T.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.focusPrevious",weight:200,primary:15,secondary:[16],when:S.StatusBarFocused,handler:i=>{i.get(y.IStatusbarService).focusPreviousEntry()}}),T.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.focusNext",weight:200,primary:17,secondary:[18],when:S.StatusBarFocused,handler:i=>{i.get(y.IStatusbarService).focusNextEntry()}}),T.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.focusFirst",weight:200,primary:14,when:S.StatusBarFocused,handler:i=>{const s=i.get(y.IStatusbarService);s.focus(!1),s.focusNextEntry()}}),T.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.focusLast",weight:200,primary:13,when:S.StatusBarFocused,handler:i=>{const s=i.get(y.IStatusbarService);s.focus(!1),s.focusPreviousEntry()}}),T.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.clearFocus",weight:200,primary:9,when:S.StatusBarFocused,handler:i=>{const s=i.get(y.IStatusbarService),o=i.get(m.IEditorService);s.isEntryFocused()?s.focus(!1):o.activeEditorPane&&o.activeEditorPane.focus()}});class r extends f.Action2{constructor(){super({id:"workbench.action.focusStatusBar",title:{value:(0,t.localize)(1,null),original:"Focus Status Bar"},category:v.Categories.View,f1:!0})}async run(s){s.get(D.IWorkbenchLayoutService).focusPart("workbench.parts.statusbar")}}(0,f.registerAction2)(r)}),define(Q[4067],Y([1,0,132,4,576,28,30,177,19,393,7,23,17,67,169,77,446,110,151]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatusbarEntryItem=void 0;let p=class extends y.Disposable{get name(){return(0,a.assertIsDefined)(this.entry).name}get hasCommand(){return typeof this.entry?.command<"u"}constructor(n,g,w,E,C,I,_){super(),this.container=n,this.hoverDelegate=w,this.commandService=E,this.notificationService=C,this.telemetryService=I,this.themeService=_,this.entry=void 0,this.foregroundListener=this._register(new y.MutableDisposable),this.backgroundListener=this._register(new y.MutableDisposable),this.commandMouseListener=this._register(new y.MutableDisposable),this.commandTouchListener=this._register(new y.MutableDisposable),this.commandKeyboardListener=this._register(new y.MutableDisposable),this.hover=void 0,this.labelContainer=document.createElement("a"),this.labelContainer.tabIndex=-1,this.labelContainer.setAttribute("role","button"),this.labelContainer.className="statusbar-item-label",this._register(d.Gesture.addTarget(this.labelContainer)),this.label=new c(this.labelContainer),this.container.appendChild(this.labelContainer),this.beakContainer=document.createElement("div"),this.beakContainer.className="status-bar-item-beak-container",this.container.appendChild(this.beakContainer),this.update(g)}update(n){if(this.label.showProgress=n.showProgress??!1,(!this.entry||n.text!==this.entry.text)&&(this.label.text=n.text,n.text?(0,S.show)(this.labelContainer):(0,S.hide)(this.labelContainer)),(!this.entry||n.ariaLabel!==this.entry.ariaLabel)&&(this.container.setAttribute("aria-label",n.ariaLabel),this.labelContainer.setAttribute("aria-label",n.ariaLabel)),(!this.entry||n.role!==this.entry.role)&&this.labelContainer.setAttribute("role",n.role||"button"),!this.entry||!this.isEqualTooltip(this.entry,n)){const w=(0,u.isMarkdownString)(n.tooltip)?{markdown:n.tooltip,markdownNotSupportedFallback:void 0}:n.tooltip;this.hover?this.hover.update(w):this.hover=this._register((0,o.setupCustomHover)(this.hoverDelegate,this.container,w))}if(!this.entry||n.command!==this.entry.command){this.commandMouseListener.clear(),this.commandTouchListener.clear(),this.commandKeyboardListener.clear();const w=n.command;w&&(w!==f.ShowTooltipCommand||this.hover)?(this.commandMouseListener.value=(0,S.addDisposableListener)(this.labelContainer,S.EventType.CLICK,()=>this.executeCommand(w)),this.commandTouchListener.value=(0,S.addDisposableListener)(this.labelContainer,d.EventType.Tap,()=>this.executeCommand(w)),this.commandKeyboardListener.value=(0,S.addDisposableListener)(this.labelContainer,S.EventType.KEY_DOWN,E=>{const C=new r.StandardKeyboardEvent(E);(C.equals(10)||C.equals(3))&&(S.EventHelper.stop(E),this.executeCommand(w))}),this.labelContainer.classList.remove("disabled")):this.labelContainer.classList.add("disabled")}(!this.entry||n.showBeak!==this.entry.showBeak)&&(n.showBeak?this.container.classList.add("has-beak"):this.container.classList.remove("has-beak"));const g=!!n.backgroundColor||n.kind&&n.kind!=="standard";if(!this.entry||n.kind!==this.entry.kind){for(const w of f.StatusbarEntryKinds)this.container.classList.remove(`${w}-kind`);n.kind&&n.kind!=="standard"&&this.container.classList.add(`${n.kind}-kind`),this.container.classList.toggle("has-background-color",g)}(!this.entry||n.color!==this.entry.color)&&this.applyColor(this.labelContainer,n.color),(!this.entry||n.backgroundColor!==this.entry.backgroundColor)&&(this.container.classList.toggle("has-background-color",g),this.applyColor(this.container,n.backgroundColor,!0)),this.entry=n}isEqualTooltip({tooltip:n},{tooltip:g}){return n===void 0?g===void 0:(0,u.isMarkdownString)(n)?(0,u.isMarkdownString)(g)&&(0,u.markdownStringEqual)(n,g):n===g}async executeCommand(n){if(n===f.ShowTooltipCommand)this.hover?.show(!0);else{const g=typeof n=="string"?n:n.id,w=typeof n=="string"?[]:n.arguments??[];this.telemetryService.publicLog2("workbenchActionExecuted",{id:g,from:"status bar"});try{await this.commandService.executeCommand(g,...w)}catch(E){this.notificationService.error((0,t.toErrorMessage)(E))}}}applyColor(n,g,w){let E;if(w?this.backgroundListener.clear():this.foregroundListener.clear(),g)if((0,m.isThemeColor)(g)){E=this.themeService.getColorTheme().getColor(g.id)?.toString();const C=this.themeService.onDidColorThemeChange(I=>{const _=I.getColor(g.id)?.toString();w?n.style.backgroundColor=_??"":n.style.color=_??""});w?this.backgroundListener.value=C:this.foregroundListener.value=C}else E=g;w?n.style.backgroundColor=E??"":n.style.color=E??""}};e.StatusbarEntryItem=p,e.StatusbarEntryItem=p=fe([O(3,D.ICommandService),O(4,h.INotificationService),O(5,T.ITelemetryService),O(6,v.IThemeService)],p);class c extends b.SimpleIconLabel{constructor(n){super(n),this.container=n,this.progressCodicon=(0,i.renderIcon)(s.syncing),this.currentText="",this.currentShowProgress=!1}set showProgress(n){this.currentShowProgress!==n&&(this.currentShowProgress=n,this.progressCodicon=(0,i.renderIcon)(n==="loading"?s.spinningLoading:s.syncing),this.text=this.currentText)}set text(n){if(this.currentShowProgress){this.container.firstChild!==this.progressCodicon&&this.container.appendChild(this.progressCodicon);for(const w of Array.from(this.container.childNodes))w!==this.progressCodicon&&w.remove();let g=n??"";g&&(g=` ${g}`),(0,S.append)(this.container,...(0,i.renderLabelWithIcons)(g))}else super.text=n}}}),define(Q[4068],Y([1,0,4,177,7,6]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatusbarViewModel=void 0;class T extends t.Disposable{static{this.HIDDEN_ENTRIES_KEY="workbench.statusbar.hidden"}get entries(){return this._entries.slice(0)}get lastFocusedEntry(){return this._lastFocusedEntry&&!this.isHidden(this._lastFocusedEntry.id)?this._lastFocusedEntry:void 0}constructor(v){super(),this.storageService=v,this._onDidChangeEntryVisibility=this._register(new D.Emitter),this.onDidChangeEntryVisibility=this._onDidChangeEntryVisibility.event,this._entries=[],this.hidden=new Set,this.restoreState(),this.registerListeners()}restoreState(){const v=this.storageService.get(T.HIDDEN_ENTRIES_KEY,0);if(v)try{const m=JSON.parse(v);this.hidden=new Set(m)}catch{}}registerListeners(){this._register(this.storageService.onDidChangeValue(0,T.HIDDEN_ENTRIES_KEY,this._register(new t.DisposableStore))(()=>this.onDidStorageValueChange()))}onDidStorageValueChange(){const v=new Set(this.hidden);this.hidden.clear(),this.restoreState();const m=new Set;for(const S of v)this.hidden.has(S)||m.add(S);for(const S of this.hidden)v.has(S)||m.add(S);if(m.size>0)for(const S of this._entries)m.has(S.id)&&(this.updateVisibility(S.id,!0),m.delete(S.id))}add(v){this._entries.push(v),this.updateVisibility(v,!1),this.sort(),this.markFirstLastVisibleEntry()}remove(v){const m=this._entries.indexOf(v);m>=0&&(this._entries.splice(m,1),this._entries.some(S=>(0,y.isStatusbarEntryLocation)(S.priority.primary)&&S.priority.primary.id===v.id)&&this.sort(),this.markFirstLastVisibleEntry())}isHidden(v){return this.hidden.has(v)}hide(v){this.hidden.has(v)||(this.hidden.add(v),this.updateVisibility(v,!0),this.saveState())}show(v){this.hidden.has(v)&&(this.hidden.delete(v),this.updateVisibility(v,!0),this.saveState())}findEntry(v){return this._entries.find(m=>m.container===v)}getEntries(v){return this._entries.filter(m=>m.alignment===v)}focusNextEntry(){this.focusEntry(1,0)}focusPreviousEntry(){this.focusEntry(-1,this.entries.length-1)}isEntryFocused(){return!!this.getFocusedEntry()}getFocusedEntry(){return this._entries.find(v=>(0,b.isAncestor)(document.activeElement,v.container))}focusEntry(v,m){const S=r=>{let i=r,s=i>=0&&i<this._entries.length?this._entries[i]:void 0;for(;s&&this.isHidden(s.id);)i+=v,s=i>=0&&i<this._entries.length?this._entries[i]:void 0;return s},h=this.getFocusedEntry();if(h){const r=S(this._entries.indexOf(h)+v);if(r){this._lastFocusedEntry=r,r.labelContainer.focus();return}}const a=S(m);a&&(this._lastFocusedEntry=a,a.labelContainer.focus())}updateVisibility(v,m){if(typeof v=="string"){const S=v;for(const h of this._entries)h.id===S&&this.updateVisibility(h,m)}else{const S=v,h=this.isHidden(S.id);h?(0,b.hide)(S.container):(0,b.show)(S.container),m&&this._onDidChangeEntryVisibility.fire({id:S.id,visible:!h}),this.markFirstLastVisibleEntry()}}saveState(){this.hidden.size>0?this.storageService.store(T.HIDDEN_ENTRIES_KEY,JSON.stringify(Array.from(this.hidden.values())),0,0):this.storageService.remove(T.HIDDEN_ENTRIES_KEY,0)}sort(){const v=new Map,m=new Map;for(let a=0;a<this._entries.length;a++){const r=this._entries[a];if(typeof r.priority.primary=="number")v.set(r,a);else{let i=m.get(r.priority.primary.id);i||(i=[],m.set(r.priority.primary.id,i)),i.push(r)}}const S=Array.from(v.keys());S.sort((a,r)=>a.alignment===r.alignment?a.priority.primary!==r.priority.primary?Number(r.priority.primary)-Number(a.priority.primary):a.priority.secondary!==r.priority.secondary?r.priority.secondary-a.priority.secondary:v.get(a)-v.get(r):a.alignment===0?-1:r.alignment===0?1:0);let h;if(m.size>0){h=[];for(const a of S){const r=m.get(a.id);r&&h.push(...r.filter(i=>(0,y.isStatusbarEntryLocation)(i.priority.primary)&&i.priority.primary.alignment===0)),h.push(a),r&&h.push(...r.filter(i=>(0,y.isStatusbarEntryLocation)(i.priority.primary)&&i.priority.primary.alignment===1)),m.delete(a.id)}for(const[,a]of m)h.push(...a)}else h=S;this._entries=h}markFirstLastVisibleEntry(){this.doMarkFirstLastVisibleStatusbarItem(this.getEntries(0)),this.doMarkFirstLastVisibleStatusbarItem(this.getEntries(1))}doMarkFirstLastVisibleStatusbarItem(v){let m,S;for(const h of v)h.container.classList.remove("first-visible-item","last-visible-item"),!this.isHidden(h.id)&&(m||(m=h),S=h);m?.container.classList.add("first-visible-item"),S?.container.classList.add("last-visible-item")}}e.StatusbarViewModel=T}),define(Q[4069],Y([1,0,15,6,4,1029,2715,28,49,112,5,100,52,727,966,21,44,1365,177]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostProfileService=void 0;let p=class extends b.Disposable{get state(){return this._state}get lastProfile(){return this._profile}constructor(l,n,g,w,E,C,I){super(),this._extensionService=l,this._editorService=n,this._instantiationService=g,this._nativeHostService=w,this._dialogService=E,this._statusbarService=C,this._productService=I,this._onDidChangeState=this._register(new y.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._onDidChangeLastProfile=this._register(new y.Emitter),this.onDidChangeLastProfile=this._onDidChangeLastProfile.event,this._unresponsiveProfiles=new m.ExtensionIdentifierMap,this._state=i.ProfileSessionState.None,this.profilingStatusBarIndicatorLabelUpdater=this._register(new b.MutableDisposable),this._profile=null,this._profileSession=null,this._setState(i.ProfileSessionState.None),f.CommandsRegistry.registerCommand("workbench.action.extensionHostProfiler.stop",()=>{this.stopProfiling(),this._editorService.openEditor(r.RuntimeExtensionsInput.instance,{pinned:!0})})}_setState(l){this._state!==l&&(this._state=l,this._state===i.ProfileSessionState.Running?this.updateProfilingStatusBarIndicator(!0):this._state===i.ProfileSessionState.Stopping&&this.updateProfilingStatusBarIndicator(!1),this._onDidChangeState.fire(void 0))}updateProfilingStatusBarIndicator(l){if(this.profilingStatusBarIndicatorLabelUpdater.clear(),l){const n={name:T.localize(0,null),text:T.localize(1,null),showProgress:!0,ariaLabel:T.localize(2,null),tooltip:T.localize(3,null),command:"workbench.action.extensionHostProfiler.stop"},g=Date.now(),w=setInterval(()=>{this.profilingStatusBarIndicator?.update({...n,text:T.localize(4,null,Math.round((new Date().getTime()-g)/1e3))})},1e3);this.profilingStatusBarIndicatorLabelUpdater.value=(0,b.toDisposable)(()=>clearInterval(w)),this.profilingStatusBarIndicator?this.profilingStatusBarIndicator.update(n):this.profilingStatusBarIndicator=this._statusbarService.addEntry(n,"status.profiler",1)}else this.profilingStatusBarIndicator&&(this.profilingStatusBarIndicator.dispose(),this.profilingStatusBarIndicator=void 0)}async startProfiling(){if(this._state!==i.ProfileSessionState.None)return null;const l=await this._extensionService.getInspectPorts(1,!0);return l.length===0?this._dialogService.confirm({type:"info",message:T.localize(5,null),detail:T.localize(6,null,this._productService.nameLong),primaryButton:T.localize(7,null)}).then(n=>{n.confirmed&&this._nativeHostService.relaunch({addArgs:[`--inspect-extensions=${(0,D.randomPort)()}`]})}):(l.length>1&&console.warn("There are multiple extension hosts available for profiling. Picking the first one..."),this._setState(i.ProfileSessionState.Starting),this._instantiationService.createInstance(u.ExtensionHostProfiler,l[0]).start().then(n=>{this._profileSession=n,this._setState(i.ProfileSessionState.Running)},n=>{(0,t.onUnexpectedError)(n),this._setState(i.ProfileSessionState.None)}))}stopProfiling(){this._state!==i.ProfileSessionState.Running||!this._profileSession||(this._setState(i.ProfileSessionState.Stopping),this._profileSession.stop().then(l=>{this._setLastProfile(l),this._setState(i.ProfileSessionState.None)},l=>{(0,t.onUnexpectedError)(l),this._setState(i.ProfileSessionState.None)}),this._profileSession=null)}_setLastProfile(l){this._profile=l,this._onDidChangeLastProfile.fire(void 0)}getUnresponsiveProfile(l){return this._unresponsiveProfiles.get(l)}setUnresponsiveProfile(l,n){this._unresponsiveProfiles.set(l,n),this._setLastProfile(n)}};e.ExtensionHostProfileService=p,e.ExtensionHostProfileService=p=fe([O(0,o.IExtensionService),O(1,s.IEditorService),O(2,S.IInstantiationService),O(3,h.INativeHostService),O(4,v.IDialogService),O(5,d.IStatusbarService),O(6,a.IProductService)],p)}),define(Q[4070],Y([1,0,4,123,2759,16,45,21,177,384,14,50,38,13,23,8,176,73,22,9]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0});const l="editor.detectLanguage";let n=class{static{c=this}static{this._id="status.languageDetectionStatus"}constructor(w,E,C,I,_,A){this._languageDetectionService=w,this._statusBarService=E,this._configurationService=C,this._editorService=I,this._languageService=_,this._keybindingService=A,this._disposables=new t.DisposableStore,this._delayer=new S.ThrottledDelayer(1e3),this._renderDisposables=new t.DisposableStore,I.onDidActiveEditorChange(()=>this._update(!0),this,this._disposables),this._update(!1)}dispose(){this._disposables.dispose(),this._delayer.dispose(),this._combinedEntry?.dispose(),this._renderDisposables.dispose()}_update(w){w&&(this._combinedEntry?.dispose(),this._combinedEntry=void 0),this._delayer.trigger(()=>this._doUpdate())}async _doUpdate(){const w=(0,y.getCodeEditor)(this._editorService.activeTextEditorControl);this._renderDisposables.clear(),w?.onDidChangeModelLanguage(()=>this._update(!0),this,this._renderDisposables),w?.onDidChangeModelContent(()=>this._update(!1),this,this._renderDisposables);const E=w?.getModel(),C=E?.uri,I=E?.getLanguageId(),_=this._configurationService.getValue("workbench.editor.languageDetectionHints");if(!(typeof _=="object"&&_?.untitledEditors)||C?.scheme!==d.Schemas.untitled||!I||!C)this._combinedEntry?.dispose(),this._combinedEntry=void 0;else{const L=await this._languageDetectionService.detectLanguage(C),R={jsonc:"json"},M=E.getLanguageId();if(L&&L!==M&&R[M]!==L){const N=this._languageService.getLanguageName(L)||L;let P=(0,b.localize)(0,null,N);const F=this._keybindingService.lookupKeybinding(l)?.getLabel();F&&(P+=` (${F})`);const V={name:(0,b.localize)(1,null),ariaLabel:(0,b.localize)(2,null,L),tooltip:P,command:l,text:"$(lightbulb-autofix)"};this._combinedEntry?this._combinedEntry.update(V):this._combinedEntry=this._statusBarService.addEntry(V,c._id,1,{id:"status.editor.mode",alignment:1,compact:!0})}else this._combinedEntry?.dispose(),this._combinedEntry=void 0}}};n=c=fe([O(0,m.ILanguageDetectionService),O(1,v.IStatusbarService),O(2,p.IConfigurationService),O(3,f.IEditorService),O(4,h.ILanguageService),O(5,a.IKeybindingService)],n),D.Registry.as(T.Extensions.Workbench).registerWorkbenchContribution(n,3),(0,r.registerAction2)(class extends r.Action2{constructor(){super({id:l,title:{value:(0,b.localize)(3,null),original:"Detect Language from Content"},f1:!0,precondition:s.ContextKeyExpr.and(o.NOTEBOOK_EDITOR_EDITABLE.toNegated(),u.EditorContextKeys.editorTextFocus),keybinding:{primary:1570,weight:200}})}async run(g){const w=g.get(f.IEditorService),E=g.get(m.ILanguageDetectionService),C=(0,y.getCodeEditor)(w.activeTextEditorControl),I=g.get(i.INotificationService),_=C?.getModel()?.uri;if(_){const A=await E.detectLanguage(_);A?C.getModel()?.setLanguage(A,m.LanguageDetectionLanguageEventSource):I.warn((0,b.localize)(4,null))}}})}),define(Q[4071],Y([1,0,7,169,4,63,123,2760,16,37,45,21,748,177,436,276,41,110,85,34,32,24,20,10,13,81,1805]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E){"use strict";var C;Object.defineProperty(e,"__esModule",{value:!0});class I{constructor(L,R){this.combined=L,this.dedicated=R}isEqual(L){return(0,n.equals)(this.combined,L.combined)&&(0,n.equals)(this.dedicated,L.dedicated)}}let _=class{constructor(L,R){this._storageService=L,this._key=R}get value(){return this._storageService.getNumber(this._key,0,0)}increment(){const L=this.value+1;return this._storageService.store(this._key,L,0,1),L}};_=fe([O(0,l.IStorageService)],_);let A=class{static{C=this}static{this._id="status.languageStatus"}static{this._keyDedicatedItems="languageStatus.dedicated"}constructor(L,R,M,N,P){this._languageStatusService=L,this._statusBarService=R,this._editorService=M,this._openerService=N,this._storageService=P,this._disposables=new b.DisposableStore,this._dedicated=new Set,this._dedicatedEntries=new Map,this._renderDisposables=new b.DisposableStore,P.onDidChangeValue(0,C._keyDedicatedItems,this._disposables)(this._handleStorageChange,this,this._disposables),this._restoreState(),this._interactionCounter=new _(P,"languageStatus.interactCount"),L.onDidChange(this._update,this,this._disposables),M.onDidActiveEditorChange(this._update,this,this._disposables),this._update(),R.onDidChangeEntryVisibility(x=>{!x.visible&&this._dedicated.has(x.id)&&(this._dedicated.delete(x.id),this._update(),this._storeState())},this._disposables)}dispose(){this._disposables.dispose(),this._combinedEntry?.dispose(),(0,b.dispose)(this._dedicatedEntries.values()),this._renderDisposables.dispose()}_handleStorageChange(){this._restoreState(),this._update()}_restoreState(){const L=this._storageService.get(C._keyDedicatedItems,0,"[]");try{const R=JSON.parse(L);this._dedicated=new Set(R)}catch{this._dedicated.clear()}}_storeState(){if(this._dedicated.size===0)this._storageService.remove(C._keyDedicatedItems,0);else{const L=JSON.stringify(Array.from(this._dedicated.keys()));this._storageService.store(C._keyDedicatedItems,L,0,0)}}_createViewModel(L){if(!L?.hasModel())return new I([],[]);const R=this._languageStatusService.getLanguageStatus(L.getModel()),M=[],N=[];for(const P of R)this._dedicated.has(P.id)&&N.push(P),M.push(P);return new I(M,N)}_update(){const L=(0,T.getCodeEditor)(this._editorService.activeTextEditorControl),R=this._createViewModel(L);if(this._model?.isEqual(R))return;if(this._renderDisposables.clear(),this._model=R,L?.onDidChangeModelLanguage(this._update,this,this._renderDisposables),R.combined.length===0)this._combinedEntry?.dispose(),this._combinedEntry=void 0;else{const[N]=R.combined,P=N.severity>=D.default.Warning,x=C._severityToComboCodicon(N.severity);let F=!1;const V=[],W=document.createElement("div");for(const U of R.combined){const G=R.dedicated.includes(U);W.appendChild(this._renderStatus(U,P,G,this._renderDisposables)),V.push(this._asAriaLabel(U)),F=F||!G&&U.busy}const z={name:(0,f.localize)(0,null),ariaLabel:(0,f.localize)(1,null,V.join(", next: ")),tooltip:W,command:r.ShowTooltipCommand,text:F?`${x}\xA0\xA0$(sync~spin)`:x};this._combinedEntry?this._combinedEntry.update(z):this._combinedEntry=this._statusBarService.addEntry(z,C._id,1,{id:"status.editor.mode",alignment:0,compact:!0});const B=this._interactionCounter.value>=3,K=document.querySelector(".monaco-workbench .statusbar DIV#status\\.languageStatus A>SPAN.codicon"),H=document.querySelector(".monaco-workbench .statusbar DIV#status\\.languageStatus");if(K instanceof HTMLElement&&H){const U="wiggle",G="flash";F?(K.classList.remove(U),H.classList.remove(G)):(K.classList.toggle(U,P||!B),this._renderDisposables.add(t.addDisposableListener(K,"animationend",$=>K.classList.remove(U))),H.classList.toggle(G,P),this._renderDisposables.add(t.addDisposableListener(H,"animationend",$=>H.classList.remove(G))))}if(!B){const U=document.querySelector(".monaco-workbench .context-view");if(U instanceof HTMLElement){const G=new MutationObserver(()=>{document.contains(W)&&(this._interactionCounter.increment(),G.disconnect())});G.observe(U,{childList:!0,subtree:!0}),this._renderDisposables.add((0,b.toDisposable)(()=>G.disconnect()))}}}const M=new Map;for(const N of R.dedicated){const P=C._asStatusbarEntry(N);let x=this._dedicatedEntries.get(N.id);x?(x.update(P),this._dedicatedEntries.delete(N.id)):x=this._statusBarService.addEntry(P,N.id,1,{id:"status.editor.mode",alignment:1}),M.set(N.id,x)}(0,b.dispose)(this._dedicatedEntries.values()),this._dedicatedEntries=M}_renderStatus(L,R,M,N){const P=document.createElement("div");P.classList.add("hover-language-status");const x=document.createElement("div");x.classList.add("severity",`sev${L.severity}`),x.classList.toggle("show",R);const F=C._severityToSingleCodicon(L.severity);t.append(x,...(0,y.renderLabelWithIcons)(F)),P.appendChild(x);const V=document.createElement("div");V.classList.add("element"),P.appendChild(V);const W=document.createElement("div");W.classList.add("left"),V.appendChild(W);const z=document.createElement("span");z.classList.add("label"),t.append(z,...(0,y.renderLabelWithIcons)(L.busy?`$(sync~spin)\xA0\xA0${L.label}`:L.label)),W.appendChild(z);const B=document.createElement("span");B.classList.add("detail"),this._renderTextPlus(B,L.detail,N),W.appendChild(B);const K=document.createElement("div");K.classList.add("right"),V.appendChild(K);const{command:H}=L;H&&N.add(new s.Link(K,{label:H.title,title:H.tooltip,href:g.URI.from({scheme:"command",path:H.id,query:H.arguments&&JSON.stringify(H.arguments)}).toString()},void 0,this._openerService));const U=new d.ActionBar(K,{});N.add(U);let G;return M?G=new p.Action("unpin",(0,f.localize)(3,null),m.ThemeIcon.asClassName(c.Codicon.pinned),!0,()=>{this._dedicated.delete(L.id),this._statusBarService.updateEntryVisibility(L.id,!1),this._update(),this._storeState()}):G=new p.Action("pin",(0,f.localize)(2,null),m.ThemeIcon.asClassName(c.Codicon.pin),!0,()=>{this._dedicated.add(L.id),this._statusBarService.updateEntryVisibility(L.id,!0),this._update(),this._storeState()}),U.push(G,{icon:!0,label:!1}),N.add(G),P}static _severityToComboCodicon(L){switch(L){case D.default.Error:return"$(bracket-error)";case D.default.Warning:return"$(bracket-dot)";default:return"$(bracket)"}}static _severityToSingleCodicon(L){switch(L){case D.default.Error:return"$(error)";case D.default.Warning:return"$(info)";default:return"$(check)"}}_renderTextPlus(L,R,M){for(const N of(0,i.parseLinkedText)(R).nodes)if(typeof N=="string"){const P=(0,y.renderLabelWithIcons)(N);t.append(L,...P)}else M.add(new s.Link(L,N,void 0,this._openerService))}_asAriaLabel(L){return L.accessibilityInfo?L.accessibilityInfo.label:L.detail?(0,f.localize)(4,null,L.label,L.detail):(0,f.localize)(5,null,L.label)}static _asStatusbarEntry(L){let R;return L.severity===D.default.Warning?R="warning":L.severity===D.default.Error&&(R="error"),{name:(0,f.localize)(6,null,L.name),text:L.busy?`${L.label}\xA0\xA0$(sync~spin)`:L.label,ariaLabel:L.accessibilityInfo?.label??L.label,role:L.accessibilityInfo?.role,tooltip:L.command?.tooltip||new u.MarkdownString(L.detail,{isTrusted:!0,supportThemeIcons:!0}),kind:R,command:L.command}}};A=C=fe([O(0,a.ILanguageStatusService),O(1,r.IStatusbarService),O(2,h.IEditorService),O(3,o.IOpenerService),O(4,l.IStorageService)],A),v.Registry.as(S.Extensions.Workbench).registerWorkbenchContribution(A,3),(0,w.registerAction2)(class extends w.Action2{constructor(){super({id:"editor.inlayHints.Reset",title:{value:(0,f.localize)(7,null),original:"Reset Language Status Interaction Counter"},category:E.Categories.View,f1:!0})}run(k){k.get(l.IStorageService).remove("languageStatus.interactCount",0)}})}),define(Q[4072],Y([1,0,2885,26,4,6,293,223,8,177,21,9,47,64,22,83]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMActiveResourceContextKeyController=e.SCMStatusController=void 0;function o(p){return typeof p.provider.count=="number"?p.provider.count:p.provider.groups.elements.reduce((c,l)=>c+l.elements.length,0)}let u=class{constructor(c,l,n,g,w,E,C){this.scmService=c,this.scmViewService=l,this.statusbarService=n,this.activityService=g,this.editorService=w,this.configurationService=E,this.uriIdentityService=C,this.statusBarDisposable=b.Disposable.None,this.focusDisposable=b.Disposable.None,this.focusedRepository=void 0,this.badgeDisposable=new b.MutableDisposable,this.disposables=new b.DisposableStore,this.repositoryDisposables=new Set,this.scmService.onDidAddRepository(this.onDidAddRepository,this,this.disposables),this.scmService.onDidRemoveRepository(this.onDidRemoveRepository,this,this.disposables),D.Event.filter(E.onDidChangeConfiguration,_=>_.affectsConfiguration("scm.countBadge"))(this.renderActivityCount,this,this.disposables);for(const _ of this.scmService.repositories)this.onDidAddRepository(_);this.scmViewService.onDidFocusRepository(this.focusRepository,this,this.disposables),this.focusRepository(this.scmViewService.focusedRepository),w.onDidActiveEditorChange(()=>this.tryFocusRepositoryBasedOnActiveEditor(),this,this.disposables),this.renderActivityCount()}tryFocusRepositoryBasedOnActiveEditor(c=this.scmService.repositories){const l=a.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor);if(!l)return!1;let n=null,g=Number.POSITIVE_INFINITY;for(const w of c){const E=w.provider.rootUri;if(!E)continue;const C=this.uriIdentityService.extUri.relativePath(E,l);C&&!/^\.\./.test(C)&&C.length<g&&(n=w,g=C.length)}return n?(this.focusRepository(n),!0):!1}onDidAddRepository(c){const n=D.Event.any(c.provider.onDidChange,c.provider.onDidChangeResources)(()=>this.renderActivityCount()),w=D.Event.filter(this.scmService.onDidRemoveRepository,C=>C===c)(()=>{E.dispose(),this.repositoryDisposables.delete(E),this.renderActivityCount()}),E=(0,b.combinedDisposable)(n,w);this.repositoryDisposables.add(E),this.tryFocusRepositoryBasedOnActiveEditor(s.Iterable.single(c))}onDidRemoveRepository(c){this.focusedRepository===c&&this.focusRepository(s.Iterable.first(this.scmService.repositories))}focusRepository(c){this.focusedRepository!==c&&(this.focusDisposable.dispose(),this.focusedRepository=c,c&&c.provider.onDidChangeStatusBarCommands&&(this.focusDisposable=c.provider.onDidChangeStatusBarCommands(()=>this.renderStatusBar(c))),this.renderStatusBar(c),this.renderActivityCount())}renderStatusBar(c){if(this.statusBarDisposable.dispose(),!c)return;const l=c.provider.statusBarCommands||[],n=c.provider.rootUri?`${(0,y.basename)(c.provider.rootUri)} (${c.provider.label})`:c.provider.label,g=new b.DisposableStore;for(let w=0;w<l.length;w++){const E=l[w],C=`${n}${E.tooltip?` - ${E.tooltip}`:""}`;let I=E.arguments?.[0];I&&typeof I=="string"?(I=I.substring(0,I.lastIndexOf("/")).replace(/^git\./,""),I.length>1&&(I=I[0].toLocaleUpperCase()+I.slice(1))):I="";const _={name:(0,t.localize)(0,null)+(I?` ${I}`:""),text:E.title,ariaLabel:C,tooltip:C,command:E.id?E:void 0};g.add(w===0?this.statusbarService.addEntry(_,`status.scm.${w}`,0,1e4):this.statusbarService.addEntry(_,`status.scm.${w}`,0,{id:`status.scm.${w-1}`,alignment:1,compact:!0}))}this.statusBarDisposable=g}renderActivityCount(){const c=this.configurationService.getValue("scm.countBadge");let l=0;if(c==="all"?l=s.Iterable.reduce(this.scmService.repositories,(n,g)=>n+o(g),0):c==="focused"&&this.focusedRepository&&(l=o(this.focusedRepository)),l>0){const n=new f.NumberBadge(l,g=>(0,t.localize)(1,null,g));this.badgeDisposable.value=this.activityService.showViewActivity(T.VIEW_PANE_ID,{badge:n,clazz:"scm-viewlet-label"})}else this.badgeDisposable.value=void 0}dispose(){this.focusDisposable.dispose(),this.statusBarDisposable.dispose(),this.badgeDisposable.dispose(),this.disposables=(0,b.dispose)(this.disposables),(0,b.dispose)(this.repositoryDisposables.values()),this.repositoryDisposables.clear()}};e.SCMStatusController=u,e.SCMStatusController=u=fe([O(0,T.ISCMService),O(1,T.ISCMViewService),O(2,m.IStatusbarService),O(3,f.IActivityService),O(4,S.IEditorService),O(5,h.IConfigurationService),O(6,r.IUriIdentityService)],u);let d=class{constructor(c,l,n,g){this.editorService=l,this.scmService=n,this.uriIdentityService=g,this.disposables=new b.DisposableStore,this.repositoryDisposables=new Set,this.activeResourceHasChangesContextKey=c.createKey("scmActiveResourceHasChanges",!1),this.activeResourceRepositoryContextKey=c.createKey("scmActiveResourceRepository",void 0),this.scmService.onDidAddRepository(this.onDidAddRepository,this,this.disposables);for(const w of this.scmService.repositories)this.onDidAddRepository(w);l.onDidActiveEditorChange(this.updateContextKey,this,this.disposables)}onDidAddRepository(c){const n=D.Event.any(c.provider.onDidChange,c.provider.onDidChangeResources)(()=>this.updateContextKey()),w=D.Event.filter(this.scmService.onDidRemoveRepository,C=>C===c)(()=>{E.dispose(),this.repositoryDisposables.delete(E),this.updateContextKey()}),E=(0,b.combinedDisposable)(n,w);this.repositoryDisposables.add(E)}updateContextKey(){const c=a.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor);if(c?.scheme===i.Schemas.file||c?.scheme===i.Schemas.vscodeRemote){const l=s.Iterable.find(this.scmService.repositories,n=>!!(n.provider.rootUri&&this.uriIdentityService.extUri.isEqualOrParent(c,n.provider.rootUri)));this.activeResourceRepositoryContextKey.set(l?.id);for(const n of l?.provider.groups.elements??[])if(n.elements.some(g=>this.uriIdentityService.extUri.isEqual(c,g.sourceUri))){this.activeResourceHasChangesContextKey.set(!0);return}this.activeResourceHasChangesContextKey.set(!1)}else this.activeResourceHasChangesContextKey.set(!1),this.activeResourceRepositoryContextKey.set(void 0)}dispose(){this.disposables=(0,b.dispose)(this.disposables),(0,b.dispose)(this.repositoryDisposables.values()),this.repositoryDisposables.clear()}};e.SCMActiveResourceContextKeyController=d,e.SCMActiveResourceContextKeyController=d=fe([O(0,v.IContextKeyService),O(1,S.IEditorService),O(2,T.ISCMService),O(3,r.IUriIdentityService)],d)}),define(Q[4073],Y([1,0,14,6,186,173,145,28,9,5,16,181,24,126,39,1309,4024,119,3720,158,268,254,127,177]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteTerminalBackendContribution=void 0;let w=class{constructor(I,_,A){const k=_.getConnection();if(k?.remoteAuthority){const L=I.createInstance(d.RemoteTerminalChannelClient,k.remoteAuthority,k.getChannel(d.REMOTE_TERMINAL_CHANNEL_NAME)),R=I.createInstance(E,k.remoteAuthority,L);S.Registry.as(r.TerminalExtensions.Backend).registerTerminalBackend(R),A.didRegisterBackend(R.remoteAuthority)}}};e.RemoteTerminalBackendContribution=w,e.RemoteTerminalBackendContribution=w=fe([O(0,m.IInstantiationService),O(1,n.IRemoteAgentService),O(2,u.ITerminalInstanceService)],w);let E=class extends s.BaseTerminalBackend{get whenReady(){return this._whenConnected.p}setReady(){this._whenConnected.complete()}constructor(I,_,A,k,L,R,M,N,P,x,F,V,W){super(_,L,F,x,W,P),this.remoteAuthority=I,this._remoteTerminalChannel=_,this._remoteAgentService=A,this._instantiationService=k,this._commandService=R,this._storageService=M,this._remoteAuthorityResolverService=N,this._historyService=F,this._configurationService=V,this._ptys=new Map,this._whenConnected=new t.DeferredPromise,this._onDidRequestDetach=this._register(new y.Emitter),this.onDidRequestDetach=this._onDidRequestDetach.event,this._onRestoreCommands=this._register(new y.Emitter),this.onRestoreCommands=this._onRestoreCommands.event,this._remoteTerminalChannel.onProcessData(K=>this._ptys.get(K.id)?.handleData(K.event)),this._remoteTerminalChannel.onProcessReplay(K=>{this._ptys.get(K.id)?.handleReplay(K.event),K.event.commands.commands.length>0&&this._onRestoreCommands.fire({id:K.id,commands:K.event.commands.commands})}),this._remoteTerminalChannel.onProcessOrphanQuestion(K=>this._ptys.get(K.id)?.handleOrphanQuestion()),this._remoteTerminalChannel.onDidRequestDetach(K=>this._onDidRequestDetach.fire(K)),this._remoteTerminalChannel.onProcessReady(K=>this._ptys.get(K.id)?.handleReady(K.event)),this._remoteTerminalChannel.onDidChangeProperty(K=>this._ptys.get(K.id)?.handleDidChangeProperty(K.property)),this._remoteTerminalChannel.onProcessExit(K=>{const H=this._ptys.get(K.id);H&&(H.handleExit(K.event),this._ptys.delete(K.id))});const z=["_remoteCLI.openExternal","_remoteCLI.windowOpen","_remoteCLI.getSystemStatus","_remoteCLI.manageExtensions"];this._remoteTerminalChannel.onExecuteCommand(async K=>{if(!this._ptys.get(K.persistentProcessId))return;const U=K.reqId,G=K.commandId;if(!z.includes(G)){this._remoteTerminalChannel.sendCommandResult(U,!0,"Invalid remote cli command: "+G);return}const $=K.commandArgs.map(ie=>(0,b.revive)(ie));try{const ie=await this._commandService.executeCommand(K.commandId,...$);this._remoteTerminalChannel.sendCommandResult(U,!1,ie)}catch(ie){this._remoteTerminalChannel.sendCommandResult(U,!0,ie)}});const B=this._configurationService.getValue(p.TERMINAL_CONFIG_SECTION);for(const K of Object.keys(B.autoReplies)){const H=B.autoReplies[K];H&&this._remoteTerminalChannel.installAutoReply(K,H)}this._register(this._configurationService.onDidChangeConfiguration(async K=>{if(K.affectsConfiguration("terminal.integrated.autoReplies")){this._remoteTerminalChannel.uninstallAllAutoReplies();const H=this._configurationService.getValue(p.TERMINAL_CONFIG_SECTION);for(const U of Object.keys(H.autoReplies)){const G=H.autoReplies[U];G&&await this._remoteTerminalChannel.installAutoReply(U,G)}}})),this._onPtyHostConnected.fire()}async requestDetachInstance(I,_){if(!this._remoteTerminalChannel)throw new Error("Cannot request detach instance when there is no remote!");return this._remoteTerminalChannel.requestDetachInstance(I,_)}async acceptDetachInstanceReply(I,_){if(this._remoteTerminalChannel){if(!_){this._logService.warn("Cannot attach to feature terminals, custom pty terminals, or those without a persistentProcessId");return}}else throw new Error("Cannot accept detached instance when there is no remote!");return this._remoteTerminalChannel.acceptDetachInstanceReply(I,_)}async persistTerminalState(){if(!this._remoteTerminalChannel)throw new Error("Cannot persist terminal state when there is no remote!");const I=Array.from(this._ptys.keys()),_=await this._remoteTerminalChannel.serializeTerminalState(I);this._storageService.store("terminal.integrated.bufferState",_,1,1)}async createProcess(I,_,A,k,L,R,M,N){if(!this._remoteTerminalChannel)throw new Error("Cannot create remote terminal when there is no remote!");if(!await this._remoteAgentService.getEnvironment())throw new Error("Could not fetch remote environment");const x=this._configurationService.getValue(p.TERMINAL_CONFIG_SECTION),F={"terminal.integrated.env.windows":this._configurationService.getValue("terminal.integrated.env.windows"),"terminal.integrated.env.osx":this._configurationService.getValue("terminal.integrated.env.osx"),"terminal.integrated.env.linux":this._configurationService.getValue("terminal.integrated.env.linux"),"terminal.integrated.cwd":this._configurationService.getValue("terminal.integrated.cwd"),"terminal.integrated.detectLocale":x.detectLocale},V={name:I.name,executable:I.executable,args:I.args,cwd:I.cwd,env:I.env,useShellEnvironment:I.useShellEnvironment,reconnectionProperties:I.reconnectionProperties,type:I.type,isFeatureTerminal:I.isFeatureTerminal},W=this._historyService.getLastActiveWorkspaceRoot(),z=await this._remoteTerminalChannel.createProcess(V,F,W,M,N,A,k,L),B=this._instantiationService.createInstance(o.RemotePty,z.persistentTerminalId,N,this._remoteTerminalChannel);return this._ptys.set(z.persistentTerminalId,B),B}async attachToProcess(I){if(!this._remoteTerminalChannel)throw new Error("Cannot create remote terminal when there is no remote!");try{await this._remoteTerminalChannel.attachToProcess(I);const _=this._instantiationService.createInstance(o.RemotePty,I,!0,this._remoteTerminalChannel);return this._ptys.set(I,_),_}catch(_){this._logService.trace(`Couldn't attach to process ${_.message}`)}}async attachToRevivedProcess(I){if(!this._remoteTerminalChannel)throw new Error("Cannot create remote terminal when there is no remote!");try{const _=await this._remoteTerminalChannel.getRevivedPtyNewId(I)??I;return await this.attachToProcess(_)}catch(_){this._logService.trace(`Couldn't attach to process ${_.message}`)}}async listProcesses(){return this._remoteTerminalChannel.listProcesses()}async getLatency(){const I=new T.StopWatch,_=await this._remoteTerminalChannel.getLatency();return I.stop(),[{label:"window<->ptyhostservice<->ptyhost",latency:I.elapsed()},..._]}async updateProperty(I,_,A){await this._remoteTerminalChannel.updateProperty(I,_,A)}async updateTitle(I,_,A){await this._remoteTerminalChannel.updateTitle(I,_,A)}async updateIcon(I,_,A,k){await this._remoteTerminalChannel.updateIcon(I,_,A,k)}async getDefaultSystemShell(I){return this._remoteTerminalChannel.getDefaultSystemShell(I)||""}async getProfiles(I,_,A){return this._remoteTerminalChannel.getProfiles(I,_,A)||[]}async getEnvironment(){return this._remoteTerminalChannel.getEnvironment()||{}}async getShellEnvironment(){const I=this._remoteAgentService.getConnection();return I?(await this._remoteAuthorityResolverService.resolveAuthority(I.remoteAuthority)).options?.extensionHostEnv:void 0}async getWslPath(I,_){return(await this._remoteAgentService.getEnvironment())?.os!==1?I:this._remoteTerminalChannel.getWslPath(I,_)||I}async setTerminalLayoutInfo(I){if(!this._remoteTerminalChannel)throw new Error("Cannot call setActiveInstanceId when there is no remote");return this._remoteTerminalChannel.setTerminalLayoutInfo(I)}async reduceConnectionGraceTime(){if(!this._remoteTerminalChannel)throw new Error("Cannot reduce grace time when there is no remote");return this._remoteTerminalChannel.reduceConnectionGraceTime()}async getTerminalLayoutInfo(){if(!this._remoteTerminalChannel)throw new Error("Cannot call getActiveInstanceId when there is no remote");const I=this._getWorkspaceId(),_=this._storageService.get("terminal.integrated.bufferState",1),A=this._deserializeTerminalState(_);if(A&&A.length>0)try{(0,D.mark)("code/terminal/willReviveTerminalProcessesRemote"),await this._remoteTerminalChannel.reviveTerminalProcesses(I,A,Intl.DateTimeFormat().resolvedOptions().locale),(0,D.mark)("code/terminal/didReviveTerminalProcessesRemote"),this._storageService.remove("terminal.integrated.bufferState",1);const k=this._storageService.get("terminal.integrated.layoutInfo",1);k&&((0,D.mark)("code/terminal/willSetTerminalLayoutInfoRemote"),await this._remoteTerminalChannel.setTerminalLayoutInfo(JSON.parse(k)),(0,D.mark)("code/terminal/didSetTerminalLayoutInfoRemote"),this._storageService.remove("terminal.integrated.layoutInfo",1))}catch(k){this._logService.warn("RemoteTerminalBackend#getTerminalLayoutInfo Error",k&&typeof k=="object"&&"message"in k?k.message:k)}return this._remoteTerminalChannel.getTerminalLayoutInfo()}async getPerformanceMarks(){return this._remoteTerminalChannel.getPerformanceMarks()}};E=fe([O(2,n.IRemoteAgentService),O(3,m.IInstantiationService),O(4,r.ITerminalLogService),O(5,f.ICommandService),O(6,a.IStorageService),O(7,h.IRemoteAuthorityResolverService),O(8,i.IWorkspaceContextService),O(9,c.IConfigurationResolverService),O(10,l.IHistoryService),O(11,v.IConfigurationService),O(12,g.IStatusbarService)],E)}),define(Q[4074],Y([1,0,6,18,9,5,61,16,24,126,39,119,158,3625,268,744,254,935,52,616,1309,139,835,674,250,173,89,14,177,102,145,127]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalTerminalBackendContribution=void 0;let R=class{constructor(P,x){const F=P.createInstance(M);f.Registry.as(m.TerminalExtensions.Backend).registerTerminalBackend(F),x.didRegisterBackend(F.remoteAuthority)}};e.LocalTerminalBackendContribution=R,e.LocalTerminalBackendContribution=R=fe([O(0,D.IInstantiationService),O(1,h.ITerminalInstanceService)],R);let M=class extends c.BaseTerminalBackend{get _proxy(){return this._directProxy||this._localPtyService}get whenReady(){return this._whenReady.p}setReady(){this._whenReady.complete()}constructor(P,x,F,V,W,z,B,K,H,U,G,$,ie,J,j,ee,X){super(V,F,J,K,ee,P),this._lifecycleService=x,this._localPtyService=V,this._labelService=W,this._shellEnvironmentService=z,this._storageService=B,this._configurationResolverService=K,this._configurationService=H,this._productService=U,this._historyService=G,this._terminalProfileResolverService=$,this._environmentVariableService=ie,this._environmentService=j,this._remoteAgentService=X,this.remoteAuthority=void 0,this._ptys=new Map,this._whenReady=new I.DeferredPromise,this._onDidRequestDetach=this._register(new t.Emitter),this.onDidRequestDetach=this._onDidRequestDetach.event,this.onPtyHostRestart(()=>{this._directProxy=void 0,this._directProxyClientEventually=void 0,this._connectToDirectProxy()})}async _connectToDirectProxy(){if(this._directProxyClientEventually){await this._directProxyClientEventually.p;return}this._logService.debug("Starting pty host");const P=new I.DeferredPromise;this._directProxyClientEventually=P;const x=w.ProxyChannel.toService((0,w.getDelayedChannel)(this._directProxyClientEventually.p.then(F=>F.getChannel(m.TerminalIpcChannels.PtyHostWindow))));this._directProxy=x,this._remoteAgentService.getConnection()?.remoteAuthority||await this._lifecycleService.when(3),(0,E.mark)("code/terminal/willConnectPtyHost"),this._logService.trace("Renderer->PtyHost#connect: before acquirePort"),(0,g.acquirePort)("vscode:createPtyHostMessageChannel","vscode:createPtyHostMessageChannelResult").then(F=>{(0,E.mark)("code/terminal/didConnectPtyHost"),this._logService.trace("Renderer->PtyHost#connect: connection established");const V=new n.Client(F,`window:${this._environmentService.window.id}`);P.complete(V),this._onPtyHostConnected.fire(),x.onProcessData(z=>this._ptys.get(z.id)?.handleData(z.event)),x.onDidChangeProperty(z=>this._ptys.get(z.id)?.handleDidChangeProperty(z.property)),x.onProcessExit(z=>{const B=this._ptys.get(z.id);B&&(B.handleExit(z.event),this._ptys.delete(z.id))}),x.onProcessReady(z=>this._ptys.get(z.id)?.handleReady(z.event)),x.onProcessReplay(z=>this._ptys.get(z.id)?.handleReplay(z.event)),x.onProcessOrphanQuestion(z=>this._ptys.get(z.id)?.handleOrphanQuestion()),x.onDidRequestDetach(z=>this._onDidRequestDetach.fire(z));const W=this._configurationService.getValue(a.TERMINAL_CONFIG_SECTION);for(const z of Object.keys(W.autoReplies)){const B=W.autoReplies[z];B&&x.installAutoReply(z,B)}this._register(this._configurationService.onDidChangeConfiguration(async z=>{if(z.affectsConfiguration("terminal.integrated.autoReplies")){x.uninstallAllAutoReplies();const B=this._configurationService.getValue(a.TERMINAL_CONFIG_SECTION);for(const K of Object.keys(B.autoReplies)){const H=B.autoReplies[K];H&&this._proxy.installAutoReply(K,H)}}})),this.getEnvironment()})}async requestDetachInstance(P,x){return this._proxy.requestDetachInstance(P,x)}async acceptDetachInstanceReply(P,x){if(!x){this._logService.warn("Cannot attach to feature terminals, custom pty terminals, or those without a persistentProcessId");return}return this._proxy.acceptDetachInstanceReply(P,x)}async persistTerminalState(){const P=Array.from(this._ptys.keys()),x=await this._proxy.serializeTerminalState(P);this._storageService.store("terminal.integrated.bufferState",x,1,1)}async updateTitle(P,x,F){await this._proxy.updateTitle(P,x,F)}async updateIcon(P,x,F,V){await this._proxy.updateIcon(P,x,F,V)}async updateProperty(P,x,F){return this._proxy.updateProperty(P,x,F)}async createProcess(P,x,F,V,W,z,B,K){await this._connectToDirectProxy();const H=await this._shellEnvironmentService.getShellEnv(),U=await this._proxy.createProcess(P,x,F,V,W,z,H,B,K,this._getWorkspaceId(),this._getWorkspaceName()),G=new r.LocalPty(U,K,this._proxy);return this._ptys.set(U,G),G}async attachToProcess(P){await this._connectToDirectProxy();try{await this._proxy.attachToProcess(P);const x=new r.LocalPty(P,!0,this._proxy);return this._ptys.set(P,x),x}catch(x){this._logService.warn(`Couldn't attach to process ${x.message}`)}}async attachToRevivedProcess(P){await this._connectToDirectProxy();try{const x=await this._proxy.getRevivedPtyNewId(this._getWorkspaceId(),P)??P;return await this.attachToProcess(x)}catch(x){this._logService.warn(`Couldn't attach to process ${x.message}`)}}async listProcesses(){return await this._connectToDirectProxy(),this._proxy.listProcesses()}async getLatency(){const P=[],x=new k.StopWatch;this._directProxy&&(await this._directProxy.getLatency(),x.stop(),P.push({label:"window<->ptyhost (message port)",latency:x.elapsed()}),x.reset());const F=await this._localPtyService.getLatency();return x.stop(),P.push({label:"window<->ptyhostservice<->ptyhost",latency:x.elapsed()}),[...P,...F]}async getPerformanceMarks(){return this._proxy.getPerformanceMarks()}async reduceConnectionGraceTime(){this._proxy.reduceConnectionGraceTime()}async getDefaultSystemShell(P){return this._proxy.getDefaultSystemShell(P)}async getProfiles(P,x,F){return this._localPtyService.getProfiles(this._workspaceContextService.getWorkspace().id,P,x,F)||[]}async getEnvironment(){return this._proxy.getEnvironment()}async getShellEnvironment(){return this._shellEnvironmentService.getShellEnv()}async getWslPath(P,x){return this._proxy.getWslPath(P,x)}async setTerminalLayoutInfo(P){const x={workspaceId:this._getWorkspaceId(),tabs:P?P.tabs:[]};await this._proxy.setTerminalLayoutInfo(x),this._storageService.store("terminal.integrated.layoutInfo",JSON.stringify(x),1,1)}async getTerminalLayoutInfo(){const P=this._getWorkspaceId(),x={workspaceId:P},F=this._storageService.get("terminal.integrated.bufferState",1),V=this._deserializeTerminalState(F);if(V&&V.length>0)try{const W=this._historyService.getLastActiveWorkspaceRoot(),z=W?this._workspaceContextService.getWorkspaceFolder(W)??void 0:void 0,B=u.createVariableResolver(z,await this._terminalProfileResolverService.getEnvironment(this.remoteAuthority),this._configurationResolverService);(0,E.mark)("code/terminal/willGetReviveEnvironments"),await Promise.all(V.map(H=>new Promise(U=>{this._resolveEnvironmentForRevive(B,H.shellLaunchConfig).then(G=>{H.processLaunchConfig.env=G,U()})}))),(0,E.mark)("code/terminal/didGetReviveEnvironments"),(0,E.mark)("code/terminal/willReviveTerminalProcesses"),await this._proxy.reviveTerminalProcesses(P,V,Intl.DateTimeFormat().resolvedOptions().locale),(0,E.mark)("code/terminal/didReviveTerminalProcesses"),this._storageService.remove("terminal.integrated.bufferState",1);const K=this._storageService.get("terminal.integrated.layoutInfo",1);K&&((0,E.mark)("code/terminal/willSetTerminalLayoutInfo"),await this._proxy.setTerminalLayoutInfo(JSON.parse(K)),(0,E.mark)("code/terminal/didSetTerminalLayoutInfo"),this._storageService.remove("terminal.integrated.layoutInfo",1))}catch(W){this._logService.warn("LocalTerminalBackend#getTerminalLayoutInfo Error",W&&typeof W=="object"&&"message"in W?W.message:W)}return this._proxy.getTerminalLayoutInfo(x)}async _resolveEnvironmentForRevive(P,x){const F=y.isWindows?"windows":y.isMacintosh?"osx":"linux",V=this._configurationService.getValue(`terminal.integrated.env.${F}`),W=await(x.useShellEnvironment?this.getShellEnvironment():this.getEnvironment()),z=await u.createTerminalEnvironment(x,V,P,this._productService.version,this._configurationService.getValue("terminal.integrated.detectLocale"),W);if(!x.strictEnv&&!x.hideFromUser){const B=u.getWorkspaceForTerminal(x.cwd,this._workspaceContextService,this._historyService);await this._environmentVariableService.mergedCollection.applyToProcessEnvironment(z,{workspaceFolder:B},P)}return z}_getWorkspaceName(){return this._labelService.getWorkspaceLabel(this._workspaceContextService.getWorkspace())}};fe([A.memoize],M.prototype,"getEnvironment",null),fe([A.memoize],M.prototype,"getShellEnvironment",null),M=fe([O(0,S.IWorkspaceContextService),O(1,C.ILifecycleService),O(2,m.ITerminalLogService),O(3,m.ILocalPtyService),O(4,T.ILabelService),O(5,s.IShellEnvironmentService),O(6,v.IStorageService),O(7,i.IConfigurationResolverService),O(8,b.IConfigurationService),O(9,d.IProductService),O(10,o.IHistoryService),O(11,a.ITerminalProfileResolverService),O(12,p.IEnvironmentVariableService),O(13,o.IHistoryService),O(14,l.INativeWorkbenchEnvironmentService),O(15,_.IStatusbarService),O(16,L.IRemoteAgentService)],M)}),define(Q[4075],Y([1,0,3098,4,72,177,14,223,23,34,6,35,111,1127,38,7,436,46,104,257,54,1847]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressService=void 0;let l=class extends y.Disposable{constructor(g,w,E,C,I,_,A,k){super(),this.activityService=g,this.paneCompositeService=w,this.viewDescriptorService=E,this.viewsService=C,this.notificationService=I,this.statusbarService=_,this.layoutService=A,this.keybindingService=k,this.windowProgressStack=[],this.windowProgressStatusEntry=void 0}async withProgress(g,w,E){const{location:C}=g,I=_=>{const A=this.viewDescriptorService.getViewContainerById(_);if(A){const k=this.viewDescriptorService.getViewContainerLocation(A);if(k!==null)return this.withPaneCompositeProgress(_,k,w,{...g,location:_})}if(this.viewDescriptorService.getViewDescriptorById(_)!==null)return this.withViewProgress(_,w,{...g,location:_});if(this.viewDescriptorService.getViewLocationById(_)===3)return w({report:()=>{}});throw new Error(`Bad progress location: ${_}`)};if(typeof C=="string")return I(C);switch(C){case 15:return this.withNotificationProgress({...g,location:C,priority:this.notificationService.doNotDisturbMode?v.NotificationPriority.SILENT:void 0},w,E);case 10:{const _=g.type;return g.command?this.withWindowProgress({...g,location:C,type:_},w):this.withNotificationProgress({delay:150,...g,priority:v.NotificationPriority.SILENT,location:15,type:_},w,E)}case 1:return this.withPaneCompositeProgress("workbench.view.explorer",0,w,{...g,location:C});case 3:return I("workbench.scm");case 5:return this.withPaneCompositeProgress("workbench.view.extensions",0,w,{...g,location:C});case 20:return this.withDialogProgress(g,w,E);default:throw new Error(`Bad progress location: ${C}`)}}withWindowProgress(g,w){const E=[g,new b.Progress(()=>this.updateWindowProgress())],C=w(E[1]);let I=setTimeout(()=>{I=void 0,this.windowProgressStack.unshift(E),this.updateWindowProgress(),Promise.all([(0,T.timeout)(150),C]).finally(()=>{const _=this.windowProgressStack.indexOf(E);this.windowProgressStack.splice(_,1),this.updateWindowProgress()})},150);return C.finally(()=>clearTimeout(I))}updateWindowProgress(g=0){if(g<this.windowProgressStack.length){const[w,E]=this.windowProgressStack[g],C=w.title,I=E.value&&E.value.message,_=w.command;let A,k;const L=w.source&&typeof w.source!="string"?w.source.label:w.source;if(C&&I)A=(0,t.localize)(0,null,C,I),k=L?(0,t.localize)(1,null,L,C,I):A;else if(C)A=C,k=L?(0,t.localize)(2,null,L,C):A;else if(I)A=I,k=L?(0,t.localize)(3,null,L,I):A;else{this.updateWindowProgress(g+1);return}const R={name:(0,t.localize)(4,null),text:A,showProgress:w.type||!0,ariaLabel:A,tooltip:k,command:_};this.windowProgressStatusEntry?this.windowProgressStatusEntry.update(R):this.windowProgressStatusEntry=this.statusbarService.addEntry(R,"status.progress",0)}else this.windowProgressStatusEntry?.dispose(),this.windowProgressStatusEntry=void 0}withNotificationProgress(g,w,E){const C=new class extends y.Disposable{get step(){return this._step}get done(){return this._done}constructor(){super(),this._onDidReport=this._register(new S.Emitter),this.onDidReport=this._onDidReport.event,this._onWillDispose=this._register(new S.Emitter),this.onWillDispose=this._onWillDispose.event,this._step=void 0,this._done=!1,this.promise=w(this),this.promise.finally(()=>{this.dispose()})}report(P){this._step=P,this._onDidReport.fire(P)}cancel(P){E?.(P),this.dispose()}dispose(){this._done=!0,this._onWillDispose.fire(),super.dispose()}},I=()=>{const P=new T.DeferredPromise;return this.withWindowProgress({location:10,title:g.title?(0,o.parseLinkedText)(g.title).toString():void 0,command:"notifications.showList",type:g.type},x=>{function F(W){W.message&&x.report({message:(0,o.parseLinkedText)(W.message).toString()})}C.step&&F(C.step);const V=C.onDidReport(W=>F(W));return P.p.finally(()=>V.dispose()),S.Event.once(C.onWillDispose)(()=>P.complete()),P.p}),(0,y.toDisposable)(()=>P.complete())},_=(P,x,F)=>{const V=new y.DisposableStore,W=g.primaryActions?Array.from(g.primaryActions):[],z=g.secondaryActions?Array.from(g.secondaryActions):[];if(g.buttons&&g.buttons.forEach((U,G)=>{const $=new class extends m.Action{constructor(){super(`progress.button.${U}`,U,void 0,!0)}async run(){C.cancel(G)}};V.add($),W.push($)}),g.cancellable){const U=new class extends m.Action{constructor(){super("progress.cancel",(0,t.localize)(5,null),void 0,!0)}async run(){C.cancel()}};V.add(U),W.push(U)}const B=this.notificationService.notify({severity:v.Severity.Info,message:(0,p.stripIcons)(P),source:g.source,actions:{primary:W,secondary:z},progress:typeof F=="number"&&F>=0?{total:100,worked:F}:{infinite:!0},priority:x});let K;const H=U=>{(0,y.dispose)(K),!U&&!C.done&&(K=I())};return V.add(B.onDidChangeVisibility(H)),x===v.NotificationPriority.SILENT&&H(!1),S.Event.once(B.onDidClose)(()=>V.dispose()),B},A=(P,x)=>{typeof x=="number"&&x>=0?(P.progress.total(100),P.progress.worked(x)):P.progress.infinite()};let k,L,R;const M=P=>{P?.message&&g.title?R=`${g.title}: ${P.message}`:R=g.title||P?.message,!k&&R&&(typeof g.delay=="number"&&g.delay>0?typeof L!="number"&&(L=setTimeout(()=>k=_(R,g.priority,P?.increment),g.delay)):k=_(R,g.priority,P?.increment)),k&&(R&&k.updateMessage(R),typeof P?.increment=="number"&&A(k,P.increment))};M(C.step);const N=C.onDidReport(P=>M(P));return S.Event.once(C.onWillDispose)(()=>N.dispose()),(async()=>{try{typeof g.delay=="number"&&g.delay>0?await C.promise:await Promise.all([(0,T.timeout)(800),C.promise])}finally{clearTimeout(L),k?.close()}})(),C.promise}withPaneCompositeProgress(g,w,E,C){const I=this.paneCompositeService.getProgressIndicator(g,w),_=I?this.withCompositeProgress(I,E,C):E({report:()=>{}});return w===0&&this.showOnActivityBar(g,C,_),_}withViewProgress(g,w,E){const C=this.viewsService.getViewProgressIndicator(g),I=C?this.withCompositeProgress(C,w,E):w({report:()=>{}});if(this.viewDescriptorService.getViewLocationById(g)!==0)return I;const A=this.viewDescriptorService.getViewContainerByViewId(g)?.id;return A===void 0||this.showOnActivityBar(A,E,I),I}showOnActivityBar(g,w,E){let C,I=setTimeout(()=>{I=void 0;const _=this.activityService.showViewContainerActivity(g,{badge:new f.ProgressBadge(()=>""),clazz:"progress-badge",priority:100}),A=Date.now(),k=300;C={dispose(){const L=Date.now()-A;L<k?setTimeout(()=>_.dispose(),k-L):_.dispose()}}},w.delay||300);E.finally(()=>{clearTimeout(I),(0,y.dispose)(C)})}withCompositeProgress(g,w,E){let C;function I(A){let k,L;return typeof A<"u"&&(typeof A=="number"?k=A:typeof A.increment=="number"&&(k=A.total??100,L=A.increment)),typeof k=="number"?(C||(C=g.show(k,E.delay),_.catch(()=>{}).finally(()=>C?.done())),typeof L=="number"&&C.worked(L)):(C?.done(),g.showWhile(_,E.delay)),C}const _=w({report:A=>{I(A)}});return I(E.total),_}withDialogProgress(g,w,E){const C=new y.DisposableStore,I=["workbench.action.quit","workbench.action.reloadWindow","copy","cut","editor.action.clipboardCopyAction","editor.action.clipboardCutAction"];let _;const A=P=>{const x=g.buttons||[];return g.sticky||x.push(g.cancellable?(0,t.localize)(6,null):(0,t.localize)(7,null)),_=new r.Dialog(this.layoutService.container,P,x,{type:"pending",detail:g.detail,cancelId:x.length-1,disableCloseAction:g.sticky,disableDefaultAction:g.sticky,keyEventProcessor:F=>{const V=this.keybindingService.softDispatch(F,this.layoutService.container);V.kind===2&&V.commandId&&(I.includes(V.commandId)||s.EventHelper.stop(F,!0))},buttonStyles:c.defaultButtonStyles,checkboxStyles:c.defaultCheckboxStyles,inputBoxStyles:c.defaultInputBoxStyles,dialogStyles:c.defaultDialogStyles}),C.add(_),_.show().then(F=>{E?.(F.button),(0,y.dispose)(_)}),_};let k=g.delay??0,L;const R=C.add(new T.RunOnceScheduler(()=>{k=0,L&&!_?_=A(L):L&&_.updateMessage(L)},0)),M=function(P){L=P,R.isScheduled()||R.schedule(k)},N=w({report:P=>{M(P.message)}});return N.finally(()=>{(0,y.dispose)(C)}),g.title&&M(g.title),N}};e.ProgressService=l,e.ProgressService=l=fe([O(0,f.IActivityService),O(1,d.IPaneCompositePartService),O(2,u.IViewDescriptorService),O(3,u.IViewsService),O(4,v.INotificationService),O(5,D.IStatusbarService),O(6,a.ILayoutService),O(7,i.IKeybindingService)],l),(0,h.registerSingleton)(b.IProgressService,l,1)}),define(Q[4076],Y([1,0,3453]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeWorkbenchStorageService=void 0;class y extends t.RemoteStorageService{constructor(D,T,f,v,m){super(D,{currentProfile:T.currentProfile,defaultProfile:f.defaultProfile},v,m),this.userDataProfileService=T,this.registerListeners()}registerListeners(){this._register(this.userDataProfileService.onDidChangeCurrentProfile(D=>D.join(this.switchToProfile(D.profile))))}}e.NativeWorkbenchStorageService=y}),define(Q[4077],Y([1,0,128]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleCompletionItem=void 0;class y{constructor(D){this.completion=D,this.score=t.FuzzyScore.Default,this.distance=0,this.labelLow=this.completion.label.toLowerCase()}}e.SimpleCompletionItem=y}),define(Q[4078],Y([1,0,20,128]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleCompletionModel=e.LineContext=void 0;class b{constructor(v,m){this.leadingLineContent=v,this.characterCountDelta=m}}e.LineContext=b;var D;(function(f){f[f.Nothing=0]="Nothing",f[f.All=1]="All",f[f.Incr=2]="Incr"})(D||(D={}));class T{constructor(v,m,S,h){this._items=v,this._lineContext=m,this.replacementIndex=S,this.replacementLength=h,this._refilterKind=1,this._fuzzyScoreOptions=y.FuzzyScoreOptions.default,this._options={}}get items(){return this._ensureCachedState(),this._filteredItems}get stats(){return this._ensureCachedState(),this._stats}get lineContext(){return this._lineContext}set lineContext(v){(this._lineContext.leadingLineContent!==v.leadingLineContent||this._lineContext.characterCountDelta!==v.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<v.characterCountDelta&&this._filteredItems?2:1,this._lineContext=v)}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){const v=[],{leadingLineContent:m,characterCountDelta:S}=this._lineContext;let h="",a="";const r=this._refilterKind===1?this._items:this._filteredItems,i=[],s=!this._options.filterGraceful||r.length>2e3?y.fuzzyScore:y.fuzzyScoreGracefulAggressive;for(let o=0;o<r.length;o++){const u=r[o],d=this.replacementLength,p=d+S;if(h.length!==p&&(h=p===0?"":m.slice(-p),a=h.toLowerCase()),u.word=h,p===0)u.score=y.FuzzyScore.Default;else{let c=0;for(;c<d;){const l=h.charCodeAt(c);if(l===32||l===9)c+=1;else break}if(c>=p)u.score=y.FuzzyScore.Default;else{const l=s(h,a,c,u.completion.label,u.labelLow,0,this._fuzzyScoreOptions);if(!l)continue;u.score=l}}u.idx=o,u.distance=1,i.push(u),v.push(u.completion.label.length)}this._filteredItems=i,this._refilterKind=0,this._stats={pLabelLen:v.length?(0,t.quickSelect)(v.length-.85,v,(o,u)=>o-u):0}}}e.SimpleCompletionModel=T}),define(Q[4079],Y([1,0,7,306,32,6,128,4,37]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleSuggestWidgetItemRenderer=e.getAriaId=void 0;function m(a){return`simple-suggest-aria-id:${a}`}e.getAriaId=m;class S{constructor(){this._onDidToggleDetails=new D.Emitter,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(r){const i=new f.DisposableStore,s=r;s.classList.add("show-file-icons");const o=(0,t.append)(r,(0,t.$)(".icon")),u=(0,t.append)(o,(0,t.$)("span.colorspan")),d=(0,t.append)(r,(0,t.$)(".contents")),p=(0,t.append)(d,(0,t.$)(".main")),c=(0,t.append)(p,(0,t.$)(".icon-label.codicon")),l=(0,t.append)(p,(0,t.$)("span.left")),n=(0,t.append)(p,(0,t.$)("span.right")),g=new y.IconLabel(l,{supportHighlights:!0,supportIcons:!0});i.add(g);const w=(0,t.append)(l,(0,t.$)("span.signature-label")),E=(0,t.append)(l,(0,t.$)("span.qualifier-label")),C=(0,t.append)(n,(0,t.$)("span.details-label"));return(()=>{const _="Hack",A="",k="12",L="20",R="normal",M="0",N=`${k}px`,P=`${L}px`,x=`${M}px`;s.style.fontSize=N,s.style.fontWeight=R,s.style.letterSpacing=x,p.style.fontFamily=_,p.style.fontFeatureSettings=A,p.style.lineHeight=P,o.style.height=P,o.style.width=P})(),{root:s,left:l,right:n,icon:o,colorspan:u,iconLabel:g,iconContainer:c,parametersLabel:w,qualifierLabel:E,detailsLabel:C,disposables:i}}renderElement(r,i,s){const{completion:o}=r;s.root.id=m(i),s.colorspan.style.backgroundColor="";const u={labelEscapeNewLines:!0,matches:(0,T.createMatches)(r.score)};s.icon.className="icon hide",s.iconContainer.className="",s.iconContainer.classList.add("suggest-icon",...v.ThemeIcon.asClassNameArray(o.icon||b.Codicon.symbolText)),s.iconLabel.setLabel(o.label,void 0,u),s.parametersLabel.textContent="",s.detailsLabel.textContent=h(o.detail||""),s.root.classList.add("string-label"),(0,t.show)(s.detailsLabel),s.right.classList.remove("can-expand-details")}disposeTemplate(r){r.disposables.dispose()}}e.SimpleSuggestWidgetItemRenderer=S;function h(a){return a.replace(/\r\n|\r|\n/g,"")}}),define(Q[4080],Y([1,0,7,179,668,4079,14,6,4,226,3103,5,1243,1848]),function(q,e,t,y,b,D,T,f,v,m,S,h,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleSuggestWidget=void 0;const r=t.$;var i;(function(u){u[u.Hidden=0]="Hidden",u[u.Loading=1]="Loading",u[u.Empty=2]="Empty",u[u.Open=3]="Open",u[u.Frozen=4]="Frozen",u[u.Details=5]="Details"})(i||(i={}));var s;(function(u){u[u.Above=0]="Above",u[u.Below=1]="Below"})(s||(s={}));let o=class{get list(){return this._list}constructor(d,p,c,l){this._container=d,this._persistedSize=p,this._state=0,this._forceRenderingAbove=!1,this._pendingLayout=new v.MutableDisposable,this._showTimeout=new T.TimeoutTimer,this._disposables=new v.DisposableStore,this._onDidSelect=new f.Emitter,this.onDidSelect=this._onDidSelect.event,this._onDidHide=new f.Emitter,this.onDidHide=this._onDidHide.event,this._onDidShow=new f.Emitter,this.onDidShow=this._onDidShow.event,this.element=new b.ResizableHTMLElement,this.element.domNode.classList.add("workbench-suggest-widget"),this._container.appendChild(this.element.domNode);class n{constructor(C,I,_=!1,A=!1){this.persistedSize=C,this.currentSize=I,this.persistHeight=_,this.persistWidth=A}}let g;this._disposables.add(this.element.onDidWillResize(()=>{g=new n(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(E=>{if(this._resize(E.dimension.width,E.dimension.height),g&&(g.persistHeight=g.persistHeight||!!E.north||!!E.south,g.persistWidth=g.persistWidth||!!E.east||!!E.west),!!E.done){if(g){const{itemHeight:C,defaultSize:I}=this._getLayoutInfo(),_=Math.round(C/2);let{width:A,height:k}=this.element.size;(!g.persistHeight||Math.abs(g.currentSize.height-k)<=_)&&(k=g.persistedSize?.height??I.height),(!g.persistWidth||Math.abs(g.currentSize.width-A)<=_)&&(A=g.persistedSize?.width??I.width),this._persistedSize.store(new t.Dimension(A,k))}g=void 0}}));const w=new D.SimpleSuggestWidgetItemRenderer;this._disposables.add(w),this._listElement=t.append(this.element.domNode,r(".tree")),this._list=new y.List("SuggestWidget",this._listElement,{getHeight:E=>this._getLayoutInfo().itemHeight,getTemplateId:E=>"suggestion"},[w],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>(0,S.localize)(0,null),getWidgetRole:()=>"listbox",getAriaLabel:E=>{let C=E.completion.label;if(typeof E.completion.label!="string"){const{detail:_,description:A}=E.completion.label;_&&A?C=(0,S.localize)(1,null,C,_,A):_?C=(0,S.localize)(2,null,C,_):A&&(C=(0,S.localize)(3,null,C,A))}const{detail:I}=E.completion;return(0,S.localize)(4,null,C,I)}}}),c.statusBarMenuId&&(this._status=l.createInstance(a.SuggestWidgetStatus,this.element.domNode,c.statusBarMenuId),this.element.domNode.classList.toggle("with-status-bar",!0)),this._disposables.add(this._list.onMouseDown(E=>this._onListMouseDownOrTap(E))),this._disposables.add(this._list.onTap(E=>this._onListMouseDownOrTap(E))),this._disposables.add(this._list.onDidChangeSelection(E=>this._onListSelection(E)))}dispose(){this._disposables.dispose(),this._status?.dispose(),this.element.dispose()}showSuggestions(d,p,c,l,n){if(this._cursorPosition=n,this._completionModel!==d&&(this._completionModel=d),c&&this._state!==2&&this._state!==0){this._setState(4);return}if(this._completionModel.items.length===0){this._setState(l?0:2),this._completionModel=void 0;return}try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(c?4:3),this._list.reveal(p,0),this._list.setFocus([p])}finally{}this._pendingLayout.value=t.runAtThisOrScheduleAtNextAnimationFrame(()=>{this._pendingLayout.clear(),this._layout(this.element.size)})}setLineContext(d){this._completionModel&&(this._completionModel.lineContext=d)}_setState(d){if(this._state!==d)switch(this._state=d,this.element.domNode.classList.toggle("frozen",d===4),this.element.domNode.classList.remove("message"),d){case 0:t.hide(this._listElement),this._status&&t.hide(this._status?.element),this._status?.hide(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._cappedHeight=void 0;break;case 1:this.element.domNode.classList.add("message"),t.hide(this._listElement),this._status&&t.hide(this._status?.element),this._show();break;case 2:this.element.domNode.classList.add("message"),t.hide(this._listElement),this._status&&t.hide(this._status?.element),this._show();break;case 3:t.show(this._listElement),this._status&&t.show(this._status?.element),this._show();break;case 4:t.show(this._listElement),this._status&&t.show(this._status?.element),this._show();break;case 5:t.show(this._listElement),this._status&&t.show(this._status?.element),this._show();break}}_show(){this._status?.show(),t.show(this.element.domNode),this._layout(this._persistedSize.restore()),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}hide(){this._pendingLayout.clear(),this._setState(0),this._onDidHide.fire(this),t.hide(this.element.domNode),this.element.clearSashHoverState();const d=this._persistedSize.restore(),p=Math.ceil(this._getLayoutInfo().itemHeight*4.3);d&&d.height<p&&this._persistedSize.store(d.with(void 0,p))}_layout(d){if(!this._cursorPosition)return;const p=t.getClientArea(document.body),c=this._getLayoutInfo();d||(d=c.defaultSize);let l=d.height,n=d.width;this._status&&(this._status.element.style.lineHeight=`${c.itemHeight}px`);const g=p.width-c.borderHeight-2*c.horizontalPadding;n>g&&(n=g);const w=this._completionModel?this._completionModel.stats.pLabelLen*c.typicalHalfwidthCharacterWidth:n,E=c.statusBarHeight+this._list.contentHeight+c.borderHeight,C=c.itemHeight+c.statusBarHeight,I=t.getDomNodePagePosition(this._container),_=this._cursorPosition,A=I.top+_.top+_.height,k=Math.min(p.height-A-c.verticalPadding,E),L=I.top+_.top-c.verticalPadding,R=Math.min(L,E);let M=Math.min(Math.max(R,k)+c.borderHeight,E);l===this._cappedHeight?.capped&&(l=this._cappedHeight.wanted),l<C&&(l=C),l>M&&(l=M);const N=150;l>k||this._forceRenderingAbove&&L>N?(this._preference=0,this.element.enableSashes(!0,!0,!1,!1),M=R):(this._preference=1,this.element.enableSashes(!1,!0,!0,!1),M=k),this.element.preferredSize=new t.Dimension(w,c.defaultSize.height),this.element.maxSize=new t.Dimension(g,M),this.element.minSize=new t.Dimension(220,C),this._cappedHeight=l===E?{wanted:this._cappedHeight?.wanted??d.height,capped:l}:void 0,this.element.domNode.style.left=`${this._cursorPosition.left}px`,this._preference===0?this.element.domNode.style.top=`${this._cursorPosition.top-l-c.borderHeight}px`:this.element.domNode.style.top=`${this._cursorPosition.top+this._cursorPosition.height}px`,this._resize(n,l)}_resize(d,p){const{width:c,height:l}=this.element.maxSize;d=Math.min(c,d),l&&(p=Math.min(l,p));const{statusBarHeight:n}=this._getLayoutInfo();this._list.layout(p-n,d),this._listElement.style.height=`${p-n}px`,this._listElement.style.width=`${d}px`,this._listElement.style.height=`${p}px`,this.element.layout(p,d)}_getLayoutInfo(){const d={lineHeight:20,typicalHalfwidthCharacterWidth:10},p=(0,m.clamp)(d.lineHeight,8,1e3),c=0;//!this.editor.getOption(EditorOption.suggest).showStatusBar || this._state === State.Empty || this._state === State.Loading ? 0 : itemHeight; const l=1,n=2*l;return{itemHeight:p,statusBarHeight:c,borderWidth:l,borderHeight:n,typicalHalfwidthCharacterWidth:d.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new t.Dimension(430,c+12*p+n)}}_onListMouseDownOrTap(d){typeof d.element>"u"||typeof d.index>"u"||(d.browserEvent.preventDefault(),d.browserEvent.stopPropagation(),this._select(d.element,d.index))}_onListSelection(d){d.elements.length&&this._select(d.elements[0],d.indexes[0])}_select(d,p){const c=this._completionModel;c&&this._onDidSelect.fire({item:d,index:p,model:c})}selectNext(){this._list.focusNext(1,!0);const d=this._list.getFocus();return d.length>0&&this._list.reveal(d[0]),!0}selectNextPage(){this._list.focusNextPage();const d=this._list.getFocus();return d.length>0&&this._list.reveal(d[0]),!0}selectPrevious(){this._list.focusPrevious(1,!0);const d=this._list.getFocus();return d.length>0&&this._list.reveal(d[0]),!0}selectPreviousPage(){this._list.focusPreviousPage();const d=this._list.getFocus();return d.length>0&&this._list.reveal(d[0]),!0}getFocusedItem(){if(this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};e.SimpleSuggestWidget=o,e.SimpleSuggestWidget=o=fe([O(3,h.IInstantiationService)],o)}),define(Q[4081],Y([1,0,7,4077,4078,4080,14,32,6,4,1244,5,24,36,54]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAddon=void 0;var s;(function(c){c[c.VSCode=633]="VSCode"})(s||(s={}));var o;(function(c){c.Completions="Completions",c.CompletionsBash="CompletionsBash",c.CompletionsBashFirstWord="CompletionsBashFirstWord"})(o||(o={}));const u={0:f.Codicon.symbolText,1:f.Codicon.history,2:f.Codicon.symbolMethod,3:f.Codicon.symbolFile,4:f.Codicon.folder,5:f.Codicon.symbolProperty,6:f.Codicon.symbolMethod,7:f.Codicon.symbolVariable,8:f.Codicon.symbolValue,9:f.Codicon.symbolVariable,10:f.Codicon.symbolNamespace,11:f.Codicon.symbolInterface,12:f.Codicon.symbolKeyword,13:f.Codicon.symbolKeyword};let d=class extends m.Disposable{constructor(l,n){super(),this._terminalSuggestWidgetVisibleContextKey=l,this._instantiationService=n,this._enableWidget=!0,this._cursorIndexStart=0,this._cursorIndexDelta=0,this._onBell=this._register(new v.Emitter),this.onBell=this._onBell.event,this._onAcceptedCompletion=this._register(new v.Emitter),this.onAcceptedCompletion=this._onAcceptedCompletion.event,this._cachedBashAliases=new Set,this._cachedBashBuiltins=new Set,this._cachedBashCommands=new Set,this._cachedBashKeywords=new Set}activate(l){this._terminal=l,this._register(l.parser.registerOscHandler(633,n=>this._handleVSCodeSequence(n))),this._register(l.onData(n=>{this._handleTerminalInput(n)}))}setContainer(l){this._container=l}_handleVSCodeSequence(l){if(!this._terminal)return!1;const[n,...g]=l.split(";");switch(n){case"Completions":return this._handleCompletionsSequence(this._terminal,l,n,g),!0;case"CompletionsBash":return this._handleCompletionsBashSequence(this._terminal,l,n,g),!0;case"CompletionsBashFirstWord":return this._handleCompletionsBashFirstWordSequence(this._terminal,l,n,g)}return!1}_handleCompletionsSequence(l,n,g,w){if(!l.element||!this._enableWidget)return;const E=parseInt(w[0]),C=parseInt(w[1]);if(this._cursorIndexStart=parseInt(w[2]),!w[3]){this._onBell.fire();return}let I=JSON.parse(n.slice(g.length+w[0].length+w[1].length+w[2].length+4));Array.isArray(I)||(I=[I]);const _=I.map(k=>new y.SimpleCompletionItem({label:k.CompletionText,icon:u[k.ResultType],detail:k.ToolTip}));this._leadingLineContent=_[0].completion.label.slice(0,C),this._cursorIndexDelta=0;const A=new b.SimpleCompletionModel(_,new b.LineContext(this._leadingLineContent,E),E,C);if(_.length===1&&_[0].completion.label.substring(C).length===0){this._onBell.fire();return}this._handleCompletionModel(A)}_handleCompletionsBashFirstWordSequence(l,n,g,w){const E=w[0],C=n.slice(g.length+E.length+2).split(";");let I;switch(E){case"alias":I=this._cachedBashAliases;break;case"builtin":I=this._cachedBashBuiltins;break;case"command":I=this._cachedBashCommands;break;case"keyword":I=this._cachedBashKeywords;break;default:return!1}I.clear();const _=new Set;for(const A of C)_.add(A);for(const A of _)I.add(new y.SimpleCompletionItem({label:A,icon:f.Codicon.symbolString,detail:E}));return this._cachedFirstWord=void 0,!0}_handleCompletionsBashSequence(l,n,g,w){if(!l.element)return;let E=parseInt(w[0]);const C=parseInt(w[1]);if(!w[2]){this._onBell.fire();return}const I=n.slice(g.length+w[0].length+w[1].length+w[2].length+4).split(";");let _;if(E!==100&&I.length>0?_=I.map(k=>new y.SimpleCompletionItem({label:k,icon:f.Codicon.symbolProperty})):(E=0,this._cachedFirstWord||(this._cachedFirstWord=[...this._cachedBashAliases,...this._cachedBashBuiltins,...this._cachedBashCommands,...this._cachedBashKeywords],this._cachedFirstWord.sort((k,L)=>{const R=k.completion.label.charCodeAt(0),M=L.completion.label.charCodeAt(0),N=R<65||R>90&&R<97||R>122?1:0,P=M<65||M>90&&M<97||M>122?1:0;return N!==P?N-P:k.completion.label.localeCompare(L.completion.label)})),_=this._cachedFirstWord),_.length===0)return;this._leadingLineContent=_[0].completion.label.slice(0,C);const A=new b.SimpleCompletionModel(_,new b.LineContext(this._leadingLineContent,E),E,C);if(_.length===1&&_[0].completion.label.substring(C).length===0){this._onBell.fire();return}this._handleCompletionModel(A)}_handleCompletionModel(l){if(l.items.length===0||!this._terminal?.element)return;if(l.items.length===1){this.acceptSelectedSuggestion({item:l.items[0],model:l});return}const n=this._ensureSuggestWidget(this._terminal);this._additionalInput=void 0;const g={width:this._terminal._core._renderService.dimensions.device.cell.width,height:this._terminal._core._renderService.dimensions.device.cell.height};if(!g.width||!g.height)return;const w=this._terminal.element.getBoundingClientRect(),C=t.findParentWithClass(this._container,"panel").offsetParent.getBoundingClientRect();if(n.showSuggestions(l,0,!1,!1,{left:w.left-C.left+this._terminal.buffer.active.cursorX*g.width,top:w.top-C.top+this._terminal.buffer.active.cursorY*g.height,height:g.height}),this._inputQueue){const I=this._inputQueue;this._inputQueue=void 0;for(const _ of I)this._handleTerminalInput(_)}}_ensureSuggestWidget(l){return this._terminalSuggestWidgetVisibleContextKey.set(!0),this._suggestWidget||(this._suggestWidget=this._register(this._instantiationService.createInstance(D.SimpleSuggestWidget,t.findParentWithClass(this._container,"panel"),this._instantiationService.createInstance(p),{})),this._suggestWidget.list.style((0,i.getListStyles)({listInactiveFocusBackground:S.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:r.activeContrastBorder})),this._suggestWidget.onDidSelect(async n=>this.acceptSelectedSuggestion(n)),this._suggestWidget.onDidHide(()=>this._terminalSuggestWidgetVisibleContextKey.set(!1)),this._suggestWidget.onDidShow(()=>this._terminalSuggestWidgetVisibleContextKey.set(!0))),this._suggestWidget}selectPreviousSuggestion(){this._suggestWidget?.selectPrevious()}selectPreviousPageSuggestion(){this._suggestWidget?.selectPreviousPage()}selectNextSuggestion(){this._suggestWidget?.selectNext()}selectNextPageSuggestion(){this._suggestWidget?.selectNextPage()}acceptSelectedSuggestion(l){l||(l=this._suggestWidget?.getFocusedItem()),l&&this._leadingLineContent&&(this._suggestWidget?.hide(),this._onAcceptedCompletion.fire(["\x1B[D".repeat(Math.max(l.model.replacementLength-this._cursorIndexStart+this._cursorIndexDelta,0)),"\x1B[3~".repeat(this._additionalInput?.length??0),"\x7F".repeat(l.model.replacementLength),l.item.completion.label].join("")),this._enableWidget=!1,(0,T.timeout)(100).then(n=>this._enableWidget=!0))}hideSuggestWidget(){this._suggestWidget?.hide()}handleNonXtermData(l){this._handleTerminalInput(l)}_handleTerminalInput(l){if(!this._terminal||!this._enableWidget||!this._terminalSuggestWidgetVisibleContextKey.get()){l==="-"?this._inputQueue=[]:this._inputQueue?.push(l);return}let n=!1;if(l==="\x7F"&&this._additionalInput&&this._additionalInput.length>0&&this._cursorIndexDelta>0&&(n=!0,this._additionalInput=this._additionalInput.substring(0,this._cursorIndexDelta---1)+this._additionalInput.substring(this._cursorIndexDelta)),l==="\x1B[3~"&&this._additionalInput&&this._additionalInput.length>0&&this._cursorIndexDelta<this._additionalInput.length-1&&(n=!0,this._additionalInput=this._additionalInput.substring(0,this._cursorIndexDelta)+this._additionalInput.substring(this._cursorIndexDelta+1)),l==="\x1B[D"&&this._cursorIndexDelta>0&&(n=!0,this._cursorIndexDelta--),l==="\x1B[C"&&(n=!0,this._cursorIndexDelta+=1),l.match(/^[a-z0-9]$/i)&&(n=!0,this._additionalInput===void 0&&(this._additionalInput=""),this._additionalInput+=l,this._cursorIndexDelta++),n){if(this._terminalSuggestWidgetVisibleContextKey.get()&&this._suggestWidget?.setLineContext(new b.LineContext(this._leadingLineContent+(this._additionalInput??""),this._additionalInput?.length??0)),this._suggestWidget._completionModel?.items.length===0){this._additionalInput=void 0,this.hideSuggestWidget();return}const g={width:this._terminal._core._renderService.dimensions.device.cell.width,height:this._terminal._core._renderService.dimensions.device.cell.height};if(!g.width||!g.height)return;const w=this._terminal.element.getBoundingClientRect(),C=t.findParentWithClass(this._container,"panel").offsetParent.getBoundingClientRect();this._suggestWidget?.showSuggestions(this._suggestWidget._completionModel,0,!1,!1,{left:w.left-C.left+this._terminal.buffer.active.cursorX*g.width,top:w.top-C.top+this._terminal.buffer.active.cursorY*g.height,height:g.height})}else this._additionalInput=void 0,this.hideSuggestWidget()}};e.SuggestAddon=d,e.SuggestAddon=d=fe([O(1,h.IInstantiationService)],d);let p=class{constructor(l){this._storageService=l,this._key="terminal.integrated.suggestSize"}restore(){const l=this._storageService.get(this._key,0)??"";try{const n=JSON.parse(l);if(t.Dimension.is(n))return t.Dimension.lift(n)}catch{}}store(l){this._storageService.store(this._key,JSON.stringify(l),0,1)}reset(){this._storageService.remove(this._key,0)}};p=fe([O(0,a.IStorageService)],p)}),define(Q[975],Y([1,0,7,9,4,126,97,11,24,23,3623,2970,19,84,468,3310,5,3954,6,30,493,4081,8,192,68,102,162,129]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I){"use strict";var _;Object.defineProperty(e,"__esModule",{value:!0}),e.getXtermScaledDimensions=e.XtermTerminal=void 0;var A;(function(B){B[B.SlowCanvasRenderThreshold=50]="SlowCanvasRenderThreshold",B[B.NumberOfFramestoMeasure=20]="NumberOfFramestoMeasure",B[B.SmoothScrollDuration=125]="SmoothScrollDuration"})(A||(A={}));let k,L,R,M,N,P;function x(B,K){let H=K.getLine(B);if(!H)return{lineData:void 0,lineIndex:B};let U=H.translateToString(!0);for(;B>0&&H.isWrapped&&(H=K.getLine(--B),!!H);)U=H.translateToString(!1)+U;return{lineData:U,lineIndex:B}}let F=class extends b.DisposableStore{static{_=this}static{this._suggestedRendererType=void 0}static{this._checkedWebglCompatible=!1}get findResult(){return this._lastFindResult}get isStdinDisabled(){return!!this.raw.options.disableStdin}get markTracker(){return this._markNavigationAddon}get shellIntegration(){return this._shellIntegrationAddon}get suggestController(){return this._suggestAddon}get textureAtlas(){const K=this._webglAddon?.textureAtlas||this._canvasAddon?.textureAtlas;if(K)return createImageBitmap(K)}get isFocused(){return!!this.raw.element?.contains(document.activeElement)}constructor(K,H,U,G,$,ie,J,j,ee,X,te,Z,se,re,oe,le,ne,ce){super(),this._configHelper=H,this._backgroundColorProvider=$,this._capabilities=ie,this._terminalSuggestWidgetVisibleContextKey=j,this._configurationService=X,this._instantiationService=te,this._logService=Z,this._notificationService=se,this._storageService=re,this._themeService=oe,this._telemetryService=le,this._clipboardService=ne,this._isPhysicalMouseWheel=C.MouseWheelClassifier.INSTANCE.isPhysicalMouseWheel(),this._attachedDisposables=this.add(new b.DisposableStore),this._onDidRequestRunCommand=this.add(new d.Emitter),this.onDidRequestRunCommand=this._onDidRequestRunCommand.event,this._onDidRequestFocus=this.add(new d.Emitter),this.onDidRequestFocus=this._onDidRequestFocus.event,this._onDidRequestSendText=this.add(new d.Emitter),this.onDidRequestSendText=this._onDidRequestSendText.event,this._onDidRequestFreePort=this.add(new d.Emitter),this.onDidRequestFreePort=this._onDidRequestFreePort.event,this._onDidChangeFindResults=this.add(new d.Emitter),this.onDidChangeFindResults=this._onDidChangeFindResults.event,this._onDidChangeSelection=this.add(new d.Emitter),this.onDidChangeSelection=this._onDidChangeSelection.event,this._onDidChangeFocus=this.add(new d.Emitter),this.onDidChangeFocus=this._onDidChangeFocus.event,this._onDidDispose=this.add(new d.Emitter),this.onDidDispose=this._onDidDispose.event;const ae=this._configHelper.getFont(void 0,!0),ue=this._configHelper.config,de=this._configurationService.getValue("editor");this.raw=this.add(new K({allowProposedApi:!0,cols:U,rows:G,altClickMovesCursor:ue.altClickMovesCursor&&de.multiCursorModifier==="alt",scrollback:ue.scrollback,theme:this._getXtermTheme(),drawBoldTextInBrightColors:ue.drawBoldTextInBrightColors,fontFamily:ae.fontFamily,fontWeight:ue.fontWeight,fontWeightBold:ue.fontWeightBold,fontSize:ae.fontSize,letterSpacing:ae.letterSpacing,lineHeight:ae.lineHeight,logLevel:W(this._logService.getLevel()),logger:this._logService,minimumContrastRatio:ue.minimumContrastRatio,tabStopWidth:ue.tabStopWidth,cursorBlink:ue.cursorBlinking,cursorStyle:z(ue.cursorStyle),cursorInactiveStyle:z(ue.cursorStyleInactive),cursorWidth:ue.cursorWidth,macOptionIsMeta:ue.macOptionIsMeta,macOptionClickForcesSelection:ue.macOptionClickForcesSelection,rightClickSelectsWord:ue.rightClickBehavior==="selectWord",fastScrollModifier:"alt",fastScrollSensitivity:ue.fastScrollSensitivity,scrollSensitivity:ue.mouseWheelScrollSensitivity,wordSeparator:ue.wordSeparators,overviewRulerWidth:10,ignoreBracketedPasteMode:ue.ignoreBracketedPasteMode})),this._updateSmoothScrolling(),this._core=this.raw._core,this.add(this._configurationService.onDidChangeConfiguration(async ge=>{ge.affectsConfiguration("terminal.integrated.gpuAcceleration")&&(_._suggestedRendererType=void 0),(ge.affectsConfiguration("terminal.integrated")||ge.affectsConfiguration("editor.fastScrollSensitivity")||ge.affectsConfiguration("editor.mouseWheelScrollSensitivity")||ge.affectsConfiguration("editor.multiCursorModifier"))&&this.updateConfig(),ge.affectsConfiguration("terminal.integrated.unicodeVersion")&&this._updateUnicodeVersion()})),this.add(this._themeService.onDidColorThemeChange(ge=>this._updateTheme(ge))),this.add(this._logService.onDidChangeLogLevel(ge=>this.raw.options.logLevel=W(ge))),this.add(this.raw.onSelectionChange(()=>{this._onDidChangeSelection.fire(),this.isFocused&&this._anyFocusedTerminalHasSelection.set(this.raw.hasSelection())})),this._updateUnicodeVersion(),this._markNavigationAddon=this._instantiationService.createInstance(S.MarkNavigationAddon,ie),this.raw.loadAddon(this._markNavigationAddon),this._decorationAddon=this._instantiationService.createInstance(u.DecorationAddon,this._capabilities),this._decorationAddon.onDidRequestRunCommand(ge=>this._onDidRequestRunCommand.fire(ge)),this.raw.loadAddon(this._decorationAddon),this._shellIntegrationAddon=new s.ShellIntegrationAddon(J,ee,this._telemetryService,this._logService),this.raw.loadAddon(this._shellIntegrationAddon),this._anyTerminalFocusContextKey=g.TerminalContextKeys.focusInAny.bindTo(ce),this._anyFocusedTerminalHasSelection=g.TerminalContextKeys.textSelectedInFocused.bindTo(ce),this._terminalSuggestWidgetVisibleContextKey&&(this._suggestAddon=this._instantiationService.createInstance(l.SuggestAddon,this._terminalSuggestWidgetVisibleContextKey),this.raw.loadAddon(this._suggestAddon),this._suggestAddon.onAcceptedCompletion(async ge=>{this._onDidRequestFocus.fire(),this._onDidRequestSendText.fire(ge)}))}*getBufferReverseIterator(){for(let K=this.raw.buffer.active.length;K>=0;K--){const{lineData:H,lineIndex:U}=x(K,this.raw.buffer.active);H&&(K=U,yield H)}}async getContentsAsHtml(){if(!this._serializeAddon){const K=await this._getSerializeAddonConstructor();this._serializeAddon=new K,this.raw.loadAddon(this._serializeAddon)}return this._serializeAddon.serializeAsHTML()}async getSelectionAsHtml(K){if(!this._serializeAddon){const U=await this._getSerializeAddonConstructor();this._serializeAddon=new U,this.raw.loadAddon(this._serializeAddon)}if(K){const U=K.getOutput()?.length,G=K.marker?.line;if(!U||!G)throw new Error(`No row ${G} or output length ${U} for command ${K}`);this.raw.select(0,G+1,U-Math.floor(U/this.raw.cols))}const H=this._serializeAddon.serializeAsHTML({onlySelection:!0});return K&&this.raw.clearSelection(),H}attachToElement(K,H){const U={enableGpu:!0,...H};if(this._attached||this.raw.open(K),U.enableGpu&&(this._shouldLoadWebgl()?this._enableWebglRenderer():this._shouldLoadCanvas()&&this._enableCanvasRenderer()),!this.raw.element||!this.raw.textarea)throw new Error("xterm elements not set after open");const G=this._attachedDisposables;return G.clear(),G.add(t.addDisposableListener(this.raw.textarea,"focus",()=>this._setFocused(!0))),G.add(t.addDisposableListener(this.raw.textarea,"blur",()=>this._setFocused(!1))),G.add(t.addDisposableListener(this.raw.textarea,"focusout",()=>this._setFocused(!1))),G.add(t.addDisposableListener(this.raw.element,t.EventType.MOUSE_WHEEL,$=>{const ie=C.MouseWheelClassifier.INSTANCE;ie.acceptStandardWheelEvent(new I.StandardWheelEvent($));const J=ie.isPhysicalMouseWheel();J!==this._isPhysicalMouseWheel&&(this._isPhysicalMouseWheel=J,this._updateSmoothScrolling())},{passive:!0})),this._suggestAddon?.setContainer(K),this._attached={container:K,options:U},this._attached?.container.querySelector(".xterm-screen")}_setFocused(K){this._onDidChangeFocus.fire(K),this._anyTerminalFocusContextKey.set(K),this._anyFocusedTerminalHasSelection.set(K&&this.raw.hasSelection())}write(K,H){this.raw.write(K,H)}resize(K,H){this.raw.resize(K,H)}updateConfig(){const K=this._configHelper.config;this.raw.options.altClickMovesCursor=K.altClickMovesCursor,this._setCursorBlink(K.cursorBlinking),this._setCursorStyle(K.cursorStyle),this._setCursorStyleInactive(K.cursorStyleInactive),this._setCursorWidth(K.cursorWidth),this.raw.options.scrollback=K.scrollback,this.raw.options.drawBoldTextInBrightColors=K.drawBoldTextInBrightColors,this.raw.options.minimumContrastRatio=K.minimumContrastRatio,this.raw.options.tabStopWidth=K.tabStopWidth,this.raw.options.fastScrollSensitivity=K.fastScrollSensitivity,this.raw.options.scrollSensitivity=K.mouseWheelScrollSensitivity,this.raw.options.macOptionIsMeta=K.macOptionIsMeta;const H=this._configurationService.getValue("editor");this.raw.options.altClickMovesCursor=K.altClickMovesCursor&&H.multiCursorModifier==="alt",this.raw.options.macOptionClickForcesSelection=K.macOptionClickForcesSelection,this.raw.options.rightClickSelectsWord=K.rightClickBehavior==="selectWord",this.raw.options.wordSeparator=K.wordSeparators,this.raw.options.customGlyphs=K.customGlyphs,this.raw.options.ignoreBracketedPasteMode=K.ignoreBracketedPasteMode,this._updateSmoothScrolling(),this._attached?.options.enableGpu&&(this._shouldLoadWebgl()?this._enableWebglRenderer():(this._disposeOfWebglRenderer(),this._shouldLoadCanvas()?this._enableCanvasRenderer():this._disposeOfCanvasRenderer()))}_updateSmoothScrolling(){this.raw.options.smoothScrollDuration=this._configHelper.config.smoothScrolling&&this._isPhysicalMouseWheel?125:0}_shouldLoadWebgl(){return!T.isSafari&&this._configHelper.config.gpuAcceleration==="auto"&&_._suggestedRendererType===void 0||this._configHelper.config.gpuAcceleration==="on"}_shouldLoadCanvas(){return this._configHelper.config.gpuAcceleration==="auto"&&(_._suggestedRendererType===void 0||_._suggestedRendererType==="canvas")||this._configHelper.config.gpuAcceleration==="canvas"}forceRedraw(){this.raw.clearTextureAtlas()}clearDecorations(){this._decorationAddon?.clearDecorations()}forceRefresh(){this._core.viewport?._innerRefresh()}forceUnpause(){this._canvasAddon&&(this._core._renderService?._handleIntersectionChange({intersectionRatio:1}),this.raw.refresh(0,this.raw.rows-1))}async findNext(K,H){return this._updateFindColors(H),(await this._getSearchAddon()).findNext(K,H)}async findPrevious(K,H){return this._updateFindColors(H),(await this._getSearchAddon()).findPrevious(K,H)}_updateFindColors(K){const H=this._themeService.getColorTheme(),U=H.getColor(i.TERMINAL_BACKGROUND_COLOR)||H.getColor(r.PANEL_BACKGROUND),G=H.getColor(i.TERMINAL_FIND_MATCH_BACKGROUND_COLOR),$=H.getColor(i.TERMINAL_FIND_MATCH_BORDER_COLOR),ie=H.getColor(i.TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR),J=H.getColor(i.TERMINAL_FIND_MATCH_HIGHLIGHT_BACKGROUND_COLOR),j=H.getColor(i.TERMINAL_FIND_MATCH_HIGHLIGHT_BORDER_COLOR),ee=H.getColor(i.TERMINAL_OVERVIEW_RULER_FIND_MATCH_FOREGROUND_COLOR);K.decorations={activeMatchBackground:G?.toString(),activeMatchBorder:$?.toString()||"transparent",activeMatchColorOverviewRuler:ie?.toString()||"transparent",matchBackground:U?J?.blend(U).toString():void 0,matchBorder:j?.toString()||"transparent",matchOverviewRuler:ee?.toString()||"transparent"}}_getSearchAddon(){return this._searchAddonPromise||(this._searchAddonPromise=this._getSearchAddonConstructor().then(K=>(this._searchAddon=new K({highlightLimit:1e3}),this.raw.loadAddon(this._searchAddon),this._searchAddon.onDidChangeResults(H=>{this._lastFindResult=H,this._onDidChangeFindResults.fire(H)}),this._searchAddon))),this._searchAddonPromise}clearSearchDecorations(){this._searchAddon?.clearDecorations()}clearActiveSearchDecoration(){this._searchAddon?.clearActiveDecoration()}getFont(){return this._configHelper.getFont(this._core)}getLongestViewportWrappedLineLength(){let K=0;for(let H=this.raw.buffer.active.length-1;H>=this.raw.buffer.active.viewportY;H--){const U=this._getWrappedLineCount(H,this.raw.buffer.active);K=Math.max(K,U.lineCount*this.raw.cols-U.endSpaces||0),H=U.currentIndex}return K}_getWrappedLineCount(K,H){let U=H.getLine(K);if(!U)throw new Error("Could not get line");let G=K,$=0;for(let ie=Math.min(U.length,this.raw.cols)-1;ie>=0&&!U?.getCell(ie)?.getChars();ie--)$++;for(;U?.isWrapped&&G>0;)G--,U=H.getLine(G);return{lineCount:K-G+1,currentIndex:G,endSpaces:$}}scrollDownLine(){this.raw.scrollLines(1)}scrollDownPage(){this.raw.scrollPages(1)}scrollToBottom(){this.raw.scrollToBottom()}scrollUpLine(){this.raw.scrollLines(-1)}scrollUpPage(){this.raw.scrollPages(-1)}scrollToTop(){this.raw.scrollToTop()}clearBuffer(){this.raw.clear(),this._capabilities.get(2)?.handlePromptStart(),this._capabilities.get(2)?.handleCommandStart()}hasSelection(){return this.raw.hasSelection()}clearSelection(){this.raw.clearSelection()}selectMarkedRange(K,H,U=!1){const G=this.shellIntegration.capabilities.get(4);if(!G)return;const $=G.getMark(K),ie=G.getMark(H);$===void 0||ie===void 0||(this.raw.selectLines($.line,ie.line),U&&this.raw.scrollToLine($.line))}selectAll(){this.raw.focus(),this.raw.selectAll()}focus(){this.raw.focus()}async copySelection(K,H){if(this.hasSelection()||K&&H)if(K){let G=function($){$.clipboardData.types.includes("text/plain")||$.clipboardData.setData("text/plain",H?.getOutput()??""),$.clipboardData.setData("text/html",U),$.preventDefault()};const U=await this.getSelectionAsHtml(H);document.addEventListener("copy",G),document.execCommand("copy"),document.removeEventListener("copy",G)}else await this._clipboardService.writeText(this.raw.getSelection());else this._notificationService.warn((0,h.localize)(0,null))}_setCursorBlink(K){this.raw.options.cursorBlink!==K&&(this.raw.options.cursorBlink=K,this.raw.refresh(0,this.raw.rows-1))}_setCursorStyle(K){const H=z(K);this.raw.options.cursorStyle!==H&&(this.raw.options.cursorStyle=H)}_setCursorStyleInactive(K){const H=z(K);this.raw.options.cursorInactiveStyle!==H&&(this.raw.options.cursorInactiveStyle=H)}_setCursorWidth(K){this.raw.options.cursorWidth!==K&&(this.raw.options.cursorWidth=K)}async _enableWebglRenderer(){if(!this.raw.element||this._webglAddon)return;if(!_._checkedWebglCompatible){_._checkedWebglCompatible=!0;const U=document.createElement("canvas").getContext("webgl2"),G=U?.getExtension("WEBGL_debug_renderer_info");if(U&&G&&U.getParameter(G.UNMASKED_RENDERER_WEBGL).startsWith("ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device (Subzero)")){this._disableWebglForThisSession();return}}const K=await this._getWebglAddonConstructor();this._webglAddon=new K,this._disposeOfCanvasRenderer();try{this.raw.loadAddon(this._webglAddon),this._logService.trace("Webgl was loaded"),this._webglAddon.onContextLoss(()=>{this._logService.info("Webgl lost context, disposing of webgl renderer"),this._disposeOfWebglRenderer()}),this._refreshImageAddon()}catch(H){this._logService.warn("Webgl could not be loaded. Falling back to the canvas renderer type.",H),!this._storageService.getBoolean("terminal.integrated.neverMeasureRenderTime",-1,!1)&&this._configHelper.config.gpuAcceleration!=="off"&&this._measureRenderTime(),this._disableWebglForThisSession()}}_disableWebglForThisSession(){_._suggestedRendererType="canvas",this._disposeOfWebglRenderer(),this._enableCanvasRenderer()}async _enableCanvasRenderer(){if(!this.raw.element||this._canvasAddon)return;const K=await this._getCanvasAddonConstructor();this._canvasAddon=new K,this._disposeOfWebglRenderer();try{this.raw.loadAddon(this._canvasAddon),this._logService.trace("Canvas renderer was loaded")}catch(H){this._logService.warn("Canvas renderer could not be loaded, falling back to dom renderer",H),!this._storageService.getBoolean("terminal.integrated.neverMeasureRenderTime",-1,!1)&&this._configHelper.config.gpuAcceleration!=="off"&&this._measureRenderTime(),_._suggestedRendererType="dom",this._disposeOfCanvasRenderer()}this._refreshImageAddon()}async _getCanvasAddonConstructor(){return k||(k=(await(0,c.importAMDNodeModule)("xterm-addon-canvas","lib/xterm-addon-canvas.js")).CanvasAddon),k}async _refreshImageAddon(){if(this._configHelper.config.enableImages&&(this._canvasAddon||this._webglAddon)){if(!this._imageAddon){const K=await this._getImageAddonConstructor();this._imageAddon=new K,this.raw.loadAddon(this._imageAddon)}}else{try{this._imageAddon?.dispose()}catch{}this._imageAddon=void 0}}async _getImageAddonConstructor(){return L||(L=(await(0,c.importAMDNodeModule)("xterm-addon-image","lib/xterm-addon-image.js")).ImageAddon),L}async _getSearchAddonConstructor(){return R||(R=(await(0,c.importAMDNodeModule)("xterm-addon-search","lib/xterm-addon-search.js")).SearchAddon),R}async _getUnicode11Constructor(){return N||(N=(await(0,c.importAMDNodeModule)("xterm-addon-unicode11","lib/xterm-addon-unicode11.js")).Unicode11Addon),N}async _getWebglAddonConstructor(){return P||(P=(await(0,c.importAMDNodeModule)("xterm-addon-webgl","lib/xterm-addon-webgl.js")).WebglAddon),P}async _getSerializeAddonConstructor(){return M||(M=(await(0,c.importAMDNodeModule)("xterm-addon-serialize","lib/xterm-addon-serialize.js")).SerializeAddon),M}_disposeOfCanvasRenderer(){try{this._canvasAddon?.dispose()}catch{}this._canvasAddon=void 0,this._refreshImageAddon()}_disposeOfWebglRenderer(){try{this._webglAddon?.dispose()}catch{}this._webglAddon=void 0,this._refreshImageAddon()}async _measureRenderTime(){const K=[];if(!this._core._renderService?._renderer._renderLayers)return;const H=this._core._renderService._renderer._renderLayers[0],U=H?.onGridChanged,G=()=>{if(K.shift(),K.sort((ie,J)=>ie-J)[Math.floor(K.length/2)]>50)if(this._configHelper.config.gpuAcceleration==="auto")_._suggestedRendererType="dom",this.updateConfig();else{const ie=[{label:(0,h.localize)(1,null),run:()=>this._configurationService.updateValue("terminal.integrated.gpuAcceleration","off",2)},{label:(0,h.localize)(2,null),run:()=>{}},{label:(0,h.localize)(3,null),isSecondary:!0,run:()=>this._storageService.store("terminal.integrated.neverMeasureRenderTime",!0,-1,1)}];this._notificationService.prompt(m.Severity.Warning,(0,h.localize)(4,null),ie)}};H.onGridChanged=($,ie,J)=>{const j=performance.now();U.call(H,$,ie,J),K.push(performance.now()-j),K.length===20&&(G(),H.onGridChanged=U)}}_getXtermTheme(K){K||(K=this._themeService.getColorTheme());const H=K.getColor(i.TERMINAL_FOREGROUND_COLOR),U=this._backgroundColorProvider.getBackgroundColor(K),G=K.getColor(i.TERMINAL_CURSOR_FOREGROUND_COLOR)||H,$=K.getColor(i.TERMINAL_CURSOR_BACKGROUND_COLOR)||U,ie=K.getColor(i.TERMINAL_SELECTION_BACKGROUND_COLOR),J=K.getColor(i.TERMINAL_INACTIVE_SELECTION_BACKGROUND_COLOR),j=K.getColor(i.TERMINAL_SELECTION_FOREGROUND_COLOR)||void 0;return{background:U?.toString(),foreground:H?.toString(),cursor:G?.toString(),cursorAccent:$?.toString(),selectionBackground:ie?.toString(),selectionInactiveBackground:J?.toString(),selectionForeground:j?.toString(),black:K.getColor(i.ansiColorIdentifiers[0])?.toString(),red:K.getColor(i.ansiColorIdentifiers[1])?.toString(),green:K.getColor(i.ansiColorIdentifiers[2])?.toString(),yellow:K.getColor(i.ansiColorIdentifiers[3])?.toString(),blue:K.getColor(i.ansiColorIdentifiers[4])?.toString(),magenta:K.getColor(i.ansiColorIdentifiers[5])?.toString(),cyan:K.getColor(i.ansiColorIdentifiers[6])?.toString(),white:K.getColor(i.ansiColorIdentifiers[7])?.toString(),brightBlack:K.getColor(i.ansiColorIdentifiers[8])?.toString(),brightRed:K.getColor(i.ansiColorIdentifiers[9])?.toString(),brightGreen:K.getColor(i.ansiColorIdentifiers[10])?.toString(),brightYellow:K.getColor(i.ansiColorIdentifiers[11])?.toString(),brightBlue:K.getColor(i.ansiColorIdentifiers[12])?.toString(),brightMagenta:K.getColor(i.ansiColorIdentifiers[13])?.toString(),brightCyan:K.getColor(i.ansiColorIdentifiers[14])?.toString(),brightWhite:K.getColor(i.ansiColorIdentifiers[15])?.toString()}}_updateTheme(K){this.raw.options.theme=this._getXtermTheme(K)}refresh(){this._updateTheme(),this._decorationAddon.refreshLayouts()}async _updateUnicodeVersion(){if(!this._unicode11Addon&&this._configHelper.config.unicodeVersion==="11"){const K=await this._getUnicode11Constructor();this._unicode11Addon=new K,this.raw.loadAddon(this._unicode11Addon)}this.raw.unicode.activeVersion!==this._configHelper.config.unicodeVersion&&(this.raw.unicode.activeVersion=this._configHelper.config.unicodeVersion)}_writeText(K){this.raw.write(K)}dispose(){this._anyTerminalFocusContextKey.reset(),this._anyFocusedTerminalHasSelection.reset(),this._onDidDispose.fire(),super.dispose()}};e.XtermTerminal=F,fe([(0,E.debounce)(100)],F.prototype,"_refreshImageAddon",null),e.XtermTerminal=F=_=fe([O(9,y.IConfigurationService),O(10,o.IInstantiationService),O(11,D.ITerminalLogService),O(12,m.INotificationService),O(13,v.IStorageService),O(14,a.IThemeService),O(15,p.ITelemetryService),O(16,w.IClipboardService),O(17,n.IContextKeyService)],F);function V(B,K,H){if(!B.charWidth||!B.charHeight)return null;const U=K*window.devicePixelRatio,G=B.charWidth*window.devicePixelRatio+B.letterSpacing,$=Math.max(Math.floor(U/G),1),ie=H*window.devicePixelRatio,J=Math.ceil(B.charHeight*window.devicePixelRatio),j=Math.floor(J*B.lineHeight);return{rows:Math.max(Math.floor(ie/j),1),cols:$}}e.getXtermScaledDimensions=V;function W(B){switch(B){case f.LogLevel.Trace:return"trace";case f.LogLevel.Debug:return"debug";case f.LogLevel.Info:return"info";case f.LogLevel.Warning:return"warn";case f.LogLevel.Error:return"error";default:return"off"}}function z(B){return B==="line"?"bar":B}}),define(Q[4082],Y([1,0,7,217,85,87,169,162,216,34,14,32,80,6,257,83,203,4,33,37,17,123,48,79,190,598,243,27,73,75,209,264,2999,81,1245,88,13,28,9,8,29,5,134,38,90,23,41,24,30,514,19,39,135,290,84,46,1313,119,975,468,1315,938,469,1316,470,534,380,739,359,535,334,358,312,381,618,471,940,21,1840]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k,L,R,M,N,P,x,F,V,W,z,B,K,H,U,G,$,ie,J,j,ee,X,te,Z,se,re,oe,le,ne,ce,ae,ue,de,ge,he,be,ve,Ie,Se,we,ye,Re,Le,Pe,Ae,Me,Oe,De){"use strict";var Ce,_e,me,ke;Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTestingPeekHistory=e.OpenMessageInEditorAction=e.GoToPreviousMessageAction=e.GoToNextMessageAction=e.CloseTestPeek=e.TestResultsView=e.TestingOutputPeekController=e.TestingPeekOpener=void 0;class Ee{get isDiffable(){return this.message.type===0&&je(this.message)}get contextValue(){return this.message.type===0?this.message.contextValue:void 0}get context(){return{$mid:17,extId:this.test.extId,message:Le.ITestMessage.serialize(this.message)}}constructor(it,ut,qe,dt){this.result=it,this.taskIndex=qe,this.messageIndex=dt,this.test=ut.item;const pt=ut.tasks[qe].messages;this.messageIndex=dt;const yt={messageIndex:dt,resultId:it.id,taskIndex:qe,testExtId:ut.item.extId};this.expectedUri=(0,Oe.buildTestUri)({...yt,type:4}),this.actualUri=(0,Oe.buildTestUri)({...yt,type:3}),this.messageUri=(0,Oe.buildTestUri)({...yt,type:2});const At=this.message=pt[this.messageIndex];this.revealLocation=At.location??(ut.item.uri&&ut.item.range?{uri:ut.item.uri,range:I.Range.lift(ut.item.range)}:void 0)}}class pe{constructor(it,ut){this.result=it,this.taskIndex=ut,this.outputUri=(0,Oe.buildTestUri)({resultId:it.id,taskIndex:ut,type:0})}}class Te{constructor(it,ut,qe,dt){this.result=it,this.taskIndex=ut,this.task=qe,this.test=dt,this.outputUri=(0,Oe.buildTestUri)({resultId:this.result.id,taskIndex:this.taskIndex,testExtId:this.test.item.extId,type:1})}}const Ne=(Wt,it)=>Wt instanceof Ee&&it instanceof Ee&&Wt.message===it.message||Wt instanceof pe&&it instanceof pe&&Wt.result===it.result&&Wt.taskIndex===it.taskIndex||Wt instanceof Te&&it instanceof Te&&Wt.test===it.test&&Wt.taskIndex===it.taskIndex;function*xe(Wt){for(const it of Wt)for(const ut of it.tests)for(let qe=0;qe<ut.tasks.length;qe++)for(let dt=0;dt<ut.tasks[qe].messages.length;dt++)yield{result:it,test:ut,taskIndex:qe,messageIndex:dt}}let Ve=class extends u.Disposable{constructor(it,ut,qe,dt,pt,yt,At,Bt,Kt){super(),this.configuration=it,this.editorService=ut,this.codeEditorService=qe,this.testResults=dt,this.testService=pt,this.storageService=yt,this.viewsService=At,this.commandService=Bt,this.notificationService=Kt,this.historyVisible=be.MutableObservableValue.stored(this._register(new ve.StoredValue({key:"testHistoryVisibleInPeek",scope:0,target:0},this.storageService)),!1),this._register(dt.onTestChanged(this.openPeekOnFailure,this))}async open(){let it;const ut=this.editorService.activeTextEditorControl;if((0,l.isCodeEditor)(ut)&&ut.getModel()?.uri){const qe=ut.getModel()?.uri;qe&&(it=await this.getFileCandidateMessage(qe,ut.getPosition()))}return it||(it=this.lastUri),it||(it=this.getAnyCandidateMessage()),it?this.showPeekFromUri(it):!1}tryPeekFirstError(it,ut,qe){const dt=this.getFailedCandidateMessage(ut);if(!dt)return!1;const pt=dt.message;return this.showPeekFromUri({type:2,documentUri:pt.location.uri,taskIndex:dt.taskId,messageIndex:dt.index,resultId:it.id,testExtId:ut.item.extId},void 0,{selection:pt.location.range,...qe}),!0}peekUri(it,ut={}){const qe=(0,Oe.parseTestUri)(it),dt=qe&&this.testResults.getResult(qe.resultId);if(!qe||!dt||!("testExtId"in qe)||!("messageIndex"in qe))return!1;const pt=dt.getStateById(qe.testExtId)?.tasks[qe.taskIndex].messages[qe.messageIndex];return pt?.location?(this.showPeekFromUri({type:2,documentUri:pt.location.uri,taskIndex:qe.taskIndex,messageIndex:qe.messageIndex,resultId:dt.id,testExtId:qe.testExtId},ut.inEditor,{selection:pt.location.range,...ut.options}),!0):!1}closeAllPeeks(){for(const it of this.codeEditorService.listCodeEditors())Be.get(it)?.removePeek()}openCurrentInEditor(){const it=this.getActiveControl();if(!it)return;const ut={pinned:!1,revealIfOpened:!0};if(it instanceof pe||it instanceof Te){this.editorService.openEditor({resource:it.outputUri,options:ut});return}if(it instanceof Te){this.editorService.openEditor({resource:it.outputUri,options:ut});return}const qe=it.message;it.isDiffable?this.editorService.openEditor({original:{resource:it.expectedUri},modified:{resource:it.actualUri},options:ut}):typeof qe.message=="string"?this.editorService.openEditor({resource:it.messageUri,options:ut}):this.commandService.executeCommand("markdown.showPreview",it.messageUri).catch(dt=>{this.notificationService.error((0,R.localize)(0,null,dt.message))})}getActiveControl(){const it=Ye(this.codeEditorService);return(it&&Be.get(it))?.subject??this.viewsService.getActiveViewWithId("workbench.panel.testResults.view")?.subject}async showPeekFromUri(it,ut,qe){if((0,l.isCodeEditor)(ut))return this.lastUri=it,Be.get(ut)?.show((0,Oe.buildTestUri)(this.lastUri)),!0;const pt=(await this.editorService.openEditor({resource:it.documentUri,options:{revealIfOpened:!0,...qe}}))?.getControl();return(0,l.isCodeEditor)(pt)?(this.lastUri=it,Be.get(pt)?.show((0,Oe.buildTestUri)(this.lastUri)),!0):!1}openPeekOnFailure(it){if(it.reason!==1||!this.getFailedCandidateMessage(it.item)||it.result.request.continuous&&!(0,he.getTestingConfiguration)(this.configuration,"testing.automaticallyOpenPeekViewDuringAutoRun"))return;const qe=this.codeEditorService.listCodeEditors();switch((0,he.getTestingConfiguration)(this.configuration,"testing.automaticallyOpenPeekView")){case"failureInVisibleDocument":{const yt=new Set(qe.map(At=>At.getModel()?.uri.toString()));if(!s.Iterable.some((0,we.resultItemParents)(it.result,it.item),At=>At.item.uri&&yt.has(At.item.uri.toString())))return;break}case"failureAnywhere":break;default:return}qe.map(Be.get).some(yt=>yt?.subject)||this.tryPeekFirstError(it.result,it.item)}async getFileCandidateMessage(it,ut){let qe,dt=1/0;const pt=it.toString();for(const yt of this.testService.collection.all){const At=this.testResults.getStateById(yt.item.extId);At&&Fe(At[1],(Bt,Kt,Zt,Xt)=>{if(Kt.type!==0||!Kt.location||Kt.location.uri.toString()!==pt)return;const ni=ut?Math.abs(ut.lineNumber-Kt.location.range.startLineNumber):0;(!qe||ni<=dt)&&(dt=ni,qe={type:2,testExtId:At[1].item.extId,resultId:At[0].id,taskIndex:Xt,messageIndex:Zt,documentUri:it})})}return qe}getAnyCandidateMessage(){const it=new Set;for(const ut of this.testResults.results)for(const qe of ut.tests){if(it.has(qe.item.extId))continue;it.add(qe.item.extId);const dt=Fe(qe,(pt,yt,At,Bt)=>yt.location&&{type:2,testExtId:qe.item.extId,resultId:ut.id,taskIndex:Bt,messageIndex:At,documentUri:yt.location.uri});if(dt)return dt}}getFailedCandidateMessage(it){let ut;return Fe(it,(qe,dt,pt,yt)=>{!(0,Me.isFailedState)(qe.state)||!dt.location||ut&&dt.type!==0||(ut={taskId:yt,index:pt,message:dt})}),ut}};e.TestingPeekOpener=Ve,e.TestingPeekOpener=Ve=fe([O(0,V.IConfigurationService),O(1,De.IEditorService),O(2,g.ICodeEditorService),O(3,ye.ITestResultService),O(4,Re.ITestService),O(5,ie.IStorageService),O(6,re.IViewsService),O(7,F.ICommandService),O(8,G.INotificationService)],Ve);const Fe=(Wt,it)=>{for(let ut=0;ut<Wt.tasks.length;ut++){const qe=Wt.tasks[ut];for(let dt=0;dt<qe.messages.length;dt++){const pt=it(qe,qe.messages[dt],dt,ut);if(pt!==void 0)return pt}}};let Be=Ce=class extends u.Disposable{static get(it){return it.getContribution("editor.contrib.testingOutputPeek")}get subject(){return this.peek.value?.current}constructor(it,ut,qe,dt,pt){super(),this.editor=it,this.codeEditorService=ut,this.instantiationService=qe,this.testResults=dt,this.peek=this._register(new u.MutableDisposable),this.visible=Pe.TestingContextKeys.isPeekVisible.bindTo(pt),this._register(it.onDidChangeModel(()=>this.peek.clear())),this._register(dt.onResultsChanged(this.closePeekOnCertainResultEvents,this)),this._register(dt.onTestChanged(this.closePeekOnTestChange,this))}toggle(it){this.currentPeekUri?.toString()===it.toString()?this.peek.clear():this.show(it)}async show(it){const ut=this.retrieveTest(it);ut&&(this.peek.value||(this.peek.value=this.instantiationService.createInstance(et,this.editor),this.peek.value.onDidClose(()=>{this.visible.set(!1),this.currentPeekUri=void 0,this.peek.value=void 0}),this.visible.set(!0),this.peek.value.create()),ut instanceof Ee&&(0,D.alert)((0,y.renderStringAsPlaintext)(ut.message.message)),this.peek.value.setModel(ut),this.currentPeekUri=it)}async openAndShow(it){const ut=this.retrieveTest(it);if(!ut)return;if(!ut.revealLocation||ut.revealLocation.uri.toString()===this.editor.getModel()?.uri.toString())return this.show(it);const qe=await this.codeEditorService.openCodeEditor({resource:ut.revealLocation.uri,options:{pinned:!1,revealIfOpened:!0}},this.editor);if(qe)return Ce.get(qe)?.removePeek(),Ce.get(qe)?.show(it)}removePeek(){this.peek.clear()}next(){const it=this.peek.value?.current;if(!it)return;let ut=!1;for(const{messageIndex:qe,taskIndex:dt,result:pt,test:yt}of xe(this.testResults.results)){if(it instanceof pe&&pt.id===it.result.id&&(ut=!0),ut){this.openAndShow((0,Oe.buildTestUri)({type:2,messageIndex:qe,taskIndex:dt,resultId:pt.id,testExtId:yt.item.extId}));return}it instanceof Te&&it.test.item.extId===yt.item.extId&&it.taskIndex===dt&&it.result.id===pt.id&&(ut=!0),it instanceof Ee&&it.test.extId===yt.item.extId&&it.messageIndex===qe&&it.taskIndex===dt&&it.result.id===pt.id&&(ut=!0)}}previous(){const it=this.peek.value?.current;if(!it)return;let ut;for(const qe of xe(this.testResults.results)){if(it instanceof pe){if(qe.result.id===it.result.id)break;continue}if(it instanceof Te){if(qe.test.item.extId===it.test.item.extId&&qe.result.id===it.result.id&&qe.taskIndex===it.taskIndex)break;continue}if(it.test.extId===qe.test.item.extId&&it.messageIndex===qe.messageIndex&&it.taskIndex===qe.taskIndex&&it.result.id===qe.result.id)break;ut=qe}ut&&this.openAndShow((0,Oe.buildTestUri)({type:2,messageIndex:ut.messageIndex,taskIndex:ut.taskIndex,resultId:ut.result.id,testExtId:ut.test.item.extId}))}removeIfPeekingForTest(it){const ut=this.peek.value?.current;ut&&ut instanceof Ee&&ut.test.extId===it&&this.peek.clear()}closePeekOnTestChange(it){it.reason!==1||it.previousState===it.item.ownComputedState||this.removeIfPeekingForTest(it.item.item.extId)}closePeekOnCertainResultEvents(it){"started"in it&&this.peek.clear(),"removed"in it&&this.testResults.results.length===0&&this.peek.clear()}retrieveTest(it){const ut=(0,Oe.parseTestUri)(it);if(!ut)return;const qe=this.testResults.results.find(Bt=>Bt.id===ut.resultId);if(!qe)return;if(ut.type===0)return new pe(qe,ut.taskIndex);if(ut.type===1){const Bt=qe.getStateById(ut.testExtId),Kt=qe.tasks[ut.taskIndex];return!Bt||!Kt?void 0:new Te(qe,ut.taskIndex,Kt,Bt)}const{testExtId:dt,taskIndex:pt,messageIndex:yt}=ut,At=qe?.getStateById(dt);if(!(!At||!At.tasks[ut.taskIndex]))return new Ee(qe,At,pt,yt)}};e.TestingOutputPeekController=Be,e.TestingOutputPeekController=Be=Ce=fe([O(1,g.ICodeEditorService),O(2,B.IInstantiationService),O(3,ye.ITestResultService),O(4,W.IContextKeyService)],Be);let He=class extends u.Disposable{static{_e=this}constructor(it,ut,qe,dt,pt){super(),this.editor=it,this.options=ut,this.instantiationService=qe,this.modelService=dt,this.contextKeyService=pt,this.didReveal=this._register(new r.Emitter),this.currentSubjectStore=this._register(new u.DisposableStore),this.contentProvidersUpdateLimiter=this._register(new S.Limiter(1))}fillBody(it){const ut=_e.lastSplitWidth;this.splitView=new v.SplitView(it,{orientation:1});const{historyVisible:qe,showRevealLocationOnMessages:dt}=this.options,pt=this.editor!==void 0,yt=this.messageContainer=t.append(it,t.$(".test-output-peek-message-container"));this.contentProviders=[this._register(this.instantiationService.createInstance(Ge,this.editor,yt)),this._register(this.instantiationService.createInstance(tt,yt)),this._register(this.instantiationService.createInstance(nt,yt,pt)),this._register(this.instantiationService.createInstance(Xe,this.editor,yt))],this.messageContextKeyService=this._register(this.contextKeyService.createScoped(this.messageContainer)),this.contextKeyTestMessage=Pe.TestingContextKeys.testMessageContext.bindTo(this.messageContextKeyService),this.contextKeyResultOutdated=Pe.TestingContextKeys.testResultOutdated.bindTo(this.messageContextKeyService);const At=t.append(it,t.$(".test-output-peek-tree")),Bt=this._register(this.instantiationService.createInstance(ii,At,this.didReveal.event,{showRevealLocationOnMessages:dt}));this.onDidRequestReveal=Bt.onDidRequestReview,this.splitView.addView({onDidChange:r.Event.None,element:yt,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:Zt=>{if(_e.lastSplitWidth=Zt,this.dimension)for(const Xt of this.contentProviders)Xt.layout({height:this.dimension.height,width:Zt})}},v.Sizing.Distribute),this.splitView.addView({onDidChange:r.Event.None,element:At,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:Zt=>{this.dimension&&Bt.layout(this.dimension.height,Zt)}},v.Sizing.Distribute);const Kt=1;this.splitView.setViewVisible(Kt,qe.value),this._register(qe.onDidChange(Zt=>{this.splitView.setViewVisible(Kt,Zt)})),ut&&queueMicrotask(()=>this.splitView.resizeView(0,ut))}reveal(it){return this.didReveal.fire(it),this.current&&Ne(this.current,it.subject)?Promise.resolve():(this.current=it.subject,this.contentProvidersUpdateLimiter.queue(async()=>{await Promise.all(this.contentProviders.map(ut=>ut.update(it.subject))),this.currentSubjectStore.clear(),this.populateFloatingClick(it.subject)}))}populateFloatingClick(it){it instanceof Ee&&(this.currentSubjectStore.add((0,u.toDisposable)(()=>{this.contextKeyResultOutdated.reset(),this.contextKeyTestMessage.reset()})),this.contextKeyTestMessage.set(it.contextValue||""),it.result instanceof we.LiveTestResult?(this.contextKeyResultOutdated.set(it.result.getStateById(it.test.extId)?.retired??!1),this.currentSubjectStore.add(it.result.onChange(ut=>{ut.item.item.extId===it.test.extId&&this.contextKeyResultOutdated.set(ut.item.retired??!1)}))):this.contextKeyResultOutdated.set(!0),this.currentSubjectStore.add(this.instantiationService.createChild(new K.ServiceCollection([W.IContextKeyService,this.messageContextKeyService])).createInstance(N.FloatingClickMenu,{container:this.messageContainer,menuId:x.MenuId.TestMessageContent,getActionArg:()=>it.context})))}onLayoutBody(it,ut){this.dimension=new t.Dimension(ut,it),this.splitView.layout(ut)}onWidth(it){this.splitView.layout(it)}};He=_e=fe([O(2,B.IInstantiationService),O(3,A.ITextModelService),O(4,W.IContextKeyService)],He);let et=class extends L.PeekViewWidget{static{me=this}constructor(it,ut,qe,dt,pt,yt,At,Bt){super(it,{showFrame:!0,frameWidth:1,showArrow:!0,isResizeable:!0,isAccessible:!0,className:"test-output-peek"},At),this.testingPeek=dt,this.contextKeyService=pt,this.menuService=yt,this.modelService=Bt,this.visibilityChange=this._disposables.add(new r.Emitter),this._disposables.add(ut.onDidColorThemeChange(this.applyTheme,this)),this._disposables.add(this.onDidClose(()=>this.visibilityChange.fire(!1))),this.applyTheme(ut.getColorTheme()),qe.addExclusiveWidget(it,this)}applyTheme(it){const ut=it.getColor(ge.testingPeekBorder)||a.Color.transparent,qe=it.getColor(ge.testingPeekHeaderBackground)||a.Color.transparent;this.style({arrowColor:ut,frameColor:ut,headerBackgroundColor:qe,primaryHeadingColor:it.getColor(L.peekViewTitleForeground),secondaryHeadingColor:it.getColor(L.peekViewTitleInfoForeground)})}_fillContainer(it){if(!this.scopedContextKeyService){this.scopedContextKeyService=this._disposables.add(this.contextKeyService.createScoped(it)),Pe.TestingContextKeys.isInPeek.bindTo(this.scopedContextKeyService).set(!0);const ut=this.instantiationService.createChild(new K.ServiceCollection([W.IContextKeyService,this.scopedContextKeyService]));this.content=this._disposables.add(ut.createInstance(He,this.editor,{historyVisible:this.testingPeek.historyVisible,showRevealLocationOnMessages:!1}))}super._fillContainer(it)}_fillHead(it){super._fillHead(it);const ut=[],qe=this.menuService.createMenu(x.MenuId.TestPeekTitle,this.contextKeyService);(0,P.createAndFillInActionBarActions)(qe,void 0,ut),this._actionbarWidget.push(ut,{label:!1,icon:!0,index:0}),qe.dispose()}_fillBody(it){this.content.fillBody(it),this.content.onDidRequestReveal(ut=>{Be.get(this.editor)?.show(ut instanceof Ee?ut.messageUri:ut.outputUri)})}setModel(it){if(it instanceof pe||it instanceof Te)return this.current=it,this.showInPlace(it);const ut=it.message,qe=this.current;return!it.revealLocation&&!qe?Promise.resolve():(this.current=it,it.revealLocation?(this.show(it.revealLocation.range,me.lastHeightInLines||ft(ut)),this.editor.revealPositionNearTop(it.revealLocation.range.getStartPosition(),0),this.showInPlace(it)):this.showInPlace(it))}async showInPlace(it){if(it instanceof Ee){const ut=it.message;this.setTitle(Et((0,y.renderStringAsPlaintext)(ut.message)),(0,i.stripIcons)(it.test.label))}else this.setTitle((0,R.localize)(1,null));await this.content.reveal({subject:it,preserveFocus:!1})}_relayout(it){super._relayout(it),me.lastHeightInLines=it}_doLayoutBody(it,ut){super._doLayoutBody(it,ut),this.content.onLayoutBody(it,ut)}_onWidth(it){super._onWidth(it),this.dimension&&(this.dimension=new t.Dimension(it,this.dimension.height)),this.content.onWidth(it)}};et=me=fe([O(1,ee.IThemeService),O(2,L.IPeekViewService),O(3,Ae.ITestingPeekOpener),O(4,W.IContextKeyService),O(5,x.IMenuService),O(6,B.IInstantiationService),O(7,A.ITextModelService)],et);let Je=class extends te.ViewPane{constructor(it,ut,qe,dt,pt,yt,At,Bt,Kt,Zt,Xt){super(it,ut,qe,dt,pt,yt,At,Bt,Kt,Zt),this.resultService=Xt,this.content=this._register(this.instantiationService.createInstance(He,void 0,{historyVisible:(0,be.staticObservableValue)(!0),showRevealLocationOnMessages:!0}))}get subject(){return this.content.current}showLatestRun(it=!1){const ut=this.resultService.results.find(qe=>qe.tasks.length);ut&&this.content.reveal({preserveFocus:it,subject:new pe(ut,0)})}renderBody(it){super.renderBody(it),this.content.fillBody(it),this.content.onDidRequestReveal(qe=>this.content.reveal({preserveFocus:!0,subject:qe}));const[ut]=this.resultService.results;ut&&ut.tasks.length&&this.content.reveal({preserveFocus:!0,subject:new pe(ut,0)})}layoutBody(it,ut){super.layoutBody(it,ut),this.content.onLayoutBody(it,ut)}};e.TestResultsView=Je,e.TestResultsView=Je=fe([O(1,H.IKeybindingService),O(2,z.IContextMenuService),O(3,V.IConfigurationService),O(4,W.IContextKeyService),O(5,re.IViewDescriptorService),O(6,B.IInstantiationService),O(7,$.IOpenerService),O(8,ee.IThemeService),O(9,J.ITelemetryService),O(10,ye.ITestResultService)],Je);const st={scrollBeyondLastLine:!1,links:!0,lineNumbers:"off",scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},fixedOverflowWidgets:!0,readOnly:!0,minimap:{enabled:!1},wordWrap:"on"},ze={...st,enableSplitViewResizing:!0,isInEmbeddedEditor:!0,renderOverviewRuler:!1,ignoreTrimWhitespace:!1,renderSideBySide:!0,useInlineViewWhenSpaceIsLimited:!1,originalAriaLabel:(0,R.localize)(2,null),modifiedAriaLabel:(0,R.localize)(3,null),diffAlgorithm:"advanced"},je=Wt=>Wt.type===0&&Wt.actual!==void 0&&Wt.expected!==void 0;let Ge=class extends u.Disposable{constructor(it,ut,qe,dt){super(),this.editor=it,this.container=ut,this.instantiationService=qe,this.modelService=dt,this.widget=this._register(new u.MutableDisposable),this.model=this._register(new u.MutableDisposable)}async update(it){if(!(it instanceof Ee))return this.clear();const ut=it.message;if(!je(ut))return this.clear();const[qe,dt]=await Promise.all([this.modelService.createModelReference(it.expectedUri),this.modelService.createModelReference(it.actualUri)]),pt=this.model.value=new Ot(qe,dt);this.widget.value||(this.widget.value=this.editor?this.instantiationService.createInstance(C.EmbeddedDiffEditorWidget2,this.container,ze,{},this.editor):this.instantiationService.createInstance(E.DiffEditorWidget2,this.container,ze,{}),this.dimension&&this.widget.value.layout(this.dimension)),this.widget.value.setModel(pt),this.widget.value.updateOptions(this.getOptions(It(ut.expected)||It(ut.actual)))}clear(){this.model.clear(),this.widget.clear()}layout(it){this.dimension=it,this.widget.value?.layout(it)}getOptions(it){return it?{...ze,lineNumbers:"on"}:{...ze,lineNumbers:"off"}}};Ge=fe([O(2,B.IInstantiationService),O(3,A.ITextModelService)],Ge);class Ze extends u.Disposable{constructor(it,ut,qe){super();const dt=this._register(ut.render(qe,{}));dt.element.style.height="100%",dt.element.style.userSelect="text",it.appendChild(dt.element),this.element=dt.element,this.scrollable=this._register(new f.DomScrollableElement(dt.element,{className:"preview-text"})),it.appendChild(this.scrollable.getDomNode()),this._register((0,u.toDisposable)(()=>{it.removeChild(this.scrollable.getDomNode())})),this.scrollable.scanDomNode()}layout(it,ut){this.scrollable.setScrollDimensions({width:ut-32,height:it-16,scrollWidth:this.element.scrollWidth,scrollHeight:this.element.scrollHeight})}}let tt=class extends u.Disposable{constructor(it,ut){super(),this.container=it,this.instantiationService=ut,this.markdown=new o.Lazy(()=>this._register(this.instantiationService.createInstance(k.MarkdownRenderer,{}))),this.textPreview=this._register(new u.MutableDisposable)}update(it){if(!(it instanceof Ee))return this.textPreview.clear();const ut=it.message;if(je(ut)||typeof ut.message=="string")return this.textPreview.clear();this.textPreview.value=new Ze(this.container,this.markdown.value,ut.message)}layout(it){this.textPreview.value?.layout(it.height,it.width)}};tt=fe([O(1,B.IInstantiationService)],tt);let Xe=class extends u.Disposable{constructor(it,ut,qe,dt){super(),this.editor=it,this.container=ut,this.instantiationService=qe,this.modelService=dt,this.widget=this._register(new u.MutableDisposable),this.model=this._register(new u.MutableDisposable)}async update(it){if(!(it instanceof Ee))return this.clear();const ut=it.message;if(je(ut)||ut.type===1||typeof ut.message!="string")return this.clear();const qe=this.model.value=await this.modelService.createModelReference(it.messageUri);this.widget.value||(this.widget.value=this.editor?this.instantiationService.createInstance(C.EmbeddedCodeEditorWidget,this.container,st,{},this.editor):this.instantiationService.createInstance(w.CodeEditorWidget,this.container,st,{isSimpleWidget:!0}),this.dimension&&this.widget.value.layout(this.dimension)),this.widget.value.setModel(qe.object.textEditorModel),this.widget.value.updateOptions(st)}clear(){this.model.clear(),this.widget.clear()}layout(it){this.dimension=it,this.widget.value?.layout(it)}};Xe=fe([O(2,B.IInstantiationService),O(3,A.ITextModelService)],Xe);let nt=class extends u.Disposable{constructor(it,ut,qe,dt,pt){super(),this.container=it,this.isInPeekView=ut,this.terminalService=qe,this.viewDescriptorService=dt,this.workspaceContext=pt,this.terminalCwd=this._register(new be.MutableObservableValue("")),this.xtermLayoutDelayer=this._register(new S.Delayer(50)),this.terminal=this._register(new u.MutableDisposable),this.outputDataListener=this._register(new u.MutableDisposable)}async makeTerminal(){const it=this.terminal.value;if(it)return it.xterm.clearBuffer(),it.xterm.clearSearchDecorations(),it.xterm.write("\x1B[2J\x1B[0;0H"),it;const ut=new j.TerminalCapabilityStore,qe=this.terminalCwd;return ut.add(0,{type:0,get cwds(){return[qe.value]},onDidChangeCwd:qe.onDidChange,getCwd:()=>qe.value,updateCwd:()=>{}}),this.terminal.value=await this.terminalService.createDetachedTerminal({rows:10,cols:80,readonly:!0,capabilities:ut,processInfo:new oe.DetachedProcessInfo({initialCwd:qe.value}),colorProvider:{getBackgroundColor:dt=>{const pt=dt.getColor(ce.TERMINAL_BACKGROUND_COLOR);return pt||(this.isInPeekView?dt.getColor(L.peekViewResultsBackground):this.viewDescriptorService.getViewLocationById("workbench.panel.testResults.view")===1?dt.getColor(se.PANEL_BACKGROUND):dt.getColor(se.SIDE_BAR_BACKGROUND))}}})}async update(it){this.outputDataListener.clear(),it instanceof pe?await this.updateForTaskSubject(it):it instanceof Te||it instanceof Ee&&it.message.type===1?await this.updateForTestSubject(it):this.clear()}async updateForTestSubject(it){const ut=this,qe=it instanceof Te?it.test.item:it.test,dt=await this.updateGenerically({subject:it,getTarget:pt=>pt?.tasks[it.taskIndex].output,*doInitialWrite(pt,yt){ut.updateCwd(qe.uri);const At=it instanceof Te?it.test:yt.getStateById(qe.extId);if(At)for(const Bt of At.tasks[it.taskIndex].messages)Bt.type===1&&(yield*pt.getRangeIter(Bt.offset,Bt.length))},doListenForMoreData:(pt,yt,{xterm:At})=>yt.onChange(Bt=>{if(Bt.reason===2&&Bt.item.item.extId===qe.extId&&Bt.message.type===1)for(const Kt of pt.getRangeIter(Bt.message.offset,Bt.message.length))At.write(Kt.buffer)})});it instanceof Ee&&it.message.type===1&&it.message.marker!==void 0&&dt?.xterm.selectMarkedRange((0,Le.getMarkId)(it.message.marker,!0),(0,Le.getMarkId)(it.message.marker,!1),!0)}updateForTaskSubject(it){return this.updateGenerically({subject:it,getTarget:ut=>ut?.tasks[it.taskIndex],doInitialWrite:(ut,qe)=>(this.updateCwd(s.Iterable.find(qe.tests,dt=>!!dt.item.uri)?.item.uri),ut.output.buffers),doListenForMoreData:(ut,qe,{xterm:dt})=>ut.output.onDidWriteData(pt=>dt.write(pt.buffer))})}async updateGenerically(it){const ut=it.subject.result,qe=it.getTarget(ut);if(!qe)return this.clear();const dt=await this.makeTerminal();let pt=!1;const yt=new be.MutableObservableValue(0);if(ut instanceof we.LiveTestResult)for(const At of it.doInitialWrite(qe,ut))pt||=At.byteLength>0,yt.value++,dt.xterm.write(At.buffer,()=>yt.value--);else this.writeNotice(dt,(0,R.localize)(4,null));return this.attachTerminalToDom(dt),this.outputDataListener.value=ut instanceof we.LiveTestResult?it.doListenForMoreData(qe,ut,dt):void 0,!this.outputDataListener.value&&!pt&&this.writeNotice(dt,(0,R.localize)(5,null)),yt.value>0&&await new Promise(At=>{const Bt=yt.onDidChange(()=>{yt.value===0&&(Bt.dispose(),At())})}),dt}updateCwd(it){const ut=it&&this.workspaceContext.getWorkspaceFolder(it)||this.workspaceContext.getWorkspace().folders[0];ut&&(this.terminalCwd.value=ut.uri.fsPath)}writeNotice(it,ut){it.xterm.write(`\x1B[2m${ut}\x1B[0m`)}attachTerminalToDom(it){it.xterm.write("\x1B[?25l"),requestAnimationFrame(()=>this.layoutTerminal(it)),it.attachToElement(this.container,{enableGpu:!1})}clear(){this.outputDataListener.clear(),this.xtermLayoutDelayer.cancel(),this.terminal.clear()}layout(it){this.dimensions=it,this.terminal.value&&this.layoutTerminal(this.terminal.value,it.width,it.height)}layoutTerminal({xterm:it},ut=this.dimensions?.width??this.container.clientWidth,qe=this.dimensions?.height??this.container.clientHeight){ut-=10+20,this.xtermLayoutDelayer.trigger(()=>{const dt=(0,ne.getXtermScaledDimensions)(it.getFont(),ut,qe);dt&&it.resize(dt.cols,dt.rows)})}};nt=fe([O(2,le.ITerminalService),O(3,re.IViewDescriptorService),O(4,X.IWorkspaceContextService)],nt);const ft=Wt=>(je(Wt)?Math.max(Nt(Wt.actual),Nt(Wt.expected)):Nt(typeof Wt.message=="string"?Wt.message:Wt.message.value))+8,Et=Wt=>{const it=Wt.indexOf(` `);return it===-1?Wt:Wt.slice(0,it)},It=Wt=>!!Wt&&Wt.includes(` `),Nt=Wt=>Math.min((0,d.count)(Wt,` `),24);class Ot extends Z.EditorModel{constructor(it,ut){super(),this._original=it,this._modified=ut,this.original=this._original.object.textEditorModel,this.modified=this._modified.object.textEditorModel}dispose(){super.dispose(),this._original.dispose(),this._modified.dispose()}}function kt(Wt){const it=Wt.listDiffEditors();for(const ut of it)if(ut.hasTextFocus()&&ut instanceof C.EmbeddedDiffEditorWidget2)return ut.getParentEditor();return null}class xt extends n.EditorAction2{constructor(){super({id:"editor.closeTestPeek",title:(0,R.localize)(6,null),icon:h.Codicon.close,precondition:W.ContextKeyExpr.or(Pe.TestingContextKeys.isInPeek,Pe.TestingContextKeys.isPeekVisible),keybinding:{weight:100-101,primary:9,when:W.ContextKeyExpr.not("config.editor.stablePeek")}})}runEditorCommand(it,ut){const qe=Ye(it.get(g.ICodeEditorService));Be.get(qe??ut)?.removePeek()}}e.CloseTestPeek=xt;class Mt{get icon(){return de.testingStatesToIcons.get(this.value.completedAt===void 0?2:(0,we.maxCountPriority)(this.value.counts))}constructor(it){this.value=it,this.changeEmitter=new r.Emitter,this.onDidChange=this.changeEmitter.event,this.type="result",this.context=this.value.id,this.id=this.value.id,this.label=this.value.name}}class Ht{get onDidChange(){return this.results instanceof we.LiveTestResult?r.Event.filter(this.results.onChange,it=>it.item.item.extId===this.test.item.extId):r.Event.None}get state(){return this.test.tasks[this.taskIndex].state}get label(){return this.test.item.label}get labelWithIcons(){return(0,T.renderLabelWithIcons)(this.label)}get icon(){return de.testingStatesToIcons.get(this.state)}get outputSubject(){return new Te(this.results,this.taskIndex,this.task,this.test)}constructor(it,ut,qe,dt){this.results=it,this.task=ut,this.test=qe,this.taskIndex=dt,this.type="test",this.context=this.test.item.extId,this.id=`${this.results.id}/${this.test.item.extId}`;for(const pt of(0,we.resultItemParents)(it,qe))pt!==qe&&(this.description=this.description?pt.item.label+ae.flatTestItemDelimiter+this.description:pt.item.label)}}class Yt{get icon(){return this.results.tasks[this.index].running?de.testingStatesToIcons.get(2):void 0}constructor(it,ut,qe){this.results=it,this.task=ut,this.index=qe,this.changeEmitter=new r.Emitter,this.onDidChange=this.changeEmitter.event,this.type="task",this.itemsCache=new $t,this.id=`${it.id}/${qe}`,this.task=it.tasks[qe],this.context=String(qe),this.label=this.task.name??(0,R.localize)(7,null)}}class jt{get onDidChange(){return this.result instanceof we.LiveTestResult?r.Event.filter(this.result.onChange,it=>it.item.item.extId===this.test.item.extId):r.Event.None}get context(){return{$mid:17,extId:this.test.item.extId,message:Le.ITestMessage.serialize(this.message)}}constructor(it,ut,qe,dt){this.result=it,this.test=ut,this.taskIndex=qe,this.messageIndex=dt,this.type="message";const pt=this.message=ut.tasks[qe].messages[dt];this.location=pt.location,this.contextValue=pt.type===0?pt.contextValue:void 0,this.uri=(0,Oe.buildTestUri)({type:2,messageIndex:dt,resultId:it.id,taskIndex:qe,testExtId:ut.item.extId}),this.id=this.uri.toString();const yt=(0,y.renderStringAsPlaintext)(pt.message),At=(0,d.count)(yt.trimEnd(),` `);this.label=Et(yt),At>0&&(this.description=At>1?(0,R.localize)(8,null,At):(0,R.localize)(9,null))}}let ii=class extends u.Disposable{constructor(it,ut,qe,dt,pt,yt,At){super(),this.contextMenuService=dt,this.disposed=!1,this.requestReveal=this._register(new r.Emitter),this.onDidRequestReview=this.requestReveal.event,this.treeActions=yt.createInstance($e,qe.showRevealLocationOnMessages,this.requestReveal);const Bt={getId(ct){return ct.id}};this.tree=this._register(yt.createInstance(U.WorkbenchCompressibleObjectTree,"Test Output Peek",it,{getHeight:()=>22,getTemplateId:()=>ri.ID},[yt.createInstance(ri,this.treeActions)],{compressionEnabled:!0,hideTwistiesOfChildlessElements:!0,identityProvider:Bt,sorter:{compare(ct,wt){return ct instanceof Ht&&wt instanceof Ht?(0,Me.cmpPriority)(ct.state,wt.state):0}},accessibilityProvider:{getAriaLabel(ct){return ct.ariaLabel||ct.label},getWidgetAriaLabel(){return(0,R.localize)(10,null)}}}));const Kt=new $t,Zt=ct=>{const wt=s.Iterable.filter(ct.results.tests,bt=>bt.tasks[ct.index].state>=2||bt.tasks[ct.index].messages.length>0);return s.Iterable.map(wt,bt=>({element:ct.itemsCache.getOrCreate(bt,()=>new Ht(ct.results,ct.task,bt,ct.index)),incompressible:!0,children:Xt(ct.results,bt,ct.index)}))},Xt=(ct,wt,bt)=>wt.tasks[bt].messages.map((gt,Ct)=>gt.type===0?{element:Kt.getOrCreate(gt,()=>new jt(ct,wt,bt,Ct)),incompressible:!0}:void 0).filter(c.isDefined),ni=ct=>ct.tasks.map((wt,bt)=>{const gt=Kt.getOrCreate(wt,()=>new Yt(ct,wt,bt));return{element:gt,incompressible:!1,children:Zt(gt)}}),ai=()=>pt.results.map(ct=>{const wt=Kt.getOrCreate(ct,()=>new Mt(ct));return{element:wt,incompressible:!0,collapsed:this.tree.hasElement(wt)?this.tree.isCollapsed(wt):!0,children:ni(ct)}}),hi=new Set,Rt=this._register(new S.RunOnceScheduler(()=>{for(const ct of hi)this.tree.hasElement(ct)&&this.tree.setChildren(ct,Zt(ct),{diffIdentityProvider:Bt});hi.clear()},300)),ot=ct=>{const wt=Kt.get(ct),bt=new u.DisposableStore;return bt.add(ct.onNewTask(()=>{ct.tasks.length===1&&this.requestReveal.fire(new pe(ct,0)),this.tree.hasElement(wt)&&this.tree.setChildren(wt,ni(ct),{diffIdentityProvider:Bt})})),bt.add(ct.onEndTask(gt=>{Kt.get(ct.tasks[gt])?.changeEmitter.fire()})),bt.add(ct.onChange(gt=>{for(const[Ct,_t]of ct.tasks.entries()){const Dt=Kt.get(_t);if(!this.tree.hasElement(Dt))continue;const qt=Dt.itemsCache.get(gt.item);if(qt&&this.tree.hasElement(qt)){gt.reason===2&>.message.type===0&&this.tree.setChildren(qt,Xt(ct,gt.item,Ct),{diffIdentityProvider:Bt});return}hi.add(Dt),Rt.isScheduled()||Rt.schedule()}})),bt.add(ct.onComplete(()=>{wt.changeEmitter.fire(),bt.dispose()})),wt};this._register(pt.onResultsChanged(ct=>{if(!this.disposed){if("completed"in ct){Kt.get(ct.completed)?.changeEmitter.fire();return}if(this.tree.setChildren(null,ai(),{diffIdentityProvider:Bt}),"started"in ct){for(const wt of this.tree.getNode(null).children)this.tree.collapse(wt.element,!1);this.tree.expand(ot(ct.started),!0)}}}));const lt=(ct,wt)=>{this.tree.setFocus([ct]),this.tree.setSelection([ct]),wt||this.tree.domFocus()};this._register(ut(async({subject:ct,preserveFocus:wt=!1})=>{if(ct instanceof pe){const Ct=this.tree.getNode(null).children.find(_t=>_t.element instanceof Yt?_t.element.results.id===ct.result.id&&_t.element.index===ct.taskIndex:_t.element instanceof Mt?_t.element.id===ct.result.id:!1);Ct&<(Ct.element,wt);return}const bt=ct instanceof Te?Kt.get(ct.task)?.itemsCache.get(ct.test):Kt.get(ct.message);if(!bt||!this.tree.hasElement(bt))return;const gt=[];for(let Ct=this.tree.getParentElement(bt);Ct;Ct=this.tree.getParentElement(Ct))gt.unshift(Ct);for(const Ct of gt)this.tree.expand(Ct);this.tree.getRelativeTop(bt)===null&&this.tree.reveal(bt,.5),lt(bt,wt)})),this._register(this.tree.onDidOpen(async ct=>{ct.element instanceof jt&&this.requestReveal.fire(new Ee(ct.element.result,ct.element.test,ct.element.taskIndex,ct.element.messageIndex))})),this._register(this.tree.onDidChangeSelection(ct=>{for(const wt of ct.elements)if(wt&&"test"in wt){At.reveal.value=wt.test.item.extId;break}})),this._register(this.tree.onContextMenu(ct=>this.onContextMenu(ct))),this.tree.setChildren(null,ai());for(const ct of pt.results)!ct.completedAt&&ct instanceof we.LiveTestResult&&ot(ct)}layout(it,ut){this.tree.layout(it,ut)}onContextMenu(it){if(!it.element)return;const ut=this.treeActions.provideActionBar(it.element);this.contextMenuService.showContextMenu({getAnchor:()=>it.anchor,getActions:()=>ut.secondary.length?[...ut.primary,new m.Separator,...ut.secondary]:ut.primary,getActionsContext:()=>it.element?.context})}dispose(){super.dispose(),this.disposed=!0}};ii=fe([O(3,z.IContextMenuService),O(4,ye.ITestResultService),O(5,B.IInstantiationService),O(6,Ie.ITestExplorerFilterState)],ii);let ri=class{static{ke=this}static{this.ID="testRunElementRenderer"}constructor(it,ut){this.treeActions=it,this.instantiationService=ut,this.templateId=ke.ID}renderCompressedElements(it,ut,qe){const dt=it.element.elements,pt=dt[dt.length-1];pt instanceof Yt&&dt.length>=2?this.doRender(dt[dt.length-2],qe):this.doRender(pt,qe)}renderTemplate(it){const ut=new u.DisposableStore,qe=t.append(it,t.$(".test-peek-item")),dt=t.append(qe,t.$(".state")),pt=t.append(qe,t.$(".name")),yt=new b.ActionBar(qe,{actionViewItemProvider:Bt=>Bt instanceof x.MenuItemAction?this.instantiationService.createInstance(P.MenuEntryActionViewItem,Bt,void 0):void 0}),At=new u.DisposableStore;return ut.add(At),ut.add(yt),{icon:dt,label:pt,actionBar:yt,elementDisposable:At,templateDisposable:ut}}renderElement(it,ut,qe){this.doRender(it.element,qe)}disposeTemplate(it){it.templateDisposable.dispose()}doRender(it,ut){ut.elementDisposable.clear(),ut.elementDisposable.add(it.onDidChange(()=>this.doRender(it,ut))),this.doRenderInner(it,ut)}doRenderInner(it,ut){it.labelWithIcons?t.reset(ut.label,...it.labelWithIcons):it.description?t.reset(ut.label,it.label,t.$("span.test-label-description",{},it.description)):t.reset(ut.label,it.label);const qe=it.icon;ut.icon.className=`computed-state ${qe?p.ThemeIcon.asClassName(qe):""}`;const dt=this.treeActions.provideActionBar(it);ut.actionBar.clear(),ut.actionBar.context=it.context,ut.actionBar.push(dt.primary,{icon:!0,label:!1})}};ri=ke=fe([O(1,B.IInstantiationService)],ri);let $e=class{constructor(it,ut,qe,dt,pt,yt,At){this.showRevealLocationOnMessages=it,this.requestReveal=ut,this.contextKeyService=qe,this.menuService=dt,this.commandService=pt,this.testProfileService=yt,this.editorService=At}provideActionBar(it){const ut=it instanceof Ht?it.test:void 0,qe=ut?this.testProfileService.capabilitiesForTest(ut):0,dt=[["peek","editor.contrib.testingOutputPeek"],[Pe.TestingContextKeys.peekItemType.key,it.type]];let pt=x.MenuId.TestPeekElement;const yt=[],At=[];if(it instanceof Yt&&yt.push(new m.Action("testing.outputPeek.showResultOutput",(0,R.localize)(11,null),p.ThemeIcon.asClassName(h.Codicon.terminal),void 0,()=>this.requestReveal.fire(new pe(it.results,it.index)))),it instanceof Mt&&(it.value.tasks.length===1&&yt.push(new m.Action("testing.outputPeek.showResultOutput",(0,R.localize)(12,null),p.ThemeIcon.asClassName(h.Codicon.terminal),void 0,()=>this.requestReveal.fire(new pe(it.value,0)))),yt.push(new m.Action("testing.outputPeek.reRunLastRun",(0,R.localize)(13,null),p.ThemeIcon.asClassName(de.testingRunIcon),void 0,()=>this.commandService.executeCommand("testing.reRunLastRun",it.value.id))),qe&4&&yt.push(new m.Action("testing.outputPeek.debugLastRun",(0,R.localize)(14,null),p.ThemeIcon.asClassName(de.testingDebugIcon),void 0,()=>this.commandService.executeCommand("testing.debugLastRun",it.value.id)))),(it instanceof Ht||it instanceof jt)&&dt.push([Pe.TestingContextKeys.testResultOutdated.key,it.test.retired],...(0,ue.getTestItemContextOverlay)(it.test,qe)),it instanceof Ht){const Xt=it.test.item.extId;yt.push(new m.Action("testing.outputPeek.goToFile",(0,R.localize)(15,null),p.ThemeIcon.asClassName(h.Codicon.goToFile),void 0,()=>this.commandService.executeCommand("vscode.revealTest",Xt))),it.test.tasks[it.taskIndex].messages.some(ni=>ni.type===1)&&yt.push(new m.Action("testing.outputPeek.showResultOutput",(0,R.localize)(16,null),p.ThemeIcon.asClassName(h.Codicon.terminal),void 0,()=>this.requestReveal.fire(it.outputSubject))),At.push(new m.Action("testing.outputPeek.revealInExplorer",(0,R.localize)(17,null),p.ThemeIcon.asClassName(h.Codicon.listTree),void 0,()=>this.commandService.executeCommand("_revealTestInExplorer",Xt))),qe&2&&yt.push(new m.Action("testing.outputPeek.runTest",(0,R.localize)(18,null),p.ThemeIcon.asClassName(de.testingRunIcon),void 0,()=>this.commandService.executeCommand("vscode.runTestsById",2,Xt))),qe&4&&yt.push(new m.Action("testing.outputPeek.debugTest",(0,R.localize)(19,null),p.ThemeIcon.asClassName(de.testingDebugIcon),void 0,()=>this.commandService.executeCommand("vscode.runTestsById",4,Xt)))}it instanceof jt&&(pt=x.MenuId.TestMessageContext,dt.push([Pe.TestingContextKeys.testMessageContext.key,it.contextValue]),this.showRevealLocationOnMessages&&it.location&&yt.push(new m.Action("testing.outputPeek.goToError",(0,R.localize)(20,null),p.ThemeIcon.asClassName(h.Codicon.goToFile),void 0,()=>this.editorService.openEditor({resource:it.location.uri,options:{selection:it.location.range,preserveFocus:!0}}))));const Bt=this.contextKeyService.createOverlay(dt),Kt={primary:yt,secondary:At},Zt=this.menuService.createMenu(pt,Bt);try{return(0,P.createAndFillInActionBarActions)(Zt,{arg:it.context},Kt,"inline"),Kt}finally{Zt.dispose()}}};$e=fe([O(2,W.IContextKeyService),O(3,x.IMenuService),O(4,F.ICommandService),O(5,Se.ITestProfileService),O(6,De.IEditorService)],$e);const Qe=W.ContextKeyExpr.and(_.EditorContextKeys.focus,Pe.TestingContextKeys.isPeekVisible),Ye=Wt=>{const it=Wt.getFocusedCodeEditor()||Wt.getActiveCodeEditor();return it&&Ke(Wt,it)},Ke=(Wt,it)=>{if(Be.get(it)?.subject)return it;if(it instanceof C.EmbeddedCodeEditorWidget)return it.getParentEditor();const ut=kt(Wt);return ut||it};class ht extends x.Action2{static{this.ID="testing.goToNextMessage"}constructor(){super({id:ht.ID,f1:!0,title:{value:(0,R.localize)(21,null),original:"Go to Next Test Failure"},icon:h.Codicon.arrowDown,category:M.Categories.Test,keybinding:{primary:578,weight:100+1,when:Qe},menu:[{id:x.MenuId.TestPeekTitle,group:"navigation",order:2},{id:x.MenuId.CommandPalette,when:Qe}]})}run(it){const ut=Ye(it.get(g.ICodeEditorService));ut&&Be.get(ut)?.next()}}e.GoToNextMessageAction=ht;class Tt extends x.Action2{static{this.ID="testing.goToPreviousMessage"}constructor(){super({id:Tt.ID,f1:!0,title:{value:(0,R.localize)(22,null),original:"Go to Previous Test Failure"},icon:h.Codicon.arrowUp,category:M.Categories.Test,keybinding:{primary:1602,weight:100+1,when:Qe},menu:[{id:x.MenuId.TestPeekTitle,group:"navigation",order:1},{id:x.MenuId.CommandPalette,when:Qe}]})}run(it){const ut=Ye(it.get(g.ICodeEditorService));ut&&Be.get(ut)?.previous()}}e.GoToPreviousMessageAction=Tt;class Ft extends x.Action2{static{this.ID="testing.openMessageInEditor"}constructor(){super({id:Ft.ID,f1:!1,title:{value:(0,R.localize)(23,null),original:"Open in Editor"},icon:h.Codicon.goToFile,category:M.Categories.Test,menu:[{id:x.MenuId.TestPeekTitle}]})}run(it){it.get(Ae.ITestingPeekOpener).openCurrentInEditor()}}e.OpenMessageInEditorAction=Ft;class Pt extends x.Action2{static{this.ID="testing.toggleTestingPeekHistory"}constructor(){super({id:Pt.ID,f1:!0,title:{value:(0,R.localize)(24,null),original:"Toggle Test History in Peek"},icon:h.Codicon.history,category:M.Categories.Test,menu:[{id:x.MenuId.TestPeekTitle,group:"navigation",order:3}],keybinding:{weight:200,primary:550,when:Pe.TestingContextKeys.isPeekVisible.isEqualTo(!0)}})}run(it){const ut=it.get(Ae.ITestingPeekOpener);ut.historyVisible.value=!ut.historyVisible.value}}e.ToggleTestingPeekHistory=Pt;class $t{constructor(){this.v=new WeakMap}get(it){return this.v.get(it)}getOrCreate(it,ut){const qe=this.v.get(it);if(qe)return qe;const dt=ut();return this.v.set(it,dt),dt}}}),define(Q[4083],Y([1,0,1184,30,231]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveWorkbenchCommonProperties=void 0;function D(T,f,v,m,S,h,a,r,i){const s=(0,t.resolveCommonProperties)(f,v,r.arch,m,S,h,a),o=T.get(y.firstSessionDateStorageKey,-1),u=T.get(y.lastSessionDateStorageKey,-1);return s["common.version.shell"]=r.versions?.electron,s["common.version.renderer"]=r.versions?.chrome,s["common.firstSessionDate"]=o,s["common.lastSessionDate"]=u||"",s["common.isNewSession"]=u?"0":"1",s["common.remoteAuthority"]=(0,b.cleanRemoteAuthority)(i),s["common.cli"]=!!r.env.VSCODE_CLI,s}e.resolveWorkbenchCommonProperties=D}),define(Q[4084],Y([1,0,30,231,9,4,139,52,153,3296,24,4083,3302,35,274]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryService=void 0;let s=class extends D.Disposable{get sessionId(){return this.impl.sessionId}get machineId(){return this.impl.machineId}get firstSessionDate(){return this.impl.firstSessionDate}get msftInternal(){return this.impl.msftInternal}constructor(u,d,p,c,l){if(super(),(0,y.supportsTelemetry)(d,u)){const n=(0,y.isInternalTelemetry)(d,l),g=p.getChannel("telemetryAppender"),w={appenders:[new m.TelemetryAppenderClient(g)],commonProperties:(0,h.resolveWorkbenchCommonProperties)(c,u.os.release,u.os.hostname,d.commit,d.version,u.machineId,n,i.process,u.remoteAuthority),piiPaths:(0,y.getPiiPathsFromEnvironment)(u),sendErrorTelemetry:!0};this.impl=this._register(new a.TelemetryService(w,l,d))}else this.impl=y.NullTelemetryService;this.sendErrorTelemetry=this.impl.sendErrorTelemetry}setExperimentProperty(u,d){return this.impl.setExperimentProperty(u,d)}get telemetryLevel(){return this.impl.telemetryLevel}publicLog(u,d){this.impl.publicLog(u,d)}publicLog2(u,d){this.publicLog(u,d)}publicLogError(u,d){this.impl.publicLogError(u,d)}publicLogError2(u,d){this.publicLogError(u,d)}};e.TelemetryService=s,e.TelemetryService=s=fe([O(0,T.INativeWorkbenchEnvironmentService),O(1,f.IProductService),O(2,v.ISharedProcessService),O(3,S.IStorageService),O(4,b.IConfigurationService)],s),(0,r.registerSingleton)(t.ITelemetryService,s,1)}),define(Q[1400],Y([1,0,35,5,6,4]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEmbedderTerminalService=void 0,e.IEmbedderTerminalService=(0,y.createDecorator)("embedderTerminalService");class T{constructor(){this._onDidCreateTerminal=new b.Emitter,this.onDidCreateTerminal=b.Event.buffer(this._onDidCreateTerminal.event)}createTerminal(m){const S={name:m.name,isFeatureTerminal:!0,customPtyImplementation(h,a,r){return new f(h,m.pty)}};this._onDidCreateTerminal.fire(S)}}class f extends D.Disposable{constructor(m,S){super(),this.id=m,this.shouldPersist=!1,this._onProcessReady=this._register(new b.Emitter),this.onProcessReady=this._onProcessReady.event,this._onDidChangeProperty=this._register(new b.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._onProcessExit=this._register(new b.Emitter),this.onProcessExit=this._onProcessExit.event,this._pty=S,this.onProcessData=this._pty.onDidWrite,this._pty.onDidClose&&this._register(this._pty.onDidClose(h=>this._onProcessExit.fire(h||void 0))),this._pty.onDidChangeName&&this._register(this._pty.onDidChangeName(h=>this._onDidChangeProperty.fire({type:"title",value:h})))}async start(){this._onProcessReady.fire({pid:-1,cwd:"",windowsPty:void 0}),this._pty.open()}shutdown(){this._pty.close()}input(){}async processBinary(){}resize(){}clearBuffer(){}acknowledgeDataEvent(){}async setUnicodeVersion(){}async getInitialCwd(){return""}async getCwd(){return""}refreshProperty(m){throw new Error(`refreshProperty is not suppported in EmbedderTerminalProcess. property: ${m}`)}updateProperty(m,S){throw new Error(`updateProperty is not suppported in EmbedderTerminalProcess. property: ${m}, value: ${S}`)}}(0,t.registerSingleton)(e.IEmbedderTerminalService,T,1)}),define(Q[4085],Y([1,0,4,22,61,126,119,533,422,159,1400]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalMainContribution=void 0;let h=class extends t.Disposable{constructor(r,i,s,o,u,d,p){super(),r.registerEditor(`${y.Schemas.vscodeTerminal}:/**`,{id:T.terminalEditorId,label:v.terminalStrings.terminal,priority:m.RegisteredEditorPriority.exclusive},{canSupportResource:c=>c.scheme===y.Schemas.vscodeTerminal,singlePerResource:!0},{createEditorInput:async({resource:c,options:l})=>{let n=o.getInstanceFromResource(c);if(n)d.getGroupForInstance(n)?.removeInstance(n);else{const E=(0,f.parseTerminalUri)(c);if(!E.instanceId)throw new Error("Terminal identifier without instanceId");const C=o.getPrimaryBackend();if(!C)throw new Error("No terminal primary backend");const I=await C.requestDetachInstance(E.workspaceId,E.instanceId);if(!I)throw new Error("No terminal persistent process to attach");n=p.createInstance({attachPersistentProcess:I},D.TerminalLocation.Editor)}const g=u.resolveResource(n);return{editor:u.getInputFromResource(g),options:{...l,pinned:!0,forceReload:!0,override:T.terminalEditorId}}}}),s.registerFormatter({scheme:y.Schemas.vscodeTerminal,formatting:{label:"${path}",separator:""}}),i.onDidCreateTerminal(async c=>{const l=await o.createTerminal({config:c,location:D.TerminalLocation.Panel});o.setActiveInstance(l),await o.revealActiveTerminal()})}};e.TerminalMainContribution=h,e.TerminalMainContribution=h=fe([O(0,m.IEditorResolverService),O(1,S.IEmbedderTerminalService),O(2,b.ILabelService),O(3,T.ITerminalService),O(4,T.ITerminalEditorService),O(5,T.ITerminalGroupService),O(6,T.ITerminalInstanceService)],h)}),define(Q[4086],Y([1,0,20]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CombinedIndexTransformer=e.MonotonousIndexTransformer=e.SingleArrayEdit=e.ArrayEdit=void 0;class y{constructor(v){this.edits=v.slice().sort((0,t.compareBy)(m=>m.offset,t.numberComparator))}applyToArray(v){for(let m=this.edits.length-1;m>=0;m--){const S=this.edits[m];v.splice(S.offset,S.length,...new Array(S.newLength))}}}e.ArrayEdit=y;class b{constructor(v,m,S){this.offset=v,this.length=m,this.newLength=S}toString(){return`[${this.offset}, +${this.length}) -> +${this.newLength}}`}}e.SingleArrayEdit=b;class D{static fromMany(v){const m=v.map(S=>new D(S));return new T(m)}constructor(v){this.transformation=v,this.idx=0,this.offset=0}transform(v){let m=this.transformation.edits[this.idx];for(;m&&m.offset+m.length<=v;)this.offset+=m.newLength-m.length,this.idx++,m=this.transformation.edits[this.idx];if(!(m&&m.offset<=v))return v+this.offset}}e.MonotonousIndexTransformer=D;class T{constructor(v){this.transformers=v}transform(v){for(const m of this.transformers){const S=m.transform(v);if(S===void 0)return;v=S}return v}}e.CombinedIndexTransformer=T}),define(Q[4087],Y([1,0,493,4,109,392,238,27,1134,803,4086]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextMateWorkerTokenizerController=void 0;class h extends y.Disposable{static{this._id=0}constructor(o,u,d,p,c,l){super(),this._model=o,this._worker=u,this._languageIdCodec=d,this._backgroundTokenizationStore=p,this._configurationService=c,this._maxTokenizationLineLength=l,this.controllerId=h._id++,this._pendingChanges=[],this._states=new v.TokenizationStateStore,this._loggingEnabled=i("editor.experimental.asyncTokenizationLogging",!1,this._configurationService),this._register((0,b.keepAlive)(this._loggingEnabled)),this._register(this._model.onDidChangeContent(w=>{this._shouldLog&&console.log("model change",{fileName:this._model.uri.fsPath.split("\\").pop(),changes:r(w.changes)}),this._worker.acceptModelChanged(this.controllerId,w),this._pendingChanges.push(w)})),this._register(this._model.onDidChangeLanguage(w=>{const E=this._model.getLanguageId(),C=this._languageIdCodec.encodeLanguageId(E);this._worker.acceptModelLanguageChanged(this.controllerId,E,C)}));const n=this._model.getLanguageId(),g=this._languageIdCodec.encodeLanguageId(n);this._worker.acceptNewModel({uri:this._model.uri,versionId:this._model.getVersionId(),lines:this._model.getLinesContent(),EOL:this._model.getEOL(),languageId:n,encodedLanguageId:g,maxTokenizationLineLength:this._maxTokenizationLineLength.get(),controllerId:this.controllerId}),this._register((0,b.autorun)(w=>{const E=this._maxTokenizationLineLength.read(w);this._worker.acceptMaxTokenizationLineLength(this.controllerId,E)}))}dispose(){super.dispose(),this._worker.acceptRemovedModel(this.controllerId)}requestTokens(o,u){this._worker.retokenize(this.controllerId,o,u)}async setTokensAndStates(o,u,d,p){if(this.controllerId!==o)return;let c=m.ContiguousMultilineTokensBuilder.deserialize(new Uint8Array(d));if(this._shouldLog&&console.log("received background tokenization result",{fileName:this._model.uri.fsPath.split("\\").pop(),updatedTokenLines:c.map(n=>n.getLineRange()).join(" & "),updatedStateLines:p.map(n=>new T.LineRange(n.startLineNumber,n.startLineNumber+n.stateDeltas.length).toString()).join(" & ")}),this._shouldLog){const n=this._pendingChanges.filter(g=>g.versionId<=u).map(g=>g.changes).map(g=>r(g)).join(" then ");console.log("Applying changes to local states",n)}for(;this._pendingChanges.length>0&&this._pendingChanges[0].versionId<=u;){const n=this._pendingChanges.shift();this._states.acceptChanges(n.changes)}if(this._pendingChanges.length>0){if(this._shouldLog){const w=this._pendingChanges.map(E=>E.changes).map(E=>r(E)).join(" then ");console.log("Considering non-processed changes",w)}const n=S.MonotonousIndexTransformer.fromMany(this._pendingChanges.map(w=>a(w.changes))),g=new m.ContiguousMultilineTokensBuilder;for(const w of c)for(let E=w.startLineNumber;E<=w.endLineNumber;E++)n.transform(E-1)!==void 0&&g.add(E,w.getLineTokens(E));c=g.finalize();for(const w of this._pendingChanges)for(const E of w.changes)for(let C=0;C<c.length;C++)c[C].applyEdit(E.range,E.text)}const l=S.MonotonousIndexTransformer.fromMany(this._pendingChanges.map(n=>a(n.changes)));if(!this._applyStateStackDiffFn||!this._initialState){const{applyStateStackDiff:n,INITIAL:g}=await(0,t.importAMDNodeModule)("vscode-textmate","release/main.js");this._applyStateStackDiffFn=n,this._initialState=g}for(const n of p){let g=n.startLineNumber<=1?this._initialState:this._states.getEndState(n.startLineNumber-1);for(let w=0;w<n.stateDeltas.length;w++){const E=n.stateDeltas[w];let C;E?(C=this._applyStateStackDiffFn(g,E),this._states.setEndState(n.startLineNumber+w,C)):C=this._states.getEndState(n.startLineNumber+w);const I=l.transform(n.startLineNumber+w-1);I!==void 0&&this._backgroundTokenizationStore.setEndState(I+1,C),n.startLineNumber+w>=this._model.getLineCount()-1&&this._backgroundTokenizationStore.backgroundTokenizationFinished(),g=C}}this._backgroundTokenizationStore.setTokens(c)}get _shouldLog(){return this._loggingEnabled.get()}}e.TextMateWorkerTokenizerController=h;function a(s){return new S.ArrayEdit(s.map(o=>new S.SingleArrayEdit(o.range.startLineNumber-1,o.range.endLineNumber-o.range.startLineNumber+1,(0,D.countEOL)(o.text)[0]+1)))}function r(s){return s.map(o=>f.Range.lift(o.range).toString()+" => "+o.text).join(" & ")}function i(s,o,u){return(0,b.observableFromEvent)(d=>u.onDidChangeConfiguration(p=>{p.affectsConfiguration(s)&&d(p)}),()=>u.getValue(s)??o)}}),define(Q[4088],Y([1,0,4,22,18,10,1175,50,125,57,9,91,412,23,30,4087]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.ThreadedBackgroundTokenizerFactory=void 0;let u=class{static{o=this}static{this._reportedMismatchingTokens=!1}constructor(c,l,n,g,w,E,C,I,_,A){this._reportTokenizationTime=c,this._shouldTokenizeAsync=l,this._extensionResourceLoaderService=n,this._modelService=g,this._languageConfigurationService=w,this._configurationService=E,this._languageService=C,this._environmentService=I,this._notificationService=_,this._telemetryService=A,this._workerProxyPromise=null,this._worker=null,this._workerProxy=null,this._workerTokenizerControllers=new Map,this._currentTheme=null,this._currentTokenColorMap=null,this._grammarDefinitions=[]}dispose(){this._disposeWorker()}createBackgroundTokenizer(c,l,n){if(!this._shouldTokenizeAsync()||c.isTooLargeForSyncing())return;const g=new t.DisposableStore,w=this._getWorkerProxy().then(E=>{if(g.isDisposed||!E)return;const C={controller:void 0,worker:this._worker};return g.add(d(c,()=>{const I=new s.TextMateWorkerTokenizerController(c,E,this._languageService.languageIdCodec,l,this._configurationService,n);return C.controller=I,this._workerTokenizerControllers.set(I.controllerId,I),(0,t.toDisposable)(()=>{C.controller=void 0,this._workerTokenizerControllers.delete(I.controllerId),I.dispose()})})),C});return{dispose(){g.dispose()},requestTokens:async(E,C)=>{const I=await w;I?.controller&&I.worker===this._worker&&I.controller.requestTokens(E,C)},reportMismatchingTokens:E=>{o._reportedMismatchingTokens||(o._reportedMismatchingTokens=!0,this._notificationService.error({message:"Async Tokenization Token Mismatch in line "+E,name:"Async Tokenization Token Mismatch"}),this._telemetryService.publicLog2("asyncTokenizationMismatchingTokens",{}))}}}setGrammarDefinitions(c){this._grammarDefinitions=c,this._disposeWorker()}acceptTheme(c,l){this._currentTheme=c,this._currentTokenColorMap=l,this._currentTheme&&this._currentTokenColorMap&&this._workerProxy&&this._workerProxy.acceptTheme(this._currentTheme,this._currentTokenColorMap)}_getWorkerProxy(){return this._workerProxyPromise||(this._workerProxyPromise=this._createWorkerProxy()),this._workerProxyPromise}async _createWorkerProxy(){const c=`${y.nodeModulesPath}/vscode-textmate`,l=`${y.nodeModulesAsarPath}/vscode-textmate`,n=`${y.nodeModulesPath}/vscode-oniguruma`,g=`${y.nodeModulesAsarPath}/vscode-oniguruma`,w=this._environmentService.isBuilt&&!b.isWeb,E=w?l:c,C=w?g:n,I=`${E}/release/main.js`,_=`${C}/release/main.js`,A=`${C}/release/onig.wasm`,k=y.FileAccess.asBrowserUri(I).toString(!0),L={grammarDefinitions:this._grammarDefinitions,textmateMainUri:k,onigurumaMainUri:y.FileAccess.asBrowserUri(_).toString(!0),onigurumaWASMUri:y.FileAccess.asBrowserUri(A).toString(!0)},R={readFile:async P=>{const x=D.URI.revive(P);return this._extensionResourceLoaderService.readExtensionResource(x)},setTokensAndStates:async(P,x,F,V)=>{const W=this._workerTokenizerControllers.get(P);W&&W.setTokensAndStates(P,x,F,V)},reportTokenizationTime:(P,x,F,V,W)=>{this._reportTokenizationTime(P,x,F,V,W)}},M=this._worker=(0,T.createWebWorker)(this._modelService,this._languageConfigurationService,{createData:L,label:"textMateWorker",moduleId:"vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.worker",host:R}),N=await M.getProxy();return this._worker!==M?null:(this._workerProxy=N,this._currentTheme&&this._currentTokenColorMap&&this._workerProxy.acceptTheme(this._currentTheme,this._currentTokenColorMap),N)}_disposeWorker(){for(const c of this._workerTokenizerControllers.values())c.dispose();this._workerTokenizerControllers.clear(),this._worker&&(this._worker.dispose(),this._worker=null),this._workerProxy=null,this._workerProxyPromise=null}};e.ThreadedBackgroundTokenizerFactory=u,e.ThreadedBackgroundTokenizerFactory=u=o=fe([O(2,a.IExtensionResourceLoaderService),O(3,m.IModelService),O(4,v.ILanguageConfigurationService),O(5,S.IConfigurationService),O(6,f.ILanguageService),O(7,h.IEnvironmentService),O(8,r.INotificationService),O(9,i.ITelemetryService)],u);function d(p,c){const l=new t.DisposableStore,n=l.add(new t.DisposableStore);function g(){p.isAttachedToEditor()?n.add(c()):n.clear()}return g(),l.add(p.onDidChangeAttached(()=>{g()})),l}}),define(Q[756],Y([1,0,5]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextMateTokenizationService=void 0,e.ITextMateTokenizationService=(0,t.createDecorator)("textMateTokenizationFeature")}),define(Q[4089],Y([1,0,2657,27,13,81,756,57,21,10,59,79,86,139,11,26,25]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class u extends b.Action2{static{this.resource=m.URI.parse("inmemory:///tm-log.txt")}constructor(){super({id:"editor.action.startDebugTextMate",title:{value:t.localize(0,null),original:"Start Text Mate Syntax Grammar Logging"},category:D.Categories.Developer,f1:!0})}_getOrCreateModel(p){const c=p.getModel(u.resource);return c||p.createModel("",null,u.resource)}_append(p,c){const l=p.getLineCount();p.applyEdits([{range:new y.Range(l,1073741824,l,1073741824),text:c}])}async run(p){const c=p.get(T.ITextMateTokenizationService),l=p.get(f.IModelService),n=p.get(v.IEditorService),g=p.get(h.ICodeEditorService),w=p.get(a.IHostService),E=p.get(r.INativeWorkbenchEnvironmentService),C=p.get(i.ILoggerService),I=p.get(o.IFileService),_=(0,s.joinPath)(E.tmpDir,`vcode-tm-log-${(0,S.generateUuid)()}.txt`);await I.createFile(_);const A=C.createLogger(_,{name:"debug textmate"}),k=this._getOrCreateModel(l),L=N=>{this._append(k,N+` `),M(),A.info(N),A.flush()};if(await w.openWindow([{fileUri:_}],{forceNewWindow:!0}),!await n.openEditor({resource:k.uri,options:{pinned:!0}}))return;const M=()=>{const N=g.listCodeEditors();for(const P of N)P.hasModel()&&P.getModel().uri.toString()===u.resource.toString()&&P.revealLine(P.getModel().getLineCount())};L("// Open the file you want to test to the side and watch here"),L(`// Output mirrored at ${_}`),c.startDebugMode(N=>{this._append(k,N+` `),M(),A.info(N),A.flush()},()=>{})}}(0,b.registerAction2)(u)}),define(Q[4090],Y([1,0,3927,3509,3928,3929,4089]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(Q[4091],Y([1,0,6,4,145,439,99]),function(q,e,t,y,b,D,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextMateTokenizationSupport=void 0;class f extends y.Disposable{constructor(m,S,h,a,r,i,s){super(),this._grammar=m,this._initialState=S,this._containsEmbeddedLanguages=h,this._createBackgroundTokenizer=a,this._backgroundTokenizerShouldOnlyVerifyTokens=r,this._reportTokenizationTime=i,this._reportSlowTokenization=s,this._seenLanguages=[],this._onDidEncounterLanguage=this._register(new t.Emitter),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event}get backgroundTokenizerShouldOnlyVerifyTokens(){return this._backgroundTokenizerShouldOnlyVerifyTokens()}getInitialState(){return this._initialState}tokenize(m,S,h){throw new Error("Not supported!")}createBackgroundTokenizer(m,S){if(this._createBackgroundTokenizer)return this._createBackgroundTokenizer(m,S)}tokenizeEncoded(m,S,h){const a=Math.random()*1e4<1,r=this._reportSlowTokenization||a,i=r?new b.StopWatch(!0):void 0,s=this._grammar.tokenizeLine2(m,h,500);if(r){const u=i.elapsed();(a||u>32)&&this._reportTokenizationTime(u,m.length,a)}if(s.stoppedEarly)return console.warn(`Time limit reached when tokenizing line: ${m.substring(0,100)}`),new T.EncodedTokenizationResult(s.tokens,h);if(this._containsEmbeddedLanguages){const u=this._seenLanguages,d=s.tokens;for(let p=0,c=d.length>>>1;p<c;p++){const l=d[(p<<1)+1],n=D.TokenMetadata.getLanguageId(l);u[n]||(u[n]=!0,this._onDidEncounterLanguage.fire(n))}}let o;return h.equals(s.ruleStack)?o=h:o=s.ruleStack,new T.EncodedTokenizationResult(s.tokens,o)}}e.TextMateTokenizationSupport=f}),define(Q[4092],Y([1,0,843,4,109]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationSupportWithLineLimit=void 0;class D extends y.Disposable{get backgroundTokenizerShouldOnlyVerifyTokens(){return this._actual.backgroundTokenizerShouldOnlyVerifyTokens}constructor(f,v,m){super(),this._encodedLanguageId=f,this._actual=v,this._maxTokenizationLineLength=m,this._register((0,b.keepAlive)(this._maxTokenizationLineLength))}getInitialState(){return this._actual.getInitialState()}tokenize(f,v,m){throw new Error("Not supported!")}tokenizeEncoded(f,v,m){return f.length>=this._maxTokenizationLineLength.get()?(0,t.nullTokenizeEncoded)(this._encodedLanguageId,m):this._actual.tokenizeEncoded(f,v,m)}createBackgroundTokenizer(f,v){if(this._actual.createBackgroundTokenizer)return this._actual.createBackgroundTokenizer(f,v)}}e.TokenizationSupportWithLineLimit=D}),define(Q[4093],Y([1,0,3105,121,538]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.grammarsExtPoint=void 0,e.grammarsExtPoint=y.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"grammars",deps:[b.languagesExtPoint],jsonSchema:{description:t.localize(0,null),type:"array",defaultSnippets:[{body:[{language:"${1:id}",scopeName:"source.${2:id}",path:"./syntaxes/${3:id}.tmLanguage."}]}],items:{type:"object",defaultSnippets:[{body:{language:"${1:id}",scopeName:"source.${2:id}",path:"./syntaxes/${3:id}.tmLanguage."}}],properties:{language:{description:t.localize(1,null),type:"string"},scopeName:{description:t.localize(2,null),type:"string"},path:{description:t.localize(3,null),type:"string"},embeddedLanguages:{description:t.localize(4,null),type:"object"},tokenTypes:{description:t.localize(5,null),type:"object",additionalProperties:{enum:["string","comment","other"]}},injectTo:{description:t.localize(6,null),type:"array",items:{type:"string"}},balancedBracketScopes:{description:t.localize(7,null),type:"array",items:{type:"string"},default:["*"]},unbalancedBracketScopes:{description:t.localize(8,null),type:"array",items:{type:"string"},default:[]}},required:["scopeName","path"]}}})}),define(Q[1401],Y([1,0]),function(q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeRule=e.findMatchingThemeRule=void 0;function t(D,T,f=!0){for(let v=T.length-1;v>=0;v--){const m=T.slice(0,v),S=T[v],h=y(D,S,m,f);if(h)return h}return null}e.findMatchingThemeRule=t;function y(D,T,f,v){let m=null;for(let S=D.tokenColors.length-1;S>=0;S--){const h=D.tokenColors[S];if(v&&!h.settings.foreground)continue;let a;if(typeof h.scope=="string")a=h.scope.split(/,/).map(r=>r.trim());else if(Array.isArray(h.scope))a=h.scope;else continue;for(let r=0,i=a.length;r<i;r++){const s=a[r],o=new b(s,h.settings);o.matches(T,f)&&o.isMoreSpecific(m)&&(m=o)}}return m}class b{constructor(T,f){this.rawSelector=T,this.settings=f;const v=this.rawSelector.split(/ /);this.scope=v[v.length-1],this.parentScopes=v.slice(0,v.length-1)}matches(T,f){return b._matches(this.scope,this.parentScopes,T,f)}static _cmp(T,f){if(T===null&&f===null)return 0;if(T===null)return-1;if(f===null)return 1;if(T.scope.length!==f.scope.length)return T.scope.length-f.scope.length;const v=T.parentScopes.length,m=f.parentScopes.length;if(v!==m)return v-m;for(let S=0;S<v;S++){const h=T.parentScopes[S].length,a=f.parentScopes[S].length;if(h!==a)return h-a}return 0}isMoreSpecific(T){return b._cmp(this,T)>0}static _matchesOne(T,f){const v=T+".";return T===f||f.substring(0,v.length)===v}static _matches(T,f,v,m){if(!this._matchesOne(T,v))return!1;let S=f.length-1,h=m.length-1;for(;S>=0&&h>=0;)this._matchesOne(f[S],m[h])&&S--,h--;return S===-1}}e.ThemeRule=b}),define(Q[4094],Y([1,0,26]),function(q,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TMScopeRegistry=void 0;class y{constructor(){this._scopeNameToLanguageRegistration=Object.create(null)}reset(){this._scopeNameToLanguageRegistration=Object.create(null)}register(D){if(this._scopeNameToLanguageRegistration[D.scopeName]){const T=this._scopeNameToLanguageRegistration[D.scopeName];t.isEqual(T.location,D.location)||console.warn(`Overwriting grammar scope name to file mapping for scope ${D.scopeName}. Old grammar file: ${T.location.toString()}. New grammar file: ${D.location.toString()}`)}this._scopeNameToLanguageRegistration[D.scopeName]=D}getGrammarDefinition(D){return this._scopeNameToLanguageRegistration[D]||null}}e.TMScopeRegistry=y}),define(Q[4095],Y([1,0,4,4094]),function(q,e,t,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TMGrammarFactory=e.missingTMGrammarErrorMessage=void 0,e.missingTMGrammarErrorMessage="No TM Grammar registered for this language.";class b extends t.Disposable{constructor(T,f,v,m){super(),this._host=T,this._initialState=v.INITIAL,this._scopeRegistry=new y.TMScopeRegistry,this._injections={},this._injectedEmbeddedLanguages={},this._languageToScope=new Map,this._grammarRegistry=this._register(new v.Registry({onigLib:m,loadGrammar:async S=>{const h=this._scopeRegistry.getGrammarDefinition(S);if(!h)return this._host.logTrace(`No grammar found for scope ${S}`),null;const a=h.location;try{const r=await this._host.readFile(a);return v.parseRawGrammar(r,a.path)}catch(r){return this._host.logError(`Unable to load and parse grammar for scope ${S} from ${a}`,r),null}},getInjections:S=>{const h=S.split(".");let a=[];for(let r=1;r<=h.length;r++){const i=h.slice(0,r).join(".");a=[...a,...this._injections[i]||[]]}return a}}));for(const S of f){if(this._scopeRegistry.register(S),S.injectTo){for(const h of S.injectTo){let a=this._injections[h];a||(this._injections[h]=a=[]),a.push(S.scopeName)}if(S.embeddedLanguages)for(const h of S.injectTo){let a=this._injectedEmbeddedLanguages[h];a||(this._injectedEmbeddedLanguages[h]=a=[]),a.push(S.embeddedLanguages)}}S.language&&this._languageToScope.set(S.language,S.scopeName)}}has(T){return this._languageToScope.has(T)}setTheme(T,f){this._grammarRegistry.setTheme(T,f)}getColorMap(){return this._grammarRegistry.getColorMap()}async createGrammar(T,f){const v=this._languageToScope.get(T);if(typeof v!="string")throw new Error(e.missingTMGrammarErrorMessage);const m=this._scopeRegistry.getGrammarDefinition(v);if(!m)throw new Error(e.missingTMGrammarErrorMessage);const S=m.embeddedLanguages;if(this._injectedEmbeddedLanguages[v]){const r=this._injectedEmbeddedLanguages[v];for(const i of r)for(const s of Object.keys(i))S[s]=i[s]}const h=Object.keys(S).length>0;let a;try{a=await this._grammarRegistry.loadGrammarWithConfiguration(v,f,{embeddedLanguages:S,tokenTypes:m.tokenTypes,balancedBracketSelectors:m.balancedBracketSelectors,unbalancedBracketSelectors:m.unbalancedBracketSelectors})}catch(r){throw r.message&&r.message.startsWith("No grammar provided for")?new Error(e.missingTMGrammarErrorMessage):r}return{languageId:T,grammar:a,initialState:this._initialState,containsEmbeddedLanguages:h,sourceExtensionId:m.sourceExtensionId}}}e.TMGrammarFactory=b}),define(Q[633],Y([1,0,300,62,493,31]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SUPPORTED_ENCODINGS=e.detectEncodingFromBuffer=e.toCanonicalName=e.detectEncodingByBOMFromBuffer=e.toNodeEncoding=e.encodingExists=e.toEncodeReadable=e.toDecodeStream=e.DecodeStreamError=e.DecodeStreamErrorKind=e.UTF8_BOM=e.UTF16le_BOM=e.UTF16be_BOM=e.isUTFEncoding=e.UTF16le=e.UTF16be=e.UTF8_with_bom=e.UTF8=void 0,e.UTF8="utf8",e.UTF8_with_bom="utf8bom",e.UTF16be="utf16be",e.UTF16le="utf16le";function T(C){return[e.UTF8,e.UTF8_with_bom,e.UTF16be,e.UTF16le].some(I=>I===C)}e.isUTFEncoding=T,e.UTF16be_BOM=[254,255],e.UTF16le_BOM=[255,254],e.UTF8_BOM=[239,187,191];const f=512,v=512,m=512*8,S=512*128;var h;(function(C){C[C.STREAM_IS_BINARY=1]="STREAM_IS_BINARY"})(h||(e.DecodeStreamErrorKind=h={}));class a extends Error{constructor(I,_){super(I),this.decodeStreamErrorKind=_}}e.DecodeStreamError=a;class r{static async create(I){let _;if(I!==e.UTF8)_=(await(0,b.importAMDNodeModule)("@vscode/iconv-lite-umd","lib/iconv-lite-umd.js")).getDecoder(u(I));else{const A=new TextDecoder;_={write(k){return A.decode(k,{stream:!0})},end(){return A.decode()}}}return new r(_)}constructor(I){this.iconvLiteDecoder=I}write(I){return this.iconvLiteDecoder.write(I)}end(){return this.iconvLiteDecoder.end()}}function i(C,I){const _=I.minBytesRequiredForDetection??I.guessEncoding?m:v;return new Promise((A,k)=>{const L=(0,t.newWriteableStream)(F=>F.join("")),R=[];let M=0,N;const P=new D.CancellationTokenSource,x=async()=>{try{const F=await E({buffer:y.VSBuffer.concat(R),bytesRead:M},I.guessEncoding);if(F.seemsBinary&&I.acceptTextOnly)throw new a("Stream is binary but only text is accepted for decoding",1);F.encoding=await I.overwriteEncoding(F.encoding),N=await r.create(F.encoding);const V=N.write(y.VSBuffer.concat(R).buffer);L.write(V),R.length=0,M=0,A({stream:L,detected:F})}catch(F){P.cancel(),L.destroy(),k(F)}};(0,t.listenStream)(C,{onData:async F=>{N?L.write(N.write(F.buffer)):(R.push(F),M+=F.byteLength,M>=_&&(C.pause(),await x(),setTimeout(()=>C.resume())))},onError:F=>L.error(F),onEnd:async()=>{N||await x(),L.end(N?.end())}},P.token)})}e.toDecodeStream=i;async function s(C,I,_){const k=(await(0,b.importAMDNodeModule)("@vscode/iconv-lite-umd","lib/iconv-lite-umd.js")).getEncoder(u(I),_);let L=!1,R=!1;return{read(){if(R)return null;const M=C.read();if(typeof M!="string"){if(R=!0,!L&&_?.addBOM)switch(I){case e.UTF8:case e.UTF8_with_bom:return y.VSBuffer.wrap(Uint8Array.from(e.UTF8_BOM));case e.UTF16be:return y.VSBuffer.wrap(Uint8Array.from(e.UTF16be_BOM));case e.UTF16le:return y.VSBuffer.wrap(Uint8Array.from(e.UTF16le_BOM))}const N=k.end();return N&&N.length>0?(L=!0,y.VSBuffer.wrap(N)):null}return L=!0,y.VSBuffer.wrap(k.write(M))}}}e.toEncodeReadable=s;async function o(C){return(await(0,b.importAMDNodeModule)("@vscode/iconv-lite-umd","lib/iconv-lite-umd.js")).encodingExists(u(C))}e.encodingExists=o;function u(C){return C===e.UTF8_with_bom||C===null?e.UTF8:C}e.toNodeEncoding=u;function d(C,I){if(!C||I<e.UTF16be_BOM.length)return null;const _=C.readUInt8(0),A=C.readUInt8(1);if(_===e.UTF16be_BOM[0]&&A===e.UTF16be_BOM[1])return e.UTF16be;if(_===e.UTF16le_BOM[0]&&A===e.UTF16le_BOM[1])return e.UTF16le;if(I<e.UTF8_BOM.length)return null;const k=C.readUInt8(2);return _===e.UTF8_BOM[0]&&A===e.UTF8_BOM[1]&&k===e.UTF8_BOM[2]?e.UTF8_with_bom:null}e.detectEncodingByBOMFromBuffer=d;const p=["ascii","utf-16","utf-32"];async function c(C){const I=await(0,b.importAMDNodeModule)("jschardet","dist/jschardet.min.js"),_=C.slice(0,S),A=g(_.buffer),k=I.detect(A);if(!k||!k.encoding)return null;const L=k.encoding.toLowerCase();return 0<=p.indexOf(L)?null:n(k.encoding)}const l={ibm866:"cp866",big5:"cp950"};function n(C){const I=C.replace(/[^a-zA-Z0-9]/g,"").toLowerCase();return l[I]||I}function g(C){let I="";for(let _=0;_<C.length;_++)I+=String.fromCharCode(C[_]);return I}function w(C){switch(C){case"shiftjis":return"shift-jis";case"utf16le":return"utf-16le";case"utf16be":return"utf-16be";case"big5hkscs":return"big5-hkscs";case"eucjp":return"euc-jp";case"euckr":return"euc-kr";case"koi8r":return"koi8-r";case"koi8u":return"koi8-u";case"macroman":return"x-mac-roman";case"utf8bom":return"utf8";default:{const I=C.match(/windows(\d+)/);return I?"windows-"+I[1]:C}}}e.toCanonicalName=w;function E({buffer:C,bytesRead:I},_){let A=d(C,I),k=!1;if(A!==e.UTF16be&&A!==e.UTF16le&&C){let L=!0,R=!0,M=!1;for(let N=0;N<I&&N<f;N++){const P=N%2===1,x=C.readUInt8(N)===0;if(x&&(M=!0),L&&(P&&!x||!P&&x)&&(L=!1),R&&(P&&x||!P&&!x)&&(R=!1),x&&!L&&!R)break}M&&(L?A=e.UTF16le:R?A=e.UTF16be:k=!0)}return _&&!k&&!A&&C?c(C.slice(0,I)).then(L=>({seemsBinary:!1,encoding:L})):{seemsBinary:k,encoding:A}}e.detectEncodingFromBuffer=E,e.SUPPORTED_ENCODINGS={utf8:{labelLong:"UTF-8",labelShort:"UTF-8",order:1,alias:"utf8bom"},utf8bom:{labelLong:"UTF-8 with BOM",labelShort:"UTF-8 with BOM",encodeOnly:!0,order:2,alias:"utf8"},utf16le:{labelLong:"UTF-16 LE",labelShort:"UTF-16 LE",order:3},utf16be:{labelLong:"UTF-16 BE",labelShort:"UTF-16 BE",order:4},windows1252:{labelLong:"Western (Windows 1252)",labelShort:"Windows 1252",order:5},iso88591:{labelLong:"Western (ISO 8859-1)",labelShort:"ISO 8859-1",order:6},iso88593:{labelLong:"Western (ISO 8859-3)",labelShort:"ISO 8859-3",order:7},iso885915:{labelLong:"Western (ISO 8859-15)",labelShort:"ISO 8859-15",order:8},macroman:{labelLong:"Western (Mac Roman)",labelShort:"Mac Roman",order:9},cp437:{labelLong:"DOS (CP 437)",labelShort:"CP437",order:10},windows1256:{labelLong:"Arabic (Windows 1256)",labelShort:"Windows 1256",order:11},iso88596:{labelLong:"Arabic (ISO 8859-6)",labelShort:"ISO 8859-6",order:12},windows1257:{labelLong:"Baltic (Windows 1257)",labelShort:"Windows 1257",order:13},iso88594:{labelLong:"Baltic (ISO 8859-4)",labelShort:"ISO 8859-4",order:14},iso885914:{labelLong:"Celtic (ISO 8859-14)",labelShort:"ISO 8859-14",order:15},windows1250:{labelLong:"Central European (Windows 1250)",labelShort:"Windows 1250",order:16},iso88592:{labelLong:"Central European (ISO 8859-2)",labelShort:"ISO 8859-2",order:17},cp852:{labelLong:"Central European (CP 852)",labelShort:"CP 852",order:18},windows1251:{labelLong:"Cyrillic (Windows 1251)",labelShort:"Windows 1251",order:19},cp866:{labelLong:"Cyrillic (CP 866)",labelShort:"CP 866",order:20},iso88595:{labelLong:"Cyrillic (ISO 8859-5)",labelShort:"ISO 8859-5",order:21},koi8r:{labelLong:"Cyrillic (KOI8-R)",labelShort:"KOI8-R",order:22},koi8u:{labelLong:"Cyrillic (KOI8-U)",labelShort:"KOI8-U",order:23},iso885913:{labelLong:"Estonian (ISO 8859-13)",labelShort:"ISO 8859-13",order:24},windows1253:{labelLong:"Greek (Windows 1253)",labelShort:"Windows 1253",order:25},iso88597:{labelLong:"Greek (ISO 8859-7)",labelShort:"ISO 8859-7",order:26},windows1255:{labelLong:"Hebrew (Windows 1255)",labelShort:"Windows 1255",order:27},iso88598:{labelLong:"Hebrew (ISO 8859-8)",labelShort:"ISO 8859-8",order:28},iso885910:{labelLong:"Nordic (ISO 8859-10)",labelShort:"ISO 8859-10",order:29},iso885916:{labelLong:"Romanian (ISO 8859-16)",labelShort:"ISO 8859-16",order:30},windows1254:{labelLong:"Turkish (Windows 1254)",labelShort:"Windows 1254",order:31},iso88599:{labelLong:"Turkish (ISO 8859-9)",labelShort:"ISO 8859-9",order:32},windows1258:{labelLong:"Vietnamese (Windows 1258)",labelShort:"Windows 1258",order:33},gbk:{labelLong:"Simplified Chinese (GBK)",labelShort:"GBK",order:34},gb18030:{labelLong:"Simplified Chinese (GB18030)",labelShort:"GB18030",order:35},cp950:{labelLong:"Traditional Chinese (Big5)",labelShort:"Big5",order:36},big5hkscs:{labelLong:"Traditional Chinese (Big5-HKSCS)",labelShort:"Big5-HKSCS",order:37},shiftjis:{labelLong:"Japanese (Shift JIS)",labelShort:"Shift JIS",order:38},eucjp:{labelLong:"Japanese (EUC-JP)",labelShort:"EUC-JP",order:39},euckr:{labelLong:"Korean (EUC-KR)",labelShort:"EUC-KR",order:40},windows874:{labelLong:"Thai (Windows 874)",labelShort:"Windows 874",order:41},iso885911:{labelLong:"Latin/Thai (ISO 8859-11)",labelShort:"ISO 8859-11",order:42},koi8ru:{labelLong:"Cyrillic (KOI8-RU)",labelShort:"KOI8-RU",order:43},koi8t:{labelLong:"Tajik (KOI8-T)",labelShort:"KOI8-T",order:44},gb2312:{labelLong:"Simplified Chinese (GB 2312)",labelShort:"GB 2312",order:45},cp865:{labelLong:"Nordic DOS (CP 865)",labelShort:"CP 865",order:46},cp850:{labelLong:"Western European DOS (CP 850)",labelShort:"CP 850",order:47}}}),define(Q[4096],Y([1,0,3109,14,31,11,72,4,20]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextFileSaveParticipant=void 0;let m=class extends f.Disposable{constructor(h,a){super(),this.progressService=h,this.logService=a,this.saveParticipants=[]}addSaveParticipant(h){const a=(0,v.insert)(this.saveParticipants,h);return(0,f.toDisposable)(()=>a())}participate(h,a,r){const i=new b.CancellationTokenSource(r);return this.progressService.withProgress({title:(0,t.localize)(0,null,h.name),location:15,cancellable:!0,delay:h.isDirty()?3e3:5e3},async s=>{h.textEditorModel?.pushStackElement();for(const o of this.saveParticipants){if(i.token.isCancellationRequested||!h.textEditorModel)break;try{const u=o.participate(h,a,s,i.token);await(0,y.raceCancellation)(u,i.token)}catch(u){this.logService.error(u)}}h.textEditorModel?.pushStackElement()},()=>{i.cancel()}).finally(()=>{i.dispose()})}dispose(){this.saveParticipants.splice(0,this.saveParticipants.length),super.dispose()}};e.TextFileSaveParticipant=m,e.TextFileSaveParticipant=m=fe([O(0,T.IProgressService),O(1,D.ILogService)],m)}),define(Q[93],Y([1,0,25,5,62,17]),function(q,e,t,y,b,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toBufferOrReadable=e.stringToSnapshot=e.snapshotToString=e.isTextFileEditorModel=e.EncodingMode=e.TextFileResolveReason=e.TextFileEditorModelState=e.TextFileOperationError=e.TextFileOperationResult=e.ITextFileService=void 0,e.ITextFileService=(0,y.createDecorator)("textFileService");var T;(function(s){s[s.FILE_IS_BINARY=0]="FILE_IS_BINARY"})(T||(e.TextFileOperationResult=T={}));class f extends t.FileOperationError{static isTextFileOperationError(o){return o instanceof Error&&!(0,D.isUndefinedOrNull)(o.textFileOperationResult)}constructor(o,u,d){super(o,10),this.textFileOperationResult=u,this.options=d}}e.TextFileOperationError=f;var v;(function(s){s[s.SAVED=0]="SAVED",s[s.DIRTY=1]="DIRTY",s[s.PENDING_SAVE=2]="PENDING_SAVE",s[s.CONFLICT=3]="CONFLICT",s[s.ORPHAN=4]="ORPHAN",s[s.ERROR=5]="ERROR"})(v||(e.TextFileEditorModelState=v={}));var m;(function(s){s[s.EDITOR=1]="EDITOR",s[s.REFERENCE=2]="REFERENCE",s[s.OTHER=3]="OTHER"})(m||(e.TextFileResolveReason=m={}));var S;(function(s){s[s.Encode=0]="Encode",s[s.Decode=1]="Decode"})(S||(e.EncodingMode=S={}));function h(s){const o=s;return(0,D.areFunctions)(o.setEncoding,o.getEncoding,o.save,o.revert,o.isDirty,o.getLanguageId)}e.isTextFileEditorModel=h;function a(s){const o=[];let u;for(;typeof(u=s.read())=="string";)o.push(u);return o.join("")}e.snapshotToString=a;function r(s){let o=!1;return{read(){return o?null:(o=!0,s)}}}e.stringToSnapshot=r;function i(s){if(!(typeof s>"u"))return typeof s=="string"?b.VSBuffer.fromString(s):{read:()=>{const o=s.read();return typeof o=="string"?b.VSBuffer.fromString(o):null}}}e.toBufferOrReadable=i}),define(Q[4097],Y([1,0,4,10,6,21,5,22,17,130,196,15,205,1950,25,93,60,53]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebookDocumentsAndEditors=void 0;class d extends t.Disposable{constructor(I,_){super(),this.editor=I,this.textFileService=_,this._contentChangedEmitter=new b.Emitter,this.contentChanged=this._contentChangedEmitter.event,this._providerId="",this._providers=[],I.modelReady.then(A=>{this._providerId=A.providerId,this._register(A.contentChanged(k=>this._contentChangedEmitter.fire(k))),this._register(A.kernelChanged(k=>{let L={changeType:a.NotebookChangeType.KernelChanged};this._contentChangedEmitter.fire(L)})),this._register(A.onProviderIdChange(k=>{this._providerId=k}))}),I.notebookParams.providerInfo.then(A=>{this._providers=A.providers})}get uri(){return this.editor.notebookParams.notebookUri}get id(){return this.editor.id}get isDirty(){return this.editor.isDirty()}get providerId(){return this._providerId}get providers(){return this._providers}get cells(){return this.editor.cells}get model(){return this.editor.model}save(){return this.textFileService.save(this.uri).then(I=>!!I)}matches(I){return I?I.notebookUri.toString()===this.editor.notebookParams.input.notebookUri.toString():!1}applyEdits(I,_,A){return this.editor?(this.editor.executeEdits(_),!0):!1}runCell(I){return this.editor?this.editor.runCell(I):Promise.resolve(!1)}runAllCells(I,_){return this.editor?this.editor.runAllCells(I,_):Promise.resolve(!1)}clearOutput(I){return this.editor?this.editor.clearOutput(I):Promise.resolve(!1)}clearAllOutputs(){return this.editor?this.editor.clearAllOutputs():Promise.resolve(!1)}}function p(C){return new Promise(I=>setTimeout(I,C))}var c;(function(C){function I(A){let k=[];return A.forEach(L=>k.push(L)),k}C.setValues=I;function _(A){let k=[];return A.forEach(L=>k.push(L)),k}C.mapValues=_})(c||(c={}));var l;(function(C){function I(A,k){const L=[],R=[];return A.forEach(M=>{k.has(M)||L.push(M)}),k.forEach(M=>{A.has(M)||R.push(M)}),{removed:L,added:R}}C.ofSets=I;function _(A,k){const L=[],R=[];return A.forEach((M,N)=>{k.has(N)||L.push(M)}),k.forEach((M,N)=>{A.has(N)||R.push(M)}),{removed:L,added:R}}C.ofMaps=_})(l||(l={}));class n{constructor(I,_,A,k){this.removedEditors=I,this.addedEditors=_,this.oldActiveEditor=A,this.newActiveEditor=k,this.isEmpty=this.removedEditors.length===0&&this.addedEditors.length===0&&A===k}toString(){let I=`NotebookEditorStateDelta `;return I+=` Removed Editors: [${this.removedEditors.map(_=>_.id).join(", ")}] `,I+=` Added Editors: [${this.addedEditors.map(_=>_.id).join(", ")}] `,I+=` New Active Editor: ${this.newActiveEditor} `,I}}class g{static compute(I,_){if(!I)return new n([],c.mapValues(_.textEditors),void 0,_.activeEditor);const A=l.ofMaps(I.textEditors,_.textEditors),k=I.activeEditor!==_.activeEditor?I.activeEditor:void 0,L=I.activeEditor!==_.activeEditor?_.activeEditor:void 0;return new n(A.removed,A.added,k,L)}constructor(I,_){this.textEditors=I,this.activeEditor=_}}let w=class extends t.Disposable{constructor(I,_,A){super(),this._onDidChangeState=I,this._editorService=_,this._notebookService=A,this._register(this._editorService.onDidActiveEditorChange(this._updateState,this)),this._register(this._editorService.onDidVisibleEditorsChange(this._updateState,this)),this._register(this._notebookService.onNotebookEditorAdd(this._onDidAddEditor,this)),this._register(this._notebookService.onNotebookEditorRemove(this._onDidRemoveEditor,this)),this._register(this._notebookService.onNotebookEditorRename(this._onDidRenameEditor,this)),this._updateState()}_onDidAddEditor(I){this._updateState()}_onDidRemoveEditor(I){this._updateState()}_onDidRenameEditor(I){this._updateState()}_updateState(){const I=new Map;let _;for(const L of this._notebookService.listNotebookEditors())I.set(L.id,L),L.isActive()&&(_=L.id);const A=new g(I,_),k=g.compute(this._currentState,A);k.isEmpty||(this._currentState=A,this._onDidChangeState(k))}};w=fe([O(1,D.IEditorService),O(2,m.INotebookService)],w);let E=class extends t.Disposable{constructor(I,_,A,k,L){super(),this._instantiationService=_,this._notebookService=A,this._fileService=k,this._textFileService=L,this._notebookEditors=new Map,this._modelToDisposeMap=new Map,I&&(this._proxy=I.getProxy(u.SqlExtHostContext.ExtHostNotebookDocumentsAndEditors)),this._register(this._instantiationService.createInstance(w,R=>this._onDelta(R)))}$trySaveDocument(I){let _=y.URI.revive(I).toString(),A=this._notebookEditors.get(_);return A?A.save().then(k=>!!k):Promise.resolve(!1)}$tryShowNotebookDocument(I,_){return Promise.resolve(this.doOpenEditor(I,_))}$trySetTrusted(I,_){let A=y.URI.revive(I);return this._notebookService.setTrusted(A,_)}$tryApplyEdits(I,_,A,k){let L=this.getEditor(I);return L?Promise.resolve(L.applyEdits(_,A,k)):Promise.reject((0,h.disposed)(`TextEditor(${I})`))}$runCell(I,_){let A=this.getEditor(I);if(!A)return Promise.reject((0,h.disposed)(`TextEditor(${I})`));let k;if(_){let L=y.URI.revive(_).toString();k=A.cells.find(R=>R.cellUri.toString()===L)}else k=A.model.activeCell;return!k||k&&k.cellType!==a.CellTypes.Code?Promise.reject(new Error((0,r.localize)(0,null))):A.runCell(k)}$runAllCells(I,_,A){let k=this.getEditor(I);if(!k)return Promise.reject((0,h.disposed)(`TextEditor(${I})`));let L,R;if(_){let M=y.URI.revive(_).toString();L=k.cells.find(N=>N.cellUri.toString()===M)}if(A){let M=y.URI.revive(A).toString();R=k.cells.find(N=>N.cellUri.toString()===M)}return k.runAllCells(L,R)}$clearOutput(I,_){let A=this.getEditor(I);if(!A)return Promise.reject((0,h.disposed)(`TextEditor(${I})`));let k;if(_){let L=y.URI.revive(_).toString();k=A.cells.find(R=>R.cellUri.toString()===L)}else k=A.model.activeCell;return!k||k&&k.cellType!==a.CellTypes.Code?Promise.reject((0,r.localize)(1,null)):A.clearOutput(k)}$clearAllOutputs(I){let _=this.getEditor(I);return _?_.clearAllOutputs():Promise.reject((0,h.disposed)(`TextEditor(${I})`))}$changeKernel(I,_){let A=this.getEditor(I);return A?this.doChangeKernel(A,_.display_name):Promise.reject((0,h.disposed)(`TextEditor(${I})`))}async doOpenEditor(I,_){const A=await this._notebookService.openNotebook(I,_);if(A)return this.waitOnEditor(A.notebookInput)}async waitOnEditor(I){let _,A=10,k=20;for(;!_&&A>0;)_=this.findNotebookEditorIdFor(I),_||await p(k);return _}findNotebookEditorIdFor(I){let _;return this._notebookEditors.forEach(A=>{A.matches(I)&&(_=A.id)}),_}getEditor(I){return this._notebookEditors.get(I)}_onDelta(I){let _=[],A=[],k=[];for(const M of I.addedEditors){const N=new d(M,this._textFileService);this._notebookEditors.set(M.id,N),k.push(N)}for(const{id:M}of I.removedEditors){const N=this._notebookEditors.get(M);N&&(A.push(N.uri),N.dispose(),this._notebookEditors.delete(M),_.push(M))}let L=Object.create(null),R=!0;if(I.newActiveEditor!==void 0&&(R=!1,L.newActiveEditor=I.newActiveEditor),A.length>0&&(R=!1,L.removedDocuments=A),_.length>0&&(R=!1,L.removedEditors=_),I.addedEditors.length>0){R=!1,L.addedDocuments=[],L.addedEditors=[];for(let M of k)L.addedEditors.push(this._toNotebookEditorAddData(M)),L.addedDocuments.push(this._toNotebookModelAddData(M))}R||(this._proxy.$acceptDocumentsAndEditorsDelta(L),this.processRemovedDocs(A),this.processAddedDocs(k))}processRemovedDocs(I){I&&I.forEach(_=>{const A=this._modelToDisposeMap.get(_.toString());A&&(A.dispose(),this._modelToDisposeMap.delete(_.toString()))})}processAddedDocs(I){I&&I.forEach(_=>{let A=_.uri;const k=new t.DisposableStore;k.add(_.contentChanged(L=>{L.changeType!==a.NotebookChangeType.CellSourceUpdated&&this._proxy.$acceptModelChanged(A,this._toNotebookChangeData(L,_))})),this._modelToDisposeMap.set(_.uri.toString(),k)})}_toNotebookEditorAddData(I){return{documentUri:I.uri,editorPosition:void 0,id:I.editor.id}}_toNotebookModelAddData(I){return{uri:I.uri,isDirty:I.isDirty,providerId:I.providerId,providers:I.providers,cells:this.convertCellModelToNotebookCell(I.cells)}}_toNotebookChangeData(I,_){return{cells:this.convertCellModelToNotebookCell(_.cells),isDirty:this.getDirtyState(I,_),providerId:_.providerId,providers:_.providers,uri:_.uri,kernelSpec:this.getKernelSpec(_),changeKind:this.mapChangeKind(I.changeType)}}getDirtyState(I,_){return v.isUndefinedOrNull(I.isDirty)?_.isDirty:I.isDirty}mapChangeKind(I){switch(I){case a.NotebookChangeType.CellsModified:case a.NotebookChangeType.CellOutputUpdated:case a.NotebookChangeType.CellSourceUpdated:case a.NotebookChangeType.DirtyStateChanged:case a.NotebookChangeType.CellInputVisibilityChanged:case a.NotebookChangeType.CellOutputCleared:return S.NotebookChangeKind.ContentUpdated;case a.NotebookChangeType.KernelChanged:case a.NotebookChangeType.TrustChanged:case a.NotebookChangeType.CellMetadataUpdated:return S.NotebookChangeKind.MetadataUpdated;case a.NotebookChangeType.Saved:return S.NotebookChangeKind.Save;case a.NotebookChangeType.CellExecuted:return S.NotebookChangeKind.CellExecuted;default:return S.NotebookChangeKind.ContentUpdated}}getKernelSpec(I){return I&&I.model&&I.model.clientSession?I.model.clientSession.cachedKernelSpec:void 0}convertCellModelToNotebookCell(I){let _=[];if(Array.isArray(I))for(let A of I)_.push({uri:A.cellUri,contents:{cell_type:A.cellType,execution_count:A.executionCount,metadata:{language:A.language,azdata_cell_guid:A.cellGuid},source:void 0,outputs:[...A.outputs]}});else _.push({uri:I.cellUri,contents:{cell_type:I.cellType,execution_count:void 0,metadata:{language:I.language,azdata_cell_guid:I.cellGuid},source:void 0}});return _}async doChangeKernel(I,_){const A=this._modelToDisposeMap.get(I.id);return I.model.changeKernel(_),new Promise(k=>{A.add(I.model.kernelChanged(L=>{k(!0)})),this._modelToDisposeMap.set(I.id,A)})}$registerNavigationProvider(I,_){this._notebookService.registerNavigationProvider({providerId:I,hasNavigation:!0,getNavigation:async A=>await this._proxy.$getNavigation(_,A),onNext:async A=>{let k=await this._proxy.$getNavigation(_,A);if(k)if(k.next.scheme===f.Schemas.untitled){let L=y.URI.parse(`untitled:${k.next.path}`),R=await this._fileService.readFile(y.URI.file(k.next.path));await this.doOpenEditor(L,{initialContent:R.value.toString(),initialDirtyState:!1})}else await this.doOpenEditor(k.next,{})},onPrevious:async A=>{let k=await this._proxy.$getNavigation(_,A);if(k)if(k.previous.scheme===f.Schemas.untitled){let L=y.URI.parse(`untitled:${k.previous.path}`),R=await this._fileService.readFile(y.URI.file(k.previous.path));await this.doOpenEditor(L,{initialContent:R.value.toString(),initialDirtyState:!1})}else await this.doOpenEditor(k.previous,{})}})}};e.MainThreadNotebookDocumentsAndEditors=E,e.MainThreadNotebookDocumentsAndEditors=E=fe([(0,o.extHostNamedCustomer)(u.SqlMainContext.MainThreadNotebookDocumentsAndEditors),O(1,T.IInstantiationService),O(2,m.INotebookService),O(3,i.IFileService),O(4,s.ITextFileService)],E)}),define(Q[4098],Y([1,0,199,218,733,3569,450,229,34,29,49,5,19,7,2056,396,93,55,23,575,36,743,72,59,76,1013,1284,198,4,54,101]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w,E,C,I,_,A,k){"use strict";var L,R,M;Object.defineProperty(e,"__esModule",{value:!0}),e.ActionBarToggleTooltip=e.ExecutionPlanComparisonEditorView=void 0;const N=(0,i.localize)(0,null);let P=class extends _.Disposable{get activeTopPlanDiagram(){if(this.topPlanDiagrams.length>0)return this.topPlanDiagrams[this._activeTopPlanIndex]}get activeBottomPlanDiagram(){if(this.bottomPlanDiagrams.length>0)return this.bottomPlanDiagrams[this._activeBottomPlanIndex]}createQueryDropdownPrefixString(j,ee,X){return(0,i.localize)(1,null,ee,X,j)}constructor(j,ee,X,te,Z,se,re,oe,le){super(),this._instantiationService=ee,this._executionPlanService=X,this._fileDialogService=te,this.contextViewService=Z,this._textFileService=se,this._notificationService=re,this._progressService=oe,this._contextMenuService=le,this._orientation=D.ExecutionPlanCompareOrientation.Horizontal,this._topPlanDiagramContainers=[],this.topPlanDiagrams=[],this._activeTopPlanIndex=0,this._topSimilarNode=new Map,this._polygonRootsMap=new Map,this._bottomPlanDiagramContainers=[],this.bottomPlanDiagrams=[],this._activeBottomPlanIndex=0,this._bottomSimilarNode=new Map,this._areTooltipsEnabled=!0,this.container=r.$(".comparison-editor"),j.appendChild(this.container),this.initializeToolbar(),this.initializePlanComparison(),this.refreshSplitView()}initializeToolbar(){this._addExecutionPlanAction=this._register(this._instantiationService.createInstance(x)),this._zoomOutAction=this._register(new V),this._zoomInAction=this._register(new F),this._zoomToFitAction=this._register(new W),this._propertiesAction=this._register(this._instantiationService.createInstance(K)),this._toggleOrientationAction=this._register(new B),this._searchNodeAction=this._register(this._instantiationService.createInstance(G,U.Primary)),this._searchNodeActionForAddedPlan=this._register(this._instantiationService.createInstance(G,U.Added)),this._resetZoomAction=this._register(new z),this._toggleTooltipAction=this._register(new H);const j=[{action:this._addExecutionPlanAction},{action:this._zoomInAction},{action:this._zoomOutAction},{action:this._zoomToFitAction},{action:this._resetZoomAction},{action:this._toggleOrientationAction},{action:this._propertiesAction},{action:this._searchNodeAction},{action:this._searchNodeActionForAddedPlan},{action:this._toggleTooltipAction}];this._taskbarContainer=r.$(".editor-toolbar"),this._taskbar=this._register(new y.Taskbar(this._taskbarContainer,{orientation:0})),this._taskbar.context=this,this._taskbar.setContent(j),this.container.appendChild(this._taskbarContainer)}initializePlanComparison(){this._planComparisonContainer=r.$(".plan-comparison-container"),this.container.appendChild(this._planComparisonContainer),this.initializeSplitView(),this.initializeProperties(),this.initializeWidgetControllers()}initializeSplitView(){this.planSplitViewContainer=r.$(".split-view-container"),this._planComparisonContainer.appendChild(this.planSplitViewContainer);const j=this;this._placeholderContainer=r.$(".placeholder");const ee=[this._register(this._instantiationService.createInstance(x))];this._register(r.addDisposableListener(this._placeholderContainer,r.EventType.CONTEXT_MENU,X=>{ee&&this._contextMenuService.showContextMenu({getAnchor:()=>({x:X.x,y:X.y}),getActions:()=>ee,getActionsContext:()=>j})})),this._placeholderInfoboxContainer=r.$(".placeholder-infobox"),this._placeholderButton=this._register(new I.Button(this._placeholderInfoboxContainer,{secondary:!0,...A.defaultButtonStyles})),this._placeholderButton.label=N,this._placeholderButton.ariaLabel=N,this._placeholderButton.enabled=!0,this._register(this._placeholderButton.onDidClick(X=>{this._register(this._instantiationService.createInstance(x)).run(j)})),this._placeholderLoading=this._register(new p.LoadingSpinner(this._placeholderContainer,{fullSize:!0,showText:!0})),this._placeholderContainer.appendChild(this._placeholderInfoboxContainer),this._placeholderLoading.loadingMessage=(0,i.localize)(2,null),this._placeholderLoading.loadingCompletedMessage=(0,i.localize)(3,null),this._topPlanContainer=r.$(".plan-container"),this.planSplitViewContainer.appendChild(this._topPlanContainer),this._topPlanDropdownContainer=r.$(".dropdown-container"),this._topPlanDropdown=this._register(new t.SelectBox(["option 1","option2"],"option1",k.defaultSelectBoxStyles,this.contextViewService,this._topPlanDropdownContainer)),this._topPlanDropdown.render(this._topPlanDropdownContainer),this._register(this._topPlanDropdown.onDidSelect(async X=>{this.activeBottomPlanDiagram?.clearSubtreePolygon(),this.activeTopPlanDiagram?.clearSubtreePolygon(),this._topPlanDiagramContainers.forEach(te=>{te.style.display="none"}),this._topPlanDiagramContainers[X.index].style.display="",this._propertiesView.setPrimaryElement(this._topPlanDiagramModels[X.index].root),this._topPlanRecommendations.recommendations=this._topPlanDiagramModels[X.index].recommendations,this._activeTopPlanIndex=X.index,await this.getSkeletonNodes()})),this._topPlanContainer.appendChild(this._topPlanDropdownContainer),this._topPlanRecommendations=this._register(this._instantiationService.createInstance(l.ExecutionPlanViewHeader,this._topPlanContainer,void 0)),this.initializeSash(),this._bottomPlanContainer=r.$(".plan-container"),this.planSplitViewContainer.appendChild(this._bottomPlanContainer),this._bottomPlanDropdownContainer=r.$(".dropdown-container"),this._bottomPlanDropdown=this._register(new t.SelectBox(["option 1","option2"],"option1",k.defaultSelectBoxStyles,this.contextViewService,this._bottomPlanDropdownContainer)),this._bottomPlanDropdown.render(this._bottomPlanDropdownContainer),this._register(this._bottomPlanDropdown.onDidSelect(async X=>{this.activeBottomPlanDiagram?.clearSubtreePolygon(),this.activeTopPlanDiagram?.clearSubtreePolygon(),this._bottomPlanDiagramContainers.forEach(te=>{te.style.display="none"}),this._bottomPlanDiagramContainers[X.index].style.display="",this._propertiesView.setPrimaryElement(this._bottomPlanDiagramModels[X.index].root),this._bottomPlanRecommendations.recommendations=this._bottomPlanDiagramModels[X.index].recommendations,this._activeBottomPlanIndex=X.index,await this.getSkeletonNodes()})),this._bottomPlanContainer.appendChild(this._bottomPlanDropdownContainer),this._bottomPlanRecommendations=this._register(this._instantiationService.createInstance(l.ExecutionPlanViewHeader,this._bottomPlanContainer,void 0))}initializeSash(){this._sashContainer=r.$(".sash-container"),this.planSplitViewContainer.appendChild(this._sashContainer),this._verticalSash=this._register(new f.Sash(this._sashContainer,new ie(this),{orientation:0,size:3}));let j,ee=0;this._register(this._verticalSash.onDidStart(te=>{j=this._topPlanContainer.offsetWidth})),this._register(this._verticalSash.onDidChange(te=>{ee=te.startX-te.currentX;const Z=j-ee;Z<200||(this._topPlanContainer.style.minWidth="200px",this._topPlanContainer.style.flex=`0 0 ${Z}px`)})),this._horizontalSash=this._register(new f.Sash(this._sashContainer,new $(this),{orientation:1,size:3}));let X;this._register(this._horizontalSash.onDidStart(te=>{X=this._topPlanContainer.offsetHeight})),this._register(this._horizontalSash.onDidChange(te=>{ee=te.startY-te.currentY;const Z=X-ee;Z<200||(this._topPlanContainer.style.minHeight="200px",this._topPlanContainer.style.flex=`0 0 ${Z}px`)}))}initializeProperties(){this._propertiesContainer=r.$(".properties"),this._propertiesView=this._register(this._instantiationService.createInstance(D.ExecutionPlanComparisonPropertiesView,this._propertiesContainer)),this._planComparisonContainer.appendChild(this._propertiesContainer)}initializeWidgetControllers(){this._topWidgetContainer=r.$(".plan-action-container"),this._topPlanContainer.appendChild(this._topWidgetContainer),this.topWidgetController=new E.ExecutionPlanWidgetController(this._topWidgetContainer),this._bottomWidgetContainer=r.$(".plan-action-container"),this._bottomPlanContainer.appendChild(this._bottomWidgetContainer),this.bottomWidgetController=new E.ExecutionPlanWidgetController(this._bottomWidgetContainer)}async openAndAddExecutionPlanFile(){try{const j=await this._fileDialogService.showOpenDialog({filters:[{extensions:await this._executionPlanService.getSupportedExecutionPlanExtensions(),name:(0,i.localize)(4,null)}],canSelectMany:!1,canSelectFiles:!0});if(j?.length===1){this._placeholderInfoboxContainer.style.display="none",this._placeholderLoading.loading=!0;const ee=j[0],X=(await this._textFileService.read(ee,{acceptTextOnly:!0})).value;let te=await this._executionPlanService.getExecutionPlan({graphFileContent:X,graphFileType:(0,u.extname)(ee.fsPath).replace(".","")});await this.addExecutionPlanGraph(te.graphs,0)}this._placeholderInfoboxContainer.style.display="",this._placeholderLoading.loading=!1,this._placeholderInfoboxContainer.style.display=""}catch(j){this._placeholderLoading.loading=!1,this._notificationService.error(j)}}async addExecutionPlanGraph(j,ee){this._topPlanDiagramModels?(this._bottomPlanDiagramModels=j,this._bottomPlanDropdown.setOptions(j.map((X,te)=>({text:this.createQueryDropdownPrefixString(X.query,te+1,j.length)}))),j.forEach((X,te)=>{const Z=r.$(".plan-diagram");this._bottomPlanDiagramContainers.push(Z),this._bottomPlanContainer.appendChild(Z);const se=(0,i.localize)(6,null,te+1),re=this._register(this._instantiationService.createInstance(b.AzdataGraphView,Z,X,se));this._register(re.onElementSelected(oe=>{this._propertiesView.setSecondaryElement(oe);const le=oe.id.replace("element-","");if(this._bottomSimilarNode.has(le)){const ne=this._bottomSimilarNode.get(le);if(this.activeTopPlanDiagram){if(this.activeTopPlanDiagram.getSelectedElement()&&ne.matchingNodesId.find(ae=>this.activeTopPlanDiagram.getSelectedElement().id==="element-"+ae)!==void 0)return;const ce=this.activeTopPlanDiagram.getElementById("element-"+ne.matchingNodesId[0]);this.activeTopPlanDiagram.selectElement(ce)}}})),this.bottomPlanDiagrams.push(re),Z.style.display="none"}),this._bottomPlanDropdown.select(ee),this._propertiesView.setSecondaryElement(j[0].root),this._addExecutionPlanAction.enabled=!1,this._searchNodeActionForAddedPlan.enabled=!0,this._areTooltipsEnabled||this.activeBottomPlanDiagram.toggleTooltip()):(this._topPlanDiagramModels=j,this._topPlanDropdown.setOptions(j.map((X,te)=>({text:this.createQueryDropdownPrefixString(X.query,te+1,j.length)}))),j.forEach((X,te)=>{const Z=r.$(".plan-diagram");this._topPlanDiagramContainers.push(Z),this._topPlanContainer.appendChild(Z);const se=(0,i.localize)(5,null,te+1),re=this._register(this._instantiationService.createInstance(b.AzdataGraphView,Z,X,se));this._register(re.onElementSelected(oe=>{this._propertiesView.setPrimaryElement(oe);const le=oe.id.replace("element-","");if(this._topSimilarNode.has(le)){const ne=this._topSimilarNode.get(le);if(this.activeBottomPlanDiagram){if(ne.matchingNodesId.find(ae=>this.activeBottomPlanDiagram.getSelectedElement().id==="element-"+ae)!==void 0)return;const ce=this.activeBottomPlanDiagram.getElementById("element-"+ne.matchingNodesId[0]);this.activeBottomPlanDiagram.selectElement(ce)}}})),this.topPlanDiagrams.push(re),Z.style.display="none"}),this._topPlanDropdown.select(ee),this._propertiesView.setPrimaryElement(j[0].root),this._propertiesAction.enabled=!0,this._zoomInAction.enabled=!0,this._zoomOutAction.enabled=!0,this._resetZoomAction.enabled=!0,this._zoomToFitAction.enabled=!0,this._toggleOrientationAction.enabled=!0,this._searchNodeAction.enabled=!0),this.refreshSplitView()}async getSkeletonNodes(){this.activeBottomPlanDiagram&&await this._progressService.withProgress({location:15,title:(0,i.localize)(7,null),cancellable:!1},async j=>{if(this._polygonRootsMap=new Map,this._topSimilarNode=new Map,this._bottomSimilarNode=new Map,this._topPlanDiagramModels&&this._bottomPlanDiagramModels){this._topPlanDiagramModels[this._activeTopPlanIndex].graphFile.graphFileType="sqlplan",this._bottomPlanDiagramModels[this._activeBottomPlanIndex].graphFile.graphFileType="sqlplan";const ee=(0,g.generateUuid)();this._latestRequestUuid=ee;const X=await this._executionPlanService.compareExecutionPlanGraph(this._topPlanDiagramModels[this._activeTopPlanIndex].graphFile,this._bottomPlanDiagramModels[this._activeBottomPlanIndex].graphFile);if(ee!==this._latestRequestUuid)return;this.getSimilarSubtrees(X.firstComparisonResult),this.getSimilarSubtrees(X.secondComparisonResult,!0);let te=0;this._polygonRootsMap.forEach((Z,se)=>{this.activeTopPlanDiagram&&this.activeBottomPlanDiagram&&(this.activeTopPlanDiagram.drawSubtreePolygon(Z.topPolygon.baseNode.id,s.polygonFillColor[te],s.polygonBorderColor[te]),this.activeBottomPlanDiagram.drawSubtreePolygon(Z.bottomPolygon.baseNode.id,s.polygonFillColor[te],s.polygonBorderColor[te]),te+=1)})}})}getSimilarSubtrees(j,ee=!1){if(j.hasMatch){if(!ee)this._topSimilarNode.set(`${j.baseNode.id}`,j),this._polygonRootsMap.has(j.groupIndex)||this._polygonRootsMap.set(j.groupIndex,{topPolygon:j,bottomPolygon:void 0});else if(this._bottomSimilarNode.set(`${j.baseNode.id}`,j),this._polygonRootsMap.get(j.groupIndex).bottomPolygon===void 0){const X=this._polygonRootsMap.get(j.groupIndex);X.bottomPolygon=j,this._polygonRootsMap.set(j.groupIndex,X)}}j.children.forEach(X=>{this.getSimilarSubtrees(X,ee)})}togglePropertiesView(){this._propertiesContainer.style.display=this._propertiesContainer.style.display==="none"?"":"none"}toggleTooltips(){let j;return this.activeTopPlanDiagram&&(j=this.activeTopPlanDiagram.toggleTooltip()),this.activeBottomPlanDiagram&&(j=this.activeBottomPlanDiagram.toggleTooltip()),this._areTooltipsEnabled=j,j}toggleOrientation(){this._orientation==="vertical"?(this._sashContainer.style.width="100%",this._sashContainer.style.height="3px",this.planSplitViewContainer.style.flexDirection="column",this._topPlanContainer.style.minHeight="200px",this._topPlanContainer.style.minWidth="",this._topPlanContainer.style.flex="1",this._orientation=D.ExecutionPlanCompareOrientation.Horizontal,this._toggleOrientationAction.class=s.splitScreenHorizontallyIconClassName):(this._sashContainer.style.width="3px",this._sashContainer.style.height="100%",this.planSplitViewContainer.style.flexDirection="row",this._topPlanContainer.style.minHeight="",this._topPlanContainer.style.minWidth="200px",this._orientation=D.ExecutionPlanCompareOrientation.Vertical,this._toggleOrientationAction.class=s.splitScreenVerticallyIconClassName),this._propertiesView.orientation=this._orientation,this._topPlanContainer.style.flex="1",this._bottomPlanContainer.style.flex="1"}refreshSplitView(){this.planSplitViewContainer.contains(this._topPlanContainer)&&this.planSplitViewContainer.removeChild(this._topPlanContainer),this.planSplitViewContainer.contains(this._bottomPlanContainer)&&this.planSplitViewContainer.removeChild(this._bottomPlanContainer),this.planSplitViewContainer.contains(this._sashContainer)&&this.planSplitViewContainer.removeChild(this._sashContainer),this.planSplitViewContainer.contains(this._placeholderContainer)&&this.planSplitViewContainer.removeChild(this._placeholderContainer),!this._topPlanDiagramModels&&!this._bottomPlanDiagramModels?this.planSplitViewContainer.appendChild(this._placeholderContainer):this._topPlanDiagramModels&&!this._bottomPlanDiagramModels?(this.planSplitViewContainer.appendChild(this._topPlanContainer),this.planSplitViewContainer.appendChild(this._sashContainer),this.planSplitViewContainer.appendChild(this._placeholderContainer)):(this.planSplitViewContainer.appendChild(this._topPlanContainer),this.planSplitViewContainer.appendChild(this._sashContainer),this.planSplitViewContainer.appendChild(this._bottomPlanContainer))}zoomIn(){this.activeTopPlanDiagram?.zoomIn(),this.activeBottomPlanDiagram?.zoomIn(),this.syncZoom()}zoomOut(){this.activeTopPlanDiagram?.zoomOut(),this.activeBottomPlanDiagram?.zoomOut(),this.syncZoom()}zoomToFit(){this.activeTopPlanDiagram?.zoomToFit(),this.activeBottomPlanDiagram.zoomToFit(),this.syncZoom()}resetZoom(){this.activeTopPlanDiagram?.setZoomLevel(100),this.activeBottomPlanDiagram?.setZoomLevel(100)}syncZoom(){this.activeTopPlanDiagram===void 0&&this.activeBottomPlanDiagram===void 0||(this.activeTopPlanDiagram.getZoomLevel()<this.activeBottomPlanDiagram.getZoomLevel()?this.activeBottomPlanDiagram.setZoomLevel(this.activeTopPlanDiagram.getZoomLevel()):this.activeTopPlanDiagram.setZoomLevel(this.activeBottomPlanDiagram.getZoomLevel()))}};e.ExecutionPlanComparisonEditorView=P,e.ExecutionPlanComparisonEditorView=P=fe([O(1,h.IInstantiationService),O(2,T.IExecutionPlanService),O(3,S.IFileDialogService),O(4,m.IContextViewService),O(5,o.ITextFileService),O(6,d.INotificationService),O(7,n.IProgressService),O(8,m.IContextMenuService)],P);let x=class extends v.Action{static{L=this}static{this.ID="ep.AddExecutionPlan"}static{this.LABEL=(0,i.localize)(8,null)}constructor(j){super(L.ID,L.LABEL,s.addIconClassName),this.telemetryService=j}async run(j){this.telemetryService.sendActionEvent("ExecutionPlan","AddExecutionPlan"),await j.openAndAddExecutionPlanFile()}};x=L=fe([O(0,w.IAdsTelemetryService)],x);class F extends v.Action{static{this.ID="ep.zoomIn"}static{this.LABEL=(0,i.localize)(9,null)}constructor(){super(F.ID,F.LABEL,s.zoomInIconClassNames),this.enabled=!1}async run(j){j.zoomIn()}}class V extends v.Action{static{this.ID="ep.zoomOut"}static{this.LABEL=(0,i.localize)(10,null)}constructor(){super(V.ID,V.LABEL,s.zoomOutIconClassNames),this.enabled=!1}async run(j){j.zoomOut()}}class W extends v.Action{static{this.ID="ep.zoomToFit"}static{this.LABEL=(0,i.localize)(11,null)}constructor(){super(W.ID,W.LABEL,s.zoomToFitIconClassNames),this.enabled=!1}async run(j){j.zoomToFit()}}class z extends v.Action{static{this.ID="ep.resetZoom"}static{this.LABEL=(0,i.localize)(12,null)}constructor(){super(z.ID,z.LABEL,s.resetZoomIconClassName),this.enabled=!1}async run(j){j.resetZoom()}}class B extends v.Action{static{this.ID="ep.toggleOrientation"}static{this.LABEL=(0,i.localize)(13,null)}constructor(){super(B.ID,B.LABEL,s.splitScreenHorizontallyIconClassName),this.enabled=!1}async run(j){j.toggleOrientation()}}let K=class extends v.Action{static{R=this}static{this.ID="epCompare.comparePropertiesAction"}static{this.LABEL=(0,i.localize)(14,null)}constructor(j){super(R.ID,R.LABEL,s.openPropertiesIconClassNames),this.telemetryService=j,this.enabled=!1}async run(j){this.telemetryService.createActionEvent("ExecutionPlan","ViewExecutionPlanComparisonProperties").send(),j.togglePropertiesView()}};K=R=fe([O(0,w.IAdsTelemetryService)],K);class H extends v.Action{static{this.ID="ep.tooltipToggleActionBar"}static{this.WHEN_TOOLTIPS_ENABLED_LABEL=(0,i.localize)(15,null)}static{this.WHEN_TOOLTIPS_DISABLED_LABEL=(0,i.localize)(16,null)}constructor(){super(H.ID,H.WHEN_TOOLTIPS_ENABLED_LABEL,s.enableTooltipIconClassName)}async run(j){j.toggleTooltips()?(this.class=s.enableTooltipIconClassName,this.label=H.WHEN_TOOLTIPS_ENABLED_LABEL):(this.class=s.disableTooltipIconClassName,this.label=H.WHEN_TOOLTIPS_DISABLED_LABEL)}}e.ActionBarToggleTooltip=H;var U;(function(J){J[J.Primary=0]="Primary",J[J.Added=1]="Added"})(U||(U={}));let G=class extends v.Action{static{M=this}static{this.ID="epCompare.searchNodeAction"}static{this.LABEL=(0,i.localize)(17,null)}static{this.LABEL_FOR_ADDED_PLAN=(0,i.localize)(18,null)}constructor(j,ee,X){super(M.ID,void 0,s.searchIconClassNames,!0,()=>j===U.Added?M.LABEL_FOR_ADDED_PLAN:M.LABEL),this._planIdentifier=j,this._instantiationService=ee,this._telemetryService=X,this.enabled=!1}async run(j){let ee=this._planIdentifier===U.Added?j.activeBottomPlanDiagram:j.activeTopPlanDiagram,X=this._planIdentifier===U.Added?j.bottomWidgetController:j.topWidgetController;if(ee){this._telemetryService.createActionEvent("ExecutionPlan","FindNode").withAdditionalProperties({source:"ComparisonView"}).send();let te=this._register(this._instantiationService.createInstance(C.NodeSearchWidget,X,ee));X.toggleWidget(te)}}};G=M=fe([O(1,h.IInstantiationService),O(2,w.IAdsTelemetryService)],G);class ${constructor(j){this._context=j}getHorizontalSashTop(j){return 0}getHorizontalSashLeft(j){return 0}getHorizontalSashWidth(j){return this._context.planSplitViewContainer.clientWidth}}class ie{constructor(j){this._context=j}getVerticalSashLeft(j){return 0}getVerticalSashTop(j){return 0}getVerticalSashHeight(j){return this._context.planSplitViewContainer.clientHeight}}(0,a.registerThemingParticipant)((J,j)=>{const ee=J.getColor(c.errorForeground);ee&&j.addRule(` .designer-component .issues-container .issue-item .issue-icon.codicon-error { color: ${ee}; }`);const X=J.getColor(c.textLinkForeground);X&&j.addRule(` .eps-container .comparison-editor .plan-comparison-container .split-view-container .plan-container .recommendations { color: ${X}; } `);const te=J.getColor(c.listHoverBackground);te&&j.addRule(` .eps-container .comparison-editor .plan-comparison-container .split-view-container .plan-container .recommendations { background-color: ${te}; } `);const Z=J.getColor(c.widgetShadow);Z&&j.addRule(` .eps-container .comparison-editor .plan-comparison-container .split-view-container .plan-container .plan-action-container .child { box-shadow: 0 0 8px 2px ${Z}; } `);const se=J.getColor(c.editorWidgetBackground);se&&j.addRule(` .eps-container .comparison-editor .plan-comparison-container .split-view-container .plan-container .plan-action-container .child { background-color: ${se}; } `);const re=J.getColor(c.contrastBorder);re&&j.addRule(` .eps-container .comparison-editor .plan-comparison-container .split-view-container .plan-container .plan-action-container .child { border: 1px solid ${re}; } `)})}),define(Q[4099],Y([1,0,2055,7,24,30,19,164,29,5,4098,790]),function(q,e,t,y,b,D,T,f,v,m,S){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionPlanComparisonEditor=void 0;let a=class extends f.EditorPane{static{h=this}static{this.ID="workbench.editor.compareExecutionPlan"}static{this.LABEL=(0,t.localize)(0,null)}constructor(i,s,o,u,d){super(h.ID,s,o,u),this._instantiationService=i,this.contextViewService=d}createEditor(i){this._editorContainer=y.$(".eps-container"),i.appendChild(this._editorContainer)}get input(){return super.input}layout(i){this._editorContainer.style.width=i.width+"px",this._editorContainer.style.height=i.height+"px"}async setInput(i,s,o,u){const d=this.input;if(d&&i.matches(d))return Promise.resolve();for(super.setInput(i,s,o,u);this._editorContainer.firstChild;)this._editorContainer.removeChild(this._editorContainer.firstChild);i._executionPlanComparisonView?this._editorContainer.appendChild(i._executionPlanComparisonView.container):(i._executionPlanComparisonView=this._register(this._instantiationService.createInstance(S.ExecutionPlanComparisonEditorView,this._editorContainer)),this.input.preloadModel&&(this.input.preloadModel.topExecutionPlan&&i._executionPlanComparisonView.addExecutionPlanGraph(this.input.preloadModel.topExecutionPlan,this.input.preloadModel.topPlanIndex),this.input.preloadModel.bottomExecutionPlan&&i._executionPlanComparisonView.addExecutionPlanGraph(this.input.preloadModel.bottomExecutionPlan,this.input.preloadModel.bottomPlanIndex)))}};e.ExecutionPlanComparisonEditor=a,e.ExecutionPlanComparisonEditor=a=h=fe([O(0,m.IInstantiationService),O(1,D.ITelemetryService),O(2,T.IThemeService),O(3,b.IStorageService),O(4,v.IContextViewService)],a)}),define(Q[4100],Y([1,0,137,2509,5,60,93,53,14]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaveParticipant=void 0;class m{constructor(a){this._proxy=a.getProxy(f.ExtHostContext.ExtHostDocumentSaveParticipant)}async participate(a,r,i,s){if(!a.textEditorModel||!(0,t.shouldSynchronizeModel)(a.textEditorModel))return;const o=new Promise((u,d)=>{setTimeout(()=>d(new Error((0,y.localize)(0,null))),1750),this._proxy.$participateInSave(a.resource,r.reason).then(p=>{if(!p.every(c=>c))return Promise.reject(new Error("listener failed"))}).then(u,d)});return(0,v.raceCancellationError)(o,s)}}let S=class{constructor(a,r,i){this._textFileService=i,this._saveParticipantDisposable=this._textFileService.files.addSaveParticipant(r.createInstance(m,a))}dispose(){this._saveParticipantDisposable.dispose()}};e.SaveParticipant=S,e.SaveParticipant=S=fe([D.extHostCustomer,O(1,b.IInstantiationService),O(2,T.ITextFileService)],S)}),define(Q[213],Y([1,0,10,26,306,50,39,9,57,93,382,22,25,19,6,61,252,4,5,180]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceLabel=e.ResourceLabels=e.DEFAULT_LABELS_CONTAINER=void 0;function c(E){if(!(!E||!E.resource))return t.URI.isUri(E.resource)?E.resource:E.resource.primary}e.DEFAULT_LABELS_CONTAINER={onDidChangeVisibility:i.Event.None};let l=class extends u.Disposable{constructor(C,I,_,A,k,L,R,M,N,P){super(),this.instantiationService=I,this.configurationService=_,this.modelService=A,this.workspaceService=k,this.languageService=L,this.decorationsService=R,this.themeService=M,this.labelService=N,this.textFileService=P,this._onDidChangeDecorations=this._register(new i.Emitter),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this.widgets=[],this.labels=[],this.registerListeners(C)}registerListeners(C){this._register(C.onDidChangeVisibility(I=>{this.widgets.forEach(_=>_.notifyVisibilityChanged(I))})),this._register(this.languageService.onDidChange(()=>this.widgets.forEach(I=>I.notifyExtensionsRegistered()))),this._register(this.modelService.onModelLanguageChanged(I=>{I.model.uri&&this.widgets.forEach(_=>_.notifyModelLanguageChanged(I.model))})),this._register(this.modelService.onModelAdded(I=>{I.uri&&this.widgets.forEach(_=>_.notifyModelAdded(I))})),this._register(this.workspaceService.onDidChangeWorkspaceFolders(()=>{this.widgets.forEach(I=>I.notifyWorkspaceFoldersChange())})),this._register(this.decorationsService.onDidChangeDecorations(I=>{let _=!1;this.widgets.forEach(A=>{A.notifyFileDecorationsChanges(I)&&(_=!0)}),_&&this._onDidChangeDecorations.fire()})),this._register(this.themeService.onDidColorThemeChange(()=>this.widgets.forEach(I=>I.notifyThemeChange()))),this._register(this.configurationService.onDidChangeConfiguration(I=>{I.affectsConfiguration(a.FILES_ASSOCIATIONS_CONFIG)&&this.widgets.forEach(_=>_.notifyFileAssociationsChange())})),this._register(this.labelService.onDidChangeFormatters(I=>{this.widgets.forEach(_=>_.notifyFormattersChange(I.scheme))})),this._register(this.textFileService.untitled.onDidChangeLabel(I=>{this.widgets.forEach(_=>_.notifyUntitledLabelChange(I.resource))}))}get(C){return this.labels[C]}create(C,I){const _=this.instantiationService.createInstance(w,C,I),A={element:_.element,onDidRender:_.onDidRender,setLabel:(k,L,R)=>_.setLabel(k,L,R),setResource:(k,L)=>_.setResource(k,L),setFile:(k,L)=>_.setFile(k,L),clear:()=>_.clear(),dispose:()=>this.disposeWidget(_)};return this.labels.push(A),this.widgets.push(_),A}disposeWidget(C){const I=this.widgets.indexOf(C);I>-1&&(this.widgets.splice(I,1),this.labels.splice(I,1)),(0,u.dispose)(C)}clear(){this.widgets=(0,u.dispose)(this.widgets),this.labels=[]}dispose(){super.dispose(),this.clear()}};e.ResourceLabels=l,e.ResourceLabels=l=fe([O(1,d.IInstantiationService),O(2,f.IConfigurationService),O(3,v.IModelService),O(4,T.IWorkspaceContextService),O(5,D.ILanguageService),O(6,S.IDecorationsService),O(7,r.IThemeService),O(8,s.ILabelService),O(9,m.ITextFileService)],l);let n=class extends l{get element(){return this.label}constructor(C,I,_,A,k,L,R,M,N,P,x){super(e.DEFAULT_LABELS_CONTAINER,_,A,k,L,R,M,N,P,x),this.label=this._register(this.create(C,I))}};e.ResourceLabel=n,e.ResourceLabel=n=fe([O(2,d.IInstantiationService),O(3,f.IConfigurationService),O(4,v.IModelService),O(5,T.IWorkspaceContextService),O(6,D.ILanguageService),O(7,S.IDecorationsService),O(8,r.IThemeService),O(9,s.ILabelService),O(10,m.ITextFileService)],n);var g;(function(E){E[E.Basic=1]="Basic",E[E.Full=2]="Full"})(g||(g={}));let w=class extends b.IconLabel{constructor(C,I,_,A,k,L,R){super(C,I),this.languageService=_,this.modelService=A,this.decorationsService=k,this.labelService=L,this.contextService=R,this._onDidRender=this._register(new i.Emitter),this.onDidRender=this._onDidRender.event,this.label=void 0,this.decoration=this._register(new u.MutableDisposable),this.options=void 0,this.computedIconClasses=void 0,this.computedLanguageId=void 0,this.computedPathLabel=void 0,this.computedWorkspaceFolderLabel=void 0,this.needsRedraw=void 0,this.isHidden=!1}notifyVisibilityChanged(C){C===this.isHidden&&(this.isHidden=!C,C&&this.needsRedraw&&(this.render({updateIcon:this.needsRedraw===g.Full,updateDecoration:this.needsRedraw===g.Full}),this.needsRedraw=void 0))}notifyModelLanguageChanged(C){this.handleModelEvent(C)}notifyModelAdded(C){this.handleModelEvent(C)}handleModelEvent(C){const I=c(this.label);I&&(0,y.isEqual)(C.uri,I)&&this.computedLanguageId!==C.getLanguageId()&&(this.computedLanguageId=C.getLanguageId(),this.render({updateIcon:!0,updateDecoration:!1}))}notifyFileDecorationsChanges(C){if(!this.options)return!1;const I=c(this.label);return I&&this.options.fileDecorations&&C.affectsResource(I)?this.render({updateIcon:!1,updateDecoration:!0}):!1}notifyExtensionsRegistered(){this.render({updateIcon:!0,updateDecoration:!1})}notifyThemeChange(){this.render({updateIcon:!1,updateDecoration:!1})}notifyFileAssociationsChange(){this.render({updateIcon:!0,updateDecoration:!1})}notifyFormattersChange(C){c(this.label)?.scheme===C&&this.render({updateIcon:!1,updateDecoration:!1})}notifyUntitledLabelChange(C){(0,y.isEqual)(C,c(this.label))&&this.render({updateIcon:!1,updateDecoration:!1})}notifyWorkspaceFoldersChange(){if(typeof this.computedWorkspaceFolderLabel=="string"){const C=c(this.label);t.URI.isUri(C)&&this.label?.name===this.computedWorkspaceFolderLabel&&this.setFile(C,this.options)}}setFile(C,I){const _=I?.hideLabel;let A;if(!_){if(I?.fileKind===a.FileKind.ROOT_FOLDER){const L=this.contextService.getWorkspaceFolder(C);L&&(A=L.name,this.computedWorkspaceFolderLabel=A)}A||(A=(0,p.normalizeDriveLetter)((0,y.basenameOrAuthority)(C)))}let k;I?.hidePath||(k=this.labelService.getUriLabel((0,y.dirname)(C),{relative:!0})),this.setResource({resource:C,name:A,description:k},I)}setResource(C,I=Object.create(null)){const _=this.hasResourceChanged(C),A=_||this.hasPathLabelChanged(C),k=this.hasFileKindChanged(I);this.label=C,this.options=I,_&&(this.computedLanguageId=void 0),A&&(this.computedPathLabel=void 0),this.render({updateIcon:_||k,updateDecoration:_||k})}hasFileKindChanged(C){const I=C?.fileKind,_=this.options?.fileKind;return I!==_}hasResourceChanged(C){const I=c(C),_=c(this.label);return I&&_?I.toString()!==_.toString():!(!I&&!_)}hasPathLabelChanged(C){const I=c(C);return!!I&&this.computedPathLabel!==this.labelService.getUriLabel(I)}clear(){this.label=void 0,this.options=void 0,this.computedLanguageId=void 0,this.computedIconClasses=void 0,this.computedPathLabel=void 0,this.setLabel("")}render(C){if(this.isHidden)return this.needsRedraw!==g.Full&&(this.needsRedraw=C.updateIcon||C.updateDecoration?g.Full:g.Basic),!1;if(C.updateIcon&&(this.computedIconClasses=void 0),!this.label)return!1;const I={title:"",italic:this.options?.italic,strikethrough:this.options?.strikethrough,matches:this.options?.matches,descriptionMatches:this.options?.descriptionMatches,extraClasses:[],separator:this.options?.separator,domId:this.options?.domId,disabledCommand:this.options?.disabledCommand,labelEscapeNewLines:this.options?.labelEscapeNewLines},_=c(this.label),A=this.label.name;if(this.options?.title!==void 0&&(I.title=this.options.title),_&&_.scheme!==h.Schemas.data&&(!this.options?.title||typeof this.options.title!="string"&&!this.options.title.markdownNotSupportedFallback)&&(this.computedPathLabel||(this.computedPathLabel=this.labelService.getUriLabel(_)),!I.title||typeof I.title=="string"?I.title=this.computedPathLabel:I.title.markdownNotSupportedFallback||(I.title.markdownNotSupportedFallback=this.computedPathLabel)),this.options&&!this.options.hideIcon&&(this.computedIconClasses||(this.computedIconClasses=(0,o.getIconClasses)(this.modelService,this.languageService,_,this.options.fileKind)),I.extraClasses=this.computedIconClasses.slice(0)),this.options?.extraClasses&&I.extraClasses.push(...this.options.extraClasses),this.options?.fileDecorations&&_){C.updateDecoration&&(this.decoration.value=this.decorationsService.getDecoration(_,this.options.fileKind!==a.FileKind.FILE));const k=this.decoration.value;if(k){if(k.tooltip){if(typeof I.title=="string")I.title=`${I.title} \u2022 ${k.tooltip}`;else if(typeof I.title?.markdown=="string"){const L=`${I.title.markdown} \u2022 ${k.tooltip}`;I.title={markdown:L,markdownNotSupportedFallback:L}}}k.strikethrough&&(I.strikethrough=!0),this.options.fileDecorations.colors&&I.extraClasses.push(k.labelClassName),this.options.fileDecorations.badges&&(I.extraClasses.push(k.badgeClassName),I.extraClasses.push(k.iconClassName))}}return this.setLabel(A||"",this.label.description,I),this._onDidRender.fire(),!0}dispose(){super.dispose(),this.label=void 0,this.options=void 0,this.computedLanguageId=void 0,this.computedIconClasses=void 0,this.computedPathLabel=void 0,this.computedWorkspaceFolderLabel=void 0}};w=fe([O(2,D.ILanguageService),O(3,v.IModelService),O(4,S.IDecorationsService),O(5,s.ILabelService),O(6,T.IWorkspaceContextService)],w)}),define(Q[4101],Y([1,0,25,10,5,4,213]),function(q,e,t,y,b,D,T){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.FileBrowserRenderer=void 0;let v=class{static{f=this}static{this.FILE_HEIGHT=22}static{this.FILE_TEMPLATE_ID="carbonFileBrowser"}constructor(S){this.instantiationService=S,this.resourceLabels=this.instantiationService.createInstance(T.ResourceLabels,T.DEFAULT_LABELS_CONTAINER)}getHeight(S,h){return f.FILE_HEIGHT}getTemplateId(S,h){return f.FILE_TEMPLATE_ID}renderTemplate(S,h,a){const r=new D.DisposableStore,i=this.resourceLabels.create(a);return{templateDisposables:r,elementDisposables:r.add(new D.DisposableStore),label:i,container:a}}renderElement(S,h,a,r){if(h){r.label.element.style.display="flex";const i=["explorer-item"];let s=y.URI.file(h.fullPath),o;h.parent===null?o=t.FileKind.ROOT_FOLDER:h.isFile===!1?o=t.FileKind.FOLDER:o=t.FileKind.FILE,r.label.setFile(s,{hidePath:!0,fileKind:o,extraClasses:i})}}disposeTemplate(S,h,a){a.label.dispose()}};e.FileBrowserRenderer=v,e.FileBrowserRenderer=v=f=fe([O(0,b.IInstantiationService)],v)}),define(Q[1402],Y([1,0,3161,2297,4101,583,788,4,2201,305,445,5,278,19]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileBrowserTreeView=void 0;let i=class extends f.Disposable{constructor(o,u,d){super(),this._instantiationService=o,this._fileBrowserService=u,this._themeService=d}async renderBody(o,u,d,p){this._tree||(o.classList.add("show-file-icons"),this._tree=this._register(this.createFileBrowserTree(o,this._instantiationService)),this._register(this._tree.onDidChangeSelection(c=>this.onSelected(c))),this._register(this._fileBrowserService.onExpandFolder(c=>this._tree.refresh(c))),this._register((0,a.attachListStyler)(this._tree,this._themeService)),this._tree.domFocus()),u&&(await this._tree.setInput(u),p&&await this._tree.expandAll(p),d&&(this._tree.select(d),this._tree.setFocus(d)),this._tree.getFocus())}createFileBrowserTree(o,u){const d=u.createInstance(t.FileBrowserDataSource),p=u.createInstance(b.FileBrowserRenderer),c=u.createInstance(y.FileBrowserController),l=new m.DefaultDragAndDrop,n=new m.DefaultFilter,g=null,w=new m.DefaultAccessibilityProvider;return new S.Tree(o,{dataSource:d,renderer:p,controller:c,dnd:l,filter:n,sorter:g,accessibilityProvider:w},{indentPixels:10,twistiePixels:12,ariaLabel:v.localize(0,null)})}async refreshTree(o){let u,d;if(this._tree.domFocus(),this._tree){let p=this._tree.getSelection();p&&p.length===1&&(u=p[0]),d=this._tree.getExpandedElements()}o&&(await this._tree.setInput(o),d&&await this._tree.expandAll(d),u&&(this._tree.select(u),this._tree.setFocus(u)),this._tree.getFocus())}onSelected(o){let u=this._tree.getSelection();if(u&&u.length>0&&u[0]instanceof T.FileNode){let d=o.payload&&o.payload.origin==="mouse",p=d&&o.payload.originalEvent&&o.payload.originalEvent.detail===1,c=d&&o.payload.originalEvent&&o.payload.originalEvent.detail===2;p?this.onClickedCallback(o.selection[0]):c&&this.onDoubleClickedCallback(o.selection[0])}}setOnClickedCallback(o){this.onClickedCallback=o}setOnDoubleClickedCallback(o){this.onDoubleClickedCallback=o}layout(o){this._tree.layout(o)}setVisible(o){o?this._tree.onVisible():this._tree.onHidden()}};e.FileBrowserTreeView=i,e.FileBrowserTreeView=i=fe([O(0,h.IInstantiationService),O(1,D.IFileBrowserService),O(2,r.IThemeService)],i)}),define(Q[4102],Y([1,0,40,155,5,1141,1402,168,11]),function(q,e,t,y,b,D,T,f,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let m=class extends y.ComponentBase{constructor(h,a,r,i){super(h,r,i),this._instantiationService=a,this._fileFilters=[{label:"All Files",filters:["*"]}]}ngAfterViewInit(){this._viewModel=this._instantiationService.createInstance(D.FileBrowserViewModel),this._viewModel.onAddFileTree(h=>this.handleOnAddFileTree(h.rootNode,h.selectedNode,h.expandedNodes)),this._viewModel.onPathValidate(h=>this.handleOnValidate(h.succeeded,h.message)),this.baseInit()}initialize(){this._viewModel.initialize(this.ownerUri,"",this._fileFilters,"Backup"),this._treeView=this._instantiationService.createInstance(T.FileBrowserTreeView),this._treeView.setOnClickedCallback(h=>{this.onClicked(h)}),this._treeView.setOnDoubleClickedCallback(h=>this.onDoubleClicked(h)),this._register(this._treeView),this._viewModel.openFileBrowser(0,!1)}onClicked(h){this.fireEvent({eventType:f.ComponentEventType.onDidChange,args:{fullPath:h.fullPath,isFile:h.isFile}})}onDoubleClicked(h){h.isFile}async handleOnAddFileTree(h,a,r){await this.updateFileTree(h,a,r)}async updateFileTree(h,a,r){await this._treeView.renderBody(this._treeContainer.nativeElement,h,a,r),this._treeView.setVisible(!0),this.layoutTree(),this._changeRef.detectChanges()}handleOnValidate(h,a){h===!1&&a===""&&(a="The provided path is invalid.")}ngOnDestroy(){this.baseDestroy()}setLayout(){this.layout()}layoutTree(){this._treeView.layout(700)}setProperties(h){super.setProperties(h),this.ownerUri&&this.initialize()}get ownerUri(){return this.getPropertyOrDefault(h=>h.ownerUri,"")}set ownerUri(h){this.setPropertyFromUI((a,r)=>a.ownerUri=r,h)}get CSSStyles(){return this.mergeCss(super.CSSStyles,{width:this.getWidth(),height:this.getHeight()})}};fe([(0,t.Input)()],m.prototype,"descriptor",void 0),fe([(0,t.Input)()],m.prototype,"modelStore",void 0),fe([(0,t.ViewChild)("fileBrowserTree",{read:t.ElementRef})],m.prototype,"_treeContainer",void 0),m=fe([(0,t.Component)({selector:"modelview-fileBrowserTree",template:` <div #fileBrowserTree [ngStyle]="CSSStyles"></div> `}),O(0,(0,t.Inject)((0,t.forwardRef)(()=>t.ChangeDetectorRef))),O(1,(0,t.Inject)(b.IInstantiationService)),O(2,(0,t.Inject)((0,t.forwardRef)(()=>t.ElementRef))),O(3,(0,t.Inject)(v.ILogService))],m),e.default=m}),define(Q[4103],Y([1,0,166,199,350,174,1402,1141,8,6,2199,29,5,7,33,263,19,11,76,15,147,111,78,54,101,1664]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o,u,d,p,c,l,n,g,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileBrowserDialog=void 0;let E=class extends D.Modal{constructor(I,_,A,k,L,R,M,N,P,x){super(I,"FileBrowser",R,_,N,A,P,x,M,{dialogStyle:"flyout",hasTitleIcon:!1,hasBackButton:!1,hasSpinner:!0}),this._instantiationService=k,this._contextViewService=L,this._onOk=new m.Emitter,this.onOk=this._onOk.event,this._viewModel=this._instantiationService.createInstance(f.FileBrowserViewModel),this._viewModel.onAddFileTree(F=>this.handleOnAddFileTree(F.rootNode,F.selectedNode,F.expandedNodes).catch(V=>(0,p.onUnexpectedError)(V))),this._viewModel.onPathValidate(F=>this.handleOnValidate(F.succeeded,F.message))}layout(I){}renderBody(I){this._body=r.append(I,r.$(".file-browser-dialog"))}render(){super.render(),(0,c.attachModalDialogStyler)(this,this._themeService),this._treeContainer=r.append(this._body,r.$(".tree-view"));let I=r.append(r.append(this._body,r.$(".option-section")),r.$("table.file-table-content"));I.setAttribute("role","presentation");let _=(0,S.localize)(0,null),A=b.appendRow(I,_,"file-input-label","file-input-box");this._filePathInputBox=new t.InputBox(A,this._contextViewService,{ariaLabel:_,inputBoxStyles:g.defaultInputBoxStyles});let k=(0,S.localize)(1,null);this._fileFilterSelectBox=this._register(new y.SelectBox(["*"],"*",w.defaultSelectBoxStyles,this._contextViewService)),this._fileFilterSelectBox.setAriaLabel(k);let L=b.appendRow(I,k,"file-input-label","file-input-box");b.appendInputSelectBox(L,this._fileFilterSelectBox),this._fileFilterRow=I.childNodes[1],this._originalFilterDisplay=this._fileFilterRow.style.display,this._okButton=this.addFooterButton((0,S.localize)(2,null),()=>this.ok()),this._okButton.enabled=!1,this.addFooterButton((0,S.localize)(3,null),()=>this.close(),"right",!0),this.registerListeners(),this.updateTheme()}open(I,_,A,k,L){this._viewModel.initialize(I,_,A,k,L),this._viewModel.openFileBrowser(0,!1).catch(R=>(0,p.onUnexpectedError)(R)),L?(this._fileFilterSelectBox.setOptions([]),this._fileFilterRow.style.display="none"):(this._fileFilterSelectBox.setOptions(this._viewModel.formattedFileFilters,0),this._fileFilterRow.style.display=this._originalFilterDisplay),this._filePathInputBox.value=_,this._isFolderSelected=!0,this.enableOkButton(),this.spinner=!0,this.show(),this._fileBrowserTreeView=this._instantiationService.createInstance(T.FileBrowserTreeView),this._fileBrowserTreeView.setOnClickedCallback(R=>this.onClicked(R)),this._fileBrowserTreeView.setOnDoubleClickedCallback(R=>this.onDoubleClicked(R))}onAccept(){this._okButton.enabled&&this.ok()}async handleOnAddFileTree(I,_,A){await this.updateFileTree(I,_,A),this.spinner=!1}enableOkButton(){i.isFalsyOrWhitespace(this._selectedFilePath)||this._isFolderSelected&&!this._viewModel.showFoldersOnly?this._okButton.enabled=!1:this._okButton.enabled=!0}onClicked(I){this._filePathInputBox.value=I.fullPath,I.isFile===!0?this._isFolderSelected=!1:this._isFolderSelected=!0,this.enableOkButton()}onDoubleClicked(I){I.isFile===!0&&this.ok()}onFilePathChange(I){this._isFolderSelected=!1,this._selectedFilePath=I,this._filePathInputBox.hideMessage(),this.enableOkButton()}async onFilePathBlur(I){return i.isFalsyOrWhitespace(I.value)?!0:this._viewModel.validateFilePaths([I.value])}ok(){this._onOk.fire(this._selectedFilePath),this.close("ok")}handleOnValidate(I,_){I===!1&&(i.isFalsyOrWhitespace(_)&&(_="The provided path is invalid."),this._filePathInputBox.showMessage({type:3,content:_}))}close(I="close"){this._fileBrowserTreeView&&this._fileBrowserTreeView.dispose(),this._onOk.dispose(),this.hide(I),this._viewModel.closeFileBrowser().catch(_=>(0,p.onUnexpectedError)(_))}async updateFileTree(I,_,A){await this._fileBrowserTreeView.renderBody(this._treeContainer,I,_,A),this._fileBrowserTreeView.setVisible(!0),this._fileBrowserTreeView.layout(r.getTotalHeight(this._treeContainer))}async onFilterSelectChanged(I){this.spinner=!0,await this._viewModel.openFileBrowser(I,!0)}registerListeners(){this._fileFilterSelectBox&&this._register(this._fileFilterSelectBox.onDidSelect(I=>{this.onFilterSelectChanged(I.index).catch(_=>(0,p.onUnexpectedError)(_))})),this._register(this._filePathInputBox.onDidChange(I=>{this.onFilePathChange(I)})),this._register(this._filePathInputBox.onLoseFocus(I=>{this.onFilePathBlur(I).catch(_=>(0,p.onUnexpectedError)(_))})),this._register(this._themeService.onDidColorThemeChange(I=>this.updateTheme()))}updateTheme(){this._treeContainer&&(this._treeContainer.style.backgroundColor=this.headerAndFooterBackground)}};e.FileBrowserDialog=E,e.FileBrowserDialog=E=fe([O(1,l.ILayoutService),O(2,o.IThemeService),O(3,a.IInstantiationService),O(4,h.IContextViewService),O(5,d.IAdsTelemetryService),O(6,v.IContextKeyService),O(7,s.IClipboardService),O(8,u.ILogService),O(9,n.ITextResourcePropertiesService)],E)}),define(Q[4104],Y([1,0,4103,2200,5]),function(q,e,t,y,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileBrowserDialogController=void 0;let D=class{constructor(f){this._instantiationService=f}showDialog(f,v,m,S,h,a,r){this._fileBrowserDialog||(this._fileBrowserDialog=this._instantiationService.createInstance(t.FileBrowserDialog,(0,y.localize)(0,null)),this._fileBrowserDialog.render()),this._fileBrowserDialog.setWide(h);var i=this._fileBrowserDialog.onOk(o=>a(o)),s=this._fileBrowserDialog.onClosed(o=>{o!=="ok"&&a(void 0),i.dispose(),s.dispose(),this._fileBrowserDialog.dispose(),this._fileBrowserDialog=void 0});this._fileBrowserDialog.open(f,v,m,S,r)}};e.FileBrowserDialogController=D,e.FileBrowserDialogController=D=fe([O(0,b.IInstantiationService)],D)}),define(Q[1403],Y([1,0,7,194,106,58,1110,10,128,4,5,692,667,298,172,213,402,1052]),function(q,e,t,y,b,D,T,f,v,m,S,h,a,r,i,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServerTreeAccessibilityProvider=e.ServerTreeKeyboardNavigationLabelProvider=e.TreeNodeRenderer=e.ConnectionProfileRenderer=e.ConnectionProfileGroupRenderer=void 0;const u="server-page";let d=class extends m.Disposable{constructor(A,k,L,R){super(),this._option=k,this._instantiationService=L,this._objectExplorerService=R,A.parentElement.classList.add("async-server-group"),A.classList.add("async-server-group"),this._root=t.append(A,t.$(".async-server-group-container")),this._icon=t.append(this._root,t.$("div.icon")),this._labelContainer=t.append(this._root,t.$("span.name"